@tarojs/taro-h5 3.4.8 → 3.5.0-alpha.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (382) hide show
  1. package/dist/api/ad/index.js +1 -1
  2. package/dist/api/ai/facial.js +1 -1
  3. package/dist/api/ai/visual.js +1 -1
  4. package/dist/api/alipay/index.js +1 -1
  5. package/dist/api/base/crypto.js +1 -1
  6. package/dist/api/base/debug.js +1 -1
  7. package/dist/api/base/index.js +1 -1
  8. package/dist/api/base/performance.js +1 -1
  9. package/dist/api/base/system.js +30 -26
  10. package/dist/api/base/update.js +1 -1
  11. package/dist/api/base/weapp/app-event.js +1 -1
  12. package/dist/api/base/weapp/life-cycle.js +1 -1
  13. package/dist/api/canvas/CanvasContext.js +27 -16
  14. package/dist/api/canvas/canvasGetImageData.js +2 -2
  15. package/dist/api/canvas/canvasPutImageData.js +2 -2
  16. package/dist/api/canvas/canvasToTempFilePath.js +2 -2
  17. package/dist/api/canvas/createCanvasContext.js +1 -1
  18. package/dist/api/canvas/index.js +1 -1
  19. package/dist/api/cloud/index.js +1 -1
  20. package/dist/api/data-analysis/index.js +1 -1
  21. package/dist/api/device/accelerometer.js +2 -2
  22. package/dist/api/device/accessibility.js +1 -1
  23. package/dist/api/device/battery.js +14 -5
  24. package/dist/api/device/bluetooth-ble.js +1 -1
  25. package/dist/api/device/bluetooth-peripheral.js +1 -1
  26. package/dist/api/device/bluetooth.js +1 -1
  27. package/dist/api/device/calendar.js +1 -1
  28. package/dist/api/device/clipboard.js +14 -5
  29. package/dist/api/device/compass.js +2 -2
  30. package/dist/api/device/contact.js +1 -1
  31. package/dist/api/device/crypto.js +1 -1
  32. package/dist/api/device/gyroscope.js +1 -1
  33. package/dist/api/device/iBeacon.js +1 -1
  34. package/dist/api/device/keyboard.js +1 -1
  35. package/dist/api/device/memory.js +1 -1
  36. package/dist/api/device/motion.js +2 -2
  37. package/dist/api/device/network.js +14 -5
  38. package/dist/api/device/nfc.js +1 -1
  39. package/dist/api/device/phone.js +2 -2
  40. package/dist/api/device/scan.js +1 -1
  41. package/dist/api/device/screen.js +1 -1
  42. package/dist/api/device/vibrate.js +1 -1
  43. package/dist/api/device/wifi.js +1 -1
  44. package/dist/api/ext/index.js +1 -1
  45. package/dist/api/files/index.js +1 -1
  46. package/dist/api/location/chooseLocation.js +14 -9
  47. package/dist/api/location/getLocation.js +2 -2
  48. package/dist/api/location/index.js +1 -1
  49. package/dist/api/media/EditorContext.js +1 -1
  50. package/dist/api/media/audio/InnerAudioContext.js +2 -2
  51. package/dist/api/media/audio/index.js +1 -1
  52. package/dist/api/media/background-audio/BackgroundAudioManager.js +2 -2
  53. package/dist/api/media/background-audio/index.js +1 -1
  54. package/dist/api/media/camera.js +1 -1
  55. package/dist/api/media/image/chooseImage.js +2 -2
  56. package/dist/api/media/image/getImageInfo.js +2 -2
  57. package/dist/api/media/image/index.js +1 -1
  58. package/dist/api/media/image/previewImage.js +14 -5
  59. package/dist/api/media/live.js +1 -1
  60. package/dist/api/media/map.js +1 -1
  61. package/dist/api/media/media-recorder.js +1 -1
  62. package/dist/api/media/recorder.js +1 -1
  63. package/dist/api/media/video/index.js +2 -2
  64. package/dist/api/media/video-decoder.js +1 -1
  65. package/dist/api/media/video-processing.js +1 -1
  66. package/dist/api/media/voip.js +1 -1
  67. package/dist/api/navigate/index.js +1 -1
  68. package/dist/api/network/download.js +1 -1
  69. package/dist/api/network/mdns.js +1 -1
  70. package/dist/api/network/request/index.js +1 -1
  71. package/dist/api/network/tcp.js +1 -1
  72. package/dist/api/network/udp.js +1 -1
  73. package/dist/api/network/upload.js +1 -1
  74. package/dist/api/network/websocket/index.js +2 -2
  75. package/dist/api/open-api/account.js +1 -1
  76. package/dist/api/open-api/address.js +1 -1
  77. package/dist/api/open-api/authorize.js +1 -1
  78. package/dist/api/open-api/card.js +1 -1
  79. package/dist/api/open-api/channels-live.js +1 -1
  80. package/dist/api/open-api/customer-service.js +1 -1
  81. package/dist/api/open-api/facial.js +1 -1
  82. package/dist/api/open-api/favorites.js +1 -1
  83. package/dist/api/open-api/group.js +1 -1
  84. package/dist/api/open-api/invoice.js +1 -1
  85. package/dist/api/open-api/license-plate.js +1 -1
  86. package/dist/api/open-api/login.js +1 -1
  87. package/dist/api/open-api/red-package.js +1 -1
  88. package/dist/api/open-api/settings.js +1 -1
  89. package/dist/api/open-api/soter.js +1 -1
  90. package/dist/api/open-api/subscribe-message.js +1 -1
  91. package/dist/api/open-api/user-info.js +1 -1
  92. package/dist/api/open-api/werun.js +1 -1
  93. package/dist/api/payment/index.js +1 -1
  94. package/dist/api/share/index.js +1 -1
  95. package/dist/api/storage/background-fetch.js +1 -1
  96. package/dist/api/storage/index.js +2 -2
  97. package/dist/api/swan/index.js +1 -1
  98. package/dist/api/taro.js +3 -4
  99. package/dist/api/ui/background.js +1 -1
  100. package/dist/api/ui/fonts.js +13 -4
  101. package/dist/api/ui/interaction/actionSheet.js +4 -13
  102. package/dist/api/ui/interaction/index.js +19 -10
  103. package/dist/api/ui/interaction/modal.js +7 -28
  104. package/dist/api/ui/interaction/toast.js +15 -41
  105. package/dist/api/ui/menu.js +1 -1
  106. package/dist/api/ui/navigation-bar/index.js +2 -2
  107. package/dist/api/ui/pull-down-refresh.js +1 -1
  108. package/dist/api/ui/scroll/index.js +2 -2
  109. package/dist/api/ui/sticky.js +1 -1
  110. package/dist/api/ui/tab-bar.js +2 -2
  111. package/dist/api/ui/window.js +2 -2
  112. package/dist/api/worker/index.js +1 -1
  113. package/dist/api/wxml/index.js +1 -1
  114. package/dist/api/wxml/selectorQuery.js +1 -1
  115. package/dist/index.cjs.js +326 -156
  116. package/dist/index.cjs.js.map +1 -1
  117. package/dist/index.esm.js +5170 -0
  118. package/dist/index.esm.js.map +1 -0
  119. package/dist/{api/utils → utils}/animation.js +0 -0
  120. package/dist/{api/utils → utils}/handler.js +0 -0
  121. package/dist/{api/utils → utils}/index.js +0 -0
  122. package/dist/{api/utils → utils}/lodash.js +0 -0
  123. package/dist/{api/utils → utils}/valid.js +0 -0
  124. package/package.json +14 -14
  125. package/src/api/ad/index.ts +1 -1
  126. package/src/api/ai/facial.ts +1 -1
  127. package/src/api/ai/visual.ts +1 -1
  128. package/src/api/alipay/index.ts +1 -1
  129. package/src/api/base/crypto.ts +1 -1
  130. package/src/api/base/debug.ts +1 -1
  131. package/src/api/base/index.ts +1 -1
  132. package/src/api/base/performance.ts +1 -1
  133. package/src/api/base/system.ts +2 -2
  134. package/src/api/base/update.ts +1 -1
  135. package/src/api/base/weapp/app-event.ts +1 -1
  136. package/src/api/base/weapp/life-cycle.ts +1 -1
  137. package/src/api/canvas/canvasGetImageData.ts +2 -2
  138. package/src/api/canvas/canvasPutImageData.ts +2 -2
  139. package/src/api/canvas/canvasToTempFilePath.ts +2 -2
  140. package/src/api/canvas/createCanvasContext.ts +1 -1
  141. package/src/api/canvas/index.ts +1 -1
  142. package/src/api/cloud/index.ts +1 -1
  143. package/src/api/data-analysis/index.ts +1 -1
  144. package/src/api/device/accelerometer.ts +2 -2
  145. package/src/api/device/accessibility.ts +1 -1
  146. package/src/api/device/battery.ts +2 -2
  147. package/src/api/device/bluetooth-ble.ts +1 -1
  148. package/src/api/device/bluetooth-peripheral.ts +1 -1
  149. package/src/api/device/bluetooth.ts +1 -1
  150. package/src/api/device/calendar.ts +1 -1
  151. package/src/api/device/clipboard.ts +1 -1
  152. package/src/api/device/compass.ts +2 -2
  153. package/src/api/device/contact.ts +1 -1
  154. package/src/api/device/crypto.ts +1 -1
  155. package/src/api/device/gyroscope.ts +1 -1
  156. package/src/api/device/iBeacon.ts +1 -1
  157. package/src/api/device/keyboard.ts +1 -1
  158. package/src/api/device/memory.ts +1 -1
  159. package/src/api/device/motion.ts +2 -2
  160. package/src/api/device/network.ts +2 -2
  161. package/src/api/device/nfc.ts +1 -1
  162. package/src/api/device/phone.ts +2 -2
  163. package/src/api/device/scan.ts +1 -1
  164. package/src/api/device/screen.ts +1 -1
  165. package/src/api/device/vibrate.ts +1 -1
  166. package/src/api/device/wifi.ts +1 -1
  167. package/src/api/ext/index.ts +1 -1
  168. package/src/api/files/index.ts +1 -1
  169. package/src/api/location/chooseLocation.ts +1 -1
  170. package/src/api/location/getLocation.ts +2 -2
  171. package/src/api/location/index.ts +1 -1
  172. package/src/api/media/EditorContext.ts +1 -1
  173. package/src/api/media/audio/InnerAudioContext.ts +2 -2
  174. package/src/api/media/audio/index.ts +1 -1
  175. package/src/api/media/background-audio/BackgroundAudioManager.ts +2 -2
  176. package/src/api/media/background-audio/index.ts +1 -1
  177. package/src/api/media/camera.ts +1 -1
  178. package/src/api/media/image/chooseImage.ts +2 -2
  179. package/src/api/media/image/getImageInfo.ts +2 -2
  180. package/src/api/media/image/index.ts +1 -1
  181. package/src/api/media/image/previewImage.ts +2 -2
  182. package/src/api/media/live.ts +1 -1
  183. package/src/api/media/map.ts +1 -1
  184. package/src/api/media/media-recorder.ts +1 -1
  185. package/src/api/media/recorder.ts +1 -1
  186. package/src/api/media/video/index.ts +2 -2
  187. package/src/api/media/video-decoder.ts +1 -1
  188. package/src/api/media/video-processing.ts +1 -1
  189. package/src/api/media/voip.ts +1 -1
  190. package/src/api/navigate/index.ts +1 -1
  191. package/src/api/network/download.ts +2 -2
  192. package/src/api/network/mdns.ts +1 -1
  193. package/src/api/network/request/index.ts +1 -1
  194. package/src/api/network/tcp.ts +1 -1
  195. package/src/api/network/udp.ts +1 -1
  196. package/src/api/network/upload.ts +2 -2
  197. package/src/api/network/websocket/index.ts +2 -2
  198. package/src/api/open-api/account.ts +1 -1
  199. package/src/api/open-api/address.ts +1 -1
  200. package/src/api/open-api/authorize.ts +1 -1
  201. package/src/api/open-api/card.ts +1 -1
  202. package/src/api/open-api/channels-live.ts +1 -1
  203. package/src/api/open-api/customer-service.ts +1 -1
  204. package/src/api/open-api/facial.ts +1 -1
  205. package/src/api/open-api/favorites.ts +1 -1
  206. package/src/api/open-api/group.ts +1 -1
  207. package/src/api/open-api/invoice.ts +1 -1
  208. package/src/api/open-api/license-plate.ts +1 -1
  209. package/src/api/open-api/login.ts +1 -1
  210. package/src/api/open-api/red-package.ts +1 -1
  211. package/src/api/open-api/settings.ts +1 -1
  212. package/src/api/open-api/soter.ts +1 -1
  213. package/src/api/open-api/subscribe-message.ts +1 -1
  214. package/src/api/open-api/user-info.ts +1 -1
  215. package/src/api/open-api/werun.ts +1 -1
  216. package/src/api/payment/index.ts +1 -1
  217. package/src/api/share/index.ts +1 -1
  218. package/src/api/storage/background-fetch.ts +1 -1
  219. package/src/api/storage/index.ts +2 -2
  220. package/src/api/swan/index.ts +1 -1
  221. package/src/api/taro.ts +3 -8
  222. package/src/api/ui/background.ts +1 -1
  223. package/src/api/ui/fonts.ts +1 -1
  224. package/src/api/ui/interaction/actionSheet.ts +3 -3
  225. package/src/api/ui/interaction/index.ts +2 -2
  226. package/src/api/ui/interaction/modal.ts +3 -3
  227. package/src/api/ui/interaction/toast.ts +3 -3
  228. package/src/api/ui/menu.ts +1 -1
  229. package/src/api/ui/navigation-bar/index.ts +2 -2
  230. package/src/api/ui/pull-down-refresh.ts +1 -1
  231. package/src/api/ui/scroll/index.ts +3 -3
  232. package/src/api/ui/sticky.ts +1 -1
  233. package/src/api/ui/tab-bar.ts +2 -2
  234. package/src/api/ui/window.ts +2 -2
  235. package/src/api/worker/index.ts +1 -1
  236. package/src/api/wxml/index.ts +1 -1
  237. package/src/api/wxml/selectorQuery.ts +1 -1
  238. package/src/{api/utils → utils}/animation.ts +0 -0
  239. package/src/{api/utils → utils}/handler.ts +0 -0
  240. package/src/{api/utils → utils}/index.ts +0 -0
  241. package/src/{api/utils → utils}/lodash.ts +2 -2
  242. package/src/{api/utils → utils}/valid.ts +0 -0
  243. package/dist/dist/api/ad/index.d.ts +0 -6
  244. package/dist/dist/api/ai/facial.d.ts +0 -9
  245. package/dist/dist/api/ai/index.d.ts +0 -2
  246. package/dist/dist/api/ai/visual.d.ts +0 -6
  247. package/dist/dist/api/alipay/index.d.ts +0 -3
  248. package/dist/dist/api/base/crypto.d.ts +0 -3
  249. package/dist/dist/api/base/debug.d.ts +0 -9
  250. package/dist/dist/api/base/index.d.ts +0 -12
  251. package/dist/dist/api/base/performance.d.ts +0 -6
  252. package/dist/dist/api/base/system.d.ts +0 -25
  253. package/dist/dist/api/base/update.d.ts +0 -6
  254. package/dist/dist/api/base/weapp/app-event.d.ts +0 -48
  255. package/dist/dist/api/base/weapp/life-cycle.d.ts +0 -6
  256. package/dist/dist/api/canvas/CanvasContext.d.ts +0 -104
  257. package/dist/dist/api/canvas/canvasGetImageData.d.ts +0 -5
  258. package/dist/dist/api/canvas/canvasPutImageData.d.ts +0 -6
  259. package/dist/dist/api/canvas/canvasToTempFilePath.d.ts +0 -6
  260. package/dist/dist/api/canvas/createCanvasContext.d.ts +0 -5
  261. package/dist/dist/api/canvas/index.d.ts +0 -12
  262. package/dist/dist/api/cloud/index.d.ts +0 -31
  263. package/dist/dist/api/data-analysis/index.d.ts +0 -12
  264. package/dist/dist/api/device/accelerometer.d.ts +0 -17
  265. package/dist/dist/api/device/accessibility.d.ts +0 -3
  266. package/dist/dist/api/device/battery.d.ts +0 -5
  267. package/dist/dist/api/device/bluetooth-ble.d.ts +0 -48
  268. package/dist/dist/api/device/bluetooth-peripheral.d.ts +0 -9
  269. package/dist/dist/api/device/bluetooth.d.ts +0 -39
  270. package/dist/dist/api/device/calendar.d.ts +0 -6
  271. package/dist/dist/api/device/clipboard.d.ts +0 -15
  272. package/dist/dist/api/device/compass.d.ts +0 -17
  273. package/dist/dist/api/device/contact.d.ts +0 -6
  274. package/dist/dist/api/device/crypto.d.ts +0 -3
  275. package/dist/dist/api/device/gyroscope.d.ts +0 -12
  276. package/dist/dist/api/device/iBeacon.d.ts +0 -21
  277. package/dist/dist/api/device/index.d.ts +0 -23
  278. package/dist/dist/api/device/keyboard.d.ts +0 -12
  279. package/dist/dist/api/device/memory.d.ts +0 -6
  280. package/dist/dist/api/device/motion.d.ts +0 -17
  281. package/dist/dist/api/device/network.d.ts +0 -20
  282. package/dist/dist/api/device/nfc.d.ts +0 -21
  283. package/dist/dist/api/device/phone.d.ts +0 -2
  284. package/dist/dist/api/device/scan.d.ts +0 -3
  285. package/dist/dist/api/device/screen.d.ts +0 -18
  286. package/dist/dist/api/device/vibrate.d.ts +0 -9
  287. package/dist/dist/api/device/wifi.d.ts +0 -33
  288. package/dist/dist/api/ext/index.d.ts +0 -6
  289. package/dist/dist/api/files/index.d.ts +0 -24
  290. package/dist/dist/api/framework/index.d.ts +0 -4
  291. package/dist/dist/api/index.d.ts +0 -24
  292. package/dist/dist/api/location/chooseLocation.d.ts +0 -6
  293. package/dist/dist/api/location/getLocation.d.ts +0 -2
  294. package/dist/dist/api/location/index.d.ts +0 -29
  295. package/dist/dist/api/media/EditorContext.d.ts +0 -42
  296. package/dist/dist/api/media/audio/InnerAudioContext.d.ts +0 -58
  297. package/dist/dist/api/media/audio/index.d.ts +0 -29
  298. package/dist/dist/api/media/background-audio/BackgroundAudioManager.d.ts +0 -71
  299. package/dist/dist/api/media/background-audio/index.d.ts +0 -29
  300. package/dist/dist/api/media/camera.d.ts +0 -3
  301. package/dist/dist/api/media/image/chooseImage.d.ts +0 -5
  302. package/dist/dist/api/media/image/getImageInfo.d.ts +0 -5
  303. package/dist/dist/api/media/image/index.d.ts +0 -15
  304. package/dist/dist/api/media/image/previewImage.d.ts +0 -8
  305. package/dist/dist/api/media/index.d.ts +0 -12
  306. package/dist/dist/api/media/live.d.ts +0 -6
  307. package/dist/dist/api/media/map.d.ts +0 -3
  308. package/dist/dist/api/media/media-recorder.d.ts +0 -3
  309. package/dist/dist/api/media/recorder.d.ts +0 -9
  310. package/dist/dist/api/media/video/index.d.ts +0 -24
  311. package/dist/dist/api/media/video-decoder.d.ts +0 -3
  312. package/dist/dist/api/media/video-processing.d.ts +0 -3
  313. package/dist/dist/api/media/voip.d.ts +0 -42
  314. package/dist/dist/api/navigate/index.d.ts +0 -12
  315. package/dist/dist/api/network/download.d.ts +0 -6
  316. package/dist/dist/api/network/index.d.ts +0 -7
  317. package/dist/dist/api/network/mdns.d.ts +0 -30
  318. package/dist/dist/api/network/request/index.d.ts +0 -4
  319. package/dist/dist/api/network/tcp.d.ts +0 -3
  320. package/dist/dist/api/network/udp.d.ts +0 -3
  321. package/dist/dist/api/network/upload.d.ts +0 -5
  322. package/dist/dist/api/network/utils.d.ts +0 -44
  323. package/dist/dist/api/network/websocket/index.d.ts +0 -7
  324. package/dist/dist/api/network/websocket/socketTask.d.ts +0 -25
  325. package/dist/dist/api/open-api/account.d.ts +0 -3
  326. package/dist/dist/api/open-api/address.d.ts +0 -3
  327. package/dist/dist/api/open-api/authorize.d.ts +0 -6
  328. package/dist/dist/api/open-api/card.d.ts +0 -6
  329. package/dist/dist/api/open-api/channels-live.d.ts +0 -18
  330. package/dist/dist/api/open-api/customer-service.d.ts +0 -3
  331. package/dist/dist/api/open-api/facial.d.ts +0 -12
  332. package/dist/dist/api/open-api/favorites.d.ts +0 -6
  333. package/dist/dist/api/open-api/group.d.ts +0 -3
  334. package/dist/dist/api/open-api/index.d.ts +0 -18
  335. package/dist/dist/api/open-api/invoice.d.ts +0 -6
  336. package/dist/dist/api/open-api/license-plate.d.ts +0 -3
  337. package/dist/dist/api/open-api/login.d.ts +0 -9
  338. package/dist/dist/api/open-api/red-package.d.ts +0 -3
  339. package/dist/dist/api/open-api/settings.d.ts +0 -6
  340. package/dist/dist/api/open-api/soter.d.ts +0 -9
  341. package/dist/dist/api/open-api/subscribe-message.d.ts +0 -3
  342. package/dist/dist/api/open-api/user-info.d.ts +0 -6
  343. package/dist/dist/api/open-api/werun.d.ts +0 -6
  344. package/dist/dist/api/payment/index.d.ts +0 -6
  345. package/dist/dist/api/route/index.d.ts +0 -1
  346. package/dist/dist/api/share/index.d.ts +0 -30
  347. package/dist/dist/api/storage/background-fetch.d.ts +0 -12
  348. package/dist/dist/api/storage/index.d.ts +0 -18
  349. package/dist/dist/api/swan/index.d.ts +0 -63
  350. package/dist/dist/api/taro.d.ts +0 -12
  351. package/dist/dist/api/ui/animation/index.d.ts +0 -2
  352. package/dist/dist/api/ui/background.d.ts +0 -6
  353. package/dist/dist/api/ui/custom-component.d.ts +0 -1
  354. package/dist/dist/api/ui/fonts.d.ts +0 -2
  355. package/dist/dist/api/ui/index.d.ts +0 -12
  356. package/dist/dist/api/ui/interaction/actionSheet.d.ts +0 -61
  357. package/dist/dist/api/ui/interaction/index.d.ts +0 -14
  358. package/dist/dist/api/ui/interaction/modal.d.ts +0 -69
  359. package/dist/dist/api/ui/interaction/toast.d.ts +0 -85
  360. package/dist/dist/api/ui/menu.d.ts +0 -3
  361. package/dist/dist/api/ui/navigation-bar/index.d.ts +0 -15
  362. package/dist/dist/api/ui/pull-down-refresh.d.ts +0 -9
  363. package/dist/dist/api/ui/scroll/index.d.ts +0 -5
  364. package/dist/dist/api/ui/sticky.d.ts +0 -3
  365. package/dist/dist/api/ui/tab-bar.d.ts +0 -34
  366. package/dist/dist/api/ui/window.d.ts +0 -15
  367. package/dist/dist/api/utils/animation.d.ts +0 -6
  368. package/dist/dist/api/utils/handler.d.ts +0 -48
  369. package/dist/dist/api/utils/index.d.ts +0 -39
  370. package/dist/dist/api/utils/lodash.d.ts +0 -2
  371. package/dist/dist/api/utils/valid.d.ts +0 -2
  372. package/dist/dist/api/worker/index.d.ts +0 -3
  373. package/dist/dist/api/wxml/index.d.ts +0 -5
  374. package/dist/dist/api/wxml/nodesRef.d.ts +0 -13
  375. package/dist/dist/api/wxml/selectorQuery.d.ts +0 -24
  376. package/dist/dist/index.d.ts +0 -4
  377. package/dist/dist/types/type.d.ts +0 -29
  378. package/dist/types/type.js +0 -2
  379. package/src/types/api.d.ts +0 -4
  380. package/src/types/define.d.ts +0 -2
  381. package/src/types/index.d.ts +0 -3
  382. package/src/types/type.ts +0 -32
package/dist/index.cjs.js CHANGED
@@ -240,6 +240,246 @@ const isVKSupport = temporarilyNotSupport('isVKSupport');
240
240
  // 视觉算法
241
241
  const createVKSession = temporarilyNotSupport('createVKSession');
242
242
 
243
+ /*! *****************************************************************************
244
+ Copyright (c) Microsoft Corporation.
245
+
246
+ Permission to use, copy, modify, and/or distribute this software for any
247
+ purpose with or without fee is hereby granted.
248
+
249
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
250
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
251
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
252
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
253
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
254
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
255
+ PERFORMANCE OF THIS SOFTWARE.
256
+ ***************************************************************************** */
257
+ /* global Reflect, Promise */
258
+
259
+ var extendStatics = function(d, b) {
260
+ extendStatics = Object.setPrototypeOf ||
261
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
262
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
263
+ return extendStatics(d, b);
264
+ };
265
+
266
+ function __extends(d, b) {
267
+ if (typeof b !== "function" && b !== null)
268
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
269
+ extendStatics(d, b);
270
+ function __() { this.constructor = d; }
271
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
272
+ }
273
+
274
+ var __assign = function() {
275
+ __assign = Object.assign || function __assign(t) {
276
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
277
+ s = arguments[i];
278
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
279
+ }
280
+ return t;
281
+ };
282
+ return __assign.apply(this, arguments);
283
+ };
284
+
285
+ function __rest(s, e) {
286
+ var t = {};
287
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
288
+ t[p] = s[p];
289
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
290
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
291
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
292
+ t[p[i]] = s[p[i]];
293
+ }
294
+ return t;
295
+ }
296
+
297
+ function __decorate(decorators, target, key, desc) {
298
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
299
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
300
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
301
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
302
+ }
303
+
304
+ function __param(paramIndex, decorator) {
305
+ return function (target, key) { decorator(target, key, paramIndex); }
306
+ }
307
+
308
+ function __metadata(metadataKey, metadataValue) {
309
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
310
+ }
311
+
312
+ function __awaiter(thisArg, _arguments, P, generator) {
313
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
314
+ return new (P || (P = Promise))(function (resolve, reject) {
315
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
316
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
317
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
318
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
319
+ });
320
+ }
321
+
322
+ function __generator(thisArg, body) {
323
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
324
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
325
+ function verb(n) { return function (v) { return step([n, v]); }; }
326
+ function step(op) {
327
+ if (f) throw new TypeError("Generator is already executing.");
328
+ while (_) try {
329
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
330
+ if (y = 0, t) op = [op[0] & 2, t.value];
331
+ switch (op[0]) {
332
+ case 0: case 1: t = op; break;
333
+ case 4: _.label++; return { value: op[1], done: false };
334
+ case 5: _.label++; y = op[1]; op = [0]; continue;
335
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
336
+ default:
337
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
338
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
339
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
340
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
341
+ if (t[2]) _.ops.pop();
342
+ _.trys.pop(); continue;
343
+ }
344
+ op = body.call(thisArg, _);
345
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
346
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
347
+ }
348
+ }
349
+
350
+ var __createBinding = Object.create ? (function(o, m, k, k2) {
351
+ if (k2 === undefined) k2 = k;
352
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
353
+ }) : (function(o, m, k, k2) {
354
+ if (k2 === undefined) k2 = k;
355
+ o[k2] = m[k];
356
+ });
357
+
358
+ function __exportStar(m, o) {
359
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);
360
+ }
361
+
362
+ function __values(o) {
363
+ var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
364
+ if (m) return m.call(o);
365
+ if (o && typeof o.length === "number") return {
366
+ next: function () {
367
+ if (o && i >= o.length) o = void 0;
368
+ return { value: o && o[i++], done: !o };
369
+ }
370
+ };
371
+ throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
372
+ }
373
+
374
+ function __read(o, n) {
375
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
376
+ if (!m) return o;
377
+ var i = m.call(o), r, ar = [], e;
378
+ try {
379
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
380
+ }
381
+ catch (error) { e = { error: error }; }
382
+ finally {
383
+ try {
384
+ if (r && !r.done && (m = i["return"])) m.call(i);
385
+ }
386
+ finally { if (e) throw e.error; }
387
+ }
388
+ return ar;
389
+ }
390
+
391
+ /** @deprecated */
392
+ function __spread() {
393
+ for (var ar = [], i = 0; i < arguments.length; i++)
394
+ ar = ar.concat(__read(arguments[i]));
395
+ return ar;
396
+ }
397
+
398
+ /** @deprecated */
399
+ function __spreadArrays() {
400
+ for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
401
+ for (var r = Array(s), k = 0, i = 0; i < il; i++)
402
+ for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
403
+ r[k] = a[j];
404
+ return r;
405
+ }
406
+
407
+ function __spreadArray(to, from, pack) {
408
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
409
+ if (ar || !(i in from)) {
410
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
411
+ ar[i] = from[i];
412
+ }
413
+ }
414
+ return to.concat(ar || Array.prototype.slice.call(from));
415
+ }
416
+
417
+ function __await(v) {
418
+ return this instanceof __await ? (this.v = v, this) : new __await(v);
419
+ }
420
+
421
+ function __asyncGenerator(thisArg, _arguments, generator) {
422
+ if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
423
+ var g = generator.apply(thisArg, _arguments || []), i, q = [];
424
+ return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
425
+ function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
426
+ function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
427
+ function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
428
+ function fulfill(value) { resume("next", value); }
429
+ function reject(value) { resume("throw", value); }
430
+ function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }
431
+ }
432
+
433
+ function __asyncDelegator(o) {
434
+ var i, p;
435
+ return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
436
+ function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
437
+ }
438
+
439
+ function __asyncValues(o) {
440
+ if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
441
+ var m = o[Symbol.asyncIterator], i;
442
+ return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
443
+ function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
444
+ function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
445
+ }
446
+
447
+ function __makeTemplateObject(cooked, raw) {
448
+ if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
449
+ return cooked;
450
+ };
451
+
452
+ var __setModuleDefault = Object.create ? (function(o, v) {
453
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
454
+ }) : function(o, v) {
455
+ o["default"] = v;
456
+ };
457
+
458
+ function __importStar(mod) {
459
+ if (mod && mod.__esModule) return mod;
460
+ var result = {};
461
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
462
+ __setModuleDefault(result, mod);
463
+ return result;
464
+ }
465
+
466
+ function __importDefault(mod) {
467
+ return (mod && mod.__esModule) ? mod : { default: mod };
468
+ }
469
+
470
+ function __classPrivateFieldGet(receiver, state, kind, f) {
471
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
472
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
473
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
474
+ }
475
+
476
+ function __classPrivateFieldSet(receiver, state, value, kind, f) {
477
+ if (kind === "m") throw new TypeError("Private method is not writable");
478
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
479
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
480
+ return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
481
+ }
482
+
243
483
  class MethodHandler {
244
484
  constructor({ name, success, fail, complete }) {
245
485
  this.methodName = name;
@@ -445,44 +685,39 @@ const getSystemInfoSync = () => {
445
685
  const appBaseInfo = getAppBaseInfo();
446
686
  const appAuthorizeSetting = getAppAuthorizeSetting();
447
687
  delete deviceInfo.abi;
448
- const info = {
449
- ...windowInfo,
450
- ...systemSetting,
451
- ...deviceInfo,
452
- ...appBaseInfo,
688
+ const info = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, windowInfo), systemSetting), deviceInfo), appBaseInfo), {
453
689
  /** 用户字体大小(单位px)。以微信客户端「我-设置-通用-字体大小」中的设置为准 */
454
- fontSizeSetting: NaN,
690
+ fontSizeSetting: NaN,
455
691
  /** 允许微信使用相册的开关(仅 iOS 有效) */
456
- albumAuthorized: appAuthorizeSetting.albumAuthorized === 'authorized',
692
+ albumAuthorized: appAuthorizeSetting.albumAuthorized === 'authorized',
457
693
  /** 允许微信使用摄像头的开关 */
458
- cameraAuthorized: appAuthorizeSetting.cameraAuthorized === 'authorized',
694
+ cameraAuthorized: appAuthorizeSetting.cameraAuthorized === 'authorized',
459
695
  /** 允许微信使用定位的开关 */
460
- locationAuthorized: appAuthorizeSetting.locationAuthorized === 'authorized',
696
+ locationAuthorized: appAuthorizeSetting.locationAuthorized === 'authorized',
461
697
  /** 允许微信使用麦克风的开关 */
462
- microphoneAuthorized: appAuthorizeSetting.microphoneAuthorized === 'authorized',
698
+ microphoneAuthorized: appAuthorizeSetting.microphoneAuthorized === 'authorized',
463
699
  /** 允许微信通知的开关 */
464
- notificationAuthorized: appAuthorizeSetting.notificationAuthorized === 'authorized',
700
+ notificationAuthorized: appAuthorizeSetting.notificationAuthorized === 'authorized',
465
701
  /** 允许微信通知带有提醒的开关(仅 iOS 有效) */
466
- notificationAlertAuthorized: appAuthorizeSetting.notificationAlertAuthorized === 'authorized',
702
+ notificationAlertAuthorized: appAuthorizeSetting.notificationAlertAuthorized === 'authorized',
467
703
  /** 允许微信通知带有标记的开关(仅 iOS 有效) */
468
- notificationBadgeAuthorized: appAuthorizeSetting.notificationBadgeAuthorized === 'authorized',
704
+ notificationBadgeAuthorized: appAuthorizeSetting.notificationBadgeAuthorized === 'authorized',
469
705
  /** 允许微信通知带有声音的开关(仅 iOS 有效) */
470
- notificationSoundAuthorized: appAuthorizeSetting.notificationSoundAuthorized === 'authorized',
706
+ notificationSoundAuthorized: appAuthorizeSetting.notificationSoundAuthorized === 'authorized',
471
707
  /** 允许微信使用日历的开关 */
472
- phoneCalendarAuthorized: appAuthorizeSetting.phoneCalendarAuthorized === 'authorized',
708
+ phoneCalendarAuthorized: appAuthorizeSetting.phoneCalendarAuthorized === 'authorized',
473
709
  /** `true` 表示模糊定位,`false` 表示精确定位,仅 iOS 支持 */
474
- locationReducedAccuracy: appAuthorizeSetting.locationReducedAccuracy,
710
+ locationReducedAccuracy: appAuthorizeSetting.locationReducedAccuracy,
475
711
  /** 小程序当前运行环境 */
476
- environment: ''
477
- };
712
+ environment: '' });
478
713
  return info;
479
714
  };
480
715
  /** 获取系统信息 */
481
- const getSystemInfoAsync = async (options = {}) => {
716
+ const getSystemInfoAsync = (options = {}) => __awaiter(void 0, void 0, void 0, function* () {
482
717
  const { success, fail, complete } = options;
483
718
  const handle = new MethodHandler({ name: 'getSystemInfoAsync', success, fail, complete });
484
719
  try {
485
- const info = await getSystemInfoSync();
720
+ const info = yield getSystemInfoSync();
486
721
  return handle.success(info);
487
722
  }
488
723
  catch (error) {
@@ -490,13 +725,13 @@ const getSystemInfoAsync = async (options = {}) => {
490
725
  errMsg: error
491
726
  });
492
727
  }
493
- };
728
+ });
494
729
  /** 获取系统信息 */
495
- const getSystemInfo = async (options = {}) => {
730
+ const getSystemInfo = (options = {}) => __awaiter(void 0, void 0, void 0, function* () {
496
731
  const { success, fail, complete } = options;
497
732
  const handle = new MethodHandler({ name: 'getSystemInfo', success, fail, complete });
498
733
  try {
499
- const info = await getSystemInfoSync();
734
+ const info = yield getSystemInfoSync();
500
735
  return handle.success(info);
501
736
  }
502
737
  catch (error) {
@@ -504,7 +739,7 @@ const getSystemInfo = async (options = {}) => {
504
739
  errMsg: error
505
740
  });
506
741
  }
507
- };
742
+ });
508
743
 
509
744
  // 更新
510
745
  const updateWeChatApp = temporarilyNotSupport('updateWeChatApp');
@@ -635,24 +870,26 @@ class CanvasContext {
635
870
  * 将之前在绘图上下文中的描述(路径、变形、样式)画到 canvas 中。
636
871
  * @todo 每次 draw 都会读取 width 和 height
637
872
  */
638
- async draw(reserve, callback) {
639
- try {
640
- if (!reserve) {
641
- this.ctx.clearRect(0, 0, this.canvas.width, this.canvas.height);
873
+ draw(reserve, callback) {
874
+ return __awaiter(this, void 0, void 0, function* () {
875
+ try {
876
+ if (!reserve) {
877
+ this.ctx.clearRect(0, 0, this.canvas.width, this.canvas.height);
878
+ }
879
+ // 部分 action 是异步的
880
+ for (const { func, args } of this.actions) {
881
+ yield func.apply(this.ctx, args);
882
+ }
883
+ this.emptyActions();
884
+ callback && callback();
642
885
  }
643
- // 部分 action 是异步的
644
- for (const { func, args } of this.actions) {
645
- await func.apply(this.ctx, args);
886
+ catch (e) {
887
+ /* eslint-disable no-throw-literal */
888
+ throw {
889
+ errMsg: e.message
890
+ };
646
891
  }
647
- this.emptyActions();
648
- callback && callback();
649
- }
650
- catch (e) {
651
- /* eslint-disable no-throw-literal */
652
- throw {
653
- errMsg: e.message
654
- };
655
- }
892
+ });
656
893
  }
657
894
  drawImage(imageResource, ...extra) {
658
895
  this.enqueueActions(() => {
@@ -934,12 +1171,12 @@ const checkIsOpenAccessibility = temporarilyNotSupport('checkIsOpenAccessibility
934
1171
 
935
1172
  // 电量
936
1173
  const getBatteryInfoSync = temporarilyNotSupport('getBatteryInfoSync');
937
- const getBatteryInfo = async ({ success, fail, complete } = {}) => {
1174
+ const getBatteryInfo = ({ success, fail, complete } = {}) => __awaiter(void 0, void 0, void 0, function* () {
938
1175
  var _a;
939
1176
  const handle = new MethodHandler({ name: 'getBatteryInfo', success, fail, complete });
940
1177
  try {
941
1178
  // @ts-ignore
942
- const battery = await ((_a = navigator.getBattery) === null || _a === void 0 ? void 0 : _a.call(navigator));
1179
+ const battery = yield ((_a = navigator.getBattery) === null || _a === void 0 ? void 0 : _a.call(navigator));
943
1180
  return handle.success({
944
1181
  isCharging: battery.charging,
945
1182
  level: Number(battery.level || 0) * 100
@@ -950,7 +1187,7 @@ const getBatteryInfo = async ({ success, fail, complete } = {}) => {
950
1187
  errMsg: (error === null || error === void 0 ? void 0 : error.message) || error
951
1188
  });
952
1189
  }
953
- };
1190
+ });
954
1191
 
955
1192
  // 蓝牙-通用
956
1193
  const stopBluetoothDevicesDiscovery = temporarilyNotSupport('stopBluetoothDevicesDiscovery');
@@ -1174,7 +1411,7 @@ document.addEventListener('copy', () => {
1174
1411
  /**
1175
1412
  * 设置系统剪贴板的内容
1176
1413
  */
1177
- const setClipboardData = async ({ data, success, fail, complete }) => {
1414
+ const setClipboardData = ({ data, success, fail, complete }) => __awaiter(void 0, void 0, void 0, function* () {
1178
1415
  const handle = new MethodHandler({ name: 'setClipboardData', success, fail, complete });
1179
1416
  try {
1180
1417
  setStorageSync(CLIPBOARD_STORAGE_NAME, data);
@@ -1204,11 +1441,11 @@ const setClipboardData = async ({ data, success, fail, complete }) => {
1204
1441
  catch (e) {
1205
1442
  return handle.fail({ errMsg: e.message });
1206
1443
  }
1207
- };
1444
+ });
1208
1445
  /**
1209
1446
  * 获取系统剪贴板的内容
1210
1447
  */
1211
- const getClipboardData = async ({ success, fail, complete } = {}) => {
1448
+ const getClipboardData = ({ success, fail, complete } = {}) => __awaiter(void 0, void 0, void 0, function* () {
1212
1449
  const handle = new MethodHandler({ name: 'getClipboardData', success, fail, complete });
1213
1450
  try {
1214
1451
  const data = getStorageSync(CLIPBOARD_STORAGE_NAME);
@@ -1217,7 +1454,7 @@ const getClipboardData = async ({ success, fail, complete } = {}) => {
1217
1454
  catch (e) {
1218
1455
  return handle.fail({ errMsg: e.message });
1219
1456
  }
1220
- };
1457
+ });
1221
1458
 
1222
1459
  const callbackManager$2 = new CallbackManager();
1223
1460
  let compassListener;
@@ -1444,12 +1681,12 @@ const getNetworkType = (options = {}) => {
1444
1681
  return handle.success({ networkType });
1445
1682
  };
1446
1683
  const networkStatusManager = new CallbackManager();
1447
- const networkStatusListener = async () => {
1448
- const { networkType } = await getNetworkType();
1684
+ const networkStatusListener = () => __awaiter(void 0, void 0, void 0, function* () {
1685
+ const { networkType } = yield getNetworkType();
1449
1686
  const isConnected = networkType !== 'none';
1450
1687
  const obj = { isConnected, networkType };
1451
1688
  networkStatusManager.trigger(obj);
1452
- };
1689
+ });
1453
1690
  /**
1454
1691
  * 在最近的八次网络请求中, 出现下列三个现象之一则判定弱网。
1455
1692
  * - 出现三次以上连接超时
@@ -1689,14 +1926,8 @@ styleInject(css_248z,{"insertAt":"top"});
1689
1926
 
1690
1927
  function createLocationChooser(handler, key = LOCATION_APIKEY, mapOpt = {}) {
1691
1928
  var _a, _b, _c;
1692
- const { latitude, longitude, ...opts } = mapOpt;
1693
- const query = {
1694
- key,
1695
- type: 1,
1696
- coord: ((_a = mapOpt.coord) !== null && _a !== void 0 ? _a : [latitude, longitude].every(e => Number(e) >= 0)) ? `${latitude},${longitude}` : undefined,
1697
- referer: 'myapp',
1698
- ...opts
1699
- };
1929
+ const { latitude, longitude } = mapOpt, opts = __rest(mapOpt, ["latitude", "longitude"]);
1930
+ const query = Object.assign({ key, type: 1, coord: ((_a = mapOpt.coord) !== null && _a !== void 0 ? _a : [latitude, longitude].every(e => Number(e) >= 0)) ? `${latitude},${longitude}` : undefined, referer: 'myapp' }, opts);
1700
1931
  const html = `
1701
1932
  <div class='taro_choose_location'>
1702
1933
  <div class='taro_choose_location_bar'>
@@ -2005,7 +2236,7 @@ const createCameraContext = temporarilyNotSupport('createCameraContext');
2005
2236
  /**
2006
2237
  * 在新页面中全屏预览图片。预览的过程中用户可以进行保存图片、发送给朋友等操作。
2007
2238
  */
2008
- const previewImage = async (options) => {
2239
+ const previewImage = (options) => __awaiter(void 0, void 0, void 0, function* () {
2009
2240
  function loadImage(url, loadFail) {
2010
2241
  return new Promise((resolve) => {
2011
2242
  const item = document.createElement('taro-swiper-item-core');
@@ -2046,7 +2277,7 @@ const previewImage = async (options) => {
2046
2277
  swiper.full = true;
2047
2278
  let children = [];
2048
2279
  try {
2049
- children = await Promise.all(urls.map(e => loadImage(e, fail)));
2280
+ children = yield Promise.all(urls.map(e => loadImage(e, fail)));
2050
2281
  }
2051
2282
  catch (error) {
2052
2283
  return handle.fail({
@@ -2063,7 +2294,7 @@ const previewImage = async (options) => {
2063
2294
  container.appendChild(swiper);
2064
2295
  document.body.appendChild(container);
2065
2296
  return handle.success();
2066
- };
2297
+ });
2067
2298
 
2068
2299
  /**
2069
2300
  * 获取图片信息。网络图片需先配置download域名才能生效。
@@ -3315,7 +3546,7 @@ const setBackgroundColor = temporarilyNotSupport('setBackgroundColor');
3315
3546
  const nextTick = Taro__default["default"].nextTick;
3316
3547
 
3317
3548
  // 字体
3318
- const loadFontFace = async (options) => {
3549
+ const loadFontFace = (options) => __awaiter(void 0, void 0, void 0, function* () {
3319
3550
  options = Object.assign({ global: false }, options);
3320
3551
  const { success, fail, complete, family, source, desc = {} } = options;
3321
3552
  const handle = new MethodHandler({ name: 'loadFontFace', success, fail, complete });
@@ -3325,7 +3556,7 @@ const loadFontFace = async (options) => {
3325
3556
  // @ts-ignore
3326
3557
  const fontFace = new FontFace(family, source, desc);
3327
3558
  try {
3328
- await fontFace.load();
3559
+ yield fontFace.load();
3329
3560
  fonts.add(fontFace);
3330
3561
  return handle.success({});
3331
3562
  }
@@ -3363,7 +3594,7 @@ const loadFontFace = async (options) => {
3363
3594
  document.head.appendChild(style);
3364
3595
  return handle.success();
3365
3596
  }
3366
- };
3597
+ });
3367
3598
 
3368
3599
  // 菜单
3369
3600
  const getMenuButtonBoundingClientRect = temporarilyNotSupport('getMenuButtonBoundingClientRect');
@@ -3907,11 +4138,7 @@ class Toast {
3907
4138
  // style
3908
4139
  const { maskStyle, toastStyle, successStyle, errrorStyle, loadingStyle, imageStyle, textStyle } = this.style;
3909
4140
  // configuration
3910
- const config = {
3911
- ...this.options,
3912
- ...options,
3913
- _type
3914
- };
4141
+ const config = Object.assign(Object.assign(Object.assign({}, this.options), options), { _type });
3915
4142
  // wrapper
3916
4143
  this.el = document.createElement('div');
3917
4144
  this.el.className = 'taro__toast';
@@ -3924,27 +4151,18 @@ class Toast {
3924
4151
  // icon
3925
4152
  this.icon = document.createElement('p');
3926
4153
  if (config.image) {
3927
- this.icon.setAttribute('style', inlineStyle({
3928
- ...imageStyle,
3929
- 'background-image': `url(${config.image})`
3930
- }));
4154
+ this.icon.setAttribute('style', inlineStyle(Object.assign(Object.assign({}, imageStyle), { 'background-image': `url(${config.image})` })));
3931
4155
  }
3932
4156
  else {
3933
4157
  const iconStyle = config.icon === 'loading' ? loadingStyle : config.icon === 'error' ? errrorStyle : successStyle;
3934
- this.icon.setAttribute('style', inlineStyle({
3935
- ...iconStyle,
3936
- ...(config.icon === 'none' ? { display: 'none' } : {})
3937
- }));
4158
+ this.icon.setAttribute('style', inlineStyle(Object.assign(Object.assign({}, iconStyle), (config.icon === 'none' ? { display: 'none' } : {}))));
3938
4159
  }
3939
4160
  // toast
3940
4161
  this.toast = document.createElement('div');
3941
- this.toast.setAttribute('style', inlineStyle({
3942
- ...toastStyle,
3943
- ...(config.icon === 'none' ? {
3944
- 'min-height': '0',
3945
- padding: '10px 15px'
3946
- } : {})
3947
- }));
4162
+ this.toast.setAttribute('style', inlineStyle(Object.assign(Object.assign({}, toastStyle), (config.icon === 'none' ? {
4163
+ 'min-height': '0',
4164
+ padding: '10px 15px'
4165
+ } : {}))));
3948
4166
  // title
3949
4167
  this.title = document.createElement('p');
3950
4168
  this.title.setAttribute('style', inlineStyle(textStyle));
@@ -3963,11 +4181,7 @@ class Toast {
3963
4181
  return '';
3964
4182
  }
3965
4183
  show(options = {}, _type = 'toast') {
3966
- const config = {
3967
- ...this.options,
3968
- ...options,
3969
- _type
3970
- };
4184
+ const config = Object.assign(Object.assign(Object.assign({}, this.options), options), { _type });
3971
4185
  if (this.hideOpacityTimer)
3972
4186
  clearTimeout(this.hideOpacityTimer);
3973
4187
  if (this.hideDisplayTimer)
@@ -3979,28 +4193,19 @@ class Toast {
3979
4193
  // image
3980
4194
  const { toastStyle, successStyle, errrorStyle, loadingStyle, imageStyle } = this.style;
3981
4195
  if (config.image) {
3982
- this.icon.setAttribute('style', inlineStyle({
3983
- ...imageStyle,
3984
- 'background-image': `url(${config.image})`
3985
- }));
4196
+ this.icon.setAttribute('style', inlineStyle(Object.assign(Object.assign({}, imageStyle), { 'background-image': `url(${config.image})` })));
3986
4197
  }
3987
4198
  else {
3988
4199
  if (!config.image && config.icon) {
3989
4200
  const iconStyle = config.icon === 'loading' ? loadingStyle : config.icon === 'error' ? errrorStyle : successStyle;
3990
- this.icon.setAttribute('style', inlineStyle({
3991
- ...iconStyle,
3992
- ...(config.icon === 'none' ? { display: 'none' } : {})
3993
- }));
4201
+ this.icon.setAttribute('style', inlineStyle(Object.assign(Object.assign({}, iconStyle), (config.icon === 'none' ? { display: 'none' } : {}))));
3994
4202
  }
3995
4203
  }
3996
4204
  // toast
3997
- this.toast.setAttribute('style', inlineStyle({
3998
- ...toastStyle,
3999
- ...(config.icon === 'none' ? {
4000
- 'min-height': '0',
4001
- padding: '10px 15px'
4002
- } : {})
4003
- }));
4205
+ this.toast.setAttribute('style', inlineStyle(Object.assign(Object.assign({}, toastStyle), (config.icon === 'none' ? {
4206
+ 'min-height': '0',
4207
+ padding: '10px 15px'
4208
+ } : {}))));
4004
4209
  // show
4005
4210
  this.el.style.display = 'block';
4006
4211
  setTimeout(() => { this.el.style.opacity = '1'; }, 0);
@@ -4088,10 +4293,7 @@ class Modal {
4088
4293
  // style
4089
4294
  const { maskStyle, modalStyle, titleStyle, textStyle, footStyle, btnStyle } = this.style;
4090
4295
  // configuration
4091
- const config = {
4092
- ...this.options,
4093
- ...options
4094
- };
4296
+ const config = Object.assign(Object.assign({}, this.options), options);
4095
4297
  // wrapper
4096
4298
  this.el = document.createElement('div');
4097
4299
  this.el.className = 'taro__modal';
@@ -4106,20 +4308,13 @@ class Modal {
4106
4308
  modal.className = 'taro-modal__content';
4107
4309
  modal.setAttribute('style', inlineStyle(modalStyle));
4108
4310
  // title
4109
- const titleCSS = config.title ? titleStyle : {
4110
- ...titleStyle,
4111
- display: 'none'
4112
- };
4311
+ const titleCSS = config.title ? titleStyle : Object.assign(Object.assign({}, titleStyle), { display: 'none' });
4113
4312
  this.title = document.createElement('div');
4114
4313
  this.title.className = 'taro-modal__title';
4115
4314
  this.title.setAttribute('style', inlineStyle(titleCSS));
4116
4315
  this.title.textContent = config.title;
4117
4316
  // text
4118
- const textCSS = config.title ? textStyle : {
4119
- ...textStyle,
4120
- padding: '40px 20px 26px',
4121
- color: '#353535'
4122
- };
4317
+ const textCSS = config.title ? textStyle : Object.assign(Object.assign({}, textStyle), { padding: '40px 20px 26px', color: '#353535' });
4123
4318
  this.text = document.createElement('div');
4124
4319
  this.text.className = 'taro-modal__text';
4125
4320
  this.text.setAttribute('style', inlineStyle(textCSS));
@@ -4129,11 +4324,7 @@ class Modal {
4129
4324
  foot.className = 'taro-modal__foot';
4130
4325
  foot.setAttribute('style', inlineStyle(footStyle));
4131
4326
  // cancel button
4132
- const cancelCSS = {
4133
- ...btnStyle,
4134
- color: config.cancelColor,
4135
- display: config.showCancel ? 'block' : 'none'
4136
- };
4327
+ const cancelCSS = Object.assign(Object.assign({}, btnStyle), { color: config.cancelColor, display: config.showCancel ? 'block' : 'none' });
4137
4328
  this.cancel = document.createElement('div');
4138
4329
  this.cancel.className = 'taro-model__btn taro-model__cancel';
4139
4330
  this.cancel.setAttribute('style', inlineStyle(cancelCSS));
@@ -4167,10 +4358,7 @@ class Modal {
4167
4358
  }
4168
4359
  show(options = {}) {
4169
4360
  return new Promise((resolve) => {
4170
- const config = {
4171
- ...this.options,
4172
- ...options
4173
- };
4361
+ const config = Object.assign(Object.assign({}, this.options), options);
4174
4362
  if (this.hideOpacityTimer)
4175
4363
  clearTimeout(this.hideOpacityTimer);
4176
4364
  if (this.hideDisplayTimer)
@@ -4186,11 +4374,7 @@ class Modal {
4186
4374
  else {
4187
4375
  // block => none
4188
4376
  this.title.style.display = 'none';
4189
- const textCSS = {
4190
- ...textStyle,
4191
- padding: '40px 20px 26px',
4192
- color: '#353535'
4193
- };
4377
+ const textCSS = Object.assign(Object.assign({}, textStyle), { padding: '40px 20px 26px', color: '#353535' });
4194
4378
  this.text.setAttribute('style', inlineStyle(textCSS));
4195
4379
  }
4196
4380
  this.text.textContent = config.content || '';
@@ -4288,10 +4472,7 @@ class ActionSheet {
4288
4472
  // style
4289
4473
  const { maskStyle, actionSheetStyle, menuStyle, cellStyle, cancelStyle } = this.style;
4290
4474
  // configuration
4291
- const config = {
4292
- ...this.options,
4293
- ...options
4294
- };
4475
+ const config = Object.assign(Object.assign({}, this.options), options);
4295
4476
  this.lastConfig = config;
4296
4477
  // wrapper
4297
4478
  this.el = document.createElement('div');
@@ -4306,10 +4487,7 @@ class ActionSheet {
4306
4487
  this.actionSheet.setAttribute('style', inlineStyle(actionSheetStyle));
4307
4488
  // menu
4308
4489
  this.menu = document.createElement('div');
4309
- this.menu.setAttribute('style', inlineStyle({
4310
- ...menuStyle,
4311
- color: config.itemColor
4312
- }));
4490
+ this.menu.setAttribute('style', inlineStyle(Object.assign(Object.assign({}, menuStyle), { color: config.itemColor })));
4313
4491
  // cells
4314
4492
  this.cells = config.itemList.map((item, index) => {
4315
4493
  const cell = document.createElement('div');
@@ -4352,10 +4530,7 @@ class ActionSheet {
4352
4530
  }
4353
4531
  show(options = {}) {
4354
4532
  return new Promise((resolve) => {
4355
- const config = {
4356
- ...this.options,
4357
- ...options
4358
- };
4533
+ const config = Object.assign(Object.assign({}, this.options), options);
4359
4534
  this.lastConfig = config;
4360
4535
  if (this.hideOpacityTimer)
4361
4536
  clearTimeout(this.hideOpacityTimer);
@@ -4520,7 +4695,7 @@ const hideLoading = ({ success, fail, complete } = {}) => {
4520
4695
  toast.hide(0, 'loading');
4521
4696
  return handle.success();
4522
4697
  };
4523
- const showModal = async (options = {}) => {
4698
+ const showModal = (options = {}) => __awaiter(void 0, void 0, void 0, function* () {
4524
4699
  init(document);
4525
4700
  options = Object.assign({
4526
4701
  title: '',
@@ -4600,21 +4775,21 @@ const showModal = async (options = {}) => {
4600
4775
  options.showCancel = !!options.showCancel;
4601
4776
  let result = '';
4602
4777
  if (!modal.el) {
4603
- result = await modal.create(options);
4778
+ result = yield modal.create(options);
4604
4779
  }
4605
4780
  else {
4606
- result = await modal.show(options);
4781
+ result = yield modal.show(options);
4607
4782
  }
4608
4783
  const res = { cancel: !1, confirm: !1 };
4609
4784
  res[result] = !0;
4610
4785
  return handle.success(res);
4611
- };
4786
+ });
4612
4787
  function hideModal() {
4613
4788
  if (!modal.el)
4614
4789
  return;
4615
4790
  modal.hide();
4616
4791
  }
4617
- const showActionSheet = async (options = { itemList: [] }) => {
4792
+ const showActionSheet = (options = { itemList: [] }) => __awaiter(void 0, void 0, void 0, function* () {
4618
4793
  init(document);
4619
4794
  options = Object.assign({
4620
4795
  itemColor: '#000000',
@@ -4660,10 +4835,10 @@ const showActionSheet = async (options = { itemList: [] }) => {
4660
4835
  }
4661
4836
  let result = '';
4662
4837
  if (!actionSheet.el) {
4663
- result = await actionSheet.create(options);
4838
+ result = yield actionSheet.create(options);
4664
4839
  }
4665
4840
  else {
4666
- result = await actionSheet.show(options);
4841
+ result = yield actionSheet.show(options);
4667
4842
  }
4668
4843
  if (typeof result === 'string') {
4669
4844
  return handle.fail(({ errMsg: result }));
@@ -4671,7 +4846,7 @@ const showActionSheet = async (options = { itemList: [] }) => {
4671
4846
  else {
4672
4847
  return handle.success(({ tapIndex: result }));
4673
4848
  }
4674
- };
4849
+ });
4675
4850
  Taro__default["default"].eventCenter.on('__taroRouterChange', () => {
4676
4851
  hideToast();
4677
4852
  hideLoading();
@@ -4975,7 +5150,6 @@ const taro = {
4975
5150
  Events,
4976
5151
  preload,
4977
5152
  history: router.history,
4978
- createRouter: router.createRouter,
4979
5153
  navigateBack: router.navigateBack,
4980
5154
  navigateTo: router.navigateTo,
4981
5155
  reLaunch: router.reLaunch,
@@ -5001,10 +5175,6 @@ taro.initPxTransform = initPxTransform;
5001
5175
  // @ts-ignore
5002
5176
  taro.canIUseWebp = canIUseWebp;
5003
5177
 
5004
- Object.defineProperty(exports, 'createRouter', {
5005
- enumerable: true,
5006
- get: function () { return router.createRouter; }
5007
- });
5008
5178
  Object.defineProperty(exports, 'getCurrentPages', {
5009
5179
  enumerable: true,
5010
5180
  get: function () { return router.getCurrentPages; }