diff --git a/OAT.xml b/OAT.xml
index b89daba89..2d31a0643 100644
--- a/OAT.xml
+++ b/OAT.xml
@@ -150,9 +150,34 @@ Note:If the text contains special characters, please escape them according to th
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -682,6 +707,22 @@ Note:If the text contains special characters, please escape them according to th
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -768,6 +809,14 @@ Note:If the text contains special characters, please escape them according to th
+
+
+
+
+
+
+
+
diff --git a/README_zh.md b/README_zh.md
index c6c6f231c..2fc40eac2 100644
--- a/README_zh.md
+++ b/README_zh.md
@@ -49,7 +49,7 @@
|
- 基础特性 |
+ 基础特性 |
能力增强 |
基础能力增强 |
|
@@ -146,7 +146,6 @@
文件管理 |
应用接入数据备份恢复(API 11) |
文件管理(API 11) |
- 媒体管理合集 |
文件分享与访问 |
@@ -156,13 +155,6 @@
|
|
-
- 意图 |
- 意图执行 |
- |
- |
- |
-
设备管理 |
位置服务 |
@@ -243,7 +235,7 @@
|
-系统特性(仅对系统应用开放) |
+系统特性(仅对系统应用开放) |
能力增强 |
基础能力增强 |
|
@@ -369,7 +361,7 @@
文件管理 |
选择并查看文档与媒体文件(API 10) |
相册(API 12) |
- |
+ 媒体管理合集 |
|
@@ -379,13 +371,6 @@
|
|
-
- 意图 |
- 意图执行 |
- |
- |
- |
-
电话服务 |
小鸟避障游戏 |
@@ -586,7 +571,6 @@ code
|---DeviceManagement # 设备管理
|---FileManagement # 文件管理
|---Graphics # 图像
- |---InsightIntent # 意图
|---International # 国际化
|---Media # 媒体
|---Native # Native c++
@@ -609,7 +593,6 @@ code
|---DistributedAppDev # 分布式
|---FileManagement # 文件管理
|---IDL # IDL
- |---InsightIntent # 意图
|---Internationalnation # 国际化
|---Media # 媒体
|---Notification # 通知
diff --git a/code/BasicFeature/ApplicationModels/BundleManager/BundleManagement/README_zh.md b/code/BasicFeature/ApplicationModels/BundleManager/BundleManagement/README_zh.md
index 4a8de9452..72307d548 100755
--- a/code/BasicFeature/ApplicationModels/BundleManager/BundleManagement/README_zh.md
+++ b/code/BasicFeature/ApplicationModels/BundleManager/BundleManagement/README_zh.md
@@ -47,8 +47,9 @@ entry/src/main/ets/
* 获取当前应用的BundleInfo:bundleManager.getBundleInfoForSelf()
* 获取BundleInfo(sync):bundleManager.getBundleInfoForSelfSync()
* 获取配置json:bundleManager.getProfileByAbility()
-* 获取配置json(sync):bundleManager.getProfileByExtensionAbility()
-* 获取配置数组:bundleManager.getProfileByExtensionAbilitySync()
+* 获取配置json(sync):bundleManager.getProfileByAbilitySync()
+* 获取配置数组:bundleManager.getProfileByExtensionAbility()
+* 获取配置数组(sync):bundleManager.getProfileByExtensionAbilitySync()
* 校验.abc文件:bundleManager.verifyAbc()
* 删除.abc文件:bundleManager.deleteAbc()
* 校验链接是否可打开:bundleManager.canOpenLink()
diff --git a/code/BasicFeature/ApplicationModels/BundleManager/BundleManagement/entry/src/main/ets/pages/Index.ets b/code/BasicFeature/ApplicationModels/BundleManager/BundleManagement/entry/src/main/ets/pages/Index.ets
index b92949677..edb260641 100755
--- a/code/BasicFeature/ApplicationModels/BundleManager/BundleManagement/entry/src/main/ets/pages/Index.ets
+++ b/code/BasicFeature/ApplicationModels/BundleManager/BundleManagement/entry/src/main/ets/pages/Index.ets
@@ -41,13 +41,38 @@ struct Index {
{
text: $r('app.string.GetBundleInfo'),
callback: () => {
- let bundleFlags = bundleManager.BundleFlag.GET_BUNDLE_INFO_WITH_APPLICATION;
+ let bundleFlags = bundleManager.BundleFlag.GET_BUNDLE_INFO_WITH_ABILITY |
+ bundleManager.BundleFlag.GET_BUNDLE_INFO_WITH_HAP_MODULE;
try {
bundleManager.getBundleInfoForSelf(bundleFlags).then((data) => {
hilog.info(DOMAIN_NUMBER, TAG, 'getBundleInfoForSelf success. Data: %{public}s',
JSON.stringify(data));
promptAction.showToast({
- message: JSON.stringify(data), duration: 3000
+ message: JSON.stringify(data), duration: 5000
+ });
+ }).catch((err: BusinessError) => {
+ hilog.error(DOMAIN_NUMBER, TAG, 'getBundleInfoForSelf failed. Cause: %{public}s', err.message);
+ });
+ } catch (err) {
+ let message = (err as BusinessError).message;
+ hilog.error(DOMAIN_NUMBER, TAG, 'getBundleInfoForSelf failed: %{public}s', message);
+ }
+ }
+ },
+ {
+ text: $r('app.string.GetBundleInfoCombination'),
+ callback: () => {
+ let bundleFlags = bundleManager.BundleFlag.GET_BUNDLE_INFO_WITH_METADATA |
+ bundleManager.BundleFlag.GET_BUNDLE_INFO_WITH_APPLICATION |
+ bundleManager.BundleFlag.GET_BUNDLE_INFO_WITH_HAP_MODULE |
+ bundleManager.BundleFlag.GET_BUNDLE_INFO_WITH_EXTENSION_ABILITY |
+ bundleManager.BundleFlag.GET_BUNDLE_INFO_WITH_ABILITY;
+ try {
+ bundleManager.getBundleInfoForSelf(bundleFlags).then((data) => {
+ hilog.info(DOMAIN_NUMBER, TAG, 'getBundleInfoForSelf success. Data: %{public}s',
+ JSON.stringify(data));
+ promptAction.showToast({
+ message: JSON.stringify(data), duration: 5000
});
}).catch((err: BusinessError) => {
hilog.error(DOMAIN_NUMBER, TAG, 'getBundleInfoForSelf failed. Cause: %{public}s', err.message);
@@ -66,7 +91,7 @@ struct Index {
let data = bundleManager.getBundleInfoForSelfSync(bundleFlags);
hilog.info(DOMAIN_NUMBER, TAG, 'getBundleInfoForSelfSync success: %{public}s', JSON.stringify(data));
promptAction.showToast({
- message: JSON.stringify(data), duration: 3000
+ message: JSON.stringify(data), duration: 5000
});
} catch (err) {
let message = (err as BusinessError).message;
@@ -92,7 +117,7 @@ struct Index {
} else {
hilog.info(DOMAIN_NUMBER, TAG, 'getProfileByAbility success: %{public}s', JSON.stringify(data));
promptAction.showToast({
- message: JSON.stringify(data), duration: 3000
+ message: JSON.stringify(data), duration: 5000
});
}
});
@@ -102,6 +127,24 @@ struct Index {
}
}
},
+ {
+ text: $r('app.string.GetConfigurationJsonSync'),
+ callback: () => {
+ let moduleName = 'entry';
+ let abilityName = 'EntryAbility';
+ let metadataName = 'ohos.ability.shortcuts';
+ try {
+ let data = bundleManager.getProfileByAbilitySync(moduleName, abilityName, metadataName);
+ hilog.info(DOMAIN_NUMBER, TAG, 'getProfileByAbilitySync successfully: %{public}s', JSON.stringify(data));
+ promptAction.showToast({
+ message: JSON.stringify(data), duration: 5000
+ });
+ } catch (err) {
+ let message = (err as BusinessError).message;
+ hilog.error(DOMAIN_NUMBER, TAG, 'getProfileByAbilitySync failed. Cause: %{public}s', message);
+ }
+ }
+ },
{
text: $r('app.string.GetConfigurationArray'),
callback: () => {
@@ -117,7 +160,7 @@ struct Index {
hilog.info(DOMAIN_NUMBER, TAG, 'getProfileByExtensionAbility success: %{public}s',
JSON.stringify(data));
promptAction.showToast({
- message: JSON.stringify(data), duration: 3000
+ message: JSON.stringify(data), duration: 5000
});
}
});
@@ -128,27 +171,18 @@ struct Index {
}
},
{
- text: $r('app.string.GetConfigurationJsonSync'),
+ text: $r('app.string.GetConfigurationArraySync'),
callback: () => {
let moduleName = 'entry';
let extensionAbilityName = 'NewUIExtAbility';
let metadataName = 'ohos.ability.NewUIExtAbility';
- try {
- let data = bundleManager.getProfileByExtensionAbilitySync(moduleName, extensionAbilityName);
- hilog.info(DOMAIN_NUMBER, TAG, 'getProfileByExtensionAbilitySync successfully. Data: %{public}s',
- JSON.stringify(data));
- promptAction.showToast({
- message: JSON.stringify(data), duration: 3000
- });
- } catch (err) {
- let message = (err as BusinessError).message;
- hilog.error(DOMAIN_NUMBER, TAG, 'getProfileByExtensionAbilitySync failed. Cause: %{public}s', message);
- }
-
try {
let data = bundleManager.getProfileByExtensionAbilitySync(moduleName, extensionAbilityName, metadataName);
hilog.info(DOMAIN_NUMBER, TAG, 'getProfileByExtensionAbilitySync successfully. Data: %{public}s',
JSON.stringify(data));
+ promptAction.showToast({
+ message: JSON.stringify(data), duration: 5000
+ });
} catch (err) {
let message = (err as BusinessError).message;
hilog.error(DOMAIN_NUMBER, TAG, 'getProfileByExtensionAbilitySync failed. Cause: %{public}s', message);
@@ -168,7 +202,7 @@ struct Index {
bundleManager.verifyAbc(abcPaths, true).then((data) => {
hilog.info(DOMAIN_NUMBER, TAG, 'verifyAbc successfully' + JSON.stringify(data));
promptAction.showToast({
- message: 'success', duration: 3000
+ message: 'success', duration: 5000
});
}).catch((err: BusinessError) => {
hilog.error(DOMAIN_NUMBER, TAG, 'verifyAbc err: %{public}s', err.message);
@@ -187,7 +221,7 @@ struct Index {
bundleManager.deleteAbc(abcPath).then(() => {
hilog.info(DOMAIN_NUMBER, TAG, 'deleteAbc successfully');
promptAction.showToast({
- message: 'success', duration: 3000
+ message: 'success', duration: 5000
});
}).catch((err: BusinessError) => {
hilog.error(DOMAIN_NUMBER, TAG, 'deleteAbc failed. err: %{public}s', err.message);
@@ -211,7 +245,7 @@ struct Index {
let data = bundleManager.canOpenLink(link);
hilog.info(DOMAIN_NUMBER, TAG, 'canOpenLink successfully: %{public}s', JSON.stringify(data));
promptAction.showToast({
- message: JSON.stringify(data), duration: 3000
+ message: JSON.stringify(data), duration: 5000
});
} catch (err) {
let message = (err as BusinessError).message;
@@ -231,7 +265,7 @@ struct Index {
.then((data) => {
hilog.info(DOMAIN_NUMBER, TAG, 'Operation successful. IsDefaultApplication ? ' + JSON.stringify(data));
promptAction.showToast({
- message: JSON.stringify(data), duration: 3000
+ message: JSON.stringify(data), duration: 5000
});
}).catch((error: BusinessError) => {
hilog.error(DOMAIN_NUMBER, TAG, 'Operation failed. Cause: ' + JSON.stringify(error));
@@ -246,7 +280,7 @@ struct Index {
hilog.info(DOMAIN_NUMBER, TAG, 'Operation successful. IsDefaultApplicationSync ? ' +
JSON.stringify(data));
promptAction.showToast({
- message: JSON.stringify(data), duration: 3000
+ message: JSON.stringify(data), duration: 5000
});
} catch (error) {
hilog.error(DOMAIN_NUMBER, TAG, 'Operation failed. Cause: ' + JSON.stringify(error));
@@ -297,7 +331,7 @@ struct Index {
let overlayModuleInfo = await overlay.getOverlayModuleInfo(moduleName);
hilog.info(DOMAIN_NUMBER, TAG, 'overlayModuleInfo is ' + JSON.stringify(overlayModuleInfo));
promptAction.showToast({
- message: JSON.stringify(overlayModuleInfo), duration: 3000
+ message: JSON.stringify(overlayModuleInfo), duration: 5000
});
} catch (err) {
let code = (err as BusinessError).code;
@@ -317,7 +351,7 @@ struct Index {
let overlayModuleInfos = await overlay.getTargetOverlayModuleInfos(targetModuleName);
hilog.info(DOMAIN_NUMBER, TAG, 'overlayModuleInfos are ' + JSON.stringify(overlayModuleInfos));
promptAction.showToast({
- message: JSON.stringify(overlayModuleInfos), duration: 3000
+ message: JSON.stringify(overlayModuleInfos), duration: 5000
});
} catch (err) {
let code = (err as BusinessError).code;
diff --git a/code/BasicFeature/ApplicationModels/BundleManager/BundleManagement/entry/src/main/resources/base/element/string.json b/code/BasicFeature/ApplicationModels/BundleManager/BundleManagement/entry/src/main/resources/base/element/string.json
index 3e9be5c28..0f20baa1b 100755
--- a/code/BasicFeature/ApplicationModels/BundleManager/BundleManagement/entry/src/main/resources/base/element/string.json
+++ b/code/BasicFeature/ApplicationModels/BundleManager/BundleManagement/entry/src/main/resources/base/element/string.json
@@ -56,6 +56,10 @@
"name": "GetBundleInfo",
"value": "获取BundleInfo"
},
+ {
+ "name": "GetBundleInfoCombination",
+ "value": "获取BundleInfo(组合参数)"
+ },
{
"name": "GetBundleInfoSync",
"value": "获取BundleInfo(sync)"
@@ -72,6 +76,10 @@
"name": "GetConfigurationArray",
"value": "获取配置数组"
},
+ {
+ "name": "GetConfigurationArraySync",
+ "value": "获取配置数组(sync)"
+ },
{
"name": "GetConfigurationJsonSync",
"value": "获取配置json(sync)"
diff --git a/code/BasicFeature/ApplicationModels/BundleManager/BundleManagement/entry/src/main/resources/en_US/element/string.json b/code/BasicFeature/ApplicationModels/BundleManager/BundleManagement/entry/src/main/resources/en_US/element/string.json
index 6879194ae..9ad228056 100755
--- a/code/BasicFeature/ApplicationModels/BundleManager/BundleManagement/entry/src/main/resources/en_US/element/string.json
+++ b/code/BasicFeature/ApplicationModels/BundleManager/BundleManagement/entry/src/main/resources/en_US/element/string.json
@@ -56,6 +56,10 @@
"name": "GetBundleInfo",
"value": "GetBundleInfo"
},
+ {
+ "name": "GetBundleInfoCombination",
+ "value": "GetBundleInfoCombination"
+ },
{
"name": "GetBundleInfoSync",
"value": "GetBundleInfoSync"
@@ -72,6 +76,10 @@
"name": "GetConfigurationArray",
"value": "GetConfigurationArray"
},
+ {
+ "name": "GetConfigurationArraySync",
+ "value": "GetConfigurationArraySync"
+ },
{
"name": "GetConfigurationJsonSync",
"value": "GetConfigurationJsonSync"
diff --git a/code/BasicFeature/ApplicationModels/BundleManager/BundleManagement/entry/src/main/resources/zh_CN/element/string.json b/code/BasicFeature/ApplicationModels/BundleManager/BundleManagement/entry/src/main/resources/zh_CN/element/string.json
index 489f92a36..0bace9364 100755
--- a/code/BasicFeature/ApplicationModels/BundleManager/BundleManagement/entry/src/main/resources/zh_CN/element/string.json
+++ b/code/BasicFeature/ApplicationModels/BundleManager/BundleManagement/entry/src/main/resources/zh_CN/element/string.json
@@ -56,6 +56,10 @@
"name": "GetBundleInfo",
"value": "获取BundleInfo"
},
+ {
+ "name": "GetBundleInfoCombination",
+ "value": "获取BundleInfo(组合参数)"
+ },
{
"name": "GetBundleInfoSync",
"value": "获取BundleInfo(sync)"
@@ -72,6 +76,10 @@
"name": "GetConfigurationArray",
"value": "获取配置数组"
},
+ {
+ "name": "GetConfigurationArraySync",
+ "value": "获取配置数组(sync)"
+ },
{
"name": "GetConfigurationJsonSync",
"value": "获取配置json(sync)"
diff --git a/code/BasicFeature/ApplicationModels/BundleManager/BundleManagement/entry/src/ohosTest/ets/test/Ability.test.ets b/code/BasicFeature/ApplicationModels/BundleManager/BundleManagement/entry/src/ohosTest/ets/test/Ability.test.ets
index 6fa935178..b23bfb59b 100755
--- a/code/BasicFeature/ApplicationModels/BundleManager/BundleManagement/entry/src/ohosTest/ets/test/Ability.test.ets
+++ b/code/BasicFeature/ApplicationModels/BundleManager/BundleManagement/entry/src/ohosTest/ets/test/Ability.test.ets
@@ -41,11 +41,11 @@ function startAbility() {
}
export default function abilityTest() {
- describe('AutoFillSampleTest', () => {
+ describe('BundleManagerSampleTest', () => {
/*
* @tc.number: BundleManager_GetBundleInfoForSelf_001
* @tc.name: By providing the sample code call interface
- * @tc.desc: Call the GetProfileByExtensionAbility API successfully
+ * @tc.desc: Call the getBundleInfoForSelf API successfully
* @tc.size: MediumTest
* @tc.type: Function
* @tc.level Level 1
@@ -68,15 +68,36 @@ export default function abilityTest() {
})
/*
- * @tc.number: BundleManager_GetBundleInfoForSelfSync_002
+ * @tc.number: BundleManager_GetBundleInfoForSelfSync_002
+ * @tc.name: By providing the sample code call interface
+ * @tc.desc: Call the getBundleInfoForSelf(parameterCombination) API successfully
+ * @tc.size: MediumTest
+ * @tc.type: Function
+ * @tc.level Level 1
+ */
+ it('BundleManager_GetBundleInfoForSelfSync_002', 0, async (done: Function) => {
+ hilog.info(DOMAIN_NUMBER, TAG, 'BundleManager_GetBundleInfoForSelfSync_002 start');
+ let driver = Driver.create();
+ await sleep(1000);
+ let registerBtn = await driver.findComponent(ON.text(
+ await resourceManager.getStringValue($r('app.string.GetBundleInfoCombinationTest'))));
+ await sleep(1000);
+ await registerBtn.click();
+ await sleep(1000);
+ expect(registerBtn != null).assertTrue();
+ done();
+ })
+
+ /*
+ * @tc.number: BundleManager_GetBundleInfoForSelfSync_003
* @tc.name: By providing the sample code call interface
* @tc.desc: Call the GetBundleInfoForSelfSync API successfully
* @tc.size: MediumTest
* @tc.type: Function
* @tc.level Level 1
*/
- it('BundleManager_GetBundleInfoForSelfSync_002', 0, async (done: Function) => {
- hilog.info(DOMAIN_NUMBER, TAG, 'BundleManager_GetBundleInfoForSelfSync_002 start');
+ it('BundleManager_GetBundleInfoForSelfSync_003', 0, async (done: Function) => {
+ hilog.info(DOMAIN_NUMBER, TAG, 'BundleManager_GetBundleInfoForSelfSync_003 start');
let driver = Driver.create();
await sleep(1000);
let registerBtn = await driver.findComponent(ON.text(
@@ -110,15 +131,36 @@ export default function abilityTest() {
})
/*
- * @tc.number: BundleManager_GetProfileByExtensionAbility_005
+ * @tc.number: BundleManager_getProfileByAbilitySync_005
* @tc.name: By providing the sample code call interface
* @tc.desc: Call the GetProfileByExtensionAbility API successfully
* @tc.size: MediumTest
* @tc.type: Function
* @tc.level Level 1
*/
- it('BundleManager_GetProfileByExtensionAbility_005', 0, async (done: Function) => {
- hilog.info(DOMAIN_NUMBER, TAG, 'BundleManager_GetProfileByExtensionAbility_005 start');
+ it('BundleManager_getProfileByAbilitySync_005', 0, async (done: Function) => {
+ hilog.info(DOMAIN_NUMBER, TAG, 'BundleManager_getProfileByAbilitySync_005 start');
+ let driver = Driver.create();
+ await sleep(1000);
+ let registerBtn = await driver.findComponent(ON.text(
+ await resourceManager.getStringValue($r('app.string.GetConfigurationSyncTest'))));
+ await sleep(1000);
+ await registerBtn.click();
+ await sleep(2000);
+ expect(registerBtn != null).assertTrue();
+ done();
+ })
+
+ /*
+ * @tc.number: BundleManager_GetProfileByExtensionAbility_006
+ * @tc.name: By providing the sample code call interface
+ * @tc.desc: Call the GetProfileByExtensionAbility API successfully
+ * @tc.size: MediumTest
+ * @tc.type: Function
+ * @tc.level Level 1
+ */
+ it('BundleManager_GetProfileByExtensionAbility_006', 0, async (done: Function) => {
+ hilog.info(DOMAIN_NUMBER, TAG, 'BundleManager_GetProfileByExtensionAbility_006 start');
let driver = Driver.create();
await sleep(1000);
let registerBtn = await driver.findComponent(ON.text(
@@ -131,19 +173,19 @@ export default function abilityTest() {
})
/*
- * @tc.number: BundleManager_GetProfileByExtensionAbilitySync_006
+ * @tc.number: BundleManager_GetProfileByExtensionAbilitySync_007
* @tc.name: By providing the sample code call interface
* @tc.desc: Call the GetProfileByExtensionAbilitySync API successfully
* @tc.size: MediumTest
* @tc.type: Function
* @tc.level Level 1
*/
- it('BundleManager_GetProfileByExtensionAbilitySync_006', 0, async (done: Function) => {
- hilog.info(DOMAIN_NUMBER, TAG, 'BundleManager_GetProfileByExtensionAbilitySync_006 start');
+ it('BundleManager_GetProfileByExtensionAbilitySync_007', 0, async (done: Function) => {
+ hilog.info(DOMAIN_NUMBER, TAG, 'BundleManager_GetProfileByExtensionAbilitySync_007 start');
let driver = Driver.create();
await sleep(2000);
let registerBtn = await driver.findComponent(ON.text(
- await resourceManager.getStringValue($r('app.string.GetConfigurationJsonSyncTest'))));
+ await resourceManager.getStringValue($r('app.string.GetConfigurationArraySyncTest'))));
await sleep(1000);
await registerBtn.click();
await sleep(1000);
@@ -152,20 +194,21 @@ export default function abilityTest() {
})
/*
- * @tc.number: BundleManager_CanOpenLink_007
+ * @tc.number: BundleManager_CanOpenLink_008
* @tc.name: By providing the sample code call interface
* @tc.desc: Call the CanOpenLink API successfully
* @tc.size: MediumTest
* @tc.type: Function
* @tc.level Level 1
*/
- it('BundleManager_CanOpenLink_007', 0, async (done: Function) => {
- hilog.info(DOMAIN_NUMBER, TAG, 'BundleManager_CanOpenLink_007 start');
+ it('BundleManager_CanOpenLink_008', 0, async (done: Function) => {
+ hilog.info(DOMAIN_NUMBER, TAG, 'BundleManager_CanOpenLink_008 start');
let driver = Driver.create();
await sleep(1000);
let registerBtn = await driver.findComponent(ON.text(
await resourceManager.getStringValue($r('app.string.VerifyLinkOpenedTest'))));
await sleep(1000);
+ await driver.swipe(360, 1100, 360, 100);
await registerBtn.click();
await sleep(1000);
expect(registerBtn != null).assertTrue();
@@ -173,18 +216,17 @@ export default function abilityTest() {
})
/*
- * @tc.number: DefaultAppMgr_IsDefaultApplication_008
+ * @tc.number: DefaultAppMgr_IsDefaultApplication_009
* @tc.name: By providing the sample code call interface
* @tc.desc: Call the IsDefaultApplication API successfully
* @tc.size: MediumTest
* @tc.type: Function
* @tc.level Level 1
*/
- it('DefaultAppMgr_IsDefaultApplication_008', 0, async (done: Function) => {
- hilog.info(DOMAIN_NUMBER, TAG, 'DefaultAppMgr_IsDefaultApplication_008 start');
+ it('DefaultAppMgr_IsDefaultApplication_009', 0, async (done: Function) => {
+ hilog.info(DOMAIN_NUMBER, TAG, 'DefaultAppMgr_IsDefaultApplication_009 start');
let driver = Driver.create();
await sleep(1000);
- await driver.swipe(360, 1070, 360, 600);
let registerBtn = await driver.findComponent(ON.text(
await resourceManager.getStringValue($r('app.string.DetermineDefaultApplicationTest'))));
await sleep(1000);
@@ -195,15 +237,15 @@ export default function abilityTest() {
})
/*
- * @tc.number: DefaultAppMgr_IsDefaultApplicationSync_009
+ * @tc.number: DefaultAppMgr_IsDefaultApplicationSync_010
* @tc.name: By providing the sample code call interface
* @tc.desc: Call the IsDefaultApplicationSync API successfully
* @tc.size: MediumTest
* @tc.type: Function
* @tc.level Level 1
*/
- it('DefaultAppMgr_IsDefaultApplicationSync_009', 0, async (done: Function) => {
- hilog.info(DOMAIN_NUMBER, TAG, 'DefaultAppMgr_IsDefaultApplicationSync_009 start');
+ it('DefaultAppMgr_IsDefaultApplicationSync_010', 0, async (done: Function) => {
+ hilog.info(DOMAIN_NUMBER, TAG, 'DefaultAppMgr_IsDefaultApplicationSync_010 start');
let driver = Driver.create();
await sleep(1000);
let registerBtn = await driver.findComponent(ON.text(
@@ -216,15 +258,15 @@ export default function abilityTest() {
})
/*
- * @tc.number: Overlay_SetOverlayEnabled_010
+ * @tc.number: Overlay_SetOverlayEnabled_011
* @tc.name: By providing the sample code call interface
* @tc.desc: Call the SetOverlayEnabled API successfully
* @tc.size: MediumTest
* @tc.type: Function
* @tc.level Level 1
*/
- it('Overlay_SetOverlayEnabled_010', 0, async (done: Function) => {
- hilog.info(DOMAIN_NUMBER, TAG, 'Overlay_SetOverlayEnabled_010 start');
+ it('Overlay_SetOverlayEnabled_011', 0, async (done: Function) => {
+ hilog.info(DOMAIN_NUMBER, TAG, 'Overlay_SetOverlayEnabled_011 start');
let driver = Driver.create();
await sleep(1000);
let registerBtn = await driver.findComponent(ON.text(
@@ -237,15 +279,15 @@ export default function abilityTest() {
})
/*
- * @tc.number: Overlay_GetOverlayModuleInfo_011
+ * @tc.number: Overlay_GetOverlayModuleInfo_012
* @tc.name: By providing the sample code call interface
* @tc.desc: Call the GetOverlayModuleInfo API successfully
* @tc.size: MediumTest
* @tc.type: Function
* @tc.level Level 1
*/
- it('Overlay_GetOverlayModuleInfo_011', 0, async (done: Function) => {
- hilog.info(DOMAIN_NUMBER, TAG, 'Overlay_GetOverlayModuleInfo_011 start');
+ it('Overlay_GetOverlayModuleInfo_012', 0, async (done: Function) => {
+ hilog.info(DOMAIN_NUMBER, TAG, 'Overlay_GetOverlayModuleInfo_012 start');
let driver = Driver.create();
await sleep(1000);
let registerBtn = await driver.findComponent(ON.text(
@@ -258,15 +300,15 @@ export default function abilityTest() {
})
/*
- * @tc.number: Overlay_GetTargetOverlayModuleInfos_012
+ * @tc.number: Overlay_GetTargetOverlayModuleInfos_013
* @tc.name: By providing the sample code call interface
* @tc.desc: Call the GetTargetOverlayModuleInfos API successfully
* @tc.size: MediumTest
* @tc.type: Function
* @tc.level Level 1
*/
- it('Overlay_GetTargetOverlayModuleInfos_012', 0, async (done: Function) => {
- hilog.info(DOMAIN_NUMBER, TAG, 'Overlay_GetTargetOverlayModuleInfos_012 start');
+ it('Overlay_GetTargetOverlayModuleInfos_013', 0, async (done: Function) => {
+ hilog.info(DOMAIN_NUMBER, TAG, 'Overlay_GetTargetOverlayModuleInfos_013 start');
let driver = Driver.create();
await sleep(1000);
let registerBtn = await driver.findComponent(ON.text(
diff --git a/code/BasicFeature/ApplicationModels/BundleManager/BundleManagement/entry/src/ohosTest/resources/base/element/string.json b/code/BasicFeature/ApplicationModels/BundleManager/BundleManagement/entry/src/ohosTest/resources/base/element/string.json
index a532a9f81..bfeab7709 100755
--- a/code/BasicFeature/ApplicationModels/BundleManager/BundleManagement/entry/src/ohosTest/resources/base/element/string.json
+++ b/code/BasicFeature/ApplicationModels/BundleManager/BundleManagement/entry/src/ohosTest/resources/base/element/string.json
@@ -16,6 +16,10 @@
"name": "GetBundleInfoTest",
"value": "ȡBundleInfo"
},
+ {
+ "name": "GetBundleInfoCombinationTest",
+ "value": "ȡBundleInfo(ϲ)"
+ },
{
"name": "GetBundleInfoSyncTest",
"value": "ȡBundleInfo(sync)"
@@ -29,7 +33,11 @@
"value": "ȡ"
},
{
- "name": "GetConfigurationJsonSyncTest",
+ "name": "GetConfigurationArraySyncTest",
+ "value": "ȡ(sync)"
+ },
+ {
+ "name": "GetConfigurationSyncTest",
"value": "ȡjson(sync)"
},
{
diff --git a/code/BasicFeature/ApplicationModels/BundleManager/BundleManagement/entry/src/ohosTest/resources/en_US/element/string.json b/code/BasicFeature/ApplicationModels/BundleManager/BundleManagement/entry/src/ohosTest/resources/en_US/element/string.json
index 55d9be7f7..77f3d4b91 100755
--- a/code/BasicFeature/ApplicationModels/BundleManager/BundleManagement/entry/src/ohosTest/resources/en_US/element/string.json
+++ b/code/BasicFeature/ApplicationModels/BundleManager/BundleManagement/entry/src/ohosTest/resources/en_US/element/string.json
@@ -16,6 +16,10 @@
"name": "GetBundleInfoTest",
"value": "GetBundleInfo"
},
+ {
+ "name": "GetBundleInfoCombinationTest",
+ "value": "GetBundleInfoCombinationTest"
+ },
{
"name": "GetBundleInfoSyncTest",
"value": "GetBundleInfoSync"
@@ -29,8 +33,12 @@
"value": "GetConfigurationArray"
},
{
- "name": "GetConfigurationJsonSyncTest",
- "value": "GetConfigurationJsonSync"
+ "name": "GetConfigurationArraySyncTest",
+ "value": "GetConfigurationArraySyncTest"
+ },
+ {
+ "name": "GetConfigurationSyncTest",
+ "value": "GetConfigurationSyncTest"
},
{
"name": "VerifyFileTest",
diff --git a/code/BasicFeature/ApplicationModels/BundleManager/BundleManagement/entry/src/ohosTest/resources/zh_CN/element/string.json b/code/BasicFeature/ApplicationModels/BundleManager/BundleManagement/entry/src/ohosTest/resources/zh_CN/element/string.json
index 8964cc123..2a6487136 100755
--- a/code/BasicFeature/ApplicationModels/BundleManager/BundleManagement/entry/src/ohosTest/resources/zh_CN/element/string.json
+++ b/code/BasicFeature/ApplicationModels/BundleManager/BundleManagement/entry/src/ohosTest/resources/zh_CN/element/string.json
@@ -16,6 +16,10 @@
"name": "GetBundleInfoTest",
"value": "获取BundleInfo"
},
+ {
+ "name": "GetBundleInfoCombinationTest",
+ "value": "获取BundleInfo(组合参数)"
+ },
{
"name": "GetBundleInfoSyncTest",
"value": "获取BundleInfo(sync)"
@@ -29,7 +33,11 @@
"value": "获取配置数组"
},
{
- "name": "GetConfigurationJsonSyncTest",
+ "name": "GetConfigurationArraySyncTest",
+ "value": "获取配置数组(sync)"
+ },
+ {
+ "name": "GetConfigurationSyncTest",
"value": "获取配置json(sync)"
},
{
diff --git a/code/BasicFeature/ApplicationModels/BundleManager/BundleManagement/ohosTest.md b/code/BasicFeature/ApplicationModels/BundleManager/BundleManagement/ohosTest.md
index d29d388a3..e045c1021 100755
--- a/code/BasicFeature/ApplicationModels/BundleManager/BundleManagement/ohosTest.md
+++ b/code/BasicFeature/ApplicationModels/BundleManager/BundleManagement/ohosTest.md
@@ -1,15 +1,16 @@
-|测试功能|预置条件|输入|预期输出|测试结果|
-|--------------------------------|--------------------------------|--------------------------------|--------------------------------|--------------------------------|
-|进入主页| 1.拉起资源API示例页面 |不涉及|调用GetProfileByExtensionAbility接口成功,页面正常展示字符串文本|Pass|
-|进入主页| 1.拉起资源API示例页面 |不涉及|调用GetBundleInfoForSelfSync接口成功,页面正常展示字符串文本|Pass|
-|进入主页| 1.拉起资源API示例页面 |不涉及|调用GetProfileByAbility接口成功,页面正常展示字符串文本|Pass|
-|进入主页| 1.拉起资源API示例页面 |不涉及|调用GetProfileByExtensionAbility接口成功,页面正常展示字符串文本|Pass|
-|进入主页| 1.拉起资源API示例页面 |不涉及|调用GetProfileByExtensionAbilitySync接口成功,页面正常展示字符串文本|Pass|
-|进入主页| 1.将.abc文件放到/data/app/el1/bundle/public/com.samples.bundlemanagement/目录下 2.拉起资源API示例页面 |不涉及|调用verifyAbc接口成功,页面正常展示字符串文本|Pass|
-|进入主页| 1.将.abc文件放到/data/app/el1/bundle/public/com.samples.bundlemanagement/目录下 2.拉起资源API示例页面 |不涉及|调用deleteAbc接口成功,页面正常展示字符串文本|Pass|
-|进入主页| 1.拉起资源API示例页面 |不涉及|调用CanOpenLink接口成功,页面正常展示字符串文本|Pass|
-|进入主页| 1.拉起资源API示例页面 |不涉及|调用IsDefaultApplication接口成功,页面正常展示字符串文本|Pass|
-|进入主页| 1.拉起资源API示例页面 |不涉及|调用IsDefaultApplicationSync接口成功,页面正常展示字符串文本|Pass|
-|进入主页| 1.拉起Overlay示例页面,根据静态overlay脚本安装共享hsp包 |不涉及|调用SetOverlayEnabled接口成功,页面正常展示字符串文本|Pass|
-|进入主页| 1.拉起OverlayModuleInfo示例页面 |不涉及|调用GetOverlayModuleInfo接口成功,页面正常展示字符串文本|Pass|
-|进入主页| 1.拉起OverlayModuleInfo示例页面 |不涉及|调用GetTargetOverlayModuleInfos接口成功,页面正常展示字符串文本|Pass|
\ No newline at end of file
+|测试功能|预置条件|输入|预期输出|是否自动|测试结果|
+|--------------------------------|--------------------------------|--------------------------------|--------------------------------|--------------------------------|--------------------------------|
+|进入主页| 1.拉起资源API示例页面 |不涉及|调用getBundleInfoForSelf接口成功,页面正常展示字符串文本|是|Pass|
+|进入主页| 1.拉起资源API示例页面 |不涉及|调用getBundleInfoForSelfSync接口成功,页面正常展示字符串文本|是|Pass|
+|进入主页| 1.拉起资源API示例页面 |不涉及|调用getProfileByAbility接口成功,页面正常展示字符串文本|是|Pass|
+|进入主页| 1.拉起资源API示例页面 |不涉及|调用getProfileByAbilitySync接口成功,页面正常展示字符串文本|是|Pass|
+|进入主页| 1.拉起资源API示例页面 |不涉及|调用GetProfileByExtensionAbility接口成功,页面正常展示字符串文本|是|Pass|
+|进入主页| 1.拉起资源API示例页面 |不涉及|调用GetProfileByExtensionAbilitySync接口成功,页面正常展示字符串文本|是|Pass|
+|进入主页| 1.将.abc文件放到/data/app/el1/bundle/public/com.samples.bundlemanagement/目录下
2.拉起资源API示例页面 |不涉及|调用verifyAbc接口成功,页面正常展示字符串文本|否|Pass|
+|进入主页| 1.将.abc文件放到/data/app/el1/bundle/public/com.samples.bundlemanagement/目录下
2.拉起资源API示例页面 |不涉及|调用deleteAbc接口成功,页面正常展示字符串文本|否|Pass|
+|进入主页| 1.拉起资源API示例页面 |不涉及|调用CanOpenLink接口成功,页面正常展示字符串文本|是|Pass|
+|进入主页| 1.拉起资源API示例页面 |不涉及|调用IsDefaultApplication接口成功,页面正常展示字符串文本|是|Pass|
+|进入主页| 1.拉起资源API示例页面 |不涉及|调用IsDefaultApplicationSync接口成功,页面正常展示字符串文本|是|Pass|
+|进入主页| 1.拉起Overlay示例页面,根据静态overlay脚本安装共享hsp包 |不涉及|调用SetOverlayEnabled接口成功,页面正常展示字符串文本|是|Pass|
+|进入主页| 1.拉起OverlayModuleInfo示例页面 |不涉及|调用GetOverlayModuleInfo接口成功,页面正常展示字符串文本|是|Pass|
+|进入主页| 1.拉起OverlayModuleInfo示例页面 |不涉及|调用GetTargetOverlayModuleInfos接口成功,页面正常展示字符串文本|是|Pass|
\ No newline at end of file
diff --git a/code/BasicFeature/Connectivity/UploadAndDownLoad/README_zh.md b/code/BasicFeature/Connectivity/UploadAndDownLoad/README_zh.md
index 89069cecf..67f492fc8 100644
--- a/code/BasicFeature/Connectivity/UploadAndDownLoad/README_zh.md
+++ b/code/BasicFeature/Connectivity/UploadAndDownLoad/README_zh.md
@@ -7,7 +7,7 @@
| 主页 | 上传 | 片段上传 | 下载 | 证书锁定 |
| :---------------------------------------: | :---------------------------------------: | :--------------------------------------: | :--------------------------------------: | ---------------------------------------- |
-| ![home](screenshots/devices/zh/home.jpg) | ![util](screenshots/devices/zh/upload.jpg) | ![util](screenshots/devices/zh/uploadchunk.jpg) | ![convertxml](screenshots/devices/zh/download.jpg) | ![](D:\01Code\sample\PR\applications_app_samples\code\BasicFeature\Connectivity\UploadAndDownLoad\screenshots\devices\zh\cert_lock.jpg) |
+| ![home](screenshots/devices/zh/home.jpg) | ![util](screenshots/devices/zh/upload.jpg) | ![util](screenshots/devices/zh/uploadchunk.jpg) | ![convertxml](screenshots/devices/zh/download.jpg) | ![cert_lock](screenshots/devices/zh/cert_lock.jpg) |
使用说明
@@ -120,7 +120,7 @@ UploadAndDownload
2.本示例为Stage模型,支持API12版本SDK,SDK版本号(API Version 12),镜像版本号(5.0)
-3.本示例需要使用DevEco Studio 版本号(4.0 Release)及以上版本才可编译运行。
+3.本示例需要使用DevEco Studio 版本号(4.1 Release)及以上版本才可编译运行。
4.运行本示例需全程联网。
diff --git a/code/BasicFeature/Connectivity/UploadAndDownLoad/entry/src/main/ets/entryability/EntryAbility.ets b/code/BasicFeature/Connectivity/UploadAndDownLoad/entry/src/main/ets/entryability/EntryAbility.ets
index 5154da162..27daacacf 100644
--- a/code/BasicFeature/Connectivity/UploadAndDownLoad/entry/src/main/ets/entryability/EntryAbility.ets
+++ b/code/BasicFeature/Connectivity/UploadAndDownLoad/entry/src/main/ets/entryability/EntryAbility.ets
@@ -48,7 +48,6 @@ export default class EntryAbility extends UIAbility {
onWindowStageCreate(windowStage: window.WindowStage): void {
// Main window is created, set main page for this ability
logger.info(TAG, 'Ability onWindowStageCreate');
- urlUtils.subscribe(this.context);
windowStage.loadContent('pages/Index', (err, data) => {
if (err.code) {
logger.error(TAG, `Failed to load the content. Cause:${JSON.stringify(err) ?? ''}`);
diff --git a/code/BasicFeature/Connectivity/UploadAndDownLoad/entry/src/main/ets/pages/Index.ets b/code/BasicFeature/Connectivity/UploadAndDownLoad/entry/src/main/ets/pages/Index.ets
index a9cd3f67d..a2ed4f2e8 100644
--- a/code/BasicFeature/Connectivity/UploadAndDownLoad/entry/src/main/ets/pages/Index.ets
+++ b/code/BasicFeature/Connectivity/UploadAndDownLoad/entry/src/main/ets/pages/Index.ets
@@ -16,6 +16,8 @@
import notificationManager from '@ohos.notificationManager';
import router from '@ohos.router';
import common from '@ohos.app.ability.common';
+import { urlUtils } from '@ohos/uploaddownload';
+import util from '@ohos.util';
@Styles
function itemStyle() {
@@ -61,7 +63,21 @@ struct Index {
})
}
.itemStyle()
- .margin({ top: 0 })
+ .margin({ top: 20 })
+
+ Row() {
+ Text($r('app.string.HFS_tips'))
+ .textStyle()
+ Blank()
+ TextInput()
+ .width(250)
+ .height(40)
+ .margin({left : 20})
+ .onChange((val) => urlUtils.saveUrl(getContext(this) as common.UIAbilityContext,val))
+ }
+
+ .itemStyle()
+ .margin({ top: 15 })
this.CapabilityView($r('app.media.ic_upload'), $r('app.string.upload'), 'btn_upload', () => {
router.pushUrl({
@@ -80,8 +96,9 @@ struct Index {
})
}
.width('100%')
+ .margin({ left:-12 })
}
- .padding({ left: 12, right: 12 })
+ .padding({ left: 12, right: 6 })
.height('100%')
.align(Alignment.Top)
}
@@ -94,7 +111,7 @@ struct Index {
main: this.getResourceString($r('app.string.EntryAbility_label')),
sub: this.getResourceString($r('app.string.home_tips'))
})
- .margin({ top: 10 })
+ .padding({ top:5 })
}
@Builder
diff --git a/code/BasicFeature/Connectivity/UploadAndDownLoad/entry/src/main/resources/base/element/string.json b/code/BasicFeature/Connectivity/UploadAndDownLoad/entry/src/main/resources/base/element/string.json
index 4cfdd844d..f2f360334 100644
--- a/code/BasicFeature/Connectivity/UploadAndDownLoad/entry/src/main/resources/base/element/string.json
+++ b/code/BasicFeature/Connectivity/UploadAndDownLoad/entry/src/main/resources/base/element/string.json
@@ -108,6 +108,10 @@
"name": "background_tips",
"value": "Whether to start background tasks"
},
+ {
+ "name": "HFS_tips",
+ "value": "HFS Address"
+ },
{
"name": "home_tips",
"value": "Demonstrate foreground and background upload and download tasks"
diff --git a/code/BasicFeature/Connectivity/UploadAndDownLoad/entry/src/main/resources/en_US/element/string.json b/code/BasicFeature/Connectivity/UploadAndDownLoad/entry/src/main/resources/en_US/element/string.json
index 3f6702f0b..751ab62d3 100644
--- a/code/BasicFeature/Connectivity/UploadAndDownLoad/entry/src/main/resources/en_US/element/string.json
+++ b/code/BasicFeature/Connectivity/UploadAndDownLoad/entry/src/main/resources/en_US/element/string.json
@@ -108,6 +108,10 @@
"name": "background_tips",
"value": "Whether to start background tasks"
},
+ {
+ "name": "HFS_tips",
+ "value": "HFS Address"
+ },
{
"name": "home_tips",
"value": "Demonstrate foreground and background upload and download tasks"
diff --git a/code/BasicFeature/Connectivity/UploadAndDownLoad/entry/src/main/resources/zh_CN/element/string.json b/code/BasicFeature/Connectivity/UploadAndDownLoad/entry/src/main/resources/zh_CN/element/string.json
index 725d93bc2..94ea0de96 100644
--- a/code/BasicFeature/Connectivity/UploadAndDownLoad/entry/src/main/resources/zh_CN/element/string.json
+++ b/code/BasicFeature/Connectivity/UploadAndDownLoad/entry/src/main/resources/zh_CN/element/string.json
@@ -108,6 +108,10 @@
"name": "background_tips",
"value": "是否开启后台任务"
},
+ {
+ "name": "HFS_tips",
+ "value": "HFS 地址"
+ },
{
"name": "home_tips",
"value": "演示前台和后台上传和下载任务"
diff --git a/code/BasicFeature/Connectivity/UploadAndDownLoad/environment/README.md b/code/BasicFeature/Connectivity/UploadAndDownLoad/environment/README.md
index b67e5847d..c14f6eaea 100644
--- a/code/BasicFeature/Connectivity/UploadAndDownLoad/environment/README.md
+++ b/code/BasicFeature/Connectivity/UploadAndDownLoad/environment/README.md
@@ -16,11 +16,11 @@ https://nchc.dl.sourceforge.net/project/hfs/HFS/2.3m/hfs.exe
| ------------------------------------------------------------ | ------------------------ | ------------------------------------ |
| ![bind](src/bind.png) | ![bind](src/prop.png) | ![bind](src/permission.png) |
-4.**手机端打开应用后**,查看打开客户端的url,修改[setURL.bat](./setURL.bat)中的url为hfs客户端的url后双击运行[setURL.bat](./setURL.bat)。
+4.**手机端打开应用后**,查看打开客户端的url,修改HFS地址中的url为hfs客户端的url。
| 获取url | 修改url |
| :-----------------------: | :-----------------------: |
-| ![copy](src/copy_url.png) | ![copy](src/past_url.png) |
+| ![copy](src/copy_url.png) | ![copy](src/past_url.jpg) |
5、按照顺序操作1-4步骤后,即可测试上传下载任务。
diff --git a/code/BasicFeature/Connectivity/UploadAndDownLoad/environment/setURL.bat b/code/BasicFeature/Connectivity/UploadAndDownLoad/environment/setURL.bat
deleted file mode 100644
index 19eedea46..000000000
--- a/code/BasicFeature/Connectivity/UploadAndDownLoad/environment/setURL.bat
+++ /dev/null
@@ -1,17 +0,0 @@
-:: Copyright (c) 2023 Huawei Device Co., Ltd.
-:: Licensed under the Apache License, Version 2.0 (the "License");
-:: you may not use this file except in compliance with the License.
-:: You may obtain a copy of the License at
-::
-:: http://www.apache.org/licenses/LICENSE-2.0
-::
-:: Unless required by applicable law or agreed to in writing, software
-:: distributed under the License is distributed on an "AS IS" BASIS,
-:: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-:: See the License for the specific language governing permissions and
-:: limitations under the License.
-
-@echo off
-set url=http://192.168.8.183/
-hdc shell cem publish -e "uploaddownload.event.SET_URL" -c 100 -d %url%
-pause
\ No newline at end of file
diff --git a/code/BasicFeature/Connectivity/UploadAndDownLoad/environment/src/past_url.png b/code/BasicFeature/Connectivity/UploadAndDownLoad/environment/src/past_url.png
index d3e4d1b1b..ea36a5d50 100644
Binary files a/code/BasicFeature/Connectivity/UploadAndDownLoad/environment/src/past_url.png and b/code/BasicFeature/Connectivity/UploadAndDownLoad/environment/src/past_url.png differ
diff --git a/code/BasicFeature/Connectivity/UploadAndDownLoad/features/uploadanddownload/src/main/ets/utils/UrlUtils.ets b/code/BasicFeature/Connectivity/UploadAndDownLoad/features/uploadanddownload/src/main/ets/utils/UrlUtils.ets
index 9cee5341c..8262e18ca 100644
--- a/code/BasicFeature/Connectivity/UploadAndDownLoad/features/uploadanddownload/src/main/ets/utils/UrlUtils.ets
+++ b/code/BasicFeature/Connectivity/UploadAndDownLoad/features/uploadanddownload/src/main/ets/utils/UrlUtils.ets
@@ -21,29 +21,11 @@ import { CommonEventSubscriber } from './commonEvent/commonEventSubscriber';
import { logger } from './Logger';
const TAG: string = 'UrlUtils';
-const SUBSCRIBER_EVENT: string = 'uploaddownload.event.SET_URL';
const URL_KEY: string = 'url';
const STORE_NAME: string = 'server_url';
const DEFAULT_SERVER_URL: string = 'http://192.168.1.1/';
class UrlUtil {
- private subscriber: CommonEventSubscriber | undefined = undefined;
-
- async subscribe(context: common.UIAbilityContext): Promise {
- logger.info(TAG, `subscribe`)
- this.subscriber = await commonEventManager.createSubscriber({ events: [SUBSCRIBER_EVENT] });
- commonEventManager.subscribe(this.subscriber, (err: Error, data: CommonEventData) => {
- if (err) {
- logger.error(TAG, `subscribeCallBack, failed: ${JSON.stringify(err)}`);
- return;
- }
- logger.info(TAG, `subscribeCallBack, ${JSON.stringify(data)}`);
- if (data.event === 'uploaddownload.event.SET_URL' && data.data) {
- urlUtils.saveUrl(context, data.data);
- }
- });
- }
-
async getUrl(context: common.UIAbilityContext): Promise {
let preference = await preferences.getPreferences(context, STORE_NAME);
let url = await preference.get(URL_KEY, '') as string;
diff --git a/code/BasicFeature/Connectivity/UploadAndDownLoad/hvigor/hvigor-config.json5 b/code/BasicFeature/Connectivity/UploadAndDownLoad/hvigor/hvigor-config.json5
index e75281b25..64655e697 100644
--- a/code/BasicFeature/Connectivity/UploadAndDownLoad/hvigor/hvigor-config.json5
+++ b/code/BasicFeature/Connectivity/UploadAndDownLoad/hvigor/hvigor-config.json5
@@ -1,6 +1,6 @@
{
- "hvigorVersion": "3.0.2",
+ "hvigorVersion": "3.2.4",
"dependencies": {
- "@ohos/hvigor-ohos-plugin": "3.0.2"
+ "@ohos/hvigor-ohos-plugin": "3.2.4"
}
}
\ No newline at end of file
diff --git a/code/BasicFeature/Connectivity/UploadAndDownLoad/hvigor/hvigor-wrapper.js b/code/BasicFeature/Connectivity/UploadAndDownLoad/hvigor/hvigor-wrapper.js
index 994f22987..372eae8eb 100644
--- a/code/BasicFeature/Connectivity/UploadAndDownLoad/hvigor/hvigor-wrapper.js
+++ b/code/BasicFeature/Connectivity/UploadAndDownLoad/hvigor/hvigor-wrapper.js
@@ -1,2 +1 @@
-"use strict";var e=require("fs"),t=require("path"),n=require("os"),r=require("crypto"),u=require("child_process"),o=require("constants"),i=require("stream"),s=require("util"),c=require("assert"),a=require("tty"),l=require("zlib"),f=require("net");function d(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var D=d(e),p=d(t),E=d(n),m=d(r),h=d(u),y=d(o),C=d(i),F=d(s),g=d(c),A=d(a),v=d(l),S=d(f),w="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},O={},b={},_={},B=w&&w.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(_,"__esModule",{value:!0}),_.isMac=_.isLinux=_.isWindows=void 0;const P=B(E.default),k="Windows_NT",x="Linux",N="Darwin";_.isWindows=function(){return P.default.type()===k},_.isLinux=function(){return P.default.type()===x},_.isMac=function(){return P.default.type()===N};var I={},T=w&&w.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var u=Object.getOwnPropertyDescriptor(t,n);u&&!("get"in u?!t.__esModule:u.writable||u.configurable)||(u={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,u)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),R=w&&w.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),M=w&&w.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&T(t,e,n);return R(t,e),t};Object.defineProperty(I,"__esModule",{value:!0}),I.hash=void 0;const L=M(m.default);I.hash=function(e,t="md5"){return L.createHash(t).update(e,"utf-8").digest("hex")},function(e){var t=w&&w.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var u=Object.getOwnPropertyDescriptor(t,n);u&&!("get"in u?!t.__esModule:u.writable||u.configurable)||(u={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,u)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),n=w&&w.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=w&&w.__importStar||function(e){if(e&&e.__esModule)return e;var r={};if(null!=e)for(var u in e)"default"!==u&&Object.prototype.hasOwnProperty.call(e,u)&&t(r,e,u);return n(r,e),r};Object.defineProperty(e,"__esModule",{value:!0}),e.HVIGOR_BOOT_JS_FILE_PATH=e.HVIGOR_PROJECT_DEPENDENCY_PACKAGE_JSON_PATH=e.HVIGOR_PROJECT_DEPENDENCIES_HOME=e.HVIGOR_PROJECT_WRAPPER_HOME=e.HVIGOR_PROJECT_NAME=e.HVIGOR_PROJECT_ROOT_DIR=e.HVIGOR_PROJECT_CACHES_HOME=e.HVIGOR_PNPM_STORE_PATH=e.HVIGOR_WRAPPER_PNPM_SCRIPT_PATH=e.HVIGOR_WRAPPER_TOOLS_HOME=e.HVIGOR_USER_HOME=e.DEFAULT_PACKAGE_JSON=e.DEFAULT_HVIGOR_CONFIG_JSON_FILE_NAME=e.PNPM=e.HVIGOR=e.NPM_TOOL=e.PNPM_TOOL=e.HVIGOR_ENGINE_PACKAGE_NAME=void 0;const u=r(p.default),o=r(E.default),i=_,s=I;e.HVIGOR_ENGINE_PACKAGE_NAME="@ohos/hvigor",e.PNPM_TOOL=(0,i.isWindows)()?"pnpm.cmd":"pnpm",e.NPM_TOOL=(0,i.isWindows)()?"npm.cmd":"npm",e.HVIGOR="hvigor",e.PNPM="pnpm",e.DEFAULT_HVIGOR_CONFIG_JSON_FILE_NAME="hvigor-config.json5",e.DEFAULT_PACKAGE_JSON="package.json",e.HVIGOR_USER_HOME=u.resolve(o.homedir(),".hvigor"),e.HVIGOR_WRAPPER_TOOLS_HOME=u.resolve(e.HVIGOR_USER_HOME,"wrapper","tools"),e.HVIGOR_WRAPPER_PNPM_SCRIPT_PATH=u.resolve(e.HVIGOR_WRAPPER_TOOLS_HOME,"node_modules",".bin",e.PNPM_TOOL),e.HVIGOR_PNPM_STORE_PATH=u.resolve(e.HVIGOR_USER_HOME,"caches"),e.HVIGOR_PROJECT_CACHES_HOME=u.resolve(e.HVIGOR_USER_HOME,"project_caches"),e.HVIGOR_PROJECT_ROOT_DIR=process.cwd(),e.HVIGOR_PROJECT_NAME=u.basename((0,s.hash)(e.HVIGOR_PROJECT_ROOT_DIR)),e.HVIGOR_PROJECT_WRAPPER_HOME=u.resolve(e.HVIGOR_PROJECT_ROOT_DIR,e.HVIGOR),e.HVIGOR_PROJECT_DEPENDENCIES_HOME=u.resolve(e.HVIGOR_PROJECT_CACHES_HOME,e.HVIGOR_PROJECT_NAME,"workspace"),e.HVIGOR_PROJECT_DEPENDENCY_PACKAGE_JSON_PATH=u.resolve(e.HVIGOR_PROJECT_DEPENDENCIES_HOME,e.DEFAULT_PACKAGE_JSON),e.HVIGOR_BOOT_JS_FILE_PATH=u.resolve(e.HVIGOR_PROJECT_DEPENDENCIES_HOME,"node_modules","@ohos","hvigor","bin","hvigor.js")}(b);var j={},$={};Object.defineProperty($,"__esModule",{value:!0}),$.logInfoPrintConsole=$.logErrorAndExit=void 0,$.logErrorAndExit=function(e){e instanceof Error?console.error(e.message):console.error(e),process.exit(-1)},$.logInfoPrintConsole=function(e){console.log(e)};var H=w&&w.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var u=Object.getOwnPropertyDescriptor(t,n);u&&!("get"in u?!t.__esModule:u.writable||u.configurable)||(u={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,u)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),J=w&&w.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),G=w&&w.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&H(t,e,n);return J(t,e),t},V=w&&w.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(j,"__esModule",{value:!0}),j.isFileExists=j.offlinePluginConversion=j.executeCommand=j.getNpmPath=j.hasNpmPackInPaths=void 0;const U=h.default,W=G(p.default),z=b,K=$,q=V(D.default);j.hasNpmPackInPaths=function(e,t){try{return require.resolve(e,{paths:[...t]}),!0}catch(e){return!1}},j.getNpmPath=function(){const e=process.execPath;return W.join(W.dirname(e),z.NPM_TOOL)},j.executeCommand=function(e,t,n){0!==(0,U.spawnSync)(e,t,n).status&&(0,K.logErrorAndExit)(`Error: ${e} ${t} execute failed.See above for details.`)},j.offlinePluginConversion=function(e,t){return t.startsWith("file:")||t.endsWith(".tgz")?W.resolve(e,z.HVIGOR,t.replace("file:","")):t},j.isFileExists=function(e){return q.default.existsSync(e)&&q.default.statSync(e).isFile()},function(e){var t=w&&w.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var u=Object.getOwnPropertyDescriptor(t,n);u&&!("get"in u?!t.__esModule:u.writable||u.configurable)||(u={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,u)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),n=w&&w.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=w&&w.__importStar||function(e){if(e&&e.__esModule)return e;var r={};if(null!=e)for(var u in e)"default"!==u&&Object.prototype.hasOwnProperty.call(e,u)&&t(r,e,u);return n(r,e),r},u=w&&w.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.executeInstallPnpm=e.isPnpmAvailable=e.environmentHandler=e.checkNpmConifg=e.PNPM_VERSION=void 0;const o=r(D.default),i=b,s=j,c=r(p.default),a=$,l=h.default,f=u(E.default);e.PNPM_VERSION="7.30.0",e.checkNpmConifg=function(){const e=c.resolve(i.HVIGOR_PROJECT_ROOT_DIR,".npmrc"),t=c.resolve(f.default.homedir(),".npmrc");if((0,s.isFileExists)(e)||(0,s.isFileExists)(t))return;const n=(0,s.getNpmPath)(),r=(0,l.spawnSync)(n,["config","get","prefix"],{cwd:i.HVIGOR_PROJECT_ROOT_DIR});if(0!==r.status||!r.stdout)return void(0,a.logErrorAndExit)("Error: The hvigor depends on the npmrc file. Configure the npmrc file first.");const u=c.resolve(`${r.stdout}`.replace(/[\r\n]/gi,""),".npmrc");(0,s.isFileExists)(u)||(0,a.logErrorAndExit)("Error: The hvigor depends on the npmrc file. Configure the npmrc file first.")},e.environmentHandler=function(){process.env["npm_config_update-notifier"]="false"},e.isPnpmAvailable=function(){return!!o.existsSync(i.HVIGOR_WRAPPER_PNPM_SCRIPT_PATH)&&(0,s.hasNpmPackInPaths)("pnpm",[i.HVIGOR_WRAPPER_TOOLS_HOME])},e.executeInstallPnpm=function(){(0,a.logInfoPrintConsole)(`Installing pnpm@${e.PNPM_VERSION}...`);const t=(0,s.getNpmPath)();!function(){const t=c.resolve(i.HVIGOR_WRAPPER_TOOLS_HOME,i.DEFAULT_PACKAGE_JSON);try{o.existsSync(i.HVIGOR_WRAPPER_TOOLS_HOME)||o.mkdirSync(i.HVIGOR_WRAPPER_TOOLS_HOME,{recursive:!0});const n={dependencies:{}};n.dependencies[i.PNPM]=e.PNPM_VERSION,o.writeFileSync(t,JSON.stringify(n))}catch(e){(0,a.logErrorAndExit)(`Error: EPERM: operation not permitted,create ${t} failed.`)}}(),(0,s.executeCommand)(t,["install","pnpm"],{cwd:i.HVIGOR_WRAPPER_TOOLS_HOME,stdio:["inherit","inherit","inherit"],env:process.env}),(0,a.logInfoPrintConsole)("Pnpm install success.")}}(O);var Y={},X={},Z={},Q={};Object.defineProperty(Q,"__esModule",{value:!0}),Q.Unicode=void 0;class ee{}Q.Unicode=ee,ee.Space_Separator=/[\u1680\u2000-\u200A\u202F\u205F\u3000]/,ee.ID_Start=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/,ee.ID_Continue=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/,Object.defineProperty(Z,"__esModule",{value:!0}),Z.JudgeUtil=void 0;const te=Q;Z.JudgeUtil=class{static isIgnoreChar(e){return"string"==typeof e&&("\t"===e||"\v"===e||"\f"===e||" "===e||" "===e||"\ufeff"===e||"\n"===e||"\r"===e||"\u2028"===e||"\u2029"===e)}static isSpaceSeparator(e){return"string"==typeof e&&te.Unicode.Space_Separator.test(e)}static isIdStartChar(e){return"string"==typeof e&&(e>="a"&&e<="z"||e>="A"&&e<="Z"||"$"===e||"_"===e||te.Unicode.ID_Start.test(e))}static isIdContinueChar(e){return"string"==typeof e&&(e>="a"&&e<="z"||e>="A"&&e<="Z"||e>="0"&&e<="9"||"$"===e||"_"===e||""===e||""===e||te.Unicode.ID_Continue.test(e))}static isDigitWithoutZero(e){return/[1-9]/.test(e)}static isDigit(e){return"string"==typeof e&&/[0-9]/.test(e)}static isHexDigit(e){return"string"==typeof e&&/[0-9A-Fa-f]/.test(e)}};var ne={},re={fromCallback:function(e){return Object.defineProperty((function(...t){if("function"!=typeof t[t.length-1])return new Promise(((n,r)=>{e.call(this,...t,((e,t)=>null!=e?r(e):n(t)))}));e.apply(this,t)}),"name",{value:e.name})},fromPromise:function(e){return Object.defineProperty((function(...t){const n=t[t.length-1];if("function"!=typeof n)return e.apply(this,t);e.apply(this,t.slice(0,-1)).then((e=>n(null,e)),n)}),"name",{value:e.name})}},ue=y.default,oe=process.cwd,ie=null,se=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){return ie||(ie=oe.call(process)),ie};try{process.cwd()}catch(e){}if("function"==typeof process.chdir){var ce=process.chdir;process.chdir=function(e){ie=null,ce.call(process,e)},Object.setPrototypeOf&&Object.setPrototypeOf(process.chdir,ce)}var ae=function(e){ue.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)&&function(e){e.lchmod=function(t,n,r){e.open(t,ue.O_WRONLY|ue.O_SYMLINK,n,(function(t,u){t?r&&r(t):e.fchmod(u,n,(function(t){e.close(u,(function(e){r&&r(t||e)}))}))}))},e.lchmodSync=function(t,n){var r,u=e.openSync(t,ue.O_WRONLY|ue.O_SYMLINK,n),o=!0;try{r=e.fchmodSync(u,n),o=!1}finally{if(o)try{e.closeSync(u)}catch(e){}else e.closeSync(u)}return r}}(e);e.lutimes||function(e){ue.hasOwnProperty("O_SYMLINK")&&e.futimes?(e.lutimes=function(t,n,r,u){e.open(t,ue.O_SYMLINK,(function(t,o){t?u&&u(t):e.futimes(o,n,r,(function(t){e.close(o,(function(e){u&&u(t||e)}))}))}))},e.lutimesSync=function(t,n,r){var u,o=e.openSync(t,ue.O_SYMLINK),i=!0;try{u=e.futimesSync(o,n,r),i=!1}finally{if(i)try{e.closeSync(o)}catch(e){}else e.closeSync(o)}return u}):e.futimes&&(e.lutimes=function(e,t,n,r){r&&process.nextTick(r)},e.lutimesSync=function(){})}(e);e.chown=r(e.chown),e.fchown=r(e.fchown),e.lchown=r(e.lchown),e.chmod=t(e.chmod),e.fchmod=t(e.fchmod),e.lchmod=t(e.lchmod),e.chownSync=u(e.chownSync),e.fchownSync=u(e.fchownSync),e.lchownSync=u(e.lchownSync),e.chmodSync=n(e.chmodSync),e.fchmodSync=n(e.fchmodSync),e.lchmodSync=n(e.lchmodSync),e.stat=o(e.stat),e.fstat=o(e.fstat),e.lstat=o(e.lstat),e.statSync=i(e.statSync),e.fstatSync=i(e.fstatSync),e.lstatSync=i(e.lstatSync),e.chmod&&!e.lchmod&&(e.lchmod=function(e,t,n){n&&process.nextTick(n)},e.lchmodSync=function(){});e.chown&&!e.lchown&&(e.lchown=function(e,t,n,r){r&&process.nextTick(r)},e.lchownSync=function(){});"win32"===se&&(e.rename="function"!=typeof e.rename?e.rename:function(t){function n(n,r,u){var o=Date.now(),i=0;t(n,r,(function s(c){if(c&&("EACCES"===c.code||"EPERM"===c.code||"EBUSY"===c.code)&&Date.now()-o<6e4)return setTimeout((function(){e.stat(r,(function(e,o){e&&"ENOENT"===e.code?t(n,r,s):u(c)}))}),i),void(i<100&&(i+=10));u&&u(c)}))}return Object.setPrototypeOf&&Object.setPrototypeOf(n,t),n}(e.rename));function t(t){return t?function(n,r,u){return t.call(e,n,r,(function(e){s(e)&&(e=null),u&&u.apply(this,arguments)}))}:t}function n(t){return t?function(n,r){try{return t.call(e,n,r)}catch(e){if(!s(e))throw e}}:t}function r(t){return t?function(n,r,u,o){return t.call(e,n,r,u,(function(e){s(e)&&(e=null),o&&o.apply(this,arguments)}))}:t}function u(t){return t?function(n,r,u){try{return t.call(e,n,r,u)}catch(e){if(!s(e))throw e}}:t}function o(t){return t?function(n,r,u){function o(e,t){t&&(t.uid<0&&(t.uid+=4294967296),t.gid<0&&(t.gid+=4294967296)),u&&u.apply(this,arguments)}return"function"==typeof r&&(u=r,r=null),r?t.call(e,n,r,o):t.call(e,n,o)}:t}function i(t){return t?function(n,r){var u=r?t.call(e,n,r):t.call(e,n);return u&&(u.uid<0&&(u.uid+=4294967296),u.gid<0&&(u.gid+=4294967296)),u}:t}function s(e){return!e||("ENOSYS"===e.code||!(process.getuid&&0===process.getuid()||"EINVAL"!==e.code&&"EPERM"!==e.code))}e.read="function"!=typeof e.read?e.read:function(t){function n(n,r,u,o,i,s){var c;if(s&&"function"==typeof s){var a=0;c=function(l,f,d){if(l&&"EAGAIN"===l.code&&a<10)return a++,t.call(e,n,r,u,o,i,c);s.apply(this,arguments)}}return t.call(e,n,r,u,o,i,c)}return Object.setPrototypeOf&&Object.setPrototypeOf(n,t),n}(e.read),e.readSync="function"!=typeof e.readSync?e.readSync:(c=e.readSync,function(t,n,r,u,o){for(var i=0;;)try{return c.call(e,t,n,r,u,o)}catch(e){if("EAGAIN"===e.code&&i<10){i++;continue}throw e}});var c};var le=C.default.Stream,fe=function(e){return{ReadStream:function t(n,r){if(!(this instanceof t))return new t(n,r);le.call(this);var u=this;this.path=n,this.fd=null,this.readable=!0,this.paused=!1,this.flags="r",this.mode=438,this.bufferSize=65536,r=r||{};for(var o=Object.keys(r),i=0,s=o.length;ithis.end)throw new Error("start must be <= end");this.pos=this.start}if(null!==this.fd)return void process.nextTick((function(){u._read()}));e.open(this.path,this.flags,this.mode,(function(e,t){if(e)return u.emit("error",e),void(u.readable=!1);u.fd=t,u.emit("open",t),u._read()}))},WriteStream:function t(n,r){if(!(this instanceof t))return new t(n,r);le.call(this),this.path=n,this.fd=null,this.writable=!0,this.flags="w",this.encoding="binary",this.mode=438,this.bytesWritten=0,r=r||{};for(var u=Object.keys(r),o=0,i=u.length;o= zero");this.pos=this.start}this.busy=!1,this._queue=[],null===this.fd&&(this._open=e.open,this._queue.push([this._open,this.path,this.flags,this.mode,void 0]),this.flush())}}};var de=function(e){if(null===e||"object"!=typeof e)return e;if(e instanceof Object)var t={__proto__:De(e)};else t=Object.create(null);return Object.getOwnPropertyNames(e).forEach((function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))})),t},De=Object.getPrototypeOf||function(e){return e.__proto__};var pe,Ee,me=D.default,he=ae,ye=fe,Ce=de,Fe=F.default;function ge(e,t){Object.defineProperty(e,pe,{get:function(){return t}})}"function"==typeof Symbol&&"function"==typeof Symbol.for?(pe=Symbol.for("graceful-fs.queue"),Ee=Symbol.for("graceful-fs.previous")):(pe="___graceful-fs.queue",Ee="___graceful-fs.previous");var Ae=function(){};if(Fe.debuglog?Ae=Fe.debuglog("gfs4"):/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&(Ae=function(){var e=Fe.format.apply(Fe,arguments);e="GFS4: "+e.split(/\n/).join("\nGFS4: "),console.error(e)}),!me[pe]){var ve=w[pe]||[];ge(me,ve),me.close=function(e){function t(t,n){return e.call(me,t,(function(e){e||_e(),"function"==typeof n&&n.apply(this,arguments)}))}return Object.defineProperty(t,Ee,{value:e}),t}(me.close),me.closeSync=function(e){function t(t){e.apply(me,arguments),_e()}return Object.defineProperty(t,Ee,{value:e}),t}(me.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&process.on("exit",(function(){Ae(me[pe]),g.default.equal(me[pe].length,0)}))}w[pe]||ge(w,me[pe]);var Se,we=Oe(Ce(me));function Oe(e){he(e),e.gracefulify=Oe,e.createReadStream=function(t,n){return new e.ReadStream(t,n)},e.createWriteStream=function(t,n){return new e.WriteStream(t,n)};var t=e.readFile;e.readFile=function(e,n,r){"function"==typeof n&&(r=n,n=null);return function e(n,r,u,o){return t(n,r,(function(t){!t||"EMFILE"!==t.code&&"ENFILE"!==t.code?"function"==typeof u&&u.apply(this,arguments):be([e,[n,r,u],t,o||Date.now(),Date.now()])}))}(e,n,r)};var n=e.writeFile;e.writeFile=function(e,t,r,u){"function"==typeof r&&(u=r,r=null);return function e(t,r,u,o,i){return n(t,r,u,(function(n){!n||"EMFILE"!==n.code&&"ENFILE"!==n.code?"function"==typeof o&&o.apply(this,arguments):be([e,[t,r,u,o],n,i||Date.now(),Date.now()])}))}(e,t,r,u)};var r=e.appendFile;r&&(e.appendFile=function(e,t,n,u){"function"==typeof n&&(u=n,n=null);return function e(t,n,u,o,i){return r(t,n,u,(function(r){!r||"EMFILE"!==r.code&&"ENFILE"!==r.code?"function"==typeof o&&o.apply(this,arguments):be([e,[t,n,u,o],r,i||Date.now(),Date.now()])}))}(e,t,n,u)});var u=e.copyFile;u&&(e.copyFile=function(e,t,n,r){"function"==typeof n&&(r=n,n=0);return function e(t,n,r,o,i){return u(t,n,r,(function(u){!u||"EMFILE"!==u.code&&"ENFILE"!==u.code?"function"==typeof o&&o.apply(this,arguments):be([e,[t,n,r,o],u,i||Date.now(),Date.now()])}))}(e,t,n,r)});var o=e.readdir;e.readdir=function(e,t,n){"function"==typeof t&&(n=t,t=null);var r=i.test(process.version)?function(e,t,n,r){return o(e,u(e,t,n,r))}:function(e,t,n,r){return o(e,t,u(e,t,n,r))};return r(e,t,n);function u(e,t,n,u){return function(o,i){!o||"EMFILE"!==o.code&&"ENFILE"!==o.code?(i&&i.sort&&i.sort(),"function"==typeof n&&n.call(this,o,i)):be([r,[e,t,n],o,u||Date.now(),Date.now()])}}};var i=/^v[0-5]\./;if("v0.8"===process.version.substr(0,4)){var s=ye(e);d=s.ReadStream,D=s.WriteStream}var c=e.ReadStream;c&&(d.prototype=Object.create(c.prototype),d.prototype.open=function(){var e=this;E(e.path,e.flags,e.mode,(function(t,n){t?(e.autoClose&&e.destroy(),e.emit("error",t)):(e.fd=n,e.emit("open",n),e.read())}))});var a=e.WriteStream;a&&(D.prototype=Object.create(a.prototype),D.prototype.open=function(){var e=this;E(e.path,e.flags,e.mode,(function(t,n){t?(e.destroy(),e.emit("error",t)):(e.fd=n,e.emit("open",n))}))}),Object.defineProperty(e,"ReadStream",{get:function(){return d},set:function(e){d=e},enumerable:!0,configurable:!0}),Object.defineProperty(e,"WriteStream",{get:function(){return D},set:function(e){D=e},enumerable:!0,configurable:!0});var l=d;Object.defineProperty(e,"FileReadStream",{get:function(){return l},set:function(e){l=e},enumerable:!0,configurable:!0});var f=D;function d(e,t){return this instanceof d?(c.apply(this,arguments),this):d.apply(Object.create(d.prototype),arguments)}function D(e,t){return this instanceof D?(a.apply(this,arguments),this):D.apply(Object.create(D.prototype),arguments)}Object.defineProperty(e,"FileWriteStream",{get:function(){return f},set:function(e){f=e},enumerable:!0,configurable:!0});var p=e.open;function E(e,t,n,r){return"function"==typeof n&&(r=n,n=null),function e(t,n,r,u,o){return p(t,n,r,(function(i,s){!i||"EMFILE"!==i.code&&"ENFILE"!==i.code?"function"==typeof u&&u.apply(this,arguments):be([e,[t,n,r,u],i,o||Date.now(),Date.now()])}))}(e,t,n,r)}return e.open=E,e}function be(e){Ae("ENQUEUE",e[0].name,e[1]),me[pe].push(e),Be()}function _e(){for(var e=Date.now(),t=0;t2&&(me[pe][t][3]=e,me[pe][t][4]=e);Be()}function Be(){if(clearTimeout(Se),Se=void 0,0!==me[pe].length){var e=me[pe].shift(),t=e[0],n=e[1],r=e[2],u=e[3],o=e[4];if(void 0===u)Ae("RETRY",t.name,n),t.apply(null,n);else if(Date.now()-u>=6e4){Ae("TIMEOUT",t.name,n);var i=n.pop();"function"==typeof i&&i.call(null,r)}else{var s=Date.now()-o,c=Math.max(o-u,1);s>=Math.min(1.2*c,100)?(Ae("RETRY",t.name,n),t.apply(null,n.concat([u]))):me[pe].push(e)}void 0===Se&&(Se=setTimeout(Be,0))}}process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!me.__patched&&(we=Oe(me),me.__patched=!0),function(e){const t=re.fromCallback,n=we,r=["access","appendFile","chmod","chown","close","copyFile","fchmod","fchown","fdatasync","fstat","fsync","ftruncate","futimes","lchmod","lchown","link","lstat","mkdir","mkdtemp","open","opendir","readdir","readFile","readlink","realpath","rename","rm","rmdir","stat","symlink","truncate","unlink","utimes","writeFile"].filter((e=>"function"==typeof n[e]));Object.assign(e,n),r.forEach((r=>{e[r]=t(n[r])})),e.realpath.native=t(n.realpath.native),e.exists=function(e,t){return"function"==typeof t?n.exists(e,t):new Promise((t=>n.exists(e,t)))},e.read=function(e,t,r,u,o,i){return"function"==typeof i?n.read(e,t,r,u,o,i):new Promise(((i,s)=>{n.read(e,t,r,u,o,((e,t,n)=>{if(e)return s(e);i({bytesRead:t,buffer:n})}))}))},e.write=function(e,t,...r){return"function"==typeof r[r.length-1]?n.write(e,t,...r):new Promise(((u,o)=>{n.write(e,t,...r,((e,t,n)=>{if(e)return o(e);u({bytesWritten:t,buffer:n})}))}))},"function"==typeof n.writev&&(e.writev=function(e,t,...r){return"function"==typeof r[r.length-1]?n.writev(e,t,...r):new Promise(((u,o)=>{n.writev(e,t,...r,((e,t,n)=>{if(e)return o(e);u({bytesWritten:t,buffers:n})}))}))})}(ne);var Pe={},ke={};const xe=p.default;ke.checkPath=function(e){if("win32"===process.platform){if(/[<>:"|?*]/.test(e.replace(xe.parse(e).root,""))){const t=new Error(`Path contains invalid characters: ${e}`);throw t.code="EINVAL",t}}};const Ne=ne,{checkPath:Ie}=ke,Te=e=>"number"==typeof e?e:{mode:511,...e}.mode;Pe.makeDir=async(e,t)=>(Ie(e),Ne.mkdir(e,{mode:Te(t),recursive:!0})),Pe.makeDirSync=(e,t)=>(Ie(e),Ne.mkdirSync(e,{mode:Te(t),recursive:!0}));const Re=re.fromPromise,{makeDir:Me,makeDirSync:Le}=Pe,je=Re(Me);var $e={mkdirs:je,mkdirsSync:Le,mkdirp:je,mkdirpSync:Le,ensureDir:je,ensureDirSync:Le};const He=re.fromPromise,Je=ne;var Ge={pathExists:He((function(e){return Je.access(e).then((()=>!0)).catch((()=>!1))})),pathExistsSync:Je.existsSync};const Ve=we;var Ue=function(e,t,n,r){Ve.open(e,"r+",((e,u)=>{if(e)return r(e);Ve.futimes(u,t,n,(e=>{Ve.close(u,(t=>{r&&r(e||t)}))}))}))},We=function(e,t,n){const r=Ve.openSync(e,"r+");return Ve.futimesSync(r,t,n),Ve.closeSync(r)};const ze=ne,Ke=p.default,qe=F.default;function Ye(e,t,n){const r=n.dereference?e=>ze.stat(e,{bigint:!0}):e=>ze.lstat(e,{bigint:!0});return Promise.all([r(e),r(t).catch((e=>{if("ENOENT"===e.code)return null;throw e}))]).then((([e,t])=>({srcStat:e,destStat:t})))}function Xe(e,t){return t.ino&&t.dev&&t.ino===e.ino&&t.dev===e.dev}function Ze(e,t){const n=Ke.resolve(e).split(Ke.sep).filter((e=>e)),r=Ke.resolve(t).split(Ke.sep).filter((e=>e));return n.reduce(((e,t,n)=>e&&r[n]===t),!0)}function Qe(e,t,n){return`Cannot ${n} '${e}' to a subdirectory of itself, '${t}'.`}var et={checkPaths:function(e,t,n,r,u){qe.callbackify(Ye)(e,t,r,((r,o)=>{if(r)return u(r);const{srcStat:i,destStat:s}=o;if(s){if(Xe(i,s)){const r=Ke.basename(e),o=Ke.basename(t);return"move"===n&&r!==o&&r.toLowerCase()===o.toLowerCase()?u(null,{srcStat:i,destStat:s,isChangingCase:!0}):u(new Error("Source and destination must not be the same."))}if(i.isDirectory()&&!s.isDirectory())return u(new Error(`Cannot overwrite non-directory '${t}' with directory '${e}'.`));if(!i.isDirectory()&&s.isDirectory())return u(new Error(`Cannot overwrite directory '${t}' with non-directory '${e}'.`))}return i.isDirectory()&&Ze(e,t)?u(new Error(Qe(e,t,n))):u(null,{srcStat:i,destStat:s})}))},checkPathsSync:function(e,t,n,r){const{srcStat:u,destStat:o}=function(e,t,n){let r;const u=n.dereference?e=>ze.statSync(e,{bigint:!0}):e=>ze.lstatSync(e,{bigint:!0}),o=u(e);try{r=u(t)}catch(e){if("ENOENT"===e.code)return{srcStat:o,destStat:null};throw e}return{srcStat:o,destStat:r}}(e,t,r);if(o){if(Xe(u,o)){const r=Ke.basename(e),i=Ke.basename(t);if("move"===n&&r!==i&&r.toLowerCase()===i.toLowerCase())return{srcStat:u,destStat:o,isChangingCase:!0};throw new Error("Source and destination must not be the same.")}if(u.isDirectory()&&!o.isDirectory())throw new Error(`Cannot overwrite non-directory '${t}' with directory '${e}'.`);if(!u.isDirectory()&&o.isDirectory())throw new Error(`Cannot overwrite directory '${t}' with non-directory '${e}'.`)}if(u.isDirectory()&&Ze(e,t))throw new Error(Qe(e,t,n));return{srcStat:u,destStat:o}},checkParentPaths:function e(t,n,r,u,o){const i=Ke.resolve(Ke.dirname(t)),s=Ke.resolve(Ke.dirname(r));if(s===i||s===Ke.parse(s).root)return o();ze.stat(s,{bigint:!0},((i,c)=>i?"ENOENT"===i.code?o():o(i):Xe(n,c)?o(new Error(Qe(t,r,u))):e(t,n,s,u,o)))},checkParentPathsSync:function e(t,n,r,u){const o=Ke.resolve(Ke.dirname(t)),i=Ke.resolve(Ke.dirname(r));if(i===o||i===Ke.parse(i).root)return;let s;try{s=ze.statSync(i,{bigint:!0})}catch(e){if("ENOENT"===e.code)return;throw e}if(Xe(n,s))throw new Error(Qe(t,r,u));return e(t,n,i,u)},isSrcSubdir:Ze,areIdentical:Xe};const tt=we,nt=p.default,rt=$e.mkdirs,ut=Ge.pathExists,ot=Ue,it=et;function st(e,t,n,r,u){const o=nt.dirname(n);ut(o,((i,s)=>i?u(i):s?at(e,t,n,r,u):void rt(o,(o=>o?u(o):at(e,t,n,r,u)))))}function ct(e,t,n,r,u,o){Promise.resolve(u.filter(n,r)).then((i=>i?e(t,n,r,u,o):o()),(e=>o(e)))}function at(e,t,n,r,u){(r.dereference?tt.stat:tt.lstat)(t,((o,i)=>o?u(o):i.isDirectory()?function(e,t,n,r,u,o){return t?Dt(n,r,u,o):function(e,t,n,r,u){tt.mkdir(n,(o=>{if(o)return u(o);Dt(t,n,r,(t=>t?u(t):dt(n,e,u)))}))}(e.mode,n,r,u,o)}(i,e,t,n,r,u):i.isFile()||i.isCharacterDevice()||i.isBlockDevice()?function(e,t,n,r,u,o){return t?function(e,t,n,r,u){if(!r.overwrite)return r.errorOnExist?u(new Error(`'${n}' already exists`)):u();tt.unlink(n,(o=>o?u(o):lt(e,t,n,r,u)))}(e,n,r,u,o):lt(e,n,r,u,o)}(i,e,t,n,r,u):i.isSymbolicLink()?function(e,t,n,r,u){tt.readlink(t,((t,o)=>t?u(t):(r.dereference&&(o=nt.resolve(process.cwd(),o)),e?void tt.readlink(n,((t,i)=>t?"EINVAL"===t.code||"UNKNOWN"===t.code?tt.symlink(o,n,u):u(t):(r.dereference&&(i=nt.resolve(process.cwd(),i)),it.isSrcSubdir(o,i)?u(new Error(`Cannot copy '${o}' to a subdirectory of itself, '${i}'.`)):e.isDirectory()&&it.isSrcSubdir(i,o)?u(new Error(`Cannot overwrite '${i}' with '${o}'.`)):function(e,t,n){tt.unlink(t,(r=>r?n(r):tt.symlink(e,t,n)))}(o,n,u)))):tt.symlink(o,n,u))))}(e,t,n,r,u):i.isSocket()?u(new Error(`Cannot copy a socket file: ${t}`)):i.isFIFO()?u(new Error(`Cannot copy a FIFO pipe: ${t}`)):u(new Error(`Unknown file: ${t}`))))}function lt(e,t,n,r,u){tt.copyFile(t,n,(o=>o?u(o):r.preserveTimestamps?function(e,t,n,r){if(function(e){return 0==(128&e)}(e))return function(e,t,n){return dt(e,128|t,n)}(n,e,(u=>u?r(u):ft(e,t,n,r)));return ft(e,t,n,r)}(e.mode,t,n,u):dt(n,e.mode,u)))}function ft(e,t,n,r){!function(e,t,n){tt.stat(e,((e,r)=>e?n(e):ot(t,r.atime,r.mtime,n)))}(t,n,(t=>t?r(t):dt(n,e,r)))}function dt(e,t,n){return tt.chmod(e,t,n)}function Dt(e,t,n,r){tt.readdir(e,((u,o)=>u?r(u):pt(o,e,t,n,r)))}function pt(e,t,n,r,u){const o=e.pop();return o?function(e,t,n,r,u,o){const i=nt.join(n,t),s=nt.join(r,t);it.checkPaths(i,s,"copy",u,((t,c)=>{if(t)return o(t);const{destStat:a}=c;!function(e,t,n,r,u){r.filter?ct(at,e,t,n,r,u):at(e,t,n,r,u)}(a,i,s,u,(t=>t?o(t):pt(e,n,r,u,o)))}))}(e,o,t,n,r,u):u()}var Et=function(e,t,n,r){"function"!=typeof n||r?"function"==typeof n&&(n={filter:n}):(r=n,n={}),r=r||function(){},(n=n||{}).clobber=!("clobber"in n)||!!n.clobber,n.overwrite="overwrite"in n?!!n.overwrite:n.clobber,n.preserveTimestamps&&"ia32"===process.arch&&console.warn("fs-extra: Using the preserveTimestamps option in 32-bit node is not recommended;\n\n see https://github.com/jprichardson/node-fs-extra/issues/269"),it.checkPaths(e,t,"copy",n,((u,o)=>{if(u)return r(u);const{srcStat:i,destStat:s}=o;it.checkParentPaths(e,i,t,"copy",(u=>u?r(u):n.filter?ct(st,s,e,t,n,r):st(s,e,t,n,r)))}))};const mt=we,ht=p.default,yt=$e.mkdirsSync,Ct=We,Ft=et;function gt(e,t,n,r){const u=(r.dereference?mt.statSync:mt.lstatSync)(t);if(u.isDirectory())return function(e,t,n,r,u){return t?St(n,r,u):function(e,t,n,r){return mt.mkdirSync(n),St(t,n,r),vt(n,e)}(e.mode,n,r,u)}(u,e,t,n,r);if(u.isFile()||u.isCharacterDevice()||u.isBlockDevice())return function(e,t,n,r,u){return t?function(e,t,n,r){if(r.overwrite)return mt.unlinkSync(n),At(e,t,n,r);if(r.errorOnExist)throw new Error(`'${n}' already exists`)}(e,n,r,u):At(e,n,r,u)}(u,e,t,n,r);if(u.isSymbolicLink())return function(e,t,n,r){let u=mt.readlinkSync(t);r.dereference&&(u=ht.resolve(process.cwd(),u));if(e){let e;try{e=mt.readlinkSync(n)}catch(e){if("EINVAL"===e.code||"UNKNOWN"===e.code)return mt.symlinkSync(u,n);throw e}if(r.dereference&&(e=ht.resolve(process.cwd(),e)),Ft.isSrcSubdir(u,e))throw new Error(`Cannot copy '${u}' to a subdirectory of itself, '${e}'.`);if(mt.statSync(n).isDirectory()&&Ft.isSrcSubdir(e,u))throw new Error(`Cannot overwrite '${e}' with '${u}'.`);return function(e,t){return mt.unlinkSync(t),mt.symlinkSync(e,t)}(u,n)}return mt.symlinkSync(u,n)}(e,t,n,r);if(u.isSocket())throw new Error(`Cannot copy a socket file: ${t}`);if(u.isFIFO())throw new Error(`Cannot copy a FIFO pipe: ${t}`);throw new Error(`Unknown file: ${t}`)}function At(e,t,n,r){return mt.copyFileSync(t,n),r.preserveTimestamps&&function(e,t,n){(function(e){return 0==(128&e)})(e)&&function(e,t){vt(e,128|t)}(n,e);(function(e,t){const n=mt.statSync(e);Ct(t,n.atime,n.mtime)})(t,n)}(e.mode,t,n),vt(n,e.mode)}function vt(e,t){return mt.chmodSync(e,t)}function St(e,t,n){mt.readdirSync(e).forEach((r=>function(e,t,n,r){const u=ht.join(t,e),o=ht.join(n,e),{destStat:i}=Ft.checkPathsSync(u,o,"copy",r);return function(e,t,n,r){if(!r.filter||r.filter(t,n))return gt(e,t,n,r)}(i,u,o,r)}(r,e,t,n)))}var wt=function(e,t,n){"function"==typeof n&&(n={filter:n}),(n=n||{}).clobber=!("clobber"in n)||!!n.clobber,n.overwrite="overwrite"in n?!!n.overwrite:n.clobber,n.preserveTimestamps&&"ia32"===process.arch&&console.warn("fs-extra: Using the preserveTimestamps option in 32-bit node is not recommended;\n\n see https://github.com/jprichardson/node-fs-extra/issues/269");const{srcStat:r,destStat:u}=Ft.checkPathsSync(e,t,"copy",n);return Ft.checkParentPathsSync(e,r,t,"copy"),function(e,t,n,r){if(r.filter&&!r.filter(t,n))return;const u=ht.dirname(n);mt.existsSync(u)||yt(u);return gt(e,t,n,r)}(u,e,t,n)};var Ot={copy:(0,re.fromCallback)(Et),copySync:wt};const bt=we,_t=p.default,Bt=g.default,Pt="win32"===process.platform;function kt(e){["unlink","chmod","stat","lstat","rmdir","readdir"].forEach((t=>{e[t]=e[t]||bt[t],e[t+="Sync"]=e[t]||bt[t]})),e.maxBusyTries=e.maxBusyTries||3}function xt(e,t,n){let r=0;"function"==typeof t&&(n=t,t={}),Bt(e,"rimraf: missing path"),Bt.strictEqual(typeof e,"string","rimraf: path should be a string"),Bt.strictEqual(typeof n,"function","rimraf: callback function required"),Bt(t,"rimraf: invalid options argument provided"),Bt.strictEqual(typeof t,"object","rimraf: options should be object"),kt(t),Nt(e,t,(function u(o){if(o){if(("EBUSY"===o.code||"ENOTEMPTY"===o.code||"EPERM"===o.code)&&rNt(e,t,u)),100*r)}"ENOENT"===o.code&&(o=null)}n(o)}))}function Nt(e,t,n){Bt(e),Bt(t),Bt("function"==typeof n),t.lstat(e,((r,u)=>r&&"ENOENT"===r.code?n(null):r&&"EPERM"===r.code&&Pt?It(e,t,r,n):u&&u.isDirectory()?Rt(e,t,r,n):void t.unlink(e,(r=>{if(r){if("ENOENT"===r.code)return n(null);if("EPERM"===r.code)return Pt?It(e,t,r,n):Rt(e,t,r,n);if("EISDIR"===r.code)return Rt(e,t,r,n)}return n(r)}))))}function It(e,t,n,r){Bt(e),Bt(t),Bt("function"==typeof r),t.chmod(e,438,(u=>{u?r("ENOENT"===u.code?null:n):t.stat(e,((u,o)=>{u?r("ENOENT"===u.code?null:n):o.isDirectory()?Rt(e,t,n,r):t.unlink(e,r)}))}))}function Tt(e,t,n){let r;Bt(e),Bt(t);try{t.chmodSync(e,438)}catch(e){if("ENOENT"===e.code)return;throw n}try{r=t.statSync(e)}catch(e){if("ENOENT"===e.code)return;throw n}r.isDirectory()?Lt(e,t,n):t.unlinkSync(e)}function Rt(e,t,n,r){Bt(e),Bt(t),Bt("function"==typeof r),t.rmdir(e,(u=>{!u||"ENOTEMPTY"!==u.code&&"EEXIST"!==u.code&&"EPERM"!==u.code?u&&"ENOTDIR"===u.code?r(n):r(u):function(e,t,n){Bt(e),Bt(t),Bt("function"==typeof n),t.readdir(e,((r,u)=>{if(r)return n(r);let o,i=u.length;if(0===i)return t.rmdir(e,n);u.forEach((r=>{xt(_t.join(e,r),t,(r=>{if(!o)return r?n(o=r):void(0==--i&&t.rmdir(e,n))}))}))}))}(e,t,r)}))}function Mt(e,t){let n;kt(t=t||{}),Bt(e,"rimraf: missing path"),Bt.strictEqual(typeof e,"string","rimraf: path should be a string"),Bt(t,"rimraf: missing options"),Bt.strictEqual(typeof t,"object","rimraf: options should be object");try{n=t.lstatSync(e)}catch(n){if("ENOENT"===n.code)return;"EPERM"===n.code&&Pt&&Tt(e,t,n)}try{n&&n.isDirectory()?Lt(e,t,null):t.unlinkSync(e)}catch(n){if("ENOENT"===n.code)return;if("EPERM"===n.code)return Pt?Tt(e,t,n):Lt(e,t,n);if("EISDIR"!==n.code)throw n;Lt(e,t,n)}}function Lt(e,t,n){Bt(e),Bt(t);try{t.rmdirSync(e)}catch(r){if("ENOTDIR"===r.code)throw n;if("ENOTEMPTY"===r.code||"EEXIST"===r.code||"EPERM"===r.code)!function(e,t){if(Bt(e),Bt(t),t.readdirSync(e).forEach((n=>Mt(_t.join(e,n),t))),!Pt){return t.rmdirSync(e,t)}{const n=Date.now();do{try{return t.rmdirSync(e,t)}catch{}}while(Date.now()-n<500)}}(e,t);else if("ENOENT"!==r.code)throw r}}var jt=xt;xt.sync=Mt;const $t=we,Ht=re.fromCallback,Jt=jt;var Gt={remove:Ht((function(e,t){if($t.rm)return $t.rm(e,{recursive:!0,force:!0},t);Jt(e,t)})),removeSync:function(e){if($t.rmSync)return $t.rmSync(e,{recursive:!0,force:!0});Jt.sync(e)}};const Vt=re.fromPromise,Ut=ne,Wt=p.default,zt=$e,Kt=Gt,qt=Vt((async function(e){let t;try{t=await Ut.readdir(e)}catch{return zt.mkdirs(e)}return Promise.all(t.map((t=>Kt.remove(Wt.join(e,t)))))}));function Yt(e){let t;try{t=Ut.readdirSync(e)}catch{return zt.mkdirsSync(e)}t.forEach((t=>{t=Wt.join(e,t),Kt.removeSync(t)}))}var Xt={emptyDirSync:Yt,emptydirSync:Yt,emptyDir:qt,emptydir:qt};const Zt=re.fromCallback,Qt=p.default,en=we,tn=$e;var nn={createFile:Zt((function(e,t){function n(){en.writeFile(e,"",(e=>{if(e)return t(e);t()}))}en.stat(e,((r,u)=>{if(!r&&u.isFile())return t();const o=Qt.dirname(e);en.stat(o,((e,r)=>{if(e)return"ENOENT"===e.code?tn.mkdirs(o,(e=>{if(e)return t(e);n()})):t(e);r.isDirectory()?n():en.readdir(o,(e=>{if(e)return t(e)}))}))}))})),createFileSync:function(e){let t;try{t=en.statSync(e)}catch{}if(t&&t.isFile())return;const n=Qt.dirname(e);try{en.statSync(n).isDirectory()||en.readdirSync(n)}catch(e){if(!e||"ENOENT"!==e.code)throw e;tn.mkdirsSync(n)}en.writeFileSync(e,"")}};const rn=re.fromCallback,un=p.default,on=we,sn=$e,cn=Ge.pathExists,{areIdentical:an}=et;var ln={createLink:rn((function(e,t,n){function r(e,t){on.link(e,t,(e=>{if(e)return n(e);n(null)}))}on.lstat(t,((u,o)=>{on.lstat(e,((u,i)=>{if(u)return u.message=u.message.replace("lstat","ensureLink"),n(u);if(o&&an(i,o))return n(null);const s=un.dirname(t);cn(s,((u,o)=>u?n(u):o?r(e,t):void sn.mkdirs(s,(u=>{if(u)return n(u);r(e,t)}))))}))}))})),createLinkSync:function(e,t){let n;try{n=on.lstatSync(t)}catch{}try{const t=on.lstatSync(e);if(n&&an(t,n))return}catch(e){throw e.message=e.message.replace("lstat","ensureLink"),e}const r=un.dirname(t);return on.existsSync(r)||sn.mkdirsSync(r),on.linkSync(e,t)}};const fn=p.default,dn=we,Dn=Ge.pathExists;var pn={symlinkPaths:function(e,t,n){if(fn.isAbsolute(e))return dn.lstat(e,(t=>t?(t.message=t.message.replace("lstat","ensureSymlink"),n(t)):n(null,{toCwd:e,toDst:e})));{const r=fn.dirname(t),u=fn.join(r,e);return Dn(u,((t,o)=>t?n(t):o?n(null,{toCwd:u,toDst:e}):dn.lstat(e,(t=>t?(t.message=t.message.replace("lstat","ensureSymlink"),n(t)):n(null,{toCwd:e,toDst:fn.relative(r,e)})))))}},symlinkPathsSync:function(e,t){let n;if(fn.isAbsolute(e)){if(n=dn.existsSync(e),!n)throw new Error("absolute srcpath does not exist");return{toCwd:e,toDst:e}}{const r=fn.dirname(t),u=fn.join(r,e);if(n=dn.existsSync(u),n)return{toCwd:u,toDst:e};if(n=dn.existsSync(e),!n)throw new Error("relative srcpath does not exist");return{toCwd:e,toDst:fn.relative(r,e)}}}};const En=we;var mn={symlinkType:function(e,t,n){if(n="function"==typeof t?t:n,t="function"!=typeof t&&t)return n(null,t);En.lstat(e,((e,r)=>{if(e)return n(null,"file");t=r&&r.isDirectory()?"dir":"file",n(null,t)}))},symlinkTypeSync:function(e,t){let n;if(t)return t;try{n=En.lstatSync(e)}catch{return"file"}return n&&n.isDirectory()?"dir":"file"}};const hn=re.fromCallback,yn=p.default,Cn=ne,Fn=$e.mkdirs,gn=$e.mkdirsSync,An=pn.symlinkPaths,vn=pn.symlinkPathsSync,Sn=mn.symlinkType,wn=mn.symlinkTypeSync,On=Ge.pathExists,{areIdentical:bn}=et;function _n(e,t,n,r){An(e,t,((u,o)=>{if(u)return r(u);e=o.toDst,Sn(o.toCwd,n,((n,u)=>{if(n)return r(n);const o=yn.dirname(t);On(o,((n,i)=>n?r(n):i?Cn.symlink(e,t,u,r):void Fn(o,(n=>{if(n)return r(n);Cn.symlink(e,t,u,r)}))))}))}))}var Bn={createSymlink:hn((function(e,t,n,r){r="function"==typeof n?n:r,n="function"!=typeof n&&n,Cn.lstat(t,((u,o)=>{!u&&o.isSymbolicLink()?Promise.all([Cn.stat(e),Cn.stat(t)]).then((([u,o])=>{if(bn(u,o))return r(null);_n(e,t,n,r)})):_n(e,t,n,r)}))})),createSymlinkSync:function(e,t,n){let r;try{r=Cn.lstatSync(t)}catch{}if(r&&r.isSymbolicLink()){const n=Cn.statSync(e),r=Cn.statSync(t);if(bn(n,r))return}const u=vn(e,t);e=u.toDst,n=wn(u.toCwd,n);const o=yn.dirname(t);return Cn.existsSync(o)||gn(o),Cn.symlinkSync(e,t,n)}};const{createFile:Pn,createFileSync:kn}=nn,{createLink:xn,createLinkSync:Nn}=ln,{createSymlink:In,createSymlinkSync:Tn}=Bn;var Rn={createFile:Pn,createFileSync:kn,ensureFile:Pn,ensureFileSync:kn,createLink:xn,createLinkSync:Nn,ensureLink:xn,ensureLinkSync:Nn,createSymlink:In,createSymlinkSync:Tn,ensureSymlink:In,ensureSymlinkSync:Tn};var Mn={stringify:function(e,{EOL:t="\n",finalEOL:n=!0,replacer:r=null,spaces:u}={}){const o=n?t:"";return JSON.stringify(e,r,u).replace(/\n/g,t)+o},stripBom:function(e){return Buffer.isBuffer(e)&&(e=e.toString("utf8")),e.replace(/^\uFEFF/,"")}};let Ln;try{Ln=we}catch(e){Ln=D.default}const jn=re,{stringify:$n,stripBom:Hn}=Mn;const Jn=jn.fromPromise((async function(e,t={}){"string"==typeof t&&(t={encoding:t});const n=t.fs||Ln,r=!("throws"in t)||t.throws;let u,o=await jn.fromCallback(n.readFile)(e,t);o=Hn(o);try{u=JSON.parse(o,t?t.reviver:null)}catch(t){if(r)throw t.message=`${e}: ${t.message}`,t;return null}return u}));const Gn=jn.fromPromise((async function(e,t,n={}){const r=n.fs||Ln,u=$n(t,n);await jn.fromCallback(r.writeFile)(e,u,n)}));const Vn={readFile:Jn,readFileSync:function(e,t={}){"string"==typeof t&&(t={encoding:t});const n=t.fs||Ln,r=!("throws"in t)||t.throws;try{let r=n.readFileSync(e,t);return r=Hn(r),JSON.parse(r,t.reviver)}catch(t){if(r)throw t.message=`${e}: ${t.message}`,t;return null}},writeFile:Gn,writeFileSync:function(e,t,n={}){const r=n.fs||Ln,u=$n(t,n);return r.writeFileSync(e,u,n)}};var Un={readJson:Vn.readFile,readJsonSync:Vn.readFileSync,writeJson:Vn.writeFile,writeJsonSync:Vn.writeFileSync};const Wn=re.fromCallback,zn=we,Kn=p.default,qn=$e,Yn=Ge.pathExists;var Xn={outputFile:Wn((function(e,t,n,r){"function"==typeof n&&(r=n,n="utf8");const u=Kn.dirname(e);Yn(u,((o,i)=>o?r(o):i?zn.writeFile(e,t,n,r):void qn.mkdirs(u,(u=>{if(u)return r(u);zn.writeFile(e,t,n,r)}))))})),outputFileSync:function(e,...t){const n=Kn.dirname(e);if(zn.existsSync(n))return zn.writeFileSync(e,...t);qn.mkdirsSync(n),zn.writeFileSync(e,...t)}};const{stringify:Zn}=Mn,{outputFile:Qn}=Xn;var er=async function(e,t,n={}){const r=Zn(t,n);await Qn(e,r,n)};const{stringify:tr}=Mn,{outputFileSync:nr}=Xn;var rr=function(e,t,n){const r=tr(t,n);nr(e,r,n)};const ur=re.fromPromise,or=Un;or.outputJson=ur(er),or.outputJsonSync=rr,or.outputJSON=or.outputJson,or.outputJSONSync=or.outputJsonSync,or.writeJSON=or.writeJson,or.writeJSONSync=or.writeJsonSync,or.readJSON=or.readJson,or.readJSONSync=or.readJsonSync;var ir=or;const sr=we,cr=p.default,ar=Ot.copy,lr=Gt.remove,fr=$e.mkdirp,dr=Ge.pathExists,Dr=et;function pr(e,t,n,r,u){return r?Er(e,t,n,u):n?lr(t,(r=>r?u(r):Er(e,t,n,u))):void dr(t,((r,o)=>r?u(r):o?u(new Error("dest already exists.")):Er(e,t,n,u)))}function Er(e,t,n,r){sr.rename(e,t,(u=>u?"EXDEV"!==u.code?r(u):function(e,t,n,r){const u={overwrite:n,errorOnExist:!0};ar(e,t,u,(t=>t?r(t):lr(e,r)))}(e,t,n,r):r()))}var mr=function(e,t,n,r){"function"==typeof n&&(r=n,n={});const u=n.overwrite||n.clobber||!1;Dr.checkPaths(e,t,"move",n,((n,o)=>{if(n)return r(n);const{srcStat:i,isChangingCase:s=!1}=o;Dr.checkParentPaths(e,i,t,"move",(n=>n?r(n):function(e){const t=cr.dirname(e);return cr.parse(t).root===t}(t)?pr(e,t,u,s,r):void fr(cr.dirname(t),(n=>n?r(n):pr(e,t,u,s,r)))))}))};const hr=we,yr=p.default,Cr=Ot.copySync,Fr=Gt.removeSync,gr=$e.mkdirpSync,Ar=et;function vr(e,t,n){try{hr.renameSync(e,t)}catch(r){if("EXDEV"!==r.code)throw r;return function(e,t,n){const r={overwrite:n,errorOnExist:!0};return Cr(e,t,r),Fr(e)}(e,t,n)}}var Sr=function(e,t,n){const r=(n=n||{}).overwrite||n.clobber||!1,{srcStat:u,isChangingCase:o=!1}=Ar.checkPathsSync(e,t,"move",n);return Ar.checkParentPathsSync(e,u,t,"move"),function(e){const t=yr.dirname(e);return yr.parse(t).root===t}(t)||gr(yr.dirname(t)),function(e,t,n,r){if(r)return vr(e,t,n);if(n)return Fr(t),vr(e,t,n);if(hr.existsSync(t))throw new Error("dest already exists.");return vr(e,t,n)}(e,t,r,o)};var wr,Or,br,_r,Br,Pr={move:(0,re.fromCallback)(mr),moveSync:Sr},kr={...ne,...Ot,...Xt,...Rn,...ir,...$e,...Pr,...Xn,...Ge,...Gt},xr={},Nr={exports:{}},Ir={exports:{}};function Tr(){if(Or)return wr;Or=1;var e=1e3,t=60*e,n=60*t,r=24*n,u=7*r,o=365.25*r;function i(e,t,n,r){var u=t>=1.5*n;return Math.round(e/n)+" "+r+(u?"s":"")}return wr=function(s,c){c=c||{};var a=typeof s;if("string"===a&&s.length>0)return function(i){if((i=String(i)).length>100)return;var s=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(i);if(!s)return;var c=parseFloat(s[1]);switch((s[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return c*o;case"weeks":case"week":case"w":return c*u;case"days":case"day":case"d":return c*r;case"hours":case"hour":case"hrs":case"hr":case"h":return c*n;case"minutes":case"minute":case"mins":case"min":case"m":return c*t;case"seconds":case"second":case"secs":case"sec":case"s":return c*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return c;default:return}}(s);if("number"===a&&isFinite(s))return c.long?function(u){var o=Math.abs(u);if(o>=r)return i(u,o,r,"day");if(o>=n)return i(u,o,n,"hour");if(o>=t)return i(u,o,t,"minute");if(o>=e)return i(u,o,e,"second");return u+" ms"}(s):function(u){var o=Math.abs(u);if(o>=r)return Math.round(u/r)+"d";if(o>=n)return Math.round(u/n)+"h";if(o>=t)return Math.round(u/t)+"m";if(o>=e)return Math.round(u/e)+"s";return u+"ms"}(s);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(s))}}function Rr(){if(_r)return br;return _r=1,br=function(e){function t(e){let r,u,o,i=null;function s(...e){if(!s.enabled)return;const n=s,u=Number(new Date),o=u-(r||u);n.diff=o,n.prev=r,n.curr=u,r=u,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let i=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,((r,u)=>{if("%%"===r)return"%";i++;const o=t.formatters[u];if("function"==typeof o){const t=e[i];r=o.call(n,t),e.splice(i,1),i--}return r})),t.formatArgs.call(n,e);(n.log||t.log).apply(n,e)}return s.namespace=e,s.useColors=t.useColors(),s.color=t.selectColor(e),s.extend=n,s.destroy=t.destroy,Object.defineProperty(s,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==i?i:(u!==t.namespaces&&(u=t.namespaces,o=t.enabled(e)),o),set:e=>{i=e}}),"function"==typeof t.init&&t.init(s),s}function n(e,n){const r=t(this.namespace+(void 0===n?":":n)+e);return r.log=this.log,r}function r(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){if(e instanceof Error)return e.stack||e.message;return e},t.disable=function(){const e=[...t.names.map(r),...t.skips.map(r).map((e=>"-"+e))].join(",");return t.enable(""),e},t.enable=function(e){let n;t.save(e),t.namespaces=e,t.names=[],t.skips=[];const r=("string"==typeof e?e:"").split(/[\s,]+/),u=r.length;for(n=0;n{t[n]=e[n]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let n=0;for(let t=0;t{const n=e.startsWith("-")?"":1===e.length?"-":"--",r=t.indexOf(n+e),u=t.indexOf("--");return-1!==r&&(-1===u||r{}),"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."),t.colors=[6,2,3,4,5,1];try{const e=function(){if($r)return jr;$r=1;const e=E.default,t=A.default,n=Vr(),{env:r}=process;let u;function o(e){return 0!==e&&{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function i(t,o){if(0===u)return 0;if(n("color=16m")||n("color=full")||n("color=truecolor"))return 3;if(n("color=256"))return 2;if(t&&!o&&void 0===u)return 0;const i=u||0;if("dumb"===r.TERM)return i;if("win32"===process.platform){const t=e.release().split(".");return Number(t[0])>=10&&Number(t[2])>=10586?Number(t[2])>=14931?3:2:1}if("CI"in r)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some((e=>e in r))||"codeship"===r.CI_NAME?1:i;if("TEAMCITY_VERSION"in r)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(r.TEAMCITY_VERSION)?1:0;if("truecolor"===r.COLORTERM)return 3;if("TERM_PROGRAM"in r){const e=parseInt((r.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(r.TERM_PROGRAM){case"iTerm.app":return e>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(r.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(r.TERM)||"COLORTERM"in r?1:i}return n("no-color")||n("no-colors")||n("color=false")||n("color=never")?u=0:(n("color")||n("colors")||n("color=true")||n("color=always"))&&(u=1),"FORCE_COLOR"in r&&(u="true"===r.FORCE_COLOR?1:"false"===r.FORCE_COLOR?0:0===r.FORCE_COLOR.length?1:Math.min(parseInt(r.FORCE_COLOR,10),3)),jr={supportsColor:function(e){return o(i(e,e&&e.isTTY))},stdout:o(i(!0,t.isatty(1))),stderr:o(i(!0,t.isatty(2)))}}();e&&(e.stderr||e).level>=2&&(t.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch(e){}t.inspectOpts=Object.keys(process.env).filter((e=>/^debug_/i.test(e))).reduce(((e,t)=>{const n=t.substring(6).toLowerCase().replace(/_([a-z])/g,((e,t)=>t.toUpperCase()));let r=process.env[t];return r=!!/^(yes|on|true|enabled)$/i.test(r)||!/^(no|off|false|disabled)$/i.test(r)&&("null"===r?null:Number(r)),e[n]=r,e}),{}),e.exports=Rr()(t);const{formatters:u}=e.exports;u.o=function(e){return this.inspectOpts.colors=this.useColors,r.inspect(e,this.inspectOpts).split("\n").map((e=>e.trim())).join(" ")},u.O=function(e){return this.inspectOpts.colors=this.useColors,r.inspect(e,this.inspectOpts)}}(Gr,Gr.exports)),Gr.exports}Jr=Nr,"undefined"==typeof process||"renderer"===process.type||!0===process.browser||process.__nwjs?Jr.exports=(Br||(Br=1,function(e,t){t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const n="color: "+this.color;t.splice(1,0,n,"color: inherit");let r=0,u=0;t[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(r++,"%c"===e&&(u=r))})),t.splice(u,0,n)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")}catch(e){}return!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG),e},t.useColors=function(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type&&!window.process.__nwjs)||("undefined"==typeof navigator||!navigator.userAgent||!navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=Rr()(t);const{formatters:n}=e.exports;n.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}}(Ir,Ir.exports)),Ir.exports):Jr.exports=Ur();var Wr=function(e){return(e=e||{}).circles?function(e){var t=[],n=[];return e.proto?function e(u){if("object"!=typeof u||null===u)return u;if(u instanceof Date)return new Date(u);if(Array.isArray(u))return r(u,e);if(u instanceof Map)return new Map(r(Array.from(u),e));if(u instanceof Set)return new Set(r(Array.from(u),e));var o={};for(var i in t.push(u),n.push(o),u){var s=u[i];if("object"!=typeof s||null===s)o[i]=s;else if(s instanceof Date)o[i]=new Date(s);else if(s instanceof Map)o[i]=new Map(r(Array.from(s),e));else if(s instanceof Set)o[i]=new Set(r(Array.from(s),e));else if(ArrayBuffer.isView(s))o[i]=zr(s);else{var c=t.indexOf(s);o[i]=-1!==c?n[c]:e(s)}}return t.pop(),n.pop(),o}:function e(u){if("object"!=typeof u||null===u)return u;if(u instanceof Date)return new Date(u);if(Array.isArray(u))return r(u,e);if(u instanceof Map)return new Map(r(Array.from(u),e));if(u instanceof Set)return new Set(r(Array.from(u),e));var o={};for(var i in t.push(u),n.push(o),u)if(!1!==Object.hasOwnProperty.call(u,i)){var s=u[i];if("object"!=typeof s||null===s)o[i]=s;else if(s instanceof Date)o[i]=new Date(s);else if(s instanceof Map)o[i]=new Map(r(Array.from(s),e));else if(s instanceof Set)o[i]=new Set(r(Array.from(s),e));else if(ArrayBuffer.isView(s))o[i]=zr(s);else{var c=t.indexOf(s);o[i]=-1!==c?n[c]:e(s)}}return t.pop(),n.pop(),o};function r(e,r){for(var u=Object.keys(e),o=new Array(u.length),i=0;i!e,Qr=e=>e&&"object"==typeof e&&!Array.isArray(e),eu=(e,t,n)=>{(Array.isArray(t)?t:[t]).forEach((t=>{if(t)throw new Error(`Problem with log4js configuration: (${Kr.inspect(e,{depth:5})}) - ${n}`)}))};var tu={configure:e=>{qr("New configuration to be validated: ",e),eu(e,Zr(Qr(e)),"must be an object."),qr(`Calling pre-processing listeners (${Yr.length})`),Yr.forEach((t=>t(e))),qr("Configuration pre-processing finished."),qr(`Calling configuration listeners (${Xr.length})`),Xr.forEach((t=>t(e))),qr("Configuration finished.")},addListener:e=>{Xr.push(e),qr(`Added listener, now ${Xr.length} listeners`)},addPreProcessingListener:e=>{Yr.push(e),qr(`Added pre-processing listener, now ${Yr.length} listeners`)},throwExceptionIf:eu,anObject:Qr,anInteger:e=>e&&"number"==typeof e&&Number.isInteger(e),validIdentifier:e=>/^[A-Za-z][A-Za-z0-9_]*$/g.test(e),not:Zr},nu={exports:{}};!function(e){function t(e,t){for(var n=e.toString();n.length-1?s:c,l=n(u.getHours()),f=n(u.getMinutes()),d=n(u.getSeconds()),D=t(u.getMilliseconds(),3),p=function(e){var t=Math.abs(e),n=String(Math.floor(t/60)),r=String(t%60);return n=("0"+n).slice(-2),r=("0"+r).slice(-2),0===e?"Z":(e<0?"+":"-")+n+":"+r}(u.getTimezoneOffset());return r.replace(/dd/g,o).replace(/MM/g,i).replace(/y{1,4}/g,a).replace(/hh/g,l).replace(/mm/g,f).replace(/ss/g,d).replace(/SSS/g,D).replace(/O/g,p)}function u(e,t,n,r){e["set"+(r?"":"UTC")+t](n)}e.exports=r,e.exports.asString=r,e.exports.parse=function(t,n,r){if(!t)throw new Error("pattern must be supplied");return function(t,n,r){var o=t.indexOf("O")<0,i=!1,s=[{pattern:/y{1,4}/,regexp:"\\d{1,4}",fn:function(e,t){u(e,"FullYear",t,o)}},{pattern:/MM/,regexp:"\\d{1,2}",fn:function(e,t){u(e,"Month",t-1,o),e.getMonth()!==t-1&&(i=!0)}},{pattern:/dd/,regexp:"\\d{1,2}",fn:function(e,t){i&&u(e,"Month",e.getMonth()-1,o),u(e,"Date",t,o)}},{pattern:/hh/,regexp:"\\d{1,2}",fn:function(e,t){u(e,"Hours",t,o)}},{pattern:/mm/,regexp:"\\d\\d",fn:function(e,t){u(e,"Minutes",t,o)}},{pattern:/ss/,regexp:"\\d\\d",fn:function(e,t){u(e,"Seconds",t,o)}},{pattern:/SSS/,regexp:"\\d\\d\\d",fn:function(e,t){u(e,"Milliseconds",t,o)}},{pattern:/O/,regexp:"[+-]\\d{1,2}:?\\d{2}?|Z",fn:function(e,t){t="Z"===t?0:t.replace(":","");var n=Math.abs(t),r=(t>0?-1:1)*(n%100+60*Math.floor(n/100));e.setUTCMinutes(e.getUTCMinutes()+r)}}],c=s.reduce((function(e,t){return t.pattern.test(e.regexp)?(t.index=e.regexp.match(t.pattern).index,e.regexp=e.regexp.replace(t.pattern,"("+t.regexp+")")):t.index=-1,e}),{regexp:t,index:[]}),a=s.filter((function(e){return e.index>-1}));a.sort((function(e,t){return e.index-t.index}));var l=new RegExp(c.regexp).exec(n);if(l){var f=r||e.exports.now();return a.forEach((function(e,t){e.fn(f,l[t+1])})),f}throw new Error("String '"+n+"' could not be parsed as '"+t+"'")}(t,n,r)},e.exports.now=function(){return new Date},e.exports.ISO8601_FORMAT="yyyy-MM-ddThh:mm:ss.SSS",e.exports.ISO8601_WITH_TZ_OFFSET_FORMAT="yyyy-MM-ddThh:mm:ss.SSSO",e.exports.DATETIME_FORMAT="dd MM yyyy hh:mm:ss.SSS",e.exports.ABSOLUTETIME_FORMAT="hh:mm:ss.SSS"}(nu);const ru=nu.exports,uu=E.default,ou=F.default,iu=p.default,su={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[90,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[91,39],yellow:[33,39]};function cu(e){return e?`[${su[e][0]}m`:""}function au(e){return e?`[${su[e][1]}m`:""}function lu(e,t){return n=ou.format("[%s] [%s] %s - ",ru.asString(e.startTime),e.level.toString(),e.categoryName),cu(r=t)+n+au(r);var n,r}function fu(e){return lu(e)+ou.format(...e.data)}function du(e){return lu(e,e.level.colour)+ou.format(...e.data)}function Du(e){return ou.format(...e.data)}function pu(e){return e.data[0]}function Eu(e,t){const n=/%(-?[0-9]+)?(\.?-?[0-9]+)?([[\]cdhmnprzxXyflos%])(\{([^}]+)\})?|([^%]+)/;function r(e){return e&&e.pid?e.pid.toString():process.pid.toString()}e=e||"%r %p %c - %m%n";const u={c:function(e,t){let n=e.categoryName;if(t){const e=parseInt(t,10),r=n.split(".");ee&&(n=r.slice(-e).join(iu.sep))}return n},l:function(e){return e.lineNumber?`${e.lineNumber}`:""},o:function(e){return e.columnNumber?`${e.columnNumber}`:""},s:function(e){return e.callStack||""}};function o(e,t,n){return u[e](t,n)}function i(e,t,n){let r=e;return r=function(e,t){let n;return e?(n=parseInt(e.substr(1),10),n>0?t.slice(0,n):t.slice(n)):t}(t,r),r=function(e,t){let n;if(e)if("-"===e.charAt(0))for(n=parseInt(e.substr(1),10);t.lengthDu,basic:()=>fu,colored:()=>du,coloured:()=>du,pattern:e=>Eu(e&&e.pattern,e&&e.tokens),dummy:()=>pu};var hu={basicLayout:fu,messagePassThroughLayout:Du,patternLayout:Eu,colouredLayout:du,coloredLayout:du,dummyLayout:pu,addLayout(e,t){mu[e]=t},layout:(e,t)=>mu[e]&&mu[e](t)};const yu=tu,Cu=["white","grey","black","blue","cyan","green","magenta","red","yellow"];class Fu{constructor(e,t,n){this.level=e,this.levelStr=t,this.colour=n}toString(){return this.levelStr}static getLevel(e,t){return e?e instanceof Fu?e:(e instanceof Object&&e.levelStr&&(e=e.levelStr),Fu[e.toString().toUpperCase()]||t):t}static addLevels(e){if(e){Object.keys(e).forEach((t=>{const n=t.toUpperCase();Fu[n]=new Fu(e[t].value,n,e[t].colour);const r=Fu.levels.findIndex((e=>e.levelStr===n));r>-1?Fu.levels[r]=Fu[n]:Fu.levels.push(Fu[n])})),Fu.levels.sort(((e,t)=>e.level-t.level))}}isLessThanOrEqualTo(e){return"string"==typeof e&&(e=Fu.getLevel(e)),this.level<=e.level}isGreaterThanOrEqualTo(e){return"string"==typeof e&&(e=Fu.getLevel(e)),this.level>=e.level}isEqualTo(e){return"string"==typeof e&&(e=Fu.getLevel(e)),this.level===e.level}}Fu.levels=[],Fu.addLevels({ALL:{value:Number.MIN_VALUE,colour:"grey"},TRACE:{value:5e3,colour:"blue"},DEBUG:{value:1e4,colour:"cyan"},INFO:{value:2e4,colour:"green"},WARN:{value:3e4,colour:"yellow"},ERROR:{value:4e4,colour:"red"},FATAL:{value:5e4,colour:"magenta"},MARK:{value:9007199254740992,colour:"grey"},OFF:{value:Number.MAX_VALUE,colour:"grey"}}),yu.addListener((e=>{const t=e.levels;if(t){yu.throwExceptionIf(e,yu.not(yu.anObject(t)),"levels must be an object");Object.keys(t).forEach((n=>{yu.throwExceptionIf(e,yu.not(yu.validIdentifier(n)),`level name "${n}" is not a valid identifier (must start with a letter, only contain A-Z,a-z,0-9,_)`),yu.throwExceptionIf(e,yu.not(yu.anObject(t[n])),`level "${n}" must be an object`),yu.throwExceptionIf(e,yu.not(t[n].value),`level "${n}" must have a 'value' property`),yu.throwExceptionIf(e,yu.not(yu.anInteger(t[n].value)),`level "${n}".value must have an integer value`),yu.throwExceptionIf(e,yu.not(t[n].colour),`level "${n}" must have a 'colour' property`),yu.throwExceptionIf(e,yu.not(Cu.indexOf(t[n].colour)>-1),`level "${n}".colour must be one of ${Cu.join(", ")}`)}))}})),yu.addListener((e=>{Fu.addLevels(e.levels)}));var gu=Fu,Au={exports:{}},vu={};/*! (c) 2020 Andrea Giammarchi */
-const{parse:Su,stringify:wu}=JSON,{keys:Ou}=Object,bu=String,_u="string",Bu={},Pu="object",ku=(e,t)=>t,xu=e=>e instanceof bu?bu(e):e,Nu=(e,t)=>typeof t===_u?new bu(t):t,Iu=(e,t,n,r)=>{const u=[];for(let o=Ou(n),{length:i}=o,s=0;s{const r=bu(t.push(n)-1);return e.set(n,r),r},Ru=(e,t)=>{const n=Su(e,Nu).map(xu),r=n[0],u=t||ku,o=typeof r===Pu&&r?Iu(n,new Set,r,u):r;return u.call({"":o},"",o)};vu.parse=Ru;const Mu=(e,t,n)=>{const r=t&&typeof t===Pu?(e,n)=>""===e||-1Su(Mu(e));vu.fromJSON=e=>Ru(wu(e));const Lu=vu,ju=gu;class $u{constructor(e,t,n,r,u){this.startTime=new Date,this.categoryName=e,this.data=n,this.level=t,this.context=Object.assign({},r),this.pid=process.pid,u&&(this.functionName=u.functionName,this.fileName=u.fileName,this.lineNumber=u.lineNumber,this.columnNumber=u.columnNumber,this.callStack=u.callStack)}serialise(){const e=this.data.map((e=>(e&&e.message&&e.stack&&(e=Object.assign({message:e.message,stack:e.stack},e)),e)));return this.data=e,Lu.stringify(this)}static deserialise(e){let t;try{const n=Lu.parse(e);n.data=n.data.map((e=>{if(e&&e.message&&e.stack){const t=new Error(e);Object.keys(e).forEach((n=>{t[n]=e[n]})),e=t}return e})),t=new $u(n.categoryName,ju.getLevel(n.level.levelStr),n.data,n.context),t.startTime=new Date(n.startTime),t.pid=n.pid,t.cluster=n.cluster}catch(n){t=new $u("log4js",ju.ERROR,["Unable to parse log:",e,"because: ",n])}return t}}var Hu=$u;const Ju=Nr.exports("log4js:clustering"),Gu=Hu,Vu=tu;let Uu=!1,Wu=null;try{Wu=require("cluster")}catch(e){Ju("cluster module not present"),Uu=!0}const zu=[];let Ku=!1,qu="NODE_APP_INSTANCE";const Yu=()=>Ku&&"0"===process.env[qu],Xu=()=>Uu||Wu.isMaster||Yu(),Zu=e=>{zu.forEach((t=>t(e)))},Qu=(e,t)=>{if(Ju("cluster message received from worker ",e,": ",t),e.topic&&e.data&&(t=e,e=void 0),t&&t.topic&&"log4js:message"===t.topic){Ju("received message: ",t.data);const e=Gu.deserialise(t.data);Zu(e)}};Uu||Vu.addListener((e=>{zu.length=0,({pm2:Ku,disableClustering:Uu,pm2InstanceVar:qu="NODE_APP_INSTANCE"}=e),Ju(`clustering disabled ? ${Uu}`),Ju(`cluster.isMaster ? ${Wu&&Wu.isMaster}`),Ju(`pm2 enabled ? ${Ku}`),Ju(`pm2InstanceVar = ${qu}`),Ju(`process.env[${qu}] = ${process.env[qu]}`),Ku&&process.removeListener("message",Qu),Wu&&Wu.removeListener&&Wu.removeListener("message",Qu),Uu||e.disableClustering?Ju("Not listening for cluster messages, because clustering disabled."):Yu()?(Ju("listening for PM2 broadcast messages"),process.on("message",Qu)):Wu.isMaster?(Ju("listening for cluster messages"),Wu.on("message",Qu)):Ju("not listening for messages, because we are not a master process")}));var eo={onlyOnMaster:(e,t)=>Xu()?e():t,isMaster:Xu,send:e=>{Xu()?Zu(e):(Ku||(e.cluster={workerId:Wu.worker.id,worker:process.pid}),process.send({topic:"log4js:message",data:e.serialise()}))},onMessage:e=>{zu.push(e)}},to={};function no(e){if("number"==typeof e&&Number.isInteger(e))return e;const t={K:1024,M:1048576,G:1073741824},n=Object.keys(t),r=e.substr(e.length-1).toLocaleUpperCase(),u=e.substring(0,e.length-1).trim();if(n.indexOf(r)<0||!Number.isInteger(Number(u)))throw Error(`maxLogSize: "${e}" is invalid`);return u*t[r]}function ro(e){return function(e,t){const n=Object.assign({},t);return Object.keys(e).forEach((r=>{n[r]&&(n[r]=e[r](t[r]))})),n}({maxLogSize:no},e)}const uo={file:ro,fileSync:ro};to.modifyConfig=e=>uo[e.type]?uo[e.type](e):e;var oo={};const io=console.log.bind(console);oo.configure=function(e,t){let n=t.colouredLayout;return e.layout&&(n=t.layout(e.layout.type,e.layout)),function(e,t){return n=>{io(e(n,t))}}(n,e.timezoneOffset)};var so={};so.configure=function(e,t){let n=t.colouredLayout;return e.layout&&(n=t.layout(e.layout.type,e.layout)),function(e,t){return n=>{process.stdout.write(`${e(n,t)}\n`)}}(n,e.timezoneOffset)};var co={};co.configure=function(e,t){let n=t.colouredLayout;return e.layout&&(n=t.layout(e.layout.type,e.layout)),function(e,t){return n=>{process.stderr.write(`${e(n,t)}\n`)}}(n,e.timezoneOffset)};var ao={};ao.configure=function(e,t,n,r){const u=n(e.appender);return function(e,t,n,r){const u=r.getLevel(e),o=r.getLevel(t,r.FATAL);return e=>{const t=e.level;t.isGreaterThanOrEqualTo(u)&&t.isLessThanOrEqualTo(o)&&n(e)}}(e.level,e.maxLevel,u,r)};var lo={};const fo=Nr.exports("log4js:categoryFilter");lo.configure=function(e,t,n){const r=n(e.appender);return function(e,t){return"string"==typeof e&&(e=[e]),n=>{fo(`Checking ${n.categoryName} against ${e}`),-1===e.indexOf(n.categoryName)&&(fo("Not excluded, sending to appender"),t(n))}}(e.exclude,r)};var Do={};const po=Nr.exports("log4js:noLogFilter");Do.configure=function(e,t,n){const r=n(e.appender);return function(e,t){return n=>{po(`Checking data: ${n.data} against filters: ${e}`),"string"==typeof e&&(e=[e]),e=e.filter((e=>null!=e&&""!==e));const r=new RegExp(e.join("|"),"i");(0===e.length||n.data.findIndex((e=>r.test(e)))<0)&&(po("Not excluded, sending to appender"),t(n))}}(e.exclude,r)};var Eo={},mo={exports:{}},ho={},yo={fromCallback:function(e){return Object.defineProperty((function(){if("function"!=typeof arguments[arguments.length-1])return new Promise(((t,n)=>{arguments[arguments.length]=(e,r)=>{if(e)return n(e);t(r)},arguments.length++,e.apply(this,arguments)}));e.apply(this,arguments)}),"name",{value:e.name})},fromPromise:function(e){return Object.defineProperty((function(){const t=arguments[arguments.length-1];if("function"!=typeof t)return e.apply(this,arguments);e.apply(this,arguments).then((e=>t(null,e)),t)}),"name",{value:e.name})}};!function(e){const t=yo.fromCallback,n=we,r=["access","appendFile","chmod","chown","close","copyFile","fchmod","fchown","fdatasync","fstat","fsync","ftruncate","futimes","lchown","lchmod","link","lstat","mkdir","mkdtemp","open","readFile","readdir","readlink","realpath","rename","rmdir","stat","symlink","truncate","unlink","utimes","writeFile"].filter((e=>"function"==typeof n[e]));Object.keys(n).forEach((t=>{"promises"!==t&&(e[t]=n[t])})),r.forEach((r=>{e[r]=t(n[r])})),e.exists=function(e,t){return"function"==typeof t?n.exists(e,t):new Promise((t=>n.exists(e,t)))},e.read=function(e,t,r,u,o,i){return"function"==typeof i?n.read(e,t,r,u,o,i):new Promise(((i,s)=>{n.read(e,t,r,u,o,((e,t,n)=>{if(e)return s(e);i({bytesRead:t,buffer:n})}))}))},e.write=function(e,t,...r){return"function"==typeof r[r.length-1]?n.write(e,t,...r):new Promise(((u,o)=>{n.write(e,t,...r,((e,t,n)=>{if(e)return o(e);u({bytesWritten:t,buffer:n})}))}))},"function"==typeof n.realpath.native&&(e.realpath.native=t(n.realpath.native))}(ho);const Co=p.default;function Fo(e){return(e=Co.normalize(Co.resolve(e)).split(Co.sep)).length>0?e[0]:null}const go=/[<>:"|?*]/;var Ao=function(e){const t=Fo(e);return e=e.replace(t,""),go.test(e)};const vo=we,So=p.default,wo=Ao,Oo=parseInt("0777",8);var bo=function e(t,n,r,u){if("function"==typeof n?(r=n,n={}):n&&"object"==typeof n||(n={mode:n}),"win32"===process.platform&&wo(t)){const e=new Error(t+" contains invalid WIN32 path characters.");return e.code="EINVAL",r(e)}let o=n.mode;const i=n.fs||vo;void 0===o&&(o=Oo&~process.umask()),u||(u=null),r=r||function(){},t=So.resolve(t),i.mkdir(t,o,(o=>{if(!o)return r(null,u=u||t);if("ENOENT"===o.code){if(So.dirname(t)===t)return r(o);e(So.dirname(t),n,((u,o)=>{u?r(u,o):e(t,n,r,o)}))}else i.stat(t,((e,t)=>{e||!t.isDirectory()?r(o,u):r(null,u)}))}))};const _o=we,Bo=p.default,Po=Ao,ko=parseInt("0777",8);var xo=function e(t,n,r){n&&"object"==typeof n||(n={mode:n});let u=n.mode;const o=n.fs||_o;if("win32"===process.platform&&Po(t)){const e=new Error(t+" contains invalid WIN32 path characters.");throw e.code="EINVAL",e}void 0===u&&(u=ko&~process.umask()),r||(r=null),t=Bo.resolve(t);try{o.mkdirSync(t,u),r=r||t}catch(u){if("ENOENT"===u.code){if(Bo.dirname(t)===t)throw u;r=e(Bo.dirname(t),n,r),e(t,n,r)}else{let e;try{e=o.statSync(t)}catch(e){throw u}if(!e.isDirectory())throw u}}return r};const No=(0,yo.fromCallback)(bo);var Io={mkdirs:No,mkdirsSync:xo,mkdirp:No,mkdirpSync:xo,ensureDir:No,ensureDirSync:xo};const To=we;E.default,p.default;var Ro=function(e,t,n,r){To.open(e,"r+",((e,u)=>{if(e)return r(e);To.futimes(u,t,n,(e=>{To.close(u,(t=>{r&&r(e||t)}))}))}))},Mo=function(e,t,n){const r=To.openSync(e,"r+");return To.futimesSync(r,t,n),To.closeSync(r)};const Lo=we,jo=p.default,$o=10,Ho=5,Jo=0,Go=process.versions.node.split("."),Vo=Number.parseInt(Go[0],10),Uo=Number.parseInt(Go[1],10),Wo=Number.parseInt(Go[2],10);function zo(){if(Vo>$o)return!0;if(Vo===$o){if(Uo>Ho)return!0;if(Uo===Ho&&Wo>=Jo)return!0}return!1}function Ko(e,t){const n=jo.resolve(e).split(jo.sep).filter((e=>e)),r=jo.resolve(t).split(jo.sep).filter((e=>e));return n.reduce(((e,t,n)=>e&&r[n]===t),!0)}function qo(e,t,n){return`Cannot ${n} '${e}' to a subdirectory of itself, '${t}'.`}var Yo,Xo,Zo={checkPaths:function(e,t,n,r){!function(e,t,n){zo()?Lo.stat(e,{bigint:!0},((e,r)=>{if(e)return n(e);Lo.stat(t,{bigint:!0},((e,t)=>e?"ENOENT"===e.code?n(null,{srcStat:r,destStat:null}):n(e):n(null,{srcStat:r,destStat:t})))})):Lo.stat(e,((e,r)=>{if(e)return n(e);Lo.stat(t,((e,t)=>e?"ENOENT"===e.code?n(null,{srcStat:r,destStat:null}):n(e):n(null,{srcStat:r,destStat:t})))}))}(e,t,((u,o)=>{if(u)return r(u);const{srcStat:i,destStat:s}=o;return s&&s.ino&&s.dev&&s.ino===i.ino&&s.dev===i.dev?r(new Error("Source and destination must not be the same.")):i.isDirectory()&&Ko(e,t)?r(new Error(qo(e,t,n))):r(null,{srcStat:i,destStat:s})}))},checkPathsSync:function(e,t,n){const{srcStat:r,destStat:u}=function(e,t){let n,r;n=zo()?Lo.statSync(e,{bigint:!0}):Lo.statSync(e);try{r=zo()?Lo.statSync(t,{bigint:!0}):Lo.statSync(t)}catch(e){if("ENOENT"===e.code)return{srcStat:n,destStat:null};throw e}return{srcStat:n,destStat:r}}(e,t);if(u&&u.ino&&u.dev&&u.ino===r.ino&&u.dev===r.dev)throw new Error("Source and destination must not be the same.");if(r.isDirectory()&&Ko(e,t))throw new Error(qo(e,t,n));return{srcStat:r,destStat:u}},checkParentPaths:function e(t,n,r,u,o){const i=jo.resolve(jo.dirname(t)),s=jo.resolve(jo.dirname(r));if(s===i||s===jo.parse(s).root)return o();zo()?Lo.stat(s,{bigint:!0},((i,c)=>i?"ENOENT"===i.code?o():o(i):c.ino&&c.dev&&c.ino===n.ino&&c.dev===n.dev?o(new Error(qo(t,r,u))):e(t,n,s,u,o))):Lo.stat(s,((i,c)=>i?"ENOENT"===i.code?o():o(i):c.ino&&c.dev&&c.ino===n.ino&&c.dev===n.dev?o(new Error(qo(t,r,u))):e(t,n,s,u,o)))},checkParentPathsSync:function e(t,n,r,u){const o=jo.resolve(jo.dirname(t)),i=jo.resolve(jo.dirname(r));if(i===o||i===jo.parse(i).root)return;let s;try{s=zo()?Lo.statSync(i,{bigint:!0}):Lo.statSync(i)}catch(e){if("ENOENT"===e.code)return;throw e}if(s.ino&&s.dev&&s.ino===n.ino&&s.dev===n.dev)throw new Error(qo(t,r,u));return e(t,n,i,u)},isSrcSubdir:Ko};const Qo=we,ei=p.default,ti=Io.mkdirsSync,ni=Mo,ri=Zo;function ui(e,t,n,r){if(!r.filter||r.filter(t,n))return function(e,t,n,r){const u=r.dereference?Qo.statSync:Qo.lstatSync,o=u(t);if(o.isDirectory())return function(e,t,n,r,u){if(!t)return function(e,t,n,r){return Qo.mkdirSync(n),ii(t,n,r),Qo.chmodSync(n,e.mode)}(e,n,r,u);if(t&&!t.isDirectory())throw new Error(`Cannot overwrite non-directory '${r}' with directory '${n}'.`);return ii(n,r,u)}(o,e,t,n,r);if(o.isFile()||o.isCharacterDevice()||o.isBlockDevice())return function(e,t,n,r,u){return t?function(e,t,n,r){if(r.overwrite)return Qo.unlinkSync(n),oi(e,t,n,r);if(r.errorOnExist)throw new Error(`'${n}' already exists`)}(e,n,r,u):oi(e,n,r,u)}(o,e,t,n,r);if(o.isSymbolicLink())return function(e,t,n,r){let u=Qo.readlinkSync(t);r.dereference&&(u=ei.resolve(process.cwd(),u));if(e){let e;try{e=Qo.readlinkSync(n)}catch(e){if("EINVAL"===e.code||"UNKNOWN"===e.code)return Qo.symlinkSync(u,n);throw e}if(r.dereference&&(e=ei.resolve(process.cwd(),e)),ri.isSrcSubdir(u,e))throw new Error(`Cannot copy '${u}' to a subdirectory of itself, '${e}'.`);if(Qo.statSync(n).isDirectory()&&ri.isSrcSubdir(e,u))throw new Error(`Cannot overwrite '${e}' with '${u}'.`);return function(e,t){return Qo.unlinkSync(t),Qo.symlinkSync(e,t)}(u,n)}return Qo.symlinkSync(u,n)}(e,t,n,r)}(e,t,n,r)}function oi(e,t,n,r){return"function"==typeof Qo.copyFileSync?(Qo.copyFileSync(t,n),Qo.chmodSync(n,e.mode),r.preserveTimestamps?ni(n,e.atime,e.mtime):void 0):function(e,t,n,r){const u=65536,o=(Xo?Yo:(Xo=1,Yo=function(e){if("function"==typeof Buffer.allocUnsafe)try{return Buffer.allocUnsafe(e)}catch(t){return new Buffer(e)}return new Buffer(e)}))(u),i=Qo.openSync(t,"r"),s=Qo.openSync(n,"w",e.mode);let c=0;for(;cfunction(e,t,n,r){const u=ei.join(t,e),o=ei.join(n,e),{destStat:i}=ri.checkPathsSync(u,o,"copy");return ui(i,u,o,r)}(r,e,t,n)))}var si=function(e,t,n){"function"==typeof n&&(n={filter:n}),(n=n||{}).clobber=!("clobber"in n)||!!n.clobber,n.overwrite="overwrite"in n?!!n.overwrite:n.clobber,n.preserveTimestamps&&"ia32"===process.arch&&console.warn("fs-extra: Using the preserveTimestamps option in 32-bit node is not recommended;\n\n see https://github.com/jprichardson/node-fs-extra/issues/269");const{srcStat:r,destStat:u}=ri.checkPathsSync(e,t,"copy");return ri.checkParentPathsSync(e,r,t,"copy"),function(e,t,n,r){if(r.filter&&!r.filter(t,n))return;const u=ei.dirname(n);Qo.existsSync(u)||ti(u);return ui(e,t,n,r)}(u,e,t,n)},ci={copySync:si};const ai=yo.fromPromise,li=ho;var fi={pathExists:ai((function(e){return li.access(e).then((()=>!0)).catch((()=>!1))})),pathExistsSync:li.existsSync};const di=we,Di=p.default,pi=Io.mkdirs,Ei=fi.pathExists,mi=Ro,hi=Zo;function yi(e,t,n,r,u){const o=Di.dirname(n);Ei(o,((i,s)=>i?u(i):s?Fi(e,t,n,r,u):void pi(o,(o=>o?u(o):Fi(e,t,n,r,u)))))}function Ci(e,t,n,r,u,o){Promise.resolve(u.filter(n,r)).then((i=>i?e(t,n,r,u,o):o()),(e=>o(e)))}function Fi(e,t,n,r,u){return r.filter?Ci(gi,e,t,n,r,u):gi(e,t,n,r,u)}function gi(e,t,n,r,u){(r.dereference?di.stat:di.lstat)(t,((o,i)=>o?u(o):i.isDirectory()?function(e,t,n,r,u,o){if(!t)return function(e,t,n,r,u){di.mkdir(n,(o=>{if(o)return u(o);Si(t,n,r,(t=>t?u(t):di.chmod(n,e.mode,u)))}))}(e,n,r,u,o);if(t&&!t.isDirectory())return o(new Error(`Cannot overwrite non-directory '${r}' with directory '${n}'.`));return Si(n,r,u,o)}(i,e,t,n,r,u):i.isFile()||i.isCharacterDevice()||i.isBlockDevice()?function(e,t,n,r,u,o){return t?function(e,t,n,r,u){if(!r.overwrite)return r.errorOnExist?u(new Error(`'${n}' already exists`)):u();di.unlink(n,(o=>o?u(o):Ai(e,t,n,r,u)))}(e,n,r,u,o):Ai(e,n,r,u,o)}(i,e,t,n,r,u):i.isSymbolicLink()?function(e,t,n,r,u){di.readlink(t,((t,o)=>t?u(t):(r.dereference&&(o=Di.resolve(process.cwd(),o)),e?void di.readlink(n,((t,i)=>t?"EINVAL"===t.code||"UNKNOWN"===t.code?di.symlink(o,n,u):u(t):(r.dereference&&(i=Di.resolve(process.cwd(),i)),hi.isSrcSubdir(o,i)?u(new Error(`Cannot copy '${o}' to a subdirectory of itself, '${i}'.`)):e.isDirectory()&&hi.isSrcSubdir(i,o)?u(new Error(`Cannot overwrite '${i}' with '${o}'.`)):function(e,t,n){di.unlink(t,(r=>r?n(r):di.symlink(e,t,n)))}(o,n,u)))):di.symlink(o,n,u))))}(e,t,n,r,u):void 0))}function Ai(e,t,n,r,u){return"function"==typeof di.copyFile?di.copyFile(t,n,(t=>t?u(t):vi(e,n,r,u))):function(e,t,n,r,u){const o=di.createReadStream(t);o.on("error",(e=>u(e))).once("open",(()=>{const t=di.createWriteStream(n,{mode:e.mode});t.on("error",(e=>u(e))).on("open",(()=>o.pipe(t))).once("close",(()=>vi(e,n,r,u)))}))}(e,t,n,r,u)}function vi(e,t,n,r){di.chmod(t,e.mode,(u=>u?r(u):n.preserveTimestamps?mi(t,e.atime,e.mtime,r):r()))}function Si(e,t,n,r){di.readdir(e,((u,o)=>u?r(u):wi(o,e,t,n,r)))}function wi(e,t,n,r,u){const o=e.pop();return o?function(e,t,n,r,u,o){const i=Di.join(n,t),s=Di.join(r,t);hi.checkPaths(i,s,"copy",((t,c)=>{if(t)return o(t);const{destStat:a}=c;Fi(a,i,s,u,(t=>t?o(t):wi(e,n,r,u,o)))}))}(e,o,t,n,r,u):u()}var Oi=function(e,t,n,r){"function"!=typeof n||r?"function"==typeof n&&(n={filter:n}):(r=n,n={}),r=r||function(){},(n=n||{}).clobber=!("clobber"in n)||!!n.clobber,n.overwrite="overwrite"in n?!!n.overwrite:n.clobber,n.preserveTimestamps&&"ia32"===process.arch&&console.warn("fs-extra: Using the preserveTimestamps option in 32-bit node is not recommended;\n\n see https://github.com/jprichardson/node-fs-extra/issues/269"),hi.checkPaths(e,t,"copy",((u,o)=>{if(u)return r(u);const{srcStat:i,destStat:s}=o;hi.checkParentPaths(e,i,t,"copy",(u=>u?r(u):n.filter?Ci(yi,s,e,t,n,r):yi(s,e,t,n,r)))}))};var bi={copy:(0,yo.fromCallback)(Oi)};const _i=we,Bi=p.default,Pi=g.default,ki="win32"===process.platform;function xi(e){["unlink","chmod","stat","lstat","rmdir","readdir"].forEach((t=>{e[t]=e[t]||_i[t],e[t+="Sync"]=e[t]||_i[t]})),e.maxBusyTries=e.maxBusyTries||3}function Ni(e,t,n){let r=0;"function"==typeof t&&(n=t,t={}),Pi(e,"rimraf: missing path"),Pi.strictEqual(typeof e,"string","rimraf: path should be a string"),Pi.strictEqual(typeof n,"function","rimraf: callback function required"),Pi(t,"rimraf: invalid options argument provided"),Pi.strictEqual(typeof t,"object","rimraf: options should be object"),xi(t),Ii(e,t,(function u(o){if(o){if(("EBUSY"===o.code||"ENOTEMPTY"===o.code||"EPERM"===o.code)&&rIi(e,t,u)),100*r)}"ENOENT"===o.code&&(o=null)}n(o)}))}function Ii(e,t,n){Pi(e),Pi(t),Pi("function"==typeof n),t.lstat(e,((r,u)=>r&&"ENOENT"===r.code?n(null):r&&"EPERM"===r.code&&ki?Ti(e,t,r,n):u&&u.isDirectory()?Mi(e,t,r,n):void t.unlink(e,(r=>{if(r){if("ENOENT"===r.code)return n(null);if("EPERM"===r.code)return ki?Ti(e,t,r,n):Mi(e,t,r,n);if("EISDIR"===r.code)return Mi(e,t,r,n)}return n(r)}))))}function Ti(e,t,n,r){Pi(e),Pi(t),Pi("function"==typeof r),n&&Pi(n instanceof Error),t.chmod(e,438,(u=>{u?r("ENOENT"===u.code?null:n):t.stat(e,((u,o)=>{u?r("ENOENT"===u.code?null:n):o.isDirectory()?Mi(e,t,n,r):t.unlink(e,r)}))}))}function Ri(e,t,n){let r;Pi(e),Pi(t),n&&Pi(n instanceof Error);try{t.chmodSync(e,438)}catch(e){if("ENOENT"===e.code)return;throw n}try{r=t.statSync(e)}catch(e){if("ENOENT"===e.code)return;throw n}r.isDirectory()?ji(e,t,n):t.unlinkSync(e)}function Mi(e,t,n,r){Pi(e),Pi(t),n&&Pi(n instanceof Error),Pi("function"==typeof r),t.rmdir(e,(u=>{!u||"ENOTEMPTY"!==u.code&&"EEXIST"!==u.code&&"EPERM"!==u.code?u&&"ENOTDIR"===u.code?r(n):r(u):function(e,t,n){Pi(e),Pi(t),Pi("function"==typeof n),t.readdir(e,((r,u)=>{if(r)return n(r);let o,i=u.length;if(0===i)return t.rmdir(e,n);u.forEach((r=>{Ni(Bi.join(e,r),t,(r=>{if(!o)return r?n(o=r):void(0==--i&&t.rmdir(e,n))}))}))}))}(e,t,r)}))}function Li(e,t){let n;xi(t=t||{}),Pi(e,"rimraf: missing path"),Pi.strictEqual(typeof e,"string","rimraf: path should be a string"),Pi(t,"rimraf: missing options"),Pi.strictEqual(typeof t,"object","rimraf: options should be object");try{n=t.lstatSync(e)}catch(n){if("ENOENT"===n.code)return;"EPERM"===n.code&&ki&&Ri(e,t,n)}try{n&&n.isDirectory()?ji(e,t,null):t.unlinkSync(e)}catch(n){if("ENOENT"===n.code)return;if("EPERM"===n.code)return ki?Ri(e,t,n):ji(e,t,n);if("EISDIR"!==n.code)throw n;ji(e,t,n)}}function ji(e,t,n){Pi(e),Pi(t),n&&Pi(n instanceof Error);try{t.rmdirSync(e)}catch(r){if("ENOTDIR"===r.code)throw n;if("ENOTEMPTY"===r.code||"EEXIST"===r.code||"EPERM"===r.code)!function(e,t){if(Pi(e),Pi(t),t.readdirSync(e).forEach((n=>Li(Bi.join(e,n),t))),!ki){return t.rmdirSync(e,t)}{const n=Date.now();do{try{return t.rmdirSync(e,t)}catch(e){}}while(Date.now()-n<500)}}(e,t);else if("ENOENT"!==r.code)throw r}}var $i=Ni;Ni.sync=Li;const Hi=$i;var Ji={remove:(0,yo.fromCallback)(Hi),removeSync:Hi.sync};const Gi=yo.fromCallback,Vi=we,Ui=p.default,Wi=Io,zi=Ji,Ki=Gi((function(e,t){t=t||function(){},Vi.readdir(e,((n,r)=>{if(n)return Wi.mkdirs(e,t);r=r.map((t=>Ui.join(e,t))),function e(){const n=r.pop();if(!n)return t();zi.remove(n,(n=>{if(n)return t(n);e()}))}()}))}));function qi(e){let t;try{t=Vi.readdirSync(e)}catch(t){return Wi.mkdirsSync(e)}t.forEach((t=>{t=Ui.join(e,t),zi.removeSync(t)}))}var Yi={emptyDirSync:qi,emptydirSync:qi,emptyDir:Ki,emptydir:Ki};const Xi=yo.fromCallback,Zi=p.default,Qi=we,es=Io,ts=fi.pathExists;var ns={createFile:Xi((function(e,t){function n(){Qi.writeFile(e,"",(e=>{if(e)return t(e);t()}))}Qi.stat(e,((r,u)=>{if(!r&&u.isFile())return t();const o=Zi.dirname(e);ts(o,((e,r)=>e?t(e):r?n():void es.mkdirs(o,(e=>{if(e)return t(e);n()}))))}))})),createFileSync:function(e){let t;try{t=Qi.statSync(e)}catch(e){}if(t&&t.isFile())return;const n=Zi.dirname(e);Qi.existsSync(n)||es.mkdirsSync(n),Qi.writeFileSync(e,"")}};const rs=yo.fromCallback,us=p.default,os=we,is=Io,ss=fi.pathExists;var cs={createLink:rs((function(e,t,n){function r(e,t){os.link(e,t,(e=>{if(e)return n(e);n(null)}))}ss(t,((u,o)=>u?n(u):o?n(null):void os.lstat(e,(u=>{if(u)return u.message=u.message.replace("lstat","ensureLink"),n(u);const o=us.dirname(t);ss(o,((u,i)=>u?n(u):i?r(e,t):void is.mkdirs(o,(u=>{if(u)return n(u);r(e,t)}))))}))))})),createLinkSync:function(e,t){if(os.existsSync(t))return;try{os.lstatSync(e)}catch(e){throw e.message=e.message.replace("lstat","ensureLink"),e}const n=us.dirname(t);return os.existsSync(n)||is.mkdirsSync(n),os.linkSync(e,t)}};const as=p.default,ls=we,fs=fi.pathExists;var ds={symlinkPaths:function(e,t,n){if(as.isAbsolute(e))return ls.lstat(e,(t=>t?(t.message=t.message.replace("lstat","ensureSymlink"),n(t)):n(null,{toCwd:e,toDst:e})));{const r=as.dirname(t),u=as.join(r,e);return fs(u,((t,o)=>t?n(t):o?n(null,{toCwd:u,toDst:e}):ls.lstat(e,(t=>t?(t.message=t.message.replace("lstat","ensureSymlink"),n(t)):n(null,{toCwd:e,toDst:as.relative(r,e)})))))}},symlinkPathsSync:function(e,t){let n;if(as.isAbsolute(e)){if(n=ls.existsSync(e),!n)throw new Error("absolute srcpath does not exist");return{toCwd:e,toDst:e}}{const r=as.dirname(t),u=as.join(r,e);if(n=ls.existsSync(u),n)return{toCwd:u,toDst:e};if(n=ls.existsSync(e),!n)throw new Error("relative srcpath does not exist");return{toCwd:e,toDst:as.relative(r,e)}}}};const Ds=we;var ps={symlinkType:function(e,t,n){if(n="function"==typeof t?t:n,t="function"!=typeof t&&t)return n(null,t);Ds.lstat(e,((e,r)=>{if(e)return n(null,"file");t=r&&r.isDirectory()?"dir":"file",n(null,t)}))},symlinkTypeSync:function(e,t){let n;if(t)return t;try{n=Ds.lstatSync(e)}catch(e){return"file"}return n&&n.isDirectory()?"dir":"file"}};const Es=yo.fromCallback,ms=p.default,hs=we,ys=Io.mkdirs,Cs=Io.mkdirsSync,Fs=ds.symlinkPaths,gs=ds.symlinkPathsSync,As=ps.symlinkType,vs=ps.symlinkTypeSync,Ss=fi.pathExists;var ws={createSymlink:Es((function(e,t,n,r){r="function"==typeof n?n:r,n="function"!=typeof n&&n,Ss(t,((u,o)=>u?r(u):o?r(null):void Fs(e,t,((u,o)=>{if(u)return r(u);e=o.toDst,As(o.toCwd,n,((n,u)=>{if(n)return r(n);const o=ms.dirname(t);Ss(o,((n,i)=>n?r(n):i?hs.symlink(e,t,u,r):void ys(o,(n=>{if(n)return r(n);hs.symlink(e,t,u,r)}))))}))}))))})),createSymlinkSync:function(e,t,n){if(hs.existsSync(t))return;const r=gs(e,t);e=r.toDst,n=vs(r.toCwd,n);const u=ms.dirname(t);return hs.existsSync(u)||Cs(u),hs.symlinkSync(e,t,n)}};var Os,bs={createFile:ns.createFile,createFileSync:ns.createFileSync,ensureFile:ns.createFile,ensureFileSync:ns.createFileSync,createLink:cs.createLink,createLinkSync:cs.createLinkSync,ensureLink:cs.createLink,ensureLinkSync:cs.createLinkSync,createSymlink:ws.createSymlink,createSymlinkSync:ws.createSymlinkSync,ensureSymlink:ws.createSymlink,ensureSymlinkSync:ws.createSymlinkSync};try{Os=we}catch(e){Os=D.default}function _s(e,t){var n,r="\n";return"object"==typeof t&&null!==t&&(t.spaces&&(n=t.spaces),t.EOL&&(r=t.EOL)),JSON.stringify(e,t?t.replacer:null,n).replace(/\n/g,r)+r}function Bs(e){return Buffer.isBuffer(e)&&(e=e.toString("utf8")),e=e.replace(/^\uFEFF/,"")}var Ps={readFile:function(e,t,n){null==n&&(n=t,t={}),"string"==typeof t&&(t={encoding:t});var r=(t=t||{}).fs||Os,u=!0;"throws"in t&&(u=t.throws),r.readFile(e,t,(function(r,o){if(r)return n(r);var i;o=Bs(o);try{i=JSON.parse(o,t?t.reviver:null)}catch(t){return u?(t.message=e+": "+t.message,n(t)):n(null,null)}n(null,i)}))},readFileSync:function(e,t){"string"==typeof(t=t||{})&&(t={encoding:t});var n=t.fs||Os,r=!0;"throws"in t&&(r=t.throws);try{var u=n.readFileSync(e,t);return u=Bs(u),JSON.parse(u,t.reviver)}catch(t){if(r)throw t.message=e+": "+t.message,t;return null}},writeFile:function(e,t,n,r){null==r&&(r=n,n={});var u=(n=n||{}).fs||Os,o="";try{o=_s(t,n)}catch(e){return void(r&&r(e,null))}u.writeFile(e,o,n,r)},writeFileSync:function(e,t,n){var r=(n=n||{}).fs||Os,u=_s(t,n);return r.writeFileSync(e,u,n)}},ks=Ps;const xs=yo.fromCallback,Ns=ks;var Is={readJson:xs(Ns.readFile),readJsonSync:Ns.readFileSync,writeJson:xs(Ns.writeFile),writeJsonSync:Ns.writeFileSync};const Ts=p.default,Rs=Io,Ms=fi.pathExists,Ls=Is;var js=function(e,t,n,r){"function"==typeof n&&(r=n,n={});const u=Ts.dirname(e);Ms(u,((o,i)=>o?r(o):i?Ls.writeJson(e,t,n,r):void Rs.mkdirs(u,(u=>{if(u)return r(u);Ls.writeJson(e,t,n,r)}))))};const $s=we,Hs=p.default,Js=Io,Gs=Is;var Vs=function(e,t,n){const r=Hs.dirname(e);$s.existsSync(r)||Js.mkdirsSync(r),Gs.writeJsonSync(e,t,n)};const Us=yo.fromCallback,Ws=Is;Ws.outputJson=Us(js),Ws.outputJsonSync=Vs,Ws.outputJSON=Ws.outputJson,Ws.outputJSONSync=Ws.outputJsonSync,Ws.writeJSON=Ws.writeJson,Ws.writeJSONSync=Ws.writeJsonSync,Ws.readJSON=Ws.readJson,Ws.readJSONSync=Ws.readJsonSync;var zs=Ws;const Ks=we,qs=p.default,Ys=ci.copySync,Xs=Ji.removeSync,Zs=Io.mkdirpSync,Qs=Zo;function ec(e,t,n){try{Ks.renameSync(e,t)}catch(r){if("EXDEV"!==r.code)throw r;return function(e,t,n){const r={overwrite:n,errorOnExist:!0};return Ys(e,t,r),Xs(e)}(e,t,n)}}var tc=function(e,t,n){const r=(n=n||{}).overwrite||n.clobber||!1,{srcStat:u}=Qs.checkPathsSync(e,t,"move");return Qs.checkParentPathsSync(e,u,t,"move"),Zs(qs.dirname(t)),function(e,t,n){if(n)return Xs(t),ec(e,t,n);if(Ks.existsSync(t))throw new Error("dest already exists.");return ec(e,t,n)}(e,t,r)},nc={moveSync:tc};const rc=we,uc=p.default,oc=bi.copy,ic=Ji.remove,sc=Io.mkdirp,cc=fi.pathExists,ac=Zo;function lc(e,t,n,r){rc.rename(e,t,(u=>u?"EXDEV"!==u.code?r(u):function(e,t,n,r){const u={overwrite:n,errorOnExist:!0};oc(e,t,u,(t=>t?r(t):ic(e,r)))}(e,t,n,r):r()))}var fc=function(e,t,n,r){"function"==typeof n&&(r=n,n={});const u=n.overwrite||n.clobber||!1;ac.checkPaths(e,t,"move",((n,o)=>{if(n)return r(n);const{srcStat:i}=o;ac.checkParentPaths(e,i,t,"move",(n=>{if(n)return r(n);sc(uc.dirname(t),(n=>n?r(n):function(e,t,n,r){if(n)return ic(t,(u=>u?r(u):lc(e,t,n,r)));cc(t,((u,o)=>u?r(u):o?r(new Error("dest already exists.")):lc(e,t,n,r)))}(e,t,u,r)))}))}))};var dc={move:(0,yo.fromCallback)(fc)};const Dc=yo.fromCallback,pc=we,Ec=p.default,mc=Io,hc=fi.pathExists;var yc={outputFile:Dc((function(e,t,n,r){"function"==typeof n&&(r=n,n="utf8");const u=Ec.dirname(e);hc(u,((o,i)=>o?r(o):i?pc.writeFile(e,t,n,r):void mc.mkdirs(u,(u=>{if(u)return r(u);pc.writeFile(e,t,n,r)}))))})),outputFileSync:function(e,...t){const n=Ec.dirname(e);if(pc.existsSync(n))return pc.writeFileSync(e,...t);mc.mkdirsSync(n),pc.writeFileSync(e,...t)}};!function(e){e.exports=Object.assign({},ho,ci,bi,Yi,bs,zs,Io,nc,dc,yc,fi,Ji);const t=D.default;Object.getOwnPropertyDescriptor(t,"promises")&&Object.defineProperty(e.exports,"promises",{get:()=>t.promises})}(mo);const Cc=Nr.exports("streamroller:fileNameFormatter"),Fc=p.default;const gc=Nr.exports("streamroller:fileNameParser"),Ac=nu.exports;const vc=Nr.exports("streamroller:moveAndMaybeCompressFile"),Sc=mo.exports,wc=v.default;var Oc=async(e,t,n)=>{if(n=function(e){const t={mode:parseInt("0600",8),compress:!1},n=Object.assign({},t,e);return vc(`_parseOption: moveAndMaybeCompressFile called with option=${JSON.stringify(n)}`),n}(n),e!==t){if(await Sc.pathExists(e))if(vc(`moveAndMaybeCompressFile: moving file from ${e} to ${t} ${n.compress?"with":"without"} compress`),n.compress)await new Promise(((r,u)=>{let o=!1;const i=Sc.createWriteStream(t,{mode:n.mode,flags:"wx"}).on("open",(()=>{o=!0;const t=Sc.createReadStream(e).on("open",(()=>{t.pipe(wc.createGzip()).pipe(i)})).on("error",(t=>{vc(`moveAndMaybeCompressFile: error reading ${e}`,t),i.destroy(t)}))})).on("finish",(()=>{vc(`moveAndMaybeCompressFile: finished compressing ${t}, deleting ${e}`),Sc.unlink(e).then(r).catch((t=>{vc(`moveAndMaybeCompressFile: error deleting ${e}, truncating instead`,t),Sc.truncate(e).then(r).catch((t=>{vc(`moveAndMaybeCompressFile: error truncating ${e}`,t),u(t)}))}))})).on("error",(e=>{o?(vc(`moveAndMaybeCompressFile: error writing ${t}, deleting`,e),Sc.unlink(t).then((()=>{u(e)})).catch((e=>{vc(`moveAndMaybeCompressFile: error deleting ${t}`,e),u(e)}))):(vc(`moveAndMaybeCompressFile: error creating ${t}`,e),u(e))}))})).catch((()=>{}));else{vc(`moveAndMaybeCompressFile: renaming ${e} to ${t}`);try{await Sc.move(e,t,{overwrite:!0})}catch(n){if(vc(`moveAndMaybeCompressFile: error renaming ${e} to ${t}`,n),"ENOENT"!==n.code){vc("moveAndMaybeCompressFile: trying copy+truncate instead");try{await Sc.copy(e,t,{overwrite:!0}),await Sc.truncate(e)}catch(e){vc("moveAndMaybeCompressFile: error copy+truncate",e)}}}}}else vc("moveAndMaybeCompressFile: source and target are the same, not doing anything")};const bc=Nr.exports("streamroller:RollingFileWriteStream"),_c=mo.exports,Bc=p.default,Pc=E.default,kc=()=>new Date,xc=nu.exports,{Writable:Nc}=C.default,Ic=({file:e,keepFileExt:t,needsIndex:n,alwaysIncludeDate:r,compress:u,fileNameSep:o})=>{let i=o||".";const s=Fc.join(e.dir,e.name),c=t=>t+e.ext,a=(e,t,r)=>!n&&r||!t?e:e+i+t,l=(e,t,n)=>(t>0||r)&&n?e+i+n:e,f=(e,t)=>t&&u?e+".gz":e,d=t?[l,a,c,f]:[c,l,a,f];return({date:e,index:t})=>(Cc(`_formatFileName: date=${e}, index=${t}`),d.reduce(((n,r)=>r(n,t,e)),s))},Tc=({file:e,keepFileExt:t,pattern:n,fileNameSep:r})=>{let u=r||".";const o="__NOT_MATCHING__";let i=[(e,t)=>e.endsWith(".gz")?(gc("it is gzipped"),t.isCompressed=!0,e.slice(0,-1*".gz".length)):e,t?t=>t.startsWith(e.name)&&t.endsWith(e.ext)?(gc("it starts and ends with the right things"),t.slice(e.name.length+1,-1*e.ext.length)):o:t=>t.startsWith(e.base)?(gc("it starts with the right things"),t.slice(e.base.length+1)):o,n?(e,t)=>{const r=e.split(u);let o=r[r.length-1];gc("items: ",r,", indexStr: ",o);let i=e;void 0!==o&&o.match(/^\d+$/)?(i=e.slice(0,-1*(o.length+1)),gc(`dateStr is ${i}`),n&&!i&&(i=o,o="0")):o="0";try{const r=Ac.parse(n,i,new Date(0,0));return Ac.asString(n,r)!==i?e:(t.index=parseInt(o,10),t.date=i,t.timestamp=r.getTime(),"")}catch(t){return gc(`Problem parsing ${i} as ${n}, error was: `,t),e}}:(e,t)=>e.match(/^\d+$/)?(gc("it has an index"),t.index=parseInt(e,10),""):e];return e=>{let t={filename:e,index:0,isCompressed:!1};return i.reduce(((e,n)=>n(e,t)),e)?null:t}},Rc=Oc;var Mc=class extends Nc{constructor(e,t){if(bc(`constructor: creating RollingFileWriteStream. path=${e}`),"string"!=typeof e||0===e.length)throw new Error(`Invalid filename: ${e}`);if(e.endsWith(Bc.sep))throw new Error(`Filename is a directory: ${e}`);0===e.indexOf(`~${Bc.sep}`)&&(e=e.replace("~",Pc.homedir())),super(t),this.options=this._parseOption(t),this.fileObject=Bc.parse(e),""===this.fileObject.dir&&(this.fileObject=Bc.parse(Bc.join(process.cwd(),e))),this.fileFormatter=Ic({file:this.fileObject,alwaysIncludeDate:this.options.alwaysIncludePattern,needsIndex:this.options.maxSize 0`)}else delete n.maxSize;if(n.numBackups||0===n.numBackups){if(n.numBackups<0)throw new Error(`options.numBackups (${n.numBackups}) should be >= 0`);if(n.numBackups>=Number.MAX_SAFE_INTEGER)throw new Error(`options.numBackups (${n.numBackups}) should be < Number.MAX_SAFE_INTEGER`);n.numToKeep=n.numBackups+1}else if(n.numToKeep<=0)throw new Error(`options.numToKeep (${n.numToKeep}) should be > 0`);return bc(`_parseOption: creating stream with option=${JSON.stringify(n)}`),n}_final(e){this.currentFileStream.end("",this.options.encoding,e)}_write(e,t,n){this._shouldRoll().then((()=>{bc(`_write: writing chunk. file=${this.currentFileStream.path} state=${JSON.stringify(this.state)} chunk=${e}`),this.currentFileStream.write(e,t,(t=>{this.state.currentSize+=e.length,n(t)}))}))}async _shouldRoll(){(this._dateChanged()||this._tooBig())&&(bc(`_shouldRoll: rolling because dateChanged? ${this._dateChanged()} or tooBig? ${this._tooBig()}`),await this._roll())}_dateChanged(){return this.state.currentDate&&this.state.currentDate!==xc(this.options.pattern,kc())}_tooBig(){return this.state.currentSize>=this.options.maxSize}_roll(){return bc("_roll: closing the current stream"),new Promise(((e,t)=>{this.currentFileStream.end("",this.options.encoding,(()=>{this._moveOldFiles().then(e).catch(t)}))}))}async _moveOldFiles(){const e=await this._getExistingFiles();for(let t=(this.state.currentDate?e.filter((e=>e.date===this.state.currentDate)):e).length;t>=0;t--){bc(`_moveOldFiles: i = ${t}`);const e=this.fileFormatter({date:this.state.currentDate,index:t}),n=this.fileFormatter({date:this.state.currentDate,index:t+1}),r={compress:this.options.compress&&0===t,mode:this.options.mode};await Rc(e,n,r)}this.state.currentSize=0,this.state.currentDate=this.state.currentDate?xc(this.options.pattern,kc()):null,bc(`_moveOldFiles: finished rolling files. state=${JSON.stringify(this.state)}`),this._renewWriteStream(),await new Promise(((e,t)=>{this.currentFileStream.write("","utf8",(()=>{this._clean().then(e).catch(t)}))}))}async _getExistingFiles(){const e=await _c.readdir(this.fileObject.dir).catch((()=>[]));bc(`_getExistingFiles: files=${e}`);const t=e.map((e=>this.fileNameParser(e))).filter((e=>e)),n=e=>(e.timestamp?e.timestamp:kc().getTime())-e.index;return t.sort(((e,t)=>n(e)-n(t))),t}_renewWriteStream(){const e=this.fileFormatter({date:this.state.currentDate,index:0}),t=e=>{try{return _c.mkdirSync(e,{recursive:!0})}catch(n){if("ENOENT"===n.code)return t(Bc.dirname(e)),t(e);if("EEXIST"!==n.code&&"EROFS"!==n.code)throw n;try{if(_c.statSync(e).isDirectory())return e;throw n}catch(e){throw n}}};t(this.fileObject.dir);const n={flags:this.options.flags,encoding:this.options.encoding,mode:this.options.mode};var r,u;_c.appendFileSync(e,"",(r={...n},u="flags",r["flag"]=r[u],delete r[u],r)),this.currentFileStream=_c.createWriteStream(e,n),this.currentFileStream.on("error",(e=>{this.emit("error",e)}))}async _clean(){const e=await this._getExistingFiles();if(bc(`_clean: numToKeep = ${this.options.numToKeep}, existingFiles = ${e.length}`),bc("_clean: existing files are: ",e),this._tooManyFiles(e.length)){const n=e.slice(0,e.length-this.options.numToKeep).map((e=>Bc.format({dir:this.fileObject.dir,base:e.filename})));await(t=n,bc(`deleteFiles: files to delete: ${t}`),Promise.all(t.map((e=>_c.unlink(e).catch((t=>{bc(`deleteFiles: error when unlinking ${e}, ignoring. Error was ${t}`)}))))))}var t}_tooManyFiles(e){return this.options.numToKeep>0&&e>this.options.numToKeep}};const Lc=Mc;var jc=class extends Lc{constructor(e,t,n,r){r||(r={}),t&&(r.maxSize=t),r.numBackups||0===r.numBackups||(n||0===n||(n=1),r.numBackups=n),super(e,r),this.backups=r.numBackups,this.size=this.options.maxSize}get theStream(){return this.currentFileStream}};const $c=Mc;var Hc={RollingFileWriteStream:Mc,RollingFileStream:jc,DateRollingFileStream:class extends $c{constructor(e,t,n){t&&"object"==typeof t&&(n=t,t=null),n||(n={}),t||(t="yyyy-MM-dd"),n.pattern=t,n.numBackups||0===n.numBackups?n.daysToKeep=n.numBackups:(n.daysToKeep||0===n.daysToKeep?process.emitWarning("options.daysToKeep is deprecated due to the confusion it causes when used together with file size rolling. Please use options.numBackups instead.","DeprecationWarning","streamroller-DEP0001"):n.daysToKeep=1,n.numBackups=n.daysToKeep),super(e,n),this.mode=this.options.mode}get theStream(){return this.currentFileStream}}};const Jc=Nr.exports("log4js:file"),Gc=p.default,Vc=Hc,Uc=E.default.EOL;let Wc=!1;const zc=new Set;function Kc(){zc.forEach((e=>{e.sighupHandler()}))}function qc(e,t,n,r){const u=new Vc.RollingFileStream(e,t,n,r);return u.on("error",(t=>{console.error("log4js.fileAppender - Writing to file %s, error happened ",e,t)})),u.on("drain",(()=>{process.emit("log4js:pause",!1)})),u}Eo.configure=function(e,t){let n=t.basicLayout;return e.layout&&(n=t.layout(e.layout.type,e.layout)),e.mode=e.mode||384,function(e,t,n,r,u,o){e=Gc.normalize(e),Jc("Creating file appender (",e,", ",n,", ",r=r||0===r?r:5,", ",u,", ",o,")");let i=qc(e,n,r,u);const s=function(e){if(i.writable){if(!0===u.removeColor){const t=/\x1b[[0-9;]*m/g;e.data=e.data.map((e=>"string"==typeof e?e.replace(t,""):e))}i.write(t(e,o)+Uc,"utf8")||process.emit("log4js:pause",!0)}};return s.reopen=function(){i.end((()=>{i=qc(e,n,r,u)}))},s.sighupHandler=function(){Jc("SIGHUP handler called."),s.reopen()},s.shutdown=function(e){zc.delete(s),0===zc.size&&Wc&&(process.removeListener("SIGHUP",Kc),Wc=!1),i.end("","utf-8",e)},zc.add(s),Wc||(process.on("SIGHUP",Kc),Wc=!0),s}(e.filename,n,e.maxLogSize,e.backups,e,e.timezoneOffset)};var Yc={};const Xc=Hc,Zc=E.default.EOL;function Qc(e,t,n,r,u){r.maxSize=r.maxLogSize;const o=function(e,t,n){const r=new Xc.DateRollingFileStream(e,t,n);return r.on("error",(t=>{console.error("log4js.dateFileAppender - Writing to file %s, error happened ",e,t)})),r.on("drain",(()=>{process.emit("log4js:pause",!1)})),r}(e,t,r),i=function(e){o.writable&&(o.write(n(e,u)+Zc,"utf8")||process.emit("log4js:pause",!0))};return i.shutdown=function(e){o.end("","utf-8",e)},i}Yc.configure=function(e,t){let n=t.basicLayout;return e.layout&&(n=t.layout(e.layout.type,e.layout)),e.alwaysIncludePattern||(e.alwaysIncludePattern=!1),e.mode=e.mode||384,Qc(e.filename,e.pattern,n,e,e.timezoneOffset)};var ea={};const ta=Nr.exports("log4js:fileSync"),na=p.default,ra=D.default,ua=E.default.EOL||"\n";function oa(e,t){if(ra.existsSync(e))return;const n=ra.openSync(e,t.flags,t.mode);ra.closeSync(n)}class ia{constructor(e,t,n,r){ta("In RollingFileStream"),function(){if(!e||!t||t<=0)throw new Error("You must specify a filename and file size")}(),this.filename=e,this.size=t,this.backups=n,this.options=r,this.currentSize=0,this.currentSize=function(e){let t=0;try{t=ra.statSync(e).size}catch(t){oa(e,r)}return t}(this.filename)}shouldRoll(){return ta("should roll with current size %d, and max size %d",this.currentSize,this.size),this.currentSize>=this.size}roll(e){const t=this,n=new RegExp(`^${na.basename(e)}`);function r(e){return n.test(e)}function u(t){return parseInt(t.substring(`${na.basename(e)}.`.length),10)||0}function o(e,t){return u(e)>u(t)?1:u(e) ${e}.${r+1}`),ra.renameSync(na.join(na.dirname(e),n),`${e}.${r+1}`)}}ta("Rolling, rolling, rolling"),ta("Renaming the old files"),ra.readdirSync(na.dirname(e)).filter(r).sort(o).reverse().forEach(i)}write(e,t){const n=this;ta("in write"),this.shouldRoll()&&(this.currentSize=0,this.roll(this.filename)),ta("writing the chunk to the file"),n.currentSize+=e.length,ra.appendFileSync(n.filename,e)}}ea.configure=function(e,t){let n=t.basicLayout;e.layout&&(n=t.layout(e.layout.type,e.layout));const r={flags:e.flags||"a",encoding:e.encoding||"utf8",mode:e.mode||384};return function(e,t,n,r,u,o){ta("fileSync appender created");const i=function(e,t,n){let r;var u;return t?r=new ia(e,t,n,o):(oa(u=e,o),r={write(e){ra.appendFileSync(u,e)}}),r}(e=na.normalize(e),n,r=r||0===r?r:5);return e=>{i.write(t(e,u)+ua)}}(e.filename,n,e.maxLogSize,e.backups,e.timezoneOffset,r)};var sa={};const ca=Nr.exports("log4js:tcp"),aa=S.default;sa.configure=function(e,t){ca(`configure with config = ${e}`);let n=function(e){return e.serialise()};return e.layout&&(n=t.layout(e.layout.type,e.layout)),function(e,t){let n=!1;const r=[];let u,o=3,i="__LOG4JS__";function s(e){ca("Writing log event to socket"),n=u.write(`${t(e)}${i}`,"utf8")}function c(){let e;for(ca("emptying buffer");e=r.shift();)s(e)}function a(e){n?s(e):(ca("buffering log event because it cannot write at the moment"),r.push(e))}return function t(){ca(`appender creating socket to ${e.host||"localhost"}:${e.port||5e3}`),i=`${e.endMsg||"__LOG4JS__"}`,u=aa.createConnection(e.port||5e3,e.host||"localhost"),u.on("connect",(()=>{ca("socket connected"),c(),n=!0})),u.on("drain",(()=>{ca("drain event received, emptying buffer"),n=!0,c()})),u.on("timeout",u.end.bind(u)),u.on("error",(e=>{ca("connection error",e),n=!1,c()})),u.on("close",t)}(),a.shutdown=function(e){ca("shutdown called"),r.length&&o?(ca("buffer has items, waiting 100ms to empty"),o-=1,setTimeout((()=>{a.shutdown(e)}),100)):(u.removeAllListeners("close"),u.end(e))},a}(e,n)};const la=p.default,fa=Nr.exports("log4js:appenders"),da=tu,Da=eo,pa=gu,Ea=hu,ma=to,ha=new Map;ha.set("console",oo),ha.set("stdout",so),ha.set("stderr",co),ha.set("logLevelFilter",ao),ha.set("categoryFilter",lo),ha.set("noLogFilter",Do),ha.set("file",Eo),ha.set("dateFile",Yc),ha.set("fileSync",ea),ha.set("tcp",sa);const ya=new Map,Ca=(e,t)=>{fa("Loading module from ",e);try{return require(e)}catch(n){return void da.throwExceptionIf(t,"MODULE_NOT_FOUND"!==n.code,`appender "${e}" could not be loaded (error was: ${n})`)}},Fa=new Set,ga=(e,t)=>{if(ya.has(e))return ya.get(e);if(!t.appenders[e])return!1;if(Fa.has(e))throw new Error(`Dependency loop detected for appender ${e}.`);Fa.add(e),fa(`Creating appender ${e}`);const n=Aa(e,t);return Fa.delete(e),ya.set(e,n),n},Aa=(e,t)=>{const n=t.appenders[e],r=n.type.configure?n.type:((e,t)=>ha.get(e)||Ca(`./${e}`,t)||Ca(e,t)||require.main&&Ca(la.join(la.dirname(require.main.filename),e),t)||Ca(la.join(process.cwd(),e),t))(n.type,t);return da.throwExceptionIf(t,da.not(r),`appender "${e}" is not valid (type "${n.type}" could not be found)`),r.appender&&fa(`DEPRECATION: Appender ${n.type} exports an appender function.`),r.shutdown&&fa(`DEPRECATION: Appender ${n.type} exports a shutdown function.`),fa(`${e}: clustering.isMaster ? ${Da.isMaster()}`),fa(`${e}: appenderModule is ${F.default.inspect(r)}`),Da.onlyOnMaster((()=>(fa(`calling appenderModule.configure for ${e} / ${n.type}`),r.configure(ma.modifyConfig(n),Ea,(e=>ga(e,t)),pa))),(()=>{}))},va=e=>{ya.clear(),Fa.clear();const t=[];Object.values(e.categories).forEach((e=>{t.push(...e.appenders)})),Object.keys(e.appenders).forEach((n=>{(t.includes(n)||"tcp-server"===e.appenders[n].type)&&ga(n,e)}))},Sa=()=>{va({appenders:{out:{type:"stdout"}},categories:{default:{appenders:["out"],level:"trace"}}})};Sa(),da.addListener((e=>{da.throwExceptionIf(e,da.not(da.anObject(e.appenders)),'must have a property "appenders" of type object.');const t=Object.keys(e.appenders);da.throwExceptionIf(e,da.not(t.length),"must define at least one appender."),t.forEach((t=>{da.throwExceptionIf(e,da.not(e.appenders[t].type),`appender "${t}" is not valid (must be an object with property "type")`)}))})),da.addListener(va),Au.exports=ya,Au.exports.init=Sa;var wa={exports:{}};!function(e){const t=Nr.exports("log4js:categories"),n=tu,r=gu,u=Au.exports,o=new Map;function i(e,t,n){if(!1===t.inherit)return;const r=n.lastIndexOf(".");if(r<0)return;const u=n.substring(0,r);let o=e.categories[u];o||(o={inherit:!0,appenders:[]}),i(e,o,u),!e.categories[u]&&o.appenders&&o.appenders.length&&o.level&&(e.categories[u]=o),t.appenders=t.appenders||[],t.level=t.level||o.level,o.appenders.forEach((e=>{t.appenders.includes(e)||t.appenders.push(e)})),t.parent=o}function s(e){if(!e.categories)return;Object.keys(e.categories).forEach((t=>{const n=e.categories[t];i(e,n,t)}))}n.addPreProcessingListener((e=>s(e))),n.addListener((e=>{n.throwExceptionIf(e,n.not(n.anObject(e.categories)),'must have a property "categories" of type object.');const t=Object.keys(e.categories);n.throwExceptionIf(e,n.not(t.length),"must define at least one category."),t.forEach((t=>{const o=e.categories[t];n.throwExceptionIf(e,[n.not(o.appenders),n.not(o.level)],`category "${t}" is not valid (must be an object with properties "appenders" and "level")`),n.throwExceptionIf(e,n.not(Array.isArray(o.appenders)),`category "${t}" is not valid (appenders must be an array of appender names)`),n.throwExceptionIf(e,n.not(o.appenders.length),`category "${t}" is not valid (appenders must contain at least one appender name)`),Object.prototype.hasOwnProperty.call(o,"enableCallStack")&&n.throwExceptionIf(e,"boolean"!=typeof o.enableCallStack,`category "${t}" is not valid (enableCallStack must be boolean type)`),o.appenders.forEach((r=>{n.throwExceptionIf(e,n.not(u.get(r)),`category "${t}" is not valid (appender "${r}" is not defined)`)})),n.throwExceptionIf(e,n.not(r.getLevel(o.level)),`category "${t}" is not valid (level "${o.level}" not recognised; valid levels are ${r.levels.join(", ")})`)})),n.throwExceptionIf(e,n.not(e.categories.default),'must define a "default" category.')}));const c=e=>{o.clear();Object.keys(e.categories).forEach((n=>{const i=e.categories[n],s=[];i.appenders.forEach((e=>{s.push(u.get(e)),t(`Creating category ${n}`),o.set(n,{appenders:s,level:r.getLevel(i.level),enableCallStack:i.enableCallStack||!1})}))}))},a=()=>{c({categories:{default:{appenders:["out"],level:"OFF"}}})};a(),n.addListener(c);const l=e=>(t(`configForCategory: searching for config for ${e}`),o.has(e)?(t(`configForCategory: ${e} exists in config, returning it`),o.get(e)):e.indexOf(".")>0?(t(`configForCategory: ${e} has hierarchy, searching for parents`),l(e.substring(0,e.lastIndexOf(".")))):(t("configForCategory: returning config for default category"),l("default")));e.exports=o,e.exports=Object.assign(e.exports,{appendersForCategory:e=>l(e).appenders,getLevelForCategory:e=>l(e).level,setLevelForCategory:(e,n)=>{let r=o.get(e);if(t(`setLevelForCategory: found ${r} for ${e}`),!r){const n=l(e);t(`setLevelForCategory: no config found for category, found ${n} for parents of ${e}`),r={appenders:n.appenders}}r.level=n,o.set(e,r)},getEnableCallStackForCategory:e=>!0===l(e).enableCallStack,setEnableCallStackForCategory:(e,t)=>{l(e).enableCallStack=t},init:a})}(wa);const Oa=Nr.exports("log4js:logger"),ba=Hu,_a=gu,Ba=eo,Pa=wa.exports,ka=tu,xa=/at (?:(.+)\s+\()?(?:(.+?):(\d+)(?::(\d+))?|([^)]+))\)?/;function Na(e,t=4){const n=e.stack.split("\n").slice(t),r=xa.exec(n[0]);return r&&6===r.length?{functionName:r[1],fileName:r[2],lineNumber:parseInt(r[3],10),columnNumber:parseInt(r[4],10),callStack:n.join("\n")}:null}class Ia{constructor(e){if(!e)throw new Error("No category provided.");this.category=e,this.context={},this.parseCallStack=Na,Oa(`Logger created (${this.category}, ${this.level})`)}get level(){return _a.getLevel(Pa.getLevelForCategory(this.category),_a.TRACE)}set level(e){Pa.setLevelForCategory(this.category,_a.getLevel(e,this.level))}get useCallStack(){return Pa.getEnableCallStackForCategory(this.category)}set useCallStack(e){Pa.setEnableCallStackForCategory(this.category,!0===e)}log(e,...t){let n=_a.getLevel(e);n||(this._log(_a.WARN,"log4js:logger.log: invalid value for log-level as first parameter given: ",e),n=_a.INFO),this.isLevelEnabled(n)&&this._log(n,t)}isLevelEnabled(e){return this.level.isLessThanOrEqualTo(e)}_log(e,t){Oa(`sending log data (${e}) to appenders`);const n=new ba(this.category,e,t,this.context,this.useCallStack&&this.parseCallStack(new Error));Ba.send(n)}addContext(e,t){this.context[e]=t}removeContext(e){delete this.context[e]}clearContext(){this.context={}}setParseCallStackFunction(e){this.parseCallStack=e}}function Ta(e){const t=_a.getLevel(e),n=t.toString().toLowerCase().replace(/_([a-z])/g,(e=>e[1].toUpperCase())),r=n[0].toUpperCase()+n.slice(1);Ia.prototype[`is${r}Enabled`]=function(){return this.isLevelEnabled(t)},Ia.prototype[n]=function(...e){this.log(t,...e)}}_a.levels.forEach(Ta),ka.addListener((()=>{_a.levels.forEach(Ta)}));var Ra=Ia;const Ma=gu;function La(e){return e.originalUrl||e.url}function ja(e,t){for(let n=0;ne.source?e.source:e));t=new RegExp(n.join("|"))}return t}(t.nolog);return(e,i,s)=>{if(e._logging)return s();if(o&&o.test(e.originalUrl))return s();if(n.isLevelEnabled(r)||"auto"===t.level){const o=new Date,{writeHead:s}=i;e._logging=!0,i.writeHead=(e,t)=>{i.writeHead=s,i.writeHead(e,t),i.__statusCode=e,i.__headers=t||{}},i.on("finish",(()=>{i.responseTime=new Date-o,i.statusCode&&"auto"===t.level&&(r=Ma.INFO,i.statusCode>=300&&(r=Ma.WARN),i.statusCode>=400&&(r=Ma.ERROR)),r=function(e,t,n){let r=t;if(n){const t=n.find((t=>{let n=!1;return n=t.from&&t.to?e>=t.from&&e<=t.to:-1!==t.codes.indexOf(e),n}));t&&(r=Ma.getLevel(t.level,r))}return r}(i.statusCode,r,t.statusRules);const s=function(e,t,n){const r=[];return r.push({token:":url",replacement:La(e)}),r.push({token:":protocol",replacement:e.protocol}),r.push({token:":hostname",replacement:e.hostname}),r.push({token:":method",replacement:e.method}),r.push({token:":status",replacement:t.__statusCode||t.statusCode}),r.push({token:":response-time",replacement:t.responseTime}),r.push({token:":date",replacement:(new Date).toUTCString()}),r.push({token:":referrer",replacement:e.headers.referer||e.headers.referrer||""}),r.push({token:":http-version",replacement:`${e.httpVersionMajor}.${e.httpVersionMinor}`}),r.push({token:":remote-addr",replacement:e.headers["x-forwarded-for"]||e.ip||e._remoteAddress||e.socket&&(e.socket.remoteAddress||e.socket.socket&&e.socket.socket.remoteAddress)}),r.push({token:":user-agent",replacement:e.headers["user-agent"]}),r.push({token:":content-length",replacement:t.getHeader("content-length")||t.__headers&&t.__headers["Content-Length"]||"-"}),r.push({token:/:req\[([^\]]+)]/g,replacement:(t,n)=>e.headers[n.toLowerCase()]}),r.push({token:/:res\[([^\]]+)]/g,replacement:(e,n)=>t.getHeader(n.toLowerCase())||t.__headers&&t.__headers[n]}),(e=>{const t=e.concat();for(let e=0;eja(e,s)));t&&n.log(r,t)}else n.log(r,ja(u,s));t.context&&n.removeContext("res")}))}return s()}},nl=Va;let rl=!1;function ul(e){if(!rl)return;Ua("Received log event ",e);Za.appendersForCategory(e.categoryName).forEach((t=>{t(e)}))}function ol(e){rl&&il();let t=e;return"string"==typeof t&&(t=function(e){Ua(`Loading configuration from ${e}`);try{return JSON.parse(Wa.readFileSync(e,"utf8"))}catch(t){throw new Error(`Problem reading config from file "${e}". Error was ${t.message}`,t)}}(e)),Ua(`Configuration is ${t}`),Ka.configure(za(t)),el.onMessage(ul),rl=!0,sl}function il(e){Ua("Shutdown called. Disabling all log writing."),rl=!1;const t=Array.from(Xa.values());Xa.init(),Za.init();const n=t.reduceRight(((e,t)=>t.shutdown?e+1:e),0);if(0===n)return Ua("No appenders with shutdown functions found."),void 0!==e&&e();let r,u=0;function o(t){r=r||t,u+=1,Ua(`Appender shutdowns complete: ${u} / ${n}`),u>=n&&(Ua("All shutdown functions completed."),e&&e(r))}return Ua(`Found ${n} appenders with shutdown functions.`),t.filter((e=>e.shutdown)).forEach((e=>e.shutdown(o))),null}const sl={getLogger:function(e){return rl||ol(process.env.LOG4JS_CONFIG||{appenders:{out:{type:"stdout"}},categories:{default:{appenders:["out"],level:"OFF"}}}),new Qa(e||"default")},configure:ol,shutdown:il,connectLogger:tl,levels:Ya,addLayout:qa.addLayout,recording:function(){return nl}};var cl=sl,al={};Object.defineProperty(al,"__esModule",{value:!0}),al.levelMap=al.getLevel=al.setCategoriesLevel=al.getConfiguration=al.setConfiguration=void 0;const ll=cl;let fl={appenders:{debug:{type:"stdout",layout:{type:"pattern",pattern:"[%d] > hvigor %p %c %[%m%]"}},info:{type:"stdout",layout:{type:"pattern",pattern:"[%d] > hvigor %[%m%]"}},"no-pattern-info":{type:"stdout",layout:{type:"pattern",pattern:"%m"}},wrong:{type:"stderr",layout:{type:"pattern",pattern:"[%d] > hvigor %[%p: %m%]"}},"just-debug":{type:"logLevelFilter",appender:"debug",level:"debug",maxLevel:"debug"},"just-info":{type:"logLevelFilter",appender:"info",level:"info",maxLevel:"info"},"just-wrong":{type:"logLevelFilter",appender:"wrong",level:"warn",maxLevel:"error"}},categories:{default:{appenders:["just-debug","just-info","just-wrong"],level:"debug"},"no-pattern-info":{appenders:["no-pattern-info"],level:"info"}}};al.setConfiguration=e=>{fl=e};al.getConfiguration=()=>fl;let dl=ll.levels.DEBUG;al.setCategoriesLevel=(e,t)=>{dl=e;const n=fl.categories;for(const r in n)(null==t?void 0:t.includes(r))||Object.prototype.hasOwnProperty.call(n,r)&&(n[r].level=e.levelStr)};al.getLevel=()=>dl,al.levelMap=new Map([["ALL",ll.levels.ALL],["MARK",ll.levels.MARK],["TRACE",ll.levels.TRACE],["DEBUG",ll.levels.DEBUG],["INFO",ll.levels.INFO],["WARN",ll.levels.WARN],["ERROR",ll.levels.ERROR],["FATAL",ll.levels.FATAL],["OFF",ll.levels.OFF]]);var Dl=w&&w.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var u=Object.getOwnPropertyDescriptor(t,n);u&&!("get"in u?!t.__esModule:u.writable||u.configurable)||(u={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,u)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),pl=w&&w.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),El=w&&w.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&Dl(t,e,n);return pl(t,e),t};Object.defineProperty(xr,"__esModule",{value:!0}),xr.evaluateLogLevel=xr.HvigorLogger=void 0;const ml=El(cl),hl=cl,yl=El(F.default),Cl=al;class Fl{constructor(e){ml.configure((0,Cl.getConfiguration)()),this._logger=ml.getLogger(e),this._logger.level=(0,Cl.getLevel)()}static getLogger(e){return new Fl(e)}log(e,...t){this._logger.log(e,...t)}debug(e,...t){this._logger.debug(e,...t)}info(e,...t){this._logger.info(e,...t)}warn(e,...t){void 0!==e&&""!==e&&this._logger.warn(e,...t)}error(e,...t){this._logger.error(e,...t)}_printTaskExecuteInfo(e,t){this.info(`Finished :${e}... after ${t}`)}_printFailedTaskInfo(e){this.error(`Failed :${e}... `)}_printDisabledTaskInfo(e){this.info(`Disabled :${e}... `)}_printUpToDateTaskInfo(e){this.info(`UP-TO-DATE :${e}... `)}errorMessageExit(e,...t){throw new Error(yl.format(e,...t))}errorExit(e,t,...n){t&&this._logger.error(t,n),this._logger.error(e.stack)}setLevel(e,t){(0,Cl.setCategoriesLevel)(e,t),ml.shutdown(),ml.configure((0,Cl.getConfiguration)())}getLevel(){return this._logger.level}configure(e){const t=(0,Cl.getConfiguration)(),n={appenders:{...t.appenders,...e.appenders},categories:{...t.categories,...e.categories}};(0,Cl.setConfiguration)(n),ml.shutdown(),ml.configure(n)}}xr.HvigorLogger=Fl,xr.evaluateLogLevel=function(e,t){t.debug?e.setLevel(hl.levels.DEBUG):t.warn?e.setLevel(hl.levels.WARN):t.error?e.setLevel(hl.levels.ERROR):e.setLevel(hl.levels.INFO)};var gl=w&&w.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(X,"__esModule",{value:!0}),X.parseJsonText=X.parseJsonFile=void 0;const Al=Z,vl=gl(kr),Sl=gl(p.default),wl=gl(E.default),Ol=xr.HvigorLogger.getLogger("parse-json-util");var bl;!function(e){e[e.Char=0]="Char",e[e.EOF=1]="EOF",e[e.Identifier=2]="Identifier"}(bl||(bl={}));let _l,Bl,Pl,kl,xl,Nl,Il="start",Tl=[],Rl=0,Ml=1,Ll=0,jl=!1,$l="default",Hl="'",Jl=1;function Gl(e,t=!1){Bl=String(e),Il="start",Tl=[],Rl=0,Ml=1,Ll=0,kl=void 0,jl=t;do{_l=Vl(),Xl[Il]()}while("eof"!==_l.type);return kl}function Vl(){for($l="default",xl="",Hl="'",Jl=1;;){Nl=Ul();const e=zl[$l]();if(e)return e}}function Ul(){if(Bl[Rl])return String.fromCodePoint(Bl.codePointAt(Rl))}function Wl(){const e=Ul();return"\n"===e?(Ml++,Ll=0):e?Ll+=e.length:Ll++,e&&(Rl+=e.length),e}X.parseJsonFile=function(e,t=!1,n="utf-8"){const r=vl.default.readFileSync(Sl.default.resolve(e),{encoding:n});try{return Gl(r,t)}catch(t){if(t instanceof SyntaxError){const n=t.message.split("at");2===n.length&&Ol.errorMessageExit(`${n[0].trim()}${wl.default.EOL}\t at ${e}:${n[1].trim()}`)}Ol.errorMessageExit(`${e} is not in valid JSON/JSON5 format.`)}},X.parseJsonText=Gl;const zl={default(){switch(Nl){case"/":return Wl(),void($l="comment");case void 0:return Wl(),Kl("eof")}if(!Al.JudgeUtil.isIgnoreChar(Nl)&&!Al.JudgeUtil.isSpaceSeparator(Nl))return zl[Il]();Wl()},start(){$l="value"},beforePropertyName(){switch(Nl){case"$":case"_":return xl=Wl(),void($l="identifierName");case"\\":return Wl(),void($l="identifierNameStartEscape");case"}":return Kl("punctuator",Wl());case'"':case"'":return Hl=Nl,Wl(),void($l="string")}if(Al.JudgeUtil.isIdStartChar(Nl))return xl+=Wl(),void($l="identifierName");throw tf(bl.Char,Wl())},afterPropertyName(){if(":"===Nl)return Kl("punctuator",Wl());throw tf(bl.Char,Wl())},beforePropertyValue(){$l="value"},afterPropertyValue(){switch(Nl){case",":case"}":return Kl("punctuator",Wl())}throw tf(bl.Char,Wl())},beforeArrayValue(){if("]"===Nl)return Kl("punctuator",Wl());$l="value"},afterArrayValue(){switch(Nl){case",":case"]":return Kl("punctuator",Wl())}throw tf(bl.Char,Wl())},end(){throw tf(bl.Char,Wl())},comment(){switch(Nl){case"*":return Wl(),void($l="multiLineComment");case"/":return Wl(),void($l="singleLineComment")}throw tf(bl.Char,Wl())},multiLineComment(){switch(Nl){case"*":return Wl(),void($l="multiLineCommentAsterisk");case void 0:throw tf(bl.Char,Wl())}Wl()},multiLineCommentAsterisk(){switch(Nl){case"*":return void Wl();case"/":return Wl(),void($l="default");case void 0:throw tf(bl.Char,Wl())}Wl(),$l="multiLineComment"},singleLineComment(){switch(Nl){case"\n":case"\r":case"\u2028":case"\u2029":return Wl(),void($l="default");case void 0:return Wl(),Kl("eof")}Wl()},value(){switch(Nl){case"{":case"[":return Kl("punctuator",Wl());case"n":return Wl(),ql("ull"),Kl("null",null);case"t":return Wl(),ql("rue"),Kl("boolean",!0);case"f":return Wl(),ql("alse"),Kl("boolean",!1);case"-":case"+":return"-"===Wl()&&(Jl=-1),void($l="numerical");case".":case"0":case"I":case"N":return void($l="numerical");case'"':case"'":return Hl=Nl,Wl(),xl="",void($l="string")}if(void 0===Nl||!Al.JudgeUtil.isDigitWithoutZero(Nl))throw tf(bl.Char,Wl());$l="numerical"},numerical(){switch(Nl){case".":return xl=Wl(),void($l="decimalPointLeading");case"0":return xl=Wl(),void($l="zero");case"I":return Wl(),ql("nfinity"),Kl("numeric",Jl*(1/0));case"N":return Wl(),ql("aN"),Kl("numeric",NaN)}if(void 0!==Nl&&Al.JudgeUtil.isDigitWithoutZero(Nl))return xl=Wl(),void($l="decimalInteger");throw tf(bl.Char,Wl())},zero(){switch(Nl){case".":case"e":case"E":return void($l="decimal");case"x":case"X":return xl+=Wl(),void($l="hexadecimal")}return Kl("numeric",0)},decimalInteger(){switch(Nl){case".":case"e":case"E":return void($l="decimal")}if(!Al.JudgeUtil.isDigit(Nl))return Kl("numeric",Jl*Number(xl));xl+=Wl()},decimal(){switch(Nl){case".":xl+=Wl(),$l="decimalFraction";break;case"e":case"E":xl+=Wl(),$l="decimalExponent"}},decimalPointLeading(){if(Al.JudgeUtil.isDigit(Nl))return xl+=Wl(),void($l="decimalFraction");throw tf(bl.Char,Wl())},decimalFraction(){switch(Nl){case"e":case"E":return xl+=Wl(),void($l="decimalExponent")}if(!Al.JudgeUtil.isDigit(Nl))return Kl("numeric",Jl*Number(xl));xl+=Wl()},decimalExponent(){switch(Nl){case"+":case"-":return xl+=Wl(),void($l="decimalExponentSign")}if(Al.JudgeUtil.isDigit(Nl))return xl+=Wl(),void($l="decimalExponentInteger");throw tf(bl.Char,Wl())},decimalExponentSign(){if(Al.JudgeUtil.isDigit(Nl))return xl+=Wl(),void($l="decimalExponentInteger");throw tf(bl.Char,Wl())},decimalExponentInteger(){if(!Al.JudgeUtil.isDigit(Nl))return Kl("numeric",Jl*Number(xl));xl+=Wl()},hexadecimal(){if(Al.JudgeUtil.isHexDigit(Nl))return xl+=Wl(),void($l="hexadecimalInteger");throw tf(bl.Char,Wl())},hexadecimalInteger(){if(!Al.JudgeUtil.isHexDigit(Nl))return Kl("numeric",Jl*Number(xl));xl+=Wl()},identifierNameStartEscape(){if("u"!==Nl)throw tf(bl.Char,Wl());Wl();const e=Yl();switch(e){case"$":case"_":break;default:if(!Al.JudgeUtil.isIdStartChar(e))throw tf(bl.Identifier)}xl+=e,$l="identifierName"},identifierName(){switch(Nl){case"$":case"_":case"":case"":return void(xl+=Wl());case"\\":return Wl(),void($l="identifierNameEscape")}if(!Al.JudgeUtil.isIdContinueChar(Nl))return Kl("identifier",xl);xl+=Wl()},identifierNameEscape(){if("u"!==Nl)throw tf(bl.Char,Wl());Wl();const e=Yl();switch(e){case"$":case"_":case"":case"":break;default:if(!Al.JudgeUtil.isIdContinueChar(e))throw tf(bl.Identifier)}xl+=e,$l="identifierName"},string(){switch(Nl){case"\\":return Wl(),void(xl+=function(){const e=Ul(),t=function(){switch(Ul()){case"b":return Wl(),"\b";case"f":return Wl(),"\f";case"n":return Wl(),"\n";case"r":return Wl(),"\r";case"t":return Wl(),"\t";case"v":return Wl(),"\v"}return}();if(t)return t;switch(e){case"0":if(Wl(),Al.JudgeUtil.isDigit(Ul()))throw tf(bl.Char,Wl());return"\0";case"x":return Wl(),function(){let e="",t=Ul();if(!Al.JudgeUtil.isHexDigit(t))throw tf(bl.Char,Wl());if(e+=Wl(),t=Ul(),!Al.JudgeUtil.isHexDigit(t))throw tf(bl.Char,Wl());return e+=Wl(),String.fromCodePoint(parseInt(e,16))}();case"u":return Wl(),Yl();case"\n":case"\u2028":case"\u2029":return Wl(),"";case"\r":return Wl(),"\n"===Ul()&&Wl(),""}if(void 0===e||Al.JudgeUtil.isDigitWithoutZero(e))throw tf(bl.Char,Wl());return Wl()}());case'"':case"'":if(Nl===Hl){const e=Kl("string",xl);return Wl(),e}return void(xl+=Wl());case"\n":case"\r":case void 0:throw tf(bl.Char,Wl());case"\u2028":case"\u2029":!function(e){Ol.warn(`JSON5: '${ef(e)}' in strings is not valid ECMAScript; consider escaping.`)}(Nl)}xl+=Wl()}};function Kl(e,t){return{type:e,value:t,line:Ml,column:Ll}}function ql(e){for(const t of e){if(Ul()!==t)throw tf(bl.Char,Wl());Wl()}}function Yl(){let e="",t=4;for(;t-- >0;){const t=Ul();if(!Al.JudgeUtil.isHexDigit(t))throw tf(bl.Char,Wl());e+=Wl()}return String.fromCodePoint(parseInt(e,16))}const Xl={start(){if("eof"===_l.type)throw tf(bl.EOF);Zl()},beforePropertyName(){switch(_l.type){case"identifier":case"string":return Pl=_l.value,void(Il="afterPropertyName");case"punctuator":return void Ql();case"eof":throw tf(bl.EOF)}},afterPropertyName(){if("eof"===_l.type)throw tf(bl.EOF);Il="beforePropertyValue"},beforePropertyValue(){if("eof"===_l.type)throw tf(bl.EOF);Zl()},afterPropertyValue(){if("eof"===_l.type)throw tf(bl.EOF);switch(_l.value){case",":return void(Il="beforePropertyName");case"}":Ql()}},beforeArrayValue(){if("eof"===_l.type)throw tf(bl.EOF);"punctuator"!==_l.type||"]"!==_l.value?Zl():Ql()},afterArrayValue(){if("eof"===_l.type)throw tf(bl.EOF);switch(_l.value){case",":return void(Il="beforeArrayValue");case"]":Ql()}},end(){}};function Zl(){const e=function(){let e;switch(_l.type){case"punctuator":switch(_l.value){case"{":e={};break;case"[":e=[]}break;case"null":case"boolean":case"numeric":case"string":e=_l.value}return e}();if(jl&&"object"==typeof e&&(e._line=Ml,e._column=Ll),void 0===kl)kl=e;else{const t=Tl[Tl.length-1];Array.isArray(t)?jl&&"object"!=typeof e?t.push({value:e,_line:Ml,_column:Ll}):t.push(e):t[Pl]=jl&&"object"!=typeof e?{value:e,_line:Ml,_column:Ll}:e}!function(e){if(e&&"object"==typeof e)Tl.push(e),Il=Array.isArray(e)?"beforeArrayValue":"beforePropertyName";else{const e=Tl[Tl.length-1];Il=e?Array.isArray(e)?"afterArrayValue":"afterPropertyValue":"end"}}(e)}function Ql(){Tl.pop();const e=Tl[Tl.length-1];Il=e?Array.isArray(e)?"afterArrayValue":"afterPropertyValue":"end"}function ef(e){const t={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};if(t[e])return t[e];if(e<" "){const t=e.charCodeAt(0).toString(16);return`\\x${`00${t}`.substring(t.length)}`}return e}function tf(e,t){let n="";switch(e){case bl.Char:n=void 0===t?`JSON5: invalid end of input at ${Ml}:${Ll}`:`JSON5: invalid character '${ef(t)}' at ${Ml}:${Ll}`;break;case bl.EOF:n=`JSON5: invalid end of input at ${Ml}:${Ll}`;break;case bl.Identifier:Ll-=5,n=`JSON5: invalid identifier character at ${Ml}:${Ll}`}const r=new nf(n);return r.lineNumber=Ml,r.columnNumber=Ll,r}class nf extends SyntaxError{}var rf=w&&w.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var u=Object.getOwnPropertyDescriptor(t,n);u&&!("get"in u?!t.__esModule:u.writable||u.configurable)||(u={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,u)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),uf=w&&w.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),of=w&&w.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&rf(t,e,n);return uf(t,e),t};Object.defineProperty(Y,"__esModule",{value:!0});var sf=Y.cleanWorkSpace=Ff=Y.executeInstallHvigor=yf=Y.isHvigorInstalled=mf=Y.isAllDependenciesInstalled=void 0;const cf=of(D.default),af=of(p.default),lf=b,ff=j,df=$,Df=X;let pf,Ef;var mf=Y.isAllDependenciesInstalled=function(){function e(e){const t=null==e?void 0:e.dependencies;return void 0===t?0:Object.getOwnPropertyNames(t).length}if(pf=gf(),Ef=Af(),e(pf)+1!==e(Ef))return!1;for(const e in null==pf?void 0:pf.dependencies)if(!(0,ff.hasNpmPackInPaths)(e,[lf.HVIGOR_PROJECT_DEPENDENCIES_HOME])||!hf(e,pf,Ef))return!1;return!0};function hf(e,t,n){return void 0!==n.dependencies&&(0,ff.offlinePluginConversion)(lf.HVIGOR_PROJECT_ROOT_DIR,t.dependencies[e])===n.dependencies[e]}var yf=Y.isHvigorInstalled=function(){return pf=gf(),Ef=Af(),(0,ff.hasNpmPackInPaths)(lf.HVIGOR_ENGINE_PACKAGE_NAME,[lf.HVIGOR_PROJECT_DEPENDENCIES_HOME])&&(0,ff.offlinePluginConversion)(lf.HVIGOR_PROJECT_ROOT_DIR,pf.hvigorVersion)===Ef.dependencies[lf.HVIGOR_ENGINE_PACKAGE_NAME]};const Cf={cwd:lf.HVIGOR_PROJECT_DEPENDENCIES_HOME,stdio:["inherit","inherit","inherit"]};var Ff=Y.executeInstallHvigor=function(){(0,df.logInfoPrintConsole)("Hvigor installing...");const e={dependencies:{}};e.dependencies[lf.HVIGOR_ENGINE_PACKAGE_NAME]=(0,ff.offlinePluginConversion)(lf.HVIGOR_PROJECT_ROOT_DIR,pf.hvigorVersion);try{cf.mkdirSync(lf.HVIGOR_PROJECT_DEPENDENCIES_HOME,{recursive:!0});const t=af.resolve(lf.HVIGOR_PROJECT_DEPENDENCIES_HOME,lf.DEFAULT_PACKAGE_JSON);cf.writeFileSync(t,JSON.stringify(e))}catch(e){(0,df.logErrorAndExit)(e)}!function(){const e=["config","set","store-dir",lf.HVIGOR_PNPM_STORE_PATH];(0,ff.executeCommand)(lf.HVIGOR_WRAPPER_PNPM_SCRIPT_PATH,e,Cf)}(),(0,ff.executeCommand)(lf.HVIGOR_WRAPPER_PNPM_SCRIPT_PATH,["install"],Cf)};function gf(){const e=af.resolve(lf.HVIGOR_PROJECT_WRAPPER_HOME,lf.DEFAULT_HVIGOR_CONFIG_JSON_FILE_NAME);return cf.existsSync(e)||(0,df.logErrorAndExit)(`Error: Hvigor config file ${e} does not exist.`),(0,Df.parseJsonFile)(e)}function Af(){return cf.existsSync(lf.HVIGOR_PROJECT_DEPENDENCY_PACKAGE_JSON_PATH)?(0,Df.parseJsonFile)(lf.HVIGOR_PROJECT_DEPENDENCY_PACKAGE_JSON_PATH):{dependencies:{}}}sf=Y.cleanWorkSpace=function(){if((0,df.logInfoPrintConsole)("Hvigor cleaning..."),!cf.existsSync(lf.HVIGOR_PROJECT_DEPENDENCIES_HOME))return;const e=cf.readdirSync(lf.HVIGOR_PROJECT_DEPENDENCIES_HOME);if(e&&0!==e.length){cf.existsSync(lf.HVIGOR_BOOT_JS_FILE_PATH)&&(0,ff.executeCommand)(process.argv[0],[lf.HVIGOR_BOOT_JS_FILE_PATH,"--stop-daemon"],{});try{e.forEach((e=>{cf.rmSync(af.resolve(lf.HVIGOR_PROJECT_DEPENDENCIES_HOME,e),{recursive:!0})}))}catch(e){(0,df.logErrorAndExit)(`The hvigor build tool cannot be installed. Please manually clear the workspace directory and synchronize the project again.\n\n Workspace Path: ${lf.HVIGOR_PROJECT_DEPENDENCIES_HOME}.`)}}};var vf={},Sf=w&&w.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var u=Object.getOwnPropertyDescriptor(t,n);u&&!("get"in u?!t.__esModule:u.writable||u.configurable)||(u={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,u)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),wf=w&&w.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Of=w&&w.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&Sf(t,e,n);return wf(t,e),t};Object.defineProperty(vf,"__esModule",{value:!0});var bf=vf.executeBuild=void 0;const _f=b,Bf=Of(D.default),Pf=Of(p.default),kf=$;bf=vf.executeBuild=function(){const e=Pf.resolve(_f.HVIGOR_PROJECT_DEPENDENCIES_HOME,"node_modules","@ohos","hvigor","bin","hvigor.js");try{const t=Bf.realpathSync(e);require(t)}catch(t){(0,kf.logErrorAndExit)(`Error: ENOENT: no such file ${e},delete ${_f.HVIGOR_PROJECT_DEPENDENCIES_HOME} and retry.`)}},function(){if(O.checkNpmConifg(),O.environmentHandler(),O.isPnpmAvailable()||O.executeInstallPnpm(),yf()&&mf())bf();else{sf();try{Ff()}catch(e){return void sf()}bf()}}();
\ No newline at end of file
+"use strict";var u=require("path"),D=require("os"),e=require("fs"),t=require("crypto"),r=require("child_process"),n="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},i={},C={},F=n&&n.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(C,"__esModule",{value:!0}),C.maxPathLength=C.isMac=C.isLinux=C.isWindows=void 0;const E=F(D),A="Windows_NT",o="Darwin";function a(){return E.default.type()===A}function c(){return E.default.type()===o}C.isWindows=a,C.isLinux=function(){return"Linux"===E.default.type()},C.isMac=c,C.maxPathLength=function(){return c()?1016:a()?259:4095},function(e){var t=n&&n.__createBinding||(Object.create?function(u,D,e,t){void 0===t&&(t=e);var r=Object.getOwnPropertyDescriptor(D,e);r&&!("get"in r?!D.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return D[e]}}),Object.defineProperty(u,t,r)}:function(u,D,e,t){void 0===t&&(t=e),u[t]=D[e]}),r=n&&n.__setModuleDefault||(Object.create?function(u,D){Object.defineProperty(u,"default",{enumerable:!0,value:D})}:function(u,D){u.default=D}),i=n&&n.__importStar||function(u){if(u&&u.__esModule)return u;var D={};if(null!=u)for(var e in u)"default"!==e&&Object.prototype.hasOwnProperty.call(u,e)&&t(D,u,e);return r(D,u),D};Object.defineProperty(e,"__esModule",{value:!0}),e.WORK_SPACE=e.HVIGOR_PROJECT_WRAPPER_HOME=e.HVIGOR_PROJECT_ROOT_DIR=e.HVIGOR_PROJECT_CACHES_HOME=e.HVIGOR_PNPM_STORE_PATH=e.HVIGOR_WRAPPER_PNPM_SCRIPT_PATH=e.PROJECT_CACHES=e.HVIGOR_WRAPPER_TOOLS_HOME=e.HVIGOR_USER_HOME=e.DEFAULT_PACKAGE_JSON=e.DEFAULT_HVIGOR_CONFIG_JSON_FILE_NAME=e.PNPM=e.HVIGOR=e.NPM_TOOL=e.PNPM_TOOL=e.HVIGOR_ENGINE_PACKAGE_NAME=void 0;const F=i(D),E=i(u),A=C;e.HVIGOR_ENGINE_PACKAGE_NAME="@ohos/hvigor",e.PNPM_TOOL=(0,A.isWindows)()?"pnpm.cmd":"pnpm",e.NPM_TOOL=(0,A.isWindows)()?"npm.cmd":"npm",e.HVIGOR="hvigor",e.PNPM="pnpm",e.DEFAULT_HVIGOR_CONFIG_JSON_FILE_NAME="hvigor-config.json5",e.DEFAULT_PACKAGE_JSON="package.json",e.HVIGOR_USER_HOME=E.resolve(F.homedir(),".hvigor"),e.HVIGOR_WRAPPER_TOOLS_HOME=E.resolve(e.HVIGOR_USER_HOME,"wrapper","tools"),e.PROJECT_CACHES="project_caches",e.HVIGOR_WRAPPER_PNPM_SCRIPT_PATH=E.resolve(e.HVIGOR_WRAPPER_TOOLS_HOME,"node_modules",".bin",e.PNPM_TOOL),e.HVIGOR_PNPM_STORE_PATH=E.resolve(e.HVIGOR_USER_HOME,"caches"),e.HVIGOR_PROJECT_CACHES_HOME=E.resolve(e.HVIGOR_USER_HOME,e.PROJECT_CACHES),e.HVIGOR_PROJECT_ROOT_DIR=process.cwd(),e.HVIGOR_PROJECT_WRAPPER_HOME=E.resolve(e.HVIGOR_PROJECT_ROOT_DIR,e.HVIGOR),e.WORK_SPACE="workspace"}(i);var s={},l={};Object.defineProperty(l,"__esModule",{value:!0}),l.logInfoPrintConsole=l.logErrorAndExit=void 0,l.logErrorAndExit=function(u){u instanceof Error?console.error(u.message):console.error(u),process.exit(-1)},l.logInfoPrintConsole=function(u){console.log(u)};var B=n&&n.__createBinding||(Object.create?function(u,D,e,t){void 0===t&&(t=e);var r=Object.getOwnPropertyDescriptor(D,e);r&&!("get"in r?!D.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return D[e]}}),Object.defineProperty(u,t,r)}:function(u,D,e,t){void 0===t&&(t=e),u[t]=D[e]}),d=n&&n.__setModuleDefault||(Object.create?function(u,D){Object.defineProperty(u,"default",{enumerable:!0,value:D})}:function(u,D){u.default=D}),f=n&&n.__importStar||function(u){if(u&&u.__esModule)return u;var D={};if(null!=u)for(var e in u)"default"!==e&&Object.prototype.hasOwnProperty.call(u,e)&&B(D,u,e);return d(D,u),D};Object.defineProperty(s,"__esModule",{value:!0});var _=s.executeBuild=void 0;const p=f(e),O=f(u),h=l;_=s.executeBuild=function(u){const D=O.resolve(u,"node_modules","@ohos","hvigor","bin","hvigor.js");try{const u=p.realpathSync(D);require(u)}catch(e){(0,h.logErrorAndExit)(`Error: ENOENT: no such file ${D},delete ${u} and retry.`)}};var P={},v={};!function(u){var D=n&&n.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(u,"__esModule",{value:!0}),u.hashFile=u.hash=u.createHash=void 0;const r=D(t),i=D(e);u.createHash=(u="MD5")=>r.default.createHash(u);u.hash=(D,e)=>(0,u.createHash)(e).update(D).digest("hex");u.hashFile=(D,e)=>{if(i.default.existsSync(D))return(0,u.hash)(i.default.readFileSync(D,"utf-8"),e)}}(v);var g={},m={},R={};Object.defineProperty(R,"__esModule",{value:!0}),R.Unicode=void 0;class y{}R.Unicode=y,y.SPACE_SEPARATOR=/[\u1680\u2000-\u200A\u202F\u205F\u3000]/,y.ID_START=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/,y.ID_CONTINUE=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/,Object.defineProperty(m,"__esModule",{value:!0}),m.JudgeUtil=void 0;const I=R;m.JudgeUtil=class{static isIgnoreChar(u){return"string"==typeof u&&("\t"===u||"\v"===u||"\f"===u||" "===u||" "===u||"\ufeff"===u||"\n"===u||"\r"===u||"\u2028"===u||"\u2029"===u)}static isSpaceSeparator(u){return"string"==typeof u&&I.Unicode.SPACE_SEPARATOR.test(u)}static isIdStartChar(u){return"string"==typeof u&&(u>="a"&&u<="z"||u>="A"&&u<="Z"||"$"===u||"_"===u||I.Unicode.ID_START.test(u))}static isIdContinueChar(u){return"string"==typeof u&&(u>="a"&&u<="z"||u>="A"&&u<="Z"||u>="0"&&u<="9"||"$"===u||"_"===u||""===u||""===u||I.Unicode.ID_CONTINUE.test(u))}static isDigitWithoutZero(u){return/[1-9]/.test(u)}static isDigit(u){return"string"==typeof u&&/[0-9]/.test(u)}static isHexDigit(u){return"string"==typeof u&&/[0-9A-Fa-f]/.test(u)}};var N=n&&n.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(g,"__esModule",{value:!0}),g.parseJsonText=g.parseJsonFile=void 0;const b=N(e),S=N(D),w=N(u),H=m;var x;!function(u){u[u.Char=0]="Char",u[u.EOF=1]="EOF",u[u.Identifier=2]="Identifier"}(x||(x={}));let M,T,V,G,j,J,W="start",U=[],L=0,$=1,k=0,K=!1,z="default",q="'",Z=1;function X(u,D=!1){T=String(u),W="start",U=[],L=0,$=1,k=0,G=void 0,K=D;do{M=Q(),nu[W]()}while("eof"!==M.type);return G}function Q(){for(z="default",j="",q="'",Z=1;;){J=Y();const u=Du[z]();if(u)return u}}function Y(){if(T[L])return String.fromCodePoint(T.codePointAt(L))}function uu(){const u=Y();return"\n"===u?($++,k=0):u?k+=u.length:k++,u&&(L+=u.length),u}g.parseJsonFile=function(u,D=!1,e="utf-8"){const t=b.default.readFileSync(w.default.resolve(u),{encoding:e});try{return X(t,D)}catch(D){if(D instanceof SyntaxError){const e=D.message.split("at");if(2===e.length)throw new Error(`${e[0].trim()}${S.default.EOL}\t at ${u}:${e[1].trim()}`)}throw new Error(`${u} is not in valid JSON/JSON5 format.`)}},g.parseJsonText=X;const Du={default(){switch(J){case"/":return uu(),void(z="comment");case void 0:return uu(),eu("eof")}if(!H.JudgeUtil.isIgnoreChar(J)&&!H.JudgeUtil.isSpaceSeparator(J))return Du[W]();uu()},start(){z="value"},beforePropertyName(){switch(J){case"$":case"_":return j=uu(),void(z="identifierName");case"\\":return uu(),void(z="identifierNameStartEscape");case"}":return eu("punctuator",uu());case'"':case"'":return q=J,uu(),void(z="string")}if(H.JudgeUtil.isIdStartChar(J))return j+=uu(),void(z="identifierName");throw Eu(x.Char,uu())},afterPropertyName(){if(":"===J)return eu("punctuator",uu());throw Eu(x.Char,uu())},beforePropertyValue(){z="value"},afterPropertyValue(){switch(J){case",":case"}":return eu("punctuator",uu())}throw Eu(x.Char,uu())},beforeArrayValue(){if("]"===J)return eu("punctuator",uu());z="value"},afterArrayValue(){switch(J){case",":case"]":return eu("punctuator",uu())}throw Eu(x.Char,uu())},end(){throw Eu(x.Char,uu())},comment(){switch(J){case"*":return uu(),void(z="multiLineComment");case"/":return uu(),void(z="singleLineComment")}throw Eu(x.Char,uu())},multiLineComment(){switch(J){case"*":return uu(),void(z="multiLineCommentAsterisk");case void 0:throw Eu(x.Char,uu())}uu()},multiLineCommentAsterisk(){switch(J){case"*":return void uu();case"/":return uu(),void(z="default");case void 0:throw Eu(x.Char,uu())}uu(),z="multiLineComment"},singleLineComment(){switch(J){case"\n":case"\r":case"\u2028":case"\u2029":return uu(),void(z="default");case void 0:return uu(),eu("eof")}uu()},value(){switch(J){case"{":case"[":return eu("punctuator",uu());case"n":return uu(),tu("ull"),eu("null",null);case"t":return uu(),tu("rue"),eu("boolean",!0);case"f":return uu(),tu("alse"),eu("boolean",!1);case"-":case"+":return"-"===uu()&&(Z=-1),void(z="numerical");case".":case"0":case"I":case"N":return void(z="numerical");case'"':case"'":return q=J,uu(),j="",void(z="string")}if(void 0===J||!H.JudgeUtil.isDigitWithoutZero(J))throw Eu(x.Char,uu());z="numerical"},numerical(){switch(J){case".":return j=uu(),void(z="decimalPointLeading");case"0":return j=uu(),void(z="zero");case"I":return uu(),tu("nfinity"),eu("numeric",Z*(1/0));case"N":return uu(),tu("aN"),eu("numeric",NaN)}if(void 0!==J&&H.JudgeUtil.isDigitWithoutZero(J))return j=uu(),void(z="decimalInteger");throw Eu(x.Char,uu())},zero(){switch(J){case".":case"e":case"E":return void(z="decimal");case"x":case"X":return j+=uu(),void(z="hexadecimal")}return eu("numeric",0)},decimalInteger(){switch(J){case".":case"e":case"E":return void(z="decimal")}if(!H.JudgeUtil.isDigit(J))return eu("numeric",Z*Number(j));j+=uu()},decimal(){switch(J){case".":j+=uu(),z="decimalFraction";break;case"e":case"E":j+=uu(),z="decimalExponent"}},decimalPointLeading(){if(H.JudgeUtil.isDigit(J))return j+=uu(),void(z="decimalFraction");throw Eu(x.Char,uu())},decimalFraction(){switch(J){case"e":case"E":return j+=uu(),void(z="decimalExponent")}if(!H.JudgeUtil.isDigit(J))return eu("numeric",Z*Number(j));j+=uu()},decimalExponent(){switch(J){case"+":case"-":return j+=uu(),void(z="decimalExponentSign")}if(H.JudgeUtil.isDigit(J))return j+=uu(),void(z="decimalExponentInteger");throw Eu(x.Char,uu())},decimalExponentSign(){if(H.JudgeUtil.isDigit(J))return j+=uu(),void(z="decimalExponentInteger");throw Eu(x.Char,uu())},decimalExponentInteger(){if(!H.JudgeUtil.isDigit(J))return eu("numeric",Z*Number(j));j+=uu()},hexadecimal(){if(H.JudgeUtil.isHexDigit(J))return j+=uu(),void(z="hexadecimalInteger");throw Eu(x.Char,uu())},hexadecimalInteger(){if(!H.JudgeUtil.isHexDigit(J))return eu("numeric",Z*Number(j));j+=uu()},identifierNameStartEscape(){if("u"!==J)throw Eu(x.Char,uu());uu();const u=ru();switch(u){case"$":case"_":break;default:if(!H.JudgeUtil.isIdStartChar(u))throw Eu(x.Identifier)}j+=u,z="identifierName"},identifierName(){switch(J){case"$":case"_":case"":case"":return void(j+=uu());case"\\":return uu(),void(z="identifierNameEscape")}if(!H.JudgeUtil.isIdContinueChar(J))return eu("identifier",j);j+=uu()},identifierNameEscape(){if("u"!==J)throw Eu(x.Char,uu());uu();const u=ru();switch(u){case"$":case"_":case"":case"":break;default:if(!H.JudgeUtil.isIdContinueChar(u))throw Eu(x.Identifier)}j+=u,z="identifierName"},string(){switch(J){case"\\":return uu(),void(j+=function(){const u=Y(),D=function(){switch(Y()){case"b":return uu(),"\b";case"f":return uu(),"\f";case"n":return uu(),"\n";case"r":return uu(),"\r";case"t":return uu(),"\t";case"v":return uu(),"\v"}return}();if(D)return D;switch(u){case"0":if(uu(),H.JudgeUtil.isDigit(Y()))throw Eu(x.Char,uu());return"\0";case"x":return uu(),function(){let u="",D=Y();if(!H.JudgeUtil.isHexDigit(D))throw Eu(x.Char,uu());if(u+=uu(),D=Y(),!H.JudgeUtil.isHexDigit(D))throw Eu(x.Char,uu());return u+=uu(),String.fromCodePoint(parseInt(u,16))}();case"u":return uu(),ru();case"\n":case"\u2028":case"\u2029":return uu(),"";case"\r":return uu(),"\n"===Y()&&uu(),""}if(void 0===u||H.JudgeUtil.isDigitWithoutZero(u))throw Eu(x.Char,uu());return uu()}());case'"':case"'":if(J===q){const u=eu("string",j);return uu(),u}return void(j+=uu());case"\n":case"\r":case void 0:throw Eu(x.Char,uu());case"\u2028":case"\u2029":!function(u){console.warn(`JSON5: '${Fu(u)}' in strings is not valid ECMAScript; consider escaping.`)}(J)}j+=uu()}};function eu(u,D){return{type:u,value:D,line:$,column:k}}function tu(u){for(const D of u){if(Y()!==D)throw Eu(x.Char,uu());uu()}}function ru(){let u="",D=4;for(;D-- >0;){const D=Y();if(!H.JudgeUtil.isHexDigit(D))throw Eu(x.Char,uu());u+=uu()}return String.fromCodePoint(parseInt(u,16))}const nu={start(){if("eof"===M.type)throw Eu(x.EOF);iu()},beforePropertyName(){switch(M.type){case"identifier":case"string":return V=M.value,void(W="afterPropertyName");case"punctuator":return void Cu();case"eof":throw Eu(x.EOF)}},afterPropertyName(){if("eof"===M.type)throw Eu(x.EOF);W="beforePropertyValue"},beforePropertyValue(){if("eof"===M.type)throw Eu(x.EOF);iu()},afterPropertyValue(){if("eof"===M.type)throw Eu(x.EOF);switch(M.value){case",":return void(W="beforePropertyName");case"}":Cu()}},beforeArrayValue(){if("eof"===M.type)throw Eu(x.EOF);"punctuator"!==M.type||"]"!==M.value?iu():Cu()},afterArrayValue(){if("eof"===M.type)throw Eu(x.EOF);switch(M.value){case",":return void(W="beforeArrayValue");case"]":Cu()}},end(){}};function iu(){const u=function(){let u;switch(M.type){case"punctuator":switch(M.value){case"{":u={};break;case"[":u=[]}break;case"null":case"boolean":case"numeric":case"string":u=M.value}return u}();if(K&&"object"==typeof u&&(u._line=$,u._column=k),void 0===G)G=u;else{const D=U[U.length-1];Array.isArray(D)?K&&"object"!=typeof u?D.push({value:u,_line:$,_column:k}):D.push(u):D[V]=K&&"object"!=typeof u?{value:u,_line:$,_column:k}:u}!function(u){if(u&&"object"==typeof u)U.push(u),W=Array.isArray(u)?"beforeArrayValue":"beforePropertyName";else{const u=U[U.length-1];W=u?Array.isArray(u)?"afterArrayValue":"afterPropertyValue":"end"}}(u)}function Cu(){U.pop();const u=U[U.length-1];W=u?Array.isArray(u)?"afterArrayValue":"afterPropertyValue":"end"}function Fu(u){const D={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};if(D[u])return D[u];if(u<" "){const D=u.charCodeAt(0).toString(16);return`\\x${`00${D}`.substring(D.length)}`}return u}function Eu(u,D){let e="";switch(u){case x.Char:e=void 0===D?`JSON5: invalid end of input at ${$}:${k}`:`JSON5: invalid character '${Fu(D)}' at ${$}:${k}`;break;case x.EOF:e=`JSON5: invalid end of input at ${$}:${k}`;break;case x.Identifier:k-=5,e=`JSON5: invalid identifier character at ${$}:${k}`}const t=new Au(e);return t.lineNumber=$,t.columnNumber=k,t}class Au extends SyntaxError{}var ou={},au=n&&n.__createBinding||(Object.create?function(u,D,e,t){void 0===t&&(t=e);var r=Object.getOwnPropertyDescriptor(D,e);r&&!("get"in r?!D.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return D[e]}}),Object.defineProperty(u,t,r)}:function(u,D,e,t){void 0===t&&(t=e),u[t]=D[e]}),cu=n&&n.__setModuleDefault||(Object.create?function(u,D){Object.defineProperty(u,"default",{enumerable:!0,value:D})}:function(u,D){u.default=D}),su=n&&n.__importStar||function(u){if(u&&u.__esModule)return u;var D={};if(null!=u)for(var e in u)"default"!==e&&Object.prototype.hasOwnProperty.call(u,e)&&au(D,u,e);return cu(D,u),D},lu=n&&n.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(ou,"__esModule",{value:!0}),ou.isFileExists=ou.offlinePluginConversion=ou.executeCommand=ou.getNpmPath=ou.hasNpmPackInPaths=void 0;const Bu=r,du=lu(e),fu=su(u),_u=i,pu=l;ou.hasNpmPackInPaths=function(u,D){try{return require.resolve(u,{paths:[...D]}),!0}catch(u){return!1}},ou.getNpmPath=function(){const u=process.execPath;return fu.join(fu.dirname(u),_u.NPM_TOOL)},ou.executeCommand=function(u,D,e){0!==(0,Bu.spawnSync)(u,D,e).status&&(0,pu.logErrorAndExit)(`Error: ${u} ${D} execute failed.See above for details.`)},ou.offlinePluginConversion=function(u,D){return D.startsWith("file:")||D.endsWith(".tgz")?fu.resolve(u,_u.HVIGOR,D.replace("file:","")):D},ou.isFileExists=function(u){return du.default.existsSync(u)&&du.default.statSync(u).isFile()};var Ou=n&&n.__createBinding||(Object.create?function(u,D,e,t){void 0===t&&(t=e);var r=Object.getOwnPropertyDescriptor(D,e);r&&!("get"in r?!D.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return D[e]}}),Object.defineProperty(u,t,r)}:function(u,D,e,t){void 0===t&&(t=e),u[t]=D[e]}),hu=n&&n.__setModuleDefault||(Object.create?function(u,D){Object.defineProperty(u,"default",{enumerable:!0,value:D})}:function(u,D){u.default=D}),Pu=n&&n.__importStar||function(u){if(u&&u.__esModule)return u;var D={};if(null!=u)for(var e in u)"default"!==e&&Object.prototype.hasOwnProperty.call(u,e)&&Ou(D,u,e);return hu(D,u),D},vu=n&&n.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(P,"__esModule",{value:!0});var gu=P.initProjectWorkSpace=void 0;const mu=Pu(e),Ru=vu(D),yu=Pu(u),Iu=v,Nu=i,bu=g,Su=l,wu=ou;let Hu,xu,Mu;function Tu(u,D,e){return void 0!==e.dependencies&&(0,wu.offlinePluginConversion)(Nu.HVIGOR_PROJECT_ROOT_DIR,D.dependencies[u])===yu.normalize(e.dependencies[u])}function Vu(){const u=yu.join(Mu,Nu.WORK_SPACE);if((0,Su.logInfoPrintConsole)("Hvigor cleaning..."),!mu.existsSync(u))return;const D=mu.readdirSync(u);if(!D||0===D.length)return;const e=yu.resolve(Mu,"node_modules","@ohos","hvigor","bin","hvigor.js");mu.existsSync(e)&&(0,wu.executeCommand)(process.argv[0],[e,"--stop-daemon"],{});try{D.forEach((D=>{mu.rmSync(yu.resolve(u,D),{recursive:!0})}))}catch(D){(0,Su.logErrorAndExit)(`The hvigor build tool cannot be installed. Please manually clear the workspace directory and synchronize the project again.\n\n Workspace Path: ${u}.`)}}gu=P.initProjectWorkSpace=function(){if(Hu=function(){const u=yu.resolve(Nu.HVIGOR_PROJECT_WRAPPER_HOME,Nu.DEFAULT_HVIGOR_CONFIG_JSON_FILE_NAME);mu.existsSync(u)||(0,Su.logErrorAndExit)(`Error: Hvigor config file ${u} does not exist.`);return(0,bu.parseJsonFile)(u)}(),Mu=function(u){let D;D=function(u){let D=u.hvigorVersion;if(D.startsWith("file:")||D.endsWith(".tgz"))return!1;const e=u.dependencies,t=Object.getOwnPropertyNames(e);for(const u of t){const D=e[u];if(D.startsWith("file:")||D.endsWith(".tgz"))return!1}if(1===t.length&&"@ohos/hvigor-ohos-plugin"===t[0])return D>"2.5.0";return!1}(u)?function(u){let D=`${Nu.HVIGOR_ENGINE_PACKAGE_NAME}@${u.hvigorVersion}`;const e=u.dependencies;if(e){Object.getOwnPropertyNames(e).sort().forEach((u=>{D+=`,${u}@${e[u]}`}))}return(0,Iu.hash)(D)}(u):(0,Iu.hash)(process.cwd());return yu.resolve(Ru.default.homedir(),".hvigor","project_caches",D)}(Hu),xu=function(){const u=yu.resolve(Mu,Nu.WORK_SPACE,Nu.DEFAULT_PACKAGE_JSON);return mu.existsSync(u)?(0,bu.parseJsonFile)(u):{dependencies:{}}}(),!(0,wu.hasNpmPackInPaths)(Nu.HVIGOR_ENGINE_PACKAGE_NAME,[yu.join(Mu,Nu.WORK_SPACE)])||(0,wu.offlinePluginConversion)(Nu.HVIGOR_PROJECT_ROOT_DIR,Hu.hvigorVersion)!==xu.dependencies[Nu.HVIGOR_ENGINE_PACKAGE_NAME]||!function(){function u(u){const D=null==u?void 0:u.dependencies;return void 0===D?0:Object.getOwnPropertyNames(D).length}const D=u(Hu),e=u(xu);if(D+1!==e)return!1;for(const u in null==Hu?void 0:Hu.dependencies)if(!(0,wu.hasNpmPackInPaths)(u,[yu.join(Mu,Nu.WORK_SPACE)])||!Tu(u,Hu,xu))return!1;return!0}()){Vu();try{!function(){(0,Su.logInfoPrintConsole)("Hvigor installing...");for(const u in Hu.dependencies)Hu.dependencies[u]&&(Hu.dependencies[u]=(0,wu.offlinePluginConversion)(Nu.HVIGOR_PROJECT_ROOT_DIR,Hu.dependencies[u]));const u={dependencies:{...Hu.dependencies}};u.dependencies[Nu.HVIGOR_ENGINE_PACKAGE_NAME]=(0,wu.offlinePluginConversion)(Nu.HVIGOR_PROJECT_ROOT_DIR,Hu.hvigorVersion);const D=yu.join(Mu,Nu.WORK_SPACE);try{mu.mkdirSync(D,{recursive:!0});const e=yu.resolve(D,Nu.DEFAULT_PACKAGE_JSON);mu.writeFileSync(e,JSON.stringify(u))}catch(u){(0,Su.logErrorAndExit)(u)}(function(){const u=["config","set","store-dir",Nu.HVIGOR_PNPM_STORE_PATH],D={cwd:yu.join(Mu,Nu.WORK_SPACE),stdio:["inherit","inherit","inherit"]};(0,wu.executeCommand)(Nu.HVIGOR_WRAPPER_PNPM_SCRIPT_PATH,u,D)})(),function(){const u=["install"],D={cwd:yu.join(Mu,Nu.WORK_SPACE),stdio:["inherit","inherit","inherit"]};(0,wu.executeCommand)(Nu.HVIGOR_WRAPPER_PNPM_SCRIPT_PATH,u,D)}(),(0,Su.logInfoPrintConsole)("Hvigor install success.")}()}catch(u){Vu()}}return Mu};var Gu={};!function(t){var C=n&&n.__createBinding||(Object.create?function(u,D,e,t){void 0===t&&(t=e);var r=Object.getOwnPropertyDescriptor(D,e);r&&!("get"in r?!D.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return D[e]}}),Object.defineProperty(u,t,r)}:function(u,D,e,t){void 0===t&&(t=e),u[t]=D[e]}),F=n&&n.__setModuleDefault||(Object.create?function(u,D){Object.defineProperty(u,"default",{enumerable:!0,value:D})}:function(u,D){u.default=D}),E=n&&n.__importStar||function(u){if(u&&u.__esModule)return u;var D={};if(null!=u)for(var e in u)"default"!==e&&Object.prototype.hasOwnProperty.call(u,e)&&C(D,u,e);return F(D,u),D},A=n&&n.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(t,"__esModule",{value:!0}),t.executeInstallPnpm=t.isPnpmInstalled=t.environmentHandler=t.checkNpmConifg=t.PNPM_VERSION=void 0;const o=r,a=E(e),c=A(D),s=E(u),B=i,d=l,f=ou;t.PNPM_VERSION="7.30.0",t.checkNpmConifg=function(){const u=s.resolve(B.HVIGOR_PROJECT_ROOT_DIR,".npmrc"),D=s.resolve(c.default.homedir(),".npmrc");if((0,f.isFileExists)(u)||(0,f.isFileExists)(D))return;const e=(0,f.getNpmPath)(),t=(0,o.spawnSync)(e,["config","get","prefix"],{cwd:B.HVIGOR_PROJECT_ROOT_DIR});if(0!==t.status||!t.stdout)return void(0,d.logErrorAndExit)("Error: The hvigor depends on the npmrc file. Configure the npmrc file first.");const r=s.resolve(`${t.stdout}`.replace(/[\r\n]/gi,""),".npmrc");(0,f.isFileExists)(r)||(0,d.logErrorAndExit)("Error: The hvigor depends on the npmrc file. Configure the npmrc file first.")},t.environmentHandler=function(){process.env["npm_config_update-notifier"]="false"},t.isPnpmInstalled=function(){return!!a.existsSync(B.HVIGOR_WRAPPER_PNPM_SCRIPT_PATH)&&(0,f.hasNpmPackInPaths)("pnpm",[B.HVIGOR_WRAPPER_TOOLS_HOME])},t.executeInstallPnpm=function(){(0,d.logInfoPrintConsole)(`Installing pnpm@${t.PNPM_VERSION}...`);const u=(0,f.getNpmPath)();!function(){const u=s.resolve(B.HVIGOR_WRAPPER_TOOLS_HOME,B.DEFAULT_PACKAGE_JSON);try{a.existsSync(B.HVIGOR_WRAPPER_TOOLS_HOME)||a.mkdirSync(B.HVIGOR_WRAPPER_TOOLS_HOME,{recursive:!0});const D={dependencies:{}};D.dependencies[B.PNPM]=t.PNPM_VERSION,a.writeFileSync(u,JSON.stringify(D))}catch(D){(0,d.logErrorAndExit)(`Error: EPERM: operation not permitted,create ${u} failed.`)}}(),(0,f.executeCommand)(u,["install","pnpm"],{cwd:B.HVIGOR_WRAPPER_TOOLS_HOME,stdio:["inherit","inherit","inherit"],env:process.env}),(0,d.logInfoPrintConsole)("Pnpm install success.")}}(Gu),function(){Gu.checkNpmConifg(),Gu.environmentHandler(),Gu.isPnpmInstalled()||Gu.executeInstallPnpm();const D=gu();_(u.join(D,i.WORK_SPACE))}();
\ No newline at end of file
diff --git a/code/BasicFeature/Connectivity/UploadAndDownLoad/screenshots/devices/zh/home.jpg b/code/BasicFeature/Connectivity/UploadAndDownLoad/screenshots/devices/zh/home.jpg
index 0fc64f891..e19c85810 100644
Binary files a/code/BasicFeature/Connectivity/UploadAndDownLoad/screenshots/devices/zh/home.jpg and b/code/BasicFeature/Connectivity/UploadAndDownLoad/screenshots/devices/zh/home.jpg differ
diff --git a/code/SystemFeature/InsightIntent/IntentDriver/.gitignore b/code/BasicFeature/DataManagement/UDMF/UDMFDemo/.gitignore
similarity index 78%
rename from code/SystemFeature/InsightIntent/IntentDriver/.gitignore
rename to code/BasicFeature/DataManagement/UDMF/UDMFDemo/.gitignore
index a76ef96ca..fbabf7710 100644
--- a/code/SystemFeature/InsightIntent/IntentDriver/.gitignore
+++ b/code/BasicFeature/DataManagement/UDMF/UDMFDemo/.gitignore
@@ -8,5 +8,4 @@
/.clangd
/.clang-format
/.clang-tidy
-**/.test
-/oh-package-lock.json5
\ No newline at end of file
+**/.test
\ No newline at end of file
diff --git a/code/SystemFeature/InsightIntent/IntentDriver/AppScope/app.json5 b/code/BasicFeature/DataManagement/UDMF/UDMFDemo/AppScope/app.json5
similarity index 82%
rename from code/SystemFeature/InsightIntent/IntentDriver/AppScope/app.json5
rename to code/BasicFeature/DataManagement/UDMF/UDMFDemo/AppScope/app.json5
index a0866a0fb..3d276cd28 100644
--- a/code/SystemFeature/InsightIntent/IntentDriver/AppScope/app.json5
+++ b/code/BasicFeature/DataManagement/UDMF/UDMFDemo/AppScope/app.json5
@@ -1,25 +1,25 @@
-/*
- * Copyright (c) 2023 Huawei Device Co., Ltd.
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-{
- "app": {
- "bundleName": "com.samples.intentdriver",
- "vendor": "samples",
- "versionCode": 1000000,
- "versionName": "1.0.0",
- "icon": "$media:app_icon",
- "label": "$string:app_name"
- }
-}
+/*
+ * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+{
+ "app": {
+ "bundleName": "com.example.udmfdemo",
+ "vendor": "example",
+ "versionCode": 1000000,
+ "versionName": "1.0.0",
+ "icon": "$media:app_icon",
+ "label": "$string:app_name"
+ }
+}
diff --git a/code/SystemFeature/InsightIntent/IntentDriver/AppScope/resources/base/element/string.json b/code/BasicFeature/DataManagement/UDMF/UDMFDemo/AppScope/resources/base/element/string.json
similarity index 60%
rename from code/SystemFeature/InsightIntent/IntentDriver/AppScope/resources/base/element/string.json
rename to code/BasicFeature/DataManagement/UDMF/UDMFDemo/AppScope/resources/base/element/string.json
index c4c14949f..2d2a9561b 100644
--- a/code/SystemFeature/InsightIntent/IntentDriver/AppScope/resources/base/element/string.json
+++ b/code/BasicFeature/DataManagement/UDMF/UDMFDemo/AppScope/resources/base/element/string.json
@@ -1,8 +1,8 @@
-{
- "string": [
- {
- "name": "app_name",
- "value": "IntentExecute"
- }
- ]
-}
+{
+ "string": [
+ {
+ "name": "app_name",
+ "value": "UDMFDemo"
+ }
+ ]
+}
diff --git a/code/BasicFeature/DataManagement/UDMF/UDMFDemo/AppScope/resources/base/media/app_icon.png b/code/BasicFeature/DataManagement/UDMF/UDMFDemo/AppScope/resources/base/media/app_icon.png
new file mode 100644
index 000000000..cd45accb1
Binary files /dev/null and b/code/BasicFeature/DataManagement/UDMF/UDMFDemo/AppScope/resources/base/media/app_icon.png differ
diff --git a/code/BasicFeature/DataManagement/UDMF/UDMFDemo/README_zh.md b/code/BasicFeature/DataManagement/UDMF/UDMFDemo/README_zh.md
new file mode 100644
index 000000000..be75358ab
--- /dev/null
+++ b/code/BasicFeature/DataManagement/UDMF/UDMFDemo/README_zh.md
@@ -0,0 +1,72 @@
+# UDMF Demo
+
+### 介绍
+
+本示例主要使用[@ohos.data.uniformTypeDescriptor](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/reference/apis-arkdata/js-apis-data-uniformTypeDescriptor.md)
+[@ohos.data.unifiedDataChannel](https://gitee.com/openharmony/interface_sdk-js/blob/master/api/@ohos.data.unifiedDataChannel.d.ts)展示了标准化数据定义与描述的功能,在新增预置文件后,对文件的utd标准类型获取、utd类型归属类型查询、获取文件对应的utd类型的默认图标等功能。 实现过程中还使用到[@ohos.file.fs](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/reference/apis-core-file-kit/js-apis-file-fs.md) 等接口。
+另外,展示了ArkTS控件[拖拽事件](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/reference/apis-arkui/arkui-ts/ts-universal-events-drag-drop.md)中使用UDMF数据结构相关实现。
+
+
+
+### 效果预览
+
+|首页|文件过滤| 文本拖拽结果 |
+|--------------------------------|--------------------------------|--------------------------------|
+|![image](screenshots/first.png)|![image](screenshots/select.png)| ![image](screenshots/drag.png) |
+
+
+使用说明
+1. 在主界面,类型过滤下拉框中,选择某一文件类型后,文件呈现区域展示对应类型的所有文件;
+2. 在主界面,点击txt后缀的文件,文本呈现区域可展示文件内容;
+3. 在主界面,对于txt后缀的文件,长按拖拽到右上角的文本控件区域,被拖拽的文件会被另存为新的文件,新生成的文件名会在组件内显示,如果文件名过长会在组件内滚动显示;
+4. 在主界面,在“文本呈现区域”右边长按拖拽到右上角的文本控件区域,被拖拽的文本会被另存为新的文件,新生成的文件名会在组件内显示,如果文件名过长会在组件内滚动显示;
+
+### 工程目录
+
+```
+entry/src/main/ets/
+|---entryAbility
+|---fileFs
+| |---fileFs.ets
+|---util
+| |---Common.ets
+| |---Logger.ets
+|---pages|
+| |---Index.ets // 首页
+```
+
+### 具体实现
+
+#### 场景一:下拉列表选择不同数据类型可以进行过滤文件
+* 预置条件:应用中设置不同类型的文件数据到沙箱内
+* 输入:指定文件类型
+* 输出:筛选出指定文件类型,过滤后的文件图标排列到文件呈现区域。
+
+
+#### 场景二:实现选择出来的文件/文本信息能够被拖拽到另一个设备的应用内落为文件
+* 输入:选定文件/文本
+
+* 输出:
+1.拖拽文件/数据到落入框后, 落入文件/数据另存为文件;
+
+### 相关权限
+无
+### 依赖
+
+不涉及
+
+### 约束与限制
+
+1. 本示例仅支持标准系统上运行,支持设备:RK3568。
+2. 本示例为Stage模型,仅支持API12版本SDK,SDK版本号(API Version 12 Release),镜像版本号(OpenHarmony 5.0.0.25及更高版本)。
+3. 本示例需要使用DevEco Studio 版本号(4.1Release)及以上版本才可编译运行。
+
+### 下载
+
+如需单独下载本工程,执行如下命令:
+
+ git init
+ git config core.sparsecheckout true
+ echo code/BasicFeature/DataManagement/UDMF/UDMFDemo/ > .git/info/sparse-checkout
+ git remote add origin https://gitee.com/openharmony/applications_app_samples.git
+ git pull origin master
diff --git a/code/BasicFeature/DataManagement/UDMF/UDMFDemo/build-profile.json5 b/code/BasicFeature/DataManagement/UDMF/UDMFDemo/build-profile.json5
new file mode 100644
index 000000000..66f514668
--- /dev/null
+++ b/code/BasicFeature/DataManagement/UDMF/UDMFDemo/build-profile.json5
@@ -0,0 +1,51 @@
+/*
+ * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+{
+ "app": {
+ "signingConfigs": [
+ ],
+ "products": [
+ {
+ "name": "default",
+ "signingConfig": "default",
+ "compileSdkVersion": 12,
+ "compatibleSdkVersion": 12
+ }
+ ],
+ "buildModeSet": [
+ {
+ "name": "debug",
+ },
+ {
+ "name": "release"
+ }
+ ]
+ },
+ "modules": [
+ {
+ "name": "entry",
+ "srcPath": "./entry",
+ "targets": [
+ {
+ "name": "default",
+ "applyToProducts": [
+ "default"
+ ]
+ }
+ ]
+ }
+ ]
+}
\ No newline at end of file
diff --git a/code/BasicFeature/InsightIntent/IntentExecutor/entry/.gitignore b/code/BasicFeature/DataManagement/UDMF/UDMFDemo/entry/.gitignore
similarity index 100%
rename from code/BasicFeature/InsightIntent/IntentExecutor/entry/.gitignore
rename to code/BasicFeature/DataManagement/UDMF/UDMFDemo/entry/.gitignore
diff --git a/code/SystemFeature/InsightIntent/IntentDriver/entry/build-profile.json5 b/code/BasicFeature/DataManagement/UDMF/UDMFDemo/entry/build-profile.json5
similarity index 87%
rename from code/SystemFeature/InsightIntent/IntentDriver/entry/build-profile.json5
rename to code/BasicFeature/DataManagement/UDMF/UDMFDemo/entry/build-profile.json5
index 0c8525dfd..56c077f6d 100644
--- a/code/SystemFeature/InsightIntent/IntentDriver/entry/build-profile.json5
+++ b/code/BasicFeature/DataManagement/UDMF/UDMFDemo/entry/build-profile.json5
@@ -1,29 +1,29 @@
-/*
- * Copyright (c) 2023 Huawei Device Co., Ltd.
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-{
- "apiType": 'stageMode',
- "buildOption": {
- },
- "targets": [
- {
- "name": "default",
- "runtimeOS": "OpenHarmony"
- },
- {
- "name": "ohosTest",
- }
- ]
+/*
+ * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+{
+ "apiType": "stageMode",
+ "buildOption": {
+ },
+ "targets": [
+ {
+ "name": "default",
+ "runtimeOS": "OpenHarmony"
+ },
+ {
+ "name": "ohosTest",
+ }
+ ]
}
\ No newline at end of file
diff --git a/code/BasicFeature/DataManagement/UDMF/UDMFDemo/entry/hvigorfile.ts b/code/BasicFeature/DataManagement/UDMF/UDMFDemo/entry/hvigorfile.ts
new file mode 100644
index 000000000..c6edcd904
--- /dev/null
+++ b/code/BasicFeature/DataManagement/UDMF/UDMFDemo/entry/hvigorfile.ts
@@ -0,0 +1,6 @@
+import { hapTasks } from '@ohos/hvigor-ohos-plugin';
+
+export default {
+ system: hapTasks, /* Built-in plugin of Hvigor. It cannot be modified. */
+ plugins:[] /* Custom plugin to extend the functionality of Hvigor. */
+}
diff --git a/code/BasicFeature/DataManagement/UDMF/UDMFDemo/entry/oh-package.json5 b/code/BasicFeature/DataManagement/UDMF/UDMFDemo/entry/oh-package.json5
new file mode 100644
index 000000000..248c3b754
--- /dev/null
+++ b/code/BasicFeature/DataManagement/UDMF/UDMFDemo/entry/oh-package.json5
@@ -0,0 +1,10 @@
+{
+ "name": "entry",
+ "version": "1.0.0",
+ "description": "Please describe the basic information.",
+ "main": "",
+ "author": "",
+ "license": "",
+ "dependencies": {}
+}
+
diff --git a/code/SystemFeature/InsightIntent/IntentDriver/entry/src/main/ets/entryability/EntryAbility.ets b/code/BasicFeature/DataManagement/UDMF/UDMFDemo/entry/src/main/ets/entryability/EntryAbility.ts
similarity index 51%
rename from code/SystemFeature/InsightIntent/IntentDriver/entry/src/main/ets/entryability/EntryAbility.ets
rename to code/BasicFeature/DataManagement/UDMF/UDMFDemo/entry/src/main/ets/entryability/EntryAbility.ts
index fbc67f983..728dbf6ae 100644
--- a/code/SystemFeature/InsightIntent/IntentDriver/entry/src/main/ets/entryability/EntryAbility.ets
+++ b/code/BasicFeature/DataManagement/UDMF/UDMFDemo/entry/src/main/ets/entryability/EntryAbility.ts
@@ -1,59 +1,58 @@
-/*
- * Copyright (c) 2023 Huawei Device Co., Ltd.
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-import AbilityConstant from '@ohos.app.ability.AbilityConstant';
-import Base from '@ohos.base';
-import UIAbility from '@ohos.app.ability.UIAbility';
-import Want from '@ohos.app.ability.Want';
-import window from '@ohos.window';
-import { logger } from '../util/Logger';
-
-const TAG: string = '[EntryAbility]';
-
-export default class EntryAbility extends UIAbility {
- onCreate(want: Want, launchParam: AbilityConstant.LaunchParam) {
- logger.info(TAG, `Ability onCreate want: ${JSON.stringify(want)}, launchParam: ${JSON.stringify(launchParam)}`);
- }
-
- onDestroy() {
- logger.info(TAG, 'Ability onDestroy');
- }
-
- onWindowStageCreate(windowStage: window.WindowStage) {
- // Main window is created, set main page for this ability
- logger.info(TAG, 'Ability onWindowStageCreate');
- windowStage.loadContent('pages/Index', (err: Base.BusinessError) => {
- if (err.code) {
- logger.info(TAG, 'Failed to load the content. Cause: %{public}s', JSON.stringify(err) ?? '');
- return;
- }
- });
- }
-
- onWindowStageDestroy() {
- // Main window is destroyed, release UI related resources
- logger.info(TAG, 'Ability onWindowStageDestroy');
- }
-
- onForeground() {
- // Ability has brought to foreground
- logger.info(TAG, 'Ability onForeground');
- }
-
- onBackground() {
- // Ability has back to background
- logger.info(TAG, 'Ability onBackground');
- }
-}
+/*
+ * Copyright (c) 2024 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF InputStyle KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import AbilityConstant from '@ohos.app.ability.AbilityConstant';
+import hilog from '@ohos.hilog';
+import UIAbility from '@ohos.app.ability.UIAbility';
+import Want from '@ohos.app.ability.Want';
+import window from '@ohos.window';
+
+export default class EntryAbility extends UIAbility {
+ onCreate(want: Want, launchParam: AbilityConstant.LaunchParam): void {
+ hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onCreate');
+ }
+
+ onDestroy(): void {
+ hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onDestroy');
+ }
+
+ onWindowStageCreate(windowStage: window.WindowStage): void {
+ // Main window is created, set main page for this ability
+ hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onWindowStageCreate');
+
+ windowStage.loadContent('pages/Index', (err) => {
+ if (err.code) {
+ hilog.error(0x0000, 'testTag', 'Failed to load the content. Cause: %{public}s', JSON.stringify(err) ?? '');
+ return;
+ }
+ hilog.info(0x0000, 'testTag', 'Succeeded in loading the content.');
+ });
+ }
+
+ onWindowStageDestroy(): void {
+ // Main window is destroyed, release UI related resources
+ hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onWindowStageDestroy');
+ }
+
+ onForeground(): void {
+ // Ability has brought to foreground
+ hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onForeground');
+ }
+
+ onBackground(): void {
+ // Ability has back to background
+ hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onBackground');
+ }
+}
diff --git a/code/BasicFeature/DataManagement/UDMF/UDMFDemo/entry/src/main/ets/fileFs/fileFs.ts b/code/BasicFeature/DataManagement/UDMF/UDMFDemo/entry/src/main/ets/fileFs/fileFs.ts
new file mode 100644
index 000000000..6a82daf5c
--- /dev/null
+++ b/code/BasicFeature/DataManagement/UDMF/UDMFDemo/entry/src/main/ets/fileFs/fileFs.ts
@@ -0,0 +1,131 @@
+/*
+ * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { bufferToString } from '../util/Common';
+import { logger } from '../util/Logger';
+import fs from '@ohos.file.fs';
+import fileUri from '@ohos.file.fileuri';
+import wantConstant from '@ohos.ability.wantConstant';
+
+import Want from '@ohos.app.ability.Want';
+
+let fileContent = '';
+const BUFFER_SIZE = 4096; // 读写文件缓冲区大小
+const FILE_NUM = 3; // 沙箱目录预制文件个数
+const DIR_FILE_NUM = 10; // 沙箱目录文件夹中预制文件个数
+const TAG: string = '[File].[SandboxShare]';
+
+export default class FileFs {
+ public fileSize: number = 0;
+ private baseDir: string = '';
+ private dmClass: Object = null;
+ public log: string[] = [];
+ public fileInfo = {
+ path: [],
+ size: 0
+ };
+
+ constructor() {
+ let content1: string = AppStorage.Get('fileContent1');
+ let content2: string = AppStorage.Get('fileContent2');
+ let content3: string = AppStorage.Get('fileContent3');
+ let content4: string = AppStorage.Get('fileContent4');
+ fileContent = content1 + '\r\n\n' + content2 + '\r\n\n' + content3 + '\r\n\n' + content4;
+ }
+
+ readyFilesToTestDir(filesDir: string): void {
+ let content = fileContent;
+ this.baseDir = filesDir + '/TestDir';
+
+ try {
+ let flag = TAG;
+ if (!fs.accessSync(this.baseDir)) {
+ fs.mkdirSync(this.baseDir);
+ }
+ let dpath = this.baseDir;
+
+
+ logger.info(TAG, 'readyFileToWatcher dpath = ' + dpath);
+ for (let i = 0; i < DIR_FILE_NUM; i++) {
+ let myFile = dpath + `/testFile_${i}.txt`;
+ logger.info(TAG, 'readyFileToWatcher myFile = ' + myFile);
+ let file = fs.openSync(myFile, fs.OpenMode.CREATE | fs.OpenMode.READ_WRITE);
+ fs.writeSync(file.fd, content);
+ fs.closeSync(file);
+ }
+ logger.info(TAG, 'readyFileToWatcher successful');
+ } catch (e) {
+ logger.error(TAG, `readyFileToWatcher has failed for: {message: ${e.message}, code: ${e.code}}`);
+ }
+ }
+
+ readyFilesToCurDir(filesDir: string): void {
+ let content = fileContent;
+ this.baseDir = filesDir;
+
+ try {
+ let flag = TAG;
+ if (!fs.accessSync(this.baseDir)) {
+ fs.mkdirSync(this.baseDir);
+ }
+ let dpath = this.baseDir;
+
+ logger.info(TAG, 'readyFileToWatcher dpath = ' + dpath);
+ for (let i = 0; i < FILE_NUM; i++) {
+ let myFile = dpath + `/myFile_${i}.txt`;
+ logger.info(TAG, 'readyFileToWatcher myFile = ' + myFile);
+ let file = fs.openSync(myFile, fs.OpenMode.CREATE | fs.OpenMode.READ_WRITE);
+ fs.writeSync(file.fd, content);
+ fs.closeSync(file);
+ }
+ logger.info(TAG, 'readyFileToWatcher successful');
+ } catch (e) {
+ logger.error(TAG, `readyFileToWatcher has failed for: {message: ${e.message}, code: ${e.code}}`);
+ }
+ }
+
+ getFileContentBuffer(path: string): ArrayBuffer {
+ let buf = new ArrayBuffer(BUFFER_SIZE);
+ try {
+ logger.info(TAG, 'modifyFileToWatcher getFileContent filePath = ' + path);
+ let file = fs.openSync(path, fs.OpenMode.READ_WRITE);
+ let num = fs.readSync(file.fd, buf);
+ logger.info(TAG, 'modifyFileToWatcher getFileContent read num = ' + num);
+ fs.closeSync(file);
+ return buf;
+ } catch (e) {
+ logger.error(TAG, `modifyFileToWatcher getFileContent has failed for: {message: ${e.message}, code: ${e.code}}`);
+ return buf;
+ }
+ }
+
+ getFileContent(path: string): string {
+ let resultPut = '';
+ try {
+ logger.info(TAG, 'modifyFileToWatcher getFileContent filePath = ' + path);
+ let file = fs.openSync(path, fs.OpenMode.READ_WRITE);
+ let buf = new ArrayBuffer(BUFFER_SIZE);
+ let num = fs.readSync(file.fd, buf);
+ logger.info(TAG, 'modifyFileToWatcher getFileContent read num = ' + num);
+ resultPut = bufferToString(buf);
+ logger.info(TAG, 'modifyFileToWatcher getFileContent read resultPut = ' + resultPut);
+ fs.closeSync(file);
+ return resultPut;
+ } catch (e) {
+ logger.error(TAG, `modifyFileToWatcher getFileContent has failed for: {message: ${e.message}, code: ${e.code}}`);
+ return resultPut;
+ }
+ }
+}
\ No newline at end of file
diff --git a/code/BasicFeature/DataManagement/UDMF/UDMFDemo/entry/src/main/ets/pages/Index.ets b/code/BasicFeature/DataManagement/UDMF/UDMFDemo/entry/src/main/ets/pages/Index.ets
new file mode 100644
index 000000000..0470431b5
--- /dev/null
+++ b/code/BasicFeature/DataManagement/UDMF/UDMFDemo/entry/src/main/ets/pages/Index.ets
@@ -0,0 +1,599 @@
+/*
+ * Copyright (c) 2024 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF InputStyle KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import fs from '@ohos.file.fs';
+import fileUri from '@ohos.file.fileuri';
+import common from '@ohos.app.ability.common';
+import utdDesc from '@ohos.data.uniformTypeDescriptor';
+import { BusinessError } from '@ohos.base';
+import { logger } from '../util/Logger';
+import UDC from '@ohos.data.unifiedDataChannel';
+import UTD from '@ohos.data.uniformTypeDescriptor';
+import FileFs from '../fileFs/fileFs'
+import { randomString } from '../util/Common';
+import systemDateTime from '@ohos.systemDateTime';
+
+const TAG: string = 'UDMF_Demo';
+
+// 获取应用文件路径
+let context = getContext(this) as common.UIAbilityContext;
+let baseDir = context.filesDir;
+let filesDir = baseDir + '/udmf_demo_test';
+
+let class2UTD = new Map([
+ ["All", "All"],
+ ["Images", "general.image"],
+ ["Audios", "general.audio"],
+ ["Videos", "general.video"],
+ ["Text", "general.text"],
+ ["Archive", "general.archive"],
+ ["Calendar", "general.calendar"],
+ ["ComObject", "general.composite-object"],
+ ["Exe", "general.executable"],
+ ["OpenXml", "org.openxmlformats.openxml"],
+
+]);
+
+class FileInfo {
+ filename: string;
+ iconFile: string;
+
+ constructor(fileName: string, iconFile: string) {
+ this.filename = fileName;
+ this.iconFile = iconFile;
+ }
+}
+
+let precastFiles: string[] = [
+ "test1.txt",
+ "testx.xhtml",
+ "testc.css",
+ "testm.md",
+ "testRtf.rtf",
+ "testCsv.csv",
+
+ "imagePng1.png",
+ "imageJpg2.jpg",
+ "imageTiff1.tiff",
+ "imageTiff2.tiff",
+ "imageMyImage1.myImage",
+ "imageMyImage2.myImage",
+ "imageXbm.xbm",
+ "imageFpx.fpx",
+ "imageGif.gif",
+
+ "myPsd.psd",
+ "audioMp32.mp3",
+ "audioAu.au",
+ "audioAif.aif",
+ "audioM4a.m4a",
+ "audioMp2.mp2",
+ "audioMpga.mpga",
+
+ "audioAu.au",
+ "audioSd2.sd2",
+ "audioRa.ra",
+ "audioMka.mka",
+
+ "audioWav1.wav",
+ "audioWav2.wav",
+ "myBz2.bz2",
+ "myZip.zip",
+ "audioMyAudio1.myAudio",
+ "audioMyAudio2.myAudio",
+
+ "myHtml.html",
+ "myXml.xml",
+ "myIcs.ics",
+ "videoMpeg2.mpeg",
+ "myVcs.vcs",
+ "videoAvi2.avi",
+ "myTar.tar",
+ "videoMyVideo2.myVideo",
+ "videoMxu.mxu",
+ "videoRm.rm",
+ "videoMkv.mkv",
+ "videoSwf.swf",
+
+ "myArchiveOpg.opg",
+ "myArchiveIso.iso",
+
+
+ // api 12新增
+ "myComObjectPps.pps",
+ "myComObjectXlt.xlt",
+ "myComObjectVsd.vsd",
+
+ "myComObjectVsdx.vsdx",
+ "myComObjectDocm.docm",
+ "myComObjectXlsm.xlsm",
+ "myComObjectPptm.pptm",
+ "myComObjectVsdx.vsdx",
+ "myComObjectVstx.vstx",
+
+
+ "myExe.exe",
+ "myClass.class",
+
+ "myOfd.ofd",
+ "myRar.rar",
+ "My7z.7z"
+];
+
+// 预制文件
+function CreatePrecastFile(): void {
+ try {
+ let res = fs.accessSync(filesDir);
+ if (res) {
+ logger.info(TAG, `file path: ${filesDir} exists`);
+ } else {
+ logger.info(TAG, `file path: ${filesDir} not exists`);
+ fs.mkdirSync(filesDir);
+ }
+ } catch (error) {
+ let err: BusinessError = error as BusinessError;
+ logger.error(TAG, 'accessSync failed with error message: ' + err.message + ', error code: ' + err.code);
+ }
+
+ for (let i = 0; i < precastFiles.length; i++) {
+ let fileName = filesDir + '/' + precastFiles[i];
+ logger.info(TAG, `The file name: ${fileName}`);
+ try {
+ let res = fs.accessSync(fileName);
+ if (res) {
+ logger.info(TAG, `file: ${fileName} exists!.`);
+ } else {
+ logger.info(TAG, `file: ${fileName} not exists, will create it!.`);
+ let file = fs.openSync(fileName, fs.OpenMode.READ_WRITE | fs.OpenMode.CREATE);
+ logger.info(TAG, 'file fd: ' + file.fd);
+
+ if (fileName.includes('.txt')) {
+ logger.info(TAG, 'txt file write sync ');
+ fs.writeSync(file.fd, 'test content 1 test content 2');
+ }
+ fs.closeSync(file);
+ }
+ } catch (error) {
+ let err: BusinessError = error as BusinessError;
+ logger.error(TAG, 'accessSync failed with error message: ' + err.message + ', error code: ' + err.code);
+ }
+ }
+}
+
+function saveAsFileContent(fileName: string, content: ArrayBuffer | string) {
+ logger.info(TAG, `The file name: ${fileName}`);
+ try {
+ let res = fs.accessSync(fileName);
+ if (res) {
+ logger.info(TAG, `file: ${fileName} exists!.`);
+ } else {
+ logger.info(TAG, `file: ${fileName} not exists, will create it!.`);
+ let file = fs.openSync(fileName, fs.OpenMode.READ_WRITE | fs.OpenMode.CREATE);
+ logger.info(TAG, 'file fd: ' + file.fd);
+
+ if (fileName.includes('.txt')) {
+ logger.info(TAG, 'txt file write sync ');
+ fs.writeSync(file.fd, content);
+ }
+ fs.closeSync(file);
+ }
+ } catch (error) {
+ let err: BusinessError = error as BusinessError;
+ logger.error(TAG, 'accessSync failed with error message: ' + err.message + ', error code: ' + err.code);
+ }
+}
+
+function getIconByType(fileName: string) {
+ let index = fileName.lastIndexOf('.');
+ let fileExtension = fileName.substring(index);
+ logger.info(TAG, `getIconByType fileExtension: ${fileExtension}`);
+
+ let utd = utdDesc.getUniformDataTypeByFilenameExtension(fileExtension);
+ let typeObj: utdDesc.TypeDescriptor = utdDesc.getTypeDescriptor(utd);
+ logger.info(TAG, `getIconByType typeObj.iconFile: ${typeObj.iconFile}`);
+ if (typeObj.iconFile == '') {
+ logger.info(TAG, `getIconByType typeObj.iconFile is null`);
+ let iconFile: string = 'app.media.ic_select_option_collection';
+ return iconFile;
+ }
+ return typeObj.iconFile;
+}
+
+async function convertResourceToString(resource: Resource) {
+ let value: string = await context.resourceManager.getStringValue($r('app.string.text_target_tips').id);
+ logger.info(TAG, 'getStringValue value: ' + value);
+ return value;
+}
+
+@Entry
+@Component
+struct Index {
+ @State textContentTarget: string = '';
+ @StorageLink('filesDir') filesDir: string = '';
+
+ fileFs: FileFs = new FileFs();
+ @State text: string = 'All';
+ @State index: number = 1;
+ @State space: number = 12;
+ @State arrowPosition: ArrowPosition = ArrowPosition.END;
+ @State fileNames: string[] = [];
+ @State selectedFilesInfos: FileInfo[] = [];
+ @State textContent: string = '';
+ @State backGroundColor: Color = Color.Transparent;
+ controller: TextAreaController = new TextAreaController()
+ controllerTarget: TextAreaController = new TextAreaController()
+
+ getListFile(): string[] {
+ let files = fs.listFileSync(filesDir);
+ return files;
+ }
+
+ UpdateSelectedFiles(): void {
+ this.fileNames = this.getListFile();
+ for (let i = this.selectedFilesInfos.length - 1; i >= 0; i--) {
+ this.selectedFilesInfos.pop();
+ }
+ this.selectedFilesInfos = [];
+ logger.info(TAG, 'selectText: ' + this.text);
+ for (let i = 0; i < this.fileNames.length; i++) {
+ let fileName = this.fileNames[i];
+ let index = fileName.lastIndexOf('.');
+ if (index < 0) {
+ logger.info(TAG, `fileNames file: ${fileName}`);
+ if (this.text == 'All') {
+ let fileInfo = new FileInfo(fileName, '');
+ this.selectedFilesInfos.push(fileInfo);
+ }
+ continue;
+ } else {
+ let fileExtension = fileName.substring(index);
+ logger.info(TAG, `fileExtension: ${fileExtension}`);
+ let utd = utdDesc.getUniformDataTypeByFilenameExtension(fileExtension);
+ logger.info(TAG, `fileNames file: ${fileName}, extension: ${fileExtension}, utd: ${utd}`);
+ try {
+ if (utd != null) {
+ let typeObj: utdDesc.TypeDescriptor = utdDesc.getTypeDescriptor(utd);
+
+ if (class2UTD.get(this.text) == 'All') {
+ let fileInfo = new FileInfo(fileName, typeObj.iconFile);
+ this.selectedFilesInfos.push(fileInfo);
+ logger.info(TAG, `All type: ${fileInfo.filename}, utd: ${utd}, iconFile: ${fileInfo.iconFile}`);
+ } else {
+ let ret = typeObj.belongsTo(class2UTD.get(this.text));
+ logger.info(TAG, `typeObj.belongsTo: ${fileName}, utd: ${class2UTD.get(this.text)}, ret: ${ret} iconFile: ${typeObj.iconFile}`);
+ if (ret) {
+ let fileInfo = new FileInfo(fileName, typeObj.iconFile);
+ this.selectedFilesInfos.push(fileInfo);
+ }
+ }
+ } else {
+ if (class2UTD.get(this.text) == 'All') {
+ let fileInfo = new FileInfo(fileName, '');
+ this.selectedFilesInfos.push(fileInfo);
+ logger.info(TAG, `utd null All type: ${fileInfo.filename}, utd: ${utd}, iconFile: ${fileInfo.iconFile}`);
+ }
+ }
+ } catch (e) {
+ let error: BusinessError = e as BusinessError;
+ logger.error(TAG, `belongsTo throws an exception. code is ${error.code}, message is ${error.message}`);
+ }
+ }
+ }
+ logger.info(TAG, `all files ${JSON.stringify(this.selectedFilesInfos)}}`);
+ }
+
+ aboutToAppear() {
+ logger.info(TAG, 'filesDir: ' + filesDir);
+ convertResourceToString($r('app.string.text_target_tips')).then((val) => {
+ this.textContentTarget = val;
+ })
+ CreatePrecastFile();
+ this.UpdateSelectedFiles();
+ }
+
+ aboutToDisappear() {
+ for (let i = this.selectedFilesInfos.length - 1; i >= 0; i--) {
+ this.selectedFilesInfos.pop();
+ }
+ }
+
+ getDataFromUdmfRetry(event: DragEvent, callback: (data: DragEvent) => void) {
+ try {
+ let data: UnifiedData = event.getData();
+ if (!data) {
+ return false;
+ }
+ let records: UDC.UnifiedRecord[] = data.getRecords();
+ if (!records || records.length <= 0) {
+ return false;
+ }
+ callback(event);
+ return true;
+ } catch (e) {
+ console.log('getData failed, code = ' + (e as BusinessError).code + ', message = ' + (e as BusinessError).message);
+ return false;
+ }
+ }
+
+ getDataFromUdmf(event: DragEvent, callback: (data: DragEvent) => void) {
+ if (this.getDataFromUdmfRetry(event, callback)) {
+ return;
+ }
+ setTimeout(() => {
+ this.getDataFromUdmfRetry(event, callback);
+ }, 1500);
+ }
+
+ build() {
+ Row() {
+ Column() {
+ Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Start, justifyContent: FlexAlign.Start }) {
+ Text($r('app.string.UDMF_demo'))
+ .fontStyle(FontStyle.Normal)
+ .fontSize(20)
+ .fontWeight(700)
+ .textAlign(TextAlign.Start)
+ .id('titleText')
+ }
+ .width('30%')
+ .height('5%')
+ .margin({ left: 12 })
+
+ // 下拉选择框
+ Flex({ direction: FlexDirection.Row, alignItems: ItemAlign.Start, justifyContent: FlexAlign.SpaceBetween }) {
+ Select([{ value: 'All', icon: $r('app.media.ic_select_option_collection') },
+ { value: 'Images', icon: $r(getIconByType('test.png')) },
+ { value: 'Audios', icon: $r(getIconByType('test.mp3')) },
+ { value: 'Videos', icon: $r(getIconByType('test.avi')) },
+ { value: 'Text', icon: $r(getIconByType('test.txt')) },
+ { value: 'Archive', icon: $r(getIconByType('test.zip')) },
+ { value: 'Calendar', icon: $r(getIconByType('test.ics')) },
+ { value: 'ComObject', icon: $r(getIconByType('test.ofd')) },
+ { value: 'Exe', icon: $r(getIconByType('test.exe')) },
+ { value: 'OpenXml', icon: $r(getIconByType('test.xls')) }
+ ])
+ .selected(this.index)
+ .value(this.text)
+ .id('SelectTypeList')
+ .font({ size: 16, weight: 500 })
+ .fontColor('#182431')
+ .selectedOptionFont({ size: 16, weight: 500 })
+ .optionFont({ size: 16, weight: 500 })
+ .space(this.space)
+ .arrowPosition(this.arrowPosition)
+ .menuAlign(MenuAlignType.START, { dx: 0, dy: 0 })
+ .backgroundColor($r('app.color.bottom_title_divider'))
+ .width('30%')
+ .height('30%')
+ .onSelect((index: number, text?: string | undefined) => {
+ this.index = index;
+ if (text) {
+ this.text = text;
+ logger.info(TAG, 'Select type:' + text);
+ this.UpdateSelectedFiles();
+ }
+ })
+
+ Text(this.textContentTarget)
+ .backgroundColor($r('app.color.bottom_title_divider'))
+ .width('70%')
+ .height(42)
+ .margin({ left: 12, right: 12 })
+ .fontSize(16)
+ .maxLines(1)
+ .fontColor('#182431')
+ .id('targetText')
+ .borderRadius(24)
+ .textOverflow({ overflow: TextOverflow.MARQUEE })
+ .maxLines(1)
+ .padding({left: 12})
+ .allowDrop([UTD.UniformDataType.PLAIN_TEXT, UTD.UniformDataType.FILE])
+ .onDrop((dragEvent?: DragEvent) => {
+ logger.info(TAG, `textContentTarget onDrop this.textContentTarget:` + this.textContentTarget);
+ this.getDataFromUdmf((dragEvent as DragEvent), (event: DragEvent) => {
+ let records: Array = event.getData().getRecords();
+ let type: string = records[0].getType();
+ let time = 0;
+ try {
+ time = systemDateTime.getUptime(systemDateTime.TimeType.ACTIVE, false);
+ logger.info(TAG, 'getUptime: ' + time);
+ } catch(e) {
+ let error = e as BusinessError;
+ logger.info(TAG, `Failed to get uptime. message: ${error.message}, code: ${error.code}`);
+ }
+
+ if(type == UTD.UniformDataType.FILE) {
+ logger.info(TAG, 'general.file is true!');
+ let file: UDC.File = records[0] as UDC.File;
+ let name: string = randomString(6, 'UDMFDemo');
+
+ let details: Record | undefined = file.details
+ if (details == undefined) {
+ return;
+ }
+
+ let fileNewName: string = 'copy' + '_' + time.toString() + '_' + details.name;
+ let fileTestDirPathNew: string = filesDir + "/" + fileNewName;
+ logger.info(TAG, 'fileTestDirPathNew: ' + fileTestDirPathNew);
+
+ let content: ArrayBuffer = this.fileFs.getFileContentBuffer(file.uri);
+ saveAsFileContent(fileTestDirPathNew, content);
+ this.UpdateSelectedFiles();
+ this.textContentTarget = 'Save as ' + fileNewName;
+ } else if (type == UTD.UniformDataType.PLAIN_TEXT) {
+ logger.info(TAG, 'general.plain-text is true!');
+ let plainText: UDC.PlainText = records[0] as UDC.PlainText;
+
+ let name: string = randomString(6, 'UDMFDemo') + '.txt';
+ let fileNewName: string = time.toString() + '_' + name;
+ let fileTestDirPathNew = filesDir + "/" + fileNewName;
+
+ logger.info(TAG, `textContentTarget onDrop fileTestDirPathNew:` + fileTestDirPathNew);
+ logger.info(TAG, `textContentTarget onDrop plainText.textContent:` + plainText.textContent);
+
+ saveAsFileContent(fileTestDirPathNew, plainText.textContent);
+ this.UpdateSelectedFiles();
+ this.textContentTarget = 'Content save as ' + fileNewName;
+ logger.info(TAG, `textContentTarget onDrop this.textContentTarget:` + this.textContentTarget);
+ }
+ })
+ })
+ }
+ .margin({ left: 12, right: 12 })
+ .height('5%')
+
+ // 文件列表
+ Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Start, justifyContent: FlexAlign.Start }) {
+ Text($r('app.string.file_list'))
+ .fontStyle(FontStyle.Normal)
+ .fontSize(16)
+ .fontWeight(700)
+ .textAlign(TextAlign.Start)
+ .margin({ left: 12, top: 24, bottom: 12 })
+ .height('10%')
+ .copyOption(CopyOptions.InApp)
+ .draggable(true)
+
+ List({ space: 2, initialIndex: 0 }) {
+ ForEach(this.selectedFilesInfos, (item: FileInfo, no: Number) => {
+ ListItem() {
+ Row() {
+ Column() {
+ Row() {
+ Image($r(getIconByType(item.filename)))
+ .objectFit(ImageFit.Contain)
+ .width('10%')
+ .height('60%');
+ Text(item.filename)
+ .fontSize(16)
+ .height(46)
+ .textAlign(TextAlign.Start)
+ .margin({ left: 12, right: 12 })
+ .fontWeight(500)
+ .id('textFilename_' + no)
+ .visibility(Visibility.Visible)
+ .onClick(() => {
+ logger.info(TAG, `selected file:` + item.filename + `and clicked`);
+ logger.info(TAG, `selected file:` + item.filename + `and clicked row`);
+ let fileTestDirPath = filesDir + '/' + item.filename;
+ if (item.filename.includes('.txt')) {
+ this.textContent = this.fileFs.getFileContent(fileTestDirPath);
+ if (this.textContent == '') {
+ this.textContent = item.filename + 'content is empty!'
+ }
+ }
+ })
+ }
+
+ Divider()
+ .vertical(false)
+ .height(2)
+ .color($r('app.color.background_shallow_grey'))
+ .opacity(0.6)
+ .margin({ left: 12, right: 12 })
+ }
+ .width('100%')
+ .height(48)
+ .justifyContent(FlexAlign.Center)
+ .alignItems(HorizontalAlign.Start)
+ .onDragStart((event) => {
+ this.textContentTarget = '';
+ let fileTestDirPath = filesDir + '/' + item.filename;
+ logger.info(TAG, 'onDragStart begin!')
+
+ let file = new UDC.File();
+ file.details = {
+ name: item.filename,
+ };
+ file.uri = fileUri.getUriFromPath(fileTestDirPath);
+ this.backGroundColor = Color.Transparent;
+ (event as DragEvent).setData(new UDC.UnifiedData(file));
+ })
+ }
+ .width('100%')
+ .height(48)
+ .alignItems(VerticalAlign.Center)
+ }
+ .id('listItem_'+ no)
+ })
+ }
+ .listDirection(Axis.Vertical)
+ .scrollBar(BarState.Auto)
+ .friction(0.6)
+ .margin({ left: 12, right: 12 })
+ .borderRadius(24)
+ .edgeEffect(EdgeEffect.Spring) // 边缘效果设置为Spring
+ .onScrollIndex((firstIndex: number, lastIndex: number, centerIndex: number) => {
+ logger.info(TAG, 'onScrollIndex')
+ })
+ .onDidScroll((scrollOffset: number, scrollState: ScrollState) => {
+ logger.info(TAG, 'onDidScroll')
+ })
+ .onScrollStop(()=> {
+ logger.info(TAG, 'onScrollStop')
+ })
+ .backgroundColor(0xFFFFFF)
+ }
+ .height('40%')
+
+ // 文件内容
+ Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Start, justifyContent: FlexAlign.Start }) {
+ Text($r('app.string.text_content'))
+ .fontStyle(FontStyle.Normal)
+ .fontSize(16)
+ .fontWeight(700)
+ .textAlign(TextAlign.Start)
+ .margin({ left: 12, top: 12, bottom: 6 })
+ .height('10%')
+ .copyOption(CopyOptions.InApp)
+ .draggable(true)
+ TextArea({
+ text: this.textContent,
+ controller: this.controller
+ })
+ .placeholderFont({ size: 16, weight: 400 })
+ .backgroundColor('#FFFFFF')
+ .border({ width: 1, color: Color.Gray, radius: 16 })
+ .height('80%')
+ .margin({ left: 12, right: 12 })
+ .fontSize(16)
+ .maxLines(4)
+ .fontColor('#182431')
+ .copyOption(CopyOptions.InApp)
+ .draggable(true)
+ .id('textContent')
+ .onChange((value: string) => {
+ this.textContent = value
+ })
+ }
+ .margin({ top: 12 })
+ .onDragStart((event) => {
+ this.textContentTarget = '';
+ this.backGroundColor = Color.Transparent;
+ let data: UDC.PlainText = new UDC.PlainText();
+ data.abstract = 'this is abstract';
+ data.textContent = this.textContent;
+ (event as DragEvent).setData(new UDC.UnifiedData(data));
+ })
+ .height('45%')
+ }
+ .margin({ left: 12, right: 12 })
+ .alignItems(HorizontalAlign.Start)
+ }
+ .height('100%')
+ .width('100%')
+ .backgroundColor($r('app.color.background_shallow_grey'))
+ }
+}
diff --git a/code/BasicFeature/DataManagement/UDMF/UDMFDemo/entry/src/main/ets/util/Common.ts b/code/BasicFeature/DataManagement/UDMF/UDMFDemo/entry/src/main/ets/util/Common.ts
new file mode 100644
index 000000000..a21360c70
--- /dev/null
+++ b/code/BasicFeature/DataManagement/UDMF/UDMFDemo/entry/src/main/ets/util/Common.ts
@@ -0,0 +1,79 @@
+/*
+ * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+import util from '@ohos.util';
+
+const INDEX: number = 2; // 序号
+const SLEEP_TIME: number = 10; // 睡眠时间
+const RADIX: number = 16; // parInt第二个参数值
+
+export function strToUtf8Bytes(content: string | number | boolean): Array {
+ const code = encodeURIComponent(content);
+ let bytes = [];
+ for (let i = 0; i < code.length; i++) {
+ const char = code.charAt(i);
+ if (char === '%') {
+ const hex = code.charAt(i + 1) + code.charAt(i + INDEX);
+ const hexValue = parseInt(hex, RADIX);
+ bytes.push(hexValue);
+ i += INDEX;
+ } else {
+ bytes.push(char.charCodeAt(0));
+ }
+ }
+ return bytes;
+}
+
+export function strToArrayBuffer(text: string): ArrayBuffer {
+ const bytes = this.strToUtf8Bytes(text);
+ const buffer = new ArrayBuffer(bytes.length);
+ const bufView = new DataView(buffer);
+ for (let i = 0; i < bytes.length; i++) {
+ bufView.setUint8(i, bytes[i]);
+ }
+ return buffer;
+}
+
+export async function sleep(times: number): Promise {
+ if (!times) {
+ times = SLEEP_TIME;
+ }
+ await new Promise((res) => setTimeout(res, times));
+}
+
+export function randomString(num: number, chars: string): string {
+ let len = num;
+ let maxPos = chars.length;
+ let pwd = '';
+ for (let i = 0; i < len; i++) {
+ pwd += chars.charAt(Math.floor(Math.random() * maxPos));
+ }
+ return pwd;
+}
+
+export function bufferToString(buffer: ArrayBuffer): string {
+ let textDecoder = util.TextDecoder.create('utf-8', {
+ ignoreBOM: true
+ });
+ let resultPut = textDecoder.decodeWithStream(new Uint8Array(buffer), {
+ stream: true
+ });
+ return resultPut;
+}
+
+export function stringToBuffer(content: string): Uint8Array {
+ let textEncoder = new util.TextEncoder('utf-8');
+ let resultBuf = textEncoder.encodeInto(content);
+ return resultBuf;
+}
diff --git a/code/SystemFeature/InsightIntent/IntentDriver/entry/src/ohosTest/ets/util/Logger.ets b/code/BasicFeature/DataManagement/UDMF/UDMFDemo/entry/src/main/ets/util/Logger.ts
similarity index 56%
rename from code/SystemFeature/InsightIntent/IntentDriver/entry/src/ohosTest/ets/util/Logger.ets
rename to code/BasicFeature/DataManagement/UDMF/UDMFDemo/entry/src/main/ets/util/Logger.ts
index 6754b489b..d138213c0 100644
--- a/code/SystemFeature/InsightIntent/IntentDriver/entry/src/ohosTest/ets/util/Logger.ets
+++ b/code/BasicFeature/DataManagement/UDMF/UDMFDemo/entry/src/main/ets/util/Logger.ts
@@ -1,53 +1,45 @@
-/*
- * Copyright (c) 2023 Huawei Device Co., Ltd.
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-import hilog from '@ohos.hilog';
-
-class Logger {
- private domain: number;
- private prefix: string;
- private format: string = '%{public}s';
-
- constructor(prefix: string) {
- this.prefix = prefix;
- this.domain = 0xF811;
- }
-
- makeFormat(args_length: number): string {
- let format: string = this.format;
- for (let i = 0; i < args_length - 1; i++) {
- format += ', ' + this.format;
- }
- return format;
- }
-
- debug(...args: string[]): void {
- hilog.debug(this.domain, this.prefix, this.makeFormat(args.length), args);
- }
-
- info(...args: string[]): void {
- hilog.info(this.domain, this.prefix, this.makeFormat(args.length), args);
- }
-
- warn(...args: string[]): void {
- hilog.warn(this.domain, this.prefix, this.makeFormat(args.length), args);
- }
-
- error(...args: string[]): void {
- hilog.error(this.domain, this.prefix, this.makeFormat(args.length), args);
- }
-}
-
-export const logger = new Logger('Sample_IntentDriver_Test');
\ No newline at end of file
+/*
+ * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import hilog from '@ohos.hilog';
+
+ class Logger {
+ private domain: number;
+ private prefix: string;
+ private format: string = '%{public}s, %{public}s';
+
+ constructor(prefix: string) {
+ this.prefix = prefix;
+ this.domain = 0xF811;
+ }
+
+ debug(...args: string[]): void {
+ hilog.debug(this.domain, this.prefix, this.format, args);
+ }
+
+ info(...args: string[]): void {
+ hilog.info(this.domain, this.prefix, this.format, args);
+ }
+
+ warn(...args: string[]): void {
+ hilog.warn(this.domain, this.prefix, this.format, args);
+ }
+
+ error(...args: string[]): void {
+ hilog.error(this.domain, this.prefix, this.format, args);
+ }
+}
+
+export const logger = new Logger('Sample_UDMFDemo');
diff --git a/code/BasicFeature/DataManagement/UDMF/UDMFDemo/entry/src/main/module.json5 b/code/BasicFeature/DataManagement/UDMF/UDMFDemo/entry/src/main/module.json5
new file mode 100644
index 000000000..9cd5f42fd
--- /dev/null
+++ b/code/BasicFeature/DataManagement/UDMF/UDMFDemo/entry/src/main/module.json5
@@ -0,0 +1,52 @@
+/*
+ * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+{
+ "module": {
+ "name": "entry",
+ "type": "entry",
+ "description": "$string:module_desc",
+ "mainElement": "EntryAbility",
+ "deviceTypes": [
+ "default",
+ "tablet"
+ ],
+ "deliveryWithInstall": true,
+ "installationFree": false,
+ "pages": "$profile:main_pages",
+ "abilities": [
+ {
+ "name": "EntryAbility",
+ "srcEntry": "./ets/entryability/EntryAbility.ts",
+ "description": "$string:EntryAbility_desc",
+ "icon": "$media:icon",
+ "label": "$string:EntryAbility_label",
+ "startWindowIcon": "$media:startIcon",
+ "startWindowBackground": "$color:start_window_background",
+ "exported": true,
+ "skills": [
+ {
+ "entities": [
+ "entity.system.home"
+ ],
+ "actions": [
+ "action.system.home"
+ ]
+ }
+ ]
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/code/BasicFeature/DataManagement/UDMF/UDMFDemo/entry/src/main/resources/base/element/color.json b/code/BasicFeature/DataManagement/UDMF/UDMFDemo/entry/src/main/resources/base/element/color.json
new file mode 100644
index 000000000..24e9766a0
--- /dev/null
+++ b/code/BasicFeature/DataManagement/UDMF/UDMFDemo/entry/src/main/resources/base/element/color.json
@@ -0,0 +1,409 @@
+{
+ "color": [
+ {
+ "name": "white",
+ "value": "#FFFFFF"
+ },
+ {
+ "name": "white_pressed",
+ "value": "#FFE3E3E3"
+ },
+ {
+ "name": "item_pressed",
+ "value": "#4DE3E3E3"
+ },
+ {
+ "name": "black",
+ "value": "#000000"
+ },
+ {
+ "name": "font_gray",
+ "value": "#FF838383"
+ },
+ {
+ "name": "background",
+ "value": "#F1F3F5"
+ },
+ {
+ "name": "divider",
+ "value": "#FFCBCBCB"
+ },
+ {
+ "name": "text_color",
+ "value": "#5aabf9"
+ },
+ {
+ "name": "color_333333_grey",
+ "value": "#333333"
+ },
+ {
+ "name": "color_666666_grey",
+ "value": "#666666"
+ },
+ {
+ "name": "color_999999_grey",
+ "value": "#999999"
+ },
+ {
+ "name": "color_E3E3E3_grey",
+ "value": "#E3E3E3"
+ },
+ {
+ "name": "color_D8D8D8_grey",
+ "value": "#D8D8D8"
+ },
+ {
+ "name": "color_button_grey",
+ "value": "#1824310D"
+ },
+ {
+ "name": "color_00000000_transparent",
+ "value": "#00000000"
+ },
+ {
+ "name": "volume_bg_color",
+ "value": "#CCFFFFFF"
+ },
+ {
+ "name": "white_bg_color",
+ "value": "#FFFFFF"
+ },
+ {
+ "name": "font_color_182431",
+ "value": "#182431"
+ },
+ {
+ "name": "font_color_007DFF",
+ "value": "#007DFF"
+ },
+ {
+ "name": "search_no_result_text_color",
+ "value": "$color:font_color_182431"
+ },
+ {
+ "name": "search_result_text_color",
+ "value": "$color:font_color_182431"
+ },
+ {
+ "name": "search_result_text_color_highlight",
+ "value": "$color:font_color_007DFF"
+ },
+ {
+ "name": "FAFAFA",
+ "value": "#FAFAFA"
+ },
+ {
+ "name": "DCEAF9",
+ "value": "#DCEAF9"
+ },
+ {
+ "name": "ab274f",
+ "value": "#ab274f"
+ },
+ {
+ "name": "66ccff",
+ "value": "#66ccff"
+ },
+ {
+ "name": "blue",
+ "value": "#87CEFA"
+ },
+ {
+ "name": "cyan",
+ "value": "#E1FFFF"
+ },
+ {
+ "name": "spring",
+ "value": "#F5FFFA"
+ },
+ {
+ "name": "red",
+ "value": "#DC143C"
+ },
+ {
+ "name": "yellow",
+ "value": "#D9B612"
+ },
+ {
+ "name": "lightyellow",
+ "value": "#F3F143"
+ },
+ {
+ "name": "green",
+ "value": "#549688"
+ },
+ {
+ "name": "moon",
+ "value": "#D7ECF1"
+ },
+ {
+ "name": "frost",
+ "value": "#E9F0F6"
+ },
+ {
+ "name": "water",
+ "value": "#D4F2E8"
+ },
+ {
+ "name": "lead",
+ "value": "#F0EFF4"
+ },
+ {
+ "name": "index_background",
+ "value": "#F1F3F5"
+ },
+ {
+ "name": "title_black_color",
+ "value": "#182431"
+ },
+ {
+ "name": "main_blue",
+ "value": "#007DFF"
+ },
+ {
+ "name": "main_red",
+ "value": "#E84026"
+ },
+ {
+ "name": "button_background",
+ "value": "#0D182431"
+ },
+ {
+ "name": "edit_blue",
+ "value": "#1A007DFF"
+ },
+ {
+ "name": "dialog_progress",
+ "value": "#4D4D4D"
+ },
+ {
+ "name": "start_window_background",
+ "value": "#FFFFFF"
+ },
+ {
+ "name": "custom_button_color",
+ "value": "#E8E7EB"
+ },
+ {
+ "name": "input_background",
+ "value": "#0D182431"
+ },
+ {
+ "name": "bottom_title_divider",
+ "value": "#99838388"
+ },
+ {
+ "name": "tab_bar_divider",
+ "value": "#33182431"
+ },
+ {
+ "name": "font_color_shallow",
+ "value": "#182431"
+ },
+ {
+ "name": "font_color_dark",
+ "value": "#000000"
+ },
+ {
+ "name": "font_color_red",
+ "value": "#FFD22C2C"
+ },
+ {
+ "name": "tab_bar_select",
+ "value": "#007DFF"
+ },
+ {
+ "name": "tab_bar_unselect",
+ "value": "#66182431"
+ },
+ {
+ "name": "background_shallow_grey",
+ "value": "#F1F3F5"
+ },
+ {
+ "name": "background_dark",
+ "value": "#FF000000"
+ },
+ {
+ "name": "background_grey",
+ "value": "#0d000000"
+ },
+ {
+ "name": "background_orange",
+ "value": "#E6A23C"
+ },
+ {
+ "name": "background_pink",
+ "value": "#F56C6C"
+ },
+ {
+ "name": "background_blue",
+ "value": "#409EFF"
+ },
+ {
+ "name": "background_green",
+ "value": "#67C23A"
+ },
+ {
+ "name": "pop_up_background",
+ "value": "#0D182431"
+ },
+ {
+ "name": "button_custom_color",
+ "value": "#80FF7500"
+ },
+ {
+ "name": "button_default_bg_color",
+ "value": "#007DFF"
+ },
+ {
+ "name": "divider_block_color",
+ "value": "#1A838388"
+ },
+ {
+ "name": "curve_normal",
+ "value": "#3F56EA"
+ },
+ {
+ "name": "curve_bezier",
+ "value": "#00BFC9"
+ },
+ {
+ "name": "curve_spring",
+ "value": "#BCD600"
+ },
+ {
+ "name": "curve_init",
+ "value": "#E40078"
+ },
+ {
+ "name": "curve_steps",
+ "value": "#FF7500"
+ },
+ {
+ "name": "radio_response_region_color",
+ "value": "#66ffc0cb"
+ },
+ {
+ "name": "select_option_bg_color",
+ "value": "#33007DFF"
+ },
+ {
+ "name": "select_option_font_color",
+ "value": "#FF007DFF"
+ },
+ {
+ "name": "toggle_selected_color",
+ "value": "#4D00BFC9"
+ },
+ {
+ "name": "background_light_gray",
+ "value": "#f1f3f5"
+ },
+ {
+ "name": "sub_title_color",
+ "value": "#182431"
+ },
+ {
+ "name": "title_colorone",
+ "value": "#0A59F7"
+ },
+ {
+ "name": "title_colortwo",
+ "value": "#000000"
+ },
+ {
+ "name": "scrollbar_background_color",
+ "value": "#ededed"
+ },
+ {
+ "name": "contentArea_background_color",
+ "value": "#C0C0C0"
+ },
+ {
+ "name": "normal_bg_color",
+ "value": "#0A59F7"
+ },
+ {
+ "name": "btn_border_color",
+ "value": "#33000000"
+ },
+ {
+ "name": "3D_background_color",
+ "value": "#F9BC64"
+ },
+ {
+ "name": "3D_top_left_color",
+ "value": "#FED599"
+ },
+ {
+ "name": "3D_right_buttom_color",
+ "value": "#D69942"
+ },
+ {
+ "name": "btn_one_color",
+ "value": "#FFC0CB"
+ },
+ {
+ "name": "btn_two_color",
+ "value": "#87CEFA"
+ },
+ {
+ "name": "btn_three_color",
+ "value": "#90EE90"
+ },
+ {
+ "name": "btn_onFocus_color",
+ "value": "#FF0000"
+ },
+ {
+ "name": "focus_on_background",
+ "value": "#007DFE"
+ },
+ {
+ "name": "COLOR_80000000",
+ "value": "#80000000"
+ },
+ {
+ "name": "COLOR_FFFFFF",
+ "value": "#FFFFFF"
+ },
+ {
+ "name": "COLOR_8C9BA2",
+ "value": "#8C9BA2"
+ },
+ {
+ "name": "COLOR_99FFFFFF",
+ "value": "#99ffffff"
+ },
+ {
+ "name": "canvas_background",
+ "value": "#ffff00"
+ },
+ {
+ "name": "canvas_normal_button_bg",
+ "value": "#317aff"
+ },
+ {
+ "name": "canvas_clear_button_bg",
+ "value": "#ffff7300"
+ },
+ {
+ "name": "canvas_bg_color",
+ "value": "#00ffff"
+ },
+ {
+ "name": "scroll_to_button_color",
+ "value": "#ff55c6f5"
+ },
+ {
+ "name": "scroll_item_color",
+ "value": "#ff2a78db"
+ },
+ {
+ "name": "scroll_grid_item_color",
+ "value": "#F9CF93"
+ }
+
+ ]
+}
\ No newline at end of file
diff --git a/code/BasicFeature/DataManagement/UDMF/UDMFDemo/entry/src/main/resources/base/element/string.json b/code/BasicFeature/DataManagement/UDMF/UDMFDemo/entry/src/main/resources/base/element/string.json
new file mode 100644
index 000000000..1da191ae2
--- /dev/null
+++ b/code/BasicFeature/DataManagement/UDMF/UDMFDemo/entry/src/main/resources/base/element/string.json
@@ -0,0 +1,36 @@
+{
+ "string": [
+ {
+ "name": "module_desc",
+ "value": "module description"
+ },
+ {
+ "name": "EntryAbility_desc",
+ "value": "description"
+ },
+ {
+ "name": "EntryAbility_label",
+ "value": "UDMFDemo"
+ },
+ {
+ "name": "text_content",
+ "value": "text Content"
+ },
+ {
+ "name": "UDMF_demo",
+ "value": "UDMF"
+ },
+ {
+ "name": "text_target_content",
+ "value": "text target content"
+ },
+ {
+ "name": "text_target_tips",
+ "value": "Drag files/text here"
+ },
+ {
+ "name": "file_list",
+ "value": "file list"
+ }
+ ]
+}
\ No newline at end of file
diff --git a/code/BasicFeature/DataManagement/UDMF/UDMFDemo/entry/src/main/resources/base/media/ic_select_option_collection.png b/code/BasicFeature/DataManagement/UDMF/UDMFDemo/entry/src/main/resources/base/media/ic_select_option_collection.png
new file mode 100644
index 000000000..6167d616d
Binary files /dev/null and b/code/BasicFeature/DataManagement/UDMF/UDMFDemo/entry/src/main/resources/base/media/ic_select_option_collection.png differ
diff --git a/code/BasicFeature/DataManagement/UDMF/UDMFDemo/entry/src/main/resources/base/media/icon.png b/code/BasicFeature/DataManagement/UDMF/UDMFDemo/entry/src/main/resources/base/media/icon.png
new file mode 100644
index 000000000..cd45accb1
Binary files /dev/null and b/code/BasicFeature/DataManagement/UDMF/UDMFDemo/entry/src/main/resources/base/media/icon.png differ
diff --git a/code/BasicFeature/DataManagement/UDMF/UDMFDemo/entry/src/main/resources/base/media/startIcon.png b/code/BasicFeature/DataManagement/UDMF/UDMFDemo/entry/src/main/resources/base/media/startIcon.png
new file mode 100644
index 000000000..366f76459
Binary files /dev/null and b/code/BasicFeature/DataManagement/UDMF/UDMFDemo/entry/src/main/resources/base/media/startIcon.png differ
diff --git a/code/SystemFeature/InsightIntent/IntentDriver/entry/src/main/resources/base/profile/main_pages.json b/code/BasicFeature/DataManagement/UDMF/UDMFDemo/entry/src/main/resources/base/profile/main_pages.json
similarity index 94%
rename from code/SystemFeature/InsightIntent/IntentDriver/entry/src/main/resources/base/profile/main_pages.json
rename to code/BasicFeature/DataManagement/UDMF/UDMFDemo/entry/src/main/resources/base/profile/main_pages.json
index 55c3f007f..1898d94f5 100644
--- a/code/SystemFeature/InsightIntent/IntentDriver/entry/src/main/resources/base/profile/main_pages.json
+++ b/code/BasicFeature/DataManagement/UDMF/UDMFDemo/entry/src/main/resources/base/profile/main_pages.json
@@ -2,4 +2,4 @@
"src": [
"pages/Index"
]
-}
\ No newline at end of file
+}
diff --git a/code/BasicFeature/DataManagement/UDMF/UDMFDemo/entry/src/main/resources/en_US/element/string.json b/code/BasicFeature/DataManagement/UDMF/UDMFDemo/entry/src/main/resources/en_US/element/string.json
new file mode 100644
index 000000000..1da191ae2
--- /dev/null
+++ b/code/BasicFeature/DataManagement/UDMF/UDMFDemo/entry/src/main/resources/en_US/element/string.json
@@ -0,0 +1,36 @@
+{
+ "string": [
+ {
+ "name": "module_desc",
+ "value": "module description"
+ },
+ {
+ "name": "EntryAbility_desc",
+ "value": "description"
+ },
+ {
+ "name": "EntryAbility_label",
+ "value": "UDMFDemo"
+ },
+ {
+ "name": "text_content",
+ "value": "text Content"
+ },
+ {
+ "name": "UDMF_demo",
+ "value": "UDMF"
+ },
+ {
+ "name": "text_target_content",
+ "value": "text target content"
+ },
+ {
+ "name": "text_target_tips",
+ "value": "Drag files/text here"
+ },
+ {
+ "name": "file_list",
+ "value": "file list"
+ }
+ ]
+}
\ No newline at end of file
diff --git a/code/BasicFeature/DataManagement/UDMF/UDMFDemo/entry/src/main/resources/zh_CN/element/string.json b/code/BasicFeature/DataManagement/UDMF/UDMFDemo/entry/src/main/resources/zh_CN/element/string.json
new file mode 100644
index 000000000..857d96fdc
--- /dev/null
+++ b/code/BasicFeature/DataManagement/UDMF/UDMFDemo/entry/src/main/resources/zh_CN/element/string.json
@@ -0,0 +1,36 @@
+{
+ "string": [
+ {
+ "name": "module_desc",
+ "value": "模块描述"
+ },
+ {
+ "name": "EntryAbility_desc",
+ "value": "description"
+ },
+ {
+ "name": "EntryAbility_label",
+ "value": "UDMFDemo"
+ },
+ {
+ "name": "text_content",
+ "value": "文本呈现区域"
+ },
+ {
+ "name": "file_list",
+ "value": "文件呈现区域"
+ },
+ {
+ "name": "UDMF_demo",
+ "value": "UDMF"
+ },
+ {
+ "name": "text_target_content",
+ "value": "目的文本"
+ },
+ {
+ "name": "text_target_tips",
+ "value": "将文件/文本拖入此处"
+ }
+ ]
+}
\ No newline at end of file
diff --git a/code/BasicFeature/DataManagement/UDMF/UDMFDemo/entry/src/ohosTest/ets/test/Ability.test.ets b/code/BasicFeature/DataManagement/UDMF/UDMFDemo/entry/src/ohosTest/ets/test/Ability.test.ets
new file mode 100644
index 000000000..a3dce83d0
--- /dev/null
+++ b/code/BasicFeature/DataManagement/UDMF/UDMFDemo/entry/src/ohosTest/ets/test/Ability.test.ets
@@ -0,0 +1,184 @@
+/*
+ * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import hilog from '@ohos.hilog';
+import { describe, it, expect } from '@ohos/hypium';
+import { Driver, ON, MatchPattern } from '@ohos.UiTest';
+import AbilityDelegatorRegistry from '@ohos.app.ability.abilityDelegatorRegistry';
+import { logger } from '../../../main/ets/util/Logger';
+
+const TAG = '[Sample_UDMFDemo]';
+const DOMAIN = 0xF811;
+const BUNDLE = 'UDMFDemo_';
+
+export default function abilityTest() {
+ describe('UDMFDemo', () => {
+ /**
+ * @tc.number UDMFDemo_StartAbilityFunction_001
+ * @tc.name UDMFDemo_StartAbilityFunction_001
+ * @tc.desc Test start ability.
+ * @tc.size MEDIUM
+ * @tc.type Function
+ * @tc.level Level 0
+ * @tc.require
+ */
+ it('UDMFDemo_StartAbilityFunction_001', 0, async () => {
+ hilog.info(DOMAIN, TAG, BUNDLE + 'StartAbilityFunction_001 begin');
+ let abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator();
+ try {
+ await abilityDelegator.startAbility({
+ bundleName: "com.example.udmfdemo",
+ abilityName: "EntryAbility"
+ });
+ } catch (err) {
+ expect(err.code).assertEqual(0);
+ }
+ hilog.info(DOMAIN, TAG, BUNDLE + 'StartAbilityFunction_001 end');
+ })
+
+ /**
+ * @tc.number UDMF_Select_001
+ * @tc.name UDMF_Select_001
+ * @tc.desc Test file select.
+ * @tc.size MEDIUM
+ * @tc.type Function
+ * @tc.level Level 0
+ * @tc.require
+ */
+ it('UDMF_Select_001', 0, async () => {
+ logger.info(TAG, 'UDMF_Select_001 begin');
+ let driver = Driver.create();
+ await driver.delayMs(1000);
+ await driver.assertComponentExist(ON.id('SelectTypeList'));
+ let btnStart = await driver.findComponent(ON.id('SelectTypeList'));
+ await btnStart.click();
+ await driver.delayMs(500);
+ await driver.click(190, 550);
+ await driver.delayMs(1000);
+
+ await driver.assertComponentExist(ON.text('test1.txt' , MatchPattern.CONTAINS));
+ let ics = await driver.findComponent(ON.text('test1.txt' , MatchPattern.CONTAINS));
+ await ics.click();
+ await driver.delayMs(500);
+
+ await driver.assertComponentExist(ON.id('textContent'));
+ let textContent = await driver.findComponent(ON.id('textContent'));
+ let inputString = await textContent.getText();
+ logger.info(TAG, 'UDMF_Select_001 inputString: ' + inputString);
+
+ expect(inputString.includes('test content 1 test content 2')).assertTrue();
+
+ await driver.assertComponentExist(ON.id('SelectTypeList'));
+ let selectStart = await driver.findComponent(ON.id('SelectTypeList'));
+ await selectStart.click();
+ await driver.delayMs(500);
+ await driver.click(170, 260);
+ await driver.delayMs(1000);
+
+ logger.info(TAG, 'UDMF_Select_001 end');
+ })
+
+ /**
+ * @tc.number UDMF_Select_002
+ * @tc.name UDMF_Select_002
+ * @tc.desc Test file select.
+ * @tc.size MEDIUM
+ * @tc.type Function
+ * @tc.level Level 0
+ * @tc.require
+ */
+ it('UDMF_Select_002', 0, async () => {
+ logger.info(TAG, 'UDMF_Select_002 begin');
+ let driver = Driver.create();
+ await driver.delayMs(1000);
+ await driver.assertComponentExist(ON.id('SelectTypeList'));
+ let btnStart = await driver.findComponent(ON.id('SelectTypeList'));
+ await btnStart.click();
+ await driver.delayMs(500);
+ await driver.click(250, 700);
+ await driver.delayMs(1000);
+
+ await driver.assertComponentExist(ON.text('ics' , MatchPattern.CONTAINS));
+ let ics = await driver.findComponent(ON.text('ics' , MatchPattern.CONTAINS));
+ expect(ics != null ).assertTrue();
+
+ await driver.assertComponentExist(ON.id('SelectTypeList'));
+ let selectStart = await driver.findComponent(ON.id('SelectTypeList'));
+ await selectStart.click();
+ await driver.delayMs(500);
+ await driver.click(170, 260);
+ await driver.delayMs(1000);
+ logger.info(TAG, 'UDMF_Select_002 end');
+ })
+
+ /**
+ * @tc.number UDMF_Drag_001
+ * @tc.name UDMF_Drag_001
+ * @tc.desc Test file drag.
+ * @tc.size MEDIUM
+ * @tc.type Function
+ * @tc.level Level 0
+ * @tc.require
+ */
+ it('UDMF_Drag_001', 0, async () => {
+ logger.info(TAG, 'UDMF_Drag_001 begin');
+ let driver = Driver.create();
+ await driver.delayMs(1000);
+
+ await driver.assertComponentExist(ON.id('targetText'));
+ let textTarget = await driver.findComponent(ON.id('targetText'));
+ await driver.delayMs(500);
+
+ await driver.drag(100, 320, 430, 180);
+ await driver.delayMs(1000);
+
+ let result = await textTarget.getText();
+ expect(result.includes('Save as')).assertTrue();
+ logger.info(TAG, 'UDMF_Drag_001 end');
+ })
+
+ /**
+ * @tc.number UDMF_Drag_002
+ * @tc.name UDMF_Drag_002
+ * @tc.desc Test text Drag.
+ * @tc.size MEDIUM
+ * @tc.type Function
+ * @tc.level Level 0
+ * @tc.require
+ */
+ it('UDMF_Drag_002', 0, async () => {
+ logger.info(TAG, 'UDMF_Drag_002 begin');
+ let driver = Driver.create();
+ await driver.delayMs(1000);
+
+ logger.info(TAG, 'UDMF_Drag_002 aa');
+ await driver.assertComponentExist(ON.id('targetText'));
+ let textTarget = await driver.findComponent(ON.id('targetText'));
+
+ logger.info(TAG, 'UDMF_Drag_002 bb');
+ await driver.delayMs(500);
+
+ await driver.click(100, 320);
+ await driver.delayMs(500);
+
+ await driver.drag(350, 740, 430, 180);
+ await driver.delayMs(1000);
+
+ let result = await textTarget.getText();
+ expect(result.includes('Content save as')).assertTrue();
+ logger.info(TAG, 'UDMF_Drag_002 end');
+ })
+ })
+}
\ No newline at end of file
diff --git a/code/BasicFeature/DataManagement/UDMF/UDMFDemo/entry/src/ohosTest/ets/test/List.test.ets b/code/BasicFeature/DataManagement/UDMF/UDMFDemo/entry/src/ohosTest/ets/test/List.test.ets
new file mode 100644
index 000000000..794c7dc4e
--- /dev/null
+++ b/code/BasicFeature/DataManagement/UDMF/UDMFDemo/entry/src/ohosTest/ets/test/List.test.ets
@@ -0,0 +1,5 @@
+import abilityTest from './Ability.test';
+
+export default function testsuite() {
+ abilityTest();
+}
\ No newline at end of file
diff --git a/code/BasicFeature/DataManagement/UDMF/UDMFDemo/entry/src/ohosTest/ets/testability/TestAbility.ets b/code/BasicFeature/DataManagement/UDMF/UDMFDemo/entry/src/ohosTest/ets/testability/TestAbility.ets
new file mode 100644
index 000000000..b4c21f7df
--- /dev/null
+++ b/code/BasicFeature/DataManagement/UDMF/UDMFDemo/entry/src/ohosTest/ets/testability/TestAbility.ets
@@ -0,0 +1,64 @@
+/*
+ * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import UIAbility from '@ohos.app.ability.UIAbility';
+import AbilityDelegatorRegistry from '@ohos.app.ability.abilityDelegatorRegistry';
+import hilog from '@ohos.hilog';
+import { Hypium } from '@ohos/hypium';
+import testsuite from '../test/List.test';
+import window from '@ohos.window';
+import Want from '@ohos.app.ability.Want';
+import AbilityConstant from '@ohos.app.ability.AbilityConstant';
+
+export default class TestAbility extends UIAbility {
+ onCreate(want: Want, launchParam: AbilityConstant.LaunchParam) {
+ hilog.info(0x0000, 'testTag', '%{public}s', 'TestAbility onCreate');
+ hilog.info(0x0000, 'testTag', '%{public}s', 'want param:' + JSON.stringify(want) ?? '');
+ hilog.info(0x0000, 'testTag', '%{public}s', 'launchParam:' + JSON.stringify(launchParam) ?? '');
+ let abilityDelegator: AbilityDelegatorRegistry.AbilityDelegator;
+ abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator();
+ let abilityDelegatorArguments: AbilityDelegatorRegistry.AbilityDelegatorArgs;
+ abilityDelegatorArguments = AbilityDelegatorRegistry.getArguments();
+ hilog.info(0x0000, 'testTag', '%{public}s', 'start run testcase!!!');
+ Hypium.hypiumTest(abilityDelegator, abilityDelegatorArguments, testsuite);
+ }
+
+ onDestroy() {
+ hilog.info(0x0000, 'testTag', '%{public}s', 'TestAbility onDestroy');
+ }
+
+ onWindowStageCreate(windowStage: window.WindowStage) {
+ hilog.info(0x0000, 'testTag', '%{public}s', 'TestAbility onWindowStageCreate');
+ windowStage.loadContent('testability/pages/Index', (err) => {
+ if (err.code) {
+ hilog.error(0x0000, 'testTag', 'Failed to load the content. Cause: %{public}s', JSON.stringify(err) ?? '');
+ return;
+ }
+ hilog.info(0x0000, 'testTag', 'Succeeded in loading the content.');
+ });
+ }
+
+ onWindowStageDestroy() {
+ hilog.info(0x0000, 'testTag', '%{public}s', 'TestAbility onWindowStageDestroy');
+ }
+
+ onForeground() {
+ hilog.info(0x0000, 'testTag', '%{public}s', 'TestAbility onForeground');
+ }
+
+ onBackground() {
+ hilog.info(0x0000, 'testTag', '%{public}s', 'TestAbility onBackground');
+ }
+}
\ No newline at end of file
diff --git a/code/BasicFeature/DataManagement/UDMF/UDMFDemo/entry/src/ohosTest/ets/testability/pages/Index.ets b/code/BasicFeature/DataManagement/UDMF/UDMFDemo/entry/src/ohosTest/ets/testability/pages/Index.ets
new file mode 100644
index 000000000..423b4276e
--- /dev/null
+++ b/code/BasicFeature/DataManagement/UDMF/UDMFDemo/entry/src/ohosTest/ets/testability/pages/Index.ets
@@ -0,0 +1,17 @@
+@Entry
+@Component
+struct Index {
+ @State message: string = 'Hello World';
+
+ build() {
+ Row() {
+ Column() {
+ Text(this.message)
+ .fontSize(50)
+ .fontWeight(FontWeight.Bold)
+ }
+ .width('100%')
+ }
+ .height('100%')
+ }
+}
\ No newline at end of file
diff --git a/code/BasicFeature/DataManagement/UDMF/UDMFDemo/entry/src/ohosTest/ets/testrunner/OpenHarmonyTestRunner.ts b/code/BasicFeature/DataManagement/UDMF/UDMFDemo/entry/src/ohosTest/ets/testrunner/OpenHarmonyTestRunner.ts
new file mode 100644
index 000000000..1dc6aa987
--- /dev/null
+++ b/code/BasicFeature/DataManagement/UDMF/UDMFDemo/entry/src/ohosTest/ets/testrunner/OpenHarmonyTestRunner.ts
@@ -0,0 +1,65 @@
+/*
+ * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import hilog from '@ohos.hilog';
+import TestRunner from '@ohos.application.testRunner';
+import AbilityDelegatorRegistry from '@ohos.app.ability.abilityDelegatorRegistry';
+import Want from '@ohos.app.ability.Want';
+
+let abilityDelegator: AbilityDelegatorRegistry.AbilityDelegator | undefined = undefined
+let abilityDelegatorArguments: AbilityDelegatorRegistry.AbilityDelegatorArgs | undefined = undefined
+
+async function onAbilityCreateCallback() {
+ hilog.info(0x0000, 'testTag', '%{public}s', 'onAbilityCreateCallback');
+}
+
+async function addAbilityMonitorCallback(err : Error) {
+ hilog.info(0x0000, 'testTag', 'addAbilityMonitorCallback : %{public}s', JSON.stringify(err) ?? '');
+}
+
+export default class OpenHarmonyTestRunner implements TestRunner {
+ constructor() {
+ }
+
+ onPrepare() {
+ hilog.info(0x0000, 'testTag', '%{public}s', 'OpenHarmonyTestRunner OnPrepare ');
+ }
+
+ async onRun() {
+ hilog.info(0x0000, 'testTag', '%{public}s', 'OpenHarmonyTestRunner onRun run');
+ abilityDelegatorArguments = AbilityDelegatorRegistry.getArguments()
+ abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator()
+ const bundleName = abilityDelegatorArguments.bundleName;
+ const testAbilityName = 'TestAbility';
+ const moduleName = abilityDelegatorArguments.parameters['-m'];
+ let lMonitor: AbilityDelegatorRegistry.AbilityMonitor = {
+ abilityName: testAbilityName,
+ onAbilityCreate: onAbilityCreateCallback,
+ moduleName: moduleName
+ };
+ abilityDelegator.addAbilityMonitor(lMonitor, addAbilityMonitorCallback)
+ const want: Want = {
+ bundleName: bundleName,
+ abilityName: testAbilityName,
+ moduleName: moduleName
+ };
+ abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator();
+ abilityDelegator.startAbility(want, (err, data) => {
+ hilog.info(0x0000, 'testTag', 'startAbility : err : %{public}s', JSON.stringify(err) ?? '');
+ hilog.info(0x0000, 'testTag', 'startAbility : data : %{public}s',JSON.stringify(data) ?? '');
+ })
+ hilog.info(0x0000, 'testTag', '%{public}s', 'OpenHarmonyTestRunner onRun end');
+ }
+}
\ No newline at end of file
diff --git a/code/BasicFeature/DataManagement/UDMF/UDMFDemo/entry/src/ohosTest/module.json5 b/code/BasicFeature/DataManagement/UDMF/UDMFDemo/entry/src/ohosTest/module.json5
new file mode 100644
index 000000000..a7a10fedd
--- /dev/null
+++ b/code/BasicFeature/DataManagement/UDMF/UDMFDemo/entry/src/ohosTest/module.json5
@@ -0,0 +1,52 @@
+/*
+ * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+{
+ "module": {
+ "name": "entry_test",
+ "type": "feature",
+ "description": "$string:module_test_desc",
+ "mainElement": "TestAbility",
+ "deviceTypes": [
+ "default",
+ "tablet"
+ ],
+ "deliveryWithInstall": true,
+ "installationFree": false,
+ "pages": "$profile:test_pages",
+ "abilities": [
+ {
+ "name": "TestAbility",
+ "srcEntry": "./ets/testability/TestAbility.ets",
+ "description": "$string:TestAbility_desc",
+ "icon": "$media:icon",
+ "label": "$string:TestAbility_label",
+ "exported": true,
+ "startWindowIcon": "$media:icon",
+ "startWindowBackground": "$color:start_window_background",
+ "skills": [
+ {
+ "actions": [
+ "action.system.home"
+ ],
+ "entities": [
+ "entity.system.home"
+ ]
+ }
+ ]
+ }
+ ]
+ }
+}
diff --git a/code/SystemFeature/InsightIntent/IntentDriver/entry/src/ohosTest/resources/base/element/color.json b/code/BasicFeature/DataManagement/UDMF/UDMFDemo/entry/src/ohosTest/resources/base/element/color.json
similarity index 100%
rename from code/SystemFeature/InsightIntent/IntentDriver/entry/src/ohosTest/resources/base/element/color.json
rename to code/BasicFeature/DataManagement/UDMF/UDMFDemo/entry/src/ohosTest/resources/base/element/color.json
diff --git a/code/SystemFeature/InsightIntent/IntentDriver/entry/src/ohosTest/resources/base/element/string.json b/code/BasicFeature/DataManagement/UDMF/UDMFDemo/entry/src/ohosTest/resources/base/element/string.json
similarity index 100%
rename from code/SystemFeature/InsightIntent/IntentDriver/entry/src/ohosTest/resources/base/element/string.json
rename to code/BasicFeature/DataManagement/UDMF/UDMFDemo/entry/src/ohosTest/resources/base/element/string.json
diff --git a/code/BasicFeature/DataManagement/UDMF/UDMFDemo/entry/src/ohosTest/resources/base/media/icon.png b/code/BasicFeature/DataManagement/UDMF/UDMFDemo/entry/src/ohosTest/resources/base/media/icon.png
new file mode 100644
index 000000000..cd45accb1
Binary files /dev/null and b/code/BasicFeature/DataManagement/UDMF/UDMFDemo/entry/src/ohosTest/resources/base/media/icon.png differ
diff --git a/code/SystemFeature/InsightIntent/IntentDriver/entry/src/ohosTest/resources/base/profile/test_pages.json b/code/BasicFeature/DataManagement/UDMF/UDMFDemo/entry/src/ohosTest/resources/base/profile/test_pages.json
similarity index 100%
rename from code/SystemFeature/InsightIntent/IntentDriver/entry/src/ohosTest/resources/base/profile/test_pages.json
rename to code/BasicFeature/DataManagement/UDMF/UDMFDemo/entry/src/ohosTest/resources/base/profile/test_pages.json
diff --git a/code/BasicFeature/DataManagement/UDMF/UDMFDemo/hvigor/hvigor-config.json5 b/code/BasicFeature/DataManagement/UDMF/UDMFDemo/hvigor/hvigor-config.json5
new file mode 100644
index 000000000..721a37b2b
--- /dev/null
+++ b/code/BasicFeature/DataManagement/UDMF/UDMFDemo/hvigor/hvigor-config.json5
@@ -0,0 +1,22 @@
+{
+ "hvigorVersion": "3.2.4",
+ "dependencies": {
+ "@ohos/hvigor-ohos-plugin": "3.2.4"
+ },
+ "execution": {
+ // "analyze": "default", /* Define the build analyze mode. Value: [ "default" | "verbose" | false ]. Default: "default" */
+ // "daemon": true, /* Enable daemon compilation. Value: [ true | false ]. Default: true */
+ // "incremental": true, /* Enable incremental compilation. Value: [ true | false ]. Default: true */
+ // "parallel": true, /* Enable parallel compilation. Value: [ true | false ]. Default: true */
+ // "typeCheck": false, /* Enable typeCheck. Value: [ true | false ]. Default: false */
+ },
+ "logging": {
+ // "level": "info" /* Define the log level. Value: [ "debug" | "info" | "warn" | "error" ]. Default: "info" */
+ },
+ "debugging": {
+ // "stacktrace": false /* Disable stacktrace compilation. Value: [ true | false ]. Default: false */
+ },
+ "nodeOptions": {
+ // "maxOldSpaceSize": 4096 /* Enable nodeOptions maxOldSpaceSize compilation. Unit M. Used for the daemon process */
+ }
+}
diff --git a/code/BasicFeature/InsightIntent/IntentExecutor/hvigor/hvigor-wrapper.js b/code/BasicFeature/DataManagement/UDMF/UDMFDemo/hvigor/hvigor-wrapper.js
similarity index 100%
rename from code/BasicFeature/InsightIntent/IntentExecutor/hvigor/hvigor-wrapper.js
rename to code/BasicFeature/DataManagement/UDMF/UDMFDemo/hvigor/hvigor-wrapper.js
diff --git a/code/BasicFeature/DataManagement/UDMF/UDMFDemo/hvigorfile.ts b/code/BasicFeature/DataManagement/UDMF/UDMFDemo/hvigorfile.ts
new file mode 100644
index 000000000..f3cb9f1a8
--- /dev/null
+++ b/code/BasicFeature/DataManagement/UDMF/UDMFDemo/hvigorfile.ts
@@ -0,0 +1,6 @@
+import { appTasks } from '@ohos/hvigor-ohos-plugin';
+
+export default {
+ system: appTasks, /* Built-in plugin of Hvigor. It cannot be modified. */
+ plugins:[] /* Custom plugin to extend the functionality of Hvigor. */
+}
diff --git a/code/BasicFeature/DataManagement/UDMF/UDMFDemo/hvigorw b/code/BasicFeature/DataManagement/UDMF/UDMFDemo/hvigorw
new file mode 100644
index 000000000..4f0aa945c
--- /dev/null
+++ b/code/BasicFeature/DataManagement/UDMF/UDMFDemo/hvigorw
@@ -0,0 +1,54 @@
+#!/bin/bash
+
+# ----------------------------------------------------------------------------
+# Hvigor startup script, version 1.0.0
+#
+# Required ENV vars:
+# ------------------
+# NODE_HOME - location of a Node home dir
+# or
+# Add /usr/local/nodejs/bin to the PATH environment variable
+# ----------------------------------------------------------------------------
+
+HVIGOR_APP_HOME="`pwd -P`"
+HVIGOR_WRAPPER_SCRIPT=${HVIGOR_APP_HOME}/hvigor/hvigor-wrapper.js
+#NODE_OPTS="--max-old-space-size=4096"
+
+fail() {
+ echo "$*"
+ exit 1
+}
+
+set_executable_node() {
+ EXECUTABLE_NODE="${NODE_HOME}/bin/node"
+ if [ -x "$EXECUTABLE_NODE" ]; then
+ return
+ fi
+
+ EXECUTABLE_NODE="${NODE_HOME}/node"
+ if [ -x "$EXECUTABLE_NODE" ]; then
+ return
+ fi
+ fail "ERROR: NODE_HOME is set to an invalid directory,check $NODE_HOME\n\nPlease set NODE_HOME in your environment to the location where your nodejs installed"
+}
+
+# Determine node to start hvigor wrapper script
+if [ -n "${NODE_HOME}" ]; then
+ set_executable_node
+else
+ EXECUTABLE_NODE="node"
+ command -v ${EXECUTABLE_NODE} &> /dev/null || fail "ERROR: NODE_HOME not set and 'node' command not found"
+fi
+
+# Check hvigor wrapper script
+if [ ! -r "$HVIGOR_WRAPPER_SCRIPT" ]; then
+ fail "ERROR: Couldn't find hvigor/hvigor-wrapper.js in ${HVIGOR_APP_HOME}"
+fi
+
+if [ -z "${NODE_OPTS}" ]; then
+ NODE_OPTS="--"
+fi
+
+# start hvigor-wrapper script
+exec "${EXECUTABLE_NODE}" "${NODE_OPTS}" \
+ "${HVIGOR_WRAPPER_SCRIPT}" "$@"
diff --git a/code/BasicFeature/DataManagement/UDMF/UDMFDemo/hvigorw.bat b/code/BasicFeature/DataManagement/UDMF/UDMFDemo/hvigorw.bat
new file mode 100644
index 000000000..b5eecf5a1
--- /dev/null
+++ b/code/BasicFeature/DataManagement/UDMF/UDMFDemo/hvigorw.bat
@@ -0,0 +1,54 @@
+@rem
+@rem ----------------------------------------------------------------------------
+@rem Hvigor startup script for Windows, version 1.0.0
+@rem
+@rem Required ENV vars:
+@rem ------------------
+@rem NODE_HOME - location of a Node home dir
+@rem or
+@rem Add %NODE_HOME%/bin to the PATH environment variable
+@rem ----------------------------------------------------------------------------
+@rem
+@echo off
+
+@rem Set local scope for the variables with windows NT shell
+if "%OS%"=="Windows_NT" setlocal
+
+set DIRNAME=%~dp0
+if "%DIRNAME%" == "" set DIRNAME=.
+set APP_BASE_NAME=%~n0
+set APP_HOME=%DIRNAME%
+
+set WRAPPER_MODULE_PATH=%APP_HOME%\hvigor\hvigor-wrapper.js
+set NODE_EXE=node.exe
+@rem set NODE_OPTS="--max-old-space-size=4096"
+
+@rem Resolve any "." and ".." in APP_HOME to make it shorter.
+for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
+
+if not defined NODE_OPTS set NODE_OPTS="--"
+
+@rem Find node.exe
+if defined NODE_HOME (
+ set NODE_HOME=%NODE_HOME:"=%
+ set NODE_EXE_PATH=%NODE_HOME%/%NODE_EXE%
+)
+
+%NODE_EXE% --version >NUL 2>&1
+if "%ERRORLEVEL%" == "0" (
+ "%NODE_EXE%" "%NODE_OPTS%" "%WRAPPER_MODULE_PATH%" %*
+) else if exist "%NODE_EXE_PATH%" (
+ "%NODE_EXE%" "%NODE_OPTS%" "%WRAPPER_MODULE_PATH%" %*
+) else (
+ echo.
+ echo ERROR: NODE_HOME is not set and no 'node' command could be found in your PATH.
+ echo.
+ echo Please set the NODE_HOME variable in your environment to match the
+ echo location of your NodeJs installation.
+)
+
+if "%ERRORLEVEL%" == "0" (
+ if "%OS%" == "Windows_NT" endlocal
+) else (
+ exit /b %ERRORLEVEL%
+)
\ No newline at end of file
diff --git a/code/BasicFeature/DataManagement/UDMF/UDMFDemo/oh-package.json5 b/code/BasicFeature/DataManagement/UDMF/UDMFDemo/oh-package.json5
new file mode 100644
index 000000000..f041c1734
--- /dev/null
+++ b/code/BasicFeature/DataManagement/UDMF/UDMFDemo/oh-package.json5
@@ -0,0 +1,13 @@
+{
+ "name": "udmfdemo",
+ "version": "1.0.0",
+ "description": "Please describe the basic information.",
+ "main": "",
+ "author": "",
+ "license": "",
+ "dependencies": {
+ },
+ "devDependencies": {
+ "@ohos/hypium": "1.0.13"
+ }
+}
diff --git a/code/BasicFeature/DataManagement/UDMF/UDMFDemo/ohosTest.md b/code/BasicFeature/DataManagement/UDMF/UDMFDemo/ohosTest.md
new file mode 100644
index 000000000..aee9c543b
--- /dev/null
+++ b/code/BasicFeature/DataManagement/UDMF/UDMFDemo/ohosTest.md
@@ -0,0 +1,11 @@
+# UDMF Demo 测试用例归档
+
+## 用例表
+
+| 测试功能 | 预置条件 | 输入 | 预期输出 |测试结果|
+|-------------|------------------------|---------------------------|---------------------|--------------------------------|
+| 打开应用 | 设备中存在主题应用 | 拉起应用 | 应用启动成功 |Pass|
+| 筛选日历数据类型 | 应用启动成功 | 下拉框选择'Calendar' | 文件呈现区域显示应用沙箱内所有日历文件 |Pass|
+| 筛选文本数据类型并展示 | 应用启动成功 | 下拉框选择'Text',点击文件呈现区域的文本文件 | 文本呈现区域显示过滤出的文本内容 |Pass|
+| 拖拽文件 | 应用启动成功 | 拖拽文件列表中的txt类型文件到右上角的文本控件区域 | 被拖拽的文件会被另存为新的文件 |Pass|
+| 拖拽文本 | 打开txt后缀的文件,内容显示在文本呈现区域 | 在“文本呈现区域”右边长按拖拽到右上角的文本控件区域 | 被拖拽的文本会被另存为新的文件 |Pass|
diff --git a/code/BasicFeature/DataManagement/UDMF/UDMFDemo/screenshots/drag.png b/code/BasicFeature/DataManagement/UDMF/UDMFDemo/screenshots/drag.png
new file mode 100644
index 000000000..930eae8a0
Binary files /dev/null and b/code/BasicFeature/DataManagement/UDMF/UDMFDemo/screenshots/drag.png differ
diff --git a/code/BasicFeature/DataManagement/UDMF/UDMFDemo/screenshots/first.png b/code/BasicFeature/DataManagement/UDMF/UDMFDemo/screenshots/first.png
new file mode 100644
index 000000000..dfbe1838e
Binary files /dev/null and b/code/BasicFeature/DataManagement/UDMF/UDMFDemo/screenshots/first.png differ
diff --git a/code/BasicFeature/DataManagement/UDMF/UDMFDemo/screenshots/select.png b/code/BasicFeature/DataManagement/UDMF/UDMFDemo/screenshots/select.png
new file mode 100644
index 000000000..fcd9b06c6
Binary files /dev/null and b/code/BasicFeature/DataManagement/UDMF/UDMFDemo/screenshots/select.png differ
diff --git a/code/BasicFeature/DataManagement/pasteboard/entry/src/main/ets/pages/Index.ets b/code/BasicFeature/DataManagement/pasteboard/entry/src/main/ets/pages/Index.ets
index 38ab0fca0..a0f40a5db 100644
--- a/code/BasicFeature/DataManagement/pasteboard/entry/src/main/ets/pages/Index.ets
+++ b/code/BasicFeature/DataManagement/pasteboard/entry/src/main/ets/pages/Index.ets
@@ -179,10 +179,9 @@ struct Index {
.onClick(() => {
// 粘贴类型过滤,仅跨设备文本
let systemPasteboard: pasteboard.SystemPasteboard = pasteboard.getSystemPasteboard();
- let result: boolean = systemPasteboard.isRemoteData();
- if (result) {
- let systemPasteboard: pasteboard.SystemPasteboard = pasteboard.getSystemPasteboard();
- systemPasteboard.getUnifiedData().then((data) => {
+ systemPasteboard.getUnifiedData().then((data) => {
+ let result: boolean = systemPasteboard.isRemoteData();
+ if (result) {
let records = data.getRecords();
for (let j = 0; j < records.length; j++) {
if (records[j].getType() === uniformTypeDescriptor.UniformDataType.PLAIN_TEXT) {
@@ -191,12 +190,13 @@ struct Index {
this.addLog('Button_device_paste' + `${j + 1}.${text.textContent}`);
}
}
- }).catch((err: BusinessError) => {
- this.addLog('Failed to get UnifiedData. Cause: ' + err.message);
- });
- } else {
- this.addLog('Check isRemoteData DataType fail!');
- }
+ } else {
+ this.addLog('Check isRemoteData DataType fail!');
+ return;
+ }
+ }).catch((err: BusinessError) => {
+ this.addLog('Failed to get UnifiedData. Cause: ' + err.message);
+ });
})
}
.margin({left:12, right:12})
diff --git a/code/BasicFeature/DataManagement/pasteboard/entry/src/ohosTest/ets/test/Ability.test.ets b/code/BasicFeature/DataManagement/pasteboard/entry/src/ohosTest/ets/test/Ability.test.ets
index 7d2c9e6e6..c7e9ce2e0 100644
--- a/code/BasicFeature/DataManagement/pasteboard/entry/src/ohosTest/ets/test/Ability.test.ets
+++ b/code/BasicFeature/DataManagement/pasteboard/entry/src/ohosTest/ets/test/Ability.test.ets
@@ -67,17 +67,12 @@ export default function abilityTest() {
hilog.info(DOMAIN, TAG, BUNDLE + 'copy_001 begin');
let driver = await Driver.create();
await driver.delayMs(1000);
- await driver.assertComponentExist(ON.id('pasteText'));
- let inputTextArea = await driver.findComponent(ON.id('pasteText'));
+ await driver.assertComponentExist(ON.id('copyText'));
+ let inputTextArea = await driver.findComponent(ON.id('copyText'));
await inputTextArea.click();
await inputTextArea.clearText();
- await driver.delayMs(1000);
- await driver.assertComponentExist(ON.text('a', MatchPattern.CONTAINS));
- let inputTextA = await driver.findComponent(ON.text('a', MatchPattern.CONTAINS));
- await inputTextA.click();
-
- await driver.delayMs(1000);
+ await driver.delayMs(2000);
await driver.assertComponentExist(ON.text('b', MatchPattern.CONTAINS));
let inputTextB = await driver.findComponent(ON.text('b', MatchPattern.CONTAINS));
await inputTextB.click();
@@ -114,7 +109,7 @@ export default function abilityTest() {
await driver.assertComponentExist(ON.id('pasteText'));
let inputTextArea = await driver.findComponent(ON.id('pasteText'));
let inputString = await inputTextArea.getText();
- expect(inputString === 'abc').assertTrue();
+ expect(inputString === 'bc').assertTrue();
await driver.delayMs(200);
hilog.info(DOMAIN, TAG, BUNDLE + 'paste_001 end');
@@ -135,7 +130,7 @@ export default function abilityTest() {
let inputTextArea = await driver.findComponent(ON.id('pasteText'));
let inputString = await inputTextArea.getText();
hilog.info(DOMAIN, TAG, BUNDLE + 'paste_text_001 inputString: ' + inputString);
- expect(inputString === 'abc').assertTrue();
+ expect(inputString === 'bc').assertTrue();
await driver.delayMs(200);
hilog.info(DOMAIN, TAG, BUNDLE + 'paste_security_text_001 end');
@@ -156,7 +151,7 @@ export default function abilityTest() {
let inputTextArea = await driver.findComponent(ON.id('pasteText'));
let inputString = await inputTextArea.getText();
hilog.info(DOMAIN, TAG, BUNDLE + 'paste_text_001 inputString: ' + inputString);
- expect(inputString === 'abc').assertTrue();
+ expect(inputString === 'bc').assertTrue();
await driver.delayMs(200);
hilog.info(DOMAIN, TAG, BUNDLE + 'paste_text_001 end');
diff --git a/code/BasicFeature/InsightIntent/IntentExecutor/README_zh.md b/code/BasicFeature/InsightIntent/IntentExecutor/README_zh.md
deleted file mode 100644
index 7de68b086..000000000
--- a/code/BasicFeature/InsightIntent/IntentExecutor/README_zh.md
+++ /dev/null
@@ -1,75 +0,0 @@
-# 意图执行
-
-### 介绍
-
-本示例使用[@ohos.app.ability.InsightIntentExecutor](https://docs.openharmony.cn/pages/v4.1/zh-cn/application-dev/reference/apis-ability-kit/js-apis-app-ability-insightIntentExecutor.md)、[@ohos.app.ability.insightIntent](https://docs.openharmony.cn/pages/v4.1/zh-cn/application-dev/reference/apis-ability-kit/js-apis-app-ability-insightIntent.md)等接口,展示了意图绑定到UIAbility前台执行,主要包括构造意图配置文件、响应绑定到UIAbility前台执行的意图调用等。
-
-### 效果预览:
-
-| 主页(参照系统应用[IntentDriver](../../../SystemFeature/InsightIntent/IntentDriver)) | 意图绑定到UIAbility前台执行迁移页面 | 意图绑定到UIAbility前台执行结果 |
-| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ |
-| | | |
-
-使用说明
-
-1.启动系统应用[IntentDriver](../../../SystemFeature/InsightIntent/IntentDriver)应用后,主页面上显示两个按钮:意图绑定到UIAbility前台、意图绑定到ServiceExtension;
-
-2.点击按钮“意图绑定到UIAbility前台”,触发本应用的意图执行,并加载新的页面,返回意图调用结果通过promptAction.showToast显示在IntentDriver应用;
-
-### 工程目录
-
-```
-entry/src/main/
-├─ets
-│ ├─entryability
-│ │ └─EntryAbility.ets // UIAbility,意图绑定到该UIAbility前台执行
-│ ├─intents
-│ │ └─PlayMusicIntentExecutorImpl.ets // 通过意图调用执行基类对接端侧意图框架,实现响应意图调用的业务逻辑
-│ ├─pages
-│ │ ├─Index.ets // 主页面
-│ │ └─IntentPage.ets // 意图绑定到该UIAbility前台执行时加载的页面
-│ └─util
-│ └─Logger.ets // 日志工具
-└─resources
- └─base
- └─profile
- └─insight_intent.json // 意图配置文件
-```
-
-### 具体实现
-
-* 实现意图调用业务逻辑的功能接口封装在PlayMusicIntentExecutorImpl,源码参考:[PlayMusicIntentExecutorImpl.ets](entry/src/main/ets/intents/PlayMusicIntentExecutorImpl.ets)
- * 意图绑定到UIAbility前台运行的业务逻辑:
- 实现意图调用执行基类InsightIntentExecutor的onExecuteInUIAbilityForegroundMode()回调函数;
-* 在意图配置文件[insight_intent.json](entry/src/main/resources/base/profile/insight_intent.json)中配置应用支持的意图API列表
- * 配置内容包括:
- 意图API名称、意图API所属的垂域、意图API版本号、代码相对路径入口、执行模式等;
-* 页面[IntentPage.ets](entry/src/main/ets/pages/IntentPage.ets)是绑定到UIAbility前台运行的意图拉起的页面
-
-### 相关权限
-
-不涉及。
-
-### 依赖
-
-本应用的运行依赖系统应用[IntentDriver](../../../SystemFeature/InsightIntent/IntentDriver)。
-
-### 约束与限制
-
-1.本示例仅支持标准系统上运行,支持设备:RK3568;
-
-2.本示例为Stage模型,支持API11版本SDK,版本号:4.1.3.1;
-
-3.本示例需要使用DevEco Studio 3.1.1 Release (Build Version: 3.1.0.501, built on June 20, 2023)才可编译运行;
-
-### 下载
-
-如需单独下载本工程,执行如下命令:
-
-```
-git init
-git config core.sparsecheckout true
-echo code/BasicFeature/InsightIntent/IntentExecutor/ > .git/info/sparse-checkout
-git remote add origin https://gitee.com/openharmony/applications_app_samples.git
-git pull origin master
-```
diff --git a/code/BasicFeature/InsightIntent/IntentExecutor/entry/hvigorfile.ts b/code/BasicFeature/InsightIntent/IntentExecutor/entry/hvigorfile.ts
deleted file mode 100644
index 3d8dbbb3d..000000000
--- a/code/BasicFeature/InsightIntent/IntentExecutor/entry/hvigorfile.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-/*
- * Copyright (c) 2023 Huawei Device Co., Ltd.
- * Licensed under the Apache License, Version 2.0 (the 'License');
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an 'AS IS' BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-// Script for compiling build behavior. It is built in the build plug-in and cannot be modified currently.
-export { hapTasks } from '@ohos/hvigor-ohos-plugin';
diff --git a/code/BasicFeature/InsightIntent/IntentExecutor/entry/src/main/ets/intents/PlayMusicIntentExecutorImpl.ets b/code/BasicFeature/InsightIntent/IntentExecutor/entry/src/main/ets/intents/PlayMusicIntentExecutorImpl.ets
deleted file mode 100644
index a55d2ce78..000000000
--- a/code/BasicFeature/InsightIntent/IntentExecutor/entry/src/main/ets/intents/PlayMusicIntentExecutorImpl.ets
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Copyright (c) 2023 Huawei Device Co., Ltd.
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-import IntentExecutor from '@ohos.app.ability.InsightIntentExecutor';
-import insightIntent from '@ohos.app.ability.insightIntent';
-import window from '@ohos.window';
-import { logger } from '../util/Logger';
-import router from '@ohos.router';
-
-const TAG: string = '[PlayMusicIntentExecutorImpl]';
-
-export default class PlayMusicIntentExecutorImpl extends IntentExecutor {
- onExecuteInUIAbilityForegroundMode(name: string, param: Record,
- pageLoader: window.WindowStage): insightIntent.ExecuteResult {
- let result: insightIntent.ExecuteResult;
- let msg: Record;
- if (name !== 'PlayMusic') {
- logger.info(TAG, `onExecuteInUIAbilityForegroundMode unsupported insight intent ${name}`);
- msg = {
- 'message': `onExecuteInUIAbilityForegroundMode unsupported insight intent ${name}`
- };
- result = {
- // decided by developer
- code: 404,
- result: msg
- };
- return result;
- }
-
- // if developer need load content
- try {
- router.pushUrl({
- url: 'pages/IntentPage'
- });
- } catch (err) {
- logger.error(TAG, `pushUrl failed,code:${JSON.stringify(err.code)},message:${JSON.stringify(err.message)}`)
- }
-
-
- msg = {
- 'message': 'onExecuteInUIAbilityForegroundMode execute insight intent succeed.',
- 'name': name,
- 'param': JSON.stringify(param)
- };
- result = {
- code: 0,
- result: msg
- };
- return result;
- }
-}
\ No newline at end of file
diff --git a/code/BasicFeature/InsightIntent/IntentExecutor/entry/src/main/ets/pages/Index.ets b/code/BasicFeature/InsightIntent/IntentExecutor/entry/src/main/ets/pages/Index.ets
deleted file mode 100644
index c201991e3..000000000
--- a/code/BasicFeature/InsightIntent/IntentExecutor/entry/src/main/ets/pages/Index.ets
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright (c) 2023 Huawei Device Co., Ltd.
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-@Entry
-@Component
-struct Index {
-
- build() {
- Column() {
- Text($r('app.string.intent_executor_title'))
- .fontColor('#182431')
- .fontSize(32)
- .fontWeight(700)
- .margin({ left: 72, top: 32 })
- .textAlign(TextAlign.Start)
- .width('100%')
- }
- .width('100%')
- .height('100%')
- .backgroundColor($r('sys.color.ohos_id_color_text_field_sub_bg'))
- }
-}
\ No newline at end of file
diff --git a/code/BasicFeature/InsightIntent/IntentExecutor/entry/src/main/ets/pages/IntentPage.ets b/code/BasicFeature/InsightIntent/IntentExecutor/entry/src/main/ets/pages/IntentPage.ets
deleted file mode 100644
index f2cb87893..000000000
--- a/code/BasicFeature/InsightIntent/IntentExecutor/entry/src/main/ets/pages/IntentPage.ets
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Copyright (c) 2023 Huawei Device Co., Ltd.
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-import router from '@ohos.router';
-
-@Entry
-@Component
-struct IntentPage {
- @State message: string = 'Loaded by IntentExecutor';
-
- build() {
- Column() {
- Row() {
- Image($r('app.media.ic_back'))
- .width(32)
- .height(32)
- .margin({ left: 32, top: 32 })
- Text(this.message)
- .fontColor('#182431')
- .fontSize(30)
- .fontWeight(700)
- .margin({ left: 12, top: 32 })
- .textAlign(TextAlign.Start)
- }
- .width('100%')
- .onClick(() => {
- router.back();
- })
- }
- .width('100%')
- .height('100%')
- .backgroundColor($r('sys.color.ohos_id_color_text_field_sub_bg'))
- }
-}
\ No newline at end of file
diff --git a/code/BasicFeature/InsightIntent/IntentExecutor/entry/src/main/ets/util/Logger.ets b/code/BasicFeature/InsightIntent/IntentExecutor/entry/src/main/ets/util/Logger.ets
deleted file mode 100644
index 3373ac747..000000000
--- a/code/BasicFeature/InsightIntent/IntentExecutor/entry/src/main/ets/util/Logger.ets
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Copyright (c) 2023 Huawei Device Co., Ltd.
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-import hilog from '@ohos.hilog'
-
-class Logger {
- private domain: number;
- private prefix: string;
- private format: string = '%{public}s';
-
- constructor(prefix: string) {
- this.prefix = prefix;
- this.domain = 0xFF00;
- hilog.isLoggable(this.domain, prefix, hilog.LogLevel.INFO);
- hilog.isLoggable(this.domain, prefix, hilog.LogLevel.DEBUG);
- hilog.isLoggable(this.domain, prefix, hilog.LogLevel.WARN);
- hilog.isLoggable(this.domain, prefix, hilog.LogLevel.ERROR);
- }
-
- makeFormat(args_length: number): string {
- let format: string = this.format;
- for (let i = 0; i < args_length - 1; i++) {
- format += ', ' + this.format;
- }
- return format;
- }
-
- debug(...args: string[]) {
- hilog.debug(this.domain, this.prefix, this.makeFormat(args.length), args);
- }
-
- info(...args: string[]) {
- hilog.info(this.domain, this.prefix, this.makeFormat(args.length), args);
- }
-
- warn(...args: string[]) {
- hilog.warn(this.domain, this.prefix, this.makeFormat(args.length), args);
- }
-
- error(...args: string[]) {
- hilog.error(this.domain, this.prefix, this.makeFormat(args.length), args);
- }
-}
-
-export let logger = new Logger('[Sample_IntentExecutor]');
\ No newline at end of file
diff --git a/code/BasicFeature/InsightIntent/IntentExecutor/entry/src/main/resources/base/element/string.json b/code/BasicFeature/InsightIntent/IntentExecutor/entry/src/main/resources/base/element/string.json
deleted file mode 100644
index 37b0a3846..000000000
--- a/code/BasicFeature/InsightIntent/IntentExecutor/entry/src/main/resources/base/element/string.json
+++ /dev/null
@@ -1,32 +0,0 @@
-{
- "string": [
- {
- "name": "module_desc",
- "value": "execute insight intent"
- },
- {
- "name": "EntryAbility_desc",
- "value": "EntryAbility"
- },
- {
- "name": "EntryAbility_label",
- "value": "EntryAbility"
- },
- {
- "name": "ServiceExtAbility_desc",
- "value": "ServiceExtAbility"
- },
- {
- "name": "ServiceExtAbility_label",
- "value": "ServiceExtAbility"
- },
- {
- "name": "intent_executor_title",
- "value": "Intent Executor"
- },
- {
- "name": "Back",
- "value": "Back"
- }
- ]
-}
\ No newline at end of file
diff --git a/code/BasicFeature/InsightIntent/IntentExecutor/entry/src/main/resources/base/media/ic_back.svg b/code/BasicFeature/InsightIntent/IntentExecutor/entry/src/main/resources/base/media/ic_back.svg
deleted file mode 100644
index 5e82eaf2d..000000000
--- a/code/BasicFeature/InsightIntent/IntentExecutor/entry/src/main/resources/base/media/ic_back.svg
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
\ No newline at end of file
diff --git a/code/BasicFeature/InsightIntent/IntentExecutor/entry/src/main/resources/base/profile/insight_intent.json b/code/BasicFeature/InsightIntent/IntentExecutor/entry/src/main/resources/base/profile/insight_intent.json
deleted file mode 100644
index b9ec1f131..000000000
--- a/code/BasicFeature/InsightIntent/IntentExecutor/entry/src/main/resources/base/profile/insight_intent.json
+++ /dev/null
@@ -1,17 +0,0 @@
-{
- "insightIntents": [
- {
- "intentName": "PlayMusic",
- "domain": "MusicDomain",
- "intentVersion": "1.0.1",
- "srcEntry": "./ets/intents/PlayMusicIntentExecutorImpl.ets",
- "uiAbility": {
- "ability": "EntryAbility",
- "executeMode": [
- "background",
- "foreground"
- ]
- }
- }
- ]
-}
diff --git a/code/BasicFeature/InsightIntent/IntentExecutor/entry/src/main/resources/base/profile/main_pages.json b/code/BasicFeature/InsightIntent/IntentExecutor/entry/src/main/resources/base/profile/main_pages.json
deleted file mode 100644
index 6699c1cfa..000000000
--- a/code/BasicFeature/InsightIntent/IntentExecutor/entry/src/main/resources/base/profile/main_pages.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "src": [
- "pages/Index",
- "pages/IntentPage"
- ]
-}
\ No newline at end of file
diff --git a/code/BasicFeature/InsightIntent/IntentExecutor/entry/src/main/resources/en_US/element/string.json b/code/BasicFeature/InsightIntent/IntentExecutor/entry/src/main/resources/en_US/element/string.json
deleted file mode 100644
index 2ab601209..000000000
--- a/code/BasicFeature/InsightIntent/IntentExecutor/entry/src/main/resources/en_US/element/string.json
+++ /dev/null
@@ -1,32 +0,0 @@
-{
- "string": [
- {
- "name": "module_desc",
- "value": "module description"
- },
- {
- "name": "EntryAbility_desc",
- "value": "description"
- },
- {
- "name": "EntryAbility_label",
- "value": "label"
- },
- {
- "name": "ServiceExtAbility_desc",
- "value": "description"
- },
- {
- "name": "ServiceExtAbility_label",
- "value": "label"
- },
- {
- "name": "intent_executor_title",
- "value": "Intent Executor"
- },
- {
- "name": "Back",
- "value": "Back"
- }
- ]
-}
\ No newline at end of file
diff --git a/code/BasicFeature/InsightIntent/IntentExecutor/entry/src/main/resources/zh_CN/element/string.json b/code/BasicFeature/InsightIntent/IntentExecutor/entry/src/main/resources/zh_CN/element/string.json
deleted file mode 100644
index c0d152fdf..000000000
--- a/code/BasicFeature/InsightIntent/IntentExecutor/entry/src/main/resources/zh_CN/element/string.json
+++ /dev/null
@@ -1,32 +0,0 @@
-{
- "string": [
- {
- "name": "module_desc",
- "value": "模块描述"
- },
- {
- "name": "EntryAbility_desc",
- "value": "EntryAbility"
- },
- {
- "name": "EntryAbility_label",
- "value": "EntryAbility"
- },
- {
- "name": "ServiceExtAbility_desc",
- "value": "ServiceExtAbility"
- },
- {
- "name": "ServiceExtAbility_label",
- "value": "ServiceExtAbility"
- },
- {
- "name": "intent_executor_title",
- "value": "意图执行"
- },
- {
- "name": "Back",
- "value": "返回"
- }
- ]
-}
\ No newline at end of file
diff --git a/code/BasicFeature/InsightIntent/IntentExecutor/hvigor/hvigor-config.json5 b/code/BasicFeature/InsightIntent/IntentExecutor/hvigor/hvigor-config.json5
deleted file mode 100644
index e1b617db9..000000000
--- a/code/BasicFeature/InsightIntent/IntentExecutor/hvigor/hvigor-config.json5
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "hvigorVersion": "4.0.2",
- "dependencies": {
- "@ohos/hvigor-ohos-plugin": "4.0.2"
- }
-}
\ No newline at end of file
diff --git a/code/BasicFeature/InsightIntent/IntentExecutor/screenshots/zh/executeInUIAbility.png b/code/BasicFeature/InsightIntent/IntentExecutor/screenshots/zh/executeInUIAbility.png
deleted file mode 100644
index d35afd679..000000000
Binary files a/code/BasicFeature/InsightIntent/IntentExecutor/screenshots/zh/executeInUIAbility.png and /dev/null differ
diff --git a/code/BasicFeature/InsightIntent/IntentExecutor/screenshots/zh/executeInUIAbility2.png b/code/BasicFeature/InsightIntent/IntentExecutor/screenshots/zh/executeInUIAbility2.png
deleted file mode 100644
index 6b0e43f1f..000000000
Binary files a/code/BasicFeature/InsightIntent/IntentExecutor/screenshots/zh/executeInUIAbility2.png and /dev/null differ
diff --git a/code/BasicFeature/InsightIntent/IntentExecutor/screenshots/zh/home.png b/code/BasicFeature/InsightIntent/IntentExecutor/screenshots/zh/home.png
deleted file mode 100644
index c868c071c..000000000
Binary files a/code/BasicFeature/InsightIntent/IntentExecutor/screenshots/zh/home.png and /dev/null differ
diff --git a/code/BasicFeature/Media/GamePuzzle/README_zh.md b/code/BasicFeature/Media/GamePuzzle/README_zh.md
index cc54493b4..a6723c347 100644
--- a/code/BasicFeature/Media/GamePuzzle/README_zh.md
+++ b/code/BasicFeature/Media/GamePuzzle/README_zh.md
@@ -2,7 +2,7 @@
### 介绍
-该示例通过[@ohos.multimedia.image](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/reference/apis-image-kit/js-apis-image.md)和[@ohos.multimedia.mediaLibrary](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/reference/apis-media-library-kit/js-apis-medialibrary.md)接口实现获取图片,以及图片裁剪分割的功能。
+该示例通过[@ohos.multimedia.image](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/reference/apis-image-kit/js-apis-image.md)和[@ohos.file.photoAccessHelper](https://docs.openharmony.cn/pages/v4.1/zh-cn/application-dev/reference/apis-media-library-kit/js-apis-photoAccessHelper.md)接口实现获取图片,以及图片裁剪分割的功能。
### 效果预览
|首页|运行|
@@ -38,8 +38,11 @@ VideoComponent/src/main/ets/components
[ohos.permission.READ_MEDIA](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/security/AccessToken/permissions-for-all.md#ohospermissionread_media)
+[ohos.permission.WRITE_MEDIA](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/security/AccessToken/permissions-for-all.md#ohospermissionwrite_media)
+
[ohos.permission.MEDIA_LOCATION](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/security/AccessToken/permissions-for-all.md#ohospermissionmedia_location)
+[ohos.permission.READ_IMAGEVIDEO](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/security/AccessToken/permissions-for-system-apps.md#ohospermissionread_imagevideo)
### 依赖
不涉及。
@@ -47,8 +50,8 @@ VideoComponent/src/main/ets/components
### 约束与限制
1. 本示例仅支持标准系统上运行;
-2. 本示例已适配API version 9版本SDK,版本号:3.2.11.9;
-3.本示例需要使用DevEco Studio 3.1 Beta2 (Build Version: 3.1.0.400, built on April 7, 2023)才可编译运行。
+2. 本示例已适配API version 10版本SDK,版本号:4.0.10.18;
+3. 本示例需要使用DevEco Studio 3.1 Beta2 (Build Version: 3.1.0.400, built on April 7, 2023)才可编译运行。
### 下载
如需单独下载本工程,执行如下命令:
diff --git a/code/BasicFeature/Media/GamePuzzle/build-profile.json5 b/code/BasicFeature/Media/GamePuzzle/build-profile.json5
index 956b202be..e9f16dac2 100644
--- a/code/BasicFeature/Media/GamePuzzle/build-profile.json5
+++ b/code/BasicFeature/Media/GamePuzzle/build-profile.json5
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2022 Huawei Device Co., Ltd.
+ * Copyright (c) 2022-2024 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
@@ -15,9 +15,9 @@
{
"app": {
+ "compileSdkVersion": 10,
+ "compatibleSdkVersion": 10,
"signingConfigs": [],
- "compileSdkVersion": 9,
- "compatibleSdkVersion": 9,
"products": [
{
"name": "default",
diff --git a/code/BasicFeature/Media/GamePuzzle/entry/src/main/ets/common/ImagePicker.ets b/code/BasicFeature/Media/GamePuzzle/entry/src/main/ets/common/ImagePicker.ets
index 3ab37d55a..b0aa039df 100644
--- a/code/BasicFeature/Media/GamePuzzle/entry/src/main/ets/common/ImagePicker.ets
+++ b/code/BasicFeature/Media/GamePuzzle/entry/src/main/ets/common/ImagePicker.ets
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2022-2023 Huawei Device Co., Ltd.
+ * Copyright (c) 2022-2024 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
@@ -12,11 +12,11 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-import mediaLibrary from '@ohos.multimedia.mediaLibrary'
+import photoAccessHelper from '@ohos.file.photoAccessHelper';
@CustomDialog
export default struct ImagePicker {
- private imageDatas: Array = []
+ private imageDatas: photoAccessHelper.PhotoAsset[] = [];
@State selected: number = 0
public controller: CustomDialogController
@Link index: number
@@ -28,7 +28,7 @@ export default struct ImagePicker {
build() {
Column() {
List({ space: 5 }) {
- ForEach(this.imageDatas, (item, index) => {
+ ForEach(this.imageDatas, (item: photoAccessHelper.PhotoAsset, index: number) => {
ListItem() {
Stack({ alignContent: Alignment.TopEnd }) {
Image(item.uri)
diff --git a/code/BasicFeature/Media/GamePuzzle/entry/src/main/ets/model/ImageModel.ts b/code/BasicFeature/Media/GamePuzzle/entry/src/main/ets/model/ImageModel.ets
similarity index 68%
rename from code/BasicFeature/Media/GamePuzzle/entry/src/main/ets/model/ImageModel.ts
rename to code/BasicFeature/Media/GamePuzzle/entry/src/main/ets/model/ImageModel.ets
index 10cc0a3aa..64e2c053f 100644
--- a/code/BasicFeature/Media/GamePuzzle/entry/src/main/ets/model/ImageModel.ts
+++ b/code/BasicFeature/Media/GamePuzzle/entry/src/main/ets/model/ImageModel.ets
@@ -13,37 +13,40 @@
* limitations under the License.
*/
import image from '@ohos.multimedia.image'
-import mediaLibrary from '@ohos.multimedia.mediaLibrary'
+import photoAccessHelper from '@ohos.file.photoAccessHelper';
import Logger from './Logger'
import PictureItem from '../model/PictureItem'
+import { Context } from '@ohos.abilityAccessCtrl';
+import dataSharePredicates from '@ohos.data.dataSharePredicates';
const TAG = '[ImageModel]'
const SPLIT_COUNT: number = 3 // 图片横竖切割的份数
export default class ImageModel {
- private media: mediaLibrary.MediaLibrary = undefined
+ private phAccessHelper: photoAccessHelper.PhotoAccessHelper;
- constructor(context: any) {
- this.media = mediaLibrary.getMediaLibrary(context)
+ constructor(context: Context) {
+ this.phAccessHelper = photoAccessHelper.getPhotoAccessHelper(context);
}
async getAllImg() {
- let fileKeyObj = mediaLibrary.FileKey
- let fetchOp = {
- selections: fileKeyObj.MEDIA_TYPE + '=?',
- selectionArgs: [`${mediaLibrary.MediaType.IMAGE}`],
+ let predicates: dataSharePredicates.DataSharePredicates = new dataSharePredicates.DataSharePredicates();
+ let fetchOptions: photoAccessHelper.FetchOptions = {
+ fetchColumns: [],
+ predicates: predicates
+ };
+
+ let mediaList: photoAccessHelper.PhotoAsset[] = [];
+ const fetchResult = await this.phAccessHelper.getAssets(fetchOptions);
+ if (fetchResult.getCount() > 0) {
+ mediaList = await fetchResult.getAllObjects();
+ Logger.info(TAG, 'fetchResult success' + JSON.stringify(mediaList));
}
- let mediaList: Array = []
- const fetchFileResult = await this.media.getFileAssets(fetchOp)
- Logger.info(TAG, `queryFile getFileAssetsFromType fetchFileResult.count = ${fetchFileResult.getCount()}`)
- if (fetchFileResult.getCount() > 0) {
- mediaList = await fetchFileResult.getAllObject()
- }
- return mediaList
+ return mediaList;
}
async splitPic(index: number) {
let imagePixelMap: PictureItem[] = []
- let imgDatas: Array = await this.getAllImg()
+ let imgDatas: photoAccessHelper.PhotoAsset[] = await this.getAllImg();
let imagePackerApi = image.createImagePacker()
let fd = await imgDatas[index].open('r')
let imageSource = image.createImageSource(fd)
@@ -52,7 +55,7 @@ export default class ImageModel {
let height = imageInfo.size.height / SPLIT_COUNT
for (let i = 0; i < SPLIT_COUNT; i++) {
for (let j = 0; j < SPLIT_COUNT; j++) {
- let picItem
+ let picItem: PictureItem | PixelMap | undefined = undefined;
if (i === SPLIT_COUNT - 1 && j === SPLIT_COUNT - 1) {
picItem = new PictureItem(9, undefined)
imagePixelMap.push(picItem)
diff --git a/code/BasicFeature/Media/GamePuzzle/entry/src/main/ets/model/PictureItem.ts b/code/BasicFeature/Media/GamePuzzle/entry/src/main/ets/model/PictureItem.ts
index f70e7a0d8..c1655ed82 100644
--- a/code/BasicFeature/Media/GamePuzzle/entry/src/main/ets/model/PictureItem.ts
+++ b/code/BasicFeature/Media/GamePuzzle/entry/src/main/ets/model/PictureItem.ts
@@ -18,7 +18,7 @@ export default class PictureItem {
public index: number
public pixelMap: image.PixelMap
- constructor(index: number, pixelMap: image.PixelMap) {
+ constructor(index: number, pixelMap: image.PixelMap | undefined) {
this.index = index
this.pixelMap = pixelMap
}
diff --git a/code/BasicFeature/Media/GamePuzzle/entry/src/main/ets/pages/Index.ets b/code/BasicFeature/Media/GamePuzzle/entry/src/main/ets/pages/Index.ets
index 4598054a9..0bb71d04b 100644
--- a/code/BasicFeature/Media/GamePuzzle/entry/src/main/ets/pages/Index.ets
+++ b/code/BasicFeature/Media/GamePuzzle/entry/src/main/ets/pages/Index.ets
@@ -14,7 +14,6 @@
*/
import mediaQuery from '@ohos.mediaquery'
-import mediaLibrary from '@ohos.multimedia.mediaLibrary'
import GameRules from "../model/GameRules"
import ImageModel from "../model/ImageModel"
import ImagePicker from '../common/ImagePicker'
@@ -22,9 +21,11 @@ import Logger from '../model/Logger'
import PictureItem from '../model/PictureItem'
import abilityAccessCtrl, { Permissions } from '@ohos.abilityAccessCtrl'
import emitter from '@ohos.events.emitter';
+import mediaquery from '@ohos.mediaquery';
+import photoAccessHelper from '@ohos.file.photoAccessHelper';
-const PERMISSIONS: Array = ['ohos.permission.READ_MEDIA', 'ohos.permission.WRITE_MEDIA',
- 'ohos.permission.MEDIA_LOCATION','ohos.permission.MANAGE_MISSIONS'];
+const PERMISSIONS: Permissions[] = ['ohos.permission.READ_MEDIA', 'ohos.permission.WRITE_MEDIA',
+ 'ohos.permission.MEDIA_LOCATION', 'ohos.permission.MANAGE_MISSIONS', 'ohos.permission.READ_IMAGEVIDEO'];
const IMAGE_SIZE: number = px2vp(640)
const GAME_TIME: number = 300 // 游戏时长
const TAG: string = 'Index'
@@ -39,12 +40,12 @@ struct Index {
private timer: number = -1
private isRefresh: boolean = false
@State numArray: PictureItem[] = []
- @State imgDatas: Array = []
+ @State imgDatas: photoAccessHelper.PhotoAsset[] = [];
@State @Watch("onTimeOver") gameTime: number = GAME_TIME
@State @Watch("onImageChange") index: number = 0
@State isLand: boolean = false
- onLand = (mediaQueryResult) => {
- console.info(`[eTSMediaQuery.Index]onLand: mediaQueryResult.matches=${mediaQueryResult.matches}`)
+ onLand = (mediaQueryResult: mediaquery.MediaQueryResult) => {
+ Logger.info(TAG, `[eTSMediaQuery.Index]onLand: mediaQueryResult.matches=${mediaQueryResult.matches}`)
this.isLand = mediaQueryResult.matches
}
@@ -147,7 +148,7 @@ struct Index {
@Builder
ImageGrid(leftMargin: number, topMargin: number) {
Grid() {
- ForEach(this.numArray, (item, index) => {
+ ForEach(this.numArray, (item: PictureItem, index: number) => {
GridItem() {
Image(item.pixelMap)
.width('99%')
diff --git a/code/BasicFeature/Media/GamePuzzle/entry/src/main/module.json5 b/code/BasicFeature/Media/GamePuzzle/entry/src/main/module.json5
index 5638aa424..828a84055 100644
--- a/code/BasicFeature/Media/GamePuzzle/entry/src/main/module.json5
+++ b/code/BasicFeature/Media/GamePuzzle/entry/src/main/module.json5
@@ -58,13 +58,32 @@
],
"requestPermissions": [
{
- "name": "ohos.permission.READ_MEDIA"
+ "name": "ohos.permission.READ_MEDIA",
+ "reason": "$string:app_name",
+ "usedScene": {
+ "when": "always"
+ }
},
{
- "name": "ohos.permission.WRITE_MEDIA"
+ "name": "ohos.permission.WRITE_MEDIA",
+ "reason": "$string:app_name",
+ "usedScene": {
+ "when": "always"
+ }
},
{
- "name": "ohos.permission.MEDIA_LOCATION"
+ "name": "ohos.permission.MEDIA_LOCATION",
+ "reason": "$string:app_name",
+ "usedScene": {
+ "when": "always"
+ }
+ },
+ {
+ "name": "ohos.permission.READ_IMAGEVIDEO",
+ "reason": "$string:app_name",
+ "usedScene": {
+ "when": "always"
+ }
}
]
}
diff --git a/code/BasicFeature/Media/GamePuzzle/hvigor/hvigor-config.json5 b/code/BasicFeature/Media/GamePuzzle/hvigor/hvigor-config.json5
index 2800903fc..ef64f10da 100644
--- a/code/BasicFeature/Media/GamePuzzle/hvigor/hvigor-config.json5
+++ b/code/BasicFeature/Media/GamePuzzle/hvigor/hvigor-config.json5
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Copyright (c) 2024 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
@@ -12,9 +12,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+
{
- "hvigorVersion": "2.0.0",
+ "hvigorVersion": "2.4.2",
"dependencies": {
- "@ohos/hvigor-ohos-plugin": "2.0.0"
+ "@ohos/hvigor-ohos-plugin": "2.4.2"
}
-}
+}
\ No newline at end of file
diff --git a/code/BasicFeature/Media/Image/photomodify/src/main/ets/components/pages/EditImage.ets b/code/BasicFeature/Media/Image/photomodify/src/main/ets/components/pages/EditImage.ets
index e0abf4400..7031c4874 100644
--- a/code/BasicFeature/Media/Image/photomodify/src/main/ets/components/pages/EditImage.ets
+++ b/code/BasicFeature/Media/Image/photomodify/src/main/ets/components/pages/EditImage.ets
@@ -38,6 +38,7 @@ const TAG: string = '[Sample_EditImage]';
export struct EditImage {
@State mediaUris: string = (router.getParams() as Record)['mediaUris'] as string;
@State pixelMap: PixelMap | undefined | null = undefined;
+ @State isPixelMapChange: boolean = false;
@State adjustMarkJudg: boolean = false;
@State currentTask: number = Tasks.ADJUST;
@State currentCropTask: number = CropTasks.NONE;
@@ -547,9 +548,11 @@ export struct EditImage {
.onClick(async () => {
if (this.canClick) {
this.canClick = false;
+ this.isPixelMapChange = true;
await this.pixelMap?.rotate(90);
setTimeout(() => {
this.canClick = true;
+ this.isPixelMapChange = false;
this.flushPage();
}, 300)
}
@@ -568,9 +571,11 @@ export struct EditImage {
.onClick(async () => {
if (this.canClick) {
this.canClick = false;
+ this.isPixelMapChange = true;
await this.pixelMap?.rotate(-90);
setTimeout(() => {
this.canClick = true;
+ this.isPixelMapChange = false;
this.flushPage();
}, 300);
}
@@ -838,19 +843,35 @@ export struct EditImage {
}.layoutWeight(1)
} else {
Stack({ alignContent: Alignment.Center }) {
- Image(this.pixelMap)
- .objectFit(ImageFit.Contain)
- .width('90%')
- .height('90%')
- .dynamicRangeMode(DynamicRangeMode.HIGH)
- .backgroundColor($r('app.color.edit_image_stack_image'))
- .alignRules(
- {
- middle: { anchor: '__container__', align: HorizontalAlign.Center },
- center: { anchor: '__container__', align: VerticalAlign.Center }
- }
- )
- .id('image')
+ if (this.isPixelMapChange) {
+ Image(this.pixelMap)
+ .objectFit(ImageFit.Contain)
+ .width('90%')
+ .height('90%')
+ .dynamicRangeMode(DynamicRangeMode.HIGH)
+ .backgroundColor($r('app.color.edit_image_stack_image'))
+ .alignRules(
+ {
+ middle: { anchor: '__container__', align: HorizontalAlign.Center },
+ center: { anchor: '__container__', align: VerticalAlign.Center }
+ }
+ )
+ .id('image')
+ } else {
+ Image(this.pixelMap)
+ .objectFit(ImageFit.Contain)
+ .width('90%')
+ .height('90%')
+ .dynamicRangeMode(DynamicRangeMode.HIGH)
+ .backgroundColor($r('app.color.edit_image_stack_image'))
+ .alignRules(
+ {
+ middle: { anchor: '__container__', align: HorizontalAlign.Center },
+ center: { anchor: '__container__', align: VerticalAlign.Center }
+ }
+ )
+ .id('image')
+ }
if (this.currentTask === Tasks.SCALE) {
Stack() {
diff --git a/code/BasicFeature/Media/QRCodeScan/Feature/src/main/ets/qrcodescan/QRCodeParser.ets b/code/BasicFeature/Media/QRCodeScan/Feature/src/main/ets/qrcodescan/QRCodeParser.ets
index de70b6b19..de7e4e0ae 100644
--- a/code/BasicFeature/Media/QRCodeScan/Feature/src/main/ets/qrcodescan/QRCodeParser.ets
+++ b/code/BasicFeature/Media/QRCodeScan/Feature/src/main/ets/qrcodescan/QRCodeParser.ets
@@ -15,7 +15,7 @@
import fileio from '@ohos.fileio'
import image from '@ohos.multimedia.image'
-import mediaLibrary from '@ohos.multimedia.mediaLibrary'
+import photoAccessHelper from '@ohos.file.photoAccessHelper'
import common from '@ohos.app.ability.common'
import prompt from '@ohos.promptAction';
import {
@@ -35,8 +35,10 @@ import { CameraService } from './CameraService'
import { QRCodeScanConst, ImageAttribute, DecodeResultAttribute } from './QRCodeScanConst';
import Logger from '../utils/Logger'
import Want from '@ohos.app.ability.Want'
+import dataSharePredicates from '@ohos.data.dataSharePredicates'
const TAG: string = 'QRCodeParser'
+let predicates: dataSharePredicates.DataSharePredicates = new dataSharePredicates.DataSharePredicates();
/**
* 二维码解析器
@@ -75,8 +77,7 @@ class QRCodeParser {
// 给每次接收的image资源赋予随机文件名
let fileName = this.getRandomFileName(QRCodeScanConst.IMG_FILE_PREFIX, QRCodeScanConst.IMG_SUFFIX_JPG)
// 将image的ArrayBuffer写入指定文件中,返回文件uri
- let imageUri = await this.createPublicDirFileAsset(fileName, mediaLibrary.MediaType.IMAGE,
- mediaLibrary.DirectoryType.DIR_IMAGE, imageComponent.byteBuffer);
+ let imageUri = await this.createPublicDirFileAsset(fileName, imageComponent.byteBuffer);
// 释放已读取的image资源,以便处理下一个资源
await targetImage.release()
@@ -102,14 +103,13 @@ class QRCodeParser {
*/
async parseImageQRCode(imageSrc: string): Promise {
Logger.info(`parseImageQRCode start`);
- let media = mediaLibrary.getMediaLibrary(AppStorage.Get('context'));
- let imagesIdFetchOp: mediaLibrary.MediaFetchOptions = {
- selections: ``,
- selectionArgs: [],
- uri: imageSrc
- };
+ let media = photoAccessHelper.getPhotoAccessHelper(AppStorage.get('context'));
+ let imagesIdFetchOp: photoAccessHelper.FetchOptions = {
+ fetchColumns: [],
+ predicates: predicates.equalTo('uri', imageSrc)
+ }
// 获取图片文件资源
- let fetchIdFileResult = await media.getFileAssets(imagesIdFetchOp);
+ let fetchIdFileResult = await media.getAssets(imagesIdFetchOp);
let fileIdAsset = await fetchIdFileResult.getFirstObject();
// 获取文件描述符
let fd = await fileIdAsset.open('RW');
@@ -155,20 +155,19 @@ class QRCodeParser {
*/
async getImageSource(imageSrc: string): Promise {
Logger.info(`getImageSource start`);
- let media = mediaLibrary.getMediaLibrary(AppStorage.Get('context'));
- let imagesIdFetchOp: mediaLibrary.MediaFetchOptions = {
- selections: ``,
- selectionArgs: [],
- uri: imageSrc
- };
+ let media = photoAccessHelper.getPhotoAccessHelper(AppStorage.get('context'));
+ let imagesIdFetchOp: photoAccessHelper.FetchOptions = {
+ fetchColumns: ['width', 'height'],
+ predicates: predicates.equalTo('uri', imageSrc)
+ }
// 获取图片文件资源
- let fetchIdFileResult = await media.getFileAssets(imagesIdFetchOp);
+ let fetchIdFileResult = await media.getAssets(imagesIdFetchOp);
let fileIdAsset = await fetchIdFileResult.getFirstObject();
// 将字符串分割,下标为1的数据即为图片类型
let imgType = fileIdAsset.displayName.split('.')[1];
// 获取文件描述符
let fd = await fileIdAsset.open('RW');
- let context = AppStorage.Get('context');
+ let context = AppStorage.get('context');
// 获取当前时间
let time = new Date().getTime();
// 拼接路径
@@ -181,22 +180,21 @@ class QRCodeParser {
let pixelMap = await imageSource.createPixelMap();
// 4、关闭安fd,Asset
await fileIdAsset.close(fd);
- return { width: fileIdAsset.width, height: fileIdAsset.height, pixelMap: pixelMap };
+ return {
+ width: fileIdAsset.get('width') as number,
+ height: fileIdAsset.get('height') as number,
+ pixelMap: pixelMap
+ };
}
/**
* 在媒体公共资源目录下的创建指定类型的资源对象
*/
async createPublicDirFileAsset(fileDisplayName: string,
- mediaType: mediaLibrary.MediaType,
- directoryType: mediaLibrary.DirectoryType,
fileByteBuffer: ArrayBuffer): Promise {
Logger.info("createPublicDirFileAsset start")
// 获取mediaLibrary对象
- let mediaLibraryObj = mediaLibrary.getMediaLibrary(AppStorage.Get('context'))
- // 获取媒体公共资源目录
- let publicDir = await mediaLibraryObj.getPublicDirectory(directoryType)
- // 使用资源类型、资源名称、和公共资源路径创建FileAccess对象
- let fileAsset = await mediaLibraryObj.createAsset(mediaType, fileDisplayName, publicDir)
+ let mediaLibraryObj = photoAccessHelper.getPhotoAccessHelper(AppStorage.get('context'))
+ let fileAsset = await mediaLibraryObj.createAsset(fileDisplayName)
// 拿到fileAccess资源对应的uri
let fileUri = fileAsset.uri
// 调用open方法打开这个资源对象 // TODO 为啥要打开?
diff --git a/code/BasicFeature/Media/QRCodeScan/entry/src/main/ets/mainability/MainAbility.ets b/code/BasicFeature/Media/QRCodeScan/entry/src/main/ets/mainability/MainAbility.ets
index 55e22a0d3..b07942c8c 100644
--- a/code/BasicFeature/Media/QRCodeScan/entry/src/main/ets/mainability/MainAbility.ets
+++ b/code/BasicFeature/Media/QRCodeScan/entry/src/main/ets/mainability/MainAbility.ets
@@ -28,7 +28,7 @@ export default class MainAbility extends UIAbility {
Logger.info(TAG, 'MainAbility onCreate')
let atManager: abilityAccessCtrl.AtManager = abilityAccessCtrl.createAtManager()
try {
- await atManager.requestPermissionsFromUser(this.context, ['ohos.permission.CAMERA', 'ohos.permission.READ_MEDIA', 'ohos.permission.WRITE_MEDIA', 'ohos.permission.MEDIA_LOCATION']).then((data) => {
+ await atManager.requestPermissionsFromUser(this.context, ['ohos.permission.CAMERA', 'ohos.permission.READ_IMAGEVIDEO', 'ohos.permission.WRITE_IMAGEVIDEO', 'ohos.permission.MEDIA_LOCATION']).then((data) => {
Logger.info(TAG, `data: ${JSON.stringify(data)}`)
// 如果权限列表中有-1,说明用户拒绝了授权
if (data.authResults[0] === 0) {
diff --git a/code/BasicFeature/Media/QRCodeScan/entry/src/main/module.json5 b/code/BasicFeature/Media/QRCodeScan/entry/src/main/module.json5
index f979239b7..617b390b5 100644
--- a/code/BasicFeature/Media/QRCodeScan/entry/src/main/module.json5
+++ b/code/BasicFeature/Media/QRCodeScan/entry/src/main/module.json5
@@ -39,6 +39,14 @@
},
{
"name": "ohos.permission.READ_MEDIA"
+ },
+ {
+ "name": "ohos.permission.READ_IMAGEVIDEO",
+ "reason": "$string:read_image_video_permission"
+ },
+ {
+ "name": "ohos.permission.WRITE_IMAGEVIDEO",
+ "reason": "$string:write_image_video_permission"
}
],
"abilities": [
diff --git a/code/BasicFeature/Media/QRCodeScan/entry/src/main/resources/base/element/string.json b/code/BasicFeature/Media/QRCodeScan/entry/src/main/resources/base/element/string.json
index a88783732..fcdbbec86 100644
--- a/code/BasicFeature/Media/QRCodeScan/entry/src/main/resources/base/element/string.json
+++ b/code/BasicFeature/Media/QRCodeScan/entry/src/main/resources/base/element/string.json
@@ -11,6 +11,14 @@
{
"name": "MainAbility_label",
"value": "二维码扫描"
+ },
+ {
+ "name": "read_image_video_permission",
+ "value": "读取用户公共目录的图片或视频文件"
+ },
+ {
+ "name": "write_image_video_permission",
+ "value": "修改用户公共目录的图片或视频文件"
}
]
}
\ No newline at end of file
diff --git a/code/DocsSample/ApplicationModels/MindSporeLiteArkTSDemo/hvigor/hvigor-wrapper.js b/code/DocsSample/ApplicationModels/MindSporeLiteArkTSDemo/hvigor/hvigor-wrapper.js
new file mode 100644
index 000000000..372eae8eb
--- /dev/null
+++ b/code/DocsSample/ApplicationModels/MindSporeLiteArkTSDemo/hvigor/hvigor-wrapper.js
@@ -0,0 +1 @@
+"use strict";var u=require("path"),D=require("os"),e=require("fs"),t=require("crypto"),r=require("child_process"),n="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},i={},C={},F=n&&n.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(C,"__esModule",{value:!0}),C.maxPathLength=C.isMac=C.isLinux=C.isWindows=void 0;const E=F(D),A="Windows_NT",o="Darwin";function a(){return E.default.type()===A}function c(){return E.default.type()===o}C.isWindows=a,C.isLinux=function(){return"Linux"===E.default.type()},C.isMac=c,C.maxPathLength=function(){return c()?1016:a()?259:4095},function(e){var t=n&&n.__createBinding||(Object.create?function(u,D,e,t){void 0===t&&(t=e);var r=Object.getOwnPropertyDescriptor(D,e);r&&!("get"in r?!D.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return D[e]}}),Object.defineProperty(u,t,r)}:function(u,D,e,t){void 0===t&&(t=e),u[t]=D[e]}),r=n&&n.__setModuleDefault||(Object.create?function(u,D){Object.defineProperty(u,"default",{enumerable:!0,value:D})}:function(u,D){u.default=D}),i=n&&n.__importStar||function(u){if(u&&u.__esModule)return u;var D={};if(null!=u)for(var e in u)"default"!==e&&Object.prototype.hasOwnProperty.call(u,e)&&t(D,u,e);return r(D,u),D};Object.defineProperty(e,"__esModule",{value:!0}),e.WORK_SPACE=e.HVIGOR_PROJECT_WRAPPER_HOME=e.HVIGOR_PROJECT_ROOT_DIR=e.HVIGOR_PROJECT_CACHES_HOME=e.HVIGOR_PNPM_STORE_PATH=e.HVIGOR_WRAPPER_PNPM_SCRIPT_PATH=e.PROJECT_CACHES=e.HVIGOR_WRAPPER_TOOLS_HOME=e.HVIGOR_USER_HOME=e.DEFAULT_PACKAGE_JSON=e.DEFAULT_HVIGOR_CONFIG_JSON_FILE_NAME=e.PNPM=e.HVIGOR=e.NPM_TOOL=e.PNPM_TOOL=e.HVIGOR_ENGINE_PACKAGE_NAME=void 0;const F=i(D),E=i(u),A=C;e.HVIGOR_ENGINE_PACKAGE_NAME="@ohos/hvigor",e.PNPM_TOOL=(0,A.isWindows)()?"pnpm.cmd":"pnpm",e.NPM_TOOL=(0,A.isWindows)()?"npm.cmd":"npm",e.HVIGOR="hvigor",e.PNPM="pnpm",e.DEFAULT_HVIGOR_CONFIG_JSON_FILE_NAME="hvigor-config.json5",e.DEFAULT_PACKAGE_JSON="package.json",e.HVIGOR_USER_HOME=E.resolve(F.homedir(),".hvigor"),e.HVIGOR_WRAPPER_TOOLS_HOME=E.resolve(e.HVIGOR_USER_HOME,"wrapper","tools"),e.PROJECT_CACHES="project_caches",e.HVIGOR_WRAPPER_PNPM_SCRIPT_PATH=E.resolve(e.HVIGOR_WRAPPER_TOOLS_HOME,"node_modules",".bin",e.PNPM_TOOL),e.HVIGOR_PNPM_STORE_PATH=E.resolve(e.HVIGOR_USER_HOME,"caches"),e.HVIGOR_PROJECT_CACHES_HOME=E.resolve(e.HVIGOR_USER_HOME,e.PROJECT_CACHES),e.HVIGOR_PROJECT_ROOT_DIR=process.cwd(),e.HVIGOR_PROJECT_WRAPPER_HOME=E.resolve(e.HVIGOR_PROJECT_ROOT_DIR,e.HVIGOR),e.WORK_SPACE="workspace"}(i);var s={},l={};Object.defineProperty(l,"__esModule",{value:!0}),l.logInfoPrintConsole=l.logErrorAndExit=void 0,l.logErrorAndExit=function(u){u instanceof Error?console.error(u.message):console.error(u),process.exit(-1)},l.logInfoPrintConsole=function(u){console.log(u)};var B=n&&n.__createBinding||(Object.create?function(u,D,e,t){void 0===t&&(t=e);var r=Object.getOwnPropertyDescriptor(D,e);r&&!("get"in r?!D.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return D[e]}}),Object.defineProperty(u,t,r)}:function(u,D,e,t){void 0===t&&(t=e),u[t]=D[e]}),d=n&&n.__setModuleDefault||(Object.create?function(u,D){Object.defineProperty(u,"default",{enumerable:!0,value:D})}:function(u,D){u.default=D}),f=n&&n.__importStar||function(u){if(u&&u.__esModule)return u;var D={};if(null!=u)for(var e in u)"default"!==e&&Object.prototype.hasOwnProperty.call(u,e)&&B(D,u,e);return d(D,u),D};Object.defineProperty(s,"__esModule",{value:!0});var _=s.executeBuild=void 0;const p=f(e),O=f(u),h=l;_=s.executeBuild=function(u){const D=O.resolve(u,"node_modules","@ohos","hvigor","bin","hvigor.js");try{const u=p.realpathSync(D);require(u)}catch(e){(0,h.logErrorAndExit)(`Error: ENOENT: no such file ${D},delete ${u} and retry.`)}};var P={},v={};!function(u){var D=n&&n.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(u,"__esModule",{value:!0}),u.hashFile=u.hash=u.createHash=void 0;const r=D(t),i=D(e);u.createHash=(u="MD5")=>r.default.createHash(u);u.hash=(D,e)=>(0,u.createHash)(e).update(D).digest("hex");u.hashFile=(D,e)=>{if(i.default.existsSync(D))return(0,u.hash)(i.default.readFileSync(D,"utf-8"),e)}}(v);var g={},m={},R={};Object.defineProperty(R,"__esModule",{value:!0}),R.Unicode=void 0;class y{}R.Unicode=y,y.SPACE_SEPARATOR=/[\u1680\u2000-\u200A\u202F\u205F\u3000]/,y.ID_START=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/,y.ID_CONTINUE=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/,Object.defineProperty(m,"__esModule",{value:!0}),m.JudgeUtil=void 0;const I=R;m.JudgeUtil=class{static isIgnoreChar(u){return"string"==typeof u&&("\t"===u||"\v"===u||"\f"===u||" "===u||" "===u||"\ufeff"===u||"\n"===u||"\r"===u||"\u2028"===u||"\u2029"===u)}static isSpaceSeparator(u){return"string"==typeof u&&I.Unicode.SPACE_SEPARATOR.test(u)}static isIdStartChar(u){return"string"==typeof u&&(u>="a"&&u<="z"||u>="A"&&u<="Z"||"$"===u||"_"===u||I.Unicode.ID_START.test(u))}static isIdContinueChar(u){return"string"==typeof u&&(u>="a"&&u<="z"||u>="A"&&u<="Z"||u>="0"&&u<="9"||"$"===u||"_"===u||""===u||""===u||I.Unicode.ID_CONTINUE.test(u))}static isDigitWithoutZero(u){return/[1-9]/.test(u)}static isDigit(u){return"string"==typeof u&&/[0-9]/.test(u)}static isHexDigit(u){return"string"==typeof u&&/[0-9A-Fa-f]/.test(u)}};var N=n&&n.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(g,"__esModule",{value:!0}),g.parseJsonText=g.parseJsonFile=void 0;const b=N(e),S=N(D),w=N(u),H=m;var x;!function(u){u[u.Char=0]="Char",u[u.EOF=1]="EOF",u[u.Identifier=2]="Identifier"}(x||(x={}));let M,T,V,G,j,J,W="start",U=[],L=0,$=1,k=0,K=!1,z="default",q="'",Z=1;function X(u,D=!1){T=String(u),W="start",U=[],L=0,$=1,k=0,G=void 0,K=D;do{M=Q(),nu[W]()}while("eof"!==M.type);return G}function Q(){for(z="default",j="",q="'",Z=1;;){J=Y();const u=Du[z]();if(u)return u}}function Y(){if(T[L])return String.fromCodePoint(T.codePointAt(L))}function uu(){const u=Y();return"\n"===u?($++,k=0):u?k+=u.length:k++,u&&(L+=u.length),u}g.parseJsonFile=function(u,D=!1,e="utf-8"){const t=b.default.readFileSync(w.default.resolve(u),{encoding:e});try{return X(t,D)}catch(D){if(D instanceof SyntaxError){const e=D.message.split("at");if(2===e.length)throw new Error(`${e[0].trim()}${S.default.EOL}\t at ${u}:${e[1].trim()}`)}throw new Error(`${u} is not in valid JSON/JSON5 format.`)}},g.parseJsonText=X;const Du={default(){switch(J){case"/":return uu(),void(z="comment");case void 0:return uu(),eu("eof")}if(!H.JudgeUtil.isIgnoreChar(J)&&!H.JudgeUtil.isSpaceSeparator(J))return Du[W]();uu()},start(){z="value"},beforePropertyName(){switch(J){case"$":case"_":return j=uu(),void(z="identifierName");case"\\":return uu(),void(z="identifierNameStartEscape");case"}":return eu("punctuator",uu());case'"':case"'":return q=J,uu(),void(z="string")}if(H.JudgeUtil.isIdStartChar(J))return j+=uu(),void(z="identifierName");throw Eu(x.Char,uu())},afterPropertyName(){if(":"===J)return eu("punctuator",uu());throw Eu(x.Char,uu())},beforePropertyValue(){z="value"},afterPropertyValue(){switch(J){case",":case"}":return eu("punctuator",uu())}throw Eu(x.Char,uu())},beforeArrayValue(){if("]"===J)return eu("punctuator",uu());z="value"},afterArrayValue(){switch(J){case",":case"]":return eu("punctuator",uu())}throw Eu(x.Char,uu())},end(){throw Eu(x.Char,uu())},comment(){switch(J){case"*":return uu(),void(z="multiLineComment");case"/":return uu(),void(z="singleLineComment")}throw Eu(x.Char,uu())},multiLineComment(){switch(J){case"*":return uu(),void(z="multiLineCommentAsterisk");case void 0:throw Eu(x.Char,uu())}uu()},multiLineCommentAsterisk(){switch(J){case"*":return void uu();case"/":return uu(),void(z="default");case void 0:throw Eu(x.Char,uu())}uu(),z="multiLineComment"},singleLineComment(){switch(J){case"\n":case"\r":case"\u2028":case"\u2029":return uu(),void(z="default");case void 0:return uu(),eu("eof")}uu()},value(){switch(J){case"{":case"[":return eu("punctuator",uu());case"n":return uu(),tu("ull"),eu("null",null);case"t":return uu(),tu("rue"),eu("boolean",!0);case"f":return uu(),tu("alse"),eu("boolean",!1);case"-":case"+":return"-"===uu()&&(Z=-1),void(z="numerical");case".":case"0":case"I":case"N":return void(z="numerical");case'"':case"'":return q=J,uu(),j="",void(z="string")}if(void 0===J||!H.JudgeUtil.isDigitWithoutZero(J))throw Eu(x.Char,uu());z="numerical"},numerical(){switch(J){case".":return j=uu(),void(z="decimalPointLeading");case"0":return j=uu(),void(z="zero");case"I":return uu(),tu("nfinity"),eu("numeric",Z*(1/0));case"N":return uu(),tu("aN"),eu("numeric",NaN)}if(void 0!==J&&H.JudgeUtil.isDigitWithoutZero(J))return j=uu(),void(z="decimalInteger");throw Eu(x.Char,uu())},zero(){switch(J){case".":case"e":case"E":return void(z="decimal");case"x":case"X":return j+=uu(),void(z="hexadecimal")}return eu("numeric",0)},decimalInteger(){switch(J){case".":case"e":case"E":return void(z="decimal")}if(!H.JudgeUtil.isDigit(J))return eu("numeric",Z*Number(j));j+=uu()},decimal(){switch(J){case".":j+=uu(),z="decimalFraction";break;case"e":case"E":j+=uu(),z="decimalExponent"}},decimalPointLeading(){if(H.JudgeUtil.isDigit(J))return j+=uu(),void(z="decimalFraction");throw Eu(x.Char,uu())},decimalFraction(){switch(J){case"e":case"E":return j+=uu(),void(z="decimalExponent")}if(!H.JudgeUtil.isDigit(J))return eu("numeric",Z*Number(j));j+=uu()},decimalExponent(){switch(J){case"+":case"-":return j+=uu(),void(z="decimalExponentSign")}if(H.JudgeUtil.isDigit(J))return j+=uu(),void(z="decimalExponentInteger");throw Eu(x.Char,uu())},decimalExponentSign(){if(H.JudgeUtil.isDigit(J))return j+=uu(),void(z="decimalExponentInteger");throw Eu(x.Char,uu())},decimalExponentInteger(){if(!H.JudgeUtil.isDigit(J))return eu("numeric",Z*Number(j));j+=uu()},hexadecimal(){if(H.JudgeUtil.isHexDigit(J))return j+=uu(),void(z="hexadecimalInteger");throw Eu(x.Char,uu())},hexadecimalInteger(){if(!H.JudgeUtil.isHexDigit(J))return eu("numeric",Z*Number(j));j+=uu()},identifierNameStartEscape(){if("u"!==J)throw Eu(x.Char,uu());uu();const u=ru();switch(u){case"$":case"_":break;default:if(!H.JudgeUtil.isIdStartChar(u))throw Eu(x.Identifier)}j+=u,z="identifierName"},identifierName(){switch(J){case"$":case"_":case"":case"":return void(j+=uu());case"\\":return uu(),void(z="identifierNameEscape")}if(!H.JudgeUtil.isIdContinueChar(J))return eu("identifier",j);j+=uu()},identifierNameEscape(){if("u"!==J)throw Eu(x.Char,uu());uu();const u=ru();switch(u){case"$":case"_":case"":case"":break;default:if(!H.JudgeUtil.isIdContinueChar(u))throw Eu(x.Identifier)}j+=u,z="identifierName"},string(){switch(J){case"\\":return uu(),void(j+=function(){const u=Y(),D=function(){switch(Y()){case"b":return uu(),"\b";case"f":return uu(),"\f";case"n":return uu(),"\n";case"r":return uu(),"\r";case"t":return uu(),"\t";case"v":return uu(),"\v"}return}();if(D)return D;switch(u){case"0":if(uu(),H.JudgeUtil.isDigit(Y()))throw Eu(x.Char,uu());return"\0";case"x":return uu(),function(){let u="",D=Y();if(!H.JudgeUtil.isHexDigit(D))throw Eu(x.Char,uu());if(u+=uu(),D=Y(),!H.JudgeUtil.isHexDigit(D))throw Eu(x.Char,uu());return u+=uu(),String.fromCodePoint(parseInt(u,16))}();case"u":return uu(),ru();case"\n":case"\u2028":case"\u2029":return uu(),"";case"\r":return uu(),"\n"===Y()&&uu(),""}if(void 0===u||H.JudgeUtil.isDigitWithoutZero(u))throw Eu(x.Char,uu());return uu()}());case'"':case"'":if(J===q){const u=eu("string",j);return uu(),u}return void(j+=uu());case"\n":case"\r":case void 0:throw Eu(x.Char,uu());case"\u2028":case"\u2029":!function(u){console.warn(`JSON5: '${Fu(u)}' in strings is not valid ECMAScript; consider escaping.`)}(J)}j+=uu()}};function eu(u,D){return{type:u,value:D,line:$,column:k}}function tu(u){for(const D of u){if(Y()!==D)throw Eu(x.Char,uu());uu()}}function ru(){let u="",D=4;for(;D-- >0;){const D=Y();if(!H.JudgeUtil.isHexDigit(D))throw Eu(x.Char,uu());u+=uu()}return String.fromCodePoint(parseInt(u,16))}const nu={start(){if("eof"===M.type)throw Eu(x.EOF);iu()},beforePropertyName(){switch(M.type){case"identifier":case"string":return V=M.value,void(W="afterPropertyName");case"punctuator":return void Cu();case"eof":throw Eu(x.EOF)}},afterPropertyName(){if("eof"===M.type)throw Eu(x.EOF);W="beforePropertyValue"},beforePropertyValue(){if("eof"===M.type)throw Eu(x.EOF);iu()},afterPropertyValue(){if("eof"===M.type)throw Eu(x.EOF);switch(M.value){case",":return void(W="beforePropertyName");case"}":Cu()}},beforeArrayValue(){if("eof"===M.type)throw Eu(x.EOF);"punctuator"!==M.type||"]"!==M.value?iu():Cu()},afterArrayValue(){if("eof"===M.type)throw Eu(x.EOF);switch(M.value){case",":return void(W="beforeArrayValue");case"]":Cu()}},end(){}};function iu(){const u=function(){let u;switch(M.type){case"punctuator":switch(M.value){case"{":u={};break;case"[":u=[]}break;case"null":case"boolean":case"numeric":case"string":u=M.value}return u}();if(K&&"object"==typeof u&&(u._line=$,u._column=k),void 0===G)G=u;else{const D=U[U.length-1];Array.isArray(D)?K&&"object"!=typeof u?D.push({value:u,_line:$,_column:k}):D.push(u):D[V]=K&&"object"!=typeof u?{value:u,_line:$,_column:k}:u}!function(u){if(u&&"object"==typeof u)U.push(u),W=Array.isArray(u)?"beforeArrayValue":"beforePropertyName";else{const u=U[U.length-1];W=u?Array.isArray(u)?"afterArrayValue":"afterPropertyValue":"end"}}(u)}function Cu(){U.pop();const u=U[U.length-1];W=u?Array.isArray(u)?"afterArrayValue":"afterPropertyValue":"end"}function Fu(u){const D={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};if(D[u])return D[u];if(u<" "){const D=u.charCodeAt(0).toString(16);return`\\x${`00${D}`.substring(D.length)}`}return u}function Eu(u,D){let e="";switch(u){case x.Char:e=void 0===D?`JSON5: invalid end of input at ${$}:${k}`:`JSON5: invalid character '${Fu(D)}' at ${$}:${k}`;break;case x.EOF:e=`JSON5: invalid end of input at ${$}:${k}`;break;case x.Identifier:k-=5,e=`JSON5: invalid identifier character at ${$}:${k}`}const t=new Au(e);return t.lineNumber=$,t.columnNumber=k,t}class Au extends SyntaxError{}var ou={},au=n&&n.__createBinding||(Object.create?function(u,D,e,t){void 0===t&&(t=e);var r=Object.getOwnPropertyDescriptor(D,e);r&&!("get"in r?!D.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return D[e]}}),Object.defineProperty(u,t,r)}:function(u,D,e,t){void 0===t&&(t=e),u[t]=D[e]}),cu=n&&n.__setModuleDefault||(Object.create?function(u,D){Object.defineProperty(u,"default",{enumerable:!0,value:D})}:function(u,D){u.default=D}),su=n&&n.__importStar||function(u){if(u&&u.__esModule)return u;var D={};if(null!=u)for(var e in u)"default"!==e&&Object.prototype.hasOwnProperty.call(u,e)&&au(D,u,e);return cu(D,u),D},lu=n&&n.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(ou,"__esModule",{value:!0}),ou.isFileExists=ou.offlinePluginConversion=ou.executeCommand=ou.getNpmPath=ou.hasNpmPackInPaths=void 0;const Bu=r,du=lu(e),fu=su(u),_u=i,pu=l;ou.hasNpmPackInPaths=function(u,D){try{return require.resolve(u,{paths:[...D]}),!0}catch(u){return!1}},ou.getNpmPath=function(){const u=process.execPath;return fu.join(fu.dirname(u),_u.NPM_TOOL)},ou.executeCommand=function(u,D,e){0!==(0,Bu.spawnSync)(u,D,e).status&&(0,pu.logErrorAndExit)(`Error: ${u} ${D} execute failed.See above for details.`)},ou.offlinePluginConversion=function(u,D){return D.startsWith("file:")||D.endsWith(".tgz")?fu.resolve(u,_u.HVIGOR,D.replace("file:","")):D},ou.isFileExists=function(u){return du.default.existsSync(u)&&du.default.statSync(u).isFile()};var Ou=n&&n.__createBinding||(Object.create?function(u,D,e,t){void 0===t&&(t=e);var r=Object.getOwnPropertyDescriptor(D,e);r&&!("get"in r?!D.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return D[e]}}),Object.defineProperty(u,t,r)}:function(u,D,e,t){void 0===t&&(t=e),u[t]=D[e]}),hu=n&&n.__setModuleDefault||(Object.create?function(u,D){Object.defineProperty(u,"default",{enumerable:!0,value:D})}:function(u,D){u.default=D}),Pu=n&&n.__importStar||function(u){if(u&&u.__esModule)return u;var D={};if(null!=u)for(var e in u)"default"!==e&&Object.prototype.hasOwnProperty.call(u,e)&&Ou(D,u,e);return hu(D,u),D},vu=n&&n.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(P,"__esModule",{value:!0});var gu=P.initProjectWorkSpace=void 0;const mu=Pu(e),Ru=vu(D),yu=Pu(u),Iu=v,Nu=i,bu=g,Su=l,wu=ou;let Hu,xu,Mu;function Tu(u,D,e){return void 0!==e.dependencies&&(0,wu.offlinePluginConversion)(Nu.HVIGOR_PROJECT_ROOT_DIR,D.dependencies[u])===yu.normalize(e.dependencies[u])}function Vu(){const u=yu.join(Mu,Nu.WORK_SPACE);if((0,Su.logInfoPrintConsole)("Hvigor cleaning..."),!mu.existsSync(u))return;const D=mu.readdirSync(u);if(!D||0===D.length)return;const e=yu.resolve(Mu,"node_modules","@ohos","hvigor","bin","hvigor.js");mu.existsSync(e)&&(0,wu.executeCommand)(process.argv[0],[e,"--stop-daemon"],{});try{D.forEach((D=>{mu.rmSync(yu.resolve(u,D),{recursive:!0})}))}catch(D){(0,Su.logErrorAndExit)(`The hvigor build tool cannot be installed. Please manually clear the workspace directory and synchronize the project again.\n\n Workspace Path: ${u}.`)}}gu=P.initProjectWorkSpace=function(){if(Hu=function(){const u=yu.resolve(Nu.HVIGOR_PROJECT_WRAPPER_HOME,Nu.DEFAULT_HVIGOR_CONFIG_JSON_FILE_NAME);mu.existsSync(u)||(0,Su.logErrorAndExit)(`Error: Hvigor config file ${u} does not exist.`);return(0,bu.parseJsonFile)(u)}(),Mu=function(u){let D;D=function(u){let D=u.hvigorVersion;if(D.startsWith("file:")||D.endsWith(".tgz"))return!1;const e=u.dependencies,t=Object.getOwnPropertyNames(e);for(const u of t){const D=e[u];if(D.startsWith("file:")||D.endsWith(".tgz"))return!1}if(1===t.length&&"@ohos/hvigor-ohos-plugin"===t[0])return D>"2.5.0";return!1}(u)?function(u){let D=`${Nu.HVIGOR_ENGINE_PACKAGE_NAME}@${u.hvigorVersion}`;const e=u.dependencies;if(e){Object.getOwnPropertyNames(e).sort().forEach((u=>{D+=`,${u}@${e[u]}`}))}return(0,Iu.hash)(D)}(u):(0,Iu.hash)(process.cwd());return yu.resolve(Ru.default.homedir(),".hvigor","project_caches",D)}(Hu),xu=function(){const u=yu.resolve(Mu,Nu.WORK_SPACE,Nu.DEFAULT_PACKAGE_JSON);return mu.existsSync(u)?(0,bu.parseJsonFile)(u):{dependencies:{}}}(),!(0,wu.hasNpmPackInPaths)(Nu.HVIGOR_ENGINE_PACKAGE_NAME,[yu.join(Mu,Nu.WORK_SPACE)])||(0,wu.offlinePluginConversion)(Nu.HVIGOR_PROJECT_ROOT_DIR,Hu.hvigorVersion)!==xu.dependencies[Nu.HVIGOR_ENGINE_PACKAGE_NAME]||!function(){function u(u){const D=null==u?void 0:u.dependencies;return void 0===D?0:Object.getOwnPropertyNames(D).length}const D=u(Hu),e=u(xu);if(D+1!==e)return!1;for(const u in null==Hu?void 0:Hu.dependencies)if(!(0,wu.hasNpmPackInPaths)(u,[yu.join(Mu,Nu.WORK_SPACE)])||!Tu(u,Hu,xu))return!1;return!0}()){Vu();try{!function(){(0,Su.logInfoPrintConsole)("Hvigor installing...");for(const u in Hu.dependencies)Hu.dependencies[u]&&(Hu.dependencies[u]=(0,wu.offlinePluginConversion)(Nu.HVIGOR_PROJECT_ROOT_DIR,Hu.dependencies[u]));const u={dependencies:{...Hu.dependencies}};u.dependencies[Nu.HVIGOR_ENGINE_PACKAGE_NAME]=(0,wu.offlinePluginConversion)(Nu.HVIGOR_PROJECT_ROOT_DIR,Hu.hvigorVersion);const D=yu.join(Mu,Nu.WORK_SPACE);try{mu.mkdirSync(D,{recursive:!0});const e=yu.resolve(D,Nu.DEFAULT_PACKAGE_JSON);mu.writeFileSync(e,JSON.stringify(u))}catch(u){(0,Su.logErrorAndExit)(u)}(function(){const u=["config","set","store-dir",Nu.HVIGOR_PNPM_STORE_PATH],D={cwd:yu.join(Mu,Nu.WORK_SPACE),stdio:["inherit","inherit","inherit"]};(0,wu.executeCommand)(Nu.HVIGOR_WRAPPER_PNPM_SCRIPT_PATH,u,D)})(),function(){const u=["install"],D={cwd:yu.join(Mu,Nu.WORK_SPACE),stdio:["inherit","inherit","inherit"]};(0,wu.executeCommand)(Nu.HVIGOR_WRAPPER_PNPM_SCRIPT_PATH,u,D)}(),(0,Su.logInfoPrintConsole)("Hvigor install success.")}()}catch(u){Vu()}}return Mu};var Gu={};!function(t){var C=n&&n.__createBinding||(Object.create?function(u,D,e,t){void 0===t&&(t=e);var r=Object.getOwnPropertyDescriptor(D,e);r&&!("get"in r?!D.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return D[e]}}),Object.defineProperty(u,t,r)}:function(u,D,e,t){void 0===t&&(t=e),u[t]=D[e]}),F=n&&n.__setModuleDefault||(Object.create?function(u,D){Object.defineProperty(u,"default",{enumerable:!0,value:D})}:function(u,D){u.default=D}),E=n&&n.__importStar||function(u){if(u&&u.__esModule)return u;var D={};if(null!=u)for(var e in u)"default"!==e&&Object.prototype.hasOwnProperty.call(u,e)&&C(D,u,e);return F(D,u),D},A=n&&n.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(t,"__esModule",{value:!0}),t.executeInstallPnpm=t.isPnpmInstalled=t.environmentHandler=t.checkNpmConifg=t.PNPM_VERSION=void 0;const o=r,a=E(e),c=A(D),s=E(u),B=i,d=l,f=ou;t.PNPM_VERSION="7.30.0",t.checkNpmConifg=function(){const u=s.resolve(B.HVIGOR_PROJECT_ROOT_DIR,".npmrc"),D=s.resolve(c.default.homedir(),".npmrc");if((0,f.isFileExists)(u)||(0,f.isFileExists)(D))return;const e=(0,f.getNpmPath)(),t=(0,o.spawnSync)(e,["config","get","prefix"],{cwd:B.HVIGOR_PROJECT_ROOT_DIR});if(0!==t.status||!t.stdout)return void(0,d.logErrorAndExit)("Error: The hvigor depends on the npmrc file. Configure the npmrc file first.");const r=s.resolve(`${t.stdout}`.replace(/[\r\n]/gi,""),".npmrc");(0,f.isFileExists)(r)||(0,d.logErrorAndExit)("Error: The hvigor depends on the npmrc file. Configure the npmrc file first.")},t.environmentHandler=function(){process.env["npm_config_update-notifier"]="false"},t.isPnpmInstalled=function(){return!!a.existsSync(B.HVIGOR_WRAPPER_PNPM_SCRIPT_PATH)&&(0,f.hasNpmPackInPaths)("pnpm",[B.HVIGOR_WRAPPER_TOOLS_HOME])},t.executeInstallPnpm=function(){(0,d.logInfoPrintConsole)(`Installing pnpm@${t.PNPM_VERSION}...`);const u=(0,f.getNpmPath)();!function(){const u=s.resolve(B.HVIGOR_WRAPPER_TOOLS_HOME,B.DEFAULT_PACKAGE_JSON);try{a.existsSync(B.HVIGOR_WRAPPER_TOOLS_HOME)||a.mkdirSync(B.HVIGOR_WRAPPER_TOOLS_HOME,{recursive:!0});const D={dependencies:{}};D.dependencies[B.PNPM]=t.PNPM_VERSION,a.writeFileSync(u,JSON.stringify(D))}catch(D){(0,d.logErrorAndExit)(`Error: EPERM: operation not permitted,create ${u} failed.`)}}(),(0,f.executeCommand)(u,["install","pnpm"],{cwd:B.HVIGOR_WRAPPER_TOOLS_HOME,stdio:["inherit","inherit","inherit"],env:process.env}),(0,d.logInfoPrintConsole)("Pnpm install success.")}}(Gu),function(){Gu.checkNpmConifg(),Gu.environmentHandler(),Gu.isPnpmInstalled()||Gu.executeInstallPnpm();const D=gu();_(u.join(D,i.WORK_SPACE))}();
\ No newline at end of file
diff --git a/code/SystemFeature/InsightIntent/IntentDriver/hvigorw b/code/DocsSample/ApplicationModels/MindSporeLiteArkTSDemo/hvigorw
similarity index 65%
rename from code/SystemFeature/InsightIntent/IntentDriver/hvigorw
rename to code/DocsSample/ApplicationModels/MindSporeLiteArkTSDemo/hvigorw
index 54aadd226..0576aadb4 100644
--- a/code/SystemFeature/InsightIntent/IntentDriver/hvigorw
+++ b/code/DocsSample/ApplicationModels/MindSporeLiteArkTSDemo/hvigorw
@@ -1,5 +1,18 @@
#!/bin/bash
-
+# ----------------------------------------------------------------------------
+# Copyright (c) 2023 Huawei Device Co., Ltd.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ----------------------------------------------------------------------------
# ----------------------------------------------------------------------------
# Hvigor startup script, version 1.0.0
#
diff --git a/code/BasicFeature/InsightIntent/IntentExecutor/hvigorw.bat b/code/DocsSample/ApplicationModels/MindSporeLiteArkTSDemo/hvigorw.bat
similarity index 70%
rename from code/BasicFeature/InsightIntent/IntentExecutor/hvigorw.bat
rename to code/DocsSample/ApplicationModels/MindSporeLiteArkTSDemo/hvigorw.bat
index 6861293e4..418f4a88c 100644
--- a/code/BasicFeature/InsightIntent/IntentExecutor/hvigorw.bat
+++ b/code/DocsSample/ApplicationModels/MindSporeLiteArkTSDemo/hvigorw.bat
@@ -1,3 +1,17 @@
+:: Copyright (c) 2023 Huawei Device Co., Ltd.
+:: Licensed under the Apache License, Version 2.0 (the "License");
+:: you may not use this file except in compliance with the License.
+:: You may obtain a copy of the License at
+::
+:: http://www.apache.org/licenses/LICENSE-2.0
+::
+:: Unless required by applicable law or agreed to in writing, software
+:: distributed under the License is distributed on an "AS IS" BASIS,
+:: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+:: See the License for the specific language governing permissions and
+:: limitations under the License.
+
+@echo off
@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
@@ -53,12 +67,5 @@ goto fail
@rem Execute hvigor
"%NODE_EXE%" %WRAPPER_MODULE_PATH% %*
-if "%ERRORLEVEL%" == "0" goto hvigorwEnd
-
:fail
exit /b 1
-
-:hvigorwEnd
-if "%OS%" == "Windows_NT" endlocal
-
-:end
diff --git a/code/DocsSample/ApplicationModels/MindSporeLiteCDemo/hvigor/hvigor-wrapper.js b/code/DocsSample/ApplicationModels/MindSporeLiteCDemo/hvigor/hvigor-wrapper.js
new file mode 100644
index 000000000..372eae8eb
--- /dev/null
+++ b/code/DocsSample/ApplicationModels/MindSporeLiteCDemo/hvigor/hvigor-wrapper.js
@@ -0,0 +1 @@
+"use strict";var u=require("path"),D=require("os"),e=require("fs"),t=require("crypto"),r=require("child_process"),n="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},i={},C={},F=n&&n.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(C,"__esModule",{value:!0}),C.maxPathLength=C.isMac=C.isLinux=C.isWindows=void 0;const E=F(D),A="Windows_NT",o="Darwin";function a(){return E.default.type()===A}function c(){return E.default.type()===o}C.isWindows=a,C.isLinux=function(){return"Linux"===E.default.type()},C.isMac=c,C.maxPathLength=function(){return c()?1016:a()?259:4095},function(e){var t=n&&n.__createBinding||(Object.create?function(u,D,e,t){void 0===t&&(t=e);var r=Object.getOwnPropertyDescriptor(D,e);r&&!("get"in r?!D.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return D[e]}}),Object.defineProperty(u,t,r)}:function(u,D,e,t){void 0===t&&(t=e),u[t]=D[e]}),r=n&&n.__setModuleDefault||(Object.create?function(u,D){Object.defineProperty(u,"default",{enumerable:!0,value:D})}:function(u,D){u.default=D}),i=n&&n.__importStar||function(u){if(u&&u.__esModule)return u;var D={};if(null!=u)for(var e in u)"default"!==e&&Object.prototype.hasOwnProperty.call(u,e)&&t(D,u,e);return r(D,u),D};Object.defineProperty(e,"__esModule",{value:!0}),e.WORK_SPACE=e.HVIGOR_PROJECT_WRAPPER_HOME=e.HVIGOR_PROJECT_ROOT_DIR=e.HVIGOR_PROJECT_CACHES_HOME=e.HVIGOR_PNPM_STORE_PATH=e.HVIGOR_WRAPPER_PNPM_SCRIPT_PATH=e.PROJECT_CACHES=e.HVIGOR_WRAPPER_TOOLS_HOME=e.HVIGOR_USER_HOME=e.DEFAULT_PACKAGE_JSON=e.DEFAULT_HVIGOR_CONFIG_JSON_FILE_NAME=e.PNPM=e.HVIGOR=e.NPM_TOOL=e.PNPM_TOOL=e.HVIGOR_ENGINE_PACKAGE_NAME=void 0;const F=i(D),E=i(u),A=C;e.HVIGOR_ENGINE_PACKAGE_NAME="@ohos/hvigor",e.PNPM_TOOL=(0,A.isWindows)()?"pnpm.cmd":"pnpm",e.NPM_TOOL=(0,A.isWindows)()?"npm.cmd":"npm",e.HVIGOR="hvigor",e.PNPM="pnpm",e.DEFAULT_HVIGOR_CONFIG_JSON_FILE_NAME="hvigor-config.json5",e.DEFAULT_PACKAGE_JSON="package.json",e.HVIGOR_USER_HOME=E.resolve(F.homedir(),".hvigor"),e.HVIGOR_WRAPPER_TOOLS_HOME=E.resolve(e.HVIGOR_USER_HOME,"wrapper","tools"),e.PROJECT_CACHES="project_caches",e.HVIGOR_WRAPPER_PNPM_SCRIPT_PATH=E.resolve(e.HVIGOR_WRAPPER_TOOLS_HOME,"node_modules",".bin",e.PNPM_TOOL),e.HVIGOR_PNPM_STORE_PATH=E.resolve(e.HVIGOR_USER_HOME,"caches"),e.HVIGOR_PROJECT_CACHES_HOME=E.resolve(e.HVIGOR_USER_HOME,e.PROJECT_CACHES),e.HVIGOR_PROJECT_ROOT_DIR=process.cwd(),e.HVIGOR_PROJECT_WRAPPER_HOME=E.resolve(e.HVIGOR_PROJECT_ROOT_DIR,e.HVIGOR),e.WORK_SPACE="workspace"}(i);var s={},l={};Object.defineProperty(l,"__esModule",{value:!0}),l.logInfoPrintConsole=l.logErrorAndExit=void 0,l.logErrorAndExit=function(u){u instanceof Error?console.error(u.message):console.error(u),process.exit(-1)},l.logInfoPrintConsole=function(u){console.log(u)};var B=n&&n.__createBinding||(Object.create?function(u,D,e,t){void 0===t&&(t=e);var r=Object.getOwnPropertyDescriptor(D,e);r&&!("get"in r?!D.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return D[e]}}),Object.defineProperty(u,t,r)}:function(u,D,e,t){void 0===t&&(t=e),u[t]=D[e]}),d=n&&n.__setModuleDefault||(Object.create?function(u,D){Object.defineProperty(u,"default",{enumerable:!0,value:D})}:function(u,D){u.default=D}),f=n&&n.__importStar||function(u){if(u&&u.__esModule)return u;var D={};if(null!=u)for(var e in u)"default"!==e&&Object.prototype.hasOwnProperty.call(u,e)&&B(D,u,e);return d(D,u),D};Object.defineProperty(s,"__esModule",{value:!0});var _=s.executeBuild=void 0;const p=f(e),O=f(u),h=l;_=s.executeBuild=function(u){const D=O.resolve(u,"node_modules","@ohos","hvigor","bin","hvigor.js");try{const u=p.realpathSync(D);require(u)}catch(e){(0,h.logErrorAndExit)(`Error: ENOENT: no such file ${D},delete ${u} and retry.`)}};var P={},v={};!function(u){var D=n&&n.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(u,"__esModule",{value:!0}),u.hashFile=u.hash=u.createHash=void 0;const r=D(t),i=D(e);u.createHash=(u="MD5")=>r.default.createHash(u);u.hash=(D,e)=>(0,u.createHash)(e).update(D).digest("hex");u.hashFile=(D,e)=>{if(i.default.existsSync(D))return(0,u.hash)(i.default.readFileSync(D,"utf-8"),e)}}(v);var g={},m={},R={};Object.defineProperty(R,"__esModule",{value:!0}),R.Unicode=void 0;class y{}R.Unicode=y,y.SPACE_SEPARATOR=/[\u1680\u2000-\u200A\u202F\u205F\u3000]/,y.ID_START=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/,y.ID_CONTINUE=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/,Object.defineProperty(m,"__esModule",{value:!0}),m.JudgeUtil=void 0;const I=R;m.JudgeUtil=class{static isIgnoreChar(u){return"string"==typeof u&&("\t"===u||"\v"===u||"\f"===u||" "===u||" "===u||"\ufeff"===u||"\n"===u||"\r"===u||"\u2028"===u||"\u2029"===u)}static isSpaceSeparator(u){return"string"==typeof u&&I.Unicode.SPACE_SEPARATOR.test(u)}static isIdStartChar(u){return"string"==typeof u&&(u>="a"&&u<="z"||u>="A"&&u<="Z"||"$"===u||"_"===u||I.Unicode.ID_START.test(u))}static isIdContinueChar(u){return"string"==typeof u&&(u>="a"&&u<="z"||u>="A"&&u<="Z"||u>="0"&&u<="9"||"$"===u||"_"===u||""===u||""===u||I.Unicode.ID_CONTINUE.test(u))}static isDigitWithoutZero(u){return/[1-9]/.test(u)}static isDigit(u){return"string"==typeof u&&/[0-9]/.test(u)}static isHexDigit(u){return"string"==typeof u&&/[0-9A-Fa-f]/.test(u)}};var N=n&&n.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(g,"__esModule",{value:!0}),g.parseJsonText=g.parseJsonFile=void 0;const b=N(e),S=N(D),w=N(u),H=m;var x;!function(u){u[u.Char=0]="Char",u[u.EOF=1]="EOF",u[u.Identifier=2]="Identifier"}(x||(x={}));let M,T,V,G,j,J,W="start",U=[],L=0,$=1,k=0,K=!1,z="default",q="'",Z=1;function X(u,D=!1){T=String(u),W="start",U=[],L=0,$=1,k=0,G=void 0,K=D;do{M=Q(),nu[W]()}while("eof"!==M.type);return G}function Q(){for(z="default",j="",q="'",Z=1;;){J=Y();const u=Du[z]();if(u)return u}}function Y(){if(T[L])return String.fromCodePoint(T.codePointAt(L))}function uu(){const u=Y();return"\n"===u?($++,k=0):u?k+=u.length:k++,u&&(L+=u.length),u}g.parseJsonFile=function(u,D=!1,e="utf-8"){const t=b.default.readFileSync(w.default.resolve(u),{encoding:e});try{return X(t,D)}catch(D){if(D instanceof SyntaxError){const e=D.message.split("at");if(2===e.length)throw new Error(`${e[0].trim()}${S.default.EOL}\t at ${u}:${e[1].trim()}`)}throw new Error(`${u} is not in valid JSON/JSON5 format.`)}},g.parseJsonText=X;const Du={default(){switch(J){case"/":return uu(),void(z="comment");case void 0:return uu(),eu("eof")}if(!H.JudgeUtil.isIgnoreChar(J)&&!H.JudgeUtil.isSpaceSeparator(J))return Du[W]();uu()},start(){z="value"},beforePropertyName(){switch(J){case"$":case"_":return j=uu(),void(z="identifierName");case"\\":return uu(),void(z="identifierNameStartEscape");case"}":return eu("punctuator",uu());case'"':case"'":return q=J,uu(),void(z="string")}if(H.JudgeUtil.isIdStartChar(J))return j+=uu(),void(z="identifierName");throw Eu(x.Char,uu())},afterPropertyName(){if(":"===J)return eu("punctuator",uu());throw Eu(x.Char,uu())},beforePropertyValue(){z="value"},afterPropertyValue(){switch(J){case",":case"}":return eu("punctuator",uu())}throw Eu(x.Char,uu())},beforeArrayValue(){if("]"===J)return eu("punctuator",uu());z="value"},afterArrayValue(){switch(J){case",":case"]":return eu("punctuator",uu())}throw Eu(x.Char,uu())},end(){throw Eu(x.Char,uu())},comment(){switch(J){case"*":return uu(),void(z="multiLineComment");case"/":return uu(),void(z="singleLineComment")}throw Eu(x.Char,uu())},multiLineComment(){switch(J){case"*":return uu(),void(z="multiLineCommentAsterisk");case void 0:throw Eu(x.Char,uu())}uu()},multiLineCommentAsterisk(){switch(J){case"*":return void uu();case"/":return uu(),void(z="default");case void 0:throw Eu(x.Char,uu())}uu(),z="multiLineComment"},singleLineComment(){switch(J){case"\n":case"\r":case"\u2028":case"\u2029":return uu(),void(z="default");case void 0:return uu(),eu("eof")}uu()},value(){switch(J){case"{":case"[":return eu("punctuator",uu());case"n":return uu(),tu("ull"),eu("null",null);case"t":return uu(),tu("rue"),eu("boolean",!0);case"f":return uu(),tu("alse"),eu("boolean",!1);case"-":case"+":return"-"===uu()&&(Z=-1),void(z="numerical");case".":case"0":case"I":case"N":return void(z="numerical");case'"':case"'":return q=J,uu(),j="",void(z="string")}if(void 0===J||!H.JudgeUtil.isDigitWithoutZero(J))throw Eu(x.Char,uu());z="numerical"},numerical(){switch(J){case".":return j=uu(),void(z="decimalPointLeading");case"0":return j=uu(),void(z="zero");case"I":return uu(),tu("nfinity"),eu("numeric",Z*(1/0));case"N":return uu(),tu("aN"),eu("numeric",NaN)}if(void 0!==J&&H.JudgeUtil.isDigitWithoutZero(J))return j=uu(),void(z="decimalInteger");throw Eu(x.Char,uu())},zero(){switch(J){case".":case"e":case"E":return void(z="decimal");case"x":case"X":return j+=uu(),void(z="hexadecimal")}return eu("numeric",0)},decimalInteger(){switch(J){case".":case"e":case"E":return void(z="decimal")}if(!H.JudgeUtil.isDigit(J))return eu("numeric",Z*Number(j));j+=uu()},decimal(){switch(J){case".":j+=uu(),z="decimalFraction";break;case"e":case"E":j+=uu(),z="decimalExponent"}},decimalPointLeading(){if(H.JudgeUtil.isDigit(J))return j+=uu(),void(z="decimalFraction");throw Eu(x.Char,uu())},decimalFraction(){switch(J){case"e":case"E":return j+=uu(),void(z="decimalExponent")}if(!H.JudgeUtil.isDigit(J))return eu("numeric",Z*Number(j));j+=uu()},decimalExponent(){switch(J){case"+":case"-":return j+=uu(),void(z="decimalExponentSign")}if(H.JudgeUtil.isDigit(J))return j+=uu(),void(z="decimalExponentInteger");throw Eu(x.Char,uu())},decimalExponentSign(){if(H.JudgeUtil.isDigit(J))return j+=uu(),void(z="decimalExponentInteger");throw Eu(x.Char,uu())},decimalExponentInteger(){if(!H.JudgeUtil.isDigit(J))return eu("numeric",Z*Number(j));j+=uu()},hexadecimal(){if(H.JudgeUtil.isHexDigit(J))return j+=uu(),void(z="hexadecimalInteger");throw Eu(x.Char,uu())},hexadecimalInteger(){if(!H.JudgeUtil.isHexDigit(J))return eu("numeric",Z*Number(j));j+=uu()},identifierNameStartEscape(){if("u"!==J)throw Eu(x.Char,uu());uu();const u=ru();switch(u){case"$":case"_":break;default:if(!H.JudgeUtil.isIdStartChar(u))throw Eu(x.Identifier)}j+=u,z="identifierName"},identifierName(){switch(J){case"$":case"_":case"":case"":return void(j+=uu());case"\\":return uu(),void(z="identifierNameEscape")}if(!H.JudgeUtil.isIdContinueChar(J))return eu("identifier",j);j+=uu()},identifierNameEscape(){if("u"!==J)throw Eu(x.Char,uu());uu();const u=ru();switch(u){case"$":case"_":case"":case"":break;default:if(!H.JudgeUtil.isIdContinueChar(u))throw Eu(x.Identifier)}j+=u,z="identifierName"},string(){switch(J){case"\\":return uu(),void(j+=function(){const u=Y(),D=function(){switch(Y()){case"b":return uu(),"\b";case"f":return uu(),"\f";case"n":return uu(),"\n";case"r":return uu(),"\r";case"t":return uu(),"\t";case"v":return uu(),"\v"}return}();if(D)return D;switch(u){case"0":if(uu(),H.JudgeUtil.isDigit(Y()))throw Eu(x.Char,uu());return"\0";case"x":return uu(),function(){let u="",D=Y();if(!H.JudgeUtil.isHexDigit(D))throw Eu(x.Char,uu());if(u+=uu(),D=Y(),!H.JudgeUtil.isHexDigit(D))throw Eu(x.Char,uu());return u+=uu(),String.fromCodePoint(parseInt(u,16))}();case"u":return uu(),ru();case"\n":case"\u2028":case"\u2029":return uu(),"";case"\r":return uu(),"\n"===Y()&&uu(),""}if(void 0===u||H.JudgeUtil.isDigitWithoutZero(u))throw Eu(x.Char,uu());return uu()}());case'"':case"'":if(J===q){const u=eu("string",j);return uu(),u}return void(j+=uu());case"\n":case"\r":case void 0:throw Eu(x.Char,uu());case"\u2028":case"\u2029":!function(u){console.warn(`JSON5: '${Fu(u)}' in strings is not valid ECMAScript; consider escaping.`)}(J)}j+=uu()}};function eu(u,D){return{type:u,value:D,line:$,column:k}}function tu(u){for(const D of u){if(Y()!==D)throw Eu(x.Char,uu());uu()}}function ru(){let u="",D=4;for(;D-- >0;){const D=Y();if(!H.JudgeUtil.isHexDigit(D))throw Eu(x.Char,uu());u+=uu()}return String.fromCodePoint(parseInt(u,16))}const nu={start(){if("eof"===M.type)throw Eu(x.EOF);iu()},beforePropertyName(){switch(M.type){case"identifier":case"string":return V=M.value,void(W="afterPropertyName");case"punctuator":return void Cu();case"eof":throw Eu(x.EOF)}},afterPropertyName(){if("eof"===M.type)throw Eu(x.EOF);W="beforePropertyValue"},beforePropertyValue(){if("eof"===M.type)throw Eu(x.EOF);iu()},afterPropertyValue(){if("eof"===M.type)throw Eu(x.EOF);switch(M.value){case",":return void(W="beforePropertyName");case"}":Cu()}},beforeArrayValue(){if("eof"===M.type)throw Eu(x.EOF);"punctuator"!==M.type||"]"!==M.value?iu():Cu()},afterArrayValue(){if("eof"===M.type)throw Eu(x.EOF);switch(M.value){case",":return void(W="beforeArrayValue");case"]":Cu()}},end(){}};function iu(){const u=function(){let u;switch(M.type){case"punctuator":switch(M.value){case"{":u={};break;case"[":u=[]}break;case"null":case"boolean":case"numeric":case"string":u=M.value}return u}();if(K&&"object"==typeof u&&(u._line=$,u._column=k),void 0===G)G=u;else{const D=U[U.length-1];Array.isArray(D)?K&&"object"!=typeof u?D.push({value:u,_line:$,_column:k}):D.push(u):D[V]=K&&"object"!=typeof u?{value:u,_line:$,_column:k}:u}!function(u){if(u&&"object"==typeof u)U.push(u),W=Array.isArray(u)?"beforeArrayValue":"beforePropertyName";else{const u=U[U.length-1];W=u?Array.isArray(u)?"afterArrayValue":"afterPropertyValue":"end"}}(u)}function Cu(){U.pop();const u=U[U.length-1];W=u?Array.isArray(u)?"afterArrayValue":"afterPropertyValue":"end"}function Fu(u){const D={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};if(D[u])return D[u];if(u<" "){const D=u.charCodeAt(0).toString(16);return`\\x${`00${D}`.substring(D.length)}`}return u}function Eu(u,D){let e="";switch(u){case x.Char:e=void 0===D?`JSON5: invalid end of input at ${$}:${k}`:`JSON5: invalid character '${Fu(D)}' at ${$}:${k}`;break;case x.EOF:e=`JSON5: invalid end of input at ${$}:${k}`;break;case x.Identifier:k-=5,e=`JSON5: invalid identifier character at ${$}:${k}`}const t=new Au(e);return t.lineNumber=$,t.columnNumber=k,t}class Au extends SyntaxError{}var ou={},au=n&&n.__createBinding||(Object.create?function(u,D,e,t){void 0===t&&(t=e);var r=Object.getOwnPropertyDescriptor(D,e);r&&!("get"in r?!D.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return D[e]}}),Object.defineProperty(u,t,r)}:function(u,D,e,t){void 0===t&&(t=e),u[t]=D[e]}),cu=n&&n.__setModuleDefault||(Object.create?function(u,D){Object.defineProperty(u,"default",{enumerable:!0,value:D})}:function(u,D){u.default=D}),su=n&&n.__importStar||function(u){if(u&&u.__esModule)return u;var D={};if(null!=u)for(var e in u)"default"!==e&&Object.prototype.hasOwnProperty.call(u,e)&&au(D,u,e);return cu(D,u),D},lu=n&&n.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(ou,"__esModule",{value:!0}),ou.isFileExists=ou.offlinePluginConversion=ou.executeCommand=ou.getNpmPath=ou.hasNpmPackInPaths=void 0;const Bu=r,du=lu(e),fu=su(u),_u=i,pu=l;ou.hasNpmPackInPaths=function(u,D){try{return require.resolve(u,{paths:[...D]}),!0}catch(u){return!1}},ou.getNpmPath=function(){const u=process.execPath;return fu.join(fu.dirname(u),_u.NPM_TOOL)},ou.executeCommand=function(u,D,e){0!==(0,Bu.spawnSync)(u,D,e).status&&(0,pu.logErrorAndExit)(`Error: ${u} ${D} execute failed.See above for details.`)},ou.offlinePluginConversion=function(u,D){return D.startsWith("file:")||D.endsWith(".tgz")?fu.resolve(u,_u.HVIGOR,D.replace("file:","")):D},ou.isFileExists=function(u){return du.default.existsSync(u)&&du.default.statSync(u).isFile()};var Ou=n&&n.__createBinding||(Object.create?function(u,D,e,t){void 0===t&&(t=e);var r=Object.getOwnPropertyDescriptor(D,e);r&&!("get"in r?!D.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return D[e]}}),Object.defineProperty(u,t,r)}:function(u,D,e,t){void 0===t&&(t=e),u[t]=D[e]}),hu=n&&n.__setModuleDefault||(Object.create?function(u,D){Object.defineProperty(u,"default",{enumerable:!0,value:D})}:function(u,D){u.default=D}),Pu=n&&n.__importStar||function(u){if(u&&u.__esModule)return u;var D={};if(null!=u)for(var e in u)"default"!==e&&Object.prototype.hasOwnProperty.call(u,e)&&Ou(D,u,e);return hu(D,u),D},vu=n&&n.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(P,"__esModule",{value:!0});var gu=P.initProjectWorkSpace=void 0;const mu=Pu(e),Ru=vu(D),yu=Pu(u),Iu=v,Nu=i,bu=g,Su=l,wu=ou;let Hu,xu,Mu;function Tu(u,D,e){return void 0!==e.dependencies&&(0,wu.offlinePluginConversion)(Nu.HVIGOR_PROJECT_ROOT_DIR,D.dependencies[u])===yu.normalize(e.dependencies[u])}function Vu(){const u=yu.join(Mu,Nu.WORK_SPACE);if((0,Su.logInfoPrintConsole)("Hvigor cleaning..."),!mu.existsSync(u))return;const D=mu.readdirSync(u);if(!D||0===D.length)return;const e=yu.resolve(Mu,"node_modules","@ohos","hvigor","bin","hvigor.js");mu.existsSync(e)&&(0,wu.executeCommand)(process.argv[0],[e,"--stop-daemon"],{});try{D.forEach((D=>{mu.rmSync(yu.resolve(u,D),{recursive:!0})}))}catch(D){(0,Su.logErrorAndExit)(`The hvigor build tool cannot be installed. Please manually clear the workspace directory and synchronize the project again.\n\n Workspace Path: ${u}.`)}}gu=P.initProjectWorkSpace=function(){if(Hu=function(){const u=yu.resolve(Nu.HVIGOR_PROJECT_WRAPPER_HOME,Nu.DEFAULT_HVIGOR_CONFIG_JSON_FILE_NAME);mu.existsSync(u)||(0,Su.logErrorAndExit)(`Error: Hvigor config file ${u} does not exist.`);return(0,bu.parseJsonFile)(u)}(),Mu=function(u){let D;D=function(u){let D=u.hvigorVersion;if(D.startsWith("file:")||D.endsWith(".tgz"))return!1;const e=u.dependencies,t=Object.getOwnPropertyNames(e);for(const u of t){const D=e[u];if(D.startsWith("file:")||D.endsWith(".tgz"))return!1}if(1===t.length&&"@ohos/hvigor-ohos-plugin"===t[0])return D>"2.5.0";return!1}(u)?function(u){let D=`${Nu.HVIGOR_ENGINE_PACKAGE_NAME}@${u.hvigorVersion}`;const e=u.dependencies;if(e){Object.getOwnPropertyNames(e).sort().forEach((u=>{D+=`,${u}@${e[u]}`}))}return(0,Iu.hash)(D)}(u):(0,Iu.hash)(process.cwd());return yu.resolve(Ru.default.homedir(),".hvigor","project_caches",D)}(Hu),xu=function(){const u=yu.resolve(Mu,Nu.WORK_SPACE,Nu.DEFAULT_PACKAGE_JSON);return mu.existsSync(u)?(0,bu.parseJsonFile)(u):{dependencies:{}}}(),!(0,wu.hasNpmPackInPaths)(Nu.HVIGOR_ENGINE_PACKAGE_NAME,[yu.join(Mu,Nu.WORK_SPACE)])||(0,wu.offlinePluginConversion)(Nu.HVIGOR_PROJECT_ROOT_DIR,Hu.hvigorVersion)!==xu.dependencies[Nu.HVIGOR_ENGINE_PACKAGE_NAME]||!function(){function u(u){const D=null==u?void 0:u.dependencies;return void 0===D?0:Object.getOwnPropertyNames(D).length}const D=u(Hu),e=u(xu);if(D+1!==e)return!1;for(const u in null==Hu?void 0:Hu.dependencies)if(!(0,wu.hasNpmPackInPaths)(u,[yu.join(Mu,Nu.WORK_SPACE)])||!Tu(u,Hu,xu))return!1;return!0}()){Vu();try{!function(){(0,Su.logInfoPrintConsole)("Hvigor installing...");for(const u in Hu.dependencies)Hu.dependencies[u]&&(Hu.dependencies[u]=(0,wu.offlinePluginConversion)(Nu.HVIGOR_PROJECT_ROOT_DIR,Hu.dependencies[u]));const u={dependencies:{...Hu.dependencies}};u.dependencies[Nu.HVIGOR_ENGINE_PACKAGE_NAME]=(0,wu.offlinePluginConversion)(Nu.HVIGOR_PROJECT_ROOT_DIR,Hu.hvigorVersion);const D=yu.join(Mu,Nu.WORK_SPACE);try{mu.mkdirSync(D,{recursive:!0});const e=yu.resolve(D,Nu.DEFAULT_PACKAGE_JSON);mu.writeFileSync(e,JSON.stringify(u))}catch(u){(0,Su.logErrorAndExit)(u)}(function(){const u=["config","set","store-dir",Nu.HVIGOR_PNPM_STORE_PATH],D={cwd:yu.join(Mu,Nu.WORK_SPACE),stdio:["inherit","inherit","inherit"]};(0,wu.executeCommand)(Nu.HVIGOR_WRAPPER_PNPM_SCRIPT_PATH,u,D)})(),function(){const u=["install"],D={cwd:yu.join(Mu,Nu.WORK_SPACE),stdio:["inherit","inherit","inherit"]};(0,wu.executeCommand)(Nu.HVIGOR_WRAPPER_PNPM_SCRIPT_PATH,u,D)}(),(0,Su.logInfoPrintConsole)("Hvigor install success.")}()}catch(u){Vu()}}return Mu};var Gu={};!function(t){var C=n&&n.__createBinding||(Object.create?function(u,D,e,t){void 0===t&&(t=e);var r=Object.getOwnPropertyDescriptor(D,e);r&&!("get"in r?!D.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return D[e]}}),Object.defineProperty(u,t,r)}:function(u,D,e,t){void 0===t&&(t=e),u[t]=D[e]}),F=n&&n.__setModuleDefault||(Object.create?function(u,D){Object.defineProperty(u,"default",{enumerable:!0,value:D})}:function(u,D){u.default=D}),E=n&&n.__importStar||function(u){if(u&&u.__esModule)return u;var D={};if(null!=u)for(var e in u)"default"!==e&&Object.prototype.hasOwnProperty.call(u,e)&&C(D,u,e);return F(D,u),D},A=n&&n.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(t,"__esModule",{value:!0}),t.executeInstallPnpm=t.isPnpmInstalled=t.environmentHandler=t.checkNpmConifg=t.PNPM_VERSION=void 0;const o=r,a=E(e),c=A(D),s=E(u),B=i,d=l,f=ou;t.PNPM_VERSION="7.30.0",t.checkNpmConifg=function(){const u=s.resolve(B.HVIGOR_PROJECT_ROOT_DIR,".npmrc"),D=s.resolve(c.default.homedir(),".npmrc");if((0,f.isFileExists)(u)||(0,f.isFileExists)(D))return;const e=(0,f.getNpmPath)(),t=(0,o.spawnSync)(e,["config","get","prefix"],{cwd:B.HVIGOR_PROJECT_ROOT_DIR});if(0!==t.status||!t.stdout)return void(0,d.logErrorAndExit)("Error: The hvigor depends on the npmrc file. Configure the npmrc file first.");const r=s.resolve(`${t.stdout}`.replace(/[\r\n]/gi,""),".npmrc");(0,f.isFileExists)(r)||(0,d.logErrorAndExit)("Error: The hvigor depends on the npmrc file. Configure the npmrc file first.")},t.environmentHandler=function(){process.env["npm_config_update-notifier"]="false"},t.isPnpmInstalled=function(){return!!a.existsSync(B.HVIGOR_WRAPPER_PNPM_SCRIPT_PATH)&&(0,f.hasNpmPackInPaths)("pnpm",[B.HVIGOR_WRAPPER_TOOLS_HOME])},t.executeInstallPnpm=function(){(0,d.logInfoPrintConsole)(`Installing pnpm@${t.PNPM_VERSION}...`);const u=(0,f.getNpmPath)();!function(){const u=s.resolve(B.HVIGOR_WRAPPER_TOOLS_HOME,B.DEFAULT_PACKAGE_JSON);try{a.existsSync(B.HVIGOR_WRAPPER_TOOLS_HOME)||a.mkdirSync(B.HVIGOR_WRAPPER_TOOLS_HOME,{recursive:!0});const D={dependencies:{}};D.dependencies[B.PNPM]=t.PNPM_VERSION,a.writeFileSync(u,JSON.stringify(D))}catch(D){(0,d.logErrorAndExit)(`Error: EPERM: operation not permitted,create ${u} failed.`)}}(),(0,f.executeCommand)(u,["install","pnpm"],{cwd:B.HVIGOR_WRAPPER_TOOLS_HOME,stdio:["inherit","inherit","inherit"],env:process.env}),(0,d.logInfoPrintConsole)("Pnpm install success.")}}(Gu),function(){Gu.checkNpmConifg(),Gu.environmentHandler(),Gu.isPnpmInstalled()||Gu.executeInstallPnpm();const D=gu();_(u.join(D,i.WORK_SPACE))}();
\ No newline at end of file
diff --git a/code/DocsSample/ApplicationModels/MindSporeLiteCDemo/hvigorw b/code/DocsSample/ApplicationModels/MindSporeLiteCDemo/hvigorw
new file mode 100644
index 000000000..0576aadb4
--- /dev/null
+++ b/code/DocsSample/ApplicationModels/MindSporeLiteCDemo/hvigorw
@@ -0,0 +1,61 @@
+#!/bin/bash
+# ----------------------------------------------------------------------------
+# Copyright (c) 2023 Huawei Device Co., Ltd.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ----------------------------------------------------------------------------
+# ----------------------------------------------------------------------------
+# Hvigor startup script, version 1.0.0
+#
+# Required ENV vars:
+# ------------------
+# NODE_HOME - location of a Node home dir
+# or
+# Add /usr/local/nodejs/bin to the PATH environment variable
+# ----------------------------------------------------------------------------
+
+HVIGOR_APP_HOME=$(dirname $(readlink -f $0))
+HVIGOR_WRAPPER_SCRIPT=${HVIGOR_APP_HOME}/hvigor/hvigor-wrapper.js
+warn() {
+ echo ""
+ echo -e "\033[1;33m`date '+[%Y-%m-%d %H:%M:%S]'`$@\033[0m"
+}
+
+error() {
+ echo ""
+ echo -e "\033[1;31m`date '+[%Y-%m-%d %H:%M:%S]'`$@\033[0m"
+}
+
+fail() {
+ error "$@"
+ exit 1
+}
+
+# Determine node to start hvigor wrapper script
+if [ -n "${NODE_HOME}" ];then
+ EXECUTABLE_NODE="${NODE_HOME}/bin/node"
+ if [ ! -x "$EXECUTABLE_NODE" ];then
+ fail "ERROR: NODE_HOME is set to an invalid directory,check $NODE_HOME\n\nPlease set NODE_HOME in your environment to the location where your nodejs installed"
+ fi
+else
+ EXECUTABLE_NODE="node"
+ which ${EXECUTABLE_NODE} > /dev/null 2>&1 || fail "ERROR: NODE_HOME is not set and not 'node' command found in your path"
+fi
+
+# Check hvigor wrapper script
+if [ ! -r "$HVIGOR_WRAPPER_SCRIPT" ];then
+ fail "ERROR: Couldn't find hvigor/hvigor-wrapper.js in ${HVIGOR_APP_HOME}"
+fi
+
+# start hvigor-wrapper script
+exec "${EXECUTABLE_NODE}" \
+ "${HVIGOR_WRAPPER_SCRIPT}" "$@"
diff --git a/code/DocsSample/ApplicationModels/MindSporeLiteCDemo/hvigorw.bat b/code/DocsSample/ApplicationModels/MindSporeLiteCDemo/hvigorw.bat
new file mode 100644
index 000000000..418f4a88c
--- /dev/null
+++ b/code/DocsSample/ApplicationModels/MindSporeLiteCDemo/hvigorw.bat
@@ -0,0 +1,71 @@
+:: Copyright (c) 2023 Huawei Device Co., Ltd.
+:: Licensed under the Apache License, Version 2.0 (the "License");
+:: you may not use this file except in compliance with the License.
+:: You may obtain a copy of the License at
+::
+:: http://www.apache.org/licenses/LICENSE-2.0
+::
+:: Unless required by applicable law or agreed to in writing, software
+:: distributed under the License is distributed on an "AS IS" BASIS,
+:: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+:: See the License for the specific language governing permissions and
+:: limitations under the License.
+
+@echo off
+@if "%DEBUG%" == "" @echo off
+@rem ##########################################################################
+@rem
+@rem Hvigor startup script for Windows
+@rem
+@rem ##########################################################################
+
+@rem Set local scope for the variables with windows NT shell
+if "%OS%"=="Windows_NT" setlocal
+
+set DIRNAME=%~dp0
+if "%DIRNAME%" == "" set DIRNAME=.
+set APP_BASE_NAME=%~n0
+set APP_HOME=%DIRNAME%
+
+@rem Resolve any "." and ".." in APP_HOME to make it shorter.
+for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
+
+set WRAPPER_MODULE_PATH=%APP_HOME%\hvigor\hvigor-wrapper.js
+set NODE_EXE=node.exe
+
+goto start
+
+:start
+@rem Find node.exe
+if defined NODE_HOME goto findNodeFromNodeHome
+
+%NODE_EXE% --version >NUL 2>&1
+if "%ERRORLEVEL%" == "0" goto execute
+
+echo.
+echo ERROR: NODE_HOME is not set and no 'node' command could be found in your PATH.
+echo.
+echo Please set the NODE_HOME variable in your environment to match the
+echo location of your NodeJs installation.
+
+goto fail
+
+:findNodeFromNodeHome
+set NODE_HOME=%NODE_HOME:"=%
+set NODE_EXE_PATH=%NODE_HOME%/%NODE_EXE%
+
+if exist "%NODE_EXE_PATH%" goto execute
+echo.
+echo ERROR: NODE_HOME is not set and no 'node' command could be found in your PATH.
+echo.
+echo Please set the NODE_HOME variable in your environment to match the
+echo location of your NodeJs installation.
+
+goto fail
+
+:execute
+@rem Execute hvigor
+"%NODE_EXE%" %WRAPPER_MODULE_PATH% %*
+
+:fail
+exit /b 1
diff --git a/code/BasicFeature/InsightIntent/IntentExecutor/.gitignore b/code/DocsSample/ArkTSUtilsDocModule/.gitignore
similarity index 78%
rename from code/BasicFeature/InsightIntent/IntentExecutor/.gitignore
rename to code/DocsSample/ArkTSUtilsDocModule/.gitignore
index a76ef96ca..fbabf7710 100644
--- a/code/BasicFeature/InsightIntent/IntentExecutor/.gitignore
+++ b/code/DocsSample/ArkTSUtilsDocModule/.gitignore
@@ -8,5 +8,4 @@
/.clangd
/.clang-format
/.clang-tidy
-**/.test
-/oh-package-lock.json5
\ No newline at end of file
+**/.test
\ No newline at end of file
diff --git a/code/BasicFeature/InsightIntent/IntentExecutor/AppScope/app.json5 b/code/DocsSample/ArkTSUtilsDocModule/AppScope/app.json5
similarity index 85%
rename from code/BasicFeature/InsightIntent/IntentExecutor/AppScope/app.json5
rename to code/DocsSample/ArkTSUtilsDocModule/AppScope/app.json5
index 63331ae76..29ba22003 100644
--- a/code/BasicFeature/InsightIntent/IntentExecutor/AppScope/app.json5
+++ b/code/DocsSample/ArkTSUtilsDocModule/AppScope/app.json5
@@ -1,25 +1,25 @@
-/*
- * Copyright (c) 2023 Huawei Device Co., Ltd.
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-{
- "app": {
- "bundleName": "com.samples.intentexecutor",
- "vendor": "example",
- "versionCode": 1000000,
- "versionName": "1.0.0",
- "icon": "$media:app_icon",
- "label": "$string:app_name"
- }
-}
+/*
+ * Copyright (c) 2024 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+{
+ "app": {
+ "bundleName": "com.samples.arktsutilsdocmodule",
+ "vendor": "example",
+ "versionCode": 1000000,
+ "versionName": "1.0.0",
+ "icon": "$media:app_icon",
+ "label": "$string:app_name"
+ }
+}
diff --git a/code/BasicFeature/InsightIntent/IntentExecutor/AppScope/resources/base/element/string.json b/code/DocsSample/ArkTSUtilsDocModule/AppScope/resources/base/element/string.json
similarity index 60%
rename from code/BasicFeature/InsightIntent/IntentExecutor/AppScope/resources/base/element/string.json
rename to code/DocsSample/ArkTSUtilsDocModule/AppScope/resources/base/element/string.json
index 926e838b2..0fe0a24a3 100644
--- a/code/BasicFeature/InsightIntent/IntentExecutor/AppScope/resources/base/element/string.json
+++ b/code/DocsSample/ArkTSUtilsDocModule/AppScope/resources/base/element/string.json
@@ -1,8 +1,8 @@
-{
- "string": [
- {
- "name": "app_name",
- "value": "IntentExecutor"
- }
- ]
-}
+{
+ "string": [
+ {
+ "name": "app_name",
+ "value": "ArkTSUtilsDocsSample"
+ }
+ ]
+}
diff --git a/code/DocsSample/ArkTSUtilsDocModule/AppScope/resources/base/media/app_icon.png b/code/DocsSample/ArkTSUtilsDocModule/AppScope/resources/base/media/app_icon.png
new file mode 100644
index 000000000..cd45accb1
Binary files /dev/null and b/code/DocsSample/ArkTSUtilsDocModule/AppScope/resources/base/media/app_icon.png differ
diff --git a/code/DocsSample/ArkTSUtilsDocModule/README.MD b/code/DocsSample/ArkTSUtilsDocModule/README.MD
new file mode 100644
index 000000000..4682b7f9c
--- /dev/null
+++ b/code/DocsSample/ArkTSUtilsDocModule/README.MD
@@ -0,0 +1,73 @@
+# Example ArkTS Guide Document
+
+### Introduction
+
+This example uses the [ArkTS Guide Document]( https://gitee.com/openharmony/docs/tree/master/zh-cn/application-dev/arkts-utils )The development examples of various scenarios in the project are presented to help developers better understand the various capabilities provided by ArkTS and make reasonable use of them. The detailed description of the code displayed in this project can be found in the following link:
+
+1. [Shared module development guidance](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/arkts-utils/arkts-sendable-module.md).
+2. [CPU intensive task development guidance(TaskPool and Worker)](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/arkts-utils/cpu-intensive-task-development.md).
+3. [I/O intensive task development guide(TaskPool)](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/arkts-utils/io-intensive-task-development.md).
+4. [Single I/O task development guidance(Promise and async/await)](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/arkts-utils/single-io-development.md).
+5. [Synchronous task development guidance(TaskPool and Worker)](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/arkts-utils/sync-task-development.md).
+6. [Overview of Asynchronous Concurrency(Promise and async/await)](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/arkts-utils/async-concurrency-overview.md).
+
+### Effect preview
+
+|Homepage | Dropdown options for selecting various scenarios | Immediate feedback on execution and results|
+|-------------------------------------|-------------------------------------|-----------------------|
+| ![](screenshots/device/image1.jpeg) | ![](screenshots/device/image2.jpeg) | ![](screenshots/device/image3.jpeg) |
+
+### Instructions for use
+
+1. On the main interface, you can click on the dropdown option and select the scene that needs to be executed.
+
+2. Select the scenario that needs to be executed and click the * * Execute this Test * * button below to start executing.
+
+3. The execution result will be immediately feedback above the button.
+
+### Engineering Catalog
+
+```
+entry/src/main/ets/
+|---entryability
+|---managers
+| |---arkts-sendable-module.ets // sample code for shared modules
+| |---async-concurrency-overview.ets // asynchronous example code
+| |---cpu-intensive-task.ets // example code for intensive tasks
+| |---file-write.ets // sample code for file read and write implementation
+| |---Handle.ets // sample code for synchronizing task data definition
+| |---io-intensive-task.ets // IO intensive example code
+| |---manager.ets // summarize and call the functions of each module
+| |---sharedModule.ets // sample code for defining shared module data
+| |---single-io-development.ets // single IO Example Code
+| |---sync-task-development.ets // sample code for synchronization task
+|---pages
+| |---Index.ets // 应用页面
+```
+
+### Related permissions
+
+Not involved.
+
+### Dependency
+
+Not involved.
+
+### Constraints and limitations
+1. This example only supports running on standard systems and supports devices such as RK3568.
+
+2. This example is a Stage model that supports API12 version SDK, version number: 5.0.0.26, and image version number: OpenHarmony_5.0.0.27.
+
+3. This example requires DevEco Studio NEXT Developer Preview2 (Build Version: 4.1.3.700, build on March 19, 2024) and above to compile and run.
+
+### Download
+
+To download this project separately, execute the following command:
+
+````
+git init
+git config core.sparsecheckout true
+echo code/DocsSample/ArkTSUtilsDocModule/ > .git/info/sparse-checkout
+git remote add origin https://gitee.com/openharmony/applications_app_samples.git
+git pull origin master
+````
\ No newline at end of file
diff --git a/code/DocsSample/ArkTSUtilsDocModule/README_zh.md b/code/DocsSample/ArkTSUtilsDocModule/README_zh.md
new file mode 100644
index 000000000..e38fa3ea1
--- /dev/null
+++ b/code/DocsSample/ArkTSUtilsDocModule/README_zh.md
@@ -0,0 +1,73 @@
+# ArkTS指南文档示例
+
+### 介绍
+
+本示例通过使用[ArkTS指南文档](https://gitee.com/openharmony/docs/tree/master/zh-cn/application-dev/arkts-utils)中各场景的开发示例,展示在工程中,帮助开发者更好地理解ArkTS提供的各项能力并合理使用。该工程中展示的代码详细描述可查如下链接:
+
+1. [共享模块开发指导](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/arkts-utils/arkts-sendable-module.md)。
+2. [CPU密集型任务开发指导 (TaskPool和Worker)](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/arkts-utils/cpu-intensive-task-development.md)。
+3. [I/O密集型任务开发指导 (TaskPool)](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/arkts-utils/io-intensive-task-development.md)。
+4. [单次I/O任务开发指导 (Promise和async/await)](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/arkts-utils/single-io-development.md)。
+5. [同步任务开发指导 (TaskPool和Worker)](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/arkts-utils/sync-task-development.md)。
+6. [异步并发概述 (Promise和async/await)](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/arkts-utils/async-concurrency-overview.md)。
+
+### 效果预览
+
+| 首页 | 下拉选项选择各场景 | 执行及结果即时反馈 |
+|-------------------------------------|-------------------------------------|-----------------------|
+| ![](screenshots/device/image1.jpeg) | ![](screenshots/device/image2.jpeg) | ![](screenshots/device/image3.jpeg) |
+
+### 使用说明
+
+1. 在主界面,可以点击下拉选项,选择需要执行的场景。
+
+2. 选择需要执行的场景,点击下方**Execute this Test**按钮开始执行。
+
+3. 执行结果会即时反馈在按钮上方。
+
+### 工程目录
+```
+entry/src/main/ets/
+|---entryability
+|---managers
+| |---arkts-sendable-module.ets // 共享模块示例代码
+| |---async-concurrency-overview.ets // 异步示例代码
+| |---cpu-intensive-task.ets // 密集型任务示例代码
+| |---file-write.ets // 文件读写实现示例代码
+| |---Handle.ets // 同步任务数据定义示例代码
+| |---io-intensive-task.ets // IO密集型示例代码
+| |---manager.ets // 各模块函数汇总调用
+| |---sharedModule.ets // 共享模块数据定义示例代码
+| |---single-io-development.ets // 单次IO示例代码
+| |---sync-task-development.ets // 同步任务示例代码
+|---pages
+| |---Index.ets // 应用页面
+```
+
+### 相关权限
+
+不涉及。
+
+### 依赖
+
+不涉及。
+
+### 约束与限制
+
+1.本示例仅支持标准系统上运行, 支持设备:RK3568。
+
+2.本示例为Stage模型,支持API12版本SDK,版本号:5.0.0.26,镜像版本号:OpenHarmony_5.0.0.27。
+
+3.本示例需要使用DevEco Studio NEXT Developer Preview2 (Build Version: 4.1.3.700, built on March 19, 2024)及以上版本才可编译运行。
+
+### 下载
+
+如需单独下载本工程,执行如下命令:
+
+````
+git init
+git config core.sparsecheckout true
+echo code/DocsSample/ArkTSUtilsDocModule/ > .git/info/sparse-checkout
+git remote add origin https://gitee.com/openharmony/applications_app_samples.git
+git pull origin master
+````
\ No newline at end of file
diff --git a/code/SystemFeature/InsightIntent/IntentDriver/build-profile.json5 b/code/DocsSample/ArkTSUtilsDocModule/build-profile.json5
similarity index 74%
rename from code/SystemFeature/InsightIntent/IntentDriver/build-profile.json5
rename to code/DocsSample/ArkTSUtilsDocModule/build-profile.json5
index 42cf1583a..b1c8c3cd2 100644
--- a/code/SystemFeature/InsightIntent/IntentDriver/build-profile.json5
+++ b/code/DocsSample/ArkTSUtilsDocModule/build-profile.json5
@@ -1,42 +1,51 @@
-/*
- * Copyright (c) 2023 Huawei Device Co., Ltd.
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-{
- "app": {
- "signingConfigs": [],
- "compileSdkVersion": 11,
- "compatibleSdkVersion": 11,
- "products": [
- {
- "name": "default",
- "signingConfig": "default"
- }
- ]
- },
- "modules": [
- {
- "name": "entry",
- "srcPath": "./entry",
- "targets": [
- {
- "name": "default",
- "applyToProducts": [
- "default"
- ]
- }
- ]
- }
- ]
+/*
+ * Copyright (c) 2024 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+{
+ "app": {
+ "signingConfigs": [],
+ "products": [
+ {
+ "name": "default",
+ "signingConfig": "default",
+ "compileSdkVersion": 12,
+ "compatibleSdkVersion": 12,
+ "runtimeOS": "OpenHarmony",
+ }
+ ],
+ "buildModeSet": [
+ {
+ "name": "debug",
+ },
+ {
+ "name": "release"
+ }
+ ]
+ },
+ "modules": [
+ {
+ "name": "entry",
+ "srcPath": "./entry",
+ "targets": [
+ {
+ "name": "default",
+ "applyToProducts": [
+ "default"
+ ]
+ }
+ ]
+ }
+ ]
}
\ No newline at end of file
diff --git a/code/SystemFeature/InsightIntent/IntentDriver/entry/.gitignore b/code/DocsSample/ArkTSUtilsDocModule/entry/.gitignore
similarity index 100%
rename from code/SystemFeature/InsightIntent/IntentDriver/entry/.gitignore
rename to code/DocsSample/ArkTSUtilsDocModule/entry/.gitignore
diff --git a/code/DocsSample/ArkTSUtilsDocModule/entry/build-profile.json5 b/code/DocsSample/ArkTSUtilsDocModule/entry/build-profile.json5
new file mode 100644
index 000000000..63b88fb1a
--- /dev/null
+++ b/code/DocsSample/ArkTSUtilsDocModule/entry/build-profile.json5
@@ -0,0 +1,43 @@
+/*
+ * Copyright (c) 2024 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+{
+ "apiType": "stageMode",
+ "buildOption": {
+ },
+ "buildOptionSet": [
+ {
+ "name": "release",
+ "arkOptions": {
+ "obfuscation": {
+ "ruleOptions": {
+ "enable": true,
+ "files": [
+ "./obfuscation-rules.txt"
+ ]
+ }
+ }
+ }
+ },
+ ],
+ "targets": [
+ {
+ "name": "default"
+ },
+ {
+ "name": "ohosTest",
+ }
+ ]
+}
\ No newline at end of file
diff --git a/code/DocsSample/ArkTSUtilsDocModule/entry/hvigorfile.ts b/code/DocsSample/ArkTSUtilsDocModule/entry/hvigorfile.ts
new file mode 100644
index 000000000..c6edcd904
--- /dev/null
+++ b/code/DocsSample/ArkTSUtilsDocModule/entry/hvigorfile.ts
@@ -0,0 +1,6 @@
+import { hapTasks } from '@ohos/hvigor-ohos-plugin';
+
+export default {
+ system: hapTasks, /* Built-in plugin of Hvigor. It cannot be modified. */
+ plugins:[] /* Custom plugin to extend the functionality of Hvigor. */
+}
diff --git a/code/DocsSample/ArkTSUtilsDocModule/entry/obfuscation-rules.txt b/code/DocsSample/ArkTSUtilsDocModule/entry/obfuscation-rules.txt
new file mode 100644
index 000000000..985b2aeb7
--- /dev/null
+++ b/code/DocsSample/ArkTSUtilsDocModule/entry/obfuscation-rules.txt
@@ -0,0 +1,18 @@
+# Define project specific obfuscation rules here.
+# You can include the obfuscation configuration files in the current module's build-profile.json5.
+#
+# For more details, see
+# https://gitee.com/openharmony/arkcompiler_ets_frontend/blob/master/arkguard/README.md
+
+# Obfuscation options:
+# -disable-obfuscation: disable all obfuscations
+# -enable-property-obfuscation: obfuscate the property names
+# -enable-toplevel-obfuscation: obfuscate the names in the global scope
+# -compact: remove unnecessary blank spaces and all line feeds
+# -remove-log: remove all console.* statements
+# -print-namecache: print the name cache that contains the mapping from the old names to new names
+# -apply-namecache: reuse the given cache file
+
+# Keep options:
+# -keep-property-name: specifies property names that you want to keep
+# -keep-global-name: specifies names that you want to keep in the global scope
\ No newline at end of file
diff --git a/code/SystemFeature/InsightIntent/IntentDriver/entry/oh-package.json5 b/code/DocsSample/ArkTSUtilsDocModule/entry/oh-package.json5
similarity index 88%
rename from code/SystemFeature/InsightIntent/IntentDriver/entry/oh-package.json5
rename to code/DocsSample/ArkTSUtilsDocModule/entry/oh-package.json5
index 4be95c59c..4e54d14e1 100644
--- a/code/SystemFeature/InsightIntent/IntentDriver/entry/oh-package.json5
+++ b/code/DocsSample/ArkTSUtilsDocModule/entry/oh-package.json5
@@ -1,25 +1,25 @@
-/*
- * Copyright (c) 2023 Huawei Device Co., Ltd.
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-{
- "license": "",
- "devDependencies": {},
- "author": "",
- "name": "entry",
- "description": "Please describe the basic information.",
- "main": "",
- "version": "1.0.0",
- "dependencies": {}
-}
+/*
+ * Copyright (c) 2024 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+{
+ "name": "entry",
+ "version": "1.0.0",
+ "description": "Please describe the basic information.",
+ "main": "",
+ "author": "",
+ "license": "",
+ "dependencies": {}
+}
+
diff --git a/code/DocsSample/ArkTSUtilsDocModule/entry/src/main/ets/entryability/EntryAbility.ets b/code/DocsSample/ArkTSUtilsDocModule/entry/src/main/ets/entryability/EntryAbility.ets
new file mode 100644
index 000000000..6dc4e216a
--- /dev/null
+++ b/code/DocsSample/ArkTSUtilsDocModule/entry/src/main/ets/entryability/EntryAbility.ets
@@ -0,0 +1,56 @@
+/*
+ * Copyright (c) 2024 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { AbilityConstant, UIAbility, Want } from '@kit.AbilityKit';
+import { hilog } from '@kit.PerformanceAnalysisKit';
+import { window } from '@kit.ArkUI';
+
+export default class EntryAbility extends UIAbility {
+ onCreate(want: Want, launchParam: AbilityConstant.LaunchParam): void {
+ hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onCreate');
+ }
+
+ onDestroy(): void {
+ hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onDestroy');
+ }
+
+ onWindowStageCreate(windowStage: window.WindowStage): void {
+ // Main window is created, set main page for this ability
+ hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onWindowStageCreate');
+
+ windowStage.loadContent('pages/Index', (err, data) => {
+ if (err.code) {
+ hilog.error(0x0000, 'testTag', 'Failed to load the content. Cause: %{public}s', JSON.stringify(err) ?? '');
+ return;
+ }
+ hilog.info(0x0000, 'testTag', 'Succeeded in loading the content. Data: %{public}s', JSON.stringify(data) ?? '');
+ });
+ }
+
+ onWindowStageDestroy(): void {
+ // Main window is destroyed, release UI related resources
+ hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onWindowStageDestroy');
+ }
+
+ onForeground(): void {
+ // Ability has brought to foreground
+ hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onForeground');
+ }
+
+ onBackground(): void {
+ // Ability has back to background
+ hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onBackground');
+ }
+}
diff --git a/code/DocsSample/ArkTSUtilsDocModule/entry/src/main/ets/managers/Handle.ets b/code/DocsSample/ArkTSUtilsDocModule/entry/src/main/ets/managers/Handle.ets
new file mode 100644
index 000000000..49a5e2613
--- /dev/null
+++ b/code/DocsSample/ArkTSUtilsDocModule/entry/src/main/ets/managers/Handle.ets
@@ -0,0 +1,45 @@
+/*
+ * Copyright (c) 2024 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+'use shared'
+
+@Sendable
+export default class Handle {
+ private static instance: Handle = new Handle;
+ static getInstance(): Handle {
+ // 返回单例对象
+ return Handle.instance;
+ }
+
+ static syncGet(): void {
+ // 同步Get方法
+ }
+
+ static syncSet(num: number): number {
+ // 模拟同步步骤1
+ console.info('taskpool: this is 1st print!');
+ // 模拟同步步骤2
+ console.info('taskpool: this is 2nd print!');
+ return ++num;
+ }
+
+ static syncSet2(num: number): number {
+ // 模拟同步步骤1
+ console.info('taskpool: this is syncSet2 1st print!');
+ // 模拟同步步骤2
+ console.info('taskpool: this is syncSet2 2nd print!');
+ return ++num;
+ }
+}
\ No newline at end of file
diff --git a/code/DocsSample/ArkTSUtilsDocModule/entry/src/main/ets/managers/arkts-sendable-module.ets b/code/DocsSample/ArkTSUtilsDocModule/entry/src/main/ets/managers/arkts-sendable-module.ets
new file mode 100644
index 000000000..4d0ec2cae
--- /dev/null
+++ b/code/DocsSample/ArkTSUtilsDocModule/entry/src/main/ets/managers/arkts-sendable-module.ets
@@ -0,0 +1,51 @@
+/*
+ * Copyright (c) 2024 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { taskpool } from '@kit.ArkTS';
+import { SingletonA } from './sharedModule';
+
+let sig: SingletonA = SingletonA.getInstance();
+
+@Concurrent
+async function test2(sig: SingletonA) {
+ console.info('sendable: taskpool count is:' + await sig.getCount());
+ let n = Date.now();
+ // 等待1000us,模拟实际业务
+ while (Date.now() - n < 1000) {
+ console.info('this is test2 func');
+ }
+}
+
+async function mainThreadTest() {
+ // 主线程调用单例sig.incrementCount()、fetchCount();
+ sig.increaseCount();
+ console.info('sendable: main thread count is:' + await sig.getCount());
+}
+
+async function childThreadTest() {
+ let task = new taskpool.Task(test2, sig);
+ await taskpool.execute(task);
+}
+
+export async function sendableModuleTest(): Promise {
+ await mainThreadTest();
+ childThreadTest();
+ if(await sig.getCount() == 1) {
+ console.info('arkts-utils:: SendableModuleTest success');
+ return 'SendableModuleTest Succeed';
+ } else {
+ return 'SendableModuleTest Failed';
+ }
+}
\ No newline at end of file
diff --git a/code/DocsSample/ArkTSUtilsDocModule/entry/src/main/ets/managers/async-concurrency-overview.ets b/code/DocsSample/ArkTSUtilsDocModule/entry/src/main/ets/managers/async-concurrency-overview.ets
new file mode 100644
index 000000000..a31eed2a4
--- /dev/null
+++ b/code/DocsSample/ArkTSUtilsDocModule/entry/src/main/ets/managers/async-concurrency-overview.ets
@@ -0,0 +1,28 @@
+/*
+ * Copyright (c) 2024 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+export async function asyncConcurrencyTest(): Promise {
+ const result: string = await new Promise((resolve: Function) => {
+ setTimeout(() => {
+ resolve('Hello, world!');
+ }, 3000);
+ });
+ console.info(result); // 输出: Hello, world!
+ if (result == 'Hello, world!') {
+ return 'AsyncConcurrencyTest Succeed';
+ } else {
+ return 'AsyncConcurrencyTest Failed';
+ }
+}
\ No newline at end of file
diff --git a/code/DocsSample/ArkTSUtilsDocModule/entry/src/main/ets/managers/cpu-intensive-task.ets b/code/DocsSample/ArkTSUtilsDocModule/entry/src/main/ets/managers/cpu-intensive-task.ets
new file mode 100644
index 000000000..96e497782
--- /dev/null
+++ b/code/DocsSample/ArkTSUtilsDocModule/entry/src/main/ets/managers/cpu-intensive-task.ets
@@ -0,0 +1,54 @@
+/*
+ * Copyright (c) 2024 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { taskpool } from '@kit.ArkTS';
+
+@Concurrent
+function imageProcessing(dataSlice: ArrayBuffer): ArrayBuffer {
+ // 步骤1: 具体的图像处理操作及其他耗时操作
+ return dataSlice;
+}
+
+function histogramStatistic(pixelBuffer: ArrayBuffer): void {
+ // 步骤2: 分成三段并发调度
+ let number: number = pixelBuffer.byteLength / 3;
+ let buffer1: ArrayBuffer = pixelBuffer.slice(0, number);
+ let buffer2: ArrayBuffer = pixelBuffer.slice(number, number * 2);
+ let buffer3: ArrayBuffer = pixelBuffer.slice(number * 2);
+
+ let group: taskpool.TaskGroup = new taskpool.TaskGroup();
+ group.addTask(imageProcessing, buffer1);
+ group.addTask(imageProcessing, buffer2);
+ group.addTask(imageProcessing, buffer3);
+
+ taskpool.execute(group, taskpool.Priority.HIGH).then((ret: Object) => {
+ // 步骤3: 结果数组汇总处理
+ })
+}
+
+export async function imagePreprocessing(): Promise {
+ let context = getContext();
+ // 获取resourceManager资源管理器
+ const resourceMgr = context.resourceManager;
+
+ const fileData = await resourceMgr.getRawFileContent('startIcon.png');
+ // 获取图片的ArrayBuffer
+ const buffer = fileData.buffer;
+
+ const arrayBuffer = new ArrayBuffer(buffer.byteLength);
+ new Uint8Array(arrayBuffer).set(new Uint8Array(buffer));
+ histogramStatistic(arrayBuffer);
+ return 'imagePreprocessing success';
+}
diff --git a/code/DocsSample/ArkTSUtilsDocModule/entry/src/main/ets/managers/file-write.ets b/code/DocsSample/ArkTSUtilsDocModule/entry/src/main/ets/managers/file-write.ets
new file mode 100644
index 000000000..ca4bc84d4
--- /dev/null
+++ b/code/DocsSample/ArkTSUtilsDocModule/entry/src/main/ets/managers/file-write.ets
@@ -0,0 +1,24 @@
+/*
+ * Copyright (c) 2024 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { fileIo } from '@kit.CoreFileKit';
+
+// 定义并发函数,内部密集调用I/O能力
+// 写入文件的实现
+export async function write(data: string, filePath: string): Promise {
+ let file: fileIo.File = await fileIo.open(filePath, fileIo.OpenMode.READ_WRITE | fileIo.OpenMode.CREATE);
+ await fileIo.write(file.fd, data);
+ fileIo.close(file);
+}
diff --git a/code/DocsSample/ArkTSUtilsDocModule/entry/src/main/ets/managers/io-intensive-task.ets b/code/DocsSample/ArkTSUtilsDocModule/entry/src/main/ets/managers/io-intensive-task.ets
new file mode 100644
index 000000000..06bfb30a9
--- /dev/null
+++ b/code/DocsSample/ArkTSUtilsDocModule/entry/src/main/ets/managers/io-intensive-task.ets
@@ -0,0 +1,50 @@
+/*
+ * Copyright (c) 2024 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { write } from './file-write';
+import { BusinessError } from '@kit.BasicServicesKit';
+import { taskpool } from '@kit.ArkTS';
+import { fileIo } from '@kit.CoreFileKit';
+
+@Concurrent
+async function concurrentTest(fileList: string[]): Promise {
+ // 循环写文件操作
+ for (let i: number = 0; i < fileList.length; i++) {
+ console.info('arkts-utils:: this filepath is:' + fileList[i]);
+ write('Hello World!', fileList[i]).then(() => {
+ console.info(`arkts-utils:: Succeeded in writing the file. FileList: ${fileList[i]}`);
+ }).catch((err: BusinessError) => {
+ console.error(`arkts-utils:: Failed to write the file. Code is ${err.code}, message is ${err.message}`);
+ return false;
+ })
+ }
+ return true;
+}
+
+export async function ioTaskTest(): Promise {
+ let context = getContext();
+ const filePath1 = context.filesDir + '/111.txt';
+ const filePath2 = context.filesDir + '/222.txt';
+
+ // 使用TaskPool执行包含密集I/O的并发函数
+ // 数组较大时,I/O密集型任务任务分发也会抢占主线程,需要使用多线程能力
+ await taskpool.execute(concurrentTest, [filePath1, filePath2]);
+ let result = fileIo.access(filePath1, fileIo.AccessModeType.EXIST);
+
+ if (!result) {
+ return 'IoTaskTest Failed';
+ }
+ return 'IoTaskTest Succeed';
+}
\ No newline at end of file
diff --git a/code/DocsSample/ArkTSUtilsDocModule/entry/src/main/ets/managers/manager.ets b/code/DocsSample/ArkTSUtilsDocModule/entry/src/main/ets/managers/manager.ets
new file mode 100644
index 000000000..2fb051814
--- /dev/null
+++ b/code/DocsSample/ArkTSUtilsDocModule/entry/src/main/ets/managers/manager.ets
@@ -0,0 +1,55 @@
+/*
+ * Copyright (c) 2024 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { sendableModuleTest } from './arkts-sendable-module';
+import { imagePreprocessing } from './cpu-intensive-task';
+import { ioTaskTest } from './io-intensive-task';
+import { singleIoTest } from './single-io-development';
+import { syncTaskTest } from './sync-task-development';
+import { asyncConcurrencyTest } from './async-concurrency-overview';
+
+type TestFunction = (() => string | Promise);
+type TestList = [name: string, func: TestFunction][];
+let allTests: TestList = [
+ ['arkts-utils/arkts-sendable-module', sendableModuleTest],
+ ['arkts-utils/cpu-intensive-task-development', imagePreprocessing],
+ ['arkts-utils/io-intensive-task-development', ioTaskTest],
+ ['arkts-utils/single-io-development', singleIoTest],
+ ['arkts-utils/sync-task-development', syncTaskTest],
+ ['arkts-utils/async-concurrency-overview', asyncConcurrencyTest],
+];
+
+export function listAllTests(): TestList {
+ return allTests;
+}
+
+let currentTest: string = allTests[0][0];
+export function selectTest(index: number, value: string) {
+ currentTest = value;
+}
+
+export function startTest(): Promise {
+ let item = allTests.find((v) => {
+ return v[0] == currentTest;
+ });
+ if(item != undefined) {
+ return new Promise((res) => {
+ let v = item![1]();
+ res(v);
+ })
+ } else {
+ return Promise.resolve('Error! Selected test is not found.');
+ }
+}
\ No newline at end of file
diff --git a/code/DocsSample/ArkTSUtilsDocModule/entry/src/main/ets/managers/sharedModule.ets b/code/DocsSample/ArkTSUtilsDocModule/entry/src/main/ets/managers/sharedModule.ets
new file mode 100644
index 000000000..2799d3e77
--- /dev/null
+++ b/code/DocsSample/ArkTSUtilsDocModule/entry/src/main/ets/managers/sharedModule.ets
@@ -0,0 +1,46 @@
+/*
+ * Copyright (c) 2024 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+// 共享模块sharedModule.ets
+import { ArkTSUtils } from '@kit.ArkTS';
+
+// 声明当前模块为共享模块,只能导出可Sendable数据
+'use shared'
+
+export { SingletonA }
+
+// 共享模块,SingletonA全局唯一
+@Sendable
+class SingletonA {
+ private static instance: SingletonA = new SingletonA;
+ private count_: number = 0;
+ private lock_: ArkTSUtils.locks.AsyncLock = new ArkTSUtils.locks.AsyncLock();
+
+ public static getInstance(): SingletonA {
+ return SingletonA.instance;
+ }
+
+ public async getCount(): Promise {
+ return this.lock_.lockAsync(() => {
+ return this.count_;
+ })
+ }
+
+ public async increaseCount() {
+ await this.lock_.lockAsync(() => {
+ this.count_++;
+ })
+ }
+}
\ No newline at end of file
diff --git a/code/DocsSample/ArkTSUtilsDocModule/entry/src/main/ets/managers/single-io-development.ets b/code/DocsSample/ArkTSUtilsDocModule/entry/src/main/ets/managers/single-io-development.ets
new file mode 100644
index 000000000..e62d0f411
--- /dev/null
+++ b/code/DocsSample/ArkTSUtilsDocModule/entry/src/main/ets/managers/single-io-development.ets
@@ -0,0 +1,45 @@
+/*
+ * Copyright (c) 2024 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { fileIo } from '@kit.CoreFileKit';
+import { BusinessError } from '@ohos.base';
+import { common } from '@kit.AbilityKit';
+
+async function write(data: string, file: fileIo.File): Promise {
+ fileIo.write(file.fd, data).then((writeLen: number) => {
+ console.info('write data length is: ' + writeLen);
+ }).catch((err: BusinessError) => {
+ console.error(`Failed to write data. Code is ${err.code}, message is ${err.message}`);
+ })
+}
+
+export async function singleIoTest(): Promise {
+ let context = getContext() as common.UIAbilityContext;
+ let filePath: string = context.filesDir + '/ioTest.txt'; // 应用文件路径
+ let file: fileIo.File = await fileIo.open(filePath, fileIo.OpenMode.READ_WRITE | fileIo.OpenMode.CREATE);
+ write('Hello World!', file).then(() => {
+ console.info('Succeeded in writing data.');
+ fileIo.close(file);
+ }).catch((err: BusinessError) => {
+ console.error(`Failed to write data. Code is ${err.code}, message is ${err.message}`);
+ fileIo.close(file);
+ })
+
+ let result = await fileIo.access(filePath, fileIo.AccessModeType.EXIST);
+ if (!result) {
+ return 'SingleIoTest Failed';
+ }
+ return 'SingleIoTest Succeed';
+}
\ No newline at end of file
diff --git a/code/DocsSample/ArkTSUtilsDocModule/entry/src/main/ets/managers/sync-task-development.ets b/code/DocsSample/ArkTSUtilsDocModule/entry/src/main/ets/managers/sync-task-development.ets
new file mode 100644
index 000000000..1326a3fe8
--- /dev/null
+++ b/code/DocsSample/ArkTSUtilsDocModule/entry/src/main/ets/managers/sync-task-development.ets
@@ -0,0 +1,56 @@
+/*
+ * Copyright (c) 2024 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { taskpool } from '@kit.ArkTS';
+import Handle from './Handle'; // 返回静态句柄
+
+// 步骤1: 定义并发函数,内部调用同步方法
+@Concurrent
+function func(num: number): number {
+ // 调用静态类对象中实现的同步等待调用
+ // 先调用syncSet方法并将其结果作为syncSet2的参数,模拟同步调用逻辑
+ let tmpNum: number = Handle.syncSet(num);
+ console.info('this is Child_Thread');
+ return Handle.syncSet2(tmpNum);
+}
+
+// 步骤2: 创建任务并执行
+async function asyncGet(): Promise {
+ // 创建task、task2并传入函数func
+ let task: taskpool.Task = new taskpool.Task(func, 1);
+ let task2: taskpool.Task = new taskpool.Task(func, 2);
+ // 执行task、task2任务,await保证其同步执行
+ let res: number = await taskpool.execute(task) as number;
+ let res2: number = await taskpool.execute(task2) as number;
+ // 打印任务结果
+ console.info('taskpool: task res is: ' + res);
+ console.info('taskpool: task res2 is: ' + res2);
+ if (res == 3 && res2 == 4) {
+ return true;
+ } else {
+ return false;
+ }
+}
+
+export async function syncTaskTest(): Promise {
+ let num: number = Handle.syncSet(100);
+ console.info('this is Main_Thread!');
+ let res = await asyncGet();
+ if(res) {
+ return 'syncTaskTest Succeed';
+ } else {
+ return 'syncTaskTest Failed';
+ }
+}
\ No newline at end of file
diff --git a/code/DocsSample/ArkTSUtilsDocModule/entry/src/main/ets/pages/Index.ets b/code/DocsSample/ArkTSUtilsDocModule/entry/src/main/ets/pages/Index.ets
new file mode 100644
index 000000000..0c157a718
--- /dev/null
+++ b/code/DocsSample/ArkTSUtilsDocModule/entry/src/main/ets/pages/Index.ets
@@ -0,0 +1,65 @@
+/*
+ * Copyright (c) 2024 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { listAllTests, selectTest, startTest} from '../managers/manager';
+import promptAction from '@ohos.promptAction';
+
+@Entry
+@Component
+struct Index {
+ @State message: string = 'Please run a test...';
+
+ build() {
+ Row() {
+ Navigation() {
+ Column({space: 16}) {
+ Select(listAllTests().map((v) => {
+ return { value: v[0] }
+ }))
+ .id("selectTest")
+ .value("Choose the test option")
+ .onSelect(selectTest)
+ .width('88%')
+ .height('12vp')
+ .optionWidth("414vp")
+ Button("Execute this Test")
+ .onClick(() => {
+ this.message = '';
+ let res = startTest();
+ res.then((v) => {
+ promptAction.showToast({
+ message: v
+ });
+ }).catch((e: Error) => {
+ promptAction.showToast({
+ message: e.message
+ });
+ });
+ })
+ .id("execute")
+ .position({ x: "6%", y: "90%" })
+ .width('88%')
+ .fontSize(16)
+ .height('40')
+ }
+ .width("100%")
+ .height("100%")
+ }.title("ArkTS-UtilsDocsSample")
+
+ }
+ .width("100%")
+ .height("100%")
+ }
+}
\ No newline at end of file
diff --git a/code/BasicFeature/InsightIntent/IntentExecutor/entry/src/main/module.json5 b/code/DocsSample/ArkTSUtilsDocModule/entry/src/main/module.json5
similarity index 91%
rename from code/BasicFeature/InsightIntent/IntentExecutor/entry/src/main/module.json5
rename to code/DocsSample/ArkTSUtilsDocModule/entry/src/main/module.json5
index c4c3c62e2..a39fed0b3 100644
--- a/code/BasicFeature/InsightIntent/IntentExecutor/entry/src/main/module.json5
+++ b/code/DocsSample/ArkTSUtilsDocModule/entry/src/main/module.json5
@@ -1,52 +1,52 @@
-/*
- * Copyright (c) 2023 Huawei Device Co., Ltd.
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-{
- "module": {
- "name": "entry",
- "type": "entry",
- "description": "$string:module_desc",
- "mainElement": "EntryAbility",
- "deviceTypes": [
- "default",
- "tablet"
- ],
- "deliveryWithInstall": true,
- "installationFree": false,
- "pages": "$profile:main_pages",
- "abilities": [
- {
- "name": "EntryAbility",
- "srcEntry": "./ets/entryability/EntryAbility.ets",
- "description": "$string:EntryAbility_desc",
- "icon": "$media:icon",
- "label": "$string:EntryAbility_label",
- "startWindowIcon": "$media:icon",
- "startWindowBackground": "$color:start_window_background",
- "exported": true,
- "skills": [
- {
- "entities": [
- "entity.system.home"
- ],
- "actions": [
- "action.system.home"
- ]
- }
- ]
- }
- ]
- }
+/*
+ * Copyright (c) 2024 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+{
+ "module": {
+ "name": "entry",
+ "type": "entry",
+ "description": "$string:module_desc",
+ "mainElement": "EntryAbility",
+ "deviceTypes": [
+ "default",
+ "tablet"
+ ],
+ "deliveryWithInstall": true,
+ "installationFree": false,
+ "pages": "$profile:main_pages",
+ "abilities": [
+ {
+ "name": "EntryAbility",
+ "srcEntry": "./ets/entryability/EntryAbility.ets",
+ "description": "$string:EntryAbility_desc",
+ "icon": "$media:icon",
+ "label": "$string:EntryAbility_label",
+ "startWindowIcon": "$media:startIcon",
+ "startWindowBackground": "$color:start_window_background",
+ "exported": true,
+ "skills": [
+ {
+ "entities": [
+ "entity.system.home"
+ ],
+ "actions": [
+ "action.system.home"
+ ]
+ }
+ ]
+ }
+ ]
+ }
}
\ No newline at end of file
diff --git a/code/BasicFeature/InsightIntent/IntentExecutor/entry/src/main/resources/base/element/color.json b/code/DocsSample/ArkTSUtilsDocModule/entry/src/main/resources/base/element/color.json
similarity index 53%
rename from code/BasicFeature/InsightIntent/IntentExecutor/entry/src/main/resources/base/element/color.json
rename to code/DocsSample/ArkTSUtilsDocModule/entry/src/main/resources/base/element/color.json
index ab18cbcb2..3c712962d 100644
--- a/code/BasicFeature/InsightIntent/IntentExecutor/entry/src/main/resources/base/element/color.json
+++ b/code/DocsSample/ArkTSUtilsDocModule/entry/src/main/resources/base/element/color.json
@@ -1,12 +1,8 @@
-{
- "color": [
- {
- "name": "start_window_background",
- "value": "#FFFFFF"
- },
- {
- "name": "button_background",
- "value": "#007DFF"
- }
- ]
+{
+ "color": [
+ {
+ "name": "start_window_background",
+ "value": "#FFFFFF"
+ }
+ ]
}
\ No newline at end of file
diff --git a/code/DocsSample/ArkTSUtilsDocModule/entry/src/main/resources/base/element/string.json b/code/DocsSample/ArkTSUtilsDocModule/entry/src/main/resources/base/element/string.json
new file mode 100644
index 000000000..b95397798
--- /dev/null
+++ b/code/DocsSample/ArkTSUtilsDocModule/entry/src/main/resources/base/element/string.json
@@ -0,0 +1,16 @@
+{
+ "string": [
+ {
+ "name": "module_desc",
+ "value": "module description"
+ },
+ {
+ "name": "EntryAbility_desc",
+ "value": "description"
+ },
+ {
+ "name": "EntryAbility_label",
+ "value": "ArkTSUtilsDocsSample"
+ }
+ ]
+}
\ No newline at end of file
diff --git a/code/DocsSample/ArkTSUtilsDocModule/entry/src/main/resources/base/media/icon.png b/code/DocsSample/ArkTSUtilsDocModule/entry/src/main/resources/base/media/icon.png
new file mode 100644
index 000000000..cd45accb1
Binary files /dev/null and b/code/DocsSample/ArkTSUtilsDocModule/entry/src/main/resources/base/media/icon.png differ
diff --git a/code/DocsSample/ArkTSUtilsDocModule/entry/src/main/resources/base/media/startIcon.png b/code/DocsSample/ArkTSUtilsDocModule/entry/src/main/resources/base/media/startIcon.png
new file mode 100644
index 000000000..366f76459
Binary files /dev/null and b/code/DocsSample/ArkTSUtilsDocModule/entry/src/main/resources/base/media/startIcon.png differ
diff --git a/code/DocsSample/ArkTSUtilsDocModule/entry/src/main/resources/base/profile/main_pages.json b/code/DocsSample/ArkTSUtilsDocModule/entry/src/main/resources/base/profile/main_pages.json
new file mode 100644
index 000000000..1898d94f5
--- /dev/null
+++ b/code/DocsSample/ArkTSUtilsDocModule/entry/src/main/resources/base/profile/main_pages.json
@@ -0,0 +1,5 @@
+{
+ "src": [
+ "pages/Index"
+ ]
+}
diff --git a/code/DocsSample/ArkTSUtilsDocModule/entry/src/main/resources/en_US/element/string.json b/code/DocsSample/ArkTSUtilsDocModule/entry/src/main/resources/en_US/element/string.json
new file mode 100644
index 000000000..b95397798
--- /dev/null
+++ b/code/DocsSample/ArkTSUtilsDocModule/entry/src/main/resources/en_US/element/string.json
@@ -0,0 +1,16 @@
+{
+ "string": [
+ {
+ "name": "module_desc",
+ "value": "module description"
+ },
+ {
+ "name": "EntryAbility_desc",
+ "value": "description"
+ },
+ {
+ "name": "EntryAbility_label",
+ "value": "ArkTSUtilsDocsSample"
+ }
+ ]
+}
\ No newline at end of file
diff --git a/code/DocsSample/ArkTSUtilsDocModule/entry/src/main/resources/rawfile/startIcon.png b/code/DocsSample/ArkTSUtilsDocModule/entry/src/main/resources/rawfile/startIcon.png
new file mode 100644
index 000000000..366f76459
Binary files /dev/null and b/code/DocsSample/ArkTSUtilsDocModule/entry/src/main/resources/rawfile/startIcon.png differ
diff --git a/code/DocsSample/ArkTSUtilsDocModule/entry/src/main/resources/zh_CN/element/string.json b/code/DocsSample/ArkTSUtilsDocModule/entry/src/main/resources/zh_CN/element/string.json
new file mode 100644
index 000000000..3976dc343
--- /dev/null
+++ b/code/DocsSample/ArkTSUtilsDocModule/entry/src/main/resources/zh_CN/element/string.json
@@ -0,0 +1,16 @@
+{
+ "string": [
+ {
+ "name": "module_desc",
+ "value": "模块描述"
+ },
+ {
+ "name": "EntryAbility_desc",
+ "value": "description"
+ },
+ {
+ "name": "EntryAbility_label",
+ "value": "ArkTSUtilsDocsSample"
+ }
+ ]
+}
\ No newline at end of file
diff --git a/code/BasicFeature/InsightIntent/IntentExecutor/hvigorfile.ts b/code/DocsSample/ArkTSUtilsDocModule/entry/src/mock/mock-config.json5
similarity index 73%
rename from code/BasicFeature/InsightIntent/IntentExecutor/hvigorfile.ts
rename to code/DocsSample/ArkTSUtilsDocModule/entry/src/mock/mock-config.json5
index de76d0675..26ed9f53b 100644
--- a/code/BasicFeature/InsightIntent/IntentExecutor/hvigorfile.ts
+++ b/code/DocsSample/ArkTSUtilsDocModule/entry/src/mock/mock-config.json5
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Copyright (c) 2024 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
@@ -13,5 +13,5 @@
* limitations under the License.
*/
-// Script for compiling build behavior. It is built in the build plug-in and cannot be modified currently.
-export { appTasks } from '@ohos/hvigor-ohos-plugin';
\ No newline at end of file
+{
+}
\ No newline at end of file
diff --git a/code/DocsSample/ArkTSUtilsDocModule/entry/src/ohosTest/ets/test/Ability.test.ets b/code/DocsSample/ArkTSUtilsDocModule/entry/src/ohosTest/ets/test/Ability.test.ets
new file mode 100644
index 000000000..358aa98c3
--- /dev/null
+++ b/code/DocsSample/ArkTSUtilsDocModule/entry/src/ohosTest/ets/test/Ability.test.ets
@@ -0,0 +1,152 @@
+/*
+ * Copyright (c) 2024 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { hilog } from '@kit.PerformanceAnalysisKit';
+import { describe, it, expect } from '@ohos/hypium';
+import AbilityDelegatorRegistry from '@ohos.app.ability.abilityDelegatorRegistry';
+import { sendableModuleTest } from '../../../main/ets/managers/arkts-sendable-module';
+import { asyncConcurrencyTest } from '../../../main/ets/managers/async-concurrency-overview';
+import { imagePreprocessing } from '../../../main/ets/managers/cpu-intensive-task';
+import { ioTaskTest } from '../../../main/ets/managers/io-intensive-task';
+import { singleIoTest } from '../../../main/ets/managers/single-io-development';
+import { syncTaskTest } from '../../../main/ets/managers/sync-task-development';
+
+const TAG = '[Sample_ArkTSUtils]';
+const DOMAIN = 0xF811;
+const BUNDLE = 'ArkTsUtils_';
+
+export default function abilityTest() {
+ describe('abilityTest', () => {
+ /**
+ * @tc.number : ArkTS_UtilsTest_001
+ * @tc.name : Start ability
+ * @tc.desc : Start an application
+ * @tc.size : MEDIUM
+ * @tc.type : Function
+ * @tc.level : Level 0
+ */
+ it('ArkTS_UtilsTest_001', 0, async (done: Function) => {
+ hilog.info(DOMAIN, TAG, BUNDLE + 'ArkTS_UtilsTest_001 begin');
+ let abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator();
+ try {
+ await abilityDelegator.startAbility({
+ bundleName: "com.samples.arktsutilsdocmodule",
+ abilityName: "EntryAbility"
+ });
+ done();
+ } catch (err) {
+ expect(err.code).assertEqual(0);
+ done();
+ }
+ hilog.info(DOMAIN, TAG, BUNDLE + 'ArkTS_UtilsTest_001 end');
+ })
+
+ /**
+ * @tc.number : ArkTS_UtilsTest_002
+ * @tc.name : Execute SendableTest
+ * @tc.desc : execute SendableTest
+ * @tc.size : MEDIUM
+ * @tc.type : Function
+ * @tc.level : Level 0
+ */
+ it('ArkTS_UtilsTest_002', 0, async (done: Function) => {
+ hilog.info(DOMAIN, TAG, BUNDLE + 'ArkTS_UtilsTest_002 begin');
+ let str = await sendableModuleTest();
+ expect(str).assertEqual("SendableModuleTest Succeed");
+ done();
+ hilog.info(DOMAIN, TAG, BUNDLE + 'ArkTS_UtilsTest_002 end');
+ })
+
+ /**
+ * @tc.number : ArkTS_UtilsTest_003
+ * @tc.name : Execute AsyncConcurrencyTest
+ * @tc.desc : execute AsyncConcurrencyTest
+ * @tc.size : MEDIUM
+ * @tc.type : Function
+ * @tc.level : Level 0
+ */
+ it('ArkTS_UtilsTest_003', 0, async (done: Function) => {
+ hilog.info(DOMAIN, TAG, BUNDLE + 'ArkTS_UtilsTest_003 begin');
+ let str = await asyncConcurrencyTest();
+ expect(str).assertEqual("AsyncConcurrencyTest Succeed");
+ done();
+ hilog.info(DOMAIN, TAG, BUNDLE + 'ArkTS_UtilsTest_003 end');
+ })
+
+ /**
+ * @tc.number : ArkTS_UtilsTest_004
+ * @tc.name : Execute imagePreprocessingTest
+ * @tc.desc : execute imagePreprocessingTest
+ * @tc.size : MEDIUM
+ * @tc.type : Function
+ * @tc.level : Level 0
+ */
+ it('ArkTS_UtilsTest_004', 0, async (done: Function) => {
+ hilog.info(DOMAIN, TAG, BUNDLE + 'ArkTS_UtilsTest_004 begin');
+ let str = await imagePreprocessing();
+ expect(str).assertEqual("imagePreprocessing success");
+ done();
+ hilog.info(DOMAIN, TAG, BUNDLE + 'ArkTS_UtilsTest_004 end');
+ })
+
+ /**
+ * @tc.number : ArkTS_UtilsTest_005
+ * @tc.name : Execute IoTaskTest
+ * @tc.desc : execute IoTaskTest
+ * @tc.size : MEDIUM
+ * @tc.type : Function
+ * @tc.level : Level 0
+ */
+ it('ArkTS_UtilsTest_005', 0, async (done: Function) => {
+ hilog.info(DOMAIN, TAG, BUNDLE + 'ArkTS_UtilsTest_005 begin');
+ let str = await ioTaskTest();
+ expect(str).assertEqual("IoTaskTest Succeed");
+ done();
+ hilog.info(DOMAIN, TAG, BUNDLE + 'ArkTS_UtilsTest_005 end');
+ })
+
+ /**
+ * @tc.number : ArkTS_UtilsTest_006
+ * @tc.name : Execute SingleIoTest
+ * @tc.desc : execute SingleIoTest
+ * @tc.size : MEDIUM
+ * @tc.type : Function
+ * @tc.level : Level 0
+ */
+ it('ArkTS_UtilsTest_006', 0, async (done: Function) => {
+ hilog.info(DOMAIN, TAG, BUNDLE + 'ArkTS_UtilsTest_006 begin');
+ let str = await singleIoTest();
+ expect(str).assertEqual("SingleIoTest Succeed");
+ done();
+ hilog.info(DOMAIN, TAG, BUNDLE + 'ArkTS_UtilsTest_006 end');
+ })
+
+ /**
+ * @tc.number : ArkTS_UtilsTest_007
+ * @tc.name : Execute syncTaskTest
+ * @tc.desc : execute syncTaskTest
+ * @tc.size : MEDIUM
+ * @tc.type : Function
+ * @tc.level : Level 0
+ */
+ it('ArkTS_UtilsTest_007', 0, async (done: Function) => {
+ hilog.info(DOMAIN, TAG, BUNDLE + 'ArkTS_UtilsTest_007 begin');
+ let str = await syncTaskTest();
+ expect(str).assertEqual("syncTaskTest Succeed");
+ done();
+ hilog.info(DOMAIN, TAG, BUNDLE + 'ArkTS_UtilsTest_007 end');
+ })
+ })
+}
\ No newline at end of file
diff --git a/code/SystemFeature/InsightIntent/IntentDriver/hvigorfile.ts b/code/DocsSample/ArkTSUtilsDocModule/entry/src/ohosTest/ets/test/List.test.ets
similarity index 73%
rename from code/SystemFeature/InsightIntent/IntentDriver/hvigorfile.ts
rename to code/DocsSample/ArkTSUtilsDocModule/entry/src/ohosTest/ets/test/List.test.ets
index de76d0675..e909c66ab 100644
--- a/code/SystemFeature/InsightIntent/IntentDriver/hvigorfile.ts
+++ b/code/DocsSample/ArkTSUtilsDocModule/entry/src/ohosTest/ets/test/List.test.ets
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Copyright (c) 2024 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
@@ -13,5 +13,8 @@
* limitations under the License.
*/
-// Script for compiling build behavior. It is built in the build plug-in and cannot be modified currently.
-export { appTasks } from '@ohos/hvigor-ohos-plugin';
\ No newline at end of file
+import abilityTest from './Ability.test';
+
+export default function testsuite() {
+ abilityTest();
+}
\ No newline at end of file
diff --git a/code/DocsSample/ArkTSUtilsDocModule/entry/src/ohosTest/ets/testability/TestAbility.ets b/code/DocsSample/ArkTSUtilsDocModule/entry/src/ohosTest/ets/testability/TestAbility.ets
new file mode 100644
index 000000000..7a25191b9
--- /dev/null
+++ b/code/DocsSample/ArkTSUtilsDocModule/entry/src/ohosTest/ets/testability/TestAbility.ets
@@ -0,0 +1,63 @@
+/*
+ * Copyright (c) 2024 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { AbilityConstant, UIAbility, Want } from '@kit.AbilityKit';
+import { abilityDelegatorRegistry } from '@kit.TestKit';
+import { hilog } from '@kit.PerformanceAnalysisKit';
+import { window } from '@kit.ArkUI';
+import { Hypium } from '@ohos/hypium';
+import testsuite from '../test/List.test';
+
+export default class TestAbility extends UIAbility {
+ onCreate(want: Want, launchParam: AbilityConstant.LaunchParam) {
+ hilog.info(0x0000, 'testTag', '%{public}s', 'TestAbility onCreate');
+ hilog.info(0x0000, 'testTag', '%{public}s', 'want param:' + JSON.stringify(want) ?? '');
+ hilog.info(0x0000, 'testTag', '%{public}s', 'launchParam:' + JSON.stringify(launchParam) ?? '');
+ let abilityDelegator: abilityDelegatorRegistry.AbilityDelegator;
+ abilityDelegator = abilityDelegatorRegistry.getAbilityDelegator();
+ let abilityDelegatorArguments: abilityDelegatorRegistry.AbilityDelegatorArgs;
+ abilityDelegatorArguments = abilityDelegatorRegistry.getArguments();
+ hilog.info(0x0000, 'testTag', '%{public}s', 'start run testcase!!!');
+ Hypium.hypiumTest(abilityDelegator, abilityDelegatorArguments, testsuite);
+ }
+
+ onDestroy() {
+ hilog.info(0x0000, 'testTag', '%{public}s', 'TestAbility onDestroy');
+ }
+
+ onWindowStageCreate(windowStage: window.WindowStage) {
+ hilog.info(0x0000, 'testTag', '%{public}s', 'TestAbility onWindowStageCreate');
+ windowStage.loadContent('testability/pages/Index', (err, data) => {
+ if (err.code) {
+ hilog.error(0x0000, 'testTag', 'Failed to load the content. Cause: %{public}s', JSON.stringify(err) ?? '');
+ return;
+ }
+ hilog.info(0x0000, 'testTag', 'Succeeded in loading the content. Data: %{public}s',
+ JSON.stringify(data) ?? '');
+ });
+ }
+
+ onWindowStageDestroy() {
+ hilog.info(0x0000, 'testTag', '%{public}s', 'TestAbility onWindowStageDestroy');
+ }
+
+ onForeground() {
+ hilog.info(0x0000, 'testTag', '%{public}s', 'TestAbility onForeground');
+ }
+
+ onBackground() {
+ hilog.info(0x0000, 'testTag', '%{public}s', 'TestAbility onBackground');
+ }
+}
\ No newline at end of file
diff --git a/code/DocsSample/ArkTSUtilsDocModule/entry/src/ohosTest/ets/testability/pages/Index.ets b/code/DocsSample/ArkTSUtilsDocModule/entry/src/ohosTest/ets/testability/pages/Index.ets
new file mode 100644
index 000000000..85a5c3d42
--- /dev/null
+++ b/code/DocsSample/ArkTSUtilsDocModule/entry/src/ohosTest/ets/testability/pages/Index.ets
@@ -0,0 +1,32 @@
+/*
+ * Copyright (c) 2024 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+@Entry
+@Component
+struct Index {
+ @State message: string = 'Hello World';
+
+ build() {
+ Row() {
+ Column() {
+ Text(this.message)
+ .fontSize(50)
+ .fontWeight(FontWeight.Bold)
+ }
+ .width('100%')
+ }
+ .height('100%')
+ }
+}
\ No newline at end of file
diff --git a/code/DocsSample/ArkTSUtilsDocModule/entry/src/ohosTest/ets/testrunner/OpenHarmonyTestRunner.ets b/code/DocsSample/ArkTSUtilsDocModule/entry/src/ohosTest/ets/testrunner/OpenHarmonyTestRunner.ets
new file mode 100644
index 000000000..65e974819
--- /dev/null
+++ b/code/DocsSample/ArkTSUtilsDocModule/entry/src/ohosTest/ets/testrunner/OpenHarmonyTestRunner.ets
@@ -0,0 +1,105 @@
+/*
+ * Copyright (c) 2024 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { abilityDelegatorRegistry, TestRunner } from '@kit.TestKit';
+import { UIAbility, Want } from '@kit.AbilityKit';
+import { BusinessError } from '@kit.BasicServicesKit';
+import { hilog } from '@kit.PerformanceAnalysisKit';
+import { resourceManager } from '@kit.LocalizationKit';
+import { util } from '@kit.ArkTS';
+
+let abilityDelegator: abilityDelegatorRegistry.AbilityDelegator;
+let abilityDelegatorArguments: abilityDelegatorRegistry.AbilityDelegatorArgs;
+let jsonPath: string = 'mock/mock-config.json';
+let tag: string = 'testTag';
+
+async function onAbilityCreateCallback(data: UIAbility) {
+ hilog.info(0x0000, 'testTag', 'onAbilityCreateCallback, data: ${}', JSON.stringify(data));
+}
+
+async function addAbilityMonitorCallback(err: BusinessError) {
+ hilog.info(0x0000, 'testTag', 'addAbilityMonitorCallback : %{public}s', JSON.stringify(err) ?? '');
+}
+
+export default class OpenHarmonyTestRunner implements TestRunner {
+ constructor() {
+ }
+
+ onPrepare() {
+ hilog.info(0x0000, 'testTag', '%{public}s', 'OpenHarmonyTestRunner OnPrepare');
+ }
+
+ async onRun() {
+ let tag = 'testTag';
+ hilog.info(0x0000, tag, '%{public}s', 'OpenHarmonyTestRunner onRun run');
+ abilityDelegatorArguments = abilityDelegatorRegistry.getArguments()
+ abilityDelegator = abilityDelegatorRegistry.getAbilityDelegator()
+ let moduleName = abilityDelegatorArguments.parameters['-m'];
+ let context = abilityDelegator.getAppContext().getApplicationContext().createModuleContext(moduleName);
+ let mResourceManager = context.resourceManager;
+ await checkMock(abilityDelegator, mResourceManager);
+ const bundleName = abilityDelegatorArguments.bundleName;
+ const testAbilityName: string = 'TestAbility';
+ let lMonitor: abilityDelegatorRegistry.AbilityMonitor = {
+ abilityName: testAbilityName,
+ onAbilityCreate: onAbilityCreateCallback,
+ moduleName: moduleName
+ };
+ abilityDelegator.addAbilityMonitor(lMonitor, addAbilityMonitorCallback)
+ const want: Want = {
+ bundleName: bundleName,
+ abilityName: testAbilityName,
+ moduleName: moduleName
+ };
+ abilityDelegator.startAbility(want, (err: BusinessError, data: void) => {
+ hilog.info(0x0000, tag, 'startAbility : err : %{public}s', JSON.stringify(err) ?? '');
+ hilog.info(0x0000, tag, 'startAbility : data : %{public}s', JSON.stringify(data) ?? '');
+ })
+ hilog.info(0x0000, tag, '%{public}s', 'OpenHarmonyTestRunner onRun end');
+ }
+}
+
+async function checkMock(abilityDelegator: abilityDelegatorRegistry.AbilityDelegator, resourceManager: resourceManager.ResourceManager) {
+ let rawFile: Uint8Array;
+ try {
+ rawFile = resourceManager.getRawFileContentSync(jsonPath);
+ hilog.info(0x0000, tag, 'MockList file exists');
+ let mockStr: string = util.TextDecoder.create("utf-8", { ignoreBOM: true }).decodeWithStream(rawFile);
+ let mockMap: Record = getMockList(mockStr);
+ try {
+ abilityDelegator.setMockList(mockMap)
+ } catch (error) {
+ let code = (error as BusinessError).code;
+ let message = (error as BusinessError).message;
+ hilog.error(0x0000, tag, `abilityDelegator.setMockList failed, error code: ${code}, message: ${message}.`);
+ }
+ } catch (error) {
+ let code = (error as BusinessError).code;
+ let message = (error as BusinessError).message;
+ hilog.error(0x0000, tag, `ResourceManager:callback getRawFileContent failed, error code: ${code}, message: ${message}.`);
+ }
+}
+
+function getMockList(jsonStr: string) {
+ let jsonObj: Record = JSON.parse(jsonStr);
+ let map: Map = new Map(Object.entries(jsonObj));
+ let mockList: Record = {};
+ map.forEach((value: object, key: string) => {
+ let realValue: string = value['source'].toString();
+ mockList[key] = realValue;
+ });
+ hilog.info(0x0000, tag, '%{public}s', 'mock-json value:' + JSON.stringify(mockList) ?? '');
+ return mockList;
+}
\ No newline at end of file
diff --git a/code/DocsSample/ArkTSUtilsDocModule/entry/src/ohosTest/module.json5 b/code/DocsSample/ArkTSUtilsDocModule/entry/src/ohosTest/module.json5
new file mode 100644
index 000000000..a7685a59e
--- /dev/null
+++ b/code/DocsSample/ArkTSUtilsDocModule/entry/src/ohosTest/module.json5
@@ -0,0 +1,51 @@
+/*
+ * Copyright (c) 2024 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+{
+ "module": {
+ "name": "entry_test",
+ "type": "feature",
+ "description": "$string:module_test_desc",
+ "mainElement": "TestAbility",
+ "deviceTypes": [
+ "default"
+ ],
+ "deliveryWithInstall": true,
+ "installationFree": false,
+ "pages": "$profile:test_pages",
+ "abilities": [
+ {
+ "name": "TestAbility",
+ "srcEntry": "./ets/testability/TestAbility.ets",
+ "description": "$string:TestAbility_desc",
+ "icon": "$media:icon",
+ "label": "$string:TestAbility_label",
+ "exported": true,
+ "startWindowIcon": "$media:icon",
+ "startWindowBackground": "$color:start_window_background",
+ "skills": [
+ {
+ "actions": [
+ "action.system.home"
+ ],
+ "entities": [
+ "entity.system.home"
+ ]
+ }
+ ]
+ }
+ ]
+ }
+}
diff --git a/code/SystemFeature/InsightIntent/IntentDriver/entry/src/main/resources/base/element/color.json b/code/DocsSample/ArkTSUtilsDocModule/entry/src/ohosTest/resources/base/element/color.json
similarity index 53%
rename from code/SystemFeature/InsightIntent/IntentDriver/entry/src/main/resources/base/element/color.json
rename to code/DocsSample/ArkTSUtilsDocModule/entry/src/ohosTest/resources/base/element/color.json
index ab18cbcb2..3c712962d 100644
--- a/code/SystemFeature/InsightIntent/IntentDriver/entry/src/main/resources/base/element/color.json
+++ b/code/DocsSample/ArkTSUtilsDocModule/entry/src/ohosTest/resources/base/element/color.json
@@ -1,12 +1,8 @@
-{
- "color": [
- {
- "name": "start_window_background",
- "value": "#FFFFFF"
- },
- {
- "name": "button_background",
- "value": "#007DFF"
- }
- ]
+{
+ "color": [
+ {
+ "name": "start_window_background",
+ "value": "#FFFFFF"
+ }
+ ]
}
\ No newline at end of file
diff --git a/code/DocsSample/ArkTSUtilsDocModule/entry/src/ohosTest/resources/base/element/string.json b/code/DocsSample/ArkTSUtilsDocModule/entry/src/ohosTest/resources/base/element/string.json
new file mode 100644
index 000000000..65d8fa5a7
--- /dev/null
+++ b/code/DocsSample/ArkTSUtilsDocModule/entry/src/ohosTest/resources/base/element/string.json
@@ -0,0 +1,16 @@
+{
+ "string": [
+ {
+ "name": "module_test_desc",
+ "value": "test ability description"
+ },
+ {
+ "name": "TestAbility_desc",
+ "value": "the test ability"
+ },
+ {
+ "name": "TestAbility_label",
+ "value": "test label"
+ }
+ ]
+}
\ No newline at end of file
diff --git a/code/DocsSample/ArkTSUtilsDocModule/entry/src/ohosTest/resources/base/media/icon.png b/code/DocsSample/ArkTSUtilsDocModule/entry/src/ohosTest/resources/base/media/icon.png
new file mode 100644
index 000000000..cd45accb1
Binary files /dev/null and b/code/DocsSample/ArkTSUtilsDocModule/entry/src/ohosTest/resources/base/media/icon.png differ
diff --git a/code/DocsSample/ArkTSUtilsDocModule/entry/src/ohosTest/resources/base/profile/test_pages.json b/code/DocsSample/ArkTSUtilsDocModule/entry/src/ohosTest/resources/base/profile/test_pages.json
new file mode 100644
index 000000000..b7e7343ca
--- /dev/null
+++ b/code/DocsSample/ArkTSUtilsDocModule/entry/src/ohosTest/resources/base/profile/test_pages.json
@@ -0,0 +1,5 @@
+{
+ "src": [
+ "testability/pages/Index"
+ ]
+}
diff --git a/code/DocsSample/ArkTSUtilsDocModule/entry/src/test/List.test.ets b/code/DocsSample/ArkTSUtilsDocModule/entry/src/test/List.test.ets
new file mode 100644
index 000000000..ab6445db0
--- /dev/null
+++ b/code/DocsSample/ArkTSUtilsDocModule/entry/src/test/List.test.ets
@@ -0,0 +1,20 @@
+/*
+ * Copyright (c) 2024 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import localUnitTest from './LocalUnit.test';
+
+export default function testsuite() {
+ localUnitTest();
+}
\ No newline at end of file
diff --git a/code/DocsSample/ArkTSUtilsDocModule/entry/src/test/LocalUnit.test.ets b/code/DocsSample/ArkTSUtilsDocModule/entry/src/test/LocalUnit.test.ets
new file mode 100644
index 000000000..50ee26293
--- /dev/null
+++ b/code/DocsSample/ArkTSUtilsDocModule/entry/src/test/LocalUnit.test.ets
@@ -0,0 +1,48 @@
+/*
+ * Copyright (c) 2024 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium';
+
+export default function localUnitTest() {
+ describe('localUnitTest',() => {
+ // Defines a test suite. Two parameters are supported: test suite name and test suite function.
+ beforeAll(() => {
+ // Presets an action, which is performed only once before all test cases of the test suite start.
+ // This API supports only one parameter: preset action function.
+ });
+ beforeEach(() => {
+ // Presets an action, which is performed before each unit test case starts.
+ // The number of execution times is the same as the number of test cases defined by **it**.
+ // This API supports only one parameter: preset action function.
+ });
+ afterEach(() => {
+ // Presets a clear action, which is performed after each unit test case ends.
+ // The number of execution times is the same as the number of test cases defined by **it**.
+ // This API supports only one parameter: clear action function.
+ });
+ afterAll(() => {
+ // Presets a clear action, which is performed after all test cases of the test suite end.
+ // This API supports only one parameter: clear action function.
+ });
+ it('assertContain', 0, () => {
+ // Defines a test case. This API supports three parameters: test case name, filter parameter, and test case function.
+ let a = 'abc';
+ let b = 'b';
+ // Defines a variety of assertion methods, which are used to declare expected boolean conditions.
+ expect(a).assertContain(b);
+ expect(a).assertEqual(a);
+ });
+ });
+}
\ No newline at end of file
diff --git a/code/DocsSample/ArkTSUtilsDocModule/hvigor/hvigor-config.json5 b/code/DocsSample/ArkTSUtilsDocModule/hvigor/hvigor-config.json5
new file mode 100644
index 000000000..b77b06ff2
--- /dev/null
+++ b/code/DocsSample/ArkTSUtilsDocModule/hvigor/hvigor-config.json5
@@ -0,0 +1,22 @@
+{
+ "hvigorVersion": "4.1.2",
+ "dependencies": {
+ "@ohos/hvigor-ohos-plugin": "4.1.2"
+ },
+ "execution": {
+ // "analyze": "default", /* Define the build analyze mode. Value: [ "default" | "verbose" | false ]. Default: "default" */
+ // "daemon": true, /* Enable daemon compilation. Value: [ true | false ]. Default: true */
+ // "incremental": true, /* Enable incremental compilation. Value: [ true | false ]. Default: true */
+ // "parallel": true, /* Enable parallel compilation. Value: [ true | false ]. Default: true */
+ // "typeCheck": false, /* Enable typeCheck. Value: [ true | false ]. Default: false */
+ },
+ "logging": {
+ // "level": "info" /* Define the log level. Value: [ "debug" | "info" | "warn" | "error" ]. Default: "info" */
+ },
+ "debugging": {
+ // "stacktrace": false /* Disable stacktrace compilation. Value: [ true | false ]. Default: false */
+ },
+ "nodeOptions": {
+ // "maxOldSpaceSize": 4096 /* Enable nodeOptions maxOldSpaceSize compilation. Unit M. Used for the daemon process */
+ }
+}
\ No newline at end of file
diff --git a/code/DocsSample/ArkTSUtilsDocModule/hvigor/hvigor-wrapper.js b/code/DocsSample/ArkTSUtilsDocModule/hvigor/hvigor-wrapper.js
new file mode 100644
index 000000000..8ec2d0156
--- /dev/null
+++ b/code/DocsSample/ArkTSUtilsDocModule/hvigor/hvigor-wrapper.js
@@ -0,0 +1,2 @@
+"use strict";var e=require("path"),t=require("os"),n=require("fs"),r=require("child_process"),u=require("process"),o=require("tty"),i=require("util"),s=require("url"),c=require("constants"),a=require("stream"),l=require("assert"),f=require("zlib"),D=require("net"),d=require("crypto"),p="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},E={},h={},C=p&&p.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(h,"__esModule",{value:!0}),h.maxPathLength=h.isMac=h.isLinux=h.isWindows=void 0;const m=C(t),F="Windows_NT",y="Darwin";function g(){return m.default.type()===F}function A(){return m.default.type()===y}h.isWindows=g,h.isLinux=function(){return"Linux"===m.default.type()},h.isMac=A,h.maxPathLength=function(){return A()?1016:g()?259:4095},function(n){var r=p&&p.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var u=Object.getOwnPropertyDescriptor(t,n);u&&!("get"in u?!t.__esModule:u.writable||u.configurable)||(u={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,u)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),u=p&&p.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=p&&p.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return u(t,e),t};Object.defineProperty(n,"__esModule",{value:!0}),n.LOG_LEVEL=n.ANALYZE=n.PARALLEL=n.INCREMENTAL=n.DAEMON=n.DOT=n.PROPERTIES=n.HVIGOR_POOL_CACHE_TTL=n.HVIGOR_POOL_CACHE_CAPACITY=n.HVIGOR_POOL_MAX_CORE_SIZE=n.HVIGOR_POOL_MAX_SIZE=n.ENABLE_SIGN_TASK_KEY=n.HVIGOR_CACHE_DIR_KEY=n.WORK_SPACE=n.HVIGOR_PROJECT_WRAPPER_HOME=n.HVIGOR_PROJECT_ROOT_DIR=n.HVIGOR_PROJECT_CACHES_HOME=n.HVIGOR_PNPM_STORE_PATH=n.HVIGOR_WRAPPER_PNPM_SCRIPT_PATH=n.PROJECT_CACHES=n.HVIGOR_WRAPPER_TOOLS_HOME=n.HVIGOR_USER_HOME=n.DEFAULT_PACKAGE_JSON=n.DEFAULT_HVIGOR_CONFIG_JSON_FILE_NAME=n.PNPM=n.HVIGOR=n.NPM_TOOL=n.PNPM_TOOL=n.HVIGOR_ENGINE_PACKAGE_NAME=void 0;const i=o(t),s=o(e),c=h;n.HVIGOR_ENGINE_PACKAGE_NAME="@ohos/hvigor",n.PNPM_TOOL=(0,c.isWindows)()?"pnpm.cmd":"pnpm",n.NPM_TOOL=(0,c.isWindows)()?"npm.cmd":"npm",n.HVIGOR="hvigor",n.PNPM="pnpm",n.DEFAULT_HVIGOR_CONFIG_JSON_FILE_NAME="hvigor-config.json5",n.DEFAULT_PACKAGE_JSON="package.json",n.HVIGOR_USER_HOME=s.resolve(i.homedir(),".hvigor"),n.HVIGOR_WRAPPER_TOOLS_HOME=s.resolve(n.HVIGOR_USER_HOME,"wrapper","tools"),n.PROJECT_CACHES="project_caches",n.HVIGOR_WRAPPER_PNPM_SCRIPT_PATH=s.resolve(n.HVIGOR_WRAPPER_TOOLS_HOME,"node_modules",".bin",n.PNPM_TOOL),n.HVIGOR_PNPM_STORE_PATH=s.resolve(n.HVIGOR_USER_HOME,"caches"),n.HVIGOR_PROJECT_CACHES_HOME=s.resolve(n.HVIGOR_USER_HOME,n.PROJECT_CACHES),n.HVIGOR_PROJECT_ROOT_DIR=process.cwd(),n.HVIGOR_PROJECT_WRAPPER_HOME=s.resolve(n.HVIGOR_PROJECT_ROOT_DIR,n.HVIGOR),n.WORK_SPACE="workspace",n.HVIGOR_CACHE_DIR_KEY="hvigor.cacheDir",n.ENABLE_SIGN_TASK_KEY="enableSignTask",n.HVIGOR_POOL_MAX_SIZE="hvigor.pool.maxSize",n.HVIGOR_POOL_MAX_CORE_SIZE="hvigor.pool.maxCoreSize",n.HVIGOR_POOL_CACHE_CAPACITY="hvigor.pool.cache.capacity",n.HVIGOR_POOL_CACHE_TTL="hvigor.pool.cache.ttl",n.PROPERTIES="properties",n.DOT=".",n.DAEMON="daemon",n.INCREMENTAL="incremental",n.PARALLEL="typeCheck",n.ANALYZE="analyze",n.LOG_LEVEL="logLevel"}(E);var v={},S={};Object.defineProperty(S,"__esModule",{value:!0}),S.logError=S.logInfo=S.logErrorAndExit=void 0,S.logErrorAndExit=function(e){e instanceof Error?console.error(e.message):console.error(e),process.exit(-1)},S.logInfo=function(e){console.log(e)},S.logError=function(e){console.error(e)};var w=p&&p.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var u=Object.getOwnPropertyDescriptor(t,n);u&&!("get"in u?!t.__esModule:u.writable||u.configurable)||(u={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,u)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),O=p&&p.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),_=p&&p.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&w(t,e,n);return O(t,e),t};Object.defineProperty(v,"__esModule",{value:!0});var b=v.executeBuild=void 0;const B=_(n),I=_(e),x=S,P=r;b=v.executeBuild=function(e){const t=I.resolve(e,"node_modules","@ohos","hvigor","bin","hvigor.js");try{const e=B.realpathSync(t),n=process.argv.slice(2),r=(0,P.spawn)("node",[e,...n],{env:process.env});r.stdout.on("data",(e=>{(0,x.logInfo)(`${e.toString().trim()}`)})),r.stderr.on("data",(e=>{(0,x.logError)(`${e.toString().trim()}`)})),r.on("exit",((e,t)=>{process.exit(null!=e?e:-1)}))}catch(n){(0,x.logErrorAndExit)(`Error: ENOENT: no such file ${t},delete ${e} and retry.`)}};var N,T,k,R,M,L={},j={},$={exports:{}},H={exports:{}};function G(){if(T)return N;T=1;var e=1e3,t=60*e,n=60*t,r=24*n,u=7*r,o=365.25*r;function i(e,t,n,r){var u=t>=1.5*n;return Math.round(e/n)+" "+r+(u?"s":"")}return N=function(s,c){c=c||{};var a=typeof s;if("string"===a&&s.length>0)return function(i){if((i=String(i)).length>100)return;var s=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(i);if(!s)return;var c=parseFloat(s[1]);switch((s[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return c*o;case"weeks":case"week":case"w":return c*u;case"days":case"day":case"d":return c*r;case"hours":case"hour":case"hrs":case"hr":case"h":return c*n;case"minutes":case"minute":case"mins":case"min":case"m":return c*t;case"seconds":case"second":case"secs":case"sec":case"s":return c*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return c;default:return}}(s);if("number"===a&&isFinite(s))return c.long?function(u){var o=Math.abs(u);if(o>=r)return i(u,o,r,"day");if(o>=n)return i(u,o,n,"hour");if(o>=t)return i(u,o,t,"minute");if(o>=e)return i(u,o,e,"second");return u+" ms"}(s):function(u){var o=Math.abs(u);if(o>=r)return Math.round(u/r)+"d";if(o>=n)return Math.round(u/n)+"h";if(o>=t)return Math.round(u/t)+"m";if(o>=e)return Math.round(u/e)+"s";return u+"ms"}(s);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(s))}}function U(){if(R)return k;return R=1,k=function(e){function t(e){let r,u,o,i=null;function s(...e){if(!s.enabled)return;const n=s,u=Number(new Date),o=u-(r||u);n.diff=o,n.prev=r,n.curr=u,r=u,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let i=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,((r,u)=>{if("%%"===r)return"%";i++;const o=t.formatters[u];if("function"==typeof o){const t=e[i];r=o.call(n,t),e.splice(i,1),i--}return r})),t.formatArgs.call(n,e);(n.log||t.log).apply(n,e)}return s.namespace=e,s.useColors=t.useColors(),s.color=t.selectColor(e),s.extend=n,s.destroy=t.destroy,Object.defineProperty(s,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==i?i:(u!==t.namespaces&&(u=t.namespaces,o=t.enabled(e)),o),set:e=>{i=e}}),"function"==typeof t.init&&t.init(s),s}function n(e,n){const r=t(this.namespace+(void 0===n?":":n)+e);return r.log=this.log,r}function r(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){if(e instanceof Error)return e.stack||e.message;return e},t.disable=function(){const e=[...t.names.map(r),...t.skips.map(r).map((e=>"-"+e))].join(",");return t.enable(""),e},t.enable=function(e){let n;t.save(e),t.namespaces=e,t.names=[],t.skips=[];const r=("string"==typeof e?e:"").split(/[\s,]+/),u=r.length;for(n=0;n{t[n]=e[n]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let n=0;for(let t=0;t{t=t||process.argv;const n=e.startsWith("-")?"":1===e.length?"-":"--",r=t.indexOf(n+e),u=t.indexOf("--");return-1!==r&&(-1===u||r=8&&Number(t[0])>=10&&Number(t[2])>=10586?Number(t[2])>=14931?3:2:1}if("CI"in r)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some((e=>e in r))||"codeship"===r.CI_NAME?1:o;if("TEAMCITY_VERSION"in r)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(r.TEAMCITY_VERSION)?1:0;if("truecolor"===r.COLORTERM)return 3;if("TERM_PROGRAM"in r){const e=parseInt((r.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(r.TERM_PROGRAM){case"iTerm.app":return e>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(r.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(r.TERM)||"COLORTERM"in r?1:(r.TERM,o)}(t);return function(e){return 0!==e&&{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}(o)}return n("no-color")||n("no-colors")||n("color=false")?u=!1:(n("color")||n("colors")||n("color=true")||n("color=always"))&&(u=!0),"FORCE_COLOR"in r&&(u=0===r.FORCE_COLOR.length||0!==parseInt(r.FORCE_COLOR,10)),W={supportsColor:o,stdout:o(process.stdout),stderr:o(process.stderr)}}function Q(){return K||(K=1,function(e,t){const n=o,r=i;t.init=function(e){e.inspectOpts={};const n=Object.keys(t.inspectOpts);for(let r=0;r{}),"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."),t.colors=[6,2,3,4,5,1];try{const e=X();e&&(e.stderr||e).level>=2&&(t.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch(e){}t.inspectOpts=Object.keys(process.env).filter((e=>/^debug_/i.test(e))).reduce(((e,t)=>{const n=t.substring(6).toLowerCase().replace(/_([a-z])/g,((e,t)=>t.toUpperCase()));let r=process.env[t];return r=!!/^(yes|on|true|enabled)$/i.test(r)||!/^(no|off|false|disabled)$/i.test(r)&&("null"===r?null:Number(r)),e[n]=r,e}),{}),e.exports=U()(t);const{formatters:u}=e.exports;u.o=function(e){return this.inspectOpts.colors=this.useColors,r.inspect(e,this.inspectOpts).split("\n").map((e=>e.trim())).join(" ")},u.O=function(e){return this.inspectOpts.colors=this.useColors,r.inspect(e,this.inspectOpts)}}(Y,Y.exports)),Y.exports}q=$,"undefined"==typeof process||"renderer"===process.type||!0===process.browser||process.__nwjs?q.exports=(M||(M=1,function(e,t){t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const n="color: "+this.color;t.splice(1,0,n,"color: inherit");let r=0,u=0;t[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(r++,"%c"===e&&(u=r))})),t.splice(u,0,n)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")}catch(e){}return!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG),e},t.useColors=function(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type&&!window.process.__nwjs)||("undefined"==typeof navigator||!navigator.userAgent||!navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=U()(t);const{formatters:n}=e.exports;n.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}}(H,H.exports)),H.exports):q.exports=Q();var ee=function(e){return(e=e||{}).circles?function(e){var t=[],n=[];return e.proto?function e(u){if("object"!=typeof u||null===u)return u;if(u instanceof Date)return new Date(u);if(Array.isArray(u))return r(u,e);if(u instanceof Map)return new Map(r(Array.from(u),e));if(u instanceof Set)return new Set(r(Array.from(u),e));var o={};for(var i in t.push(u),n.push(o),u){var s=u[i];if("object"!=typeof s||null===s)o[i]=s;else if(s instanceof Date)o[i]=new Date(s);else if(s instanceof Map)o[i]=new Map(r(Array.from(s),e));else if(s instanceof Set)o[i]=new Set(r(Array.from(s),e));else if(ArrayBuffer.isView(s))o[i]=te(s);else{var c=t.indexOf(s);o[i]=-1!==c?n[c]:e(s)}}return t.pop(),n.pop(),o}:function e(u){if("object"!=typeof u||null===u)return u;if(u instanceof Date)return new Date(u);if(Array.isArray(u))return r(u,e);if(u instanceof Map)return new Map(r(Array.from(u),e));if(u instanceof Set)return new Set(r(Array.from(u),e));var o={};for(var i in t.push(u),n.push(o),u)if(!1!==Object.hasOwnProperty.call(u,i)){var s=u[i];if("object"!=typeof s||null===s)o[i]=s;else if(s instanceof Date)o[i]=new Date(s);else if(s instanceof Map)o[i]=new Map(r(Array.from(s),e));else if(s instanceof Set)o[i]=new Set(r(Array.from(s),e));else if(ArrayBuffer.isView(s))o[i]=te(s);else{var c=t.indexOf(s);o[i]=-1!==c?n[c]:e(s)}}return t.pop(),n.pop(),o};function r(e,r){for(var u=Object.keys(e),o=new Array(u.length),i=0;i!e,se=e=>e&&"object"==typeof e&&!Array.isArray(e),ce=(e,t,n)=>{(Array.isArray(t)?t:[t]).forEach((t=>{if(t)throw new Error(`Problem with log4js configuration: (${ne.inspect(e,{depth:5})}) - ${n}`)}))};var ae={configure:e=>{re("New configuration to be validated: ",e),ce(e,ie(se(e)),"must be an object."),re(`Calling pre-processing listeners (${ue.length})`),ue.forEach((t=>t(e))),re("Configuration pre-processing finished."),re(`Calling configuration listeners (${oe.length})`),oe.forEach((t=>t(e))),re("Configuration finished.")},addListener:e=>{oe.push(e),re(`Added listener, now ${oe.length} listeners`)},addPreProcessingListener:e=>{ue.push(e),re(`Added pre-processing listener, now ${ue.length} listeners`)},throwExceptionIf:ce,anObject:se,anInteger:e=>e&&"number"==typeof e&&Number.isInteger(e),validIdentifier:e=>/^[A-Za-z][A-Za-z0-9_]*$/g.test(e),not:ie},le={exports:{}};!function(e){function t(e,t){for(var n=e.toString();n.length-1?s:c,l=n(u.getHours()),f=n(u.getMinutes()),D=n(u.getSeconds()),d=t(u.getMilliseconds(),3),p=function(e){var t=Math.abs(e),n=String(Math.floor(t/60)),r=String(t%60);return n=("0"+n).slice(-2),r=("0"+r).slice(-2),0===e?"Z":(e<0?"+":"-")+n+":"+r}(u.getTimezoneOffset());return r.replace(/dd/g,o).replace(/MM/g,i).replace(/y{1,4}/g,a).replace(/hh/g,l).replace(/mm/g,f).replace(/ss/g,D).replace(/SSS/g,d).replace(/O/g,p)}function u(e,t,n,r){e["set"+(r?"":"UTC")+t](n)}e.exports=r,e.exports.asString=r,e.exports.parse=function(t,n,r){if(!t)throw new Error("pattern must be supplied");return function(t,n,r){var o=t.indexOf("O")<0,i=!1,s=[{pattern:/y{1,4}/,regexp:"\\d{1,4}",fn:function(e,t){u(e,"FullYear",t,o)}},{pattern:/MM/,regexp:"\\d{1,2}",fn:function(e,t){u(e,"Month",t-1,o),e.getMonth()!==t-1&&(i=!0)}},{pattern:/dd/,regexp:"\\d{1,2}",fn:function(e,t){i&&u(e,"Month",e.getMonth()-1,o),u(e,"Date",t,o)}},{pattern:/hh/,regexp:"\\d{1,2}",fn:function(e,t){u(e,"Hours",t,o)}},{pattern:/mm/,regexp:"\\d\\d",fn:function(e,t){u(e,"Minutes",t,o)}},{pattern:/ss/,regexp:"\\d\\d",fn:function(e,t){u(e,"Seconds",t,o)}},{pattern:/SSS/,regexp:"\\d\\d\\d",fn:function(e,t){u(e,"Milliseconds",t,o)}},{pattern:/O/,regexp:"[+-]\\d{1,2}:?\\d{2}?|Z",fn:function(e,t){t="Z"===t?0:t.replace(":","");var n=Math.abs(t),r=(t>0?-1:1)*(n%100+60*Math.floor(n/100));e.setUTCMinutes(e.getUTCMinutes()+r)}}],c=s.reduce((function(e,t){return t.pattern.test(e.regexp)?(t.index=e.regexp.match(t.pattern).index,e.regexp=e.regexp.replace(t.pattern,"("+t.regexp+")")):t.index=-1,e}),{regexp:t,index:[]}),a=s.filter((function(e){return e.index>-1}));a.sort((function(e,t){return e.index-t.index}));var l=new RegExp(c.regexp).exec(n);if(l){var f=r||e.exports.now();return a.forEach((function(e,t){e.fn(f,l[t+1])})),f}throw new Error("String '"+n+"' could not be parsed as '"+t+"'")}(t,n,r)},e.exports.now=function(){return new Date},e.exports.ISO8601_FORMAT="yyyy-MM-ddThh:mm:ss.SSS",e.exports.ISO8601_WITH_TZ_OFFSET_FORMAT="yyyy-MM-ddThh:mm:ss.SSSO",e.exports.DATETIME_FORMAT="dd MM yyyy hh:mm:ss.SSS",e.exports.ABSOLUTETIME_FORMAT="hh:mm:ss.SSS"}(le);const fe=le.exports,De=t,de=i,pe=e,Ee=s,he=$.exports("log4js:layouts"),Ce={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[90,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[91,39],yellow:[33,39]};function me(e){return e?`[${Ce[e][0]}m`:""}function Fe(e){return e?`[${Ce[e][1]}m`:""}function ye(e,t){return n=de.format("[%s] [%s] %s - ",fe.asString(e.startTime),e.level.toString(),e.categoryName),me(r=t)+n+Fe(r);var n,r}function ge(e){return ye(e)+de.format(...e.data)}function Ae(e){return ye(e,e.level.colour)+de.format(...e.data)}function ve(e){return de.format(...e.data)}function Se(e){return e.data[0]}function we(e,t){const n=/%(-?[0-9]+)?(\.?-?[0-9]+)?([[\]cdhmnprzxXyflosCMAF%])(\{([^}]+)\})?|([^%]+)/;function r(e){return e&&e.pid?e.pid.toString():process.pid.toString()}e=e||"%r %p %c - %m%n";const u={c:function(e,t){let n=e.categoryName;if(t){const e=parseInt(t,10),r=n.split(".");ee&&(n=r.slice(-e).join(pe.sep))}return n},l:function(e){return e.lineNumber?`${e.lineNumber}`:""},o:function(e){return e.columnNumber?`${e.columnNumber}`:""},s:function(e){return e.callStack||""},C:function(e){return e.className||""},M:function(e){return e.functionName||""},A:function(e){return e.functionAlias||""},F:function(e){return e.callerName||""}};function o(e,t,n){return u[e](t,n)}function i(e,t,n){let r=e;return r=function(e,t){let n;return e?(n=parseInt(e.slice(1),10),n>0?t.slice(0,n):t.slice(n)):t}(t,r),r=function(e,t){let n;if(e)if("-"===e.charAt(0))for(n=parseInt(e.slice(1),10);t.lengthve,basic:()=>ge,colored:()=>Ae,coloured:()=>Ae,pattern:e=>we(e&&e.pattern,e&&e.tokens),dummy:()=>Se};var _e={basicLayout:ge,messagePassThroughLayout:ve,patternLayout:we,colouredLayout:Ae,coloredLayout:Ae,dummyLayout:Se,addLayout(e,t){Oe[e]=t},layout:(e,t)=>Oe[e]&&Oe[e](t)};const be=ae,Be=["white","grey","black","blue","cyan","green","magenta","red","yellow"];class Ie{constructor(e,t,n){this.level=e,this.levelStr=t,this.colour=n}toString(){return this.levelStr}static getLevel(e,t){return e?e instanceof Ie?e:(e instanceof Object&&e.levelStr&&(e=e.levelStr),Ie[e.toString().toUpperCase()]||t):t}static addLevels(e){if(e){Object.keys(e).forEach((t=>{const n=t.toUpperCase();Ie[n]=new Ie(e[t].value,n,e[t].colour);const r=Ie.levels.findIndex((e=>e.levelStr===n));r>-1?Ie.levels[r]=Ie[n]:Ie.levels.push(Ie[n])})),Ie.levels.sort(((e,t)=>e.level-t.level))}}isLessThanOrEqualTo(e){return"string"==typeof e&&(e=Ie.getLevel(e)),this.level<=e.level}isGreaterThanOrEqualTo(e){return"string"==typeof e&&(e=Ie.getLevel(e)),this.level>=e.level}isEqualTo(e){return"string"==typeof e&&(e=Ie.getLevel(e)),this.level===e.level}}Ie.levels=[],Ie.addLevels({ALL:{value:Number.MIN_VALUE,colour:"grey"},TRACE:{value:5e3,colour:"blue"},DEBUG:{value:1e4,colour:"cyan"},INFO:{value:2e4,colour:"green"},WARN:{value:3e4,colour:"yellow"},ERROR:{value:4e4,colour:"red"},FATAL:{value:5e4,colour:"magenta"},MARK:{value:9007199254740992,colour:"grey"},OFF:{value:Number.MAX_VALUE,colour:"grey"}}),be.addListener((e=>{const t=e.levels;if(t){be.throwExceptionIf(e,be.not(be.anObject(t)),"levels must be an object");Object.keys(t).forEach((n=>{be.throwExceptionIf(e,be.not(be.validIdentifier(n)),`level name "${n}" is not a valid identifier (must start with a letter, only contain A-Z,a-z,0-9,_)`),be.throwExceptionIf(e,be.not(be.anObject(t[n])),`level "${n}" must be an object`),be.throwExceptionIf(e,be.not(t[n].value),`level "${n}" must have a 'value' property`),be.throwExceptionIf(e,be.not(be.anInteger(t[n].value)),`level "${n}".value must have an integer value`),be.throwExceptionIf(e,be.not(t[n].colour),`level "${n}" must have a 'colour' property`),be.throwExceptionIf(e,be.not(Be.indexOf(t[n].colour)>-1),`level "${n}".colour must be one of ${Be.join(", ")}`)}))}})),be.addListener((e=>{Ie.addLevels(e.levels)}));var xe=Ie,Pe={exports:{}},Ne={};/*! (c) 2020 Andrea Giammarchi */
+const{parse:Te,stringify:ke}=JSON,{keys:Re}=Object,Me=String,Le="string",je={},$e="object",He=(e,t)=>t,Ge=e=>e instanceof Me?Me(e):e,Ue=(e,t)=>typeof t===Le?new Me(t):t,Ve=(e,t,n,r)=>{const u=[];for(let o=Re(n),{length:i}=o,s=0;s{const r=Me(t.push(n)-1);return e.set(n,r),r},We=(e,t)=>{const n=Te(e,Ue).map(Ge),r=n[0],u=t||He,o=typeof r===$e&&r?Ve(n,new Set,r,u):r;return u.call({"":o},"",o)};Ne.parse=We;const ze=(e,t,n)=>{const r=t&&typeof t===$e?(e,n)=>""===e||-1Te(ze(e));Ne.fromJSON=e=>We(ke(e));const Ke=Ne,qe=xe;const Ye=new class{constructor(){const e={__LOG4JS_undefined__:void 0,__LOG4JS_NaN__:Number("abc"),__LOG4JS_Infinity__:1/0,"__LOG4JS_-Infinity__":-1/0};this.deMap=e,this.serMap={},Object.keys(this.deMap).forEach((e=>{const t=this.deMap[e];this.serMap[t]=e}))}canSerialise(e){return"string"!=typeof e&&e in this.serMap}serialise(e){return this.canSerialise(e)?this.serMap[e]:e}canDeserialise(e){return e in this.deMap}deserialise(e){return this.canDeserialise(e)?this.deMap[e]:e}};let Ze=class{constructor(e,t,n,r,u,o){if(this.startTime=new Date,this.categoryName=e,this.data=n,this.level=t,this.context=Object.assign({},r),this.pid=process.pid,this.error=o,void 0!==u){if(!u||"object"!=typeof u||Array.isArray(u))throw new TypeError("Invalid location type passed to LoggingEvent constructor");this.constructor._getLocationKeys().forEach((e=>{void 0!==u[e]&&(this[e]=u[e])}))}}static _getLocationKeys(){return["fileName","lineNumber","columnNumber","callStack","className","functionName","functionAlias","callerName"]}serialise(){return Ke.stringify(this,((e,t)=>(t instanceof Error&&(t=Object.assign({message:t.message,stack:t.stack},t)),Ye.serialise(t))))}static deserialise(e){let t;try{const n=Ke.parse(e,((e,t)=>{if(t&&t.message&&t.stack){const e=new Error(t);Object.keys(t).forEach((n=>{e[n]=t[n]})),t=e}return Ye.deserialise(t)}));this._getLocationKeys().forEach((e=>{void 0!==n[e]&&(n.location||(n.location={}),n.location[e]=n[e])})),t=new Ze(n.categoryName,qe.getLevel(n.level.levelStr),n.data,n.context,n.location,n.error),t.startTime=new Date(n.startTime),t.pid=n.pid,n.cluster&&(t.cluster=n.cluster)}catch(n){t=new Ze("log4js",qe.ERROR,["Unable to parse log:",e,"because: ",n])}return t}};var Xe=Ze;const Qe=$.exports("log4js:clustering"),et=Xe,tt=ae;let nt=!1,rt=null;try{rt=require("cluster")}catch(e){Qe("cluster module not present"),nt=!0}const ut=[];let ot=!1,it="NODE_APP_INSTANCE";const st=()=>ot&&"0"===process.env[it],ct=()=>nt||rt&&rt.isMaster||st(),at=e=>{ut.forEach((t=>t(e)))},lt=(e,t)=>{if(Qe("cluster message received from worker ",e,": ",t),e.topic&&e.data&&(t=e,e=void 0),t&&t.topic&&"log4js:message"===t.topic){Qe("received message: ",t.data);const e=et.deserialise(t.data);at(e)}};nt||tt.addListener((e=>{ut.length=0,({pm2:ot,disableClustering:nt,pm2InstanceVar:it="NODE_APP_INSTANCE"}=e),Qe(`clustering disabled ? ${nt}`),Qe(`cluster.isMaster ? ${rt&&rt.isMaster}`),Qe(`pm2 enabled ? ${ot}`),Qe(`pm2InstanceVar = ${it}`),Qe(`process.env[${it}] = ${process.env[it]}`),ot&&process.removeListener("message",lt),rt&&rt.removeListener&&rt.removeListener("message",lt),nt||e.disableClustering?Qe("Not listening for cluster messages, because clustering disabled."):st()?(Qe("listening for PM2 broadcast messages"),process.on("message",lt)):rt&&rt.isMaster?(Qe("listening for cluster messages"),rt.on("message",lt)):Qe("not listening for messages, because we are not a master process")}));var ft={onlyOnMaster:(e,t)=>ct()?e():t,isMaster:ct,send:e=>{ct()?at(e):(ot||(e.cluster={workerId:rt.worker.id,worker:process.pid}),process.send({topic:"log4js:message",data:e.serialise()}))},onMessage:e=>{ut.push(e)}},Dt={};function dt(e){if("number"==typeof e&&Number.isInteger(e))return e;const t={K:1024,M:1048576,G:1073741824},n=Object.keys(t),r=e.slice(-1).toLocaleUpperCase(),u=e.slice(0,-1).trim();if(n.indexOf(r)<0||!Number.isInteger(Number(u)))throw Error(`maxLogSize: "${e}" is invalid`);return u*t[r]}function pt(e){return function(e,t){const n=Object.assign({},t);return Object.keys(e).forEach((r=>{n[r]&&(n[r]=e[r](t[r]))})),n}({maxLogSize:dt},e)}const Et={dateFile:pt,file:pt,fileSync:pt};Dt.modifyConfig=e=>Et[e.type]?Et[e.type](e):e;var ht={};const Ct=console.log.bind(console);ht.configure=function(e,t){let n=t.colouredLayout;return e.layout&&(n=t.layout(e.layout.type,e.layout)),function(e,t){return n=>{Ct(e(n,t))}}(n,e.timezoneOffset)};var mt={};mt.configure=function(e,t){let n=t.colouredLayout;return e.layout&&(n=t.layout(e.layout.type,e.layout)),function(e,t){return n=>{process.stdout.write(`${e(n,t)}\n`)}}(n,e.timezoneOffset)};var Ft={};Ft.configure=function(e,t){let n=t.colouredLayout;return e.layout&&(n=t.layout(e.layout.type,e.layout)),function(e,t){return n=>{process.stderr.write(`${e(n,t)}\n`)}}(n,e.timezoneOffset)};var yt={};yt.configure=function(e,t,n,r){const u=n(e.appender);return function(e,t,n,r){const u=r.getLevel(e),o=r.getLevel(t,r.FATAL);return e=>{const t=e.level;u.isLessThanOrEqualTo(t)&&o.isGreaterThanOrEqualTo(t)&&n(e)}}(e.level,e.maxLevel,u,r)};var gt={};const At=$.exports("log4js:categoryFilter");gt.configure=function(e,t,n){const r=n(e.appender);return function(e,t){return"string"==typeof e&&(e=[e]),n=>{At(`Checking ${n.categoryName} against ${e}`),-1===e.indexOf(n.categoryName)&&(At("Not excluded, sending to appender"),t(n))}}(e.exclude,r)};var vt={};const St=$.exports("log4js:noLogFilter");vt.configure=function(e,t,n){const r=n(e.appender);return function(e,t){return n=>{St(`Checking data: ${n.data} against filters: ${e}`),"string"==typeof e&&(e=[e]),e=e.filter((e=>null!=e&&""!==e));const r=new RegExp(e.join("|"),"i");(0===e.length||n.data.findIndex((e=>r.test(e)))<0)&&(St("Not excluded, sending to appender"),t(n))}}(e.exclude,r)};var wt={},Ot={exports:{}},_t={},bt={fromCallback:function(e){return Object.defineProperty((function(){if("function"!=typeof arguments[arguments.length-1])return new Promise(((t,n)=>{arguments[arguments.length]=(e,r)=>{if(e)return n(e);t(r)},arguments.length++,e.apply(this,arguments)}));e.apply(this,arguments)}),"name",{value:e.name})},fromPromise:function(e){return Object.defineProperty((function(){const t=arguments[arguments.length-1];if("function"!=typeof t)return e.apply(this,arguments);e.apply(this,arguments).then((e=>t(null,e)),t)}),"name",{value:e.name})}},Bt=c,It=process.cwd,xt=null,Pt=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){return xt||(xt=It.call(process)),xt};try{process.cwd()}catch(e){}if("function"==typeof process.chdir){var Nt=process.chdir;process.chdir=function(e){xt=null,Nt.call(process,e)},Object.setPrototypeOf&&Object.setPrototypeOf(process.chdir,Nt)}var Tt=function(e){Bt.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)&&function(e){e.lchmod=function(t,n,r){e.open(t,Bt.O_WRONLY|Bt.O_SYMLINK,n,(function(t,u){t?r&&r(t):e.fchmod(u,n,(function(t){e.close(u,(function(e){r&&r(t||e)}))}))}))},e.lchmodSync=function(t,n){var r,u=e.openSync(t,Bt.O_WRONLY|Bt.O_SYMLINK,n),o=!0;try{r=e.fchmodSync(u,n),o=!1}finally{if(o)try{e.closeSync(u)}catch(e){}else e.closeSync(u)}return r}}(e);e.lutimes||function(e){Bt.hasOwnProperty("O_SYMLINK")&&e.futimes?(e.lutimes=function(t,n,r,u){e.open(t,Bt.O_SYMLINK,(function(t,o){t?u&&u(t):e.futimes(o,n,r,(function(t){e.close(o,(function(e){u&&u(t||e)}))}))}))},e.lutimesSync=function(t,n,r){var u,o=e.openSync(t,Bt.O_SYMLINK),i=!0;try{u=e.futimesSync(o,n,r),i=!1}finally{if(i)try{e.closeSync(o)}catch(e){}else e.closeSync(o)}return u}):e.futimes&&(e.lutimes=function(e,t,n,r){r&&process.nextTick(r)},e.lutimesSync=function(){})}(e);e.chown=r(e.chown),e.fchown=r(e.fchown),e.lchown=r(e.lchown),e.chmod=t(e.chmod),e.fchmod=t(e.fchmod),e.lchmod=t(e.lchmod),e.chownSync=u(e.chownSync),e.fchownSync=u(e.fchownSync),e.lchownSync=u(e.lchownSync),e.chmodSync=n(e.chmodSync),e.fchmodSync=n(e.fchmodSync),e.lchmodSync=n(e.lchmodSync),e.stat=o(e.stat),e.fstat=o(e.fstat),e.lstat=o(e.lstat),e.statSync=i(e.statSync),e.fstatSync=i(e.fstatSync),e.lstatSync=i(e.lstatSync),e.chmod&&!e.lchmod&&(e.lchmod=function(e,t,n){n&&process.nextTick(n)},e.lchmodSync=function(){});e.chown&&!e.lchown&&(e.lchown=function(e,t,n,r){r&&process.nextTick(r)},e.lchownSync=function(){});"win32"===Pt&&(e.rename="function"!=typeof e.rename?e.rename:function(t){function n(n,r,u){var o=Date.now(),i=0;t(n,r,(function s(c){if(c&&("EACCES"===c.code||"EPERM"===c.code||"EBUSY"===c.code)&&Date.now()-o<6e4)return setTimeout((function(){e.stat(r,(function(e,o){e&&"ENOENT"===e.code?t(n,r,s):u(c)}))}),i),void(i<100&&(i+=10));u&&u(c)}))}return Object.setPrototypeOf&&Object.setPrototypeOf(n,t),n}(e.rename));function t(t){return t?function(n,r,u){return t.call(e,n,r,(function(e){s(e)&&(e=null),u&&u.apply(this,arguments)}))}:t}function n(t){return t?function(n,r){try{return t.call(e,n,r)}catch(e){if(!s(e))throw e}}:t}function r(t){return t?function(n,r,u,o){return t.call(e,n,r,u,(function(e){s(e)&&(e=null),o&&o.apply(this,arguments)}))}:t}function u(t){return t?function(n,r,u){try{return t.call(e,n,r,u)}catch(e){if(!s(e))throw e}}:t}function o(t){return t?function(n,r,u){function o(e,t){t&&(t.uid<0&&(t.uid+=4294967296),t.gid<0&&(t.gid+=4294967296)),u&&u.apply(this,arguments)}return"function"==typeof r&&(u=r,r=null),r?t.call(e,n,r,o):t.call(e,n,o)}:t}function i(t){return t?function(n,r){var u=r?t.call(e,n,r):t.call(e,n);return u&&(u.uid<0&&(u.uid+=4294967296),u.gid<0&&(u.gid+=4294967296)),u}:t}function s(e){return!e||("ENOSYS"===e.code||!(process.getuid&&0===process.getuid()||"EINVAL"!==e.code&&"EPERM"!==e.code))}e.read="function"!=typeof e.read?e.read:function(t){function n(n,r,u,o,i,s){var c;if(s&&"function"==typeof s){var a=0;c=function(l,f,D){if(l&&"EAGAIN"===l.code&&a<10)return a++,t.call(e,n,r,u,o,i,c);s.apply(this,arguments)}}return t.call(e,n,r,u,o,i,c)}return Object.setPrototypeOf&&Object.setPrototypeOf(n,t),n}(e.read),e.readSync="function"!=typeof e.readSync?e.readSync:(c=e.readSync,function(t,n,r,u,o){for(var i=0;;)try{return c.call(e,t,n,r,u,o)}catch(e){if("EAGAIN"===e.code&&i<10){i++;continue}throw e}});var c};var kt=a.Stream,Rt=function(e){return{ReadStream:function t(n,r){if(!(this instanceof t))return new t(n,r);kt.call(this);var u=this;this.path=n,this.fd=null,this.readable=!0,this.paused=!1,this.flags="r",this.mode=438,this.bufferSize=65536,r=r||{};for(var o=Object.keys(r),i=0,s=o.length;ithis.end)throw new Error("start must be <= end");this.pos=this.start}if(null!==this.fd)return void process.nextTick((function(){u._read()}));e.open(this.path,this.flags,this.mode,(function(e,t){if(e)return u.emit("error",e),void(u.readable=!1);u.fd=t,u.emit("open",t),u._read()}))},WriteStream:function t(n,r){if(!(this instanceof t))return new t(n,r);kt.call(this),this.path=n,this.fd=null,this.writable=!0,this.flags="w",this.encoding="binary",this.mode=438,this.bytesWritten=0,r=r||{};for(var u=Object.keys(r),o=0,i=u.length;o= zero");this.pos=this.start}this.busy=!1,this._queue=[],null===this.fd&&(this._open=e.open,this._queue.push([this._open,this.path,this.flags,this.mode,void 0]),this.flush())}}};var Mt=function(e){if(null===e||"object"!=typeof e)return e;if(e instanceof Object)var t={__proto__:Lt(e)};else t=Object.create(null);return Object.getOwnPropertyNames(e).forEach((function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))})),t},Lt=Object.getPrototypeOf||function(e){return e.__proto__};var jt,$t,Ht=n,Gt=Tt,Ut=Rt,Vt=Mt,Jt=i;function Wt(e,t){Object.defineProperty(e,jt,{get:function(){return t}})}"function"==typeof Symbol&&"function"==typeof Symbol.for?(jt=Symbol.for("graceful-fs.queue"),$t=Symbol.for("graceful-fs.previous")):(jt="___graceful-fs.queue",$t="___graceful-fs.previous");var zt=function(){};if(Jt.debuglog?zt=Jt.debuglog("gfs4"):/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&(zt=function(){var e=Jt.format.apply(Jt,arguments);e="GFS4: "+e.split(/\n/).join("\nGFS4: "),console.error(e)}),!Ht[jt]){var Kt=p[jt]||[];Wt(Ht,Kt),Ht.close=function(e){function t(t,n){return e.call(Ht,t,(function(e){e||Qt(),"function"==typeof n&&n.apply(this,arguments)}))}return Object.defineProperty(t,$t,{value:e}),t}(Ht.close),Ht.closeSync=function(e){function t(t){e.apply(Ht,arguments),Qt()}return Object.defineProperty(t,$t,{value:e}),t}(Ht.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&process.on("exit",(function(){zt(Ht[jt]),l.equal(Ht[jt].length,0)}))}p[jt]||Wt(p,Ht[jt]);var qt,Yt=Zt(Vt(Ht));function Zt(e){Gt(e),e.gracefulify=Zt,e.createReadStream=function(t,n){return new e.ReadStream(t,n)},e.createWriteStream=function(t,n){return new e.WriteStream(t,n)};var t=e.readFile;e.readFile=function(e,n,r){"function"==typeof n&&(r=n,n=null);return function e(n,r,u,o){return t(n,r,(function(t){!t||"EMFILE"!==t.code&&"ENFILE"!==t.code?"function"==typeof u&&u.apply(this,arguments):Xt([e,[n,r,u],t,o||Date.now(),Date.now()])}))}(e,n,r)};var n=e.writeFile;e.writeFile=function(e,t,r,u){"function"==typeof r&&(u=r,r=null);return function e(t,r,u,o,i){return n(t,r,u,(function(n){!n||"EMFILE"!==n.code&&"ENFILE"!==n.code?"function"==typeof o&&o.apply(this,arguments):Xt([e,[t,r,u,o],n,i||Date.now(),Date.now()])}))}(e,t,r,u)};var r=e.appendFile;r&&(e.appendFile=function(e,t,n,u){"function"==typeof n&&(u=n,n=null);return function e(t,n,u,o,i){return r(t,n,u,(function(r){!r||"EMFILE"!==r.code&&"ENFILE"!==r.code?"function"==typeof o&&o.apply(this,arguments):Xt([e,[t,n,u,o],r,i||Date.now(),Date.now()])}))}(e,t,n,u)});var u=e.copyFile;u&&(e.copyFile=function(e,t,n,r){"function"==typeof n&&(r=n,n=0);return function e(t,n,r,o,i){return u(t,n,r,(function(u){!u||"EMFILE"!==u.code&&"ENFILE"!==u.code?"function"==typeof o&&o.apply(this,arguments):Xt([e,[t,n,r,o],u,i||Date.now(),Date.now()])}))}(e,t,n,r)});var o=e.readdir;e.readdir=function(e,t,n){"function"==typeof t&&(n=t,t=null);var r=i.test(process.version)?function(e,t,n,r){return o(e,u(e,t,n,r))}:function(e,t,n,r){return o(e,t,u(e,t,n,r))};return r(e,t,n);function u(e,t,n,u){return function(o,i){!o||"EMFILE"!==o.code&&"ENFILE"!==o.code?(i&&i.sort&&i.sort(),"function"==typeof n&&n.call(this,o,i)):Xt([r,[e,t,n],o,u||Date.now(),Date.now()])}}};var i=/^v[0-5]\./;if("v0.8"===process.version.substr(0,4)){var s=Ut(e);D=s.ReadStream,d=s.WriteStream}var c=e.ReadStream;c&&(D.prototype=Object.create(c.prototype),D.prototype.open=function(){var e=this;E(e.path,e.flags,e.mode,(function(t,n){t?(e.autoClose&&e.destroy(),e.emit("error",t)):(e.fd=n,e.emit("open",n),e.read())}))});var a=e.WriteStream;a&&(d.prototype=Object.create(a.prototype),d.prototype.open=function(){var e=this;E(e.path,e.flags,e.mode,(function(t,n){t?(e.destroy(),e.emit("error",t)):(e.fd=n,e.emit("open",n))}))}),Object.defineProperty(e,"ReadStream",{get:function(){return D},set:function(e){D=e},enumerable:!0,configurable:!0}),Object.defineProperty(e,"WriteStream",{get:function(){return d},set:function(e){d=e},enumerable:!0,configurable:!0});var l=D;Object.defineProperty(e,"FileReadStream",{get:function(){return l},set:function(e){l=e},enumerable:!0,configurable:!0});var f=d;function D(e,t){return this instanceof D?(c.apply(this,arguments),this):D.apply(Object.create(D.prototype),arguments)}function d(e,t){return this instanceof d?(a.apply(this,arguments),this):d.apply(Object.create(d.prototype),arguments)}Object.defineProperty(e,"FileWriteStream",{get:function(){return f},set:function(e){f=e},enumerable:!0,configurable:!0});var p=e.open;function E(e,t,n,r){return"function"==typeof n&&(r=n,n=null),function e(t,n,r,u,o){return p(t,n,r,(function(i,s){!i||"EMFILE"!==i.code&&"ENFILE"!==i.code?"function"==typeof u&&u.apply(this,arguments):Xt([e,[t,n,r,u],i,o||Date.now(),Date.now()])}))}(e,t,n,r)}return e.open=E,e}function Xt(e){zt("ENQUEUE",e[0].name,e[1]),Ht[jt].push(e),en()}function Qt(){for(var e=Date.now(),t=0;t2&&(Ht[jt][t][3]=e,Ht[jt][t][4]=e);en()}function en(){if(clearTimeout(qt),qt=void 0,0!==Ht[jt].length){var e=Ht[jt].shift(),t=e[0],n=e[1],r=e[2],u=e[3],o=e[4];if(void 0===u)zt("RETRY",t.name,n),t.apply(null,n);else if(Date.now()-u>=6e4){zt("TIMEOUT",t.name,n);var i=n.pop();"function"==typeof i&&i.call(null,r)}else{var s=Date.now()-o,c=Math.max(o-u,1);s>=Math.min(1.2*c,100)?(zt("RETRY",t.name,n),t.apply(null,n.concat([u]))):Ht[jt].push(e)}void 0===qt&&(qt=setTimeout(en,0))}}process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!Ht.__patched&&(Yt=Zt(Ht),Ht.__patched=!0),function(e){const t=bt.fromCallback,n=Yt,r=["access","appendFile","chmod","chown","close","copyFile","fchmod","fchown","fdatasync","fstat","fsync","ftruncate","futimes","lchown","lchmod","link","lstat","mkdir","mkdtemp","open","readFile","readdir","readlink","realpath","rename","rmdir","stat","symlink","truncate","unlink","utimes","writeFile"].filter((e=>"function"==typeof n[e]));Object.keys(n).forEach((t=>{"promises"!==t&&(e[t]=n[t])})),r.forEach((r=>{e[r]=t(n[r])})),e.exists=function(e,t){return"function"==typeof t?n.exists(e,t):new Promise((t=>n.exists(e,t)))},e.read=function(e,t,r,u,o,i){return"function"==typeof i?n.read(e,t,r,u,o,i):new Promise(((i,s)=>{n.read(e,t,r,u,o,((e,t,n)=>{if(e)return s(e);i({bytesRead:t,buffer:n})}))}))},e.write=function(e,t,...r){return"function"==typeof r[r.length-1]?n.write(e,t,...r):new Promise(((u,o)=>{n.write(e,t,...r,((e,t,n)=>{if(e)return o(e);u({bytesWritten:t,buffer:n})}))}))},"function"==typeof n.realpath.native&&(e.realpath.native=t(n.realpath.native))}(_t);const tn=e;function nn(e){return(e=tn.normalize(tn.resolve(e)).split(tn.sep)).length>0?e[0]:null}const rn=/[<>:"|?*]/;var un=function(e){const t=nn(e);return e=e.replace(t,""),rn.test(e)};const on=Yt,sn=e,cn=un,an=parseInt("0777",8);var ln=function e(t,n,r,u){if("function"==typeof n?(r=n,n={}):n&&"object"==typeof n||(n={mode:n}),"win32"===process.platform&&cn(t)){const e=new Error(t+" contains invalid WIN32 path characters.");return e.code="EINVAL",r(e)}let o=n.mode;const i=n.fs||on;void 0===o&&(o=an&~process.umask()),u||(u=null),r=r||function(){},t=sn.resolve(t),i.mkdir(t,o,(o=>{if(!o)return r(null,u=u||t);if("ENOENT"===o.code){if(sn.dirname(t)===t)return r(o);e(sn.dirname(t),n,((u,o)=>{u?r(u,o):e(t,n,r,o)}))}else i.stat(t,((e,t)=>{e||!t.isDirectory()?r(o,u):r(null,u)}))}))};const fn=Yt,Dn=e,dn=un,pn=parseInt("0777",8);var En=function e(t,n,r){n&&"object"==typeof n||(n={mode:n});let u=n.mode;const o=n.fs||fn;if("win32"===process.platform&&dn(t)){const e=new Error(t+" contains invalid WIN32 path characters.");throw e.code="EINVAL",e}void 0===u&&(u=pn&~process.umask()),r||(r=null),t=Dn.resolve(t);try{o.mkdirSync(t,u),r=r||t}catch(u){if("ENOENT"===u.code){if(Dn.dirname(t)===t)throw u;r=e(Dn.dirname(t),n,r),e(t,n,r)}else{let e;try{e=o.statSync(t)}catch(e){throw u}if(!e.isDirectory())throw u}}return r};const hn=(0,bt.fromCallback)(ln);var Cn={mkdirs:hn,mkdirsSync:En,mkdirp:hn,mkdirpSync:En,ensureDir:hn,ensureDirSync:En};const mn=Yt;var Fn=function(e,t,n,r){mn.open(e,"r+",((e,u)=>{if(e)return r(e);mn.futimes(u,t,n,(e=>{mn.close(u,(t=>{r&&r(e||t)}))}))}))},yn=function(e,t,n){const r=mn.openSync(e,"r+");return mn.futimesSync(r,t,n),mn.closeSync(r)};const gn=Yt,An=e,vn=10,Sn=5,wn=0,On=process.versions.node.split("."),_n=Number.parseInt(On[0],10),bn=Number.parseInt(On[1],10),Bn=Number.parseInt(On[2],10);function In(){if(_n>vn)return!0;if(_n===vn){if(bn>Sn)return!0;if(bn===Sn&&Bn>=wn)return!0}return!1}function xn(e,t){const n=An.resolve(e).split(An.sep).filter((e=>e)),r=An.resolve(t).split(An.sep).filter((e=>e));return n.reduce(((e,t,n)=>e&&r[n]===t),!0)}function Pn(e,t,n){return`Cannot ${n} '${e}' to a subdirectory of itself, '${t}'.`}var Nn,Tn,kn={checkPaths:function(e,t,n,r){!function(e,t,n){In()?gn.stat(e,{bigint:!0},((e,r)=>{if(e)return n(e);gn.stat(t,{bigint:!0},((e,t)=>e?"ENOENT"===e.code?n(null,{srcStat:r,destStat:null}):n(e):n(null,{srcStat:r,destStat:t})))})):gn.stat(e,((e,r)=>{if(e)return n(e);gn.stat(t,((e,t)=>e?"ENOENT"===e.code?n(null,{srcStat:r,destStat:null}):n(e):n(null,{srcStat:r,destStat:t})))}))}(e,t,((u,o)=>{if(u)return r(u);const{srcStat:i,destStat:s}=o;return s&&s.ino&&s.dev&&s.ino===i.ino&&s.dev===i.dev?r(new Error("Source and destination must not be the same.")):i.isDirectory()&&xn(e,t)?r(new Error(Pn(e,t,n))):r(null,{srcStat:i,destStat:s})}))},checkPathsSync:function(e,t,n){const{srcStat:r,destStat:u}=function(e,t){let n,r;n=In()?gn.statSync(e,{bigint:!0}):gn.statSync(e);try{r=In()?gn.statSync(t,{bigint:!0}):gn.statSync(t)}catch(e){if("ENOENT"===e.code)return{srcStat:n,destStat:null};throw e}return{srcStat:n,destStat:r}}(e,t);if(u&&u.ino&&u.dev&&u.ino===r.ino&&u.dev===r.dev)throw new Error("Source and destination must not be the same.");if(r.isDirectory()&&xn(e,t))throw new Error(Pn(e,t,n));return{srcStat:r,destStat:u}},checkParentPaths:function e(t,n,r,u,o){const i=An.resolve(An.dirname(t)),s=An.resolve(An.dirname(r));if(s===i||s===An.parse(s).root)return o();In()?gn.stat(s,{bigint:!0},((i,c)=>i?"ENOENT"===i.code?o():o(i):c.ino&&c.dev&&c.ino===n.ino&&c.dev===n.dev?o(new Error(Pn(t,r,u))):e(t,n,s,u,o))):gn.stat(s,((i,c)=>i?"ENOENT"===i.code?o():o(i):c.ino&&c.dev&&c.ino===n.ino&&c.dev===n.dev?o(new Error(Pn(t,r,u))):e(t,n,s,u,o)))},checkParentPathsSync:function e(t,n,r,u){const o=An.resolve(An.dirname(t)),i=An.resolve(An.dirname(r));if(i===o||i===An.parse(i).root)return;let s;try{s=In()?gn.statSync(i,{bigint:!0}):gn.statSync(i)}catch(e){if("ENOENT"===e.code)return;throw e}if(s.ino&&s.dev&&s.ino===n.ino&&s.dev===n.dev)throw new Error(Pn(t,r,u));return e(t,n,i,u)},isSrcSubdir:xn};const Rn=Yt,Mn=e,Ln=Cn.mkdirsSync,jn=yn,$n=kn;function Hn(e,t,n,r){if(!r.filter||r.filter(t,n))return function(e,t,n,r){const u=r.dereference?Rn.statSync:Rn.lstatSync,o=u(t);if(o.isDirectory())return function(e,t,n,r,u){if(!t)return function(e,t,n,r){return Rn.mkdirSync(n),Un(t,n,r),Rn.chmodSync(n,e.mode)}(e,n,r,u);if(t&&!t.isDirectory())throw new Error(`Cannot overwrite non-directory '${r}' with directory '${n}'.`);return Un(n,r,u)}(o,e,t,n,r);if(o.isFile()||o.isCharacterDevice()||o.isBlockDevice())return function(e,t,n,r,u){return t?function(e,t,n,r){if(r.overwrite)return Rn.unlinkSync(n),Gn(e,t,n,r);if(r.errorOnExist)throw new Error(`'${n}' already exists`)}(e,n,r,u):Gn(e,n,r,u)}(o,e,t,n,r);if(o.isSymbolicLink())return function(e,t,n,r){let u=Rn.readlinkSync(t);r.dereference&&(u=Mn.resolve(process.cwd(),u));if(e){let e;try{e=Rn.readlinkSync(n)}catch(e){if("EINVAL"===e.code||"UNKNOWN"===e.code)return Rn.symlinkSync(u,n);throw e}if(r.dereference&&(e=Mn.resolve(process.cwd(),e)),$n.isSrcSubdir(u,e))throw new Error(`Cannot copy '${u}' to a subdirectory of itself, '${e}'.`);if(Rn.statSync(n).isDirectory()&&$n.isSrcSubdir(e,u))throw new Error(`Cannot overwrite '${e}' with '${u}'.`);return function(e,t){return Rn.unlinkSync(t),Rn.symlinkSync(e,t)}(u,n)}return Rn.symlinkSync(u,n)}(e,t,n,r)}(e,t,n,r)}function Gn(e,t,n,r){return"function"==typeof Rn.copyFileSync?(Rn.copyFileSync(t,n),Rn.chmodSync(n,e.mode),r.preserveTimestamps?jn(n,e.atime,e.mtime):void 0):function(e,t,n,r){const u=65536,o=(Tn?Nn:(Tn=1,Nn=function(e){if("function"==typeof Buffer.allocUnsafe)try{return Buffer.allocUnsafe(e)}catch(t){return new Buffer(e)}return new Buffer(e)}))(u),i=Rn.openSync(t,"r"),s=Rn.openSync(n,"w",e.mode);let c=0;for(;cfunction(e,t,n,r){const u=Mn.join(t,e),o=Mn.join(n,e),{destStat:i}=$n.checkPathsSync(u,o,"copy");return Hn(i,u,o,r)}(r,e,t,n)))}var Vn=function(e,t,n){"function"==typeof n&&(n={filter:n}),(n=n||{}).clobber=!("clobber"in n)||!!n.clobber,n.overwrite="overwrite"in n?!!n.overwrite:n.clobber,n.preserveTimestamps&&"ia32"===process.arch&&console.warn("fs-extra: Using the preserveTimestamps option in 32-bit node is not recommended;\n\n see https://github.com/jprichardson/node-fs-extra/issues/269");const{srcStat:r,destStat:u}=$n.checkPathsSync(e,t,"copy");return $n.checkParentPathsSync(e,r,t,"copy"),function(e,t,n,r){if(r.filter&&!r.filter(t,n))return;const u=Mn.dirname(n);Rn.existsSync(u)||Ln(u);return Hn(e,t,n,r)}(u,e,t,n)},Jn={copySync:Vn};const Wn=bt.fromPromise,zn=_t;var Kn={pathExists:Wn((function(e){return zn.access(e).then((()=>!0)).catch((()=>!1))})),pathExistsSync:zn.existsSync};const qn=Yt,Yn=e,Zn=Cn.mkdirs,Xn=Kn.pathExists,Qn=Fn,er=kn;function tr(e,t,n,r,u){const o=Yn.dirname(n);Xn(o,((i,s)=>i?u(i):s?rr(e,t,n,r,u):void Zn(o,(o=>o?u(o):rr(e,t,n,r,u)))))}function nr(e,t,n,r,u,o){Promise.resolve(u.filter(n,r)).then((i=>i?e(t,n,r,u,o):o()),(e=>o(e)))}function rr(e,t,n,r,u){return r.filter?nr(ur,e,t,n,r,u):ur(e,t,n,r,u)}function ur(e,t,n,r,u){(r.dereference?qn.stat:qn.lstat)(t,((o,i)=>o?u(o):i.isDirectory()?function(e,t,n,r,u,o){if(!t)return function(e,t,n,r,u){qn.mkdir(n,(o=>{if(o)return u(o);sr(t,n,r,(t=>t?u(t):qn.chmod(n,e.mode,u)))}))}(e,n,r,u,o);if(t&&!t.isDirectory())return o(new Error(`Cannot overwrite non-directory '${r}' with directory '${n}'.`));return sr(n,r,u,o)}(i,e,t,n,r,u):i.isFile()||i.isCharacterDevice()||i.isBlockDevice()?function(e,t,n,r,u,o){return t?function(e,t,n,r,u){if(!r.overwrite)return r.errorOnExist?u(new Error(`'${n}' already exists`)):u();qn.unlink(n,(o=>o?u(o):or(e,t,n,r,u)))}(e,n,r,u,o):or(e,n,r,u,o)}(i,e,t,n,r,u):i.isSymbolicLink()?function(e,t,n,r,u){qn.readlink(t,((t,o)=>t?u(t):(r.dereference&&(o=Yn.resolve(process.cwd(),o)),e?void qn.readlink(n,((t,i)=>t?"EINVAL"===t.code||"UNKNOWN"===t.code?qn.symlink(o,n,u):u(t):(r.dereference&&(i=Yn.resolve(process.cwd(),i)),er.isSrcSubdir(o,i)?u(new Error(`Cannot copy '${o}' to a subdirectory of itself, '${i}'.`)):e.isDirectory()&&er.isSrcSubdir(i,o)?u(new Error(`Cannot overwrite '${i}' with '${o}'.`)):function(e,t,n){qn.unlink(t,(r=>r?n(r):qn.symlink(e,t,n)))}(o,n,u)))):qn.symlink(o,n,u))))}(e,t,n,r,u):void 0))}function or(e,t,n,r,u){return"function"==typeof qn.copyFile?qn.copyFile(t,n,(t=>t?u(t):ir(e,n,r,u))):function(e,t,n,r,u){const o=qn.createReadStream(t);o.on("error",(e=>u(e))).once("open",(()=>{const t=qn.createWriteStream(n,{mode:e.mode});t.on("error",(e=>u(e))).on("open",(()=>o.pipe(t))).once("close",(()=>ir(e,n,r,u)))}))}(e,t,n,r,u)}function ir(e,t,n,r){qn.chmod(t,e.mode,(u=>u?r(u):n.preserveTimestamps?Qn(t,e.atime,e.mtime,r):r()))}function sr(e,t,n,r){qn.readdir(e,((u,o)=>u?r(u):cr(o,e,t,n,r)))}function cr(e,t,n,r,u){const o=e.pop();return o?function(e,t,n,r,u,o){const i=Yn.join(n,t),s=Yn.join(r,t);er.checkPaths(i,s,"copy",((t,c)=>{if(t)return o(t);const{destStat:a}=c;rr(a,i,s,u,(t=>t?o(t):cr(e,n,r,u,o)))}))}(e,o,t,n,r,u):u()}var ar=function(e,t,n,r){"function"!=typeof n||r?"function"==typeof n&&(n={filter:n}):(r=n,n={}),r=r||function(){},(n=n||{}).clobber=!("clobber"in n)||!!n.clobber,n.overwrite="overwrite"in n?!!n.overwrite:n.clobber,n.preserveTimestamps&&"ia32"===process.arch&&console.warn("fs-extra: Using the preserveTimestamps option in 32-bit node is not recommended;\n\n see https://github.com/jprichardson/node-fs-extra/issues/269"),er.checkPaths(e,t,"copy",((u,o)=>{if(u)return r(u);const{srcStat:i,destStat:s}=o;er.checkParentPaths(e,i,t,"copy",(u=>u?r(u):n.filter?nr(tr,s,e,t,n,r):tr(s,e,t,n,r)))}))};var lr={copy:(0,bt.fromCallback)(ar)};const fr=Yt,Dr=e,dr=l,pr="win32"===process.platform;function Er(e){["unlink","chmod","stat","lstat","rmdir","readdir"].forEach((t=>{e[t]=e[t]||fr[t],e[t+="Sync"]=e[t]||fr[t]})),e.maxBusyTries=e.maxBusyTries||3}function hr(e,t,n){let r=0;"function"==typeof t&&(n=t,t={}),dr(e,"rimraf: missing path"),dr.strictEqual(typeof e,"string","rimraf: path should be a string"),dr.strictEqual(typeof n,"function","rimraf: callback function required"),dr(t,"rimraf: invalid options argument provided"),dr.strictEqual(typeof t,"object","rimraf: options should be object"),Er(t),Cr(e,t,(function u(o){if(o){if(("EBUSY"===o.code||"ENOTEMPTY"===o.code||"EPERM"===o.code)&&rCr(e,t,u)),100*r)}"ENOENT"===o.code&&(o=null)}n(o)}))}function Cr(e,t,n){dr(e),dr(t),dr("function"==typeof n),t.lstat(e,((r,u)=>r&&"ENOENT"===r.code?n(null):r&&"EPERM"===r.code&&pr?mr(e,t,r,n):u&&u.isDirectory()?yr(e,t,r,n):void t.unlink(e,(r=>{if(r){if("ENOENT"===r.code)return n(null);if("EPERM"===r.code)return pr?mr(e,t,r,n):yr(e,t,r,n);if("EISDIR"===r.code)return yr(e,t,r,n)}return n(r)}))))}function mr(e,t,n,r){dr(e),dr(t),dr("function"==typeof r),n&&dr(n instanceof Error),t.chmod(e,438,(u=>{u?r("ENOENT"===u.code?null:n):t.stat(e,((u,o)=>{u?r("ENOENT"===u.code?null:n):o.isDirectory()?yr(e,t,n,r):t.unlink(e,r)}))}))}function Fr(e,t,n){let r;dr(e),dr(t),n&&dr(n instanceof Error);try{t.chmodSync(e,438)}catch(e){if("ENOENT"===e.code)return;throw n}try{r=t.statSync(e)}catch(e){if("ENOENT"===e.code)return;throw n}r.isDirectory()?Ar(e,t,n):t.unlinkSync(e)}function yr(e,t,n,r){dr(e),dr(t),n&&dr(n instanceof Error),dr("function"==typeof r),t.rmdir(e,(u=>{!u||"ENOTEMPTY"!==u.code&&"EEXIST"!==u.code&&"EPERM"!==u.code?u&&"ENOTDIR"===u.code?r(n):r(u):function(e,t,n){dr(e),dr(t),dr("function"==typeof n),t.readdir(e,((r,u)=>{if(r)return n(r);let o,i=u.length;if(0===i)return t.rmdir(e,n);u.forEach((r=>{hr(Dr.join(e,r),t,(r=>{if(!o)return r?n(o=r):void(0==--i&&t.rmdir(e,n))}))}))}))}(e,t,r)}))}function gr(e,t){let n;Er(t=t||{}),dr(e,"rimraf: missing path"),dr.strictEqual(typeof e,"string","rimraf: path should be a string"),dr(t,"rimraf: missing options"),dr.strictEqual(typeof t,"object","rimraf: options should be object");try{n=t.lstatSync(e)}catch(n){if("ENOENT"===n.code)return;"EPERM"===n.code&&pr&&Fr(e,t,n)}try{n&&n.isDirectory()?Ar(e,t,null):t.unlinkSync(e)}catch(n){if("ENOENT"===n.code)return;if("EPERM"===n.code)return pr?Fr(e,t,n):Ar(e,t,n);if("EISDIR"!==n.code)throw n;Ar(e,t,n)}}function Ar(e,t,n){dr(e),dr(t),n&&dr(n instanceof Error);try{t.rmdirSync(e)}catch(r){if("ENOTDIR"===r.code)throw n;if("ENOTEMPTY"===r.code||"EEXIST"===r.code||"EPERM"===r.code)!function(e,t){if(dr(e),dr(t),t.readdirSync(e).forEach((n=>gr(Dr.join(e,n),t))),!pr){return t.rmdirSync(e,t)}{const n=Date.now();do{try{return t.rmdirSync(e,t)}catch(e){}}while(Date.now()-n<500)}}(e,t);else if("ENOENT"!==r.code)throw r}}var vr=hr;hr.sync=gr;const Sr=vr;var wr={remove:(0,bt.fromCallback)(Sr),removeSync:Sr.sync};const Or=bt.fromCallback,_r=Yt,br=e,Br=Cn,Ir=wr,xr=Or((function(e,t){t=t||function(){},_r.readdir(e,((n,r)=>{if(n)return Br.mkdirs(e,t);r=r.map((t=>br.join(e,t))),function e(){const n=r.pop();if(!n)return t();Ir.remove(n,(n=>{if(n)return t(n);e()}))}()}))}));function Pr(e){let t;try{t=_r.readdirSync(e)}catch(t){return Br.mkdirsSync(e)}t.forEach((t=>{t=br.join(e,t),Ir.removeSync(t)}))}var Nr={emptyDirSync:Pr,emptydirSync:Pr,emptyDir:xr,emptydir:xr};const Tr=bt.fromCallback,kr=e,Rr=Yt,Mr=Cn,Lr=Kn.pathExists;var jr={createFile:Tr((function(e,t){function n(){Rr.writeFile(e,"",(e=>{if(e)return t(e);t()}))}Rr.stat(e,((r,u)=>{if(!r&&u.isFile())return t();const o=kr.dirname(e);Lr(o,((e,r)=>e?t(e):r?n():void Mr.mkdirs(o,(e=>{if(e)return t(e);n()}))))}))})),createFileSync:function(e){let t;try{t=Rr.statSync(e)}catch(e){}if(t&&t.isFile())return;const n=kr.dirname(e);Rr.existsSync(n)||Mr.mkdirsSync(n),Rr.writeFileSync(e,"")}};const $r=bt.fromCallback,Hr=e,Gr=Yt,Ur=Cn,Vr=Kn.pathExists;var Jr={createLink:$r((function(e,t,n){function r(e,t){Gr.link(e,t,(e=>{if(e)return n(e);n(null)}))}Vr(t,((u,o)=>u?n(u):o?n(null):void Gr.lstat(e,(u=>{if(u)return u.message=u.message.replace("lstat","ensureLink"),n(u);const o=Hr.dirname(t);Vr(o,((u,i)=>u?n(u):i?r(e,t):void Ur.mkdirs(o,(u=>{if(u)return n(u);r(e,t)}))))}))))})),createLinkSync:function(e,t){if(Gr.existsSync(t))return;try{Gr.lstatSync(e)}catch(e){throw e.message=e.message.replace("lstat","ensureLink"),e}const n=Hr.dirname(t);return Gr.existsSync(n)||Ur.mkdirsSync(n),Gr.linkSync(e,t)}};const Wr=e,zr=Yt,Kr=Kn.pathExists;var qr={symlinkPaths:function(e,t,n){if(Wr.isAbsolute(e))return zr.lstat(e,(t=>t?(t.message=t.message.replace("lstat","ensureSymlink"),n(t)):n(null,{toCwd:e,toDst:e})));{const r=Wr.dirname(t),u=Wr.join(r,e);return Kr(u,((t,o)=>t?n(t):o?n(null,{toCwd:u,toDst:e}):zr.lstat(e,(t=>t?(t.message=t.message.replace("lstat","ensureSymlink"),n(t)):n(null,{toCwd:e,toDst:Wr.relative(r,e)})))))}},symlinkPathsSync:function(e,t){let n;if(Wr.isAbsolute(e)){if(n=zr.existsSync(e),!n)throw new Error("absolute srcpath does not exist");return{toCwd:e,toDst:e}}{const r=Wr.dirname(t),u=Wr.join(r,e);if(n=zr.existsSync(u),n)return{toCwd:u,toDst:e};if(n=zr.existsSync(e),!n)throw new Error("relative srcpath does not exist");return{toCwd:e,toDst:Wr.relative(r,e)}}}};const Yr=Yt;var Zr={symlinkType:function(e,t,n){if(n="function"==typeof t?t:n,t="function"!=typeof t&&t)return n(null,t);Yr.lstat(e,((e,r)=>{if(e)return n(null,"file");t=r&&r.isDirectory()?"dir":"file",n(null,t)}))},symlinkTypeSync:function(e,t){let n;if(t)return t;try{n=Yr.lstatSync(e)}catch(e){return"file"}return n&&n.isDirectory()?"dir":"file"}};const Xr=bt.fromCallback,Qr=e,eu=Yt,tu=Cn.mkdirs,nu=Cn.mkdirsSync,ru=qr.symlinkPaths,uu=qr.symlinkPathsSync,ou=Zr.symlinkType,iu=Zr.symlinkTypeSync,su=Kn.pathExists;var cu={createSymlink:Xr((function(e,t,n,r){r="function"==typeof n?n:r,n="function"!=typeof n&&n,su(t,((u,o)=>u?r(u):o?r(null):void ru(e,t,((u,o)=>{if(u)return r(u);e=o.toDst,ou(o.toCwd,n,((n,u)=>{if(n)return r(n);const o=Qr.dirname(t);su(o,((n,i)=>n?r(n):i?eu.symlink(e,t,u,r):void tu(o,(n=>{if(n)return r(n);eu.symlink(e,t,u,r)}))))}))}))))})),createSymlinkSync:function(e,t,n){if(eu.existsSync(t))return;const r=uu(e,t);e=r.toDst,n=iu(r.toCwd,n);const u=Qr.dirname(t);return eu.existsSync(u)||nu(u),eu.symlinkSync(e,t,n)}};var au,lu={createFile:jr.createFile,createFileSync:jr.createFileSync,ensureFile:jr.createFile,ensureFileSync:jr.createFileSync,createLink:Jr.createLink,createLinkSync:Jr.createLinkSync,ensureLink:Jr.createLink,ensureLinkSync:Jr.createLinkSync,createSymlink:cu.createSymlink,createSymlinkSync:cu.createSymlinkSync,ensureSymlink:cu.createSymlink,ensureSymlinkSync:cu.createSymlinkSync};try{au=Yt}catch(e){au=n}function fu(e,t){var n,r="\n";return"object"==typeof t&&null!==t&&(t.spaces&&(n=t.spaces),t.EOL&&(r=t.EOL)),JSON.stringify(e,t?t.replacer:null,n).replace(/\n/g,r)+r}function Du(e){return Buffer.isBuffer(e)&&(e=e.toString("utf8")),e=e.replace(/^\uFEFF/,"")}var du={readFile:function(e,t,n){null==n&&(n=t,t={}),"string"==typeof t&&(t={encoding:t});var r=(t=t||{}).fs||au,u=!0;"throws"in t&&(u=t.throws),r.readFile(e,t,(function(r,o){if(r)return n(r);var i;o=Du(o);try{i=JSON.parse(o,t?t.reviver:null)}catch(t){return u?(t.message=e+": "+t.message,n(t)):n(null,null)}n(null,i)}))},readFileSync:function(e,t){"string"==typeof(t=t||{})&&(t={encoding:t});var n=t.fs||au,r=!0;"throws"in t&&(r=t.throws);try{var u=n.readFileSync(e,t);return u=Du(u),JSON.parse(u,t.reviver)}catch(t){if(r)throw t.message=e+": "+t.message,t;return null}},writeFile:function(e,t,n,r){null==r&&(r=n,n={});var u=(n=n||{}).fs||au,o="";try{o=fu(t,n)}catch(e){return void(r&&r(e,null))}u.writeFile(e,o,n,r)},writeFileSync:function(e,t,n){var r=(n=n||{}).fs||au,u=fu(t,n);return r.writeFileSync(e,u,n)}},pu=du;const Eu=bt.fromCallback,hu=pu;var Cu={readJson:Eu(hu.readFile),readJsonSync:hu.readFileSync,writeJson:Eu(hu.writeFile),writeJsonSync:hu.writeFileSync};const mu=e,Fu=Cn,yu=Kn.pathExists,gu=Cu;var Au=function(e,t,n,r){"function"==typeof n&&(r=n,n={});const u=mu.dirname(e);yu(u,((o,i)=>o?r(o):i?gu.writeJson(e,t,n,r):void Fu.mkdirs(u,(u=>{if(u)return r(u);gu.writeJson(e,t,n,r)}))))};const vu=Yt,Su=e,wu=Cn,Ou=Cu;var _u=function(e,t,n){const r=Su.dirname(e);vu.existsSync(r)||wu.mkdirsSync(r),Ou.writeJsonSync(e,t,n)};const bu=bt.fromCallback,Bu=Cu;Bu.outputJson=bu(Au),Bu.outputJsonSync=_u,Bu.outputJSON=Bu.outputJson,Bu.outputJSONSync=Bu.outputJsonSync,Bu.writeJSON=Bu.writeJson,Bu.writeJSONSync=Bu.writeJsonSync,Bu.readJSON=Bu.readJson,Bu.readJSONSync=Bu.readJsonSync;var Iu=Bu;const xu=Yt,Pu=e,Nu=Jn.copySync,Tu=wr.removeSync,ku=Cn.mkdirpSync,Ru=kn;function Mu(e,t,n){try{xu.renameSync(e,t)}catch(r){if("EXDEV"!==r.code)throw r;return function(e,t,n){const r={overwrite:n,errorOnExist:!0};return Nu(e,t,r),Tu(e)}(e,t,n)}}var Lu=function(e,t,n){const r=(n=n||{}).overwrite||n.clobber||!1,{srcStat:u}=Ru.checkPathsSync(e,t,"move");return Ru.checkParentPathsSync(e,u,t,"move"),ku(Pu.dirname(t)),function(e,t,n){if(n)return Tu(t),Mu(e,t,n);if(xu.existsSync(t))throw new Error("dest already exists.");return Mu(e,t,n)}(e,t,r)},ju={moveSync:Lu};const $u=Yt,Hu=e,Gu=lr.copy,Uu=wr.remove,Vu=Cn.mkdirp,Ju=Kn.pathExists,Wu=kn;function zu(e,t,n,r){$u.rename(e,t,(u=>u?"EXDEV"!==u.code?r(u):function(e,t,n,r){const u={overwrite:n,errorOnExist:!0};Gu(e,t,u,(t=>t?r(t):Uu(e,r)))}(e,t,n,r):r()))}var Ku=function(e,t,n,r){"function"==typeof n&&(r=n,n={});const u=n.overwrite||n.clobber||!1;Wu.checkPaths(e,t,"move",((n,o)=>{if(n)return r(n);const{srcStat:i}=o;Wu.checkParentPaths(e,i,t,"move",(n=>{if(n)return r(n);Vu(Hu.dirname(t),(n=>n?r(n):function(e,t,n,r){if(n)return Uu(t,(u=>u?r(u):zu(e,t,n,r)));Ju(t,((u,o)=>u?r(u):o?r(new Error("dest already exists.")):zu(e,t,n,r)))}(e,t,u,r)))}))}))};var qu={move:(0,bt.fromCallback)(Ku)};const Yu=bt.fromCallback,Zu=Yt,Xu=e,Qu=Cn,eo=Kn.pathExists;var to={outputFile:Yu((function(e,t,n,r){"function"==typeof n&&(r=n,n="utf8");const u=Xu.dirname(e);eo(u,((o,i)=>o?r(o):i?Zu.writeFile(e,t,n,r):void Qu.mkdirs(u,(u=>{if(u)return r(u);Zu.writeFile(e,t,n,r)}))))})),outputFileSync:function(e,...t){const n=Xu.dirname(e);if(Zu.existsSync(n))return Zu.writeFileSync(e,...t);Qu.mkdirsSync(n),Zu.writeFileSync(e,...t)}};!function(e){e.exports=Object.assign({},_t,Jn,lr,Nr,lu,Iu,Cn,ju,qu,to,Kn,wr);const t=n;Object.getOwnPropertyDescriptor(t,"promises")&&Object.defineProperty(e.exports,"promises",{get:()=>t.promises})}(Ot);const no=$.exports("streamroller:fileNameFormatter"),ro=e;const uo=$.exports("streamroller:fileNameParser"),oo=le.exports;const io=$.exports("streamroller:moveAndMaybeCompressFile"),so=Ot.exports,co=f;var ao=async(e,t,n)=>{if(n=function(e){const t={mode:parseInt("0600",8),compress:!1},n=Object.assign({},t,e);return io(`_parseOption: moveAndMaybeCompressFile called with option=${JSON.stringify(n)}`),n}(n),e!==t){if(await so.pathExists(e))if(io(`moveAndMaybeCompressFile: moving file from ${e} to ${t} ${n.compress?"with":"without"} compress`),n.compress)await new Promise(((r,u)=>{let o=!1;const i=so.createWriteStream(t,{mode:n.mode,flags:"wx"}).on("open",(()=>{o=!0;const t=so.createReadStream(e).on("open",(()=>{t.pipe(co.createGzip()).pipe(i)})).on("error",(t=>{io(`moveAndMaybeCompressFile: error reading ${e}`,t),i.destroy(t)}))})).on("finish",(()=>{io(`moveAndMaybeCompressFile: finished compressing ${t}, deleting ${e}`),so.unlink(e).then(r).catch((t=>{io(`moveAndMaybeCompressFile: error deleting ${e}, truncating instead`,t),so.truncate(e).then(r).catch((t=>{io(`moveAndMaybeCompressFile: error truncating ${e}`,t),u(t)}))}))})).on("error",(e=>{o?(io(`moveAndMaybeCompressFile: error writing ${t}, deleting`,e),so.unlink(t).then((()=>{u(e)})).catch((e=>{io(`moveAndMaybeCompressFile: error deleting ${t}`,e),u(e)}))):(io(`moveAndMaybeCompressFile: error creating ${t}`,e),u(e))}))})).catch((()=>{}));else{io(`moveAndMaybeCompressFile: renaming ${e} to ${t}`);try{await so.move(e,t,{overwrite:!0})}catch(n){if(io(`moveAndMaybeCompressFile: error renaming ${e} to ${t}`,n),"ENOENT"!==n.code){io("moveAndMaybeCompressFile: trying copy+truncate instead");try{await so.copy(e,t,{overwrite:!0}),await so.truncate(e)}catch(e){io("moveAndMaybeCompressFile: error copy+truncate",e)}}}}}else io("moveAndMaybeCompressFile: source and target are the same, not doing anything")};const lo=$.exports("streamroller:RollingFileWriteStream"),fo=Ot.exports,Do=e,po=t,Eo=()=>new Date,ho=le.exports,{Writable:Co}=a,mo=({file:e,keepFileExt:t,needsIndex:n,alwaysIncludeDate:r,compress:u,fileNameSep:o})=>{let i=o||".";const s=ro.join(e.dir,e.name),c=t=>t+e.ext,a=(e,t,r)=>!n&&r||!t?e:e+i+t,l=(e,t,n)=>(t>0||r)&&n?e+i+n:e,f=(e,t)=>t&&u?e+".gz":e,D=t?[l,a,c,f]:[c,l,a,f];return({date:e,index:t})=>(no(`_formatFileName: date=${e}, index=${t}`),D.reduce(((n,r)=>r(n,t,e)),s))},Fo=({file:e,keepFileExt:t,pattern:n,fileNameSep:r})=>{let u=r||".";const o="__NOT_MATCHING__";let i=[(e,t)=>e.endsWith(".gz")?(uo("it is gzipped"),t.isCompressed=!0,e.slice(0,-3)):e,t?t=>t.startsWith(e.name)&&t.endsWith(e.ext)?(uo("it starts and ends with the right things"),t.slice(e.name.length+1,-1*e.ext.length)):o:t=>t.startsWith(e.base)?(uo("it starts with the right things"),t.slice(e.base.length+1)):o,n?(e,t)=>{const r=e.split(u);let o=r[r.length-1];uo("items: ",r,", indexStr: ",o);let i=e;void 0!==o&&o.match(/^\d+$/)?(i=e.slice(0,-1*(o.length+1)),uo(`dateStr is ${i}`),n&&!i&&(i=o,o="0")):o="0";try{const r=oo.parse(n,i,new Date(0,0));return oo.asString(n,r)!==i?e:(t.index=parseInt(o,10),t.date=i,t.timestamp=r.getTime(),"")}catch(t){return uo(`Problem parsing ${i} as ${n}, error was: `,t),e}}:(e,t)=>e.match(/^\d+$/)?(uo("it has an index"),t.index=parseInt(e,10),""):e];return e=>{let t={filename:e,index:0,isCompressed:!1};return i.reduce(((e,n)=>n(e,t)),e)?null:t}},yo=ao;var go=class extends Co{constructor(e,t){if(lo(`constructor: creating RollingFileWriteStream. path=${e}`),"string"!=typeof e||0===e.length)throw new Error(`Invalid filename: ${e}`);if(e.endsWith(Do.sep))throw new Error(`Filename is a directory: ${e}`);0===e.indexOf(`~${Do.sep}`)&&(e=e.replace("~",po.homedir())),super(t),this.options=this._parseOption(t),this.fileObject=Do.parse(e),""===this.fileObject.dir&&(this.fileObject=Do.parse(Do.join(process.cwd(),e))),this.fileFormatter=mo({file:this.fileObject,alwaysIncludeDate:this.options.alwaysIncludePattern,needsIndex:this.options.maxSize 0`)}else delete n.maxSize;if(n.numBackups||0===n.numBackups){if(n.numBackups<0)throw new Error(`options.numBackups (${n.numBackups}) should be >= 0`);if(n.numBackups>=Number.MAX_SAFE_INTEGER)throw new Error(`options.numBackups (${n.numBackups}) should be < Number.MAX_SAFE_INTEGER`);n.numToKeep=n.numBackups+1}else if(n.numToKeep<=0)throw new Error(`options.numToKeep (${n.numToKeep}) should be > 0`);return lo(`_parseOption: creating stream with option=${JSON.stringify(n)}`),n}_final(e){this.currentFileStream.end("",this.options.encoding,e)}_write(e,t,n){this._shouldRoll().then((()=>{lo(`_write: writing chunk. file=${this.currentFileStream.path} state=${JSON.stringify(this.state)} chunk=${e}`),this.currentFileStream.write(e,t,(t=>{this.state.currentSize+=e.length,n(t)}))}))}async _shouldRoll(){(this._dateChanged()||this._tooBig())&&(lo(`_shouldRoll: rolling because dateChanged? ${this._dateChanged()} or tooBig? ${this._tooBig()}`),await this._roll())}_dateChanged(){return this.state.currentDate&&this.state.currentDate!==ho(this.options.pattern,Eo())}_tooBig(){return this.state.currentSize>=this.options.maxSize}_roll(){return lo("_roll: closing the current stream"),new Promise(((e,t)=>{this.currentFileStream.end("",this.options.encoding,(()=>{this._moveOldFiles().then(e).catch(t)}))}))}async _moveOldFiles(){const e=await this._getExistingFiles();for(let t=(this.state.currentDate?e.filter((e=>e.date===this.state.currentDate)):e).length;t>=0;t--){lo(`_moveOldFiles: i = ${t}`);const e=this.fileFormatter({date:this.state.currentDate,index:t}),n=this.fileFormatter({date:this.state.currentDate,index:t+1}),r={compress:this.options.compress&&0===t,mode:this.options.mode};await yo(e,n,r)}this.state.currentSize=0,this.state.currentDate=this.state.currentDate?ho(this.options.pattern,Eo()):null,lo(`_moveOldFiles: finished rolling files. state=${JSON.stringify(this.state)}`),this._renewWriteStream(),await new Promise(((e,t)=>{this.currentFileStream.write("","utf8",(()=>{this._clean().then(e).catch(t)}))}))}async _getExistingFiles(){const e=await fo.readdir(this.fileObject.dir).catch((()=>[]));lo(`_getExistingFiles: files=${e}`);const t=e.map((e=>this.fileNameParser(e))).filter((e=>e)),n=e=>(e.timestamp?e.timestamp:Eo().getTime())-e.index;return t.sort(((e,t)=>n(e)-n(t))),t}_renewWriteStream(){const e=this.fileFormatter({date:this.state.currentDate,index:0}),t=e=>{try{return fo.mkdirSync(e,{recursive:!0})}catch(n){if("ENOENT"===n.code)return t(Do.dirname(e)),t(e);if("EEXIST"!==n.code&&"EROFS"!==n.code)throw n;try{if(fo.statSync(e).isDirectory())return e;throw n}catch(e){throw n}}};t(this.fileObject.dir);const n={flags:this.options.flags,encoding:this.options.encoding,mode:this.options.mode};var r,u;fo.appendFileSync(e,"",(r={...n},u="flags",r["flag"]=r[u],delete r[u],r)),this.currentFileStream=fo.createWriteStream(e,n),this.currentFileStream.on("error",(e=>{this.emit("error",e)}))}async _clean(){const e=await this._getExistingFiles();if(lo(`_clean: numToKeep = ${this.options.numToKeep}, existingFiles = ${e.length}`),lo("_clean: existing files are: ",e),this._tooManyFiles(e.length)){const n=e.slice(0,e.length-this.options.numToKeep).map((e=>Do.format({dir:this.fileObject.dir,base:e.filename})));await(t=n,lo(`deleteFiles: files to delete: ${t}`),Promise.all(t.map((e=>fo.unlink(e).catch((t=>{lo(`deleteFiles: error when unlinking ${e}, ignoring. Error was ${t}`)}))))))}var t}_tooManyFiles(e){return this.options.numToKeep>0&&e>this.options.numToKeep}};const Ao=go;var vo=class extends Ao{constructor(e,t,n,r){r||(r={}),t&&(r.maxSize=t),r.numBackups||0===r.numBackups||(n||0===n||(n=1),r.numBackups=n),super(e,r),this.backups=r.numBackups,this.size=this.options.maxSize}get theStream(){return this.currentFileStream}};const So=go;var wo={RollingFileWriteStream:go,RollingFileStream:vo,DateRollingFileStream:class extends So{constructor(e,t,n){t&&"object"==typeof t&&(n=t,t=null),n||(n={}),t||(t="yyyy-MM-dd"),n.pattern=t,n.numBackups||0===n.numBackups?n.daysToKeep=n.numBackups:(n.daysToKeep||0===n.daysToKeep?process.emitWarning("options.daysToKeep is deprecated due to the confusion it causes when used together with file size rolling. Please use options.numBackups instead.","DeprecationWarning","streamroller-DEP0001"):n.daysToKeep=1,n.numBackups=n.daysToKeep),super(e,n),this.mode=this.options.mode}get theStream(){return this.currentFileStream}}};const Oo=$.exports("log4js:file"),_o=e,bo=wo,Bo=t,Io=Bo.EOL;let xo=!1;const Po=new Set;function No(){Po.forEach((e=>{e.sighupHandler()}))}wt.configure=function(e,t){let n=t.basicLayout;return e.layout&&(n=t.layout(e.layout.type,e.layout)),e.mode=e.mode||384,function(e,t,n,r,u,o){if("string"!=typeof e||0===e.length)throw new Error(`Invalid filename: ${e}`);if(e.endsWith(_o.sep))throw new Error(`Filename is a directory: ${e}`);function i(e,t,n,r){const u=new bo.RollingFileStream(e,t,n,r);return u.on("error",(t=>{console.error("log4js.fileAppender - Writing to file %s, error happened ",e,t)})),u.on("drain",(()=>{process.emit("log4js:pause",!1)})),u}e=e.replace(new RegExp(`^~(?=${_o.sep}.+)`),Bo.homedir()),e=_o.normalize(e),Oo("Creating file appender (",e,", ",n,", ",r=r||0===r?r:5,", ",u,", ",o,")");let s=i(e,n,r,u);const c=function(e){if(s.writable){if(!0===u.removeColor){const t=/\x1b[[0-9;]*m/g;e.data=e.data.map((e=>"string"==typeof e?e.replace(t,""):e))}s.write(t(e,o)+Io,"utf8")||process.emit("log4js:pause",!0)}};return c.reopen=function(){s.end((()=>{s=i(e,n,r,u)}))},c.sighupHandler=function(){Oo("SIGHUP handler called."),c.reopen()},c.shutdown=function(e){Po.delete(c),0===Po.size&&xo&&(process.removeListener("SIGHUP",No),xo=!1),s.end("","utf-8",e)},Po.add(c),xo||(process.on("SIGHUP",No),xo=!0),c}(e.filename,n,e.maxLogSize,e.backups,e,e.timezoneOffset)};var To={};const ko=wo,Ro=t.EOL;function Mo(e,t,n,r,u){r.maxSize=r.maxLogSize;const o=function(e,t,n){const r=new ko.DateRollingFileStream(e,t,n);return r.on("error",(t=>{console.error("log4js.dateFileAppender - Writing to file %s, error happened ",e,t)})),r.on("drain",(()=>{process.emit("log4js:pause",!1)})),r}(e,t,r),i=function(e){o.writable&&(o.write(n(e,u)+Ro,"utf8")||process.emit("log4js:pause",!0))};return i.shutdown=function(e){o.end("","utf-8",e)},i}To.configure=function(e,t){let n=t.basicLayout;return e.layout&&(n=t.layout(e.layout.type,e.layout)),e.alwaysIncludePattern||(e.alwaysIncludePattern=!1),e.mode=e.mode||384,Mo(e.filename,e.pattern,n,e,e.timezoneOffset)};var Lo={};const jo=$.exports("log4js:fileSync"),$o=e,Ho=n,Go=t,Uo=Go.EOL;function Vo(e,t){const n=e=>{try{return Ho.mkdirSync(e,{recursive:!0})}catch(t){if("ENOENT"===t.code)return n($o.dirname(e)),n(e);if("EEXIST"!==t.code&&"EROFS"!==t.code)throw t;try{if(Ho.statSync(e).isDirectory())return e;throw t}catch(e){throw t}}};n($o.dirname(e)),Ho.appendFileSync(e,"",{mode:t.mode,flag:t.flags})}class Jo{constructor(e,t,n,r){if(jo("In RollingFileStream"),t<0)throw new Error(`maxLogSize (${t}) should be > 0`);this.filename=e,this.size=t,this.backups=n,this.options=r,this.currentSize=0,this.currentSize=function(e){let t=0;try{t=Ho.statSync(e).size}catch(t){Vo(e,r)}return t}(this.filename)}shouldRoll(){return jo("should roll with current size %d, and max size %d",this.currentSize,this.size),this.currentSize>=this.size}roll(e){const t=this,n=new RegExp(`^${$o.basename(e)}`);function r(e){return n.test(e)}function u(t){return parseInt(t.slice(`${$o.basename(e)}.`.length),10)||0}function o(e,t){return u(e)-u(t)}function i(n){const r=u(n);if(jo(`Index of ${n} is ${r}`),0===t.backups)Ho.truncateSync(e,0);else if(r ${e}.${r+1}`),Ho.renameSync($o.join($o.dirname(e),n),`${e}.${r+1}`)}}jo("Rolling, rolling, rolling"),jo("Renaming the old files"),Ho.readdirSync($o.dirname(e)).filter(r).sort(o).reverse().forEach(i)}write(e,t){const n=this;jo("in write"),this.shouldRoll()&&(this.currentSize=0,this.roll(this.filename)),jo("writing the chunk to the file"),n.currentSize+=e.length,Ho.appendFileSync(n.filename,e)}}Lo.configure=function(e,t){let n=t.basicLayout;e.layout&&(n=t.layout(e.layout.type,e.layout));const r={flags:e.flags||"a",encoding:e.encoding||"utf8",mode:e.mode||384};return function(e,t,n,r,u,o){if("string"!=typeof e||0===e.length)throw new Error(`Invalid filename: ${e}`);if(e.endsWith($o.sep))throw new Error(`Filename is a directory: ${e}`);e=e.replace(new RegExp(`^~(?=${$o.sep}.+)`),Go.homedir()),e=$o.normalize(e),jo("Creating fileSync appender (",e,", ",n,", ",r=r||0===r?r:5,", ",u,", ",o,")");const i=function(e,t,n){let r;var o;return t?r=new Jo(e,t,n,u):(Vo(o=e,u),r={write(e){Ho.appendFileSync(o,e)}}),r}(e,n,r);return e=>{i.write(t(e,o)+Uo)}}(e.filename,n,e.maxLogSize,e.backups,r,e.timezoneOffset)};var Wo={};const zo=$.exports("log4js:tcp"),Ko=D;Wo.configure=function(e,t){zo(`configure with config = ${e}`);let n=function(e){return e.serialise()};return e.layout&&(n=t.layout(e.layout.type,e.layout)),function(e,t){let n=!1;const r=[];let u,o=3,i="__LOG4JS__";function s(e){zo("Writing log event to socket"),n=u.write(`${t(e)}${i}`,"utf8")}function c(){let e;for(zo("emptying buffer");e=r.shift();)s(e)}function a(e){n?s(e):(zo("buffering log event because it cannot write at the moment"),r.push(e))}return function t(){zo(`appender creating socket to ${e.host||"localhost"}:${e.port||5e3}`),i=`${e.endMsg||"__LOG4JS__"}`,u=Ko.createConnection(e.port||5e3,e.host||"localhost"),u.on("connect",(()=>{zo("socket connected"),c(),n=!0})),u.on("drain",(()=>{zo("drain event received, emptying buffer"),n=!0,c()})),u.on("timeout",u.end.bind(u)),u.on("error",(e=>{zo("connection error",e),n=!1,c()})),u.on("close",t)}(),a.shutdown=function(e){zo("shutdown called"),r.length&&o?(zo("buffer has items, waiting 100ms to empty"),o-=1,setTimeout((()=>{a.shutdown(e)}),100)):(u.removeAllListeners("close"),u.end(e))},a}(e,n)};const qo=e,Yo=$.exports("log4js:appenders"),Zo=ae,Xo=ft,Qo=xe,ei=_e,ti=Dt,ni=new Map;ni.set("console",ht),ni.set("stdout",mt),ni.set("stderr",Ft),ni.set("logLevelFilter",yt),ni.set("categoryFilter",gt),ni.set("noLogFilter",vt),ni.set("file",wt),ni.set("dateFile",To),ni.set("fileSync",Lo),ni.set("tcp",Wo);const ri=new Map,ui=(e,t)=>{let n;try{const t=`${e}.cjs`;n=require.resolve(t),Yo("Loading module from ",t)}catch(t){n=e,Yo("Loading module from ",e)}try{return require(n)}catch(n){return void Zo.throwExceptionIf(t,"MODULE_NOT_FOUND"!==n.code,`appender "${e}" could not be loaded (error was: ${n})`)}},oi=new Set,ii=(e,t)=>{if(ri.has(e))return ri.get(e);if(!t.appenders[e])return!1;if(oi.has(e))throw new Error(`Dependency loop detected for appender ${e}.`);oi.add(e),Yo(`Creating appender ${e}`);const n=si(e,t);return oi.delete(e),ri.set(e,n),n},si=(e,t)=>{const n=t.appenders[e],r=n.type.configure?n.type:((e,t)=>ni.get(e)||ui(`./${e}`,t)||ui(e,t)||require.main&&require.main.filename&&ui(qo.join(qo.dirname(require.main.filename),e),t)||ui(qo.join(process.cwd(),e),t))(n.type,t);return Zo.throwExceptionIf(t,Zo.not(r),`appender "${e}" is not valid (type "${n.type}" could not be found)`),r.appender&&(process.emitWarning(`Appender ${n.type} exports an appender function.`,"DeprecationWarning","log4js-node-DEP0001"),Yo("[log4js-node-DEP0001]",`DEPRECATION: Appender ${n.type} exports an appender function.`)),r.shutdown&&(process.emitWarning(`Appender ${n.type} exports a shutdown function.`,"DeprecationWarning","log4js-node-DEP0002"),Yo("[log4js-node-DEP0002]",`DEPRECATION: Appender ${n.type} exports a shutdown function.`)),Yo(`${e}: clustering.isMaster ? ${Xo.isMaster()}`),Yo(`${e}: appenderModule is ${i.inspect(r)}`),Xo.onlyOnMaster((()=>(Yo(`calling appenderModule.configure for ${e} / ${n.type}`),r.configure(ti.modifyConfig(n),ei,(e=>ii(e,t)),Qo))),(()=>{}))},ci=e=>{if(ri.clear(),oi.clear(),!e)return;const t=[];Object.values(e.categories).forEach((e=>{t.push(...e.appenders)})),Object.keys(e.appenders).forEach((n=>{(t.includes(n)||"tcp-server"===e.appenders[n].type||"multiprocess"===e.appenders[n].type)&&ii(n,e)}))},ai=()=>{ci()};ai(),Zo.addListener((e=>{Zo.throwExceptionIf(e,Zo.not(Zo.anObject(e.appenders)),'must have a property "appenders" of type object.');const t=Object.keys(e.appenders);Zo.throwExceptionIf(e,Zo.not(t.length),"must define at least one appender."),t.forEach((t=>{Zo.throwExceptionIf(e,Zo.not(e.appenders[t].type),`appender "${t}" is not valid (must be an object with property "type")`)}))})),Zo.addListener(ci),Pe.exports=ri,Pe.exports.init=ai;var li={exports:{}};!function(e){const t=$.exports("log4js:categories"),n=ae,r=xe,u=Pe.exports,o=new Map;function i(e,t,n){if(!1===t.inherit)return;const r=n.lastIndexOf(".");if(r<0)return;const u=n.slice(0,r);let o=e.categories[u];o||(o={inherit:!0,appenders:[]}),i(e,o,u),!e.categories[u]&&o.appenders&&o.appenders.length&&o.level&&(e.categories[u]=o),t.appenders=t.appenders||[],t.level=t.level||o.level,o.appenders.forEach((e=>{t.appenders.includes(e)||t.appenders.push(e)})),t.parent=o}function s(e){if(!e.categories)return;Object.keys(e.categories).forEach((t=>{const n=e.categories[t];i(e,n,t)}))}n.addPreProcessingListener((e=>s(e))),n.addListener((e=>{n.throwExceptionIf(e,n.not(n.anObject(e.categories)),'must have a property "categories" of type object.');const t=Object.keys(e.categories);n.throwExceptionIf(e,n.not(t.length),"must define at least one category."),t.forEach((t=>{const o=e.categories[t];n.throwExceptionIf(e,[n.not(o.appenders),n.not(o.level)],`category "${t}" is not valid (must be an object with properties "appenders" and "level")`),n.throwExceptionIf(e,n.not(Array.isArray(o.appenders)),`category "${t}" is not valid (appenders must be an array of appender names)`),n.throwExceptionIf(e,n.not(o.appenders.length),`category "${t}" is not valid (appenders must contain at least one appender name)`),Object.prototype.hasOwnProperty.call(o,"enableCallStack")&&n.throwExceptionIf(e,"boolean"!=typeof o.enableCallStack,`category "${t}" is not valid (enableCallStack must be boolean type)`),o.appenders.forEach((r=>{n.throwExceptionIf(e,n.not(u.get(r)),`category "${t}" is not valid (appender "${r}" is not defined)`)})),n.throwExceptionIf(e,n.not(r.getLevel(o.level)),`category "${t}" is not valid (level "${o.level}" not recognised; valid levels are ${r.levels.join(", ")})`)})),n.throwExceptionIf(e,n.not(e.categories.default),'must define a "default" category.')}));const c=e=>{if(o.clear(),!e)return;Object.keys(e.categories).forEach((n=>{const i=e.categories[n],s=[];i.appenders.forEach((e=>{s.push(u.get(e)),t(`Creating category ${n}`),o.set(n,{appenders:s,level:r.getLevel(i.level),enableCallStack:i.enableCallStack||!1})}))}))},a=()=>{c()};a(),n.addListener(c);const l=e=>{if(t(`configForCategory: searching for config for ${e}`),o.has(e))return t(`configForCategory: ${e} exists in config, returning it`),o.get(e);let n;return e.indexOf(".")>0?(t(`configForCategory: ${e} has hierarchy, cloning from parents`),n={...l(e.slice(0,e.lastIndexOf(".")))}):(o.has("default")||c({categories:{default:{appenders:["out"],level:"OFF"}}}),t("configForCategory: cloning default category"),n={...o.get("default")}),o.set(e,n),n};e.exports=o,e.exports=Object.assign(e.exports,{appendersForCategory:e=>l(e).appenders,getLevelForCategory:e=>l(e).level,setLevelForCategory:(e,t)=>{l(e).level=t},getEnableCallStackForCategory:e=>!0===l(e).enableCallStack,setEnableCallStackForCategory:(e,t)=>{l(e).enableCallStack=t},init:a})}(li);const fi=$.exports("log4js:logger"),Di=Xe,di=xe,pi=ft,Ei=li.exports,hi=ae,Ci=/at (?:(.+)\s+\()?(?:(.+?):(\d+)(?::(\d+))?|([^)]+))\)?/;function mi(e,t=4){try{const n=e.stack.split("\n").slice(t);if(!n.length)return null;const r=Ci.exec(n[0]);if(r&&6===r.length){let e="",t="",u="";return r[1]&&""!==r[1]&&([t,u]=r[1].replace(/[[\]]/g,"").split(" as "),u=u||"",t.includes(".")&&([e,t]=t.split("."))),{fileName:r[2],lineNumber:parseInt(r[3],10),columnNumber:parseInt(r[4],10),callStack:n.join("\n"),className:e,functionName:t,functionAlias:u,callerName:r[1]||""}}console.error("log4js.logger - defaultParseCallStack error")}catch(e){console.error("log4js.logger - defaultParseCallStack error",e)}return null}let Fi=class{constructor(e){if(!e)throw new Error("No category provided.");this.category=e,this.context={},this.callStackSkipIndex=0,this.parseCallStack=mi,fi(`Logger created (${this.category}, ${this.level})`)}get level(){return di.getLevel(Ei.getLevelForCategory(this.category),di.OFF)}set level(e){Ei.setLevelForCategory(this.category,di.getLevel(e,this.level))}get useCallStack(){return Ei.getEnableCallStackForCategory(this.category)}set useCallStack(e){Ei.setEnableCallStackForCategory(this.category,!0===e)}get callStackLinesToSkip(){return this.callStackSkipIndex}set callStackLinesToSkip(e){if("number"!=typeof e)throw new TypeError("Must be a number");if(e<0)throw new RangeError("Must be >= 0");this.callStackSkipIndex=e}log(e,...t){const n=di.getLevel(e);n?this.isLevelEnabled(n)&&this._log(n,t):hi.validIdentifier(e)&&t.length>0?(this.log(di.WARN,"log4js:logger.log: valid log-level not found as first parameter given:",e),this.log(di.INFO,`[${e}]`,...t)):this.log(di.INFO,e,...t)}isLevelEnabled(e){return this.level.isLessThanOrEqualTo(e)}_log(e,t){fi(`sending log data (${e}) to appenders`);const n=t.find((e=>e instanceof Error));let r;if(this.useCallStack){try{n&&(r=this.parseCallStack(n,this.callStackSkipIndex+1))}catch(e){}r=r||this.parseCallStack(new Error,this.callStackSkipIndex+3+1)}const u=new Di(this.category,e,t,this.context,r,n);pi.send(u)}addContext(e,t){this.context[e]=t}removeContext(e){delete this.context[e]}clearContext(){this.context={}}setParseCallStackFunction(e){if("function"==typeof e)this.parseCallStack=e;else{if(void 0!==e)throw new TypeError("Invalid type passed to setParseCallStackFunction");this.parseCallStack=mi}}};function yi(e){const t=di.getLevel(e),n=t.toString().toLowerCase().replace(/_([a-z])/g,(e=>e[1].toUpperCase())),r=n[0].toUpperCase()+n.slice(1);Fi.prototype[`is${r}Enabled`]=function(){return this.isLevelEnabled(t)},Fi.prototype[n]=function(...e){this.log(t,...e)}}di.levels.forEach(yi),hi.addListener((()=>{di.levels.forEach(yi)}));var gi=Fi;const Ai=xe;function vi(e){return e.originalUrl||e.url}function Si(e,t){for(let n=0;n{if(void 0!==e._logging)return i();if("function"!=typeof t.nolog){const n=function(e){let t=null;if(e instanceof RegExp&&(t=e),"string"==typeof e&&(t=new RegExp(e)),Array.isArray(e)){const n=e.map((e=>e.source?e.source:e));t=new RegExp(n.join("|"))}return t}(t.nolog);if(n&&n.test(e.originalUrl))return i()}if(n.isLevelEnabled(r)||"auto"===t.level){const i=new Date,{writeHead:s}=o;e._logging=!0,o.writeHead=(e,t)=>{o.writeHead=s,o.writeHead(e,t),o.__statusCode=e,o.__headers=t||{}};let c=!1;const a=()=>{if(c)return;if(c=!0,"function"==typeof t.nolog&&!0===t.nolog(e,o))return void(e._logging=!1);o.responseTime=new Date-i,o.statusCode&&"auto"===t.level&&(r=Ai.INFO,o.statusCode>=300&&(r=Ai.WARN),o.statusCode>=400&&(r=Ai.ERROR)),r=function(e,t,n){let r=t;if(n){const t=n.find((t=>{let n=!1;return n=t.from&&t.to?e>=t.from&&e<=t.to:-1!==t.codes.indexOf(e),n}));t&&(r=Ai.getLevel(t.level,r))}return r}(o.statusCode,r,t.statusRules);const s=function(e,t,n){const r=[];return r.push({token:":url",replacement:vi(e)}),r.push({token:":protocol",replacement:e.protocol}),r.push({token:":hostname",replacement:e.hostname}),r.push({token:":method",replacement:e.method}),r.push({token:":status",replacement:t.__statusCode||t.statusCode}),r.push({token:":response-time",replacement:t.responseTime}),r.push({token:":date",replacement:(new Date).toUTCString()}),r.push({token:":referrer",replacement:e.headers.referer||e.headers.referrer||""}),r.push({token:":http-version",replacement:`${e.httpVersionMajor}.${e.httpVersionMinor}`}),r.push({token:":remote-addr",replacement:e.headers["x-forwarded-for"]||e.ip||e._remoteAddress||e.socket&&(e.socket.remoteAddress||e.socket.socket&&e.socket.socket.remoteAddress)}),r.push({token:":user-agent",replacement:e.headers["user-agent"]}),r.push({token:":content-length",replacement:t.getHeader("content-length")||t.__headers&&t.__headers["Content-Length"]||"-"}),r.push({token:/:req\[([^\]]+)]/g,replacement:(t,n)=>e.headers[n.toLowerCase()]}),r.push({token:/:res\[([^\]]+)]/g,replacement:(e,n)=>t.getHeader(n.toLowerCase())||t.__headers&&t.__headers[n]}),(e=>{const t=e.concat();for(let e=0;eSi(e,s)));t&&n.log(r,t)}else n.log(r,Si(u,s));t.context&&n.removeContext("res")};o.on("end",a),o.on("finish",a),o.on("error",a),o.on("close",a)}return i()}},Hi=Bi;let Gi=!1;function Ui(e){if(!Gi)return;Ii("Received log event ",e);Mi.appendersForCategory(e.categoryName).forEach((t=>{t(e)}))}function Vi(e){Gi&&Ji();let t=e;return"string"==typeof t&&(t=function(e){Ii(`Loading configuration from ${e}`);try{return JSON.parse(xi.readFileSync(e,"utf8"))}catch(t){throw new Error(`Problem reading config from file "${e}". Error was ${t.message}`,t)}}(e)),Ii(`Configuration is ${t}`),Ni.configure(Pi(t)),ji.onMessage(Ui),Gi=!0,Wi}function Ji(e=(()=>{})){if("function"!=typeof e)throw new TypeError("Invalid callback passed to shutdown");Ii("Shutdown called. Disabling all log writing."),Gi=!1;const t=Array.from(Ri.values());Ri.init(),Mi.init();const n=t.reduce(((e,t)=>t.shutdown?e+1:e),0);0===n&&(Ii("No appenders with shutdown functions found."),e());let r,u=0;function o(t){r=r||t,u+=1,Ii(`Appender shutdowns complete: ${u} / ${n}`),u>=n&&(Ii("All shutdown functions completed."),e(r))}Ii(`Found ${n} appenders with shutdown functions.`),t.filter((e=>e.shutdown)).forEach((e=>e.shutdown(o)))}const Wi={getLogger:function(e){return Gi||Vi(process.env.LOG4JS_CONFIG||{appenders:{out:{type:"stdout"}},categories:{default:{appenders:["out"],level:"OFF"}}}),new Li(e||"default")},configure:Vi,shutdown:Ji,connectLogger:$i,levels:ki,addLayout:Ti.addLayout,recording:function(){return Hi}};var zi=Wi;!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.addCustomPLlugin=e.addCustomTask=e.hvigorTrace=void 0;const t=zi;e.hvigorTrace={totalTime:0,moduleNum:0,taskTime:{},isIncremental:!0,hasIncremental:!1,isParallel:!0,IS_DAEMON:!0,LOG_LEVEL:t.levels.INFO.levelStr,IS_HVIGORFILE_TYPE_CHECK:!1},e.addCustomTask=function(t){var n;let r=null!==(n=e.hvigorTrace.CUSTOM_TASKS)&&void 0!==n?n:[];r.length>0&&(r=r.filter((e=>e.NAME!==t.NAME))),r.push(t),e.hvigorTrace.CUSTOM_TASKS=r},e.addCustomPLlugin=function(t){var n;let r=null!==(n=e.hvigorTrace.CUSTOM_PLUGINS)&&void 0!==n?n:[];r.length>0&&(r=r.filter((e=>e.PLUGIN_ID!==t.PLUGIN_ID))),r.push({PLUGIN_ID:t.PLUGIN_ID}),e.hvigorTrace.CUSTOM_PLUGINS=r}}(j);var Ki,qi={};Ki=qi,Object.defineProperty(Ki,"__esModule",{value:!0}),Ki.isCI=void 0,Ki.isCI=function(){return!("false"===process.env.CI||!(process.env.BUILD_ID||process.env.BUILD_NUMBER||process.env.CI||process.env.CI_APP_ID||process.env.CI_BUILD_ID||process.env.CI_BUILD_NUMBER||process.env.CI_NAME||process.env.CONTINUOUS_INTEGRATION||process.env.RUN_ID||Ki.name))};var Yi={};!function(e){var t=p&&p.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.hashFile=e.hash=e.createHash=void 0;const r=t(d),u=t(n);e.createHash=(e="MD5")=>r.default.createHash(e);e.hash=(t,n)=>(0,e.createHash)(n).update(t).digest("hex");e.hashFile=(t,n)=>{if(u.default.existsSync(t))return(0,e.hash)(u.default.readFileSync(t,"utf-8"),n)}}(Yi);var Zi={},Xi={},Qi={};Object.defineProperty(Qi,"__esModule",{value:!0}),Qi.Unicode=void 0;class es{}Qi.Unicode=es,es.SPACE_SEPARATOR=/[\u1680\u2000-\u200A\u202F\u205F\u3000]/,es.ID_START=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/,es.ID_CONTINUE=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/,Object.defineProperty(Xi,"__esModule",{value:!0}),Xi.JudgeUtil=void 0;const ts=Qi;Xi.JudgeUtil=class{static isIgnoreChar(e){return"string"==typeof e&&("\t"===e||"\v"===e||"\f"===e||" "===e||" "===e||"\ufeff"===e||"\n"===e||"\r"===e||"\u2028"===e||"\u2029"===e)}static isSpaceSeparator(e){return"string"==typeof e&&ts.Unicode.SPACE_SEPARATOR.test(e)}static isIdStartChar(e){return"string"==typeof e&&(e>="a"&&e<="z"||e>="A"&&e<="Z"||"$"===e||"_"===e||ts.Unicode.ID_START.test(e))}static isIdContinueChar(e){return"string"==typeof e&&(e>="a"&&e<="z"||e>="A"&&e<="Z"||e>="0"&&e<="9"||"$"===e||"_"===e||""===e||""===e||ts.Unicode.ID_CONTINUE.test(e))}static isDigitWithoutZero(e){return/[1-9]/.test(e)}static isDigit(e){return"string"==typeof e&&/[0-9]/.test(e)}static isHexDigit(e){return"string"==typeof e&&/[0-9A-Fa-f]/.test(e)}};var ns=p&&p.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Zi,"__esModule",{value:!0}),Zi.parseJsonText=Zi.parseJsonFile=void 0;const rs=ns(n),us=ns(t),os=ns(e),is=Xi;var ss;!function(e){e[e.Char=0]="Char",e[e.EOF=1]="EOF",e[e.Identifier=2]="Identifier"}(ss||(ss={}));let cs,as,ls,fs,Ds,ds,ps="start",Es=[],hs=0,Cs=1,ms=0,Fs=!1,ys="default",gs="'",As=1;function vs(e,t=!1){as=String(e),ps="start",Es=[],hs=0,Cs=1,ms=0,fs=void 0,Fs=t;do{cs=Ss(),xs[ps]()}while("eof"!==cs.type);return fs}function Ss(){for(ys="default",Ds="",gs="'",As=1;;){ds=ws();const e=_s[ys]();if(e)return e}}function ws(){if(as[hs])return String.fromCodePoint(as.codePointAt(hs))}function Os(){const e=ws();return"\n"===e?(Cs++,ms=0):e?ms+=e.length:ms++,e&&(hs+=e.length),e}Zi.parseJsonFile=function(e,t=!1,n="utf-8"){const r=rs.default.readFileSync(os.default.resolve(e),{encoding:n});try{return vs(r,t)}catch(t){if(t instanceof SyntaxError){const n=t.message.split("at");if(2===n.length)throw new Error(`${n[0].trim()}${us.default.EOL}\t at ${e}:${n[1].trim()}`)}throw new Error(`${e} is not in valid JSON/JSON5 format.`)}},Zi.parseJsonText=vs;const _s={default(){switch(ds){case"/":return Os(),void(ys="comment");case void 0:return Os(),bs("eof")}if(!is.JudgeUtil.isIgnoreChar(ds)&&!is.JudgeUtil.isSpaceSeparator(ds))return _s[ps]();Os()},start(){ys="value"},beforePropertyName(){switch(ds){case"$":case"_":return Ds=Os(),void(ys="identifierName");case"\\":return Os(),void(ys="identifierNameStartEscape");case"}":return bs("punctuator",Os());case'"':case"'":return gs=ds,Os(),void(ys="string")}if(is.JudgeUtil.isIdStartChar(ds))return Ds+=Os(),void(ys="identifierName");throw ks(ss.Char,Os())},afterPropertyName(){if(":"===ds)return bs("punctuator",Os());throw ks(ss.Char,Os())},beforePropertyValue(){ys="value"},afterPropertyValue(){switch(ds){case",":case"}":return bs("punctuator",Os())}throw ks(ss.Char,Os())},beforeArrayValue(){if("]"===ds)return bs("punctuator",Os());ys="value"},afterArrayValue(){switch(ds){case",":case"]":return bs("punctuator",Os())}throw ks(ss.Char,Os())},end(){throw ks(ss.Char,Os())},comment(){switch(ds){case"*":return Os(),void(ys="multiLineComment");case"/":return Os(),void(ys="singleLineComment")}throw ks(ss.Char,Os())},multiLineComment(){switch(ds){case"*":return Os(),void(ys="multiLineCommentAsterisk");case void 0:throw ks(ss.Char,Os())}Os()},multiLineCommentAsterisk(){switch(ds){case"*":return void Os();case"/":return Os(),void(ys="default");case void 0:throw ks(ss.Char,Os())}Os(),ys="multiLineComment"},singleLineComment(){switch(ds){case"\n":case"\r":case"\u2028":case"\u2029":return Os(),void(ys="default");case void 0:return Os(),bs("eof")}Os()},value(){switch(ds){case"{":case"[":return bs("punctuator",Os());case"n":return Os(),Bs("ull"),bs("null",null);case"t":return Os(),Bs("rue"),bs("boolean",!0);case"f":return Os(),Bs("alse"),bs("boolean",!1);case"-":case"+":return"-"===Os()&&(As=-1),void(ys="numerical");case".":case"0":case"I":case"N":return void(ys="numerical");case'"':case"'":return gs=ds,Os(),Ds="",void(ys="string")}if(void 0===ds||!is.JudgeUtil.isDigitWithoutZero(ds))throw ks(ss.Char,Os());ys="numerical"},numerical(){switch(ds){case".":return Ds=Os(),void(ys="decimalPointLeading");case"0":return Ds=Os(),void(ys="zero");case"I":return Os(),Bs("nfinity"),bs("numeric",As*(1/0));case"N":return Os(),Bs("aN"),bs("numeric",NaN)}if(void 0!==ds&&is.JudgeUtil.isDigitWithoutZero(ds))return Ds=Os(),void(ys="decimalInteger");throw ks(ss.Char,Os())},zero(){switch(ds){case".":case"e":case"E":return void(ys="decimal");case"x":case"X":return Ds+=Os(),void(ys="hexadecimal")}return bs("numeric",0)},decimalInteger(){switch(ds){case".":case"e":case"E":return void(ys="decimal")}if(!is.JudgeUtil.isDigit(ds))return bs("numeric",As*Number(Ds));Ds+=Os()},decimal(){switch(ds){case".":Ds+=Os(),ys="decimalFraction";break;case"e":case"E":Ds+=Os(),ys="decimalExponent"}},decimalPointLeading(){if(is.JudgeUtil.isDigit(ds))return Ds+=Os(),void(ys="decimalFraction");throw ks(ss.Char,Os())},decimalFraction(){switch(ds){case"e":case"E":return Ds+=Os(),void(ys="decimalExponent")}if(!is.JudgeUtil.isDigit(ds))return bs("numeric",As*Number(Ds));Ds+=Os()},decimalExponent(){switch(ds){case"+":case"-":return Ds+=Os(),void(ys="decimalExponentSign")}if(is.JudgeUtil.isDigit(ds))return Ds+=Os(),void(ys="decimalExponentInteger");throw ks(ss.Char,Os())},decimalExponentSign(){if(is.JudgeUtil.isDigit(ds))return Ds+=Os(),void(ys="decimalExponentInteger");throw ks(ss.Char,Os())},decimalExponentInteger(){if(!is.JudgeUtil.isDigit(ds))return bs("numeric",As*Number(Ds));Ds+=Os()},hexadecimal(){if(is.JudgeUtil.isHexDigit(ds))return Ds+=Os(),void(ys="hexadecimalInteger");throw ks(ss.Char,Os())},hexadecimalInteger(){if(!is.JudgeUtil.isHexDigit(ds))return bs("numeric",As*Number(Ds));Ds+=Os()},identifierNameStartEscape(){if("u"!==ds)throw ks(ss.Char,Os());Os();const e=Is();switch(e){case"$":case"_":break;default:if(!is.JudgeUtil.isIdStartChar(e))throw ks(ss.Identifier)}Ds+=e,ys="identifierName"},identifierName(){switch(ds){case"$":case"_":case"":case"":return void(Ds+=Os());case"\\":return Os(),void(ys="identifierNameEscape")}if(!is.JudgeUtil.isIdContinueChar(ds))return bs("identifier",Ds);Ds+=Os()},identifierNameEscape(){if("u"!==ds)throw ks(ss.Char,Os());Os();const e=Is();switch(e){case"$":case"_":case"":case"":break;default:if(!is.JudgeUtil.isIdContinueChar(e))throw ks(ss.Identifier)}Ds+=e,ys="identifierName"},string(){switch(ds){case"\\":return Os(),void(Ds+=function(){const e=ws(),t=function(){switch(ws()){case"b":return Os(),"\b";case"f":return Os(),"\f";case"n":return Os(),"\n";case"r":return Os(),"\r";case"t":return Os(),"\t";case"v":return Os(),"\v"}return}();if(t)return t;switch(e){case"0":if(Os(),is.JudgeUtil.isDigit(ws()))throw ks(ss.Char,Os());return"\0";case"x":return Os(),function(){let e="",t=ws();if(!is.JudgeUtil.isHexDigit(t))throw ks(ss.Char,Os());if(e+=Os(),t=ws(),!is.JudgeUtil.isHexDigit(t))throw ks(ss.Char,Os());return e+=Os(),String.fromCodePoint(parseInt(e,16))}();case"u":return Os(),Is();case"\n":case"\u2028":case"\u2029":return Os(),"";case"\r":return Os(),"\n"===ws()&&Os(),""}if(void 0===e||is.JudgeUtil.isDigitWithoutZero(e))throw ks(ss.Char,Os());return Os()}());case'"':case"'":if(ds===gs){const e=bs("string",Ds);return Os(),e}return void(Ds+=Os());case"\n":case"\r":case void 0:throw ks(ss.Char,Os());case"\u2028":case"\u2029":!function(e){console.warn(`JSON5: '${Ts(e)}' in strings is not valid ECMAScript; consider escaping.`)}(ds)}Ds+=Os()}};function bs(e,t){return{type:e,value:t,line:Cs,column:ms}}function Bs(e){for(const t of e){if(ws()!==t)throw ks(ss.Char,Os());Os()}}function Is(){let e="",t=4;for(;t-- >0;){const t=ws();if(!is.JudgeUtil.isHexDigit(t))throw ks(ss.Char,Os());e+=Os()}return String.fromCodePoint(parseInt(e,16))}const xs={start(){if("eof"===cs.type)throw ks(ss.EOF);Ps()},beforePropertyName(){switch(cs.type){case"identifier":case"string":return ls=cs.value,void(ps="afterPropertyName");case"punctuator":return void Ns();case"eof":throw ks(ss.EOF)}},afterPropertyName(){if("eof"===cs.type)throw ks(ss.EOF);ps="beforePropertyValue"},beforePropertyValue(){if("eof"===cs.type)throw ks(ss.EOF);Ps()},afterPropertyValue(){if("eof"===cs.type)throw ks(ss.EOF);switch(cs.value){case",":return void(ps="beforePropertyName");case"}":Ns()}},beforeArrayValue(){if("eof"===cs.type)throw ks(ss.EOF);"punctuator"!==cs.type||"]"!==cs.value?Ps():Ns()},afterArrayValue(){if("eof"===cs.type)throw ks(ss.EOF);switch(cs.value){case",":return void(ps="beforeArrayValue");case"]":Ns()}},end(){}};function Ps(){const e=function(){let e;switch(cs.type){case"punctuator":switch(cs.value){case"{":e={};break;case"[":e=[]}break;case"null":case"boolean":case"numeric":case"string":e=cs.value}return e}();if(Fs&&"object"==typeof e&&(e._line=Cs,e._column=ms),void 0===fs)fs=e;else{const t=Es[Es.length-1];Array.isArray(t)?Fs&&"object"!=typeof e?t.push({value:e,_line:Cs,_column:ms}):t.push(e):t[ls]=Fs&&"object"!=typeof e?{value:e,_line:Cs,_column:ms}:e}!function(e){if(e&&"object"==typeof e)Es.push(e),ps=Array.isArray(e)?"beforeArrayValue":"beforePropertyName";else{const e=Es[Es.length-1];ps=e?Array.isArray(e)?"afterArrayValue":"afterPropertyValue":"end"}}(e)}function Ns(){Es.pop();const e=Es[Es.length-1];ps=e?Array.isArray(e)?"afterArrayValue":"afterPropertyValue":"end"}function Ts(e){const t={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};if(t[e])return t[e];if(e<" "){const t=e.charCodeAt(0).toString(16);return`\\x${`00${t}`.substring(t.length)}`}return e}function ks(e,t){let n="";switch(e){case ss.Char:n=void 0===t?`JSON5: invalid end of input at ${Cs}:${ms}`:`JSON5: invalid character '${Ts(t)}' at ${Cs}:${ms}`;break;case ss.EOF:n=`JSON5: invalid end of input at ${Cs}:${ms}`;break;case ss.Identifier:ms-=5,n=`JSON5: invalid identifier character at ${Cs}:${ms}`}const r=new Rs(n);return r.lineNumber=Cs,r.columnNumber=ms,r}class Rs extends SyntaxError{}var Ms={},Ls=p&&p.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var u=Object.getOwnPropertyDescriptor(t,n);u&&!("get"in u?!t.__esModule:u.writable||u.configurable)||(u={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,u)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),js=p&&p.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),$s=p&&p.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&Ls(t,e,n);return js(t,e),t},Hs=p&&p.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ms,"__esModule",{value:!0}),Ms.isFileExists=Ms.offlinePluginConversion=Ms.executeCommand=Ms.getNpmPath=Ms.hasNpmPackInPaths=void 0;const Gs=r,Us=Hs(n),Vs=$s(e),Js=E,Ws=S;Ms.hasNpmPackInPaths=function(e,t){try{return require.resolve(e,{paths:[...t]}),!0}catch(e){return!1}},Ms.getNpmPath=function(){const e=process.execPath;return Vs.join(Vs.dirname(e),Js.NPM_TOOL)},Ms.executeCommand=function(e,t,n){0!==(0,Gs.spawnSync)(e,t,n).status&&(0,Ws.logErrorAndExit)(`Error: ${e} ${t} execute failed.See above for details.`)},Ms.offlinePluginConversion=function(e,t){return t.startsWith("file:")||t.endsWith(".tgz")?Vs.resolve(e,Js.HVIGOR,t.replace("file:","")):t},Ms.isFileExists=function(e){return Us.default.existsSync(e)&&Us.default.statSync(e).isFile()};var zs={};!function(u){var o=p&&p.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var u=Object.getOwnPropertyDescriptor(t,n);u&&!("get"in u?!t.__esModule:u.writable||u.configurable)||(u={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,u)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=p&&p.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=p&&p.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&o(t,e,n);return i(t,e),t},c=p&&p.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(u,"__esModule",{value:!0}),u.executeInstallPnpm=u.isPnpmInstalled=u.environmentHandler=u.checkNpmConifg=u.PNPM_VERSION=void 0;const a=r,l=s(n),f=c(t),D=s(e),d=E,h=S,C=Ms;u.PNPM_VERSION="7.30.0",u.checkNpmConifg=function(){const e=D.resolve(d.HVIGOR_PROJECT_ROOT_DIR,".npmrc"),t=D.resolve(f.default.homedir(),".npmrc");if((0,C.isFileExists)(e)||(0,C.isFileExists)(t))return;const n=(0,C.getNpmPath)(),r=(0,a.spawnSync)(n,["config","get","prefix"],{cwd:d.HVIGOR_PROJECT_ROOT_DIR});if(0!==r.status||!r.stdout)return void(0,h.logErrorAndExit)("Error: The hvigor depends on the npmrc file. Configure the npmrc file first.");const u=D.resolve(`${r.stdout}`.replace(/[\r\n]/gi,""),".npmrc");(0,C.isFileExists)(u)||(0,h.logErrorAndExit)("Error: The hvigor depends on the npmrc file. Configure the npmrc file first.")},u.environmentHandler=function(){process.env["npm_config_update-notifier"]="false"},u.isPnpmInstalled=function(){return!!l.existsSync(d.HVIGOR_WRAPPER_PNPM_SCRIPT_PATH)&&(0,C.hasNpmPackInPaths)("pnpm",[d.HVIGOR_WRAPPER_TOOLS_HOME])},u.executeInstallPnpm=function(){(0,h.logInfo)(`Installing pnpm@${u.PNPM_VERSION}...`);const e=(0,C.getNpmPath)();!function(){const e=D.resolve(d.HVIGOR_WRAPPER_TOOLS_HOME,d.DEFAULT_PACKAGE_JSON);try{l.existsSync(d.HVIGOR_WRAPPER_TOOLS_HOME)||l.mkdirSync(d.HVIGOR_WRAPPER_TOOLS_HOME,{recursive:!0});const t={dependencies:{}};t.dependencies[d.PNPM]=u.PNPM_VERSION,l.writeFileSync(e,JSON.stringify(t))}catch(t){(0,h.logErrorAndExit)(`Error: EPERM: operation not permitted,create ${e} failed.`)}}(),(0,C.executeCommand)(e,["install","pnpm"],{cwd:d.HVIGOR_WRAPPER_TOOLS_HOME,stdio:["inherit","inherit","inherit"],env:process.env}),(0,h.logInfo)("Pnpm install success.")}}(zs);var Ks=p&&p.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var u=Object.getOwnPropertyDescriptor(t,n);u&&!("get"in u?!t.__esModule:u.writable||u.configurable)||(u={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,u)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),qs=p&&p.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Ys=p&&p.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&Ks(t,e,n);return qs(t,e),t},Zs=p&&p.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(L,"__esModule",{value:!0});var Xs=L.initProjectWorkSpace=void 0;const Qs=Ys(n),ec=Zs(t),tc=Ys(e),nc=Zs(u),rc=j,uc=E,oc=qi,ic=Yi,sc=Zi,cc=S,ac=Ms,lc=zs;let fc,Dc,dc;function pc(e,t,n){return void 0!==n.dependencies&&(0,ac.offlinePluginConversion)(uc.HVIGOR_PROJECT_ROOT_DIR,t.dependencies[e])===tc.normalize(n.dependencies[e])}Xs=L.initProjectWorkSpace=function(){if(fc=function(){const e=tc.resolve(uc.HVIGOR_PROJECT_WRAPPER_HOME,uc.DEFAULT_HVIGOR_CONFIG_JSON_FILE_NAME);Qs.existsSync(e)||(0,cc.logErrorAndExit)(`Error: Hvigor config file ${e} does not exist.`);return(0,sc.parseJsonFile)(e)}(),dc=function(e){let t;t=function(e){const t=e.hvigorVersion;if(t.startsWith("file:")||t.endsWith(".tgz"))return!1;const n=e.dependencies,r=Object.getOwnPropertyNames(n);for(const e of r){const t=n[e];if(t.startsWith("file:")||t.endsWith(".tgz"))return!1}if(1===r.length&&"@ohos/hvigor-ohos-plugin"===r[0])return t>"2.5.0";return!1}(e)?function(e){let t=`${uc.HVIGOR_ENGINE_PACKAGE_NAME}@${e.hvigorVersion}`;const n=e.dependencies;if(n){Object.getOwnPropertyNames(n).sort().forEach((e=>{t+=`,${e}@${n[e]}`}))}return(0,ic.hash)(t)}(e):(0,ic.hash)(nc.default.cwd());return tc.resolve(ec.default.homedir(),".hvigor","project_caches",t)}(fc),Dc=function(){const e=tc.resolve(dc,uc.WORK_SPACE,uc.DEFAULT_PACKAGE_JSON);return Qs.existsSync(e)?(0,sc.parseJsonFile)(e):{dependencies:{}}}(),function(){const e=tc.resolve(uc.HVIGOR_USER_HOME,uc.DEFAULT_HVIGOR_CONFIG_JSON_FILE_NAME);if(Qs.existsSync(e))(0,sc.parseJsonFile)(e)}(),!(0,ac.hasNpmPackInPaths)(uc.HVIGOR_ENGINE_PACKAGE_NAME,[tc.join(dc,uc.WORK_SPACE)])||(0,ac.offlinePluginConversion)(uc.HVIGOR_PROJECT_ROOT_DIR,fc.hvigorVersion)!==Dc.dependencies[uc.HVIGOR_ENGINE_PACKAGE_NAME]||!function(){function e(e){const t=null==e?void 0:e.dependencies;return void 0===t?0:Object.getOwnPropertyNames(t).length}const t=e(fc),n=e(Dc);if(t+1!==n)return!1;for(const e in null==fc?void 0:fc.dependencies)if(!(0,ac.hasNpmPackInPaths)(e,[tc.join(dc,uc.WORK_SPACE)])||!pc(e,fc,Dc))return!1;return!0}())try{const e=nc.default.hrtime();(0,lc.checkNpmConifg)(),function(){(0,cc.logInfo)("Hvigor installing...");for(const e in fc.dependencies)fc.dependencies[e]&&(fc.dependencies[e]=(0,ac.offlinePluginConversion)(uc.HVIGOR_PROJECT_ROOT_DIR,fc.dependencies[e]));const e={dependencies:{...fc.dependencies}};e.dependencies[uc.HVIGOR_ENGINE_PACKAGE_NAME]=(0,ac.offlinePluginConversion)(uc.HVIGOR_PROJECT_ROOT_DIR,fc.hvigorVersion);const t=tc.join(dc,uc.WORK_SPACE);try{Qs.mkdirSync(t,{recursive:!0});const n=tc.resolve(t,uc.DEFAULT_PACKAGE_JSON);Qs.writeFileSync(n,JSON.stringify(e))}catch(e){(0,cc.logErrorAndExit)(e)}(function(){const e=["config","set","store-dir",uc.HVIGOR_PNPM_STORE_PATH],t={cwd:tc.join(dc,uc.WORK_SPACE),stdio:["inherit","inherit","inherit"]};(0,ac.executeCommand)(uc.HVIGOR_WRAPPER_PNPM_SCRIPT_PATH,e,t)})(),function(){const e=["install"];(0,oc.isCI)()&&e.push("--no-frozen-lockfile");const t={cwd:tc.join(dc,uc.WORK_SPACE),stdio:["inherit","inherit","inherit"]};(0,ac.executeCommand)(uc.HVIGOR_WRAPPER_PNPM_SCRIPT_PATH,e,t)}(),(0,cc.logInfo)("Hvigor install success.")}();const t=nc.default.hrtime(e);rc.hvigorTrace.HVIGOR_INSTALL_TIME=1e9*t[0]+t[1]}catch(e){!function(){const e=tc.join(dc,uc.WORK_SPACE);if((0,cc.logInfo)("Hvigor cleaning..."),!Qs.existsSync(e))return;const t=Qs.readdirSync(e);if(!t||0===t.length)return;const n=tc.resolve(dc,"node_modules","@ohos","hvigor","bin","hvigor.js");Qs.existsSync(n)&&(0,ac.executeCommand)(nc.default.argv[0],[n,"--stop-daemon"],{});try{t.forEach((t=>{Qs.rmSync(tc.resolve(e,t),{recursive:!0})}))}catch(t){(0,cc.logErrorAndExit)(`The hvigor build tool cannot be installed. Please manually clear the workspace directory and synchronize the project again.\n\n Workspace Path: ${e}.`)}}()}return dc},function(){zs.environmentHandler(),zs.isPnpmInstalled()||(zs.checkNpmConifg(),zs.executeInstallPnpm());const t=Xs();b(e.join(t,E.WORK_SPACE))}();
\ No newline at end of file
diff --git a/code/DocsSample/ArkTSUtilsDocModule/hvigorfile.ts b/code/DocsSample/ArkTSUtilsDocModule/hvigorfile.ts
new file mode 100644
index 000000000..f3cb9f1a8
--- /dev/null
+++ b/code/DocsSample/ArkTSUtilsDocModule/hvigorfile.ts
@@ -0,0 +1,6 @@
+import { appTasks } from '@ohos/hvigor-ohos-plugin';
+
+export default {
+ system: appTasks, /* Built-in plugin of Hvigor. It cannot be modified. */
+ plugins:[] /* Custom plugin to extend the functionality of Hvigor. */
+}
diff --git a/code/DocsSample/ArkTSUtilsDocModule/hvigorw b/code/DocsSample/ArkTSUtilsDocModule/hvigorw
new file mode 100644
index 000000000..6c7cb1aae
--- /dev/null
+++ b/code/DocsSample/ArkTSUtilsDocModule/hvigorw
@@ -0,0 +1,70 @@
+#!/bin/bash
+
+# ----------------------------------------------------------------------------
+#/*
+# * Copyright (c) 2024 Huawei Device Co., Ltd.
+# * Licensed under the Apache License, Version 2.0 (the "License");
+# * you may not use this file except in compliance with the License.
+# * You may obtain a copy of the License at
+# *
+# * http://www.apache.org/licenses/LICENSE-2.0
+# *
+# * Unless required by applicable law or agreed to in writing, software
+# * distributed under the License is distributed on an "AS IS" BASIS,
+# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# * See the License for the specific language governing permissions and
+# * limitations under the License.
+# */
+# ----------------------------------------------------------------------------
+# ----------------------------------------------------------------------------
+# Hvigor startup script, version 1.0.0
+#
+# Required ENV vars:
+# ------------------
+# NODE_HOME - location of a Node home dir
+# or
+# Add /usr/local/nodejs/bin to the PATH environment variable
+# ----------------------------------------------------------------------------
+
+HVIGOR_APP_HOME="`pwd -P`"
+HVIGOR_WRAPPER_SCRIPT=${HVIGOR_APP_HOME}/hvigor/hvigor-wrapper.js
+#NODE_OPTS="--max-old-space-size=4096"
+
+fail() {
+ echo "$*"
+ exit 1
+}
+
+set_executable_node() {
+ EXECUTABLE_NODE="${NODE_HOME}/bin/node"
+ if [ -x "$EXECUTABLE_NODE" ]; then
+ return
+ fi
+
+ EXECUTABLE_NODE="${NODE_HOME}/node"
+ if [ -x "$EXECUTABLE_NODE" ]; then
+ return
+ fi
+ fail "ERROR: NODE_HOME is set to an invalid directory,check $NODE_HOME\n\nPlease set NODE_HOME in your environment to the location where your nodejs installed"
+}
+
+# Determine node to start hvigor wrapper script
+if [ -n "${NODE_HOME}" ]; then
+ set_executable_node
+else
+ EXECUTABLE_NODE="node"
+ command -v ${EXECUTABLE_NODE} &> /dev/null || fail "ERROR: NODE_HOME not set and 'node' command not found"
+fi
+
+# Check hvigor wrapper script
+if [ ! -r "$HVIGOR_WRAPPER_SCRIPT" ]; then
+ fail "ERROR: Couldn't find hvigor/hvigor-wrapper.js in ${HVIGOR_APP_HOME}"
+fi
+
+if [ -z "${NODE_OPTS}" ]; then
+ NODE_OPTS="--"
+fi
+
+# start hvigor-wrapper script
+exec "${EXECUTABLE_NODE}" "${NODE_OPTS}" \
+ "${HVIGOR_WRAPPER_SCRIPT}" "$@"
diff --git a/code/DocsSample/ArkTSUtilsDocModule/hvigorw.bat b/code/DocsSample/ArkTSUtilsDocModule/hvigorw.bat
new file mode 100644
index 000000000..b5eecf5a1
--- /dev/null
+++ b/code/DocsSample/ArkTSUtilsDocModule/hvigorw.bat
@@ -0,0 +1,54 @@
+@rem
+@rem ----------------------------------------------------------------------------
+@rem Hvigor startup script for Windows, version 1.0.0
+@rem
+@rem Required ENV vars:
+@rem ------------------
+@rem NODE_HOME - location of a Node home dir
+@rem or
+@rem Add %NODE_HOME%/bin to the PATH environment variable
+@rem ----------------------------------------------------------------------------
+@rem
+@echo off
+
+@rem Set local scope for the variables with windows NT shell
+if "%OS%"=="Windows_NT" setlocal
+
+set DIRNAME=%~dp0
+if "%DIRNAME%" == "" set DIRNAME=.
+set APP_BASE_NAME=%~n0
+set APP_HOME=%DIRNAME%
+
+set WRAPPER_MODULE_PATH=%APP_HOME%\hvigor\hvigor-wrapper.js
+set NODE_EXE=node.exe
+@rem set NODE_OPTS="--max-old-space-size=4096"
+
+@rem Resolve any "." and ".." in APP_HOME to make it shorter.
+for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
+
+if not defined NODE_OPTS set NODE_OPTS="--"
+
+@rem Find node.exe
+if defined NODE_HOME (
+ set NODE_HOME=%NODE_HOME:"=%
+ set NODE_EXE_PATH=%NODE_HOME%/%NODE_EXE%
+)
+
+%NODE_EXE% --version >NUL 2>&1
+if "%ERRORLEVEL%" == "0" (
+ "%NODE_EXE%" "%NODE_OPTS%" "%WRAPPER_MODULE_PATH%" %*
+) else if exist "%NODE_EXE_PATH%" (
+ "%NODE_EXE%" "%NODE_OPTS%" "%WRAPPER_MODULE_PATH%" %*
+) else (
+ echo.
+ echo ERROR: NODE_HOME is not set and no 'node' command could be found in your PATH.
+ echo.
+ echo Please set the NODE_HOME variable in your environment to match the
+ echo location of your NodeJs installation.
+)
+
+if "%ERRORLEVEL%" == "0" (
+ if "%OS%" == "Windows_NT" endlocal
+) else (
+ exit /b %ERRORLEVEL%
+)
\ No newline at end of file
diff --git a/code/BasicFeature/InsightIntent/IntentExecutor/oh-package.json5 b/code/DocsSample/ArkTSUtilsDocModule/oh-package.json5
similarity index 81%
rename from code/BasicFeature/InsightIntent/IntentExecutor/oh-package.json5
rename to code/DocsSample/ArkTSUtilsDocModule/oh-package.json5
index 362216e67..972792f68 100644
--- a/code/BasicFeature/InsightIntent/IntentExecutor/oh-package.json5
+++ b/code/DocsSample/ArkTSUtilsDocModule/oh-package.json5
@@ -1,27 +1,29 @@
-/*
- * Copyright (c) 2023 Huawei Device Co., Ltd.
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-{
- "license": "",
- "devDependencies": {
- "@ohos/hypium": "1.0.6"
- },
- "author": "",
- "name": "IntentExecutor",
- "description": "Please describe the basic information.",
- "main": "",
- "version": "1.0.0",
- "dependencies": {}
-}
+/*
+ * Copyright (c) 2024 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+{
+ "name": "arktsutilsdocssample",
+ "version": "1.0.0",
+ "description": "Please describe the basic information.",
+ "main": "",
+ "author": "",
+ "license": "",
+ "dependencies": {
+ },
+ "devDependencies": {
+ "@ohos/hypium": "1.0.15",
+ "@ohos/hamock": "1.0.0"
+ }
+}
diff --git a/code/DocsSample/ArkTSUtilsDocModule/ohosTest.md b/code/DocsSample/ArkTSUtilsDocModule/ohosTest.md
new file mode 100644
index 000000000..0050b3271
--- /dev/null
+++ b/code/DocsSample/ArkTSUtilsDocModule/ohosTest.md
@@ -0,0 +1,9 @@
+| 测试功能 | 预置条件 | 输入 | 预期输出 |是否自动|测试结果|
+|-------------------|------|------------|---------------------------------------------------|--------------------------------|--------------------------------|
+| 拉起应用 | 设备正常运行 | | 成功拉起应用 |是|Pass|
+| Sendable共享模块能力测试 | 执行用例 | 执行无需输入 | SendableModuleTest Succeed |是|Pass|
+| 同步任务能力测试 | 执行用例 | 执行无需输入 | syncTaskTest Succeed |是|Pass|
+| CPU密集型任务能力测试 | 执行用例 | 执行无需输入 | imagePreprocessing success |是|Pass|
+| IO密集型任务能力测试 | 执行用例 | 执行无需输入 | IoTaskTest Succeed |是|Pass|
+| 单步IO任务能力测试 | 执行用例 | 执行无需输入 | SingleIoTest Succeed |是|Pass|
+| 异步任务能力测试 | 执行用例 | 执行无需输入 | AsyncConcurrencyTest Succeed |是|Pass|
\ No newline at end of file
diff --git a/code/DocsSample/ArkTSUtilsDocModule/screenshots/device/image1.jpeg b/code/DocsSample/ArkTSUtilsDocModule/screenshots/device/image1.jpeg
new file mode 100644
index 000000000..44b92b7a1
Binary files /dev/null and b/code/DocsSample/ArkTSUtilsDocModule/screenshots/device/image1.jpeg differ
diff --git a/code/DocsSample/ArkTSUtilsDocModule/screenshots/device/image2.jpeg b/code/DocsSample/ArkTSUtilsDocModule/screenshots/device/image2.jpeg
new file mode 100644
index 000000000..a6618b1b6
Binary files /dev/null and b/code/DocsSample/ArkTSUtilsDocModule/screenshots/device/image2.jpeg differ
diff --git a/code/DocsSample/ArkTSUtilsDocModule/screenshots/device/image3.jpeg b/code/DocsSample/ArkTSUtilsDocModule/screenshots/device/image3.jpeg
new file mode 100644
index 000000000..05bb54086
Binary files /dev/null and b/code/DocsSample/ArkTSUtilsDocModule/screenshots/device/image3.jpeg differ
diff --git a/code/DocsSample/Media/Audio/OHAudio/.gitignore b/code/DocsSample/Media/Audio/OHAudio/.gitignore
new file mode 100644
index 000000000..fbabf7710
--- /dev/null
+++ b/code/DocsSample/Media/Audio/OHAudio/.gitignore
@@ -0,0 +1,11 @@
+/node_modules
+/oh_modules
+/local.properties
+/.idea
+**/build
+/.hvigor
+.cxx
+/.clangd
+/.clang-format
+/.clang-tidy
+**/.test
\ No newline at end of file
diff --git a/code/DocsSample/Media/Audio/OHAudio/AppScope/app.json5 b/code/DocsSample/Media/Audio/OHAudio/AppScope/app.json5
new file mode 100644
index 000000000..f1bb5e515
--- /dev/null
+++ b/code/DocsSample/Media/Audio/OHAudio/AppScope/app.json5
@@ -0,0 +1,25 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+{
+ "app": {
+ "bundleName": "com.samples.audio",
+ "vendor": "samples",
+ "versionCode": 1000000,
+ "versionName": "1.0.0",
+ "icon": "$media:app_icon",
+ "label": "$string:app_name"
+ }
+}
diff --git a/code/DocsSample/Media/Audio/OHAudio/AppScope/resources/base/element/string.json b/code/DocsSample/Media/Audio/OHAudio/AppScope/resources/base/element/string.json
new file mode 100644
index 000000000..09586ebc7
--- /dev/null
+++ b/code/DocsSample/Media/Audio/OHAudio/AppScope/resources/base/element/string.json
@@ -0,0 +1,81 @@
+{
+ "string": [
+ {
+ "name": "app_name",
+ "value": "Audio"
+ },
+ {
+ "name": "Speaker",
+ "value": "扬声器"
+ },
+ {
+ "name": "EarPiece",
+ "value": "听筒"
+ },
+ {
+ "name": "WiredHeadset",
+ "value": "有线耳机[带麦克风]"
+ },
+ {
+ "name": "WiredHeadPhones",
+ "value": "有线耳机[无麦克风]"
+ },
+ {
+ "name": "Bluetooth_A2DP",
+ "value": "蓝牙设备A2DP"
+ },
+ {
+ "name": "USB_Headset",
+ "value": "USB耳机"
+ },
+ {
+ "name": "BLUETOOTH_SCO",
+ "value": "蓝牙设备SCO"
+ },
+ {
+ "name": "Back",
+ "value": "返回"
+ },
+ {
+ "name": "AUDIO_CAPTURER",
+ "value": "录制和播放"
+ },
+ {
+ "name": "allow",
+ "value": "允许"
+ },
+ {
+ "name": "LOW_LATENCY_RENDERER",
+ "value": "低时延播放"
+ },
+ {
+ "name": "LOW_LATENCY_CAPTURER",
+ "value": "低时延录制"
+ },
+ {
+ "name": "CONTINUE",
+ "value": "继续"
+ },
+ {
+ "name": "PAUSE",
+ "value": "暂停"
+ },
+ {
+ "name": "RECORD_RESULT",
+ "value": "录音结果"
+ },
+ {
+ "name": "AUDIOVIVID_PLAYBACK",
+ "value": "Audio vivid播放"
+ },
+ {
+ "name": "NORMAL_PLAY",
+ "value": "普通音乐示例"
+ },
+ {
+ "name": "VIVID_PLAY",
+ "value": "Audio vivid音乐示例"
+ }
+
+ ]
+}
diff --git a/code/BasicFeature/InsightIntent/IntentExecutor/AppScope/resources/base/media/app_icon.png b/code/DocsSample/Media/Audio/OHAudio/AppScope/resources/base/media/app_icon.png
similarity index 100%
rename from code/BasicFeature/InsightIntent/IntentExecutor/AppScope/resources/base/media/app_icon.png
rename to code/DocsSample/Media/Audio/OHAudio/AppScope/resources/base/media/app_icon.png
diff --git a/code/DocsSample/Media/Audio/OHAudio/README.md b/code/DocsSample/Media/Audio/OHAudio/README.md
new file mode 100644
index 000000000..4c8c1b550
--- /dev/null
+++ b/code/DocsSample/Media/Audio/OHAudio/README.md
@@ -0,0 +1,94 @@
+# 音频管理
+
+### 介绍
+
+本示例主要展示了音频低时延录制和播放,AudioVivid音乐播放的相关功能:
+ 1. [低时延录制](https://gitee.com/openharmony/docs/blob/OpenHarmony-4.0-Release/zh-cn/application-dev/media/using-ohaudio-for-recording.md)。
+ 2. [低时延播放](https://gitee.com/openharmony/docs/blob/OpenHarmony-4.0-Release/zh-cn/application-dev/media/using-ohaudio-for-playback.md)。
+ 3. [AudioVivid播放](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/media/audio/using-ohaudio-for-playback.md).
+
+### 效果预览
+
+| 主页 | 录制页面 |
+|------------------------------------------|-------------------------------------------------------|
+| ![Index](screenshots/device/index.jpg) | ![PreferOutputDevice](screenshots/device/record.jpeg) |
+| 播放页面 | AudioVivid播放页|
+| ![Focus](screenshots/device/play.jpeg) |![AudioVivid](screenshots/device/AudioVivid.jpg)|
+
+使用说明
+
+1. 弹出麦克风权限访问提示框,点击“允许”,如果点击"禁止"则不可进行录制,需要用户去设置页面给应用授权后方可正常录制
+2. 在主界面点击“录制和播放”,进入音频录制界面,音频录制界面默认是普通录制界面,打开低时延录制开关可进行低时延录制
+3. 点击录制按钮,开始录制,开始录制后低时延录制开关变为不可点击状态,录音时间开始计时,5s内不允许结束,30s后会自动结束录制
+4. 点击暂停按钮,暂停录制,录音时间也停止计时
+5. 点击继续按钮,继续录制,录音时间继续计时
+6. 停止录制后,会生成录制结果,界面上有一个低时延播放开关和录制成功的音频播放器,点击低时延播放开关可打开低时延播放功能,点击播放可听到录制的音频,播放未结束之前低时延播放开关为不可点击状态
+7. 点击返回按按钮回到主页
+8. 点击AudioVivid播放卡片进入页面
+9. 点击普通播放按钮,播放普通格式音乐
+10. 点击普通暂停按钮,暂停普通格式音乐
+11. 点击AudioVivid播放按钮,播放AudioVivid格式音乐
+12. 点击AudioVivid暂停按钮,暂停AudioVivid格式音乐
+13. 点击返回按按钮回到主页
+
+### 工程目录
+
+```
+entry/src/main/
+|---main
+| |---cpp
+| | |---types
+| | | |---libentry
+| | | | |---index.d.ts // 接口导出
+| | | | |---oh-package.json5
+| | |---audio.cpp // 调用native接口
+| | |---CMakeLists.txt // 编译脚本
+| |---ets
+| | |---entryability
+| | | |---EntryAbility.ets
+| | |---pages
+| | | |---Index.ets // 首页
+| | | |---AudioRecording.ets // 录制和播放页面
+| | | |---AudioVividPlayback.ets // AudioVivid播放页面
+| |---resources // 静态资源
+|---ohosTest
+| |---ets
+| | |---tests
+| | | |---Ability.test.ets // 自动化测试用例
+```
+
+### 具体实现
+* 音频录制和播放-源码参考:[audioRecording.cpp](entry/src/main/cpp/audioRecording.cpp)
+ * [低时延录制开发指导文档](https://gitee.com/openharmony/docs/blob/OpenHarmony-4.0-Release/zh-cn/application-dev/media/using-ohaudio-for-recording.md)
+ * [低时延播放开发指导文档](https://gitee.com/openharmony/docs/blob/OpenHarmony-4.0-Release/zh-cn/application-dev/media/using-ohaudio-for-playback.md)
+ * [低时延录制开发示例](https://gitee.com/openharmony/multimedia_audio_framework/blob/OpenHarmony-4.0-Release/frameworks/native/ohaudio/test/example/oh_audio_capturer_test.cpp)
+ * [低时延播放开发示例](https://gitee.com/openharmony/multimedia_audio_framework/blob/OpenHarmony-4.0-Release/frameworks/native/ohaudio/test/example/oh_audio_renderer_test.cpp)
+ * [AudioVivid播放开发示例](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/media/audio/using-ohaudio-for-playback.md)
+
+### 相关权限
+
+音频录制涉及的权限包括:
+
+1.允许应用使用麦克风:[ohos.permission.MICROPHONE](https://gitee.com/openharmony/docs/blob/OpenHarmony-4.0-Release/zh-cn/application-dev/security/permission-list.md#ohospermissionmicrophone)
+
+### 依赖
+
+不涉及。
+
+### 约束与限制
+
+1. 本示例仅支持标准系统上运行,支持设备:RK3568(不支持低时延功能);
+2. 本示例仅支持API12版本SDK,镜像版本号:OpenHarmony 5.0.0.20及之后的版本;
+3. 本示例需要使用DevEco Studio 3.1.1 release (Build Version: 3.1.0.501)才可编译运行;
+
+### 下载
+
+如需单独下载本工程,执行如下命令:
+
+```
+git init
+git config core.sparsecheckout true
+echo code/DocsSample/Media/Audio/OHAudio/ > .git/info/sparse-checkout
+git remote add origin https://gitee.com/openharmony/applications_app_samples.git
+git pull origin ***(分支名)
+```
\ No newline at end of file
diff --git a/code/BasicFeature/InsightIntent/IntentExecutor/build-profile.json5 b/code/DocsSample/Media/Audio/OHAudio/build-profile.json5
similarity index 89%
rename from code/BasicFeature/InsightIntent/IntentExecutor/build-profile.json5
rename to code/DocsSample/Media/Audio/OHAudio/build-profile.json5
index e7452ebd9..16a5c23f8 100644
--- a/code/BasicFeature/InsightIntent/IntentExecutor/build-profile.json5
+++ b/code/DocsSample/Media/Audio/OHAudio/build-profile.json5
@@ -1,42 +1,42 @@
-/*
- * Copyright (c) 2023 Huawei Device Co., Ltd.
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-{
- "app": {
- "signingConfigs": [],
- "products": [
- {
- "name": "default",
- "signingConfig": "default",
- "compileSdkVersion": 11,
- "compatibleSdkVersion": 11
- }
- ]
- },
- "modules": [
- {
- "name": "entry",
- "srcPath": "./entry",
- "targets": [
- {
- "name": "default",
- "applyToProducts": [
- "default"
- ]
- }
- ]
- }
- ]
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+{
+ "app": {
+ "signingConfigs": [],
+ "products": [
+ {
+ "name": "default",
+ "signingConfig": "default",
+ "compileSdkVersion": 12,
+ "compatibleSdkVersion": 12
+ }
+ ],
+ },
+ "modules": [
+ {
+ "name": "entry",
+ "srcPath": "./entry",
+ "targets": [
+ {
+ "name": "default",
+ "applyToProducts": [
+ "default"
+ ]
+ }
+ ]
+ }
+ ]
}
\ No newline at end of file
diff --git a/code/DocsSample/Media/Audio/OHAudio/entry/.gitignore b/code/DocsSample/Media/Audio/OHAudio/entry/.gitignore
new file mode 100644
index 000000000..e2713a277
--- /dev/null
+++ b/code/DocsSample/Media/Audio/OHAudio/entry/.gitignore
@@ -0,0 +1,6 @@
+/node_modules
+/oh_modules
+/.preview
+/build
+/.cxx
+/.test
\ No newline at end of file
diff --git a/code/BasicFeature/InsightIntent/IntentExecutor/entry/build-profile.json5 b/code/DocsSample/Media/Audio/OHAudio/entry/build-profile.json5
similarity index 80%
rename from code/BasicFeature/InsightIntent/IntentExecutor/entry/build-profile.json5
rename to code/DocsSample/Media/Audio/OHAudio/entry/build-profile.json5
index 0c8525dfd..8e7b51b73 100644
--- a/code/BasicFeature/InsightIntent/IntentExecutor/entry/build-profile.json5
+++ b/code/DocsSample/Media/Audio/OHAudio/entry/build-profile.json5
@@ -1,29 +1,35 @@
-/*
- * Copyright (c) 2023 Huawei Device Co., Ltd.
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-{
- "apiType": 'stageMode',
- "buildOption": {
- },
- "targets": [
- {
- "name": "default",
- "runtimeOS": "OpenHarmony"
- },
- {
- "name": "ohosTest",
- }
- ]
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+{
+ "apiType": 'stageMode',
+ "buildOption": {
+ "externalNativeOptions": {
+ "path": "./src/main/cpp/CMakeLists.txt",
+ "arguments": "",
+ "cppFlags": "",
+ "abiFilters": ["arm64-v8a", "armeabi-v7a", "x86_64"]
+ }
+ },
+ "targets": [
+ {
+ "name": "default",
+ "runtimeOS": "OpenHarmony"
+ },
+ {
+ "name": "ohosTest",
+ }
+ ]
}
\ No newline at end of file
diff --git a/code/DocsSample/Media/Audio/OHAudio/entry/hvigorfile.ts b/code/DocsSample/Media/Audio/OHAudio/entry/hvigorfile.ts
new file mode 100644
index 000000000..80e4ec5b8
--- /dev/null
+++ b/code/DocsSample/Media/Audio/OHAudio/entry/hvigorfile.ts
@@ -0,0 +1,2 @@
+// Script for compiling build behavior. It is built in the build plug-in and cannot be modified currently.
+export { hapTasks } from '@ohos/hvigor-ohos-plugin';
diff --git a/code/BasicFeature/InsightIntent/IntentExecutor/entry/oh-package.json5 b/code/DocsSample/Media/Audio/OHAudio/entry/oh-package.json5
similarity index 90%
rename from code/BasicFeature/InsightIntent/IntentExecutor/entry/oh-package.json5
rename to code/DocsSample/Media/Audio/OHAudio/entry/oh-package.json5
index 4be95c59c..343effd9e 100644
--- a/code/BasicFeature/InsightIntent/IntentExecutor/entry/oh-package.json5
+++ b/code/DocsSample/Media/Audio/OHAudio/entry/oh-package.json5
@@ -1,25 +1,27 @@
-/*
- * Copyright (c) 2023 Huawei Device Co., Ltd.
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-{
- "license": "",
- "devDependencies": {},
- "author": "",
- "name": "entry",
- "description": "Please describe the basic information.",
- "main": "",
- "version": "1.0.0",
- "dependencies": {}
-}
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+{
+ "license": "",
+ "devDependencies": {},
+ "author": "",
+ "name": "entry",
+ "description": "Please describe the basic information.",
+ "main": "",
+ "version": "1.0.0",
+ "dependencies": {
+ "libentry.so": "file:./src/main/cpp/types/libentry"
+ }
+}
diff --git a/code/DocsSample/Media/Audio/OHAudio/entry/src/main/cpp/CMakeLists.txt b/code/DocsSample/Media/Audio/OHAudio/entry/src/main/cpp/CMakeLists.txt
new file mode 100644
index 000000000..c6ea497b8
--- /dev/null
+++ b/code/DocsSample/Media/Audio/OHAudio/entry/src/main/cpp/CMakeLists.txt
@@ -0,0 +1,11 @@
+# the minimum version of CMake.
+cmake_minimum_required(VERSION 3.4.1)
+project(Audio)
+
+set(NATIVERENDER_ROOT_PATH ${CMAKE_CURRENT_SOURCE_DIR})
+
+include_directories(${NATIVERENDER_ROOT_PATH}
+ ${NATIVERENDER_ROOT_PATH}/include)
+
+add_library(entry SHARED audio.cpp)
+target_link_libraries(entry PUBLIC libace_napi.z.so libohaudio.so libhilog_ndk.z.so)
diff --git a/code/DocsSample/Media/Audio/OHAudio/entry/src/main/cpp/audio.cpp b/code/DocsSample/Media/Audio/OHAudio/entry/src/main/cpp/audio.cpp
new file mode 100644
index 000000000..d6bb88be4
--- /dev/null
+++ b/code/DocsSample/Media/Audio/OHAudio/entry/src/main/cpp/audio.cpp
@@ -0,0 +1,592 @@
+/*
+ * Copyright (c) 2023-2024 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include "napi/native_api.h"
+#include "ohaudio/native_audiocapturer.h"
+#include "ohaudio/native_audiorenderer.h"
+#include "ohaudio/native_audiostreambuilder.h"
+#include "ohaudio/native_audiostream_base.h"
+#include "hilog/log.h"
+#include
+
+namespace AudioTestConstants {
+ constexpr int32_t FIRST_ARG_IDX = 1;
+ constexpr int32_t SECOND_ARG_IDX = 2;
+ constexpr int32_t THIRD_ARG_IDX = 3;
+ constexpr int32_t RECODER_TIME = 10000;
+ constexpr int32_t COUNTDOWN_INTERVAL = 1000;
+ constexpr int32_t CONVERT_RATE = 1000;
+ constexpr int32_t WAIT_INTERVAL = 1000;
+} // namespace AudioTestConstants
+
+static std::string g_filePath = "/data/storage/el2/base/haps/entry/files/oh_test_audio.pcm";
+static std::string g_filePath_avp = "/data/storage/el2/base/haps/entry/files/2p0.pcm";
+static std::string g_filePath_avp_vivid = "/data/storage/el2/base/haps/entry/files/avs3_16.wav";
+static std::string g_filePath_avp_metadata = "/data/storage/el2/base/haps/entry/files/avs3_bitstream.bin";
+
+const int GLOBAL_RESMGR = 0xFF00;
+const char *TAG = "[Sample_audio]";
+FILE *g_file = nullptr;
+FILE *g_file_avp = nullptr;
+bool g_readEnd = false;
+bool g_rendererLowLatency = false;
+int32_t g_samplingRate = 48000;
+int32_t g_channelCount = 2;
+int32_t g_avpsamplingRate = 48000;
+int32_t g_avpchannelCount = 2;
+int32_t g_avpvividchannelCount = 8;
+
+std::unique_ptr normalPCM;
+std::unique_ptr vividPCM;
+std::unique_ptr metaDataFile;
+
+static OH_AudioStream_Result ret;
+static OH_AudioCapturer *audioCapturer;
+static OH_AudioRenderer *audioRenderer;
+static OH_AudioStreamBuilder *builder;
+static OH_AudioStreamBuilder *rendererBuilder;
+static OH_AudioRenderer *audioRendererNormal;
+static OH_AudioRenderer *audioRendererVivid;
+
+static napi_value GetRendererState(napi_env env, napi_callback_info info)
+{
+ OH_AudioStreamBuilder *builder;
+ OH_AudioStreamBuilder_Create(&builder, AUDIOSTREAM_TYPE_RENDERER);
+ OH_AudioStream_State state;
+ OH_AudioRenderer_GetCurrentState(audioRenderer, &state);
+ napi_value sum;
+ napi_create_int32(env, state, &sum);
+ return sum;
+}
+
+static napi_value GetCapturerState(napi_env env, napi_callback_info info)
+{
+ OH_AudioStreamBuilder *builder;
+ OH_AudioStreamBuilder_Create(&builder, AUDIOSTREAM_TYPE_CAPTURER);
+ OH_AudioStream_State state;
+ OH_AudioCapturer_GetCurrentState(audioCapturer, &state);
+ napi_value sum;
+ napi_create_int32(env, state, &sum);
+ return sum;
+}
+
+static napi_value GetFileState(napi_env env, napi_callback_info info)
+{
+ napi_value sum;
+ napi_create_int32(env, g_readEnd, &sum);
+ return sum;
+}
+
+static napi_value GetFastState(napi_env env, napi_callback_info info)
+{
+ napi_value sum;
+ napi_create_int32(env, g_rendererLowLatency, &sum);
+ return sum;
+}
+
+static napi_value GetFramesWritten(napi_env env, napi_callback_info info)
+{
+ napi_value sum;
+ int64_t frames;
+ OH_AudioRenderer_GetFramesWritten(audioRenderer, &frames);
+ napi_create_int64(env, frames, &sum);
+ return sum;
+}
+
+static napi_value GetFileSize(napi_env env, napi_callback_info info)
+{
+ struct stat statbuf;
+ stat(g_filePath.c_str(), &statbuf);
+ napi_value sum;
+ int64_t fileSize = statbuf.st_size;
+ napi_create_int64(env, fileSize, &sum);
+ return sum;
+}
+
+static int32_t AudioCapturerOnReadData(OH_AudioCapturer *capturer, void *userData, void *buffer, int32_t bufferLen)
+{
+ size_t count = 1;
+ if (fwrite(buffer, bufferLen, count, g_file) != count) {
+ printf("buffer fwrite err");
+ }
+ return 0;
+}
+
+static int32_t AudioRendererOnWriteData(OH_AudioRenderer *renderer, void *userData, void *buffer, int32_t bufferLen)
+{
+ size_t readCount = fread(buffer, bufferLen, 1, g_file);
+ if (!readCount) {
+ if (feof(g_file)) {
+ g_readEnd = true;
+ }
+ }
+ return 0;
+}
+
+static napi_value AudioCapturerLowLatencyInit(napi_env env, napi_callback_info info)
+{
+ if (audioCapturer) {
+ OH_AudioCapturer_Release(audioCapturer);
+ OH_AudioStreamBuilder_Destroy(builder);
+ audioCapturer = nullptr;
+ builder = nullptr;
+ }
+ if (g_file) {
+ fclose(g_file);
+ g_file = nullptr;
+ }
+ g_file = fopen(g_filePath.c_str(), "wb");
+ // 1. create builder
+ OH_AudioStream_Type type = AUDIOSTREAM_TYPE_CAPTURER;
+ OH_AudioStreamBuilder_Create(&builder, type);
+ // 2. set params and callbacks
+ OH_AudioStreamBuilder_SetSamplingRate(builder, g_samplingRate);
+ OH_AudioStreamBuilder_SetChannelCount(builder, g_channelCount);
+ OH_AudioStreamBuilder_SetLatencyMode(builder, AUDIOSTREAM_LATENCY_MODE_FAST);
+ OH_AudioCapturer_Callbacks callbacks;
+ callbacks.OH_AudioCapturer_OnReadData = AudioCapturerOnReadData;
+ OH_AudioStreamBuilder_SetCapturerCallback(builder, callbacks, nullptr);
+ // 3. create OH_AudioCapturer
+ OH_AudioStreamBuilder_GenerateCapturer(builder, &audioCapturer);
+ return nullptr;
+}
+
+static napi_value AudioCapturerInit(napi_env env, napi_callback_info info)
+{
+ if (audioCapturer) {
+ OH_AudioCapturer_Release(audioCapturer);
+ OH_AudioStreamBuilder_Destroy(builder);
+ audioCapturer = nullptr;
+ builder = nullptr;
+ }
+ if (g_file) {
+ fclose(g_file);
+ g_file = nullptr;
+ }
+ g_file = fopen(g_filePath.c_str(), "wb");
+ // 1. create builder
+ OH_AudioStream_Type type = AUDIOSTREAM_TYPE_CAPTURER;
+ OH_AudioStreamBuilder_Create(&builder, type);
+ // 2. set params and callbacks
+ OH_AudioStreamBuilder_SetSamplingRate(builder, g_samplingRate);
+ OH_AudioStreamBuilder_SetChannelCount(builder, g_channelCount);
+ OH_AudioStreamBuilder_SetLatencyMode(builder, AUDIOSTREAM_LATENCY_MODE_NORMAL);
+ OH_AudioCapturer_Callbacks callbacks;
+ callbacks.OH_AudioCapturer_OnReadData = AudioCapturerOnReadData;
+ OH_AudioStreamBuilder_SetCapturerCallback(builder, callbacks, nullptr);
+ // 3. create OH_AudioCapturer
+ OH_AudioStreamBuilder_GenerateCapturer(builder, &audioCapturer);
+ return nullptr;
+}
+
+static napi_value AudioCapturerStart(napi_env env, napi_callback_info info)
+{
+ // start
+ OH_AudioCapturer_Start(audioCapturer);
+ return nullptr;
+}
+
+static napi_value AudioCapturerPause(napi_env env, napi_callback_info info)
+{
+ OH_AudioCapturer_Pause(audioCapturer);
+ return nullptr;
+}
+
+static napi_value AudioCapturerStop(napi_env env, napi_callback_info info)
+{
+ OH_AudioCapturer_Stop(audioCapturer);
+ return nullptr;
+}
+
+static napi_value AudioCapturerRelease(napi_env env, napi_callback_info info)
+{
+ if (audioCapturer) {
+ OH_AudioCapturer_Release(audioCapturer);
+ OH_AudioStreamBuilder_Destroy(builder);
+ audioCapturer = nullptr;
+ builder = nullptr;
+ }
+ if (g_file) {
+ fclose(g_file);
+ g_file = nullptr;
+ }
+ return nullptr;
+}
+
+static napi_value CloseFile(napi_env env, napi_callback_info info)
+{
+ if (g_file) {
+ fclose(g_file);
+ g_file = nullptr;
+ }
+ return nullptr;
+}
+
+static napi_value AudioRendererLowLatencyInit(napi_env env, napi_callback_info info)
+{
+ if (audioRenderer) {
+ OH_AudioRenderer_Release(audioRenderer);
+ OH_AudioStreamBuilder_Destroy(rendererBuilder);
+ audioRenderer = nullptr;
+ rendererBuilder = nullptr;
+ }
+ if (g_file) {
+ fclose(g_file);
+ g_file = nullptr;
+ }
+ g_file = fopen(g_filePath.c_str(), "rb");
+ if (g_file == nullptr) {
+ return 0;
+ }
+ // create builder
+ OH_AudioStream_Type type = AUDIOSTREAM_TYPE_RENDERER;
+ OH_AudioStreamBuilder_Create(&rendererBuilder, type);
+ // set params and callbacks
+ OH_AudioStreamBuilder_SetSamplingRate(rendererBuilder, g_samplingRate);
+ OH_AudioStreamBuilder_SetChannelCount(rendererBuilder, g_channelCount);
+ OH_AudioStreamBuilder_SetLatencyMode(rendererBuilder, AUDIOSTREAM_LATENCY_MODE_FAST);
+ OH_AudioRenderer_Callbacks rendererCallbacks;
+ rendererCallbacks.OH_AudioRenderer_OnWriteData = AudioRendererOnWriteData;
+ OH_AudioStreamBuilder_SetRendererCallback(rendererBuilder, rendererCallbacks, nullptr);
+ // create OH_AudioRenderer
+ OH_AudioStreamBuilder_GenerateRenderer(rendererBuilder, &audioRenderer);
+ g_readEnd = false;
+ g_rendererLowLatency = true;
+ return nullptr;
+}
+
+static napi_value AudioRendererInit(napi_env env, napi_callback_info info)
+{
+ if (audioRenderer) {
+ OH_AudioRenderer_Release(audioRenderer);
+ OH_AudioStreamBuilder_Destroy(rendererBuilder);
+ audioRenderer = nullptr;
+ rendererBuilder = nullptr;
+ }
+ if (g_file) {
+ fclose(g_file);
+ g_file = nullptr;
+ }
+ g_file = fopen(g_filePath.c_str(), "rb");
+ if (g_file == nullptr) {
+ return 0;
+ }
+ // create builder
+ OH_AudioStream_Type type = AUDIOSTREAM_TYPE_RENDERER;
+ OH_AudioStreamBuilder_Create(&rendererBuilder, type);
+ // set params and callbacks
+ OH_AudioStreamBuilder_SetSamplingRate(rendererBuilder, g_samplingRate);
+ OH_AudioStreamBuilder_SetChannelCount(rendererBuilder, g_channelCount);
+ OH_AudioStreamBuilder_SetLatencyMode(rendererBuilder, AUDIOSTREAM_LATENCY_MODE_NORMAL);
+ OH_AudioRenderer_Callbacks rendererCallbacks;
+ rendererCallbacks.OH_AudioRenderer_OnWriteData = AudioRendererOnWriteData;
+ OH_AudioStreamBuilder_SetRendererCallback(rendererBuilder, rendererCallbacks, nullptr);
+ // create OH_AudioRenderer
+ OH_AudioStreamBuilder_GenerateRenderer(rendererBuilder, &audioRenderer);
+ g_readEnd = false;
+ g_rendererLowLatency = false;
+ return nullptr;
+}
+
+
+static napi_value AudioRendererStart(napi_env env, napi_callback_info info)
+{
+ g_readEnd = false;
+ // start
+ OH_AudioRenderer_Start(audioRenderer);
+ return nullptr;
+}
+
+static napi_value AudioRendererPause(napi_env env, napi_callback_info info)
+{
+ g_readEnd = false;
+ OH_AudioRenderer_Pause(audioRenderer);
+ return nullptr;
+}
+
+static napi_value AudioRendererStop(napi_env env, napi_callback_info info)
+{
+ g_readEnd = false;
+ OH_AudioRenderer_Stop(audioRenderer);
+ return nullptr;
+}
+
+static napi_value AudioRendererRelease(napi_env env, napi_callback_info info)
+{
+ if (audioRenderer) {
+ OH_AudioRenderer_Release(audioRenderer);
+ OH_AudioStreamBuilder_Destroy(rendererBuilder);
+ audioRenderer = nullptr;
+ rendererBuilder = nullptr;
+ }
+ if (g_file) {
+ fclose(g_file);
+ g_file = nullptr;
+ }
+ return nullptr;
+}
+
+static int32_t AvpAudioRendererOnWriteData(OH_AudioRenderer *renderer, void *userData, void *buffer, int32_t bufferLen)
+{
+ if (!normalPCM->is_open()) {
+ return 0;
+ }
+ normalPCM->read(static_cast(buffer), bufferLen);
+ if (normalPCM->eof()) {
+ normalPCM->clear();
+ normalPCM->seekg(0, std::ios::beg);
+ }
+ return 0;
+}
+
+static napi_value AvpAudioRendererInit(napi_env env, napi_callback_info info)
+{
+ if (audioRendererNormal) {
+ OH_AudioRenderer_Release(audioRendererNormal);
+ OH_AudioStreamBuilder_Destroy(rendererBuilder);
+ audioRendererNormal = nullptr;
+ rendererBuilder = nullptr;
+ }
+
+ normalPCM = std::make_unique(g_filePath_avp, std::ios::binary);
+ // create builder
+ OH_AudioStreamBuilder_Create(&rendererBuilder, AUDIOSTREAM_TYPE_RENDERER);
+ // set params and callbacks
+ OH_AudioStreamBuilder_SetSamplingRate(rendererBuilder, g_avpsamplingRate);
+ OH_AudioStreamBuilder_SetChannelCount(rendererBuilder, g_avpchannelCount);
+ OH_AudioStreamBuilder_SetSampleFormat(rendererBuilder, AUDIOSTREAM_SAMPLE_S16LE);
+ OH_AudioStreamBuilder_SetEncodingType(rendererBuilder, AUDIOSTREAM_ENCODING_TYPE_RAW);
+ OH_AudioStreamBuilder_SetRendererInfo(rendererBuilder, AUDIOSTREAM_USAGE_MOVIE);
+
+ OH_AudioRenderer_Callbacks rendererCallbacks;
+ rendererCallbacks.OH_AudioRenderer_OnWriteData = AvpAudioRendererOnWriteData;
+ rendererCallbacks.OH_AudioRenderer_OnStreamEvent = nullptr;
+ rendererCallbacks.OH_AudioRenderer_OnInterruptEvent = nullptr;
+ rendererCallbacks.OH_AudioRenderer_OnError = nullptr;
+ OH_AudioStreamBuilder_SetRendererCallback(rendererBuilder, rendererCallbacks, nullptr);
+ // create OH_AudioRenderer
+ OH_AudioStreamBuilder_GenerateRenderer(rendererBuilder, &audioRendererNormal);
+ OH_AudioStreamBuilder_Destroy(rendererBuilder);
+ rendererBuilder = nullptr;
+ return nullptr;
+}
+
+static napi_value AvpAudioRendererStart(napi_env env, napi_callback_info info)
+{
+ // start
+ if (audioRendererNormal == nullptr) {
+ OH_LOG_Print(LOG_APP, LOG_INFO, GLOBAL_RESMGR, TAG, "audioRendererNormal is nullptr");
+ }
+ OH_AudioRenderer_Start(audioRendererNormal);
+ return nullptr;
+}
+
+static napi_value AvpAudioRendererPause(napi_env env, napi_callback_info info)
+{
+ OH_AudioRenderer_Pause(audioRendererNormal);
+ return nullptr;
+}
+
+static napi_value AvpAudioRendererStop(napi_env env, napi_callback_info info)
+{
+ OH_AudioRenderer_Stop(audioRendererNormal);
+ return nullptr;
+}
+
+static napi_value AvpAudioRendererRelease(napi_env env, napi_callback_info info)
+{
+ if (audioRendererNormal) {
+ OH_AudioRenderer_Release(audioRendererNormal);
+ audioRendererNormal = nullptr;
+ }
+ return nullptr;
+}
+
+static napi_value AvpGetRendererState(napi_env env, napi_callback_info info)
+{
+ OH_AudioStreamBuilder *builder;
+ OH_AudioStreamBuilder_Create(&builder, AUDIOSTREAM_TYPE_RENDERER);
+ OH_AudioStream_State state;
+ OH_AudioRenderer_GetCurrentState(audioRendererNormal, &state);
+ napi_value sum;
+ napi_create_int32(env, state, &sum);
+ return sum;
+}
+
+static int32_t AvpVividAudioRendererOnWriteData(OH_AudioRenderer *renderer, void *userData, void *audioData,
+ int32_t audioDataSize, void *metaData, int32_t metaDataSize)
+{
+ if (!vividPCM->is_open() || !metaDataFile->is_open()) {
+ return 0;
+ }
+ vividPCM->read(static_cast(audioData), audioDataSize);
+ metaDataFile->read(static_cast(metaData), metaDataSize);
+ if (vividPCM->eof()) {
+ vividPCM->clear();
+ vividPCM->seekg(0, std::ios::beg);
+ }
+ if (metaDataFile->eof()) {
+ metaDataFile->clear();
+ metaDataFile->seekg(0, std::ios::beg);
+ }
+ return 0;
+}
+
+static napi_value AvpVividAudioRendererInit(napi_env env, napi_callback_info info)
+{
+ if (audioRendererVivid) {
+ OH_AudioRenderer_Release(audioRendererVivid);
+ OH_AudioStreamBuilder_Destroy(rendererBuilder);
+ audioRendererVivid = nullptr;
+ rendererBuilder = nullptr;
+ }
+ vividPCM = std::make_unique(g_filePath_avp_vivid, std::ios::binary);
+ metaDataFile = std::make_unique(g_filePath_avp_metadata, std::ios::binary);
+ // create builder
+ OH_AudioStreamBuilder_Create(&rendererBuilder, AUDIOSTREAM_TYPE_RENDERER);
+ // set params and callbacks
+ OH_AudioStreamBuilder_SetSamplingRate(rendererBuilder, g_avpsamplingRate);
+ OH_AudioStreamBuilder_SetChannelCount(rendererBuilder, g_avpvividchannelCount);
+ OH_AudioStreamBuilder_SetEncodingType(rendererBuilder, AUDIOSTREAM_ENCODING_TYPE_AUDIOVIVID);
+ OH_AudioStreamBuilder_SetRendererInfo(rendererBuilder, AUDIOSTREAM_USAGE_MOVIE);
+ OH_AudioRenderer_Callbacks rendererCallbacks;
+ rendererCallbacks.OH_AudioRenderer_OnWriteData = nullptr;
+ rendererCallbacks.OH_AudioRenderer_OnStreamEvent = nullptr;
+ rendererCallbacks.OH_AudioRenderer_OnInterruptEvent = nullptr;
+ rendererCallbacks.OH_AudioRenderer_OnError = nullptr;
+ OH_AudioStreamBuilder_SetRendererCallback(rendererBuilder, rendererCallbacks, nullptr);
+ OH_AudioRenderer_WriteDataWithMetadataCallback metadataCallback = AvpVividAudioRendererOnWriteData;
+ OH_AudioStreamBuilder_SetWriteDataWithMetadataCallback(rendererBuilder, metadataCallback, nullptr);
+ // create OH_AudioRenderer
+ OH_AudioStreamBuilder_GenerateRenderer(rendererBuilder, &audioRendererVivid);
+ OH_AudioStreamBuilder_Destroy(rendererBuilder);
+ rendererBuilder = nullptr;
+ return nullptr;
+}
+
+static napi_value AvpVividAudioRendererStart(napi_env env, napi_callback_info info)
+{
+ // start
+ if (audioRendererVivid == nullptr) {
+ OH_LOG_Print(LOG_APP, LOG_INFO, GLOBAL_RESMGR, TAG, "audioRendererNormal is nullptr");
+ }
+ OH_AudioRenderer_Start(audioRendererVivid);
+ return nullptr;
+}
+
+static napi_value AvpVividAudioRendererPause(napi_env env, napi_callback_info info)
+{
+ OH_AudioRenderer_Pause(audioRendererVivid);
+ return nullptr;
+}
+
+static napi_value AvpVividAudioRendererStop(napi_env env, napi_callback_info info)
+{
+ OH_AudioRenderer_Stop(audioRendererVivid);
+ return nullptr;
+}
+
+static napi_value AvpVividAudioRendererRelease(napi_env env, napi_callback_info info)
+{
+ if (audioRendererVivid) {
+ OH_AudioRenderer_Release(audioRendererVivid);
+ audioRendererVivid = nullptr;
+ }
+ return nullptr;
+}
+
+static napi_value AvpVividGetRendererState(napi_env env, napi_callback_info info)
+{
+ OH_AudioStreamBuilder *builder;
+ OH_AudioStreamBuilder_Create(&builder, AUDIOSTREAM_TYPE_RENDERER);
+ OH_AudioStream_State state;
+ OH_AudioRenderer_GetCurrentState(audioRendererVivid, &state);
+ napi_value sum;
+ napi_create_int32(env, state, &sum);
+ return sum;
+}
+
+EXTERN_C_START static napi_value Init(napi_env env, napi_value exports)
+{
+ napi_property_descriptor desc[] = {
+ {"closeFile", nullptr, CloseFile, nullptr, nullptr, nullptr, napi_default, nullptr},
+ {"audioCapturerLowLatencyInit", nullptr, AudioCapturerLowLatencyInit, nullptr, nullptr, nullptr, napi_default,
+ nullptr},
+ {"audioCapturerInit", nullptr, AudioCapturerInit, nullptr, nullptr, nullptr, napi_default, nullptr},
+ {"audioCapturerStart", nullptr, AudioCapturerStart, nullptr, nullptr, nullptr, napi_default, nullptr},
+ {"audioCapturerPause", nullptr, AudioCapturerPause, nullptr, nullptr, nullptr, napi_default, nullptr},
+ {"audioCapturerRelease", nullptr, AudioCapturerRelease, nullptr, nullptr, nullptr, napi_default, nullptr},
+ {"audioCapturerStop", nullptr, AudioCapturerStop, nullptr, nullptr, nullptr, napi_default, nullptr},
+ {"audioRendererLowLatencyInit", nullptr, AudioRendererLowLatencyInit, nullptr, nullptr, nullptr, napi_default,
+ nullptr},
+ {"audioRendererInit", nullptr, AudioRendererInit, nullptr, nullptr, nullptr, napi_default, nullptr},
+ {"audioRendererStart", nullptr, AudioRendererStart, nullptr, nullptr, nullptr, napi_default, nullptr},
+ {"audioRendererPause", nullptr, AudioRendererPause, nullptr, nullptr, nullptr, napi_default, nullptr},
+ {"audioRendererRelease", nullptr, AudioRendererRelease, nullptr, nullptr, nullptr, napi_default, nullptr},
+ {"getRendererState", nullptr, GetRendererState, nullptr, nullptr, nullptr, napi_default, nullptr},
+ {"getCapturerState", nullptr, GetCapturerState, nullptr, nullptr, nullptr, napi_default, nullptr},
+ {"getFileSize", nullptr, GetFileSize, nullptr, nullptr, nullptr, napi_default, nullptr},
+ {"getFramesWritten", nullptr, GetFramesWritten, nullptr, nullptr, nullptr, napi_default, nullptr},
+ {"getFileState", nullptr, GetFileState, nullptr, nullptr, nullptr, napi_default, nullptr},
+ {"getFastState", nullptr, GetFastState, nullptr, nullptr, nullptr, napi_default, nullptr},
+ {"audioRendererStop", nullptr, AudioRendererStop, nullptr, nullptr, nullptr, napi_default, nullptr},
+
+ {"avpAudioRendererInit", nullptr, AvpAudioRendererInit, nullptr, nullptr, nullptr, napi_default, nullptr},
+ {"avpAudioRendererStart", nullptr, AvpAudioRendererStart, nullptr, nullptr, nullptr, napi_default, nullptr},
+ {"avpAudioRendererPause", nullptr, AvpAudioRendererPause, nullptr, nullptr, nullptr, napi_default, nullptr},
+ {"avpAudioRendererStop", nullptr, AvpAudioRendererStop, nullptr, nullptr, nullptr, napi_default, nullptr},
+ {"avpAudioRendererRelease", nullptr, AvpAudioRendererRelease, nullptr, nullptr, nullptr, napi_default,
+ nullptr},
+ {"avpGetRendererState", nullptr, AvpGetRendererState, nullptr, nullptr, nullptr, napi_default, nullptr},
+ {"avpVividAudioRendererInit", nullptr, AvpVividAudioRendererInit, nullptr, nullptr, nullptr, napi_default,
+ nullptr},
+ {"avpVividAudioRendererStart", nullptr, AvpVividAudioRendererStart, nullptr, nullptr, nullptr, napi_default,
+ nullptr},
+ {"avpVividAudioRendererPause", nullptr, AvpVividAudioRendererPause, nullptr, nullptr, nullptr, napi_default,
+ nullptr},
+ {"avpVividAudioRendererStop", nullptr, AvpVividAudioRendererStop, nullptr, nullptr, nullptr, napi_default,
+ nullptr},
+ {"avpVividAudioRendererRelease", nullptr, AvpVividAudioRendererRelease, nullptr, nullptr, nullptr,
+ napi_default, nullptr},
+ {"avpVividGetRendererState", nullptr, AvpVividGetRendererState, nullptr, nullptr, nullptr, napi_default,
+ nullptr}};
+ napi_define_properties(env, exports, sizeof(desc) / sizeof(desc[0]), desc);
+ return exports;
+}
+EXTERN_C_END
+
+static napi_module demoModule = {
+ .nm_version = 1,
+ .nm_flags = 0,
+ .nm_filename = nullptr,
+ .nm_register_func = Init,
+ .nm_modname = "entry",
+ .nm_priv = ((void *)0),
+ .reserved = {0},
+};
+
+extern "C" __attribute__((constructor)) void RegisterEntryModule(void)
+{
+ napi_module_register(&demoModule);
+}
\ No newline at end of file
diff --git a/code/DocsSample/Media/Audio/OHAudio/entry/src/main/cpp/types/libentry/index.d.ts b/code/DocsSample/Media/Audio/OHAudio/entry/src/main/cpp/types/libentry/index.d.ts
new file mode 100644
index 000000000..3c75b22df
--- /dev/null
+++ b/code/DocsSample/Media/Audio/OHAudio/entry/src/main/cpp/types/libentry/index.d.ts
@@ -0,0 +1,47 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+export const audioCapturerInit: () => void;
+export const audioCapturerLowLatencyInit: () => void;
+export const audioCapturerStart: () => void;
+export const audioCapturerPause: () => void;
+export const audioCapturerStop: () => void;
+export const audioCapturerRelease: () => void;
+export const audioRendererInit: () => void;
+export const audioRendererLowLatencyInit: () => void;
+export const audioRendererStart: () => void;
+export const audioRendererPause: () => void;
+export const audioRendererStop: () => void;
+export const audioRendererRelease: () => void;
+export const getRendererState: () => number;
+export const getCapturerState: () => number;
+export const getFileState: () => number;
+export const getFastState: () => number;
+export const getFramesWritten: () => number;
+export const getFileSize: () => number;
+export const closeFile: () => number;
+
+export const avpAudioRendererInit: () => void;
+export const avpAudioRendererStart: () => void;
+export const avpAudioRendererPause: () => void;
+export const avpAudioRendererStop: () => void;
+export const avpAudioRendererRelease: () => void;
+export const avpGetRendererState: () => number;
+export const avpVividAudioRendererInit: () => void;
+export const avpVividAudioRendererStart: () => void;
+export const avpVividAudioRendererPause: () => void;
+export const avpVividAudioRendererStop: () => void;
+export const avpVividAudioRendererRelease: () => void;
+export const avpVividGetRendererState: () => number;
\ No newline at end of file
diff --git a/code/SystemFeature/InsightIntent/IntentDriver/hvigor/hvigor-config.json5 b/code/DocsSample/Media/Audio/OHAudio/entry/src/main/cpp/types/libentry/oh-package.json5
similarity index 82%
rename from code/SystemFeature/InsightIntent/IntentDriver/hvigor/hvigor-config.json5
rename to code/DocsSample/Media/Audio/OHAudio/entry/src/main/cpp/types/libentry/oh-package.json5
index ccf59dfb2..1033ac153 100644
--- a/code/SystemFeature/InsightIntent/IntentDriver/hvigor/hvigor-config.json5
+++ b/code/DocsSample/Media/Audio/OHAudio/entry/src/main/cpp/types/libentry/oh-package.json5
@@ -1,21 +1,21 @@
-/*
- * Copyright (c) 2023 Huawei Device Co., Ltd.
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-{
- "hvigorVersion": "2.4.2",
- "dependencies": {
- "@ohos/hvigor-ohos-plugin": "2.4.2"
- }
-}
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+{
+ "name": "libentry.so",
+ "types": "./index.d.ts",
+ "version": "",
+ "description": "Please describe the basic information."
+}
\ No newline at end of file
diff --git a/code/BasicFeature/InsightIntent/IntentExecutor/entry/src/main/ets/entryability/EntryAbility.ets b/code/DocsSample/Media/Audio/OHAudio/entry/src/main/ets/entryability/EntryAbility.ts
similarity index 50%
rename from code/BasicFeature/InsightIntent/IntentExecutor/entry/src/main/ets/entryability/EntryAbility.ets
rename to code/DocsSample/Media/Audio/OHAudio/entry/src/main/ets/entryability/EntryAbility.ts
index 028f414df..84f3a6ef8 100644
--- a/code/BasicFeature/InsightIntent/IntentExecutor/entry/src/main/ets/entryability/EntryAbility.ets
+++ b/code/DocsSample/Media/Audio/OHAudio/entry/src/main/ets/entryability/EntryAbility.ts
@@ -1,61 +1,67 @@
-/*
- * Copyright (c) 2023 Huawei Device Co., Ltd.
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-import AbilityConstant from '@ohos.app.ability.AbilityConstant';
-import Base from '@ohos.base';
-import UIAbility from '@ohos.app.ability.UIAbility';
-import Want from '@ohos.app.ability.Want';
-import window from '@ohos.window';
-import { logger } from '../util/Logger';
-import PlayMusicIntentExecutorImpl from '../intents/PlayMusicIntentExecutorImpl';
-
-const TAG: string = '[EntryAbility]';
-
-export default class EntryAbility extends UIAbility {
- onCreate(want: Want, launchParam: AbilityConstant.LaunchParam) {
- logger.info(TAG, `Ability onCreate want: ${JSON.stringify(want)}, launchParam: ${JSON.stringify(launchParam)}`);
- PlayMusicIntentExecutorImpl.length;
- }
-
- onDestroy() {
- logger.info(TAG, 'Ability onDestroy');
- }
-
- onWindowStageCreate(windowStage: window.WindowStage) {
- // Main window is created, set main page for this ability
- logger.info(TAG, 'Ability onWindowStageCreate');
- windowStage.loadContent('pages/Index', (err: Base.BusinessError) => {
- if (err.code) {
- logger.info(TAG, 'Failed to load the content. Cause: %{public}s', JSON.stringify(err) ?? '');
- return;
- }
- });
- }
-
- onWindowStageDestroy() {
- // Main window is destroyed, release UI related resources
- logger.info(TAG, 'Ability onWindowStageDestroy');
- }
-
- onForeground() {
- // Ability has brought to foreground
- logger.info(TAG, 'Ability onForeground');
- }
-
- onBackground() {
- // Ability has back to background
- logger.info(TAG, 'Ability onBackground');
- }
-}
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import AbilityConstant from '@ohos.app.ability.AbilityConstant';
+import hilog from '@ohos.hilog';
+import UIAbility from '@ohos.app.ability.UIAbility';
+import Want from '@ohos.app.ability.Want';
+import window from '@ohos.window';
+import abilityAccessCtrl from '@ohos.abilityAccessCtrl';
+import { BusinessError } from '@ohos.base';
+
+export default class EntryAbility extends UIAbility {
+ onCreate(want: Want, launchParam: AbilityConstant.LaunchParam) {
+ hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onCreate');
+ }
+
+ onDestroy() {
+ hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onDestroy');
+ }
+
+ onWindowStageCreate(windowStage: window.WindowStage) {
+ // Main window is created, set main page for this ability
+ hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onWindowStageCreate');
+ let atManager = abilityAccessCtrl.createAtManager();
+ atManager.requestPermissionsFromUser(this.context, ['ohos.permission.MICROPHONE']).then((data) => {
+ console.info('data:' + JSON.stringify(data));
+ console.info('data permissions:' + data.permissions);
+ console.info('data authResults:' + data.authResults);
+ }).catch((err:BusinessError) => {
+ console.info('data:' + JSON.stringify(err));
+ });
+ windowStage.loadContent('pages/Index', (err, data) => {
+ if (err.code) {
+ hilog.error(0x0000, 'testTag', 'Failed to load the content. Cause: %{public}s', JSON.stringify(err) ?? '');
+ return;
+ }
+ hilog.info(0x0000, 'testTag', 'Succeeded in loading the content. Data: %{public}s', JSON.stringify(data) ?? '');
+ });
+ }
+
+ onWindowStageDestroy() {
+ // Main window is destroyed, release UI related resources
+ hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onWindowStageDestroy');
+ }
+
+ onForeground() {
+ // Ability has brought to foreground
+ hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onForeground');
+ }
+
+ onBackground() {
+ // Ability has back to background
+ hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onBackground');
+ }
+};
diff --git a/code/DocsSample/Media/Audio/OHAudio/entry/src/main/ets/pages/AudioRecording.ets b/code/DocsSample/Media/Audio/OHAudio/entry/src/main/ets/pages/AudioRecording.ets
new file mode 100644
index 000000000..ee08dd1b7
--- /dev/null
+++ b/code/DocsSample/Media/Audio/OHAudio/entry/src/main/ets/pages/AudioRecording.ets
@@ -0,0 +1,520 @@
+/*
+* Copyright (C) 2023 Huawei Device Co., Ltd.
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+import audio from '@ohos.multimedia.audio';
+import router from '@ohos.router';
+import { BusinessError } from '@ohos.base';
+import testNapi from 'libentry.so';
+import abilityAccessCtrl from '@ohos.abilityAccessCtrl';
+import common from '@ohos.app.ability.common';
+import deviceInfo from '@ohos.deviceInfo';
+
+const MIN_RECORD_SECOND = 5;
+const TOTAL_SECOND = 30;
+const INTERVAL_TIME = 1000;
+
+let context = getContext(this) as common.UIAbilityContext;
+let atManager = abilityAccessCtrl.createAtManager();
+
+@Entry
+@Component
+struct AudioRecording {
+ private audioCapturerLowLatency: boolean = false;
+ private audioRendererLowLatency: boolean = false;
+ private audioCapturer: boolean = false;
+ @State recordState: string = 'init'; // [init,started,continued,paused,stoped]
+ @State title: string = 'oh_test_audio';
+ @State date: string = '';
+ @State playSec: number = 0;
+ @State renderState: number = 0;
+ @State recordSec: number = 0;
+ @State showTime: string = '00:00:00';
+ private interval: number = 0;
+ @State isRecordOver: boolean = false;
+
+ aboutToAppear() {
+ console.log('AudioRecording aboutToAppear');
+ this.initResource();
+ }
+
+ initResource() {
+ try {
+ this.recordState = 'init';
+ this.date = this.getDate(1);
+ } catch (err) {
+ let error = err as BusinessError;
+ console.error(`AudioRecording:createAudioCapturer err=${JSON.stringify(error)}`);
+ }
+ }
+
+ releseResource() {
+ if (this.interval) {
+ clearInterval(this.interval)
+ }
+ testNapi.audioCapturerRelease();
+ this.recordState = 'init';
+ testNapi.audioRendererRelease();
+ }
+
+ aboutToDisappear() {
+ this.releseResource();
+ }
+
+ capturerStart() {
+ try {
+ testNapi.audioCapturerStart();
+ this.recordSec = 0;
+ this.recordState = 'started';
+ clearInterval(this.interval);
+ this.interval = setInterval(async () => {
+ if (this.recordSec >= TOTAL_SECOND) {
+ clearInterval(this.interval);
+ this.capturerStop();
+ return;
+ }
+ this.recordSec++;
+ this.showTime = this.getTimesBySecond(this.recordSec);
+ }, INTERVAL_TIME);
+ } catch (err) {
+ let error = err as BusinessError;
+ console.error(`AudioRecording:audioCapturer start err=${JSON.stringify(error)}`);
+ }
+ }
+
+ renderCreate() {
+ try {
+ testNapi.audioRendererInit();
+ this.renderState = testNapi.getRendererState();
+ } catch (err) {
+ let error = err as BusinessError;
+ console.error(`createAudioRenderer err=${JSON.stringify(error)}`);
+ }
+ }
+
+ renderStart() {
+ try {
+ testNapi.audioRendererStart();
+ this.renderState = testNapi.getRendererState();
+ if (this.playSec === this.recordSec) {
+ this.playSec = 0;
+ }
+ this.interval = setInterval(async () => {
+ let playNumber = Math.round(testNapi.getFramesWritten() * 4 / testNapi.getFileSize() * this.recordSec);
+ this.playSec = (playNumber < 0 || this.playSec === this.recordSec) ? this.recordSec : playNumber;
+ if (testNapi.getFileState()) {
+ testNapi.audioRendererStop();
+ testNapi.audioRendererRelease();
+ if (testNapi.getFastState()) {
+ testNapi.audioRendererLowLatencyInit();
+ } else {
+ testNapi.audioRendererInit();
+ }
+ clearInterval(this.interval);
+ this.renderState = testNapi.getRendererState();
+ return;
+ }
+ }, 50);
+ } catch (err) {
+ let error = err as BusinessError;
+ console.error(`write err:${JSON.stringify(error)}`);
+ }
+ }
+
+ renderPause() {
+ try {
+ testNapi.audioRendererPause();
+ this.renderState = testNapi.getRendererState();
+ clearInterval(this.interval);
+ } catch (err) {
+ let error = err as BusinessError;
+ console.error(`pause err:${JSON.stringify(error)}`);
+ }
+ }
+
+ capturerContinue() {
+ try {
+ testNapi.audioCapturerStart();
+ this.recordState = 'continued';
+ console.log('audioCapturer start ok');
+ this.interval = setInterval(async () => {
+ if (this.recordSec >= TOTAL_SECOND) {
+ clearInterval(this.interval);
+ this.capturerStop();
+ return;
+ }
+ this.recordSec++;
+ this.showTime = this.getTimesBySecond(this.recordSec);
+ }, INTERVAL_TIME);
+ } catch (err) {
+ let error = err as BusinessError;
+ console.error(`AudioRecording:audioCapturer start err=${JSON.stringify(error)}`);
+ }
+ }
+
+ capturerStop() {
+ if (this.recordSec < MIN_RECORD_SECOND) {
+ return;
+ }
+ try {
+ testNapi.audioCapturerStop();
+ testNapi.audioCapturerRelease();
+ this.recordState = 'stopped';
+ clearInterval(this.interval);
+ } catch (err) {
+ let error = err as BusinessError;
+ this.recordState = 'stopped';
+ console.error(`AudioRecording:audioCapturer stop err=${JSON.stringify(error)}`);
+ }
+ this.isRecordOver = true;
+ this.renderCreate();
+ }
+
+ capturerPause() {
+ try {
+ testNapi.audioCapturerPause();
+ this.recordState = 'paused';
+ clearInterval(this.interval);
+ } catch (err) {
+ let error = err as BusinessError;
+ console.error(`AudioRecording:audioCapturer stop err=${JSON.stringify(error)}`);
+ return;
+ }
+ }
+
+ formatNumber(num: number) {
+ if (num <= 9) {
+ return '0' + num;
+ } else {
+ return '' + num;
+ }
+ }
+
+ getDate(mode: number) {
+ let date = new Date();
+ if (mode === 1) {
+ return `${date.getFullYear()}/${this.formatNumber(date.getMonth() + 1)}/${this.formatNumber(date.getDate())}`;
+ } else {
+ return `${date.getFullYear()}${this.formatNumber(date.getMonth() + 1)}${this.formatNumber(date.getDate())}`;
+ }
+ }
+
+ getTimesBySecond(t: number) {
+ let h = Math.floor(t / 60 / 60 % 24);
+ let m = Math.floor(t / 60 % 60);
+ let s = Math.floor(t % 60);
+ let hs = h < 10 ? '0' + h : h;
+ let ms = m < 10 ? '0' + m : m;
+ let ss = s < 10 ? '0' + s : s;
+ return `${hs}:${ms}:${ss}`;
+ }
+
+ @Builder
+ InitRecord() {
+ Column() {
+ Image($r('app.media.ic_record')).width(56).height(56)
+ }
+ .width('100%')
+ .height(56)
+ .position({ y: 60 })
+ .id('start_record_btn')
+ .onClick(() => {
+ atManager.requestPermissionsFromUser(context, ['ohos.permission.MICROPHONE']).then((data) => {
+ console.info('data:' + JSON.stringify(data));
+ if (data.authResults[0] !== 0) {
+ return;
+ }
+ if (this.audioCapturerLowLatency) {
+ testNapi.audioCapturerLowLatencyInit();
+ }
+ if (this.audioCapturer || (!this.audioCapturerLowLatency && !this.audioCapturer)) {
+ testNapi.audioCapturerInit();
+ }
+ this.capturerStart();
+ }).catch((err: BusinessError) => {
+ console.error('data:' + JSON.stringify(err));
+ });
+ })
+ }
+
+ @Builder
+ StartedRecord() {
+ Column() {
+ Text(this.showTime).fontSize(21).fontWeight(500).margin({ bottom: 8 })
+ }.width('100%').height(66).position({ y: 30 }).id('show_time_txt')
+
+ Column() {
+ Image($r('app.media.ic_recording')).width(56).height(56)
+ }
+ .width('100%')
+ .height(56)
+ .position({ y: 60 })
+ .id('stop_record_btn')
+ .onClick(() => {
+ this.capturerStop()
+ })
+
+ Column() {
+ Image($r('app.media.ic_record_pause')).width(24).height(24)
+ Text($r('app.string.PAUSE')).fontSize(12).fontWeight(400).id('pause_record_btn').margin({ top: 2 })
+ }
+ .height(56)
+ .width(56)
+ .position({ x: '80%', y: 60 })
+ .alignItems(HorizontalAlign.Center)
+ .justifyContent(FlexAlign.Center)
+ .onClick(() => {
+ this.capturerPause()
+ })
+ }
+
+ @Builder
+ PausedRecord() {
+ Column() {
+ Text(this.showTime).fontSize(21).fontWeight(500).margin({ bottom: 8 })
+ }.width('100%').height(66).position({ y: 30 })
+
+ Column() {
+ Image($r('app.media.ic_recording')).width(56).height(56)
+ }.width('100%').height(56).position({ y: 60 })
+ .onClick(() => {
+ this.capturerStop()
+ })
+
+ Column() {
+ Image($r('app.media.ic_record_continue')).width(24).height(24)
+ Text($r('app.string.CONTINUE')).fontSize(12).fontWeight(400).margin({ top: 2 })
+ }
+ .height(56)
+ .width(56)
+ .position({ x: '80%', y: 60 })
+ .alignItems(HorizontalAlign.Center)
+ .justifyContent(FlexAlign.Center)
+ .id('continue_record_btn')
+ .onClick(() => {
+ this.capturerContinue()
+ })
+ }
+
+ @Builder
+ FinishedRecord() {
+ Column() {
+ Image($r('app.media.ic_record')).width(56).height(56)
+ }
+ .width('100%')
+ .height(56)
+ .position({ y: 60 })
+ .opacity(0.4)
+ .id('disalbe_btn')
+ }
+
+ build() {
+ Column() {
+ Column() {
+ Navigation() {
+ }
+ .width('100%')
+ .height('100%')
+ .hideBackButton(false)
+ .titleMode(NavigationTitleMode.Mini)
+ .title($r('app.string.AUDIO_CAPTURER'))
+ .mode(NavigationMode.Stack)
+ .backgroundColor('#F1F3F5')
+ }
+ .id('capturer_back_btn')
+ .width('100%')
+ .height(56)
+ .onClick(async () => {
+ await router.replaceUrl({ url: 'pages/Index' });
+ })
+
+ Column() {
+ Row() {
+ if (this.isRecordOver === true) {
+ Text($r('app.string.LOW_LATENCY_CAPTURER'))
+ .fontSize(16)
+ .fontWeight(500)
+ .fontColor('#182431')
+ .fontFamily($r('sys.string.ohos_id_text_font_family_medium'))
+ .opacity(0.4)
+ } else {
+ Text($r('app.string.LOW_LATENCY_CAPTURER'))
+ .fontSize(16)
+ .fontWeight(500)
+ .fontColor('#182431')
+ .fontFamily($r('sys.string.ohos_id_text_font_family_medium'))
+ }
+ Toggle({ type: ToggleType.Switch, isOn: (this.audioCapturerLowLatency) })
+ .margin({ right: 0 })
+ .width(36)
+ .height(20)
+ .id('capturer_low_latency_btn')
+ .onChange((isOn: boolean) => {
+ if (isOn) {
+ this.audioCapturer = false;
+ this.audioCapturerLowLatency = true;
+ } else {
+ this.audioCapturer = true;
+ this.audioCapturerLowLatency = false;
+ }
+ })
+ .enabled(this.recordState === 'init' && deviceInfo.deviceType === 'phone')
+ }.width('100%').height(24).justifyContent(FlexAlign.SpaceBetween).margin({ top: 16 })
+ }
+ .width('100%')
+ .height(56)
+ .backgroundColor(Color.White)
+ .borderRadius(24)
+ .margin({ top: 12 })
+ .padding({ left: 12, right: 12 })
+
+ if (this.isRecordOver === true) {
+ Column() {
+ Row() {
+ Text($r('app.string.LOW_LATENCY_RENDERER'))
+ .fontSize(16)
+ .fontWeight(500)
+ .fontColor('#182431')
+ .fontFamily($r('sys.string.ohos_id_text_font_family_medium'))
+ Toggle({ type: ToggleType.Switch, isOn: (this.audioRendererLowLatency) })
+ .margin({ right: 0 })
+ .width(36)
+ .height(20)
+ .id('renderer_low_latency_btn')
+ .onChange((isOn: boolean) => {
+ if (isOn) {
+ testNapi.audioRendererLowLatencyInit();
+ this.audioRendererLowLatency = true;
+ } else {
+ testNapi.audioRendererInit();
+ this.audioRendererLowLatency = false;
+ }
+ })
+ .enabled(this.renderState === 1 && deviceInfo.deviceType === 'phone')
+ }
+ .width('100%').height(24).justifyContent(FlexAlign.SpaceBetween).margin({ top: 16 })
+ }
+ .width('100%')
+ .height(56)
+ .backgroundColor(Color.White)
+ .borderRadius(24)
+ .margin({ top: 12 })
+ .padding({ left: 12, right: 12 })
+
+ Column() {
+ Text($r('app.string.RECORD_RESULT')).fontSize(14).position({ x: 0 })
+ }
+ .height(19)
+ .width('100%')
+ .margin({ top: 19.5 })
+ .padding({ left: 12, right: 24 })
+
+
+ Column() {
+ Row() {
+ Text(this.title)
+ .fontSize(16)
+ .fontWeight(500)
+ .fontColor('#182431')
+ .fontFamily($r('sys.string.ohos_id_text_font_family_medium'))
+ if (this.renderState === audio.AudioState.STATE_RUNNING) {
+ Image($r('app.media.ic_record_playing')).width(24).height(24).id('playing_state')
+ } else {
+ Image($r('app.media.ic_record_paused')).width(24).height(24).id('paused_state')
+ }
+
+ }.width('100%').height(24).justifyContent(FlexAlign.SpaceBetween).margin({ top: 16 })
+
+ Row() {
+ Text(this.date)
+ .fontSize(16)
+ .fontWeight(400)
+ .fontColor('#182431')
+ .opacity(0.6)
+ .fontFamily($r('sys.string.ohos_id_text_font_family_medium'))
+ Text(this.getTimesBySecond(this.recordSec) + '')
+ .fontSize(16)
+ .fontWeight(400)
+ .fontColor('#182431')
+ .opacity(0.6)
+ .fontFamily($r('sys.string.ohos_id_text_font_family_medium'))
+ }.width('100%').height(24).justifyContent(FlexAlign.SpaceBetween).margin({ top: 4 })
+
+ Row() {
+ Progress({ value: this.playSec, total: this.recordSec, type: ProgressType.Linear })
+ .color('#007DFF')
+ .value(this.playSec)
+ .width('100%')
+ .height(4)
+ }.margin({ top: 23, bottom: 3 })
+
+ Row() {
+ Text(this.getTimesBySecond(this.playSec) + '')
+ .fontSize(12)
+ .fontFamily($r('sys.string.ohos_id_text_font_family_medium'))
+ .fontColor('#182431')
+ .opacity(0.6)
+ .fontWeight(400)
+ Text(this.getTimesBySecond(this.recordSec) + '')
+ .fontSize(12)
+ .fontFamily($r('sys.string.ohos_id_text_font_family_medium'))
+ .fontColor('#182431')
+ .opacity(0.6)
+ .fontWeight(400)
+ }.justifyContent(FlexAlign.SpaceBetween).width('100%')
+ }
+ .width('100%')
+ .height(126)
+ .backgroundColor(Color.White)
+ .borderRadius(24)
+ .margin({ top: 9.5 })
+ .padding({ left: 12, right: 12 })
+ .id('player_btn')
+ .onClick(() => {
+ if (this.renderState === audio.AudioState.STATE_PREPARED) {
+ this.renderStart();
+ } else if (this.renderState === audio.AudioState.STATE_RUNNING) {
+ this.renderPause();
+ } else if (this.renderState === audio.AudioState.STATE_PAUSED) {
+ this.renderStart();
+ } else if (this.renderState === audio.AudioState.STATE_STOPPED) {
+ this.renderStart();
+ }
+ })
+ }
+ Row() {
+ if (this.recordState === 'init') {
+ this.InitRecord();
+ } else if (this.recordState === 'started') {
+ this.StartedRecord();
+ } else if (this.recordState === 'paused') {
+ this.PausedRecord();
+ } else if (this.recordState === 'continued') {
+ this.StartedRecord();
+ } else if (this.recordState === 'stopped') {
+ this.FinishedRecord();
+ }
+ }
+ .width('100%')
+ .alignItems(VerticalAlign.Center)
+ .height(116)
+ .position({ y: '82%' })
+ }
+ .width('100%')
+ .height('100%')
+ .justifyContent(FlexAlign.Start)
+ .backgroundColor('#F1F3F5')
+ .padding({ left: 12, right: 12 })
+ }
+}
\ No newline at end of file
diff --git a/code/DocsSample/Media/Audio/OHAudio/entry/src/main/ets/pages/AudioVividPlayback.ets b/code/DocsSample/Media/Audio/OHAudio/entry/src/main/ets/pages/AudioVividPlayback.ets
new file mode 100644
index 000000000..e88e8e52a
--- /dev/null
+++ b/code/DocsSample/Media/Audio/OHAudio/entry/src/main/ets/pages/AudioVividPlayback.ets
@@ -0,0 +1,189 @@
+/*
+* Copyright (C) 2024 Huawei Device Co., Ltd.
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+import router from '@ohos.router';
+import testNapi from 'libentry.so';
+
+const STATE_PAUSED = 2;
+
+@Entry
+@Component
+struct AudioVividPlayback {
+ @State musicState1: boolean = false;
+ @State musicState2: boolean = false;
+
+ @Builder DIYTitle() {
+ Row() {
+ Text($r('app.string.AUDIOVIVID_PLAYBACK'))
+ .fontWeight(700)
+ .fontSize(20)
+ }
+ .height('100%')
+ .justifyContent(FlexAlign.Center)
+ }
+
+
+ @Builder Press2PlayDemo1() {
+ Image($r('app.media.ic_record_paused'))
+ .height(36)
+ .width(36)
+ .margin({ right: 16 })
+ .id('normal_play_btn')
+ .onClick(async () => {
+ testNapi.avpAudioRendererStart();
+ this.musicState1 = !this.musicState1;
+ })
+ }
+
+ @Builder Press2PauseDemo1() {
+ Image($r('app.media.ic_record_playing'))
+ .height(36)
+ .width(36)
+ .margin({ right: 16 })
+ .id('normal_pause_btn')
+ .onClick(async () => {
+ testNapi.avpAudioRendererPause();
+ this.musicState1 = !this.musicState1;
+ })
+ }
+
+ @Builder Press2PlayDemo2() {
+ Image($r('app.media.ic_record_paused'))
+ .height(36)
+ .width(36)
+ .margin({ right: 16 })
+ .id('vivid_play_btn')
+ .onClick(async () => {
+ testNapi.avpVividAudioRendererStart();
+ this.musicState2 = !this.musicState2;
+ })
+ }
+
+ @Builder Press2PauseDemo2() {
+ Image($r('app.media.ic_record_playing'))
+ .height(36)
+ .width(36)
+ .margin({ right: 16 })
+ .id('vivid_pause_btn')
+ .onClick(async () => {
+ testNapi.avpVividAudioRendererPause();
+ this.musicState2 = !this.musicState2;
+ })
+
+ }
+
+ aboutToAppear(): void {
+ testNapi.avpAudioRendererInit();
+ testNapi.avpVividAudioRendererInit();
+ }
+
+
+ aboutToDisappear(): void {
+ testNapi.avpAudioRendererStop();
+ testNapi.avpAudioRendererRelease();
+ testNapi.avpVividAudioRendererStop();
+ testNapi.avpVividAudioRendererRelease();
+ }
+
+ onPageHide(): void {
+ if (testNapi.avpGetRendererState() === STATE_PAUSED) {
+ testNapi.avpAudioRendererPause();
+ this.musicState1 = false;
+ }
+ if (testNapi.avpVividGetRendererState() === STATE_PAUSED) {
+ testNapi.avpVividAudioRendererPause();
+ this.musicState2 = false;
+ }
+ }
+
+ build() {
+ Column() {
+ Column() {
+ Row() {
+ Navigation() {
+ }
+ .hideBackButton(false)
+ .titleMode(NavigationTitleMode.Mini)
+ .title(this.DIYTitle())
+ .mode(NavigationMode.Stack)
+ }
+ .height(56)
+ .width(360)
+ .id('spatial_audio_back_btn')
+ .onClick(async () => {
+ testNapi.avpAudioRendererStop();
+ testNapi.avpAudioRendererRelease();
+ testNapi.avpVividAudioRendererStop();
+ testNapi.avpVividAudioRendererRelease();
+ await router.replaceUrl({ url: 'pages/Index' });
+ })
+
+ Row() {
+ Row() {
+ Text($r('app.string.NORMAL_PLAY'))
+ .fontSize(20)
+ .fontWeight(500)
+ .fontFamily($r('sys.string.ohos_id_text_font_family_medium'))
+ .margin({ top: 21, bottom: 21, left: 16.5 })
+ if (!this.musicState1) {
+ this.Press2PlayDemo1();
+ } else {
+ this.Press2PauseDemo1();
+ }
+ }
+ .height('100%')
+ .width(336)
+ .backgroundColor('#FFFFFF')
+ .justifyContent(FlexAlign.SpaceBetween)
+ .borderRadius(24)
+ }
+ .justifyContent(FlexAlign.SpaceAround)
+ .height(68)
+ .width('100%')
+ .margin({ top: 8 })
+
+ Row() {
+ Row() {
+ Text($r('app.string.VIVID_PLAY'))
+ .fontSize(20)
+ .fontWeight(500)
+ .fontFamily($r('sys.string.ohos_id_text_font_family_medium'))
+ .margin({ top: 21, bottom: 21, left: 16.5 })
+
+ if (!this.musicState2) {
+ this.Press2PlayDemo2();
+ } else {
+ this.Press2PauseDemo2();
+ }
+ }
+ .height('100%')
+ .width(336)
+ .backgroundColor('#FFFFFF')
+ .justifyContent(FlexAlign.SpaceBetween)
+ .borderRadius(24)
+ }
+ .justifyContent(FlexAlign.SpaceAround)
+ .height(68)
+ .width('100%')
+ .margin({ top: 12 })
+ }
+ .width('100%')
+ .height('100%')
+ .backgroundColor('#f1f3f5')
+ .justifyContent(FlexAlign.Start)
+
+ }
+ }
+}
\ No newline at end of file
diff --git a/code/DocsSample/Media/Audio/OHAudio/entry/src/main/ets/pages/Index.ets b/code/DocsSample/Media/Audio/OHAudio/entry/src/main/ets/pages/Index.ets
new file mode 100644
index 000000000..7cabaf9af
--- /dev/null
+++ b/code/DocsSample/Media/Audio/OHAudio/entry/src/main/ets/pages/Index.ets
@@ -0,0 +1,68 @@
+/*
+* Copyright (C) 2023-2024 Huawei Device Co., Ltd.
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+import router from '@ohos.router';
+@Entry
+@Component
+struct Index {
+ build() {
+ Column() {
+ Row() {
+ Row() {
+ Column() {
+ Image($r('app.media.pic01')).width(72).height(72).margin({ top: 36 })
+ Text($r('app.string.AUDIO_CAPTURER')).fontColor(Color.Black).fontSize(16).margin({ top: 12 })
+ .fontFamily($r('sys.string.ohos_id_text_font_family_medium'))
+ }
+ .id('record_play_card')
+ .backgroundColor(Color.White)
+ .width(162)
+ .height(188)
+ .borderRadius(24)
+ .margin({right: 6})
+ .onClick(async() => {
+ await router.pushUrl({ url:'pages/AudioRecording' })
+ })
+ }
+ .width('50%')
+ .justifyContent(FlexAlign.End)
+
+
+ Row() {
+ Column() {
+ Image($r('app.media.pic_Audiovivid')).width(72).height(72).margin({ top: 36 })
+ Text($r('app.string.AUDIOVIVID_PLAYBACK')).fontColor(Color.Black).fontSize(16).margin({ top: 12 })
+ .fontFamily($r('sys.string.ohos_id_text_font_family_medium'))
+ }
+ .backgroundColor(Color.White)
+ .width(162)
+ .height(188)
+ .borderRadius(24)
+ .margin({left: 6})
+ .id('audiovivid_page_card')
+ .onClick(async() => {
+ await router.pushUrl({ url:'pages/AudioVividPlayback' })
+ })
+ }
+ .width('50%')
+ .justifyContent(FlexAlign.Start)
+ }
+ .margin({ top: 32 })
+ .width('100%')
+ }
+ .height('100%').width('100%').backgroundColor('#F1F3F5')
+ }
+}
+
diff --git a/code/SystemFeature/InsightIntent/IntentDriver/entry/src/main/module.json5 b/code/DocsSample/Media/Audio/OHAudio/entry/src/main/module.json5
similarity index 59%
rename from code/SystemFeature/InsightIntent/IntentDriver/entry/src/main/module.json5
rename to code/DocsSample/Media/Audio/OHAudio/entry/src/main/module.json5
index 860090fab..368e0f43f 100644
--- a/code/SystemFeature/InsightIntent/IntentDriver/entry/src/main/module.json5
+++ b/code/DocsSample/Media/Audio/OHAudio/entry/src/main/module.json5
@@ -1,94 +1,64 @@
-/*
- * Copyright (c) 2023 Huawei Device Co., Ltd.
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-{
- "module": {
- "name": "entry",
- "type": "entry",
- "description": "$string:module_desc",
- "mainElement": "EntryAbility",
- "deviceTypes": [
- "default",
- "tablet"
- ],
- "deliveryWithInstall": true,
- "installationFree": false,
- "pages": "$profile:main_pages",
- "abilities": [
- {
- "name": "EntryAbility",
- "srcEntry": "./ets/entryability/EntryAbility.ets",
- "description": "$string:EntryAbility_desc",
- "icon": "$media:icon",
- "label": "$string:EntryAbility_label",
- "startWindowIcon": "$media:icon",
- "startWindowBackground": "$color:start_window_background",
- "exported": true,
- "skills": [
- {
- "entities": [
- "entity.system.home"
- ],
- "actions": [
- "action.system.home"
- ]
- }
- ]
- },
- ],
- "extensionAbilities": [
- {
- "name": "ServiceExtAbility",
- "srcEntry": "./ets/serviceextability/ServiceExtAbility.ets",
- "type": "service",
- "description": "$string:ServiceExtAbility_desc",
- "icon": "$media:icon",
- "label": "$string:ServiceExtAbility_label"
- }
- ],
- "requestPermissions": [
- {
- "name": "ohos.permission.EXECUTE_INSIGHT_INTENT",
- "usedScene": {
- "abilities": [
- "EntryAbility",
- "ServiceExtAbility"
- ],
- "when": "always"
- }
- },
- {
- "name": "ohos.permission.START_ABILITIES_FROM_BACKGROUND",
- "usedScene": {
- "abilities": [
- "EntryAbility",
- "ServiceExtAbility"
- ],
- "when": "always"
- }
- },
- {
- "name": "ohos.permission.CLEAN_BACKGROUND_PROCESSES",
- "usedScene": {
- "abilities": [
- "EntryAbility",
- "ServiceExtAbility"
- ],
- "when": "always"
- }
- }
- ]
- }
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+{
+ "module": {
+ "name": "entry",
+ "type": "entry",
+ "description": "$string:module_desc",
+ "mainElement": "EntryAbility",
+ "deviceTypes": [
+ "default",
+ "tablet"
+ ],
+ "deliveryWithInstall": true,
+ "installationFree": false,
+ "pages": "$profile:main_pages",
+ "abilities": [
+ {
+ "name": "EntryAbility",
+ "srcEntry": "./ets/entryability/EntryAbility.ts",
+ "description": "$string:EntryAbility_desc",
+ "icon": "$media:icon",
+ "label": "$string:EntryAbility_label",
+ "startWindowIcon": "$media:icon",
+ "startWindowBackground": "$color:start_window_background",
+ "exported": true,
+ "skills": [
+ {
+ "entities": [
+ "entity.system.home"
+ ],
+ "actions": [
+ "action.system.home"
+ ]
+ }
+ ]
+ }
+ ],
+ "requestPermissions": [
+ {
+ "name": "ohos.permission.MICROPHONE",
+ "reason": "$string:EntryAbility_desc",
+ "usedScene": {
+ "abilities": [
+ "EntryAbility"
+ ],
+ "when": "always"
+ }
+ }
+ ]
+ }
}
\ No newline at end of file
diff --git a/code/DocsSample/Media/Audio/OHAudio/entry/src/main/resources/base/element/color.json b/code/DocsSample/Media/Audio/OHAudio/entry/src/main/resources/base/element/color.json
new file mode 100644
index 000000000..3c712962d
--- /dev/null
+++ b/code/DocsSample/Media/Audio/OHAudio/entry/src/main/resources/base/element/color.json
@@ -0,0 +1,8 @@
+{
+ "color": [
+ {
+ "name": "start_window_background",
+ "value": "#FFFFFF"
+ }
+ ]
+}
\ No newline at end of file
diff --git a/code/DocsSample/Media/Audio/OHAudio/entry/src/main/resources/base/element/string.json b/code/DocsSample/Media/Audio/OHAudio/entry/src/main/resources/base/element/string.json
new file mode 100644
index 000000000..aed116b7e
--- /dev/null
+++ b/code/DocsSample/Media/Audio/OHAudio/entry/src/main/resources/base/element/string.json
@@ -0,0 +1,44 @@
+{
+ "string": [
+ {
+ "name": "module_desc",
+ "value": "module description"
+ },
+ {
+ "name": "EntryAbility_desc",
+ "value": "description"
+ },
+ {
+ "name": "EntryAbility_label",
+ "value": "label"
+ },
+ {
+ "name": "AUDIO_CAPTURER",
+ "value": "录制和播放"
+ },
+ {
+ "name": "allow",
+ "value": "允许"
+ },
+ {
+ "name": "LOW_LATENCY_RENDERER",
+ "value": "低时延播放"
+ },
+ {
+ "name": "LOW_LATENCY_CAPTURER",
+ "value": "低时延录制"
+ },
+ {
+ "name": "CONTINUE",
+ "value": "继续"
+ },
+ {
+ "name": "PAUSE",
+ "value": "暂停"
+ },
+ {
+ "name": "RECORD_RESULT",
+ "value": "录音结果"
+ }
+ ]
+}
\ No newline at end of file
diff --git a/code/DocsSample/Media/Audio/OHAudio/entry/src/main/resources/base/media/ic_record.svg b/code/DocsSample/Media/Audio/OHAudio/entry/src/main/resources/base/media/ic_record.svg
new file mode 100644
index 000000000..b7276ef1d
--- /dev/null
+++ b/code/DocsSample/Media/Audio/OHAudio/entry/src/main/resources/base/media/ic_record.svg
@@ -0,0 +1,8 @@
+
+
\ No newline at end of file
diff --git a/code/DocsSample/Media/Audio/OHAudio/entry/src/main/resources/base/media/ic_record_continue.svg b/code/DocsSample/Media/Audio/OHAudio/entry/src/main/resources/base/media/ic_record_continue.svg
new file mode 100644
index 000000000..92f3557f5
--- /dev/null
+++ b/code/DocsSample/Media/Audio/OHAudio/entry/src/main/resources/base/media/ic_record_continue.svg
@@ -0,0 +1,13 @@
+
+
\ No newline at end of file
diff --git a/code/DocsSample/Media/Audio/OHAudio/entry/src/main/resources/base/media/ic_record_pause.svg b/code/DocsSample/Media/Audio/OHAudio/entry/src/main/resources/base/media/ic_record_pause.svg
new file mode 100644
index 000000000..48e81603d
--- /dev/null
+++ b/code/DocsSample/Media/Audio/OHAudio/entry/src/main/resources/base/media/ic_record_pause.svg
@@ -0,0 +1,13 @@
+
+
\ No newline at end of file
diff --git a/code/DocsSample/Media/Audio/OHAudio/entry/src/main/resources/base/media/ic_record_paused.svg b/code/DocsSample/Media/Audio/OHAudio/entry/src/main/resources/base/media/ic_record_paused.svg
new file mode 100644
index 000000000..a33645fd5
--- /dev/null
+++ b/code/DocsSample/Media/Audio/OHAudio/entry/src/main/resources/base/media/ic_record_paused.svg
@@ -0,0 +1,13 @@
+
+
\ No newline at end of file
diff --git a/code/DocsSample/Media/Audio/OHAudio/entry/src/main/resources/base/media/ic_record_playing.svg b/code/DocsSample/Media/Audio/OHAudio/entry/src/main/resources/base/media/ic_record_playing.svg
new file mode 100644
index 000000000..ff83b0ff5
--- /dev/null
+++ b/code/DocsSample/Media/Audio/OHAudio/entry/src/main/resources/base/media/ic_record_playing.svg
@@ -0,0 +1,13 @@
+
+
\ No newline at end of file
diff --git a/code/DocsSample/Media/Audio/OHAudio/entry/src/main/resources/base/media/ic_recording.svg b/code/DocsSample/Media/Audio/OHAudio/entry/src/main/resources/base/media/ic_recording.svg
new file mode 100644
index 000000000..fa80b1849
--- /dev/null
+++ b/code/DocsSample/Media/Audio/OHAudio/entry/src/main/resources/base/media/ic_recording.svg
@@ -0,0 +1,8 @@
+
+
\ No newline at end of file
diff --git a/code/BasicFeature/InsightIntent/IntentExecutor/entry/src/main/resources/base/media/icon.png b/code/DocsSample/Media/Audio/OHAudio/entry/src/main/resources/base/media/icon.png
similarity index 100%
rename from code/BasicFeature/InsightIntent/IntentExecutor/entry/src/main/resources/base/media/icon.png
rename to code/DocsSample/Media/Audio/OHAudio/entry/src/main/resources/base/media/icon.png
diff --git a/code/DocsSample/Media/Audio/OHAudio/entry/src/main/resources/base/media/pic01.svg b/code/DocsSample/Media/Audio/OHAudio/entry/src/main/resources/base/media/pic01.svg
new file mode 100644
index 000000000..b9e67e424
--- /dev/null
+++ b/code/DocsSample/Media/Audio/OHAudio/entry/src/main/resources/base/media/pic01.svg
@@ -0,0 +1,16 @@
+
+
\ No newline at end of file
diff --git a/code/DocsSample/Media/Audio/OHAudio/entry/src/main/resources/base/media/pic_Audiovivid.png b/code/DocsSample/Media/Audio/OHAudio/entry/src/main/resources/base/media/pic_Audiovivid.png
new file mode 100644
index 000000000..ab9eebd95
Binary files /dev/null and b/code/DocsSample/Media/Audio/OHAudio/entry/src/main/resources/base/media/pic_Audiovivid.png differ
diff --git a/code/DocsSample/Media/Audio/OHAudio/entry/src/main/resources/base/profile/main_pages.json b/code/DocsSample/Media/Audio/OHAudio/entry/src/main/resources/base/profile/main_pages.json
new file mode 100644
index 000000000..928bea303
--- /dev/null
+++ b/code/DocsSample/Media/Audio/OHAudio/entry/src/main/resources/base/profile/main_pages.json
@@ -0,0 +1,7 @@
+{
+ "src": [
+ "pages/Index",
+ "pages/AudioRecording",
+ "pages/AudioVividPlayback"
+ ]
+}
diff --git a/code/DocsSample/Media/Audio/OHAudio/entry/src/main/resources/en_US/element/string.json b/code/DocsSample/Media/Audio/OHAudio/entry/src/main/resources/en_US/element/string.json
new file mode 100644
index 000000000..aed116b7e
--- /dev/null
+++ b/code/DocsSample/Media/Audio/OHAudio/entry/src/main/resources/en_US/element/string.json
@@ -0,0 +1,44 @@
+{
+ "string": [
+ {
+ "name": "module_desc",
+ "value": "module description"
+ },
+ {
+ "name": "EntryAbility_desc",
+ "value": "description"
+ },
+ {
+ "name": "EntryAbility_label",
+ "value": "label"
+ },
+ {
+ "name": "AUDIO_CAPTURER",
+ "value": "录制和播放"
+ },
+ {
+ "name": "allow",
+ "value": "允许"
+ },
+ {
+ "name": "LOW_LATENCY_RENDERER",
+ "value": "低时延播放"
+ },
+ {
+ "name": "LOW_LATENCY_CAPTURER",
+ "value": "低时延录制"
+ },
+ {
+ "name": "CONTINUE",
+ "value": "继续"
+ },
+ {
+ "name": "PAUSE",
+ "value": "暂停"
+ },
+ {
+ "name": "RECORD_RESULT",
+ "value": "录音结果"
+ }
+ ]
+}
\ No newline at end of file
diff --git a/code/DocsSample/Media/Audio/OHAudio/entry/src/main/resources/zh_CN/element/string.json b/code/DocsSample/Media/Audio/OHAudio/entry/src/main/resources/zh_CN/element/string.json
new file mode 100644
index 000000000..6cbef82e3
--- /dev/null
+++ b/code/DocsSample/Media/Audio/OHAudio/entry/src/main/resources/zh_CN/element/string.json
@@ -0,0 +1,44 @@
+{
+ "string": [
+ {
+ "name": "module_desc",
+ "value": "模块描述"
+ },
+ {
+ "name": "EntryAbility_desc",
+ "value": "description"
+ },
+ {
+ "name": "EntryAbility_label",
+ "value": "label"
+ },
+ {
+ "name": "AUDIO_CAPTURER",
+ "value": "录制和播放"
+ },
+ {
+ "name": "allow",
+ "value": "允许"
+ },
+ {
+ "name": "LOW_LATENCY_RENDERER",
+ "value": "低时延播放"
+ },
+ {
+ "name": "LOW_LATENCY_CAPTURER",
+ "value": "低时延录制"
+ },
+ {
+ "name": "CONTINUE",
+ "value": "继续"
+ },
+ {
+ "name": "PAUSE",
+ "value": "暂停"
+ },
+ {
+ "name": "RECORD_RESULT",
+ "value": "录音结果"
+ }
+ ]
+}
\ No newline at end of file
diff --git a/code/SystemFeature/InsightIntent/IntentDriver/entry/src/ohosTest/ets/testrunner/OpenHarmonyTestRunner.ts b/code/DocsSample/Media/Audio/OHAudio/entry/src/ohosTest/ets/TestRunner/OpenHarmonyTestRunner.ts
similarity index 60%
rename from code/SystemFeature/InsightIntent/IntentDriver/entry/src/ohosTest/ets/testrunner/OpenHarmonyTestRunner.ts
rename to code/DocsSample/Media/Audio/OHAudio/entry/src/ohosTest/ets/TestRunner/OpenHarmonyTestRunner.ts
index 2822cf441..fec1b02e1 100644
--- a/code/SystemFeature/InsightIntent/IntentDriver/entry/src/ohosTest/ets/testrunner/OpenHarmonyTestRunner.ts
+++ b/code/DocsSample/Media/Audio/OHAudio/entry/src/ohosTest/ets/TestRunner/OpenHarmonyTestRunner.ts
@@ -1,30 +1,31 @@
/*
- * Copyright (c) 2023 Huawei Device Co., Ltd.
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
+* Copyright (C) 2023 Huawei Device Co., Ltd.
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
import hilog from '@ohos.hilog';
import TestRunner from '@ohos.application.testRunner';
import AbilityDelegatorRegistry from '@ohos.app.ability.abilityDelegatorRegistry';
+import { BusinessError } from '@ohos.base';
-let abilityDelegator = undefined;
-let abilityDelegatorArguments = undefined;
+let abilityDelegator: AbilityDelegatorRegistry.AbilityDelegator | undefined = undefined;
+let abilityDelegatorArguments: AbilityDelegatorRegistry.AbilityDelegatorArgs | undefined = undefined;
-async function onAbilityCreateCallback() {
+async function onAbilityCreateCallback(): Promise {
hilog.info(0x0000, 'testTag', '%{public}s', 'onAbilityCreateCallback');
}
-async function addAbilityMonitorCallback(err: any) {
+async function addAbilityMonitorCallback(err: BusinessError): Promise {
hilog.info(0x0000, 'testTag', 'addAbilityMonitorCallback : %{public}s', JSON.stringify(err) ?? '');
}
@@ -32,11 +33,11 @@ export default class OpenHarmonyTestRunner implements TestRunner {
constructor() {
}
- onPrepare() {
+ onPrepare(): void {
hilog.info(0x0000, 'testTag', '%{public}s', 'OpenHarmonyTestRunner OnPrepare ');
}
- async onRun() {
+ async onRun(): Promise {
hilog.info(0x0000, 'testTag', '%{public}s', 'OpenHarmonyTestRunner onRun run');
abilityDelegatorArguments = AbilityDelegatorRegistry.getArguments();
abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator();
@@ -48,12 +49,12 @@ export default class OpenHarmonyTestRunner implements TestRunner {
abilityDelegator.addAbilityMonitor(lMonitor, addAbilityMonitorCallback);
let cmd = 'aa start -d 0 -a TestAbility' + ' -b ' + abilityDelegatorArguments.bundleName;
let debug = abilityDelegatorArguments.parameters['-D'];
- if (debug == 'true') {
+ if (debug === 'true') {
cmd += ' -D';
}
hilog.info(0x0000, 'testTag', 'cmd : %{public}s', cmd);
abilityDelegator.executeShellCommand(cmd,
- (err: any, d: any) => {
+ (err: BusinessError, d: AbilityDelegatorRegistry.ShellCmdResult) => {
hilog.info(0x0000, 'testTag', 'executeShellCommand : err : %{public}s', JSON.stringify(err) ?? '');
hilog.info(0x0000, 'testTag', 'executeShellCommand : data : %{public}s', d.stdResult ?? '');
hilog.info(0x0000, 'testTag', 'executeShellCommand : data : %{public}s', d.exitCode ?? '');
diff --git a/code/DocsSample/Media/Audio/OHAudio/entry/src/ohosTest/ets/test/Ability.test.ets b/code/DocsSample/Media/Audio/OHAudio/entry/src/ohosTest/ets/test/Ability.test.ets
new file mode 100644
index 000000000..7b93e2371
--- /dev/null
+++ b/code/DocsSample/Media/Audio/OHAudio/entry/src/ohosTest/ets/test/Ability.test.ets
@@ -0,0 +1,371 @@
+/*
+* Copyright (C) 2023 Huawei Device Co., Ltd.
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+import Logger from '../utils/Logger';
+import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium';
+import { Driver, ON, MatchPattern } from '@ohos.UiTest';
+import AbilityDelegatorRegistry from '@ohos.app.ability.abilityDelegatorRegistry';
+import resourceManager from '@ohos.resourceManager';
+import deviceInfo from '@ohos.deviceInfo';
+
+let abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator();
+let manager: resourceManager.ResourceManager;
+const driver = Driver.create();
+
+export default function abilityTest() {
+ const TAG = '[Sample_Audio]';
+ // const BUNDLE = 'audio_';
+ const DEVICE_TYPE = 'phone';
+
+ describe('ActsAbilityTest', () => {
+ // Defines a test suite. Two parameters are supported: test suite name and test suite function.
+ beforeAll(() => {
+ // Presets an action, which is performed only once before all test cases of the test suite start.
+ // This API supports only one parameter: preset action function.
+ })
+ beforeEach(() => {
+ // Presets an action, which is performed before each unit test case starts.
+ // The number of execution times is the same as the number of test cases defined by **it**.
+ // This API supports only one parameter: preset action function.
+ })
+ afterEach(() => {
+ // Presets a clear action, which is performed after each unit test case ends.
+ // The number of execution times is the same as the number of test cases defined by **it**.
+ // This API supports only one parameter: clear action function.
+ })
+ afterAll(() => {
+ // Presets a clear action, which is performed after all test cases of the test suite end.
+ // This API supports only one parameter: clear action function.
+ })
+
+ /**
+ * StartAbility
+ */
+ it('StartAbility_001', 0, async (done: Function) => {
+ Logger.info(TAG, 'StartAbility_001 begin');
+ try {
+ await abilityDelegator.startAbility({
+ bundleName: 'com.samples.audio',
+ abilityName: 'EntryAbility'
+ });
+ done();
+ } catch (exception) {
+ Logger.info(TAG, `StartAbility_001 exception = ${JSON.stringify(exception)}`);
+ expect().assertFail();
+ }
+ Logger.info(TAG, 'StartAbility_001 end');
+ })
+
+ /**
+ * Allow Microsoft Permission
+ */
+ it('_Permission', 0, async () => {
+ Logger.info(TAG, '_Permission begin');
+ await driver.delayMs(3000);
+ let ability = abilityDelegator.getAppContext();
+ manager = ability.resourceManager;
+ for (let i = 0; i < 1; i++) {
+ let btnAccept = await driver.findComponent(ON.text(await manager.getStringValue($r('app.string.allow'))));
+ console.log('btnAccept' + JSON.stringify(btnAccept));
+ if (btnAccept !== undefined) {
+ await btnAccept.click();
+ await driver.delayMs(500);
+ }
+ }
+ Logger.info(TAG, '_Permission end');
+ })
+
+ /**
+ * [Home] display Home page
+ */
+ it('RecordAndPlayHome', 0, async (done: Function) => {
+ Logger.info(TAG, 'RecordAndPlayHome begin');
+ try {
+ let audioCapturerComponent = await driver.findComponent(ON.id('record_play_card'));
+ await audioCapturerComponent.click();
+ await driver.delayMs(1000);
+ } catch (err) {
+ Logger.error(TAG, 'RecordAndPlayHome:' + JSON.stringify(err));
+ expect(false).assertTrue();
+ }
+ Logger.info(TAG, 'RecordAndPlayHome end');
+ done();
+ })
+
+ /**
+ * [LowLatencyCapturer] display LowLatencyCapturer page,and click open lowLatency play btn
+ */
+ it('OpenLowLatencyPlay', 0, async (done: Function) => {
+ Logger.info(TAG, 'OpenLowLatencyPlay begin');
+ let deviceType = deviceInfo.deviceType;
+ if (DEVICE_TYPE === deviceType) {
+ try {
+ let startRecordBtnComponent = await driver.findComponent(ON.id('capturer_low_latency_btn'));
+ await startRecordBtnComponent.click();
+ await driver.delayMs(2000);
+ } catch (err) {
+ Logger.error(TAG, 'OpenLowLatencyPlay:' + JSON.stringify(err));
+ expect(false).assertTrue();
+ }
+ }
+ Logger.info(TAG, 'OpenLowLatencyPlay end');
+ done();
+ })
+
+ /**
+ * [LowLatencyCapturer] display LowLatencyCapturer page,and click start record btn
+ */
+ it('LowLatencyCapturer_001', 0, async (done: Function) => {
+ Logger.info(TAG, 'LowLatencyCapturer_001 begin');
+ try {
+ let startRecordBtnComponent = await driver.findComponent(ON.id('start_record_btn'));
+ await startRecordBtnComponent.click();
+ await driver.delayMs(3000);
+ await driver.assertComponentExist(ON.id('show_time_txt'));
+ await driver.assertComponentExist(ON.id('stop_record_btn'));
+ await driver.assertComponentExist(ON.id('pause_record_btn'));
+ startRecordBtnComponent = await driver.findComponent(ON.id('start_record_btn'));
+ expect(startRecordBtnComponent === null).assertTrue();
+ } catch (err) {
+ Logger.error(TAG, 'LowLatencyCapturer_001:' + JSON.stringify(err));
+ expect(false).assertTrue();
+ }
+ Logger.info(TAG, 'LowLatencyCapturer_001 end');
+ done();
+ })
+
+ /**
+ * [LowLatencyCapturer] display LowLatencyCapturer page,and click pause record btn
+ */
+ it('LowLatencyCapturer_002', 0, async (done: Function) => {
+ Logger.info(TAG, 'LowLatencyCapturer_002 begin');
+ try {
+ let pauseRecordBtnComponent = await driver.findComponent(ON.id('pause_record_btn'));
+ await pauseRecordBtnComponent.click();
+ await driver.delayMs(2000);
+ await driver.assertComponentExist(ON.id('continue_record_btn'));
+ pauseRecordBtnComponent = await driver.findComponent(ON.id('pause_record_btn'));
+ console.log(`pauseRecordBtnComponent=${JSON.stringify(pauseRecordBtnComponent)}`);
+ expect(pauseRecordBtnComponent === null).assertTrue();
+ } catch (err) {
+ Logger.error(TAG, 'LowLatencyCapturer_002:' + JSON.stringify(err));
+ expect(false).assertTrue();
+ }
+ Logger.info(TAG, 'LowLatencyCapturer_002 end');
+ done();
+ })
+
+ /**
+ * [LowLatencyCapturer] display LowLatencyCapturer page,and click continue record btn
+ */
+ it('LowLatencyCapturer_003', 0, async (done: Function) => {
+ Logger.info(TAG, 'LowLatencyCapturer_003 begin');
+ try {
+ let continueRecordBtnComponent = await driver.findComponent(ON.id('continue_record_btn'));
+ await continueRecordBtnComponent.click();
+ await driver.delayMs(3000);
+ await driver.assertComponentExist(ON.id('pause_record_btn'));
+ continueRecordBtnComponent = await driver.findComponent(ON.id('continue_record_btn'));
+ expect(continueRecordBtnComponent === null).assertTrue();
+ } catch (err) {
+ Logger.error(TAG, 'LowLatencyCapturer_003:' + JSON.stringify(err));
+ expect(false).assertTrue();
+ }
+ Logger.info(TAG, 'LowLatencyCapturer_003 end');
+ done();
+ })
+
+ /**
+ * [LowLatencyCapturer] display LowLatencyCapturer page,and click stop record btn
+ * show result
+ */
+ it('LowLatencyCapturer_004', 0, async (done: Function) => {
+ Logger.info(TAG, 'LowLatencyCapturer_004 begin');
+ try {
+ let stopRecordBtnComponent = await driver.findComponent(ON.id('stop_record_btn'));
+ await stopRecordBtnComponent.click();
+ await driver.delayMs(1000);
+ await driver.assertComponentExist(ON.id('player_btn'));
+ await driver.assertComponentExist(ON.id('disalbe_btn'));
+ stopRecordBtnComponent = await driver.findComponent(ON.id('stop_record_btn'));
+ console.log('stopRecordBtnComponent==' + JSON.stringify(stopRecordBtnComponent));
+ expect(stopRecordBtnComponent === null).assertTrue();
+ } catch (err) {
+ Logger.error(TAG, 'LowLatencyCapturer_004:' + JSON.stringify(err));
+ expect(false).assertTrue();
+ }
+ Logger.info(TAG, 'LowLatencyCapturer_004 end');
+ done();
+ })
+
+ /**
+ * [LowLatencyRendererOpen] display LowLatencyCapturer page,and click open lowLatency renderer btn
+ */
+ it('LowLatencyRendererOpen', 0, async (done: Function) => {
+ Logger.info(TAG, 'LowLatencyRendererOpen begin');
+ let deviceType = deviceInfo.deviceType;
+ if (DEVICE_TYPE === deviceType) {
+ try {
+ let startRecordBtnComponent = await driver.findComponent(ON.id('renderer_low_latency_btn'));
+ await startRecordBtnComponent.click();
+ await driver.delayMs(2000);
+ } catch (err) {
+ Logger.error(TAG, 'LowLatencyRendererOpen:' + JSON.stringify(err));
+ expect(false).assertTrue();
+ }
+ }
+ Logger.info(TAG, 'LowLatencyRendererOpen end');
+ done();
+ })
+
+ /**
+ * [LowLatencyRenderer] click record_player to play and pause
+ * play->pause->play->pause
+ */
+ it('LowLatencyRenderer', 0, async (done: Function) => {
+ Logger.info(TAG, 'LowLatencyRenderer begin');
+ try {
+ let player_btn = await driver.findComponent(ON.id('player_btn'));
+ await player_btn.click();
+ await driver.delayMs(2000);
+ await driver.assertComponentExist(ON.id('playing_state'));
+ await player_btn.click();
+ await driver.delayMs(2000);
+ await driver.assertComponentExist(ON.id('paused_state'));
+ await player_btn.click();
+ await driver.delayMs(2000);
+ await driver.assertComponentExist(ON.id('playing_state'));
+ } catch (err) {
+ Logger.error(TAG, 'LowLatencyRenderer:' + JSON.stringify(err));
+ expect(false).assertTrue();
+ }
+ Logger.info(TAG, 'LowLatencyRenderer end');
+ done();
+ })
+
+ /**
+ * [Back] click back btn to home
+ * back
+ */
+ it('Back', 0, async (done: Function) => {
+ Logger.info(TAG, 'Back begin');
+ try {
+ let parallel_capturer_back_btn = await driver.findComponent(ON.id('capturer_back_btn'));
+ await parallel_capturer_back_btn.click();
+ await driver.delayMs(1000);
+ } catch (err) {
+ Logger.error(TAG, 'Back:' + JSON.stringify(err));
+ expect(false).assertTrue();
+ }
+ Logger.info(TAG, 'Back end');
+ done();
+ })
+
+
+ /**
+ * [EnterAudioVivid] Enter AudioVivid playback page
+ * enter -> check buttons
+ */
+ it('EnterAudioVivid', 0, async (done: Function) => {
+ Logger.info(TAG, 'EnterAudioVivid begin');
+ try {
+ await driver.assertComponentExist(ON.id('audiovivid_page_card'));
+ let enter_btn = await driver.findComponent(ON.id('audiovivid_page_card'));
+ await enter_btn.click();
+ await driver.delayMs(1000);
+ await driver.assertComponentExist(ON.id('normal_play_btn'));
+ await driver.delayMs(1000);
+ await driver.assertComponentExist(ON.id('vivid_play_btn'));
+ } catch (err) {
+ Logger.error(TAG, 'EnterAudioVivid:' + JSON.stringify(err));
+ expect(false).assertTrue();
+ }
+ Logger.info(TAG, 'EnterAudioVivid end');
+ done();
+ })
+
+ /**
+ * [NormalMusicPlayback] play normal music
+ * click play -> click pause
+ */
+ it('NormalMusicPlayback', 0, async (done: Function) => {
+ Logger.info(TAG, 'NormalMusicPlayback begin');
+ try {
+ let play_btn = await driver.findComponent(ON.id('normal_play_btn'));
+ await play_btn.click();
+ await driver.delayMs(1000);
+ await driver.assertComponentExist(ON.id('normal_pause_btn'));
+ await driver.delayMs(1000);
+
+ let pause_btn = await driver.findComponent(ON.id('normal_pause_btn'));
+ await pause_btn.click();
+ await driver.delayMs(1000);
+ await driver.assertComponentExist(ON.id('normal_play_btn'));
+ await driver.delayMs(1000);
+ } catch (err) {
+ Logger.error(TAG, 'NormalMusicPlayback:' + JSON.stringify(err));
+ expect(false).assertTrue();
+ }
+ Logger.info(TAG, 'NormalMusicPlayback end');
+ done();
+ })
+
+ /**
+ * [VividMusicPlayback] play audiovivid music
+ * click play -> click pause
+ */
+ it('VividMusicPlayback', 0, async (done: Function) => {
+ Logger.info(TAG, 'VividMusicPlayback begin');
+ try {
+ let play_btn = await driver.findComponent(ON.id('vivid_play_btn'));
+ await play_btn.click();
+ await driver.delayMs(1000);
+ await driver.assertComponentExist(ON.id('vivid_pause_btn'));
+ await driver.delayMs(1000);
+
+ let pause_btn = await driver.findComponent(ON.id('vivid_pause_btn'));
+ await pause_btn.click();
+ await driver.delayMs(1000);
+ await driver.assertComponentExist(ON.id('vivid_play_btn'));
+ await driver.delayMs(1000);
+ } catch (err) {
+ Logger.error(TAG, 'VividMusicPlayback:' + JSON.stringify(err));
+ expect(false).assertTrue();
+ }
+ Logger.info(TAG, 'VividMusicPlayback end');
+ done();
+ })
+
+ /**
+ * [Back] click back btn to home
+ * back
+ */
+ it('AudiovividBack', 0, async (done: Function) => {
+ Logger.info(TAG, 'AudiovividBack begin');
+ try {
+ let back_btn = await driver.findComponent(ON.id('spatial_audio_back_btn'));
+ await back_btn.click();
+ await driver.delayMs(1000);
+ await driver.assertComponentExist(ON.id('audiovivid_page_card'));
+ } catch (err) {
+ Logger.error(TAG, 'AudiovividBack:' + JSON.stringify(err));
+ expect(false).assertTrue();
+ }
+ Logger.info(TAG, 'AudiovividBack end');
+ done();
+ })
+
+ })
+}
\ No newline at end of file
diff --git a/code/SystemFeature/InsightIntent/IntentDriver/entry/src/ohosTest/ets/test/List.test.ets b/code/DocsSample/Media/Audio/OHAudio/entry/src/ohosTest/ets/test/List.test.ets
similarity index 97%
rename from code/SystemFeature/InsightIntent/IntentDriver/entry/src/ohosTest/ets/test/List.test.ets
rename to code/DocsSample/Media/Audio/OHAudio/entry/src/ohosTest/ets/test/List.test.ets
index 47ea1ac7a..27c07a1a1 100644
--- a/code/SystemFeature/InsightIntent/IntentDriver/entry/src/ohosTest/ets/test/List.test.ets
+++ b/code/DocsSample/Media/Audio/OHAudio/entry/src/ohosTest/ets/test/List.test.ets
@@ -16,5 +16,5 @@
import abilityTest from './Ability.test'
export default function testsuite() {
- abilityTest();
+ abilityTest()
}
\ No newline at end of file
diff --git a/code/DocsSample/Media/Audio/OHAudio/entry/src/ohosTest/ets/testability/TestAbility.ets b/code/DocsSample/Media/Audio/OHAudio/entry/src/ohosTest/ets/testability/TestAbility.ets
new file mode 100644
index 000000000..c0a03fd60
--- /dev/null
+++ b/code/DocsSample/Media/Audio/OHAudio/entry/src/ohosTest/ets/testability/TestAbility.ets
@@ -0,0 +1,63 @@
+/*
+* Copyright (C) 2023 Huawei Device Co., Ltd.
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+import UIAbility from '@ohos.app.ability.UIAbility';
+import AbilityDelegatorRegistry from '@ohos.app.ability.abilityDelegatorRegistry';
+import hilog from '@ohos.hilog';
+import { Hypium } from '@ohos/hypium';
+import testsuite from '../test/List.test';
+import window from '@ohos.window';
+import Want from '@ohos.app.ability.Want';
+import AbilityConstant from '@ohos.app.ability.AbilityConstant';
+
+export default class TestAbility extends UIAbility {
+ onCreate(want: Want, launchParam: AbilityConstant.LaunchParam): void {
+ hilog.info(0x0000, 'testTag', '%{public}s', 'TestAbility onCreate');
+ hilog.info(0x0000, 'testTag', '%{public}s', 'want param:' + JSON.stringify(want) ?? '');
+ hilog.info(0x0000, 'testTag', '%{public}s', 'launchParam:' + JSON.stringify(launchParam) ?? '');
+ let abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator();
+ let abilityDelegatorArguments = AbilityDelegatorRegistry.getArguments();
+ hilog.info(0x0000, 'testTag', '%{public}s', 'start run testcase!!!');
+ Hypium.hypiumTest(abilityDelegator, abilityDelegatorArguments, testsuite);
+ }
+
+ onDestroy(): void {
+ hilog.info(0x0000, 'testTag', '%{public}s', 'TestAbility onDestroy');
+ }
+
+ onWindowStageCreate(windowStage: window.WindowStage): void {
+ hilog.info(0x0000, 'testTag', '%{public}s', 'TestAbility onWindowStageCreate');
+ windowStage.loadContent('testability/pages/Index', (err, data) => {
+ if (err.code) {
+ hilog.error(0x0000, 'testTag', 'Failed to load the content. Cause: %{public}s', JSON.stringify(err) ?? '');
+ return;
+ }
+ hilog.info(0x0000, 'testTag', 'Succeeded in loading the content. Data: %{public}s',
+ JSON.stringify(data) ?? '');
+ });
+ }
+
+ onWindowStageDestroy(): void {
+ hilog.info(0x0000, 'testTag', '%{public}s', 'TestAbility onWindowStageDestroy');
+ }
+
+ onForeground(): void {
+ hilog.info(0x0000, 'testTag', '%{public}s', 'TestAbility onForeground');
+ }
+
+ onBackground(): void {
+ hilog.info(0x0000, 'testTag', '%{public}s', 'TestAbility onBackground');
+ }
+}
\ No newline at end of file
diff --git a/code/SystemFeature/InsightIntent/IntentDriver/entry/src/ohosTest/ets/testability/pages/Index.ets b/code/DocsSample/Media/Audio/OHAudio/entry/src/ohosTest/ets/testability/pages/Index.ets
similarity index 65%
rename from code/SystemFeature/InsightIntent/IntentDriver/entry/src/ohosTest/ets/testability/pages/Index.ets
rename to code/DocsSample/Media/Audio/OHAudio/entry/src/ohosTest/ets/testability/pages/Index.ets
index 6426786a9..e91baaf84 100644
--- a/code/SystemFeature/InsightIntent/IntentDriver/entry/src/ohosTest/ets/testability/pages/Index.ets
+++ b/code/DocsSample/Media/Audio/OHAudio/entry/src/ohosTest/ets/testability/pages/Index.ets
@@ -13,25 +13,16 @@
* limitations under the License.
*/
-import AbilityDelegatorRegistry from '@ohos.app.ability.abilityDelegatorRegistry';
-import testsuite from '../../test/List.test';
-import { Hypium } from '@ohos/hypium';
-import { logger } from '../../util/Logger';
-
-const TAG: string = '[TestAbility Index]';
+import hilog from '@ohos.hilog';
@Entry
@Component
struct Index {
aboutToAppear() {
- logger.info(TAG, 'TestAbility index aboutToAppear');
- let abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator();
- let abilityDelegatorArguments = AbilityDelegatorRegistry.getArguments();
- logger.info(TAG, 'start run testcase!!!');
- Hypium.hypiumTest(abilityDelegator, abilityDelegatorArguments, testsuite);
+ hilog.info(0x0000, 'testTag', '%{public}s', 'TestAbility index aboutToAppear');
}
- @State message: string = 'Hello World';
+ @State message: string = 'Hello World'
build() {
Row() {
diff --git a/code/DocsSample/Media/Audio/OHAudio/entry/src/ohosTest/ets/utils/Logger.ts b/code/DocsSample/Media/Audio/OHAudio/entry/src/ohosTest/ets/utils/Logger.ts
new file mode 100644
index 000000000..76c2bb76f
--- /dev/null
+++ b/code/DocsSample/Media/Audio/OHAudio/entry/src/ohosTest/ets/utils/Logger.ts
@@ -0,0 +1,45 @@
+/*
+ * Copyright (c) 2022-2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import hilog from '@ohos.hilog';
+
+const DOMAIN: number = 0xF811;
+
+class Logger {
+ private prefix: string;
+ private format: string = '%{public}s, %{public}s';
+
+ constructor(prefix: string) {
+ this.prefix = prefix;
+ }
+
+ debug(...args: string[]): void {
+ hilog.debug(DOMAIN, this.prefix, this.format, args);
+ }
+
+ info(...args: string[]): void {
+ hilog.info(DOMAIN, this.prefix, this.format, args);
+ }
+
+ warn(...args: string[]): void {
+ hilog.warn(DOMAIN, this.prefix, this.format, args);
+ }
+
+ error(...args: string[]): void {
+ hilog.error(DOMAIN, this.prefix, this.format, args);
+ }
+}
+
+export default new Logger('[Sample_ArkTSDistributedMusicPlayer]');
\ No newline at end of file
diff --git a/code/SystemFeature/InsightIntent/IntentDriver/entry/src/ohosTest/module.json5 b/code/DocsSample/Media/Audio/OHAudio/entry/src/ohosTest/module.json5
similarity index 96%
rename from code/SystemFeature/InsightIntent/IntentDriver/entry/src/ohosTest/module.json5
rename to code/DocsSample/Media/Audio/OHAudio/entry/src/ohosTest/module.json5
index 7e44e83cf..e6a499c49 100644
--- a/code/SystemFeature/InsightIntent/IntentDriver/entry/src/ohosTest/module.json5
+++ b/code/DocsSample/Media/Audio/OHAudio/entry/src/ohosTest/module.json5
@@ -1,52 +1,52 @@
-/*
- * Copyright (c) 2023 Huawei Device Co., Ltd.
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-{
- "module": {
- "name": "entry_test",
- "type": "feature",
- "description": "$string:module_test_desc",
- "mainElement": "TestAbility",
- "deviceTypes": [
- "default",
- "tablet"
- ],
- "deliveryWithInstall": true,
- "installationFree": false,
- "pages": "$profile:test_pages",
- "abilities": [
- {
- "name": "TestAbility",
- "srcEntry": "./ets/testability/TestAbility.ets",
- "description": "$string:TestAbility_desc",
- "icon": "$media:icon",
- "label": "$string:TestAbility_label",
- "exported": true,
- "startWindowIcon": "$media:icon",
- "startWindowBackground": "$color:start_window_background",
- "skills": [
- {
- "actions": [
- "action.system.home"
- ],
- "entities": [
- "entity.system.home"
- ]
- }
- ]
- }
- ]
- }
-}
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+{
+ "module": {
+ "name": "entry_test",
+ "type": "feature",
+ "description": "$string:module_test_desc",
+ "mainElement": "TestAbility",
+ "deviceTypes": [
+ "default",
+ "tablet"
+ ],
+ "deliveryWithInstall": true,
+ "installationFree": false,
+ "pages": "$profile:test_pages",
+ "abilities": [
+ {
+ "name": "TestAbility",
+ "srcEntry": "./ets/testability/TestAbility.ets",
+ "description": "$string:TestAbility_desc",
+ "icon": "$media:icon",
+ "label": "$string:TestAbility_label",
+ "exported": true,
+ "startWindowIcon": "$media:icon",
+ "startWindowBackground": "$color:start_window_background",
+ "skills": [
+ {
+ "actions": [
+ "action.system.home"
+ ],
+ "entities": [
+ "entity.system.home"
+ ]
+ }
+ ]
+ }
+ ]
+ }
+}
diff --git a/code/DocsSample/Media/Audio/OHAudio/entry/src/ohosTest/resources/base/element/color.json b/code/DocsSample/Media/Audio/OHAudio/entry/src/ohosTest/resources/base/element/color.json
new file mode 100644
index 000000000..3c712962d
--- /dev/null
+++ b/code/DocsSample/Media/Audio/OHAudio/entry/src/ohosTest/resources/base/element/color.json
@@ -0,0 +1,8 @@
+{
+ "color": [
+ {
+ "name": "start_window_background",
+ "value": "#FFFFFF"
+ }
+ ]
+}
\ No newline at end of file
diff --git a/code/DocsSample/Media/Audio/OHAudio/entry/src/ohosTest/resources/base/element/string.json b/code/DocsSample/Media/Audio/OHAudio/entry/src/ohosTest/resources/base/element/string.json
new file mode 100644
index 000000000..65d8fa5a7
--- /dev/null
+++ b/code/DocsSample/Media/Audio/OHAudio/entry/src/ohosTest/resources/base/element/string.json
@@ -0,0 +1,16 @@
+{
+ "string": [
+ {
+ "name": "module_test_desc",
+ "value": "test ability description"
+ },
+ {
+ "name": "TestAbility_desc",
+ "value": "the test ability"
+ },
+ {
+ "name": "TestAbility_label",
+ "value": "test label"
+ }
+ ]
+}
\ No newline at end of file
diff --git a/code/SystemFeature/InsightIntent/IntentDriver/entry/src/main/resources/base/media/icon.png b/code/DocsSample/Media/Audio/OHAudio/entry/src/ohosTest/resources/base/media/icon.png
similarity index 100%
rename from code/SystemFeature/InsightIntent/IntentDriver/entry/src/main/resources/base/media/icon.png
rename to code/DocsSample/Media/Audio/OHAudio/entry/src/ohosTest/resources/base/media/icon.png
diff --git a/code/DocsSample/Media/Audio/OHAudio/entry/src/ohosTest/resources/base/profile/test_pages.json b/code/DocsSample/Media/Audio/OHAudio/entry/src/ohosTest/resources/base/profile/test_pages.json
new file mode 100644
index 000000000..b7e7343ca
--- /dev/null
+++ b/code/DocsSample/Media/Audio/OHAudio/entry/src/ohosTest/resources/base/profile/test_pages.json
@@ -0,0 +1,5 @@
+{
+ "src": [
+ "testability/pages/Index"
+ ]
+}
diff --git a/code/DocsSample/Media/Audio/OHAudio/hvigor/hvigor-config.json5 b/code/DocsSample/Media/Audio/OHAudio/hvigor/hvigor-config.json5
new file mode 100644
index 000000000..a2eb20c67
--- /dev/null
+++ b/code/DocsSample/Media/Audio/OHAudio/hvigor/hvigor-config.json5
@@ -0,0 +1,21 @@
+/*
+ * Copyright (c) 2024 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+{
+ "hvigorVersion": "4.1.2",
+ "dependencies": {
+ "@ohos/hvigor-ohos-plugin": "4.1.2"
+ }
+}
\ No newline at end of file
diff --git a/code/DocsSample/Media/Audio/OHAudio/hvigor/hvigor-wrapper.js b/code/DocsSample/Media/Audio/OHAudio/hvigor/hvigor-wrapper.js
new file mode 100644
index 000000000..2be61f689
--- /dev/null
+++ b/code/DocsSample/Media/Audio/OHAudio/hvigor/hvigor-wrapper.js
@@ -0,0 +1 @@
+"use strict";var u=require("path"),D=require("os"),e=require("fs"),t=require("child_process"),r=require("crypto"),n="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},i={},C={},F=n&&n.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(C,"__esModule",{value:!0}),C.maxPathLength=C.isMac=C.isLinux=C.isWindows=void 0;const E=F(D),A="Windows_NT",o="Darwin";function a(){return E.default.type()===A}function c(){return E.default.type()===o}C.isWindows=a,C.isLinux=function(){return"Linux"===E.default.type()},C.isMac=c,C.maxPathLength=function(){return c()?1016:a()?259:4095},function(e){var t=n&&n.__createBinding||(Object.create?function(u,D,e,t){void 0===t&&(t=e);var r=Object.getOwnPropertyDescriptor(D,e);r&&!("get"in r?!D.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return D[e]}}),Object.defineProperty(u,t,r)}:function(u,D,e,t){void 0===t&&(t=e),u[t]=D[e]}),r=n&&n.__setModuleDefault||(Object.create?function(u,D){Object.defineProperty(u,"default",{enumerable:!0,value:D})}:function(u,D){u.default=D}),i=n&&n.__importStar||function(u){if(u&&u.__esModule)return u;var D={};if(null!=u)for(var e in u)"default"!==e&&Object.prototype.hasOwnProperty.call(u,e)&&t(D,u,e);return r(D,u),D};Object.defineProperty(e,"__esModule",{value:!0}),e.WORK_SPACE=e.HVIGOR_PROJECT_WRAPPER_HOME=e.HVIGOR_PROJECT_ROOT_DIR=e.HVIGOR_PROJECT_CACHES_HOME=e.HVIGOR_PNPM_STORE_PATH=e.HVIGOR_WRAPPER_PNPM_SCRIPT_PATH=e.PROJECT_CACHES=e.HVIGOR_WRAPPER_TOOLS_HOME=e.HVIGOR_USER_HOME=e.DEFAULT_PACKAGE_JSON=e.DEFAULT_HVIGOR_CONFIG_JSON_FILE_NAME=e.PNPM=e.HVIGOR=e.NPM_TOOL=e.PNPM_TOOL=e.HVIGOR_ENGINE_PACKAGE_NAME=void 0;const F=i(D),E=i(u),A=C;e.HVIGOR_ENGINE_PACKAGE_NAME="@ohos/hvigor",e.PNPM_TOOL=(0,A.isWindows)()?"pnpm.cmd":"pnpm",e.NPM_TOOL=(0,A.isWindows)()?"npm.cmd":"npm",e.HVIGOR="hvigor",e.PNPM="pnpm",e.DEFAULT_HVIGOR_CONFIG_JSON_FILE_NAME="hvigor-config.json5",e.DEFAULT_PACKAGE_JSON="package.json",e.HVIGOR_USER_HOME=E.resolve(F.homedir(),".hvigor"),e.HVIGOR_WRAPPER_TOOLS_HOME=E.resolve(e.HVIGOR_USER_HOME,"wrapper","tools"),e.PROJECT_CACHES="project_caches",e.HVIGOR_WRAPPER_PNPM_SCRIPT_PATH=E.resolve(e.HVIGOR_WRAPPER_TOOLS_HOME,"node_modules",".bin",e.PNPM_TOOL),e.HVIGOR_PNPM_STORE_PATH=E.resolve(e.HVIGOR_USER_HOME,"caches"),e.HVIGOR_PROJECT_CACHES_HOME=E.resolve(e.HVIGOR_USER_HOME,e.PROJECT_CACHES),e.HVIGOR_PROJECT_ROOT_DIR=process.cwd(),e.HVIGOR_PROJECT_WRAPPER_HOME=E.resolve(e.HVIGOR_PROJECT_ROOT_DIR,e.HVIGOR),e.WORK_SPACE="workspace"}(i);var s={},l={};Object.defineProperty(l,"__esModule",{value:!0}),l.logInfoPrintConsole=l.logErrorAndExit=void 0,l.logErrorAndExit=function(u){u instanceof Error?console.error(u.message):console.error(u),process.exit(-1)},l.logInfoPrintConsole=function(u){console.log(u)};var B=n&&n.__createBinding||(Object.create?function(u,D,e,t){void 0===t&&(t=e);var r=Object.getOwnPropertyDescriptor(D,e);r&&!("get"in r?!D.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return D[e]}}),Object.defineProperty(u,t,r)}:function(u,D,e,t){void 0===t&&(t=e),u[t]=D[e]}),d=n&&n.__setModuleDefault||(Object.create?function(u,D){Object.defineProperty(u,"default",{enumerable:!0,value:D})}:function(u,D){u.default=D}),f=n&&n.__importStar||function(u){if(u&&u.__esModule)return u;var D={};if(null!=u)for(var e in u)"default"!==e&&Object.prototype.hasOwnProperty.call(u,e)&&B(D,u,e);return d(D,u),D};Object.defineProperty(s,"__esModule",{value:!0});var _=s.executeBuild=void 0;const p=f(e),O=f(u),h=l;_=s.executeBuild=function(u){const D=O.resolve(u,"node_modules","@ohos","hvigor","bin","hvigor.js");try{const u=p.realpathSync(D);require(u)}catch(e){(0,h.logErrorAndExit)(`Error: ENOENT: no such file ${D},delete ${u} and retry.`)}};var P={},v={},g={},m={};Object.defineProperty(m,"__esModule",{value:!0}),m.Unicode=void 0;class R{}m.Unicode=R,R.SPACE_SEPARATOR=/[\u1680\u2000-\u200A\u202F\u205F\u3000]/,R.ID_START=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/,R.ID_CONTINUE=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/,Object.defineProperty(g,"__esModule",{value:!0}),g.JudgeUtil=void 0;const y=m;g.JudgeUtil=class{static isIgnoreChar(u){return"string"==typeof u&&("\t"===u||"\v"===u||"\f"===u||" "===u||" "===u||"\ufeff"===u||"\n"===u||"\r"===u||"\u2028"===u||"\u2029"===u)}static isSpaceSeparator(u){return"string"==typeof u&&y.Unicode.SPACE_SEPARATOR.test(u)}static isIdStartChar(u){return"string"==typeof u&&(u>="a"&&u<="z"||u>="A"&&u<="Z"||"$"===u||"_"===u||y.Unicode.ID_START.test(u))}static isIdContinueChar(u){return"string"==typeof u&&(u>="a"&&u<="z"||u>="A"&&u<="Z"||u>="0"&&u<="9"||"$"===u||"_"===u||""===u||""===u||y.Unicode.ID_CONTINUE.test(u))}static isDigitWithoutZero(u){return/[1-9]/.test(u)}static isDigit(u){return"string"==typeof u&&/[0-9]/.test(u)}static isHexDigit(u){return"string"==typeof u&&/[0-9A-Fa-f]/.test(u)}};var I=n&&n.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(v,"__esModule",{value:!0}),v.parseJsonText=v.parseJsonFile=void 0;const N=I(e),b=I(D),S=I(u),w=g;var H;!function(u){u[u.Char=0]="Char",u[u.EOF=1]="EOF",u[u.Identifier=2]="Identifier"}(H||(H={}));let x,M,T,V,G,j,J="start",U=[],W=0,L=1,$=0,k=!1,K="default",z="'",q=1;function Z(u,D=!1){M=String(u),J="start",U=[],W=0,L=1,$=0,V=void 0,k=D;do{x=X(),ru[J]()}while("eof"!==x.type);return V}function X(){for(K="default",G="",z="'",q=1;;){j=Q();const u=uu[K]();if(u)return u}}function Q(){if(M[W])return String.fromCodePoint(M.codePointAt(W))}function Y(){const u=Q();return"\n"===u?(L++,$=0):u?$+=u.length:$++,u&&(W+=u.length),u}v.parseJsonFile=function(u,D=!1,e="utf-8"){const t=N.default.readFileSync(S.default.resolve(u),{encoding:e});try{return Z(t,D)}catch(D){if(D instanceof SyntaxError){const e=D.message.split("at");if(2===e.length)throw new Error(`${e[0].trim()}${b.default.EOL}\t at ${u}:${e[1].trim()}`)}throw new Error(`${u} is not in valid JSON/JSON5 format.`)}},v.parseJsonText=Z;const uu={default(){switch(j){case"/":return Y(),void(K="comment");case void 0:return Y(),Du("eof")}if(!w.JudgeUtil.isIgnoreChar(j)&&!w.JudgeUtil.isSpaceSeparator(j))return uu[J]();Y()},start(){K="value"},beforePropertyName(){switch(j){case"$":case"_":return G=Y(),void(K="identifierName");case"\\":return Y(),void(K="identifierNameStartEscape");case"}":return Du("punctuator",Y());case'"':case"'":return z=j,Y(),void(K="string")}if(w.JudgeUtil.isIdStartChar(j))return G+=Y(),void(K="identifierName");throw Fu(H.Char,Y())},afterPropertyName(){if(":"===j)return Du("punctuator",Y());throw Fu(H.Char,Y())},beforePropertyValue(){K="value"},afterPropertyValue(){switch(j){case",":case"}":return Du("punctuator",Y())}throw Fu(H.Char,Y())},beforeArrayValue(){if("]"===j)return Du("punctuator",Y());K="value"},afterArrayValue(){switch(j){case",":case"]":return Du("punctuator",Y())}throw Fu(H.Char,Y())},end(){throw Fu(H.Char,Y())},comment(){switch(j){case"*":return Y(),void(K="multiLineComment");case"/":return Y(),void(K="singleLineComment")}throw Fu(H.Char,Y())},multiLineComment(){switch(j){case"*":return Y(),void(K="multiLineCommentAsterisk");case void 0:throw Fu(H.Char,Y())}Y()},multiLineCommentAsterisk(){switch(j){case"*":return void Y();case"/":return Y(),void(K="default");case void 0:throw Fu(H.Char,Y())}Y(),K="multiLineComment"},singleLineComment(){switch(j){case"\n":case"\r":case"\u2028":case"\u2029":return Y(),void(K="default");case void 0:return Y(),Du("eof")}Y()},value(){switch(j){case"{":case"[":return Du("punctuator",Y());case"n":return Y(),eu("ull"),Du("null",null);case"t":return Y(),eu("rue"),Du("boolean",!0);case"f":return Y(),eu("alse"),Du("boolean",!1);case"-":case"+":return"-"===Y()&&(q=-1),void(K="numerical");case".":case"0":case"I":case"N":return void(K="numerical");case'"':case"'":return z=j,Y(),G="",void(K="string")}if(void 0===j||!w.JudgeUtil.isDigitWithoutZero(j))throw Fu(H.Char,Y());K="numerical"},numerical(){switch(j){case".":return G=Y(),void(K="decimalPointLeading");case"0":return G=Y(),void(K="zero");case"I":return Y(),eu("nfinity"),Du("numeric",q*(1/0));case"N":return Y(),eu("aN"),Du("numeric",NaN)}if(void 0!==j&&w.JudgeUtil.isDigitWithoutZero(j))return G=Y(),void(K="decimalInteger");throw Fu(H.Char,Y())},zero(){switch(j){case".":case"e":case"E":return void(K="decimal");case"x":case"X":return G+=Y(),void(K="hexadecimal")}return Du("numeric",0)},decimalInteger(){switch(j){case".":case"e":case"E":return void(K="decimal")}if(!w.JudgeUtil.isDigit(j))return Du("numeric",q*Number(G));G+=Y()},decimal(){switch(j){case".":G+=Y(),K="decimalFraction";break;case"e":case"E":G+=Y(),K="decimalExponent"}},decimalPointLeading(){if(w.JudgeUtil.isDigit(j))return G+=Y(),void(K="decimalFraction");throw Fu(H.Char,Y())},decimalFraction(){switch(j){case"e":case"E":return G+=Y(),void(K="decimalExponent")}if(!w.JudgeUtil.isDigit(j))return Du("numeric",q*Number(G));G+=Y()},decimalExponent(){switch(j){case"+":case"-":return G+=Y(),void(K="decimalExponentSign")}if(w.JudgeUtil.isDigit(j))return G+=Y(),void(K="decimalExponentInteger");throw Fu(H.Char,Y())},decimalExponentSign(){if(w.JudgeUtil.isDigit(j))return G+=Y(),void(K="decimalExponentInteger");throw Fu(H.Char,Y())},decimalExponentInteger(){if(!w.JudgeUtil.isDigit(j))return Du("numeric",q*Number(G));G+=Y()},hexadecimal(){if(w.JudgeUtil.isHexDigit(j))return G+=Y(),void(K="hexadecimalInteger");throw Fu(H.Char,Y())},hexadecimalInteger(){if(!w.JudgeUtil.isHexDigit(j))return Du("numeric",q*Number(G));G+=Y()},identifierNameStartEscape(){if("u"!==j)throw Fu(H.Char,Y());Y();const u=tu();switch(u){case"$":case"_":break;default:if(!w.JudgeUtil.isIdStartChar(u))throw Fu(H.Identifier)}G+=u,K="identifierName"},identifierName(){switch(j){case"$":case"_":case"":case"":return void(G+=Y());case"\\":return Y(),void(K="identifierNameEscape")}if(!w.JudgeUtil.isIdContinueChar(j))return Du("identifier",G);G+=Y()},identifierNameEscape(){if("u"!==j)throw Fu(H.Char,Y());Y();const u=tu();switch(u){case"$":case"_":case"":case"":break;default:if(!w.JudgeUtil.isIdContinueChar(u))throw Fu(H.Identifier)}G+=u,K="identifierName"},string(){switch(j){case"\\":return Y(),void(G+=function(){const u=Q(),D=function(){switch(Q()){case"b":return Y(),"\b";case"f":return Y(),"\f";case"n":return Y(),"\n";case"r":return Y(),"\r";case"t":return Y(),"\t";case"v":return Y(),"\v"}return}();if(D)return D;switch(u){case"0":if(Y(),w.JudgeUtil.isDigit(Q()))throw Fu(H.Char,Y());return"\0";case"x":return Y(),function(){let u="",D=Q();if(!w.JudgeUtil.isHexDigit(D))throw Fu(H.Char,Y());if(u+=Y(),D=Q(),!w.JudgeUtil.isHexDigit(D))throw Fu(H.Char,Y());return u+=Y(),String.fromCodePoint(parseInt(u,16))}();case"u":return Y(),tu();case"\n":case"\u2028":case"\u2029":return Y(),"";case"\r":return Y(),"\n"===Q()&&Y(),""}if(void 0===u||w.JudgeUtil.isDigitWithoutZero(u))throw Fu(H.Char,Y());return Y()}());case'"':case"'":if(j===z){const u=Du("string",G);return Y(),u}return void(G+=Y());case"\n":case"\r":case void 0:throw Fu(H.Char,Y());case"\u2028":case"\u2029":!function(u){console.warn(`JSON5: '${Cu(u)}' in strings is not valid ECMAScript; consider escaping.`)}(j)}G+=Y()}};function Du(u,D){return{type:u,value:D,line:L,column:$}}function eu(u){for(const D of u){if(Q()!==D)throw Fu(H.Char,Y());Y()}}function tu(){let u="",D=4;for(;D-- >0;){const D=Q();if(!w.JudgeUtil.isHexDigit(D))throw Fu(H.Char,Y());u+=Y()}return String.fromCodePoint(parseInt(u,16))}const ru={start(){if("eof"===x.type)throw Fu(H.EOF);nu()},beforePropertyName(){switch(x.type){case"identifier":case"string":return T=x.value,void(J="afterPropertyName");case"punctuator":return void iu();case"eof":throw Fu(H.EOF)}},afterPropertyName(){if("eof"===x.type)throw Fu(H.EOF);J="beforePropertyValue"},beforePropertyValue(){if("eof"===x.type)throw Fu(H.EOF);nu()},afterPropertyValue(){if("eof"===x.type)throw Fu(H.EOF);switch(x.value){case",":return void(J="beforePropertyName");case"}":iu()}},beforeArrayValue(){if("eof"===x.type)throw Fu(H.EOF);"punctuator"!==x.type||"]"!==x.value?nu():iu()},afterArrayValue(){if("eof"===x.type)throw Fu(H.EOF);switch(x.value){case",":return void(J="beforeArrayValue");case"]":iu()}},end(){}};function nu(){const u=function(){let u;switch(x.type){case"punctuator":switch(x.value){case"{":u={};break;case"[":u=[]}break;case"null":case"boolean":case"numeric":case"string":u=x.value}return u}();if(k&&"object"==typeof u&&(u._line=L,u._column=$),void 0===V)V=u;else{const D=U[U.length-1];Array.isArray(D)?k&&"object"!=typeof u?D.push({value:u,_line:L,_column:$}):D.push(u):D[T]=k&&"object"!=typeof u?{value:u,_line:L,_column:$}:u}!function(u){if(u&&"object"==typeof u)U.push(u),J=Array.isArray(u)?"beforeArrayValue":"beforePropertyName";else{const u=U[U.length-1];J=u?Array.isArray(u)?"afterArrayValue":"afterPropertyValue":"end"}}(u)}function iu(){U.pop();const u=U[U.length-1];J=u?Array.isArray(u)?"afterArrayValue":"afterPropertyValue":"end"}function Cu(u){const D={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};if(D[u])return D[u];if(u<" "){const D=u.charCodeAt(0).toString(16);return`\\x${`00${D}`.substring(D.length)}`}return u}function Fu(u,D){let e="";switch(u){case H.Char:e=void 0===D?`JSON5: invalid end of input at ${L}:${$}`:`JSON5: invalid character '${Cu(D)}' at ${L}:${$}`;break;case H.EOF:e=`JSON5: invalid end of input at ${L}:${$}`;break;case H.Identifier:$-=5,e=`JSON5: invalid identifier character at ${L}:${$}`}const t=new Eu(e);return t.lineNumber=L,t.columnNumber=$,t}class Eu extends SyntaxError{}var Au={},ou=n&&n.__createBinding||(Object.create?function(u,D,e,t){void 0===t&&(t=e);var r=Object.getOwnPropertyDescriptor(D,e);r&&!("get"in r?!D.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return D[e]}}),Object.defineProperty(u,t,r)}:function(u,D,e,t){void 0===t&&(t=e),u[t]=D[e]}),au=n&&n.__setModuleDefault||(Object.create?function(u,D){Object.defineProperty(u,"default",{enumerable:!0,value:D})}:function(u,D){u.default=D}),cu=n&&n.__importStar||function(u){if(u&&u.__esModule)return u;var D={};if(null!=u)for(var e in u)"default"!==e&&Object.prototype.hasOwnProperty.call(u,e)&&ou(D,u,e);return au(D,u),D},su=n&&n.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(Au,"__esModule",{value:!0}),Au.isFileExists=Au.offlinePluginConversion=Au.executeCommand=Au.getNpmPath=Au.hasNpmPackInPaths=void 0;const lu=t,Bu=su(e),du=cu(u),fu=i,_u=l;Au.hasNpmPackInPaths=function(u,D){try{return require.resolve(u,{paths:[...D]}),!0}catch(u){return!1}},Au.getNpmPath=function(){const u=process.execPath;return du.join(du.dirname(u),fu.NPM_TOOL)},Au.executeCommand=function(u,D,e){0!==(0,lu.spawnSync)(u,D,e).status&&(0,_u.logErrorAndExit)(`Error: ${u} ${D} execute failed.See above for details.`)},Au.offlinePluginConversion=function(u,D){return D.startsWith("file:")||D.endsWith(".tgz")?du.resolve(u,fu.HVIGOR,D.replace("file:","")):D},Au.isFileExists=function(u){return Bu.default.existsSync(u)&&Bu.default.statSync(u).isFile()};var pu={};!function(u){var D=n&&n.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(u,"__esModule",{value:!0}),u.hashFile=u.hash=u.createHash=void 0;const t=D(r),i=D(e);u.createHash=(u="MD5")=>t.default.createHash(u);u.hash=(D,e)=>(0,u.createHash)(e).update(D).digest("hex");u.hashFile=(D,e)=>{if(i.default.existsSync(D))return(0,u.hash)(i.default.readFileSync(D,"utf-8"),e)}}(pu);var Ou=n&&n.__createBinding||(Object.create?function(u,D,e,t){void 0===t&&(t=e);var r=Object.getOwnPropertyDescriptor(D,e);r&&!("get"in r?!D.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return D[e]}}),Object.defineProperty(u,t,r)}:function(u,D,e,t){void 0===t&&(t=e),u[t]=D[e]}),hu=n&&n.__setModuleDefault||(Object.create?function(u,D){Object.defineProperty(u,"default",{enumerable:!0,value:D})}:function(u,D){u.default=D}),Pu=n&&n.__importStar||function(u){if(u&&u.__esModule)return u;var D={};if(null!=u)for(var e in u)"default"!==e&&Object.prototype.hasOwnProperty.call(u,e)&&Ou(D,u,e);return hu(D,u),D},vu=n&&n.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(P,"__esModule",{value:!0});var gu=P.initProjectWorkSpace=void 0;const mu=Pu(e),Ru=Pu(u),yu=i,Iu=v,Nu=l,bu=Au,Su=vu(D),wu=pu;let Hu,xu,Mu;function Tu(u,D,e){return void 0!==e.dependencies&&(0,bu.offlinePluginConversion)(yu.HVIGOR_PROJECT_ROOT_DIR,D.dependencies[u])===Ru.normalize(e.dependencies[u])}function Vu(){const u=Ru.join(Mu,yu.WORK_SPACE);if((0,Nu.logInfoPrintConsole)("Hvigor cleaning..."),!mu.existsSync(u))return;const D=mu.readdirSync(u);if(!D||0===D.length)return;const e=Ru.resolve(Mu,"node_modules","@ohos","hvigor","bin","hvigor.js");mu.existsSync(e)&&(0,bu.executeCommand)(process.argv[0],[e,"--stop-daemon"],{});try{D.forEach((D=>{mu.rmSync(Ru.resolve(u,D),{recursive:!0})}))}catch(D){(0,Nu.logErrorAndExit)(`The hvigor build tool cannot be installed. Please manually clear the workspace directory and synchronize the project again.\n\n Workspace Path: ${u}.`)}}gu=P.initProjectWorkSpace=function(){if(Hu=function(){const u=Ru.resolve(yu.HVIGOR_PROJECT_WRAPPER_HOME,yu.DEFAULT_HVIGOR_CONFIG_JSON_FILE_NAME);mu.existsSync(u)||(0,Nu.logErrorAndExit)(`Error: Hvigor config file ${u} does not exist.`);return(0,Iu.parseJsonFile)(u)}(),Mu=function(u){let D,e=u.hvigorVersion;e.endsWith(".tgz")&&(e=function(u){let D=Ru.normalize(u);const e=D.lastIndexOf(Ru.sep);-1!==e&&(D=D.substring(e+1));D=D.replace(".tgz","");let t=0;for(let u=0;u="0"&&D.charAt(u)<="9"){t=u;break}return D=D.substring(t),D}(e));D=e>"2.5.0"?function(u){let D=`${yu.HVIGOR_ENGINE_PACKAGE_NAME}@${u.hvigorVersion}`;const e=u.dependencies;if(e){Object.getOwnPropertyNames(e).sort().forEach((u=>{D+=`,${u}@${e[u]}`}))}return(0,wu.hash)(D)}(u):(0,wu.hash)(process.cwd());return Ru.resolve(Su.default.homedir(),".hvigor","project_caches",D)}(Hu),xu=function(){const u=Ru.resolve(Mu,yu.WORK_SPACE,yu.DEFAULT_PACKAGE_JSON);return mu.existsSync(u)?(0,Iu.parseJsonFile)(u):{dependencies:{}}}(),!(0,bu.hasNpmPackInPaths)(yu.HVIGOR_ENGINE_PACKAGE_NAME,[Ru.join(Mu,yu.WORK_SPACE)])||(0,bu.offlinePluginConversion)(yu.HVIGOR_PROJECT_ROOT_DIR,Hu.hvigorVersion)!==xu.dependencies[yu.HVIGOR_ENGINE_PACKAGE_NAME]||!function(){function u(u){const D=null==u?void 0:u.dependencies;return void 0===D?0:Object.getOwnPropertyNames(D).length}const D=u(Hu),e=u(xu);if(D+1!==e)return!1;for(const u in null==Hu?void 0:Hu.dependencies)if(!(0,bu.hasNpmPackInPaths)(u,[Ru.join(Mu,yu.WORK_SPACE)])||!Tu(u,Hu,xu))return!1;return!0}()){Vu();try{!function(){(0,Nu.logInfoPrintConsole)("Hvigor installing...");for(const u in Hu.dependencies)Hu.dependencies[u]&&(Hu.dependencies[u]=(0,bu.offlinePluginConversion)(yu.HVIGOR_PROJECT_ROOT_DIR,Hu.dependencies[u]));const u={dependencies:{...Hu.dependencies}};u.dependencies[yu.HVIGOR_ENGINE_PACKAGE_NAME]=(0,bu.offlinePluginConversion)(yu.HVIGOR_PROJECT_ROOT_DIR,Hu.hvigorVersion);const D=Ru.join(Mu,yu.WORK_SPACE);try{mu.mkdirSync(D,{recursive:!0});const e=Ru.resolve(D,yu.DEFAULT_PACKAGE_JSON);mu.writeFileSync(e,JSON.stringify(u))}catch(u){(0,Nu.logErrorAndExit)(u)}(function(){const u=["config","set","store-dir",yu.HVIGOR_PNPM_STORE_PATH],D={cwd:Ru.join(Mu,yu.WORK_SPACE),stdio:["inherit","inherit","inherit"]};(0,bu.executeCommand)(yu.HVIGOR_WRAPPER_PNPM_SCRIPT_PATH,u,D)})(),function(){const u=["install"],D={cwd:Ru.join(Mu,yu.WORK_SPACE),stdio:["inherit","inherit","inherit"]};(0,bu.executeCommand)(yu.HVIGOR_WRAPPER_PNPM_SCRIPT_PATH,u,D)}(),(0,Nu.logInfoPrintConsole)("Hvigor install success.")}()}catch(u){Vu()}}return Mu};var Gu={};!function(r){var C=n&&n.__createBinding||(Object.create?function(u,D,e,t){void 0===t&&(t=e);var r=Object.getOwnPropertyDescriptor(D,e);r&&!("get"in r?!D.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return D[e]}}),Object.defineProperty(u,t,r)}:function(u,D,e,t){void 0===t&&(t=e),u[t]=D[e]}),F=n&&n.__setModuleDefault||(Object.create?function(u,D){Object.defineProperty(u,"default",{enumerable:!0,value:D})}:function(u,D){u.default=D}),E=n&&n.__importStar||function(u){if(u&&u.__esModule)return u;var D={};if(null!=u)for(var e in u)"default"!==e&&Object.prototype.hasOwnProperty.call(u,e)&&C(D,u,e);return F(D,u),D},A=n&&n.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(r,"__esModule",{value:!0}),r.executeInstallPnpm=r.isPnpmInstalled=r.environmentHandler=r.checkNpmConifg=r.PNPM_VERSION=void 0;const o=t,a=E(e),c=A(D),s=E(u),B=i,d=l,f=Au;r.PNPM_VERSION="7.30.0",r.checkNpmConifg=function(){const u=s.resolve(B.HVIGOR_PROJECT_ROOT_DIR,".npmrc"),D=s.resolve(c.default.homedir(),".npmrc");if((0,f.isFileExists)(u)||(0,f.isFileExists)(D))return;const e=(0,f.getNpmPath)(),t=(0,o.spawnSync)(e,["config","get","prefix"],{cwd:B.HVIGOR_PROJECT_ROOT_DIR});if(0!==t.status||!t.stdout)return void(0,d.logErrorAndExit)("Error: The hvigor depends on the npmrc file. Configure the npmrc file first.");const r=s.resolve(`${t.stdout}`.replace(/[\r\n]/gi,""),".npmrc");(0,f.isFileExists)(r)||(0,d.logErrorAndExit)("Error: The hvigor depends on the npmrc file. Configure the npmrc file first.")},r.environmentHandler=function(){process.env["npm_config_update-notifier"]="false"},r.isPnpmInstalled=function(){return!!a.existsSync(B.HVIGOR_WRAPPER_PNPM_SCRIPT_PATH)&&(0,f.hasNpmPackInPaths)("pnpm",[B.HVIGOR_WRAPPER_TOOLS_HOME])},r.executeInstallPnpm=function(){(0,d.logInfoPrintConsole)(`Installing pnpm@${r.PNPM_VERSION}...`);const u=(0,f.getNpmPath)();!function(){const u=s.resolve(B.HVIGOR_WRAPPER_TOOLS_HOME,B.DEFAULT_PACKAGE_JSON);try{a.existsSync(B.HVIGOR_WRAPPER_TOOLS_HOME)||a.mkdirSync(B.HVIGOR_WRAPPER_TOOLS_HOME,{recursive:!0});const D={dependencies:{}};D.dependencies[B.PNPM]=r.PNPM_VERSION,a.writeFileSync(u,JSON.stringify(D))}catch(D){(0,d.logErrorAndExit)(`Error: EPERM: operation not permitted,create ${u} failed.`)}}(),(0,f.executeCommand)(u,["install","pnpm"],{cwd:B.HVIGOR_WRAPPER_TOOLS_HOME,stdio:["inherit","inherit","inherit"],env:process.env}),(0,d.logInfoPrintConsole)("Pnpm install success.")}}(Gu),function(){Gu.checkNpmConifg(),Gu.environmentHandler(),Gu.isPnpmInstalled()||Gu.executeInstallPnpm();const D=gu();_(u.join(D,i.WORK_SPACE))}();
\ No newline at end of file
diff --git a/code/DocsSample/Media/Audio/OHAudio/hvigorfile.ts b/code/DocsSample/Media/Audio/OHAudio/hvigorfile.ts
new file mode 100644
index 000000000..1ade11a53
--- /dev/null
+++ b/code/DocsSample/Media/Audio/OHAudio/hvigorfile.ts
@@ -0,0 +1,2 @@
+// Script for compiling build behavior. It is built in the build plug-in and cannot be modified currently.
+export { appTasks } from '@ohos/hvigor-ohos-plugin';
diff --git a/code/BasicFeature/InsightIntent/IntentExecutor/hvigorw b/code/DocsSample/Media/Audio/OHAudio/hvigorw
similarity index 95%
rename from code/BasicFeature/InsightIntent/IntentExecutor/hvigorw
rename to code/DocsSample/Media/Audio/OHAudio/hvigorw
index 54aadd226..ff6a29a2a 100644
--- a/code/BasicFeature/InsightIntent/IntentExecutor/hvigorw
+++ b/code/DocsSample/Media/Audio/OHAudio/hvigorw
@@ -2,15 +2,15 @@
# ----------------------------------------------------------------------------
# Hvigor startup script, version 1.0.0
-#
+#
# Required ENV vars:
# ------------------
# NODE_HOME - location of a Node home dir
-# or
+# or
# Add /usr/local/nodejs/bin to the PATH environment variable
# ----------------------------------------------------------------------------
-HVIGOR_APP_HOME=$(dirname $(readlink -f $0))
+HVIGOR_APP_HOME="`pwd -P`"
HVIGOR_WRAPPER_SCRIPT=${HVIGOR_APP_HOME}/hvigor/hvigor-wrapper.js
warn() {
echo ""
diff --git a/code/SystemFeature/InsightIntent/IntentDriver/hvigorw.bat b/code/DocsSample/Media/Audio/OHAudio/hvigorw.bat
similarity index 97%
rename from code/SystemFeature/InsightIntent/IntentDriver/hvigorw.bat
rename to code/DocsSample/Media/Audio/OHAudio/hvigorw.bat
index 6861293e4..d570007e8 100644
--- a/code/SystemFeature/InsightIntent/IntentDriver/hvigorw.bat
+++ b/code/DocsSample/Media/Audio/OHAudio/hvigorw.bat
@@ -51,7 +51,7 @@ goto fail
:execute
@rem Execute hvigor
-"%NODE_EXE%" %WRAPPER_MODULE_PATH% %*
+"%NODE_EXE%" "%WRAPPER_MODULE_PATH%" %*
if "%ERRORLEVEL%" == "0" goto hvigorwEnd
diff --git a/code/SystemFeature/InsightIntent/IntentDriver/oh-package.json5 b/code/DocsSample/Media/Audio/OHAudio/oh-package.json5
similarity index 93%
rename from code/SystemFeature/InsightIntent/IntentDriver/oh-package.json5
rename to code/DocsSample/Media/Audio/OHAudio/oh-package.json5
index 993c1fc12..e96805881 100644
--- a/code/SystemFeature/InsightIntent/IntentDriver/oh-package.json5
+++ b/code/DocsSample/Media/Audio/OHAudio/oh-package.json5
@@ -1,27 +1,27 @@
-/*
- * Copyright (c) 2023 Huawei Device Co., Ltd.
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-{
- "license": "",
- "devDependencies": {
- "@ohos/hypium": "1.0.6"
- },
- "author": "",
- "name": "intentdriver",
- "description": "Please describe the basic information.",
- "main": "",
- "version": "1.0.0",
- "dependencies": {}
-}
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+{
+ "license": "",
+ "devDependencies": {
+ "@ohos/hypium": "1.0.6"
+ },
+ "author": "",
+ "name": "audio",
+ "description": "Please describe the basic information.",
+ "main": "",
+ "version": "1.0.0",
+ "dependencies": {}
+}
diff --git a/code/DocsSample/Media/Audio/OHAudio/ohosTest.md b/code/DocsSample/Media/Audio/OHAudio/ohosTest.md
new file mode 100644
index 000000000..87561e061
--- /dev/null
+++ b/code/DocsSample/Media/Audio/OHAudio/ohosTest.md
@@ -0,0 +1,30 @@
+# AudioManager 测试用例归档
+
+## 用例表
+
+| 测试功能 | 预置条件 | 输入 | 预期输出 | 是否自动 | 测试结果 |
+|-----------------|---------------|------------------|--------------------------------------------------------------------|------|------|
+| 拉起应用 | 设备正常运行 | | 成功拉起应用 | 是 | Pass |
+| 允许权限 | 设备正常运行 | 点击权限弹窗允许按钮 | 授权后成功进入首页 | 是 |Pass|
+| 主页展示 | 设备正常运行 | | 展示发声设备查询与选择和音频焦点的入口按钮 | 是 | Pass |
+| 主页按钮点击 | 位于主页 | 点击“录制和播放” | 跳转“录制和播放”页面 | 是 | Pass |
+| 打开低时延录制 | 录制和播放页面 | 点击低时延录制开关 | 低时延录制按钮变为打开状态 | 是 | pass |
+| 开始录制 | 录制和播放页面 | 点击开始录制按钮 | 录制开始,开始录制按钮变为录制中,同时计时展示当前的录制时长,右侧会出现暂停录制按钮 | 是 | pass |
+| 暂停录制 | 录制和播放页面 | 点击暂停录制按钮 | 录制被暂停,时长也停止计时,同时暂停按钮变为继续按钮 | 是 | pass |
+| 继续录制 | 录制和播放页面 | 点击继续录制按钮 | 继续开始录制,时长在暂停前基础上,继续累增计时,继续按钮又变成暂停按钮 | 是 | pass |
+| 停止录制 | 录制和播放页面 | 点击停止录制按钮 | 录制按钮变为不可点击状态,低时延录制开关变为不可点击状态,计时消失,暂停按钮也消失,同时界面中增加低时延播放开关和一条录音音频播放器 | 是 | pass |
+| 打开低时延播放 | 录制和播放页面 | 点击低时延播放开关 | 低时延播放按钮变为打开状态 | 是 | pass |
+| 播放录音数据 | 录制和播放页面 | 点击播放器的播放按钮 | 播放按钮变成了暂停按钮,同时会播放上述步骤所采集的录音数据 | 是 | pass |
+| 暂停播放音频 | 录制和播放页面 | 点击播放器的暂停按钮 | 暂停按钮变成播放按钮,同时停止播放 | 是 | pass |
+| 继续播放录音数据 | 录制和播放页面 | 点击播放器的播放按钮 | 播放按钮变成了暂停按钮,同时会播放上述步骤所采集的录音数据 | 是 | pass |
+| 暂停播放音频 | 录制和播放页面 | 点击播放器的暂停按钮 | 暂停按钮变成播放按钮,同时停止播放 | 是 | pass |
+| 返回主页 | 录制和播放页面 | 点击返回按钮 | 返回到主页面 | 是 | pass |
+| 进入Audiovivid播放页 | 位于主页 | 点击Audiovivid播放卡片 | 进入Audiovivid播放页 | 是 | pass |
+| 播放普通音乐 | Audiovivid播放页 | 点击播放按钮 | 播放普通格式音乐 | 是 | pass |
+| 暂停普通音乐 | Audiovivid播放页 | 点击暂停按钮 | 暂停普通格式音乐 | 是 | pass |
+| 播放Audiovivid音乐 | Audiovivid播放页 | 点击播放按钮 | 播放Audiovivid格式音乐 | 是 | pass |
+| 暂停Audiovivid音乐 | Audiovivid播放页 | 点击暂停按钮 | 暂停Audiovivid格式音乐 | 是 | pass |
+| 返回主页 | Audiovivid播放页 | 点击返回按钮 | 返回到主页面 | 是 | pass |
+
+
+
diff --git a/code/DocsSample/Media/Audio/OHAudio/screenshots/device/AudioVivid.jpg b/code/DocsSample/Media/Audio/OHAudio/screenshots/device/AudioVivid.jpg
new file mode 100644
index 000000000..916826b2e
Binary files /dev/null and b/code/DocsSample/Media/Audio/OHAudio/screenshots/device/AudioVivid.jpg differ
diff --git a/code/DocsSample/Media/Audio/OHAudio/screenshots/device/index.jpg b/code/DocsSample/Media/Audio/OHAudio/screenshots/device/index.jpg
new file mode 100644
index 000000000..e8b8d4f00
Binary files /dev/null and b/code/DocsSample/Media/Audio/OHAudio/screenshots/device/index.jpg differ
diff --git a/code/DocsSample/Media/Audio/OHAudio/screenshots/device/play.jpeg b/code/DocsSample/Media/Audio/OHAudio/screenshots/device/play.jpeg
new file mode 100644
index 000000000..b14ce3df4
Binary files /dev/null and b/code/DocsSample/Media/Audio/OHAudio/screenshots/device/play.jpeg differ
diff --git a/code/DocsSample/Media/Audio/OHAudio/screenshots/device/record.jpeg b/code/DocsSample/Media/Audio/OHAudio/screenshots/device/record.jpeg
new file mode 100644
index 000000000..29d2ef055
Binary files /dev/null and b/code/DocsSample/Media/Audio/OHAudio/screenshots/device/record.jpeg differ
diff --git a/code/SuperFeature/DistributedAppDev/ArkTSDistributedMusicPlayer/entry/src/main/ets/MainAbility/MainAbility.ts b/code/SuperFeature/DistributedAppDev/ArkTSDistributedMusicPlayer/entry/src/main/ets/MainAbility/MainAbility.ts
index 69f6f78de..79e745867 100644
--- a/code/SuperFeature/DistributedAppDev/ArkTSDistributedMusicPlayer/entry/src/main/ets/MainAbility/MainAbility.ts
+++ b/code/SuperFeature/DistributedAppDev/ArkTSDistributedMusicPlayer/entry/src/main/ets/MainAbility/MainAbility.ts
@@ -82,6 +82,10 @@ export default class MainAbility extends UIAbility {
onBackPressed() {
Logger.info(TAG, '[Demo] MainAbility onBackPressed');
+ let exitMusicApp = AppStorage.get('exitMusicApp');
+ if (exitMusicApp !== undefined) {
+ AppStorage.setOrCreate('exitMusicApp',!exitMusicApp);
+ }
return false;
}
};
diff --git a/code/SuperFeature/DistributedAppDev/ArkTSDistributedMusicPlayer/entry/src/main/ets/serviceability/ServiceAbility.ts b/code/SuperFeature/DistributedAppDev/ArkTSDistributedMusicPlayer/entry/src/main/ets/serviceability/ServiceAbility.ts
index d229aedb7..9618f2dbf 100644
--- a/code/SuperFeature/DistributedAppDev/ArkTSDistributedMusicPlayer/entry/src/main/ets/serviceability/ServiceAbility.ts
+++ b/code/SuperFeature/DistributedAppDev/ArkTSDistributedMusicPlayer/entry/src/main/ets/serviceability/ServiceAbility.ts
@@ -22,8 +22,6 @@ import {
MusicSharedEventCode,
MusicConnectEvent
} from '../common/MusicSharedDefinition';
-import PlayerModel from '../model/PlayerModel';
-import media from '@ohos.multimedia.media';
const TAG: string = 'ServiceAbility'
const CONNECT_REMOTE_TIMEOUT = 10000
@@ -204,10 +202,6 @@ export default class ServiceAbility extends ServiceExtensionAbility {
Logger.error(TAG, 'ServiceAbility context does not exist or is empty')
return
}
- if (PlayerModel.player === undefined) {
- PlayerModel.player = media.createAudioPlayer();
- PlayerModel.initAudioPlayer();
- }
return new DistributedMusicServiceExtension('ohos.samples.distributedMusicServiceExtension', this.context)
}
diff --git a/code/SystemFeature/FileManagement/MediaCollections/entry/src/main/ets/model/MediaUtils.ts b/code/SystemFeature/FileManagement/MediaCollections/entry/src/main/ets/model/MediaUtils.ts
index 0b9743b6c..a784e976f 100644
--- a/code/SystemFeature/FileManagement/MediaCollections/entry/src/main/ets/model/MediaUtils.ts
+++ b/code/SystemFeature/FileManagement/MediaCollections/entry/src/main/ets/model/MediaUtils.ts
@@ -13,6 +13,7 @@
* limitations under the License.
*/
+// @ts-nocheck
import dataSharePredicates from '@ohos.data.dataSharePredicates';
import userFileManager from '@ohos.filemanagement.userFileManager';
import Logger from '../model/Logger';
diff --git a/code/SystemFeature/InsightIntent/IntentDriver/AppScope/resources/base/media/app_icon.png b/code/SystemFeature/InsightIntent/IntentDriver/AppScope/resources/base/media/app_icon.png
deleted file mode 100644
index ce307a882..000000000
Binary files a/code/SystemFeature/InsightIntent/IntentDriver/AppScope/resources/base/media/app_icon.png and /dev/null differ
diff --git a/code/SystemFeature/InsightIntent/IntentDriver/README_zh.md b/code/SystemFeature/InsightIntent/IntentDriver/README_zh.md
deleted file mode 100644
index 279303d76..000000000
--- a/code/SystemFeature/InsightIntent/IntentDriver/README_zh.md
+++ /dev/null
@@ -1,110 +0,0 @@
-# 意图执行
-
-### 介绍
-
-本示例使用[@ohos.app.ability.InsightIntentExecutor](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/reference/apis/js-apis-app-ability-insightIntentExecutor.md)、[@ohos.app.ability.insightIntent](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/reference/apis/js-apis-app-ability-insightIntent.md)、[@ohos.app.ability.insightIntentDriver](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/reference/apis/js-apis-app-ability-insightIntentDriver.md)等接口,展示了意图绑定到UIAbility前台执行、意图绑定到ServiceExtension执行两种意图执行方法,主要包括构造意图配置文件、构造意图调用执行参数、触发意图调用的执行、取得意图调用结果等。
-
-### 效果预览:
-
-| 主页 | 意图绑定到UIAbility前台执行
(参照应用[IntentExecutor](../../../BasicFeature/InsightIntent/IntentExecutor)) | 意图绑定到ServiceExtension执行 |
-| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ |
-| | | |
-
-使用说明
-
-1.启动应用后,主页面上显示两个按钮:意图绑定到UIAbility前台、意图绑定到ServiceExtension;
-
-2.点击按钮“意图绑定到UIAbility前台”,触发意图执行,在意图调用业务逻辑中加载新的页面,返回意图调用结果通过promptAction.showToast显示结果;
-
-3.点击按钮“意图绑定到ServiceExtension”,触发意图执行,返回意图调用结果并通过promptAction.showToast显示结果;
-
-### 工程目录
-
-```
-entry/src/main/
-├─ets
-│ ├─entryability
-│ │ └─EntryAbility.ets // UIAbility,意图绑定到该UIAbility前台执行
-│ ├─intents
-│ │ ├─PlayMusicIntentDriver.ets // 通过insightIntentDriver.execute执行意图调用
-│ │ └─PlayMusicIntentExecutorImpl.ets // 通过意图调用执行基类对接端侧意图框架,实现响应意图调用的业务逻辑
-│ ├─pages
-│ │ └─Index.ets // 主页面,通过按钮点击事件将意图调用转发给模块PlayMusicIntentDriver
-│ ├─serviceextability
-│ │ └─ServiceExtAbility.ets // ServiceExtensionAbility,意图绑定到该ServiceExtension执行
-│ └─util
-│ └─Logger.ets // 日志工具
-└─resources
- └─base
- └─profile
- └─insight_intent.json // 意图配置文件
-```
-
-### 具体实现
-
-* 实现意图调用业务逻辑的功能接口封装在PlayMusicIntentExecutorImpl,源码参考:[PlayMusicIntentExecutorImpl.ets](entry/src/main/ets/intents/PlayMusicIntentExecutorImpl.ets)
- * 意图绑定到ServiceExtension运行的业务逻辑:
-
- 实现意图调用执行基类InsightIntentExecutor的onExecuteInServiceExtensionAbility()回调函数;
-
-* 触发意图调用的接口封装在PlayMusicIntentDriver,源码参考:[PlayMusicIntentDriver.ets](entry/src/main/ets/intents/PlayMusicIntentDriver.ets)
- * 触发绑定到UIAbility前台运行的意图调用:
- 在函数executeUIAbilityForeground中,构造意图调用执行参数,调用@ohos.app.ability.insightIntentDriver中的execute接口触发意图调用;
-
- * 触发绑定到ServiceExtension运行的意图调用:
-
- 在函数executeServiceExtension中,构造意图调用执行参数,调用@ohos.app.ability.insightIntentDriver中的execute接口触发意图调用;
-
-* 在意图配置文件[insight_intent.json](entry/src/main/resources/base/profile/insight_intent.json)中配置应用支持的意图API列表
- * 配置内容包括:
- 意图API名称、意图API所属的垂域、意图API版本号、代码相对路径入口、执行模式等;
-
-* 在主页面[Index.ets](entry/src/main/ets/pages/Index.ets)中通过按钮的onClick事件将意图调用转发给模块PlayMusicIntentDriver
- * 意图绑定到UIAbility前台按钮
- 点击按钮时,调用PlayMusicIntentDriver的executeUIAbilityForeground函数,触发意图调用;
- * 意图绑定到ServiceExtension按钮
- 点击按钮时,调用PlayMusicIntentDriver的executeServiceExtension函数,触发意图调用;
-
-### 相关权限
-
-[ohos.permission.EXECUTE_INSIGHT_INTENT](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/security/permission-list.md)
-
-### 依赖
-
-本应用的运行依赖应用[IntentExecutor](../../../BasicFeature/InsightIntent/IntentExecutor)。
-
-### 约束与限制
-
-1.本示例仅支持标准系统上运行,支持设备:RK3568;
-
-2.本示例为Stage模型,支持API11版本SDK,版本号:4.1.3.1;
-
-3.本示例涉及使用系统接口:insightIntentDriver.execute,需要手动替换Full SDK才能编译通过;
-
-4.本示例需要使用DevEco Studio 3.1.1 Release (Build Version: 3.1.0.501, built on June 20, 2023)才可编译运行;
-
-5.本示例涉及[ohos.permission.EXECUTE_INSIGHT_INTENT](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/security/permission-list.md)权限为system_basic级别,需要配置高权限签名;
-
-6.本示例使用了ServiceExtensionAbility,需要手动配置特权应用能力申请"app-privilege-capabilities": ["AllowAppUsePrivilegeExtension"],否则安装失败。具体操作指南可参考[应用特权配置指南]( https://gitee.com/openharmony/docs/blob/eb73c9e9dcdd421131f33bb8ed6ddc030881d06f/zh-cn/device-dev/subsystems/subsys-app-privilege-config-guide.md/ )。在文件最后添加内容:
- "app-privilege-capabilities" : [
- "AllowAppUsePrivilegeExtension"
- ]
-
-7.本示例中使用到ServiceExtensionAbility,需要将本示例加入到白名单中再进行安装。详细内容如下
-{
- "bundleName": "com.samples.intentdriver",
- "app_signature" : [],
- "allowAppUsePrivilegeExtension": true
-}
-
-### 下载
-
-如需单独下载本工程,执行如下命令:
-
-```
-git init
-git config core.sparsecheckout true
-echo code/SystemFeature/InsightIntent/IntentDriver/ > .git/info/sparse-checkout
-git remote add origin https://gitee.com/openharmony/applications_app_samples.git
-git pull origin master
-```
diff --git a/code/SystemFeature/InsightIntent/IntentDriver/entry/hvigorfile.ts b/code/SystemFeature/InsightIntent/IntentDriver/entry/hvigorfile.ts
deleted file mode 100644
index b16f61d76..000000000
--- a/code/SystemFeature/InsightIntent/IntentDriver/entry/hvigorfile.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-/*
- * Copyright (c) 2023 Huawei Device Co., Ltd.
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-// Script for compiling build behavior. It is built in the build plug-in and cannot be modified currently.
-export { hapTasks } from '@ohos/hvigor-ohos-plugin';
diff --git a/code/SystemFeature/InsightIntent/IntentDriver/entry/src/main/ets/intents/PlayMusicIntentDriver.ets b/code/SystemFeature/InsightIntent/IntentDriver/entry/src/main/ets/intents/PlayMusicIntentDriver.ets
deleted file mode 100644
index 195f90e7a..000000000
--- a/code/SystemFeature/InsightIntent/IntentDriver/entry/src/main/ets/intents/PlayMusicIntentDriver.ets
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- * Copyright (c) 2023 Huawei Device Co., Ltd.
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-import insightIntentDriver from '@ohos.app.ability.insightIntentDriver';
-import insightIntent from '@ohos.app.ability.insightIntent';
-import { logger } from '../util/Logger';
-import { BusinessError } from '@ohos.base';
-
-const TAG: string = '[PlayMusicIntentDriver]';
-
-class PlayMusicIntentDriver {
- public executeResult: insightIntent.ExecuteResult = { code: 0 };
- executeUIAbilityForeground = (): void => {
- let intentParam: Record = {
- 'songName': 'City Of Stars',
- };
- let param: insightIntentDriver.ExecuteParam = {
- bundleName: 'com.samples.intentexecutor',
- moduleName: 'entry',
- abilityName: 'EntryAbility',
- insightIntentName: 'PlayMusic',
- insightIntentParam: intentParam,
- executeMode: insightIntent.ExecuteMode.UI_ABILITY_FOREGROUND,
- };
-
- try {
- insightIntentDriver.execute(param, (error: BusinessError, data: insightIntent.ExecuteResult) => {
- if (error) {
- logger.info(TAG, `executeUIAbilityForeground failed with ${JSON.stringify(error)}`);
- } else {
- logger.info(TAG, 'executeUIAbilityForeground succeed');
- }
- logger.info(TAG, `executeUIAbilityForeground result ${JSON.stringify(data)}`);
- this.executeResult = data;
- });
- } catch (error) {
- logger.info(TAG, `executeUIAbilityForeground error caught ${JSON.stringify(error)}`);
- this.executeResult = {
- code: -1,
- result: { 'error': JSON.stringify(error) }
- }
- }
- }
- executeServiceExtension = (): void => {
- let intentParam: Record = {
- 'songName': 'City Of Stars',
- };
- let param: insightIntentDriver.ExecuteParam = {
- bundleName: 'com.samples.intentdriver',
- moduleName: 'entry',
- abilityName: 'ServiceExtAbility',
- insightIntentName: 'PlayMusic',
- insightIntentParam: intentParam,
- executeMode: insightIntent.ExecuteMode.SERVICE_EXTENSION_ABILITY,
- };
-
- try {
- insightIntentDriver.execute(param, (error: BusinessError, data: insightIntent.ExecuteResult) => {
- if (error) {
- logger.info(TAG, `executeServiceExtension failed with ${JSON.stringify(error)}`);
- } else {
- logger.info(TAG, 'executeServiceExtension succeed');
- }
- logger.info(TAG, `executeServiceExtension result ${JSON.stringify(data)}`);
- this.executeResult = data;
- })
- } catch (error) {
- logger.info(TAG, `executeServiceExtension error caught ${JSON.stringify(error)}`);
- this.executeResult = {
- code: -1,
- result: { 'error': JSON.stringify(error) }
- }
- }
- }
-}
-
-export let playMusicIntentDriver = new PlayMusicIntentDriver();
\ No newline at end of file
diff --git a/code/SystemFeature/InsightIntent/IntentDriver/entry/src/main/ets/intents/PlayMusicIntentExecutorImpl.ets b/code/SystemFeature/InsightIntent/IntentDriver/entry/src/main/ets/intents/PlayMusicIntentExecutorImpl.ets
deleted file mode 100644
index 42c88d917..000000000
--- a/code/SystemFeature/InsightIntent/IntentDriver/entry/src/main/ets/intents/PlayMusicIntentExecutorImpl.ets
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Copyright (c) 2023 Huawei Device Co., Ltd.
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-import IntentExecutor from '@ohos.app.ability.InsightIntentExecutor';
-import insightIntent from '@ohos.app.ability.insightIntent';
-import window from '@ohos.window';
-import { logger } from '../util/Logger';
-import router from '@ohos.router';
-
-const TAG: string = '[PlayMusicIntentExecutorImpl]';
-
-export default class PlayMusicIntentExecutorImpl extends IntentExecutor {
- onExecuteInServiceExtensionAbility(name: string, param: Record): insightIntent.ExecuteResult {
- let result: insightIntent.ExecuteResult;
- let msg: Record;
- if (name !== 'PlayMusic') {
- logger.info(TAG, `onExecuteInServiceExtensionAbility unsupported insight intent ${name}`);
- msg = {
- 'message': `onExecuteInServiceExtensionAbility unsupported insight intent ${name}`
- };
- result = {
- // decided by developer
- code: 404,
- result: msg
- };
- return result;
- }
-
- msg = {
- 'message': 'onExecuteInServiceExtensionAbility execute insight intent succeed.',
- 'name': name,
- 'param': JSON.stringify(param)
- };
- result = {
- code: 0,
- result: msg
- };
- return result;
- }
-}
\ No newline at end of file
diff --git a/code/SystemFeature/InsightIntent/IntentDriver/entry/src/main/ets/pages/Index.ets b/code/SystemFeature/InsightIntent/IntentDriver/entry/src/main/ets/pages/Index.ets
deleted file mode 100644
index ee81a8600..000000000
--- a/code/SystemFeature/InsightIntent/IntentDriver/entry/src/main/ets/pages/Index.ets
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * Copyright (c) 2023 Huawei Device Co., Ltd.
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-import PlayMusicIntentExecutorImpl from '../intents/PlayMusicIntentExecutorImpl';
-import { playMusicIntentDriver } from '../intents/PlayMusicIntentDriver';
-import promptAction from '@ohos.promptAction';
-
-const DELAY_MS: number = 500;
-const DURATION: number = 2500;
-
-@Entry
-@Component
-struct Index {
- @State message: string = '';
-
- build() {
- Column() {
- Text($r('app.string.intent_execute_title'))
- .fontColor('#182431')
- .fontSize(32)
- .fontWeight(700)
- .margin({ left: 72, top: 32 })
- .textAlign(TextAlign.Start)
- .width('100%')
- Button($r('app.string.IntentInUIAbilityForeground'))
- .type(ButtonType.Capsule)
- .borderRadius($r('sys.float.ohos_id_corner_radius_button'))
- .backgroundColor($r('app.color.button_background'))
- .fontColor($r('sys.color.ohos_id_color_foreground_contrary'))
- .fontSize($r('sys.float.ohos_id_text_size_button1'))
- .height(48)
- .width('624px')
- .margin({ top: 500 })
- .key('button_IntentInUIAbilityForeground')
- .onClick(() => {
- playMusicIntentDriver.executeUIAbilityForeground();
- setTimeout(() => {
- this.message = JSON.stringify(playMusicIntentDriver.executeResult);
- if (this.message != null) {
- promptAction.showToast({ message: this.message, duration: DURATION, bottom: 230 });
- }
- }, DELAY_MS)
- PlayMusicIntentExecutorImpl.length;
- })
- Button($r('app.string.IntentInServiceExtension'))
- .type(ButtonType.Capsule)
- .borderRadius($r('sys.float.ohos_id_corner_radius_button'))
- .backgroundColor($r('app.color.button_background'))
- .fontColor($r('sys.color.ohos_id_color_foreground_contrary'))
- .fontSize($r('sys.float.ohos_id_text_size_button1'))
- .height(48)
- .width('624px')
- .margin({ top: 16 })
- .id('button_IntentInServiceExtension')
- .onClick(() => {
- playMusicIntentDriver.executeServiceExtension();
- setTimeout(() => {
- this.message = JSON.stringify(playMusicIntentDriver.executeResult);
- if (this.message != null) {
- promptAction.showToast({ message: this.message, duration: DURATION, bottom: 230 });
- }
- }, DELAY_MS)
- })
- }
- .width('100%')
- .height('100%')
- .backgroundColor($r('sys.color.ohos_id_color_text_field_sub_bg'))
- }
-}
\ No newline at end of file
diff --git a/code/SystemFeature/InsightIntent/IntentDriver/entry/src/main/ets/serviceextability/ServiceExtAbility.ets b/code/SystemFeature/InsightIntent/IntentDriver/entry/src/main/ets/serviceextability/ServiceExtAbility.ets
deleted file mode 100644
index abbb60daa..000000000
--- a/code/SystemFeature/InsightIntent/IntentDriver/entry/src/main/ets/serviceextability/ServiceExtAbility.ets
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright (c) 2023 Huawei Device Co., Ltd.
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-import ServiceExtension from '@ohos.app.ability.ServiceExtensionAbility';
-import Want from '@ohos.app.ability.Want';
-import { Configuration } from '@ohos.app.ability.Configuration';
-import { logger } from '../util/Logger';
-
-const TAG: string = '[ServiceExtAbility]';
-
-export default class ServiceExtAbility extends ServiceExtension {
- onCreate(want: Want) {
- logger.info(TAG, `onCreate, want: ${want.abilityName}`);
- }
-
- onDestroy() {
- logger.info(TAG, `onDestroy`);
- }
-
- onRequest(want: Want, startId: number) {
- logger.info(TAG, `onRequest, want: ${want.abilityName}, startId: ${startId}`);
- }
-
- onConfigurationUpdate(config: Configuration) {
- logger.info(TAG, `onConfigurationUpdate, config: ${JSON.stringify(config)}`);
- }
-
- onDump(params: Array) {
- logger.info(TAG, `onDump, params: ${JSON.stringify(params)}`);
- return ['params'];
- }
-}
diff --git a/code/SystemFeature/InsightIntent/IntentDriver/entry/src/main/ets/util/Logger.ets b/code/SystemFeature/InsightIntent/IntentDriver/entry/src/main/ets/util/Logger.ets
deleted file mode 100644
index fd6f5cb67..000000000
--- a/code/SystemFeature/InsightIntent/IntentDriver/entry/src/main/ets/util/Logger.ets
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Copyright (c) 2023 Huawei Device Co., Ltd.
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-import hilog from '@ohos.hilog'
-
-class Logger {
- private domain: number;
- private prefix: string;
- private format: string = '%{public}s';
-
- constructor(prefix: string) {
- this.prefix = prefix;
- this.domain = 0xFF00;
- hilog.isLoggable(this.domain, prefix, hilog.LogLevel.INFO);
- hilog.isLoggable(this.domain, prefix, hilog.LogLevel.DEBUG);
- hilog.isLoggable(this.domain, prefix, hilog.LogLevel.WARN);
- hilog.isLoggable(this.domain, prefix, hilog.LogLevel.ERROR);
- }
-
- makeFormat(args_length: number): string {
- let format: string = this.format;
- for (let i = 0; i < args_length - 1; i++) {
- format += ', ' + this.format;
- }
- return format;
- }
-
- debug(...args: string[]) {
- hilog.debug(this.domain, this.prefix, this.makeFormat(args.length), args);
- }
-
- info(...args: string[]) {
- hilog.info(this.domain, this.prefix, this.makeFormat(args.length), args);
- }
-
- warn(...args: string[]) {
- hilog.warn(this.domain, this.prefix, this.makeFormat(args.length), args);
- }
-
- error(...args: string[]) {
- hilog.error(this.domain, this.prefix, this.makeFormat(args.length), args);
- }
-}
-
-export let logger = new Logger('[Sample_IntentDriver]');
\ No newline at end of file
diff --git a/code/SystemFeature/InsightIntent/IntentDriver/entry/src/main/resources/base/element/string.json b/code/SystemFeature/InsightIntent/IntentDriver/entry/src/main/resources/base/element/string.json
deleted file mode 100644
index 8b8b566c8..000000000
--- a/code/SystemFeature/InsightIntent/IntentDriver/entry/src/main/resources/base/element/string.json
+++ /dev/null
@@ -1,40 +0,0 @@
-{
- "string": [
- {
- "name": "module_desc",
- "value": "execute insight intent"
- },
- {
- "name": "EntryAbility_desc",
- "value": "IntentExecute UIAbility"
- },
- {
- "name": "EntryAbility_label",
- "value": "EntryAbility"
- },
- {
- "name": "ServiceExtAbility_desc",
- "value": "IntentExecute ServiceExtensionAbility"
- },
- {
- "name": "ServiceExtAbility_label",
- "value": "ServiceExtAbility"
- },
- {
- "name": "IntentInUIAbilityForeground",
- "value": "Intent To UIAbility Foreground"
- },
- {
- "name": "IntentInServiceExtension",
- "value": "Intent To ServiceExtension"
- },
- {
- "name": "intent_execute_title",
- "value": "Intent Execute"
- },
- {
- "name": "Back",
- "value": "Back"
- }
- ]
-}
\ No newline at end of file
diff --git a/code/SystemFeature/InsightIntent/IntentDriver/entry/src/main/resources/base/media/ic_back.svg b/code/SystemFeature/InsightIntent/IntentDriver/entry/src/main/resources/base/media/ic_back.svg
deleted file mode 100644
index 5e82eaf2d..000000000
--- a/code/SystemFeature/InsightIntent/IntentDriver/entry/src/main/resources/base/media/ic_back.svg
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
\ No newline at end of file
diff --git a/code/SystemFeature/InsightIntent/IntentDriver/entry/src/main/resources/base/profile/insight_intent.json b/code/SystemFeature/InsightIntent/IntentDriver/entry/src/main/resources/base/profile/insight_intent.json
deleted file mode 100644
index 81a1a17f6..000000000
--- a/code/SystemFeature/InsightIntent/IntentDriver/entry/src/main/resources/base/profile/insight_intent.json
+++ /dev/null
@@ -1,14 +0,0 @@
-{
- "insightIntents": [
- {
- "intentName": "PlayMusic",
- "domain": "MusicDomain",
- "intentVersion": "1.0.1",
- "srcEntry": "./ets/intents/PlayMusicIntentExecutorImpl.ets",
- "serviceExtension": {
- "ability": "ServiceExtAbility"
- }
- }
- ]
-}
-
diff --git a/code/SystemFeature/InsightIntent/IntentDriver/entry/src/main/resources/en_US/element/string.json b/code/SystemFeature/InsightIntent/IntentDriver/entry/src/main/resources/en_US/element/string.json
deleted file mode 100644
index 3faeee857..000000000
--- a/code/SystemFeature/InsightIntent/IntentDriver/entry/src/main/resources/en_US/element/string.json
+++ /dev/null
@@ -1,40 +0,0 @@
-{
- "string": [
- {
- "name": "module_desc",
- "value": "module description"
- },
- {
- "name": "EntryAbility_desc",
- "value": "description"
- },
- {
- "name": "EntryAbility_label",
- "value": "label"
- },
- {
- "name": "ServiceExtAbility_desc",
- "value": "description"
- },
- {
- "name": "ServiceExtAbility_label",
- "value": "label"
- },
- {
- "name": "IntentInUIAbilityForeground",
- "value": "Intent To UIAbility Foreground"
- },
- {
- "name": "IntentInServiceExtension",
- "value": "Intent To ServiceExtension"
- },
- {
- "name": "intent_execute_title",
- "value": "Intent Execute"
- },
- {
- "name": "Back",
- "value": "Back"
- }
- ]
-}
\ No newline at end of file
diff --git a/code/SystemFeature/InsightIntent/IntentDriver/entry/src/main/resources/zh_CN/element/string.json b/code/SystemFeature/InsightIntent/IntentDriver/entry/src/main/resources/zh_CN/element/string.json
deleted file mode 100644
index d8154b926..000000000
--- a/code/SystemFeature/InsightIntent/IntentDriver/entry/src/main/resources/zh_CN/element/string.json
+++ /dev/null
@@ -1,40 +0,0 @@
-{
- "string": [
- {
- "name": "module_desc",
- "value": "模块描述"
- },
- {
- "name": "EntryAbility_desc",
- "value": "description"
- },
- {
- "name": "EntryAbility_label",
- "value": "label"
- },
- {
- "name": "ServiceExtAbility_desc",
- "value": "description"
- },
- {
- "name": "ServiceExtAbility_label",
- "value": "label"
- },
- {
- "name": "IntentInUIAbilityForeground",
- "value": "意图绑定到UIAbility前台"
- },
- {
- "name": "IntentInServiceExtension",
- "value": "意图绑定到ServiceExtension"
- },
- {
- "name": "intent_execute_title",
- "value": "意图执行"
- },
- {
- "name": "Back",
- "value": "返回"
- }
- ]
-}
\ No newline at end of file
diff --git a/code/SystemFeature/InsightIntent/IntentDriver/entry/src/ohosTest/ets/test/Ability.test.ets b/code/SystemFeature/InsightIntent/IntentDriver/entry/src/ohosTest/ets/test/Ability.test.ets
deleted file mode 100644
index 40ad9be8c..000000000
--- a/code/SystemFeature/InsightIntent/IntentDriver/entry/src/ohosTest/ets/test/Ability.test.ets
+++ /dev/null
@@ -1,114 +0,0 @@
-/*
- * Copyright (c) 2023 Huawei Device Co., Ltd.
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-import { describe, beforeAll, it, expect } from '@ohos/hypium'
-import { Driver, ON, UIElementInfo } from '@ohos.UiTest';
-import AbilityDelegatorRegistry from '@ohos.app.ability.abilityDelegatorRegistry';
-import { logger } from '../util/Logger';
-
-const BUNDLE: string = 'IntentDriver';
-const SLEEP_MS: number = 2000;
-const BUNDLE_NAME: string = 'com.samples.intentdriver';
-const INTENT_NAME: string = 'PlayMusic';
-const UIABILITY_FOREGROUND_CALLBACK: string = 'onExecuteInUIAbilityForegroundMode';
-const SERVICE_EXTENSION_CALLBACK: string = 'onExecuteInServiceExtensionAbility';
-const SUCCESS_FLAG: string = 'succeed';
-let abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator();
-
-function sleep(time: number) {
- return new Promise((resolve: Function) => setTimeout(resolve, time));
-}
-
-export default function abilityTest() {
- describe('ActsAbilityTest', () => {
- beforeAll(async (done: Function) => {
- logger.info(`${BUNDLE} beforeAll begin`);
- try {
- await abilityDelegator.startAbility({
- bundleName: 'com.samples.intentexecutor',
- abilityName: 'EntryAbility'
- });
- await abilityDelegator.startAbility({
- bundleName: 'com.samples.intentdriver',
- abilityName: 'EntryAbility'
- });
- } catch (err) {
- logger.info(`${BUNDLE} beforeAll error: ${JSON.stringify(err)}`);
- }
- logger.info(`${BUNDLE} beforeAll end`);
- done();
- })
-
- /**
- * @tc.number: IntentDriver_ExecuteInServiceExtension_001
- * @tc.name: IntentDriver_ExecuteInServiceExtension_001
- * @tc.desc: Execute insight intent in ServiceExtension
- * @tc.size: MediumTest
- * @tc.type: Function
- * @tc.level Level 1
- */
- it('IntentDriver_ExecuteInServiceExtension_001', 0, async (done: Function) => {
- logger.info(`${BUNDLE}_ExecuteInServiceExtension_001 begin`);
- await sleep(SLEEP_MS);
- let driver: Driver = Driver.create();
- let toastCallback = (uieInfo: UIElementInfo) => {
- logger.info(`${BUNDLE}_ExecuteInServiceExtension_001 UIElementInfo: ${JSON.stringify(uieInfo)}`);
- expect(uieInfo.bundleName).assertEqual(BUNDLE_NAME);
- expect(uieInfo.text).assertContain(SERVICE_EXTENSION_CALLBACK);
- expect(uieInfo.text).assertContain(INTENT_NAME);
- expect(uieInfo.text).assertContain(SUCCESS_FLAG);
- logger.info(`${BUNDLE}_ExecuteInServiceExtension_001 end`);
- done();
- };
-
- let observer = await driver.createUIEventObserver();
- observer.once('toastShow', toastCallback);
- await sleep(SLEEP_MS);
- let btn = await driver.findComponent(ON.id('button_IntentInServiceExtension'));
- await btn.click();
- await sleep(SLEEP_MS);
- })
-
- /**
- * @tc.number: IntentDriver_ExecuteInUIAbility_001
- * @tc.name: IntentDriver_ExecuteInUIAbility_001
- * @tc.desc: Execute insight intent in UIAbility foreground mode
- * @tc.size: MediumTest
- * @tc.type: Function
- * @tc.level Level 1
- */
- it('IntentDriver_ExecuteInUIAbility_001', 0, async (done: Function) => {
- logger.info(`${BUNDLE}_ExecuteInUIAbility_001 begin`);
- await sleep(SLEEP_MS);
- let driver: Driver = Driver.create();
- let toastCallback = (uieInfo: UIElementInfo) => {
- logger.info(`${BUNDLE}_ExecuteInUIAbility_001 UIElementInfo: ${JSON.stringify(uieInfo)}`);
- expect(uieInfo.bundleName).assertEqual(BUNDLE_NAME);
- expect(uieInfo.text).assertContain(UIABILITY_FOREGROUND_CALLBACK);
- expect(uieInfo.text).assertContain(INTENT_NAME);
- expect(uieInfo.text).assertContain(SUCCESS_FLAG);
- logger.info(`${BUNDLE}_ExecuteInUIAbility_001 end`);
- done();
- };
-
- let observer = await driver.createUIEventObserver();
- observer.once('toastShow', toastCallback);
- await sleep(SLEEP_MS);
- let btn = await driver.findComponent(ON.id('button_IntentInUIAbilityForeground'));
- await btn.click();
- await sleep(SLEEP_MS);
- })
- })
-}
diff --git a/code/SystemFeature/InsightIntent/IntentDriver/entry/src/ohosTest/ets/testability/TestAbility.ets b/code/SystemFeature/InsightIntent/IntentDriver/entry/src/ohosTest/ets/testability/TestAbility.ets
deleted file mode 100644
index 4e1a70029..000000000
--- a/code/SystemFeature/InsightIntent/IntentDriver/entry/src/ohosTest/ets/testability/TestAbility.ets
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Copyright (c) 2022-2023 Huawei Device Co., Ltd.
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-import UIAbility from '@ohos.app.ability.UIAbility';
-import window from '@ohos.window';
-import Want from '@ohos.app.ability.Want';
-import AbilityConstant from '@ohos.app.ability.AbilityConstant';
-import { logger } from '../util/Logger';
-
-const TAG: string = '[TestAbility]';
-
-export default class TestAbility extends UIAbility {
- onCreate(want: Want, launchParam: AbilityConstant.LaunchParam): void {
- logger.info(TAG, `TestAbility onCreate, want param: ${JSON.stringify(want)},
- launchParam: ${JSON.stringify(launchParam)}`);
- }
-
- onDestroy(): void {
- logger.info(TAG, 'TestAbility onDestroy');
- }
-
- onWindowStageCreate(windowStage: window.WindowStage): void {
- logger.info(TAG, 'TestAbility onWindowStageCreate');
- windowStage.loadContent('testability/pages/Index', (err, data) => {
- if (err.code) {
- logger.error(TAG, `Failed to load the content. Cause: ${JSON.stringify(err)}`);
- return;
- }
- logger.info(TAG, `Succeeded in loading the content. Data: ${JSON.stringify(data) ?? ''}`);
- });
- }
-
- onWindowStageDestroy(): void {
- logger.info(TAG, 'TestAbility onWindowStageDestroy');
- }
-
- onForeground(): void {
- logger.info(TAG, 'TestAbility onForeground');
- }
-
- onBackground(): void {
- logger.info(TAG, 'TestAbility onBackground');
- }
-}
\ No newline at end of file
diff --git a/code/SystemFeature/InsightIntent/IntentDriver/entry/src/ohosTest/resources/base/media/icon.png b/code/SystemFeature/InsightIntent/IntentDriver/entry/src/ohosTest/resources/base/media/icon.png
deleted file mode 100644
index ce307a882..000000000
Binary files a/code/SystemFeature/InsightIntent/IntentDriver/entry/src/ohosTest/resources/base/media/icon.png and /dev/null differ
diff --git a/code/SystemFeature/InsightIntent/IntentDriver/hvigor/hvigor-wrapper.js b/code/SystemFeature/InsightIntent/IntentDriver/hvigor/hvigor-wrapper.js
deleted file mode 100644
index 994f22987..000000000
--- a/code/SystemFeature/InsightIntent/IntentDriver/hvigor/hvigor-wrapper.js
+++ /dev/null
@@ -1,2 +0,0 @@
-"use strict";var e=require("fs"),t=require("path"),n=require("os"),r=require("crypto"),u=require("child_process"),o=require("constants"),i=require("stream"),s=require("util"),c=require("assert"),a=require("tty"),l=require("zlib"),f=require("net");function d(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var D=d(e),p=d(t),E=d(n),m=d(r),h=d(u),y=d(o),C=d(i),F=d(s),g=d(c),A=d(a),v=d(l),S=d(f),w="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},O={},b={},_={},B=w&&w.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(_,"__esModule",{value:!0}),_.isMac=_.isLinux=_.isWindows=void 0;const P=B(E.default),k="Windows_NT",x="Linux",N="Darwin";_.isWindows=function(){return P.default.type()===k},_.isLinux=function(){return P.default.type()===x},_.isMac=function(){return P.default.type()===N};var I={},T=w&&w.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var u=Object.getOwnPropertyDescriptor(t,n);u&&!("get"in u?!t.__esModule:u.writable||u.configurable)||(u={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,u)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),R=w&&w.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),M=w&&w.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&T(t,e,n);return R(t,e),t};Object.defineProperty(I,"__esModule",{value:!0}),I.hash=void 0;const L=M(m.default);I.hash=function(e,t="md5"){return L.createHash(t).update(e,"utf-8").digest("hex")},function(e){var t=w&&w.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var u=Object.getOwnPropertyDescriptor(t,n);u&&!("get"in u?!t.__esModule:u.writable||u.configurable)||(u={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,u)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),n=w&&w.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=w&&w.__importStar||function(e){if(e&&e.__esModule)return e;var r={};if(null!=e)for(var u in e)"default"!==u&&Object.prototype.hasOwnProperty.call(e,u)&&t(r,e,u);return n(r,e),r};Object.defineProperty(e,"__esModule",{value:!0}),e.HVIGOR_BOOT_JS_FILE_PATH=e.HVIGOR_PROJECT_DEPENDENCY_PACKAGE_JSON_PATH=e.HVIGOR_PROJECT_DEPENDENCIES_HOME=e.HVIGOR_PROJECT_WRAPPER_HOME=e.HVIGOR_PROJECT_NAME=e.HVIGOR_PROJECT_ROOT_DIR=e.HVIGOR_PROJECT_CACHES_HOME=e.HVIGOR_PNPM_STORE_PATH=e.HVIGOR_WRAPPER_PNPM_SCRIPT_PATH=e.HVIGOR_WRAPPER_TOOLS_HOME=e.HVIGOR_USER_HOME=e.DEFAULT_PACKAGE_JSON=e.DEFAULT_HVIGOR_CONFIG_JSON_FILE_NAME=e.PNPM=e.HVIGOR=e.NPM_TOOL=e.PNPM_TOOL=e.HVIGOR_ENGINE_PACKAGE_NAME=void 0;const u=r(p.default),o=r(E.default),i=_,s=I;e.HVIGOR_ENGINE_PACKAGE_NAME="@ohos/hvigor",e.PNPM_TOOL=(0,i.isWindows)()?"pnpm.cmd":"pnpm",e.NPM_TOOL=(0,i.isWindows)()?"npm.cmd":"npm",e.HVIGOR="hvigor",e.PNPM="pnpm",e.DEFAULT_HVIGOR_CONFIG_JSON_FILE_NAME="hvigor-config.json5",e.DEFAULT_PACKAGE_JSON="package.json",e.HVIGOR_USER_HOME=u.resolve(o.homedir(),".hvigor"),e.HVIGOR_WRAPPER_TOOLS_HOME=u.resolve(e.HVIGOR_USER_HOME,"wrapper","tools"),e.HVIGOR_WRAPPER_PNPM_SCRIPT_PATH=u.resolve(e.HVIGOR_WRAPPER_TOOLS_HOME,"node_modules",".bin",e.PNPM_TOOL),e.HVIGOR_PNPM_STORE_PATH=u.resolve(e.HVIGOR_USER_HOME,"caches"),e.HVIGOR_PROJECT_CACHES_HOME=u.resolve(e.HVIGOR_USER_HOME,"project_caches"),e.HVIGOR_PROJECT_ROOT_DIR=process.cwd(),e.HVIGOR_PROJECT_NAME=u.basename((0,s.hash)(e.HVIGOR_PROJECT_ROOT_DIR)),e.HVIGOR_PROJECT_WRAPPER_HOME=u.resolve(e.HVIGOR_PROJECT_ROOT_DIR,e.HVIGOR),e.HVIGOR_PROJECT_DEPENDENCIES_HOME=u.resolve(e.HVIGOR_PROJECT_CACHES_HOME,e.HVIGOR_PROJECT_NAME,"workspace"),e.HVIGOR_PROJECT_DEPENDENCY_PACKAGE_JSON_PATH=u.resolve(e.HVIGOR_PROJECT_DEPENDENCIES_HOME,e.DEFAULT_PACKAGE_JSON),e.HVIGOR_BOOT_JS_FILE_PATH=u.resolve(e.HVIGOR_PROJECT_DEPENDENCIES_HOME,"node_modules","@ohos","hvigor","bin","hvigor.js")}(b);var j={},$={};Object.defineProperty($,"__esModule",{value:!0}),$.logInfoPrintConsole=$.logErrorAndExit=void 0,$.logErrorAndExit=function(e){e instanceof Error?console.error(e.message):console.error(e),process.exit(-1)},$.logInfoPrintConsole=function(e){console.log(e)};var H=w&&w.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var u=Object.getOwnPropertyDescriptor(t,n);u&&!("get"in u?!t.__esModule:u.writable||u.configurable)||(u={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,u)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),J=w&&w.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),G=w&&w.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&H(t,e,n);return J(t,e),t},V=w&&w.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(j,"__esModule",{value:!0}),j.isFileExists=j.offlinePluginConversion=j.executeCommand=j.getNpmPath=j.hasNpmPackInPaths=void 0;const U=h.default,W=G(p.default),z=b,K=$,q=V(D.default);j.hasNpmPackInPaths=function(e,t){try{return require.resolve(e,{paths:[...t]}),!0}catch(e){return!1}},j.getNpmPath=function(){const e=process.execPath;return W.join(W.dirname(e),z.NPM_TOOL)},j.executeCommand=function(e,t,n){0!==(0,U.spawnSync)(e,t,n).status&&(0,K.logErrorAndExit)(`Error: ${e} ${t} execute failed.See above for details.`)},j.offlinePluginConversion=function(e,t){return t.startsWith("file:")||t.endsWith(".tgz")?W.resolve(e,z.HVIGOR,t.replace("file:","")):t},j.isFileExists=function(e){return q.default.existsSync(e)&&q.default.statSync(e).isFile()},function(e){var t=w&&w.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var u=Object.getOwnPropertyDescriptor(t,n);u&&!("get"in u?!t.__esModule:u.writable||u.configurable)||(u={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,u)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),n=w&&w.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=w&&w.__importStar||function(e){if(e&&e.__esModule)return e;var r={};if(null!=e)for(var u in e)"default"!==u&&Object.prototype.hasOwnProperty.call(e,u)&&t(r,e,u);return n(r,e),r},u=w&&w.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.executeInstallPnpm=e.isPnpmAvailable=e.environmentHandler=e.checkNpmConifg=e.PNPM_VERSION=void 0;const o=r(D.default),i=b,s=j,c=r(p.default),a=$,l=h.default,f=u(E.default);e.PNPM_VERSION="7.30.0",e.checkNpmConifg=function(){const e=c.resolve(i.HVIGOR_PROJECT_ROOT_DIR,".npmrc"),t=c.resolve(f.default.homedir(),".npmrc");if((0,s.isFileExists)(e)||(0,s.isFileExists)(t))return;const n=(0,s.getNpmPath)(),r=(0,l.spawnSync)(n,["config","get","prefix"],{cwd:i.HVIGOR_PROJECT_ROOT_DIR});if(0!==r.status||!r.stdout)return void(0,a.logErrorAndExit)("Error: The hvigor depends on the npmrc file. Configure the npmrc file first.");const u=c.resolve(`${r.stdout}`.replace(/[\r\n]/gi,""),".npmrc");(0,s.isFileExists)(u)||(0,a.logErrorAndExit)("Error: The hvigor depends on the npmrc file. Configure the npmrc file first.")},e.environmentHandler=function(){process.env["npm_config_update-notifier"]="false"},e.isPnpmAvailable=function(){return!!o.existsSync(i.HVIGOR_WRAPPER_PNPM_SCRIPT_PATH)&&(0,s.hasNpmPackInPaths)("pnpm",[i.HVIGOR_WRAPPER_TOOLS_HOME])},e.executeInstallPnpm=function(){(0,a.logInfoPrintConsole)(`Installing pnpm@${e.PNPM_VERSION}...`);const t=(0,s.getNpmPath)();!function(){const t=c.resolve(i.HVIGOR_WRAPPER_TOOLS_HOME,i.DEFAULT_PACKAGE_JSON);try{o.existsSync(i.HVIGOR_WRAPPER_TOOLS_HOME)||o.mkdirSync(i.HVIGOR_WRAPPER_TOOLS_HOME,{recursive:!0});const n={dependencies:{}};n.dependencies[i.PNPM]=e.PNPM_VERSION,o.writeFileSync(t,JSON.stringify(n))}catch(e){(0,a.logErrorAndExit)(`Error: EPERM: operation not permitted,create ${t} failed.`)}}(),(0,s.executeCommand)(t,["install","pnpm"],{cwd:i.HVIGOR_WRAPPER_TOOLS_HOME,stdio:["inherit","inherit","inherit"],env:process.env}),(0,a.logInfoPrintConsole)("Pnpm install success.")}}(O);var Y={},X={},Z={},Q={};Object.defineProperty(Q,"__esModule",{value:!0}),Q.Unicode=void 0;class ee{}Q.Unicode=ee,ee.Space_Separator=/[\u1680\u2000-\u200A\u202F\u205F\u3000]/,ee.ID_Start=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/,ee.ID_Continue=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/,Object.defineProperty(Z,"__esModule",{value:!0}),Z.JudgeUtil=void 0;const te=Q;Z.JudgeUtil=class{static isIgnoreChar(e){return"string"==typeof e&&("\t"===e||"\v"===e||"\f"===e||" "===e||" "===e||"\ufeff"===e||"\n"===e||"\r"===e||"\u2028"===e||"\u2029"===e)}static isSpaceSeparator(e){return"string"==typeof e&&te.Unicode.Space_Separator.test(e)}static isIdStartChar(e){return"string"==typeof e&&(e>="a"&&e<="z"||e>="A"&&e<="Z"||"$"===e||"_"===e||te.Unicode.ID_Start.test(e))}static isIdContinueChar(e){return"string"==typeof e&&(e>="a"&&e<="z"||e>="A"&&e<="Z"||e>="0"&&e<="9"||"$"===e||"_"===e||""===e||""===e||te.Unicode.ID_Continue.test(e))}static isDigitWithoutZero(e){return/[1-9]/.test(e)}static isDigit(e){return"string"==typeof e&&/[0-9]/.test(e)}static isHexDigit(e){return"string"==typeof e&&/[0-9A-Fa-f]/.test(e)}};var ne={},re={fromCallback:function(e){return Object.defineProperty((function(...t){if("function"!=typeof t[t.length-1])return new Promise(((n,r)=>{e.call(this,...t,((e,t)=>null!=e?r(e):n(t)))}));e.apply(this,t)}),"name",{value:e.name})},fromPromise:function(e){return Object.defineProperty((function(...t){const n=t[t.length-1];if("function"!=typeof n)return e.apply(this,t);e.apply(this,t.slice(0,-1)).then((e=>n(null,e)),n)}),"name",{value:e.name})}},ue=y.default,oe=process.cwd,ie=null,se=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){return ie||(ie=oe.call(process)),ie};try{process.cwd()}catch(e){}if("function"==typeof process.chdir){var ce=process.chdir;process.chdir=function(e){ie=null,ce.call(process,e)},Object.setPrototypeOf&&Object.setPrototypeOf(process.chdir,ce)}var ae=function(e){ue.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)&&function(e){e.lchmod=function(t,n,r){e.open(t,ue.O_WRONLY|ue.O_SYMLINK,n,(function(t,u){t?r&&r(t):e.fchmod(u,n,(function(t){e.close(u,(function(e){r&&r(t||e)}))}))}))},e.lchmodSync=function(t,n){var r,u=e.openSync(t,ue.O_WRONLY|ue.O_SYMLINK,n),o=!0;try{r=e.fchmodSync(u,n),o=!1}finally{if(o)try{e.closeSync(u)}catch(e){}else e.closeSync(u)}return r}}(e);e.lutimes||function(e){ue.hasOwnProperty("O_SYMLINK")&&e.futimes?(e.lutimes=function(t,n,r,u){e.open(t,ue.O_SYMLINK,(function(t,o){t?u&&u(t):e.futimes(o,n,r,(function(t){e.close(o,(function(e){u&&u(t||e)}))}))}))},e.lutimesSync=function(t,n,r){var u,o=e.openSync(t,ue.O_SYMLINK),i=!0;try{u=e.futimesSync(o,n,r),i=!1}finally{if(i)try{e.closeSync(o)}catch(e){}else e.closeSync(o)}return u}):e.futimes&&(e.lutimes=function(e,t,n,r){r&&process.nextTick(r)},e.lutimesSync=function(){})}(e);e.chown=r(e.chown),e.fchown=r(e.fchown),e.lchown=r(e.lchown),e.chmod=t(e.chmod),e.fchmod=t(e.fchmod),e.lchmod=t(e.lchmod),e.chownSync=u(e.chownSync),e.fchownSync=u(e.fchownSync),e.lchownSync=u(e.lchownSync),e.chmodSync=n(e.chmodSync),e.fchmodSync=n(e.fchmodSync),e.lchmodSync=n(e.lchmodSync),e.stat=o(e.stat),e.fstat=o(e.fstat),e.lstat=o(e.lstat),e.statSync=i(e.statSync),e.fstatSync=i(e.fstatSync),e.lstatSync=i(e.lstatSync),e.chmod&&!e.lchmod&&(e.lchmod=function(e,t,n){n&&process.nextTick(n)},e.lchmodSync=function(){});e.chown&&!e.lchown&&(e.lchown=function(e,t,n,r){r&&process.nextTick(r)},e.lchownSync=function(){});"win32"===se&&(e.rename="function"!=typeof e.rename?e.rename:function(t){function n(n,r,u){var o=Date.now(),i=0;t(n,r,(function s(c){if(c&&("EACCES"===c.code||"EPERM"===c.code||"EBUSY"===c.code)&&Date.now()-o<6e4)return setTimeout((function(){e.stat(r,(function(e,o){e&&"ENOENT"===e.code?t(n,r,s):u(c)}))}),i),void(i<100&&(i+=10));u&&u(c)}))}return Object.setPrototypeOf&&Object.setPrototypeOf(n,t),n}(e.rename));function t(t){return t?function(n,r,u){return t.call(e,n,r,(function(e){s(e)&&(e=null),u&&u.apply(this,arguments)}))}:t}function n(t){return t?function(n,r){try{return t.call(e,n,r)}catch(e){if(!s(e))throw e}}:t}function r(t){return t?function(n,r,u,o){return t.call(e,n,r,u,(function(e){s(e)&&(e=null),o&&o.apply(this,arguments)}))}:t}function u(t){return t?function(n,r,u){try{return t.call(e,n,r,u)}catch(e){if(!s(e))throw e}}:t}function o(t){return t?function(n,r,u){function o(e,t){t&&(t.uid<0&&(t.uid+=4294967296),t.gid<0&&(t.gid+=4294967296)),u&&u.apply(this,arguments)}return"function"==typeof r&&(u=r,r=null),r?t.call(e,n,r,o):t.call(e,n,o)}:t}function i(t){return t?function(n,r){var u=r?t.call(e,n,r):t.call(e,n);return u&&(u.uid<0&&(u.uid+=4294967296),u.gid<0&&(u.gid+=4294967296)),u}:t}function s(e){return!e||("ENOSYS"===e.code||!(process.getuid&&0===process.getuid()||"EINVAL"!==e.code&&"EPERM"!==e.code))}e.read="function"!=typeof e.read?e.read:function(t){function n(n,r,u,o,i,s){var c;if(s&&"function"==typeof s){var a=0;c=function(l,f,d){if(l&&"EAGAIN"===l.code&&a<10)return a++,t.call(e,n,r,u,o,i,c);s.apply(this,arguments)}}return t.call(e,n,r,u,o,i,c)}return Object.setPrototypeOf&&Object.setPrototypeOf(n,t),n}(e.read),e.readSync="function"!=typeof e.readSync?e.readSync:(c=e.readSync,function(t,n,r,u,o){for(var i=0;;)try{return c.call(e,t,n,r,u,o)}catch(e){if("EAGAIN"===e.code&&i<10){i++;continue}throw e}});var c};var le=C.default.Stream,fe=function(e){return{ReadStream:function t(n,r){if(!(this instanceof t))return new t(n,r);le.call(this);var u=this;this.path=n,this.fd=null,this.readable=!0,this.paused=!1,this.flags="r",this.mode=438,this.bufferSize=65536,r=r||{};for(var o=Object.keys(r),i=0,s=o.length;ithis.end)throw new Error("start must be <= end");this.pos=this.start}if(null!==this.fd)return void process.nextTick((function(){u._read()}));e.open(this.path,this.flags,this.mode,(function(e,t){if(e)return u.emit("error",e),void(u.readable=!1);u.fd=t,u.emit("open",t),u._read()}))},WriteStream:function t(n,r){if(!(this instanceof t))return new t(n,r);le.call(this),this.path=n,this.fd=null,this.writable=!0,this.flags="w",this.encoding="binary",this.mode=438,this.bytesWritten=0,r=r||{};for(var u=Object.keys(r),o=0,i=u.length;o= zero");this.pos=this.start}this.busy=!1,this._queue=[],null===this.fd&&(this._open=e.open,this._queue.push([this._open,this.path,this.flags,this.mode,void 0]),this.flush())}}};var de=function(e){if(null===e||"object"!=typeof e)return e;if(e instanceof Object)var t={__proto__:De(e)};else t=Object.create(null);return Object.getOwnPropertyNames(e).forEach((function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))})),t},De=Object.getPrototypeOf||function(e){return e.__proto__};var pe,Ee,me=D.default,he=ae,ye=fe,Ce=de,Fe=F.default;function ge(e,t){Object.defineProperty(e,pe,{get:function(){return t}})}"function"==typeof Symbol&&"function"==typeof Symbol.for?(pe=Symbol.for("graceful-fs.queue"),Ee=Symbol.for("graceful-fs.previous")):(pe="___graceful-fs.queue",Ee="___graceful-fs.previous");var Ae=function(){};if(Fe.debuglog?Ae=Fe.debuglog("gfs4"):/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&(Ae=function(){var e=Fe.format.apply(Fe,arguments);e="GFS4: "+e.split(/\n/).join("\nGFS4: "),console.error(e)}),!me[pe]){var ve=w[pe]||[];ge(me,ve),me.close=function(e){function t(t,n){return e.call(me,t,(function(e){e||_e(),"function"==typeof n&&n.apply(this,arguments)}))}return Object.defineProperty(t,Ee,{value:e}),t}(me.close),me.closeSync=function(e){function t(t){e.apply(me,arguments),_e()}return Object.defineProperty(t,Ee,{value:e}),t}(me.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&process.on("exit",(function(){Ae(me[pe]),g.default.equal(me[pe].length,0)}))}w[pe]||ge(w,me[pe]);var Se,we=Oe(Ce(me));function Oe(e){he(e),e.gracefulify=Oe,e.createReadStream=function(t,n){return new e.ReadStream(t,n)},e.createWriteStream=function(t,n){return new e.WriteStream(t,n)};var t=e.readFile;e.readFile=function(e,n,r){"function"==typeof n&&(r=n,n=null);return function e(n,r,u,o){return t(n,r,(function(t){!t||"EMFILE"!==t.code&&"ENFILE"!==t.code?"function"==typeof u&&u.apply(this,arguments):be([e,[n,r,u],t,o||Date.now(),Date.now()])}))}(e,n,r)};var n=e.writeFile;e.writeFile=function(e,t,r,u){"function"==typeof r&&(u=r,r=null);return function e(t,r,u,o,i){return n(t,r,u,(function(n){!n||"EMFILE"!==n.code&&"ENFILE"!==n.code?"function"==typeof o&&o.apply(this,arguments):be([e,[t,r,u,o],n,i||Date.now(),Date.now()])}))}(e,t,r,u)};var r=e.appendFile;r&&(e.appendFile=function(e,t,n,u){"function"==typeof n&&(u=n,n=null);return function e(t,n,u,o,i){return r(t,n,u,(function(r){!r||"EMFILE"!==r.code&&"ENFILE"!==r.code?"function"==typeof o&&o.apply(this,arguments):be([e,[t,n,u,o],r,i||Date.now(),Date.now()])}))}(e,t,n,u)});var u=e.copyFile;u&&(e.copyFile=function(e,t,n,r){"function"==typeof n&&(r=n,n=0);return function e(t,n,r,o,i){return u(t,n,r,(function(u){!u||"EMFILE"!==u.code&&"ENFILE"!==u.code?"function"==typeof o&&o.apply(this,arguments):be([e,[t,n,r,o],u,i||Date.now(),Date.now()])}))}(e,t,n,r)});var o=e.readdir;e.readdir=function(e,t,n){"function"==typeof t&&(n=t,t=null);var r=i.test(process.version)?function(e,t,n,r){return o(e,u(e,t,n,r))}:function(e,t,n,r){return o(e,t,u(e,t,n,r))};return r(e,t,n);function u(e,t,n,u){return function(o,i){!o||"EMFILE"!==o.code&&"ENFILE"!==o.code?(i&&i.sort&&i.sort(),"function"==typeof n&&n.call(this,o,i)):be([r,[e,t,n],o,u||Date.now(),Date.now()])}}};var i=/^v[0-5]\./;if("v0.8"===process.version.substr(0,4)){var s=ye(e);d=s.ReadStream,D=s.WriteStream}var c=e.ReadStream;c&&(d.prototype=Object.create(c.prototype),d.prototype.open=function(){var e=this;E(e.path,e.flags,e.mode,(function(t,n){t?(e.autoClose&&e.destroy(),e.emit("error",t)):(e.fd=n,e.emit("open",n),e.read())}))});var a=e.WriteStream;a&&(D.prototype=Object.create(a.prototype),D.prototype.open=function(){var e=this;E(e.path,e.flags,e.mode,(function(t,n){t?(e.destroy(),e.emit("error",t)):(e.fd=n,e.emit("open",n))}))}),Object.defineProperty(e,"ReadStream",{get:function(){return d},set:function(e){d=e},enumerable:!0,configurable:!0}),Object.defineProperty(e,"WriteStream",{get:function(){return D},set:function(e){D=e},enumerable:!0,configurable:!0});var l=d;Object.defineProperty(e,"FileReadStream",{get:function(){return l},set:function(e){l=e},enumerable:!0,configurable:!0});var f=D;function d(e,t){return this instanceof d?(c.apply(this,arguments),this):d.apply(Object.create(d.prototype),arguments)}function D(e,t){return this instanceof D?(a.apply(this,arguments),this):D.apply(Object.create(D.prototype),arguments)}Object.defineProperty(e,"FileWriteStream",{get:function(){return f},set:function(e){f=e},enumerable:!0,configurable:!0});var p=e.open;function E(e,t,n,r){return"function"==typeof n&&(r=n,n=null),function e(t,n,r,u,o){return p(t,n,r,(function(i,s){!i||"EMFILE"!==i.code&&"ENFILE"!==i.code?"function"==typeof u&&u.apply(this,arguments):be([e,[t,n,r,u],i,o||Date.now(),Date.now()])}))}(e,t,n,r)}return e.open=E,e}function be(e){Ae("ENQUEUE",e[0].name,e[1]),me[pe].push(e),Be()}function _e(){for(var e=Date.now(),t=0;t2&&(me[pe][t][3]=e,me[pe][t][4]=e);Be()}function Be(){if(clearTimeout(Se),Se=void 0,0!==me[pe].length){var e=me[pe].shift(),t=e[0],n=e[1],r=e[2],u=e[3],o=e[4];if(void 0===u)Ae("RETRY",t.name,n),t.apply(null,n);else if(Date.now()-u>=6e4){Ae("TIMEOUT",t.name,n);var i=n.pop();"function"==typeof i&&i.call(null,r)}else{var s=Date.now()-o,c=Math.max(o-u,1);s>=Math.min(1.2*c,100)?(Ae("RETRY",t.name,n),t.apply(null,n.concat([u]))):me[pe].push(e)}void 0===Se&&(Se=setTimeout(Be,0))}}process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!me.__patched&&(we=Oe(me),me.__patched=!0),function(e){const t=re.fromCallback,n=we,r=["access","appendFile","chmod","chown","close","copyFile","fchmod","fchown","fdatasync","fstat","fsync","ftruncate","futimes","lchmod","lchown","link","lstat","mkdir","mkdtemp","open","opendir","readdir","readFile","readlink","realpath","rename","rm","rmdir","stat","symlink","truncate","unlink","utimes","writeFile"].filter((e=>"function"==typeof n[e]));Object.assign(e,n),r.forEach((r=>{e[r]=t(n[r])})),e.realpath.native=t(n.realpath.native),e.exists=function(e,t){return"function"==typeof t?n.exists(e,t):new Promise((t=>n.exists(e,t)))},e.read=function(e,t,r,u,o,i){return"function"==typeof i?n.read(e,t,r,u,o,i):new Promise(((i,s)=>{n.read(e,t,r,u,o,((e,t,n)=>{if(e)return s(e);i({bytesRead:t,buffer:n})}))}))},e.write=function(e,t,...r){return"function"==typeof r[r.length-1]?n.write(e,t,...r):new Promise(((u,o)=>{n.write(e,t,...r,((e,t,n)=>{if(e)return o(e);u({bytesWritten:t,buffer:n})}))}))},"function"==typeof n.writev&&(e.writev=function(e,t,...r){return"function"==typeof r[r.length-1]?n.writev(e,t,...r):new Promise(((u,o)=>{n.writev(e,t,...r,((e,t,n)=>{if(e)return o(e);u({bytesWritten:t,buffers:n})}))}))})}(ne);var Pe={},ke={};const xe=p.default;ke.checkPath=function(e){if("win32"===process.platform){if(/[<>:"|?*]/.test(e.replace(xe.parse(e).root,""))){const t=new Error(`Path contains invalid characters: ${e}`);throw t.code="EINVAL",t}}};const Ne=ne,{checkPath:Ie}=ke,Te=e=>"number"==typeof e?e:{mode:511,...e}.mode;Pe.makeDir=async(e,t)=>(Ie(e),Ne.mkdir(e,{mode:Te(t),recursive:!0})),Pe.makeDirSync=(e,t)=>(Ie(e),Ne.mkdirSync(e,{mode:Te(t),recursive:!0}));const Re=re.fromPromise,{makeDir:Me,makeDirSync:Le}=Pe,je=Re(Me);var $e={mkdirs:je,mkdirsSync:Le,mkdirp:je,mkdirpSync:Le,ensureDir:je,ensureDirSync:Le};const He=re.fromPromise,Je=ne;var Ge={pathExists:He((function(e){return Je.access(e).then((()=>!0)).catch((()=>!1))})),pathExistsSync:Je.existsSync};const Ve=we;var Ue=function(e,t,n,r){Ve.open(e,"r+",((e,u)=>{if(e)return r(e);Ve.futimes(u,t,n,(e=>{Ve.close(u,(t=>{r&&r(e||t)}))}))}))},We=function(e,t,n){const r=Ve.openSync(e,"r+");return Ve.futimesSync(r,t,n),Ve.closeSync(r)};const ze=ne,Ke=p.default,qe=F.default;function Ye(e,t,n){const r=n.dereference?e=>ze.stat(e,{bigint:!0}):e=>ze.lstat(e,{bigint:!0});return Promise.all([r(e),r(t).catch((e=>{if("ENOENT"===e.code)return null;throw e}))]).then((([e,t])=>({srcStat:e,destStat:t})))}function Xe(e,t){return t.ino&&t.dev&&t.ino===e.ino&&t.dev===e.dev}function Ze(e,t){const n=Ke.resolve(e).split(Ke.sep).filter((e=>e)),r=Ke.resolve(t).split(Ke.sep).filter((e=>e));return n.reduce(((e,t,n)=>e&&r[n]===t),!0)}function Qe(e,t,n){return`Cannot ${n} '${e}' to a subdirectory of itself, '${t}'.`}var et={checkPaths:function(e,t,n,r,u){qe.callbackify(Ye)(e,t,r,((r,o)=>{if(r)return u(r);const{srcStat:i,destStat:s}=o;if(s){if(Xe(i,s)){const r=Ke.basename(e),o=Ke.basename(t);return"move"===n&&r!==o&&r.toLowerCase()===o.toLowerCase()?u(null,{srcStat:i,destStat:s,isChangingCase:!0}):u(new Error("Source and destination must not be the same."))}if(i.isDirectory()&&!s.isDirectory())return u(new Error(`Cannot overwrite non-directory '${t}' with directory '${e}'.`));if(!i.isDirectory()&&s.isDirectory())return u(new Error(`Cannot overwrite directory '${t}' with non-directory '${e}'.`))}return i.isDirectory()&&Ze(e,t)?u(new Error(Qe(e,t,n))):u(null,{srcStat:i,destStat:s})}))},checkPathsSync:function(e,t,n,r){const{srcStat:u,destStat:o}=function(e,t,n){let r;const u=n.dereference?e=>ze.statSync(e,{bigint:!0}):e=>ze.lstatSync(e,{bigint:!0}),o=u(e);try{r=u(t)}catch(e){if("ENOENT"===e.code)return{srcStat:o,destStat:null};throw e}return{srcStat:o,destStat:r}}(e,t,r);if(o){if(Xe(u,o)){const r=Ke.basename(e),i=Ke.basename(t);if("move"===n&&r!==i&&r.toLowerCase()===i.toLowerCase())return{srcStat:u,destStat:o,isChangingCase:!0};throw new Error("Source and destination must not be the same.")}if(u.isDirectory()&&!o.isDirectory())throw new Error(`Cannot overwrite non-directory '${t}' with directory '${e}'.`);if(!u.isDirectory()&&o.isDirectory())throw new Error(`Cannot overwrite directory '${t}' with non-directory '${e}'.`)}if(u.isDirectory()&&Ze(e,t))throw new Error(Qe(e,t,n));return{srcStat:u,destStat:o}},checkParentPaths:function e(t,n,r,u,o){const i=Ke.resolve(Ke.dirname(t)),s=Ke.resolve(Ke.dirname(r));if(s===i||s===Ke.parse(s).root)return o();ze.stat(s,{bigint:!0},((i,c)=>i?"ENOENT"===i.code?o():o(i):Xe(n,c)?o(new Error(Qe(t,r,u))):e(t,n,s,u,o)))},checkParentPathsSync:function e(t,n,r,u){const o=Ke.resolve(Ke.dirname(t)),i=Ke.resolve(Ke.dirname(r));if(i===o||i===Ke.parse(i).root)return;let s;try{s=ze.statSync(i,{bigint:!0})}catch(e){if("ENOENT"===e.code)return;throw e}if(Xe(n,s))throw new Error(Qe(t,r,u));return e(t,n,i,u)},isSrcSubdir:Ze,areIdentical:Xe};const tt=we,nt=p.default,rt=$e.mkdirs,ut=Ge.pathExists,ot=Ue,it=et;function st(e,t,n,r,u){const o=nt.dirname(n);ut(o,((i,s)=>i?u(i):s?at(e,t,n,r,u):void rt(o,(o=>o?u(o):at(e,t,n,r,u)))))}function ct(e,t,n,r,u,o){Promise.resolve(u.filter(n,r)).then((i=>i?e(t,n,r,u,o):o()),(e=>o(e)))}function at(e,t,n,r,u){(r.dereference?tt.stat:tt.lstat)(t,((o,i)=>o?u(o):i.isDirectory()?function(e,t,n,r,u,o){return t?Dt(n,r,u,o):function(e,t,n,r,u){tt.mkdir(n,(o=>{if(o)return u(o);Dt(t,n,r,(t=>t?u(t):dt(n,e,u)))}))}(e.mode,n,r,u,o)}(i,e,t,n,r,u):i.isFile()||i.isCharacterDevice()||i.isBlockDevice()?function(e,t,n,r,u,o){return t?function(e,t,n,r,u){if(!r.overwrite)return r.errorOnExist?u(new Error(`'${n}' already exists`)):u();tt.unlink(n,(o=>o?u(o):lt(e,t,n,r,u)))}(e,n,r,u,o):lt(e,n,r,u,o)}(i,e,t,n,r,u):i.isSymbolicLink()?function(e,t,n,r,u){tt.readlink(t,((t,o)=>t?u(t):(r.dereference&&(o=nt.resolve(process.cwd(),o)),e?void tt.readlink(n,((t,i)=>t?"EINVAL"===t.code||"UNKNOWN"===t.code?tt.symlink(o,n,u):u(t):(r.dereference&&(i=nt.resolve(process.cwd(),i)),it.isSrcSubdir(o,i)?u(new Error(`Cannot copy '${o}' to a subdirectory of itself, '${i}'.`)):e.isDirectory()&&it.isSrcSubdir(i,o)?u(new Error(`Cannot overwrite '${i}' with '${o}'.`)):function(e,t,n){tt.unlink(t,(r=>r?n(r):tt.symlink(e,t,n)))}(o,n,u)))):tt.symlink(o,n,u))))}(e,t,n,r,u):i.isSocket()?u(new Error(`Cannot copy a socket file: ${t}`)):i.isFIFO()?u(new Error(`Cannot copy a FIFO pipe: ${t}`)):u(new Error(`Unknown file: ${t}`))))}function lt(e,t,n,r,u){tt.copyFile(t,n,(o=>o?u(o):r.preserveTimestamps?function(e,t,n,r){if(function(e){return 0==(128&e)}(e))return function(e,t,n){return dt(e,128|t,n)}(n,e,(u=>u?r(u):ft(e,t,n,r)));return ft(e,t,n,r)}(e.mode,t,n,u):dt(n,e.mode,u)))}function ft(e,t,n,r){!function(e,t,n){tt.stat(e,((e,r)=>e?n(e):ot(t,r.atime,r.mtime,n)))}(t,n,(t=>t?r(t):dt(n,e,r)))}function dt(e,t,n){return tt.chmod(e,t,n)}function Dt(e,t,n,r){tt.readdir(e,((u,o)=>u?r(u):pt(o,e,t,n,r)))}function pt(e,t,n,r,u){const o=e.pop();return o?function(e,t,n,r,u,o){const i=nt.join(n,t),s=nt.join(r,t);it.checkPaths(i,s,"copy",u,((t,c)=>{if(t)return o(t);const{destStat:a}=c;!function(e,t,n,r,u){r.filter?ct(at,e,t,n,r,u):at(e,t,n,r,u)}(a,i,s,u,(t=>t?o(t):pt(e,n,r,u,o)))}))}(e,o,t,n,r,u):u()}var Et=function(e,t,n,r){"function"!=typeof n||r?"function"==typeof n&&(n={filter:n}):(r=n,n={}),r=r||function(){},(n=n||{}).clobber=!("clobber"in n)||!!n.clobber,n.overwrite="overwrite"in n?!!n.overwrite:n.clobber,n.preserveTimestamps&&"ia32"===process.arch&&console.warn("fs-extra: Using the preserveTimestamps option in 32-bit node is not recommended;\n\n see https://github.com/jprichardson/node-fs-extra/issues/269"),it.checkPaths(e,t,"copy",n,((u,o)=>{if(u)return r(u);const{srcStat:i,destStat:s}=o;it.checkParentPaths(e,i,t,"copy",(u=>u?r(u):n.filter?ct(st,s,e,t,n,r):st(s,e,t,n,r)))}))};const mt=we,ht=p.default,yt=$e.mkdirsSync,Ct=We,Ft=et;function gt(e,t,n,r){const u=(r.dereference?mt.statSync:mt.lstatSync)(t);if(u.isDirectory())return function(e,t,n,r,u){return t?St(n,r,u):function(e,t,n,r){return mt.mkdirSync(n),St(t,n,r),vt(n,e)}(e.mode,n,r,u)}(u,e,t,n,r);if(u.isFile()||u.isCharacterDevice()||u.isBlockDevice())return function(e,t,n,r,u){return t?function(e,t,n,r){if(r.overwrite)return mt.unlinkSync(n),At(e,t,n,r);if(r.errorOnExist)throw new Error(`'${n}' already exists`)}(e,n,r,u):At(e,n,r,u)}(u,e,t,n,r);if(u.isSymbolicLink())return function(e,t,n,r){let u=mt.readlinkSync(t);r.dereference&&(u=ht.resolve(process.cwd(),u));if(e){let e;try{e=mt.readlinkSync(n)}catch(e){if("EINVAL"===e.code||"UNKNOWN"===e.code)return mt.symlinkSync(u,n);throw e}if(r.dereference&&(e=ht.resolve(process.cwd(),e)),Ft.isSrcSubdir(u,e))throw new Error(`Cannot copy '${u}' to a subdirectory of itself, '${e}'.`);if(mt.statSync(n).isDirectory()&&Ft.isSrcSubdir(e,u))throw new Error(`Cannot overwrite '${e}' with '${u}'.`);return function(e,t){return mt.unlinkSync(t),mt.symlinkSync(e,t)}(u,n)}return mt.symlinkSync(u,n)}(e,t,n,r);if(u.isSocket())throw new Error(`Cannot copy a socket file: ${t}`);if(u.isFIFO())throw new Error(`Cannot copy a FIFO pipe: ${t}`);throw new Error(`Unknown file: ${t}`)}function At(e,t,n,r){return mt.copyFileSync(t,n),r.preserveTimestamps&&function(e,t,n){(function(e){return 0==(128&e)})(e)&&function(e,t){vt(e,128|t)}(n,e);(function(e,t){const n=mt.statSync(e);Ct(t,n.atime,n.mtime)})(t,n)}(e.mode,t,n),vt(n,e.mode)}function vt(e,t){return mt.chmodSync(e,t)}function St(e,t,n){mt.readdirSync(e).forEach((r=>function(e,t,n,r){const u=ht.join(t,e),o=ht.join(n,e),{destStat:i}=Ft.checkPathsSync(u,o,"copy",r);return function(e,t,n,r){if(!r.filter||r.filter(t,n))return gt(e,t,n,r)}(i,u,o,r)}(r,e,t,n)))}var wt=function(e,t,n){"function"==typeof n&&(n={filter:n}),(n=n||{}).clobber=!("clobber"in n)||!!n.clobber,n.overwrite="overwrite"in n?!!n.overwrite:n.clobber,n.preserveTimestamps&&"ia32"===process.arch&&console.warn("fs-extra: Using the preserveTimestamps option in 32-bit node is not recommended;\n\n see https://github.com/jprichardson/node-fs-extra/issues/269");const{srcStat:r,destStat:u}=Ft.checkPathsSync(e,t,"copy",n);return Ft.checkParentPathsSync(e,r,t,"copy"),function(e,t,n,r){if(r.filter&&!r.filter(t,n))return;const u=ht.dirname(n);mt.existsSync(u)||yt(u);return gt(e,t,n,r)}(u,e,t,n)};var Ot={copy:(0,re.fromCallback)(Et),copySync:wt};const bt=we,_t=p.default,Bt=g.default,Pt="win32"===process.platform;function kt(e){["unlink","chmod","stat","lstat","rmdir","readdir"].forEach((t=>{e[t]=e[t]||bt[t],e[t+="Sync"]=e[t]||bt[t]})),e.maxBusyTries=e.maxBusyTries||3}function xt(e,t,n){let r=0;"function"==typeof t&&(n=t,t={}),Bt(e,"rimraf: missing path"),Bt.strictEqual(typeof e,"string","rimraf: path should be a string"),Bt.strictEqual(typeof n,"function","rimraf: callback function required"),Bt(t,"rimraf: invalid options argument provided"),Bt.strictEqual(typeof t,"object","rimraf: options should be object"),kt(t),Nt(e,t,(function u(o){if(o){if(("EBUSY"===o.code||"ENOTEMPTY"===o.code||"EPERM"===o.code)&&rNt(e,t,u)),100*r)}"ENOENT"===o.code&&(o=null)}n(o)}))}function Nt(e,t,n){Bt(e),Bt(t),Bt("function"==typeof n),t.lstat(e,((r,u)=>r&&"ENOENT"===r.code?n(null):r&&"EPERM"===r.code&&Pt?It(e,t,r,n):u&&u.isDirectory()?Rt(e,t,r,n):void t.unlink(e,(r=>{if(r){if("ENOENT"===r.code)return n(null);if("EPERM"===r.code)return Pt?It(e,t,r,n):Rt(e,t,r,n);if("EISDIR"===r.code)return Rt(e,t,r,n)}return n(r)}))))}function It(e,t,n,r){Bt(e),Bt(t),Bt("function"==typeof r),t.chmod(e,438,(u=>{u?r("ENOENT"===u.code?null:n):t.stat(e,((u,o)=>{u?r("ENOENT"===u.code?null:n):o.isDirectory()?Rt(e,t,n,r):t.unlink(e,r)}))}))}function Tt(e,t,n){let r;Bt(e),Bt(t);try{t.chmodSync(e,438)}catch(e){if("ENOENT"===e.code)return;throw n}try{r=t.statSync(e)}catch(e){if("ENOENT"===e.code)return;throw n}r.isDirectory()?Lt(e,t,n):t.unlinkSync(e)}function Rt(e,t,n,r){Bt(e),Bt(t),Bt("function"==typeof r),t.rmdir(e,(u=>{!u||"ENOTEMPTY"!==u.code&&"EEXIST"!==u.code&&"EPERM"!==u.code?u&&"ENOTDIR"===u.code?r(n):r(u):function(e,t,n){Bt(e),Bt(t),Bt("function"==typeof n),t.readdir(e,((r,u)=>{if(r)return n(r);let o,i=u.length;if(0===i)return t.rmdir(e,n);u.forEach((r=>{xt(_t.join(e,r),t,(r=>{if(!o)return r?n(o=r):void(0==--i&&t.rmdir(e,n))}))}))}))}(e,t,r)}))}function Mt(e,t){let n;kt(t=t||{}),Bt(e,"rimraf: missing path"),Bt.strictEqual(typeof e,"string","rimraf: path should be a string"),Bt(t,"rimraf: missing options"),Bt.strictEqual(typeof t,"object","rimraf: options should be object");try{n=t.lstatSync(e)}catch(n){if("ENOENT"===n.code)return;"EPERM"===n.code&&Pt&&Tt(e,t,n)}try{n&&n.isDirectory()?Lt(e,t,null):t.unlinkSync(e)}catch(n){if("ENOENT"===n.code)return;if("EPERM"===n.code)return Pt?Tt(e,t,n):Lt(e,t,n);if("EISDIR"!==n.code)throw n;Lt(e,t,n)}}function Lt(e,t,n){Bt(e),Bt(t);try{t.rmdirSync(e)}catch(r){if("ENOTDIR"===r.code)throw n;if("ENOTEMPTY"===r.code||"EEXIST"===r.code||"EPERM"===r.code)!function(e,t){if(Bt(e),Bt(t),t.readdirSync(e).forEach((n=>Mt(_t.join(e,n),t))),!Pt){return t.rmdirSync(e,t)}{const n=Date.now();do{try{return t.rmdirSync(e,t)}catch{}}while(Date.now()-n<500)}}(e,t);else if("ENOENT"!==r.code)throw r}}var jt=xt;xt.sync=Mt;const $t=we,Ht=re.fromCallback,Jt=jt;var Gt={remove:Ht((function(e,t){if($t.rm)return $t.rm(e,{recursive:!0,force:!0},t);Jt(e,t)})),removeSync:function(e){if($t.rmSync)return $t.rmSync(e,{recursive:!0,force:!0});Jt.sync(e)}};const Vt=re.fromPromise,Ut=ne,Wt=p.default,zt=$e,Kt=Gt,qt=Vt((async function(e){let t;try{t=await Ut.readdir(e)}catch{return zt.mkdirs(e)}return Promise.all(t.map((t=>Kt.remove(Wt.join(e,t)))))}));function Yt(e){let t;try{t=Ut.readdirSync(e)}catch{return zt.mkdirsSync(e)}t.forEach((t=>{t=Wt.join(e,t),Kt.removeSync(t)}))}var Xt={emptyDirSync:Yt,emptydirSync:Yt,emptyDir:qt,emptydir:qt};const Zt=re.fromCallback,Qt=p.default,en=we,tn=$e;var nn={createFile:Zt((function(e,t){function n(){en.writeFile(e,"",(e=>{if(e)return t(e);t()}))}en.stat(e,((r,u)=>{if(!r&&u.isFile())return t();const o=Qt.dirname(e);en.stat(o,((e,r)=>{if(e)return"ENOENT"===e.code?tn.mkdirs(o,(e=>{if(e)return t(e);n()})):t(e);r.isDirectory()?n():en.readdir(o,(e=>{if(e)return t(e)}))}))}))})),createFileSync:function(e){let t;try{t=en.statSync(e)}catch{}if(t&&t.isFile())return;const n=Qt.dirname(e);try{en.statSync(n).isDirectory()||en.readdirSync(n)}catch(e){if(!e||"ENOENT"!==e.code)throw e;tn.mkdirsSync(n)}en.writeFileSync(e,"")}};const rn=re.fromCallback,un=p.default,on=we,sn=$e,cn=Ge.pathExists,{areIdentical:an}=et;var ln={createLink:rn((function(e,t,n){function r(e,t){on.link(e,t,(e=>{if(e)return n(e);n(null)}))}on.lstat(t,((u,o)=>{on.lstat(e,((u,i)=>{if(u)return u.message=u.message.replace("lstat","ensureLink"),n(u);if(o&&an(i,o))return n(null);const s=un.dirname(t);cn(s,((u,o)=>u?n(u):o?r(e,t):void sn.mkdirs(s,(u=>{if(u)return n(u);r(e,t)}))))}))}))})),createLinkSync:function(e,t){let n;try{n=on.lstatSync(t)}catch{}try{const t=on.lstatSync(e);if(n&&an(t,n))return}catch(e){throw e.message=e.message.replace("lstat","ensureLink"),e}const r=un.dirname(t);return on.existsSync(r)||sn.mkdirsSync(r),on.linkSync(e,t)}};const fn=p.default,dn=we,Dn=Ge.pathExists;var pn={symlinkPaths:function(e,t,n){if(fn.isAbsolute(e))return dn.lstat(e,(t=>t?(t.message=t.message.replace("lstat","ensureSymlink"),n(t)):n(null,{toCwd:e,toDst:e})));{const r=fn.dirname(t),u=fn.join(r,e);return Dn(u,((t,o)=>t?n(t):o?n(null,{toCwd:u,toDst:e}):dn.lstat(e,(t=>t?(t.message=t.message.replace("lstat","ensureSymlink"),n(t)):n(null,{toCwd:e,toDst:fn.relative(r,e)})))))}},symlinkPathsSync:function(e,t){let n;if(fn.isAbsolute(e)){if(n=dn.existsSync(e),!n)throw new Error("absolute srcpath does not exist");return{toCwd:e,toDst:e}}{const r=fn.dirname(t),u=fn.join(r,e);if(n=dn.existsSync(u),n)return{toCwd:u,toDst:e};if(n=dn.existsSync(e),!n)throw new Error("relative srcpath does not exist");return{toCwd:e,toDst:fn.relative(r,e)}}}};const En=we;var mn={symlinkType:function(e,t,n){if(n="function"==typeof t?t:n,t="function"!=typeof t&&t)return n(null,t);En.lstat(e,((e,r)=>{if(e)return n(null,"file");t=r&&r.isDirectory()?"dir":"file",n(null,t)}))},symlinkTypeSync:function(e,t){let n;if(t)return t;try{n=En.lstatSync(e)}catch{return"file"}return n&&n.isDirectory()?"dir":"file"}};const hn=re.fromCallback,yn=p.default,Cn=ne,Fn=$e.mkdirs,gn=$e.mkdirsSync,An=pn.symlinkPaths,vn=pn.symlinkPathsSync,Sn=mn.symlinkType,wn=mn.symlinkTypeSync,On=Ge.pathExists,{areIdentical:bn}=et;function _n(e,t,n,r){An(e,t,((u,o)=>{if(u)return r(u);e=o.toDst,Sn(o.toCwd,n,((n,u)=>{if(n)return r(n);const o=yn.dirname(t);On(o,((n,i)=>n?r(n):i?Cn.symlink(e,t,u,r):void Fn(o,(n=>{if(n)return r(n);Cn.symlink(e,t,u,r)}))))}))}))}var Bn={createSymlink:hn((function(e,t,n,r){r="function"==typeof n?n:r,n="function"!=typeof n&&n,Cn.lstat(t,((u,o)=>{!u&&o.isSymbolicLink()?Promise.all([Cn.stat(e),Cn.stat(t)]).then((([u,o])=>{if(bn(u,o))return r(null);_n(e,t,n,r)})):_n(e,t,n,r)}))})),createSymlinkSync:function(e,t,n){let r;try{r=Cn.lstatSync(t)}catch{}if(r&&r.isSymbolicLink()){const n=Cn.statSync(e),r=Cn.statSync(t);if(bn(n,r))return}const u=vn(e,t);e=u.toDst,n=wn(u.toCwd,n);const o=yn.dirname(t);return Cn.existsSync(o)||gn(o),Cn.symlinkSync(e,t,n)}};const{createFile:Pn,createFileSync:kn}=nn,{createLink:xn,createLinkSync:Nn}=ln,{createSymlink:In,createSymlinkSync:Tn}=Bn;var Rn={createFile:Pn,createFileSync:kn,ensureFile:Pn,ensureFileSync:kn,createLink:xn,createLinkSync:Nn,ensureLink:xn,ensureLinkSync:Nn,createSymlink:In,createSymlinkSync:Tn,ensureSymlink:In,ensureSymlinkSync:Tn};var Mn={stringify:function(e,{EOL:t="\n",finalEOL:n=!0,replacer:r=null,spaces:u}={}){const o=n?t:"";return JSON.stringify(e,r,u).replace(/\n/g,t)+o},stripBom:function(e){return Buffer.isBuffer(e)&&(e=e.toString("utf8")),e.replace(/^\uFEFF/,"")}};let Ln;try{Ln=we}catch(e){Ln=D.default}const jn=re,{stringify:$n,stripBom:Hn}=Mn;const Jn=jn.fromPromise((async function(e,t={}){"string"==typeof t&&(t={encoding:t});const n=t.fs||Ln,r=!("throws"in t)||t.throws;let u,o=await jn.fromCallback(n.readFile)(e,t);o=Hn(o);try{u=JSON.parse(o,t?t.reviver:null)}catch(t){if(r)throw t.message=`${e}: ${t.message}`,t;return null}return u}));const Gn=jn.fromPromise((async function(e,t,n={}){const r=n.fs||Ln,u=$n(t,n);await jn.fromCallback(r.writeFile)(e,u,n)}));const Vn={readFile:Jn,readFileSync:function(e,t={}){"string"==typeof t&&(t={encoding:t});const n=t.fs||Ln,r=!("throws"in t)||t.throws;try{let r=n.readFileSync(e,t);return r=Hn(r),JSON.parse(r,t.reviver)}catch(t){if(r)throw t.message=`${e}: ${t.message}`,t;return null}},writeFile:Gn,writeFileSync:function(e,t,n={}){const r=n.fs||Ln,u=$n(t,n);return r.writeFileSync(e,u,n)}};var Un={readJson:Vn.readFile,readJsonSync:Vn.readFileSync,writeJson:Vn.writeFile,writeJsonSync:Vn.writeFileSync};const Wn=re.fromCallback,zn=we,Kn=p.default,qn=$e,Yn=Ge.pathExists;var Xn={outputFile:Wn((function(e,t,n,r){"function"==typeof n&&(r=n,n="utf8");const u=Kn.dirname(e);Yn(u,((o,i)=>o?r(o):i?zn.writeFile(e,t,n,r):void qn.mkdirs(u,(u=>{if(u)return r(u);zn.writeFile(e,t,n,r)}))))})),outputFileSync:function(e,...t){const n=Kn.dirname(e);if(zn.existsSync(n))return zn.writeFileSync(e,...t);qn.mkdirsSync(n),zn.writeFileSync(e,...t)}};const{stringify:Zn}=Mn,{outputFile:Qn}=Xn;var er=async function(e,t,n={}){const r=Zn(t,n);await Qn(e,r,n)};const{stringify:tr}=Mn,{outputFileSync:nr}=Xn;var rr=function(e,t,n){const r=tr(t,n);nr(e,r,n)};const ur=re.fromPromise,or=Un;or.outputJson=ur(er),or.outputJsonSync=rr,or.outputJSON=or.outputJson,or.outputJSONSync=or.outputJsonSync,or.writeJSON=or.writeJson,or.writeJSONSync=or.writeJsonSync,or.readJSON=or.readJson,or.readJSONSync=or.readJsonSync;var ir=or;const sr=we,cr=p.default,ar=Ot.copy,lr=Gt.remove,fr=$e.mkdirp,dr=Ge.pathExists,Dr=et;function pr(e,t,n,r,u){return r?Er(e,t,n,u):n?lr(t,(r=>r?u(r):Er(e,t,n,u))):void dr(t,((r,o)=>r?u(r):o?u(new Error("dest already exists.")):Er(e,t,n,u)))}function Er(e,t,n,r){sr.rename(e,t,(u=>u?"EXDEV"!==u.code?r(u):function(e,t,n,r){const u={overwrite:n,errorOnExist:!0};ar(e,t,u,(t=>t?r(t):lr(e,r)))}(e,t,n,r):r()))}var mr=function(e,t,n,r){"function"==typeof n&&(r=n,n={});const u=n.overwrite||n.clobber||!1;Dr.checkPaths(e,t,"move",n,((n,o)=>{if(n)return r(n);const{srcStat:i,isChangingCase:s=!1}=o;Dr.checkParentPaths(e,i,t,"move",(n=>n?r(n):function(e){const t=cr.dirname(e);return cr.parse(t).root===t}(t)?pr(e,t,u,s,r):void fr(cr.dirname(t),(n=>n?r(n):pr(e,t,u,s,r)))))}))};const hr=we,yr=p.default,Cr=Ot.copySync,Fr=Gt.removeSync,gr=$e.mkdirpSync,Ar=et;function vr(e,t,n){try{hr.renameSync(e,t)}catch(r){if("EXDEV"!==r.code)throw r;return function(e,t,n){const r={overwrite:n,errorOnExist:!0};return Cr(e,t,r),Fr(e)}(e,t,n)}}var Sr=function(e,t,n){const r=(n=n||{}).overwrite||n.clobber||!1,{srcStat:u,isChangingCase:o=!1}=Ar.checkPathsSync(e,t,"move",n);return Ar.checkParentPathsSync(e,u,t,"move"),function(e){const t=yr.dirname(e);return yr.parse(t).root===t}(t)||gr(yr.dirname(t)),function(e,t,n,r){if(r)return vr(e,t,n);if(n)return Fr(t),vr(e,t,n);if(hr.existsSync(t))throw new Error("dest already exists.");return vr(e,t,n)}(e,t,r,o)};var wr,Or,br,_r,Br,Pr={move:(0,re.fromCallback)(mr),moveSync:Sr},kr={...ne,...Ot,...Xt,...Rn,...ir,...$e,...Pr,...Xn,...Ge,...Gt},xr={},Nr={exports:{}},Ir={exports:{}};function Tr(){if(Or)return wr;Or=1;var e=1e3,t=60*e,n=60*t,r=24*n,u=7*r,o=365.25*r;function i(e,t,n,r){var u=t>=1.5*n;return Math.round(e/n)+" "+r+(u?"s":"")}return wr=function(s,c){c=c||{};var a=typeof s;if("string"===a&&s.length>0)return function(i){if((i=String(i)).length>100)return;var s=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(i);if(!s)return;var c=parseFloat(s[1]);switch((s[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return c*o;case"weeks":case"week":case"w":return c*u;case"days":case"day":case"d":return c*r;case"hours":case"hour":case"hrs":case"hr":case"h":return c*n;case"minutes":case"minute":case"mins":case"min":case"m":return c*t;case"seconds":case"second":case"secs":case"sec":case"s":return c*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return c;default:return}}(s);if("number"===a&&isFinite(s))return c.long?function(u){var o=Math.abs(u);if(o>=r)return i(u,o,r,"day");if(o>=n)return i(u,o,n,"hour");if(o>=t)return i(u,o,t,"minute");if(o>=e)return i(u,o,e,"second");return u+" ms"}(s):function(u){var o=Math.abs(u);if(o>=r)return Math.round(u/r)+"d";if(o>=n)return Math.round(u/n)+"h";if(o>=t)return Math.round(u/t)+"m";if(o>=e)return Math.round(u/e)+"s";return u+"ms"}(s);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(s))}}function Rr(){if(_r)return br;return _r=1,br=function(e){function t(e){let r,u,o,i=null;function s(...e){if(!s.enabled)return;const n=s,u=Number(new Date),o=u-(r||u);n.diff=o,n.prev=r,n.curr=u,r=u,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let i=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,((r,u)=>{if("%%"===r)return"%";i++;const o=t.formatters[u];if("function"==typeof o){const t=e[i];r=o.call(n,t),e.splice(i,1),i--}return r})),t.formatArgs.call(n,e);(n.log||t.log).apply(n,e)}return s.namespace=e,s.useColors=t.useColors(),s.color=t.selectColor(e),s.extend=n,s.destroy=t.destroy,Object.defineProperty(s,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==i?i:(u!==t.namespaces&&(u=t.namespaces,o=t.enabled(e)),o),set:e=>{i=e}}),"function"==typeof t.init&&t.init(s),s}function n(e,n){const r=t(this.namespace+(void 0===n?":":n)+e);return r.log=this.log,r}function r(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){if(e instanceof Error)return e.stack||e.message;return e},t.disable=function(){const e=[...t.names.map(r),...t.skips.map(r).map((e=>"-"+e))].join(",");return t.enable(""),e},t.enable=function(e){let n;t.save(e),t.namespaces=e,t.names=[],t.skips=[];const r=("string"==typeof e?e:"").split(/[\s,]+/),u=r.length;for(n=0;n{t[n]=e[n]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let n=0;for(let t=0;t{const n=e.startsWith("-")?"":1===e.length?"-":"--",r=t.indexOf(n+e),u=t.indexOf("--");return-1!==r&&(-1===u||r{}),"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."),t.colors=[6,2,3,4,5,1];try{const e=function(){if($r)return jr;$r=1;const e=E.default,t=A.default,n=Vr(),{env:r}=process;let u;function o(e){return 0!==e&&{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function i(t,o){if(0===u)return 0;if(n("color=16m")||n("color=full")||n("color=truecolor"))return 3;if(n("color=256"))return 2;if(t&&!o&&void 0===u)return 0;const i=u||0;if("dumb"===r.TERM)return i;if("win32"===process.platform){const t=e.release().split(".");return Number(t[0])>=10&&Number(t[2])>=10586?Number(t[2])>=14931?3:2:1}if("CI"in r)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some((e=>e in r))||"codeship"===r.CI_NAME?1:i;if("TEAMCITY_VERSION"in r)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(r.TEAMCITY_VERSION)?1:0;if("truecolor"===r.COLORTERM)return 3;if("TERM_PROGRAM"in r){const e=parseInt((r.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(r.TERM_PROGRAM){case"iTerm.app":return e>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(r.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(r.TERM)||"COLORTERM"in r?1:i}return n("no-color")||n("no-colors")||n("color=false")||n("color=never")?u=0:(n("color")||n("colors")||n("color=true")||n("color=always"))&&(u=1),"FORCE_COLOR"in r&&(u="true"===r.FORCE_COLOR?1:"false"===r.FORCE_COLOR?0:0===r.FORCE_COLOR.length?1:Math.min(parseInt(r.FORCE_COLOR,10),3)),jr={supportsColor:function(e){return o(i(e,e&&e.isTTY))},stdout:o(i(!0,t.isatty(1))),stderr:o(i(!0,t.isatty(2)))}}();e&&(e.stderr||e).level>=2&&(t.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch(e){}t.inspectOpts=Object.keys(process.env).filter((e=>/^debug_/i.test(e))).reduce(((e,t)=>{const n=t.substring(6).toLowerCase().replace(/_([a-z])/g,((e,t)=>t.toUpperCase()));let r=process.env[t];return r=!!/^(yes|on|true|enabled)$/i.test(r)||!/^(no|off|false|disabled)$/i.test(r)&&("null"===r?null:Number(r)),e[n]=r,e}),{}),e.exports=Rr()(t);const{formatters:u}=e.exports;u.o=function(e){return this.inspectOpts.colors=this.useColors,r.inspect(e,this.inspectOpts).split("\n").map((e=>e.trim())).join(" ")},u.O=function(e){return this.inspectOpts.colors=this.useColors,r.inspect(e,this.inspectOpts)}}(Gr,Gr.exports)),Gr.exports}Jr=Nr,"undefined"==typeof process||"renderer"===process.type||!0===process.browser||process.__nwjs?Jr.exports=(Br||(Br=1,function(e,t){t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const n="color: "+this.color;t.splice(1,0,n,"color: inherit");let r=0,u=0;t[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(r++,"%c"===e&&(u=r))})),t.splice(u,0,n)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")}catch(e){}return!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG),e},t.useColors=function(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type&&!window.process.__nwjs)||("undefined"==typeof navigator||!navigator.userAgent||!navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=Rr()(t);const{formatters:n}=e.exports;n.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}}(Ir,Ir.exports)),Ir.exports):Jr.exports=Ur();var Wr=function(e){return(e=e||{}).circles?function(e){var t=[],n=[];return e.proto?function e(u){if("object"!=typeof u||null===u)return u;if(u instanceof Date)return new Date(u);if(Array.isArray(u))return r(u,e);if(u instanceof Map)return new Map(r(Array.from(u),e));if(u instanceof Set)return new Set(r(Array.from(u),e));var o={};for(var i in t.push(u),n.push(o),u){var s=u[i];if("object"!=typeof s||null===s)o[i]=s;else if(s instanceof Date)o[i]=new Date(s);else if(s instanceof Map)o[i]=new Map(r(Array.from(s),e));else if(s instanceof Set)o[i]=new Set(r(Array.from(s),e));else if(ArrayBuffer.isView(s))o[i]=zr(s);else{var c=t.indexOf(s);o[i]=-1!==c?n[c]:e(s)}}return t.pop(),n.pop(),o}:function e(u){if("object"!=typeof u||null===u)return u;if(u instanceof Date)return new Date(u);if(Array.isArray(u))return r(u,e);if(u instanceof Map)return new Map(r(Array.from(u),e));if(u instanceof Set)return new Set(r(Array.from(u),e));var o={};for(var i in t.push(u),n.push(o),u)if(!1!==Object.hasOwnProperty.call(u,i)){var s=u[i];if("object"!=typeof s||null===s)o[i]=s;else if(s instanceof Date)o[i]=new Date(s);else if(s instanceof Map)o[i]=new Map(r(Array.from(s),e));else if(s instanceof Set)o[i]=new Set(r(Array.from(s),e));else if(ArrayBuffer.isView(s))o[i]=zr(s);else{var c=t.indexOf(s);o[i]=-1!==c?n[c]:e(s)}}return t.pop(),n.pop(),o};function r(e,r){for(var u=Object.keys(e),o=new Array(u.length),i=0;i!e,Qr=e=>e&&"object"==typeof e&&!Array.isArray(e),eu=(e,t,n)=>{(Array.isArray(t)?t:[t]).forEach((t=>{if(t)throw new Error(`Problem with log4js configuration: (${Kr.inspect(e,{depth:5})}) - ${n}`)}))};var tu={configure:e=>{qr("New configuration to be validated: ",e),eu(e,Zr(Qr(e)),"must be an object."),qr(`Calling pre-processing listeners (${Yr.length})`),Yr.forEach((t=>t(e))),qr("Configuration pre-processing finished."),qr(`Calling configuration listeners (${Xr.length})`),Xr.forEach((t=>t(e))),qr("Configuration finished.")},addListener:e=>{Xr.push(e),qr(`Added listener, now ${Xr.length} listeners`)},addPreProcessingListener:e=>{Yr.push(e),qr(`Added pre-processing listener, now ${Yr.length} listeners`)},throwExceptionIf:eu,anObject:Qr,anInteger:e=>e&&"number"==typeof e&&Number.isInteger(e),validIdentifier:e=>/^[A-Za-z][A-Za-z0-9_]*$/g.test(e),not:Zr},nu={exports:{}};!function(e){function t(e,t){for(var n=e.toString();n.length-1?s:c,l=n(u.getHours()),f=n(u.getMinutes()),d=n(u.getSeconds()),D=t(u.getMilliseconds(),3),p=function(e){var t=Math.abs(e),n=String(Math.floor(t/60)),r=String(t%60);return n=("0"+n).slice(-2),r=("0"+r).slice(-2),0===e?"Z":(e<0?"+":"-")+n+":"+r}(u.getTimezoneOffset());return r.replace(/dd/g,o).replace(/MM/g,i).replace(/y{1,4}/g,a).replace(/hh/g,l).replace(/mm/g,f).replace(/ss/g,d).replace(/SSS/g,D).replace(/O/g,p)}function u(e,t,n,r){e["set"+(r?"":"UTC")+t](n)}e.exports=r,e.exports.asString=r,e.exports.parse=function(t,n,r){if(!t)throw new Error("pattern must be supplied");return function(t,n,r){var o=t.indexOf("O")<0,i=!1,s=[{pattern:/y{1,4}/,regexp:"\\d{1,4}",fn:function(e,t){u(e,"FullYear",t,o)}},{pattern:/MM/,regexp:"\\d{1,2}",fn:function(e,t){u(e,"Month",t-1,o),e.getMonth()!==t-1&&(i=!0)}},{pattern:/dd/,regexp:"\\d{1,2}",fn:function(e,t){i&&u(e,"Month",e.getMonth()-1,o),u(e,"Date",t,o)}},{pattern:/hh/,regexp:"\\d{1,2}",fn:function(e,t){u(e,"Hours",t,o)}},{pattern:/mm/,regexp:"\\d\\d",fn:function(e,t){u(e,"Minutes",t,o)}},{pattern:/ss/,regexp:"\\d\\d",fn:function(e,t){u(e,"Seconds",t,o)}},{pattern:/SSS/,regexp:"\\d\\d\\d",fn:function(e,t){u(e,"Milliseconds",t,o)}},{pattern:/O/,regexp:"[+-]\\d{1,2}:?\\d{2}?|Z",fn:function(e,t){t="Z"===t?0:t.replace(":","");var n=Math.abs(t),r=(t>0?-1:1)*(n%100+60*Math.floor(n/100));e.setUTCMinutes(e.getUTCMinutes()+r)}}],c=s.reduce((function(e,t){return t.pattern.test(e.regexp)?(t.index=e.regexp.match(t.pattern).index,e.regexp=e.regexp.replace(t.pattern,"("+t.regexp+")")):t.index=-1,e}),{regexp:t,index:[]}),a=s.filter((function(e){return e.index>-1}));a.sort((function(e,t){return e.index-t.index}));var l=new RegExp(c.regexp).exec(n);if(l){var f=r||e.exports.now();return a.forEach((function(e,t){e.fn(f,l[t+1])})),f}throw new Error("String '"+n+"' could not be parsed as '"+t+"'")}(t,n,r)},e.exports.now=function(){return new Date},e.exports.ISO8601_FORMAT="yyyy-MM-ddThh:mm:ss.SSS",e.exports.ISO8601_WITH_TZ_OFFSET_FORMAT="yyyy-MM-ddThh:mm:ss.SSSO",e.exports.DATETIME_FORMAT="dd MM yyyy hh:mm:ss.SSS",e.exports.ABSOLUTETIME_FORMAT="hh:mm:ss.SSS"}(nu);const ru=nu.exports,uu=E.default,ou=F.default,iu=p.default,su={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[90,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[91,39],yellow:[33,39]};function cu(e){return e?`[${su[e][0]}m`:""}function au(e){return e?`[${su[e][1]}m`:""}function lu(e,t){return n=ou.format("[%s] [%s] %s - ",ru.asString(e.startTime),e.level.toString(),e.categoryName),cu(r=t)+n+au(r);var n,r}function fu(e){return lu(e)+ou.format(...e.data)}function du(e){return lu(e,e.level.colour)+ou.format(...e.data)}function Du(e){return ou.format(...e.data)}function pu(e){return e.data[0]}function Eu(e,t){const n=/%(-?[0-9]+)?(\.?-?[0-9]+)?([[\]cdhmnprzxXyflos%])(\{([^}]+)\})?|([^%]+)/;function r(e){return e&&e.pid?e.pid.toString():process.pid.toString()}e=e||"%r %p %c - %m%n";const u={c:function(e,t){let n=e.categoryName;if(t){const e=parseInt(t,10),r=n.split(".");ee&&(n=r.slice(-e).join(iu.sep))}return n},l:function(e){return e.lineNumber?`${e.lineNumber}`:""},o:function(e){return e.columnNumber?`${e.columnNumber}`:""},s:function(e){return e.callStack||""}};function o(e,t,n){return u[e](t,n)}function i(e,t,n){let r=e;return r=function(e,t){let n;return e?(n=parseInt(e.substr(1),10),n>0?t.slice(0,n):t.slice(n)):t}(t,r),r=function(e,t){let n;if(e)if("-"===e.charAt(0))for(n=parseInt(e.substr(1),10);t.lengthDu,basic:()=>fu,colored:()=>du,coloured:()=>du,pattern:e=>Eu(e&&e.pattern,e&&e.tokens),dummy:()=>pu};var hu={basicLayout:fu,messagePassThroughLayout:Du,patternLayout:Eu,colouredLayout:du,coloredLayout:du,dummyLayout:pu,addLayout(e,t){mu[e]=t},layout:(e,t)=>mu[e]&&mu[e](t)};const yu=tu,Cu=["white","grey","black","blue","cyan","green","magenta","red","yellow"];class Fu{constructor(e,t,n){this.level=e,this.levelStr=t,this.colour=n}toString(){return this.levelStr}static getLevel(e,t){return e?e instanceof Fu?e:(e instanceof Object&&e.levelStr&&(e=e.levelStr),Fu[e.toString().toUpperCase()]||t):t}static addLevels(e){if(e){Object.keys(e).forEach((t=>{const n=t.toUpperCase();Fu[n]=new Fu(e[t].value,n,e[t].colour);const r=Fu.levels.findIndex((e=>e.levelStr===n));r>-1?Fu.levels[r]=Fu[n]:Fu.levels.push(Fu[n])})),Fu.levels.sort(((e,t)=>e.level-t.level))}}isLessThanOrEqualTo(e){return"string"==typeof e&&(e=Fu.getLevel(e)),this.level<=e.level}isGreaterThanOrEqualTo(e){return"string"==typeof e&&(e=Fu.getLevel(e)),this.level>=e.level}isEqualTo(e){return"string"==typeof e&&(e=Fu.getLevel(e)),this.level===e.level}}Fu.levels=[],Fu.addLevels({ALL:{value:Number.MIN_VALUE,colour:"grey"},TRACE:{value:5e3,colour:"blue"},DEBUG:{value:1e4,colour:"cyan"},INFO:{value:2e4,colour:"green"},WARN:{value:3e4,colour:"yellow"},ERROR:{value:4e4,colour:"red"},FATAL:{value:5e4,colour:"magenta"},MARK:{value:9007199254740992,colour:"grey"},OFF:{value:Number.MAX_VALUE,colour:"grey"}}),yu.addListener((e=>{const t=e.levels;if(t){yu.throwExceptionIf(e,yu.not(yu.anObject(t)),"levels must be an object");Object.keys(t).forEach((n=>{yu.throwExceptionIf(e,yu.not(yu.validIdentifier(n)),`level name "${n}" is not a valid identifier (must start with a letter, only contain A-Z,a-z,0-9,_)`),yu.throwExceptionIf(e,yu.not(yu.anObject(t[n])),`level "${n}" must be an object`),yu.throwExceptionIf(e,yu.not(t[n].value),`level "${n}" must have a 'value' property`),yu.throwExceptionIf(e,yu.not(yu.anInteger(t[n].value)),`level "${n}".value must have an integer value`),yu.throwExceptionIf(e,yu.not(t[n].colour),`level "${n}" must have a 'colour' property`),yu.throwExceptionIf(e,yu.not(Cu.indexOf(t[n].colour)>-1),`level "${n}".colour must be one of ${Cu.join(", ")}`)}))}})),yu.addListener((e=>{Fu.addLevels(e.levels)}));var gu=Fu,Au={exports:{}},vu={};/*! (c) 2020 Andrea Giammarchi */
-const{parse:Su,stringify:wu}=JSON,{keys:Ou}=Object,bu=String,_u="string",Bu={},Pu="object",ku=(e,t)=>t,xu=e=>e instanceof bu?bu(e):e,Nu=(e,t)=>typeof t===_u?new bu(t):t,Iu=(e,t,n,r)=>{const u=[];for(let o=Ou(n),{length:i}=o,s=0;s{const r=bu(t.push(n)-1);return e.set(n,r),r},Ru=(e,t)=>{const n=Su(e,Nu).map(xu),r=n[0],u=t||ku,o=typeof r===Pu&&r?Iu(n,new Set,r,u):r;return u.call({"":o},"",o)};vu.parse=Ru;const Mu=(e,t,n)=>{const r=t&&typeof t===Pu?(e,n)=>""===e||-1Su(Mu(e));vu.fromJSON=e=>Ru(wu(e));const Lu=vu,ju=gu;class $u{constructor(e,t,n,r,u){this.startTime=new Date,this.categoryName=e,this.data=n,this.level=t,this.context=Object.assign({},r),this.pid=process.pid,u&&(this.functionName=u.functionName,this.fileName=u.fileName,this.lineNumber=u.lineNumber,this.columnNumber=u.columnNumber,this.callStack=u.callStack)}serialise(){const e=this.data.map((e=>(e&&e.message&&e.stack&&(e=Object.assign({message:e.message,stack:e.stack},e)),e)));return this.data=e,Lu.stringify(this)}static deserialise(e){let t;try{const n=Lu.parse(e);n.data=n.data.map((e=>{if(e&&e.message&&e.stack){const t=new Error(e);Object.keys(e).forEach((n=>{t[n]=e[n]})),e=t}return e})),t=new $u(n.categoryName,ju.getLevel(n.level.levelStr),n.data,n.context),t.startTime=new Date(n.startTime),t.pid=n.pid,t.cluster=n.cluster}catch(n){t=new $u("log4js",ju.ERROR,["Unable to parse log:",e,"because: ",n])}return t}}var Hu=$u;const Ju=Nr.exports("log4js:clustering"),Gu=Hu,Vu=tu;let Uu=!1,Wu=null;try{Wu=require("cluster")}catch(e){Ju("cluster module not present"),Uu=!0}const zu=[];let Ku=!1,qu="NODE_APP_INSTANCE";const Yu=()=>Ku&&"0"===process.env[qu],Xu=()=>Uu||Wu.isMaster||Yu(),Zu=e=>{zu.forEach((t=>t(e)))},Qu=(e,t)=>{if(Ju("cluster message received from worker ",e,": ",t),e.topic&&e.data&&(t=e,e=void 0),t&&t.topic&&"log4js:message"===t.topic){Ju("received message: ",t.data);const e=Gu.deserialise(t.data);Zu(e)}};Uu||Vu.addListener((e=>{zu.length=0,({pm2:Ku,disableClustering:Uu,pm2InstanceVar:qu="NODE_APP_INSTANCE"}=e),Ju(`clustering disabled ? ${Uu}`),Ju(`cluster.isMaster ? ${Wu&&Wu.isMaster}`),Ju(`pm2 enabled ? ${Ku}`),Ju(`pm2InstanceVar = ${qu}`),Ju(`process.env[${qu}] = ${process.env[qu]}`),Ku&&process.removeListener("message",Qu),Wu&&Wu.removeListener&&Wu.removeListener("message",Qu),Uu||e.disableClustering?Ju("Not listening for cluster messages, because clustering disabled."):Yu()?(Ju("listening for PM2 broadcast messages"),process.on("message",Qu)):Wu.isMaster?(Ju("listening for cluster messages"),Wu.on("message",Qu)):Ju("not listening for messages, because we are not a master process")}));var eo={onlyOnMaster:(e,t)=>Xu()?e():t,isMaster:Xu,send:e=>{Xu()?Zu(e):(Ku||(e.cluster={workerId:Wu.worker.id,worker:process.pid}),process.send({topic:"log4js:message",data:e.serialise()}))},onMessage:e=>{zu.push(e)}},to={};function no(e){if("number"==typeof e&&Number.isInteger(e))return e;const t={K:1024,M:1048576,G:1073741824},n=Object.keys(t),r=e.substr(e.length-1).toLocaleUpperCase(),u=e.substring(0,e.length-1).trim();if(n.indexOf(r)<0||!Number.isInteger(Number(u)))throw Error(`maxLogSize: "${e}" is invalid`);return u*t[r]}function ro(e){return function(e,t){const n=Object.assign({},t);return Object.keys(e).forEach((r=>{n[r]&&(n[r]=e[r](t[r]))})),n}({maxLogSize:no},e)}const uo={file:ro,fileSync:ro};to.modifyConfig=e=>uo[e.type]?uo[e.type](e):e;var oo={};const io=console.log.bind(console);oo.configure=function(e,t){let n=t.colouredLayout;return e.layout&&(n=t.layout(e.layout.type,e.layout)),function(e,t){return n=>{io(e(n,t))}}(n,e.timezoneOffset)};var so={};so.configure=function(e,t){let n=t.colouredLayout;return e.layout&&(n=t.layout(e.layout.type,e.layout)),function(e,t){return n=>{process.stdout.write(`${e(n,t)}\n`)}}(n,e.timezoneOffset)};var co={};co.configure=function(e,t){let n=t.colouredLayout;return e.layout&&(n=t.layout(e.layout.type,e.layout)),function(e,t){return n=>{process.stderr.write(`${e(n,t)}\n`)}}(n,e.timezoneOffset)};var ao={};ao.configure=function(e,t,n,r){const u=n(e.appender);return function(e,t,n,r){const u=r.getLevel(e),o=r.getLevel(t,r.FATAL);return e=>{const t=e.level;t.isGreaterThanOrEqualTo(u)&&t.isLessThanOrEqualTo(o)&&n(e)}}(e.level,e.maxLevel,u,r)};var lo={};const fo=Nr.exports("log4js:categoryFilter");lo.configure=function(e,t,n){const r=n(e.appender);return function(e,t){return"string"==typeof e&&(e=[e]),n=>{fo(`Checking ${n.categoryName} against ${e}`),-1===e.indexOf(n.categoryName)&&(fo("Not excluded, sending to appender"),t(n))}}(e.exclude,r)};var Do={};const po=Nr.exports("log4js:noLogFilter");Do.configure=function(e,t,n){const r=n(e.appender);return function(e,t){return n=>{po(`Checking data: ${n.data} against filters: ${e}`),"string"==typeof e&&(e=[e]),e=e.filter((e=>null!=e&&""!==e));const r=new RegExp(e.join("|"),"i");(0===e.length||n.data.findIndex((e=>r.test(e)))<0)&&(po("Not excluded, sending to appender"),t(n))}}(e.exclude,r)};var Eo={},mo={exports:{}},ho={},yo={fromCallback:function(e){return Object.defineProperty((function(){if("function"!=typeof arguments[arguments.length-1])return new Promise(((t,n)=>{arguments[arguments.length]=(e,r)=>{if(e)return n(e);t(r)},arguments.length++,e.apply(this,arguments)}));e.apply(this,arguments)}),"name",{value:e.name})},fromPromise:function(e){return Object.defineProperty((function(){const t=arguments[arguments.length-1];if("function"!=typeof t)return e.apply(this,arguments);e.apply(this,arguments).then((e=>t(null,e)),t)}),"name",{value:e.name})}};!function(e){const t=yo.fromCallback,n=we,r=["access","appendFile","chmod","chown","close","copyFile","fchmod","fchown","fdatasync","fstat","fsync","ftruncate","futimes","lchown","lchmod","link","lstat","mkdir","mkdtemp","open","readFile","readdir","readlink","realpath","rename","rmdir","stat","symlink","truncate","unlink","utimes","writeFile"].filter((e=>"function"==typeof n[e]));Object.keys(n).forEach((t=>{"promises"!==t&&(e[t]=n[t])})),r.forEach((r=>{e[r]=t(n[r])})),e.exists=function(e,t){return"function"==typeof t?n.exists(e,t):new Promise((t=>n.exists(e,t)))},e.read=function(e,t,r,u,o,i){return"function"==typeof i?n.read(e,t,r,u,o,i):new Promise(((i,s)=>{n.read(e,t,r,u,o,((e,t,n)=>{if(e)return s(e);i({bytesRead:t,buffer:n})}))}))},e.write=function(e,t,...r){return"function"==typeof r[r.length-1]?n.write(e,t,...r):new Promise(((u,o)=>{n.write(e,t,...r,((e,t,n)=>{if(e)return o(e);u({bytesWritten:t,buffer:n})}))}))},"function"==typeof n.realpath.native&&(e.realpath.native=t(n.realpath.native))}(ho);const Co=p.default;function Fo(e){return(e=Co.normalize(Co.resolve(e)).split(Co.sep)).length>0?e[0]:null}const go=/[<>:"|?*]/;var Ao=function(e){const t=Fo(e);return e=e.replace(t,""),go.test(e)};const vo=we,So=p.default,wo=Ao,Oo=parseInt("0777",8);var bo=function e(t,n,r,u){if("function"==typeof n?(r=n,n={}):n&&"object"==typeof n||(n={mode:n}),"win32"===process.platform&&wo(t)){const e=new Error(t+" contains invalid WIN32 path characters.");return e.code="EINVAL",r(e)}let o=n.mode;const i=n.fs||vo;void 0===o&&(o=Oo&~process.umask()),u||(u=null),r=r||function(){},t=So.resolve(t),i.mkdir(t,o,(o=>{if(!o)return r(null,u=u||t);if("ENOENT"===o.code){if(So.dirname(t)===t)return r(o);e(So.dirname(t),n,((u,o)=>{u?r(u,o):e(t,n,r,o)}))}else i.stat(t,((e,t)=>{e||!t.isDirectory()?r(o,u):r(null,u)}))}))};const _o=we,Bo=p.default,Po=Ao,ko=parseInt("0777",8);var xo=function e(t,n,r){n&&"object"==typeof n||(n={mode:n});let u=n.mode;const o=n.fs||_o;if("win32"===process.platform&&Po(t)){const e=new Error(t+" contains invalid WIN32 path characters.");throw e.code="EINVAL",e}void 0===u&&(u=ko&~process.umask()),r||(r=null),t=Bo.resolve(t);try{o.mkdirSync(t,u),r=r||t}catch(u){if("ENOENT"===u.code){if(Bo.dirname(t)===t)throw u;r=e(Bo.dirname(t),n,r),e(t,n,r)}else{let e;try{e=o.statSync(t)}catch(e){throw u}if(!e.isDirectory())throw u}}return r};const No=(0,yo.fromCallback)(bo);var Io={mkdirs:No,mkdirsSync:xo,mkdirp:No,mkdirpSync:xo,ensureDir:No,ensureDirSync:xo};const To=we;E.default,p.default;var Ro=function(e,t,n,r){To.open(e,"r+",((e,u)=>{if(e)return r(e);To.futimes(u,t,n,(e=>{To.close(u,(t=>{r&&r(e||t)}))}))}))},Mo=function(e,t,n){const r=To.openSync(e,"r+");return To.futimesSync(r,t,n),To.closeSync(r)};const Lo=we,jo=p.default,$o=10,Ho=5,Jo=0,Go=process.versions.node.split("."),Vo=Number.parseInt(Go[0],10),Uo=Number.parseInt(Go[1],10),Wo=Number.parseInt(Go[2],10);function zo(){if(Vo>$o)return!0;if(Vo===$o){if(Uo>Ho)return!0;if(Uo===Ho&&Wo>=Jo)return!0}return!1}function Ko(e,t){const n=jo.resolve(e).split(jo.sep).filter((e=>e)),r=jo.resolve(t).split(jo.sep).filter((e=>e));return n.reduce(((e,t,n)=>e&&r[n]===t),!0)}function qo(e,t,n){return`Cannot ${n} '${e}' to a subdirectory of itself, '${t}'.`}var Yo,Xo,Zo={checkPaths:function(e,t,n,r){!function(e,t,n){zo()?Lo.stat(e,{bigint:!0},((e,r)=>{if(e)return n(e);Lo.stat(t,{bigint:!0},((e,t)=>e?"ENOENT"===e.code?n(null,{srcStat:r,destStat:null}):n(e):n(null,{srcStat:r,destStat:t})))})):Lo.stat(e,((e,r)=>{if(e)return n(e);Lo.stat(t,((e,t)=>e?"ENOENT"===e.code?n(null,{srcStat:r,destStat:null}):n(e):n(null,{srcStat:r,destStat:t})))}))}(e,t,((u,o)=>{if(u)return r(u);const{srcStat:i,destStat:s}=o;return s&&s.ino&&s.dev&&s.ino===i.ino&&s.dev===i.dev?r(new Error("Source and destination must not be the same.")):i.isDirectory()&&Ko(e,t)?r(new Error(qo(e,t,n))):r(null,{srcStat:i,destStat:s})}))},checkPathsSync:function(e,t,n){const{srcStat:r,destStat:u}=function(e,t){let n,r;n=zo()?Lo.statSync(e,{bigint:!0}):Lo.statSync(e);try{r=zo()?Lo.statSync(t,{bigint:!0}):Lo.statSync(t)}catch(e){if("ENOENT"===e.code)return{srcStat:n,destStat:null};throw e}return{srcStat:n,destStat:r}}(e,t);if(u&&u.ino&&u.dev&&u.ino===r.ino&&u.dev===r.dev)throw new Error("Source and destination must not be the same.");if(r.isDirectory()&&Ko(e,t))throw new Error(qo(e,t,n));return{srcStat:r,destStat:u}},checkParentPaths:function e(t,n,r,u,o){const i=jo.resolve(jo.dirname(t)),s=jo.resolve(jo.dirname(r));if(s===i||s===jo.parse(s).root)return o();zo()?Lo.stat(s,{bigint:!0},((i,c)=>i?"ENOENT"===i.code?o():o(i):c.ino&&c.dev&&c.ino===n.ino&&c.dev===n.dev?o(new Error(qo(t,r,u))):e(t,n,s,u,o))):Lo.stat(s,((i,c)=>i?"ENOENT"===i.code?o():o(i):c.ino&&c.dev&&c.ino===n.ino&&c.dev===n.dev?o(new Error(qo(t,r,u))):e(t,n,s,u,o)))},checkParentPathsSync:function e(t,n,r,u){const o=jo.resolve(jo.dirname(t)),i=jo.resolve(jo.dirname(r));if(i===o||i===jo.parse(i).root)return;let s;try{s=zo()?Lo.statSync(i,{bigint:!0}):Lo.statSync(i)}catch(e){if("ENOENT"===e.code)return;throw e}if(s.ino&&s.dev&&s.ino===n.ino&&s.dev===n.dev)throw new Error(qo(t,r,u));return e(t,n,i,u)},isSrcSubdir:Ko};const Qo=we,ei=p.default,ti=Io.mkdirsSync,ni=Mo,ri=Zo;function ui(e,t,n,r){if(!r.filter||r.filter(t,n))return function(e,t,n,r){const u=r.dereference?Qo.statSync:Qo.lstatSync,o=u(t);if(o.isDirectory())return function(e,t,n,r,u){if(!t)return function(e,t,n,r){return Qo.mkdirSync(n),ii(t,n,r),Qo.chmodSync(n,e.mode)}(e,n,r,u);if(t&&!t.isDirectory())throw new Error(`Cannot overwrite non-directory '${r}' with directory '${n}'.`);return ii(n,r,u)}(o,e,t,n,r);if(o.isFile()||o.isCharacterDevice()||o.isBlockDevice())return function(e,t,n,r,u){return t?function(e,t,n,r){if(r.overwrite)return Qo.unlinkSync(n),oi(e,t,n,r);if(r.errorOnExist)throw new Error(`'${n}' already exists`)}(e,n,r,u):oi(e,n,r,u)}(o,e,t,n,r);if(o.isSymbolicLink())return function(e,t,n,r){let u=Qo.readlinkSync(t);r.dereference&&(u=ei.resolve(process.cwd(),u));if(e){let e;try{e=Qo.readlinkSync(n)}catch(e){if("EINVAL"===e.code||"UNKNOWN"===e.code)return Qo.symlinkSync(u,n);throw e}if(r.dereference&&(e=ei.resolve(process.cwd(),e)),ri.isSrcSubdir(u,e))throw new Error(`Cannot copy '${u}' to a subdirectory of itself, '${e}'.`);if(Qo.statSync(n).isDirectory()&&ri.isSrcSubdir(e,u))throw new Error(`Cannot overwrite '${e}' with '${u}'.`);return function(e,t){return Qo.unlinkSync(t),Qo.symlinkSync(e,t)}(u,n)}return Qo.symlinkSync(u,n)}(e,t,n,r)}(e,t,n,r)}function oi(e,t,n,r){return"function"==typeof Qo.copyFileSync?(Qo.copyFileSync(t,n),Qo.chmodSync(n,e.mode),r.preserveTimestamps?ni(n,e.atime,e.mtime):void 0):function(e,t,n,r){const u=65536,o=(Xo?Yo:(Xo=1,Yo=function(e){if("function"==typeof Buffer.allocUnsafe)try{return Buffer.allocUnsafe(e)}catch(t){return new Buffer(e)}return new Buffer(e)}))(u),i=Qo.openSync(t,"r"),s=Qo.openSync(n,"w",e.mode);let c=0;for(;cfunction(e,t,n,r){const u=ei.join(t,e),o=ei.join(n,e),{destStat:i}=ri.checkPathsSync(u,o,"copy");return ui(i,u,o,r)}(r,e,t,n)))}var si=function(e,t,n){"function"==typeof n&&(n={filter:n}),(n=n||{}).clobber=!("clobber"in n)||!!n.clobber,n.overwrite="overwrite"in n?!!n.overwrite:n.clobber,n.preserveTimestamps&&"ia32"===process.arch&&console.warn("fs-extra: Using the preserveTimestamps option in 32-bit node is not recommended;\n\n see https://github.com/jprichardson/node-fs-extra/issues/269");const{srcStat:r,destStat:u}=ri.checkPathsSync(e,t,"copy");return ri.checkParentPathsSync(e,r,t,"copy"),function(e,t,n,r){if(r.filter&&!r.filter(t,n))return;const u=ei.dirname(n);Qo.existsSync(u)||ti(u);return ui(e,t,n,r)}(u,e,t,n)},ci={copySync:si};const ai=yo.fromPromise,li=ho;var fi={pathExists:ai((function(e){return li.access(e).then((()=>!0)).catch((()=>!1))})),pathExistsSync:li.existsSync};const di=we,Di=p.default,pi=Io.mkdirs,Ei=fi.pathExists,mi=Ro,hi=Zo;function yi(e,t,n,r,u){const o=Di.dirname(n);Ei(o,((i,s)=>i?u(i):s?Fi(e,t,n,r,u):void pi(o,(o=>o?u(o):Fi(e,t,n,r,u)))))}function Ci(e,t,n,r,u,o){Promise.resolve(u.filter(n,r)).then((i=>i?e(t,n,r,u,o):o()),(e=>o(e)))}function Fi(e,t,n,r,u){return r.filter?Ci(gi,e,t,n,r,u):gi(e,t,n,r,u)}function gi(e,t,n,r,u){(r.dereference?di.stat:di.lstat)(t,((o,i)=>o?u(o):i.isDirectory()?function(e,t,n,r,u,o){if(!t)return function(e,t,n,r,u){di.mkdir(n,(o=>{if(o)return u(o);Si(t,n,r,(t=>t?u(t):di.chmod(n,e.mode,u)))}))}(e,n,r,u,o);if(t&&!t.isDirectory())return o(new Error(`Cannot overwrite non-directory '${r}' with directory '${n}'.`));return Si(n,r,u,o)}(i,e,t,n,r,u):i.isFile()||i.isCharacterDevice()||i.isBlockDevice()?function(e,t,n,r,u,o){return t?function(e,t,n,r,u){if(!r.overwrite)return r.errorOnExist?u(new Error(`'${n}' already exists`)):u();di.unlink(n,(o=>o?u(o):Ai(e,t,n,r,u)))}(e,n,r,u,o):Ai(e,n,r,u,o)}(i,e,t,n,r,u):i.isSymbolicLink()?function(e,t,n,r,u){di.readlink(t,((t,o)=>t?u(t):(r.dereference&&(o=Di.resolve(process.cwd(),o)),e?void di.readlink(n,((t,i)=>t?"EINVAL"===t.code||"UNKNOWN"===t.code?di.symlink(o,n,u):u(t):(r.dereference&&(i=Di.resolve(process.cwd(),i)),hi.isSrcSubdir(o,i)?u(new Error(`Cannot copy '${o}' to a subdirectory of itself, '${i}'.`)):e.isDirectory()&&hi.isSrcSubdir(i,o)?u(new Error(`Cannot overwrite '${i}' with '${o}'.`)):function(e,t,n){di.unlink(t,(r=>r?n(r):di.symlink(e,t,n)))}(o,n,u)))):di.symlink(o,n,u))))}(e,t,n,r,u):void 0))}function Ai(e,t,n,r,u){return"function"==typeof di.copyFile?di.copyFile(t,n,(t=>t?u(t):vi(e,n,r,u))):function(e,t,n,r,u){const o=di.createReadStream(t);o.on("error",(e=>u(e))).once("open",(()=>{const t=di.createWriteStream(n,{mode:e.mode});t.on("error",(e=>u(e))).on("open",(()=>o.pipe(t))).once("close",(()=>vi(e,n,r,u)))}))}(e,t,n,r,u)}function vi(e,t,n,r){di.chmod(t,e.mode,(u=>u?r(u):n.preserveTimestamps?mi(t,e.atime,e.mtime,r):r()))}function Si(e,t,n,r){di.readdir(e,((u,o)=>u?r(u):wi(o,e,t,n,r)))}function wi(e,t,n,r,u){const o=e.pop();return o?function(e,t,n,r,u,o){const i=Di.join(n,t),s=Di.join(r,t);hi.checkPaths(i,s,"copy",((t,c)=>{if(t)return o(t);const{destStat:a}=c;Fi(a,i,s,u,(t=>t?o(t):wi(e,n,r,u,o)))}))}(e,o,t,n,r,u):u()}var Oi=function(e,t,n,r){"function"!=typeof n||r?"function"==typeof n&&(n={filter:n}):(r=n,n={}),r=r||function(){},(n=n||{}).clobber=!("clobber"in n)||!!n.clobber,n.overwrite="overwrite"in n?!!n.overwrite:n.clobber,n.preserveTimestamps&&"ia32"===process.arch&&console.warn("fs-extra: Using the preserveTimestamps option in 32-bit node is not recommended;\n\n see https://github.com/jprichardson/node-fs-extra/issues/269"),hi.checkPaths(e,t,"copy",((u,o)=>{if(u)return r(u);const{srcStat:i,destStat:s}=o;hi.checkParentPaths(e,i,t,"copy",(u=>u?r(u):n.filter?Ci(yi,s,e,t,n,r):yi(s,e,t,n,r)))}))};var bi={copy:(0,yo.fromCallback)(Oi)};const _i=we,Bi=p.default,Pi=g.default,ki="win32"===process.platform;function xi(e){["unlink","chmod","stat","lstat","rmdir","readdir"].forEach((t=>{e[t]=e[t]||_i[t],e[t+="Sync"]=e[t]||_i[t]})),e.maxBusyTries=e.maxBusyTries||3}function Ni(e,t,n){let r=0;"function"==typeof t&&(n=t,t={}),Pi(e,"rimraf: missing path"),Pi.strictEqual(typeof e,"string","rimraf: path should be a string"),Pi.strictEqual(typeof n,"function","rimraf: callback function required"),Pi(t,"rimraf: invalid options argument provided"),Pi.strictEqual(typeof t,"object","rimraf: options should be object"),xi(t),Ii(e,t,(function u(o){if(o){if(("EBUSY"===o.code||"ENOTEMPTY"===o.code||"EPERM"===o.code)&&rIi(e,t,u)),100*r)}"ENOENT"===o.code&&(o=null)}n(o)}))}function Ii(e,t,n){Pi(e),Pi(t),Pi("function"==typeof n),t.lstat(e,((r,u)=>r&&"ENOENT"===r.code?n(null):r&&"EPERM"===r.code&&ki?Ti(e,t,r,n):u&&u.isDirectory()?Mi(e,t,r,n):void t.unlink(e,(r=>{if(r){if("ENOENT"===r.code)return n(null);if("EPERM"===r.code)return ki?Ti(e,t,r,n):Mi(e,t,r,n);if("EISDIR"===r.code)return Mi(e,t,r,n)}return n(r)}))))}function Ti(e,t,n,r){Pi(e),Pi(t),Pi("function"==typeof r),n&&Pi(n instanceof Error),t.chmod(e,438,(u=>{u?r("ENOENT"===u.code?null:n):t.stat(e,((u,o)=>{u?r("ENOENT"===u.code?null:n):o.isDirectory()?Mi(e,t,n,r):t.unlink(e,r)}))}))}function Ri(e,t,n){let r;Pi(e),Pi(t),n&&Pi(n instanceof Error);try{t.chmodSync(e,438)}catch(e){if("ENOENT"===e.code)return;throw n}try{r=t.statSync(e)}catch(e){if("ENOENT"===e.code)return;throw n}r.isDirectory()?ji(e,t,n):t.unlinkSync(e)}function Mi(e,t,n,r){Pi(e),Pi(t),n&&Pi(n instanceof Error),Pi("function"==typeof r),t.rmdir(e,(u=>{!u||"ENOTEMPTY"!==u.code&&"EEXIST"!==u.code&&"EPERM"!==u.code?u&&"ENOTDIR"===u.code?r(n):r(u):function(e,t,n){Pi(e),Pi(t),Pi("function"==typeof n),t.readdir(e,((r,u)=>{if(r)return n(r);let o,i=u.length;if(0===i)return t.rmdir(e,n);u.forEach((r=>{Ni(Bi.join(e,r),t,(r=>{if(!o)return r?n(o=r):void(0==--i&&t.rmdir(e,n))}))}))}))}(e,t,r)}))}function Li(e,t){let n;xi(t=t||{}),Pi(e,"rimraf: missing path"),Pi.strictEqual(typeof e,"string","rimraf: path should be a string"),Pi(t,"rimraf: missing options"),Pi.strictEqual(typeof t,"object","rimraf: options should be object");try{n=t.lstatSync(e)}catch(n){if("ENOENT"===n.code)return;"EPERM"===n.code&&ki&&Ri(e,t,n)}try{n&&n.isDirectory()?ji(e,t,null):t.unlinkSync(e)}catch(n){if("ENOENT"===n.code)return;if("EPERM"===n.code)return ki?Ri(e,t,n):ji(e,t,n);if("EISDIR"!==n.code)throw n;ji(e,t,n)}}function ji(e,t,n){Pi(e),Pi(t),n&&Pi(n instanceof Error);try{t.rmdirSync(e)}catch(r){if("ENOTDIR"===r.code)throw n;if("ENOTEMPTY"===r.code||"EEXIST"===r.code||"EPERM"===r.code)!function(e,t){if(Pi(e),Pi(t),t.readdirSync(e).forEach((n=>Li(Bi.join(e,n),t))),!ki){return t.rmdirSync(e,t)}{const n=Date.now();do{try{return t.rmdirSync(e,t)}catch(e){}}while(Date.now()-n<500)}}(e,t);else if("ENOENT"!==r.code)throw r}}var $i=Ni;Ni.sync=Li;const Hi=$i;var Ji={remove:(0,yo.fromCallback)(Hi),removeSync:Hi.sync};const Gi=yo.fromCallback,Vi=we,Ui=p.default,Wi=Io,zi=Ji,Ki=Gi((function(e,t){t=t||function(){},Vi.readdir(e,((n,r)=>{if(n)return Wi.mkdirs(e,t);r=r.map((t=>Ui.join(e,t))),function e(){const n=r.pop();if(!n)return t();zi.remove(n,(n=>{if(n)return t(n);e()}))}()}))}));function qi(e){let t;try{t=Vi.readdirSync(e)}catch(t){return Wi.mkdirsSync(e)}t.forEach((t=>{t=Ui.join(e,t),zi.removeSync(t)}))}var Yi={emptyDirSync:qi,emptydirSync:qi,emptyDir:Ki,emptydir:Ki};const Xi=yo.fromCallback,Zi=p.default,Qi=we,es=Io,ts=fi.pathExists;var ns={createFile:Xi((function(e,t){function n(){Qi.writeFile(e,"",(e=>{if(e)return t(e);t()}))}Qi.stat(e,((r,u)=>{if(!r&&u.isFile())return t();const o=Zi.dirname(e);ts(o,((e,r)=>e?t(e):r?n():void es.mkdirs(o,(e=>{if(e)return t(e);n()}))))}))})),createFileSync:function(e){let t;try{t=Qi.statSync(e)}catch(e){}if(t&&t.isFile())return;const n=Zi.dirname(e);Qi.existsSync(n)||es.mkdirsSync(n),Qi.writeFileSync(e,"")}};const rs=yo.fromCallback,us=p.default,os=we,is=Io,ss=fi.pathExists;var cs={createLink:rs((function(e,t,n){function r(e,t){os.link(e,t,(e=>{if(e)return n(e);n(null)}))}ss(t,((u,o)=>u?n(u):o?n(null):void os.lstat(e,(u=>{if(u)return u.message=u.message.replace("lstat","ensureLink"),n(u);const o=us.dirname(t);ss(o,((u,i)=>u?n(u):i?r(e,t):void is.mkdirs(o,(u=>{if(u)return n(u);r(e,t)}))))}))))})),createLinkSync:function(e,t){if(os.existsSync(t))return;try{os.lstatSync(e)}catch(e){throw e.message=e.message.replace("lstat","ensureLink"),e}const n=us.dirname(t);return os.existsSync(n)||is.mkdirsSync(n),os.linkSync(e,t)}};const as=p.default,ls=we,fs=fi.pathExists;var ds={symlinkPaths:function(e,t,n){if(as.isAbsolute(e))return ls.lstat(e,(t=>t?(t.message=t.message.replace("lstat","ensureSymlink"),n(t)):n(null,{toCwd:e,toDst:e})));{const r=as.dirname(t),u=as.join(r,e);return fs(u,((t,o)=>t?n(t):o?n(null,{toCwd:u,toDst:e}):ls.lstat(e,(t=>t?(t.message=t.message.replace("lstat","ensureSymlink"),n(t)):n(null,{toCwd:e,toDst:as.relative(r,e)})))))}},symlinkPathsSync:function(e,t){let n;if(as.isAbsolute(e)){if(n=ls.existsSync(e),!n)throw new Error("absolute srcpath does not exist");return{toCwd:e,toDst:e}}{const r=as.dirname(t),u=as.join(r,e);if(n=ls.existsSync(u),n)return{toCwd:u,toDst:e};if(n=ls.existsSync(e),!n)throw new Error("relative srcpath does not exist");return{toCwd:e,toDst:as.relative(r,e)}}}};const Ds=we;var ps={symlinkType:function(e,t,n){if(n="function"==typeof t?t:n,t="function"!=typeof t&&t)return n(null,t);Ds.lstat(e,((e,r)=>{if(e)return n(null,"file");t=r&&r.isDirectory()?"dir":"file",n(null,t)}))},symlinkTypeSync:function(e,t){let n;if(t)return t;try{n=Ds.lstatSync(e)}catch(e){return"file"}return n&&n.isDirectory()?"dir":"file"}};const Es=yo.fromCallback,ms=p.default,hs=we,ys=Io.mkdirs,Cs=Io.mkdirsSync,Fs=ds.symlinkPaths,gs=ds.symlinkPathsSync,As=ps.symlinkType,vs=ps.symlinkTypeSync,Ss=fi.pathExists;var ws={createSymlink:Es((function(e,t,n,r){r="function"==typeof n?n:r,n="function"!=typeof n&&n,Ss(t,((u,o)=>u?r(u):o?r(null):void Fs(e,t,((u,o)=>{if(u)return r(u);e=o.toDst,As(o.toCwd,n,((n,u)=>{if(n)return r(n);const o=ms.dirname(t);Ss(o,((n,i)=>n?r(n):i?hs.symlink(e,t,u,r):void ys(o,(n=>{if(n)return r(n);hs.symlink(e,t,u,r)}))))}))}))))})),createSymlinkSync:function(e,t,n){if(hs.existsSync(t))return;const r=gs(e,t);e=r.toDst,n=vs(r.toCwd,n);const u=ms.dirname(t);return hs.existsSync(u)||Cs(u),hs.symlinkSync(e,t,n)}};var Os,bs={createFile:ns.createFile,createFileSync:ns.createFileSync,ensureFile:ns.createFile,ensureFileSync:ns.createFileSync,createLink:cs.createLink,createLinkSync:cs.createLinkSync,ensureLink:cs.createLink,ensureLinkSync:cs.createLinkSync,createSymlink:ws.createSymlink,createSymlinkSync:ws.createSymlinkSync,ensureSymlink:ws.createSymlink,ensureSymlinkSync:ws.createSymlinkSync};try{Os=we}catch(e){Os=D.default}function _s(e,t){var n,r="\n";return"object"==typeof t&&null!==t&&(t.spaces&&(n=t.spaces),t.EOL&&(r=t.EOL)),JSON.stringify(e,t?t.replacer:null,n).replace(/\n/g,r)+r}function Bs(e){return Buffer.isBuffer(e)&&(e=e.toString("utf8")),e=e.replace(/^\uFEFF/,"")}var Ps={readFile:function(e,t,n){null==n&&(n=t,t={}),"string"==typeof t&&(t={encoding:t});var r=(t=t||{}).fs||Os,u=!0;"throws"in t&&(u=t.throws),r.readFile(e,t,(function(r,o){if(r)return n(r);var i;o=Bs(o);try{i=JSON.parse(o,t?t.reviver:null)}catch(t){return u?(t.message=e+": "+t.message,n(t)):n(null,null)}n(null,i)}))},readFileSync:function(e,t){"string"==typeof(t=t||{})&&(t={encoding:t});var n=t.fs||Os,r=!0;"throws"in t&&(r=t.throws);try{var u=n.readFileSync(e,t);return u=Bs(u),JSON.parse(u,t.reviver)}catch(t){if(r)throw t.message=e+": "+t.message,t;return null}},writeFile:function(e,t,n,r){null==r&&(r=n,n={});var u=(n=n||{}).fs||Os,o="";try{o=_s(t,n)}catch(e){return void(r&&r(e,null))}u.writeFile(e,o,n,r)},writeFileSync:function(e,t,n){var r=(n=n||{}).fs||Os,u=_s(t,n);return r.writeFileSync(e,u,n)}},ks=Ps;const xs=yo.fromCallback,Ns=ks;var Is={readJson:xs(Ns.readFile),readJsonSync:Ns.readFileSync,writeJson:xs(Ns.writeFile),writeJsonSync:Ns.writeFileSync};const Ts=p.default,Rs=Io,Ms=fi.pathExists,Ls=Is;var js=function(e,t,n,r){"function"==typeof n&&(r=n,n={});const u=Ts.dirname(e);Ms(u,((o,i)=>o?r(o):i?Ls.writeJson(e,t,n,r):void Rs.mkdirs(u,(u=>{if(u)return r(u);Ls.writeJson(e,t,n,r)}))))};const $s=we,Hs=p.default,Js=Io,Gs=Is;var Vs=function(e,t,n){const r=Hs.dirname(e);$s.existsSync(r)||Js.mkdirsSync(r),Gs.writeJsonSync(e,t,n)};const Us=yo.fromCallback,Ws=Is;Ws.outputJson=Us(js),Ws.outputJsonSync=Vs,Ws.outputJSON=Ws.outputJson,Ws.outputJSONSync=Ws.outputJsonSync,Ws.writeJSON=Ws.writeJson,Ws.writeJSONSync=Ws.writeJsonSync,Ws.readJSON=Ws.readJson,Ws.readJSONSync=Ws.readJsonSync;var zs=Ws;const Ks=we,qs=p.default,Ys=ci.copySync,Xs=Ji.removeSync,Zs=Io.mkdirpSync,Qs=Zo;function ec(e,t,n){try{Ks.renameSync(e,t)}catch(r){if("EXDEV"!==r.code)throw r;return function(e,t,n){const r={overwrite:n,errorOnExist:!0};return Ys(e,t,r),Xs(e)}(e,t,n)}}var tc=function(e,t,n){const r=(n=n||{}).overwrite||n.clobber||!1,{srcStat:u}=Qs.checkPathsSync(e,t,"move");return Qs.checkParentPathsSync(e,u,t,"move"),Zs(qs.dirname(t)),function(e,t,n){if(n)return Xs(t),ec(e,t,n);if(Ks.existsSync(t))throw new Error("dest already exists.");return ec(e,t,n)}(e,t,r)},nc={moveSync:tc};const rc=we,uc=p.default,oc=bi.copy,ic=Ji.remove,sc=Io.mkdirp,cc=fi.pathExists,ac=Zo;function lc(e,t,n,r){rc.rename(e,t,(u=>u?"EXDEV"!==u.code?r(u):function(e,t,n,r){const u={overwrite:n,errorOnExist:!0};oc(e,t,u,(t=>t?r(t):ic(e,r)))}(e,t,n,r):r()))}var fc=function(e,t,n,r){"function"==typeof n&&(r=n,n={});const u=n.overwrite||n.clobber||!1;ac.checkPaths(e,t,"move",((n,o)=>{if(n)return r(n);const{srcStat:i}=o;ac.checkParentPaths(e,i,t,"move",(n=>{if(n)return r(n);sc(uc.dirname(t),(n=>n?r(n):function(e,t,n,r){if(n)return ic(t,(u=>u?r(u):lc(e,t,n,r)));cc(t,((u,o)=>u?r(u):o?r(new Error("dest already exists.")):lc(e,t,n,r)))}(e,t,u,r)))}))}))};var dc={move:(0,yo.fromCallback)(fc)};const Dc=yo.fromCallback,pc=we,Ec=p.default,mc=Io,hc=fi.pathExists;var yc={outputFile:Dc((function(e,t,n,r){"function"==typeof n&&(r=n,n="utf8");const u=Ec.dirname(e);hc(u,((o,i)=>o?r(o):i?pc.writeFile(e,t,n,r):void mc.mkdirs(u,(u=>{if(u)return r(u);pc.writeFile(e,t,n,r)}))))})),outputFileSync:function(e,...t){const n=Ec.dirname(e);if(pc.existsSync(n))return pc.writeFileSync(e,...t);mc.mkdirsSync(n),pc.writeFileSync(e,...t)}};!function(e){e.exports=Object.assign({},ho,ci,bi,Yi,bs,zs,Io,nc,dc,yc,fi,Ji);const t=D.default;Object.getOwnPropertyDescriptor(t,"promises")&&Object.defineProperty(e.exports,"promises",{get:()=>t.promises})}(mo);const Cc=Nr.exports("streamroller:fileNameFormatter"),Fc=p.default;const gc=Nr.exports("streamroller:fileNameParser"),Ac=nu.exports;const vc=Nr.exports("streamroller:moveAndMaybeCompressFile"),Sc=mo.exports,wc=v.default;var Oc=async(e,t,n)=>{if(n=function(e){const t={mode:parseInt("0600",8),compress:!1},n=Object.assign({},t,e);return vc(`_parseOption: moveAndMaybeCompressFile called with option=${JSON.stringify(n)}`),n}(n),e!==t){if(await Sc.pathExists(e))if(vc(`moveAndMaybeCompressFile: moving file from ${e} to ${t} ${n.compress?"with":"without"} compress`),n.compress)await new Promise(((r,u)=>{let o=!1;const i=Sc.createWriteStream(t,{mode:n.mode,flags:"wx"}).on("open",(()=>{o=!0;const t=Sc.createReadStream(e).on("open",(()=>{t.pipe(wc.createGzip()).pipe(i)})).on("error",(t=>{vc(`moveAndMaybeCompressFile: error reading ${e}`,t),i.destroy(t)}))})).on("finish",(()=>{vc(`moveAndMaybeCompressFile: finished compressing ${t}, deleting ${e}`),Sc.unlink(e).then(r).catch((t=>{vc(`moveAndMaybeCompressFile: error deleting ${e}, truncating instead`,t),Sc.truncate(e).then(r).catch((t=>{vc(`moveAndMaybeCompressFile: error truncating ${e}`,t),u(t)}))}))})).on("error",(e=>{o?(vc(`moveAndMaybeCompressFile: error writing ${t}, deleting`,e),Sc.unlink(t).then((()=>{u(e)})).catch((e=>{vc(`moveAndMaybeCompressFile: error deleting ${t}`,e),u(e)}))):(vc(`moveAndMaybeCompressFile: error creating ${t}`,e),u(e))}))})).catch((()=>{}));else{vc(`moveAndMaybeCompressFile: renaming ${e} to ${t}`);try{await Sc.move(e,t,{overwrite:!0})}catch(n){if(vc(`moveAndMaybeCompressFile: error renaming ${e} to ${t}`,n),"ENOENT"!==n.code){vc("moveAndMaybeCompressFile: trying copy+truncate instead");try{await Sc.copy(e,t,{overwrite:!0}),await Sc.truncate(e)}catch(e){vc("moveAndMaybeCompressFile: error copy+truncate",e)}}}}}else vc("moveAndMaybeCompressFile: source and target are the same, not doing anything")};const bc=Nr.exports("streamroller:RollingFileWriteStream"),_c=mo.exports,Bc=p.default,Pc=E.default,kc=()=>new Date,xc=nu.exports,{Writable:Nc}=C.default,Ic=({file:e,keepFileExt:t,needsIndex:n,alwaysIncludeDate:r,compress:u,fileNameSep:o})=>{let i=o||".";const s=Fc.join(e.dir,e.name),c=t=>t+e.ext,a=(e,t,r)=>!n&&r||!t?e:e+i+t,l=(e,t,n)=>(t>0||r)&&n?e+i+n:e,f=(e,t)=>t&&u?e+".gz":e,d=t?[l,a,c,f]:[c,l,a,f];return({date:e,index:t})=>(Cc(`_formatFileName: date=${e}, index=${t}`),d.reduce(((n,r)=>r(n,t,e)),s))},Tc=({file:e,keepFileExt:t,pattern:n,fileNameSep:r})=>{let u=r||".";const o="__NOT_MATCHING__";let i=[(e,t)=>e.endsWith(".gz")?(gc("it is gzipped"),t.isCompressed=!0,e.slice(0,-1*".gz".length)):e,t?t=>t.startsWith(e.name)&&t.endsWith(e.ext)?(gc("it starts and ends with the right things"),t.slice(e.name.length+1,-1*e.ext.length)):o:t=>t.startsWith(e.base)?(gc("it starts with the right things"),t.slice(e.base.length+1)):o,n?(e,t)=>{const r=e.split(u);let o=r[r.length-1];gc("items: ",r,", indexStr: ",o);let i=e;void 0!==o&&o.match(/^\d+$/)?(i=e.slice(0,-1*(o.length+1)),gc(`dateStr is ${i}`),n&&!i&&(i=o,o="0")):o="0";try{const r=Ac.parse(n,i,new Date(0,0));return Ac.asString(n,r)!==i?e:(t.index=parseInt(o,10),t.date=i,t.timestamp=r.getTime(),"")}catch(t){return gc(`Problem parsing ${i} as ${n}, error was: `,t),e}}:(e,t)=>e.match(/^\d+$/)?(gc("it has an index"),t.index=parseInt(e,10),""):e];return e=>{let t={filename:e,index:0,isCompressed:!1};return i.reduce(((e,n)=>n(e,t)),e)?null:t}},Rc=Oc;var Mc=class extends Nc{constructor(e,t){if(bc(`constructor: creating RollingFileWriteStream. path=${e}`),"string"!=typeof e||0===e.length)throw new Error(`Invalid filename: ${e}`);if(e.endsWith(Bc.sep))throw new Error(`Filename is a directory: ${e}`);0===e.indexOf(`~${Bc.sep}`)&&(e=e.replace("~",Pc.homedir())),super(t),this.options=this._parseOption(t),this.fileObject=Bc.parse(e),""===this.fileObject.dir&&(this.fileObject=Bc.parse(Bc.join(process.cwd(),e))),this.fileFormatter=Ic({file:this.fileObject,alwaysIncludeDate:this.options.alwaysIncludePattern,needsIndex:this.options.maxSize 0`)}else delete n.maxSize;if(n.numBackups||0===n.numBackups){if(n.numBackups<0)throw new Error(`options.numBackups (${n.numBackups}) should be >= 0`);if(n.numBackups>=Number.MAX_SAFE_INTEGER)throw new Error(`options.numBackups (${n.numBackups}) should be < Number.MAX_SAFE_INTEGER`);n.numToKeep=n.numBackups+1}else if(n.numToKeep<=0)throw new Error(`options.numToKeep (${n.numToKeep}) should be > 0`);return bc(`_parseOption: creating stream with option=${JSON.stringify(n)}`),n}_final(e){this.currentFileStream.end("",this.options.encoding,e)}_write(e,t,n){this._shouldRoll().then((()=>{bc(`_write: writing chunk. file=${this.currentFileStream.path} state=${JSON.stringify(this.state)} chunk=${e}`),this.currentFileStream.write(e,t,(t=>{this.state.currentSize+=e.length,n(t)}))}))}async _shouldRoll(){(this._dateChanged()||this._tooBig())&&(bc(`_shouldRoll: rolling because dateChanged? ${this._dateChanged()} or tooBig? ${this._tooBig()}`),await this._roll())}_dateChanged(){return this.state.currentDate&&this.state.currentDate!==xc(this.options.pattern,kc())}_tooBig(){return this.state.currentSize>=this.options.maxSize}_roll(){return bc("_roll: closing the current stream"),new Promise(((e,t)=>{this.currentFileStream.end("",this.options.encoding,(()=>{this._moveOldFiles().then(e).catch(t)}))}))}async _moveOldFiles(){const e=await this._getExistingFiles();for(let t=(this.state.currentDate?e.filter((e=>e.date===this.state.currentDate)):e).length;t>=0;t--){bc(`_moveOldFiles: i = ${t}`);const e=this.fileFormatter({date:this.state.currentDate,index:t}),n=this.fileFormatter({date:this.state.currentDate,index:t+1}),r={compress:this.options.compress&&0===t,mode:this.options.mode};await Rc(e,n,r)}this.state.currentSize=0,this.state.currentDate=this.state.currentDate?xc(this.options.pattern,kc()):null,bc(`_moveOldFiles: finished rolling files. state=${JSON.stringify(this.state)}`),this._renewWriteStream(),await new Promise(((e,t)=>{this.currentFileStream.write("","utf8",(()=>{this._clean().then(e).catch(t)}))}))}async _getExistingFiles(){const e=await _c.readdir(this.fileObject.dir).catch((()=>[]));bc(`_getExistingFiles: files=${e}`);const t=e.map((e=>this.fileNameParser(e))).filter((e=>e)),n=e=>(e.timestamp?e.timestamp:kc().getTime())-e.index;return t.sort(((e,t)=>n(e)-n(t))),t}_renewWriteStream(){const e=this.fileFormatter({date:this.state.currentDate,index:0}),t=e=>{try{return _c.mkdirSync(e,{recursive:!0})}catch(n){if("ENOENT"===n.code)return t(Bc.dirname(e)),t(e);if("EEXIST"!==n.code&&"EROFS"!==n.code)throw n;try{if(_c.statSync(e).isDirectory())return e;throw n}catch(e){throw n}}};t(this.fileObject.dir);const n={flags:this.options.flags,encoding:this.options.encoding,mode:this.options.mode};var r,u;_c.appendFileSync(e,"",(r={...n},u="flags",r["flag"]=r[u],delete r[u],r)),this.currentFileStream=_c.createWriteStream(e,n),this.currentFileStream.on("error",(e=>{this.emit("error",e)}))}async _clean(){const e=await this._getExistingFiles();if(bc(`_clean: numToKeep = ${this.options.numToKeep}, existingFiles = ${e.length}`),bc("_clean: existing files are: ",e),this._tooManyFiles(e.length)){const n=e.slice(0,e.length-this.options.numToKeep).map((e=>Bc.format({dir:this.fileObject.dir,base:e.filename})));await(t=n,bc(`deleteFiles: files to delete: ${t}`),Promise.all(t.map((e=>_c.unlink(e).catch((t=>{bc(`deleteFiles: error when unlinking ${e}, ignoring. Error was ${t}`)}))))))}var t}_tooManyFiles(e){return this.options.numToKeep>0&&e>this.options.numToKeep}};const Lc=Mc;var jc=class extends Lc{constructor(e,t,n,r){r||(r={}),t&&(r.maxSize=t),r.numBackups||0===r.numBackups||(n||0===n||(n=1),r.numBackups=n),super(e,r),this.backups=r.numBackups,this.size=this.options.maxSize}get theStream(){return this.currentFileStream}};const $c=Mc;var Hc={RollingFileWriteStream:Mc,RollingFileStream:jc,DateRollingFileStream:class extends $c{constructor(e,t,n){t&&"object"==typeof t&&(n=t,t=null),n||(n={}),t||(t="yyyy-MM-dd"),n.pattern=t,n.numBackups||0===n.numBackups?n.daysToKeep=n.numBackups:(n.daysToKeep||0===n.daysToKeep?process.emitWarning("options.daysToKeep is deprecated due to the confusion it causes when used together with file size rolling. Please use options.numBackups instead.","DeprecationWarning","streamroller-DEP0001"):n.daysToKeep=1,n.numBackups=n.daysToKeep),super(e,n),this.mode=this.options.mode}get theStream(){return this.currentFileStream}}};const Jc=Nr.exports("log4js:file"),Gc=p.default,Vc=Hc,Uc=E.default.EOL;let Wc=!1;const zc=new Set;function Kc(){zc.forEach((e=>{e.sighupHandler()}))}function qc(e,t,n,r){const u=new Vc.RollingFileStream(e,t,n,r);return u.on("error",(t=>{console.error("log4js.fileAppender - Writing to file %s, error happened ",e,t)})),u.on("drain",(()=>{process.emit("log4js:pause",!1)})),u}Eo.configure=function(e,t){let n=t.basicLayout;return e.layout&&(n=t.layout(e.layout.type,e.layout)),e.mode=e.mode||384,function(e,t,n,r,u,o){e=Gc.normalize(e),Jc("Creating file appender (",e,", ",n,", ",r=r||0===r?r:5,", ",u,", ",o,")");let i=qc(e,n,r,u);const s=function(e){if(i.writable){if(!0===u.removeColor){const t=/\x1b[[0-9;]*m/g;e.data=e.data.map((e=>"string"==typeof e?e.replace(t,""):e))}i.write(t(e,o)+Uc,"utf8")||process.emit("log4js:pause",!0)}};return s.reopen=function(){i.end((()=>{i=qc(e,n,r,u)}))},s.sighupHandler=function(){Jc("SIGHUP handler called."),s.reopen()},s.shutdown=function(e){zc.delete(s),0===zc.size&&Wc&&(process.removeListener("SIGHUP",Kc),Wc=!1),i.end("","utf-8",e)},zc.add(s),Wc||(process.on("SIGHUP",Kc),Wc=!0),s}(e.filename,n,e.maxLogSize,e.backups,e,e.timezoneOffset)};var Yc={};const Xc=Hc,Zc=E.default.EOL;function Qc(e,t,n,r,u){r.maxSize=r.maxLogSize;const o=function(e,t,n){const r=new Xc.DateRollingFileStream(e,t,n);return r.on("error",(t=>{console.error("log4js.dateFileAppender - Writing to file %s, error happened ",e,t)})),r.on("drain",(()=>{process.emit("log4js:pause",!1)})),r}(e,t,r),i=function(e){o.writable&&(o.write(n(e,u)+Zc,"utf8")||process.emit("log4js:pause",!0))};return i.shutdown=function(e){o.end("","utf-8",e)},i}Yc.configure=function(e,t){let n=t.basicLayout;return e.layout&&(n=t.layout(e.layout.type,e.layout)),e.alwaysIncludePattern||(e.alwaysIncludePattern=!1),e.mode=e.mode||384,Qc(e.filename,e.pattern,n,e,e.timezoneOffset)};var ea={};const ta=Nr.exports("log4js:fileSync"),na=p.default,ra=D.default,ua=E.default.EOL||"\n";function oa(e,t){if(ra.existsSync(e))return;const n=ra.openSync(e,t.flags,t.mode);ra.closeSync(n)}class ia{constructor(e,t,n,r){ta("In RollingFileStream"),function(){if(!e||!t||t<=0)throw new Error("You must specify a filename and file size")}(),this.filename=e,this.size=t,this.backups=n,this.options=r,this.currentSize=0,this.currentSize=function(e){let t=0;try{t=ra.statSync(e).size}catch(t){oa(e,r)}return t}(this.filename)}shouldRoll(){return ta("should roll with current size %d, and max size %d",this.currentSize,this.size),this.currentSize>=this.size}roll(e){const t=this,n=new RegExp(`^${na.basename(e)}`);function r(e){return n.test(e)}function u(t){return parseInt(t.substring(`${na.basename(e)}.`.length),10)||0}function o(e,t){return u(e)>u(t)?1:u(e) ${e}.${r+1}`),ra.renameSync(na.join(na.dirname(e),n),`${e}.${r+1}`)}}ta("Rolling, rolling, rolling"),ta("Renaming the old files"),ra.readdirSync(na.dirname(e)).filter(r).sort(o).reverse().forEach(i)}write(e,t){const n=this;ta("in write"),this.shouldRoll()&&(this.currentSize=0,this.roll(this.filename)),ta("writing the chunk to the file"),n.currentSize+=e.length,ra.appendFileSync(n.filename,e)}}ea.configure=function(e,t){let n=t.basicLayout;e.layout&&(n=t.layout(e.layout.type,e.layout));const r={flags:e.flags||"a",encoding:e.encoding||"utf8",mode:e.mode||384};return function(e,t,n,r,u,o){ta("fileSync appender created");const i=function(e,t,n){let r;var u;return t?r=new ia(e,t,n,o):(oa(u=e,o),r={write(e){ra.appendFileSync(u,e)}}),r}(e=na.normalize(e),n,r=r||0===r?r:5);return e=>{i.write(t(e,u)+ua)}}(e.filename,n,e.maxLogSize,e.backups,e.timezoneOffset,r)};var sa={};const ca=Nr.exports("log4js:tcp"),aa=S.default;sa.configure=function(e,t){ca(`configure with config = ${e}`);let n=function(e){return e.serialise()};return e.layout&&(n=t.layout(e.layout.type,e.layout)),function(e,t){let n=!1;const r=[];let u,o=3,i="__LOG4JS__";function s(e){ca("Writing log event to socket"),n=u.write(`${t(e)}${i}`,"utf8")}function c(){let e;for(ca("emptying buffer");e=r.shift();)s(e)}function a(e){n?s(e):(ca("buffering log event because it cannot write at the moment"),r.push(e))}return function t(){ca(`appender creating socket to ${e.host||"localhost"}:${e.port||5e3}`),i=`${e.endMsg||"__LOG4JS__"}`,u=aa.createConnection(e.port||5e3,e.host||"localhost"),u.on("connect",(()=>{ca("socket connected"),c(),n=!0})),u.on("drain",(()=>{ca("drain event received, emptying buffer"),n=!0,c()})),u.on("timeout",u.end.bind(u)),u.on("error",(e=>{ca("connection error",e),n=!1,c()})),u.on("close",t)}(),a.shutdown=function(e){ca("shutdown called"),r.length&&o?(ca("buffer has items, waiting 100ms to empty"),o-=1,setTimeout((()=>{a.shutdown(e)}),100)):(u.removeAllListeners("close"),u.end(e))},a}(e,n)};const la=p.default,fa=Nr.exports("log4js:appenders"),da=tu,Da=eo,pa=gu,Ea=hu,ma=to,ha=new Map;ha.set("console",oo),ha.set("stdout",so),ha.set("stderr",co),ha.set("logLevelFilter",ao),ha.set("categoryFilter",lo),ha.set("noLogFilter",Do),ha.set("file",Eo),ha.set("dateFile",Yc),ha.set("fileSync",ea),ha.set("tcp",sa);const ya=new Map,Ca=(e,t)=>{fa("Loading module from ",e);try{return require(e)}catch(n){return void da.throwExceptionIf(t,"MODULE_NOT_FOUND"!==n.code,`appender "${e}" could not be loaded (error was: ${n})`)}},Fa=new Set,ga=(e,t)=>{if(ya.has(e))return ya.get(e);if(!t.appenders[e])return!1;if(Fa.has(e))throw new Error(`Dependency loop detected for appender ${e}.`);Fa.add(e),fa(`Creating appender ${e}`);const n=Aa(e,t);return Fa.delete(e),ya.set(e,n),n},Aa=(e,t)=>{const n=t.appenders[e],r=n.type.configure?n.type:((e,t)=>ha.get(e)||Ca(`./${e}`,t)||Ca(e,t)||require.main&&Ca(la.join(la.dirname(require.main.filename),e),t)||Ca(la.join(process.cwd(),e),t))(n.type,t);return da.throwExceptionIf(t,da.not(r),`appender "${e}" is not valid (type "${n.type}" could not be found)`),r.appender&&fa(`DEPRECATION: Appender ${n.type} exports an appender function.`),r.shutdown&&fa(`DEPRECATION: Appender ${n.type} exports a shutdown function.`),fa(`${e}: clustering.isMaster ? ${Da.isMaster()}`),fa(`${e}: appenderModule is ${F.default.inspect(r)}`),Da.onlyOnMaster((()=>(fa(`calling appenderModule.configure for ${e} / ${n.type}`),r.configure(ma.modifyConfig(n),Ea,(e=>ga(e,t)),pa))),(()=>{}))},va=e=>{ya.clear(),Fa.clear();const t=[];Object.values(e.categories).forEach((e=>{t.push(...e.appenders)})),Object.keys(e.appenders).forEach((n=>{(t.includes(n)||"tcp-server"===e.appenders[n].type)&&ga(n,e)}))},Sa=()=>{va({appenders:{out:{type:"stdout"}},categories:{default:{appenders:["out"],level:"trace"}}})};Sa(),da.addListener((e=>{da.throwExceptionIf(e,da.not(da.anObject(e.appenders)),'must have a property "appenders" of type object.');const t=Object.keys(e.appenders);da.throwExceptionIf(e,da.not(t.length),"must define at least one appender."),t.forEach((t=>{da.throwExceptionIf(e,da.not(e.appenders[t].type),`appender "${t}" is not valid (must be an object with property "type")`)}))})),da.addListener(va),Au.exports=ya,Au.exports.init=Sa;var wa={exports:{}};!function(e){const t=Nr.exports("log4js:categories"),n=tu,r=gu,u=Au.exports,o=new Map;function i(e,t,n){if(!1===t.inherit)return;const r=n.lastIndexOf(".");if(r<0)return;const u=n.substring(0,r);let o=e.categories[u];o||(o={inherit:!0,appenders:[]}),i(e,o,u),!e.categories[u]&&o.appenders&&o.appenders.length&&o.level&&(e.categories[u]=o),t.appenders=t.appenders||[],t.level=t.level||o.level,o.appenders.forEach((e=>{t.appenders.includes(e)||t.appenders.push(e)})),t.parent=o}function s(e){if(!e.categories)return;Object.keys(e.categories).forEach((t=>{const n=e.categories[t];i(e,n,t)}))}n.addPreProcessingListener((e=>s(e))),n.addListener((e=>{n.throwExceptionIf(e,n.not(n.anObject(e.categories)),'must have a property "categories" of type object.');const t=Object.keys(e.categories);n.throwExceptionIf(e,n.not(t.length),"must define at least one category."),t.forEach((t=>{const o=e.categories[t];n.throwExceptionIf(e,[n.not(o.appenders),n.not(o.level)],`category "${t}" is not valid (must be an object with properties "appenders" and "level")`),n.throwExceptionIf(e,n.not(Array.isArray(o.appenders)),`category "${t}" is not valid (appenders must be an array of appender names)`),n.throwExceptionIf(e,n.not(o.appenders.length),`category "${t}" is not valid (appenders must contain at least one appender name)`),Object.prototype.hasOwnProperty.call(o,"enableCallStack")&&n.throwExceptionIf(e,"boolean"!=typeof o.enableCallStack,`category "${t}" is not valid (enableCallStack must be boolean type)`),o.appenders.forEach((r=>{n.throwExceptionIf(e,n.not(u.get(r)),`category "${t}" is not valid (appender "${r}" is not defined)`)})),n.throwExceptionIf(e,n.not(r.getLevel(o.level)),`category "${t}" is not valid (level "${o.level}" not recognised; valid levels are ${r.levels.join(", ")})`)})),n.throwExceptionIf(e,n.not(e.categories.default),'must define a "default" category.')}));const c=e=>{o.clear();Object.keys(e.categories).forEach((n=>{const i=e.categories[n],s=[];i.appenders.forEach((e=>{s.push(u.get(e)),t(`Creating category ${n}`),o.set(n,{appenders:s,level:r.getLevel(i.level),enableCallStack:i.enableCallStack||!1})}))}))},a=()=>{c({categories:{default:{appenders:["out"],level:"OFF"}}})};a(),n.addListener(c);const l=e=>(t(`configForCategory: searching for config for ${e}`),o.has(e)?(t(`configForCategory: ${e} exists in config, returning it`),o.get(e)):e.indexOf(".")>0?(t(`configForCategory: ${e} has hierarchy, searching for parents`),l(e.substring(0,e.lastIndexOf(".")))):(t("configForCategory: returning config for default category"),l("default")));e.exports=o,e.exports=Object.assign(e.exports,{appendersForCategory:e=>l(e).appenders,getLevelForCategory:e=>l(e).level,setLevelForCategory:(e,n)=>{let r=o.get(e);if(t(`setLevelForCategory: found ${r} for ${e}`),!r){const n=l(e);t(`setLevelForCategory: no config found for category, found ${n} for parents of ${e}`),r={appenders:n.appenders}}r.level=n,o.set(e,r)},getEnableCallStackForCategory:e=>!0===l(e).enableCallStack,setEnableCallStackForCategory:(e,t)=>{l(e).enableCallStack=t},init:a})}(wa);const Oa=Nr.exports("log4js:logger"),ba=Hu,_a=gu,Ba=eo,Pa=wa.exports,ka=tu,xa=/at (?:(.+)\s+\()?(?:(.+?):(\d+)(?::(\d+))?|([^)]+))\)?/;function Na(e,t=4){const n=e.stack.split("\n").slice(t),r=xa.exec(n[0]);return r&&6===r.length?{functionName:r[1],fileName:r[2],lineNumber:parseInt(r[3],10),columnNumber:parseInt(r[4],10),callStack:n.join("\n")}:null}class Ia{constructor(e){if(!e)throw new Error("No category provided.");this.category=e,this.context={},this.parseCallStack=Na,Oa(`Logger created (${this.category}, ${this.level})`)}get level(){return _a.getLevel(Pa.getLevelForCategory(this.category),_a.TRACE)}set level(e){Pa.setLevelForCategory(this.category,_a.getLevel(e,this.level))}get useCallStack(){return Pa.getEnableCallStackForCategory(this.category)}set useCallStack(e){Pa.setEnableCallStackForCategory(this.category,!0===e)}log(e,...t){let n=_a.getLevel(e);n||(this._log(_a.WARN,"log4js:logger.log: invalid value for log-level as first parameter given: ",e),n=_a.INFO),this.isLevelEnabled(n)&&this._log(n,t)}isLevelEnabled(e){return this.level.isLessThanOrEqualTo(e)}_log(e,t){Oa(`sending log data (${e}) to appenders`);const n=new ba(this.category,e,t,this.context,this.useCallStack&&this.parseCallStack(new Error));Ba.send(n)}addContext(e,t){this.context[e]=t}removeContext(e){delete this.context[e]}clearContext(){this.context={}}setParseCallStackFunction(e){this.parseCallStack=e}}function Ta(e){const t=_a.getLevel(e),n=t.toString().toLowerCase().replace(/_([a-z])/g,(e=>e[1].toUpperCase())),r=n[0].toUpperCase()+n.slice(1);Ia.prototype[`is${r}Enabled`]=function(){return this.isLevelEnabled(t)},Ia.prototype[n]=function(...e){this.log(t,...e)}}_a.levels.forEach(Ta),ka.addListener((()=>{_a.levels.forEach(Ta)}));var Ra=Ia;const Ma=gu;function La(e){return e.originalUrl||e.url}function ja(e,t){for(let n=0;ne.source?e.source:e));t=new RegExp(n.join("|"))}return t}(t.nolog);return(e,i,s)=>{if(e._logging)return s();if(o&&o.test(e.originalUrl))return s();if(n.isLevelEnabled(r)||"auto"===t.level){const o=new Date,{writeHead:s}=i;e._logging=!0,i.writeHead=(e,t)=>{i.writeHead=s,i.writeHead(e,t),i.__statusCode=e,i.__headers=t||{}},i.on("finish",(()=>{i.responseTime=new Date-o,i.statusCode&&"auto"===t.level&&(r=Ma.INFO,i.statusCode>=300&&(r=Ma.WARN),i.statusCode>=400&&(r=Ma.ERROR)),r=function(e,t,n){let r=t;if(n){const t=n.find((t=>{let n=!1;return n=t.from&&t.to?e>=t.from&&e<=t.to:-1!==t.codes.indexOf(e),n}));t&&(r=Ma.getLevel(t.level,r))}return r}(i.statusCode,r,t.statusRules);const s=function(e,t,n){const r=[];return r.push({token:":url",replacement:La(e)}),r.push({token:":protocol",replacement:e.protocol}),r.push({token:":hostname",replacement:e.hostname}),r.push({token:":method",replacement:e.method}),r.push({token:":status",replacement:t.__statusCode||t.statusCode}),r.push({token:":response-time",replacement:t.responseTime}),r.push({token:":date",replacement:(new Date).toUTCString()}),r.push({token:":referrer",replacement:e.headers.referer||e.headers.referrer||""}),r.push({token:":http-version",replacement:`${e.httpVersionMajor}.${e.httpVersionMinor}`}),r.push({token:":remote-addr",replacement:e.headers["x-forwarded-for"]||e.ip||e._remoteAddress||e.socket&&(e.socket.remoteAddress||e.socket.socket&&e.socket.socket.remoteAddress)}),r.push({token:":user-agent",replacement:e.headers["user-agent"]}),r.push({token:":content-length",replacement:t.getHeader("content-length")||t.__headers&&t.__headers["Content-Length"]||"-"}),r.push({token:/:req\[([^\]]+)]/g,replacement:(t,n)=>e.headers[n.toLowerCase()]}),r.push({token:/:res\[([^\]]+)]/g,replacement:(e,n)=>t.getHeader(n.toLowerCase())||t.__headers&&t.__headers[n]}),(e=>{const t=e.concat();for(let e=0;eja(e,s)));t&&n.log(r,t)}else n.log(r,ja(u,s));t.context&&n.removeContext("res")}))}return s()}},nl=Va;let rl=!1;function ul(e){if(!rl)return;Ua("Received log event ",e);Za.appendersForCategory(e.categoryName).forEach((t=>{t(e)}))}function ol(e){rl&&il();let t=e;return"string"==typeof t&&(t=function(e){Ua(`Loading configuration from ${e}`);try{return JSON.parse(Wa.readFileSync(e,"utf8"))}catch(t){throw new Error(`Problem reading config from file "${e}". Error was ${t.message}`,t)}}(e)),Ua(`Configuration is ${t}`),Ka.configure(za(t)),el.onMessage(ul),rl=!0,sl}function il(e){Ua("Shutdown called. Disabling all log writing."),rl=!1;const t=Array.from(Xa.values());Xa.init(),Za.init();const n=t.reduceRight(((e,t)=>t.shutdown?e+1:e),0);if(0===n)return Ua("No appenders with shutdown functions found."),void 0!==e&&e();let r,u=0;function o(t){r=r||t,u+=1,Ua(`Appender shutdowns complete: ${u} / ${n}`),u>=n&&(Ua("All shutdown functions completed."),e&&e(r))}return Ua(`Found ${n} appenders with shutdown functions.`),t.filter((e=>e.shutdown)).forEach((e=>e.shutdown(o))),null}const sl={getLogger:function(e){return rl||ol(process.env.LOG4JS_CONFIG||{appenders:{out:{type:"stdout"}},categories:{default:{appenders:["out"],level:"OFF"}}}),new Qa(e||"default")},configure:ol,shutdown:il,connectLogger:tl,levels:Ya,addLayout:qa.addLayout,recording:function(){return nl}};var cl=sl,al={};Object.defineProperty(al,"__esModule",{value:!0}),al.levelMap=al.getLevel=al.setCategoriesLevel=al.getConfiguration=al.setConfiguration=void 0;const ll=cl;let fl={appenders:{debug:{type:"stdout",layout:{type:"pattern",pattern:"[%d] > hvigor %p %c %[%m%]"}},info:{type:"stdout",layout:{type:"pattern",pattern:"[%d] > hvigor %[%m%]"}},"no-pattern-info":{type:"stdout",layout:{type:"pattern",pattern:"%m"}},wrong:{type:"stderr",layout:{type:"pattern",pattern:"[%d] > hvigor %[%p: %m%]"}},"just-debug":{type:"logLevelFilter",appender:"debug",level:"debug",maxLevel:"debug"},"just-info":{type:"logLevelFilter",appender:"info",level:"info",maxLevel:"info"},"just-wrong":{type:"logLevelFilter",appender:"wrong",level:"warn",maxLevel:"error"}},categories:{default:{appenders:["just-debug","just-info","just-wrong"],level:"debug"},"no-pattern-info":{appenders:["no-pattern-info"],level:"info"}}};al.setConfiguration=e=>{fl=e};al.getConfiguration=()=>fl;let dl=ll.levels.DEBUG;al.setCategoriesLevel=(e,t)=>{dl=e;const n=fl.categories;for(const r in n)(null==t?void 0:t.includes(r))||Object.prototype.hasOwnProperty.call(n,r)&&(n[r].level=e.levelStr)};al.getLevel=()=>dl,al.levelMap=new Map([["ALL",ll.levels.ALL],["MARK",ll.levels.MARK],["TRACE",ll.levels.TRACE],["DEBUG",ll.levels.DEBUG],["INFO",ll.levels.INFO],["WARN",ll.levels.WARN],["ERROR",ll.levels.ERROR],["FATAL",ll.levels.FATAL],["OFF",ll.levels.OFF]]);var Dl=w&&w.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var u=Object.getOwnPropertyDescriptor(t,n);u&&!("get"in u?!t.__esModule:u.writable||u.configurable)||(u={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,u)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),pl=w&&w.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),El=w&&w.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&Dl(t,e,n);return pl(t,e),t};Object.defineProperty(xr,"__esModule",{value:!0}),xr.evaluateLogLevel=xr.HvigorLogger=void 0;const ml=El(cl),hl=cl,yl=El(F.default),Cl=al;class Fl{constructor(e){ml.configure((0,Cl.getConfiguration)()),this._logger=ml.getLogger(e),this._logger.level=(0,Cl.getLevel)()}static getLogger(e){return new Fl(e)}log(e,...t){this._logger.log(e,...t)}debug(e,...t){this._logger.debug(e,...t)}info(e,...t){this._logger.info(e,...t)}warn(e,...t){void 0!==e&&""!==e&&this._logger.warn(e,...t)}error(e,...t){this._logger.error(e,...t)}_printTaskExecuteInfo(e,t){this.info(`Finished :${e}... after ${t}`)}_printFailedTaskInfo(e){this.error(`Failed :${e}... `)}_printDisabledTaskInfo(e){this.info(`Disabled :${e}... `)}_printUpToDateTaskInfo(e){this.info(`UP-TO-DATE :${e}... `)}errorMessageExit(e,...t){throw new Error(yl.format(e,...t))}errorExit(e,t,...n){t&&this._logger.error(t,n),this._logger.error(e.stack)}setLevel(e,t){(0,Cl.setCategoriesLevel)(e,t),ml.shutdown(),ml.configure((0,Cl.getConfiguration)())}getLevel(){return this._logger.level}configure(e){const t=(0,Cl.getConfiguration)(),n={appenders:{...t.appenders,...e.appenders},categories:{...t.categories,...e.categories}};(0,Cl.setConfiguration)(n),ml.shutdown(),ml.configure(n)}}xr.HvigorLogger=Fl,xr.evaluateLogLevel=function(e,t){t.debug?e.setLevel(hl.levels.DEBUG):t.warn?e.setLevel(hl.levels.WARN):t.error?e.setLevel(hl.levels.ERROR):e.setLevel(hl.levels.INFO)};var gl=w&&w.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(X,"__esModule",{value:!0}),X.parseJsonText=X.parseJsonFile=void 0;const Al=Z,vl=gl(kr),Sl=gl(p.default),wl=gl(E.default),Ol=xr.HvigorLogger.getLogger("parse-json-util");var bl;!function(e){e[e.Char=0]="Char",e[e.EOF=1]="EOF",e[e.Identifier=2]="Identifier"}(bl||(bl={}));let _l,Bl,Pl,kl,xl,Nl,Il="start",Tl=[],Rl=0,Ml=1,Ll=0,jl=!1,$l="default",Hl="'",Jl=1;function Gl(e,t=!1){Bl=String(e),Il="start",Tl=[],Rl=0,Ml=1,Ll=0,kl=void 0,jl=t;do{_l=Vl(),Xl[Il]()}while("eof"!==_l.type);return kl}function Vl(){for($l="default",xl="",Hl="'",Jl=1;;){Nl=Ul();const e=zl[$l]();if(e)return e}}function Ul(){if(Bl[Rl])return String.fromCodePoint(Bl.codePointAt(Rl))}function Wl(){const e=Ul();return"\n"===e?(Ml++,Ll=0):e?Ll+=e.length:Ll++,e&&(Rl+=e.length),e}X.parseJsonFile=function(e,t=!1,n="utf-8"){const r=vl.default.readFileSync(Sl.default.resolve(e),{encoding:n});try{return Gl(r,t)}catch(t){if(t instanceof SyntaxError){const n=t.message.split("at");2===n.length&&Ol.errorMessageExit(`${n[0].trim()}${wl.default.EOL}\t at ${e}:${n[1].trim()}`)}Ol.errorMessageExit(`${e} is not in valid JSON/JSON5 format.`)}},X.parseJsonText=Gl;const zl={default(){switch(Nl){case"/":return Wl(),void($l="comment");case void 0:return Wl(),Kl("eof")}if(!Al.JudgeUtil.isIgnoreChar(Nl)&&!Al.JudgeUtil.isSpaceSeparator(Nl))return zl[Il]();Wl()},start(){$l="value"},beforePropertyName(){switch(Nl){case"$":case"_":return xl=Wl(),void($l="identifierName");case"\\":return Wl(),void($l="identifierNameStartEscape");case"}":return Kl("punctuator",Wl());case'"':case"'":return Hl=Nl,Wl(),void($l="string")}if(Al.JudgeUtil.isIdStartChar(Nl))return xl+=Wl(),void($l="identifierName");throw tf(bl.Char,Wl())},afterPropertyName(){if(":"===Nl)return Kl("punctuator",Wl());throw tf(bl.Char,Wl())},beforePropertyValue(){$l="value"},afterPropertyValue(){switch(Nl){case",":case"}":return Kl("punctuator",Wl())}throw tf(bl.Char,Wl())},beforeArrayValue(){if("]"===Nl)return Kl("punctuator",Wl());$l="value"},afterArrayValue(){switch(Nl){case",":case"]":return Kl("punctuator",Wl())}throw tf(bl.Char,Wl())},end(){throw tf(bl.Char,Wl())},comment(){switch(Nl){case"*":return Wl(),void($l="multiLineComment");case"/":return Wl(),void($l="singleLineComment")}throw tf(bl.Char,Wl())},multiLineComment(){switch(Nl){case"*":return Wl(),void($l="multiLineCommentAsterisk");case void 0:throw tf(bl.Char,Wl())}Wl()},multiLineCommentAsterisk(){switch(Nl){case"*":return void Wl();case"/":return Wl(),void($l="default");case void 0:throw tf(bl.Char,Wl())}Wl(),$l="multiLineComment"},singleLineComment(){switch(Nl){case"\n":case"\r":case"\u2028":case"\u2029":return Wl(),void($l="default");case void 0:return Wl(),Kl("eof")}Wl()},value(){switch(Nl){case"{":case"[":return Kl("punctuator",Wl());case"n":return Wl(),ql("ull"),Kl("null",null);case"t":return Wl(),ql("rue"),Kl("boolean",!0);case"f":return Wl(),ql("alse"),Kl("boolean",!1);case"-":case"+":return"-"===Wl()&&(Jl=-1),void($l="numerical");case".":case"0":case"I":case"N":return void($l="numerical");case'"':case"'":return Hl=Nl,Wl(),xl="",void($l="string")}if(void 0===Nl||!Al.JudgeUtil.isDigitWithoutZero(Nl))throw tf(bl.Char,Wl());$l="numerical"},numerical(){switch(Nl){case".":return xl=Wl(),void($l="decimalPointLeading");case"0":return xl=Wl(),void($l="zero");case"I":return Wl(),ql("nfinity"),Kl("numeric",Jl*(1/0));case"N":return Wl(),ql("aN"),Kl("numeric",NaN)}if(void 0!==Nl&&Al.JudgeUtil.isDigitWithoutZero(Nl))return xl=Wl(),void($l="decimalInteger");throw tf(bl.Char,Wl())},zero(){switch(Nl){case".":case"e":case"E":return void($l="decimal");case"x":case"X":return xl+=Wl(),void($l="hexadecimal")}return Kl("numeric",0)},decimalInteger(){switch(Nl){case".":case"e":case"E":return void($l="decimal")}if(!Al.JudgeUtil.isDigit(Nl))return Kl("numeric",Jl*Number(xl));xl+=Wl()},decimal(){switch(Nl){case".":xl+=Wl(),$l="decimalFraction";break;case"e":case"E":xl+=Wl(),$l="decimalExponent"}},decimalPointLeading(){if(Al.JudgeUtil.isDigit(Nl))return xl+=Wl(),void($l="decimalFraction");throw tf(bl.Char,Wl())},decimalFraction(){switch(Nl){case"e":case"E":return xl+=Wl(),void($l="decimalExponent")}if(!Al.JudgeUtil.isDigit(Nl))return Kl("numeric",Jl*Number(xl));xl+=Wl()},decimalExponent(){switch(Nl){case"+":case"-":return xl+=Wl(),void($l="decimalExponentSign")}if(Al.JudgeUtil.isDigit(Nl))return xl+=Wl(),void($l="decimalExponentInteger");throw tf(bl.Char,Wl())},decimalExponentSign(){if(Al.JudgeUtil.isDigit(Nl))return xl+=Wl(),void($l="decimalExponentInteger");throw tf(bl.Char,Wl())},decimalExponentInteger(){if(!Al.JudgeUtil.isDigit(Nl))return Kl("numeric",Jl*Number(xl));xl+=Wl()},hexadecimal(){if(Al.JudgeUtil.isHexDigit(Nl))return xl+=Wl(),void($l="hexadecimalInteger");throw tf(bl.Char,Wl())},hexadecimalInteger(){if(!Al.JudgeUtil.isHexDigit(Nl))return Kl("numeric",Jl*Number(xl));xl+=Wl()},identifierNameStartEscape(){if("u"!==Nl)throw tf(bl.Char,Wl());Wl();const e=Yl();switch(e){case"$":case"_":break;default:if(!Al.JudgeUtil.isIdStartChar(e))throw tf(bl.Identifier)}xl+=e,$l="identifierName"},identifierName(){switch(Nl){case"$":case"_":case"":case"":return void(xl+=Wl());case"\\":return Wl(),void($l="identifierNameEscape")}if(!Al.JudgeUtil.isIdContinueChar(Nl))return Kl("identifier",xl);xl+=Wl()},identifierNameEscape(){if("u"!==Nl)throw tf(bl.Char,Wl());Wl();const e=Yl();switch(e){case"$":case"_":case"":case"":break;default:if(!Al.JudgeUtil.isIdContinueChar(e))throw tf(bl.Identifier)}xl+=e,$l="identifierName"},string(){switch(Nl){case"\\":return Wl(),void(xl+=function(){const e=Ul(),t=function(){switch(Ul()){case"b":return Wl(),"\b";case"f":return Wl(),"\f";case"n":return Wl(),"\n";case"r":return Wl(),"\r";case"t":return Wl(),"\t";case"v":return Wl(),"\v"}return}();if(t)return t;switch(e){case"0":if(Wl(),Al.JudgeUtil.isDigit(Ul()))throw tf(bl.Char,Wl());return"\0";case"x":return Wl(),function(){let e="",t=Ul();if(!Al.JudgeUtil.isHexDigit(t))throw tf(bl.Char,Wl());if(e+=Wl(),t=Ul(),!Al.JudgeUtil.isHexDigit(t))throw tf(bl.Char,Wl());return e+=Wl(),String.fromCodePoint(parseInt(e,16))}();case"u":return Wl(),Yl();case"\n":case"\u2028":case"\u2029":return Wl(),"";case"\r":return Wl(),"\n"===Ul()&&Wl(),""}if(void 0===e||Al.JudgeUtil.isDigitWithoutZero(e))throw tf(bl.Char,Wl());return Wl()}());case'"':case"'":if(Nl===Hl){const e=Kl("string",xl);return Wl(),e}return void(xl+=Wl());case"\n":case"\r":case void 0:throw tf(bl.Char,Wl());case"\u2028":case"\u2029":!function(e){Ol.warn(`JSON5: '${ef(e)}' in strings is not valid ECMAScript; consider escaping.`)}(Nl)}xl+=Wl()}};function Kl(e,t){return{type:e,value:t,line:Ml,column:Ll}}function ql(e){for(const t of e){if(Ul()!==t)throw tf(bl.Char,Wl());Wl()}}function Yl(){let e="",t=4;for(;t-- >0;){const t=Ul();if(!Al.JudgeUtil.isHexDigit(t))throw tf(bl.Char,Wl());e+=Wl()}return String.fromCodePoint(parseInt(e,16))}const Xl={start(){if("eof"===_l.type)throw tf(bl.EOF);Zl()},beforePropertyName(){switch(_l.type){case"identifier":case"string":return Pl=_l.value,void(Il="afterPropertyName");case"punctuator":return void Ql();case"eof":throw tf(bl.EOF)}},afterPropertyName(){if("eof"===_l.type)throw tf(bl.EOF);Il="beforePropertyValue"},beforePropertyValue(){if("eof"===_l.type)throw tf(bl.EOF);Zl()},afterPropertyValue(){if("eof"===_l.type)throw tf(bl.EOF);switch(_l.value){case",":return void(Il="beforePropertyName");case"}":Ql()}},beforeArrayValue(){if("eof"===_l.type)throw tf(bl.EOF);"punctuator"!==_l.type||"]"!==_l.value?Zl():Ql()},afterArrayValue(){if("eof"===_l.type)throw tf(bl.EOF);switch(_l.value){case",":return void(Il="beforeArrayValue");case"]":Ql()}},end(){}};function Zl(){const e=function(){let e;switch(_l.type){case"punctuator":switch(_l.value){case"{":e={};break;case"[":e=[]}break;case"null":case"boolean":case"numeric":case"string":e=_l.value}return e}();if(jl&&"object"==typeof e&&(e._line=Ml,e._column=Ll),void 0===kl)kl=e;else{const t=Tl[Tl.length-1];Array.isArray(t)?jl&&"object"!=typeof e?t.push({value:e,_line:Ml,_column:Ll}):t.push(e):t[Pl]=jl&&"object"!=typeof e?{value:e,_line:Ml,_column:Ll}:e}!function(e){if(e&&"object"==typeof e)Tl.push(e),Il=Array.isArray(e)?"beforeArrayValue":"beforePropertyName";else{const e=Tl[Tl.length-1];Il=e?Array.isArray(e)?"afterArrayValue":"afterPropertyValue":"end"}}(e)}function Ql(){Tl.pop();const e=Tl[Tl.length-1];Il=e?Array.isArray(e)?"afterArrayValue":"afterPropertyValue":"end"}function ef(e){const t={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};if(t[e])return t[e];if(e<" "){const t=e.charCodeAt(0).toString(16);return`\\x${`00${t}`.substring(t.length)}`}return e}function tf(e,t){let n="";switch(e){case bl.Char:n=void 0===t?`JSON5: invalid end of input at ${Ml}:${Ll}`:`JSON5: invalid character '${ef(t)}' at ${Ml}:${Ll}`;break;case bl.EOF:n=`JSON5: invalid end of input at ${Ml}:${Ll}`;break;case bl.Identifier:Ll-=5,n=`JSON5: invalid identifier character at ${Ml}:${Ll}`}const r=new nf(n);return r.lineNumber=Ml,r.columnNumber=Ll,r}class nf extends SyntaxError{}var rf=w&&w.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var u=Object.getOwnPropertyDescriptor(t,n);u&&!("get"in u?!t.__esModule:u.writable||u.configurable)||(u={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,u)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),uf=w&&w.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),of=w&&w.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&rf(t,e,n);return uf(t,e),t};Object.defineProperty(Y,"__esModule",{value:!0});var sf=Y.cleanWorkSpace=Ff=Y.executeInstallHvigor=yf=Y.isHvigorInstalled=mf=Y.isAllDependenciesInstalled=void 0;const cf=of(D.default),af=of(p.default),lf=b,ff=j,df=$,Df=X;let pf,Ef;var mf=Y.isAllDependenciesInstalled=function(){function e(e){const t=null==e?void 0:e.dependencies;return void 0===t?0:Object.getOwnPropertyNames(t).length}if(pf=gf(),Ef=Af(),e(pf)+1!==e(Ef))return!1;for(const e in null==pf?void 0:pf.dependencies)if(!(0,ff.hasNpmPackInPaths)(e,[lf.HVIGOR_PROJECT_DEPENDENCIES_HOME])||!hf(e,pf,Ef))return!1;return!0};function hf(e,t,n){return void 0!==n.dependencies&&(0,ff.offlinePluginConversion)(lf.HVIGOR_PROJECT_ROOT_DIR,t.dependencies[e])===n.dependencies[e]}var yf=Y.isHvigorInstalled=function(){return pf=gf(),Ef=Af(),(0,ff.hasNpmPackInPaths)(lf.HVIGOR_ENGINE_PACKAGE_NAME,[lf.HVIGOR_PROJECT_DEPENDENCIES_HOME])&&(0,ff.offlinePluginConversion)(lf.HVIGOR_PROJECT_ROOT_DIR,pf.hvigorVersion)===Ef.dependencies[lf.HVIGOR_ENGINE_PACKAGE_NAME]};const Cf={cwd:lf.HVIGOR_PROJECT_DEPENDENCIES_HOME,stdio:["inherit","inherit","inherit"]};var Ff=Y.executeInstallHvigor=function(){(0,df.logInfoPrintConsole)("Hvigor installing...");const e={dependencies:{}};e.dependencies[lf.HVIGOR_ENGINE_PACKAGE_NAME]=(0,ff.offlinePluginConversion)(lf.HVIGOR_PROJECT_ROOT_DIR,pf.hvigorVersion);try{cf.mkdirSync(lf.HVIGOR_PROJECT_DEPENDENCIES_HOME,{recursive:!0});const t=af.resolve(lf.HVIGOR_PROJECT_DEPENDENCIES_HOME,lf.DEFAULT_PACKAGE_JSON);cf.writeFileSync(t,JSON.stringify(e))}catch(e){(0,df.logErrorAndExit)(e)}!function(){const e=["config","set","store-dir",lf.HVIGOR_PNPM_STORE_PATH];(0,ff.executeCommand)(lf.HVIGOR_WRAPPER_PNPM_SCRIPT_PATH,e,Cf)}(),(0,ff.executeCommand)(lf.HVIGOR_WRAPPER_PNPM_SCRIPT_PATH,["install"],Cf)};function gf(){const e=af.resolve(lf.HVIGOR_PROJECT_WRAPPER_HOME,lf.DEFAULT_HVIGOR_CONFIG_JSON_FILE_NAME);return cf.existsSync(e)||(0,df.logErrorAndExit)(`Error: Hvigor config file ${e} does not exist.`),(0,Df.parseJsonFile)(e)}function Af(){return cf.existsSync(lf.HVIGOR_PROJECT_DEPENDENCY_PACKAGE_JSON_PATH)?(0,Df.parseJsonFile)(lf.HVIGOR_PROJECT_DEPENDENCY_PACKAGE_JSON_PATH):{dependencies:{}}}sf=Y.cleanWorkSpace=function(){if((0,df.logInfoPrintConsole)("Hvigor cleaning..."),!cf.existsSync(lf.HVIGOR_PROJECT_DEPENDENCIES_HOME))return;const e=cf.readdirSync(lf.HVIGOR_PROJECT_DEPENDENCIES_HOME);if(e&&0!==e.length){cf.existsSync(lf.HVIGOR_BOOT_JS_FILE_PATH)&&(0,ff.executeCommand)(process.argv[0],[lf.HVIGOR_BOOT_JS_FILE_PATH,"--stop-daemon"],{});try{e.forEach((e=>{cf.rmSync(af.resolve(lf.HVIGOR_PROJECT_DEPENDENCIES_HOME,e),{recursive:!0})}))}catch(e){(0,df.logErrorAndExit)(`The hvigor build tool cannot be installed. Please manually clear the workspace directory and synchronize the project again.\n\n Workspace Path: ${lf.HVIGOR_PROJECT_DEPENDENCIES_HOME}.`)}}};var vf={},Sf=w&&w.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var u=Object.getOwnPropertyDescriptor(t,n);u&&!("get"in u?!t.__esModule:u.writable||u.configurable)||(u={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,u)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),wf=w&&w.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Of=w&&w.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&Sf(t,e,n);return wf(t,e),t};Object.defineProperty(vf,"__esModule",{value:!0});var bf=vf.executeBuild=void 0;const _f=b,Bf=Of(D.default),Pf=Of(p.default),kf=$;bf=vf.executeBuild=function(){const e=Pf.resolve(_f.HVIGOR_PROJECT_DEPENDENCIES_HOME,"node_modules","@ohos","hvigor","bin","hvigor.js");try{const t=Bf.realpathSync(e);require(t)}catch(t){(0,kf.logErrorAndExit)(`Error: ENOENT: no such file ${e},delete ${_f.HVIGOR_PROJECT_DEPENDENCIES_HOME} and retry.`)}},function(){if(O.checkNpmConifg(),O.environmentHandler(),O.isPnpmAvailable()||O.executeInstallPnpm(),yf()&&mf())bf();else{sf();try{Ff()}catch(e){return void sf()}bf()}}();
\ No newline at end of file
diff --git a/code/SystemFeature/InsightIntent/IntentDriver/ohosTest.md b/code/SystemFeature/InsightIntent/IntentDriver/ohosTest.md
deleted file mode 100644
index 93d9b0e56..000000000
--- a/code/SystemFeature/InsightIntent/IntentDriver/ohosTest.md
+++ /dev/null
@@ -1,4 +0,0 @@
-|测试功能|预置条件|输入|预期输出|是否自动|测试结果|
-|--------------------------------|--------------------------------|--------------------------------|--------------------------------|--------------------------------|--------------------------------|
-|触发绑定到UIAbility前台运行的意图调用| 位于主页| 点击按钮意图绑定到UIAbility前台 | 成功拉起另一个页面,并返回意图调用结果,且与预期结果相同 | 是 |Pass|
-|触发绑定到ServiceExtension运行的意图调用| 位于主页| 点击按钮意图绑定到ServiceExtension | 返回意图调用结果且预期结果相同 | 是 |Pass|
diff --git a/code/SystemFeature/InsightIntent/IntentDriver/screenshots/zh/executeInServiceExtension.png b/code/SystemFeature/InsightIntent/IntentDriver/screenshots/zh/executeInServiceExtension.png
deleted file mode 100644
index 2759e6e00..000000000
Binary files a/code/SystemFeature/InsightIntent/IntentDriver/screenshots/zh/executeInServiceExtension.png and /dev/null differ
diff --git a/code/SystemFeature/InsightIntent/IntentDriver/screenshots/zh/executeInUIAbility.png b/code/SystemFeature/InsightIntent/IntentDriver/screenshots/zh/executeInUIAbility.png
deleted file mode 100644
index 6b0e43f1f..000000000
Binary files a/code/SystemFeature/InsightIntent/IntentDriver/screenshots/zh/executeInUIAbility.png and /dev/null differ
diff --git a/code/SystemFeature/InsightIntent/IntentDriver/screenshots/zh/home.png b/code/SystemFeature/InsightIntent/IntentDriver/screenshots/zh/home.png
deleted file mode 100644
index c868c071c..000000000
Binary files a/code/SystemFeature/InsightIntent/IntentDriver/screenshots/zh/home.png and /dev/null differ
diff --git a/code/UI/ArkTsComponentCollection/ComponentCollection/README_zh.md b/code/UI/ArkTsComponentCollection/ComponentCollection/README_zh.md
index 4c0198ace..45e4ba11f 100644
--- a/code/UI/ArkTsComponentCollection/ComponentCollection/README_zh.md
+++ b/code/UI/ArkTsComponentCollection/ComponentCollection/README_zh.md
@@ -350,6 +350,7 @@ entry/src/main/ets/
| | | | | |---HyperlinkDrag.ets
| | | | | |---ImageDrag.ets
| | | | | |---ListItemDrag.ets
+| | | | | |---MultiSelectDrag.ets
| | | | | |---TextDrag.ets
| | | | | |---VideoDrag.ets
| | | | |---DragEventSample.ets // 拖拽事件
diff --git a/code/UI/ArkTsComponentCollection/ComponentCollection/entry/src/main/ets/pages/animations/TransitionAnimations/systemIcon/SystemIcon.ets b/code/UI/ArkTsComponentCollection/ComponentCollection/entry/src/main/ets/pages/animations/TransitionAnimations/systemIcon/SystemIcon.ets
index df0772327..935d3b1ce 100644
--- a/code/UI/ArkTsComponentCollection/ComponentCollection/entry/src/main/ets/pages/animations/TransitionAnimations/systemIcon/SystemIcon.ets
+++ b/code/UI/ArkTsComponentCollection/ComponentCollection/entry/src/main/ets/pages/animations/TransitionAnimations/systemIcon/SystemIcon.ets
@@ -38,20 +38,19 @@ struct SystemIcon {
Stack() {
Slider({
value: this.sliderValue,
- style: SliderStyle.InSet,
+ style: SliderStyle.NONE,
direction: Axis.Vertical,
reverse: true
})
.id('systemIcons_slider')
- .width(54)
- .height(130)
+ .width('100%')
+ .height(260)
.trackThickness(54)
.showTips(false)
.trackColor($r('app.color.COLOR_80000000'))
.blockColor($r('app.color.COLOR_FFFFFF'))
.selectedColor($r('app.color.COLOR_FFFFFF'))
- .blockSize({ width: 0.1, height: 0.1 })
- .trackBorderRadius(12)
+ .trackBorderRadius(20)
.onChange((value: number, mode: SliderChangeMode) => {
this.sliderValue = value;
if (this.sliderValue <= 50) {
@@ -71,6 +70,7 @@ struct SystemIcon {
.animation({ duration: 500, curve: "ease" })
.borderRadius(8)
.backgroundColor($r('app.color.COLOR_8C9BA2'))
+ .margin({ bottom: 14 })
this.lineComponent(0)
this.lineComponent(45)
@@ -82,9 +82,7 @@ struct SystemIcon {
.margin({ bottom: 8 })
.alignContent(Alignment.Center)
}
- .width(54)
- .height(130)
- .offset({ x: 34, y: -10 })
+ .offset({ x: 34, y: 0 })
.alignContent(Alignment.Bottom)
}
@@ -117,5 +115,6 @@ struct SystemIcon {
.height(2)
.rotate({ angle: angle })
.justifyContent(FlexAlign.Center)
+ .margin({ bottom: 14 })
}
}
\ No newline at end of file
diff --git a/code/UI/ArkTsComponentCollection/ComponentCollection/entry/src/main/ets/pages/components/buttonAndSelection/radioSample/RadioSample.ets b/code/UI/ArkTsComponentCollection/ComponentCollection/entry/src/main/ets/pages/components/buttonAndSelection/radioSample/RadioSample.ets
index 57851203c..b2bfa87a3 100644
--- a/code/UI/ArkTsComponentCollection/ComponentCollection/entry/src/main/ets/pages/components/buttonAndSelection/radioSample/RadioSample.ets
+++ b/code/UI/ArkTsComponentCollection/ComponentCollection/entry/src/main/ets/pages/components/buttonAndSelection/radioSample/RadioSample.ets
@@ -32,6 +32,8 @@ struct RadioSample {
@State noResponseRegionIndex: number = 0;
private context: Context = getContext(this);
private cityNames: Resource[] = [$r('app.string.radio_beijing'), $r('app.string.radio_shanghai'), $r('app.string.radio_guangzhou'), $r('app.string.radio_shenzhen')];
+ private widthValue: number = 20;
+ private heightValue: number = 48;
build() {
Column() {
@@ -63,10 +65,12 @@ struct RadioSample {
ForEach(this.cityNames, (item: Resource, index: number) => {
Row() {
Radio({ value: this.context.resourceManager.getStringSync(item), group: 'responseRegion' })
- .size({ width: 20, height: 20 })
+ .size({ width: this.widthValue, height: this.heightValue })
.checked(this.responseRegionIndex === index)
.responseRegion({
- width: this.radioItemWidth, // Get response region with equals radio item width
+ x: 0,
+ y: 0,
+ width: this.radioItemWidth * (100 / this.widthValue) + '%',
height: '100%'
})
.onChange((isChecked: boolean) => {
@@ -77,9 +81,7 @@ struct RadioSample {
})
.id('cityHot' + String(index))
Text(item)
- .width(this.radioItemWidth)
- .height(48)
- .responseRegion({ width: 0, height: 0 }) // Make this text has no response region
+ .height(this.heightValue)
}
.width('100%')
.margin({ bottom: 6 })
diff --git a/code/UI/ArkTsComponentCollection/ComponentCollection/entry/src/main/ets/pages/components/navigation/navigationSample/NavigationExpandSafeArea.ets b/code/UI/ArkTsComponentCollection/ComponentCollection/entry/src/main/ets/pages/components/navigation/navigationSample/NavigationExpandSafeArea.ets
index d9bf30ce0..8e3af2ab4 100644
--- a/code/UI/ArkTsComponentCollection/ComponentCollection/entry/src/main/ets/pages/components/navigation/navigationSample/NavigationExpandSafeArea.ets
+++ b/code/UI/ArkTsComponentCollection/ComponentCollection/entry/src/main/ets/pages/components/navigation/navigationSample/NavigationExpandSafeArea.ets
@@ -41,7 +41,7 @@ struct NavigationExpandSafeArea {
.borderRadius(24)
.height('88%')
.width('93%')
- .expandSafeArea(this.expand ? [SafeAreaType.SYSTEM] : [], this.expand ? [SafeAreaEdge.BOTTOM] : [])
+ .expandSafeArea(this.expand ? [SafeAreaType.SYSTEM] : [SafeAreaType.CUTOUT], this.expand ? [SafeAreaEdge.BOTTOM] : [SafeAreaEdge.START])
}
.height('100%')
.width('100%')
diff --git a/code/UI/ArkTsComponentCollection/ComponentCollection/entry/src/main/ets/pages/universal/events/dragEventSample/DragEventSample.ets b/code/UI/ArkTsComponentCollection/ComponentCollection/entry/src/main/ets/pages/universal/events/dragEventSample/DragEventSample.ets
index b257f6dd0..33c27cc3f 100644
--- a/code/UI/ArkTsComponentCollection/ComponentCollection/entry/src/main/ets/pages/universal/events/dragEventSample/DragEventSample.ets
+++ b/code/UI/ArkTsComponentCollection/ComponentCollection/entry/src/main/ets/pages/universal/events/dragEventSample/DragEventSample.ets
@@ -19,6 +19,7 @@ import { GridItemDrag } from './component/GridItemDrag';
import { HyperlinkDrag } from './component/HyperlinkDrag';
import { ImageDrag } from './component/ImageDrag';
import { ListItemDrag } from './component/ListItemDrag';
+import { MultiSelectDrag } from './component/MultiSelectDrag';
import { TextDrag } from './component/TextDrag';
import { VideoDrag } from './component/VideoDrag';
import Logger from '../../../../util/Logger';
@@ -264,6 +265,9 @@ struct DragEventSample {
IntroductionTitle({ introduction: $r('app.string.griditem') })
GridItemDrag()
+ IntroductionTitle({ introduction: $r('app.string.multiselect') })
+ MultiSelectDrag()
+
IntroductionTitle({ introduction: $r('app.string.listitem') })
ListItemDrag()
diff --git a/code/UI/ArkTsComponentCollection/ComponentCollection/entry/src/main/ets/pages/universal/events/dragEventSample/component/MultiSelectDrag.ets b/code/UI/ArkTsComponentCollection/ComponentCollection/entry/src/main/ets/pages/universal/events/dragEventSample/component/MultiSelectDrag.ets
new file mode 100644
index 000000000..72364d44b
--- /dev/null
+++ b/code/UI/ArkTsComponentCollection/ComponentCollection/entry/src/main/ets/pages/universal/events/dragEventSample/component/MultiSelectDrag.ets
@@ -0,0 +1,103 @@
+/*
+ * Copyright (c) 2023 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import componentSnapshot from '@ohos.arkui.componentSnapshot';
+import image from '@ohos.multimedia.image';
+
+@Component
+export struct MultiSelectDrag {
+ @Styles normalStyles() {
+ .borderColor('#E5E5E1')
+ .opacity(1.0)
+ }
+
+ @Styles selectStyles() {
+ .borderColor('#ff1d0e04')
+ .opacity(0.4)
+ }
+
+ @State number1: number[] = [0, 1, 2, 3, 4];
+ @State number2: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8];
+ @State isSelectedGrid: boolean[] = [false, false, false, false, false, false, false, false, false];
+ @State colors: Color[] =
+ [Color.Red, Color.Blue, Color.Brown, Color.Gray, Color.Green, Color.Gray, Color.Orange, Color.Pink, Color.Yellow];
+ @State previewData: DragItemInfo[] = [{}, {}, {}, {}, {}, {}, {}, {}, {}];
+ @State pixmap: image.PixelMap | undefined = undefined;
+
+ @Builder
+ MenuBuilder() {
+ Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) {
+ Button('Test ContextMenu1')
+ Divider().strokeWidth(2).margin(5).color(Color.Black)
+ Button('Test ContextMenu2')
+ Divider().strokeWidth(2).margin(5).color(Color.Black)
+ Button('Test ContextMenu3')
+ }
+ }
+
+ @Builder
+ createGrid() {
+ Grid() {
+ ForEach(this.number2, (index: number) => {
+ GridItem() {
+ Column()
+ .backgroundColor(this.colors[index])
+ .width('100%')
+ .height(90)
+ .draggable(false)
+ .id(`gridItemId${index}`)
+ }
+ .selectable(true)
+ .selected(this.isSelectedGrid[index])
+ .stateStyles({
+ normal: this.normalStyles,
+ selected: this.selectStyles
+ })
+ .onClick(() => {
+ this.isSelectedGrid[index] = !this.isSelectedGrid[index];
+ if (!this.isSelectedGrid[index]) {
+ componentSnapshot.get(`gridItemId${index}`, (error: Error, pixmap: image.PixelMap) => {
+ this.pixmap = pixmap;
+ this.previewData[index] = {
+ pixelMap: this.pixmap
+ };
+ })
+ }
+ })
+ .dragPreviewOptions({
+ mode: [DragPreviewMode.ENABLE_DEFAULT_SHADOW, DragPreviewMode.ENABLE_DEFAULT_RADIUS]
+ }, { isMultiSelectionEnabled: true, defaultAnimationBeforeLifting: true })
+ .bindContextMenu(this.MenuBuilder, ResponseType.LongPress, { preview: MenuPreviewMode.NONE })
+ .dragPreview(`gridItemId${index}`)
+ .onDragStart(() => {
+
+ })
+ }, (index: string) => index)
+ }
+ .columnsTemplate('1fr 1fr 1fr')
+ .columnsGap(10)
+ .rowsGap(10)
+ .width(290)
+ .backgroundColor(0xFAEEE0)
+ }
+
+ build() {
+ Column() {
+ this.createGrid();
+ }
+ .width('100%')
+ .height(290)
+ }
+}
\ No newline at end of file
diff --git a/code/UI/ArkTsComponentCollection/ComponentCollection/entry/src/main/ets/pages/universal/properties/attributeModifierSample/AttributeModifierSample.ets b/code/UI/ArkTsComponentCollection/ComponentCollection/entry/src/main/ets/pages/universal/properties/attributeModifierSample/AttributeModifierSample.ets
index 646d045b1..4770c301b 100644
--- a/code/UI/ArkTsComponentCollection/ComponentCollection/entry/src/main/ets/pages/universal/properties/attributeModifierSample/AttributeModifierSample.ets
+++ b/code/UI/ArkTsComponentCollection/ComponentCollection/entry/src/main/ets/pages/universal/properties/attributeModifierSample/AttributeModifierSample.ets
@@ -16,6 +16,7 @@
import promptAction from '@ohos.prompt';
import { TitleBar } from '../../../../common/TitleBar';
import { IntroductionTitle } from '../../../../common/IntroductionTitle';
+import { AttributeUpdater, CommonModifier } from '@ohos.arkui.modifier';
@Extend(Button) function MyButtonStyle() {
.margin(8)
@@ -97,6 +98,43 @@ class MyButtonFocusModifier implements AttributeModifier {
}
}
+class MyCommonModifier extends CommonModifier {
+ applyNormalAttribute(instance: CommonAttribute): void {
+ super.applyNormalAttribute?.(instance);
+ }
+
+ public setFirstBorderStyle(): void {
+ this.borderStyle(BorderStyle.Dotted);
+ this.borderWidth(8);
+ }
+
+ public setSecondBorderStyle(): void {
+ this.borderStyle(BorderStyle.Dashed);
+ this.borderWidth(8);
+ }
+}
+
+class MyButtonInitUpdaterModifier extends AttributeUpdater {
+ initializeModifier(instance: ButtonAttribute): void {
+ instance.backgroundColor(Color.Blue)
+ .width('100%');
+ }
+}
+
+class MyTextModifier extends AttributeUpdater {
+ initializeModifier(instance: TextAttribute) {
+ }
+}
+
+@Component
+struct MyModifierImage {
+ @Link modifier: CommonModifier;
+
+ build() {
+ Image($r("app.media.test_image")).attributeModifier(this.modifier as MyCommonModifier);
+ }
+}
+
@Entry
@Component
struct AttributeModifierSample {
@@ -108,35 +146,40 @@ struct AttributeModifierSample {
@State selectValue: boolean = false;
@State selectModifier: MyRadioSelectModifier = new MyRadioSelectModifier();
@State focusedModifier: MyButtonFocusModifier = new MyButtonFocusModifier();
+ @State myModifier: CommonModifier = new MyCommonModifier().width(100).height(100).margin(10);
+ index: number = 0;
+ initModifier: MyButtonInitUpdaterModifier = new MyButtonInitUpdaterModifier();
+ textModifier: MyTextModifier = new MyTextModifier();
build() {
Column() {
TitleBar({ title: $r('app.string.attribute_modifier') })
- Row() {
- Column() {
- IntroductionTitle({ introduction: $r('app.string.select_to_see_status') })
- Row({ space: 10 }) {
- Radio({ value: 'Radio1', group: 'radioGroup1' })
- .checked(this.selectValue)
- .height(40)
- .width(40)
- .borderWidth(0)
- .borderRadius(30)
- .id('radio1')
- .attributeModifier(this.selectModifier)
- .onClick(() => {
- this.selectValue = !this.selectValue;
- })
- }
- .justifyContent(FlexAlign.Center)
- .borderRadius(24)
- .width('100%')
- .backgroundColor(Color.White)
- .margin({ left: 12, right: 12 })
- .padding({ left: 12 })
+ Scroll() {
+ Row() {
+ Column() {
+ IntroductionTitle({ introduction: $r('app.string.select_to_see_status') })
+ Row({ space: 10 }) {
+ Radio({ value: 'Radio1', group: 'radioGroup1' })
+ .checked(this.selectValue)
+ .height(40)
+ .width(40)
+ .borderWidth(0)
+ .borderRadius(30)
+ .id('radio1')
+ .attributeModifier(this.selectModifier)
+ .onClick(() => {
+ this.selectValue = !this.selectValue;
+ })
+ }
+ .justifyContent(FlexAlign.Center)
+ .borderRadius(24)
+ .width('100%')
+ .backgroundColor(Color.White)
+ .margin({ left: 12, right: 12 })
+ .padding({ left: 12 })
- IntroductionTitle({ introduction: $r('app.string.disable_to_see_status') })
- Row({ space: 10 }) {
+ IntroductionTitle({ introduction: $r('app.string.disable_to_see_status') })
+ Row({ space: 10 }) {
Text($r('app.string.button_disabled'))
.fontSize(18)
.margin({ left: 12 })
@@ -157,129 +200,196 @@ struct AttributeModifierSample {
message: 'Button Clicked'
})
})
- }
- .justifyContent(FlexAlign.SpaceBetween)
- .rowStyle()
- .padding({ left: 12, right: 12 })
-
- IntroductionTitle({ introduction: $r('app.string.click_to_see_status') })
- Row({ space: 10 }) {
- Button($r('app.string.component_id_click_to_see_attributeModifier'))
- .MyButtonStyle()
- .id('clickButton')
- .attributeModifier(this.normalModifier)
- .onClick(() => {
- this.normalModifier.isBlue = !this.normalModifier.isBlue;
- })
- }
- .justifyContent(FlexAlign.Center)
- .borderRadius(24)
- .width('100%')
- .backgroundColor(Color.White)
- .margin({ left: 12, right: 12 })
-
- IntroductionTitle({ introduction: $r('app.string.press_to_see_status') })
- Column({ space: 8 }) {
- Button($r('app.string.component_id_press_to_see_attributeModifier'))
- .MyButtonStyle()
- .attributeModifier(this.buttonPressModifier)
- .id('longClickButton')
-
- Row(){
- Text($r('app.string.component_id_press_list_to_see_attributeModifier'))
- .fontSize(18)
}
+ .justifyContent(FlexAlign.SpaceBetween)
+ .rowStyle()
+ .padding({ left: 12, right: 12 })
- List({ space: 5 }) {
- ForEach([1, 2, 3, 4, 5, 6, 7, 8], (item: string) => {
- ListItem() {
- Text(item + "")
- .width('100%')
- .fontSize(18)
- .textAlign(TextAlign.Center)
- }
- .id('ListItem'+item)
- .width('100%')
- .itemCardStyle()
- .attributeModifier(this.listItemPressModifier)
- })
+ IntroductionTitle({ introduction: $r('app.string.click_to_see_status') })
+ Row({ space: 10 }) {
+ Button($r('app.string.component_id_click_to_see_attributeModifier'))
+ .MyButtonStyle()
+ .id('clickButton')
+ .attributeModifier(this.normalModifier)
+ .onClick(() => {
+ this.normalModifier.isBlue = !this.normalModifier.isBlue;
+ })
}
- .height(150)
+ .justifyContent(FlexAlign.Center)
+ .borderRadius(24)
.width('100%')
.backgroundColor(Color.White)
- .padding({ left: 24, right: 24, bottom: 8, top: 8 })
+ .margin({ left: 12, right: 12 })
+
+ IntroductionTitle({ introduction: $r('app.string.press_to_see_status') })
+ Column({ space: 8 }) {
+ Button($r('app.string.component_id_press_to_see_attributeModifier'))
+ .MyButtonStyle()
+ .attributeModifier(this.buttonPressModifier)
+ .id('longClickButton')
+
+ Row() {
+ Text($r('app.string.component_id_press_list_to_see_attributeModifier'))
+ .fontSize(18)
+ }
+
+ List({ space: 5 }) {
+ ForEach([1, 2, 3, 4, 5, 6, 7, 8], (item: string) => {
+ ListItem() {
+ Text(item + "")
+ .width('100%')
+ .fontSize(18)
+ .textAlign(TextAlign.Center)
+ }
+ .id('ListItem' + item)
+ .width('100%')
+ .itemCardStyle()
+ .attributeModifier(this.listItemPressModifier)
+ })
+ }
+ .height(150)
+ .width('100%')
+ .backgroundColor(Color.White)
+ .padding({ left: 24, right: 24, bottom: 8, top: 8 })
+ .borderRadius(24)
+ }
+ .justifyContent(FlexAlign.SpaceBetween)
.borderRadius(24)
- }
- .justifyContent(FlexAlign.SpaceBetween)
- .borderRadius(24)
- .width('100%')
- .backgroundColor(Color.White)
- .margin({ left: 12, right: 12 })
+ .width('100%')
+ .backgroundColor(Color.White)
+ .margin({ left: 12, right: 12 })
- IntroductionTitle({ introduction: $r('app.string.focus_control_tab_status') })
- Row({ space: 20 }) {
- Column({ space: 5 }) {
- Button($r('app.string.focus_control_group1'))
- .id('focusButton1')
- .width(195)
- .height(40)
- .fontColor(Color.White)
- .attributeModifier(this.focusedModifier)
- .focusOnTouch(true) // 该Button组件点击后可获焦
- Row({ space: 5 }) {
- Button()
- .id('focusButton2')
- .width(95)
+ IntroductionTitle({ introduction: $r('app.string.focus_control_tab_status') })
+ Row({ space: 20 }) {
+ Column({ space: 5 }) {
+ Button($r('app.string.focus_control_group1'))
+ .id('focusButton1')
+ .width(195)
.height(40)
- .attributeModifier(this.focusedModifier)
.fontColor(Color.White)
- Button()
- .id('focusButton3')
- .width(95)
- .height(40)
.attributeModifier(this.focusedModifier)
- .fontColor(Color.White)
.focusOnTouch(true) // 该Button组件点击后可获焦
+ Row({ space: 5 }) {
+ Button()
+ .id('focusButton2')
+ .width(95)
+ .height(40)
+ .attributeModifier(this.focusedModifier)
+ .fontColor(Color.White)
+ Button()
+ .id('focusButton3')
+ .width(95)
+ .height(40)
+ .attributeModifier(this.focusedModifier)
+ .fontColor(Color.White)
+ .focusOnTouch(true) // 该Button组件点击后可获焦
+ }
}
- }
- .padding(5)
- .width('45%')
- .borderWidth(2)
- .borderColor(Color.Red)
- .borderStyle(BorderStyle.Dashed)
- .margin({ left: 12 })
- .tabIndex(1) // 该Column组件为按TAB键走焦的第一个获焦的组件
+ .padding(5)
+ .width('45%')
+ .borderWidth(2)
+ .borderColor(Color.Red)
+ .borderStyle(BorderStyle.Dashed)
+ .margin({ left: 12 })
+ .tabIndex(1) // 该Column组件为按TAB键走焦的第一个获焦的组件
- Column({ space: 5 }) {
- Button($r('app.string.focus_control_group2'))
- .width(195)
- .height(40)
- .fontColor(Color.White)
- Row({ space: 5 }) {
- Button()
- .width(95)
+ Column({ space: 5 }) {
+ Button($r('app.string.focus_control_group2'))
+ .width(195)
.height(40)
.fontColor(Color.White)
- Button()
- .width(95)
- .height(40)
- .fontColor(Color.White)
- .groupDefaultFocus(true) // 该Button组件上级Column组件获焦时获焦
+ Row({ space: 5 }) {
+ Button()
+ .width(95)
+ .height(40)
+ .fontColor(Color.White)
+ Button()
+ .width(95)
+ .height(40)
+ .fontColor(Color.White)
+ .groupDefaultFocus(true) // 该Button组件上级Column组件获焦时获焦
+ }
}
+ .padding(5)
+ .margin({ right: 12 })
+ .width('45%')
+ .borderWidth(2)
+ .borderColor(Color.Orange)
+ .borderStyle(BorderStyle.Dashed)
+ .tabIndex(2) // 该Column组件为按TAB键走焦的第二个获焦的组件
}
- .padding(5)
- .margin({ right: 12 })
- .width('45%')
- .borderWidth(2)
- .borderColor(Color.Orange)
- .borderStyle(BorderStyle.Dashed)
- .tabIndex(2) // 该Column组件为按TAB键走焦的第二个获焦的组件
+ .justifyContent(FlexAlign.SpaceBetween)
+ .rowStyle()
+
+ // 组件属性动态设置,多个属性设置同时生效
+ IntroductionTitle({ introduction: $r('app.string.multiple_attribute_take_effect') })
+ Row({ space: 5 }) {
+ Column() {
+ // 点击按钮查看图片边框变化
+ Button($r("app.string.click_to_see_image_border_change"))
+ .MyButtonStyle()
+ .id('clickButton2')
+ .onClick(() => {
+ this.index++;
+ if (this.index % 2 === 1) {
+ (this.myModifier as MyCommonModifier).setFirstBorderStyle();
+ } else {
+ (this.myModifier as MyCommonModifier).setSecondBorderStyle();
+ }
+ })
+ MyModifierImage({ modifier: this.myModifier })
+ }
+ .width('100%')
+ }
+ .justifyContent(FlexAlign.Center)
+
+ // 组件属性动态设置,非状态变量直接触发UI更新
+ IntroductionTitle({ introduction: $r('app.string.dynamical_updates_ui_directly') })
+ Row({ space: 5 }) {
+ Column() {
+ // 点击按钮,动态修改组件初始化设置的属性值
+ Button($r("app.string.click_to_see_component_change"))
+ .MyButtonStyle()
+ .id('initButton')
+ .attributeModifier(this.initModifier)
+ .onClick(() => {
+ this.index++;
+ if (this.index % 2 === 1) {
+ this.initModifier.attribute?.backgroundColor(Color.Red).width('90%');
+ } else {
+ this.initModifier.attribute?.backgroundColor(Color.Pink).width('80%');
+ }
+ })
+ // 点击更新Text组件构造入参"
+ Text($r("app.string.click_to_see_text_component_change"))
+ .id('clickText')
+ .attributeModifier(this.textModifier)
+ .fontColor(Color.White)
+ .fontSize(14)
+ .border({ width: 1 })
+ .textAlign(TextAlign.Center)
+ .lineHeight(20)
+ .width(200)
+ .height(50)
+ .backgroundColor(Color.Blue)
+ .onClick(() => {
+ this.index++;
+ if (this.index % 2 === 1) {
+ this.textModifier.updateConstructorParams("Updated");
+ } else {
+ this.textModifier.updateConstructorParams("Initialize");
+ }
+ })
+ }
+ .width('100%')
+ }
+ .justifyContent(FlexAlign.Center)
+ .rowStyle()
+ .padding({ left: 12, right: 12, bottom: 100 })
}
- .justifyContent(FlexAlign.SpaceBetween)
- .rowStyle()
}
+ .justifyContent(FlexAlign.Center)
}
- .justifyContent(FlexAlign.Center)
}
.height('100%')
.width('100%')
diff --git a/code/UI/ArkTsComponentCollection/ComponentCollection/entry/src/main/resources/base/element/string.json b/code/UI/ArkTsComponentCollection/ComponentCollection/entry/src/main/resources/base/element/string.json
index bd1a2ba58..b18c0f599 100644
--- a/code/UI/ArkTsComponentCollection/ComponentCollection/entry/src/main/resources/base/element/string.json
+++ b/code/UI/ArkTsComponentCollection/ComponentCollection/entry/src/main/resources/base/element/string.json
@@ -848,6 +848,10 @@
"name": "griditem",
"value": "GridItem"
},
+ {
+ "name": "multiselect",
+ "value": "MultiSelect"
+ },
{
"name": "listitem",
"value": "ListItem"
@@ -5958,6 +5962,26 @@
{
"name": "panel_background_color",
"value": "#ffffff"
+ },
+ {
+ "name": "multiple_attribute_take_effect",
+ "value": "Component properties dynamically-set: multiple property Settings take effect at the same time"
+ },
+ {
+ "name": "click_to_see_image_border_change",
+ "value": "Click the button to see the picture border change"
+ },
+ {
+ "name": "dynamical_updates_ui_directly",
+ "value": "Component properties are set dynamically, and non-state variables trigger UI updates directly"
+ },
+ {
+ "name": "click_to_see_component_change",
+ "value": "Click the button to see component property value change"
+ },
+ {
+ "name": "click_to_see_text_component_change",
+ "value": "Click to update the text component construction with the parameter"
}
]
}
diff --git a/code/UI/ArkTsComponentCollection/ComponentCollection/entry/src/main/resources/en/element/string.json b/code/UI/ArkTsComponentCollection/ComponentCollection/entry/src/main/resources/en/element/string.json
index 98ca90195..770322900 100644
--- a/code/UI/ArkTsComponentCollection/ComponentCollection/entry/src/main/resources/en/element/string.json
+++ b/code/UI/ArkTsComponentCollection/ComponentCollection/entry/src/main/resources/en/element/string.json
@@ -760,6 +760,10 @@
"name": "griditem",
"value": "GridItem"
},
+ {
+ "name": "multiselect",
+ "value": "MultiSelect"
+ },
{
"name": "listitem",
"value": "ListItem"
@@ -5954,6 +5958,26 @@
{
"name": "panel_background_color",
"value": "#ffffff"
+ },
+ {
+ "name": "multiple_attribute_take_effect",
+ "value": "Component properties dynamically-set: multiple property Settings take effect at the same time"
+ },
+ {
+ "name": "click_to_see_image_border_change",
+ "value": "Click the button to see the picture border change"
+ },
+ {
+ "name": "dynamical_updates_ui_directly",
+ "value": "Component properties are set dynamically, and non-state variables trigger UI updates directly"
+ },
+ {
+ "name": "click_to_see_component_change",
+ "value": "Click the button to see component property value change"
+ },
+ {
+ "name": "click_to_see_text_component_change",
+ "value": "Click to update the text component construction with the parameter"
}
]
}
diff --git a/code/UI/ArkTsComponentCollection/ComponentCollection/entry/src/main/resources/zh/element/string.json b/code/UI/ArkTsComponentCollection/ComponentCollection/entry/src/main/resources/zh/element/string.json
index 95305dfcb..dc67a9012 100644
--- a/code/UI/ArkTsComponentCollection/ComponentCollection/entry/src/main/resources/zh/element/string.json
+++ b/code/UI/ArkTsComponentCollection/ComponentCollection/entry/src/main/resources/zh/element/string.json
@@ -648,6 +648,10 @@
"name": "griditem",
"value": "GridItem"
},
+ {
+ "name": "multiselect",
+ "value": "MultiSelect"
+ },
{
"name": "listitem",
"value": "ListItem"
@@ -5956,6 +5960,26 @@
{
"name": "panel_background_color",
"value": "#ffffff"
+ },
+ {
+ "name": "multiple_attribute_take_effect",
+ "value": "组件属性动态设置,多个属性设置同时生效"
+ },
+ {
+ "name": "click_to_see_image_border_change",
+ "value": "点击按钮查看图片边框变化"
+ },
+ {
+ "name": "dynamical_updates_ui_directly",
+ "value": "组件属性动态设置,非状态变量直接触发UI更新"
+ },
+ {
+ "name": "click_to_see_component_change",
+ "value": "点击按钮修改组件属性值"
+ },
+ {
+ "name": "click_to_see_text_component_change",
+ "value": "点击更新Text组件构造入参"
}
]
}
diff --git a/code/UI/ArkTsComponentCollection/ComponentCollection/entry/src/ohosTest/ets/test/Ability.test.ets b/code/UI/ArkTsComponentCollection/ComponentCollection/entry/src/ohosTest/ets/test/Ability.test.ets
index cf592645b..6e8700449 100644
--- a/code/UI/ArkTsComponentCollection/ComponentCollection/entry/src/ohosTest/ets/test/Ability.test.ets
+++ b/code/UI/ArkTsComponentCollection/ComponentCollection/entry/src/ohosTest/ets/test/Ability.test.ets
@@ -3534,6 +3534,16 @@ export default function abilityTest() {
// 滑动slider调整 固定坐标只支持RK3568,其他设备需要调整
await driver.drag(660, 600, 660, 0);
+ await checkButtonAndClickWithID('gridItemId0');
+ await checkButtonAndClickWithID('gridItemId1');
+ await checkButtonAndClickWithID('gridItemId3');
+ await checkButtonAndClickWithID('gridItemId4');
+ let gridItemId8 = await driver.findComponent(ON.id('gridItemId8'));
+ await checkButtonAndDragToTargetWithID('gridItemId0', gridItemId8);
+
+ // 滑动slider调整 固定坐标只支持RK3568,其他设备需要调整
+ await driver.drag(660, 600, 660, 0);
+ await driver.drag(660, 400, 660, 0);
await checkButtonAndDragToTargetWithID('listItem0', column);
await checkButtonAndDragToTargetWithID('hyperlink', column);
await checkButtonAndDragToTargetWithID('text', column);
@@ -3642,7 +3652,7 @@ export default function abilityTest() {
await smallBtn.click();
await driver.delayMs(DELAY_TIME);
await driver.assertComponentExist(ON.text(await manager.getStringValue($r('app.string.custom_smallcircle_prompt'))));
-
+
Logger.info(BUNDLE + testName + ' end');
});
@@ -4328,6 +4338,12 @@ export default function abilityTest() {
await checkButtonAndClickWithID('clickButton');
await checkButtonAndClickWithID('longClickButton');
await checkButtonAndClickWithID('ListItem2');
+
+ await driver.drag(200, 800, 200, 50, 800);
+ await checkButtonAndClickWithID('clickButton2');
+ await checkButtonAndClickWithID('initButton');
+ await checkButtonAndClickWithID('clickText');
+
// 返回
await checkButtonAndClickWithID('backBtn');
await driver.delayMs(DELAY_TIME_FiVE);
diff --git a/code/UI/ArkTsComponentCollection/ComponentCollection/lib/DragEvent-1.0.0.hap b/code/UI/ArkTsComponentCollection/ComponentCollection/lib/DragEvent-1.0.0.hap
index f6c4035df..fff887cee 100644
Binary files a/code/UI/ArkTsComponentCollection/ComponentCollection/lib/DragEvent-1.0.0.hap and b/code/UI/ArkTsComponentCollection/ComponentCollection/lib/DragEvent-1.0.0.hap differ
diff --git a/code/UI/ArkTsComponentCollection/ComponentCollection/lib/DragEvent-1.0.0.tgz b/code/UI/ArkTsComponentCollection/ComponentCollection/lib/DragEvent-1.0.0.tgz
index d3d5e89c9..4b4e30522 100644
--- a/code/UI/ArkTsComponentCollection/ComponentCollection/lib/DragEvent-1.0.0.tgz
+++ b/code/UI/ArkTsComponentCollection/ComponentCollection/lib/DragEvent-1.0.0.tgz
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:e2df19571b29e18d76a32b3b03f45b5ab42d7c45e8c0613086d4f042181df2d8
-size 57525
+oid sha256:6663f52850502eca4dc2ed5c3a46159f4da87316d487f7971a454cb133743c3a
+size 59871
diff --git a/code/UI/ArkTsComponentCollection/ComponentCollection/ohosTest.md b/code/UI/ArkTsComponentCollection/ComponentCollection/ohosTest.md
index aa70671c3..d00377a03 100644
--- a/code/UI/ArkTsComponentCollection/ComponentCollection/ohosTest.md
+++ b/code/UI/ArkTsComponentCollection/ComponentCollection/ohosTest.md
@@ -43,7 +43,7 @@
| 验证TarBar 进入通用 | 在组件页面 | 点击下方tab通用 | 跳转到通用页面 | 是 | Pass |
| 验证onClick 点击事件 | | 点击200,300的坐标 | 正确响应点击,显示点击信息 | 是 | Pass |
| 验证触摸事件 | | 拖动区域(100, 300, 300, 280) | 正确响应拖动 | 是 | Pass |
-| 验证拖拽事件 | | 依次拖拽应用图标、GridItem、ListItem、Hyperlink、Text、Image、Video、FormComponent | 正确响应拖动 | 是 | Pass |
+| 验证拖拽事件 | | 依次拖拽应用图标、GridItem、MultiSelect、ListItem、Hyperlink、Text、Image、Video、FormComponent | 正确响应拖动 | 是 | Pass |
| 验证组件区域变化事件 | | 调整宽度,高度 | 正确约束小球运动范围 | 是 | Pass |
| 验证SafeArea 安全区域 | 进入SafeArea 安全区域 | 调整安全区域扩展的类型和方向 | 正确显示效果 | 是 | Pass |
| 验证foreground 前景 | | 进入foreground 前景 | 正确显示背景 | 是 | Pass |
@@ -87,6 +87,7 @@
| 验证组件标识 | | 任意点击按钮 | 正确显示效果 | 是 | Pass |
| 验证组件背景模糊 | | 进入组件背景模糊 | 正确显示效果 | 是 | Pass |
| 验证分布式迁移标识 | | 进入分布式迁移标识 | 正确显示效果 | 是 | Pass |
+| 验证动态属性设置 | | 进入动态属性设置 | 点击和按压页面中的按钮和选项,正确显示效果 | 是 | Pass |
| 验证绑定手势方法 | | 点击黑色框 | 正确显示效果 | 是 | Pass |
| 验证组合手势方法 | | 手指触摸长按黑色框再拖动 | 正确显示效果 | 否 | Pass |
| 验证多任务 | 展开转场动画,进入多任务 | 滑动多任务,上滑一个图片item | 多任务滑动,上滑删除,正常展示动画 | 是 | Pass |