@tarojs/components 3.6.3 → 3.6.5-alpha

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 (110) hide show
  1. package/dist/cjs/taro-tabbar.cjs.entry.js +5 -2
  2. package/dist/collection/components/tabbar/tabbar.js +5 -2
  3. package/dist/components/taro-tabbar.js +5 -2
  4. package/dist/esm/taro-tabbar.entry.js +5 -2
  5. package/dist/esm-es5/taro-tabbar.entry.js +1 -1
  6. package/dist/taro-components/p-1c446c65.system.js +1 -1
  7. package/dist/taro-components/p-79c41bc2.entry.js +1 -0
  8. package/dist/taro-components/{p-efa51030.system.entry.js → p-9e8619a6.system.entry.js} +1 -1
  9. package/dist/taro-components/taro-components.esm.js +1 -1
  10. package/dist/types/components/tabbar/tabbar.d.ts +1 -1
  11. package/lib/react/component-lib/index.js +2 -3
  12. package/lib/react/component-lib/index.js.map +1 -1
  13. package/lib/react/component-lib/input.js +1 -1
  14. package/lib/react/component-lib/reactify-wc.js +3 -4
  15. package/lib/react/component-lib/reactify-wc.js.map +1 -1
  16. package/lib/react/components.js +3 -4
  17. package/lib/react/components.js.map +1 -1
  18. package/lib/react/react-component-lib/createComponent.js +2 -3
  19. package/lib/react/react-component-lib/createComponent.js.map +1 -1
  20. package/lib/react/react-component-lib/createOverlayComponent.js +2 -2
  21. package/lib/react/react-component-lib/utils/index.js +1 -1
  22. package/lib/vue2/component-lib/index.js +1 -1
  23. package/lib/vue2/components-loader.js +1 -1
  24. package/lib/vue2/components.js +1 -1
  25. package/lib/vue3/component-lib/createComponent.js +1 -2
  26. package/lib/vue3/component-lib/createComponent.js.map +1 -1
  27. package/lib/vue3/component-lib/createFormsComponent.js +1 -3
  28. package/lib/vue3/component-lib/createFormsComponent.js.map +1 -1
  29. package/lib/vue3/component-lib/forwardRef.js +1 -2
  30. package/lib/vue3/component-lib/forwardRef.js.map +1 -1
  31. package/lib/vue3/component-lib/icon.js +1 -2
  32. package/lib/vue3/component-lib/icon.js.map +1 -1
  33. package/lib/vue3/component-lib/image.js +1 -2
  34. package/lib/vue3/component-lib/image.js.map +1 -1
  35. package/lib/vue3/component-lib/scroll-view.js +1 -2
  36. package/lib/vue3/component-lib/scroll-view.js.map +1 -1
  37. package/lib/vue3/component-lib/text.js +1 -2
  38. package/lib/vue3/component-lib/text.js.map +1 -1
  39. package/lib/vue3/components.js +1 -2
  40. package/lib/vue3/components.js.map +1 -1
  41. package/lib/vue3/vue-component-lib/utils.js +1 -3
  42. package/lib/vue3/vue-component-lib/utils.js.map +1 -1
  43. package/package.json +4 -4
  44. package/dist/taro-components/p-4b579316.entry.js +0 -1
  45. package/lib/react/_virtual/_commonjsHelpers.js +0 -35
  46. package/lib/react/_virtual/_commonjsHelpers.js.map +0 -1
  47. package/lib/react/_virtual/index.js +0 -4
  48. package/lib/react/_virtual/index.js.map +0 -1
  49. package/lib/react/_virtual/index2.js +0 -4
  50. package/lib/react/_virtual/index2.js.map +0 -1
  51. package/lib/react/_virtual/index3.js +0 -7
  52. package/lib/react/_virtual/index3.js.map +0 -1
  53. package/lib/react/_virtual/index4.js +0 -7
  54. package/lib/react/_virtual/index4.js.map +0 -1
  55. package/lib/react/_virtual/index5.js +0 -4
  56. package/lib/react/_virtual/index5.js.map +0 -1
  57. package/lib/react/_virtual/react-dom.development.js +0 -2
  58. package/lib/react/_virtual/react-dom.development.js.map +0 -1
  59. package/lib/react/_virtual/react-dom.development2.js +0 -4
  60. package/lib/react/_virtual/react-dom.development2.js.map +0 -1
  61. package/lib/react/_virtual/react-dom.production.min.js +0 -2
  62. package/lib/react/_virtual/react-dom.production.min.js.map +0 -1
  63. package/lib/react/_virtual/react-dom.production.min2.js +0 -4
  64. package/lib/react/_virtual/react-dom.production.min2.js.map +0 -1
  65. package/lib/react/_virtual/react.development.js +0 -7
  66. package/lib/react/_virtual/react.development.js.map +0 -1
  67. package/lib/react/_virtual/react.development2.js +0 -4
  68. package/lib/react/_virtual/react.development2.js.map +0 -1
  69. package/lib/react/_virtual/react.production.min.js +0 -2
  70. package/lib/react/_virtual/react.production.min.js.map +0 -1
  71. package/lib/react/_virtual/react.production.min2.js +0 -4
  72. package/lib/react/_virtual/react.production.min2.js.map +0 -1
  73. package/lib/react/_virtual/scheduler.development.js +0 -2
  74. package/lib/react/_virtual/scheduler.development.js.map +0 -1
  75. package/lib/react/_virtual/scheduler.development2.js +0 -4
  76. package/lib/react/_virtual/scheduler.development2.js.map +0 -1
  77. package/lib/react/_virtual/scheduler.production.min.js +0 -2
  78. package/lib/react/_virtual/scheduler.production.min.js.map +0 -1
  79. package/lib/react/_virtual/scheduler.production.min2.js +0 -4
  80. package/lib/react/_virtual/scheduler.production.min2.js.map +0 -1
  81. package/lib/react/node_modules/.pnpm/registry.npmjs.org_react-dom@18.2.0_react@18.2.0/node_modules/react-dom/cjs/react-dom.development.js +0 -29893
  82. package/lib/react/node_modules/.pnpm/registry.npmjs.org_react-dom@18.2.0_react@18.2.0/node_modules/react-dom/cjs/react-dom.development.js.map +0 -1
  83. package/lib/react/node_modules/.pnpm/registry.npmjs.org_react-dom@18.2.0_react@18.2.0/node_modules/react-dom/cjs/react-dom.production.min.js +0 -337
  84. package/lib/react/node_modules/.pnpm/registry.npmjs.org_react-dom@18.2.0_react@18.2.0/node_modules/react-dom/cjs/react-dom.production.min.js.map +0 -1
  85. package/lib/react/node_modules/.pnpm/registry.npmjs.org_react-dom@18.2.0_react@18.2.0/node_modules/react-dom/index.js +0 -52
  86. package/lib/react/node_modules/.pnpm/registry.npmjs.org_react-dom@18.2.0_react@18.2.0/node_modules/react-dom/index.js.map +0 -1
  87. package/lib/react/node_modules/.pnpm/registry.npmjs.org_react@18.2.0/node_modules/react/cjs/react.development.js +0 -2749
  88. package/lib/react/node_modules/.pnpm/registry.npmjs.org_react@18.2.0/node_modules/react/cjs/react.development.js.map +0 -1
  89. package/lib/react/node_modules/.pnpm/registry.npmjs.org_react@18.2.0/node_modules/react/cjs/react.production.min.js +0 -34
  90. package/lib/react/node_modules/.pnpm/registry.npmjs.org_react@18.2.0/node_modules/react/cjs/react.production.min.js.map +0 -1
  91. package/lib/react/node_modules/.pnpm/registry.npmjs.org_react@18.2.0/node_modules/react/index.js +0 -21
  92. package/lib/react/node_modules/.pnpm/registry.npmjs.org_react@18.2.0/node_modules/react/index.js.map +0 -1
  93. package/lib/react/node_modules/.pnpm/registry.npmjs.org_scheduler@0.23.0/node_modules/scheduler/cjs/scheduler.development.js +0 -641
  94. package/lib/react/node_modules/.pnpm/registry.npmjs.org_scheduler@0.23.0/node_modules/scheduler/cjs/scheduler.development.js.map +0 -1
  95. package/lib/react/node_modules/.pnpm/registry.npmjs.org_scheduler@0.23.0/node_modules/scheduler/cjs/scheduler.production.min.js +0 -27
  96. package/lib/react/node_modules/.pnpm/registry.npmjs.org_scheduler@0.23.0/node_modules/scheduler/cjs/scheduler.production.min.js.map +0 -1
  97. package/lib/react/node_modules/.pnpm/registry.npmjs.org_scheduler@0.23.0/node_modules/scheduler/index.js +0 -21
  98. package/lib/react/node_modules/.pnpm/registry.npmjs.org_scheduler@0.23.0/node_modules/scheduler/index.js.map +0 -1
  99. package/lib/vue2/node_modules/.pnpm/registry.npmjs.org_vue@2.6.14/node_modules/vue/dist/vue.runtime.esm.js +0 -8494
  100. package/lib/vue2/node_modules/.pnpm/registry.npmjs.org_vue@2.6.14/node_modules/vue/dist/vue.runtime.esm.js.map +0 -1
  101. package/lib/vue3/node_modules/.pnpm/registry.npmjs.org_@vue_reactivity@3.2.37/node_modules/@vue/reactivity/dist/reactivity.esm-bundler.js +0 -1252
  102. package/lib/vue3/node_modules/.pnpm/registry.npmjs.org_@vue_reactivity@3.2.37/node_modules/@vue/reactivity/dist/reactivity.esm-bundler.js.map +0 -1
  103. package/lib/vue3/node_modules/.pnpm/registry.npmjs.org_@vue_runtime-core@3.2.37/node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js +0 -7856
  104. package/lib/vue3/node_modules/.pnpm/registry.npmjs.org_@vue_runtime-core@3.2.37/node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js.map +0 -1
  105. package/lib/vue3/node_modules/.pnpm/registry.npmjs.org_@vue_runtime-dom@3.2.37/node_modules/@vue/runtime-dom/dist/runtime-dom.esm-bundler.js +0 -1702
  106. package/lib/vue3/node_modules/.pnpm/registry.npmjs.org_@vue_runtime-dom@3.2.37/node_modules/@vue/runtime-dom/dist/runtime-dom.esm-bundler.js.map +0 -1
  107. package/lib/vue3/node_modules/.pnpm/registry.npmjs.org_@vue_shared@3.2.37/node_modules/@vue/shared/dist/shared.esm-bundler.js +0 -597
  108. package/lib/vue3/node_modules/.pnpm/registry.npmjs.org_@vue_shared@3.2.37/node_modules/@vue/shared/dist/shared.esm-bundler.js.map +0 -1
  109. package/lib/vue3/node_modules/.pnpm/registry.npmjs.org_vue@3.2.37/node_modules/vue/dist/vue.runtime.esm-bundler.js +0 -24
  110. package/lib/vue3/node_modules/.pnpm/registry.npmjs.org_vue@3.2.37/node_modules/vue/dist/vue.runtime.esm-bundler.js.map +0 -1
@@ -334,8 +334,11 @@ const Tabbar = class {
334
334
  this.selectedColor = undefined;
335
335
  this.selectedIndex = -1;
336
336
  this.status = STATUS_SHOW;
337
- const list = this.conf.list;
338
- const customRoutes = this.conf.customRoutes;
337
+ }
338
+ componentWillLoad() {
339
+ var _a, _b;
340
+ const list = ((_a = this.conf) === null || _a === void 0 ? void 0 : _a.list) || [];
341
+ const customRoutes = ((_b = this.conf) === null || _b === void 0 ? void 0 : _b.customRoutes) || {};
339
342
  if (Object.prototype.toString.call(list) !== '[object Array]' ||
340
343
  list.length < 2 ||
341
344
  list.length > 5) {
@@ -186,8 +186,11 @@ export class Tabbar {
186
186
  this.selectedColor = undefined;
187
187
  this.selectedIndex = -1;
188
188
  this.status = STATUS_SHOW;
189
- const list = this.conf.list;
190
- const customRoutes = this.conf.customRoutes;
189
+ }
190
+ componentWillLoad() {
191
+ var _a, _b;
192
+ const list = ((_a = this.conf) === null || _a === void 0 ? void 0 : _a.list) || [];
193
+ const customRoutes = ((_b = this.conf) === null || _b === void 0 ? void 0 : _b.customRoutes) || {};
191
194
  if (Object.prototype.toString.call(list) !== '[object Array]' ||
192
195
  list.length < 2 ||
193
196
  list.length > 5) {
@@ -327,8 +327,11 @@ const Tabbar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
327
327
  this.selectedColor = undefined;
328
328
  this.selectedIndex = -1;
329
329
  this.status = STATUS_SHOW;
330
- const list = this.conf.list;
331
- const customRoutes = this.conf.customRoutes;
330
+ }
331
+ componentWillLoad() {
332
+ var _a, _b;
333
+ const list = ((_a = this.conf) === null || _a === void 0 ? void 0 : _a.list) || [];
334
+ const customRoutes = ((_b = this.conf) === null || _b === void 0 ? void 0 : _b.customRoutes) || {};
332
335
  if (Object.prototype.toString.call(list) !== '[object Array]' ||
333
336
  list.length < 2 ||
334
337
  list.length > 5) {
@@ -326,8 +326,11 @@ const Tabbar = class {
326
326
  this.selectedColor = undefined;
327
327
  this.selectedIndex = -1;
328
328
  this.status = STATUS_SHOW;
329
- const list = this.conf.list;
330
- const customRoutes = this.conf.customRoutes;
329
+ }
330
+ componentWillLoad() {
331
+ var _a, _b;
332
+ const list = ((_a = this.conf) === null || _a === void 0 ? void 0 : _a.list) || [];
333
+ const customRoutes = ((_b = this.conf) === null || _b === void 0 ? void 0 : _b.customRoutes) || {};
331
334
  if (Object.prototype.toString.call(list) !== '[object Array]' ||
332
335
  list.length < 2 ||
333
336
  list.length > 5) {
@@ -1 +1 @@
1
- var __spreadArray=this&&this.__spreadArray||function(e,t,a){if(a||arguments.length===2)for(var r=0,o=t.length,n;r<o;r++){if(n||!(r in t)){if(!n)n=Array.prototype.slice.call(t,0,r);n[r]=t[r]}}return e.concat(n||Array.prototype.slice.call(t))};import{h,r as registerInstance,c as createEvent,H as Host,g as getElement}from"./index-c948674f.js";import Taro from"@tarojs/taro";import{c as classnames}from"./index-1d8e8acd.js";import{i as isVisible}from"./index-d1b03e47.js";var splitUrl=function(e){var t=e||"";var a;var r={path:null,query:null,fragment:null};a=t.indexOf("#");if(a>-1){r.fragment=t.substring(a+1);t=t.substring(0,a)}a=t.indexOf("?");if(a>-1){r.query=t.substring(a+1);t=t.substring(0,a)}r.path=t;return r};var addLeadingSlash=function(e){if(e===void 0){e=""}return e.charAt(0)==="/"?e:"/"+e};var hasBasename=function(e,t){if(e===void 0){e=""}if(t===void 0){t=""}return new RegExp("^"+t+"(\\/|\\?|#|$)","i").test(e)||e===t};var stripBasename=function(e,t){if(e===void 0){e=""}if(t===void 0){t=""}return hasBasename(e,t)?e.substring(t.length):e};var stripSuffix=function(e,t){if(e===void 0){e=""}if(t===void 0){t=""}return e.includes(t)?e.substring(0,e.length-t.length):e};var getCurrentPage=function(e,t){if(e===void 0){e="hash"}if(t===void 0){t="/"}var a=e==="hash"?location.hash.slice(1).split("?")[0]:location.pathname;return addLeadingSlash(stripBasename(a,t))};function isAbsolute(e){return e.charAt(0)==="/"}function spliceOne(e,t){for(var a=t,r=a+1,o=e.length;r<o;a+=1,r+=1){e[a]=e[r]}e.pop()}function resolvePathname(e,t){if(t===undefined)t="";var a=e&&e.split("/")||[];var r=t&&t.split("/")||[];var o=e&&isAbsolute(e);var n=t&&isAbsolute(t);var i=o||n;if(e&&isAbsolute(e)){r=a}else if(a.length){r.pop();r=r.concat(a)}if(!r.length)return"/";var s;if(r.length){var l=r[r.length-1];s=l==="."||l===".."||l===""}else{s=false}var d=0;for(var b=r.length;b>=0;b--){var h=r[b];if(h==="."){spliceOne(r,b)}else if(h===".."){spliceOne(r,b);d++}else if(d){spliceOne(r,b);d--}}if(!i)for(;d--;d)r.unshift("..");if(i&&r[0]!==""&&(!r[0]||!isAbsolute(r[0])))r.unshift("");var c=r.join("/");if(s&&c.substr(-1)!=="/")c+="/";return c}var TabbarItem=function(e){var t=e.index,a=e.isSelected,r=a===void 0?false:a,o=e.textColor,n=e.iconPath,i=e.badgeText,s=e.showRedDot,l=s===void 0?false:s,d=e.pagePath,b=e.text,c=e.onSelect;var f=classnames("weui-tabbar__item",{"weui-bar__item_on":r});var u={position:"absolute",top:"-2px",right:"-13px"};var v={position:"absolute",top:"0",right:"-6px"};function g(){var e=Taro.getCurrentPages().shift();if(typeof(e===null||e===void 0?void 0:e.onTabItemTap)==="function"&&isVisible(this)){e.onTabItemTap({index:t,pagePath:d,text:b})}c(t)}return h("a",{key:t,href:"javascript:;",class:f,onClick:g},h("span",{style:{display:"inline-block",position:"relative"}},h("img",{src:n,alt:"",class:"weui-tabbar__icon"}),!!i&&h("span",{class:"weui-badge taro-tabbar-badge",style:u},i),l&&h("span",{class:"weui-badge weui-badge_dot",style:v})),h("p",{class:"weui-tabbar__label",style:{color:o}},b))};var indexCss="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;overflow:hidden;-ms-flex-direction:column;flex-direction:column;height:100%}.taro-tabbar__panel{overflow:auto;position:relative;-ms-flex:1;flex:1;-webkit-overflow-scrolling:auto}.taro-tabbar__tabbar{position:relative;width:100%;height:50px;-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;margin-bottom:constant(safe-area-inset-bottom);margin-bottom:env(safe-area-inset-bottom)}.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 STATUS_SHOW=0;var STATUS_HIDE=1;var STATUS_SLIDEOUT=2;var basicTabBarClassName="taro-tabbar__tabbar";var hideTabBarClassName="taro-tabbar__tabbar-hide";var hideTabBarWithAnimationClassName="taro-tabbar__tabbar-slideout";var Tabbar=function(){function e(e){var t=this;registerInstance(this,e);this.onLongPress=createEvent(this,"longpress",7);this.homePage="";this.customRoutes=[];this.tabbarPos="bottom";this.getOriginUrl=function(e){var a=t.customRoutes.filter((function(t){var a=t[1];var r=splitUrl(a).path;var o=splitUrl(e).path;return r===o}));return stripSuffix(a.length?a[0][0]:e,".html")};this.getSelectedIndex=function(e){var a=-1;t.list.forEach((function(t,r){var o=t.pagePath;var n=splitUrl(e).path;var i=splitUrl(o).path;if(n===i){a=r}}));return a};this.switchTab=function(e){t.selectedIndex=e;Taro.switchTab({url:t.list[e].pagePath})};this.switchTabHandler=function(e){var a=e.url,r=e.successHandler,o=e.errorHandler;var n=t.getOriginUrl(t.getCurrentUrl()||t.homePage);var i=resolvePathname(a,n);var s=t.getSelectedIndex(i);if(s>-1){t.switchTab(s);r({errMsg:"switchTab:ok"})}else{o({errMsg:'switchTab:fail page "'.concat(i,'" is not found')})}};this.routerChangeHandler=function(e){var a;var r=(a=e===null||e===void 0?void 0:e.toLocation)===null||a===void 0?void 0:a.path;var o;if(typeof r==="string"){var n=t.conf.basename||"/";o=stripBasename(addLeadingSlash(r||t.homePage),n)||"/"}else{o=t.getCurrentUrl()}t.selectedIndex=t.getSelectedIndex(t.getOriginUrl(o))};this.setTabBarBadgeHandler=function(e){var a=e.index,r=e.text,o=e.successHandler,n=e.errorHandler;var i=__spreadArray([],t.list,true);if(a in i){i[a].showRedDot=false;i[a].badgeText=r;o({errMsg:"setTabBarBadge:ok"})}else{n({errMsg:"setTabBarBadge:fail tabbar item not found"})}t.list=i};this.removeTabBarBadgeHandler=function(e){var a=e.index,r=e.successHandler,o=e.errorHandler;var n=__spreadArray([],t.list,true);if(a in n){n[a].badgeText=null;n[a].badgeText=null;r({errMsg:"removeTabBarBadge:ok"})}else{o({errMsg:"removeTabBarBadge:fail tabbar item not found"})}t.list=n};this.showTabBarRedDotHandler=function(e){var a=e.index,r=e.successHandler,o=e.errorHandler;var n=__spreadArray([],t.list,true);if(a in n){n[a].badgeText=null;n[a].showRedDot=true;r({errMsg:"showTabBarRedDot:ok"})}else{o({errMsg:"showTabBarRedDot:fail tabbar item not found"})}t.list=n};this.hideTabBarRedDotHandler=function(e){var a=e.index,r=e.successHandler,o=e.errorHandler;var n=__spreadArray([],t.list,true);if(a in n){n[a].showRedDot=false;r({errMsg:"hideTabBarRedDot:ok"})}else{o({errMsg:"hideTabBarRedDot:fail tabbar item not found"})}t.list=n};this.showTabBarHandler=function(e){var a=e.successHandler;t.status=STATUS_SHOW;a({errMsg:"showTabBar:ok"})};this.hideTabBarHandler=function(e){var a=e.animation,r=e.successHandler;t.status=a?STATUS_SLIDEOUT:STATUS_HIDE;r({errMsg:"hideTabBar:ok"})};this.setTabBarStyleHandler=function(e){var a=e.color,r=e.selectedColor,o=e.backgroundColor,n=e.borderStyle,i=e.successHandler;if(o)t.backgroundColor=o;if(n)t.borderStyle=n;if(a)t.color=a;if(r)t.selectedColor=r;i({errMsg:"setTabBarStyle:ok"})};this.setTabBarItemHandler=function(e){var a=e.index,r=e.iconPath,o=e.selectedIconPath,n=e.text,i=e.successHandler,s=e.errorHandler;var l=__spreadArray([],t.list,true);if(a in l){if(r)l[a].iconPath=r;if(o)l[a].selectedIconPath=o;if(n)l[a].text=n;i({errMsg:"setTabBarItem:ok"})}else{s({errMsg:"setTabBarItem:fail tabbar item not found"})}t.list=l};this.conf=undefined;this.list=undefined;this.borderStyle=undefined;this.backgroundColor=undefined;this.color=undefined;this.selectedColor=undefined;this.selectedIndex=-1;this.status=STATUS_SHOW;var a=this.conf.list;var r=this.conf.customRoutes;if(Object.prototype.toString.call(a)!=="[object Array]"||a.length<2||a.length>5){throw new Error("tabBar 配置错误")}this.homePage=addLeadingSlash(this.conf.homePage);var o=function(e){var t;var a=r[e];e=addLeadingSlash(e);if(typeof a==="string"){n.customRoutes.push([e,addLeadingSlash(a)])}else if((a===null||a===void 0?void 0:a.length)>0){(t=n.customRoutes).push.apply(t,a.map((function(t){return[e,addLeadingSlash(t)]})))}};var n=this;for(var i in r){o(i)}a.forEach((function(e){if(e.pagePath.indexOf("/")!==0){e.pagePath="/"+e.pagePath}}));this.list=a;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=getCurrentPage(this.conf.mode,this.conf.basename);return decodeURI(e==="/"?this.homePage:e)};e.prototype.bindEvent=function(){Taro.eventCenter.on("__taroRouterChange",this.routerChangeHandler);Taro.eventCenter.on("__taroSwitchTab",this.switchTabHandler);Taro.eventCenter.on("__taroSetTabBarBadge",this.setTabBarBadgeHandler);Taro.eventCenter.on("__taroRemoveTabBarBadge",this.removeTabBarBadgeHandler);Taro.eventCenter.on("__taroShowTabBarRedDotHandler",this.showTabBarRedDotHandler);Taro.eventCenter.on("__taroHideTabBarRedDotHandler",this.hideTabBarRedDotHandler);Taro.eventCenter.on("__taroShowTabBar",this.showTabBarHandler);Taro.eventCenter.on("__taroHideTabBar",this.hideTabBarHandler);Taro.eventCenter.on("__taroSetTabBarStyle",this.setTabBarStyleHandler);Taro.eventCenter.on("__taroSetTabBarItem",this.setTabBarItemHandler)};e.prototype.removeEvent=function(){Taro.eventCenter.off("__taroRouterChange",this.routerChangeHandler);Taro.eventCenter.off("__taroSwitchTab",this.switchTabHandler);Taro.eventCenter.off("__taroSetTabBarBadge",this.setTabBarBadgeHandler);Taro.eventCenter.off("__taroRemoveTabBarBadge",this.removeTabBarBadgeHandler);Taro.eventCenter.off("__taroShowTabBarRedDotHandler",this.showTabBarRedDotHandler);Taro.eventCenter.off("__taroHideTabBarRedDotHandler",this.hideTabBarRedDotHandler);Taro.eventCenter.off("__taroShowTabBar",this.showTabBarHandler);Taro.eventCenter.off("__taroHideTabBar",this.hideTabBarHandler);Taro.eventCenter.off("__taroSetTabBarStyle",this.setTabBarStyleHandler);Taro.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,t;var a=this;var r=this.tabbarPos,o=r===void 0?"bottom":r;var n=this.status;var i=classnames("weui-tabbar",(e={},e["taro-tabbar__border-".concat(this.borderStyle||"black")]=true,e));var s=this.selectedIndex===-1||n===STATUS_HIDE;var l=n===STATUS_SLIDEOUT;return h(Host,{class:classnames(basicTabBarClassName,"".concat(basicTabBarClassName,"-").concat(o),(t={},t[hideTabBarClassName]=s,t[hideTabBarWithAnimationClassName]=l,t))},h("div",{class:i,style:{backgroundColor:this.backgroundColor||"",height:"inherit"}},this.list.map((function(e,t){var r=a.selectedIndex===t;var o;var n;if(r){o=a.selectedColor||"";n=e.selectedIconPath}else{o=a.color||"";n=e.iconPath}return h(TabbarItem,{index:t,onSelect:a.switchTab.bind(a),isSelected:r,textColor:o,iconPath:n,pagePath:e.pagePath,text:e.text,badgeText:e.badgeText,showRedDot:e.showRedDot})}))))};Object.defineProperty(e.prototype,"tabbar",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();Tabbar.style=indexCss;export{Tabbar as taro_tabbar};
1
+ var __spreadArray=this&&this.__spreadArray||function(e,t,a){if(a||arguments.length===2)for(var r=0,o=t.length,n;r<o;r++){if(n||!(r in t)){if(!n)n=Array.prototype.slice.call(t,0,r);n[r]=t[r]}}return e.concat(n||Array.prototype.slice.call(t))};import{h,r as registerInstance,c as createEvent,H as Host,g as getElement}from"./index-c948674f.js";import Taro from"@tarojs/taro";import{c as classnames}from"./index-1d8e8acd.js";import{i as isVisible}from"./index-d1b03e47.js";var splitUrl=function(e){var t=e||"";var a;var r={path:null,query:null,fragment:null};a=t.indexOf("#");if(a>-1){r.fragment=t.substring(a+1);t=t.substring(0,a)}a=t.indexOf("?");if(a>-1){r.query=t.substring(a+1);t=t.substring(0,a)}r.path=t;return r};var addLeadingSlash=function(e){if(e===void 0){e=""}return e.charAt(0)==="/"?e:"/"+e};var hasBasename=function(e,t){if(e===void 0){e=""}if(t===void 0){t=""}return new RegExp("^"+t+"(\\/|\\?|#|$)","i").test(e)||e===t};var stripBasename=function(e,t){if(e===void 0){e=""}if(t===void 0){t=""}return hasBasename(e,t)?e.substring(t.length):e};var stripSuffix=function(e,t){if(e===void 0){e=""}if(t===void 0){t=""}return e.includes(t)?e.substring(0,e.length-t.length):e};var getCurrentPage=function(e,t){if(e===void 0){e="hash"}if(t===void 0){t="/"}var a=e==="hash"?location.hash.slice(1).split("?")[0]:location.pathname;return addLeadingSlash(stripBasename(a,t))};function isAbsolute(e){return e.charAt(0)==="/"}function spliceOne(e,t){for(var a=t,r=a+1,o=e.length;r<o;a+=1,r+=1){e[a]=e[r]}e.pop()}function resolvePathname(e,t){if(t===undefined)t="";var a=e&&e.split("/")||[];var r=t&&t.split("/")||[];var o=e&&isAbsolute(e);var n=t&&isAbsolute(t);var i=o||n;if(e&&isAbsolute(e)){r=a}else if(a.length){r.pop();r=r.concat(a)}if(!r.length)return"/";var s;if(r.length){var l=r[r.length-1];s=l==="."||l===".."||l===""}else{s=false}var d=0;for(var b=r.length;b>=0;b--){var h=r[b];if(h==="."){spliceOne(r,b)}else if(h===".."){spliceOne(r,b);d++}else if(d){spliceOne(r,b);d--}}if(!i)for(;d--;d)r.unshift("..");if(i&&r[0]!==""&&(!r[0]||!isAbsolute(r[0])))r.unshift("");var c=r.join("/");if(s&&c.substr(-1)!=="/")c+="/";return c}var TabbarItem=function(e){var t=e.index,a=e.isSelected,r=a===void 0?false:a,o=e.textColor,n=e.iconPath,i=e.badgeText,s=e.showRedDot,l=s===void 0?false:s,d=e.pagePath,b=e.text,c=e.onSelect;var f=classnames("weui-tabbar__item",{"weui-bar__item_on":r});var u={position:"absolute",top:"-2px",right:"-13px"};var v={position:"absolute",top:"0",right:"-6px"};function g(){var e=Taro.getCurrentPages().shift();if(typeof(e===null||e===void 0?void 0:e.onTabItemTap)==="function"&&isVisible(this)){e.onTabItemTap({index:t,pagePath:d,text:b})}c(t)}return h("a",{key:t,href:"javascript:;",class:f,onClick:g},h("span",{style:{display:"inline-block",position:"relative"}},h("img",{src:n,alt:"",class:"weui-tabbar__icon"}),!!i&&h("span",{class:"weui-badge taro-tabbar-badge",style:u},i),l&&h("span",{class:"weui-badge weui-badge_dot",style:v})),h("p",{class:"weui-tabbar__label",style:{color:o}},b))};var indexCss="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;overflow:hidden;-ms-flex-direction:column;flex-direction:column;height:100%}.taro-tabbar__panel{overflow:auto;position:relative;-ms-flex:1;flex:1;-webkit-overflow-scrolling:auto}.taro-tabbar__tabbar{position:relative;width:100%;height:50px;-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;margin-bottom:constant(safe-area-inset-bottom);margin-bottom:env(safe-area-inset-bottom)}.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 STATUS_SHOW=0;var STATUS_HIDE=1;var STATUS_SLIDEOUT=2;var basicTabBarClassName="taro-tabbar__tabbar";var hideTabBarClassName="taro-tabbar__tabbar-hide";var hideTabBarWithAnimationClassName="taro-tabbar__tabbar-slideout";var Tabbar=function(){function e(e){var t=this;registerInstance(this,e);this.onLongPress=createEvent(this,"longpress",7);this.homePage="";this.customRoutes=[];this.tabbarPos="bottom";this.getOriginUrl=function(e){var a=t.customRoutes.filter((function(t){var a=t[1];var r=splitUrl(a).path;var o=splitUrl(e).path;return r===o}));return stripSuffix(a.length?a[0][0]:e,".html")};this.getSelectedIndex=function(e){var a=-1;t.list.forEach((function(t,r){var o=t.pagePath;var n=splitUrl(e).path;var i=splitUrl(o).path;if(n===i){a=r}}));return a};this.switchTab=function(e){t.selectedIndex=e;Taro.switchTab({url:t.list[e].pagePath})};this.switchTabHandler=function(e){var a=e.url,r=e.successHandler,o=e.errorHandler;var n=t.getOriginUrl(t.getCurrentUrl()||t.homePage);var i=resolvePathname(a,n);var s=t.getSelectedIndex(i);if(s>-1){t.switchTab(s);r({errMsg:"switchTab:ok"})}else{o({errMsg:'switchTab:fail page "'.concat(i,'" is not found')})}};this.routerChangeHandler=function(e){var a;var r=(a=e===null||e===void 0?void 0:e.toLocation)===null||a===void 0?void 0:a.path;var o;if(typeof r==="string"){var n=t.conf.basename||"/";o=stripBasename(addLeadingSlash(r||t.homePage),n)||"/"}else{o=t.getCurrentUrl()}t.selectedIndex=t.getSelectedIndex(t.getOriginUrl(o))};this.setTabBarBadgeHandler=function(e){var a=e.index,r=e.text,o=e.successHandler,n=e.errorHandler;var i=__spreadArray([],t.list,true);if(a in i){i[a].showRedDot=false;i[a].badgeText=r;o({errMsg:"setTabBarBadge:ok"})}else{n({errMsg:"setTabBarBadge:fail tabbar item not found"})}t.list=i};this.removeTabBarBadgeHandler=function(e){var a=e.index,r=e.successHandler,o=e.errorHandler;var n=__spreadArray([],t.list,true);if(a in n){n[a].badgeText=null;n[a].badgeText=null;r({errMsg:"removeTabBarBadge:ok"})}else{o({errMsg:"removeTabBarBadge:fail tabbar item not found"})}t.list=n};this.showTabBarRedDotHandler=function(e){var a=e.index,r=e.successHandler,o=e.errorHandler;var n=__spreadArray([],t.list,true);if(a in n){n[a].badgeText=null;n[a].showRedDot=true;r({errMsg:"showTabBarRedDot:ok"})}else{o({errMsg:"showTabBarRedDot:fail tabbar item not found"})}t.list=n};this.hideTabBarRedDotHandler=function(e){var a=e.index,r=e.successHandler,o=e.errorHandler;var n=__spreadArray([],t.list,true);if(a in n){n[a].showRedDot=false;r({errMsg:"hideTabBarRedDot:ok"})}else{o({errMsg:"hideTabBarRedDot:fail tabbar item not found"})}t.list=n};this.showTabBarHandler=function(e){var a=e.successHandler;t.status=STATUS_SHOW;a({errMsg:"showTabBar:ok"})};this.hideTabBarHandler=function(e){var a=e.animation,r=e.successHandler;t.status=a?STATUS_SLIDEOUT:STATUS_HIDE;r({errMsg:"hideTabBar:ok"})};this.setTabBarStyleHandler=function(e){var a=e.color,r=e.selectedColor,o=e.backgroundColor,n=e.borderStyle,i=e.successHandler;if(o)t.backgroundColor=o;if(n)t.borderStyle=n;if(a)t.color=a;if(r)t.selectedColor=r;i({errMsg:"setTabBarStyle:ok"})};this.setTabBarItemHandler=function(e){var a=e.index,r=e.iconPath,o=e.selectedIconPath,n=e.text,i=e.successHandler,s=e.errorHandler;var l=__spreadArray([],t.list,true);if(a in l){if(r)l[a].iconPath=r;if(o)l[a].selectedIconPath=o;if(n)l[a].text=n;i({errMsg:"setTabBarItem:ok"})}else{s({errMsg:"setTabBarItem:fail tabbar item not found"})}t.list=l};this.conf=undefined;this.list=undefined;this.borderStyle=undefined;this.backgroundColor=undefined;this.color=undefined;this.selectedColor=undefined;this.selectedIndex=-1;this.status=STATUS_SHOW}e.prototype.componentWillLoad=function(){var e,t;var a=((e=this.conf)===null||e===void 0?void 0:e.list)||[];var r=((t=this.conf)===null||t===void 0?void 0:t.customRoutes)||{};if(Object.prototype.toString.call(a)!=="[object Array]"||a.length<2||a.length>5){throw new Error("tabBar 配置错误")}this.homePage=addLeadingSlash(this.conf.homePage);var o=function(e){var t;var a=r[e];e=addLeadingSlash(e);if(typeof a==="string"){n.customRoutes.push([e,addLeadingSlash(a)])}else if((a===null||a===void 0?void 0:a.length)>0){(t=n.customRoutes).push.apply(t,a.map((function(t){return[e,addLeadingSlash(t)]})))}};var n=this;for(var i in r){o(i)}a.forEach((function(e){if(e.pagePath.indexOf("/")!==0){e.pagePath="/"+e.pagePath}}));this.list=a;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=getCurrentPage(this.conf.mode,this.conf.basename);return decodeURI(e==="/"?this.homePage:e)};e.prototype.bindEvent=function(){Taro.eventCenter.on("__taroRouterChange",this.routerChangeHandler);Taro.eventCenter.on("__taroSwitchTab",this.switchTabHandler);Taro.eventCenter.on("__taroSetTabBarBadge",this.setTabBarBadgeHandler);Taro.eventCenter.on("__taroRemoveTabBarBadge",this.removeTabBarBadgeHandler);Taro.eventCenter.on("__taroShowTabBarRedDotHandler",this.showTabBarRedDotHandler);Taro.eventCenter.on("__taroHideTabBarRedDotHandler",this.hideTabBarRedDotHandler);Taro.eventCenter.on("__taroShowTabBar",this.showTabBarHandler);Taro.eventCenter.on("__taroHideTabBar",this.hideTabBarHandler);Taro.eventCenter.on("__taroSetTabBarStyle",this.setTabBarStyleHandler);Taro.eventCenter.on("__taroSetTabBarItem",this.setTabBarItemHandler)};e.prototype.removeEvent=function(){Taro.eventCenter.off("__taroRouterChange",this.routerChangeHandler);Taro.eventCenter.off("__taroSwitchTab",this.switchTabHandler);Taro.eventCenter.off("__taroSetTabBarBadge",this.setTabBarBadgeHandler);Taro.eventCenter.off("__taroRemoveTabBarBadge",this.removeTabBarBadgeHandler);Taro.eventCenter.off("__taroShowTabBarRedDotHandler",this.showTabBarRedDotHandler);Taro.eventCenter.off("__taroHideTabBarRedDotHandler",this.hideTabBarRedDotHandler);Taro.eventCenter.off("__taroShowTabBar",this.showTabBarHandler);Taro.eventCenter.off("__taroHideTabBar",this.hideTabBarHandler);Taro.eventCenter.off("__taroSetTabBarStyle",this.setTabBarStyleHandler);Taro.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,t;var a=this;var r=this.tabbarPos,o=r===void 0?"bottom":r;var n=this.status;var i=classnames("weui-tabbar",(e={},e["taro-tabbar__border-".concat(this.borderStyle||"black")]=true,e));var s=this.selectedIndex===-1||n===STATUS_HIDE;var l=n===STATUS_SLIDEOUT;return h(Host,{class:classnames(basicTabBarClassName,"".concat(basicTabBarClassName,"-").concat(o),(t={},t[hideTabBarClassName]=s,t[hideTabBarWithAnimationClassName]=l,t))},h("div",{class:i,style:{backgroundColor:this.backgroundColor||"",height:"inherit"}},this.list.map((function(e,t){var r=a.selectedIndex===t;var o;var n;if(r){o=a.selectedColor||"";n=e.selectedIconPath}else{o=a.color||"";n=e.iconPath}return h(TabbarItem,{index:t,onSelect:a.switchTab.bind(a),isSelected:r,textColor:o,iconPath:n,pagePath:e.pagePath,text:e.text,badgeText:e.badgeText,showRedDot:e.showRedDot})}))))};Object.defineProperty(e.prototype,"tabbar",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();Tabbar.style=indexCss;export{Tabbar as taro_tabbar};
@@ -1 +1 @@
1
- System.register(["./p-1a0e1932.system.js"],(function(e,o){"use strict";var t,r;return{setters:[function(o){t=o.p;r=o.b;e("setNonce",o.s)}],execute:function(){var e=function(){var e=o.meta.url;var r={};if(e!==""){r.resourcesUrl=new URL(".",e).href}return t(r)};e().then((function(e){return r(JSON.parse('[["p-56da1da3.system",[[4,"taro-checkbox-core",{"name":[1],"value":[1],"color":[1],"id":[1025],"checked":[4],"disabled":[4],"nativeProps":[16],"isWillLoadCalled":[32]}],[0,"taro-checkbox-group-core",{"name":[8]},[[0,"checkboxchange","function"]]]]],["p-c33733b3.system",[[0,"taro-movable-area-core",{"scaleArea":[4,"scale-area"]}],[0,"taro-movable-view-core",{"x":[8],"y":[8],"direction":[1],"outOfBounds":[4,"out-of-bounds"],"inertia":[4],"friction":[2],"damping":[2],"disabled":[4],"scale":[4],"scaleMin":[2,"scale-min"],"scaleMax":[2,"scale-max"],"scaleValue":[2,"scale-value"],"animation":[4],"setParent":[64],"endScale":[64],"setScale":[64]}]]],["p-6dae898a.system",[[0,"taro-picker-view-column-core",{"col":[1],"initialPosition":[1,"initial-position"],"paddingVertical":[2,"padding-vertical"],"isInit":[32],"isMove":[32]},[[1,"scroll","onScroll"],[1,"mouseup","onMouseEnd"],[1,"mouseout","onMouseEnd"],[1,"mouseleave","onMouseEnd"],[1,"touchend","onTouchEnd"]]],[4,"taro-picker-view-core",{"indicatorStyle":[1,"indicator-style"],"indicatorClass":[1,"indicator-class"],"value":[16],"maskStyle":[1,"mask-style"],"maskClass":[1,"mask-class"]},[[0,"onselect","onSelect"],[0,"onselectstart","onSelectStart"],[0,"onselectend","onPickerColEnd"]]]]],["p-4086e546.system",[[4,"taro-radio-core",{"name":[1],"value":[1],"id":[1025],"checked":[1540],"disabled":[4],"nativeProps":[16],"isWillLoadCalled":[32]}],[0,"taro-radio-group-core",{"name":[8]},[[0,"radiochange","function"]]]]],["p-58f9a827.system",[[4,"taro-swiper-core",{"indicatorDots":[4,"indicator-dots"],"indicatorColor":[1,"indicator-color"],"indicatorActiveColor":[1,"indicator-active-color"],"autoplay":[4],"current":[2],"interval":[2],"duration":[2],"circular":[4],"vertical":[4],"previousMargin":[1,"previous-margin"],"nextMargin":[1,"next-margin"],"displayMultipleItems":[2,"display-multiple-items"],"full":[4],"zoom":[4],"swiperWrapper":[32],"swiper":[32],"isWillLoadCalled":[32],"observer":[32],"observerFirst":[32],"observerLast":[32]}],[0,"taro-swiper-item-core",{"itemId":[1,"item-id"]}]]],["p-b2bb02d7.system",[[0,"taro-ad-core"]]],["p-08bb8dfc.system",[[0,"taro-ad-custom-core"]]],["p-b1c972e2.system",[[0,"taro-animation-video-core"]]],["p-9d4fa0d3.system",[[0,"taro-animation-view-core"]]],["p-46244579.system",[[0,"taro-ar-camera-core"]]],["p-69fa7272.system",[[0,"taro-audio-core",{"src":[1],"controls":[4],"autoplay":[4],"loop":[4],"muted":[4],"nativeProps":[16]}]]],["p-78c30850.system",[[0,"taro-aweme-data-core"]]],["p-7dd9c8da.system",[[0,"taro-block-core"]]],["p-623b3eb6.system",[[4,"taro-button-core",{"disabled":[4],"hoverClass":[1,"hover-class"],"type":[1],"hoverStartTime":[2,"hover-start-time"],"hoverStayTime":[2,"hover-stay-time"],"size":[1],"plain":[4],"loading":[4],"formType":[513,"form-type"],"hover":[32],"touch":[32]},[[0,"click","onClick"],[1,"touchstart","onTouchStart"],[1,"touchend","onTouchEnd"]]]]],["p-b1249ebb.system",[[0,"taro-camera-core"]]],["p-17302fe9.system",[[0,"taro-canvas-core",{"canvasId":[1,"canvas-id"],"nativeProps":[16]}]]],["p-4d7182f4.system",[[0,"taro-channel-live-core"]]],["p-4514dc53.system",[[0,"taro-channel-video-core"]]],["p-da5cdbf5.system",[[0,"taro-comment-detail-core"]]],["p-c586a796.system",[[0,"taro-comment-list-core"]]],["p-97782cdd.system",[[0,"taro-contact-button-core"]]],["p-4d0da795.system",[[0,"taro-cover-image-core",{"src":[1],"nativeProps":[16]}]]],["p-2024e133.system",[[4,"taro-cover-view-core",{"animation":[1],"hoverClass":[1,"hover-class"],"hoverStartTime":[2,"hover-start-time"],"hoverStayTime":[2,"hover-stay-time"],"hover":[32],"touch":[32]},[[1,"touchstart","onTouchStart"],[1,"touchmove","onTouchMove"],[1,"touchend","onTouchEnd"]]]]],["p-1941d333.system",[[0,"taro-custom-wrapper-core"]]],["p-4190e20b.system",[[0,"taro-editor-core"]]],["p-087bf23a.system",[[0,"taro-follow-swan-core"]]],["p-de2d8e2e.system",[[4,"taro-form-core",null,[[0,"tarobuttonsubmit","onButtonSubmit"],[0,"tarobuttonreset","onButtonReset"]]]]],["p-ef7e7d73.system",[[0,"taro-functional-page-navigator-core"]]],["p-7df9de66.system",[[0,"taro-grid-view-core"]]],["p-30f32fa2.system",[[0,"taro-icon-core",{"type":[1],"size":[8],"color":[1]}]]],["p-8d2101be.system",[[0,"taro-image-core",{"src":[1],"mode":[1],"lazyLoad":[4,"lazy-load"],"nativeProps":[16],"aspectFillMode":[32]}]]],["p-8027e1c6.system",[[0,"taro-inline-payment-panel-core"]]],["p-a5afdc47.system",[[0,"taro-input-core",{"value":[1025],"type":[1],"password":[4],"placeholder":[1],"disabled":[4],"maxlength":[2],"autoFocus":[516,"focus"],"confirmType":[1,"confirm-type"],"name":[1],"nativeProps":[16],"focus":[64]}]]],["p-895cd7c9.system",[[0,"taro-keyboard-accessory-core"]]],["p-ae3f1ed4.system",[[4,"taro-label-core",{"for":[1]}]]],["p-6f048097.system",[[0,"taro-lifestyle-core"]]],["p-f499c0a0.system",[[0,"taro-like-core"]]],["p-4402972b.system",[[0,"taro-list-view-core"]]],["p-0a9b984e.system",[[0,"taro-live-player-core"]]],["p-c4fdb669.system",[[0,"taro-live-pusher-core"]]],["p-c70dd956.system",[[0,"taro-login-core"]]],["p-bba8c3a7.system",[[0,"taro-lottie-core"]]],["p-736053bb.system",[[0,"taro-map-core"]]],["p-30fe0e81.system",[[0,"taro-match-media-core"]]],["p-bac3deb0.system",[[0,"taro-native-slot-core"]]],["p-8e5cc8fe.system",[[0,"taro-navigation-bar-core"]]],["p-491c6272.system",[[0,"taro-navigator-core",{"hoverClass":[1,"hover-class"],"url":[1],"openType":[1,"open-type"],"isHover":[4,"is-hover"],"delta":[2]},[[0,"click","onClick"]]]]],["p-f9ac515e.system",[[0,"taro-official-account-core"]]],["p-26889f3c.system",[[0,"taro-open-data-core"]]],["p-51b6fc09.system",[[0,"taro-page-container-core"]]],["p-fa36fe8e.system",[[0,"taro-page-meta-core"]]],["p-10be7fb5.system",[[0,"taro-progress-core",{"percent":[2],"showInfo":[4,"show-info"],"borderRadius":[8,"border-radius"],"fontSize":[8,"font-size"],"strokeWidth":[8,"stroke-width"],"activeColor":[1,"active-color"],"backgroundColor":[1,"background-color"],"active":[4]}]]],["p-4915fdc1.system",[[4,"taro-pull-to-refresh",{"prefixCls":[1,"prefix-cls"],"distanceToRefresh":[2,"distance-to-refresh"],"damping":[2],"indicator":[16],"currSt":[32],"dragOnEdge":[32]}]]],["p-fcdac6ec.system",[[0,"taro-rich-text-core",{"nodes":[1]}]]],["p-33223303.system",[[0,"taro-root-portal-core"]]],["p-74bf8246.system",[[0,"taro-rtc-room-core"]]],["p-1c320250.system",[[0,"taro-rtc-room-item-core"]]],["p-c6385fc2.system",[[4,"taro-scroll-view-core",{"scrollX":[4,"scroll-x"],"scrollY":[4,"scroll-y"],"upperThreshold":[8,"upper-threshold"],"lowerThreshold":[8,"lower-threshold"],"mpScrollTop":[520,"scroll-top"],"mpScrollLeft":[520,"scroll-left"],"mpScrollIntoView":[513,"scroll-into-view"],"animated":[4,"scroll-with-animation"],"mpScrollToMethod":[64],"mpScrollIntoViewMethod":[64]},[[3,"scroll","handleScroll"]]]]],["p-c6e6dab1.system",[[0,"taro-share-element-core"]]],["p-59590806.system",[[0,"taro-slider-core",{"min":[2],"max":[2],"step":[2],"disabled":[4],"value":[1538],"activeColor":[1,"active-color"],"backgroundColor":[1,"background-color"],"blockSize":[2,"block-size"],"blockColor":[1,"block-color"],"showValue":[4,"show-value"],"name":[1],"totalWidth":[32],"touching":[32],"ogX":[32],"touchId":[32],"percent":[32],"ogPercent":[32],"isWillLoadCalled":[32]}]]],["p-e3f8265d.system",[[0,"taro-slot-core"]]],["p-7c1fc8f5.system",[[0,"taro-sticky-header-core"]]],["p-02aa7366.system",[[0,"taro-sticky-section-core"]]],["p-88d64daa.system",[[0,"taro-switch-core",{"type":[1],"checked":[4],"color":[1],"name":[1],"disabled":[4],"nativeProps":[16],"isChecked":[32],"isWillLoadCalled":[32]}]]],["p-0a165ad3.system",[[0,"taro-tab-item-core"]]],["p-efa51030.system",[[0,"taro-tabbar",{"conf":[16],"list":[32],"borderStyle":[32],"backgroundColor":[32],"color":[32],"selectedColor":[32],"selectedIndex":[32],"status":[32]}]]],["p-95f70aea.system",[[0,"taro-tabs-core"]]],["p-651586f8.system",[[4,"taro-text-core",{"selectable":[4]}]]],["p-1eac7c75.system",[[0,"taro-textarea-core",{"value":[1025],"placeholder":[1],"disabled":[4],"maxlength":[2],"autoFocus":[516,"focus"],"autoHeight":[4,"auto-height"],"name":[1],"nativeProps":[16],"line":[32],"focus":[64]}]]],["p-58877ef2.system",[[4,"taro-view-core",{"animation":[1],"hoverClass":[1,"hover-class"],"hoverStartTime":[2,"hover-start-time"],"hoverStayTime":[2,"hover-stay-time"],"hover":[32],"touch":[32]},[[1,"touchstart","onTouchStart"],[1,"touchmove","onTouchMove"],[1,"touchend","onTouchEnd"]]]]],["p-518146fd.system",[[0,"taro-voip-room-core"]]],["p-6f214fc3.system",[[0,"taro-web-view-core",{"src":[1]}]]],["p-39685396.system",[[4,"taro-picker-core",{"mode":[1],"disabled":[4],"range":[16],"rangeKey":[1,"range-key"],"value":[1032],"start":[1],"end":[1],"fields":[1],"name":[1],"pickerValue":[32],"height":[32],"hidden":[32],"fadeOut":[32],"isWillLoadCalled":[32]}],[0,"taro-picker-group",{"mode":[1],"range":[16],"rangeKey":[1,"range-key"],"height":[2],"columnId":[1,"column-id"],"updateHeight":[16],"onColumnChange":[16],"updateDay":[16],"startY":[32],"preY":[32],"hadMove":[32],"touchEnd":[32],"isMove":[32],"handleMoveStart":[64],"handleMoving":[64],"handleMoveEnd":[64]},[[1,"mousedown","onMouseDown"],[1,"mousemove","onMouseMove"],[1,"mouseup","onMouseMoveEnd"],[1,"mouseleave","onMouseMoveEnd"],[1,"touchstart","onTouchStart"],[1,"touchmove","onTouchMove"],[1,"touchend","onTouchEnd"]]]]],["p-69f6784d.system",[[0,"taro-video-core",{"src":[1],"duration":[2],"controls":[4],"autoplay":[4],"loop":[4],"muted":[4],"initialTime":[2,"initial-time"],"poster":[1],"objectFit":[1,"object-fit"],"showProgress":[4,"show-progress"],"showFullscreenBtn":[4,"show-fullscreen-btn"],"showPlayBtn":[4,"show-play-btn"],"showCenterPlayBtn":[4,"show-center-play-btn"],"showMuteBtn":[4,"show-mute-btn"],"danmuList":[16],"danmuBtn":[4,"danmu-btn"],"enableDanmu":[4,"enable-danmu"],"enablePlayGesture":[4,"enable-play-gesture"],"enableProgressGesture":[4,"enable-progress-gesture"],"vslideGesture":[4,"vslide-gesture"],"vslideGestureInFullscreen":[4,"vslide-gesture-in-fullscreen"],"nativeProps":[16],"_duration":[32],"_enableDanmu":[32],"isPlaying":[32],"isFirst":[32],"isFullScreen":[32],"fullScreenTimestamp":[32],"isMute":[32],"getHlsObject":[64],"play":[64],"pause":[64],"stop":[64],"seek":[64],"requestFullScreen":[64],"exitFullScreen":[64]},[[5,"touchmove","onDocumentTouchMove"],[5,"touchend","onDocumentTouchEnd"],[5,"touchcancel","onDocumentTouchEnd"]]],[4,"taro-video-control",{"controls":[4],"currentTime":[2,"current-time"],"duration":[2],"isPlaying":[4,"is-playing"],"pauseFunc":[16],"playFunc":[16],"seekFunc":[16],"showPlayBtn":[4,"show-play-btn"],"showProgress":[4,"show-progress"],"setProgressBall":[64],"toggleVisibility":[64],"getIsDraggingProgressBall":[64],"setCurrentTime":[64]},[[5,"touchmove","onDocumentTouchMove"],[5,"touchend","onDocumentTouchEnd"],[5,"touchcancel","onDocumentTouchEnd"]]],[0,"taro-video-danmu",{"enable":[4],"danmuList":[32],"sendDanmu":[64],"tick":[64]}]]]]'),e)}))}}}));
1
+ System.register(["./p-1a0e1932.system.js"],(function(e,o){"use strict";var t,r;return{setters:[function(o){t=o.p;r=o.b;e("setNonce",o.s)}],execute:function(){var e=function(){var e=o.meta.url;var r={};if(e!==""){r.resourcesUrl=new URL(".",e).href}return t(r)};e().then((function(e){return r(JSON.parse('[["p-56da1da3.system",[[4,"taro-checkbox-core",{"name":[1],"value":[1],"color":[1],"id":[1025],"checked":[4],"disabled":[4],"nativeProps":[16],"isWillLoadCalled":[32]}],[0,"taro-checkbox-group-core",{"name":[8]},[[0,"checkboxchange","function"]]]]],["p-c33733b3.system",[[0,"taro-movable-area-core",{"scaleArea":[4,"scale-area"]}],[0,"taro-movable-view-core",{"x":[8],"y":[8],"direction":[1],"outOfBounds":[4,"out-of-bounds"],"inertia":[4],"friction":[2],"damping":[2],"disabled":[4],"scale":[4],"scaleMin":[2,"scale-min"],"scaleMax":[2,"scale-max"],"scaleValue":[2,"scale-value"],"animation":[4],"setParent":[64],"endScale":[64],"setScale":[64]}]]],["p-6dae898a.system",[[0,"taro-picker-view-column-core",{"col":[1],"initialPosition":[1,"initial-position"],"paddingVertical":[2,"padding-vertical"],"isInit":[32],"isMove":[32]},[[1,"scroll","onScroll"],[1,"mouseup","onMouseEnd"],[1,"mouseout","onMouseEnd"],[1,"mouseleave","onMouseEnd"],[1,"touchend","onTouchEnd"]]],[4,"taro-picker-view-core",{"indicatorStyle":[1,"indicator-style"],"indicatorClass":[1,"indicator-class"],"value":[16],"maskStyle":[1,"mask-style"],"maskClass":[1,"mask-class"]},[[0,"onselect","onSelect"],[0,"onselectstart","onSelectStart"],[0,"onselectend","onPickerColEnd"]]]]],["p-4086e546.system",[[4,"taro-radio-core",{"name":[1],"value":[1],"id":[1025],"checked":[1540],"disabled":[4],"nativeProps":[16],"isWillLoadCalled":[32]}],[0,"taro-radio-group-core",{"name":[8]},[[0,"radiochange","function"]]]]],["p-58f9a827.system",[[4,"taro-swiper-core",{"indicatorDots":[4,"indicator-dots"],"indicatorColor":[1,"indicator-color"],"indicatorActiveColor":[1,"indicator-active-color"],"autoplay":[4],"current":[2],"interval":[2],"duration":[2],"circular":[4],"vertical":[4],"previousMargin":[1,"previous-margin"],"nextMargin":[1,"next-margin"],"displayMultipleItems":[2,"display-multiple-items"],"full":[4],"zoom":[4],"swiperWrapper":[32],"swiper":[32],"isWillLoadCalled":[32],"observer":[32],"observerFirst":[32],"observerLast":[32]}],[0,"taro-swiper-item-core",{"itemId":[1,"item-id"]}]]],["p-b2bb02d7.system",[[0,"taro-ad-core"]]],["p-08bb8dfc.system",[[0,"taro-ad-custom-core"]]],["p-b1c972e2.system",[[0,"taro-animation-video-core"]]],["p-9d4fa0d3.system",[[0,"taro-animation-view-core"]]],["p-46244579.system",[[0,"taro-ar-camera-core"]]],["p-69fa7272.system",[[0,"taro-audio-core",{"src":[1],"controls":[4],"autoplay":[4],"loop":[4],"muted":[4],"nativeProps":[16]}]]],["p-78c30850.system",[[0,"taro-aweme-data-core"]]],["p-7dd9c8da.system",[[0,"taro-block-core"]]],["p-623b3eb6.system",[[4,"taro-button-core",{"disabled":[4],"hoverClass":[1,"hover-class"],"type":[1],"hoverStartTime":[2,"hover-start-time"],"hoverStayTime":[2,"hover-stay-time"],"size":[1],"plain":[4],"loading":[4],"formType":[513,"form-type"],"hover":[32],"touch":[32]},[[0,"click","onClick"],[1,"touchstart","onTouchStart"],[1,"touchend","onTouchEnd"]]]]],["p-b1249ebb.system",[[0,"taro-camera-core"]]],["p-17302fe9.system",[[0,"taro-canvas-core",{"canvasId":[1,"canvas-id"],"nativeProps":[16]}]]],["p-4d7182f4.system",[[0,"taro-channel-live-core"]]],["p-4514dc53.system",[[0,"taro-channel-video-core"]]],["p-da5cdbf5.system",[[0,"taro-comment-detail-core"]]],["p-c586a796.system",[[0,"taro-comment-list-core"]]],["p-97782cdd.system",[[0,"taro-contact-button-core"]]],["p-4d0da795.system",[[0,"taro-cover-image-core",{"src":[1],"nativeProps":[16]}]]],["p-2024e133.system",[[4,"taro-cover-view-core",{"animation":[1],"hoverClass":[1,"hover-class"],"hoverStartTime":[2,"hover-start-time"],"hoverStayTime":[2,"hover-stay-time"],"hover":[32],"touch":[32]},[[1,"touchstart","onTouchStart"],[1,"touchmove","onTouchMove"],[1,"touchend","onTouchEnd"]]]]],["p-1941d333.system",[[0,"taro-custom-wrapper-core"]]],["p-4190e20b.system",[[0,"taro-editor-core"]]],["p-087bf23a.system",[[0,"taro-follow-swan-core"]]],["p-de2d8e2e.system",[[4,"taro-form-core",null,[[0,"tarobuttonsubmit","onButtonSubmit"],[0,"tarobuttonreset","onButtonReset"]]]]],["p-ef7e7d73.system",[[0,"taro-functional-page-navigator-core"]]],["p-7df9de66.system",[[0,"taro-grid-view-core"]]],["p-30f32fa2.system",[[0,"taro-icon-core",{"type":[1],"size":[8],"color":[1]}]]],["p-8d2101be.system",[[0,"taro-image-core",{"src":[1],"mode":[1],"lazyLoad":[4,"lazy-load"],"nativeProps":[16],"aspectFillMode":[32]}]]],["p-8027e1c6.system",[[0,"taro-inline-payment-panel-core"]]],["p-a5afdc47.system",[[0,"taro-input-core",{"value":[1025],"type":[1],"password":[4],"placeholder":[1],"disabled":[4],"maxlength":[2],"autoFocus":[516,"focus"],"confirmType":[1,"confirm-type"],"name":[1],"nativeProps":[16],"focus":[64]}]]],["p-895cd7c9.system",[[0,"taro-keyboard-accessory-core"]]],["p-ae3f1ed4.system",[[4,"taro-label-core",{"for":[1]}]]],["p-6f048097.system",[[0,"taro-lifestyle-core"]]],["p-f499c0a0.system",[[0,"taro-like-core"]]],["p-4402972b.system",[[0,"taro-list-view-core"]]],["p-0a9b984e.system",[[0,"taro-live-player-core"]]],["p-c4fdb669.system",[[0,"taro-live-pusher-core"]]],["p-c70dd956.system",[[0,"taro-login-core"]]],["p-bba8c3a7.system",[[0,"taro-lottie-core"]]],["p-736053bb.system",[[0,"taro-map-core"]]],["p-30fe0e81.system",[[0,"taro-match-media-core"]]],["p-bac3deb0.system",[[0,"taro-native-slot-core"]]],["p-8e5cc8fe.system",[[0,"taro-navigation-bar-core"]]],["p-491c6272.system",[[0,"taro-navigator-core",{"hoverClass":[1,"hover-class"],"url":[1],"openType":[1,"open-type"],"isHover":[4,"is-hover"],"delta":[2]},[[0,"click","onClick"]]]]],["p-f9ac515e.system",[[0,"taro-official-account-core"]]],["p-26889f3c.system",[[0,"taro-open-data-core"]]],["p-51b6fc09.system",[[0,"taro-page-container-core"]]],["p-fa36fe8e.system",[[0,"taro-page-meta-core"]]],["p-10be7fb5.system",[[0,"taro-progress-core",{"percent":[2],"showInfo":[4,"show-info"],"borderRadius":[8,"border-radius"],"fontSize":[8,"font-size"],"strokeWidth":[8,"stroke-width"],"activeColor":[1,"active-color"],"backgroundColor":[1,"background-color"],"active":[4]}]]],["p-4915fdc1.system",[[4,"taro-pull-to-refresh",{"prefixCls":[1,"prefix-cls"],"distanceToRefresh":[2,"distance-to-refresh"],"damping":[2],"indicator":[16],"currSt":[32],"dragOnEdge":[32]}]]],["p-fcdac6ec.system",[[0,"taro-rich-text-core",{"nodes":[1]}]]],["p-33223303.system",[[0,"taro-root-portal-core"]]],["p-74bf8246.system",[[0,"taro-rtc-room-core"]]],["p-1c320250.system",[[0,"taro-rtc-room-item-core"]]],["p-c6385fc2.system",[[4,"taro-scroll-view-core",{"scrollX":[4,"scroll-x"],"scrollY":[4,"scroll-y"],"upperThreshold":[8,"upper-threshold"],"lowerThreshold":[8,"lower-threshold"],"mpScrollTop":[520,"scroll-top"],"mpScrollLeft":[520,"scroll-left"],"mpScrollIntoView":[513,"scroll-into-view"],"animated":[4,"scroll-with-animation"],"mpScrollToMethod":[64],"mpScrollIntoViewMethod":[64]},[[3,"scroll","handleScroll"]]]]],["p-c6e6dab1.system",[[0,"taro-share-element-core"]]],["p-59590806.system",[[0,"taro-slider-core",{"min":[2],"max":[2],"step":[2],"disabled":[4],"value":[1538],"activeColor":[1,"active-color"],"backgroundColor":[1,"background-color"],"blockSize":[2,"block-size"],"blockColor":[1,"block-color"],"showValue":[4,"show-value"],"name":[1],"totalWidth":[32],"touching":[32],"ogX":[32],"touchId":[32],"percent":[32],"ogPercent":[32],"isWillLoadCalled":[32]}]]],["p-e3f8265d.system",[[0,"taro-slot-core"]]],["p-7c1fc8f5.system",[[0,"taro-sticky-header-core"]]],["p-02aa7366.system",[[0,"taro-sticky-section-core"]]],["p-88d64daa.system",[[0,"taro-switch-core",{"type":[1],"checked":[4],"color":[1],"name":[1],"disabled":[4],"nativeProps":[16],"isChecked":[32],"isWillLoadCalled":[32]}]]],["p-0a165ad3.system",[[0,"taro-tab-item-core"]]],["p-9e8619a6.system",[[0,"taro-tabbar",{"conf":[16],"list":[32],"borderStyle":[32],"backgroundColor":[32],"color":[32],"selectedColor":[32],"selectedIndex":[32],"status":[32]}]]],["p-95f70aea.system",[[0,"taro-tabs-core"]]],["p-651586f8.system",[[4,"taro-text-core",{"selectable":[4]}]]],["p-1eac7c75.system",[[0,"taro-textarea-core",{"value":[1025],"placeholder":[1],"disabled":[4],"maxlength":[2],"autoFocus":[516,"focus"],"autoHeight":[4,"auto-height"],"name":[1],"nativeProps":[16],"line":[32],"focus":[64]}]]],["p-58877ef2.system",[[4,"taro-view-core",{"animation":[1],"hoverClass":[1,"hover-class"],"hoverStartTime":[2,"hover-start-time"],"hoverStayTime":[2,"hover-stay-time"],"hover":[32],"touch":[32]},[[1,"touchstart","onTouchStart"],[1,"touchmove","onTouchMove"],[1,"touchend","onTouchEnd"]]]]],["p-518146fd.system",[[0,"taro-voip-room-core"]]],["p-6f214fc3.system",[[0,"taro-web-view-core",{"src":[1]}]]],["p-39685396.system",[[4,"taro-picker-core",{"mode":[1],"disabled":[4],"range":[16],"rangeKey":[1,"range-key"],"value":[1032],"start":[1],"end":[1],"fields":[1],"name":[1],"pickerValue":[32],"height":[32],"hidden":[32],"fadeOut":[32],"isWillLoadCalled":[32]}],[0,"taro-picker-group",{"mode":[1],"range":[16],"rangeKey":[1,"range-key"],"height":[2],"columnId":[1,"column-id"],"updateHeight":[16],"onColumnChange":[16],"updateDay":[16],"startY":[32],"preY":[32],"hadMove":[32],"touchEnd":[32],"isMove":[32],"handleMoveStart":[64],"handleMoving":[64],"handleMoveEnd":[64]},[[1,"mousedown","onMouseDown"],[1,"mousemove","onMouseMove"],[1,"mouseup","onMouseMoveEnd"],[1,"mouseleave","onMouseMoveEnd"],[1,"touchstart","onTouchStart"],[1,"touchmove","onTouchMove"],[1,"touchend","onTouchEnd"]]]]],["p-69f6784d.system",[[0,"taro-video-core",{"src":[1],"duration":[2],"controls":[4],"autoplay":[4],"loop":[4],"muted":[4],"initialTime":[2,"initial-time"],"poster":[1],"objectFit":[1,"object-fit"],"showProgress":[4,"show-progress"],"showFullscreenBtn":[4,"show-fullscreen-btn"],"showPlayBtn":[4,"show-play-btn"],"showCenterPlayBtn":[4,"show-center-play-btn"],"showMuteBtn":[4,"show-mute-btn"],"danmuList":[16],"danmuBtn":[4,"danmu-btn"],"enableDanmu":[4,"enable-danmu"],"enablePlayGesture":[4,"enable-play-gesture"],"enableProgressGesture":[4,"enable-progress-gesture"],"vslideGesture":[4,"vslide-gesture"],"vslideGestureInFullscreen":[4,"vslide-gesture-in-fullscreen"],"nativeProps":[16],"_duration":[32],"_enableDanmu":[32],"isPlaying":[32],"isFirst":[32],"isFullScreen":[32],"fullScreenTimestamp":[32],"isMute":[32],"getHlsObject":[64],"play":[64],"pause":[64],"stop":[64],"seek":[64],"requestFullScreen":[64],"exitFullScreen":[64]},[[5,"touchmove","onDocumentTouchMove"],[5,"touchend","onDocumentTouchEnd"],[5,"touchcancel","onDocumentTouchEnd"]]],[4,"taro-video-control",{"controls":[4],"currentTime":[2,"current-time"],"duration":[2],"isPlaying":[4,"is-playing"],"pauseFunc":[16],"playFunc":[16],"seekFunc":[16],"showPlayBtn":[4,"show-play-btn"],"showProgress":[4,"show-progress"],"setProgressBall":[64],"toggleVisibility":[64],"getIsDraggingProgressBall":[64],"setCurrentTime":[64]},[[5,"touchmove","onDocumentTouchMove"],[5,"touchend","onDocumentTouchEnd"],[5,"touchcancel","onDocumentTouchEnd"]]],[0,"taro-video-danmu",{"enable":[4],"danmuList":[32],"sendDanmu":[64],"tick":[64]}]]]]'),e)}))}}}));
@@ -0,0 +1 @@
1
+ import{h as t,r as a,c as r,H as e,g as o}from"./p-78e3ebb9.js";import s from"@tarojs/taro";import{c as i}from"./p-76724e58.js";import{i as n}from"./p-d3c7f87d.js";const h=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},b=(t="")=>"/"===t.charAt(0)?t:"/"+t,l=(t="",a="")=>((t="",a="")=>new RegExp("^"+a+"(\\/|\\?|#|$)","i").test(t)||t===a)(t,a)?t.substring(a.length):t;function d(t){return"/"===t.charAt(0)}function c(t,a){for(var r=a,e=r+1,o=t.length;e<o;r+=1,e+=1)t[r]=t[e];t.pop()}const _=({index:a,isSelected:r=!1,textColor:e,iconPath:o,badgeText:h,showRedDot:b=!1,pagePath:l,text:d,onSelect:c})=>{const _=i("weui-tabbar__item",{"weui-bar__item_on":r});return t("a",{key:a,href:"javascript:;",class:_,onClick:function(){const t=s.getCurrentPages().shift();"function"==typeof(null==t?void 0:t.onTabItemTap)&&n(this)&&t.onTabItemTap({index:a,pagePath:l,text:d}),c(a)}},t("span",{style:{display:"inline-block",position:"relative"}},t("img",{src:o,alt:"",class:"weui-tabbar__icon"}),!!h&&t("span",{class:"weui-badge taro-tabbar-badge",style:{position:"absolute",top:"-2px",right:"-13px"}},h),b&&t("span",{class:"weui-badge weui-badge_dot",style:{position:"absolute",top:"0",right:"-6px"}})),t("p",{class:"weui-tabbar__label",style:{color:e}},d))},u="taro-tabbar__tabbar",g=class{constructor(t){a(this,t),this.onLongPress=r(this,"longpress",7),this.homePage="",this.customRoutes=[],this.tabbarPos="bottom",this.getOriginUrl=t=>{const a=this.customRoutes.filter((([,a])=>h(a).path===h(t).path));return((t="",a="")=>t.includes(a)?t.substring(0,t.length-a.length):t)(a.length?a[0][0]:t,".html")},this.getSelectedIndex=t=>{let a=-1;return this.list.forEach((({pagePath:r},e)=>{h(t).path===h(r).path&&(a=e)})),a},this.switchTab=t=>{this.selectedIndex=t,s.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("/")||[],o=a&&a.split("/")||[],s=t&&d(t),i=a&&d(a),n=s||i;if(t&&d(t)?o=e:e.length&&(o.pop(),o=o.concat(e)),!o.length)return"/";if(o.length){var h=o[o.length-1];r="."===h||".."===h||""===h}else r=!1;for(var b=0,l=o.length;l>=0;l--){var _=o[l];"."===_?c(o,l):".."===_?(c(o,l),b++):b&&(c(o,l),b--)}if(!n)for(;b--;b)o.unshift("..");!n||""===o[0]||o[0]&&d(o[0])||o.unshift("");var u=o.join("/");return r&&"/"!==u.substr(-1)&&(u+="/"),u}(t,this.getOriginUrl(this.getCurrentUrl()||this.homePage)),o=this.getSelectedIndex(e);o>-1?(this.switchTab(o),a({errMsg:"switchTab:ok"})):r({errMsg:`switchTab:fail page "${e}" is not found`})},this.routerChangeHandler=t=>{var a;const r=null===(a=null==t?void 0:t.toLocation)||void 0===a?void 0:a.path;let e;if("string"==typeof r){const t=this.conf.basename||"/";e=l(b(r||this.homePage),t)||"/"}else e=this.getCurrentUrl();this.selectedIndex=this.getSelectedIndex(this.getOriginUrl(e))},this.setTabBarBadgeHandler=({index:t,text:a,successHandler:r,errorHandler:e})=>{const o=[...this.list];t in o?(o[t].showRedDot=!1,o[t].badgeText=a,r({errMsg:"setTabBarBadge:ok"})):e({errMsg:"setTabBarBadge:fail tabbar item not found"}),this.list=o},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:o})=>{r&&(this.backgroundColor=r),e&&(this.borderStyle=e),t&&(this.color=t),a&&(this.selectedColor=a),o({errMsg:"setTabBarStyle:ok"})},this.setTabBarItemHandler=({index:t,iconPath:a,selectedIconPath:r,text:e,successHandler:o,errorHandler:s})=>{const i=[...this.list];t in i?(a&&(i[t].iconPath=a),r&&(i[t].selectedIconPath=r),e&&(i[t].text=e),o({errMsg:"setTabBarItem:ok"})):s({errMsg:"setTabBarItem:fail tabbar item not found"}),this.list=i},this.conf=void 0,this.list=void 0,this.borderStyle=void 0,this.backgroundColor=void 0,this.color=void 0,this.selectedColor=void 0,this.selectedIndex=-1,this.status=0}componentWillLoad(){var t,a;const r=(null===(t=this.conf)||void 0===t?void 0:t.list)||[],e=(null===(a=this.conf)||void 0===a?void 0:a.customRoutes)||{};if("[object Array]"!==Object.prototype.toString.call(r)||r.length<2||r.length>5)throw new Error("tabBar 配置错误");this.homePage=b(this.conf.homePage);for(let t in e){const a=e[t];t=b(t),"string"==typeof a?this.customRoutes.push([t,b(a)]):(null==a?void 0:a.length)>0&&this.customRoutes.push(...a.map((a=>[t,b(a)])))}r.forEach((t=>{0!==t.pagePath.indexOf("/")&&(t.pagePath="/"+t.pagePath)})),this.list=r,this.borderStyle=this.conf.borderStyle,this.backgroundColor=this.conf.backgroundColor,this.color=this.conf.color,this.selectedColor=this.conf.selectedColor}getCurrentUrl(){const t=((t="hash",a="/")=>{const r="hash"===t?location.hash.slice(1).split("?")[0]:location.pathname;return b(l(r,a))})(this.conf.mode,this.conf.basename);return decodeURI("/"===t?this.homePage:t)}bindEvent(){s.eventCenter.on("__taroRouterChange",this.routerChangeHandler),s.eventCenter.on("__taroSwitchTab",this.switchTabHandler),s.eventCenter.on("__taroSetTabBarBadge",this.setTabBarBadgeHandler),s.eventCenter.on("__taroRemoveTabBarBadge",this.removeTabBarBadgeHandler),s.eventCenter.on("__taroShowTabBarRedDotHandler",this.showTabBarRedDotHandler),s.eventCenter.on("__taroHideTabBarRedDotHandler",this.hideTabBarRedDotHandler),s.eventCenter.on("__taroShowTabBar",this.showTabBarHandler),s.eventCenter.on("__taroHideTabBar",this.hideTabBarHandler),s.eventCenter.on("__taroSetTabBarStyle",this.setTabBarStyleHandler),s.eventCenter.on("__taroSetTabBarItem",this.setTabBarItemHandler)}removeEvent(){s.eventCenter.off("__taroRouterChange",this.routerChangeHandler),s.eventCenter.off("__taroSwitchTab",this.switchTabHandler),s.eventCenter.off("__taroSetTabBarBadge",this.setTabBarBadgeHandler),s.eventCenter.off("__taroRemoveTabBarBadge",this.removeTabBarBadgeHandler),s.eventCenter.off("__taroShowTabBarRedDotHandler",this.showTabBarRedDotHandler),s.eventCenter.off("__taroHideTabBarRedDotHandler",this.hideTabBarRedDotHandler),s.eventCenter.off("__taroShowTabBar",this.showTabBarHandler),s.eventCenter.off("__taroHideTabBar",this.hideTabBarHandler),s.eventCenter.off("__taroSetTabBarStyle",this.setTabBarStyleHandler),s.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,o=i("weui-tabbar",{[`taro-tabbar__border-${this.borderStyle||"black"}`]:!0});return t(e,{class:i(u,`${u}-${a}`,{"taro-tabbar__tabbar-hide":-1===this.selectedIndex||1===r,"taro-tabbar__tabbar-slideout":2===r})},t("div",{class:o,style:{backgroundColor:this.backgroundColor||"",height:"inherit"}},this.list.map(((a,r)=>{const e=this.selectedIndex===r;let o,s;return e?(o=this.selectedColor||"",s=a.selectedIconPath):(o=this.color||"",s=a.iconPath),t(_,{index:r,onSelect:this.switchTab.bind(this),isSelected:e,textColor:o,iconPath:s,pagePath:a.pagePath,text:a.text,badgeText:a.badgeText,showRedDot:a.showRedDot})}))))}get tabbar(){return o(this)}};g.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;overflow:hidden;-ms-flex-direction:column;flex-direction:column;height:100%}.taro-tabbar__panel{overflow:auto;position:relative;-ms-flex:1;flex:1;-webkit-overflow-scrolling:auto}.taro-tabbar__tabbar{position:relative;width:100%;height:50px;-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;margin-bottom:constant(safe-area-inset-bottom);margin-bottom:env(safe-area-inset-bottom)}.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{g as taro_tabbar}
@@ -1 +1 @@
1
- var __spreadArray=this&&this.__spreadArray||function(e,t,r){if(r||arguments.length===2)for(var a=0,o=t.length,n;a<o;a++){if(n||!(a in t)){if(!n)n=Array.prototype.slice.call(t,0,a);n[a]=t[a]}}return e.concat(n||Array.prototype.slice.call(t))};System.register(["./p-1a0e1932.system.js","@tarojs/taro","./p-61f225ef.system.js","./p-bd5177d3.system.js"],(function(e){"use strict";var t,r,a,o,n,i,s,l;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},function(e){l=e.i}],execute:function(){var d=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 b=function(e){if(e===void 0){e=""}return e.charAt(0)==="/"?e:"/"+e};var h=function(e,t){if(e===void 0){e=""}if(t===void 0){t=""}return new RegExp("^"+t+"(\\/|\\?|#|$)","i").test(e)||e===t};var c=function(e,t){if(e===void 0){e=""}if(t===void 0){t=""}return h(e,t)?e.substring(t.length):e};var f=function(e,t){if(e===void 0){e=""}if(t===void 0){t=""}return e.includes(t)?e.substring(0,e.length-t.length):e};var u=function(e,t){if(e===void 0){e="hash"}if(t===void 0){t="/"}var r=e==="hash"?location.hash.slice(1).split("?")[0]:location.pathname;return b(c(r,t))};function v(e){return e.charAt(0)==="/"}function g(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 p(e,t){if(t===undefined)t="";var r=e&&e.split("/")||[];var a=t&&t.split("/")||[];var o=e&&v(e);var n=t&&v(t);var i=o||n;if(e&&v(e)){a=r}else if(r.length){a.pop();a=a.concat(r)}if(!a.length)return"/";var s;if(a.length){var l=a[a.length-1];s=l==="."||l===".."||l===""}else{s=false}var d=0;for(var b=a.length;b>=0;b--){var h=a[b];if(h==="."){g(a,b)}else if(h===".."){g(a,b);d++}else if(d){g(a,b);d--}}if(!i)for(;d--;d)a.unshift("..");if(i&&a[0]!==""&&(!a[0]||!v(a[0])))a.unshift("");var c=a.join("/");if(s&&c.substr(-1)!=="/")c+="/";return c}var _=function(e){var r=e.index,a=e.isSelected,o=a===void 0?false:a,n=e.textColor,d=e.iconPath,b=e.badgeText,h=e.showRedDot,c=h===void 0?false:h,f=e.pagePath,u=e.text,v=e.onSelect;var g=s("weui-tabbar__item",{"weui-bar__item_on":o});var p={position:"absolute",top:"-2px",right:"-13px"};var _={position:"absolute",top:"0",right:"-6px"};function m(){var e=i.getCurrentPages().shift();if(typeof(e===null||e===void 0?void 0:e.onTabItemTap)==="function"&&l(this)){e.onTabItemTap({index:r,pagePath:f,text:u})}v(r)}return t("a",{key:r,href:"javascript:;",class:g,onClick:m},t("span",{style:{display:"inline-block",position:"relative"}},t("img",{src:d,alt:"",class:"weui-tabbar__icon"}),!!b&&t("span",{class:"weui-badge taro-tabbar-badge",style:p},b),c&&t("span",{class:"weui-badge weui-badge_dot",style:_})),t("p",{class:"weui-tabbar__label",style:{color:n}},u))};var m="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;overflow:hidden;-ms-flex-direction:column;flex-direction:column;height:100%}.taro-tabbar__panel{overflow:auto;position:relative;-ms-flex:1;flex:1;-webkit-overflow-scrolling:auto}.taro-tabbar__tabbar{position:relative;width:100%;height:50px;-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;margin-bottom:constant(safe-area-inset-bottom);margin-bottom:env(safe-area-inset-bottom)}.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 T=0;var B=1;var y=2;var H="taro-tabbar__tabbar";var x="taro-tabbar__tabbar-hide";var w="taro-tabbar__tabbar-slideout";var C=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.getOriginUrl=function(e){var r=t.customRoutes.filter((function(t){var r=t[1];var a=d(r).path;var o=d(e).path;return a===o}));return f(r.length?r[0][0]:e,".html")};this.getSelectedIndex=function(e){var r=-1;t.list.forEach((function(t,a){var o=t.pagePath;var n=d(e).path;var i=d(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=p(r,n);var s=t.getSelectedIndex(i);if(s>-1){t.switchTab(s);a({errMsg:"switchTab:ok"})}else{o({errMsg:'switchTab:fail page "'.concat(i,'" is not found')})}};this.routerChangeHandler=function(e){var r;var a=(r=e===null||e===void 0?void 0:e.toLocation)===null||r===void 0?void 0:r.path;var o;if(typeof a==="string"){var n=t.conf.basename||"/";o=c(b(a||t.homePage),n)||"/"}else{o=t.getCurrentUrl()}t.selectedIndex=t.getSelectedIndex(t.getOriginUrl(o))};this.setTabBarBadgeHandler=function(e){var r=e.index,a=e.text,o=e.successHandler,n=e.errorHandler;var i=__spreadArray([],t.list,true);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,true);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,true);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,true);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=T;r({errMsg:"showTabBar:ok"})};this.hideTabBarHandler=function(e){var r=e.animation,a=e.successHandler;t.status=r?y:B;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,true);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};this.conf=undefined;this.list=undefined;this.borderStyle=undefined;this.backgroundColor=undefined;this.color=undefined;this.selectedColor=undefined;this.selectedIndex=-1;this.status=T;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=b(this.conf.homePage);var s=function(e){var t;var r=n[e];e=b(e);if(typeof r==="string"){l.customRoutes.push([e,b(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,b(t)]})))}};var l=this;for(var h in n){s(h)}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=u(this.conf.mode,this.conf.basename);return decodeURI(e==="/"?this.homePage:e)};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-".concat(this.borderStyle||"black")]=true,e));var b=this.selectedIndex===-1||l===B;var h=l===y;return t(o,{class:s(H,"".concat(H,"-").concat(i),(r={},r[x]=b,r[w]=h,r))},t("div",{class:d,style:{backgroundColor:this.backgroundColor||"",height:"inherit"}},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(_,{index:r,onSelect:a.switchTab.bind(a),isSelected:o,textColor:n,iconPath:i,pagePath:e.pagePath,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}());C.style=m}}}));
1
+ var __spreadArray=this&&this.__spreadArray||function(e,t,r){if(r||arguments.length===2)for(var a=0,o=t.length,n;a<o;a++){if(n||!(a in t)){if(!n)n=Array.prototype.slice.call(t,0,a);n[a]=t[a]}}return e.concat(n||Array.prototype.slice.call(t))};System.register(["./p-1a0e1932.system.js","@tarojs/taro","./p-61f225ef.system.js","./p-bd5177d3.system.js"],(function(e){"use strict";var t,r,a,o,n,i,s,l;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},function(e){l=e.i}],execute:function(){var d=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 b=function(e){if(e===void 0){e=""}return e.charAt(0)==="/"?e:"/"+e};var h=function(e,t){if(e===void 0){e=""}if(t===void 0){t=""}return new RegExp("^"+t+"(\\/|\\?|#|$)","i").test(e)||e===t};var c=function(e,t){if(e===void 0){e=""}if(t===void 0){t=""}return h(e,t)?e.substring(t.length):e};var f=function(e,t){if(e===void 0){e=""}if(t===void 0){t=""}return e.includes(t)?e.substring(0,e.length-t.length):e};var u=function(e,t){if(e===void 0){e="hash"}if(t===void 0){t="/"}var r=e==="hash"?location.hash.slice(1).split("?")[0]:location.pathname;return b(c(r,t))};function v(e){return e.charAt(0)==="/"}function g(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 p(e,t){if(t===undefined)t="";var r=e&&e.split("/")||[];var a=t&&t.split("/")||[];var o=e&&v(e);var n=t&&v(t);var i=o||n;if(e&&v(e)){a=r}else if(r.length){a.pop();a=a.concat(r)}if(!a.length)return"/";var s;if(a.length){var l=a[a.length-1];s=l==="."||l===".."||l===""}else{s=false}var d=0;for(var b=a.length;b>=0;b--){var h=a[b];if(h==="."){g(a,b)}else if(h===".."){g(a,b);d++}else if(d){g(a,b);d--}}if(!i)for(;d--;d)a.unshift("..");if(i&&a[0]!==""&&(!a[0]||!v(a[0])))a.unshift("");var c=a.join("/");if(s&&c.substr(-1)!=="/")c+="/";return c}var _=function(e){var r=e.index,a=e.isSelected,o=a===void 0?false:a,n=e.textColor,d=e.iconPath,b=e.badgeText,h=e.showRedDot,c=h===void 0?false:h,f=e.pagePath,u=e.text,v=e.onSelect;var g=s("weui-tabbar__item",{"weui-bar__item_on":o});var p={position:"absolute",top:"-2px",right:"-13px"};var _={position:"absolute",top:"0",right:"-6px"};function m(){var e=i.getCurrentPages().shift();if(typeof(e===null||e===void 0?void 0:e.onTabItemTap)==="function"&&l(this)){e.onTabItemTap({index:r,pagePath:f,text:u})}v(r)}return t("a",{key:r,href:"javascript:;",class:g,onClick:m},t("span",{style:{display:"inline-block",position:"relative"}},t("img",{src:d,alt:"",class:"weui-tabbar__icon"}),!!b&&t("span",{class:"weui-badge taro-tabbar-badge",style:p},b),c&&t("span",{class:"weui-badge weui-badge_dot",style:_})),t("p",{class:"weui-tabbar__label",style:{color:n}},u))};var m="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;overflow:hidden;-ms-flex-direction:column;flex-direction:column;height:100%}.taro-tabbar__panel{overflow:auto;position:relative;-ms-flex:1;flex:1;-webkit-overflow-scrolling:auto}.taro-tabbar__tabbar{position:relative;width:100%;height:50px;-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;margin-bottom:constant(safe-area-inset-bottom);margin-bottom:env(safe-area-inset-bottom)}.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 T=0;var B=1;var y=2;var H="taro-tabbar__tabbar";var x="taro-tabbar__tabbar-hide";var w="taro-tabbar__tabbar-slideout";var C=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.getOriginUrl=function(e){var r=t.customRoutes.filter((function(t){var r=t[1];var a=d(r).path;var o=d(e).path;return a===o}));return f(r.length?r[0][0]:e,".html")};this.getSelectedIndex=function(e){var r=-1;t.list.forEach((function(t,a){var o=t.pagePath;var n=d(e).path;var i=d(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=p(r,n);var s=t.getSelectedIndex(i);if(s>-1){t.switchTab(s);a({errMsg:"switchTab:ok"})}else{o({errMsg:'switchTab:fail page "'.concat(i,'" is not found')})}};this.routerChangeHandler=function(e){var r;var a=(r=e===null||e===void 0?void 0:e.toLocation)===null||r===void 0?void 0:r.path;var o;if(typeof a==="string"){var n=t.conf.basename||"/";o=c(b(a||t.homePage),n)||"/"}else{o=t.getCurrentUrl()}t.selectedIndex=t.getSelectedIndex(t.getOriginUrl(o))};this.setTabBarBadgeHandler=function(e){var r=e.index,a=e.text,o=e.successHandler,n=e.errorHandler;var i=__spreadArray([],t.list,true);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,true);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,true);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,true);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=T;r({errMsg:"showTabBar:ok"})};this.hideTabBarHandler=function(e){var r=e.animation,a=e.successHandler;t.status=r?y:B;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,true);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};this.conf=undefined;this.list=undefined;this.borderStyle=undefined;this.backgroundColor=undefined;this.color=undefined;this.selectedColor=undefined;this.selectedIndex=-1;this.status=T}e.prototype.componentWillLoad=function(){var e,t;var r=((e=this.conf)===null||e===void 0?void 0:e.list)||[];var a=((t=this.conf)===null||t===void 0?void 0:t.customRoutes)||{};if(Object.prototype.toString.call(r)!=="[object Array]"||r.length<2||r.length>5){throw new Error("tabBar 配置错误")}this.homePage=b(this.conf.homePage);var o=function(e){var t;var r=a[e];e=b(e);if(typeof r==="string"){n.customRoutes.push([e,b(r)])}else if((r===null||r===void 0?void 0:r.length)>0){(t=n.customRoutes).push.apply(t,r.map((function(t){return[e,b(t)]})))}};var n=this;for(var i in a){o(i)}r.forEach((function(e){if(e.pagePath.indexOf("/")!==0){e.pagePath="/"+e.pagePath}}));this.list=r;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=u(this.conf.mode,this.conf.basename);return decodeURI(e==="/"?this.homePage:e)};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-".concat(this.borderStyle||"black")]=true,e));var b=this.selectedIndex===-1||l===B;var h=l===y;return t(o,{class:s(H,"".concat(H,"-").concat(i),(r={},r[x]=b,r[w]=h,r))},t("div",{class:d,style:{backgroundColor:this.backgroundColor||"",height:"inherit"}},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(_,{index:r,onSelect:a.switchTab.bind(a),isSelected:o,textColor:n,iconPath:i,pagePath:e.pagePath,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}());C.style=m}}}));
@@ -1 +1 @@
1
- import{p as e,b as o}from"./p-78e3ebb9.js";export{s as setNonce}from"./p-78e3ebb9.js";(()=>{const o=import.meta.url,r={};return""!==o&&(r.resourcesUrl=new URL(".",o).href),e(r)})().then((e=>o(JSON.parse('[["p-058b9004",[[4,"taro-checkbox-core",{"name":[1],"value":[1],"color":[1],"id":[1025],"checked":[4],"disabled":[4],"nativeProps":[16],"isWillLoadCalled":[32]}],[0,"taro-checkbox-group-core",{"name":[8]},[[0,"checkboxchange","function"]]]]],["p-9df17ea6",[[0,"taro-movable-area-core",{"scaleArea":[4,"scale-area"]}],[0,"taro-movable-view-core",{"x":[8],"y":[8],"direction":[1],"outOfBounds":[4,"out-of-bounds"],"inertia":[4],"friction":[2],"damping":[2],"disabled":[4],"scale":[4],"scaleMin":[2,"scale-min"],"scaleMax":[2,"scale-max"],"scaleValue":[2,"scale-value"],"animation":[4],"setParent":[64],"endScale":[64],"setScale":[64]}]]],["p-f44e975b",[[0,"taro-picker-view-column-core",{"col":[1],"initialPosition":[1,"initial-position"],"paddingVertical":[2,"padding-vertical"],"isInit":[32],"isMove":[32]},[[1,"scroll","onScroll"],[1,"mouseup","onMouseEnd"],[1,"mouseout","onMouseEnd"],[1,"mouseleave","onMouseEnd"],[1,"touchend","onTouchEnd"]]],[4,"taro-picker-view-core",{"indicatorStyle":[1,"indicator-style"],"indicatorClass":[1,"indicator-class"],"value":[16],"maskStyle":[1,"mask-style"],"maskClass":[1,"mask-class"]},[[0,"onselect","onSelect"],[0,"onselectstart","onSelectStart"],[0,"onselectend","onPickerColEnd"]]]]],["p-c212b845",[[4,"taro-radio-core",{"name":[1],"value":[1],"id":[1025],"checked":[1540],"disabled":[4],"nativeProps":[16],"isWillLoadCalled":[32]}],[0,"taro-radio-group-core",{"name":[8]},[[0,"radiochange","function"]]]]],["p-7704e165",[[4,"taro-swiper-core",{"indicatorDots":[4,"indicator-dots"],"indicatorColor":[1,"indicator-color"],"indicatorActiveColor":[1,"indicator-active-color"],"autoplay":[4],"current":[2],"interval":[2],"duration":[2],"circular":[4],"vertical":[4],"previousMargin":[1,"previous-margin"],"nextMargin":[1,"next-margin"],"displayMultipleItems":[2,"display-multiple-items"],"full":[4],"zoom":[4],"swiperWrapper":[32],"swiper":[32],"isWillLoadCalled":[32],"observer":[32],"observerFirst":[32],"observerLast":[32]}],[0,"taro-swiper-item-core",{"itemId":[1,"item-id"]}]]],["p-a294e169",[[0,"taro-ad-core"]]],["p-11936d9a",[[0,"taro-ad-custom-core"]]],["p-38de410e",[[0,"taro-animation-video-core"]]],["p-8b8a8e39",[[0,"taro-animation-view-core"]]],["p-f671ed7d",[[0,"taro-ar-camera-core"]]],["p-c2c498d9",[[0,"taro-audio-core",{"src":[1],"controls":[4],"autoplay":[4],"loop":[4],"muted":[4],"nativeProps":[16]}]]],["p-e2f2fbe5",[[0,"taro-aweme-data-core"]]],["p-429a0f99",[[0,"taro-block-core"]]],["p-3c5ac930",[[4,"taro-button-core",{"disabled":[4],"hoverClass":[1,"hover-class"],"type":[1],"hoverStartTime":[2,"hover-start-time"],"hoverStayTime":[2,"hover-stay-time"],"size":[1],"plain":[4],"loading":[4],"formType":[513,"form-type"],"hover":[32],"touch":[32]},[[0,"click","onClick"],[1,"touchstart","onTouchStart"],[1,"touchend","onTouchEnd"]]]]],["p-0393ed55",[[0,"taro-camera-core"]]],["p-27c4878c",[[0,"taro-canvas-core",{"canvasId":[1,"canvas-id"],"nativeProps":[16]}]]],["p-744a6b99",[[0,"taro-channel-live-core"]]],["p-3c91f59b",[[0,"taro-channel-video-core"]]],["p-369fb262",[[0,"taro-comment-detail-core"]]],["p-8d037fc0",[[0,"taro-comment-list-core"]]],["p-58b7e960",[[0,"taro-contact-button-core"]]],["p-c3d3eca2",[[0,"taro-cover-image-core",{"src":[1],"nativeProps":[16]}]]],["p-7722f33f",[[4,"taro-cover-view-core",{"animation":[1],"hoverClass":[1,"hover-class"],"hoverStartTime":[2,"hover-start-time"],"hoverStayTime":[2,"hover-stay-time"],"hover":[32],"touch":[32]},[[1,"touchstart","onTouchStart"],[1,"touchmove","onTouchMove"],[1,"touchend","onTouchEnd"]]]]],["p-fb585037",[[0,"taro-custom-wrapper-core"]]],["p-1e8c8ae1",[[0,"taro-editor-core"]]],["p-22dc57d4",[[0,"taro-follow-swan-core"]]],["p-0836fcd9",[[4,"taro-form-core",null,[[0,"tarobuttonsubmit","onButtonSubmit"],[0,"tarobuttonreset","onButtonReset"]]]]],["p-e9eeb060",[[0,"taro-functional-page-navigator-core"]]],["p-05c757b7",[[0,"taro-grid-view-core"]]],["p-2f7dba29",[[0,"taro-icon-core",{"type":[1],"size":[8],"color":[1]}]]],["p-c2391de5",[[0,"taro-image-core",{"src":[1],"mode":[1],"lazyLoad":[4,"lazy-load"],"nativeProps":[16],"aspectFillMode":[32]}]]],["p-1249cb09",[[0,"taro-inline-payment-panel-core"]]],["p-0b8b3af5",[[0,"taro-input-core",{"value":[1025],"type":[1],"password":[4],"placeholder":[1],"disabled":[4],"maxlength":[2],"autoFocus":[516,"focus"],"confirmType":[1,"confirm-type"],"name":[1],"nativeProps":[16],"focus":[64]}]]],["p-d797cdc4",[[0,"taro-keyboard-accessory-core"]]],["p-b16eddaa",[[4,"taro-label-core",{"for":[1]}]]],["p-beba1657",[[0,"taro-lifestyle-core"]]],["p-38a51bd2",[[0,"taro-like-core"]]],["p-e753b776",[[0,"taro-list-view-core"]]],["p-3d60bd58",[[0,"taro-live-player-core"]]],["p-07293238",[[0,"taro-live-pusher-core"]]],["p-c4dd85b6",[[0,"taro-login-core"]]],["p-05bc0fce",[[0,"taro-lottie-core"]]],["p-ae8fd8c8",[[0,"taro-map-core"]]],["p-7377a117",[[0,"taro-match-media-core"]]],["p-efcfdb97",[[0,"taro-native-slot-core"]]],["p-e8b1ea64",[[0,"taro-navigation-bar-core"]]],["p-80970d8f",[[0,"taro-navigator-core",{"hoverClass":[1,"hover-class"],"url":[1],"openType":[1,"open-type"],"isHover":[4,"is-hover"],"delta":[2]},[[0,"click","onClick"]]]]],["p-fdecdc25",[[0,"taro-official-account-core"]]],["p-2e28cb1c",[[0,"taro-open-data-core"]]],["p-a9b51167",[[0,"taro-page-container-core"]]],["p-6de6eb4e",[[0,"taro-page-meta-core"]]],["p-16e03200",[[0,"taro-progress-core",{"percent":[2],"showInfo":[4,"show-info"],"borderRadius":[8,"border-radius"],"fontSize":[8,"font-size"],"strokeWidth":[8,"stroke-width"],"activeColor":[1,"active-color"],"backgroundColor":[1,"background-color"],"active":[4]}]]],["p-4e77bdea",[[4,"taro-pull-to-refresh",{"prefixCls":[1,"prefix-cls"],"distanceToRefresh":[2,"distance-to-refresh"],"damping":[2],"indicator":[16],"currSt":[32],"dragOnEdge":[32]}]]],["p-42bcb98a",[[0,"taro-rich-text-core",{"nodes":[1]}]]],["p-c3d35ae5",[[0,"taro-root-portal-core"]]],["p-dccf1ae9",[[0,"taro-rtc-room-core"]]],["p-1be83ed3",[[0,"taro-rtc-room-item-core"]]],["p-90e4274e",[[4,"taro-scroll-view-core",{"scrollX":[4,"scroll-x"],"scrollY":[4,"scroll-y"],"upperThreshold":[8,"upper-threshold"],"lowerThreshold":[8,"lower-threshold"],"mpScrollTop":[520,"scroll-top"],"mpScrollLeft":[520,"scroll-left"],"mpScrollIntoView":[513,"scroll-into-view"],"animated":[4,"scroll-with-animation"],"mpScrollToMethod":[64],"mpScrollIntoViewMethod":[64]},[[3,"scroll","handleScroll"]]]]],["p-a6d2e81b",[[0,"taro-share-element-core"]]],["p-acd9a9da",[[0,"taro-slider-core",{"min":[2],"max":[2],"step":[2],"disabled":[4],"value":[1538],"activeColor":[1,"active-color"],"backgroundColor":[1,"background-color"],"blockSize":[2,"block-size"],"blockColor":[1,"block-color"],"showValue":[4,"show-value"],"name":[1],"totalWidth":[32],"touching":[32],"ogX":[32],"touchId":[32],"percent":[32],"ogPercent":[32],"isWillLoadCalled":[32]}]]],["p-9318da32",[[0,"taro-slot-core"]]],["p-5931c82e",[[0,"taro-sticky-header-core"]]],["p-dfc405a5",[[0,"taro-sticky-section-core"]]],["p-80f3d88d",[[0,"taro-switch-core",{"type":[1],"checked":[4],"color":[1],"name":[1],"disabled":[4],"nativeProps":[16],"isChecked":[32],"isWillLoadCalled":[32]}]]],["p-badfb3be",[[0,"taro-tab-item-core"]]],["p-4b579316",[[0,"taro-tabbar",{"conf":[16],"list":[32],"borderStyle":[32],"backgroundColor":[32],"color":[32],"selectedColor":[32],"selectedIndex":[32],"status":[32]}]]],["p-23cb8a7f",[[0,"taro-tabs-core"]]],["p-1385d50f",[[4,"taro-text-core",{"selectable":[4]}]]],["p-c30d1b2d",[[0,"taro-textarea-core",{"value":[1025],"placeholder":[1],"disabled":[4],"maxlength":[2],"autoFocus":[516,"focus"],"autoHeight":[4,"auto-height"],"name":[1],"nativeProps":[16],"line":[32],"focus":[64]}]]],["p-1493866a",[[4,"taro-view-core",{"animation":[1],"hoverClass":[1,"hover-class"],"hoverStartTime":[2,"hover-start-time"],"hoverStayTime":[2,"hover-stay-time"],"hover":[32],"touch":[32]},[[1,"touchstart","onTouchStart"],[1,"touchmove","onTouchMove"],[1,"touchend","onTouchEnd"]]]]],["p-d42e41ff",[[0,"taro-voip-room-core"]]],["p-4542b767",[[0,"taro-web-view-core",{"src":[1]}]]],["p-affb28de",[[4,"taro-picker-core",{"mode":[1],"disabled":[4],"range":[16],"rangeKey":[1,"range-key"],"value":[1032],"start":[1],"end":[1],"fields":[1],"name":[1],"pickerValue":[32],"height":[32],"hidden":[32],"fadeOut":[32],"isWillLoadCalled":[32]}],[0,"taro-picker-group",{"mode":[1],"range":[16],"rangeKey":[1,"range-key"],"height":[2],"columnId":[1,"column-id"],"updateHeight":[16],"onColumnChange":[16],"updateDay":[16],"startY":[32],"preY":[32],"hadMove":[32],"touchEnd":[32],"isMove":[32],"handleMoveStart":[64],"handleMoving":[64],"handleMoveEnd":[64]},[[1,"mousedown","onMouseDown"],[1,"mousemove","onMouseMove"],[1,"mouseup","onMouseMoveEnd"],[1,"mouseleave","onMouseMoveEnd"],[1,"touchstart","onTouchStart"],[1,"touchmove","onTouchMove"],[1,"touchend","onTouchEnd"]]]]],["p-8feeb7ce",[[0,"taro-video-core",{"src":[1],"duration":[2],"controls":[4],"autoplay":[4],"loop":[4],"muted":[4],"initialTime":[2,"initial-time"],"poster":[1],"objectFit":[1,"object-fit"],"showProgress":[4,"show-progress"],"showFullscreenBtn":[4,"show-fullscreen-btn"],"showPlayBtn":[4,"show-play-btn"],"showCenterPlayBtn":[4,"show-center-play-btn"],"showMuteBtn":[4,"show-mute-btn"],"danmuList":[16],"danmuBtn":[4,"danmu-btn"],"enableDanmu":[4,"enable-danmu"],"enablePlayGesture":[4,"enable-play-gesture"],"enableProgressGesture":[4,"enable-progress-gesture"],"vslideGesture":[4,"vslide-gesture"],"vslideGestureInFullscreen":[4,"vslide-gesture-in-fullscreen"],"nativeProps":[16],"_duration":[32],"_enableDanmu":[32],"isPlaying":[32],"isFirst":[32],"isFullScreen":[32],"fullScreenTimestamp":[32],"isMute":[32],"getHlsObject":[64],"play":[64],"pause":[64],"stop":[64],"seek":[64],"requestFullScreen":[64],"exitFullScreen":[64]},[[5,"touchmove","onDocumentTouchMove"],[5,"touchend","onDocumentTouchEnd"],[5,"touchcancel","onDocumentTouchEnd"]]],[4,"taro-video-control",{"controls":[4],"currentTime":[2,"current-time"],"duration":[2],"isPlaying":[4,"is-playing"],"pauseFunc":[16],"playFunc":[16],"seekFunc":[16],"showPlayBtn":[4,"show-play-btn"],"showProgress":[4,"show-progress"],"setProgressBall":[64],"toggleVisibility":[64],"getIsDraggingProgressBall":[64],"setCurrentTime":[64]},[[5,"touchmove","onDocumentTouchMove"],[5,"touchend","onDocumentTouchEnd"],[5,"touchcancel","onDocumentTouchEnd"]]],[0,"taro-video-danmu",{"enable":[4],"danmuList":[32],"sendDanmu":[64],"tick":[64]}]]]]'),e)));
1
+ import{p as e,b as o}from"./p-78e3ebb9.js";export{s as setNonce}from"./p-78e3ebb9.js";(()=>{const o=import.meta.url,r={};return""!==o&&(r.resourcesUrl=new URL(".",o).href),e(r)})().then((e=>o(JSON.parse('[["p-058b9004",[[4,"taro-checkbox-core",{"name":[1],"value":[1],"color":[1],"id":[1025],"checked":[4],"disabled":[4],"nativeProps":[16],"isWillLoadCalled":[32]}],[0,"taro-checkbox-group-core",{"name":[8]},[[0,"checkboxchange","function"]]]]],["p-9df17ea6",[[0,"taro-movable-area-core",{"scaleArea":[4,"scale-area"]}],[0,"taro-movable-view-core",{"x":[8],"y":[8],"direction":[1],"outOfBounds":[4,"out-of-bounds"],"inertia":[4],"friction":[2],"damping":[2],"disabled":[4],"scale":[4],"scaleMin":[2,"scale-min"],"scaleMax":[2,"scale-max"],"scaleValue":[2,"scale-value"],"animation":[4],"setParent":[64],"endScale":[64],"setScale":[64]}]]],["p-f44e975b",[[0,"taro-picker-view-column-core",{"col":[1],"initialPosition":[1,"initial-position"],"paddingVertical":[2,"padding-vertical"],"isInit":[32],"isMove":[32]},[[1,"scroll","onScroll"],[1,"mouseup","onMouseEnd"],[1,"mouseout","onMouseEnd"],[1,"mouseleave","onMouseEnd"],[1,"touchend","onTouchEnd"]]],[4,"taro-picker-view-core",{"indicatorStyle":[1,"indicator-style"],"indicatorClass":[1,"indicator-class"],"value":[16],"maskStyle":[1,"mask-style"],"maskClass":[1,"mask-class"]},[[0,"onselect","onSelect"],[0,"onselectstart","onSelectStart"],[0,"onselectend","onPickerColEnd"]]]]],["p-c212b845",[[4,"taro-radio-core",{"name":[1],"value":[1],"id":[1025],"checked":[1540],"disabled":[4],"nativeProps":[16],"isWillLoadCalled":[32]}],[0,"taro-radio-group-core",{"name":[8]},[[0,"radiochange","function"]]]]],["p-7704e165",[[4,"taro-swiper-core",{"indicatorDots":[4,"indicator-dots"],"indicatorColor":[1,"indicator-color"],"indicatorActiveColor":[1,"indicator-active-color"],"autoplay":[4],"current":[2],"interval":[2],"duration":[2],"circular":[4],"vertical":[4],"previousMargin":[1,"previous-margin"],"nextMargin":[1,"next-margin"],"displayMultipleItems":[2,"display-multiple-items"],"full":[4],"zoom":[4],"swiperWrapper":[32],"swiper":[32],"isWillLoadCalled":[32],"observer":[32],"observerFirst":[32],"observerLast":[32]}],[0,"taro-swiper-item-core",{"itemId":[1,"item-id"]}]]],["p-a294e169",[[0,"taro-ad-core"]]],["p-11936d9a",[[0,"taro-ad-custom-core"]]],["p-38de410e",[[0,"taro-animation-video-core"]]],["p-8b8a8e39",[[0,"taro-animation-view-core"]]],["p-f671ed7d",[[0,"taro-ar-camera-core"]]],["p-c2c498d9",[[0,"taro-audio-core",{"src":[1],"controls":[4],"autoplay":[4],"loop":[4],"muted":[4],"nativeProps":[16]}]]],["p-e2f2fbe5",[[0,"taro-aweme-data-core"]]],["p-429a0f99",[[0,"taro-block-core"]]],["p-3c5ac930",[[4,"taro-button-core",{"disabled":[4],"hoverClass":[1,"hover-class"],"type":[1],"hoverStartTime":[2,"hover-start-time"],"hoverStayTime":[2,"hover-stay-time"],"size":[1],"plain":[4],"loading":[4],"formType":[513,"form-type"],"hover":[32],"touch":[32]},[[0,"click","onClick"],[1,"touchstart","onTouchStart"],[1,"touchend","onTouchEnd"]]]]],["p-0393ed55",[[0,"taro-camera-core"]]],["p-27c4878c",[[0,"taro-canvas-core",{"canvasId":[1,"canvas-id"],"nativeProps":[16]}]]],["p-744a6b99",[[0,"taro-channel-live-core"]]],["p-3c91f59b",[[0,"taro-channel-video-core"]]],["p-369fb262",[[0,"taro-comment-detail-core"]]],["p-8d037fc0",[[0,"taro-comment-list-core"]]],["p-58b7e960",[[0,"taro-contact-button-core"]]],["p-c3d3eca2",[[0,"taro-cover-image-core",{"src":[1],"nativeProps":[16]}]]],["p-7722f33f",[[4,"taro-cover-view-core",{"animation":[1],"hoverClass":[1,"hover-class"],"hoverStartTime":[2,"hover-start-time"],"hoverStayTime":[2,"hover-stay-time"],"hover":[32],"touch":[32]},[[1,"touchstart","onTouchStart"],[1,"touchmove","onTouchMove"],[1,"touchend","onTouchEnd"]]]]],["p-fb585037",[[0,"taro-custom-wrapper-core"]]],["p-1e8c8ae1",[[0,"taro-editor-core"]]],["p-22dc57d4",[[0,"taro-follow-swan-core"]]],["p-0836fcd9",[[4,"taro-form-core",null,[[0,"tarobuttonsubmit","onButtonSubmit"],[0,"tarobuttonreset","onButtonReset"]]]]],["p-e9eeb060",[[0,"taro-functional-page-navigator-core"]]],["p-05c757b7",[[0,"taro-grid-view-core"]]],["p-2f7dba29",[[0,"taro-icon-core",{"type":[1],"size":[8],"color":[1]}]]],["p-c2391de5",[[0,"taro-image-core",{"src":[1],"mode":[1],"lazyLoad":[4,"lazy-load"],"nativeProps":[16],"aspectFillMode":[32]}]]],["p-1249cb09",[[0,"taro-inline-payment-panel-core"]]],["p-0b8b3af5",[[0,"taro-input-core",{"value":[1025],"type":[1],"password":[4],"placeholder":[1],"disabled":[4],"maxlength":[2],"autoFocus":[516,"focus"],"confirmType":[1,"confirm-type"],"name":[1],"nativeProps":[16],"focus":[64]}]]],["p-d797cdc4",[[0,"taro-keyboard-accessory-core"]]],["p-b16eddaa",[[4,"taro-label-core",{"for":[1]}]]],["p-beba1657",[[0,"taro-lifestyle-core"]]],["p-38a51bd2",[[0,"taro-like-core"]]],["p-e753b776",[[0,"taro-list-view-core"]]],["p-3d60bd58",[[0,"taro-live-player-core"]]],["p-07293238",[[0,"taro-live-pusher-core"]]],["p-c4dd85b6",[[0,"taro-login-core"]]],["p-05bc0fce",[[0,"taro-lottie-core"]]],["p-ae8fd8c8",[[0,"taro-map-core"]]],["p-7377a117",[[0,"taro-match-media-core"]]],["p-efcfdb97",[[0,"taro-native-slot-core"]]],["p-e8b1ea64",[[0,"taro-navigation-bar-core"]]],["p-80970d8f",[[0,"taro-navigator-core",{"hoverClass":[1,"hover-class"],"url":[1],"openType":[1,"open-type"],"isHover":[4,"is-hover"],"delta":[2]},[[0,"click","onClick"]]]]],["p-fdecdc25",[[0,"taro-official-account-core"]]],["p-2e28cb1c",[[0,"taro-open-data-core"]]],["p-a9b51167",[[0,"taro-page-container-core"]]],["p-6de6eb4e",[[0,"taro-page-meta-core"]]],["p-16e03200",[[0,"taro-progress-core",{"percent":[2],"showInfo":[4,"show-info"],"borderRadius":[8,"border-radius"],"fontSize":[8,"font-size"],"strokeWidth":[8,"stroke-width"],"activeColor":[1,"active-color"],"backgroundColor":[1,"background-color"],"active":[4]}]]],["p-4e77bdea",[[4,"taro-pull-to-refresh",{"prefixCls":[1,"prefix-cls"],"distanceToRefresh":[2,"distance-to-refresh"],"damping":[2],"indicator":[16],"currSt":[32],"dragOnEdge":[32]}]]],["p-42bcb98a",[[0,"taro-rich-text-core",{"nodes":[1]}]]],["p-c3d35ae5",[[0,"taro-root-portal-core"]]],["p-dccf1ae9",[[0,"taro-rtc-room-core"]]],["p-1be83ed3",[[0,"taro-rtc-room-item-core"]]],["p-90e4274e",[[4,"taro-scroll-view-core",{"scrollX":[4,"scroll-x"],"scrollY":[4,"scroll-y"],"upperThreshold":[8,"upper-threshold"],"lowerThreshold":[8,"lower-threshold"],"mpScrollTop":[520,"scroll-top"],"mpScrollLeft":[520,"scroll-left"],"mpScrollIntoView":[513,"scroll-into-view"],"animated":[4,"scroll-with-animation"],"mpScrollToMethod":[64],"mpScrollIntoViewMethod":[64]},[[3,"scroll","handleScroll"]]]]],["p-a6d2e81b",[[0,"taro-share-element-core"]]],["p-acd9a9da",[[0,"taro-slider-core",{"min":[2],"max":[2],"step":[2],"disabled":[4],"value":[1538],"activeColor":[1,"active-color"],"backgroundColor":[1,"background-color"],"blockSize":[2,"block-size"],"blockColor":[1,"block-color"],"showValue":[4,"show-value"],"name":[1],"totalWidth":[32],"touching":[32],"ogX":[32],"touchId":[32],"percent":[32],"ogPercent":[32],"isWillLoadCalled":[32]}]]],["p-9318da32",[[0,"taro-slot-core"]]],["p-5931c82e",[[0,"taro-sticky-header-core"]]],["p-dfc405a5",[[0,"taro-sticky-section-core"]]],["p-80f3d88d",[[0,"taro-switch-core",{"type":[1],"checked":[4],"color":[1],"name":[1],"disabled":[4],"nativeProps":[16],"isChecked":[32],"isWillLoadCalled":[32]}]]],["p-badfb3be",[[0,"taro-tab-item-core"]]],["p-79c41bc2",[[0,"taro-tabbar",{"conf":[16],"list":[32],"borderStyle":[32],"backgroundColor":[32],"color":[32],"selectedColor":[32],"selectedIndex":[32],"status":[32]}]]],["p-23cb8a7f",[[0,"taro-tabs-core"]]],["p-1385d50f",[[4,"taro-text-core",{"selectable":[4]}]]],["p-c30d1b2d",[[0,"taro-textarea-core",{"value":[1025],"placeholder":[1],"disabled":[4],"maxlength":[2],"autoFocus":[516,"focus"],"autoHeight":[4,"auto-height"],"name":[1],"nativeProps":[16],"line":[32],"focus":[64]}]]],["p-1493866a",[[4,"taro-view-core",{"animation":[1],"hoverClass":[1,"hover-class"],"hoverStartTime":[2,"hover-start-time"],"hoverStayTime":[2,"hover-stay-time"],"hover":[32],"touch":[32]},[[1,"touchstart","onTouchStart"],[1,"touchmove","onTouchMove"],[1,"touchend","onTouchEnd"]]]]],["p-d42e41ff",[[0,"taro-voip-room-core"]]],["p-4542b767",[[0,"taro-web-view-core",{"src":[1]}]]],["p-affb28de",[[4,"taro-picker-core",{"mode":[1],"disabled":[4],"range":[16],"rangeKey":[1,"range-key"],"value":[1032],"start":[1],"end":[1],"fields":[1],"name":[1],"pickerValue":[32],"height":[32],"hidden":[32],"fadeOut":[32],"isWillLoadCalled":[32]}],[0,"taro-picker-group",{"mode":[1],"range":[16],"rangeKey":[1,"range-key"],"height":[2],"columnId":[1,"column-id"],"updateHeight":[16],"onColumnChange":[16],"updateDay":[16],"startY":[32],"preY":[32],"hadMove":[32],"touchEnd":[32],"isMove":[32],"handleMoveStart":[64],"handleMoving":[64],"handleMoveEnd":[64]},[[1,"mousedown","onMouseDown"],[1,"mousemove","onMouseMove"],[1,"mouseup","onMouseMoveEnd"],[1,"mouseleave","onMouseMoveEnd"],[1,"touchstart","onTouchStart"],[1,"touchmove","onTouchMove"],[1,"touchend","onTouchEnd"]]]]],["p-8feeb7ce",[[0,"taro-video-core",{"src":[1],"duration":[2],"controls":[4],"autoplay":[4],"loop":[4],"muted":[4],"initialTime":[2,"initial-time"],"poster":[1],"objectFit":[1,"object-fit"],"showProgress":[4,"show-progress"],"showFullscreenBtn":[4,"show-fullscreen-btn"],"showPlayBtn":[4,"show-play-btn"],"showCenterPlayBtn":[4,"show-center-play-btn"],"showMuteBtn":[4,"show-mute-btn"],"danmuList":[16],"danmuBtn":[4,"danmu-btn"],"enableDanmu":[4,"enable-danmu"],"enablePlayGesture":[4,"enable-play-gesture"],"enableProgressGesture":[4,"enable-progress-gesture"],"vslideGesture":[4,"vslide-gesture"],"vslideGestureInFullscreen":[4,"vslide-gesture-in-fullscreen"],"nativeProps":[16],"_duration":[32],"_enableDanmu":[32],"isPlaying":[32],"isFirst":[32],"isFullScreen":[32],"fullScreenTimestamp":[32],"isMute":[32],"getHlsObject":[64],"play":[64],"pause":[64],"stop":[64],"seek":[64],"requestFullScreen":[64],"exitFullScreen":[64]},[[5,"touchmove","onDocumentTouchMove"],[5,"touchend","onDocumentTouchEnd"],[5,"touchcancel","onDocumentTouchEnd"]]],[4,"taro-video-control",{"controls":[4],"currentTime":[2,"current-time"],"duration":[2],"isPlaying":[4,"is-playing"],"pauseFunc":[16],"playFunc":[16],"seekFunc":[16],"showPlayBtn":[4,"show-play-btn"],"showProgress":[4,"show-progress"],"setProgressBall":[64],"toggleVisibility":[64],"getIsDraggingProgressBall":[64],"setCurrentTime":[64]},[[5,"touchmove","onDocumentTouchMove"],[5,"touchend","onDocumentTouchEnd"],[5,"touchcancel","onDocumentTouchEnd"]]],[0,"taro-video-danmu",{"enable":[4],"danmuList":[32],"sendDanmu":[64],"tick":[64]}]]]]'),e)));
@@ -44,7 +44,7 @@ export declare class Tabbar implements ComponentInterface {
44
44
  status: 0 | 1 | 2;
45
45
  onLongPress: EventEmitter;
46
46
  tabbar: HTMLDivElement;
47
- constructor();
47
+ componentWillLoad(): void;
48
48
  getCurrentUrl(): string;
49
49
  getOriginUrl: (url: string) => string;
50
50
  getSelectedIndex: (url: string) => number;
@@ -1,7 +1,6 @@
1
- import '../node_modules/.pnpm/registry.npmjs.org_react@18.2.0/node_modules/react/index.js';
1
+ import { Fragment } from 'react';
2
2
  import reactifyWebComponent from './reactify-wc.js';
3
3
  export { default as Input } from './input.js';
4
- import { r as react } from '../_virtual/index.js';
5
4
 
6
5
  // 视图容器
7
6
  const CoverImage = reactifyWebComponent('taro-cover-image-core');
@@ -62,7 +61,7 @@ const WebView = reactifyWebComponent('taro-web-view-core');
62
61
  // 页面属性配置节点
63
62
  const PageMeta = reactifyWebComponent('taro-page-meta-core');
64
63
  // 其他
65
- const Block = react.exports.Fragment;
64
+ const Block = Fragment;
66
65
  const CustomWrapper = reactifyWebComponent('taro-custom-wrapper-core');
67
66
 
68
67
  export { Ad, AdCustom, Audio, Block, Button, Camera, Canvas, Checkbox, CheckboxGroup, CoverImage, CoverView, CustomWrapper, Editor, Form, FunctionalPageNavigator, Icon, Image, KeyboardAccessory, Label, LivePlayer, LivePusher, Map, MatchMedia, MovableArea, MovableView, NavigationBar, Navigator, OfficialAccount, OpenData, PageContainer, PageMeta, Picker, PickerView, PickerViewColumn, Progress, Radio, RadioGroup, RichText, RootPortal, ScrollView, ShareElement, Slider, Swiper, SwiperItem, Switch, Text, Textarea, Video, View, VoipRoom, WebView };
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../taro-components-library-react/src/component-lib/index.ts"],"sourcesContent":["import { Fragment } from 'react'\n\nimport reactifyWc from './reactify-wc'\n\n// 视图容器\nexport const CoverImage = reactifyWc('taro-cover-image-core')\nexport const CoverView = reactifyWc('taro-cover-view-core')\nexport const MatchMedia = reactifyWc('taro-match-media-core')\nexport const MovableArea = reactifyWc('taro-movable-area-core')\nexport const MovableView = reactifyWc('taro-movable-view-core')\nexport const PageContainer = reactifyWc('taro-page-container-core')\nexport const RootPortal = reactifyWc('taro-root-portal-core')\nexport const ScrollView = reactifyWc('taro-scroll-view-core')\nexport const ShareElement = reactifyWc('taro-share-element-core')\nexport const Swiper = reactifyWc('taro-swiper-core')\nexport const SwiperItem = reactifyWc('taro-swiper-item-core')\nexport const View = reactifyWc('taro-view-core')\n\n// 基础内容\nexport const Icon = reactifyWc('taro-icon-core')\nexport const Progress = reactifyWc('taro-progress-core')\nexport const RichText = reactifyWc('taro-rich-text-core')\nexport const Text = reactifyWc('taro-text-core')\n\n// 表单组件\nexport const Button = reactifyWc('taro-button-core')\nexport const Checkbox = reactifyWc('taro-checkbox-core')\nexport const CheckboxGroup = reactifyWc('taro-checkbox-group-core')\nexport const Editor = reactifyWc('taro-editor-core')\nexport const Form = reactifyWc('taro-form-core')\nexport { default as Input } from './input'\nexport const KeyboardAccessory = reactifyWc('taro-keyboard-accessory-core')\nexport const Label = reactifyWc('taro-label-core')\nexport const Picker = reactifyWc('taro-picker-core')\nexport const PickerView = reactifyWc('taro-picker-view-core')\nexport const PickerViewColumn = reactifyWc('taro-picker-view-column-core')\nexport const Radio = reactifyWc('taro-radio-core')\nexport const RadioGroup = reactifyWc('taro-radio-group-core')\nexport const Slider = reactifyWc('taro-slider-core')\nexport const Switch = reactifyWc('taro-switch-core')\nexport const Textarea = reactifyWc('taro-textarea-core')\n\n// 导航\nexport const FunctionalPageNavigator = reactifyWc('taro-functional-page-navigator-core')\nexport const Navigator = reactifyWc('taro-navigator-core')\nexport const NavigationBar = reactifyWc('taro-navigation-bar-core')\n\n// 媒体组件\nexport const Audio = reactifyWc('taro-audio-core')\nexport const Camera = reactifyWc('taro-camera-core')\nexport const Image = reactifyWc('taro-image-core')\nexport const LivePlayer = reactifyWc('taro-live-player-core')\nexport const LivePusher = reactifyWc('taro-live-pusher-core')\nexport const Video = reactifyWc('taro-video-core')\nexport const VoipRoom = reactifyWc('taro-voip-room-core')\n\n// 地图\nexport const Map = reactifyWc('taro-map-core')\n\n// 画布\nexport const Canvas = reactifyWc('taro-canvas-core')\n\n// 开放能力\nexport const Ad = reactifyWc('taro-ad-core')\nexport const AdCustom = reactifyWc('taro-ad-custom-core')\nexport const OfficialAccount = reactifyWc('taro-official-account-core')\nexport const OpenData = reactifyWc('taro-open-data-core')\nexport const WebView = reactifyWc('taro-web-view-core')\n\n// 页面属性配置节点\nexport const PageMeta = reactifyWc('taro-page-meta-core')\n\n// 其他\nexport const Block = Fragment\nexport const CustomWrapper = reactifyWc('taro-custom-wrapper-core')\n"],"names":["reactifyWc","Fragment"],"mappings":";;;;;AAIA;MACa,UAAU,GAAGA,oBAAU,CAAC,uBAAuB,EAAC;MAChD,SAAS,GAAGA,oBAAU,CAAC,sBAAsB,EAAC;MAC9C,UAAU,GAAGA,oBAAU,CAAC,uBAAuB,EAAC;MAChD,WAAW,GAAGA,oBAAU,CAAC,wBAAwB,EAAC;MAClD,WAAW,GAAGA,oBAAU,CAAC,wBAAwB,EAAC;MAClD,aAAa,GAAGA,oBAAU,CAAC,0BAA0B,EAAC;MACtD,UAAU,GAAGA,oBAAU,CAAC,uBAAuB,EAAC;MAChD,UAAU,GAAGA,oBAAU,CAAC,uBAAuB,EAAC;MAChD,YAAY,GAAGA,oBAAU,CAAC,yBAAyB,EAAC;MACpD,MAAM,GAAGA,oBAAU,CAAC,kBAAkB,EAAC;MACvC,UAAU,GAAGA,oBAAU,CAAC,uBAAuB,EAAC;MAChD,IAAI,GAAGA,oBAAU,CAAC,gBAAgB,EAAC;AAEhD;MACa,IAAI,GAAGA,oBAAU,CAAC,gBAAgB,EAAC;MACnC,QAAQ,GAAGA,oBAAU,CAAC,oBAAoB,EAAC;MAC3C,QAAQ,GAAGA,oBAAU,CAAC,qBAAqB,EAAC;MAC5C,IAAI,GAAGA,oBAAU,CAAC,gBAAgB,EAAC;A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oBAAU,CAAC,eAAe,EAAC;AAE9C;MACa,MAAM,GAAGA,oBAAU,CAAC,kBAAkB,EAAC;AAEpD;MACa,EAAE,GAAGA,oBAAU,CAAC,cAAc,EAAC;MAC/B,QAAQ,GAAGA,oBAAU,CAAC,qBAAqB,EAAC;MAC5C,eAAe,GAAGA,oBAAU,CAAC,4BAA4B,EAAC;MAC1D,QAAQ,GAAGA,oBAAU,CAAC,qBAAqB,EAAC;MAC5C,OAAO,GAAGA,oBAAU,CAAC,oBAAoB,EAAC;AAEvD;MACa,QAAQ,GAAGA,oBAAU,CAAC,qBAAqB,EAAC;AAEzD;AACO,MAAM,KAAK,GAAGC,uBAAQ;MAChB,aAAa,GAAGD,oBAAU,CAAC,0BAA0B;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../../taro-components-library-react/src/component-lib/index.ts"],"sourcesContent":["import { Fragment } from 'react'\n\nimport reactifyWc from './reactify-wc'\n\n// 视图容器\nexport const CoverImage = reactifyWc('taro-cover-image-core')\nexport const CoverView = reactifyWc('taro-cover-view-core')\nexport const MatchMedia = reactifyWc('taro-match-media-core')\nexport const MovableArea = reactifyWc('taro-movable-area-core')\nexport const MovableView = reactifyWc('taro-movable-view-core')\nexport const PageContainer = reactifyWc('taro-page-container-core')\nexport const RootPortal = reactifyWc('taro-root-portal-core')\nexport const ScrollView = reactifyWc('taro-scroll-view-core')\nexport const ShareElement = reactifyWc('taro-share-element-core')\nexport const Swiper = reactifyWc('taro-swiper-core')\nexport const SwiperItem = reactifyWc('taro-swiper-item-core')\nexport const View = reactifyWc('taro-view-core')\n\n// 基础内容\nexport const Icon = reactifyWc('taro-icon-core')\nexport const Progress = reactifyWc('taro-progress-core')\nexport const RichText = reactifyWc('taro-rich-text-core')\nexport const Text = reactifyWc('taro-text-core')\n\n// 表单组件\nexport const Button = reactifyWc('taro-button-core')\nexport const Checkbox = reactifyWc('taro-checkbox-core')\nexport const CheckboxGroup = reactifyWc('taro-checkbox-group-core')\nexport const Editor = reactifyWc('taro-editor-core')\nexport const Form = reactifyWc('taro-form-core')\nexport { default as Input } from './input'\nexport const KeyboardAccessory = reactifyWc('taro-keyboard-accessory-core')\nexport const Label = reactifyWc('taro-label-core')\nexport const Picker = reactifyWc('taro-picker-core')\nexport const PickerView = reactifyWc('taro-picker-view-core')\nexport const PickerViewColumn = reactifyWc('taro-picker-view-column-core')\nexport const Radio = reactifyWc('taro-radio-core')\nexport const RadioGroup = reactifyWc('taro-radio-group-core')\nexport const Slider = reactifyWc('taro-slider-core')\nexport const Switch = reactifyWc('taro-switch-core')\nexport const Textarea = reactifyWc('taro-textarea-core')\n\n// 导航\nexport const FunctionalPageNavigator = reactifyWc('taro-functional-page-navigator-core')\nexport const Navigator = reactifyWc('taro-navigator-core')\nexport const NavigationBar = reactifyWc('taro-navigation-bar-core')\n\n// 媒体组件\nexport const Audio = reactifyWc('taro-audio-core')\nexport const Camera = reactifyWc('taro-camera-core')\nexport const Image = reactifyWc('taro-image-core')\nexport const LivePlayer = reactifyWc('taro-live-player-core')\nexport const LivePusher = reactifyWc('taro-live-pusher-core')\nexport const Video = reactifyWc('taro-video-core')\nexport const VoipRoom = reactifyWc('taro-voip-room-core')\n\n// 地图\nexport const Map = reactifyWc('taro-map-core')\n\n// 画布\nexport const Canvas = reactifyWc('taro-canvas-core')\n\n// 开放能力\nexport const Ad = reactifyWc('taro-ad-core')\nexport const AdCustom = reactifyWc('taro-ad-custom-core')\nexport const OfficialAccount = reactifyWc('taro-official-account-core')\nexport const OpenData = reactifyWc('taro-open-data-core')\nexport const WebView = reactifyWc('taro-web-view-core')\n\n// 页面属性配置节点\nexport const PageMeta = reactifyWc('taro-page-meta-core')\n\n// 其他\nexport const Block = Fragment\nexport const CustomWrapper = reactifyWc('taro-custom-wrapper-core')\n"],"names":["reactifyWc"],"mappings":";;;;AAIA;MACa,UAAU,GAAGA,oBAAU,CAAC,uBAAuB,EAAC;MAChD,SAAS,GAAGA,oBAAU,CAAC,sBAAsB,EAAC;MAC9C,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ebComponent from './reactify-wc.js';
3
3
 
4
4
  const Input = reactifyWebComponent('taro-input-core');
@@ -1,5 +1,4 @@
1
- import React from '../node_modules/.pnpm/registry.npmjs.org_react@18.2.0/node_modules/react/index.js';
2
- import { r as react } from '../_virtual/index.js';
1
+ import React, { createRef, createElement } from 'react';
3
2
 
4
3
  /**
5
4
  * https://github.com/BBKolton/reactify-wc/
@@ -117,7 +116,7 @@ const reactifyWebComponent = WC => {
117
116
  constructor(props) {
118
117
  super(props);
119
118
  this.eventHandlers = [];
120
- this.ref = react.exports.createRef();
119
+ this.ref = createRef();
121
120
  }
122
121
  update(prevProps) {
123
122
  this.clearEventHandlers();
@@ -166,7 +165,7 @@ const reactifyWebComponent = WC => {
166
165
  };
167
166
  if (dangerouslySetInnerHTML)
168
167
  props.dangerouslySetInnerHTML = dangerouslySetInnerHTML;
169
- return react.exports.createElement(WC, props, children);
168
+ return createElement(WC, props, children);
170
169
  }
171
170
  }
172
171
  // eslint-disable-next-line react/display-name
@@ -1 +1 @@
1
- {"version":3,"file":"reactify-wc.js","sources":["../../../../taro-components-library-react/src/component-lib/reactify-wc.ts"],"sourcesContent":["/**\n * https://github.com/BBKolton/reactify-wc/\n * modified event naming\n **/\nimport React, { createElement, createRef } from 'react'\n\nconst h = React.createElement\n\nconst SCROLL_VIEW = 'taro-scroll-view-core'\n\nconst IS_NON_DIMENSIONAL = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i\n\n// 为了不要覆盖 wc 中 host 内置的 class 和 stencil 加入的 class\nfunction getClassName (wc, prevProps, props) {\n const classList = Array.from(wc.classList)\n const oldClassNames = (prevProps.className || prevProps.class || '').split(' ')\n let incomingClassNames = (props.className || props.class || '').split(' ')\n let finalClassNames = []\n\n classList.forEach(classname => {\n if (incomingClassNames.indexOf(classname) > -1) {\n finalClassNames.push(classname)\n incomingClassNames = incomingClassNames.filter(name => name !== classname)\n } else if (oldClassNames.indexOf(classname) === -1) {\n finalClassNames.push(classname)\n }\n })\n\n finalClassNames = [...finalClassNames, ...incomingClassNames]\n\n return finalClassNames.join(' ')\n}\n\nfunction updateStyle (dom, key, val) {\n if (/^--/.test(key)) {\n // css variable\n dom.style.setProperty(key, val)\n } else if (typeof val !== 'number' || IS_NON_DIMENSIONAL.test(key)) {\n dom.style[key] = val\n } else {\n dom.style[key] = val + 'px'\n }\n}\n\nfunction updateProp (ctx, comp, propKey, prevProps, props) {\n const dom = ctx.ref.current\n const val = props[propKey]\n const prevVal = prevProps ? prevProps[propKey] : undefined\n\n if (propKey === 'children') {\n return\n }\n if (propKey.toLowerCase() === 'classname') {\n dom.className = prevProps\n ? getClassName(dom, prevProps, props)\n : val\n return\n }\n if (propKey === 'style') {\n if (typeof val === 'string') {\n dom.setAttribute(propKey, val)\n return\n }\n if (!val) {\n dom.removeAttribute(propKey)\n return\n }\n\n if (prevProps) {\n if (typeof prevVal === 'string') {\n dom.style.cssText = ''\n } else {\n for (const styleKey in prevVal) {\n updateStyle(dom, styleKey, '')\n }\n }\n }\n\n for (const styleKey in val) {\n updateStyle(dom, styleKey, val[styleKey])\n }\n return\n }\n if (/^data-.+/.test(propKey)) {\n dom.setAttribute(propKey, val)\n }\n if (comp === SCROLL_VIEW) {\n if (propKey === 'scrollTop') {\n dom.mpScrollTop = val\n return\n }\n if (propKey === 'scrollLeft') {\n dom.mpScrollLeft = val\n return\n }\n if (propKey === 'scrollIntoView') {\n dom.mpScrollIntoView = val\n return\n }\n }\n if (typeof val === 'function' && propKey.match(/^on[A-Z]/)) {\n const event = propKey.substr(2).toLowerCase()\n\n ctx.eventHandlers.push([event, val])\n return dom.addEventListener(event, val)\n }\n\n if (typeof val === 'string' || typeof val === 'number') {\n dom.setAttribute(propKey, val)\n dom[propKey] = val\n return\n }\n if (typeof val === 'boolean') {\n if (val) {\n dom[propKey] = true\n return dom.setAttribute(\n propKey,\n val\n )\n }\n dom[propKey] = false\n return dom.removeAttribute(propKey)\n }\n dom[propKey] = val\n}\n\nconst reactifyWebComponent = WC => {\n class Index extends React.Component<Record<string, any>> {\n eventHandlers: any[]\n ref: React.RefObject<HTMLElement>\n\n constructor (props) {\n super(props)\n this.eventHandlers = []\n this.ref = createRef()\n }\n\n update (prevProps) {\n this.clearEventHandlers()\n if (!this.ref.current) return\n\n Object.keys(prevProps || {}).forEach((key) => {\n if (key !== 'children' && key !== 'key' && !(key in this.props)) {\n updateProp(this, WC, key, prevProps, this.props)\n }\n })\n\n Object.keys(this.props).forEach((key) => {\n updateProp(this, WC, key, prevProps, this.props)\n })\n }\n\n componentDidUpdate (prevProps) {\n this.update(prevProps)\n }\n\n componentDidMount () {\n const { forwardRef } = this.props\n if (typeof forwardRef === 'function') {\n forwardRef(this.ref.current)\n } else if (forwardRef && typeof forwardRef === 'object' && forwardRef.hasOwnProperty('current')) {\n forwardRef.current = this.ref.current\n } else if (typeof forwardRef === 'string') {\n console.warn('内置组件不支持字符串 ref')\n }\n this.update(undefined)\n }\n\n componentWillUnmount () {\n this.clearEventHandlers()\n }\n\n clearEventHandlers () {\n this.eventHandlers.forEach(([event, handler]) => {\n if (!this.ref.current) return\n this.ref.current.removeEventListener(event, handler)\n })\n this.eventHandlers = []\n }\n\n render () {\n const { children, dangerouslySetInnerHTML } = this.props\n const props: Record<string, any> = {\n ref: this.ref\n }\n if (dangerouslySetInnerHTML) props.dangerouslySetInnerHTML = dangerouslySetInnerHTML\n return createElement(WC, props, children)\n }\n }\n\n // eslint-disable-next-line react/display-name\n return React.forwardRef((props, ref) => (\n h(Index, { ...props, forwardRef: ref })\n ))\n}\n\nexport default reactifyWebComponent\n"],"names":["createRef","createElement"],"mappings":";;;AAAA;;;AAGI;AAGJ,MAAM,CAAC,GAAG,KAAK,CAAC,aAAa,CAAA;AAE7B,MAAM,WAAW,GAAG,uBAAuB,CAAA;AAE3C,MAAM,kBAAkB,GAAG,mEAAmE,CAAA;AAE9F;AACA,SAAS,YAAY,CAAE,EAAE,EAAE,SAAS,EAAE,KAAK,EA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AC,GAAG,CAAC,OAAO,CAAC,mBAAmB,CAAC,KAAK,EAAE,OAAO,CAAC,CAAA;AACtD,aAAC,CAAC,CAAA;AACF,YAAA,IAAI,CAAC,aAAa,GAAG,EAAE,CAAA;SACxB;QAED,MAAM,GAAA;YACJ,MAAM,EAAE,QAAQ,EAAE,uBAAuB,EAAE,GAAG,IAAI,CAAC,KAAK,CAAA;AACxD,YAAA,MAAM,KAAK,GAAwB;gBACjC,GAAG,EAAE,IAAI,CAAC,GAAG;aACd,CAAA;AACD,YAAA,IAAI,uBAAuB;AAAE,gBAAA,KAAK,CAAC,uBAAuB,GAAG,uBAAuB,CAAA;YACpF,OAAOC,2BAAa,CAAC,EAAE,EAAE,KAAK,EAAE,QAAQ,CAAC,CAAA;SAC1C;AACF,KAAA;;IAGD,OAAO,KAAK,CAAC,UAAU,CAAC,CAAC,KAAK,EAAE,GAAG,MACjC,CAAC,CAAC,KAAK,EAAO,MAAA,CAAA,MAAA,CAAA,MAAA,CAAA,MAAA,CAAA,EAAA,EAAA,KAAK,CAAE,EAAA,EAAA,UAAU,EAAE,GAAG,EAAA,CAAA,CAAG,CACxC,CAAC,CAAA;AACJ;;;;"}
1
+ {"version":3,"file":"reactify-wc.js","sources":["../../../../taro-components-library-react/src/component-lib/reactify-wc.ts"],"sourcesContent":["/**\n * https://github.com/BBKolton/reactify-wc/\n * modified event naming\n **/\nimport React, { createElement, createRef } from 'react'\n\nconst h = React.createElement\n\nconst SCROLL_VIEW = 'taro-scroll-view-core'\n\nconst IS_NON_DIMENSIONAL = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i\n\n// 为了不要覆盖 wc 中 host 内置的 class 和 stencil 加入的 class\nfunction getClassName (wc, prevProps, props) {\n const classList = Array.from(wc.classList)\n const oldClassNames = (prevProps.className || prevProps.class || '').split(' ')\n let incomingClassNames = (props.className || props.class || '').split(' ')\n let finalClassNames = []\n\n classList.forEach(classname => {\n if (incomingClassNames.indexOf(classname) > -1) {\n finalClassNames.push(classname)\n incomingClassNames = incomingClassNames.filter(name => name !== classname)\n } else if (oldClassNames.indexOf(classname) === -1) {\n finalClassNames.push(classname)\n }\n })\n\n finalClassNames = [...finalClassNames, ...incomingClassNames]\n\n return finalClassNames.join(' ')\n}\n\nfunction updateStyle (dom, key, val) {\n if (/^--/.test(key)) {\n // css variable\n dom.style.setProperty(key, val)\n } else if (typeof val !== 'number' || IS_NON_DIMENSIONAL.test(key)) {\n dom.style[key] = val\n } else {\n dom.style[key] = val + 'px'\n }\n}\n\nfunction updateProp (ctx, comp, propKey, prevProps, props) {\n const dom = ctx.ref.current\n const val = props[propKey]\n const prevVal = prevProps ? prevProps[propKey] : undefined\n\n if (propKey === 'children') {\n return\n }\n if (propKey.toLowerCase() === 'classname') {\n dom.className = prevProps\n ? getClassName(dom, prevProps, props)\n : val\n return\n }\n if (propKey === 'style') {\n if (typeof val === 'string') {\n dom.setAttribute(propKey, val)\n return\n }\n if (!val) {\n dom.removeAttribute(propKey)\n return\n }\n\n if (prevProps) {\n if (typeof prevVal === 'string') {\n dom.style.cssText = ''\n } else {\n for (const styleKey in prevVal) {\n updateStyle(dom, styleKey, '')\n }\n }\n }\n\n for (const styleKey in val) {\n updateStyle(dom, styleKey, val[styleKey])\n }\n return\n }\n if (/^data-.+/.test(propKey)) {\n dom.setAttribute(propKey, val)\n }\n if (comp === SCROLL_VIEW) {\n if (propKey === 'scrollTop') {\n dom.mpScrollTop = val\n return\n }\n if (propKey === 'scrollLeft') {\n dom.mpScrollLeft = val\n return\n }\n if (propKey === 'scrollIntoView') {\n dom.mpScrollIntoView = val\n return\n }\n }\n if (typeof val === 'function' && propKey.match(/^on[A-Z]/)) {\n const event = propKey.substr(2).toLowerCase()\n\n ctx.eventHandlers.push([event, val])\n return dom.addEventListener(event, val)\n }\n\n if (typeof val === 'string' || typeof val === 'number') {\n dom.setAttribute(propKey, val)\n dom[propKey] = val\n return\n }\n if (typeof val === 'boolean') {\n if (val) {\n dom[propKey] = true\n return dom.setAttribute(\n propKey,\n val\n )\n }\n dom[propKey] = false\n return dom.removeAttribute(propKey)\n }\n dom[propKey] = val\n}\n\nconst reactifyWebComponent = WC => {\n class Index extends React.Component<Record<string, any>> {\n eventHandlers: any[]\n ref: React.RefObject<HTMLElement>\n\n constructor (props) {\n super(props)\n this.eventHandlers = []\n this.ref = createRef()\n }\n\n update (prevProps) {\n this.clearEventHandlers()\n if (!this.ref.current) return\n\n Object.keys(prevProps || {}).forEach((key) => {\n if (key !== 'children' && key !== 'key' && !(key in this.props)) {\n updateProp(this, WC, key, prevProps, this.props)\n }\n })\n\n Object.keys(this.props).forEach((key) => {\n updateProp(this, WC, key, prevProps, this.props)\n })\n }\n\n componentDidUpdate (prevProps) {\n this.update(prevProps)\n }\n\n componentDidMount () {\n const { forwardRef } = this.props\n if (typeof forwardRef === 'function') {\n forwardRef(this.ref.current)\n } else if (forwardRef && typeof forwardRef === 'object' && forwardRef.hasOwnProperty('current')) {\n forwardRef.current = this.ref.current\n } else if (typeof forwardRef === 'string') {\n console.warn('内置组件不支持字符串 ref')\n }\n this.update(undefined)\n }\n\n componentWillUnmount () {\n this.clearEventHandlers()\n }\n\n clearEventHandlers () {\n this.eventHandlers.forEach(([event, handler]) => {\n if (!this.ref.current) return\n this.ref.current.removeEventListener(event, handler)\n })\n this.eventHandlers = []\n }\n\n render () {\n const { children, dangerouslySetInnerHTML } = this.props\n const props: Record<string, any> = {\n ref: this.ref\n }\n if (dangerouslySetInnerHTML) props.dangerouslySetInnerHTML = dangerouslySetInnerHTML\n return createElement(WC, props, children)\n }\n }\n\n // eslint-disable-next-line react/display-name\n return React.forwardRef((props, ref) => (\n h(Index, { ...props, forwardRef: ref })\n ))\n}\n\nexport default reactifyWebComponent\n"],"names":[],"mappings":";;AAAA;;;AAGI;AAGJ,MAAM,CAAC,GAAG,KAAK,CAAC,aAAa,CAAA;AAE7B,MAAM,WAAW,GAAG,uBAAuB,CAAA;AAE3C,MAAM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AI;AAC9C,gBAAA,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,OAAO;oBAAE,OAAM;gBAC7B,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,mBAAmB,CAAC,KAAK,EAAE,OAAO,CAAC,CAAA;AACtD,aAAC,CAAC,CAAA;AACF,YAAA,IAAI,CAAC,aAAa,GAAG,EAAE,CAAA;SACxB;QAED,MAAM,GAAA;YACJ,MAAM,EAAE,QAAQ,EAAE,uBAAuB,EAAE,GAAG,IAAI,CAAC,KAAK,CAAA;AACxD,YAAA,MAAM,KAAK,GAAwB;gBACjC,GAAG,EAAE,IAAI,CAAC,GAAG;aACd,CAAA;AACD,YAAA,IAAI,uBAAuB;AAAE,gBAAA,KAAK,CAAC,uBAAuB,GAAG,uBAAuB,CAAA;YACpF,OAAO,aAAa,CAAC,EAAE,EAAE,KAAK,EAAE,QAAQ,CAAC,CAAA;SAC1C;AACF,KAAA;;IAGD,OAAO,KAAK,CAAC,UAAU,CAAC,CAAC,KAAK,EAAE,GAAG,MACjC,CAAC,CAAC,KAAK,EAAO,MAAA,CAAA,MAAA,CAAA,MAAA,CAAA,MAAA,CAAA,EAAA,EAAA,KAAK,CAAE,EAAA,EAAA,UAAU,EAAE,GAAG,EAAA,CAAA,CAAG,CACxC,CAAC,CAAA;AACJ;;;;"}
@@ -1,9 +1,8 @@
1
- import './node_modules/.pnpm/registry.npmjs.org_react@18.2.0/node_modules/react/index.js';
1
+ import { Fragment } from 'react';
2
2
  import { manipulatePropsFunction } from './helper.js';
3
3
  import './react-component-lib/index.js';
4
4
  import { defineCustomElementTaroAdCore, defineCustomElementTaroAdCustomCore, defineCustomElementTaroAnimationVideoCore, defineCustomElementTaroAnimationViewCore, defineCustomElementTaroArCameraCore, defineCustomElementTaroAudioCore, defineCustomElementTaroAwemeDataCore, defineCustomElementTaroButtonCore, defineCustomElementTaroCameraCore, defineCustomElementTaroCanvasCore, defineCustomElementTaroChannelLiveCore, defineCustomElementTaroChannelVideoCore, defineCustomElementTaroCheckboxCore, defineCustomElementTaroCheckboxGroupCore, defineCustomElementTaroCommentDetailCore, defineCustomElementTaroCommentListCore, defineCustomElementTaroContactButtonCore, defineCustomElementTaroCoverImageCore, defineCustomElementTaroCoverViewCore, defineCustomElementTaroEditorCore, defineCustomElementTaroFollowSwanCore, defineCustomElementTaroFormCore, defineCustomElementTaroFunctionalPageNavigatorCore, defineCustomElementTaroGridViewCore, defineCustomElementTaroIconCore, defineCustomElementTaroImageCore, defineCustomElementTaroInlinePaymentPanelCore, defineCustomElementTaroInputCore, defineCustomElementTaroKeyboardAccessoryCore, defineCustomElementTaroLabelCore, defineCustomElementTaroLifestyleCore, defineCustomElementTaroLikeCore, defineCustomElementTaroListViewCore, defineCustomElementTaroLivePlayerCore, defineCustomElementTaroLivePusherCore, defineCustomElementTaroLoginCore, defineCustomElementTaroLottieCore, defineCustomElementTaroMapCore, defineCustomElementTaroMatchMediaCore, defineCustomElementTaroMovableAreaCore, defineCustomElementTaroMovableViewCore, defineCustomElementTaroNativeSlotCore, defineCustomElementTaroNavigationBarCore, defineCustomElementTaroNavigatorCore, defineCustomElementTaroOfficialAccountCore, defineCustomElementTaroOpenDataCore, defineCustomElementTaroPageContainerCore, defineCustomElementTaroPageMetaCore, defineCustomElementTaroPickerCore, defineCustomElementTaroPickerGroup, defineCustomElementTaroPickerViewColumnCore, defineCustomElementTaroPickerViewCore, defineCustomElementTaroProgressCore, defineCustomElementTaroPullToRefresh, defineCustomElementTaroRadioCore, defineCustomElementTaroRadioGroupCore, defineCustomElementTaroRichTextCore, defineCustomElementTaroRootPortalCore, defineCustomElementTaroRtcRoomCore, defineCustomElementTaroRtcRoomItemCore, defineCustomElementTaroScrollViewCore, defineCustomElementTaroShareElementCore, defineCustomElementTaroSliderCore, defineCustomElementTaroSlotCore, defineCustomElementTaroStickyHeaderCore, defineCustomElementTaroStickySectionCore, defineCustomElementTaroSwiperCore, defineCustomElementTaroSwiperItemCore, defineCustomElementTaroSwitchCore, defineCustomElementTaroTabItemCore, defineCustomElementTaroTabbar, defineCustomElementTaroTabsCore, defineCustomElementTaroTextCore, defineCustomElementTaroTextareaCore, defineCustomElementTaroVideoControl, defineCustomElementTaroVideoCore, defineCustomElementTaroVideoDanmu, defineCustomElementTaroViewCore, defineCustomElementTaroVoipRoomCore, defineCustomElementTaroWebViewCore } from '@tarojs/components/dist/components';
5
5
  import { createReactComponent } from './react-component-lib/createComponent.js';
6
- import { r as react } from './_virtual/index.js';
7
6
 
8
7
  /* eslint-disable */
9
8
  const Ad = /*@__PURE__*/ createReactComponent('taro-ad-core', undefined, manipulatePropsFunction, defineCustomElementTaroAdCore);
@@ -13,7 +12,7 @@ const AnimationView = /*@__PURE__*/ createReactComponent('taro-animation-view-co
13
12
  const ArCamera = /*@__PURE__*/ createReactComponent('taro-ar-camera-core', undefined, manipulatePropsFunction, defineCustomElementTaroArCameraCore);
14
13
  const Audio = /*@__PURE__*/ createReactComponent('taro-audio-core', undefined, manipulatePropsFunction, defineCustomElementTaroAudioCore);
15
14
  const AwemeData = /*@__PURE__*/ createReactComponent('taro-aweme-data-core', undefined, manipulatePropsFunction, defineCustomElementTaroAwemeDataCore);
16
- const Block = react.exports.Fragment;
15
+ const Block = Fragment;
17
16
  const Button = /*@__PURE__*/ createReactComponent('taro-button-core', undefined, manipulatePropsFunction, defineCustomElementTaroButtonCore);
18
17
  const Camera = /*@__PURE__*/ createReactComponent('taro-camera-core', undefined, manipulatePropsFunction, defineCustomElementTaroCameraCore);
19
18
  const Canvas = /*@__PURE__*/ createReactComponent('taro-canvas-core', undefined, manipulatePropsFunction, defineCustomElementTaroCanvasCore);
@@ -26,7 +25,7 @@ const CommentList = /*@__PURE__*/ createReactComponent('taro-comment-list-core',
26
25
  const ContactButton = /*@__PURE__*/ createReactComponent('taro-contact-button-core', undefined, manipulatePropsFunction, defineCustomElementTaroContactButtonCore);
27
26
  const CoverImage = /*@__PURE__*/ createReactComponent('taro-cover-image-core', undefined, manipulatePropsFunction, defineCustomElementTaroCoverImageCore);
28
27
  const CoverView = /*@__PURE__*/ createReactComponent('taro-cover-view-core', undefined, manipulatePropsFunction, defineCustomElementTaroCoverViewCore);
29
- const CustomWrapper = react.exports.Fragment;
28
+ const CustomWrapper = Fragment;
30
29
  const Editor = /*@__PURE__*/ createReactComponent('taro-editor-core', undefined, manipulatePropsFunction, defineCustomElementTaroEditorCore);
31
30
  const FollowSwan = /*@__PURE__*/ createReactComponent('taro-follow-swan-core', undefined, manipulatePropsFunction, defineCustomElementTaroFollowSwanCore);
32
31
  const Form = /*@__PURE__*/ createReactComponent('taro-form-core', undefined, manipulatePropsFunction, defineCustomElementTaroFormCore);