@farris/ui-vue 1.6.0-beta.5 → 1.6.0-beta.7

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 (116) hide show
  1. package/components/avatar/index.esm.js +2 -1
  2. package/components/avatar/index.umd.cjs +1 -1
  3. package/components/button-edit/index.esm.js +2 -1
  4. package/components/button-edit/index.umd.cjs +1 -1
  5. package/components/component/index.esm.js +2 -1
  6. package/components/component/index.umd.cjs +1 -1
  7. package/components/condition/index.esm.js +2 -1
  8. package/components/condition/index.umd.cjs +1 -1
  9. package/components/content-container/index.esm.js +2 -1
  10. package/components/content-container/index.umd.cjs +1 -1
  11. package/components/data-view/index.esm.js +2591 -2570
  12. package/components/data-view/index.umd.cjs +1 -1
  13. package/components/designer-canvas/index.esm.js +2 -1
  14. package/components/designer-canvas/index.umd.cjs +1 -1
  15. package/components/discussion-editor/index.esm.js +1 -1
  16. package/components/discussion-editor/index.umd.cjs +1 -1
  17. package/components/drawer/index.esm.js +1 -1
  18. package/components/drawer/index.umd.cjs +1 -1
  19. package/components/dynamic-form/index.esm.js +63 -62
  20. package/components/dynamic-form/index.umd.cjs +1 -1
  21. package/components/events-editor/index.esm.js +2 -1
  22. package/components/events-editor/index.umd.cjs +1 -1
  23. package/components/expression-editor/index.esm.js +2 -1
  24. package/components/expression-editor/index.umd.cjs +1 -1
  25. package/components/filter-bar/index.esm.js +2 -1
  26. package/components/filter-bar/index.umd.cjs +1 -1
  27. package/components/filter-condition-editor/index.esm.js +2 -1
  28. package/components/filter-condition-editor/index.umd.cjs +1 -1
  29. package/components/flow-canvas/index.esm.js +2 -1
  30. package/components/flow-canvas/index.umd.cjs +1 -1
  31. package/components/locale/index.esm.js +1 -1
  32. package/components/locale/index.umd.cjs +1 -1
  33. package/components/mapping-editor/index.esm.js +106 -105
  34. package/components/mapping-editor/index.umd.cjs +1 -1
  35. package/components/message-box/index.esm.js +2 -1
  36. package/components/message-box/index.umd.cjs +1 -1
  37. package/components/modal/index.esm.js +2 -1
  38. package/components/modal/index.umd.cjs +1 -1
  39. package/components/number-range/index.esm.js +2 -1
  40. package/components/number-range/index.umd.cjs +1 -1
  41. package/components/number-spinner/index.esm.js +2 -1
  42. package/components/number-spinner/index.umd.cjs +1 -1
  43. package/components/pagination/index.esm.js +276 -282
  44. package/components/pagination/index.umd.cjs +1 -1
  45. package/components/property-panel/index.esm.js +103 -102
  46. package/components/property-panel/index.umd.cjs +2 -2
  47. package/components/query-solution/index.esm.js +2 -1
  48. package/components/query-solution/index.umd.cjs +1 -1
  49. package/components/response-layout-editor/index.esm.js +2 -1
  50. package/components/response-layout-editor/index.umd.cjs +1 -1
  51. package/components/schema-selector/index.esm.js +203 -208
  52. package/components/schema-selector/index.umd.cjs +2 -2
  53. package/components/section/index.esm.js +2 -1
  54. package/components/section/index.umd.cjs +1 -1
  55. package/components/sort-condition-editor/index.esm.js +2 -1
  56. package/components/sort-condition-editor/index.umd.cjs +1 -1
  57. package/components/tabs/index.esm.js +2 -1
  58. package/components/tabs/index.umd.cjs +1 -1
  59. package/components/textarea/index.esm.js +2 -1
  60. package/components/textarea/index.umd.cjs +1 -1
  61. package/components/time-picker/index.esm.js +103 -102
  62. package/components/time-picker/index.umd.cjs +1 -1
  63. package/components/transfer/index.esm.js +265 -261
  64. package/components/transfer/index.umd.cjs +3 -3
  65. package/components/tree-grid/index.esm.js +2 -1
  66. package/components/tree-grid/index.umd.cjs +1 -1
  67. package/components/tree-view/index.esm.js +1146 -1134
  68. package/components/tree-view/index.umd.cjs +1 -1
  69. package/components/video/index.esm.js +2 -1
  70. package/components/video/index.umd.cjs +1 -1
  71. package/farris.all.esm.js +12256 -10746
  72. package/farris.all.umd.cjs +21 -21
  73. package/package.json +1 -1
  74. package/types/calendar/src/components/header/header.component.d.ts +2 -2
  75. package/types/chs.d.ts +494 -0
  76. package/types/cht.d.ts +490 -0
  77. package/types/data-view/composition/types.d.ts +2 -0
  78. package/types/en.d.ts +494 -0
  79. package/types/filter-bar/index.d.ts +3 -3
  80. package/types/filter-bar/src/components/filter-item-condition/filter-item-condition.component.d.ts +1 -1
  81. package/types/filter-bar/src/designer/filter-bar.design.component.d.ts +2 -2
  82. package/types/filter-bar/src/filter-bar.component.d.ts +1 -1
  83. package/types/index.d.ts +1479 -1
  84. package/types/order/src/designer/order.design.component.d.ts +3 -3
  85. package/types/order/src/order.component.d.ts +3 -3
  86. package/types/schema-selector/src/schema-selector.component.d.ts +1 -1
  87. package/components/list-view/index.css +0 -1
  88. package/components/list-view/index.esm.js +0 -11592
  89. package/components/list-view/index.umd.cjs +0 -20
  90. package/components/list-view/package.json +0 -8
  91. package/components/list-view/style.js +0 -2
  92. package/components/response-layout/index.css +0 -1
  93. package/components/response-layout/index.esm.js +0 -11550
  94. package/components/response-layout/index.umd.cjs +0 -1
  95. package/components/response-layout/package.json +0 -8
  96. package/designer/button-edit/index.css +0 -1
  97. package/designer/button-edit/index.esm.js +0 -11121
  98. package/designer/button-edit/index.umd.cjs +0 -1
  99. package/designer/checkbox/index.esm.js +0 -250
  100. package/designer/checkbox/index.umd.cjs +0 -1
  101. package/designer/checkbox-group/index.esm.js +0 -377
  102. package/designer/checkbox-group/index.umd.cjs +0 -1
  103. package/designer/data-grid/index.css +0 -1
  104. package/designer/data-grid/index.esm.js +0 -17844
  105. package/designer/data-grid/index.umd.cjs +0 -23
  106. package/designer/drawer/index.css +0 -1
  107. package/designer/drawer/index.esm.js +0 -2228
  108. package/designer/drawer/index.umd.cjs +0 -6
  109. package/designer/farris-designer.all.esm.js +0 -26348
  110. package/designer/farris-designer.all.umd.cjs +0 -32
  111. package/designer/index.css +0 -1
  112. package/designer/input-group/index.esm.js +0 -1035
  113. package/designer/input-group/index.umd.cjs +0 -1
  114. package/designer/radio-group/index.css +0 -1
  115. package/designer/radio-group/index.esm.js +0 -12471
  116. package/designer/radio-group/index.umd.cjs +0 -1
@@ -1,2228 +0,0 @@
1
- var Rt = Object.defineProperty;
2
- var Et = (e, t, n) => t in e ? Rt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
- var pe = (e, t, n) => Et(e, typeof t != "symbol" ? t + "" : t, n);
4
- import { resolveAppearance as St, createPropsResolver as Ct } from "../../components/dynamic-resolver/index.esm.js";
5
- import { withInstall as Tt } from "../../components/common/index.esm.js";
6
- import { defineComponent as ze, ref as V, computed as x, watch as we, createVNode as g, Teleport as Je, Transition as Z, withModifiers as Y, withDirectives as Ot, Fragment as At, vShow as Pt, inject as Ne, onMounted as Nt } from "vue";
7
- import xe from "../../components/button/index.esm.js";
8
- import { createI18n as xt, useI18n as kt } from "vue-i18n";
9
- import { UseTemplateDragAndDropRules as Ft, useDesignerComponent as Lt, FDesignerInnerItem as Dt } from "../../components/designer-canvas/index.esm.js";
10
- import Bt, { responseToolbarResolver as ke } from "../../components/response-toolbar/index.esm.js";
11
- import { BaseControlProperty as vt } from "../../components/property-panel/index.esm.js";
12
- const We = {
13
- /** 背景色 */
14
- backgroundColor: { type: String, default: "#fff" },
15
- /**
16
- * 关闭对话框前事件, 是个函数,返回true或者false
17
- */
18
- beforeClose: { type: Function, default: () => !0 },
19
- /**
20
- * 自定义抽屉样式
21
- */
22
- class: { type: String, default: "" },
23
- /**
24
- * 自定义抽屉蒙层样式
25
- */
26
- modalClass: { type: String, default: "" },
27
- /** 高度 */
28
- height: { type: String, default: 300 },
29
- /** 打开关闭抽屉 */
30
- modelValue: { type: Boolean, default: !1 },
31
- /** 从哪个位置呼出 */
32
- position: { type: String, default: "right" },
33
- /** 抽屉插入位置 */
34
- appendTo: { type: String, default: "body" },
35
- /** 是否展示打开抽屉入口 */
36
- showEntry: { type: Boolean, default: !1 },
37
- /** 是否展示关闭按钮 */
38
- showClose: { type: Boolean, default: !0 },
39
- /** 是否展示遮罩层 */
40
- // mask: { type: Boolean, default: true },
41
- /** 点击遮罩是否关闭抽屉 */
42
- allowClickMaskToClose: { type: Boolean, default: !0 },
43
- /** 标题 */
44
- title: { type: String, default: "" },
45
- /** 宽度 */
46
- width: { type: String, default: 300 },
47
- /**
48
- * 渲染的DOM容器
49
- */
50
- host: { type: Object, default: "body" }
51
- }, Fe = "zh-CHS", Ut = {
52
- locale: Fe,
53
- fallbackLocale: Fe,
54
- uri: "assets/i18n/ui"
55
- };
56
- function Ke(e, t) {
57
- return function() {
58
- return e.apply(t, arguments);
59
- };
60
- }
61
- const { toString: jt } = Object.prototype, { getPrototypeOf: Te } = Object, { iterator: se, toStringTag: Xe } = Symbol, oe = /* @__PURE__ */ ((e) => (t) => {
62
- const n = jt.call(t);
63
- return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
64
- })(/* @__PURE__ */ Object.create(null)), L = (e) => (e = e.toLowerCase(), (t) => oe(t) === e), ie = (e) => (t) => typeof t === e, { isArray: M } = Array, z = ie("undefined");
65
- function _t(e) {
66
- return e !== null && !z(e) && e.constructor !== null && !z(e.constructor) && P(e.constructor.isBuffer) && e.constructor.isBuffer(e);
67
- }
68
- const Ge = L("ArrayBuffer");
69
- function It(e) {
70
- let t;
71
- return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && Ge(e.buffer), t;
72
- }
73
- const qt = ie("string"), P = ie("function"), Qe = ie("number"), ae = (e) => e !== null && typeof e == "object", Mt = (e) => e === !0 || e === !1, X = (e) => {
74
- if (oe(e) !== "object")
75
- return !1;
76
- const t = Te(e);
77
- return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(Xe in e) && !(se in e);
78
- }, Ht = L("Date"), $t = L("File"), Vt = L("Blob"), zt = L("FileList"), Jt = (e) => ae(e) && P(e.pipe), Wt = (e) => {
79
- let t;
80
- return e && (typeof FormData == "function" && e instanceof FormData || P(e.append) && ((t = oe(e)) === "formdata" || // detect form-data instance
81
- t === "object" && P(e.toString) && e.toString() === "[object FormData]"));
82
- }, Kt = L("URLSearchParams"), [Xt, Gt, Qt, Zt] = ["ReadableStream", "Request", "Response", "Headers"].map(L), Yt = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
83
- function J(e, t, { allOwnKeys: n = !1 } = {}) {
84
- if (e === null || typeof e > "u")
85
- return;
86
- let r, s;
87
- if (typeof e != "object" && (e = [e]), M(e))
88
- for (r = 0, s = e.length; r < s; r++)
89
- t.call(null, e[r], r, e);
90
- else {
91
- const o = n ? Object.getOwnPropertyNames(e) : Object.keys(e), i = o.length;
92
- let l;
93
- for (r = 0; r < i; r++)
94
- l = o[r], t.call(null, e[l], l, e);
95
- }
96
- }
97
- function Ze(e, t) {
98
- t = t.toLowerCase();
99
- const n = Object.keys(e);
100
- let r = n.length, s;
101
- for (; r-- > 0; )
102
- if (s = n[r], t === s.toLowerCase())
103
- return s;
104
- return null;
105
- }
106
- const j = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, Ye = (e) => !z(e) && e !== j;
107
- function ge() {
108
- const { caseless: e } = Ye(this) && this || {}, t = {}, n = (r, s) => {
109
- const o = e && Ze(t, s) || s;
110
- X(t[o]) && X(r) ? t[o] = ge(t[o], r) : X(r) ? t[o] = ge({}, r) : M(r) ? t[o] = r.slice() : t[o] = r;
111
- };
112
- for (let r = 0, s = arguments.length; r < s; r++)
113
- arguments[r] && J(arguments[r], n);
114
- return t;
115
- }
116
- const en = (e, t, n, { allOwnKeys: r } = {}) => (J(t, (s, o) => {
117
- n && P(s) ? e[o] = Ke(s, n) : e[o] = s;
118
- }, { allOwnKeys: r }), e), tn = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), nn = (e, t, n, r) => {
119
- e.prototype = Object.create(t.prototype, r), e.prototype.constructor = e, Object.defineProperty(e, "super", {
120
- value: t.prototype
121
- }), n && Object.assign(e.prototype, n);
122
- }, rn = (e, t, n, r) => {
123
- let s, o, i;
124
- const l = {};
125
- if (t = t || {}, e == null) return t;
126
- do {
127
- for (s = Object.getOwnPropertyNames(e), o = s.length; o-- > 0; )
128
- i = s[o], (!r || r(i, e, t)) && !l[i] && (t[i] = e[i], l[i] = !0);
129
- e = n !== !1 && Te(e);
130
- } while (e && (!n || n(e, t)) && e !== Object.prototype);
131
- return t;
132
- }, sn = (e, t, n) => {
133
- e = String(e), (n === void 0 || n > e.length) && (n = e.length), n -= t.length;
134
- const r = e.indexOf(t, n);
135
- return r !== -1 && r === n;
136
- }, on = (e) => {
137
- if (!e) return null;
138
- if (M(e)) return e;
139
- let t = e.length;
140
- if (!Qe(t)) return null;
141
- const n = new Array(t);
142
- for (; t-- > 0; )
143
- n[t] = e[t];
144
- return n;
145
- }, an = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && Te(Uint8Array)), ln = (e, t) => {
146
- const r = (e && e[se]).call(e);
147
- let s;
148
- for (; (s = r.next()) && !s.done; ) {
149
- const o = s.value;
150
- t.call(e, o[0], o[1]);
151
- }
152
- }, cn = (e, t) => {
153
- let n;
154
- const r = [];
155
- for (; (n = e.exec(t)) !== null; )
156
- r.push(n);
157
- return r;
158
- }, un = L("HTMLFormElement"), fn = (e) => e.toLowerCase().replace(
159
- /[-_\s]([a-z\d])(\w*)/g,
160
- function(n, r, s) {
161
- return r.toUpperCase() + s;
162
- }
163
- ), Le = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), dn = L("RegExp"), et = (e, t) => {
164
- const n = Object.getOwnPropertyDescriptors(e), r = {};
165
- J(n, (s, o) => {
166
- let i;
167
- (i = t(s, o, e)) !== !1 && (r[o] = i || s);
168
- }), Object.defineProperties(e, r);
169
- }, pn = (e) => {
170
- et(e, (t, n) => {
171
- if (P(e) && ["arguments", "caller", "callee"].indexOf(n) !== -1)
172
- return !1;
173
- const r = e[n];
174
- if (P(r)) {
175
- if (t.enumerable = !1, "writable" in t) {
176
- t.writable = !1;
177
- return;
178
- }
179
- t.set || (t.set = () => {
180
- throw Error("Can not rewrite read-only method '" + n + "'");
181
- });
182
- }
183
- });
184
- }, hn = (e, t) => {
185
- const n = {}, r = (s) => {
186
- s.forEach((o) => {
187
- n[o] = !0;
188
- });
189
- };
190
- return M(e) ? r(e) : r(String(e).split(t)), n;
191
- }, mn = () => {
192
- }, yn = (e, t) => e != null && Number.isFinite(e = +e) ? e : t;
193
- function wn(e) {
194
- return !!(e && P(e.append) && e[Xe] === "FormData" && e[se]);
195
- }
196
- const gn = (e) => {
197
- const t = new Array(10), n = (r, s) => {
198
- if (ae(r)) {
199
- if (t.indexOf(r) >= 0)
200
- return;
201
- if (!("toJSON" in r)) {
202
- t[s] = r;
203
- const o = M(r) ? [] : {};
204
- return J(r, (i, l) => {
205
- const f = n(i, s + 1);
206
- !z(f) && (o[l] = f);
207
- }), t[s] = void 0, o;
208
- }
209
- }
210
- return r;
211
- };
212
- return n(e, 0);
213
- }, bn = L("AsyncFunction"), Rn = (e) => e && (ae(e) || P(e)) && P(e.then) && P(e.catch), tt = ((e, t) => e ? setImmediate : t ? ((n, r) => (j.addEventListener("message", ({ source: s, data: o }) => {
214
- s === j && o === n && r.length && r.shift()();
215
- }, !1), (s) => {
216
- r.push(s), j.postMessage(n, "*");
217
- }))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))(
218
- typeof setImmediate == "function",
219
- P(j.postMessage)
220
- ), En = typeof queueMicrotask < "u" ? queueMicrotask.bind(j) : typeof process < "u" && process.nextTick || tt, Sn = (e) => e != null && P(e[se]), a = {
221
- isArray: M,
222
- isArrayBuffer: Ge,
223
- isBuffer: _t,
224
- isFormData: Wt,
225
- isArrayBufferView: It,
226
- isString: qt,
227
- isNumber: Qe,
228
- isBoolean: Mt,
229
- isObject: ae,
230
- isPlainObject: X,
231
- isReadableStream: Xt,
232
- isRequest: Gt,
233
- isResponse: Qt,
234
- isHeaders: Zt,
235
- isUndefined: z,
236
- isDate: Ht,
237
- isFile: $t,
238
- isBlob: Vt,
239
- isRegExp: dn,
240
- isFunction: P,
241
- isStream: Jt,
242
- isURLSearchParams: Kt,
243
- isTypedArray: an,
244
- isFileList: zt,
245
- forEach: J,
246
- merge: ge,
247
- extend: en,
248
- trim: Yt,
249
- stripBOM: tn,
250
- inherits: nn,
251
- toFlatObject: rn,
252
- kindOf: oe,
253
- kindOfTest: L,
254
- endsWith: sn,
255
- toArray: on,
256
- forEachEntry: ln,
257
- matchAll: cn,
258
- isHTMLForm: un,
259
- hasOwnProperty: Le,
260
- hasOwnProp: Le,
261
- // an alias to avoid ESLint no-prototype-builtins detection
262
- reduceDescriptors: et,
263
- freezeMethods: pn,
264
- toObjectSet: hn,
265
- toCamelCase: fn,
266
- noop: mn,
267
- toFiniteNumber: yn,
268
- findKey: Ze,
269
- global: j,
270
- isContextDefined: Ye,
271
- isSpecCompliantForm: wn,
272
- toJSONObject: gn,
273
- isAsyncFn: bn,
274
- isThenable: Rn,
275
- setImmediate: tt,
276
- asap: En,
277
- isIterable: Sn
278
- };
279
- function w(e, t, n, r, s) {
280
- Error.call(this), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack, this.message = e, this.name = "AxiosError", t && (this.code = t), n && (this.config = n), r && (this.request = r), s && (this.response = s, this.status = s.status ? s.status : null);
281
- }
282
- a.inherits(w, Error, {
283
- toJSON: function() {
284
- return {
285
- // Standard
286
- message: this.message,
287
- name: this.name,
288
- // Microsoft
289
- description: this.description,
290
- number: this.number,
291
- // Mozilla
292
- fileName: this.fileName,
293
- lineNumber: this.lineNumber,
294
- columnNumber: this.columnNumber,
295
- stack: this.stack,
296
- // Axios
297
- config: a.toJSONObject(this.config),
298
- code: this.code,
299
- status: this.status
300
- };
301
- }
302
- });
303
- const nt = w.prototype, rt = {};
304
- [
305
- "ERR_BAD_OPTION_VALUE",
306
- "ERR_BAD_OPTION",
307
- "ECONNABORTED",
308
- "ETIMEDOUT",
309
- "ERR_NETWORK",
310
- "ERR_FR_TOO_MANY_REDIRECTS",
311
- "ERR_DEPRECATED",
312
- "ERR_BAD_RESPONSE",
313
- "ERR_BAD_REQUEST",
314
- "ERR_CANCELED",
315
- "ERR_NOT_SUPPORT",
316
- "ERR_INVALID_URL"
317
- // eslint-disable-next-line func-names
318
- ].forEach((e) => {
319
- rt[e] = { value: e };
320
- });
321
- Object.defineProperties(w, rt);
322
- Object.defineProperty(nt, "isAxiosError", { value: !0 });
323
- w.from = (e, t, n, r, s, o) => {
324
- const i = Object.create(nt);
325
- return a.toFlatObject(e, i, function(f) {
326
- return f !== Error.prototype;
327
- }, (l) => l !== "isAxiosError"), w.call(i, e.message, t, n, r, s), i.cause = e, i.name = e.name, o && Object.assign(i, o), i;
328
- };
329
- const Cn = null;
330
- function be(e) {
331
- return a.isPlainObject(e) || a.isArray(e);
332
- }
333
- function st(e) {
334
- return a.endsWith(e, "[]") ? e.slice(0, -2) : e;
335
- }
336
- function De(e, t, n) {
337
- return e ? e.concat(t).map(function(s, o) {
338
- return s = st(s), !n && o ? "[" + s + "]" : s;
339
- }).join(n ? "." : "") : t;
340
- }
341
- function Tn(e) {
342
- return a.isArray(e) && !e.some(be);
343
- }
344
- const On = a.toFlatObject(a, {}, null, function(t) {
345
- return /^is[A-Z]/.test(t);
346
- });
347
- function le(e, t, n) {
348
- if (!a.isObject(e))
349
- throw new TypeError("target must be an object");
350
- t = t || new FormData(), n = a.toFlatObject(n, {
351
- metaTokens: !0,
352
- dots: !1,
353
- indexes: !1
354
- }, !1, function(y, h) {
355
- return !a.isUndefined(h[y]);
356
- });
357
- const r = n.metaTokens, s = n.visitor || c, o = n.dots, i = n.indexes, f = (n.Blob || typeof Blob < "u" && Blob) && a.isSpecCompliantForm(t);
358
- if (!a.isFunction(s))
359
- throw new TypeError("visitor must be a function");
360
- function u(p) {
361
- if (p === null) return "";
362
- if (a.isDate(p))
363
- return p.toISOString();
364
- if (a.isBoolean(p))
365
- return p.toString();
366
- if (!f && a.isBlob(p))
367
- throw new w("Blob is not supported. Use a Buffer instead.");
368
- return a.isArrayBuffer(p) || a.isTypedArray(p) ? f && typeof Blob == "function" ? new Blob([p]) : Buffer.from(p) : p;
369
- }
370
- function c(p, y, h) {
371
- let E = p;
372
- if (p && !h && typeof p == "object") {
373
- if (a.endsWith(y, "{}"))
374
- y = r ? y : y.slice(0, -2), p = JSON.stringify(p);
375
- else if (a.isArray(p) && Tn(p) || (a.isFileList(p) || a.endsWith(y, "[]")) && (E = a.toArray(p)))
376
- return y = st(y), E.forEach(function(C, F) {
377
- !(a.isUndefined(C) || C === null) && t.append(
378
- // eslint-disable-next-line no-nested-ternary
379
- i === !0 ? De([y], F, o) : i === null ? y : y + "[]",
380
- u(C)
381
- );
382
- }), !1;
383
- }
384
- return be(p) ? !0 : (t.append(De(h, y, o), u(p)), !1);
385
- }
386
- const d = [], m = Object.assign(On, {
387
- defaultVisitor: c,
388
- convertValue: u,
389
- isVisitable: be
390
- });
391
- function b(p, y) {
392
- if (!a.isUndefined(p)) {
393
- if (d.indexOf(p) !== -1)
394
- throw Error("Circular reference detected in " + y.join("."));
395
- d.push(p), a.forEach(p, function(E, S) {
396
- (!(a.isUndefined(E) || E === null) && s.call(
397
- t,
398
- E,
399
- a.isString(S) ? S.trim() : S,
400
- y,
401
- m
402
- )) === !0 && b(E, y ? y.concat(S) : [S]);
403
- }), d.pop();
404
- }
405
- }
406
- if (!a.isObject(e))
407
- throw new TypeError("data must be an object");
408
- return b(e), t;
409
- }
410
- function Be(e) {
411
- const t = {
412
- "!": "%21",
413
- "'": "%27",
414
- "(": "%28",
415
- ")": "%29",
416
- "~": "%7E",
417
- "%20": "+",
418
- "%00": "\0"
419
- };
420
- return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g, function(r) {
421
- return t[r];
422
- });
423
- }
424
- function Oe(e, t) {
425
- this._pairs = [], e && le(e, this, t);
426
- }
427
- const ot = Oe.prototype;
428
- ot.append = function(t, n) {
429
- this._pairs.push([t, n]);
430
- };
431
- ot.toString = function(t) {
432
- const n = t ? function(r) {
433
- return t.call(this, r, Be);
434
- } : Be;
435
- return this._pairs.map(function(s) {
436
- return n(s[0]) + "=" + n(s[1]);
437
- }, "").join("&");
438
- };
439
- function An(e) {
440
- return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
441
- }
442
- function it(e, t, n) {
443
- if (!t)
444
- return e;
445
- const r = n && n.encode || An;
446
- a.isFunction(n) && (n = {
447
- serialize: n
448
- });
449
- const s = n && n.serialize;
450
- let o;
451
- if (s ? o = s(t, n) : o = a.isURLSearchParams(t) ? t.toString() : new Oe(t, n).toString(r), o) {
452
- const i = e.indexOf("#");
453
- i !== -1 && (e = e.slice(0, i)), e += (e.indexOf("?") === -1 ? "?" : "&") + o;
454
- }
455
- return e;
456
- }
457
- class ve {
458
- constructor() {
459
- this.handlers = [];
460
- }
461
- /**
462
- * Add a new interceptor to the stack
463
- *
464
- * @param {Function} fulfilled The function to handle `then` for a `Promise`
465
- * @param {Function} rejected The function to handle `reject` for a `Promise`
466
- *
467
- * @return {Number} An ID used to remove interceptor later
468
- */
469
- use(t, n, r) {
470
- return this.handlers.push({
471
- fulfilled: t,
472
- rejected: n,
473
- synchronous: r ? r.synchronous : !1,
474
- runWhen: r ? r.runWhen : null
475
- }), this.handlers.length - 1;
476
- }
477
- /**
478
- * Remove an interceptor from the stack
479
- *
480
- * @param {Number} id The ID that was returned by `use`
481
- *
482
- * @returns {Boolean} `true` if the interceptor was removed, `false` otherwise
483
- */
484
- eject(t) {
485
- this.handlers[t] && (this.handlers[t] = null);
486
- }
487
- /**
488
- * Clear all interceptors from the stack
489
- *
490
- * @returns {void}
491
- */
492
- clear() {
493
- this.handlers && (this.handlers = []);
494
- }
495
- /**
496
- * Iterate over all the registered interceptors
497
- *
498
- * This method is particularly useful for skipping over any
499
- * interceptors that may have become `null` calling `eject`.
500
- *
501
- * @param {Function} fn The function to call for each interceptor
502
- *
503
- * @returns {void}
504
- */
505
- forEach(t) {
506
- a.forEach(this.handlers, function(r) {
507
- r !== null && t(r);
508
- });
509
- }
510
- }
511
- const at = {
512
- silentJSONParsing: !0,
513
- forcedJSONParsing: !0,
514
- clarifyTimeoutError: !1
515
- }, Pn = typeof URLSearchParams < "u" ? URLSearchParams : Oe, Nn = typeof FormData < "u" ? FormData : null, xn = typeof Blob < "u" ? Blob : null, kn = {
516
- isBrowser: !0,
517
- classes: {
518
- URLSearchParams: Pn,
519
- FormData: Nn,
520
- Blob: xn
521
- },
522
- protocols: ["http", "https", "file", "blob", "url", "data"]
523
- }, Ae = typeof window < "u" && typeof document < "u", Re = typeof navigator == "object" && navigator || void 0, Fn = Ae && (!Re || ["ReactNative", "NativeScript", "NS"].indexOf(Re.product) < 0), Ln = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
524
- self instanceof WorkerGlobalScope && typeof self.importScripts == "function", Dn = Ae && window.location.href || "http://localhost", Bn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
525
- __proto__: null,
526
- hasBrowserEnv: Ae,
527
- hasStandardBrowserEnv: Fn,
528
- hasStandardBrowserWebWorkerEnv: Ln,
529
- navigator: Re,
530
- origin: Dn
531
- }, Symbol.toStringTag, { value: "Module" })), A = {
532
- ...Bn,
533
- ...kn
534
- };
535
- function vn(e, t) {
536
- return le(e, new A.classes.URLSearchParams(), Object.assign({
537
- visitor: function(n, r, s, o) {
538
- return A.isNode && a.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : o.defaultVisitor.apply(this, arguments);
539
- }
540
- }, t));
541
- }
542
- function Un(e) {
543
- return a.matchAll(/\w+|\[(\w*)]/g, e).map((t) => t[0] === "[]" ? "" : t[1] || t[0]);
544
- }
545
- function jn(e) {
546
- const t = {}, n = Object.keys(e);
547
- let r;
548
- const s = n.length;
549
- let o;
550
- for (r = 0; r < s; r++)
551
- o = n[r], t[o] = e[o];
552
- return t;
553
- }
554
- function lt(e) {
555
- function t(n, r, s, o) {
556
- let i = n[o++];
557
- if (i === "__proto__") return !0;
558
- const l = Number.isFinite(+i), f = o >= n.length;
559
- return i = !i && a.isArray(s) ? s.length : i, f ? (a.hasOwnProp(s, i) ? s[i] = [s[i], r] : s[i] = r, !l) : ((!s[i] || !a.isObject(s[i])) && (s[i] = []), t(n, r, s[i], o) && a.isArray(s[i]) && (s[i] = jn(s[i])), !l);
560
- }
561
- if (a.isFormData(e) && a.isFunction(e.entries)) {
562
- const n = {};
563
- return a.forEachEntry(e, (r, s) => {
564
- t(Un(r), s, n, 0);
565
- }), n;
566
- }
567
- return null;
568
- }
569
- function _n(e, t, n) {
570
- if (a.isString(e))
571
- try {
572
- return (t || JSON.parse)(e), a.trim(e);
573
- } catch (r) {
574
- if (r.name !== "SyntaxError")
575
- throw r;
576
- }
577
- return (0, JSON.stringify)(e);
578
- }
579
- const W = {
580
- transitional: at,
581
- adapter: ["xhr", "http", "fetch"],
582
- transformRequest: [function(t, n) {
583
- const r = n.getContentType() || "", s = r.indexOf("application/json") > -1, o = a.isObject(t);
584
- if (o && a.isHTMLForm(t) && (t = new FormData(t)), a.isFormData(t))
585
- return s ? JSON.stringify(lt(t)) : t;
586
- if (a.isArrayBuffer(t) || a.isBuffer(t) || a.isStream(t) || a.isFile(t) || a.isBlob(t) || a.isReadableStream(t))
587
- return t;
588
- if (a.isArrayBufferView(t))
589
- return t.buffer;
590
- if (a.isURLSearchParams(t))
591
- return n.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), t.toString();
592
- let l;
593
- if (o) {
594
- if (r.indexOf("application/x-www-form-urlencoded") > -1)
595
- return vn(t, this.formSerializer).toString();
596
- if ((l = a.isFileList(t)) || r.indexOf("multipart/form-data") > -1) {
597
- const f = this.env && this.env.FormData;
598
- return le(
599
- l ? { "files[]": t } : t,
600
- f && new f(),
601
- this.formSerializer
602
- );
603
- }
604
- }
605
- return o || s ? (n.setContentType("application/json", !1), _n(t)) : t;
606
- }],
607
- transformResponse: [function(t) {
608
- const n = this.transitional || W.transitional, r = n && n.forcedJSONParsing, s = this.responseType === "json";
609
- if (a.isResponse(t) || a.isReadableStream(t))
610
- return t;
611
- if (t && a.isString(t) && (r && !this.responseType || s)) {
612
- const i = !(n && n.silentJSONParsing) && s;
613
- try {
614
- return JSON.parse(t);
615
- } catch (l) {
616
- if (i)
617
- throw l.name === "SyntaxError" ? w.from(l, w.ERR_BAD_RESPONSE, this, null, this.response) : l;
618
- }
619
- }
620
- return t;
621
- }],
622
- /**
623
- * A timeout in milliseconds to abort a request. If set to 0 (default) a
624
- * timeout is not created.
625
- */
626
- timeout: 0,
627
- xsrfCookieName: "XSRF-TOKEN",
628
- xsrfHeaderName: "X-XSRF-TOKEN",
629
- maxContentLength: -1,
630
- maxBodyLength: -1,
631
- env: {
632
- FormData: A.classes.FormData,
633
- Blob: A.classes.Blob
634
- },
635
- validateStatus: function(t) {
636
- return t >= 200 && t < 300;
637
- },
638
- headers: {
639
- common: {
640
- Accept: "application/json, text/plain, */*",
641
- "Content-Type": void 0
642
- }
643
- }
644
- };
645
- a.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => {
646
- W.headers[e] = {};
647
- });
648
- const In = a.toObjectSet([
649
- "age",
650
- "authorization",
651
- "content-length",
652
- "content-type",
653
- "etag",
654
- "expires",
655
- "from",
656
- "host",
657
- "if-modified-since",
658
- "if-unmodified-since",
659
- "last-modified",
660
- "location",
661
- "max-forwards",
662
- "proxy-authorization",
663
- "referer",
664
- "retry-after",
665
- "user-agent"
666
- ]), qn = (e) => {
667
- const t = {};
668
- let n, r, s;
669
- return e && e.split(`
670
- `).forEach(function(i) {
671
- s = i.indexOf(":"), n = i.substring(0, s).trim().toLowerCase(), r = i.substring(s + 1).trim(), !(!n || t[n] && In[n]) && (n === "set-cookie" ? t[n] ? t[n].push(r) : t[n] = [r] : t[n] = t[n] ? t[n] + ", " + r : r);
672
- }), t;
673
- }, Ue = Symbol("internals");
674
- function $(e) {
675
- return e && String(e).trim().toLowerCase();
676
- }
677
- function G(e) {
678
- return e === !1 || e == null ? e : a.isArray(e) ? e.map(G) : String(e);
679
- }
680
- function Mn(e) {
681
- const t = /* @__PURE__ */ Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
682
- let r;
683
- for (; r = n.exec(e); )
684
- t[r[1]] = r[2];
685
- return t;
686
- }
687
- const Hn = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
688
- function he(e, t, n, r, s) {
689
- if (a.isFunction(r))
690
- return r.call(this, t, n);
691
- if (s && (t = n), !!a.isString(t)) {
692
- if (a.isString(r))
693
- return t.indexOf(r) !== -1;
694
- if (a.isRegExp(r))
695
- return r.test(t);
696
- }
697
- }
698
- function $n(e) {
699
- return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, n, r) => n.toUpperCase() + r);
700
- }
701
- function Vn(e, t) {
702
- const n = a.toCamelCase(" " + t);
703
- ["get", "set", "has"].forEach((r) => {
704
- Object.defineProperty(e, r + n, {
705
- value: function(s, o, i) {
706
- return this[r].call(this, t, s, o, i);
707
- },
708
- configurable: !0
709
- });
710
- });
711
- }
712
- class N {
713
- constructor(t) {
714
- t && this.set(t);
715
- }
716
- set(t, n, r) {
717
- const s = this;
718
- function o(l, f, u) {
719
- const c = $(f);
720
- if (!c)
721
- throw new Error("header name must be a non-empty string");
722
- const d = a.findKey(s, c);
723
- (!d || s[d] === void 0 || u === !0 || u === void 0 && s[d] !== !1) && (s[d || f] = G(l));
724
- }
725
- const i = (l, f) => a.forEach(l, (u, c) => o(u, c, f));
726
- if (a.isPlainObject(t) || t instanceof this.constructor)
727
- i(t, n);
728
- else if (a.isString(t) && (t = t.trim()) && !Hn(t))
729
- i(qn(t), n);
730
- else if (a.isObject(t) && a.isIterable(t)) {
731
- let l = {}, f, u;
732
- for (const c of t) {
733
- if (!a.isArray(c))
734
- throw TypeError("Object iterator must return a key-value pair");
735
- l[u = c[0]] = (f = l[u]) ? a.isArray(f) ? [...f, c[1]] : [f, c[1]] : c[1];
736
- }
737
- i(l, n);
738
- } else
739
- t != null && o(n, t, r);
740
- return this;
741
- }
742
- get(t, n) {
743
- if (t = $(t), t) {
744
- const r = a.findKey(this, t);
745
- if (r) {
746
- const s = this[r];
747
- if (!n)
748
- return s;
749
- if (n === !0)
750
- return Mn(s);
751
- if (a.isFunction(n))
752
- return n.call(this, s, r);
753
- if (a.isRegExp(n))
754
- return n.exec(s);
755
- throw new TypeError("parser must be boolean|regexp|function");
756
- }
757
- }
758
- }
759
- has(t, n) {
760
- if (t = $(t), t) {
761
- const r = a.findKey(this, t);
762
- return !!(r && this[r] !== void 0 && (!n || he(this, this[r], r, n)));
763
- }
764
- return !1;
765
- }
766
- delete(t, n) {
767
- const r = this;
768
- let s = !1;
769
- function o(i) {
770
- if (i = $(i), i) {
771
- const l = a.findKey(r, i);
772
- l && (!n || he(r, r[l], l, n)) && (delete r[l], s = !0);
773
- }
774
- }
775
- return a.isArray(t) ? t.forEach(o) : o(t), s;
776
- }
777
- clear(t) {
778
- const n = Object.keys(this);
779
- let r = n.length, s = !1;
780
- for (; r--; ) {
781
- const o = n[r];
782
- (!t || he(this, this[o], o, t, !0)) && (delete this[o], s = !0);
783
- }
784
- return s;
785
- }
786
- normalize(t) {
787
- const n = this, r = {};
788
- return a.forEach(this, (s, o) => {
789
- const i = a.findKey(r, o);
790
- if (i) {
791
- n[i] = G(s), delete n[o];
792
- return;
793
- }
794
- const l = t ? $n(o) : String(o).trim();
795
- l !== o && delete n[o], n[l] = G(s), r[l] = !0;
796
- }), this;
797
- }
798
- concat(...t) {
799
- return this.constructor.concat(this, ...t);
800
- }
801
- toJSON(t) {
802
- const n = /* @__PURE__ */ Object.create(null);
803
- return a.forEach(this, (r, s) => {
804
- r != null && r !== !1 && (n[s] = t && a.isArray(r) ? r.join(", ") : r);
805
- }), n;
806
- }
807
- [Symbol.iterator]() {
808
- return Object.entries(this.toJSON())[Symbol.iterator]();
809
- }
810
- toString() {
811
- return Object.entries(this.toJSON()).map(([t, n]) => t + ": " + n).join(`
812
- `);
813
- }
814
- getSetCookie() {
815
- return this.get("set-cookie") || [];
816
- }
817
- get [Symbol.toStringTag]() {
818
- return "AxiosHeaders";
819
- }
820
- static from(t) {
821
- return t instanceof this ? t : new this(t);
822
- }
823
- static concat(t, ...n) {
824
- const r = new this(t);
825
- return n.forEach((s) => r.set(s)), r;
826
- }
827
- static accessor(t) {
828
- const r = (this[Ue] = this[Ue] = {
829
- accessors: {}
830
- }).accessors, s = this.prototype;
831
- function o(i) {
832
- const l = $(i);
833
- r[l] || (Vn(s, i), r[l] = !0);
834
- }
835
- return a.isArray(t) ? t.forEach(o) : o(t), this;
836
- }
837
- }
838
- N.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
839
- a.reduceDescriptors(N.prototype, ({ value: e }, t) => {
840
- let n = t[0].toUpperCase() + t.slice(1);
841
- return {
842
- get: () => e,
843
- set(r) {
844
- this[n] = r;
845
- }
846
- };
847
- });
848
- a.freezeMethods(N);
849
- function me(e, t) {
850
- const n = this || W, r = t || n, s = N.from(r.headers);
851
- let o = r.data;
852
- return a.forEach(e, function(l) {
853
- o = l.call(n, o, s.normalize(), t ? t.status : void 0);
854
- }), s.normalize(), o;
855
- }
856
- function ct(e) {
857
- return !!(e && e.__CANCEL__);
858
- }
859
- function H(e, t, n) {
860
- w.call(this, e ?? "canceled", w.ERR_CANCELED, t, n), this.name = "CanceledError";
861
- }
862
- a.inherits(H, w, {
863
- __CANCEL__: !0
864
- });
865
- function ut(e, t, n) {
866
- const r = n.config.validateStatus;
867
- !n.status || !r || r(n.status) ? e(n) : t(new w(
868
- "Request failed with status code " + n.status,
869
- [w.ERR_BAD_REQUEST, w.ERR_BAD_RESPONSE][Math.floor(n.status / 100) - 4],
870
- n.config,
871
- n.request,
872
- n
873
- ));
874
- }
875
- function zn(e) {
876
- const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e);
877
- return t && t[1] || "";
878
- }
879
- function Jn(e, t) {
880
- e = e || 10;
881
- const n = new Array(e), r = new Array(e);
882
- let s = 0, o = 0, i;
883
- return t = t !== void 0 ? t : 1e3, function(f) {
884
- const u = Date.now(), c = r[o];
885
- i || (i = u), n[s] = f, r[s] = u;
886
- let d = o, m = 0;
887
- for (; d !== s; )
888
- m += n[d++], d = d % e;
889
- if (s = (s + 1) % e, s === o && (o = (o + 1) % e), u - i < t)
890
- return;
891
- const b = c && u - c;
892
- return b ? Math.round(m * 1e3 / b) : void 0;
893
- };
894
- }
895
- function Wn(e, t) {
896
- let n = 0, r = 1e3 / t, s, o;
897
- const i = (u, c = Date.now()) => {
898
- n = c, s = null, o && (clearTimeout(o), o = null), e.apply(null, u);
899
- };
900
- return [(...u) => {
901
- const c = Date.now(), d = c - n;
902
- d >= r ? i(u, c) : (s = u, o || (o = setTimeout(() => {
903
- o = null, i(s);
904
- }, r - d)));
905
- }, () => s && i(s)];
906
- }
907
- const ee = (e, t, n = 3) => {
908
- let r = 0;
909
- const s = Jn(50, 250);
910
- return Wn((o) => {
911
- const i = o.loaded, l = o.lengthComputable ? o.total : void 0, f = i - r, u = s(f), c = i <= l;
912
- r = i;
913
- const d = {
914
- loaded: i,
915
- total: l,
916
- progress: l ? i / l : void 0,
917
- bytes: f,
918
- rate: u || void 0,
919
- estimated: u && l && c ? (l - i) / u : void 0,
920
- event: o,
921
- lengthComputable: l != null,
922
- [t ? "download" : "upload"]: !0
923
- };
924
- e(d);
925
- }, n);
926
- }, je = (e, t) => {
927
- const n = e != null;
928
- return [(r) => t[0]({
929
- lengthComputable: n,
930
- total: e,
931
- loaded: r
932
- }), t[1]];
933
- }, _e = (e) => (...t) => a.asap(() => e(...t)), Kn = A.hasStandardBrowserEnv ? /* @__PURE__ */ ((e, t) => (n) => (n = new URL(n, A.origin), e.protocol === n.protocol && e.host === n.host && (t || e.port === n.port)))(
934
- new URL(A.origin),
935
- A.navigator && /(msie|trident)/i.test(A.navigator.userAgent)
936
- ) : () => !0, Xn = A.hasStandardBrowserEnv ? (
937
- // Standard browser envs support document.cookie
938
- {
939
- write(e, t, n, r, s, o) {
940
- const i = [e + "=" + encodeURIComponent(t)];
941
- a.isNumber(n) && i.push("expires=" + new Date(n).toGMTString()), a.isString(r) && i.push("path=" + r), a.isString(s) && i.push("domain=" + s), o === !0 && i.push("secure"), document.cookie = i.join("; ");
942
- },
943
- read(e) {
944
- const t = document.cookie.match(new RegExp("(^|;\\s*)(" + e + ")=([^;]*)"));
945
- return t ? decodeURIComponent(t[3]) : null;
946
- },
947
- remove(e) {
948
- this.write(e, "", Date.now() - 864e5);
949
- }
950
- }
951
- ) : (
952
- // Non-standard browser env (web workers, react-native) lack needed support.
953
- {
954
- write() {
955
- },
956
- read() {
957
- return null;
958
- },
959
- remove() {
960
- }
961
- }
962
- );
963
- function Gn(e) {
964
- return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e);
965
- }
966
- function Qn(e, t) {
967
- return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e;
968
- }
969
- function ft(e, t, n) {
970
- let r = !Gn(t);
971
- return e && (r || n == !1) ? Qn(e, t) : t;
972
- }
973
- const Ie = (e) => e instanceof N ? { ...e } : e;
974
- function I(e, t) {
975
- t = t || {};
976
- const n = {};
977
- function r(u, c, d, m) {
978
- return a.isPlainObject(u) && a.isPlainObject(c) ? a.merge.call({ caseless: m }, u, c) : a.isPlainObject(c) ? a.merge({}, c) : a.isArray(c) ? c.slice() : c;
979
- }
980
- function s(u, c, d, m) {
981
- if (a.isUndefined(c)) {
982
- if (!a.isUndefined(u))
983
- return r(void 0, u, d, m);
984
- } else return r(u, c, d, m);
985
- }
986
- function o(u, c) {
987
- if (!a.isUndefined(c))
988
- return r(void 0, c);
989
- }
990
- function i(u, c) {
991
- if (a.isUndefined(c)) {
992
- if (!a.isUndefined(u))
993
- return r(void 0, u);
994
- } else return r(void 0, c);
995
- }
996
- function l(u, c, d) {
997
- if (d in t)
998
- return r(u, c);
999
- if (d in e)
1000
- return r(void 0, u);
1001
- }
1002
- const f = {
1003
- url: o,
1004
- method: o,
1005
- data: o,
1006
- baseURL: i,
1007
- transformRequest: i,
1008
- transformResponse: i,
1009
- paramsSerializer: i,
1010
- timeout: i,
1011
- timeoutMessage: i,
1012
- withCredentials: i,
1013
- withXSRFToken: i,
1014
- adapter: i,
1015
- responseType: i,
1016
- xsrfCookieName: i,
1017
- xsrfHeaderName: i,
1018
- onUploadProgress: i,
1019
- onDownloadProgress: i,
1020
- decompress: i,
1021
- maxContentLength: i,
1022
- maxBodyLength: i,
1023
- beforeRedirect: i,
1024
- transport: i,
1025
- httpAgent: i,
1026
- httpsAgent: i,
1027
- cancelToken: i,
1028
- socketPath: i,
1029
- responseEncoding: i,
1030
- validateStatus: l,
1031
- headers: (u, c, d) => s(Ie(u), Ie(c), d, !0)
1032
- };
1033
- return a.forEach(Object.keys(Object.assign({}, e, t)), function(c) {
1034
- const d = f[c] || s, m = d(e[c], t[c], c);
1035
- a.isUndefined(m) && d !== l || (n[c] = m);
1036
- }), n;
1037
- }
1038
- const dt = (e) => {
1039
- const t = I({}, e);
1040
- let { data: n, withXSRFToken: r, xsrfHeaderName: s, xsrfCookieName: o, headers: i, auth: l } = t;
1041
- t.headers = i = N.from(i), t.url = it(ft(t.baseURL, t.url, t.allowAbsoluteUrls), e.params, e.paramsSerializer), l && i.set(
1042
- "Authorization",
1043
- "Basic " + btoa((l.username || "") + ":" + (l.password ? unescape(encodeURIComponent(l.password)) : ""))
1044
- );
1045
- let f;
1046
- if (a.isFormData(n)) {
1047
- if (A.hasStandardBrowserEnv || A.hasStandardBrowserWebWorkerEnv)
1048
- i.setContentType(void 0);
1049
- else if ((f = i.getContentType()) !== !1) {
1050
- const [u, ...c] = f ? f.split(";").map((d) => d.trim()).filter(Boolean) : [];
1051
- i.setContentType([u || "multipart/form-data", ...c].join("; "));
1052
- }
1053
- }
1054
- if (A.hasStandardBrowserEnv && (r && a.isFunction(r) && (r = r(t)), r || r !== !1 && Kn(t.url))) {
1055
- const u = s && o && Xn.read(o);
1056
- u && i.set(s, u);
1057
- }
1058
- return t;
1059
- }, Zn = typeof XMLHttpRequest < "u", Yn = Zn && function(e) {
1060
- return new Promise(function(n, r) {
1061
- const s = dt(e);
1062
- let o = s.data;
1063
- const i = N.from(s.headers).normalize();
1064
- let { responseType: l, onUploadProgress: f, onDownloadProgress: u } = s, c, d, m, b, p;
1065
- function y() {
1066
- b && b(), p && p(), s.cancelToken && s.cancelToken.unsubscribe(c), s.signal && s.signal.removeEventListener("abort", c);
1067
- }
1068
- let h = new XMLHttpRequest();
1069
- h.open(s.method.toUpperCase(), s.url, !0), h.timeout = s.timeout;
1070
- function E() {
1071
- if (!h)
1072
- return;
1073
- const C = N.from(
1074
- "getAllResponseHeaders" in h && h.getAllResponseHeaders()
1075
- ), O = {
1076
- data: !l || l === "text" || l === "json" ? h.responseText : h.response,
1077
- status: h.status,
1078
- statusText: h.statusText,
1079
- headers: C,
1080
- config: e,
1081
- request: h
1082
- };
1083
- ut(function(U) {
1084
- n(U), y();
1085
- }, function(U) {
1086
- r(U), y();
1087
- }, O), h = null;
1088
- }
1089
- "onloadend" in h ? h.onloadend = E : h.onreadystatechange = function() {
1090
- !h || h.readyState !== 4 || h.status === 0 && !(h.responseURL && h.responseURL.indexOf("file:") === 0) || setTimeout(E);
1091
- }, h.onabort = function() {
1092
- h && (r(new w("Request aborted", w.ECONNABORTED, e, h)), h = null);
1093
- }, h.onerror = function() {
1094
- r(new w("Network Error", w.ERR_NETWORK, e, h)), h = null;
1095
- }, h.ontimeout = function() {
1096
- let F = s.timeout ? "timeout of " + s.timeout + "ms exceeded" : "timeout exceeded";
1097
- const O = s.transitional || at;
1098
- s.timeoutErrorMessage && (F = s.timeoutErrorMessage), r(new w(
1099
- F,
1100
- O.clarifyTimeoutError ? w.ETIMEDOUT : w.ECONNABORTED,
1101
- e,
1102
- h
1103
- )), h = null;
1104
- }, o === void 0 && i.setContentType(null), "setRequestHeader" in h && a.forEach(i.toJSON(), function(F, O) {
1105
- h.setRequestHeader(O, F);
1106
- }), a.isUndefined(s.withCredentials) || (h.withCredentials = !!s.withCredentials), l && l !== "json" && (h.responseType = s.responseType), u && ([m, p] = ee(u, !0), h.addEventListener("progress", m)), f && h.upload && ([d, b] = ee(f), h.upload.addEventListener("progress", d), h.upload.addEventListener("loadend", b)), (s.cancelToken || s.signal) && (c = (C) => {
1107
- h && (r(!C || C.type ? new H(null, e, h) : C), h.abort(), h = null);
1108
- }, s.cancelToken && s.cancelToken.subscribe(c), s.signal && (s.signal.aborted ? c() : s.signal.addEventListener("abort", c)));
1109
- const S = zn(s.url);
1110
- if (S && A.protocols.indexOf(S) === -1) {
1111
- r(new w("Unsupported protocol " + S + ":", w.ERR_BAD_REQUEST, e));
1112
- return;
1113
- }
1114
- h.send(o || null);
1115
- });
1116
- }, er = (e, t) => {
1117
- const { length: n } = e = e ? e.filter(Boolean) : [];
1118
- if (t || n) {
1119
- let r = new AbortController(), s;
1120
- const o = function(u) {
1121
- if (!s) {
1122
- s = !0, l();
1123
- const c = u instanceof Error ? u : this.reason;
1124
- r.abort(c instanceof w ? c : new H(c instanceof Error ? c.message : c));
1125
- }
1126
- };
1127
- let i = t && setTimeout(() => {
1128
- i = null, o(new w(`timeout ${t} of ms exceeded`, w.ETIMEDOUT));
1129
- }, t);
1130
- const l = () => {
1131
- e && (i && clearTimeout(i), i = null, e.forEach((u) => {
1132
- u.unsubscribe ? u.unsubscribe(o) : u.removeEventListener("abort", o);
1133
- }), e = null);
1134
- };
1135
- e.forEach((u) => u.addEventListener("abort", o));
1136
- const { signal: f } = r;
1137
- return f.unsubscribe = () => a.asap(l), f;
1138
- }
1139
- }, tr = function* (e, t) {
1140
- let n = e.byteLength;
1141
- if (n < t) {
1142
- yield e;
1143
- return;
1144
- }
1145
- let r = 0, s;
1146
- for (; r < n; )
1147
- s = r + t, yield e.slice(r, s), r = s;
1148
- }, nr = async function* (e, t) {
1149
- for await (const n of rr(e))
1150
- yield* tr(n, t);
1151
- }, rr = async function* (e) {
1152
- if (e[Symbol.asyncIterator]) {
1153
- yield* e;
1154
- return;
1155
- }
1156
- const t = e.getReader();
1157
- try {
1158
- for (; ; ) {
1159
- const { done: n, value: r } = await t.read();
1160
- if (n)
1161
- break;
1162
- yield r;
1163
- }
1164
- } finally {
1165
- await t.cancel();
1166
- }
1167
- }, qe = (e, t, n, r) => {
1168
- const s = nr(e, t);
1169
- let o = 0, i, l = (f) => {
1170
- i || (i = !0, r && r(f));
1171
- };
1172
- return new ReadableStream({
1173
- async pull(f) {
1174
- try {
1175
- const { done: u, value: c } = await s.next();
1176
- if (u) {
1177
- l(), f.close();
1178
- return;
1179
- }
1180
- let d = c.byteLength;
1181
- if (n) {
1182
- let m = o += d;
1183
- n(m);
1184
- }
1185
- f.enqueue(new Uint8Array(c));
1186
- } catch (u) {
1187
- throw l(u), u;
1188
- }
1189
- },
1190
- cancel(f) {
1191
- return l(f), s.return();
1192
- }
1193
- }, {
1194
- highWaterMark: 2
1195
- });
1196
- }, ce = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", pt = ce && typeof ReadableStream == "function", sr = ce && (typeof TextEncoder == "function" ? /* @__PURE__ */ ((e) => (t) => e.encode(t))(new TextEncoder()) : async (e) => new Uint8Array(await new Response(e).arrayBuffer())), ht = (e, ...t) => {
1197
- try {
1198
- return !!e(...t);
1199
- } catch {
1200
- return !1;
1201
- }
1202
- }, or = pt && ht(() => {
1203
- let e = !1;
1204
- const t = new Request(A.origin, {
1205
- body: new ReadableStream(),
1206
- method: "POST",
1207
- get duplex() {
1208
- return e = !0, "half";
1209
- }
1210
- }).headers.has("Content-Type");
1211
- return e && !t;
1212
- }), Me = 64 * 1024, Ee = pt && ht(() => a.isReadableStream(new Response("").body)), te = {
1213
- stream: Ee && ((e) => e.body)
1214
- };
1215
- ce && ((e) => {
1216
- ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((t) => {
1217
- !te[t] && (te[t] = a.isFunction(e[t]) ? (n) => n[t]() : (n, r) => {
1218
- throw new w(`Response type '${t}' is not supported`, w.ERR_NOT_SUPPORT, r);
1219
- });
1220
- });
1221
- })(new Response());
1222
- const ir = async (e) => {
1223
- if (e == null)
1224
- return 0;
1225
- if (a.isBlob(e))
1226
- return e.size;
1227
- if (a.isSpecCompliantForm(e))
1228
- return (await new Request(A.origin, {
1229
- method: "POST",
1230
- body: e
1231
- }).arrayBuffer()).byteLength;
1232
- if (a.isArrayBufferView(e) || a.isArrayBuffer(e))
1233
- return e.byteLength;
1234
- if (a.isURLSearchParams(e) && (e = e + ""), a.isString(e))
1235
- return (await sr(e)).byteLength;
1236
- }, ar = async (e, t) => {
1237
- const n = a.toFiniteNumber(e.getContentLength());
1238
- return n ?? ir(t);
1239
- }, lr = ce && (async (e) => {
1240
- let {
1241
- url: t,
1242
- method: n,
1243
- data: r,
1244
- signal: s,
1245
- cancelToken: o,
1246
- timeout: i,
1247
- onDownloadProgress: l,
1248
- onUploadProgress: f,
1249
- responseType: u,
1250
- headers: c,
1251
- withCredentials: d = "same-origin",
1252
- fetchOptions: m
1253
- } = dt(e);
1254
- u = u ? (u + "").toLowerCase() : "text";
1255
- let b = er([s, o && o.toAbortSignal()], i), p;
1256
- const y = b && b.unsubscribe && (() => {
1257
- b.unsubscribe();
1258
- });
1259
- let h;
1260
- try {
1261
- if (f && or && n !== "get" && n !== "head" && (h = await ar(c, r)) !== 0) {
1262
- let O = new Request(t, {
1263
- method: "POST",
1264
- body: r,
1265
- duplex: "half"
1266
- }), D;
1267
- if (a.isFormData(r) && (D = O.headers.get("content-type")) && c.setContentType(D), O.body) {
1268
- const [U, q] = je(
1269
- h,
1270
- ee(_e(f))
1271
- );
1272
- r = qe(O.body, Me, U, q);
1273
- }
1274
- }
1275
- a.isString(d) || (d = d ? "include" : "omit");
1276
- const E = "credentials" in Request.prototype;
1277
- p = new Request(t, {
1278
- ...m,
1279
- signal: b,
1280
- method: n.toUpperCase(),
1281
- headers: c.normalize().toJSON(),
1282
- body: r,
1283
- duplex: "half",
1284
- credentials: E ? d : void 0
1285
- });
1286
- let S = await fetch(p, m);
1287
- const C = Ee && (u === "stream" || u === "response");
1288
- if (Ee && (l || C && y)) {
1289
- const O = {};
1290
- ["status", "statusText", "headers"].forEach((K) => {
1291
- O[K] = S[K];
1292
- });
1293
- const D = a.toFiniteNumber(S.headers.get("content-length")), [U, q] = l && je(
1294
- D,
1295
- ee(_e(l), !0)
1296
- ) || [];
1297
- S = new Response(
1298
- qe(S.body, Me, U, () => {
1299
- q && q(), y && y();
1300
- }),
1301
- O
1302
- );
1303
- }
1304
- u = u || "text";
1305
- let F = await te[a.findKey(te, u) || "text"](S, e);
1306
- return !C && y && y(), await new Promise((O, D) => {
1307
- ut(O, D, {
1308
- data: F,
1309
- headers: N.from(S.headers),
1310
- status: S.status,
1311
- statusText: S.statusText,
1312
- config: e,
1313
- request: p
1314
- });
1315
- });
1316
- } catch (E) {
1317
- throw y && y(), E && E.name === "TypeError" && /Load failed|fetch/i.test(E.message) ? Object.assign(
1318
- new w("Network Error", w.ERR_NETWORK, e, p),
1319
- {
1320
- cause: E.cause || E
1321
- }
1322
- ) : w.from(E, E && E.code, e, p);
1323
- }
1324
- }), Se = {
1325
- http: Cn,
1326
- xhr: Yn,
1327
- fetch: lr
1328
- };
1329
- a.forEach(Se, (e, t) => {
1330
- if (e) {
1331
- try {
1332
- Object.defineProperty(e, "name", { value: t });
1333
- } catch {
1334
- }
1335
- Object.defineProperty(e, "adapterName", { value: t });
1336
- }
1337
- });
1338
- const He = (e) => `- ${e}`, cr = (e) => a.isFunction(e) || e === null || e === !1, mt = {
1339
- getAdapter: (e) => {
1340
- e = a.isArray(e) ? e : [e];
1341
- const { length: t } = e;
1342
- let n, r;
1343
- const s = {};
1344
- for (let o = 0; o < t; o++) {
1345
- n = e[o];
1346
- let i;
1347
- if (r = n, !cr(n) && (r = Se[(i = String(n)).toLowerCase()], r === void 0))
1348
- throw new w(`Unknown adapter '${i}'`);
1349
- if (r)
1350
- break;
1351
- s[i || "#" + o] = r;
1352
- }
1353
- if (!r) {
1354
- const o = Object.entries(s).map(
1355
- ([l, f]) => `adapter ${l} ` + (f === !1 ? "is not supported by the environment" : "is not available in the build")
1356
- );
1357
- let i = t ? o.length > 1 ? `since :
1358
- ` + o.map(He).join(`
1359
- `) : " " + He(o[0]) : "as no adapter specified";
1360
- throw new w(
1361
- "There is no suitable adapter to dispatch the request " + i,
1362
- "ERR_NOT_SUPPORT"
1363
- );
1364
- }
1365
- return r;
1366
- },
1367
- adapters: Se
1368
- };
1369
- function ye(e) {
1370
- if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
1371
- throw new H(null, e);
1372
- }
1373
- function $e(e) {
1374
- return ye(e), e.headers = N.from(e.headers), e.data = me.call(
1375
- e,
1376
- e.transformRequest
1377
- ), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), mt.getAdapter(e.adapter || W.adapter)(e).then(function(r) {
1378
- return ye(e), r.data = me.call(
1379
- e,
1380
- e.transformResponse,
1381
- r
1382
- ), r.headers = N.from(r.headers), r;
1383
- }, function(r) {
1384
- return ct(r) || (ye(e), r && r.response && (r.response.data = me.call(
1385
- e,
1386
- e.transformResponse,
1387
- r.response
1388
- ), r.response.headers = N.from(r.response.headers))), Promise.reject(r);
1389
- });
1390
- }
1391
- const yt = "1.10.0", ue = {};
1392
- ["object", "boolean", "number", "function", "string", "symbol"].forEach((e, t) => {
1393
- ue[e] = function(r) {
1394
- return typeof r === e || "a" + (t < 1 ? "n " : " ") + e;
1395
- };
1396
- });
1397
- const Ve = {};
1398
- ue.transitional = function(t, n, r) {
1399
- function s(o, i) {
1400
- return "[Axios v" + yt + "] Transitional option '" + o + "'" + i + (r ? ". " + r : "");
1401
- }
1402
- return (o, i, l) => {
1403
- if (t === !1)
1404
- throw new w(
1405
- s(i, " has been removed" + (n ? " in " + n : "")),
1406
- w.ERR_DEPRECATED
1407
- );
1408
- return n && !Ve[i] && (Ve[i] = !0, console.warn(
1409
- s(
1410
- i,
1411
- " has been deprecated since v" + n + " and will be removed in the near future"
1412
- )
1413
- )), t ? t(o, i, l) : !0;
1414
- };
1415
- };
1416
- ue.spelling = function(t) {
1417
- return (n, r) => (console.warn(`${r} is likely a misspelling of ${t}`), !0);
1418
- };
1419
- function ur(e, t, n) {
1420
- if (typeof e != "object")
1421
- throw new w("options must be an object", w.ERR_BAD_OPTION_VALUE);
1422
- const r = Object.keys(e);
1423
- let s = r.length;
1424
- for (; s-- > 0; ) {
1425
- const o = r[s], i = t[o];
1426
- if (i) {
1427
- const l = e[o], f = l === void 0 || i(l, o, e);
1428
- if (f !== !0)
1429
- throw new w("option " + o + " must be " + f, w.ERR_BAD_OPTION_VALUE);
1430
- continue;
1431
- }
1432
- if (n !== !0)
1433
- throw new w("Unknown option " + o, w.ERR_BAD_OPTION);
1434
- }
1435
- }
1436
- const Q = {
1437
- assertOptions: ur,
1438
- validators: ue
1439
- }, v = Q.validators;
1440
- class _ {
1441
- constructor(t) {
1442
- this.defaults = t || {}, this.interceptors = {
1443
- request: new ve(),
1444
- response: new ve()
1445
- };
1446
- }
1447
- /**
1448
- * Dispatch a request
1449
- *
1450
- * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)
1451
- * @param {?Object} config
1452
- *
1453
- * @returns {Promise} The Promise to be fulfilled
1454
- */
1455
- async request(t, n) {
1456
- try {
1457
- return await this._request(t, n);
1458
- } catch (r) {
1459
- if (r instanceof Error) {
1460
- let s = {};
1461
- Error.captureStackTrace ? Error.captureStackTrace(s) : s = new Error();
1462
- const o = s.stack ? s.stack.replace(/^.+\n/, "") : "";
1463
- try {
1464
- r.stack ? o && !String(r.stack).endsWith(o.replace(/^.+\n.+\n/, "")) && (r.stack += `
1465
- ` + o) : r.stack = o;
1466
- } catch {
1467
- }
1468
- }
1469
- throw r;
1470
- }
1471
- }
1472
- _request(t, n) {
1473
- typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n = I(this.defaults, n);
1474
- const { transitional: r, paramsSerializer: s, headers: o } = n;
1475
- r !== void 0 && Q.assertOptions(r, {
1476
- silentJSONParsing: v.transitional(v.boolean),
1477
- forcedJSONParsing: v.transitional(v.boolean),
1478
- clarifyTimeoutError: v.transitional(v.boolean)
1479
- }, !1), s != null && (a.isFunction(s) ? n.paramsSerializer = {
1480
- serialize: s
1481
- } : Q.assertOptions(s, {
1482
- encode: v.function,
1483
- serialize: v.function
1484
- }, !0)), n.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? n.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : n.allowAbsoluteUrls = !0), Q.assertOptions(n, {
1485
- baseUrl: v.spelling("baseURL"),
1486
- withXsrfToken: v.spelling("withXSRFToken")
1487
- }, !0), n.method = (n.method || this.defaults.method || "get").toLowerCase();
1488
- let i = o && a.merge(
1489
- o.common,
1490
- o[n.method]
1491
- );
1492
- o && a.forEach(
1493
- ["delete", "get", "head", "post", "put", "patch", "common"],
1494
- (p) => {
1495
- delete o[p];
1496
- }
1497
- ), n.headers = N.concat(i, o);
1498
- const l = [];
1499
- let f = !0;
1500
- this.interceptors.request.forEach(function(y) {
1501
- typeof y.runWhen == "function" && y.runWhen(n) === !1 || (f = f && y.synchronous, l.unshift(y.fulfilled, y.rejected));
1502
- });
1503
- const u = [];
1504
- this.interceptors.response.forEach(function(y) {
1505
- u.push(y.fulfilled, y.rejected);
1506
- });
1507
- let c, d = 0, m;
1508
- if (!f) {
1509
- const p = [$e.bind(this), void 0];
1510
- for (p.unshift.apply(p, l), p.push.apply(p, u), m = p.length, c = Promise.resolve(n); d < m; )
1511
- c = c.then(p[d++], p[d++]);
1512
- return c;
1513
- }
1514
- m = l.length;
1515
- let b = n;
1516
- for (d = 0; d < m; ) {
1517
- const p = l[d++], y = l[d++];
1518
- try {
1519
- b = p(b);
1520
- } catch (h) {
1521
- y.call(this, h);
1522
- break;
1523
- }
1524
- }
1525
- try {
1526
- c = $e.call(this, b);
1527
- } catch (p) {
1528
- return Promise.reject(p);
1529
- }
1530
- for (d = 0, m = u.length; d < m; )
1531
- c = c.then(u[d++], u[d++]);
1532
- return c;
1533
- }
1534
- getUri(t) {
1535
- t = I(this.defaults, t);
1536
- const n = ft(t.baseURL, t.url, t.allowAbsoluteUrls);
1537
- return it(n, t.params, t.paramsSerializer);
1538
- }
1539
- }
1540
- a.forEach(["delete", "get", "head", "options"], function(t) {
1541
- _.prototype[t] = function(n, r) {
1542
- return this.request(I(r || {}, {
1543
- method: t,
1544
- url: n,
1545
- data: (r || {}).data
1546
- }));
1547
- };
1548
- });
1549
- a.forEach(["post", "put", "patch"], function(t) {
1550
- function n(r) {
1551
- return function(o, i, l) {
1552
- return this.request(I(l || {}, {
1553
- method: t,
1554
- headers: r ? {
1555
- "Content-Type": "multipart/form-data"
1556
- } : {},
1557
- url: o,
1558
- data: i
1559
- }));
1560
- };
1561
- }
1562
- _.prototype[t] = n(), _.prototype[t + "Form"] = n(!0);
1563
- });
1564
- class Pe {
1565
- constructor(t) {
1566
- if (typeof t != "function")
1567
- throw new TypeError("executor must be a function.");
1568
- let n;
1569
- this.promise = new Promise(function(o) {
1570
- n = o;
1571
- });
1572
- const r = this;
1573
- this.promise.then((s) => {
1574
- if (!r._listeners) return;
1575
- let o = r._listeners.length;
1576
- for (; o-- > 0; )
1577
- r._listeners[o](s);
1578
- r._listeners = null;
1579
- }), this.promise.then = (s) => {
1580
- let o;
1581
- const i = new Promise((l) => {
1582
- r.subscribe(l), o = l;
1583
- }).then(s);
1584
- return i.cancel = function() {
1585
- r.unsubscribe(o);
1586
- }, i;
1587
- }, t(function(o, i, l) {
1588
- r.reason || (r.reason = new H(o, i, l), n(r.reason));
1589
- });
1590
- }
1591
- /**
1592
- * Throws a `CanceledError` if cancellation has been requested.
1593
- */
1594
- throwIfRequested() {
1595
- if (this.reason)
1596
- throw this.reason;
1597
- }
1598
- /**
1599
- * Subscribe to the cancel signal
1600
- */
1601
- subscribe(t) {
1602
- if (this.reason) {
1603
- t(this.reason);
1604
- return;
1605
- }
1606
- this._listeners ? this._listeners.push(t) : this._listeners = [t];
1607
- }
1608
- /**
1609
- * Unsubscribe from the cancel signal
1610
- */
1611
- unsubscribe(t) {
1612
- if (!this._listeners)
1613
- return;
1614
- const n = this._listeners.indexOf(t);
1615
- n !== -1 && this._listeners.splice(n, 1);
1616
- }
1617
- toAbortSignal() {
1618
- const t = new AbortController(), n = (r) => {
1619
- t.abort(r);
1620
- };
1621
- return this.subscribe(n), t.signal.unsubscribe = () => this.unsubscribe(n), t.signal;
1622
- }
1623
- /**
1624
- * Returns an object that contains a new `CancelToken` and a function that, when called,
1625
- * cancels the `CancelToken`.
1626
- */
1627
- static source() {
1628
- let t;
1629
- return {
1630
- token: new Pe(function(s) {
1631
- t = s;
1632
- }),
1633
- cancel: t
1634
- };
1635
- }
1636
- }
1637
- function fr(e) {
1638
- return function(n) {
1639
- return e.apply(null, n);
1640
- };
1641
- }
1642
- function dr(e) {
1643
- return a.isObject(e) && e.isAxiosError === !0;
1644
- }
1645
- const Ce = {
1646
- Continue: 100,
1647
- SwitchingProtocols: 101,
1648
- Processing: 102,
1649
- EarlyHints: 103,
1650
- Ok: 200,
1651
- Created: 201,
1652
- Accepted: 202,
1653
- NonAuthoritativeInformation: 203,
1654
- NoContent: 204,
1655
- ResetContent: 205,
1656
- PartialContent: 206,
1657
- MultiStatus: 207,
1658
- AlreadyReported: 208,
1659
- ImUsed: 226,
1660
- MultipleChoices: 300,
1661
- MovedPermanently: 301,
1662
- Found: 302,
1663
- SeeOther: 303,
1664
- NotModified: 304,
1665
- UseProxy: 305,
1666
- Unused: 306,
1667
- TemporaryRedirect: 307,
1668
- PermanentRedirect: 308,
1669
- BadRequest: 400,
1670
- Unauthorized: 401,
1671
- PaymentRequired: 402,
1672
- Forbidden: 403,
1673
- NotFound: 404,
1674
- MethodNotAllowed: 405,
1675
- NotAcceptable: 406,
1676
- ProxyAuthenticationRequired: 407,
1677
- RequestTimeout: 408,
1678
- Conflict: 409,
1679
- Gone: 410,
1680
- LengthRequired: 411,
1681
- PreconditionFailed: 412,
1682
- PayloadTooLarge: 413,
1683
- UriTooLong: 414,
1684
- UnsupportedMediaType: 415,
1685
- RangeNotSatisfiable: 416,
1686
- ExpectationFailed: 417,
1687
- ImATeapot: 418,
1688
- MisdirectedRequest: 421,
1689
- UnprocessableEntity: 422,
1690
- Locked: 423,
1691
- FailedDependency: 424,
1692
- TooEarly: 425,
1693
- UpgradeRequired: 426,
1694
- PreconditionRequired: 428,
1695
- TooManyRequests: 429,
1696
- RequestHeaderFieldsTooLarge: 431,
1697
- UnavailableForLegalReasons: 451,
1698
- InternalServerError: 500,
1699
- NotImplemented: 501,
1700
- BadGateway: 502,
1701
- ServiceUnavailable: 503,
1702
- GatewayTimeout: 504,
1703
- HttpVersionNotSupported: 505,
1704
- VariantAlsoNegotiates: 506,
1705
- InsufficientStorage: 507,
1706
- LoopDetected: 508,
1707
- NotExtended: 510,
1708
- NetworkAuthenticationRequired: 511
1709
- };
1710
- Object.entries(Ce).forEach(([e, t]) => {
1711
- Ce[t] = e;
1712
- });
1713
- function wt(e) {
1714
- const t = new _(e), n = Ke(_.prototype.request, t);
1715
- return a.extend(n, _.prototype, t, { allOwnKeys: !0 }), a.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(s) {
1716
- return wt(I(e, s));
1717
- }, n;
1718
- }
1719
- const T = wt(W);
1720
- T.Axios = _;
1721
- T.CanceledError = H;
1722
- T.CancelToken = Pe;
1723
- T.isCancel = ct;
1724
- T.VERSION = yt;
1725
- T.toFormData = le;
1726
- T.AxiosError = w;
1727
- T.Cancel = T.CanceledError;
1728
- T.all = function(t) {
1729
- return Promise.all(t);
1730
- };
1731
- T.spread = fr;
1732
- T.isAxiosError = dr;
1733
- T.mergeConfig = I;
1734
- T.AxiosHeaders = N;
1735
- T.formToJSON = (e) => lt(a.isHTMLForm(e) ? new FormData(e) : e);
1736
- T.getAdapter = mt.getAdapter;
1737
- T.HttpStatusCode = Ce;
1738
- T.default = T;
1739
- function pr() {
1740
- function e(t, n = {}) {
1741
- return n = { ...{
1742
- timeout: 5e3,
1743
- headers: {
1744
- "Cache-Control": "no-cache"
1745
- }
1746
- }, ...n }, T.get(t, n).then((o) => o.data);
1747
- }
1748
- return {
1749
- loadResource: e
1750
- };
1751
- }
1752
- const R = class R {
1753
- static async setup(t, n = {}) {
1754
- R.config = { ...Ut, ...n };
1755
- const r = R.config.locale;
1756
- R.i18n = xt({
1757
- locale: r,
1758
- fallbackLocale: R.config.fallbackLocale,
1759
- messages: {},
1760
- legacy: !1,
1761
- globalInjection: !0,
1762
- silentTranslationWarn: !0,
1763
- silentFallbackWarn: !0
1764
- }), t.use(R.i18n), await this.loadResources();
1765
- }
1766
- static getLocale() {
1767
- return R.i18n && R.i18n.global.locale;
1768
- }
1769
- static getLocaleValue(t) {
1770
- return R.i18n && R.i18n.global.te(t) || t;
1771
- }
1772
- /**
1773
- * 属性空值或者有值但等于默认值,返回默认值多语言属性;有值但不相等返回当前属性自有值
1774
- * @param propertyValue
1775
- * @param defaultValue
1776
- * @param localeKey
1777
- * @returns
1778
- */
1779
- static getRealPropertyValue(t, n, r) {
1780
- const { t: s } = kt();
1781
- return !t || t === n ? s(r) : t;
1782
- }
1783
- static async loadResources(t = {}) {
1784
- const n = {}, r = R.config.locale, s = R.config.fallbackLocale;
1785
- return n[r] = await R.loadLocaleResources(r), s && r !== s && (n[s] = await R.loadLocaleResources(s), R.i18n.global.setLocaleMessage(s, n[s])), R.i18n.global.setLocaleMessage(r, n[r]), n;
1786
- }
1787
- static async loadLocaleResources(t) {
1788
- var n, r;
1789
- try {
1790
- let s = {};
1791
- const { loadResource: o } = pr();
1792
- if (R.config.uri) {
1793
- const i = `${R.config.uri}/${t}.json?version=${(/* @__PURE__ */ new Date()).valueOf()}`;
1794
- s = await o(i);
1795
- }
1796
- return (n = R.config.localResources) != null && n[t] && (s = { ...s, ...R.config.localResources[t] }), s;
1797
- } catch (s) {
1798
- return console.warn(`Failed to load locale ${t}:`, s), ((r = R.config.localResources) == null ? void 0 : r[t]) || {};
1799
- }
1800
- }
1801
- };
1802
- pe(R, "i18n"), pe(R, "config");
1803
- let ne = R;
1804
- function hr() {
1805
- return { drawerLocale: {
1806
- cancel: ne.getLocaleValue("drawer.cancel"),
1807
- confirm: ne.getLocaleValue("drawer.confirm")
1808
- } };
1809
- }
1810
- const mr = /* @__PURE__ */ ze({
1811
- name: "FDrawer",
1812
- props: We,
1813
- emits: ["afterClose", "update:modelValue"],
1814
- setup(e, t) {
1815
- const {
1816
- drawerLocale: n
1817
- } = hr(), r = V(e.modelValue), s = x(() => ({
1818
- "f-drawer": !0,
1819
- // 在某个DOM内部打开抽屉
1820
- "f-drawer-inline": typeof e.host == "string" ? e.host !== "body" : document.querySelector(e.host) !== document.body
1821
- }));
1822
- x(() => ({}));
1823
- const o = x(() => {
1824
- const m = {};
1825
- return e.maskClass && e.maskClass.split(" ").forEach((b) => {
1826
- m[b] = !0;
1827
- }), {
1828
- "f-drawer-mask": !0,
1829
- ...m
1830
- };
1831
- }), i = x(() => {
1832
- const m = {};
1833
- return e.maskClass && e.class.split(" ").forEach((b) => {
1834
- m[b] = !0;
1835
- }), {
1836
- "f-drawer-wrapper": !0,
1837
- [`f-drawer-wrapper-${e.position}`]: !0,
1838
- ...m
1839
- };
1840
- }), l = x(() => {
1841
- const m = e.width;
1842
- return typeof m == "string" ? m : typeof m == "number" ? `${m}px` : "20%";
1843
- }), f = x(() => {
1844
- const m = e.height;
1845
- return typeof m == "string" ? m : typeof m == "number" ? `${m}px` : "20%";
1846
- }), u = x(() => `f-drawer-${e.position}`), c = (m) => {
1847
- Promise.resolve().then(() => {
1848
- var b;
1849
- return (b = e.beforeClose) == null ? void 0 : b.call(e);
1850
- }).then((b) => {
1851
- b && (r.value = !1, t.emit("update:modelValue", r.value), t.emit("afterClose"));
1852
- });
1853
- }, d = (m) => {
1854
- c();
1855
- };
1856
- return we(() => e.modelValue, (m, b) => {
1857
- m !== b && (r.value = m);
1858
- }), () => g(Je, {
1859
- to: e.host
1860
- }, {
1861
- default: () => [g("div", {
1862
- class: s.value
1863
- }, [g(Z, {
1864
- name: "f-drawer-mask",
1865
- appear: !0
1866
- }, {
1867
- default: () => [r.value && g("div", {
1868
- class: o.value,
1869
- onClick: Y((m) => {
1870
- e.allowClickMaskToClose && c();
1871
- }, ["stop"])
1872
- }, null)]
1873
- }), g(Z, {
1874
- name: u.value
1875
- }, {
1876
- default: () => {
1877
- var m, b;
1878
- return [Ot(g("div", {
1879
- class: i.value,
1880
- style: {
1881
- width: l.value,
1882
- height: f.value,
1883
- backgroundColor: e.backgroundColor
1884
- }
1885
- }, [g("div", {
1886
- class: "f-drawer-container"
1887
- }, [g("div", {
1888
- class: "f-drawer-header"
1889
- }, [g("div", {
1890
- class: "f-drawer-title"
1891
- }, [t.slots.headerTemplate ? t.slots.headerTemplate() : e.title]), e.showClose && g("div", {
1892
- class: "f-drawer-close"
1893
- }, [g("span", {
1894
- class: "f-icon f-icon-close",
1895
- onClick: Y((p) => {
1896
- c();
1897
- }, ["stop"])
1898
- }, null)])]), g("div", {
1899
- class: "f-drawer-body"
1900
- }, [(b = (m = t.slots).content) == null ? void 0 : b.call(m)]), g("div", {
1901
- class: "f-drawer-footer"
1902
- }, [t.slots.footerTemplate ? t.slots.footerTemplate() : g(At, null, [g(xe, {
1903
- class: "mr-2",
1904
- onClick: c
1905
- }, {
1906
- default: () => [n.cancel]
1907
- }), g(xe, {
1908
- onClick: d
1909
- }, {
1910
- default: () => [n.confirm]
1911
- })])])])]), [[Pt, r.value]])];
1912
- }
1913
- })])]
1914
- });
1915
- }
1916
- });
1917
- class yr extends vt {
1918
- constructor(t, n) {
1919
- super(t, n);
1920
- }
1921
- getPropertyConfig(t) {
1922
- return this.propertyConfig.categories.basic = this.getBasicPropConfig(t), this.propertyConfig.categories.appearance = this.getAppearanceConfig(t), this.getBehaviorConfig(), this.propertyConfig;
1923
- }
1924
- getBehaviorConfig() {
1925
- this.propertyConfig.categories.behavior = {
1926
- title: "行为",
1927
- description: "Behavior",
1928
- properties: {
1929
- title: {
1930
- title: "标题",
1931
- description: "标题",
1932
- type: "string"
1933
- },
1934
- position: {
1935
- title: "显示位置",
1936
- description: "抽屉显示位置",
1937
- type: "select",
1938
- default: "right",
1939
- editor: {
1940
- type: "combo-list",
1941
- textField: "name",
1942
- valueField: "value",
1943
- editable: !1,
1944
- data: [
1945
- { value: "left", name: "左侧" },
1946
- { value: "right", name: "右侧" }
1947
- ]
1948
- }
1949
- },
1950
- width: {
1951
- title: "宽度",
1952
- description: "抽屉宽度",
1953
- type: "number"
1954
- },
1955
- showMask: {
1956
- title: "显示遮罩",
1957
- description: "是否显示遮罩",
1958
- type: "boolean",
1959
- default: !0
1960
- }
1961
- },
1962
- setPropertyRelates(t, n) {
1963
- if (t)
1964
- switch (t && t.propertyID) {
1965
- case "title": {
1966
- t.needRefreshControlTree = !0;
1967
- break;
1968
- }
1969
- }
1970
- }
1971
- };
1972
- }
1973
- }
1974
- function wr(e, t) {
1975
- new Ft();
1976
- function n() {
1977
- return !1;
1978
- }
1979
- function r() {
1980
- return !1;
1981
- }
1982
- function s() {
1983
- return !1;
1984
- }
1985
- function o() {
1986
- return !0;
1987
- }
1988
- function i() {
1989
- return "position: absolute !important;border: none !important;left: 0;right: 0;padding: 0;";
1990
- }
1991
- function l(f) {
1992
- const u = new yr(f, t), { schema: c } = e;
1993
- return u.getPropertyConfig(c);
1994
- }
1995
- return { canAccepts: n, checkCanDeleteComponent: r, checkCanMoveComponent: s, hideNestedPaddingInDesginerView: o, getStyles: i, getPropsConfig: l };
1996
- }
1997
- const gt = Object.assign({}, We, {
1998
- componentId: { type: String, default: "" }
1999
- }), re = /* @__PURE__ */ ze({
2000
- name: "FDrawerDesign",
2001
- props: gt,
2002
- setup(e, t) {
2003
- const n = V(), r = Ne("designer-host-service"), s = Ne("design-item-context"), o = wr(s, r), i = Lt(n, s, o), l = V(s.schema.toolbar || {
2004
- type: "response-toolbar",
2005
- buttons: []
2006
- }), f = V(ke(l.value));
2007
- we(() => s.schema.toolbar, () => {
2008
- l.value = s.schema.toolbar || {
2009
- type: "response-toolbar",
2010
- buttons: []
2011
- }, f.value = ke(l.value);
2012
- }, {
2013
- deep: !0
2014
- });
2015
- const u = x(() => [...f.value.items]);
2016
- Nt(() => {
2017
- n.value.componentInstance = i;
2018
- }), t.expose(i.value);
2019
- const c = V(e.modelValue);
2020
- we(() => e.modelValue, () => {
2021
- c.value = e.modelValue;
2022
- });
2023
- const d = x(() => ["f-drawer-wrapper", `f-drawer-wrapper-${e.position}`, e.wrapperClass]), m = x(() => {
2024
- const k = e.width, B = e.height, fe = typeof k == "string" ? k : typeof k == "number" ? `${k}px` : "20%", de = typeof B == "string" ? B : typeof B == "number" ? `${B}px` : "20%";
2025
- return {
2026
- width: fe,
2027
- height: de,
2028
- backgroundColor: e.backgroundColor
2029
- };
2030
- }), b = x(() => ["f-drawer-entry", `f-drawer-entry-${e.position}`, e.entryClass]), p = x(() => `f-icon-arrow-chevron-${{
2031
- left: "right",
2032
- right: "left",
2033
- top: "down",
2034
- bottom: "up"
2035
- }[e.position] ?? "right"}`), y = x(() => `f-drawer-${e.position}`), h = () => {
2036
- c.value = !1;
2037
- }, E = () => {
2038
- c.value = !0;
2039
- }, S = () => g("div", {
2040
- class: b.value,
2041
- onClick: E
2042
- }, [t.slots.button ? t.slots.button() : g("div", {
2043
- class: "f-drawer-entry-icon"
2044
- }, [g("span", {
2045
- class: `f-icon ${p.value}`
2046
- }, null)])]), C = () => g(Z, {
2047
- name: "f-drawer-mask",
2048
- appear: !0
2049
- }, {
2050
- default: () => [c.value && e.showMask && g("div", {
2051
- class: "f-drawer-mask",
2052
- onClick: e.closeByMask && Y(h, ["stop"])
2053
- }, null)]
2054
- });
2055
- function F(k, B, fe, de) {
2056
- s && s.setupContext && s.setupContext.emit("selectionChange", k, B, fe, de);
2057
- }
2058
- const O = () => {
2059
- if (u.value && u.value.length > 0)
2060
- return g(Dt, {
2061
- modelValue: l.value,
2062
- "onUpdate:modelValue": (k) => l.value = k,
2063
- canAdd: !0,
2064
- childType: "response-toolbar-item",
2065
- childLabel: "按钮",
2066
- contentKey: "buttons",
2067
- id: l.value.id,
2068
- componentId: e.componentId,
2069
- onSelectionChange: F
2070
- }, {
2071
- default: () => [g(Bt, {
2072
- customClass: "w-100",
2073
- items: u.value,
2074
- componentId: e.componentId
2075
- }, null)]
2076
- });
2077
- }, D = () => g("div", {
2078
- class: "f-drawer-close"
2079
- }, [g("span", {
2080
- class: "f-icon f-icon-close",
2081
- onClick: Y(h, ["stop"])
2082
- }, null)]), U = () => g("div", {
2083
- class: "f-drawer-header"
2084
- }, [g("div", {
2085
- class: "f-drawer-header-left"
2086
- }, [g("div", {
2087
- class: "f-drawer-title"
2088
- }, [t.slots.title ? t.slots.title() : e.title])]), g("div", {
2089
- class: "f-drawer-header-right"
2090
- }, [O(), e.showClose && D()])]), q = () => g(Z, {
2091
- name: y.value,
2092
- appear: !0
2093
- }, {
2094
- default: () => {
2095
- var k, B;
2096
- return [c.value && g("div", {
2097
- class: d.value,
2098
- style: m.value
2099
- }, [g("div", {
2100
- class: "f-drawer-container"
2101
- }, [U(), g("div", {
2102
- class: "f-drawer-body"
2103
- }, [(B = (k = t.slots).default) == null ? void 0 : B.call(k)])])])];
2104
- }
2105
- }), K = () => g(Je, {
2106
- to: ".editorPanel "
2107
- }, {
2108
- default: () => [g("div", {
2109
- class: "f-drawer"
2110
- }, [C(), q()])]
2111
- });
2112
- return () => g("div", {
2113
- ref: n
2114
- }, [K(), S()]);
2115
- }
2116
- });
2117
- function gr(e, t, n) {
2118
- return t;
2119
- }
2120
- const br = /* @__PURE__ */ new Map([
2121
- ["appearance", St]
2122
- ]), Rr = "https://json-schema.org/draft/2020-12/schema", Er = "https://farris-design.gitee.io/drawer.schema.json", Sr = "drawer", Cr = "A Farris Component", Tr = "object", Or = {
2123
- id: {
2124
- description: "The unique identifier for drawer",
2125
- type: "string"
2126
- },
2127
- type: {
2128
- description: "The type string of drawer",
2129
- type: "string",
2130
- default: "drawer"
2131
- },
2132
- appearance: {
2133
- description: "",
2134
- type: "object",
2135
- properties: {
2136
- class: {
2137
- type: "string"
2138
- },
2139
- style: {
2140
- type: "string"
2141
- }
2142
- },
2143
- default: {}
2144
- },
2145
- visible: {
2146
- description: "",
2147
- type: "boolean",
2148
- default: !0
2149
- },
2150
- title: {
2151
- description: "",
2152
- type: "string",
2153
- default: "标题"
2154
- },
2155
- position: {
2156
- description: "",
2157
- type: "string",
2158
- default: "right"
2159
- },
2160
- width: {
2161
- description: "",
2162
- type: "number"
2163
- },
2164
- showMask: {
2165
- description: "",
2166
- type: "boolean",
2167
- default: !0
2168
- },
2169
- toolbar: {
2170
- description: "",
2171
- type: "object",
2172
- properties: {
2173
- appearance: {
2174
- description: "",
2175
- type: "object",
2176
- properties: {
2177
- class: {
2178
- type: "string",
2179
- default: "col-3"
2180
- }
2181
- }
2182
- },
2183
- id: {
2184
- description: "",
2185
- type: "string"
2186
- },
2187
- type: {
2188
- description: "",
2189
- type: "string",
2190
- default: "response-toolbar"
2191
- },
2192
- alignment: {
2193
- description: "The alignment of Response Toolbar Button.",
2194
- type: "string",
2195
- default: "right"
2196
- },
2197
- buttons: {
2198
- description: "The items of Response Toolbar.",
2199
- type: "array",
2200
- default: []
2201
- }
2202
- }
2203
- }
2204
- }, Ar = [
2205
- "id",
2206
- "type",
2207
- "contents"
2208
- ], Pr = {
2209
- $schema: Rr,
2210
- $id: Er,
2211
- title: Sr,
2212
- description: Cr,
2213
- type: Tr,
2214
- properties: Or,
2215
- required: Ar
2216
- }, bt = Ct(gt, Pr, br, gr);
2217
- re.register = (e, t, n) => {
2218
- e.drawer = mr, t.drawer = bt;
2219
- };
2220
- re.registerDesigner = (e, t, n) => {
2221
- e.drawer = re, t.drawer = bt;
2222
- };
2223
- const jr = Tt(re);
2224
- export {
2225
- jr as default,
2226
- We as drawerProps,
2227
- bt as propsResolver
2228
- };