orion-design 0.1.29 → 0.1.31

Sign up to get free protection for your applications and to get access to all the features.
Files changed (219) hide show
  1. package/dist/Throne/index.js +30 -14
  2. package/dist/Throne/index.js.map +1 -1
  3. package/dist/_commonjsHelpers-DWwsNxpa.js +9 -0
  4. package/dist/_commonjsHelpers-DWwsNxpa.js.map +1 -0
  5. package/dist/components/Button/index.js +40 -33
  6. package/dist/components/Button/index.js.map +1 -1
  7. package/dist/components/Flex/index.js +122 -89
  8. package/dist/components/Flex/index.js.map +1 -1
  9. package/dist/components/Form/Form.js +2 -2
  10. package/dist/components/Form/Form.js.map +1 -1
  11. package/dist/components/Form/LovInput/LovInput.js +2 -2
  12. package/dist/components/Form/LovInput/LovInput.js.map +1 -1
  13. package/dist/components/Form/LovInput/hooks/useLov.js +5 -5
  14. package/dist/components/Form/LovInput/hooks/useLov.js.map +1 -1
  15. package/dist/components/Form/LovInput/index.js +4 -4
  16. package/dist/components/Form/hooks/FormItemValidateTrigger.js +2 -2
  17. package/dist/components/Form/hooks/FormItemValidateTrigger.js.map +1 -1
  18. package/dist/components/Form/hooks/index.js +128 -66
  19. package/dist/components/Form/hooks/index.js.map +1 -1
  20. package/dist/components/Form/index.js +836 -656
  21. package/dist/components/Form/index.js.map +1 -1
  22. package/dist/components/Form/utils/index.js +30 -18
  23. package/dist/components/Form/utils/index.js.map +1 -1
  24. package/dist/components/LovTable/LovPagetable.vue.d.ts +28 -0
  25. package/dist/components/LovTable/index.d.ts +14 -0
  26. package/dist/components/LovTable/index.js +179 -105
  27. package/dist/components/LovTable/index.js.map +1 -1
  28. package/dist/components/Modal/Modal.d.ts +2 -0
  29. package/dist/components/Modal/ModalLocator.vue.d.ts +20 -0
  30. package/dist/components/Modal/index.d.ts +4 -1
  31. package/dist/components/Modal/index.js +127 -0
  32. package/dist/components/Modal/index.js.map +1 -0
  33. package/dist/components/Modal/types.d.ts +18 -0
  34. package/dist/components/Modal/types.js +7 -0
  35. package/dist/components/Modal/types.js.map +1 -0
  36. package/dist/components/Modal/useModal.d.ts +1 -3
  37. package/dist/components/Modal/useModal.js +5 -4
  38. package/dist/components/Modal/useModal.js.map +1 -1
  39. package/dist/components/Pagetable/Pagetable.d.ts +13 -0
  40. package/dist/components/Pagetable/columns/PagetableColumnButtongroup.d.ts +13 -0
  41. package/dist/components/Pagetable/columns/PagetableColumnDate.d.ts +13 -0
  42. package/dist/components/Pagetable/columns/PagetableColumnDiy.d.ts +13 -0
  43. package/dist/components/Pagetable/columns/PagetableColumnLink.d.ts +13 -0
  44. package/dist/components/Pagetable/columns/PagetableColumnMultiselect.d.ts +13 -0
  45. package/dist/components/Pagetable/columns/PagetableColumnNumber.d.ts +13 -0
  46. package/dist/components/Pagetable/columns/PagetableColumnSingleselect.d.ts +13 -0
  47. package/dist/components/Pagetable/columns/PagetableColumnString.d.ts +13 -0
  48. package/dist/components/Pagetable/hooks/useColumns.js +88 -74
  49. package/dist/components/Pagetable/hooks/useColumns.js.map +1 -1
  50. package/dist/components/Pagetable/index.d.ts +9 -0
  51. package/dist/components/Pagetable/index.js +697 -491
  52. package/dist/components/Pagetable/index.js.map +1 -1
  53. package/dist/components/Pagetable/utils/index.js +92 -54
  54. package/dist/components/Pagetable/utils/index.js.map +1 -1
  55. package/dist/components/Querytable/hooks/useColumns.js +82 -74
  56. package/dist/components/Querytable/hooks/useColumns.js.map +1 -1
  57. package/dist/components/Querytable/index.js +579 -469
  58. package/dist/components/Querytable/index.js.map +1 -1
  59. package/dist/components/Querytable/utils/index.js +92 -54
  60. package/dist/components/Querytable/utils/index.js.map +1 -1
  61. package/dist/components/RichTextEditor/index.js +100 -74
  62. package/dist/components/RichTextEditor/index.js.map +1 -1
  63. package/dist/components/Tabs/constants.js +2 -2
  64. package/dist/components/Tabs/constants.js.map +1 -1
  65. package/dist/components/Tabs/index.js +603 -358
  66. package/dist/components/Tabs/index.js.map +1 -1
  67. package/dist/components/Tabs/tab-bar.js +6 -6
  68. package/dist/components/Tabs/tab-bar.js.map +1 -1
  69. package/dist/components/Tabs/tab-pane.js +3 -3
  70. package/dist/components/Tabs/tab-pane.js.map +1 -1
  71. package/dist/components/_constants/aria.js +2 -2
  72. package/dist/components/_constants/aria.js.map +1 -1
  73. package/dist/components/_constants/event.js +6 -4
  74. package/dist/components/_constants/event.js.map +1 -1
  75. package/dist/components/_constants/index.js +6 -6
  76. package/dist/components/_hooks/index.js +7 -7
  77. package/dist/components/_hooks/use-namespace/index.js +74 -39
  78. package/dist/components/_hooks/use-namespace/index.js.map +1 -1
  79. package/dist/components/_hooks/use-ordered-children/index.js +29 -19
  80. package/dist/components/_hooks/use-ordered-children/index.js.map +1 -1
  81. package/dist/components/_util/arrays.js +9 -5
  82. package/dist/components/_util/arrays.js.map +1 -1
  83. package/dist/components/_util/browser.js +6 -6
  84. package/dist/components/_util/browser.js.map +1 -1
  85. package/dist/components/_util/classNames.js +22 -17
  86. package/dist/components/_util/classNames.js.map +1 -1
  87. package/dist/components/_util/dom/aria.js +74 -39
  88. package/dist/components/_util/dom/aria.js.map +1 -1
  89. package/dist/components/_util/dom/element.js +9 -8
  90. package/dist/components/_util/dom/element.js.map +1 -1
  91. package/dist/components/_util/dom/event.js +14 -7
  92. package/dist/components/_util/dom/event.js.map +1 -1
  93. package/dist/components/_util/dom/index.js +36 -36
  94. package/dist/components/_util/dom/position.js +49 -25
  95. package/dist/components/_util/dom/position.js.map +1 -1
  96. package/dist/components/_util/dom/scroll.js +103 -61
  97. package/dist/components/_util/dom/scroll.js.map +1 -1
  98. package/dist/components/_util/dom/style.js +65 -50
  99. package/dist/components/_util/dom/style.js.map +1 -1
  100. package/dist/components/_util/easings.js +8 -4
  101. package/dist/components/_util/easings.js.map +1 -1
  102. package/dist/components/_util/error.js +12 -11
  103. package/dist/components/_util/error.js.map +1 -1
  104. package/dist/components/_util/functions.js +3 -3
  105. package/dist/components/_util/i18n.js +2 -2
  106. package/dist/components/_util/i18n.js.map +1 -1
  107. package/dist/components/_util/index.js +137 -137
  108. package/dist/components/_util/isValid.js +4 -2
  109. package/dist/components/_util/isValid.js.map +1 -1
  110. package/dist/components/_util/objects.js +18 -14
  111. package/dist/components/_util/objects.js.map +1 -1
  112. package/dist/components/_util/props-util/index.js +46 -20
  113. package/dist/components/_util/props-util/index.js.map +1 -1
  114. package/dist/components/_util/props-util/initDefaultProps.js +18 -10
  115. package/dist/components/_util/props-util/initDefaultProps.js.map +1 -1
  116. package/dist/components/_util/raf.js +5 -4
  117. package/dist/components/_util/raf.js.map +1 -1
  118. package/dist/components/_util/rand.js +4 -3
  119. package/dist/components/_util/rand.js.map +1 -1
  120. package/dist/components/_util/strings.js +9 -8
  121. package/dist/components/_util/strings.js.map +1 -1
  122. package/dist/components/_util/throttleByRaf.js +16 -10
  123. package/dist/components/_util/throttleByRaf.js.map +1 -1
  124. package/dist/components/_util/type.js +41 -38
  125. package/dist/components/_util/type.js.map +1 -1
  126. package/dist/components/_util/types.js +41 -22
  127. package/dist/components/_util/types.js.map +1 -1
  128. package/dist/components/_util/typescript.js +2 -2
  129. package/dist/components/_util/typescript.js.map +1 -1
  130. package/dist/components/_util/util.js +85 -43
  131. package/dist/components/_util/util.js.map +1 -1
  132. package/dist/components/_util/vue/global-node.js +27 -15
  133. package/dist/components/_util/vue/global-node.js.map +1 -1
  134. package/dist/components/_util/vue/icon.js +29 -25
  135. package/dist/components/_util/vue/icon.js.map +1 -1
  136. package/dist/components/_util/vue/index.js +41 -41
  137. package/dist/components/_util/vue/install.js +35 -18
  138. package/dist/components/_util/vue/install.js.map +1 -1
  139. package/dist/components/_util/vue/props/index.js +6 -6
  140. package/dist/components/_util/vue/props/runtime.js +46 -30
  141. package/dist/components/_util/vue/props/runtime.js.map +1 -1
  142. package/dist/components/_util/vue/refs.js +12 -6
  143. package/dist/components/_util/vue/refs.js.map +1 -1
  144. package/dist/components/_util/vue/size.js +5 -3
  145. package/dist/components/_util/vue/size.js.map +1 -1
  146. package/dist/components/_util/vue/validator.js +5 -4
  147. package/dist/components/_util/vue/validator.js.map +1 -1
  148. package/dist/components/_util/vue/vnode.js +100 -54
  149. package/dist/components/_util/vue/vnode.js.map +1 -1
  150. package/dist/components/_util/vue-types/index.js +231 -220
  151. package/dist/components/_util/vue-types/index.js.map +1 -1
  152. package/dist/components/components.js +20 -20
  153. package/dist/components/index.js +38 -35
  154. package/dist/components/index.js.map +1 -1
  155. package/dist/components-8oZ2kpUC.js +27 -0
  156. package/dist/components-8oZ2kpUC.js.map +1 -0
  157. package/dist/components-B3d9m_tn.js +27 -0
  158. package/dist/components-B3d9m_tn.js.map +1 -0
  159. package/dist/error/OrionError.js +8 -4
  160. package/dist/error/OrionError.js.map +1 -1
  161. package/dist/functions-BeMkokbY.js +63 -0
  162. package/dist/functions-BeMkokbY.js.map +1 -0
  163. package/dist/index-BOKLZnqH.js +54 -0
  164. package/dist/index-BOKLZnqH.js.map +1 -0
  165. package/dist/index-D1m0KTpK.js +69 -0
  166. package/dist/index-D1m0KTpK.js.map +1 -0
  167. package/dist/index-DR5ZP7mD.js +160 -0
  168. package/dist/index-DR5ZP7mD.js.map +1 -0
  169. package/dist/index-DkwIULcN.js +200 -0
  170. package/dist/index-DkwIULcN.js.map +1 -0
  171. package/dist/index.css +797 -1
  172. package/dist/index.js +36 -36
  173. package/dist/print/LodopFuncs.js +101 -43
  174. package/dist/print/LodopFuncs.js.map +1 -1
  175. package/dist/print/index.js +200 -108
  176. package/dist/print/index.js.map +1 -1
  177. package/dist/request/ErrorHandlerChain.js +17 -14
  178. package/dist/request/ErrorHandlerChain.js.map +1 -1
  179. package/dist/request/RequestFilterChain.js +16 -13
  180. package/dist/request/RequestFilterChain.js.map +1 -1
  181. package/dist/request/ResponseParserChain.js +17 -14
  182. package/dist/request/ResponseParserChain.js.map +1 -1
  183. package/dist/request/disivion/DateSerializer.js +47 -22
  184. package/dist/request/disivion/DateSerializer.js.map +1 -1
  185. package/dist/request/disivion/DivisionErrorHandler.js +40 -25
  186. package/dist/request/disivion/DivisionErrorHandler.js.map +1 -1
  187. package/dist/request/disivion/DivisionResponseParser.js +16 -10
  188. package/dist/request/disivion/DivisionResponseParser.js.map +1 -1
  189. package/dist/request/disivion/index.js +305 -201
  190. package/dist/request/disivion/index.js.map +1 -1
  191. package/dist/request/error/BizExceptionResponseError.js +11 -5
  192. package/dist/request/error/BizExceptionResponseError.js.map +1 -1
  193. package/dist/request/error/ExceptionResponseError.js +11 -5
  194. package/dist/request/error/ExceptionResponseError.js.map +1 -1
  195. package/dist/request/error/ResponseError.js +9 -4
  196. package/dist/request/error/ResponseError.js.map +1 -1
  197. package/dist/request/error/SessionExceptionResponseError.js +11 -5
  198. package/dist/request/error/SessionExceptionResponseError.js.map +1 -1
  199. package/dist/request/index.js +11 -11
  200. package/dist/utils/DateUtil.js +48 -33
  201. package/dist/utils/DateUtil.js.map +1 -1
  202. package/dist/utils/NumberUtil.js +6 -6
  203. package/dist/utils/NumberUtil.js.map +1 -1
  204. package/dist/utils/cloneDeep.js +2 -2
  205. package/dist/utils/delay.js +3 -3
  206. package/dist/utils/delay.js.map +1 -1
  207. package/dist/utils/functions.js +3 -3
  208. package/dist/utils/index.js +12 -12
  209. package/dist/utils/md5.js +191 -93
  210. package/dist/utils/md5.js.map +1 -1
  211. package/dist/utils/uuid.js +35 -25
  212. package/dist/utils/uuid.js.map +1 -1
  213. package/dist/version/index.js +2 -2
  214. package/dist/version/version.d.ts +1 -1
  215. package/dist/version/version.js +2 -2
  216. package/dist/version/version.js.map +1 -1
  217. package/package.json +1 -1
  218. package/dist/components-J6-qau6Y.js +0 -73
  219. package/dist/components-J6-qau6Y.js.map +0 -1
@@ -1,250 +1,354 @@
1
- import Q from "axios";
2
- import { cloneDeep as $ } from "lodash-es";
1
+ import axios from "axios";
2
+ import { cloneDeep } from "lodash-es";
3
3
  import "dayjs";
4
4
  import "../../utils/md5.js";
5
5
  import "decimal.js";
6
- import G from "../ResponseParserChain.js";
7
- import S from "../ErrorHandlerChain.js";
8
- import K from "../RequestFilterChain.js";
9
- import W from "./DateSerializer.js";
10
- import X from "./DivisionResponseParser.js";
11
- import ee from "./DivisionErrorHandler.js";
12
- import { ElLoading as v } from "element-plus";
13
- import te from "../error/ResponseError.js";
14
- const O = "3.7.7", re = O, h = typeof Buffer == "function", B = typeof TextDecoder == "function" ? new TextDecoder() : void 0, E = typeof TextEncoder == "function" ? new TextEncoder() : void 0, oe = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=", m = Array.prototype.slice.call(oe), x = ((e) => {
15
- let t = {};
16
- return e.forEach((o, r) => t[o] = r), t;
17
- })(m), ne = /^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/, a = String.fromCharCode.bind(String), R = typeof Uint8Array.from == "function" ? Uint8Array.from.bind(Uint8Array) : (e) => new Uint8Array(Array.prototype.slice.call(e, 0)), T = (e) => e.replace(/=/g, "").replace(/[+\/]/g, (t) => t == "+" ? "-" : "_"), P = (e) => e.replace(/[^A-Za-z0-9\+\/]/g, ""), k = (e) => {
18
- let t, o, r, n, s = "";
19
- const i = e.length % 3;
20
- for (let l = 0; l < e.length; ) {
21
- if ((o = e.charCodeAt(l++)) > 255 || (r = e.charCodeAt(l++)) > 255 || (n = e.charCodeAt(l++)) > 255)
6
+ import ResponseParserChain from "../ResponseParserChain.js";
7
+ import ErrorHandlerChain from "../ErrorHandlerChain.js";
8
+ import RequestFilterChain from "../RequestFilterChain.js";
9
+ import DateSerializer from "./DateSerializer.js";
10
+ import DivisionResponseParser from "./DivisionResponseParser.js";
11
+ import DivisionErrorHandler from "./DivisionErrorHandler.js";
12
+ import { ElLoading } from "element-plus";
13
+ import ResponseError from "../error/ResponseError.js";
14
+ const version = "3.7.7";
15
+ const VERSION = version;
16
+ const _hasBuffer = typeof Buffer === "function";
17
+ const _TD = typeof TextDecoder === "function" ? new TextDecoder() : void 0;
18
+ const _TE = typeof TextEncoder === "function" ? new TextEncoder() : void 0;
19
+ const b64ch = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
20
+ const b64chs = Array.prototype.slice.call(b64ch);
21
+ const b64tab = ((a) => {
22
+ let tab = {};
23
+ a.forEach((c, i) => tab[c] = i);
24
+ return tab;
25
+ })(b64chs);
26
+ const b64re = /^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/;
27
+ const _fromCC = String.fromCharCode.bind(String);
28
+ const _U8Afrom = typeof Uint8Array.from === "function" ? Uint8Array.from.bind(Uint8Array) : (it) => new Uint8Array(Array.prototype.slice.call(it, 0));
29
+ const _mkUriSafe = (src) => src.replace(/=/g, "").replace(/[+\/]/g, (m0) => m0 == "+" ? "-" : "_");
30
+ const _tidyB64 = (s) => s.replace(/[^A-Za-z0-9\+\/]/g, "");
31
+ const btoaPolyfill = (bin) => {
32
+ let u32, c0, c1, c2, asc = "";
33
+ const pad = bin.length % 3;
34
+ for (let i = 0; i < bin.length; ) {
35
+ if ((c0 = bin.charCodeAt(i++)) > 255 || (c1 = bin.charCodeAt(i++)) > 255 || (c2 = bin.charCodeAt(i++)) > 255)
22
36
  throw new TypeError("invalid character found");
23
- t = o << 16 | r << 8 | n, s += m[t >> 18 & 63] + m[t >> 12 & 63] + m[t >> 6 & 63] + m[t & 63];
37
+ u32 = c0 << 16 | c1 << 8 | c2;
38
+ asc += b64chs[u32 >> 18 & 63] + b64chs[u32 >> 12 & 63] + b64chs[u32 >> 6 & 63] + b64chs[u32 & 63];
24
39
  }
25
- return i ? s.slice(0, i - 3) + "===".substring(i) : s;
26
- }, w = typeof btoa == "function" ? (e) => btoa(e) : h ? (e) => Buffer.from(e, "binary").toString("base64") : k, y = h ? (e) => Buffer.from(e).toString("base64") : (e) => {
27
- let o = [];
28
- for (let r = 0, n = e.length; r < n; r += 4096)
29
- o.push(a.apply(null, e.subarray(r, r + 4096)));
30
- return w(o.join(""));
31
- }, b = (e, t = !1) => t ? T(y(e)) : y(e), se = (e) => {
32
- if (e.length < 2) {
33
- var t = e.charCodeAt(0);
34
- return t < 128 ? e : t < 2048 ? a(192 | t >>> 6) + a(128 | t & 63) : a(224 | t >>> 12 & 15) + a(128 | t >>> 6 & 63) + a(128 | t & 63);
40
+ return pad ? asc.slice(0, pad - 3) + "===".substring(pad) : asc;
41
+ };
42
+ const _btoa = typeof btoa === "function" ? (bin) => btoa(bin) : _hasBuffer ? (bin) => Buffer.from(bin, "binary").toString("base64") : btoaPolyfill;
43
+ const _fromUint8Array = _hasBuffer ? (u8a) => Buffer.from(u8a).toString("base64") : (u8a) => {
44
+ const maxargs = 4096;
45
+ let strs = [];
46
+ for (let i = 0, l = u8a.length; i < l; i += maxargs) {
47
+ strs.push(_fromCC.apply(null, u8a.subarray(i, i + maxargs)));
48
+ }
49
+ return _btoa(strs.join(""));
50
+ };
51
+ const fromUint8Array = (u8a, urlsafe = false) => urlsafe ? _mkUriSafe(_fromUint8Array(u8a)) : _fromUint8Array(u8a);
52
+ const cb_utob = (c) => {
53
+ if (c.length < 2) {
54
+ var cc = c.charCodeAt(0);
55
+ return cc < 128 ? c : cc < 2048 ? _fromCC(192 | cc >>> 6) + _fromCC(128 | cc & 63) : _fromCC(224 | cc >>> 12 & 15) + _fromCC(128 | cc >>> 6 & 63) + _fromCC(128 | cc & 63);
35
56
  } else {
36
- var t = 65536 + (e.charCodeAt(0) - 55296) * 1024 + (e.charCodeAt(1) - 56320);
37
- return a(240 | t >>> 18 & 7) + a(128 | t >>> 12 & 63) + a(128 | t >>> 6 & 63) + a(128 | t & 63);
57
+ var cc = 65536 + (c.charCodeAt(0) - 55296) * 1024 + (c.charCodeAt(1) - 56320);
58
+ return _fromCC(240 | cc >>> 18 & 7) + _fromCC(128 | cc >>> 12 & 63) + _fromCC(128 | cc >>> 6 & 63) + _fromCC(128 | cc & 63);
38
59
  }
39
- }, ae = /[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g, L = (e) => e.replace(ae, se), _ = h ? (e) => Buffer.from(e, "utf8").toString("base64") : E ? (e) => y(E.encode(e)) : (e) => w(L(e)), d = (e, t = !1) => t ? T(_(e)) : _(e), D = (e) => d(e, !0), ie = /[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g, le = (e) => {
40
- switch (e.length) {
60
+ };
61
+ const re_utob = /[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g;
62
+ const utob = (u) => u.replace(re_utob, cb_utob);
63
+ const _encode = _hasBuffer ? (s) => Buffer.from(s, "utf8").toString("base64") : _TE ? (s) => _fromUint8Array(_TE.encode(s)) : (s) => _btoa(utob(s));
64
+ const encode = (src, urlsafe = false) => urlsafe ? _mkUriSafe(_encode(src)) : _encode(src);
65
+ const encodeURI = (src) => encode(src, true);
66
+ const re_btou = /[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g;
67
+ const cb_btou = (cccc) => {
68
+ switch (cccc.length) {
41
69
  case 4:
42
- var t = (7 & e.charCodeAt(0)) << 18 | (63 & e.charCodeAt(1)) << 12 | (63 & e.charCodeAt(2)) << 6 | 63 & e.charCodeAt(3), o = t - 65536;
43
- return a((o >>> 10) + 55296) + a((o & 1023) + 56320);
70
+ var cp = (7 & cccc.charCodeAt(0)) << 18 | (63 & cccc.charCodeAt(1)) << 12 | (63 & cccc.charCodeAt(2)) << 6 | 63 & cccc.charCodeAt(3), offset = cp - 65536;
71
+ return _fromCC((offset >>> 10) + 55296) + _fromCC((offset & 1023) + 56320);
44
72
  case 3:
45
- return a((15 & e.charCodeAt(0)) << 12 | (63 & e.charCodeAt(1)) << 6 | 63 & e.charCodeAt(2));
73
+ return _fromCC((15 & cccc.charCodeAt(0)) << 12 | (63 & cccc.charCodeAt(1)) << 6 | 63 & cccc.charCodeAt(2));
46
74
  default:
47
- return a((31 & e.charCodeAt(0)) << 6 | 63 & e.charCodeAt(1));
75
+ return _fromCC((31 & cccc.charCodeAt(0)) << 6 | 63 & cccc.charCodeAt(1));
48
76
  }
49
- }, j = (e) => e.replace(ie, le), q = (e) => {
50
- if (e = e.replace(/\s+/g, ""), !ne.test(e))
77
+ };
78
+ const btou = (b) => b.replace(re_btou, cb_btou);
79
+ const atobPolyfill = (asc) => {
80
+ asc = asc.replace(/\s+/g, "");
81
+ if (!b64re.test(asc))
51
82
  throw new TypeError("malformed base64.");
52
- e += "==".slice(2 - (e.length & 3));
53
- let t, o = "", r, n;
54
- for (let s = 0; s < e.length; )
55
- t = x[e.charAt(s++)] << 18 | x[e.charAt(s++)] << 12 | (r = x[e.charAt(s++)]) << 6 | (n = x[e.charAt(s++)]), o += r === 64 ? a(t >> 16 & 255) : n === 64 ? a(t >> 16 & 255, t >> 8 & 255) : a(t >> 16 & 255, t >> 8 & 255, t & 255);
56
- return o;
57
- }, U = typeof atob == "function" ? (e) => atob(P(e)) : h ? (e) => Buffer.from(e, "base64").toString("binary") : q, I = h ? (e) => R(Buffer.from(e, "base64")) : (e) => R(U(e).split("").map((t) => t.charCodeAt(0))), z = (e) => I(H(e)), fe = h ? (e) => Buffer.from(e, "base64").toString("utf8") : B ? (e) => B.decode(I(e)) : (e) => j(U(e)), H = (e) => P(e.replace(/[-_]/g, (t) => t == "-" ? "+" : "/")), A = (e) => fe(H(e)), ue = (e) => {
58
- if (typeof e != "string")
59
- return !1;
60
- const t = e.replace(/\s+/g, "").replace(/={0,2}$/, "");
61
- return !/[^\s0-9a-zA-Z\+/]/.test(t) || !/[^\s0-9a-zA-Z\-_]/.test(t);
62
- }, Z = (e) => ({
63
- value: e,
64
- enumerable: !1,
65
- writable: !0,
66
- configurable: !0
67
- }), N = function() {
68
- const e = (t, o) => Object.defineProperty(String.prototype, t, Z(o));
69
- e("fromBase64", function() {
70
- return A(this);
71
- }), e("toBase64", function(t) {
72
- return d(this, t);
73
- }), e("toBase64URI", function() {
74
- return d(this, !0);
75
- }), e("toBase64URL", function() {
76
- return d(this, !0);
77
- }), e("toUint8Array", function() {
78
- return z(this);
83
+ asc += "==".slice(2 - (asc.length & 3));
84
+ let u24, bin = "", r1, r2;
85
+ for (let i = 0; i < asc.length; ) {
86
+ u24 = b64tab[asc.charAt(i++)] << 18 | b64tab[asc.charAt(i++)] << 12 | (r1 = b64tab[asc.charAt(i++)]) << 6 | (r2 = b64tab[asc.charAt(i++)]);
87
+ bin += r1 === 64 ? _fromCC(u24 >> 16 & 255) : r2 === 64 ? _fromCC(u24 >> 16 & 255, u24 >> 8 & 255) : _fromCC(u24 >> 16 & 255, u24 >> 8 & 255, u24 & 255);
88
+ }
89
+ return bin;
90
+ };
91
+ const _atob = typeof atob === "function" ? (asc) => atob(_tidyB64(asc)) : _hasBuffer ? (asc) => Buffer.from(asc, "base64").toString("binary") : atobPolyfill;
92
+ const _toUint8Array = _hasBuffer ? (a) => _U8Afrom(Buffer.from(a, "base64")) : (a) => _U8Afrom(_atob(a).split("").map((c) => c.charCodeAt(0)));
93
+ const toUint8Array = (a) => _toUint8Array(_unURI(a));
94
+ const _decode = _hasBuffer ? (a) => Buffer.from(a, "base64").toString("utf8") : _TD ? (a) => _TD.decode(_toUint8Array(a)) : (a) => btou(_atob(a));
95
+ const _unURI = (a) => _tidyB64(a.replace(/[-_]/g, (m0) => m0 == "-" ? "+" : "/"));
96
+ const decode = (src) => _decode(_unURI(src));
97
+ const isValid = (src) => {
98
+ if (typeof src !== "string")
99
+ return false;
100
+ const s = src.replace(/\s+/g, "").replace(/={0,2}$/, "");
101
+ return !/[^\s0-9a-zA-Z\+/]/.test(s) || !/[^\s0-9a-zA-Z\-_]/.test(s);
102
+ };
103
+ const _noEnum = (v) => {
104
+ return {
105
+ value: v,
106
+ enumerable: false,
107
+ writable: true,
108
+ configurable: true
109
+ };
110
+ };
111
+ const extendString = function() {
112
+ const _add = (name, body) => Object.defineProperty(String.prototype, name, _noEnum(body));
113
+ _add("fromBase64", function() {
114
+ return decode(this);
115
+ });
116
+ _add("toBase64", function(urlsafe) {
117
+ return encode(this, urlsafe);
118
+ });
119
+ _add("toBase64URI", function() {
120
+ return encode(this, true);
121
+ });
122
+ _add("toBase64URL", function() {
123
+ return encode(this, true);
124
+ });
125
+ _add("toUint8Array", function() {
126
+ return toUint8Array(this);
127
+ });
128
+ };
129
+ const extendUint8Array = function() {
130
+ const _add = (name, body) => Object.defineProperty(Uint8Array.prototype, name, _noEnum(body));
131
+ _add("toBase64", function(urlsafe) {
132
+ return fromUint8Array(this, urlsafe);
133
+ });
134
+ _add("toBase64URI", function() {
135
+ return fromUint8Array(this, true);
79
136
  });
80
- }, V = function() {
81
- const e = (t, o) => Object.defineProperty(Uint8Array.prototype, t, Z(o));
82
- e("toBase64", function(t) {
83
- return b(this, t);
84
- }), e("toBase64URI", function() {
85
- return b(this, !0);
86
- }), e("toBase64URL", function() {
87
- return b(this, !0);
137
+ _add("toBase64URL", function() {
138
+ return fromUint8Array(this, true);
88
139
  });
89
- }, ce = () => {
90
- N(), V();
91
- }, de = {
92
- version: O,
93
- VERSION: re,
94
- atob: U,
95
- atobPolyfill: q,
96
- btoa: w,
97
- btoaPolyfill: k,
98
- fromBase64: A,
99
- toBase64: d,
100
- encode: d,
101
- encodeURI: D,
102
- encodeURL: D,
103
- utob: L,
104
- btou: j,
105
- decode: A,
106
- isValid: ue,
107
- fromUint8Array: b,
108
- toUint8Array: z,
109
- extendString: N,
110
- extendUint8Array: V,
111
- extendBuiltins: ce
112
140
  };
113
- let Y = () => ({}), M = [new X()], C = [new ee()], J = [
141
+ const extendBuiltins = () => {
142
+ extendString();
143
+ extendUint8Array();
144
+ };
145
+ const gBase64 = {
146
+ version,
147
+ VERSION,
148
+ atob: _atob,
149
+ atobPolyfill,
150
+ btoa: _btoa,
151
+ btoaPolyfill,
152
+ fromBase64: decode,
153
+ toBase64: encode,
154
+ encode,
155
+ encodeURI,
156
+ encodeURL: encodeURI,
157
+ utob,
158
+ btou,
159
+ decode,
160
+ isValid,
161
+ fromUint8Array,
162
+ toUint8Array,
163
+ extendString,
164
+ extendUint8Array,
165
+ extendBuiltins
166
+ };
167
+ let gRequestHeaders = () => ({});
168
+ let gResponseParsers = [new DivisionResponseParser()];
169
+ let gErrorHandlers = [new DivisionErrorHandler()];
170
+ let gRequestFilters = [
114
171
  {
115
- doFilter: (e, t) => {
116
- const o = Y();
117
- Object.keys(o).forEach(function(r) {
118
- e.headers[r] = o[r];
119
- }), t.doFilter(e, t);
172
+ doFilter: (request2, chain) => {
173
+ const headers = gRequestHeaders();
174
+ Object.keys(headers).forEach(function(key) {
175
+ request2.headers[key] = headers[key];
176
+ });
177
+ chain.doFilter(request2, chain);
120
178
  }
121
179
  },
122
180
  {
123
- doFilter: (e) => {
124
- new W("YYYYMMDDHHmmss").serialize(e.data);
181
+ doFilter: (request2) => {
182
+ new DateSerializer("YYYYMMDDHHmmss").serialize(request2.data);
125
183
  }
126
184
  }
127
- ], F = "/", p = 1e3 * 30;
128
- const g = Q.create();
129
- g.interceptors.request.use(function(e) {
130
- const t = new K(J);
131
- return t.doFilter(e, t), e;
185
+ ];
186
+ let BASE_URL = "/";
187
+ let REQUEST_TIMEOUT = 1e3 * 30;
188
+ const g_AxiosInstance = axios.create();
189
+ g_AxiosInstance.interceptors.request.use(function(config2) {
190
+ const chain = new RequestFilterChain(gRequestFilters);
191
+ chain.doFilter(config2, chain);
192
+ return config2;
132
193
  });
133
- g.interceptors.response.use(function(e) {
194
+ g_AxiosInstance.interceptors.response.use(function(response) {
134
195
  try {
135
- const t = new G(M);
136
- return t.doParse(e, t);
137
- } catch (t) {
138
- throw new te(t.message, { cause: t }, e);
196
+ const chain = new ResponseParserChain(gResponseParsers);
197
+ return chain.doParse(response, chain);
198
+ } catch (e) {
199
+ throw new ResponseError(e.message, { cause: e }, response);
139
200
  }
140
201
  });
141
- function he(e, t = {}, o = { loading: !0, mask: !1, timeout: p }) {
142
- let r = t;
143
- t instanceof FormData || (r = $(t));
144
- let n;
145
- return o.loading === !0 && (n = v.service({ fullscreen: !0, background: "transparent" })), g.request({
146
- baseURL: F,
202
+ function request(url, data = {}, options = { loading: true, mask: false, timeout: REQUEST_TIMEOUT }) {
203
+ let newData = data;
204
+ if (!(data instanceof FormData)) {
205
+ newData = cloneDeep(data);
206
+ }
207
+ let loading;
208
+ if (options.loading === true) {
209
+ loading = ElLoading.service({ fullscreen: true, background: "transparent" });
210
+ }
211
+ return g_AxiosInstance.request({
212
+ baseURL: BASE_URL,
147
213
  method: "POST",
148
- timeout: p,
149
- withCredentials: !0,
150
- url: e,
151
- data: r,
214
+ timeout: REQUEST_TIMEOUT,
215
+ withCredentials: true,
216
+ url,
217
+ data: newData,
152
218
  responseType: "json",
153
- ...o
154
- }).then((s) => (n && n.close(), s)).catch(function(s) {
155
- n && n.close();
156
- const i = new S(C);
157
- return i.handle(s, i);
219
+ ...options
220
+ }).then((data2) => {
221
+ if (loading) {
222
+ loading.close();
223
+ }
224
+ return data2;
225
+ }).catch(function(error) {
226
+ if (loading) {
227
+ loading.close();
228
+ }
229
+ const chain = new ErrorHandlerChain(gErrorHandlers);
230
+ return chain.handle(error, chain);
158
231
  });
159
232
  }
160
- function Re(e, t = {}, o = { loading: !0, mask: !1, timeout: p }) {
161
- let r;
162
- return o.loading === !0 && (r = v.service({ fullscreen: !0, background: "transparent" })), g.request({
163
- baseURL: F,
233
+ function download(url, data = {}, options = { loading: true, mask: false, timeout: REQUEST_TIMEOUT }) {
234
+ let loading;
235
+ if (options.loading === true) {
236
+ loading = ElLoading.service({ fullscreen: true, background: "transparent" });
237
+ }
238
+ return g_AxiosInstance.request({
239
+ baseURL: BASE_URL,
164
240
  method: "POST",
165
- timeout: p,
166
- withCredentials: !0,
167
- url: e,
168
- data: t,
241
+ timeout: REQUEST_TIMEOUT,
242
+ withCredentials: true,
243
+ url,
244
+ data,
169
245
  responseType: "blob",
170
- ...o
171
- }).then((n) => (r && r.close(), n)).then((n) => {
172
- const s = n.headers["content-disposition"], i = n.data, l = s.match(/attachment; filename=\"(.*?)\"/)[1], f = de.decode(l);
173
- if (window.navigator && window.navigator.msSaveOrOpenBlob)
174
- window.navigator.msSaveOrOpenBlob(i, f);
175
- else {
176
- const c = document.createElement("a"), u = URL.createObjectURL(i);
177
- c.href = u, c.download = f, document.body.appendChild(c), c.click(), document.body.removeChild(c), URL.revokeObjectURL(u);
246
+ ...options
247
+ }).then((data2) => {
248
+ if (loading) {
249
+ loading.close();
250
+ }
251
+ return data2;
252
+ }).then((response) => {
253
+ const contentDisposition = response.headers["content-disposition"];
254
+ const blob = response.data;
255
+ const base64FileName = contentDisposition.match(/attachment; filename=\"(.*?)\"/)[1];
256
+ const decodedFileName = gBase64.decode(base64FileName);
257
+ if (window.navigator && window.navigator.msSaveOrOpenBlob) {
258
+ window.navigator.msSaveOrOpenBlob(blob, decodedFileName);
259
+ } else {
260
+ const a = document.createElement("a");
261
+ const url2 = URL.createObjectURL(blob);
262
+ a.href = url2;
263
+ a.download = decodedFileName;
264
+ document.body.appendChild(a);
265
+ a.click();
266
+ document.body.removeChild(a);
267
+ URL.revokeObjectURL(url2);
178
268
  }
179
- }).catch(function(n) {
180
- r && r.close();
181
- const s = new S(C);
182
- return s.handle(n, s);
269
+ }).catch(function(error) {
270
+ if (loading) {
271
+ loading.close();
272
+ }
273
+ const chain = new ErrorHandlerChain(gErrorHandlers);
274
+ return chain.handle(error, chain);
183
275
  });
184
276
  }
185
- function _e(e, t, o) {
186
- const r = new FormData();
187
- if (t) {
188
- const n = Object.keys(t), s = {};
189
- for (let i = 0; i < n.length; i++) {
190
- const l = n[i], f = t[l];
191
- if (f instanceof File)
192
- r.append(l, f);
193
- else if (f instanceof Array) {
194
- let c = !1;
195
- for (let u = 0; u < f.length; u++)
196
- if (f[u] instanceof File) {
197
- c = !0;
277
+ function upload(url, params, options) {
278
+ const formdata = new FormData();
279
+ if (params) {
280
+ const keys = Object.keys(params);
281
+ const normalParams = {};
282
+ for (let i = 0; i < keys.length; i++) {
283
+ const key = keys[i];
284
+ const itemValue = params[key];
285
+ if (itemValue instanceof File) {
286
+ formdata.append(key, itemValue);
287
+ } else if (itemValue instanceof Array) {
288
+ let isFile = false;
289
+ for (let j = 0; j < itemValue.length; j++) {
290
+ if (itemValue[j] instanceof File) {
291
+ isFile = true;
198
292
  break;
199
293
  }
200
- if (c)
201
- for (let u = 0; u < f.length; u++)
202
- r.append(l, f[u]);
203
- else
204
- s[l] = f;
205
- } else
206
- s[l] = f;
294
+ }
295
+ if (isFile) {
296
+ for (let j = 0; j < itemValue.length; j++) {
297
+ formdata.append(key, itemValue[j]);
298
+ }
299
+ } else {
300
+ normalParams[key] = itemValue;
301
+ }
302
+ } else {
303
+ normalParams[key] = itemValue;
304
+ }
207
305
  }
208
- r.append("ibayJson", JSON.stringify(s));
306
+ formdata.append("ibayJson", JSON.stringify(normalParams));
209
307
  }
210
- return he(e, r, o);
308
+ return request(url, formdata, options);
211
309
  }
212
- const De = {
213
- setBaseUrl: (e) => {
214
- if (!e)
215
- throw new Error("pBaseUrl is null!");
216
- F = e;
310
+ const config = {
311
+ setBaseUrl: (pBaseUrl) => {
312
+ if (!pBaseUrl) {
313
+ throw new Error(`pBaseUrl is null!`);
314
+ }
315
+ BASE_URL = pBaseUrl;
217
316
  },
218
- setRequestTimeout: (e) => {
219
- p = e;
317
+ setRequestTimeout: (pTimeout) => {
318
+ REQUEST_TIMEOUT = pTimeout;
220
319
  },
221
- setRequestHeaders: (e) => {
222
- if (!e)
223
- throw new Error("pRequestHeaders is null!");
224
- if (!(e instanceof Function))
225
- throw new Error("pRequestHeaders is not a function!");
226
- Y = e;
320
+ setRequestHeaders: (pRequestHeaders) => {
321
+ if (!pRequestHeaders) {
322
+ throw new Error(`pRequestHeaders is null!`);
323
+ }
324
+ if (!(pRequestHeaders instanceof Function)) {
325
+ throw new Error(`pRequestHeaders is not a function!`);
326
+ }
327
+ gRequestHeaders = pRequestHeaders;
227
328
  },
228
- setRequestFilters: (...e) => {
229
- if (e == null)
230
- throw new Error("filters is null!");
231
- J = e;
329
+ setRequestFilters: (...filters) => {
330
+ if (filters == null) {
331
+ throw new Error(`filters is null!`);
332
+ }
333
+ gRequestFilters = filters;
232
334
  },
233
- setResponseParsers: (...e) => {
234
- if (e == null)
235
- throw new Error("parsers is null!");
236
- M = e;
335
+ setResponseParsers: (...parsers) => {
336
+ if (parsers == null) {
337
+ throw new Error(`parsers is null!`);
338
+ }
339
+ gResponseParsers = parsers;
237
340
  },
238
- setErrorHandlers: (...e) => {
239
- if (e == null)
240
- throw new Error("handlers should not null!");
241
- C = e;
341
+ setErrorHandlers: (...handlers) => {
342
+ if (handlers == null) {
343
+ throw new Error(`handlers should not null!`);
344
+ }
345
+ gErrorHandlers = handlers;
242
346
  }
243
347
  };
244
348
  export {
245
- De as config,
246
- Re as download,
247
- he as request,
248
- _e as upload
349
+ config,
350
+ download,
351
+ request,
352
+ upload
249
353
  };
250
354
  //# sourceMappingURL=index.js.map