@impui/imp 1.0.15 → 1.0.16-beta.0

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 (72) hide show
  1. package/dist/axios/index.es.js +143 -0
  2. package/dist/config/index.es.js +127 -0
  3. package/dist/core/index.es.js +34 -0
  4. package/dist/gotool/go2/index.es.js +510 -0
  5. package/dist/gotool/index/index.es.js +164 -0
  6. package/dist/imph5/index.es.js +324 -0
  7. package/dist/index.es.js +49 -1
  8. package/dist/login/index.es.js +711 -0
  9. package/dist/node_modules/axios/index/index.es.js +38 -0
  10. package/dist/node_modules/axios/lib/adapters/adapters/index.es.js +71 -0
  11. package/dist/node_modules/axios/lib/adapters/fetch/index.es.js +219 -0
  12. package/dist/node_modules/axios/lib/adapters/xhr/index.es.js +141 -0
  13. package/dist/node_modules/axios/lib/axios/index.es.js +50 -0
  14. package/dist/node_modules/axios/lib/cancel/CancelToken/index.es.js +99 -0
  15. package/dist/node_modules/axios/lib/cancel/CanceledError/index.es.js +12 -0
  16. package/dist/node_modules/axios/lib/cancel/isCancel/index.es.js +6 -0
  17. package/dist/node_modules/axios/lib/core/Axios/index.es.js +180 -0
  18. package/dist/node_modules/axios/lib/core/AxiosError/index.es.js +80 -0
  19. package/dist/node_modules/axios/lib/core/AxiosHeaders/index.es.js +231 -0
  20. package/dist/node_modules/axios/lib/core/InterceptorManager/index.es.js +65 -0
  21. package/dist/node_modules/axios/lib/core/buildFullPath/index.es.js +12 -0
  22. package/dist/node_modules/axios/lib/core/dispatchRequest/index.es.js +52 -0
  23. package/dist/node_modules/axios/lib/core/mergeConfig/index.es.js +83 -0
  24. package/dist/node_modules/axios/lib/core/settle/index.es.js +18 -0
  25. package/dist/node_modules/axios/lib/core/transformData/index.es.js +17 -0
  26. package/dist/node_modules/axios/lib/defaults/index/index.es.js +116 -0
  27. package/dist/node_modules/axios/lib/defaults/transitional/index.es.js +8 -0
  28. package/dist/node_modules/axios/lib/env/data/index.es.js +4 -0
  29. package/dist/node_modules/axios/lib/helpers/AxiosURLSearchParams/index.es.js +34 -0
  30. package/dist/node_modules/axios/lib/helpers/HttpStatusCode/index.es.js +77 -0
  31. package/dist/node_modules/axios/lib/helpers/bind/index.es.js +8 -0
  32. package/dist/node_modules/axios/lib/helpers/buildURL/index.es.js +34 -0
  33. package/dist/node_modules/axios/lib/helpers/combineURLs/index.es.js +6 -0
  34. package/dist/node_modules/axios/lib/helpers/composeSignals/index.es.js +39 -0
  35. package/dist/node_modules/axios/lib/helpers/cookies/index.es.js +49 -0
  36. package/dist/node_modules/axios/lib/helpers/formDataToJSON/index.es.js +54 -0
  37. package/dist/node_modules/axios/lib/helpers/isAbsoluteURL/index.es.js +6 -0
  38. package/dist/node_modules/axios/lib/helpers/isAxiosError/index.es.js +7 -0
  39. package/dist/node_modules/axios/lib/helpers/isURLSameOrigin/index.es.js +11 -0
  40. package/dist/node_modules/axios/lib/helpers/null/index.es.js +4 -0
  41. package/dist/node_modules/axios/lib/helpers/parseHeaders/index.es.js +47 -0
  42. package/dist/node_modules/axios/lib/helpers/parseProtocol/index.es.js +7 -0
  43. package/dist/node_modules/axios/lib/helpers/progressEventReducer/index.es.js +41 -0
  44. package/dist/node_modules/axios/lib/helpers/resolveConfig/index.es.js +46 -0
  45. package/dist/node_modules/axios/lib/helpers/speedometer/index.es.js +36 -0
  46. package/dist/node_modules/axios/lib/helpers/spread/index.es.js +8 -0
  47. package/dist/node_modules/axios/lib/helpers/throttle/index.es.js +35 -0
  48. package/dist/node_modules/axios/lib/helpers/toFormData/index.es.js +117 -0
  49. package/dist/node_modules/axios/lib/helpers/toURLEncodedForm/index.es.js +18 -0
  50. package/dist/node_modules/axios/lib/helpers/trackStream/index.es.js +80 -0
  51. package/dist/node_modules/axios/lib/helpers/validator/index.es.js +67 -0
  52. package/dist/node_modules/axios/lib/platform/browser/classes/Blob/index.es.js +4 -0
  53. package/dist/node_modules/axios/lib/platform/browser/classes/FormData/index.es.js +4 -0
  54. package/dist/node_modules/axios/lib/platform/browser/classes/URLSearchParams/index.es.js +5 -0
  55. package/dist/node_modules/axios/lib/platform/browser/index/index.es.js +15 -0
  56. package/dist/node_modules/axios/lib/platform/common/utils/index.es.js +15 -0
  57. package/dist/node_modules/axios/lib/platform/index/index.es.js +9 -0
  58. package/dist/node_modules/axios/lib/utils/index.es.js +387 -0
  59. package/dist/packages/com/dist/browser/index.es/index.es.js +1 -0
  60. package/dist/packages/com/dist/cache/index.es/index.es.js +145 -0
  61. package/dist/packages/com/dist/core/index.es/index.es.js +154 -0
  62. package/dist/packages/com/dist/data/index.es/index.es.js +26 -0
  63. package/dist/packages/com/dist/date/index.es/index.es.js +194 -0
  64. package/dist/packages/com/dist/log/index.es/index.es.js +110 -0
  65. package/dist/packages/com/dist/message/index.es/index.es.js +90 -0
  66. package/dist/packages/com/dist/req/index.es/index.es.js +35 -0
  67. package/dist/packages/com/dist/str/index.es/index.es.js +25 -0
  68. package/dist/packages/com/dist/typetool/index.es/index.es.js +53 -0
  69. package/dist/packages/com/dist/url/index.es/index.es.js +238 -0
  70. package/dist/restool/index/index.es.js +266 -0
  71. package/dist/restool/index.css/index.es.js +4 -0
  72. package/package.json +2 -3
@@ -0,0 +1,324 @@
1
+ import { extend } from "@impui/com/core";
2
+ import { isBoolean, isObject } from "@impui/com/typetool";
3
+ import { isAndroid, isIOS } from "@impui/com/browser";
4
+ const holdLink = function() {
5
+ document.addEventListener("click", function(e) {
6
+ var link = e.target.closest("a");
7
+ if (!link) return;
8
+ if (link.getAttribute("target") === "window") {
9
+ var href = link.getAttribute("href");
10
+ windowOpen(href);
11
+ e.preventDefault();
12
+ }
13
+ });
14
+ };
15
+ const sliderRes = async function(res) {
16
+ const { layer: layer2 } = await impui.loadAsync(["layer"]);
17
+ if (isAndroid()) {
18
+ window.AndroidJs.sliderRes(JSON.stringify(res));
19
+ } else if (isIOS()) {
20
+ window.webkit.messageHandlers.sliderRes.postMessage(res);
21
+ } else {
22
+ layer2.msg("sliderRes滑块回调接口,web端暂不支持!");
23
+ }
24
+ };
25
+ const msg = function(msg2) {
26
+ if (window.layer) {
27
+ layer.msg(msg2);
28
+ } else {
29
+ alert(msg2);
30
+ }
31
+ };
32
+ const getUrl = function(url) {
33
+ if (url.indexOf("http://") < 0 && url.indexOf("https://") < 0) {
34
+ var firststr = url.substring(0, 1);
35
+ if (firststr === "/") {
36
+ return location.origin + url;
37
+ } else if (firststr === "#" || url.indexOf("javascript:;") >= 0) {
38
+ return url;
39
+ }
40
+ return location.origin + "/static/" + url;
41
+ }
42
+ return url;
43
+ };
44
+ const windowOpen = function(url, addclose, title, goType) {
45
+ url = getUrl(url);
46
+ addclose = addclose || false;
47
+ title = title || "";
48
+ if (isAndroid()) {
49
+ window.AndroidJs.appGoNewWin(url, addclose);
50
+ } else if (isIOS()) {
51
+ window.webkit.messageHandlers.appGoNewWin.postMessage({ "url": url, "addclose": addclose, "title": title });
52
+ } else {
53
+ switch (goType) {
54
+ case 1:
55
+ window.open(getUrl(url));
56
+ break;
57
+ default:
58
+ location.href = getUrl(url);
59
+ break;
60
+ }
61
+ }
62
+ };
63
+ const GoWebView = function(url, issso, options) {
64
+ var defaultOptions = {
65
+ url,
66
+ type: "page",
67
+ title: "",
68
+ rate: 1,
69
+ addclose: true,
70
+ sso: false
71
+ };
72
+ if (isBoolean(issso)) {
73
+ defaultOptions.sso = issso;
74
+ } else if (!options && isObject(issso)) {
75
+ options = issso;
76
+ }
77
+ options = extend(true, defaultOptions, options);
78
+ if (isAndroid()) {
79
+ window.AndroidJs.appGoView(JSON.stringify(options));
80
+ } else if (isIOS()) {
81
+ window.webkit.messageHandlers.appGoView.postMessage(options);
82
+ } else {
83
+ console.warn("pc端不支持GoWebView方法!");
84
+ }
85
+ };
86
+ const appGoToLiveRoom = function() {
87
+ if (isAndroid()) {
88
+ window.AndroidJs.appGoToLiveRoom();
89
+ } else if (isIOS()) {
90
+ window.webkit.messageHandlers.appGoToLiveRoom.postMessage(null);
91
+ }
92
+ };
93
+ const appGoRoom = function(cno) {
94
+ if (isAndroid()) {
95
+ window.AndroidJs.appGoRoom(cno);
96
+ } else if (isIOS()) {
97
+ window.webkit.messageHandlers.appGoRoom.postMessage(cno);
98
+ } else {
99
+ window.open("/" + cno);
100
+ }
101
+ };
102
+ const appGoRoomV2 = function(opt) {
103
+ if (!isObject(opt)) {
104
+ opt = { cno: opt };
105
+ }
106
+ if (isAndroid()) {
107
+ window.AndroidJs.appGoRoomV2(JSON.stringify(opt));
108
+ } else if (isIOS()) {
109
+ window.webkit.messageHandlers.appGoRoomV2.postMessage(opt);
110
+ } else {
111
+ var url = "/" + opt.cno;
112
+ if (opt.tuiid) {
113
+ url += "?infrom=" + opt.tuiid;
114
+ }
115
+ window.open(url);
116
+ }
117
+ };
118
+ const shareBtn = function(data) {
119
+ var shareDate = {
120
+ targetUrl: data.url || "",
121
+ title: data.title || "",
122
+ description: data.desc || "",
123
+ imgUrl: data.imgsrc || ""
124
+ };
125
+ if (isAndroid()) {
126
+ window.AndroidJs.appShareBtnShow(JSON.stringify(shareDate));
127
+ } else if (isIOS()) {
128
+ window.webkit.messageHandlers.appShareBtnShow.postMessage(shareDate);
129
+ }
130
+ };
131
+ const share = function(data) {
132
+ var shareDate = {
133
+ targetUrl: data.url || "",
134
+ title: data.title || "",
135
+ description: data.desc || "",
136
+ imgUrl: data.imgsrc || ""
137
+ };
138
+ if (isAndroid()) {
139
+ window.AndroidJs.appShare(JSON.stringify(shareDate));
140
+ } else if (isIOS()) {
141
+ window.webkit.messageHandlers.appShare.postMessage(shareDate);
142
+ } else {
143
+ msg("请在app中分享");
144
+ }
145
+ };
146
+ const shareV2 = function(data) {
147
+ var shareDate = {
148
+ targetUrl: data.url || "",
149
+ title: data.title || "",
150
+ description: data.desc || "",
151
+ imgUrl: data.imgsrc || ""
152
+ };
153
+ if (isAndroid()) {
154
+ window.AndroidJs.appShareV2(JSON.stringify(shareDate));
155
+ } else if (isIOS()) {
156
+ window.webkit.messageHandlers.appShareV2.postMessage(shareDate);
157
+ } else {
158
+ msg("请在app中分享");
159
+ }
160
+ };
161
+ const appEmptyClick = function() {
162
+ if (isAndroid()) {
163
+ return;
164
+ } else if (isIOS()) {
165
+ window.webkit.messageHandlers.appEmptyClick.postMessage(null);
166
+ }
167
+ };
168
+ const appInviteShare = function(url) {
169
+ if (isAndroid()) {
170
+ window.AndroidJs.appInviteShare(url);
171
+ } else if (isIOS()) {
172
+ window.webkit.messageHandlers.appInviteShare.postMessage(url);
173
+ }
174
+ };
175
+ const openWxSappPay = function(amount) {
176
+ if (isAndroid()) {
177
+ msg("安卓端暂无小程序唤起功能!");
178
+ } else if (isIOS()) {
179
+ window.webkit.messageHandlers.appWxMiniChongZhi.postMessage(String(amount));
180
+ }
181
+ };
182
+ const sendGift = function(data) {
183
+ if (isAndroid()) {
184
+ window.AndroidJs.handLuckSendGift(JSON.stringify(data));
185
+ } else if (isIOS()) {
186
+ window.webkit.messageHandlers.handLuckSendGift.postMessage(data);
187
+ } else if (parent.jw) {
188
+ parent.jw.Comm.sendGift.send(data);
189
+ }
190
+ };
191
+ const copy = function(text) {
192
+ if (isAndroid()) {
193
+ window.AndroidJs.appClipData(text);
194
+ return false;
195
+ } else if (isIOS()) {
196
+ window.webkit.messageHandlers.appClipData.postMessage(text);
197
+ return false;
198
+ } else {
199
+ return navigator.clipboard.writeText(text);
200
+ }
201
+ };
202
+ const setTitle = function(title) {
203
+ document.title = title;
204
+ try {
205
+ if (isAndroid()) {
206
+ window.AndroidJs.appSetTitle(title);
207
+ } else if (isIOS()) {
208
+ window.webkit.messageHandlers.appSetTitle.postMessage(title);
209
+ }
210
+ } catch (e) {
211
+ console.error(e);
212
+ }
213
+ };
214
+ const closeFrame = function(boxname) {
215
+ if (isAndroid()) {
216
+ window.AndroidJs.appGoBack();
217
+ } else if (isIOS()) {
218
+ window.webkit.messageHandlers.appGoBack.postMessage(null);
219
+ } else if (parent.closeFrame) {
220
+ parent.closeFrame(boxname);
221
+ } else if (parent.hidepanelPop) {
222
+ parent.hidepanelPop(boxname);
223
+ }
224
+ };
225
+ const appGoBack = function() {
226
+ if (isAndroid()) {
227
+ window.AndroidJs.appGoBack();
228
+ } else if (isIOS()) {
229
+ window.webkit.messageHandlers.appGoBack.postMessage(null);
230
+ } else {
231
+ history.back();
232
+ }
233
+ };
234
+ const goUserHome = function(useridx) {
235
+ if (isAndroid()) {
236
+ window.AndroidJs.userHomePage(String(useridx));
237
+ } else if (isIOS()) {
238
+ window.webkit.messageHandlers.userHomePage.postMessage(String(useridx));
239
+ } else {
240
+ console.warn("web端暂时没有接受goUserHome此消息!");
241
+ }
242
+ };
243
+ const appGoDressUpCenter = function() {
244
+ if (isAndroid()) {
245
+ window.AndroidJs.appGoDressUpCenter();
246
+ } else if (isIOS()) {
247
+ window.webkit.messageHandlers.appGoDressUpCenter.postMessage(null);
248
+ } else {
249
+ console.warn("web端暂时没有接受appGoDressUpCenter此消息!");
250
+ }
251
+ };
252
+ const appGoPay = function() {
253
+ if (isAndroid()) {
254
+ window.AndroidJs.appGoPay();
255
+ } else if (isIOS()) {
256
+ window.webkit.messageHandlers.appGoPay.postMessage(null);
257
+ } else {
258
+ console.warn("web端暂时没有接受appGoPay此消息!");
259
+ }
260
+ };
261
+ const goAppPage = async function(key) {
262
+ var config = await impui.get("config");
263
+ if (isAndroid()) {
264
+ window.AndroidJs.goAppPage(String(config.config.openAPP.Android[key]));
265
+ } else if (isIOS()) {
266
+ window.webkit.messageHandlers.goAppPage.postMessage(String(config.config.openAPP.IOS[key]));
267
+ } else {
268
+ console.warn("web端暂时不需要定义goAppPage的方法跳转!");
269
+ }
270
+ };
271
+ const playMP4 = function(url, options) {
272
+ if (isObject(url)) {
273
+ options = url;
274
+ url = options.url;
275
+ }
276
+ options = options || {};
277
+ options.url = url;
278
+ if (isAndroid()) {
279
+ window.AndroidJs.appPlayMP4(JSON.stringify(options));
280
+ } else if (isIOS()) {
281
+ window.webkit.messageHandlers.appPlayMP4.postMessage(options);
282
+ } else {
283
+ console.warn("pc端不支持playMP4方法!");
284
+ }
285
+ };
286
+ const appNotify = function(notifyName, data) {
287
+ data = data || {};
288
+ data.notifyName = notifyName;
289
+ if (isAndroid()) {
290
+ window.AndroidJs.appNotify(JSON.stringify(data));
291
+ } else if (isIOS()) {
292
+ window.webkit.messageHandlers.appNotify.postMessage(data);
293
+ } else {
294
+ console.warn("web端暂时没有接受此消息!notifyName:" + notifyName + ", data:", data);
295
+ }
296
+ };
297
+ export {
298
+ GoWebView,
299
+ appEmptyClick,
300
+ appGoBack,
301
+ appGoDressUpCenter,
302
+ appGoPay,
303
+ appGoRoom,
304
+ appGoRoomV2,
305
+ appGoToLiveRoom,
306
+ appInviteShare,
307
+ appNotify,
308
+ closeFrame,
309
+ copy,
310
+ getUrl,
311
+ goAppPage,
312
+ goUserHome,
313
+ holdLink,
314
+ msg,
315
+ openWxSappPay,
316
+ playMP4,
317
+ sendGift,
318
+ setTitle,
319
+ share,
320
+ shareBtn,
321
+ shareV2,
322
+ sliderRes,
323
+ windowOpen
324
+ };
package/dist/index.es.js CHANGED
@@ -1 +1,49 @@
1
- import{urltool as e,date as t,extend as n,getAndWaitCache as r,loadjs as o,getLog as i,bufferToBase64 as s,base64ToBuffer as a,type as c,message as l,isBoolean as u,cache as h,injectCSS as f,isString as d,isObject as g,isArray as m}from"@impui/com";import*as p from"@impui/com/layer";import{event as y}from"@impui/com/event";import{urltool as w}from"@impui/com/url";import{getLog as b}from"@impui/com/log";import{cache as _}from"@impui/com/cache";import{extend as v}from"@impui/com/core";import{iframeReq as S,get as E}from"@impui/com/req";const O=e.getDomainJson(),L={allsr:"https://impsr.5see.com",debugDomain:"zjyx1.com",isLocalhost:!1,localConfig:null};let x=null;const R={allconfig:"/npm/allconfig.min.js",apiurl:"/npm/apiurl.min.js"},P=t.getTimestamp(),T={config:P,bubble:P,dress:P,gift:P,template:P},k=()=>{if(x)return x;x=L,"undefined"!=typeof __impconfig__&&(x=n(!0,{},L,__impconfig__));for(const e in R)x[e]=x.allsr+R[e];return x};"localhost"===O.main&&(O.main=k().debugDomain,O.mainhost=k().debugDomain,O.port="",O.name=O.mainhost.split(".")[0],O.protocol="https:");const C=()=>n(!0,{},T,window.codever),U=async()=>{if(window.allconfig)return window.allconfig.domainsitetype;return(await r("config_allconfig",async()=>(await o(k().allconfig),window.allconfig))).domainsitetype},A=async()=>{const e=(await U())["localhost"===O.main?k().debugDomain:O.main];return e||{}},j=async()=>await r("config_simplify",async()=>{const e=await B("config_simplify");await o(e);const t=window.sconfig;return delete window.sconfig,t}),N=async()=>await r("config_full",async()=>{console.log("getConfig");const e=await B("config");await o(e);const t=k();let r=window.config;return delete window.config,r.npm=r.allsr+"/npm/",t.isLocalhost&&t.localConfig&&(r=n(!0,{},r,t.localConfig)),r}),B=async e=>{const t=await A();var n=t.res||"sr",r=t.resHost||O.mainhost;return`${O.protocol+"//"+n+"."+r}/live/webSkins_site/${t.sitetype}/config/${e}.js`},I=async()=>await r("config_apiurl",async()=>await o(k().apiurl,{extend:n,config:await N()}));(()=>{const e=globalThis,t=()=>{const e=new Error("not implemented");return e.code="ENOSYS",e};if(!e.fs){let n="";e.fs={constants:{O_WRONLY:-1,O_RDWR:-1,O_CREAT:-1,O_TRUNC:-1,O_APPEND:-1,O_EXCL:-1},writeSync(e,t){n+=r.decode(t);const o=n.lastIndexOf("\n");return-1!=o&&(console.log(n.substr(0,o)),n=n.substr(o+1)),t.length},write(e,n,r,o,i,s){if(0!==r||o!==n.length||null!==i)return void s(t());s(null,this.writeSync(e,n))},chmod(e,n,r){r(t())},chown(e,n,r,o){o(t())},close(e,n){n(t())},fchmod(e,n,r){r(t())},fchown(e,n,r,o){o(t())},fstat(e,n){n(t())},fsync(e,t){t(null)},ftruncate(e,n,r){r(t())},lchown(e,n,r,o){o(t())},link(e,n,r){r(t())},lstat(e,n){n(t())},mkdir(e,n,r){r(t())},open(e,n,r,o){o(t())},read(e,n,r,o,i,s){s(t())},readdir(e,n){n(t())},readlink(e,n){n(t())},rename(e,n,r){r(t())},rmdir(e,n){n(t())},stat(e,n){n(t())},symlink(e,n,r){r(t())},truncate(e,n,r){r(t())},unlink(e,n){n(t())},utimes(e,n,r,o){o(t())}}}if(e.process||(e.process={getuid:()=>-1,getgid:()=>-1,geteuid:()=>-1,getegid:()=>-1,getgroups(){throw t()},pid:-1,ppid:-1,umask(){throw t()},cwd(){throw t()},chdir(){throw t()}}),!e.crypto){const t=require("node:crypto");e.crypto={getRandomValues(e){t.randomFillSync(e)}}}e.performance||(e.performance={now(){const[e,t]=process.hrtime();return 1e3*e+t/1e6}}),e.TextEncoder||(e.TextEncoder=require("node:util").TextEncoder),e.TextDecoder||(e.TextDecoder=require("node:util").TextDecoder);const n=new TextEncoder("utf-8"),r=new TextDecoder("utf-8");let o=new DataView(new ArrayBuffer(8));var i=[];const s={};e.Go=class{constructor(){this._callbackTimeouts=/* @__PURE__ */new Map,this._nextCallbackTimeoutID=1;const e=()=>new DataView(this._inst.exports.memory.buffer),t=e=>{o.setBigInt64(0,e,!0);const t=o.getFloat64(0,!0);if(0===t)return;if(!isNaN(t))return t;const n=0xffffffffn&e;return this._values[n]},a=n=>{let r=e().getBigUint64(n,!0);return t(r)},c=e=>{const t=0x7FF80000n;if("number"==typeof e)return isNaN(e)?t<<32n:0===e?t<<32n|1n:(o.setFloat64(0,e,!0),o.getBigInt64(0,!0));switch(e){case void 0:return 0n;case null:return t<<32n|2n;case!0:return t<<32n|3n;case!1:return t<<32n|4n}let n=this._ids.get(e);void 0===n&&(n=this._idPool.pop(),void 0===n&&(n=BigInt(this._values.length)),this._values[n]=e,this._goRefCounts[n]=0,this._ids.set(e,n)),this._goRefCounts[n]++;let r=1n;switch(typeof e){case"string":r=2n;break;case"symbol":r=3n;break;case"function":r=4n}return n|(t|r)<<32n},l=(t,n)=>{let r=c(n);e().setBigUint64(t,r,!0)},u=(e,t,n)=>new Uint8Array(this._inst.exports.memory.buffer,e,t),h=(e,t,n)=>{const r=new Array(t);for(let o=0;o<t;o++)r[o]=a(e+8*o);return r},f=(e,t)=>r.decode(new DataView(this._inst.exports.memory.buffer,e,t)),d=Date.now()-performance.now();this.importObject={wasi_snapshot_preview1:{fd_write:function(t,n,o,s){let a=0;if(1==t)for(let c=0;c<o;c++){let t=n+8*c,o=e().getUint32(t+0,!0),s=e().getUint32(t+4,!0);a+=s;for(let n=0;n<s;n++){let t=e().getUint8(o+n);if(13==t);else if(10==t){let e=r.decode(new Uint8Array(i));i=[],console.log(e)}else i.push(t)}}else console.error("invalid file descriptor:",t);return e().setUint32(s,a,!0),0},fd_close:()=>0,fd_fdstat_get:()=>0,fd_seek:()=>0,proc_exit:e=>{throw this.exited=!0,this.exitCode=e,this._resolveExitPromise(),s},random_get:(e,t)=>(crypto.getRandomValues(u(e,t)),0)},gojs:{"runtime.ticks":()=>BigInt(1e6*(d+performance.now())),"runtime.sleepTicks":e=>{setTimeout(()=>{if(!this.exited)try{this._inst.exports.go_scheduler()}catch(e){if(e!==s)throw e}},Number(e)/1e6)},"syscall/js.finalizeRef":e=>{const t=0xffffffffn&e;if(void 0!==this._goRefCounts?.[t]){if(this._goRefCounts[t]--,0===this._goRefCounts[t]){const e=this._values[t];this._values[t]=null,this._ids.delete(e),this._idPool.push(t)}}else console.error("syscall/js.finalizeRef: unknown id",t)},"syscall/js.stringVal":(e,t)=>{const n=f(e>>>=0,t);return c(n)},"syscall/js.valueGet":(e,n,r)=>{let o=f(n,r),i=t(e),s=Reflect.get(i,o);return c(s)},"syscall/js.valueSet":(e,n,r,o)=>{const i=t(e),s=f(n,r),a=t(o);Reflect.set(i,s,a)},"syscall/js.valueDelete":(e,n,r)=>{const o=t(e),i=f(n,r);Reflect.deleteProperty(o,i)},"syscall/js.valueIndex":(e,n)=>c(Reflect.get(t(e),n)),"syscall/js.valueSetIndex":(e,n,r)=>{Reflect.set(t(e),n,t(r))},"syscall/js.valueCall":(n,r,o,i,s,a,c)=>{const u=t(r),d=f(o,i),g=h(s,a);try{const t=Reflect.get(u,d);l(n,Reflect.apply(t,u,g)),e().setUint8(n+8,1)}catch(m){l(n,m),e().setUint8(n+8,0)}},"syscall/js.valueInvoke":(n,r,o,i,s)=>{try{const s=t(r),a=h(o,i);l(n,Reflect.apply(s,void 0,a)),e().setUint8(n+8,1)}catch(a){l(n,a),e().setUint8(n+8,0)}},"syscall/js.valueNew":(n,r,o,i,s)=>{const a=t(r),c=h(o,i);try{l(n,Reflect.construct(a,c)),e().setUint8(n+8,1)}catch(u){l(n,u),e().setUint8(n+8,0)}},"syscall/js.valueLength":e=>t(e).length,"syscall/js.valuePrepareString":(r,o)=>{const i=String(t(o)),s=n.encode(i);l(r,s),e().setInt32(r+8,s.length,!0)},"syscall/js.valueLoadString":(e,n,r,o)=>{const i=t(e);u(n,r).set(i)},"syscall/js.valueInstanceOf":(e,n)=>t(e)instanceof t(n),"syscall/js.copyBytesToGo":(n,r,o,i,s)=>{let a=n,c=n+4;const l=u(r,o),h=t(s);if(!(h instanceof Uint8Array||h instanceof Uint8ClampedArray))return void e().setUint8(c,0);const f=h.subarray(0,l.length);l.set(f),e().setUint32(a,f.length,!0),e().setUint8(c,1)},"syscall/js.copyBytesToJS":(n,r,o,i,s)=>{let a=n,c=n+4;const l=t(r),h=u(o,i);if(!(l instanceof Uint8Array||l instanceof Uint8ClampedArray))return void e().setUint8(c,0);const f=h.subarray(0,l.length);l.set(f),e().setUint32(a,f.length,!0),e().setUint8(c,1)}}},this.importObject.env=this.importObject.gojs}async run(t){if(this._inst=t,this._values=[NaN,0,null,!0,!1,e,this],this._goRefCounts=[],this._ids=/* @__PURE__ */new Map,this._idPool=[],this.exited=!1,this.exitCode=0,this._inst.exports._start){let e=new Promise((e,t)=>{this._resolveExitPromise=e});try{this._inst.exports._start()}catch(n){if(n!==s)throw n}return await e,this.exitCode}this._inst.exports._initialize()}_resume(){if(this.exited)throw new Error("Go program has already exited");try{this._inst.exports.resume()}catch(e){if(e!==s)throw e}this.exited&&this._resolveExitPromise()}_makeFuncWrapper(e){const t=this;return function(){const n={id:e,this:this,args:arguments};return t._pendingEvent=n,t._resume(),n.result}}}})();const D=Go,F={},M=(await N()).allsr+"/plug/gotool/lib/imptool.wasm",q=await i(),z=async function(){return console.warn("⚠️ 降级方案已启用"),{encrypt:function(){throw new Error("❌ 降级方案未实现:encrypt方法")},parseRes:async function(e,t){try{if("true"!==e.headers["res-encrypt"])return e;const t={data:e.data},n=await I(),r=await axios.post(n.parseRes,{res:encodeURIComponent(JSON.stringify(t)),config:null});return e.data=JSON.parse(r.data),e}catch(n){console.error("❌ 降级方案请求接口失败:",n)}},parseServer:function(){throw new Error("❌ 降级方案未实现:parseServer方法")}}};const W=new class{constructor(e){this.isbase=e===M,this.url=e}async#e(){if(!this.url){const e=await N();this.url=e.allsr+"plug/gotool/lib/imptool.wasm"}return this.url}async#t(e,t){return async function(e,t,n=!1){try{const o=new D;q("=== WASM加载调试开始 ==="),q("URL:",e),q("UserAgent:",navigator.userAgent);const i=await r(e,async()=>{const n=await fetch(e+t);q("✅ 响应状态:",n.status);const r=await n.arrayBuffer();return q("✅ ArrayBuffer大小:",r.byteLength,"bytes"),s(r,{type:"application/wasm"})}),c=await a(i),l=new Uint8Array(c.slice(0,4));q("🔍 WASM文件头:",Array.from(l)),q("🔍 Go importObject结构:",Object.keys(o.importObject)),o.importObject.go&&q("🔍 GoJS导入键:",Object.keys(o.importObject.go)),q("🚀 开始WebAssembly.instantiate...");const u=await WebAssembly.instantiate(c,o.importObject);if(q("✅ WebAssembly实例化成功"),q("🚀 开始go.run..."),o.run(u.instance),q("✅ go.run执行完成"),window.goCrypto){const e=window.goCrypto;return delete window.goCrypto,q("✅ goCrypto加载成功"),e}if(n)return await z();throw console.warn("❌ window.goCrypto未定义,进入诊断模式"),await loadGoWasmWithDiagnosis(e),new Error("❌ window.goCrypto未定义")}catch(o){throw console.error("💥 完整错误堆栈:",o),console.error("错误名称:",o.name),console.error("错误信息:",o.message),o}}(e=e||await this.#e(),t,this.isbase)}async getRunTimes(e=!1){const t=await this.#e();if(!e&&F[t])return F[t];const n=C(),r=n.config?"?d="+n.config:"",o=await this.#t(t,r),i={};if(o)for(let s in o)i[s]=o[s];return F[t]=i,i}async init(){return this.getRunTimes()}async run(e,t){const n=await this.getRunTimes();return n[e]||console.error(`[${e}] 方法不在默认wasm中!`),n[e].apply(null,t)}}(M);function $(e,t){return function(){return e.apply(t,arguments)}}const{toString:G}=Object.prototype,{getPrototypeOf:H}=Object,{iterator:K,toStringTag:J}=Symbol,V=/* @__PURE__ */(e=>t=>{const n=G.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(/* @__PURE__ */Object.create(null)),X=e=>(e=e.toLowerCase(),t=>V(t)===e),Z=e=>t=>typeof t===e,{isArray:Q}=Array,Y=Z("undefined");function ee(e){return null!==e&&!Y(e)&&null!==e.constructor&&!Y(e.constructor)&&re(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const te=X("ArrayBuffer");const ne=Z("string"),re=Z("function"),oe=Z("number"),ie=e=>null!==e&&"object"==typeof e,se=e=>{if("object"!==V(e))return!1;const t=H(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||J in e||K in e)},ae=X("Date"),ce=X("File"),le=X("Blob"),ue=X("FileList"),he=X("URLSearchParams"),[fe,de,ge,me]=["ReadableStream","Request","Response","Headers"].map(X);function pe(e,t,{allOwnKeys:n=!1}={}){if(null==e)return;let r,o;if("object"!=typeof e&&(e=[e]),Q(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{if(ee(e))return;const o=n?Object.getOwnPropertyNames(e):Object.keys(e),i=o.length;let s;for(r=0;r<i;r++)s=o[r],t.call(null,e[s],s,e)}}function ye(e,t){if(ee(e))return null;t=t.toLowerCase();const n=Object.keys(e);let r,o=n.length;for(;o-- >0;)if(r=n[o],t===r.toLowerCase())return r;return null}const we="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,be=e=>!Y(e)&&e!==we;const _e=/* @__PURE__ */(e=>t=>e&&t instanceof e)("undefined"!=typeof Uint8Array&&H(Uint8Array)),ve=X("HTMLFormElement"),Se=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Ee=X("RegExp"),Oe=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};pe(n,(n,o)=>{let i;!1!==(i=t(n,o,e))&&(r[o]=i||n)}),Object.defineProperties(e,r)};const Le=X("AsyncFunction"),xe=(Re="function"==typeof setImmediate,Pe=re(we.postMessage),Re?setImmediate:Pe?(Te=`axios@${Math.random()}`,ke=[],we.addEventListener("message",({source:e,data:t})=>{e===we&&t===Te&&ke.length&&ke.shift()()},!1),e=>{ke.push(e),we.postMessage(Te,"*")}):e=>setTimeout(e));var Re,Pe,Te,ke;const Ce="undefined"!=typeof queueMicrotask?queueMicrotask.bind(we):"undefined"!=typeof process&&process.nextTick||xe,Ue={isArray:Q,isArrayBuffer:te,isBuffer:ee,isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||re(e.append)&&("formdata"===(t=V(e))||"object"===t&&re(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&te(e.buffer),t},isString:ne,isNumber:oe,isBoolean:e=>!0===e||!1===e,isObject:ie,isPlainObject:se,isEmptyObject:e=>{if(!ie(e)||ee(e))return!1;try{return 0===Object.keys(e).length&&Object.getPrototypeOf(e)===Object.prototype}catch(t){return!1}},isReadableStream:fe,isRequest:de,isResponse:ge,isHeaders:me,isUndefined:Y,isDate:ae,isFile:ce,isBlob:le,isRegExp:Ee,isFunction:re,isStream:e=>ie(e)&&re(e.pipe),isURLSearchParams:he,isTypedArray:_e,isFileList:ue,forEach:pe,merge:function e(){const{caseless:t,skipUndefined:n}=be(this)&&this||{},r={},o=(o,i)=>{const s=t&&ye(r,i)||i;se(r[s])&&se(o)?r[s]=e(r[s],o):se(o)?r[s]=e({},o):Q(o)?r[s]=o.slice():n&&Y(o)||(r[s]=o)};for(let i=0,s=arguments.length;i<s;i++)arguments[i]&&pe(arguments[i],o);return r},extend:(e,t,n,{allOwnKeys:r}={})=>(pe(t,(t,r)=>{n&&re(t)?e[r]=$(t,n):e[r]=t},{allOwnKeys:r}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:(e,t,n,r)=>{let o,i,s;const a={};if(t=t||{},null==e)return t;do{for(o=Object.getOwnPropertyNames(e),i=o.length;i-- >0;)s=o[i],r&&!r(s,e,t)||a[s]||(t[s]=e[s],a[s]=!0);e=!1!==n&&H(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:V,kindOfTest:X,endsWith:(e,t,n)=>{e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return-1!==r&&r===n},toArray:e=>{if(!e)return null;if(Q(e))return e;let t=e.length;if(!oe(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},forEachEntry:(e,t)=>{const n=(e&&e[K]).call(e);let r;for(;(r=n.next())&&!r.done;){const n=r.value;t.call(e,n[0],n[1])}},matchAll:(e,t)=>{let n;const r=[];for(;null!==(n=e.exec(t));)r.push(n);return r},isHTMLForm:ve,hasOwnProperty:Se,hasOwnProp:Se,reduceDescriptors:Oe,freezeMethods:e=>{Oe(e,(t,n)=>{if(re(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const r=e[n];re(r)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))})},toObjectSet:(e,t)=>{const n={},r=e=>{e.forEach(e=>{n[e]=!0})};return Q(e)?r(e):r(String(e).split(t)),n},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,n){return t.toUpperCase()+n}),noop:()=>{},toFiniteNumber:(e,t)=>null!=e&&Number.isFinite(e=+e)?e:t,findKey:ye,global:we,isContextDefined:be,isSpecCompliantForm:function(e){return!!(e&&re(e.append)&&"FormData"===e[J]&&e[K])},toJSONObject:e=>{const t=new Array(10),n=(e,r)=>{if(ie(e)){if(t.indexOf(e)>=0)return;if(ee(e))return e;if(!("toJSON"in e)){t[r]=e;const o=Q(e)?[]:{};return pe(e,(e,t)=>{const i=n(e,r+1);!Y(i)&&(o[t]=i)}),t[r]=void 0,o}}return e};return n(e,0)},isAsyncFn:Le,isThenable:e=>e&&(ie(e)||re(e))&&re(e.then)&&re(e.catch),setImmediate:xe,asap:Ce,isIterable:e=>null!=e&&re(e[K])};function Ae(e,t,n,r,o){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),o&&(this.response=o,this.status=o.status?o.status:null)}Ue.inherits(Ae,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:Ue.toJSONObject(this.config),code:this.code,status:this.status}}});const je=Ae.prototype,Ne={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{Ne[e]={value:e}}),Object.defineProperties(Ae,Ne),Object.defineProperty(je,"isAxiosError",{value:!0}),Ae.from=(e,t,n,r,o,i)=>{const s=Object.create(je);Ue.toFlatObject(e,s,function(e){return e!==Error.prototype},e=>"isAxiosError"!==e);const a=e&&e.message?e.message:"Error",c=null==t&&e?e.code:t;return Ae.call(s,a,c,n,r,o),e&&null==s.cause&&Object.defineProperty(s,"cause",{value:e,configurable:!0}),s.name=e&&e.name||"Error",i&&Object.assign(s,i),s};function Be(e){return Ue.isPlainObject(e)||Ue.isArray(e)}function Ie(e){return Ue.endsWith(e,"[]")?e.slice(0,-2):e}function De(e,t,n){return e?e.concat(t).map(function(e,t){return e=Ie(e),!n&&t?"["+e+"]":e}).join(n?".":""):t}const Fe=Ue.toFlatObject(Ue,{},null,function(e){return/^is[A-Z]/.test(e)});function Me(e,t,n){if(!Ue.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const r=(n=Ue.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(e,t){return!Ue.isUndefined(t[e])})).metaTokens,o=n.visitor||l,i=n.dots,s=n.indexes,a=(n.Blob||"undefined"!=typeof Blob&&Blob)&&Ue.isSpecCompliantForm(t);if(!Ue.isFunction(o))throw new TypeError("visitor must be a function");function c(e){if(null===e)return"";if(Ue.isDate(e))return e.toISOString();if(Ue.isBoolean(e))return e.toString();if(!a&&Ue.isBlob(e))throw new Ae("Blob is not supported. Use a Buffer instead.");return Ue.isArrayBuffer(e)||Ue.isTypedArray(e)?a&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function l(e,n,o){let a=e;if(e&&!o&&"object"==typeof e)if(Ue.endsWith(n,"{}"))n=r?n:n.slice(0,-2),e=JSON.stringify(e);else if(Ue.isArray(e)&&function(e){return Ue.isArray(e)&&!e.some(Be)}(e)||(Ue.isFileList(e)||Ue.endsWith(n,"[]"))&&(a=Ue.toArray(e)))return n=Ie(n),a.forEach(function(e,r){!Ue.isUndefined(e)&&null!==e&&t.append(!0===s?De([n],r,i):null===s?n:n+"[]",c(e))}),!1;return!!Be(e)||(t.append(De(o,n,i),c(e)),!1)}const u=[],h=Object.assign(Fe,{defaultVisitor:l,convertValue:c,isVisitable:Be});if(!Ue.isObject(e))throw new TypeError("data must be an object");return function e(n,r){if(!Ue.isUndefined(n)){if(-1!==u.indexOf(n))throw Error("Circular reference detected in "+r.join("."));u.push(n),Ue.forEach(n,function(n,i){!0===(!(Ue.isUndefined(n)||null===n)&&o.call(t,n,Ue.isString(i)?i.trim():i,r,h))&&e(n,r?r.concat(i):[i])}),u.pop()}}(e),t}function qe(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(e){return t[e]})}function ze(e,t){this._pairs=[],e&&Me(e,this,t)}const We=ze.prototype;function $e(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Ge(e,t,n){if(!t)return e;const r=n&&n.encode||$e;Ue.isFunction(n)&&(n={serialize:n});const o=n&&n.serialize;let i;if(i=o?o(t,n):Ue.isURLSearchParams(t)?t.toString():new ze(t,n).toString(r),i){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+i}return e}We.append=function(e,t){this._pairs.push([e,t])},We.toString=function(e){const t=e?function(t){return e.call(this,t,qe)}:qe;return this._pairs.map(function(e){return t(e[0])+"="+t(e[1])},"").join("&")};class He{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){Ue.forEach(this.handlers,function(t){null!==t&&e(t)})}}const Ke={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Je={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:ze,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]},Ve="undefined"!=typeof window&&"undefined"!=typeof document,Xe="object"==typeof navigator&&navigator||void 0,Ze=Ve&&(!Xe||["ReactNative","NativeScript","NS"].indexOf(Xe.product)<0),Qe="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,Ye=Ve&&window.location.href||"http://localhost",et={.../* @__PURE__ */Object.freeze(/* @__PURE__ */Object.defineProperty({__proto__:null,hasBrowserEnv:Ve,hasStandardBrowserEnv:Ze,hasStandardBrowserWebWorkerEnv:Qe,navigator:Xe,origin:Ye},Symbol.toStringTag,{value:"Module"})),...Je};function tt(e){function t(e,n,r,o){let i=e[o++];if("__proto__"===i)return!0;const s=Number.isFinite(+i),a=o>=e.length;if(i=!i&&Ue.isArray(r)?r.length:i,a)return Ue.hasOwnProp(r,i)?r[i]=[r[i],n]:r[i]=n,!s;r[i]&&Ue.isObject(r[i])||(r[i]=[]);return t(e,n,r[i],o)&&Ue.isArray(r[i])&&(r[i]=function(e){const t={},n=Object.keys(e);let r;const o=n.length;let i;for(r=0;r<o;r++)i=n[r],t[i]=e[i];return t}(r[i])),!s}if(Ue.isFormData(e)&&Ue.isFunction(e.entries)){const n={};return Ue.forEachEntry(e,(e,r)=>{t(function(e){return Ue.matchAll(/\w+|\[(\w*)]/g,e).map(e=>"[]"===e[0]?"":e[1]||e[0])}(e),r,n,0)}),n}return null}const nt={transitional:Ke,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const n=t.getContentType()||"",r=n.indexOf("application/json")>-1,o=Ue.isObject(e);o&&Ue.isHTMLForm(e)&&(e=new FormData(e));if(Ue.isFormData(e))return r?JSON.stringify(tt(e)):e;if(Ue.isArrayBuffer(e)||Ue.isBuffer(e)||Ue.isStream(e)||Ue.isFile(e)||Ue.isBlob(e)||Ue.isReadableStream(e))return e;if(Ue.isArrayBufferView(e))return e.buffer;if(Ue.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let i;if(o){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return Me(e,new et.classes.URLSearchParams,{visitor:function(e,t,n,r){return et.isNode&&Ue.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)},...t})}(e,this.formSerializer).toString();if((i=Ue.isFileList(e))||n.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return Me(i?{"files[]":e}:e,t&&new t,this.formSerializer)}}return o||r?(t.setContentType("application/json",!1),function(e,t,n){if(Ue.isString(e))try{return(t||JSON.parse)(e),Ue.trim(e)}catch(r){if("SyntaxError"!==r.name)throw r}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||nt.transitional,n=t&&t.forcedJSONParsing,r="json"===this.responseType;if(Ue.isResponse(e)||Ue.isReadableStream(e))return e;if(e&&Ue.isString(e)&&(n&&!this.responseType||r)){const n=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(e,this.parseReviver)}catch(o){if(n){if("SyntaxError"===o.name)throw Ae.from(o,Ae.ERR_BAD_RESPONSE,this,null,this.response);throw o}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:et.classes.FormData,Blob:et.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Ue.forEach(["delete","get","head","post","put","patch"],e=>{nt.headers[e]={}});const rt=Ue.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),ot=Symbol("internals");function it(e){return e&&String(e).trim().toLowerCase()}function st(e){return!1===e||null==e?e:Ue.isArray(e)?e.map(st):String(e)}function at(e,t,n,r,o){return Ue.isFunction(r)?r.call(this,t,n):(o&&(t=n),Ue.isString(t)?Ue.isString(r)?-1!==t.indexOf(r):Ue.isRegExp(r)?r.test(t):void 0:void 0)}let ct=class{constructor(e){e&&this.set(e)}set(e,t,n){const r=this;function o(e,t,n){const o=it(t);if(!o)throw new Error("header name must be a non-empty string");const i=Ue.findKey(r,o);(!i||void 0===r[i]||!0===n||void 0===n&&!1!==r[i])&&(r[i||t]=st(e))}const i=(e,t)=>Ue.forEach(e,(e,n)=>o(e,n,t));if(Ue.isPlainObject(e)||e instanceof this.constructor)i(e,t);else if(Ue.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))i((e=>{const t={};let n,r,o;return e&&e.split("\n").forEach(function(e){o=e.indexOf(":"),n=e.substring(0,o).trim().toLowerCase(),r=e.substring(o+1).trim(),!n||t[n]&&rt[n]||("set-cookie"===n?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t})(e),t);else if(Ue.isObject(e)&&Ue.isIterable(e)){let n,r,o={};for(const t of e){if(!Ue.isArray(t))throw TypeError("Object iterator must return a key-value pair");o[r=t[0]]=(n=o[r])?Ue.isArray(n)?[...n,t[1]]:[n,t[1]]:t[1]}i(o,t)}else null!=e&&o(t,e,n);return this}get(e,t){if(e=it(e)){const n=Ue.findKey(this,e);if(n){const e=this[n];if(!t)return e;if(!0===t)return function(e){const t=/* @__PURE__ */Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}(e);if(Ue.isFunction(t))return t.call(this,e,n);if(Ue.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=it(e)){const n=Ue.findKey(this,e);return!(!n||void 0===this[n]||t&&!at(0,this[n],n,t))}return!1}delete(e,t){const n=this;let r=!1;function o(e){if(e=it(e)){const o=Ue.findKey(n,e);!o||t&&!at(0,n[o],o,t)||(delete n[o],r=!0)}}return Ue.isArray(e)?e.forEach(o):o(e),r}clear(e){const t=Object.keys(this);let n=t.length,r=!1;for(;n--;){const o=t[n];e&&!at(0,this[o],o,e,!0)||(delete this[o],r=!0)}return r}normalize(e){const t=this,n={};return Ue.forEach(this,(r,o)=>{const i=Ue.findKey(n,o);if(i)return t[i]=st(r),void delete t[o];const s=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,n)=>t.toUpperCase()+n)}(o):String(o).trim();s!==o&&delete t[o],t[s]=st(r),n[s]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=/* @__PURE__ */Object.create(null);return Ue.forEach(this,(n,r)=>{null!=n&&!1!==n&&(t[r]=e&&Ue.isArray(n)?n.join(", "):n)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+": "+t).join("\n")}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const n=new this(e);return t.forEach(e=>n.set(e)),n}static accessor(e){const t=(this[ot]=this[ot]={accessors:{}}).accessors,n=this.prototype;function r(e){const r=it(e);t[r]||(!function(e,t){const n=Ue.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(e,n,o){return this[r].call(this,t,e,n,o)},configurable:!0})})}(n,e),t[r]=!0)}return Ue.isArray(e)?e.forEach(r):r(e),this}};function lt(e,t){const n=this||nt,r=t||n,o=ct.from(r.headers);let i=r.data;return Ue.forEach(e,function(e){i=e.call(n,i,o.normalize(),t?t.status:void 0)}),o.normalize(),i}function ut(e){return!(!e||!e.__CANCEL__)}function ht(e,t,n){Ae.call(this,null==e?"canceled":e,Ae.ERR_CANCELED,t,n),this.name="CanceledError"}function ft(e,t,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(new Ae("Request failed with status code "+n.status,[Ae.ERR_BAD_REQUEST,Ae.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}ct.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),Ue.reduceDescriptors(ct.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}}),Ue.freezeMethods(ct),Ue.inherits(ht,Ae,{__CANCEL__:!0});const dt=(e,t,n=3)=>{let r=0;const o=function(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o,i=0,s=0;return t=void 0!==t?t:1e3,function(a){const c=Date.now(),l=r[s];o||(o=c),n[i]=a,r[i]=c;let u=s,h=0;for(;u!==i;)h+=n[u++],u%=e;if(i=(i+1)%e,i===s&&(s=(s+1)%e),c-o<t)return;const f=l&&c-l;return f?Math.round(1e3*h/f):void 0}}(50,250);return function(e,t){let n,r,o=0,i=1e3/t;const s=(t,i=Date.now())=>{o=i,n=null,r&&(clearTimeout(r),r=null),e(...t)};return[(...e)=>{const t=Date.now(),a=t-o;a>=i?s(e,t):(n=e,r||(r=setTimeout(()=>{r=null,s(n)},i-a)))},()=>n&&s(n)]}(n=>{const i=n.loaded,s=n.lengthComputable?n.total:void 0,a=i-r,c=o(a);r=i;e({loaded:i,total:s,progress:s?i/s:void 0,bytes:a,rate:c||void 0,estimated:c&&s&&i<=s?(s-i)/c:void 0,event:n,lengthComputable:null!=s,[t?"download":"upload"]:!0})},n)},gt=(e,t)=>{const n=null!=e;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},mt=e=>(...t)=>Ue.asap(()=>e(...t)),pt=et.hasStandardBrowserEnv?/* @__PURE__ */((e,t)=>n=>(n=new URL(n,et.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(et.origin),et.navigator&&/(msie|trident)/i.test(et.navigator.userAgent)):()=>!0,yt=et.hasStandardBrowserEnv?{write(e,t,n,r,o,i,s){if("undefined"==typeof document)return;const a=[`${e}=${encodeURIComponent(t)}`];Ue.isNumber(n)&&a.push(`expires=${new Date(n).toUTCString()}`),Ue.isString(r)&&a.push(`path=${r}`),Ue.isString(o)&&a.push(`domain=${o}`),!0===i&&a.push("secure"),Ue.isString(s)&&a.push(`SameSite=${s}`),document.cookie=a.join("; ")},read(e){if("undefined"==typeof document)return null;const t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read:()=>null,remove(){}};function wt(e,t,n){let r=!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t);return e&&(r||0==n)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const bt=e=>e instanceof ct?{...e}:e;function _t(e,t){t=t||{};const n={};function r(e,t,n,r){return Ue.isPlainObject(e)&&Ue.isPlainObject(t)?Ue.merge.call({caseless:r},e,t):Ue.isPlainObject(t)?Ue.merge({},t):Ue.isArray(t)?t.slice():t}function o(e,t,n,o){return Ue.isUndefined(t)?Ue.isUndefined(e)?void 0:r(void 0,e,0,o):r(e,t,0,o)}function i(e,t){if(!Ue.isUndefined(t))return r(void 0,t)}function s(e,t){return Ue.isUndefined(t)?Ue.isUndefined(e)?void 0:r(void 0,e):r(void 0,t)}function a(n,o,i){return i in t?r(n,o):i in e?r(void 0,n):void 0}const c={url:i,method:i,data:i,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a,headers:(e,t,n)=>o(bt(e),bt(t),0,!0)};return Ue.forEach(Object.keys({...e,...t}),function(r){const i=c[r]||o,s=i(e[r],t[r],r);Ue.isUndefined(s)&&i!==a||(n[r]=s)}),n}const vt=e=>{const t=_t({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:o,xsrfCookieName:i,headers:s,auth:a}=t;if(t.headers=s=ct.from(s),t.url=Ge(wt(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),a&&s.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):""))),Ue.isFormData(n))if(et.hasStandardBrowserEnv||et.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if(Ue.isFunction(n.getHeaders)){const e=n.getHeaders(),t=["content-type","content-length"];Object.entries(e).forEach(([e,n])=>{t.includes(e.toLowerCase())&&s.set(e,n)})}if(et.hasStandardBrowserEnv&&(r&&Ue.isFunction(r)&&(r=r(t)),r||!1!==r&&pt(t.url))){const e=o&&i&&yt.read(i);e&&s.set(o,e)}return t},St="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise(function(t,n){const r=vt(e);let o=r.data;const i=ct.from(r.headers).normalize();let s,a,c,l,u,{responseType:h,onUploadProgress:f,onDownloadProgress:d}=r;function g(){l&&l(),u&&u(),r.cancelToken&&r.cancelToken.unsubscribe(s),r.signal&&r.signal.removeEventListener("abort",s)}let m=new XMLHttpRequest;function p(){if(!m)return;const r=ct.from("getAllResponseHeaders"in m&&m.getAllResponseHeaders());ft(function(e){t(e),g()},function(e){n(e),g()},{data:h&&"text"!==h&&"json"!==h?m.response:m.responseText,status:m.status,statusText:m.statusText,headers:r,config:e,request:m}),m=null}m.open(r.method.toUpperCase(),r.url,!0),m.timeout=r.timeout,"onloadend"in m?m.onloadend=p:m.onreadystatechange=function(){m&&4===m.readyState&&(0!==m.status||m.responseURL&&0===m.responseURL.indexOf("file:"))&&setTimeout(p)},m.onabort=function(){m&&(n(new Ae("Request aborted",Ae.ECONNABORTED,e,m)),m=null)},m.onerror=function(t){const r=new Ae(t&&t.message?t.message:"Network Error",Ae.ERR_NETWORK,e,m);r.event=t||null,n(r),m=null},m.ontimeout=function(){let t=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const o=r.transitional||Ke;r.timeoutErrorMessage&&(t=r.timeoutErrorMessage),n(new Ae(t,o.clarifyTimeoutError?Ae.ETIMEDOUT:Ae.ECONNABORTED,e,m)),m=null},void 0===o&&i.setContentType(null),"setRequestHeader"in m&&Ue.forEach(i.toJSON(),function(e,t){m.setRequestHeader(t,e)}),Ue.isUndefined(r.withCredentials)||(m.withCredentials=!!r.withCredentials),h&&"json"!==h&&(m.responseType=r.responseType),d&&([c,u]=dt(d,!0),m.addEventListener("progress",c)),f&&m.upload&&([a,l]=dt(f),m.upload.addEventListener("progress",a),m.upload.addEventListener("loadend",l)),(r.cancelToken||r.signal)&&(s=t=>{m&&(n(!t||t.type?new ht(null,e,m):t),m.abort(),m=null)},r.cancelToken&&r.cancelToken.subscribe(s),r.signal&&(r.signal.aborted?s():r.signal.addEventListener("abort",s)));const y=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(r.url);y&&-1===et.protocols.indexOf(y)?n(new Ae("Unsupported protocol "+y+":",Ae.ERR_BAD_REQUEST,e)):m.send(o||null)})},Et=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let n,r=new AbortController;const o=function(e){if(!n){n=!0,s();const t=e instanceof Error?e:this.reason;r.abort(t instanceof Ae?t:new ht(t instanceof Error?t.message:t))}};let i=t&&setTimeout(()=>{i=null,o(new Ae(`timeout ${t} of ms exceeded`,Ae.ETIMEDOUT))},t);const s=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach(e=>{e.unsubscribe?e.unsubscribe(o):e.removeEventListener("abort",o)}),e=null)};e.forEach(e=>e.addEventListener("abort",o));const{signal:a}=r;return a.unsubscribe=()=>Ue.asap(s),a}},Ot=function*(e,t){let n=e.byteLength;if(n<t)return void(yield e);let r,o=0;for(;o<n;)r=o+t,yield e.slice(o,r),o=r},Lt=async function*(e){if(e[Symbol.asyncIterator])return void(yield*e);const t=e.getReader();try{for(;;){const{done:e,value:n}=await t.read();if(e)break;yield n}}finally{await t.cancel()}},xt=(e,t,n,r)=>{const o=async function*(e,t){for await(const n of Lt(e))yield*Ot(n,t)}(e,t);let i,s=0,a=e=>{i||(i=!0,r&&r(e))};return new ReadableStream({async pull(e){try{const{done:t,value:r}=await o.next();if(t)return a(),void e.close();let i=r.byteLength;if(n){let e=s+=i;n(e)}e.enqueue(new Uint8Array(r))}catch(t){throw a(t),t}},cancel:e=>(a(e),o.return())},{highWaterMark:2})},{isFunction:Rt}=Ue,Pt=(({Request:e,Response:t})=>({Request:e,Response:t}))(Ue.global),{ReadableStream:Tt,TextEncoder:kt}=Ue.global,Ct=(e,...t)=>{try{return!!e(...t)}catch(n){return!1}},Ut=e=>{e=Ue.merge.call({skipUndefined:!0},Pt,e);const{fetch:t,Request:n,Response:r}=e,o=t?Rt(t):"function"==typeof fetch,i=Rt(n),s=Rt(r);if(!o)return!1;const a=o&&Rt(Tt),c=o&&("function"==typeof kt?/* @__PURE__ */(e=>t=>e.encode(t))(new kt):async e=>new Uint8Array(await new n(e).arrayBuffer())),l=i&&a&&Ct(()=>{let e=!1;const t=new n(et.origin,{body:new Tt,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),u=s&&a&&Ct(()=>Ue.isReadableStream(new r("").body)),h={stream:u&&(e=>e.body)};o&&["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!h[e]&&(h[e]=(t,n)=>{let r=t&&t[e];if(r)return r.call(t);throw new Ae(`Response type '${e}' is not supported`,Ae.ERR_NOT_SUPPORT,n)})});const f=async(e,t)=>{const r=Ue.toFiniteNumber(e.getContentLength());return null==r?(async e=>{if(null==e)return 0;if(Ue.isBlob(e))return e.size;if(Ue.isSpecCompliantForm(e)){const t=new n(et.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return Ue.isArrayBufferView(e)||Ue.isArrayBuffer(e)?e.byteLength:(Ue.isURLSearchParams(e)&&(e+=""),Ue.isString(e)?(await c(e)).byteLength:void 0)})(t):r};return async e=>{let{url:o,method:s,data:a,signal:c,cancelToken:d,timeout:g,onDownloadProgress:m,onUploadProgress:p,responseType:y,headers:w,withCredentials:b="same-origin",fetchOptions:_}=vt(e),v=t||fetch;y=y?(y+"").toLowerCase():"text";let S=Et([c,d&&d.toAbortSignal()],g),E=null;const O=S&&S.unsubscribe&&(()=>{S.unsubscribe()});let L;try{if(p&&l&&"get"!==s&&"head"!==s&&0!==(L=await f(w,a))){let e,t=new n(o,{method:"POST",body:a,duplex:"half"});if(Ue.isFormData(a)&&(e=t.headers.get("content-type"))&&w.setContentType(e),t.body){const[e,n]=gt(L,dt(mt(p)));a=xt(t.body,65536,e,n)}}Ue.isString(b)||(b=b?"include":"omit");const t=i&&"credentials"in n.prototype,c={..._,signal:S,method:s.toUpperCase(),headers:w.normalize().toJSON(),body:a,duplex:"half",credentials:t?b:void 0};E=i&&new n(o,c);let d=await(i?v(E,_):v(o,c));const g=u&&("stream"===y||"response"===y);if(u&&(m||g&&O)){const e={};["status","statusText","headers"].forEach(t=>{e[t]=d[t]});const t=Ue.toFiniteNumber(d.headers.get("content-length")),[n,o]=m&&gt(t,dt(mt(m),!0))||[];d=new r(xt(d.body,65536,n,()=>{o&&o(),O&&O()}),e)}y=y||"text";let x=await h[Ue.findKey(h,y)||"text"](d,e);return!g&&O&&O(),await new Promise((t,n)=>{ft(t,n,{data:x,headers:ct.from(d.headers),status:d.status,statusText:d.statusText,config:e,request:E})})}catch(x){if(O&&O(),x&&"TypeError"===x.name&&/Load failed|fetch/i.test(x.message))throw Object.assign(new Ae("Network Error",Ae.ERR_NETWORK,e,E),{cause:x.cause||x});throw Ae.from(x,x&&x.code,e,E)}}},At=/* @__PURE__ */new Map,jt=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:o}=t,i=[r,o,n];let s,a,c=i.length,l=At;for(;c--;)s=i[c],a=l.get(s),void 0===a&&l.set(s,a=c?/* @__PURE__ */new Map:Ut(t)),l=a;return a};jt();const Nt={http:null,xhr:St,fetch:{get:jt}};Ue.forEach(Nt,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(n){}Object.defineProperty(e,"adapterName",{value:t})}});const Bt=e=>`- ${e}`,It=e=>Ue.isFunction(e)||null===e||!1===e;const Dt={getAdapter:function(e,t){e=Ue.isArray(e)?e:[e];const{length:n}=e;let r,o;const i={};for(let s=0;s<n;s++){let n;if(r=e[s],o=r,!It(r)&&(o=Nt[(n=String(r)).toLowerCase()],void 0===o))throw new Ae(`Unknown adapter '${n}'`);if(o&&(Ue.isFunction(o)||(o=o.get(t))))break;i[n||"#"+s]=o}if(!o){const e=Object.entries(i).map(([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build"));throw new Ae("There is no suitable adapter to dispatch the request "+(n?e.length>1?"since :\n"+e.map(Bt).join("\n"):" "+Bt(e[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return o},adapters:Nt};function Ft(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new ht(null,e)}function Mt(e){Ft(e),e.headers=ct.from(e.headers),e.data=lt.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);return Dt.getAdapter(e.adapter||nt.adapter,e)(e).then(function(t){return Ft(e),t.data=lt.call(e,e.transformResponse,t),t.headers=ct.from(t.headers),t},function(t){return ut(t)||(Ft(e),t&&t.response&&(t.response.data=lt.call(e,e.transformResponse,t.response),t.response.headers=ct.from(t.response.headers))),Promise.reject(t)})}const qt="1.13.2",zt={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{zt[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const Wt={};zt.transitional=function(e,t,n){function r(e,t){return"[Axios v"+qt+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return(n,o,i)=>{if(!1===e)throw new Ae(r(o," has been removed"+(t?" in "+t:"")),Ae.ERR_DEPRECATED);return t&&!Wt[o]&&(Wt[o]=!0,console.warn(r(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,o,i)}},zt.spelling=function(e){return(t,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};const $t={assertOptions:function(e,t,n){if("object"!=typeof e)throw new Ae("options must be an object",Ae.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const i=r[o],s=t[i];if(s){const t=e[i],n=void 0===t||s(t,i,e);if(!0!==n)throw new Ae("option "+i+" must be "+n,Ae.ERR_BAD_OPTION_VALUE);continue}if(!0!==n)throw new Ae("Unknown option "+i,Ae.ERR_BAD_OPTION)}},validators:zt},Gt=$t.validators;let Ht=class{constructor(e){this.defaults=e||{},this.interceptors={request:new He,response:new He}}async request(e,t){try{return await this._request(e,t)}catch(n){if(n instanceof Error){let e={};Error.captureStackTrace?Error.captureStackTrace(e):e=new Error;const t=e.stack?e.stack.replace(/^.+\n/,""):"";try{n.stack?t&&!String(n.stack).endsWith(t.replace(/^.+\n.+\n/,""))&&(n.stack+="\n"+t):n.stack=t}catch(r){}}throw n}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=_t(this.defaults,t);const{transitional:n,paramsSerializer:r,headers:o}=t;void 0!==n&&$t.assertOptions(n,{silentJSONParsing:Gt.transitional(Gt.boolean),forcedJSONParsing:Gt.transitional(Gt.boolean),clarifyTimeoutError:Gt.transitional(Gt.boolean)},!1),null!=r&&(Ue.isFunction(r)?t.paramsSerializer={serialize:r}:$t.assertOptions(r,{encode:Gt.function,serialize:Gt.function},!0)),void 0!==t.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),$t.assertOptions(t,{baseUrl:Gt.spelling("baseURL"),withXsrfToken:Gt.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let i=o&&Ue.merge(o.common,o[t.method]);o&&Ue.forEach(["delete","get","head","post","put","patch","common"],e=>{delete o[e]}),t.headers=ct.concat(i,o);const s=[];let a=!0;this.interceptors.request.forEach(function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(a=a&&e.synchronous,s.unshift(e.fulfilled,e.rejected))});const c=[];let l;this.interceptors.response.forEach(function(e){c.push(e.fulfilled,e.rejected)});let u,h=0;if(!a){const e=[Mt.bind(this),void 0];for(e.unshift(...s),e.push(...c),u=e.length,l=Promise.resolve(t);h<u;)l=l.then(e[h++],e[h++]);return l}u=s.length;let f=t;for(;h<u;){const e=s[h++],t=s[h++];try{f=e(f)}catch(d){t.call(this,d);break}}try{l=Mt.call(this,f)}catch(d){return Promise.reject(d)}for(h=0,u=c.length;h<u;)l=l.then(c[h++],c[h++]);return l}getUri(e){return Ge(wt((e=_t(this.defaults,e)).baseURL,e.url,e.allowAbsoluteUrls),e.params,e.paramsSerializer)}};Ue.forEach(["delete","get","head","options"],function(e){Ht.prototype[e]=function(t,n){return this.request(_t(n||{},{method:e,url:t,data:(n||{}).data}))}}),Ue.forEach(["post","put","patch"],function(e){function t(t){return function(n,r,o){return this.request(_t(o||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}Ht.prototype[e]=t(),Ht.prototype[e+"Form"]=t(!0)});const Kt={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Kt).forEach(([e,t])=>{Kt[t]=e});const Jt=function e(t){const n=new Ht(t),r=$(Ht.prototype.request,n);return Ue.extend(r,Ht.prototype,n,{allOwnKeys:!0}),Ue.extend(r,n,null,{allOwnKeys:!0}),r.create=function(n){return e(_t(t,n))},r}(nt);Jt.Axios=Ht,Jt.CanceledError=ht,Jt.CancelToken=class e{constructor(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise(function(e){t=e});const n=this;this.promise.then(e=>{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null}),this.promise.then=e=>{let t;const r=new Promise(e=>{n.subscribe(e),t=e}).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e(function(e,r,o){n.reason||(n.reason=new ht(e,r,o),t(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let t;return{token:new e(function(e){t=e}),cancel:t}}},Jt.isCancel=ut,Jt.VERSION=qt,Jt.toFormData=Me,Jt.AxiosError=Ae,Jt.Cancel=Jt.CanceledError,Jt.all=function(e){return Promise.all(e)},Jt.spread=function(e){return function(t){return e.apply(null,t)}},Jt.isAxiosError=function(e){return Ue.isObject(e)&&!0===e.isAxiosError},Jt.mergeConfig=_t,Jt.AxiosHeaders=ct,Jt.formToJSON=e=>tt(Ue.isHTMLForm(e)?new FormData(e):e),Jt.getAdapter=Dt.getAdapter,Jt.HttpStatusCode=Kt,Jt.default=Jt;const{Axios:Vt,AxiosError:Xt,CanceledError:Zt,isCancel:Qt,CancelToken:Yt,VERSION:en,all:tn,Cancel:nn,isAxiosError:rn,spread:on,toFormData:sn,AxiosHeaders:an,HttpStatusCode:cn,formToJSON:ln,getAdapter:un,mergeConfig:hn}=Jt,fn=w.getPar,dn=function(e,t){var n,r={v:"1.0.1",Device:0,SourceDevice:parseInt(fn("Device")||-1)};t&&(r._tui_source=((n=fn("_tui_source")||fn("from")||fn("source"))||(n=_.get("_tui_source")),n));var o=window.pdata||window.axiosData||window.reqData||{};return e=v(!0,r,o,e)},gn=function(e,t,n){return n=dn(n,t),e=w.addPars(n,e)},mn=await b(),pn="imp_sign",yn="imp_useridx";w.getPar("useridx");var wn={error:0,success:1,ServerSignError:2,jumpTo:100,window:101,alert:150,msg:160,noMoney:170,noRealName:234,nologin:666};Jt.codeEnum=wn,Jt.defaults.baseURL="",Jt.defaults.withCredentials=!0,Jt.defaults.crossDomain=!0,Jt.defaults.dataType="json",Jt.saveLogin=function(e,t){mn.debug("写入sign:",t),_.set(pn,t),e&&_.set(yn,e)},Jt.interceptors.request.use(async function(e){mn.debug("请求拦截",e),function(e,t,n){var r;"post"===e.method?(e.data=e.data||{},r=e.data):(e.params=e.params||{},r=e.params),n&&(r[t]=n)}(e,"_tui_source",w.getPar("_tui_source")||w.getPar("from")||w.getPar("source")),gn(e.url),"post"===e.method&&(e.data=w.jsonto(e.data).substring(1));const t=await En.getLogin(null,!0);return t&&(e.headers[pn]=t.sign,e.headers[yn]=_.get(yn)),e},function(e){return Promise.reject(e)}),Jt.interceptors.response.use(async function(e){if(e.data&&"true"==e.headers["res-encrypt"]){const t=await Promise.all([W.init(),N()]),n=t[0],r=await n.parseRes(e,t[1]);null==r&&window.debug&&console.warn("响应数据解析异常",r),e=r||e}if(c.isString(e.data)){const t=new Error("接口:"+e.config.url+"返回了纯字符串数据:"+e.data);return Promise.reject(t)}switch(mn.debug("响应拦截 -> "+e.config.url+"\n",e),e.data.__source=e,(e=e.data).codeEnum=wn,e.isSuccess=function(t){return e.code!==wn.success&&(t||p.msg(e.msg)),e.code===wn.success},e.code){case wn.success:return Promise.resolve(e);case wn.jumpTo:return void(location.href=e.data);case wn.window:return!1!==Promise.resolve(e)&&window.open(e.data),Promise.reject(e);case wn.alert:case wn.msg:return p.msg(e.msg),Promise.reject(e);case wn.noRealName:return impall.showReal_name();case wn.ServerSignError:case wn.nologin:if(e.__source.config.isTwice)return En.runNoLogin&&En.runNoLogin(e),Promise.resolve(e);const t=function(){return mn.debug("检测到未登录返回,发起验证登录之后,重新再请求一遍"),e.__source.config.isTwice=!0,e.__source.config.data=w.toData(e.__source.config.data),Jt(e.__source.config)};return await y.runM("login","checkLogin"),t()}return Promise.resolve(e)},function(e){return Promise.reject(e)});var bn=Jt.get;Jt.get=function(e,t,n){return(n=n||{}).params=t,bn(e,n)};const _n=await N(),vn=await i();class Sn{constructor(){this.loginDomain=window.loginDomain="localhost"===location.hostname&&k().isLocalhost?"https://localhost:44360":_n.domainLogin,this.ver="v1.0.0",this.loginTime=21600,this.prefix="IMP_PLUG_LOGIN_",this.initUrls(),this.initKeys(),this.initEventKeys(),this.bindEvents(),this.iframeBox=null,this.iframe=null,this.iframeBg=null,this.autoLogin={},this.exitLogin={},this.threeLoginWin=null,this.checkTemp(),window.login=this}initUrls(){this.urls={login:gn(this.loginDomain+"/index.html",!0),reg:gn(this.loginDomain+"/index.html?type=reg",!0),loginPage:gn(this.loginDomain+"/loginPage.html",!0),regPage:gn(this.loginDomain+"/regPage.html",!0),autoLogin:gn(this.loginDomain+"/"+this.ver+"/user/autoLogin"),checkSSOLogin:gn(this.loginDomain+"/"+this.ver+"/user/checkSSOLogin"),checkLoginPage:gn(this.loginDomain+"/"+this.ver+"/user/checkLoginPage"),CheckLoginByCode:gn(this.loginDomain+"/"+this.ver+"/user/CheckLoginByCode"),exitLogin:this.loginDomain+"/"+this.ver+"/user/exitLogin",userInfo:this.loginDomain+"/"+this.ver+"/user/UserInfo",writeCookies:"/ashx/member/CheckSSOWriteCookie.ashx",webLoginOut:"/ajax/logout.aspx"}}initKeys(){const e=e=>this.prefix+e;this.keys={msg_loginReturn:e("loginReturn"),msg_close:e("close"),msg_goto:e("goto"),msg_autoSize:e("autoSize"),msg_getSize:e("getSize"),cache_loginSave:e("loginSave"),cache_userInfo:e("userInfo"),checkLogin_code:"code",loginStatus:"__login_status",loginResult:"__login_result",url_tempSignKey:"sign",url_tempUseridxKey:"useridx"}}initEventKeys(){const e=e=>this.prefix+e;this.eventKeys={nologin:e("login"),closeThreeLogin:e("close_login_three")}}bindEvents(){l.on(this.keys.msg_close,()=>{vn.debug("关闭登录框"),this.close()}),l.on(this.keys.msg_goto,e=>{this.handlePageTransition(e)}),l.on(this.keys.msg_autoSize,e=>{this.handleAutoSize(e)}),l.on(this.keys.msg_loginReturn,async e=>{await this.dealwithLoginRes(e)}),l.on(this.eventKeys.closeThreeLogin,e=>{this.save(e),this.closeThreeLoginWin()}),y.onM("login","getLogin",this.getLogin.bind(this)),y.onM("login","noLogin",this.runNoLogin.bind(this))}handlePageTransition(e){if(!this.iframe)return;this.iframe.classList.remove("IMP_PLUG_LOGIN_animateIn"),this.iframe.classList.add("IMP_PLUG_LOGIN_animateOut");const t=()=>{this.iframe.src=e.url,this.iframe.classList.remove("IMP_PLUG_LOGIN_animateOut"),this.iframe.removeEventListener("transitionend",t)};this.iframe.addEventListener("transitionend",t)}handleAutoSize(e){this.iframe&&(vn.debug("登录框尺寸适配",e),this.iframe.width=e.width,this.iframe.height=e.height,this.iframe.classList.add("IMP_PLUG_LOGIN_animateIn"),this.iframeBg.classList.add("IMP_PLUG_LOGIN_animateIn"))}runAutoLoginCallback(e,t){this.autoLogin.callbacks&&0!==this.autoLogin.callbacks.length&&(this.autoLogin.callbacks.forEach(t=>{if(u(e))t.ok&&t.ok(e);else{const n=this.getLogin(e);t.ok&&t.ok(n&&n.code===Jt.codeEnum.success)}}),this.autoLogin.iframe&&this.autoLogin.iframe.remove(),this.autoLogin.window&&this.autoLogin.window.close(),this.autoLogin={},e&&this.close())}async dealwithLoginRes(t){if(vn.debug("登录消息返回",t),t.isok=t.code===Jt.codeEnum.success,1!==t.code)return this.clear(),void this.runAutoLoginCallback(t);if(t.sign&&8===t.sign.length)this.save(t);else{e.delParsUpUrl([this.keys.url_tempSignKey,this.keys.url_tempUseridxKey]),h.set(this.keys.cache_loginSave,t,this.loginTime),Jt.saveLogin(t.useridx,t.sign);try{_n.domainmaster.startsWith(location.origin)&&await Jt.get(this.urls.writeCookies,null,null,"text")}finally{this.runAutoLoginCallback(t)}}}save(e){const t=e.__source?.headers?.[e.sign]||e.data?.headers?.[e.sign]||e.sign,n=e.useridx||e.data?.___useridx;l.send(this.keys.msg_loginReturn,{code:e.code,msg:e.msg,sign:t,useridx:n})}clear(){h.remove(this.keys.cache_loginSave),h.remove(this.keys.cache_userInfo),h.remove(this.keys.cache_userInfo+"_more"),h.remove(this.keys.cache_userInfo+"_simplify")}onLoginOK(e,t){this.autoLogin.callbacks||(this.autoLogin.callbacks=[]),this.autoLogin.callbacks.push({ok:e,no:t})}create(e){const t=n(!0,{url:"",name:"",option:null},e);this.createIframeBox(),this.createIframe(t),this.applyStyles(t.option||{}),this.appendToDocument()}createIframeBox(){this.iframeBox=document.createElement("div"),this.iframeBox.className="IMP_PLUG_LOGIN_box";const e=parseFloat(window.getComputedStyle(document.documentElement).zoom);e<1&&(this.iframeBox.style.zoom=(1/e).toFixed(2)),this.iframe=document.createElement("iframe"),this.iframeBg=document.createElement("div")}createIframe(e){this.iframe.id=this.iframe.name=e.name,this.iframe.src=e.url;const t=e.option||{};this.iframe.width=t.width||400,this.iframe.height=t.height||400,this.iframe.scrolling=t.scrolling||"no",this.iframe.marginWidth=t.marginWidth||"0",this.iframe.marginHeight=t.marginHeight||"0",this.iframe.frameBorder=t.frameBorder||"0"}applyStyles(e){Object.assign(this.iframe.style,{zIndex:3e3,position:"fixed",borderRadius:e.radius||"none",opacity:0}),Object.assign(this.iframeBg.style,{position:"fixed",backgroundColor:"#6f6f6f80",width:"100%",height:"100%",top:0,left:0,opacity:0}),this.applyPosition(e.offset||"center"),this.applyAnimation(e)}applyPosition(e){const t={center:{top:"50%",left:"50%",transform:"translate(-50%, -50%)"},top:{top:"5%",left:"50%",transform:"translateX(-50%)"},bottom:{bottom:"5%",left:"50%",transform:"translateX(-50%)"},lt:{top:"5%",left:"5%"},lb:{bottom:"5%",left:"5%"},rt:{top:"5%",right:"5%"},rb:{bottom:"5%",right:"5%"}},n=t[e]||t.center;Object.assign(this.iframe.style,n)}applyAnimation(e){const t=e.animTime||300;this.iframe.style.transition=`opacity ${t}ms`,this.iframeBg.style.transition=`opacity ${t}ms`,this.createAnimationStyles(e.anime||0)}createAnimationStyles(e){const t={0:".IMP_PLUG_LOGIN_animateIn{opacity:1 !important;} .IMP_PLUG_LOGIN_animateOut{opacity:0 !important;}"},n=t[e]||t[0],r=document.createElement("style");r.id="IMP_PLUG_LOGIN_animateCss";try{r.appendChild(document.createTextNode(n))}catch(o){r.styleSheet.cssText=n}document.head.appendChild(r)}appendToDocument(){this.iframeBox.append(this.iframe),this.iframeBox.append(this.iframeBg),document.body.append(this.iframeBox)}istop(){return parent===window}close(){if(!this.istop())return;const e=()=>{this.iframeBox&&(this.iframeBox.remove(),this.iframeBox=null),this.autoLogin.iframe&&this.autoLogin.iframe.remove();const e=document.getElementById("IMP_PLUG_LOGIN_animateCss");e&&e.remove()};this.iframeBg&&(this.iframeBg.classList.remove("IMP_PLUG_LOGIN_animateIn"),this.iframeBg.classList.add("IMP_PLUG_LOGIN_animateOut")),this.iframe?(this.iframe.classList.remove("IMP_PLUG_LOGIN_animateIn"),this.iframe.classList.add("IMP_PLUG_LOGIN_animateOut"),this.iframe.addEventListener("transitionend",e,{once:!0})):e()}autoSize(e,t){l.send(this.keys.msg_autoSize,{width:e||document.body.scrollWidth,height:t||document.body.scrollHeight})}open(e=!1){if(this.iframeBox)return Promise.resolve();const t=new Promise((e,t)=>{this.onLoginOK(e,t),this.istop()?this.create({url:this.urls.login,name:"signIn",option:{radius:"4px"}}):l.send(this.keys.msg_goto,{url:this.urls.login})});return e?t:t.then(()=>location.reload())}openPage(){const t=e.getPar("sourceurl")||location.href,n=e.addPar("sourceurl",unescape(t),this.urls.loginPage);location.href=n}openReg(e=!1){if(this.iframeBox)return Promise.resolve();const t=new Promise((e,t)=>{this.onLoginOK(e,t),this.istop()?this.create({url:this.urls.reg,name:"signIn",option:{radius:"4px"}}):l.send(this.keys.msg_goto,{url:this.urls.reg})});return e?t:t.then(()=>location.reload())}openRegPage(){const t=e.getPar("sourceurl")||location.href,n=e.addPar("sourceurl",unescape(t),this.urls.regPage);location.href=n}threeLogin(e,t){return new Promise((n,r)=>{this.closeThreeLoginWin(),this.onLoginOK(n,r);const o=gn(`/v1.0.0/user/OpenThreeLogin?type=${e}`,t);this.threeLoginWin=window.open(o)})}closeThreeLoginWin(){this.threeLoginWin&&(this.threeLoginWin.close(),this.threeLoginWin=null)}getWechatCode(){const t=e.getPar("__login_code");if(!t){const e=`${this.loginDomain}/v1.0.0/user/OpenThreeLogin?type=wechatcode&redirect_uri=${encodeURIComponent(location.href)}`;location.href=e}return t}getLogin(e,t=!1){const n=e||h.get(this.keys.cache_loginSave);return n?(t||delete n.sign,n):null}getUser(e,t=!1,n=!1){"function"!=typeof e&&(n=t,t=e,e=null);const r=new Promise((e,r)=>{const o=this.keys.cache_userInfo+"_"+(t?"more":"simplify");if(!n){const t=h.get(o);if(t)return void e(t)}Jt.get(this.urls.userInfo,{more:t?1:0}).then(t=>{1===t.code?(h.set(o,t.data,this.loginTime),e(t.data)):r(t)})});return e?r.then(e):r}islogin(){return!!this.getLogin()}async check(){return!(this.isTempCheck||!this.islogin())||this.checkZ()}checkZ(){return new Promise((t,n)=>{if(!this.autoLogin.iframe&&!this.autoLogin.window){let t=this.urls.autoLogin;t=e.addPars({sign:e.getPar(this.keys.url_tempSignKey),useridx:e.getPar(this.keys.url_tempUseridxKey)},t),this.autoLogin.iframe=this.getIframeUrl(t,this.keys.msg_loginReturn),this.autoLogin.callbacks=[]}this.autoLogin.callbacks.push({ok:t,no:()=>{t(!1)}})})}async checkTemp(){if(this.isTempCheck=e.getPar(this.keys.url_tempSignKey)&&e.getPar(this.keys.url_tempUseridxKey),this.isTempCheck)return this.checkZ()}checkPage(){return new Promise((t,n)=>{const r=e.getPar(this.keys.checkLogin_code),o=parseInt(e.getPar(this.keys.loginStatus)||-1);vn.debug("checkLogin_code:",r),0===o?(e.delParsUpUrl([this.keys.loginStatus]),n("用户未登录!")):o&&r?Jt.get(this.urls.CheckLoginByCode,{code:r}).then(r=>{1===r.code?(e.delParsUpUrl([this.keys.checkLogin_code,this.keys.loginStatus]),this.save(r.data),t(r)):n()}):Jt.get(this.urls.checkSSOLogin).then(n=>{if(1===n.code)this.getUser().then(t);else{let t=e.addPars({redirect_uri:encodeURIComponent(location.href)},this.urls.checkLoginPage);location.href=t}})})}res(t){const n=decodeURIComponent(e.getPar(this.keys.loginResult)||"");if(n){const r=JSON.parse(n);t?.(r),e.delParsUpUrl([this.keys.loginResult])}}exit(e=!1){return vn.debug("退出登录!"),this.exitLogin.Promise||(this.exitLogin.Promise=new Promise(e=>{S.get(this.urls.exitLogin).then(t=>{E(this.urls.webLoginOut,null,()=>{e(t)},"text"),this.clear(),this.exitLogin={}})}),e||(this.exitLogin.Promise=this.exitLogin.Promise.then(()=>{location.reload()}))),this.exitLogin.Promise}getIframeUrl(t,n){const r=document.createElement("iframe");Object.assign(r.style,{position:"absolute",width:"1px",height:"1px",top:"-100px"}),r.dataset.flag=9513,n&&(t=e.addPar("post_msg_name",n,t)),r.src=t;let o,i=!1;const s=()=>{r.removeEventListener("error",a),clearTimeout(o)},a=e=>{i||(i=!0,s(),r.remove(),this.runAutoLoginCallback(!1))};return r.addEventListener("load",e=>{i||(i=!0,s(),console.log("登录页面已打开"))},{once:!0}),r.addEventListener("error",a,{once:!0}),o=setTimeout(()=>{a()},1e4),document.body.append(r),r}onNoLogin(e){y?y.on(this.eventKeys.nologin,e):console.warn("事件模块event未加载,事件相关功能不可用!")}runNoLogin(e){return y?Promise.resolve(y.run(this.eventKeys.nologin,e)):(console.warn("事件模块event未加载,事件相关功能不可用!"),Promise.resolve())}writeXhr(e){if(!e)return console.warn("xhr不能为空!"),e;const t=this.getLogin(null,!0);return t&&(e.withCredentials=!0,e.setRequestHeader("imp_sign",t.sign),e.setRequestHeader("imp_useridx",t.useridx)),e}debug(...e){console&&console.debug&&console.debug(...e)}}const En=new Sn;f("\r\n\r\n\r\n/*粉丝团等级*/\r\n.fanclubgrage{background-repeat:no-repeat;background-size:100%;height:22px !important;aspect-ratio: 77 / 22;display:inline-block;color:#fff;text-indent:32px;line-height:23px !important;font-size: 12px;}\r\n\r\n\r\n","imp-restool");const On={};const Ln=new class{constructor(){this._config=null,this.initPromise=this.init()}async init(){return this._config||(this._config=await N()),this}async ensureConfig(){return this._config||await this.initPromise,this}get statics(){return this._config?{nohead:`${this._config.sr}/live/webSkins_site/${this._config.sitetype}/images/nohead.jpg`}:{nohead:""}}getSrc(e,t,n){if(!this._config)return"";let r=e;if(isNaN(parseInt(e))&&(r=this._config.paths.typeEnums[e]),d(e)&&["emblem","bubble","head","cardskin"].indexOf(e.toLowerCase())>=0&&(g(t)||m(t))&&0===(t=this.titlesTool.getTitlexIdFromType(t,e)))return"";if(4!==r&&0!=t&&!t)return"";r=parseInt(r);const o=this._config.paths.types[`t_${r}`],i=o.pc_path||o.path,s=o.pc_suffix||o.suffix;let a=this._config.js_version;if(n){a=impui.getCodeVer()[n]||this._config.js_version}return t||0===t?`${i}${t}${s}?d=${a}`:`${i}?d=${a}`}getEmotSrc(e,t,n=!1){return n?this.getSrc("emot",`${e}/${t}_s`):this.getSrc("emot",`${e}/${t}`)}getUserLevelSrc(e){return this.getSrc("user",e)}getAnchorLevelSrc(e){return this.getSrc("host",e)}getBubbleZipSrc(e){return this.getSrc("bubble_zip",e)}getFanclubLevelHtml(e,t){return`<span class="fanclubgrage" style="background-image:url(${this.getSrc("fans_grade",e)})">${t}</span>`}async getBubbleImageMap(e,t){const n=this.getBubbleZipSrc(e);return await this.getZipUrlMap(n,t)}getSrImgSrc(e){return e?e.startsWith("http")?e:`${this._config.sr}${e.startsWith("/")?e:"/"+e}`:""}async getZipUrlMap(e,t){await this.ensureConfig();const{jszip:n}=await impui.loadAsync(["jszip"]),r=new n;try{let n;if(On[e])n=On[e];else{const t=await fetch(e),o=await t.arrayBuffer();n=await r.loadAsync(o),On[e]=n}t=t||(()=>!0);const o={},i=[];n.forEach(async(e,n)=>{if(t(e,n)){const t=n.async("blob").then(t=>{const n=URL.createObjectURL(t);return{key:e,url:n}});i.push(t)}});return(await Promise.all(i)).forEach(e=>{o[e.key]=e.url}),o}catch(o){return console.error("获取压缩包失败:",o),null}}get titlesTool(){return{converTitlesex:e=>{if(!e)return{};if(g(e))return e;if(d(e))return JSON.parse(e);const t={};return m(e)&&e.forEach(e=>{t[e.titleid]=e}),t},getTitlesexFromType:(e,t)=>{const n=this.titlesTool.converTitlesex(e),r=[];for(const o in n){n[o].type===t&&r.push(parseInt(o))}return r},getTitlexIdFromType:(e,t)=>{const n=this.titlesTool.converTitlesex(e);let r=0,o=Number.MAX_VALUE;const i=t.toLowerCase();for(const s in n){const e=n[s];if(e.type.toLowerCase()===i){if("bubble"!==i)return parseInt(s);const t=parseInt(e.endtime);t<o&&(r=parseInt(s),o=t)}}return r},getHeadBorderSrc:e=>this.getSrc(7,e),getHeadBorderImg:e=>`<div class="border_img"><img src="${this.titlesTool.getHeadBorderSrc(e)}" /></div>`,getHeadBorder:(e,t)=>(e.addClass("headBorder"),e.append(this.titlesTool.getHeadBorderImg(t)),e)}}};export{Sn as Login,Jt as axios,U as getAllConfig,I as getApiurl,C as getCodeVer,N as getConfig,A as getDomainConfig,k as getEvnConfig,j as getSimplifyConfig,W as gotool,gn as handleUrl,En as login,Ln as restool};
1
+ import { getAllConfig, getApiurl, getCodeVer, getConfig, getDomainConfig, getEvnConfig, getSimplifyConfig } from "./config/index.es.js";
2
+ import { gotool } from "./gotool/index/index.es.js";
3
+ import { Login, default as default2 } from "./login/index.es.js";
4
+ import "./axios/index.es.js";
5
+ import { handleUrl } from "./core/index.es.js";
6
+ import { restool } from "./restool/index/index.es.js";
7
+ import { GoWebView, appEmptyClick, appGoBack, appGoDressUpCenter, appGoPay, appGoRoom, appGoRoomV2, appGoToLiveRoom, appInviteShare, appNotify, closeFrame, copy, getUrl, goAppPage, goUserHome, holdLink, msg, openWxSappPay, playMP4, sendGift, setTitle, share, shareBtn, shareV2, sliderRes, windowOpen } from "./imph5/index.es.js";
8
+ import { default as default3 } from "./node_modules/axios/lib/axios/index.es.js";
9
+ export {
10
+ GoWebView,
11
+ Login,
12
+ appEmptyClick,
13
+ appGoBack,
14
+ appGoDressUpCenter,
15
+ appGoPay,
16
+ appGoRoom,
17
+ appGoRoomV2,
18
+ appGoToLiveRoom,
19
+ appInviteShare,
20
+ appNotify,
21
+ default3 as axios,
22
+ closeFrame,
23
+ copy,
24
+ getAllConfig,
25
+ getApiurl,
26
+ getCodeVer,
27
+ getConfig,
28
+ getDomainConfig,
29
+ getEvnConfig,
30
+ getSimplifyConfig,
31
+ getUrl,
32
+ goAppPage,
33
+ goUserHome,
34
+ gotool,
35
+ handleUrl,
36
+ holdLink,
37
+ default2 as login,
38
+ msg,
39
+ openWxSappPay,
40
+ playMP4,
41
+ restool,
42
+ sendGift,
43
+ setTitle,
44
+ share,
45
+ shareBtn,
46
+ shareV2,
47
+ sliderRes,
48
+ windowOpen
49
+ };