@tarojs/components 3.3.14 → 3.3.18

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 (229) hide show
  1. package/dist/cjs/loader.cjs.js +1 -1
  2. package/dist/cjs/taro-ad-core.cjs.entry.js +19 -0
  3. package/dist/cjs/taro-ad-custom-core.cjs.entry.js +19 -0
  4. package/dist/cjs/taro-components.cjs.js +1 -1
  5. package/dist/cjs/taro-cover-image-core.cjs.entry.js +17 -3
  6. package/dist/cjs/taro-cover-view-core.cjs.entry.js +49 -3
  7. package/dist/cjs/taro-editor-core.cjs.entry.js +19 -0
  8. package/dist/cjs/taro-functional-page-navigator-core.cjs.entry.js +19 -0
  9. package/dist/cjs/taro-image-core.cjs.entry.js +2 -2
  10. package/dist/cjs/taro-input-core.cjs.entry.js +4 -4
  11. package/dist/cjs/taro-keyboard-accessory-core.cjs.entry.js +19 -0
  12. package/dist/cjs/taro-live-player-core.cjs.entry.js +19 -0
  13. package/dist/cjs/taro-live-pusher-core.cjs.entry.js +19 -0
  14. package/dist/cjs/taro-map-core.cjs.entry.js +19 -0
  15. package/dist/cjs/taro-match-media-core.cjs.entry.js +19 -0
  16. package/dist/cjs/taro-navigation-bar-core.cjs.entry.js +19 -0
  17. package/dist/cjs/taro-navigator-core.cjs.entry.js +10 -6
  18. package/dist/cjs/taro-official-account-core.cjs.entry.js +19 -0
  19. package/dist/cjs/taro-page-container-core.cjs.entry.js +19 -0
  20. package/dist/cjs/taro-page-meta-core.cjs.entry.js +19 -0
  21. package/dist/cjs/taro-pull-to-refresh.cjs.entry.js +7 -3
  22. package/dist/cjs/taro-share-element-core.cjs.entry.js +19 -0
  23. package/dist/cjs/taro-slot-core.cjs.entry.js +19 -0
  24. package/dist/cjs/taro-swiper-core_2.cjs.entry.js +10 -1
  25. package/dist/cjs/taro-tabbar.cjs.entry.js +100 -46
  26. package/dist/cjs/taro-textarea-core.cjs.entry.js +63 -3
  27. package/dist/cjs/taro-voip-room-core.cjs.entry.js +19 -0
  28. package/dist/collection/collection-manifest.json +21 -5
  29. package/dist/collection/components/ad/ad.js +11 -0
  30. package/dist/collection/components/{cover-view/cover-image.js → ad-custom/ad-custom.js} +3 -3
  31. package/dist/collection/components/cover-image/cover-image.js +94 -0
  32. package/dist/collection/components/cover-image/style/index.css +5 -0
  33. package/dist/collection/components/cover-view/cover-view.js +166 -4
  34. package/dist/collection/components/cover-view/style/cover-view.css +3 -0
  35. package/dist/collection/components/editor/editor.js +11 -0
  36. package/dist/collection/components/functional-page-navigator/functional-page-navigator.js +11 -0
  37. package/dist/collection/components/image/image.js +1 -1
  38. package/dist/collection/components/image/style/index.css +2 -2
  39. package/dist/collection/components/input/input.js +4 -4
  40. package/dist/collection/components/keyboard-accessory/keyboard-accessory.js +11 -0
  41. package/dist/collection/components/live-player/live-player.js +11 -0
  42. package/dist/collection/components/live-pusher/live-pusher.js +11 -0
  43. package/dist/collection/components/map/map.js +11 -0
  44. package/dist/collection/components/match-media/match-media.js +11 -0
  45. package/dist/collection/components/{movable-view → movable-area}/movable-area.js +0 -0
  46. package/dist/collection/components/{movable-view → movable-area}/movable-view.js +0 -0
  47. package/dist/collection/components/navigation-bar/navigation-bar.js +11 -0
  48. package/dist/collection/components/navigator/navigator.js +1 -1
  49. package/dist/collection/components/official-account/official-account.js +11 -0
  50. package/dist/collection/components/page-container/page-container.js +11 -0
  51. package/dist/collection/components/page-meta/page-meta.js +11 -0
  52. package/dist/collection/components/{picker-view-column → picker-view}/picker-view-column.js +0 -0
  53. package/dist/collection/components/{pull-down-refresh → pull-to-refresh}/pull-to-refresh.js +1 -1
  54. package/dist/collection/components/{pull-down-refresh → pull-to-refresh}/style/index.css +0 -0
  55. package/dist/collection/components/share-element/share-element.js +11 -0
  56. package/dist/collection/components/slot/slot.js +11 -0
  57. package/dist/collection/components/swiper/swiper.js +10 -1
  58. package/dist/collection/components/tabbar/tabbar.js +82 -24
  59. package/dist/collection/components/textarea/style/index.css +6 -2
  60. package/dist/collection/components/textarea/textarea.js +98 -3
  61. package/dist/collection/components/voip-room/voip-room.js +11 -0
  62. package/dist/collection/utils/index.js +50 -64
  63. package/dist/esm/loader.js +1 -1
  64. package/dist/esm/taro-ad-core.entry.js +15 -0
  65. package/dist/esm/taro-ad-custom-core.entry.js +15 -0
  66. package/dist/esm/taro-components.js +1 -1
  67. package/dist/esm/taro-cover-image-core.entry.js +18 -4
  68. package/dist/esm/taro-cover-view-core.entry.js +50 -4
  69. package/dist/esm/taro-editor-core.entry.js +15 -0
  70. package/dist/esm/taro-functional-page-navigator-core.entry.js +15 -0
  71. package/dist/esm/taro-image-core.entry.js +2 -2
  72. package/dist/esm/taro-input-core.entry.js +4 -4
  73. package/dist/esm/taro-keyboard-accessory-core.entry.js +15 -0
  74. package/dist/esm/taro-live-player-core.entry.js +15 -0
  75. package/dist/esm/taro-live-pusher-core.entry.js +15 -0
  76. package/dist/esm/taro-map-core.entry.js +15 -0
  77. package/dist/esm/taro-match-media-core.entry.js +15 -0
  78. package/dist/esm/taro-navigation-bar-core.entry.js +15 -0
  79. package/dist/esm/taro-navigator-core.entry.js +1 -1
  80. package/dist/esm/taro-official-account-core.entry.js +15 -0
  81. package/dist/esm/taro-page-container-core.entry.js +15 -0
  82. package/dist/esm/taro-page-meta-core.entry.js +15 -0
  83. package/dist/esm/taro-pull-to-refresh.entry.js +1 -1
  84. package/dist/esm/taro-share-element-core.entry.js +15 -0
  85. package/dist/esm/taro-slot-core.entry.js +15 -0
  86. package/dist/esm/taro-swiper-core_2.entry.js +10 -1
  87. package/dist/esm/taro-tabbar.entry.js +79 -29
  88. package/dist/esm/taro-textarea-core.entry.js +63 -3
  89. package/dist/esm/taro-voip-room-core.entry.js +15 -0
  90. package/dist/esm-es5/loader.js +1 -1
  91. package/dist/esm-es5/taro-ad-core.entry.js +1 -0
  92. package/dist/esm-es5/taro-ad-custom-core.entry.js +1 -0
  93. package/dist/esm-es5/taro-components.js +1 -1
  94. package/dist/esm-es5/taro-cover-image-core.entry.js +1 -1
  95. package/dist/esm-es5/taro-cover-view-core.entry.js +1 -1
  96. package/dist/esm-es5/taro-editor-core.entry.js +1 -0
  97. package/dist/esm-es5/taro-functional-page-navigator-core.entry.js +1 -0
  98. package/dist/esm-es5/taro-image-core.entry.js +1 -1
  99. package/dist/esm-es5/taro-input-core.entry.js +1 -1
  100. package/dist/esm-es5/taro-keyboard-accessory-core.entry.js +1 -0
  101. package/dist/esm-es5/taro-live-player-core.entry.js +1 -0
  102. package/dist/esm-es5/taro-live-pusher-core.entry.js +1 -0
  103. package/dist/esm-es5/taro-map-core.entry.js +1 -0
  104. package/dist/esm-es5/taro-match-media-core.entry.js +1 -0
  105. package/dist/esm-es5/taro-navigation-bar-core.entry.js +1 -0
  106. package/dist/esm-es5/taro-navigator-core.entry.js +1 -1
  107. package/dist/esm-es5/taro-official-account-core.entry.js +1 -0
  108. package/dist/esm-es5/taro-page-container-core.entry.js +1 -0
  109. package/dist/esm-es5/taro-page-meta-core.entry.js +1 -0
  110. package/dist/esm-es5/taro-pull-to-refresh.entry.js +1 -1
  111. package/dist/esm-es5/taro-share-element-core.entry.js +1 -0
  112. package/dist/esm-es5/taro-slot-core.entry.js +1 -0
  113. package/dist/esm-es5/taro-swiper-core_2.entry.js +1 -1
  114. package/dist/esm-es5/taro-tabbar.entry.js +1 -1
  115. package/dist/esm-es5/taro-textarea-core.entry.js +1 -1
  116. package/dist/esm-es5/taro-voip-room-core.entry.js +1 -0
  117. package/dist/taro-components/{p-70f40e3a.entry.js → p-02b84386.entry.js} +1 -1
  118. package/dist/taro-components/{p-af9ec312.system.entry.js → p-0a0377f6.system.entry.js} +1 -1
  119. package/dist/taro-components/p-14095f6b.system.entry.js +1 -0
  120. package/dist/taro-components/p-14fd68ec.entry.js +1 -0
  121. package/dist/taro-components/p-16d9e6b9.system.entry.js +1 -0
  122. package/dist/taro-components/p-1cc97957.entry.js +1 -0
  123. package/dist/taro-components/p-30bfacb9.system.js +1 -1
  124. package/dist/taro-components/p-33bcdee9.entry.js +1 -0
  125. package/dist/taro-components/p-37594e84.entry.js +1 -0
  126. package/dist/taro-components/p-38d8fa46.system.entry.js +1 -0
  127. package/dist/taro-components/{p-098f4931.system.entry.js → p-3984f596.system.entry.js} +1 -1
  128. package/dist/taro-components/p-39bee235.entry.js +1 -0
  129. package/dist/taro-components/p-3ed0783c.system.entry.js +1 -0
  130. package/dist/taro-components/p-4288566a.system.entry.js +1 -0
  131. package/dist/taro-components/p-432f803f.entry.js +1 -0
  132. package/dist/taro-components/p-4d643967.entry.js +1 -0
  133. package/dist/taro-components/p-52ef77b2.entry.js +1 -0
  134. package/dist/taro-components/p-53297f27.entry.js +1 -0
  135. package/dist/taro-components/p-5e20dff4.system.entry.js +1 -0
  136. package/dist/taro-components/p-60a15326.system.entry.js +1 -0
  137. package/dist/taro-components/p-6422a968.system.entry.js +1 -0
  138. package/dist/taro-components/p-79b3c05a.entry.js +1 -0
  139. package/dist/taro-components/p-81e1d9a3.system.entry.js +1 -0
  140. package/dist/taro-components/p-8235b7b7.system.entry.js +1 -0
  141. package/dist/taro-components/p-82741605.entry.js +1 -0
  142. package/dist/taro-components/p-8415cd92.entry.js +1 -0
  143. package/dist/taro-components/p-8f0e3f13.entry.js +1 -0
  144. package/dist/taro-components/p-9b9727c7.entry.js +1 -0
  145. package/dist/taro-components/p-9bd65170.system.entry.js +1 -0
  146. package/dist/taro-components/p-9e7a85ae.entry.js +1 -0
  147. package/dist/taro-components/p-a4fdb95b.system.entry.js +1 -0
  148. package/dist/taro-components/p-a5c0a7e3.entry.js +1 -0
  149. package/dist/taro-components/p-ab55aacd.system.entry.js +1 -0
  150. package/dist/taro-components/{p-8cf16235.entry.js → p-b2ec0cf1.entry.js} +1 -1
  151. package/dist/taro-components/p-b3abedf8.entry.js +1 -0
  152. package/dist/taro-components/p-bc08a702.system.entry.js +1 -0
  153. package/dist/taro-components/p-becfab60.system.entry.js +1 -0
  154. package/dist/taro-components/p-c7cfcb8e.entry.js +1 -0
  155. package/dist/taro-components/p-cb8099dd.entry.js +1 -0
  156. package/dist/taro-components/p-cdf144cb.system.entry.js +1 -0
  157. package/dist/taro-components/p-d8363f59.system.entry.js +1 -0
  158. package/dist/taro-components/{p-2ef4681b.system.entry.js → p-d9494012.system.entry.js} +1 -1
  159. package/dist/taro-components/p-dfe76645.entry.js +1 -0
  160. package/dist/taro-components/p-e1e289bb.entry.js +1 -0
  161. package/dist/taro-components/p-e42b782e.system.entry.js +1 -0
  162. package/dist/taro-components/p-ed3ff1e4.entry.js +1 -0
  163. package/dist/taro-components/p-effd64d5.system.entry.js +1 -0
  164. package/dist/taro-components/p-f05422a6.entry.js +1 -0
  165. package/dist/taro-components/p-f70b6a12.system.entry.js +1 -0
  166. package/dist/taro-components/p-f928a72e.system.entry.js +1 -0
  167. package/dist/taro-components/p-fac09a5c.system.entry.js +1 -0
  168. package/dist/taro-components/taro-components.css +1 -1
  169. package/dist/taro-components/taro-components.esm.js +1 -1
  170. package/dist/types/components/ad/ad.d.ts +4 -0
  171. package/dist/types/components/{cover-view/cover-image.d.ts → ad-custom/ad-custom.d.ts} +1 -1
  172. package/dist/types/components/cover-image/cover-image.d.ts +11 -0
  173. package/dist/types/components/cover-view/cover-view.d.ts +14 -2
  174. package/dist/types/components/editor/editor.d.ts +4 -0
  175. package/dist/types/components/functional-page-navigator/functional-page-navigator.d.ts +4 -0
  176. package/dist/types/components/keyboard-accessory/keyboard-accessory.d.ts +4 -0
  177. package/dist/types/components/live-player/live-player.d.ts +4 -0
  178. package/dist/types/components/live-pusher/live-pusher.d.ts +4 -0
  179. package/dist/types/components/map/map.d.ts +4 -0
  180. package/dist/types/components/match-media/match-media.d.ts +4 -0
  181. package/dist/types/components/{movable-view → movable-area}/movable-area.d.ts +0 -0
  182. package/dist/types/components/{movable-view → movable-area}/movable-view.d.ts +0 -0
  183. package/dist/types/components/navigation-bar/navigation-bar.d.ts +4 -0
  184. package/dist/types/components/official-account/official-account.d.ts +4 -0
  185. package/dist/types/components/page-container/page-container.d.ts +4 -0
  186. package/dist/types/components/page-meta/page-meta.d.ts +4 -0
  187. package/dist/types/components/{picker-view-column → picker-view}/picker-view-column.d.ts +0 -0
  188. package/dist/types/components/{pull-down-refresh → pull-to-refresh}/pull-to-refresh.d.ts +0 -0
  189. package/dist/types/components/share-element/share-element.d.ts +4 -0
  190. package/dist/types/components/slot/slot.d.ts +4 -0
  191. package/dist/types/components/swiper/swiper.d.ts +1 -0
  192. package/dist/types/components/tabbar/tabbar.d.ts +21 -2
  193. package/dist/types/components/textarea/textarea.d.ts +6 -0
  194. package/dist/types/components/voip-room/voip-room.d.ts +4 -0
  195. package/dist/types/components.d.ts +226 -0
  196. package/dist/types/utils/index.d.ts +8 -0
  197. package/dist-h5/react/index.js +2 -1
  198. package/dist-h5/vue/createComponent.js +4 -0
  199. package/dist-h5/vue/createFormsComponent.js +8 -1
  200. package/dist-h5/vue/simpleComponents.js +1 -1
  201. package/package.json +4 -4
  202. package/types/Ad.d.ts +6 -6
  203. package/types/AdCustom.d.ts +50 -0
  204. package/types/Button.d.ts +2 -2
  205. package/types/CoverImage.d.ts +3 -3
  206. package/types/CoverView.d.ts +3 -3
  207. package/types/Image.d.ts +8 -2
  208. package/types/KeyboardAccessory.d.ts +29 -0
  209. package/types/MovableView.d.ts +1 -1
  210. package/types/PageContainer.d.ts +115 -0
  211. package/types/ShareElement.d.ts +39 -0
  212. package/types/View.d.ts +1 -1
  213. package/types/VoipRoom.d.ts +71 -0
  214. package/types/common.d.ts +3 -8
  215. package/types/index.d.ts +72 -46
  216. package/virtual-list/react/createListComponent.js +4 -3
  217. package/dist/taro-components/p-0fb7f599.entry.js +0 -1
  218. package/dist/taro-components/p-2c5d57af.entry.js +0 -1
  219. package/dist/taro-components/p-382cabbc.system.entry.js +0 -1
  220. package/dist/taro-components/p-4ff67760.entry.js +0 -1
  221. package/dist/taro-components/p-5d84eaf0.entry.js +0 -1
  222. package/dist/taro-components/p-69be8189.system.entry.js +0 -1
  223. package/dist/taro-components/p-b685a487.system.entry.js +0 -1
  224. package/dist/taro-components/p-b6e0dca6.entry.js +0 -1
  225. package/dist/taro-components/p-c221cebb.system.entry.js +0 -1
  226. package/dist/taro-components/p-c5722042.entry.js +0 -1
  227. package/dist/taro-components/p-d52009d1.system.entry.js +0 -1
  228. package/dist/taro-components/p-f8d0dabb.entry.js +0 -1
  229. package/dist/taro-components/p-f9013b36.system.entry.js +0 -1
@@ -0,0 +1 @@
1
+ import{r as t,c as i,h as s,g as e}from"./p-49ae5efb.js";function h(t,i,s){if("search"===i&&(t="search"),s&&(t="password"),void 0===t)return"text";if(!t)throw new Error("unexpected type");return"digit"===t&&(t="number"),t}let n=class{constructor(s){t(this,s),this.onInput=i(this,"input",7),this.onFocus=i(this,"focus",7),this.onBlur=i(this,"blur",7),this.onConfirm=i(this,"confirm",7),this.onChange=i(this,"change",7),this.onKeyDown=i(this,"keydown",7),this.isOnComposition=!1,this.onInputExcuted=!1,this.password=!1,this.disabled=!1,this.maxlength=140,this.autoFocus=!1,this.confirmType="done",this.nativeProps={},this.handleInput=t=>{t.stopPropagation();const{type:i,maxlength:s,confirmType:e,password:n}=this;if(!this.isOnComposition&&!this.onInputExcuted){let o=t.target.value;const a=h(i,e,n);this.onInputExcuted=!0,"number"===a&&o&&s<=o.length&&(o=o.substring(0,s),t.target.value=o),this._value=o,this.onInput.emit({value:o,cursor:o.length})}},this.handleFocus=t=>{this.onInputExcuted=!1,this.onFocus.emit({value:t.target.value})},this.handleBlur=t=>{this.onBlur.emit({value:t.target.value})},this.handleChange=t=>{t.stopPropagation(),this.onChange.emit({value:t.target.value})},this.handleKeyDown=t=>{const{value:i}=t.target,s=t.keyCode||t.code;this.onInputExcuted=!1,t.stopPropagation(),this.onKeyDown.emit({value:i,cursor:i.length,keyCode:s}),13===s&&this.onConfirm.emit({value:i})},this.handleComposition=t=>{t.target instanceof HTMLInputElement&&("compositionend"===t.type?(this.isOnComposition=!1,this.onInput.emit({value:t.target.value})):this.isOnComposition=!0)}}watchHandler(t,i){t!==i&&(this._value=t)}watchFocus(t,i){var s;!i&&t&&(null===(s=this.inputRef)||void 0===s||s.focus())}componentWillLoad(){this._value=this.value}componentDidLoad(){var t,i,s,e;"file"===this.type?(this.fileListener=()=>{this.onInput.emit()},null===(t=this.inputRef)||void 0===t||t.addEventListener("change",this.fileListener)):(null===(i=this.inputRef)||void 0===i||i.addEventListener("compositionstart",this.handleComposition),null===(s=this.inputRef)||void 0===s||s.addEventListener("compositionend",this.handleComposition)),Object.defineProperty(this.el,"value",{get:()=>{var t;return null===(t=this.inputRef)||void 0===t?void 0:t.value},set:t=>{this._value=t},configurable:!0}),this.autoFocus&&(null===(e=this.inputRef)||void 0===e||e.focus())}disconnectedCallback(){var t;"file"===this.type&&(null===(t=this.inputRef)||void 0===t||t.removeEventListener("change",this.fileListener))}render(){const{_value:t,type:i,password:e,placeholder:n,disabled:o,maxlength:a,confirmType:r,name:l,nativeProps:c}=this;return s("input",Object.assign({ref:t=>{this.inputRef=t},class:"weui-input",value:(u=t,null!=u?u:""),type:h(i,r,e),placeholder:n,disabled:o,maxlength:a,name:l,onInput:this.handleInput,onFocus:this.handleFocus,onBlur:this.handleBlur,onChange:this.handleChange,onKeyDown:this.handleKeyDown},c));var u}get el(){return e(this)}static get watchers(){return{value:["watchHandler"],autoFocus:["watchFocus"]}}};n.style="taro-input-core{display:block}input{display:block;height:1.4rem;text-align:inherit;text-overflow:clip;overflow:hidden;white-space:nowrap}";export{n as taro_input_core}
@@ -0,0 +1 @@
1
+ System.register(["./p-93748645.system.js"],(function(e){"use strict";var t,n,r;return{setters:[function(e){t=e.r;n=e.h;r=e.H}],execute:function(){var o=e("taro_share_element_core",function(){function e(e){t(this,e)}e.prototype.componentDidLoad=function(){console.error("H5 暂不支持 ShareElement 组件!")};e.prototype.render=function(){return n(r,null)};return e}())}}}));
@@ -0,0 +1 @@
1
+ System.register(["./p-93748645.system.js"],(function(t){"use strict";var n,r,e;return{setters:[function(t){n=t.r;r=t.h;e=t.H}],execute:function(){var o=t("taro_functional_page_navigator_core",function(){function t(t){n(this,t)}t.prototype.componentDidLoad=function(){console.error("H5 暂不支持 FunctionalPageNavigator 组件!")};t.prototype.render=function(){return r(e,null)};return t}())}}}));
@@ -0,0 +1 @@
1
+ import{r as e,h as o,H as r}from"./p-49ae5efb.js";let a=class{constructor(o){e(this,o)}componentDidLoad(){console.error("H5 暂不支持 PageContainer 组件!")}render(){return o(r,null)}};export{a as taro_page_container_core}
@@ -0,0 +1 @@
1
+ import{r as o,h as r,H as t}from"./p-49ae5efb.js";let e=class{constructor(r){o(this,r)}componentDidLoad(){console.error("H5 暂不支持 Slot 组件!")}render(){return r(t,null)}};export{e as taro_slot_core}
@@ -0,0 +1 @@
1
+ import{h as t,r as a,c as r,H as e,g as s}from"./p-49ae5efb.js";import o from"@tarojs/taro";import{c as i}from"./p-6967e577.js";function h(t){return"/"===t.charAt(0)}function n(t,a){for(var r=a,e=r+1,s=t.length;e<s;r+=1,e+=1)t[r]=t[e];t.pop()}const b=t=>{let a,r=t||"";const e={path:null,query:null,fragment:null};return a=r.indexOf("#"),a>-1&&(e.fragment=r.substring(a+1),r=r.substring(0,a)),a=r.indexOf("?"),a>-1&&(e.query=r.substring(a+1),r=r.substring(0,a)),e.path=r,e},l=({index:a,isSelected:r=!1,textColor:e,iconPath:s,badgeText:o,showRedDot:h=!1,text:n,onSelect:b})=>{const l=i("weui-tabbar__item",{"weui-bar__item_on":r});return t("a",{key:a,href:"javascript:;",class:l,onClick:function(){b(a)}},t("span",{style:{display:"inline-block",position:"relative"}},t("img",{src:s,alt:"",class:"weui-tabbar__icon"}),!!o&&t("span",{class:"weui-badge taro-tabbar-badge",style:{position:"absolute",top:"-2px",right:"-13px"}},o),h&&t("span",{class:"weui-badge weui-badge_dot",style:{position:"absolute",top:"0",right:"-6px"}})),t("p",{class:"weui-tabbar__label",style:{color:e}},n))},d=t=>"/"===t[0]?t:`/${t}`,c=(t,a)=>((t,a)=>new RegExp("^"+a+"(\\/|\\?|#|$)","i").test(t))(t,a)?t.substr(a.length):t;let _=class{constructor(t){a(this,t),this.onLongPress=r(this,"longpress",7),this.homePage="",this.customRoutes=[],this.tabbarPos="bottom",this.selectedIndex=-1,this.status=0,this.getOriginUrl=t=>{const a=this.customRoutes.filter((([,a])=>b(a).path===b(t).path));return a.length?a[0][0]:t},this.getSelectedIndex=t=>{let a=-1;return this.list.forEach((({pagePath:r},e)=>{b(t).path===b(r).path&&(a=e)})),a},this.switchTab=t=>{this.selectedIndex=t,o.switchTab({url:this.list[t].pagePath})},this.switchTabHandler=({url:t,successHandler:a,errorHandler:r})=>{const e=function(t,a){void 0===a&&(a="");var r,e=t&&t.split("/")||[],s=a&&a.split("/")||[],o=t&&h(t),i=a&&h(a),b=o||i;if(t&&h(t)?s=e:e.length&&(s.pop(),s=s.concat(e)),!s.length)return"/";if(s.length){var l=s[s.length-1];r="."===l||".."===l||""===l}else r=!1;for(var d=0,c=s.length;c>=0;c--){var _=s[c];"."===_?n(s,c):".."===_?(n(s,c),d++):d&&(n(s,c),d--)}if(!b)for(;d--;d)s.unshift("..");!b||""===s[0]||s[0]&&h(s[0])||s.unshift("");var u=s.join("/");return r&&"/"!==u.substr(-1)&&(u+="/"),u}(t,this.getOriginUrl(this.getCurrentUrl()||this.homePage)),s=this.getSelectedIndex(e);s>-1?(this.switchTab(s),a({errMsg:"switchTab:ok"})):r({errMsg:`switchTab:fail page "${e}" is not found`})},this.routerChangeHandler=t=>{let a,r;if(t&&(a=t.toLocation),a&&a.path){const t=d(a.path);r=c("/"===t?this.homePage:t,this.conf.basename||"/")}else r=this.getCurrentUrl();this.selectedIndex=this.getSelectedIndex(this.getOriginUrl(r))},this.setTabBarBadgeHandler=({index:t,text:a,successHandler:r,errorHandler:e})=>{const s=[...this.list];t in s?(s[t].showRedDot=!1,s[t].badgeText=a,r({errMsg:"setTabBarBadge:ok"})):e({errMsg:"setTabBarBadge:fail tabbar item not found"}),this.list=s},this.removeTabBarBadgeHandler=({index:t,successHandler:a,errorHandler:r})=>{const e=[...this.list];t in e?(e[t].badgeText=null,e[t].badgeText=null,a({errMsg:"removeTabBarBadge:ok"})):r({errMsg:"removeTabBarBadge:fail tabbar item not found"}),this.list=e},this.showTabBarRedDotHandler=({index:t,successHandler:a,errorHandler:r})=>{const e=[...this.list];t in e?(e[t].badgeText=null,e[t].showRedDot=!0,a({errMsg:"showTabBarRedDot:ok"})):r({errMsg:"showTabBarRedDot:fail tabbar item not found"}),this.list=e},this.hideTabBarRedDotHandler=({index:t,successHandler:a,errorHandler:r})=>{const e=[...this.list];t in e?(e[t].showRedDot=!1,a({errMsg:"hideTabBarRedDot:ok"})):r({errMsg:"hideTabBarRedDot:fail tabbar item not found"}),this.list=e},this.showTabBarHandler=({successHandler:t})=>{this.status=0,t({errMsg:"showTabBar:ok"})},this.hideTabBarHandler=({animation:t,successHandler:a})=>{this.status=t?2:1,a({errMsg:"hideTabBar:ok"})},this.setTabBarStyleHandler=({color:t,selectedColor:a,backgroundColor:r,borderStyle:e,successHandler:s})=>{r&&(this.backgroundColor=r),e&&(this.borderStyle=e),t&&(this.color=t),a&&(this.selectedColor=a),s({errMsg:"setTabBarStyle:ok"})},this.setTabBarItemHandler=({index:t,iconPath:a,selectedIconPath:r,text:e,successHandler:s,errorHandler:o})=>{const i=[...this.list];t in i?(a&&(i[t].iconPath=a),r&&(i[t].selectedIconPath=r),e&&(i[t].text=e),s({errMsg:"setTabBarItem:ok"})):o({errMsg:"setTabBarItem:fail tabbar item not found"}),this.list=i};const e=this.conf.list,s=this.conf.customRoutes;if("[object Array]"!==Object.prototype.toString.call(e)||e.length<2||e.length>5)throw new Error("tabBar 配置错误");this.homePage=d(this.conf.homePage);for(let t in s){const a=s[t];t=d(t),"string"==typeof a?this.customRoutes.push([t,d(a)]):(null==a?void 0:a.length)>0&&this.customRoutes.push(...a.map((a=>[t,d(a)])))}e.forEach((t=>{0!==t.pagePath.indexOf("/")&&(t.pagePath="/"+t.pagePath)})),this.list=e,this.borderStyle=this.conf.borderStyle,this.backgroundColor=this.conf.backgroundColor,this.color=this.conf.color,this.selectedColor=this.conf.selectedColor}getCurrentUrl(){const t=this.conf.basename||"/";let a;if("hash"===this.conf.mode){const t=window.location.href,r=t.indexOf("#");a=-1===r?"":t.substring(r+1)}else a=location.pathname;const r=d(c(a,t));return"/"===r?this.homePage:r}bindEvent(){o.eventCenter.on("__taroRouterChange",this.routerChangeHandler),o.eventCenter.on("__taroSwitchTab",this.switchTabHandler),o.eventCenter.on("__taroSetTabBarBadge",this.setTabBarBadgeHandler),o.eventCenter.on("__taroRemoveTabBarBadge",this.removeTabBarBadgeHandler),o.eventCenter.on("__taroShowTabBarRedDotHandler",this.showTabBarRedDotHandler),o.eventCenter.on("__taroHideTabBarRedDotHandler",this.hideTabBarRedDotHandler),o.eventCenter.on("__taroShowTabBar",this.showTabBarHandler),o.eventCenter.on("__taroHideTabBar",this.hideTabBarHandler),o.eventCenter.on("__taroSetTabBarStyle",this.setTabBarStyleHandler),o.eventCenter.on("__taroSetTabBarItem",this.setTabBarItemHandler)}removeEvent(){o.eventCenter.off("__taroRouterChange",this.routerChangeHandler),o.eventCenter.off("__taroSwitchTab",this.switchTabHandler),o.eventCenter.off("__taroSetTabBarBadge",this.setTabBarBadgeHandler),o.eventCenter.off("__taroRemoveTabBarBadge",this.removeTabBarBadgeHandler),o.eventCenter.off("__taroShowTabBarRedDotHandler",this.showTabBarRedDotHandler),o.eventCenter.off("__taroHideTabBarRedDotHandler",this.hideTabBarRedDotHandler),o.eventCenter.off("__taroShowTabBar",this.showTabBarHandler),o.eventCenter.off("__taroHideTabBar",this.hideTabBarHandler),o.eventCenter.off("__taroSetTabBarStyle",this.setTabBarStyleHandler),o.eventCenter.off("__taroSetTabBarItem",this.setTabBarItemHandler)}componentDidLoad(){this.tabbarPos=this.tabbar.nextElementSibling?"top":"bottom",this.bindEvent(),this.routerChangeHandler()}disconnectedCallback(){this.removeEvent()}render(){const{tabbarPos:a="bottom"}=this,r=this.status,s=i("weui-tabbar",{[`taro-tabbar__border-${this.borderStyle||"black"}`]:!0});return t(e,{class:i("taro-tabbar__tabbar",`taro-tabbar__tabbar-${a}`,{"taro-tabbar__tabbar-hide":-1===this.selectedIndex||1===r,"taro-tabbar__tabbar-slideout":2===r})},t("div",{class:s,style:{backgroundColor:this.backgroundColor||""}},this.list.map(((a,r)=>{const e=this.selectedIndex===r;let s,o;return e?(s=this.selectedColor||"",o=a.selectedIconPath):(s=this.color||"",o=a.iconPath),t(l,{index:r,onSelect:this.switchTab.bind(this),isSelected:e,textColor:s,iconPath:o,text:a.text,badgeText:a.badgeText,showRedDot:a.showRedDot})}))))}get tabbar(){return s(this)}};_.style="html,body{height:100%}#app{height:100%}.taro-tabbar__border-white::before{border-top-color:#fff !important}.taro-tabbar__container{display:-ms-flexbox;display:flex;height:100%;-ms-flex-direction:column;flex-direction:column;overflow:hidden}.taro-tabbar__panel{-ms-flex:1;flex:1;position:relative;overflow:auto;-webkit-overflow-scrolling:touch}.taro-tabbar__tabbar{position:relative;height:50px;width:100%;-webkit-transition:bottom 0.2s, top 0.2s;transition:bottom 0.2s, top 0.2s}.taro-tabbar__tabbar-top{top:0}.taro-tabbar__tabbar-bottom{bottom:0}.taro-tabbar__tabbar-hide{display:none}.taro-tabbar__tabbar-slideout{top:-52px;-ms-flex:0 0;flex:0 0}.taro-tabbar__panel+.taro-tabbar__tabbar-slideout{top:auto;bottom:-52px}";export{_ as taro_tabbar}
@@ -0,0 +1 @@
1
+ import{r as o,h as r,H as e}from"./p-49ae5efb.js";let s=class{constructor(r){o(this,r)}componentDidLoad(){console.error("H5 暂不支持 VoipRoom 组件!")}render(){return r(e,null)}};export{s as taro_voip_room_core}
@@ -0,0 +1 @@
1
+ System.register(["./p-93748645.system.js"],(function(t){"use strict";var n,o,r;return{setters:[function(t){n=t.r;o=t.h;r=t.H}],execute:function(){var e=t("taro_official_account_core",function(){function t(t){n(this,t)}t.prototype.componentDidLoad=function(){console.error("H5 暂不支持 OfficialAccount 组件!")};t.prototype.render=function(){return o(r,null)};return t}())}}}));
@@ -0,0 +1 @@
1
+ System.register(["./p-93748645.system.js"],(function(e){"use strict";var t,r,n;return{setters:[function(e){t=e.r;r=e.h;n=e.H}],execute:function(){var o=e("taro_live_player_core",function(){function e(e){t(this,e)}e.prototype.componentDidLoad=function(){console.error("H5 暂不支持 LivePlayer 组件!")};e.prototype.render=function(){return r(n,null)};return e}())}}}));
@@ -0,0 +1 @@
1
+ System.register(["./p-93748645.system.js"],(function(t){"use strict";var n,r,e;return{setters:[function(t){n=t.r;r=t.h;e=t.H}],execute:function(){var o=t("taro_map_core",function(){function t(t){n(this,t)}t.prototype.componentDidLoad=function(){console.error("H5 暂不支持 Map 组件!")};t.prototype.render=function(){return r(e,null)};return t}())}}}));
@@ -0,0 +1 @@
1
+ import{r as t,c as e,h as i,g as h}from"./p-49ae5efb.js";function s(t){return null!=t?t:""}let a=class{constructor(i){t(this,i),this.onInput=e(this,"input",7),this.onFocus=e(this,"focus",7),this.onBlur=e(this,"blur",7),this.onChange=e(this,"change",7),this.onLineChange=e(this,"linechange",7),this.disabled=!1,this.maxlength=140,this.autoFocus=!1,this.autoHeight=!1,this.nativeProps={},this.line=1,this.hanldeInput=t=>{t.stopPropagation(),this.handleLineChange(),this.onInput.emit({value:t.target.value,cursor:t.target.value.length})},this.handleFocus=t=>{this.onFocus.emit({value:t.target.value})},this.handleBlur=t=>{this.onBlur.emit({value:t.target.value})},this.handleChange=t=>{t.stopPropagation(),this.onChange.emit({value:t.target.value})},this.handleLineChange=()=>{const t=this.getNumberOfLines();t!==this.line&&(this.line=t,this.onLineChange.emit({height:this.textareaRef.clientHeight,lineCount:this.line}))},this.calculateContentHeight=(t,e)=>{let i=t.style.height,h=t.offsetHeight,s=t.scrollHeight,a=t.style.overflow;if(!(h>=s))return s;if(t.style.height=h+e+"px",t.style.overflow="hidden",s<t.scrollHeight){for(;t.offsetHeight>=t.scrollHeight;)t.style.height=(h-=e)+"px";for(;t.offsetHeight<t.scrollHeight;)t.style.height=h+++"px";return t.style.height=i,t.style.overflow=a,h}},this.getNumberOfLines=()=>{const t=this.textareaRef,e=window.getComputedStyle?window.getComputedStyle(t):t.style,i=parseInt(e.lineHeight,10),h=this.calculateContentHeight(t,i);return Math.floor(h/i)}}componentDidLoad(){Object.defineProperty(this.el,"value",{get:()=>this.textareaRef.value,set:t=>this.value=t,configurable:!0}),this.autoFocus&&this.textareaRef.focus()}render(){const{value:t,placeholder:e,disabled:h,maxlength:a,autoFocus:o,autoHeight:r,name:n,nativeProps:u,hanldeInput:l,handleFocus:c,handleBlur:d,handleChange:p}=this,g={};return r&&(g.rows=this.line),i("textarea",Object.assign({ref:t=>{t&&(this.textareaRef=t)},class:"taro-textarea "+(r?"auto-height":""),value:s(t),placeholder:e,name:n,disabled:h,maxlength:a,autofocus:o,onInput:l,onFocus:c,onBlur:d,onChange:p},u,g))}get el(){return h(this)}};a.style="taro-textarea-core{display:block;width:300px}taro-textarea-core .auto-height{height:auto}.taro-textarea{-webkit-appearance:none;cursor:auto;width:100%;height:150px;border:0;display:block;position:relative;line-height:1.5}.taro-textarea:focus{outline:none}";export{a as taro_textarea_core}
@@ -0,0 +1 @@
1
+ System.register(["./p-93748645.system.js","@tarojs/taro","./p-696f0d1c.system.js"],(function(e){"use strict";var t,r,i,a,s,n;return{setters:[function(e){t=e.r;r=e.c;i=e.h;a=e.H},function(e){s=e.default},function(e){n=e.c}],execute:function(){var o=".navigator-hover{background:#efefef}";var c=e("taro_navigator_core",function(){function e(e){t(this,e);this.onSuccess=r(this,"cuccess",7);this.onFail=r(this,"fail",7);this.onComplete=r(this,"Complete",7);this.openType="navigate";this.isHover=false;this.delta=0}e.prototype.onClick=function(){var e=this,t=e.openType,r=e.onSuccess,i=e.onFail,a=e.onComplete;var n=Promise.resolve();switch(t){case"navigate":n=s.navigateTo({url:this.url});break;case"redirect":n=s.redirectTo({url:this.url});break;case"switchTab":n=s.switchTab({url:this.url});break;case"reLaunch":n=s.reLaunch({url:this.url});break;case"navigateBack":n=s.navigateBack({delta:this.delta});break;case"exit":n=Promise.reject(new Error('navigator:fail 暂不支持"openType: exit"'));break}if(n){n.then((function(e){r.emit(e)})).catch((function(e){i.emit(e)})).finally((function(){a.emit()}))}};e.prototype.render=function(){var e;var t=this,r=t.isHover,s=t.hoverClass;return i(a,{class:n((e={},e[s]=r,e))})};return e}());c.style=o}}}));
@@ -0,0 +1 @@
1
+ System.register(["./p-93748645.system.js"],(function(e){"use strict";var t,n,i,a;return{setters:[function(e){t=e.r;n=e.c;i=e.h;a=e.g}],execute:function(){var o="taro-textarea-core{display:block;width:300px}taro-textarea-core .auto-height{height:auto}.taro-textarea{-webkit-appearance:none;cursor:auto;width:100%;height:150px;border:0;display:block;position:relative;line-height:1.5}.taro-textarea:focus{outline:none}";function r(e){return e!==null&&e!==void 0?e:""}var h=e("taro_textarea_core",function(){function e(e){var i=this;t(this,e);this.onInput=n(this,"input",7);this.onFocus=n(this,"focus",7);this.onBlur=n(this,"blur",7);this.onChange=n(this,"change",7);this.onLineChange=n(this,"linechange",7);this.disabled=false;this.maxlength=140;this.autoFocus=false;this.autoHeight=false;this.nativeProps={};this.line=1;this.hanldeInput=function(e){e.stopPropagation();i.handleLineChange();i.onInput.emit({value:e.target.value,cursor:e.target.value.length})};this.handleFocus=function(e){i.onFocus.emit({value:e.target.value})};this.handleBlur=function(e){i.onBlur.emit({value:e.target.value})};this.handleChange=function(e){e.stopPropagation();i.onChange.emit({value:e.target.value})};this.handleLineChange=function(){var e=i.getNumberOfLines();if(e!==i.line){i.line=e;i.onLineChange.emit({height:i.textareaRef.clientHeight,lineCount:i.line})}};this.calculateContentHeight=function(e,t){var n=e.style.height,i=e.offsetHeight,a=e.scrollHeight,o=e.style.overflow;if(i>=a){e.style.height=i+t+"px";e.style.overflow="hidden";if(a<e.scrollHeight){while(e.offsetHeight>=e.scrollHeight){e.style.height=(i-=t)+"px"}while(e.offsetHeight<e.scrollHeight){e.style.height=i+++"px"}e.style.height=n;e.style.overflow=o;return i}}else{return a}};this.getNumberOfLines=function(){var e=i.textareaRef,t=window.getComputedStyle?window.getComputedStyle(e):e.style,n=parseInt(t.lineHeight,10),a=i.calculateContentHeight(e,n),o=Math.floor(a/n);return o}}e.prototype.componentDidLoad=function(){var e=this;Object.defineProperty(this.el,"value",{get:function(){return e.textareaRef.value},set:function(t){return e.value=t},configurable:true});this.autoFocus&&this.textareaRef.focus()};e.prototype.render=function(){var e=this;var t=this,n=t.value,a=t.placeholder,o=t.disabled,h=t.maxlength,l=t.autoFocus,s=t.autoHeight,u=t.name,c=t.nativeProps,g=t.hanldeInput,f=t.handleFocus,p=t.handleBlur,d=t.handleChange;var v={};if(s){v.rows=this.line}return i("textarea",Object.assign({ref:function(t){if(t){e.textareaRef=t}},class:"taro-textarea "+(s?"auto-height":""),value:r(n),placeholder:a,name:u,disabled:o,maxlength:h,autofocus:l,onInput:g,onFocus:f,onBlur:p,onChange:d},c,v))};Object.defineProperty(e.prototype,"el",{get:function(){return a(this)},enumerable:false,configurable:true});return e}());h.style=o}}}));
@@ -0,0 +1 @@
1
+ import{r as o,h as c,H as r}from"./p-49ae5efb.js";let t=class{constructor(c){o(this,c)}componentDidLoad(){console.error("H5 暂不支持 OfficialAccount 组件!")}render(){return c(r,null)}};export{t as taro_official_account_core}
@@ -0,0 +1 @@
1
+ import{r as o,h as r,H as e}from"./p-49ae5efb.js";let s=class{constructor(r){o(this,r)}componentDidLoad(){console.error("H5 暂不支持 KeyboardAccessory 组件!")}render(){return r(e,null)}};export{s as taro_keyboard_accessory_core}
@@ -0,0 +1 @@
1
+ import{r as o,h as a,H as r}from"./p-49ae5efb.js";let t=class{constructor(a){o(this,a)}componentDidLoad(){console.error("H5 暂不支持 FunctionalPageNavigator 组件!")}render(){return a(r,null)}};export{t as taro_functional_page_navigator_core}
@@ -0,0 +1 @@
1
+ import{r as e,c as s,h as t,H as a}from"./p-49ae5efb.js";import r from"@tarojs/taro";import{c as i}from"./p-6967e577.js";let o=class{constructor(t){e(this,t),this.onSuccess=s(this,"cuccess",7),this.onFail=s(this,"fail",7),this.onComplete=s(this,"Complete",7),this.openType="navigate",this.isHover=!1,this.delta=0}onClick(){const{openType:e,onSuccess:s,onFail:t,onComplete:a}=this;let i=Promise.resolve();switch(e){case"navigate":i=r.navigateTo({url:this.url});break;case"redirect":i=r.redirectTo({url:this.url});break;case"switchTab":i=r.switchTab({url:this.url});break;case"reLaunch":i=r.reLaunch({url:this.url});break;case"navigateBack":i=r.navigateBack({delta:this.delta});break;case"exit":i=Promise.reject(new Error('navigator:fail 暂不支持"openType: exit"'))}i&&i.then((e=>{s.emit(e)})).catch((e=>{t.emit(e)})).finally((()=>{a.emit()}))}render(){const{isHover:e,hoverClass:s}=this;return t(a,{class:i({[s]:e})})}};o.style=".navigator-hover{background:#efefef}";export{o as taro_navigator_core}
@@ -0,0 +1 @@
1
+ System.register(["./p-93748645.system.js","./p-696f0d1c.system.js"],(function(t){"use strict";var i,e,o,s,n;return{setters:[function(t){i=t.r;e=t.c;o=t.h;s=t.H},function(t){n=t.c}],execute:function(){var r="taro-cover-view-core{display:block}";var h=t("taro_cover_view_core",function(){function t(t){i(this,t);this.onLongPress=e(this,"longpress",7);this.hoverStartTime=50;this.hoverStayTime=400;this.hover=false;this.touch=false;this.startTime=0}t.prototype.onTouchStart=function(){var t=this;if(this.hoverClass){this.touch=true;setTimeout((function(){if(t.touch){t.hover=true}}),this.hoverStartTime)}this.timeoutEvent=setTimeout((function(){t.onLongPress.emit()}),350);this.startTime=Date.now()};t.prototype.onTouchMove=function(){clearTimeout(this.timeoutEvent)};t.prototype.onTouchEnd=function(){var t=this;var i=Date.now()-this.startTime;if(i<350){clearTimeout(this.timeoutEvent)}if(this.hoverClass){this.touch=false;setTimeout((function(){if(!t.touch){t.hover=false}}),this.hoverStayTime)}};t.prototype.render=function(){var t;var i=n((t={},t[""+this.hoverClass]=this.hover,t));var e={};if(!!this.animation){e["animation"]=this.animation;e["data-animation"]=this.animation}return o(s,Object.assign({class:i},e),o("slot",null))};return t}());h.style=r}}}));
@@ -0,0 +1 @@
1
+ import{r as e,h as r,H as o}from"./p-49ae5efb.js";let t=class{constructor(r){e(this,r)}componentDidLoad(){console.error("H5 暂不支持 ShareElement 组件!")}render(){return r(o,null)}};export{t as taro_share_element_core}
@@ -0,0 +1 @@
1
+ System.register(["./p-93748645.system.js"],(function(t){"use strict";var n,r,e;return{setters:[function(t){n=t.r;r=t.h;e=t.H}],execute:function(){var o=t("taro_navigation_bar_core",function(){function t(t){n(this,t)}t.prototype.componentDidLoad=function(){console.error("H5 暂不支持 NavigationBar 组件!")};t.prototype.render=function(){return r(e,null)};return t}())}}}));
@@ -0,0 +1 @@
1
+ import{r as o,h as r,H as a}from"./p-49ae5efb.js";let t=class{constructor(r){o(this,r)}componentDidLoad(){console.error("H5 暂不支持 NavigationBar 组件!")}render(){return r(a,null)}};export{t as taro_navigation_bar_core}
@@ -0,0 +1 @@
1
+ var __spreadArray=this&&this.__spreadArray||function(e,t){for(var r=0,a=t.length,o=e.length;r<a;r++,o++)e[o]=t[r];return e};System.register(["./p-93748645.system.js","@tarojs/taro","./p-696f0d1c.system.js"],(function(e){"use strict";var t,r,a,o,n,i,s;return{setters:[function(e){t=e.h;r=e.r;a=e.c;o=e.H;n=e.g},function(e){i=e.default},function(e){s=e.c}],execute:function(){function l(e){return e.charAt(0)==="/"}function d(e,t){for(var r=t,a=r+1,o=e.length;a<o;r+=1,a+=1){e[r]=e[a]}e.pop()}function b(e,t){if(t===undefined)t="";var r=e&&e.split("/")||[];var a=t&&t.split("/")||[];var o=e&&l(e);var n=t&&l(t);var i=o||n;if(e&&l(e)){a=r}else if(r.length){a.pop();a=a.concat(r)}if(!a.length)return"/";var s;if(a.length){var b=a[a.length-1];s=b==="."||b===".."||b===""}else{s=false}var h=0;for(var c=a.length;c>=0;c--){var f=a[c];if(f==="."){d(a,c)}else if(f===".."){d(a,c);h++}else if(h){d(a,c);h--}}if(!i)for(;h--;h)a.unshift("..");if(i&&a[0]!==""&&(!a[0]||!l(a[0])))a.unshift("");var u=a.join("/");if(s&&u.substr(-1)!=="/")u+="/";return u}var h=function(e){var t=e||"";var r;var a={path:null,query:null,fragment:null};r=t.indexOf("#");if(r>-1){a.fragment=t.substring(r+1);t=t.substring(0,r)}r=t.indexOf("?");if(r>-1){a.query=t.substring(r+1);t=t.substring(0,r)}a.path=t;return a};var c=function(e){var r=e.index,a=e.isSelected,o=a===void 0?false:a,n=e.textColor,i=e.iconPath,l=e.badgeText,d=e.showRedDot,b=d===void 0?false:d,h=e.text,c=e.onSelect;var f=s("weui-tabbar__item",{"weui-bar__item_on":o});var u={position:"absolute",top:"-2px",right:"-13px"};var v={position:"absolute",top:"0",right:"-6px"};function g(){c(r)}return t("a",{key:r,href:"javascript:;",class:f,onClick:g},t("span",{style:{display:"inline-block",position:"relative"}},t("img",{src:i,alt:"",class:"weui-tabbar__icon"}),!!l&&t("span",{class:"weui-badge taro-tabbar-badge",style:u},l),b&&t("span",{class:"weui-badge weui-badge_dot",style:v})),t("p",{class:"weui-tabbar__label",style:{color:n}},h))};var f="html,body{height:100%}#app{height:100%}.taro-tabbar__border-white::before{border-top-color:#fff !important}.taro-tabbar__container{display:-ms-flexbox;display:flex;height:100%;-ms-flex-direction:column;flex-direction:column;overflow:hidden}.taro-tabbar__panel{-ms-flex:1;flex:1;position:relative;overflow:auto;-webkit-overflow-scrolling:touch}.taro-tabbar__tabbar{position:relative;height:50px;width:100%;-webkit-transition:bottom 0.2s, top 0.2s;transition:bottom 0.2s, top 0.2s}.taro-tabbar__tabbar-top{top:0}.taro-tabbar__tabbar-bottom{bottom:0}.taro-tabbar__tabbar-hide{display:none}.taro-tabbar__tabbar-slideout{top:-52px;-ms-flex:0 0;flex:0 0}.taro-tabbar__panel+.taro-tabbar__tabbar-slideout{top:auto;bottom:-52px}";var u=function(e){return e[0]==="/"?e:"/"+e};var v=function(e,t){return new RegExp("^"+t+"(\\/|\\?|#|$)","i").test(e)};var g=function(e,t){return v(e,t)?e.substr(t.length):e};var _=0;var p=1;var T=2;var B="taro-tabbar__tabbar";var m="taro-tabbar__tabbar-hide";var H="taro-tabbar__tabbar-slideout";var x=e("taro_tabbar",function(){function e(e){var t=this;r(this,e);this.onLongPress=a(this,"longpress",7);this.homePage="";this.customRoutes=[];this.tabbarPos="bottom";this.selectedIndex=-1;this.status=_;this.getOriginUrl=function(e){var r=t.customRoutes.filter((function(t){var r=t[1];var a=h(r).path;var o=h(e).path;return a===o}));return r.length?r[0][0]:e};this.getSelectedIndex=function(e){var r=-1;t.list.forEach((function(t,a){var o=t.pagePath;var n=h(e).path;var i=h(o).path;if(n===i){r=a}}));return r};this.switchTab=function(e){t.selectedIndex=e;i.switchTab({url:t.list[e].pagePath})};this.switchTabHandler=function(e){var r=e.url,a=e.successHandler,o=e.errorHandler;var n=t.getOriginUrl(t.getCurrentUrl()||t.homePage);var i=b(r,n);var s=t.getSelectedIndex(i);if(s>-1){t.switchTab(s);a({errMsg:"switchTab:ok"})}else{o({errMsg:'switchTab:fail page "'+i+'" is not found'})}};this.routerChangeHandler=function(e){var r;var a;if(e){r=e.toLocation}if(r&&r.path){var o=u(r.path);a=g(o==="/"?t.homePage:o,t.conf.basename||"/")}else{a=t.getCurrentUrl()}t.selectedIndex=t.getSelectedIndex(t.getOriginUrl(a))};this.setTabBarBadgeHandler=function(e){var r=e.index,a=e.text,o=e.successHandler,n=e.errorHandler;var i=__spreadArray([],t.list);if(r in i){i[r].showRedDot=false;i[r].badgeText=a;o({errMsg:"setTabBarBadge:ok"})}else{n({errMsg:"setTabBarBadge:fail tabbar item not found"})}t.list=i};this.removeTabBarBadgeHandler=function(e){var r=e.index,a=e.successHandler,o=e.errorHandler;var n=__spreadArray([],t.list);if(r in n){n[r].badgeText=null;n[r].badgeText=null;a({errMsg:"removeTabBarBadge:ok"})}else{o({errMsg:"removeTabBarBadge:fail tabbar item not found"})}t.list=n};this.showTabBarRedDotHandler=function(e){var r=e.index,a=e.successHandler,o=e.errorHandler;var n=__spreadArray([],t.list);if(r in n){n[r].badgeText=null;n[r].showRedDot=true;a({errMsg:"showTabBarRedDot:ok"})}else{o({errMsg:"showTabBarRedDot:fail tabbar item not found"})}t.list=n};this.hideTabBarRedDotHandler=function(e){var r=e.index,a=e.successHandler,o=e.errorHandler;var n=__spreadArray([],t.list);if(r in n){n[r].showRedDot=false;a({errMsg:"hideTabBarRedDot:ok"})}else{o({errMsg:"hideTabBarRedDot:fail tabbar item not found"})}t.list=n};this.showTabBarHandler=function(e){var r=e.successHandler;t.status=_;r({errMsg:"showTabBar:ok"})};this.hideTabBarHandler=function(e){var r=e.animation,a=e.successHandler;t.status=r?T:p;a({errMsg:"hideTabBar:ok"})};this.setTabBarStyleHandler=function(e){var r=e.color,a=e.selectedColor,o=e.backgroundColor,n=e.borderStyle,i=e.successHandler;if(o)t.backgroundColor=o;if(n)t.borderStyle=n;if(r)t.color=r;if(a)t.selectedColor=a;i({errMsg:"setTabBarStyle:ok"})};this.setTabBarItemHandler=function(e){var r=e.index,a=e.iconPath,o=e.selectedIconPath,n=e.text,i=e.successHandler,s=e.errorHandler;var l=__spreadArray([],t.list);if(r in l){if(a)l[r].iconPath=a;if(o)l[r].selectedIconPath=o;if(n)l[r].text=n;i({errMsg:"setTabBarItem:ok"})}else{s({errMsg:"setTabBarItem:fail tabbar item not found"})}t.list=l};var o=this.conf.list;var n=this.conf.customRoutes;if(Object.prototype.toString.call(o)!=="[object Array]"||o.length<2||o.length>5){throw new Error("tabBar 配置错误")}this.homePage=u(this.conf.homePage);var s=function(e){var t;var r=n[e];e=u(e);if(typeof r==="string"){l.customRoutes.push([e,u(r)])}else if((r===null||r===void 0?void 0:r.length)>0){(t=l.customRoutes).push.apply(t,r.map((function(t){return[e,u(t)]})))}};var l=this;for(var d in n){s(d)}o.forEach((function(e){if(e.pagePath.indexOf("/")!==0){e.pagePath="/"+e.pagePath}}));this.list=o;this.borderStyle=this.conf.borderStyle;this.backgroundColor=this.conf.backgroundColor;this.color=this.conf.color;this.selectedColor=this.conf.selectedColor}e.prototype.getCurrentUrl=function(){var e=this.conf.mode;var t=this.conf.basename||"/";var r;if(e==="hash"){var a=window.location.href;var o=a.indexOf("#");r=o===-1?"":a.substring(o+1)}else{r=location.pathname}var n=u(g(r,t));return n==="/"?this.homePage:n};e.prototype.bindEvent=function(){i.eventCenter.on("__taroRouterChange",this.routerChangeHandler);i.eventCenter.on("__taroSwitchTab",this.switchTabHandler);i.eventCenter.on("__taroSetTabBarBadge",this.setTabBarBadgeHandler);i.eventCenter.on("__taroRemoveTabBarBadge",this.removeTabBarBadgeHandler);i.eventCenter.on("__taroShowTabBarRedDotHandler",this.showTabBarRedDotHandler);i.eventCenter.on("__taroHideTabBarRedDotHandler",this.hideTabBarRedDotHandler);i.eventCenter.on("__taroShowTabBar",this.showTabBarHandler);i.eventCenter.on("__taroHideTabBar",this.hideTabBarHandler);i.eventCenter.on("__taroSetTabBarStyle",this.setTabBarStyleHandler);i.eventCenter.on("__taroSetTabBarItem",this.setTabBarItemHandler)};e.prototype.removeEvent=function(){i.eventCenter.off("__taroRouterChange",this.routerChangeHandler);i.eventCenter.off("__taroSwitchTab",this.switchTabHandler);i.eventCenter.off("__taroSetTabBarBadge",this.setTabBarBadgeHandler);i.eventCenter.off("__taroRemoveTabBarBadge",this.removeTabBarBadgeHandler);i.eventCenter.off("__taroShowTabBarRedDotHandler",this.showTabBarRedDotHandler);i.eventCenter.off("__taroHideTabBarRedDotHandler",this.hideTabBarRedDotHandler);i.eventCenter.off("__taroShowTabBar",this.showTabBarHandler);i.eventCenter.off("__taroHideTabBar",this.hideTabBarHandler);i.eventCenter.off("__taroSetTabBarStyle",this.setTabBarStyleHandler);i.eventCenter.off("__taroSetTabBarItem",this.setTabBarItemHandler)};e.prototype.componentDidLoad=function(){this.tabbarPos=this.tabbar.nextElementSibling?"top":"bottom";this.bindEvent();this.routerChangeHandler()};e.prototype.disconnectedCallback=function(){this.removeEvent()};e.prototype.render=function(){var e,r;var a=this;var n=this.tabbarPos,i=n===void 0?"bottom":n;var l=this.status;var d=s("weui-tabbar",(e={},e["taro-tabbar__border-"+(this.borderStyle||"black")]=true,e));var b=this.selectedIndex===-1||l===p;var h=l===T;return t(o,{class:s(B,B+"-"+i,(r={},r[m]=b,r[H]=h,r))},t("div",{class:d,style:{backgroundColor:this.backgroundColor||""}},this.list.map((function(e,r){var o=a.selectedIndex===r;var n;var i;if(o){n=a.selectedColor||"";i=e.selectedIconPath}else{n=a.color||"";i=e.iconPath}return t(c,{index:r,onSelect:a.switchTab.bind(a),isSelected:o,textColor:n,iconPath:i,text:e.text,badgeText:e.badgeText,showRedDot:e.showRedDot})}))))};Object.defineProperty(e.prototype,"tabbar",{get:function(){return n(this)},enumerable:false,configurable:true});return e}());x.style=f}}}));