@pnt-team/pnt-component-frontend 0.0.109 → 0.0.111

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.
@@ -37,8 +37,6 @@ __export(PntCosUploader_exports, {
37
37
  module.exports = __toCommonJS(PntCosUploader_exports);
38
38
  var import_cos = require("../../api/cos");
39
39
  var import_config = require("../../config");
40
- var import_cos_js_sdk_v5 = __toESM(require("cos-js-sdk-v5"));
41
- var import_crypto_js = __toESM(require("crypto-js"));
42
40
  var import_react = require("react");
43
41
  var import_uuid = require("uuid");
44
42
  var import_cos2 = require("../../api/cos");
@@ -50,8 +48,9 @@ var getFileExt = (filename) => {
50
48
  var _timestampCounter = 0;
51
49
  var generateTimestampName = () => `${Date.now().toString(36)}${(_timestampCounter++).toString(36)}`;
52
50
  var computeFileMd5 = async (file) => {
51
+ const { default: CryptoJS } = await Promise.resolve().then(() => __toESM(require("crypto-js")));
53
52
  const buffer = await file.arrayBuffer();
54
- return import_crypto_js.default.MD5(import_crypto_js.default.lib.WordArray.create(buffer)).toString();
53
+ return CryptoJS.MD5(CryptoJS.lib.WordArray.create(buffer)).toString();
55
54
  };
56
55
  var generateFileName = async (file, strategy) => {
57
56
  if (typeof strategy === "function") {
@@ -81,22 +80,25 @@ var resolveBasePath = (cred, pathKey) => {
81
80
  return "";
82
81
  };
83
82
  var stripHost = (key) => key.replace(/^https?:\/\/[^/]+/, "");
84
- var createCosClient = (cred) => new import_cos_js_sdk_v5.default({
85
- getAuthorization: (_, callback) => {
86
- callback({
87
- TmpSecretId: cred.secretId,
88
- TmpSecretKey: cred.secretKey,
89
- SecurityToken: cred.sessionToken,
90
- StartTime: cred.startTime,
91
- ExpiredTime: cred.expiredTime
92
- });
93
- },
94
- Protocol: "https:",
95
- FileParallelLimit: 3,
96
- ChunkParallelLimit: 3,
97
- ChunkSize: 1024 * 1024,
98
- ProgressInterval: 1
99
- });
83
+ var createCosClient = async (cred) => {
84
+ const { default: COS } = await Promise.resolve().then(() => __toESM(require("cos-js-sdk-v5")));
85
+ return new COS({
86
+ getAuthorization: (_, callback) => {
87
+ callback({
88
+ TmpSecretId: cred.secretId,
89
+ TmpSecretKey: cred.secretKey,
90
+ SecurityToken: cred.sessionToken,
91
+ StartTime: cred.startTime,
92
+ ExpiredTime: cred.expiredTime
93
+ });
94
+ },
95
+ Protocol: "https:",
96
+ FileParallelLimit: 3,
97
+ ChunkParallelLimit: 3,
98
+ ChunkSize: 1024 * 1024,
99
+ ProgressInterval: 1
100
+ });
101
+ };
100
102
  var createPntCosUploader = (http, options) => {
101
103
  const getOptions = () => typeof options === "function" ? options() : options;
102
104
  const upload = async (file, onProgress, overrides) => {
@@ -127,7 +129,7 @@ var createPntCosUploader = (http, options) => {
127
129
  const basePath = resolveBasePath(cred, mergedPathKey);
128
130
  const fileName = await generateFileName(file, fileNameStrategy);
129
131
  const cosKey = basePath ? `${basePath.replace(/\/$/, "")}/${fileName}` : fileName;
130
- const cos = createCosClient(cred);
132
+ const cos = await createCosClient(cred);
131
133
  return new Promise((resolve, reject) => {
132
134
  cos.putObject(
133
135
  {
@@ -170,7 +172,7 @@ var createPntCosUploader = (http, options) => {
170
172
  fileUrl: cosKey
171
173
  };
172
174
  const cred = getCredential ? await getCredential(http, credParams) : await (0, import_cos.fetchCosCredential)(http, credParams);
173
- const cos = createCosClient(cred);
175
+ const cos = await createCosClient(cred);
174
176
  return new Promise((resolve, reject) => {
175
177
  cos.getObjectUrl(
176
178
  {
@@ -2,9 +2,6 @@ export { PntProvider, usePntConfig, type PntConfig, type PntHttpLike, type PntHi
2
2
  export { default as PntImage } from './components/PntImage';
3
3
  export { default as PntBusinessSelect } from './components/PntBusinessSelect';
4
4
  export { default as PntSecureBox } from './components/PntSecureBox';
5
- export { default as PntUpload } from './components/PntUpload';
6
- export type { PntUploadErrorPhase, PntUploadProps, PntUploadTexts, } from './components/PntUpload';
7
- export { createPntCosUploader, normalizeSnakeCredential, default as usePntCosUploader, type CosScene, type FileNameStrategy, type GetCosCredentialParams, type NormalizeCredential, type NormalizedCosCredential, type PntCosRequestOverrides, type PntCosUploadOptions, type PntCosUploadResult, type PntCosUploader as PntCosUploaderInstance, } from './components/PntCosUploader';
8
5
  export { useHighSecurity } from './hooks/useHighSecurity';
9
6
  export type { ClearSecurityDataFilter, HighSecurityApiConfig, HighSecurityParamItem, HighSecurityRequestParams, HighSecurityScope, UseHighSecurityOptions, UseHighSecurityResult, } from './hooks/useHighSecurity';
10
7
  export { isSecurityData } from './utils';
package/lib/cjs/index.js CHANGED
@@ -34,21 +34,15 @@ __export(src_exports, {
34
34
  PntImage: () => import_PntImage.default,
35
35
  PntProvider: () => import_config.PntProvider,
36
36
  PntSecureBox: () => import_PntSecureBox.default,
37
- PntUpload: () => import_PntUpload.default,
38
- createPntCosUploader: () => import_PntCosUploader.createPntCosUploader,
39
37
  isSecurityData: () => import_utils.isSecurityData,
40
- normalizeSnakeCredential: () => import_PntCosUploader.normalizeSnakeCredential,
41
38
  useHighSecurity: () => import_useHighSecurity.useHighSecurity,
42
- usePntConfig: () => import_config.usePntConfig,
43
- usePntCosUploader: () => import_PntCosUploader.default
39
+ usePntConfig: () => import_config.usePntConfig
44
40
  });
45
41
  module.exports = __toCommonJS(src_exports);
46
42
  var import_config = require("./config");
47
43
  var import_PntImage = __toESM(require("./components/PntImage"));
48
44
  var import_PntBusinessSelect = __toESM(require("./components/PntBusinessSelect"));
49
45
  var import_PntSecureBox = __toESM(require("./components/PntSecureBox"));
50
- var import_PntUpload = __toESM(require("./components/PntUpload"));
51
- var import_PntCosUploader = __toESM(require("./components/PntCosUploader"));
52
46
  var import_useHighSecurity = require("./hooks/useHighSecurity");
53
47
  var import_utils = require("./utils");
54
48
  var import_PntGeneralLayout = __toESM(require("./components/PntGeneralLayout"));
@@ -59,11 +53,7 @@ var import_PntGeneralLayout = __toESM(require("./components/PntGeneralLayout"));
59
53
  PntImage,
60
54
  PntProvider,
61
55
  PntSecureBox,
62
- PntUpload,
63
- createPntCosUploader,
64
56
  isSecurityData,
65
- normalizeSnakeCredential,
66
57
  useHighSecurity,
67
- usePntConfig,
68
- usePntCosUploader
58
+ usePntConfig
69
59
  });
@@ -1,10 +1,11 @@
1
1
  import { fetchCosCredential } from "../../api/cos";
2
2
  import { usePntConfig } from "../../config";
3
- import COS from 'cos-js-sdk-v5';
4
- import CryptoJS from 'crypto-js';
5
3
  import { useMemo, useRef } from 'react';
6
4
  import { v4 as uuidV4 } from 'uuid';
7
5
 
6
+ // cos-js-sdk-v5 / crypto-js 改为运行时动态 import(见 createCosClient / computeFileMd5):
7
+ // 不用上传功能的项目无需安装这两个包,Vite/webpack 不会把动态 import 当作硬依赖解析
8
+
8
9
  // ==========================================
9
10
  // 类型定义
10
11
  // ==========================================
@@ -60,8 +61,12 @@ const generateTimestampName = () => `${Date.now().toString(36)}${(_timestampCoun
60
61
 
61
62
  /**
62
63
  * 计算文件内容 MD5(基于 crypto-js,与 pnt-tools CosApi 原策略一致)
64
+ * @description crypto-js 动态 import:仅 md5 文件名策略触发时加载
63
65
  */
64
66
  const computeFileMd5 = async file => {
67
+ const {
68
+ default: CryptoJS
69
+ } = await import('crypto-js');
65
70
  const buffer = await file.arrayBuffer();
66
71
  return CryptoJS.MD5(CryptoJS.lib.WordArray.create(buffer)).toString();
67
72
  };
@@ -111,23 +116,29 @@ const stripHost = key => key.replace(/^https?:\/\/[^/]+/, '');
111
116
 
112
117
  /**
113
118
  * 用归一化凭证构造 COS SDK 实例
119
+ * @description cos-js-sdk-v5 动态 import:仅实际上传/下载触发时加载
114
120
  */
115
- const createCosClient = cred => new COS({
116
- getAuthorization: (_, callback) => {
117
- callback({
118
- TmpSecretId: cred.secretId,
119
- TmpSecretKey: cred.secretKey,
120
- SecurityToken: cred.sessionToken,
121
- StartTime: cred.startTime,
122
- ExpiredTime: cred.expiredTime
123
- });
124
- },
125
- Protocol: 'https:',
126
- FileParallelLimit: 3,
127
- ChunkParallelLimit: 3,
128
- ChunkSize: 1024 * 1024,
129
- ProgressInterval: 1
130
- });
121
+ const createCosClient = async cred => {
122
+ const {
123
+ default: COS
124
+ } = await import('cos-js-sdk-v5');
125
+ return new COS({
126
+ getAuthorization: (_, callback) => {
127
+ callback({
128
+ TmpSecretId: cred.secretId,
129
+ TmpSecretKey: cred.secretKey,
130
+ SecurityToken: cred.sessionToken,
131
+ StartTime: cred.startTime,
132
+ ExpiredTime: cred.expiredTime
133
+ });
134
+ },
135
+ Protocol: 'https:',
136
+ FileParallelLimit: 3,
137
+ ChunkParallelLimit: 3,
138
+ ChunkSize: 1024 * 1024,
139
+ ProgressInterval: 1
140
+ });
141
+ };
131
142
 
132
143
  // ==========================================
133
144
  // createPntCosUploader 工厂(框架无关,可在非 React 上下文使用)
@@ -186,7 +197,7 @@ export const createPntCosUploader = (http, options) => {
186
197
  const cosKey = basePath ? `${basePath.replace(/\/$/, '')}/${fileName}` : fileName;
187
198
 
188
199
  // 3. putObject 上传
189
- const cos = createCosClient(cred);
200
+ const cos = await createCosClient(cred);
190
201
  return new Promise((resolve, reject) => {
191
202
  cos.putObject({
192
203
  Bucket: cred.bucket,
@@ -238,7 +249,7 @@ export const createPntCosUploader = (http, options) => {
238
249
  fileUrl: cosKey
239
250
  };
240
251
  const cred = getCredential ? await getCredential(http, credParams) : await fetchCosCredential(http, credParams);
241
- const cos = createCosClient(cred);
252
+ const cos = await createCosClient(cred);
242
253
  return new Promise((resolve, reject) => {
243
254
  cos.getObjectUrl({
244
255
  Bucket: cred.bucket,
@@ -2,9 +2,6 @@ export { PntProvider, usePntConfig, type PntConfig, type PntHttpLike, type PntHi
2
2
  export { default as PntImage } from './components/PntImage';
3
3
  export { default as PntBusinessSelect } from './components/PntBusinessSelect';
4
4
  export { default as PntSecureBox } from './components/PntSecureBox';
5
- export { default as PntUpload } from './components/PntUpload';
6
- export type { PntUploadErrorPhase, PntUploadProps, PntUploadTexts, } from './components/PntUpload';
7
- export { createPntCosUploader, normalizeSnakeCredential, default as usePntCosUploader, type CosScene, type FileNameStrategy, type GetCosCredentialParams, type NormalizeCredential, type NormalizedCosCredential, type PntCosRequestOverrides, type PntCosUploadOptions, type PntCosUploadResult, type PntCosUploader as PntCosUploaderInstance, } from './components/PntCosUploader';
8
5
  export { useHighSecurity } from './hooks/useHighSecurity';
9
6
  export type { ClearSecurityDataFilter, HighSecurityApiConfig, HighSecurityParamItem, HighSecurityRequestParams, HighSecurityScope, UseHighSecurityOptions, UseHighSecurityResult, } from './hooks/useHighSecurity';
10
7
  export { isSecurityData } from './utils';
package/lib/esm/index.js CHANGED
@@ -2,7 +2,7 @@
2
2
  // pnt-component-frontend 统一出口
3
3
  // 只保留业务语义组件:有视觉、有交互、有业务含义
4
4
  // 通用 hooks / 纯工具归各项目自己维护;
5
- // 但组件配套的"业务能力 hook"随组件一起导出(如 usePntCosUploader、useHighSecurity)
5
+ // 但组件配套的"业务能力 hook"随组件一起导出(如 useHighSecurity)
6
6
  // ==========================================
7
7
 
8
8
  // ---------- 配置 Provider(消费方根入口注入 http 实例) ----------
@@ -14,9 +14,11 @@ export { default as PntImage } from "./components/PntImage";
14
14
  // ---------- L2 业务复合组件 ----------
15
15
  export { default as PntBusinessSelect } from "./components/PntBusinessSelect";
16
16
  export { default as PntSecureBox } from "./components/PntSecureBox";
17
- export { default as PntUpload } from "./components/PntUpload";
18
- // ---------- 业务能力 hook(PntUpload 的另一半:COS 直传 service) ----------
19
- export { createPntCosUploader, normalizeSnakeCredential, default as usePntCosUploader } from "./components/PntCosUploader";
17
+
18
+ // PntUpload / usePntCosUploader(COS 直传)暂不导出(0.0.111 起):
19
+ // 其模块图依赖 cos-js-sdk-v5 / crypto-js,导出会要求所有消费方安装这两个包
20
+ // 或配置 stub/alias。当前无项目使用上传能力,源码与测试保留,待有真实需求时
21
+ // 拆独立子入口(如 '@pnt-team/pnt-component-frontend/upload')再对外提供。
20
22
 
21
23
  // ---------- 业务能力 hook(PntSecureBox 的另一半:高敏解锁,供"复制"等非展示场景使用) ----------
22
24
  export { useHighSecurity } from "./hooks/useHighSecurity";
@@ -1 +1 @@
1
- .pnt-image-wrapper{position:relative}.pnt-image-wrapper .pnt-image-progress,.pnt-image-wrapper .pnt-image-upload-progress{align-items:center;display:flex;height:8.5rem;justify-content:center;width:8.5rem}.pnt-image-wrapper .pnt-image-progress .pnt-image-loading,.pnt-image-wrapper .pnt-image-upload-progress .pnt-image-loading{align-items:center;background-color:#f7f8fa;border-radius:.25rem;display:flex;flex-direction:column;height:100%;justify-content:center;text-align:center;width:100%}.pnt-image-wrapper .pnt-image-progress .pnt-image-loading svg,.pnt-image-wrapper .pnt-image-upload-progress .pnt-image-loading svg{color:var(--td-brand-color);font-size:1.5rem}.pnt-image-wrapper .pnt-image-progress .pnt-image-loading p,.pnt-image-wrapper .pnt-image-upload-progress .pnt-image-loading p{color:#808191;font-size:.75rem;margin-top:.25rem}.pnt-image-wrapper .pnt-image{height:8.5rem;width:8.5rem}.pnt-image-wrapper .pnt-image .pnt-image-mask{align-items:center;background:rgba(0,0,0,.6);color:#fff;display:flex;height:100%;justify-content:center}.pnt-image-wrapper .pnt-image .pnt-image-mask--basic{cursor:pointer}.pnt-image-wrapper .pnt-image .pnt-image-mask .pnt-image-divider{border-left:.0625rem solid var(--td-text-color-anti);height:var(--td-comp-size-xxxs);margin:0 var(--td-comp-margin-l)}.pnt-business-select{width:100%}.pnt-business-select-option-label{display:block;width:100%}.pnt-business-select-popup .t-popup__content .t-loading,.pnt-business-select-popup .t-popup__content .total-wrapper{align-items:center;display:flex;font-weight:400;height:2.25rem;line-height:1.25rem;padding:0 .875rem}.pnt-business-select-popup .t-popup__content .total-wrapper{color:#808191;font-size:.875rem}.pnt-secure-box{color:#333;max-width:-moz-fit-content;max-width:fit-content;position:relative}.pnt-secure-box .copy-icon,.pnt-secure-box .view-icon{color:#3f8cff!important;cursor:pointer;font-size:small;position:absolute;right:-1.875rem;top:.0625rem}.pnt-secure-box .security-value{position:relative;top:.1875rem}.pnt-upload{display:inline-block}.pnt-upload .pnt-upload__trigger{cursor:pointer;display:inline-block}.pnt-upload .pnt-upload__error{color:#d54941;color:var(--td-error-color,#d54941);font-size:.75rem;line-height:1.25rem;margin:.25rem 0 0}.pnt-upload--disabled .pnt-upload__trigger{cursor:not-allowed}.pnt-upload .pnt-upload-file{background-color:#fff;background-color:var(--td-bg-color-container,#fff);border:.0625rem dashed #dcdcdc;border:.0625rem dashed var(--td-component-border,#dcdcdc);border-radius:.375rem;border-radius:var(--td-radius-default,6px);box-sizing:border-box;min-width:20rem;padding:.75rem 1rem;transition:border-color .2s}.pnt-upload .pnt-upload-file:hover{border-color:#165dff;border-color:var(--td-brand-color,#165dff)}.pnt-upload .pnt-upload-file__row{align-items:center;color:#1f2329;color:var(--td-text-color-primary,#1f2329);display:flex;font-size:.875rem;gap:.5rem;line-height:1.375rem}.pnt-upload .pnt-upload-file__row--empty{color:#6b7280;color:var(--td-text-color-secondary,#6b7280);justify-content:flex-start}.pnt-upload .pnt-upload-file__row--progress{align-items:center}.pnt-upload .pnt-upload-file__icon{color:#6b7280;color:var(--td-text-color-secondary,#6b7280);flex:none;font-size:1.25rem}.pnt-upload .pnt-upload-file__name{flex:1 1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.pnt-upload .pnt-upload-file__delete{color:#6b7280;color:var(--td-text-color-secondary,#6b7280);cursor:pointer;flex:none;font-size:1.125rem}.pnt-upload .pnt-upload-file__delete:hover{color:#d54941;color:var(--td-error-color,#d54941)}.pnt-upload .pnt-upload-file__progress{flex:1 1;min-width:0}.pnt-upload .pnt-upload-file__percent{color:#6b7280;color:var(--td-text-color-secondary,#6b7280);flex:none;font-size:.75rem}.pnt-upload--disabled .pnt-upload-file{background-color:#f3f3f3;background-color:var(--td-bg-color-component-disabled,#f3f3f3)}.pnt-upload--disabled .pnt-upload-file:hover{border-color:#dcdcdc;border-color:var(--td-component-border,#dcdcdc)}.pnt-general-layout{--pnt-layout-body-padding:1.5rem;--pnt-layout-card-radius:0.25rem;background-color:transparent;height:100%}.pnt-general-layout .t-layout__header{align-items:stretch;border-bottom:.0625rem solid #f0f3f6;display:flex;flex-shrink:0;height:auto;justify-content:space-between}.pnt-general-layout .t-layout__header .header-title{align-items:center;display:inline-flex;padding:1.5rem}.pnt-general-layout .t-layout__header .header-title .goback-icon{color:#3f8cff;cursor:pointer;margin-right:.75rem}.pnt-general-layout .t-layout__header .header-title .title{font-size:1.25rem;font-weight:600;line-height:1.5rem}.pnt-general-layout .t-layout__header .header-operation{align-items:center;display:flex;padding-right:1.5rem}.pnt-general-layout .t-layout__header .header-operation .t-button+.t-button{margin-left:.75rem}.pnt-general-layout--borderless .t-layout__header{border-bottom:none}.pnt-general-layout .general-layout-sub-header{border-bottom:.0625rem solid #f0f3f6;flex-shrink:0}.pnt-general-layout .general-layout-body{background:#fafafa;flex:1 1 auto;min-height:0;overflow-y:auto;padding:var(--pnt-layout-body-padding)}.pnt-general-layout .general-layout-body>div.t-card,.pnt-general-layout .general-layout-body>div.t-loading__parent>div.t-card,.pnt-general-layout .general-layout-body>div.tea-card,.pnt-general-layout .general-layout-body>div[class*=-block],.pnt-general-layout .general-layout-body>div[class*=-wrapper]{border-radius:var(--pnt-layout-card-radius);box-shadow:none;margin-bottom:1.5rem}.pnt-general-layout .general-layout-body>div.t-card .t-card__body,.pnt-general-layout .general-layout-body>div.t-loading__parent>div.t-card .t-card__body,.pnt-general-layout .general-layout-body>div.tea-card .t-card__body,.pnt-general-layout .general-layout-body>div[class*=-block] .t-card__body,.pnt-general-layout .general-layout-body>div[class*=-wrapper] .t-card__body{border-radius:var(--pnt-layout-card-radius)}.pnt-general-layout .general-layout-body>div.t-loading__parent>div:last-child.t-card,.pnt-general-layout .general-layout-body>div:last-child,.pnt-general-layout .general-layout-body>div:last-child.t-card,.pnt-general-layout .general-layout-body>div:last-child.tea-card,.pnt-general-layout .general-layout-body>div:last-child[class*=-block],.pnt-general-layout .general-layout-body>div:last-child[class*=-wrapper]{margin-bottom:0}.pnt-general-layout .t-layout__footer{background:#fff;border-top:.0625rem solid #f0f3f6;flex-shrink:0;padding:1.125rem 1.5rem}.pnt-general-layout .t-layout__footer .t-button{font-size:.875rem;font-weight:600;height:2.25rem;min-width:5.75rem}.pnt-general-layout .t-layout__footer .t-button+.t-button{margin-left:.75rem}.pnt-general-layout--footer-auto .t-layout__footer .t-button{font-size:inherit;font-weight:inherit;height:auto;min-width:0}
1
+ .pnt-image-wrapper{position:relative}.pnt-image-wrapper .pnt-image-progress,.pnt-image-wrapper .pnt-image-upload-progress{align-items:center;display:flex;height:8.5rem;justify-content:center;width:8.5rem}.pnt-image-wrapper .pnt-image-progress .pnt-image-loading,.pnt-image-wrapper .pnt-image-upload-progress .pnt-image-loading{align-items:center;background-color:#f7f8fa;border-radius:.25rem;display:flex;flex-direction:column;height:100%;justify-content:center;text-align:center;width:100%}.pnt-image-wrapper .pnt-image-progress .pnt-image-loading svg,.pnt-image-wrapper .pnt-image-upload-progress .pnt-image-loading svg{color:var(--td-brand-color);font-size:1.5rem}.pnt-image-wrapper .pnt-image-progress .pnt-image-loading p,.pnt-image-wrapper .pnt-image-upload-progress .pnt-image-loading p{color:#808191;font-size:.75rem;margin-top:.25rem}.pnt-image-wrapper .pnt-image{height:8.5rem;width:8.5rem}.pnt-image-wrapper .pnt-image .pnt-image-mask{align-items:center;background:rgba(0,0,0,.6);color:#fff;display:flex;height:100%;justify-content:center}.pnt-image-wrapper .pnt-image .pnt-image-mask--basic{cursor:pointer}.pnt-image-wrapper .pnt-image .pnt-image-mask .pnt-image-divider{border-left:.0625rem solid var(--td-text-color-anti);height:var(--td-comp-size-xxxs);margin:0 var(--td-comp-margin-l)}.pnt-business-select{width:100%}.pnt-business-select-option-label{display:block;width:100%}.pnt-business-select-popup .t-popup__content .t-loading,.pnt-business-select-popup .t-popup__content .total-wrapper{align-items:center;display:flex;font-weight:400;height:2.25rem;line-height:1.25rem;padding:0 .875rem}.pnt-business-select-popup .t-popup__content .total-wrapper{color:#808191;font-size:.875rem}.pnt-secure-box{color:#333;max-width:-moz-fit-content;max-width:fit-content;position:relative}.pnt-secure-box .copy-icon,.pnt-secure-box .view-icon{color:#3f8cff!important;cursor:pointer;font-size:small;position:absolute;right:-1.875rem;top:.0625rem}.pnt-secure-box .security-value{position:relative;top:.1875rem}.pnt-general-layout{--pnt-layout-body-padding:1.5rem;--pnt-layout-card-radius:0.25rem;background-color:transparent;height:100%}.pnt-general-layout .t-layout__header{align-items:stretch;border-bottom:.0625rem solid #f0f3f6;display:flex;flex-shrink:0;height:auto;justify-content:space-between}.pnt-general-layout .t-layout__header .header-title{align-items:center;display:inline-flex;padding:1.5rem}.pnt-general-layout .t-layout__header .header-title .goback-icon{color:#3f8cff;cursor:pointer;margin-right:.75rem}.pnt-general-layout .t-layout__header .header-title .title{font-size:1.25rem;font-weight:600;line-height:1.5rem}.pnt-general-layout .t-layout__header .header-operation{align-items:center;display:flex;padding-right:1.5rem}.pnt-general-layout .t-layout__header .header-operation .t-button+.t-button{margin-left:.75rem}.pnt-general-layout--borderless .t-layout__header{border-bottom:none}.pnt-general-layout .general-layout-sub-header{border-bottom:.0625rem solid #f0f3f6;flex-shrink:0}.pnt-general-layout .general-layout-body{background:#fafafa;flex:1 1 auto;min-height:0;overflow-y:auto;padding:var(--pnt-layout-body-padding)}.pnt-general-layout .general-layout-body>div.t-card,.pnt-general-layout .general-layout-body>div.t-loading__parent>div.t-card,.pnt-general-layout .general-layout-body>div.tea-card,.pnt-general-layout .general-layout-body>div[class*=-block],.pnt-general-layout .general-layout-body>div[class*=-wrapper]{border-radius:var(--pnt-layout-card-radius);box-shadow:none;margin-bottom:1.5rem}.pnt-general-layout .general-layout-body>div.t-card .t-card__body,.pnt-general-layout .general-layout-body>div.t-loading__parent>div.t-card .t-card__body,.pnt-general-layout .general-layout-body>div.tea-card .t-card__body,.pnt-general-layout .general-layout-body>div[class*=-block] .t-card__body,.pnt-general-layout .general-layout-body>div[class*=-wrapper] .t-card__body{border-radius:var(--pnt-layout-card-radius)}.pnt-general-layout .general-layout-body>div.t-loading__parent>div:last-child.t-card,.pnt-general-layout .general-layout-body>div:last-child,.pnt-general-layout .general-layout-body>div:last-child.t-card,.pnt-general-layout .general-layout-body>div:last-child.tea-card,.pnt-general-layout .general-layout-body>div:last-child[class*=-block],.pnt-general-layout .general-layout-body>div:last-child[class*=-wrapper]{margin-bottom:0}.pnt-general-layout .t-layout__footer{background:#fff;border-top:.0625rem solid #f0f3f6;flex-shrink:0;padding:1.125rem 1.5rem}.pnt-general-layout .t-layout__footer .t-button{font-size:.875rem;font-weight:600;height:2.25rem;min-width:5.75rem}.pnt-general-layout .t-layout__footer .t-button+.t-button{margin-left:.75rem}.pnt-general-layout--footer-auto .t-layout__footer .t-button{font-size:inherit;font-weight:inherit;height:auto;min-width:0}
@@ -1 +1 @@
1
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("cos-js-sdk-v5"),require("crypto-js"),require("use-sync-external-store/shim"),require("uuid"),require("react"),require("tdesign-react"),require("tdesign-icons-react")):"function"==typeof define&&define.amd?define([,,,,,,],t):"object"==typeof exports?exports.PntBusinessComponent=t(require("cos-js-sdk-v5"),require("crypto-js"),require("use-sync-external-store/shim"),require("uuid"),require("react"),require("tdesign-react"),require("tdesign-icons-react")):e.PntBusinessComponent=t(e[void 0],e[void 0],e[void 0],e[void 0],e.React,e.TDesign,e.TDesignIcons)}(self,(function(e,t,n,r,o,a,i){return function(){var u={76:function(e,t,n){"use strict";var r=n(809),o=Symbol.for("react.element"),a=Symbol.for("react.fragment"),i=Object.prototype.hasOwnProperty,u=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,c={key:!0,ref:!0,__self:!0,__source:!0};function s(e,t,n){var r,a={},s=null,l=null;for(r in void 0!==n&&(s=""+n),void 0!==t.key&&(s=""+t.key),void 0!==t.ref&&(l=t.ref),t)i.call(t,r)&&!c.hasOwnProperty(r)&&(a[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===a[r]&&(a[r]=t[r]);return{$$typeof:o,type:e,key:s,ref:l,props:a,_owner:u.current}}t.Fragment=a,t.jsx=s,t.jsxs=s},472:function(e,t,n){"use strict";e.exports=n(76)},338:function(t){"use strict";t.exports=e},962:function(e){"use strict";e.exports=t},300:function(e){"use strict";e.exports=n},695:function(e){"use strict";e.exports=r},809:function(e){"use strict";e.exports=o},352:function(e){"use strict";e.exports=a},420:function(e){"use strict";e.exports=i},820:function(e){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},e.exports.__esModule=!0,e.exports.default=e.exports},720:function(e){e.exports=function(e){if(Array.isArray(e))return e},e.exports.__esModule=!0,e.exports.default=e.exports},748:function(e,t,n){var r=n(820);e.exports=function(e){if(Array.isArray(e))return r(e)},e.exports.__esModule=!0,e.exports.default=e.exports},842:function(e){function t(e,t,n,r,o,a,i){try{var u=e[a](i),c=u.value}catch(e){return void n(e)}u.done?t(c):Promise.resolve(c).then(r,o)}e.exports=function(e){return function(){var n=this,r=arguments;return new Promise((function(o,a){var i=e.apply(n,r);function u(e){t(i,o,a,u,c,"next",e)}function c(e){t(i,o,a,u,c,"throw",e)}u(void 0)}))}},e.exports.__esModule=!0,e.exports.default=e.exports},286:function(e,t,n){var r=n(617);e.exports=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=r(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var o=0,a=function(){};return{s:a,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,u=!0,c=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return u=e.done,e},e:function(e){c=!0,i=e},f:function(){try{u||null==n.return||n.return()}finally{if(c)throw i}}}},e.exports.__esModule=!0,e.exports.default=e.exports},762:function(e,t,n){var r=n(893);e.exports=function(e,t,n){return(t=r(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},e.exports.__esModule=!0,e.exports.default=e.exports},454:function(e){e.exports=function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)},e.exports.__esModule=!0,e.exports.default=e.exports},587:function(e){e.exports=function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,i,u=[],c=!0,s=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(u.push(r.value),u.length!==t);c=!0);}catch(e){s=!0,o=e}finally{try{if(!c&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(s)throw o}}return u}},e.exports.__esModule=!0,e.exports.default=e.exports},469:function(e){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.__esModule=!0,e.exports.default=e.exports},928:function(e){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.__esModule=!0,e.exports.default=e.exports},212:function(e,t,n){var r=n(762);function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}e.exports=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e},e.exports.__esModule=!0,e.exports.default=e.exports},578:function(e,t,n){var r=n(710);e.exports=function(e,t){if(null==e)return{};var n,o,a=r(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)n=i[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a},e.exports.__esModule=!0,e.exports.default=e.exports},710:function(e){e.exports=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o},e.exports.__esModule=!0,e.exports.default=e.exports},650:function(e,t,n){var r=n(65).default;function o(){"use strict";e.exports=o=function(){return n},e.exports.__esModule=!0,e.exports.default=e.exports;var t,n={},a=Object.prototype,i=a.hasOwnProperty,u=Object.defineProperty||function(e,t,n){e[t]=n.value},c="function"==typeof Symbol?Symbol:{},s=c.iterator||"@@iterator",l=c.asyncIterator||"@@asyncIterator",f=c.toStringTag||"@@toStringTag";function d(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{d({},"")}catch(t){d=function(e,t,n){return e[t]=n}}function p(e,t,n,r){var o=t&&t.prototype instanceof x?t:x,a=Object.create(o.prototype),i=new O(r||[]);return u(a,"_invoke",{value:I(e,n,i)}),a}function v(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}n.wrap=p;var h="suspendedStart",m="executing",y="completed",g={};function x(){}function b(){}function w(){}var k={};d(k,s,(function(){return this}));var j=Object.getPrototypeOf,C=j&&j(j(T([])));C&&C!==a&&i.call(C,s)&&(k=C);var E=w.prototype=x.prototype=Object.create(k);function S(e){["next","throw","return"].forEach((function(t){d(e,t,(function(e){return this._invoke(t,e)}))}))}function A(e,t){function n(o,a,u,c){var s=v(e[o],e,a);if("throw"!==s.type){var l=s.arg,f=l.value;return f&&"object"==r(f)&&i.call(f,"__await")?t.resolve(f.__await).then((function(e){n("next",e,u,c)}),(function(e){n("throw",e,u,c)})):t.resolve(f).then((function(e){l.value=e,u(l)}),(function(e){return n("throw",e,u,c)}))}c(s.arg)}var o;u(this,"_invoke",{value:function(e,r){function a(){return new t((function(t,o){n(e,r,t,o)}))}return o=o?o.then(a,a):a()}})}function I(e,n,r){var o=h;return function(a,i){if(o===m)throw new Error("Generator is already running");if(o===y){if("throw"===a)throw i;return{value:t,done:!0}}for(r.method=a,r.arg=i;;){var u=r.delegate;if(u){var c=M(u,r);if(c){if(c===g)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===h)throw o=y,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=m;var s=v(e,n,r);if("normal"===s.type){if(o=r.done?y:"suspendedYield",s.arg===g)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(o=y,r.method="throw",r.arg=s.arg)}}}function M(e,n){var r=n.method,o=e.iterator[r];if(o===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,M(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),g;var a=v(o,e.iterator,n.arg);if("throw"===a.type)return n.method="throw",n.arg=a.arg,n.delegate=null,g;var i=a.arg;return i?i.done?(n[e.resultName]=i.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,g):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,g)}function P(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function O(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(P,this),this.reset(!0)}function T(e){if(e||""===e){var n=e[s];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=function n(){for(;++o<e.length;)if(i.call(e,o))return n.value=e[o],n.done=!1,n;return n.value=t,n.done=!0,n};return a.next=a}}throw new TypeError(r(e)+" is not iterable")}return b.prototype=w,u(E,"constructor",{value:w,configurable:!0}),u(w,"constructor",{value:b,configurable:!0}),b.displayName=d(w,f,"GeneratorFunction"),n.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},n.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,w):(e.__proto__=w,d(e,f,"GeneratorFunction")),e.prototype=Object.create(E),e},n.awrap=function(e){return{__await:e}},S(A.prototype),d(A.prototype,l,(function(){return this})),n.AsyncIterator=A,n.async=function(e,t,r,o,a){void 0===a&&(a=Promise);var i=new A(p(e,t,r,o),a);return n.isGeneratorFunction(t)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},S(E),d(E,f,"Generator"),d(E,s,(function(){return this})),d(E,"toString",(function(){return"[object Generator]"})),n.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},n.values=T,O.prototype={constructor:O,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(L),!e)for(var n in this)"t"===n.charAt(0)&&i.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function r(r,o){return u.type="throw",u.arg=e,n.next=r,o&&(n.method="next",n.arg=t),!!o}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var c=i.call(a,"catchLoc"),s=i.call(a,"finallyLoc");if(c&&s){if(this.prev<a.catchLoc)return r(a.catchLoc,!0);if(this.prev<a.finallyLoc)return r(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return r(a.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return r(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&i.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var o=r;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,g):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),g},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),L(n),g}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;L(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:T(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),g}},n}e.exports=o,e.exports.__esModule=!0,e.exports.default=e.exports},50:function(e,t,n){var r=n(720),o=n(587),a=n(617),i=n(469);e.exports=function(e,t){return r(e)||o(e,t)||a(e,t)||i()},e.exports.__esModule=!0,e.exports.default=e.exports},705:function(e,t,n){var r=n(748),o=n(454),a=n(617),i=n(928);e.exports=function(e){return r(e)||o(e)||a(e)||i()},e.exports.__esModule=!0,e.exports.default=e.exports},952:function(e,t,n){var r=n(65).default;e.exports=function(e,t){if("object"!=r(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!=r(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)},e.exports.__esModule=!0,e.exports.default=e.exports},893:function(e,t,n){var r=n(65).default,o=n(952);e.exports=function(e){var t=o(e,"string");return"symbol"==r(t)?t:String(t)},e.exports.__esModule=!0,e.exports.default=e.exports},65:function(e){function t(n){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},617:function(e,t,n){var r=n(820);e.exports=function(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}},e.exports.__esModule=!0,e.exports.default=e.exports}},c={};function s(e){var t=c[e];if(void 0!==t)return t.exports;var n=c[e]={exports:{}};return u[e](n,n.exports,s),n.exports}s.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return s.d(t,{a:t}),t},s.d=function(e,t){for(var n in t)s.o(t,n)&&!s.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},s.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},s.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var l={};return function(){"use strict";s.r(l),s.d(l,{PntBusinessSelect:function(){return k},PntGeneralLayout:function(){return fe},PntImage:function(){return d},PntProvider:function(){return n},PntSecureBox:function(){return D},PntUpload:function(){return le},createPntCosUploader:function(){return ie},isSecurityData:function(){return _},normalizeSnakeCredential:function(){return q},useHighSecurity:function(){return G},usePntConfig:function(){return r},usePntCosUploader:function(){return ue}});var e=s(809),t=(0,e.createContext)(null),n=t.Provider,r=function(){var n=(0,e.useContext)(t);if(!n)throw new Error("[pnt-component-frontend] 未注入配置:请在应用根入口用 <PntProvider value={{ http }}> 包裹");return n},o=s(212),a=s.n(o),i=s(420),u=s(352),c=s(472),f={uploading:"上传中",loading:"加载中",loadFailed:"加载失败"},d=function(e){var t=e.src,n=e.alt,r=void 0===n?"":n,o=e.defaultImg,s=e.size,l=e.style,d=e.loading,p=void 0!==d&&d,v=e.onRemove,h=e.container,m=e.texts,y="function"==typeof v,g=null!=t&&t.length?t:o||"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAARAAAAEQCAIAAAD3aLxCAAAaGklEQVR4Ae2dT2/TShfG+WZ8Ej6LN3iTImWVTSqhdEE3RUhFQsCmrNpuUMSu7Y5NQ4BFxYIkpIi8L/dcnft4xnMydtzW9jyoQiczx+Px4/Obv3byaFP2bz7/Pp9/n82+yt98/n2xWKLjYrFEh9nsK32ojyjQg9iQ+McbqvYjtdRwSFBm1GGz2dBHWxPqM59/71lsSHg71yXXWAKMEwoMCEc4NhZOhPRVn9nsKzYEQWAWi6WvCIdkql0PhhwcQm+N59nsq+MTBGaz2SwWy1JvDRoaVKDHChjxXzIk67EQvDQqsKMCf4GRQTm7lB2l5OF9VUAmKbIO/AinsGSmr7ec11VbAZ3Sy1rzX2CUmdqF8kAq0GMFdA1sPv/+SD+ULqL1WAVeGhWIVAAZITCRotEtXQUITLr3nldeQ4ECMDqBcfZra5TLQ6hALxVARh7JvrX/6GQvr5wXRQVqKICMcOOyhoA8JF0FCEy6955XXkMBAlNDNB6SrgIEJt17zyuvoUD9Sf9isfy1vl2u1vyjAh1S4Nf6tuojYIVJPy6ZxQO3WCw7pBGrSgUcBSoxg4zU3Oln3+LcAH7slgK/1rfx3UNh4xI/xBfRLXVYWyrgKxAf7chIzR7GPz1TqEC3FCAwXH6gAhUUqAkMTmjii+hWW8LaUgFfgfhoR0ZqLiv7p2cKFeiWAvHAFJaV4w9Dz25Jw9pSAV8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lEFEAnbLiwr266h3K63Lqw/FQjFtp3Onf5E21cCY4MRyiUwBCZRBUJI2OkEJtFwYQ9jgxHK5aSfwCSqQAgJP70w6cclM981lML2iQp0XYFQbPvpyAh3+hNtX7se7rvX3wcjlMKdfkJCBeru9CM9IcL89N35ZglU4GEV8KM6lIKM1ByS/VrfPuzV8uxUYBcFfq1vQ3j46QVgcELju4ZSFovlLtXlsVTgYRVYLJah2PbTkZGay8qbzWaxWLKfedi7zrPXUODX+rYSLRLq8/n3+fz7YrGsuXHpU8gUKpCCAgQmhbvMa2xMAQLTmJQsKAUFCEwKd5nX2JgC9Sf9jVWBBVGBdivQwLNk7b5A1o4KNKlAYVkZN2WaPAnLogJ9UQAZqbnT3xcpeB1UYLsCBGa7RvSgAqpAARgcn1XdAdUSaVCBHiugwMzn3x/Jnr8kEZge33VeWj0FFotlARhZMpvNvpKWeoLyqN4rIMzM5983mw03Lnt/u3mBTSoQBIYdTpMys6yuKRCK/xJgcNAmozd5sBkvWQdyOLxzzkEfFWc2+0oNuxU/oUlKCTB4m9WWAZxes66tqYPEhDpsNhv6oDjUp3OxMZt9xTqLXQIMA52BrgqwoXSYKQFGOgfEhsMJVI1DTcWpr0NN2WvBm672/wBMjYyrp4LAIgAAAABJRU5ErkJggg==",x={small:36,medium:60,large:136}[null!=s?s:"large"],b={width:"".concat(x,"px"),height:"".concat(x,"px")},w=a()(a()({},b),l),k=h?"function"==typeof h?h:function(){return h}:void 0,j=a()(a()({},f),m),C=function(e){return(0,c.jsx)("div",{className:e?"pnt-image-progress":"pnt-image-upload-progress",style:l,children:(0,c.jsxs)("div",{className:"pnt-image-loading",children:[(0,c.jsx)(i.LoadingIcon,{size:"18px",name:"loading"}),(0,c.jsx)("p",{children:j.uploading})]})})},E=(0,c.jsxs)(u.Space,{direction:"vertical",align:"center",size:"small",style:{color:"var(--td-text-color-disabled)"},children:[(0,c.jsx)(i.ImageIcon,{size:24}),j.loading]}),S=(0,c.jsxs)(u.Space,{direction:"vertical",align:"center",size:"small",children:[(0,c.jsx)(i.ImageErrorIcon,{size:24}),j.loadFailed]});return(0,c.jsx)("div",{className:"pnt-image-wrapper",onClick:function(e){y&&(null!=t&&t.length||p)&&e.stopPropagation()},children:y&&p?C(!1):(0,c.jsx)(u.ImageViewer,{images:[g],closeOnOverlay:!0,attach:k,trigger:function(e){var n=e.open,o=y?function(e){return(0,c.jsxs)("div",{className:"pnt-image-mask pnt-image-mask--upload",children:[(0,c.jsx)("span",{children:(0,c.jsx)(i.BrowseIcon,{onClick:e,size:"16px",name:"browse"})}),(0,c.jsx)("span",{className:"pnt-image-divider"}),(0,c.jsx)("span",{children:(0,c.jsx)(i.DeleteIcon,{onClick:v,size:"16px",name:"delete"})})]})}(n):function(e){return(0,c.jsx)("div",{className:"pnt-image-mask pnt-image-mask--basic",style:{background:"rgba(0,0,0,.1)",height:"100%"},onClick:e})}(n);return(0,c.jsx)(u.Image,{alt:r,src:g,loading:y?C(!0):E,error:y?void 0:S,overlayContent:y?t?o:(0,c.jsx)(c.Fragment,{}):o,overlayTrigger:"hover",fit:"contain",className:"pnt-image",style:w})}})})},p=s(650),v=s.n(p),h=s(705),m=s.n(h),y=s(842),g=s.n(y),x=s(50),b=s.n(x),w=function(e,t,n){return e.post(n||"/v3/business/game_info/high-security-decrypt?audience=/laas-pnt",t)},k=function(t){var n=t.value,o=t.onChange,i=t.multiple,s=void 0!==i&&i,l=t.scene,f=void 0===l?"default":l,d=t.statuses,p=t.businessTypes,h=t.businessAccessMethod,y=t.labelFormat,x=void 0===y?"name":y,w=t.labelField,k=t.optionLabel,j=t.pagination,C=void 0===j||j,E=t.onLoaded,S=t.placeholder,A=t.disabled,I=t.clearable,M=void 0===I||I,P=t.filterable,L=void 0===P||P,O=t.max,T=t.pageSize,N=void 0===T?20:T,G=t.searchDebounce,z=void 0===G?400:G,Q=t.minCollapsedNum,_=t.collapsedItems,D=t.popupProps,U=t.fields,K=t.optionDisabled,B=t.optionTooltip,R=t.tooltipPlacement,V=void 0===R?"top":R,q=t.className,Y=t.style,F=r().http,J=(0,e.useCallback)((function(e){return t=e,F.post("/business/select/list?audience=/player-network",t);var t}),[F]),W=(0,e.useState)([]),Z=b()(W,2),H=Z[0],X=Z[1],$=(0,e.useState)(!1),ee=b()($,2),te=ee[0],ne=ee[1],re=(0,e.useRef)(),oe=(0,e.useRef)(!1),ae=(0,e.useRef)(new Map),ie=(0,e.useRef)(new Set),ue=(0,e.useState)(0),ce=b()(ue,2),se=ce[0],le=ce[1],fe=(0,e.useRef)(E);fe.current=E;var de=(0,e.useRef)([]),pe=(0,e.useRef)(0),ve=(0,e.useRef)(!1),he=(0,e.useRef)({keyword:"",page:0,total:0}),me=(0,e.useRef)(""),ye=(0,e.useRef)(0),ge=(U||[]).join(","),xe=(d||[]).join(","),be=(p||[]).join(","),we=(0,e.useCallback)((function(e,t){return{keyword:e||void 0,pageNum:C?t:0,pageSize:C?N:0,scene:f,statuses:d,business_types:p,business_access_method:h,fields:U}}),[f,xe,be,h,N,ge,C]),ke=(0,e.useCallback)(function(){var e=g()(v()().mark((function e(t,n,r){var o,a,i,u,c,s,l,f,d;return v()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!r){e.next=11;break}if(!ve.current&&!oe.current){e.next=3;break}return e.abrupt("return");case 3:if((o=he.current).keyword===t){e.next=6;break}return e.abrupt("return");case 6:if(!(n<=o.page)){e.next=8;break}return e.abrupt("return");case 8:if(!(de.current.length>=o.total)){e.next=10;break}return e.abrupt("return");case 10:ve.current=!0;case 11:return a=++pe.current,oe.current=!0,ne(!0),e.prev=14,e.next=17,J(we(t,n));case 17:if(i=e.sent,a===pe.current){e.next=20;break}return e.abrupt("return");case 20:0===i.code&&i.data&&(s=i.data.list||[],l=(null===(u=i.data.pagination)||void 0===u?void 0:u.total)||0,r?(d=new Set(de.current.map((function(e){return e.game_id}))),f=[].concat(m()(de.current),m()(s.filter((function(e){return!d.has(e.game_id)}))))):(f=s,ye.current=Date.now()),de.current=f,he.current={keyword:t,page:n,total:l},X(f),null===(c=fe.current)||void 0===c||c.call(fe,f)),e.next=25;break;case 23:e.prev=23,e.t0=e.catch(14);case 25:return e.prev=25,r&&(ve.current=!1),a===pe.current&&(oe.current=!1,ne(!1)),e.finish(25);case 29:case"end":return e.stop()}}),e,null,[[14,23,25,29]])})));return function(t,n,r){return e.apply(this,arguments)}}(),[J,we]),je=(0,e.useCallback)((function(e){me.current=e,re.current&&clearTimeout(re.current),re.current=setTimeout((function(){ke(me.current,1,!1)}),z)}),[ke,z]),Ce=(0,e.useCallback)((function(){if(!(Date.now()-ye.current<200)){var e=he.current;ke(e.keyword,e.page+1,!0)}}),[ke]),Ee=(0,e.useCallback)((function(e){e||(re.current&&clearTimeout(re.current),me.current="",he.current.keyword&&ke("",1,!1))}),[ke]);(0,e.useEffect)((function(){ke("",1,!1)}),[ke]),(0,e.useEffect)((function(){var e=(Array.isArray(n)?n:n?[n]:[]).map(String);H.forEach((function(t){t.game_id&&e.includes(t.game_id)&&ae.current.set(t.game_id,t)}))}),[H,n]),(0,e.useEffect)((function(){if(C){var e=(Array.isArray(n)?n:n?[n]:[]).map(String),t=new Set(H.map((function(e){return e.game_id})).filter(Boolean)),r=e.filter((function(e){return e&&!t.has(e)&&!ae.current.has(e)&&!ie.current.has(e)}));if(0!==r.length){r.forEach((function(e){return ie.current.add(e)}));var o=!1;return g()(v()().mark((function e(){var t,n;return v()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,J(a()(a()({},we("",1)),{},{pageNum:1,pageSize:r.length,game_ids:r,keyword:void 0}));case 3:if(n=e.sent,!o&&0===n.code&&null!==(t=n.data)&&void 0!==t&&t.list){e.next=6;break}return e.abrupt("return");case 6:n.data.list.forEach((function(e){e.game_id&&ae.current.set(e.game_id,e)})),le((function(e){return e+1})),e.next=12;break;case 10:e.prev=10,e.t0=e.catch(0);case 12:case"end":return e.stop()}}),e,null,[[0,10]])})))(),function(){o=!0}}}}),[n,H,J,we,C]),(0,e.useEffect)((function(){return function(){re.current&&clearTimeout(re.current)}}),[]);var Se=(0,e.useCallback)((function(e){if(w)return e[w]||e.name||"";var t=e.name||"",n=e.name_en||"",r=e.game_id||"";switch(x){case"name_en":return n||t;case"name_id":return"".concat(t,"(").concat(r,")");case"name_en_id":return"".concat(n,"(").concat(r,")");default:return t}}),[x,w]),Ae=(0,e.useCallback)((function(e){return k?k(e):Se(e)}),[k,Se]),Ie=(0,e.useCallback)((function(e){return("compliance_age"===f||"custom_region"===f)&&!1===e.creatable||!!K&&K(e)}),[f,K]),Me=(0,e.useCallback)((function(e){return B?B(e):""}),[B]),Pe=(0,e.useMemo)((function(){var e=new Map;return H.forEach((function(t){t.game_id&&e.set(t.game_id,{label:Se(t),content:Ae(t),value:t.game_id,disabled:Ie(t),name:t.name,name_en:t.name_en,game_id:t.game_id,rawItem:t})})),(Array.isArray(n)?n:n?[n]:[]).map(String).forEach((function(t){if(!e.has(t)){var n=ae.current.get(t);n?e.set(t,{label:Se(n),content:Ae(n),value:t,disabled:Ie(n),name:n.name,name_en:n.name_en,game_id:n.game_id,rawItem:n}):e.set(t,{label:t,content:t,value:t,disabled:!1})}})),Array.from(e.values())}),[H,n,Ae,Se,Ie,se]),Le=(0,e.useCallback)((function(e,t){if(!e)return!0;var n=e.toLowerCase(),r=t,o=null==r?void 0:r.rawItem;return o?Object.values(o).some((function(e){return"string"==typeof e&&e.toLowerCase().includes(n)})):((null==r?void 0:r.name)||"").toLowerCase().includes(n)||((null==r?void 0:r.name_en)||"").toLowerCase().includes(n)||((null==r?void 0:r.game_id)||"").includes(n)}),[]),Oe=u.Select.Option,Te=!!B,Ne=L&&C,Ge=C,ze=(0,e.useMemo)((function(){return null==n?n:Array.isArray(n)?n.map(String):String(n)}),[n]),Qe=(0,e.useCallback)((function(e,t){if(o){var n=(Array.isArray(e)?e:null!=e?[e]:[]).map(String),r=(null==t?void 0:t.selectedOptions)||[],i=n.map((function(e){var t=de.current.find((function(t){return t.game_id===e}))||ae.current.get(e);if(t)return a()(a()({},t),{},{value:t.game_id,label:Se(t)});var n=r.find((function(t){return String(t.value)===e}));if(n){var o=a()({},n);return delete o.children,delete o.content,o}return{value:e,label:e}}));o(e,a()(a()({},t),{},{selectedOptions:s?i:i.slice(0,1)}))}}),[o,s,Se]),_e=(0,e.useCallback)((function(){me.current="",re.current&&clearTimeout(re.current),he.current.keyword&&ke("",1,!1)}),[ke]);return(0,c.jsx)(u.Select,{value:ze,onChange:Qe,filterable:L,filter:Ne?void 0:L?Le:void 0,onSearch:Ne?je:void 0,onClear:Ne?_e:void 0,loading:te&&0===H.length,multiple:s,max:O,clearable:M,disabled:A,placeholder:S,minCollapsedNum:Q,collapsedItems:_,onPopupVisibleChange:Ee,panelBottomContent:H.length>0&&te?(0,c.jsx)(u.Loading,{loading:!0,size:"small"}):null,popupProps:a()(a()({},D),{},{overlayClassName:["pnt-business-select-popup",null==D?void 0:D.overlayClassName].filter(Boolean).join(" "),onScrollToBottom:Ge?Ce:void 0}),className:q?"pnt-business-select ".concat(q):"pnt-business-select",style:Y,children:Pe.map((function(e){var t=e.rawItem,n=Te&&t?Me(t):"",r=a()(a()({},t||{}),{},{value:e.value,label:e.label,disabled:e.disabled});return(0,c.jsx)(Oe,a()(a()({},r),{},{children:n?(0,c.jsx)(u.Tooltip,{content:n,placement:V,children:(0,c.jsx)("span",{className:"pnt-business-select-option-label",children:e.content})}):e.content}),e.value)}))})},j=s(65),C=s.n(j),E=s(300),S=function(e,t,n){return"".concat(e,":").concat(t,":").concat(n)},A=new Map,I=new Map,M=new Set,P=function(){M.forEach((function(e){return e()}))},L=function(e){return M.add(e),function(){M.delete(e)}},O=function(){return A},T=function(e,t,n){if(n.length){var r=new Map(A);n.forEach((function(n){r.set(S(e,t,n.cacheKey||n.key),n.value)})),A=r,P()}},N=function(e){var t=new Map;A.forEach((function(n,r){(function(e,t){if(!t||void 0===t.gameId&&void 0===t.env)return!0;var n=e.split(":"),r=b()(n,2),o=r[0],a=r[1];return!(void 0!==t.gameId&&o!==String(t.gameId)||void 0!==t.env&&a!==String(t.env))})(r,e)||t.set(r,n)})),t.size!==A.size&&(A=t,P())},G=function(t){var n=r(),o=n.http,i=n.highSecurity,u=(0,E.useSyncExternalStore)(L,O,O),c=void 0===(null==t?void 0:t.gameId)?void 0:String(t.gameId),s=void 0===(null==t?void 0:t.env)?void 0:String(t.env),l=void 0!==c&&void 0!==s,f=null==t?void 0:t.scope,d=(0,e.useMemo)((function(){if(!l)return{};var e="".concat(c,":").concat(s,":"),t={};return u.forEach((function(n,r){r.startsWith(e)&&(t[r.slice(e.length)]=n)})),t}),[u,l,c,s]),p=(0,e.useCallback)((function(e){return!!l&&u.has(S(c,s,e))}),[u,l,c,s]),h=(0,e.useCallback)(function(){var e=g()(v()().mark((function e(t){var n,r,c,s,l,d,p,h,m,y,x,b,k,j,E,A,M,P,L,O;return v()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.gameId,c=t.env,s=t.pageId,l=t.param,d=t.apiConfig,p=t.scope,h=String(r),m=String(null!=c?c:0),y=a()(a()({},i),d),x=y.successCodeField||"code",b=new Array(l.length),k=[],j=[],l.forEach((function(e,t){var n=e.cacheKey||e.key,r=u.get(S(h,m,n));void 0!==r?b[t]={key:e.key,value:r,cacheKey:n}:(k.push({key:e.key,value:e.value}),j.push(t))})),k.length){e.next=11;break}return e.abrupt("return",b.filter((function(e){return void 0!==e})));case 11:if(E={game_id:Number(r),env:Number(null!=c?c:0),page_id:s||("undefined"!=typeof window&&window.location?window.location.pathname:""),param:k},A=null!==(n=null!=p?p:f)&&void 0!==n?n:"business",M="platform"===A?y.decryptPlatUrl||"/v3/business/game_info/plat-high-security-decrypt?audience=/laas-pnt":y.decryptUrl||"/v3/business/game_info/high-security-decrypt?audience=/laas-pnt",P="".concat(h,":").concat(m,":").concat(k.map((function(e){return"".concat(e.key,"").concat(e.value)})).join("")),!(L=I.get(P))){e.next=18;break}return e.abrupt("return",L);case 18:return O=g()(v()().mark((function e(){var t,n,r,a,i;return v()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,w(o,E,M);case 3:n=e.sent,0===Number(null!==(t=n[x])&&void 0!==t?t:n.code)&&Array.isArray(n.data)?(r=n.data.map((function(e){if(e&&"object"===C()(e)&&"key"in e){var t,n=e;if("string"==typeof n.key)return{key:n.key,value:String(null!==(t=n.value)&&void 0!==t?t:"")}}return null})).filter((function(e){return null!==e})),a=r.map((function(e){var t=j.find((function(t){return l[t].key===e.key})),n=void 0!==t&&l[t].cacheKey||e.key;return{key:e.key,value:e.value,cacheKey:n}})),T(h,m,a),r.forEach((function(e){var t=j.find((function(t){return l[t].key===e.key}));void 0!==t&&(b[t]=e)}))):console.warn("[pnt-component-frontend] high-security-decrypt 解锁失败",null!==(i=null==n?void 0:n.msg)&&void 0!==i?i:n[x]),e.next=11;break;case 8:e.prev=8,e.t0=e.catch(0),console.warn("[pnt-component-frontend] high-security-decrypt 请求异常",e.t0);case 11:return e.prev=11,I.delete(P),e.finish(11);case 14:return e.abrupt("return",b.filter((function(e){return void 0!==e})));case 15:case"end":return e.stop()}}),e,null,[[0,8,11,14]])})))(),I.set(P,O),e.abrupt("return",O);case 21:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),[o,u,i,f]);return{securityData:d,requestSecurityData:h,clearSecurityData:(0,e.useCallback)((function(e){N(e)}),[]),isUnlocked:p}},z=s(286),Q=s.n(z),_=function(e){var t=String(e);if(!t.includes("_high_security_:"))return!1;var n=t.split(":"),r=n.slice(0,-1).join(":"),o=parseInt(n[n.length-1],10);if(isNaN(o))return!1;var a,i=0,u=Q()(r);try{for(u.s();!(a=u.n()).done;){i+=a.value.charCodeAt(0)}}catch(e){u.e(e)}finally{u.f()}return i===o},D=function(t){var n=t.dataKey,r=t.dataValue,o=t.env,a=t.gameId,i=t.renderDom,u=t.viewText,s=t.pageId,l=t.maskPlain,f=t.scope,d=t.copyable,p=void 0===d||d,h=t.copyText,m=t.copySuccessText,y=void 0===m?"Copied":m,x=t.onCopy,w=t.cacheKey,k=t.onSecurityDataChange,j=w||n,C=G({gameId:a,env:o,scope:f}),E=C.securityData,S=C.isUnlocked,A=C.requestSecurityData,I=(0,e.useState)(!1),M=b()(I,2),P=M[0],L=M[1],O=(0,e.useState)(!1),T=b()(O,2),N=T[0],z=T[1],Q=(0,e.useRef)(null);(0,e.useEffect)((function(){return function(){Q.current&&clearTimeout(Q.current)}}),[]);var D=_(r),U=D?S(j):!l||P,K=U?D?E[j]||"******":r:"******";(0,e.useEffect)((function(){null==k||k(E)}),[E,k]);var B=(0,e.useCallback)(g()(v()().mark((function e(){var t;return v()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=U?D?E[j]||"":r:"",!x){e.next=5;break}return e.next=4,x(t);case 4:return e.abrupt("return");case 5:return e.prev=5,e.next=8,navigator.clipboard.writeText(t);case 8:y&&(Q.current&&clearTimeout(Q.current),z(!0),Q.current=setTimeout((function(){return z(!1)}),2e3)),e.next=14;break;case 11:e.prev=11,e.t0=e.catch(5),console.warn("[pnt-component-frontend] 复制失败",e.t0);case 14:case"end":return e.stop()}}),e,null,[[5,11]])}))),[U,D,E,j,r,x,y]),R=!U,V=U&&(D||!!l)&&p;return(0,c.jsx)("div",{className:"pnt-secure-box",children:(0,c.jsxs)(c.Fragment,{children:[i(K),R&&(0,c.jsx)("span",{className:"view-icon",onClick:function(){D?A({env:o,gameId:a,pageId:s,param:[{key:n,value:r,cacheKey:j}]}):l&&L(!0)},children:u||"View"}),V&&(0,c.jsx)("span",{className:"copy-icon",onClick:B,children:N&&y?y:h||"Copy"})]})})},U=s(578),K=s.n(U),B=["gameId"],R=["gameId"],V=function(e){return{bucket:e.bucket,region:e.region,secretId:e.secret_id,secretKey:e.secret_key,sessionToken:e.token,startTime:e.start_time,expiredTime:e.expired_time,path:e.path}},q=function(e){return V(e)},Y=function(e){var t,n;return{bucket:e.bucket||"",region:e.region||"",secretId:e.secretId||"",secretKey:e.secretKey||"",sessionToken:e.token||"",startTime:null!==(t=e.startTime)&&void 0!==t?t:0,expiredTime:null!==(n=e.expiredTime)&&void 0!==n?n:0,path:e.path?Object.fromEntries(Object.entries(e.path).filter((function(e){return"string"==typeof e[1]}))):void 0}},F=function(e){return{bucket:e.bucket,region:e.region,secretId:e.secret_id,secretKey:e.secret_key,sessionToken:e.token,startTime:e.start_time,expiredTime:e.expired_time,filePath:e.file_path,cosHost:e.cdn_url}},J=function(e,t,n){var r,o;if(!(0===e.code||0===e.ret)||null===e.data||void 0===e.data)throw new Error("[PntCosUploader] 获取 COS 凭证失败: code=".concat(null!==(r=e.code)&&void 0!==r?r:"null"," ret=").concat(null!==(o=e.ret)&&void 0!==o?o:"null"," ").concat(e.msg||""));return n?n(e.data):t(e.data)},W=function(){var e=g()(v()().mark((function e(t,n,r){var o,i,u,c,s,l,f,d,p,h,m,y,g,x,b;return v()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:o=n.scene,i=n.context,u=void 0===i?{}:i,c=n.contentLength,s=n.fileUrl,l=n.audience,f=void 0===l?"/player-network":l,e.t0=o,e.next="default"===e.t0?4:"default_download"===e.t0?9:"sdk_customize"===e.t0?14:"ai_translate"===e.t0?18:22;break;case 4:return d=u.gameId,p=K()(u,B),e.next=7,t.get("/v2/business/operation/get-cos-temp-token?audience=".concat(f),{params:a()({content_length:c},p),headers:void 0!==d?{"x-service-type":String(d)}:void 0});case 7:return h=e.sent,e.abrupt("return",J(h,V,r));case 9:return m=u.gameId,y=K()(u,R),e.next=12,t.post("/v2/business/operation/get-download-cos-temp-token?audience=".concat(f),a()({file_url:s,content_length:c},y),{headers:void 0!==m?{"x-service-type":String(m)}:void 0});case 12:return g=e.sent,e.abrupt("return",J(g,V,r));case 14:return e.next=16,t.post("/internal/sdk_customize/upload_token",a()({content_length:c},u));case 16:return x=e.sent,e.abrupt("return",J(x,F,r));case 18:return e.next=20,t.post("/business/aiTranslate/import/cosToken",a()({contentLength:c},u));case 20:return b=e.sent,e.abrupt("return",J(b,Y,r));case 22:throw new Error("[PntCosUploader] 未支持的 scene: ".concat(o,";请通过 getCredential 自定义"));case 23:case"end":return e.stop()}}),e)})));return function(t,n,r){return e.apply(this,arguments)}}(),Z=s(338),H=s.n(Z),X=s(962),$=s.n(X),ee=s(695),te=0,ne=function(){var e=g()(v()().mark((function e(t){var n;return v()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.arrayBuffer();case 2:return n=e.sent,e.abrupt("return",$().MD5($().lib.WordArray.create(n)).toString());case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),re=function(){var e=g()(v()().mark((function e(t,n){var r,o;return v()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("function"!=typeof n){e.next=2;break}return e.abrupt("return",n(t));case 2:a=t.name,i=void 0,i=a.lastIndexOf("."),r=i>-1?a.slice(i):"",e.t0=n,e.next="md5"===e.t0?6:"timestamp"===e.t0?10:(e.t0,11);break;case 6:return e.next=8,ne(t);case 8:return o=e.sent,e.abrupt("return","".concat(o).concat(r));case 10:return e.abrupt("return","".concat("".concat(Date.now().toString(36)).concat((te++).toString(36))).concat(r));case 11:return e.abrupt("return","".concat((0,ee.v4)()).concat(r));case 12:case"end":return e.stop()}var a,i}),e)})));return function(t,n){return e.apply(this,arguments)}}(),oe=function(e,t){if(e.filePath){var n=e.filePath.replace(/\/$/,"");return t?"".concat(n,"/").concat(function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return e.replace(/\/$/,"").replace(t?/^\//:"","")}(t)):n}return t&&e.path&&e.path[t]||""},ae=function(e){return new(H())({getAuthorization:function(t,n){n({TmpSecretId:e.secretId,TmpSecretKey:e.secretKey,SecurityToken:e.sessionToken,StartTime:e.startTime,ExpiredTime:e.expiredTime})},Protocol:"https:",FileParallelLimit:3,ChunkParallelLimit:3,ChunkSize:1048576,ProgressInterval:1})},ie=function(e,t){var n=function(){return"function"==typeof t?t():t},r=function(){var t=g()(v()().mark((function t(r,o,i){var u,c,s,l,f,d,p,h,m,y,g,x,b,w,k,j,C,E,S,A,I,M,P,L;return v()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(l=n(),f=l.scene,d=l.pathKey,p=l.context,h=l.audience,m=l.fileNameStrategy,y=void 0===m?"uuid":m,g=l.useCdn,x=void 0===g||g,b=l.getCredential,w=l.normalizeCredential,k=a()(a()({},p),null==i?void 0:i.context),j=null!==(u=null==i?void 0:i.scene)&&void 0!==u?u:f,C=null!==(c=null==i?void 0:i.audience)&&void 0!==c?c:h,E=null!==(s=null==i?void 0:i.pathKey)&&void 0!==s?s:d,S={scene:j,pathKey:E,context:k,audience:C,contentLength:r.size},!b){t.next=13;break}return t.next=10,b(e,S);case 10:t.t0=t.sent,t.next=16;break;case 13:return t.next=15,W(e,S,w);case 15:t.t0=t.sent;case 16:return A=t.t0,I=oe(A,E),t.next=20,re(r,y);case 20:return M=t.sent,P=I?"".concat(I.replace(/\/$/,""),"/").concat(M):M,L=ae(A),t.abrupt("return",new Promise((function(e,t){L.putObject({Bucket:A.bucket,Region:A.region,Key:P,Body:r,onProgress:o?function(e){o(Math.round(100*e.percent))}:void 0},(function(n,o){if(n)t(n);else{var a=x&&A.cosHost?"".concat(A.cosHost.replace(/\/$/,""),"/").concat(P):"https://".concat(o.Location);e({fileUrl:a,cosKey:P,fileName:r.name})}}))})));case 24:case"end":return t.stop()}}),t)})));return function(e,n,r){return t.apply(this,arguments)}}(),o=function(){var t=g()(v()().mark((function t(r,o){var i,u,c,s,l,f,d,p,h,m,y,g,x,b,w,k;return v()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(s=n(),l=s.scene,f=s.pathKey,d=s.context,p=s.audience,h=s.getCredential,m=a()(a()({},d),null==o?void 0:o.context),y=null!==(i=null==o?void 0:o.scene)&&void 0!==i?i:l,g=null!==(u=null==o?void 0:o.audience)&&void 0!==u?u:p,x=null!==(c=null==o?void 0:o.pathKey)&&void 0!==c?c:f,b={scene:h||"sdk_customize"===y?y:"default_download",pathKey:x,context:m,audience:g,fileUrl:r},!h){t.next=13;break}return t.next=10,h(e,b);case 10:t.t0=t.sent,t.next=16;break;case 13:return t.next=15,W(e,b);case 15:t.t0=t.sent;case 16:return w=t.t0,k=ae(w),t.abrupt("return",new Promise((function(e,t){var n;k.getObjectUrl({Bucket:w.bucket,Region:w.region,Key:(n=r,n.replace(/^https?:\/\/[^/]+/,"")),Sign:!0},(function(n,r){n?t(n):e(r.Url)}))})));case 19:case"end":return t.stop()}}),t)})));return function(e,n){return t.apply(this,arguments)}}();return{upload:r,getDownloadUrl:o}},ue=function(t){var n=r().http,o=(0,e.useRef)(t);return o.current=t,(0,e.useMemo)((function(){return ie(n,(function(){return o.current}))}),[n])},ce={uploading:"上传中",uploadFailed:"上传失败,请重试",sizeInvalid:"文件大小超出限制",typeInvalid:"文件类型不支持",selectFile:"选择文件",reselect:"重新选择"},se=function(e,t){if(!t.length)return!0;var n=e.name.toLowerCase(),r=e.type.toLowerCase();return t.some((function(e){return e.startsWith(".")?n.endsWith(e):e.endsWith("/*")?!!r&&r.startsWith(e.slice(0,-1)):r===e}))},le=function(t){var n=t.value,r=t.onChange,o=t.onRemove,s=t.onError,l=t.scene,f=t.pathKey,p=t.context,h=t.audience,m=t.accept,y=t.sizeLimit,x=t.imagePreview,w=void 0===x||x,k=t.previewStyle,j=t.defaultImg,C=t.fileNameStrategy,E=t.useCdn,S=t.getCredential,A=t.normalizeCredential,I=t.texts,M=t.disabled,P=void 0!==M&&M,L=t.style,O=t.className,T=(0,e.useState)(!1),N=b()(T,2),G=N[0],z=N[1],Q=(0,e.useState)(0),_=b()(Q,2),D=_[0],U=_[1],K=(0,e.useState)(""),B=b()(K,2),R=B[0],V=B[1],q=(0,e.useState)(null),Y=b()(q,2),F=Y[0],J=Y[1],W=(0,e.useMemo)((function(){return a()(a()({},ce),I)}),[I]),Z=(0,e.useMemo)((function(){return function(e){return(Array.isArray(e)?e:e?e.split(","):[]).map((function(e){return e.trim().toLowerCase()})).filter(Boolean)}(m)}),[m]),H=(0,e.useMemo)((function(){return Z.join(", ")}),[Z]),X=ue({scene:l,pathKey:f,context:p,audience:h,fileNameStrategy:C,useCdn:E,getCredential:S,normalizeCredential:A}),$=function(e,t,n){V(e),null==s||s(new Error(e),t,n)},ee=function(){var e=g()(v()().mark((function e(t){var n,o,a,i;return v()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=Array.isArray(t)?t[0]:t,o=null==n?void 0:n.raw){e.next=4;break}return e.abrupt("return",{status:"fail",error:"no file",response:{}});case 4:if(se(o,Z)){e.next=7;break}return $(W.typeInvalid,"validate",o),e.abrupt("return",{status:"fail",error:W.typeInvalid,response:{}});case 7:if(!("number"==typeof y&&o.size>y)){e.next=10;break}return $(W.sizeInvalid,"validate",o),e.abrupt("return",{status:"fail",error:W.sizeInvalid,response:{}});case 10:return z(!0),U(0),V(""),e.prev=13,e.next=16,X.upload(o,U);case 16:return a=e.sent,J(o),null==r||r(a.fileUrl,a.cosKey,o),e.abrupt("return",{status:"success",response:{url:a.fileUrl}});case 22:return e.prev=22,e.t0=e.catch(13),i=e.t0 instanceof Error?e.t0:new Error(String(e.t0)),V(W.uploadFailed),null==s||s(i,"upload",o),e.abrupt("return",{status:"fail",error:i.message,response:{}});case 28:return e.prev=28,z(!1),e.finish(28);case 31:case"end":return e.stop()}}),e,null,[[13,22,28,31]])})));return function(t){return e.apply(this,arguments)}}(),te=function(e){e.stopPropagation(),P||G||(J(null),V(""),null==o||o())},ne=["pnt-upload",w?"pnt-upload--image":"pnt-upload--file",P?"pnt-upload--disabled":"",O||""].filter(Boolean).join(" "),re=(null==F?void 0:F.name)||function(e){if(!e)return"";var t=e.split("?")[0].split("/").pop()||"";try{return decodeURIComponent(t)}catch(e){return t}}(n);return(0,c.jsxs)("div",{className:ne,style:L,children:[(0,c.jsx)(u.Upload,{theme:"custom",requestMethod:ee,accept:H||void 0,allowUploadDuplicateFile:!0,disabled:P||G,className:"pnt-upload__trigger",children:w?(0,c.jsx)(d,{src:n,loading:G,defaultImg:j,style:k,texts:{uploading:W.uploading},onRemove:P?void 0:te}):(0,c.jsx)("div",{className:"pnt-upload-file",children:n&&!G?(0,c.jsxs)("div",{className:"pnt-upload-file__row",children:[(0,c.jsx)(i.FileIcon,{className:"pnt-upload-file__icon"}),(0,c.jsx)("span",{className:"pnt-upload-file__name",title:re,children:re}),!P&&(0,c.jsx)(i.DeleteIcon,{className:"pnt-upload-file__delete",onClick:te})]}):G?(0,c.jsxs)("div",{className:"pnt-upload-file__row pnt-upload-file__row--progress",children:[(0,c.jsx)(u.Progress,{percentage:D,className:"pnt-upload-file__progress"}),(0,c.jsxs)("span",{className:"pnt-upload-file__percent",children:[W.uploading," ",D,"%"]})]}):(0,c.jsxs)("div",{className:"pnt-upload-file__row pnt-upload-file__row--empty",children:[(0,c.jsx)(i.UploadIcon,{className:"pnt-upload-file__icon"}),(0,c.jsx)("span",{children:n?W.reselect:W.selectFile})]})})}),R&&(0,c.jsx)("p",{className:"pnt-upload__error",children:R})]})},fe=function(e){var t=e.className,n=e.headerTitle,r=e.showBackButton,o=void 0!==r&&r,a=e.onBackButtonClick,s=e.headerBordered,l=void 0===s||s,f=e.subHeaderContent,d=e.operation,p=e.bodyRef,v=e.children,h=e.bodyStyle,m=e.bodyPadding,y=void 0===m?24:m,g=e.cardRadius,x=void 0===g?4:g,b=e.footerButton,w=void 0===b?"fixed":b,k=e.footer,j=u.Layout.Header,C=u.Layout.Footer,E=["pnt-general-layout",!l&&"pnt-general-layout--borderless","auto"===w&&"pnt-general-layout--footer-auto",t].filter(Boolean).join(" "),S={"--pnt-layout-body-padding":"number"==typeof y?"".concat(y,"px"):y,"--pnt-layout-card-radius":"".concat(x,"px")};return(0,c.jsxs)(u.Layout,{className:E,style:S,children:[n&&(0,c.jsxs)(j,{children:[(0,c.jsxs)("span",{className:"header-title",children:[o&&(0,c.jsx)(i.ArrowLeftIcon,{className:"goback-icon",size:"24px",onClick:a}),(0,c.jsx)("span",{className:"title",children:n})]}),d&&(0,c.jsx)("span",{className:"header-operation",children:d})]}),f&&(0,c.jsx)("div",{className:"general-layout-sub-header",children:f}),(0,c.jsx)("div",{className:"general-layout-body",ref:p,style:h,children:v}),k&&(0,c.jsx)(C,{children:k})]})}}(),l}()}));
1
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("use-sync-external-store/shim"),require("react"),require("tdesign-react"),require("tdesign-icons-react")):"function"==typeof define&&define.amd?define([,,,],t):"object"==typeof exports?exports.PntBusinessComponent=t(require("use-sync-external-store/shim"),require("react"),require("tdesign-react"),require("tdesign-icons-react")):e.PntBusinessComponent=t(e[void 0],e.React,e.TDesign,e.TDesignIcons)}(self,(function(e,t,r,n){return function(){var o={76:function(e,t,r){"use strict";var n=r(809),o=Symbol.for("react.element"),a=Symbol.for("react.fragment"),i=Object.prototype.hasOwnProperty,u=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,c={key:!0,ref:!0,__self:!0,__source:!0};function s(e,t,r){var n,a={},s=null,l=null;for(n in void 0!==r&&(s=""+r),void 0!==t.key&&(s=""+t.key),void 0!==t.ref&&(l=t.ref),t)i.call(t,n)&&!c.hasOwnProperty(n)&&(a[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps)void 0===a[n]&&(a[n]=t[n]);return{$$typeof:o,type:e,key:s,ref:l,props:a,_owner:u.current}}t.Fragment=a,t.jsx=s,t.jsxs=s},472:function(e,t,r){"use strict";e.exports=r(76)},300:function(t){"use strict";t.exports=e},809:function(e){"use strict";e.exports=t},352:function(e){"use strict";e.exports=r},420:function(e){"use strict";e.exports=n},820:function(e){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n},e.exports.__esModule=!0,e.exports.default=e.exports},720:function(e){e.exports=function(e){if(Array.isArray(e))return e},e.exports.__esModule=!0,e.exports.default=e.exports},748:function(e,t,r){var n=r(820);e.exports=function(e){if(Array.isArray(e))return n(e)},e.exports.__esModule=!0,e.exports.default=e.exports},842:function(e){function t(e,t,r,n,o,a,i){try{var u=e[a](i),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}e.exports=function(e){return function(){var r=this,n=arguments;return new Promise((function(o,a){var i=e.apply(r,n);function u(e){t(i,o,a,u,c,"next",e)}function c(e){t(i,o,a,u,c,"throw",e)}u(void 0)}))}},e.exports.__esModule=!0,e.exports.default=e.exports},286:function(e,t,r){var n=r(617);e.exports=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=n(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var o=0,a=function(){};return{s:a,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,u=!0,c=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return u=e.done,e},e:function(e){c=!0,i=e},f:function(){try{u||null==r.return||r.return()}finally{if(c)throw i}}}},e.exports.__esModule=!0,e.exports.default=e.exports},762:function(e,t,r){var n=r(893);e.exports=function(e,t,r){return(t=n(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e},e.exports.__esModule=!0,e.exports.default=e.exports},454:function(e){e.exports=function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)},e.exports.__esModule=!0,e.exports.default=e.exports},587:function(e){e.exports=function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,a,i,u=[],c=!0,s=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=a.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){s=!0,o=e}finally{try{if(!c&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(s)throw o}}return u}},e.exports.__esModule=!0,e.exports.default=e.exports},469:function(e){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.__esModule=!0,e.exports.default=e.exports},928:function(e){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.__esModule=!0,e.exports.default=e.exports},212:function(e,t,r){var n=r(762);function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}e.exports=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?o(Object(r),!0).forEach((function(t){n(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):o(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e},e.exports.__esModule=!0,e.exports.default=e.exports},650:function(e,t,r){var n=r(65).default;function o(){"use strict";e.exports=o=function(){return r},e.exports.__esModule=!0,e.exports.default=e.exports;var t,r={},a=Object.prototype,i=a.hasOwnProperty,u=Object.defineProperty||function(e,t,r){e[t]=r.value},c="function"==typeof Symbol?Symbol:{},s=c.iterator||"@@iterator",l=c.asyncIterator||"@@asyncIterator",f=c.toStringTag||"@@toStringTag";function d(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{d({},"")}catch(t){d=function(e,t,r){return e[t]=r}}function p(e,t,r,n){var o=t&&t.prototype instanceof x?t:x,a=Object.create(o.prototype),i=new O(n||[]);return u(a,"_invoke",{value:S(e,r,i)}),a}function v(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}r.wrap=p;var h="suspendedStart",y="executing",m="completed",g={};function x(){}function b(){}function w(){}var j={};d(j,s,(function(){return this}));var C=Object.getPrototypeOf,A=C&&C(C(G([])));A&&A!==a&&i.call(A,s)&&(j=A);var E=w.prototype=x.prototype=Object.create(j);function k(e){["next","throw","return"].forEach((function(t){d(e,t,(function(e){return this._invoke(t,e)}))}))}function M(e,t){function r(o,a,u,c){var s=v(e[o],e,a);if("throw"!==s.type){var l=s.arg,f=l.value;return f&&"object"==n(f)&&i.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,u,c)}),(function(e){r("throw",e,u,c)})):t.resolve(f).then((function(e){l.value=e,u(l)}),(function(e){return r("throw",e,u,c)}))}c(s.arg)}var o;u(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,o){r(e,n,t,o)}))}return o=o?o.then(a,a):a()}})}function S(e,r,n){var o=h;return function(a,i){if(o===y)throw new Error("Generator is already running");if(o===m){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var u=n.delegate;if(u){var c=I(u,n);if(c){if(c===g)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=y;var s=v(e,r,n);if("normal"===s.type){if(o=n.done?m:"suspendedYield",s.arg===g)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(o=m,n.method="throw",n.arg=s.arg)}}}function I(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,I(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var a=v(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,g;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function L(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function P(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function O(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(L,this),this.reset(!0)}function G(e){if(e||""===e){var r=e[s];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=function r(){for(;++o<e.length;)if(i.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return a.next=a}}throw new TypeError(n(e)+" is not iterable")}return b.prototype=w,u(E,"constructor",{value:w,configurable:!0}),u(w,"constructor",{value:b,configurable:!0}),b.displayName=d(w,f,"GeneratorFunction"),r.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},r.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,w):(e.__proto__=w,d(e,f,"GeneratorFunction")),e.prototype=Object.create(E),e},r.awrap=function(e){return{__await:e}},k(M.prototype),d(M.prototype,l,(function(){return this})),r.AsyncIterator=M,r.async=function(e,t,n,o,a){void 0===a&&(a=Promise);var i=new M(p(e,t,n,o),a);return r.isGeneratorFunction(t)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},k(E),d(E,f,"Generator"),d(E,s,(function(){return this})),d(E,"toString",(function(){return"[object Generator]"})),r.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},r.values=G,O.prototype={constructor:O,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(P),!e)for(var r in this)"t"===r.charAt(0)&&i.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(n,o){return u.type="throw",u.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=i.call(a,"catchLoc"),s=i.call(a,"finallyLoc");if(c&&s){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,g):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),g},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),P(r),g}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;P(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:G(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},r}e.exports=o,e.exports.__esModule=!0,e.exports.default=e.exports},50:function(e,t,r){var n=r(720),o=r(587),a=r(617),i=r(469);e.exports=function(e,t){return n(e)||o(e,t)||a(e,t)||i()},e.exports.__esModule=!0,e.exports.default=e.exports},705:function(e,t,r){var n=r(748),o=r(454),a=r(617),i=r(928);e.exports=function(e){return n(e)||o(e)||a(e)||i()},e.exports.__esModule=!0,e.exports.default=e.exports},952:function(e,t,r){var n=r(65).default;e.exports=function(e,t){if("object"!=n(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,t||"default");if("object"!=n(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)},e.exports.__esModule=!0,e.exports.default=e.exports},893:function(e,t,r){var n=r(65).default,o=r(952);e.exports=function(e){var t=o(e,"string");return"symbol"==n(t)?t:String(t)},e.exports.__esModule=!0,e.exports.default=e.exports},65:function(e){function t(r){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},617:function(e,t,r){var n=r(820);e.exports=function(e,t){if(e){if("string"==typeof e)return n(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(e,t):void 0}},e.exports.__esModule=!0,e.exports.default=e.exports}},a={};function i(e){var t=a[e];if(void 0!==t)return t.exports;var r=a[e]={exports:{}};return o[e](r,r.exports,i),r.exports}i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,{a:t}),t},i.d=function(e,t){for(var r in t)i.o(t,r)&&!i.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var u={};return function(){"use strict";i.r(u),i.d(u,{PntBusinessSelect:function(){return j},PntGeneralLayout:function(){return R},PntImage:function(){return d},PntProvider:function(){return r},PntSecureBox:function(){return B},isSecurityData:function(){return N},useHighSecurity:function(){return Q},usePntConfig:function(){return n}});var e=i(809),t=(0,e.createContext)(null),r=t.Provider,n=function(){var r=(0,e.useContext)(t);if(!r)throw new Error("[pnt-component-frontend] 未注入配置:请在应用根入口用 <PntProvider value={{ http }}> 包裹");return r},o=i(212),a=i.n(o),c=i(420),s=i(352),l=i(472),f={uploading:"上传中",loading:"加载中",loadFailed:"加载失败"},d=function(e){var t=e.src,r=e.alt,n=void 0===r?"":r,o=e.defaultImg,i=e.size,u=e.style,d=e.loading,p=void 0!==d&&d,v=e.onRemove,h=e.container,y=e.texts,m="function"==typeof v,g=null!=t&&t.length?t:o||"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAARAAAAEQCAIAAAD3aLxCAAAaGklEQVR4Ae2dT2/TShfG+WZ8Ej6LN3iTImWVTSqhdEE3RUhFQsCmrNpuUMSu7Y5NQ4BFxYIkpIi8L/dcnft4xnMydtzW9jyoQiczx+Px4/Obv3byaFP2bz7/Pp9/n82+yt98/n2xWKLjYrFEh9nsK32ojyjQg9iQ+McbqvYjtdRwSFBm1GGz2dBHWxPqM59/71lsSHg71yXXWAKMEwoMCEc4NhZOhPRVn9nsKzYEQWAWi6WvCIdkql0PhhwcQm+N59nsq+MTBGaz2SwWy1JvDRoaVKDHChjxXzIk67EQvDQqsKMCf4GRQTm7lB2l5OF9VUAmKbIO/AinsGSmr7ec11VbAZ3Sy1rzX2CUmdqF8kAq0GMFdA1sPv/+SD+ULqL1WAVeGhWIVAAZITCRotEtXQUITLr3nldeQ4ECMDqBcfZra5TLQ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pCdEmJ++O98sgQo8rAJ+VIdSkBEOydjWJqpACA8/vQAMTmh811DKw7YNPDsV2F2BUGz76cgIl5UTbV93D7iul+CDEUopLCuHnOz0rovF+lMBO8JDudzpZw+TqAIhJOx0ApNouLCHscEI5RIYApOoAiEk7HRO+hMNF/YwNhiYW5j045IZOtk25aYCXVfAjnDMRUa4cckeJlEFEAnbLmxc4gf7MMzteuvC+lMBjGfbRkbYwyTavhIYGxLMJTCEhArUfVoZJzRIlW2zfaICXVfAjnDMRUa4rMy2NlEFEAnbLiwr266h3K63Lqw/FQjFtp3Onf5E21cCY4MRyiUwBCZRBUJI2OkEJtFwYQ9jgxHK5aSfwCSqQAgJP70w6cclM981lML2iQp0XYFQbPvpyAh3+hNtX7se7rvX3wcjlMKdfkJCBeru9CM9IcL89N35ZglU4GEV8KM6lIKM1ByS/VrfPuzV8uxUYBcFfq1vQ3j46QVgcELju4ZSFovlLtXlsVTgYRVYLJah2PbTkZGay8qbzWaxWLKfedi7zrPXUODX+rYSLRLq8/n3+fz7YrGsuXHpU8gUKpCCAgQmhbvMa2xMAQLTmJQsKAUFCEwKd5nX2JgC9Sf9jVWBBVGBdivQwLNk7b5A1o4KNKlAYVkZN2WaPAnLogJ9UQAZqbnT3xcpeB1UYLsCBGa7RvSgAqpAARgcn1XdAdUSaVCBHiugwMzn3x/Jnr8kEZge33VeWj0FFotlARhZMpvNvpKWeoLyqN4rIMzM5983mw03Lnt/u3mBTSoQBIYdTpMys6yuKRCK/xJgcNAmozd5sBkvWQdyOLxzzkEfFWc2+0oNuxU/oUlKCTB4m9WWAZxes66tqYPEhDpsNhv6oDjUp3OxMZt9xTqLXQIMA52BrgqwoXSYKQFGOgfEhsMJVI1DTcWpr0NN2WvBm672/wBMjYyrp4LAIgAAAABJRU5ErkJggg==",x={small:36,medium:60,large:136}[null!=i?i:"large"],b={width:"".concat(x,"px"),height:"".concat(x,"px")},w=a()(a()({},b),u),j=h?"function"==typeof h?h:function(){return h}:void 0,C=a()(a()({},f),y),A=function(e){return(0,l.jsx)("div",{className:e?"pnt-image-progress":"pnt-image-upload-progress",style:u,children:(0,l.jsxs)("div",{className:"pnt-image-loading",children:[(0,l.jsx)(c.LoadingIcon,{size:"18px",name:"loading"}),(0,l.jsx)("p",{children:C.uploading})]})})},E=(0,l.jsxs)(s.Space,{direction:"vertical",align:"center",size:"small",style:{color:"var(--td-text-color-disabled)"},children:[(0,l.jsx)(c.ImageIcon,{size:24}),C.loading]}),k=(0,l.jsxs)(s.Space,{direction:"vertical",align:"center",size:"small",children:[(0,l.jsx)(c.ImageErrorIcon,{size:24}),C.loadFailed]});return(0,l.jsx)("div",{className:"pnt-image-wrapper",onClick:function(e){m&&(null!=t&&t.length||p)&&e.stopPropagation()},children:m&&p?A(!1):(0,l.jsx)(s.ImageViewer,{images:[g],closeOnOverlay:!0,attach:j,trigger:function(e){var r=e.open,o=m?function(e){return(0,l.jsxs)("div",{className:"pnt-image-mask pnt-image-mask--upload",children:[(0,l.jsx)("span",{children:(0,l.jsx)(c.BrowseIcon,{onClick:e,size:"16px",name:"browse"})}),(0,l.jsx)("span",{className:"pnt-image-divider"}),(0,l.jsx)("span",{children:(0,l.jsx)(c.DeleteIcon,{onClick:v,size:"16px",name:"delete"})})]})}(r):function(e){return(0,l.jsx)("div",{className:"pnt-image-mask pnt-image-mask--basic",style:{background:"rgba(0,0,0,.1)",height:"100%"},onClick:e})}(r);return(0,l.jsx)(s.Image,{alt:n,src:g,loading:m?A(!0):E,error:m?void 0:k,overlayContent:m?t?o:(0,l.jsx)(l.Fragment,{}):o,overlayTrigger:"hover",fit:"contain",className:"pnt-image",style:w})}})})},p=i(650),v=i.n(p),h=i(705),y=i.n(h),m=i(842),g=i.n(m),x=i(50),b=i.n(x),w=function(e,t,r){return e.post(r||"/v3/business/game_info/high-security-decrypt?audience=/laas-pnt",t)},j=function(t){var r=t.value,o=t.onChange,i=t.multiple,u=void 0!==i&&i,c=t.scene,f=void 0===c?"default":c,d=t.statuses,p=t.businessTypes,h=t.businessAccessMethod,m=t.labelFormat,x=void 0===m?"name":m,w=t.labelField,j=t.optionLabel,C=t.pagination,A=void 0===C||C,E=t.onLoaded,k=t.placeholder,M=t.disabled,S=t.clearable,I=void 0===S||S,L=t.filterable,P=void 0===L||L,O=t.max,G=t.pageSize,T=void 0===G?20:G,Q=t.searchDebounce,D=void 0===Q?400:Q,V=t.minCollapsedNum,N=t.collapsedItems,B=t.popupProps,R=t.fields,z=t.optionDisabled,Y=t.optionTooltip,q=t.tooltipPlacement,U=void 0===q?"top":q,K=t.className,F=t.style,J=n().http,W=(0,e.useCallback)((function(e){return t=e,J.post("/business/select/list?audience=/player-network",t);var t}),[J]),Z=(0,e.useState)([]),_=b()(Z,2),X=_[0],H=_[1],$=(0,e.useState)(!1),ee=b()($,2),te=ee[0],re=ee[1],ne=(0,e.useRef)(),oe=(0,e.useRef)(!1),ae=(0,e.useRef)(new Map),ie=(0,e.useRef)(new Set),ue=(0,e.useState)(0),ce=b()(ue,2),se=ce[0],le=ce[1],fe=(0,e.useRef)(E);fe.current=E;var de=(0,e.useRef)([]),pe=(0,e.useRef)(0),ve=(0,e.useRef)(!1),he=(0,e.useRef)({keyword:"",page:0,total:0}),ye=(0,e.useRef)(""),me=(0,e.useRef)(0),ge=(R||[]).join(","),xe=(d||[]).join(","),be=(p||[]).join(","),we=(0,e.useCallback)((function(e,t){return{keyword:e||void 0,pageNum:A?t:0,pageSize:A?T:0,scene:f,statuses:d,business_types:p,business_access_method:h,fields:R}}),[f,xe,be,h,T,ge,A]),je=(0,e.useCallback)(function(){var e=g()(v()().mark((function e(t,r,n){var o,a,i,u,c,s,l,f,d;return v()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!n){e.next=11;break}if(!ve.current&&!oe.current){e.next=3;break}return e.abrupt("return");case 3:if((o=he.current).keyword===t){e.next=6;break}return e.abrupt("return");case 6:if(!(r<=o.page)){e.next=8;break}return e.abrupt("return");case 8:if(!(de.current.length>=o.total)){e.next=10;break}return e.abrupt("return");case 10:ve.current=!0;case 11:return a=++pe.current,oe.current=!0,re(!0),e.prev=14,e.next=17,W(we(t,r));case 17:if(i=e.sent,a===pe.current){e.next=20;break}return e.abrupt("return");case 20:0===i.code&&i.data&&(s=i.data.list||[],l=(null===(u=i.data.pagination)||void 0===u?void 0:u.total)||0,n?(d=new Set(de.current.map((function(e){return e.game_id}))),f=[].concat(y()(de.current),y()(s.filter((function(e){return!d.has(e.game_id)}))))):(f=s,me.current=Date.now()),de.current=f,he.current={keyword:t,page:r,total:l},H(f),null===(c=fe.current)||void 0===c||c.call(fe,f)),e.next=25;break;case 23:e.prev=23,e.t0=e.catch(14);case 25:return e.prev=25,n&&(ve.current=!1),a===pe.current&&(oe.current=!1,re(!1)),e.finish(25);case 29:case"end":return e.stop()}}),e,null,[[14,23,25,29]])})));return function(t,r,n){return e.apply(this,arguments)}}(),[W,we]),Ce=(0,e.useCallback)((function(e){ye.current=e,ne.current&&clearTimeout(ne.current),ne.current=setTimeout((function(){je(ye.current,1,!1)}),D)}),[je,D]),Ae=(0,e.useCallback)((function(){if(!(Date.now()-me.current<200)){var e=he.current;je(e.keyword,e.page+1,!0)}}),[je]),Ee=(0,e.useCallback)((function(e){e||(ne.current&&clearTimeout(ne.current),ye.current="",he.current.keyword&&je("",1,!1))}),[je]);(0,e.useEffect)((function(){je("",1,!1)}),[je]),(0,e.useEffect)((function(){var e=(Array.isArray(r)?r:r?[r]:[]).map(String);X.forEach((function(t){t.game_id&&e.includes(t.game_id)&&ae.current.set(t.game_id,t)}))}),[X,r]),(0,e.useEffect)((function(){if(A){var e=(Array.isArray(r)?r:r?[r]:[]).map(String),t=new Set(X.map((function(e){return e.game_id})).filter(Boolean)),n=e.filter((function(e){return e&&!t.has(e)&&!ae.current.has(e)&&!ie.current.has(e)}));if(0!==n.length){n.forEach((function(e){return ie.current.add(e)}));var o=!1;return g()(v()().mark((function e(){var t,r;return v()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,W(a()(a()({},we("",1)),{},{pageNum:1,pageSize:n.length,game_ids:n,keyword:void 0}));case 3:if(r=e.sent,!o&&0===r.code&&null!==(t=r.data)&&void 0!==t&&t.list){e.next=6;break}return e.abrupt("return");case 6:r.data.list.forEach((function(e){e.game_id&&ae.current.set(e.game_id,e)})),le((function(e){return e+1})),e.next=12;break;case 10:e.prev=10,e.t0=e.catch(0);case 12:case"end":return e.stop()}}),e,null,[[0,10]])})))(),function(){o=!0}}}}),[r,X,W,we,A]),(0,e.useEffect)((function(){return function(){ne.current&&clearTimeout(ne.current)}}),[]);var ke=(0,e.useCallback)((function(e){if(w)return e[w]||e.name||"";var t=e.name||"",r=e.name_en||"",n=e.game_id||"";switch(x){case"name_en":return r||t;case"name_id":return"".concat(t,"(").concat(n,")");case"name_en_id":return"".concat(r,"(").concat(n,")");default:return t}}),[x,w]),Me=(0,e.useCallback)((function(e){return j?j(e):ke(e)}),[j,ke]),Se=(0,e.useCallback)((function(e){return("compliance_age"===f||"custom_region"===f)&&!1===e.creatable||!!z&&z(e)}),[f,z]),Ie=(0,e.useCallback)((function(e){return Y?Y(e):""}),[Y]),Le=(0,e.useMemo)((function(){var e=new Map;return X.forEach((function(t){t.game_id&&e.set(t.game_id,{label:ke(t),content:Me(t),value:t.game_id,disabled:Se(t),name:t.name,name_en:t.name_en,game_id:t.game_id,rawItem:t})})),(Array.isArray(r)?r:r?[r]:[]).map(String).forEach((function(t){if(!e.has(t)){var r=ae.current.get(t);r?e.set(t,{label:ke(r),content:Me(r),value:t,disabled:Se(r),name:r.name,name_en:r.name_en,game_id:r.game_id,rawItem:r}):e.set(t,{label:t,content:t,value:t,disabled:!1})}})),Array.from(e.values())}),[X,r,Me,ke,Se,se]),Pe=(0,e.useCallback)((function(e,t){if(!e)return!0;var r=e.toLowerCase(),n=t,o=null==n?void 0:n.rawItem;return o?Object.values(o).some((function(e){return"string"==typeof e&&e.toLowerCase().includes(r)})):((null==n?void 0:n.name)||"").toLowerCase().includes(r)||((null==n?void 0:n.name_en)||"").toLowerCase().includes(r)||((null==n?void 0:n.game_id)||"").includes(r)}),[]),Oe=s.Select.Option,Ge=!!Y,Te=P&&A,Qe=A,De=(0,e.useMemo)((function(){return null==r?r:Array.isArray(r)?r.map(String):String(r)}),[r]),Ve=(0,e.useCallback)((function(e,t){if(o){var r=(Array.isArray(e)?e:null!=e?[e]:[]).map(String),n=(null==t?void 0:t.selectedOptions)||[],i=r.map((function(e){var t=de.current.find((function(t){return t.game_id===e}))||ae.current.get(e);if(t)return a()(a()({},t),{},{value:t.game_id,label:ke(t)});var r=n.find((function(t){return String(t.value)===e}));if(r){var o=a()({},r);return delete o.children,delete o.content,o}return{value:e,label:e}}));o(e,a()(a()({},t),{},{selectedOptions:u?i:i.slice(0,1)}))}}),[o,u,ke]),Ne=(0,e.useCallback)((function(){ye.current="",ne.current&&clearTimeout(ne.current),he.current.keyword&&je("",1,!1)}),[je]);return(0,l.jsx)(s.Select,{value:De,onChange:Ve,filterable:P,filter:Te?void 0:P?Pe:void 0,onSearch:Te?Ce:void 0,onClear:Te?Ne:void 0,loading:te&&0===X.length,multiple:u,max:O,clearable:I,disabled:M,placeholder:k,minCollapsedNum:V,collapsedItems:N,onPopupVisibleChange:Ee,panelBottomContent:X.length>0&&te?(0,l.jsx)(s.Loading,{loading:!0,size:"small"}):null,popupProps:a()(a()({},B),{},{overlayClassName:["pnt-business-select-popup",null==B?void 0:B.overlayClassName].filter(Boolean).join(" "),onScrollToBottom:Qe?Ae:void 0}),className:K?"pnt-business-select ".concat(K):"pnt-business-select",style:F,children:Le.map((function(e){var t=e.rawItem,r=Ge&&t?Ie(t):"",n=a()(a()({},t||{}),{},{value:e.value,label:e.label,disabled:e.disabled});return(0,l.jsx)(Oe,a()(a()({},n),{},{children:r?(0,l.jsx)(s.Tooltip,{content:r,placement:U,children:(0,l.jsx)("span",{className:"pnt-business-select-option-label",children:e.content})}):e.content}),e.value)}))})},C=i(65),A=i.n(C),E=i(300),k=function(e,t,r){return"".concat(e,":").concat(t,":").concat(r)},M=new Map,S=new Map,I=new Set,L=function(){I.forEach((function(e){return e()}))},P=function(e){return I.add(e),function(){I.delete(e)}},O=function(){return M},G=function(e,t,r){if(r.length){var n=new Map(M);r.forEach((function(r){n.set(k(e,t,r.cacheKey||r.key),r.value)})),M=n,L()}},T=function(e){var t=new Map;M.forEach((function(r,n){(function(e,t){if(!t||void 0===t.gameId&&void 0===t.env)return!0;var r=e.split(":"),n=b()(r,2),o=n[0],a=n[1];return!(void 0!==t.gameId&&o!==String(t.gameId)||void 0!==t.env&&a!==String(t.env))})(n,e)||t.set(n,r)})),t.size!==M.size&&(M=t,L())},Q=function(t){var r=n(),o=r.http,i=r.highSecurity,u=(0,E.useSyncExternalStore)(P,O,O),c=void 0===(null==t?void 0:t.gameId)?void 0:String(t.gameId),s=void 0===(null==t?void 0:t.env)?void 0:String(t.env),l=void 0!==c&&void 0!==s,f=null==t?void 0:t.scope,d=(0,e.useMemo)((function(){if(!l)return{};var e="".concat(c,":").concat(s,":"),t={};return u.forEach((function(r,n){n.startsWith(e)&&(t[n.slice(e.length)]=r)})),t}),[u,l,c,s]),p=(0,e.useCallback)((function(e){return!!l&&u.has(k(c,s,e))}),[u,l,c,s]),h=(0,e.useCallback)(function(){var e=g()(v()().mark((function e(t){var r,n,c,s,l,d,p,h,y,m,x,b,j,C,E,M,I,L,P,O;return v()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.gameId,c=t.env,s=t.pageId,l=t.param,d=t.apiConfig,p=t.scope,h=String(n),y=String(null!=c?c:0),m=a()(a()({},i),d),x=m.successCodeField||"code",b=new Array(l.length),j=[],C=[],l.forEach((function(e,t){var r=e.cacheKey||e.key,n=u.get(k(h,y,r));void 0!==n?b[t]={key:e.key,value:n,cacheKey:r}:(j.push({key:e.key,value:e.value}),C.push(t))})),j.length){e.next=11;break}return e.abrupt("return",b.filter((function(e){return void 0!==e})));case 11:if(E={game_id:Number(n),env:Number(null!=c?c:0),page_id:s||("undefined"!=typeof window&&window.location?window.location.pathname:""),param:j},M=null!==(r=null!=p?p:f)&&void 0!==r?r:"business",I="platform"===M?m.decryptPlatUrl||"/v3/business/game_info/plat-high-security-decrypt?audience=/laas-pnt":m.decryptUrl||"/v3/business/game_info/high-security-decrypt?audience=/laas-pnt",L="".concat(h,":").concat(y,":").concat(j.map((function(e){return"".concat(e.key,"").concat(e.value)})).join("")),!(P=S.get(L))){e.next=18;break}return e.abrupt("return",P);case 18:return O=g()(v()().mark((function e(){var t,r,n,a,i;return v()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,w(o,E,I);case 3:r=e.sent,0===Number(null!==(t=r[x])&&void 0!==t?t:r.code)&&Array.isArray(r.data)?(n=r.data.map((function(e){if(e&&"object"===A()(e)&&"key"in e){var t,r=e;if("string"==typeof r.key)return{key:r.key,value:String(null!==(t=r.value)&&void 0!==t?t:"")}}return null})).filter((function(e){return null!==e})),a=n.map((function(e){var t=C.find((function(t){return l[t].key===e.key})),r=void 0!==t&&l[t].cacheKey||e.key;return{key:e.key,value:e.value,cacheKey:r}})),G(h,y,a),n.forEach((function(e){var t=C.find((function(t){return l[t].key===e.key}));void 0!==t&&(b[t]=e)}))):console.warn("[pnt-component-frontend] high-security-decrypt 解锁失败",null!==(i=null==r?void 0:r.msg)&&void 0!==i?i:r[x]),e.next=11;break;case 8:e.prev=8,e.t0=e.catch(0),console.warn("[pnt-component-frontend] high-security-decrypt 请求异常",e.t0);case 11:return e.prev=11,S.delete(L),e.finish(11);case 14:return e.abrupt("return",b.filter((function(e){return void 0!==e})));case 15:case"end":return e.stop()}}),e,null,[[0,8,11,14]])})))(),S.set(L,O),e.abrupt("return",O);case 21:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),[o,u,i,f]);return{securityData:d,requestSecurityData:h,clearSecurityData:(0,e.useCallback)((function(e){T(e)}),[]),isUnlocked:p}},D=i(286),V=i.n(D),N=function(e){var t=String(e);if(!t.includes("_high_security_:"))return!1;var r=t.split(":"),n=r.slice(0,-1).join(":"),o=parseInt(r[r.length-1],10);if(isNaN(o))return!1;var a,i=0,u=V()(n);try{for(u.s();!(a=u.n()).done;){i+=a.value.charCodeAt(0)}}catch(e){u.e(e)}finally{u.f()}return i===o},B=function(t){var r=t.dataKey,n=t.dataValue,o=t.env,a=t.gameId,i=t.renderDom,u=t.viewText,c=t.pageId,s=t.maskPlain,f=t.scope,d=t.copyable,p=void 0===d||d,h=t.copyText,y=t.copySuccessText,m=void 0===y?"Copied":y,x=t.onCopy,w=t.cacheKey,j=t.onSecurityDataChange,C=w||r,A=Q({gameId:a,env:o,scope:f}),E=A.securityData,k=A.isUnlocked,M=A.requestSecurityData,S=(0,e.useState)(!1),I=b()(S,2),L=I[0],P=I[1],O=(0,e.useState)(!1),G=b()(O,2),T=G[0],D=G[1],V=(0,e.useRef)(null);(0,e.useEffect)((function(){return function(){V.current&&clearTimeout(V.current)}}),[]);var B=N(n),R=B?k(C):!s||L,z=R?B?E[C]||"******":n:"******";(0,e.useEffect)((function(){null==j||j(E)}),[E,j]);var Y=(0,e.useCallback)(g()(v()().mark((function e(){var t;return v()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=R?B?E[C]||"":n:"",!x){e.next=5;break}return e.next=4,x(t);case 4:return e.abrupt("return");case 5:return e.prev=5,e.next=8,navigator.clipboard.writeText(t);case 8:m&&(V.current&&clearTimeout(V.current),D(!0),V.current=setTimeout((function(){return D(!1)}),2e3)),e.next=14;break;case 11:e.prev=11,e.t0=e.catch(5),console.warn("[pnt-component-frontend] 复制失败",e.t0);case 14:case"end":return e.stop()}}),e,null,[[5,11]])}))),[R,B,E,C,n,x,m]),q=!R,U=R&&(B||!!s)&&p;return(0,l.jsx)("div",{className:"pnt-secure-box",children:(0,l.jsxs)(l.Fragment,{children:[i(z),q&&(0,l.jsx)("span",{className:"view-icon",onClick:function(){B?M({env:o,gameId:a,pageId:c,param:[{key:r,value:n,cacheKey:C}]}):s&&P(!0)},children:u||"View"}),U&&(0,l.jsx)("span",{className:"copy-icon",onClick:Y,children:T&&m?m:h||"Copy"})]})})},R=function(e){var t=e.className,r=e.headerTitle,n=e.showBackButton,o=void 0!==n&&n,a=e.onBackButtonClick,i=e.headerBordered,u=void 0===i||i,f=e.subHeaderContent,d=e.operation,p=e.bodyRef,v=e.children,h=e.bodyStyle,y=e.bodyPadding,m=void 0===y?24:y,g=e.cardRadius,x=void 0===g?4:g,b=e.footerButton,w=void 0===b?"fixed":b,j=e.footer,C=s.Layout.Header,A=s.Layout.Footer,E=["pnt-general-layout",!u&&"pnt-general-layout--borderless","auto"===w&&"pnt-general-layout--footer-auto",t].filter(Boolean).join(" "),k={"--pnt-layout-body-padding":"number"==typeof m?"".concat(m,"px"):m,"--pnt-layout-card-radius":"".concat(x,"px")};return(0,l.jsxs)(s.Layout,{className:E,style:k,children:[r&&(0,l.jsxs)(C,{children:[(0,l.jsxs)("span",{className:"header-title",children:[o&&(0,l.jsx)(c.ArrowLeftIcon,{className:"goback-icon",size:"24px",onClick:a}),(0,l.jsx)("span",{className:"title",children:r})]}),d&&(0,l.jsx)("span",{className:"header-operation",children:d})]}),f&&(0,l.jsx)("div",{className:"general-layout-sub-header",children:f}),(0,l.jsx)("div",{className:"general-layout-body",ref:p,style:h,children:v}),j&&(0,l.jsx)(A,{children:j})]})}}(),u}()}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pnt-team/pnt-component-frontend",
3
- "version": "0.0.109",
3
+ "version": "0.0.111",
4
4
  "description": "PNT 前端业务组件库 — 提供 PntImage(图片预览/上传)、PntBusinessSelect(业务选择器)、PntSecureBox(高敏信息展示)、PntGeneralLayout(通用布局)等组件",
5
5
  "license": "MIT",
6
6
  "exports": {
@@ -94,7 +94,7 @@
94
94
  "react-dom": "^18.0.0",
95
95
  "sass": "^1.90.0",
96
96
  "stylelint": "^14.9.1",
97
- "ts-jest": "^29.4.5"
97
+ "ts-jest": "29.4.5"
98
98
  },
99
99
  "peerDependencies": {
100
100
  "cos-js-sdk-v5": ">=1.8.0",