@wxbot/wechat-api-sdk 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +233 -0
- package/dist/geweChat/gewe/apiCore/geweBaseApi.d.ts +17 -0
- package/dist/geweChat/gewe/apiCore/geweBaseApi.d.ts.map +1 -0
- package/dist/geweChat/gewe/apiCore/geweBaseApi.js +59 -0
- package/dist/geweChat/gewe/apiCore/geweBaseApi.js.map +1 -0
- package/dist/geweChat/gewe/clientApi/geweMessage.d.ts +33 -0
- package/dist/geweChat/gewe/clientApi/geweMessage.d.ts.map +1 -0
- package/dist/geweChat/gewe/clientApi/geweMessage.js +216 -0
- package/dist/geweChat/gewe/clientApi/geweMessage.js.map +1 -0
- package/dist/geweChat/gewe/clientApi/gewe_Api.d.ts +14 -0
- package/dist/geweChat/gewe/clientApi/gewe_Api.d.ts.map +1 -0
- package/dist/geweChat/gewe/clientApi/gewe_Api.js +24 -0
- package/dist/geweChat/gewe/clientApi/gewe_Api.js.map +1 -0
- package/dist/geweChat/gewe/clientApi/gewe_ChatRoom.d.ts +15 -0
- package/dist/geweChat/gewe/clientApi/gewe_ChatRoom.d.ts.map +1 -0
- package/dist/geweChat/gewe/clientApi/gewe_ChatRoom.js +125 -0
- package/dist/geweChat/gewe/clientApi/gewe_ChatRoom.js.map +1 -0
- package/dist/geweChat/gewe/clientApi/gewe_Friend.d.ts +17 -0
- package/dist/geweChat/gewe/clientApi/gewe_Friend.d.ts.map +1 -0
- package/dist/geweChat/gewe/clientApi/gewe_Friend.js +110 -0
- package/dist/geweChat/gewe/clientApi/gewe_Friend.js.map +1 -0
- package/dist/geweChat/gewe/clientApi/gewe_Login.d.ts +27 -0
- package/dist/geweChat/gewe/clientApi/gewe_Login.d.ts.map +1 -0
- package/dist/geweChat/gewe/clientApi/gewe_Login.js +119 -0
- package/dist/geweChat/gewe/clientApi/gewe_Login.js.map +1 -0
- package/dist/geweChat/gewe/clientApi/gewe_Tools.d.ts +13 -0
- package/dist/geweChat/gewe/clientApi/gewe_Tools.d.ts.map +1 -0
- package/dist/geweChat/gewe/clientApi/gewe_Tools.js +45 -0
- package/dist/geweChat/gewe/clientApi/gewe_Tools.js.map +1 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +11 -0
- package/dist/index.js.map +1 -0
- package/dist/protocolTypes.d.ts +12 -0
- package/dist/protocolTypes.d.ts.map +1 -0
- package/dist/protocolTypes.js +11 -0
- package/dist/protocolTypes.js.map +1 -0
- package/dist/utils/gameCore.d.ts +7 -0
- package/dist/utils/gameCore.d.ts.map +1 -0
- package/dist/utils/gameCore.js +26 -0
- package/dist/utils/gameCore.js.map +1 -0
- package/dist/utils/index.d.ts +14 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/index.js +150 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/linq.d.ts +108 -0
- package/dist/utils/linq.d.ts.map +1 -0
- package/dist/utils/linq.js +24 -0
- package/dist/utils/linq.js.map +1 -0
- package/dist/weChatBase/EventBus.d.ts +10 -0
- package/dist/weChatBase/EventBus.d.ts.map +1 -0
- package/dist/weChatBase/EventBus.js +32 -0
- package/dist/weChatBase/EventBus.js.map +1 -0
- package/dist/weChatBase/entity/chatMemberInfo.d.ts +12 -0
- package/dist/weChatBase/entity/chatMemberInfo.d.ts.map +1 -0
- package/dist/weChatBase/entity/chatMemberInfo.js +7 -0
- package/dist/weChatBase/entity/chatMemberInfo.js.map +1 -0
- package/dist/weChatBase/entity/simpleSession.d.ts +24 -0
- package/dist/weChatBase/entity/simpleSession.d.ts.map +1 -0
- package/dist/weChatBase/entity/simpleSession.js +8 -0
- package/dist/weChatBase/entity/simpleSession.js.map +1 -0
- package/dist/weChatBase/interface/weChatApiBase.d.ts +14 -0
- package/dist/weChatBase/interface/weChatApiBase.d.ts.map +1 -0
- package/dist/weChatBase/interface/weChatApiBase.js +9 -0
- package/dist/weChatBase/interface/weChatApiBase.js.map +1 -0
- package/dist/weChatBase/interface/weChatBase.d.ts +7 -0
- package/dist/weChatBase/interface/weChatBase.d.ts.map +1 -0
- package/dist/weChatBase/interface/weChatBase.js +12 -0
- package/dist/weChatBase/interface/weChatBase.js.map +1 -0
- package/dist/weChatBase/interface/weChatChatRoomBase.d.ts +33 -0
- package/dist/weChatBase/interface/weChatChatRoomBase.d.ts.map +1 -0
- package/dist/weChatBase/interface/weChatChatRoomBase.js +9 -0
- package/dist/weChatBase/interface/weChatChatRoomBase.js.map +1 -0
- package/dist/weChatBase/interface/weChatFriendBase.d.ts +47 -0
- package/dist/weChatBase/interface/weChatFriendBase.d.ts.map +1 -0
- package/dist/weChatBase/interface/weChatFriendBase.js +9 -0
- package/dist/weChatBase/interface/weChatFriendBase.js.map +1 -0
- package/dist/weChatBase/interface/weChatLoginBase.d.ts +70 -0
- package/dist/weChatBase/interface/weChatLoginBase.d.ts.map +1 -0
- package/dist/weChatBase/interface/weChatLoginBase.js +9 -0
- package/dist/weChatBase/interface/weChatLoginBase.js.map +1 -0
- package/dist/weChatBase/interface/weChatMessageBase.d.ts +98 -0
- package/dist/weChatBase/interface/weChatMessageBase.d.ts.map +1 -0
- package/dist/weChatBase/interface/weChatMessageBase.js +15 -0
- package/dist/weChatBase/interface/weChatMessageBase.js.map +1 -0
- package/dist/weChatBase/interface/weChatToolsBase.d.ts +26 -0
- package/dist/weChatBase/interface/weChatToolsBase.d.ts.map +1 -0
- package/dist/weChatBase/interface/weChatToolsBase.js +8 -0
- package/dist/weChatBase/interface/weChatToolsBase.js.map +1 -0
- package/dist/weChatBase/request/chatRoom/wxGetChatroomInfoRequest.d.ts +31 -0
- package/dist/weChatBase/request/chatRoom/wxGetChatroomInfoRequest.d.ts.map +1 -0
- package/dist/weChatBase/request/chatRoom/wxGetChatroomInfoRequest.js +16 -0
- package/dist/weChatBase/request/chatRoom/wxGetChatroomInfoRequest.js.map +1 -0
- package/dist/weChatBase/request/chatRoom/wxGetChatroomMemberInfoRequest.d.ts +38 -0
- package/dist/weChatBase/request/chatRoom/wxGetChatroomMemberInfoRequest.d.ts.map +1 -0
- package/dist/weChatBase/request/chatRoom/wxGetChatroomMemberInfoRequest.js +16 -0
- package/dist/weChatBase/request/chatRoom/wxGetChatroomMemberInfoRequest.js.map +1 -0
- package/dist/weChatBase/request/chatRoom/wxGetChatroomMemberListRequest.d.ts +11 -0
- package/dist/weChatBase/request/chatRoom/wxGetChatroomMemberListRequest.d.ts.map +1 -0
- package/dist/weChatBase/request/chatRoom/wxGetChatroomMemberListRequest.js +10 -0
- package/dist/weChatBase/request/chatRoom/wxGetChatroomMemberListRequest.js.map +1 -0
- package/dist/weChatBase/request/chatRoom/wxGetChatroomQRCodeRequest.d.ts +9 -0
- package/dist/weChatBase/request/chatRoom/wxGetChatroomQRCodeRequest.d.ts.map +1 -0
- package/dist/weChatBase/request/chatRoom/wxGetChatroomQRCodeRequest.js +10 -0
- package/dist/weChatBase/request/chatRoom/wxGetChatroomQRCodeRequest.js.map +1 -0
- package/dist/weChatBase/request/friend/friendPassVerifyRequest.d.ts +10 -0
- package/dist/weChatBase/request/friend/friendPassVerifyRequest.d.ts.map +1 -0
- package/dist/weChatBase/request/friend/friendPassVerifyRequest.js +14 -0
- package/dist/weChatBase/request/friend/friendPassVerifyRequest.js.map +1 -0
- package/dist/weChatBase/request/friend/getContactListRequest.d.ts +17 -0
- package/dist/weChatBase/request/friend/getContactListRequest.d.ts.map +1 -0
- package/dist/weChatBase/request/friend/getContactListRequest.js +20 -0
- package/dist/weChatBase/request/friend/getContactListRequest.js.map +1 -0
- package/dist/weChatBase/request/friend/getContactRequest.d.ts +5 -0
- package/dist/weChatBase/request/friend/getContactRequest.d.ts.map +1 -0
- package/dist/weChatBase/request/friend/getContactRequest.js +10 -0
- package/dist/weChatBase/request/friend/getContactRequest.js.map +1 -0
- package/dist/weChatBase/request/friend/wxGetContractDetailRequest.d.ts +9 -0
- package/dist/weChatBase/request/friend/wxGetContractDetailRequest.d.ts.map +1 -0
- package/dist/weChatBase/request/friend/wxGetContractDetailRequest.js +10 -0
- package/dist/weChatBase/request/friend/wxGetContractDetailRequest.js.map +1 -0
- package/dist/weChatBase/request/friend/wxSearchContactRequest.d.ts +19 -0
- package/dist/weChatBase/request/friend/wxSearchContactRequest.d.ts.map +1 -0
- package/dist/weChatBase/request/friend/wxSearchContactRequest.js +13 -0
- package/dist/weChatBase/request/friend/wxSearchContactRequest.js.map +1 -0
- package/dist/weChatBase/request/friend/wxUploadContactRequest.d.ts +6 -0
- package/dist/weChatBase/request/friend/wxUploadContactRequest.d.ts.map +1 -0
- package/dist/weChatBase/request/friend/wxUploadContactRequest.js +7 -0
- package/dist/weChatBase/request/friend/wxUploadContactRequest.js.map +1 -0
- package/dist/weChatBase/request/login/wxAutoHeartBeatRequest.d.ts +6 -0
- package/dist/weChatBase/request/login/wxAutoHeartBeatRequest.d.ts.map +1 -0
- package/dist/weChatBase/request/login/wxAutoHeartBeatRequest.js +10 -0
- package/dist/weChatBase/request/login/wxAutoHeartBeatRequest.js.map +1 -0
- package/dist/weChatBase/request/login/wxAwakenRequest.d.ts +7 -0
- package/dist/weChatBase/request/login/wxAwakenRequest.d.ts.map +1 -0
- package/dist/weChatBase/request/login/wxAwakenRequest.js +10 -0
- package/dist/weChatBase/request/login/wxAwakenRequest.js.map +1 -0
- package/dist/weChatBase/request/login/wxCheckOnlineRequest.d.ts +6 -0
- package/dist/weChatBase/request/login/wxCheckOnlineRequest.d.ts.map +1 -0
- package/dist/weChatBase/request/login/wxCheckOnlineRequest.js +10 -0
- package/dist/weChatBase/request/login/wxCheckOnlineRequest.js.map +1 -0
- package/dist/weChatBase/request/login/wxDialogLoginRequest.d.ts +11 -0
- package/dist/weChatBase/request/login/wxDialogLoginRequest.d.ts.map +1 -0
- package/dist/weChatBase/request/login/wxDialogLoginRequest.js +10 -0
- package/dist/weChatBase/request/login/wxDialogLoginRequest.js.map +1 -0
- package/dist/weChatBase/request/login/wxGetLoginQrCodeRequest.d.ts +36 -0
- package/dist/weChatBase/request/login/wxGetLoginQrCodeRequest.d.ts.map +1 -0
- package/dist/weChatBase/request/login/wxGetLoginQrCodeRequest.js +28 -0
- package/dist/weChatBase/request/login/wxGetLoginQrCodeRequest.js.map +1 -0
- package/dist/weChatBase/request/login/wxGetLoginQrStatus.d.ts +30 -0
- package/dist/weChatBase/request/login/wxGetLoginQrStatus.d.ts.map +1 -0
- package/dist/weChatBase/request/login/wxGetLoginQrStatus.js +16 -0
- package/dist/weChatBase/request/login/wxGetLoginQrStatus.js.map +1 -0
- package/dist/weChatBase/request/login/wxGetOnlineStatusRequest.d.ts +6 -0
- package/dist/weChatBase/request/login/wxGetOnlineStatusRequest.d.ts.map +1 -0
- package/dist/weChatBase/request/login/wxGetOnlineStatusRequest.js +10 -0
- package/dist/weChatBase/request/login/wxGetOnlineStatusRequest.js.map +1 -0
- package/dist/weChatBase/request/login/wxHeartBeatRequest.d.ts +6 -0
- package/dist/weChatBase/request/login/wxHeartBeatRequest.d.ts.map +1 -0
- package/dist/weChatBase/request/login/wxHeartBeatRequest.js +10 -0
- package/dist/weChatBase/request/login/wxHeartBeatRequest.js.map +1 -0
- package/dist/weChatBase/request/login/wxLogOutRequest.d.ts +8 -0
- package/dist/weChatBase/request/login/wxLogOutRequest.d.ts.map +1 -0
- package/dist/weChatBase/request/login/wxLogOutRequest.js +10 -0
- package/dist/weChatBase/request/login/wxLogOutRequest.js.map +1 -0
- package/dist/weChatBase/request/login/wxReconnectionRequest.d.ts +5 -0
- package/dist/weChatBase/request/login/wxReconnectionRequest.d.ts.map +1 -0
- package/dist/weChatBase/request/login/wxReconnectionRequest.js +10 -0
- package/dist/weChatBase/request/login/wxReconnectionRequest.js.map +1 -0
- package/dist/weChatBase/request/login/wxTwiceAutoAuthRequest.d.ts +6 -0
- package/dist/weChatBase/request/login/wxTwiceAutoAuthRequest.d.ts.map +1 -0
- package/dist/weChatBase/request/login/wxTwiceAutoAuthRequest.js +10 -0
- package/dist/weChatBase/request/login/wxTwiceAutoAuthRequest.js.map +1 -0
- package/dist/weChatBase/request/message/syncMessageRequest.d.ts +8 -0
- package/dist/weChatBase/request/message/syncMessageRequest.d.ts.map +1 -0
- package/dist/weChatBase/request/message/syncMessageRequest.js +10 -0
- package/dist/weChatBase/request/message/syncMessageRequest.js.map +1 -0
- package/dist/weChatBase/request/message/wxForwardImageRequest.d.ts +19 -0
- package/dist/weChatBase/request/message/wxForwardImageRequest.d.ts.map +1 -0
- package/dist/weChatBase/request/message/wxForwardImageRequest.js +10 -0
- package/dist/weChatBase/request/message/wxForwardImageRequest.js.map +1 -0
- package/dist/weChatBase/request/message/wxRevokeMsgRequest.d.ts +11 -0
- package/dist/weChatBase/request/message/wxRevokeMsgRequest.d.ts.map +1 -0
- package/dist/weChatBase/request/message/wxRevokeMsgRequest.js +10 -0
- package/dist/weChatBase/request/message/wxRevokeMsgRequest.js.map +1 -0
- package/dist/weChatBase/request/message/wxSendAppRequest.d.ts +13 -0
- package/dist/weChatBase/request/message/wxSendAppRequest.d.ts.map +1 -0
- package/dist/weChatBase/request/message/wxSendAppRequest.js +10 -0
- package/dist/weChatBase/request/message/wxSendAppRequest.js.map +1 -0
- package/dist/weChatBase/request/message/wxSendCardRequest.d.ts +14 -0
- package/dist/weChatBase/request/message/wxSendCardRequest.d.ts.map +1 -0
- package/dist/weChatBase/request/message/wxSendCardRequest.js +10 -0
- package/dist/weChatBase/request/message/wxSendCardRequest.js.map +1 -0
- package/dist/weChatBase/request/message/wxSendEmojiRequest.d.ts +15 -0
- package/dist/weChatBase/request/message/wxSendEmojiRequest.d.ts.map +1 -0
- package/dist/weChatBase/request/message/wxSendEmojiRequest.js +10 -0
- package/dist/weChatBase/request/message/wxSendEmojiRequest.js.map +1 -0
- package/dist/weChatBase/request/message/wxSendFileRequest.d.ts +14 -0
- package/dist/weChatBase/request/message/wxSendFileRequest.d.ts.map +1 -0
- package/dist/weChatBase/request/message/wxSendFileRequest.js +10 -0
- package/dist/weChatBase/request/message/wxSendFileRequest.js.map +1 -0
- package/dist/weChatBase/request/message/wxSendImageRequest.d.ts +19 -0
- package/dist/weChatBase/request/message/wxSendImageRequest.d.ts.map +1 -0
- package/dist/weChatBase/request/message/wxSendImageRequest.js +10 -0
- package/dist/weChatBase/request/message/wxSendImageRequest.js.map +1 -0
- package/dist/weChatBase/request/message/wxSendLinkRequest.d.ts +16 -0
- package/dist/weChatBase/request/message/wxSendLinkRequest.d.ts.map +1 -0
- package/dist/weChatBase/request/message/wxSendLinkRequest.js +10 -0
- package/dist/weChatBase/request/message/wxSendLinkRequest.js.map +1 -0
- package/dist/weChatBase/request/message/wxSendLocationRequest.d.ts +5 -0
- package/dist/weChatBase/request/message/wxSendLocationRequest.d.ts.map +1 -0
- package/dist/weChatBase/request/message/wxSendLocationRequest.js +10 -0
- package/dist/weChatBase/request/message/wxSendLocationRequest.js.map +1 -0
- package/dist/weChatBase/request/message/wxSendTxtRequest.d.ts +9 -0
- package/dist/weChatBase/request/message/wxSendTxtRequest.d.ts.map +1 -0
- package/dist/weChatBase/request/message/wxSendTxtRequest.js +10 -0
- package/dist/weChatBase/request/message/wxSendTxtRequest.js.map +1 -0
- package/dist/weChatBase/request/message/wxSendVideoRequest.d.ts +18 -0
- package/dist/weChatBase/request/message/wxSendVideoRequest.d.ts.map +1 -0
- package/dist/weChatBase/request/message/wxSendVideoRequest.js +10 -0
- package/dist/weChatBase/request/message/wxSendVideoRequest.js.map +1 -0
- package/dist/weChatBase/request/message/wxSendVoiceRequest.d.ts +14 -0
- package/dist/weChatBase/request/message/wxSendVoiceRequest.d.ts.map +1 -0
- package/dist/weChatBase/request/message/wxSendVoiceRequest.js +10 -0
- package/dist/weChatBase/request/message/wxSendVoiceRequest.js.map +1 -0
- package/dist/weChatBase/request/tools/wxDownloadImgRequest.d.ts +9 -0
- package/dist/weChatBase/request/tools/wxDownloadImgRequest.d.ts.map +1 -0
- package/dist/weChatBase/request/tools/wxDownloadImgRequest.js +14 -0
- package/dist/weChatBase/request/tools/wxDownloadImgRequest.js.map +1 -0
- package/dist/weChatBase/request/tools/wxEmojiDownloadRequest.d.ts +8 -0
- package/dist/weChatBase/request/tools/wxEmojiDownloadRequest.d.ts.map +1 -0
- package/dist/weChatBase/request/tools/wxEmojiDownloadRequest.js +10 -0
- package/dist/weChatBase/request/tools/wxEmojiDownloadRequest.js.map +1 -0
- package/dist/weChatBase/request/tools/wxSetWebhookRequest.d.ts +7 -0
- package/dist/weChatBase/request/tools/wxSetWebhookRequest.d.ts.map +1 -0
- package/dist/weChatBase/request/tools/wxSetWebhookRequest.js +10 -0
- package/dist/weChatBase/request/tools/wxSetWebhookRequest.js.map +1 -0
- package/dist/weChatBase/request/tools/wxUploadFileRequest.d.ts +7 -0
- package/dist/weChatBase/request/tools/wxUploadFileRequest.d.ts.map +1 -0
- package/dist/weChatBase/request/tools/wxUploadFileRequest.js +10 -0
- package/dist/weChatBase/request/tools/wxUploadFileRequest.js.map +1 -0
- package/dist/weChatBase/type/opCode.d.ts +7 -0
- package/dist/weChatBase/type/opCode.d.ts.map +1 -0
- package/dist/weChatBase/type/opCode.js +16 -0
- package/dist/weChatBase/type/opCode.js.map +1 -0
- package/dist/weChatBase/type/scene.d.ts +15 -0
- package/dist/weChatBase/type/scene.d.ts.map +1 -0
- package/dist/weChatBase/type/scene.js +32 -0
- package/dist/weChatBase/type/scene.js.map +1 -0
- package/dist/weChatBase/utils/xmlParser.d.ts +11 -0
- package/dist/weChatBase/utils/xmlParser.d.ts.map +1 -0
- package/dist/weChatBase/utils/xmlParser.js +106 -0
- package/dist/weChatBase/utils/xmlParser.js.map +1 -0
- package/dist/weChatBase/weChatAPIClientBase.d.ts +32 -0
- package/dist/weChatBase/weChatAPIClientBase.d.ts.map +1 -0
- package/dist/weChatBase/weChatAPIClientBase.js +92 -0
- package/dist/weChatBase/weChatAPIClientBase.js.map +1 -0
- package/dist/weChatBase/weChatMessage/weChatMessageType.d.ts +14 -0
- package/dist/weChatBase/weChatMessage/weChatMessageType.d.ts.map +1 -0
- package/dist/weChatBase/weChatMessage/weChatMessageType.js +29 -0
- package/dist/weChatBase/weChatMessage/weChatMessageType.js.map +1 -0
- package/dist/weChatBase/weChatMessage/weChatMsgBase.d.ts +34 -0
- package/dist/weChatBase/weChatMessage/weChatMsgBase.d.ts.map +1 -0
- package/dist/weChatBase/weChatMessage/weChatMsgBase.js +239 -0
- package/dist/weChatBase/weChatMessage/weChatMsgBase.js.map +1 -0
- package/dist/weChatBase/weChatResult.d.ts +10 -0
- package/dist/weChatBase/weChatResult.d.ts.map +1 -0
- package/dist/weChatBase/weChatResult.js +44 -0
- package/dist/weChatBase/weChatResult.js.map +1 -0
- package/dist/wechatApi.d.ts +11 -0
- package/dist/wechatApi.d.ts.map +1 -0
- package/dist/wechatApi.js +23 -0
- package/dist/wechatApi.js.map +1 -0
- package/package.json +46 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gameCore.js","sourceRoot":"","sources":["../../src/utils/gameCore.ts"],"names":[],"mappings":";AAAA,QAAQ;;;AAQR,QAAQ;AACD,MAAM,UAAU,GAAG,CAAC,MAAe,EAAE,EAAE;IAE1C,QAAQ;IACR,MAAM,gBAAgB,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,KAAK,EAAE,EAAE,CAAC,GAAG,GAAG,KAAK,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC;IACnF,IAAI,gBAAgB,IAAI,CAAC,EAAE,CAAC;QACxB,MAAM,IAAI,KAAK,CAAC,UAAU,CAAC,CAAC;IAChC,CAAC;IAED,QAAQ;IACR,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC;IAE7B,cAAc;IACd,IAAI,qBAAqB,GAAG,CAAC,CAAC;IAC9B,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE,CAAC;QACzB,qBAAqB,IAAI,KAAK,CAAC,WAAW,CAAC;QAC3C,IAAI,MAAM,GAAG,qBAAqB,EAAE,CAAC;YACjC,OAAO,KAAK,CAAC;QACjB,CAAC;IACL,CAAC;IAED,gBAAgB;IAChB,OAAO,IAAI,CAAC;AAChB,CAAC,CAAA;AAtBY,QAAA,UAAU,cAsBtB"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare const delay: (ms: number) => Promise<unknown>;
|
|
2
|
+
/**
|
|
3
|
+
* 异步遍历集合
|
|
4
|
+
* @param list 遍历的对象
|
|
5
|
+
* @param dataFun 数据处理函数,返回true 继续循环,返回false 停止循环
|
|
6
|
+
*/
|
|
7
|
+
export declare const SyncEach: <T>(list: Array<T>, dataFun: (data: T) => Promise<boolean>) => Promise<void>;
|
|
8
|
+
export declare const getLocalIP: () => any;
|
|
9
|
+
/**
|
|
10
|
+
* 简单的 XML 到 JSON 转换工具(零依赖实现)
|
|
11
|
+
* 用于解析微信消息中的 XML 数据
|
|
12
|
+
*/
|
|
13
|
+
export declare const getXml2Json: (xmlStr: string) => any;
|
|
14
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAkBA,eAAO,MAAM,KAAK,GAAI,IAAI,MAAM,qBAE/B,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,QAAQ,GAAmB,CAAC,EACvC,MAAM,KAAK,CAAC,CAAC,CAAC,EACd,SAAS,CAAC,IAAI,EAAE,CAAC,KAAK,OAAO,CAAC,OAAO,CAAC,kBAOvC,CAAC;AAEF,eAAO,MAAM,UAAU,WActB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,WAAW,GAAI,QAAQ,MAAM,KAAG,GAe5C,CAAC"}
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.getXml2Json = exports.getLocalIP = exports.SyncEach = exports.delay = void 0;
|
|
7
|
+
const os_1 = __importDefault(require("os"));
|
|
8
|
+
const SyncEachWarpe = async function (tempList, dataFun) {
|
|
9
|
+
var obj = tempList.shift();
|
|
10
|
+
var continueFun = true;
|
|
11
|
+
if (obj) {
|
|
12
|
+
continueFun = await dataFun(obj);
|
|
13
|
+
}
|
|
14
|
+
if (continueFun && tempList.length > 0) {
|
|
15
|
+
return SyncEachWarpe(tempList, dataFun);
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
//异步延迟执行
|
|
19
|
+
const delay = (ms) => {
|
|
20
|
+
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
21
|
+
};
|
|
22
|
+
exports.delay = delay;
|
|
23
|
+
/**
|
|
24
|
+
* 异步遍历集合
|
|
25
|
+
* @param list 遍历的对象
|
|
26
|
+
* @param dataFun 数据处理函数,返回true 继续循环,返回false 停止循环
|
|
27
|
+
*/
|
|
28
|
+
const SyncEach = async function (list, dataFun) {
|
|
29
|
+
if (!list || list.length < 1) {
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
var tempList = list.slice(0);
|
|
33
|
+
return SyncEachWarpe(tempList, dataFun);
|
|
34
|
+
};
|
|
35
|
+
exports.SyncEach = SyncEach;
|
|
36
|
+
const getLocalIP = () => {
|
|
37
|
+
const interfaces = os_1.default.networkInterfaces();
|
|
38
|
+
const addresses = [];
|
|
39
|
+
for (const iface of Object.values(interfaces)) {
|
|
40
|
+
for (const addr of iface) {
|
|
41
|
+
if (addr.family === "IPv4" && !addr.internal) {
|
|
42
|
+
addresses.push(addr.address);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
if (addresses.length > 0) {
|
|
47
|
+
return addresses[0];
|
|
48
|
+
}
|
|
49
|
+
return "127.0.0.1";
|
|
50
|
+
};
|
|
51
|
+
exports.getLocalIP = getLocalIP;
|
|
52
|
+
/**
|
|
53
|
+
* 简单的 XML 到 JSON 转换工具(零依赖实现)
|
|
54
|
+
* 用于解析微信消息中的 XML 数据
|
|
55
|
+
*/
|
|
56
|
+
const getXml2Json = (xmlStr) => {
|
|
57
|
+
if (!xmlStr || typeof xmlStr !== 'string') {
|
|
58
|
+
return {};
|
|
59
|
+
}
|
|
60
|
+
try {
|
|
61
|
+
// 移除 XML 声明
|
|
62
|
+
xmlStr = xmlStr.replace(/<\?xml.*\?>/g, '').trim();
|
|
63
|
+
// 解析 XML 为对象
|
|
64
|
+
return parseXmlNode(xmlStr);
|
|
65
|
+
}
|
|
66
|
+
catch (error) {
|
|
67
|
+
console.error('XML 解析失败:', error);
|
|
68
|
+
return {};
|
|
69
|
+
}
|
|
70
|
+
};
|
|
71
|
+
exports.getXml2Json = getXml2Json;
|
|
72
|
+
/**
|
|
73
|
+
* 解析 XML 节点
|
|
74
|
+
*/
|
|
75
|
+
function parseXmlNode(xml) {
|
|
76
|
+
const result = {};
|
|
77
|
+
// 匹配标签
|
|
78
|
+
const tagRegex = /<([^>\s\/]+)([^>]*)>([\s\S]*?)<\/\1>|<([^>\s\/]+)([^>]*)\s*\/>/g;
|
|
79
|
+
let match;
|
|
80
|
+
while ((match = tagRegex.exec(xml)) !== null) {
|
|
81
|
+
const tagName = match[1] || match[4];
|
|
82
|
+
const attributes = match[2] || match[5];
|
|
83
|
+
const content = match[3] || '';
|
|
84
|
+
// 解析属性
|
|
85
|
+
const attrs = parseAttributes(attributes);
|
|
86
|
+
// 解析内容
|
|
87
|
+
let value;
|
|
88
|
+
if (content.trim() === '') {
|
|
89
|
+
// 空标签
|
|
90
|
+
value = attrs;
|
|
91
|
+
}
|
|
92
|
+
else if (/<[^>]+>/.test(content)) {
|
|
93
|
+
// 包含子标签
|
|
94
|
+
const childResult = parseXmlNode(content);
|
|
95
|
+
value = Object.keys(attrs).length > 0
|
|
96
|
+
? { ...attrs, ...childResult }
|
|
97
|
+
: childResult;
|
|
98
|
+
}
|
|
99
|
+
else {
|
|
100
|
+
// 纯文本内容
|
|
101
|
+
const textValue = decodeXmlEntities(content.trim());
|
|
102
|
+
value = Object.keys(attrs).length > 0
|
|
103
|
+
? { ...attrs, _text: textValue }
|
|
104
|
+
: textValue;
|
|
105
|
+
}
|
|
106
|
+
// 处理重复标签(转为数组)
|
|
107
|
+
if (result[tagName]) {
|
|
108
|
+
if (!Array.isArray(result[tagName])) {
|
|
109
|
+
result[tagName] = [result[tagName]];
|
|
110
|
+
}
|
|
111
|
+
result[tagName].push(value);
|
|
112
|
+
}
|
|
113
|
+
else {
|
|
114
|
+
result[tagName] = value;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
return result;
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* 解析 XML 属性
|
|
121
|
+
*/
|
|
122
|
+
function parseAttributes(attrStr) {
|
|
123
|
+
const attrs = {};
|
|
124
|
+
if (!attrStr || !attrStr.trim()) {
|
|
125
|
+
return attrs;
|
|
126
|
+
}
|
|
127
|
+
const attrRegex = /(\w+)\s*=\s*["']([^"']*)["']/g;
|
|
128
|
+
let match;
|
|
129
|
+
while ((match = attrRegex.exec(attrStr)) !== null) {
|
|
130
|
+
const key = match[1];
|
|
131
|
+
const value = decodeXmlEntities(match[2]);
|
|
132
|
+
attrs[`bot_${key}`] = value; // 添加 bot_ 前缀以匹配原有逻辑
|
|
133
|
+
}
|
|
134
|
+
return attrs;
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* 解码 XML 实体
|
|
138
|
+
*/
|
|
139
|
+
function decodeXmlEntities(text) {
|
|
140
|
+
const entities = {
|
|
141
|
+
'<': '<',
|
|
142
|
+
'>': '>',
|
|
143
|
+
'&': '&',
|
|
144
|
+
'"': '"',
|
|
145
|
+
''': "'",
|
|
146
|
+
'/': '/',
|
|
147
|
+
};
|
|
148
|
+
return text.replace(/&[^;]+;/g, (entity) => entities[entity] || entity);
|
|
149
|
+
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|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
export interface GrouItem<T> extends ArrayLinq<T> {
|
|
2
|
+
key: string;
|
|
3
|
+
}
|
|
4
|
+
export interface ArrayLinq<T> extends Array<T> {
|
|
5
|
+
/**
|
|
6
|
+
* 分组
|
|
7
|
+
* @param getFieldFun
|
|
8
|
+
*/
|
|
9
|
+
groupBy(getFieldFun: (t: T) => string | number | Date): ArrayLinq<GrouItem<T>>;
|
|
10
|
+
/**
|
|
11
|
+
* 正序
|
|
12
|
+
* @param getFieldFun
|
|
13
|
+
*/
|
|
14
|
+
orderBy(getFieldFun: (t: T) => string | number | Date): ArrayLinq<T>;
|
|
15
|
+
thenBy(getFieldFun: (t: T) => string | number | Date): ArrayLinq<T>;
|
|
16
|
+
/**
|
|
17
|
+
* 倒序
|
|
18
|
+
* @param getFieldFun
|
|
19
|
+
*/
|
|
20
|
+
orderByDescending(getFieldFun: (t: T) => string | number | Date): ArrayLinq<T>;
|
|
21
|
+
/**
|
|
22
|
+
* 筛选
|
|
23
|
+
* @param eqFun
|
|
24
|
+
*/
|
|
25
|
+
where(eqFun: (t: T) => boolean): ArrayLinq<T>;
|
|
26
|
+
/**
|
|
27
|
+
* 移除
|
|
28
|
+
* @param index 指定位置
|
|
29
|
+
*/
|
|
30
|
+
remove(item: T): ArrayLinq<T>;
|
|
31
|
+
/**
|
|
32
|
+
* 移除符合条件的项
|
|
33
|
+
* @param eqFun
|
|
34
|
+
*/
|
|
35
|
+
removeAll(eqFun: (t: T) => boolean): ArrayLinq<T>;
|
|
36
|
+
/**
|
|
37
|
+
* 是否存在对象
|
|
38
|
+
* @param obj
|
|
39
|
+
* @param eqFun
|
|
40
|
+
*/
|
|
41
|
+
contains(obj: T, eqFun: (obj1: T, obj2: T) => boolean): boolean;
|
|
42
|
+
/**
|
|
43
|
+
* 获取集合最后一个对象
|
|
44
|
+
* @param filterFun 筛选函数
|
|
45
|
+
* @param defaultValue 如果匹配不到,默认返回[可选]
|
|
46
|
+
*/
|
|
47
|
+
last(filterFun?: (obj1: T, obj2: T) => boolean, defaultValue?: T): T;
|
|
48
|
+
/**
|
|
49
|
+
* 获取集合第一个对象
|
|
50
|
+
* @param filterFun 筛选函数
|
|
51
|
+
* @param defaultValue 如果匹配不到,默认返回[可选]
|
|
52
|
+
*/
|
|
53
|
+
first(filterFun?: (item: T) => boolean, defaultValue?: T): T | null;
|
|
54
|
+
/**
|
|
55
|
+
* 跳过指定个数,并返回集合
|
|
56
|
+
* @param bypasses 跳过个数
|
|
57
|
+
*/
|
|
58
|
+
skip(bypasses: number): ArrayLinq<T>;
|
|
59
|
+
/**
|
|
60
|
+
* 获取指定个数,并返回集合
|
|
61
|
+
* @param returns 要获取的个数
|
|
62
|
+
*/
|
|
63
|
+
take(returns: number): ArrayLinq<T>;
|
|
64
|
+
/**
|
|
65
|
+
* 转换成新集合
|
|
66
|
+
* @param getNewObjFun
|
|
67
|
+
*/
|
|
68
|
+
select<TResult extends object | string | number | boolean>(getNewObjFun: (item: T) => TResult): ArrayLinq<TResult>;
|
|
69
|
+
/**
|
|
70
|
+
* 获取项里面指定字段最小值
|
|
71
|
+
* @param getFieldFun
|
|
72
|
+
*/
|
|
73
|
+
min<TResult>(getFieldFun: (t: T) => TResult): TResult;
|
|
74
|
+
/**
|
|
75
|
+
* 获取项里面指定字段最大值
|
|
76
|
+
* @param getFieldFun
|
|
77
|
+
*/
|
|
78
|
+
max<TResult>(getFieldFun: (t: T) => TResult): TResult;
|
|
79
|
+
/**
|
|
80
|
+
* 求和
|
|
81
|
+
* @param getFieldFun
|
|
82
|
+
*/
|
|
83
|
+
sum(getFieldFun: (t: T) => number): number;
|
|
84
|
+
/**
|
|
85
|
+
* 求平均值
|
|
86
|
+
* @param getFieldFun
|
|
87
|
+
*/
|
|
88
|
+
aggregate(getFieldFun: (t: T) => number): number;
|
|
89
|
+
/**
|
|
90
|
+
* 查找集合中是否存在要找的元素。
|
|
91
|
+
* @param eqFun
|
|
92
|
+
*/
|
|
93
|
+
any(eqFun: (t: T) => boolean): boolean;
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* 获取ArryLinq [值为空数组]
|
|
97
|
+
*/
|
|
98
|
+
export declare const GetDefault: <T>() => ArrayLinq<T>;
|
|
99
|
+
/**
|
|
100
|
+
* 分页数据集合
|
|
101
|
+
*/
|
|
102
|
+
export declare class PageList<T> extends Array<T> {
|
|
103
|
+
/**
|
|
104
|
+
*记录条数
|
|
105
|
+
*/
|
|
106
|
+
private TotalCount;
|
|
107
|
+
}
|
|
108
|
+
//# sourceMappingURL=linq.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"linq.d.ts","sourceRoot":"","sources":["../../src/utils/linq.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,QAAQ,CAAC,CAAC,CAAE,SAAQ,SAAS,CAAC,CAAC,CAAC;IAC7C,GAAG,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,SAAS,CAAC,CAAC,CAAE,SAAQ,KAAK,CAAC,CAAC,CAAC;IAC5C;;;OAGG;IACH,OAAO,CACL,WAAW,EAAE,CAAC,CAAC,EAAE,CAAC,KAAK,MAAM,GAAG,MAAM,GAAG,IAAI,GAC5C,SAAS,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC;IAE1B;;;OAGG;IACH,OAAO,CAAC,WAAW,EAAE,CAAC,CAAC,EAAE,CAAC,KAAK,MAAM,GAAG,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC,CAAC,CAAC,CAAC;IAGrE,MAAM,CAAC,WAAW,EAAE,CAAC,CAAC,EAAE,CAAC,KAAK,MAAM,GAAG,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC,CAAC,CAAC,CAAC;IACpE;;;OAGG;IACH,iBAAiB,CACf,WAAW,EAAE,CAAC,CAAC,EAAE,CAAC,KAAK,MAAM,GAAG,MAAM,GAAG,IAAI,GAC5C,SAAS,CAAC,CAAC,CAAC,CAAC;IAEhB;;;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;;;OAGG;IACH,GAAG,CAAC,OAAO,EAAE,WAAW,EAAE,CAAC,CAAC,EAAE,CAAC,KAAK,OAAO,GAAG,OAAO,CAAC;IAEtD;;;OAGG;IACH,GAAG,CAAC,WAAW,EAAE,CAAC,CAAC,EAAE,CAAC,KAAK,MAAM,GAAG,MAAM,CAAC;IAE3C;;;OAGG;IACH,SAAS,CAAC,WAAW,EAAE,CAAC,CAAC,EAAE,CAAC,KAAK,MAAM,GAAG,MAAM,CAAC;IAEjD;;;OAGG;IACH,GAAG,CAAC,KAAK,EAAE,CAAC,CAAC,EAAE,CAAC,KAAK,OAAO,GAAG,OAAO,CAAC;CACxC;AAED;;GAEG;AACH,eAAO,MAAM,UAAU,GAAI,CAAC,OAAK,SAAS,CAAC,CAAC,CAE3C,CAAC;AAEF;;GAEG;AACH,qBAAa,QAAQ,CAAC,CAAC,CAAE,SAAQ,KAAK,CAAC,CAAC,CAAC;IACvC;;OAEG;IACH,OAAO,CAAC,UAAU,CAAa;CAChC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PageList = exports.GetDefault = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* 获取ArryLinq [值为空数组]
|
|
6
|
+
*/
|
|
7
|
+
const GetDefault = () => {
|
|
8
|
+
return [];
|
|
9
|
+
};
|
|
10
|
+
exports.GetDefault = GetDefault;
|
|
11
|
+
/**
|
|
12
|
+
* 分页数据集合
|
|
13
|
+
*/
|
|
14
|
+
class PageList extends Array {
|
|
15
|
+
constructor() {
|
|
16
|
+
super(...arguments);
|
|
17
|
+
/**
|
|
18
|
+
*记录条数
|
|
19
|
+
*/
|
|
20
|
+
this.TotalCount = 0;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
exports.PageList = PageList;
|
|
24
|
+
//# sourceMappingURL=linq.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"linq.js","sourceRoot":"","sources":["../../src/utils/linq.ts"],"names":[],"mappings":";;;AAuHE;;GAEG;AACI,MAAM,UAAU,GAAG,GAAoB,EAAE;IAC9C,OAAO,EAAS,CAAC;AACnB,CAAC,CAAC;AAFW,QAAA,UAAU,cAErB;AAEF;;GAEG;AACH,MAAa,QAAY,SAAQ,KAAQ;IAAzC;;QACE;;WAEG;QACK,eAAU,GAAW,CAAC,CAAC;IACjC,CAAC;CAAA;AALD,4BAKC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
type EventHandler = (...params: any[]) => void;
|
|
2
|
+
declare class EventBus {
|
|
3
|
+
private events;
|
|
4
|
+
on(name: string, handler: EventHandler): void;
|
|
5
|
+
emit(name: string, ...args: any[]): void;
|
|
6
|
+
off(name: string, handler?: EventHandler): void;
|
|
7
|
+
}
|
|
8
|
+
export declare const eventBus: EventBus;
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=EventBus.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EventBus.d.ts","sourceRoot":"","sources":["../../src/weChatBase/EventBus.ts"],"names":[],"mappings":"AACA,KAAK,YAAY,GAAG,CAAC,GAAG,MAAM,EAAE,GAAG,EAAE,KAAK,IAAI,CAAC;AAE/C,cAAM,QAAQ;IACV,OAAO,CAAC,MAAM,CAAqC;IAEnD,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,YAAY;IAMtC,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE;IAIjC,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,YAAY;CAO3C;AACD,eAAO,MAAM,QAAQ,UAAiB,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.eventBus = void 0;
|
|
4
|
+
class EventBus {
|
|
5
|
+
constructor() {
|
|
6
|
+
this.events = new Map();
|
|
7
|
+
}
|
|
8
|
+
on(name, handler) {
|
|
9
|
+
const handlers = this.events.get(name) || [];
|
|
10
|
+
handlers.push(handler);
|
|
11
|
+
this.events.set(name, handlers);
|
|
12
|
+
}
|
|
13
|
+
emit(name, ...args) {
|
|
14
|
+
this.events.get(name)?.forEach(handler => handler(...args));
|
|
15
|
+
}
|
|
16
|
+
off(name, handler) {
|
|
17
|
+
if (!handler)
|
|
18
|
+
this.events.delete(name);
|
|
19
|
+
else {
|
|
20
|
+
const handlers = this.events.get(name)?.filter(h => h !== handler);
|
|
21
|
+
this.events.set(name, handlers || []);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
exports.eventBus = new EventBus();
|
|
26
|
+
// // 使用示例
|
|
27
|
+
// const bus = new EventBus();
|
|
28
|
+
// bus.on('paymentSuccess', (orderId: string) => {
|
|
29
|
+
// console.log(`订单 ${orderId} 支付成功`);
|
|
30
|
+
// });
|
|
31
|
+
// bus.emit('paymentSuccess', 'ORDER_123');
|
|
32
|
+
//# sourceMappingURL=EventBus.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EventBus.js","sourceRoot":"","sources":["../../src/weChatBase/EventBus.ts"],"names":[],"mappings":";;;AAGA,MAAM,QAAQ;IAAd;QACY,WAAM,GAAG,IAAI,GAAG,EAA0B,CAAC;IAmBvD,CAAC;IAjBG,EAAE,CAAC,IAAY,EAAE,OAAqB;QAClC,MAAM,QAAQ,GAAG,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;QAC7C,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACvB,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;IACpC,CAAC;IAED,IAAI,CAAC,IAAY,EAAE,GAAG,IAAW;QAC7B,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC,OAAO,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC;IAChE,CAAC;IAED,GAAG,CAAC,IAAY,EAAE,OAAsB;QACpC,IAAI,CAAC,OAAO;YAAE,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;aAClC,CAAC;YACF,MAAM,QAAQ,GAAG,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,KAAK,OAAO,CAAC,CAAC;YACnE,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,EAAE,QAAQ,IAAI,EAAE,CAAC,CAAC;QAC1C,CAAC;IACL,CAAC;CACJ;AACY,QAAA,QAAQ,GAAG,IAAI,QAAQ,EAAE,CAAC;AAEvC,UAAU;AACV,8BAA8B;AAC9B,kDAAkD;AAClD,uCAAuC;AACvC,MAAM;AACN,2CAA2C"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare class ChatMemberInfo {
|
|
2
|
+
wxid: string;
|
|
3
|
+
userName: string;
|
|
4
|
+
nickName: string;
|
|
5
|
+
bigHeadImgUrl: string;
|
|
6
|
+
smallHeadImgUrl: string;
|
|
7
|
+
chatroomMemberFlag: number;
|
|
8
|
+
inviterUserName: string;
|
|
9
|
+
memberFlag: number;
|
|
10
|
+
displayName: string;
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=chatMemberInfo.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chatMemberInfo.d.ts","sourceRoot":"","sources":["../../../src/weChatBase/entity/chatMemberInfo.ts"],"names":[],"mappings":"AACA,qBAAa,cAAc;IACvB,IAAI,EAAC,MAAM,CAAA;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,EAAE,MAAM,CAAC;IACtB,eAAe,EAAE,MAAM,CAAC;IACxB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,eAAe,EAAE,MAAM,CAAC;IACxB,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;CACvB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chatMemberInfo.js","sourceRoot":"","sources":["../../../src/weChatBase/entity/chatMemberInfo.ts"],"names":[],"mappings":";;;AACA,MAAa,cAAc;CAU1B;AAVD,wCAUC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export declare class SimpleSession {
|
|
2
|
+
userName: string;
|
|
3
|
+
nickName: string;
|
|
4
|
+
pyinitial: string;
|
|
5
|
+
quanPin: string;
|
|
6
|
+
sex: number;
|
|
7
|
+
remark: string;
|
|
8
|
+
remarkPyInitial: string;
|
|
9
|
+
remarkQuanPin: string;
|
|
10
|
+
contactType: number;
|
|
11
|
+
province: string;
|
|
12
|
+
city: string;
|
|
13
|
+
signature: string;
|
|
14
|
+
alias: string;
|
|
15
|
+
snsBgImg: string;
|
|
16
|
+
country: string;
|
|
17
|
+
bigHeadImgUrl: string;
|
|
18
|
+
smallHeadImgUrl: string;
|
|
19
|
+
description: string;
|
|
20
|
+
cardImgUrl: string;
|
|
21
|
+
labelList: string;
|
|
22
|
+
phoneNumList: string;
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=simpleSession.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"simpleSession.d.ts","sourceRoot":"","sources":["../../../src/weChatBase/entity/simpleSession.ts"],"names":[],"mappings":"AAGA,qBAAa,aAAa;IACtB,QAAQ,EAAE,MAAM,CAAA;IAChB,QAAQ,EAAE,MAAM,CAAA;IAChB,SAAS,EAAE,MAAM,CAAA;IACjB,OAAO,EAAE,MAAM,CAAA;IACf,GAAG,EAAE,MAAM,CAAA;IACX,MAAM,EAAE,MAAM,CAAA;IACd,eAAe,EAAE,MAAM,CAAA;IACvB,aAAa,EAAE,MAAM,CAAA;IACrB,WAAW,EAAE,MAAM,CAAA;IACnB,QAAQ,EAAE,MAAM,CAAA;IAChB,IAAI,EAAE,MAAM,CAAA;IAEZ,SAAS,EAAE,MAAM,CAAA;IAEjB,KAAK,EAAE,MAAM,CAAA;IAEb,QAAQ,EAAE,MAAM,CAAA;IAChB,OAAO,EAAE,MAAM,CAAA;IACf,aAAa,EAAE,MAAM,CAAA;IACrB,eAAe,EAAE,MAAM,CAAA;IAEvB,WAAW,EAAE,MAAM,CAAA;IAEnB,UAAU,EAAE,MAAM,CAAA;IAElB,SAAS,EAAE,MAAM,CAAA;IAEjB,YAAY,EAAE,MAAM,CAAA;CACvB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"simpleSession.js","sourceRoot":"","sources":["../../../src/weChatBase/entity/simpleSession.ts"],"names":[],"mappings":";;;AAEA,MAAM;AACN,MAAa,aAAa;CA6BzB;AA7BD,sCA6BC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { WeChatBase } from "./weChatBase";
|
|
2
|
+
import { WeChatChatRoomBase } from "./weChatChatRoomBase";
|
|
3
|
+
import { WeChatFriendBase } from "./weChatFriendBase";
|
|
4
|
+
import { WeChatLoginBase } from "./weChatLoginBase";
|
|
5
|
+
import { WeChatMessageBase } from "./weChatMessageBase";
|
|
6
|
+
import { WeChatToolsBase } from "./weChatToolsBase";
|
|
7
|
+
export declare abstract class WeChatApiBase extends WeChatBase {
|
|
8
|
+
abstract login: WeChatLoginBase;
|
|
9
|
+
abstract message: WeChatMessageBase;
|
|
10
|
+
abstract tools: WeChatToolsBase;
|
|
11
|
+
abstract friend: WeChatFriendBase;
|
|
12
|
+
abstract chatRoom: WeChatChatRoomBase;
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=weChatApiBase.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"weChatApiBase.d.ts","sourceRoot":"","sources":["../../../src/weChatBase/interface/weChatApiBase.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAIpD,8BAAsB,aAAc,SAAQ,UAAU;IAElD,QAAQ,CAAC,KAAK,EAAE,eAAe,CAAC;IAChC,QAAQ,CAAC,OAAO,EAAE,iBAAiB,CAAC;IACpC,QAAQ,CAAC,KAAK,EAAE,eAAe,CAAC;IAChC,QAAQ,CAAC,MAAM,EAAE,gBAAgB,CAAC;IAClC,QAAQ,CAAC,QAAQ,EAAE,kBAAkB,CAAC;CACzC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.WeChatApiBase = void 0;
|
|
4
|
+
const weChatBase_1 = require("./weChatBase");
|
|
5
|
+
// 微信API基类
|
|
6
|
+
class WeChatApiBase extends weChatBase_1.WeChatBase {
|
|
7
|
+
}
|
|
8
|
+
exports.WeChatApiBase = WeChatApiBase;
|
|
9
|
+
//# sourceMappingURL=weChatApiBase.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"weChatApiBase.js","sourceRoot":"","sources":["../../../src/weChatBase/interface/weChatApiBase.ts"],"names":[],"mappings":";;;AAAA,6CAA0C;AAQ1C,WAAW;AACX,MAAsB,aAAc,SAAQ,uBAAU;CAOrD;AAPD,sCAOC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"weChatBase.d.ts","sourceRoot":"","sources":["../../../src/weChatBase/interface/weChatBase.ts"],"names":[],"mappings":"AAAA,8BAAsB,UAAU;aAER,MAAM,EAAE,MAAM;aACd,YAAY,EAAE,MAAM;aACpB,KAAK,CAAC,EAAE,MAAM;gBAFd,MAAM,EAAE,MAAM,EACd,YAAY,EAAE,MAAM,EACpB,KAAK,CAAC,EAAE,MAAM;CAErC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.WeChatBase = void 0;
|
|
4
|
+
class WeChatBase {
|
|
5
|
+
constructor(apiUrl, protocolType, token) {
|
|
6
|
+
this.apiUrl = apiUrl;
|
|
7
|
+
this.protocolType = protocolType;
|
|
8
|
+
this.token = token;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
exports.WeChatBase = WeChatBase;
|
|
12
|
+
//# sourceMappingURL=weChatBase.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"weChatBase.js","sourceRoot":"","sources":["../../../src/weChatBase/interface/weChatBase.ts"],"names":[],"mappings":";;;AAAA,MAAsB,UAAU;IAC5B,YACoB,MAAc,EACd,YAAoB,EACpB,KAAc;QAFd,WAAM,GAAN,MAAM,CAAQ;QACd,iBAAY,GAAZ,YAAY,CAAQ;QACpB,UAAK,GAAL,KAAK,CAAS;IAC9B,CAAC;CACR;AAND,gCAMC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { wxGetChatroomInfoRequest, wxGetChatroomInfoResponse } from "../request/chatRoom/wxGetChatroomInfoRequest";
|
|
2
|
+
import { WeChatResult } from "../weChatResult";
|
|
3
|
+
import { wxGetChatroomQRCodeRequest, wxGetChatroomQRCodeResponse } from "../request/chatRoom/wxGetChatroomQRCodeRequest";
|
|
4
|
+
import { wxGetChatroomMemberInfoRequest, wxGetChatroomMemberInfoResponse } from "../request/chatRoom/wxGetChatroomMemberInfoRequest";
|
|
5
|
+
import { wxGetChatroomMemberListRequest, wxGetChatroomMemberListResponse } from "../request/chatRoom/wxGetChatroomMemberListRequest";
|
|
6
|
+
import { WeChatBase } from "./weChatBase";
|
|
7
|
+
export declare abstract class WeChatChatRoomBase extends WeChatBase {
|
|
8
|
+
/**
|
|
9
|
+
* 获取群聊信
|
|
10
|
+
* @param request QID: 群聊id
|
|
11
|
+
* @returns dict: 群聊信息字典
|
|
12
|
+
*/
|
|
13
|
+
abstract GetChatroomInfo(request: wxGetChatroomInfoRequest): Promise<WeChatResult<wxGetChatroomInfoResponse>>;
|
|
14
|
+
/**
|
|
15
|
+
* 获取群聊成员列表
|
|
16
|
+
* @param request QID: 群聊id
|
|
17
|
+
* @returns list[dict]: 群聊成员列表
|
|
18
|
+
*/
|
|
19
|
+
abstract GetChatroomMemberList(request: wxGetChatroomMemberListRequest): Promise<WeChatResult<wxGetChatroomMemberListResponse>>;
|
|
20
|
+
/**
|
|
21
|
+
* 获取群聊二维码
|
|
22
|
+
* @param request QID: 群聊id
|
|
23
|
+
* @returns dict: {"base64": 二维码的base64, "description": 二维码描述}
|
|
24
|
+
*/
|
|
25
|
+
abstract GetChatroomQRCode(request: wxGetChatroomQRCodeRequest): Promise<WeChatResult<wxGetChatroomQRCodeResponse>>;
|
|
26
|
+
/**
|
|
27
|
+
* 获取群成员信息
|
|
28
|
+
* @param request
|
|
29
|
+
* @returns
|
|
30
|
+
*/
|
|
31
|
+
abstract GetChatroomMemberInfo(request: wxGetChatroomMemberInfoRequest): Promise<WeChatResult<wxGetChatroomMemberInfoResponse>>;
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=weChatChatRoomBase.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"weChatChatRoomBase.d.ts","sourceRoot":"","sources":["../../../src/weChatBase/interface/weChatChatRoomBase.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,wBAAwB,EAAE,yBAAyB,EAAE,MAAM,8CAA8C,CAAC;AACnH,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,0BAA0B,EAAE,2BAA2B,EAAE,MAAM,gDAAgD,CAAC;AACzH,OAAO,EAAE,8BAA8B,EAAE,+BAA+B,EAAE,MAAM,oDAAoD,CAAC;AAErI,OAAO,EAAE,8BAA8B,EAAE,+BAA+B,EAAE,MAAM,oDAAoD,CAAC;AACrI,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAG1C,8BAAsB,kBAAmB,SAAQ,UAAU;IAMvD;;;;OAIG;IACH,QAAQ,CAAC,eAAe,CAAC,OAAO,EAAE,wBAAwB,GAAG,OAAO,CAAC,YAAY,CAAC,yBAAyB,CAAC,CAAC;IAE7G;;;;OAIG;IACH,QAAQ,CAAC,qBAAqB,CAAC,OAAO,EAAE,8BAA8B,GAAG,OAAO,CAAC,YAAY,CAAC,+BAA+B,CAAC,CAAC;IAE/H;;;;OAIG;IACH,QAAQ,CAAC,iBAAiB,CAAC,OAAO,EAAE,0BAA0B,GAAG,OAAO,CAAC,YAAY,CAAC,2BAA2B,CAAC,CAAC;IAEnH;;;;OAIG;IACH,QAAQ,CAAC,qBAAqB,CAAC,OAAO,EAAE,8BAA8B,GAAG,OAAO,CAAC,YAAY,CAAC,+BAA+B,CAAC,CAAC;CAClI"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.WeChatChatRoomBase = void 0;
|
|
4
|
+
const weChatBase_1 = require("./weChatBase");
|
|
5
|
+
//群聊
|
|
6
|
+
class WeChatChatRoomBase extends weChatBase_1.WeChatBase {
|
|
7
|
+
}
|
|
8
|
+
exports.WeChatChatRoomBase = WeChatChatRoomBase;
|
|
9
|
+
//# sourceMappingURL=weChatChatRoomBase.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"weChatChatRoomBase.js","sourceRoot":"","sources":["../../../src/weChatBase/interface/weChatChatRoomBase.ts"],"names":[],"mappings":";;;AAOA,6CAA0C;AAE1C,KAAK;AACL,MAAsB,kBAAmB,SAAQ,uBAAU;CAiC1D;AAjCD,gDAiCC"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { friendPassVerifyRequest } from "../request/friend/friendPassVerifyRequest";
|
|
2
|
+
import { getContactListRequest, getContactListResponse } from "../request/friend/getContactListRequest";
|
|
3
|
+
import { wxGetContractDetailRequest, wxGetContractDetailResponse } from "../request/friend/wxGetContractDetailRequest";
|
|
4
|
+
import { wxSearchContactRequest, wxSearchContactResponse } from "../request/friend/wxSearchContactRequest";
|
|
5
|
+
import { wxUploadContactRequest } from "../request/friend/wxUploadContactRequest";
|
|
6
|
+
import { WeChatResult } from "../weChatResult";
|
|
7
|
+
import { WeChatBase } from "./weChatBase";
|
|
8
|
+
export declare abstract class WeChatFriendBase extends WeChatBase {
|
|
9
|
+
/**
|
|
10
|
+
* 通过好友请求
|
|
11
|
+
主动添加好友单天上限如下所示:1小时内上限为 5个,超过上限时,无法发出好友请求,也收不到好友请求。
|
|
12
|
+
- 新账号:5/天
|
|
13
|
+
- 注册超过7天:10个/天
|
|
14
|
+
- 注册满3个月&&近期登录过该电脑:15/天
|
|
15
|
+
- 注册满6个月&&近期经常登录过该电脑:20/天
|
|
16
|
+
- 注册满6个月&&近期频繁登陆过该电脑:30/天
|
|
17
|
+
- 注册1年以上&&一直登录:50/天
|
|
18
|
+
- 上一次通过好友到下一次通过间隔20-40s
|
|
19
|
+
- 收到加人申请,到通过好友申请(每天最多通过300个好友申请),间隔30s+(随机时间)
|
|
20
|
+
建议风控保护: 新设备登录后4小时内请挂机
|
|
21
|
+
@param request scene: 来源 在消息的xml获取 v1: v1key v2: v2key
|
|
22
|
+
@returns
|
|
23
|
+
*/
|
|
24
|
+
abstract PassVerify(request: friendPassVerifyRequest): Promise<WeChatResult<boolean>>;
|
|
25
|
+
/**
|
|
26
|
+
* 获取联系人详情
|
|
27
|
+
* @param request wxid: 联系人wxid chatroom: 群聊wxid
|
|
28
|
+
* 多个微信请用,隔开(最多20个),ChatRoom请留空
|
|
29
|
+
* @returns list: 联系人详情列表
|
|
30
|
+
*/
|
|
31
|
+
abstract GetContractDetail(request: wxGetContractDetailRequest): Promise<WeChatResult<wxGetContractDetailResponse>>;
|
|
32
|
+
/**
|
|
33
|
+
* 获取联系人列表
|
|
34
|
+
* @param request wx_seq: 联系人序列 chatroom_seq: 群聊序列
|
|
35
|
+
* CurrentWxcontactSeq和CurrentChatRoomContactSeq没有的情况下请填写0
|
|
36
|
+
* @returns list: 联系人列表数据
|
|
37
|
+
*/
|
|
38
|
+
abstract GetContractList(request: getContactListRequest): Promise<WeChatResult<getContactListResponse>>;
|
|
39
|
+
/**
|
|
40
|
+
* 搜索联系人
|
|
41
|
+
* @param request
|
|
42
|
+
* @returns
|
|
43
|
+
*/
|
|
44
|
+
abstract SearchContact(request: wxSearchContactRequest): Promise<WeChatResult<wxSearchContactResponse>>;
|
|
45
|
+
abstract UploadContact(request: wxUploadContactRequest): Promise<WeChatResult<boolean>>;
|
|
46
|
+
}
|
|
47
|
+
//# sourceMappingURL=weChatFriendBase.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"weChatFriendBase.d.ts","sourceRoot":"","sources":["../../../src/weChatBase/interface/weChatFriendBase.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,2CAA2C,CAAC;AACpF,OAAO,EAAE,qBAAqB,EAAE,sBAAsB,EAAE,MAAM,yCAAyC,CAAC;AAExG,OAAO,EAAE,0BAA0B,EAAE,2BAA2B,EAAE,MAAM,8CAA8C,CAAC;AACvH,OAAO,EAAE,sBAAsB,EAAE,uBAAuB,EAAE,MAAM,0CAA0C,CAAC;AAC3G,OAAO,EAAE,sBAAsB,EAAE,MAAM,0CAA0C,CAAC;AAClF,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAG1C,8BAAsB,gBAAiB,SAAQ,UAAU;IAErD;;;;;;;;;;;;;;MAcE;IACF,QAAQ,CAAC,UAAU,CAAC,OAAO,EAAE,uBAAuB,GAAG,OAAO,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC;IASrF;;;;;OAKG;IACH,QAAQ,CAAC,iBAAiB,CAAC,OAAO,EAAE,0BAA0B,GAAG,OAAO,CAAC,YAAY,CAAC,2BAA2B,CAAC,CAAC;IAEnH;;;;;OAKG;IACH,QAAQ,CAAC,eAAe,CAAC,OAAO,EAAE,qBAAqB,GAAG,OAAO,CAAC,YAAY,CAAC,sBAAsB,CAAC,CAAC;IAIvG;;;;OAIG;IACH,QAAQ,CAAC,aAAa,CAAC,OAAO,EAAE,sBAAsB,GAAG,OAAO,CAAC,YAAY,CAAC,uBAAuB,CAAC,CAAC;IAIvG,QAAQ,CAAC,aAAa,CAAC,OAAO,EAAE,sBAAsB,GAAG,OAAO,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC;CAE1F"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.WeChatFriendBase = void 0;
|
|
4
|
+
const weChatBase_1 = require("./weChatBase");
|
|
5
|
+
//好友接口
|
|
6
|
+
class WeChatFriendBase extends weChatBase_1.WeChatBase {
|
|
7
|
+
}
|
|
8
|
+
exports.WeChatFriendBase = WeChatFriendBase;
|
|
9
|
+
//# sourceMappingURL=weChatFriendBase.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"weChatFriendBase.js","sourceRoot":"","sources":["../../../src/weChatBase/interface/weChatFriendBase.ts"],"names":[],"mappings":";;;AAOA,6CAA0C;AAE1C,MAAM;AACN,MAAsB,gBAAiB,SAAQ,uBAAU;CAuDxD;AAvDD,4CAuDC"}
|