@das-fed/ui 7.0.0-zhaohang.7 → 7.0.0-zhongshen.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (220) hide show
  1. package/esm-map.json +28 -1
  2. package/package.json +12 -5
  3. package/packages/business-components/ai-panel/i18n/index.d.ts +244 -0
  4. package/packages/business-components/ai-panel/index-CD2YNg3j.js +5856 -0
  5. package/packages/business-components/ai-panel/index-CD2YNg3j.js.gz +0 -0
  6. package/packages/business-components/ai-panel/index-CJeKTaAS.js +60 -0
  7. package/packages/business-components/ai-panel/index-CJeKTaAS.js.gz +0 -0
  8. package/packages/business-components/ai-panel/index-DWHxqEh3.js +180 -0
  9. package/packages/business-components/ai-panel/index-DWHxqEh3.js.gz +0 -0
  10. package/packages/business-components/ai-panel/index.js +9 -0
  11. package/packages/business-components/ai-panel/src/dasAI/apis.d.ts +17 -0
  12. package/packages/business-components/ai-panel/src/dasAI/components/addNew/index.vue.d.ts +6 -0
  13. package/packages/business-components/ai-panel/src/dasAI/components/deleteDialog/index.d.ts +7 -0
  14. package/packages/business-components/ai-panel/src/dasAI/components/deleteDialog/index.vue.d.ts +12 -0
  15. package/packages/business-components/ai-panel/src/dasAI/components/folderDialog/index.d.ts +6 -0
  16. package/packages/business-components/ai-panel/src/dasAI/components/sender/components/senderOpt.vue.d.ts +2 -0
  17. package/packages/business-components/ai-panel/src/dasAI/hooks/audio.d.ts +8 -0
  18. package/packages/business-components/ai-panel/src/dasAI/hooks/knowbase.d.ts +4 -0
  19. package/packages/business-components/ai-panel/src/dasAI/index.vue.d.ts +16 -0
  20. package/packages/business-components/ai-panel/src/dasAI/store/index.d.ts +21 -0
  21. package/packages/business-components/ai-panel/src/index.vue.d.ts +31 -0
  22. package/packages/business-components/ai-panel/src/type.d.ts +13 -0
  23. package/packages/business-components/ai-panel/style.css +1 -0
  24. package/packages/business-components/ai-panel/style.css.gz +0 -0
  25. package/packages/business-components/change-pwd/index.js +13 -10
  26. package/packages/business-components/change-pwd/index.js.gz +0 -0
  27. package/packages/business-components/change-pwd/style.css +1 -1
  28. package/packages/business-components/device-panel/index.js +2819 -2799
  29. package/packages/business-components/device-panel/index.js.gz +0 -0
  30. package/packages/business-components/device-panel/src/components/alarmDevicePanel/index.vue.d.ts +1 -1
  31. package/packages/business-components/device-panel/src/components/alarmDevicePanel/linkDialog.vue.d.ts +1 -1
  32. package/packages/business-components/device-panel/src/components/devicePanelModal/linkDialog.vue.d.ts +1 -1
  33. package/packages/business-components/device-panel/style.css +1 -1
  34. package/packages/business-components/device-panel/style.css.gz +0 -0
  35. package/packages/business-components/index.d.ts +1 -0
  36. package/packages/business-components/index.js +1 -0
  37. package/packages/business-components/layout-breadcrumb/index.js +57 -57
  38. package/packages/business-components/layout-breadcrumb/index.js.gz +0 -0
  39. package/packages/business-components/model-table-dialog/index.d.ts +9 -9
  40. package/packages/business-components/model-table-dialog/src/Index.vue.d.ts +3 -3
  41. package/packages/business-components/payment/index.js +8 -8
  42. package/packages/business-components/payment/index.js.gz +0 -0
  43. package/packages/business-components/process-search-form/hooks/useService.d.ts +1 -1
  44. package/packages/business-components/user-org-dialog/index.js +2 -2
  45. package/packages/business-components/user-org-dialog/index.js.gz +0 -0
  46. package/packages/business-components/user-org-dialog/style.css +1 -1
  47. package/packages/business-components/user-org-dialog/style.css.gz +0 -0
  48. package/packages/business-components/video-dialog/index.d.ts +5 -0
  49. package/packages/business-components/video-dialog/index.js +378 -332
  50. package/packages/business-components/video-dialog/index.js.gz +0 -0
  51. package/packages/business-components/video-dialog/src/component/Player/index.vue.d.ts +3 -0
  52. package/packages/business-components/video-dialog/src/hooks/use-video/PlayerProvider.d.ts +11 -1
  53. package/packages/business-components/video-dialog/src/index.vue.d.ts +1 -0
  54. package/packages/business-components/video-dialog/src/type.d.ts +2 -0
  55. package/packages/business-components/video-dialog/style.css +1 -1
  56. package/packages/business-components/video-dialog/style.css.gz +0 -0
  57. package/packages/components/dimple-layout/index.js +1 -1
  58. package/packages/components/dimple-layout/index.js.gz +0 -0
  59. package/packages/components/hls-player/i18n/index.d.ts +13 -0
  60. package/packages/components/hls-player/index.d.ts +172 -0
  61. package/packages/components/hls-player/index.js +21183 -0
  62. package/packages/components/hls-player/index.js.gz +0 -0
  63. package/packages/components/hls-player/src/das-hls-player.vue.d.ts +47 -0
  64. package/packages/components/hls-player/src/type.d.ts +33 -0
  65. package/packages/components/hls-player/style.css +1 -0
  66. package/packages/components/hls-player/style.css.gz +0 -0
  67. package/packages/components/image-upload/index.d.ts +2 -0
  68. package/packages/components/image-upload/index.js +770 -114
  69. package/packages/components/image-upload/index.js.gz +0 -0
  70. package/packages/components/image-upload/src/Index.vue.d.ts +2 -0
  71. package/packages/components/image-upload/src/hooks/use-compress-image.d.ts +1 -0
  72. package/packages/components/image-upload/src/type.d.ts +6 -0
  73. package/packages/components/image-upload/style.css +1 -1
  74. package/packages/components/image-upload/style.css.gz +0 -0
  75. package/packages/components/image-viewer/index.d.ts +6 -2
  76. package/packages/components/image-viewer/index.js +1117 -432
  77. package/packages/components/image-viewer/index.js.gz +0 -0
  78. package/packages/components/image-viewer/src/Index.vue.d.ts +6 -2
  79. package/packages/components/image-viewer/src/hooks/use-compress-image.d.ts +1 -0
  80. package/packages/components/image-viewer/src/hooks/use-imageViewer.d.ts +1 -0
  81. package/packages/components/image-viewer/src/type.d.ts +9 -0
  82. package/packages/components/image-viewer/style.css +1 -1
  83. package/packages/components/image-viewer/style.css.gz +0 -0
  84. package/packages/components/index.d.ts +1 -0
  85. package/packages/components/index.js +1 -0
  86. package/packages/components/input-dialog-select/index.d.ts +0 -1
  87. package/packages/components/input-dialog-select/index.js +17 -17
  88. package/packages/components/input-dialog-select/index.js.gz +0 -0
  89. package/packages/components/input-dialog-select/src/Index.vue.d.ts +0 -1
  90. package/packages/components/input-dialog-select/style.css +1 -1
  91. package/packages/components/input-dialog-select/style.css.gz +0 -0
  92. package/packages/components/radio-tabs/index.js +1 -1
  93. package/packages/components/radio-tabs/index.js.gz +0 -0
  94. package/packages/components/radio-tabs/style.css +1 -1
  95. package/packages/components/radio-tabs/style.css.gz +0 -0
  96. package/packages/components/scrollbar/index.js +1 -1
  97. package/packages/components/scrollbar/index.js.gz +0 -0
  98. package/packages/components/scrollbar/style.css +1 -1
  99. package/packages/components/scrollbar/style.css.gz +0 -0
  100. package/packages/components/select/index.js +58 -57
  101. package/packages/components/select/index.js.gz +0 -0
  102. package/packages/components/select/src/type.d.ts +2 -0
  103. package/packages/components/select/style.css +1 -1
  104. package/packages/components/select/style.css.gz +0 -0
  105. package/packages/components/select-list/index.d.ts +3 -3
  106. package/packages/components/select-list/index.js +390 -377
  107. package/packages/components/select-list/index.js.gz +0 -0
  108. package/packages/components/select-list/src/Index.vue.d.ts +4 -3
  109. package/packages/components/select-list/src/hooks/use-select-list.d.ts +1 -0
  110. package/packages/components/select-list/src/type.d.ts +1 -1
  111. package/packages/components/select-list/style.css +1 -1
  112. package/packages/components/select-list/style.css.gz +0 -0
  113. package/packages/components/table/style.css +1 -1
  114. package/packages/components/table/style.css.gz +0 -0
  115. package/packages/components/tree/index.js +90 -86
  116. package/packages/components/tree/index.js.gz +0 -0
  117. package/packages/components/tree-select/index.js +1 -0
  118. package/packages/components/tree-select/index.js.gz +0 -0
  119. package/packages/components/tree-select/src/App.vue.d.ts +2 -0
  120. package/packages/components/tree-select/src/hooks/use-tree-select.d.ts +2 -0
  121. package/packages/components/tree-table/index.js +291 -263
  122. package/packages/components/tree-table/index.js.gz +0 -0
  123. package/packages/components/tree-table/src/hooks/use-five.d.ts +4 -0
  124. package/packages/components/tree-table/src/hooks/use-four.d.ts +4 -0
  125. package/packages/components/tree-table/src/type.d.ts +1 -1
  126. package/packages/components/tree-table/style.css +1 -1
  127. package/packages/components/tree-table/style.css.gz +0 -0
  128. package/packages/icons/audioing/index.d.ts +1 -0
  129. package/packages/icons/audioing/index.js +17 -0
  130. package/packages/icons/audioing/index.js.gz +0 -0
  131. package/packages/icons/audioing/index.vue.d.ts +19 -0
  132. package/packages/icons/bobaoguanbi/index.d.ts +1 -0
  133. package/packages/icons/bobaoguanbi/index.js +17 -0
  134. package/packages/icons/bobaoguanbi/index.js.gz +0 -0
  135. package/packages/icons/bobaoguanbi/index.vue.d.ts +19 -0
  136. package/packages/icons/bobaokaiqi/index.d.ts +1 -0
  137. package/packages/icons/bobaokaiqi/index.js +17 -0
  138. package/packages/icons/bobaokaiqi/index.js.gz +0 -0
  139. package/packages/icons/bobaokaiqi/index.vue.d.ts +19 -0
  140. package/packages/icons/cankaoneirong/index.d.ts +1 -0
  141. package/packages/icons/cankaoneirong/index.js +22 -0
  142. package/packages/icons/cankaoneirong/index.js.gz +0 -0
  143. package/packages/icons/cankaoneirong/index.vue.d.ts +19 -0
  144. package/packages/icons/closeaudio/index.d.ts +1 -0
  145. package/packages/icons/closeaudio/index.js +17 -0
  146. package/packages/icons/closeaudio/index.js.gz +0 -0
  147. package/packages/icons/closeaudio/index.vue.d.ts +19 -0
  148. package/packages/icons/fasong/index.d.ts +1 -0
  149. package/packages/icons/fasong/index.js +22 -0
  150. package/packages/icons/fasong/index.js.gz +0 -0
  151. package/packages/icons/fasong/index.vue.d.ts +19 -0
  152. package/packages/icons/fresh/index.d.ts +1 -0
  153. package/packages/icons/fresh/index.js +22 -0
  154. package/packages/icons/fresh/index.js.gz +0 -0
  155. package/packages/icons/fresh/index.vue.d.ts +19 -0
  156. package/packages/icons/fuzhineirong/index.d.ts +1 -0
  157. package/packages/icons/fuzhineirong/index.js +22 -0
  158. package/packages/icons/fuzhineirong/index.js.gz +0 -0
  159. package/packages/icons/fuzhineirong/index.vue.d.ts +19 -0
  160. package/packages/icons/huida/index.d.ts +1 -0
  161. package/packages/icons/huida/index.js +22 -0
  162. package/packages/icons/huida/index.js.gz +0 -0
  163. package/packages/icons/huida/index.vue.d.ts +19 -0
  164. package/packages/icons/huidaodibu/index.d.ts +1 -0
  165. package/packages/icons/huidaodibu/index.js +22 -0
  166. package/packages/icons/huidaodibu/index.js.gz +0 -0
  167. package/packages/icons/huidaodibu/index.vue.d.ts +19 -0
  168. package/packages/icons/index.d.ts +23 -0
  169. package/packages/icons/index.js +23 -0
  170. package/packages/icons/intnet/index.d.ts +1 -0
  171. package/packages/icons/intnet/index.js +17 -0
  172. package/packages/icons/intnet/index.js.gz +0 -0
  173. package/packages/icons/intnet/index.vue.d.ts +19 -0
  174. package/packages/icons/know/index.d.ts +1 -0
  175. package/packages/icons/know/index.js +17 -0
  176. package/packages/icons/know/index.js.gz +0 -0
  177. package/packages/icons/know/index.vue.d.ts +19 -0
  178. package/packages/icons/knowed/index.d.ts +1 -0
  179. package/packages/icons/knowed/index.js +17 -0
  180. package/packages/icons/knowed/index.js.gz +0 -0
  181. package/packages/icons/knowed/index.vue.d.ts +19 -0
  182. package/packages/icons/knowopen/index.d.ts +1 -0
  183. package/packages/icons/knowopen/index.js +17 -0
  184. package/packages/icons/knowopen/index.js.gz +0 -0
  185. package/packages/icons/knowopen/index.vue.d.ts +19 -0
  186. package/packages/icons/lianjie/index.d.ts +1 -0
  187. package/packages/icons/lianjie/index.js +22 -0
  188. package/packages/icons/lianjie/index.js.gz +0 -0
  189. package/packages/icons/lianjie/index.vue.d.ts +19 -0
  190. package/packages/icons/lishihuihua/index.d.ts +1 -0
  191. package/packages/icons/lishihuihua/index.js +22 -0
  192. package/packages/icons/lishihuihua/index.js.gz +0 -0
  193. package/packages/icons/lishihuihua/index.vue.d.ts +19 -0
  194. package/packages/icons/qingkong/index.d.ts +1 -0
  195. package/packages/icons/qingkong/index.js +22 -0
  196. package/packages/icons/qingkong/index.js.gz +0 -0
  197. package/packages/icons/qingkong/index.vue.d.ts +19 -0
  198. package/packages/icons/select2/index.d.ts +1 -0
  199. package/packages/icons/select2/index.js +17 -0
  200. package/packages/icons/select2/index.vue.d.ts +19 -0
  201. package/packages/icons/shendusikao/index.d.ts +1 -0
  202. package/packages/icons/shendusikao/index.js +22 -0
  203. package/packages/icons/shendusikao/index.js.gz +0 -0
  204. package/packages/icons/shendusikao/index.vue.d.ts +19 -0
  205. package/packages/icons/tianjiaxinhuati/index.d.ts +1 -0
  206. package/packages/icons/tianjiaxinhuati/index.js +22 -0
  207. package/packages/icons/tianjiaxinhuati/index.js.gz +0 -0
  208. package/packages/icons/tianjiaxinhuati/index.vue.d.ts +19 -0
  209. package/packages/icons/yingyong/index.d.ts +1 -0
  210. package/packages/icons/yingyong/index.js +17 -0
  211. package/packages/icons/yingyong/index.js.gz +0 -0
  212. package/packages/icons/yingyong/index.vue.d.ts +19 -0
  213. package/packages/icons/yuyin/index.d.ts +1 -0
  214. package/packages/icons/yuyin/index.js +17 -0
  215. package/packages/icons/yuyin/index.js.gz +0 -0
  216. package/packages/icons/yuyin/index.vue.d.ts +19 -0
  217. package/packages/icons/zhongxinshengcheng/index.d.ts +1 -0
  218. package/packages/icons/zhongxinshengcheng/index.js +22 -0
  219. package/packages/icons/zhongxinshengcheng/index.js.gz +0 -0
  220. package/packages/icons/zhongxinshengcheng/index.vue.d.ts +19 -0
@@ -1,269 +1,921 @@
1
1
  import '@das-fed/ui/packages/components/image-viewer/style.css';
2
- import { withInstall as be } from "@das-fed/utils/with-install/index";
3
- import { setThemeRule as Pe } from "@das-fed/web/packages/theme/index";
4
- import { ref as ie, computed as R, watch as Je, createApp as Ne, defineComponent as Ve, createElementBlock as I, openBlock as g, Fragment as x, createCommentVNode as r, createElementVNode as V, withDirectives as y, normalizeStyle as $, createVNode as z, unref as e, normalizeClass as _, withCtx as q, createBlock as k, vShow as Q, isRef as re, createTextVNode as le, toDisplayString as ue, renderList as de } from "vue";
5
- import { ElImageViewer as Te, ElImage as ce } from "element-plus";
6
- import { Upload as me } from "ant-design-vue";
7
- import { vDasTooltip as ge } from "@das-fed/ui/packages/components/text-tooltip/index";
8
- import { DasImageUpload as pe } from "@das-fed/ui/packages/components/image-upload/index";
9
- import { DasSpin as Ae } from "@das-fed/ui/packages/components/spin/index";
10
- import { DasAudioVideo as ee } from "@das-fed/ui/packages/components/audio-video/index";
11
- import { DasIconDownload as fe } from "@das-fed/ui/packages/icons/download/index";
12
- import { DasIconChange as ve } from "@das-fed/ui/packages/icons/change/index";
13
- import { DasIconDelete as we } from "@das-fed/ui/packages/icons/delete/index";
14
- import { useModelValue as Ee } from "@das-fed/utils/vue";
15
- import { DasMessage as he } from "@das-fed/ui/packages/components/message/index";
16
- import { extractFilename as Be, getFileExtension as Le } from "@das-fed/utils/common-tools";
17
- import { getConfig as ne } from "@das-fed/utils/config";
18
- import { currentLang as Ie, i18n as Ce } from "@das-fed/web/packages/i18n/index";
19
- import { iotMinio as ye } from "@das-fed/utils/api-services/modules/iot";
20
- import { useFile as Me } from "@das-fed/utils/api-services/modules/file";
21
- import { getUserInfo as Ke } from "@das-fed/utils/common-info";
22
- import { pureImageSrc as se } from "@das-fed/utils/pure-image-src";
2
+ import { withInstall as rt } from "@das-fed/utils/with-install/index";
3
+ import { setThemeRule as ot } from "@das-fed/web/packages/theme/index";
4
+ import { ref as Ee, computed as x, watch as st, createApp as lt, defineComponent as ut, createElementBlock as U, openBlock as y, Fragment as de, createCommentVNode as p, createElementVNode as X, withDirectives as J, normalizeStyle as fe, createVNode as ie, unref as n, normalizeClass as ge, withCtx as ne, createBlock as O, vShow as j, isRef as Qe, createTextVNode as Pe, toDisplayString as Te, renderList as Me } from "vue";
5
+ import { ElImageViewer as ct, ElImage as Le } from "element-plus";
6
+ import { Upload as Fe } from "ant-design-vue";
7
+ import { vDasTooltip as Ne } from "@das-fed/ui/packages/components/text-tooltip/index";
8
+ import { DasImageUpload as Ve } from "@das-fed/ui/packages/components/image-upload/index";
9
+ import { DasSpin as Je } from "@das-fed/ui/packages/components/spin/index";
10
+ import { DasAudioVideo as ve } from "@das-fed/ui/packages/components/audio-video/index";
11
+ import { DasIconDownload as je } from "@das-fed/ui/packages/icons/download/index";
12
+ import { DasIconChange as pe } from "@das-fed/ui/packages/icons/change/index";
13
+ import { DasIconDelete as ze } from "@das-fed/ui/packages/icons/delete/index";
14
+ import { useModelValue as be } from "@das-fed/utils/vue";
15
+ import { DasMessage as xe } from "@das-fed/ui/packages/components/message/index";
16
+ import { extractFilename as _e, getFileExtension as mt } from "@das-fed/utils/common-tools";
17
+ import { getConfig as De } from "@das-fed/utils/config";
18
+ import { currentLang as Ke, i18n as He } from "@das-fed/web/packages/i18n/index";
19
+ import { iotMinio as et } from "@das-fed/utils/api-services/modules/iot";
20
+ import { useFile as dt } from "@das-fed/utils/api-services/modules/file";
21
+ import { getUserInfo as ft } from "@das-fed/utils/common-info";
22
+ import { pureImageSrc as Re } from "@das-fed/utils/pure-image-src";
23
23
  import "ant-design-vue/es/upload/style/css";
24
24
  import "element-plus/es/components/image/style/css";
25
25
  import "element-plus/es/components/image-viewer/style/css";
26
26
  import "@das-fed/ui/packages/global/theme";
27
- const oe = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAYAAACtWK6eAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAyKADAAQAAAABAAAAyAAAAACbWz2VAAAPbUlEQVR4Ae1dDXfiKhDV1o92T3f//9/ctVWjUR+XLe9hnvKRkMCQO+fYJIYg3OGWmYHA8nq93tRnQSECROAegZeXl8Xqdrst8KEQASJwjwB48XL/Fa+IABGwESBBbDR4TgQ6CJAgHUB4SQRsBEgQGw2eE4EOAiRIBxBeEgEbARLERoPnRKCDAAnSAYSXRMBGgASx0eA5EeggQIJ0AOElEbARIEFsNHhOBDoIkCAdQHhJBGwESBAbDZ4TgQ4CJEgHEF4SARsBEsRGg+dEoIMACdIBhJdEwEaABLHR4DkR6CBAgnQA4SURsBEgQWw0eE4EOgiQIB1AeEkEbARIEBsNnhOBDgIkSAcQXhIBGwESxEaD50SggwAJ0gGEl0TARoAEsdHgORHoIECCdADhJRGwESBBbDR4TgQ6CJAgHUB4SQRsBEgQGw2eE4EOAiRIBxBeEgEbARLERo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oaPXlfu9D6wYBxOLUg8CJEiELlce/4O9RwSYQpKSIBGKWnl6EEavIsAUkpQECVTUcqmg8izrc7nQQQ+EU0wyEiRQVXr8w5EWS4ryvXMHQEJvkSCBivP5H5y5GwiksGQkSKDCXlbuda8uLaNXgVCKSkaCBKrLN/7BHiQQSGHJSJAAhfmml+jxD/WCFKU+BEiQAJ1i9RKXtJfWdZv3BCNAggQo79VDkCsJEoCizCQkSIDefP4Hp5cEgCg0CQkSoDifiXXh/KsAFGUmIUE8etMj6J40fP/DA5Dg2ySIR3l+/4PRKw+Eom+TIB71+cwrLkztAVD4bRLEo8CXFzdE9D88AAq/7da+8MqlKP7SQxBMUqTUiwAJ4tHtC6a5O4QzeB3gVHDLrf0KKji0Cr4ehHOwhiJc9vMkiEs/apEGp6h30Cl1I0CCOPTrDfHeGOJ1wFfFLRLEocalZ4Xq25VdiAO+Km4tm6a5MVT5WJcYA3Et1ADcLlwH6zF4FXy7Vtt7/wME4YHuqneMGQAAAABJRU5ErkJggg==", Oe = (t, i) => {
28
- const n = new Image();
29
- n.setAttribute("crossOrigin", "Anonymous"), n.onload = function() {
30
- let o = document.createElement("canvas");
31
- const u = o.getContext("2d");
32
- o.width = n.width, o.height = n.height, u.drawImage(n, 0, 0, n.width, n.height), o.toBlob((A) => {
33
- let v = URL.createObjectURL(A), d = document.createElement("a"), D = new MouseEvent("click");
34
- const E = t.substring(t.lastIndexOf(".")).toLowerCase();
35
- d.download = i || `default${E}`, d.href = v, d.dispatchEvent(D), URL.revokeObjectURL(v);
27
+ const Ie = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAYAAACtWK6eAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAyKADAAQAAAABAAAAyAAAAACbWz2VAAAPbUlEQVR4Ae1dDXfiKhDV1o92T3f//9/ctVWjUR+XLe9hnvKRkMCQO+fYJIYg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asEQGfIggRJAPp64+498BMc90gAdIYsSJAEoK/UmsAugWnFxTFcCJV7jwQZqJuQ3oOh3YEgZ3ycBBkI/lotEeQSvO/BV2ldCJV9jwQZoJ8Xtc2C3zmXs+j3ACiqfZQEGaDaNcY+XKJmLTK06wKo/HskyAAd+eZdkRwDwC3kURKkpyL09gnugXO1PwnNq57wFvMYCdJTFauV27yCY87FGHqCW9BjJEhPZei5V45n2+/drRxJeEsAAiRIDyW9Yncqn3mlFsCmyEeABOmhw7XPvFJrZnG1kh7AFvgICdJDKT7zis55D1ALfYQEiVRMiHlF/yMS1IKTkyCRysHUdpdgjw+aVy6EZN0jQSL15Z252/7dmz0yWyYvFAESJEIx2NzTN/eqJUEiEC0/KQkSoaPXlfu9D6wYBxOLUg8CJEiELlce/4O9RwSYQpKSIBGKWnl6EEavIsAUkpQECVTUcqmg8izrc7nQQQ+EU0wyEiRQVXr8w5EWS4ryvXMHQEJvkSCBivP5H5y5GwiksGQkSKDCXlbuda8uLaNXgVCKSkaCBKrLN/7BHiQQSGHJSJAAhfmml+jxD/WCFKU+BEiQAJ1i9RKXtJfWdZv3BCNAggQo79VDkCsJEoCizCQkSIDefP4Hp5cEgCg0CQkSoDifiXXh/KsAFGUmIUE8etMj6J40fP/DA5Dg2ySIR3l+/4PRKw+Eom+TIB71+cwrLkztAVD4bRLEo8CXFzdE9D88AAq/7da+8MqlKP7SQxBMUqTUiwAJ4tHtC6a5O4QzeB3gVHDLrf0KKji0Cr4ehHOwhiJc9vMkiEs/apEGp6h30Cl1I0CCOPTrDfHeGOJ1wFfFLRLEocalZ4Xq25VdiAO+Km4tm6a5MVT5WJcYA3Et1ADcLlwH6zF4FXy7Vtt7/wME4YHuqneMGQAAAABJRU5ErkJggg==", gt = (t, e) => {
28
+ const i = new Image();
29
+ i.setAttribute("crossOrigin", "Anonymous"), i.onload = function() {
30
+ let a = document.createElement("canvas");
31
+ const r = a.getContext("2d");
32
+ a.width = i.width, a.height = i.height, r.drawImage(i, 0, 0, i.width, i.height), a.toBlob((o) => {
33
+ let g = URL.createObjectURL(o), s = document.createElement("a"), f = new MouseEvent("click");
34
+ const c = t.substring(t.lastIndexOf(".")).toLowerCase();
35
+ s.download = e || `default${c}`, s.href = g, s.dispatchEvent(f), URL.revokeObjectURL(g);
36
36
  });
37
- }, n.src = t + "?v=" + Date.now();
38
- }, Fe = (t, i) => {
39
- t && fetch(t).then((n) => n.blob()).then((n) => {
40
- const o = document.createElement("a");
41
- document.body.appendChild(o), o.style.display = "none";
42
- const u = window.URL.createObjectURL(n);
43
- o.href = u, o.download = i, o.click(), document.body.removeChild(o), window.URL.revokeObjectURL(u);
37
+ }, i.src = t + "?v=" + Date.now();
38
+ }, vt = (t, e) => {
39
+ t && fetch(t).then((i) => i.blob()).then((i) => {
40
+ const a = document.createElement("a");
41
+ document.body.appendChild(a), a.style.display = "none";
42
+ const r = window.URL.createObjectURL(i);
43
+ a.href = r, a.download = e, a.click(), document.body.removeChild(a), window.URL.revokeObjectURL(r);
44
44
  });
45
- }, je = (t) => {
46
- const i = (t == null ? void 0 : t.minioTokenApi) ?? "token";
47
- return ye.get(i, (n) => (n.headers || (n.headers = {}), t != null && t.baseUrl && (n.baseURL = t.baseUrl), n));
48
- }, He = (t) => ye.post("put-object", (i) => (i.headers || (i.headers = {}), t && (i.baseURL = t), i.headers["Content-Type"] = "multipart/form-data", i)), ze = () => {
49
- const t = Ke();
45
+ }, pt = (t) => {
46
+ const e = (t == null ? void 0 : t.minioTokenApi) ?? "token";
47
+ return et.get(e, (i) => (i.headers || (i.headers = {}), t != null && t.baseUrl && (i.baseURL = t.baseUrl), i));
48
+ }, ht = (t) => et.post("put-object", (e) => (e.headers || (e.headers = {}), t && (e.baseURL = t), e.headers["Content-Type"] = "multipart/form-data", e)), wt = () => {
49
+ const t = ft();
50
50
  return t ? t.tenantId : "";
51
- }, qe = (t) => {
52
- const { baseUrl: i, serviceName: n, pathPrefix: o, bucketName: u, minioTokenApi: A, autoContentType: v } = t, d = async () => {
53
- const [w, l] = await je({ baseUrl: i, minioTokenApi: A })().run();
54
- return w ? { stauts: !1 } : { status: !0, data: l };
55
- }, { generateUniqueName: D } = Me();
56
- return { upload: async (w, l = {}) => {
57
- const h = await d();
58
- if (!h.status) return;
59
- const U = w.name, C = h.data, T = o || ze(), L = U.substring(U.lastIndexOf(".")).toLowerCase(), K = t.randomName ? `${D("")}${L}` : U, O = n ? `${T}/${n}/${K}` : `${T}/${K}`, F = {
60
- accessKeyId: C.accessKeyId,
61
- secretAccessKey: C.secretAccessKey,
62
- sessionToken: C.sessionToken,
63
- file: w,
64
- bucketName: u || "business",
65
- filePath: O,
51
+ }, At = (t) => {
52
+ const { baseUrl: e, serviceName: i, pathPrefix: a, bucketName: r, minioTokenApi: o, autoContentType: g } = t, s = async () => {
53
+ const [v, d] = await pt({ baseUrl: e, minioTokenApi: o })().run();
54
+ return v ? { stauts: !1 } : { status: !0, data: d };
55
+ }, { generateUniqueName: f } = dt();
56
+ return { upload: async (v, d = {}) => {
57
+ const C = await s();
58
+ if (!C.status) return;
59
+ const h = v.name, m = C.data, E = a || wt(), k = h.substring(h.lastIndexOf(".")).toLowerCase(), S = t.randomName ? `${f("")}${k}` : h, K = i ? `${E}/${i}/${S}` : `${E}/${S}`, T = {
60
+ accessKeyId: m.accessKeyId,
61
+ secretAccessKey: m.secretAccessKey,
62
+ sessionToken: m.sessionToken,
63
+ file: v,
64
+ bucketName: r || "business",
65
+ filePath: K,
66
66
  isThumbnail: !0,
67
- autoContentType: v === !0 ? !0 : void 0,
68
- ...l
69
- }, [j, H] = await He(i)(F).run();
70
- return j ? "error" : H.value;
67
+ autoContentType: g === !0 ? !0 : void 0,
68
+ ...d
69
+ }, [M, L] = await ht(e)(T).run();
70
+ return M ? "error" : L.value;
71
71
  } };
72
- }, Ye = () => ({ size2B: (i) => {
73
- isNaN(Number(i)) ? i = i.toString() : i = i + "M";
74
- const n = Number(i.slice(0, -1)), o = i[i.length - 1].toUpperCase(), u = 1024, A = {
75
- M: u * u,
76
- K: u,
72
+ }, yt = () => ({ size2B: (e) => {
73
+ isNaN(Number(e)) ? e = e.toString() : e = e + "M";
74
+ const i = Number(e.slice(0, -1)), a = e[e.length - 1].toUpperCase(), r = 1024, o = {
75
+ M: r * r,
76
+ K: r,
77
77
  B: 1
78
78
  };
79
- return { finalSize: n * A[o], sizeText: i };
80
- } }), Ze = (t) => ({ handlerImageSrc: (n, o) => {
81
- if (o.startsWith("http")) return o;
82
- const u = t.useOriginUrl ? o : se(o);
83
- return n + u;
84
- } }), Ge = async (t) => {
85
- const n = ne().baseURL + se(t);
86
- return await Be(n);
87
- }, Xe = async (t) => {
88
- const i = ne();
89
- let n = [];
90
- for (const o of t) {
91
- const u = i.baseURL + se(o), A = await Be(u);
92
- n.push(A);
79
+ return { finalSize: i * o[a], sizeText: e };
80
+ } }), Ct = (t) => ({ handlerImageSrc: (i, a) => {
81
+ if (a.startsWith("http")) return a;
82
+ const r = t.useOriginUrl ? a : Re(a);
83
+ return i + r;
84
+ } }), Et = async (t) => {
85
+ const i = De().baseURL + Re(t);
86
+ return await _e(i);
87
+ }, bt = async (t) => {
88
+ const e = De();
89
+ let i = [];
90
+ for (const a of t) {
91
+ const r = e.baseURL + Re(a), o = await _e(r);
92
+ i.push(o);
93
93
  }
94
- return n;
95
- }, We = (t, i) => {
96
- const n = ne(), o = Ee(t, "modelValue"), u = Ee(t, "status"), { upload: A } = qe(t), { size2B: v } = Ye(), { handlerImageSrc: d } = Ze(t), D = ie(""), E = ie([]), w = [".mp4", ".avi", ".mkv", ".mov", ".wmv", ".flv", ".mpeg", ".webm"], l = [".mp3", ".wav", ".aac", ".flac", ".ogg", ".alff", ".wma", ".m4a"], h = R(() => t.baseUrl ? t.baseUrl : process.env.NODE_ENV === "production" ? "" : n.baseURL || ""), U = (a) => {
97
- if (a) {
98
- const c = a.substring(a.lastIndexOf(".")).toLowerCase();
99
- if (w.includes(c)) return "isVideo";
100
- if (l.includes(c)) return "isAudio";
94
+ return i;
95
+ };
96
+ /*!
97
+ * Compressor.js v1.2.1
98
+ * https://fengyuanchen.github.io/compressorjs
99
+ *
100
+ * Copyright 2018-present Chen Fengyuan
101
+ * Released under the MIT license
102
+ *
103
+ * Date: 2023-02-28T14:09:41.732Z
104
+ */
105
+ function We(t, e) {
106
+ var i = Object.keys(t);
107
+ if (Object.getOwnPropertySymbols) {
108
+ var a = Object.getOwnPropertySymbols(t);
109
+ e && (a = a.filter(function(r) {
110
+ return Object.getOwnPropertyDescriptor(t, r).enumerable;
111
+ })), i.push.apply(i, a);
112
+ }
113
+ return i;
114
+ }
115
+ function he(t) {
116
+ for (var e = 1; e < arguments.length; e++) {
117
+ var i = arguments[e] != null ? arguments[e] : {};
118
+ e % 2 ? We(Object(i), !0).forEach(function(a) {
119
+ kt(t, a, i[a]);
120
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(i)) : We(Object(i)).forEach(function(a) {
121
+ Object.defineProperty(t, a, Object.getOwnPropertyDescriptor(i, a));
122
+ });
123
+ }
124
+ return t;
125
+ }
126
+ function Bt(t, e) {
127
+ if (!(t instanceof e))
128
+ throw new TypeError("Cannot call a class as a function");
129
+ }
130
+ function Ye(t, e) {
131
+ for (var i = 0; i < e.length; i++) {
132
+ var a = e[i];
133
+ a.enumerable = a.enumerable || !1, a.configurable = !0, "value" in a && (a.writable = !0), Object.defineProperty(t, tt(a.key), a);
134
+ }
135
+ }
136
+ function It(t, e, i) {
137
+ return e && Ye(t.prototype, e), i && Ye(t, i), Object.defineProperty(t, "prototype", {
138
+ writable: !1
139
+ }), t;
140
+ }
141
+ function kt(t, e, i) {
142
+ return e = tt(e), e in t ? Object.defineProperty(t, e, {
143
+ value: i,
144
+ enumerable: !0,
145
+ configurable: !0,
146
+ writable: !0
147
+ }) : t[e] = i, t;
148
+ }
149
+ function Ae() {
150
+ return Ae = Object.assign ? Object.assign.bind() : function(t) {
151
+ for (var e = 1; e < arguments.length; e++) {
152
+ var i = arguments[e];
153
+ for (var a in i)
154
+ Object.prototype.hasOwnProperty.call(i, a) && (t[a] = i[a]);
155
+ }
156
+ return t;
157
+ }, Ae.apply(this, arguments);
158
+ }
159
+ function Dt(t, e) {
160
+ if (typeof t != "object" || t === null) return t;
161
+ var i = t[Symbol.toPrimitive];
162
+ if (i !== void 0) {
163
+ var a = i.call(t, e);
164
+ if (typeof a != "object") return a;
165
+ throw new TypeError("@@toPrimitive must return a primitive value.");
166
+ }
167
+ return String(t);
168
+ }
169
+ function tt(t) {
170
+ var e = Dt(t, "string");
171
+ return typeof e == "symbol" ? e : String(e);
172
+ }
173
+ var at = { exports: {} };
174
+ (function(t) {
175
+ typeof window > "u" || function(e) {
176
+ var i = e.HTMLCanvasElement && e.HTMLCanvasElement.prototype, a = e.Blob && function() {
177
+ try {
178
+ return !!new Blob();
179
+ } catch {
180
+ return !1;
181
+ }
182
+ }(), r = a && e.Uint8Array && function() {
183
+ try {
184
+ return new Blob([new Uint8Array(100)]).size === 100;
185
+ } catch {
186
+ return !1;
187
+ }
188
+ }(), o = e.BlobBuilder || e.WebKitBlobBuilder || e.MozBlobBuilder || e.MSBlobBuilder, g = /^data:((.*?)(;charset=.*?)?)(;base64)?,/, s = (a || o) && e.atob && e.ArrayBuffer && e.Uint8Array && function(f) {
189
+ var c, v, d, C, h, m, E, k, S;
190
+ if (c = f.match(g), !c)
191
+ throw new Error("invalid data URI");
192
+ for (v = c[2] ? c[1] : "text/plain" + (c[3] || ";charset=US-ASCII"), d = !!c[4], C = f.slice(c[0].length), d ? h = atob(C) : h = decodeURIComponent(C), m = new ArrayBuffer(h.length), E = new Uint8Array(m), k = 0; k < h.length; k += 1)
193
+ E[k] = h.charCodeAt(k);
194
+ return a ? new Blob([r ? E : m], {
195
+ type: v
196
+ }) : (S = new o(), S.append(m), S.getBlob(v));
197
+ };
198
+ e.HTMLCanvasElement && !i.toBlob && (i.mozGetAsFile ? i.toBlob = function(f, c, v) {
199
+ var d = this;
200
+ setTimeout(function() {
201
+ v && i.toDataURL && s ? f(s(d.toDataURL(c, v))) : f(d.mozGetAsFile("blob", c));
202
+ });
203
+ } : i.toDataURL && s && (i.msToBlob ? i.toBlob = function(f, c, v) {
204
+ var d = this;
205
+ setTimeout(function() {
206
+ (c && c !== "image/png" || v) && i.toDataURL && s ? f(s(d.toDataURL(c, v))) : f(d.msToBlob(c));
207
+ });
208
+ } : i.toBlob = function(f, c, v) {
209
+ var d = this;
210
+ setTimeout(function() {
211
+ f(s(d.toDataURL(c, v)));
212
+ });
213
+ })), t.exports ? t.exports = s : e.dataURLtoBlob = s;
214
+ }(window);
215
+ })(at);
216
+ var Ge = at.exports, Rt = function(e) {
217
+ return typeof Blob > "u" ? !1 : e instanceof Blob || Object.prototype.toString.call(e) === "[object Blob]";
218
+ }, Xe = {
219
+ /**
220
+ * Indicates if output the original image instead of the compressed one
221
+ * when the size of the compressed image is greater than the original one's
222
+ * @type {boolean}
223
+ */
224
+ strict: !0,
225
+ /**
226
+ * Indicates if read the image's Exif Orientation information,
227
+ * and then rotate or flip the image automatically.
228
+ * @type {boolean}
229
+ */
230
+ checkOrientation: !0,
231
+ /**
232
+ * Indicates if retain the image's Exif information after compressed.
233
+ * @type {boolean}
234
+ */
235
+ retainExif: !1,
236
+ /**
237
+ * The max width of the output image.
238
+ * @type {number}
239
+ */
240
+ maxWidth: 1 / 0,
241
+ /**
242
+ * The max height of the output image.
243
+ * @type {number}
244
+ */
245
+ maxHeight: 1 / 0,
246
+ /**
247
+ * The min width of the output image.
248
+ * @type {number}
249
+ */
250
+ minWidth: 0,
251
+ /**
252
+ * The min height of the output image.
253
+ * @type {number}
254
+ */
255
+ minHeight: 0,
256
+ /**
257
+ * The width of the output image.
258
+ * If not specified, the natural width of the source image will be used.
259
+ * @type {number}
260
+ */
261
+ width: void 0,
262
+ /**
263
+ * The height of the output image.
264
+ * If not specified, the natural height of the source image will be used.
265
+ * @type {number}
266
+ */
267
+ height: void 0,
268
+ /**
269
+ * Sets how the size of the image should be resized to the container
270
+ * specified by the `width` and `height` options.
271
+ * @type {string}
272
+ */
273
+ resize: "none",
274
+ /**
275
+ * The quality of the output image.
276
+ * It must be a number between `0` and `1`,
277
+ * and only available for `image/jpeg` and `image/webp` images.
278
+ * Check out {@link https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/toBlob canvas.toBlob}.
279
+ * @type {number}
280
+ */
281
+ quality: 0.8,
282
+ /**
283
+ * The mime type of the output image.
284
+ * By default, the original mime type of the source image file will be used.
285
+ * @type {string}
286
+ */
287
+ mimeType: "auto",
288
+ /**
289
+ * Files whose file type is included in this list,
290
+ * and whose file size exceeds the `convertSize` value will be converted to JPEGs.
291
+ * @type {string|Array}
292
+ */
293
+ convertTypes: ["image/png"],
294
+ /**
295
+ * PNG files over this size (5 MB by default) will be converted to JPEGs.
296
+ * To disable this, just set the value to `Infinity`.
297
+ * @type {number}
298
+ */
299
+ convertSize: 5e6,
300
+ /**
301
+ * The hook function to execute before draw the image into the canvas for compression.
302
+ * @type {Function}
303
+ * @param {CanvasRenderingContext2D} context - The 2d rendering context of the canvas.
304
+ * @param {HTMLCanvasElement} canvas - The canvas for compression.
305
+ * @example
306
+ * function (context, canvas) {
307
+ * context.fillStyle = '#fff';
308
+ * }
309
+ */
310
+ beforeDraw: null,
311
+ /**
312
+ * The hook function to execute after drew the image into the canvas for compression.
313
+ * @type {Function}
314
+ * @param {CanvasRenderingContext2D} context - The 2d rendering context of the canvas.
315
+ * @param {HTMLCanvasElement} canvas - The canvas for compression.
316
+ * @example
317
+ * function (context, canvas) {
318
+ * context.filter = 'grayscale(100%)';
319
+ * }
320
+ */
321
+ drew: null,
322
+ /**
323
+ * The hook function to execute when success to compress the image.
324
+ * @type {Function}
325
+ * @param {File} file - The compressed image File object.
326
+ * @example
327
+ * function (file) {
328
+ * console.log(file);
329
+ * }
330
+ */
331
+ success: null,
332
+ /**
333
+ * The hook function to execute when fail to compress the image.
334
+ * @type {Function}
335
+ * @param {Error} err - An Error object.
336
+ * @example
337
+ * function (err) {
338
+ * console.log(err.message);
339
+ * }
340
+ */
341
+ error: null
342
+ }, St = typeof window < "u" && typeof window.document < "u", q = St ? window : {}, ye = function(e) {
343
+ return e > 0 && e < 1 / 0;
344
+ }, Ut = Array.prototype.slice;
345
+ function Se(t) {
346
+ return Array.from ? Array.from(t) : Ut.call(t);
347
+ }
348
+ var Ot = /^image\/.+$/;
349
+ function ke(t) {
350
+ return Ot.test(t);
351
+ }
352
+ function Qt(t) {
353
+ var e = ke(t) ? t.substr(6) : "";
354
+ return e === "jpeg" && (e = "jpg"), ".".concat(e);
355
+ }
356
+ var it = String.fromCharCode;
357
+ function Pt(t, e, i) {
358
+ var a = "", r;
359
+ for (i += e, r = e; r < i; r += 1)
360
+ a += it(t.getUint8(r));
361
+ return a;
362
+ }
363
+ var Tt = q.btoa;
364
+ function qe(t, e) {
365
+ for (var i = [], a = 8192, r = new Uint8Array(t); r.length > 0; )
366
+ i.push(it.apply(null, Se(r.subarray(0, a)))), r = r.subarray(a);
367
+ return "data:".concat(e, ";base64,").concat(Tt(i.join("")));
368
+ }
369
+ function Mt(t) {
370
+ var e = new DataView(t), i;
371
+ try {
372
+ var a, r, o;
373
+ if (e.getUint8(0) === 255 && e.getUint8(1) === 216)
374
+ for (var g = e.byteLength, s = 2; s + 1 < g; ) {
375
+ if (e.getUint8(s) === 255 && e.getUint8(s + 1) === 225) {
376
+ r = s;
377
+ break;
378
+ }
379
+ s += 1;
380
+ }
381
+ if (r) {
382
+ var f = r + 4, c = r + 10;
383
+ if (Pt(e, f, 4) === "Exif") {
384
+ var v = e.getUint16(c);
385
+ if (a = v === 18761, (a || v === 19789) && e.getUint16(c + 2, a) === 42) {
386
+ var d = e.getUint32(c + 4, a);
387
+ d >= 8 && (o = c + d);
388
+ }
389
+ }
390
+ }
391
+ if (o) {
392
+ var C = e.getUint16(o, a), h, m;
393
+ for (m = 0; m < C; m += 1)
394
+ if (h = o + m * 12 + 2, e.getUint16(h, a) === 274) {
395
+ h += 8, i = e.getUint16(h, a), e.setUint16(h, 1, a);
396
+ break;
397
+ }
398
+ }
399
+ } catch {
400
+ i = 1;
401
+ }
402
+ return i;
403
+ }
404
+ function Lt(t) {
405
+ var e = 0, i = 1, a = 1;
406
+ switch (t) {
407
+ case 2:
408
+ i = -1;
409
+ break;
410
+ case 3:
411
+ e = -180;
412
+ break;
413
+ case 4:
414
+ a = -1;
415
+ break;
416
+ case 5:
417
+ e = 90, a = -1;
418
+ break;
419
+ case 6:
420
+ e = 90;
421
+ break;
422
+ case 7:
423
+ e = 90, i = -1;
424
+ break;
425
+ case 8:
426
+ e = -90;
427
+ break;
428
+ }
429
+ return {
430
+ rotate: e,
431
+ scaleX: i,
432
+ scaleY: a
433
+ };
434
+ }
435
+ var Ft = /\.\d*(?:0|9){12}\d*$/;
436
+ function Ze(t) {
437
+ var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 1e11;
438
+ return Ft.test(t) ? Math.round(t * e) / e : t;
439
+ }
440
+ function se(t) {
441
+ var e = t.aspectRatio, i = t.height, a = t.width, r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "none", o = ye(a), g = ye(i);
442
+ if (o && g) {
443
+ var s = i * e;
444
+ (r === "contain" || r === "none") && s > a || r === "cover" && s < a ? i = a / e : a = i * e;
445
+ } else o ? i = a / e : g && (a = i * e);
446
+ return {
447
+ width: a,
448
+ height: i
449
+ };
450
+ }
451
+ function Nt(t) {
452
+ for (var e = Se(new Uint8Array(t)), i = e.length, a = [], r = 0; r + 3 < i; ) {
453
+ var o = e[r], g = e[r + 1];
454
+ if (o === 255 && g === 218)
455
+ break;
456
+ if (o === 255 && g === 216)
457
+ r += 2;
458
+ else {
459
+ var s = e[r + 2] * 256 + e[r + 3], f = r + s + 2, c = e.slice(r, f);
460
+ a.push(c), r = f;
461
+ }
462
+ }
463
+ return a.reduce(function(v, d) {
464
+ return d[0] === 255 && d[1] === 225 ? v.concat(d) : v;
465
+ }, []);
466
+ }
467
+ function Vt(t, e) {
468
+ var i = Se(new Uint8Array(t));
469
+ if (i[2] !== 255 || i[3] !== 224)
470
+ return t;
471
+ var a = i[4] * 256 + i[5], r = [255, 216].concat(e, i.slice(4 + a));
472
+ return new Uint8Array(r);
473
+ }
474
+ var Jt = q.ArrayBuffer, Be = q.FileReader, te = q.URL || q.webkitURL, jt = /\.\w+$/, zt = q.Compressor, xt = /* @__PURE__ */ function() {
475
+ function t(e, i) {
476
+ Bt(this, t), this.file = e, this.exif = [], this.image = new Image(), this.options = he(he({}, Xe), i), this.aborted = !1, this.result = null, this.init();
477
+ }
478
+ return It(t, [{
479
+ key: "init",
480
+ value: function() {
481
+ var i = this, a = this.file, r = this.options;
482
+ if (!Rt(a)) {
483
+ this.fail(new Error("The first argument must be a File or Blob object."));
484
+ return;
485
+ }
486
+ var o = a.type;
487
+ if (!ke(o)) {
488
+ this.fail(new Error("The first argument must be an image File or Blob object."));
489
+ return;
490
+ }
491
+ if (!te || !Be) {
492
+ this.fail(new Error("The current browser does not support image compression."));
493
+ return;
494
+ }
495
+ Jt || (r.checkOrientation = !1, r.retainExif = !1);
496
+ var g = o === "image/jpeg", s = g && r.checkOrientation, f = g && r.retainExif;
497
+ if (te && !s && !f)
498
+ this.load({
499
+ url: te.createObjectURL(a)
500
+ });
501
+ else {
502
+ var c = new Be();
503
+ this.reader = c, c.onload = function(v) {
504
+ var d = v.target, C = d.result, h = {}, m = 1;
505
+ s && (m = Mt(C), m > 1 && Ae(h, Lt(m))), f && (i.exif = Nt(C)), s || f ? !te || m > 1 ? h.url = qe(C, o) : h.url = te.createObjectURL(a) : h.url = C, i.load(h);
506
+ }, c.onabort = function() {
507
+ i.fail(new Error("Aborted to read the image with FileReader."));
508
+ }, c.onerror = function() {
509
+ i.fail(new Error("Failed to read the image with FileReader."));
510
+ }, c.onloadend = function() {
511
+ i.reader = null;
512
+ }, s || f ? c.readAsArrayBuffer(a) : c.readAsDataURL(a);
513
+ }
514
+ }
515
+ }, {
516
+ key: "load",
517
+ value: function(i) {
518
+ var a = this, r = this.file, o = this.image;
519
+ o.onload = function() {
520
+ a.draw(he(he({}, i), {}, {
521
+ naturalWidth: o.naturalWidth,
522
+ naturalHeight: o.naturalHeight
523
+ }));
524
+ }, o.onabort = function() {
525
+ a.fail(new Error("Aborted to load the image."));
526
+ }, o.onerror = function() {
527
+ a.fail(new Error("Failed to load the image."));
528
+ }, q.navigator && /(?:iPad|iPhone|iPod).*?AppleWebKit/i.test(q.navigator.userAgent) && (o.crossOrigin = "anonymous"), o.alt = r.name, o.src = i.url;
529
+ }
530
+ }, {
531
+ key: "draw",
532
+ value: function(i) {
533
+ var a = this, r = i.naturalWidth, o = i.naturalHeight, g = i.rotate, s = g === void 0 ? 0 : g, f = i.scaleX, c = f === void 0 ? 1 : f, v = i.scaleY, d = v === void 0 ? 1 : v, C = this.file, h = this.image, m = this.options, E = document.createElement("canvas"), k = E.getContext("2d"), S = Math.abs(s) % 180 === 90, K = (m.resize === "contain" || m.resize === "cover") && ye(m.width) && ye(m.height), T = Math.max(m.maxWidth, 0) || 1 / 0, M = Math.max(m.maxHeight, 0) || 1 / 0, L = Math.max(m.minWidth, 0) || 0, H = Math.max(m.minHeight, 0) || 0, z = r / o, b = m.width, B = m.height;
534
+ if (S) {
535
+ var Z = [M, T];
536
+ T = Z[0], M = Z[1];
537
+ var $ = [H, L];
538
+ L = $[0], H = $[1];
539
+ var u = [B, b];
540
+ b = u[0], B = u[1];
541
+ }
542
+ K && (z = b / B);
543
+ var w = se({
544
+ aspectRatio: z,
545
+ width: T,
546
+ height: M
547
+ }, "contain");
548
+ T = w.width, M = w.height;
549
+ var I = se({
550
+ aspectRatio: z,
551
+ width: L,
552
+ height: H
553
+ }, "cover");
554
+ if (L = I.width, H = I.height, K) {
555
+ var A = se({
556
+ aspectRatio: z,
557
+ width: b,
558
+ height: B
559
+ }, m.resize);
560
+ b = A.width, B = A.height;
561
+ } else {
562
+ var _ = se({
563
+ aspectRatio: z,
564
+ width: b,
565
+ height: B
566
+ }), W = _.width;
567
+ b = W === void 0 ? r : W;
568
+ var l = _.height;
569
+ B = l === void 0 ? o : l;
570
+ }
571
+ b = Math.floor(Ze(Math.min(Math.max(b, L), T))), B = Math.floor(Ze(Math.min(Math.max(B, H), M)));
572
+ var D = -b / 2, F = -B / 2, ee = b, N = B, R = [];
573
+ if (K) {
574
+ var Q = 0, P = 0, G = r, Y = o, le = se({
575
+ aspectRatio: z,
576
+ width: r,
577
+ height: o
578
+ }, {
579
+ contain: "cover",
580
+ cover: "contain"
581
+ }[m.resize]);
582
+ G = le.width, Y = le.height, Q = (r - G) / 2, P = (o - Y) / 2, R.push(Q, P, G, Y);
583
+ }
584
+ if (R.push(D, F, ee, N), S) {
585
+ var ue = [B, b];
586
+ b = ue[0], B = ue[1];
587
+ }
588
+ E.width = b, E.height = B, ke(m.mimeType) || (m.mimeType = C.type);
589
+ var V = "transparent";
590
+ C.size > m.convertSize && m.convertTypes.indexOf(m.mimeType) >= 0 && (m.mimeType = "image/jpeg");
591
+ var ce = m.mimeType === "image/jpeg";
592
+ if (ce && (V = "#fff"), k.fillStyle = V, k.fillRect(0, 0, b, B), m.beforeDraw && m.beforeDraw.call(this, k, E), !this.aborted && (k.save(), k.translate(b / 2, B / 2), k.rotate(s * Math.PI / 180), k.scale(c, d), k.drawImage.apply(k, [h].concat(R)), k.restore(), m.drew && m.drew.call(this, k, E), !this.aborted)) {
593
+ var me = function(re) {
594
+ if (!a.aborted) {
595
+ var Ue = function(oe) {
596
+ return a.done({
597
+ naturalWidth: r,
598
+ naturalHeight: o,
599
+ result: oe
600
+ });
601
+ };
602
+ if (re && ce && m.retainExif && a.exif && a.exif.length > 0) {
603
+ var Oe = function(oe) {
604
+ return Ue(Ge(qe(Vt(oe, a.exif), m.mimeType)));
605
+ };
606
+ if (re.arrayBuffer)
607
+ re.arrayBuffer().then(Oe).catch(function() {
608
+ a.fail(new Error("Failed to read the compressed image with Blob.arrayBuffer()."));
609
+ });
610
+ else {
611
+ var ae = new Be();
612
+ a.reader = ae, ae.onload = function(Ce) {
613
+ var oe = Ce.target;
614
+ Oe(oe.result);
615
+ }, ae.onabort = function() {
616
+ a.fail(new Error("Aborted to read the compressed image with FileReader."));
617
+ }, ae.onerror = function() {
618
+ a.fail(new Error("Failed to read the compressed image with FileReader."));
619
+ }, ae.onloadend = function() {
620
+ a.reader = null;
621
+ }, ae.readAsArrayBuffer(re);
622
+ }
623
+ } else
624
+ Ue(re);
625
+ }
626
+ };
627
+ E.toBlob ? E.toBlob(me, m.mimeType, m.quality) : me(Ge(E.toDataURL(m.mimeType, m.quality)));
628
+ }
629
+ }
630
+ }, {
631
+ key: "done",
632
+ value: function(i) {
633
+ var a = i.naturalWidth, r = i.naturalHeight, o = i.result, g = this.file, s = this.image, f = this.options;
634
+ if (te && s.src.indexOf("blob:") === 0 && te.revokeObjectURL(s.src), o)
635
+ if (f.strict && !f.retainExif && o.size > g.size && f.mimeType === g.type && !(f.width > a || f.height > r || f.minWidth > a || f.minHeight > r || f.maxWidth < a || f.maxHeight < r))
636
+ o = g;
637
+ else {
638
+ var c = /* @__PURE__ */ new Date();
639
+ o.lastModified = c.getTime(), o.lastModifiedDate = c, o.name = g.name, o.name && o.type !== g.type && (o.name = o.name.replace(jt, Qt(o.type)));
640
+ }
641
+ else
642
+ o = g;
643
+ this.result = o, f.success && f.success.call(this, o);
644
+ }
645
+ }, {
646
+ key: "fail",
647
+ value: function(i) {
648
+ var a = this.options;
649
+ if (a.error)
650
+ a.error.call(this, i);
651
+ else
652
+ throw i;
653
+ }
654
+ }, {
655
+ key: "abort",
656
+ value: function() {
657
+ this.aborted || (this.aborted = !0, this.reader ? this.reader.abort() : this.image.complete ? this.fail(new Error("The compression process has been aborted.")) : (this.image.onload = null, this.image.onabort()));
658
+ }
659
+ /**
660
+ * Get the no conflict compressor class.
661
+ * @returns {Compressor} The compressor class.
662
+ */
663
+ }], [{
664
+ key: "noConflict",
665
+ value: function() {
666
+ return window.Compressor = zt, t;
667
+ }
668
+ /**
669
+ * Change the default options.
670
+ * @param {Object} options - The new default options.
671
+ */
672
+ }, {
673
+ key: "setDefaults",
674
+ value: function(i) {
675
+ Ae(Xe, i);
676
+ }
677
+ }]), t;
678
+ }();
679
+ const Kt = (t, e) => new Promise((i, a) => {
680
+ if (t.size <= e)
681
+ return t;
682
+ const r = e / t.size, o = Math.max(0.5, Math.min(0.9, 0.8 * r)), g = Math.max(800, Math.min(1920, 1920 * Math.sqrt(r)));
683
+ $e(t, o, g, g, (s) => {
684
+ s.size <= e ? i(s) : $e(
685
+ s,
686
+ Math.max(0.4, o - 0.2),
687
+ // 降低质量
688
+ Math.max(640, g * 0.8),
689
+ // 缩小尺寸
690
+ Math.max(640, g * 0.8),
691
+ i,
692
+ a,
693
+ t
694
+ // 传递原始文件用于错误处理
695
+ );
696
+ }, a, t);
697
+ }), $e = (t, e, i, a, r, o, g) => {
698
+ new xt(t, {
699
+ quality: e,
700
+ maxWidth: i,
701
+ maxHeight: a,
702
+ convertSize: 1 / 0,
703
+ success(s) {
704
+ try {
705
+ const f = new File([s], t.name, {
706
+ type: s.type || t.type,
707
+ lastModified: Date.now()
708
+ });
709
+ r(f);
710
+ } catch (f) {
711
+ o({
712
+ message: "文件转换失败",
713
+ error: f,
714
+ original: g || t
715
+ });
716
+ }
717
+ },
718
+ error(s) {
719
+ o({
720
+ message: "图片压缩失败",
721
+ error: s,
722
+ original: g || t
723
+ });
724
+ }
725
+ });
726
+ }, Ht = (t, e) => {
727
+ const i = De(), a = be(t, "modelValue"), r = be(t, "status"), { upload: o } = At(t), { size2B: g } = yt(), { handlerImageSrc: s } = Ct(t), f = be(t, "isOverMaxLimitCompressImg"), c = Ee(""), v = Ee([]), d = [".mp4", ".avi", ".mkv", ".mov", ".wmv", ".flv", ".mpeg", ".webm"], C = [".mp3", ".wav", ".aac", ".flac", ".ogg", ".alff", ".wma", ".m4a"], h = x(() => t.baseUrl ? t.baseUrl : process.env.NODE_ENV === "production" ? "" : i.baseURL || ""), m = (l) => {
728
+ if (l) {
729
+ const D = l.substring(l.lastIndexOf(".")).toLowerCase();
730
+ if (d.includes(D)) return "isVideo";
731
+ if (C.includes(D)) return "isAudio";
101
732
  }
102
733
  return "isImg";
103
- }, C = R(() => {
104
- var c;
105
- let a = t.accept ? (c = t.accept) == null ? void 0 : c.split(",") : [];
106
- return a.includes("image/jpg") && !a.includes("image/jpeg") && a.push("image/jpeg"), a.includes(".jpg") && !a.includes(".jpeg") && a.push(".jpeg"), t.acceptVideo && (a = [...a, ...w]), t.acceptAudio && (a = [...a, ...l]), a.join(",");
107
- }), T = R(() => u.value === "uploading"), L = ie(0), K = (a) => T.value ? L.value === a : !1, O = R(() => o.value ? [d(h.value, o.value)] : []), F = R(() => o.value ? o.value.map((a) => [d(h.value, a)]) : []), j = R(() => t.status !== "info" && (t.needDeleteBtn || t.needChangeBtn) || t.needDownloadBtn), H = R(() => t.status !== "info" && t.needDeleteBtn || t.needDownloadBtn), G = R(() => {
108
- const a = [], c = t.previewBtnConfig;
109
- if (typeof c == "boolean")
110
- return c ? ["zoom_in", "zoom_out", "turn_left", "turn_right", "full_screen"] : [];
111
- for (const S in c)
112
- c[S] && a.push(S);
113
- return a;
114
- }), J = () => {
734
+ }, E = x(() => {
735
+ var D;
736
+ let l = t.accept ? (D = t.accept) == null ? void 0 : D.split(",") : [];
737
+ return l.includes("image/jpg") && !l.includes("image/jpeg") && l.push("image/jpeg"), l.includes(".jpg") && !l.includes(".jpeg") && l.push(".jpeg"), t.acceptVideo && (l = [...l, ...d]), t.acceptAudio && (l = [...l, ...C]), l.join(",");
738
+ }), k = x(() => r.value === "uploading"), S = Ee(0), K = (l) => k.value ? S.value === l : !1, T = x(() => a.value ? [s(h.value, a.value)] : []), M = x(() => a.value ? a.value.map((l) => [s(h.value, l)]) : []), L = x(() => t.status !== "info" && (t.needDeleteBtn || t.needChangeBtn) || t.needDownloadBtn), H = x(() => t.status !== "info" && t.needDeleteBtn || t.needDownloadBtn), z = x(() => {
739
+ const l = [], D = t.previewBtnConfig;
740
+ if (typeof D == "boolean")
741
+ return D ? ["zoom_in", "zoom_out", "turn_left", "turn_right", "full_screen"] : [];
742
+ for (const F in D)
743
+ D[F] && l.push(F);
744
+ return l;
745
+ }), b = () => {
115
746
  setTimeout(() => {
116
- const a = document.querySelector(".el-image-viewer__wrapper");
117
- a == null || a.classList.add("das-image-viewer-preview-btn-groups"), a == null || a.classList.add(...G.value);
747
+ const l = document.querySelector(".el-image-viewer__wrapper");
748
+ l == null || l.classList.add("das-image-viewer-preview-btn-groups"), l == null || l.classList.add(...z.value);
118
749
  }, 0);
119
- }, N = (a, c) => {
120
- t.limitNum === 1 ? (o.value = "", i("update:modelValue", ""), i("deleteImage", a)) : (o.value.splice(c, 1), i("update:modelValue", o.value), i("deleteImage", a));
121
- }, X = (a, c = 0) => {
122
- var Y;
123
- i("downloadImage", a);
124
- let S = "";
125
- t.limitNum === 1 ? S = t.imageName || D.value : S = ((Y = t.imageName) == null ? void 0 : Y[c]) || E.value[c], U(a) === "isImg" ? Oe(d(h.value, a), S) : Fe(d(h.value, a), S);
126
- }, W = async (a, c) => {
127
- var Y;
750
+ }, B = (l) => {
751
+ e("clickChangeIcon", l);
752
+ }, Z = (l, D) => {
753
+ t.limitNum === 1 ? (a.value = "", e("update:modelValue", ""), e("deleteImage", l)) : (a.value.splice(D, 1), e("update:modelValue", a.value), e("deleteImage", l));
754
+ }, $ = (l, D = 0) => {
755
+ var ee;
756
+ e("downloadImage", l);
757
+ let F = "";
758
+ t.limitNum === 1 ? F = t.imageName || c.value : F = ((ee = t.imageName) == null ? void 0 : ee[D]) || v.value[D], m(l) === "isImg" ? gt(s(h.value, l), F) : vt(s(h.value, l), F);
759
+ }, u = [
760
+ "image/jpeg",
761
+ "image/png",
762
+ "image/webp",
763
+ "image/gif",
764
+ "image/bmp",
765
+ "image/tiff",
766
+ "image/svg+xml"
767
+ ], w = async (l, D) => {
768
+ var ee;
128
769
  if (t.maxSize) {
129
- const { finalSize: b, sizeText: B } = v(t.maxSize);
130
- if (a.size > b) {
131
- const Z = Ie.value === "zh-CN" ? "、" : ", ", M = Ce(
770
+ const { finalSize: N, sizeText: R } = g(t.maxSize);
771
+ if (l.size > N && !f.value) {
772
+ const Q = Ke.value === "zh-CN" ? "、" : ", ", P = He(
132
773
  "das-ui-import-upload-key3",
133
- B,
134
- ((Y = C.value) == null ? void 0 : Y.toUpperCase().replaceAll(".", "").replaceAll(",", Z)) ?? ""
135
- ).value, ae = t.errorMessage || M;
136
- return he.warning(ae), !1;
774
+ R,
775
+ ((ee = E.value) == null ? void 0 : ee.toUpperCase().replaceAll(".", "").replaceAll(",", Q)) ?? ""
776
+ ).value, G = t.errorMessage || P;
777
+ return xe.warning(G), !1;
137
778
  }
138
779
  }
139
- const S = async (b) => {
140
- L.value = b, i("update:status", "uploading"), i("image-upload", a);
141
- const B = await A(a);
142
- return B === "error" ? (i("update:status", "error"), !1) : (i("upload-success", a, B), t.limitNum === 1 ? o.value = B : o.value[b] = B, i("update:modelValue", o.value), i("update:status", "normal"), !1);
780
+ const F = async (N) => {
781
+ let R = l;
782
+ if (t.maxSize) {
783
+ const { finalSize: P, sizeText: G } = g(t.maxSize);
784
+ if (l.size > P && f.value && u.includes(l.type))
785
+ try {
786
+ R = await Kt(l, P);
787
+ } catch (Y) {
788
+ R = (Y == null ? void 0 : Y.original) || l;
789
+ }
790
+ }
791
+ S.value = N, e("update:status", "uploading"), e("image-upload", R);
792
+ const Q = await o(R);
793
+ return Q === "error" ? (e("update:status", "error"), !1) : (e("upload-success", R, Q), t.limitNum === 1 ? a.value = Q : a.value[N] = Q, e("update:modelValue", a.value), e("update:status", "normal"), !1);
143
794
  };
144
795
  if (t.customCheck) {
145
- const b = t.customCheck(a);
146
- if (b instanceof Promise)
147
- return new Promise(async (B, Z) => {
148
- let M;
796
+ const N = t.customCheck(l);
797
+ if (N instanceof Promise)
798
+ return new Promise(async (R, Q) => {
799
+ let P;
149
800
  try {
150
- M = await b.then();
801
+ P = await N.then();
151
802
  } catch {
152
- M = !1;
803
+ P = !1;
153
804
  }
154
- M ? S(c) : Z(!1);
805
+ P ? F(D) : Q(!1);
155
806
  });
156
- if (!b) return !1;
157
- } else if (C.value) {
158
- const b = C.value.split(",").filter((P) => P.trim().startsWith(".")).map((P) => P.trim()), B = C.value.split(",").filter((P) => !P.trim().startsWith(".")).map((P) => P.trim()), Z = Le(a.name), M = b.includes(Z);
159
- let ae = B.includes("image/*") && a.type.split("/")[0].trim() === "image", Qe = B.includes("video/*") && a.type.split("/")[0].trim() === "video", Se = B.includes("audio/*") && a.type.split("/")[0].trim() === "audio", Re = B.includes(a.type) || ae || Qe || Se;
160
- if (!M && !Re) {
161
- const P = t.acceptAudio || t.acceptVideo ? "das-ui-import-upload-key2" : "das-ui-import-upload-key1", De = Ie.value === "zh-CN" ? "、" : ", ", Ue = t.errorMessage || Ce(P, C.value.toUpperCase().replaceAll(".", "").replaceAll(",", De)).value;
162
- return he.warning(Ue), !1;
807
+ if (!N) return !1;
808
+ } else if (E.value) {
809
+ const N = E.value.split(",").filter((V) => V.trim().startsWith(".")).map((V) => V.trim()), R = E.value.split(",").filter((V) => !V.trim().startsWith(".")).map((V) => V.trim()), Q = mt(l.name), P = N.includes(Q);
810
+ let G = R.includes("image/*") && l.type.split("/")[0].trim() === "image", Y = R.includes("video/*") && l.type.split("/")[0].trim() === "video", le = R.includes("audio/*") && l.type.split("/")[0].trim() === "audio", ue = R.includes(l.type) || G || Y || le;
811
+ if (!P && !ue) {
812
+ const V = t.acceptAudio || t.acceptVideo ? "das-ui-import-upload-key2" : "das-ui-import-upload-key1", ce = Ke.value === "zh-CN" ? "、" : ", ", me = t.errorMessage || He(V, E.value.toUpperCase().replaceAll(".", "").replaceAll(",", ce)).value;
813
+ return xe.warning(me), !1;
163
814
  }
164
815
  }
165
- return S(c);
166
- }, s = async (a) => {
167
- t.limitNum !== 1 && (L.value = o.length), i("update:status", "uploading"), i("image-upload", a);
168
- const c = await A(a);
169
- i("upload-success", a, c), t.limitNum === 1 ? p(c) : f(c);
170
- }, p = (a) => {
171
- if (a === "error") {
172
- i("update:status", "error");
816
+ return F(D);
817
+ }, I = async (l) => {
818
+ t.limitNum !== 1 && (S.value = a.length), e("update:status", "uploading"), e("image-upload", l);
819
+ const D = await o(l);
820
+ e("upload-success", l, D), t.limitNum === 1 ? A(D) : _(D);
821
+ }, A = (l) => {
822
+ if (l === "error") {
823
+ e("update:status", "error");
173
824
  return;
174
825
  }
175
- o.value = a, i("update:modelValue", o.value), i("update:status", "normal");
176
- }, f = (a) => {
177
- if (a === "error") {
178
- i("update:status", "error");
826
+ a.value = l, e("update:modelValue", a.value), e("update:status", "normal");
827
+ }, _ = (l) => {
828
+ if (l === "error") {
829
+ e("update:status", "error");
179
830
  return;
180
831
  }
181
- o.value.push(a), i("update:modelValue", o.value), i("update:status", "normal");
832
+ a.value.push(l), e("update:modelValue", a.value), e("update:status", "normal");
182
833
  };
183
- return Je(o, async () => {
184
- const a = t.limitNum ?? 1;
185
- a === 1 && o.value ? D.value = await Ge(o.value) : a > 1 && o.value.length > 0 && (E.value = await Xe(o.value));
834
+ return st(a, async () => {
835
+ const l = t.limitNum ?? 1;
836
+ l === 1 && a.value ? c.value = await Et(a.value) : l > 1 && a.value.length > 0 && (v.value = await bt(a.value));
186
837
  }, {
187
838
  deep: !0,
188
839
  immediate: !0
189
840
  }), {
190
- url: o,
191
- singlePreviewList: O,
192
- multiPreviewList: F,
193
- isAccept: C,
194
- loading: T,
195
- uploadStatus: u,
196
- previewBtns: G,
197
- operateShow: j,
841
+ url: a,
842
+ singlePreviewList: T,
843
+ multiPreviewList: M,
844
+ isAccept: E,
845
+ loading: k,
846
+ uploadStatus: r,
847
+ previewBtns: z,
848
+ operateShow: L,
198
849
  operateShow_Multi: H,
199
- singlePreviewName: D,
200
- multiPreviewName: E,
201
- getFileType: U,
202
- delImg: N,
203
- beforeupload: W,
204
- uploadImg: s,
205
- onDownload: X,
206
- handleImageClick: J,
850
+ singlePreviewName: c,
851
+ multiPreviewName: v,
852
+ getFileType: m,
853
+ changeImg: B,
854
+ delImg: Z,
855
+ beforeupload: w,
856
+ uploadImg: I,
857
+ onDownload: $,
858
+ handleImageClick: b,
207
859
  isLoadingMulti: K
208
860
  };
209
- }, xe = (t, i) => {
210
- var A;
211
- const { __IN_DAS_MICRO_APP: n, __DAS_MAIN_APP_HREF: o } = window;
212
- if (!n || !o) return;
213
- const { origin: u } = new URL(o);
214
- (A = window.top) == null || A.postMessage({ type: t, data: i }, u);
215
- }, ke = "proxy-image-viewer", te = {
216
- sendMessageToMainApp: xe,
861
+ }, Wt = (t, e) => {
862
+ var o;
863
+ const { __IN_DAS_MICRO_APP: i, __DAS_MAIN_APP_HREF: a } = window;
864
+ if (!i || !a) return;
865
+ const { origin: r } = new URL(a);
866
+ (o = window.top) == null || o.postMessage({ type: t, data: e }, r);
867
+ }, nt = "proxy-image-viewer", we = {
868
+ sendMessageToMainApp: Wt,
217
869
  // @ts-ignore
218
870
  isMicroApp: () => window.__IN_DAS_MICRO_APP && window.top !== window.self,
219
871
  addEventFromMicroApp: () => {
220
872
  window.addEventListener("message", (t) => {
221
- const { type: i, data: n } = t.data;
222
- if (i !== ke) return;
223
- const o = document.createElement("div");
224
- o.classList.add("das-image-viewer-preview-btn-groups");
225
- const { previewList: u, previewBtns: A } = n, v = Ne(Te, {
226
- urlList: u,
873
+ const { type: e, data: i } = t.data;
874
+ if (e !== nt) return;
875
+ const a = document.createElement("div");
876
+ a.classList.add("das-image-viewer-preview-btn-groups");
877
+ const { previewList: r, previewBtns: o } = i, g = lt(ct, {
878
+ urlList: r,
227
879
  onClose: () => {
228
- v.unmount(), document.body.removeChild(o);
880
+ g.unmount(), document.body.removeChild(a);
229
881
  }
230
882
  });
231
- document.body.appendChild(o), v.mount(o), setTimeout(() => {
232
- const d = document.querySelector(".el-image-viewer__wrapper");
233
- d == null || d.classList.add("das-image-viewer-preview-btn-groups"), d == null || d.classList.add(...A);
883
+ document.body.appendChild(a), g.mount(a), setTimeout(() => {
884
+ const s = document.querySelector(".el-image-viewer__wrapper");
885
+ s == null || s.classList.add("das-image-viewer-preview-btn-groups"), s == null || s.classList.add(...o);
234
886
  }, 0);
235
887
  });
236
888
  }
237
889
  };
238
- te.addEventFromMicroApp();
239
- const $e = (t) => {
240
- const { handleImageClickProxy: i, previewBtns: n } = t;
241
- return { needPreviewImage: R(() => !t.needPreview || te.isMicroApp() ? !1 : t.needPreview), handleImageClick: (A) => {
890
+ we.addEventFromMicroApp();
891
+ const Yt = (t) => {
892
+ const { handleImageClickProxy: e, previewBtns: i } = t;
893
+ return { needPreviewImage: x(() => !t.needPreview || we.isMicroApp() ? !1 : t.needPreview), handleImageClick: (o) => {
242
894
  if (!t.needPreview) return;
243
- if (!te.isMicroApp()) {
244
- i();
895
+ if (!we.isMicroApp()) {
896
+ e();
245
897
  return;
246
898
  }
247
- let v = [];
248
- Array.isArray(A) && v.push(...A), typeof A == "string" && v.push(A), te.sendMessageToMainApp(ke, {
249
- previewList: v,
250
- previewBtns: n.value
899
+ let g = [];
900
+ Array.isArray(o) && g.push(...o), typeof o == "string" && g.push(o), we.sendMessageToMainApp(nt, {
901
+ previewList: g,
902
+ previewBtns: i.value
251
903
  });
252
904
  } };
253
- }, _e = {
905
+ }, Gt = {
254
906
  key: 0,
255
907
  class: "das-ui-image-viewer-container"
256
- }, et = {
908
+ }, Xt = {
257
909
  class: "no-data-img",
258
- src: oe,
910
+ src: Ie,
259
911
  alt: ""
260
- }, tt = { class: "image-name" }, at = { class: "das-ui-image-viewer-groups" }, it = { class: "image-name" }, ot = { class: "das-ui-image-viewer-container" }, nt = {
912
+ }, qt = { class: "image-name" }, Zt = { class: "das-ui-image-viewer-groups" }, $t = { class: "image-name" }, _t = { class: "das-ui-image-viewer-container" }, ea = {
261
913
  key: 1,
262
914
  class: "das-ui-image-viewer-container"
263
- }, st = { class: "das-ui-image-viewer" }, rt = {
915
+ }, ta = { class: "das-ui-image-viewer" }, aa = {
264
916
  key: 2,
265
917
  class: "das-ui-image-viewer"
266
- }, lt = /* @__PURE__ */ Ve({
918
+ }, ia = /* @__PURE__ */ ut({
267
919
  __name: "Index",
268
920
  props: {
269
921
  style: { default: "" },
@@ -295,340 +947,371 @@ const $e = (t) => {
295
947
  videoWidth: {},
296
948
  videoHeight: {},
297
949
  randomName: { type: Boolean, default: !1 },
298
- useOriginUrl: { type: Boolean, default: !1 }
950
+ useOriginUrl: { type: Boolean, default: !1 },
951
+ openFileDialogOnClick: { type: Boolean, default: !0 },
952
+ isOverMaxLimitCompressImg: { type: Boolean, default: !1 }
299
953
  },
300
- emits: ["update:modelValue", "update:status", "downloadImage", "image-upload", "upload-success", "deleteImage"],
301
- setup(t, { emit: i }) {
302
- const n = t, o = i, u = R(() => {
303
- const p = [
304
- n.needDownloadBtn,
305
- n.limitNum === 1 && l.value !== "info" && n.needChangeBtn,
306
- l.value !== "info" && n.needDeleteBtn
307
- ].filter((m) => m).length;
308
- let f = "center";
309
- return p === 2 && (f = "space-around"), p === 3 && (f = "space-between"), {
310
- "justify-content": f
954
+ emits: ["update:modelValue", "update:status", "downloadImage", "image-upload", "upload-success", "clickChangeIcon", "deleteImage"],
955
+ setup(t, { emit: e }) {
956
+ const i = t, a = e, r = x(() => {
957
+ const w = [
958
+ i.needDownloadBtn,
959
+ i.limitNum === 1 && d.value !== "info" && i.needChangeBtn,
960
+ d.value !== "info" && i.needDeleteBtn
961
+ ].filter((A) => A).length;
962
+ let I = "center";
963
+ return w === 2 && (I = "space-around"), w === 3 && (I = "space-between"), {
964
+ "justify-content": I
311
965
  };
312
- }), A = R(() => n.mode === "view" ? !1 : d.value ? l.value === "error" : l.value !== "info"), v = (s) => {
313
- s.stopPropagation();
966
+ }), o = x(() => i.mode === "view" ? !1 : s.value ? d.value === "error" : d.value !== "info"), g = (u) => {
967
+ u.stopPropagation();
314
968
  }, {
315
- url: d,
316
- isAccept: D,
317
- singlePreviewList: E,
318
- multiPreviewList: w,
319
- uploadStatus: l,
320
- loading: h,
321
- previewBtns: U,
322
- operateShow: C,
323
- operateShow_Multi: T,
324
- singlePreviewName: L,
325
- multiPreviewName: K,
326
- delImg: O,
327
- beforeupload: F,
328
- uploadImg: j,
969
+ url: s,
970
+ isAccept: f,
971
+ singlePreviewList: c,
972
+ multiPreviewList: v,
973
+ uploadStatus: d,
974
+ loading: C,
975
+ previewBtns: h,
976
+ operateShow: m,
977
+ operateShow_Multi: E,
978
+ singlePreviewName: k,
979
+ multiPreviewName: S,
980
+ changeImg: K,
981
+ delImg: T,
982
+ beforeupload: M,
983
+ uploadImg: L,
329
984
  onDownload: H,
330
- handleImageClick: G,
331
- getFileType: J,
332
- isLoadingMulti: N
333
- } = We(n, o), { needPreviewImage: X, handleImageClick: W } = $e({
334
- needPreview: n.needPreview,
335
- handleImageClickProxy: G,
336
- previewBtns: U
985
+ handleImageClick: z,
986
+ getFileType: b,
987
+ isLoadingMulti: B
988
+ } = Ht(i, a), { needPreviewImage: Z, handleImageClick: $ } = Yt({
989
+ needPreview: i.needPreview,
990
+ handleImageClickProxy: z,
991
+ previewBtns: h
337
992
  });
338
- return (s, p) => (g(), I(
339
- x,
993
+ return (u, w) => (y(), U(
994
+ de,
340
995
  null,
341
996
  [
342
- r(" 单文件 "),
343
- s.limitNum === 1 ? (g(), I("div", _e, [
344
- V(
997
+ p(" 单文件 "),
998
+ u.limitNum === 1 ? (y(), U("div", Gt, [
999
+ X(
345
1000
  "div",
346
1001
  {
347
1002
  class: "das-ui-image-viewer",
348
- style: $(s.style)
1003
+ style: fe(u.style)
349
1004
  },
350
1005
  [
351
- r(" 状态不为 error 时显示 "),
352
- y(z(e(Ae), {
353
- class: _([{ "loading-border": e(h) }]),
1006
+ p(" 状态不为 error 时显示 "),
1007
+ J(ie(n(Je), {
1008
+ class: ge([{ "loading-border": n(C) }]),
354
1009
  type: "component",
355
- spinning: e(h)
1010
+ spinning: n(C)
356
1011
  }, {
357
- default: q(() => [
358
- r(" 图片 "),
359
- e(J)(e(E)[0]) === "isImg" ? y((g(), k(e(ce), {
1012
+ default: ne(() => [
1013
+ p(" 图片 "),
1014
+ n(b)(n(c)[0]) === "isImg" ? J((y(), O(n(Le), {
360
1015
  key: 0,
361
- class: _(["image-context", [e(U)]]),
1016
+ class: ge(["image-context", [n(h)]]),
362
1017
  "preview-teleported": !0,
363
- src: e(E)[0],
364
- "preview-src-list": e(X) ? e(E) : void 0,
1018
+ src: n(c)[0],
1019
+ "preview-src-list": n(Z) ? n(c) : void 0,
365
1020
  "initial-index": 0,
366
- fit: s.imageFit,
367
- onClick: p[0] || (p[0] = (f) => e(W)(e(E)))
1021
+ fit: u.imageFit,
1022
+ onClick: w[0] || (w[0] = (I) => n($)(n(c)))
368
1023
  }, null, 8, ["class", "src", "preview-src-list", "fit"])), [
369
- [Q, !e(h)]
370
- ]) : r("v-if", !0),
371
- r(" 视频 "),
372
- e(J)(e(E)[0]) === "isVideo" ? y((g(), k(e(ee), {
1024
+ [j, !n(C)]
1025
+ ]) : p("v-if", !0),
1026
+ p(" 视频 "),
1027
+ n(b)(n(c)[0]) === "isVideo" ? J((y(), O(n(ve), {
373
1028
  key: 1,
374
- mode: e(l) === "info" || s.mode === "view" ? "view" : "normal",
375
- src: e(E)[0],
376
- needPreview: s.needPreview,
1029
+ mode: n(d) === "info" || u.mode === "view" ? "view" : "normal",
1030
+ src: n(c)[0],
1031
+ needPreview: u.needPreview,
377
1032
  width: "100%",
378
1033
  height: "100%",
379
- "player-props": { videoWidth: s.videoWidth, videoHeight: s.videoHeight },
1034
+ "player-props": { videoWidth: u.videoWidth, videoHeight: u.videoHeight },
380
1035
  fullPath: ""
381
1036
  }, null, 8, ["mode", "src", "needPreview", "player-props"])), [
382
- [Q, !e(h)]
383
- ]) : r("v-if", !0),
384
- r(" 音频 "),
385
- e(J)(e(E)[0]) === "isAudio" ? y((g(), k(e(ee), {
1037
+ [j, !n(C)]
1038
+ ]) : p("v-if", !0),
1039
+ p(" 音频 "),
1040
+ n(b)(n(c)[0]) === "isAudio" ? J((y(), O(n(ve), {
386
1041
  key: 2,
387
- mode: e(l) === "info" || s.mode === "view" ? "view" : "normal",
388
- src: e(E)[0],
389
- needPreview: s.needPreview,
1042
+ mode: n(d) === "info" || u.mode === "view" ? "view" : "normal",
1043
+ src: n(c)[0],
1044
+ needPreview: u.needPreview,
390
1045
  width: "100%",
391
1046
  height: "100%",
392
1047
  type: "audio",
393
1048
  fullPath: ""
394
1049
  }, null, 8, ["mode", "src", "needPreview"])), [
395
- [Q, !e(h)]
396
- ]) : r("v-if", !0),
397
- !e(h) && e(C) ? (g(), I(
1050
+ [j, !n(C)]
1051
+ ]) : p("v-if", !0),
1052
+ !n(C) && n(m) ? (y(), U(
398
1053
  "div",
399
1054
  {
400
1055
  key: 3,
401
1056
  class: "operate-container",
402
- style: $(u.value),
403
- onClick: v
1057
+ style: fe(r.value),
1058
+ onClick: g
404
1059
  },
405
1060
  [
406
- s.needDownloadBtn ? (g(), k(e(fe), {
1061
+ u.needDownloadBtn ? (y(), O(n(je), {
407
1062
  key: 0,
408
1063
  class: "operate-btn",
409
1064
  size: "medium",
410
1065
  "icon-color": "#fff",
411
- onClick: p[1] || (p[1] = (f) => e(H)(e(d)))
412
- })) : r("v-if", !0),
413
- e(l) !== "info" && s.needChangeBtn ? (g(), k(e(me), {
1066
+ onClick: w[1] || (w[1] = (I) => n(H)(n(s)))
1067
+ })) : p("v-if", !0),
1068
+ n(d) !== "info" && u.needChangeBtn ? (y(), U("div", {
414
1069
  key: 1,
415
- "before-upload": (f) => e(F)(f, 0),
416
- accept: e(D)
417
- }, {
418
- itemRender: q(({ file: f, actions: m }) => p[5] || (p[5] = [])),
419
- default: q(() => [
420
- z(e(ve), {
421
- class: "operate-btn m-t-6",
422
- "icon-color": "#fff",
423
- size: "medium"
424
- })
425
- ]),
426
- _: 1
427
- /* STABLE */
428
- }, 8, ["before-upload", "accept"])) : r("v-if", !0),
429
- e(l) !== "info" && s.needDeleteBtn ? (g(), k(e(we), {
1070
+ class: "change-icon-box",
1071
+ onClick: w[2] || (w[2] = (I) => n(K)(n(s)))
1072
+ }, [
1073
+ u.openFileDialogOnClick ? (y(), O(n(Fe), {
1074
+ key: 0,
1075
+ "before-upload": (I) => n(M)(I, 0),
1076
+ accept: n(f),
1077
+ openFileDialogOnClick: u.openFileDialogOnClick
1078
+ }, {
1079
+ itemRender: ne(({ file: I, actions: A }) => w[7] || (w[7] = [])),
1080
+ default: ne(() => [
1081
+ ie(n(pe), {
1082
+ class: "operate-btn m-t-6",
1083
+ "icon-color": "#fff",
1084
+ size: "medium"
1085
+ })
1086
+ ]),
1087
+ _: 1
1088
+ /* STABLE */
1089
+ }, 8, ["before-upload", "accept", "openFileDialogOnClick"])) : p("v-if", !0),
1090
+ u.openFileDialogOnClick ? p("v-if", !0) : (y(), O(n(pe), {
1091
+ key: 1,
1092
+ class: "operate-btn m-t-6",
1093
+ "icon-color": "#fff",
1094
+ size: "medium"
1095
+ }))
1096
+ ])) : p("v-if", !0),
1097
+ n(d) !== "info" && u.needDeleteBtn ? (y(), O(n(ze), {
430
1098
  key: 2,
431
1099
  class: "operate-btn",
432
1100
  "icon-color": "#fff",
433
1101
  size: "medium",
434
- onClick: p[2] || (p[2] = (f) => e(O)(e(d)))
435
- })) : r("v-if", !0)
1102
+ onClick: w[3] || (w[3] = (I) => n(T)(n(s)))
1103
+ })) : p("v-if", !0)
436
1104
  ],
437
1105
  4
438
1106
  /* STYLE */
439
- )) : r("v-if", !0)
1107
+ )) : p("v-if", !0)
440
1108
  ]),
441
1109
  _: 1
442
1110
  /* STABLE */
443
1111
  }, 8, ["class", "spinning"]), [
444
- [Q, e(d) && s.status !== "error"]
1112
+ [j, n(s) && u.status !== "error"]
445
1113
  ]),
446
- r(" 上传模式,当 url 为空或者 uploading 和 error 时显示 "),
447
- y(z(e(pe), {
448
- status: e(l),
449
- "onUpdate:status": p[3] || (p[3] = (f) => re(l) ? l.value = f : null),
450
- "max-size": s.maxSize,
451
- accept: s.accept,
452
- acceptVideo: s.acceptVideo,
453
- message: s.message,
454
- acceptAudio: s.acceptAudio,
455
- autoContentType: s.autoContentType,
456
- onImageUpload: e(j),
457
- "custom-check": s.customCheck,
458
- "error-message": s.errorMessage
459
- }, null, 8, ["status", "max-size", "accept", "acceptVideo", "message", "acceptAudio", "autoContentType", "onImageUpload", "custom-check", "error-message"]), [
460
- [Q, A.value]
1114
+ p(" 上传模式,当 url 为空或者 uploading 和 error 时显示 "),
1115
+ J(ie(n(Ve), {
1116
+ status: n(d),
1117
+ "onUpdate:status": w[4] || (w[4] = (I) => Qe(d) ? d.value = I : null),
1118
+ "max-size": u.maxSize,
1119
+ accept: u.accept,
1120
+ acceptVideo: u.acceptVideo,
1121
+ message: u.message,
1122
+ acceptAudio: u.acceptAudio,
1123
+ autoContentType: u.autoContentType,
1124
+ "custom-check": u.customCheck,
1125
+ "error-message": u.errorMessage,
1126
+ openFileDialogOnClick: u.openFileDialogOnClick,
1127
+ onImageUpload: n(L),
1128
+ isOverMaxLimitCompressImg: u.isOverMaxLimitCompressImg
1129
+ }, null, 8, ["status", "max-size", "accept", "acceptVideo", "message", "acceptAudio", "autoContentType", "custom-check", "error-message", "openFileDialogOnClick", "onImageUpload", "isOverMaxLimitCompressImg"]), [
1130
+ [j, o.value]
461
1131
  ]),
462
- r(" 查看模式 "),
463
- y(V(
1132
+ p(" 查看模式 "),
1133
+ J(X(
464
1134
  "img",
465
- et,
1135
+ Xt,
466
1136
  null,
467
1137
  512
468
1138
  /* NEED_PATCH */
469
1139
  ), [
470
- [Q, !e(d) && (e(l) === "info" || s.mode === "view")]
1140
+ [j, !n(s) && (n(d) === "info" || u.mode === "view")]
471
1141
  ])
472
1142
  ],
473
1143
  4
474
1144
  /* STYLE */
475
1145
  ),
476
- y((g(), I("div", tt, [
477
- le(
478
- ue(n.imageName || e(L)),
1146
+ J((y(), U("div", qt, [
1147
+ Pe(
1148
+ Te(i.imageName || n(k)),
479
1149
  1
480
1150
  /* TEXT */
481
1151
  )
482
1152
  ])), [
483
- [Q, e(d) && s.showImageName && (e(l) === "normal" || e(l) === "info")],
484
- [e(ge)]
1153
+ [j, n(s) && u.showImageName && (n(d) === "normal" || n(d) === "info")],
1154
+ [n(Ne)]
485
1155
  ])
486
- ])) : (g(), I(
487
- x,
1156
+ ])) : (y(), U(
1157
+ de,
488
1158
  { key: 1 },
489
1159
  [
490
- r(" 多文件 "),
491
- V("div", at, [
492
- r(" 已上传的图片集合 "),
493
- (g(!0), I(
494
- x,
1160
+ p(" 多文件 "),
1161
+ X("div", Zt, [
1162
+ p(" 已上传的图片集合 "),
1163
+ (y(!0), U(
1164
+ de,
495
1165
  null,
496
- de(e(d), (f, m) => {
497
- var a;
498
- return g(), I("div", {
499
- key: m,
1166
+ Me(n(s), (I, A) => {
1167
+ var _;
1168
+ return y(), U("div", {
1169
+ key: A,
500
1170
  class: "das-ui-image-viewer-container"
501
1171
  }, [
502
- V(
1172
+ X(
503
1173
  "div",
504
1174
  {
505
1175
  class: "das-ui-image-viewer",
506
- style: $(s.style)
1176
+ style: fe(u.style)
507
1177
  },
508
1178
  [
509
- y(z(e(Ae), {
510
- class: _([{ "loading-border": e(N)(m) }]),
1179
+ J(ie(n(Je), {
1180
+ class: ge([{ "loading-border": n(B)(A) }]),
511
1181
  type: "component",
512
- spinning: e(N)(m)
1182
+ spinning: n(B)(A)
513
1183
  }, {
514
- default: q(() => [
515
- e(J)(e(w)[m][0]) === "isImg" ? y((g(), k(e(ce), {
1184
+ default: ne(() => [
1185
+ n(b)(n(v)[A][0]) === "isImg" ? J((y(), O(n(Le), {
516
1186
  key: 0,
517
- class: _(["image-context", [e(U)]]),
518
- src: e(w)[m][0],
1187
+ class: ge(["image-context", [n(h)]]),
1188
+ src: n(v)[A][0],
519
1189
  "preview-teleported": !0,
520
- "preview-src-list": e(X) ? e(w)[m] : void 0,
521
- "initial-index": m,
522
- onClick: (c) => e(W)(e(w)[m]),
1190
+ "preview-src-list": n(Z) ? n(v)[A] : void 0,
1191
+ "initial-index": A,
1192
+ onClick: (W) => n($)(n(v)[A]),
523
1193
  fit: "cover"
524
1194
  }, null, 8, ["class", "src", "preview-src-list", "initial-index", "onClick"])), [
525
- [Q, !e(N)(m)]
526
- ]) : r("v-if", !0),
527
- r(" 视频 "),
528
- e(J)(e(w)[m][0]) === "isVideo" ? y((g(), k(e(ee), {
1195
+ [j, !n(B)(A)]
1196
+ ]) : p("v-if", !0),
1197
+ p(" 视频 "),
1198
+ n(b)(n(v)[A][0]) === "isVideo" ? J((y(), O(n(ve), {
529
1199
  key: 1,
530
- mode: e(l) === "info" || s.mode === "view" ? "view" : "normal",
531
- src: e(w)[m][0],
532
- needPreview: s.needPreview,
1200
+ mode: n(d) === "info" || u.mode === "view" ? "view" : "normal",
1201
+ src: n(v)[A][0],
1202
+ needPreview: u.needPreview,
533
1203
  width: "100%",
534
1204
  height: "100%",
535
1205
  fullPath: "",
536
- "player-props": { videoWidth: s.videoWidth, videoHeight: s.videoHeight }
1206
+ "player-props": { videoWidth: u.videoWidth, videoHeight: u.videoHeight }
537
1207
  }, null, 8, ["mode", "src", "needPreview", "player-props"])), [
538
- [Q, !e(N)(m)]
539
- ]) : r("v-if", !0),
540
- r(" 音频 "),
541
- e(J)(e(w)[m][0]) === "isAudio" ? y((g(), k(e(ee), {
1208
+ [j, !n(B)(A)]
1209
+ ]) : p("v-if", !0),
1210
+ p(" 音频 "),
1211
+ n(b)(n(v)[A][0]) === "isAudio" ? J((y(), O(n(ve), {
542
1212
  key: 2,
543
- mode: e(l) === "info" || s.mode === "view" ? "view" : "normal",
544
- src: e(w)[m][0],
545
- needPreview: s.needPreview,
1213
+ mode: n(d) === "info" || u.mode === "view" ? "view" : "normal",
1214
+ src: n(v)[A][0],
1215
+ needPreview: u.needPreview,
546
1216
  width: "100%",
547
1217
  height: "100%",
548
1218
  type: "audio",
549
1219
  fullPath: ""
550
1220
  }, null, 8, ["mode", "src", "needPreview"])), [
551
- [Q, !e(N)(m)]
552
- ]) : r("v-if", !0),
553
- !e(h) && e(T) ? (g(), I(
1221
+ [j, !n(B)(A)]
1222
+ ]) : p("v-if", !0),
1223
+ !n(C) && n(E) ? (y(), U(
554
1224
  "div",
555
1225
  {
556
1226
  key: 3,
557
1227
  class: "operate-container",
558
- style: $(u.value)
1228
+ style: fe(r.value)
559
1229
  },
560
1230
  [
561
- s.needDownloadBtn ? (g(), k(e(fe), {
1231
+ u.needDownloadBtn ? (y(), O(n(je), {
562
1232
  key: 0,
563
1233
  class: "operate-btn",
564
1234
  size: "medium",
565
1235
  "icon-color": "#fff",
566
- onClick: (c) => e(H)(f, m)
567
- }, null, 8, ["onClick"])) : r("v-if", !0),
568
- e(l) !== "info" && s.needChangeBtn ? (g(), k(e(me), {
1236
+ onClick: (W) => n(H)(I, A)
1237
+ }, null, 8, ["onClick"])) : p("v-if", !0),
1238
+ n(d) !== "info" && u.needChangeBtn ? (y(), U("div", {
569
1239
  key: 1,
570
- "before-upload": (c) => e(F)(c, m),
571
- accept: e(D)
572
- }, {
573
- itemRender: q(({ file: c, actions: S }) => p[6] || (p[6] = [])),
574
- default: q(() => [
575
- z(e(ve), {
576
- class: "operate-btn m-t-6",
577
- "icon-color": "#fff",
578
- size: "medium"
579
- })
580
- ]),
581
- _: 2
582
- /* DYNAMIC */
583
- }, 1032, ["before-upload", "accept"])) : r("v-if", !0),
584
- e(l) !== "info" && s.needDeleteBtn ? (g(), k(e(we), {
1240
+ class: "change-icon-box",
1241
+ onClick: w[5] || (w[5] = (W) => n(K)(n(s)))
1242
+ }, [
1243
+ u.openFileDialogOnClick ? (y(), O(n(Fe), {
1244
+ key: 0,
1245
+ "before-upload": (W) => n(M)(W, A),
1246
+ accept: n(f),
1247
+ openFileDialogOnClick: u.openFileDialogOnClick
1248
+ }, {
1249
+ itemRender: ne(({ file: W, actions: l }) => w[8] || (w[8] = [])),
1250
+ default: ne(() => [
1251
+ ie(n(pe), {
1252
+ class: "operate-btn m-t-6",
1253
+ "icon-color": "#fff",
1254
+ size: "medium"
1255
+ })
1256
+ ]),
1257
+ _: 2
1258
+ /* DYNAMIC */
1259
+ }, 1032, ["before-upload", "accept", "openFileDialogOnClick"])) : p("v-if", !0),
1260
+ u.openFileDialogOnClick ? p("v-if", !0) : (y(), O(n(pe), {
1261
+ key: 1,
1262
+ class: "operate-btn m-t-6",
1263
+ "icon-color": "#fff",
1264
+ size: "medium"
1265
+ }))
1266
+ ])) : p("v-if", !0),
1267
+ n(d) !== "info" && u.needDeleteBtn ? (y(), O(n(ze), {
585
1268
  key: 2,
586
1269
  class: "operate-btn",
587
1270
  "icon-color": "#fff",
588
1271
  size: "medium",
589
- onClick: (c) => e(O)(f, m)
590
- }, null, 8, ["onClick"])) : r("v-if", !0)
1272
+ onClick: (W) => n(T)(I, A)
1273
+ }, null, 8, ["onClick"])) : p("v-if", !0)
591
1274
  ],
592
1275
  4
593
1276
  /* STYLE */
594
- )) : r("v-if", !0)
1277
+ )) : p("v-if", !0)
595
1278
  ]),
596
1279
  _: 2
597
1280
  /* DYNAMIC */
598
1281
  }, 1032, ["class", "spinning"]), [
599
- [Q, f]
1282
+ [j, I]
600
1283
  ])
601
1284
  ],
602
1285
  4
603
1286
  /* STYLE */
604
1287
  ),
605
- y((g(), I("div", it, [
606
- le(
607
- ue(((a = n.imageName) == null ? void 0 : a[m]) || e(K)[m]),
1288
+ J((y(), U("div", $t, [
1289
+ Pe(
1290
+ Te(((_ = i.imageName) == null ? void 0 : _[A]) || n(S)[A]),
608
1291
  1
609
1292
  /* TEXT */
610
1293
  )
611
1294
  ])), [
612
- [Q, f && s.showImageName && !e(N)(m)],
613
- [e(ge)]
1295
+ [j, I && u.showImageName && !n(B)(A)],
1296
+ [n(Ne)]
614
1297
  ])
615
1298
  ]);
616
1299
  }),
617
1300
  128
618
1301
  /* KEYED_FRAGMENT */
619
1302
  )),
620
- r(" 查看模式下,默认占位符 "),
621
- s.mode === "view" ? (g(!0), I(
622
- x,
1303
+ p(" 查看模式下,默认占位符 "),
1304
+ u.mode === "view" ? (y(!0), U(
1305
+ de,
623
1306
  { key: 0 },
624
- de(s.limitNum - e(d).length, (f) => (g(), I("div", ot, p[7] || (p[7] = [
625
- V(
1307
+ Me(u.limitNum - n(s).length, (I) => (y(), U("div", _t, w[9] || (w[9] = [
1308
+ X(
626
1309
  "div",
627
1310
  { class: "das-ui-image-viewer" },
628
1311
  [
629
- V("img", {
1312
+ X("img", {
630
1313
  class: "no-data-img",
631
- src: oe,
1314
+ src: Ie,
632
1315
  alt: ""
633
1316
  })
634
1317
  ],
@@ -638,38 +1321,40 @@ const $e = (t) => {
638
1321
  ])))),
639
1322
  256
640
1323
  /* UNKEYED_FRAGMENT */
641
- )) : r("v-if", !0),
642
- r(" 图片数量未到达最大数量限制时,显示上传组件 "),
643
- s.mode === "upload" && e(l) !== "info" && e(d).length < s.limitNum ? (g(), I("div", nt, [
644
- V("div", st, [
645
- z(e(pe), {
646
- status: e(l),
647
- "onUpdate:status": p[4] || (p[4] = (f) => re(l) ? l.value = f : null),
648
- "max-size": s.maxSize,
649
- accept: s.accept,
650
- acceptVideo: s.acceptVideo,
651
- acceptAudio: s.acceptAudio,
652
- message: s.message,
653
- onImageUpload: e(j),
654
- "custom-check": s.customCheck,
655
- "error-message": s.errorMessage
656
- }, null, 8, ["status", "max-size", "accept", "acceptVideo", "acceptAudio", "message", "onImageUpload", "custom-check", "error-message"])
1324
+ )) : p("v-if", !0),
1325
+ p(" 图片数量未到达最大数量限制时,显示上传组件 "),
1326
+ u.mode === "upload" && n(d) !== "info" && n(s).length < u.limitNum ? (y(), U("div", ea, [
1327
+ X("div", ta, [
1328
+ ie(n(Ve), {
1329
+ status: n(d),
1330
+ "onUpdate:status": w[6] || (w[6] = (I) => Qe(d) ? d.value = I : null),
1331
+ "max-size": u.maxSize,
1332
+ accept: u.accept,
1333
+ acceptVideo: u.acceptVideo,
1334
+ acceptAudio: u.acceptAudio,
1335
+ message: u.message,
1336
+ "custom-check": u.customCheck,
1337
+ "error-message": u.errorMessage,
1338
+ openFileDialogOnClick: u.openFileDialogOnClick,
1339
+ onImageUpload: n(L),
1340
+ isOverMaxLimitCompressImg: u.isOverMaxLimitCompressImg
1341
+ }, null, 8, ["status", "max-size", "accept", "acceptVideo", "acceptAudio", "message", "custom-check", "error-message", "openFileDialogOnClick", "onImageUpload", "isOverMaxLimitCompressImg"])
657
1342
  ])
658
- ])) : r("v-if", !0),
659
- r(" 当图片状态为查看态且无数据时,显示无数据图片 "),
660
- e(l) === "info" && e(d).length === 0 ? (g(), I("div", rt, p[8] || (p[8] = [
661
- V(
1343
+ ])) : p("v-if", !0),
1344
+ p(" 当图片状态为查看态且无数据时,显示无数据图片 "),
1345
+ n(d) === "info" && n(s).length === 0 ? (y(), U("div", aa, w[10] || (w[10] = [
1346
+ X(
662
1347
  "img",
663
1348
  {
664
1349
  class: "no-data-img",
665
- src: oe,
1350
+ src: Ie,
666
1351
  alt: ""
667
1352
  },
668
1353
  null,
669
1354
  -1
670
1355
  /* HOISTED */
671
1356
  )
672
- ]))) : r("v-if", !0)
1357
+ ]))) : p("v-if", !0)
673
1358
  ])
674
1359
  ],
675
1360
  2112
@@ -680,20 +1365,20 @@ const $e = (t) => {
680
1365
  /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
681
1366
  ));
682
1367
  }
683
- }), ut = (t, i) => {
684
- const n = t.__vccOpts || t;
685
- for (const [o, u] of i)
686
- n[o] = u;
687
- return n;
688
- }, dt = /* @__PURE__ */ ut(lt, [["__scopeId", "data-v-a6b067e7"]]), ct = {
1368
+ }), na = (t, e) => {
1369
+ const i = t.__vccOpts || t;
1370
+ for (const [a, r] of e)
1371
+ i[a] = r;
1372
+ return i;
1373
+ }, ra = /* @__PURE__ */ na(ia, [["__scopeId", "data-v-0cbe0660"]]), oa = {
689
1374
  "--das-ui-image-viewer-bg-color": { light: "rgba(0, 0, 0, 0.5)" },
690
1375
  "--das-ui-image-viewer-btn-hover": { light: "#87A9FF" },
691
1376
  "--das-ui-image-viewer-btn-active": { light: "#276FF5" }
692
- }, Lt = be(dt);
693
- Pe(ct);
1377
+ }, Pa = rt(ra);
1378
+ ot(oa);
694
1379
  export {
695
- Lt as DasImageViewer,
696
- Lt as default,
697
- qe as minioUpload,
698
- Ye as useCalculateSize
1380
+ Pa as DasImageViewer,
1381
+ Pa as default,
1382
+ At as minioUpload,
1383
+ yt as useCalculateSize
699
1384
  };