$W4T)rYzcvaKQ%JLB^u_XT-DIBVWZKY=mK2;ztE)giv z-kzLZuUi`#*#zBLZmdG_yS{doEzq=PFjASKFiSNrM86d+Rk}2rJ_bHljE$nS=3tBi z@=7fd1-YSH4I@-4=sZCasmfxCHbPw4hKS>klg*p74E89~BBcZ#=kH{{f!{VKqqADA zVOd#Vgr~7vR9n05_tCD6TV{DB(nFQfwu^pAb|B}jnO?a%r!QvOSK$|EIF_JxzOFAD zuCyQWj{e5@>6h@I%>*e7@)AqJh6AaPC_HyX#pzWvS8}9%AH`6*pszwy0BXX@vf9L^ zvEi;$7J#{29(vmF+&q6Bz2q2`T)jqzB(Y?(r)O6^2}P@YNA8?FR18lyt&dh9CPW=% z&2Glk&qpF^`iqSgUT40oZ5(8r_5VB?_&@zEl0g YAU6NeMdOzWhWU#F;rzn+_?lQU+;%rIlkS6UU^o-!Z7BJ+xh0n{;Kb*xAC)+ z3bpmS EAkdhygPQe*Vf_MaqgX?p4nV8E0~)PjX3r7 zv8rJ%S3UWX+&`&%qhswubKyrLF8pX{P(JXCo{ADgOa1UR-sauuhfC2+U1hFwq^@#1 zSGf~cChn6-xq?0ktRD4?{|A3DFo8Sr+2@RPu`KAj>!@H_Th(N3hw$cGFux`~KT<0V zn}9_v=#03N2Y13;7C&8nPIu-^&obC_;e}qsUt?s^7!r}8zVe`mjE)Q=64I*~It&qS zU>4r-_KpA{qCP-$gbUlh)h3}@EOUY>sxw$L-h}rn8xZ;e_}FEKzQEQhVD@}Z0JSAk z2N_(O`}^;H`|p0`OF#SOAF)}uI#|ui<>A_ww_VXoXwo)*2GB*<_&$7BLpI0c3dM)K zv{%3qYOrWMk~#)ZG@c<=DcTtJbb$_A2AS3cIw6{=Uy%9*#x_f6JNFBOSV5_O n(bJXUnIX^baYhu1s|0=5E<7IZy;ibXmvYq2JodqJ8}jhHSE9__}RCA>!Wc5 zqRqLJet=rX304LC?F2QAcm4eYKV6G%{d2Qw5$6Ch72VT)NP4_t3#HnqtxQ+AA;awX zzJ<6$xoSJcjM)7TKng7ya+Jy;i9H7ASdyV7dbLQC5j>=Rl>94##k9>xM!6^N~VJ zwxeanOznhUz|C1kZP}}iY37SBM*G3OD5SulV(z>dK}HaBNmD*?uI_J*<*K@Sajk}} zvby1T8@V!QmEn>ao6Y8l;!p;B zbU_bWMTr3MCb>Dcj(t2MWA^r9bvz UV|?6BdxWhI zwm?HMk(ok9e0`_n8|~R_O3uZyr8;D8;Ft9kwLb9@fo~xK;C;0o$aGS7eSHz7Ym9%Y zb)f=@LP~0i0}=tlw-m^!vnHWbh7@8?WfRcg_9$Y#XQgH_P>1oYMeM5zfr_W978F6@ zfQX8A#3ox1QJ&Hw$z;Fzz5@22VR`~xBT}cZSm;B1Y%1x9*CL4|TbY12w+b|>xe_!9 zsGLB|_Rt*FzKmpo!$mdh;AS-}yLyHbWjTf8P*SCKyzCY$B~K>gAg5-{@J)ZbjK4HO zp7?)84aXiF9fxv?f_`zv5(;fBs)h#4WqNe0ToP2VJgN0O$I?oK)^77ukG-T_-dJ6< zEuqS|0)}NG_Nan5Jr$Xo^X$twepy?d)0d-Y*sj|UVk?3qvZ%utsB}h{M?`MZ`3|ZE zl2XZV1B|T|t4b-xL1jLbx1lX}N(0&o9AXR^QNmEHAlHU=1S%T_2S-g%DuGiOkrx?X zk&+`l(CtDS37}BnL|_KUB*jTp4Qvv6Zi@qzh!8;L_>o*lm3B2yk=1A?6nEvuZ-xg~ zB5h6R56EDmJA zd~=e(9^=#yU0s2`Cy86R3VN3%Ts9N|yhT~h`lD={NB%;{yJn7G1tcgb5czB0kzzGh zf^Q>(Ji!;ppj4pIHn1~N*8xsulMFHzVZU}dz(V*5$&W1ugkq|_<-}5?XIi)dOl&h^ zBu~mS-rM7hAPJ*M(pBNk8C19sA0C?vbb44$wN?Vk O;*FyPE6&ZG*xJo zKyN?!+k)q|&8VXp=uRG&ge42Pkx@VEIQj;1+nl;@n;|9*Auijh#O6Q17^0Vx5h0ji zq8i0vf`DR6A|DCx*9BxnA#5DID?C_*Fc@xP>W+yx9Qd$c;Jl0Zc~VuG5E#>Qg_Pt< zn9!jatsR#wO`Z^qbvJu5_z*+#d4F*(?!)?YM0D#U95)})kqT0$)TrUWMJ4#~g;Kui zLl__wM2|h}<>r<+l<$TggP?X&C$alKUaeKDT8T~ld2UH5PqS2_eiR3KBP10&&@D~u zmS?z<4hP-9QB>P;gO$1uH1s2%#5vAwx_K=t{#(pO^uT=3hiGCjZ}gQR`j>EWCs|vE zsS(_YKv^vlw8h6Av4SPB%O4z)m%}#LD)viiEnsq{UMs`d$Ii5W>OG2{zQLgYOwQ5( z4^KE+AX sv7yNLSj1B}v8#G?Fm zeh|e6_`oCn=f;L`SF GWl|tX`P15NyDm%hRWaPMW7hEz z28=6FV$0fW2$Bo^M?fd1!#*ag)kI+B35AB3tN}}Ww#&XylE4MwF5*eoF)ZE_iRaev zfe6m|644~P$UX%_j5* N_1XXhDv@p_bpP#9+x^+m(VR}Bl34Oi<`^LXThWaP++FVvir^LyWZQ1OII z0BW_x#1u&vs!{^GVvPr&(H4+3C51bjP5Mc#?Ikq-)F4#l(5bMk%#N_VsTo)bkF4`D z{{vTunzr;)OQr=tb5P#C@fT2%FvLJaT(?)G5<<=1V6=ch0i`gR?WB*v@`Iv_>Yt#V zFW&68&n~URkA*ni96pFOT{AsXx6GSHCF2^_Qj|GDV e z`39Vrz%Sv4tTb#(){c7GqG8lvn`B*>0YK2)1|$ws@+bs-7_saZ9mGL}s(Wl^a<|%! z3(+-fe*%592kfA5o4^u$>{qNsii94Yt6&t4#8AGWa1<{@iLG4UvO24pOYl%W!^Lu+ zS=;c!@8vI&tLA^EP_^A(S_)+^ZXYr>%ypC}rFec@yF%9~@G|0Mw&0|sMvVuYw~!;u zRJ^dm)QAr88I@Ft&mkfSo8!|U<2Dw>Q9O7Ply(u1b~d6}LjZpn+{dT1YYTu_25mbU z=b{sY%d8vwxpnN)x%d_YZ51Cw(G1hWhh#A_#YX`(__W*47}!O>KcTY~@<%PtMw*FH z6~2W x +Y;o=)MTg XTEsG$v%WN7RxLgo^||hAW8MEB+jT8| diff --git a/packages/taro-mini-runner/__tests__/__snapshots__/nerv.spec.ts.snap b/packages/taro-mini-runner/__tests__/__snapshots__/nerv.spec.ts.snap deleted file mode 100644 index 971bea238437..000000000000 --- a/packages/taro-mini-runner/__tests__/__snapshots__/nerv.spec.ts.snap +++ /dev/null @@ -1,745 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`nerv should build nerv app 1`] = `15`; - -exports[`nerv should build nerv app 2`] = ` -" -/** filePath: dist/app.js **/ -require(\\"./runtime\\"); - -require(\\"./common\\"); - -require(\\"./vendors\\"); - -require(\\"./taro\\"); - -(wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 4 ], { - 10: function(module, exports, __webpack_require__) {}, - 13: function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - __webpack_require__.r(__webpack_exports__); - var taro_runtime = __webpack_require__(1); - var classCallCheck = __webpack_require__(2); - var createClass = __webpack_require__(3); - var possibleConstructorReturn = __webpack_require__(5); - var getPrototypeOf = __webpack_require__(4); - var inherits = __webpack_require__(6); - var nerv = __webpack_require__(0); - var app = __webpack_require__(10); - var app_App = function(_Component) { - Object(inherits[\\"a\\"])(App, _Component); - function App() { - Object(classCallCheck[\\"a\\"])(this, App); - return Object(possibleConstructorReturn[\\"a\\"])(this, Object(getPrototypeOf[\\"a\\"])(App).apply(this, arguments)); - } - Object(createClass[\\"a\\"])(App, [ { - key: \\"componentDidMount\\", - value: function componentDidMount() {} - }, { - key: \\"componentDidShow\\", - value: function componentDidShow() {} - }, { - key: \\"componentDidHide\\", - value: function componentDidHide() {} - }, { - key: \\"componentDidCatchError\\", - value: function componentDidCatchError() {} - }, { - key: \\"render\\", - value: function render() { - return this.props.children; - } - } ]); - return App; - }(nerv[\\"Component\\"]); - var lib_src_app = app_App; - var config = { - pages: [ \\"pages/index/index\\" ], - window: { - backgroundTextStyle: \\"light\\", - navigationBarBackgroundColor: \\"#fff\\", - navigationBarTitleText: \\"WeChat\\", - navigationBarTextStyle: \\"black\\" - } - }; - taro_runtime[\\"window\\"].__taroAppConfig = config; - var inst = App(Object(taro_runtime[\\"createReactApp\\"])(lib_src_app, nerv[\\"b\\"], nerv[\\"b\\"], config)); - } -}, [ [ 13, 0, 1, 3, 2 ] ] ]); - - - -/** filePath: dist/app.json **/ -{\\"pages\\":[\\"pages/index/index\\"],\\"window\\":{\\"backgroundTextStyle\\":\\"light\\",\\"navigationBarBackgroundColor\\":\\"#fff\\",\\"navigationBarTitleText\\":\\"WeChat\\",\\"navigationBarTextStyle\\":\\"black\\"}} - -/** filePath: dist/app.wxss **/ - - -/** filePath: dist/base.wxml **/ - - - - - - - - -- - - - -- - -- - - - -- - -- - - - -- - -- - - - -- - -{{i.v}} - - - - - - - -- - - - -- - -- - - - -- - -- - - - - - - - -- - -- - - - -- - -- - - - -- - -- - - - - - - - -- - -- - - - -- - -- - - - -- - -- - - - - - - - -- - -- - - - -- - -- - - - - - - - -- - -- - - - -- - -- - - - - - - - -- - -- - - - -- - -- - - - - - - - -- - -- - - - -- - -- - - - - - - - -- - -- - - - -- - -- - - - - - - - -- - -- - - - -- - -- - - - - - - - -- - -- - - - -- - -- - - - - - - - -- - -- - - - -- - -- - - - - - - - -- - -- - - - -- - -- - - - - - - - -- - -- - - - -- - -- - - - - - - - -- - -- - - - -- - -- - - - - - - - -- - -- - - -/** filePath: dist/common.js **/ -(wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 2 ], [ function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - __webpack_exports__[\\"b\\"] = \\"nervjs-mock\\"; -} ] ]); - -/** filePath: dist/comp.js **/ -(wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 6 ], { - 11: function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - __webpack_require__.r(__webpack_exports__); - var _tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1); - Component(Object(_tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__[\\"createRecursiveComponentConfig\\"])()); - } -}, [ [ 11, 0, 1 ] ] ]); - -/** filePath: dist/comp.json **/ -{\\"component\\":true,\\"usingComponents\\":{\\"comp\\":\\"./comp\\"}} - -/** filePath: dist/comp.wxml **/ - - - -/** filePath: dist/pages/index/index.js **/ -(wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 7 ], { - 12: function(module, exports, __webpack_require__) {}, - 14: function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - __webpack_require__.r(__webpack_exports__); - var taro_runtime = __webpack_require__(1); - var classCallCheck = __webpack_require__(2); - var createClass = __webpack_require__(3); - var possibleConstructorReturn = __webpack_require__(5); - var getPrototypeOf = __webpack_require__(4); - var inherits = __webpack_require__(6); - var nerv = __webpack_require__(0); - var taro_components = __webpack_require__(7); - var index = __webpack_require__(12); - var index_Index = function(_Component) { - Object(inherits[\\"a\\"])(Index, _Component); - function Index() { - Object(classCallCheck[\\"a\\"])(this, Index); - return Object(possibleConstructorReturn[\\"a\\"])(this, Object(getPrototypeOf[\\"a\\"])(Index).apply(this, arguments)); - } - Object(createClass[\\"a\\"])(Index, [ { - key: \\"componentDidMount\\", - value: function componentDidMount() {} - }, { - key: \\"componentWillUnmount\\", - value: function componentWillUnmount() {} - }, { - key: \\"componentDidShow\\", - value: function componentDidShow() {} - }, { - key: \\"componentDidHide\\", - value: function componentDidHide() {} - }, { - key: \\"render\\", - value: function render() { - return nerv[\\"b\\"].createElement(taro_components[\\"View\\"], { - className: \\"index\\" - }, nerv[\\"b\\"].createElement(taro_components[\\"Text\\"], null, \\"Hello world!\\")); - } - } ]); - return Index; - }(nerv[\\"Component\\"]); - var config = { - navigationBarTitleText: \\"\\\\u9996\\\\u9875\\" - }; - var inst = Page(Object(taro_runtime[\\"createPageConfig\\"])(index_Index, \\"pages/index/index\\", {}, config || {})); - } -}, [ [ 14, 0, 1, 3, 2 ] ] ]); - -/** filePath: dist/pages/index/index.json **/ -{\\"navigationBarTitleText\\":\\"首页\\",\\"usingComponents\\":{\\"comp\\":\\"../../comp\\"}} - -/** filePath: dist/pages/index/index.wxml **/ - - - -/** filePath: dist/pages/index/index.wxss **/ - - -/** filePath: dist/runtime.js **/ -(function(modules) { - function webpackJsonpCallback(data) { - var chunkIds = data[0]; - var moreModules = data[1]; - var executeModules = data[2]; - var moduleId, chunkId, i = 0, resolves = []; - for (;i < chunkIds.length; i++) { - chunkId = chunkIds[i]; - if (Object.prototype.hasOwnProperty.call(installedChunks, chunkId) && installedChunks[chunkId]) { - resolves.push(installedChunks[chunkId][0]); - } - installedChunks[chunkId] = 0; - } - for (moduleId in moreModules) { - if (Object.prototype.hasOwnProperty.call(moreModules, moduleId)) { - modules[moduleId] = moreModules[moduleId]; - } - } - if (parentJsonpFunction) parentJsonpFunction(data); - while (resolves.length) { - resolves.shift()(); - } - deferredModules.push.apply(deferredModules, executeModules || []); - return checkDeferredModules(); - } - function checkDeferredModules() { - var result; - for (var i = 0; i < deferredModules.length; i++) { - var deferredModule = deferredModules[i]; - var fulfilled = true; - for (var j = 1; j < deferredModule.length; j++) { - var depId = deferredModule[j]; - if (installedChunks[depId] !== 0) fulfilled = false; - } - if (fulfilled) { - deferredModules.splice(i--, 1); - result = __webpack_require__(__webpack_require__.s = deferredModule[0]); - } - } - return result; - } - var installedModules = {}; - var installedChunks = { - 0: 0 - }; - var deferredModules = []; - function __webpack_require__(moduleId) { - if (installedModules[moduleId]) { - return installedModules[moduleId].exports; - } - var module = installedModules[moduleId] = { - i: moduleId, - l: false, - exports: {} - }; - modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); - module.l = true; - return module.exports; - } - __webpack_require__.m = modules; - __webpack_require__.c = installedModules; - __webpack_require__.d = function(exports, name, getter) { - if (!__webpack_require__.o(exports, name)) { - Object.defineProperty(exports, name, { - enumerable: true, - get: getter - }); - } - }; - __webpack_require__.r = function(exports) { - if (typeof Symbol !== \\"undefined\\" && Symbol.toStringTag) { - Object.defineProperty(exports, Symbol.toStringTag, { - value: \\"Module\\" - }); - } - Object.defineProperty(exports, \\"__esModule\\", { - value: true - }); - }; - __webpack_require__.t = function(value, mode) { - if (mode & 1) value = __webpack_require__(value); - if (mode & 8) return value; - if (mode & 4 && typeof value === \\"object\\" && value && value.__esModule) return value; - var ns = Object.create(null); - __webpack_require__.r(ns); - Object.defineProperty(ns, \\"default\\", { - enumerable: true, - value: value - }); - if (mode & 2 && typeof value != \\"string\\") for (var key in value) __webpack_require__.d(ns, key, function(key) { - return value[key]; - }.bind(null, key)); - return ns; - }; - __webpack_require__.n = function(module) { - var getter = module && module.__esModule ? function getDefault() { - return module[\\"default\\"]; - } : function getModuleExports() { - return module; - }; - __webpack_require__.d(getter, \\"a\\", getter); - return getter; - }; - __webpack_require__.o = function(object, property) { - return Object.prototype.hasOwnProperty.call(object, property); - }; - __webpack_require__.p = \\"/\\"; - var jsonpArray = wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []; - var oldJsonpFunction = jsonpArray.push.bind(jsonpArray); - jsonpArray.push = webpackJsonpCallback; - jsonpArray = jsonpArray.slice(); - for (var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]); - var parentJsonpFunction = oldJsonpFunction; - checkDeferredModules(); -})([]); - -/** filePath: dist/taro.js **/ -(wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 1 ], { - 1: function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - var _unused_webpack_default_export = \\"taro-runtime-mock\\"; - }, - 7: function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - var _unused_webpack_default_export = \\"taro-components-mock\\"; - } -} ]); - -/** filePath: dist/vendors.js **/ -(wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 3 ], [ , , function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - __webpack_require__.d(__webpack_exports__, \\"a\\", (function() { - return _classCallCheck; - })); - function _classCallCheck(instance, Constructor) { - if (!(instance instanceof Constructor)) { - throw new TypeError(\\"Cannot call a class as a function\\"); - } - } -}, function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - __webpack_require__.d(__webpack_exports__, \\"a\\", (function() { - return _createClass; - })); - function _defineProperties(target, props) { - for (var i = 0; i < props.length; i++) { - var descriptor = props[i]; - descriptor.enumerable = descriptor.enumerable || false; - descriptor.configurable = true; - if (\\"value\\" in descriptor) descriptor.writable = true; - Object.defineProperty(target, descriptor.key, descriptor); - } - } - function _createClass(Constructor, protoProps, staticProps) { - if (protoProps) _defineProperties(Constructor.prototype, protoProps); - if (staticProps) _defineProperties(Constructor, staticProps); - return Constructor; - } -}, function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - __webpack_require__.d(__webpack_exports__, \\"a\\", (function() { - return _getPrototypeOf; - })); - function _getPrototypeOf(o) { - _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { - return o.__proto__ || Object.getPrototypeOf(o); - }; - return _getPrototypeOf(o); - } -}, function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - __webpack_require__.d(__webpack_exports__, \\"a\\", (function() { - return _possibleConstructorReturn; - })); - function _typeof(obj) { - \\"@babel/helpers - typeof\\"; - if (typeof Symbol === \\"function\\" && typeof Symbol.iterator === \\"symbol\\") { - _typeof = function _typeof(obj) { - return typeof obj; - }; - } else { - _typeof = function _typeof(obj) { - return obj && typeof Symbol === \\"function\\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \\"symbol\\" : typeof obj; - }; - } - return _typeof(obj); - } - function _assertThisInitialized(self) { - if (self === void 0) { - throw new ReferenceError(\\"this hasn't been initialised - super() hasn't been called\\"); - } - return self; - } - function _possibleConstructorReturn(self, call) { - if (call && (_typeof(call) === \\"object\\" || typeof call === \\"function\\")) { - return call; - } - return _assertThisInitialized(self); - } -}, function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - __webpack_require__.d(__webpack_exports__, \\"a\\", (function() { - return _inherits; - })); - function _setPrototypeOf(o, p) { - _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { - o.__proto__ = p; - return o; - }; - return _setPrototypeOf(o, p); - } - function _inherits(subClass, superClass) { - if (typeof superClass !== \\"function\\" && superClass !== null) { - throw new TypeError(\\"Super expression must either be null or a function\\"); - } - subClass.prototype = Object.create(superClass && superClass.prototype, { - constructor: { - value: subClass, - writable: true, - configurable: true - } - }); - if (superClass) _setPrototypeOf(subClass, superClass); - } -} ] ]); -" -`; diff --git a/packages/taro-mini-runner/__tests__/__snapshots__/parse-html.spec.ts.snap b/packages/taro-mini-runner/__tests__/__snapshots__/parse-html.spec.ts.snap deleted file mode 100644 index 0048a657a81b..000000000000 --- a/packages/taro-mini-runner/__tests__/__snapshots__/parse-html.spec.ts.snap +++ /dev/null @@ -1,624 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`parse html should parse dangerouslySetInnerHTML 1`] = `15`; - -exports[`parse html should parse dangerouslySetInnerHTML 2`] = ` -" -/** filePath: dist/app.js **/ -require(\\"./runtime\\"); - -require(\\"./common\\"); - -require(\\"./vendors\\"); - -require(\\"./taro\\"); - -(wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 4 ], { - 11: function(module, exports, __webpack_require__) {}, - 14: function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - __webpack_require__.r(__webpack_exports__); - var taro_runtime = __webpack_require__(1); - var classCallCheck = __webpack_require__(2); - var createClass = __webpack_require__(3); - var possibleConstructorReturn = __webpack_require__(5); - var getPrototypeOf = __webpack_require__(4); - var inherits = __webpack_require__(6); - var react = __webpack_require__(0); - var app = __webpack_require__(11); - var app_App = function(_Component) { - Object(inherits[\\"a\\"])(App, _Component); - function App() { - Object(classCallCheck[\\"a\\"])(this, App); - return Object(possibleConstructorReturn[\\"a\\"])(this, Object(getPrototypeOf[\\"a\\"])(App).apply(this, arguments)); - } - Object(createClass[\\"a\\"])(App, [ { - key: \\"componentDidMount\\", - value: function componentDidMount() {} - }, { - key: \\"componentDidShow\\", - value: function componentDidShow() {} - }, { - key: \\"componentDidHide\\", - value: function componentDidHide() {} - }, { - key: \\"componentDidCatchError\\", - value: function componentDidCatchError() {} - }, { - key: \\"render\\", - value: function render() { - return this.props.children; - } - } ]); - return App; - }(react[\\"Component\\"]); - var lib_src_app = app_App; - var taro_react = __webpack_require__(8); - var config = { - pages: [ \\"pages/index/index\\" ], - window: { - backgroundTextStyle: \\"light\\", - navigationBarBackgroundColor: \\"#fff\\", - navigationBarTitleText: \\"WeChat\\", - navigationBarTextStyle: \\"black\\" - } - }; - taro_runtime[\\"window\\"].__taroAppConfig = config; - var inst = App(Object(taro_runtime[\\"createReactApp\\"])(lib_src_app, react, taro_react[\\"a\\"], config)); - } -}, [ [ 14, 0, 1, 3, 2 ] ] ]); - - - -/** filePath: dist/app.json **/ -{\\"pages\\":[\\"pages/index/index\\"],\\"window\\":{\\"backgroundTextStyle\\":\\"light\\",\\"navigationBarBackgroundColor\\":\\"#fff\\",\\"navigationBarTitleText\\":\\"WeChat\\",\\"navigationBarTextStyle\\":\\"black\\"}} - -/** filePath: dist/app.wxss **/ - - -/** filePath: dist/base.wxml **/ - - - - - - - - -- - - - -- - -- - - - -- - -- - - - -- - -{{i.v}} - - - - - - - -- - - - -- - -- - - - - - - - -- - -- - - - -- - -- - - - - - - - -- - -- - - - -- - -- - - - - - - - -- - -- - - - - - - - -- - -- - - - - - - - -- - -- - - - - - - - -- - -- - - - - - - - -- - -- - - - - - - - -- - -- - - - - - - - -- - -- - - - - - - - -- - -- - - - - - - - -- - -- - - - - - - - -- - -- - - - - - - - -- - -- - - - - - - - -- - -- - - -/** filePath: dist/common.js **/ -(wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 2 ], [ function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - __webpack_require__.r(__webpack_exports__); - __webpack_exports__[\\"default\\"] = \\"react-mock\\"; -} ] ]); - -/** filePath: dist/comp.js **/ -(wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 6 ], { - 12: function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - __webpack_require__.r(__webpack_exports__); - var _tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1); - Component(Object(_tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__[\\"createRecursiveComponentConfig\\"])()); - } -}, [ [ 12, 0, 1 ] ] ]); - -/** filePath: dist/comp.json **/ -{\\"component\\":true,\\"usingComponents\\":{\\"comp\\":\\"./comp\\"}} - -/** filePath: dist/comp.wxml **/ - - - -/** filePath: dist/pages/index/index.js **/ -(wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 7 ], { - 13: function(module, exports, __webpack_require__) {}, - 15: function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - __webpack_require__.r(__webpack_exports__); - var taro_runtime = __webpack_require__(1); - var classCallCheck = __webpack_require__(2); - var createClass = __webpack_require__(3); - var possibleConstructorReturn = __webpack_require__(5); - var getPrototypeOf = __webpack_require__(4); - var inherits = __webpack_require__(6); - var react = __webpack_require__(0); - var taro_components = __webpack_require__(7); - var index = __webpack_require__(13); - var index_Index = function(_Component) { - Object(inherits[\\"a\\"])(Index, _Component); - function Index() { - Object(classCallCheck[\\"a\\"])(this, Index); - return Object(possibleConstructorReturn[\\"a\\"])(this, Object(getPrototypeOf[\\"a\\"])(Index).apply(this, arguments)); - } - Object(createClass[\\"a\\"])(Index, [ { - key: \\"render\\", - value: function render() { - var html = '\\\\n image\\\\u56fe\\\\u7247\\\\n\\\\n\\\\n '; - return react[\\"default\\"].createElement(taro_components[\\"View\\"], { - className: \\"index\\" - }, react[\\"default\\"].createElement(taro_components[\\"View\\"], { - dangerouslySetInnerHTML: { - __html: html - } - })); - } - } ]); - return Index; - }(react[\\"Component\\"]); - var config = { - navigationBarTitleText: \\"\\\\u9996\\\\u9875\\" - }; - var inst = Page(Object(taro_runtime[\\"createPageConfig\\"])(index_Index, \\"pages/index/index\\", {}, config || {})); - } -}, [ [ 15, 0, 1, 3, 2 ] ] ]); - -/** filePath: dist/pages/index/index.json **/ -{\\"navigationBarTitleText\\":\\"首页\\",\\"usingComponents\\":{\\"comp\\":\\"../../comp\\"}} - -/** filePath: dist/pages/index/index.wxml **/ -\\\\n\\\\nscaleToFill\\\\uff1a\\\\u4e0d\\\\u4fdd\\\\u6301\\\\u7eb5\\\\u6a2a\\\\u6bd4\\\\u7f29\\\\u653e\\\\u56fe\\\\u7247\\\\uff0c\\\\u4f7f\\\\u56fe\\\\u7247\\\\u5b8c\\\\u5168\\\\u9002\\\\u5e94\\\\n\\\\n\\\\n\\\\n\\\\n \\\\n\\\\n\\\\naspectFit\\\\uff1a\\\\u4fdd\\\\u6301\\\\u7eb5\\\\u6a2a\\\\u6bd4\\\\u7f29\\\\u653e\\\\u56fe\\\\u7247\\\\uff0c\\\\u4f7f\\\\u56fe\\\\u7247\\\\u7684\\\\u957f\\\\u8fb9\\\\u80fd\\\\u5b8c\\\\u5168\\\\u663e\\\\u793a\\\\u51fa\\\\u6765\\\\n\\\\n\\\\n\\\\n\\\\n \\\\n\\\\n\\\\naspectFill\\\\uff1a\\\\u4fdd\\\\u6301\\\\u7eb5\\\\u6a2a\\\\u6bd4\\\\u7f29\\\\u653e\\\\u56fe\\\\u7247\\\\uff0c\\\\u53ea\\\\u4fdd\\\\u8bc1\\\\u56fe\\\\u7247\\\\u7684\\\\u77ed\\\\u8fb9\\\\u80fd\\\\u5b8c\\\\u5168\\\\u663e\\\\u793a\\\\u51fa\\\\u6765\\\\n\\\\n\\\\n\\\\n\\\\n \\\\n\\\\n\\\\ntop\\\\uff1a\\\\u4e0d\\\\u7f29\\\\u653e\\\\u56fe\\\\u7247\\\\uff0c\\\\u53ea\\\\u663e\\\\u793a\\\\u56fe\\\\u7247\\\\u7684\\\\u9876\\\\u90e8\\\\u533a\\\\u57df\\\\n\\\\n\\\\n\\\\n\\\\n \\\\n\\\\n\\\\nbottom\\\\uff1a\\\\u4e0d\\\\u7f29\\\\u653e\\\\u56fe\\\\u7247\\\\uff0c\\\\u53ea\\\\u663e\\\\u793a\\\\u56fe\\\\u7247\\\\u7684\\\\u5e95\\\\u90e8\\\\u533a\\\\u57df\\\\n\\\\n\\\\n\\\\n\\\\n \\\\n\\\\n\\\\ncenter\\\\uff1a\\\\u4e0d\\\\u7f29\\\\u653e\\\\u56fe\\\\u7247\\\\uff0c\\\\u53ea\\\\u663e\\\\u793a\\\\u56fe\\\\u7247\\\\u7684\\\\u4e2d\\\\u95f4\\\\u533a\\\\u57df\\\\n\\\\n\\\\n\\\\n\\\\n \\\\n\\\\n\\\\nleft\\\\uff1a\\\\u4e0d\\\\u7f29\\\\u653e\\\\u56fe\\\\u7247\\\\uff0c\\\\u53ea\\\\u663e\\\\u793a\\\\u56fe\\\\u7247\\\\u7684\\\\u5de6\\\\u8fb9\\\\u533a\\\\u57df\\\\n\\\\n\\\\n\\\\n\\\\n \\\\n\\\\n\\\\nright\\\\uff1a\\\\u4e0d\\\\u7f29\\\\u653e\\\\u56fe\\\\u7247\\\\uff0c\\\\u53ea\\\\u663e\\\\u793a\\\\u56fe\\\\u7247\\\\u7684\\\\u53f3\\\\u8fb9\\\\u8fb9\\\\u533a\\\\u57df\\\\n\\\\n\\\\n\\\\n\\\\n \\\\n\\\\n\\\\ntop left\\\\uff1a\\\\u4e0d\\\\u7f29\\\\u653e\\\\u56fe\\\\u7247\\\\uff0c\\\\u53ea\\\\u663e\\\\u793a\\\\u56fe\\\\u7247\\\\u7684\\\\u5de6\\\\u4e0a\\\\u8fb9\\\\u533a\\\\u57df\\\\n\\\\n\\\\n\\\\n\\\\n \\\\n\\\\n\\\\ntop right\\\\uff1a\\\\u4e0d\\\\u7f29\\\\u653e\\\\u56fe\\\\u7247\\\\uff0c\\\\u53ea\\\\u663e\\\\u793a\\\\u56fe\\\\u7247\\\\u7684\\\\u53f3\\\\u4e0a\\\\u8fb9\\\\u533a\\\\u57df\\\\n\\\\n\\\\n\\\\n\\\\n \\\\n\\\\n\\\\nbottom left\\\\uff1a\\\\u4e0d\\\\u7f29\\\\u653e\\\\u56fe\\\\u7247\\\\uff0c\\\\u53ea\\\\u663e\\\\u793a\\\\u56fe\\\\u7247\\\\u7684\\\\u5de6\\\\u4e0b\\\\u8fb9\\\\u533a\\\\u57df\\\\n\\\\n\\\\n\\\\n\\\\n \\\\n\\\\n\\\\nbottom right\\\\uff1a\\\\u4e0d\\\\u7f29\\\\u653e\\\\u56fe\\\\u7247\\\\uff0c\\\\u53ea\\\\u663e\\\\u793a\\\\u56fe\\\\u7247\\\\u7684\\\\u53f3\\\\u4e0b\\\\u8fb9\\\\u533a\\\\u57df\\\\n\\\\n\\\\n\\\\n\\\\n \\\\n- - -/** filePath: dist/pages/index/index.wxss **/ - - -/** filePath: dist/runtime.js **/ -(function(modules) { - function webpackJsonpCallback(data) { - var chunkIds = data[0]; - var moreModules = data[1]; - var executeModules = data[2]; - var moduleId, chunkId, i = 0, resolves = []; - for (;i < chunkIds.length; i++) { - chunkId = chunkIds[i]; - if (Object.prototype.hasOwnProperty.call(installedChunks, chunkId) && installedChunks[chunkId]) { - resolves.push(installedChunks[chunkId][0]); - } - installedChunks[chunkId] = 0; - } - for (moduleId in moreModules) { - if (Object.prototype.hasOwnProperty.call(moreModules, moduleId)) { - modules[moduleId] = moreModules[moduleId]; - } - } - if (parentJsonpFunction) parentJsonpFunction(data); - while (resolves.length) { - resolves.shift()(); - } - deferredModules.push.apply(deferredModules, executeModules || []); - return checkDeferredModules(); - } - function checkDeferredModules() { - var result; - for (var i = 0; i < deferredModules.length; i++) { - var deferredModule = deferredModules[i]; - var fulfilled = true; - for (var j = 1; j < deferredModule.length; j++) { - var depId = deferredModule[j]; - if (installedChunks[depId] !== 0) fulfilled = false; - } - if (fulfilled) { - deferredModules.splice(i--, 1); - result = __webpack_require__(__webpack_require__.s = deferredModule[0]); - } - } - return result; - } - var installedModules = {}; - var installedChunks = { - 0: 0 - }; - var deferredModules = []; - function __webpack_require__(moduleId) { - if (installedModules[moduleId]) { - return installedModules[moduleId].exports; - } - var module = installedModules[moduleId] = { - i: moduleId, - l: false, - exports: {} - }; - modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); - module.l = true; - return module.exports; - } - __webpack_require__.m = modules; - __webpack_require__.c = installedModules; - __webpack_require__.d = function(exports, name, getter) { - if (!__webpack_require__.o(exports, name)) { - Object.defineProperty(exports, name, { - enumerable: true, - get: getter - }); - } - }; - __webpack_require__.r = function(exports) { - if (typeof Symbol !== \\"undefined\\" && Symbol.toStringTag) { - Object.defineProperty(exports, Symbol.toStringTag, { - value: \\"Module\\" - }); - } - Object.defineProperty(exports, \\"__esModule\\", { - value: true - }); - }; - __webpack_require__.t = function(value, mode) { - if (mode & 1) value = __webpack_require__(value); - if (mode & 8) return value; - if (mode & 4 && typeof value === \\"object\\" && value && value.__esModule) return value; - var ns = Object.create(null); - __webpack_require__.r(ns); - Object.defineProperty(ns, \\"default\\", { - enumerable: true, - value: value - }); - if (mode & 2 && typeof value != \\"string\\") for (var key in value) __webpack_require__.d(ns, key, function(key) { - return value[key]; - }.bind(null, key)); - return ns; - }; - __webpack_require__.n = function(module) { - var getter = module && module.__esModule ? function getDefault() { - return module[\\"default\\"]; - } : function getModuleExports() { - return module; - }; - __webpack_require__.d(getter, \\"a\\", getter); - return getter; - }; - __webpack_require__.o = function(object, property) { - return Object.prototype.hasOwnProperty.call(object, property); - }; - __webpack_require__.p = \\"/\\"; - var jsonpArray = wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []; - var oldJsonpFunction = jsonpArray.push.bind(jsonpArray); - jsonpArray.push = webpackJsonpCallback; - jsonpArray = jsonpArray.slice(); - for (var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]); - var parentJsonpFunction = oldJsonpFunction; - checkDeferredModules(); -})([]); - -/** filePath: dist/taro.js **/ -(wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 1 ], { - 1: function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - var _unused_webpack_default_export = \\"taro-runtime-mock\\"; - }, - 7: function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - var _unused_webpack_default_export = \\"taro-components-mock\\"; - }, - 8: function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - __webpack_exports__[\\"a\\"] = \\"taro-react-mock\\"; - } -} ]); - -/** filePath: dist/vendors.js **/ -(wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 3 ], [ , , function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - __webpack_require__.d(__webpack_exports__, \\"a\\", (function() { - return _classCallCheck; - })); - function _classCallCheck(instance, Constructor) { - if (!(instance instanceof Constructor)) { - throw new TypeError(\\"Cannot call a class as a function\\"); - } - } -}, function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - __webpack_require__.d(__webpack_exports__, \\"a\\", (function() { - return _createClass; - })); - function _defineProperties(target, props) { - for (var i = 0; i < props.length; i++) { - var descriptor = props[i]; - descriptor.enumerable = descriptor.enumerable || false; - descriptor.configurable = true; - if (\\"value\\" in descriptor) descriptor.writable = true; - Object.defineProperty(target, descriptor.key, descriptor); - } - } - function _createClass(Constructor, protoProps, staticProps) { - if (protoProps) _defineProperties(Constructor.prototype, protoProps); - if (staticProps) _defineProperties(Constructor, staticProps); - return Constructor; - } -}, function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - __webpack_require__.d(__webpack_exports__, \\"a\\", (function() { - return _getPrototypeOf; - })); - function _getPrototypeOf(o) { - _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { - return o.__proto__ || Object.getPrototypeOf(o); - }; - return _getPrototypeOf(o); - } -}, function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - __webpack_require__.d(__webpack_exports__, \\"a\\", (function() { - return _possibleConstructorReturn; - })); - function _typeof(obj) { - \\"@babel/helpers - typeof\\"; - if (typeof Symbol === \\"function\\" && typeof Symbol.iterator === \\"symbol\\") { - _typeof = function _typeof(obj) { - return typeof obj; - }; - } else { - _typeof = function _typeof(obj) { - return obj && typeof Symbol === \\"function\\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \\"symbol\\" : typeof obj; - }; - } - return _typeof(obj); - } - function _assertThisInitialized(self) { - if (self === void 0) { - throw new ReferenceError(\\"this hasn't been initialised - super() hasn't been called\\"); - } - return self; - } - function _possibleConstructorReturn(self, call) { - if (call && (_typeof(call) === \\"object\\" || typeof call === \\"function\\")) { - return call; - } - return _assertThisInitialized(self); - } -}, function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - __webpack_require__.d(__webpack_exports__, \\"a\\", (function() { - return _inherits; - })); - function _setPrototypeOf(o, p) { - _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { - o.__proto__ = p; - return o; - }; - return _setPrototypeOf(o, p); - } - function _inherits(subClass, superClass) { - if (typeof superClass !== \\"function\\" && superClass !== null) { - throw new TypeError(\\"Super expression must either be null or a function\\"); - } - subClass.prototype = Object.create(superClass && superClass.prototype, { - constructor: { - value: subClass, - writable: true, - configurable: true - } - }); - if (superClass) _setPrototypeOf(subClass, superClass); - } -} ] ]); -" -`; diff --git a/packages/taro-mini-runner/__tests__/__snapshots__/qq.spec.ts.snap b/packages/taro-mini-runner/__tests__/__snapshots__/qq.spec.ts.snap deleted file mode 100644 index 0bf63edeccef..000000000000 --- a/packages/taro-mini-runner/__tests__/__snapshots__/qq.spec.ts.snap +++ /dev/null @@ -1,2632 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`qq should base template loop 10 times 1`] = `15`; - -exports[`qq should base template loop 10 times 2`] = ` -" -/** filePath: dist/app.js **/ -require(\\"./runtime\\"); - -require(\\"./common\\"); - -require(\\"./vendors\\"); - -require(\\"./taro\\"); - -(wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 4 ], { - 12: function(module, exports, __webpack_require__) {}, - 20: function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - __webpack_require__.r(__webpack_exports__); - var taro_runtime = __webpack_require__(1); - var classCallCheck = __webpack_require__(3); - var createClass = __webpack_require__(4); - var possibleConstructorReturn = __webpack_require__(6); - var getPrototypeOf = __webpack_require__(5); - var inherits = __webpack_require__(7); - var react = __webpack_require__(0); - var app = __webpack_require__(12); - var app_App = function(_Component) { - Object(inherits[\\"a\\"])(App, _Component); - function App() { - Object(classCallCheck[\\"a\\"])(this, App); - return Object(possibleConstructorReturn[\\"a\\"])(this, Object(getPrototypeOf[\\"a\\"])(App).apply(this, arguments)); - } - Object(createClass[\\"a\\"])(App, [ { - key: \\"componentDidMount\\", - value: function componentDidMount() {} - }, { - key: \\"componentDidShow\\", - value: function componentDidShow() {} - }, { - key: \\"componentDidHide\\", - value: function componentDidHide() {} - }, { - key: \\"componentDidCatchError\\", - value: function componentDidCatchError() {} - }, { - key: \\"render\\", - value: function render() { - return this.props.children; - } - } ]); - return App; - }(react[\\"Component\\"]); - var lib_src_app = app_App; - var taro_react = __webpack_require__(9); - var config = { - pages: [ \\"pages/index/index\\" ], - window: { - backgroundTextStyle: \\"light\\", - navigationBarBackgroundColor: \\"#fff\\", - navigationBarTitleText: \\"WeChat\\", - navigationBarTextStyle: \\"black\\" - } - }; - taro_runtime[\\"window\\"].__taroAppConfig = config; - var inst = App(Object(taro_runtime[\\"createReactApp\\"])(lib_src_app, react, taro_react[\\"a\\"], config)); - } -}, [ [ 20, 0, 1, 3, 2 ] ] ]); - - - -/** filePath: dist/app.json **/ -{\\"pages\\":[\\"pages/index/index\\"],\\"window\\":{\\"backgroundTextStyle\\":\\"light\\",\\"navigationBarBackgroundColor\\":\\"#fff\\",\\"navigationBarTitleText\\":\\"WeChat\\",\\"navigationBarTextStyle\\":\\"black\\"}} - -/** filePath: dist/app.wxss **/ - - -/** filePath: dist/base.wxml **/ - - - - - - - - -- - - - -- - -- - - - - - - - - - - - - - - - - - - - - - - - - - - - -- - -- - - - -- - -- - - - -- - -{{i.v}} - - - - - - - -- - - - -- - -- - - - -- - -- - - - - - - - -- - -- - - - -- - -- - - - -- - -- - - - - - - - -- - -- - - - -- - -- - - - -- - -- - - - - - - - -- - -- - - - -- - -- - - - - - - - -- - -- - - - -- - -- - - - - - - - -- - -- - - - -- - -- - - - - - - - -- - -- - - - -- - -- - - - - - - - -- - -- - - - -- - -- - - - - - - - -- - -- - - -/** filePath: dist/common.js **/ -(wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 2 ], [ function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - __webpack_require__.r(__webpack_exports__); - __webpack_exports__[\\"default\\"] = \\"react-mock\\"; -} ] ]); - -/** filePath: dist/comp.js **/ -(wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 6 ], { - 13: function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - __webpack_require__.r(__webpack_exports__); - var _tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1); - Component(Object(_tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__[\\"createRecursiveComponentConfig\\"])()); - } -}, [ [ 13, 0, 1 ] ] ]); - -/** filePath: dist/comp.json **/ -{\\"component\\":true,\\"usingComponents\\":{\\"comp\\":\\"./comp\\"}} - -/** filePath: dist/comp.wxml **/ - - - -/** filePath: dist/pages/index/index.js **/ -(wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 7 ], [ , , , , , , , , function(module, exports, __webpack_require__) { - module.exports = __webpack_require__(14); -}, , , , , , function(module, exports, __webpack_require__) { - var g = function() { - return this; - }() || Function(\\"return this\\")(); - var hadRuntime = g.regeneratorRuntime && Object.getOwnPropertyNames(g).indexOf(\\"regeneratorRuntime\\") >= 0; - var oldRuntime = hadRuntime && g.regeneratorRuntime; - g.regeneratorRuntime = undefined; - module.exports = __webpack_require__(15); - if (hadRuntime) { - g.regeneratorRuntime = oldRuntime; - } else { - try { - delete g.regeneratorRuntime; - } catch (e) { - g.regeneratorRuntime = undefined; - } - } -}, function(module, exports, __webpack_require__) { - (function(module) { - var _typeof = __webpack_require__(17); - !function(global) { - \\"use strict\\"; - var Op = Object.prototype; - var hasOwn = Op.hasOwnProperty; - var undefined; - var $Symbol = typeof Symbol === \\"function\\" ? Symbol : {}; - var iteratorSymbol = $Symbol.iterator || \\"@@iterator\\"; - var asyncIteratorSymbol = $Symbol.asyncIterator || \\"@@asyncIterator\\"; - var toStringTagSymbol = $Symbol.toStringTag || \\"@@toStringTag\\"; - var inModule = (false ? undefined : _typeof(module)) === \\"object\\"; - var runtime = global.regeneratorRuntime; - if (runtime) { - if (inModule) { - module.exports = runtime; - } - return; - } - runtime = global.regeneratorRuntime = inModule ? module.exports : {}; - function wrap(innerFn, outerFn, self, tryLocsList) { - var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator; - var generator = Object.create(protoGenerator.prototype); - var context = new Context(tryLocsList || []); - generator._invoke = makeInvokeMethod(innerFn, self, context); - return generator; - } - runtime.wrap = wrap; - function tryCatch(fn, obj, arg) { - try { - return { - type: \\"normal\\", - arg: fn.call(obj, arg) - }; - } catch (err) { - return { - type: \\"throw\\", - arg: err - }; - } - } - var GenStateSuspendedStart = \\"suspendedStart\\"; - var GenStateSuspendedYield = \\"suspendedYield\\"; - var GenStateExecuting = \\"executing\\"; - var GenStateCompleted = \\"completed\\"; - var ContinueSentinel = {}; - function Generator() {} - function GeneratorFunction() {} - function GeneratorFunctionPrototype() {} - var IteratorPrototype = {}; - IteratorPrototype[iteratorSymbol] = function() { - return this; - }; - var getProto = Object.getPrototypeOf; - var NativeIteratorPrototype = getProto && getProto(getProto(values([]))); - if (NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) { - IteratorPrototype = NativeIteratorPrototype; - } - var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); - GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype; - GeneratorFunctionPrototype.constructor = GeneratorFunction; - GeneratorFunctionPrototype[toStringTagSymbol] = GeneratorFunction.displayName = \\"GeneratorFunction\\"; - function defineIteratorMethods(prototype) { - [ \\"next\\", \\"throw\\", \\"return\\" ].forEach((function(method) { - prototype[method] = function(arg) { - return this._invoke(method, arg); - }; - })); - } - runtime.isGeneratorFunction = function(genFun) { - var ctor = typeof genFun === \\"function\\" && genFun.constructor; - return ctor ? ctor === GeneratorFunction || (ctor.displayName || ctor.name) === \\"GeneratorFunction\\" : false; - }; - runtime.mark = function(genFun) { - if (Object.setPrototypeOf) { - Object.setPrototypeOf(genFun, GeneratorFunctionPrototype); - } else { - genFun.__proto__ = GeneratorFunctionPrototype; - if (!(toStringTagSymbol in genFun)) { - genFun[toStringTagSymbol] = \\"GeneratorFunction\\"; - } - } - genFun.prototype = Object.create(Gp); - return genFun; - }; - runtime.awrap = function(arg) { - return { - __await: arg - }; - }; - function AsyncIterator(generator) { - function invoke(method, arg, resolve, reject) { - var record = tryCatch(generator[method], generator, arg); - if (record.type === \\"throw\\") { - reject(record.arg); - } else { - var result = record.arg; - var value = result.value; - if (value && _typeof(value) === \\"object\\" && hasOwn.call(value, \\"__await\\")) { - return Promise.resolve(value.__await).then((function(value) { - invoke(\\"next\\", value, resolve, reject); - }), (function(err) { - invoke(\\"throw\\", err, resolve, reject); - })); - } - return Promise.resolve(value).then((function(unwrapped) { - result.value = unwrapped; - resolve(result); - }), reject); - } - } - var previousPromise; - function enqueue(method, arg) { - function callInvokeWithMethodAndArg() { - return new Promise((function(resolve, reject) { - invoke(method, arg, resolve, reject); - })); - } - return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); - } - this._invoke = enqueue; - } - defineIteratorMethods(AsyncIterator.prototype); - AsyncIterator.prototype[asyncIteratorSymbol] = function() { - return this; - }; - runtime.AsyncIterator = AsyncIterator; - runtime.async = function(innerFn, outerFn, self, tryLocsList) { - var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList)); - return runtime.isGeneratorFunction(outerFn) ? iter : iter.next().then((function(result) { - return result.done ? result.value : iter.next(); - })); - }; - function makeInvokeMethod(innerFn, self, context) { - var state = GenStateSuspendedStart; - return function invoke(method, arg) { - if (state === GenStateExecuting) { - throw new Error(\\"Generator is already running\\"); - } - if (state === GenStateCompleted) { - if (method === \\"throw\\") { - throw arg; - } - return doneResult(); - } - context.method = method; - context.arg = arg; - while (true) { - var delegate = context.delegate; - if (delegate) { - var delegateResult = maybeInvokeDelegate(delegate, context); - if (delegateResult) { - if (delegateResult === ContinueSentinel) continue; - return delegateResult; - } - } - if (context.method === \\"next\\") { - context.sent = context._sent = context.arg; - } else if (context.method === \\"throw\\") { - if (state === GenStateSuspendedStart) { - state = GenStateCompleted; - throw context.arg; - } - context.dispatchException(context.arg); - } else if (context.method === \\"return\\") { - context.abrupt(\\"return\\", context.arg); - } - state = GenStateExecuting; - var record = tryCatch(innerFn, self, context); - if (record.type === \\"normal\\") { - state = context.done ? GenStateCompleted : GenStateSuspendedYield; - if (record.arg === ContinueSentinel) { - continue; - } - return { - value: record.arg, - done: context.done - }; - } else if (record.type === \\"throw\\") { - state = GenStateCompleted; - context.method = \\"throw\\"; - context.arg = record.arg; - } - } - }; - } - function maybeInvokeDelegate(delegate, context) { - var method = delegate.iterator[context.method]; - if (method === undefined) { - context.delegate = null; - if (context.method === \\"throw\\") { - if (delegate.iterator.return) { - context.method = \\"return\\"; - context.arg = undefined; - maybeInvokeDelegate(delegate, context); - if (context.method === \\"throw\\") { - return ContinueSentinel; - } - } - context.method = \\"throw\\"; - context.arg = new TypeError(\\"The iterator does not provide a 'throw' method\\"); - } - return ContinueSentinel; - } - var record = tryCatch(method, delegate.iterator, context.arg); - if (record.type === \\"throw\\") { - context.method = \\"throw\\"; - context.arg = record.arg; - context.delegate = null; - return ContinueSentinel; - } - var info = record.arg; - if (!info) { - context.method = \\"throw\\"; - context.arg = new TypeError(\\"iterator result is not an object\\"); - context.delegate = null; - return ContinueSentinel; - } - if (info.done) { - context[delegate.resultName] = info.value; - context.next = delegate.nextLoc; - if (context.method !== \\"return\\") { - context.method = \\"next\\"; - context.arg = undefined; - } - } else { - return info; - } - context.delegate = null; - return ContinueSentinel; - } - defineIteratorMethods(Gp); - Gp[toStringTagSymbol] = \\"Generator\\"; - Gp[iteratorSymbol] = function() { - return this; - }; - Gp.toString = function() { - return \\"[object Generator]\\"; - }; - function pushTryEntry(locs) { - var entry = { - tryLoc: locs[0] - }; - if (1 in locs) { - entry.catchLoc = locs[1]; - } - if (2 in locs) { - entry.finallyLoc = locs[2]; - entry.afterLoc = locs[3]; - } - this.tryEntries.push(entry); - } - function resetTryEntry(entry) { - var record = entry.completion || {}; - record.type = \\"normal\\"; - delete record.arg; - entry.completion = record; - } - function Context(tryLocsList) { - this.tryEntries = [ { - tryLoc: \\"root\\" - } ]; - tryLocsList.forEach(pushTryEntry, this); - this.reset(true); - } - runtime.keys = function(object) { - var keys = []; - for (var key in object) { - keys.push(key); - } - keys.reverse(); - return function next() { - while (keys.length) { - var key = keys.pop(); - if (key in object) { - next.value = key; - next.done = false; - return next; - } - } - next.done = true; - return next; - }; - }; - function values(iterable) { - if (iterable) { - var iteratorMethod = iterable[iteratorSymbol]; - if (iteratorMethod) { - return iteratorMethod.call(iterable); - } - if (typeof iterable.next === \\"function\\") { - return iterable; - } - if (!isNaN(iterable.length)) { - var i = -1, next = function next() { - while (++i < iterable.length) { - if (hasOwn.call(iterable, i)) { - next.value = iterable[i]; - next.done = false; - return next; - } - } - next.value = undefined; - next.done = true; - return next; - }; - return next.next = next; - } - } - return { - next: doneResult - }; - } - runtime.values = values; - function doneResult() { - return { - value: undefined, - done: true - }; - } - Context.prototype = { - constructor: Context, - reset: function reset(skipTempReset) { - this.prev = 0; - this.next = 0; - this.sent = this._sent = undefined; - this.done = false; - this.delegate = null; - this.method = \\"next\\"; - this.arg = undefined; - this.tryEntries.forEach(resetTryEntry); - if (!skipTempReset) { - for (var name in this) { - if (name.charAt(0) === \\"t\\" && hasOwn.call(this, name) && !isNaN(+name.slice(1))) { - this[name] = undefined; - } - } - } - }, - stop: function stop() { - this.done = true; - var rootEntry = this.tryEntries[0]; - var rootRecord = rootEntry.completion; - if (rootRecord.type === \\"throw\\") { - throw rootRecord.arg; - } - return this.rval; - }, - dispatchException: function dispatchException(exception) { - if (this.done) { - throw exception; - } - var context = this; - function handle(loc, caught) { - record.type = \\"throw\\"; - record.arg = exception; - context.next = loc; - if (caught) { - context.method = \\"next\\"; - context.arg = undefined; - } - return !!caught; - } - for (var i = this.tryEntries.length - 1; i >= 0; --i) { - var entry = this.tryEntries[i]; - var record = entry.completion; - if (entry.tryLoc === \\"root\\") { - return handle(\\"end\\"); - } - if (entry.tryLoc <= this.prev) { - var hasCatch = hasOwn.call(entry, \\"catchLoc\\"); - var hasFinally = hasOwn.call(entry, \\"finallyLoc\\"); - if (hasCatch && hasFinally) { - if (this.prev < entry.catchLoc) { - return handle(entry.catchLoc, true); - } else if (this.prev < entry.finallyLoc) { - return handle(entry.finallyLoc); - } - } else if (hasCatch) { - if (this.prev < entry.catchLoc) { - return handle(entry.catchLoc, true); - } - } else if (hasFinally) { - if (this.prev < entry.finallyLoc) { - return handle(entry.finallyLoc); - } - } else { - throw new Error(\\"try statement without catch or finally\\"); - } - } - } - }, - abrupt: function abrupt(type, arg) { - for (var i = this.tryEntries.length - 1; i >= 0; --i) { - var entry = this.tryEntries[i]; - if (entry.tryLoc <= this.prev && hasOwn.call(entry, \\"finallyLoc\\") && this.prev < entry.finallyLoc) { - var finallyEntry = entry; - break; - } - } - if (finallyEntry && (type === \\"break\\" || type === \\"continue\\") && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc) { - finallyEntry = null; - } - var record = finallyEntry ? finallyEntry.completion : {}; - record.type = type; - record.arg = arg; - if (finallyEntry) { - this.method = \\"next\\"; - this.next = finallyEntry.finallyLoc; - return ContinueSentinel; - } - return this.complete(record); - }, - complete: function complete(record, afterLoc) { - if (record.type === \\"throw\\") { - throw record.arg; - } - if (record.type === \\"break\\" || record.type === \\"continue\\") { - this.next = record.arg; - } else if (record.type === \\"return\\") { - this.rval = this.arg = record.arg; - this.method = \\"return\\"; - this.next = \\"end\\"; - } else if (record.type === \\"normal\\" && afterLoc) { - this.next = afterLoc; - } - return ContinueSentinel; - }, - finish: function finish(finallyLoc) { - for (var i = this.tryEntries.length - 1; i >= 0; --i) { - var entry = this.tryEntries[i]; - if (entry.finallyLoc === finallyLoc) { - this.complete(entry.completion, entry.afterLoc); - resetTryEntry(entry); - return ContinueSentinel; - } - } - }, - catch: function _catch(tryLoc) { - for (var i = this.tryEntries.length - 1; i >= 0; --i) { - var entry = this.tryEntries[i]; - if (entry.tryLoc === tryLoc) { - var record = entry.completion; - if (record.type === \\"throw\\") { - var thrown = record.arg; - resetTryEntry(entry); - } - return thrown; - } - } - throw new Error(\\"illegal catch attempt\\"); - }, - delegateYield: function delegateYield(iterable, resultName, nextLoc) { - this.delegate = { - iterator: values(iterable), - resultName: resultName, - nextLoc: nextLoc - }; - if (this.method === \\"next\\") { - this.arg = undefined; - } - return ContinueSentinel; - } - }; - }(function() { - return this; - }() || Function(\\"return this\\")()); - }).call(this, __webpack_require__(16)(module)); -}, function(module, exports) { - module.exports = function(module) { - if (!module.webpackPolyfill) { - module.deprecate = function() {}; - module.paths = []; - if (!module.children) module.children = []; - Object.defineProperty(module, \\"loaded\\", { - enumerable: true, - get: function get() { - return module.l; - } - }); - Object.defineProperty(module, \\"id\\", { - enumerable: true, - get: function get() { - return module.i; - } - }); - module.webpackPolyfill = 1; - } - return module; - }; -}, function(module, exports) { - function _typeof(obj) { - \\"@babel/helpers - typeof\\"; - if (typeof Symbol === \\"function\\" && typeof Symbol.iterator === \\"symbol\\") { - module.exports = _typeof = function _typeof(obj) { - return typeof obj; - }; - } else { - module.exports = _typeof = function _typeof(obj) { - return obj && typeof Symbol === \\"function\\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \\"symbol\\" : typeof obj; - }; - } - return _typeof(obj); - } - module.exports = _typeof; -}, function(module, exports, __webpack_require__) {}, function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - __webpack_require__.r(__webpack_exports__); - var taro_runtime = __webpack_require__(1); - var regenerator = __webpack_require__(8); - var regenerator_default = __webpack_require__.n(regenerator); - function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { - try { - var info = gen[key](arg); - var value = info.value; - } catch (error) { - reject(error); - return; - } - if (info.done) { - resolve(value); - } else { - Promise.resolve(value).then(_next, _throw); - } - } - function _asyncToGenerator(fn) { - return function() { - var self = this, args = arguments; - return new Promise((function(resolve, reject) { - var gen = fn.apply(self, args); - function _next(value) { - asyncGeneratorStep(gen, resolve, reject, _next, _throw, \\"next\\", value); - } - function _throw(err) { - asyncGeneratorStep(gen, resolve, reject, _next, _throw, \\"throw\\", err); - } - _next(undefined); - })); - }; - } - var classCallCheck = __webpack_require__(3); - var createClass = __webpack_require__(4); - var possibleConstructorReturn = __webpack_require__(6); - var getPrototypeOf = __webpack_require__(5); - var inherits = __webpack_require__(7); - var react = __webpack_require__(0); - var taro_components = __webpack_require__(2); - var index = __webpack_require__(18); - var index_Index = function(_Component) { - Object(inherits[\\"a\\"])(Index, _Component); - function Index() { - Object(classCallCheck[\\"a\\"])(this, Index); - return Object(possibleConstructorReturn[\\"a\\"])(this, Object(getPrototypeOf[\\"a\\"])(Index).apply(this, arguments)); - } - Object(createClass[\\"a\\"])(Index, [ { - key: \\"componentWillMount\\", - value: function() { - var _componentWillMount = _asyncToGenerator(regenerator_default.a.mark((function _callee() { - return regenerator_default.a.wrap((function _callee$(_context) { - while (1) { - switch (_context.prev = _context.next) { - case 0: - _context.next = 2; - return Promise.resolve(1); - - case 2: - case \\"end\\": - return _context.stop(); - } - } - }), _callee); - }))); - function componentWillMount() { - return _componentWillMount.apply(this, arguments); - } - return componentWillMount; - }() - }, { - key: \\"componentDidMount\\", - value: function componentDidMount() {} - }, { - key: \\"componentWillUnmount\\", - value: function componentWillUnmount() {} - }, { - key: \\"componentDidShow\\", - value: function componentDidShow() {} - }, { - key: \\"componentDidHide\\", - value: function componentDidHide() {} - }, { - key: \\"render\\", - value: function render() { - return react[\\"default\\"].createElement(taro_components[\\"View\\"], { - className: \\"index\\" - }, react[\\"default\\"].createElement(taro_components[\\"Text\\"], null, \\"Hello world!\\"), react[\\"default\\"].createElement(taro_components[\\"Input\\"], { - placeholder: \\"input\\", - value: \\"\\" - }), react[\\"default\\"].createElement(taro_components[\\"Textarea\\"], { - value: \\"\\" - })); - } - } ]); - return Index; - }(react[\\"Component\\"]); - var config = { - navigationBarTitleText: \\"\\\\u9996\\\\u9875\\" - }; - var inst = Page(Object(taro_runtime[\\"createPageConfig\\"])(index_Index, \\"pages/index/index\\", {}, config || {})); -} ], [ [ 19, 0, 1, 3, 2 ] ] ]); - -/** filePath: dist/pages/index/index.json **/ -{\\"navigationBarTitleText\\":\\"首页\\",\\"usingComponents\\":{\\"comp\\":\\"../../comp\\"}} - -/** filePath: dist/pages/index/index.wxml **/ - - - -/** filePath: dist/pages/index/index.wxss **/ - - -/** filePath: dist/runtime.js **/ -(function(modules) { - function webpackJsonpCallback(data) { - var chunkIds = data[0]; - var moreModules = data[1]; - var executeModules = data[2]; - var moduleId, chunkId, i = 0, resolves = []; - for (;i < chunkIds.length; i++) { - chunkId = chunkIds[i]; - if (Object.prototype.hasOwnProperty.call(installedChunks, chunkId) && installedChunks[chunkId]) { - resolves.push(installedChunks[chunkId][0]); - } - installedChunks[chunkId] = 0; - } - for (moduleId in moreModules) { - if (Object.prototype.hasOwnProperty.call(moreModules, moduleId)) { - modules[moduleId] = moreModules[moduleId]; - } - } - if (parentJsonpFunction) parentJsonpFunction(data); - while (resolves.length) { - resolves.shift()(); - } - deferredModules.push.apply(deferredModules, executeModules || []); - return checkDeferredModules(); - } - function checkDeferredModules() { - var result; - for (var i = 0; i < deferredModules.length; i++) { - var deferredModule = deferredModules[i]; - var fulfilled = true; - for (var j = 1; j < deferredModule.length; j++) { - var depId = deferredModule[j]; - if (installedChunks[depId] !== 0) fulfilled = false; - } - if (fulfilled) { - deferredModules.splice(i--, 1); - result = __webpack_require__(__webpack_require__.s = deferredModule[0]); - } - } - return result; - } - var installedModules = {}; - var installedChunks = { - 0: 0 - }; - var deferredModules = []; - function __webpack_require__(moduleId) { - if (installedModules[moduleId]) { - return installedModules[moduleId].exports; - } - var module = installedModules[moduleId] = { - i: moduleId, - l: false, - exports: {} - }; - modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); - module.l = true; - return module.exports; - } - __webpack_require__.m = modules; - __webpack_require__.c = installedModules; - __webpack_require__.d = function(exports, name, getter) { - if (!__webpack_require__.o(exports, name)) { - Object.defineProperty(exports, name, { - enumerable: true, - get: getter - }); - } - }; - __webpack_require__.r = function(exports) { - if (typeof Symbol !== \\"undefined\\" && Symbol.toStringTag) { - Object.defineProperty(exports, Symbol.toStringTag, { - value: \\"Module\\" - }); - } - Object.defineProperty(exports, \\"__esModule\\", { - value: true - }); - }; - __webpack_require__.t = function(value, mode) { - if (mode & 1) value = __webpack_require__(value); - if (mode & 8) return value; - if (mode & 4 && typeof value === \\"object\\" && value && value.__esModule) return value; - var ns = Object.create(null); - __webpack_require__.r(ns); - Object.defineProperty(ns, \\"default\\", { - enumerable: true, - value: value - }); - if (mode & 2 && typeof value != \\"string\\") for (var key in value) __webpack_require__.d(ns, key, function(key) { - return value[key]; - }.bind(null, key)); - return ns; - }; - __webpack_require__.n = function(module) { - var getter = module && module.__esModule ? function getDefault() { - return module[\\"default\\"]; - } : function getModuleExports() { - return module; - }; - __webpack_require__.d(getter, \\"a\\", getter); - return getter; - }; - __webpack_require__.o = function(object, property) { - return Object.prototype.hasOwnProperty.call(object, property); - }; - __webpack_require__.p = \\"/\\"; - var jsonpArray = wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []; - var oldJsonpFunction = jsonpArray.push.bind(jsonpArray); - jsonpArray.push = webpackJsonpCallback; - jsonpArray = jsonpArray.slice(); - for (var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]); - var parentJsonpFunction = oldJsonpFunction; - checkDeferredModules(); -})([]); - -/** filePath: dist/taro.js **/ -(wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 1 ], { - 1: function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - var _unused_webpack_default_export = \\"taro-runtime-mock\\"; - }, - 2: function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - var _unused_webpack_default_export = \\"taro-components-mock\\"; - }, - 9: function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - __webpack_exports__[\\"a\\"] = \\"taro-react-mock\\"; - } -} ]); - -/** filePath: dist/vendors.js **/ -(wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 3 ], [ , , , function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - __webpack_require__.d(__webpack_exports__, \\"a\\", (function() { - return _classCallCheck; - })); - function _classCallCheck(instance, Constructor) { - if (!(instance instanceof Constructor)) { - throw new TypeError(\\"Cannot call a class as a function\\"); - } - } -}, function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - __webpack_require__.d(__webpack_exports__, \\"a\\", (function() { - return _createClass; - })); - function _defineProperties(target, props) { - for (var i = 0; i < props.length; i++) { - var descriptor = props[i]; - descriptor.enumerable = descriptor.enumerable || false; - descriptor.configurable = true; - if (\\"value\\" in descriptor) descriptor.writable = true; - Object.defineProperty(target, descriptor.key, descriptor); - } - } - function _createClass(Constructor, protoProps, staticProps) { - if (protoProps) _defineProperties(Constructor.prototype, protoProps); - if (staticProps) _defineProperties(Constructor, staticProps); - return Constructor; - } -}, function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - __webpack_require__.d(__webpack_exports__, \\"a\\", (function() { - return _getPrototypeOf; - })); - function _getPrototypeOf(o) { - _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { - return o.__proto__ || Object.getPrototypeOf(o); - }; - return _getPrototypeOf(o); - } -}, function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - __webpack_require__.d(__webpack_exports__, \\"a\\", (function() { - return _possibleConstructorReturn; - })); - function _typeof(obj) { - \\"@babel/helpers - typeof\\"; - if (typeof Symbol === \\"function\\" && typeof Symbol.iterator === \\"symbol\\") { - _typeof = function _typeof(obj) { - return typeof obj; - }; - } else { - _typeof = function _typeof(obj) { - return obj && typeof Symbol === \\"function\\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \\"symbol\\" : typeof obj; - }; - } - return _typeof(obj); - } - function _assertThisInitialized(self) { - if (self === void 0) { - throw new ReferenceError(\\"this hasn't been initialised - super() hasn't been called\\"); - } - return self; - } - function _possibleConstructorReturn(self, call) { - if (call && (_typeof(call) === \\"object\\" || typeof call === \\"function\\")) { - return call; - } - return _assertThisInitialized(self); - } -}, function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - __webpack_require__.d(__webpack_exports__, \\"a\\", (function() { - return _inherits; - })); - function _setPrototypeOf(o, p) { - _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { - o.__proto__ = p; - return o; - }; - return _setPrototypeOf(o, p); - } - function _inherits(subClass, superClass) { - if (typeof superClass !== \\"function\\" && superClass !== null) { - throw new TypeError(\\"Super expression must either be null or a function\\"); - } - subClass.prototype = Object.create(superClass && superClass.prototype, { - constructor: { - value: subClass, - writable: true, - configurable: true - } - }); - if (superClass) _setPrototypeOf(subClass, superClass); - } -} ] ]); -" -`; - -exports[`qq should build qq app 1`] = `16`; - -exports[`qq should build qq app 2`] = ` -" -/** filePath: dist/app.js **/ -require(\\"./runtime\\"); - -require(\\"./common\\"); - -require(\\"./vendors\\"); - -require(\\"./taro\\"); - -(qq[\\"webpackJsonp\\"] = qq[\\"webpackJsonp\\"] || []).push([ [ 4 ], { - 12: function(module, exports, __webpack_require__) {}, - 20: function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - __webpack_require__.r(__webpack_exports__); - var taro_runtime = __webpack_require__(1); - var classCallCheck = __webpack_require__(3); - var createClass = __webpack_require__(4); - var possibleConstructorReturn = __webpack_require__(6); - var getPrototypeOf = __webpack_require__(5); - var inherits = __webpack_require__(7); - var react = __webpack_require__(0); - var app = __webpack_require__(12); - var app_App = function(_Component) { - Object(inherits[\\"a\\"])(App, _Component); - function App() { - Object(classCallCheck[\\"a\\"])(this, App); - return Object(possibleConstructorReturn[\\"a\\"])(this, Object(getPrototypeOf[\\"a\\"])(App).apply(this, arguments)); - } - Object(createClass[\\"a\\"])(App, [ { - key: \\"componentDidMount\\", - value: function componentDidMount() {} - }, { - key: \\"componentDidShow\\", - value: function componentDidShow() {} - }, { - key: \\"componentDidHide\\", - value: function componentDidHide() {} - }, { - key: \\"componentDidCatchError\\", - value: function componentDidCatchError() {} - }, { - key: \\"render\\", - value: function render() { - return this.props.children; - } - } ]); - return App; - }(react[\\"Component\\"]); - var lib_src_app = app_App; - var taro_react = __webpack_require__(9); - var config = { - pages: [ \\"pages/index/index\\" ], - window: { - backgroundTextStyle: \\"light\\", - navigationBarBackgroundColor: \\"#fff\\", - navigationBarTitleText: \\"WeChat\\", - navigationBarTextStyle: \\"black\\" - } - }; - taro_runtime[\\"window\\"].__taroAppConfig = config; - var inst = App(Object(taro_runtime[\\"createReactApp\\"])(lib_src_app, react, taro_react[\\"a\\"], config)); - } -}, [ [ 20, 0, 1, 3, 2 ] ] ]); - - - -/** filePath: dist/app.json **/ -{\\"pages\\":[\\"pages/index/index\\"],\\"window\\":{\\"backgroundTextStyle\\":\\"light\\",\\"navigationBarBackgroundColor\\":\\"#fff\\",\\"navigationBarTitleText\\":\\"WeChat\\",\\"navigationBarTextStyle\\":\\"black\\"}} - -/** filePath: dist/app.qss **/ - - -/** filePath: dist/base.qml **/ - - - - - - - - -- - - - -- - -- - - - - - - - - - - - - - - - - - - - - - - - - - - - -- - -- - - - -- - -- - - - -- - -{{i.v}} - - - - - - - -- - - - -- - -- - - - -- - -- - - - - - - - -- - -- - - - -- - -- - - - -- - -- - - - - - - - -- - -- - - - -- - -- - - - -- - -- - - - - - - - -- - -- - - - -- - -- - - - - - - - -- - -- - - - -- - -- - - - - - - - -- - -- - - - -- - -- - - - - - - - -- - -- - - - -- - -- - - - - - - - -- - -- - - - -- - -- - - - - - - - -- - -- - - - -- - -- - - - - - - - -- - -- - - - -- - -- - - - - - - - -- - -- - - - -- - -- - - - - - - - -- - -- - - - -- - -- - - - - - - - -- - -- - - - -- - -- - - - - - - - -- - -- - - - -- - -- - - - - - - - -- - -- - - -/** filePath: dist/common.js **/ -(qq[\\"webpackJsonp\\"] = qq[\\"webpackJsonp\\"] || []).push([ [ 2 ], [ function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - __webpack_require__.r(__webpack_exports__); - __webpack_exports__[\\"default\\"] = \\"react-mock\\"; -} ] ]); - -/** filePath: dist/comp.js **/ -(qq[\\"webpackJsonp\\"] = qq[\\"webpackJsonp\\"] || []).push([ [ 6 ], { - 13: function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - __webpack_require__.r(__webpack_exports__); - var _tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1); - Component(Object(_tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__[\\"createRecursiveComponentConfig\\"])()); - } -}, [ [ 13, 0, 1 ] ] ]); - -/** filePath: dist/comp.json **/ -{\\"component\\":true,\\"usingComponents\\":{\\"comp\\":\\"./comp\\"}} - -/** filePath: dist/comp.qml **/ - - - -/** filePath: dist/pages/index/index.js **/ -(qq[\\"webpackJsonp\\"] = qq[\\"webpackJsonp\\"] || []).push([ [ 7 ], [ , , , , , , , , function(module, exports, __webpack_require__) { - module.exports = __webpack_require__(14); -}, , , , , , function(module, exports, __webpack_require__) { - var g = function() { - return this; - }() || Function(\\"return this\\")(); - var hadRuntime = g.regeneratorRuntime && Object.getOwnPropertyNames(g).indexOf(\\"regeneratorRuntime\\") >= 0; - var oldRuntime = hadRuntime && g.regeneratorRuntime; - g.regeneratorRuntime = undefined; - module.exports = __webpack_require__(15); - if (hadRuntime) { - g.regeneratorRuntime = oldRuntime; - } else { - try { - delete g.regeneratorRuntime; - } catch (e) { - g.regeneratorRuntime = undefined; - } - } -}, function(module, exports, __webpack_require__) { - (function(module) { - var _typeof = __webpack_require__(17); - !function(global) { - \\"use strict\\"; - var Op = Object.prototype; - var hasOwn = Op.hasOwnProperty; - var undefined; - var $Symbol = typeof Symbol === \\"function\\" ? Symbol : {}; - var iteratorSymbol = $Symbol.iterator || \\"@@iterator\\"; - var asyncIteratorSymbol = $Symbol.asyncIterator || \\"@@asyncIterator\\"; - var toStringTagSymbol = $Symbol.toStringTag || \\"@@toStringTag\\"; - var inModule = (false ? undefined : _typeof(module)) === \\"object\\"; - var runtime = global.regeneratorRuntime; - if (runtime) { - if (inModule) { - module.exports = runtime; - } - return; - } - runtime = global.regeneratorRuntime = inModule ? module.exports : {}; - function wrap(innerFn, outerFn, self, tryLocsList) { - var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator; - var generator = Object.create(protoGenerator.prototype); - var context = new Context(tryLocsList || []); - generator._invoke = makeInvokeMethod(innerFn, self, context); - return generator; - } - runtime.wrap = wrap; - function tryCatch(fn, obj, arg) { - try { - return { - type: \\"normal\\", - arg: fn.call(obj, arg) - }; - } catch (err) { - return { - type: \\"throw\\", - arg: err - }; - } - } - var GenStateSuspendedStart = \\"suspendedStart\\"; - var GenStateSuspendedYield = \\"suspendedYield\\"; - var GenStateExecuting = \\"executing\\"; - var GenStateCompleted = \\"completed\\"; - var ContinueSentinel = {}; - function Generator() {} - function GeneratorFunction() {} - function GeneratorFunctionPrototype() {} - var IteratorPrototype = {}; - IteratorPrototype[iteratorSymbol] = function() { - return this; - }; - var getProto = Object.getPrototypeOf; - var NativeIteratorPrototype = getProto && getProto(getProto(values([]))); - if (NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) { - IteratorPrototype = NativeIteratorPrototype; - } - var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); - GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype; - GeneratorFunctionPrototype.constructor = GeneratorFunction; - GeneratorFunctionPrototype[toStringTagSymbol] = GeneratorFunction.displayName = \\"GeneratorFunction\\"; - function defineIteratorMethods(prototype) { - [ \\"next\\", \\"throw\\", \\"return\\" ].forEach((function(method) { - prototype[method] = function(arg) { - return this._invoke(method, arg); - }; - })); - } - runtime.isGeneratorFunction = function(genFun) { - var ctor = typeof genFun === \\"function\\" && genFun.constructor; - return ctor ? ctor === GeneratorFunction || (ctor.displayName || ctor.name) === \\"GeneratorFunction\\" : false; - }; - runtime.mark = function(genFun) { - if (Object.setPrototypeOf) { - Object.setPrototypeOf(genFun, GeneratorFunctionPrototype); - } else { - genFun.__proto__ = GeneratorFunctionPrototype; - if (!(toStringTagSymbol in genFun)) { - genFun[toStringTagSymbol] = \\"GeneratorFunction\\"; - } - } - genFun.prototype = Object.create(Gp); - return genFun; - }; - runtime.awrap = function(arg) { - return { - __await: arg - }; - }; - function AsyncIterator(generator) { - function invoke(method, arg, resolve, reject) { - var record = tryCatch(generator[method], generator, arg); - if (record.type === \\"throw\\") { - reject(record.arg); - } else { - var result = record.arg; - var value = result.value; - if (value && _typeof(value) === \\"object\\" && hasOwn.call(value, \\"__await\\")) { - return Promise.resolve(value.__await).then((function(value) { - invoke(\\"next\\", value, resolve, reject); - }), (function(err) { - invoke(\\"throw\\", err, resolve, reject); - })); - } - return Promise.resolve(value).then((function(unwrapped) { - result.value = unwrapped; - resolve(result); - }), reject); - } - } - var previousPromise; - function enqueue(method, arg) { - function callInvokeWithMethodAndArg() { - return new Promise((function(resolve, reject) { - invoke(method, arg, resolve, reject); - })); - } - return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); - } - this._invoke = enqueue; - } - defineIteratorMethods(AsyncIterator.prototype); - AsyncIterator.prototype[asyncIteratorSymbol] = function() { - return this; - }; - runtime.AsyncIterator = AsyncIterator; - runtime.async = function(innerFn, outerFn, self, tryLocsList) { - var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList)); - return runtime.isGeneratorFunction(outerFn) ? iter : iter.next().then((function(result) { - return result.done ? result.value : iter.next(); - })); - }; - function makeInvokeMethod(innerFn, self, context) { - var state = GenStateSuspendedStart; - return function invoke(method, arg) { - if (state === GenStateExecuting) { - throw new Error(\\"Generator is already running\\"); - } - if (state === GenStateCompleted) { - if (method === \\"throw\\") { - throw arg; - } - return doneResult(); - } - context.method = method; - context.arg = arg; - while (true) { - var delegate = context.delegate; - if (delegate) { - var delegateResult = maybeInvokeDelegate(delegate, context); - if (delegateResult) { - if (delegateResult === ContinueSentinel) continue; - return delegateResult; - } - } - if (context.method === \\"next\\") { - context.sent = context._sent = context.arg; - } else if (context.method === \\"throw\\") { - if (state === GenStateSuspendedStart) { - state = GenStateCompleted; - throw context.arg; - } - context.dispatchException(context.arg); - } else if (context.method === \\"return\\") { - context.abrupt(\\"return\\", context.arg); - } - state = GenStateExecuting; - var record = tryCatch(innerFn, self, context); - if (record.type === \\"normal\\") { - state = context.done ? GenStateCompleted : GenStateSuspendedYield; - if (record.arg === ContinueSentinel) { - continue; - } - return { - value: record.arg, - done: context.done - }; - } else if (record.type === \\"throw\\") { - state = GenStateCompleted; - context.method = \\"throw\\"; - context.arg = record.arg; - } - } - }; - } - function maybeInvokeDelegate(delegate, context) { - var method = delegate.iterator[context.method]; - if (method === undefined) { - context.delegate = null; - if (context.method === \\"throw\\") { - if (delegate.iterator.return) { - context.method = \\"return\\"; - context.arg = undefined; - maybeInvokeDelegate(delegate, context); - if (context.method === \\"throw\\") { - return ContinueSentinel; - } - } - context.method = \\"throw\\"; - context.arg = new TypeError(\\"The iterator does not provide a 'throw' method\\"); - } - return ContinueSentinel; - } - var record = tryCatch(method, delegate.iterator, context.arg); - if (record.type === \\"throw\\") { - context.method = \\"throw\\"; - context.arg = record.arg; - context.delegate = null; - return ContinueSentinel; - } - var info = record.arg; - if (!info) { - context.method = \\"throw\\"; - context.arg = new TypeError(\\"iterator result is not an object\\"); - context.delegate = null; - return ContinueSentinel; - } - if (info.done) { - context[delegate.resultName] = info.value; - context.next = delegate.nextLoc; - if (context.method !== \\"return\\") { - context.method = \\"next\\"; - context.arg = undefined; - } - } else { - return info; - } - context.delegate = null; - return ContinueSentinel; - } - defineIteratorMethods(Gp); - Gp[toStringTagSymbol] = \\"Generator\\"; - Gp[iteratorSymbol] = function() { - return this; - }; - Gp.toString = function() { - return \\"[object Generator]\\"; - }; - function pushTryEntry(locs) { - var entry = { - tryLoc: locs[0] - }; - if (1 in locs) { - entry.catchLoc = locs[1]; - } - if (2 in locs) { - entry.finallyLoc = locs[2]; - entry.afterLoc = locs[3]; - } - this.tryEntries.push(entry); - } - function resetTryEntry(entry) { - var record = entry.completion || {}; - record.type = \\"normal\\"; - delete record.arg; - entry.completion = record; - } - function Context(tryLocsList) { - this.tryEntries = [ { - tryLoc: \\"root\\" - } ]; - tryLocsList.forEach(pushTryEntry, this); - this.reset(true); - } - runtime.keys = function(object) { - var keys = []; - for (var key in object) { - keys.push(key); - } - keys.reverse(); - return function next() { - while (keys.length) { - var key = keys.pop(); - if (key in object) { - next.value = key; - next.done = false; - return next; - } - } - next.done = true; - return next; - }; - }; - function values(iterable) { - if (iterable) { - var iteratorMethod = iterable[iteratorSymbol]; - if (iteratorMethod) { - return iteratorMethod.call(iterable); - } - if (typeof iterable.next === \\"function\\") { - return iterable; - } - if (!isNaN(iterable.length)) { - var i = -1, next = function next() { - while (++i < iterable.length) { - if (hasOwn.call(iterable, i)) { - next.value = iterable[i]; - next.done = false; - return next; - } - } - next.value = undefined; - next.done = true; - return next; - }; - return next.next = next; - } - } - return { - next: doneResult - }; - } - runtime.values = values; - function doneResult() { - return { - value: undefined, - done: true - }; - } - Context.prototype = { - constructor: Context, - reset: function reset(skipTempReset) { - this.prev = 0; - this.next = 0; - this.sent = this._sent = undefined; - this.done = false; - this.delegate = null; - this.method = \\"next\\"; - this.arg = undefined; - this.tryEntries.forEach(resetTryEntry); - if (!skipTempReset) { - for (var name in this) { - if (name.charAt(0) === \\"t\\" && hasOwn.call(this, name) && !isNaN(+name.slice(1))) { - this[name] = undefined; - } - } - } - }, - stop: function stop() { - this.done = true; - var rootEntry = this.tryEntries[0]; - var rootRecord = rootEntry.completion; - if (rootRecord.type === \\"throw\\") { - throw rootRecord.arg; - } - return this.rval; - }, - dispatchException: function dispatchException(exception) { - if (this.done) { - throw exception; - } - var context = this; - function handle(loc, caught) { - record.type = \\"throw\\"; - record.arg = exception; - context.next = loc; - if (caught) { - context.method = \\"next\\"; - context.arg = undefined; - } - return !!caught; - } - for (var i = this.tryEntries.length - 1; i >= 0; --i) { - var entry = this.tryEntries[i]; - var record = entry.completion; - if (entry.tryLoc === \\"root\\") { - return handle(\\"end\\"); - } - if (entry.tryLoc <= this.prev) { - var hasCatch = hasOwn.call(entry, \\"catchLoc\\"); - var hasFinally = hasOwn.call(entry, \\"finallyLoc\\"); - if (hasCatch && hasFinally) { - if (this.prev < entry.catchLoc) { - return handle(entry.catchLoc, true); - } else if (this.prev < entry.finallyLoc) { - return handle(entry.finallyLoc); - } - } else if (hasCatch) { - if (this.prev < entry.catchLoc) { - return handle(entry.catchLoc, true); - } - } else if (hasFinally) { - if (this.prev < entry.finallyLoc) { - return handle(entry.finallyLoc); - } - } else { - throw new Error(\\"try statement without catch or finally\\"); - } - } - } - }, - abrupt: function abrupt(type, arg) { - for (var i = this.tryEntries.length - 1; i >= 0; --i) { - var entry = this.tryEntries[i]; - if (entry.tryLoc <= this.prev && hasOwn.call(entry, \\"finallyLoc\\") && this.prev < entry.finallyLoc) { - var finallyEntry = entry; - break; - } - } - if (finallyEntry && (type === \\"break\\" || type === \\"continue\\") && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc) { - finallyEntry = null; - } - var record = finallyEntry ? finallyEntry.completion : {}; - record.type = type; - record.arg = arg; - if (finallyEntry) { - this.method = \\"next\\"; - this.next = finallyEntry.finallyLoc; - return ContinueSentinel; - } - return this.complete(record); - }, - complete: function complete(record, afterLoc) { - if (record.type === \\"throw\\") { - throw record.arg; - } - if (record.type === \\"break\\" || record.type === \\"continue\\") { - this.next = record.arg; - } else if (record.type === \\"return\\") { - this.rval = this.arg = record.arg; - this.method = \\"return\\"; - this.next = \\"end\\"; - } else if (record.type === \\"normal\\" && afterLoc) { - this.next = afterLoc; - } - return ContinueSentinel; - }, - finish: function finish(finallyLoc) { - for (var i = this.tryEntries.length - 1; i >= 0; --i) { - var entry = this.tryEntries[i]; - if (entry.finallyLoc === finallyLoc) { - this.complete(entry.completion, entry.afterLoc); - resetTryEntry(entry); - return ContinueSentinel; - } - } - }, - catch: function _catch(tryLoc) { - for (var i = this.tryEntries.length - 1; i >= 0; --i) { - var entry = this.tryEntries[i]; - if (entry.tryLoc === tryLoc) { - var record = entry.completion; - if (record.type === \\"throw\\") { - var thrown = record.arg; - resetTryEntry(entry); - } - return thrown; - } - } - throw new Error(\\"illegal catch attempt\\"); - }, - delegateYield: function delegateYield(iterable, resultName, nextLoc) { - this.delegate = { - iterator: values(iterable), - resultName: resultName, - nextLoc: nextLoc - }; - if (this.method === \\"next\\") { - this.arg = undefined; - } - return ContinueSentinel; - } - }; - }(function() { - return this; - }() || Function(\\"return this\\")()); - }).call(this, __webpack_require__(16)(module)); -}, function(module, exports) { - module.exports = function(module) { - if (!module.webpackPolyfill) { - module.deprecate = function() {}; - module.paths = []; - if (!module.children) module.children = []; - Object.defineProperty(module, \\"loaded\\", { - enumerable: true, - get: function get() { - return module.l; - } - }); - Object.defineProperty(module, \\"id\\", { - enumerable: true, - get: function get() { - return module.i; - } - }); - module.webpackPolyfill = 1; - } - return module; - }; -}, function(module, exports) { - function _typeof(obj) { - \\"@babel/helpers - typeof\\"; - if (typeof Symbol === \\"function\\" && typeof Symbol.iterator === \\"symbol\\") { - module.exports = _typeof = function _typeof(obj) { - return typeof obj; - }; - } else { - module.exports = _typeof = function _typeof(obj) { - return obj && typeof Symbol === \\"function\\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \\"symbol\\" : typeof obj; - }; - } - return _typeof(obj); - } - module.exports = _typeof; -}, function(module, exports, __webpack_require__) {}, function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - __webpack_require__.r(__webpack_exports__); - var taro_runtime = __webpack_require__(1); - var regenerator = __webpack_require__(8); - var regenerator_default = __webpack_require__.n(regenerator); - function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { - try { - var info = gen[key](arg); - var value = info.value; - } catch (error) { - reject(error); - return; - } - if (info.done) { - resolve(value); - } else { - Promise.resolve(value).then(_next, _throw); - } - } - function _asyncToGenerator(fn) { - return function() { - var self = this, args = arguments; - return new Promise((function(resolve, reject) { - var gen = fn.apply(self, args); - function _next(value) { - asyncGeneratorStep(gen, resolve, reject, _next, _throw, \\"next\\", value); - } - function _throw(err) { - asyncGeneratorStep(gen, resolve, reject, _next, _throw, \\"throw\\", err); - } - _next(undefined); - })); - }; - } - var classCallCheck = __webpack_require__(3); - var createClass = __webpack_require__(4); - var possibleConstructorReturn = __webpack_require__(6); - var getPrototypeOf = __webpack_require__(5); - var inherits = __webpack_require__(7); - var react = __webpack_require__(0); - var taro_components = __webpack_require__(2); - var index = __webpack_require__(18); - var index_Index = function(_Component) { - Object(inherits[\\"a\\"])(Index, _Component); - function Index() { - Object(classCallCheck[\\"a\\"])(this, Index); - return Object(possibleConstructorReturn[\\"a\\"])(this, Object(getPrototypeOf[\\"a\\"])(Index).apply(this, arguments)); - } - Object(createClass[\\"a\\"])(Index, [ { - key: \\"componentWillMount\\", - value: function() { - var _componentWillMount = _asyncToGenerator(regenerator_default.a.mark((function _callee() { - return regenerator_default.a.wrap((function _callee$(_context) { - while (1) { - switch (_context.prev = _context.next) { - case 0: - _context.next = 2; - return Promise.resolve(1); - - case 2: - case \\"end\\": - return _context.stop(); - } - } - }), _callee); - }))); - function componentWillMount() { - return _componentWillMount.apply(this, arguments); - } - return componentWillMount; - }() - }, { - key: \\"componentDidMount\\", - value: function componentDidMount() {} - }, { - key: \\"componentWillUnmount\\", - value: function componentWillUnmount() {} - }, { - key: \\"componentDidShow\\", - value: function componentDidShow() {} - }, { - key: \\"componentDidHide\\", - value: function componentDidHide() {} - }, { - key: \\"render\\", - value: function render() { - return react[\\"default\\"].createElement(taro_components[\\"View\\"], { - className: \\"index\\" - }, react[\\"default\\"].createElement(taro_components[\\"Text\\"], null, \\"Hello world!\\"), react[\\"default\\"].createElement(taro_components[\\"Input\\"], { - placeholder: \\"input\\", - value: \\"\\" - }), react[\\"default\\"].createElement(taro_components[\\"Textarea\\"], { - value: \\"\\" - })); - } - } ]); - return Index; - }(react[\\"Component\\"]); - var config = { - navigationBarTitleText: \\"\\\\u9996\\\\u9875\\" - }; - var inst = Page(Object(taro_runtime[\\"createPageConfig\\"])(index_Index, \\"pages/index/index\\", {}, config || {})); -} ], [ [ 19, 0, 1, 3, 2 ] ] ]); - -/** filePath: dist/pages/index/index.json **/ -{\\"navigationBarTitleText\\":\\"首页\\",\\"usingComponents\\":{\\"comp\\":\\"../../comp\\"}} - -/** filePath: dist/pages/index/index.qml **/ - - - -/** filePath: dist/pages/index/index.qss **/ - - -/** filePath: dist/runtime.js **/ -(function(modules) { - function webpackJsonpCallback(data) { - var chunkIds = data[0]; - var moreModules = data[1]; - var executeModules = data[2]; - var moduleId, chunkId, i = 0, resolves = []; - for (;i < chunkIds.length; i++) { - chunkId = chunkIds[i]; - if (Object.prototype.hasOwnProperty.call(installedChunks, chunkId) && installedChunks[chunkId]) { - resolves.push(installedChunks[chunkId][0]); - } - installedChunks[chunkId] = 0; - } - for (moduleId in moreModules) { - if (Object.prototype.hasOwnProperty.call(moreModules, moduleId)) { - modules[moduleId] = moreModules[moduleId]; - } - } - if (parentJsonpFunction) parentJsonpFunction(data); - while (resolves.length) { - resolves.shift()(); - } - deferredModules.push.apply(deferredModules, executeModules || []); - return checkDeferredModules(); - } - function checkDeferredModules() { - var result; - for (var i = 0; i < deferredModules.length; i++) { - var deferredModule = deferredModules[i]; - var fulfilled = true; - for (var j = 1; j < deferredModule.length; j++) { - var depId = deferredModule[j]; - if (installedChunks[depId] !== 0) fulfilled = false; - } - if (fulfilled) { - deferredModules.splice(i--, 1); - result = __webpack_require__(__webpack_require__.s = deferredModule[0]); - } - } - return result; - } - var installedModules = {}; - var installedChunks = { - 0: 0 - }; - var deferredModules = []; - function __webpack_require__(moduleId) { - if (installedModules[moduleId]) { - return installedModules[moduleId].exports; - } - var module = installedModules[moduleId] = { - i: moduleId, - l: false, - exports: {} - }; - modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); - module.l = true; - return module.exports; - } - __webpack_require__.m = modules; - __webpack_require__.c = installedModules; - __webpack_require__.d = function(exports, name, getter) { - if (!__webpack_require__.o(exports, name)) { - Object.defineProperty(exports, name, { - enumerable: true, - get: getter - }); - } - }; - __webpack_require__.r = function(exports) { - if (typeof Symbol !== \\"undefined\\" && Symbol.toStringTag) { - Object.defineProperty(exports, Symbol.toStringTag, { - value: \\"Module\\" - }); - } - Object.defineProperty(exports, \\"__esModule\\", { - value: true - }); - }; - __webpack_require__.t = function(value, mode) { - if (mode & 1) value = __webpack_require__(value); - if (mode & 8) return value; - if (mode & 4 && typeof value === \\"object\\" && value && value.__esModule) return value; - var ns = Object.create(null); - __webpack_require__.r(ns); - Object.defineProperty(ns, \\"default\\", { - enumerable: true, - value: value - }); - if (mode & 2 && typeof value != \\"string\\") for (var key in value) __webpack_require__.d(ns, key, function(key) { - return value[key]; - }.bind(null, key)); - return ns; - }; - __webpack_require__.n = function(module) { - var getter = module && module.__esModule ? function getDefault() { - return module[\\"default\\"]; - } : function getModuleExports() { - return module; - }; - __webpack_require__.d(getter, \\"a\\", getter); - return getter; - }; - __webpack_require__.o = function(object, property) { - return Object.prototype.hasOwnProperty.call(object, property); - }; - __webpack_require__.p = \\"/\\"; - var jsonpArray = qq[\\"webpackJsonp\\"] = qq[\\"webpackJsonp\\"] || []; - var oldJsonpFunction = jsonpArray.push.bind(jsonpArray); - jsonpArray.push = webpackJsonpCallback; - jsonpArray = jsonpArray.slice(); - for (var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]); - var parentJsonpFunction = oldJsonpFunction; - checkDeferredModules(); -})([]); - -/** filePath: dist/taro.js **/ -(qq[\\"webpackJsonp\\"] = qq[\\"webpackJsonp\\"] || []).push([ [ 1 ], { - 1: function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - var _unused_webpack_default_export = \\"taro-runtime-mock\\"; - }, - 2: function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - var _unused_webpack_default_export = \\"taro-components-mock\\"; - }, - 9: function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - __webpack_exports__[\\"a\\"] = \\"taro-react-mock\\"; - } -} ]); - -/** filePath: dist/utils.wxs **/ -module.exports = { - a: function (l, n, s) { - var a = [\\"view\\",\\"cover-view\\",\\"block\\",\\"text\\",\\"slot\\",\\"slot-view\\",\\"label\\",\\"form\\",\\"scroll-view\\"] - var b = [\\"slot\\",\\"slot-view\\",\\"label\\",\\"form\\",\\"scroll-view\\"] - if (a.indexOf(n) === -1) { - l = 0 - } - if (b.indexOf(n) > -1) { - var u = s.split(',') - var depth = 0 - for (var i = 0; i < u.length; i++) { - if (u[i] === n) depth++ - } - l = depth - } - return 'tmpl_' + l + '_' + n - }, - b: function (a, b) { - return a === undefined ? b : a - }, - c: function(i, prefix) { - var s = i.focus !== undefined ? 'focus' : 'blur' - return prefix + i.nn + '_' + s - }, - d: function (i, v) { - return i === undefined ? v : i - }, - e: function (n) { - return 'tmpl_' + n + '_container' - }, - f: function (l, n) { - var b = [\\"slot\\",\\"slot-view\\",\\"label\\",\\"form\\",\\"scroll-view\\"] - if (b.indexOf(n) > -1) { - if (l) l += ',' - l += n - } - return l - } -} - -/** filePath: dist/vendors.js **/ -(qq[\\"webpackJsonp\\"] = qq[\\"webpackJsonp\\"] || []).push([ [ 3 ], [ , , , function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - __webpack_require__.d(__webpack_exports__, \\"a\\", (function() { - return _classCallCheck; - })); - function _classCallCheck(instance, Constructor) { - if (!(instance instanceof Constructor)) { - throw new TypeError(\\"Cannot call a class as a function\\"); - } - } -}, function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - __webpack_require__.d(__webpack_exports__, \\"a\\", (function() { - return _createClass; - })); - function _defineProperties(target, props) { - for (var i = 0; i < props.length; i++) { - var descriptor = props[i]; - descriptor.enumerable = descriptor.enumerable || false; - descriptor.configurable = true; - if (\\"value\\" in descriptor) descriptor.writable = true; - Object.defineProperty(target, descriptor.key, descriptor); - } - } - function _createClass(Constructor, protoProps, staticProps) { - if (protoProps) _defineProperties(Constructor.prototype, protoProps); - if (staticProps) _defineProperties(Constructor, staticProps); - return Constructor; - } -}, function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - __webpack_require__.d(__webpack_exports__, \\"a\\", (function() { - return _getPrototypeOf; - })); - function _getPrototypeOf(o) { - _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { - return o.__proto__ || Object.getPrototypeOf(o); - }; - return _getPrototypeOf(o); - } -}, function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - __webpack_require__.d(__webpack_exports__, \\"a\\", (function() { - return _possibleConstructorReturn; - })); - function _typeof(obj) { - \\"@babel/helpers - typeof\\"; - if (typeof Symbol === \\"function\\" && typeof Symbol.iterator === \\"symbol\\") { - _typeof = function _typeof(obj) { - return typeof obj; - }; - } else { - _typeof = function _typeof(obj) { - return obj && typeof Symbol === \\"function\\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \\"symbol\\" : typeof obj; - }; - } - return _typeof(obj); - } - function _assertThisInitialized(self) { - if (self === void 0) { - throw new ReferenceError(\\"this hasn't been initialised - super() hasn't been called\\"); - } - return self; - } - function _possibleConstructorReturn(self, call) { - if (call && (_typeof(call) === \\"object\\" || typeof call === \\"function\\")) { - return call; - } - return _assertThisInitialized(self); - } -}, function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - __webpack_require__.d(__webpack_exports__, \\"a\\", (function() { - return _inherits; - })); - function _setPrototypeOf(o, p) { - _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { - o.__proto__ = p; - return o; - }; - return _setPrototypeOf(o, p); - } - function _inherits(subClass, superClass) { - if (typeof superClass !== \\"function\\" && superClass !== null) { - throw new TypeError(\\"Super expression must either be null or a function\\"); - } - subClass.prototype = Object.create(superClass && superClass.prototype, { - constructor: { - value: subClass, - writable: true, - configurable: true - } - }); - if (superClass) _setPrototypeOf(subClass, superClass); - } -} ] ]); -" -`; diff --git a/packages/taro-mini-runner/__tests__/__snapshots__/react.spec.ts.snap b/packages/taro-mini-runner/__tests__/__snapshots__/react.spec.ts.snap deleted file mode 100644 index 4f6d3395dc47..000000000000 --- a/packages/taro-mini-runner/__tests__/__snapshots__/react.spec.ts.snap +++ /dev/null @@ -1,1356 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`react should build react app 1`] = `15`; - -exports[`react should build react app 2`] = ` -" -/** filePath: dist/app.js **/ -require(\\"./runtime\\"); - -require(\\"./common\\"); - -require(\\"./vendors\\"); - -require(\\"./taro\\"); - -(wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 4 ], { - 12: function(module, exports, __webpack_require__) {}, - 20: function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - __webpack_require__.r(__webpack_exports__); - var taro_runtime = __webpack_require__(1); - var classCallCheck = __webpack_require__(3); - var createClass = __webpack_require__(4); - var possibleConstructorReturn = __webpack_require__(6); - var getPrototypeOf = __webpack_require__(5); - var inherits = __webpack_require__(7); - var react = __webpack_require__(0); - var app = __webpack_require__(12); - var app_App = function(_Component) { - Object(inherits[\\"a\\"])(App, _Component); - function App() { - Object(classCallCheck[\\"a\\"])(this, App); - return Object(possibleConstructorReturn[\\"a\\"])(this, Object(getPrototypeOf[\\"a\\"])(App).apply(this, arguments)); - } - Object(createClass[\\"a\\"])(App, [ { - key: \\"componentDidMount\\", - value: function componentDidMount() {} - }, { - key: \\"componentDidShow\\", - value: function componentDidShow() {} - }, { - key: \\"componentDidHide\\", - value: function componentDidHide() {} - }, { - key: \\"componentDidCatchError\\", - value: function componentDidCatchError() {} - }, { - key: \\"render\\", - value: function render() { - return this.props.children; - } - } ]); - return App; - }(react[\\"Component\\"]); - var lib_src_app = app_App; - var taro_react = __webpack_require__(9); - var config = { - pages: [ \\"pages/index/index\\" ], - window: { - backgroundTextStyle: \\"light\\", - navigationBarBackgroundColor: \\"#fff\\", - navigationBarTitleText: \\"WeChat\\", - navigationBarTextStyle: \\"black\\" - } - }; - taro_runtime[\\"window\\"].__taroAppConfig = config; - var inst = App(Object(taro_runtime[\\"createReactApp\\"])(lib_src_app, react, taro_react[\\"a\\"], config)); - } -}, [ [ 20, 0, 1, 3, 2 ] ] ]); - - - -/** filePath: dist/app.json **/ -{\\"pages\\":[\\"pages/index/index\\"],\\"window\\":{\\"backgroundTextStyle\\":\\"light\\",\\"navigationBarBackgroundColor\\":\\"#fff\\",\\"navigationBarTitleText\\":\\"WeChat\\",\\"navigationBarTextStyle\\":\\"black\\"}} - -/** filePath: dist/app.wxss **/ - - -/** filePath: dist/base.wxml **/ - - - - - - - - -- - - - -- - -- - - - - - - - - - - - - - - - - - - - - - - - - - - - -- - -- - - - -- - -- - - - -- - -{{i.v}} - - - - - - - -- - - - -- - -- - - - -- - -- - - - - - - - -- - -- - - - -- - -- - - - -- - -- - - - - - - - -- - -- - - - -- - -- - - - -- - -- - - - - - - - -- - -- - - - -- - -- - - - - - - - -- - -- - - - -- - -- - - - - - - - -- - -- - - - -- - -- - - - - - - - -- - -- - - - -- - -- - - - - - - - -- - -- - - - -- - -- - - - - - - - -- - -- - - - -- - -- - - - - - - - -- - -- - - - -- - -- - - - - - - - -- - -- - - - -- - -- - - - - - - - -- - -- - - - -- - -- - - - - - - - -- - -- - - - -- - -- - - - - - - - -- - -- - - - -- - -- - - - - - - - -- - -- - - -/** filePath: dist/common.js **/ -(wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 2 ], [ function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - __webpack_require__.r(__webpack_exports__); - __webpack_exports__[\\"default\\"] = \\"react-mock\\"; -} ] ]); - -/** filePath: dist/comp.js **/ -(wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 6 ], { - 13: function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - __webpack_require__.r(__webpack_exports__); - var _tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1); - Component(Object(_tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__[\\"createRecursiveComponentConfig\\"])()); - } -}, [ [ 13, 0, 1 ] ] ]); - -/** filePath: dist/comp.json **/ -{\\"component\\":true,\\"usingComponents\\":{\\"comp\\":\\"./comp\\"}} - -/** filePath: dist/comp.wxml **/ - - - -/** filePath: dist/pages/index/index.js **/ -(wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 7 ], [ , , , , , , , , function(module, exports, __webpack_require__) { - module.exports = __webpack_require__(14); -}, , , , , , function(module, exports, __webpack_require__) { - var g = function() { - return this; - }() || Function(\\"return this\\")(); - var hadRuntime = g.regeneratorRuntime && Object.getOwnPropertyNames(g).indexOf(\\"regeneratorRuntime\\") >= 0; - var oldRuntime = hadRuntime && g.regeneratorRuntime; - g.regeneratorRuntime = undefined; - module.exports = __webpack_require__(15); - if (hadRuntime) { - g.regeneratorRuntime = oldRuntime; - } else { - try { - delete g.regeneratorRuntime; - } catch (e) { - g.regeneratorRuntime = undefined; - } - } -}, function(module, exports, __webpack_require__) { - (function(module) { - var _typeof = __webpack_require__(17); - !function(global) { - \\"use strict\\"; - var Op = Object.prototype; - var hasOwn = Op.hasOwnProperty; - var undefined; - var $Symbol = typeof Symbol === \\"function\\" ? Symbol : {}; - var iteratorSymbol = $Symbol.iterator || \\"@@iterator\\"; - var asyncIteratorSymbol = $Symbol.asyncIterator || \\"@@asyncIterator\\"; - var toStringTagSymbol = $Symbol.toStringTag || \\"@@toStringTag\\"; - var inModule = (false ? undefined : _typeof(module)) === \\"object\\"; - var runtime = global.regeneratorRuntime; - if (runtime) { - if (inModule) { - module.exports = runtime; - } - return; - } - runtime = global.regeneratorRuntime = inModule ? module.exports : {}; - function wrap(innerFn, outerFn, self, tryLocsList) { - var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator; - var generator = Object.create(protoGenerator.prototype); - var context = new Context(tryLocsList || []); - generator._invoke = makeInvokeMethod(innerFn, self, context); - return generator; - } - runtime.wrap = wrap; - function tryCatch(fn, obj, arg) { - try { - return { - type: \\"normal\\", - arg: fn.call(obj, arg) - }; - } catch (err) { - return { - type: \\"throw\\", - arg: err - }; - } - } - var GenStateSuspendedStart = \\"suspendedStart\\"; - var GenStateSuspendedYield = \\"suspendedYield\\"; - var GenStateExecuting = \\"executing\\"; - var GenStateCompleted = \\"completed\\"; - var ContinueSentinel = {}; - function Generator() {} - function GeneratorFunction() {} - function GeneratorFunctionPrototype() {} - var IteratorPrototype = {}; - IteratorPrototype[iteratorSymbol] = function() { - return this; - }; - var getProto = Object.getPrototypeOf; - var NativeIteratorPrototype = getProto && getProto(getProto(values([]))); - if (NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) { - IteratorPrototype = NativeIteratorPrototype; - } - var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); - GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype; - GeneratorFunctionPrototype.constructor = GeneratorFunction; - GeneratorFunctionPrototype[toStringTagSymbol] = GeneratorFunction.displayName = \\"GeneratorFunction\\"; - function defineIteratorMethods(prototype) { - [ \\"next\\", \\"throw\\", \\"return\\" ].forEach((function(method) { - prototype[method] = function(arg) { - return this._invoke(method, arg); - }; - })); - } - runtime.isGeneratorFunction = function(genFun) { - var ctor = typeof genFun === \\"function\\" && genFun.constructor; - return ctor ? ctor === GeneratorFunction || (ctor.displayName || ctor.name) === \\"GeneratorFunction\\" : false; - }; - runtime.mark = function(genFun) { - if (Object.setPrototypeOf) { - Object.setPrototypeOf(genFun, GeneratorFunctionPrototype); - } else { - genFun.__proto__ = GeneratorFunctionPrototype; - if (!(toStringTagSymbol in genFun)) { - genFun[toStringTagSymbol] = \\"GeneratorFunction\\"; - } - } - genFun.prototype = Object.create(Gp); - return genFun; - }; - runtime.awrap = function(arg) { - return { - __await: arg - }; - }; - function AsyncIterator(generator) { - function invoke(method, arg, resolve, reject) { - var record = tryCatch(generator[method], generator, arg); - if (record.type === \\"throw\\") { - reject(record.arg); - } else { - var result = record.arg; - var value = result.value; - if (value && _typeof(value) === \\"object\\" && hasOwn.call(value, \\"__await\\")) { - return Promise.resolve(value.__await).then((function(value) { - invoke(\\"next\\", value, resolve, reject); - }), (function(err) { - invoke(\\"throw\\", err, resolve, reject); - })); - } - return Promise.resolve(value).then((function(unwrapped) { - result.value = unwrapped; - resolve(result); - }), reject); - } - } - var previousPromise; - function enqueue(method, arg) { - function callInvokeWithMethodAndArg() { - return new Promise((function(resolve, reject) { - invoke(method, arg, resolve, reject); - })); - } - return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); - } - this._invoke = enqueue; - } - defineIteratorMethods(AsyncIterator.prototype); - AsyncIterator.prototype[asyncIteratorSymbol] = function() { - return this; - }; - runtime.AsyncIterator = AsyncIterator; - runtime.async = function(innerFn, outerFn, self, tryLocsList) { - var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList)); - return runtime.isGeneratorFunction(outerFn) ? iter : iter.next().then((function(result) { - return result.done ? result.value : iter.next(); - })); - }; - function makeInvokeMethod(innerFn, self, context) { - var state = GenStateSuspendedStart; - return function invoke(method, arg) { - if (state === GenStateExecuting) { - throw new Error(\\"Generator is already running\\"); - } - if (state === GenStateCompleted) { - if (method === \\"throw\\") { - throw arg; - } - return doneResult(); - } - context.method = method; - context.arg = arg; - while (true) { - var delegate = context.delegate; - if (delegate) { - var delegateResult = maybeInvokeDelegate(delegate, context); - if (delegateResult) { - if (delegateResult === ContinueSentinel) continue; - return delegateResult; - } - } - if (context.method === \\"next\\") { - context.sent = context._sent = context.arg; - } else if (context.method === \\"throw\\") { - if (state === GenStateSuspendedStart) { - state = GenStateCompleted; - throw context.arg; - } - context.dispatchException(context.arg); - } else if (context.method === \\"return\\") { - context.abrupt(\\"return\\", context.arg); - } - state = GenStateExecuting; - var record = tryCatch(innerFn, self, context); - if (record.type === \\"normal\\") { - state = context.done ? GenStateCompleted : GenStateSuspendedYield; - if (record.arg === ContinueSentinel) { - continue; - } - return { - value: record.arg, - done: context.done - }; - } else if (record.type === \\"throw\\") { - state = GenStateCompleted; - context.method = \\"throw\\"; - context.arg = record.arg; - } - } - }; - } - function maybeInvokeDelegate(delegate, context) { - var method = delegate.iterator[context.method]; - if (method === undefined) { - context.delegate = null; - if (context.method === \\"throw\\") { - if (delegate.iterator.return) { - context.method = \\"return\\"; - context.arg = undefined; - maybeInvokeDelegate(delegate, context); - if (context.method === \\"throw\\") { - return ContinueSentinel; - } - } - context.method = \\"throw\\"; - context.arg = new TypeError(\\"The iterator does not provide a 'throw' method\\"); - } - return ContinueSentinel; - } - var record = tryCatch(method, delegate.iterator, context.arg); - if (record.type === \\"throw\\") { - context.method = \\"throw\\"; - context.arg = record.arg; - context.delegate = null; - return ContinueSentinel; - } - var info = record.arg; - if (!info) { - context.method = \\"throw\\"; - context.arg = new TypeError(\\"iterator result is not an object\\"); - context.delegate = null; - return ContinueSentinel; - } - if (info.done) { - context[delegate.resultName] = info.value; - context.next = delegate.nextLoc; - if (context.method !== \\"return\\") { - context.method = \\"next\\"; - context.arg = undefined; - } - } else { - return info; - } - context.delegate = null; - return ContinueSentinel; - } - defineIteratorMethods(Gp); - Gp[toStringTagSymbol] = \\"Generator\\"; - Gp[iteratorSymbol] = function() { - return this; - }; - Gp.toString = function() { - return \\"[object Generator]\\"; - }; - function pushTryEntry(locs) { - var entry = { - tryLoc: locs[0] - }; - if (1 in locs) { - entry.catchLoc = locs[1]; - } - if (2 in locs) { - entry.finallyLoc = locs[2]; - entry.afterLoc = locs[3]; - } - this.tryEntries.push(entry); - } - function resetTryEntry(entry) { - var record = entry.completion || {}; - record.type = \\"normal\\"; - delete record.arg; - entry.completion = record; - } - function Context(tryLocsList) { - this.tryEntries = [ { - tryLoc: \\"root\\" - } ]; - tryLocsList.forEach(pushTryEntry, this); - this.reset(true); - } - runtime.keys = function(object) { - var keys = []; - for (var key in object) { - keys.push(key); - } - keys.reverse(); - return function next() { - while (keys.length) { - var key = keys.pop(); - if (key in object) { - next.value = key; - next.done = false; - return next; - } - } - next.done = true; - return next; - }; - }; - function values(iterable) { - if (iterable) { - var iteratorMethod = iterable[iteratorSymbol]; - if (iteratorMethod) { - return iteratorMethod.call(iterable); - } - if (typeof iterable.next === \\"function\\") { - return iterable; - } - if (!isNaN(iterable.length)) { - var i = -1, next = function next() { - while (++i < iterable.length) { - if (hasOwn.call(iterable, i)) { - next.value = iterable[i]; - next.done = false; - return next; - } - } - next.value = undefined; - next.done = true; - return next; - }; - return next.next = next; - } - } - return { - next: doneResult - }; - } - runtime.values = values; - function doneResult() { - return { - value: undefined, - done: true - }; - } - Context.prototype = { - constructor: Context, - reset: function reset(skipTempReset) { - this.prev = 0; - this.next = 0; - this.sent = this._sent = undefined; - this.done = false; - this.delegate = null; - this.method = \\"next\\"; - this.arg = undefined; - this.tryEntries.forEach(resetTryEntry); - if (!skipTempReset) { - for (var name in this) { - if (name.charAt(0) === \\"t\\" && hasOwn.call(this, name) && !isNaN(+name.slice(1))) { - this[name] = undefined; - } - } - } - }, - stop: function stop() { - this.done = true; - var rootEntry = this.tryEntries[0]; - var rootRecord = rootEntry.completion; - if (rootRecord.type === \\"throw\\") { - throw rootRecord.arg; - } - return this.rval; - }, - dispatchException: function dispatchException(exception) { - if (this.done) { - throw exception; - } - var context = this; - function handle(loc, caught) { - record.type = \\"throw\\"; - record.arg = exception; - context.next = loc; - if (caught) { - context.method = \\"next\\"; - context.arg = undefined; - } - return !!caught; - } - for (var i = this.tryEntries.length - 1; i >= 0; --i) { - var entry = this.tryEntries[i]; - var record = entry.completion; - if (entry.tryLoc === \\"root\\") { - return handle(\\"end\\"); - } - if (entry.tryLoc <= this.prev) { - var hasCatch = hasOwn.call(entry, \\"catchLoc\\"); - var hasFinally = hasOwn.call(entry, \\"finallyLoc\\"); - if (hasCatch && hasFinally) { - if (this.prev < entry.catchLoc) { - return handle(entry.catchLoc, true); - } else if (this.prev < entry.finallyLoc) { - return handle(entry.finallyLoc); - } - } else if (hasCatch) { - if (this.prev < entry.catchLoc) { - return handle(entry.catchLoc, true); - } - } else if (hasFinally) { - if (this.prev < entry.finallyLoc) { - return handle(entry.finallyLoc); - } - } else { - throw new Error(\\"try statement without catch or finally\\"); - } - } - } - }, - abrupt: function abrupt(type, arg) { - for (var i = this.tryEntries.length - 1; i >= 0; --i) { - var entry = this.tryEntries[i]; - if (entry.tryLoc <= this.prev && hasOwn.call(entry, \\"finallyLoc\\") && this.prev < entry.finallyLoc) { - var finallyEntry = entry; - break; - } - } - if (finallyEntry && (type === \\"break\\" || type === \\"continue\\") && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc) { - finallyEntry = null; - } - var record = finallyEntry ? finallyEntry.completion : {}; - record.type = type; - record.arg = arg; - if (finallyEntry) { - this.method = \\"next\\"; - this.next = finallyEntry.finallyLoc; - return ContinueSentinel; - } - return this.complete(record); - }, - complete: function complete(record, afterLoc) { - if (record.type === \\"throw\\") { - throw record.arg; - } - if (record.type === \\"break\\" || record.type === \\"continue\\") { - this.next = record.arg; - } else if (record.type === \\"return\\") { - this.rval = this.arg = record.arg; - this.method = \\"return\\"; - this.next = \\"end\\"; - } else if (record.type === \\"normal\\" && afterLoc) { - this.next = afterLoc; - } - return ContinueSentinel; - }, - finish: function finish(finallyLoc) { - for (var i = this.tryEntries.length - 1; i >= 0; --i) { - var entry = this.tryEntries[i]; - if (entry.finallyLoc === finallyLoc) { - this.complete(entry.completion, entry.afterLoc); - resetTryEntry(entry); - return ContinueSentinel; - } - } - }, - catch: function _catch(tryLoc) { - for (var i = this.tryEntries.length - 1; i >= 0; --i) { - var entry = this.tryEntries[i]; - if (entry.tryLoc === tryLoc) { - var record = entry.completion; - if (record.type === \\"throw\\") { - var thrown = record.arg; - resetTryEntry(entry); - } - return thrown; - } - } - throw new Error(\\"illegal catch attempt\\"); - }, - delegateYield: function delegateYield(iterable, resultName, nextLoc) { - this.delegate = { - iterator: values(iterable), - resultName: resultName, - nextLoc: nextLoc - }; - if (this.method === \\"next\\") { - this.arg = undefined; - } - return ContinueSentinel; - } - }; - }(function() { - return this; - }() || Function(\\"return this\\")()); - }).call(this, __webpack_require__(16)(module)); -}, function(module, exports) { - module.exports = function(module) { - if (!module.webpackPolyfill) { - module.deprecate = function() {}; - module.paths = []; - if (!module.children) module.children = []; - Object.defineProperty(module, \\"loaded\\", { - enumerable: true, - get: function get() { - return module.l; - } - }); - Object.defineProperty(module, \\"id\\", { - enumerable: true, - get: function get() { - return module.i; - } - }); - module.webpackPolyfill = 1; - } - return module; - }; -}, function(module, exports) { - function _typeof(obj) { - \\"@babel/helpers - typeof\\"; - if (typeof Symbol === \\"function\\" && typeof Symbol.iterator === \\"symbol\\") { - module.exports = _typeof = function _typeof(obj) { - return typeof obj; - }; - } else { - module.exports = _typeof = function _typeof(obj) { - return obj && typeof Symbol === \\"function\\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \\"symbol\\" : typeof obj; - }; - } - return _typeof(obj); - } - module.exports = _typeof; -}, function(module, exports, __webpack_require__) {}, function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - __webpack_require__.r(__webpack_exports__); - var taro_runtime = __webpack_require__(1); - var regenerator = __webpack_require__(8); - var regenerator_default = __webpack_require__.n(regenerator); - function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { - try { - var info = gen[key](arg); - var value = info.value; - } catch (error) { - reject(error); - return; - } - if (info.done) { - resolve(value); - } else { - Promise.resolve(value).then(_next, _throw); - } - } - function _asyncToGenerator(fn) { - return function() { - var self = this, args = arguments; - return new Promise((function(resolve, reject) { - var gen = fn.apply(self, args); - function _next(value) { - asyncGeneratorStep(gen, resolve, reject, _next, _throw, \\"next\\", value); - } - function _throw(err) { - asyncGeneratorStep(gen, resolve, reject, _next, _throw, \\"throw\\", err); - } - _next(undefined); - })); - }; - } - var classCallCheck = __webpack_require__(3); - var createClass = __webpack_require__(4); - var possibleConstructorReturn = __webpack_require__(6); - var getPrototypeOf = __webpack_require__(5); - var inherits = __webpack_require__(7); - var react = __webpack_require__(0); - var taro_components = __webpack_require__(2); - var index = __webpack_require__(18); - var index_Index = function(_Component) { - Object(inherits[\\"a\\"])(Index, _Component); - function Index() { - Object(classCallCheck[\\"a\\"])(this, Index); - return Object(possibleConstructorReturn[\\"a\\"])(this, Object(getPrototypeOf[\\"a\\"])(Index).apply(this, arguments)); - } - Object(createClass[\\"a\\"])(Index, [ { - key: \\"componentWillMount\\", - value: function() { - var _componentWillMount = _asyncToGenerator(regenerator_default.a.mark((function _callee() { - return regenerator_default.a.wrap((function _callee$(_context) { - while (1) { - switch (_context.prev = _context.next) { - case 0: - _context.next = 2; - return Promise.resolve(1); - - case 2: - case \\"end\\": - return _context.stop(); - } - } - }), _callee); - }))); - function componentWillMount() { - return _componentWillMount.apply(this, arguments); - } - return componentWillMount; - }() - }, { - key: \\"componentDidMount\\", - value: function componentDidMount() {} - }, { - key: \\"componentWillUnmount\\", - value: function componentWillUnmount() {} - }, { - key: \\"componentDidShow\\", - value: function componentDidShow() {} - }, { - key: \\"componentDidHide\\", - value: function componentDidHide() {} - }, { - key: \\"render\\", - value: function render() { - return react[\\"default\\"].createElement(taro_components[\\"View\\"], { - className: \\"index\\" - }, react[\\"default\\"].createElement(taro_components[\\"Text\\"], null, \\"Hello world!\\"), react[\\"default\\"].createElement(taro_components[\\"Input\\"], { - placeholder: \\"input\\", - value: \\"\\" - }), react[\\"default\\"].createElement(taro_components[\\"Textarea\\"], { - value: \\"\\" - })); - } - } ]); - return Index; - }(react[\\"Component\\"]); - var config = { - navigationBarTitleText: \\"\\\\u9996\\\\u9875\\" - }; - var inst = Page(Object(taro_runtime[\\"createPageConfig\\"])(index_Index, \\"pages/index/index\\", {}, config || {})); -} ], [ [ 19, 0, 1, 3, 2 ] ] ]); - -/** filePath: dist/pages/index/index.json **/ -{\\"navigationBarTitleText\\":\\"首页\\",\\"usingComponents\\":{\\"comp\\":\\"../../comp\\"}} - -/** filePath: dist/pages/index/index.wxml **/ - - - -/** filePath: dist/pages/index/index.wxss **/ - - -/** filePath: dist/runtime.js **/ -(function(modules) { - function webpackJsonpCallback(data) { - var chunkIds = data[0]; - var moreModules = data[1]; - var executeModules = data[2]; - var moduleId, chunkId, i = 0, resolves = []; - for (;i < chunkIds.length; i++) { - chunkId = chunkIds[i]; - if (Object.prototype.hasOwnProperty.call(installedChunks, chunkId) && installedChunks[chunkId]) { - resolves.push(installedChunks[chunkId][0]); - } - installedChunks[chunkId] = 0; - } - for (moduleId in moreModules) { - if (Object.prototype.hasOwnProperty.call(moreModules, moduleId)) { - modules[moduleId] = moreModules[moduleId]; - } - } - if (parentJsonpFunction) parentJsonpFunction(data); - while (resolves.length) { - resolves.shift()(); - } - deferredModules.push.apply(deferredModules, executeModules || []); - return checkDeferredModules(); - } - function checkDeferredModules() { - var result; - for (var i = 0; i < deferredModules.length; i++) { - var deferredModule = deferredModules[i]; - var fulfilled = true; - for (var j = 1; j < deferredModule.length; j++) { - var depId = deferredModule[j]; - if (installedChunks[depId] !== 0) fulfilled = false; - } - if (fulfilled) { - deferredModules.splice(i--, 1); - result = __webpack_require__(__webpack_require__.s = deferredModule[0]); - } - } - return result; - } - var installedModules = {}; - var installedChunks = { - 0: 0 - }; - var deferredModules = []; - function __webpack_require__(moduleId) { - if (installedModules[moduleId]) { - return installedModules[moduleId].exports; - } - var module = installedModules[moduleId] = { - i: moduleId, - l: false, - exports: {} - }; - modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); - module.l = true; - return module.exports; - } - __webpack_require__.m = modules; - __webpack_require__.c = installedModules; - __webpack_require__.d = function(exports, name, getter) { - if (!__webpack_require__.o(exports, name)) { - Object.defineProperty(exports, name, { - enumerable: true, - get: getter - }); - } - }; - __webpack_require__.r = function(exports) { - if (typeof Symbol !== \\"undefined\\" && Symbol.toStringTag) { - Object.defineProperty(exports, Symbol.toStringTag, { - value: \\"Module\\" - }); - } - Object.defineProperty(exports, \\"__esModule\\", { - value: true - }); - }; - __webpack_require__.t = function(value, mode) { - if (mode & 1) value = __webpack_require__(value); - if (mode & 8) return value; - if (mode & 4 && typeof value === \\"object\\" && value && value.__esModule) return value; - var ns = Object.create(null); - __webpack_require__.r(ns); - Object.defineProperty(ns, \\"default\\", { - enumerable: true, - value: value - }); - if (mode & 2 && typeof value != \\"string\\") for (var key in value) __webpack_require__.d(ns, key, function(key) { - return value[key]; - }.bind(null, key)); - return ns; - }; - __webpack_require__.n = function(module) { - var getter = module && module.__esModule ? function getDefault() { - return module[\\"default\\"]; - } : function getModuleExports() { - return module; - }; - __webpack_require__.d(getter, \\"a\\", getter); - return getter; - }; - __webpack_require__.o = function(object, property) { - return Object.prototype.hasOwnProperty.call(object, property); - }; - __webpack_require__.p = \\"/\\"; - var jsonpArray = wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []; - var oldJsonpFunction = jsonpArray.push.bind(jsonpArray); - jsonpArray.push = webpackJsonpCallback; - jsonpArray = jsonpArray.slice(); - for (var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]); - var parentJsonpFunction = oldJsonpFunction; - checkDeferredModules(); -})([]); - -/** filePath: dist/taro.js **/ -(wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 1 ], { - 1: function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - var _unused_webpack_default_export = \\"taro-runtime-mock\\"; - }, - 2: function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - var _unused_webpack_default_export = \\"taro-components-mock\\"; - }, - 9: function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - __webpack_exports__[\\"a\\"] = \\"taro-react-mock\\"; - } -} ]); - -/** filePath: dist/vendors.js **/ -(wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 3 ], [ , , , function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - __webpack_require__.d(__webpack_exports__, \\"a\\", (function() { - return _classCallCheck; - })); - function _classCallCheck(instance, Constructor) { - if (!(instance instanceof Constructor)) { - throw new TypeError(\\"Cannot call a class as a function\\"); - } - } -}, function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - __webpack_require__.d(__webpack_exports__, \\"a\\", (function() { - return _createClass; - })); - function _defineProperties(target, props) { - for (var i = 0; i < props.length; i++) { - var descriptor = props[i]; - descriptor.enumerable = descriptor.enumerable || false; - descriptor.configurable = true; - if (\\"value\\" in descriptor) descriptor.writable = true; - Object.defineProperty(target, descriptor.key, descriptor); - } - } - function _createClass(Constructor, protoProps, staticProps) { - if (protoProps) _defineProperties(Constructor.prototype, protoProps); - if (staticProps) _defineProperties(Constructor, staticProps); - return Constructor; - } -}, function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - __webpack_require__.d(__webpack_exports__, \\"a\\", (function() { - return _getPrototypeOf; - })); - function _getPrototypeOf(o) { - _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { - return o.__proto__ || Object.getPrototypeOf(o); - }; - return _getPrototypeOf(o); - } -}, function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - __webpack_require__.d(__webpack_exports__, \\"a\\", (function() { - return _possibleConstructorReturn; - })); - function _typeof(obj) { - \\"@babel/helpers - typeof\\"; - if (typeof Symbol === \\"function\\" && typeof Symbol.iterator === \\"symbol\\") { - _typeof = function _typeof(obj) { - return typeof obj; - }; - } else { - _typeof = function _typeof(obj) { - return obj && typeof Symbol === \\"function\\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \\"symbol\\" : typeof obj; - }; - } - return _typeof(obj); - } - function _assertThisInitialized(self) { - if (self === void 0) { - throw new ReferenceError(\\"this hasn't been initialised - super() hasn't been called\\"); - } - return self; - } - function _possibleConstructorReturn(self, call) { - if (call && (_typeof(call) === \\"object\\" || typeof call === \\"function\\")) { - return call; - } - return _assertThisInitialized(self); - } -}, function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - __webpack_require__.d(__webpack_exports__, \\"a\\", (function() { - return _inherits; - })); - function _setPrototypeOf(o, p) { - _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { - o.__proto__ = p; - return o; - }; - return _setPrototypeOf(o, p); - } - function _inherits(subClass, superClass) { - if (typeof superClass !== \\"function\\" && superClass !== null) { - throw new TypeError(\\"Super expression must either be null or a function\\"); - } - subClass.prototype = Object.create(superClass && superClass.prototype, { - constructor: { - value: subClass, - writable: true, - configurable: true - } - }); - if (superClass) _setPrototypeOf(subClass, superClass); - } -} ] ]); -" -`; diff --git a/packages/taro-mini-runner/__tests__/__snapshots__/sass.spec.ts.snap b/packages/taro-mini-runner/__tests__/__snapshots__/sass.spec.ts.snap deleted file mode 100644 index 9c0739f9412c..000000000000 --- a/packages/taro-mini-runner/__tests__/__snapshots__/sass.spec.ts.snap +++ /dev/null @@ -1,3001 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`sass should build app with sass 1`] = `15`; - -exports[`sass should build app with sass 2`] = ` -" -/** filePath: dist/app.js **/ -require(\\"./runtime\\"); - -require(\\"./common\\"); - -require(\\"./vendors\\"); - -require(\\"./taro\\"); - -(wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 4 ], { - 11: function(module, exports, __webpack_require__) {}, - 14: function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - __webpack_require__.r(__webpack_exports__); - var taro_runtime = __webpack_require__(1); - var classCallCheck = __webpack_require__(2); - var createClass = __webpack_require__(3); - var possibleConstructorReturn = __webpack_require__(5); - var getPrototypeOf = __webpack_require__(4); - var inherits = __webpack_require__(6); - var react = __webpack_require__(0); - var app = __webpack_require__(11); - var app_App = function(_Component) { - Object(inherits[\\"a\\"])(App, _Component); - function App() { - Object(classCallCheck[\\"a\\"])(this, App); - return Object(possibleConstructorReturn[\\"a\\"])(this, Object(getPrototypeOf[\\"a\\"])(App).apply(this, arguments)); - } - Object(createClass[\\"a\\"])(App, [ { - key: \\"componentDidMount\\", - value: function componentDidMount() {} - }, { - key: \\"componentDidShow\\", - value: function componentDidShow() {} - }, { - key: \\"componentDidHide\\", - value: function componentDidHide() {} - }, { - key: \\"componentDidCatchError\\", - value: function componentDidCatchError() {} - }, { - key: \\"render\\", - value: function render() { - return this.props.children; - } - } ]); - return App; - }(react[\\"Component\\"]); - var lib_src_app = app_App; - var taro_react = __webpack_require__(8); - var config = { - pages: [ \\"pages/index/index\\" ], - window: { - backgroundTextStyle: \\"light\\", - navigationBarBackgroundColor: \\"#fff\\", - navigationBarTitleText: \\"WeChat\\", - navigationBarTextStyle: \\"black\\" - } - }; - taro_runtime[\\"window\\"].__taroAppConfig = config; - var inst = App(Object(taro_runtime[\\"createReactApp\\"])(lib_src_app, react, taro_react[\\"a\\"], config)); - } -}, [ [ 14, 0, 1, 3, 2 ] ] ]); - - - -/** filePath: dist/app.json **/ -{\\"pages\\":[\\"pages/index/index\\"],\\"window\\":{\\"backgroundTextStyle\\":\\"light\\",\\"navigationBarBackgroundColor\\":\\"#fff\\",\\"navigationBarTitleText\\":\\"WeChat\\",\\"navigationBarTextStyle\\":\\"black\\"}} - -/** filePath: dist/app.wxss **/ - - -/** filePath: dist/base.wxml **/ - - - - - - - - -- - - - -- - -- - - - -- - -- - - - -- - -- - - - -- - -{{i.v}} - - - - - - - -- - - - -- - -- - - - -- - -- - - - - - - - -- - -- - - - -- - -- - - - -- - -- - - - - - - - -- - -- - - - -- - -- - - - -- - -- - - - - - - - -- - -- - - - -- - -- - - - - - - - -- - -- - - - -- - -- - - - - - - - -- - -- - - - -- - -- - - - - - - - -- - -- - - - -- - -- - - - - - - - -- - -- - - - -- - -- - - - - - - - -- - -- - - - -- - -- - - - - - - - -- - -- - - - -- - -- - - - - - - - -- - -- - - - -- - -- - - - - - - - -- - -- - - - -- - -- - - - - - - - -- - -- - - - -- - -- - - - - - - - -- - -- - - - -- - -- - - - - - - - -- - -- - - -/** filePath: dist/common.js **/ -(wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 2 ], [ function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - __webpack_require__.r(__webpack_exports__); - __webpack_exports__[\\"default\\"] = \\"react-mock\\"; -} ] ]); - -/** filePath: dist/comp.js **/ -(wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 6 ], { - 12: function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - __webpack_require__.r(__webpack_exports__); - var _tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1); - Component(Object(_tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__[\\"createRecursiveComponentConfig\\"])()); - } -}, [ [ 12, 0, 1 ] ] ]); - -/** filePath: dist/comp.json **/ -{\\"component\\":true,\\"usingComponents\\":{\\"comp\\":\\"./comp\\"}} - -/** filePath: dist/comp.wxml **/ - - - -/** filePath: dist/pages/index/index.js **/ -(wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 7 ], { - 13: function(module, exports, __webpack_require__) {}, - 15: function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - __webpack_require__.r(__webpack_exports__); - var taro_runtime = __webpack_require__(1); - var classCallCheck = __webpack_require__(2); - var createClass = __webpack_require__(3); - var possibleConstructorReturn = __webpack_require__(5); - var getPrototypeOf = __webpack_require__(4); - var inherits = __webpack_require__(6); - var react = __webpack_require__(0); - var taro_components = __webpack_require__(7); - var index = __webpack_require__(13); - var index_Index = function(_Component) { - Object(inherits[\\"a\\"])(Index, _Component); - function Index() { - Object(classCallCheck[\\"a\\"])(this, Index); - return Object(possibleConstructorReturn[\\"a\\"])(this, Object(getPrototypeOf[\\"a\\"])(Index).apply(this, arguments)); - } - Object(createClass[\\"a\\"])(Index, [ { - key: \\"componentDidMount\\", - value: function componentDidMount() {} - }, { - key: \\"componentWillUnmount\\", - value: function componentWillUnmount() {} - }, { - key: \\"componentDidShow\\", - value: function componentDidShow() {} - }, { - key: \\"componentDidHide\\", - value: function componentDidHide() {} - }, { - key: \\"render\\", - value: function render() { - return react[\\"default\\"].createElement(taro_components[\\"View\\"], { - className: \\"index\\" - }, react[\\"default\\"].createElement(taro_components[\\"Text\\"], null, \\"Hello world!\\")); - } - } ]); - return Index; - }(react[\\"Component\\"]); - var config = { - navigationBarTitleText: \\"\\\\u9996\\\\u9875\\" - }; - var inst = Page(Object(taro_runtime[\\"createPageConfig\\"])(index_Index, \\"pages/index/index\\", {}, config || {})); - } -}, [ [ 15, 0, 1, 3, 2 ] ] ]); - -/** filePath: dist/pages/index/index.json **/ -{\\"navigationBarTitleText\\":\\"首页\\",\\"usingComponents\\":{\\"comp\\":\\"../../comp\\"}} - -/** filePath: dist/pages/index/index.wxml **/ - - - -/** filePath: dist/pages/index/index.wxss **/ -.index{width:100%}.index .list{display:flex}.index .list .list-item{width:20rpx} - -/** filePath: dist/runtime.js **/ -(function(modules) { - function webpackJsonpCallback(data) { - var chunkIds = data[0]; - var moreModules = data[1]; - var executeModules = data[2]; - var moduleId, chunkId, i = 0, resolves = []; - for (;i < chunkIds.length; i++) { - chunkId = chunkIds[i]; - if (Object.prototype.hasOwnProperty.call(installedChunks, chunkId) && installedChunks[chunkId]) { - resolves.push(installedChunks[chunkId][0]); - } - installedChunks[chunkId] = 0; - } - for (moduleId in moreModules) { - if (Object.prototype.hasOwnProperty.call(moreModules, moduleId)) { - modules[moduleId] = moreModules[moduleId]; - } - } - if (parentJsonpFunction) parentJsonpFunction(data); - while (resolves.length) { - resolves.shift()(); - } - deferredModules.push.apply(deferredModules, executeModules || []); - return checkDeferredModules(); - } - function checkDeferredModules() { - var result; - for (var i = 0; i < deferredModules.length; i++) { - var deferredModule = deferredModules[i]; - var fulfilled = true; - for (var j = 1; j < deferredModule.length; j++) { - var depId = deferredModule[j]; - if (installedChunks[depId] !== 0) fulfilled = false; - } - if (fulfilled) { - deferredModules.splice(i--, 1); - result = __webpack_require__(__webpack_require__.s = deferredModule[0]); - } - } - return result; - } - var installedModules = {}; - var installedChunks = { - 0: 0 - }; - var deferredModules = []; - function __webpack_require__(moduleId) { - if (installedModules[moduleId]) { - return installedModules[moduleId].exports; - } - var module = installedModules[moduleId] = { - i: moduleId, - l: false, - exports: {} - }; - modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); - module.l = true; - return module.exports; - } - __webpack_require__.m = modules; - __webpack_require__.c = installedModules; - __webpack_require__.d = function(exports, name, getter) { - if (!__webpack_require__.o(exports, name)) { - Object.defineProperty(exports, name, { - enumerable: true, - get: getter - }); - } - }; - __webpack_require__.r = function(exports) { - if (typeof Symbol !== \\"undefined\\" && Symbol.toStringTag) { - Object.defineProperty(exports, Symbol.toStringTag, { - value: \\"Module\\" - }); - } - Object.defineProperty(exports, \\"__esModule\\", { - value: true - }); - }; - __webpack_require__.t = function(value, mode) { - if (mode & 1) value = __webpack_require__(value); - if (mode & 8) return value; - if (mode & 4 && typeof value === \\"object\\" && value && value.__esModule) return value; - var ns = Object.create(null); - __webpack_require__.r(ns); - Object.defineProperty(ns, \\"default\\", { - enumerable: true, - value: value - }); - if (mode & 2 && typeof value != \\"string\\") for (var key in value) __webpack_require__.d(ns, key, function(key) { - return value[key]; - }.bind(null, key)); - return ns; - }; - __webpack_require__.n = function(module) { - var getter = module && module.__esModule ? function getDefault() { - return module[\\"default\\"]; - } : function getModuleExports() { - return module; - }; - __webpack_require__.d(getter, \\"a\\", getter); - return getter; - }; - __webpack_require__.o = function(object, property) { - return Object.prototype.hasOwnProperty.call(object, property); - }; - __webpack_require__.p = \\"/\\"; - var jsonpArray = wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []; - var oldJsonpFunction = jsonpArray.push.bind(jsonpArray); - jsonpArray.push = webpackJsonpCallback; - jsonpArray = jsonpArray.slice(); - for (var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]); - var parentJsonpFunction = oldJsonpFunction; - checkDeferredModules(); -})([]); - -/** filePath: dist/taro.js **/ -(wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 1 ], { - 1: function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - var _unused_webpack_default_export = \\"taro-runtime-mock\\"; - }, - 7: function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - var _unused_webpack_default_export = \\"taro-components-mock\\"; - }, - 8: function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - __webpack_exports__[\\"a\\"] = \\"taro-react-mock\\"; - } -} ]); - -/** filePath: dist/vendors.js **/ -(wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 3 ], [ , , function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - __webpack_require__.d(__webpack_exports__, \\"a\\", (function() { - return _classCallCheck; - })); - function _classCallCheck(instance, Constructor) { - if (!(instance instanceof Constructor)) { - throw new TypeError(\\"Cannot call a class as a function\\"); - } - } -}, function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - __webpack_require__.d(__webpack_exports__, \\"a\\", (function() { - return _createClass; - })); - function _defineProperties(target, props) { - for (var i = 0; i < props.length; i++) { - var descriptor = props[i]; - descriptor.enumerable = descriptor.enumerable || false; - descriptor.configurable = true; - if (\\"value\\" in descriptor) descriptor.writable = true; - Object.defineProperty(target, descriptor.key, descriptor); - } - } - function _createClass(Constructor, protoProps, staticProps) { - if (protoProps) _defineProperties(Constructor.prototype, protoProps); - if (staticProps) _defineProperties(Constructor, staticProps); - return Constructor; - } -}, function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - __webpack_require__.d(__webpack_exports__, \\"a\\", (function() { - return _getPrototypeOf; - })); - function _getPrototypeOf(o) { - _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { - return o.__proto__ || Object.getPrototypeOf(o); - }; - return _getPrototypeOf(o); - } -}, function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - __webpack_require__.d(__webpack_exports__, \\"a\\", (function() { - return _possibleConstructorReturn; - })); - function _typeof(obj) { - \\"@babel/helpers - typeof\\"; - if (typeof Symbol === \\"function\\" && typeof Symbol.iterator === \\"symbol\\") { - _typeof = function _typeof(obj) { - return typeof obj; - }; - } else { - _typeof = function _typeof(obj) { - return obj && typeof Symbol === \\"function\\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \\"symbol\\" : typeof obj; - }; - } - return _typeof(obj); - } - function _assertThisInitialized(self) { - if (self === void 0) { - throw new ReferenceError(\\"this hasn't been initialised - super() hasn't been called\\"); - } - return self; - } - function _possibleConstructorReturn(self, call) { - if (call && (_typeof(call) === \\"object\\" || typeof call === \\"function\\")) { - return call; - } - return _assertThisInitialized(self); - } -}, function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - __webpack_require__.d(__webpack_exports__, \\"a\\", (function() { - return _inherits; - })); - function _setPrototypeOf(o, p) { - _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { - o.__proto__ = p; - return o; - }; - return _setPrototypeOf(o, p); - } - function _inherits(subClass, superClass) { - if (typeof superClass !== \\"function\\" && superClass !== null) { - throw new TypeError(\\"Super expression must either be null or a function\\"); - } - subClass.prototype = Object.create(superClass && superClass.prototype, { - constructor: { - value: subClass, - writable: true, - configurable: true - } - }); - if (superClass) _setPrototypeOf(subClass, superClass); - } -} ] ]); -" -`; - -exports[`sass should set global sass content with data 1`] = `15`; - -exports[`sass should set global sass content with data 2`] = ` -" -/** filePath: dist/app.js **/ -require(\\"./runtime\\"); - -require(\\"./common\\"); - -require(\\"./vendors\\"); - -require(\\"./taro\\"); - -(wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 4 ], { - 11: function(module, exports, __webpack_require__) {}, - 14: function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - __webpack_require__.r(__webpack_exports__); - var taro_runtime = __webpack_require__(1); - var classCallCheck = __webpack_require__(2); - var createClass = __webpack_require__(3); - var possibleConstructorReturn = __webpack_require__(5); - var getPrototypeOf = __webpack_require__(4); - var inherits = __webpack_require__(6); - var react = __webpack_require__(0); - var app = __webpack_require__(11); - var app_App = function(_Component) { - Object(inherits[\\"a\\"])(App, _Component); - function App() { - Object(classCallCheck[\\"a\\"])(this, App); - return Object(possibleConstructorReturn[\\"a\\"])(this, Object(getPrototypeOf[\\"a\\"])(App).apply(this, arguments)); - } - Object(createClass[\\"a\\"])(App, [ { - key: \\"componentDidMount\\", - value: function componentDidMount() {} - }, { - key: \\"componentDidShow\\", - value: function componentDidShow() {} - }, { - key: \\"componentDidHide\\", - value: function componentDidHide() {} - }, { - key: \\"componentDidCatchError\\", - value: function componentDidCatchError() {} - }, { - key: \\"render\\", - value: function render() { - return this.props.children; - } - } ]); - return App; - }(react[\\"Component\\"]); - var lib_src_app = app_App; - var taro_react = __webpack_require__(8); - var config = { - pages: [ \\"pages/index/index\\" ], - window: { - backgroundTextStyle: \\"light\\", - navigationBarBackgroundColor: \\"#fff\\", - navigationBarTitleText: \\"WeChat\\", - navigationBarTextStyle: \\"black\\" - } - }; - taro_runtime[\\"window\\"].__taroAppConfig = config; - var inst = App(Object(taro_runtime[\\"createReactApp\\"])(lib_src_app, react, taro_react[\\"a\\"], config)); - } -}, [ [ 14, 0, 1, 3, 2 ] ] ]); - - - -/** filePath: dist/app.json **/ -{\\"pages\\":[\\"pages/index/index\\"],\\"window\\":{\\"backgroundTextStyle\\":\\"light\\",\\"navigationBarBackgroundColor\\":\\"#fff\\",\\"navigationBarTitleText\\":\\"WeChat\\",\\"navigationBarTextStyle\\":\\"black\\"}} - -/** filePath: dist/app.wxss **/ -.body{background-color:red} - -/** filePath: dist/base.wxml **/ - - - - - - - - -- - - - -- - -- - - - -- - -- - - - -- - -- - - - -- - -{{i.v}} - - - - - - - -- - - - -- - -- - - - -- - -- - - - - - - - -- - -- - - - -- - -- - - - -- - -- - - - - - - - -- - -- - - - -- - -- - - - -- - -- - - - - - - - -- - -- - - - -- - -- - - - - - - - -- - -- - - - -- - -- - - - - - - - -- - -- - - - -- - -- - - - - - - - -- - -- - - - -- - -- - - - - - - - -- - -- - - - -- - -- - - - - - - - -- - -- - - - -- - -- - - - - - - - -- - -- - - - -- - -- - - - - - - - -- - -- - - - -- - -- - - - - - - - -- - -- - - - -- - -- - - - - - - - -- - -- - - - -- - -- - - - - - - - -- - -- - - - -- - -- - - - - - - - -- - -- - - -/** filePath: dist/common.js **/ -(wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 2 ], [ function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - __webpack_require__.r(__webpack_exports__); - __webpack_exports__[\\"default\\"] = \\"react-mock\\"; -} ] ]); - -/** filePath: dist/comp.js **/ -(wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 6 ], { - 12: function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - __webpack_require__.r(__webpack_exports__); - var _tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1); - Component(Object(_tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__[\\"createRecursiveComponentConfig\\"])()); - } -}, [ [ 12, 0, 1 ] ] ]); - -/** filePath: dist/comp.json **/ -{\\"component\\":true,\\"usingComponents\\":{\\"comp\\":\\"./comp\\"}} - -/** filePath: dist/comp.wxml **/ - - - -/** filePath: dist/pages/index/index.js **/ -(wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 7 ], { - 13: function(module, exports, __webpack_require__) {}, - 15: function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - __webpack_require__.r(__webpack_exports__); - var taro_runtime = __webpack_require__(1); - var classCallCheck = __webpack_require__(2); - var createClass = __webpack_require__(3); - var possibleConstructorReturn = __webpack_require__(5); - var getPrototypeOf = __webpack_require__(4); - var inherits = __webpack_require__(6); - var react = __webpack_require__(0); - var taro_components = __webpack_require__(7); - var index = __webpack_require__(13); - var index_Index = function(_Component) { - Object(inherits[\\"a\\"])(Index, _Component); - function Index() { - Object(classCallCheck[\\"a\\"])(this, Index); - return Object(possibleConstructorReturn[\\"a\\"])(this, Object(getPrototypeOf[\\"a\\"])(Index).apply(this, arguments)); - } - Object(createClass[\\"a\\"])(Index, [ { - key: \\"componentDidMount\\", - value: function componentDidMount() {} - }, { - key: \\"componentWillUnmount\\", - value: function componentWillUnmount() {} - }, { - key: \\"componentDidShow\\", - value: function componentDidShow() {} - }, { - key: \\"componentDidHide\\", - value: function componentDidHide() {} - }, { - key: \\"render\\", - value: function render() { - return react[\\"default\\"].createElement(taro_components[\\"View\\"], { - className: \\"index\\" - }, react[\\"default\\"].createElement(taro_components[\\"Text\\"], null, \\"Hello world!\\")); - } - } ]); - return Index; - }(react[\\"Component\\"]); - var config = { - navigationBarTitleText: \\"\\\\u9996\\\\u9875\\" - }; - var inst = Page(Object(taro_runtime[\\"createPageConfig\\"])(index_Index, \\"pages/index/index\\", {}, config || {})); - } -}, [ [ 15, 0, 1, 3, 2 ] ] ]); - -/** filePath: dist/pages/index/index.json **/ -{\\"navigationBarTitleText\\":\\"首页\\",\\"usingComponents\\":{\\"comp\\":\\"../../comp\\"}} - -/** filePath: dist/pages/index/index.wxml **/ - - - -/** filePath: dist/pages/index/index.wxss **/ -.body{background-color:red}.index{width:100%}.index .list{display:flex}.index .list .list-item{width:20rpx} - -/** filePath: dist/runtime.js **/ -(function(modules) { - function webpackJsonpCallback(data) { - var chunkIds = data[0]; - var moreModules = data[1]; - var executeModules = data[2]; - var moduleId, chunkId, i = 0, resolves = []; - for (;i < chunkIds.length; i++) { - chunkId = chunkIds[i]; - if (Object.prototype.hasOwnProperty.call(installedChunks, chunkId) && installedChunks[chunkId]) { - resolves.push(installedChunks[chunkId][0]); - } - installedChunks[chunkId] = 0; - } - for (moduleId in moreModules) { - if (Object.prototype.hasOwnProperty.call(moreModules, moduleId)) { - modules[moduleId] = moreModules[moduleId]; - } - } - if (parentJsonpFunction) parentJsonpFunction(data); - while (resolves.length) { - resolves.shift()(); - } - deferredModules.push.apply(deferredModules, executeModules || []); - return checkDeferredModules(); - } - function checkDeferredModules() { - var result; - for (var i = 0; i < deferredModules.length; i++) { - var deferredModule = deferredModules[i]; - var fulfilled = true; - for (var j = 1; j < deferredModule.length; j++) { - var depId = deferredModule[j]; - if (installedChunks[depId] !== 0) fulfilled = false; - } - if (fulfilled) { - deferredModules.splice(i--, 1); - result = __webpack_require__(__webpack_require__.s = deferredModule[0]); - } - } - return result; - } - var installedModules = {}; - var installedChunks = { - 0: 0 - }; - var deferredModules = []; - function __webpack_require__(moduleId) { - if (installedModules[moduleId]) { - return installedModules[moduleId].exports; - } - var module = installedModules[moduleId] = { - i: moduleId, - l: false, - exports: {} - }; - modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); - module.l = true; - return module.exports; - } - __webpack_require__.m = modules; - __webpack_require__.c = installedModules; - __webpack_require__.d = function(exports, name, getter) { - if (!__webpack_require__.o(exports, name)) { - Object.defineProperty(exports, name, { - enumerable: true, - get: getter - }); - } - }; - __webpack_require__.r = function(exports) { - if (typeof Symbol !== \\"undefined\\" && Symbol.toStringTag) { - Object.defineProperty(exports, Symbol.toStringTag, { - value: \\"Module\\" - }); - } - Object.defineProperty(exports, \\"__esModule\\", { - value: true - }); - }; - __webpack_require__.t = function(value, mode) { - if (mode & 1) value = __webpack_require__(value); - if (mode & 8) return value; - if (mode & 4 && typeof value === \\"object\\" && value && value.__esModule) return value; - var ns = Object.create(null); - __webpack_require__.r(ns); - Object.defineProperty(ns, \\"default\\", { - enumerable: true, - value: value - }); - if (mode & 2 && typeof value != \\"string\\") for (var key in value) __webpack_require__.d(ns, key, function(key) { - return value[key]; - }.bind(null, key)); - return ns; - }; - __webpack_require__.n = function(module) { - var getter = module && module.__esModule ? function getDefault() { - return module[\\"default\\"]; - } : function getModuleExports() { - return module; - }; - __webpack_require__.d(getter, \\"a\\", getter); - return getter; - }; - __webpack_require__.o = function(object, property) { - return Object.prototype.hasOwnProperty.call(object, property); - }; - __webpack_require__.p = \\"/\\"; - var jsonpArray = wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []; - var oldJsonpFunction = jsonpArray.push.bind(jsonpArray); - jsonpArray.push = webpackJsonpCallback; - jsonpArray = jsonpArray.slice(); - for (var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]); - var parentJsonpFunction = oldJsonpFunction; - checkDeferredModules(); -})([]); - -/** filePath: dist/taro.js **/ -(wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 1 ], { - 1: function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - var _unused_webpack_default_export = \\"taro-runtime-mock\\"; - }, - 7: function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - var _unused_webpack_default_export = \\"taro-components-mock\\"; - }, - 8: function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - __webpack_exports__[\\"a\\"] = \\"taro-react-mock\\"; - } -} ]); - -/** filePath: dist/vendors.js **/ -(wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 3 ], [ , , function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - __webpack_require__.d(__webpack_exports__, \\"a\\", (function() { - return _classCallCheck; - })); - function _classCallCheck(instance, Constructor) { - if (!(instance instanceof Constructor)) { - throw new TypeError(\\"Cannot call a class as a function\\"); - } - } -}, function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - __webpack_require__.d(__webpack_exports__, \\"a\\", (function() { - return _createClass; - })); - function _defineProperties(target, props) { - for (var i = 0; i < props.length; i++) { - var descriptor = props[i]; - descriptor.enumerable = descriptor.enumerable || false; - descriptor.configurable = true; - if (\\"value\\" in descriptor) descriptor.writable = true; - Object.defineProperty(target, descriptor.key, descriptor); - } - } - function _createClass(Constructor, protoProps, staticProps) { - if (protoProps) _defineProperties(Constructor.prototype, protoProps); - if (staticProps) _defineProperties(Constructor, staticProps); - return Constructor; - } -}, function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - __webpack_require__.d(__webpack_exports__, \\"a\\", (function() { - return _getPrototypeOf; - })); - function _getPrototypeOf(o) { - _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { - return o.__proto__ || Object.getPrototypeOf(o); - }; - return _getPrototypeOf(o); - } -}, function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - __webpack_require__.d(__webpack_exports__, \\"a\\", (function() { - return _possibleConstructorReturn; - })); - function _typeof(obj) { - \\"@babel/helpers - typeof\\"; - if (typeof Symbol === \\"function\\" && typeof Symbol.iterator === \\"symbol\\") { - _typeof = function _typeof(obj) { - return typeof obj; - }; - } else { - _typeof = function _typeof(obj) { - return obj && typeof Symbol === \\"function\\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \\"symbol\\" : typeof obj; - }; - } - return _typeof(obj); - } - function _assertThisInitialized(self) { - if (self === void 0) { - throw new ReferenceError(\\"this hasn't been initialised - super() hasn't been called\\"); - } - return self; - } - function _possibleConstructorReturn(self, call) { - if (call && (_typeof(call) === \\"object\\" || typeof call === \\"function\\")) { - return call; - } - return _assertThisInitialized(self); - } -}, function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - __webpack_require__.d(__webpack_exports__, \\"a\\", (function() { - return _inherits; - })); - function _setPrototypeOf(o, p) { - _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { - o.__proto__ = p; - return o; - }; - return _setPrototypeOf(o, p); - } - function _inherits(subClass, superClass) { - if (typeof superClass !== \\"function\\" && superClass !== null) { - throw new TypeError(\\"Super expression must either be null or a function\\"); - } - subClass.prototype = Object.create(superClass && superClass.prototype, { - constructor: { - value: subClass, - writable: true, - configurable: true - } - }); - if (superClass) _setPrototypeOf(subClass, superClass); - } -} ] ]); -" -`; - -exports[`sass should set global sass content with source & dir 1`] = `15`; - -exports[`sass should set global sass content with source & dir 2`] = ` -" -/** filePath: dist/app.js **/ -require(\\"./runtime\\"); - -require(\\"./common\\"); - -require(\\"./vendors\\"); - -require(\\"./taro\\"); - -(wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 4 ], { - 11: function(module, exports, __webpack_require__) {}, - 14: function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - __webpack_require__.r(__webpack_exports__); - var taro_runtime = __webpack_require__(1); - var classCallCheck = __webpack_require__(2); - var createClass = __webpack_require__(3); - var possibleConstructorReturn = __webpack_require__(5); - var getPrototypeOf = __webpack_require__(4); - var inherits = __webpack_require__(6); - var react = __webpack_require__(0); - var app = __webpack_require__(11); - var app_App = function(_Component) { - Object(inherits[\\"a\\"])(App, _Component); - function App() { - Object(classCallCheck[\\"a\\"])(this, App); - return Object(possibleConstructorReturn[\\"a\\"])(this, Object(getPrototypeOf[\\"a\\"])(App).apply(this, arguments)); - } - Object(createClass[\\"a\\"])(App, [ { - key: \\"componentDidMount\\", - value: function componentDidMount() {} - }, { - key: \\"componentDidShow\\", - value: function componentDidShow() {} - }, { - key: \\"componentDidHide\\", - value: function componentDidHide() {} - }, { - key: \\"componentDidCatchError\\", - value: function componentDidCatchError() {} - }, { - key: \\"render\\", - value: function render() { - return this.props.children; - } - } ]); - return App; - }(react[\\"Component\\"]); - var lib_src_app = app_App; - var taro_react = __webpack_require__(8); - var config = { - pages: [ \\"pages/index/index\\" ], - window: { - backgroundTextStyle: \\"light\\", - navigationBarBackgroundColor: \\"#fff\\", - navigationBarTitleText: \\"WeChat\\", - navigationBarTextStyle: \\"black\\" - } - }; - taro_runtime[\\"window\\"].__taroAppConfig = config; - var inst = App(Object(taro_runtime[\\"createReactApp\\"])(lib_src_app, react, taro_react[\\"a\\"], config)); - } -}, [ [ 14, 0, 1, 3, 2 ] ] ]); - - - -/** filePath: dist/app.json **/ -{\\"pages\\":[\\"pages/index/index\\"],\\"window\\":{\\"backgroundTextStyle\\":\\"light\\",\\"navigationBarBackgroundColor\\":\\"#fff\\",\\"navigationBarTitleText\\":\\"WeChat\\",\\"navigationBarTextStyle\\":\\"black\\"}} - -/** filePath: dist/app.wxss **/ -.body{background-color:#00f} - -/** filePath: dist/base.wxml **/ - - - - - - - - -- - - - -- - -- - - - -- - -- - - - -- - -- - - - -- - -{{i.v}} - - - - - - - -- - - - -- - -- - - - -- - -- - - - - - - - -- - -- - - - -- - -- - - - -- - -- - - - - - - - -- - -- - - - -- - -- - - - -- - -- - - - - - - - -- - -- - - - -- - -- - - - - - - - -- - -- - - - -- - -- - - - - - - - -- - -- - - - -- - -- - - - - - - - -- - -- - - - -- - -- - - - - - - - -- - -- - - - -- - -- - - - - - - - -- - -- - - - -- - -- - - - - - - - -- - -- - - - -- - -- - - - - - - - -- - -- - - - -- - -- - - - - - - - -- - -- - - - -- - -- - - - - - - - -- - -- - - - -- - -- - - - - - - - -- - -- - - - -- - -- - - - - - - - -- - -- - - -/** filePath: dist/common.js **/ -(wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 2 ], [ function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - __webpack_require__.r(__webpack_exports__); - __webpack_exports__[\\"default\\"] = \\"react-mock\\"; -} ] ]); - -/** filePath: dist/comp.js **/ -(wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 6 ], { - 12: function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - __webpack_require__.r(__webpack_exports__); - var _tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1); - Component(Object(_tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__[\\"createRecursiveComponentConfig\\"])()); - } -}, [ [ 12, 0, 1 ] ] ]); - -/** filePath: dist/comp.json **/ -{\\"component\\":true,\\"usingComponents\\":{\\"comp\\":\\"./comp\\"}} - -/** filePath: dist/comp.wxml **/ - - - -/** filePath: dist/pages/index/index.js **/ -(wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 7 ], { - 13: function(module, exports, __webpack_require__) {}, - 15: function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - __webpack_require__.r(__webpack_exports__); - var taro_runtime = __webpack_require__(1); - var classCallCheck = __webpack_require__(2); - var createClass = __webpack_require__(3); - var possibleConstructorReturn = __webpack_require__(5); - var getPrototypeOf = __webpack_require__(4); - var inherits = __webpack_require__(6); - var react = __webpack_require__(0); - var taro_components = __webpack_require__(7); - var index = __webpack_require__(13); - var index_Index = function(_Component) { - Object(inherits[\\"a\\"])(Index, _Component); - function Index() { - Object(classCallCheck[\\"a\\"])(this, Index); - return Object(possibleConstructorReturn[\\"a\\"])(this, Object(getPrototypeOf[\\"a\\"])(Index).apply(this, arguments)); - } - Object(createClass[\\"a\\"])(Index, [ { - key: \\"componentDidMount\\", - value: function componentDidMount() {} - }, { - key: \\"componentWillUnmount\\", - value: function componentWillUnmount() {} - }, { - key: \\"componentDidShow\\", - value: function componentDidShow() {} - }, { - key: \\"componentDidHide\\", - value: function componentDidHide() {} - }, { - key: \\"render\\", - value: function render() { - return react[\\"default\\"].createElement(taro_components[\\"View\\"], { - className: \\"index\\" - }, react[\\"default\\"].createElement(taro_components[\\"Text\\"], null, \\"Hello world!\\")); - } - } ]); - return Index; - }(react[\\"Component\\"]); - var config = { - navigationBarTitleText: \\"\\\\u9996\\\\u9875\\" - }; - var inst = Page(Object(taro_runtime[\\"createPageConfig\\"])(index_Index, \\"pages/index/index\\", {}, config || {})); - } -}, [ [ 15, 0, 1, 3, 2 ] ] ]); - -/** filePath: dist/pages/index/index.json **/ -{\\"navigationBarTitleText\\":\\"首页\\",\\"usingComponents\\":{\\"comp\\":\\"../../comp\\"}} - -/** filePath: dist/pages/index/index.wxml **/ - - - -/** filePath: dist/pages/index/index.wxss **/ -.body{background-color:#00f}.index{width:100%}.index .list{display:flex}.index .list .list-item{width:20rpx} - -/** filePath: dist/runtime.js **/ -(function(modules) { - function webpackJsonpCallback(data) { - var chunkIds = data[0]; - var moreModules = data[1]; - var executeModules = data[2]; - var moduleId, chunkId, i = 0, resolves = []; - for (;i < chunkIds.length; i++) { - chunkId = chunkIds[i]; - if (Object.prototype.hasOwnProperty.call(installedChunks, chunkId) && installedChunks[chunkId]) { - resolves.push(installedChunks[chunkId][0]); - } - installedChunks[chunkId] = 0; - } - for (moduleId in moreModules) { - if (Object.prototype.hasOwnProperty.call(moreModules, moduleId)) { - modules[moduleId] = moreModules[moduleId]; - } - } - if (parentJsonpFunction) parentJsonpFunction(data); - while (resolves.length) { - resolves.shift()(); - } - deferredModules.push.apply(deferredModules, executeModules || []); - return checkDeferredModules(); - } - function checkDeferredModules() { - var result; - for (var i = 0; i < deferredModules.length; i++) { - var deferredModule = deferredModules[i]; - var fulfilled = true; - for (var j = 1; j < deferredModule.length; j++) { - var depId = deferredModule[j]; - if (installedChunks[depId] !== 0) fulfilled = false; - } - if (fulfilled) { - deferredModules.splice(i--, 1); - result = __webpack_require__(__webpack_require__.s = deferredModule[0]); - } - } - return result; - } - var installedModules = {}; - var installedChunks = { - 0: 0 - }; - var deferredModules = []; - function __webpack_require__(moduleId) { - if (installedModules[moduleId]) { - return installedModules[moduleId].exports; - } - var module = installedModules[moduleId] = { - i: moduleId, - l: false, - exports: {} - }; - modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); - module.l = true; - return module.exports; - } - __webpack_require__.m = modules; - __webpack_require__.c = installedModules; - __webpack_require__.d = function(exports, name, getter) { - if (!__webpack_require__.o(exports, name)) { - Object.defineProperty(exports, name, { - enumerable: true, - get: getter - }); - } - }; - __webpack_require__.r = function(exports) { - if (typeof Symbol !== \\"undefined\\" && Symbol.toStringTag) { - Object.defineProperty(exports, Symbol.toStringTag, { - value: \\"Module\\" - }); - } - Object.defineProperty(exports, \\"__esModule\\", { - value: true - }); - }; - __webpack_require__.t = function(value, mode) { - if (mode & 1) value = __webpack_require__(value); - if (mode & 8) return value; - if (mode & 4 && typeof value === \\"object\\" && value && value.__esModule) return value; - var ns = Object.create(null); - __webpack_require__.r(ns); - Object.defineProperty(ns, \\"default\\", { - enumerable: true, - value: value - }); - if (mode & 2 && typeof value != \\"string\\") for (var key in value) __webpack_require__.d(ns, key, function(key) { - return value[key]; - }.bind(null, key)); - return ns; - }; - __webpack_require__.n = function(module) { - var getter = module && module.__esModule ? function getDefault() { - return module[\\"default\\"]; - } : function getModuleExports() { - return module; - }; - __webpack_require__.d(getter, \\"a\\", getter); - return getter; - }; - __webpack_require__.o = function(object, property) { - return Object.prototype.hasOwnProperty.call(object, property); - }; - __webpack_require__.p = \\"/\\"; - var jsonpArray = wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []; - var oldJsonpFunction = jsonpArray.push.bind(jsonpArray); - jsonpArray.push = webpackJsonpCallback; - jsonpArray = jsonpArray.slice(); - for (var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]); - var parentJsonpFunction = oldJsonpFunction; - checkDeferredModules(); -})([]); - -/** filePath: dist/taro.js **/ -(wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 1 ], { - 1: function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - var _unused_webpack_default_export = \\"taro-runtime-mock\\"; - }, - 7: function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - var _unused_webpack_default_export = \\"taro-components-mock\\"; - }, - 8: function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - __webpack_exports__[\\"a\\"] = \\"taro-react-mock\\"; - } -} ]); - -/** filePath: dist/vendors.js **/ -(wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 3 ], [ , , function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - __webpack_require__.d(__webpack_exports__, \\"a\\", (function() { - return _classCallCheck; - })); - function _classCallCheck(instance, Constructor) { - if (!(instance instanceof Constructor)) { - throw new TypeError(\\"Cannot call a class as a function\\"); - } - } -}, function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - __webpack_require__.d(__webpack_exports__, \\"a\\", (function() { - return _createClass; - })); - function _defineProperties(target, props) { - for (var i = 0; i < props.length; i++) { - var descriptor = props[i]; - descriptor.enumerable = descriptor.enumerable || false; - descriptor.configurable = true; - if (\\"value\\" in descriptor) descriptor.writable = true; - Object.defineProperty(target, descriptor.key, descriptor); - } - } - function _createClass(Constructor, protoProps, staticProps) { - if (protoProps) _defineProperties(Constructor.prototype, protoProps); - if (staticProps) _defineProperties(Constructor, staticProps); - return Constructor; - } -}, function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - __webpack_require__.d(__webpack_exports__, \\"a\\", (function() { - return _getPrototypeOf; - })); - function _getPrototypeOf(o) { - _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { - return o.__proto__ || Object.getPrototypeOf(o); - }; - return _getPrototypeOf(o); - } -}, function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - __webpack_require__.d(__webpack_exports__, \\"a\\", (function() { - return _possibleConstructorReturn; - })); - function _typeof(obj) { - \\"@babel/helpers - typeof\\"; - if (typeof Symbol === \\"function\\" && typeof Symbol.iterator === \\"symbol\\") { - _typeof = function _typeof(obj) { - return typeof obj; - }; - } else { - _typeof = function _typeof(obj) { - return obj && typeof Symbol === \\"function\\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \\"symbol\\" : typeof obj; - }; - } - return _typeof(obj); - } - function _assertThisInitialized(self) { - if (self === void 0) { - throw new ReferenceError(\\"this hasn't been initialised - super() hasn't been called\\"); - } - return self; - } - function _possibleConstructorReturn(self, call) { - if (call && (_typeof(call) === \\"object\\" || typeof call === \\"function\\")) { - return call; - } - return _assertThisInitialized(self); - } -}, function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - __webpack_require__.d(__webpack_exports__, \\"a\\", (function() { - return _inherits; - })); - function _setPrototypeOf(o, p) { - _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { - o.__proto__ = p; - return o; - }; - return _setPrototypeOf(o, p); - } - function _inherits(subClass, superClass) { - if (typeof superClass !== \\"function\\" && superClass !== null) { - throw new TypeError(\\"Super expression must either be null or a function\\"); - } - subClass.prototype = Object.create(superClass && superClass.prototype, { - constructor: { - value: subClass, - writable: true, - configurable: true - } - }); - if (superClass) _setPrototypeOf(subClass, superClass); - } -} ] ]); -" -`; - -exports[`sass should set global sass content with source 1`] = `15`; - -exports[`sass should set global sass content with source 2`] = ` -" -/** filePath: dist/app.js **/ -require(\\"./runtime\\"); - -require(\\"./common\\"); - -require(\\"./vendors\\"); - -require(\\"./taro\\"); - -(wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 4 ], { - 11: function(module, exports, __webpack_require__) {}, - 14: function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - __webpack_require__.r(__webpack_exports__); - var taro_runtime = __webpack_require__(1); - var classCallCheck = __webpack_require__(2); - var createClass = __webpack_require__(3); - var possibleConstructorReturn = __webpack_require__(5); - var getPrototypeOf = __webpack_require__(4); - var inherits = __webpack_require__(6); - var react = __webpack_require__(0); - var app = __webpack_require__(11); - var app_App = function(_Component) { - Object(inherits[\\"a\\"])(App, _Component); - function App() { - Object(classCallCheck[\\"a\\"])(this, App); - return Object(possibleConstructorReturn[\\"a\\"])(this, Object(getPrototypeOf[\\"a\\"])(App).apply(this, arguments)); - } - Object(createClass[\\"a\\"])(App, [ { - key: \\"componentDidMount\\", - value: function componentDidMount() {} - }, { - key: \\"componentDidShow\\", - value: function componentDidShow() {} - }, { - key: \\"componentDidHide\\", - value: function componentDidHide() {} - }, { - key: \\"componentDidCatchError\\", - value: function componentDidCatchError() {} - }, { - key: \\"render\\", - value: function render() { - return this.props.children; - } - } ]); - return App; - }(react[\\"Component\\"]); - var lib_src_app = app_App; - var taro_react = __webpack_require__(8); - var config = { - pages: [ \\"pages/index/index\\" ], - window: { - backgroundTextStyle: \\"light\\", - navigationBarBackgroundColor: \\"#fff\\", - navigationBarTitleText: \\"WeChat\\", - navigationBarTextStyle: \\"black\\" - } - }; - taro_runtime[\\"window\\"].__taroAppConfig = config; - var inst = App(Object(taro_runtime[\\"createReactApp\\"])(lib_src_app, react, taro_react[\\"a\\"], config)); - } -}, [ [ 14, 0, 1, 3, 2 ] ] ]); - - - -/** filePath: dist/app.json **/ -{\\"pages\\":[\\"pages/index/index\\"],\\"window\\":{\\"backgroundTextStyle\\":\\"light\\",\\"navigationBarBackgroundColor\\":\\"#fff\\",\\"navigationBarTitleText\\":\\"WeChat\\",\\"navigationBarTextStyle\\":\\"black\\"}} - -/** filePath: dist/app.wxss **/ -.body{background-color:#00f} - -/** filePath: dist/base.wxml **/ - - - - - - - - -- - - - -- - -- - - - -- - -- - - - -- - -- - - - -- - -{{i.v}} - - - - - - - -- - - - -- - -- - - - -- - -- - - - - - - - -- - -- - - - -- - -- - - - -- - -- - - - - - - - -- - -- - - - -- - -- - - - -- - -- - - - - - - - -- - -- - - - -- - -- - - - - - - - -- - -- - - - -- - -- - - - - - - - -- - -- - - - -- - -- - - - - - - - -- - -- - - - -- - -- - - - - - - - -- - -- - - - -- - -- - - - - - - - -- - -- - - - -- - -- - - - - - - - -- - -- - - - -- - -- - - - - - - - -- - -- - - - -- - -- - - - - - - - -- - -- - - - -- - -- - - - - - - - -- - -- - - - -- - -- - - - - - - - -- - -- - - - -- - -- - - - - - - - -- - -- - - -/** filePath: dist/common.js **/ -(wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 2 ], [ function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - __webpack_require__.r(__webpack_exports__); - __webpack_exports__[\\"default\\"] = \\"react-mock\\"; -} ] ]); - -/** filePath: dist/comp.js **/ -(wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 6 ], { - 12: function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - __webpack_require__.r(__webpack_exports__); - var _tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1); - Component(Object(_tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__[\\"createRecursiveComponentConfig\\"])()); - } -}, [ [ 12, 0, 1 ] ] ]); - -/** filePath: dist/comp.json **/ -{\\"component\\":true,\\"usingComponents\\":{\\"comp\\":\\"./comp\\"}} - -/** filePath: dist/comp.wxml **/ - - - -/** filePath: dist/pages/index/index.js **/ -(wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 7 ], { - 13: function(module, exports, __webpack_require__) {}, - 15: function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - __webpack_require__.r(__webpack_exports__); - var taro_runtime = __webpack_require__(1); - var classCallCheck = __webpack_require__(2); - var createClass = __webpack_require__(3); - var possibleConstructorReturn = __webpack_require__(5); - var getPrototypeOf = __webpack_require__(4); - var inherits = __webpack_require__(6); - var react = __webpack_require__(0); - var taro_components = __webpack_require__(7); - var index = __webpack_require__(13); - var index_Index = function(_Component) { - Object(inherits[\\"a\\"])(Index, _Component); - function Index() { - Object(classCallCheck[\\"a\\"])(this, Index); - return Object(possibleConstructorReturn[\\"a\\"])(this, Object(getPrototypeOf[\\"a\\"])(Index).apply(this, arguments)); - } - Object(createClass[\\"a\\"])(Index, [ { - key: \\"componentDidMount\\", - value: function componentDidMount() {} - }, { - key: \\"componentWillUnmount\\", - value: function componentWillUnmount() {} - }, { - key: \\"componentDidShow\\", - value: function componentDidShow() {} - }, { - key: \\"componentDidHide\\", - value: function componentDidHide() {} - }, { - key: \\"render\\", - value: function render() { - return react[\\"default\\"].createElement(taro_components[\\"View\\"], { - className: \\"index\\" - }, react[\\"default\\"].createElement(taro_components[\\"Text\\"], null, \\"Hello world!\\")); - } - } ]); - return Index; - }(react[\\"Component\\"]); - var config = { - navigationBarTitleText: \\"\\\\u9996\\\\u9875\\" - }; - var inst = Page(Object(taro_runtime[\\"createPageConfig\\"])(index_Index, \\"pages/index/index\\", {}, config || {})); - } -}, [ [ 15, 0, 1, 3, 2 ] ] ]); - -/** filePath: dist/pages/index/index.json **/ -{\\"navigationBarTitleText\\":\\"首页\\",\\"usingComponents\\":{\\"comp\\":\\"../../comp\\"}} - -/** filePath: dist/pages/index/index.wxml **/ - - - -/** filePath: dist/pages/index/index.wxss **/ -.body{background-color:#00f}.index{width:100%}.index .list{display:flex}.index .list .list-item{width:20rpx} - -/** filePath: dist/runtime.js **/ -(function(modules) { - function webpackJsonpCallback(data) { - var chunkIds = data[0]; - var moreModules = data[1]; - var executeModules = data[2]; - var moduleId, chunkId, i = 0, resolves = []; - for (;i < chunkIds.length; i++) { - chunkId = chunkIds[i]; - if (Object.prototype.hasOwnProperty.call(installedChunks, chunkId) && installedChunks[chunkId]) { - resolves.push(installedChunks[chunkId][0]); - } - installedChunks[chunkId] = 0; - } - for (moduleId in moreModules) { - if (Object.prototype.hasOwnProperty.call(moreModules, moduleId)) { - modules[moduleId] = moreModules[moduleId]; - } - } - if (parentJsonpFunction) parentJsonpFunction(data); - while (resolves.length) { - resolves.shift()(); - } - deferredModules.push.apply(deferredModules, executeModules || []); - return checkDeferredModules(); - } - function checkDeferredModules() { - var result; - for (var i = 0; i < deferredModules.length; i++) { - var deferredModule = deferredModules[i]; - var fulfilled = true; - for (var j = 1; j < deferredModule.length; j++) { - var depId = deferredModule[j]; - if (installedChunks[depId] !== 0) fulfilled = false; - } - if (fulfilled) { - deferredModules.splice(i--, 1); - result = __webpack_require__(__webpack_require__.s = deferredModule[0]); - } - } - return result; - } - var installedModules = {}; - var installedChunks = { - 0: 0 - }; - var deferredModules = []; - function __webpack_require__(moduleId) { - if (installedModules[moduleId]) { - return installedModules[moduleId].exports; - } - var module = installedModules[moduleId] = { - i: moduleId, - l: false, - exports: {} - }; - modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); - module.l = true; - return module.exports; - } - __webpack_require__.m = modules; - __webpack_require__.c = installedModules; - __webpack_require__.d = function(exports, name, getter) { - if (!__webpack_require__.o(exports, name)) { - Object.defineProperty(exports, name, { - enumerable: true, - get: getter - }); - } - }; - __webpack_require__.r = function(exports) { - if (typeof Symbol !== \\"undefined\\" && Symbol.toStringTag) { - Object.defineProperty(exports, Symbol.toStringTag, { - value: \\"Module\\" - }); - } - Object.defineProperty(exports, \\"__esModule\\", { - value: true - }); - }; - __webpack_require__.t = function(value, mode) { - if (mode & 1) value = __webpack_require__(value); - if (mode & 8) return value; - if (mode & 4 && typeof value === \\"object\\" && value && value.__esModule) return value; - var ns = Object.create(null); - __webpack_require__.r(ns); - Object.defineProperty(ns, \\"default\\", { - enumerable: true, - value: value - }); - if (mode & 2 && typeof value != \\"string\\") for (var key in value) __webpack_require__.d(ns, key, function(key) { - return value[key]; - }.bind(null, key)); - return ns; - }; - __webpack_require__.n = function(module) { - var getter = module && module.__esModule ? function getDefault() { - return module[\\"default\\"]; - } : function getModuleExports() { - return module; - }; - __webpack_require__.d(getter, \\"a\\", getter); - return getter; - }; - __webpack_require__.o = function(object, property) { - return Object.prototype.hasOwnProperty.call(object, property); - }; - __webpack_require__.p = \\"/\\"; - var jsonpArray = wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []; - var oldJsonpFunction = jsonpArray.push.bind(jsonpArray); - jsonpArray.push = webpackJsonpCallback; - jsonpArray = jsonpArray.slice(); - for (var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]); - var parentJsonpFunction = oldJsonpFunction; - checkDeferredModules(); -})([]); - -/** filePath: dist/taro.js **/ -(wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 1 ], { - 1: function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - var _unused_webpack_default_export = \\"taro-runtime-mock\\"; - }, - 7: function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - var _unused_webpack_default_export = \\"taro-components-mock\\"; - }, - 8: function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - __webpack_exports__[\\"a\\"] = \\"taro-react-mock\\"; - } -} ]); - -/** filePath: dist/vendors.js **/ -(wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 3 ], [ , , function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - __webpack_require__.d(__webpack_exports__, \\"a\\", (function() { - return _classCallCheck; - })); - function _classCallCheck(instance, Constructor) { - if (!(instance instanceof Constructor)) { - throw new TypeError(\\"Cannot call a class as a function\\"); - } - } -}, function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - __webpack_require__.d(__webpack_exports__, \\"a\\", (function() { - return _createClass; - })); - function _defineProperties(target, props) { - for (var i = 0; i < props.length; i++) { - var descriptor = props[i]; - descriptor.enumerable = descriptor.enumerable || false; - descriptor.configurable = true; - if (\\"value\\" in descriptor) descriptor.writable = true; - Object.defineProperty(target, descriptor.key, descriptor); - } - } - function _createClass(Constructor, protoProps, staticProps) { - if (protoProps) _defineProperties(Constructor.prototype, protoProps); - if (staticProps) _defineProperties(Constructor, staticProps); - return Constructor; - } -}, function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - __webpack_require__.d(__webpack_exports__, \\"a\\", (function() { - return _getPrototypeOf; - })); - function _getPrototypeOf(o) { - _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { - return o.__proto__ || Object.getPrototypeOf(o); - }; - return _getPrototypeOf(o); - } -}, function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - __webpack_require__.d(__webpack_exports__, \\"a\\", (function() { - return _possibleConstructorReturn; - })); - function _typeof(obj) { - \\"@babel/helpers - typeof\\"; - if (typeof Symbol === \\"function\\" && typeof Symbol.iterator === \\"symbol\\") { - _typeof = function _typeof(obj) { - return typeof obj; - }; - } else { - _typeof = function _typeof(obj) { - return obj && typeof Symbol === \\"function\\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \\"symbol\\" : typeof obj; - }; - } - return _typeof(obj); - } - function _assertThisInitialized(self) { - if (self === void 0) { - throw new ReferenceError(\\"this hasn't been initialised - super() hasn't been called\\"); - } - return self; - } - function _possibleConstructorReturn(self, call) { - if (call && (_typeof(call) === \\"object\\" || typeof call === \\"function\\")) { - return call; - } - return _assertThisInitialized(self); - } -}, function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - __webpack_require__.d(__webpack_exports__, \\"a\\", (function() { - return _inherits; - })); - function _setPrototypeOf(o, p) { - _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { - o.__proto__ = p; - return o; - }; - return _setPrototypeOf(o, p); - } - function _inherits(subClass, superClass) { - if (typeof superClass !== \\"function\\" && superClass !== null) { - throw new TypeError(\\"Super expression must either be null or a function\\"); - } - subClass.prototype = Object.create(superClass && superClass.prototype, { - constructor: { - value: subClass, - writable: true, - configurable: true - } - }); - if (superClass) _setPrototypeOf(subClass, superClass); - } -} ] ]); -" -`; diff --git a/packages/taro-mini-runner/__tests__/__snapshots__/subpackages.spec.ts.snap b/packages/taro-mini-runner/__tests__/__snapshots__/subpackages.spec.ts.snap deleted file mode 100644 index 4cfa1c6cb801..000000000000 --- a/packages/taro-mini-runner/__tests__/__snapshots__/subpackages.spec.ts.snap +++ /dev/null @@ -1,873 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`subpackages should process subpackages 1`] = `22`; - -exports[`subpackages should process subpackages 2`] = ` -" -/** filePath: dist/app.js **/ -require(\\"./runtime\\"); - -require(\\"./common\\"); - -require(\\"./vendors\\"); - -require(\\"./taro\\"); - -(wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 5 ], { - 14: function(module, exports, __webpack_require__) {}, - 18: function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - __webpack_require__.r(__webpack_exports__); - var taro_runtime = __webpack_require__(1); - var classCallCheck = __webpack_require__(3); - var createClass = __webpack_require__(4); - var possibleConstructorReturn = __webpack_require__(6); - var getPrototypeOf = __webpack_require__(5); - var inherits = __webpack_require__(7); - var react = __webpack_require__(0); - var app = __webpack_require__(14); - var app_App = function(_Component) { - Object(inherits[\\"a\\"])(App, _Component); - function App() { - Object(classCallCheck[\\"a\\"])(this, App); - return Object(possibleConstructorReturn[\\"a\\"])(this, Object(getPrototypeOf[\\"a\\"])(App).apply(this, arguments)); - } - Object(createClass[\\"a\\"])(App, [ { - key: \\"componentDidMount\\", - value: function componentDidMount() {} - }, { - key: \\"componentDidShow\\", - value: function componentDidShow() {} - }, { - key: \\"componentDidHide\\", - value: function componentDidHide() {} - }, { - key: \\"componentDidCatchError\\", - value: function componentDidCatchError() {} - }, { - key: \\"render\\", - value: function render() { - return this.props.children; - } - } ]); - return App; - }(react[\\"Component\\"]); - var lib_src_app = app_App; - var taro_react = __webpack_require__(9); - var config = { - pages: [ \\"pages/index/index\\" ], - window: { - backgroundTextStyle: \\"light\\", - navigationBarBackgroundColor: \\"#fff\\", - navigationBarTitleText: \\"WeChat\\", - navigationBarTextStyle: \\"black\\" - }, - subpackages: [ { - root: \\"packageA\\", - pages: [ \\"detail/index\\", \\"my/index\\" ] - } ] - }; - taro_runtime[\\"window\\"].__taroAppConfig = config; - var inst = App(Object(taro_runtime[\\"createReactApp\\"])(lib_src_app, react, taro_react[\\"a\\"], config)); - } -}, [ [ 18, 0, 1, 3, 2 ] ] ]); - - - -/** filePath: dist/app.json **/ -{\\"pages\\":[\\"pages/index/index\\"],\\"window\\":{\\"backgroundTextStyle\\":\\"light\\",\\"navigationBarBackgroundColor\\":\\"#fff\\",\\"navigationBarTitleText\\":\\"WeChat\\",\\"navigationBarTextStyle\\":\\"black\\"},\\"subpackages\\":[{\\"root\\":\\"packageA\\",\\"pages\\":[\\"detail/index\\",\\"my/index\\"]}]} - -/** filePath: dist/app.wxss **/ - - -/** filePath: dist/base.wxml **/ - - - - - - - - -- - - - -- - -- - - - -- - -- - - - -- - -- - - - -- - -{{i.v}} - - - - - - - -- - - - -- - -- - - - -- - -- - - - - - - - -- - -- - - - -- - -- - - - -- - -- - - - - - - - -- - -- - - - -- - -- - - - -- - -- - - - - - - - -- - -- - - - -- - -- - - - - - - - -- - -- - - - -- - -- - - - - - - - -- - -- - - - -- - -- - - - - - - - -- - -- - - - -- - -- - - - - - - - -- - -- - - - -- - -- - - - - - - - -- - -- - - - -- - -- - - - - - - - -- - -- - - - -- - -- - - - - - - - -- - -- - - - -- - -- - - - - - - - -- - -- - - - -- - -- - - - - - - - -- - -- - - - -- - -- - - - - - - - -- - -- - - - -- - -- - - - - - - - -- - -- - - -/** filePath: dist/common.js **/ -(wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 2 ], [ function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - __webpack_require__.r(__webpack_exports__); - __webpack_exports__[\\"default\\"] = \\"react-mock\\"; -} ] ]); - -/** filePath: dist/comp.js **/ -(wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 7 ], { - 15: function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - __webpack_require__.r(__webpack_exports__); - var _tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1); - Component(Object(_tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__[\\"createRecursiveComponentConfig\\"])()); - } -}, [ [ 15, 0, 1 ] ] ]); - -/** filePath: dist/comp.json **/ -{\\"component\\":true,\\"usingComponents\\":{\\"comp\\":\\"./comp\\"}} - -/** filePath: dist/comp.wxml **/ - - - -/** filePath: dist/packageA/detail/index.js **/ -require(\\"../../sub-utils\\"); - -(wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 8 ], { - 16: function(module, exports, __webpack_require__) {}, - 19: function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - __webpack_require__.r(__webpack_exports__); - var taro_runtime = __webpack_require__(1); - var classCallCheck = __webpack_require__(3); - var createClass = __webpack_require__(4); - var possibleConstructorReturn = __webpack_require__(6); - var getPrototypeOf = __webpack_require__(5); - var inherits = __webpack_require__(7); - var react = __webpack_require__(0); - var taro_components = __webpack_require__(2); - var common = __webpack_require__(8); - var detail = __webpack_require__(16); - var detail_Detail = function(_Component) { - Object(inherits[\\"a\\"])(Detail, _Component); - function Detail() { - Object(classCallCheck[\\"a\\"])(this, Detail); - return Object(possibleConstructorReturn[\\"a\\"])(this, Object(getPrototypeOf[\\"a\\"])(Detail).apply(this, arguments)); - } - Object(createClass[\\"a\\"])(Detail, [ { - key: \\"componentDidMount\\", - value: function componentDidMount() { - Object(common[\\"a\\"])(\\"detail\\"); - } - }, { - key: \\"render\\", - value: function render() { - return react[\\"default\\"].createElement(taro_components[\\"View\\"], { - className: \\"detail\\" - }, react[\\"default\\"].createElement(taro_components[\\"Text\\"], null, \\"I m detail\\")); - } - } ]); - return Detail; - }(react[\\"Component\\"]); - var config = { - navigationBarTitleText: \\"\\\\u8be6\\\\u60c5\\\\u9875\\" - }; - var inst = Page(Object(taro_runtime[\\"createPageConfig\\"])(detail_Detail, \\"packageA/detail/index\\", {}, config || {})); - } -}, [ [ 19, 0, 4, 1, 3, 2 ] ] ]); - - - -/** filePath: dist/packageA/detail/index.json **/ -{\\"navigationBarTitleText\\":\\"详情页\\",\\"usingComponents\\":{\\"comp\\":\\"../../comp\\"}} - -/** filePath: dist/packageA/detail/index.wxml **/ - - - -/** filePath: dist/packageA/detail/index.wxss **/ -.detail{width:100%;height:100%} - -/** filePath: dist/packageA/my/index.js **/ -require(\\"../../sub-utils\\"); - -(wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 10 ], { - 20: function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - __webpack_require__.r(__webpack_exports__); - var taro_runtime = __webpack_require__(1); - var classCallCheck = __webpack_require__(3); - var createClass = __webpack_require__(4); - var possibleConstructorReturn = __webpack_require__(6); - var getPrototypeOf = __webpack_require__(5); - var inherits = __webpack_require__(7); - var react = __webpack_require__(0); - var taro_components = __webpack_require__(2); - var common = __webpack_require__(8); - var my_My = function(_Component) { - Object(inherits[\\"a\\"])(My, _Component); - function My() { - Object(classCallCheck[\\"a\\"])(this, My); - return Object(possibleConstructorReturn[\\"a\\"])(this, Object(getPrototypeOf[\\"a\\"])(My).apply(this, arguments)); - } - Object(createClass[\\"a\\"])(My, [ { - key: \\"componentDidMount\\", - value: function componentDidMount() { - Object(common[\\"a\\"])(\\"my\\"); - } - }, { - key: \\"render\\", - value: function render() { - return react[\\"default\\"].createElement(taro_components[\\"View\\"], null, react[\\"default\\"].createElement(taro_components[\\"Text\\"], null, \\"I m my\\")); - } - } ]); - return My; - }(react[\\"Component\\"]); - var config = { - navigationBarTitleText: \\"\\\\u4e2a\\\\u4eba\\\\u4e2d\\\\u5fc3\\\\u9875\\" - }; - var inst = Page(Object(taro_runtime[\\"createPageConfig\\"])(my_My, \\"packageA/my/index\\", {}, config || {})); - } -}, [ [ 20, 0, 4, 1, 3, 2 ] ] ]); - - - -/** filePath: dist/packageA/my/index.json **/ -{\\"navigationBarTitleText\\":\\"个人中心页\\",\\"usingComponents\\":{\\"comp\\":\\"../../comp\\"}} - -/** filePath: dist/packageA/my/index.wxml **/ - - - -/** filePath: dist/pages/index/index.js **/ -(wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 12 ], { - 17: function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - __webpack_require__.r(__webpack_exports__); - var taro_runtime = __webpack_require__(1); - var classCallCheck = __webpack_require__(3); - var createClass = __webpack_require__(4); - var possibleConstructorReturn = __webpack_require__(6); - var getPrototypeOf = __webpack_require__(5); - var inherits = __webpack_require__(7); - var react = __webpack_require__(0); - var taro_components = __webpack_require__(2); - var taro = \\"taro\\"; - var index_Index = function(_Component) { - Object(inherits[\\"a\\"])(Index, _Component); - function Index() { - Object(classCallCheck[\\"a\\"])(this, Index); - return Object(possibleConstructorReturn[\\"a\\"])(this, Object(getPrototypeOf[\\"a\\"])(Index).apply(this, arguments)); - } - Object(createClass[\\"a\\"])(Index, [ { - key: \\"render\\", - value: function render() { - return react[\\"default\\"].createElement(taro_components[\\"View\\"], { - className: \\"index\\" - }, react[\\"default\\"].createElement(taro_components[\\"View\\"], { - onClick: function onClick() { - return taro.navigateTo({ - url: \\"/packageA/detail/index\\" - }); - } - }, \\"Go to detail\\"), react[\\"default\\"].createElement(taro_components[\\"View\\"], { - onClick: function onClick() { - return taro.navigateTo({ - url: \\"/packageA/my/index\\" - }); - } - }, \\"Go to my\\")); - } - } ]); - return Index; - }(react[\\"Component\\"]); - var config = { - navigationBarTitleText: \\"\\\\u9996\\\\u9875\\" - }; - var inst = Page(Object(taro_runtime[\\"createPageConfig\\"])(index_Index, \\"pages/index/index\\", {}, config || {})); - } -}, [ [ 17, 0, 1, 3, 2 ] ] ]); - -/** filePath: dist/pages/index/index.json **/ -{\\"navigationBarTitleText\\":\\"首页\\",\\"usingComponents\\":{\\"comp\\":\\"../../comp\\"}} - -/** filePath: dist/pages/index/index.wxml **/ - - - -/** filePath: dist/runtime.js **/ -(function(modules) { - function webpackJsonpCallback(data) { - var chunkIds = data[0]; - var moreModules = data[1]; - var executeModules = data[2]; - var moduleId, chunkId, i = 0, resolves = []; - for (;i < chunkIds.length; i++) { - chunkId = chunkIds[i]; - if (Object.prototype.hasOwnProperty.call(installedChunks, chunkId) && installedChunks[chunkId]) { - resolves.push(installedChunks[chunkId][0]); - } - installedChunks[chunkId] = 0; - } - for (moduleId in moreModules) { - if (Object.prototype.hasOwnProperty.call(moreModules, moduleId)) { - modules[moduleId] = moreModules[moduleId]; - } - } - if (parentJsonpFunction) parentJsonpFunction(data); - while (resolves.length) { - resolves.shift()(); - } - deferredModules.push.apply(deferredModules, executeModules || []); - return checkDeferredModules(); - } - function checkDeferredModules() { - var result; - for (var i = 0; i < deferredModules.length; i++) { - var deferredModule = deferredModules[i]; - var fulfilled = true; - for (var j = 1; j < deferredModule.length; j++) { - var depId = deferredModule[j]; - if (installedChunks[depId] !== 0) fulfilled = false; - } - if (fulfilled) { - deferredModules.splice(i--, 1); - result = __webpack_require__(__webpack_require__.s = deferredModule[0]); - } - } - return result; - } - var installedModules = {}; - var installedChunks = { - 0: 0 - }; - var deferredModules = []; - function __webpack_require__(moduleId) { - if (installedModules[moduleId]) { - return installedModules[moduleId].exports; - } - var module = installedModules[moduleId] = { - i: moduleId, - l: false, - exports: {} - }; - modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); - module.l = true; - return module.exports; - } - __webpack_require__.m = modules; - __webpack_require__.c = installedModules; - __webpack_require__.d = function(exports, name, getter) { - if (!__webpack_require__.o(exports, name)) { - Object.defineProperty(exports, name, { - enumerable: true, - get: getter - }); - } - }; - __webpack_require__.r = function(exports) { - if (typeof Symbol !== \\"undefined\\" && Symbol.toStringTag) { - Object.defineProperty(exports, Symbol.toStringTag, { - value: \\"Module\\" - }); - } - Object.defineProperty(exports, \\"__esModule\\", { - value: true - }); - }; - __webpack_require__.t = function(value, mode) { - if (mode & 1) value = __webpack_require__(value); - if (mode & 8) return value; - if (mode & 4 && typeof value === \\"object\\" && value && value.__esModule) return value; - var ns = Object.create(null); - __webpack_require__.r(ns); - Object.defineProperty(ns, \\"default\\", { - enumerable: true, - value: value - }); - if (mode & 2 && typeof value != \\"string\\") for (var key in value) __webpack_require__.d(ns, key, function(key) { - return value[key]; - }.bind(null, key)); - return ns; - }; - __webpack_require__.n = function(module) { - var getter = module && module.__esModule ? function getDefault() { - return module[\\"default\\"]; - } : function getModuleExports() { - return module; - }; - __webpack_require__.d(getter, \\"a\\", getter); - return getter; - }; - __webpack_require__.o = function(object, property) { - return Object.prototype.hasOwnProperty.call(object, property); - }; - __webpack_require__.p = \\"/\\"; - var jsonpArray = wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []; - var oldJsonpFunction = jsonpArray.push.bind(jsonpArray); - jsonpArray.push = webpackJsonpCallback; - jsonpArray = jsonpArray.slice(); - for (var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]); - var parentJsonpFunction = oldJsonpFunction; - checkDeferredModules(); -})([]); - -/** filePath: dist/sub-utils.js **/ -(wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 4 ], { - 8: function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - __webpack_require__.d(__webpack_exports__, \\"a\\", (function() { - return someCommon; - })); - function someCommon(text) { - console.log(\\"log something: \\", text); - } - } -} ]); - -/** filePath: dist/taro.js **/ -(wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 1 ], { - 1: function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - var _unused_webpack_default_export = \\"taro-runtime-mock\\"; - }, - 2: function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - var _unused_webpack_default_export = \\"taro-components-mock\\"; - }, - 9: function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - __webpack_exports__[\\"a\\"] = \\"taro-react-mock\\"; - } -} ]); - -/** filePath: dist/vendors.js **/ -(wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 3 ], [ , , , function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - __webpack_require__.d(__webpack_exports__, \\"a\\", (function() { - return _classCallCheck; - })); - function _classCallCheck(instance, Constructor) { - if (!(instance instanceof Constructor)) { - throw new TypeError(\\"Cannot call a class as a function\\"); - } - } -}, function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - __webpack_require__.d(__webpack_exports__, \\"a\\", (function() { - return _createClass; - })); - function _defineProperties(target, props) { - for (var i = 0; i < props.length; i++) { - var descriptor = props[i]; - descriptor.enumerable = descriptor.enumerable || false; - descriptor.configurable = true; - if (\\"value\\" in descriptor) descriptor.writable = true; - Object.defineProperty(target, descriptor.key, descriptor); - } - } - function _createClass(Constructor, protoProps, staticProps) { - if (protoProps) _defineProperties(Constructor.prototype, protoProps); - if (staticProps) _defineProperties(Constructor, staticProps); - return Constructor; - } -}, function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - __webpack_require__.d(__webpack_exports__, \\"a\\", (function() { - return _getPrototypeOf; - })); - function _getPrototypeOf(o) { - _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { - return o.__proto__ || Object.getPrototypeOf(o); - }; - return _getPrototypeOf(o); - } -}, function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - __webpack_require__.d(__webpack_exports__, \\"a\\", (function() { - return _possibleConstructorReturn; - })); - function _typeof(obj) { - \\"@babel/helpers - typeof\\"; - if (typeof Symbol === \\"function\\" && typeof Symbol.iterator === \\"symbol\\") { - _typeof = function _typeof(obj) { - return typeof obj; - }; - } else { - _typeof = function _typeof(obj) { - return obj && typeof Symbol === \\"function\\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \\"symbol\\" : typeof obj; - }; - } - return _typeof(obj); - } - function _assertThisInitialized(self) { - if (self === void 0) { - throw new ReferenceError(\\"this hasn't been initialised - super() hasn't been called\\"); - } - return self; - } - function _possibleConstructorReturn(self, call) { - if (call && (_typeof(call) === \\"object\\" || typeof call === \\"function\\")) { - return call; - } - return _assertThisInitialized(self); - } -}, function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - __webpack_require__.d(__webpack_exports__, \\"a\\", (function() { - return _inherits; - })); - function _setPrototypeOf(o, p) { - _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { - o.__proto__ = p; - return o; - }; - return _setPrototypeOf(o, p); - } - function _inherits(subClass, superClass) { - if (typeof superClass !== \\"function\\" && superClass !== null) { - throw new TypeError(\\"Super expression must either be null or a function\\"); - } - subClass.prototype = Object.create(superClass && superClass.prototype, { - constructor: { - value: subClass, - writable: true, - configurable: true - } - }); - if (superClass) _setPrototypeOf(subClass, superClass); - } -} ] ]); -" -`; diff --git a/packages/taro-mini-runner/__tests__/__snapshots__/swan.spec.ts.snap b/packages/taro-mini-runner/__tests__/__snapshots__/swan.spec.ts.snap deleted file mode 100644 index 13269613a5d3..000000000000 --- a/packages/taro-mini-runner/__tests__/__snapshots__/swan.spec.ts.snap +++ /dev/null @@ -1,1065 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`swan should build swan app 1`] = `15`; - -exports[`swan should build swan app 2`] = ` -" -/** filePath: dist/app.css **/ - - -/** filePath: dist/app.js **/ -require(\\"./runtime\\"); - -require(\\"./common\\"); - -require(\\"./vendors\\"); - -require(\\"./taro\\"); - -(swan[\\"webpackJsonp\\"] = swan[\\"webpackJsonp\\"] || []).push([ [ 4 ], { - 12: function(module, exports, __webpack_require__) {}, - 20: function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - __webpack_require__.r(__webpack_exports__); - var taro_runtime = __webpack_require__(1); - var classCallCheck = __webpack_require__(3); - var createClass = __webpack_require__(4); - var possibleConstructorReturn = __webpack_require__(6); - var getPrototypeOf = __webpack_require__(5); - var inherits = __webpack_require__(7); - var react = __webpack_require__(0); - var app = __webpack_require__(12); - var app_App = function(_Component) { - Object(inherits[\\"a\\"])(App, _Component); - function App() { - Object(classCallCheck[\\"a\\"])(this, App); - return Object(possibleConstructorReturn[\\"a\\"])(this, Object(getPrototypeOf[\\"a\\"])(App).apply(this, arguments)); - } - Object(createClass[\\"a\\"])(App, [ { - key: \\"componentDidMount\\", - value: function componentDidMount() {} - }, { - key: \\"componentDidShow\\", - value: function componentDidShow() {} - }, { - key: \\"componentDidHide\\", - value: function componentDidHide() {} - }, { - key: \\"componentDidCatchError\\", - value: function componentDidCatchError() {} - }, { - key: \\"render\\", - value: function render() { - return this.props.children; - } - } ]); - return App; - }(react[\\"Component\\"]); - var lib_src_app = app_App; - var taro_react = __webpack_require__(9); - var config = { - pages: [ \\"pages/index/index\\" ], - window: { - backgroundTextStyle: \\"light\\", - navigationBarBackgroundColor: \\"#fff\\", - navigationBarTitleText: \\"WeChat\\", - navigationBarTextStyle: \\"black\\" - } - }; - taro_runtime[\\"window\\"].__taroAppConfig = config; - var inst = App(Object(taro_runtime[\\"createReactApp\\"])(lib_src_app, react, taro_react[\\"a\\"], config)); - } -}, [ [ 20, 0, 1, 3, 2 ] ] ]); - - - -/** filePath: dist/app.json **/ -{\\"pages\\":[\\"pages/index/index\\"],\\"window\\":{\\"backgroundTextStyle\\":\\"light\\",\\"navigationBarBackgroundColor\\":\\"#fff\\",\\"navigationBarTitleText\\":\\"WeChat\\",\\"navigationBarTextStyle\\":\\"black\\"}} - -/** filePath: dist/base.swan **/ - - - - - - - - -- - - - -- - -- - - - - - - - - - - - - - - - - - - - - - - - - - - - -- -{{ i.cn[index].v }} -- - - - -- - -- - - - -- - -{{i.v}} - - - - - - - -/** filePath: dist/common.js **/ -(swan[\\"webpackJsonp\\"] = swan[\\"webpackJsonp\\"] || []).push([ [ 2 ], [ function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - __webpack_require__.r(__webpack_exports__); - __webpack_exports__[\\"default\\"] = \\"react-mock\\"; -} ] ]); - -/** filePath: dist/comp.js **/ -(swan[\\"webpackJsonp\\"] = swan[\\"webpackJsonp\\"] || []).push([ [ 6 ], { - 13: function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - __webpack_require__.r(__webpack_exports__); - var _tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1); - Component(Object(_tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__[\\"createRecursiveComponentConfig\\"])()); - } -}, [ [ 13, 0, 1 ] ] ]); - -/** filePath: dist/comp.json **/ -{\\"component\\":true,\\"usingComponents\\":{\\"comp\\":\\"./comp\\"}} - -/** filePath: dist/pages/index/index.css **/ - - -/** filePath: dist/pages/index/index.js **/ -(swan[\\"webpackJsonp\\"] = swan[\\"webpackJsonp\\"] || []).push([ [ 7 ], [ , , , , , , , , function(module, exports, __webpack_require__) { - module.exports = __webpack_require__(14); -}, , , , , , function(module, exports, __webpack_require__) { - var g = function() { - return this; - }() || Function(\\"return this\\")(); - var hadRuntime = g.regeneratorRuntime && Object.getOwnPropertyNames(g).indexOf(\\"regeneratorRuntime\\") >= 0; - var oldRuntime = hadRuntime && g.regeneratorRuntime; - g.regeneratorRuntime = undefined; - module.exports = __webpack_require__(15); - if (hadRuntime) { - g.regeneratorRuntime = oldRuntime; - } else { - try { - delete g.regeneratorRuntime; - } catch (e) { - g.regeneratorRuntime = undefined; - } - } -}, function(module, exports, __webpack_require__) { - (function(module) { - var _typeof = __webpack_require__(17); - !function(global) { - \\"use strict\\"; - var Op = Object.prototype; - var hasOwn = Op.hasOwnProperty; - var undefined; - var $Symbol = typeof Symbol === \\"function\\" ? Symbol : {}; - var iteratorSymbol = $Symbol.iterator || \\"@@iterator\\"; - var asyncIteratorSymbol = $Symbol.asyncIterator || \\"@@asyncIterator\\"; - var toStringTagSymbol = $Symbol.toStringTag || \\"@@toStringTag\\"; - var inModule = (false ? undefined : _typeof(module)) === \\"object\\"; - var runtime = global.regeneratorRuntime; - if (runtime) { - if (inModule) { - module.exports = runtime; - } - return; - } - runtime = global.regeneratorRuntime = inModule ? module.exports : {}; - function wrap(innerFn, outerFn, self, tryLocsList) { - var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator; - var generator = Object.create(protoGenerator.prototype); - var context = new Context(tryLocsList || []); - generator._invoke = makeInvokeMethod(innerFn, self, context); - return generator; - } - runtime.wrap = wrap; - function tryCatch(fn, obj, arg) { - try { - return { - type: \\"normal\\", - arg: fn.call(obj, arg) - }; - } catch (err) { - return { - type: \\"throw\\", - arg: err - }; - } - } - var GenStateSuspendedStart = \\"suspendedStart\\"; - var GenStateSuspendedYield = \\"suspendedYield\\"; - var GenStateExecuting = \\"executing\\"; - var GenStateCompleted = \\"completed\\"; - var ContinueSentinel = {}; - function Generator() {} - function GeneratorFunction() {} - function GeneratorFunctionPrototype() {} - var IteratorPrototype = {}; - IteratorPrototype[iteratorSymbol] = function() { - return this; - }; - var getProto = Object.getPrototypeOf; - var NativeIteratorPrototype = getProto && getProto(getProto(values([]))); - if (NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) { - IteratorPrototype = NativeIteratorPrototype; - } - var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); - GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype; - GeneratorFunctionPrototype.constructor = GeneratorFunction; - GeneratorFunctionPrototype[toStringTagSymbol] = GeneratorFunction.displayName = \\"GeneratorFunction\\"; - function defineIteratorMethods(prototype) { - [ \\"next\\", \\"throw\\", \\"return\\" ].forEach((function(method) { - prototype[method] = function(arg) { - return this._invoke(method, arg); - }; - })); - } - runtime.isGeneratorFunction = function(genFun) { - var ctor = typeof genFun === \\"function\\" && genFun.constructor; - return ctor ? ctor === GeneratorFunction || (ctor.displayName || ctor.name) === \\"GeneratorFunction\\" : false; - }; - runtime.mark = function(genFun) { - if (Object.setPrototypeOf) { - Object.setPrototypeOf(genFun, GeneratorFunctionPrototype); - } else { - genFun.__proto__ = GeneratorFunctionPrototype; - if (!(toStringTagSymbol in genFun)) { - genFun[toStringTagSymbol] = \\"GeneratorFunction\\"; - } - } - genFun.prototype = Object.create(Gp); - return genFun; - }; - runtime.awrap = function(arg) { - return { - __await: arg - }; - }; - function AsyncIterator(generator) { - function invoke(method, arg, resolve, reject) { - var record = tryCatch(generator[method], generator, arg); - if (record.type === \\"throw\\") { - reject(record.arg); - } else { - var result = record.arg; - var value = result.value; - if (value && _typeof(value) === \\"object\\" && hasOwn.call(value, \\"__await\\")) { - return Promise.resolve(value.__await).then((function(value) { - invoke(\\"next\\", value, resolve, reject); - }), (function(err) { - invoke(\\"throw\\", err, resolve, reject); - })); - } - return Promise.resolve(value).then((function(unwrapped) { - result.value = unwrapped; - resolve(result); - }), reject); - } - } - var previousPromise; - function enqueue(method, arg) { - function callInvokeWithMethodAndArg() { - return new Promise((function(resolve, reject) { - invoke(method, arg, resolve, reject); - })); - } - return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); - } - this._invoke = enqueue; - } - defineIteratorMethods(AsyncIterator.prototype); - AsyncIterator.prototype[asyncIteratorSymbol] = function() { - return this; - }; - runtime.AsyncIterator = AsyncIterator; - runtime.async = function(innerFn, outerFn, self, tryLocsList) { - var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList)); - return runtime.isGeneratorFunction(outerFn) ? iter : iter.next().then((function(result) { - return result.done ? result.value : iter.next(); - })); - }; - function makeInvokeMethod(innerFn, self, context) { - var state = GenStateSuspendedStart; - return function invoke(method, arg) { - if (state === GenStateExecuting) { - throw new Error(\\"Generator is already running\\"); - } - if (state === GenStateCompleted) { - if (method === \\"throw\\") { - throw arg; - } - return doneResult(); - } - context.method = method; - context.arg = arg; - while (true) { - var delegate = context.delegate; - if (delegate) { - var delegateResult = maybeInvokeDelegate(delegate, context); - if (delegateResult) { - if (delegateResult === ContinueSentinel) continue; - return delegateResult; - } - } - if (context.method === \\"next\\") { - context.sent = context._sent = context.arg; - } else if (context.method === \\"throw\\") { - if (state === GenStateSuspendedStart) { - state = GenStateCompleted; - throw context.arg; - } - context.dispatchException(context.arg); - } else if (context.method === \\"return\\") { - context.abrupt(\\"return\\", context.arg); - } - state = GenStateExecuting; - var record = tryCatch(innerFn, self, context); - if (record.type === \\"normal\\") { - state = context.done ? GenStateCompleted : GenStateSuspendedYield; - if (record.arg === ContinueSentinel) { - continue; - } - return { - value: record.arg, - done: context.done - }; - } else if (record.type === \\"throw\\") { - state = GenStateCompleted; - context.method = \\"throw\\"; - context.arg = record.arg; - } - } - }; - } - function maybeInvokeDelegate(delegate, context) { - var method = delegate.iterator[context.method]; - if (method === undefined) { - context.delegate = null; - if (context.method === \\"throw\\") { - if (delegate.iterator.return) { - context.method = \\"return\\"; - context.arg = undefined; - maybeInvokeDelegate(delegate, context); - if (context.method === \\"throw\\") { - return ContinueSentinel; - } - } - context.method = \\"throw\\"; - context.arg = new TypeError(\\"The iterator does not provide a 'throw' method\\"); - } - return ContinueSentinel; - } - var record = tryCatch(method, delegate.iterator, context.arg); - if (record.type === \\"throw\\") { - context.method = \\"throw\\"; - context.arg = record.arg; - context.delegate = null; - return ContinueSentinel; - } - var info = record.arg; - if (!info) { - context.method = \\"throw\\"; - context.arg = new TypeError(\\"iterator result is not an object\\"); - context.delegate = null; - return ContinueSentinel; - } - if (info.done) { - context[delegate.resultName] = info.value; - context.next = delegate.nextLoc; - if (context.method !== \\"return\\") { - context.method = \\"next\\"; - context.arg = undefined; - } - } else { - return info; - } - context.delegate = null; - return ContinueSentinel; - } - defineIteratorMethods(Gp); - Gp[toStringTagSymbol] = \\"Generator\\"; - Gp[iteratorSymbol] = function() { - return this; - }; - Gp.toString = function() { - return \\"[object Generator]\\"; - }; - function pushTryEntry(locs) { - var entry = { - tryLoc: locs[0] - }; - if (1 in locs) { - entry.catchLoc = locs[1]; - } - if (2 in locs) { - entry.finallyLoc = locs[2]; - entry.afterLoc = locs[3]; - } - this.tryEntries.push(entry); - } - function resetTryEntry(entry) { - var record = entry.completion || {}; - record.type = \\"normal\\"; - delete record.arg; - entry.completion = record; - } - function Context(tryLocsList) { - this.tryEntries = [ { - tryLoc: \\"root\\" - } ]; - tryLocsList.forEach(pushTryEntry, this); - this.reset(true); - } - runtime.keys = function(object) { - var keys = []; - for (var key in object) { - keys.push(key); - } - keys.reverse(); - return function next() { - while (keys.length) { - var key = keys.pop(); - if (key in object) { - next.value = key; - next.done = false; - return next; - } - } - next.done = true; - return next; - }; - }; - function values(iterable) { - if (iterable) { - var iteratorMethod = iterable[iteratorSymbol]; - if (iteratorMethod) { - return iteratorMethod.call(iterable); - } - if (typeof iterable.next === \\"function\\") { - return iterable; - } - if (!isNaN(iterable.length)) { - var i = -1, next = function next() { - while (++i < iterable.length) { - if (hasOwn.call(iterable, i)) { - next.value = iterable[i]; - next.done = false; - return next; - } - } - next.value = undefined; - next.done = true; - return next; - }; - return next.next = next; - } - } - return { - next: doneResult - }; - } - runtime.values = values; - function doneResult() { - return { - value: undefined, - done: true - }; - } - Context.prototype = { - constructor: Context, - reset: function reset(skipTempReset) { - this.prev = 0; - this.next = 0; - this.sent = this._sent = undefined; - this.done = false; - this.delegate = null; - this.method = \\"next\\"; - this.arg = undefined; - this.tryEntries.forEach(resetTryEntry); - if (!skipTempReset) { - for (var name in this) { - if (name.charAt(0) === \\"t\\" && hasOwn.call(this, name) && !isNaN(+name.slice(1))) { - this[name] = undefined; - } - } - } - }, - stop: function stop() { - this.done = true; - var rootEntry = this.tryEntries[0]; - var rootRecord = rootEntry.completion; - if (rootRecord.type === \\"throw\\") { - throw rootRecord.arg; - } - return this.rval; - }, - dispatchException: function dispatchException(exception) { - if (this.done) { - throw exception; - } - var context = this; - function handle(loc, caught) { - record.type = \\"throw\\"; - record.arg = exception; - context.next = loc; - if (caught) { - context.method = \\"next\\"; - context.arg = undefined; - } - return !!caught; - } - for (var i = this.tryEntries.length - 1; i >= 0; --i) { - var entry = this.tryEntries[i]; - var record = entry.completion; - if (entry.tryLoc === \\"root\\") { - return handle(\\"end\\"); - } - if (entry.tryLoc <= this.prev) { - var hasCatch = hasOwn.call(entry, \\"catchLoc\\"); - var hasFinally = hasOwn.call(entry, \\"finallyLoc\\"); - if (hasCatch && hasFinally) { - if (this.prev < entry.catchLoc) { - return handle(entry.catchLoc, true); - } else if (this.prev < entry.finallyLoc) { - return handle(entry.finallyLoc); - } - } else if (hasCatch) { - if (this.prev < entry.catchLoc) { - return handle(entry.catchLoc, true); - } - } else if (hasFinally) { - if (this.prev < entry.finallyLoc) { - return handle(entry.finallyLoc); - } - } else { - throw new Error(\\"try statement without catch or finally\\"); - } - } - } - }, - abrupt: function abrupt(type, arg) { - for (var i = this.tryEntries.length - 1; i >= 0; --i) { - var entry = this.tryEntries[i]; - if (entry.tryLoc <= this.prev && hasOwn.call(entry, \\"finallyLoc\\") && this.prev < entry.finallyLoc) { - var finallyEntry = entry; - break; - } - } - if (finallyEntry && (type === \\"break\\" || type === \\"continue\\") && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc) { - finallyEntry = null; - } - var record = finallyEntry ? finallyEntry.completion : {}; - record.type = type; - record.arg = arg; - if (finallyEntry) { - this.method = \\"next\\"; - this.next = finallyEntry.finallyLoc; - return ContinueSentinel; - } - return this.complete(record); - }, - complete: function complete(record, afterLoc) { - if (record.type === \\"throw\\") { - throw record.arg; - } - if (record.type === \\"break\\" || record.type === \\"continue\\") { - this.next = record.arg; - } else if (record.type === \\"return\\") { - this.rval = this.arg = record.arg; - this.method = \\"return\\"; - this.next = \\"end\\"; - } else if (record.type === \\"normal\\" && afterLoc) { - this.next = afterLoc; - } - return ContinueSentinel; - }, - finish: function finish(finallyLoc) { - for (var i = this.tryEntries.length - 1; i >= 0; --i) { - var entry = this.tryEntries[i]; - if (entry.finallyLoc === finallyLoc) { - this.complete(entry.completion, entry.afterLoc); - resetTryEntry(entry); - return ContinueSentinel; - } - } - }, - catch: function _catch(tryLoc) { - for (var i = this.tryEntries.length - 1; i >= 0; --i) { - var entry = this.tryEntries[i]; - if (entry.tryLoc === tryLoc) { - var record = entry.completion; - if (record.type === \\"throw\\") { - var thrown = record.arg; - resetTryEntry(entry); - } - return thrown; - } - } - throw new Error(\\"illegal catch attempt\\"); - }, - delegateYield: function delegateYield(iterable, resultName, nextLoc) { - this.delegate = { - iterator: values(iterable), - resultName: resultName, - nextLoc: nextLoc - }; - if (this.method === \\"next\\") { - this.arg = undefined; - } - return ContinueSentinel; - } - }; - }(function() { - return this; - }() || Function(\\"return this\\")()); - }).call(this, __webpack_require__(16)(module)); -}, function(module, exports) { - module.exports = function(module) { - if (!module.webpackPolyfill) { - module.deprecate = function() {}; - module.paths = []; - if (!module.children) module.children = []; - Object.defineProperty(module, \\"loaded\\", { - enumerable: true, - get: function get() { - return module.l; - } - }); - Object.defineProperty(module, \\"id\\", { - enumerable: true, - get: function get() { - return module.i; - } - }); - module.webpackPolyfill = 1; - } - return module; - }; -}, function(module, exports) { - function _typeof(obj) { - \\"@babel/helpers - typeof\\"; - if (typeof Symbol === \\"function\\" && typeof Symbol.iterator === \\"symbol\\") { - module.exports = _typeof = function _typeof(obj) { - return typeof obj; - }; - } else { - module.exports = _typeof = function _typeof(obj) { - return obj && typeof Symbol === \\"function\\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \\"symbol\\" : typeof obj; - }; - } - return _typeof(obj); - } - module.exports = _typeof; -}, function(module, exports, __webpack_require__) {}, function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - __webpack_require__.r(__webpack_exports__); - var taro_runtime = __webpack_require__(1); - var regenerator = __webpack_require__(8); - var regenerator_default = __webpack_require__.n(regenerator); - function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { - try { - var info = gen[key](arg); - var value = info.value; - } catch (error) { - reject(error); - return; - } - if (info.done) { - resolve(value); - } else { - Promise.resolve(value).then(_next, _throw); - } - } - function _asyncToGenerator(fn) { - return function() { - var self = this, args = arguments; - return new Promise((function(resolve, reject) { - var gen = fn.apply(self, args); - function _next(value) { - asyncGeneratorStep(gen, resolve, reject, _next, _throw, \\"next\\", value); - } - function _throw(err) { - asyncGeneratorStep(gen, resolve, reject, _next, _throw, \\"throw\\", err); - } - _next(undefined); - })); - }; - } - var classCallCheck = __webpack_require__(3); - var createClass = __webpack_require__(4); - var possibleConstructorReturn = __webpack_require__(6); - var getPrototypeOf = __webpack_require__(5); - var inherits = __webpack_require__(7); - var react = __webpack_require__(0); - var taro_components = __webpack_require__(2); - var index = __webpack_require__(18); - var index_Index = function(_Component) { - Object(inherits[\\"a\\"])(Index, _Component); - function Index() { - Object(classCallCheck[\\"a\\"])(this, Index); - return Object(possibleConstructorReturn[\\"a\\"])(this, Object(getPrototypeOf[\\"a\\"])(Index).apply(this, arguments)); - } - Object(createClass[\\"a\\"])(Index, [ { - key: \\"componentWillMount\\", - value: function() { - var _componentWillMount = _asyncToGenerator(regenerator_default.a.mark((function _callee() { - return regenerator_default.a.wrap((function _callee$(_context) { - while (1) { - switch (_context.prev = _context.next) { - case 0: - _context.next = 2; - return Promise.resolve(1); - - case 2: - case \\"end\\": - return _context.stop(); - } - } - }), _callee); - }))); - function componentWillMount() { - return _componentWillMount.apply(this, arguments); - } - return componentWillMount; - }() - }, { - key: \\"componentDidMount\\", - value: function componentDidMount() {} - }, { - key: \\"componentWillUnmount\\", - value: function componentWillUnmount() {} - }, { - key: \\"componentDidShow\\", - value: function componentDidShow() {} - }, { - key: \\"componentDidHide\\", - value: function componentDidHide() {} - }, { - key: \\"render\\", - value: function render() { - return react[\\"default\\"].createElement(taro_components[\\"View\\"], { - className: \\"index\\" - }, react[\\"default\\"].createElement(taro_components[\\"Text\\"], null, \\"Hello world!\\"), react[\\"default\\"].createElement(taro_components[\\"Input\\"], { - placeholder: \\"input\\", - value: \\"\\" - }), react[\\"default\\"].createElement(taro_components[\\"Textarea\\"], { - value: \\"\\" - })); - } - } ]); - return Index; - }(react[\\"Component\\"]); - var config = { - navigationBarTitleText: \\"\\\\u9996\\\\u9875\\" - }; - var inst = Page(Object(taro_runtime[\\"createPageConfig\\"])(index_Index, \\"pages/index/index\\", {}, config || {})); -} ], [ [ 19, 0, 1, 3, 2 ] ] ]); - -/** filePath: dist/pages/index/index.json **/ -{\\"navigationBarTitleText\\":\\"首页\\"} - -/** filePath: dist/pages/index/index.swan **/ -- - -/** filePath: dist/runtime.js **/ -(function(modules) { - function webpackJsonpCallback(data) { - var chunkIds = data[0]; - var moreModules = data[1]; - var executeModules = data[2]; - var moduleId, chunkId, i = 0, resolves = []; - for (;i < chunkIds.length; i++) { - chunkId = chunkIds[i]; - if (Object.prototype.hasOwnProperty.call(installedChunks, chunkId) && installedChunks[chunkId]) { - resolves.push(installedChunks[chunkId][0]); - } - installedChunks[chunkId] = 0; - } - for (moduleId in moreModules) { - if (Object.prototype.hasOwnProperty.call(moreModules, moduleId)) { - modules[moduleId] = moreModules[moduleId]; - } - } - if (parentJsonpFunction) parentJsonpFunction(data); - while (resolves.length) { - resolves.shift()(); - } - deferredModules.push.apply(deferredModules, executeModules || []); - return checkDeferredModules(); - } - function checkDeferredModules() { - var result; - for (var i = 0; i < deferredModules.length; i++) { - var deferredModule = deferredModules[i]; - var fulfilled = true; - for (var j = 1; j < deferredModule.length; j++) { - var depId = deferredModule[j]; - if (installedChunks[depId] !== 0) fulfilled = false; - } - if (fulfilled) { - deferredModules.splice(i--, 1); - result = __webpack_require__(__webpack_require__.s = deferredModule[0]); - } - } - return result; - } - var installedModules = {}; - var installedChunks = { - 0: 0 - }; - var deferredModules = []; - function __webpack_require__(moduleId) { - if (installedModules[moduleId]) { - return installedModules[moduleId].exports; - } - var module = installedModules[moduleId] = { - i: moduleId, - l: false, - exports: {} - }; - modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); - module.l = true; - return module.exports; - } - __webpack_require__.m = modules; - __webpack_require__.c = installedModules; - __webpack_require__.d = function(exports, name, getter) { - if (!__webpack_require__.o(exports, name)) { - Object.defineProperty(exports, name, { - enumerable: true, - get: getter - }); - } - }; - __webpack_require__.r = function(exports) { - if (typeof Symbol !== \\"undefined\\" && Symbol.toStringTag) { - Object.defineProperty(exports, Symbol.toStringTag, { - value: \\"Module\\" - }); - } - Object.defineProperty(exports, \\"__esModule\\", { - value: true - }); - }; - __webpack_require__.t = function(value, mode) { - if (mode & 1) value = __webpack_require__(value); - if (mode & 8) return value; - if (mode & 4 && typeof value === \\"object\\" && value && value.__esModule) return value; - var ns = Object.create(null); - __webpack_require__.r(ns); - Object.defineProperty(ns, \\"default\\", { - enumerable: true, - value: value - }); - if (mode & 2 && typeof value != \\"string\\") for (var key in value) __webpack_require__.d(ns, key, function(key) { - return value[key]; - }.bind(null, key)); - return ns; - }; - __webpack_require__.n = function(module) { - var getter = module && module.__esModule ? function getDefault() { - return module[\\"default\\"]; - } : function getModuleExports() { - return module; - }; - __webpack_require__.d(getter, \\"a\\", getter); - return getter; - }; - __webpack_require__.o = function(object, property) { - return Object.prototype.hasOwnProperty.call(object, property); - }; - __webpack_require__.p = \\"/\\"; - var jsonpArray = swan[\\"webpackJsonp\\"] = swan[\\"webpackJsonp\\"] || []; - var oldJsonpFunction = jsonpArray.push.bind(jsonpArray); - jsonpArray.push = webpackJsonpCallback; - jsonpArray = jsonpArray.slice(); - for (var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]); - var parentJsonpFunction = oldJsonpFunction; - checkDeferredModules(); -})([]); - -/** filePath: dist/taro.js **/ -(swan[\\"webpackJsonp\\"] = swan[\\"webpackJsonp\\"] || []).push([ [ 1 ], { - 1: function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - var _unused_webpack_default_export = \\"taro-runtime-mock\\"; - }, - 2: function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - var _unused_webpack_default_export = \\"taro-components-mock\\"; - }, - 9: function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - __webpack_exports__[\\"a\\"] = \\"taro-react-mock\\"; - } -} ]); - -/** filePath: dist/utils.sjs **/ -module.exports = { - a: function (l, n) { - return 'tmpl_' + l + '_' + n - }, - b: function (a, b) { - return a === undefined ? b : a - }, - c: function(i, prefix) { - var s = i.focus !== undefined ? 'focus' : 'blur' - return prefix + i.nn + '_' + s - }, - d: function (i, v) { - return i === undefined ? v : i - }, - e: function (n) { - return 'tmpl_' + n + '_container' - }, - -} - -/** filePath: dist/vendors.js **/ -(swan[\\"webpackJsonp\\"] = swan[\\"webpackJsonp\\"] || []).push([ [ 3 ], [ , , , function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - __webpack_require__.d(__webpack_exports__, \\"a\\", (function() { - return _classCallCheck; - })); - function _classCallCheck(instance, Constructor) { - if (!(instance instanceof Constructor)) { - throw new TypeError(\\"Cannot call a class as a function\\"); - } - } -}, function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - __webpack_require__.d(__webpack_exports__, \\"a\\", (function() { - return _createClass; - })); - function _defineProperties(target, props) { - for (var i = 0; i < props.length; i++) { - var descriptor = props[i]; - descriptor.enumerable = descriptor.enumerable || false; - descriptor.configurable = true; - if (\\"value\\" in descriptor) descriptor.writable = true; - Object.defineProperty(target, descriptor.key, descriptor); - } - } - function _createClass(Constructor, protoProps, staticProps) { - if (protoProps) _defineProperties(Constructor.prototype, protoProps); - if (staticProps) _defineProperties(Constructor, staticProps); - return Constructor; - } -}, function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - __webpack_require__.d(__webpack_exports__, \\"a\\", (function() { - return _getPrototypeOf; - })); - function _getPrototypeOf(o) { - _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { - return o.__proto__ || Object.getPrototypeOf(o); - }; - return _getPrototypeOf(o); - } -}, function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - __webpack_require__.d(__webpack_exports__, \\"a\\", (function() { - return _possibleConstructorReturn; - })); - function _typeof(obj) { - \\"@babel/helpers - typeof\\"; - if (typeof Symbol === \\"function\\" && typeof Symbol.iterator === \\"symbol\\") { - _typeof = function _typeof(obj) { - return typeof obj; - }; - } else { - _typeof = function _typeof(obj) { - return obj && typeof Symbol === \\"function\\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \\"symbol\\" : typeof obj; - }; - } - return _typeof(obj); - } - function _assertThisInitialized(self) { - if (self === void 0) { - throw new ReferenceError(\\"this hasn't been initialised - super() hasn't been called\\"); - } - return self; - } - function _possibleConstructorReturn(self, call) { - if (call && (_typeof(call) === \\"object\\" || typeof call === \\"function\\")) { - return call; - } - return _assertThisInitialized(self); - } -}, function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - __webpack_require__.d(__webpack_exports__, \\"a\\", (function() { - return _inherits; - })); - function _setPrototypeOf(o, p) { - _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { - o.__proto__ = p; - return o; - }; - return _setPrototypeOf(o, p); - } - function _inherits(subClass, superClass) { - if (typeof superClass !== \\"function\\" && superClass !== null) { - throw new TypeError(\\"Super expression must either be null or a function\\"); - } - subClass.prototype = Object.create(superClass && superClass.prototype, { - constructor: { - value: subClass, - writable: true, - configurable: true - } - }); - if (superClass) _setPrototypeOf(subClass, superClass); - } -} ] ]); -" -`; diff --git a/packages/taro-mini-runner/__tests__/__snapshots__/tabbar.spec.ts.snap b/packages/taro-mini-runner/__tests__/__snapshots__/tabbar.spec.ts.snap deleted file mode 100644 index 138346a818f3da133c20cc6bb62128ffa5dccdaa..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 107477 zcmeHw`*R%0eIH03?}208@s4*QdC#GEM=r?40*g16PY@3hM*_qVxFb&>Zn@YUV251n z?Cs3rL2z}pD#|ZP$#$je$dMvhE|rz4loO}?NFrCtKO~kbmMle1omEy`b@{=nloD4` zmA@dLPj}Bu&+aU+JW!$}F3>&G(~oa=f4|@U_V?S L zciobc>grmy?Zk4SYiV)h?JG0w?dE#PF1ybBEjP2cm?;~`Un%5_Ou;H;HVhTHW|!|6 z$y*D?8RJ$@^46*QDb^#4wST(3>%<9T$tsvL88@FYa+c$EWlE*QZO1rqqN}}Zeo(Q> zX6)w8Pba#{m7;5{m XsyBJ%sbCrS_Hxx$W zMmnu3NvjT|(;dcUH7<+xMHCH6C?M%{BQOF8+knPb9Mf>zvXyo5aLP{!p!xMD%CR8U zuLC$HB>t^}1&FM)q5#km6!5{sk~KxLg^c5jW(tMTyqUezpiob3p|Y8A%~2L@P@=b{ zM9Fp>Yq4OC+C}uYl6CF!HPfw>iw(;6*OXs2-I=oO+U`clyt>q&P+v_UtC%;-mfNU} z12x&vsjS-obazc&uz!P`$y#I~YkEXv_ZcodYOj>+qFHpoRz3wu#jA_A&8!>qT26k? zkjXn@00E8)3I>#CIS;gfY_VFP8sIRwHSliUa^ftlb(H1!SC*7gZEHx%I%ujun08t& z)|SYWN`;M>tUgm-uB-qnPDf2Es!>SF23!~h8pl` (~OeJP>^~tP+AL1^LdW!4GnTb-_E;)&8-YVo!Dm?U c}xEO3@z6|@7>b-Gq9 zb1hLSE;lUX^>wmAVJKla1)#2>kusMpiRg5gXY2We#loHLPY(8qPWPEZ(bAJ;qB;%U z`^0@l*)6+lEQHVy$ewB-7IaOJ5=M?l1QrtMG!r32po>W m8HS}a(+~|%QFnW69Mvt+; zf5 (E!2QxTjcAB%}NBVP05>Bf&>eim)OC6=GBHzNkVtBw}iWlgjRi zr`p`UKvMYvkyMw{lawl_Cx)tQwUjqZ3Ab7Z4pl&Ff;ZMe$$?}+0m>4VoA)rv@vHzf z!YN0M%JP%n`>mgR{g3g$#(5({r9}t?q e(dt6A+K@xn)?p;kOpeYWWu&TG E z8t!BCPd<+8&;g{wA-K!AcJV@+e0)VjJ%;P#*vQ=aE(E4PwVOBJc>%#w@Nmhe`emSV z&+ShkRDth+-y>sjZC~l0`N8L|A@t5uxLlwgAs7T0ZpY 7E #Uu6y?cZub+X3gUL=yZ=N!)Lg6bxw|I%6j8MRf3CZ~p9t($SoHH9hX&$597E_r z^0V@}>^Ob`0w4MhAN`RZoVf71%Jj V@^`Cu~x#669 zXNLQ}|GUEoE)kjJc(}=DaUm0)oxe`_?~;Y3BQ@Z1@Eip1y(gdh nFwi5EEa06<2l{ZWI0>{Kw?f7xv@wdbO4>5qXvQq&tNh8OC>IR{R|N zW%waQ&eI5!Y7?Kq1>GUy wer7%#`VbjL`=a;`KljL;} zw*cvE4%`oa_kaJ!*Kj|mFm;vvTm0*PiL1iU83dC-IimF*3GUqa;Eoy=11~&@h+`zr z+TdFU?o|=+-7G>I{*xal$WZ@f(&iQN ^t9}9k z6gLOc?Zf~5S3`*|sY&X+z+PNl+5EdNy?96Fkk`V&4-l9!*o@be%tLT(G0g~gxO_$4 z$-i)vj=rlRbe3X c*(e(l^{8E*ziy*qtT#>wmYKYaC{PJHIa|NcvO{OC(B z&9mX0Z~n_SPbx0MLp;B77B@8<_V4W=c(@ngN#kN3f$|&grxz9wcpCot`Z-+t$>se; zTn@u`TDZK%94`C_JRDhxV&E_SQ837!Ew#(UJE|V} < uj!%yv;)3AUZIm8Qv%5dV z=de3|!=1I4+_g;EY#Yhhi>5KT0xK8BNN$5e#ys8DwkKxI-EePAT}ff>E|Fob#QI8! zO>8@TZk_KCOxIX6m#yL%PO*RbXSf yD23V>EjH)E`?6pBu2on=G~DLgTui?BpC_YM >Gr+)1B<^>hA68?e6U9P4#uB`g&+x@(%z|YdN=+x;8eU>ckTP^W_lU4Xv%M zCDwWqc6qrg2~)kRyQizCrxSTPosFWKS??@5M*}EhrjspOB`&HMgep{LLWA?Vv{KT* z7afH_pt5T{Q|d}4x@8w-|5r*=Q`== ~W#>+*u4bxC!{SHmaP$1d)-KFU`IEiVQyaHttG+;O+gHoJ^ponxPCi^!TLG z!M^hc=o^U8jNq}wNN2B)s)l)RNuugV)mpc3Mn zGRD8YzU&7P7<676q((tm3U@X4#@K~ME;phjA@hfy!X*W-g#Y6Ra;7=oi_0_Ari^u5 zIBA*i`-YeS?n6#Vufg;A8a&*tyXP6B^!Ed$r#O)kPejLbCoWWph^(RKaoIbKi>+|C ztB42R?PC%g6N$ifrWQG&A1popcfZEcx;rEvI8(h&@=VV>hU=C8@%7()ncX 3Q!MZtUWo>vuS1u@<-qDq)x553b_!>f>*g z$UOT#`ZsNByH`?+2wU)QZR=_hN4Wn-U)js)`1pVQ9M!8IeuMmSikc2_O^9%$yS?-( zu2ex*pIv{3 (uDx{A x?vb&$e&=5>>c!_F^^P=ikp=gYtTmT4M6oTqXr=90z(u-PH`SA- zRVZ(5{r>c)`h}z27yV_UbJM#=IF#SJ{(Ow)%Qg7NUpjGt3cK$VX5=%evr94Eo6LTE zZo SQ+SjV-Ec+)Tc`E!UEgztcd zyLXIIP`abm$6pOepwr*~SC^1f7{G;WbClK2#BlLlAVLt8uy)~kgc>ay`h#!a0(b4u z^Y_T?`%ZcGS1_Dz-kPBh@!gxMU5MzP%`fccxFFA~N$+tnobl|Ys<=vb-4E^GA3#=u z w5UOE3hf!v7WG6K(3I6=gho@P&&0{6pTna0(De_BS|yme3p XzxcedOSv1>-JD+!f5;BO&B5Qdv}##=EsIZBtUo6f-}uB9))8$@+G|@`SKV8b zhsE?sEWYuvEnqfb@r{pfQT~Bgd=w!Rb9f20qFH;0ft!*F1VXQ7_fp7y|EsvXMWNgV zPXXJWe}XgTi}^i2`qft$|2!^bc 3Mjaj;i=xiG3Fikzx)mPtaQwvW<(zzqhN%it}xBHe*yk7{Ds4Z zIF)x&T6Z5~@G&(#ASj)yg!d6V2Ge Wg&mOkUD-`0!7OJqf1ncMs|77&bCLjSi+`Rq3S=) zu#vY{&2p#MJSwYMcM^*+D 7oA0pnIJ=a zDN}IF8W@?f+sQ5EQKgYKhopFacWt4K#$`4{k-l!POr~h9hz({6g9$%Ec4iT~+59N1 z)0JIjG`T6l2&Dn@Wgk#Px>_^~QrvQ;=vZ8atxvKm*?dH0F5_1~j&K`9bTp7G7Z$}b zX;5*&E-shKrXv_iMmyY#=V8EcW!E)|TZwETz=xX=%fqs$S~TC>v=U%kkx8*`J;MXc zmfT*?@0*)oHZzvBawn6D$`S0Y+9tSN<97zh!Oe2M+Q}lu48w-posz-Ub%`6r_(61t zXC1s%2$0AJiL#uTwR2$zGAdm9mzD%XWwRu}s|mYM=+tG97G PX3l#*p85FN^{x(-p5x64*>Iii^(URtPN*<2#s zKnw{vOg=w#T=XQ@plCGh{lWn)`}&mx^3ytV=2E6oa62{msnFx+8IxJWZs+)Mv3<{* zDE&MF$#Q3OsPBG;V0U5s_)+W*s)vB@h?bX4Y?h4%Fy|$QkYE<`oFBqvyvR^a?D$4T zF=P0{L&e4MNsl*eV+^fzN^;_>v`|x+G%HvRDS8 Qvm61C(WGwBdg@G!jaFA8K(uroXqxw@^GIeA zQ$(}#E|lP9ZgLm8k9hEG9WfD=vvO8}Jrq`C7!g12WHb1_!k(}S1y3^Z8%k2$ACrs- zjl)9b?nY<9&V;28W3M1GlvRiod>dBjTx1bVef7aJ%M@~4Kxvg80ztkr`886Q6}|d{ z0WA2f#fKj0cA|R=K5CW&k1Fju% f1XD^ImfW~nt=^|etDDP8yI0n_w5kOcWn%dF zz)BR0aib7rYQ$lLq`F~TV}@Uf72?dQ@^Jy63EMiE*7aJ3Teh`7 IUj#|zWf@dcrXx_F?rZu&|o9VTvmTk?2hn8*anR31n6lt0H zsZqw6pV(ks#ZPb9)) vam^`u+Y$3wP0dRo>;>&;&4&7Qwp?JK&i zH+yDyt-tkV&laDga;4i}01Y&jEmk)D+z(WlX;~k?$ks >6Aw?2AyVtw?s ztdExUA;s7uwy&_aWqr{2sN2f?Gko{a+p<1d)b7pH_A$CK_mF!?Uly5%B zZCfqtL)-HyHjO;;-%{N7yN}*xtq=U*>vr!xdUs-d^tG&ymi6&SS|5Ea>*HZtAAQYA zLHz#pc2cl!CsMG#B?Vhj@R5{){Vgf@u%%#svr@2sdnwqz6Dc^*l7cNM_()2@ftD0} z*ivwySt&TMy%ZeSi4+`cNx_yBd?cmdU`q- B}~QVfFiTVKdg5Z3 4%TmJg%4XRZ2AMvWD{R-BF|2K zzOwZVXG;`5qN1?%5vNcJAF6@e^w%WGCO#)Yo}Gxo)(0gmQTT|8!qyih4__2E{Ygo( ziEm1fXD6aCVq GOak~Iy z#V#gpJK{LD*xLF$ek_%z2;j(>w;a1z!sCK*1_!4_CfvJc%rA5#N);y`n>Xf-9%CVn z+Y-((;h9@8d9+*HNT(Idw7FiwksVGttw)y44=PsKOs6}HP4Po8sI}slIEb-qWnDa+ z60rdkzd)iK3u1lP9ku!W6!t=$C!>0XTiMKH-Od%994D%(8Vkk(Ks3Nt>49NufY_29 zPWGmDjx`P$^dJIrObPJR9QIgdHB&ayJY?^-lP*_^JR~lizCM0oW@PkodU9&!>b1G? zvGml{v3IVF =Tk)&q z;e;tKFT?N&jw=qGYPB&J1&1J7z(^Sfp?T*X`e!5pf+0^A^v)Dizbelo54Sv_5W*&q z0#S^Nuk%f(3+Lxl+%BHlvHrlgdQju)fuCEh7AHq4mTrP;IS|B8>WpRzh0(l;LnfnH zy+>npQAlvBIKZ(%iQbwLCEIZ<90~@0hWx8!@e|G0Ot(@lHYnd;Q-0ZWap0qCyBj6* z>QaM3eKm!wA`bYnT&F?yftu_>Vm8RzU6WT}+8;=bY8b33B{(xZNzOz){)CeD$DKD- zP^R!tNfWOlloT0w2m=8G(@juRP7ku2;R82B##k+24S1LXv?|=Z<-}!qtsh Q@42HcSvqoZ-*%fXCL$M9o k;dLEN`SS0f@ae=FIF^Muoa5bHJimSSA4Q|%;E4w*^VNPI*SuSBb2NO1ZoK( zDhgE(eWQkH6jB6z175Ah{MPxb%v!a=LgI*d5Q8R6zG7z8l83}z$du SiF61R+5L zyqCgEZa}%*ta|7RW^#PA! U`m9(xusFSGUQ{OX&cOBy4os6Rw3g!Ed_w6_~|PEf-_qR04=1J z0`TAz0Kry}CjRtBdEos$NCn`MSt!`Xnq4mBj-Wno9`mZ=J*<=ce5e7#!@~nY4HzC8 z?AP)1pws|uTx)88HV>iFX4C-ug28>M0a^|Bp$7cq_kQaqU;kq^3I0K<0eW*DrW&A3 zVBh-pEiJip=XlnT7jNi`gPaQ&u~Hc0(Wzcea<-T)^OfSA$s7$nCeL>-gcZpZ9P2w} z=PCu$&yuXkVy (rXP^za((383!yE7CDW|5qkl# zf-(Ye9=g$9L!)7BE1SlN1|trDWQfUJM=dxuUM4#8UM4O~Yo&wupzYy42R&iyN*UOu zu2|)sPz%-_Mnt6K?f~Xm9&6|Zj4{bvig#)o>?b>UYsrmaO)`KGv;*cY4$L)kQ*s~( zaw>zqCMj;zj0U;(9spHFW0s3kV_~pf-LhVPC`V`2>_(~SIXHYhs7CMr6T}$9h`}(b zY3f#^i6z6?LBw!G{rF;`rAh(sE--YEpDVFJi%4U?Rkx9xJZ0RjYn9)q+x0`75M;wj zlY}2`&;0G0;m+)2pxWV+Gf{lOIC2KVrz6zhrA)!8X>q^<9yq^;wXDPp;U+l=r&O@A zX3XmBge|PG7W48C><6-;FA?^U_R1u96(EFgh;6o#9zpB<1)P9QWTM~^Pu?m1Mte4^ zl5(MBDGr(H>t)?3qgy;^`D>7X{GM3%c{-}Qp1jcU8ls kOE)%s@i6hll%yI^c{waaKFkwkO zv@xX`>JyjoRgDM|p^D^DtuIF)p|;z6YhW)Kvl}amc0q_TD!y1HVvlkNQ&W+t3D=&* z3) VRw)(nw?q1df)ck3>?G6uFEu zn3K?RTfA~bfEi?p7f1wHX;cFRS&{REqOM%$jd9IeYimS*upn1-v@FrwQG`B>rh(Nm zn7R 5w}G9JvJUxV zGSMJI8u^WLJ{0C3lk}*2gA)?%HLq^8o*BUkFriI}kvuMUfou&^0}=$IxGTpMGKg@& zK78rt%k-d}YOTyDqqo4Mtz%LSnz#YePMC5!P8C?i&|4dSb#S(AMhVS8ce>zZUXqaS zFiIoka%Kam4ff?UOb|vx0Lw1qLiP_J2H>SJA{aA>RHHbE5V_bAZPSpqE+8uk@`k}X zLW5NR{o$sW6+uB?c^CG1R8_GcGt6@Zl<0~u=+KPXj?0!t8$_qts~s_HbBf*(#P d7Y}hqiwT`%^rjmkh?uPwCAGv6HS8v0W(VZ_iS~S8dY*qQH9WVW(Or3U*0RqE)4$ zGWhe=)L^ecWNU|h>a7iAl+rZQY05{j9YIHFc-xskXuDhmj(TCYig)gI*?C~R)=OTS zH{$rOnKbmRd43P{NZ)GoL?LrdVh8(p1 zD`KytQIk#D>BTHmeQi&T4xXC95kH%>(U2c{uwFnf!A80Hvb|;$%{5~VO7nQRY?ou` z$7rTlv|WSieMUxZ8Zt5tf?oTON69BbQCd4Us(Bec@p%84kpZv&TvO~DX-ETUF(@0z zG9B*U!0aohQGZ#P7>E-6oNKpSm8I~?nK&%NDq({ZMwKX0w=x@KNd(#>a!1Ewc8pl5 z(elcj2^C?g0ZQ1`Wnaiipn^~qai`)K6z|Z&i8XAuqQw^pCR#!EFc?5g2&FT4j^HbS zVYR%8kr7ZXrt!9*iffZv&}6Yj?OIv!pz}QY1}v*=P=)JAtU(MG!gbhM`v@&m(U#!C zjgm~qo+-hgRje5D7iv6VTmakNmc52UDx585>%>Wi6TwxAhnx^>==LhUCVwy~8a1H8 z^=L@9VKWGRz`kFMoJhDR91u$>+!~1bs(um4*KkK)LrO~9JZ3N6)@cZVaegtgXcoHi zW&xV{|Gj9w`ADIda0wG|Ia7<_`*z&mkYmmWP1oz-6=~|OPEP^&1jdQwzFw45}Hn)U#bPm3fGFB?sQfpc+ zw%}uA8U$rPr`_6OU>Cjq1j<%GAGJ8EH4~#McnXSm3l0RxKTS;HU6McAWum{o+pD_% zRfVV6HhPr-_}JYmb!eF rc1e!WxdUI_Gae z{a%C>;pFW~A&2!V?4!r7P!Wf1TX&4)Ep9Nl)swuhQa!R%`=_I9cvRup@5&^mwUFpi zt1AdY(zb_^u$qA{^rBMKf Z@``r|>rbk3}PwvLF4|r?DsxB8A@ zNE_5FAQcw~urR-h&w5f=Ne8*)CqCNVUXn0K5T8KFuWgWkc{QZ@tf8E}7Nv7>kL_|9 zqb|p9wr1T8ZWIB8g0-BF9*CiDn=bgpN9}@L7DbOPEiJKep%#!Zp_1Y6#IBp8`Aie_ zg&Vn8K=r69RFl#QJWhbxg|E`K?s^k#hbap45W8!GZsxMx-Mu}LJuTn|5J V)+|WmLwY%x-(amxeILoh!_NVJ~t>V+hL`m#Lh%V&yb+SQWuy#%X zsB37X%w|5hjTC8KmHCG$h4}A{pI}5A(tTzlrcsBz^-SLQoMhyf3N{4vCl= z;iR&A;;A;bFOXEeKqS@W^dzOq>4~8#TP@`cQ#Nr4S}g>JDxfvN8*8EDK(e3!WeLm8 z6P`DU6re^p<)~3vLZ6v OzBG#~_EUtvm83X`*>p%1BkW__dDz`)B`gX8L0LOYLoKZS9kn#;)N$M*rmF zxDFjaIvj$#oNE^^w8_U;MAT!rPL7Stt?xo$D$lQ<-gyDRQ}A%fr}|}}bI #>(qC{b9|q*W~k)hjtykd5b-Sd#-!; z1a9{erwZbB=DYtyKGa;R^0~Vv`V>*M0DrE#zn=)~R#^1&9ft u9UGg^Z&O0)2;J|^wQ3TEZ^Cy2IWBltWbA+t)!SHJ`imWi7 z_LC8~vsXTSc=Qli3+`2U!`1dfdVm-qZdL8cR4RohLSBZq;MHTkQmK%Y;Mj@Dqqvk$ zoOubiAu<#kd*!>~>~(~X!;?hh fXmbu}aduN9GzW=+! z2rdzs 1Sbvb^J}1}ORb ZB!LVuKkzTsz6hoKf T^Vl%NWD9KQO3#Z`agX2pH6({$N&CIc>L%~FU_;zoNxZi zH%}@q!$Um3auzo=9QN<+Ab7YJ;Ys6S9)a>3@23|Q5O^B?`uaIs`^n|~MO+TUcUri- z#vCsE2s|8FiDKX{{!uW CObD4KX3zfqC3N3;(@u_;CmnR*7{5YWU`@Q9R8t<~I4g3O@iZ9RW`HPY7JS z_|YHW_6g?D+WGf6GSTa8B+QlZ@yj=FK`UvS9G@OT#09~x+bBJrW_N#z&tZ4`hC6F7 zxoi0Dv27%0<5kn-3anfhBe@L@8S`{o+n$&;cf-9gbtQ$hw?u}y66-4^HnHvWxpn?7 zpvm{g%U1CWr`SLJGh7WT$A|0vQ{7XgQ8RB{x?479?@rHU@7~D{^Q)0_XN}YADF9kA z-HfrmQYbp9b(Rq|r0~Q9Zge(8Hunw_Wg~A)&0rs1*);kS1D)CKfk9(%IFalh9PGo% zr9Iur{;uxcuHNp>p59bncdD<4hAjU80JWBLOQ~yP6RJ);5pdphOR27|wY9axT5rNG zFLxzjs&{qwboKOfB2TBYQFJrwokizp0A);VH{&ZiLKUhrp}~1wS}AGZi;hAdP}#Mf zDRm_i-Li|a|0|`bsqM0_tY{@17q9iVE8*~EW7jo&omwepLEI&F0qrZLM!EURF3;Jv z_@PLN-I+W#9^oBW$rv3K*fe5OnXFZ0WQQs_HI h^JJisxl=zmeQJa!mz*OaPTeYcYi}GD)R2Nx5V+k(`yvCr0E2p4R-Jndu8}@ zXEEU5Cg9uJsB#JuL`Gh|H23x^GWg`%xGM#MxA$jqGJ&FMhBD;PWK@DsL2lN{DaD82|eEvL8fX z(0Of;8U iF3(V#GS+e7q-DbI8)62y z4>={h2G8ef@Nm2Co@b2G-w%|Y;zUY35gpT=xKJe`vWA|=W$!dDw!+=6A|8CVk4bP$ zBm&!+TI7U&u=M=j{TfT_?vQ-oO!Yd+Gd=Sdu2=rY*MIY6cH>z0_+i|1x5U|r9eP2J zWoFhiM #UzC9t58PHUxRr;PGXt+0 zaPl*X120Y>k| xDNn{8(^4c4R zdfC8P_|pzA@V<-RJ*H5GC{jdsH&$6&AE|wt7=$}{jLlSCdtKGi$G&Wgy||t`{1^Xr z{><&oGsk6ai>=y2R13=(_apEf8`GrpFmb-Y088Oc();du*ODLBSk`SLmm=jEr39V( z-WT3JfagK@ILV`kfl!h_eK-2uFCaW5pU3^^Dndt BI#p?7mZ&kSk9oIJEO~3r-&mm$Ez5^ca-Z4r+>5f_- ze>Eh5PJjPjT|!b}02i{&QC2$>!^L-j2ticB+J);8YP4+V559p5+_gi`-y^f{JLTD5 z!Em~HYlcF^cW BS#?6E_a1#K9{oYGBDU1?t(SUHLq- z^rV5%_kLYIQa+iSXE>hW&IiEvKe?aq_Z``9@P79djE18KT!eoY-gnOwUPG8N6prnM zqr5q=SBB>)&EW2mf!Gu201ny(8^g)YVoO-~WSWx 7Pt506nW!ckY4=G?yke;NM5;X|CtJ1MQZ zk1_a|njR38&Q-$u2p)s!JV^FKPqNN$|0XVkCf%&OB?P9>2c@hcc7&6T@AiF=;w*M? zznrsGcl~5e?VIvx5Vym yK^+iHC`oU=HI)jD(%A)iSPtGTqc)Zr+NXWs5z@ VGjT15t=S{e~cS*p%{FWjR!q?zcgW7gqVt3zU3_M(t!Kw^5H&OXNR4f$g z(|C8QepEs%74d+C;B146YZV;6-eoL)nm9NNnm@+F0%8+}`c>nz*t2nZv4E2~@Jk0N zd??Bco16S`<3zS7f8Q7h*e=L~ip8ZymZ?8vdfO8daKZu(O*nqs|IuW?=n_? k$?Rx0y5u3hTn z*13%Qx$gR+v&b 8n%5Eo*>xe3iv^gZj`@3rkZ8R>kA&T^Mdu1}-*;KLy zE8$1T&a_T*epF6#Zk=mSfm1JXeun4Tcc<|syj>`C>M}@+GE`W+auMyK9FmbYLh?gp z6!Nqt<9nful@h*U>cj_!CSD#C#JaYhU!=`>Nr9Xx*lP{Th_r|@szDHWo}iI2b9PAz z8kM17F1g_xR}d4*!j~EXL*aarh<+FHI+S+}pJR3UB25-h;#*dD9T`SE85qKhS>$*9 zo!nK{i3 GbSS&(I^N6VZT@goL^DUcv{1paxkS2w z7!q=re17V<=t-_Y(P-NHg#%jl^{aWtPwP~_Gt=pCFLS8bex5P;yHjGfbNsm2zUNJp zejb5jxidN%NU*ywe*7qQ2h~HsFMcgA<5SrND46q-Lr5@-dA M)IdKdKGCHBw zskk_QK0;vzV`!~Yk`v#gg>o}#R*Y_>=w+ZFfaZ}Dlu1$KTgo^tu%E?FX?zZjSDB%@ zm^!8 85G*paEwams@15vh2sS{5TYNRx xSG)%sj;}_Owqw-(LA9{P&a6VUmPz&Ya8gN$*=4cS|iHVLCuvj%Mkz> zP3i`%Cw>`Q2LWiw<|9Ce_!X$2VHhGh8c3ErEnW==Eic%`W$~eE07V jOzHx9f_~BRXSP;NGJ6P{&CWem>tVFRGHwsbRjRO&>ZuA%m z&{C`rXI7Pu3jj^n*2%Q4*S2iymTmp0*w)Fk8r^F2t>c(b@sS%%jL xh$O#E5VC|G7qr#;F_57D?swY~T6+W6;;K@NPs%2Yq;h|+)d#0Rk1VvhAerl9) z<|j5-SMk$ZwlxN#(Xy?hEbo?WEqFtj%Mpfg%eICsu=U%spTc6cHe)tB?>1?D;3(Mb ztdHbQtdE|S^#OyFYhqG$Y*` fm(0&% &>3`GPCt&PkZYsUdy!J>;>CnnzKH7(oI?)J= 2E2NI zNNdc^h*!q)U99>TpD+BdA=ZBn2$Q~kBke<22jJVg=7wNz%ldfO)< `xS9l-$3VWNiK6 %N7`*tD)`&&}5B?TWzDcIkVf)85?_BSg9`?r^Z{X3C@ z11%}ol7f$<6dY(t!G|pc2bz_F1KUf%ft^Uf!Il(kNx?@_3J$iU;KP=JgUw1o{4)A> z7V+Rtq~K6X3bv%+BPj)kT2k;~OTnRLrQp!^QgCP|QgFB>1zS?^k(7eNEh+f0rQmS0 zQgC>CDLA|nDVXeTiNTf_d?dvnSiklA92A7XkK$UvZ{6+WCy?&r_c^+o6@ _^`FYra$0JHt_`~^6W$_Y< =JUbDE5gWU+_DadH)OVzE1x 5OL$x`&fr9~ z$b@_MjQNF*M5*HBWAnzm(PJ#caa+PUCj1S+7)~yz6wJ7hPAiycbG?KkJDhY{k1U%X zRIIX@PInla;zTyoT5(Jq#8|enE*?&a*Z_)OAW@D5u|DjM+WdYBd!f#gQ9Z-0Y-X}< z=L$}a6IE4>1!Dmq8sMw+z_2wyY{?EMds92d8ix#e5P> DH~}XvUl4_ zmn%gc5|>V2AHOg&GI}{ZIW=?j+T8e9dg|)fJ6Fcj-RU$qC8C;GQW1n8N5Qr{F~yBt zUA%2(-PrxWC;74 `?@vG(GgefmC!|(}?D-NA%wJ{g1t*;d1A&3?*QpS(9 zm$Mwri7x+)L_G1_!}?by+n!JeVG~G!C`QKD`KHr_^K&Y07f Gu^;>l`B%x} z_@is4TPYVCl<%)8zihfV@X@v1jgonFsX?K>nnG3)2Ygws(;)jmO?DwM8|3Y-$ty7J z52Qvl4AztqoSB{^XQCc|LP`7M&YLPIQ~0N(iPsTIiVQr2fdGQ(CMYVW2U*VWfg2)Y ztQN2aJj?-F6>i>g; v$5-YeQAcpx%>$EJdkc&RVb(n{sOM%J7cEQ&XH`$~Y8C9P| Mck{H{Dj)t^NPu=Y>TY#QgqiiQieLdm*jvl!-z zPu7k(91sDZXh#u8oyCcv5lYqs0=0w?6@{vYzEQ(83MqoV0k2kLe(QWzX02LbA#ub! zh(Qx3Uoo?4$wOi Z+V8O$Hv z46e&kl10*uIrKSM8_@zobu$o3LLCAT@N0UQ$qgu%n^g~e!Ay>ib~uyA4NU3KH@BG2 z>uSIpr%mqB7(pvIh5z{TfB5&``XZYI-^7fc=t^ui>(@7@p$Z_N>1sf<768R8txiAI zPITgl$0=T gj+Kd{2Uof~YH9)K3 zKGcAp{N8W< tP*?J zQ7O0s=T_T=Rg>`NwL(jF*@&I8jMH8LCs8nq%WnRZVVyjw_k(>=KmkLAoOw$F#w^y7 zp>*Ly$uqqZ`HXXQtq4;bXP>(p37p B|x@Eoo zP>#;3*^N@ub1DTls7CMr6T}$9h`}(bY3f#^i6z6?LBw!G{rF;`rAh(sE--YEpDVFJ zi%4U?Rkx9xJZ0RjYn9)q+x0`75M;wjlY}2`&;0G0;m+)2pxWV+Gf{lOIC2KVrz6zh zrA)!8X>q^<9yq^;wXDPp;U+map0i+O&6w5M30qiWE#~DP*bihwUn1-y?UhOJDnJO~ z5Zi1eJ%ZNz3pfFr$V9;-p1f21jrMF-CFMfNQXDeX*UP$7Mz?s-^4A~%`8~1j^K?{q zJ$a$yHAFwvx R;xN3-R)A4W zh6=~37Nme-ABhTggeF^{2~RmA$!M?no&fglL3{*WHLg=o3g|<4Y%1;u*CLT5TNwd2 zu>vrvxiV{1rfdW<8|UVz_IM `dlDS^K*VVMhUOsR(Y#ASR{BZ5SzB6(En%MnPZ?Ka;U z*h|Lj#>%2y5TcBVFII`zqa4E2RAg$xwP*2ywzxc(S=Pa@UE3g{9zYaY)KW4kof6X{ z0^4-HiK+o4oi-gGVr|8$QnImMnTO>qa7$6^GnjxO#*nEahHM4CHjQHt*>a&Ar6MR5 z696>QY9)s{AlrpB5}5*lqvh!%krX9GF5?X5B=p=CuUrve2ASdo5&>2k)j&a3 io%5jAZB3!T!U;6nnJt(JID>KUIEih^8n3RJiZosq? zrksvb1y(Wi*2Z5QoNb#?LNm~vE_j)jB;-4c(nz_S*+6Q8eK`#igwYVdvJ1J8{R4;r zcxj9X#tb6WC=Mb-F1AG5G~}%d$clozVepR7U==`rxM^lZP|#Q2g?%1XRV>I1^IQQX zx*`lZG^4iTvZc`m(W&-oM-1DXqIU%GJ%Yb_@`=cy?VrN_6i?_SgK_gydUHbTq$@>i z7s~nDvy|{v+q8fvupWEZsn&^tT~d^2RjH^9{(Lnx*lQ5k+M%C%YXcdjG|hCH@=h=dg4aRZ;J<;cu`_D9o~Q;2d)2#*ehw&WRrG!F$+~++f$>1r)F@(&n9g& z bB}&w-%m!H!f%b^p(eaoaBUWm(ymDtkMVM-U61H{O7jhD)Ae2SisW=A3 zJG5|O4co0~@kN4(R**dm1`rcM=?tDD_)1_{EpK9E1eA+uye+8W+N2gVS*%gJR#rUd zJkP!X%PJdG;W`p)5QBwq9k$j!LJL*2CAe^-B-62HN-$^@D~9}q8c!G(z_zz#ui=mi zXN%c7anj*LaFyaACj=Y1y^62NA54ly4XAKE8q#gp41yo9?-wH{5-th{#8L{k2BN;I zUqtdX+|k#NlF~Mh*^9Sz8bV;4U(76;g|56=fT`gaoyv+wN`OX=obWP@vhKb4gMuem z08nc!77V0}5S4N%z!57v$f~!1q)98-fi3Ap)wY+p`KJb 9=2o+U{M uj=|&6`o?-=v4;bV|TCAp=F*>9l?n7R^3^% bkbN4>YS=QGvK}|UrWRYQKiz)oRQvx2aO#XD diff --git a/packages/taro-mini-runner/__tests__/__snapshots__/ts.spec.ts.snap b/packages/taro-mini-runner/__tests__/__snapshots__/ts.spec.ts.snap deleted file mode 100644 index 8790e8582e05..000000000000 --- a/packages/taro-mini-runner/__tests__/__snapshots__/ts.spec.ts.snap +++ /dev/null @@ -1,754 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`typescript should build project with ts 1`] = `15`; - -exports[`typescript should build project with ts 2`] = ` -" -/** filePath: dist/app.js **/ -require(\\"./runtime\\"); - -require(\\"./common\\"); - -require(\\"./vendors\\"); - -require(\\"./taro\\"); - -(wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 4 ], { - 11: function(module, exports, __webpack_require__) {}, - 14: function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - __webpack_require__.r(__webpack_exports__); - var taro_runtime = __webpack_require__(1); - var classCallCheck = __webpack_require__(2); - var createClass = __webpack_require__(3); - var possibleConstructorReturn = __webpack_require__(5); - var getPrototypeOf = __webpack_require__(4); - var inherits = __webpack_require__(6); - var react = __webpack_require__(0); - var app = __webpack_require__(11); - var app_App = function(_Component) { - Object(inherits[\\"a\\"])(App, _Component); - function App() { - Object(classCallCheck[\\"a\\"])(this, App); - return Object(possibleConstructorReturn[\\"a\\"])(this, Object(getPrototypeOf[\\"a\\"])(App).apply(this, arguments)); - } - Object(createClass[\\"a\\"])(App, [ { - key: \\"componentDidMount\\", - value: function componentDidMount() {} - }, { - key: \\"componentDidShow\\", - value: function componentDidShow() {} - }, { - key: \\"componentDidHide\\", - value: function componentDidHide() {} - }, { - key: \\"componentDidCatchError\\", - value: function componentDidCatchError() {} - }, { - key: \\"render\\", - value: function render() { - return this.props.children; - } - } ]); - return App; - }(react[\\"Component\\"]); - var lib_src_app = app_App; - var taro_react = __webpack_require__(8); - var config = { - pages: [ \\"pages/index/index\\" ], - window: { - backgroundTextStyle: \\"light\\", - navigationBarBackgroundColor: \\"#fff\\", - navigationBarTitleText: \\"WeChat\\", - navigationBarTextStyle: \\"black\\" - } - }; - taro_runtime[\\"window\\"].__taroAppConfig = config; - var inst = App(Object(taro_runtime[\\"createReactApp\\"])(lib_src_app, react, taro_react[\\"a\\"], config)); - } -}, [ [ 14, 0, 1, 3, 2 ] ] ]); - - - -/** filePath: dist/app.json **/ -{\\"pages\\":[\\"pages/index/index\\"],\\"window\\":{\\"backgroundTextStyle\\":\\"light\\",\\"navigationBarBackgroundColor\\":\\"#fff\\",\\"navigationBarTitleText\\":\\"WeChat\\",\\"navigationBarTextStyle\\":\\"black\\"}} - -/** filePath: dist/app.wxss **/ - - -/** filePath: dist/base.wxml **/ - - - - - - - - -- - - - -- - -- - - - -- - -- - - - -- - -- - - - -- - -{{i.v}} - - - - - - - -- - - - -- - -- - - - -- - -- - - - - - - - -- - -- - - - -- - -- - - - -- - -- - - - - - - - -- - -- - - - -- - -- - - - -- - -- - - - - - - - -- - -- - - - -- - -- - - - - - - - -- - -- - - - -- - -- - - - - - - - -- - -- - - - -- - -- - - - - - - - -- - -- - - - -- - -- - - - - - - - -- - -- - - - -- - -- - - - - - - - -- - -- - - - -- - -- - - - - - - - -- - -- - - - -- - -- - - - - - - - -- - -- - - - -- - -- - - - - - - - -- - -- - - - -- - -- - - - - - - - -- - -- - - - -- - -- - - - - - - - -- - -- - - - -- - -- - - - - - - - -- - -- - - -/** filePath: dist/common.js **/ -(wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 2 ], [ function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - __webpack_require__.r(__webpack_exports__); - __webpack_exports__[\\"default\\"] = \\"react-mock\\"; -} ] ]); - -/** filePath: dist/comp.js **/ -(wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 6 ], { - 12: function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - __webpack_require__.r(__webpack_exports__); - var _tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1); - Component(Object(_tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__[\\"createRecursiveComponentConfig\\"])()); - } -}, [ [ 12, 0, 1 ] ] ]); - -/** filePath: dist/comp.json **/ -{\\"component\\":true,\\"usingComponents\\":{\\"comp\\":\\"./comp\\"}} - -/** filePath: dist/comp.wxml **/ - - - -/** filePath: dist/pages/index/index.js **/ -(wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 7 ], { - 13: function(module, exports, __webpack_require__) {}, - 15: function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - __webpack_require__.r(__webpack_exports__); - var taro_runtime = __webpack_require__(1); - var classCallCheck = __webpack_require__(2); - var createClass = __webpack_require__(3); - var possibleConstructorReturn = __webpack_require__(5); - var getPrototypeOf = __webpack_require__(4); - var inherits = __webpack_require__(6); - var react = __webpack_require__(0); - var taro_components = __webpack_require__(7); - var index = __webpack_require__(13); - var index_Index = function(_Component) { - Object(inherits[\\"a\\"])(Index, _Component); - function Index() { - Object(classCallCheck[\\"a\\"])(this, Index); - return Object(possibleConstructorReturn[\\"a\\"])(this, Object(getPrototypeOf[\\"a\\"])(Index).apply(this, arguments)); - } - Object(createClass[\\"a\\"])(Index, [ { - key: \\"componentWillMount\\", - value: function componentWillMount() {} - }, { - key: \\"componentDidMount\\", - value: function componentDidMount() {} - }, { - key: \\"componentWillUnmount\\", - value: function componentWillUnmount() {} - }, { - key: \\"componentDidShow\\", - value: function componentDidShow() {} - }, { - key: \\"componentDidHide\\", - value: function componentDidHide() {} - }, { - key: \\"render\\", - value: function render() { - return react[\\"default\\"].createElement(taro_components[\\"View\\"], { - className: \\"index\\" - }, react[\\"default\\"].createElement(taro_components[\\"Text\\"], null, \\"Hello world!\\")); - } - } ]); - return Index; - }(react[\\"Component\\"]); - var config = { - navigationBarTitleText: \\"\\\\u9996\\\\u9875\\" - }; - var inst = Page(Object(taro_runtime[\\"createPageConfig\\"])(index_Index, \\"pages/index/index\\", {}, config || {})); - } -}, [ [ 15, 0, 1, 3, 2 ] ] ]); - -/** filePath: dist/pages/index/index.json **/ -{\\"navigationBarTitleText\\":\\"首页\\",\\"usingComponents\\":{\\"comp\\":\\"../../comp\\"}} - -/** filePath: dist/pages/index/index.wxml **/ - - - -/** filePath: dist/pages/index/index.wxss **/ -.body #header{width:10rpx;height:20rpx} - -/** filePath: dist/runtime.js **/ -(function(modules) { - function webpackJsonpCallback(data) { - var chunkIds = data[0]; - var moreModules = data[1]; - var executeModules = data[2]; - var moduleId, chunkId, i = 0, resolves = []; - for (;i < chunkIds.length; i++) { - chunkId = chunkIds[i]; - if (Object.prototype.hasOwnProperty.call(installedChunks, chunkId) && installedChunks[chunkId]) { - resolves.push(installedChunks[chunkId][0]); - } - installedChunks[chunkId] = 0; - } - for (moduleId in moreModules) { - if (Object.prototype.hasOwnProperty.call(moreModules, moduleId)) { - modules[moduleId] = moreModules[moduleId]; - } - } - if (parentJsonpFunction) parentJsonpFunction(data); - while (resolves.length) { - resolves.shift()(); - } - deferredModules.push.apply(deferredModules, executeModules || []); - return checkDeferredModules(); - } - function checkDeferredModules() { - var result; - for (var i = 0; i < deferredModules.length; i++) { - var deferredModule = deferredModules[i]; - var fulfilled = true; - for (var j = 1; j < deferredModule.length; j++) { - var depId = deferredModule[j]; - if (installedChunks[depId] !== 0) fulfilled = false; - } - if (fulfilled) { - deferredModules.splice(i--, 1); - result = __webpack_require__(__webpack_require__.s = deferredModule[0]); - } - } - return result; - } - var installedModules = {}; - var installedChunks = { - 0: 0 - }; - var deferredModules = []; - function __webpack_require__(moduleId) { - if (installedModules[moduleId]) { - return installedModules[moduleId].exports; - } - var module = installedModules[moduleId] = { - i: moduleId, - l: false, - exports: {} - }; - modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); - module.l = true; - return module.exports; - } - __webpack_require__.m = modules; - __webpack_require__.c = installedModules; - __webpack_require__.d = function(exports, name, getter) { - if (!__webpack_require__.o(exports, name)) { - Object.defineProperty(exports, name, { - enumerable: true, - get: getter - }); - } - }; - __webpack_require__.r = function(exports) { - if (typeof Symbol !== \\"undefined\\" && Symbol.toStringTag) { - Object.defineProperty(exports, Symbol.toStringTag, { - value: \\"Module\\" - }); - } - Object.defineProperty(exports, \\"__esModule\\", { - value: true - }); - }; - __webpack_require__.t = function(value, mode) { - if (mode & 1) value = __webpack_require__(value); - if (mode & 8) return value; - if (mode & 4 && typeof value === \\"object\\" && value && value.__esModule) return value; - var ns = Object.create(null); - __webpack_require__.r(ns); - Object.defineProperty(ns, \\"default\\", { - enumerable: true, - value: value - }); - if (mode & 2 && typeof value != \\"string\\") for (var key in value) __webpack_require__.d(ns, key, function(key) { - return value[key]; - }.bind(null, key)); - return ns; - }; - __webpack_require__.n = function(module) { - var getter = module && module.__esModule ? function getDefault() { - return module[\\"default\\"]; - } : function getModuleExports() { - return module; - }; - __webpack_require__.d(getter, \\"a\\", getter); - return getter; - }; - __webpack_require__.o = function(object, property) { - return Object.prototype.hasOwnProperty.call(object, property); - }; - __webpack_require__.p = \\"/\\"; - var jsonpArray = wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []; - var oldJsonpFunction = jsonpArray.push.bind(jsonpArray); - jsonpArray.push = webpackJsonpCallback; - jsonpArray = jsonpArray.slice(); - for (var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]); - var parentJsonpFunction = oldJsonpFunction; - checkDeferredModules(); -})([]); - -/** filePath: dist/taro.js **/ -(wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 1 ], { - 1: function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - var _unused_webpack_default_export = \\"taro-runtime-mock\\"; - }, - 7: function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - var _unused_webpack_default_export = \\"taro-components-mock\\"; - }, - 8: function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - __webpack_exports__[\\"a\\"] = \\"taro-react-mock\\"; - } -} ]); - -/** filePath: dist/vendors.js **/ -(wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 3 ], [ , , function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - __webpack_require__.d(__webpack_exports__, \\"a\\", (function() { - return _classCallCheck; - })); - function _classCallCheck(instance, Constructor) { - if (!(instance instanceof Constructor)) { - throw new TypeError(\\"Cannot call a class as a function\\"); - } - } -}, function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - __webpack_require__.d(__webpack_exports__, \\"a\\", (function() { - return _createClass; - })); - function _defineProperties(target, props) { - for (var i = 0; i < props.length; i++) { - var descriptor = props[i]; - descriptor.enumerable = descriptor.enumerable || false; - descriptor.configurable = true; - if (\\"value\\" in descriptor) descriptor.writable = true; - Object.defineProperty(target, descriptor.key, descriptor); - } - } - function _createClass(Constructor, protoProps, staticProps) { - if (protoProps) _defineProperties(Constructor.prototype, protoProps); - if (staticProps) _defineProperties(Constructor, staticProps); - return Constructor; - } -}, function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - __webpack_require__.d(__webpack_exports__, \\"a\\", (function() { - return _getPrototypeOf; - })); - function _getPrototypeOf(o) { - _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { - return o.__proto__ || Object.getPrototypeOf(o); - }; - return _getPrototypeOf(o); - } -}, function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - __webpack_require__.d(__webpack_exports__, \\"a\\", (function() { - return _possibleConstructorReturn; - })); - function _typeof(obj) { - \\"@babel/helpers - typeof\\"; - if (typeof Symbol === \\"function\\" && typeof Symbol.iterator === \\"symbol\\") { - _typeof = function _typeof(obj) { - return typeof obj; - }; - } else { - _typeof = function _typeof(obj) { - return obj && typeof Symbol === \\"function\\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \\"symbol\\" : typeof obj; - }; - } - return _typeof(obj); - } - function _assertThisInitialized(self) { - if (self === void 0) { - throw new ReferenceError(\\"this hasn't been initialised - super() hasn't been called\\"); - } - return self; - } - function _possibleConstructorReturn(self, call) { - if (call && (_typeof(call) === \\"object\\" || typeof call === \\"function\\")) { - return call; - } - return _assertThisInitialized(self); - } -}, function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - __webpack_require__.d(__webpack_exports__, \\"a\\", (function() { - return _inherits; - })); - function _setPrototypeOf(o, p) { - _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { - o.__proto__ = p; - return o; - }; - return _setPrototypeOf(o, p); - } - function _inherits(subClass, superClass) { - if (typeof superClass !== \\"function\\" && superClass !== null) { - throw new TypeError(\\"Super expression must either be null or a function\\"); - } - subClass.prototype = Object.create(superClass && superClass.prototype, { - constructor: { - value: subClass, - writable: true, - configurable: true - } - }); - if (superClass) _setPrototypeOf(subClass, superClass); - } -} ] ]); -" -`; diff --git a/packages/taro-mini-runner/__tests__/__snapshots__/vue.spec.ts.snap b/packages/taro-mini-runner/__tests__/__snapshots__/vue.spec.ts.snap deleted file mode 100644 index c7e7454c2775..000000000000 --- a/packages/taro-mini-runner/__tests__/__snapshots__/vue.spec.ts.snap +++ /dev/null @@ -1,641 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`vue should build vue app 1`] = `12`; - -exports[`vue should build vue app 2`] = ` -" -/** filePath: dist/app.js **/ -require(\\"./runtime\\"); - -require(\\"./taro\\"); - -(wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 2 ], { - 3: function(module, exports, __webpack_require__) {}, - 6: function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - __webpack_require__.r(__webpack_exports__); - var taro_runtime = __webpack_require__(0); - var vue = \\"vue-mock\\"; - var app = __webpack_require__(3); - var app_App = new vue({ - onShow: function onShow() {}, - render: function render(h) { - return h(\\"block\\", this.$slots.default); - } - }); - var lib_src_app = app_App; - var config = { - pages: [ \\"pages/index/index\\" ], - window: { - backgroundTextStyle: \\"light\\", - navigationBarBackgroundColor: \\"#fff\\", - navigationBarTitleText: \\"WeChat\\", - navigationBarTextStyle: \\"black\\" - } - }; - taro_runtime[\\"window\\"].__taroAppConfig = config; - var inst = App(Object(taro_runtime[\\"createVueApp\\"])(lib_src_app, vue, config)); - } -}, [ [ 6, 0, 1 ] ] ]); - - - -/** filePath: dist/app.json **/ -{\\"pages\\":[\\"pages/index/index\\"],\\"window\\":{\\"backgroundTextStyle\\":\\"light\\",\\"navigationBarBackgroundColor\\":\\"#fff\\",\\"navigationBarTitleText\\":\\"WeChat\\",\\"navigationBarTextStyle\\":\\"black\\"}} - -/** filePath: dist/app.wxss **/ - - -/** filePath: dist/base.wxml **/ - - - - - - - - -- - - - -- - -- - - - -- - -- - - - -- - -- - - - -- - -{{i.v}} - - - - - - - -- - - - -- - -- - - - -- - -- - - - - - - - -- - -- - - - -- - -- - - - -- - -- - - - - - - - -- - -- - - - -- - -- - - - -- - -- - - - - - - - -- - -- - - - -- - -- - - - - - - - -- - -- - - - -- - -- - - - - - - - -- - -- - - - -- - -- - - - - - - - -- - -- - - - -- - -- - - - - - - - -- - -- - - - -- - -- - - - - - - - -- - -- - - - -- - -- - - - - - - - -- - -- - - - -- - -- - - - - - - - -- - -- - - - -- - -- - - - - - - - -- - -- - - - -- - -- - - - - - - - -- - -- - - - -- - -- - - - - - - - -- - -- - - - -- - -- - - - - - - - -- - -- - - -/** filePath: dist/comp.js **/ -(wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 4 ], { - 4: function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - __webpack_require__.r(__webpack_exports__); - var _tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0); - Component(Object(_tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__[\\"createRecursiveComponentConfig\\"])()); - } -}, [ [ 4, 0, 1 ] ] ]); - -/** filePath: dist/comp.json **/ -{\\"component\\":true,\\"usingComponents\\":{\\"comp\\":\\"./comp\\"}} - -/** filePath: dist/comp.wxml **/ - - - -/** filePath: dist/pages/index/index.js **/ -(wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 5 ], { - 5: function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - __webpack_require__.r(__webpack_exports__); - var taro_runtime = __webpack_require__(0); - var render = function() { - var _vm = this; - var _h = _vm.$createElement; - var _c = _vm._self._c || _h; - return _c(\\"view\\", { - staticClass: \\"index\\" - }, [ _c(\\"text\\", [ _vm._v(_vm._s(_vm.msg)) ]) ]); - }; - var staticRenderFns = []; - render._withStripped = true; - var indexvue_type_script_lang_js_ = { - data: function data() { - return { - msg: \\"Hello world!\\" - }; - } - }; - var pages_indexvue_type_script_lang_js_ = indexvue_type_script_lang_js_; - function normalizeComponent(scriptExports, render, staticRenderFns, functionalTemplate, injectStyles, scopeId, moduleIdentifier, shadowMode) { - var options = typeof scriptExports === \\"function\\" ? scriptExports.options : scriptExports; - if (render) { - options.render = render; - options.staticRenderFns = staticRenderFns; - options._compiled = true; - } - if (functionalTemplate) { - options.functional = true; - } - if (scopeId) { - options._scopeId = \\"data-v-\\" + scopeId; - } - var hook; - if (moduleIdentifier) { - hook = function(context) { - context = context || this.$vnode && this.$vnode.ssrContext || this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext; - if (!context && typeof __VUE_SSR_CONTEXT__ !== \\"undefined\\") { - context = __VUE_SSR_CONTEXT__; - } - if (injectStyles) { - injectStyles.call(this, context); - } - if (context && context._registeredComponents) { - context._registeredComponents.add(moduleIdentifier); - } - }; - options._ssrRegister = hook; - } else if (injectStyles) { - hook = shadowMode ? function() { - injectStyles.call(this, (options.functional ? this.parent : this).$root.$options.shadowRoot); - } : injectStyles; - } - if (hook) { - if (options.functional) { - options._injectStyles = hook; - var originalRender = options.render; - options.render = function renderWithStyleInjection(h, context) { - hook.call(context); - return originalRender(h, context); - }; - } else { - var existing = options.beforeCreate; - options.beforeCreate = existing ? [].concat(existing, hook) : [ hook ]; - } - } - return { - exports: scriptExports, - options: options - }; - } - var component = normalizeComponent(pages_indexvue_type_script_lang_js_, render, staticRenderFns, false, null, null, null); - if (false) { - var api; - } - component.options.__file = \\"src/pages/index/index.vue\\"; - var index = component.exports; - var config = { - navigationBarTitleText: \\"\\\\u9996\\\\u9875\\" - }; - var inst = Page(Object(taro_runtime[\\"createPageConfig\\"])(index, \\"pages/index/index\\", {}, config || {})); - } -}, [ [ 5, 0, 1 ] ] ]); - -/** filePath: dist/pages/index/index.json **/ -{\\"navigationBarTitleText\\":\\"首页\\",\\"usingComponents\\":{\\"comp\\":\\"../../comp\\"}} - -/** filePath: dist/pages/index/index.wxml **/ - - - -/** filePath: dist/runtime.js **/ -(function(modules) { - function webpackJsonpCallback(data) { - var chunkIds = data[0]; - var moreModules = data[1]; - var executeModules = data[2]; - var moduleId, chunkId, i = 0, resolves = []; - for (;i < chunkIds.length; i++) { - chunkId = chunkIds[i]; - if (Object.prototype.hasOwnProperty.call(installedChunks, chunkId) && installedChunks[chunkId]) { - resolves.push(installedChunks[chunkId][0]); - } - installedChunks[chunkId] = 0; - } - for (moduleId in moreModules) { - if (Object.prototype.hasOwnProperty.call(moreModules, moduleId)) { - modules[moduleId] = moreModules[moduleId]; - } - } - if (parentJsonpFunction) parentJsonpFunction(data); - while (resolves.length) { - resolves.shift()(); - } - deferredModules.push.apply(deferredModules, executeModules || []); - return checkDeferredModules(); - } - function checkDeferredModules() { - var result; - for (var i = 0; i < deferredModules.length; i++) { - var deferredModule = deferredModules[i]; - var fulfilled = true; - for (var j = 1; j < deferredModule.length; j++) { - var depId = deferredModule[j]; - if (installedChunks[depId] !== 0) fulfilled = false; - } - if (fulfilled) { - deferredModules.splice(i--, 1); - result = __webpack_require__(__webpack_require__.s = deferredModule[0]); - } - } - return result; - } - var installedModules = {}; - var installedChunks = { - 0: 0 - }; - var deferredModules = []; - function __webpack_require__(moduleId) { - if (installedModules[moduleId]) { - return installedModules[moduleId].exports; - } - var module = installedModules[moduleId] = { - i: moduleId, - l: false, - exports: {} - }; - modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); - module.l = true; - return module.exports; - } - __webpack_require__.m = modules; - __webpack_require__.c = installedModules; - __webpack_require__.d = function(exports, name, getter) { - if (!__webpack_require__.o(exports, name)) { - Object.defineProperty(exports, name, { - enumerable: true, - get: getter - }); - } - }; - __webpack_require__.r = function(exports) { - if (typeof Symbol !== \\"undefined\\" && Symbol.toStringTag) { - Object.defineProperty(exports, Symbol.toStringTag, { - value: \\"Module\\" - }); - } - Object.defineProperty(exports, \\"__esModule\\", { - value: true - }); - }; - __webpack_require__.t = function(value, mode) { - if (mode & 1) value = __webpack_require__(value); - if (mode & 8) return value; - if (mode & 4 && typeof value === \\"object\\" && value && value.__esModule) return value; - var ns = Object.create(null); - __webpack_require__.r(ns); - Object.defineProperty(ns, \\"default\\", { - enumerable: true, - value: value - }); - if (mode & 2 && typeof value != \\"string\\") for (var key in value) __webpack_require__.d(ns, key, function(key) { - return value[key]; - }.bind(null, key)); - return ns; - }; - __webpack_require__.n = function(module) { - var getter = module && module.__esModule ? function getDefault() { - return module[\\"default\\"]; - } : function getModuleExports() { - return module; - }; - __webpack_require__.d(getter, \\"a\\", getter); - return getter; - }; - __webpack_require__.o = function(object, property) { - return Object.prototype.hasOwnProperty.call(object, property); - }; - __webpack_require__.p = \\"/\\"; - var jsonpArray = wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []; - var oldJsonpFunction = jsonpArray.push.bind(jsonpArray); - jsonpArray.push = webpackJsonpCallback; - jsonpArray = jsonpArray.slice(); - for (var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]); - var parentJsonpFunction = oldJsonpFunction; - checkDeferredModules(); -})([]); - -/** filePath: dist/taro.js **/ -(wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 1 ], [ function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - var _unused_webpack_default_export = \\"taro-runtime-mock\\"; -} ] ]); -" -`; diff --git a/packages/taro-mini-runner/__tests__/__snapshots__/vue3.spec.ts.snap b/packages/taro-mini-runner/__tests__/__snapshots__/vue3.spec.ts.snap deleted file mode 100644 index 403fdb2a1efd..000000000000 --- a/packages/taro-mini-runner/__tests__/__snapshots__/vue3.spec.ts.snap +++ /dev/null @@ -1,528 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`vue3 should build vue3 app 1`] = `13`; - -exports[`vue3 should build vue3 app 2`] = ` -" -/** filePath: dist/app.js **/ -require(\\"./runtime\\"); - -require(\\"./common\\"); - -require(\\"./taro\\"); - -(wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 3 ], { - 4: function(module, exports, __webpack_require__) {}, - 7: function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - __webpack_require__.r(__webpack_exports__); - var taro_runtime = __webpack_require__(0); - var vue = __webpack_require__(1); - var app = __webpack_require__(4); - var app_App = Object(vue[\\"createApp\\"])({ - onShow: function onShow(options) {} - }); - var lib_src_app = app_App; - var config = { - pages: [ \\"pages/index/index\\" ], - window: { - backgroundTextStyle: \\"light\\", - navigationBarBackgroundColor: \\"#fff\\", - navigationBarTitleText: \\"WeChat\\", - navigationBarTextStyle: \\"black\\" - } - }; - taro_runtime[\\"window\\"].__taroAppConfig = config; - var inst = App(Object(taro_runtime[\\"createVue3App\\"])(lib_src_app, vue[\\"h\\"], config)); - } -}, [ [ 7, 0, 1, 2 ] ] ]); - - - -/** filePath: dist/app.json **/ -{\\"pages\\":[\\"pages/index/index\\"],\\"window\\":{\\"backgroundTextStyle\\":\\"light\\",\\"navigationBarBackgroundColor\\":\\"#fff\\",\\"navigationBarTitleText\\":\\"WeChat\\",\\"navigationBarTextStyle\\":\\"black\\"}} - -/** filePath: dist/app.wxss **/ - - -/** filePath: dist/base.wxml **/ - - - - - - - - -- - - - -- - -- - - - -- - -- - - - -- - -{{i.v}} - - - - - - - -- - - - -- - -- - - - - - - - -- - -- - - - -- - -- - - - - - - - -- - -- - - - -- - -- - - - - - - - -- - -- - - - - - - - -- - -- - - - - - - - -- - -- - - - - - - - -- - -- - - - - - - - -- - -- - - - - - - - -- - -- - - - - - - - -- - -- - - - - - - - -- - -- - - - - - - - -- - -- - - - - - - - -- - -- - - - - - - - -- - -- - - - - - - - -- - -- - - -/** filePath: dist/common.js **/ -(wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 2 ], [ , function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - var _unused_webpack_default_export = \\"vue-mock\\"; -} ] ]); - -/** filePath: dist/comp.js **/ -(wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 5 ], { - 5: function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - __webpack_require__.r(__webpack_exports__); - var _tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0); - Component(Object(_tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__[\\"createRecursiveComponentConfig\\"])()); - } -}, [ [ 5, 0, 1 ] ] ]); - -/** filePath: dist/comp.json **/ -{\\"component\\":true,\\"usingComponents\\":{\\"comp\\":\\"./comp\\"}} - -/** filePath: dist/comp.wxml **/ - - - -/** filePath: dist/pages/index/index.js **/ -(wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 6 ], { - 6: function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - __webpack_require__.r(__webpack_exports__); - var taro_runtime = __webpack_require__(0); - var render = function() { - var _vm = this; - var _h = _vm.$createElement; - var _c = _vm._self._c || _h; - return _c(\\"view\\", { - staticClass: \\"index\\" - }, [ _c(\\"text\\", [ _vm._v(_vm._s(_vm.msg)) ]) ]); - }; - var staticRenderFns = []; - render._withStripped = true; - var vue = __webpack_require__(1); - var indexvue_type_script_lang_js_ = { - setup: function setup() { - var msg = Object(vue[\\"ref\\"])(\\"Hello world\\"); - return { - msg: msg - }; - } - }; - var pages_indexvue_type_script_lang_js_ = indexvue_type_script_lang_js_; - function normalizeComponent(scriptExports, render, staticRenderFns, functionalTemplate, injectStyles, scopeId, moduleIdentifier, shadowMode) { - var options = typeof scriptExports === \\"function\\" ? scriptExports.options : scriptExports; - if (render) { - options.render = render; - options.staticRenderFns = staticRenderFns; - options._compiled = true; - } - if (functionalTemplate) { - options.functional = true; - } - if (scopeId) { - options._scopeId = \\"data-v-\\" + scopeId; - } - var hook; - if (moduleIdentifier) { - hook = function(context) { - context = context || this.$vnode && this.$vnode.ssrContext || this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext; - if (!context && typeof __VUE_SSR_CONTEXT__ !== \\"undefined\\") { - context = __VUE_SSR_CONTEXT__; - } - if (injectStyles) { - injectStyles.call(this, context); - } - if (context && context._registeredComponents) { - context._registeredComponents.add(moduleIdentifier); - } - }; - options._ssrRegister = hook; - } else if (injectStyles) { - hook = shadowMode ? function() { - injectStyles.call(this, (options.functional ? this.parent : this).$root.$options.shadowRoot); - } : injectStyles; - } - if (hook) { - if (options.functional) { - options._injectStyles = hook; - var originalRender = options.render; - options.render = function renderWithStyleInjection(h, context) { - hook.call(context); - return originalRender(h, context); - }; - } else { - var existing = options.beforeCreate; - options.beforeCreate = existing ? [].concat(existing, hook) : [ hook ]; - } - } - return { - exports: scriptExports, - options: options - }; - } - var component = normalizeComponent(pages_indexvue_type_script_lang_js_, render, staticRenderFns, false, null, null, null); - if (false) { - var api; - } - component.options.__file = \\"src/pages/index/index.vue\\"; - var index = component.exports; - var config = { - navigationBarTitleText: \\"\\\\u9996\\\\u9875\\" - }; - var inst = Page(Object(taro_runtime[\\"createPageConfig\\"])(index, \\"pages/index/index\\", {}, config || {})); - } -}, [ [ 6, 0, 1, 2 ] ] ]); - -/** filePath: dist/pages/index/index.json **/ -{\\"navigationBarTitleText\\":\\"首页\\",\\"usingComponents\\":{\\"comp\\":\\"../../comp\\"}} - -/** filePath: dist/pages/index/index.wxml **/ - - - -/** filePath: dist/runtime.js **/ -(function(modules) { - function webpackJsonpCallback(data) { - var chunkIds = data[0]; - var moreModules = data[1]; - var executeModules = data[2]; - var moduleId, chunkId, i = 0, resolves = []; - for (;i < chunkIds.length; i++) { - chunkId = chunkIds[i]; - if (Object.prototype.hasOwnProperty.call(installedChunks, chunkId) && installedChunks[chunkId]) { - resolves.push(installedChunks[chunkId][0]); - } - installedChunks[chunkId] = 0; - } - for (moduleId in moreModules) { - if (Object.prototype.hasOwnProperty.call(moreModules, moduleId)) { - modules[moduleId] = moreModules[moduleId]; - } - } - if (parentJsonpFunction) parentJsonpFunction(data); - while (resolves.length) { - resolves.shift()(); - } - deferredModules.push.apply(deferredModules, executeModules || []); - return checkDeferredModules(); - } - function checkDeferredModules() { - var result; - for (var i = 0; i < deferredModules.length; i++) { - var deferredModule = deferredModules[i]; - var fulfilled = true; - for (var j = 1; j < deferredModule.length; j++) { - var depId = deferredModule[j]; - if (installedChunks[depId] !== 0) fulfilled = false; - } - if (fulfilled) { - deferredModules.splice(i--, 1); - result = __webpack_require__(__webpack_require__.s = deferredModule[0]); - } - } - return result; - } - var installedModules = {}; - var installedChunks = { - 0: 0 - }; - var deferredModules = []; - function __webpack_require__(moduleId) { - if (installedModules[moduleId]) { - return installedModules[moduleId].exports; - } - var module = installedModules[moduleId] = { - i: moduleId, - l: false, - exports: {} - }; - modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); - module.l = true; - return module.exports; - } - __webpack_require__.m = modules; - __webpack_require__.c = installedModules; - __webpack_require__.d = function(exports, name, getter) { - if (!__webpack_require__.o(exports, name)) { - Object.defineProperty(exports, name, { - enumerable: true, - get: getter - }); - } - }; - __webpack_require__.r = function(exports) { - if (typeof Symbol !== \\"undefined\\" && Symbol.toStringTag) { - Object.defineProperty(exports, Symbol.toStringTag, { - value: \\"Module\\" - }); - } - Object.defineProperty(exports, \\"__esModule\\", { - value: true - }); - }; - __webpack_require__.t = function(value, mode) { - if (mode & 1) value = __webpack_require__(value); - if (mode & 8) return value; - if (mode & 4 && typeof value === \\"object\\" && value && value.__esModule) return value; - var ns = Object.create(null); - __webpack_require__.r(ns); - Object.defineProperty(ns, \\"default\\", { - enumerable: true, - value: value - }); - if (mode & 2 && typeof value != \\"string\\") for (var key in value) __webpack_require__.d(ns, key, function(key) { - return value[key]; - }.bind(null, key)); - return ns; - }; - __webpack_require__.n = function(module) { - var getter = module && module.__esModule ? function getDefault() { - return module[\\"default\\"]; - } : function getModuleExports() { - return module; - }; - __webpack_require__.d(getter, \\"a\\", getter); - return getter; - }; - __webpack_require__.o = function(object, property) { - return Object.prototype.hasOwnProperty.call(object, property); - }; - __webpack_require__.p = \\"/\\"; - var jsonpArray = wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []; - var oldJsonpFunction = jsonpArray.push.bind(jsonpArray); - jsonpArray.push = webpackJsonpCallback; - jsonpArray = jsonpArray.slice(); - for (var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]); - var parentJsonpFunction = oldJsonpFunction; - checkDeferredModules(); -})([]); - -/** filePath: dist/taro.js **/ -(wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 1 ], [ function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - var _unused_webpack_default_export = \\"taro-runtime-mock\\"; -} ] ]); -" -`; diff --git a/packages/taro-mini-runner/__tests__/__snapshots__/wx-hybrid.spec.ts.snap b/packages/taro-mini-runner/__tests__/__snapshots__/wx-hybrid.spec.ts.snap deleted file mode 100644 index 9cb070786694..000000000000 --- a/packages/taro-mini-runner/__tests__/__snapshots__/wx-hybrid.spec.ts.snap +++ /dev/null @@ -1,893 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`wx-hybrid should compatible with weapp native pages and components 1`] = `22`; - -exports[`wx-hybrid should compatible with weapp native pages and components 2`] = ` -" -/** filePath: dist/app.js **/ -require(\\"./runtime\\"); - -require(\\"./common\\"); - -require(\\"./vendors\\"); - -require(\\"./taro\\"); - -(wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 4 ], { - 14: function(module, exports, __webpack_require__) {}, - 23: function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - __webpack_require__.r(__webpack_exports__); - var taro_runtime = __webpack_require__(1); - var classCallCheck = __webpack_require__(4); - var createClass = __webpack_require__(5); - var possibleConstructorReturn = __webpack_require__(7); - var getPrototypeOf = __webpack_require__(6); - var inherits = __webpack_require__(8); - var taro = __webpack_require__(3); - var react = __webpack_require__(0); - var app = __webpack_require__(14); - var app_App = function(_React$Component) { - Object(inherits[\\"a\\"])(App, _React$Component); - function App() { - Object(classCallCheck[\\"a\\"])(this, App); - return Object(possibleConstructorReturn[\\"a\\"])(this, Object(getPrototypeOf[\\"a\\"])(App).apply(this, arguments)); - } - Object(createClass[\\"a\\"])(App, [ { - key: \\"componentDidMount\\", - value: function componentDidMount() {} - }, { - key: \\"componentDidShow\\", - value: function componentDidShow() {} - }, { - key: \\"componentDidHide\\", - value: function componentDidHide() {} - }, { - key: \\"componentCatchError\\", - value: function componentCatchError() {} - }, { - key: \\"render\\", - value: function render() { - return this.props.children; - } - } ]); - return App; - }(react[\\"default\\"].Component); - var lib_src_app = app_App; - var taro_react = __webpack_require__(9); - var config = { - pages: [ \\"pages/index/index\\", \\"pages/native/native\\" ], - window: { - backgroundTextStyle: \\"light\\", - navigationBarBackgroundColor: \\"#fff\\", - navigationBarTitleText: \\"WeChat\\", - navigationBarTextStyle: \\"black\\" - } - }; - taro_runtime[\\"window\\"].__taroAppConfig = config; - var inst = App(Object(taro_runtime[\\"createReactApp\\"])(lib_src_app, react, taro_react[\\"a\\"], config)); - } -}, [ [ 23, 0, 1, 3, 2 ] ] ]); - - - -/** filePath: dist/app.json **/ -{\\"pages\\":[\\"pages/index/index\\",\\"pages/native/native\\"],\\"window\\":{\\"backgroundTextStyle\\":\\"light\\",\\"navigationBarBackgroundColor\\":\\"#fff\\",\\"navigationBarTitleText\\":\\"WeChat\\",\\"navigationBarTextStyle\\":\\"black\\"}} - -/** filePath: dist/app.wxss **/ - - -/** filePath: dist/base.wxml **/ - - - - - - - - -- - - - - - - - -- - -- - - - -- - -- - - - -- - -{{i.v}} - - - -- - - - - - - - -- - -- - - - -- - -- - - - -- - -- - - - - - - - -- - -- - - - -- - -- - - - -- - -- - - - - - - - -- - -- - - - -- - -- - - - -- - -- - - - - - - - -- - -- - - - -- - -- - - - - - - - -- - -- - - - -- - -- - - - - - - - -- - -- - - - -- - -- - - - - - - - -- - -- - - - -- - -- - - - - - - - -- - -- - - - -- - -- - - - - - - - -- - -- - - - -- - -- - - - - - - - -- - -- - - - -- - -- - - - - - - - -- - -- - - - -- - -- - - - - - - - -- - -- - - - -- - -- - - - - - - - -- - -- - - - -- - -- - - - - - - - -- - -- - - - -- - -- - - - - - - - -- - -- - - -/** filePath: dist/common.js **/ -(wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 2 ], [ function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - __webpack_require__.r(__webpack_exports__); - __webpack_exports__[\\"default\\"] = \\"react-mock\\"; -}, , , function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - __webpack_exports__[\\"a\\"] = \\"taro\\"; -} ] ]); - -/** filePath: dist/comp.js **/ -(wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 6 ], { - 15: function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - __webpack_require__.r(__webpack_exports__); - var _tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1); - Component(Object(_tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__[\\"createRecursiveComponentConfig\\"])()); - } -}, [ [ 15, 0, 1 ] ] ]); - -/** filePath: dist/comp.json **/ -{\\"component\\":true,\\"usingComponents\\":{\\"comp\\":\\"./comp\\"}} - -/** filePath: dist/comp.wxml **/ - - - -/** filePath: dist/components/tab/tab.js **/ -(wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 7 ], { - 21: function(module, exports) { - Component({ - behaviors: [], - properties: { - myProperty: { - type: String, - value: \\"\\", - observer: function observer(newVal, oldVal, changedPath) {} - }, - myProperty2: String - }, - data: {}, - attached: function attached() {}, - moved: function moved() {}, - detached: function detached() {}, - methods: { - onMyButtonTap: function onMyButtonTap() { - this.setData({}); - }, - _myPrivateMethod: function _myPrivateMethod() { - this.setData({ - \\"A[0].B\\": \\"myPrivateData\\" - }); - }, - _propertyChange: function _propertyChange(newVal, oldVal) {}, - clickHandler: function clickHandler() { - console.log(\\"sdsd\\"); - this.triggerEvent(\\"myevent\\", { - f: 1 - }); - } - } - }); - } -}, [ [ 21, 0 ] ] ]); - -/** filePath: dist/components/tab/tab.json **/ -{\\"component\\":true,\\"usingComponents\\":{}} - -/** filePath: dist/components/tab/tab.wxml **/ - - {{myProperty}} - - - -/** filePath: dist/pages/index/index.js **/ -(wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 10 ], { - 16: function(module, exports, __webpack_require__) {}, - 24: function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - __webpack_require__.r(__webpack_exports__); - var taro_runtime = __webpack_require__(1); - var classCallCheck = __webpack_require__(4); - var createClass = __webpack_require__(5); - var possibleConstructorReturn = __webpack_require__(7); - var getPrototypeOf = __webpack_require__(6); - var inherits = __webpack_require__(8); - var taro = __webpack_require__(3); - var react = __webpack_require__(0); - var taro_components = __webpack_require__(2); - var index = __webpack_require__(16); - var index_Index = function(_React$Component) { - Object(inherits[\\"a\\"])(Index, _React$Component); - function Index() { - Object(classCallCheck[\\"a\\"])(this, Index); - return Object(possibleConstructorReturn[\\"a\\"])(this, Object(getPrototypeOf[\\"a\\"])(Index).apply(this, arguments)); - } - Object(createClass[\\"a\\"])(Index, [ { - key: \\"gotoWxParse\\", - value: function gotoWxParse() { - taro[\\"a\\"].navigateTo({ - url: \\"/pages/wxParse/wxParse\\" - }); - } - }, { - key: \\"gotoEcharts\\", - value: function gotoEcharts() { - taro[\\"a\\"].navigateTo({ - url: \\"/pages/echarts/echarts\\" - }); - } - }, { - key: \\"gotoNative\\", - value: function gotoNative() { - taro[\\"a\\"].navigateTo({ - url: \\"/pages/native/native\\" - }); - } - }, { - key: \\"tabEvent\\", - value: function tabEvent(e) { - console.log(e); - } - }, { - key: \\"render\\", - value: function render() { - return react[\\"default\\"].createElement(taro_components[\\"View\\"], { - className: \\"index\\" - }, react[\\"default\\"].createElement(taro_components[\\"View\\"], { - className: \\"title\\" - }, \\"\\\\u4e0e\\\\u5c0f\\\\u7a0b\\\\u5e8f\\\\u539f\\\\u751f\\\\u878d\\\\u5408\\\\u7684\\\\u5404\\\\u79cd\\\\u793a\\\\u4f8b\\"), react[\\"default\\"].createElement(taro_components[\\"View\\"], { - className: \\"main\\" - }, react[\\"default\\"].createElement(taro_components[\\"View\\"], { - className: \\"wrapper\\" - }, react[\\"default\\"].createElement(\\"tab\\", { - onMyevent: this.tabEvent, - myProperty: \\"This is tab\\" - })), react[\\"default\\"].createElement(taro_components[\\"View\\"], { - className: \\"wrapper\\" - }, react[\\"default\\"].createElement(taro_components[\\"Button\\"], { - type: \\"primary\\", - onClick: this.gotoNative - }, \\"\\\\u6df7\\\\u5199\\\\u539f\\\\u751f\\\\u9875\\\\u9762\\\\u793a\\\\u4f8b\\")))); - } - } ]); - return Index; - }(react[\\"default\\"].Component); - var config = { - navigationBarTitleText: \\"\\\\u9996\\\\u9875\\", - usingComponents: { - tab: \\"../../components/tab/tab\\" - } - }; - var inst = Page(Object(taro_runtime[\\"createPageConfig\\"])(index_Index, \\"pages/index/index\\", {}, config || {})); - } -}, [ [ 24, 0, 1, 3, 2 ] ] ]); - -/** filePath: dist/pages/index/index.json **/ -{\\"navigationBarTitleText\\":\\"首页\\",\\"usingComponents\\":{\\"comp\\":\\"../../comp\\",\\"tab\\":\\"../../components/tab/tab\\"}} - -/** filePath: dist/pages/index/index.wxml **/ -- - -/** filePath: dist/pages/index/index.wxss **/ -.title{text-align:center;line-height:80rpx;font-size:36rpx}.main{padding:0 50rpx}.wrapper{margin-bottom:24rpx} - -/** filePath: dist/pages/native/native.js **/ -(wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 12 ], { - 17: function(module, exports, __webpack_require__) { - var _require = __webpack_require__(18), add = _require.add; - Page({ - data: { - text: \\"This is page data.\\", - x: add(1, 2) - }, - created: function created(options) { - console.log(options); - }, - onReady: function onReady() {}, - viewTap: function viewTap() { - this.setData({ - text: \\"Set some data for updating view.\\" - }, (function() {})); - }, - handler: function handler(e) { - console.log(e); - }, - customData: { - hi: \\"MINA\\" - } - }); - }, - 18: function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - __webpack_require__.r(__webpack_exports__); - __webpack_require__.d(__webpack_exports__, \\"add\\", (function() { - return add; - })); - function add(a, b) { - return a + b; - } - } -}, [ [ 17, 0 ] ] ]); - -/** filePath: dist/pages/native/native.json **/ -{\\"navigationBarBackgroundColor\\":\\"#ffffff\\",\\"navigationBarTextStyle\\":\\"black\\",\\"navigationBarTitleText\\":\\"混写页面示例\\",\\"backgroundColor\\":\\"#eeeeee\\",\\"backgroundTextStyle\\":\\"light\\",\\"usingComponents\\":{\\"tab\\":\\"../../components/tab/tab\\"}} - -/** filePath: dist/pages/native/native.wxml **/ - - - - -/** filePath: dist/pages/native/native.wxss **/ -.native{color:red} - -/** filePath: dist/runtime.js **/ -(function(modules) { - function webpackJsonpCallback(data) { - var chunkIds = data[0]; - var moreModules = data[1]; - var executeModules = data[2]; - var moduleId, chunkId, i = 0, resolves = []; - for (;i < chunkIds.length; i++) { - chunkId = chunkIds[i]; - if (Object.prototype.hasOwnProperty.call(installedChunks, chunkId) && installedChunks[chunkId]) { - resolves.push(installedChunks[chunkId][0]); - } - installedChunks[chunkId] = 0; - } - for (moduleId in moreModules) { - if (Object.prototype.hasOwnProperty.call(moreModules, moduleId)) { - modules[moduleId] = moreModules[moduleId]; - } - } - if (parentJsonpFunction) parentJsonpFunction(data); - while (resolves.length) { - resolves.shift()(); - } - deferredModules.push.apply(deferredModules, executeModules || []); - return checkDeferredModules(); - } - function checkDeferredModules() { - var result; - for (var i = 0; i < deferredModules.length; i++) { - var deferredModule = deferredModules[i]; - var fulfilled = true; - for (var j = 1; j < deferredModule.length; j++) { - var depId = deferredModule[j]; - if (installedChunks[depId] !== 0) fulfilled = false; - } - if (fulfilled) { - deferredModules.splice(i--, 1); - result = __webpack_require__(__webpack_require__.s = deferredModule[0]); - } - } - return result; - } - var installedModules = {}; - var installedChunks = { - 0: 0 - }; - var deferredModules = []; - function __webpack_require__(moduleId) { - if (installedModules[moduleId]) { - return installedModules[moduleId].exports; - } - var module = installedModules[moduleId] = { - i: moduleId, - l: false, - exports: {} - }; - modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); - module.l = true; - return module.exports; - } - __webpack_require__.m = modules; - __webpack_require__.c = installedModules; - __webpack_require__.d = function(exports, name, getter) { - if (!__webpack_require__.o(exports, name)) { - Object.defineProperty(exports, name, { - enumerable: true, - get: getter - }); - } - }; - __webpack_require__.r = function(exports) { - if (typeof Symbol !== \\"undefined\\" && Symbol.toStringTag) { - Object.defineProperty(exports, Symbol.toStringTag, { - value: \\"Module\\" - }); - } - Object.defineProperty(exports, \\"__esModule\\", { - value: true - }); - }; - __webpack_require__.t = function(value, mode) { - if (mode & 1) value = __webpack_require__(value); - if (mode & 8) return value; - if (mode & 4 && typeof value === \\"object\\" && value && value.__esModule) return value; - var ns = Object.create(null); - __webpack_require__.r(ns); - Object.defineProperty(ns, \\"default\\", { - enumerable: true, - value: value - }); - if (mode & 2 && typeof value != \\"string\\") for (var key in value) __webpack_require__.d(ns, key, function(key) { - return value[key]; - }.bind(null, key)); - return ns; - }; - __webpack_require__.n = function(module) { - var getter = module && module.__esModule ? function getDefault() { - return module[\\"default\\"]; - } : function getModuleExports() { - return module; - }; - __webpack_require__.d(getter, \\"a\\", getter); - return getter; - }; - __webpack_require__.o = function(object, property) { - return Object.prototype.hasOwnProperty.call(object, property); - }; - __webpack_require__.p = \\"/\\"; - var jsonpArray = wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []; - var oldJsonpFunction = jsonpArray.push.bind(jsonpArray); - jsonpArray.push = webpackJsonpCallback; - jsonpArray = jsonpArray.slice(); - for (var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]); - var parentJsonpFunction = oldJsonpFunction; - checkDeferredModules(); -})([]); - -/** filePath: dist/taro.js **/ -(wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 1 ], { - 1: function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - var _unused_webpack_default_export = \\"taro-runtime-mock\\"; - }, - 2: function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - var _unused_webpack_default_export = \\"taro-components-mock\\"; - }, - 9: function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - __webpack_exports__[\\"a\\"] = \\"taro-react-mock\\"; - } -} ]); - -/** filePath: dist/vendors.js **/ -(wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 3 ], [ , , , , function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - __webpack_require__.d(__webpack_exports__, \\"a\\", (function() { - return _classCallCheck; - })); - function _classCallCheck(instance, Constructor) { - if (!(instance instanceof Constructor)) { - throw new TypeError(\\"Cannot call a class as a function\\"); - } - } -}, function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - __webpack_require__.d(__webpack_exports__, \\"a\\", (function() { - return _createClass; - })); - function _defineProperties(target, props) { - for (var i = 0; i < props.length; i++) { - var descriptor = props[i]; - descriptor.enumerable = descriptor.enumerable || false; - descriptor.configurable = true; - if (\\"value\\" in descriptor) descriptor.writable = true; - Object.defineProperty(target, descriptor.key, descriptor); - } - } - function _createClass(Constructor, protoProps, staticProps) { - if (protoProps) _defineProperties(Constructor.prototype, protoProps); - if (staticProps) _defineProperties(Constructor, staticProps); - return Constructor; - } -}, function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - __webpack_require__.d(__webpack_exports__, \\"a\\", (function() { - return _getPrototypeOf; - })); - function _getPrototypeOf(o) { - _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { - return o.__proto__ || Object.getPrototypeOf(o); - }; - return _getPrototypeOf(o); - } -}, function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - __webpack_require__.d(__webpack_exports__, \\"a\\", (function() { - return _possibleConstructorReturn; - })); - function _typeof(obj) { - \\"@babel/helpers - typeof\\"; - if (typeof Symbol === \\"function\\" && typeof Symbol.iterator === \\"symbol\\") { - _typeof = function _typeof(obj) { - return typeof obj; - }; - } else { - _typeof = function _typeof(obj) { - return obj && typeof Symbol === \\"function\\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \\"symbol\\" : typeof obj; - }; - } - return _typeof(obj); - } - function _assertThisInitialized(self) { - if (self === void 0) { - throw new ReferenceError(\\"this hasn't been initialised - super() hasn't been called\\"); - } - return self; - } - function _possibleConstructorReturn(self, call) { - if (call && (_typeof(call) === \\"object\\" || typeof call === \\"function\\")) { - return call; - } - return _assertThisInitialized(self); - } -}, function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - __webpack_require__.d(__webpack_exports__, \\"a\\", (function() { - return _inherits; - })); - function _setPrototypeOf(o, p) { - _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { - o.__proto__ = p; - return o; - }; - return _setPrototypeOf(o, p); - } - function _inherits(subClass, superClass) { - if (typeof superClass !== \\"function\\" && superClass !== null) { - throw new TypeError(\\"Super expression must either be null or a function\\"); - } - subClass.prototype = Object.create(superClass && superClass.prototype, { - constructor: { - value: subClass, - writable: true, - configurable: true - } - }); - if (superClass) _setPrototypeOf(subClass, superClass); - } -} ] ]); -" -`; diff --git a/packages/taro-mini-runner/__tests__/qq.spec.ts b/packages/taro-mini-runner/__tests__/qq.spec.ts deleted file mode 100644 index 8640cb2f04dc..000000000000 --- a/packages/taro-mini-runner/__tests__/qq.spec.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { compile, getOutput } from './utils/compiler' -import { Template } from '@tarojs/cli/src/presets/platforms/qq' - -describe('qq', () => { - test('should build qq app', async () => { - const { stats, config } = await compile('react', { - buildAdapter: 'qq', - globalObject: 'qq', - fileType: { - templ: '.qml', - style: '.qss', - config: '.json', - script: '.js', - xs: '.wxs' - }, - template: new Template() - }) - const assets = stats.toJson().assets - - expect(assets.length).toMatchSnapshot() - - const output = getOutput(stats, config) - expect(output).toMatchSnapshot() - }) - - test('should base template loop 10 times', async () => { - const { stats, config } = await compile('react', { - buildAdapter: 'qq', - baseLevel: 10 - }) - const assets = stats.toJson().assets - - expect(assets.length).toMatchSnapshot() - - const output = getOutput(stats, config) - expect(output).toMatchSnapshot() - }) -}) diff --git a/packages/taro-mini-runner/jest.config.js b/packages/taro-mini-runner/jest.config.js index 0cf697f1b30b..144639ed84e1 100644 --- a/packages/taro-mini-runner/jest.config.js +++ b/packages/taro-mini-runner/jest.config.js @@ -2,7 +2,7 @@ module.exports = { preset: 'ts-jest', testEnvironment: 'node', moduleFileExtensions: ['ts', 'tsx', 'js', 'json', 'jsx', 'node'], - setupFilesAfterEnv: ['./__tests__/setup/index.ts'], + setupFilesAfterEnv: ['./src/__tests__/setup/index.ts'], testMatch: ['**/__tests__/?(*.)+(spec|test).[jt]s?(x)'], globals: { 'ts-jest': { diff --git a/packages/taro-mini-runner/src/__tests__/__snapshots__/alipay.spec.ts.snap b/packages/taro-mini-runner/src/__tests__/__snapshots__/alipay.spec.ts.snap new file mode 100644 index 000000000000..87348cf7c15f --- /dev/null +++ b/packages/taro-mini-runner/src/__tests__/__snapshots__/alipay.spec.ts.snap @@ -0,0 +1,2653 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`alipay should build alipay app 1`] = `13`; + +exports[`alipay should build alipay app 2`] = ` +" +/** filePath: dist/app.acss **/ + + +/** filePath: dist/app.js **/ +require(\\"./runtime\\"); + +require(\\"./common\\"); + +require(\\"./vendors\\"); + +require(\\"./taro\\"); + +(my[\\"webpackJsonp\\"] = my[\\"webpackJsonp\\"] || []).push([ [ 4 ], { + 12: function(module, exports, __webpack_require__) {}, + 18: function(module, __webpack_exports__, __webpack_require__) { + \\"use strict\\"; + __webpack_require__.r(__webpack_exports__); + function _arrayLikeToArray(arr, len) { + if (len == null || len > arr.length) len = arr.length; + for (var i = 0, arr2 = new Array(len); i < len; i++) { + arr2[i] = arr[i]; + } + return arr2; + } + function _arrayWithoutHoles(arr) { + if (Array.isArray(arr)) return _arrayLikeToArray(arr); + } + function _iterableToArray(iter) { + if (typeof Symbol !== \\"undefined\\" && Symbol.iterator in Object(iter)) return Array.from(iter); + } + function _unsupportedIterableToArray(o, minLen) { + if (!o) return; + if (typeof o === \\"string\\") return _arrayLikeToArray(o, minLen); + var n = Object.prototype.toString.call(o).slice(8, -1); + if (n === \\"Object\\" && o.constructor) n = o.constructor.name; + if (n === \\"Map\\" || n === \\"Set\\") return Array.from(o); + if (n === \\"Arguments\\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); + } + function _nonIterableSpread() { + throw new TypeError(\\"Invalid attempt to spread non-iterable instance.\\\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\\"); + } + function _toConsumableArray(arr) { + return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); + } + function _typeof(obj) { + \\"@babel/helpers - typeof\\"; + if (typeof Symbol === \\"function\\" && typeof Symbol.iterator === \\"symbol\\") { + _typeof = function _typeof(obj) { + return typeof obj; + }; + } else { + _typeof = function _typeof(obj) { + return obj && typeof Symbol === \\"function\\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \\"symbol\\" : typeof obj; + }; + } + return _typeof(obj); + } + function _assertThisInitialized(self) { + if (self === void 0) { + throw new ReferenceError(\\"this hasn't been initialised - super() hasn't been called\\"); + } + return self; + } + function _possibleConstructorReturn(self, call) { + if (call && (_typeof(call) === \\"object\\" || typeof call === \\"function\\")) { + return call; + } + return _assertThisInitialized(self); + } + function _getPrototypeOf(o) { + _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { + return o.__proto__ || Object.getPrototypeOf(o); + }; + return _getPrototypeOf(o); + } + function _setPrototypeOf(o, p) { + _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { + o.__proto__ = p; + return o; + }; + return _setPrototypeOf(o, p); + } + function _inherits(subClass, superClass) { + if (typeof superClass !== \\"function\\" && superClass !== null) { + throw new TypeError(\\"Super expression must either be null or a function\\"); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + writable: true, + configurable: true + } + }); + if (superClass) _setPrototypeOf(subClass, superClass); + } + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError(\\"Cannot call a class as a function\\"); + } + } + function _defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if (\\"value\\" in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + function _createClass(Constructor, protoProps, staticProps) { + if (protoProps) _defineProperties(Constructor.prototype, protoProps); + if (staticProps) _defineProperties(Constructor, staticProps); + return Constructor; + } + function isString(o) { + return typeof o === \\"string\\"; + } + function isUndefined(o) { + return typeof o === \\"undefined\\"; + } + function isNull(o) { + return o === null; + } + function isObject(o) { + return o !== null && _typeof(o) === \\"object\\"; + } + function isBoolean(o) { + return o === true || o === false; + } + function isFunction(o) { + return typeof o === \\"function\\"; + } + function isNumber(o) { + return typeof o === \\"number\\"; + } + function isBooleanStringLiteral(o) { + return o === \\"true\\" || o === \\"false\\"; + } + var isArray = Array.isArray; + var styles = { + style: \\"i.\\".concat(\\"st\\"), + class: \\"i.\\".concat(\\"cl\\") + }; + var events = { + bindtap: \\"eh\\" + }; + var touchEvents = { + bindTouchStart: \\"\\", + bindTouchMove: \\"\\", + bindTouchEnd: \\"\\", + bindTouchCancel: \\"\\", + bindLongTap: \\"\\" + }; + var animationEvents = { + bindAnimationStart: \\"\\", + bindAnimationIteration: \\"\\", + bindAnimationEnd: \\"\\", + bindTransitionEnd: \\"\\" + }; + var specialEvents = new Set([ \\"htouchmove\\", \\"vtouchmove\\" ]); + function singleQuote(s) { + return \\"'\\".concat(s, \\"'\\"); + } + var View = Object.assign(Object.assign({ + \\"hover-class\\": singleQuote(\\"none\\"), + \\"hover-stop-propagation\\": \\"false\\", + \\"hover-start-time\\": \\"50\\", + \\"hover-stay-time\\": \\"400\\", + animation: \\"\\" + }, touchEvents), animationEvents); + var Icon = { + type: \\"\\", + size: \\"23\\", + color: \\"\\" + }; + var MapComp = Object.assign({ + longitude: \\"\\", + latitude: \\"\\", + scale: \\"16\\", + markers: \\"[]\\", + covers: \\"\\", + polyline: \\"[]\\", + circles: \\"[]\\", + controls: \\"[]\\", + \\"include-points\\": \\"[]\\", + \\"show-location\\": \\"\\", + \\"layer-style\\": \\"1\\", + bindMarkerTap: \\"\\", + bindControlTap: \\"\\", + bindCalloutTap: \\"\\", + bindUpdated: \\"\\" + }, touchEvents); + var Progress = { + percent: \\"\\", + \\"stroke-width\\": \\"6\\", + color: singleQuote(\\"#09BB07\\"), + activeColor: singleQuote(\\"#09BB07\\"), + backgroundColor: singleQuote(\\"#EBEBEB\\"), + active: \\"false\\", + \\"active-mode\\": singleQuote(\\"backwards\\"), + \\"show-info\\": \\"false\\" + }; + var RichText = { + nodes: \\"[]\\" + }; + var Text = { + selectable: \\"false\\", + space: \\"\\", + decode: \\"false\\" + }; + var Button = { + size: singleQuote(\\"default\\"), + type: \\"\\", + plain: \\"false\\", + disabled: \\"\\", + loading: \\"false\\", + \\"form-type\\": \\"\\", + \\"open-type\\": \\"\\", + \\"hover-class\\": singleQuote(\\"button-hover\\"), + \\"hover-stop-propagation\\": \\"false\\", + \\"hover-start-time\\": \\"20\\", + \\"hover-stay-time\\": \\"70\\", + name: \\"\\" + }; + var Checkbox = { + value: \\"\\", + disabled: \\"\\", + checked: \\"false\\", + color: singleQuote(\\"#09BB07\\"), + name: \\"\\" + }; + var CheckboxGroup = { + bindChange: \\"\\", + name: \\"\\" + }; + var Form = { + \\"report-submit\\": \\"false\\", + bindSubmit: \\"\\", + bindReset: \\"\\", + name: \\"\\" + }; + var Input = { + value: \\"\\", + type: singleQuote(\\"\\"), + password: \\"false\\", + placeholder: \\"\\", + \\"placeholder-style\\": \\"\\", + \\"placeholder-class\\": singleQuote(\\"input-placeholder\\"), + disabled: \\"\\", + maxlength: \\"140\\", + \\"cursor-spacing\\": \\"0\\", + focus: \\"false\\", + \\"confirm-type\\": singleQuote(\\"done\\"), + \\"confirm-hold\\": \\"false\\", + cursor: \\"i.value.length\\", + \\"selection-start\\": \\"-1\\", + \\"selection-end\\": \\"-1\\", + bindInput: \\"\\", + bindFocus: \\"\\", + bindBlur: \\"\\", + bindConfirm: \\"\\", + name: \\"\\" + }; + var Label = { + for: \\"\\", + name: \\"\\" + }; + var Picker = { + mode: singleQuote(\\"selector\\"), + disabled: \\"\\", + range: \\"\\", + \\"range-key\\": \\"\\", + value: \\"\\", + start: \\"\\", + end: \\"\\", + fields: singleQuote(\\"day\\"), + \\"custom-item\\": \\"\\", + name: \\"\\", + bindCancel: \\"\\", + bindChange: \\"\\", + bindColumnChange: \\"\\" + }; + var PickerView = { + value: \\"\\", + \\"indicator-style\\": \\"\\", + \\"indicator-class\\": \\"\\", + \\"mask-style\\": \\"\\", + \\"mask-class\\": \\"\\", + bindChange: \\"\\", + name: \\"\\" + }; + var PickerViewColumn = { + name: \\"\\" + }; + var Radio = { + value: \\"\\", + checked: \\"false\\", + disabled: \\"\\", + color: singleQuote(\\"#09BB07\\"), + name: \\"\\" + }; + var RadioGroup = { + bindChange: \\"\\", + name: \\"\\" + }; + var Slider = { + min: \\"0\\", + max: \\"100\\", + step: \\"1\\", + disabled: \\"\\", + value: \\"0\\", + activeColor: singleQuote(\\"#1aad19\\"), + backgroundColor: singleQuote(\\"#e9e9e9\\"), + \\"block-size\\": \\"28\\", + \\"block-color\\": singleQuote(\\"#ffffff\\"), + \\"show-value\\": \\"false\\", + bindChange: \\"\\", + bindChanging: \\"\\", + name: \\"\\" + }; + var Switch = { + checked: \\"false\\", + disabled: \\"\\", + type: singleQuote(\\"switch\\"), + color: singleQuote(\\"#04BE02\\"), + bindChange: \\"\\", + name: \\"\\" + }; + var Textarea = { + value: \\"\\", + placeholder: \\"\\", + \\"placeholder-style\\": \\"\\", + \\"placeholder-class\\": singleQuote(\\"textarea-placeholder\\"), + disabled: \\"\\", + maxlength: \\"140\\", + \\"auto-focus\\": \\"false\\", + focus: \\"false\\", + \\"auto-height\\": \\"false\\", + fixed: \\"false\\", + \\"cursor-spacing\\": \\"0\\", + cursor: \\"-1\\", + \\"selection-start\\": \\"-1\\", + \\"selection-end\\": \\"-1\\", + bindFocus: \\"\\", + bindBlur: \\"\\", + bindLineChange: \\"\\", + bindInput: \\"\\", + bindConfirm: \\"\\", + name: \\"\\" + }; + var CoverImage = { + src: \\"\\", + bindLoad: \\"eh\\", + bindError: \\"eh\\" + }; + var CoverView = Object.assign({ + \\"scroll-top\\": \\"false\\" + }, touchEvents); + var MovableArea = { + \\"scale-area\\": \\"false\\" + }; + var MovableView = Object.assign(Object.assign({ + direction: \\"none\\", + inertia: \\"false\\", + \\"out-of-bounds\\": \\"false\\", + x: \\"\\", + y: \\"\\", + damping: \\"20\\", + friction: \\"2\\", + disabled: \\"\\", + scale: \\"false\\", + \\"scale-min\\": \\"0.5\\", + \\"scale-max\\": \\"10\\", + \\"scale-value\\": \\"1\\", + animation: \\"true\\", + bindChange: \\"\\", + bindScale: \\"\\", + htouchmove: \\"\\", + vtouchmove: \\"\\", + width: singleQuote(\\"10px\\"), + height: singleQuote(\\"10px\\") + }, touchEvents), animationEvents); + var ScrollView = Object.assign(Object.assign({ + \\"scroll-x\\": \\"false\\", + \\"scroll-y\\": \\"false\\", + \\"upper-threshold\\": \\"50\\", + \\"lower-threshold\\": \\"50\\", + \\"scroll-top\\": \\"\\", + \\"scroll-left\\": \\"\\", + \\"scroll-into-view\\": \\"\\", + \\"scroll-with-animation\\": \\"false\\", + \\"enable-back-to-top\\": \\"false\\", + bindScrollToUpper: \\"\\", + bindScrollToLower: \\"\\", + bindScroll: \\"\\" + }, touchEvents), animationEvents); + var Swiper = Object.assign({ + \\"indicator-dots\\": \\"false\\", + \\"indicator-color\\": singleQuote(\\"rgba(0, 0, 0, .3)\\"), + \\"indicator-active-color\\": singleQuote(\\"#000000\\"), + autoplay: \\"false\\", + current: \\"0\\", + interval: \\"5000\\", + duration: \\"500\\", + circular: \\"false\\", + vertical: \\"false\\", + \\"previous-margin\\": \\"'0px'\\", + \\"next-margin\\": \\"'0px'\\", + \\"display-multiple-items\\": \\"1\\", + bindChange: \\"\\", + bindTransition: \\"\\", + bindAnimationFinish: \\"\\" + }, touchEvents); + var SwiperItem = { + \\"item-id\\": \\"\\" + }; + var Navigator = { + url: \\"\\", + \\"open-type\\": singleQuote(\\"navigate\\"), + delta: \\"1\\", + \\"hover-class\\": singleQuote(\\"navigator-hover\\"), + \\"hover-stop-propagation\\": \\"false\\", + \\"hover-start-time\\": \\"50\\", + \\"hover-stay-time\\": \\"600\\", + bindSuccess: \\"\\", + bindFail: \\"\\", + bindComplete: \\"\\" + }; + var Audio = { + id: \\"\\", + src: \\"\\", + loop: \\"false\\", + controls: \\"false\\", + poster: \\"\\", + name: \\"\\", + author: \\"\\", + bindError: \\"\\", + bindPlay: \\"\\", + bindPause: \\"\\", + bindTimeUpdate: \\"\\", + bindEnded: \\"\\" + }; + var Camera = { + \\"device-position\\": singleQuote(\\"back\\"), + flash: singleQuote(\\"auto\\"), + bindStop: \\"\\", + bindError: \\"\\" + }; + var Image = Object.assign({ + src: \\"\\", + mode: singleQuote(\\"scaleToFill\\"), + \\"lazy-load\\": \\"false\\", + bindError: \\"\\", + bindLoad: \\"\\" + }, touchEvents); + var LivePlayer = { + src: \\"\\", + autoplay: \\"false\\", + muted: \\"false\\", + orientation: singleQuote(\\"vertical\\"), + \\"object-fit\\": singleQuote(\\"contain\\"), + \\"background-mute\\": \\"false\\", + \\"min-cache\\": \\"1\\", + \\"max-cache\\": \\"3\\", + animation: \\"\\", + bindStateChange: \\"\\", + bindFullScreenChange: \\"\\", + bindNetStatus: \\"\\" + }; + var Video = { + src: \\"\\", + duration: \\"\\", + controls: \\"true\\", + \\"danmu-list\\": \\"\\", + \\"danmu-btn\\": \\"\\", + \\"enable-danmu\\": \\"\\", + autoplay: \\"false\\", + loop: \\"false\\", + muted: \\"false\\", + \\"initial-time\\": \\"0\\", + \\"page-gesture\\": \\"false\\", + direction: \\"\\", + \\"show-progress\\": \\"true\\", + \\"show-fullscreen-btn\\": \\"true\\", + \\"show-play-btn\\": \\"true\\", + \\"show-center-play-btn\\": \\"true\\", + \\"enable-progress-gesture\\": \\"true\\", + \\"object-fit\\": singleQuote(\\"contain\\"), + poster: \\"\\", + \\"show-mute-btn\\": \\"false\\", + animation: \\"\\", + bindPlay: \\"\\", + bindPause: \\"\\", + bindEnded: \\"\\", + bindTimeUpdate: \\"\\", + bindFullScreenChange: \\"\\", + bindWaiting: \\"\\", + bindError: \\"\\" + }; + var Canvas = Object.assign({ + \\"canvas-id\\": \\"\\", + \\"disable-scroll\\": \\"false\\", + bindError: \\"\\" + }, touchEvents); + var Ad = { + \\"unit-id\\": \\"\\", + \\"ad-intervals\\": \\"\\", + bindLoad: \\"\\", + bindError: \\"\\", + bindClose: \\"\\" + }; + var WebView = { + src: \\"\\", + bindMessage: \\"\\", + bindLoad: \\"\\", + bindError: \\"\\" + }; + var Block = {}; + var SlotView = { + name: \\"\\" + }; + var Slot = { + name: \\"\\" + }; + var internalComponents = { + View: View, + Icon: Icon, + Progress: Progress, + RichText: RichText, + Text: Text, + Button: Button, + Checkbox: Checkbox, + CheckboxGroup: CheckboxGroup, + Form: Form, + Input: Input, + Label: Label, + Picker: Picker, + PickerView: PickerView, + PickerViewColumn: PickerViewColumn, + Radio: Radio, + RadioGroup: RadioGroup, + Slider: Slider, + Switch: Switch, + CoverImage: CoverImage, + Textarea: Textarea, + CoverView: CoverView, + MovableArea: MovableArea, + MovableView: MovableView, + ScrollView: ScrollView, + Swiper: Swiper, + SwiperItem: SwiperItem, + Navigator: Navigator, + Audio: Audio, + Camera: Camera, + Image: Image, + LivePlayer: LivePlayer, + Video: Video, + Canvas: Canvas, + Ad: Ad, + WebView: WebView, + Block: Block, + Map: MapComp, + Slot: Slot, + SlotView: SlotView + }; + var controlledComponent = new Set([ \\"input\\", \\"checkbox\\", \\"picker\\", \\"picker-view\\", \\"radio\\", \\"slider\\", \\"switch\\", \\"textarea\\" ]); + var focusComponents = new Set([ \\"input\\", \\"textarea\\" ]); + var voidElements = new Set([ \\"progress\\", \\"icon\\", \\"rich-text\\", \\"input\\", \\"textarea\\", \\"slider\\", \\"switch\\", \\"audio\\", \\"live-pusher\\", \\"video\\", \\"ad\\", \\"official-account\\", \\"open-data\\", \\"navigation-bar\\" ]); + var nestElements = new Map([ [ \\"view\\", -1 ], [ \\"cover-view\\", -1 ], [ \\"block\\", -1 ], [ \\"text\\", -1 ], [ \\"slot\\", 8 ], [ \\"slot-view\\", 8 ], [ \\"label\\", 6 ], [ \\"form\\", 4 ], [ \\"scroll-view\\", 4 ] ]); + var EMPTY_OBJ = {}; + var EMPTY_ARR = []; + var noop = function noop() {}; + var defaultReconciler = {}; + var box = function box(v) { + return { + v: v + }; + }; + var unbox = function unbox(b) { + return b.v; + }; + function toDashed(s) { + return s.replace(/([a-z0-9])([A-Z])/g, \\"$1-$2\\").toLowerCase(); + } + function toCamelCase(s) { + var camel = \\"\\"; + var nextCap = false; + for (var i = 0; i < s.length; i++) { + if (s[i] !== \\"-\\") { + camel += nextCap ? s[i].toUpperCase() : s[i]; + nextCap = false; + } else { + nextCap = true; + } + } + return camel; + } + function capitalize(s) { + return s.charAt(0).toUpperCase() + s.slice(1); + } + var shared_esm_hasOwnProperty = Object.prototype.hasOwnProperty; + var hasOwn = function hasOwn(val, key) { + return shared_esm_hasOwnProperty.call(val, key); + }; + var reportIssue = \\"\\\\u5982\\\\u6709\\\\u7591\\\\u95ee\\\\uff0c\\\\u8bf7\\\\u63d0\\\\u4ea4 issue \\\\u81f3\\\\uff1ahttps://github.com/nervjs/taro/issues\\"; + function ensure(condition, msg) { + if (!condition) { + throw new Error(msg + \\"\\\\n\\" + reportIssue); + } + } + function warn(condition, msg) { + if (false) {} + } + function queryToJson(str) { + var dec = decodeURIComponent; + var qp = str.split(\\"&\\"); + var ret = {}; + var name; + var val; + for (var i = 0, l = qp.length, item; i < l; ++i) { + item = qp[i]; + if (item.length) { + var s = item.indexOf(\\"=\\"); + if (s < 0) { + name = dec(item); + val = \\"\\"; + } else { + name = dec(item.slice(0, s)); + val = dec(item.slice(s + 1)); + } + if (typeof ret[name] === \\"string\\") { + ret[name] = [ ret[name] ]; + } + if (Array.isArray(ret[name])) { + ret[name].push(val); + } else { + ret[name] = val; + } + } + } + return ret; + } + var _uniqueId = 1; + var _loadTime = (new Date).getTime().toString(); + function getUniqueKey() { + return _loadTime + _uniqueId++; + } + var cacheData = {}; + function cacheDataSet(key, val) { + cacheData[key] = val; + } + function cacheDataGet(key, delelteAfterGet) { + var temp = cacheData[key]; + delelteAfterGet && delete cacheData[key]; + return temp; + } + function cacheDataHas(key) { + return key in cacheData; + } + function mergeInternalComponents(components) { + Object.keys(components).forEach((function(name) { + if (name in internalComponents) { + Object.assign(internalComponents[name], components[name]); + } else { + internalComponents[name] = components[name]; + } + })); + } + function mergeReconciler(hostConfig) { + Object.assign(defaultReconciler, hostConfig); + } + var weixinAdapter = { + if: \\"wx:if\\", + else: \\"wx:else\\", + elseif: \\"wx:elif\\", + for: \\"wx:for\\", + forItem: \\"wx:for-item\\", + forIndex: \\"wx:for-index\\", + key: \\"wx:key\\", + xs: \\"wxs\\", + type: \\"weapp\\" + }; + var shared_esm_BaseTemplate = function() { + function BaseTemplate() { + var _this = this; + _classCallCheck(this, BaseTemplate); + this.exportExpr = \\"module.exports =\\"; + this.supportXS = false; + this.Adapter = weixinAdapter; + this.internalComponents = internalComponents; + this.focusComponents = focusComponents; + this.voidElements = voidElements; + this.nestElements = nestElements; + this.buildPageTemplate = function(baseTempPath) { + var template = '{{text}}{{x}} -- \\\\n'); + return template; + }; + this.buildBaseComponentTemplate = function(ext) { + var data = !_this.isSupportRecursive && _this.supportXS ? _this.dataKeymap(\\"i:i,l:l\\") : _this.dataKeymap(\\"i:i\\"); + return ' \\\\n'); + }; + this.buildXScript = function() { + return \\"\\".concat(_this.exportExpr, \\" {\\\\n a: \\").concat(_this.buildXSTmplName(), \\",\\\\n b: function (a, b) {\\\\n return a === undefined ? b : a\\\\n },\\\\n c: function(i, prefix) {\\\\n var s = i.focus !== undefined ? 'focus' : 'blur'\\\\n return prefix + i.\\", \\"nn\\", \\" + '_' + s\\\\n },\\\\n d: function (i, v) {\\\\n return i === undefined ? v : i\\\\n },\\\\n e: function (n) {\\\\n return 'tmpl_' + n + '_\\", \\"container\\", \\"'\\\\n },\\\\n \\").concat(_this.buildXSTmpExtra(), \\"\\\\n}\\"); + }; + } + _createClass(BaseTemplate, [ { + key: \\"buildAttribute\\", + value: function buildAttribute(attrs, nodeName) { + var _this2 = this; + return Object.keys(attrs).map((function(k) { + return \\"\\".concat(k, '=\\"').concat(k.startsWith(\\"bind\\") || k.startsWith(\\"on\\") ? attrs[k] : \\"{\\".concat(_this2.getAttrValue(attrs[k], k, nodeName), \\"}\\"), '\\" '); + })).join(\\"\\"); + } + }, { + key: \\"replacePropName\\", + value: function replacePropName(name, value, _componentName) { + if (value === \\"eh\\") return name.toLowerCase(); + return name; + } + }, { + key: \\"createMiniComponents\\", + value: function createMiniComponents(components) { + var result = Object.create(null); + for (var key in components) { + if (hasOwn(components, key)) { + var component = components[key]; + var compName = toDashed(key); + var newComp = Object.create(null); + if (isFunction(this.modifyCompProps)) { + component = this.modifyCompProps(compName, component); + } + for (var prop in component) { + if (hasOwn(component, prop)) { + var propValue = component[prop]; + if (prop.startsWith(\\"bind\\") || specialEvents.has(prop)) { + propValue = \\"eh\\"; + } else if (propValue === \\"\\") { + propValue = \\"i.\\".concat(toCamelCase(prop)); + } else if (isBooleanStringLiteral(propValue) || isNumber(+propValue)) { + propValue = this.supportXS ? \\"xs.b(i.\\".concat(toCamelCase(prop), \\",\\").concat(propValue, \\")\\") : \\"i.\\".concat(toCamelCase(prop), \\"===undefined?\\").concat(propValue, \\":i.\\").concat(toCamelCase(prop)); + } else { + propValue = \\"i.\\".concat(toCamelCase(prop), \\"||\\").concat(propValue || singleQuote(\\"\\")); + } + prop = this.replacePropName(prop, propValue, compName); + newComp[prop] = propValue; + } + } + if (compName !== \\"block\\") { + Object.assign(newComp, styles, this.getEvents()); + } + if (compName === \\"swiper-item\\") { + delete newComp.style; + } + if (compName === \\"slot\\" || compName === \\"slot-view\\") { + result[compName] = { + slot: \\"i.name\\" + }; + } else { + result[compName] = newComp; + } + } + } + return result; + } + }, { + key: \\"buildBaseTemplate\\", + value: function buildBaseTemplate() { + var Adapter = this.Adapter; + var data = !this.isSupportRecursive && this.supportXS ? \\"\\".concat(this.dataKeymap(\\"i:item,l:''\\")) : this.dataKeymap(\\"i:item\\"); + return \\"\\".concat(this.buildXsTemplate(), '\\\\n\\\\n \\\\n \\\\n \\\\n\\\\n'); + } + }, { + key: \\"buildThirdPartyAttr\\", + value: function buildThirdPartyAttr(attrs) { + return Array.from(attrs).reduce((function(str, attr) { + if (attr.startsWith(\\"@\\")) { + return str + \\"bind\\".concat(attr.slice(1), '=\\"eh\\" '); + } else if (attr.startsWith(\\"bind\\")) { + return str + \\"\\".concat(attr, '=\\"eh\\" '); + } else if (attr.startsWith(\\"on\\")) { + return str + \\"bind\\".concat(attr.slice(2).toLowerCase(), '=\\"eh\\" '); + } + return str + \\"\\".concat(attr, '=\\"{{i.').concat(toCamelCase(attr), '}}\\" '); + }), \\"\\"); + } + }, { + key: \\"buildComponentTemplate\\", + value: function buildComponentTemplate(comp, level) { + return this.focusComponents.has(comp.nodeName) ? this.buildFocusComponentTemplte(comp, level) : this.buildStandardComponentTemplate(comp, level); + } + }, { + key: \\"buildFocusComponentTemplte\\", + value: function buildFocusComponentTemplte(comp, level) { + var attrs = Object.assign({}, comp.attributes); + var templateName = this.supportXS ? \\"xs.c(i, 'tmpl_\\".concat(level, \\"_')\\") : \\"i.focus ? 'tmpl_\\".concat(level, \\"_\\").concat(comp.nodeName, \\"_focus' : 'tmpl_\\").concat(level, \\"_\\").concat(comp.nodeName, \\"_blur'\\"); + delete attrs.focus; + return '\\\\n\\\\n \\\\n\\\\n\\\\n\\\\n <').concat(comp.nodeName, \\" \\").concat(this.buildAttribute(comp.attributes, comp.nodeName), ' id=\\"{{i.uid}}\\" />\\\\n\\\\n\\\\n\\\\n <').concat(comp.nodeName, \\" \\").concat(this.buildAttribute(attrs, comp.nodeName), ' id=\\"{{i.uid}}\\" />\\\\n\\\\n'); + } + }, { + key: \\"buildStandardComponentTemplate\\", + value: function buildStandardComponentTemplate(comp, level) { + var isSupportRecursive = this.isSupportRecursive, Adapter = this.Adapter; + var nextLevel = isSupportRecursive ? 0 : level + 1; + var data = !this.isSupportRecursive ? \\"\\".concat(this.dataKeymap(\\"i:item,l:l\\")) : this.dataKeymap(\\"i:item\\"); + var child = this.supportXS ? '') : ''); + if (isFunction(this.modifyLoopBody)) { + child = this.modifyLoopBody(child, comp.nodeName); + } + var children = this.voidElements.has(comp.nodeName) ? \\"\\" : \\"\\\\n\\\\n ').concat(child, \\"\\\\n \\\\n \\"); + if (isFunction(this.modifyLoopContainer)) { + children = this.modifyLoopContainer(children, comp.nodeName); + } + var nodeName = comp.nodeName === \\"slot\\" || comp.nodeName === \\"slot-view\\" ? \\"view\\" : comp.nodeName; + var res = '\\\\n\\\\n <').concat(nodeName, \\" \\").concat(this.buildAttribute(comp.attributes, comp.nodeName), ' id=\\"{{i.uid}}\\">').concat(children, \\"\\").concat(nodeName, \\">\\\\n\\\\n\\"); + if (isFunction(this.modifyTemplateResult)) { + res = this.modifyTemplateResult(res, comp.nodeName, level, children); + } + return res; + } + }, { + key: \\"buildPlainTextTemplate\\", + value: function buildPlainTextTemplate(level) { + return '\\\\n\\\\n{{i.', \\"v\\", \\"}} \\\\n\\\\n\\"); + } + }, { + key: \\"buildThirdPartyTemplate\\", + value: function buildThirdPartyTemplate(level, componentConfig) { + var _this3 = this; + var Adapter = this.Adapter, isSupportRecursive = this.isSupportRecursive; + var nextLevel = isSupportRecursive ? 0 : level + 1; + var template = \\"\\"; + var data = !this.isSupportRecursive && this.supportXS ? \\"\\".concat(this.dataKeymap(\\"i:item,l:l\\")) : this.dataKeymap(\\"i:item\\"); + componentConfig.thirdPartyComponents.forEach((function(attrs, compName) { + template += '\\\\n\\\\n <').concat(compName, \\" \\").concat(_this3.buildThirdPartyAttr(attrs), ' id=\\"{{i.uid}}\\">\\\\n\\\\n \\\\n \\\\n ').concat(compName, \\">\\\\n\\\\n \\"); + })); + return template; + } + }, { + key: \\"buildContainerTemplate\\", + value: function buildContainerTemplate(level) { + var restart = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; + var tmpl = \\"\\"; + if (restart) { + if (!this.isSupportRecursive && this.supportXS) { + tmpl = ''; + } else { + tmpl = ' '; + } + } else { + var xs = !this.isSupportRecursive ? \\"xs.a(\\".concat(level, \\", i.\\", \\"nn\\", \\", l)\\") : \\"xs.a(\\".concat(level, \\", i.\\", \\"nn\\", \\")\\"); + var data = !this.isSupportRecursive ? \\"\\".concat(this.dataKeymap(\\"i:i,cid:\\".concat(level, \\",l:xs.f(l,i.\\", \\"nn\\", \\")\\"))) : \\"\\".concat(this.dataKeymap(\\"i:i\\")); + tmpl = this.supportXS ? '') : \\"'); + } + return '\\\\n\\\\n ').concat(tmpl, \\"\\\\n\\\\n\\"); + } + }, { + key: \\"dataKeymap\\", + value: function dataKeymap(keymap) { + return keymap; + } + }, { + key: \\"getEvents\\", + value: function getEvents() { + return events; + } + }, { + key: \\"getAttrValue\\", + value: function getAttrValue(value, _key, _nodeName) { + return \\"{\\".concat(value, \\"}\\"); + } + }, { + key: \\"buildXsTemplate\\", + value: function buildXsTemplate() { + return \\"\\"; + } + }, { + key: \\"mergeComponents\\", + value: function mergeComponents(ctx, patch) { + ctx.helper.recursiveMerge(this.internalComponents, patch); + } + }, { + key: \\"buildXSTmplName\\", + value: function buildXSTmplName() { + return \\"function (l, n) {\\\\n return 'tmpl_' + l + '_' + n\\\\n }\\"; + } + }, { + key: \\"buildXSTmpExtra\\", + value: function buildXSTmpExtra() { + return \\"\\"; + } + } ]); + return BaseTemplate; + }(); + var shared_esm_RecursiveTemplate = function(_BaseTemplate) { + _inherits(RecursiveTemplate, _BaseTemplate); + function RecursiveTemplate() { + var _this4; + _classCallCheck(this, RecursiveTemplate); + _this4 = _possibleConstructorReturn(this, _getPrototypeOf(RecursiveTemplate).apply(this, arguments)); + _this4.isSupportRecursive = true; + _this4.buildTemplate = function(componentConfig) { + var template = _this4.buildBaseTemplate(); + if (!_this4.miniComponents) { + _this4.miniComponents = _this4.createMiniComponents(_this4.internalComponents); + } + var ZERO_FLOOR = 0; + var components = Object.keys(_this4.miniComponents).filter((function(c) { + return componentConfig.includes.size && !componentConfig.includeAll ? componentConfig.includes.has(c) : true; + })); + template = components.reduce((function(current, nodeName) { + var attributes = _this4.miniComponents[nodeName]; + return current + _this4.buildComponentTemplate({ + nodeName: nodeName, + attributes: attributes + }, ZERO_FLOOR); + }), template); + template += _this4.buildPlainTextTemplate(ZERO_FLOOR); + template += _this4.buildThirdPartyTemplate(ZERO_FLOOR, componentConfig); + template += _this4.buildContainerTemplate(ZERO_FLOOR); + return template; + }; + return _this4; + } + return RecursiveTemplate; + }(shared_esm_BaseTemplate); + var shared_esm_UnRecursiveTemplate = function(_BaseTemplate2) { + _inherits(UnRecursiveTemplate, _BaseTemplate2); + function UnRecursiveTemplate() { + var _this5; + _classCallCheck(this, UnRecursiveTemplate); + _this5 = _possibleConstructorReturn(this, _getPrototypeOf(UnRecursiveTemplate).apply(this, arguments)); + _this5.isSupportRecursive = false; + _this5._baseLevel = 16; + _this5.buildTemplate = function(componentConfig) { + _this5.componentConfig = componentConfig; + if (!_this5.miniComponents) { + _this5.miniComponents = _this5.createMiniComponents(_this5.internalComponents); + } + var components = Object.keys(_this5.miniComponents).filter((function(c) { + return componentConfig.includes.size && !componentConfig.includeAll ? componentConfig.includes.has(c) : true; + })); + var template = _this5.buildBaseTemplate(); + for (var i = 0; i < _this5.baseLevel; i++) { + template += _this5.supportXS ? _this5.buildOptimizeFloor(i, components, _this5.baseLevel === i + 1) : _this5.buildFloor(i, components, _this5.baseLevel === i + 1); + } + return template; + }; + return _this5; + } + _createClass(UnRecursiveTemplate, [ { + key: \\"buildFloor\\", + value: function buildFloor(level, components) { + var _this6 = this; + var restart = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; + if (restart) return this.buildContainerTemplate(level, restart); + var template = components.reduce((function(current, nodeName) { + var attributes = _this6.miniComponents[nodeName]; + return current + _this6.buildComponentTemplate({ + nodeName: nodeName, + attributes: attributes + }, level); + }), \\"\\"); + template += this.buildPlainTextTemplate(level); + template += this.buildThirdPartyTemplate(level, this.componentConfig); + template += this.buildContainerTemplate(level, restart); + return template; + } + }, { + key: \\"buildOptimizeFloor\\", + value: function buildOptimizeFloor(level, components) { + var _this7 = this; + var restart = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; + if (restart) return this.buildContainerTemplate(level, restart); + var template = components.reduce((function(current, nodeName) { + if (level !== 0) { + if (!_this7.nestElements.has(nodeName)) { + return current; + } else { + var max = _this7.nestElements.get(nodeName); + if (max > 0 && level >= max) { + return current; + } + } + } + var attributes = _this7.miniComponents[nodeName]; + return current + _this7.buildComponentTemplate({ + nodeName: nodeName, + attributes: attributes + }, level); + }), \\"\\"); + if (level === 0) template += this.buildPlainTextTemplate(level); + template += this.buildThirdPartyTemplate(level, this.componentConfig); + template += this.buildContainerTemplate(level); + return template; + } + }, { + key: \\"buildXSTmplName\\", + value: function buildXSTmplName() { + var comps = [].concat(_toConsumableArray(Array.from(this.nestElements.keys())), _toConsumableArray(Array.from(this.componentConfig.thirdPartyComponents.keys()))); + var hasMaxComps = []; + this.nestElements.forEach((function(max, comp) { + if (max > -1) hasMaxComps.push(comp); + })); + return \\"function (l, n, s) {\\\\n var a = \\".concat(JSON.stringify(comps), \\"\\\\n var b = \\").concat(JSON.stringify(hasMaxComps), \\"\\\\n if (a.indexOf(n) === -1) {\\\\n l = 0\\\\n }\\\\n if (b.indexOf(n) > -1) {\\\\n var u = s.split(',')\\\\n var depth = 0\\\\n for (var i = 0; i < u.length; i++) {\\\\n if (u[i] === n) depth++\\\\n }\\\\n l = depth\\\\n }\\\\n return 'tmpl_' + l + '_' + n\\\\n }\\"); + } + }, { + key: \\"buildXSTmpExtra\\", + value: function buildXSTmpExtra() { + var hasMaxComps = []; + this.nestElements.forEach((function(max, comp) { + if (max > -1) hasMaxComps.push(comp); + })); + return \\"f: function (l, n) {\\\\n var b = \\".concat(JSON.stringify(hasMaxComps), \\"\\\\n if (b.indexOf(n) > -1) {\\\\n if (l) l += ','\\\\n l += n\\\\n }\\\\n return l\\\\n }\\"); + } + }, { + key: \\"baseLevel\\", + set: function set(lv) { + this._baseLevel = lv; + }, + get: function get() { + return this._baseLevel; + } + } ]); + return UnRecursiveTemplate; + }(shared_esm_BaseTemplate); + var _onAndSyncApis = new Set([ \\"offSocketClose\\", \\"offSocketError\\", \\"offSocketMessage\\", \\"offSocketOpen\\", \\"getAppIdSync\\" ]); + var _noPromiseApis = new Set([ \\"calculateRoute\\", \\"createWebViewContext\\", \\"hideAddToDesktopMenu\\", \\"hideAllAddToDesktopMenu\\", \\"hideAllFavoriteMenu\\", \\"hideBackHome\\", \\"hideFavoriteMenu\\", \\"openCardDetail\\", \\"openCardList\\", \\"openKBVoucherDetail\\", \\"openMerchantCardList\\", \\"openMerchantTicketList\\", \\"openMerchantVoucherList\\", \\"openTicketDetail\\", \\"openTicketList\\", \\"openVoucherDetail\\", \\"openVoucherList\\", \\"setCanPullDown\\", \\"setOptionMenu\\", \\"showSharePanel\\" ]); + var _otherApis = new Set([ \\"addCardAuth\\", \\"getOpenUserInfo\\", \\"chooseAlipayContact\\", \\"chooseCity\\", \\"chooseContact\\", \\"choosePhoneContact\\", \\"datePicker\\", \\"getAddress\\", \\"getAuthCode\\", \\"getPhoneNumber\\", \\"getRunData\\", \\"getRunScene\\", \\"getServerTime\\", \\"getTitleColor\\", \\"rsa\\", \\"paySignCenter\\", \\"tradePay\\", \\"isCollected\\", \\"multiLevelSelect\\", \\"onLocatedComplete\\", \\"optionsSelect\\", \\"prompt\\", \\"regionPicker\\", \\"setLocatedCity\\", \\"showAuthGuide\\", \\"textRiskIdentification\\", \\"vibrate\\", \\"watchShake\\" ]); + var apiDiff = { + showActionSheet: { + options: { + change: [ { + old: \\"itemList\\", + new: \\"items\\" + } ] + } + }, + showToast: { + options: { + change: [ { + old: \\"title\\", + new: \\"content\\" + }, { + old: \\"icon\\", + new: \\"type\\" + } ] + } + }, + showLoading: { + options: { + change: [ { + old: \\"title\\", + new: \\"content\\" + } ] + } + }, + setNavigationBarTitle: { + alias: \\"setNavigationBar\\" + }, + setNavigationBarColor: { + alias: \\"setNavigationBar\\" + }, + saveImageToPhotosAlbum: { + alias: \\"saveImage\\", + options: { + change: [ { + old: \\"filePath\\", + new: \\"url\\" + } ] + } + }, + previewImage: { + options: { + set: [ { + key: \\"current\\", + value: function value(options) { + return options.urls.indexOf(options.current || options.urls[0]); + } + } ] + } + }, + getFileInfo: { + options: { + change: [ { + old: \\"filePath\\", + new: \\"apFilePath\\" + } ] + } + }, + getSavedFileInfo: { + options: { + change: [ { + old: \\"filePath\\", + new: \\"apFilePath\\" + } ] + } + }, + removeSavedFile: { + options: { + change: [ { + old: \\"filePath\\", + new: \\"apFilePath\\" + } ] + } + }, + saveFile: { + options: { + change: [ { + old: \\"tempFilePath\\", + new: \\"apFilePath\\" + } ] + } + }, + openLocation: { + options: { + set: [ { + key: \\"latitude\\", + value: function value(options) { + return String(options.latitude); + } + }, { + key: \\"longitude\\", + value: function value(options) { + return String(options.longitude); + } + } ] + } + }, + uploadFile: { + options: { + change: [ { + old: \\"name\\", + new: \\"fileName\\" + } ] + } + }, + getClipboardData: { + alias: \\"getClipboard\\" + }, + setClipboardData: { + alias: \\"setClipboard\\", + options: { + change: [ { + old: \\"data\\", + new: \\"text\\" + } ] + } + }, + makePhoneCall: { + options: { + change: [ { + old: \\"phoneNumber\\", + new: \\"number\\" + } ] + } + }, + scanCode: { + alias: \\"scan\\", + options: { + change: [ { + old: \\"onlyFromCamera\\", + new: \\"hideAlbum\\" + } ], + set: [ { + key: \\"type\\", + value: function value(options) { + return options.scanType && options.scanType[0].slice(0, -4) || \\"qr\\"; + } + } ] + } + }, + setScreenBrightness: { + options: { + change: [ { + old: \\"value\\", + new: \\"brightness\\" + } ] + } + }, + onBLEConnectionStateChange: { + alias: \\"onBLEConnectionStateChanged\\" + }, + offBLEConnectionStateChange: { + alias: \\"offBLEConnectionStateChanged\\" + }, + createBLEConnection: { + alias: \\"connectBLEDevice\\" + }, + closeBLEConnection: { + alias: \\"disconnectBLEDevice\\" + } + }; + var nativeRequest = my.canIUse(\\"request\\") ? my.request : my.httpRequest; + var RequestQueue = { + MAX_REQUEST: 5, + queue: [], + request: function request(options) { + this.push(options); + return this.run(); + }, + push: function push(options) { + this.queue.push(options); + }, + run: function run() { + var _arguments = arguments, _this = this; + if (!this.queue.length) { + return; + } + if (this.queue.length <= this.MAX_REQUEST) { + var options = this.queue.shift(); + var completeFn = options.complete; + options.complete = function() { + completeFn && completeFn.apply(options, _toConsumableArray(_arguments)); + _this.run(); + }; + return nativeRequest(options); + } + } + }; + function taroInterceptor(chain) { + return request(chain.requestParams); + } + function request(options) { + options = options || {}; + if (typeof options === \\"string\\") { + options = { + url: options + }; + } + var defaultHeaders = { + \\"content-type\\": \\"application/json\\" + }; + options.headers = defaultHeaders; + if (options.header) { + for (var k in options.header) { + var lowerK = k.toLocaleLowerCase(); + options.headers[lowerK] = options.header[k]; + } + delete options.header; + } + var originSuccess = options.success; + var originFail = options.fail; + var originComplete = options.complete; + var requestTask; + var p = new Promise((function(resolve, reject) { + options.success = function(res) { + res.statusCode = res.status; + delete res.status; + res.header = res.headers; + delete res.headers; + originSuccess && originSuccess(res); + resolve(res); + }; + options.fail = function(res) { + originFail && originFail(res); + reject(res); + }; + options.complete = function(res) { + originComplete && originComplete(res); + }; + requestTask = RequestQueue.request(options); + })); + p.abort = function(cb) { + cb && cb(); + if (requestTask) { + requestTask.abort(); + } + return p; + }; + return p; + } + function processApis(taro) { + var onAndSyncApis = new Set([].concat(_toConsumableArray(taro.onAndSyncApis), _toConsumableArray(_onAndSyncApis))); + var noPromiseApis = new Set([].concat(_toConsumableArray(taro.noPromiseApis), _toConsumableArray(_noPromiseApis))); + var otherApis = new Set([].concat(_toConsumableArray(taro.otherApis), _toConsumableArray(_otherApis))); + var apis = [].concat(_toConsumableArray(onAndSyncApis), _toConsumableArray(noPromiseApis), _toConsumableArray(otherApis)); + var preloadPrivateKey = \\"__preload_\\"; + var preloadInitedComponent = \\"$preloadComponent\\"; + apis.forEach((function(key) { + if (!(key in my)) { + taro[key] = function() { + console.warn(\\"\\\\u652f\\\\u4ed8\\\\u5b9d\\\\u5c0f\\\\u7a0b\\\\u5e8f\\\\u6682\\\\u4e0d\\\\u652f\\\\u6301 \\".concat(key)); + }; + return; + } + if (otherApis.has(key)) { + taro[key] = function(options) { + for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + args[_key - 1] = arguments[_key]; + } + var result = generateSpecialApis(key, options || {}); + var newKey = result.api; + options = result.options; + var task = null; + var obj = Object.assign({}, options); + if (!(newKey in my)) { + console.warn(\\"\\\\u652f\\\\u4ed8\\\\u5b9d\\\\u5c0f\\\\u7a0b\\\\u5e8f\\\\u6682\\\\u4e0d\\\\u652f\\\\u6301 \\".concat(newKey)); + return; + } + if (typeof options === \\"string\\") { + if (args.length) { + var _my; + return (_my = my)[newKey].apply(_my, [ options ].concat(args)); + } + return my[newKey](options); + } + if (key === \\"navigateTo\\" || key === \\"redirectTo\\" || key === \\"switchTab\\") { + var url = obj.url ? obj.url.replace(/^\\\\//, \\"\\") : \\"\\"; + if (url.indexOf(\\"?\\") > -1) url = url.split(\\"?\\")[0]; + var Component = cacheDataGet(url); + if (Component) { + var component = new Component; + if (component.componentWillPreload) { + var cacheKey = getUniqueKey(); + var MarkIndex = obj.url.indexOf(\\"?\\"); + var hasMark = MarkIndex > -1; + var urlQueryStr = hasMark ? obj.url.substring(MarkIndex + 1, obj.url.length) : \\"\\"; + var params = queryToJson(urlQueryStr); + obj.url += (hasMark ? \\"&\\" : \\"?\\") + \\"\\".concat(preloadPrivateKey, \\"=\\").concat(cacheKey); + cacheDataSet(cacheKey, component.componentWillPreload(params)); + cacheDataSet(preloadInitedComponent, component); + } + } + } + var p = new Promise((function(resolve, reject) { + [ \\"fail\\", \\"success\\", \\"complete\\" ].forEach((function(k) { + obj[k] = function(res) { + if (k === \\"success\\") { + if (newKey === \\"saveFile\\") { + res.savedFilePath = res.apFilePath; + } else if (newKey === \\"downloadFile\\") { + res.tempFilePath = res.apFilePath; + } else if (newKey === \\"chooseImage\\") { + res.tempFilePaths = res.apFilePaths; + } else if (newKey === \\"getClipboard\\") { + res.data = res.text; + } else if (newKey === \\"scan\\") { + res.result = res.code; + } else if (newKey === \\"getScreenBrightness\\") { + res.value = res.brightness; + delete res.brightness; + } + } + options[k] && options[k](res); + if (k === \\"success\\") { + resolve(res); + } else if (k === \\"fail\\") { + reject(res); + } + }; + })); + if (args.length) { + var _my2; + task = (_my2 = my)[newKey].apply(_my2, [ obj ].concat(args)); + } else { + task = my[newKey](obj); + } + })); + if (newKey === \\"uploadFile\\" || newKey === \\"downloadFile\\") { + p.progress = function(cb) { + if (task) { + task.onProgressUpdate(cb); + } + return p; + }; + p.abort = function(cb) { + cb && cb(); + if (task) { + task.abort(); + } + return p; + }; + } + return p; + }; + } else { + taro[key] = function() { + if (!(key in my)) { + console.warn(\\"\\\\u652f\\\\u4ed8\\\\u5b9d\\\\u5c0f\\\\u7a0b\\\\u5e8f\\\\u6682\\\\u4e0d\\\\u652f\\\\u6301 \\".concat(key)); + return; + } + for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { + args[_key2] = arguments[_key2]; + } + if (key === \\"getStorageSync\\") { + var arg1 = args[0]; + if (arg1 != null) { + return my[key]({ + key: arg1 + }).data || my[key]({ + key: arg1 + }).APDataStorage || \\"\\"; + } + return console.log(\\"getStorageSync \\\\u4f20\\\\u5165\\\\u53c2\\\\u6570\\\\u9519\\\\u8bef\\"); + } + if (key === \\"setStorageSync\\") { + var _arg = args[0]; + var arg2 = args[1]; + if (_arg != null) { + return my[key]({ + key: _arg, + data: arg2 + }); + } + return console.log(\\"setStorageSync \\\\u4f20\\\\u5165\\\\u53c2\\\\u6570\\\\u9519\\\\u8bef\\"); + } + if (key === \\"removeStorageSync\\") { + var _arg2 = args[0]; + if (_arg2 != null) { + return my[key]({ + key: _arg2 + }); + } + return console.log(\\"removeStorageSync \\\\u4f20\\\\u5165\\\\u53c2\\\\u6570\\\\u9519\\\\u8bef\\"); + } + if (key === \\"createSelectorQuery\\") { + var query = my[key](); + query.in = function() { + return query; + }; + return query; + } + var argsLen = args.length; + var newArgs = args.concat(); + var lastArg = newArgs[argsLen - 1]; + if (lastArg && lastArg.isTaroComponent && lastArg.$scope) { + newArgs.splice(argsLen - 1, 1, lastArg.$scope); + } + return my[key].apply(my, newArgs); + }; + } + })); + } + function pxTransform(size) { + var _ref = this.config || {}, _ref$designWidth = _ref.designWidth, designWidth = _ref$designWidth === void 0 ? 750 : _ref$designWidth, _ref$deviceRatio = _ref.deviceRatio, deviceRatio = _ref$deviceRatio === void 0 ? { + 640: 2.34 / 2, + 750: 1, + 828: 1.81 / 2 + } : _ref$deviceRatio; + if (!(designWidth in deviceRatio)) { + throw new Error(\\"deviceRatio \\\\u914d\\\\u7f6e\\\\u4e2d\\\\u4e0d\\\\u5b58\\\\u5728 \\".concat(designWidth, \\" \\\\u7684\\\\u8bbe\\\\u7f6e\\\\uff01\\")); + } + return parseInt(size, 10) * deviceRatio[designWidth] + \\"rpx\\"; + } + function generateSpecialApis(api, options) { + var apiAlias = api; + if (api === \\"showModal\\") { + options.cancelButtonText = options.cancelText || \\"\\\\u53d6\\\\u6d88\\"; + options.confirmButtonText = options.confirmText || \\"\\\\u786e\\\\u5b9a\\"; + apiAlias = \\"confirm\\"; + if (options.showCancel === false) { + options.buttonText = options.confirmText || \\"\\\\u786e\\\\u5b9a\\"; + apiAlias = \\"alert\\"; + } + } else { + Object.keys(apiDiff).forEach((function(item) { + var apiItem = apiDiff[item]; + if (api === item) { + if (apiItem.alias) { + apiAlias = apiItem.alias; + } + if (apiItem.options) { + var change = apiItem.options.change; + var set = apiItem.options.set; + if (change) { + change.forEach((function(changeItem) { + options[changeItem.new] = options[changeItem.old]; + })); + } + if (set) { + set.forEach((function(setItem) { + options[setItem.key] = typeof setItem.value === \\"function\\" ? setItem.value(options) : setItem.value; + })); + } + } + } + })); + } + return { + api: apiAlias, + options: options + }; + } + function initNativeApi(taro) { + processApis(taro); + var link = new taro.Link(taroInterceptor); + taro.request = link.request.bind(link); + taro.addInterceptor = link.addInterceptor.bind(link); + taro.cleanInterceptors = link.cleanInterceptors.bind(link); + taro.getCurrentPages = getCurrentPages; + taro.getApp = getApp; + taro.initPxTransform = taro.initPxTransform.bind(taro); + taro.pxTransform = pxTransform.bind(taro); + taro.env = my.env; + } + var components = { + View: { + \\"disable-scroll\\": \\"false\\", + hidden: \\"false\\", + bindAppear: \\"\\", + bindDisappear: \\"\\", + bindFirstAppear: \\"\\" + }, + Text: { + \\"number-of-lines\\": \\"\\" + }, + Map: { + skew: \\"0\\", + rotate: \\"0\\", + polygons: \\"[]\\", + \\"include-padding\\": \\"\\", + \\"ground-overlays\\": \\"\\", + \\"tile-overlay\\": \\"\\", + \\"custom-map-style\\": \\"\\", + setting: \\"{}\\", + bindRegionChange: \\"\\", + bindPanelTap: \\"\\" + }, + Button: { + scope: \\"\\", + \\"public-id\\": \\"\\", + bindGetAuthorize: \\"\\", + bindError: \\"\\" + }, + Checkbox: { + bindChange: \\"\\" + }, + Input: { + \\"random-number\\": \\"false\\", + controlled: \\"false\\" + }, + Slider: { + \\"track-size\\": \\"4\\", + \\"handle-size\\": \\"22\\", + \\"handle-color\\": singleQuote(\\"#ffffff\\") + }, + Switch: { + controlled: \\"false\\" + }, + Textarea: { + \\"show-count\\": \\"true\\", + controlled: \\"false\\" + }, + MovableView: { + bindChangeEnd: \\"\\" + }, + ScrollView: { + \\"scroll-animation-duration\\": \\"\\", + \\"trap-scroll\\": \\"false\\" + }, + Swiper: { + \\"active-class\\": \\"\\", + \\"changing-class\\": \\"\\", + acceleration: \\"false\\", + \\"disable-programmatic-animation\\": \\"false\\", + \\"disable-touch\\": \\"false\\", + bindAnimationEnd: \\"\\" + }, + Image: { + \\"default-source\\": \\"\\" + }, + Canvas: { + width: singleQuote(\\"300px\\"), + height: singleQuote(\\"225px\\") + }, + Video: { + \\"poster-size\\": singleQuote(\\"contain\\"), + \\"mobilenet-hint-type\\": \\"1\\", + bindLoading: \\"\\", + bindUserAction: \\"\\", + bindStop: \\"\\", + bindRenderStart: \\"\\" + }, + Lottie: { + autoplay: \\"false\\", + path: \\"\\", + speed: \\"1.0\\", + repeatCount: \\"0\\", + autoReverse: \\"false\\", + assetsPath: \\"\\", + placeholder: \\"\\", + djangoId: \\"\\", + md5: \\"\\", + optimize: \\"false\\", + bindDataReady: \\"\\", + bindDataFailed: \\"\\", + bindAnimationStart: \\"\\", + bindAnimationEnd: \\"\\", + bindAnimationRepeat: \\"\\", + bindAnimationCancel: \\"\\", + bindDataLoadReady: \\"\\" + }, + Lifestyle: { + \\"public-id\\": \\"\\", + memo: \\"\\", + bindFollow: \\"\\" + }, + ContactButton: { + \\"tnt-inst-id\\": \\"\\", + scene: \\"\\", + size: \\"25\\", + color: singleQuote(\\"#00A3FF\\"), + icon: \\"\\", + \\"alipay-card-no\\": \\"\\", + \\"ext-info\\": \\"\\" + } + }; + var hostConfig = { + initNativeApi: initNativeApi, + getEventCenter: function getEventCenter(Events) { + if (!my.taroEventCenter) { + my.taroEventCenter = new Events; + } + return my.taroEventCenter; + } + }; + mergeReconciler(hostConfig); + mergeInternalComponents(components); + var taro_runtime = __webpack_require__(1); + var classCallCheck = __webpack_require__(3); + var createClass = __webpack_require__(4); + var possibleConstructorReturn = __webpack_require__(6); + var getPrototypeOf = __webpack_require__(5); + var inherits = __webpack_require__(7); + var react = __webpack_require__(0); + var app = __webpack_require__(12); + var app_App = function(_Component) { + Object(inherits[\\"a\\"])(App, _Component); + function App() { + Object(classCallCheck[\\"a\\"])(this, App); + return Object(possibleConstructorReturn[\\"a\\"])(this, Object(getPrototypeOf[\\"a\\"])(App).apply(this, arguments)); + } + Object(createClass[\\"a\\"])(App, [ { + key: \\"componentDidMount\\", + value: function componentDidMount() {} + }, { + key: \\"componentDidShow\\", + value: function componentDidShow() {} + }, { + key: \\"componentDidHide\\", + value: function componentDidHide() {} + }, { + key: \\"componentDidCatchError\\", + value: function componentDidCatchError() {} + }, { + key: \\"render\\", + value: function render() { + return this.props.children; + } + } ]); + return App; + }(react[\\"Component\\"]); + var lib_src_app = app_App; + var taro_react = __webpack_require__(9); + var config = { + pages: [ \\"pages/index/index\\" ], + window: { + backgroundTextStyle: \\"light\\", + navigationBarBackgroundColor: \\"#fff\\", + navigationBarTitleText: \\"WeChat\\", + navigationBarTextStyle: \\"black\\" + } + }; + taro_runtime[\\"window\\"].__taroAppConfig = config; + var inst = App(Object(taro_runtime[\\"createReactApp\\"])(lib_src_app, react, taro_react[\\"a\\"], config)); + } +}, [ [ 18, 0, 2, 3, 1 ] ] ]); + + + +/** filePath: dist/app.json **/ +{\\"pages\\":[\\"pages/index/index\\"],\\"window\\":{\\"backgroundTextStyle\\":\\"light\\",\\"navigationBarBackgroundColor\\":\\"#fff\\",\\"navigationBarTitleText\\":\\"WeChat\\",\\"navigationBarTextStyle\\":\\"black\\"}} + +/** filePath: dist/base.axml **/ + + + + + + + + ++ + + + ++ + ++ + + + + + + + + + + + + + + + + + + + + + + + + + + + ++ + ++ + + + ++ + ++ + + + ++ + +{{i.v}} + + + + + + + +/** filePath: dist/common.js **/ +(my[\\"webpackJsonp\\"] = my[\\"webpackJsonp\\"] || []).push([ [ 1 ], [ function(module, __webpack_exports__, __webpack_require__) { + \\"use strict\\"; + __webpack_require__.r(__webpack_exports__); + __webpack_exports__[\\"default\\"] = \\"react-mock\\"; +} ] ]); + +/** filePath: dist/pages/index/index.acss **/ + + +/** filePath: dist/pages/index/index.axml **/ ++ + +/** filePath: dist/pages/index/index.js **/ +(my[\\"webpackJsonp\\"] = my[\\"webpackJsonp\\"] || []).push([ [ 6 ], [ , , , , , , , , function(module, exports, __webpack_require__) { + module.exports = __webpack_require__(13); +}, , , , , function(module, exports, __webpack_require__) { + var g = function() { + return this; + }() || Function(\\"return this\\")(); + var hadRuntime = g.regeneratorRuntime && Object.getOwnPropertyNames(g).indexOf(\\"regeneratorRuntime\\") >= 0; + var oldRuntime = hadRuntime && g.regeneratorRuntime; + g.regeneratorRuntime = undefined; + module.exports = __webpack_require__(14); + if (hadRuntime) { + g.regeneratorRuntime = oldRuntime; + } else { + try { + delete g.regeneratorRuntime; + } catch (e) { + g.regeneratorRuntime = undefined; + } + } +}, function(module, exports, __webpack_require__) { + (function(module) { + var _typeof = __webpack_require__(16); + !function(global) { + \\"use strict\\"; + var Op = Object.prototype; + var hasOwn = Op.hasOwnProperty; + var undefined; + var $Symbol = typeof Symbol === \\"function\\" ? Symbol : {}; + var iteratorSymbol = $Symbol.iterator || \\"@@iterator\\"; + var asyncIteratorSymbol = $Symbol.asyncIterator || \\"@@asyncIterator\\"; + var toStringTagSymbol = $Symbol.toStringTag || \\"@@toStringTag\\"; + var inModule = (false ? undefined : _typeof(module)) === \\"object\\"; + var runtime = global.regeneratorRuntime; + if (runtime) { + if (inModule) { + module.exports = runtime; + } + return; + } + runtime = global.regeneratorRuntime = inModule ? module.exports : {}; + function wrap(innerFn, outerFn, self, tryLocsList) { + var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator; + var generator = Object.create(protoGenerator.prototype); + var context = new Context(tryLocsList || []); + generator._invoke = makeInvokeMethod(innerFn, self, context); + return generator; + } + runtime.wrap = wrap; + function tryCatch(fn, obj, arg) { + try { + return { + type: \\"normal\\", + arg: fn.call(obj, arg) + }; + } catch (err) { + return { + type: \\"throw\\", + arg: err + }; + } + } + var GenStateSuspendedStart = \\"suspendedStart\\"; + var GenStateSuspendedYield = \\"suspendedYield\\"; + var GenStateExecuting = \\"executing\\"; + var GenStateCompleted = \\"completed\\"; + var ContinueSentinel = {}; + function Generator() {} + function GeneratorFunction() {} + function GeneratorFunctionPrototype() {} + var IteratorPrototype = {}; + IteratorPrototype[iteratorSymbol] = function() { + return this; + }; + var getProto = Object.getPrototypeOf; + var NativeIteratorPrototype = getProto && getProto(getProto(values([]))); + if (NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) { + IteratorPrototype = NativeIteratorPrototype; + } + var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); + GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype; + GeneratorFunctionPrototype.constructor = GeneratorFunction; + GeneratorFunctionPrototype[toStringTagSymbol] = GeneratorFunction.displayName = \\"GeneratorFunction\\"; + function defineIteratorMethods(prototype) { + [ \\"next\\", \\"throw\\", \\"return\\" ].forEach((function(method) { + prototype[method] = function(arg) { + return this._invoke(method, arg); + }; + })); + } + runtime.isGeneratorFunction = function(genFun) { + var ctor = typeof genFun === \\"function\\" && genFun.constructor; + return ctor ? ctor === GeneratorFunction || (ctor.displayName || ctor.name) === \\"GeneratorFunction\\" : false; + }; + runtime.mark = function(genFun) { + if (Object.setPrototypeOf) { + Object.setPrototypeOf(genFun, GeneratorFunctionPrototype); + } else { + genFun.__proto__ = GeneratorFunctionPrototype; + if (!(toStringTagSymbol in genFun)) { + genFun[toStringTagSymbol] = \\"GeneratorFunction\\"; + } + } + genFun.prototype = Object.create(Gp); + return genFun; + }; + runtime.awrap = function(arg) { + return { + __await: arg + }; + }; + function AsyncIterator(generator) { + function invoke(method, arg, resolve, reject) { + var record = tryCatch(generator[method], generator, arg); + if (record.type === \\"throw\\") { + reject(record.arg); + } else { + var result = record.arg; + var value = result.value; + if (value && _typeof(value) === \\"object\\" && hasOwn.call(value, \\"__await\\")) { + return Promise.resolve(value.__await).then((function(value) { + invoke(\\"next\\", value, resolve, reject); + }), (function(err) { + invoke(\\"throw\\", err, resolve, reject); + })); + } + return Promise.resolve(value).then((function(unwrapped) { + result.value = unwrapped; + resolve(result); + }), reject); + } + } + var previousPromise; + function enqueue(method, arg) { + function callInvokeWithMethodAndArg() { + return new Promise((function(resolve, reject) { + invoke(method, arg, resolve, reject); + })); + } + return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); + } + this._invoke = enqueue; + } + defineIteratorMethods(AsyncIterator.prototype); + AsyncIterator.prototype[asyncIteratorSymbol] = function() { + return this; + }; + runtime.AsyncIterator = AsyncIterator; + runtime.async = function(innerFn, outerFn, self, tryLocsList) { + var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList)); + return runtime.isGeneratorFunction(outerFn) ? iter : iter.next().then((function(result) { + return result.done ? result.value : iter.next(); + })); + }; + function makeInvokeMethod(innerFn, self, context) { + var state = GenStateSuspendedStart; + return function invoke(method, arg) { + if (state === GenStateExecuting) { + throw new Error(\\"Generator is already running\\"); + } + if (state === GenStateCompleted) { + if (method === \\"throw\\") { + throw arg; + } + return doneResult(); + } + context.method = method; + context.arg = arg; + while (true) { + var delegate = context.delegate; + if (delegate) { + var delegateResult = maybeInvokeDelegate(delegate, context); + if (delegateResult) { + if (delegateResult === ContinueSentinel) continue; + return delegateResult; + } + } + if (context.method === \\"next\\") { + context.sent = context._sent = context.arg; + } else if (context.method === \\"throw\\") { + if (state === GenStateSuspendedStart) { + state = GenStateCompleted; + throw context.arg; + } + context.dispatchException(context.arg); + } else if (context.method === \\"return\\") { + context.abrupt(\\"return\\", context.arg); + } + state = GenStateExecuting; + var record = tryCatch(innerFn, self, context); + if (record.type === \\"normal\\") { + state = context.done ? GenStateCompleted : GenStateSuspendedYield; + if (record.arg === ContinueSentinel) { + continue; + } + return { + value: record.arg, + done: context.done + }; + } else if (record.type === \\"throw\\") { + state = GenStateCompleted; + context.method = \\"throw\\"; + context.arg = record.arg; + } + } + }; + } + function maybeInvokeDelegate(delegate, context) { + var method = delegate.iterator[context.method]; + if (method === undefined) { + context.delegate = null; + if (context.method === \\"throw\\") { + if (delegate.iterator.return) { + context.method = \\"return\\"; + context.arg = undefined; + maybeInvokeDelegate(delegate, context); + if (context.method === \\"throw\\") { + return ContinueSentinel; + } + } + context.method = \\"throw\\"; + context.arg = new TypeError(\\"The iterator does not provide a 'throw' method\\"); + } + return ContinueSentinel; + } + var record = tryCatch(method, delegate.iterator, context.arg); + if (record.type === \\"throw\\") { + context.method = \\"throw\\"; + context.arg = record.arg; + context.delegate = null; + return ContinueSentinel; + } + var info = record.arg; + if (!info) { + context.method = \\"throw\\"; + context.arg = new TypeError(\\"iterator result is not an object\\"); + context.delegate = null; + return ContinueSentinel; + } + if (info.done) { + context[delegate.resultName] = info.value; + context.next = delegate.nextLoc; + if (context.method !== \\"return\\") { + context.method = \\"next\\"; + context.arg = undefined; + } + } else { + return info; + } + context.delegate = null; + return ContinueSentinel; + } + defineIteratorMethods(Gp); + Gp[toStringTagSymbol] = \\"Generator\\"; + Gp[iteratorSymbol] = function() { + return this; + }; + Gp.toString = function() { + return \\"[object Generator]\\"; + }; + function pushTryEntry(locs) { + var entry = { + tryLoc: locs[0] + }; + if (1 in locs) { + entry.catchLoc = locs[1]; + } + if (2 in locs) { + entry.finallyLoc = locs[2]; + entry.afterLoc = locs[3]; + } + this.tryEntries.push(entry); + } + function resetTryEntry(entry) { + var record = entry.completion || {}; + record.type = \\"normal\\"; + delete record.arg; + entry.completion = record; + } + function Context(tryLocsList) { + this.tryEntries = [ { + tryLoc: \\"root\\" + } ]; + tryLocsList.forEach(pushTryEntry, this); + this.reset(true); + } + runtime.keys = function(object) { + var keys = []; + for (var key in object) { + keys.push(key); + } + keys.reverse(); + return function next() { + while (keys.length) { + var key = keys.pop(); + if (key in object) { + next.value = key; + next.done = false; + return next; + } + } + next.done = true; + return next; + }; + }; + function values(iterable) { + if (iterable) { + var iteratorMethod = iterable[iteratorSymbol]; + if (iteratorMethod) { + return iteratorMethod.call(iterable); + } + if (typeof iterable.next === \\"function\\") { + return iterable; + } + if (!isNaN(iterable.length)) { + var i = -1, next = function next() { + while (++i < iterable.length) { + if (hasOwn.call(iterable, i)) { + next.value = iterable[i]; + next.done = false; + return next; + } + } + next.value = undefined; + next.done = true; + return next; + }; + return next.next = next; + } + } + return { + next: doneResult + }; + } + runtime.values = values; + function doneResult() { + return { + value: undefined, + done: true + }; + } + Context.prototype = { + constructor: Context, + reset: function reset(skipTempReset) { + this.prev = 0; + this.next = 0; + this.sent = this._sent = undefined; + this.done = false; + this.delegate = null; + this.method = \\"next\\"; + this.arg = undefined; + this.tryEntries.forEach(resetTryEntry); + if (!skipTempReset) { + for (var name in this) { + if (name.charAt(0) === \\"t\\" && hasOwn.call(this, name) && !isNaN(+name.slice(1))) { + this[name] = undefined; + } + } + } + }, + stop: function stop() { + this.done = true; + var rootEntry = this.tryEntries[0]; + var rootRecord = rootEntry.completion; + if (rootRecord.type === \\"throw\\") { + throw rootRecord.arg; + } + return this.rval; + }, + dispatchException: function dispatchException(exception) { + if (this.done) { + throw exception; + } + var context = this; + function handle(loc, caught) { + record.type = \\"throw\\"; + record.arg = exception; + context.next = loc; + if (caught) { + context.method = \\"next\\"; + context.arg = undefined; + } + return !!caught; + } + for (var i = this.tryEntries.length - 1; i >= 0; --i) { + var entry = this.tryEntries[i]; + var record = entry.completion; + if (entry.tryLoc === \\"root\\") { + return handle(\\"end\\"); + } + if (entry.tryLoc <= this.prev) { + var hasCatch = hasOwn.call(entry, \\"catchLoc\\"); + var hasFinally = hasOwn.call(entry, \\"finallyLoc\\"); + if (hasCatch && hasFinally) { + if (this.prev < entry.catchLoc) { + return handle(entry.catchLoc, true); + } else if (this.prev < entry.finallyLoc) { + return handle(entry.finallyLoc); + } + } else if (hasCatch) { + if (this.prev < entry.catchLoc) { + return handle(entry.catchLoc, true); + } + } else if (hasFinally) { + if (this.prev < entry.finallyLoc) { + return handle(entry.finallyLoc); + } + } else { + throw new Error(\\"try statement without catch or finally\\"); + } + } + } + }, + abrupt: function abrupt(type, arg) { + for (var i = this.tryEntries.length - 1; i >= 0; --i) { + var entry = this.tryEntries[i]; + if (entry.tryLoc <= this.prev && hasOwn.call(entry, \\"finallyLoc\\") && this.prev < entry.finallyLoc) { + var finallyEntry = entry; + break; + } + } + if (finallyEntry && (type === \\"break\\" || type === \\"continue\\") && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc) { + finallyEntry = null; + } + var record = finallyEntry ? finallyEntry.completion : {}; + record.type = type; + record.arg = arg; + if (finallyEntry) { + this.method = \\"next\\"; + this.next = finallyEntry.finallyLoc; + return ContinueSentinel; + } + return this.complete(record); + }, + complete: function complete(record, afterLoc) { + if (record.type === \\"throw\\") { + throw record.arg; + } + if (record.type === \\"break\\" || record.type === \\"continue\\") { + this.next = record.arg; + } else if (record.type === \\"return\\") { + this.rval = this.arg = record.arg; + this.method = \\"return\\"; + this.next = \\"end\\"; + } else if (record.type === \\"normal\\" && afterLoc) { + this.next = afterLoc; + } + return ContinueSentinel; + }, + finish: function finish(finallyLoc) { + for (var i = this.tryEntries.length - 1; i >= 0; --i) { + var entry = this.tryEntries[i]; + if (entry.finallyLoc === finallyLoc) { + this.complete(entry.completion, entry.afterLoc); + resetTryEntry(entry); + return ContinueSentinel; + } + } + }, + catch: function _catch(tryLoc) { + for (var i = this.tryEntries.length - 1; i >= 0; --i) { + var entry = this.tryEntries[i]; + if (entry.tryLoc === tryLoc) { + var record = entry.completion; + if (record.type === \\"throw\\") { + var thrown = record.arg; + resetTryEntry(entry); + } + return thrown; + } + } + throw new Error(\\"illegal catch attempt\\"); + }, + delegateYield: function delegateYield(iterable, resultName, nextLoc) { + this.delegate = { + iterator: values(iterable), + resultName: resultName, + nextLoc: nextLoc + }; + if (this.method === \\"next\\") { + this.arg = undefined; + } + return ContinueSentinel; + } + }; + }(function() { + return this; + }() || Function(\\"return this\\")()); + }).call(this, __webpack_require__(15)(module)); +}, function(module, exports) { + module.exports = function(module) { + if (!module.webpackPolyfill) { + module.deprecate = function() {}; + module.paths = []; + if (!module.children) module.children = []; + Object.defineProperty(module, \\"loaded\\", { + enumerable: true, + get: function get() { + return module.l; + } + }); + Object.defineProperty(module, \\"id\\", { + enumerable: true, + get: function get() { + return module.i; + } + }); + module.webpackPolyfill = 1; + } + return module; + }; +}, function(module, exports) { + function _typeof(obj) { + \\"@babel/helpers - typeof\\"; + if (typeof Symbol === \\"function\\" && typeof Symbol.iterator === \\"symbol\\") { + module.exports = _typeof = function _typeof(obj) { + return typeof obj; + }; + } else { + module.exports = _typeof = function _typeof(obj) { + return obj && typeof Symbol === \\"function\\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \\"symbol\\" : typeof obj; + }; + } + return _typeof(obj); + } + module.exports = _typeof; +}, function(module, exports, __webpack_require__) {}, , function(module, __webpack_exports__, __webpack_require__) { + \\"use strict\\"; + __webpack_require__.r(__webpack_exports__); + var taro_runtime = __webpack_require__(1); + var regenerator = __webpack_require__(8); + var regenerator_default = __webpack_require__.n(regenerator); + function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { + try { + var info = gen[key](arg); + var value = info.value; + } catch (error) { + reject(error); + return; + } + if (info.done) { + resolve(value); + } else { + Promise.resolve(value).then(_next, _throw); + } + } + function _asyncToGenerator(fn) { + return function() { + var self = this, args = arguments; + return new Promise((function(resolve, reject) { + var gen = fn.apply(self, args); + function _next(value) { + asyncGeneratorStep(gen, resolve, reject, _next, _throw, \\"next\\", value); + } + function _throw(err) { + asyncGeneratorStep(gen, resolve, reject, _next, _throw, \\"throw\\", err); + } + _next(undefined); + })); + }; + } + var classCallCheck = __webpack_require__(3); + var createClass = __webpack_require__(4); + var possibleConstructorReturn = __webpack_require__(6); + var getPrototypeOf = __webpack_require__(5); + var inherits = __webpack_require__(7); + var react = __webpack_require__(0); + var taro_components = __webpack_require__(2); + var index = __webpack_require__(17); + var index_Index = function(_Component) { + Object(inherits[\\"a\\"])(Index, _Component); + function Index() { + Object(classCallCheck[\\"a\\"])(this, Index); + return Object(possibleConstructorReturn[\\"a\\"])(this, Object(getPrototypeOf[\\"a\\"])(Index).apply(this, arguments)); + } + Object(createClass[\\"a\\"])(Index, [ { + key: \\"componentWillMount\\", + value: function() { + var _componentWillMount = _asyncToGenerator(regenerator_default.a.mark((function _callee() { + return regenerator_default.a.wrap((function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + _context.next = 2; + return Promise.resolve(1); + + case 2: + case \\"end\\": + return _context.stop(); + } + } + }), _callee); + }))); + function componentWillMount() { + return _componentWillMount.apply(this, arguments); + } + return componentWillMount; + }() + }, { + key: \\"componentDidMount\\", + value: function componentDidMount() {} + }, { + key: \\"componentWillUnmount\\", + value: function componentWillUnmount() {} + }, { + key: \\"componentDidShow\\", + value: function componentDidShow() {} + }, { + key: \\"componentDidHide\\", + value: function componentDidHide() {} + }, { + key: \\"render\\", + value: function render() { + return react[\\"default\\"].createElement(taro_components[\\"View\\"], { + className: \\"index\\" + }, react[\\"default\\"].createElement(taro_components[\\"Text\\"], null, \\"Hello world!\\"), react[\\"default\\"].createElement(taro_components[\\"Input\\"], { + placeholder: \\"input\\", + value: \\"\\" + }), react[\\"default\\"].createElement(taro_components[\\"Textarea\\"], { + value: \\"\\" + })); + } + } ]); + return Index; + }(react[\\"Component\\"]); + var config = { + navigationBarTitleText: \\"\\\\u9996\\\\u9875\\" + }; + var inst = Page(Object(taro_runtime[\\"createPageConfig\\"])(index_Index, \\"pages/index/index\\", {}, config || {})); +} ], [ [ 19, 0, 2, 3, 1 ] ] ]); + +/** filePath: dist/pages/index/index.json **/ +{\\"navigationBarTitleText\\":\\"首页\\"} + +/** filePath: dist/runtime.js **/ +(function(modules) { + function webpackJsonpCallback(data) { + var chunkIds = data[0]; + var moreModules = data[1]; + var executeModules = data[2]; + var moduleId, chunkId, i = 0, resolves = []; + for (;i < chunkIds.length; i++) { + chunkId = chunkIds[i]; + if (Object.prototype.hasOwnProperty.call(installedChunks, chunkId) && installedChunks[chunkId]) { + resolves.push(installedChunks[chunkId][0]); + } + installedChunks[chunkId] = 0; + } + for (moduleId in moreModules) { + if (Object.prototype.hasOwnProperty.call(moreModules, moduleId)) { + modules[moduleId] = moreModules[moduleId]; + } + } + if (parentJsonpFunction) parentJsonpFunction(data); + while (resolves.length) { + resolves.shift()(); + } + deferredModules.push.apply(deferredModules, executeModules || []); + return checkDeferredModules(); + } + function checkDeferredModules() { + var result; + for (var i = 0; i < deferredModules.length; i++) { + var deferredModule = deferredModules[i]; + var fulfilled = true; + for (var j = 1; j < deferredModule.length; j++) { + var depId = deferredModule[j]; + if (installedChunks[depId] !== 0) fulfilled = false; + } + if (fulfilled) { + deferredModules.splice(i--, 1); + result = __webpack_require__(__webpack_require__.s = deferredModule[0]); + } + } + return result; + } + var installedModules = {}; + var installedChunks = { + 0: 0 + }; + var deferredModules = []; + function __webpack_require__(moduleId) { + if (installedModules[moduleId]) { + return installedModules[moduleId].exports; + } + var module = installedModules[moduleId] = { + i: moduleId, + l: false, + exports: {} + }; + modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); + module.l = true; + return module.exports; + } + __webpack_require__.m = modules; + __webpack_require__.c = installedModules; + __webpack_require__.d = function(exports, name, getter) { + if (!__webpack_require__.o(exports, name)) { + Object.defineProperty(exports, name, { + enumerable: true, + get: getter + }); + } + }; + __webpack_require__.r = function(exports) { + if (typeof Symbol !== \\"undefined\\" && Symbol.toStringTag) { + Object.defineProperty(exports, Symbol.toStringTag, { + value: \\"Module\\" + }); + } + Object.defineProperty(exports, \\"__esModule\\", { + value: true + }); + }; + __webpack_require__.t = function(value, mode) { + if (mode & 1) value = __webpack_require__(value); + if (mode & 8) return value; + if (mode & 4 && typeof value === \\"object\\" && value && value.__esModule) return value; + var ns = Object.create(null); + __webpack_require__.r(ns); + Object.defineProperty(ns, \\"default\\", { + enumerable: true, + value: value + }); + if (mode & 2 && typeof value != \\"string\\") for (var key in value) __webpack_require__.d(ns, key, function(key) { + return value[key]; + }.bind(null, key)); + return ns; + }; + __webpack_require__.n = function(module) { + var getter = module && module.__esModule ? function getDefault() { + return module[\\"default\\"]; + } : function getModuleExports() { + return module; + }; + __webpack_require__.d(getter, \\"a\\", getter); + return getter; + }; + __webpack_require__.o = function(object, property) { + return Object.prototype.hasOwnProperty.call(object, property); + }; + __webpack_require__.p = \\"/\\"; + var jsonpArray = my[\\"webpackJsonp\\"] = my[\\"webpackJsonp\\"] || []; + var oldJsonpFunction = jsonpArray.push.bind(jsonpArray); + jsonpArray.push = webpackJsonpCallback; + jsonpArray = jsonpArray.slice(); + for (var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]); + var parentJsonpFunction = oldJsonpFunction; + checkDeferredModules(); +})([]); + +/** filePath: dist/taro.js **/ +(my[\\"webpackJsonp\\"] = my[\\"webpackJsonp\\"] || []).push([ [ 2 ], { + 1: function(module, __webpack_exports__, __webpack_require__) { + \\"use strict\\"; + var _unused_webpack_default_export = \\"taro-runtime-mock\\"; + }, + 2: function(module, __webpack_exports__, __webpack_require__) { + \\"use strict\\"; + var _unused_webpack_default_export = \\"taro-components-mock\\"; + }, + 9: function(module, __webpack_exports__, __webpack_require__) { + \\"use strict\\"; + __webpack_exports__[\\"a\\"] = \\"taro-react-mock\\"; + } +} ]); + +/** filePath: dist/utils.sjs **/ +export default { + a: function (l, n) { + return 'tmpl_' + l + '_' + n + }, + b: function (a, b) { + return a === undefined ? b : a + }, + c: function(i, prefix) { + var s = i.focus !== undefined ? 'focus' : 'blur' + return prefix + i.nn + '_' + s + }, + d: function (i, v) { + return i === undefined ? v : i + }, + e: function (n) { + return 'tmpl_' + n + '_container' + }, + +} + +/** filePath: dist/vendors.js **/ +(my[\\"webpackJsonp\\"] = my[\\"webpackJsonp\\"] || []).push([ [ 3 ], [ , , , function(module, __webpack_exports__, __webpack_require__) { + \\"use strict\\"; + __webpack_require__.d(__webpack_exports__, \\"a\\", (function() { + return _classCallCheck; + })); + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError(\\"Cannot call a class as a function\\"); + } + } +}, function(module, __webpack_exports__, __webpack_require__) { + \\"use strict\\"; + __webpack_require__.d(__webpack_exports__, \\"a\\", (function() { + return _createClass; + })); + function _defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if (\\"value\\" in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + function _createClass(Constructor, protoProps, staticProps) { + if (protoProps) _defineProperties(Constructor.prototype, protoProps); + if (staticProps) _defineProperties(Constructor, staticProps); + return Constructor; + } +}, function(module, __webpack_exports__, __webpack_require__) { + \\"use strict\\"; + __webpack_require__.d(__webpack_exports__, \\"a\\", (function() { + return _getPrototypeOf; + })); + function _getPrototypeOf(o) { + _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { + return o.__proto__ || Object.getPrototypeOf(o); + }; + return _getPrototypeOf(o); + } +}, function(module, __webpack_exports__, __webpack_require__) { + \\"use strict\\"; + __webpack_require__.d(__webpack_exports__, \\"a\\", (function() { + return _possibleConstructorReturn; + })); + function _typeof(obj) { + \\"@babel/helpers - typeof\\"; + if (typeof Symbol === \\"function\\" && typeof Symbol.iterator === \\"symbol\\") { + _typeof = function _typeof(obj) { + return typeof obj; + }; + } else { + _typeof = function _typeof(obj) { + return obj && typeof Symbol === \\"function\\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \\"symbol\\" : typeof obj; + }; + } + return _typeof(obj); + } + function _assertThisInitialized(self) { + if (self === void 0) { + throw new ReferenceError(\\"this hasn't been initialised - super() hasn't been called\\"); + } + return self; + } + function _possibleConstructorReturn(self, call) { + if (call && (_typeof(call) === \\"object\\" || typeof call === \\"function\\")) { + return call; + } + return _assertThisInitialized(self); + } +}, function(module, __webpack_exports__, __webpack_require__) { + \\"use strict\\"; + __webpack_require__.d(__webpack_exports__, \\"a\\", (function() { + return _inherits; + })); + function _setPrototypeOf(o, p) { + _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { + o.__proto__ = p; + return o; + }; + return _setPrototypeOf(o, p); + } + function _inherits(subClass, superClass) { + if (typeof superClass !== \\"function\\" && superClass !== null) { + throw new TypeError(\\"Super expression must either be null or a function\\"); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + writable: true, + configurable: true + } + }); + if (superClass) _setPrototypeOf(subClass, superClass); + } +} ] ]); +" +`; diff --git a/packages/taro-mini-runner/src/__tests__/__snapshots__/babel.spec.ts.snap b/packages/taro-mini-runner/src/__tests__/__snapshots__/babel.spec.ts.snap new file mode 100644 index 000000000000..7431ad71b96f --- /dev/null +++ b/packages/taro-mini-runner/src/__tests__/__snapshots__/babel.spec.ts.snap @@ -0,0 +1,2305 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`babel should convert do expressions 1`] = `16`; + +exports[`babel should convert do expressions 2`] = ` +" +/** filePath: dist/app.js **/ +require(\\"./runtime\\"); + +require(\\"./common\\"); + +require(\\"./vendors\\"); + +require(\\"./taro\\"); + +(wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 4 ], { + 11: function(module, exports, __webpack_require__) {}, + 14: function(module, __webpack_exports__, __webpack_require__) { + \\"use strict\\"; + __webpack_require__.r(__webpack_exports__); + function _arrayLikeToArray(arr, len) { + if (len == null || len > arr.length) len = arr.length; + for (var i = 0, arr2 = new Array(len); i < len; i++) { + arr2[i] = arr[i]; + } + return arr2; + } + function _arrayWithoutHoles(arr) { + if (Array.isArray(arr)) return _arrayLikeToArray(arr); + } + function _iterableToArray(iter) { + if (typeof Symbol !== \\"undefined\\" && Symbol.iterator in Object(iter)) return Array.from(iter); + } + function _unsupportedIterableToArray(o, minLen) { + if (!o) return; + if (typeof o === \\"string\\") return _arrayLikeToArray(o, minLen); + var n = Object.prototype.toString.call(o).slice(8, -1); + if (n === \\"Object\\" && o.constructor) n = o.constructor.name; + if (n === \\"Map\\" || n === \\"Set\\") return Array.from(o); + if (n === \\"Arguments\\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); + } + function _nonIterableSpread() { + throw new TypeError(\\"Invalid attempt to spread non-iterable instance.\\\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\\"); + } + function _toConsumableArray(arr) { + return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); + } + function _typeof(obj) { + \\"@babel/helpers - typeof\\"; + if (typeof Symbol === \\"function\\" && typeof Symbol.iterator === \\"symbol\\") { + _typeof = function _typeof(obj) { + return typeof obj; + }; + } else { + _typeof = function _typeof(obj) { + return obj && typeof Symbol === \\"function\\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \\"symbol\\" : typeof obj; + }; + } + return _typeof(obj); + } + function _assertThisInitialized(self) { + if (self === void 0) { + throw new ReferenceError(\\"this hasn't been initialised - super() hasn't been called\\"); + } + return self; + } + function _possibleConstructorReturn(self, call) { + if (call && (_typeof(call) === \\"object\\" || typeof call === \\"function\\")) { + return call; + } + return _assertThisInitialized(self); + } + function _getPrototypeOf(o) { + _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { + return o.__proto__ || Object.getPrototypeOf(o); + }; + return _getPrototypeOf(o); + } + function _setPrototypeOf(o, p) { + _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { + o.__proto__ = p; + return o; + }; + return _setPrototypeOf(o, p); + } + function _inherits(subClass, superClass) { + if (typeof superClass !== \\"function\\" && superClass !== null) { + throw new TypeError(\\"Super expression must either be null or a function\\"); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + writable: true, + configurable: true + } + }); + if (superClass) _setPrototypeOf(subClass, superClass); + } + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError(\\"Cannot call a class as a function\\"); + } + } + function _defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if (\\"value\\" in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + function _createClass(Constructor, protoProps, staticProps) { + if (protoProps) _defineProperties(Constructor.prototype, protoProps); + if (staticProps) _defineProperties(Constructor, staticProps); + return Constructor; + } + function isString(o) { + return typeof o === \\"string\\"; + } + function isUndefined(o) { + return typeof o === \\"undefined\\"; + } + function isNull(o) { + return o === null; + } + function isObject(o) { + return o !== null && _typeof(o) === \\"object\\"; + } + function isBoolean(o) { + return o === true || o === false; + } + function isFunction(o) { + return typeof o === \\"function\\"; + } + function isNumber(o) { + return typeof o === \\"number\\"; + } + function isBooleanStringLiteral(o) { + return o === \\"true\\" || o === \\"false\\"; + } + var isArray = Array.isArray; + var styles = { + style: \\"i.\\".concat(\\"st\\"), + class: \\"i.\\".concat(\\"cl\\") + }; + var events = { + bindtap: \\"eh\\" + }; + var touchEvents = { + bindTouchStart: \\"\\", + bindTouchMove: \\"\\", + bindTouchEnd: \\"\\", + bindTouchCancel: \\"\\", + bindLongTap: \\"\\" + }; + var animationEvents = { + bindAnimationStart: \\"\\", + bindAnimationIteration: \\"\\", + bindAnimationEnd: \\"\\", + bindTransitionEnd: \\"\\" + }; + var specialEvents = new Set([ \\"htouchmove\\", \\"vtouchmove\\" ]); + function singleQuote(s) { + return \\"'\\".concat(s, \\"'\\"); + } + var View = Object.assign(Object.assign({ + \\"hover-class\\": singleQuote(\\"none\\"), + \\"hover-stop-propagation\\": \\"false\\", + \\"hover-start-time\\": \\"50\\", + \\"hover-stay-time\\": \\"400\\", + animation: \\"\\" + }, touchEvents), animationEvents); + var Icon = { + type: \\"\\", + size: \\"23\\", + color: \\"\\" + }; + var MapComp = Object.assign({ + longitude: \\"\\", + latitude: \\"\\", + scale: \\"16\\", + markers: \\"[]\\", + covers: \\"\\", + polyline: \\"[]\\", + circles: \\"[]\\", + controls: \\"[]\\", + \\"include-points\\": \\"[]\\", + \\"show-location\\": \\"\\", + \\"layer-style\\": \\"1\\", + bindMarkerTap: \\"\\", + bindControlTap: \\"\\", + bindCalloutTap: \\"\\", + bindUpdated: \\"\\" + }, touchEvents); + var Progress = { + percent: \\"\\", + \\"stroke-width\\": \\"6\\", + color: singleQuote(\\"#09BB07\\"), + activeColor: singleQuote(\\"#09BB07\\"), + backgroundColor: singleQuote(\\"#EBEBEB\\"), + active: \\"false\\", + \\"active-mode\\": singleQuote(\\"backwards\\"), + \\"show-info\\": \\"false\\" + }; + var RichText = { + nodes: \\"[]\\" + }; + var Text = { + selectable: \\"false\\", + space: \\"\\", + decode: \\"false\\" + }; + var Button = { + size: singleQuote(\\"default\\"), + type: \\"\\", + plain: \\"false\\", + disabled: \\"\\", + loading: \\"false\\", + \\"form-type\\": \\"\\", + \\"open-type\\": \\"\\", + \\"hover-class\\": singleQuote(\\"button-hover\\"), + \\"hover-stop-propagation\\": \\"false\\", + \\"hover-start-time\\": \\"20\\", + \\"hover-stay-time\\": \\"70\\", + name: \\"\\" + }; + var Checkbox = { + value: \\"\\", + disabled: \\"\\", + checked: \\"false\\", + color: singleQuote(\\"#09BB07\\"), + name: \\"\\" + }; + var CheckboxGroup = { + bindChange: \\"\\", + name: \\"\\" + }; + var Form = { + \\"report-submit\\": \\"false\\", + bindSubmit: \\"\\", + bindReset: \\"\\", + name: \\"\\" + }; + var Input = { + value: \\"\\", + type: singleQuote(\\"\\"), + password: \\"false\\", + placeholder: \\"\\", + \\"placeholder-style\\": \\"\\", + \\"placeholder-class\\": singleQuote(\\"input-placeholder\\"), + disabled: \\"\\", + maxlength: \\"140\\", + \\"cursor-spacing\\": \\"0\\", + focus: \\"false\\", + \\"confirm-type\\": singleQuote(\\"done\\"), + \\"confirm-hold\\": \\"false\\", + cursor: \\"i.value.length\\", + \\"selection-start\\": \\"-1\\", + \\"selection-end\\": \\"-1\\", + bindInput: \\"\\", + bindFocus: \\"\\", + bindBlur: \\"\\", + bindConfirm: \\"\\", + name: \\"\\" + }; + var Label = { + for: \\"\\", + name: \\"\\" + }; + var Picker = { + mode: singleQuote(\\"selector\\"), + disabled: \\"\\", + range: \\"\\", + \\"range-key\\": \\"\\", + value: \\"\\", + start: \\"\\", + end: \\"\\", + fields: singleQuote(\\"day\\"), + \\"custom-item\\": \\"\\", + name: \\"\\", + bindCancel: \\"\\", + bindChange: \\"\\", + bindColumnChange: \\"\\" + }; + var PickerView = { + value: \\"\\", + \\"indicator-style\\": \\"\\", + \\"indicator-class\\": \\"\\", + \\"mask-style\\": \\"\\", + \\"mask-class\\": \\"\\", + bindChange: \\"\\", + name: \\"\\" + }; + var PickerViewColumn = { + name: \\"\\" + }; + var Radio = { + value: \\"\\", + checked: \\"false\\", + disabled: \\"\\", + color: singleQuote(\\"#09BB07\\"), + name: \\"\\" + }; + var RadioGroup = { + bindChange: \\"\\", + name: \\"\\" + }; + var Slider = { + min: \\"0\\", + max: \\"100\\", + step: \\"1\\", + disabled: \\"\\", + value: \\"0\\", + activeColor: singleQuote(\\"#1aad19\\"), + backgroundColor: singleQuote(\\"#e9e9e9\\"), + \\"block-size\\": \\"28\\", + \\"block-color\\": singleQuote(\\"#ffffff\\"), + \\"show-value\\": \\"false\\", + bindChange: \\"\\", + bindChanging: \\"\\", + name: \\"\\" + }; + var Switch = { + checked: \\"false\\", + disabled: \\"\\", + type: singleQuote(\\"switch\\"), + color: singleQuote(\\"#04BE02\\"), + bindChange: \\"\\", + name: \\"\\" + }; + var Textarea = { + value: \\"\\", + placeholder: \\"\\", + \\"placeholder-style\\": \\"\\", + \\"placeholder-class\\": singleQuote(\\"textarea-placeholder\\"), + disabled: \\"\\", + maxlength: \\"140\\", + \\"auto-focus\\": \\"false\\", + focus: \\"false\\", + \\"auto-height\\": \\"false\\", + fixed: \\"false\\", + \\"cursor-spacing\\": \\"0\\", + cursor: \\"-1\\", + \\"selection-start\\": \\"-1\\", + \\"selection-end\\": \\"-1\\", + bindFocus: \\"\\", + bindBlur: \\"\\", + bindLineChange: \\"\\", + bindInput: \\"\\", + bindConfirm: \\"\\", + name: \\"\\" + }; + var CoverImage = { + src: \\"\\", + bindLoad: \\"eh\\", + bindError: \\"eh\\" + }; + var CoverView = Object.assign({ + \\"scroll-top\\": \\"false\\" + }, touchEvents); + var MovableArea = { + \\"scale-area\\": \\"false\\" + }; + var MovableView = Object.assign(Object.assign({ + direction: \\"none\\", + inertia: \\"false\\", + \\"out-of-bounds\\": \\"false\\", + x: \\"\\", + y: \\"\\", + damping: \\"20\\", + friction: \\"2\\", + disabled: \\"\\", + scale: \\"false\\", + \\"scale-min\\": \\"0.5\\", + \\"scale-max\\": \\"10\\", + \\"scale-value\\": \\"1\\", + animation: \\"true\\", + bindChange: \\"\\", + bindScale: \\"\\", + htouchmove: \\"\\", + vtouchmove: \\"\\", + width: singleQuote(\\"10px\\"), + height: singleQuote(\\"10px\\") + }, touchEvents), animationEvents); + var ScrollView = Object.assign(Object.assign({ + \\"scroll-x\\": \\"false\\", + \\"scroll-y\\": \\"false\\", + \\"upper-threshold\\": \\"50\\", + \\"lower-threshold\\": \\"50\\", + \\"scroll-top\\": \\"\\", + \\"scroll-left\\": \\"\\", + \\"scroll-into-view\\": \\"\\", + \\"scroll-with-animation\\": \\"false\\", + \\"enable-back-to-top\\": \\"false\\", + bindScrollToUpper: \\"\\", + bindScrollToLower: \\"\\", + bindScroll: \\"\\" + }, touchEvents), animationEvents); + var Swiper = Object.assign({ + \\"indicator-dots\\": \\"false\\", + \\"indicator-color\\": singleQuote(\\"rgba(0, 0, 0, .3)\\"), + \\"indicator-active-color\\": singleQuote(\\"#000000\\"), + autoplay: \\"false\\", + current: \\"0\\", + interval: \\"5000\\", + duration: \\"500\\", + circular: \\"false\\", + vertical: \\"false\\", + \\"previous-margin\\": \\"'0px'\\", + \\"next-margin\\": \\"'0px'\\", + \\"display-multiple-items\\": \\"1\\", + bindChange: \\"\\", + bindTransition: \\"\\", + bindAnimationFinish: \\"\\" + }, touchEvents); + var SwiperItem = { + \\"item-id\\": \\"\\" + }; + var Navigator = { + url: \\"\\", + \\"open-type\\": singleQuote(\\"navigate\\"), + delta: \\"1\\", + \\"hover-class\\": singleQuote(\\"navigator-hover\\"), + \\"hover-stop-propagation\\": \\"false\\", + \\"hover-start-time\\": \\"50\\", + \\"hover-stay-time\\": \\"600\\", + bindSuccess: \\"\\", + bindFail: \\"\\", + bindComplete: \\"\\" + }; + var Audio = { + id: \\"\\", + src: \\"\\", + loop: \\"false\\", + controls: \\"false\\", + poster: \\"\\", + name: \\"\\", + author: \\"\\", + bindError: \\"\\", + bindPlay: \\"\\", + bindPause: \\"\\", + bindTimeUpdate: \\"\\", + bindEnded: \\"\\" + }; + var Camera = { + \\"device-position\\": singleQuote(\\"back\\"), + flash: singleQuote(\\"auto\\"), + bindStop: \\"\\", + bindError: \\"\\" + }; + var Image = Object.assign({ + src: \\"\\", + mode: singleQuote(\\"scaleToFill\\"), + \\"lazy-load\\": \\"false\\", + bindError: \\"\\", + bindLoad: \\"\\" + }, touchEvents); + var LivePlayer = { + src: \\"\\", + autoplay: \\"false\\", + muted: \\"false\\", + orientation: singleQuote(\\"vertical\\"), + \\"object-fit\\": singleQuote(\\"contain\\"), + \\"background-mute\\": \\"false\\", + \\"min-cache\\": \\"1\\", + \\"max-cache\\": \\"3\\", + animation: \\"\\", + bindStateChange: \\"\\", + bindFullScreenChange: \\"\\", + bindNetStatus: \\"\\" + }; + var Video = { + src: \\"\\", + duration: \\"\\", + controls: \\"true\\", + \\"danmu-list\\": \\"\\", + \\"danmu-btn\\": \\"\\", + \\"enable-danmu\\": \\"\\", + autoplay: \\"false\\", + loop: \\"false\\", + muted: \\"false\\", + \\"initial-time\\": \\"0\\", + \\"page-gesture\\": \\"false\\", + direction: \\"\\", + \\"show-progress\\": \\"true\\", + \\"show-fullscreen-btn\\": \\"true\\", + \\"show-play-btn\\": \\"true\\", + \\"show-center-play-btn\\": \\"true\\", + \\"enable-progress-gesture\\": \\"true\\", + \\"object-fit\\": singleQuote(\\"contain\\"), + poster: \\"\\", + \\"show-mute-btn\\": \\"false\\", + animation: \\"\\", + bindPlay: \\"\\", + bindPause: \\"\\", + bindEnded: \\"\\", + bindTimeUpdate: \\"\\", + bindFullScreenChange: \\"\\", + bindWaiting: \\"\\", + bindError: \\"\\" + }; + var Canvas = Object.assign({ + \\"canvas-id\\": \\"\\", + \\"disable-scroll\\": \\"false\\", + bindError: \\"\\" + }, touchEvents); + var Ad = { + \\"unit-id\\": \\"\\", + \\"ad-intervals\\": \\"\\", + bindLoad: \\"\\", + bindError: \\"\\", + bindClose: \\"\\" + }; + var WebView = { + src: \\"\\", + bindMessage: \\"\\", + bindLoad: \\"\\", + bindError: \\"\\" + }; + var Block = {}; + var SlotView = { + name: \\"\\" + }; + var Slot = { + name: \\"\\" + }; + var internalComponents = { + View: View, + Icon: Icon, + Progress: Progress, + RichText: RichText, + Text: Text, + Button: Button, + Checkbox: Checkbox, + CheckboxGroup: CheckboxGroup, + Form: Form, + Input: Input, + Label: Label, + Picker: Picker, + PickerView: PickerView, + PickerViewColumn: PickerViewColumn, + Radio: Radio, + RadioGroup: RadioGroup, + Slider: Slider, + Switch: Switch, + CoverImage: CoverImage, + Textarea: Textarea, + CoverView: CoverView, + MovableArea: MovableArea, + MovableView: MovableView, + ScrollView: ScrollView, + Swiper: Swiper, + SwiperItem: SwiperItem, + Navigator: Navigator, + Audio: Audio, + Camera: Camera, + Image: Image, + LivePlayer: LivePlayer, + Video: Video, + Canvas: Canvas, + Ad: Ad, + WebView: WebView, + Block: Block, + Map: MapComp, + Slot: Slot, + SlotView: SlotView + }; + var controlledComponent = new Set([ \\"input\\", \\"checkbox\\", \\"picker\\", \\"picker-view\\", \\"radio\\", \\"slider\\", \\"switch\\", \\"textarea\\" ]); + var focusComponents = new Set([ \\"input\\", \\"textarea\\" ]); + var voidElements = new Set([ \\"progress\\", \\"icon\\", \\"rich-text\\", \\"input\\", \\"textarea\\", \\"slider\\", \\"switch\\", \\"audio\\", \\"live-pusher\\", \\"video\\", \\"ad\\", \\"official-account\\", \\"open-data\\", \\"navigation-bar\\" ]); + var nestElements = new Map([ [ \\"view\\", -1 ], [ \\"cover-view\\", -1 ], [ \\"block\\", -1 ], [ \\"text\\", -1 ], [ \\"slot\\", 8 ], [ \\"slot-view\\", 8 ], [ \\"label\\", 6 ], [ \\"form\\", 4 ], [ \\"scroll-view\\", 4 ] ]); + var EMPTY_OBJ = {}; + var EMPTY_ARR = []; + var noop = function noop() {}; + var defaultReconciler = {}; + var box = function box(v) { + return { + v: v + }; + }; + var unbox = function unbox(b) { + return b.v; + }; + function toDashed(s) { + return s.replace(/([a-z0-9])([A-Z])/g, \\"$1-$2\\").toLowerCase(); + } + function toCamelCase(s) { + var camel = \\"\\"; + var nextCap = false; + for (var i = 0; i < s.length; i++) { + if (s[i] !== \\"-\\") { + camel += nextCap ? s[i].toUpperCase() : s[i]; + nextCap = false; + } else { + nextCap = true; + } + } + return camel; + } + function capitalize(s) { + return s.charAt(0).toUpperCase() + s.slice(1); + } + var shared_esm_hasOwnProperty = Object.prototype.hasOwnProperty; + var hasOwn = function hasOwn(val, key) { + return shared_esm_hasOwnProperty.call(val, key); + }; + var reportIssue = \\"\\\\u5982\\\\u6709\\\\u7591\\\\u95ee\\\\uff0c\\\\u8bf7\\\\u63d0\\\\u4ea4 issue \\\\u81f3\\\\uff1ahttps://github.com/nervjs/taro/issues\\"; + function ensure(condition, msg) { + if (!condition) { + throw new Error(msg + \\"\\\\n\\" + reportIssue); + } + } + function warn(condition, msg) { + if (false) {} + } + function queryToJson(str) { + var dec = decodeURIComponent; + var qp = str.split(\\"&\\"); + var ret = {}; + var name; + var val; + for (var i = 0, l = qp.length, item; i < l; ++i) { + item = qp[i]; + if (item.length) { + var s = item.indexOf(\\"=\\"); + if (s < 0) { + name = dec(item); + val = \\"\\"; + } else { + name = dec(item.slice(0, s)); + val = dec(item.slice(s + 1)); + } + if (typeof ret[name] === \\"string\\") { + ret[name] = [ ret[name] ]; + } + if (Array.isArray(ret[name])) { + ret[name].push(val); + } else { + ret[name] = val; + } + } + } + return ret; + } + var _uniqueId = 1; + var _loadTime = (new Date).getTime().toString(); + function getUniqueKey() { + return _loadTime + _uniqueId++; + } + var cacheData = {}; + function cacheDataSet(key, val) { + cacheData[key] = val; + } + function cacheDataGet(key, delelteAfterGet) { + var temp = cacheData[key]; + delelteAfterGet && delete cacheData[key]; + return temp; + } + function cacheDataHas(key) { + return key in cacheData; + } + function mergeInternalComponents(components) { + Object.keys(components).forEach((function(name) { + if (name in internalComponents) { + Object.assign(internalComponents[name], components[name]); + } else { + internalComponents[name] = components[name]; + } + })); + } + function mergeReconciler(hostConfig) { + Object.assign(defaultReconciler, hostConfig); + } + var weixinAdapter = { + if: \\"wx:if\\", + else: \\"wx:else\\", + elseif: \\"wx:elif\\", + for: \\"wx:for\\", + forItem: \\"wx:for-item\\", + forIndex: \\"wx:for-index\\", + key: \\"wx:key\\", + xs: \\"wxs\\", + type: \\"weapp\\" + }; + var shared_esm_BaseTemplate = function() { + function BaseTemplate() { + var _this = this; + _classCallCheck(this, BaseTemplate); + this.exportExpr = \\"module.exports =\\"; + this.supportXS = false; + this.Adapter = weixinAdapter; + this.internalComponents = internalComponents; + this.focusComponents = focusComponents; + this.voidElements = voidElements; + this.nestElements = nestElements; + this.buildPageTemplate = function(baseTempPath) { + var template = ' \\\\n'); + return template; + }; + this.buildBaseComponentTemplate = function(ext) { + var data = !_this.isSupportRecursive && _this.supportXS ? _this.dataKeymap(\\"i:i,l:l\\") : _this.dataKeymap(\\"i:i\\"); + return ' \\\\n'); + }; + this.buildXScript = function() { + return \\"\\".concat(_this.exportExpr, \\" {\\\\n a: \\").concat(_this.buildXSTmplName(), \\",\\\\n b: function (a, b) {\\\\n return a === undefined ? b : a\\\\n },\\\\n c: function(i, prefix) {\\\\n var s = i.focus !== undefined ? 'focus' : 'blur'\\\\n return prefix + i.\\", \\"nn\\", \\" + '_' + s\\\\n },\\\\n d: function (i, v) {\\\\n return i === undefined ? v : i\\\\n },\\\\n e: function (n) {\\\\n return 'tmpl_' + n + '_\\", \\"container\\", \\"'\\\\n },\\\\n \\").concat(_this.buildXSTmpExtra(), \\"\\\\n}\\"); + }; + } + _createClass(BaseTemplate, [ { + key: \\"buildAttribute\\", + value: function buildAttribute(attrs, nodeName) { + var _this2 = this; + return Object.keys(attrs).map((function(k) { + return \\"\\".concat(k, '=\\"').concat(k.startsWith(\\"bind\\") || k.startsWith(\\"on\\") ? attrs[k] : \\"{\\".concat(_this2.getAttrValue(attrs[k], k, nodeName), \\"}\\"), '\\" '); + })).join(\\"\\"); + } + }, { + key: \\"replacePropName\\", + value: function replacePropName(name, value, _componentName) { + if (value === \\"eh\\") return name.toLowerCase(); + return name; + } + }, { + key: \\"createMiniComponents\\", + value: function createMiniComponents(components) { + var result = Object.create(null); + for (var key in components) { + if (hasOwn(components, key)) { + var component = components[key]; + var compName = toDashed(key); + var newComp = Object.create(null); + if (isFunction(this.modifyCompProps)) { + component = this.modifyCompProps(compName, component); + } + for (var prop in component) { + if (hasOwn(component, prop)) { + var propValue = component[prop]; + if (prop.startsWith(\\"bind\\") || specialEvents.has(prop)) { + propValue = \\"eh\\"; + } else if (propValue === \\"\\") { + propValue = \\"i.\\".concat(toCamelCase(prop)); + } else if (isBooleanStringLiteral(propValue) || isNumber(+propValue)) { + propValue = this.supportXS ? \\"xs.b(i.\\".concat(toCamelCase(prop), \\",\\").concat(propValue, \\")\\") : \\"i.\\".concat(toCamelCase(prop), \\"===undefined?\\").concat(propValue, \\":i.\\").concat(toCamelCase(prop)); + } else { + propValue = \\"i.\\".concat(toCamelCase(prop), \\"||\\").concat(propValue || singleQuote(\\"\\")); + } + prop = this.replacePropName(prop, propValue, compName); + newComp[prop] = propValue; + } + } + if (compName !== \\"block\\") { + Object.assign(newComp, styles, this.getEvents()); + } + if (compName === \\"swiper-item\\") { + delete newComp.style; + } + if (compName === \\"slot\\" || compName === \\"slot-view\\") { + result[compName] = { + slot: \\"i.name\\" + }; + } else { + result[compName] = newComp; + } + } + } + return result; + } + }, { + key: \\"buildBaseTemplate\\", + value: function buildBaseTemplate() { + var Adapter = this.Adapter; + var data = !this.isSupportRecursive && this.supportXS ? \\"\\".concat(this.dataKeymap(\\"i:item,l:''\\")) : this.dataKeymap(\\"i:item\\"); + return \\"\\".concat(this.buildXsTemplate(), '\\\\n\\\\n \\\\n \\\\n \\\\n\\\\n'); + } + }, { + key: \\"buildThirdPartyAttr\\", + value: function buildThirdPartyAttr(attrs) { + return Array.from(attrs).reduce((function(str, attr) { + if (attr.startsWith(\\"@\\")) { + return str + \\"bind\\".concat(attr.slice(1), '=\\"eh\\" '); + } else if (attr.startsWith(\\"bind\\")) { + return str + \\"\\".concat(attr, '=\\"eh\\" '); + } else if (attr.startsWith(\\"on\\")) { + return str + \\"bind\\".concat(attr.slice(2).toLowerCase(), '=\\"eh\\" '); + } + return str + \\"\\".concat(attr, '=\\"{{i.').concat(toCamelCase(attr), '}}\\" '); + }), \\"\\"); + } + }, { + key: \\"buildComponentTemplate\\", + value: function buildComponentTemplate(comp, level) { + return this.focusComponents.has(comp.nodeName) ? this.buildFocusComponentTemplte(comp, level) : this.buildStandardComponentTemplate(comp, level); + } + }, { + key: \\"buildFocusComponentTemplte\\", + value: function buildFocusComponentTemplte(comp, level) { + var attrs = Object.assign({}, comp.attributes); + var templateName = this.supportXS ? \\"xs.c(i, 'tmpl_\\".concat(level, \\"_')\\") : \\"i.focus ? 'tmpl_\\".concat(level, \\"_\\").concat(comp.nodeName, \\"_focus' : 'tmpl_\\").concat(level, \\"_\\").concat(comp.nodeName, \\"_blur'\\"); + delete attrs.focus; + return '\\\\n\\\\n \\\\n\\\\n\\\\n\\\\n <').concat(comp.nodeName, \\" \\").concat(this.buildAttribute(comp.attributes, comp.nodeName), ' id=\\"{{i.uid}}\\" />\\\\n\\\\n\\\\n\\\\n <').concat(comp.nodeName, \\" \\").concat(this.buildAttribute(attrs, comp.nodeName), ' id=\\"{{i.uid}}\\" />\\\\n\\\\n'); + } + }, { + key: \\"buildStandardComponentTemplate\\", + value: function buildStandardComponentTemplate(comp, level) { + var isSupportRecursive = this.isSupportRecursive, Adapter = this.Adapter; + var nextLevel = isSupportRecursive ? 0 : level + 1; + var data = !this.isSupportRecursive ? \\"\\".concat(this.dataKeymap(\\"i:item,l:l\\")) : this.dataKeymap(\\"i:item\\"); + var child = this.supportXS ? '') : ''); + if (isFunction(this.modifyLoopBody)) { + child = this.modifyLoopBody(child, comp.nodeName); + } + var children = this.voidElements.has(comp.nodeName) ? \\"\\" : \\"\\\\n\\\\n ').concat(child, \\"\\\\n \\\\n \\"); + if (isFunction(this.modifyLoopContainer)) { + children = this.modifyLoopContainer(children, comp.nodeName); + } + var nodeName = comp.nodeName === \\"slot\\" || comp.nodeName === \\"slot-view\\" ? \\"view\\" : comp.nodeName; + var res = '\\\\n\\\\n <').concat(nodeName, \\" \\").concat(this.buildAttribute(comp.attributes, comp.nodeName), ' id=\\"{{i.uid}}\\">').concat(children, \\"\\").concat(nodeName, \\">\\\\n\\\\n\\"); + if (isFunction(this.modifyTemplateResult)) { + res = this.modifyTemplateResult(res, comp.nodeName, level, children); + } + return res; + } + }, { + key: \\"buildPlainTextTemplate\\", + value: function buildPlainTextTemplate(level) { + return '\\\\n\\\\n{{i.', \\"v\\", \\"}} \\\\n\\\\n\\"); + } + }, { + key: \\"buildThirdPartyTemplate\\", + value: function buildThirdPartyTemplate(level, componentConfig) { + var _this3 = this; + var Adapter = this.Adapter, isSupportRecursive = this.isSupportRecursive; + var nextLevel = isSupportRecursive ? 0 : level + 1; + var template = \\"\\"; + var data = !this.isSupportRecursive && this.supportXS ? \\"\\".concat(this.dataKeymap(\\"i:item,l:l\\")) : this.dataKeymap(\\"i:item\\"); + componentConfig.thirdPartyComponents.forEach((function(attrs, compName) { + template += '\\\\n\\\\n <').concat(compName, \\" \\").concat(_this3.buildThirdPartyAttr(attrs), ' id=\\"{{i.uid}}\\">\\\\n\\\\n \\\\n \\\\n ').concat(compName, \\">\\\\n\\\\n \\"); + })); + return template; + } + }, { + key: \\"buildContainerTemplate\\", + value: function buildContainerTemplate(level) { + var restart = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; + var tmpl = \\"\\"; + if (restart) { + if (!this.isSupportRecursive && this.supportXS) { + tmpl = ''; + } else { + tmpl = ' '; + } + } else { + var xs = !this.isSupportRecursive ? \\"xs.a(\\".concat(level, \\", i.\\", \\"nn\\", \\", l)\\") : \\"xs.a(\\".concat(level, \\", i.\\", \\"nn\\", \\")\\"); + var data = !this.isSupportRecursive ? \\"\\".concat(this.dataKeymap(\\"i:i,cid:\\".concat(level, \\",l:xs.f(l,i.\\", \\"nn\\", \\")\\"))) : \\"\\".concat(this.dataKeymap(\\"i:i\\")); + tmpl = this.supportXS ? '') : \\"'); + } + return '\\\\n\\\\n ').concat(tmpl, \\"\\\\n\\\\n\\"); + } + }, { + key: \\"dataKeymap\\", + value: function dataKeymap(keymap) { + return keymap; + } + }, { + key: \\"getEvents\\", + value: function getEvents() { + return events; + } + }, { + key: \\"getAttrValue\\", + value: function getAttrValue(value, _key, _nodeName) { + return \\"{\\".concat(value, \\"}\\"); + } + }, { + key: \\"buildXsTemplate\\", + value: function buildXsTemplate() { + return \\"\\"; + } + }, { + key: \\"mergeComponents\\", + value: function mergeComponents(ctx, patch) { + ctx.helper.recursiveMerge(this.internalComponents, patch); + } + }, { + key: \\"buildXSTmplName\\", + value: function buildXSTmplName() { + return \\"function (l, n) {\\\\n return 'tmpl_' + l + '_' + n\\\\n }\\"; + } + }, { + key: \\"buildXSTmpExtra\\", + value: function buildXSTmpExtra() { + return \\"\\"; + } + } ]); + return BaseTemplate; + }(); + var shared_esm_RecursiveTemplate = function(_BaseTemplate) { + _inherits(RecursiveTemplate, _BaseTemplate); + function RecursiveTemplate() { + var _this4; + _classCallCheck(this, RecursiveTemplate); + _this4 = _possibleConstructorReturn(this, _getPrototypeOf(RecursiveTemplate).apply(this, arguments)); + _this4.isSupportRecursive = true; + _this4.buildTemplate = function(componentConfig) { + var template = _this4.buildBaseTemplate(); + if (!_this4.miniComponents) { + _this4.miniComponents = _this4.createMiniComponents(_this4.internalComponents); + } + var ZERO_FLOOR = 0; + var components = Object.keys(_this4.miniComponents).filter((function(c) { + return componentConfig.includes.size && !componentConfig.includeAll ? componentConfig.includes.has(c) : true; + })); + template = components.reduce((function(current, nodeName) { + var attributes = _this4.miniComponents[nodeName]; + return current + _this4.buildComponentTemplate({ + nodeName: nodeName, + attributes: attributes + }, ZERO_FLOOR); + }), template); + template += _this4.buildPlainTextTemplate(ZERO_FLOOR); + template += _this4.buildThirdPartyTemplate(ZERO_FLOOR, componentConfig); + template += _this4.buildContainerTemplate(ZERO_FLOOR); + return template; + }; + return _this4; + } + return RecursiveTemplate; + }(shared_esm_BaseTemplate); + var shared_esm_UnRecursiveTemplate = function(_BaseTemplate2) { + _inherits(UnRecursiveTemplate, _BaseTemplate2); + function UnRecursiveTemplate() { + var _this5; + _classCallCheck(this, UnRecursiveTemplate); + _this5 = _possibleConstructorReturn(this, _getPrototypeOf(UnRecursiveTemplate).apply(this, arguments)); + _this5.isSupportRecursive = false; + _this5._baseLevel = 16; + _this5.buildTemplate = function(componentConfig) { + _this5.componentConfig = componentConfig; + if (!_this5.miniComponents) { + _this5.miniComponents = _this5.createMiniComponents(_this5.internalComponents); + } + var components = Object.keys(_this5.miniComponents).filter((function(c) { + return componentConfig.includes.size && !componentConfig.includeAll ? componentConfig.includes.has(c) : true; + })); + var template = _this5.buildBaseTemplate(); + for (var i = 0; i < _this5.baseLevel; i++) { + template += _this5.supportXS ? _this5.buildOptimizeFloor(i, components, _this5.baseLevel === i + 1) : _this5.buildFloor(i, components, _this5.baseLevel === i + 1); + } + return template; + }; + return _this5; + } + _createClass(UnRecursiveTemplate, [ { + key: \\"buildFloor\\", + value: function buildFloor(level, components) { + var _this6 = this; + var restart = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; + if (restart) return this.buildContainerTemplate(level, restart); + var template = components.reduce((function(current, nodeName) { + var attributes = _this6.miniComponents[nodeName]; + return current + _this6.buildComponentTemplate({ + nodeName: nodeName, + attributes: attributes + }, level); + }), \\"\\"); + template += this.buildPlainTextTemplate(level); + template += this.buildThirdPartyTemplate(level, this.componentConfig); + template += this.buildContainerTemplate(level, restart); + return template; + } + }, { + key: \\"buildOptimizeFloor\\", + value: function buildOptimizeFloor(level, components) { + var _this7 = this; + var restart = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; + if (restart) return this.buildContainerTemplate(level, restart); + var template = components.reduce((function(current, nodeName) { + if (level !== 0) { + if (!_this7.nestElements.has(nodeName)) { + return current; + } else { + var max = _this7.nestElements.get(nodeName); + if (max > 0 && level >= max) { + return current; + } + } + } + var attributes = _this7.miniComponents[nodeName]; + return current + _this7.buildComponentTemplate({ + nodeName: nodeName, + attributes: attributes + }, level); + }), \\"\\"); + if (level === 0) template += this.buildPlainTextTemplate(level); + template += this.buildThirdPartyTemplate(level, this.componentConfig); + template += this.buildContainerTemplate(level); + return template; + } + }, { + key: \\"buildXSTmplName\\", + value: function buildXSTmplName() { + var comps = [].concat(_toConsumableArray(Array.from(this.nestElements.keys())), _toConsumableArray(Array.from(this.componentConfig.thirdPartyComponents.keys()))); + var hasMaxComps = []; + this.nestElements.forEach((function(max, comp) { + if (max > -1) hasMaxComps.push(comp); + })); + return \\"function (l, n, s) {\\\\n var a = \\".concat(JSON.stringify(comps), \\"\\\\n var b = \\").concat(JSON.stringify(hasMaxComps), \\"\\\\n if (a.indexOf(n) === -1) {\\\\n l = 0\\\\n }\\\\n if (b.indexOf(n) > -1) {\\\\n var u = s.split(',')\\\\n var depth = 0\\\\n for (var i = 0; i < u.length; i++) {\\\\n if (u[i] === n) depth++\\\\n }\\\\n l = depth\\\\n }\\\\n return 'tmpl_' + l + '_' + n\\\\n }\\"); + } + }, { + key: \\"buildXSTmpExtra\\", + value: function buildXSTmpExtra() { + var hasMaxComps = []; + this.nestElements.forEach((function(max, comp) { + if (max > -1) hasMaxComps.push(comp); + })); + return \\"f: function (l, n) {\\\\n var b = \\".concat(JSON.stringify(hasMaxComps), \\"\\\\n if (b.indexOf(n) > -1) {\\\\n if (l) l += ','\\\\n l += n\\\\n }\\\\n return l\\\\n }\\"); + } + }, { + key: \\"baseLevel\\", + set: function set(lv) { + this._baseLevel = lv; + }, + get: function get() { + return this._baseLevel; + } + } ]); + return UnRecursiveTemplate; + }(shared_esm_BaseTemplate); + var _onAndSyncApis = new Set([ \\"getAccountInfoSync\\", \\"getEnterOptionsSync\\", \\"offBLEPeripheralConnectionStateChanged\\", \\"offBeaconServiceChange\\", \\"offBeaconUpdate\\", \\"offDeviceMotionChange\\", \\"offHCEMessage\\", \\"offKeyboardHeightChange\\", \\"offLocalServiceDiscoveryStop\\", \\"offLocalServiceFound\\", \\"offLocalServiceLost\\", \\"offLocalServiceResolveFail\\", \\"offLocationChange\\", \\"offThemeChange\\", \\"offVoIPChatInterrupted\\", \\"offVoIPChatMembersChanged\\", \\"offVoIPVideoMembersChanged\\", \\"offWifiConnected\\", \\"offWindowResize\\", \\"onBLEPeripheralConnectionStateChanged\\", \\"onBackgroundAudioPause\\", \\"onBackgroundAudioPlay\\", \\"onBackgroundAudioStop\\", \\"onBackgroundFetchData\\", \\"onHCEMessage\\", \\"onKeyboardHeightChange\\", \\"onLocalServiceDiscoveryStop\\", \\"onLocalServiceFound\\", \\"onLocalServiceLost\\", \\"onLocalServiceResolveFail\\", \\"onLocationChange\\", \\"onThemeChange\\", \\"onVoIPChatInterrupted\\", \\"onVoIPChatMembersChanged\\", \\"onVoIPChatSpeakersChanged\\", \\"onVoIPVideoMembersChanged\\", \\"onWifiConnected\\", \\"onWindowResize\\", \\"reportMonitor\\" ]); + var _noPromiseApis = new Set([ \\"createAudioContext\\", \\"createLivePusherContext\\", \\"createMediaContainer\\", \\"createMediaRecorder\\", \\"createOffscreenCanvas\\", \\"createRewardedVideoAd\\", \\"createUDPSocket\\", \\"createVideoDecoder\\", \\"createWorker\\", \\"getLogManager\\", \\"getNFCAdapter\\", \\"getPerformance\\", \\"getRealtimeLogManager\\", \\"pauseBackgroundAudio\\", \\"pauseVoice\\", \\"reportPerformance\\", \\"stopBackgroundAudio\\", \\"stopRecord\\", \\"stopVoice\\" ]); + var _otherApis = new Set([ \\"addCard\\", \\"authPrivateMessage\\", \\"checkIsOpenAccessibility\\", \\"checkIsSoterEnrolledInDevice\\", \\"checkIsSupportSoterAuthentication\\", \\"chooseInvoice\\", \\"chooseMedia\\", \\"chooseMessageFile\\", \\"compressVideo\\", \\"connectWifi\\", \\"createBLEPeripheralServer\\", \\"disableAlertBeforeUnload\\", \\"enableAlertBeforeUnload\\", \\"exitVoIPChat\\", \\"getBLEDeviceRSSI\\", \\"getBackgroundAudioPlayerState\\", \\"getBackgroundFetchData\\", \\"getBackgroundFetchToken\\", \\"getGroupEnterInfo\\", \\"getHCEState\\", \\"getSelectedTextRange\\", \\"getShareInfo\\", \\"getVideoInfo\\", \\"getWeRunData\\", \\"join1v1Chat\\", \\"joinVoIPChat\\", \\"makeBluetoothPair\\", \\"openCard\\", \\"openVideoEditor\\", \\"playBackgroundAudio\\", \\"playVoice\\", \\"previewMedia\\", \\"requestPayment\\", \\"saveFileToDisk\\", \\"scanItem\\", \\"seekBackgroundAudio\\", \\"sendHCEMessage\\", \\"setBLEMTU\\", \\"setBackgroundFetchToken\\", \\"setEnable1v1Chat\\", \\"setTopBarText\\", \\"setWifiList\\", \\"setWindowSize\\", \\"showRedPackage\\", \\"startGyroscope\\", \\"startHCE\\", \\"startLocalServiceDiscovery\\", \\"startLocationUpdate\\", \\"startLocationUpdateBackground\\", \\"startRecord\\", \\"startSoterAuthentication\\", \\"startWifi\\", \\"stopGyroscope\\", \\"stopHCE\\", \\"stopLocalServiceDiscovery\\", \\"stopLocationUpdate\\", \\"stopWifi\\", \\"subscribeVoIPVideoMembers\\", \\"updateShareMenu\\", \\"updateVoIPChatMuteConfig\\", \\"updateWeChatApp\\" ]); + var RequestQueue = { + MAX_REQUEST: 5, + queue: [], + request: function request(options) { + this.push(options); + return this.run(); + }, + push: function push(options) { + this.queue.push(options); + }, + run: function run() { + var _this = this; + if (!this.queue.length) { + return; + } + if (this.queue.length <= this.MAX_REQUEST) { + var options = this.queue.shift(); + var completeFn = options.complete; + options.complete = function() { + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + completeFn && completeFn.apply(options, args); + _this.run(); + }; + return wx.request(options); + } + } + }; + function taroInterceptor(chain) { + return request(chain.requestParams); + } + function request(options) { + options = options || {}; + if (typeof options === \\"string\\") { + options = { + url: options + }; + } + var originSuccess = options.success; + var originFail = options.fail; + var originComplete = options.complete; + var requestTask; + var p = new Promise((function(resolve, reject) { + options.success = function(res) { + originSuccess && originSuccess(res); + resolve(res); + }; + options.fail = function(res) { + originFail && originFail(res); + reject(res); + }; + options.complete = function(res) { + originComplete && originComplete(res); + }; + requestTask = RequestQueue.request(options); + })); + p.abort = function(cb) { + cb && cb(); + if (requestTask) { + requestTask.abort(); + } + return p; + }; + return p; + } + function processApis(taro) { + var onAndSyncApis = new Set([].concat(_toConsumableArray(taro.onAndSyncApis), _toConsumableArray(_onAndSyncApis))); + var noPromiseApis = new Set([].concat(_toConsumableArray(taro.noPromiseApis), _toConsumableArray(_noPromiseApis))); + var otherApis = new Set([].concat(_toConsumableArray(taro.otherApis), _toConsumableArray(_otherApis))); + var apis = [].concat(_toConsumableArray(onAndSyncApis), _toConsumableArray(noPromiseApis), _toConsumableArray(otherApis)); + var useDataCacheApis = { + navigateTo: true, + redirectTo: true, + reLaunch: true + }; + var routerParamsPrivateKey = \\"__key_\\"; + var preloadPrivateKey = \\"__preload_\\"; + var preloadInitedComponent = \\"$preloadComponent\\"; + apis.forEach((function(key) { + if (!(key in wx)) { + taro[key] = function() { + console.warn(\\"\\\\u5fae\\\\u4fe1\\\\u5c0f\\\\u7a0b\\\\u5e8f\\\\u6682\\\\u4e0d\\\\u652f\\\\u6301 \\".concat(key)); + }; + return; + } + if (otherApis.has(key)) { + taro[key] = function(options) { + for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) { + args[_key2 - 1] = arguments[_key2]; + } + options = options || {}; + var task = null; + var obj = Object.assign({}, options); + if (typeof options === \\"string\\") { + if (args.length) { + var _wx; + return (_wx = wx)[key].apply(_wx, [ options ].concat(args)); + } + return wx[key](options); + } + if (key === \\"navigateTo\\" || key === \\"redirectTo\\" || key === \\"switchTab\\") { + var url = obj.url ? obj.url.replace(/^\\\\//, \\"\\") : \\"\\"; + if (url.indexOf(\\"?\\") > -1) url = url.split(\\"?\\")[0]; + var Component = cacheDataGet(url); + if (Component) { + var component = new Component; + if (component.componentWillPreload) { + var cacheKey = getUniqueKey(); + var MarkIndex = obj.url.indexOf(\\"?\\"); + var hasMark = MarkIndex > -1; + var urlQueryStr = hasMark ? obj.url.substring(MarkIndex + 1, obj.url.length) : \\"\\"; + var params = queryToJson(urlQueryStr); + obj.url += (hasMark ? \\"&\\" : \\"?\\") + \\"\\".concat(preloadPrivateKey, \\"=\\").concat(cacheKey); + cacheDataSet(cacheKey, component.componentWillPreload(params)); + cacheDataSet(preloadInitedComponent, component); + } + } + } + if (useDataCacheApis[key]) { + var _url = obj.url = obj.url || \\"\\"; + var _MarkIndex = _url.indexOf(\\"?\\"); + var _hasMark = _MarkIndex > -1; + var _urlQueryStr = _hasMark ? _url.substring(_MarkIndex + 1, _url.length) : \\"\\"; + var _params = queryToJson(_urlQueryStr); + var _cacheKey = getUniqueKey(); + obj.url += (_hasMark ? \\"&\\" : \\"?\\") + \\"\\".concat(routerParamsPrivateKey, \\"=\\").concat(_cacheKey); + cacheDataSet(_cacheKey, _params); + } + var p = new Promise((function(resolve, reject) { + [ \\"fail\\", \\"success\\", \\"complete\\" ].forEach((function(k) { + obj[k] = function(res) { + options[k] && options[k](res); + if (k === \\"success\\") { + if (key === \\"connectSocket\\") { + resolve(Promise.resolve().then((function() { + return Object.assign(task, res); + }))); + } else { + resolve(res); + } + } else if (k === \\"fail\\") { + reject(res); + } + }; + })); + if (args.length) { + var _wx2; + task = (_wx2 = wx)[key].apply(_wx2, [ obj ].concat(args)); + } else { + task = wx[key](obj); + } + })); + if (key === \\"uploadFile\\" || key === \\"downloadFile\\") { + p.progress = function(cb) { + if (task) { + task.onProgressUpdate(cb); + } + return p; + }; + p.abort = function(cb) { + cb && cb(); + if (task) { + task.abort(); + } + return p; + }; + } + return p; + }; + } else { + taro[key] = function() { + for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) { + args[_key3] = arguments[_key3]; + } + var argsLen = args.length; + var newArgs = args.concat(); + var lastArg = newArgs[argsLen - 1]; + if (lastArg && lastArg.isTaroComponent && lastArg.$scope) { + newArgs.splice(argsLen - 1, 1, lastArg.$scope); + } + return wx[key].apply(wx, newArgs); + }; + } + })); + } + function pxTransform(size) { + var _ref = this.config || {}, _ref$designWidth = _ref.designWidth, designWidth = _ref$designWidth === void 0 ? 750 : _ref$designWidth, _ref$deviceRatio = _ref.deviceRatio, deviceRatio = _ref$deviceRatio === void 0 ? { + 640: 2.34 / 2, + 750: 1, + 828: 1.81 / 2 + } : _ref$deviceRatio; + if (!(designWidth in deviceRatio)) { + throw new Error(\\"deviceRatio \\\\u914d\\\\u7f6e\\\\u4e2d\\\\u4e0d\\\\u5b58\\\\u5728 \\".concat(designWidth, \\" \\\\u7684\\\\u8bbe\\\\u7f6e\\\\uff01\\")); + } + return parseInt(size, 10) * deviceRatio[designWidth] + \\"rpx\\"; + } + function canIUseWebp() { + var _wx$getSystemInfoSync = wx.getSystemInfoSync(), platform = _wx$getSystemInfoSync.platform; + var platformLower = platform.toLowerCase(); + if (platformLower === \\"android\\" || platformLower === \\"devtools\\") { + return true; + } + return false; + } + function wxCloud(taro) { + var wxC = wx.cloud || {}; + var wxcloud = {}; + var apiList = [ \\"init\\", \\"database\\", \\"uploadFile\\", \\"downloadFile\\", \\"getTempFileURL\\", \\"deleteFile\\", \\"callFunction\\", \\"CloudID\\" ]; + apiList.forEach((function(v) { + wxcloud[v] = wxC[v]; + })); + taro.cloud = wxcloud; + } + function initNativeApi(taro) { + processApis(taro); + var link = new taro.Link(taroInterceptor); + taro.request = link.request.bind(link); + taro.addInterceptor = link.addInterceptor.bind(link); + taro.cleanInterceptors = link.cleanInterceptors.bind(link); + taro.getCurrentPages = getCurrentPages; + taro.getApp = getApp; + taro.requirePlugin = requirePlugin; + taro.initPxTransform = taro.initPxTransform.bind(taro); + taro.pxTransform = pxTransform.bind(taro); + taro.canIUseWebp = canIUseWebp; + taro.env = wx.env; + wxCloud(taro); + } + var components = { + Progress: { + \\"border-radius\\": \\"0\\", + \\"font-size\\": \\"16\\", + duration: \\"30\\", + bindActiveEnd: \\"\\" + }, + RichText: { + space: \\"\\" + }, + Text: { + \\"user-select\\": \\"false\\" + }, + Map: { + polygons: \\"[]\\", + subkey: \\"\\", + rotate: \\"0\\", + skew: \\"0\\", + \\"enable-3D\\": \\"false\\", + \\"show-compass\\": \\"false\\", + \\"show-scale\\": \\"false\\", + \\"enable-overlooking\\": \\"false\\", + \\"enable-zoom\\": \\"true\\", + \\"enable-scroll\\": \\"true\\", + \\"enable-rotate\\": \\"false\\", + \\"enable-satellite\\": \\"false\\", + \\"enable-traffic\\": \\"false\\", + setting: \\"[]\\", + bindLabelTap: \\"\\", + bindRegionChange: \\"\\", + bindPoiTap: \\"\\" + }, + Button: { + lang: \\"en\\", + \\"session-from\\": \\"\\", + \\"send-message-title\\": \\"\\", + \\"send-message-path\\": \\"\\", + \\"send-message-img\\": \\"\\", + \\"app-parameter\\": \\"\\", + \\"show-message-card\\": \\"false\\", + bindGetUserInfo: \\"\\", + bindContact: \\"\\", + bindGetPhoneNumber: \\"\\", + bindError: \\"\\", + bindOpenSetting: \\"\\", + bindLaunchApp: \\"\\" + }, + Form: { + \\"report-submit-timeout\\": \\"0\\" + }, + Input: { + \\"auto-focus\\": \\"false\\", + \\"always-embed\\": \\"false\\", + \\"adjust-position\\": \\"true\\", + \\"hold-keyboard\\": \\"false\\", + bindKeyboardHeightChange: \\"\\" + }, + Picker: { + \\"header-text\\": \\"\\" + }, + PickerView: { + bindPickStart: \\"\\", + bindPickEnd: \\"\\" + }, + Slider: { + color: singleQuote(\\"#e9e9e9\\"), + \\"selected-color\\": singleQuote(\\"#1aad19\\") + }, + Textarea: { + \\"show-confirm-bar\\": \\"true\\", + \\"adjust-position\\": \\"true\\", + \\"hold-keyboard\\": \\"false\\", + \\"disable-default-padding\\": \\"false\\", + bindKeyboardHeightChange: \\"\\" + }, + ScrollView: { + \\"enable-flex\\": \\"false\\", + \\"scroll-anchoring\\": \\"false\\", + \\"refresher-enabled\\": \\"false\\", + \\"refresher-threshold\\": \\"45\\", + \\"refresher-default-style\\": singleQuote(\\"black\\"), + \\"refresher-background\\": singleQuote(\\"#FFF\\"), + \\"refresher-triggered\\": \\"false\\", + enhanced: \\"false\\", + bounces: \\"true\\", + \\"show-scrollbar\\": \\"true\\", + \\"paging-enabled\\": \\"false\\", + \\"fast-deceleration\\": \\"false\\", + bindDragStart: \\"\\", + bindDragging: \\"\\", + bindDragEnd: \\"\\", + bindRefresherPulling: \\"\\", + bindRefresherRefresh: \\"\\", + bindRefresherRestore: \\"\\", + bindRefresherAbort: \\"\\" + }, + Swiper: { + \\"snap-to-edge\\": \\"false\\", + \\"easing-function\\": singleQuote(\\"default\\") + }, + SwiperItem: { + \\"skip-hidden-item-layout\\": \\"false\\" + }, + Navigator: { + target: singleQuote(\\"self\\"), + \\"app-id\\": \\"\\", + path: \\"\\", + \\"extra-data\\": \\"\\", + version: singleQuote(\\"version\\") + }, + Camera: { + mode: singleQuote(\\"normal\\"), + resolution: singleQuote(\\"medium\\"), + \\"frame-size\\": singleQuote(\\"medium\\"), + bindInitDone: \\"\\", + bindScanCode: \\"\\" + }, + Image: { + webp: \\"false\\", + \\"show-menu-by-longpress\\": \\"false\\" + }, + LivePlayer: { + mode: singleQuote(\\"live\\"), + \\"sound-mode\\": singleQuote(\\"speaker\\"), + \\"auto-pause-if-navigate\\": \\"true\\", + \\"auto-pause-if-open-native\\": \\"true\\", + \\"picture-in-picture-mode\\": \\"[]\\", + bindAudioVolumeNotify: \\"\\", + bindEnterPictureInPicture: \\"\\", + bindLeavePictureInPicture: \\"\\" + }, + Video: { + title: \\"\\", + \\"play-btn-position\\": singleQuote(\\"bottom\\"), + \\"enable-play-gesture\\": \\"false\\", + \\"auto-pause-if-navigate\\": \\"true\\", + \\"auto-pause-if-open-native\\": \\"true\\", + \\"vslide-gesture\\": \\"false\\", + \\"vslide-gesture-in-fullscreen\\": \\"true\\", + \\"ad-unit-id\\": \\"\\", + \\"poster-for-crawler\\": \\"\\", + \\"show-casting-button\\": \\"false\\", + \\"picture-in-picture-mode\\": \\"[]\\", + \\"enable-auto-rotation\\": \\"false\\", + \\"show-screen-lock-button\\": \\"false\\", + bindProgress: \\"\\", + bindLoadedMetadata: \\"\\", + bindControlsToggle: \\"\\", + bindEnterPictureInPicture: \\"\\", + bindLeavePictureInPicture: \\"\\", + bindSeekComplete: \\"\\" + }, + Canvas: { + type: \\"\\" + }, + Ad: { + \\"ad-type\\": singleQuote(\\"banner\\"), + \\"ad-theme\\": singleQuote(\\"white\\") + }, + Editor: { + \\"read-only\\": \\"false\\", + placeholder: \\"\\", + \\"show-img-size\\": \\"false\\", + \\"show-img-toolbar\\": \\"false\\", + \\"show-img-resize\\": \\"false\\", + focus: \\"false\\", + bindReady: \\"\\", + bindFocus: \\"\\", + bindBlur: \\"\\", + bindInput: \\"\\", + bindStatusChange: \\"\\", + name: \\"\\" + }, + MatchMedia: { + \\"min-width\\": \\"\\", + \\"max-width\\": \\"\\", + width: \\"\\", + \\"min-height\\": \\"\\", + \\"max-height\\": \\"\\", + height: \\"\\", + orientation: \\"\\" + }, + FunctionalPageNavigator: { + version: singleQuote(\\"release\\"), + name: \\"\\", + args: \\"\\", + bindSuccess: \\"\\", + bindFail: \\"\\", + bindCancel: \\"\\" + }, + LivePusher: { + url: \\"\\", + mode: singleQuote(\\"RTC\\"), + autopush: \\"false\\", + muted: \\"false\\", + \\"enable-camera\\": \\"true\\", + \\"auto-focus\\": \\"true\\", + orientation: singleQuote(\\"vertical\\"), + beauty: \\"0\\", + whiteness: \\"0\\", + aspect: singleQuote(\\"9:16\\"), + \\"min-bitrate\\": \\"200\\", + \\"max-bitrate\\": \\"1000\\", + \\"audio-quality\\": singleQuote(\\"high\\"), + \\"waiting-image\\": \\"\\", + \\"waiting-image-hash\\": \\"\\", + zoom: \\"false\\", + \\"device-position\\": singleQuote(\\"front\\"), + \\"background-mute\\": \\"false\\", + mirror: \\"false\\", + \\"remote-mirror\\": \\"false\\", + \\"local-mirror\\": \\"false\\", + \\"audio-reverb-type\\": \\"0\\", + \\"enable-mic\\": \\"true\\", + \\"enable-agc\\": \\"false\\", + \\"enable-ans\\": \\"false\\", + \\"audio-volume-type\\": singleQuote(\\"voicecall\\"), + \\"video-width\\": \\"360\\", + \\"video-height\\": \\"640\\", + animation: \\"\\", + bindStateChange: \\"\\", + bindNetStatus: \\"\\", + bindBgmStart: \\"\\", + bindBgmProgress: \\"\\", + bindBgmComplete: \\"\\" + }, + OfficialAccount: { + bindLoad: \\"\\", + bindError: \\"\\" + }, + OpenData: { + type: \\"\\", + \\"open-gid\\": \\"\\", + lang: singleQuote(\\"en\\"), + \\"default-text\\": \\"\\", + \\"default-avatar\\": \\"\\", + bindError: \\"\\" + }, + NavigationBar: { + title: \\"\\", + loading: \\"false\\", + \\"front-color\\": \\"\\", + \\"background-color\\": \\"\\", + \\"color-animation-duration\\": \\"0\\", + \\"color-animation-timing-func\\": singleQuote(\\"linear\\") + }, + PageMeta: { + \\"background-text-style\\": \\"\\", + \\"background-color\\": \\"\\", + \\"background-color-top\\": \\"\\", + \\"background-color-bottom\\": \\"\\", + \\"scroll-top\\": singleQuote(\\"\\"), + \\"scroll-duration\\": \\"300\\", + \\"page-style\\": singleQuote(\\"\\"), + \\"root-font-size\\": singleQuote(\\"\\"), + bindResize: \\"\\", + bindScroll: \\"\\", + bindScrollDone: \\"\\" + }, + VoipRoom: { + openid: \\"\\", + mode: singleQuote(\\"camera\\"), + \\"device-position\\": singleQuote(\\"front\\"), + bindError: \\"\\" + }, + AdCustom: { + \\"unit-id\\": \\"\\", + \\"ad-intervals\\": \\"\\", + bindLoad: \\"\\", + bindError: \\"\\" + } + }; + var hostConfig = { + initNativeApi: initNativeApi, + onTaroElementCreate: function onTaroElementCreate(tagName) { + warn(tagName === \\"MAP\\", \\"\\\\u5fae\\\\u4fe1\\\\u5c0f\\\\u7a0b\\\\u5e8f map \\\\u7ec4\\\\u4ef6\\\\u7684 \`setting\` \\\\u5c5e\\\\u6027\\\\u9700\\\\u8981\\\\u4f20\\\\u9012\\\\u4e00\\\\u4e2a\\\\u9ed8\\\\u8ba4\\\\u503c\\\\u3002\\\\u8be6\\\\u60c5\\\\uff1a\\\\n https://developers.weixin.qq.com/miniprogram/dev/component/map.html\\"); + } + }; + mergeReconciler(hostConfig); + mergeInternalComponents(components); + var taro_runtime = __webpack_require__(1); + var classCallCheck = __webpack_require__(2); + var createClass = __webpack_require__(3); + var possibleConstructorReturn = __webpack_require__(5); + var getPrototypeOf = __webpack_require__(4); + var inherits = __webpack_require__(6); + var react = __webpack_require__(0); + var app = __webpack_require__(11); + var app_App = function(_Component) { + Object(inherits[\\"a\\"])(App, _Component); + function App() { + Object(classCallCheck[\\"a\\"])(this, App); + return Object(possibleConstructorReturn[\\"a\\"])(this, Object(getPrototypeOf[\\"a\\"])(App).apply(this, arguments)); + } + Object(createClass[\\"a\\"])(App, [ { + key: \\"componentDidMount\\", + value: function componentDidMount() {} + }, { + key: \\"componentDidShow\\", + value: function componentDidShow() {} + }, { + key: \\"componentDidHide\\", + value: function componentDidHide() {} + }, { + key: \\"componentDidCatchError\\", + value: function componentDidCatchError() {} + }, { + key: \\"render\\", + value: function render() { + return this.props.children; + } + } ]); + return App; + }(react[\\"Component\\"]); + var lib_src_app = app_App; + var taro_react = __webpack_require__(8); + var config = { + pages: [ \\"pages/index/index\\" ], + window: { + backgroundTextStyle: \\"light\\", + navigationBarBackgroundColor: \\"#fff\\", + navigationBarTitleText: \\"WeChat\\", + navigationBarTextStyle: \\"black\\" + } + }; + taro_runtime[\\"window\\"].__taroAppConfig = config; + var inst = App(Object(taro_runtime[\\"createReactApp\\"])(lib_src_app, react, taro_react[\\"a\\"], config)); + } +}, [ [ 14, 0, 1, 3, 2 ] ] ]); + + + +/** filePath: dist/app.json **/ +{\\"pages\\":[\\"pages/index/index\\"],\\"window\\":{\\"backgroundTextStyle\\":\\"light\\",\\"navigationBarBackgroundColor\\":\\"#fff\\",\\"navigationBarTitleText\\":\\"WeChat\\",\\"navigationBarTextStyle\\":\\"black\\"}} + +/** filePath: dist/app.wxss **/ + + +/** filePath: dist/base.wxml **/ + + + + + + + + ++ + + + ++ + ++ + + + ++ + ++ + + + ++ + ++ + + + ++ + +{{i.v}} + + + + + + + ++ + + + ++ + ++ + + + ++ + ++ + + + + + + + ++ + ++ + + + ++ + ++ + + + ++ + ++ + + + + + + + ++ + ++ + + + ++ + ++ + + + ++ + ++ + + + + + + + ++ + ++ + + + ++ + ++ + + + + + + + ++ + ++ + + + ++ + ++ + + + + + + + ++ + ++ + + + ++ + ++ + + + + + + + ++ + ++ + + + ++ + ++ + + + + + + + ++ + ++ + + + ++ + ++ + + + + + + + ++ + ++ + + + ++ + ++ + + + + + + + ++ + ++ + + + ++ + ++ + + + + + + + ++ + ++ + + + ++ + ++ + + + + + + + ++ + ++ + + + ++ + ++ + + + + + + + ++ + ++ + + + ++ + ++ + + + + + + + ++ + ++ + + + ++ + ++ + + + + + + + ++ + ++ + + +/** filePath: dist/common.js **/ +(wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 2 ], [ function(module, __webpack_exports__, __webpack_require__) { + \\"use strict\\"; + __webpack_require__.r(__webpack_exports__); + __webpack_exports__[\\"default\\"] = \\"react-mock\\"; +} ] ]); + +/** filePath: dist/comp.js **/ +(wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 6 ], { + 12: function(module, __webpack_exports__, __webpack_require__) { + \\"use strict\\"; + __webpack_require__.r(__webpack_exports__); + var _tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1); + Component(Object(_tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__[\\"createRecursiveComponentConfig\\"])()); + } +}, [ [ 12, 0, 1 ] ] ]); + +/** filePath: dist/comp.json **/ +{\\"component\\":true,\\"usingComponents\\":{\\"comp\\":\\"./comp\\"}} + +/** filePath: dist/comp.wxml **/ + + + +/** filePath: dist/pages/index/index.js **/ +(wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 7 ], { + 13: function(module, exports, __webpack_require__) {}, + 15: function(module, __webpack_exports__, __webpack_require__) { + \\"use strict\\"; + __webpack_require__.r(__webpack_exports__); + var taro_runtime = __webpack_require__(1); + var classCallCheck = __webpack_require__(2); + var createClass = __webpack_require__(3); + var possibleConstructorReturn = __webpack_require__(5); + var getPrototypeOf = __webpack_require__(4); + var inherits = __webpack_require__(6); + var react = __webpack_require__(0); + var taro_components = __webpack_require__(7); + var index = __webpack_require__(13); + var index_Index = function(_Component) { + Object(inherits[\\"a\\"])(Index, _Component); + function Index() { + Object(classCallCheck[\\"a\\"])(this, Index); + return Object(possibleConstructorReturn[\\"a\\"])(this, Object(getPrototypeOf[\\"a\\"])(Index).apply(this, arguments)); + } + Object(createClass[\\"a\\"])(Index, [ { + key: \\"componentDidMount\\", + value: function componentDidMount() { + var a = x > 10 ? \\"big\\" : \\"small\\"; + } + }, { + key: \\"render\\", + value: function render() { + return react[\\"default\\"].createElement(taro_components[\\"View\\"], { + className: \\"index\\" + }, react[\\"default\\"].createElement(taro_components[\\"Text\\"], null, \\"Hello world!\\")); + } + } ]); + return Index; + }(react[\\"Component\\"]); + var config = { + navigationBarTitleText: \\"\\\\u9996\\\\u9875\\" + }; + var inst = Page(Object(taro_runtime[\\"createPageConfig\\"])(index_Index, \\"pages/index/index\\", {}, config || {})); + } +}, [ [ 15, 0, 1, 3, 2 ] ] ]); + +/** filePath: dist/pages/index/index.json **/ +{\\"navigationBarTitleText\\":\\"首页\\",\\"usingComponents\\":{\\"comp\\":\\"../../comp\\"}} + +/** filePath: dist/pages/index/index.wxml **/ + + + +/** filePath: dist/pages/index/index.wxss **/ + + +/** filePath: dist/runtime.js **/ +(function(modules) { + function webpackJsonpCallback(data) { + var chunkIds = data[0]; + var moreModules = data[1]; + var executeModules = data[2]; + var moduleId, chunkId, i = 0, resolves = []; + for (;i < chunkIds.length; i++) { + chunkId = chunkIds[i]; + if (Object.prototype.hasOwnProperty.call(installedChunks, chunkId) && installedChunks[chunkId]) { + resolves.push(installedChunks[chunkId][0]); + } + installedChunks[chunkId] = 0; + } + for (moduleId in moreModules) { + if (Object.prototype.hasOwnProperty.call(moreModules, moduleId)) { + modules[moduleId] = moreModules[moduleId]; + } + } + if (parentJsonpFunction) parentJsonpFunction(data); + while (resolves.length) { + resolves.shift()(); + } + deferredModules.push.apply(deferredModules, executeModules || []); + return checkDeferredModules(); + } + function checkDeferredModules() { + var result; + for (var i = 0; i < deferredModules.length; i++) { + var deferredModule = deferredModules[i]; + var fulfilled = true; + for (var j = 1; j < deferredModule.length; j++) { + var depId = deferredModule[j]; + if (installedChunks[depId] !== 0) fulfilled = false; + } + if (fulfilled) { + deferredModules.splice(i--, 1); + result = __webpack_require__(__webpack_require__.s = deferredModule[0]); + } + } + return result; + } + var installedModules = {}; + var installedChunks = { + 0: 0 + }; + var deferredModules = []; + function __webpack_require__(moduleId) { + if (installedModules[moduleId]) { + return installedModules[moduleId].exports; + } + var module = installedModules[moduleId] = { + i: moduleId, + l: false, + exports: {} + }; + modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); + module.l = true; + return module.exports; + } + __webpack_require__.m = modules; + __webpack_require__.c = installedModules; + __webpack_require__.d = function(exports, name, getter) { + if (!__webpack_require__.o(exports, name)) { + Object.defineProperty(exports, name, { + enumerable: true, + get: getter + }); + } + }; + __webpack_require__.r = function(exports) { + if (typeof Symbol !== \\"undefined\\" && Symbol.toStringTag) { + Object.defineProperty(exports, Symbol.toStringTag, { + value: \\"Module\\" + }); + } + Object.defineProperty(exports, \\"__esModule\\", { + value: true + }); + }; + __webpack_require__.t = function(value, mode) { + if (mode & 1) value = __webpack_require__(value); + if (mode & 8) return value; + if (mode & 4 && typeof value === \\"object\\" && value && value.__esModule) return value; + var ns = Object.create(null); + __webpack_require__.r(ns); + Object.defineProperty(ns, \\"default\\", { + enumerable: true, + value: value + }); + if (mode & 2 && typeof value != \\"string\\") for (var key in value) __webpack_require__.d(ns, key, function(key) { + return value[key]; + }.bind(null, key)); + return ns; + }; + __webpack_require__.n = function(module) { + var getter = module && module.__esModule ? function getDefault() { + return module[\\"default\\"]; + } : function getModuleExports() { + return module; + }; + __webpack_require__.d(getter, \\"a\\", getter); + return getter; + }; + __webpack_require__.o = function(object, property) { + return Object.prototype.hasOwnProperty.call(object, property); + }; + __webpack_require__.p = \\"/\\"; + var jsonpArray = wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []; + var oldJsonpFunction = jsonpArray.push.bind(jsonpArray); + jsonpArray.push = webpackJsonpCallback; + jsonpArray = jsonpArray.slice(); + for (var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]); + var parentJsonpFunction = oldJsonpFunction; + checkDeferredModules(); +})([]); + +/** filePath: dist/taro.js **/ +(wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 1 ], { + 1: function(module, __webpack_exports__, __webpack_require__) { + \\"use strict\\"; + var _unused_webpack_default_export = \\"taro-runtime-mock\\"; + }, + 7: function(module, __webpack_exports__, __webpack_require__) { + \\"use strict\\"; + var _unused_webpack_default_export = \\"taro-components-mock\\"; + }, + 8: function(module, __webpack_exports__, __webpack_require__) { + \\"use strict\\"; + __webpack_exports__[\\"a\\"] = \\"taro-react-mock\\"; + } +} ]); + +/** filePath: dist/utils.wxs **/ +module.exports = { + a: function (l, n, s) { + var a = [\\"view\\",\\"cover-view\\",\\"block\\",\\"text\\",\\"slot\\",\\"slot-view\\",\\"label\\",\\"form\\",\\"scroll-view\\"] + var b = [\\"slot\\",\\"slot-view\\",\\"label\\",\\"form\\",\\"scroll-view\\"] + if (a.indexOf(n) === -1) { + l = 0 + } + if (b.indexOf(n) > -1) { + var u = s.split(',') + var depth = 0 + for (var i = 0; i < u.length; i++) { + if (u[i] === n) depth++ + } + l = depth + } + return 'tmpl_' + l + '_' + n + }, + b: function (a, b) { + return a === undefined ? b : a + }, + c: function(i, prefix) { + var s = i.focus !== undefined ? 'focus' : 'blur' + return prefix + i.nn + '_' + s + }, + d: function (i, v) { + return i === undefined ? v : i + }, + e: function (n) { + return 'tmpl_' + n + '_container' + }, + f: function (l, n) { + var b = [\\"slot\\",\\"slot-view\\",\\"label\\",\\"form\\",\\"scroll-view\\"] + if (b.indexOf(n) > -1) { + if (l) l += ',' + l += n + } + return l + } +} + +/** filePath: dist/vendors.js **/ +(wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 3 ], [ , , function(module, __webpack_exports__, __webpack_require__) { + \\"use strict\\"; + __webpack_require__.d(__webpack_exports__, \\"a\\", (function() { + return _classCallCheck; + })); + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError(\\"Cannot call a class as a function\\"); + } + } +}, function(module, __webpack_exports__, __webpack_require__) { + \\"use strict\\"; + __webpack_require__.d(__webpack_exports__, \\"a\\", (function() { + return _createClass; + })); + function _defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if (\\"value\\" in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + function _createClass(Constructor, protoProps, staticProps) { + if (protoProps) _defineProperties(Constructor.prototype, protoProps); + if (staticProps) _defineProperties(Constructor, staticProps); + return Constructor; + } +}, function(module, __webpack_exports__, __webpack_require__) { + \\"use strict\\"; + __webpack_require__.d(__webpack_exports__, \\"a\\", (function() { + return _getPrototypeOf; + })); + function _getPrototypeOf(o) { + _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { + return o.__proto__ || Object.getPrototypeOf(o); + }; + return _getPrototypeOf(o); + } +}, function(module, __webpack_exports__, __webpack_require__) { + \\"use strict\\"; + __webpack_require__.d(__webpack_exports__, \\"a\\", (function() { + return _possibleConstructorReturn; + })); + function _typeof(obj) { + \\"@babel/helpers - typeof\\"; + if (typeof Symbol === \\"function\\" && typeof Symbol.iterator === \\"symbol\\") { + _typeof = function _typeof(obj) { + return typeof obj; + }; + } else { + _typeof = function _typeof(obj) { + return obj && typeof Symbol === \\"function\\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \\"symbol\\" : typeof obj; + }; + } + return _typeof(obj); + } + function _assertThisInitialized(self) { + if (self === void 0) { + throw new ReferenceError(\\"this hasn't been initialised - super() hasn't been called\\"); + } + return self; + } + function _possibleConstructorReturn(self, call) { + if (call && (_typeof(call) === \\"object\\" || typeof call === \\"function\\")) { + return call; + } + return _assertThisInitialized(self); + } +}, function(module, __webpack_exports__, __webpack_require__) { + \\"use strict\\"; + __webpack_require__.d(__webpack_exports__, \\"a\\", (function() { + return _inherits; + })); + function _setPrototypeOf(o, p) { + _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { + o.__proto__ = p; + return o; + }; + return _setPrototypeOf(o, p); + } + function _inherits(subClass, superClass) { + if (typeof superClass !== \\"function\\" && superClass !== null) { + throw new TypeError(\\"Super expression must either be null or a function\\"); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + writable: true, + configurable: true + } + }); + if (superClass) _setPrototypeOf(subClass, superClass); + } +} ] ]); +" +`; diff --git a/packages/taro-mini-runner/src/__tests__/__snapshots__/bytedance.spec.ts.snap b/packages/taro-mini-runner/src/__tests__/__snapshots__/bytedance.spec.ts.snap new file mode 100644 index 000000000000..f4f8a23d6e03 --- /dev/null +++ b/packages/taro-mini-runner/src/__tests__/__snapshots__/bytedance.spec.ts.snap @@ -0,0 +1,2269 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`bytedance should build bytedance app 1`] = `12`; + +exports[`bytedance should build bytedance app 2`] = ` +" +/** filePath: dist/app.js **/ +require(\\"./runtime\\"); + +require(\\"./common\\"); + +require(\\"./vendors\\"); + +require(\\"./taro\\"); + +(tt[\\"webpackJsonp\\"] = tt[\\"webpackJsonp\\"] || []).push([ [ 4 ], { + 12: function(module, exports, __webpack_require__) {}, + 18: function(module, __webpack_exports__, __webpack_require__) { + \\"use strict\\"; + __webpack_require__.r(__webpack_exports__); + function _arrayLikeToArray(arr, len) { + if (len == null || len > arr.length) len = arr.length; + for (var i = 0, arr2 = new Array(len); i < len; i++) { + arr2[i] = arr[i]; + } + return arr2; + } + function _arrayWithoutHoles(arr) { + if (Array.isArray(arr)) return _arrayLikeToArray(arr); + } + function _iterableToArray(iter) { + if (typeof Symbol !== \\"undefined\\" && Symbol.iterator in Object(iter)) return Array.from(iter); + } + function _unsupportedIterableToArray(o, minLen) { + if (!o) return; + if (typeof o === \\"string\\") return _arrayLikeToArray(o, minLen); + var n = Object.prototype.toString.call(o).slice(8, -1); + if (n === \\"Object\\" && o.constructor) n = o.constructor.name; + if (n === \\"Map\\" || n === \\"Set\\") return Array.from(o); + if (n === \\"Arguments\\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); + } + function _nonIterableSpread() { + throw new TypeError(\\"Invalid attempt to spread non-iterable instance.\\\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\\"); + } + function _toConsumableArray(arr) { + return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); + } + function _typeof(obj) { + \\"@babel/helpers - typeof\\"; + if (typeof Symbol === \\"function\\" && typeof Symbol.iterator === \\"symbol\\") { + _typeof = function _typeof(obj) { + return typeof obj; + }; + } else { + _typeof = function _typeof(obj) { + return obj && typeof Symbol === \\"function\\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \\"symbol\\" : typeof obj; + }; + } + return _typeof(obj); + } + function _assertThisInitialized(self) { + if (self === void 0) { + throw new ReferenceError(\\"this hasn't been initialised - super() hasn't been called\\"); + } + return self; + } + function _possibleConstructorReturn(self, call) { + if (call && (_typeof(call) === \\"object\\" || typeof call === \\"function\\")) { + return call; + } + return _assertThisInitialized(self); + } + function _getPrototypeOf(o) { + _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { + return o.__proto__ || Object.getPrototypeOf(o); + }; + return _getPrototypeOf(o); + } + function _setPrototypeOf(o, p) { + _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { + o.__proto__ = p; + return o; + }; + return _setPrototypeOf(o, p); + } + function _inherits(subClass, superClass) { + if (typeof superClass !== \\"function\\" && superClass !== null) { + throw new TypeError(\\"Super expression must either be null or a function\\"); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + writable: true, + configurable: true + } + }); + if (superClass) _setPrototypeOf(subClass, superClass); + } + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError(\\"Cannot call a class as a function\\"); + } + } + function _defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if (\\"value\\" in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + function _createClass(Constructor, protoProps, staticProps) { + if (protoProps) _defineProperties(Constructor.prototype, protoProps); + if (staticProps) _defineProperties(Constructor, staticProps); + return Constructor; + } + function isString(o) { + return typeof o === \\"string\\"; + } + function isUndefined(o) { + return typeof o === \\"undefined\\"; + } + function isNull(o) { + return o === null; + } + function isObject(o) { + return o !== null && _typeof(o) === \\"object\\"; + } + function isBoolean(o) { + return o === true || o === false; + } + function isFunction(o) { + return typeof o === \\"function\\"; + } + function isNumber(o) { + return typeof o === \\"number\\"; + } + function isBooleanStringLiteral(o) { + return o === \\"true\\" || o === \\"false\\"; + } + var isArray = Array.isArray; + var styles = { + style: \\"i.\\".concat(\\"st\\"), + class: \\"i.\\".concat(\\"cl\\") + }; + var events = { + bindtap: \\"eh\\" + }; + var touchEvents = { + bindTouchStart: \\"\\", + bindTouchMove: \\"\\", + bindTouchEnd: \\"\\", + bindTouchCancel: \\"\\", + bindLongTap: \\"\\" + }; + var animationEvents = { + bindAnimationStart: \\"\\", + bindAnimationIteration: \\"\\", + bindAnimationEnd: \\"\\", + bindTransitionEnd: \\"\\" + }; + var specialEvents = new Set([ \\"htouchmove\\", \\"vtouchmove\\" ]); + function singleQuote(s) { + return \\"'\\".concat(s, \\"'\\"); + } + var View = Object.assign(Object.assign({ + \\"hover-class\\": singleQuote(\\"none\\"), + \\"hover-stop-propagation\\": \\"false\\", + \\"hover-start-time\\": \\"50\\", + \\"hover-stay-time\\": \\"400\\", + animation: \\"\\" + }, touchEvents), animationEvents); + var Icon = { + type: \\"\\", + size: \\"23\\", + color: \\"\\" + }; + var MapComp = Object.assign({ + longitude: \\"\\", + latitude: \\"\\", + scale: \\"16\\", + markers: \\"[]\\", + covers: \\"\\", + polyline: \\"[]\\", + circles: \\"[]\\", + controls: \\"[]\\", + \\"include-points\\": \\"[]\\", + \\"show-location\\": \\"\\", + \\"layer-style\\": \\"1\\", + bindMarkerTap: \\"\\", + bindControlTap: \\"\\", + bindCalloutTap: \\"\\", + bindUpdated: \\"\\" + }, touchEvents); + var Progress = { + percent: \\"\\", + \\"stroke-width\\": \\"6\\", + color: singleQuote(\\"#09BB07\\"), + activeColor: singleQuote(\\"#09BB07\\"), + backgroundColor: singleQuote(\\"#EBEBEB\\"), + active: \\"false\\", + \\"active-mode\\": singleQuote(\\"backwards\\"), + \\"show-info\\": \\"false\\" + }; + var RichText = { + nodes: \\"[]\\" + }; + var Text = { + selectable: \\"false\\", + space: \\"\\", + decode: \\"false\\" + }; + var Button = { + size: singleQuote(\\"default\\"), + type: \\"\\", + plain: \\"false\\", + disabled: \\"\\", + loading: \\"false\\", + \\"form-type\\": \\"\\", + \\"open-type\\": \\"\\", + \\"hover-class\\": singleQuote(\\"button-hover\\"), + \\"hover-stop-propagation\\": \\"false\\", + \\"hover-start-time\\": \\"20\\", + \\"hover-stay-time\\": \\"70\\", + name: \\"\\" + }; + var Checkbox = { + value: \\"\\", + disabled: \\"\\", + checked: \\"false\\", + color: singleQuote(\\"#09BB07\\"), + name: \\"\\" + }; + var CheckboxGroup = { + bindChange: \\"\\", + name: \\"\\" + }; + var Form = { + \\"report-submit\\": \\"false\\", + bindSubmit: \\"\\", + bindReset: \\"\\", + name: \\"\\" + }; + var Input = { + value: \\"\\", + type: singleQuote(\\"\\"), + password: \\"false\\", + placeholder: \\"\\", + \\"placeholder-style\\": \\"\\", + \\"placeholder-class\\": singleQuote(\\"input-placeholder\\"), + disabled: \\"\\", + maxlength: \\"140\\", + \\"cursor-spacing\\": \\"0\\", + focus: \\"false\\", + \\"confirm-type\\": singleQuote(\\"done\\"), + \\"confirm-hold\\": \\"false\\", + cursor: \\"i.value.length\\", + \\"selection-start\\": \\"-1\\", + \\"selection-end\\": \\"-1\\", + bindInput: \\"\\", + bindFocus: \\"\\", + bindBlur: \\"\\", + bindConfirm: \\"\\", + name: \\"\\" + }; + var Label = { + for: \\"\\", + name: \\"\\" + }; + var Picker = { + mode: singleQuote(\\"selector\\"), + disabled: \\"\\", + range: \\"\\", + \\"range-key\\": \\"\\", + value: \\"\\", + start: \\"\\", + end: \\"\\", + fields: singleQuote(\\"day\\"), + \\"custom-item\\": \\"\\", + name: \\"\\", + bindCancel: \\"\\", + bindChange: \\"\\", + bindColumnChange: \\"\\" + }; + var PickerView = { + value: \\"\\", + \\"indicator-style\\": \\"\\", + \\"indicator-class\\": \\"\\", + \\"mask-style\\": \\"\\", + \\"mask-class\\": \\"\\", + bindChange: \\"\\", + name: \\"\\" + }; + var PickerViewColumn = { + name: \\"\\" + }; + var Radio = { + value: \\"\\", + checked: \\"false\\", + disabled: \\"\\", + color: singleQuote(\\"#09BB07\\"), + name: \\"\\" + }; + var RadioGroup = { + bindChange: \\"\\", + name: \\"\\" + }; + var Slider = { + min: \\"0\\", + max: \\"100\\", + step: \\"1\\", + disabled: \\"\\", + value: \\"0\\", + activeColor: singleQuote(\\"#1aad19\\"), + backgroundColor: singleQuote(\\"#e9e9e9\\"), + \\"block-size\\": \\"28\\", + \\"block-color\\": singleQuote(\\"#ffffff\\"), + \\"show-value\\": \\"false\\", + bindChange: \\"\\", + bindChanging: \\"\\", + name: \\"\\" + }; + var Switch = { + checked: \\"false\\", + disabled: \\"\\", + type: singleQuote(\\"switch\\"), + color: singleQuote(\\"#04BE02\\"), + bindChange: \\"\\", + name: \\"\\" + }; + var Textarea = { + value: \\"\\", + placeholder: \\"\\", + \\"placeholder-style\\": \\"\\", + \\"placeholder-class\\": singleQuote(\\"textarea-placeholder\\"), + disabled: \\"\\", + maxlength: \\"140\\", + \\"auto-focus\\": \\"false\\", + focus: \\"false\\", + \\"auto-height\\": \\"false\\", + fixed: \\"false\\", + \\"cursor-spacing\\": \\"0\\", + cursor: \\"-1\\", + \\"selection-start\\": \\"-1\\", + \\"selection-end\\": \\"-1\\", + bindFocus: \\"\\", + bindBlur: \\"\\", + bindLineChange: \\"\\", + bindInput: \\"\\", + bindConfirm: \\"\\", + name: \\"\\" + }; + var CoverImage = { + src: \\"\\", + bindLoad: \\"eh\\", + bindError: \\"eh\\" + }; + var CoverView = Object.assign({ + \\"scroll-top\\": \\"false\\" + }, touchEvents); + var MovableArea = { + \\"scale-area\\": \\"false\\" + }; + var MovableView = Object.assign(Object.assign({ + direction: \\"none\\", + inertia: \\"false\\", + \\"out-of-bounds\\": \\"false\\", + x: \\"\\", + y: \\"\\", + damping: \\"20\\", + friction: \\"2\\", + disabled: \\"\\", + scale: \\"false\\", + \\"scale-min\\": \\"0.5\\", + \\"scale-max\\": \\"10\\", + \\"scale-value\\": \\"1\\", + animation: \\"true\\", + bindChange: \\"\\", + bindScale: \\"\\", + htouchmove: \\"\\", + vtouchmove: \\"\\", + width: singleQuote(\\"10px\\"), + height: singleQuote(\\"10px\\") + }, touchEvents), animationEvents); + var ScrollView = Object.assign(Object.assign({ + \\"scroll-x\\": \\"false\\", + \\"scroll-y\\": \\"false\\", + \\"upper-threshold\\": \\"50\\", + \\"lower-threshold\\": \\"50\\", + \\"scroll-top\\": \\"\\", + \\"scroll-left\\": \\"\\", + \\"scroll-into-view\\": \\"\\", + \\"scroll-with-animation\\": \\"false\\", + \\"enable-back-to-top\\": \\"false\\", + bindScrollToUpper: \\"\\", + bindScrollToLower: \\"\\", + bindScroll: \\"\\" + }, touchEvents), animationEvents); + var Swiper = Object.assign({ + \\"indicator-dots\\": \\"false\\", + \\"indicator-color\\": singleQuote(\\"rgba(0, 0, 0, .3)\\"), + \\"indicator-active-color\\": singleQuote(\\"#000000\\"), + autoplay: \\"false\\", + current: \\"0\\", + interval: \\"5000\\", + duration: \\"500\\", + circular: \\"false\\", + vertical: \\"false\\", + \\"previous-margin\\": \\"'0px'\\", + \\"next-margin\\": \\"'0px'\\", + \\"display-multiple-items\\": \\"1\\", + bindChange: \\"\\", + bindTransition: \\"\\", + bindAnimationFinish: \\"\\" + }, touchEvents); + var SwiperItem = { + \\"item-id\\": \\"\\" + }; + var Navigator = { + url: \\"\\", + \\"open-type\\": singleQuote(\\"navigate\\"), + delta: \\"1\\", + \\"hover-class\\": singleQuote(\\"navigator-hover\\"), + \\"hover-stop-propagation\\": \\"false\\", + \\"hover-start-time\\": \\"50\\", + \\"hover-stay-time\\": \\"600\\", + bindSuccess: \\"\\", + bindFail: \\"\\", + bindComplete: \\"\\" + }; + var Audio = { + id: \\"\\", + src: \\"\\", + loop: \\"false\\", + controls: \\"false\\", + poster: \\"\\", + name: \\"\\", + author: \\"\\", + bindError: \\"\\", + bindPlay: \\"\\", + bindPause: \\"\\", + bindTimeUpdate: \\"\\", + bindEnded: \\"\\" + }; + var Camera = { + \\"device-position\\": singleQuote(\\"back\\"), + flash: singleQuote(\\"auto\\"), + bindStop: \\"\\", + bindError: \\"\\" + }; + var Image = Object.assign({ + src: \\"\\", + mode: singleQuote(\\"scaleToFill\\"), + \\"lazy-load\\": \\"false\\", + bindError: \\"\\", + bindLoad: \\"\\" + }, touchEvents); + var LivePlayer = { + src: \\"\\", + autoplay: \\"false\\", + muted: \\"false\\", + orientation: singleQuote(\\"vertical\\"), + \\"object-fit\\": singleQuote(\\"contain\\"), + \\"background-mute\\": \\"false\\", + \\"min-cache\\": \\"1\\", + \\"max-cache\\": \\"3\\", + animation: \\"\\", + bindStateChange: \\"\\", + bindFullScreenChange: \\"\\", + bindNetStatus: \\"\\" + }; + var Video = { + src: \\"\\", + duration: \\"\\", + controls: \\"true\\", + \\"danmu-list\\": \\"\\", + \\"danmu-btn\\": \\"\\", + \\"enable-danmu\\": \\"\\", + autoplay: \\"false\\", + loop: \\"false\\", + muted: \\"false\\", + \\"initial-time\\": \\"0\\", + \\"page-gesture\\": \\"false\\", + direction: \\"\\", + \\"show-progress\\": \\"true\\", + \\"show-fullscreen-btn\\": \\"true\\", + \\"show-play-btn\\": \\"true\\", + \\"show-center-play-btn\\": \\"true\\", + \\"enable-progress-gesture\\": \\"true\\", + \\"object-fit\\": singleQuote(\\"contain\\"), + poster: \\"\\", + \\"show-mute-btn\\": \\"false\\", + animation: \\"\\", + bindPlay: \\"\\", + bindPause: \\"\\", + bindEnded: \\"\\", + bindTimeUpdate: \\"\\", + bindFullScreenChange: \\"\\", + bindWaiting: \\"\\", + bindError: \\"\\" + }; + var Canvas = Object.assign({ + \\"canvas-id\\": \\"\\", + \\"disable-scroll\\": \\"false\\", + bindError: \\"\\" + }, touchEvents); + var Ad = { + \\"unit-id\\": \\"\\", + \\"ad-intervals\\": \\"\\", + bindLoad: \\"\\", + bindError: \\"\\", + bindClose: \\"\\" + }; + var WebView = { + src: \\"\\", + bindMessage: \\"\\", + bindLoad: \\"\\", + bindError: \\"\\" + }; + var Block = {}; + var SlotView = { + name: \\"\\" + }; + var Slot = { + name: \\"\\" + }; + var internalComponents = { + View: View, + Icon: Icon, + Progress: Progress, + RichText: RichText, + Text: Text, + Button: Button, + Checkbox: Checkbox, + CheckboxGroup: CheckboxGroup, + Form: Form, + Input: Input, + Label: Label, + Picker: Picker, + PickerView: PickerView, + PickerViewColumn: PickerViewColumn, + Radio: Radio, + RadioGroup: RadioGroup, + Slider: Slider, + Switch: Switch, + CoverImage: CoverImage, + Textarea: Textarea, + CoverView: CoverView, + MovableArea: MovableArea, + MovableView: MovableView, + ScrollView: ScrollView, + Swiper: Swiper, + SwiperItem: SwiperItem, + Navigator: Navigator, + Audio: Audio, + Camera: Camera, + Image: Image, + LivePlayer: LivePlayer, + Video: Video, + Canvas: Canvas, + Ad: Ad, + WebView: WebView, + Block: Block, + Map: MapComp, + Slot: Slot, + SlotView: SlotView + }; + var controlledComponent = new Set([ \\"input\\", \\"checkbox\\", \\"picker\\", \\"picker-view\\", \\"radio\\", \\"slider\\", \\"switch\\", \\"textarea\\" ]); + var focusComponents = new Set([ \\"input\\", \\"textarea\\" ]); + var voidElements = new Set([ \\"progress\\", \\"icon\\", \\"rich-text\\", \\"input\\", \\"textarea\\", \\"slider\\", \\"switch\\", \\"audio\\", \\"live-pusher\\", \\"video\\", \\"ad\\", \\"official-account\\", \\"open-data\\", \\"navigation-bar\\" ]); + var nestElements = new Map([ [ \\"view\\", -1 ], [ \\"cover-view\\", -1 ], [ \\"block\\", -1 ], [ \\"text\\", -1 ], [ \\"slot\\", 8 ], [ \\"slot-view\\", 8 ], [ \\"label\\", 6 ], [ \\"form\\", 4 ], [ \\"scroll-view\\", 4 ] ]); + var EMPTY_OBJ = {}; + var EMPTY_ARR = []; + var noop = function noop() {}; + var defaultReconciler = {}; + var box = function box(v) { + return { + v: v + }; + }; + var unbox = function unbox(b) { + return b.v; + }; + function toDashed(s) { + return s.replace(/([a-z0-9])([A-Z])/g, \\"$1-$2\\").toLowerCase(); + } + function toCamelCase(s) { + var camel = \\"\\"; + var nextCap = false; + for (var i = 0; i < s.length; i++) { + if (s[i] !== \\"-\\") { + camel += nextCap ? s[i].toUpperCase() : s[i]; + nextCap = false; + } else { + nextCap = true; + } + } + return camel; + } + function capitalize(s) { + return s.charAt(0).toUpperCase() + s.slice(1); + } + var shared_esm_hasOwnProperty = Object.prototype.hasOwnProperty; + var hasOwn = function hasOwn(val, key) { + return shared_esm_hasOwnProperty.call(val, key); + }; + var reportIssue = \\"\\\\u5982\\\\u6709\\\\u7591\\\\u95ee\\\\uff0c\\\\u8bf7\\\\u63d0\\\\u4ea4 issue \\\\u81f3\\\\uff1ahttps://github.com/nervjs/taro/issues\\"; + function ensure(condition, msg) { + if (!condition) { + throw new Error(msg + \\"\\\\n\\" + reportIssue); + } + } + function warn(condition, msg) { + if (false) {} + } + function queryToJson(str) { + var dec = decodeURIComponent; + var qp = str.split(\\"&\\"); + var ret = {}; + var name; + var val; + for (var i = 0, l = qp.length, item; i < l; ++i) { + item = qp[i]; + if (item.length) { + var s = item.indexOf(\\"=\\"); + if (s < 0) { + name = dec(item); + val = \\"\\"; + } else { + name = dec(item.slice(0, s)); + val = dec(item.slice(s + 1)); + } + if (typeof ret[name] === \\"string\\") { + ret[name] = [ ret[name] ]; + } + if (Array.isArray(ret[name])) { + ret[name].push(val); + } else { + ret[name] = val; + } + } + } + return ret; + } + var _uniqueId = 1; + var _loadTime = (new Date).getTime().toString(); + function getUniqueKey() { + return _loadTime + _uniqueId++; + } + var cacheData = {}; + function cacheDataSet(key, val) { + cacheData[key] = val; + } + function cacheDataGet(key, delelteAfterGet) { + var temp = cacheData[key]; + delelteAfterGet && delete cacheData[key]; + return temp; + } + function cacheDataHas(key) { + return key in cacheData; + } + function mergeInternalComponents(components) { + Object.keys(components).forEach((function(name) { + if (name in internalComponents) { + Object.assign(internalComponents[name], components[name]); + } else { + internalComponents[name] = components[name]; + } + })); + } + function mergeReconciler(hostConfig) { + Object.assign(defaultReconciler, hostConfig); + } + var weixinAdapter = { + if: \\"wx:if\\", + else: \\"wx:else\\", + elseif: \\"wx:elif\\", + for: \\"wx:for\\", + forItem: \\"wx:for-item\\", + forIndex: \\"wx:for-index\\", + key: \\"wx:key\\", + xs: \\"wxs\\", + type: \\"weapp\\" + }; + var shared_esm_BaseTemplate = function() { + function BaseTemplate() { + var _this = this; + _classCallCheck(this, BaseTemplate); + this.exportExpr = \\"module.exports =\\"; + this.supportXS = false; + this.Adapter = weixinAdapter; + this.internalComponents = internalComponents; + this.focusComponents = focusComponents; + this.voidElements = voidElements; + this.nestElements = nestElements; + this.buildPageTemplate = function(baseTempPath) { + var template = ' \\\\n'); + return template; + }; + this.buildBaseComponentTemplate = function(ext) { + var data = !_this.isSupportRecursive && _this.supportXS ? _this.dataKeymap(\\"i:i,l:l\\") : _this.dataKeymap(\\"i:i\\"); + return ' \\\\n'); + }; + this.buildXScript = function() { + return \\"\\".concat(_this.exportExpr, \\" {\\\\n a: \\").concat(_this.buildXSTmplName(), \\",\\\\n b: function (a, b) {\\\\n return a === undefined ? b : a\\\\n },\\\\n c: function(i, prefix) {\\\\n var s = i.focus !== undefined ? 'focus' : 'blur'\\\\n return prefix + i.\\", \\"nn\\", \\" + '_' + s\\\\n },\\\\n d: function (i, v) {\\\\n return i === undefined ? v : i\\\\n },\\\\n e: function (n) {\\\\n return 'tmpl_' + n + '_\\", \\"container\\", \\"'\\\\n },\\\\n \\").concat(_this.buildXSTmpExtra(), \\"\\\\n}\\"); + }; + } + _createClass(BaseTemplate, [ { + key: \\"buildAttribute\\", + value: function buildAttribute(attrs, nodeName) { + var _this2 = this; + return Object.keys(attrs).map((function(k) { + return \\"\\".concat(k, '=\\"').concat(k.startsWith(\\"bind\\") || k.startsWith(\\"on\\") ? attrs[k] : \\"{\\".concat(_this2.getAttrValue(attrs[k], k, nodeName), \\"}\\"), '\\" '); + })).join(\\"\\"); + } + }, { + key: \\"replacePropName\\", + value: function replacePropName(name, value, _componentName) { + if (value === \\"eh\\") return name.toLowerCase(); + return name; + } + }, { + key: \\"createMiniComponents\\", + value: function createMiniComponents(components) { + var result = Object.create(null); + for (var key in components) { + if (hasOwn(components, key)) { + var component = components[key]; + var compName = toDashed(key); + var newComp = Object.create(null); + if (isFunction(this.modifyCompProps)) { + component = this.modifyCompProps(compName, component); + } + for (var prop in component) { + if (hasOwn(component, prop)) { + var propValue = component[prop]; + if (prop.startsWith(\\"bind\\") || specialEvents.has(prop)) { + propValue = \\"eh\\"; + } else if (propValue === \\"\\") { + propValue = \\"i.\\".concat(toCamelCase(prop)); + } else if (isBooleanStringLiteral(propValue) || isNumber(+propValue)) { + propValue = this.supportXS ? \\"xs.b(i.\\".concat(toCamelCase(prop), \\",\\").concat(propValue, \\")\\") : \\"i.\\".concat(toCamelCase(prop), \\"===undefined?\\").concat(propValue, \\":i.\\").concat(toCamelCase(prop)); + } else { + propValue = \\"i.\\".concat(toCamelCase(prop), \\"||\\").concat(propValue || singleQuote(\\"\\")); + } + prop = this.replacePropName(prop, propValue, compName); + newComp[prop] = propValue; + } + } + if (compName !== \\"block\\") { + Object.assign(newComp, styles, this.getEvents()); + } + if (compName === \\"swiper-item\\") { + delete newComp.style; + } + if (compName === \\"slot\\" || compName === \\"slot-view\\") { + result[compName] = { + slot: \\"i.name\\" + }; + } else { + result[compName] = newComp; + } + } + } + return result; + } + }, { + key: \\"buildBaseTemplate\\", + value: function buildBaseTemplate() { + var Adapter = this.Adapter; + var data = !this.isSupportRecursive && this.supportXS ? \\"\\".concat(this.dataKeymap(\\"i:item,l:''\\")) : this.dataKeymap(\\"i:item\\"); + return \\"\\".concat(this.buildXsTemplate(), '\\\\n\\\\n \\\\n \\\\n \\\\n\\\\n'); + } + }, { + key: \\"buildThirdPartyAttr\\", + value: function buildThirdPartyAttr(attrs) { + return Array.from(attrs).reduce((function(str, attr) { + if (attr.startsWith(\\"@\\")) { + return str + \\"bind\\".concat(attr.slice(1), '=\\"eh\\" '); + } else if (attr.startsWith(\\"bind\\")) { + return str + \\"\\".concat(attr, '=\\"eh\\" '); + } else if (attr.startsWith(\\"on\\")) { + return str + \\"bind\\".concat(attr.slice(2).toLowerCase(), '=\\"eh\\" '); + } + return str + \\"\\".concat(attr, '=\\"{{i.').concat(toCamelCase(attr), '}}\\" '); + }), \\"\\"); + } + }, { + key: \\"buildComponentTemplate\\", + value: function buildComponentTemplate(comp, level) { + return this.focusComponents.has(comp.nodeName) ? this.buildFocusComponentTemplte(comp, level) : this.buildStandardComponentTemplate(comp, level); + } + }, { + key: \\"buildFocusComponentTemplte\\", + value: function buildFocusComponentTemplte(comp, level) { + var attrs = Object.assign({}, comp.attributes); + var templateName = this.supportXS ? \\"xs.c(i, 'tmpl_\\".concat(level, \\"_')\\") : \\"i.focus ? 'tmpl_\\".concat(level, \\"_\\").concat(comp.nodeName, \\"_focus' : 'tmpl_\\").concat(level, \\"_\\").concat(comp.nodeName, \\"_blur'\\"); + delete attrs.focus; + return '\\\\n\\\\n \\\\n\\\\n\\\\n\\\\n <').concat(comp.nodeName, \\" \\").concat(this.buildAttribute(comp.attributes, comp.nodeName), ' id=\\"{{i.uid}}\\" />\\\\n\\\\n\\\\n\\\\n <').concat(comp.nodeName, \\" \\").concat(this.buildAttribute(attrs, comp.nodeName), ' id=\\"{{i.uid}}\\" />\\\\n\\\\n'); + } + }, { + key: \\"buildStandardComponentTemplate\\", + value: function buildStandardComponentTemplate(comp, level) { + var isSupportRecursive = this.isSupportRecursive, Adapter = this.Adapter; + var nextLevel = isSupportRecursive ? 0 : level + 1; + var data = !this.isSupportRecursive ? \\"\\".concat(this.dataKeymap(\\"i:item,l:l\\")) : this.dataKeymap(\\"i:item\\"); + var child = this.supportXS ? '') : ''); + if (isFunction(this.modifyLoopBody)) { + child = this.modifyLoopBody(child, comp.nodeName); + } + var children = this.voidElements.has(comp.nodeName) ? \\"\\" : \\"\\\\n\\\\n ').concat(child, \\"\\\\n \\\\n \\"); + if (isFunction(this.modifyLoopContainer)) { + children = this.modifyLoopContainer(children, comp.nodeName); + } + var nodeName = comp.nodeName === \\"slot\\" || comp.nodeName === \\"slot-view\\" ? \\"view\\" : comp.nodeName; + var res = '\\\\n\\\\n <').concat(nodeName, \\" \\").concat(this.buildAttribute(comp.attributes, comp.nodeName), ' id=\\"{{i.uid}}\\">').concat(children, \\"\\").concat(nodeName, \\">\\\\n\\\\n\\"); + if (isFunction(this.modifyTemplateResult)) { + res = this.modifyTemplateResult(res, comp.nodeName, level, children); + } + return res; + } + }, { + key: \\"buildPlainTextTemplate\\", + value: function buildPlainTextTemplate(level) { + return '\\\\n\\\\n{{i.', \\"v\\", \\"}} \\\\n\\\\n\\"); + } + }, { + key: \\"buildThirdPartyTemplate\\", + value: function buildThirdPartyTemplate(level, componentConfig) { + var _this3 = this; + var Adapter = this.Adapter, isSupportRecursive = this.isSupportRecursive; + var nextLevel = isSupportRecursive ? 0 : level + 1; + var template = \\"\\"; + var data = !this.isSupportRecursive && this.supportXS ? \\"\\".concat(this.dataKeymap(\\"i:item,l:l\\")) : this.dataKeymap(\\"i:item\\"); + componentConfig.thirdPartyComponents.forEach((function(attrs, compName) { + template += '\\\\n\\\\n <').concat(compName, \\" \\").concat(_this3.buildThirdPartyAttr(attrs), ' id=\\"{{i.uid}}\\">\\\\n\\\\n \\\\n \\\\n ').concat(compName, \\">\\\\n\\\\n \\"); + })); + return template; + } + }, { + key: \\"buildContainerTemplate\\", + value: function buildContainerTemplate(level) { + var restart = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; + var tmpl = \\"\\"; + if (restart) { + if (!this.isSupportRecursive && this.supportXS) { + tmpl = ''; + } else { + tmpl = ' '; + } + } else { + var xs = !this.isSupportRecursive ? \\"xs.a(\\".concat(level, \\", i.\\", \\"nn\\", \\", l)\\") : \\"xs.a(\\".concat(level, \\", i.\\", \\"nn\\", \\")\\"); + var data = !this.isSupportRecursive ? \\"\\".concat(this.dataKeymap(\\"i:i,cid:\\".concat(level, \\",l:xs.f(l,i.\\", \\"nn\\", \\")\\"))) : \\"\\".concat(this.dataKeymap(\\"i:i\\")); + tmpl = this.supportXS ? '') : \\"'); + } + return '\\\\n\\\\n ').concat(tmpl, \\"\\\\n\\\\n\\"); + } + }, { + key: \\"dataKeymap\\", + value: function dataKeymap(keymap) { + return keymap; + } + }, { + key: \\"getEvents\\", + value: function getEvents() { + return events; + } + }, { + key: \\"getAttrValue\\", + value: function getAttrValue(value, _key, _nodeName) { + return \\"{\\".concat(value, \\"}\\"); + } + }, { + key: \\"buildXsTemplate\\", + value: function buildXsTemplate() { + return \\"\\"; + } + }, { + key: \\"mergeComponents\\", + value: function mergeComponents(ctx, patch) { + ctx.helper.recursiveMerge(this.internalComponents, patch); + } + }, { + key: \\"buildXSTmplName\\", + value: function buildXSTmplName() { + return \\"function (l, n) {\\\\n return 'tmpl_' + l + '_' + n\\\\n }\\"; + } + }, { + key: \\"buildXSTmpExtra\\", + value: function buildXSTmpExtra() { + return \\"\\"; + } + } ]); + return BaseTemplate; + }(); + var shared_esm_RecursiveTemplate = function(_BaseTemplate) { + _inherits(RecursiveTemplate, _BaseTemplate); + function RecursiveTemplate() { + var _this4; + _classCallCheck(this, RecursiveTemplate); + _this4 = _possibleConstructorReturn(this, _getPrototypeOf(RecursiveTemplate).apply(this, arguments)); + _this4.isSupportRecursive = true; + _this4.buildTemplate = function(componentConfig) { + var template = _this4.buildBaseTemplate(); + if (!_this4.miniComponents) { + _this4.miniComponents = _this4.createMiniComponents(_this4.internalComponents); + } + var ZERO_FLOOR = 0; + var components = Object.keys(_this4.miniComponents).filter((function(c) { + return componentConfig.includes.size && !componentConfig.includeAll ? componentConfig.includes.has(c) : true; + })); + template = components.reduce((function(current, nodeName) { + var attributes = _this4.miniComponents[nodeName]; + return current + _this4.buildComponentTemplate({ + nodeName: nodeName, + attributes: attributes + }, ZERO_FLOOR); + }), template); + template += _this4.buildPlainTextTemplate(ZERO_FLOOR); + template += _this4.buildThirdPartyTemplate(ZERO_FLOOR, componentConfig); + template += _this4.buildContainerTemplate(ZERO_FLOOR); + return template; + }; + return _this4; + } + return RecursiveTemplate; + }(shared_esm_BaseTemplate); + var shared_esm_UnRecursiveTemplate = function(_BaseTemplate2) { + _inherits(UnRecursiveTemplate, _BaseTemplate2); + function UnRecursiveTemplate() { + var _this5; + _classCallCheck(this, UnRecursiveTemplate); + _this5 = _possibleConstructorReturn(this, _getPrototypeOf(UnRecursiveTemplate).apply(this, arguments)); + _this5.isSupportRecursive = false; + _this5._baseLevel = 16; + _this5.buildTemplate = function(componentConfig) { + _this5.componentConfig = componentConfig; + if (!_this5.miniComponents) { + _this5.miniComponents = _this5.createMiniComponents(_this5.internalComponents); + } + var components = Object.keys(_this5.miniComponents).filter((function(c) { + return componentConfig.includes.size && !componentConfig.includeAll ? componentConfig.includes.has(c) : true; + })); + var template = _this5.buildBaseTemplate(); + for (var i = 0; i < _this5.baseLevel; i++) { + template += _this5.supportXS ? _this5.buildOptimizeFloor(i, components, _this5.baseLevel === i + 1) : _this5.buildFloor(i, components, _this5.baseLevel === i + 1); + } + return template; + }; + return _this5; + } + _createClass(UnRecursiveTemplate, [ { + key: \\"buildFloor\\", + value: function buildFloor(level, components) { + var _this6 = this; + var restart = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; + if (restart) return this.buildContainerTemplate(level, restart); + var template = components.reduce((function(current, nodeName) { + var attributes = _this6.miniComponents[nodeName]; + return current + _this6.buildComponentTemplate({ + nodeName: nodeName, + attributes: attributes + }, level); + }), \\"\\"); + template += this.buildPlainTextTemplate(level); + template += this.buildThirdPartyTemplate(level, this.componentConfig); + template += this.buildContainerTemplate(level, restart); + return template; + } + }, { + key: \\"buildOptimizeFloor\\", + value: function buildOptimizeFloor(level, components) { + var _this7 = this; + var restart = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; + if (restart) return this.buildContainerTemplate(level, restart); + var template = components.reduce((function(current, nodeName) { + if (level !== 0) { + if (!_this7.nestElements.has(nodeName)) { + return current; + } else { + var max = _this7.nestElements.get(nodeName); + if (max > 0 && level >= max) { + return current; + } + } + } + var attributes = _this7.miniComponents[nodeName]; + return current + _this7.buildComponentTemplate({ + nodeName: nodeName, + attributes: attributes + }, level); + }), \\"\\"); + if (level === 0) template += this.buildPlainTextTemplate(level); + template += this.buildThirdPartyTemplate(level, this.componentConfig); + template += this.buildContainerTemplate(level); + return template; + } + }, { + key: \\"buildXSTmplName\\", + value: function buildXSTmplName() { + var comps = [].concat(_toConsumableArray(Array.from(this.nestElements.keys())), _toConsumableArray(Array.from(this.componentConfig.thirdPartyComponents.keys()))); + var hasMaxComps = []; + this.nestElements.forEach((function(max, comp) { + if (max > -1) hasMaxComps.push(comp); + })); + return \\"function (l, n, s) {\\\\n var a = \\".concat(JSON.stringify(comps), \\"\\\\n var b = \\").concat(JSON.stringify(hasMaxComps), \\"\\\\n if (a.indexOf(n) === -1) {\\\\n l = 0\\\\n }\\\\n if (b.indexOf(n) > -1) {\\\\n var u = s.split(',')\\\\n var depth = 0\\\\n for (var i = 0; i < u.length; i++) {\\\\n if (u[i] === n) depth++\\\\n }\\\\n l = depth\\\\n }\\\\n return 'tmpl_' + l + '_' + n\\\\n }\\"); + } + }, { + key: \\"buildXSTmpExtra\\", + value: function buildXSTmpExtra() { + var hasMaxComps = []; + this.nestElements.forEach((function(max, comp) { + if (max > -1) hasMaxComps.push(comp); + })); + return \\"f: function (l, n) {\\\\n var b = \\".concat(JSON.stringify(hasMaxComps), \\"\\\\n if (b.indexOf(n) > -1) {\\\\n if (l) l += ','\\\\n l += n\\\\n }\\\\n return l\\\\n }\\"); + } + }, { + key: \\"baseLevel\\", + set: function set(lv) { + this._baseLevel = lv; + }, + get: function get() { + return this._baseLevel; + } + } ]); + return UnRecursiveTemplate; + }(shared_esm_BaseTemplate); + var _noPromiseApis = new Set([ \\"canIPutStuffOverComponent\\" ]); + var _otherApis = new Set([ \\"checkFollowState\\", \\"exitMiniProgram\\", \\"followOfficialAccount\\", \\"getMenuButtonLayout\\", \\"hideInteractionBar\\", \\"pay\\", \\"navigateToVideoView\\", \\"showInteractionBar\\" ]); + var RequestQueue = { + MAX_REQUEST: 5, + queue: [], + request: function request(options) { + this.push(options); + return this.run(); + }, + push: function push(options) { + this.queue.push(options); + }, + run: function run() { + var _arguments = arguments, _this = this; + if (!this.queue.length) { + return; + } + if (this.queue.length <= this.MAX_REQUEST) { + var options = this.queue.shift(); + var completeFn = options.complete; + options.complete = function() { + completeFn && completeFn.apply(options, _toConsumableArray(_arguments)); + _this.run(); + }; + return tt.request(options); + } + } + }; + function taroInterceptor(chain) { + return request(chain.requestParams); + } + function request(options) { + options = options || {}; + if (typeof options === \\"string\\") { + options = { + url: options + }; + } + var originSuccess = options.success; + var originFail = options.fail; + var originComplete = options.complete; + var requestTask; + var p = new Promise((function(resolve, reject) { + options.success = function(res) { + originSuccess && originSuccess(res); + resolve(res); + }; + options.fail = function(res) { + originFail && originFail(res); + reject(res); + }; + options.complete = function(res) { + originComplete && originComplete(res); + }; + requestTask = RequestQueue.request(options); + })); + p.abort = function(cb) { + cb && cb(); + if (requestTask) { + requestTask.abort(); + } + return p; + }; + return p; + } + function processApis(taro) { + var onAndSyncApis = taro.onAndSyncApis; + var noPromiseApis = new Set([].concat(_toConsumableArray(taro.noPromiseApis), _toConsumableArray(_noPromiseApis))); + var otherApis = new Set([].concat(_toConsumableArray(taro.otherApis), _toConsumableArray(_otherApis))); + var apis = [].concat(_toConsumableArray(onAndSyncApis), _toConsumableArray(noPromiseApis), _toConsumableArray(otherApis)); + var preloadPrivateKey = \\"__preload_\\"; + var preloadInitedComponent = \\"$preloadComponent\\"; + apis.forEach((function(key) { + if (!(key in tt)) { + taro[key] = function() { + console.warn(\\"\\\\u5934\\\\u6761\\\\u5c0f\\\\u7a0b\\\\u5e8f\\\\u6682\\\\u4e0d\\\\u652f\\\\u6301 \\".concat(key)); + }; + return; + } + if (otherApis.has(key)) { + taro[key] = function(options) { + for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + args[_key - 1] = arguments[_key]; + } + options = options || {}; + var task = null; + var obj = Object.assign({}, options); + if (typeof options === \\"string\\") { + if (args.length) { + var _tt; + return (_tt = tt)[key].apply(_tt, [ options ].concat(args)); + } + return tt[key](options); + } + if (key === \\"navigateTo\\" || key === \\"redirectTo\\" || key === \\"switchTab\\") { + var url = obj.url ? obj.url.replace(/^\\\\//, \\"\\") : \\"\\"; + if (url.indexOf(\\"?\\") > -1) url = url.split(\\"?\\")[0]; + var Component = cacheDataGet(url); + if (Component) { + var component = new Component; + if (component.componentWillPreload) { + var cacheKey = getUniqueKey(); + var MarkIndex = obj.url.indexOf(\\"?\\"); + var hasMark = MarkIndex > -1; + var urlQueryStr = hasMark ? obj.url.substring(MarkIndex + 1, obj.url.length) : \\"\\"; + var params = queryToJson(urlQueryStr); + obj.url += (hasMark ? \\"&\\" : \\"?\\") + \\"\\".concat(preloadPrivateKey, \\"=\\").concat(cacheKey); + cacheDataSet(cacheKey, component.componentWillPreload(params)); + cacheDataSet(preloadInitedComponent, component); + } + } + } + var p = new Promise((function(resolve, reject) { + [ \\"fail\\", \\"success\\", \\"complete\\" ].forEach((function(k) { + obj[k] = function(res) { + options[k] && options[k](res); + if (k === \\"success\\") { + if (key === \\"connectSocket\\") { + resolve(Promise.resolve().then((function() { + return Object.assign(task, res); + }))); + } else { + resolve(res); + } + } else if (k === \\"fail\\") { + reject(res); + } + }; + })); + if (args.length) { + var _tt2; + task = (_tt2 = tt)[key].apply(_tt2, [ obj ].concat(args)); + } else { + task = tt[key](obj); + } + })); + if (key === \\"uploadFile\\" || key === \\"downloadFile\\") { + p.progress = function(cb) { + if (task) { + task.onProgressUpdate(cb); + } + return p; + }; + p.abort = function(cb) { + cb && cb(); + if (task) { + task.abort(); + } + return p; + }; + } + return p; + }; + } else { + taro[key] = function() { + for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { + args[_key2] = arguments[_key2]; + } + var argsLen = args.length; + var newArgs = args.concat(); + var lastArg = newArgs[argsLen - 1]; + if (lastArg && lastArg.isTaroComponent && lastArg.$scope) { + newArgs.splice(argsLen - 1, 1, lastArg.$scope); + } + return tt[key].apply(tt, newArgs); + }; + } + })); + } + function pxTransform(size) { + var _ref = this.config || {}, _ref$designWidth = _ref.designWidth, designWidth = _ref$designWidth === void 0 ? 750 : _ref$designWidth, _ref$deviceRatio = _ref.deviceRatio, deviceRatio = _ref$deviceRatio === void 0 ? { + 640: 2.34 / 2, + 750: 1, + 828: 1.81 / 2 + } : _ref$deviceRatio; + if (!(designWidth in deviceRatio)) { + throw new Error(\\"deviceRatio \\\\u914d\\\\u7f6e\\\\u4e2d\\\\u4e0d\\\\u5b58\\\\u5728 \\".concat(designWidth, \\" \\\\u7684\\\\u8bbe\\\\u7f6e\\\\uff01\\")); + } + return parseInt(size, 10) * deviceRatio[designWidth] + \\"rpx\\"; + } + function initNativeApi(taro) { + processApis(taro); + var link = new taro.Link(taroInterceptor); + taro.request = link.request.bind(link); + taro.addInterceptor = link.addInterceptor.bind(link); + taro.cleanInterceptors = link.cleanInterceptors.bind(link); + taro.getCurrentPages = getCurrentPages; + taro.getApp = getApp; + taro.initPxTransform = taro.initPxTransform.bind(taro); + taro.pxTransform = pxTransform.bind(taro); + taro.env = tt.env; + } + var components = { + Icon: { + size: \\"24\\" + }, + Button: { + bindGetPhoneNumber: \\"\\" + }, + Form: { + \\"report-submit-timeout\\": \\"0\\" + }, + Slider: { + color: singleQuote(\\"#e9e9e9\\"), + \\"selected-color\\": singleQuote(\\"#1aad19\\") + }, + WebView: { + \\"progressbar-color\\": singleQuote(\\"#51a0d8\\") + }, + Video: { + \\"play-btn-position\\": singleQuote(\\"center\\"), + \\"pre-roll-unit-id\\": \\"\\", + \\"post-roll-unit-id\\": \\"\\", + bindAdStart: \\"\\", + bindAdEnded: \\"\\", + bindAdLoad: \\"\\", + bindAdClose: \\"\\", + bindAdError: \\"\\" + }, + Ad: { + fixed: \\"\\", + type: singleQuote(\\"banner\\"), + scale: \\"100\\" + } + }; + var hostConfig = { + initNativeApi: initNativeApi + }; + mergeReconciler(hostConfig); + mergeInternalComponents(components); + var taro_runtime = __webpack_require__(1); + var classCallCheck = __webpack_require__(3); + var createClass = __webpack_require__(4); + var possibleConstructorReturn = __webpack_require__(6); + var getPrototypeOf = __webpack_require__(5); + var inherits = __webpack_require__(7); + var react = __webpack_require__(0); + var app = __webpack_require__(12); + var app_App = function(_Component) { + Object(inherits[\\"a\\"])(App, _Component); + function App() { + Object(classCallCheck[\\"a\\"])(this, App); + return Object(possibleConstructorReturn[\\"a\\"])(this, Object(getPrototypeOf[\\"a\\"])(App).apply(this, arguments)); + } + Object(createClass[\\"a\\"])(App, [ { + key: \\"componentDidMount\\", + value: function componentDidMount() {} + }, { + key: \\"componentDidShow\\", + value: function componentDidShow() {} + }, { + key: \\"componentDidHide\\", + value: function componentDidHide() {} + }, { + key: \\"componentDidCatchError\\", + value: function componentDidCatchError() {} + }, { + key: \\"render\\", + value: function render() { + return this.props.children; + } + } ]); + return App; + }(react[\\"Component\\"]); + var lib_src_app = app_App; + var taro_react = __webpack_require__(9); + var config = { + pages: [ \\"pages/index/index\\" ], + window: { + backgroundTextStyle: \\"light\\", + navigationBarBackgroundColor: \\"#fff\\", + navigationBarTitleText: \\"WeChat\\", + navigationBarTextStyle: \\"black\\" + } + }; + taro_runtime[\\"window\\"].__taroAppConfig = config; + var inst = App(Object(taro_runtime[\\"createReactApp\\"])(lib_src_app, react, taro_react[\\"a\\"], config)); + } +}, [ [ 18, 0, 2, 3, 1 ] ] ]); + + + +/** filePath: dist/app.json **/ +{\\"pages\\":[\\"pages/index/index\\"],\\"window\\":{\\"backgroundTextStyle\\":\\"light\\",\\"navigationBarBackgroundColor\\":\\"#fff\\",\\"navigationBarTitleText\\":\\"WeChat\\",\\"navigationBarTextStyle\\":\\"black\\"}} + +/** filePath: dist/app.ttss **/ + + +/** filePath: dist/base.ttml **/ + + + + + + + + ++ + + + ++ + ++ + + + + + + + + + + + + + + + + + + + + + + + + + + + ++ + ++ + + + ++ + ++ + + + ++ + +{{i.v}} + + + + + + + +/** filePath: dist/common.js **/ +(tt[\\"webpackJsonp\\"] = tt[\\"webpackJsonp\\"] || []).push([ [ 1 ], [ function(module, __webpack_exports__, __webpack_require__) { + \\"use strict\\"; + __webpack_require__.r(__webpack_exports__); + __webpack_exports__[\\"default\\"] = \\"react-mock\\"; +} ] ]); + +/** filePath: dist/pages/index/index.js **/ +(tt[\\"webpackJsonp\\"] = tt[\\"webpackJsonp\\"] || []).push([ [ 6 ], [ , , , , , , , , function(module, exports, __webpack_require__) { + module.exports = __webpack_require__(13); +}, , , , , function(module, exports, __webpack_require__) { + var g = function() { + return this; + }() || Function(\\"return this\\")(); + var hadRuntime = g.regeneratorRuntime && Object.getOwnPropertyNames(g).indexOf(\\"regeneratorRuntime\\") >= 0; + var oldRuntime = hadRuntime && g.regeneratorRuntime; + g.regeneratorRuntime = undefined; + module.exports = __webpack_require__(14); + if (hadRuntime) { + g.regeneratorRuntime = oldRuntime; + } else { + try { + delete g.regeneratorRuntime; + } catch (e) { + g.regeneratorRuntime = undefined; + } + } +}, function(module, exports, __webpack_require__) { + (function(module) { + var _typeof = __webpack_require__(16); + !function(global) { + \\"use strict\\"; + var Op = Object.prototype; + var hasOwn = Op.hasOwnProperty; + var undefined; + var $Symbol = typeof Symbol === \\"function\\" ? Symbol : {}; + var iteratorSymbol = $Symbol.iterator || \\"@@iterator\\"; + var asyncIteratorSymbol = $Symbol.asyncIterator || \\"@@asyncIterator\\"; + var toStringTagSymbol = $Symbol.toStringTag || \\"@@toStringTag\\"; + var inModule = (false ? undefined : _typeof(module)) === \\"object\\"; + var runtime = global.regeneratorRuntime; + if (runtime) { + if (inModule) { + module.exports = runtime; + } + return; + } + runtime = global.regeneratorRuntime = inModule ? module.exports : {}; + function wrap(innerFn, outerFn, self, tryLocsList) { + var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator; + var generator = Object.create(protoGenerator.prototype); + var context = new Context(tryLocsList || []); + generator._invoke = makeInvokeMethod(innerFn, self, context); + return generator; + } + runtime.wrap = wrap; + function tryCatch(fn, obj, arg) { + try { + return { + type: \\"normal\\", + arg: fn.call(obj, arg) + }; + } catch (err) { + return { + type: \\"throw\\", + arg: err + }; + } + } + var GenStateSuspendedStart = \\"suspendedStart\\"; + var GenStateSuspendedYield = \\"suspendedYield\\"; + var GenStateExecuting = \\"executing\\"; + var GenStateCompleted = \\"completed\\"; + var ContinueSentinel = {}; + function Generator() {} + function GeneratorFunction() {} + function GeneratorFunctionPrototype() {} + var IteratorPrototype = {}; + IteratorPrototype[iteratorSymbol] = function() { + return this; + }; + var getProto = Object.getPrototypeOf; + var NativeIteratorPrototype = getProto && getProto(getProto(values([]))); + if (NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) { + IteratorPrototype = NativeIteratorPrototype; + } + var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); + GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype; + GeneratorFunctionPrototype.constructor = GeneratorFunction; + GeneratorFunctionPrototype[toStringTagSymbol] = GeneratorFunction.displayName = \\"GeneratorFunction\\"; + function defineIteratorMethods(prototype) { + [ \\"next\\", \\"throw\\", \\"return\\" ].forEach((function(method) { + prototype[method] = function(arg) { + return this._invoke(method, arg); + }; + })); + } + runtime.isGeneratorFunction = function(genFun) { + var ctor = typeof genFun === \\"function\\" && genFun.constructor; + return ctor ? ctor === GeneratorFunction || (ctor.displayName || ctor.name) === \\"GeneratorFunction\\" : false; + }; + runtime.mark = function(genFun) { + if (Object.setPrototypeOf) { + Object.setPrototypeOf(genFun, GeneratorFunctionPrototype); + } else { + genFun.__proto__ = GeneratorFunctionPrototype; + if (!(toStringTagSymbol in genFun)) { + genFun[toStringTagSymbol] = \\"GeneratorFunction\\"; + } + } + genFun.prototype = Object.create(Gp); + return genFun; + }; + runtime.awrap = function(arg) { + return { + __await: arg + }; + }; + function AsyncIterator(generator) { + function invoke(method, arg, resolve, reject) { + var record = tryCatch(generator[method], generator, arg); + if (record.type === \\"throw\\") { + reject(record.arg); + } else { + var result = record.arg; + var value = result.value; + if (value && _typeof(value) === \\"object\\" && hasOwn.call(value, \\"__await\\")) { + return Promise.resolve(value.__await).then((function(value) { + invoke(\\"next\\", value, resolve, reject); + }), (function(err) { + invoke(\\"throw\\", err, resolve, reject); + })); + } + return Promise.resolve(value).then((function(unwrapped) { + result.value = unwrapped; + resolve(result); + }), reject); + } + } + var previousPromise; + function enqueue(method, arg) { + function callInvokeWithMethodAndArg() { + return new Promise((function(resolve, reject) { + invoke(method, arg, resolve, reject); + })); + } + return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); + } + this._invoke = enqueue; + } + defineIteratorMethods(AsyncIterator.prototype); + AsyncIterator.prototype[asyncIteratorSymbol] = function() { + return this; + }; + runtime.AsyncIterator = AsyncIterator; + runtime.async = function(innerFn, outerFn, self, tryLocsList) { + var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList)); + return runtime.isGeneratorFunction(outerFn) ? iter : iter.next().then((function(result) { + return result.done ? result.value : iter.next(); + })); + }; + function makeInvokeMethod(innerFn, self, context) { + var state = GenStateSuspendedStart; + return function invoke(method, arg) { + if (state === GenStateExecuting) { + throw new Error(\\"Generator is already running\\"); + } + if (state === GenStateCompleted) { + if (method === \\"throw\\") { + throw arg; + } + return doneResult(); + } + context.method = method; + context.arg = arg; + while (true) { + var delegate = context.delegate; + if (delegate) { + var delegateResult = maybeInvokeDelegate(delegate, context); + if (delegateResult) { + if (delegateResult === ContinueSentinel) continue; + return delegateResult; + } + } + if (context.method === \\"next\\") { + context.sent = context._sent = context.arg; + } else if (context.method === \\"throw\\") { + if (state === GenStateSuspendedStart) { + state = GenStateCompleted; + throw context.arg; + } + context.dispatchException(context.arg); + } else if (context.method === \\"return\\") { + context.abrupt(\\"return\\", context.arg); + } + state = GenStateExecuting; + var record = tryCatch(innerFn, self, context); + if (record.type === \\"normal\\") { + state = context.done ? GenStateCompleted : GenStateSuspendedYield; + if (record.arg === ContinueSentinel) { + continue; + } + return { + value: record.arg, + done: context.done + }; + } else if (record.type === \\"throw\\") { + state = GenStateCompleted; + context.method = \\"throw\\"; + context.arg = record.arg; + } + } + }; + } + function maybeInvokeDelegate(delegate, context) { + var method = delegate.iterator[context.method]; + if (method === undefined) { + context.delegate = null; + if (context.method === \\"throw\\") { + if (delegate.iterator.return) { + context.method = \\"return\\"; + context.arg = undefined; + maybeInvokeDelegate(delegate, context); + if (context.method === \\"throw\\") { + return ContinueSentinel; + } + } + context.method = \\"throw\\"; + context.arg = new TypeError(\\"The iterator does not provide a 'throw' method\\"); + } + return ContinueSentinel; + } + var record = tryCatch(method, delegate.iterator, context.arg); + if (record.type === \\"throw\\") { + context.method = \\"throw\\"; + context.arg = record.arg; + context.delegate = null; + return ContinueSentinel; + } + var info = record.arg; + if (!info) { + context.method = \\"throw\\"; + context.arg = new TypeError(\\"iterator result is not an object\\"); + context.delegate = null; + return ContinueSentinel; + } + if (info.done) { + context[delegate.resultName] = info.value; + context.next = delegate.nextLoc; + if (context.method !== \\"return\\") { + context.method = \\"next\\"; + context.arg = undefined; + } + } else { + return info; + } + context.delegate = null; + return ContinueSentinel; + } + defineIteratorMethods(Gp); + Gp[toStringTagSymbol] = \\"Generator\\"; + Gp[iteratorSymbol] = function() { + return this; + }; + Gp.toString = function() { + return \\"[object Generator]\\"; + }; + function pushTryEntry(locs) { + var entry = { + tryLoc: locs[0] + }; + if (1 in locs) { + entry.catchLoc = locs[1]; + } + if (2 in locs) { + entry.finallyLoc = locs[2]; + entry.afterLoc = locs[3]; + } + this.tryEntries.push(entry); + } + function resetTryEntry(entry) { + var record = entry.completion || {}; + record.type = \\"normal\\"; + delete record.arg; + entry.completion = record; + } + function Context(tryLocsList) { + this.tryEntries = [ { + tryLoc: \\"root\\" + } ]; + tryLocsList.forEach(pushTryEntry, this); + this.reset(true); + } + runtime.keys = function(object) { + var keys = []; + for (var key in object) { + keys.push(key); + } + keys.reverse(); + return function next() { + while (keys.length) { + var key = keys.pop(); + if (key in object) { + next.value = key; + next.done = false; + return next; + } + } + next.done = true; + return next; + }; + }; + function values(iterable) { + if (iterable) { + var iteratorMethod = iterable[iteratorSymbol]; + if (iteratorMethod) { + return iteratorMethod.call(iterable); + } + if (typeof iterable.next === \\"function\\") { + return iterable; + } + if (!isNaN(iterable.length)) { + var i = -1, next = function next() { + while (++i < iterable.length) { + if (hasOwn.call(iterable, i)) { + next.value = iterable[i]; + next.done = false; + return next; + } + } + next.value = undefined; + next.done = true; + return next; + }; + return next.next = next; + } + } + return { + next: doneResult + }; + } + runtime.values = values; + function doneResult() { + return { + value: undefined, + done: true + }; + } + Context.prototype = { + constructor: Context, + reset: function reset(skipTempReset) { + this.prev = 0; + this.next = 0; + this.sent = this._sent = undefined; + this.done = false; + this.delegate = null; + this.method = \\"next\\"; + this.arg = undefined; + this.tryEntries.forEach(resetTryEntry); + if (!skipTempReset) { + for (var name in this) { + if (name.charAt(0) === \\"t\\" && hasOwn.call(this, name) && !isNaN(+name.slice(1))) { + this[name] = undefined; + } + } + } + }, + stop: function stop() { + this.done = true; + var rootEntry = this.tryEntries[0]; + var rootRecord = rootEntry.completion; + if (rootRecord.type === \\"throw\\") { + throw rootRecord.arg; + } + return this.rval; + }, + dispatchException: function dispatchException(exception) { + if (this.done) { + throw exception; + } + var context = this; + function handle(loc, caught) { + record.type = \\"throw\\"; + record.arg = exception; + context.next = loc; + if (caught) { + context.method = \\"next\\"; + context.arg = undefined; + } + return !!caught; + } + for (var i = this.tryEntries.length - 1; i >= 0; --i) { + var entry = this.tryEntries[i]; + var record = entry.completion; + if (entry.tryLoc === \\"root\\") { + return handle(\\"end\\"); + } + if (entry.tryLoc <= this.prev) { + var hasCatch = hasOwn.call(entry, \\"catchLoc\\"); + var hasFinally = hasOwn.call(entry, \\"finallyLoc\\"); + if (hasCatch && hasFinally) { + if (this.prev < entry.catchLoc) { + return handle(entry.catchLoc, true); + } else if (this.prev < entry.finallyLoc) { + return handle(entry.finallyLoc); + } + } else if (hasCatch) { + if (this.prev < entry.catchLoc) { + return handle(entry.catchLoc, true); + } + } else if (hasFinally) { + if (this.prev < entry.finallyLoc) { + return handle(entry.finallyLoc); + } + } else { + throw new Error(\\"try statement without catch or finally\\"); + } + } + } + }, + abrupt: function abrupt(type, arg) { + for (var i = this.tryEntries.length - 1; i >= 0; --i) { + var entry = this.tryEntries[i]; + if (entry.tryLoc <= this.prev && hasOwn.call(entry, \\"finallyLoc\\") && this.prev < entry.finallyLoc) { + var finallyEntry = entry; + break; + } + } + if (finallyEntry && (type === \\"break\\" || type === \\"continue\\") && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc) { + finallyEntry = null; + } + var record = finallyEntry ? finallyEntry.completion : {}; + record.type = type; + record.arg = arg; + if (finallyEntry) { + this.method = \\"next\\"; + this.next = finallyEntry.finallyLoc; + return ContinueSentinel; + } + return this.complete(record); + }, + complete: function complete(record, afterLoc) { + if (record.type === \\"throw\\") { + throw record.arg; + } + if (record.type === \\"break\\" || record.type === \\"continue\\") { + this.next = record.arg; + } else if (record.type === \\"return\\") { + this.rval = this.arg = record.arg; + this.method = \\"return\\"; + this.next = \\"end\\"; + } else if (record.type === \\"normal\\" && afterLoc) { + this.next = afterLoc; + } + return ContinueSentinel; + }, + finish: function finish(finallyLoc) { + for (var i = this.tryEntries.length - 1; i >= 0; --i) { + var entry = this.tryEntries[i]; + if (entry.finallyLoc === finallyLoc) { + this.complete(entry.completion, entry.afterLoc); + resetTryEntry(entry); + return ContinueSentinel; + } + } + }, + catch: function _catch(tryLoc) { + for (var i = this.tryEntries.length - 1; i >= 0; --i) { + var entry = this.tryEntries[i]; + if (entry.tryLoc === tryLoc) { + var record = entry.completion; + if (record.type === \\"throw\\") { + var thrown = record.arg; + resetTryEntry(entry); + } + return thrown; + } + } + throw new Error(\\"illegal catch attempt\\"); + }, + delegateYield: function delegateYield(iterable, resultName, nextLoc) { + this.delegate = { + iterator: values(iterable), + resultName: resultName, + nextLoc: nextLoc + }; + if (this.method === \\"next\\") { + this.arg = undefined; + } + return ContinueSentinel; + } + }; + }(function() { + return this; + }() || Function(\\"return this\\")()); + }).call(this, __webpack_require__(15)(module)); +}, function(module, exports) { + module.exports = function(module) { + if (!module.webpackPolyfill) { + module.deprecate = function() {}; + module.paths = []; + if (!module.children) module.children = []; + Object.defineProperty(module, \\"loaded\\", { + enumerable: true, + get: function get() { + return module.l; + } + }); + Object.defineProperty(module, \\"id\\", { + enumerable: true, + get: function get() { + return module.i; + } + }); + module.webpackPolyfill = 1; + } + return module; + }; +}, function(module, exports) { + function _typeof(obj) { + \\"@babel/helpers - typeof\\"; + if (typeof Symbol === \\"function\\" && typeof Symbol.iterator === \\"symbol\\") { + module.exports = _typeof = function _typeof(obj) { + return typeof obj; + }; + } else { + module.exports = _typeof = function _typeof(obj) { + return obj && typeof Symbol === \\"function\\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \\"symbol\\" : typeof obj; + }; + } + return _typeof(obj); + } + module.exports = _typeof; +}, function(module, exports, __webpack_require__) {}, , function(module, __webpack_exports__, __webpack_require__) { + \\"use strict\\"; + __webpack_require__.r(__webpack_exports__); + var taro_runtime = __webpack_require__(1); + var regenerator = __webpack_require__(8); + var regenerator_default = __webpack_require__.n(regenerator); + function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { + try { + var info = gen[key](arg); + var value = info.value; + } catch (error) { + reject(error); + return; + } + if (info.done) { + resolve(value); + } else { + Promise.resolve(value).then(_next, _throw); + } + } + function _asyncToGenerator(fn) { + return function() { + var self = this, args = arguments; + return new Promise((function(resolve, reject) { + var gen = fn.apply(self, args); + function _next(value) { + asyncGeneratorStep(gen, resolve, reject, _next, _throw, \\"next\\", value); + } + function _throw(err) { + asyncGeneratorStep(gen, resolve, reject, _next, _throw, \\"throw\\", err); + } + _next(undefined); + })); + }; + } + var classCallCheck = __webpack_require__(3); + var createClass = __webpack_require__(4); + var possibleConstructorReturn = __webpack_require__(6); + var getPrototypeOf = __webpack_require__(5); + var inherits = __webpack_require__(7); + var react = __webpack_require__(0); + var taro_components = __webpack_require__(2); + var index = __webpack_require__(17); + var index_Index = function(_Component) { + Object(inherits[\\"a\\"])(Index, _Component); + function Index() { + Object(classCallCheck[\\"a\\"])(this, Index); + return Object(possibleConstructorReturn[\\"a\\"])(this, Object(getPrototypeOf[\\"a\\"])(Index).apply(this, arguments)); + } + Object(createClass[\\"a\\"])(Index, [ { + key: \\"componentWillMount\\", + value: function() { + var _componentWillMount = _asyncToGenerator(regenerator_default.a.mark((function _callee() { + return regenerator_default.a.wrap((function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + _context.next = 2; + return Promise.resolve(1); + + case 2: + case \\"end\\": + return _context.stop(); + } + } + }), _callee); + }))); + function componentWillMount() { + return _componentWillMount.apply(this, arguments); + } + return componentWillMount; + }() + }, { + key: \\"componentDidMount\\", + value: function componentDidMount() {} + }, { + key: \\"componentWillUnmount\\", + value: function componentWillUnmount() {} + }, { + key: \\"componentDidShow\\", + value: function componentDidShow() {} + }, { + key: \\"componentDidHide\\", + value: function componentDidHide() {} + }, { + key: \\"render\\", + value: function render() { + return react[\\"default\\"].createElement(taro_components[\\"View\\"], { + className: \\"index\\" + }, react[\\"default\\"].createElement(taro_components[\\"Text\\"], null, \\"Hello world!\\"), react[\\"default\\"].createElement(taro_components[\\"Input\\"], { + placeholder: \\"input\\", + value: \\"\\" + }), react[\\"default\\"].createElement(taro_components[\\"Textarea\\"], { + value: \\"\\" + })); + } + } ]); + return Index; + }(react[\\"Component\\"]); + var config = { + navigationBarTitleText: \\"\\\\u9996\\\\u9875\\" + }; + var inst = Page(Object(taro_runtime[\\"createPageConfig\\"])(index_Index, \\"pages/index/index\\", {}, config || {})); +} ], [ [ 19, 0, 2, 3, 1 ] ] ]); + +/** filePath: dist/pages/index/index.json **/ +{\\"navigationBarTitleText\\":\\"首页\\"} + +/** filePath: dist/pages/index/index.ttml **/ ++ + +/** filePath: dist/pages/index/index.ttss **/ + + +/** filePath: dist/runtime.js **/ +(function(modules) { + function webpackJsonpCallback(data) { + var chunkIds = data[0]; + var moreModules = data[1]; + var executeModules = data[2]; + var moduleId, chunkId, i = 0, resolves = []; + for (;i < chunkIds.length; i++) { + chunkId = chunkIds[i]; + if (Object.prototype.hasOwnProperty.call(installedChunks, chunkId) && installedChunks[chunkId]) { + resolves.push(installedChunks[chunkId][0]); + } + installedChunks[chunkId] = 0; + } + for (moduleId in moreModules) { + if (Object.prototype.hasOwnProperty.call(moreModules, moduleId)) { + modules[moduleId] = moreModules[moduleId]; + } + } + if (parentJsonpFunction) parentJsonpFunction(data); + while (resolves.length) { + resolves.shift()(); + } + deferredModules.push.apply(deferredModules, executeModules || []); + return checkDeferredModules(); + } + function checkDeferredModules() { + var result; + for (var i = 0; i < deferredModules.length; i++) { + var deferredModule = deferredModules[i]; + var fulfilled = true; + for (var j = 1; j < deferredModule.length; j++) { + var depId = deferredModule[j]; + if (installedChunks[depId] !== 0) fulfilled = false; + } + if (fulfilled) { + deferredModules.splice(i--, 1); + result = __webpack_require__(__webpack_require__.s = deferredModule[0]); + } + } + return result; + } + var installedModules = {}; + var installedChunks = { + 0: 0 + }; + var deferredModules = []; + function __webpack_require__(moduleId) { + if (installedModules[moduleId]) { + return installedModules[moduleId].exports; + } + var module = installedModules[moduleId] = { + i: moduleId, + l: false, + exports: {} + }; + modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); + module.l = true; + return module.exports; + } + __webpack_require__.m = modules; + __webpack_require__.c = installedModules; + __webpack_require__.d = function(exports, name, getter) { + if (!__webpack_require__.o(exports, name)) { + Object.defineProperty(exports, name, { + enumerable: true, + get: getter + }); + } + }; + __webpack_require__.r = function(exports) { + if (typeof Symbol !== \\"undefined\\" && Symbol.toStringTag) { + Object.defineProperty(exports, Symbol.toStringTag, { + value: \\"Module\\" + }); + } + Object.defineProperty(exports, \\"__esModule\\", { + value: true + }); + }; + __webpack_require__.t = function(value, mode) { + if (mode & 1) value = __webpack_require__(value); + if (mode & 8) return value; + if (mode & 4 && typeof value === \\"object\\" && value && value.__esModule) return value; + var ns = Object.create(null); + __webpack_require__.r(ns); + Object.defineProperty(ns, \\"default\\", { + enumerable: true, + value: value + }); + if (mode & 2 && typeof value != \\"string\\") for (var key in value) __webpack_require__.d(ns, key, function(key) { + return value[key]; + }.bind(null, key)); + return ns; + }; + __webpack_require__.n = function(module) { + var getter = module && module.__esModule ? function getDefault() { + return module[\\"default\\"]; + } : function getModuleExports() { + return module; + }; + __webpack_require__.d(getter, \\"a\\", getter); + return getter; + }; + __webpack_require__.o = function(object, property) { + return Object.prototype.hasOwnProperty.call(object, property); + }; + __webpack_require__.p = \\"/\\"; + var jsonpArray = tt[\\"webpackJsonp\\"] = tt[\\"webpackJsonp\\"] || []; + var oldJsonpFunction = jsonpArray.push.bind(jsonpArray); + jsonpArray.push = webpackJsonpCallback; + jsonpArray = jsonpArray.slice(); + for (var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]); + var parentJsonpFunction = oldJsonpFunction; + checkDeferredModules(); +})([]); + +/** filePath: dist/taro.js **/ +(tt[\\"webpackJsonp\\"] = tt[\\"webpackJsonp\\"] || []).push([ [ 2 ], { + 1: function(module, __webpack_exports__, __webpack_require__) { + \\"use strict\\"; + var _unused_webpack_default_export = \\"taro-runtime-mock\\"; + }, + 2: function(module, __webpack_exports__, __webpack_require__) { + \\"use strict\\"; + var _unused_webpack_default_export = \\"taro-components-mock\\"; + }, + 9: function(module, __webpack_exports__, __webpack_require__) { + \\"use strict\\"; + __webpack_exports__[\\"a\\"] = \\"taro-react-mock\\"; + } +} ]); + +/** filePath: dist/vendors.js **/ +(tt[\\"webpackJsonp\\"] = tt[\\"webpackJsonp\\"] || []).push([ [ 3 ], [ , , , function(module, __webpack_exports__, __webpack_require__) { + \\"use strict\\"; + __webpack_require__.d(__webpack_exports__, \\"a\\", (function() { + return _classCallCheck; + })); + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError(\\"Cannot call a class as a function\\"); + } + } +}, function(module, __webpack_exports__, __webpack_require__) { + \\"use strict\\"; + __webpack_require__.d(__webpack_exports__, \\"a\\", (function() { + return _createClass; + })); + function _defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if (\\"value\\" in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + function _createClass(Constructor, protoProps, staticProps) { + if (protoProps) _defineProperties(Constructor.prototype, protoProps); + if (staticProps) _defineProperties(Constructor, staticProps); + return Constructor; + } +}, function(module, __webpack_exports__, __webpack_require__) { + \\"use strict\\"; + __webpack_require__.d(__webpack_exports__, \\"a\\", (function() { + return _getPrototypeOf; + })); + function _getPrototypeOf(o) { + _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { + return o.__proto__ || Object.getPrototypeOf(o); + }; + return _getPrototypeOf(o); + } +}, function(module, __webpack_exports__, __webpack_require__) { + \\"use strict\\"; + __webpack_require__.d(__webpack_exports__, \\"a\\", (function() { + return _possibleConstructorReturn; + })); + function _typeof(obj) { + \\"@babel/helpers - typeof\\"; + if (typeof Symbol === \\"function\\" && typeof Symbol.iterator === \\"symbol\\") { + _typeof = function _typeof(obj) { + return typeof obj; + }; + } else { + _typeof = function _typeof(obj) { + return obj && typeof Symbol === \\"function\\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \\"symbol\\" : typeof obj; + }; + } + return _typeof(obj); + } + function _assertThisInitialized(self) { + if (self === void 0) { + throw new ReferenceError(\\"this hasn't been initialised - super() hasn't been called\\"); + } + return self; + } + function _possibleConstructorReturn(self, call) { + if (call && (_typeof(call) === \\"object\\" || typeof call === \\"function\\")) { + return call; + } + return _assertThisInitialized(self); + } +}, function(module, __webpack_exports__, __webpack_require__) { + \\"use strict\\"; + __webpack_require__.d(__webpack_exports__, \\"a\\", (function() { + return _inherits; + })); + function _setPrototypeOf(o, p) { + _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { + o.__proto__ = p; + return o; + }; + return _setPrototypeOf(o, p); + } + function _inherits(subClass, superClass) { + if (typeof superClass !== \\"function\\" && superClass !== null) { + throw new TypeError(\\"Super expression must either be null or a function\\"); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + writable: true, + configurable: true + } + }); + if (superClass) _setPrototypeOf(subClass, superClass); + } +} ] ]); +" +`; diff --git a/packages/taro-mini-runner/src/__tests__/__snapshots__/common-style.spec.ts.snap b/packages/taro-mini-runner/src/__tests__/__snapshots__/common-style.spec.ts.snap new file mode 100644 index 000000000000..24a64333be57 --- /dev/null +++ b/packages/taro-mini-runner/src/__tests__/__snapshots__/common-style.spec.ts.snap @@ -0,0 +1,2382 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`common style should extract common styles 1`] = `19`; + +exports[`common style should extract common styles 2`] = ` +" +/** filePath: dist/app.js **/ +require(\\"./runtime\\"); + +require(\\"./common\\"); + +require(\\"./vendors\\"); + +require(\\"./taro\\"); + +(wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 4 ], { + 13: function(module, exports, __webpack_require__) {}, + 16: function(module, __webpack_exports__, __webpack_require__) { + \\"use strict\\"; + __webpack_require__.r(__webpack_exports__); + function _arrayLikeToArray(arr, len) { + if (len == null || len > arr.length) len = arr.length; + for (var i = 0, arr2 = new Array(len); i < len; i++) { + arr2[i] = arr[i]; + } + return arr2; + } + function _arrayWithoutHoles(arr) { + if (Array.isArray(arr)) return _arrayLikeToArray(arr); + } + function _iterableToArray(iter) { + if (typeof Symbol !== \\"undefined\\" && Symbol.iterator in Object(iter)) return Array.from(iter); + } + function _unsupportedIterableToArray(o, minLen) { + if (!o) return; + if (typeof o === \\"string\\") return _arrayLikeToArray(o, minLen); + var n = Object.prototype.toString.call(o).slice(8, -1); + if (n === \\"Object\\" && o.constructor) n = o.constructor.name; + if (n === \\"Map\\" || n === \\"Set\\") return Array.from(o); + if (n === \\"Arguments\\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); + } + function _nonIterableSpread() { + throw new TypeError(\\"Invalid attempt to spread non-iterable instance.\\\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\\"); + } + function _toConsumableArray(arr) { + return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); + } + function _typeof(obj) { + \\"@babel/helpers - typeof\\"; + if (typeof Symbol === \\"function\\" && typeof Symbol.iterator === \\"symbol\\") { + _typeof = function _typeof(obj) { + return typeof obj; + }; + } else { + _typeof = function _typeof(obj) { + return obj && typeof Symbol === \\"function\\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \\"symbol\\" : typeof obj; + }; + } + return _typeof(obj); + } + function _assertThisInitialized(self) { + if (self === void 0) { + throw new ReferenceError(\\"this hasn't been initialised - super() hasn't been called\\"); + } + return self; + } + function _possibleConstructorReturn(self, call) { + if (call && (_typeof(call) === \\"object\\" || typeof call === \\"function\\")) { + return call; + } + return _assertThisInitialized(self); + } + function _getPrototypeOf(o) { + _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { + return o.__proto__ || Object.getPrototypeOf(o); + }; + return _getPrototypeOf(o); + } + function _setPrototypeOf(o, p) { + _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { + o.__proto__ = p; + return o; + }; + return _setPrototypeOf(o, p); + } + function _inherits(subClass, superClass) { + if (typeof superClass !== \\"function\\" && superClass !== null) { + throw new TypeError(\\"Super expression must either be null or a function\\"); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + writable: true, + configurable: true + } + }); + if (superClass) _setPrototypeOf(subClass, superClass); + } + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError(\\"Cannot call a class as a function\\"); + } + } + function _defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if (\\"value\\" in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + function _createClass(Constructor, protoProps, staticProps) { + if (protoProps) _defineProperties(Constructor.prototype, protoProps); + if (staticProps) _defineProperties(Constructor, staticProps); + return Constructor; + } + function isString(o) { + return typeof o === \\"string\\"; + } + function isUndefined(o) { + return typeof o === \\"undefined\\"; + } + function isNull(o) { + return o === null; + } + function isObject(o) { + return o !== null && _typeof(o) === \\"object\\"; + } + function isBoolean(o) { + return o === true || o === false; + } + function isFunction(o) { + return typeof o === \\"function\\"; + } + function isNumber(o) { + return typeof o === \\"number\\"; + } + function isBooleanStringLiteral(o) { + return o === \\"true\\" || o === \\"false\\"; + } + var isArray = Array.isArray; + var styles = { + style: \\"i.\\".concat(\\"st\\"), + class: \\"i.\\".concat(\\"cl\\") + }; + var events = { + bindtap: \\"eh\\" + }; + var touchEvents = { + bindTouchStart: \\"\\", + bindTouchMove: \\"\\", + bindTouchEnd: \\"\\", + bindTouchCancel: \\"\\", + bindLongTap: \\"\\" + }; + var animationEvents = { + bindAnimationStart: \\"\\", + bindAnimationIteration: \\"\\", + bindAnimationEnd: \\"\\", + bindTransitionEnd: \\"\\" + }; + var specialEvents = new Set([ \\"htouchmove\\", \\"vtouchmove\\" ]); + function singleQuote(s) { + return \\"'\\".concat(s, \\"'\\"); + } + var View = Object.assign(Object.assign({ + \\"hover-class\\": singleQuote(\\"none\\"), + \\"hover-stop-propagation\\": \\"false\\", + \\"hover-start-time\\": \\"50\\", + \\"hover-stay-time\\": \\"400\\", + animation: \\"\\" + }, touchEvents), animationEvents); + var Icon = { + type: \\"\\", + size: \\"23\\", + color: \\"\\" + }; + var MapComp = Object.assign({ + longitude: \\"\\", + latitude: \\"\\", + scale: \\"16\\", + markers: \\"[]\\", + covers: \\"\\", + polyline: \\"[]\\", + circles: \\"[]\\", + controls: \\"[]\\", + \\"include-points\\": \\"[]\\", + \\"show-location\\": \\"\\", + \\"layer-style\\": \\"1\\", + bindMarkerTap: \\"\\", + bindControlTap: \\"\\", + bindCalloutTap: \\"\\", + bindUpdated: \\"\\" + }, touchEvents); + var Progress = { + percent: \\"\\", + \\"stroke-width\\": \\"6\\", + color: singleQuote(\\"#09BB07\\"), + activeColor: singleQuote(\\"#09BB07\\"), + backgroundColor: singleQuote(\\"#EBEBEB\\"), + active: \\"false\\", + \\"active-mode\\": singleQuote(\\"backwards\\"), + \\"show-info\\": \\"false\\" + }; + var RichText = { + nodes: \\"[]\\" + }; + var Text = { + selectable: \\"false\\", + space: \\"\\", + decode: \\"false\\" + }; + var Button = { + size: singleQuote(\\"default\\"), + type: \\"\\", + plain: \\"false\\", + disabled: \\"\\", + loading: \\"false\\", + \\"form-type\\": \\"\\", + \\"open-type\\": \\"\\", + \\"hover-class\\": singleQuote(\\"button-hover\\"), + \\"hover-stop-propagation\\": \\"false\\", + \\"hover-start-time\\": \\"20\\", + \\"hover-stay-time\\": \\"70\\", + name: \\"\\" + }; + var Checkbox = { + value: \\"\\", + disabled: \\"\\", + checked: \\"false\\", + color: singleQuote(\\"#09BB07\\"), + name: \\"\\" + }; + var CheckboxGroup = { + bindChange: \\"\\", + name: \\"\\" + }; + var Form = { + \\"report-submit\\": \\"false\\", + bindSubmit: \\"\\", + bindReset: \\"\\", + name: \\"\\" + }; + var Input = { + value: \\"\\", + type: singleQuote(\\"\\"), + password: \\"false\\", + placeholder: \\"\\", + \\"placeholder-style\\": \\"\\", + \\"placeholder-class\\": singleQuote(\\"input-placeholder\\"), + disabled: \\"\\", + maxlength: \\"140\\", + \\"cursor-spacing\\": \\"0\\", + focus: \\"false\\", + \\"confirm-type\\": singleQuote(\\"done\\"), + \\"confirm-hold\\": \\"false\\", + cursor: \\"i.value.length\\", + \\"selection-start\\": \\"-1\\", + \\"selection-end\\": \\"-1\\", + bindInput: \\"\\", + bindFocus: \\"\\", + bindBlur: \\"\\", + bindConfirm: \\"\\", + name: \\"\\" + }; + var Label = { + for: \\"\\", + name: \\"\\" + }; + var Picker = { + mode: singleQuote(\\"selector\\"), + disabled: \\"\\", + range: \\"\\", + \\"range-key\\": \\"\\", + value: \\"\\", + start: \\"\\", + end: \\"\\", + fields: singleQuote(\\"day\\"), + \\"custom-item\\": \\"\\", + name: \\"\\", + bindCancel: \\"\\", + bindChange: \\"\\", + bindColumnChange: \\"\\" + }; + var PickerView = { + value: \\"\\", + \\"indicator-style\\": \\"\\", + \\"indicator-class\\": \\"\\", + \\"mask-style\\": \\"\\", + \\"mask-class\\": \\"\\", + bindChange: \\"\\", + name: \\"\\" + }; + var PickerViewColumn = { + name: \\"\\" + }; + var Radio = { + value: \\"\\", + checked: \\"false\\", + disabled: \\"\\", + color: singleQuote(\\"#09BB07\\"), + name: \\"\\" + }; + var RadioGroup = { + bindChange: \\"\\", + name: \\"\\" + }; + var Slider = { + min: \\"0\\", + max: \\"100\\", + step: \\"1\\", + disabled: \\"\\", + value: \\"0\\", + activeColor: singleQuote(\\"#1aad19\\"), + backgroundColor: singleQuote(\\"#e9e9e9\\"), + \\"block-size\\": \\"28\\", + \\"block-color\\": singleQuote(\\"#ffffff\\"), + \\"show-value\\": \\"false\\", + bindChange: \\"\\", + bindChanging: \\"\\", + name: \\"\\" + }; + var Switch = { + checked: \\"false\\", + disabled: \\"\\", + type: singleQuote(\\"switch\\"), + color: singleQuote(\\"#04BE02\\"), + bindChange: \\"\\", + name: \\"\\" + }; + var Textarea = { + value: \\"\\", + placeholder: \\"\\", + \\"placeholder-style\\": \\"\\", + \\"placeholder-class\\": singleQuote(\\"textarea-placeholder\\"), + disabled: \\"\\", + maxlength: \\"140\\", + \\"auto-focus\\": \\"false\\", + focus: \\"false\\", + \\"auto-height\\": \\"false\\", + fixed: \\"false\\", + \\"cursor-spacing\\": \\"0\\", + cursor: \\"-1\\", + \\"selection-start\\": \\"-1\\", + \\"selection-end\\": \\"-1\\", + bindFocus: \\"\\", + bindBlur: \\"\\", + bindLineChange: \\"\\", + bindInput: \\"\\", + bindConfirm: \\"\\", + name: \\"\\" + }; + var CoverImage = { + src: \\"\\", + bindLoad: \\"eh\\", + bindError: \\"eh\\" + }; + var CoverView = Object.assign({ + \\"scroll-top\\": \\"false\\" + }, touchEvents); + var MovableArea = { + \\"scale-area\\": \\"false\\" + }; + var MovableView = Object.assign(Object.assign({ + direction: \\"none\\", + inertia: \\"false\\", + \\"out-of-bounds\\": \\"false\\", + x: \\"\\", + y: \\"\\", + damping: \\"20\\", + friction: \\"2\\", + disabled: \\"\\", + scale: \\"false\\", + \\"scale-min\\": \\"0.5\\", + \\"scale-max\\": \\"10\\", + \\"scale-value\\": \\"1\\", + animation: \\"true\\", + bindChange: \\"\\", + bindScale: \\"\\", + htouchmove: \\"\\", + vtouchmove: \\"\\", + width: singleQuote(\\"10px\\"), + height: singleQuote(\\"10px\\") + }, touchEvents), animationEvents); + var ScrollView = Object.assign(Object.assign({ + \\"scroll-x\\": \\"false\\", + \\"scroll-y\\": \\"false\\", + \\"upper-threshold\\": \\"50\\", + \\"lower-threshold\\": \\"50\\", + \\"scroll-top\\": \\"\\", + \\"scroll-left\\": \\"\\", + \\"scroll-into-view\\": \\"\\", + \\"scroll-with-animation\\": \\"false\\", + \\"enable-back-to-top\\": \\"false\\", + bindScrollToUpper: \\"\\", + bindScrollToLower: \\"\\", + bindScroll: \\"\\" + }, touchEvents), animationEvents); + var Swiper = Object.assign({ + \\"indicator-dots\\": \\"false\\", + \\"indicator-color\\": singleQuote(\\"rgba(0, 0, 0, .3)\\"), + \\"indicator-active-color\\": singleQuote(\\"#000000\\"), + autoplay: \\"false\\", + current: \\"0\\", + interval: \\"5000\\", + duration: \\"500\\", + circular: \\"false\\", + vertical: \\"false\\", + \\"previous-margin\\": \\"'0px'\\", + \\"next-margin\\": \\"'0px'\\", + \\"display-multiple-items\\": \\"1\\", + bindChange: \\"\\", + bindTransition: \\"\\", + bindAnimationFinish: \\"\\" + }, touchEvents); + var SwiperItem = { + \\"item-id\\": \\"\\" + }; + var Navigator = { + url: \\"\\", + \\"open-type\\": singleQuote(\\"navigate\\"), + delta: \\"1\\", + \\"hover-class\\": singleQuote(\\"navigator-hover\\"), + \\"hover-stop-propagation\\": \\"false\\", + \\"hover-start-time\\": \\"50\\", + \\"hover-stay-time\\": \\"600\\", + bindSuccess: \\"\\", + bindFail: \\"\\", + bindComplete: \\"\\" + }; + var Audio = { + id: \\"\\", + src: \\"\\", + loop: \\"false\\", + controls: \\"false\\", + poster: \\"\\", + name: \\"\\", + author: \\"\\", + bindError: \\"\\", + bindPlay: \\"\\", + bindPause: \\"\\", + bindTimeUpdate: \\"\\", + bindEnded: \\"\\" + }; + var Camera = { + \\"device-position\\": singleQuote(\\"back\\"), + flash: singleQuote(\\"auto\\"), + bindStop: \\"\\", + bindError: \\"\\" + }; + var Image = Object.assign({ + src: \\"\\", + mode: singleQuote(\\"scaleToFill\\"), + \\"lazy-load\\": \\"false\\", + bindError: \\"\\", + bindLoad: \\"\\" + }, touchEvents); + var LivePlayer = { + src: \\"\\", + autoplay: \\"false\\", + muted: \\"false\\", + orientation: singleQuote(\\"vertical\\"), + \\"object-fit\\": singleQuote(\\"contain\\"), + \\"background-mute\\": \\"false\\", + \\"min-cache\\": \\"1\\", + \\"max-cache\\": \\"3\\", + animation: \\"\\", + bindStateChange: \\"\\", + bindFullScreenChange: \\"\\", + bindNetStatus: \\"\\" + }; + var Video = { + src: \\"\\", + duration: \\"\\", + controls: \\"true\\", + \\"danmu-list\\": \\"\\", + \\"danmu-btn\\": \\"\\", + \\"enable-danmu\\": \\"\\", + autoplay: \\"false\\", + loop: \\"false\\", + muted: \\"false\\", + \\"initial-time\\": \\"0\\", + \\"page-gesture\\": \\"false\\", + direction: \\"\\", + \\"show-progress\\": \\"true\\", + \\"show-fullscreen-btn\\": \\"true\\", + \\"show-play-btn\\": \\"true\\", + \\"show-center-play-btn\\": \\"true\\", + \\"enable-progress-gesture\\": \\"true\\", + \\"object-fit\\": singleQuote(\\"contain\\"), + poster: \\"\\", + \\"show-mute-btn\\": \\"false\\", + animation: \\"\\", + bindPlay: \\"\\", + bindPause: \\"\\", + bindEnded: \\"\\", + bindTimeUpdate: \\"\\", + bindFullScreenChange: \\"\\", + bindWaiting: \\"\\", + bindError: \\"\\" + }; + var Canvas = Object.assign({ + \\"canvas-id\\": \\"\\", + \\"disable-scroll\\": \\"false\\", + bindError: \\"\\" + }, touchEvents); + var Ad = { + \\"unit-id\\": \\"\\", + \\"ad-intervals\\": \\"\\", + bindLoad: \\"\\", + bindError: \\"\\", + bindClose: \\"\\" + }; + var WebView = { + src: \\"\\", + bindMessage: \\"\\", + bindLoad: \\"\\", + bindError: \\"\\" + }; + var Block = {}; + var SlotView = { + name: \\"\\" + }; + var Slot = { + name: \\"\\" + }; + var internalComponents = { + View: View, + Icon: Icon, + Progress: Progress, + RichText: RichText, + Text: Text, + Button: Button, + Checkbox: Checkbox, + CheckboxGroup: CheckboxGroup, + Form: Form, + Input: Input, + Label: Label, + Picker: Picker, + PickerView: PickerView, + PickerViewColumn: PickerViewColumn, + Radio: Radio, + RadioGroup: RadioGroup, + Slider: Slider, + Switch: Switch, + CoverImage: CoverImage, + Textarea: Textarea, + CoverView: CoverView, + MovableArea: MovableArea, + MovableView: MovableView, + ScrollView: ScrollView, + Swiper: Swiper, + SwiperItem: SwiperItem, + Navigator: Navigator, + Audio: Audio, + Camera: Camera, + Image: Image, + LivePlayer: LivePlayer, + Video: Video, + Canvas: Canvas, + Ad: Ad, + WebView: WebView, + Block: Block, + Map: MapComp, + Slot: Slot, + SlotView: SlotView + }; + var controlledComponent = new Set([ \\"input\\", \\"checkbox\\", \\"picker\\", \\"picker-view\\", \\"radio\\", \\"slider\\", \\"switch\\", \\"textarea\\" ]); + var focusComponents = new Set([ \\"input\\", \\"textarea\\" ]); + var voidElements = new Set([ \\"progress\\", \\"icon\\", \\"rich-text\\", \\"input\\", \\"textarea\\", \\"slider\\", \\"switch\\", \\"audio\\", \\"live-pusher\\", \\"video\\", \\"ad\\", \\"official-account\\", \\"open-data\\", \\"navigation-bar\\" ]); + var nestElements = new Map([ [ \\"view\\", -1 ], [ \\"cover-view\\", -1 ], [ \\"block\\", -1 ], [ \\"text\\", -1 ], [ \\"slot\\", 8 ], [ \\"slot-view\\", 8 ], [ \\"label\\", 6 ], [ \\"form\\", 4 ], [ \\"scroll-view\\", 4 ] ]); + var EMPTY_OBJ = {}; + var EMPTY_ARR = []; + var noop = function noop() {}; + var defaultReconciler = {}; + var box = function box(v) { + return { + v: v + }; + }; + var unbox = function unbox(b) { + return b.v; + }; + function toDashed(s) { + return s.replace(/([a-z0-9])([A-Z])/g, \\"$1-$2\\").toLowerCase(); + } + function toCamelCase(s) { + var camel = \\"\\"; + var nextCap = false; + for (var i = 0; i < s.length; i++) { + if (s[i] !== \\"-\\") { + camel += nextCap ? s[i].toUpperCase() : s[i]; + nextCap = false; + } else { + nextCap = true; + } + } + return camel; + } + function capitalize(s) { + return s.charAt(0).toUpperCase() + s.slice(1); + } + var shared_esm_hasOwnProperty = Object.prototype.hasOwnProperty; + var hasOwn = function hasOwn(val, key) { + return shared_esm_hasOwnProperty.call(val, key); + }; + var reportIssue = \\"\\\\u5982\\\\u6709\\\\u7591\\\\u95ee\\\\uff0c\\\\u8bf7\\\\u63d0\\\\u4ea4 issue \\\\u81f3\\\\uff1ahttps://github.com/nervjs/taro/issues\\"; + function ensure(condition, msg) { + if (!condition) { + throw new Error(msg + \\"\\\\n\\" + reportIssue); + } + } + function warn(condition, msg) { + if (false) {} + } + function queryToJson(str) { + var dec = decodeURIComponent; + var qp = str.split(\\"&\\"); + var ret = {}; + var name; + var val; + for (var i = 0, l = qp.length, item; i < l; ++i) { + item = qp[i]; + if (item.length) { + var s = item.indexOf(\\"=\\"); + if (s < 0) { + name = dec(item); + val = \\"\\"; + } else { + name = dec(item.slice(0, s)); + val = dec(item.slice(s + 1)); + } + if (typeof ret[name] === \\"string\\") { + ret[name] = [ ret[name] ]; + } + if (Array.isArray(ret[name])) { + ret[name].push(val); + } else { + ret[name] = val; + } + } + } + return ret; + } + var _uniqueId = 1; + var _loadTime = (new Date).getTime().toString(); + function getUniqueKey() { + return _loadTime + _uniqueId++; + } + var cacheData = {}; + function cacheDataSet(key, val) { + cacheData[key] = val; + } + function cacheDataGet(key, delelteAfterGet) { + var temp = cacheData[key]; + delelteAfterGet && delete cacheData[key]; + return temp; + } + function cacheDataHas(key) { + return key in cacheData; + } + function mergeInternalComponents(components) { + Object.keys(components).forEach((function(name) { + if (name in internalComponents) { + Object.assign(internalComponents[name], components[name]); + } else { + internalComponents[name] = components[name]; + } + })); + } + function mergeReconciler(hostConfig) { + Object.assign(defaultReconciler, hostConfig); + } + var weixinAdapter = { + if: \\"wx:if\\", + else: \\"wx:else\\", + elseif: \\"wx:elif\\", + for: \\"wx:for\\", + forItem: \\"wx:for-item\\", + forIndex: \\"wx:for-index\\", + key: \\"wx:key\\", + xs: \\"wxs\\", + type: \\"weapp\\" + }; + var shared_esm_BaseTemplate = function() { + function BaseTemplate() { + var _this = this; + _classCallCheck(this, BaseTemplate); + this.exportExpr = \\"module.exports =\\"; + this.supportXS = false; + this.Adapter = weixinAdapter; + this.internalComponents = internalComponents; + this.focusComponents = focusComponents; + this.voidElements = voidElements; + this.nestElements = nestElements; + this.buildPageTemplate = function(baseTempPath) { + var template = ' \\\\n'); + return template; + }; + this.buildBaseComponentTemplate = function(ext) { + var data = !_this.isSupportRecursive && _this.supportXS ? _this.dataKeymap(\\"i:i,l:l\\") : _this.dataKeymap(\\"i:i\\"); + return ' \\\\n'); + }; + this.buildXScript = function() { + return \\"\\".concat(_this.exportExpr, \\" {\\\\n a: \\").concat(_this.buildXSTmplName(), \\",\\\\n b: function (a, b) {\\\\n return a === undefined ? b : a\\\\n },\\\\n c: function(i, prefix) {\\\\n var s = i.focus !== undefined ? 'focus' : 'blur'\\\\n return prefix + i.\\", \\"nn\\", \\" + '_' + s\\\\n },\\\\n d: function (i, v) {\\\\n return i === undefined ? v : i\\\\n },\\\\n e: function (n) {\\\\n return 'tmpl_' + n + '_\\", \\"container\\", \\"'\\\\n },\\\\n \\").concat(_this.buildXSTmpExtra(), \\"\\\\n}\\"); + }; + } + _createClass(BaseTemplate, [ { + key: \\"buildAttribute\\", + value: function buildAttribute(attrs, nodeName) { + var _this2 = this; + return Object.keys(attrs).map((function(k) { + return \\"\\".concat(k, '=\\"').concat(k.startsWith(\\"bind\\") || k.startsWith(\\"on\\") ? attrs[k] : \\"{\\".concat(_this2.getAttrValue(attrs[k], k, nodeName), \\"}\\"), '\\" '); + })).join(\\"\\"); + } + }, { + key: \\"replacePropName\\", + value: function replacePropName(name, value, _componentName) { + if (value === \\"eh\\") return name.toLowerCase(); + return name; + } + }, { + key: \\"createMiniComponents\\", + value: function createMiniComponents(components) { + var result = Object.create(null); + for (var key in components) { + if (hasOwn(components, key)) { + var component = components[key]; + var compName = toDashed(key); + var newComp = Object.create(null); + if (isFunction(this.modifyCompProps)) { + component = this.modifyCompProps(compName, component); + } + for (var prop in component) { + if (hasOwn(component, prop)) { + var propValue = component[prop]; + if (prop.startsWith(\\"bind\\") || specialEvents.has(prop)) { + propValue = \\"eh\\"; + } else if (propValue === \\"\\") { + propValue = \\"i.\\".concat(toCamelCase(prop)); + } else if (isBooleanStringLiteral(propValue) || isNumber(+propValue)) { + propValue = this.supportXS ? \\"xs.b(i.\\".concat(toCamelCase(prop), \\",\\").concat(propValue, \\")\\") : \\"i.\\".concat(toCamelCase(prop), \\"===undefined?\\").concat(propValue, \\":i.\\").concat(toCamelCase(prop)); + } else { + propValue = \\"i.\\".concat(toCamelCase(prop), \\"||\\").concat(propValue || singleQuote(\\"\\")); + } + prop = this.replacePropName(prop, propValue, compName); + newComp[prop] = propValue; + } + } + if (compName !== \\"block\\") { + Object.assign(newComp, styles, this.getEvents()); + } + if (compName === \\"swiper-item\\") { + delete newComp.style; + } + if (compName === \\"slot\\" || compName === \\"slot-view\\") { + result[compName] = { + slot: \\"i.name\\" + }; + } else { + result[compName] = newComp; + } + } + } + return result; + } + }, { + key: \\"buildBaseTemplate\\", + value: function buildBaseTemplate() { + var Adapter = this.Adapter; + var data = !this.isSupportRecursive && this.supportXS ? \\"\\".concat(this.dataKeymap(\\"i:item,l:''\\")) : this.dataKeymap(\\"i:item\\"); + return \\"\\".concat(this.buildXsTemplate(), '\\\\n\\\\n \\\\n \\\\n \\\\n\\\\n'); + } + }, { + key: \\"buildThirdPartyAttr\\", + value: function buildThirdPartyAttr(attrs) { + return Array.from(attrs).reduce((function(str, attr) { + if (attr.startsWith(\\"@\\")) { + return str + \\"bind\\".concat(attr.slice(1), '=\\"eh\\" '); + } else if (attr.startsWith(\\"bind\\")) { + return str + \\"\\".concat(attr, '=\\"eh\\" '); + } else if (attr.startsWith(\\"on\\")) { + return str + \\"bind\\".concat(attr.slice(2).toLowerCase(), '=\\"eh\\" '); + } + return str + \\"\\".concat(attr, '=\\"{{i.').concat(toCamelCase(attr), '}}\\" '); + }), \\"\\"); + } + }, { + key: \\"buildComponentTemplate\\", + value: function buildComponentTemplate(comp, level) { + return this.focusComponents.has(comp.nodeName) ? this.buildFocusComponentTemplte(comp, level) : this.buildStandardComponentTemplate(comp, level); + } + }, { + key: \\"buildFocusComponentTemplte\\", + value: function buildFocusComponentTemplte(comp, level) { + var attrs = Object.assign({}, comp.attributes); + var templateName = this.supportXS ? \\"xs.c(i, 'tmpl_\\".concat(level, \\"_')\\") : \\"i.focus ? 'tmpl_\\".concat(level, \\"_\\").concat(comp.nodeName, \\"_focus' : 'tmpl_\\").concat(level, \\"_\\").concat(comp.nodeName, \\"_blur'\\"); + delete attrs.focus; + return '\\\\n\\\\n \\\\n\\\\n\\\\n\\\\n <').concat(comp.nodeName, \\" \\").concat(this.buildAttribute(comp.attributes, comp.nodeName), ' id=\\"{{i.uid}}\\" />\\\\n\\\\n\\\\n\\\\n <').concat(comp.nodeName, \\" \\").concat(this.buildAttribute(attrs, comp.nodeName), ' id=\\"{{i.uid}}\\" />\\\\n\\\\n'); + } + }, { + key: \\"buildStandardComponentTemplate\\", + value: function buildStandardComponentTemplate(comp, level) { + var isSupportRecursive = this.isSupportRecursive, Adapter = this.Adapter; + var nextLevel = isSupportRecursive ? 0 : level + 1; + var data = !this.isSupportRecursive ? \\"\\".concat(this.dataKeymap(\\"i:item,l:l\\")) : this.dataKeymap(\\"i:item\\"); + var child = this.supportXS ? '') : ''); + if (isFunction(this.modifyLoopBody)) { + child = this.modifyLoopBody(child, comp.nodeName); + } + var children = this.voidElements.has(comp.nodeName) ? \\"\\" : \\"\\\\n\\\\n ').concat(child, \\"\\\\n \\\\n \\"); + if (isFunction(this.modifyLoopContainer)) { + children = this.modifyLoopContainer(children, comp.nodeName); + } + var nodeName = comp.nodeName === \\"slot\\" || comp.nodeName === \\"slot-view\\" ? \\"view\\" : comp.nodeName; + var res = '\\\\n\\\\n <').concat(nodeName, \\" \\").concat(this.buildAttribute(comp.attributes, comp.nodeName), ' id=\\"{{i.uid}}\\">').concat(children, \\"\\").concat(nodeName, \\">\\\\n\\\\n\\"); + if (isFunction(this.modifyTemplateResult)) { + res = this.modifyTemplateResult(res, comp.nodeName, level, children); + } + return res; + } + }, { + key: \\"buildPlainTextTemplate\\", + value: function buildPlainTextTemplate(level) { + return '\\\\n\\\\n{{i.', \\"v\\", \\"}} \\\\n\\\\n\\"); + } + }, { + key: \\"buildThirdPartyTemplate\\", + value: function buildThirdPartyTemplate(level, componentConfig) { + var _this3 = this; + var Adapter = this.Adapter, isSupportRecursive = this.isSupportRecursive; + var nextLevel = isSupportRecursive ? 0 : level + 1; + var template = \\"\\"; + var data = !this.isSupportRecursive && this.supportXS ? \\"\\".concat(this.dataKeymap(\\"i:item,l:l\\")) : this.dataKeymap(\\"i:item\\"); + componentConfig.thirdPartyComponents.forEach((function(attrs, compName) { + template += '\\\\n\\\\n <').concat(compName, \\" \\").concat(_this3.buildThirdPartyAttr(attrs), ' id=\\"{{i.uid}}\\">\\\\n\\\\n \\\\n \\\\n ').concat(compName, \\">\\\\n\\\\n \\"); + })); + return template; + } + }, { + key: \\"buildContainerTemplate\\", + value: function buildContainerTemplate(level) { + var restart = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; + var tmpl = \\"\\"; + if (restart) { + if (!this.isSupportRecursive && this.supportXS) { + tmpl = ''; + } else { + tmpl = ' '; + } + } else { + var xs = !this.isSupportRecursive ? \\"xs.a(\\".concat(level, \\", i.\\", \\"nn\\", \\", l)\\") : \\"xs.a(\\".concat(level, \\", i.\\", \\"nn\\", \\")\\"); + var data = !this.isSupportRecursive ? \\"\\".concat(this.dataKeymap(\\"i:i,cid:\\".concat(level, \\",l:xs.f(l,i.\\", \\"nn\\", \\")\\"))) : \\"\\".concat(this.dataKeymap(\\"i:i\\")); + tmpl = this.supportXS ? '') : \\"'); + } + return '\\\\n\\\\n ').concat(tmpl, \\"\\\\n\\\\n\\"); + } + }, { + key: \\"dataKeymap\\", + value: function dataKeymap(keymap) { + return keymap; + } + }, { + key: \\"getEvents\\", + value: function getEvents() { + return events; + } + }, { + key: \\"getAttrValue\\", + value: function getAttrValue(value, _key, _nodeName) { + return \\"{\\".concat(value, \\"}\\"); + } + }, { + key: \\"buildXsTemplate\\", + value: function buildXsTemplate() { + return \\"\\"; + } + }, { + key: \\"mergeComponents\\", + value: function mergeComponents(ctx, patch) { + ctx.helper.recursiveMerge(this.internalComponents, patch); + } + }, { + key: \\"buildXSTmplName\\", + value: function buildXSTmplName() { + return \\"function (l, n) {\\\\n return 'tmpl_' + l + '_' + n\\\\n }\\"; + } + }, { + key: \\"buildXSTmpExtra\\", + value: function buildXSTmpExtra() { + return \\"\\"; + } + } ]); + return BaseTemplate; + }(); + var shared_esm_RecursiveTemplate = function(_BaseTemplate) { + _inherits(RecursiveTemplate, _BaseTemplate); + function RecursiveTemplate() { + var _this4; + _classCallCheck(this, RecursiveTemplate); + _this4 = _possibleConstructorReturn(this, _getPrototypeOf(RecursiveTemplate).apply(this, arguments)); + _this4.isSupportRecursive = true; + _this4.buildTemplate = function(componentConfig) { + var template = _this4.buildBaseTemplate(); + if (!_this4.miniComponents) { + _this4.miniComponents = _this4.createMiniComponents(_this4.internalComponents); + } + var ZERO_FLOOR = 0; + var components = Object.keys(_this4.miniComponents).filter((function(c) { + return componentConfig.includes.size && !componentConfig.includeAll ? componentConfig.includes.has(c) : true; + })); + template = components.reduce((function(current, nodeName) { + var attributes = _this4.miniComponents[nodeName]; + return current + _this4.buildComponentTemplate({ + nodeName: nodeName, + attributes: attributes + }, ZERO_FLOOR); + }), template); + template += _this4.buildPlainTextTemplate(ZERO_FLOOR); + template += _this4.buildThirdPartyTemplate(ZERO_FLOOR, componentConfig); + template += _this4.buildContainerTemplate(ZERO_FLOOR); + return template; + }; + return _this4; + } + return RecursiveTemplate; + }(shared_esm_BaseTemplate); + var shared_esm_UnRecursiveTemplate = function(_BaseTemplate2) { + _inherits(UnRecursiveTemplate, _BaseTemplate2); + function UnRecursiveTemplate() { + var _this5; + _classCallCheck(this, UnRecursiveTemplate); + _this5 = _possibleConstructorReturn(this, _getPrototypeOf(UnRecursiveTemplate).apply(this, arguments)); + _this5.isSupportRecursive = false; + _this5._baseLevel = 16; + _this5.buildTemplate = function(componentConfig) { + _this5.componentConfig = componentConfig; + if (!_this5.miniComponents) { + _this5.miniComponents = _this5.createMiniComponents(_this5.internalComponents); + } + var components = Object.keys(_this5.miniComponents).filter((function(c) { + return componentConfig.includes.size && !componentConfig.includeAll ? componentConfig.includes.has(c) : true; + })); + var template = _this5.buildBaseTemplate(); + for (var i = 0; i < _this5.baseLevel; i++) { + template += _this5.supportXS ? _this5.buildOptimizeFloor(i, components, _this5.baseLevel === i + 1) : _this5.buildFloor(i, components, _this5.baseLevel === i + 1); + } + return template; + }; + return _this5; + } + _createClass(UnRecursiveTemplate, [ { + key: \\"buildFloor\\", + value: function buildFloor(level, components) { + var _this6 = this; + var restart = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; + if (restart) return this.buildContainerTemplate(level, restart); + var template = components.reduce((function(current, nodeName) { + var attributes = _this6.miniComponents[nodeName]; + return current + _this6.buildComponentTemplate({ + nodeName: nodeName, + attributes: attributes + }, level); + }), \\"\\"); + template += this.buildPlainTextTemplate(level); + template += this.buildThirdPartyTemplate(level, this.componentConfig); + template += this.buildContainerTemplate(level, restart); + return template; + } + }, { + key: \\"buildOptimizeFloor\\", + value: function buildOptimizeFloor(level, components) { + var _this7 = this; + var restart = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; + if (restart) return this.buildContainerTemplate(level, restart); + var template = components.reduce((function(current, nodeName) { + if (level !== 0) { + if (!_this7.nestElements.has(nodeName)) { + return current; + } else { + var max = _this7.nestElements.get(nodeName); + if (max > 0 && level >= max) { + return current; + } + } + } + var attributes = _this7.miniComponents[nodeName]; + return current + _this7.buildComponentTemplate({ + nodeName: nodeName, + attributes: attributes + }, level); + }), \\"\\"); + if (level === 0) template += this.buildPlainTextTemplate(level); + template += this.buildThirdPartyTemplate(level, this.componentConfig); + template += this.buildContainerTemplate(level); + return template; + } + }, { + key: \\"buildXSTmplName\\", + value: function buildXSTmplName() { + var comps = [].concat(_toConsumableArray(Array.from(this.nestElements.keys())), _toConsumableArray(Array.from(this.componentConfig.thirdPartyComponents.keys()))); + var hasMaxComps = []; + this.nestElements.forEach((function(max, comp) { + if (max > -1) hasMaxComps.push(comp); + })); + return \\"function (l, n, s) {\\\\n var a = \\".concat(JSON.stringify(comps), \\"\\\\n var b = \\").concat(JSON.stringify(hasMaxComps), \\"\\\\n if (a.indexOf(n) === -1) {\\\\n l = 0\\\\n }\\\\n if (b.indexOf(n) > -1) {\\\\n var u = s.split(',')\\\\n var depth = 0\\\\n for (var i = 0; i < u.length; i++) {\\\\n if (u[i] === n) depth++\\\\n }\\\\n l = depth\\\\n }\\\\n return 'tmpl_' + l + '_' + n\\\\n }\\"); + } + }, { + key: \\"buildXSTmpExtra\\", + value: function buildXSTmpExtra() { + var hasMaxComps = []; + this.nestElements.forEach((function(max, comp) { + if (max > -1) hasMaxComps.push(comp); + })); + return \\"f: function (l, n) {\\\\n var b = \\".concat(JSON.stringify(hasMaxComps), \\"\\\\n if (b.indexOf(n) > -1) {\\\\n if (l) l += ','\\\\n l += n\\\\n }\\\\n return l\\\\n }\\"); + } + }, { + key: \\"baseLevel\\", + set: function set(lv) { + this._baseLevel = lv; + }, + get: function get() { + return this._baseLevel; + } + } ]); + return UnRecursiveTemplate; + }(shared_esm_BaseTemplate); + var _onAndSyncApis = new Set([ \\"getAccountInfoSync\\", \\"getEnterOptionsSync\\", \\"offBLEPeripheralConnectionStateChanged\\", \\"offBeaconServiceChange\\", \\"offBeaconUpdate\\", \\"offDeviceMotionChange\\", \\"offHCEMessage\\", \\"offKeyboardHeightChange\\", \\"offLocalServiceDiscoveryStop\\", \\"offLocalServiceFound\\", \\"offLocalServiceLost\\", \\"offLocalServiceResolveFail\\", \\"offLocationChange\\", \\"offThemeChange\\", \\"offVoIPChatInterrupted\\", \\"offVoIPChatMembersChanged\\", \\"offVoIPVideoMembersChanged\\", \\"offWifiConnected\\", \\"offWindowResize\\", \\"onBLEPeripheralConnectionStateChanged\\", \\"onBackgroundAudioPause\\", \\"onBackgroundAudioPlay\\", \\"onBackgroundAudioStop\\", \\"onBackgroundFetchData\\", \\"onHCEMessage\\", \\"onKeyboardHeightChange\\", \\"onLocalServiceDiscoveryStop\\", \\"onLocalServiceFound\\", \\"onLocalServiceLost\\", \\"onLocalServiceResolveFail\\", \\"onLocationChange\\", \\"onThemeChange\\", \\"onVoIPChatInterrupted\\", \\"onVoIPChatMembersChanged\\", \\"onVoIPChatSpeakersChanged\\", \\"onVoIPVideoMembersChanged\\", \\"onWifiConnected\\", \\"onWindowResize\\", \\"reportMonitor\\" ]); + var _noPromiseApis = new Set([ \\"createAudioContext\\", \\"createLivePusherContext\\", \\"createMediaContainer\\", \\"createMediaRecorder\\", \\"createOffscreenCanvas\\", \\"createRewardedVideoAd\\", \\"createUDPSocket\\", \\"createVideoDecoder\\", \\"createWorker\\", \\"getLogManager\\", \\"getNFCAdapter\\", \\"getPerformance\\", \\"getRealtimeLogManager\\", \\"pauseBackgroundAudio\\", \\"pauseVoice\\", \\"reportPerformance\\", \\"stopBackgroundAudio\\", \\"stopRecord\\", \\"stopVoice\\" ]); + var _otherApis = new Set([ \\"addCard\\", \\"authPrivateMessage\\", \\"checkIsOpenAccessibility\\", \\"checkIsSoterEnrolledInDevice\\", \\"checkIsSupportSoterAuthentication\\", \\"chooseInvoice\\", \\"chooseMedia\\", \\"chooseMessageFile\\", \\"compressVideo\\", \\"connectWifi\\", \\"createBLEPeripheralServer\\", \\"disableAlertBeforeUnload\\", \\"enableAlertBeforeUnload\\", \\"exitVoIPChat\\", \\"getBLEDeviceRSSI\\", \\"getBackgroundAudioPlayerState\\", \\"getBackgroundFetchData\\", \\"getBackgroundFetchToken\\", \\"getGroupEnterInfo\\", \\"getHCEState\\", \\"getSelectedTextRange\\", \\"getShareInfo\\", \\"getVideoInfo\\", \\"getWeRunData\\", \\"join1v1Chat\\", \\"joinVoIPChat\\", \\"makeBluetoothPair\\", \\"openCard\\", \\"openVideoEditor\\", \\"playBackgroundAudio\\", \\"playVoice\\", \\"previewMedia\\", \\"requestPayment\\", \\"saveFileToDisk\\", \\"scanItem\\", \\"seekBackgroundAudio\\", \\"sendHCEMessage\\", \\"setBLEMTU\\", \\"setBackgroundFetchToken\\", \\"setEnable1v1Chat\\", \\"setTopBarText\\", \\"setWifiList\\", \\"setWindowSize\\", \\"showRedPackage\\", \\"startGyroscope\\", \\"startHCE\\", \\"startLocalServiceDiscovery\\", \\"startLocationUpdate\\", \\"startLocationUpdateBackground\\", \\"startRecord\\", \\"startSoterAuthentication\\", \\"startWifi\\", \\"stopGyroscope\\", \\"stopHCE\\", \\"stopLocalServiceDiscovery\\", \\"stopLocationUpdate\\", \\"stopWifi\\", \\"subscribeVoIPVideoMembers\\", \\"updateShareMenu\\", \\"updateVoIPChatMuteConfig\\", \\"updateWeChatApp\\" ]); + var RequestQueue = { + MAX_REQUEST: 5, + queue: [], + request: function request(options) { + this.push(options); + return this.run(); + }, + push: function push(options) { + this.queue.push(options); + }, + run: function run() { + var _this = this; + if (!this.queue.length) { + return; + } + if (this.queue.length <= this.MAX_REQUEST) { + var options = this.queue.shift(); + var completeFn = options.complete; + options.complete = function() { + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + completeFn && completeFn.apply(options, args); + _this.run(); + }; + return wx.request(options); + } + } + }; + function taroInterceptor(chain) { + return request(chain.requestParams); + } + function request(options) { + options = options || {}; + if (typeof options === \\"string\\") { + options = { + url: options + }; + } + var originSuccess = options.success; + var originFail = options.fail; + var originComplete = options.complete; + var requestTask; + var p = new Promise((function(resolve, reject) { + options.success = function(res) { + originSuccess && originSuccess(res); + resolve(res); + }; + options.fail = function(res) { + originFail && originFail(res); + reject(res); + }; + options.complete = function(res) { + originComplete && originComplete(res); + }; + requestTask = RequestQueue.request(options); + })); + p.abort = function(cb) { + cb && cb(); + if (requestTask) { + requestTask.abort(); + } + return p; + }; + return p; + } + function processApis(taro) { + var onAndSyncApis = new Set([].concat(_toConsumableArray(taro.onAndSyncApis), _toConsumableArray(_onAndSyncApis))); + var noPromiseApis = new Set([].concat(_toConsumableArray(taro.noPromiseApis), _toConsumableArray(_noPromiseApis))); + var otherApis = new Set([].concat(_toConsumableArray(taro.otherApis), _toConsumableArray(_otherApis))); + var apis = [].concat(_toConsumableArray(onAndSyncApis), _toConsumableArray(noPromiseApis), _toConsumableArray(otherApis)); + var useDataCacheApis = { + navigateTo: true, + redirectTo: true, + reLaunch: true + }; + var routerParamsPrivateKey = \\"__key_\\"; + var preloadPrivateKey = \\"__preload_\\"; + var preloadInitedComponent = \\"$preloadComponent\\"; + apis.forEach((function(key) { + if (!(key in wx)) { + taro[key] = function() { + console.warn(\\"\\\\u5fae\\\\u4fe1\\\\u5c0f\\\\u7a0b\\\\u5e8f\\\\u6682\\\\u4e0d\\\\u652f\\\\u6301 \\".concat(key)); + }; + return; + } + if (otherApis.has(key)) { + taro[key] = function(options) { + for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) { + args[_key2 - 1] = arguments[_key2]; + } + options = options || {}; + var task = null; + var obj = Object.assign({}, options); + if (typeof options === \\"string\\") { + if (args.length) { + var _wx; + return (_wx = wx)[key].apply(_wx, [ options ].concat(args)); + } + return wx[key](options); + } + if (key === \\"navigateTo\\" || key === \\"redirectTo\\" || key === \\"switchTab\\") { + var url = obj.url ? obj.url.replace(/^\\\\//, \\"\\") : \\"\\"; + if (url.indexOf(\\"?\\") > -1) url = url.split(\\"?\\")[0]; + var Component = cacheDataGet(url); + if (Component) { + var component = new Component; + if (component.componentWillPreload) { + var cacheKey = getUniqueKey(); + var MarkIndex = obj.url.indexOf(\\"?\\"); + var hasMark = MarkIndex > -1; + var urlQueryStr = hasMark ? obj.url.substring(MarkIndex + 1, obj.url.length) : \\"\\"; + var params = queryToJson(urlQueryStr); + obj.url += (hasMark ? \\"&\\" : \\"?\\") + \\"\\".concat(preloadPrivateKey, \\"=\\").concat(cacheKey); + cacheDataSet(cacheKey, component.componentWillPreload(params)); + cacheDataSet(preloadInitedComponent, component); + } + } + } + if (useDataCacheApis[key]) { + var _url = obj.url = obj.url || \\"\\"; + var _MarkIndex = _url.indexOf(\\"?\\"); + var _hasMark = _MarkIndex > -1; + var _urlQueryStr = _hasMark ? _url.substring(_MarkIndex + 1, _url.length) : \\"\\"; + var _params = queryToJson(_urlQueryStr); + var _cacheKey = getUniqueKey(); + obj.url += (_hasMark ? \\"&\\" : \\"?\\") + \\"\\".concat(routerParamsPrivateKey, \\"=\\").concat(_cacheKey); + cacheDataSet(_cacheKey, _params); + } + var p = new Promise((function(resolve, reject) { + [ \\"fail\\", \\"success\\", \\"complete\\" ].forEach((function(k) { + obj[k] = function(res) { + options[k] && options[k](res); + if (k === \\"success\\") { + if (key === \\"connectSocket\\") { + resolve(Promise.resolve().then((function() { + return Object.assign(task, res); + }))); + } else { + resolve(res); + } + } else if (k === \\"fail\\") { + reject(res); + } + }; + })); + if (args.length) { + var _wx2; + task = (_wx2 = wx)[key].apply(_wx2, [ obj ].concat(args)); + } else { + task = wx[key](obj); + } + })); + if (key === \\"uploadFile\\" || key === \\"downloadFile\\") { + p.progress = function(cb) { + if (task) { + task.onProgressUpdate(cb); + } + return p; + }; + p.abort = function(cb) { + cb && cb(); + if (task) { + task.abort(); + } + return p; + }; + } + return p; + }; + } else { + taro[key] = function() { + for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) { + args[_key3] = arguments[_key3]; + } + var argsLen = args.length; + var newArgs = args.concat(); + var lastArg = newArgs[argsLen - 1]; + if (lastArg && lastArg.isTaroComponent && lastArg.$scope) { + newArgs.splice(argsLen - 1, 1, lastArg.$scope); + } + return wx[key].apply(wx, newArgs); + }; + } + })); + } + function pxTransform(size) { + var _ref = this.config || {}, _ref$designWidth = _ref.designWidth, designWidth = _ref$designWidth === void 0 ? 750 : _ref$designWidth, _ref$deviceRatio = _ref.deviceRatio, deviceRatio = _ref$deviceRatio === void 0 ? { + 640: 2.34 / 2, + 750: 1, + 828: 1.81 / 2 + } : _ref$deviceRatio; + if (!(designWidth in deviceRatio)) { + throw new Error(\\"deviceRatio \\\\u914d\\\\u7f6e\\\\u4e2d\\\\u4e0d\\\\u5b58\\\\u5728 \\".concat(designWidth, \\" \\\\u7684\\\\u8bbe\\\\u7f6e\\\\uff01\\")); + } + return parseInt(size, 10) * deviceRatio[designWidth] + \\"rpx\\"; + } + function canIUseWebp() { + var _wx$getSystemInfoSync = wx.getSystemInfoSync(), platform = _wx$getSystemInfoSync.platform; + var platformLower = platform.toLowerCase(); + if (platformLower === \\"android\\" || platformLower === \\"devtools\\") { + return true; + } + return false; + } + function wxCloud(taro) { + var wxC = wx.cloud || {}; + var wxcloud = {}; + var apiList = [ \\"init\\", \\"database\\", \\"uploadFile\\", \\"downloadFile\\", \\"getTempFileURL\\", \\"deleteFile\\", \\"callFunction\\", \\"CloudID\\" ]; + apiList.forEach((function(v) { + wxcloud[v] = wxC[v]; + })); + taro.cloud = wxcloud; + } + function initNativeApi(taro) { + processApis(taro); + var link = new taro.Link(taroInterceptor); + taro.request = link.request.bind(link); + taro.addInterceptor = link.addInterceptor.bind(link); + taro.cleanInterceptors = link.cleanInterceptors.bind(link); + taro.getCurrentPages = getCurrentPages; + taro.getApp = getApp; + taro.requirePlugin = requirePlugin; + taro.initPxTransform = taro.initPxTransform.bind(taro); + taro.pxTransform = pxTransform.bind(taro); + taro.canIUseWebp = canIUseWebp; + taro.env = wx.env; + wxCloud(taro); + } + var components = { + Progress: { + \\"border-radius\\": \\"0\\", + \\"font-size\\": \\"16\\", + duration: \\"30\\", + bindActiveEnd: \\"\\" + }, + RichText: { + space: \\"\\" + }, + Text: { + \\"user-select\\": \\"false\\" + }, + Map: { + polygons: \\"[]\\", + subkey: \\"\\", + rotate: \\"0\\", + skew: \\"0\\", + \\"enable-3D\\": \\"false\\", + \\"show-compass\\": \\"false\\", + \\"show-scale\\": \\"false\\", + \\"enable-overlooking\\": \\"false\\", + \\"enable-zoom\\": \\"true\\", + \\"enable-scroll\\": \\"true\\", + \\"enable-rotate\\": \\"false\\", + \\"enable-satellite\\": \\"false\\", + \\"enable-traffic\\": \\"false\\", + setting: \\"[]\\", + bindLabelTap: \\"\\", + bindRegionChange: \\"\\", + bindPoiTap: \\"\\" + }, + Button: { + lang: \\"en\\", + \\"session-from\\": \\"\\", + \\"send-message-title\\": \\"\\", + \\"send-message-path\\": \\"\\", + \\"send-message-img\\": \\"\\", + \\"app-parameter\\": \\"\\", + \\"show-message-card\\": \\"false\\", + bindGetUserInfo: \\"\\", + bindContact: \\"\\", + bindGetPhoneNumber: \\"\\", + bindError: \\"\\", + bindOpenSetting: \\"\\", + bindLaunchApp: \\"\\" + }, + Form: { + \\"report-submit-timeout\\": \\"0\\" + }, + Input: { + \\"auto-focus\\": \\"false\\", + \\"always-embed\\": \\"false\\", + \\"adjust-position\\": \\"true\\", + \\"hold-keyboard\\": \\"false\\", + bindKeyboardHeightChange: \\"\\" + }, + Picker: { + \\"header-text\\": \\"\\" + }, + PickerView: { + bindPickStart: \\"\\", + bindPickEnd: \\"\\" + }, + Slider: { + color: singleQuote(\\"#e9e9e9\\"), + \\"selected-color\\": singleQuote(\\"#1aad19\\") + }, + Textarea: { + \\"show-confirm-bar\\": \\"true\\", + \\"adjust-position\\": \\"true\\", + \\"hold-keyboard\\": \\"false\\", + \\"disable-default-padding\\": \\"false\\", + bindKeyboardHeightChange: \\"\\" + }, + ScrollView: { + \\"enable-flex\\": \\"false\\", + \\"scroll-anchoring\\": \\"false\\", + \\"refresher-enabled\\": \\"false\\", + \\"refresher-threshold\\": \\"45\\", + \\"refresher-default-style\\": singleQuote(\\"black\\"), + \\"refresher-background\\": singleQuote(\\"#FFF\\"), + \\"refresher-triggered\\": \\"false\\", + enhanced: \\"false\\", + bounces: \\"true\\", + \\"show-scrollbar\\": \\"true\\", + \\"paging-enabled\\": \\"false\\", + \\"fast-deceleration\\": \\"false\\", + bindDragStart: \\"\\", + bindDragging: \\"\\", + bindDragEnd: \\"\\", + bindRefresherPulling: \\"\\", + bindRefresherRefresh: \\"\\", + bindRefresherRestore: \\"\\", + bindRefresherAbort: \\"\\" + }, + Swiper: { + \\"snap-to-edge\\": \\"false\\", + \\"easing-function\\": singleQuote(\\"default\\") + }, + SwiperItem: { + \\"skip-hidden-item-layout\\": \\"false\\" + }, + Navigator: { + target: singleQuote(\\"self\\"), + \\"app-id\\": \\"\\", + path: \\"\\", + \\"extra-data\\": \\"\\", + version: singleQuote(\\"version\\") + }, + Camera: { + mode: singleQuote(\\"normal\\"), + resolution: singleQuote(\\"medium\\"), + \\"frame-size\\": singleQuote(\\"medium\\"), + bindInitDone: \\"\\", + bindScanCode: \\"\\" + }, + Image: { + webp: \\"false\\", + \\"show-menu-by-longpress\\": \\"false\\" + }, + LivePlayer: { + mode: singleQuote(\\"live\\"), + \\"sound-mode\\": singleQuote(\\"speaker\\"), + \\"auto-pause-if-navigate\\": \\"true\\", + \\"auto-pause-if-open-native\\": \\"true\\", + \\"picture-in-picture-mode\\": \\"[]\\", + bindAudioVolumeNotify: \\"\\", + bindEnterPictureInPicture: \\"\\", + bindLeavePictureInPicture: \\"\\" + }, + Video: { + title: \\"\\", + \\"play-btn-position\\": singleQuote(\\"bottom\\"), + \\"enable-play-gesture\\": \\"false\\", + \\"auto-pause-if-navigate\\": \\"true\\", + \\"auto-pause-if-open-native\\": \\"true\\", + \\"vslide-gesture\\": \\"false\\", + \\"vslide-gesture-in-fullscreen\\": \\"true\\", + \\"ad-unit-id\\": \\"\\", + \\"poster-for-crawler\\": \\"\\", + \\"show-casting-button\\": \\"false\\", + \\"picture-in-picture-mode\\": \\"[]\\", + \\"enable-auto-rotation\\": \\"false\\", + \\"show-screen-lock-button\\": \\"false\\", + bindProgress: \\"\\", + bindLoadedMetadata: \\"\\", + bindControlsToggle: \\"\\", + bindEnterPictureInPicture: \\"\\", + bindLeavePictureInPicture: \\"\\", + bindSeekComplete: \\"\\" + }, + Canvas: { + type: \\"\\" + }, + Ad: { + \\"ad-type\\": singleQuote(\\"banner\\"), + \\"ad-theme\\": singleQuote(\\"white\\") + }, + Editor: { + \\"read-only\\": \\"false\\", + placeholder: \\"\\", + \\"show-img-size\\": \\"false\\", + \\"show-img-toolbar\\": \\"false\\", + \\"show-img-resize\\": \\"false\\", + focus: \\"false\\", + bindReady: \\"\\", + bindFocus: \\"\\", + bindBlur: \\"\\", + bindInput: \\"\\", + bindStatusChange: \\"\\", + name: \\"\\" + }, + MatchMedia: { + \\"min-width\\": \\"\\", + \\"max-width\\": \\"\\", + width: \\"\\", + \\"min-height\\": \\"\\", + \\"max-height\\": \\"\\", + height: \\"\\", + orientation: \\"\\" + }, + FunctionalPageNavigator: { + version: singleQuote(\\"release\\"), + name: \\"\\", + args: \\"\\", + bindSuccess: \\"\\", + bindFail: \\"\\", + bindCancel: \\"\\" + }, + LivePusher: { + url: \\"\\", + mode: singleQuote(\\"RTC\\"), + autopush: \\"false\\", + muted: \\"false\\", + \\"enable-camera\\": \\"true\\", + \\"auto-focus\\": \\"true\\", + orientation: singleQuote(\\"vertical\\"), + beauty: \\"0\\", + whiteness: \\"0\\", + aspect: singleQuote(\\"9:16\\"), + \\"min-bitrate\\": \\"200\\", + \\"max-bitrate\\": \\"1000\\", + \\"audio-quality\\": singleQuote(\\"high\\"), + \\"waiting-image\\": \\"\\", + \\"waiting-image-hash\\": \\"\\", + zoom: \\"false\\", + \\"device-position\\": singleQuote(\\"front\\"), + \\"background-mute\\": \\"false\\", + mirror: \\"false\\", + \\"remote-mirror\\": \\"false\\", + \\"local-mirror\\": \\"false\\", + \\"audio-reverb-type\\": \\"0\\", + \\"enable-mic\\": \\"true\\", + \\"enable-agc\\": \\"false\\", + \\"enable-ans\\": \\"false\\", + \\"audio-volume-type\\": singleQuote(\\"voicecall\\"), + \\"video-width\\": \\"360\\", + \\"video-height\\": \\"640\\", + animation: \\"\\", + bindStateChange: \\"\\", + bindNetStatus: \\"\\", + bindBgmStart: \\"\\", + bindBgmProgress: \\"\\", + bindBgmComplete: \\"\\" + }, + OfficialAccount: { + bindLoad: \\"\\", + bindError: \\"\\" + }, + OpenData: { + type: \\"\\", + \\"open-gid\\": \\"\\", + lang: singleQuote(\\"en\\"), + \\"default-text\\": \\"\\", + \\"default-avatar\\": \\"\\", + bindError: \\"\\" + }, + NavigationBar: { + title: \\"\\", + loading: \\"false\\", + \\"front-color\\": \\"\\", + \\"background-color\\": \\"\\", + \\"color-animation-duration\\": \\"0\\", + \\"color-animation-timing-func\\": singleQuote(\\"linear\\") + }, + PageMeta: { + \\"background-text-style\\": \\"\\", + \\"background-color\\": \\"\\", + \\"background-color-top\\": \\"\\", + \\"background-color-bottom\\": \\"\\", + \\"scroll-top\\": singleQuote(\\"\\"), + \\"scroll-duration\\": \\"300\\", + \\"page-style\\": singleQuote(\\"\\"), + \\"root-font-size\\": singleQuote(\\"\\"), + bindResize: \\"\\", + bindScroll: \\"\\", + bindScrollDone: \\"\\" + }, + VoipRoom: { + openid: \\"\\", + mode: singleQuote(\\"camera\\"), + \\"device-position\\": singleQuote(\\"front\\"), + bindError: \\"\\" + }, + AdCustom: { + \\"unit-id\\": \\"\\", + \\"ad-intervals\\": \\"\\", + bindLoad: \\"\\", + bindError: \\"\\" + } + }; + var hostConfig = { + initNativeApi: initNativeApi, + onTaroElementCreate: function onTaroElementCreate(tagName) { + warn(tagName === \\"MAP\\", \\"\\\\u5fae\\\\u4fe1\\\\u5c0f\\\\u7a0b\\\\u5e8f map \\\\u7ec4\\\\u4ef6\\\\u7684 \`setting\` \\\\u5c5e\\\\u6027\\\\u9700\\\\u8981\\\\u4f20\\\\u9012\\\\u4e00\\\\u4e2a\\\\u9ed8\\\\u8ba4\\\\u503c\\\\u3002\\\\u8be6\\\\u60c5\\\\uff1a\\\\n https://developers.weixin.qq.com/miniprogram/dev/component/map.html\\"); + } + }; + mergeReconciler(hostConfig); + mergeInternalComponents(components); + var taro_runtime = __webpack_require__(1); + var classCallCheck = __webpack_require__(3); + var createClass = __webpack_require__(4); + var possibleConstructorReturn = __webpack_require__(6); + var getPrototypeOf = __webpack_require__(5); + var inherits = __webpack_require__(7); + var react = __webpack_require__(0); + var app = __webpack_require__(13); + var app_App = function(_Component) { + Object(inherits[\\"a\\"])(App, _Component); + function App() { + Object(classCallCheck[\\"a\\"])(this, App); + return Object(possibleConstructorReturn[\\"a\\"])(this, Object(getPrototypeOf[\\"a\\"])(App).apply(this, arguments)); + } + Object(createClass[\\"a\\"])(App, [ { + key: \\"componentDidMount\\", + value: function componentDidMount() {} + }, { + key: \\"componentDidShow\\", + value: function componentDidShow() {} + }, { + key: \\"componentDidHide\\", + value: function componentDidHide() {} + }, { + key: \\"componentDidCatchError\\", + value: function componentDidCatchError() {} + }, { + key: \\"render\\", + value: function render() { + return this.props.children; + } + } ]); + return App; + }(react[\\"Component\\"]); + var lib_src_app = app_App; + var taro_react = __webpack_require__(9); + var config = { + pages: [ \\"pages/index/index\\", \\"pages/about/index\\" ], + window: { + backgroundTextStyle: \\"light\\", + navigationBarBackgroundColor: \\"#fff\\", + navigationBarTitleText: \\"WeChat\\", + navigationBarTextStyle: \\"black\\" + } + }; + taro_runtime[\\"window\\"].__taroAppConfig = config; + var inst = App(Object(taro_runtime[\\"createReactApp\\"])(lib_src_app, react, taro_react[\\"a\\"], config)); + } +}, [ [ 16, 0, 1, 3, 2 ] ] ]); + + + +/** filePath: dist/app.json **/ +{\\"pages\\":[\\"pages/index/index\\",\\"pages/about/index\\"],\\"window\\":{\\"backgroundTextStyle\\":\\"light\\",\\"navigationBarBackgroundColor\\":\\"#fff\\",\\"navigationBarTitleText\\":\\"WeChat\\",\\"navigationBarTextStyle\\":\\"black\\"}} + +/** filePath: dist/app.wxss **/ +.body{background-color:#e8e8ed} +@import \\"./common.wxss\\"; + +/** filePath: dist/base.wxml **/ + + + + + + + + ++ + + + ++ + ++ + + + ++ + ++ + + + ++ + ++ + + + ++ + +{{i.v}} + + + + + + + ++ + + + ++ + ++ + + + ++ + ++ + + + + + + + ++ + ++ + + + ++ + ++ + + + ++ + ++ + + + + + + + ++ + ++ + + + ++ + ++ + + + ++ + ++ + + + + + + + ++ + ++ + + + ++ + ++ + + + + + + + ++ + ++ + + + ++ + ++ + + + + + + + ++ + ++ + + + ++ + ++ + + + + + + + ++ + ++ + + + ++ + ++ + + + + + + + ++ + ++ + + + ++ + ++ + + + + + + + ++ + ++ + + + ++ + ++ + + + + + + + ++ + ++ + + + ++ + ++ + + + + + + + ++ + ++ + + + ++ + ++ + + + + + + + ++ + ++ + + + ++ + ++ + + + + + + + ++ + ++ + + + ++ + ++ + + + + + + + ++ + ++ + + + ++ + ++ + + + + + + + ++ + ++ + + +/** filePath: dist/common.js **/ +(wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 2 ], { + 0: function(module, __webpack_exports__, __webpack_require__) { + \\"use strict\\"; + __webpack_require__.r(__webpack_exports__); + __webpack_exports__[\\"default\\"] = \\"react-mock\\"; + }, + 15: function(module, exports, __webpack_require__) {}, + 8: function(module, __webpack_exports__, __webpack_require__) { + \\"use strict\\"; + __webpack_require__.d(__webpack_exports__, \\"a\\", (function() { + return Index; + })); + var _babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3); + var _babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(4); + var _babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(6); + var _babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(5); + var _babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(7); + var react__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(0); + var _tarojs_components__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(2); + var _index_scss__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(15); + var _index_scss__WEBPACK_IMPORTED_MODULE_7___default = __webpack_require__.n(_index_scss__WEBPACK_IMPORTED_MODULE_7__); + var Index = function(_Component) { + Object(_babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_4__[\\"a\\"])(Index, _Component); + function Index() { + Object(_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_0__[\\"a\\"])(this, Index); + return Object(_babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__[\\"a\\"])(this, Object(_babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3__[\\"a\\"])(Index).apply(this, arguments)); + } + Object(_babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_1__[\\"a\\"])(Index, [ { + key: \\"render\\", + value: function render() { + return react__WEBPACK_IMPORTED_MODULE_5__[\\"default\\"].createElement(_tarojs_components__WEBPACK_IMPORTED_MODULE_6__[\\"View\\"], { + className: \\"title\\" + }, react__WEBPACK_IMPORTED_MODULE_5__[\\"default\\"].createElement(_tarojs_components__WEBPACK_IMPORTED_MODULE_6__[\\"Text\\"], null, this.props.title)); + } + } ]); + return Index; + }(react__WEBPACK_IMPORTED_MODULE_5__[\\"Component\\"]); + } +} ]); + +/** filePath: dist/common.wxss **/ +.title{color:red} + +/** filePath: dist/comp.js **/ +(wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 6 ], { + 14: function(module, __webpack_exports__, __webpack_require__) { + \\"use strict\\"; + __webpack_require__.r(__webpack_exports__); + var _tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1); + Component(Object(_tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__[\\"createRecursiveComponentConfig\\"])()); + } +}, [ [ 14, 0, 1 ] ] ]); + +/** filePath: dist/comp.json **/ +{\\"component\\":true,\\"usingComponents\\":{\\"comp\\":\\"./comp\\"}} + +/** filePath: dist/comp.wxml **/ + + + +/** filePath: dist/pages/about/index.js **/ +(wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 7 ], { + 18: function(module, __webpack_exports__, __webpack_require__) { + \\"use strict\\"; + __webpack_require__.r(__webpack_exports__); + var taro_runtime = __webpack_require__(1); + var classCallCheck = __webpack_require__(3); + var createClass = __webpack_require__(4); + var possibleConstructorReturn = __webpack_require__(6); + var getPrototypeOf = __webpack_require__(5); + var inherits = __webpack_require__(7); + var react = __webpack_require__(0); + var taro_components = __webpack_require__(2); + var title = __webpack_require__(8); + var about_Index = function(_Component) { + Object(inherits[\\"a\\"])(Index, _Component); + function Index() { + Object(classCallCheck[\\"a\\"])(this, Index); + return Object(possibleConstructorReturn[\\"a\\"])(this, Object(getPrototypeOf[\\"a\\"])(Index).apply(this, arguments)); + } + Object(createClass[\\"a\\"])(Index, [ { + key: \\"render\\", + value: function render() { + return react[\\"default\\"].createElement(taro_components[\\"View\\"], { + className: \\"about\\" + }, react[\\"default\\"].createElement(title[\\"a\\"], { + title: \\"about\\" + }), react[\\"default\\"].createElement(taro_components[\\"Text\\"], null, \\"About.\\")); + } + } ]); + return Index; + }(react[\\"Component\\"]); + var config = { + navigationBarTitleText: \\"\\\\u5173\\\\u4e8e\\" + }; + var inst = Page(Object(taro_runtime[\\"createPageConfig\\"])(about_Index, \\"pages/about/index\\", {}, config || {})); + } +}, [ [ 18, 0, 1, 3, 2 ] ] ]); + +/** filePath: dist/pages/about/index.json **/ +{\\"navigationBarTitleText\\":\\"关于\\",\\"usingComponents\\":{\\"comp\\":\\"../../comp\\"}} + +/** filePath: dist/pages/about/index.wxml **/ + + + +/** filePath: dist/pages/index/index.js **/ +(wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 9 ], { + 17: function(module, __webpack_exports__, __webpack_require__) { + \\"use strict\\"; + __webpack_require__.r(__webpack_exports__); + var taro_runtime = __webpack_require__(1); + var classCallCheck = __webpack_require__(3); + var createClass = __webpack_require__(4); + var possibleConstructorReturn = __webpack_require__(6); + var getPrototypeOf = __webpack_require__(5); + var inherits = __webpack_require__(7); + var react = __webpack_require__(0); + var taro_components = __webpack_require__(2); + var title = __webpack_require__(8); + var index_Index = function(_Component) { + Object(inherits[\\"a\\"])(Index, _Component); + function Index() { + Object(classCallCheck[\\"a\\"])(this, Index); + return Object(possibleConstructorReturn[\\"a\\"])(this, Object(getPrototypeOf[\\"a\\"])(Index).apply(this, arguments)); + } + Object(createClass[\\"a\\"])(Index, [ { + key: \\"render\\", + value: function render() { + return react[\\"default\\"].createElement(taro_components[\\"View\\"], { + className: \\"index\\" + }, react[\\"default\\"].createElement(title[\\"a\\"], { + title: \\"index\\" + }), react[\\"default\\"].createElement(taro_components[\\"Text\\"], null, \\"Hello world!\\")); + } + } ]); + return Index; + }(react[\\"Component\\"]); + var config = { + navigationBarTitleText: \\"\\\\u9996\\\\u9875\\" + }; + var inst = Page(Object(taro_runtime[\\"createPageConfig\\"])(index_Index, \\"pages/index/index\\", {}, config || {})); + } +}, [ [ 17, 0, 1, 3, 2 ] ] ]); + +/** filePath: dist/pages/index/index.json **/ +{\\"navigationBarTitleText\\":\\"首页\\",\\"usingComponents\\":{\\"comp\\":\\"../../comp\\"}} + +/** filePath: dist/pages/index/index.wxml **/ + + + +/** filePath: dist/runtime.js **/ +(function(modules) { + function webpackJsonpCallback(data) { + var chunkIds = data[0]; + var moreModules = data[1]; + var executeModules = data[2]; + var moduleId, chunkId, i = 0, resolves = []; + for (;i < chunkIds.length; i++) { + chunkId = chunkIds[i]; + if (Object.prototype.hasOwnProperty.call(installedChunks, chunkId) && installedChunks[chunkId]) { + resolves.push(installedChunks[chunkId][0]); + } + installedChunks[chunkId] = 0; + } + for (moduleId in moreModules) { + if (Object.prototype.hasOwnProperty.call(moreModules, moduleId)) { + modules[moduleId] = moreModules[moduleId]; + } + } + if (parentJsonpFunction) parentJsonpFunction(data); + while (resolves.length) { + resolves.shift()(); + } + deferredModules.push.apply(deferredModules, executeModules || []); + return checkDeferredModules(); + } + function checkDeferredModules() { + var result; + for (var i = 0; i < deferredModules.length; i++) { + var deferredModule = deferredModules[i]; + var fulfilled = true; + for (var j = 1; j < deferredModule.length; j++) { + var depId = deferredModule[j]; + if (installedChunks[depId] !== 0) fulfilled = false; + } + if (fulfilled) { + deferredModules.splice(i--, 1); + result = __webpack_require__(__webpack_require__.s = deferredModule[0]); + } + } + return result; + } + var installedModules = {}; + var installedChunks = { + 0: 0 + }; + var deferredModules = []; + function __webpack_require__(moduleId) { + if (installedModules[moduleId]) { + return installedModules[moduleId].exports; + } + var module = installedModules[moduleId] = { + i: moduleId, + l: false, + exports: {} + }; + modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); + module.l = true; + return module.exports; + } + __webpack_require__.m = modules; + __webpack_require__.c = installedModules; + __webpack_require__.d = function(exports, name, getter) { + if (!__webpack_require__.o(exports, name)) { + Object.defineProperty(exports, name, { + enumerable: true, + get: getter + }); + } + }; + __webpack_require__.r = function(exports) { + if (typeof Symbol !== \\"undefined\\" && Symbol.toStringTag) { + Object.defineProperty(exports, Symbol.toStringTag, { + value: \\"Module\\" + }); + } + Object.defineProperty(exports, \\"__esModule\\", { + value: true + }); + }; + __webpack_require__.t = function(value, mode) { + if (mode & 1) value = __webpack_require__(value); + if (mode & 8) return value; + if (mode & 4 && typeof value === \\"object\\" && value && value.__esModule) return value; + var ns = Object.create(null); + __webpack_require__.r(ns); + Object.defineProperty(ns, \\"default\\", { + enumerable: true, + value: value + }); + if (mode & 2 && typeof value != \\"string\\") for (var key in value) __webpack_require__.d(ns, key, function(key) { + return value[key]; + }.bind(null, key)); + return ns; + }; + __webpack_require__.n = function(module) { + var getter = module && module.__esModule ? function getDefault() { + return module[\\"default\\"]; + } : function getModuleExports() { + return module; + }; + __webpack_require__.d(getter, \\"a\\", getter); + return getter; + }; + __webpack_require__.o = function(object, property) { + return Object.prototype.hasOwnProperty.call(object, property); + }; + __webpack_require__.p = \\"/\\"; + var jsonpArray = wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []; + var oldJsonpFunction = jsonpArray.push.bind(jsonpArray); + jsonpArray.push = webpackJsonpCallback; + jsonpArray = jsonpArray.slice(); + for (var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]); + var parentJsonpFunction = oldJsonpFunction; + checkDeferredModules(); +})([]); + +/** filePath: dist/taro.js **/ +(wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 1 ], { + 1: function(module, __webpack_exports__, __webpack_require__) { + \\"use strict\\"; + var _unused_webpack_default_export = \\"taro-runtime-mock\\"; + }, + 2: function(module, __webpack_exports__, __webpack_require__) { + \\"use strict\\"; + var _unused_webpack_default_export = \\"taro-components-mock\\"; + }, + 9: function(module, __webpack_exports__, __webpack_require__) { + \\"use strict\\"; + __webpack_exports__[\\"a\\"] = \\"taro-react-mock\\"; + } +} ]); + +/** filePath: dist/utils.wxs **/ +module.exports = { + a: function (l, n, s) { + var a = [\\"view\\",\\"cover-view\\",\\"block\\",\\"text\\",\\"slot\\",\\"slot-view\\",\\"label\\",\\"form\\",\\"scroll-view\\"] + var b = [\\"slot\\",\\"slot-view\\",\\"label\\",\\"form\\",\\"scroll-view\\"] + if (a.indexOf(n) === -1) { + l = 0 + } + if (b.indexOf(n) > -1) { + var u = s.split(',') + var depth = 0 + for (var i = 0; i < u.length; i++) { + if (u[i] === n) depth++ + } + l = depth + } + return 'tmpl_' + l + '_' + n + }, + b: function (a, b) { + return a === undefined ? b : a + }, + c: function(i, prefix) { + var s = i.focus !== undefined ? 'focus' : 'blur' + return prefix + i.nn + '_' + s + }, + d: function (i, v) { + return i === undefined ? v : i + }, + e: function (n) { + return 'tmpl_' + n + '_container' + }, + f: function (l, n) { + var b = [\\"slot\\",\\"slot-view\\",\\"label\\",\\"form\\",\\"scroll-view\\"] + if (b.indexOf(n) > -1) { + if (l) l += ',' + l += n + } + return l + } +} + +/** filePath: dist/vendors.js **/ +(wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 3 ], [ , , , function(module, __webpack_exports__, __webpack_require__) { + \\"use strict\\"; + __webpack_require__.d(__webpack_exports__, \\"a\\", (function() { + return _classCallCheck; + })); + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError(\\"Cannot call a class as a function\\"); + } + } +}, function(module, __webpack_exports__, __webpack_require__) { + \\"use strict\\"; + __webpack_require__.d(__webpack_exports__, \\"a\\", (function() { + return _createClass; + })); + function _defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if (\\"value\\" in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + function _createClass(Constructor, protoProps, staticProps) { + if (protoProps) _defineProperties(Constructor.prototype, protoProps); + if (staticProps) _defineProperties(Constructor, staticProps); + return Constructor; + } +}, function(module, __webpack_exports__, __webpack_require__) { + \\"use strict\\"; + __webpack_require__.d(__webpack_exports__, \\"a\\", (function() { + return _getPrototypeOf; + })); + function _getPrototypeOf(o) { + _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { + return o.__proto__ || Object.getPrototypeOf(o); + }; + return _getPrototypeOf(o); + } +}, function(module, __webpack_exports__, __webpack_require__) { + \\"use strict\\"; + __webpack_require__.d(__webpack_exports__, \\"a\\", (function() { + return _possibleConstructorReturn; + })); + function _typeof(obj) { + \\"@babel/helpers - typeof\\"; + if (typeof Symbol === \\"function\\" && typeof Symbol.iterator === \\"symbol\\") { + _typeof = function _typeof(obj) { + return typeof obj; + }; + } else { + _typeof = function _typeof(obj) { + return obj && typeof Symbol === \\"function\\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \\"symbol\\" : typeof obj; + }; + } + return _typeof(obj); + } + function _assertThisInitialized(self) { + if (self === void 0) { + throw new ReferenceError(\\"this hasn't been initialised - super() hasn't been called\\"); + } + return self; + } + function _possibleConstructorReturn(self, call) { + if (call && (_typeof(call) === \\"object\\" || typeof call === \\"function\\")) { + return call; + } + return _assertThisInitialized(self); + } +}, function(module, __webpack_exports__, __webpack_require__) { + \\"use strict\\"; + __webpack_require__.d(__webpack_exports__, \\"a\\", (function() { + return _inherits; + })); + function _setPrototypeOf(o, p) { + _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { + o.__proto__ = p; + return o; + }; + return _setPrototypeOf(o, p); + } + function _inherits(subClass, superClass) { + if (typeof superClass !== \\"function\\" && superClass !== null) { + throw new TypeError(\\"Super expression must either be null or a function\\"); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + writable: true, + configurable: true + } + }); + if (superClass) _setPrototypeOf(subClass, superClass); + } +} ] ]); +" +`; diff --git a/packages/taro-mini-runner/src/__tests__/__snapshots__/config.spec.ts.snap b/packages/taro-mini-runner/src/__tests__/__snapshots__/config.spec.ts.snap new file mode 100644 index 000000000000..c826c9f77360 --- /dev/null +++ b/packages/taro-mini-runner/src/__tests__/__snapshots__/config.spec.ts.snap @@ -0,0 +1,7019 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`config should base template loop 20 times 1`] = `16`; + +exports[`config should base template loop 20 times 2`] = ` +" +/** filePath: dist/app.js **/ +require(\\"./runtime\\"); + +require(\\"./common\\"); + +require(\\"./vendors\\"); + +require(\\"./taro\\"); + +(wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 4 ], { + 11: function(module, exports, __webpack_require__) {}, + 14: function(module, __webpack_exports__, __webpack_require__) { + \\"use strict\\"; + __webpack_require__.r(__webpack_exports__); + function _arrayLikeToArray(arr, len) { + if (len == null || len > arr.length) len = arr.length; + for (var i = 0, arr2 = new Array(len); i < len; i++) { + arr2[i] = arr[i]; + } + return arr2; + } + function _arrayWithoutHoles(arr) { + if (Array.isArray(arr)) return _arrayLikeToArray(arr); + } + function _iterableToArray(iter) { + if (typeof Symbol !== \\"undefined\\" && Symbol.iterator in Object(iter)) return Array.from(iter); + } + function _unsupportedIterableToArray(o, minLen) { + if (!o) return; + if (typeof o === \\"string\\") return _arrayLikeToArray(o, minLen); + var n = Object.prototype.toString.call(o).slice(8, -1); + if (n === \\"Object\\" && o.constructor) n = o.constructor.name; + if (n === \\"Map\\" || n === \\"Set\\") return Array.from(o); + if (n === \\"Arguments\\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); + } + function _nonIterableSpread() { + throw new TypeError(\\"Invalid attempt to spread non-iterable instance.\\\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\\"); + } + function _toConsumableArray(arr) { + return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); + } + function _typeof(obj) { + \\"@babel/helpers - typeof\\"; + if (typeof Symbol === \\"function\\" && typeof Symbol.iterator === \\"symbol\\") { + _typeof = function _typeof(obj) { + return typeof obj; + }; + } else { + _typeof = function _typeof(obj) { + return obj && typeof Symbol === \\"function\\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \\"symbol\\" : typeof obj; + }; + } + return _typeof(obj); + } + function _assertThisInitialized(self) { + if (self === void 0) { + throw new ReferenceError(\\"this hasn't been initialised - super() hasn't been called\\"); + } + return self; + } + function _possibleConstructorReturn(self, call) { + if (call && (_typeof(call) === \\"object\\" || typeof call === \\"function\\")) { + return call; + } + return _assertThisInitialized(self); + } + function _getPrototypeOf(o) { + _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { + return o.__proto__ || Object.getPrototypeOf(o); + }; + return _getPrototypeOf(o); + } + function _setPrototypeOf(o, p) { + _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { + o.__proto__ = p; + return o; + }; + return _setPrototypeOf(o, p); + } + function _inherits(subClass, superClass) { + if (typeof superClass !== \\"function\\" && superClass !== null) { + throw new TypeError(\\"Super expression must either be null or a function\\"); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + writable: true, + configurable: true + } + }); + if (superClass) _setPrototypeOf(subClass, superClass); + } + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError(\\"Cannot call a class as a function\\"); + } + } + function _defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if (\\"value\\" in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + function _createClass(Constructor, protoProps, staticProps) { + if (protoProps) _defineProperties(Constructor.prototype, protoProps); + if (staticProps) _defineProperties(Constructor, staticProps); + return Constructor; + } + function isString(o) { + return typeof o === \\"string\\"; + } + function isUndefined(o) { + return typeof o === \\"undefined\\"; + } + function isNull(o) { + return o === null; + } + function isObject(o) { + return o !== null && _typeof(o) === \\"object\\"; + } + function isBoolean(o) { + return o === true || o === false; + } + function isFunction(o) { + return typeof o === \\"function\\"; + } + function isNumber(o) { + return typeof o === \\"number\\"; + } + function isBooleanStringLiteral(o) { + return o === \\"true\\" || o === \\"false\\"; + } + var isArray = Array.isArray; + var styles = { + style: \\"i.\\".concat(\\"st\\"), + class: \\"i.\\".concat(\\"cl\\") + }; + var events = { + bindtap: \\"eh\\" + }; + var touchEvents = { + bindTouchStart: \\"\\", + bindTouchMove: \\"\\", + bindTouchEnd: \\"\\", + bindTouchCancel: \\"\\", + bindLongTap: \\"\\" + }; + var animationEvents = { + bindAnimationStart: \\"\\", + bindAnimationIteration: \\"\\", + bindAnimationEnd: \\"\\", + bindTransitionEnd: \\"\\" + }; + var specialEvents = new Set([ \\"htouchmove\\", \\"vtouchmove\\" ]); + function singleQuote(s) { + return \\"'\\".concat(s, \\"'\\"); + } + var View = Object.assign(Object.assign({ + \\"hover-class\\": singleQuote(\\"none\\"), + \\"hover-stop-propagation\\": \\"false\\", + \\"hover-start-time\\": \\"50\\", + \\"hover-stay-time\\": \\"400\\", + animation: \\"\\" + }, touchEvents), animationEvents); + var Icon = { + type: \\"\\", + size: \\"23\\", + color: \\"\\" + }; + var MapComp = Object.assign({ + longitude: \\"\\", + latitude: \\"\\", + scale: \\"16\\", + markers: \\"[]\\", + covers: \\"\\", + polyline: \\"[]\\", + circles: \\"[]\\", + controls: \\"[]\\", + \\"include-points\\": \\"[]\\", + \\"show-location\\": \\"\\", + \\"layer-style\\": \\"1\\", + bindMarkerTap: \\"\\", + bindControlTap: \\"\\", + bindCalloutTap: \\"\\", + bindUpdated: \\"\\" + }, touchEvents); + var Progress = { + percent: \\"\\", + \\"stroke-width\\": \\"6\\", + color: singleQuote(\\"#09BB07\\"), + activeColor: singleQuote(\\"#09BB07\\"), + backgroundColor: singleQuote(\\"#EBEBEB\\"), + active: \\"false\\", + \\"active-mode\\": singleQuote(\\"backwards\\"), + \\"show-info\\": \\"false\\" + }; + var RichText = { + nodes: \\"[]\\" + }; + var Text = { + selectable: \\"false\\", + space: \\"\\", + decode: \\"false\\" + }; + var Button = { + size: singleQuote(\\"default\\"), + type: \\"\\", + plain: \\"false\\", + disabled: \\"\\", + loading: \\"false\\", + \\"form-type\\": \\"\\", + \\"open-type\\": \\"\\", + \\"hover-class\\": singleQuote(\\"button-hover\\"), + \\"hover-stop-propagation\\": \\"false\\", + \\"hover-start-time\\": \\"20\\", + \\"hover-stay-time\\": \\"70\\", + name: \\"\\" + }; + var Checkbox = { + value: \\"\\", + disabled: \\"\\", + checked: \\"false\\", + color: singleQuote(\\"#09BB07\\"), + name: \\"\\" + }; + var CheckboxGroup = { + bindChange: \\"\\", + name: \\"\\" + }; + var Form = { + \\"report-submit\\": \\"false\\", + bindSubmit: \\"\\", + bindReset: \\"\\", + name: \\"\\" + }; + var Input = { + value: \\"\\", + type: singleQuote(\\"\\"), + password: \\"false\\", + placeholder: \\"\\", + \\"placeholder-style\\": \\"\\", + \\"placeholder-class\\": singleQuote(\\"input-placeholder\\"), + disabled: \\"\\", + maxlength: \\"140\\", + \\"cursor-spacing\\": \\"0\\", + focus: \\"false\\", + \\"confirm-type\\": singleQuote(\\"done\\"), + \\"confirm-hold\\": \\"false\\", + cursor: \\"i.value.length\\", + \\"selection-start\\": \\"-1\\", + \\"selection-end\\": \\"-1\\", + bindInput: \\"\\", + bindFocus: \\"\\", + bindBlur: \\"\\", + bindConfirm: \\"\\", + name: \\"\\" + }; + var Label = { + for: \\"\\", + name: \\"\\" + }; + var Picker = { + mode: singleQuote(\\"selector\\"), + disabled: \\"\\", + range: \\"\\", + \\"range-key\\": \\"\\", + value: \\"\\", + start: \\"\\", + end: \\"\\", + fields: singleQuote(\\"day\\"), + \\"custom-item\\": \\"\\", + name: \\"\\", + bindCancel: \\"\\", + bindChange: \\"\\", + bindColumnChange: \\"\\" + }; + var PickerView = { + value: \\"\\", + \\"indicator-style\\": \\"\\", + \\"indicator-class\\": \\"\\", + \\"mask-style\\": \\"\\", + \\"mask-class\\": \\"\\", + bindChange: \\"\\", + name: \\"\\" + }; + var PickerViewColumn = { + name: \\"\\" + }; + var Radio = { + value: \\"\\", + checked: \\"false\\", + disabled: \\"\\", + color: singleQuote(\\"#09BB07\\"), + name: \\"\\" + }; + var RadioGroup = { + bindChange: \\"\\", + name: \\"\\" + }; + var Slider = { + min: \\"0\\", + max: \\"100\\", + step: \\"1\\", + disabled: \\"\\", + value: \\"0\\", + activeColor: singleQuote(\\"#1aad19\\"), + backgroundColor: singleQuote(\\"#e9e9e9\\"), + \\"block-size\\": \\"28\\", + \\"block-color\\": singleQuote(\\"#ffffff\\"), + \\"show-value\\": \\"false\\", + bindChange: \\"\\", + bindChanging: \\"\\", + name: \\"\\" + }; + var Switch = { + checked: \\"false\\", + disabled: \\"\\", + type: singleQuote(\\"switch\\"), + color: singleQuote(\\"#04BE02\\"), + bindChange: \\"\\", + name: \\"\\" + }; + var Textarea = { + value: \\"\\", + placeholder: \\"\\", + \\"placeholder-style\\": \\"\\", + \\"placeholder-class\\": singleQuote(\\"textarea-placeholder\\"), + disabled: \\"\\", + maxlength: \\"140\\", + \\"auto-focus\\": \\"false\\", + focus: \\"false\\", + \\"auto-height\\": \\"false\\", + fixed: \\"false\\", + \\"cursor-spacing\\": \\"0\\", + cursor: \\"-1\\", + \\"selection-start\\": \\"-1\\", + \\"selection-end\\": \\"-1\\", + bindFocus: \\"\\", + bindBlur: \\"\\", + bindLineChange: \\"\\", + bindInput: \\"\\", + bindConfirm: \\"\\", + name: \\"\\" + }; + var CoverImage = { + src: \\"\\", + bindLoad: \\"eh\\", + bindError: \\"eh\\" + }; + var CoverView = Object.assign({ + \\"scroll-top\\": \\"false\\" + }, touchEvents); + var MovableArea = { + \\"scale-area\\": \\"false\\" + }; + var MovableView = Object.assign(Object.assign({ + direction: \\"none\\", + inertia: \\"false\\", + \\"out-of-bounds\\": \\"false\\", + x: \\"\\", + y: \\"\\", + damping: \\"20\\", + friction: \\"2\\", + disabled: \\"\\", + scale: \\"false\\", + \\"scale-min\\": \\"0.5\\", + \\"scale-max\\": \\"10\\", + \\"scale-value\\": \\"1\\", + animation: \\"true\\", + bindChange: \\"\\", + bindScale: \\"\\", + htouchmove: \\"\\", + vtouchmove: \\"\\", + width: singleQuote(\\"10px\\"), + height: singleQuote(\\"10px\\") + }, touchEvents), animationEvents); + var ScrollView = Object.assign(Object.assign({ + \\"scroll-x\\": \\"false\\", + \\"scroll-y\\": \\"false\\", + \\"upper-threshold\\": \\"50\\", + \\"lower-threshold\\": \\"50\\", + \\"scroll-top\\": \\"\\", + \\"scroll-left\\": \\"\\", + \\"scroll-into-view\\": \\"\\", + \\"scroll-with-animation\\": \\"false\\", + \\"enable-back-to-top\\": \\"false\\", + bindScrollToUpper: \\"\\", + bindScrollToLower: \\"\\", + bindScroll: \\"\\" + }, touchEvents), animationEvents); + var Swiper = Object.assign({ + \\"indicator-dots\\": \\"false\\", + \\"indicator-color\\": singleQuote(\\"rgba(0, 0, 0, .3)\\"), + \\"indicator-active-color\\": singleQuote(\\"#000000\\"), + autoplay: \\"false\\", + current: \\"0\\", + interval: \\"5000\\", + duration: \\"500\\", + circular: \\"false\\", + vertical: \\"false\\", + \\"previous-margin\\": \\"'0px'\\", + \\"next-margin\\": \\"'0px'\\", + \\"display-multiple-items\\": \\"1\\", + bindChange: \\"\\", + bindTransition: \\"\\", + bindAnimationFinish: \\"\\" + }, touchEvents); + var SwiperItem = { + \\"item-id\\": \\"\\" + }; + var Navigator = { + url: \\"\\", + \\"open-type\\": singleQuote(\\"navigate\\"), + delta: \\"1\\", + \\"hover-class\\": singleQuote(\\"navigator-hover\\"), + \\"hover-stop-propagation\\": \\"false\\", + \\"hover-start-time\\": \\"50\\", + \\"hover-stay-time\\": \\"600\\", + bindSuccess: \\"\\", + bindFail: \\"\\", + bindComplete: \\"\\" + }; + var Audio = { + id: \\"\\", + src: \\"\\", + loop: \\"false\\", + controls: \\"false\\", + poster: \\"\\", + name: \\"\\", + author: \\"\\", + bindError: \\"\\", + bindPlay: \\"\\", + bindPause: \\"\\", + bindTimeUpdate: \\"\\", + bindEnded: \\"\\" + }; + var Camera = { + \\"device-position\\": singleQuote(\\"back\\"), + flash: singleQuote(\\"auto\\"), + bindStop: \\"\\", + bindError: \\"\\" + }; + var Image = Object.assign({ + src: \\"\\", + mode: singleQuote(\\"scaleToFill\\"), + \\"lazy-load\\": \\"false\\", + bindError: \\"\\", + bindLoad: \\"\\" + }, touchEvents); + var LivePlayer = { + src: \\"\\", + autoplay: \\"false\\", + muted: \\"false\\", + orientation: singleQuote(\\"vertical\\"), + \\"object-fit\\": singleQuote(\\"contain\\"), + \\"background-mute\\": \\"false\\", + \\"min-cache\\": \\"1\\", + \\"max-cache\\": \\"3\\", + animation: \\"\\", + bindStateChange: \\"\\", + bindFullScreenChange: \\"\\", + bindNetStatus: \\"\\" + }; + var Video = { + src: \\"\\", + duration: \\"\\", + controls: \\"true\\", + \\"danmu-list\\": \\"\\", + \\"danmu-btn\\": \\"\\", + \\"enable-danmu\\": \\"\\", + autoplay: \\"false\\", + loop: \\"false\\", + muted: \\"false\\", + \\"initial-time\\": \\"0\\", + \\"page-gesture\\": \\"false\\", + direction: \\"\\", + \\"show-progress\\": \\"true\\", + \\"show-fullscreen-btn\\": \\"true\\", + \\"show-play-btn\\": \\"true\\", + \\"show-center-play-btn\\": \\"true\\", + \\"enable-progress-gesture\\": \\"true\\", + \\"object-fit\\": singleQuote(\\"contain\\"), + poster: \\"\\", + \\"show-mute-btn\\": \\"false\\", + animation: \\"\\", + bindPlay: \\"\\", + bindPause: \\"\\", + bindEnded: \\"\\", + bindTimeUpdate: \\"\\", + bindFullScreenChange: \\"\\", + bindWaiting: \\"\\", + bindError: \\"\\" + }; + var Canvas = Object.assign({ + \\"canvas-id\\": \\"\\", + \\"disable-scroll\\": \\"false\\", + bindError: \\"\\" + }, touchEvents); + var Ad = { + \\"unit-id\\": \\"\\", + \\"ad-intervals\\": \\"\\", + bindLoad: \\"\\", + bindError: \\"\\", + bindClose: \\"\\" + }; + var WebView = { + src: \\"\\", + bindMessage: \\"\\", + bindLoad: \\"\\", + bindError: \\"\\" + }; + var Block = {}; + var SlotView = { + name: \\"\\" + }; + var Slot = { + name: \\"\\" + }; + var internalComponents = { + View: View, + Icon: Icon, + Progress: Progress, + RichText: RichText, + Text: Text, + Button: Button, + Checkbox: Checkbox, + CheckboxGroup: CheckboxGroup, + Form: Form, + Input: Input, + Label: Label, + Picker: Picker, + PickerView: PickerView, + PickerViewColumn: PickerViewColumn, + Radio: Radio, + RadioGroup: RadioGroup, + Slider: Slider, + Switch: Switch, + CoverImage: CoverImage, + Textarea: Textarea, + CoverView: CoverView, + MovableArea: MovableArea, + MovableView: MovableView, + ScrollView: ScrollView, + Swiper: Swiper, + SwiperItem: SwiperItem, + Navigator: Navigator, + Audio: Audio, + Camera: Camera, + Image: Image, + LivePlayer: LivePlayer, + Video: Video, + Canvas: Canvas, + Ad: Ad, + WebView: WebView, + Block: Block, + Map: MapComp, + Slot: Slot, + SlotView: SlotView + }; + var controlledComponent = new Set([ \\"input\\", \\"checkbox\\", \\"picker\\", \\"picker-view\\", \\"radio\\", \\"slider\\", \\"switch\\", \\"textarea\\" ]); + var focusComponents = new Set([ \\"input\\", \\"textarea\\" ]); + var voidElements = new Set([ \\"progress\\", \\"icon\\", \\"rich-text\\", \\"input\\", \\"textarea\\", \\"slider\\", \\"switch\\", \\"audio\\", \\"live-pusher\\", \\"video\\", \\"ad\\", \\"official-account\\", \\"open-data\\", \\"navigation-bar\\" ]); + var nestElements = new Map([ [ \\"view\\", -1 ], [ \\"cover-view\\", -1 ], [ \\"block\\", -1 ], [ \\"text\\", -1 ], [ \\"slot\\", 8 ], [ \\"slot-view\\", 8 ], [ \\"label\\", 6 ], [ \\"form\\", 4 ], [ \\"scroll-view\\", 4 ] ]); + var EMPTY_OBJ = {}; + var EMPTY_ARR = []; + var noop = function noop() {}; + var defaultReconciler = {}; + var box = function box(v) { + return { + v: v + }; + }; + var unbox = function unbox(b) { + return b.v; + }; + function toDashed(s) { + return s.replace(/([a-z0-9])([A-Z])/g, \\"$1-$2\\").toLowerCase(); + } + function toCamelCase(s) { + var camel = \\"\\"; + var nextCap = false; + for (var i = 0; i < s.length; i++) { + if (s[i] !== \\"-\\") { + camel += nextCap ? s[i].toUpperCase() : s[i]; + nextCap = false; + } else { + nextCap = true; + } + } + return camel; + } + function capitalize(s) { + return s.charAt(0).toUpperCase() + s.slice(1); + } + var shared_esm_hasOwnProperty = Object.prototype.hasOwnProperty; + var hasOwn = function hasOwn(val, key) { + return shared_esm_hasOwnProperty.call(val, key); + }; + var reportIssue = \\"\\\\u5982\\\\u6709\\\\u7591\\\\u95ee\\\\uff0c\\\\u8bf7\\\\u63d0\\\\u4ea4 issue \\\\u81f3\\\\uff1ahttps://github.com/nervjs/taro/issues\\"; + function ensure(condition, msg) { + if (!condition) { + throw new Error(msg + \\"\\\\n\\" + reportIssue); + } + } + function warn(condition, msg) { + if (false) {} + } + function queryToJson(str) { + var dec = decodeURIComponent; + var qp = str.split(\\"&\\"); + var ret = {}; + var name; + var val; + for (var i = 0, l = qp.length, item; i < l; ++i) { + item = qp[i]; + if (item.length) { + var s = item.indexOf(\\"=\\"); + if (s < 0) { + name = dec(item); + val = \\"\\"; + } else { + name = dec(item.slice(0, s)); + val = dec(item.slice(s + 1)); + } + if (typeof ret[name] === \\"string\\") { + ret[name] = [ ret[name] ]; + } + if (Array.isArray(ret[name])) { + ret[name].push(val); + } else { + ret[name] = val; + } + } + } + return ret; + } + var _uniqueId = 1; + var _loadTime = (new Date).getTime().toString(); + function getUniqueKey() { + return _loadTime + _uniqueId++; + } + var cacheData = {}; + function cacheDataSet(key, val) { + cacheData[key] = val; + } + function cacheDataGet(key, delelteAfterGet) { + var temp = cacheData[key]; + delelteAfterGet && delete cacheData[key]; + return temp; + } + function cacheDataHas(key) { + return key in cacheData; + } + function mergeInternalComponents(components) { + Object.keys(components).forEach((function(name) { + if (name in internalComponents) { + Object.assign(internalComponents[name], components[name]); + } else { + internalComponents[name] = components[name]; + } + })); + } + function mergeReconciler(hostConfig) { + Object.assign(defaultReconciler, hostConfig); + } + var weixinAdapter = { + if: \\"wx:if\\", + else: \\"wx:else\\", + elseif: \\"wx:elif\\", + for: \\"wx:for\\", + forItem: \\"wx:for-item\\", + forIndex: \\"wx:for-index\\", + key: \\"wx:key\\", + xs: \\"wxs\\", + type: \\"weapp\\" + }; + var shared_esm_BaseTemplate = function() { + function BaseTemplate() { + var _this = this; + _classCallCheck(this, BaseTemplate); + this.exportExpr = \\"module.exports =\\"; + this.supportXS = false; + this.Adapter = weixinAdapter; + this.internalComponents = internalComponents; + this.focusComponents = focusComponents; + this.voidElements = voidElements; + this.nestElements = nestElements; + this.buildPageTemplate = function(baseTempPath) { + var template = ' \\\\n'); + return template; + }; + this.buildBaseComponentTemplate = function(ext) { + var data = !_this.isSupportRecursive && _this.supportXS ? _this.dataKeymap(\\"i:i,l:l\\") : _this.dataKeymap(\\"i:i\\"); + return ' \\\\n'); + }; + this.buildXScript = function() { + return \\"\\".concat(_this.exportExpr, \\" {\\\\n a: \\").concat(_this.buildXSTmplName(), \\",\\\\n b: function (a, b) {\\\\n return a === undefined ? b : a\\\\n },\\\\n c: function(i, prefix) {\\\\n var s = i.focus !== undefined ? 'focus' : 'blur'\\\\n return prefix + i.\\", \\"nn\\", \\" + '_' + s\\\\n },\\\\n d: function (i, v) {\\\\n return i === undefined ? v : i\\\\n },\\\\n e: function (n) {\\\\n return 'tmpl_' + n + '_\\", \\"container\\", \\"'\\\\n },\\\\n \\").concat(_this.buildXSTmpExtra(), \\"\\\\n}\\"); + }; + } + _createClass(BaseTemplate, [ { + key: \\"buildAttribute\\", + value: function buildAttribute(attrs, nodeName) { + var _this2 = this; + return Object.keys(attrs).map((function(k) { + return \\"\\".concat(k, '=\\"').concat(k.startsWith(\\"bind\\") || k.startsWith(\\"on\\") ? attrs[k] : \\"{\\".concat(_this2.getAttrValue(attrs[k], k, nodeName), \\"}\\"), '\\" '); + })).join(\\"\\"); + } + }, { + key: \\"replacePropName\\", + value: function replacePropName(name, value, _componentName) { + if (value === \\"eh\\") return name.toLowerCase(); + return name; + } + }, { + key: \\"createMiniComponents\\", + value: function createMiniComponents(components) { + var result = Object.create(null); + for (var key in components) { + if (hasOwn(components, key)) { + var component = components[key]; + var compName = toDashed(key); + var newComp = Object.create(null); + if (isFunction(this.modifyCompProps)) { + component = this.modifyCompProps(compName, component); + } + for (var prop in component) { + if (hasOwn(component, prop)) { + var propValue = component[prop]; + if (prop.startsWith(\\"bind\\") || specialEvents.has(prop)) { + propValue = \\"eh\\"; + } else if (propValue === \\"\\") { + propValue = \\"i.\\".concat(toCamelCase(prop)); + } else if (isBooleanStringLiteral(propValue) || isNumber(+propValue)) { + propValue = this.supportXS ? \\"xs.b(i.\\".concat(toCamelCase(prop), \\",\\").concat(propValue, \\")\\") : \\"i.\\".concat(toCamelCase(prop), \\"===undefined?\\").concat(propValue, \\":i.\\").concat(toCamelCase(prop)); + } else { + propValue = \\"i.\\".concat(toCamelCase(prop), \\"||\\").concat(propValue || singleQuote(\\"\\")); + } + prop = this.replacePropName(prop, propValue, compName); + newComp[prop] = propValue; + } + } + if (compName !== \\"block\\") { + Object.assign(newComp, styles, this.getEvents()); + } + if (compName === \\"swiper-item\\") { + delete newComp.style; + } + if (compName === \\"slot\\" || compName === \\"slot-view\\") { + result[compName] = { + slot: \\"i.name\\" + }; + } else { + result[compName] = newComp; + } + } + } + return result; + } + }, { + key: \\"buildBaseTemplate\\", + value: function buildBaseTemplate() { + var Adapter = this.Adapter; + var data = !this.isSupportRecursive && this.supportXS ? \\"\\".concat(this.dataKeymap(\\"i:item,l:''\\")) : this.dataKeymap(\\"i:item\\"); + return \\"\\".concat(this.buildXsTemplate(), '\\\\n\\\\n \\\\n \\\\n \\\\n\\\\n'); + } + }, { + key: \\"buildThirdPartyAttr\\", + value: function buildThirdPartyAttr(attrs) { + return Array.from(attrs).reduce((function(str, attr) { + if (attr.startsWith(\\"@\\")) { + return str + \\"bind\\".concat(attr.slice(1), '=\\"eh\\" '); + } else if (attr.startsWith(\\"bind\\")) { + return str + \\"\\".concat(attr, '=\\"eh\\" '); + } else if (attr.startsWith(\\"on\\")) { + return str + \\"bind\\".concat(attr.slice(2).toLowerCase(), '=\\"eh\\" '); + } + return str + \\"\\".concat(attr, '=\\"{{i.').concat(toCamelCase(attr), '}}\\" '); + }), \\"\\"); + } + }, { + key: \\"buildComponentTemplate\\", + value: function buildComponentTemplate(comp, level) { + return this.focusComponents.has(comp.nodeName) ? this.buildFocusComponentTemplte(comp, level) : this.buildStandardComponentTemplate(comp, level); + } + }, { + key: \\"buildFocusComponentTemplte\\", + value: function buildFocusComponentTemplte(comp, level) { + var attrs = Object.assign({}, comp.attributes); + var templateName = this.supportXS ? \\"xs.c(i, 'tmpl_\\".concat(level, \\"_')\\") : \\"i.focus ? 'tmpl_\\".concat(level, \\"_\\").concat(comp.nodeName, \\"_focus' : 'tmpl_\\").concat(level, \\"_\\").concat(comp.nodeName, \\"_blur'\\"); + delete attrs.focus; + return '\\\\n\\\\n \\\\n\\\\n\\\\n\\\\n <').concat(comp.nodeName, \\" \\").concat(this.buildAttribute(comp.attributes, comp.nodeName), ' id=\\"{{i.uid}}\\" />\\\\n\\\\n\\\\n\\\\n <').concat(comp.nodeName, \\" \\").concat(this.buildAttribute(attrs, comp.nodeName), ' id=\\"{{i.uid}}\\" />\\\\n\\\\n'); + } + }, { + key: \\"buildStandardComponentTemplate\\", + value: function buildStandardComponentTemplate(comp, level) { + var isSupportRecursive = this.isSupportRecursive, Adapter = this.Adapter; + var nextLevel = isSupportRecursive ? 0 : level + 1; + var data = !this.isSupportRecursive ? \\"\\".concat(this.dataKeymap(\\"i:item,l:l\\")) : this.dataKeymap(\\"i:item\\"); + var child = this.supportXS ? '') : ''); + if (isFunction(this.modifyLoopBody)) { + child = this.modifyLoopBody(child, comp.nodeName); + } + var children = this.voidElements.has(comp.nodeName) ? \\"\\" : \\"\\\\n\\\\n ').concat(child, \\"\\\\n \\\\n \\"); + if (isFunction(this.modifyLoopContainer)) { + children = this.modifyLoopContainer(children, comp.nodeName); + } + var nodeName = comp.nodeName === \\"slot\\" || comp.nodeName === \\"slot-view\\" ? \\"view\\" : comp.nodeName; + var res = '\\\\n\\\\n <').concat(nodeName, \\" \\").concat(this.buildAttribute(comp.attributes, comp.nodeName), ' id=\\"{{i.uid}}\\">').concat(children, \\"\\").concat(nodeName, \\">\\\\n\\\\n\\"); + if (isFunction(this.modifyTemplateResult)) { + res = this.modifyTemplateResult(res, comp.nodeName, level, children); + } + return res; + } + }, { + key: \\"buildPlainTextTemplate\\", + value: function buildPlainTextTemplate(level) { + return '\\\\n\\\\n{{i.', \\"v\\", \\"}} \\\\n\\\\n\\"); + } + }, { + key: \\"buildThirdPartyTemplate\\", + value: function buildThirdPartyTemplate(level, componentConfig) { + var _this3 = this; + var Adapter = this.Adapter, isSupportRecursive = this.isSupportRecursive; + var nextLevel = isSupportRecursive ? 0 : level + 1; + var template = \\"\\"; + var data = !this.isSupportRecursive && this.supportXS ? \\"\\".concat(this.dataKeymap(\\"i:item,l:l\\")) : this.dataKeymap(\\"i:item\\"); + componentConfig.thirdPartyComponents.forEach((function(attrs, compName) { + template += '\\\\n\\\\n <').concat(compName, \\" \\").concat(_this3.buildThirdPartyAttr(attrs), ' id=\\"{{i.uid}}\\">\\\\n\\\\n \\\\n \\\\n ').concat(compName, \\">\\\\n\\\\n \\"); + })); + return template; + } + }, { + key: \\"buildContainerTemplate\\", + value: function buildContainerTemplate(level) { + var restart = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; + var tmpl = \\"\\"; + if (restart) { + if (!this.isSupportRecursive && this.supportXS) { + tmpl = ''; + } else { + tmpl = ' '; + } + } else { + var xs = !this.isSupportRecursive ? \\"xs.a(\\".concat(level, \\", i.\\", \\"nn\\", \\", l)\\") : \\"xs.a(\\".concat(level, \\", i.\\", \\"nn\\", \\")\\"); + var data = !this.isSupportRecursive ? \\"\\".concat(this.dataKeymap(\\"i:i,cid:\\".concat(level, \\",l:xs.f(l,i.\\", \\"nn\\", \\")\\"))) : \\"\\".concat(this.dataKeymap(\\"i:i\\")); + tmpl = this.supportXS ? '') : \\"'); + } + return '\\\\n\\\\n ').concat(tmpl, \\"\\\\n\\\\n\\"); + } + }, { + key: \\"dataKeymap\\", + value: function dataKeymap(keymap) { + return keymap; + } + }, { + key: \\"getEvents\\", + value: function getEvents() { + return events; + } + }, { + key: \\"getAttrValue\\", + value: function getAttrValue(value, _key, _nodeName) { + return \\"{\\".concat(value, \\"}\\"); + } + }, { + key: \\"buildXsTemplate\\", + value: function buildXsTemplate() { + return \\"\\"; + } + }, { + key: \\"mergeComponents\\", + value: function mergeComponents(ctx, patch) { + ctx.helper.recursiveMerge(this.internalComponents, patch); + } + }, { + key: \\"buildXSTmplName\\", + value: function buildXSTmplName() { + return \\"function (l, n) {\\\\n return 'tmpl_' + l + '_' + n\\\\n }\\"; + } + }, { + key: \\"buildXSTmpExtra\\", + value: function buildXSTmpExtra() { + return \\"\\"; + } + } ]); + return BaseTemplate; + }(); + var shared_esm_RecursiveTemplate = function(_BaseTemplate) { + _inherits(RecursiveTemplate, _BaseTemplate); + function RecursiveTemplate() { + var _this4; + _classCallCheck(this, RecursiveTemplate); + _this4 = _possibleConstructorReturn(this, _getPrototypeOf(RecursiveTemplate).apply(this, arguments)); + _this4.isSupportRecursive = true; + _this4.buildTemplate = function(componentConfig) { + var template = _this4.buildBaseTemplate(); + if (!_this4.miniComponents) { + _this4.miniComponents = _this4.createMiniComponents(_this4.internalComponents); + } + var ZERO_FLOOR = 0; + var components = Object.keys(_this4.miniComponents).filter((function(c) { + return componentConfig.includes.size && !componentConfig.includeAll ? componentConfig.includes.has(c) : true; + })); + template = components.reduce((function(current, nodeName) { + var attributes = _this4.miniComponents[nodeName]; + return current + _this4.buildComponentTemplate({ + nodeName: nodeName, + attributes: attributes + }, ZERO_FLOOR); + }), template); + template += _this4.buildPlainTextTemplate(ZERO_FLOOR); + template += _this4.buildThirdPartyTemplate(ZERO_FLOOR, componentConfig); + template += _this4.buildContainerTemplate(ZERO_FLOOR); + return template; + }; + return _this4; + } + return RecursiveTemplate; + }(shared_esm_BaseTemplate); + var shared_esm_UnRecursiveTemplate = function(_BaseTemplate2) { + _inherits(UnRecursiveTemplate, _BaseTemplate2); + function UnRecursiveTemplate() { + var _this5; + _classCallCheck(this, UnRecursiveTemplate); + _this5 = _possibleConstructorReturn(this, _getPrototypeOf(UnRecursiveTemplate).apply(this, arguments)); + _this5.isSupportRecursive = false; + _this5._baseLevel = 16; + _this5.buildTemplate = function(componentConfig) { + _this5.componentConfig = componentConfig; + if (!_this5.miniComponents) { + _this5.miniComponents = _this5.createMiniComponents(_this5.internalComponents); + } + var components = Object.keys(_this5.miniComponents).filter((function(c) { + return componentConfig.includes.size && !componentConfig.includeAll ? componentConfig.includes.has(c) : true; + })); + var template = _this5.buildBaseTemplate(); + for (var i = 0; i < _this5.baseLevel; i++) { + template += _this5.supportXS ? _this5.buildOptimizeFloor(i, components, _this5.baseLevel === i + 1) : _this5.buildFloor(i, components, _this5.baseLevel === i + 1); + } + return template; + }; + return _this5; + } + _createClass(UnRecursiveTemplate, [ { + key: \\"buildFloor\\", + value: function buildFloor(level, components) { + var _this6 = this; + var restart = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; + if (restart) return this.buildContainerTemplate(level, restart); + var template = components.reduce((function(current, nodeName) { + var attributes = _this6.miniComponents[nodeName]; + return current + _this6.buildComponentTemplate({ + nodeName: nodeName, + attributes: attributes + }, level); + }), \\"\\"); + template += this.buildPlainTextTemplate(level); + template += this.buildThirdPartyTemplate(level, this.componentConfig); + template += this.buildContainerTemplate(level, restart); + return template; + } + }, { + key: \\"buildOptimizeFloor\\", + value: function buildOptimizeFloor(level, components) { + var _this7 = this; + var restart = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; + if (restart) return this.buildContainerTemplate(level, restart); + var template = components.reduce((function(current, nodeName) { + if (level !== 0) { + if (!_this7.nestElements.has(nodeName)) { + return current; + } else { + var max = _this7.nestElements.get(nodeName); + if (max > 0 && level >= max) { + return current; + } + } + } + var attributes = _this7.miniComponents[nodeName]; + return current + _this7.buildComponentTemplate({ + nodeName: nodeName, + attributes: attributes + }, level); + }), \\"\\"); + if (level === 0) template += this.buildPlainTextTemplate(level); + template += this.buildThirdPartyTemplate(level, this.componentConfig); + template += this.buildContainerTemplate(level); + return template; + } + }, { + key: \\"buildXSTmplName\\", + value: function buildXSTmplName() { + var comps = [].concat(_toConsumableArray(Array.from(this.nestElements.keys())), _toConsumableArray(Array.from(this.componentConfig.thirdPartyComponents.keys()))); + var hasMaxComps = []; + this.nestElements.forEach((function(max, comp) { + if (max > -1) hasMaxComps.push(comp); + })); + return \\"function (l, n, s) {\\\\n var a = \\".concat(JSON.stringify(comps), \\"\\\\n var b = \\").concat(JSON.stringify(hasMaxComps), \\"\\\\n if (a.indexOf(n) === -1) {\\\\n l = 0\\\\n }\\\\n if (b.indexOf(n) > -1) {\\\\n var u = s.split(',')\\\\n var depth = 0\\\\n for (var i = 0; i < u.length; i++) {\\\\n if (u[i] === n) depth++\\\\n }\\\\n l = depth\\\\n }\\\\n return 'tmpl_' + l + '_' + n\\\\n }\\"); + } + }, { + key: \\"buildXSTmpExtra\\", + value: function buildXSTmpExtra() { + var hasMaxComps = []; + this.nestElements.forEach((function(max, comp) { + if (max > -1) hasMaxComps.push(comp); + })); + return \\"f: function (l, n) {\\\\n var b = \\".concat(JSON.stringify(hasMaxComps), \\"\\\\n if (b.indexOf(n) > -1) {\\\\n if (l) l += ','\\\\n l += n\\\\n }\\\\n return l\\\\n }\\"); + } + }, { + key: \\"baseLevel\\", + set: function set(lv) { + this._baseLevel = lv; + }, + get: function get() { + return this._baseLevel; + } + } ]); + return UnRecursiveTemplate; + }(shared_esm_BaseTemplate); + var _onAndSyncApis = new Set([ \\"getAccountInfoSync\\", \\"getEnterOptionsSync\\", \\"offBLEPeripheralConnectionStateChanged\\", \\"offBeaconServiceChange\\", \\"offBeaconUpdate\\", \\"offDeviceMotionChange\\", \\"offHCEMessage\\", \\"offKeyboardHeightChange\\", \\"offLocalServiceDiscoveryStop\\", \\"offLocalServiceFound\\", \\"offLocalServiceLost\\", \\"offLocalServiceResolveFail\\", \\"offLocationChange\\", \\"offThemeChange\\", \\"offVoIPChatInterrupted\\", \\"offVoIPChatMembersChanged\\", \\"offVoIPVideoMembersChanged\\", \\"offWifiConnected\\", \\"offWindowResize\\", \\"onBLEPeripheralConnectionStateChanged\\", \\"onBackgroundAudioPause\\", \\"onBackgroundAudioPlay\\", \\"onBackgroundAudioStop\\", \\"onBackgroundFetchData\\", \\"onHCEMessage\\", \\"onKeyboardHeightChange\\", \\"onLocalServiceDiscoveryStop\\", \\"onLocalServiceFound\\", \\"onLocalServiceLost\\", \\"onLocalServiceResolveFail\\", \\"onLocationChange\\", \\"onThemeChange\\", \\"onVoIPChatInterrupted\\", \\"onVoIPChatMembersChanged\\", \\"onVoIPChatSpeakersChanged\\", \\"onVoIPVideoMembersChanged\\", \\"onWifiConnected\\", \\"onWindowResize\\", \\"reportMonitor\\" ]); + var _noPromiseApis = new Set([ \\"createAudioContext\\", \\"createLivePusherContext\\", \\"createMediaContainer\\", \\"createMediaRecorder\\", \\"createOffscreenCanvas\\", \\"createRewardedVideoAd\\", \\"createUDPSocket\\", \\"createVideoDecoder\\", \\"createWorker\\", \\"getLogManager\\", \\"getNFCAdapter\\", \\"getPerformance\\", \\"getRealtimeLogManager\\", \\"pauseBackgroundAudio\\", \\"pauseVoice\\", \\"reportPerformance\\", \\"stopBackgroundAudio\\", \\"stopRecord\\", \\"stopVoice\\" ]); + var _otherApis = new Set([ \\"addCard\\", \\"authPrivateMessage\\", \\"checkIsOpenAccessibility\\", \\"checkIsSoterEnrolledInDevice\\", \\"checkIsSupportSoterAuthentication\\", \\"chooseInvoice\\", \\"chooseMedia\\", \\"chooseMessageFile\\", \\"compressVideo\\", \\"connectWifi\\", \\"createBLEPeripheralServer\\", \\"disableAlertBeforeUnload\\", \\"enableAlertBeforeUnload\\", \\"exitVoIPChat\\", \\"getBLEDeviceRSSI\\", \\"getBackgroundAudioPlayerState\\", \\"getBackgroundFetchData\\", \\"getBackgroundFetchToken\\", \\"getGroupEnterInfo\\", \\"getHCEState\\", \\"getSelectedTextRange\\", \\"getShareInfo\\", \\"getVideoInfo\\", \\"getWeRunData\\", \\"join1v1Chat\\", \\"joinVoIPChat\\", \\"makeBluetoothPair\\", \\"openCard\\", \\"openVideoEditor\\", \\"playBackgroundAudio\\", \\"playVoice\\", \\"previewMedia\\", \\"requestPayment\\", \\"saveFileToDisk\\", \\"scanItem\\", \\"seekBackgroundAudio\\", \\"sendHCEMessage\\", \\"setBLEMTU\\", \\"setBackgroundFetchToken\\", \\"setEnable1v1Chat\\", \\"setTopBarText\\", \\"setWifiList\\", \\"setWindowSize\\", \\"showRedPackage\\", \\"startGyroscope\\", \\"startHCE\\", \\"startLocalServiceDiscovery\\", \\"startLocationUpdate\\", \\"startLocationUpdateBackground\\", \\"startRecord\\", \\"startSoterAuthentication\\", \\"startWifi\\", \\"stopGyroscope\\", \\"stopHCE\\", \\"stopLocalServiceDiscovery\\", \\"stopLocationUpdate\\", \\"stopWifi\\", \\"subscribeVoIPVideoMembers\\", \\"updateShareMenu\\", \\"updateVoIPChatMuteConfig\\", \\"updateWeChatApp\\" ]); + var RequestQueue = { + MAX_REQUEST: 5, + queue: [], + request: function request(options) { + this.push(options); + return this.run(); + }, + push: function push(options) { + this.queue.push(options); + }, + run: function run() { + var _this = this; + if (!this.queue.length) { + return; + } + if (this.queue.length <= this.MAX_REQUEST) { + var options = this.queue.shift(); + var completeFn = options.complete; + options.complete = function() { + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + completeFn && completeFn.apply(options, args); + _this.run(); + }; + return wx.request(options); + } + } + }; + function taroInterceptor(chain) { + return request(chain.requestParams); + } + function request(options) { + options = options || {}; + if (typeof options === \\"string\\") { + options = { + url: options + }; + } + var originSuccess = options.success; + var originFail = options.fail; + var originComplete = options.complete; + var requestTask; + var p = new Promise((function(resolve, reject) { + options.success = function(res) { + originSuccess && originSuccess(res); + resolve(res); + }; + options.fail = function(res) { + originFail && originFail(res); + reject(res); + }; + options.complete = function(res) { + originComplete && originComplete(res); + }; + requestTask = RequestQueue.request(options); + })); + p.abort = function(cb) { + cb && cb(); + if (requestTask) { + requestTask.abort(); + } + return p; + }; + return p; + } + function processApis(taro) { + var onAndSyncApis = new Set([].concat(_toConsumableArray(taro.onAndSyncApis), _toConsumableArray(_onAndSyncApis))); + var noPromiseApis = new Set([].concat(_toConsumableArray(taro.noPromiseApis), _toConsumableArray(_noPromiseApis))); + var otherApis = new Set([].concat(_toConsumableArray(taro.otherApis), _toConsumableArray(_otherApis))); + var apis = [].concat(_toConsumableArray(onAndSyncApis), _toConsumableArray(noPromiseApis), _toConsumableArray(otherApis)); + var useDataCacheApis = { + navigateTo: true, + redirectTo: true, + reLaunch: true + }; + var routerParamsPrivateKey = \\"__key_\\"; + var preloadPrivateKey = \\"__preload_\\"; + var preloadInitedComponent = \\"$preloadComponent\\"; + apis.forEach((function(key) { + if (!(key in wx)) { + taro[key] = function() { + console.warn(\\"\\\\u5fae\\\\u4fe1\\\\u5c0f\\\\u7a0b\\\\u5e8f\\\\u6682\\\\u4e0d\\\\u652f\\\\u6301 \\".concat(key)); + }; + return; + } + if (otherApis.has(key)) { + taro[key] = function(options) { + for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) { + args[_key2 - 1] = arguments[_key2]; + } + options = options || {}; + var task = null; + var obj = Object.assign({}, options); + if (typeof options === \\"string\\") { + if (args.length) { + var _wx; + return (_wx = wx)[key].apply(_wx, [ options ].concat(args)); + } + return wx[key](options); + } + if (key === \\"navigateTo\\" || key === \\"redirectTo\\" || key === \\"switchTab\\") { + var url = obj.url ? obj.url.replace(/^\\\\//, \\"\\") : \\"\\"; + if (url.indexOf(\\"?\\") > -1) url = url.split(\\"?\\")[0]; + var Component = cacheDataGet(url); + if (Component) { + var component = new Component; + if (component.componentWillPreload) { + var cacheKey = getUniqueKey(); + var MarkIndex = obj.url.indexOf(\\"?\\"); + var hasMark = MarkIndex > -1; + var urlQueryStr = hasMark ? obj.url.substring(MarkIndex + 1, obj.url.length) : \\"\\"; + var params = queryToJson(urlQueryStr); + obj.url += (hasMark ? \\"&\\" : \\"?\\") + \\"\\".concat(preloadPrivateKey, \\"=\\").concat(cacheKey); + cacheDataSet(cacheKey, component.componentWillPreload(params)); + cacheDataSet(preloadInitedComponent, component); + } + } + } + if (useDataCacheApis[key]) { + var _url = obj.url = obj.url || \\"\\"; + var _MarkIndex = _url.indexOf(\\"?\\"); + var _hasMark = _MarkIndex > -1; + var _urlQueryStr = _hasMark ? _url.substring(_MarkIndex + 1, _url.length) : \\"\\"; + var _params = queryToJson(_urlQueryStr); + var _cacheKey = getUniqueKey(); + obj.url += (_hasMark ? \\"&\\" : \\"?\\") + \\"\\".concat(routerParamsPrivateKey, \\"=\\").concat(_cacheKey); + cacheDataSet(_cacheKey, _params); + } + var p = new Promise((function(resolve, reject) { + [ \\"fail\\", \\"success\\", \\"complete\\" ].forEach((function(k) { + obj[k] = function(res) { + options[k] && options[k](res); + if (k === \\"success\\") { + if (key === \\"connectSocket\\") { + resolve(Promise.resolve().then((function() { + return Object.assign(task, res); + }))); + } else { + resolve(res); + } + } else if (k === \\"fail\\") { + reject(res); + } + }; + })); + if (args.length) { + var _wx2; + task = (_wx2 = wx)[key].apply(_wx2, [ obj ].concat(args)); + } else { + task = wx[key](obj); + } + })); + if (key === \\"uploadFile\\" || key === \\"downloadFile\\") { + p.progress = function(cb) { + if (task) { + task.onProgressUpdate(cb); + } + return p; + }; + p.abort = function(cb) { + cb && cb(); + if (task) { + task.abort(); + } + return p; + }; + } + return p; + }; + } else { + taro[key] = function() { + for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) { + args[_key3] = arguments[_key3]; + } + var argsLen = args.length; + var newArgs = args.concat(); + var lastArg = newArgs[argsLen - 1]; + if (lastArg && lastArg.isTaroComponent && lastArg.$scope) { + newArgs.splice(argsLen - 1, 1, lastArg.$scope); + } + return wx[key].apply(wx, newArgs); + }; + } + })); + } + function pxTransform(size) { + var _ref = this.config || {}, _ref$designWidth = _ref.designWidth, designWidth = _ref$designWidth === void 0 ? 750 : _ref$designWidth, _ref$deviceRatio = _ref.deviceRatio, deviceRatio = _ref$deviceRatio === void 0 ? { + 640: 2.34 / 2, + 750: 1, + 828: 1.81 / 2 + } : _ref$deviceRatio; + if (!(designWidth in deviceRatio)) { + throw new Error(\\"deviceRatio \\\\u914d\\\\u7f6e\\\\u4e2d\\\\u4e0d\\\\u5b58\\\\u5728 \\".concat(designWidth, \\" \\\\u7684\\\\u8bbe\\\\u7f6e\\\\uff01\\")); + } + return parseInt(size, 10) * deviceRatio[designWidth] + \\"rpx\\"; + } + function canIUseWebp() { + var _wx$getSystemInfoSync = wx.getSystemInfoSync(), platform = _wx$getSystemInfoSync.platform; + var platformLower = platform.toLowerCase(); + if (platformLower === \\"android\\" || platformLower === \\"devtools\\") { + return true; + } + return false; + } + function wxCloud(taro) { + var wxC = wx.cloud || {}; + var wxcloud = {}; + var apiList = [ \\"init\\", \\"database\\", \\"uploadFile\\", \\"downloadFile\\", \\"getTempFileURL\\", \\"deleteFile\\", \\"callFunction\\", \\"CloudID\\" ]; + apiList.forEach((function(v) { + wxcloud[v] = wxC[v]; + })); + taro.cloud = wxcloud; + } + function initNativeApi(taro) { + processApis(taro); + var link = new taro.Link(taroInterceptor); + taro.request = link.request.bind(link); + taro.addInterceptor = link.addInterceptor.bind(link); + taro.cleanInterceptors = link.cleanInterceptors.bind(link); + taro.getCurrentPages = getCurrentPages; + taro.getApp = getApp; + taro.requirePlugin = requirePlugin; + taro.initPxTransform = taro.initPxTransform.bind(taro); + taro.pxTransform = pxTransform.bind(taro); + taro.canIUseWebp = canIUseWebp; + taro.env = wx.env; + wxCloud(taro); + } + var components = { + Progress: { + \\"border-radius\\": \\"0\\", + \\"font-size\\": \\"16\\", + duration: \\"30\\", + bindActiveEnd: \\"\\" + }, + RichText: { + space: \\"\\" + }, + Text: { + \\"user-select\\": \\"false\\" + }, + Map: { + polygons: \\"[]\\", + subkey: \\"\\", + rotate: \\"0\\", + skew: \\"0\\", + \\"enable-3D\\": \\"false\\", + \\"show-compass\\": \\"false\\", + \\"show-scale\\": \\"false\\", + \\"enable-overlooking\\": \\"false\\", + \\"enable-zoom\\": \\"true\\", + \\"enable-scroll\\": \\"true\\", + \\"enable-rotate\\": \\"false\\", + \\"enable-satellite\\": \\"false\\", + \\"enable-traffic\\": \\"false\\", + setting: \\"[]\\", + bindLabelTap: \\"\\", + bindRegionChange: \\"\\", + bindPoiTap: \\"\\" + }, + Button: { + lang: \\"en\\", + \\"session-from\\": \\"\\", + \\"send-message-title\\": \\"\\", + \\"send-message-path\\": \\"\\", + \\"send-message-img\\": \\"\\", + \\"app-parameter\\": \\"\\", + \\"show-message-card\\": \\"false\\", + bindGetUserInfo: \\"\\", + bindContact: \\"\\", + bindGetPhoneNumber: \\"\\", + bindError: \\"\\", + bindOpenSetting: \\"\\", + bindLaunchApp: \\"\\" + }, + Form: { + \\"report-submit-timeout\\": \\"0\\" + }, + Input: { + \\"auto-focus\\": \\"false\\", + \\"always-embed\\": \\"false\\", + \\"adjust-position\\": \\"true\\", + \\"hold-keyboard\\": \\"false\\", + bindKeyboardHeightChange: \\"\\" + }, + Picker: { + \\"header-text\\": \\"\\" + }, + PickerView: { + bindPickStart: \\"\\", + bindPickEnd: \\"\\" + }, + Slider: { + color: singleQuote(\\"#e9e9e9\\"), + \\"selected-color\\": singleQuote(\\"#1aad19\\") + }, + Textarea: { + \\"show-confirm-bar\\": \\"true\\", + \\"adjust-position\\": \\"true\\", + \\"hold-keyboard\\": \\"false\\", + \\"disable-default-padding\\": \\"false\\", + bindKeyboardHeightChange: \\"\\" + }, + ScrollView: { + \\"enable-flex\\": \\"false\\", + \\"scroll-anchoring\\": \\"false\\", + \\"refresher-enabled\\": \\"false\\", + \\"refresher-threshold\\": \\"45\\", + \\"refresher-default-style\\": singleQuote(\\"black\\"), + \\"refresher-background\\": singleQuote(\\"#FFF\\"), + \\"refresher-triggered\\": \\"false\\", + enhanced: \\"false\\", + bounces: \\"true\\", + \\"show-scrollbar\\": \\"true\\", + \\"paging-enabled\\": \\"false\\", + \\"fast-deceleration\\": \\"false\\", + bindDragStart: \\"\\", + bindDragging: \\"\\", + bindDragEnd: \\"\\", + bindRefresherPulling: \\"\\", + bindRefresherRefresh: \\"\\", + bindRefresherRestore: \\"\\", + bindRefresherAbort: \\"\\" + }, + Swiper: { + \\"snap-to-edge\\": \\"false\\", + \\"easing-function\\": singleQuote(\\"default\\") + }, + SwiperItem: { + \\"skip-hidden-item-layout\\": \\"false\\" + }, + Navigator: { + target: singleQuote(\\"self\\"), + \\"app-id\\": \\"\\", + path: \\"\\", + \\"extra-data\\": \\"\\", + version: singleQuote(\\"version\\") + }, + Camera: { + mode: singleQuote(\\"normal\\"), + resolution: singleQuote(\\"medium\\"), + \\"frame-size\\": singleQuote(\\"medium\\"), + bindInitDone: \\"\\", + bindScanCode: \\"\\" + }, + Image: { + webp: \\"false\\", + \\"show-menu-by-longpress\\": \\"false\\" + }, + LivePlayer: { + mode: singleQuote(\\"live\\"), + \\"sound-mode\\": singleQuote(\\"speaker\\"), + \\"auto-pause-if-navigate\\": \\"true\\", + \\"auto-pause-if-open-native\\": \\"true\\", + \\"picture-in-picture-mode\\": \\"[]\\", + bindAudioVolumeNotify: \\"\\", + bindEnterPictureInPicture: \\"\\", + bindLeavePictureInPicture: \\"\\" + }, + Video: { + title: \\"\\", + \\"play-btn-position\\": singleQuote(\\"bottom\\"), + \\"enable-play-gesture\\": \\"false\\", + \\"auto-pause-if-navigate\\": \\"true\\", + \\"auto-pause-if-open-native\\": \\"true\\", + \\"vslide-gesture\\": \\"false\\", + \\"vslide-gesture-in-fullscreen\\": \\"true\\", + \\"ad-unit-id\\": \\"\\", + \\"poster-for-crawler\\": \\"\\", + \\"show-casting-button\\": \\"false\\", + \\"picture-in-picture-mode\\": \\"[]\\", + \\"enable-auto-rotation\\": \\"false\\", + \\"show-screen-lock-button\\": \\"false\\", + bindProgress: \\"\\", + bindLoadedMetadata: \\"\\", + bindControlsToggle: \\"\\", + bindEnterPictureInPicture: \\"\\", + bindLeavePictureInPicture: \\"\\", + bindSeekComplete: \\"\\" + }, + Canvas: { + type: \\"\\" + }, + Ad: { + \\"ad-type\\": singleQuote(\\"banner\\"), + \\"ad-theme\\": singleQuote(\\"white\\") + }, + Editor: { + \\"read-only\\": \\"false\\", + placeholder: \\"\\", + \\"show-img-size\\": \\"false\\", + \\"show-img-toolbar\\": \\"false\\", + \\"show-img-resize\\": \\"false\\", + focus: \\"false\\", + bindReady: \\"\\", + bindFocus: \\"\\", + bindBlur: \\"\\", + bindInput: \\"\\", + bindStatusChange: \\"\\", + name: \\"\\" + }, + MatchMedia: { + \\"min-width\\": \\"\\", + \\"max-width\\": \\"\\", + width: \\"\\", + \\"min-height\\": \\"\\", + \\"max-height\\": \\"\\", + height: \\"\\", + orientation: \\"\\" + }, + FunctionalPageNavigator: { + version: singleQuote(\\"release\\"), + name: \\"\\", + args: \\"\\", + bindSuccess: \\"\\", + bindFail: \\"\\", + bindCancel: \\"\\" + }, + LivePusher: { + url: \\"\\", + mode: singleQuote(\\"RTC\\"), + autopush: \\"false\\", + muted: \\"false\\", + \\"enable-camera\\": \\"true\\", + \\"auto-focus\\": \\"true\\", + orientation: singleQuote(\\"vertical\\"), + beauty: \\"0\\", + whiteness: \\"0\\", + aspect: singleQuote(\\"9:16\\"), + \\"min-bitrate\\": \\"200\\", + \\"max-bitrate\\": \\"1000\\", + \\"audio-quality\\": singleQuote(\\"high\\"), + \\"waiting-image\\": \\"\\", + \\"waiting-image-hash\\": \\"\\", + zoom: \\"false\\", + \\"device-position\\": singleQuote(\\"front\\"), + \\"background-mute\\": \\"false\\", + mirror: \\"false\\", + \\"remote-mirror\\": \\"false\\", + \\"local-mirror\\": \\"false\\", + \\"audio-reverb-type\\": \\"0\\", + \\"enable-mic\\": \\"true\\", + \\"enable-agc\\": \\"false\\", + \\"enable-ans\\": \\"false\\", + \\"audio-volume-type\\": singleQuote(\\"voicecall\\"), + \\"video-width\\": \\"360\\", + \\"video-height\\": \\"640\\", + animation: \\"\\", + bindStateChange: \\"\\", + bindNetStatus: \\"\\", + bindBgmStart: \\"\\", + bindBgmProgress: \\"\\", + bindBgmComplete: \\"\\" + }, + OfficialAccount: { + bindLoad: \\"\\", + bindError: \\"\\" + }, + OpenData: { + type: \\"\\", + \\"open-gid\\": \\"\\", + lang: singleQuote(\\"en\\"), + \\"default-text\\": \\"\\", + \\"default-avatar\\": \\"\\", + bindError: \\"\\" + }, + NavigationBar: { + title: \\"\\", + loading: \\"false\\", + \\"front-color\\": \\"\\", + \\"background-color\\": \\"\\", + \\"color-animation-duration\\": \\"0\\", + \\"color-animation-timing-func\\": singleQuote(\\"linear\\") + }, + PageMeta: { + \\"background-text-style\\": \\"\\", + \\"background-color\\": \\"\\", + \\"background-color-top\\": \\"\\", + \\"background-color-bottom\\": \\"\\", + \\"scroll-top\\": singleQuote(\\"\\"), + \\"scroll-duration\\": \\"300\\", + \\"page-style\\": singleQuote(\\"\\"), + \\"root-font-size\\": singleQuote(\\"\\"), + bindResize: \\"\\", + bindScroll: \\"\\", + bindScrollDone: \\"\\" + }, + VoipRoom: { + openid: \\"\\", + mode: singleQuote(\\"camera\\"), + \\"device-position\\": singleQuote(\\"front\\"), + bindError: \\"\\" + }, + AdCustom: { + \\"unit-id\\": \\"\\", + \\"ad-intervals\\": \\"\\", + bindLoad: \\"\\", + bindError: \\"\\" + } + }; + var hostConfig = { + initNativeApi: initNativeApi, + onTaroElementCreate: function onTaroElementCreate(tagName) { + warn(tagName === \\"MAP\\", \\"\\\\u5fae\\\\u4fe1\\\\u5c0f\\\\u7a0b\\\\u5e8f map \\\\u7ec4\\\\u4ef6\\\\u7684 \`setting\` \\\\u5c5e\\\\u6027\\\\u9700\\\\u8981\\\\u4f20\\\\u9012\\\\u4e00\\\\u4e2a\\\\u9ed8\\\\u8ba4\\\\u503c\\\\u3002\\\\u8be6\\\\u60c5\\\\uff1a\\\\n https://developers.weixin.qq.com/miniprogram/dev/component/map.html\\"); + } + }; + mergeReconciler(hostConfig); + mergeInternalComponents(components); + var taro_runtime = __webpack_require__(1); + var classCallCheck = __webpack_require__(2); + var createClass = __webpack_require__(3); + var possibleConstructorReturn = __webpack_require__(5); + var getPrototypeOf = __webpack_require__(4); + var inherits = __webpack_require__(6); + var react = __webpack_require__(0); + var app = __webpack_require__(11); + var app_App = function(_Component) { + Object(inherits[\\"a\\"])(App, _Component); + function App() { + Object(classCallCheck[\\"a\\"])(this, App); + return Object(possibleConstructorReturn[\\"a\\"])(this, Object(getPrototypeOf[\\"a\\"])(App).apply(this, arguments)); + } + Object(createClass[\\"a\\"])(App, [ { + key: \\"componentDidMount\\", + value: function componentDidMount() {} + }, { + key: \\"componentDidShow\\", + value: function componentDidShow() {} + }, { + key: \\"componentDidHide\\", + value: function componentDidHide() {} + }, { + key: \\"componentDidCatchError\\", + value: function componentDidCatchError() {} + }, { + key: \\"render\\", + value: function render() { + return this.props.children; + } + } ]); + return App; + }(react[\\"Component\\"]); + var lib_origin_app = app_App; + var taro_react = __webpack_require__(8); + var config = { + pages: [ \\"pages/index/index\\" ], + window: { + backgroundTextStyle: \\"light\\", + navigationBarBackgroundColor: \\"#fff\\", + navigationBarTitleText: \\"WeChat\\", + navigationBarTextStyle: \\"black\\" + } + }; + taro_runtime[\\"window\\"].__taroAppConfig = config; + var inst = App(Object(taro_runtime[\\"createReactApp\\"])(lib_origin_app, react, taro_react[\\"a\\"], config)); + } +}, [ [ 14, 0, 1, 3, 2 ] ] ]); + + + +/** filePath: dist/app.json **/ +{\\"pages\\":[\\"pages/index/index\\"],\\"window\\":{\\"backgroundTextStyle\\":\\"light\\",\\"navigationBarBackgroundColor\\":\\"#fff\\",\\"navigationBarTitleText\\":\\"WeChat\\",\\"navigationBarTextStyle\\":\\"black\\"}} + +/** filePath: dist/app.wxss **/ + + +/** filePath: dist/base.wxml **/ + + + + + + + + ++ + + + ++ + ++ + + + ++ + ++ + + + ++ + ++ + + + ++ + +{{i.v}} + + + + + + + ++ + + + ++ + ++ + + + ++ + ++ + + + + + + + ++ + ++ + + + ++ + ++ + + + ++ + ++ + + + + + + + ++ + ++ + + + ++ + ++ + + + ++ + ++ + + + + + + + ++ + ++ + + + ++ + ++ + + + + + + + ++ + ++ + + + ++ + ++ + + + + + + + ++ + ++ + + + ++ + ++ + + + + + + + ++ + ++ + + + ++ + ++ + + + + + + + ++ + ++ + + + ++ + ++ + + + + + + + ++ + ++ + + + ++ + ++ + + + + + + + ++ + ++ + + + ++ + ++ + + + + + + + ++ + ++ + + + ++ + ++ + + + + + + + ++ + ++ + + + ++ + ++ + + + + + + + ++ + ++ + + + ++ + ++ + + + + + + + ++ + ++ + + + ++ + ++ + + + + + + + ++ + ++ + + + ++ + ++ + + + + + + + ++ + ++ + + + ++ + ++ + + + + + + + ++ + ++ + + + ++ + ++ + + + + + + + ++ + ++ + + + ++ + ++ + + + + + + + ++ + ++ + + +/** filePath: dist/common.js **/ +(wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 2 ], [ function(module, __webpack_exports__, __webpack_require__) { + \\"use strict\\"; + __webpack_require__.r(__webpack_exports__); + __webpack_exports__[\\"default\\"] = \\"react-mock\\"; +} ] ]); + +/** filePath: dist/comp.js **/ +(wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 6 ], { + 12: function(module, __webpack_exports__, __webpack_require__) { + \\"use strict\\"; + __webpack_require__.r(__webpack_exports__); + var _tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1); + Component(Object(_tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__[\\"createRecursiveComponentConfig\\"])()); + } +}, [ [ 12, 0, 1 ] ] ]); + +/** filePath: dist/comp.json **/ +{\\"component\\":true,\\"usingComponents\\":{\\"comp\\":\\"./comp\\"}} + +/** filePath: dist/comp.wxml **/ + + + +/** filePath: dist/pages/index/index.js **/ +(wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 7 ], { + 13: function(module, exports, __webpack_require__) {}, + 15: function(module, __webpack_exports__, __webpack_require__) { + \\"use strict\\"; + __webpack_require__.r(__webpack_exports__); + var taro_runtime = __webpack_require__(1); + var classCallCheck = __webpack_require__(2); + var createClass = __webpack_require__(3); + var possibleConstructorReturn = __webpack_require__(5); + var getPrototypeOf = __webpack_require__(4); + var inherits = __webpack_require__(6); + var react = __webpack_require__(0); + var taro_components = __webpack_require__(7); + function say() { + console.log(\\"little cat\\"); + } + function miao() { + console.log(\\"say: \\", say()); + } + var index = __webpack_require__(13); + var index_Index = function(_Component) { + Object(inherits[\\"a\\"])(Index, _Component); + function Index() { + Object(classCallCheck[\\"a\\"])(this, Index); + return Object(possibleConstructorReturn[\\"a\\"])(this, Object(getPrototypeOf[\\"a\\"])(Index).apply(this, arguments)); + } + Object(createClass[\\"a\\"])(Index, [ { + key: \\"componentDidMount\\", + value: function componentDidMount() { + miao(); + } + }, { + key: \\"render\\", + value: function render() { + return react[\\"default\\"].createElement(taro_components[\\"View\\"], { + className: \\"index\\" + }, react[\\"default\\"].createElement(taro_components[\\"Text\\"], null, \\"Hello world!\\")); + } + } ]); + return Index; + }(react[\\"Component\\"]); + var config = { + navigationBarTitleText: \\"\\\\u9996\\\\u9875\\" + }; + var inst = Page(Object(taro_runtime[\\"createPageConfig\\"])(index_Index, \\"pages/index/index\\", {}, config || {})); + } +}, [ [ 15, 0, 1, 3, 2 ] ] ]); + +/** filePath: dist/pages/index/index.json **/ +{\\"navigationBarTitleText\\":\\"首页\\",\\"usingComponents\\":{\\"comp\\":\\"../../comp\\"}} + +/** filePath: dist/pages/index/index.wxml **/ + + + +/** filePath: dist/pages/index/index.wxss **/ + + +/** filePath: dist/runtime.js **/ +(function(modules) { + function webpackJsonpCallback(data) { + var chunkIds = data[0]; + var moreModules = data[1]; + var executeModules = data[2]; + var moduleId, chunkId, i = 0, resolves = []; + for (;i < chunkIds.length; i++) { + chunkId = chunkIds[i]; + if (Object.prototype.hasOwnProperty.call(installedChunks, chunkId) && installedChunks[chunkId]) { + resolves.push(installedChunks[chunkId][0]); + } + installedChunks[chunkId] = 0; + } + for (moduleId in moreModules) { + if (Object.prototype.hasOwnProperty.call(moreModules, moduleId)) { + modules[moduleId] = moreModules[moduleId]; + } + } + if (parentJsonpFunction) parentJsonpFunction(data); + while (resolves.length) { + resolves.shift()(); + } + deferredModules.push.apply(deferredModules, executeModules || []); + return checkDeferredModules(); + } + function checkDeferredModules() { + var result; + for (var i = 0; i < deferredModules.length; i++) { + var deferredModule = deferredModules[i]; + var fulfilled = true; + for (var j = 1; j < deferredModule.length; j++) { + var depId = deferredModule[j]; + if (installedChunks[depId] !== 0) fulfilled = false; + } + if (fulfilled) { + deferredModules.splice(i--, 1); + result = __webpack_require__(__webpack_require__.s = deferredModule[0]); + } + } + return result; + } + var installedModules = {}; + var installedChunks = { + 0: 0 + }; + var deferredModules = []; + function __webpack_require__(moduleId) { + if (installedModules[moduleId]) { + return installedModules[moduleId].exports; + } + var module = installedModules[moduleId] = { + i: moduleId, + l: false, + exports: {} + }; + modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); + module.l = true; + return module.exports; + } + __webpack_require__.m = modules; + __webpack_require__.c = installedModules; + __webpack_require__.d = function(exports, name, getter) { + if (!__webpack_require__.o(exports, name)) { + Object.defineProperty(exports, name, { + enumerable: true, + get: getter + }); + } + }; + __webpack_require__.r = function(exports) { + if (typeof Symbol !== \\"undefined\\" && Symbol.toStringTag) { + Object.defineProperty(exports, Symbol.toStringTag, { + value: \\"Module\\" + }); + } + Object.defineProperty(exports, \\"__esModule\\", { + value: true + }); + }; + __webpack_require__.t = function(value, mode) { + if (mode & 1) value = __webpack_require__(value); + if (mode & 8) return value; + if (mode & 4 && typeof value === \\"object\\" && value && value.__esModule) return value; + var ns = Object.create(null); + __webpack_require__.r(ns); + Object.defineProperty(ns, \\"default\\", { + enumerable: true, + value: value + }); + if (mode & 2 && typeof value != \\"string\\") for (var key in value) __webpack_require__.d(ns, key, function(key) { + return value[key]; + }.bind(null, key)); + return ns; + }; + __webpack_require__.n = function(module) { + var getter = module && module.__esModule ? function getDefault() { + return module[\\"default\\"]; + } : function getModuleExports() { + return module; + }; + __webpack_require__.d(getter, \\"a\\", getter); + return getter; + }; + __webpack_require__.o = function(object, property) { + return Object.prototype.hasOwnProperty.call(object, property); + }; + __webpack_require__.p = \\"/\\"; + var jsonpArray = wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []; + var oldJsonpFunction = jsonpArray.push.bind(jsonpArray); + jsonpArray.push = webpackJsonpCallback; + jsonpArray = jsonpArray.slice(); + for (var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]); + var parentJsonpFunction = oldJsonpFunction; + checkDeferredModules(); +})([]); + +/** filePath: dist/taro.js **/ +(wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 1 ], { + 1: function(module, __webpack_exports__, __webpack_require__) { + \\"use strict\\"; + var _unused_webpack_default_export = \\"taro-runtime-mock\\"; + }, + 7: function(module, __webpack_exports__, __webpack_require__) { + \\"use strict\\"; + var _unused_webpack_default_export = \\"taro-components-mock\\"; + }, + 8: function(module, __webpack_exports__, __webpack_require__) { + \\"use strict\\"; + __webpack_exports__[\\"a\\"] = \\"taro-react-mock\\"; + } +} ]); + +/** filePath: dist/utils.wxs **/ +module.exports = { + a: function (l, n, s) { + var a = [\\"view\\",\\"cover-view\\",\\"block\\",\\"text\\",\\"slot\\",\\"slot-view\\",\\"label\\",\\"form\\",\\"scroll-view\\"] + var b = [\\"slot\\",\\"slot-view\\",\\"label\\",\\"form\\",\\"scroll-view\\"] + if (a.indexOf(n) === -1) { + l = 0 + } + if (b.indexOf(n) > -1) { + var u = s.split(',') + var depth = 0 + for (var i = 0; i < u.length; i++) { + if (u[i] === n) depth++ + } + l = depth + } + return 'tmpl_' + l + '_' + n + }, + b: function (a, b) { + return a === undefined ? b : a + }, + c: function(i, prefix) { + var s = i.focus !== undefined ? 'focus' : 'blur' + return prefix + i.nn + '_' + s + }, + d: function (i, v) { + return i === undefined ? v : i + }, + e: function (n) { + return 'tmpl_' + n + '_container' + }, + f: function (l, n) { + var b = [\\"slot\\",\\"slot-view\\",\\"label\\",\\"form\\",\\"scroll-view\\"] + if (b.indexOf(n) > -1) { + if (l) l += ',' + l += n + } + return l + } +} + +/** filePath: dist/vendors.js **/ +(wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 3 ], [ , , function(module, __webpack_exports__, __webpack_require__) { + \\"use strict\\"; + __webpack_require__.d(__webpack_exports__, \\"a\\", (function() { + return _classCallCheck; + })); + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError(\\"Cannot call a class as a function\\"); + } + } +}, function(module, __webpack_exports__, __webpack_require__) { + \\"use strict\\"; + __webpack_require__.d(__webpack_exports__, \\"a\\", (function() { + return _createClass; + })); + function _defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if (\\"value\\" in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + function _createClass(Constructor, protoProps, staticProps) { + if (protoProps) _defineProperties(Constructor.prototype, protoProps); + if (staticProps) _defineProperties(Constructor, staticProps); + return Constructor; + } +}, function(module, __webpack_exports__, __webpack_require__) { + \\"use strict\\"; + __webpack_require__.d(__webpack_exports__, \\"a\\", (function() { + return _getPrototypeOf; + })); + function _getPrototypeOf(o) { + _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { + return o.__proto__ || Object.getPrototypeOf(o); + }; + return _getPrototypeOf(o); + } +}, function(module, __webpack_exports__, __webpack_require__) { + \\"use strict\\"; + __webpack_require__.d(__webpack_exports__, \\"a\\", (function() { + return _possibleConstructorReturn; + })); + function _typeof(obj) { + \\"@babel/helpers - typeof\\"; + if (typeof Symbol === \\"function\\" && typeof Symbol.iterator === \\"symbol\\") { + _typeof = function _typeof(obj) { + return typeof obj; + }; + } else { + _typeof = function _typeof(obj) { + return obj && typeof Symbol === \\"function\\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \\"symbol\\" : typeof obj; + }; + } + return _typeof(obj); + } + function _assertThisInitialized(self) { + if (self === void 0) { + throw new ReferenceError(\\"this hasn't been initialised - super() hasn't been called\\"); + } + return self; + } + function _possibleConstructorReturn(self, call) { + if (call && (_typeof(call) === \\"object\\" || typeof call === \\"function\\")) { + return call; + } + return _assertThisInitialized(self); + } +}, function(module, __webpack_exports__, __webpack_require__) { + \\"use strict\\"; + __webpack_require__.d(__webpack_exports__, \\"a\\", (function() { + return _inherits; + })); + function _setPrototypeOf(o, p) { + _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { + o.__proto__ = p; + return o; + }; + return _setPrototypeOf(o, p); + } + function _inherits(subClass, superClass) { + if (typeof superClass !== \\"function\\" && superClass !== null) { + throw new TypeError(\\"Super expression must either be null or a function\\"); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + writable: true, + configurable: true + } + }); + if (superClass) _setPrototypeOf(subClass, superClass); + } +} ] ]); +" +`; + +exports[`config should build from origin and pipe to output 1`] = `16`; + +exports[`config should build from origin and pipe to output 2`] = ` +" +/** filePath: output/app.js **/ +require(\\"./runtime\\"); + +require(\\"./common\\"); + +require(\\"./vendors\\"); + +require(\\"./taro\\"); + +(wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 4 ], { + 11: function(module, exports, __webpack_require__) {}, + 14: function(module, __webpack_exports__, __webpack_require__) { + \\"use strict\\"; + __webpack_require__.r(__webpack_exports__); + function _arrayLikeToArray(arr, len) { + if (len == null || len > arr.length) len = arr.length; + for (var i = 0, arr2 = new Array(len); i < len; i++) { + arr2[i] = arr[i]; + } + return arr2; + } + function _arrayWithoutHoles(arr) { + if (Array.isArray(arr)) return _arrayLikeToArray(arr); + } + function _iterableToArray(iter) { + if (typeof Symbol !== \\"undefined\\" && Symbol.iterator in Object(iter)) return Array.from(iter); + } + function _unsupportedIterableToArray(o, minLen) { + if (!o) return; + if (typeof o === \\"string\\") return _arrayLikeToArray(o, minLen); + var n = Object.prototype.toString.call(o).slice(8, -1); + if (n === \\"Object\\" && o.constructor) n = o.constructor.name; + if (n === \\"Map\\" || n === \\"Set\\") return Array.from(o); + if (n === \\"Arguments\\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); + } + function _nonIterableSpread() { + throw new TypeError(\\"Invalid attempt to spread non-iterable instance.\\\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\\"); + } + function _toConsumableArray(arr) { + return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); + } + function _typeof(obj) { + \\"@babel/helpers - typeof\\"; + if (typeof Symbol === \\"function\\" && typeof Symbol.iterator === \\"symbol\\") { + _typeof = function _typeof(obj) { + return typeof obj; + }; + } else { + _typeof = function _typeof(obj) { + return obj && typeof Symbol === \\"function\\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \\"symbol\\" : typeof obj; + }; + } + return _typeof(obj); + } + function _assertThisInitialized(self) { + if (self === void 0) { + throw new ReferenceError(\\"this hasn't been initialised - super() hasn't been called\\"); + } + return self; + } + function _possibleConstructorReturn(self, call) { + if (call && (_typeof(call) === \\"object\\" || typeof call === \\"function\\")) { + return call; + } + return _assertThisInitialized(self); + } + function _getPrototypeOf(o) { + _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { + return o.__proto__ || Object.getPrototypeOf(o); + }; + return _getPrototypeOf(o); + } + function _setPrototypeOf(o, p) { + _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { + o.__proto__ = p; + return o; + }; + return _setPrototypeOf(o, p); + } + function _inherits(subClass, superClass) { + if (typeof superClass !== \\"function\\" && superClass !== null) { + throw new TypeError(\\"Super expression must either be null or a function\\"); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + writable: true, + configurable: true + } + }); + if (superClass) _setPrototypeOf(subClass, superClass); + } + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError(\\"Cannot call a class as a function\\"); + } + } + function _defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if (\\"value\\" in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + function _createClass(Constructor, protoProps, staticProps) { + if (protoProps) _defineProperties(Constructor.prototype, protoProps); + if (staticProps) _defineProperties(Constructor, staticProps); + return Constructor; + } + function isString(o) { + return typeof o === \\"string\\"; + } + function isUndefined(o) { + return typeof o === \\"undefined\\"; + } + function isNull(o) { + return o === null; + } + function isObject(o) { + return o !== null && _typeof(o) === \\"object\\"; + } + function isBoolean(o) { + return o === true || o === false; + } + function isFunction(o) { + return typeof o === \\"function\\"; + } + function isNumber(o) { + return typeof o === \\"number\\"; + } + function isBooleanStringLiteral(o) { + return o === \\"true\\" || o === \\"false\\"; + } + var isArray = Array.isArray; + var styles = { + style: \\"i.\\".concat(\\"st\\"), + class: \\"i.\\".concat(\\"cl\\") + }; + var events = { + bindtap: \\"eh\\" + }; + var touchEvents = { + bindTouchStart: \\"\\", + bindTouchMove: \\"\\", + bindTouchEnd: \\"\\", + bindTouchCancel: \\"\\", + bindLongTap: \\"\\" + }; + var animationEvents = { + bindAnimationStart: \\"\\", + bindAnimationIteration: \\"\\", + bindAnimationEnd: \\"\\", + bindTransitionEnd: \\"\\" + }; + var specialEvents = new Set([ \\"htouchmove\\", \\"vtouchmove\\" ]); + function singleQuote(s) { + return \\"'\\".concat(s, \\"'\\"); + } + var View = Object.assign(Object.assign({ + \\"hover-class\\": singleQuote(\\"none\\"), + \\"hover-stop-propagation\\": \\"false\\", + \\"hover-start-time\\": \\"50\\", + \\"hover-stay-time\\": \\"400\\", + animation: \\"\\" + }, touchEvents), animationEvents); + var Icon = { + type: \\"\\", + size: \\"23\\", + color: \\"\\" + }; + var MapComp = Object.assign({ + longitude: \\"\\", + latitude: \\"\\", + scale: \\"16\\", + markers: \\"[]\\", + covers: \\"\\", + polyline: \\"[]\\", + circles: \\"[]\\", + controls: \\"[]\\", + \\"include-points\\": \\"[]\\", + \\"show-location\\": \\"\\", + \\"layer-style\\": \\"1\\", + bindMarkerTap: \\"\\", + bindControlTap: \\"\\", + bindCalloutTap: \\"\\", + bindUpdated: \\"\\" + }, touchEvents); + var Progress = { + percent: \\"\\", + \\"stroke-width\\": \\"6\\", + color: singleQuote(\\"#09BB07\\"), + activeColor: singleQuote(\\"#09BB07\\"), + backgroundColor: singleQuote(\\"#EBEBEB\\"), + active: \\"false\\", + \\"active-mode\\": singleQuote(\\"backwards\\"), + \\"show-info\\": \\"false\\" + }; + var RichText = { + nodes: \\"[]\\" + }; + var Text = { + selectable: \\"false\\", + space: \\"\\", + decode: \\"false\\" + }; + var Button = { + size: singleQuote(\\"default\\"), + type: \\"\\", + plain: \\"false\\", + disabled: \\"\\", + loading: \\"false\\", + \\"form-type\\": \\"\\", + \\"open-type\\": \\"\\", + \\"hover-class\\": singleQuote(\\"button-hover\\"), + \\"hover-stop-propagation\\": \\"false\\", + \\"hover-start-time\\": \\"20\\", + \\"hover-stay-time\\": \\"70\\", + name: \\"\\" + }; + var Checkbox = { + value: \\"\\", + disabled: \\"\\", + checked: \\"false\\", + color: singleQuote(\\"#09BB07\\"), + name: \\"\\" + }; + var CheckboxGroup = { + bindChange: \\"\\", + name: \\"\\" + }; + var Form = { + \\"report-submit\\": \\"false\\", + bindSubmit: \\"\\", + bindReset: \\"\\", + name: \\"\\" + }; + var Input = { + value: \\"\\", + type: singleQuote(\\"\\"), + password: \\"false\\", + placeholder: \\"\\", + \\"placeholder-style\\": \\"\\", + \\"placeholder-class\\": singleQuote(\\"input-placeholder\\"), + disabled: \\"\\", + maxlength: \\"140\\", + \\"cursor-spacing\\": \\"0\\", + focus: \\"false\\", + \\"confirm-type\\": singleQuote(\\"done\\"), + \\"confirm-hold\\": \\"false\\", + cursor: \\"i.value.length\\", + \\"selection-start\\": \\"-1\\", + \\"selection-end\\": \\"-1\\", + bindInput: \\"\\", + bindFocus: \\"\\", + bindBlur: \\"\\", + bindConfirm: \\"\\", + name: \\"\\" + }; + var Label = { + for: \\"\\", + name: \\"\\" + }; + var Picker = { + mode: singleQuote(\\"selector\\"), + disabled: \\"\\", + range: \\"\\", + \\"range-key\\": \\"\\", + value: \\"\\", + start: \\"\\", + end: \\"\\", + fields: singleQuote(\\"day\\"), + \\"custom-item\\": \\"\\", + name: \\"\\", + bindCancel: \\"\\", + bindChange: \\"\\", + bindColumnChange: \\"\\" + }; + var PickerView = { + value: \\"\\", + \\"indicator-style\\": \\"\\", + \\"indicator-class\\": \\"\\", + \\"mask-style\\": \\"\\", + \\"mask-class\\": \\"\\", + bindChange: \\"\\", + name: \\"\\" + }; + var PickerViewColumn = { + name: \\"\\" + }; + var Radio = { + value: \\"\\", + checked: \\"false\\", + disabled: \\"\\", + color: singleQuote(\\"#09BB07\\"), + name: \\"\\" + }; + var RadioGroup = { + bindChange: \\"\\", + name: \\"\\" + }; + var Slider = { + min: \\"0\\", + max: \\"100\\", + step: \\"1\\", + disabled: \\"\\", + value: \\"0\\", + activeColor: singleQuote(\\"#1aad19\\"), + backgroundColor: singleQuote(\\"#e9e9e9\\"), + \\"block-size\\": \\"28\\", + \\"block-color\\": singleQuote(\\"#ffffff\\"), + \\"show-value\\": \\"false\\", + bindChange: \\"\\", + bindChanging: \\"\\", + name: \\"\\" + }; + var Switch = { + checked: \\"false\\", + disabled: \\"\\", + type: singleQuote(\\"switch\\"), + color: singleQuote(\\"#04BE02\\"), + bindChange: \\"\\", + name: \\"\\" + }; + var Textarea = { + value: \\"\\", + placeholder: \\"\\", + \\"placeholder-style\\": \\"\\", + \\"placeholder-class\\": singleQuote(\\"textarea-placeholder\\"), + disabled: \\"\\", + maxlength: \\"140\\", + \\"auto-focus\\": \\"false\\", + focus: \\"false\\", + \\"auto-height\\": \\"false\\", + fixed: \\"false\\", + \\"cursor-spacing\\": \\"0\\", + cursor: \\"-1\\", + \\"selection-start\\": \\"-1\\", + \\"selection-end\\": \\"-1\\", + bindFocus: \\"\\", + bindBlur: \\"\\", + bindLineChange: \\"\\", + bindInput: \\"\\", + bindConfirm: \\"\\", + name: \\"\\" + }; + var CoverImage = { + src: \\"\\", + bindLoad: \\"eh\\", + bindError: \\"eh\\" + }; + var CoverView = Object.assign({ + \\"scroll-top\\": \\"false\\" + }, touchEvents); + var MovableArea = { + \\"scale-area\\": \\"false\\" + }; + var MovableView = Object.assign(Object.assign({ + direction: \\"none\\", + inertia: \\"false\\", + \\"out-of-bounds\\": \\"false\\", + x: \\"\\", + y: \\"\\", + damping: \\"20\\", + friction: \\"2\\", + disabled: \\"\\", + scale: \\"false\\", + \\"scale-min\\": \\"0.5\\", + \\"scale-max\\": \\"10\\", + \\"scale-value\\": \\"1\\", + animation: \\"true\\", + bindChange: \\"\\", + bindScale: \\"\\", + htouchmove: \\"\\", + vtouchmove: \\"\\", + width: singleQuote(\\"10px\\"), + height: singleQuote(\\"10px\\") + }, touchEvents), animationEvents); + var ScrollView = Object.assign(Object.assign({ + \\"scroll-x\\": \\"false\\", + \\"scroll-y\\": \\"false\\", + \\"upper-threshold\\": \\"50\\", + \\"lower-threshold\\": \\"50\\", + \\"scroll-top\\": \\"\\", + \\"scroll-left\\": \\"\\", + \\"scroll-into-view\\": \\"\\", + \\"scroll-with-animation\\": \\"false\\", + \\"enable-back-to-top\\": \\"false\\", + bindScrollToUpper: \\"\\", + bindScrollToLower: \\"\\", + bindScroll: \\"\\" + }, touchEvents), animationEvents); + var Swiper = Object.assign({ + \\"indicator-dots\\": \\"false\\", + \\"indicator-color\\": singleQuote(\\"rgba(0, 0, 0, .3)\\"), + \\"indicator-active-color\\": singleQuote(\\"#000000\\"), + autoplay: \\"false\\", + current: \\"0\\", + interval: \\"5000\\", + duration: \\"500\\", + circular: \\"false\\", + vertical: \\"false\\", + \\"previous-margin\\": \\"'0px'\\", + \\"next-margin\\": \\"'0px'\\", + \\"display-multiple-items\\": \\"1\\", + bindChange: \\"\\", + bindTransition: \\"\\", + bindAnimationFinish: \\"\\" + }, touchEvents); + var SwiperItem = { + \\"item-id\\": \\"\\" + }; + var Navigator = { + url: \\"\\", + \\"open-type\\": singleQuote(\\"navigate\\"), + delta: \\"1\\", + \\"hover-class\\": singleQuote(\\"navigator-hover\\"), + \\"hover-stop-propagation\\": \\"false\\", + \\"hover-start-time\\": \\"50\\", + \\"hover-stay-time\\": \\"600\\", + bindSuccess: \\"\\", + bindFail: \\"\\", + bindComplete: \\"\\" + }; + var Audio = { + id: \\"\\", + src: \\"\\", + loop: \\"false\\", + controls: \\"false\\", + poster: \\"\\", + name: \\"\\", + author: \\"\\", + bindError: \\"\\", + bindPlay: \\"\\", + bindPause: \\"\\", + bindTimeUpdate: \\"\\", + bindEnded: \\"\\" + }; + var Camera = { + \\"device-position\\": singleQuote(\\"back\\"), + flash: singleQuote(\\"auto\\"), + bindStop: \\"\\", + bindError: \\"\\" + }; + var Image = Object.assign({ + src: \\"\\", + mode: singleQuote(\\"scaleToFill\\"), + \\"lazy-load\\": \\"false\\", + bindError: \\"\\", + bindLoad: \\"\\" + }, touchEvents); + var LivePlayer = { + src: \\"\\", + autoplay: \\"false\\", + muted: \\"false\\", + orientation: singleQuote(\\"vertical\\"), + \\"object-fit\\": singleQuote(\\"contain\\"), + \\"background-mute\\": \\"false\\", + \\"min-cache\\": \\"1\\", + \\"max-cache\\": \\"3\\", + animation: \\"\\", + bindStateChange: \\"\\", + bindFullScreenChange: \\"\\", + bindNetStatus: \\"\\" + }; + var Video = { + src: \\"\\", + duration: \\"\\", + controls: \\"true\\", + \\"danmu-list\\": \\"\\", + \\"danmu-btn\\": \\"\\", + \\"enable-danmu\\": \\"\\", + autoplay: \\"false\\", + loop: \\"false\\", + muted: \\"false\\", + \\"initial-time\\": \\"0\\", + \\"page-gesture\\": \\"false\\", + direction: \\"\\", + \\"show-progress\\": \\"true\\", + \\"show-fullscreen-btn\\": \\"true\\", + \\"show-play-btn\\": \\"true\\", + \\"show-center-play-btn\\": \\"true\\", + \\"enable-progress-gesture\\": \\"true\\", + \\"object-fit\\": singleQuote(\\"contain\\"), + poster: \\"\\", + \\"show-mute-btn\\": \\"false\\", + animation: \\"\\", + bindPlay: \\"\\", + bindPause: \\"\\", + bindEnded: \\"\\", + bindTimeUpdate: \\"\\", + bindFullScreenChange: \\"\\", + bindWaiting: \\"\\", + bindError: \\"\\" + }; + var Canvas = Object.assign({ + \\"canvas-id\\": \\"\\", + \\"disable-scroll\\": \\"false\\", + bindError: \\"\\" + }, touchEvents); + var Ad = { + \\"unit-id\\": \\"\\", + \\"ad-intervals\\": \\"\\", + bindLoad: \\"\\", + bindError: \\"\\", + bindClose: \\"\\" + }; + var WebView = { + src: \\"\\", + bindMessage: \\"\\", + bindLoad: \\"\\", + bindError: \\"\\" + }; + var Block = {}; + var SlotView = { + name: \\"\\" + }; + var Slot = { + name: \\"\\" + }; + var internalComponents = { + View: View, + Icon: Icon, + Progress: Progress, + RichText: RichText, + Text: Text, + Button: Button, + Checkbox: Checkbox, + CheckboxGroup: CheckboxGroup, + Form: Form, + Input: Input, + Label: Label, + Picker: Picker, + PickerView: PickerView, + PickerViewColumn: PickerViewColumn, + Radio: Radio, + RadioGroup: RadioGroup, + Slider: Slider, + Switch: Switch, + CoverImage: CoverImage, + Textarea: Textarea, + CoverView: CoverView, + MovableArea: MovableArea, + MovableView: MovableView, + ScrollView: ScrollView, + Swiper: Swiper, + SwiperItem: SwiperItem, + Navigator: Navigator, + Audio: Audio, + Camera: Camera, + Image: Image, + LivePlayer: LivePlayer, + Video: Video, + Canvas: Canvas, + Ad: Ad, + WebView: WebView, + Block: Block, + Map: MapComp, + Slot: Slot, + SlotView: SlotView + }; + var controlledComponent = new Set([ \\"input\\", \\"checkbox\\", \\"picker\\", \\"picker-view\\", \\"radio\\", \\"slider\\", \\"switch\\", \\"textarea\\" ]); + var focusComponents = new Set([ \\"input\\", \\"textarea\\" ]); + var voidElements = new Set([ \\"progress\\", \\"icon\\", \\"rich-text\\", \\"input\\", \\"textarea\\", \\"slider\\", \\"switch\\", \\"audio\\", \\"live-pusher\\", \\"video\\", \\"ad\\", \\"official-account\\", \\"open-data\\", \\"navigation-bar\\" ]); + var nestElements = new Map([ [ \\"view\\", -1 ], [ \\"cover-view\\", -1 ], [ \\"block\\", -1 ], [ \\"text\\", -1 ], [ \\"slot\\", 8 ], [ \\"slot-view\\", 8 ], [ \\"label\\", 6 ], [ \\"form\\", 4 ], [ \\"scroll-view\\", 4 ] ]); + var EMPTY_OBJ = {}; + var EMPTY_ARR = []; + var noop = function noop() {}; + var defaultReconciler = {}; + var box = function box(v) { + return { + v: v + }; + }; + var unbox = function unbox(b) { + return b.v; + }; + function toDashed(s) { + return s.replace(/([a-z0-9])([A-Z])/g, \\"$1-$2\\").toLowerCase(); + } + function toCamelCase(s) { + var camel = \\"\\"; + var nextCap = false; + for (var i = 0; i < s.length; i++) { + if (s[i] !== \\"-\\") { + camel += nextCap ? s[i].toUpperCase() : s[i]; + nextCap = false; + } else { + nextCap = true; + } + } + return camel; + } + function capitalize(s) { + return s.charAt(0).toUpperCase() + s.slice(1); + } + var shared_esm_hasOwnProperty = Object.prototype.hasOwnProperty; + var hasOwn = function hasOwn(val, key) { + return shared_esm_hasOwnProperty.call(val, key); + }; + var reportIssue = \\"\\\\u5982\\\\u6709\\\\u7591\\\\u95ee\\\\uff0c\\\\u8bf7\\\\u63d0\\\\u4ea4 issue \\\\u81f3\\\\uff1ahttps://github.com/nervjs/taro/issues\\"; + function ensure(condition, msg) { + if (!condition) { + throw new Error(msg + \\"\\\\n\\" + reportIssue); + } + } + function warn(condition, msg) { + if (false) {} + } + function queryToJson(str) { + var dec = decodeURIComponent; + var qp = str.split(\\"&\\"); + var ret = {}; + var name; + var val; + for (var i = 0, l = qp.length, item; i < l; ++i) { + item = qp[i]; + if (item.length) { + var s = item.indexOf(\\"=\\"); + if (s < 0) { + name = dec(item); + val = \\"\\"; + } else { + name = dec(item.slice(0, s)); + val = dec(item.slice(s + 1)); + } + if (typeof ret[name] === \\"string\\") { + ret[name] = [ ret[name] ]; + } + if (Array.isArray(ret[name])) { + ret[name].push(val); + } else { + ret[name] = val; + } + } + } + return ret; + } + var _uniqueId = 1; + var _loadTime = (new Date).getTime().toString(); + function getUniqueKey() { + return _loadTime + _uniqueId++; + } + var cacheData = {}; + function cacheDataSet(key, val) { + cacheData[key] = val; + } + function cacheDataGet(key, delelteAfterGet) { + var temp = cacheData[key]; + delelteAfterGet && delete cacheData[key]; + return temp; + } + function cacheDataHas(key) { + return key in cacheData; + } + function mergeInternalComponents(components) { + Object.keys(components).forEach((function(name) { + if (name in internalComponents) { + Object.assign(internalComponents[name], components[name]); + } else { + internalComponents[name] = components[name]; + } + })); + } + function mergeReconciler(hostConfig) { + Object.assign(defaultReconciler, hostConfig); + } + var weixinAdapter = { + if: \\"wx:if\\", + else: \\"wx:else\\", + elseif: \\"wx:elif\\", + for: \\"wx:for\\", + forItem: \\"wx:for-item\\", + forIndex: \\"wx:for-index\\", + key: \\"wx:key\\", + xs: \\"wxs\\", + type: \\"weapp\\" + }; + var shared_esm_BaseTemplate = function() { + function BaseTemplate() { + var _this = this; + _classCallCheck(this, BaseTemplate); + this.exportExpr = \\"module.exports =\\"; + this.supportXS = false; + this.Adapter = weixinAdapter; + this.internalComponents = internalComponents; + this.focusComponents = focusComponents; + this.voidElements = voidElements; + this.nestElements = nestElements; + this.buildPageTemplate = function(baseTempPath) { + var template = ' \\\\n'); + return template; + }; + this.buildBaseComponentTemplate = function(ext) { + var data = !_this.isSupportRecursive && _this.supportXS ? _this.dataKeymap(\\"i:i,l:l\\") : _this.dataKeymap(\\"i:i\\"); + return ' \\\\n'); + }; + this.buildXScript = function() { + return \\"\\".concat(_this.exportExpr, \\" {\\\\n a: \\").concat(_this.buildXSTmplName(), \\",\\\\n b: function (a, b) {\\\\n return a === undefined ? b : a\\\\n },\\\\n c: function(i, prefix) {\\\\n var s = i.focus !== undefined ? 'focus' : 'blur'\\\\n return prefix + i.\\", \\"nn\\", \\" + '_' + s\\\\n },\\\\n d: function (i, v) {\\\\n return i === undefined ? v : i\\\\n },\\\\n e: function (n) {\\\\n return 'tmpl_' + n + '_\\", \\"container\\", \\"'\\\\n },\\\\n \\").concat(_this.buildXSTmpExtra(), \\"\\\\n}\\"); + }; + } + _createClass(BaseTemplate, [ { + key: \\"buildAttribute\\", + value: function buildAttribute(attrs, nodeName) { + var _this2 = this; + return Object.keys(attrs).map((function(k) { + return \\"\\".concat(k, '=\\"').concat(k.startsWith(\\"bind\\") || k.startsWith(\\"on\\") ? attrs[k] : \\"{\\".concat(_this2.getAttrValue(attrs[k], k, nodeName), \\"}\\"), '\\" '); + })).join(\\"\\"); + } + }, { + key: \\"replacePropName\\", + value: function replacePropName(name, value, _componentName) { + if (value === \\"eh\\") return name.toLowerCase(); + return name; + } + }, { + key: \\"createMiniComponents\\", + value: function createMiniComponents(components) { + var result = Object.create(null); + for (var key in components) { + if (hasOwn(components, key)) { + var component = components[key]; + var compName = toDashed(key); + var newComp = Object.create(null); + if (isFunction(this.modifyCompProps)) { + component = this.modifyCompProps(compName, component); + } + for (var prop in component) { + if (hasOwn(component, prop)) { + var propValue = component[prop]; + if (prop.startsWith(\\"bind\\") || specialEvents.has(prop)) { + propValue = \\"eh\\"; + } else if (propValue === \\"\\") { + propValue = \\"i.\\".concat(toCamelCase(prop)); + } else if (isBooleanStringLiteral(propValue) || isNumber(+propValue)) { + propValue = this.supportXS ? \\"xs.b(i.\\".concat(toCamelCase(prop), \\",\\").concat(propValue, \\")\\") : \\"i.\\".concat(toCamelCase(prop), \\"===undefined?\\").concat(propValue, \\":i.\\").concat(toCamelCase(prop)); + } else { + propValue = \\"i.\\".concat(toCamelCase(prop), \\"||\\").concat(propValue || singleQuote(\\"\\")); + } + prop = this.replacePropName(prop, propValue, compName); + newComp[prop] = propValue; + } + } + if (compName !== \\"block\\") { + Object.assign(newComp, styles, this.getEvents()); + } + if (compName === \\"swiper-item\\") { + delete newComp.style; + } + if (compName === \\"slot\\" || compName === \\"slot-view\\") { + result[compName] = { + slot: \\"i.name\\" + }; + } else { + result[compName] = newComp; + } + } + } + return result; + } + }, { + key: \\"buildBaseTemplate\\", + value: function buildBaseTemplate() { + var Adapter = this.Adapter; + var data = !this.isSupportRecursive && this.supportXS ? \\"\\".concat(this.dataKeymap(\\"i:item,l:''\\")) : this.dataKeymap(\\"i:item\\"); + return \\"\\".concat(this.buildXsTemplate(), '\\\\n\\\\n \\\\n \\\\n \\\\n\\\\n'); + } + }, { + key: \\"buildThirdPartyAttr\\", + value: function buildThirdPartyAttr(attrs) { + return Array.from(attrs).reduce((function(str, attr) { + if (attr.startsWith(\\"@\\")) { + return str + \\"bind\\".concat(attr.slice(1), '=\\"eh\\" '); + } else if (attr.startsWith(\\"bind\\")) { + return str + \\"\\".concat(attr, '=\\"eh\\" '); + } else if (attr.startsWith(\\"on\\")) { + return str + \\"bind\\".concat(attr.slice(2).toLowerCase(), '=\\"eh\\" '); + } + return str + \\"\\".concat(attr, '=\\"{{i.').concat(toCamelCase(attr), '}}\\" '); + }), \\"\\"); + } + }, { + key: \\"buildComponentTemplate\\", + value: function buildComponentTemplate(comp, level) { + return this.focusComponents.has(comp.nodeName) ? this.buildFocusComponentTemplte(comp, level) : this.buildStandardComponentTemplate(comp, level); + } + }, { + key: \\"buildFocusComponentTemplte\\", + value: function buildFocusComponentTemplte(comp, level) { + var attrs = Object.assign({}, comp.attributes); + var templateName = this.supportXS ? \\"xs.c(i, 'tmpl_\\".concat(level, \\"_')\\") : \\"i.focus ? 'tmpl_\\".concat(level, \\"_\\").concat(comp.nodeName, \\"_focus' : 'tmpl_\\").concat(level, \\"_\\").concat(comp.nodeName, \\"_blur'\\"); + delete attrs.focus; + return '\\\\n\\\\n \\\\n\\\\n\\\\n\\\\n <').concat(comp.nodeName, \\" \\").concat(this.buildAttribute(comp.attributes, comp.nodeName), ' id=\\"{{i.uid}}\\" />\\\\n\\\\n\\\\n\\\\n <').concat(comp.nodeName, \\" \\").concat(this.buildAttribute(attrs, comp.nodeName), ' id=\\"{{i.uid}}\\" />\\\\n\\\\n'); + } + }, { + key: \\"buildStandardComponentTemplate\\", + value: function buildStandardComponentTemplate(comp, level) { + var isSupportRecursive = this.isSupportRecursive, Adapter = this.Adapter; + var nextLevel = isSupportRecursive ? 0 : level + 1; + var data = !this.isSupportRecursive ? \\"\\".concat(this.dataKeymap(\\"i:item,l:l\\")) : this.dataKeymap(\\"i:item\\"); + var child = this.supportXS ? '') : ''); + if (isFunction(this.modifyLoopBody)) { + child = this.modifyLoopBody(child, comp.nodeName); + } + var children = this.voidElements.has(comp.nodeName) ? \\"\\" : \\"\\\\n\\\\n ').concat(child, \\"\\\\n \\\\n \\"); + if (isFunction(this.modifyLoopContainer)) { + children = this.modifyLoopContainer(children, comp.nodeName); + } + var nodeName = comp.nodeName === \\"slot\\" || comp.nodeName === \\"slot-view\\" ? \\"view\\" : comp.nodeName; + var res = '\\\\n\\\\n <').concat(nodeName, \\" \\").concat(this.buildAttribute(comp.attributes, comp.nodeName), ' id=\\"{{i.uid}}\\">').concat(children, \\"\\").concat(nodeName, \\">\\\\n\\\\n\\"); + if (isFunction(this.modifyTemplateResult)) { + res = this.modifyTemplateResult(res, comp.nodeName, level, children); + } + return res; + } + }, { + key: \\"buildPlainTextTemplate\\", + value: function buildPlainTextTemplate(level) { + return '\\\\n\\\\n{{i.', \\"v\\", \\"}} \\\\n\\\\n\\"); + } + }, { + key: \\"buildThirdPartyTemplate\\", + value: function buildThirdPartyTemplate(level, componentConfig) { + var _this3 = this; + var Adapter = this.Adapter, isSupportRecursive = this.isSupportRecursive; + var nextLevel = isSupportRecursive ? 0 : level + 1; + var template = \\"\\"; + var data = !this.isSupportRecursive && this.supportXS ? \\"\\".concat(this.dataKeymap(\\"i:item,l:l\\")) : this.dataKeymap(\\"i:item\\"); + componentConfig.thirdPartyComponents.forEach((function(attrs, compName) { + template += '\\\\n\\\\n <').concat(compName, \\" \\").concat(_this3.buildThirdPartyAttr(attrs), ' id=\\"{{i.uid}}\\">\\\\n\\\\n \\\\n \\\\n ').concat(compName, \\">\\\\n\\\\n \\"); + })); + return template; + } + }, { + key: \\"buildContainerTemplate\\", + value: function buildContainerTemplate(level) { + var restart = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; + var tmpl = \\"\\"; + if (restart) { + if (!this.isSupportRecursive && this.supportXS) { + tmpl = ''; + } else { + tmpl = ' '; + } + } else { + var xs = !this.isSupportRecursive ? \\"xs.a(\\".concat(level, \\", i.\\", \\"nn\\", \\", l)\\") : \\"xs.a(\\".concat(level, \\", i.\\", \\"nn\\", \\")\\"); + var data = !this.isSupportRecursive ? \\"\\".concat(this.dataKeymap(\\"i:i,cid:\\".concat(level, \\",l:xs.f(l,i.\\", \\"nn\\", \\")\\"))) : \\"\\".concat(this.dataKeymap(\\"i:i\\")); + tmpl = this.supportXS ? '') : \\"'); + } + return '\\\\n\\\\n ').concat(tmpl, \\"\\\\n\\\\n\\"); + } + }, { + key: \\"dataKeymap\\", + value: function dataKeymap(keymap) { + return keymap; + } + }, { + key: \\"getEvents\\", + value: function getEvents() { + return events; + } + }, { + key: \\"getAttrValue\\", + value: function getAttrValue(value, _key, _nodeName) { + return \\"{\\".concat(value, \\"}\\"); + } + }, { + key: \\"buildXsTemplate\\", + value: function buildXsTemplate() { + return \\"\\"; + } + }, { + key: \\"mergeComponents\\", + value: function mergeComponents(ctx, patch) { + ctx.helper.recursiveMerge(this.internalComponents, patch); + } + }, { + key: \\"buildXSTmplName\\", + value: function buildXSTmplName() { + return \\"function (l, n) {\\\\n return 'tmpl_' + l + '_' + n\\\\n }\\"; + } + }, { + key: \\"buildXSTmpExtra\\", + value: function buildXSTmpExtra() { + return \\"\\"; + } + } ]); + return BaseTemplate; + }(); + var shared_esm_RecursiveTemplate = function(_BaseTemplate) { + _inherits(RecursiveTemplate, _BaseTemplate); + function RecursiveTemplate() { + var _this4; + _classCallCheck(this, RecursiveTemplate); + _this4 = _possibleConstructorReturn(this, _getPrototypeOf(RecursiveTemplate).apply(this, arguments)); + _this4.isSupportRecursive = true; + _this4.buildTemplate = function(componentConfig) { + var template = _this4.buildBaseTemplate(); + if (!_this4.miniComponents) { + _this4.miniComponents = _this4.createMiniComponents(_this4.internalComponents); + } + var ZERO_FLOOR = 0; + var components = Object.keys(_this4.miniComponents).filter((function(c) { + return componentConfig.includes.size && !componentConfig.includeAll ? componentConfig.includes.has(c) : true; + })); + template = components.reduce((function(current, nodeName) { + var attributes = _this4.miniComponents[nodeName]; + return current + _this4.buildComponentTemplate({ + nodeName: nodeName, + attributes: attributes + }, ZERO_FLOOR); + }), template); + template += _this4.buildPlainTextTemplate(ZERO_FLOOR); + template += _this4.buildThirdPartyTemplate(ZERO_FLOOR, componentConfig); + template += _this4.buildContainerTemplate(ZERO_FLOOR); + return template; + }; + return _this4; + } + return RecursiveTemplate; + }(shared_esm_BaseTemplate); + var shared_esm_UnRecursiveTemplate = function(_BaseTemplate2) { + _inherits(UnRecursiveTemplate, _BaseTemplate2); + function UnRecursiveTemplate() { + var _this5; + _classCallCheck(this, UnRecursiveTemplate); + _this5 = _possibleConstructorReturn(this, _getPrototypeOf(UnRecursiveTemplate).apply(this, arguments)); + _this5.isSupportRecursive = false; + _this5._baseLevel = 16; + _this5.buildTemplate = function(componentConfig) { + _this5.componentConfig = componentConfig; + if (!_this5.miniComponents) { + _this5.miniComponents = _this5.createMiniComponents(_this5.internalComponents); + } + var components = Object.keys(_this5.miniComponents).filter((function(c) { + return componentConfig.includes.size && !componentConfig.includeAll ? componentConfig.includes.has(c) : true; + })); + var template = _this5.buildBaseTemplate(); + for (var i = 0; i < _this5.baseLevel; i++) { + template += _this5.supportXS ? _this5.buildOptimizeFloor(i, components, _this5.baseLevel === i + 1) : _this5.buildFloor(i, components, _this5.baseLevel === i + 1); + } + return template; + }; + return _this5; + } + _createClass(UnRecursiveTemplate, [ { + key: \\"buildFloor\\", + value: function buildFloor(level, components) { + var _this6 = this; + var restart = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; + if (restart) return this.buildContainerTemplate(level, restart); + var template = components.reduce((function(current, nodeName) { + var attributes = _this6.miniComponents[nodeName]; + return current + _this6.buildComponentTemplate({ + nodeName: nodeName, + attributes: attributes + }, level); + }), \\"\\"); + template += this.buildPlainTextTemplate(level); + template += this.buildThirdPartyTemplate(level, this.componentConfig); + template += this.buildContainerTemplate(level, restart); + return template; + } + }, { + key: \\"buildOptimizeFloor\\", + value: function buildOptimizeFloor(level, components) { + var _this7 = this; + var restart = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; + if (restart) return this.buildContainerTemplate(level, restart); + var template = components.reduce((function(current, nodeName) { + if (level !== 0) { + if (!_this7.nestElements.has(nodeName)) { + return current; + } else { + var max = _this7.nestElements.get(nodeName); + if (max > 0 && level >= max) { + return current; + } + } + } + var attributes = _this7.miniComponents[nodeName]; + return current + _this7.buildComponentTemplate({ + nodeName: nodeName, + attributes: attributes + }, level); + }), \\"\\"); + if (level === 0) template += this.buildPlainTextTemplate(level); + template += this.buildThirdPartyTemplate(level, this.componentConfig); + template += this.buildContainerTemplate(level); + return template; + } + }, { + key: \\"buildXSTmplName\\", + value: function buildXSTmplName() { + var comps = [].concat(_toConsumableArray(Array.from(this.nestElements.keys())), _toConsumableArray(Array.from(this.componentConfig.thirdPartyComponents.keys()))); + var hasMaxComps = []; + this.nestElements.forEach((function(max, comp) { + if (max > -1) hasMaxComps.push(comp); + })); + return \\"function (l, n, s) {\\\\n var a = \\".concat(JSON.stringify(comps), \\"\\\\n var b = \\").concat(JSON.stringify(hasMaxComps), \\"\\\\n if (a.indexOf(n) === -1) {\\\\n l = 0\\\\n }\\\\n if (b.indexOf(n) > -1) {\\\\n var u = s.split(',')\\\\n var depth = 0\\\\n for (var i = 0; i < u.length; i++) {\\\\n if (u[i] === n) depth++\\\\n }\\\\n l = depth\\\\n }\\\\n return 'tmpl_' + l + '_' + n\\\\n }\\"); + } + }, { + key: \\"buildXSTmpExtra\\", + value: function buildXSTmpExtra() { + var hasMaxComps = []; + this.nestElements.forEach((function(max, comp) { + if (max > -1) hasMaxComps.push(comp); + })); + return \\"f: function (l, n) {\\\\n var b = \\".concat(JSON.stringify(hasMaxComps), \\"\\\\n if (b.indexOf(n) > -1) {\\\\n if (l) l += ','\\\\n l += n\\\\n }\\\\n return l\\\\n }\\"); + } + }, { + key: \\"baseLevel\\", + set: function set(lv) { + this._baseLevel = lv; + }, + get: function get() { + return this._baseLevel; + } + } ]); + return UnRecursiveTemplate; + }(shared_esm_BaseTemplate); + var _onAndSyncApis = new Set([ \\"getAccountInfoSync\\", \\"getEnterOptionsSync\\", \\"offBLEPeripheralConnectionStateChanged\\", \\"offBeaconServiceChange\\", \\"offBeaconUpdate\\", \\"offDeviceMotionChange\\", \\"offHCEMessage\\", \\"offKeyboardHeightChange\\", \\"offLocalServiceDiscoveryStop\\", \\"offLocalServiceFound\\", \\"offLocalServiceLost\\", \\"offLocalServiceResolveFail\\", \\"offLocationChange\\", \\"offThemeChange\\", \\"offVoIPChatInterrupted\\", \\"offVoIPChatMembersChanged\\", \\"offVoIPVideoMembersChanged\\", \\"offWifiConnected\\", \\"offWindowResize\\", \\"onBLEPeripheralConnectionStateChanged\\", \\"onBackgroundAudioPause\\", \\"onBackgroundAudioPlay\\", \\"onBackgroundAudioStop\\", \\"onBackgroundFetchData\\", \\"onHCEMessage\\", \\"onKeyboardHeightChange\\", \\"onLocalServiceDiscoveryStop\\", \\"onLocalServiceFound\\", \\"onLocalServiceLost\\", \\"onLocalServiceResolveFail\\", \\"onLocationChange\\", \\"onThemeChange\\", \\"onVoIPChatInterrupted\\", \\"onVoIPChatMembersChanged\\", \\"onVoIPChatSpeakersChanged\\", \\"onVoIPVideoMembersChanged\\", \\"onWifiConnected\\", \\"onWindowResize\\", \\"reportMonitor\\" ]); + var _noPromiseApis = new Set([ \\"createAudioContext\\", \\"createLivePusherContext\\", \\"createMediaContainer\\", \\"createMediaRecorder\\", \\"createOffscreenCanvas\\", \\"createRewardedVideoAd\\", \\"createUDPSocket\\", \\"createVideoDecoder\\", \\"createWorker\\", \\"getLogManager\\", \\"getNFCAdapter\\", \\"getPerformance\\", \\"getRealtimeLogManager\\", \\"pauseBackgroundAudio\\", \\"pauseVoice\\", \\"reportPerformance\\", \\"stopBackgroundAudio\\", \\"stopRecord\\", \\"stopVoice\\" ]); + var _otherApis = new Set([ \\"addCard\\", \\"authPrivateMessage\\", \\"checkIsOpenAccessibility\\", \\"checkIsSoterEnrolledInDevice\\", \\"checkIsSupportSoterAuthentication\\", \\"chooseInvoice\\", \\"chooseMedia\\", \\"chooseMessageFile\\", \\"compressVideo\\", \\"connectWifi\\", \\"createBLEPeripheralServer\\", \\"disableAlertBeforeUnload\\", \\"enableAlertBeforeUnload\\", \\"exitVoIPChat\\", \\"getBLEDeviceRSSI\\", \\"getBackgroundAudioPlayerState\\", \\"getBackgroundFetchData\\", \\"getBackgroundFetchToken\\", \\"getGroupEnterInfo\\", \\"getHCEState\\", \\"getSelectedTextRange\\", \\"getShareInfo\\", \\"getVideoInfo\\", \\"getWeRunData\\", \\"join1v1Chat\\", \\"joinVoIPChat\\", \\"makeBluetoothPair\\", \\"openCard\\", \\"openVideoEditor\\", \\"playBackgroundAudio\\", \\"playVoice\\", \\"previewMedia\\", \\"requestPayment\\", \\"saveFileToDisk\\", \\"scanItem\\", \\"seekBackgroundAudio\\", \\"sendHCEMessage\\", \\"setBLEMTU\\", \\"setBackgroundFetchToken\\", \\"setEnable1v1Chat\\", \\"setTopBarText\\", \\"setWifiList\\", \\"setWindowSize\\", \\"showRedPackage\\", \\"startGyroscope\\", \\"startHCE\\", \\"startLocalServiceDiscovery\\", \\"startLocationUpdate\\", \\"startLocationUpdateBackground\\", \\"startRecord\\", \\"startSoterAuthentication\\", \\"startWifi\\", \\"stopGyroscope\\", \\"stopHCE\\", \\"stopLocalServiceDiscovery\\", \\"stopLocationUpdate\\", \\"stopWifi\\", \\"subscribeVoIPVideoMembers\\", \\"updateShareMenu\\", \\"updateVoIPChatMuteConfig\\", \\"updateWeChatApp\\" ]); + var RequestQueue = { + MAX_REQUEST: 5, + queue: [], + request: function request(options) { + this.push(options); + return this.run(); + }, + push: function push(options) { + this.queue.push(options); + }, + run: function run() { + var _this = this; + if (!this.queue.length) { + return; + } + if (this.queue.length <= this.MAX_REQUEST) { + var options = this.queue.shift(); + var completeFn = options.complete; + options.complete = function() { + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + completeFn && completeFn.apply(options, args); + _this.run(); + }; + return wx.request(options); + } + } + }; + function taroInterceptor(chain) { + return request(chain.requestParams); + } + function request(options) { + options = options || {}; + if (typeof options === \\"string\\") { + options = { + url: options + }; + } + var originSuccess = options.success; + var originFail = options.fail; + var originComplete = options.complete; + var requestTask; + var p = new Promise((function(resolve, reject) { + options.success = function(res) { + originSuccess && originSuccess(res); + resolve(res); + }; + options.fail = function(res) { + originFail && originFail(res); + reject(res); + }; + options.complete = function(res) { + originComplete && originComplete(res); + }; + requestTask = RequestQueue.request(options); + })); + p.abort = function(cb) { + cb && cb(); + if (requestTask) { + requestTask.abort(); + } + return p; + }; + return p; + } + function processApis(taro) { + var onAndSyncApis = new Set([].concat(_toConsumableArray(taro.onAndSyncApis), _toConsumableArray(_onAndSyncApis))); + var noPromiseApis = new Set([].concat(_toConsumableArray(taro.noPromiseApis), _toConsumableArray(_noPromiseApis))); + var otherApis = new Set([].concat(_toConsumableArray(taro.otherApis), _toConsumableArray(_otherApis))); + var apis = [].concat(_toConsumableArray(onAndSyncApis), _toConsumableArray(noPromiseApis), _toConsumableArray(otherApis)); + var useDataCacheApis = { + navigateTo: true, + redirectTo: true, + reLaunch: true + }; + var routerParamsPrivateKey = \\"__key_\\"; + var preloadPrivateKey = \\"__preload_\\"; + var preloadInitedComponent = \\"$preloadComponent\\"; + apis.forEach((function(key) { + if (!(key in wx)) { + taro[key] = function() { + console.warn(\\"\\\\u5fae\\\\u4fe1\\\\u5c0f\\\\u7a0b\\\\u5e8f\\\\u6682\\\\u4e0d\\\\u652f\\\\u6301 \\".concat(key)); + }; + return; + } + if (otherApis.has(key)) { + taro[key] = function(options) { + for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) { + args[_key2 - 1] = arguments[_key2]; + } + options = options || {}; + var task = null; + var obj = Object.assign({}, options); + if (typeof options === \\"string\\") { + if (args.length) { + var _wx; + return (_wx = wx)[key].apply(_wx, [ options ].concat(args)); + } + return wx[key](options); + } + if (key === \\"navigateTo\\" || key === \\"redirectTo\\" || key === \\"switchTab\\") { + var url = obj.url ? obj.url.replace(/^\\\\//, \\"\\") : \\"\\"; + if (url.indexOf(\\"?\\") > -1) url = url.split(\\"?\\")[0]; + var Component = cacheDataGet(url); + if (Component) { + var component = new Component; + if (component.componentWillPreload) { + var cacheKey = getUniqueKey(); + var MarkIndex = obj.url.indexOf(\\"?\\"); + var hasMark = MarkIndex > -1; + var urlQueryStr = hasMark ? obj.url.substring(MarkIndex + 1, obj.url.length) : \\"\\"; + var params = queryToJson(urlQueryStr); + obj.url += (hasMark ? \\"&\\" : \\"?\\") + \\"\\".concat(preloadPrivateKey, \\"=\\").concat(cacheKey); + cacheDataSet(cacheKey, component.componentWillPreload(params)); + cacheDataSet(preloadInitedComponent, component); + } + } + } + if (useDataCacheApis[key]) { + var _url = obj.url = obj.url || \\"\\"; + var _MarkIndex = _url.indexOf(\\"?\\"); + var _hasMark = _MarkIndex > -1; + var _urlQueryStr = _hasMark ? _url.substring(_MarkIndex + 1, _url.length) : \\"\\"; + var _params = queryToJson(_urlQueryStr); + var _cacheKey = getUniqueKey(); + obj.url += (_hasMark ? \\"&\\" : \\"?\\") + \\"\\".concat(routerParamsPrivateKey, \\"=\\").concat(_cacheKey); + cacheDataSet(_cacheKey, _params); + } + var p = new Promise((function(resolve, reject) { + [ \\"fail\\", \\"success\\", \\"complete\\" ].forEach((function(k) { + obj[k] = function(res) { + options[k] && options[k](res); + if (k === \\"success\\") { + if (key === \\"connectSocket\\") { + resolve(Promise.resolve().then((function() { + return Object.assign(task, res); + }))); + } else { + resolve(res); + } + } else if (k === \\"fail\\") { + reject(res); + } + }; + })); + if (args.length) { + var _wx2; + task = (_wx2 = wx)[key].apply(_wx2, [ obj ].concat(args)); + } else { + task = wx[key](obj); + } + })); + if (key === \\"uploadFile\\" || key === \\"downloadFile\\") { + p.progress = function(cb) { + if (task) { + task.onProgressUpdate(cb); + } + return p; + }; + p.abort = function(cb) { + cb && cb(); + if (task) { + task.abort(); + } + return p; + }; + } + return p; + }; + } else { + taro[key] = function() { + for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) { + args[_key3] = arguments[_key3]; + } + var argsLen = args.length; + var newArgs = args.concat(); + var lastArg = newArgs[argsLen - 1]; + if (lastArg && lastArg.isTaroComponent && lastArg.$scope) { + newArgs.splice(argsLen - 1, 1, lastArg.$scope); + } + return wx[key].apply(wx, newArgs); + }; + } + })); + } + function pxTransform(size) { + var _ref = this.config || {}, _ref$designWidth = _ref.designWidth, designWidth = _ref$designWidth === void 0 ? 750 : _ref$designWidth, _ref$deviceRatio = _ref.deviceRatio, deviceRatio = _ref$deviceRatio === void 0 ? { + 640: 2.34 / 2, + 750: 1, + 828: 1.81 / 2 + } : _ref$deviceRatio; + if (!(designWidth in deviceRatio)) { + throw new Error(\\"deviceRatio \\\\u914d\\\\u7f6e\\\\u4e2d\\\\u4e0d\\\\u5b58\\\\u5728 \\".concat(designWidth, \\" \\\\u7684\\\\u8bbe\\\\u7f6e\\\\uff01\\")); + } + return parseInt(size, 10) * deviceRatio[designWidth] + \\"rpx\\"; + } + function canIUseWebp() { + var _wx$getSystemInfoSync = wx.getSystemInfoSync(), platform = _wx$getSystemInfoSync.platform; + var platformLower = platform.toLowerCase(); + if (platformLower === \\"android\\" || platformLower === \\"devtools\\") { + return true; + } + return false; + } + function wxCloud(taro) { + var wxC = wx.cloud || {}; + var wxcloud = {}; + var apiList = [ \\"init\\", \\"database\\", \\"uploadFile\\", \\"downloadFile\\", \\"getTempFileURL\\", \\"deleteFile\\", \\"callFunction\\", \\"CloudID\\" ]; + apiList.forEach((function(v) { + wxcloud[v] = wxC[v]; + })); + taro.cloud = wxcloud; + } + function initNativeApi(taro) { + processApis(taro); + var link = new taro.Link(taroInterceptor); + taro.request = link.request.bind(link); + taro.addInterceptor = link.addInterceptor.bind(link); + taro.cleanInterceptors = link.cleanInterceptors.bind(link); + taro.getCurrentPages = getCurrentPages; + taro.getApp = getApp; + taro.requirePlugin = requirePlugin; + taro.initPxTransform = taro.initPxTransform.bind(taro); + taro.pxTransform = pxTransform.bind(taro); + taro.canIUseWebp = canIUseWebp; + taro.env = wx.env; + wxCloud(taro); + } + var components = { + Progress: { + \\"border-radius\\": \\"0\\", + \\"font-size\\": \\"16\\", + duration: \\"30\\", + bindActiveEnd: \\"\\" + }, + RichText: { + space: \\"\\" + }, + Text: { + \\"user-select\\": \\"false\\" + }, + Map: { + polygons: \\"[]\\", + subkey: \\"\\", + rotate: \\"0\\", + skew: \\"0\\", + \\"enable-3D\\": \\"false\\", + \\"show-compass\\": \\"false\\", + \\"show-scale\\": \\"false\\", + \\"enable-overlooking\\": \\"false\\", + \\"enable-zoom\\": \\"true\\", + \\"enable-scroll\\": \\"true\\", + \\"enable-rotate\\": \\"false\\", + \\"enable-satellite\\": \\"false\\", + \\"enable-traffic\\": \\"false\\", + setting: \\"[]\\", + bindLabelTap: \\"\\", + bindRegionChange: \\"\\", + bindPoiTap: \\"\\" + }, + Button: { + lang: \\"en\\", + \\"session-from\\": \\"\\", + \\"send-message-title\\": \\"\\", + \\"send-message-path\\": \\"\\", + \\"send-message-img\\": \\"\\", + \\"app-parameter\\": \\"\\", + \\"show-message-card\\": \\"false\\", + bindGetUserInfo: \\"\\", + bindContact: \\"\\", + bindGetPhoneNumber: \\"\\", + bindError: \\"\\", + bindOpenSetting: \\"\\", + bindLaunchApp: \\"\\" + }, + Form: { + \\"report-submit-timeout\\": \\"0\\" + }, + Input: { + \\"auto-focus\\": \\"false\\", + \\"always-embed\\": \\"false\\", + \\"adjust-position\\": \\"true\\", + \\"hold-keyboard\\": \\"false\\", + bindKeyboardHeightChange: \\"\\" + }, + Picker: { + \\"header-text\\": \\"\\" + }, + PickerView: { + bindPickStart: \\"\\", + bindPickEnd: \\"\\" + }, + Slider: { + color: singleQuote(\\"#e9e9e9\\"), + \\"selected-color\\": singleQuote(\\"#1aad19\\") + }, + Textarea: { + \\"show-confirm-bar\\": \\"true\\", + \\"adjust-position\\": \\"true\\", + \\"hold-keyboard\\": \\"false\\", + \\"disable-default-padding\\": \\"false\\", + bindKeyboardHeightChange: \\"\\" + }, + ScrollView: { + \\"enable-flex\\": \\"false\\", + \\"scroll-anchoring\\": \\"false\\", + \\"refresher-enabled\\": \\"false\\", + \\"refresher-threshold\\": \\"45\\", + \\"refresher-default-style\\": singleQuote(\\"black\\"), + \\"refresher-background\\": singleQuote(\\"#FFF\\"), + \\"refresher-triggered\\": \\"false\\", + enhanced: \\"false\\", + bounces: \\"true\\", + \\"show-scrollbar\\": \\"true\\", + \\"paging-enabled\\": \\"false\\", + \\"fast-deceleration\\": \\"false\\", + bindDragStart: \\"\\", + bindDragging: \\"\\", + bindDragEnd: \\"\\", + bindRefresherPulling: \\"\\", + bindRefresherRefresh: \\"\\", + bindRefresherRestore: \\"\\", + bindRefresherAbort: \\"\\" + }, + Swiper: { + \\"snap-to-edge\\": \\"false\\", + \\"easing-function\\": singleQuote(\\"default\\") + }, + SwiperItem: { + \\"skip-hidden-item-layout\\": \\"false\\" + }, + Navigator: { + target: singleQuote(\\"self\\"), + \\"app-id\\": \\"\\", + path: \\"\\", + \\"extra-data\\": \\"\\", + version: singleQuote(\\"version\\") + }, + Camera: { + mode: singleQuote(\\"normal\\"), + resolution: singleQuote(\\"medium\\"), + \\"frame-size\\": singleQuote(\\"medium\\"), + bindInitDone: \\"\\", + bindScanCode: \\"\\" + }, + Image: { + webp: \\"false\\", + \\"show-menu-by-longpress\\": \\"false\\" + }, + LivePlayer: { + mode: singleQuote(\\"live\\"), + \\"sound-mode\\": singleQuote(\\"speaker\\"), + \\"auto-pause-if-navigate\\": \\"true\\", + \\"auto-pause-if-open-native\\": \\"true\\", + \\"picture-in-picture-mode\\": \\"[]\\", + bindAudioVolumeNotify: \\"\\", + bindEnterPictureInPicture: \\"\\", + bindLeavePictureInPicture: \\"\\" + }, + Video: { + title: \\"\\", + \\"play-btn-position\\": singleQuote(\\"bottom\\"), + \\"enable-play-gesture\\": \\"false\\", + \\"auto-pause-if-navigate\\": \\"true\\", + \\"auto-pause-if-open-native\\": \\"true\\", + \\"vslide-gesture\\": \\"false\\", + \\"vslide-gesture-in-fullscreen\\": \\"true\\", + \\"ad-unit-id\\": \\"\\", + \\"poster-for-crawler\\": \\"\\", + \\"show-casting-button\\": \\"false\\", + \\"picture-in-picture-mode\\": \\"[]\\", + \\"enable-auto-rotation\\": \\"false\\", + \\"show-screen-lock-button\\": \\"false\\", + bindProgress: \\"\\", + bindLoadedMetadata: \\"\\", + bindControlsToggle: \\"\\", + bindEnterPictureInPicture: \\"\\", + bindLeavePictureInPicture: \\"\\", + bindSeekComplete: \\"\\" + }, + Canvas: { + type: \\"\\" + }, + Ad: { + \\"ad-type\\": singleQuote(\\"banner\\"), + \\"ad-theme\\": singleQuote(\\"white\\") + }, + Editor: { + \\"read-only\\": \\"false\\", + placeholder: \\"\\", + \\"show-img-size\\": \\"false\\", + \\"show-img-toolbar\\": \\"false\\", + \\"show-img-resize\\": \\"false\\", + focus: \\"false\\", + bindReady: \\"\\", + bindFocus: \\"\\", + bindBlur: \\"\\", + bindInput: \\"\\", + bindStatusChange: \\"\\", + name: \\"\\" + }, + MatchMedia: { + \\"min-width\\": \\"\\", + \\"max-width\\": \\"\\", + width: \\"\\", + \\"min-height\\": \\"\\", + \\"max-height\\": \\"\\", + height: \\"\\", + orientation: \\"\\" + }, + FunctionalPageNavigator: { + version: singleQuote(\\"release\\"), + name: \\"\\", + args: \\"\\", + bindSuccess: \\"\\", + bindFail: \\"\\", + bindCancel: \\"\\" + }, + LivePusher: { + url: \\"\\", + mode: singleQuote(\\"RTC\\"), + autopush: \\"false\\", + muted: \\"false\\", + \\"enable-camera\\": \\"true\\", + \\"auto-focus\\": \\"true\\", + orientation: singleQuote(\\"vertical\\"), + beauty: \\"0\\", + whiteness: \\"0\\", + aspect: singleQuote(\\"9:16\\"), + \\"min-bitrate\\": \\"200\\", + \\"max-bitrate\\": \\"1000\\", + \\"audio-quality\\": singleQuote(\\"high\\"), + \\"waiting-image\\": \\"\\", + \\"waiting-image-hash\\": \\"\\", + zoom: \\"false\\", + \\"device-position\\": singleQuote(\\"front\\"), + \\"background-mute\\": \\"false\\", + mirror: \\"false\\", + \\"remote-mirror\\": \\"false\\", + \\"local-mirror\\": \\"false\\", + \\"audio-reverb-type\\": \\"0\\", + \\"enable-mic\\": \\"true\\", + \\"enable-agc\\": \\"false\\", + \\"enable-ans\\": \\"false\\", + \\"audio-volume-type\\": singleQuote(\\"voicecall\\"), + \\"video-width\\": \\"360\\", + \\"video-height\\": \\"640\\", + animation: \\"\\", + bindStateChange: \\"\\", + bindNetStatus: \\"\\", + bindBgmStart: \\"\\", + bindBgmProgress: \\"\\", + bindBgmComplete: \\"\\" + }, + OfficialAccount: { + bindLoad: \\"\\", + bindError: \\"\\" + }, + OpenData: { + type: \\"\\", + \\"open-gid\\": \\"\\", + lang: singleQuote(\\"en\\"), + \\"default-text\\": \\"\\", + \\"default-avatar\\": \\"\\", + bindError: \\"\\" + }, + NavigationBar: { + title: \\"\\", + loading: \\"false\\", + \\"front-color\\": \\"\\", + \\"background-color\\": \\"\\", + \\"color-animation-duration\\": \\"0\\", + \\"color-animation-timing-func\\": singleQuote(\\"linear\\") + }, + PageMeta: { + \\"background-text-style\\": \\"\\", + \\"background-color\\": \\"\\", + \\"background-color-top\\": \\"\\", + \\"background-color-bottom\\": \\"\\", + \\"scroll-top\\": singleQuote(\\"\\"), + \\"scroll-duration\\": \\"300\\", + \\"page-style\\": singleQuote(\\"\\"), + \\"root-font-size\\": singleQuote(\\"\\"), + bindResize: \\"\\", + bindScroll: \\"\\", + bindScrollDone: \\"\\" + }, + VoipRoom: { + openid: \\"\\", + mode: singleQuote(\\"camera\\"), + \\"device-position\\": singleQuote(\\"front\\"), + bindError: \\"\\" + }, + AdCustom: { + \\"unit-id\\": \\"\\", + \\"ad-intervals\\": \\"\\", + bindLoad: \\"\\", + bindError: \\"\\" + } + }; + var hostConfig = { + initNativeApi: initNativeApi, + onTaroElementCreate: function onTaroElementCreate(tagName) { + warn(tagName === \\"MAP\\", \\"\\\\u5fae\\\\u4fe1\\\\u5c0f\\\\u7a0b\\\\u5e8f map \\\\u7ec4\\\\u4ef6\\\\u7684 \`setting\` \\\\u5c5e\\\\u6027\\\\u9700\\\\u8981\\\\u4f20\\\\u9012\\\\u4e00\\\\u4e2a\\\\u9ed8\\\\u8ba4\\\\u503c\\\\u3002\\\\u8be6\\\\u60c5\\\\uff1a\\\\n https://developers.weixin.qq.com/miniprogram/dev/component/map.html\\"); + } + }; + mergeReconciler(hostConfig); + mergeInternalComponents(components); + var taro_runtime = __webpack_require__(1); + var classCallCheck = __webpack_require__(2); + var createClass = __webpack_require__(3); + var possibleConstructorReturn = __webpack_require__(5); + var getPrototypeOf = __webpack_require__(4); + var inherits = __webpack_require__(6); + var react = __webpack_require__(0); + var app = __webpack_require__(11); + var app_App = function(_Component) { + Object(inherits[\\"a\\"])(App, _Component); + function App() { + Object(classCallCheck[\\"a\\"])(this, App); + return Object(possibleConstructorReturn[\\"a\\"])(this, Object(getPrototypeOf[\\"a\\"])(App).apply(this, arguments)); + } + Object(createClass[\\"a\\"])(App, [ { + key: \\"componentDidMount\\", + value: function componentDidMount() {} + }, { + key: \\"componentDidShow\\", + value: function componentDidShow() {} + }, { + key: \\"componentDidHide\\", + value: function componentDidHide() {} + }, { + key: \\"componentDidCatchError\\", + value: function componentDidCatchError() {} + }, { + key: \\"render\\", + value: function render() { + return this.props.children; + } + } ]); + return App; + }(react[\\"Component\\"]); + var lib_origin_app = app_App; + var taro_react = __webpack_require__(8); + var config = { + pages: [ \\"pages/index/index\\" ], + window: { + backgroundTextStyle: \\"light\\", + navigationBarBackgroundColor: \\"#fff\\", + navigationBarTitleText: \\"WeChat\\", + navigationBarTextStyle: \\"black\\" + } + }; + taro_runtime[\\"window\\"].__taroAppConfig = config; + var inst = App(Object(taro_runtime[\\"createReactApp\\"])(lib_origin_app, react, taro_react[\\"a\\"], config)); + } +}, [ [ 14, 0, 1, 3, 2 ] ] ]); + + + +/** filePath: output/app.json **/ +{\\"pages\\":[\\"pages/index/index\\"],\\"window\\":{\\"backgroundTextStyle\\":\\"light\\",\\"navigationBarBackgroundColor\\":\\"#fff\\",\\"navigationBarTitleText\\":\\"WeChat\\",\\"navigationBarTextStyle\\":\\"black\\"}} + +/** filePath: output/app.wxss **/ + + +/** filePath: output/base.wxml **/ + + + + + + + + ++ + + + ++ + ++ + + + ++ + ++ + + + ++ + ++ + + + ++ + +{{i.v}} + + + + + + + ++ + + + ++ + ++ + + + ++ + ++ + + + + + + + ++ + ++ + + + ++ + ++ + + + ++ + ++ + + + + + + + ++ + ++ + + + ++ + ++ + + + ++ + ++ + + + + + + + ++ + ++ + + + ++ + ++ + + + + + + + ++ + ++ + + + ++ + ++ + + + + + + + ++ + ++ + + + ++ + ++ + + + + + + + ++ + ++ + + + ++ + ++ + + + + + + + ++ + ++ + + + ++ + ++ + + + + + + + ++ + ++ + + + ++ + ++ + + + + + + + ++ + ++ + + + ++ + ++ + + + + + + + ++ + ++ + + + ++ + ++ + + + + + + + ++ + ++ + + + ++ + ++ + + + + + + + ++ + ++ + + + ++ + ++ + + + + + + + ++ + ++ + + + ++ + ++ + + + + + + + ++ + ++ + + +/** filePath: output/common.js **/ +(wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 2 ], [ function(module, __webpack_exports__, __webpack_require__) { + \\"use strict\\"; + __webpack_require__.r(__webpack_exports__); + __webpack_exports__[\\"default\\"] = \\"react-mock\\"; +} ] ]); + +/** filePath: output/comp.js **/ +(wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 6 ], { + 12: function(module, __webpack_exports__, __webpack_require__) { + \\"use strict\\"; + __webpack_require__.r(__webpack_exports__); + var _tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1); + Component(Object(_tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__[\\"createRecursiveComponentConfig\\"])()); + } +}, [ [ 12, 0, 1 ] ] ]); + +/** filePath: output/comp.json **/ +{\\"component\\":true,\\"usingComponents\\":{\\"comp\\":\\"./comp\\"}} + +/** filePath: output/comp.wxml **/ + + + +/** filePath: output/pages/index/index.js **/ +(wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 7 ], { + 13: function(module, exports, __webpack_require__) {}, + 15: function(module, __webpack_exports__, __webpack_require__) { + \\"use strict\\"; + __webpack_require__.r(__webpack_exports__); + var taro_runtime = __webpack_require__(1); + var classCallCheck = __webpack_require__(2); + var createClass = __webpack_require__(3); + var possibleConstructorReturn = __webpack_require__(5); + var getPrototypeOf = __webpack_require__(4); + var inherits = __webpack_require__(6); + var react = __webpack_require__(0); + var taro_components = __webpack_require__(7); + function say() { + console.log(\\"little cat\\"); + } + function miao() { + console.log(\\"say: \\", say()); + } + var index = __webpack_require__(13); + var index_Index = function(_Component) { + Object(inherits[\\"a\\"])(Index, _Component); + function Index() { + Object(classCallCheck[\\"a\\"])(this, Index); + return Object(possibleConstructorReturn[\\"a\\"])(this, Object(getPrototypeOf[\\"a\\"])(Index).apply(this, arguments)); + } + Object(createClass[\\"a\\"])(Index, [ { + key: \\"componentDidMount\\", + value: function componentDidMount() { + miao(); + } + }, { + key: \\"render\\", + value: function render() { + return react[\\"default\\"].createElement(taro_components[\\"View\\"], { + className: \\"index\\" + }, react[\\"default\\"].createElement(taro_components[\\"Text\\"], null, \\"Hello world!\\")); + } + } ]); + return Index; + }(react[\\"Component\\"]); + var config = { + navigationBarTitleText: \\"\\\\u9996\\\\u9875\\" + }; + var inst = Page(Object(taro_runtime[\\"createPageConfig\\"])(index_Index, \\"pages/index/index\\", {}, config || {})); + } +}, [ [ 15, 0, 1, 3, 2 ] ] ]); + +/** filePath: output/pages/index/index.json **/ +{\\"navigationBarTitleText\\":\\"首页\\",\\"usingComponents\\":{\\"comp\\":\\"../../comp\\"}} + +/** filePath: output/pages/index/index.wxml **/ + + + +/** filePath: output/pages/index/index.wxss **/ + + +/** filePath: output/runtime.js **/ +(function(modules) { + function webpackJsonpCallback(data) { + var chunkIds = data[0]; + var moreModules = data[1]; + var executeModules = data[2]; + var moduleId, chunkId, i = 0, resolves = []; + for (;i < chunkIds.length; i++) { + chunkId = chunkIds[i]; + if (Object.prototype.hasOwnProperty.call(installedChunks, chunkId) && installedChunks[chunkId]) { + resolves.push(installedChunks[chunkId][0]); + } + installedChunks[chunkId] = 0; + } + for (moduleId in moreModules) { + if (Object.prototype.hasOwnProperty.call(moreModules, moduleId)) { + modules[moduleId] = moreModules[moduleId]; + } + } + if (parentJsonpFunction) parentJsonpFunction(data); + while (resolves.length) { + resolves.shift()(); + } + deferredModules.push.apply(deferredModules, executeModules || []); + return checkDeferredModules(); + } + function checkDeferredModules() { + var result; + for (var i = 0; i < deferredModules.length; i++) { + var deferredModule = deferredModules[i]; + var fulfilled = true; + for (var j = 1; j < deferredModule.length; j++) { + var depId = deferredModule[j]; + if (installedChunks[depId] !== 0) fulfilled = false; + } + if (fulfilled) { + deferredModules.splice(i--, 1); + result = __webpack_require__(__webpack_require__.s = deferredModule[0]); + } + } + return result; + } + var installedModules = {}; + var installedChunks = { + 0: 0 + }; + var deferredModules = []; + function __webpack_require__(moduleId) { + if (installedModules[moduleId]) { + return installedModules[moduleId].exports; + } + var module = installedModules[moduleId] = { + i: moduleId, + l: false, + exports: {} + }; + modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); + module.l = true; + return module.exports; + } + __webpack_require__.m = modules; + __webpack_require__.c = installedModules; + __webpack_require__.d = function(exports, name, getter) { + if (!__webpack_require__.o(exports, name)) { + Object.defineProperty(exports, name, { + enumerable: true, + get: getter + }); + } + }; + __webpack_require__.r = function(exports) { + if (typeof Symbol !== \\"undefined\\" && Symbol.toStringTag) { + Object.defineProperty(exports, Symbol.toStringTag, { + value: \\"Module\\" + }); + } + Object.defineProperty(exports, \\"__esModule\\", { + value: true + }); + }; + __webpack_require__.t = function(value, mode) { + if (mode & 1) value = __webpack_require__(value); + if (mode & 8) return value; + if (mode & 4 && typeof value === \\"object\\" && value && value.__esModule) return value; + var ns = Object.create(null); + __webpack_require__.r(ns); + Object.defineProperty(ns, \\"default\\", { + enumerable: true, + value: value + }); + if (mode & 2 && typeof value != \\"string\\") for (var key in value) __webpack_require__.d(ns, key, function(key) { + return value[key]; + }.bind(null, key)); + return ns; + }; + __webpack_require__.n = function(module) { + var getter = module && module.__esModule ? function getDefault() { + return module[\\"default\\"]; + } : function getModuleExports() { + return module; + }; + __webpack_require__.d(getter, \\"a\\", getter); + return getter; + }; + __webpack_require__.o = function(object, property) { + return Object.prototype.hasOwnProperty.call(object, property); + }; + __webpack_require__.p = \\"/\\"; + var jsonpArray = wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []; + var oldJsonpFunction = jsonpArray.push.bind(jsonpArray); + jsonpArray.push = webpackJsonpCallback; + jsonpArray = jsonpArray.slice(); + for (var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]); + var parentJsonpFunction = oldJsonpFunction; + checkDeferredModules(); +})([]); + +/** filePath: output/taro.js **/ +(wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 1 ], { + 1: function(module, __webpack_exports__, __webpack_require__) { + \\"use strict\\"; + var _unused_webpack_default_export = \\"taro-runtime-mock\\"; + }, + 7: function(module, __webpack_exports__, __webpack_require__) { + \\"use strict\\"; + var _unused_webpack_default_export = \\"taro-components-mock\\"; + }, + 8: function(module, __webpack_exports__, __webpack_require__) { + \\"use strict\\"; + __webpack_exports__[\\"a\\"] = \\"taro-react-mock\\"; + } +} ]); + +/** filePath: output/utils.wxs **/ +module.exports = { + a: function (l, n, s) { + var a = [\\"view\\",\\"cover-view\\",\\"block\\",\\"text\\",\\"slot\\",\\"slot-view\\",\\"label\\",\\"form\\",\\"scroll-view\\"] + var b = [\\"slot\\",\\"slot-view\\",\\"label\\",\\"form\\",\\"scroll-view\\"] + if (a.indexOf(n) === -1) { + l = 0 + } + if (b.indexOf(n) > -1) { + var u = s.split(',') + var depth = 0 + for (var i = 0; i < u.length; i++) { + if (u[i] === n) depth++ + } + l = depth + } + return 'tmpl_' + l + '_' + n + }, + b: function (a, b) { + return a === undefined ? b : a + }, + c: function(i, prefix) { + var s = i.focus !== undefined ? 'focus' : 'blur' + return prefix + i.nn + '_' + s + }, + d: function (i, v) { + return i === undefined ? v : i + }, + e: function (n) { + return 'tmpl_' + n + '_container' + }, + f: function (l, n) { + var b = [\\"slot\\",\\"slot-view\\",\\"label\\",\\"form\\",\\"scroll-view\\"] + if (b.indexOf(n) > -1) { + if (l) l += ',' + l += n + } + return l + } +} + +/** filePath: output/vendors.js **/ +(wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 3 ], [ , , function(module, __webpack_exports__, __webpack_require__) { + \\"use strict\\"; + __webpack_require__.d(__webpack_exports__, \\"a\\", (function() { + return _classCallCheck; + })); + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError(\\"Cannot call a class as a function\\"); + } + } +}, function(module, __webpack_exports__, __webpack_require__) { + \\"use strict\\"; + __webpack_require__.d(__webpack_exports__, \\"a\\", (function() { + return _createClass; + })); + function _defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if (\\"value\\" in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + function _createClass(Constructor, protoProps, staticProps) { + if (protoProps) _defineProperties(Constructor.prototype, protoProps); + if (staticProps) _defineProperties(Constructor, staticProps); + return Constructor; + } +}, function(module, __webpack_exports__, __webpack_require__) { + \\"use strict\\"; + __webpack_require__.d(__webpack_exports__, \\"a\\", (function() { + return _getPrototypeOf; + })); + function _getPrototypeOf(o) { + _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { + return o.__proto__ || Object.getPrototypeOf(o); + }; + return _getPrototypeOf(o); + } +}, function(module, __webpack_exports__, __webpack_require__) { + \\"use strict\\"; + __webpack_require__.d(__webpack_exports__, \\"a\\", (function() { + return _possibleConstructorReturn; + })); + function _typeof(obj) { + \\"@babel/helpers - typeof\\"; + if (typeof Symbol === \\"function\\" && typeof Symbol.iterator === \\"symbol\\") { + _typeof = function _typeof(obj) { + return typeof obj; + }; + } else { + _typeof = function _typeof(obj) { + return obj && typeof Symbol === \\"function\\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \\"symbol\\" : typeof obj; + }; + } + return _typeof(obj); + } + function _assertThisInitialized(self) { + if (self === void 0) { + throw new ReferenceError(\\"this hasn't been initialised - super() hasn't been called\\"); + } + return self; + } + function _possibleConstructorReturn(self, call) { + if (call && (_typeof(call) === \\"object\\" || typeof call === \\"function\\")) { + return call; + } + return _assertThisInitialized(self); + } +}, function(module, __webpack_exports__, __webpack_require__) { + \\"use strict\\"; + __webpack_require__.d(__webpack_exports__, \\"a\\", (function() { + return _inherits; + })); + function _setPrototypeOf(o, p) { + _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { + o.__proto__ = p; + return o; + }; + return _setPrototypeOf(o, p); + } + function _inherits(subClass, superClass) { + if (typeof superClass !== \\"function\\" && superClass !== null) { + throw new TypeError(\\"Super expression must either be null or a function\\"); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + writable: true, + configurable: true + } + }); + if (superClass) _setPrototypeOf(subClass, superClass); + } +} ] ]); +" +`; + +exports[`config should copy assets 1`] = `18`; + +exports[`config should copy assets 2`] = ` +" +/** filePath: dist/app.js **/ +require(\\"./runtime\\"); + +require(\\"./common\\"); + +require(\\"./vendors\\"); + +require(\\"./taro\\"); + +(wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 4 ], { + 11: function(module, exports, __webpack_require__) {}, + 14: function(module, __webpack_exports__, __webpack_require__) { + \\"use strict\\"; + __webpack_require__.r(__webpack_exports__); + function _arrayLikeToArray(arr, len) { + if (len == null || len > arr.length) len = arr.length; + for (var i = 0, arr2 = new Array(len); i < len; i++) { + arr2[i] = arr[i]; + } + return arr2; + } + function _arrayWithoutHoles(arr) { + if (Array.isArray(arr)) return _arrayLikeToArray(arr); + } + function _iterableToArray(iter) { + if (typeof Symbol !== \\"undefined\\" && Symbol.iterator in Object(iter)) return Array.from(iter); + } + function _unsupportedIterableToArray(o, minLen) { + if (!o) return; + if (typeof o === \\"string\\") return _arrayLikeToArray(o, minLen); + var n = Object.prototype.toString.call(o).slice(8, -1); + if (n === \\"Object\\" && o.constructor) n = o.constructor.name; + if (n === \\"Map\\" || n === \\"Set\\") return Array.from(o); + if (n === \\"Arguments\\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); + } + function _nonIterableSpread() { + throw new TypeError(\\"Invalid attempt to spread non-iterable instance.\\\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\\"); + } + function _toConsumableArray(arr) { + return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); + } + function _typeof(obj) { + \\"@babel/helpers - typeof\\"; + if (typeof Symbol === \\"function\\" && typeof Symbol.iterator === \\"symbol\\") { + _typeof = function _typeof(obj) { + return typeof obj; + }; + } else { + _typeof = function _typeof(obj) { + return obj && typeof Symbol === \\"function\\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \\"symbol\\" : typeof obj; + }; + } + return _typeof(obj); + } + function _assertThisInitialized(self) { + if (self === void 0) { + throw new ReferenceError(\\"this hasn't been initialised - super() hasn't been called\\"); + } + return self; + } + function _possibleConstructorReturn(self, call) { + if (call && (_typeof(call) === \\"object\\" || typeof call === \\"function\\")) { + return call; + } + return _assertThisInitialized(self); + } + function _getPrototypeOf(o) { + _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { + return o.__proto__ || Object.getPrototypeOf(o); + }; + return _getPrototypeOf(o); + } + function _setPrototypeOf(o, p) { + _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { + o.__proto__ = p; + return o; + }; + return _setPrototypeOf(o, p); + } + function _inherits(subClass, superClass) { + if (typeof superClass !== \\"function\\" && superClass !== null) { + throw new TypeError(\\"Super expression must either be null or a function\\"); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + writable: true, + configurable: true + } + }); + if (superClass) _setPrototypeOf(subClass, superClass); + } + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError(\\"Cannot call a class as a function\\"); + } + } + function _defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if (\\"value\\" in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + function _createClass(Constructor, protoProps, staticProps) { + if (protoProps) _defineProperties(Constructor.prototype, protoProps); + if (staticProps) _defineProperties(Constructor, staticProps); + return Constructor; + } + function isString(o) { + return typeof o === \\"string\\"; + } + function isUndefined(o) { + return typeof o === \\"undefined\\"; + } + function isNull(o) { + return o === null; + } + function isObject(o) { + return o !== null && _typeof(o) === \\"object\\"; + } + function isBoolean(o) { + return o === true || o === false; + } + function isFunction(o) { + return typeof o === \\"function\\"; + } + function isNumber(o) { + return typeof o === \\"number\\"; + } + function isBooleanStringLiteral(o) { + return o === \\"true\\" || o === \\"false\\"; + } + var isArray = Array.isArray; + var styles = { + style: \\"i.\\".concat(\\"st\\"), + class: \\"i.\\".concat(\\"cl\\") + }; + var events = { + bindtap: \\"eh\\" + }; + var touchEvents = { + bindTouchStart: \\"\\", + bindTouchMove: \\"\\", + bindTouchEnd: \\"\\", + bindTouchCancel: \\"\\", + bindLongTap: \\"\\" + }; + var animationEvents = { + bindAnimationStart: \\"\\", + bindAnimationIteration: \\"\\", + bindAnimationEnd: \\"\\", + bindTransitionEnd: \\"\\" + }; + var specialEvents = new Set([ \\"htouchmove\\", \\"vtouchmove\\" ]); + function singleQuote(s) { + return \\"'\\".concat(s, \\"'\\"); + } + var View = Object.assign(Object.assign({ + \\"hover-class\\": singleQuote(\\"none\\"), + \\"hover-stop-propagation\\": \\"false\\", + \\"hover-start-time\\": \\"50\\", + \\"hover-stay-time\\": \\"400\\", + animation: \\"\\" + }, touchEvents), animationEvents); + var Icon = { + type: \\"\\", + size: \\"23\\", + color: \\"\\" + }; + var MapComp = Object.assign({ + longitude: \\"\\", + latitude: \\"\\", + scale: \\"16\\", + markers: \\"[]\\", + covers: \\"\\", + polyline: \\"[]\\", + circles: \\"[]\\", + controls: \\"[]\\", + \\"include-points\\": \\"[]\\", + \\"show-location\\": \\"\\", + \\"layer-style\\": \\"1\\", + bindMarkerTap: \\"\\", + bindControlTap: \\"\\", + bindCalloutTap: \\"\\", + bindUpdated: \\"\\" + }, touchEvents); + var Progress = { + percent: \\"\\", + \\"stroke-width\\": \\"6\\", + color: singleQuote(\\"#09BB07\\"), + activeColor: singleQuote(\\"#09BB07\\"), + backgroundColor: singleQuote(\\"#EBEBEB\\"), + active: \\"false\\", + \\"active-mode\\": singleQuote(\\"backwards\\"), + \\"show-info\\": \\"false\\" + }; + var RichText = { + nodes: \\"[]\\" + }; + var Text = { + selectable: \\"false\\", + space: \\"\\", + decode: \\"false\\" + }; + var Button = { + size: singleQuote(\\"default\\"), + type: \\"\\", + plain: \\"false\\", + disabled: \\"\\", + loading: \\"false\\", + \\"form-type\\": \\"\\", + \\"open-type\\": \\"\\", + \\"hover-class\\": singleQuote(\\"button-hover\\"), + \\"hover-stop-propagation\\": \\"false\\", + \\"hover-start-time\\": \\"20\\", + \\"hover-stay-time\\": \\"70\\", + name: \\"\\" + }; + var Checkbox = { + value: \\"\\", + disabled: \\"\\", + checked: \\"false\\", + color: singleQuote(\\"#09BB07\\"), + name: \\"\\" + }; + var CheckboxGroup = { + bindChange: \\"\\", + name: \\"\\" + }; + var Form = { + \\"report-submit\\": \\"false\\", + bindSubmit: \\"\\", + bindReset: \\"\\", + name: \\"\\" + }; + var Input = { + value: \\"\\", + type: singleQuote(\\"\\"), + password: \\"false\\", + placeholder: \\"\\", + \\"placeholder-style\\": \\"\\", + \\"placeholder-class\\": singleQuote(\\"input-placeholder\\"), + disabled: \\"\\", + maxlength: \\"140\\", + \\"cursor-spacing\\": \\"0\\", + focus: \\"false\\", + \\"confirm-type\\": singleQuote(\\"done\\"), + \\"confirm-hold\\": \\"false\\", + cursor: \\"i.value.length\\", + \\"selection-start\\": \\"-1\\", + \\"selection-end\\": \\"-1\\", + bindInput: \\"\\", + bindFocus: \\"\\", + bindBlur: \\"\\", + bindConfirm: \\"\\", + name: \\"\\" + }; + var Label = { + for: \\"\\", + name: \\"\\" + }; + var Picker = { + mode: singleQuote(\\"selector\\"), + disabled: \\"\\", + range: \\"\\", + \\"range-key\\": \\"\\", + value: \\"\\", + start: \\"\\", + end: \\"\\", + fields: singleQuote(\\"day\\"), + \\"custom-item\\": \\"\\", + name: \\"\\", + bindCancel: \\"\\", + bindChange: \\"\\", + bindColumnChange: \\"\\" + }; + var PickerView = { + value: \\"\\", + \\"indicator-style\\": \\"\\", + \\"indicator-class\\": \\"\\", + \\"mask-style\\": \\"\\", + \\"mask-class\\": \\"\\", + bindChange: \\"\\", + name: \\"\\" + }; + var PickerViewColumn = { + name: \\"\\" + }; + var Radio = { + value: \\"\\", + checked: \\"false\\", + disabled: \\"\\", + color: singleQuote(\\"#09BB07\\"), + name: \\"\\" + }; + var RadioGroup = { + bindChange: \\"\\", + name: \\"\\" + }; + var Slider = { + min: \\"0\\", + max: \\"100\\", + step: \\"1\\", + disabled: \\"\\", + value: \\"0\\", + activeColor: singleQuote(\\"#1aad19\\"), + backgroundColor: singleQuote(\\"#e9e9e9\\"), + \\"block-size\\": \\"28\\", + \\"block-color\\": singleQuote(\\"#ffffff\\"), + \\"show-value\\": \\"false\\", + bindChange: \\"\\", + bindChanging: \\"\\", + name: \\"\\" + }; + var Switch = { + checked: \\"false\\", + disabled: \\"\\", + type: singleQuote(\\"switch\\"), + color: singleQuote(\\"#04BE02\\"), + bindChange: \\"\\", + name: \\"\\" + }; + var Textarea = { + value: \\"\\", + placeholder: \\"\\", + \\"placeholder-style\\": \\"\\", + \\"placeholder-class\\": singleQuote(\\"textarea-placeholder\\"), + disabled: \\"\\", + maxlength: \\"140\\", + \\"auto-focus\\": \\"false\\", + focus: \\"false\\", + \\"auto-height\\": \\"false\\", + fixed: \\"false\\", + \\"cursor-spacing\\": \\"0\\", + cursor: \\"-1\\", + \\"selection-start\\": \\"-1\\", + \\"selection-end\\": \\"-1\\", + bindFocus: \\"\\", + bindBlur: \\"\\", + bindLineChange: \\"\\", + bindInput: \\"\\", + bindConfirm: \\"\\", + name: \\"\\" + }; + var CoverImage = { + src: \\"\\", + bindLoad: \\"eh\\", + bindError: \\"eh\\" + }; + var CoverView = Object.assign({ + \\"scroll-top\\": \\"false\\" + }, touchEvents); + var MovableArea = { + \\"scale-area\\": \\"false\\" + }; + var MovableView = Object.assign(Object.assign({ + direction: \\"none\\", + inertia: \\"false\\", + \\"out-of-bounds\\": \\"false\\", + x: \\"\\", + y: \\"\\", + damping: \\"20\\", + friction: \\"2\\", + disabled: \\"\\", + scale: \\"false\\", + \\"scale-min\\": \\"0.5\\", + \\"scale-max\\": \\"10\\", + \\"scale-value\\": \\"1\\", + animation: \\"true\\", + bindChange: \\"\\", + bindScale: \\"\\", + htouchmove: \\"\\", + vtouchmove: \\"\\", + width: singleQuote(\\"10px\\"), + height: singleQuote(\\"10px\\") + }, touchEvents), animationEvents); + var ScrollView = Object.assign(Object.assign({ + \\"scroll-x\\": \\"false\\", + \\"scroll-y\\": \\"false\\", + \\"upper-threshold\\": \\"50\\", + \\"lower-threshold\\": \\"50\\", + \\"scroll-top\\": \\"\\", + \\"scroll-left\\": \\"\\", + \\"scroll-into-view\\": \\"\\", + \\"scroll-with-animation\\": \\"false\\", + \\"enable-back-to-top\\": \\"false\\", + bindScrollToUpper: \\"\\", + bindScrollToLower: \\"\\", + bindScroll: \\"\\" + }, touchEvents), animationEvents); + var Swiper = Object.assign({ + \\"indicator-dots\\": \\"false\\", + \\"indicator-color\\": singleQuote(\\"rgba(0, 0, 0, .3)\\"), + \\"indicator-active-color\\": singleQuote(\\"#000000\\"), + autoplay: \\"false\\", + current: \\"0\\", + interval: \\"5000\\", + duration: \\"500\\", + circular: \\"false\\", + vertical: \\"false\\", + \\"previous-margin\\": \\"'0px'\\", + \\"next-margin\\": \\"'0px'\\", + \\"display-multiple-items\\": \\"1\\", + bindChange: \\"\\", + bindTransition: \\"\\", + bindAnimationFinish: \\"\\" + }, touchEvents); + var SwiperItem = { + \\"item-id\\": \\"\\" + }; + var Navigator = { + url: \\"\\", + \\"open-type\\": singleQuote(\\"navigate\\"), + delta: \\"1\\", + \\"hover-class\\": singleQuote(\\"navigator-hover\\"), + \\"hover-stop-propagation\\": \\"false\\", + \\"hover-start-time\\": \\"50\\", + \\"hover-stay-time\\": \\"600\\", + bindSuccess: \\"\\", + bindFail: \\"\\", + bindComplete: \\"\\" + }; + var Audio = { + id: \\"\\", + src: \\"\\", + loop: \\"false\\", + controls: \\"false\\", + poster: \\"\\", + name: \\"\\", + author: \\"\\", + bindError: \\"\\", + bindPlay: \\"\\", + bindPause: \\"\\", + bindTimeUpdate: \\"\\", + bindEnded: \\"\\" + }; + var Camera = { + \\"device-position\\": singleQuote(\\"back\\"), + flash: singleQuote(\\"auto\\"), + bindStop: \\"\\", + bindError: \\"\\" + }; + var Image = Object.assign({ + src: \\"\\", + mode: singleQuote(\\"scaleToFill\\"), + \\"lazy-load\\": \\"false\\", + bindError: \\"\\", + bindLoad: \\"\\" + }, touchEvents); + var LivePlayer = { + src: \\"\\", + autoplay: \\"false\\", + muted: \\"false\\", + orientation: singleQuote(\\"vertical\\"), + \\"object-fit\\": singleQuote(\\"contain\\"), + \\"background-mute\\": \\"false\\", + \\"min-cache\\": \\"1\\", + \\"max-cache\\": \\"3\\", + animation: \\"\\", + bindStateChange: \\"\\", + bindFullScreenChange: \\"\\", + bindNetStatus: \\"\\" + }; + var Video = { + src: \\"\\", + duration: \\"\\", + controls: \\"true\\", + \\"danmu-list\\": \\"\\", + \\"danmu-btn\\": \\"\\", + \\"enable-danmu\\": \\"\\", + autoplay: \\"false\\", + loop: \\"false\\", + muted: \\"false\\", + \\"initial-time\\": \\"0\\", + \\"page-gesture\\": \\"false\\", + direction: \\"\\", + \\"show-progress\\": \\"true\\", + \\"show-fullscreen-btn\\": \\"true\\", + \\"show-play-btn\\": \\"true\\", + \\"show-center-play-btn\\": \\"true\\", + \\"enable-progress-gesture\\": \\"true\\", + \\"object-fit\\": singleQuote(\\"contain\\"), + poster: \\"\\", + \\"show-mute-btn\\": \\"false\\", + animation: \\"\\", + bindPlay: \\"\\", + bindPause: \\"\\", + bindEnded: \\"\\", + bindTimeUpdate: \\"\\", + bindFullScreenChange: \\"\\", + bindWaiting: \\"\\", + bindError: \\"\\" + }; + var Canvas = Object.assign({ + \\"canvas-id\\": \\"\\", + \\"disable-scroll\\": \\"false\\", + bindError: \\"\\" + }, touchEvents); + var Ad = { + \\"unit-id\\": \\"\\", + \\"ad-intervals\\": \\"\\", + bindLoad: \\"\\", + bindError: \\"\\", + bindClose: \\"\\" + }; + var WebView = { + src: \\"\\", + bindMessage: \\"\\", + bindLoad: \\"\\", + bindError: \\"\\" + }; + var Block = {}; + var SlotView = { + name: \\"\\" + }; + var Slot = { + name: \\"\\" + }; + var internalComponents = { + View: View, + Icon: Icon, + Progress: Progress, + RichText: RichText, + Text: Text, + Button: Button, + Checkbox: Checkbox, + CheckboxGroup: CheckboxGroup, + Form: Form, + Input: Input, + Label: Label, + Picker: Picker, + PickerView: PickerView, + PickerViewColumn: PickerViewColumn, + Radio: Radio, + RadioGroup: RadioGroup, + Slider: Slider, + Switch: Switch, + CoverImage: CoverImage, + Textarea: Textarea, + CoverView: CoverView, + MovableArea: MovableArea, + MovableView: MovableView, + ScrollView: ScrollView, + Swiper: Swiper, + SwiperItem: SwiperItem, + Navigator: Navigator, + Audio: Audio, + Camera: Camera, + Image: Image, + LivePlayer: LivePlayer, + Video: Video, + Canvas: Canvas, + Ad: Ad, + WebView: WebView, + Block: Block, + Map: MapComp, + Slot: Slot, + SlotView: SlotView + }; + var controlledComponent = new Set([ \\"input\\", \\"checkbox\\", \\"picker\\", \\"picker-view\\", \\"radio\\", \\"slider\\", \\"switch\\", \\"textarea\\" ]); + var focusComponents = new Set([ \\"input\\", \\"textarea\\" ]); + var voidElements = new Set([ \\"progress\\", \\"icon\\", \\"rich-text\\", \\"input\\", \\"textarea\\", \\"slider\\", \\"switch\\", \\"audio\\", \\"live-pusher\\", \\"video\\", \\"ad\\", \\"official-account\\", \\"open-data\\", \\"navigation-bar\\" ]); + var nestElements = new Map([ [ \\"view\\", -1 ], [ \\"cover-view\\", -1 ], [ \\"block\\", -1 ], [ \\"text\\", -1 ], [ \\"slot\\", 8 ], [ \\"slot-view\\", 8 ], [ \\"label\\", 6 ], [ \\"form\\", 4 ], [ \\"scroll-view\\", 4 ] ]); + var EMPTY_OBJ = {}; + var EMPTY_ARR = []; + var noop = function noop() {}; + var defaultReconciler = {}; + var box = function box(v) { + return { + v: v + }; + }; + var unbox = function unbox(b) { + return b.v; + }; + function toDashed(s) { + return s.replace(/([a-z0-9])([A-Z])/g, \\"$1-$2\\").toLowerCase(); + } + function toCamelCase(s) { + var camel = \\"\\"; + var nextCap = false; + for (var i = 0; i < s.length; i++) { + if (s[i] !== \\"-\\") { + camel += nextCap ? s[i].toUpperCase() : s[i]; + nextCap = false; + } else { + nextCap = true; + } + } + return camel; + } + function capitalize(s) { + return s.charAt(0).toUpperCase() + s.slice(1); + } + var shared_esm_hasOwnProperty = Object.prototype.hasOwnProperty; + var hasOwn = function hasOwn(val, key) { + return shared_esm_hasOwnProperty.call(val, key); + }; + var reportIssue = \\"\\\\u5982\\\\u6709\\\\u7591\\\\u95ee\\\\uff0c\\\\u8bf7\\\\u63d0\\\\u4ea4 issue \\\\u81f3\\\\uff1ahttps://github.com/nervjs/taro/issues\\"; + function ensure(condition, msg) { + if (!condition) { + throw new Error(msg + \\"\\\\n\\" + reportIssue); + } + } + function warn(condition, msg) { + if (false) {} + } + function queryToJson(str) { + var dec = decodeURIComponent; + var qp = str.split(\\"&\\"); + var ret = {}; + var name; + var val; + for (var i = 0, l = qp.length, item; i < l; ++i) { + item = qp[i]; + if (item.length) { + var s = item.indexOf(\\"=\\"); + if (s < 0) { + name = dec(item); + val = \\"\\"; + } else { + name = dec(item.slice(0, s)); + val = dec(item.slice(s + 1)); + } + if (typeof ret[name] === \\"string\\") { + ret[name] = [ ret[name] ]; + } + if (Array.isArray(ret[name])) { + ret[name].push(val); + } else { + ret[name] = val; + } + } + } + return ret; + } + var _uniqueId = 1; + var _loadTime = (new Date).getTime().toString(); + function getUniqueKey() { + return _loadTime + _uniqueId++; + } + var cacheData = {}; + function cacheDataSet(key, val) { + cacheData[key] = val; + } + function cacheDataGet(key, delelteAfterGet) { + var temp = cacheData[key]; + delelteAfterGet && delete cacheData[key]; + return temp; + } + function cacheDataHas(key) { + return key in cacheData; + } + function mergeInternalComponents(components) { + Object.keys(components).forEach((function(name) { + if (name in internalComponents) { + Object.assign(internalComponents[name], components[name]); + } else { + internalComponents[name] = components[name]; + } + })); + } + function mergeReconciler(hostConfig) { + Object.assign(defaultReconciler, hostConfig); + } + var weixinAdapter = { + if: \\"wx:if\\", + else: \\"wx:else\\", + elseif: \\"wx:elif\\", + for: \\"wx:for\\", + forItem: \\"wx:for-item\\", + forIndex: \\"wx:for-index\\", + key: \\"wx:key\\", + xs: \\"wxs\\", + type: \\"weapp\\" + }; + var shared_esm_BaseTemplate = function() { + function BaseTemplate() { + var _this = this; + _classCallCheck(this, BaseTemplate); + this.exportExpr = \\"module.exports =\\"; + this.supportXS = false; + this.Adapter = weixinAdapter; + this.internalComponents = internalComponents; + this.focusComponents = focusComponents; + this.voidElements = voidElements; + this.nestElements = nestElements; + this.buildPageTemplate = function(baseTempPath) { + var template = ' \\\\n'); + return template; + }; + this.buildBaseComponentTemplate = function(ext) { + var data = !_this.isSupportRecursive && _this.supportXS ? _this.dataKeymap(\\"i:i,l:l\\") : _this.dataKeymap(\\"i:i\\"); + return ' \\\\n'); + }; + this.buildXScript = function() { + return \\"\\".concat(_this.exportExpr, \\" {\\\\n a: \\").concat(_this.buildXSTmplName(), \\",\\\\n b: function (a, b) {\\\\n return a === undefined ? b : a\\\\n },\\\\n c: function(i, prefix) {\\\\n var s = i.focus !== undefined ? 'focus' : 'blur'\\\\n return prefix + i.\\", \\"nn\\", \\" + '_' + s\\\\n },\\\\n d: function (i, v) {\\\\n return i === undefined ? v : i\\\\n },\\\\n e: function (n) {\\\\n return 'tmpl_' + n + '_\\", \\"container\\", \\"'\\\\n },\\\\n \\").concat(_this.buildXSTmpExtra(), \\"\\\\n}\\"); + }; + } + _createClass(BaseTemplate, [ { + key: \\"buildAttribute\\", + value: function buildAttribute(attrs, nodeName) { + var _this2 = this; + return Object.keys(attrs).map((function(k) { + return \\"\\".concat(k, '=\\"').concat(k.startsWith(\\"bind\\") || k.startsWith(\\"on\\") ? attrs[k] : \\"{\\".concat(_this2.getAttrValue(attrs[k], k, nodeName), \\"}\\"), '\\" '); + })).join(\\"\\"); + } + }, { + key: \\"replacePropName\\", + value: function replacePropName(name, value, _componentName) { + if (value === \\"eh\\") return name.toLowerCase(); + return name; + } + }, { + key: \\"createMiniComponents\\", + value: function createMiniComponents(components) { + var result = Object.create(null); + for (var key in components) { + if (hasOwn(components, key)) { + var component = components[key]; + var compName = toDashed(key); + var newComp = Object.create(null); + if (isFunction(this.modifyCompProps)) { + component = this.modifyCompProps(compName, component); + } + for (var prop in component) { + if (hasOwn(component, prop)) { + var propValue = component[prop]; + if (prop.startsWith(\\"bind\\") || specialEvents.has(prop)) { + propValue = \\"eh\\"; + } else if (propValue === \\"\\") { + propValue = \\"i.\\".concat(toCamelCase(prop)); + } else if (isBooleanStringLiteral(propValue) || isNumber(+propValue)) { + propValue = this.supportXS ? \\"xs.b(i.\\".concat(toCamelCase(prop), \\",\\").concat(propValue, \\")\\") : \\"i.\\".concat(toCamelCase(prop), \\"===undefined?\\").concat(propValue, \\":i.\\").concat(toCamelCase(prop)); + } else { + propValue = \\"i.\\".concat(toCamelCase(prop), \\"||\\").concat(propValue || singleQuote(\\"\\")); + } + prop = this.replacePropName(prop, propValue, compName); + newComp[prop] = propValue; + } + } + if (compName !== \\"block\\") { + Object.assign(newComp, styles, this.getEvents()); + } + if (compName === \\"swiper-item\\") { + delete newComp.style; + } + if (compName === \\"slot\\" || compName === \\"slot-view\\") { + result[compName] = { + slot: \\"i.name\\" + }; + } else { + result[compName] = newComp; + } + } + } + return result; + } + }, { + key: \\"buildBaseTemplate\\", + value: function buildBaseTemplate() { + var Adapter = this.Adapter; + var data = !this.isSupportRecursive && this.supportXS ? \\"\\".concat(this.dataKeymap(\\"i:item,l:''\\")) : this.dataKeymap(\\"i:item\\"); + return \\"\\".concat(this.buildXsTemplate(), '\\\\n\\\\n \\\\n \\\\n \\\\n\\\\n'); + } + }, { + key: \\"buildThirdPartyAttr\\", + value: function buildThirdPartyAttr(attrs) { + return Array.from(attrs).reduce((function(str, attr) { + if (attr.startsWith(\\"@\\")) { + return str + \\"bind\\".concat(attr.slice(1), '=\\"eh\\" '); + } else if (attr.startsWith(\\"bind\\")) { + return str + \\"\\".concat(attr, '=\\"eh\\" '); + } else if (attr.startsWith(\\"on\\")) { + return str + \\"bind\\".concat(attr.slice(2).toLowerCase(), '=\\"eh\\" '); + } + return str + \\"\\".concat(attr, '=\\"{{i.').concat(toCamelCase(attr), '}}\\" '); + }), \\"\\"); + } + }, { + key: \\"buildComponentTemplate\\", + value: function buildComponentTemplate(comp, level) { + return this.focusComponents.has(comp.nodeName) ? this.buildFocusComponentTemplte(comp, level) : this.buildStandardComponentTemplate(comp, level); + } + }, { + key: \\"buildFocusComponentTemplte\\", + value: function buildFocusComponentTemplte(comp, level) { + var attrs = Object.assign({}, comp.attributes); + var templateName = this.supportXS ? \\"xs.c(i, 'tmpl_\\".concat(level, \\"_')\\") : \\"i.focus ? 'tmpl_\\".concat(level, \\"_\\").concat(comp.nodeName, \\"_focus' : 'tmpl_\\").concat(level, \\"_\\").concat(comp.nodeName, \\"_blur'\\"); + delete attrs.focus; + return '\\\\n\\\\n \\\\n\\\\n\\\\n\\\\n <').concat(comp.nodeName, \\" \\").concat(this.buildAttribute(comp.attributes, comp.nodeName), ' id=\\"{{i.uid}}\\" />\\\\n\\\\n\\\\n\\\\n <').concat(comp.nodeName, \\" \\").concat(this.buildAttribute(attrs, comp.nodeName), ' id=\\"{{i.uid}}\\" />\\\\n\\\\n'); + } + }, { + key: \\"buildStandardComponentTemplate\\", + value: function buildStandardComponentTemplate(comp, level) { + var isSupportRecursive = this.isSupportRecursive, Adapter = this.Adapter; + var nextLevel = isSupportRecursive ? 0 : level + 1; + var data = !this.isSupportRecursive ? \\"\\".concat(this.dataKeymap(\\"i:item,l:l\\")) : this.dataKeymap(\\"i:item\\"); + var child = this.supportXS ? '') : ''); + if (isFunction(this.modifyLoopBody)) { + child = this.modifyLoopBody(child, comp.nodeName); + } + var children = this.voidElements.has(comp.nodeName) ? \\"\\" : \\"\\\\n\\\\n ').concat(child, \\"\\\\n \\\\n \\"); + if (isFunction(this.modifyLoopContainer)) { + children = this.modifyLoopContainer(children, comp.nodeName); + } + var nodeName = comp.nodeName === \\"slot\\" || comp.nodeName === \\"slot-view\\" ? \\"view\\" : comp.nodeName; + var res = '\\\\n\\\\n <').concat(nodeName, \\" \\").concat(this.buildAttribute(comp.attributes, comp.nodeName), ' id=\\"{{i.uid}}\\">').concat(children, \\"\\").concat(nodeName, \\">\\\\n\\\\n\\"); + if (isFunction(this.modifyTemplateResult)) { + res = this.modifyTemplateResult(res, comp.nodeName, level, children); + } + return res; + } + }, { + key: \\"buildPlainTextTemplate\\", + value: function buildPlainTextTemplate(level) { + return '\\\\n\\\\n{{i.', \\"v\\", \\"}} \\\\n\\\\n\\"); + } + }, { + key: \\"buildThirdPartyTemplate\\", + value: function buildThirdPartyTemplate(level, componentConfig) { + var _this3 = this; + var Adapter = this.Adapter, isSupportRecursive = this.isSupportRecursive; + var nextLevel = isSupportRecursive ? 0 : level + 1; + var template = \\"\\"; + var data = !this.isSupportRecursive && this.supportXS ? \\"\\".concat(this.dataKeymap(\\"i:item,l:l\\")) : this.dataKeymap(\\"i:item\\"); + componentConfig.thirdPartyComponents.forEach((function(attrs, compName) { + template += '\\\\n\\\\n <').concat(compName, \\" \\").concat(_this3.buildThirdPartyAttr(attrs), ' id=\\"{{i.uid}}\\">\\\\n\\\\n \\\\n \\\\n ').concat(compName, \\">\\\\n\\\\n \\"); + })); + return template; + } + }, { + key: \\"buildContainerTemplate\\", + value: function buildContainerTemplate(level) { + var restart = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; + var tmpl = \\"\\"; + if (restart) { + if (!this.isSupportRecursive && this.supportXS) { + tmpl = ''; + } else { + tmpl = ' '; + } + } else { + var xs = !this.isSupportRecursive ? \\"xs.a(\\".concat(level, \\", i.\\", \\"nn\\", \\", l)\\") : \\"xs.a(\\".concat(level, \\", i.\\", \\"nn\\", \\")\\"); + var data = !this.isSupportRecursive ? \\"\\".concat(this.dataKeymap(\\"i:i,cid:\\".concat(level, \\",l:xs.f(l,i.\\", \\"nn\\", \\")\\"))) : \\"\\".concat(this.dataKeymap(\\"i:i\\")); + tmpl = this.supportXS ? '') : \\"'); + } + return '\\\\n\\\\n ').concat(tmpl, \\"\\\\n\\\\n\\"); + } + }, { + key: \\"dataKeymap\\", + value: function dataKeymap(keymap) { + return keymap; + } + }, { + key: \\"getEvents\\", + value: function getEvents() { + return events; + } + }, { + key: \\"getAttrValue\\", + value: function getAttrValue(value, _key, _nodeName) { + return \\"{\\".concat(value, \\"}\\"); + } + }, { + key: \\"buildXsTemplate\\", + value: function buildXsTemplate() { + return \\"\\"; + } + }, { + key: \\"mergeComponents\\", + value: function mergeComponents(ctx, patch) { + ctx.helper.recursiveMerge(this.internalComponents, patch); + } + }, { + key: \\"buildXSTmplName\\", + value: function buildXSTmplName() { + return \\"function (l, n) {\\\\n return 'tmpl_' + l + '_' + n\\\\n }\\"; + } + }, { + key: \\"buildXSTmpExtra\\", + value: function buildXSTmpExtra() { + return \\"\\"; + } + } ]); + return BaseTemplate; + }(); + var shared_esm_RecursiveTemplate = function(_BaseTemplate) { + _inherits(RecursiveTemplate, _BaseTemplate); + function RecursiveTemplate() { + var _this4; + _classCallCheck(this, RecursiveTemplate); + _this4 = _possibleConstructorReturn(this, _getPrototypeOf(RecursiveTemplate).apply(this, arguments)); + _this4.isSupportRecursive = true; + _this4.buildTemplate = function(componentConfig) { + var template = _this4.buildBaseTemplate(); + if (!_this4.miniComponents) { + _this4.miniComponents = _this4.createMiniComponents(_this4.internalComponents); + } + var ZERO_FLOOR = 0; + var components = Object.keys(_this4.miniComponents).filter((function(c) { + return componentConfig.includes.size && !componentConfig.includeAll ? componentConfig.includes.has(c) : true; + })); + template = components.reduce((function(current, nodeName) { + var attributes = _this4.miniComponents[nodeName]; + return current + _this4.buildComponentTemplate({ + nodeName: nodeName, + attributes: attributes + }, ZERO_FLOOR); + }), template); + template += _this4.buildPlainTextTemplate(ZERO_FLOOR); + template += _this4.buildThirdPartyTemplate(ZERO_FLOOR, componentConfig); + template += _this4.buildContainerTemplate(ZERO_FLOOR); + return template; + }; + return _this4; + } + return RecursiveTemplate; + }(shared_esm_BaseTemplate); + var shared_esm_UnRecursiveTemplate = function(_BaseTemplate2) { + _inherits(UnRecursiveTemplate, _BaseTemplate2); + function UnRecursiveTemplate() { + var _this5; + _classCallCheck(this, UnRecursiveTemplate); + _this5 = _possibleConstructorReturn(this, _getPrototypeOf(UnRecursiveTemplate).apply(this, arguments)); + _this5.isSupportRecursive = false; + _this5._baseLevel = 16; + _this5.buildTemplate = function(componentConfig) { + _this5.componentConfig = componentConfig; + if (!_this5.miniComponents) { + _this5.miniComponents = _this5.createMiniComponents(_this5.internalComponents); + } + var components = Object.keys(_this5.miniComponents).filter((function(c) { + return componentConfig.includes.size && !componentConfig.includeAll ? componentConfig.includes.has(c) : true; + })); + var template = _this5.buildBaseTemplate(); + for (var i = 0; i < _this5.baseLevel; i++) { + template += _this5.supportXS ? _this5.buildOptimizeFloor(i, components, _this5.baseLevel === i + 1) : _this5.buildFloor(i, components, _this5.baseLevel === i + 1); + } + return template; + }; + return _this5; + } + _createClass(UnRecursiveTemplate, [ { + key: \\"buildFloor\\", + value: function buildFloor(level, components) { + var _this6 = this; + var restart = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; + if (restart) return this.buildContainerTemplate(level, restart); + var template = components.reduce((function(current, nodeName) { + var attributes = _this6.miniComponents[nodeName]; + return current + _this6.buildComponentTemplate({ + nodeName: nodeName, + attributes: attributes + }, level); + }), \\"\\"); + template += this.buildPlainTextTemplate(level); + template += this.buildThirdPartyTemplate(level, this.componentConfig); + template += this.buildContainerTemplate(level, restart); + return template; + } + }, { + key: \\"buildOptimizeFloor\\", + value: function buildOptimizeFloor(level, components) { + var _this7 = this; + var restart = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; + if (restart) return this.buildContainerTemplate(level, restart); + var template = components.reduce((function(current, nodeName) { + if (level !== 0) { + if (!_this7.nestElements.has(nodeName)) { + return current; + } else { + var max = _this7.nestElements.get(nodeName); + if (max > 0 && level >= max) { + return current; + } + } + } + var attributes = _this7.miniComponents[nodeName]; + return current + _this7.buildComponentTemplate({ + nodeName: nodeName, + attributes: attributes + }, level); + }), \\"\\"); + if (level === 0) template += this.buildPlainTextTemplate(level); + template += this.buildThirdPartyTemplate(level, this.componentConfig); + template += this.buildContainerTemplate(level); + return template; + } + }, { + key: \\"buildXSTmplName\\", + value: function buildXSTmplName() { + var comps = [].concat(_toConsumableArray(Array.from(this.nestElements.keys())), _toConsumableArray(Array.from(this.componentConfig.thirdPartyComponents.keys()))); + var hasMaxComps = []; + this.nestElements.forEach((function(max, comp) { + if (max > -1) hasMaxComps.push(comp); + })); + return \\"function (l, n, s) {\\\\n var a = \\".concat(JSON.stringify(comps), \\"\\\\n var b = \\").concat(JSON.stringify(hasMaxComps), \\"\\\\n if (a.indexOf(n) === -1) {\\\\n l = 0\\\\n }\\\\n if (b.indexOf(n) > -1) {\\\\n var u = s.split(',')\\\\n var depth = 0\\\\n for (var i = 0; i < u.length; i++) {\\\\n if (u[i] === n) depth++\\\\n }\\\\n l = depth\\\\n }\\\\n return 'tmpl_' + l + '_' + n\\\\n }\\"); + } + }, { + key: \\"buildXSTmpExtra\\", + value: function buildXSTmpExtra() { + var hasMaxComps = []; + this.nestElements.forEach((function(max, comp) { + if (max > -1) hasMaxComps.push(comp); + })); + return \\"f: function (l, n) {\\\\n var b = \\".concat(JSON.stringify(hasMaxComps), \\"\\\\n if (b.indexOf(n) > -1) {\\\\n if (l) l += ','\\\\n l += n\\\\n }\\\\n return l\\\\n }\\"); + } + }, { + key: \\"baseLevel\\", + set: function set(lv) { + this._baseLevel = lv; + }, + get: function get() { + return this._baseLevel; + } + } ]); + return UnRecursiveTemplate; + }(shared_esm_BaseTemplate); + var _onAndSyncApis = new Set([ \\"getAccountInfoSync\\", \\"getEnterOptionsSync\\", \\"offBLEPeripheralConnectionStateChanged\\", \\"offBeaconServiceChange\\", \\"offBeaconUpdate\\", \\"offDeviceMotionChange\\", \\"offHCEMessage\\", \\"offKeyboardHeightChange\\", \\"offLocalServiceDiscoveryStop\\", \\"offLocalServiceFound\\", \\"offLocalServiceLost\\", \\"offLocalServiceResolveFail\\", \\"offLocationChange\\", \\"offThemeChange\\", \\"offVoIPChatInterrupted\\", \\"offVoIPChatMembersChanged\\", \\"offVoIPVideoMembersChanged\\", \\"offWifiConnected\\", \\"offWindowResize\\", \\"onBLEPeripheralConnectionStateChanged\\", \\"onBackgroundAudioPause\\", \\"onBackgroundAudioPlay\\", \\"onBackgroundAudioStop\\", \\"onBackgroundFetchData\\", \\"onHCEMessage\\", \\"onKeyboardHeightChange\\", \\"onLocalServiceDiscoveryStop\\", \\"onLocalServiceFound\\", \\"onLocalServiceLost\\", \\"onLocalServiceResolveFail\\", \\"onLocationChange\\", \\"onThemeChange\\", \\"onVoIPChatInterrupted\\", \\"onVoIPChatMembersChanged\\", \\"onVoIPChatSpeakersChanged\\", \\"onVoIPVideoMembersChanged\\", \\"onWifiConnected\\", \\"onWindowResize\\", \\"reportMonitor\\" ]); + var _noPromiseApis = new Set([ \\"createAudioContext\\", \\"createLivePusherContext\\", \\"createMediaContainer\\", \\"createMediaRecorder\\", \\"createOffscreenCanvas\\", \\"createRewardedVideoAd\\", \\"createUDPSocket\\", \\"createVideoDecoder\\", \\"createWorker\\", \\"getLogManager\\", \\"getNFCAdapter\\", \\"getPerformance\\", \\"getRealtimeLogManager\\", \\"pauseBackgroundAudio\\", \\"pauseVoice\\", \\"reportPerformance\\", \\"stopBackgroundAudio\\", \\"stopRecord\\", \\"stopVoice\\" ]); + var _otherApis = new Set([ \\"addCard\\", \\"authPrivateMessage\\", \\"checkIsOpenAccessibility\\", \\"checkIsSoterEnrolledInDevice\\", \\"checkIsSupportSoterAuthentication\\", \\"chooseInvoice\\", \\"chooseMedia\\", \\"chooseMessageFile\\", \\"compressVideo\\", \\"connectWifi\\", \\"createBLEPeripheralServer\\", \\"disableAlertBeforeUnload\\", \\"enableAlertBeforeUnload\\", \\"exitVoIPChat\\", \\"getBLEDeviceRSSI\\", \\"getBackgroundAudioPlayerState\\", \\"getBackgroundFetchData\\", \\"getBackgroundFetchToken\\", \\"getGroupEnterInfo\\", \\"getHCEState\\", \\"getSelectedTextRange\\", \\"getShareInfo\\", \\"getVideoInfo\\", \\"getWeRunData\\", \\"join1v1Chat\\", \\"joinVoIPChat\\", \\"makeBluetoothPair\\", \\"openCard\\", \\"openVideoEditor\\", \\"playBackgroundAudio\\", \\"playVoice\\", \\"previewMedia\\", \\"requestPayment\\", \\"saveFileToDisk\\", \\"scanItem\\", \\"seekBackgroundAudio\\", \\"sendHCEMessage\\", \\"setBLEMTU\\", \\"setBackgroundFetchToken\\", \\"setEnable1v1Chat\\", \\"setTopBarText\\", \\"setWifiList\\", \\"setWindowSize\\", \\"showRedPackage\\", \\"startGyroscope\\", \\"startHCE\\", \\"startLocalServiceDiscovery\\", \\"startLocationUpdate\\", \\"startLocationUpdateBackground\\", \\"startRecord\\", \\"startSoterAuthentication\\", \\"startWifi\\", \\"stopGyroscope\\", \\"stopHCE\\", \\"stopLocalServiceDiscovery\\", \\"stopLocationUpdate\\", \\"stopWifi\\", \\"subscribeVoIPVideoMembers\\", \\"updateShareMenu\\", \\"updateVoIPChatMuteConfig\\", \\"updateWeChatApp\\" ]); + var RequestQueue = { + MAX_REQUEST: 5, + queue: [], + request: function request(options) { + this.push(options); + return this.run(); + }, + push: function push(options) { + this.queue.push(options); + }, + run: function run() { + var _this = this; + if (!this.queue.length) { + return; + } + if (this.queue.length <= this.MAX_REQUEST) { + var options = this.queue.shift(); + var completeFn = options.complete; + options.complete = function() { + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + completeFn && completeFn.apply(options, args); + _this.run(); + }; + return wx.request(options); + } + } + }; + function taroInterceptor(chain) { + return request(chain.requestParams); + } + function request(options) { + options = options || {}; + if (typeof options === \\"string\\") { + options = { + url: options + }; + } + var originSuccess = options.success; + var originFail = options.fail; + var originComplete = options.complete; + var requestTask; + var p = new Promise((function(resolve, reject) { + options.success = function(res) { + originSuccess && originSuccess(res); + resolve(res); + }; + options.fail = function(res) { + originFail && originFail(res); + reject(res); + }; + options.complete = function(res) { + originComplete && originComplete(res); + }; + requestTask = RequestQueue.request(options); + })); + p.abort = function(cb) { + cb && cb(); + if (requestTask) { + requestTask.abort(); + } + return p; + }; + return p; + } + function processApis(taro) { + var onAndSyncApis = new Set([].concat(_toConsumableArray(taro.onAndSyncApis), _toConsumableArray(_onAndSyncApis))); + var noPromiseApis = new Set([].concat(_toConsumableArray(taro.noPromiseApis), _toConsumableArray(_noPromiseApis))); + var otherApis = new Set([].concat(_toConsumableArray(taro.otherApis), _toConsumableArray(_otherApis))); + var apis = [].concat(_toConsumableArray(onAndSyncApis), _toConsumableArray(noPromiseApis), _toConsumableArray(otherApis)); + var useDataCacheApis = { + navigateTo: true, + redirectTo: true, + reLaunch: true + }; + var routerParamsPrivateKey = \\"__key_\\"; + var preloadPrivateKey = \\"__preload_\\"; + var preloadInitedComponent = \\"$preloadComponent\\"; + apis.forEach((function(key) { + if (!(key in wx)) { + taro[key] = function() { + console.warn(\\"\\\\u5fae\\\\u4fe1\\\\u5c0f\\\\u7a0b\\\\u5e8f\\\\u6682\\\\u4e0d\\\\u652f\\\\u6301 \\".concat(key)); + }; + return; + } + if (otherApis.has(key)) { + taro[key] = function(options) { + for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) { + args[_key2 - 1] = arguments[_key2]; + } + options = options || {}; + var task = null; + var obj = Object.assign({}, options); + if (typeof options === \\"string\\") { + if (args.length) { + var _wx; + return (_wx = wx)[key].apply(_wx, [ options ].concat(args)); + } + return wx[key](options); + } + if (key === \\"navigateTo\\" || key === \\"redirectTo\\" || key === \\"switchTab\\") { + var url = obj.url ? obj.url.replace(/^\\\\//, \\"\\") : \\"\\"; + if (url.indexOf(\\"?\\") > -1) url = url.split(\\"?\\")[0]; + var Component = cacheDataGet(url); + if (Component) { + var component = new Component; + if (component.componentWillPreload) { + var cacheKey = getUniqueKey(); + var MarkIndex = obj.url.indexOf(\\"?\\"); + var hasMark = MarkIndex > -1; + var urlQueryStr = hasMark ? obj.url.substring(MarkIndex + 1, obj.url.length) : \\"\\"; + var params = queryToJson(urlQueryStr); + obj.url += (hasMark ? \\"&\\" : \\"?\\") + \\"\\".concat(preloadPrivateKey, \\"=\\").concat(cacheKey); + cacheDataSet(cacheKey, component.componentWillPreload(params)); + cacheDataSet(preloadInitedComponent, component); + } + } + } + if (useDataCacheApis[key]) { + var _url = obj.url = obj.url || \\"\\"; + var _MarkIndex = _url.indexOf(\\"?\\"); + var _hasMark = _MarkIndex > -1; + var _urlQueryStr = _hasMark ? _url.substring(_MarkIndex + 1, _url.length) : \\"\\"; + var _params = queryToJson(_urlQueryStr); + var _cacheKey = getUniqueKey(); + obj.url += (_hasMark ? \\"&\\" : \\"?\\") + \\"\\".concat(routerParamsPrivateKey, \\"=\\").concat(_cacheKey); + cacheDataSet(_cacheKey, _params); + } + var p = new Promise((function(resolve, reject) { + [ \\"fail\\", \\"success\\", \\"complete\\" ].forEach((function(k) { + obj[k] = function(res) { + options[k] && options[k](res); + if (k === \\"success\\") { + if (key === \\"connectSocket\\") { + resolve(Promise.resolve().then((function() { + return Object.assign(task, res); + }))); + } else { + resolve(res); + } + } else if (k === \\"fail\\") { + reject(res); + } + }; + })); + if (args.length) { + var _wx2; + task = (_wx2 = wx)[key].apply(_wx2, [ obj ].concat(args)); + } else { + task = wx[key](obj); + } + })); + if (key === \\"uploadFile\\" || key === \\"downloadFile\\") { + p.progress = function(cb) { + if (task) { + task.onProgressUpdate(cb); + } + return p; + }; + p.abort = function(cb) { + cb && cb(); + if (task) { + task.abort(); + } + return p; + }; + } + return p; + }; + } else { + taro[key] = function() { + for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) { + args[_key3] = arguments[_key3]; + } + var argsLen = args.length; + var newArgs = args.concat(); + var lastArg = newArgs[argsLen - 1]; + if (lastArg && lastArg.isTaroComponent && lastArg.$scope) { + newArgs.splice(argsLen - 1, 1, lastArg.$scope); + } + return wx[key].apply(wx, newArgs); + }; + } + })); + } + function pxTransform(size) { + var _ref = this.config || {}, _ref$designWidth = _ref.designWidth, designWidth = _ref$designWidth === void 0 ? 750 : _ref$designWidth, _ref$deviceRatio = _ref.deviceRatio, deviceRatio = _ref$deviceRatio === void 0 ? { + 640: 2.34 / 2, + 750: 1, + 828: 1.81 / 2 + } : _ref$deviceRatio; + if (!(designWidth in deviceRatio)) { + throw new Error(\\"deviceRatio \\\\u914d\\\\u7f6e\\\\u4e2d\\\\u4e0d\\\\u5b58\\\\u5728 \\".concat(designWidth, \\" \\\\u7684\\\\u8bbe\\\\u7f6e\\\\uff01\\")); + } + return parseInt(size, 10) * deviceRatio[designWidth] + \\"rpx\\"; + } + function canIUseWebp() { + var _wx$getSystemInfoSync = wx.getSystemInfoSync(), platform = _wx$getSystemInfoSync.platform; + var platformLower = platform.toLowerCase(); + if (platformLower === \\"android\\" || platformLower === \\"devtools\\") { + return true; + } + return false; + } + function wxCloud(taro) { + var wxC = wx.cloud || {}; + var wxcloud = {}; + var apiList = [ \\"init\\", \\"database\\", \\"uploadFile\\", \\"downloadFile\\", \\"getTempFileURL\\", \\"deleteFile\\", \\"callFunction\\", \\"CloudID\\" ]; + apiList.forEach((function(v) { + wxcloud[v] = wxC[v]; + })); + taro.cloud = wxcloud; + } + function initNativeApi(taro) { + processApis(taro); + var link = new taro.Link(taroInterceptor); + taro.request = link.request.bind(link); + taro.addInterceptor = link.addInterceptor.bind(link); + taro.cleanInterceptors = link.cleanInterceptors.bind(link); + taro.getCurrentPages = getCurrentPages; + taro.getApp = getApp; + taro.requirePlugin = requirePlugin; + taro.initPxTransform = taro.initPxTransform.bind(taro); + taro.pxTransform = pxTransform.bind(taro); + taro.canIUseWebp = canIUseWebp; + taro.env = wx.env; + wxCloud(taro); + } + var components = { + Progress: { + \\"border-radius\\": \\"0\\", + \\"font-size\\": \\"16\\", + duration: \\"30\\", + bindActiveEnd: \\"\\" + }, + RichText: { + space: \\"\\" + }, + Text: { + \\"user-select\\": \\"false\\" + }, + Map: { + polygons: \\"[]\\", + subkey: \\"\\", + rotate: \\"0\\", + skew: \\"0\\", + \\"enable-3D\\": \\"false\\", + \\"show-compass\\": \\"false\\", + \\"show-scale\\": \\"false\\", + \\"enable-overlooking\\": \\"false\\", + \\"enable-zoom\\": \\"true\\", + \\"enable-scroll\\": \\"true\\", + \\"enable-rotate\\": \\"false\\", + \\"enable-satellite\\": \\"false\\", + \\"enable-traffic\\": \\"false\\", + setting: \\"[]\\", + bindLabelTap: \\"\\", + bindRegionChange: \\"\\", + bindPoiTap: \\"\\" + }, + Button: { + lang: \\"en\\", + \\"session-from\\": \\"\\", + \\"send-message-title\\": \\"\\", + \\"send-message-path\\": \\"\\", + \\"send-message-img\\": \\"\\", + \\"app-parameter\\": \\"\\", + \\"show-message-card\\": \\"false\\", + bindGetUserInfo: \\"\\", + bindContact: \\"\\", + bindGetPhoneNumber: \\"\\", + bindError: \\"\\", + bindOpenSetting: \\"\\", + bindLaunchApp: \\"\\" + }, + Form: { + \\"report-submit-timeout\\": \\"0\\" + }, + Input: { + \\"auto-focus\\": \\"false\\", + \\"always-embed\\": \\"false\\", + \\"adjust-position\\": \\"true\\", + \\"hold-keyboard\\": \\"false\\", + bindKeyboardHeightChange: \\"\\" + }, + Picker: { + \\"header-text\\": \\"\\" + }, + PickerView: { + bindPickStart: \\"\\", + bindPickEnd: \\"\\" + }, + Slider: { + color: singleQuote(\\"#e9e9e9\\"), + \\"selected-color\\": singleQuote(\\"#1aad19\\") + }, + Textarea: { + \\"show-confirm-bar\\": \\"true\\", + \\"adjust-position\\": \\"true\\", + \\"hold-keyboard\\": \\"false\\", + \\"disable-default-padding\\": \\"false\\", + bindKeyboardHeightChange: \\"\\" + }, + ScrollView: { + \\"enable-flex\\": \\"false\\", + \\"scroll-anchoring\\": \\"false\\", + \\"refresher-enabled\\": \\"false\\", + \\"refresher-threshold\\": \\"45\\", + \\"refresher-default-style\\": singleQuote(\\"black\\"), + \\"refresher-background\\": singleQuote(\\"#FFF\\"), + \\"refresher-triggered\\": \\"false\\", + enhanced: \\"false\\", + bounces: \\"true\\", + \\"show-scrollbar\\": \\"true\\", + \\"paging-enabled\\": \\"false\\", + \\"fast-deceleration\\": \\"false\\", + bindDragStart: \\"\\", + bindDragging: \\"\\", + bindDragEnd: \\"\\", + bindRefresherPulling: \\"\\", + bindRefresherRefresh: \\"\\", + bindRefresherRestore: \\"\\", + bindRefresherAbort: \\"\\" + }, + Swiper: { + \\"snap-to-edge\\": \\"false\\", + \\"easing-function\\": singleQuote(\\"default\\") + }, + SwiperItem: { + \\"skip-hidden-item-layout\\": \\"false\\" + }, + Navigator: { + target: singleQuote(\\"self\\"), + \\"app-id\\": \\"\\", + path: \\"\\", + \\"extra-data\\": \\"\\", + version: singleQuote(\\"version\\") + }, + Camera: { + mode: singleQuote(\\"normal\\"), + resolution: singleQuote(\\"medium\\"), + \\"frame-size\\": singleQuote(\\"medium\\"), + bindInitDone: \\"\\", + bindScanCode: \\"\\" + }, + Image: { + webp: \\"false\\", + \\"show-menu-by-longpress\\": \\"false\\" + }, + LivePlayer: { + mode: singleQuote(\\"live\\"), + \\"sound-mode\\": singleQuote(\\"speaker\\"), + \\"auto-pause-if-navigate\\": \\"true\\", + \\"auto-pause-if-open-native\\": \\"true\\", + \\"picture-in-picture-mode\\": \\"[]\\", + bindAudioVolumeNotify: \\"\\", + bindEnterPictureInPicture: \\"\\", + bindLeavePictureInPicture: \\"\\" + }, + Video: { + title: \\"\\", + \\"play-btn-position\\": singleQuote(\\"bottom\\"), + \\"enable-play-gesture\\": \\"false\\", + \\"auto-pause-if-navigate\\": \\"true\\", + \\"auto-pause-if-open-native\\": \\"true\\", + \\"vslide-gesture\\": \\"false\\", + \\"vslide-gesture-in-fullscreen\\": \\"true\\", + \\"ad-unit-id\\": \\"\\", + \\"poster-for-crawler\\": \\"\\", + \\"show-casting-button\\": \\"false\\", + \\"picture-in-picture-mode\\": \\"[]\\", + \\"enable-auto-rotation\\": \\"false\\", + \\"show-screen-lock-button\\": \\"false\\", + bindProgress: \\"\\", + bindLoadedMetadata: \\"\\", + bindControlsToggle: \\"\\", + bindEnterPictureInPicture: \\"\\", + bindLeavePictureInPicture: \\"\\", + bindSeekComplete: \\"\\" + }, + Canvas: { + type: \\"\\" + }, + Ad: { + \\"ad-type\\": singleQuote(\\"banner\\"), + \\"ad-theme\\": singleQuote(\\"white\\") + }, + Editor: { + \\"read-only\\": \\"false\\", + placeholder: \\"\\", + \\"show-img-size\\": \\"false\\", + \\"show-img-toolbar\\": \\"false\\", + \\"show-img-resize\\": \\"false\\", + focus: \\"false\\", + bindReady: \\"\\", + bindFocus: \\"\\", + bindBlur: \\"\\", + bindInput: \\"\\", + bindStatusChange: \\"\\", + name: \\"\\" + }, + MatchMedia: { + \\"min-width\\": \\"\\", + \\"max-width\\": \\"\\", + width: \\"\\", + \\"min-height\\": \\"\\", + \\"max-height\\": \\"\\", + height: \\"\\", + orientation: \\"\\" + }, + FunctionalPageNavigator: { + version: singleQuote(\\"release\\"), + name: \\"\\", + args: \\"\\", + bindSuccess: \\"\\", + bindFail: \\"\\", + bindCancel: \\"\\" + }, + LivePusher: { + url: \\"\\", + mode: singleQuote(\\"RTC\\"), + autopush: \\"false\\", + muted: \\"false\\", + \\"enable-camera\\": \\"true\\", + \\"auto-focus\\": \\"true\\", + orientation: singleQuote(\\"vertical\\"), + beauty: \\"0\\", + whiteness: \\"0\\", + aspect: singleQuote(\\"9:16\\"), + \\"min-bitrate\\": \\"200\\", + \\"max-bitrate\\": \\"1000\\", + \\"audio-quality\\": singleQuote(\\"high\\"), + \\"waiting-image\\": \\"\\", + \\"waiting-image-hash\\": \\"\\", + zoom: \\"false\\", + \\"device-position\\": singleQuote(\\"front\\"), + \\"background-mute\\": \\"false\\", + mirror: \\"false\\", + \\"remote-mirror\\": \\"false\\", + \\"local-mirror\\": \\"false\\", + \\"audio-reverb-type\\": \\"0\\", + \\"enable-mic\\": \\"true\\", + \\"enable-agc\\": \\"false\\", + \\"enable-ans\\": \\"false\\", + \\"audio-volume-type\\": singleQuote(\\"voicecall\\"), + \\"video-width\\": \\"360\\", + \\"video-height\\": \\"640\\", + animation: \\"\\", + bindStateChange: \\"\\", + bindNetStatus: \\"\\", + bindBgmStart: \\"\\", + bindBgmProgress: \\"\\", + bindBgmComplete: \\"\\" + }, + OfficialAccount: { + bindLoad: \\"\\", + bindError: \\"\\" + }, + OpenData: { + type: \\"\\", + \\"open-gid\\": \\"\\", + lang: singleQuote(\\"en\\"), + \\"default-text\\": \\"\\", + \\"default-avatar\\": \\"\\", + bindError: \\"\\" + }, + NavigationBar: { + title: \\"\\", + loading: \\"false\\", + \\"front-color\\": \\"\\", + \\"background-color\\": \\"\\", + \\"color-animation-duration\\": \\"0\\", + \\"color-animation-timing-func\\": singleQuote(\\"linear\\") + }, + PageMeta: { + \\"background-text-style\\": \\"\\", + \\"background-color\\": \\"\\", + \\"background-color-top\\": \\"\\", + \\"background-color-bottom\\": \\"\\", + \\"scroll-top\\": singleQuote(\\"\\"), + \\"scroll-duration\\": \\"300\\", + \\"page-style\\": singleQuote(\\"\\"), + \\"root-font-size\\": singleQuote(\\"\\"), + bindResize: \\"\\", + bindScroll: \\"\\", + bindScrollDone: \\"\\" + }, + VoipRoom: { + openid: \\"\\", + mode: singleQuote(\\"camera\\"), + \\"device-position\\": singleQuote(\\"front\\"), + bindError: \\"\\" + }, + AdCustom: { + \\"unit-id\\": \\"\\", + \\"ad-intervals\\": \\"\\", + bindLoad: \\"\\", + bindError: \\"\\" + } + }; + var hostConfig = { + initNativeApi: initNativeApi, + onTaroElementCreate: function onTaroElementCreate(tagName) { + warn(tagName === \\"MAP\\", \\"\\\\u5fae\\\\u4fe1\\\\u5c0f\\\\u7a0b\\\\u5e8f map \\\\u7ec4\\\\u4ef6\\\\u7684 \`setting\` \\\\u5c5e\\\\u6027\\\\u9700\\\\u8981\\\\u4f20\\\\u9012\\\\u4e00\\\\u4e2a\\\\u9ed8\\\\u8ba4\\\\u503c\\\\u3002\\\\u8be6\\\\u60c5\\\\uff1a\\\\n https://developers.weixin.qq.com/miniprogram/dev/component/map.html\\"); + } + }; + mergeReconciler(hostConfig); + mergeInternalComponents(components); + var taro_runtime = __webpack_require__(1); + var classCallCheck = __webpack_require__(2); + var createClass = __webpack_require__(3); + var possibleConstructorReturn = __webpack_require__(5); + var getPrototypeOf = __webpack_require__(4); + var inherits = __webpack_require__(6); + var react = __webpack_require__(0); + var app = __webpack_require__(11); + var app_App = function(_Component) { + Object(inherits[\\"a\\"])(App, _Component); + function App() { + Object(classCallCheck[\\"a\\"])(this, App); + return Object(possibleConstructorReturn[\\"a\\"])(this, Object(getPrototypeOf[\\"a\\"])(App).apply(this, arguments)); + } + Object(createClass[\\"a\\"])(App, [ { + key: \\"componentDidMount\\", + value: function componentDidMount() {} + }, { + key: \\"componentDidShow\\", + value: function componentDidShow() {} + }, { + key: \\"componentDidHide\\", + value: function componentDidHide() {} + }, { + key: \\"componentDidCatchError\\", + value: function componentDidCatchError() {} + }, { + key: \\"render\\", + value: function render() { + return this.props.children; + } + } ]); + return App; + }(react[\\"Component\\"]); + var lib_origin_app = app_App; + var taro_react = __webpack_require__(8); + var config = { + pages: [ \\"pages/index/index\\" ], + window: { + backgroundTextStyle: \\"light\\", + navigationBarBackgroundColor: \\"#fff\\", + navigationBarTitleText: \\"WeChat\\", + navigationBarTextStyle: \\"black\\" + } + }; + taro_runtime[\\"window\\"].__taroAppConfig = config; + var inst = App(Object(taro_runtime[\\"createReactApp\\"])(lib_origin_app, react, taro_react[\\"a\\"], config)); + } +}, [ [ 14, 0, 1, 3, 2 ] ] ]); + + + +/** filePath: dist/app.json **/ +{\\"pages\\":[\\"pages/index/index\\"],\\"window\\":{\\"backgroundTextStyle\\":\\"light\\",\\"navigationBarBackgroundColor\\":\\"#fff\\",\\"navigationBarTitleText\\":\\"WeChat\\",\\"navigationBarTextStyle\\":\\"black\\"}} + +/** filePath: dist/app.wxss **/ + + +/** filePath: dist/base.wxml **/ + + + + + + + + ++ + + + ++ + ++ + + + ++ + ++ + + + ++ + ++ + + + ++ + +{{i.v}} + + + + + + + ++ + + + ++ + ++ + + + ++ + ++ + + + + + + + ++ + ++ + + + ++ + ++ + + + ++ + ++ + + + + + + + ++ + ++ + + + ++ + ++ + + + ++ + ++ + + + + + + + ++ + ++ + + + ++ + ++ + + + + + + + ++ + ++ + + + ++ + ++ + + + + + + + ++ + ++ + + + ++ + ++ + + + + + + + ++ + ++ + + + ++ + ++ + + + + + + + ++ + ++ + + + ++ + ++ + + + + + + + ++ + ++ + + + ++ + ++ + + + + + + + ++ + ++ + + + ++ + ++ + + + + + + + ++ + ++ + + + ++ + ++ + + + + + + + ++ + ++ + + + ++ + ++ + + + + + + + ++ + ++ + + + ++ + ++ + + + + + + + ++ + ++ + + + ++ + ++ + + + + + + + ++ + ++ + + +/** filePath: dist/common.js **/ +(wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 2 ], [ function(module, __webpack_exports__, __webpack_require__) { + \\"use strict\\"; + __webpack_require__.r(__webpack_exports__); + __webpack_exports__[\\"default\\"] = \\"react-mock\\"; +} ] ]); + +/** filePath: dist/comp.js **/ +(wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 6 ], { + 12: function(module, __webpack_exports__, __webpack_require__) { + \\"use strict\\"; + __webpack_require__.r(__webpack_exports__); + var _tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1); + Component(Object(_tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__[\\"createRecursiveComponentConfig\\"])()); + } +}, [ [ 12, 0, 1 ] ] ]); + +/** filePath: dist/comp.json **/ +{\\"component\\":true,\\"usingComponents\\":{\\"comp\\":\\"./comp\\"}} + +/** filePath: dist/comp.wxml **/ + + + +/** filePath: dist/irrelevant.txt **/ +I m irrelevant. + + +/** filePath: dist/pages/index/index.js **/ +(wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 7 ], { + 13: function(module, exports, __webpack_require__) {}, + 15: function(module, __webpack_exports__, __webpack_require__) { + \\"use strict\\"; + __webpack_require__.r(__webpack_exports__); + var taro_runtime = __webpack_require__(1); + var classCallCheck = __webpack_require__(2); + var createClass = __webpack_require__(3); + var possibleConstructorReturn = __webpack_require__(5); + var getPrototypeOf = __webpack_require__(4); + var inherits = __webpack_require__(6); + var react = __webpack_require__(0); + var taro_components = __webpack_require__(7); + function say() { + console.log(\\"little cat\\"); + } + function miao() { + console.log(\\"say: \\", say()); + } + var index = __webpack_require__(13); + var index_Index = function(_Component) { + Object(inherits[\\"a\\"])(Index, _Component); + function Index() { + Object(classCallCheck[\\"a\\"])(this, Index); + return Object(possibleConstructorReturn[\\"a\\"])(this, Object(getPrototypeOf[\\"a\\"])(Index).apply(this, arguments)); + } + Object(createClass[\\"a\\"])(Index, [ { + key: \\"componentDidMount\\", + value: function componentDidMount() { + miao(); + } + }, { + key: \\"render\\", + value: function render() { + return react[\\"default\\"].createElement(taro_components[\\"View\\"], { + className: \\"index\\" + }, react[\\"default\\"].createElement(taro_components[\\"Text\\"], null, \\"Hello world!\\")); + } + } ]); + return Index; + }(react[\\"Component\\"]); + var config = { + navigationBarTitleText: \\"\\\\u9996\\\\u9875\\" + }; + var inst = Page(Object(taro_runtime[\\"createPageConfig\\"])(index_Index, \\"pages/index/index\\", {}, config || {})); + } +}, [ [ 15, 0, 1, 3, 2 ] ] ]); + +/** filePath: dist/pages/index/index.json **/ +{\\"navigationBarTitleText\\":\\"首页\\",\\"usingComponents\\":{\\"comp\\":\\"../../comp\\"}} + +/** filePath: dist/pages/index/index.wxml **/ + + + +/** filePath: dist/pages/index/index.wxss **/ + + +/** filePath: dist/runtime.js **/ +(function(modules) { + function webpackJsonpCallback(data) { + var chunkIds = data[0]; + var moreModules = data[1]; + var executeModules = data[2]; + var moduleId, chunkId, i = 0, resolves = []; + for (;i < chunkIds.length; i++) { + chunkId = chunkIds[i]; + if (Object.prototype.hasOwnProperty.call(installedChunks, chunkId) && installedChunks[chunkId]) { + resolves.push(installedChunks[chunkId][0]); + } + installedChunks[chunkId] = 0; + } + for (moduleId in moreModules) { + if (Object.prototype.hasOwnProperty.call(moreModules, moduleId)) { + modules[moduleId] = moreModules[moduleId]; + } + } + if (parentJsonpFunction) parentJsonpFunction(data); + while (resolves.length) { + resolves.shift()(); + } + deferredModules.push.apply(deferredModules, executeModules || []); + return checkDeferredModules(); + } + function checkDeferredModules() { + var result; + for (var i = 0; i < deferredModules.length; i++) { + var deferredModule = deferredModules[i]; + var fulfilled = true; + for (var j = 1; j < deferredModule.length; j++) { + var depId = deferredModule[j]; + if (installedChunks[depId] !== 0) fulfilled = false; + } + if (fulfilled) { + deferredModules.splice(i--, 1); + result = __webpack_require__(__webpack_require__.s = deferredModule[0]); + } + } + return result; + } + var installedModules = {}; + var installedChunks = { + 0: 0 + }; + var deferredModules = []; + function __webpack_require__(moduleId) { + if (installedModules[moduleId]) { + return installedModules[moduleId].exports; + } + var module = installedModules[moduleId] = { + i: moduleId, + l: false, + exports: {} + }; + modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); + module.l = true; + return module.exports; + } + __webpack_require__.m = modules; + __webpack_require__.c = installedModules; + __webpack_require__.d = function(exports, name, getter) { + if (!__webpack_require__.o(exports, name)) { + Object.defineProperty(exports, name, { + enumerable: true, + get: getter + }); + } + }; + __webpack_require__.r = function(exports) { + if (typeof Symbol !== \\"undefined\\" && Symbol.toStringTag) { + Object.defineProperty(exports, Symbol.toStringTag, { + value: \\"Module\\" + }); + } + Object.defineProperty(exports, \\"__esModule\\", { + value: true + }); + }; + __webpack_require__.t = function(value, mode) { + if (mode & 1) value = __webpack_require__(value); + if (mode & 8) return value; + if (mode & 4 && typeof value === \\"object\\" && value && value.__esModule) return value; + var ns = Object.create(null); + __webpack_require__.r(ns); + Object.defineProperty(ns, \\"default\\", { + enumerable: true, + value: value + }); + if (mode & 2 && typeof value != \\"string\\") for (var key in value) __webpack_require__.d(ns, key, function(key) { + return value[key]; + }.bind(null, key)); + return ns; + }; + __webpack_require__.n = function(module) { + var getter = module && module.__esModule ? function getDefault() { + return module[\\"default\\"]; + } : function getModuleExports() { + return module; + }; + __webpack_require__.d(getter, \\"a\\", getter); + return getter; + }; + __webpack_require__.o = function(object, property) { + return Object.prototype.hasOwnProperty.call(object, property); + }; + __webpack_require__.p = \\"/\\"; + var jsonpArray = wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []; + var oldJsonpFunction = jsonpArray.push.bind(jsonpArray); + jsonpArray.push = webpackJsonpCallback; + jsonpArray = jsonpArray.slice(); + for (var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]); + var parentJsonpFunction = oldJsonpFunction; + checkDeferredModules(); +})([]); + +/** filePath: dist/taro.js **/ +(wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 1 ], { + 1: function(module, __webpack_exports__, __webpack_require__) { + \\"use strict\\"; + var _unused_webpack_default_export = \\"taro-runtime-mock\\"; + }, + 7: function(module, __webpack_exports__, __webpack_require__) { + \\"use strict\\"; + var _unused_webpack_default_export = \\"taro-components-mock\\"; + }, + 8: function(module, __webpack_exports__, __webpack_require__) { + \\"use strict\\"; + __webpack_exports__[\\"a\\"] = \\"taro-react-mock\\"; + } +} ]); + +/** filePath: dist/utils.wxs **/ +module.exports = { + a: function (l, n, s) { + var a = [\\"view\\",\\"cover-view\\",\\"block\\",\\"text\\",\\"slot\\",\\"slot-view\\",\\"label\\",\\"form\\",\\"scroll-view\\"] + var b = [\\"slot\\",\\"slot-view\\",\\"label\\",\\"form\\",\\"scroll-view\\"] + if (a.indexOf(n) === -1) { + l = 0 + } + if (b.indexOf(n) > -1) { + var u = s.split(',') + var depth = 0 + for (var i = 0; i < u.length; i++) { + if (u[i] === n) depth++ + } + l = depth + } + return 'tmpl_' + l + '_' + n + }, + b: function (a, b) { + return a === undefined ? b : a + }, + c: function(i, prefix) { + var s = i.focus !== undefined ? 'focus' : 'blur' + return prefix + i.nn + '_' + s + }, + d: function (i, v) { + return i === undefined ? v : i + }, + e: function (n) { + return 'tmpl_' + n + '_container' + }, + f: function (l, n) { + var b = [\\"slot\\",\\"slot-view\\",\\"label\\",\\"form\\",\\"scroll-view\\"] + if (b.indexOf(n) > -1) { + if (l) l += ',' + l += n + } + return l + } +} + +/** filePath: dist/vendors.js **/ +(wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 3 ], [ , , function(module, __webpack_exports__, __webpack_require__) { + \\"use strict\\"; + __webpack_require__.d(__webpack_exports__, \\"a\\", (function() { + return _classCallCheck; + })); + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError(\\"Cannot call a class as a function\\"); + } + } +}, function(module, __webpack_exports__, __webpack_require__) { + \\"use strict\\"; + __webpack_require__.d(__webpack_exports__, \\"a\\", (function() { + return _createClass; + })); + function _defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if (\\"value\\" in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + function _createClass(Constructor, protoProps, staticProps) { + if (protoProps) _defineProperties(Constructor.prototype, protoProps); + if (staticProps) _defineProperties(Constructor, staticProps); + return Constructor; + } +}, function(module, __webpack_exports__, __webpack_require__) { + \\"use strict\\"; + __webpack_require__.d(__webpack_exports__, \\"a\\", (function() { + return _getPrototypeOf; + })); + function _getPrototypeOf(o) { + _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { + return o.__proto__ || Object.getPrototypeOf(o); + }; + return _getPrototypeOf(o); + } +}, function(module, __webpack_exports__, __webpack_require__) { + \\"use strict\\"; + __webpack_require__.d(__webpack_exports__, \\"a\\", (function() { + return _possibleConstructorReturn; + })); + function _typeof(obj) { + \\"@babel/helpers - typeof\\"; + if (typeof Symbol === \\"function\\" && typeof Symbol.iterator === \\"symbol\\") { + _typeof = function _typeof(obj) { + return typeof obj; + }; + } else { + _typeof = function _typeof(obj) { + return obj && typeof Symbol === \\"function\\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \\"symbol\\" : typeof obj; + }; + } + return _typeof(obj); + } + function _assertThisInitialized(self) { + if (self === void 0) { + throw new ReferenceError(\\"this hasn't been initialised - super() hasn't been called\\"); + } + return self; + } + function _possibleConstructorReturn(self, call) { + if (call && (_typeof(call) === \\"object\\" || typeof call === \\"function\\")) { + return call; + } + return _assertThisInitialized(self); + } +}, function(module, __webpack_exports__, __webpack_require__) { + \\"use strict\\"; + __webpack_require__.d(__webpack_exports__, \\"a\\", (function() { + return _inherits; + })); + function _setPrototypeOf(o, p) { + _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { + o.__proto__ = p; + return o; + }; + return _setPrototypeOf(o, p); + } + function _inherits(subClass, superClass) { + if (typeof superClass !== \\"function\\" && superClass !== null) { + throw new TypeError(\\"Super expression must either be null or a function\\"); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + writable: true, + configurable: true + } + }); + if (superClass) _setPrototypeOf(subClass, superClass); + } +} ] ]); + +/** filePath: dist/weapp/index.wxml **/ + weapp + +" +`; diff --git a/packages/taro-mini-runner/src/__tests__/__snapshots__/css-modules.spec.ts.snap b/packages/taro-mini-runner/src/__tests__/__snapshots__/css-modules.spec.ts.snap new file mode 100644 index 000000000000..9695924edd59 --- /dev/null +++ b/packages/taro-mini-runner/src/__tests__/__snapshots__/css-modules.spec.ts.snap @@ -0,0 +1,4653 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`css modules should use css modules with global mode 1`] = `16`; + +exports[`css modules should use css modules with global mode 2`] = ` +" +/** filePath: dist/app.js **/ +require(\\"./runtime\\"); + +require(\\"./common\\"); + +require(\\"./vendors\\"); + +require(\\"./taro\\"); + +(wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 4 ], { + 13: function(module, exports, __webpack_require__) {}, + 16: function(module, __webpack_exports__, __webpack_require__) { + \\"use strict\\"; + __webpack_require__.r(__webpack_exports__); + function _arrayLikeToArray(arr, len) { + if (len == null || len > arr.length) len = arr.length; + for (var i = 0, arr2 = new Array(len); i < len; i++) { + arr2[i] = arr[i]; + } + return arr2; + } + function _arrayWithoutHoles(arr) { + if (Array.isArray(arr)) return _arrayLikeToArray(arr); + } + function _iterableToArray(iter) { + if (typeof Symbol !== \\"undefined\\" && Symbol.iterator in Object(iter)) return Array.from(iter); + } + function _unsupportedIterableToArray(o, minLen) { + if (!o) return; + if (typeof o === \\"string\\") return _arrayLikeToArray(o, minLen); + var n = Object.prototype.toString.call(o).slice(8, -1); + if (n === \\"Object\\" && o.constructor) n = o.constructor.name; + if (n === \\"Map\\" || n === \\"Set\\") return Array.from(o); + if (n === \\"Arguments\\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); + } + function _nonIterableSpread() { + throw new TypeError(\\"Invalid attempt to spread non-iterable instance.\\\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\\"); + } + function _toConsumableArray(arr) { + return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); + } + function _typeof(obj) { + \\"@babel/helpers - typeof\\"; + if (typeof Symbol === \\"function\\" && typeof Symbol.iterator === \\"symbol\\") { + _typeof = function _typeof(obj) { + return typeof obj; + }; + } else { + _typeof = function _typeof(obj) { + return obj && typeof Symbol === \\"function\\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \\"symbol\\" : typeof obj; + }; + } + return _typeof(obj); + } + function _assertThisInitialized(self) { + if (self === void 0) { + throw new ReferenceError(\\"this hasn't been initialised - super() hasn't been called\\"); + } + return self; + } + function _possibleConstructorReturn(self, call) { + if (call && (_typeof(call) === \\"object\\" || typeof call === \\"function\\")) { + return call; + } + return _assertThisInitialized(self); + } + function _getPrototypeOf(o) { + _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { + return o.__proto__ || Object.getPrototypeOf(o); + }; + return _getPrototypeOf(o); + } + function _setPrototypeOf(o, p) { + _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { + o.__proto__ = p; + return o; + }; + return _setPrototypeOf(o, p); + } + function _inherits(subClass, superClass) { + if (typeof superClass !== \\"function\\" && superClass !== null) { + throw new TypeError(\\"Super expression must either be null or a function\\"); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + writable: true, + configurable: true + } + }); + if (superClass) _setPrototypeOf(subClass, superClass); + } + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError(\\"Cannot call a class as a function\\"); + } + } + function _defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if (\\"value\\" in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + function _createClass(Constructor, protoProps, staticProps) { + if (protoProps) _defineProperties(Constructor.prototype, protoProps); + if (staticProps) _defineProperties(Constructor, staticProps); + return Constructor; + } + function isString(o) { + return typeof o === \\"string\\"; + } + function isUndefined(o) { + return typeof o === \\"undefined\\"; + } + function isNull(o) { + return o === null; + } + function isObject(o) { + return o !== null && _typeof(o) === \\"object\\"; + } + function isBoolean(o) { + return o === true || o === false; + } + function isFunction(o) { + return typeof o === \\"function\\"; + } + function isNumber(o) { + return typeof o === \\"number\\"; + } + function isBooleanStringLiteral(o) { + return o === \\"true\\" || o === \\"false\\"; + } + var isArray = Array.isArray; + var styles = { + style: \\"i.\\".concat(\\"st\\"), + class: \\"i.\\".concat(\\"cl\\") + }; + var events = { + bindtap: \\"eh\\" + }; + var touchEvents = { + bindTouchStart: \\"\\", + bindTouchMove: \\"\\", + bindTouchEnd: \\"\\", + bindTouchCancel: \\"\\", + bindLongTap: \\"\\" + }; + var animationEvents = { + bindAnimationStart: \\"\\", + bindAnimationIteration: \\"\\", + bindAnimationEnd: \\"\\", + bindTransitionEnd: \\"\\" + }; + var specialEvents = new Set([ \\"htouchmove\\", \\"vtouchmove\\" ]); + function singleQuote(s) { + return \\"'\\".concat(s, \\"'\\"); + } + var View = Object.assign(Object.assign({ + \\"hover-class\\": singleQuote(\\"none\\"), + \\"hover-stop-propagation\\": \\"false\\", + \\"hover-start-time\\": \\"50\\", + \\"hover-stay-time\\": \\"400\\", + animation: \\"\\" + }, touchEvents), animationEvents); + var Icon = { + type: \\"\\", + size: \\"23\\", + color: \\"\\" + }; + var MapComp = Object.assign({ + longitude: \\"\\", + latitude: \\"\\", + scale: \\"16\\", + markers: \\"[]\\", + covers: \\"\\", + polyline: \\"[]\\", + circles: \\"[]\\", + controls: \\"[]\\", + \\"include-points\\": \\"[]\\", + \\"show-location\\": \\"\\", + \\"layer-style\\": \\"1\\", + bindMarkerTap: \\"\\", + bindControlTap: \\"\\", + bindCalloutTap: \\"\\", + bindUpdated: \\"\\" + }, touchEvents); + var Progress = { + percent: \\"\\", + \\"stroke-width\\": \\"6\\", + color: singleQuote(\\"#09BB07\\"), + activeColor: singleQuote(\\"#09BB07\\"), + backgroundColor: singleQuote(\\"#EBEBEB\\"), + active: \\"false\\", + \\"active-mode\\": singleQuote(\\"backwards\\"), + \\"show-info\\": \\"false\\" + }; + var RichText = { + nodes: \\"[]\\" + }; + var Text = { + selectable: \\"false\\", + space: \\"\\", + decode: \\"false\\" + }; + var Button = { + size: singleQuote(\\"default\\"), + type: \\"\\", + plain: \\"false\\", + disabled: \\"\\", + loading: \\"false\\", + \\"form-type\\": \\"\\", + \\"open-type\\": \\"\\", + \\"hover-class\\": singleQuote(\\"button-hover\\"), + \\"hover-stop-propagation\\": \\"false\\", + \\"hover-start-time\\": \\"20\\", + \\"hover-stay-time\\": \\"70\\", + name: \\"\\" + }; + var Checkbox = { + value: \\"\\", + disabled: \\"\\", + checked: \\"false\\", + color: singleQuote(\\"#09BB07\\"), + name: \\"\\" + }; + var CheckboxGroup = { + bindChange: \\"\\", + name: \\"\\" + }; + var Form = { + \\"report-submit\\": \\"false\\", + bindSubmit: \\"\\", + bindReset: \\"\\", + name: \\"\\" + }; + var Input = { + value: \\"\\", + type: singleQuote(\\"\\"), + password: \\"false\\", + placeholder: \\"\\", + \\"placeholder-style\\": \\"\\", + \\"placeholder-class\\": singleQuote(\\"input-placeholder\\"), + disabled: \\"\\", + maxlength: \\"140\\", + \\"cursor-spacing\\": \\"0\\", + focus: \\"false\\", + \\"confirm-type\\": singleQuote(\\"done\\"), + \\"confirm-hold\\": \\"false\\", + cursor: \\"i.value.length\\", + \\"selection-start\\": \\"-1\\", + \\"selection-end\\": \\"-1\\", + bindInput: \\"\\", + bindFocus: \\"\\", + bindBlur: \\"\\", + bindConfirm: \\"\\", + name: \\"\\" + }; + var Label = { + for: \\"\\", + name: \\"\\" + }; + var Picker = { + mode: singleQuote(\\"selector\\"), + disabled: \\"\\", + range: \\"\\", + \\"range-key\\": \\"\\", + value: \\"\\", + start: \\"\\", + end: \\"\\", + fields: singleQuote(\\"day\\"), + \\"custom-item\\": \\"\\", + name: \\"\\", + bindCancel: \\"\\", + bindChange: \\"\\", + bindColumnChange: \\"\\" + }; + var PickerView = { + value: \\"\\", + \\"indicator-style\\": \\"\\", + \\"indicator-class\\": \\"\\", + \\"mask-style\\": \\"\\", + \\"mask-class\\": \\"\\", + bindChange: \\"\\", + name: \\"\\" + }; + var PickerViewColumn = { + name: \\"\\" + }; + var Radio = { + value: \\"\\", + checked: \\"false\\", + disabled: \\"\\", + color: singleQuote(\\"#09BB07\\"), + name: \\"\\" + }; + var RadioGroup = { + bindChange: \\"\\", + name: \\"\\" + }; + var Slider = { + min: \\"0\\", + max: \\"100\\", + step: \\"1\\", + disabled: \\"\\", + value: \\"0\\", + activeColor: singleQuote(\\"#1aad19\\"), + backgroundColor: singleQuote(\\"#e9e9e9\\"), + \\"block-size\\": \\"28\\", + \\"block-color\\": singleQuote(\\"#ffffff\\"), + \\"show-value\\": \\"false\\", + bindChange: \\"\\", + bindChanging: \\"\\", + name: \\"\\" + }; + var Switch = { + checked: \\"false\\", + disabled: \\"\\", + type: singleQuote(\\"switch\\"), + color: singleQuote(\\"#04BE02\\"), + bindChange: \\"\\", + name: \\"\\" + }; + var Textarea = { + value: \\"\\", + placeholder: \\"\\", + \\"placeholder-style\\": \\"\\", + \\"placeholder-class\\": singleQuote(\\"textarea-placeholder\\"), + disabled: \\"\\", + maxlength: \\"140\\", + \\"auto-focus\\": \\"false\\", + focus: \\"false\\", + \\"auto-height\\": \\"false\\", + fixed: \\"false\\", + \\"cursor-spacing\\": \\"0\\", + cursor: \\"-1\\", + \\"selection-start\\": \\"-1\\", + \\"selection-end\\": \\"-1\\", + bindFocus: \\"\\", + bindBlur: \\"\\", + bindLineChange: \\"\\", + bindInput: \\"\\", + bindConfirm: \\"\\", + name: \\"\\" + }; + var CoverImage = { + src: \\"\\", + bindLoad: \\"eh\\", + bindError: \\"eh\\" + }; + var CoverView = Object.assign({ + \\"scroll-top\\": \\"false\\" + }, touchEvents); + var MovableArea = { + \\"scale-area\\": \\"false\\" + }; + var MovableView = Object.assign(Object.assign({ + direction: \\"none\\", + inertia: \\"false\\", + \\"out-of-bounds\\": \\"false\\", + x: \\"\\", + y: \\"\\", + damping: \\"20\\", + friction: \\"2\\", + disabled: \\"\\", + scale: \\"false\\", + \\"scale-min\\": \\"0.5\\", + \\"scale-max\\": \\"10\\", + \\"scale-value\\": \\"1\\", + animation: \\"true\\", + bindChange: \\"\\", + bindScale: \\"\\", + htouchmove: \\"\\", + vtouchmove: \\"\\", + width: singleQuote(\\"10px\\"), + height: singleQuote(\\"10px\\") + }, touchEvents), animationEvents); + var ScrollView = Object.assign(Object.assign({ + \\"scroll-x\\": \\"false\\", + \\"scroll-y\\": \\"false\\", + \\"upper-threshold\\": \\"50\\", + \\"lower-threshold\\": \\"50\\", + \\"scroll-top\\": \\"\\", + \\"scroll-left\\": \\"\\", + \\"scroll-into-view\\": \\"\\", + \\"scroll-with-animation\\": \\"false\\", + \\"enable-back-to-top\\": \\"false\\", + bindScrollToUpper: \\"\\", + bindScrollToLower: \\"\\", + bindScroll: \\"\\" + }, touchEvents), animationEvents); + var Swiper = Object.assign({ + \\"indicator-dots\\": \\"false\\", + \\"indicator-color\\": singleQuote(\\"rgba(0, 0, 0, .3)\\"), + \\"indicator-active-color\\": singleQuote(\\"#000000\\"), + autoplay: \\"false\\", + current: \\"0\\", + interval: \\"5000\\", + duration: \\"500\\", + circular: \\"false\\", + vertical: \\"false\\", + \\"previous-margin\\": \\"'0px'\\", + \\"next-margin\\": \\"'0px'\\", + \\"display-multiple-items\\": \\"1\\", + bindChange: \\"\\", + bindTransition: \\"\\", + bindAnimationFinish: \\"\\" + }, touchEvents); + var SwiperItem = { + \\"item-id\\": \\"\\" + }; + var Navigator = { + url: \\"\\", + \\"open-type\\": singleQuote(\\"navigate\\"), + delta: \\"1\\", + \\"hover-class\\": singleQuote(\\"navigator-hover\\"), + \\"hover-stop-propagation\\": \\"false\\", + \\"hover-start-time\\": \\"50\\", + \\"hover-stay-time\\": \\"600\\", + bindSuccess: \\"\\", + bindFail: \\"\\", + bindComplete: \\"\\" + }; + var Audio = { + id: \\"\\", + src: \\"\\", + loop: \\"false\\", + controls: \\"false\\", + poster: \\"\\", + name: \\"\\", + author: \\"\\", + bindError: \\"\\", + bindPlay: \\"\\", + bindPause: \\"\\", + bindTimeUpdate: \\"\\", + bindEnded: \\"\\" + }; + var Camera = { + \\"device-position\\": singleQuote(\\"back\\"), + flash: singleQuote(\\"auto\\"), + bindStop: \\"\\", + bindError: \\"\\" + }; + var Image = Object.assign({ + src: \\"\\", + mode: singleQuote(\\"scaleToFill\\"), + \\"lazy-load\\": \\"false\\", + bindError: \\"\\", + bindLoad: \\"\\" + }, touchEvents); + var LivePlayer = { + src: \\"\\", + autoplay: \\"false\\", + muted: \\"false\\", + orientation: singleQuote(\\"vertical\\"), + \\"object-fit\\": singleQuote(\\"contain\\"), + \\"background-mute\\": \\"false\\", + \\"min-cache\\": \\"1\\", + \\"max-cache\\": \\"3\\", + animation: \\"\\", + bindStateChange: \\"\\", + bindFullScreenChange: \\"\\", + bindNetStatus: \\"\\" + }; + var Video = { + src: \\"\\", + duration: \\"\\", + controls: \\"true\\", + \\"danmu-list\\": \\"\\", + \\"danmu-btn\\": \\"\\", + \\"enable-danmu\\": \\"\\", + autoplay: \\"false\\", + loop: \\"false\\", + muted: \\"false\\", + \\"initial-time\\": \\"0\\", + \\"page-gesture\\": \\"false\\", + direction: \\"\\", + \\"show-progress\\": \\"true\\", + \\"show-fullscreen-btn\\": \\"true\\", + \\"show-play-btn\\": \\"true\\", + \\"show-center-play-btn\\": \\"true\\", + \\"enable-progress-gesture\\": \\"true\\", + \\"object-fit\\": singleQuote(\\"contain\\"), + poster: \\"\\", + \\"show-mute-btn\\": \\"false\\", + animation: \\"\\", + bindPlay: \\"\\", + bindPause: \\"\\", + bindEnded: \\"\\", + bindTimeUpdate: \\"\\", + bindFullScreenChange: \\"\\", + bindWaiting: \\"\\", + bindError: \\"\\" + }; + var Canvas = Object.assign({ + \\"canvas-id\\": \\"\\", + \\"disable-scroll\\": \\"false\\", + bindError: \\"\\" + }, touchEvents); + var Ad = { + \\"unit-id\\": \\"\\", + \\"ad-intervals\\": \\"\\", + bindLoad: \\"\\", + bindError: \\"\\", + bindClose: \\"\\" + }; + var WebView = { + src: \\"\\", + bindMessage: \\"\\", + bindLoad: \\"\\", + bindError: \\"\\" + }; + var Block = {}; + var SlotView = { + name: \\"\\" + }; + var Slot = { + name: \\"\\" + }; + var internalComponents = { + View: View, + Icon: Icon, + Progress: Progress, + RichText: RichText, + Text: Text, + Button: Button, + Checkbox: Checkbox, + CheckboxGroup: CheckboxGroup, + Form: Form, + Input: Input, + Label: Label, + Picker: Picker, + PickerView: PickerView, + PickerViewColumn: PickerViewColumn, + Radio: Radio, + RadioGroup: RadioGroup, + Slider: Slider, + Switch: Switch, + CoverImage: CoverImage, + Textarea: Textarea, + CoverView: CoverView, + MovableArea: MovableArea, + MovableView: MovableView, + ScrollView: ScrollView, + Swiper: Swiper, + SwiperItem: SwiperItem, + Navigator: Navigator, + Audio: Audio, + Camera: Camera, + Image: Image, + LivePlayer: LivePlayer, + Video: Video, + Canvas: Canvas, + Ad: Ad, + WebView: WebView, + Block: Block, + Map: MapComp, + Slot: Slot, + SlotView: SlotView + }; + var controlledComponent = new Set([ \\"input\\", \\"checkbox\\", \\"picker\\", \\"picker-view\\", \\"radio\\", \\"slider\\", \\"switch\\", \\"textarea\\" ]); + var focusComponents = new Set([ \\"input\\", \\"textarea\\" ]); + var voidElements = new Set([ \\"progress\\", \\"icon\\", \\"rich-text\\", \\"input\\", \\"textarea\\", \\"slider\\", \\"switch\\", \\"audio\\", \\"live-pusher\\", \\"video\\", \\"ad\\", \\"official-account\\", \\"open-data\\", \\"navigation-bar\\" ]); + var nestElements = new Map([ [ \\"view\\", -1 ], [ \\"cover-view\\", -1 ], [ \\"block\\", -1 ], [ \\"text\\", -1 ], [ \\"slot\\", 8 ], [ \\"slot-view\\", 8 ], [ \\"label\\", 6 ], [ \\"form\\", 4 ], [ \\"scroll-view\\", 4 ] ]); + var EMPTY_OBJ = {}; + var EMPTY_ARR = []; + var noop = function noop() {}; + var defaultReconciler = {}; + var box = function box(v) { + return { + v: v + }; + }; + var unbox = function unbox(b) { + return b.v; + }; + function toDashed(s) { + return s.replace(/([a-z0-9])([A-Z])/g, \\"$1-$2\\").toLowerCase(); + } + function toCamelCase(s) { + var camel = \\"\\"; + var nextCap = false; + for (var i = 0; i < s.length; i++) { + if (s[i] !== \\"-\\") { + camel += nextCap ? s[i].toUpperCase() : s[i]; + nextCap = false; + } else { + nextCap = true; + } + } + return camel; + } + function capitalize(s) { + return s.charAt(0).toUpperCase() + s.slice(1); + } + var shared_esm_hasOwnProperty = Object.prototype.hasOwnProperty; + var hasOwn = function hasOwn(val, key) { + return shared_esm_hasOwnProperty.call(val, key); + }; + var reportIssue = \\"\\\\u5982\\\\u6709\\\\u7591\\\\u95ee\\\\uff0c\\\\u8bf7\\\\u63d0\\\\u4ea4 issue \\\\u81f3\\\\uff1ahttps://github.com/nervjs/taro/issues\\"; + function ensure(condition, msg) { + if (!condition) { + throw new Error(msg + \\"\\\\n\\" + reportIssue); + } + } + function warn(condition, msg) { + if (false) {} + } + function queryToJson(str) { + var dec = decodeURIComponent; + var qp = str.split(\\"&\\"); + var ret = {}; + var name; + var val; + for (var i = 0, l = qp.length, item; i < l; ++i) { + item = qp[i]; + if (item.length) { + var s = item.indexOf(\\"=\\"); + if (s < 0) { + name = dec(item); + val = \\"\\"; + } else { + name = dec(item.slice(0, s)); + val = dec(item.slice(s + 1)); + } + if (typeof ret[name] === \\"string\\") { + ret[name] = [ ret[name] ]; + } + if (Array.isArray(ret[name])) { + ret[name].push(val); + } else { + ret[name] = val; + } + } + } + return ret; + } + var _uniqueId = 1; + var _loadTime = (new Date).getTime().toString(); + function getUniqueKey() { + return _loadTime + _uniqueId++; + } + var cacheData = {}; + function cacheDataSet(key, val) { + cacheData[key] = val; + } + function cacheDataGet(key, delelteAfterGet) { + var temp = cacheData[key]; + delelteAfterGet && delete cacheData[key]; + return temp; + } + function cacheDataHas(key) { + return key in cacheData; + } + function mergeInternalComponents(components) { + Object.keys(components).forEach((function(name) { + if (name in internalComponents) { + Object.assign(internalComponents[name], components[name]); + } else { + internalComponents[name] = components[name]; + } + })); + } + function mergeReconciler(hostConfig) { + Object.assign(defaultReconciler, hostConfig); + } + var weixinAdapter = { + if: \\"wx:if\\", + else: \\"wx:else\\", + elseif: \\"wx:elif\\", + for: \\"wx:for\\", + forItem: \\"wx:for-item\\", + forIndex: \\"wx:for-index\\", + key: \\"wx:key\\", + xs: \\"wxs\\", + type: \\"weapp\\" + }; + var shared_esm_BaseTemplate = function() { + function BaseTemplate() { + var _this = this; + _classCallCheck(this, BaseTemplate); + this.exportExpr = \\"module.exports =\\"; + this.supportXS = false; + this.Adapter = weixinAdapter; + this.internalComponents = internalComponents; + this.focusComponents = focusComponents; + this.voidElements = voidElements; + this.nestElements = nestElements; + this.buildPageTemplate = function(baseTempPath) { + var template = '\\\\n'); + return template; + }; + this.buildBaseComponentTemplate = function(ext) { + var data = !_this.isSupportRecursive && _this.supportXS ? _this.dataKeymap(\\"i:i,l:l\\") : _this.dataKeymap(\\"i:i\\"); + return ' \\\\n'); + }; + this.buildXScript = function() { + return \\"\\".concat(_this.exportExpr, \\" {\\\\n a: \\").concat(_this.buildXSTmplName(), \\",\\\\n b: function (a, b) {\\\\n return a === undefined ? b : a\\\\n },\\\\n c: function(i, prefix) {\\\\n var s = i.focus !== undefined ? 'focus' : 'blur'\\\\n return prefix + i.\\", \\"nn\\", \\" + '_' + s\\\\n },\\\\n d: function (i, v) {\\\\n return i === undefined ? v : i\\\\n },\\\\n e: function (n) {\\\\n return 'tmpl_' + n + '_\\", \\"container\\", \\"'\\\\n },\\\\n \\").concat(_this.buildXSTmpExtra(), \\"\\\\n}\\"); + }; + } + _createClass(BaseTemplate, [ { + key: \\"buildAttribute\\", + value: function buildAttribute(attrs, nodeName) { + var _this2 = this; + return Object.keys(attrs).map((function(k) { + return \\"\\".concat(k, '=\\"').concat(k.startsWith(\\"bind\\") || k.startsWith(\\"on\\") ? attrs[k] : \\"{\\".concat(_this2.getAttrValue(attrs[k], k, nodeName), \\"}\\"), '\\" '); + })).join(\\"\\"); + } + }, { + key: \\"replacePropName\\", + value: function replacePropName(name, value, _componentName) { + if (value === \\"eh\\") return name.toLowerCase(); + return name; + } + }, { + key: \\"createMiniComponents\\", + value: function createMiniComponents(components) { + var result = Object.create(null); + for (var key in components) { + if (hasOwn(components, key)) { + var component = components[key]; + var compName = toDashed(key); + var newComp = Object.create(null); + if (isFunction(this.modifyCompProps)) { + component = this.modifyCompProps(compName, component); + } + for (var prop in component) { + if (hasOwn(component, prop)) { + var propValue = component[prop]; + if (prop.startsWith(\\"bind\\") || specialEvents.has(prop)) { + propValue = \\"eh\\"; + } else if (propValue === \\"\\") { + propValue = \\"i.\\".concat(toCamelCase(prop)); + } else if (isBooleanStringLiteral(propValue) || isNumber(+propValue)) { + propValue = this.supportXS ? \\"xs.b(i.\\".concat(toCamelCase(prop), \\",\\").concat(propValue, \\")\\") : \\"i.\\".concat(toCamelCase(prop), \\"===undefined?\\").concat(propValue, \\":i.\\").concat(toCamelCase(prop)); + } else { + propValue = \\"i.\\".concat(toCamelCase(prop), \\"||\\").concat(propValue || singleQuote(\\"\\")); + } + prop = this.replacePropName(prop, propValue, compName); + newComp[prop] = propValue; + } + } + if (compName !== \\"block\\") { + Object.assign(newComp, styles, this.getEvents()); + } + if (compName === \\"swiper-item\\") { + delete newComp.style; + } + if (compName === \\"slot\\" || compName === \\"slot-view\\") { + result[compName] = { + slot: \\"i.name\\" + }; + } else { + result[compName] = newComp; + } + } + } + return result; + } + }, { + key: \\"buildBaseTemplate\\", + value: function buildBaseTemplate() { + var Adapter = this.Adapter; + var data = !this.isSupportRecursive && this.supportXS ? \\"\\".concat(this.dataKeymap(\\"i:item,l:''\\")) : this.dataKeymap(\\"i:item\\"); + return \\"\\".concat(this.buildXsTemplate(), '\\\\n\\\\n \\\\n \\\\n \\\\n\\\\n'); + } + }, { + key: \\"buildThirdPartyAttr\\", + value: function buildThirdPartyAttr(attrs) { + return Array.from(attrs).reduce((function(str, attr) { + if (attr.startsWith(\\"@\\")) { + return str + \\"bind\\".concat(attr.slice(1), '=\\"eh\\" '); + } else if (attr.startsWith(\\"bind\\")) { + return str + \\"\\".concat(attr, '=\\"eh\\" '); + } else if (attr.startsWith(\\"on\\")) { + return str + \\"bind\\".concat(attr.slice(2).toLowerCase(), '=\\"eh\\" '); + } + return str + \\"\\".concat(attr, '=\\"{{i.').concat(toCamelCase(attr), '}}\\" '); + }), \\"\\"); + } + }, { + key: \\"buildComponentTemplate\\", + value: function buildComponentTemplate(comp, level) { + return this.focusComponents.has(comp.nodeName) ? this.buildFocusComponentTemplte(comp, level) : this.buildStandardComponentTemplate(comp, level); + } + }, { + key: \\"buildFocusComponentTemplte\\", + value: function buildFocusComponentTemplte(comp, level) { + var attrs = Object.assign({}, comp.attributes); + var templateName = this.supportXS ? \\"xs.c(i, 'tmpl_\\".concat(level, \\"_')\\") : \\"i.focus ? 'tmpl_\\".concat(level, \\"_\\").concat(comp.nodeName, \\"_focus' : 'tmpl_\\").concat(level, \\"_\\").concat(comp.nodeName, \\"_blur'\\"); + delete attrs.focus; + return '\\\\n\\\\n \\\\n\\\\n\\\\n\\\\n <').concat(comp.nodeName, \\" \\").concat(this.buildAttribute(comp.attributes, comp.nodeName), ' id=\\"{{i.uid}}\\" />\\\\n\\\\n\\\\n\\\\n <').concat(comp.nodeName, \\" \\").concat(this.buildAttribute(attrs, comp.nodeName), ' id=\\"{{i.uid}}\\" />\\\\n\\\\n'); + } + }, { + key: \\"buildStandardComponentTemplate\\", + value: function buildStandardComponentTemplate(comp, level) { + var isSupportRecursive = this.isSupportRecursive, Adapter = this.Adapter; + var nextLevel = isSupportRecursive ? 0 : level + 1; + var data = !this.isSupportRecursive ? \\"\\".concat(this.dataKeymap(\\"i:item,l:l\\")) : this.dataKeymap(\\"i:item\\"); + var child = this.supportXS ? '') : ''); + if (isFunction(this.modifyLoopBody)) { + child = this.modifyLoopBody(child, comp.nodeName); + } + var children = this.voidElements.has(comp.nodeName) ? \\"\\" : \\"\\\\n\\\\n ').concat(child, \\"\\\\n \\\\n \\"); + if (isFunction(this.modifyLoopContainer)) { + children = this.modifyLoopContainer(children, comp.nodeName); + } + var nodeName = comp.nodeName === \\"slot\\" || comp.nodeName === \\"slot-view\\" ? \\"view\\" : comp.nodeName; + var res = '\\\\n\\\\n <').concat(nodeName, \\" \\").concat(this.buildAttribute(comp.attributes, comp.nodeName), ' id=\\"{{i.uid}}\\">').concat(children, \\"\\").concat(nodeName, \\">\\\\n\\\\n\\"); + if (isFunction(this.modifyTemplateResult)) { + res = this.modifyTemplateResult(res, comp.nodeName, level, children); + } + return res; + } + }, { + key: \\"buildPlainTextTemplate\\", + value: function buildPlainTextTemplate(level) { + return '\\\\n\\\\n{{i.', \\"v\\", \\"}} \\\\n\\\\n\\"); + } + }, { + key: \\"buildThirdPartyTemplate\\", + value: function buildThirdPartyTemplate(level, componentConfig) { + var _this3 = this; + var Adapter = this.Adapter, isSupportRecursive = this.isSupportRecursive; + var nextLevel = isSupportRecursive ? 0 : level + 1; + var template = \\"\\"; + var data = !this.isSupportRecursive && this.supportXS ? \\"\\".concat(this.dataKeymap(\\"i:item,l:l\\")) : this.dataKeymap(\\"i:item\\"); + componentConfig.thirdPartyComponents.forEach((function(attrs, compName) { + template += '\\\\n\\\\n <').concat(compName, \\" \\").concat(_this3.buildThirdPartyAttr(attrs), ' id=\\"{{i.uid}}\\">\\\\n\\\\n \\\\n \\\\n ').concat(compName, \\">\\\\n\\\\n \\"); + })); + return template; + } + }, { + key: \\"buildContainerTemplate\\", + value: function buildContainerTemplate(level) { + var restart = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; + var tmpl = \\"\\"; + if (restart) { + if (!this.isSupportRecursive && this.supportXS) { + tmpl = ''; + } else { + tmpl = ' '; + } + } else { + var xs = !this.isSupportRecursive ? \\"xs.a(\\".concat(level, \\", i.\\", \\"nn\\", \\", l)\\") : \\"xs.a(\\".concat(level, \\", i.\\", \\"nn\\", \\")\\"); + var data = !this.isSupportRecursive ? \\"\\".concat(this.dataKeymap(\\"i:i,cid:\\".concat(level, \\",l:xs.f(l,i.\\", \\"nn\\", \\")\\"))) : \\"\\".concat(this.dataKeymap(\\"i:i\\")); + tmpl = this.supportXS ? '') : \\"'); + } + return '\\\\n\\\\n ').concat(tmpl, \\"\\\\n\\\\n\\"); + } + }, { + key: \\"dataKeymap\\", + value: function dataKeymap(keymap) { + return keymap; + } + }, { + key: \\"getEvents\\", + value: function getEvents() { + return events; + } + }, { + key: \\"getAttrValue\\", + value: function getAttrValue(value, _key, _nodeName) { + return \\"{\\".concat(value, \\"}\\"); + } + }, { + key: \\"buildXsTemplate\\", + value: function buildXsTemplate() { + return \\"\\"; + } + }, { + key: \\"mergeComponents\\", + value: function mergeComponents(ctx, patch) { + ctx.helper.recursiveMerge(this.internalComponents, patch); + } + }, { + key: \\"buildXSTmplName\\", + value: function buildXSTmplName() { + return \\"function (l, n) {\\\\n return 'tmpl_' + l + '_' + n\\\\n }\\"; + } + }, { + key: \\"buildXSTmpExtra\\", + value: function buildXSTmpExtra() { + return \\"\\"; + } + } ]); + return BaseTemplate; + }(); + var shared_esm_RecursiveTemplate = function(_BaseTemplate) { + _inherits(RecursiveTemplate, _BaseTemplate); + function RecursiveTemplate() { + var _this4; + _classCallCheck(this, RecursiveTemplate); + _this4 = _possibleConstructorReturn(this, _getPrototypeOf(RecursiveTemplate).apply(this, arguments)); + _this4.isSupportRecursive = true; + _this4.buildTemplate = function(componentConfig) { + var template = _this4.buildBaseTemplate(); + if (!_this4.miniComponents) { + _this4.miniComponents = _this4.createMiniComponents(_this4.internalComponents); + } + var ZERO_FLOOR = 0; + var components = Object.keys(_this4.miniComponents).filter((function(c) { + return componentConfig.includes.size && !componentConfig.includeAll ? componentConfig.includes.has(c) : true; + })); + template = components.reduce((function(current, nodeName) { + var attributes = _this4.miniComponents[nodeName]; + return current + _this4.buildComponentTemplate({ + nodeName: nodeName, + attributes: attributes + }, ZERO_FLOOR); + }), template); + template += _this4.buildPlainTextTemplate(ZERO_FLOOR); + template += _this4.buildThirdPartyTemplate(ZERO_FLOOR, componentConfig); + template += _this4.buildContainerTemplate(ZERO_FLOOR); + return template; + }; + return _this4; + } + return RecursiveTemplate; + }(shared_esm_BaseTemplate); + var shared_esm_UnRecursiveTemplate = function(_BaseTemplate2) { + _inherits(UnRecursiveTemplate, _BaseTemplate2); + function UnRecursiveTemplate() { + var _this5; + _classCallCheck(this, UnRecursiveTemplate); + _this5 = _possibleConstructorReturn(this, _getPrototypeOf(UnRecursiveTemplate).apply(this, arguments)); + _this5.isSupportRecursive = false; + _this5._baseLevel = 16; + _this5.buildTemplate = function(componentConfig) { + _this5.componentConfig = componentConfig; + if (!_this5.miniComponents) { + _this5.miniComponents = _this5.createMiniComponents(_this5.internalComponents); + } + var components = Object.keys(_this5.miniComponents).filter((function(c) { + return componentConfig.includes.size && !componentConfig.includeAll ? componentConfig.includes.has(c) : true; + })); + var template = _this5.buildBaseTemplate(); + for (var i = 0; i < _this5.baseLevel; i++) { + template += _this5.supportXS ? _this5.buildOptimizeFloor(i, components, _this5.baseLevel === i + 1) : _this5.buildFloor(i, components, _this5.baseLevel === i + 1); + } + return template; + }; + return _this5; + } + _createClass(UnRecursiveTemplate, [ { + key: \\"buildFloor\\", + value: function buildFloor(level, components) { + var _this6 = this; + var restart = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; + if (restart) return this.buildContainerTemplate(level, restart); + var template = components.reduce((function(current, nodeName) { + var attributes = _this6.miniComponents[nodeName]; + return current + _this6.buildComponentTemplate({ + nodeName: nodeName, + attributes: attributes + }, level); + }), \\"\\"); + template += this.buildPlainTextTemplate(level); + template += this.buildThirdPartyTemplate(level, this.componentConfig); + template += this.buildContainerTemplate(level, restart); + return template; + } + }, { + key: \\"buildOptimizeFloor\\", + value: function buildOptimizeFloor(level, components) { + var _this7 = this; + var restart = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; + if (restart) return this.buildContainerTemplate(level, restart); + var template = components.reduce((function(current, nodeName) { + if (level !== 0) { + if (!_this7.nestElements.has(nodeName)) { + return current; + } else { + var max = _this7.nestElements.get(nodeName); + if (max > 0 && level >= max) { + return current; + } + } + } + var attributes = _this7.miniComponents[nodeName]; + return current + _this7.buildComponentTemplate({ + nodeName: nodeName, + attributes: attributes + }, level); + }), \\"\\"); + if (level === 0) template += this.buildPlainTextTemplate(level); + template += this.buildThirdPartyTemplate(level, this.componentConfig); + template += this.buildContainerTemplate(level); + return template; + } + }, { + key: \\"buildXSTmplName\\", + value: function buildXSTmplName() { + var comps = [].concat(_toConsumableArray(Array.from(this.nestElements.keys())), _toConsumableArray(Array.from(this.componentConfig.thirdPartyComponents.keys()))); + var hasMaxComps = []; + this.nestElements.forEach((function(max, comp) { + if (max > -1) hasMaxComps.push(comp); + })); + return \\"function (l, n, s) {\\\\n var a = \\".concat(JSON.stringify(comps), \\"\\\\n var b = \\").concat(JSON.stringify(hasMaxComps), \\"\\\\n if (a.indexOf(n) === -1) {\\\\n l = 0\\\\n }\\\\n if (b.indexOf(n) > -1) {\\\\n var u = s.split(',')\\\\n var depth = 0\\\\n for (var i = 0; i < u.length; i++) {\\\\n if (u[i] === n) depth++\\\\n }\\\\n l = depth\\\\n }\\\\n return 'tmpl_' + l + '_' + n\\\\n }\\"); + } + }, { + key: \\"buildXSTmpExtra\\", + value: function buildXSTmpExtra() { + var hasMaxComps = []; + this.nestElements.forEach((function(max, comp) { + if (max > -1) hasMaxComps.push(comp); + })); + return \\"f: function (l, n) {\\\\n var b = \\".concat(JSON.stringify(hasMaxComps), \\"\\\\n if (b.indexOf(n) > -1) {\\\\n if (l) l += ','\\\\n l += n\\\\n }\\\\n return l\\\\n }\\"); + } + }, { + key: \\"baseLevel\\", + set: function set(lv) { + this._baseLevel = lv; + }, + get: function get() { + return this._baseLevel; + } + } ]); + return UnRecursiveTemplate; + }(shared_esm_BaseTemplate); + var _onAndSyncApis = new Set([ \\"getAccountInfoSync\\", \\"getEnterOptionsSync\\", \\"offBLEPeripheralConnectionStateChanged\\", \\"offBeaconServiceChange\\", \\"offBeaconUpdate\\", \\"offDeviceMotionChange\\", \\"offHCEMessage\\", \\"offKeyboardHeightChange\\", \\"offLocalServiceDiscoveryStop\\", \\"offLocalServiceFound\\", \\"offLocalServiceLost\\", \\"offLocalServiceResolveFail\\", \\"offLocationChange\\", \\"offThemeChange\\", \\"offVoIPChatInterrupted\\", \\"offVoIPChatMembersChanged\\", \\"offVoIPVideoMembersChanged\\", \\"offWifiConnected\\", \\"offWindowResize\\", \\"onBLEPeripheralConnectionStateChanged\\", \\"onBackgroundAudioPause\\", \\"onBackgroundAudioPlay\\", \\"onBackgroundAudioStop\\", \\"onBackgroundFetchData\\", \\"onHCEMessage\\", \\"onKeyboardHeightChange\\", \\"onLocalServiceDiscoveryStop\\", \\"onLocalServiceFound\\", \\"onLocalServiceLost\\", \\"onLocalServiceResolveFail\\", \\"onLocationChange\\", \\"onThemeChange\\", \\"onVoIPChatInterrupted\\", \\"onVoIPChatMembersChanged\\", \\"onVoIPChatSpeakersChanged\\", \\"onVoIPVideoMembersChanged\\", \\"onWifiConnected\\", \\"onWindowResize\\", \\"reportMonitor\\" ]); + var _noPromiseApis = new Set([ \\"createAudioContext\\", \\"createLivePusherContext\\", \\"createMediaContainer\\", \\"createMediaRecorder\\", \\"createOffscreenCanvas\\", \\"createRewardedVideoAd\\", \\"createUDPSocket\\", \\"createVideoDecoder\\", \\"createWorker\\", \\"getLogManager\\", \\"getNFCAdapter\\", \\"getPerformance\\", \\"getRealtimeLogManager\\", \\"pauseBackgroundAudio\\", \\"pauseVoice\\", \\"reportPerformance\\", \\"stopBackgroundAudio\\", \\"stopRecord\\", \\"stopVoice\\" ]); + var _otherApis = new Set([ \\"addCard\\", \\"authPrivateMessage\\", \\"checkIsOpenAccessibility\\", \\"checkIsSoterEnrolledInDevice\\", \\"checkIsSupportSoterAuthentication\\", \\"chooseInvoice\\", \\"chooseMedia\\", \\"chooseMessageFile\\", \\"compressVideo\\", \\"connectWifi\\", \\"createBLEPeripheralServer\\", \\"disableAlertBeforeUnload\\", \\"enableAlertBeforeUnload\\", \\"exitVoIPChat\\", \\"getBLEDeviceRSSI\\", \\"getBackgroundAudioPlayerState\\", \\"getBackgroundFetchData\\", \\"getBackgroundFetchToken\\", \\"getGroupEnterInfo\\", \\"getHCEState\\", \\"getSelectedTextRange\\", \\"getShareInfo\\", \\"getVideoInfo\\", \\"getWeRunData\\", \\"join1v1Chat\\", \\"joinVoIPChat\\", \\"makeBluetoothPair\\", \\"openCard\\", \\"openVideoEditor\\", \\"playBackgroundAudio\\", \\"playVoice\\", \\"previewMedia\\", \\"requestPayment\\", \\"saveFileToDisk\\", \\"scanItem\\", \\"seekBackgroundAudio\\", \\"sendHCEMessage\\", \\"setBLEMTU\\", \\"setBackgroundFetchToken\\", \\"setEnable1v1Chat\\", \\"setTopBarText\\", \\"setWifiList\\", \\"setWindowSize\\", \\"showRedPackage\\", \\"startGyroscope\\", \\"startHCE\\", \\"startLocalServiceDiscovery\\", \\"startLocationUpdate\\", \\"startLocationUpdateBackground\\", \\"startRecord\\", \\"startSoterAuthentication\\", \\"startWifi\\", \\"stopGyroscope\\", \\"stopHCE\\", \\"stopLocalServiceDiscovery\\", \\"stopLocationUpdate\\", \\"stopWifi\\", \\"subscribeVoIPVideoMembers\\", \\"updateShareMenu\\", \\"updateVoIPChatMuteConfig\\", \\"updateWeChatApp\\" ]); + var RequestQueue = { + MAX_REQUEST: 5, + queue: [], + request: function request(options) { + this.push(options); + return this.run(); + }, + push: function push(options) { + this.queue.push(options); + }, + run: function run() { + var _this = this; + if (!this.queue.length) { + return; + } + if (this.queue.length <= this.MAX_REQUEST) { + var options = this.queue.shift(); + var completeFn = options.complete; + options.complete = function() { + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + completeFn && completeFn.apply(options, args); + _this.run(); + }; + return wx.request(options); + } + } + }; + function taroInterceptor(chain) { + return request(chain.requestParams); + } + function request(options) { + options = options || {}; + if (typeof options === \\"string\\") { + options = { + url: options + }; + } + var originSuccess = options.success; + var originFail = options.fail; + var originComplete = options.complete; + var requestTask; + var p = new Promise((function(resolve, reject) { + options.success = function(res) { + originSuccess && originSuccess(res); + resolve(res); + }; + options.fail = function(res) { + originFail && originFail(res); + reject(res); + }; + options.complete = function(res) { + originComplete && originComplete(res); + }; + requestTask = RequestQueue.request(options); + })); + p.abort = function(cb) { + cb && cb(); + if (requestTask) { + requestTask.abort(); + } + return p; + }; + return p; + } + function processApis(taro) { + var onAndSyncApis = new Set([].concat(_toConsumableArray(taro.onAndSyncApis), _toConsumableArray(_onAndSyncApis))); + var noPromiseApis = new Set([].concat(_toConsumableArray(taro.noPromiseApis), _toConsumableArray(_noPromiseApis))); + var otherApis = new Set([].concat(_toConsumableArray(taro.otherApis), _toConsumableArray(_otherApis))); + var apis = [].concat(_toConsumableArray(onAndSyncApis), _toConsumableArray(noPromiseApis), _toConsumableArray(otherApis)); + var useDataCacheApis = { + navigateTo: true, + redirectTo: true, + reLaunch: true + }; + var routerParamsPrivateKey = \\"__key_\\"; + var preloadPrivateKey = \\"__preload_\\"; + var preloadInitedComponent = \\"$preloadComponent\\"; + apis.forEach((function(key) { + if (!(key in wx)) { + taro[key] = function() { + console.warn(\\"\\\\u5fae\\\\u4fe1\\\\u5c0f\\\\u7a0b\\\\u5e8f\\\\u6682\\\\u4e0d\\\\u652f\\\\u6301 \\".concat(key)); + }; + return; + } + if (otherApis.has(key)) { + taro[key] = function(options) { + for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) { + args[_key2 - 1] = arguments[_key2]; + } + options = options || {}; + var task = null; + var obj = Object.assign({}, options); + if (typeof options === \\"string\\") { + if (args.length) { + var _wx; + return (_wx = wx)[key].apply(_wx, [ options ].concat(args)); + } + return wx[key](options); + } + if (key === \\"navigateTo\\" || key === \\"redirectTo\\" || key === \\"switchTab\\") { + var url = obj.url ? obj.url.replace(/^\\\\//, \\"\\") : \\"\\"; + if (url.indexOf(\\"?\\") > -1) url = url.split(\\"?\\")[0]; + var Component = cacheDataGet(url); + if (Component) { + var component = new Component; + if (component.componentWillPreload) { + var cacheKey = getUniqueKey(); + var MarkIndex = obj.url.indexOf(\\"?\\"); + var hasMark = MarkIndex > -1; + var urlQueryStr = hasMark ? obj.url.substring(MarkIndex + 1, obj.url.length) : \\"\\"; + var params = queryToJson(urlQueryStr); + obj.url += (hasMark ? \\"&\\" : \\"?\\") + \\"\\".concat(preloadPrivateKey, \\"=\\").concat(cacheKey); + cacheDataSet(cacheKey, component.componentWillPreload(params)); + cacheDataSet(preloadInitedComponent, component); + } + } + } + if (useDataCacheApis[key]) { + var _url = obj.url = obj.url || \\"\\"; + var _MarkIndex = _url.indexOf(\\"?\\"); + var _hasMark = _MarkIndex > -1; + var _urlQueryStr = _hasMark ? _url.substring(_MarkIndex + 1, _url.length) : \\"\\"; + var _params = queryToJson(_urlQueryStr); + var _cacheKey = getUniqueKey(); + obj.url += (_hasMark ? \\"&\\" : \\"?\\") + \\"\\".concat(routerParamsPrivateKey, \\"=\\").concat(_cacheKey); + cacheDataSet(_cacheKey, _params); + } + var p = new Promise((function(resolve, reject) { + [ \\"fail\\", \\"success\\", \\"complete\\" ].forEach((function(k) { + obj[k] = function(res) { + options[k] && options[k](res); + if (k === \\"success\\") { + if (key === \\"connectSocket\\") { + resolve(Promise.resolve().then((function() { + return Object.assign(task, res); + }))); + } else { + resolve(res); + } + } else if (k === \\"fail\\") { + reject(res); + } + }; + })); + if (args.length) { + var _wx2; + task = (_wx2 = wx)[key].apply(_wx2, [ obj ].concat(args)); + } else { + task = wx[key](obj); + } + })); + if (key === \\"uploadFile\\" || key === \\"downloadFile\\") { + p.progress = function(cb) { + if (task) { + task.onProgressUpdate(cb); + } + return p; + }; + p.abort = function(cb) { + cb && cb(); + if (task) { + task.abort(); + } + return p; + }; + } + return p; + }; + } else { + taro[key] = function() { + for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) { + args[_key3] = arguments[_key3]; + } + var argsLen = args.length; + var newArgs = args.concat(); + var lastArg = newArgs[argsLen - 1]; + if (lastArg && lastArg.isTaroComponent && lastArg.$scope) { + newArgs.splice(argsLen - 1, 1, lastArg.$scope); + } + return wx[key].apply(wx, newArgs); + }; + } + })); + } + function pxTransform(size) { + var _ref = this.config || {}, _ref$designWidth = _ref.designWidth, designWidth = _ref$designWidth === void 0 ? 750 : _ref$designWidth, _ref$deviceRatio = _ref.deviceRatio, deviceRatio = _ref$deviceRatio === void 0 ? { + 640: 2.34 / 2, + 750: 1, + 828: 1.81 / 2 + } : _ref$deviceRatio; + if (!(designWidth in deviceRatio)) { + throw new Error(\\"deviceRatio \\\\u914d\\\\u7f6e\\\\u4e2d\\\\u4e0d\\\\u5b58\\\\u5728 \\".concat(designWidth, \\" \\\\u7684\\\\u8bbe\\\\u7f6e\\\\uff01\\")); + } + return parseInt(size, 10) * deviceRatio[designWidth] + \\"rpx\\"; + } + function canIUseWebp() { + var _wx$getSystemInfoSync = wx.getSystemInfoSync(), platform = _wx$getSystemInfoSync.platform; + var platformLower = platform.toLowerCase(); + if (platformLower === \\"android\\" || platformLower === \\"devtools\\") { + return true; + } + return false; + } + function wxCloud(taro) { + var wxC = wx.cloud || {}; + var wxcloud = {}; + var apiList = [ \\"init\\", \\"database\\", \\"uploadFile\\", \\"downloadFile\\", \\"getTempFileURL\\", \\"deleteFile\\", \\"callFunction\\", \\"CloudID\\" ]; + apiList.forEach((function(v) { + wxcloud[v] = wxC[v]; + })); + taro.cloud = wxcloud; + } + function initNativeApi(taro) { + processApis(taro); + var link = new taro.Link(taroInterceptor); + taro.request = link.request.bind(link); + taro.addInterceptor = link.addInterceptor.bind(link); + taro.cleanInterceptors = link.cleanInterceptors.bind(link); + taro.getCurrentPages = getCurrentPages; + taro.getApp = getApp; + taro.requirePlugin = requirePlugin; + taro.initPxTransform = taro.initPxTransform.bind(taro); + taro.pxTransform = pxTransform.bind(taro); + taro.canIUseWebp = canIUseWebp; + taro.env = wx.env; + wxCloud(taro); + } + var components = { + Progress: { + \\"border-radius\\": \\"0\\", + \\"font-size\\": \\"16\\", + duration: \\"30\\", + bindActiveEnd: \\"\\" + }, + RichText: { + space: \\"\\" + }, + Text: { + \\"user-select\\": \\"false\\" + }, + Map: { + polygons: \\"[]\\", + subkey: \\"\\", + rotate: \\"0\\", + skew: \\"0\\", + \\"enable-3D\\": \\"false\\", + \\"show-compass\\": \\"false\\", + \\"show-scale\\": \\"false\\", + \\"enable-overlooking\\": \\"false\\", + \\"enable-zoom\\": \\"true\\", + \\"enable-scroll\\": \\"true\\", + \\"enable-rotate\\": \\"false\\", + \\"enable-satellite\\": \\"false\\", + \\"enable-traffic\\": \\"false\\", + setting: \\"[]\\", + bindLabelTap: \\"\\", + bindRegionChange: \\"\\", + bindPoiTap: \\"\\" + }, + Button: { + lang: \\"en\\", + \\"session-from\\": \\"\\", + \\"send-message-title\\": \\"\\", + \\"send-message-path\\": \\"\\", + \\"send-message-img\\": \\"\\", + \\"app-parameter\\": \\"\\", + \\"show-message-card\\": \\"false\\", + bindGetUserInfo: \\"\\", + bindContact: \\"\\", + bindGetPhoneNumber: \\"\\", + bindError: \\"\\", + bindOpenSetting: \\"\\", + bindLaunchApp: \\"\\" + }, + Form: { + \\"report-submit-timeout\\": \\"0\\" + }, + Input: { + \\"auto-focus\\": \\"false\\", + \\"always-embed\\": \\"false\\", + \\"adjust-position\\": \\"true\\", + \\"hold-keyboard\\": \\"false\\", + bindKeyboardHeightChange: \\"\\" + }, + Picker: { + \\"header-text\\": \\"\\" + }, + PickerView: { + bindPickStart: \\"\\", + bindPickEnd: \\"\\" + }, + Slider: { + color: singleQuote(\\"#e9e9e9\\"), + \\"selected-color\\": singleQuote(\\"#1aad19\\") + }, + Textarea: { + \\"show-confirm-bar\\": \\"true\\", + \\"adjust-position\\": \\"true\\", + \\"hold-keyboard\\": \\"false\\", + \\"disable-default-padding\\": \\"false\\", + bindKeyboardHeightChange: \\"\\" + }, + ScrollView: { + \\"enable-flex\\": \\"false\\", + \\"scroll-anchoring\\": \\"false\\", + \\"refresher-enabled\\": \\"false\\", + \\"refresher-threshold\\": \\"45\\", + \\"refresher-default-style\\": singleQuote(\\"black\\"), + \\"refresher-background\\": singleQuote(\\"#FFF\\"), + \\"refresher-triggered\\": \\"false\\", + enhanced: \\"false\\", + bounces: \\"true\\", + \\"show-scrollbar\\": \\"true\\", + \\"paging-enabled\\": \\"false\\", + \\"fast-deceleration\\": \\"false\\", + bindDragStart: \\"\\", + bindDragging: \\"\\", + bindDragEnd: \\"\\", + bindRefresherPulling: \\"\\", + bindRefresherRefresh: \\"\\", + bindRefresherRestore: \\"\\", + bindRefresherAbort: \\"\\" + }, + Swiper: { + \\"snap-to-edge\\": \\"false\\", + \\"easing-function\\": singleQuote(\\"default\\") + }, + SwiperItem: { + \\"skip-hidden-item-layout\\": \\"false\\" + }, + Navigator: { + target: singleQuote(\\"self\\"), + \\"app-id\\": \\"\\", + path: \\"\\", + \\"extra-data\\": \\"\\", + version: singleQuote(\\"version\\") + }, + Camera: { + mode: singleQuote(\\"normal\\"), + resolution: singleQuote(\\"medium\\"), + \\"frame-size\\": singleQuote(\\"medium\\"), + bindInitDone: \\"\\", + bindScanCode: \\"\\" + }, + Image: { + webp: \\"false\\", + \\"show-menu-by-longpress\\": \\"false\\" + }, + LivePlayer: { + mode: singleQuote(\\"live\\"), + \\"sound-mode\\": singleQuote(\\"speaker\\"), + \\"auto-pause-if-navigate\\": \\"true\\", + \\"auto-pause-if-open-native\\": \\"true\\", + \\"picture-in-picture-mode\\": \\"[]\\", + bindAudioVolumeNotify: \\"\\", + bindEnterPictureInPicture: \\"\\", + bindLeavePictureInPicture: \\"\\" + }, + Video: { + title: \\"\\", + \\"play-btn-position\\": singleQuote(\\"bottom\\"), + \\"enable-play-gesture\\": \\"false\\", + \\"auto-pause-if-navigate\\": \\"true\\", + \\"auto-pause-if-open-native\\": \\"true\\", + \\"vslide-gesture\\": \\"false\\", + \\"vslide-gesture-in-fullscreen\\": \\"true\\", + \\"ad-unit-id\\": \\"\\", + \\"poster-for-crawler\\": \\"\\", + \\"show-casting-button\\": \\"false\\", + \\"picture-in-picture-mode\\": \\"[]\\", + \\"enable-auto-rotation\\": \\"false\\", + \\"show-screen-lock-button\\": \\"false\\", + bindProgress: \\"\\", + bindLoadedMetadata: \\"\\", + bindControlsToggle: \\"\\", + bindEnterPictureInPicture: \\"\\", + bindLeavePictureInPicture: \\"\\", + bindSeekComplete: \\"\\" + }, + Canvas: { + type: \\"\\" + }, + Ad: { + \\"ad-type\\": singleQuote(\\"banner\\"), + \\"ad-theme\\": singleQuote(\\"white\\") + }, + Editor: { + \\"read-only\\": \\"false\\", + placeholder: \\"\\", + \\"show-img-size\\": \\"false\\", + \\"show-img-toolbar\\": \\"false\\", + \\"show-img-resize\\": \\"false\\", + focus: \\"false\\", + bindReady: \\"\\", + bindFocus: \\"\\", + bindBlur: \\"\\", + bindInput: \\"\\", + bindStatusChange: \\"\\", + name: \\"\\" + }, + MatchMedia: { + \\"min-width\\": \\"\\", + \\"max-width\\": \\"\\", + width: \\"\\", + \\"min-height\\": \\"\\", + \\"max-height\\": \\"\\", + height: \\"\\", + orientation: \\"\\" + }, + FunctionalPageNavigator: { + version: singleQuote(\\"release\\"), + name: \\"\\", + args: \\"\\", + bindSuccess: \\"\\", + bindFail: \\"\\", + bindCancel: \\"\\" + }, + LivePusher: { + url: \\"\\", + mode: singleQuote(\\"RTC\\"), + autopush: \\"false\\", + muted: \\"false\\", + \\"enable-camera\\": \\"true\\", + \\"auto-focus\\": \\"true\\", + orientation: singleQuote(\\"vertical\\"), + beauty: \\"0\\", + whiteness: \\"0\\", + aspect: singleQuote(\\"9:16\\"), + \\"min-bitrate\\": \\"200\\", + \\"max-bitrate\\": \\"1000\\", + \\"audio-quality\\": singleQuote(\\"high\\"), + \\"waiting-image\\": \\"\\", + \\"waiting-image-hash\\": \\"\\", + zoom: \\"false\\", + \\"device-position\\": singleQuote(\\"front\\"), + \\"background-mute\\": \\"false\\", + mirror: \\"false\\", + \\"remote-mirror\\": \\"false\\", + \\"local-mirror\\": \\"false\\", + \\"audio-reverb-type\\": \\"0\\", + \\"enable-mic\\": \\"true\\", + \\"enable-agc\\": \\"false\\", + \\"enable-ans\\": \\"false\\", + \\"audio-volume-type\\": singleQuote(\\"voicecall\\"), + \\"video-width\\": \\"360\\", + \\"video-height\\": \\"640\\", + animation: \\"\\", + bindStateChange: \\"\\", + bindNetStatus: \\"\\", + bindBgmStart: \\"\\", + bindBgmProgress: \\"\\", + bindBgmComplete: \\"\\" + }, + OfficialAccount: { + bindLoad: \\"\\", + bindError: \\"\\" + }, + OpenData: { + type: \\"\\", + \\"open-gid\\": \\"\\", + lang: singleQuote(\\"en\\"), + \\"default-text\\": \\"\\", + \\"default-avatar\\": \\"\\", + bindError: \\"\\" + }, + NavigationBar: { + title: \\"\\", + loading: \\"false\\", + \\"front-color\\": \\"\\", + \\"background-color\\": \\"\\", + \\"color-animation-duration\\": \\"0\\", + \\"color-animation-timing-func\\": singleQuote(\\"linear\\") + }, + PageMeta: { + \\"background-text-style\\": \\"\\", + \\"background-color\\": \\"\\", + \\"background-color-top\\": \\"\\", + \\"background-color-bottom\\": \\"\\", + \\"scroll-top\\": singleQuote(\\"\\"), + \\"scroll-duration\\": \\"300\\", + \\"page-style\\": singleQuote(\\"\\"), + \\"root-font-size\\": singleQuote(\\"\\"), + bindResize: \\"\\", + bindScroll: \\"\\", + bindScrollDone: \\"\\" + }, + VoipRoom: { + openid: \\"\\", + mode: singleQuote(\\"camera\\"), + \\"device-position\\": singleQuote(\\"front\\"), + bindError: \\"\\" + }, + AdCustom: { + \\"unit-id\\": \\"\\", + \\"ad-intervals\\": \\"\\", + bindLoad: \\"\\", + bindError: \\"\\" + } + }; + var hostConfig = { + initNativeApi: initNativeApi, + onTaroElementCreate: function onTaroElementCreate(tagName) { + warn(tagName === \\"MAP\\", \\"\\\\u5fae\\\\u4fe1\\\\u5c0f\\\\u7a0b\\\\u5e8f map \\\\u7ec4\\\\u4ef6\\\\u7684 \`setting\` \\\\u5c5e\\\\u6027\\\\u9700\\\\u8981\\\\u4f20\\\\u9012\\\\u4e00\\\\u4e2a\\\\u9ed8\\\\u8ba4\\\\u503c\\\\u3002\\\\u8be6\\\\u60c5\\\\uff1a\\\\n https://developers.weixin.qq.com/miniprogram/dev/component/map.html\\"); + } + }; + mergeReconciler(hostConfig); + mergeInternalComponents(components); + var taro_runtime = __webpack_require__(1); + var classCallCheck = __webpack_require__(2); + var createClass = __webpack_require__(3); + var possibleConstructorReturn = __webpack_require__(5); + var getPrototypeOf = __webpack_require__(4); + var inherits = __webpack_require__(6); + var react = __webpack_require__(0); + var app = __webpack_require__(13); + var app_App = function(_Component) { + Object(inherits[\\"a\\"])(App, _Component); + function App() { + Object(classCallCheck[\\"a\\"])(this, App); + return Object(possibleConstructorReturn[\\"a\\"])(this, Object(getPrototypeOf[\\"a\\"])(App).apply(this, arguments)); + } + Object(createClass[\\"a\\"])(App, [ { + key: \\"componentDidMount\\", + value: function componentDidMount() {} + }, { + key: \\"componentDidShow\\", + value: function componentDidShow() {} + }, { + key: \\"componentDidHide\\", + value: function componentDidHide() {} + }, { + key: \\"componentDidCatchError\\", + value: function componentDidCatchError() {} + }, { + key: \\"render\\", + value: function render() { + return this.props.children; + } + } ]); + return App; + }(react[\\"Component\\"]); + var lib_src_app = app_App; + var taro_react = __webpack_require__(9); + var config = { + pages: [ \\"pages/index/index\\" ], + window: { + backgroundTextStyle: \\"light\\", + navigationBarBackgroundColor: \\"#fff\\", + navigationBarTitleText: \\"WeChat\\", + navigationBarTextStyle: \\"black\\" + } + }; + taro_runtime[\\"window\\"].__taroAppConfig = config; + var inst = App(Object(taro_runtime[\\"createReactApp\\"])(lib_src_app, react, taro_react[\\"a\\"], config)); + } +}, [ [ 16, 0, 1, 3, 2 ] ] ]); + + + +/** filePath: dist/app.json **/ +{\\"pages\\":[\\"pages/index/index\\"],\\"window\\":{\\"backgroundTextStyle\\":\\"light\\",\\"navigationBarBackgroundColor\\":\\"#fff\\",\\"navigationBarTitleText\\":\\"WeChat\\",\\"navigationBarTextStyle\\":\\"black\\"}} + +/** filePath: dist/app.wxss **/ + + +/** filePath: dist/base.wxml **/ + + + + + + + + ++ + + + ++ + ++ + + + ++ + ++ + + + ++ + ++ + + + ++ + +{{i.v}} + + + + + + + ++ + + + ++ + ++ + + + ++ + ++ + + + + + + + ++ + ++ + + + ++ + ++ + + + ++ + ++ + + + + + + + ++ + ++ + + + ++ + ++ + + + ++ + ++ + + + + + + + ++ + ++ + + + ++ + ++ + + + + + + + ++ + ++ + + + ++ + ++ + + + + + + + ++ + ++ + + + ++ + ++ + + + + + + + ++ + ++ + + + ++ + ++ + + + + + + + ++ + ++ + + + ++ + ++ + + + + + + + ++ + ++ + + + ++ + ++ + + + + + + + ++ + ++ + + + ++ + ++ + + + + + + + ++ + ++ + + + ++ + ++ + + + + + + + ++ + ++ + + + ++ + ++ + + + + + + + ++ + ++ + + + ++ + ++ + + + + + + + ++ + ++ + + + ++ + ++ + + + + + + + ++ + ++ + + +/** filePath: dist/common.js **/ +(wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 2 ], [ function(module, __webpack_exports__, __webpack_require__) { + \\"use strict\\"; + __webpack_require__.r(__webpack_exports__); + __webpack_exports__[\\"default\\"] = \\"react-mock\\"; +} ] ]); + +/** filePath: dist/comp.js **/ +(wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 6 ], { + 14: function(module, __webpack_exports__, __webpack_require__) { + \\"use strict\\"; + __webpack_require__.r(__webpack_exports__); + var _tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1); + Component(Object(_tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__[\\"createRecursiveComponentConfig\\"])()); + } +}, [ [ 14, 0, 1 ] ] ]); + +/** filePath: dist/comp.json **/ +{\\"component\\":true,\\"usingComponents\\":{\\"comp\\":\\"./comp\\"}} + +/** filePath: dist/comp.wxml **/ + + + +/** filePath: dist/pages/index/index.js **/ +(wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 7 ], { + 10: function(module, exports, __webpack_require__) { + module.exports = { + cwrapper: \\"index__cwrapper___oXrpd\\" + }; + }, + 15: function(module, exports, __webpack_require__) {}, + 17: function(module, __webpack_exports__, __webpack_require__) { + \\"use strict\\"; + __webpack_require__.r(__webpack_exports__); + var taro_runtime = __webpack_require__(1); + var classCallCheck = __webpack_require__(2); + var createClass = __webpack_require__(3); + var possibleConstructorReturn = __webpack_require__(5); + var getPrototypeOf = __webpack_require__(4); + var inherits = __webpack_require__(6); + var react = __webpack_require__(0); + var taro_components = __webpack_require__(7); + var index_module = __webpack_require__(8); + var index_module_default = __webpack_require__.n(index_module); + var index = __webpack_require__(10); + var index_default = __webpack_require__.n(index); + var index_global = __webpack_require__(15); + var index_Index = function(_Component) { + Object(inherits[\\"a\\"])(Index, _Component); + function Index() { + Object(classCallCheck[\\"a\\"])(this, Index); + return Object(possibleConstructorReturn[\\"a\\"])(this, Object(getPrototypeOf[\\"a\\"])(Index).apply(this, arguments)); + } + Object(createClass[\\"a\\"])(Index, [ { + key: \\"componentDidMount\\", + value: function componentDidMount() {} + }, { + key: \\"componentWillUnmount\\", + value: function componentWillUnmount() {} + }, { + key: \\"componentDidShow\\", + value: function componentDidShow() {} + }, { + key: \\"componentDidHide\\", + value: function componentDidHide() {} + }, { + key: \\"render\\", + value: function render() { + return react[\\"default\\"].createElement(taro_components[\\"View\\"], { + className: index_module_default.a.cbody + }, react[\\"default\\"].createElement(taro_components[\\"Text\\"], { + className: \\"\\".concat(index_module_default.a.ctext, \\" \\").concat(index_default.a.cwrapper) + }, \\"Hello world!\\")); + } + } ]); + return Index; + }(react[\\"Component\\"]); + var config = { + navigationBarTitleText: \\"\\\\u9996\\\\u9875\\" + }; + var inst = Page(Object(taro_runtime[\\"createPageConfig\\"])(index_Index, \\"pages/index/index\\", {}, config || {})); + }, + 8: function(module, exports, __webpack_require__) { + module.exports = { + cbody: \\"index-module__cbody___3Vfl2\\", + ctext: \\"index-module__ctext___Dq1RJ\\" + }; + } +}, [ [ 17, 0, 1, 3, 2 ] ] ]); + +/** filePath: dist/pages/index/index.json **/ +{\\"navigationBarTitleText\\":\\"首页\\",\\"usingComponents\\":{\\"comp\\":\\"../../comp\\"}} + +/** filePath: dist/pages/index/index.wxml **/ + + + +/** filePath: dist/pages/index/index.wxss **/ +.index-module__cbody___3Vfl2{height:300rpx;background-color:#e8e8ed}.index-module__ctext___Dq1RJ{display:inline-block;width:100%;color:#ff0}.index__cwrapper___oXrpd{font-size:36rpx}.chomepage{background:gray} + +/** filePath: dist/runtime.js **/ +(function(modules) { + function webpackJsonpCallback(data) { + var chunkIds = data[0]; + var moreModules = data[1]; + var executeModules = data[2]; + var moduleId, chunkId, i = 0, resolves = []; + for (;i < chunkIds.length; i++) { + chunkId = chunkIds[i]; + if (Object.prototype.hasOwnProperty.call(installedChunks, chunkId) && installedChunks[chunkId]) { + resolves.push(installedChunks[chunkId][0]); + } + installedChunks[chunkId] = 0; + } + for (moduleId in moreModules) { + if (Object.prototype.hasOwnProperty.call(moreModules, moduleId)) { + modules[moduleId] = moreModules[moduleId]; + } + } + if (parentJsonpFunction) parentJsonpFunction(data); + while (resolves.length) { + resolves.shift()(); + } + deferredModules.push.apply(deferredModules, executeModules || []); + return checkDeferredModules(); + } + function checkDeferredModules() { + var result; + for (var i = 0; i < deferredModules.length; i++) { + var deferredModule = deferredModules[i]; + var fulfilled = true; + for (var j = 1; j < deferredModule.length; j++) { + var depId = deferredModule[j]; + if (installedChunks[depId] !== 0) fulfilled = false; + } + if (fulfilled) { + deferredModules.splice(i--, 1); + result = __webpack_require__(__webpack_require__.s = deferredModule[0]); + } + } + return result; + } + var installedModules = {}; + var installedChunks = { + 0: 0 + }; + var deferredModules = []; + function __webpack_require__(moduleId) { + if (installedModules[moduleId]) { + return installedModules[moduleId].exports; + } + var module = installedModules[moduleId] = { + i: moduleId, + l: false, + exports: {} + }; + modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); + module.l = true; + return module.exports; + } + __webpack_require__.m = modules; + __webpack_require__.c = installedModules; + __webpack_require__.d = function(exports, name, getter) { + if (!__webpack_require__.o(exports, name)) { + Object.defineProperty(exports, name, { + enumerable: true, + get: getter + }); + } + }; + __webpack_require__.r = function(exports) { + if (typeof Symbol !== \\"undefined\\" && Symbol.toStringTag) { + Object.defineProperty(exports, Symbol.toStringTag, { + value: \\"Module\\" + }); + } + Object.defineProperty(exports, \\"__esModule\\", { + value: true + }); + }; + __webpack_require__.t = function(value, mode) { + if (mode & 1) value = __webpack_require__(value); + if (mode & 8) return value; + if (mode & 4 && typeof value === \\"object\\" && value && value.__esModule) return value; + var ns = Object.create(null); + __webpack_require__.r(ns); + Object.defineProperty(ns, \\"default\\", { + enumerable: true, + value: value + }); + if (mode & 2 && typeof value != \\"string\\") for (var key in value) __webpack_require__.d(ns, key, function(key) { + return value[key]; + }.bind(null, key)); + return ns; + }; + __webpack_require__.n = function(module) { + var getter = module && module.__esModule ? function getDefault() { + return module[\\"default\\"]; + } : function getModuleExports() { + return module; + }; + __webpack_require__.d(getter, \\"a\\", getter); + return getter; + }; + __webpack_require__.o = function(object, property) { + return Object.prototype.hasOwnProperty.call(object, property); + }; + __webpack_require__.p = \\"/\\"; + var jsonpArray = wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []; + var oldJsonpFunction = jsonpArray.push.bind(jsonpArray); + jsonpArray.push = webpackJsonpCallback; + jsonpArray = jsonpArray.slice(); + for (var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]); + var parentJsonpFunction = oldJsonpFunction; + checkDeferredModules(); +})([]); + +/** filePath: dist/taro.js **/ +(wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 1 ], { + 1: function(module, __webpack_exports__, __webpack_require__) { + \\"use strict\\"; + var _unused_webpack_default_export = \\"taro-runtime-mock\\"; + }, + 7: function(module, __webpack_exports__, __webpack_require__) { + \\"use strict\\"; + var _unused_webpack_default_export = \\"taro-components-mock\\"; + }, + 9: function(module, __webpack_exports__, __webpack_require__) { + \\"use strict\\"; + __webpack_exports__[\\"a\\"] = \\"taro-react-mock\\"; + } +} ]); + +/** filePath: dist/utils.wxs **/ +module.exports = { + a: function (l, n, s) { + var a = [\\"view\\",\\"cover-view\\",\\"block\\",\\"text\\",\\"slot\\",\\"slot-view\\",\\"label\\",\\"form\\",\\"scroll-view\\"] + var b = [\\"slot\\",\\"slot-view\\",\\"label\\",\\"form\\",\\"scroll-view\\"] + if (a.indexOf(n) === -1) { + l = 0 + } + if (b.indexOf(n) > -1) { + var u = s.split(',') + var depth = 0 + for (var i = 0; i < u.length; i++) { + if (u[i] === n) depth++ + } + l = depth + } + return 'tmpl_' + l + '_' + n + }, + b: function (a, b) { + return a === undefined ? b : a + }, + c: function(i, prefix) { + var s = i.focus !== undefined ? 'focus' : 'blur' + return prefix + i.nn + '_' + s + }, + d: function (i, v) { + return i === undefined ? v : i + }, + e: function (n) { + return 'tmpl_' + n + '_container' + }, + f: function (l, n) { + var b = [\\"slot\\",\\"slot-view\\",\\"label\\",\\"form\\",\\"scroll-view\\"] + if (b.indexOf(n) > -1) { + if (l) l += ',' + l += n + } + return l + } +} + +/** filePath: dist/vendors.js **/ +(wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 3 ], [ , , function(module, __webpack_exports__, __webpack_require__) { + \\"use strict\\"; + __webpack_require__.d(__webpack_exports__, \\"a\\", (function() { + return _classCallCheck; + })); + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError(\\"Cannot call a class as a function\\"); + } + } +}, function(module, __webpack_exports__, __webpack_require__) { + \\"use strict\\"; + __webpack_require__.d(__webpack_exports__, \\"a\\", (function() { + return _createClass; + })); + function _defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if (\\"value\\" in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + function _createClass(Constructor, protoProps, staticProps) { + if (protoProps) _defineProperties(Constructor.prototype, protoProps); + if (staticProps) _defineProperties(Constructor, staticProps); + return Constructor; + } +}, function(module, __webpack_exports__, __webpack_require__) { + \\"use strict\\"; + __webpack_require__.d(__webpack_exports__, \\"a\\", (function() { + return _getPrototypeOf; + })); + function _getPrototypeOf(o) { + _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { + return o.__proto__ || Object.getPrototypeOf(o); + }; + return _getPrototypeOf(o); + } +}, function(module, __webpack_exports__, __webpack_require__) { + \\"use strict\\"; + __webpack_require__.d(__webpack_exports__, \\"a\\", (function() { + return _possibleConstructorReturn; + })); + function _typeof(obj) { + \\"@babel/helpers - typeof\\"; + if (typeof Symbol === \\"function\\" && typeof Symbol.iterator === \\"symbol\\") { + _typeof = function _typeof(obj) { + return typeof obj; + }; + } else { + _typeof = function _typeof(obj) { + return obj && typeof Symbol === \\"function\\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \\"symbol\\" : typeof obj; + }; + } + return _typeof(obj); + } + function _assertThisInitialized(self) { + if (self === void 0) { + throw new ReferenceError(\\"this hasn't been initialised - super() hasn't been called\\"); + } + return self; + } + function _possibleConstructorReturn(self, call) { + if (call && (_typeof(call) === \\"object\\" || typeof call === \\"function\\")) { + return call; + } + return _assertThisInitialized(self); + } +}, function(module, __webpack_exports__, __webpack_require__) { + \\"use strict\\"; + __webpack_require__.d(__webpack_exports__, \\"a\\", (function() { + return _inherits; + })); + function _setPrototypeOf(o, p) { + _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { + o.__proto__ = p; + return o; + }; + return _setPrototypeOf(o, p); + } + function _inherits(subClass, superClass) { + if (typeof superClass !== \\"function\\" && superClass !== null) { + throw new TypeError(\\"Super expression must either be null or a function\\"); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + writable: true, + configurable: true + } + }); + if (superClass) _setPrototypeOf(subClass, superClass); + } +} ] ]); +" +`; + +exports[`css modules should use css modules with module mode 1`] = `16`; + +exports[`css modules should use css modules with module mode 2`] = ` +" +/** filePath: dist/app.js **/ +require(\\"./runtime\\"); + +require(\\"./common\\"); + +require(\\"./vendors\\"); + +require(\\"./taro\\"); + +(wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 4 ], { + 13: function(module, exports, __webpack_require__) {}, + 16: function(module, __webpack_exports__, __webpack_require__) { + \\"use strict\\"; + __webpack_require__.r(__webpack_exports__); + function _arrayLikeToArray(arr, len) { + if (len == null || len > arr.length) len = arr.length; + for (var i = 0, arr2 = new Array(len); i < len; i++) { + arr2[i] = arr[i]; + } + return arr2; + } + function _arrayWithoutHoles(arr) { + if (Array.isArray(arr)) return _arrayLikeToArray(arr); + } + function _iterableToArray(iter) { + if (typeof Symbol !== \\"undefined\\" && Symbol.iterator in Object(iter)) return Array.from(iter); + } + function _unsupportedIterableToArray(o, minLen) { + if (!o) return; + if (typeof o === \\"string\\") return _arrayLikeToArray(o, minLen); + var n = Object.prototype.toString.call(o).slice(8, -1); + if (n === \\"Object\\" && o.constructor) n = o.constructor.name; + if (n === \\"Map\\" || n === \\"Set\\") return Array.from(o); + if (n === \\"Arguments\\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); + } + function _nonIterableSpread() { + throw new TypeError(\\"Invalid attempt to spread non-iterable instance.\\\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\\"); + } + function _toConsumableArray(arr) { + return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); + } + function _typeof(obj) { + \\"@babel/helpers - typeof\\"; + if (typeof Symbol === \\"function\\" && typeof Symbol.iterator === \\"symbol\\") { + _typeof = function _typeof(obj) { + return typeof obj; + }; + } else { + _typeof = function _typeof(obj) { + return obj && typeof Symbol === \\"function\\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \\"symbol\\" : typeof obj; + }; + } + return _typeof(obj); + } + function _assertThisInitialized(self) { + if (self === void 0) { + throw new ReferenceError(\\"this hasn't been initialised - super() hasn't been called\\"); + } + return self; + } + function _possibleConstructorReturn(self, call) { + if (call && (_typeof(call) === \\"object\\" || typeof call === \\"function\\")) { + return call; + } + return _assertThisInitialized(self); + } + function _getPrototypeOf(o) { + _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { + return o.__proto__ || Object.getPrototypeOf(o); + }; + return _getPrototypeOf(o); + } + function _setPrototypeOf(o, p) { + _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { + o.__proto__ = p; + return o; + }; + return _setPrototypeOf(o, p); + } + function _inherits(subClass, superClass) { + if (typeof superClass !== \\"function\\" && superClass !== null) { + throw new TypeError(\\"Super expression must either be null or a function\\"); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + writable: true, + configurable: true + } + }); + if (superClass) _setPrototypeOf(subClass, superClass); + } + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError(\\"Cannot call a class as a function\\"); + } + } + function _defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if (\\"value\\" in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + function _createClass(Constructor, protoProps, staticProps) { + if (protoProps) _defineProperties(Constructor.prototype, protoProps); + if (staticProps) _defineProperties(Constructor, staticProps); + return Constructor; + } + function isString(o) { + return typeof o === \\"string\\"; + } + function isUndefined(o) { + return typeof o === \\"undefined\\"; + } + function isNull(o) { + return o === null; + } + function isObject(o) { + return o !== null && _typeof(o) === \\"object\\"; + } + function isBoolean(o) { + return o === true || o === false; + } + function isFunction(o) { + return typeof o === \\"function\\"; + } + function isNumber(o) { + return typeof o === \\"number\\"; + } + function isBooleanStringLiteral(o) { + return o === \\"true\\" || o === \\"false\\"; + } + var isArray = Array.isArray; + var styles = { + style: \\"i.\\".concat(\\"st\\"), + class: \\"i.\\".concat(\\"cl\\") + }; + var events = { + bindtap: \\"eh\\" + }; + var touchEvents = { + bindTouchStart: \\"\\", + bindTouchMove: \\"\\", + bindTouchEnd: \\"\\", + bindTouchCancel: \\"\\", + bindLongTap: \\"\\" + }; + var animationEvents = { + bindAnimationStart: \\"\\", + bindAnimationIteration: \\"\\", + bindAnimationEnd: \\"\\", + bindTransitionEnd: \\"\\" + }; + var specialEvents = new Set([ \\"htouchmove\\", \\"vtouchmove\\" ]); + function singleQuote(s) { + return \\"'\\".concat(s, \\"'\\"); + } + var View = Object.assign(Object.assign({ + \\"hover-class\\": singleQuote(\\"none\\"), + \\"hover-stop-propagation\\": \\"false\\", + \\"hover-start-time\\": \\"50\\", + \\"hover-stay-time\\": \\"400\\", + animation: \\"\\" + }, touchEvents), animationEvents); + var Icon = { + type: \\"\\", + size: \\"23\\", + color: \\"\\" + }; + var MapComp = Object.assign({ + longitude: \\"\\", + latitude: \\"\\", + scale: \\"16\\", + markers: \\"[]\\", + covers: \\"\\", + polyline: \\"[]\\", + circles: \\"[]\\", + controls: \\"[]\\", + \\"include-points\\": \\"[]\\", + \\"show-location\\": \\"\\", + \\"layer-style\\": \\"1\\", + bindMarkerTap: \\"\\", + bindControlTap: \\"\\", + bindCalloutTap: \\"\\", + bindUpdated: \\"\\" + }, touchEvents); + var Progress = { + percent: \\"\\", + \\"stroke-width\\": \\"6\\", + color: singleQuote(\\"#09BB07\\"), + activeColor: singleQuote(\\"#09BB07\\"), + backgroundColor: singleQuote(\\"#EBEBEB\\"), + active: \\"false\\", + \\"active-mode\\": singleQuote(\\"backwards\\"), + \\"show-info\\": \\"false\\" + }; + var RichText = { + nodes: \\"[]\\" + }; + var Text = { + selectable: \\"false\\", + space: \\"\\", + decode: \\"false\\" + }; + var Button = { + size: singleQuote(\\"default\\"), + type: \\"\\", + plain: \\"false\\", + disabled: \\"\\", + loading: \\"false\\", + \\"form-type\\": \\"\\", + \\"open-type\\": \\"\\", + \\"hover-class\\": singleQuote(\\"button-hover\\"), + \\"hover-stop-propagation\\": \\"false\\", + \\"hover-start-time\\": \\"20\\", + \\"hover-stay-time\\": \\"70\\", + name: \\"\\" + }; + var Checkbox = { + value: \\"\\", + disabled: \\"\\", + checked: \\"false\\", + color: singleQuote(\\"#09BB07\\"), + name: \\"\\" + }; + var CheckboxGroup = { + bindChange: \\"\\", + name: \\"\\" + }; + var Form = { + \\"report-submit\\": \\"false\\", + bindSubmit: \\"\\", + bindReset: \\"\\", + name: \\"\\" + }; + var Input = { + value: \\"\\", + type: singleQuote(\\"\\"), + password: \\"false\\", + placeholder: \\"\\", + \\"placeholder-style\\": \\"\\", + \\"placeholder-class\\": singleQuote(\\"input-placeholder\\"), + disabled: \\"\\", + maxlength: \\"140\\", + \\"cursor-spacing\\": \\"0\\", + focus: \\"false\\", + \\"confirm-type\\": singleQuote(\\"done\\"), + \\"confirm-hold\\": \\"false\\", + cursor: \\"i.value.length\\", + \\"selection-start\\": \\"-1\\", + \\"selection-end\\": \\"-1\\", + bindInput: \\"\\", + bindFocus: \\"\\", + bindBlur: \\"\\", + bindConfirm: \\"\\", + name: \\"\\" + }; + var Label = { + for: \\"\\", + name: \\"\\" + }; + var Picker = { + mode: singleQuote(\\"selector\\"), + disabled: \\"\\", + range: \\"\\", + \\"range-key\\": \\"\\", + value: \\"\\", + start: \\"\\", + end: \\"\\", + fields: singleQuote(\\"day\\"), + \\"custom-item\\": \\"\\", + name: \\"\\", + bindCancel: \\"\\", + bindChange: \\"\\", + bindColumnChange: \\"\\" + }; + var PickerView = { + value: \\"\\", + \\"indicator-style\\": \\"\\", + \\"indicator-class\\": \\"\\", + \\"mask-style\\": \\"\\", + \\"mask-class\\": \\"\\", + bindChange: \\"\\", + name: \\"\\" + }; + var PickerViewColumn = { + name: \\"\\" + }; + var Radio = { + value: \\"\\", + checked: \\"false\\", + disabled: \\"\\", + color: singleQuote(\\"#09BB07\\"), + name: \\"\\" + }; + var RadioGroup = { + bindChange: \\"\\", + name: \\"\\" + }; + var Slider = { + min: \\"0\\", + max: \\"100\\", + step: \\"1\\", + disabled: \\"\\", + value: \\"0\\", + activeColor: singleQuote(\\"#1aad19\\"), + backgroundColor: singleQuote(\\"#e9e9e9\\"), + \\"block-size\\": \\"28\\", + \\"block-color\\": singleQuote(\\"#ffffff\\"), + \\"show-value\\": \\"false\\", + bindChange: \\"\\", + bindChanging: \\"\\", + name: \\"\\" + }; + var Switch = { + checked: \\"false\\", + disabled: \\"\\", + type: singleQuote(\\"switch\\"), + color: singleQuote(\\"#04BE02\\"), + bindChange: \\"\\", + name: \\"\\" + }; + var Textarea = { + value: \\"\\", + placeholder: \\"\\", + \\"placeholder-style\\": \\"\\", + \\"placeholder-class\\": singleQuote(\\"textarea-placeholder\\"), + disabled: \\"\\", + maxlength: \\"140\\", + \\"auto-focus\\": \\"false\\", + focus: \\"false\\", + \\"auto-height\\": \\"false\\", + fixed: \\"false\\", + \\"cursor-spacing\\": \\"0\\", + cursor: \\"-1\\", + \\"selection-start\\": \\"-1\\", + \\"selection-end\\": \\"-1\\", + bindFocus: \\"\\", + bindBlur: \\"\\", + bindLineChange: \\"\\", + bindInput: \\"\\", + bindConfirm: \\"\\", + name: \\"\\" + }; + var CoverImage = { + src: \\"\\", + bindLoad: \\"eh\\", + bindError: \\"eh\\" + }; + var CoverView = Object.assign({ + \\"scroll-top\\": \\"false\\" + }, touchEvents); + var MovableArea = { + \\"scale-area\\": \\"false\\" + }; + var MovableView = Object.assign(Object.assign({ + direction: \\"none\\", + inertia: \\"false\\", + \\"out-of-bounds\\": \\"false\\", + x: \\"\\", + y: \\"\\", + damping: \\"20\\", + friction: \\"2\\", + disabled: \\"\\", + scale: \\"false\\", + \\"scale-min\\": \\"0.5\\", + \\"scale-max\\": \\"10\\", + \\"scale-value\\": \\"1\\", + animation: \\"true\\", + bindChange: \\"\\", + bindScale: \\"\\", + htouchmove: \\"\\", + vtouchmove: \\"\\", + width: singleQuote(\\"10px\\"), + height: singleQuote(\\"10px\\") + }, touchEvents), animationEvents); + var ScrollView = Object.assign(Object.assign({ + \\"scroll-x\\": \\"false\\", + \\"scroll-y\\": \\"false\\", + \\"upper-threshold\\": \\"50\\", + \\"lower-threshold\\": \\"50\\", + \\"scroll-top\\": \\"\\", + \\"scroll-left\\": \\"\\", + \\"scroll-into-view\\": \\"\\", + \\"scroll-with-animation\\": \\"false\\", + \\"enable-back-to-top\\": \\"false\\", + bindScrollToUpper: \\"\\", + bindScrollToLower: \\"\\", + bindScroll: \\"\\" + }, touchEvents), animationEvents); + var Swiper = Object.assign({ + \\"indicator-dots\\": \\"false\\", + \\"indicator-color\\": singleQuote(\\"rgba(0, 0, 0, .3)\\"), + \\"indicator-active-color\\": singleQuote(\\"#000000\\"), + autoplay: \\"false\\", + current: \\"0\\", + interval: \\"5000\\", + duration: \\"500\\", + circular: \\"false\\", + vertical: \\"false\\", + \\"previous-margin\\": \\"'0px'\\", + \\"next-margin\\": \\"'0px'\\", + \\"display-multiple-items\\": \\"1\\", + bindChange: \\"\\", + bindTransition: \\"\\", + bindAnimationFinish: \\"\\" + }, touchEvents); + var SwiperItem = { + \\"item-id\\": \\"\\" + }; + var Navigator = { + url: \\"\\", + \\"open-type\\": singleQuote(\\"navigate\\"), + delta: \\"1\\", + \\"hover-class\\": singleQuote(\\"navigator-hover\\"), + \\"hover-stop-propagation\\": \\"false\\", + \\"hover-start-time\\": \\"50\\", + \\"hover-stay-time\\": \\"600\\", + bindSuccess: \\"\\", + bindFail: \\"\\", + bindComplete: \\"\\" + }; + var Audio = { + id: \\"\\", + src: \\"\\", + loop: \\"false\\", + controls: \\"false\\", + poster: \\"\\", + name: \\"\\", + author: \\"\\", + bindError: \\"\\", + bindPlay: \\"\\", + bindPause: \\"\\", + bindTimeUpdate: \\"\\", + bindEnded: \\"\\" + }; + var Camera = { + \\"device-position\\": singleQuote(\\"back\\"), + flash: singleQuote(\\"auto\\"), + bindStop: \\"\\", + bindError: \\"\\" + }; + var Image = Object.assign({ + src: \\"\\", + mode: singleQuote(\\"scaleToFill\\"), + \\"lazy-load\\": \\"false\\", + bindError: \\"\\", + bindLoad: \\"\\" + }, touchEvents); + var LivePlayer = { + src: \\"\\", + autoplay: \\"false\\", + muted: \\"false\\", + orientation: singleQuote(\\"vertical\\"), + \\"object-fit\\": singleQuote(\\"contain\\"), + \\"background-mute\\": \\"false\\", + \\"min-cache\\": \\"1\\", + \\"max-cache\\": \\"3\\", + animation: \\"\\", + bindStateChange: \\"\\", + bindFullScreenChange: \\"\\", + bindNetStatus: \\"\\" + }; + var Video = { + src: \\"\\", + duration: \\"\\", + controls: \\"true\\", + \\"danmu-list\\": \\"\\", + \\"danmu-btn\\": \\"\\", + \\"enable-danmu\\": \\"\\", + autoplay: \\"false\\", + loop: \\"false\\", + muted: \\"false\\", + \\"initial-time\\": \\"0\\", + \\"page-gesture\\": \\"false\\", + direction: \\"\\", + \\"show-progress\\": \\"true\\", + \\"show-fullscreen-btn\\": \\"true\\", + \\"show-play-btn\\": \\"true\\", + \\"show-center-play-btn\\": \\"true\\", + \\"enable-progress-gesture\\": \\"true\\", + \\"object-fit\\": singleQuote(\\"contain\\"), + poster: \\"\\", + \\"show-mute-btn\\": \\"false\\", + animation: \\"\\", + bindPlay: \\"\\", + bindPause: \\"\\", + bindEnded: \\"\\", + bindTimeUpdate: \\"\\", + bindFullScreenChange: \\"\\", + bindWaiting: \\"\\", + bindError: \\"\\" + }; + var Canvas = Object.assign({ + \\"canvas-id\\": \\"\\", + \\"disable-scroll\\": \\"false\\", + bindError: \\"\\" + }, touchEvents); + var Ad = { + \\"unit-id\\": \\"\\", + \\"ad-intervals\\": \\"\\", + bindLoad: \\"\\", + bindError: \\"\\", + bindClose: \\"\\" + }; + var WebView = { + src: \\"\\", + bindMessage: \\"\\", + bindLoad: \\"\\", + bindError: \\"\\" + }; + var Block = {}; + var SlotView = { + name: \\"\\" + }; + var Slot = { + name: \\"\\" + }; + var internalComponents = { + View: View, + Icon: Icon, + Progress: Progress, + RichText: RichText, + Text: Text, + Button: Button, + Checkbox: Checkbox, + CheckboxGroup: CheckboxGroup, + Form: Form, + Input: Input, + Label: Label, + Picker: Picker, + PickerView: PickerView, + PickerViewColumn: PickerViewColumn, + Radio: Radio, + RadioGroup: RadioGroup, + Slider: Slider, + Switch: Switch, + CoverImage: CoverImage, + Textarea: Textarea, + CoverView: CoverView, + MovableArea: MovableArea, + MovableView: MovableView, + ScrollView: ScrollView, + Swiper: Swiper, + SwiperItem: SwiperItem, + Navigator: Navigator, + Audio: Audio, + Camera: Camera, + Image: Image, + LivePlayer: LivePlayer, + Video: Video, + Canvas: Canvas, + Ad: Ad, + WebView: WebView, + Block: Block, + Map: MapComp, + Slot: Slot, + SlotView: SlotView + }; + var controlledComponent = new Set([ \\"input\\", \\"checkbox\\", \\"picker\\", \\"picker-view\\", \\"radio\\", \\"slider\\", \\"switch\\", \\"textarea\\" ]); + var focusComponents = new Set([ \\"input\\", \\"textarea\\" ]); + var voidElements = new Set([ \\"progress\\", \\"icon\\", \\"rich-text\\", \\"input\\", \\"textarea\\", \\"slider\\", \\"switch\\", \\"audio\\", \\"live-pusher\\", \\"video\\", \\"ad\\", \\"official-account\\", \\"open-data\\", \\"navigation-bar\\" ]); + var nestElements = new Map([ [ \\"view\\", -1 ], [ \\"cover-view\\", -1 ], [ \\"block\\", -1 ], [ \\"text\\", -1 ], [ \\"slot\\", 8 ], [ \\"slot-view\\", 8 ], [ \\"label\\", 6 ], [ \\"form\\", 4 ], [ \\"scroll-view\\", 4 ] ]); + var EMPTY_OBJ = {}; + var EMPTY_ARR = []; + var noop = function noop() {}; + var defaultReconciler = {}; + var box = function box(v) { + return { + v: v + }; + }; + var unbox = function unbox(b) { + return b.v; + }; + function toDashed(s) { + return s.replace(/([a-z0-9])([A-Z])/g, \\"$1-$2\\").toLowerCase(); + } + function toCamelCase(s) { + var camel = \\"\\"; + var nextCap = false; + for (var i = 0; i < s.length; i++) { + if (s[i] !== \\"-\\") { + camel += nextCap ? s[i].toUpperCase() : s[i]; + nextCap = false; + } else { + nextCap = true; + } + } + return camel; + } + function capitalize(s) { + return s.charAt(0).toUpperCase() + s.slice(1); + } + var shared_esm_hasOwnProperty = Object.prototype.hasOwnProperty; + var hasOwn = function hasOwn(val, key) { + return shared_esm_hasOwnProperty.call(val, key); + }; + var reportIssue = \\"\\\\u5982\\\\u6709\\\\u7591\\\\u95ee\\\\uff0c\\\\u8bf7\\\\u63d0\\\\u4ea4 issue \\\\u81f3\\\\uff1ahttps://github.com/nervjs/taro/issues\\"; + function ensure(condition, msg) { + if (!condition) { + throw new Error(msg + \\"\\\\n\\" + reportIssue); + } + } + function warn(condition, msg) { + if (false) {} + } + function queryToJson(str) { + var dec = decodeURIComponent; + var qp = str.split(\\"&\\"); + var ret = {}; + var name; + var val; + for (var i = 0, l = qp.length, item; i < l; ++i) { + item = qp[i]; + if (item.length) { + var s = item.indexOf(\\"=\\"); + if (s < 0) { + name = dec(item); + val = \\"\\"; + } else { + name = dec(item.slice(0, s)); + val = dec(item.slice(s + 1)); + } + if (typeof ret[name] === \\"string\\") { + ret[name] = [ ret[name] ]; + } + if (Array.isArray(ret[name])) { + ret[name].push(val); + } else { + ret[name] = val; + } + } + } + return ret; + } + var _uniqueId = 1; + var _loadTime = (new Date).getTime().toString(); + function getUniqueKey() { + return _loadTime + _uniqueId++; + } + var cacheData = {}; + function cacheDataSet(key, val) { + cacheData[key] = val; + } + function cacheDataGet(key, delelteAfterGet) { + var temp = cacheData[key]; + delelteAfterGet && delete cacheData[key]; + return temp; + } + function cacheDataHas(key) { + return key in cacheData; + } + function mergeInternalComponents(components) { + Object.keys(components).forEach((function(name) { + if (name in internalComponents) { + Object.assign(internalComponents[name], components[name]); + } else { + internalComponents[name] = components[name]; + } + })); + } + function mergeReconciler(hostConfig) { + Object.assign(defaultReconciler, hostConfig); + } + var weixinAdapter = { + if: \\"wx:if\\", + else: \\"wx:else\\", + elseif: \\"wx:elif\\", + for: \\"wx:for\\", + forItem: \\"wx:for-item\\", + forIndex: \\"wx:for-index\\", + key: \\"wx:key\\", + xs: \\"wxs\\", + type: \\"weapp\\" + }; + var shared_esm_BaseTemplate = function() { + function BaseTemplate() { + var _this = this; + _classCallCheck(this, BaseTemplate); + this.exportExpr = \\"module.exports =\\"; + this.supportXS = false; + this.Adapter = weixinAdapter; + this.internalComponents = internalComponents; + this.focusComponents = focusComponents; + this.voidElements = voidElements; + this.nestElements = nestElements; + this.buildPageTemplate = function(baseTempPath) { + var template = ' \\\\n'); + return template; + }; + this.buildBaseComponentTemplate = function(ext) { + var data = !_this.isSupportRecursive && _this.supportXS ? _this.dataKeymap(\\"i:i,l:l\\") : _this.dataKeymap(\\"i:i\\"); + return ' \\\\n'); + }; + this.buildXScript = function() { + return \\"\\".concat(_this.exportExpr, \\" {\\\\n a: \\").concat(_this.buildXSTmplName(), \\",\\\\n b: function (a, b) {\\\\n return a === undefined ? b : a\\\\n },\\\\n c: function(i, prefix) {\\\\n var s = i.focus !== undefined ? 'focus' : 'blur'\\\\n return prefix + i.\\", \\"nn\\", \\" + '_' + s\\\\n },\\\\n d: function (i, v) {\\\\n return i === undefined ? v : i\\\\n },\\\\n e: function (n) {\\\\n return 'tmpl_' + n + '_\\", \\"container\\", \\"'\\\\n },\\\\n \\").concat(_this.buildXSTmpExtra(), \\"\\\\n}\\"); + }; + } + _createClass(BaseTemplate, [ { + key: \\"buildAttribute\\", + value: function buildAttribute(attrs, nodeName) { + var _this2 = this; + return Object.keys(attrs).map((function(k) { + return \\"\\".concat(k, '=\\"').concat(k.startsWith(\\"bind\\") || k.startsWith(\\"on\\") ? attrs[k] : \\"{\\".concat(_this2.getAttrValue(attrs[k], k, nodeName), \\"}\\"), '\\" '); + })).join(\\"\\"); + } + }, { + key: \\"replacePropName\\", + value: function replacePropName(name, value, _componentName) { + if (value === \\"eh\\") return name.toLowerCase(); + return name; + } + }, { + key: \\"createMiniComponents\\", + value: function createMiniComponents(components) { + var result = Object.create(null); + for (var key in components) { + if (hasOwn(components, key)) { + var component = components[key]; + var compName = toDashed(key); + var newComp = Object.create(null); + if (isFunction(this.modifyCompProps)) { + component = this.modifyCompProps(compName, component); + } + for (var prop in component) { + if (hasOwn(component, prop)) { + var propValue = component[prop]; + if (prop.startsWith(\\"bind\\") || specialEvents.has(prop)) { + propValue = \\"eh\\"; + } else if (propValue === \\"\\") { + propValue = \\"i.\\".concat(toCamelCase(prop)); + } else if (isBooleanStringLiteral(propValue) || isNumber(+propValue)) { + propValue = this.supportXS ? \\"xs.b(i.\\".concat(toCamelCase(prop), \\",\\").concat(propValue, \\")\\") : \\"i.\\".concat(toCamelCase(prop), \\"===undefined?\\").concat(propValue, \\":i.\\").concat(toCamelCase(prop)); + } else { + propValue = \\"i.\\".concat(toCamelCase(prop), \\"||\\").concat(propValue || singleQuote(\\"\\")); + } + prop = this.replacePropName(prop, propValue, compName); + newComp[prop] = propValue; + } + } + if (compName !== \\"block\\") { + Object.assign(newComp, styles, this.getEvents()); + } + if (compName === \\"swiper-item\\") { + delete newComp.style; + } + if (compName === \\"slot\\" || compName === \\"slot-view\\") { + result[compName] = { + slot: \\"i.name\\" + }; + } else { + result[compName] = newComp; + } + } + } + return result; + } + }, { + key: \\"buildBaseTemplate\\", + value: function buildBaseTemplate() { + var Adapter = this.Adapter; + var data = !this.isSupportRecursive && this.supportXS ? \\"\\".concat(this.dataKeymap(\\"i:item,l:''\\")) : this.dataKeymap(\\"i:item\\"); + return \\"\\".concat(this.buildXsTemplate(), '\\\\n\\\\n \\\\n \\\\n \\\\n\\\\n'); + } + }, { + key: \\"buildThirdPartyAttr\\", + value: function buildThirdPartyAttr(attrs) { + return Array.from(attrs).reduce((function(str, attr) { + if (attr.startsWith(\\"@\\")) { + return str + \\"bind\\".concat(attr.slice(1), '=\\"eh\\" '); + } else if (attr.startsWith(\\"bind\\")) { + return str + \\"\\".concat(attr, '=\\"eh\\" '); + } else if (attr.startsWith(\\"on\\")) { + return str + \\"bind\\".concat(attr.slice(2).toLowerCase(), '=\\"eh\\" '); + } + return str + \\"\\".concat(attr, '=\\"{{i.').concat(toCamelCase(attr), '}}\\" '); + }), \\"\\"); + } + }, { + key: \\"buildComponentTemplate\\", + value: function buildComponentTemplate(comp, level) { + return this.focusComponents.has(comp.nodeName) ? this.buildFocusComponentTemplte(comp, level) : this.buildStandardComponentTemplate(comp, level); + } + }, { + key: \\"buildFocusComponentTemplte\\", + value: function buildFocusComponentTemplte(comp, level) { + var attrs = Object.assign({}, comp.attributes); + var templateName = this.supportXS ? \\"xs.c(i, 'tmpl_\\".concat(level, \\"_')\\") : \\"i.focus ? 'tmpl_\\".concat(level, \\"_\\").concat(comp.nodeName, \\"_focus' : 'tmpl_\\").concat(level, \\"_\\").concat(comp.nodeName, \\"_blur'\\"); + delete attrs.focus; + return '\\\\n\\\\n \\\\n\\\\n\\\\n\\\\n <').concat(comp.nodeName, \\" \\").concat(this.buildAttribute(comp.attributes, comp.nodeName), ' id=\\"{{i.uid}}\\" />\\\\n\\\\n\\\\n\\\\n <').concat(comp.nodeName, \\" \\").concat(this.buildAttribute(attrs, comp.nodeName), ' id=\\"{{i.uid}}\\" />\\\\n\\\\n'); + } + }, { + key: \\"buildStandardComponentTemplate\\", + value: function buildStandardComponentTemplate(comp, level) { + var isSupportRecursive = this.isSupportRecursive, Adapter = this.Adapter; + var nextLevel = isSupportRecursive ? 0 : level + 1; + var data = !this.isSupportRecursive ? \\"\\".concat(this.dataKeymap(\\"i:item,l:l\\")) : this.dataKeymap(\\"i:item\\"); + var child = this.supportXS ? '') : ''); + if (isFunction(this.modifyLoopBody)) { + child = this.modifyLoopBody(child, comp.nodeName); + } + var children = this.voidElements.has(comp.nodeName) ? \\"\\" : \\"\\\\n\\\\n ').concat(child, \\"\\\\n \\\\n \\"); + if (isFunction(this.modifyLoopContainer)) { + children = this.modifyLoopContainer(children, comp.nodeName); + } + var nodeName = comp.nodeName === \\"slot\\" || comp.nodeName === \\"slot-view\\" ? \\"view\\" : comp.nodeName; + var res = '\\\\n\\\\n <').concat(nodeName, \\" \\").concat(this.buildAttribute(comp.attributes, comp.nodeName), ' id=\\"{{i.uid}}\\">').concat(children, \\"\\").concat(nodeName, \\">\\\\n\\\\n\\"); + if (isFunction(this.modifyTemplateResult)) { + res = this.modifyTemplateResult(res, comp.nodeName, level, children); + } + return res; + } + }, { + key: \\"buildPlainTextTemplate\\", + value: function buildPlainTextTemplate(level) { + return '\\\\n\\\\n{{i.', \\"v\\", \\"}} \\\\n\\\\n\\"); + } + }, { + key: \\"buildThirdPartyTemplate\\", + value: function buildThirdPartyTemplate(level, componentConfig) { + var _this3 = this; + var Adapter = this.Adapter, isSupportRecursive = this.isSupportRecursive; + var nextLevel = isSupportRecursive ? 0 : level + 1; + var template = \\"\\"; + var data = !this.isSupportRecursive && this.supportXS ? \\"\\".concat(this.dataKeymap(\\"i:item,l:l\\")) : this.dataKeymap(\\"i:item\\"); + componentConfig.thirdPartyComponents.forEach((function(attrs, compName) { + template += '\\\\n\\\\n <').concat(compName, \\" \\").concat(_this3.buildThirdPartyAttr(attrs), ' id=\\"{{i.uid}}\\">\\\\n\\\\n \\\\n \\\\n ').concat(compName, \\">\\\\n\\\\n \\"); + })); + return template; + } + }, { + key: \\"buildContainerTemplate\\", + value: function buildContainerTemplate(level) { + var restart = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; + var tmpl = \\"\\"; + if (restart) { + if (!this.isSupportRecursive && this.supportXS) { + tmpl = ''; + } else { + tmpl = ' '; + } + } else { + var xs = !this.isSupportRecursive ? \\"xs.a(\\".concat(level, \\", i.\\", \\"nn\\", \\", l)\\") : \\"xs.a(\\".concat(level, \\", i.\\", \\"nn\\", \\")\\"); + var data = !this.isSupportRecursive ? \\"\\".concat(this.dataKeymap(\\"i:i,cid:\\".concat(level, \\",l:xs.f(l,i.\\", \\"nn\\", \\")\\"))) : \\"\\".concat(this.dataKeymap(\\"i:i\\")); + tmpl = this.supportXS ? '') : \\"'); + } + return '\\\\n\\\\n ').concat(tmpl, \\"\\\\n\\\\n\\"); + } + }, { + key: \\"dataKeymap\\", + value: function dataKeymap(keymap) { + return keymap; + } + }, { + key: \\"getEvents\\", + value: function getEvents() { + return events; + } + }, { + key: \\"getAttrValue\\", + value: function getAttrValue(value, _key, _nodeName) { + return \\"{\\".concat(value, \\"}\\"); + } + }, { + key: \\"buildXsTemplate\\", + value: function buildXsTemplate() { + return \\"\\"; + } + }, { + key: \\"mergeComponents\\", + value: function mergeComponents(ctx, patch) { + ctx.helper.recursiveMerge(this.internalComponents, patch); + } + }, { + key: \\"buildXSTmplName\\", + value: function buildXSTmplName() { + return \\"function (l, n) {\\\\n return 'tmpl_' + l + '_' + n\\\\n }\\"; + } + }, { + key: \\"buildXSTmpExtra\\", + value: function buildXSTmpExtra() { + return \\"\\"; + } + } ]); + return BaseTemplate; + }(); + var shared_esm_RecursiveTemplate = function(_BaseTemplate) { + _inherits(RecursiveTemplate, _BaseTemplate); + function RecursiveTemplate() { + var _this4; + _classCallCheck(this, RecursiveTemplate); + _this4 = _possibleConstructorReturn(this, _getPrototypeOf(RecursiveTemplate).apply(this, arguments)); + _this4.isSupportRecursive = true; + _this4.buildTemplate = function(componentConfig) { + var template = _this4.buildBaseTemplate(); + if (!_this4.miniComponents) { + _this4.miniComponents = _this4.createMiniComponents(_this4.internalComponents); + } + var ZERO_FLOOR = 0; + var components = Object.keys(_this4.miniComponents).filter((function(c) { + return componentConfig.includes.size && !componentConfig.includeAll ? componentConfig.includes.has(c) : true; + })); + template = components.reduce((function(current, nodeName) { + var attributes = _this4.miniComponents[nodeName]; + return current + _this4.buildComponentTemplate({ + nodeName: nodeName, + attributes: attributes + }, ZERO_FLOOR); + }), template); + template += _this4.buildPlainTextTemplate(ZERO_FLOOR); + template += _this4.buildThirdPartyTemplate(ZERO_FLOOR, componentConfig); + template += _this4.buildContainerTemplate(ZERO_FLOOR); + return template; + }; + return _this4; + } + return RecursiveTemplate; + }(shared_esm_BaseTemplate); + var shared_esm_UnRecursiveTemplate = function(_BaseTemplate2) { + _inherits(UnRecursiveTemplate, _BaseTemplate2); + function UnRecursiveTemplate() { + var _this5; + _classCallCheck(this, UnRecursiveTemplate); + _this5 = _possibleConstructorReturn(this, _getPrototypeOf(UnRecursiveTemplate).apply(this, arguments)); + _this5.isSupportRecursive = false; + _this5._baseLevel = 16; + _this5.buildTemplate = function(componentConfig) { + _this5.componentConfig = componentConfig; + if (!_this5.miniComponents) { + _this5.miniComponents = _this5.createMiniComponents(_this5.internalComponents); + } + var components = Object.keys(_this5.miniComponents).filter((function(c) { + return componentConfig.includes.size && !componentConfig.includeAll ? componentConfig.includes.has(c) : true; + })); + var template = _this5.buildBaseTemplate(); + for (var i = 0; i < _this5.baseLevel; i++) { + template += _this5.supportXS ? _this5.buildOptimizeFloor(i, components, _this5.baseLevel === i + 1) : _this5.buildFloor(i, components, _this5.baseLevel === i + 1); + } + return template; + }; + return _this5; + } + _createClass(UnRecursiveTemplate, [ { + key: \\"buildFloor\\", + value: function buildFloor(level, components) { + var _this6 = this; + var restart = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; + if (restart) return this.buildContainerTemplate(level, restart); + var template = components.reduce((function(current, nodeName) { + var attributes = _this6.miniComponents[nodeName]; + return current + _this6.buildComponentTemplate({ + nodeName: nodeName, + attributes: attributes + }, level); + }), \\"\\"); + template += this.buildPlainTextTemplate(level); + template += this.buildThirdPartyTemplate(level, this.componentConfig); + template += this.buildContainerTemplate(level, restart); + return template; + } + }, { + key: \\"buildOptimizeFloor\\", + value: function buildOptimizeFloor(level, components) { + var _this7 = this; + var restart = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; + if (restart) return this.buildContainerTemplate(level, restart); + var template = components.reduce((function(current, nodeName) { + if (level !== 0) { + if (!_this7.nestElements.has(nodeName)) { + return current; + } else { + var max = _this7.nestElements.get(nodeName); + if (max > 0 && level >= max) { + return current; + } + } + } + var attributes = _this7.miniComponents[nodeName]; + return current + _this7.buildComponentTemplate({ + nodeName: nodeName, + attributes: attributes + }, level); + }), \\"\\"); + if (level === 0) template += this.buildPlainTextTemplate(level); + template += this.buildThirdPartyTemplate(level, this.componentConfig); + template += this.buildContainerTemplate(level); + return template; + } + }, { + key: \\"buildXSTmplName\\", + value: function buildXSTmplName() { + var comps = [].concat(_toConsumableArray(Array.from(this.nestElements.keys())), _toConsumableArray(Array.from(this.componentConfig.thirdPartyComponents.keys()))); + var hasMaxComps = []; + this.nestElements.forEach((function(max, comp) { + if (max > -1) hasMaxComps.push(comp); + })); + return \\"function (l, n, s) {\\\\n var a = \\".concat(JSON.stringify(comps), \\"\\\\n var b = \\").concat(JSON.stringify(hasMaxComps), \\"\\\\n if (a.indexOf(n) === -1) {\\\\n l = 0\\\\n }\\\\n if (b.indexOf(n) > -1) {\\\\n var u = s.split(',')\\\\n var depth = 0\\\\n for (var i = 0; i < u.length; i++) {\\\\n if (u[i] === n) depth++\\\\n }\\\\n l = depth\\\\n }\\\\n return 'tmpl_' + l + '_' + n\\\\n }\\"); + } + }, { + key: \\"buildXSTmpExtra\\", + value: function buildXSTmpExtra() { + var hasMaxComps = []; + this.nestElements.forEach((function(max, comp) { + if (max > -1) hasMaxComps.push(comp); + })); + return \\"f: function (l, n) {\\\\n var b = \\".concat(JSON.stringify(hasMaxComps), \\"\\\\n if (b.indexOf(n) > -1) {\\\\n if (l) l += ','\\\\n l += n\\\\n }\\\\n return l\\\\n }\\"); + } + }, { + key: \\"baseLevel\\", + set: function set(lv) { + this._baseLevel = lv; + }, + get: function get() { + return this._baseLevel; + } + } ]); + return UnRecursiveTemplate; + }(shared_esm_BaseTemplate); + var _onAndSyncApis = new Set([ \\"getAccountInfoSync\\", \\"getEnterOptionsSync\\", \\"offBLEPeripheralConnectionStateChanged\\", \\"offBeaconServiceChange\\", \\"offBeaconUpdate\\", \\"offDeviceMotionChange\\", \\"offHCEMessage\\", \\"offKeyboardHeightChange\\", \\"offLocalServiceDiscoveryStop\\", \\"offLocalServiceFound\\", \\"offLocalServiceLost\\", \\"offLocalServiceResolveFail\\", \\"offLocationChange\\", \\"offThemeChange\\", \\"offVoIPChatInterrupted\\", \\"offVoIPChatMembersChanged\\", \\"offVoIPVideoMembersChanged\\", \\"offWifiConnected\\", \\"offWindowResize\\", \\"onBLEPeripheralConnectionStateChanged\\", \\"onBackgroundAudioPause\\", \\"onBackgroundAudioPlay\\", \\"onBackgroundAudioStop\\", \\"onBackgroundFetchData\\", \\"onHCEMessage\\", \\"onKeyboardHeightChange\\", \\"onLocalServiceDiscoveryStop\\", \\"onLocalServiceFound\\", \\"onLocalServiceLost\\", \\"onLocalServiceResolveFail\\", \\"onLocationChange\\", \\"onThemeChange\\", \\"onVoIPChatInterrupted\\", \\"onVoIPChatMembersChanged\\", \\"onVoIPChatSpeakersChanged\\", \\"onVoIPVideoMembersChanged\\", \\"onWifiConnected\\", \\"onWindowResize\\", \\"reportMonitor\\" ]); + var _noPromiseApis = new Set([ \\"createAudioContext\\", \\"createLivePusherContext\\", \\"createMediaContainer\\", \\"createMediaRecorder\\", \\"createOffscreenCanvas\\", \\"createRewardedVideoAd\\", \\"createUDPSocket\\", \\"createVideoDecoder\\", \\"createWorker\\", \\"getLogManager\\", \\"getNFCAdapter\\", \\"getPerformance\\", \\"getRealtimeLogManager\\", \\"pauseBackgroundAudio\\", \\"pauseVoice\\", \\"reportPerformance\\", \\"stopBackgroundAudio\\", \\"stopRecord\\", \\"stopVoice\\" ]); + var _otherApis = new Set([ \\"addCard\\", \\"authPrivateMessage\\", \\"checkIsOpenAccessibility\\", \\"checkIsSoterEnrolledInDevice\\", \\"checkIsSupportSoterAuthentication\\", \\"chooseInvoice\\", \\"chooseMedia\\", \\"chooseMessageFile\\", \\"compressVideo\\", \\"connectWifi\\", \\"createBLEPeripheralServer\\", \\"disableAlertBeforeUnload\\", \\"enableAlertBeforeUnload\\", \\"exitVoIPChat\\", \\"getBLEDeviceRSSI\\", \\"getBackgroundAudioPlayerState\\", \\"getBackgroundFetchData\\", \\"getBackgroundFetchToken\\", \\"getGroupEnterInfo\\", \\"getHCEState\\", \\"getSelectedTextRange\\", \\"getShareInfo\\", \\"getVideoInfo\\", \\"getWeRunData\\", \\"join1v1Chat\\", \\"joinVoIPChat\\", \\"makeBluetoothPair\\", \\"openCard\\", \\"openVideoEditor\\", \\"playBackgroundAudio\\", \\"playVoice\\", \\"previewMedia\\", \\"requestPayment\\", \\"saveFileToDisk\\", \\"scanItem\\", \\"seekBackgroundAudio\\", \\"sendHCEMessage\\", \\"setBLEMTU\\", \\"setBackgroundFetchToken\\", \\"setEnable1v1Chat\\", \\"setTopBarText\\", \\"setWifiList\\", \\"setWindowSize\\", \\"showRedPackage\\", \\"startGyroscope\\", \\"startHCE\\", \\"startLocalServiceDiscovery\\", \\"startLocationUpdate\\", \\"startLocationUpdateBackground\\", \\"startRecord\\", \\"startSoterAuthentication\\", \\"startWifi\\", \\"stopGyroscope\\", \\"stopHCE\\", \\"stopLocalServiceDiscovery\\", \\"stopLocationUpdate\\", \\"stopWifi\\", \\"subscribeVoIPVideoMembers\\", \\"updateShareMenu\\", \\"updateVoIPChatMuteConfig\\", \\"updateWeChatApp\\" ]); + var RequestQueue = { + MAX_REQUEST: 5, + queue: [], + request: function request(options) { + this.push(options); + return this.run(); + }, + push: function push(options) { + this.queue.push(options); + }, + run: function run() { + var _this = this; + if (!this.queue.length) { + return; + } + if (this.queue.length <= this.MAX_REQUEST) { + var options = this.queue.shift(); + var completeFn = options.complete; + options.complete = function() { + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + completeFn && completeFn.apply(options, args); + _this.run(); + }; + return wx.request(options); + } + } + }; + function taroInterceptor(chain) { + return request(chain.requestParams); + } + function request(options) { + options = options || {}; + if (typeof options === \\"string\\") { + options = { + url: options + }; + } + var originSuccess = options.success; + var originFail = options.fail; + var originComplete = options.complete; + var requestTask; + var p = new Promise((function(resolve, reject) { + options.success = function(res) { + originSuccess && originSuccess(res); + resolve(res); + }; + options.fail = function(res) { + originFail && originFail(res); + reject(res); + }; + options.complete = function(res) { + originComplete && originComplete(res); + }; + requestTask = RequestQueue.request(options); + })); + p.abort = function(cb) { + cb && cb(); + if (requestTask) { + requestTask.abort(); + } + return p; + }; + return p; + } + function processApis(taro) { + var onAndSyncApis = new Set([].concat(_toConsumableArray(taro.onAndSyncApis), _toConsumableArray(_onAndSyncApis))); + var noPromiseApis = new Set([].concat(_toConsumableArray(taro.noPromiseApis), _toConsumableArray(_noPromiseApis))); + var otherApis = new Set([].concat(_toConsumableArray(taro.otherApis), _toConsumableArray(_otherApis))); + var apis = [].concat(_toConsumableArray(onAndSyncApis), _toConsumableArray(noPromiseApis), _toConsumableArray(otherApis)); + var useDataCacheApis = { + navigateTo: true, + redirectTo: true, + reLaunch: true + }; + var routerParamsPrivateKey = \\"__key_\\"; + var preloadPrivateKey = \\"__preload_\\"; + var preloadInitedComponent = \\"$preloadComponent\\"; + apis.forEach((function(key) { + if (!(key in wx)) { + taro[key] = function() { + console.warn(\\"\\\\u5fae\\\\u4fe1\\\\u5c0f\\\\u7a0b\\\\u5e8f\\\\u6682\\\\u4e0d\\\\u652f\\\\u6301 \\".concat(key)); + }; + return; + } + if (otherApis.has(key)) { + taro[key] = function(options) { + for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) { + args[_key2 - 1] = arguments[_key2]; + } + options = options || {}; + var task = null; + var obj = Object.assign({}, options); + if (typeof options === \\"string\\") { + if (args.length) { + var _wx; + return (_wx = wx)[key].apply(_wx, [ options ].concat(args)); + } + return wx[key](options); + } + if (key === \\"navigateTo\\" || key === \\"redirectTo\\" || key === \\"switchTab\\") { + var url = obj.url ? obj.url.replace(/^\\\\//, \\"\\") : \\"\\"; + if (url.indexOf(\\"?\\") > -1) url = url.split(\\"?\\")[0]; + var Component = cacheDataGet(url); + if (Component) { + var component = new Component; + if (component.componentWillPreload) { + var cacheKey = getUniqueKey(); + var MarkIndex = obj.url.indexOf(\\"?\\"); + var hasMark = MarkIndex > -1; + var urlQueryStr = hasMark ? obj.url.substring(MarkIndex + 1, obj.url.length) : \\"\\"; + var params = queryToJson(urlQueryStr); + obj.url += (hasMark ? \\"&\\" : \\"?\\") + \\"\\".concat(preloadPrivateKey, \\"=\\").concat(cacheKey); + cacheDataSet(cacheKey, component.componentWillPreload(params)); + cacheDataSet(preloadInitedComponent, component); + } + } + } + if (useDataCacheApis[key]) { + var _url = obj.url = obj.url || \\"\\"; + var _MarkIndex = _url.indexOf(\\"?\\"); + var _hasMark = _MarkIndex > -1; + var _urlQueryStr = _hasMark ? _url.substring(_MarkIndex + 1, _url.length) : \\"\\"; + var _params = queryToJson(_urlQueryStr); + var _cacheKey = getUniqueKey(); + obj.url += (_hasMark ? \\"&\\" : \\"?\\") + \\"\\".concat(routerParamsPrivateKey, \\"=\\").concat(_cacheKey); + cacheDataSet(_cacheKey, _params); + } + var p = new Promise((function(resolve, reject) { + [ \\"fail\\", \\"success\\", \\"complete\\" ].forEach((function(k) { + obj[k] = function(res) { + options[k] && options[k](res); + if (k === \\"success\\") { + if (key === \\"connectSocket\\") { + resolve(Promise.resolve().then((function() { + return Object.assign(task, res); + }))); + } else { + resolve(res); + } + } else if (k === \\"fail\\") { + reject(res); + } + }; + })); + if (args.length) { + var _wx2; + task = (_wx2 = wx)[key].apply(_wx2, [ obj ].concat(args)); + } else { + task = wx[key](obj); + } + })); + if (key === \\"uploadFile\\" || key === \\"downloadFile\\") { + p.progress = function(cb) { + if (task) { + task.onProgressUpdate(cb); + } + return p; + }; + p.abort = function(cb) { + cb && cb(); + if (task) { + task.abort(); + } + return p; + }; + } + return p; + }; + } else { + taro[key] = function() { + for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) { + args[_key3] = arguments[_key3]; + } + var argsLen = args.length; + var newArgs = args.concat(); + var lastArg = newArgs[argsLen - 1]; + if (lastArg && lastArg.isTaroComponent && lastArg.$scope) { + newArgs.splice(argsLen - 1, 1, lastArg.$scope); + } + return wx[key].apply(wx, newArgs); + }; + } + })); + } + function pxTransform(size) { + var _ref = this.config || {}, _ref$designWidth = _ref.designWidth, designWidth = _ref$designWidth === void 0 ? 750 : _ref$designWidth, _ref$deviceRatio = _ref.deviceRatio, deviceRatio = _ref$deviceRatio === void 0 ? { + 640: 2.34 / 2, + 750: 1, + 828: 1.81 / 2 + } : _ref$deviceRatio; + if (!(designWidth in deviceRatio)) { + throw new Error(\\"deviceRatio \\\\u914d\\\\u7f6e\\\\u4e2d\\\\u4e0d\\\\u5b58\\\\u5728 \\".concat(designWidth, \\" \\\\u7684\\\\u8bbe\\\\u7f6e\\\\uff01\\")); + } + return parseInt(size, 10) * deviceRatio[designWidth] + \\"rpx\\"; + } + function canIUseWebp() { + var _wx$getSystemInfoSync = wx.getSystemInfoSync(), platform = _wx$getSystemInfoSync.platform; + var platformLower = platform.toLowerCase(); + if (platformLower === \\"android\\" || platformLower === \\"devtools\\") { + return true; + } + return false; + } + function wxCloud(taro) { + var wxC = wx.cloud || {}; + var wxcloud = {}; + var apiList = [ \\"init\\", \\"database\\", \\"uploadFile\\", \\"downloadFile\\", \\"getTempFileURL\\", \\"deleteFile\\", \\"callFunction\\", \\"CloudID\\" ]; + apiList.forEach((function(v) { + wxcloud[v] = wxC[v]; + })); + taro.cloud = wxcloud; + } + function initNativeApi(taro) { + processApis(taro); + var link = new taro.Link(taroInterceptor); + taro.request = link.request.bind(link); + taro.addInterceptor = link.addInterceptor.bind(link); + taro.cleanInterceptors = link.cleanInterceptors.bind(link); + taro.getCurrentPages = getCurrentPages; + taro.getApp = getApp; + taro.requirePlugin = requirePlugin; + taro.initPxTransform = taro.initPxTransform.bind(taro); + taro.pxTransform = pxTransform.bind(taro); + taro.canIUseWebp = canIUseWebp; + taro.env = wx.env; + wxCloud(taro); + } + var components = { + Progress: { + \\"border-radius\\": \\"0\\", + \\"font-size\\": \\"16\\", + duration: \\"30\\", + bindActiveEnd: \\"\\" + }, + RichText: { + space: \\"\\" + }, + Text: { + \\"user-select\\": \\"false\\" + }, + Map: { + polygons: \\"[]\\", + subkey: \\"\\", + rotate: \\"0\\", + skew: \\"0\\", + \\"enable-3D\\": \\"false\\", + \\"show-compass\\": \\"false\\", + \\"show-scale\\": \\"false\\", + \\"enable-overlooking\\": \\"false\\", + \\"enable-zoom\\": \\"true\\", + \\"enable-scroll\\": \\"true\\", + \\"enable-rotate\\": \\"false\\", + \\"enable-satellite\\": \\"false\\", + \\"enable-traffic\\": \\"false\\", + setting: \\"[]\\", + bindLabelTap: \\"\\", + bindRegionChange: \\"\\", + bindPoiTap: \\"\\" + }, + Button: { + lang: \\"en\\", + \\"session-from\\": \\"\\", + \\"send-message-title\\": \\"\\", + \\"send-message-path\\": \\"\\", + \\"send-message-img\\": \\"\\", + \\"app-parameter\\": \\"\\", + \\"show-message-card\\": \\"false\\", + bindGetUserInfo: \\"\\", + bindContact: \\"\\", + bindGetPhoneNumber: \\"\\", + bindError: \\"\\", + bindOpenSetting: \\"\\", + bindLaunchApp: \\"\\" + }, + Form: { + \\"report-submit-timeout\\": \\"0\\" + }, + Input: { + \\"auto-focus\\": \\"false\\", + \\"always-embed\\": \\"false\\", + \\"adjust-position\\": \\"true\\", + \\"hold-keyboard\\": \\"false\\", + bindKeyboardHeightChange: \\"\\" + }, + Picker: { + \\"header-text\\": \\"\\" + }, + PickerView: { + bindPickStart: \\"\\", + bindPickEnd: \\"\\" + }, + Slider: { + color: singleQuote(\\"#e9e9e9\\"), + \\"selected-color\\": singleQuote(\\"#1aad19\\") + }, + Textarea: { + \\"show-confirm-bar\\": \\"true\\", + \\"adjust-position\\": \\"true\\", + \\"hold-keyboard\\": \\"false\\", + \\"disable-default-padding\\": \\"false\\", + bindKeyboardHeightChange: \\"\\" + }, + ScrollView: { + \\"enable-flex\\": \\"false\\", + \\"scroll-anchoring\\": \\"false\\", + \\"refresher-enabled\\": \\"false\\", + \\"refresher-threshold\\": \\"45\\", + \\"refresher-default-style\\": singleQuote(\\"black\\"), + \\"refresher-background\\": singleQuote(\\"#FFF\\"), + \\"refresher-triggered\\": \\"false\\", + enhanced: \\"false\\", + bounces: \\"true\\", + \\"show-scrollbar\\": \\"true\\", + \\"paging-enabled\\": \\"false\\", + \\"fast-deceleration\\": \\"false\\", + bindDragStart: \\"\\", + bindDragging: \\"\\", + bindDragEnd: \\"\\", + bindRefresherPulling: \\"\\", + bindRefresherRefresh: \\"\\", + bindRefresherRestore: \\"\\", + bindRefresherAbort: \\"\\" + }, + Swiper: { + \\"snap-to-edge\\": \\"false\\", + \\"easing-function\\": singleQuote(\\"default\\") + }, + SwiperItem: { + \\"skip-hidden-item-layout\\": \\"false\\" + }, + Navigator: { + target: singleQuote(\\"self\\"), + \\"app-id\\": \\"\\", + path: \\"\\", + \\"extra-data\\": \\"\\", + version: singleQuote(\\"version\\") + }, + Camera: { + mode: singleQuote(\\"normal\\"), + resolution: singleQuote(\\"medium\\"), + \\"frame-size\\": singleQuote(\\"medium\\"), + bindInitDone: \\"\\", + bindScanCode: \\"\\" + }, + Image: { + webp: \\"false\\", + \\"show-menu-by-longpress\\": \\"false\\" + }, + LivePlayer: { + mode: singleQuote(\\"live\\"), + \\"sound-mode\\": singleQuote(\\"speaker\\"), + \\"auto-pause-if-navigate\\": \\"true\\", + \\"auto-pause-if-open-native\\": \\"true\\", + \\"picture-in-picture-mode\\": \\"[]\\", + bindAudioVolumeNotify: \\"\\", + bindEnterPictureInPicture: \\"\\", + bindLeavePictureInPicture: \\"\\" + }, + Video: { + title: \\"\\", + \\"play-btn-position\\": singleQuote(\\"bottom\\"), + \\"enable-play-gesture\\": \\"false\\", + \\"auto-pause-if-navigate\\": \\"true\\", + \\"auto-pause-if-open-native\\": \\"true\\", + \\"vslide-gesture\\": \\"false\\", + \\"vslide-gesture-in-fullscreen\\": \\"true\\", + \\"ad-unit-id\\": \\"\\", + \\"poster-for-crawler\\": \\"\\", + \\"show-casting-button\\": \\"false\\", + \\"picture-in-picture-mode\\": \\"[]\\", + \\"enable-auto-rotation\\": \\"false\\", + \\"show-screen-lock-button\\": \\"false\\", + bindProgress: \\"\\", + bindLoadedMetadata: \\"\\", + bindControlsToggle: \\"\\", + bindEnterPictureInPicture: \\"\\", + bindLeavePictureInPicture: \\"\\", + bindSeekComplete: \\"\\" + }, + Canvas: { + type: \\"\\" + }, + Ad: { + \\"ad-type\\": singleQuote(\\"banner\\"), + \\"ad-theme\\": singleQuote(\\"white\\") + }, + Editor: { + \\"read-only\\": \\"false\\", + placeholder: \\"\\", + \\"show-img-size\\": \\"false\\", + \\"show-img-toolbar\\": \\"false\\", + \\"show-img-resize\\": \\"false\\", + focus: \\"false\\", + bindReady: \\"\\", + bindFocus: \\"\\", + bindBlur: \\"\\", + bindInput: \\"\\", + bindStatusChange: \\"\\", + name: \\"\\" + }, + MatchMedia: { + \\"min-width\\": \\"\\", + \\"max-width\\": \\"\\", + width: \\"\\", + \\"min-height\\": \\"\\", + \\"max-height\\": \\"\\", + height: \\"\\", + orientation: \\"\\" + }, + FunctionalPageNavigator: { + version: singleQuote(\\"release\\"), + name: \\"\\", + args: \\"\\", + bindSuccess: \\"\\", + bindFail: \\"\\", + bindCancel: \\"\\" + }, + LivePusher: { + url: \\"\\", + mode: singleQuote(\\"RTC\\"), + autopush: \\"false\\", + muted: \\"false\\", + \\"enable-camera\\": \\"true\\", + \\"auto-focus\\": \\"true\\", + orientation: singleQuote(\\"vertical\\"), + beauty: \\"0\\", + whiteness: \\"0\\", + aspect: singleQuote(\\"9:16\\"), + \\"min-bitrate\\": \\"200\\", + \\"max-bitrate\\": \\"1000\\", + \\"audio-quality\\": singleQuote(\\"high\\"), + \\"waiting-image\\": \\"\\", + \\"waiting-image-hash\\": \\"\\", + zoom: \\"false\\", + \\"device-position\\": singleQuote(\\"front\\"), + \\"background-mute\\": \\"false\\", + mirror: \\"false\\", + \\"remote-mirror\\": \\"false\\", + \\"local-mirror\\": \\"false\\", + \\"audio-reverb-type\\": \\"0\\", + \\"enable-mic\\": \\"true\\", + \\"enable-agc\\": \\"false\\", + \\"enable-ans\\": \\"false\\", + \\"audio-volume-type\\": singleQuote(\\"voicecall\\"), + \\"video-width\\": \\"360\\", + \\"video-height\\": \\"640\\", + animation: \\"\\", + bindStateChange: \\"\\", + bindNetStatus: \\"\\", + bindBgmStart: \\"\\", + bindBgmProgress: \\"\\", + bindBgmComplete: \\"\\" + }, + OfficialAccount: { + bindLoad: \\"\\", + bindError: \\"\\" + }, + OpenData: { + type: \\"\\", + \\"open-gid\\": \\"\\", + lang: singleQuote(\\"en\\"), + \\"default-text\\": \\"\\", + \\"default-avatar\\": \\"\\", + bindError: \\"\\" + }, + NavigationBar: { + title: \\"\\", + loading: \\"false\\", + \\"front-color\\": \\"\\", + \\"background-color\\": \\"\\", + \\"color-animation-duration\\": \\"0\\", + \\"color-animation-timing-func\\": singleQuote(\\"linear\\") + }, + PageMeta: { + \\"background-text-style\\": \\"\\", + \\"background-color\\": \\"\\", + \\"background-color-top\\": \\"\\", + \\"background-color-bottom\\": \\"\\", + \\"scroll-top\\": singleQuote(\\"\\"), + \\"scroll-duration\\": \\"300\\", + \\"page-style\\": singleQuote(\\"\\"), + \\"root-font-size\\": singleQuote(\\"\\"), + bindResize: \\"\\", + bindScroll: \\"\\", + bindScrollDone: \\"\\" + }, + VoipRoom: { + openid: \\"\\", + mode: singleQuote(\\"camera\\"), + \\"device-position\\": singleQuote(\\"front\\"), + bindError: \\"\\" + }, + AdCustom: { + \\"unit-id\\": \\"\\", + \\"ad-intervals\\": \\"\\", + bindLoad: \\"\\", + bindError: \\"\\" + } + }; + var hostConfig = { + initNativeApi: initNativeApi, + onTaroElementCreate: function onTaroElementCreate(tagName) { + warn(tagName === \\"MAP\\", \\"\\\\u5fae\\\\u4fe1\\\\u5c0f\\\\u7a0b\\\\u5e8f map \\\\u7ec4\\\\u4ef6\\\\u7684 \`setting\` \\\\u5c5e\\\\u6027\\\\u9700\\\\u8981\\\\u4f20\\\\u9012\\\\u4e00\\\\u4e2a\\\\u9ed8\\\\u8ba4\\\\u503c\\\\u3002\\\\u8be6\\\\u60c5\\\\uff1a\\\\n https://developers.weixin.qq.com/miniprogram/dev/component/map.html\\"); + } + }; + mergeReconciler(hostConfig); + mergeInternalComponents(components); + var taro_runtime = __webpack_require__(1); + var classCallCheck = __webpack_require__(2); + var createClass = __webpack_require__(3); + var possibleConstructorReturn = __webpack_require__(5); + var getPrototypeOf = __webpack_require__(4); + var inherits = __webpack_require__(6); + var react = __webpack_require__(0); + var app = __webpack_require__(13); + var app_App = function(_Component) { + Object(inherits[\\"a\\"])(App, _Component); + function App() { + Object(classCallCheck[\\"a\\"])(this, App); + return Object(possibleConstructorReturn[\\"a\\"])(this, Object(getPrototypeOf[\\"a\\"])(App).apply(this, arguments)); + } + Object(createClass[\\"a\\"])(App, [ { + key: \\"componentDidMount\\", + value: function componentDidMount() {} + }, { + key: \\"componentDidShow\\", + value: function componentDidShow() {} + }, { + key: \\"componentDidHide\\", + value: function componentDidHide() {} + }, { + key: \\"componentDidCatchError\\", + value: function componentDidCatchError() {} + }, { + key: \\"render\\", + value: function render() { + return this.props.children; + } + } ]); + return App; + }(react[\\"Component\\"]); + var lib_src_app = app_App; + var taro_react = __webpack_require__(9); + var config = { + pages: [ \\"pages/index/index\\" ], + window: { + backgroundTextStyle: \\"light\\", + navigationBarBackgroundColor: \\"#fff\\", + navigationBarTitleText: \\"WeChat\\", + navigationBarTextStyle: \\"black\\" + } + }; + taro_runtime[\\"window\\"].__taroAppConfig = config; + var inst = App(Object(taro_runtime[\\"createReactApp\\"])(lib_src_app, react, taro_react[\\"a\\"], config)); + } +}, [ [ 16, 0, 1, 3, 2 ] ] ]); + + + +/** filePath: dist/app.json **/ +{\\"pages\\":[\\"pages/index/index\\"],\\"window\\":{\\"backgroundTextStyle\\":\\"light\\",\\"navigationBarBackgroundColor\\":\\"#fff\\",\\"navigationBarTitleText\\":\\"WeChat\\",\\"navigationBarTextStyle\\":\\"black\\"}} + +/** filePath: dist/app.wxss **/ + + +/** filePath: dist/base.wxml **/ + + + + + + + + ++ + + + ++ + ++ + + + ++ + ++ + + + ++ + ++ + + + ++ + +{{i.v}} + + + + + + + ++ + + + ++ + ++ + + + ++ + ++ + + + + + + + ++ + ++ + + + ++ + ++ + + + ++ + ++ + + + + + + + ++ + ++ + + + ++ + ++ + + + ++ + ++ + + + + + + + ++ + ++ + + + ++ + ++ + + + + + + + ++ + ++ + + + ++ + ++ + + + + + + + ++ + ++ + + + ++ + ++ + + + + + + + ++ + ++ + + + ++ + ++ + + + + + + + ++ + ++ + + + ++ + ++ + + + + + + + ++ + ++ + + + ++ + ++ + + + + + + + ++ + ++ + + + ++ + ++ + + + + + + + ++ + ++ + + + ++ + ++ + + + + + + + ++ + ++ + + + ++ + ++ + + + + + + + ++ + ++ + + + ++ + ++ + + + + + + + ++ + ++ + + + ++ + ++ + + + + + + + ++ + ++ + + +/** filePath: dist/common.js **/ +(wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 2 ], [ function(module, __webpack_exports__, __webpack_require__) { + \\"use strict\\"; + __webpack_require__.r(__webpack_exports__); + __webpack_exports__[\\"default\\"] = \\"react-mock\\"; +} ] ]); + +/** filePath: dist/comp.js **/ +(wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 6 ], { + 14: function(module, __webpack_exports__, __webpack_require__) { + \\"use strict\\"; + __webpack_require__.r(__webpack_exports__); + var _tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1); + Component(Object(_tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__[\\"createRecursiveComponentConfig\\"])()); + } +}, [ [ 14, 0, 1 ] ] ]); + +/** filePath: dist/comp.json **/ +{\\"component\\":true,\\"usingComponents\\":{\\"comp\\":\\"./comp\\"}} + +/** filePath: dist/comp.wxml **/ + + + +/** filePath: dist/pages/index/index.js **/ +(wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 7 ], { + 10: function(module, exports, __webpack_require__) {}, + 15: function(module, exports, __webpack_require__) {}, + 17: function(module, __webpack_exports__, __webpack_require__) { + \\"use strict\\"; + __webpack_require__.r(__webpack_exports__); + var taro_runtime = __webpack_require__(1); + var classCallCheck = __webpack_require__(2); + var createClass = __webpack_require__(3); + var possibleConstructorReturn = __webpack_require__(5); + var getPrototypeOf = __webpack_require__(4); + var inherits = __webpack_require__(6); + var react = __webpack_require__(0); + var taro_components = __webpack_require__(7); + var index_module = __webpack_require__(8); + var index_module_default = __webpack_require__.n(index_module); + var index = __webpack_require__(10); + var index_default = __webpack_require__.n(index); + var index_global = __webpack_require__(15); + var index_Index = function(_Component) { + Object(inherits[\\"a\\"])(Index, _Component); + function Index() { + Object(classCallCheck[\\"a\\"])(this, Index); + return Object(possibleConstructorReturn[\\"a\\"])(this, Object(getPrototypeOf[\\"a\\"])(Index).apply(this, arguments)); + } + Object(createClass[\\"a\\"])(Index, [ { + key: \\"componentDidMount\\", + value: function componentDidMount() {} + }, { + key: \\"componentWillUnmount\\", + value: function componentWillUnmount() {} + }, { + key: \\"componentDidShow\\", + value: function componentDidShow() {} + }, { + key: \\"componentDidHide\\", + value: function componentDidHide() {} + }, { + key: \\"render\\", + value: function render() { + return react[\\"default\\"].createElement(taro_components[\\"View\\"], { + className: index_module_default.a.cbody + }, react[\\"default\\"].createElement(taro_components[\\"Text\\"], { + className: \\"\\".concat(index_module_default.a.ctext, \\" \\").concat(index_default.a.cwrapper) + }, \\"Hello world!\\")); + } + } ]); + return Index; + }(react[\\"Component\\"]); + var config = { + navigationBarTitleText: \\"\\\\u9996\\\\u9875\\" + }; + var inst = Page(Object(taro_runtime[\\"createPageConfig\\"])(index_Index, \\"pages/index/index\\", {}, config || {})); + }, + 8: function(module, exports, __webpack_require__) { + module.exports = { + cbody: \\"index-module__cbody___3Vfl2\\", + ctext: \\"index-module__ctext___Dq1RJ\\" + }; + } +}, [ [ 17, 0, 1, 3, 2 ] ] ]); + +/** filePath: dist/pages/index/index.json **/ +{\\"navigationBarTitleText\\":\\"首页\\",\\"usingComponents\\":{\\"comp\\":\\"../../comp\\"}} + +/** filePath: dist/pages/index/index.wxml **/ + + + +/** filePath: dist/pages/index/index.wxss **/ +.index-module__cbody___3Vfl2{height:300rpx;background-color:#e8e8ed}.index-module__ctext___Dq1RJ{display:inline-block;width:100%;color:#ff0}.cwrapper{font-size:36rpx}.chomepage{background:gray} + +/** filePath: dist/runtime.js **/ +(function(modules) { + function webpackJsonpCallback(data) { + var chunkIds = data[0]; + var moreModules = data[1]; + var executeModules = data[2]; + var moduleId, chunkId, i = 0, resolves = []; + for (;i < chunkIds.length; i++) { + chunkId = chunkIds[i]; + if (Object.prototype.hasOwnProperty.call(installedChunks, chunkId) && installedChunks[chunkId]) { + resolves.push(installedChunks[chunkId][0]); + } + installedChunks[chunkId] = 0; + } + for (moduleId in moreModules) { + if (Object.prototype.hasOwnProperty.call(moreModules, moduleId)) { + modules[moduleId] = moreModules[moduleId]; + } + } + if (parentJsonpFunction) parentJsonpFunction(data); + while (resolves.length) { + resolves.shift()(); + } + deferredModules.push.apply(deferredModules, executeModules || []); + return checkDeferredModules(); + } + function checkDeferredModules() { + var result; + for (var i = 0; i < deferredModules.length; i++) { + var deferredModule = deferredModules[i]; + var fulfilled = true; + for (var j = 1; j < deferredModule.length; j++) { + var depId = deferredModule[j]; + if (installedChunks[depId] !== 0) fulfilled = false; + } + if (fulfilled) { + deferredModules.splice(i--, 1); + result = __webpack_require__(__webpack_require__.s = deferredModule[0]); + } + } + return result; + } + var installedModules = {}; + var installedChunks = { + 0: 0 + }; + var deferredModules = []; + function __webpack_require__(moduleId) { + if (installedModules[moduleId]) { + return installedModules[moduleId].exports; + } + var module = installedModules[moduleId] = { + i: moduleId, + l: false, + exports: {} + }; + modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); + module.l = true; + return module.exports; + } + __webpack_require__.m = modules; + __webpack_require__.c = installedModules; + __webpack_require__.d = function(exports, name, getter) { + if (!__webpack_require__.o(exports, name)) { + Object.defineProperty(exports, name, { + enumerable: true, + get: getter + }); + } + }; + __webpack_require__.r = function(exports) { + if (typeof Symbol !== \\"undefined\\" && Symbol.toStringTag) { + Object.defineProperty(exports, Symbol.toStringTag, { + value: \\"Module\\" + }); + } + Object.defineProperty(exports, \\"__esModule\\", { + value: true + }); + }; + __webpack_require__.t = function(value, mode) { + if (mode & 1) value = __webpack_require__(value); + if (mode & 8) return value; + if (mode & 4 && typeof value === \\"object\\" && value && value.__esModule) return value; + var ns = Object.create(null); + __webpack_require__.r(ns); + Object.defineProperty(ns, \\"default\\", { + enumerable: true, + value: value + }); + if (mode & 2 && typeof value != \\"string\\") for (var key in value) __webpack_require__.d(ns, key, function(key) { + return value[key]; + }.bind(null, key)); + return ns; + }; + __webpack_require__.n = function(module) { + var getter = module && module.__esModule ? function getDefault() { + return module[\\"default\\"]; + } : function getModuleExports() { + return module; + }; + __webpack_require__.d(getter, \\"a\\", getter); + return getter; + }; + __webpack_require__.o = function(object, property) { + return Object.prototype.hasOwnProperty.call(object, property); + }; + __webpack_require__.p = \\"/\\"; + var jsonpArray = wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []; + var oldJsonpFunction = jsonpArray.push.bind(jsonpArray); + jsonpArray.push = webpackJsonpCallback; + jsonpArray = jsonpArray.slice(); + for (var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]); + var parentJsonpFunction = oldJsonpFunction; + checkDeferredModules(); +})([]); + +/** filePath: dist/taro.js **/ +(wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 1 ], { + 1: function(module, __webpack_exports__, __webpack_require__) { + \\"use strict\\"; + var _unused_webpack_default_export = \\"taro-runtime-mock\\"; + }, + 7: function(module, __webpack_exports__, __webpack_require__) { + \\"use strict\\"; + var _unused_webpack_default_export = \\"taro-components-mock\\"; + }, + 9: function(module, __webpack_exports__, __webpack_require__) { + \\"use strict\\"; + __webpack_exports__[\\"a\\"] = \\"taro-react-mock\\"; + } +} ]); + +/** filePath: dist/utils.wxs **/ +module.exports = { + a: function (l, n, s) { + var a = [\\"view\\",\\"cover-view\\",\\"block\\",\\"text\\",\\"slot\\",\\"slot-view\\",\\"label\\",\\"form\\",\\"scroll-view\\"] + var b = [\\"slot\\",\\"slot-view\\",\\"label\\",\\"form\\",\\"scroll-view\\"] + if (a.indexOf(n) === -1) { + l = 0 + } + if (b.indexOf(n) > -1) { + var u = s.split(',') + var depth = 0 + for (var i = 0; i < u.length; i++) { + if (u[i] === n) depth++ + } + l = depth + } + return 'tmpl_' + l + '_' + n + }, + b: function (a, b) { + return a === undefined ? b : a + }, + c: function(i, prefix) { + var s = i.focus !== undefined ? 'focus' : 'blur' + return prefix + i.nn + '_' + s + }, + d: function (i, v) { + return i === undefined ? v : i + }, + e: function (n) { + return 'tmpl_' + n + '_container' + }, + f: function (l, n) { + var b = [\\"slot\\",\\"slot-view\\",\\"label\\",\\"form\\",\\"scroll-view\\"] + if (b.indexOf(n) > -1) { + if (l) l += ',' + l += n + } + return l + } +} + +/** filePath: dist/vendors.js **/ +(wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 3 ], [ , , function(module, __webpack_exports__, __webpack_require__) { + \\"use strict\\"; + __webpack_require__.d(__webpack_exports__, \\"a\\", (function() { + return _classCallCheck; + })); + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError(\\"Cannot call a class as a function\\"); + } + } +}, function(module, __webpack_exports__, __webpack_require__) { + \\"use strict\\"; + __webpack_require__.d(__webpack_exports__, \\"a\\", (function() { + return _createClass; + })); + function _defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if (\\"value\\" in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + function _createClass(Constructor, protoProps, staticProps) { + if (protoProps) _defineProperties(Constructor.prototype, protoProps); + if (staticProps) _defineProperties(Constructor, staticProps); + return Constructor; + } +}, function(module, __webpack_exports__, __webpack_require__) { + \\"use strict\\"; + __webpack_require__.d(__webpack_exports__, \\"a\\", (function() { + return _getPrototypeOf; + })); + function _getPrototypeOf(o) { + _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { + return o.__proto__ || Object.getPrototypeOf(o); + }; + return _getPrototypeOf(o); + } +}, function(module, __webpack_exports__, __webpack_require__) { + \\"use strict\\"; + __webpack_require__.d(__webpack_exports__, \\"a\\", (function() { + return _possibleConstructorReturn; + })); + function _typeof(obj) { + \\"@babel/helpers - typeof\\"; + if (typeof Symbol === \\"function\\" && typeof Symbol.iterator === \\"symbol\\") { + _typeof = function _typeof(obj) { + return typeof obj; + }; + } else { + _typeof = function _typeof(obj) { + return obj && typeof Symbol === \\"function\\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \\"symbol\\" : typeof obj; + }; + } + return _typeof(obj); + } + function _assertThisInitialized(self) { + if (self === void 0) { + throw new ReferenceError(\\"this hasn't been initialised - super() hasn't been called\\"); + } + return self; + } + function _possibleConstructorReturn(self, call) { + if (call && (_typeof(call) === \\"object\\" || typeof call === \\"function\\")) { + return call; + } + return _assertThisInitialized(self); + } +}, function(module, __webpack_exports__, __webpack_require__) { + \\"use strict\\"; + __webpack_require__.d(__webpack_exports__, \\"a\\", (function() { + return _inherits; + })); + function _setPrototypeOf(o, p) { + _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { + o.__proto__ = p; + return o; + }; + return _setPrototypeOf(o, p); + } + function _inherits(subClass, superClass) { + if (typeof superClass !== \\"function\\" && superClass !== null) { + throw new TypeError(\\"Super expression must either be null or a function\\"); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + writable: true, + configurable: true + } + }); + if (superClass) _setPrototypeOf(subClass, superClass); + } +} ] ]); +" +`; diff --git a/packages/taro-mini-runner/src/__tests__/__snapshots__/custom-tabbar.spec.ts.snap b/packages/taro-mini-runner/src/__tests__/__snapshots__/custom-tabbar.spec.ts.snap new file mode 100644 index 000000000000..b34a264cbe8b --- /dev/null +++ b/packages/taro-mini-runner/src/__tests__/__snapshots__/custom-tabbar.spec.ts.snap @@ -0,0 +1,2580 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`custom tabbar should weapp custom tabbar work 1`] = `26`; + +exports[`custom tabbar should weapp custom tabbar work 2`] = ` +" +/** filePath: dist/app.js **/ +require(\\"./runtime\\"); + +require(\\"./common\\"); + +require(\\"./vendors\\"); + +require(\\"./taro\\"); + +(wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 4 ], { + 13: function(module, exports, __webpack_require__) {}, + 16: function(module, __webpack_exports__, __webpack_require__) { + \\"use strict\\"; + __webpack_require__.r(__webpack_exports__); + function _arrayLikeToArray(arr, len) { + if (len == null || len > arr.length) len = arr.length; + for (var i = 0, arr2 = new Array(len); i < len; i++) { + arr2[i] = arr[i]; + } + return arr2; + } + function _arrayWithoutHoles(arr) { + if (Array.isArray(arr)) return _arrayLikeToArray(arr); + } + function _iterableToArray(iter) { + if (typeof Symbol !== \\"undefined\\" && Symbol.iterator in Object(iter)) return Array.from(iter); + } + function _unsupportedIterableToArray(o, minLen) { + if (!o) return; + if (typeof o === \\"string\\") return _arrayLikeToArray(o, minLen); + var n = Object.prototype.toString.call(o).slice(8, -1); + if (n === \\"Object\\" && o.constructor) n = o.constructor.name; + if (n === \\"Map\\" || n === \\"Set\\") return Array.from(o); + if (n === \\"Arguments\\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); + } + function _nonIterableSpread() { + throw new TypeError(\\"Invalid attempt to spread non-iterable instance.\\\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\\"); + } + function _toConsumableArray(arr) { + return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); + } + function _typeof(obj) { + \\"@babel/helpers - typeof\\"; + if (typeof Symbol === \\"function\\" && typeof Symbol.iterator === \\"symbol\\") { + _typeof = function _typeof(obj) { + return typeof obj; + }; + } else { + _typeof = function _typeof(obj) { + return obj && typeof Symbol === \\"function\\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \\"symbol\\" : typeof obj; + }; + } + return _typeof(obj); + } + function _assertThisInitialized(self) { + if (self === void 0) { + throw new ReferenceError(\\"this hasn't been initialised - super() hasn't been called\\"); + } + return self; + } + function _possibleConstructorReturn(self, call) { + if (call && (_typeof(call) === \\"object\\" || typeof call === \\"function\\")) { + return call; + } + return _assertThisInitialized(self); + } + function _getPrototypeOf(o) { + _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { + return o.__proto__ || Object.getPrototypeOf(o); + }; + return _getPrototypeOf(o); + } + function _setPrototypeOf(o, p) { + _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { + o.__proto__ = p; + return o; + }; + return _setPrototypeOf(o, p); + } + function _inherits(subClass, superClass) { + if (typeof superClass !== \\"function\\" && superClass !== null) { + throw new TypeError(\\"Super expression must either be null or a function\\"); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + writable: true, + configurable: true + } + }); + if (superClass) _setPrototypeOf(subClass, superClass); + } + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError(\\"Cannot call a class as a function\\"); + } + } + function _defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if (\\"value\\" in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + function _createClass(Constructor, protoProps, staticProps) { + if (protoProps) _defineProperties(Constructor.prototype, protoProps); + if (staticProps) _defineProperties(Constructor, staticProps); + return Constructor; + } + function isString(o) { + return typeof o === \\"string\\"; + } + function isUndefined(o) { + return typeof o === \\"undefined\\"; + } + function isNull(o) { + return o === null; + } + function isObject(o) { + return o !== null && _typeof(o) === \\"object\\"; + } + function isBoolean(o) { + return o === true || o === false; + } + function isFunction(o) { + return typeof o === \\"function\\"; + } + function isNumber(o) { + return typeof o === \\"number\\"; + } + function isBooleanStringLiteral(o) { + return o === \\"true\\" || o === \\"false\\"; + } + var isArray = Array.isArray; + var styles = { + style: \\"i.\\".concat(\\"st\\"), + class: \\"i.\\".concat(\\"cl\\") + }; + var events = { + bindtap: \\"eh\\" + }; + var touchEvents = { + bindTouchStart: \\"\\", + bindTouchMove: \\"\\", + bindTouchEnd: \\"\\", + bindTouchCancel: \\"\\", + bindLongTap: \\"\\" + }; + var animationEvents = { + bindAnimationStart: \\"\\", + bindAnimationIteration: \\"\\", + bindAnimationEnd: \\"\\", + bindTransitionEnd: \\"\\" + }; + var specialEvents = new Set([ \\"htouchmove\\", \\"vtouchmove\\" ]); + function singleQuote(s) { + return \\"'\\".concat(s, \\"'\\"); + } + var View = Object.assign(Object.assign({ + \\"hover-class\\": singleQuote(\\"none\\"), + \\"hover-stop-propagation\\": \\"false\\", + \\"hover-start-time\\": \\"50\\", + \\"hover-stay-time\\": \\"400\\", + animation: \\"\\" + }, touchEvents), animationEvents); + var Icon = { + type: \\"\\", + size: \\"23\\", + color: \\"\\" + }; + var MapComp = Object.assign({ + longitude: \\"\\", + latitude: \\"\\", + scale: \\"16\\", + markers: \\"[]\\", + covers: \\"\\", + polyline: \\"[]\\", + circles: \\"[]\\", + controls: \\"[]\\", + \\"include-points\\": \\"[]\\", + \\"show-location\\": \\"\\", + \\"layer-style\\": \\"1\\", + bindMarkerTap: \\"\\", + bindControlTap: \\"\\", + bindCalloutTap: \\"\\", + bindUpdated: \\"\\" + }, touchEvents); + var Progress = { + percent: \\"\\", + \\"stroke-width\\": \\"6\\", + color: singleQuote(\\"#09BB07\\"), + activeColor: singleQuote(\\"#09BB07\\"), + backgroundColor: singleQuote(\\"#EBEBEB\\"), + active: \\"false\\", + \\"active-mode\\": singleQuote(\\"backwards\\"), + \\"show-info\\": \\"false\\" + }; + var RichText = { + nodes: \\"[]\\" + }; + var Text = { + selectable: \\"false\\", + space: \\"\\", + decode: \\"false\\" + }; + var Button = { + size: singleQuote(\\"default\\"), + type: \\"\\", + plain: \\"false\\", + disabled: \\"\\", + loading: \\"false\\", + \\"form-type\\": \\"\\", + \\"open-type\\": \\"\\", + \\"hover-class\\": singleQuote(\\"button-hover\\"), + \\"hover-stop-propagation\\": \\"false\\", + \\"hover-start-time\\": \\"20\\", + \\"hover-stay-time\\": \\"70\\", + name: \\"\\" + }; + var Checkbox = { + value: \\"\\", + disabled: \\"\\", + checked: \\"false\\", + color: singleQuote(\\"#09BB07\\"), + name: \\"\\" + }; + var CheckboxGroup = { + bindChange: \\"\\", + name: \\"\\" + }; + var Form = { + \\"report-submit\\": \\"false\\", + bindSubmit: \\"\\", + bindReset: \\"\\", + name: \\"\\" + }; + var Input = { + value: \\"\\", + type: singleQuote(\\"\\"), + password: \\"false\\", + placeholder: \\"\\", + \\"placeholder-style\\": \\"\\", + \\"placeholder-class\\": singleQuote(\\"input-placeholder\\"), + disabled: \\"\\", + maxlength: \\"140\\", + \\"cursor-spacing\\": \\"0\\", + focus: \\"false\\", + \\"confirm-type\\": singleQuote(\\"done\\"), + \\"confirm-hold\\": \\"false\\", + cursor: \\"i.value.length\\", + \\"selection-start\\": \\"-1\\", + \\"selection-end\\": \\"-1\\", + bindInput: \\"\\", + bindFocus: \\"\\", + bindBlur: \\"\\", + bindConfirm: \\"\\", + name: \\"\\" + }; + var Label = { + for: \\"\\", + name: \\"\\" + }; + var Picker = { + mode: singleQuote(\\"selector\\"), + disabled: \\"\\", + range: \\"\\", + \\"range-key\\": \\"\\", + value: \\"\\", + start: \\"\\", + end: \\"\\", + fields: singleQuote(\\"day\\"), + \\"custom-item\\": \\"\\", + name: \\"\\", + bindCancel: \\"\\", + bindChange: \\"\\", + bindColumnChange: \\"\\" + }; + var PickerView = { + value: \\"\\", + \\"indicator-style\\": \\"\\", + \\"indicator-class\\": \\"\\", + \\"mask-style\\": \\"\\", + \\"mask-class\\": \\"\\", + bindChange: \\"\\", + name: \\"\\" + }; + var PickerViewColumn = { + name: \\"\\" + }; + var Radio = { + value: \\"\\", + checked: \\"false\\", + disabled: \\"\\", + color: singleQuote(\\"#09BB07\\"), + name: \\"\\" + }; + var RadioGroup = { + bindChange: \\"\\", + name: \\"\\" + }; + var Slider = { + min: \\"0\\", + max: \\"100\\", + step: \\"1\\", + disabled: \\"\\", + value: \\"0\\", + activeColor: singleQuote(\\"#1aad19\\"), + backgroundColor: singleQuote(\\"#e9e9e9\\"), + \\"block-size\\": \\"28\\", + \\"block-color\\": singleQuote(\\"#ffffff\\"), + \\"show-value\\": \\"false\\", + bindChange: \\"\\", + bindChanging: \\"\\", + name: \\"\\" + }; + var Switch = { + checked: \\"false\\", + disabled: \\"\\", + type: singleQuote(\\"switch\\"), + color: singleQuote(\\"#04BE02\\"), + bindChange: \\"\\", + name: \\"\\" + }; + var Textarea = { + value: \\"\\", + placeholder: \\"\\", + \\"placeholder-style\\": \\"\\", + \\"placeholder-class\\": singleQuote(\\"textarea-placeholder\\"), + disabled: \\"\\", + maxlength: \\"140\\", + \\"auto-focus\\": \\"false\\", + focus: \\"false\\", + \\"auto-height\\": \\"false\\", + fixed: \\"false\\", + \\"cursor-spacing\\": \\"0\\", + cursor: \\"-1\\", + \\"selection-start\\": \\"-1\\", + \\"selection-end\\": \\"-1\\", + bindFocus: \\"\\", + bindBlur: \\"\\", + bindLineChange: \\"\\", + bindInput: \\"\\", + bindConfirm: \\"\\", + name: \\"\\" + }; + var CoverImage = { + src: \\"\\", + bindLoad: \\"eh\\", + bindError: \\"eh\\" + }; + var CoverView = Object.assign({ + \\"scroll-top\\": \\"false\\" + }, touchEvents); + var MovableArea = { + \\"scale-area\\": \\"false\\" + }; + var MovableView = Object.assign(Object.assign({ + direction: \\"none\\", + inertia: \\"false\\", + \\"out-of-bounds\\": \\"false\\", + x: \\"\\", + y: \\"\\", + damping: \\"20\\", + friction: \\"2\\", + disabled: \\"\\", + scale: \\"false\\", + \\"scale-min\\": \\"0.5\\", + \\"scale-max\\": \\"10\\", + \\"scale-value\\": \\"1\\", + animation: \\"true\\", + bindChange: \\"\\", + bindScale: \\"\\", + htouchmove: \\"\\", + vtouchmove: \\"\\", + width: singleQuote(\\"10px\\"), + height: singleQuote(\\"10px\\") + }, touchEvents), animationEvents); + var ScrollView = Object.assign(Object.assign({ + \\"scroll-x\\": \\"false\\", + \\"scroll-y\\": \\"false\\", + \\"upper-threshold\\": \\"50\\", + \\"lower-threshold\\": \\"50\\", + \\"scroll-top\\": \\"\\", + \\"scroll-left\\": \\"\\", + \\"scroll-into-view\\": \\"\\", + \\"scroll-with-animation\\": \\"false\\", + \\"enable-back-to-top\\": \\"false\\", + bindScrollToUpper: \\"\\", + bindScrollToLower: \\"\\", + bindScroll: \\"\\" + }, touchEvents), animationEvents); + var Swiper = Object.assign({ + \\"indicator-dots\\": \\"false\\", + \\"indicator-color\\": singleQuote(\\"rgba(0, 0, 0, .3)\\"), + \\"indicator-active-color\\": singleQuote(\\"#000000\\"), + autoplay: \\"false\\", + current: \\"0\\", + interval: \\"5000\\", + duration: \\"500\\", + circular: \\"false\\", + vertical: \\"false\\", + \\"previous-margin\\": \\"'0px'\\", + \\"next-margin\\": \\"'0px'\\", + \\"display-multiple-items\\": \\"1\\", + bindChange: \\"\\", + bindTransition: \\"\\", + bindAnimationFinish: \\"\\" + }, touchEvents); + var SwiperItem = { + \\"item-id\\": \\"\\" + }; + var Navigator = { + url: \\"\\", + \\"open-type\\": singleQuote(\\"navigate\\"), + delta: \\"1\\", + \\"hover-class\\": singleQuote(\\"navigator-hover\\"), + \\"hover-stop-propagation\\": \\"false\\", + \\"hover-start-time\\": \\"50\\", + \\"hover-stay-time\\": \\"600\\", + bindSuccess: \\"\\", + bindFail: \\"\\", + bindComplete: \\"\\" + }; + var Audio = { + id: \\"\\", + src: \\"\\", + loop: \\"false\\", + controls: \\"false\\", + poster: \\"\\", + name: \\"\\", + author: \\"\\", + bindError: \\"\\", + bindPlay: \\"\\", + bindPause: \\"\\", + bindTimeUpdate: \\"\\", + bindEnded: \\"\\" + }; + var Camera = { + \\"device-position\\": singleQuote(\\"back\\"), + flash: singleQuote(\\"auto\\"), + bindStop: \\"\\", + bindError: \\"\\" + }; + var Image = Object.assign({ + src: \\"\\", + mode: singleQuote(\\"scaleToFill\\"), + \\"lazy-load\\": \\"false\\", + bindError: \\"\\", + bindLoad: \\"\\" + }, touchEvents); + var LivePlayer = { + src: \\"\\", + autoplay: \\"false\\", + muted: \\"false\\", + orientation: singleQuote(\\"vertical\\"), + \\"object-fit\\": singleQuote(\\"contain\\"), + \\"background-mute\\": \\"false\\", + \\"min-cache\\": \\"1\\", + \\"max-cache\\": \\"3\\", + animation: \\"\\", + bindStateChange: \\"\\", + bindFullScreenChange: \\"\\", + bindNetStatus: \\"\\" + }; + var Video = { + src: \\"\\", + duration: \\"\\", + controls: \\"true\\", + \\"danmu-list\\": \\"\\", + \\"danmu-btn\\": \\"\\", + \\"enable-danmu\\": \\"\\", + autoplay: \\"false\\", + loop: \\"false\\", + muted: \\"false\\", + \\"initial-time\\": \\"0\\", + \\"page-gesture\\": \\"false\\", + direction: \\"\\", + \\"show-progress\\": \\"true\\", + \\"show-fullscreen-btn\\": \\"true\\", + \\"show-play-btn\\": \\"true\\", + \\"show-center-play-btn\\": \\"true\\", + \\"enable-progress-gesture\\": \\"true\\", + \\"object-fit\\": singleQuote(\\"contain\\"), + poster: \\"\\", + \\"show-mute-btn\\": \\"false\\", + animation: \\"\\", + bindPlay: \\"\\", + bindPause: \\"\\", + bindEnded: \\"\\", + bindTimeUpdate: \\"\\", + bindFullScreenChange: \\"\\", + bindWaiting: \\"\\", + bindError: \\"\\" + }; + var Canvas = Object.assign({ + \\"canvas-id\\": \\"\\", + \\"disable-scroll\\": \\"false\\", + bindError: \\"\\" + }, touchEvents); + var Ad = { + \\"unit-id\\": \\"\\", + \\"ad-intervals\\": \\"\\", + bindLoad: \\"\\", + bindError: \\"\\", + bindClose: \\"\\" + }; + var WebView = { + src: \\"\\", + bindMessage: \\"\\", + bindLoad: \\"\\", + bindError: \\"\\" + }; + var Block = {}; + var SlotView = { + name: \\"\\" + }; + var Slot = { + name: \\"\\" + }; + var internalComponents = { + View: View, + Icon: Icon, + Progress: Progress, + RichText: RichText, + Text: Text, + Button: Button, + Checkbox: Checkbox, + CheckboxGroup: CheckboxGroup, + Form: Form, + Input: Input, + Label: Label, + Picker: Picker, + PickerView: PickerView, + PickerViewColumn: PickerViewColumn, + Radio: Radio, + RadioGroup: RadioGroup, + Slider: Slider, + Switch: Switch, + CoverImage: CoverImage, + Textarea: Textarea, + CoverView: CoverView, + MovableArea: MovableArea, + MovableView: MovableView, + ScrollView: ScrollView, + Swiper: Swiper, + SwiperItem: SwiperItem, + Navigator: Navigator, + Audio: Audio, + Camera: Camera, + Image: Image, + LivePlayer: LivePlayer, + Video: Video, + Canvas: Canvas, + Ad: Ad, + WebView: WebView, + Block: Block, + Map: MapComp, + Slot: Slot, + SlotView: SlotView + }; + var controlledComponent = new Set([ \\"input\\", \\"checkbox\\", \\"picker\\", \\"picker-view\\", \\"radio\\", \\"slider\\", \\"switch\\", \\"textarea\\" ]); + var focusComponents = new Set([ \\"input\\", \\"textarea\\" ]); + var voidElements = new Set([ \\"progress\\", \\"icon\\", \\"rich-text\\", \\"input\\", \\"textarea\\", \\"slider\\", \\"switch\\", \\"audio\\", \\"live-pusher\\", \\"video\\", \\"ad\\", \\"official-account\\", \\"open-data\\", \\"navigation-bar\\" ]); + var nestElements = new Map([ [ \\"view\\", -1 ], [ \\"cover-view\\", -1 ], [ \\"block\\", -1 ], [ \\"text\\", -1 ], [ \\"slot\\", 8 ], [ \\"slot-view\\", 8 ], [ \\"label\\", 6 ], [ \\"form\\", 4 ], [ \\"scroll-view\\", 4 ] ]); + var EMPTY_OBJ = {}; + var EMPTY_ARR = []; + var noop = function noop() {}; + var defaultReconciler = {}; + var box = function box(v) { + return { + v: v + }; + }; + var unbox = function unbox(b) { + return b.v; + }; + function toDashed(s) { + return s.replace(/([a-z0-9])([A-Z])/g, \\"$1-$2\\").toLowerCase(); + } + function toCamelCase(s) { + var camel = \\"\\"; + var nextCap = false; + for (var i = 0; i < s.length; i++) { + if (s[i] !== \\"-\\") { + camel += nextCap ? s[i].toUpperCase() : s[i]; + nextCap = false; + } else { + nextCap = true; + } + } + return camel; + } + function capitalize(s) { + return s.charAt(0).toUpperCase() + s.slice(1); + } + var shared_esm_hasOwnProperty = Object.prototype.hasOwnProperty; + var hasOwn = function hasOwn(val, key) { + return shared_esm_hasOwnProperty.call(val, key); + }; + var reportIssue = \\"\\\\u5982\\\\u6709\\\\u7591\\\\u95ee\\\\uff0c\\\\u8bf7\\\\u63d0\\\\u4ea4 issue \\\\u81f3\\\\uff1ahttps://github.com/nervjs/taro/issues\\"; + function ensure(condition, msg) { + if (!condition) { + throw new Error(msg + \\"\\\\n\\" + reportIssue); + } + } + function warn(condition, msg) { + if (false) {} + } + function queryToJson(str) { + var dec = decodeURIComponent; + var qp = str.split(\\"&\\"); + var ret = {}; + var name; + var val; + for (var i = 0, l = qp.length, item; i < l; ++i) { + item = qp[i]; + if (item.length) { + var s = item.indexOf(\\"=\\"); + if (s < 0) { + name = dec(item); + val = \\"\\"; + } else { + name = dec(item.slice(0, s)); + val = dec(item.slice(s + 1)); + } + if (typeof ret[name] === \\"string\\") { + ret[name] = [ ret[name] ]; + } + if (Array.isArray(ret[name])) { + ret[name].push(val); + } else { + ret[name] = val; + } + } + } + return ret; + } + var _uniqueId = 1; + var _loadTime = (new Date).getTime().toString(); + function getUniqueKey() { + return _loadTime + _uniqueId++; + } + var cacheData = {}; + function cacheDataSet(key, val) { + cacheData[key] = val; + } + function cacheDataGet(key, delelteAfterGet) { + var temp = cacheData[key]; + delelteAfterGet && delete cacheData[key]; + return temp; + } + function cacheDataHas(key) { + return key in cacheData; + } + function mergeInternalComponents(components) { + Object.keys(components).forEach((function(name) { + if (name in internalComponents) { + Object.assign(internalComponents[name], components[name]); + } else { + internalComponents[name] = components[name]; + } + })); + } + function mergeReconciler(hostConfig) { + Object.assign(defaultReconciler, hostConfig); + } + var weixinAdapter = { + if: \\"wx:if\\", + else: \\"wx:else\\", + elseif: \\"wx:elif\\", + for: \\"wx:for\\", + forItem: \\"wx:for-item\\", + forIndex: \\"wx:for-index\\", + key: \\"wx:key\\", + xs: \\"wxs\\", + type: \\"weapp\\" + }; + var shared_esm_BaseTemplate = function() { + function BaseTemplate() { + var _this = this; + _classCallCheck(this, BaseTemplate); + this.exportExpr = \\"module.exports =\\"; + this.supportXS = false; + this.Adapter = weixinAdapter; + this.internalComponents = internalComponents; + this.focusComponents = focusComponents; + this.voidElements = voidElements; + this.nestElements = nestElements; + this.buildPageTemplate = function(baseTempPath) { + var template = ' \\\\n'); + return template; + }; + this.buildBaseComponentTemplate = function(ext) { + var data = !_this.isSupportRecursive && _this.supportXS ? _this.dataKeymap(\\"i:i,l:l\\") : _this.dataKeymap(\\"i:i\\"); + return ' \\\\n'); + }; + this.buildXScript = function() { + return \\"\\".concat(_this.exportExpr, \\" {\\\\n a: \\").concat(_this.buildXSTmplName(), \\",\\\\n b: function (a, b) {\\\\n return a === undefined ? b : a\\\\n },\\\\n c: function(i, prefix) {\\\\n var s = i.focus !== undefined ? 'focus' : 'blur'\\\\n return prefix + i.\\", \\"nn\\", \\" + '_' + s\\\\n },\\\\n d: function (i, v) {\\\\n return i === undefined ? v : i\\\\n },\\\\n e: function (n) {\\\\n return 'tmpl_' + n + '_\\", \\"container\\", \\"'\\\\n },\\\\n \\").concat(_this.buildXSTmpExtra(), \\"\\\\n}\\"); + }; + } + _createClass(BaseTemplate, [ { + key: \\"buildAttribute\\", + value: function buildAttribute(attrs, nodeName) { + var _this2 = this; + return Object.keys(attrs).map((function(k) { + return \\"\\".concat(k, '=\\"').concat(k.startsWith(\\"bind\\") || k.startsWith(\\"on\\") ? attrs[k] : \\"{\\".concat(_this2.getAttrValue(attrs[k], k, nodeName), \\"}\\"), '\\" '); + })).join(\\"\\"); + } + }, { + key: \\"replacePropName\\", + value: function replacePropName(name, value, _componentName) { + if (value === \\"eh\\") return name.toLowerCase(); + return name; + } + }, { + key: \\"createMiniComponents\\", + value: function createMiniComponents(components) { + var result = Object.create(null); + for (var key in components) { + if (hasOwn(components, key)) { + var component = components[key]; + var compName = toDashed(key); + var newComp = Object.create(null); + if (isFunction(this.modifyCompProps)) { + component = this.modifyCompProps(compName, component); + } + for (var prop in component) { + if (hasOwn(component, prop)) { + var propValue = component[prop]; + if (prop.startsWith(\\"bind\\") || specialEvents.has(prop)) { + propValue = \\"eh\\"; + } else if (propValue === \\"\\") { + propValue = \\"i.\\".concat(toCamelCase(prop)); + } else if (isBooleanStringLiteral(propValue) || isNumber(+propValue)) { + propValue = this.supportXS ? \\"xs.b(i.\\".concat(toCamelCase(prop), \\",\\").concat(propValue, \\")\\") : \\"i.\\".concat(toCamelCase(prop), \\"===undefined?\\").concat(propValue, \\":i.\\").concat(toCamelCase(prop)); + } else { + propValue = \\"i.\\".concat(toCamelCase(prop), \\"||\\").concat(propValue || singleQuote(\\"\\")); + } + prop = this.replacePropName(prop, propValue, compName); + newComp[prop] = propValue; + } + } + if (compName !== \\"block\\") { + Object.assign(newComp, styles, this.getEvents()); + } + if (compName === \\"swiper-item\\") { + delete newComp.style; + } + if (compName === \\"slot\\" || compName === \\"slot-view\\") { + result[compName] = { + slot: \\"i.name\\" + }; + } else { + result[compName] = newComp; + } + } + } + return result; + } + }, { + key: \\"buildBaseTemplate\\", + value: function buildBaseTemplate() { + var Adapter = this.Adapter; + var data = !this.isSupportRecursive && this.supportXS ? \\"\\".concat(this.dataKeymap(\\"i:item,l:''\\")) : this.dataKeymap(\\"i:item\\"); + return \\"\\".concat(this.buildXsTemplate(), '\\\\n\\\\n \\\\n \\\\n \\\\n\\\\n'); + } + }, { + key: \\"buildThirdPartyAttr\\", + value: function buildThirdPartyAttr(attrs) { + return Array.from(attrs).reduce((function(str, attr) { + if (attr.startsWith(\\"@\\")) { + return str + \\"bind\\".concat(attr.slice(1), '=\\"eh\\" '); + } else if (attr.startsWith(\\"bind\\")) { + return str + \\"\\".concat(attr, '=\\"eh\\" '); + } else if (attr.startsWith(\\"on\\")) { + return str + \\"bind\\".concat(attr.slice(2).toLowerCase(), '=\\"eh\\" '); + } + return str + \\"\\".concat(attr, '=\\"{{i.').concat(toCamelCase(attr), '}}\\" '); + }), \\"\\"); + } + }, { + key: \\"buildComponentTemplate\\", + value: function buildComponentTemplate(comp, level) { + return this.focusComponents.has(comp.nodeName) ? this.buildFocusComponentTemplte(comp, level) : this.buildStandardComponentTemplate(comp, level); + } + }, { + key: \\"buildFocusComponentTemplte\\", + value: function buildFocusComponentTemplte(comp, level) { + var attrs = Object.assign({}, comp.attributes); + var templateName = this.supportXS ? \\"xs.c(i, 'tmpl_\\".concat(level, \\"_')\\") : \\"i.focus ? 'tmpl_\\".concat(level, \\"_\\").concat(comp.nodeName, \\"_focus' : 'tmpl_\\").concat(level, \\"_\\").concat(comp.nodeName, \\"_blur'\\"); + delete attrs.focus; + return '\\\\n\\\\n \\\\n\\\\n\\\\n\\\\n <').concat(comp.nodeName, \\" \\").concat(this.buildAttribute(comp.attributes, comp.nodeName), ' id=\\"{{i.uid}}\\" />\\\\n\\\\n\\\\n\\\\n <').concat(comp.nodeName, \\" \\").concat(this.buildAttribute(attrs, comp.nodeName), ' id=\\"{{i.uid}}\\" />\\\\n\\\\n'); + } + }, { + key: \\"buildStandardComponentTemplate\\", + value: function buildStandardComponentTemplate(comp, level) { + var isSupportRecursive = this.isSupportRecursive, Adapter = this.Adapter; + var nextLevel = isSupportRecursive ? 0 : level + 1; + var data = !this.isSupportRecursive ? \\"\\".concat(this.dataKeymap(\\"i:item,l:l\\")) : this.dataKeymap(\\"i:item\\"); + var child = this.supportXS ? '') : ''); + if (isFunction(this.modifyLoopBody)) { + child = this.modifyLoopBody(child, comp.nodeName); + } + var children = this.voidElements.has(comp.nodeName) ? \\"\\" : \\"\\\\n\\\\n ').concat(child, \\"\\\\n \\\\n \\"); + if (isFunction(this.modifyLoopContainer)) { + children = this.modifyLoopContainer(children, comp.nodeName); + } + var nodeName = comp.nodeName === \\"slot\\" || comp.nodeName === \\"slot-view\\" ? \\"view\\" : comp.nodeName; + var res = '\\\\n\\\\n <').concat(nodeName, \\" \\").concat(this.buildAttribute(comp.attributes, comp.nodeName), ' id=\\"{{i.uid}}\\">').concat(children, \\"\\").concat(nodeName, \\">\\\\n\\\\n\\"); + if (isFunction(this.modifyTemplateResult)) { + res = this.modifyTemplateResult(res, comp.nodeName, level, children); + } + return res; + } + }, { + key: \\"buildPlainTextTemplate\\", + value: function buildPlainTextTemplate(level) { + return '\\\\n\\\\n{{i.', \\"v\\", \\"}} \\\\n\\\\n\\"); + } + }, { + key: \\"buildThirdPartyTemplate\\", + value: function buildThirdPartyTemplate(level, componentConfig) { + var _this3 = this; + var Adapter = this.Adapter, isSupportRecursive = this.isSupportRecursive; + var nextLevel = isSupportRecursive ? 0 : level + 1; + var template = \\"\\"; + var data = !this.isSupportRecursive && this.supportXS ? \\"\\".concat(this.dataKeymap(\\"i:item,l:l\\")) : this.dataKeymap(\\"i:item\\"); + componentConfig.thirdPartyComponents.forEach((function(attrs, compName) { + template += '\\\\n\\\\n <').concat(compName, \\" \\").concat(_this3.buildThirdPartyAttr(attrs), ' id=\\"{{i.uid}}\\">\\\\n\\\\n \\\\n \\\\n ').concat(compName, \\">\\\\n\\\\n \\"); + })); + return template; + } + }, { + key: \\"buildContainerTemplate\\", + value: function buildContainerTemplate(level) { + var restart = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; + var tmpl = \\"\\"; + if (restart) { + if (!this.isSupportRecursive && this.supportXS) { + tmpl = ''; + } else { + tmpl = ' '; + } + } else { + var xs = !this.isSupportRecursive ? \\"xs.a(\\".concat(level, \\", i.\\", \\"nn\\", \\", l)\\") : \\"xs.a(\\".concat(level, \\", i.\\", \\"nn\\", \\")\\"); + var data = !this.isSupportRecursive ? \\"\\".concat(this.dataKeymap(\\"i:i,cid:\\".concat(level, \\",l:xs.f(l,i.\\", \\"nn\\", \\")\\"))) : \\"\\".concat(this.dataKeymap(\\"i:i\\")); + tmpl = this.supportXS ? '') : \\"'); + } + return '\\\\n\\\\n ').concat(tmpl, \\"\\\\n\\\\n\\"); + } + }, { + key: \\"dataKeymap\\", + value: function dataKeymap(keymap) { + return keymap; + } + }, { + key: \\"getEvents\\", + value: function getEvents() { + return events; + } + }, { + key: \\"getAttrValue\\", + value: function getAttrValue(value, _key, _nodeName) { + return \\"{\\".concat(value, \\"}\\"); + } + }, { + key: \\"buildXsTemplate\\", + value: function buildXsTemplate() { + return \\"\\"; + } + }, { + key: \\"mergeComponents\\", + value: function mergeComponents(ctx, patch) { + ctx.helper.recursiveMerge(this.internalComponents, patch); + } + }, { + key: \\"buildXSTmplName\\", + value: function buildXSTmplName() { + return \\"function (l, n) {\\\\n return 'tmpl_' + l + '_' + n\\\\n }\\"; + } + }, { + key: \\"buildXSTmpExtra\\", + value: function buildXSTmpExtra() { + return \\"\\"; + } + } ]); + return BaseTemplate; + }(); + var shared_esm_RecursiveTemplate = function(_BaseTemplate) { + _inherits(RecursiveTemplate, _BaseTemplate); + function RecursiveTemplate() { + var _this4; + _classCallCheck(this, RecursiveTemplate); + _this4 = _possibleConstructorReturn(this, _getPrototypeOf(RecursiveTemplate).apply(this, arguments)); + _this4.isSupportRecursive = true; + _this4.buildTemplate = function(componentConfig) { + var template = _this4.buildBaseTemplate(); + if (!_this4.miniComponents) { + _this4.miniComponents = _this4.createMiniComponents(_this4.internalComponents); + } + var ZERO_FLOOR = 0; + var components = Object.keys(_this4.miniComponents).filter((function(c) { + return componentConfig.includes.size && !componentConfig.includeAll ? componentConfig.includes.has(c) : true; + })); + template = components.reduce((function(current, nodeName) { + var attributes = _this4.miniComponents[nodeName]; + return current + _this4.buildComponentTemplate({ + nodeName: nodeName, + attributes: attributes + }, ZERO_FLOOR); + }), template); + template += _this4.buildPlainTextTemplate(ZERO_FLOOR); + template += _this4.buildThirdPartyTemplate(ZERO_FLOOR, componentConfig); + template += _this4.buildContainerTemplate(ZERO_FLOOR); + return template; + }; + return _this4; + } + return RecursiveTemplate; + }(shared_esm_BaseTemplate); + var shared_esm_UnRecursiveTemplate = function(_BaseTemplate2) { + _inherits(UnRecursiveTemplate, _BaseTemplate2); + function UnRecursiveTemplate() { + var _this5; + _classCallCheck(this, UnRecursiveTemplate); + _this5 = _possibleConstructorReturn(this, _getPrototypeOf(UnRecursiveTemplate).apply(this, arguments)); + _this5.isSupportRecursive = false; + _this5._baseLevel = 16; + _this5.buildTemplate = function(componentConfig) { + _this5.componentConfig = componentConfig; + if (!_this5.miniComponents) { + _this5.miniComponents = _this5.createMiniComponents(_this5.internalComponents); + } + var components = Object.keys(_this5.miniComponents).filter((function(c) { + return componentConfig.includes.size && !componentConfig.includeAll ? componentConfig.includes.has(c) : true; + })); + var template = _this5.buildBaseTemplate(); + for (var i = 0; i < _this5.baseLevel; i++) { + template += _this5.supportXS ? _this5.buildOptimizeFloor(i, components, _this5.baseLevel === i + 1) : _this5.buildFloor(i, components, _this5.baseLevel === i + 1); + } + return template; + }; + return _this5; + } + _createClass(UnRecursiveTemplate, [ { + key: \\"buildFloor\\", + value: function buildFloor(level, components) { + var _this6 = this; + var restart = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; + if (restart) return this.buildContainerTemplate(level, restart); + var template = components.reduce((function(current, nodeName) { + var attributes = _this6.miniComponents[nodeName]; + return current + _this6.buildComponentTemplate({ + nodeName: nodeName, + attributes: attributes + }, level); + }), \\"\\"); + template += this.buildPlainTextTemplate(level); + template += this.buildThirdPartyTemplate(level, this.componentConfig); + template += this.buildContainerTemplate(level, restart); + return template; + } + }, { + key: \\"buildOptimizeFloor\\", + value: function buildOptimizeFloor(level, components) { + var _this7 = this; + var restart = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; + if (restart) return this.buildContainerTemplate(level, restart); + var template = components.reduce((function(current, nodeName) { + if (level !== 0) { + if (!_this7.nestElements.has(nodeName)) { + return current; + } else { + var max = _this7.nestElements.get(nodeName); + if (max > 0 && level >= max) { + return current; + } + } + } + var attributes = _this7.miniComponents[nodeName]; + return current + _this7.buildComponentTemplate({ + nodeName: nodeName, + attributes: attributes + }, level); + }), \\"\\"); + if (level === 0) template += this.buildPlainTextTemplate(level); + template += this.buildThirdPartyTemplate(level, this.componentConfig); + template += this.buildContainerTemplate(level); + return template; + } + }, { + key: \\"buildXSTmplName\\", + value: function buildXSTmplName() { + var comps = [].concat(_toConsumableArray(Array.from(this.nestElements.keys())), _toConsumableArray(Array.from(this.componentConfig.thirdPartyComponents.keys()))); + var hasMaxComps = []; + this.nestElements.forEach((function(max, comp) { + if (max > -1) hasMaxComps.push(comp); + })); + return \\"function (l, n, s) {\\\\n var a = \\".concat(JSON.stringify(comps), \\"\\\\n var b = \\").concat(JSON.stringify(hasMaxComps), \\"\\\\n if (a.indexOf(n) === -1) {\\\\n l = 0\\\\n }\\\\n if (b.indexOf(n) > -1) {\\\\n var u = s.split(',')\\\\n var depth = 0\\\\n for (var i = 0; i < u.length; i++) {\\\\n if (u[i] === n) depth++\\\\n }\\\\n l = depth\\\\n }\\\\n return 'tmpl_' + l + '_' + n\\\\n }\\"); + } + }, { + key: \\"buildXSTmpExtra\\", + value: function buildXSTmpExtra() { + var hasMaxComps = []; + this.nestElements.forEach((function(max, comp) { + if (max > -1) hasMaxComps.push(comp); + })); + return \\"f: function (l, n) {\\\\n var b = \\".concat(JSON.stringify(hasMaxComps), \\"\\\\n if (b.indexOf(n) > -1) {\\\\n if (l) l += ','\\\\n l += n\\\\n }\\\\n return l\\\\n }\\"); + } + }, { + key: \\"baseLevel\\", + set: function set(lv) { + this._baseLevel = lv; + }, + get: function get() { + return this._baseLevel; + } + } ]); + return UnRecursiveTemplate; + }(shared_esm_BaseTemplate); + var _onAndSyncApis = new Set([ \\"getAccountInfoSync\\", \\"getEnterOptionsSync\\", \\"offBLEPeripheralConnectionStateChanged\\", \\"offBeaconServiceChange\\", \\"offBeaconUpdate\\", \\"offDeviceMotionChange\\", \\"offHCEMessage\\", \\"offKeyboardHeightChange\\", \\"offLocalServiceDiscoveryStop\\", \\"offLocalServiceFound\\", \\"offLocalServiceLost\\", \\"offLocalServiceResolveFail\\", \\"offLocationChange\\", \\"offThemeChange\\", \\"offVoIPChatInterrupted\\", \\"offVoIPChatMembersChanged\\", \\"offVoIPVideoMembersChanged\\", \\"offWifiConnected\\", \\"offWindowResize\\", \\"onBLEPeripheralConnectionStateChanged\\", \\"onBackgroundAudioPause\\", \\"onBackgroundAudioPlay\\", \\"onBackgroundAudioStop\\", \\"onBackgroundFetchData\\", \\"onHCEMessage\\", \\"onKeyboardHeightChange\\", \\"onLocalServiceDiscoveryStop\\", \\"onLocalServiceFound\\", \\"onLocalServiceLost\\", \\"onLocalServiceResolveFail\\", \\"onLocationChange\\", \\"onThemeChange\\", \\"onVoIPChatInterrupted\\", \\"onVoIPChatMembersChanged\\", \\"onVoIPChatSpeakersChanged\\", \\"onVoIPVideoMembersChanged\\", \\"onWifiConnected\\", \\"onWindowResize\\", \\"reportMonitor\\" ]); + var _noPromiseApis = new Set([ \\"createAudioContext\\", \\"createLivePusherContext\\", \\"createMediaContainer\\", \\"createMediaRecorder\\", \\"createOffscreenCanvas\\", \\"createRewardedVideoAd\\", \\"createUDPSocket\\", \\"createVideoDecoder\\", \\"createWorker\\", \\"getLogManager\\", \\"getNFCAdapter\\", \\"getPerformance\\", \\"getRealtimeLogManager\\", \\"pauseBackgroundAudio\\", \\"pauseVoice\\", \\"reportPerformance\\", \\"stopBackgroundAudio\\", \\"stopRecord\\", \\"stopVoice\\" ]); + var _otherApis = new Set([ \\"addCard\\", \\"authPrivateMessage\\", \\"checkIsOpenAccessibility\\", \\"checkIsSoterEnrolledInDevice\\", \\"checkIsSupportSoterAuthentication\\", \\"chooseInvoice\\", \\"chooseMedia\\", \\"chooseMessageFile\\", \\"compressVideo\\", \\"connectWifi\\", \\"createBLEPeripheralServer\\", \\"disableAlertBeforeUnload\\", \\"enableAlertBeforeUnload\\", \\"exitVoIPChat\\", \\"getBLEDeviceRSSI\\", \\"getBackgroundAudioPlayerState\\", \\"getBackgroundFetchData\\", \\"getBackgroundFetchToken\\", \\"getGroupEnterInfo\\", \\"getHCEState\\", \\"getSelectedTextRange\\", \\"getShareInfo\\", \\"getVideoInfo\\", \\"getWeRunData\\", \\"join1v1Chat\\", \\"joinVoIPChat\\", \\"makeBluetoothPair\\", \\"openCard\\", \\"openVideoEditor\\", \\"playBackgroundAudio\\", \\"playVoice\\", \\"previewMedia\\", \\"requestPayment\\", \\"saveFileToDisk\\", \\"scanItem\\", \\"seekBackgroundAudio\\", \\"sendHCEMessage\\", \\"setBLEMTU\\", \\"setBackgroundFetchToken\\", \\"setEnable1v1Chat\\", \\"setTopBarText\\", \\"setWifiList\\", \\"setWindowSize\\", \\"showRedPackage\\", \\"startGyroscope\\", \\"startHCE\\", \\"startLocalServiceDiscovery\\", \\"startLocationUpdate\\", \\"startLocationUpdateBackground\\", \\"startRecord\\", \\"startSoterAuthentication\\", \\"startWifi\\", \\"stopGyroscope\\", \\"stopHCE\\", \\"stopLocalServiceDiscovery\\", \\"stopLocationUpdate\\", \\"stopWifi\\", \\"subscribeVoIPVideoMembers\\", \\"updateShareMenu\\", \\"updateVoIPChatMuteConfig\\", \\"updateWeChatApp\\" ]); + var RequestQueue = { + MAX_REQUEST: 5, + queue: [], + request: function request(options) { + this.push(options); + return this.run(); + }, + push: function push(options) { + this.queue.push(options); + }, + run: function run() { + var _this = this; + if (!this.queue.length) { + return; + } + if (this.queue.length <= this.MAX_REQUEST) { + var options = this.queue.shift(); + var completeFn = options.complete; + options.complete = function() { + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + completeFn && completeFn.apply(options, args); + _this.run(); + }; + return wx.request(options); + } + } + }; + function taroInterceptor(chain) { + return request(chain.requestParams); + } + function request(options) { + options = options || {}; + if (typeof options === \\"string\\") { + options = { + url: options + }; + } + var originSuccess = options.success; + var originFail = options.fail; + var originComplete = options.complete; + var requestTask; + var p = new Promise((function(resolve, reject) { + options.success = function(res) { + originSuccess && originSuccess(res); + resolve(res); + }; + options.fail = function(res) { + originFail && originFail(res); + reject(res); + }; + options.complete = function(res) { + originComplete && originComplete(res); + }; + requestTask = RequestQueue.request(options); + })); + p.abort = function(cb) { + cb && cb(); + if (requestTask) { + requestTask.abort(); + } + return p; + }; + return p; + } + function processApis(taro) { + var onAndSyncApis = new Set([].concat(_toConsumableArray(taro.onAndSyncApis), _toConsumableArray(_onAndSyncApis))); + var noPromiseApis = new Set([].concat(_toConsumableArray(taro.noPromiseApis), _toConsumableArray(_noPromiseApis))); + var otherApis = new Set([].concat(_toConsumableArray(taro.otherApis), _toConsumableArray(_otherApis))); + var apis = [].concat(_toConsumableArray(onAndSyncApis), _toConsumableArray(noPromiseApis), _toConsumableArray(otherApis)); + var useDataCacheApis = { + navigateTo: true, + redirectTo: true, + reLaunch: true + }; + var routerParamsPrivateKey = \\"__key_\\"; + var preloadPrivateKey = \\"__preload_\\"; + var preloadInitedComponent = \\"$preloadComponent\\"; + apis.forEach((function(key) { + if (!(key in wx)) { + taro[key] = function() { + console.warn(\\"\\\\u5fae\\\\u4fe1\\\\u5c0f\\\\u7a0b\\\\u5e8f\\\\u6682\\\\u4e0d\\\\u652f\\\\u6301 \\".concat(key)); + }; + return; + } + if (otherApis.has(key)) { + taro[key] = function(options) { + for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) { + args[_key2 - 1] = arguments[_key2]; + } + options = options || {}; + var task = null; + var obj = Object.assign({}, options); + if (typeof options === \\"string\\") { + if (args.length) { + var _wx; + return (_wx = wx)[key].apply(_wx, [ options ].concat(args)); + } + return wx[key](options); + } + if (key === \\"navigateTo\\" || key === \\"redirectTo\\" || key === \\"switchTab\\") { + var url = obj.url ? obj.url.replace(/^\\\\//, \\"\\") : \\"\\"; + if (url.indexOf(\\"?\\") > -1) url = url.split(\\"?\\")[0]; + var Component = cacheDataGet(url); + if (Component) { + var component = new Component; + if (component.componentWillPreload) { + var cacheKey = getUniqueKey(); + var MarkIndex = obj.url.indexOf(\\"?\\"); + var hasMark = MarkIndex > -1; + var urlQueryStr = hasMark ? obj.url.substring(MarkIndex + 1, obj.url.length) : \\"\\"; + var params = queryToJson(urlQueryStr); + obj.url += (hasMark ? \\"&\\" : \\"?\\") + \\"\\".concat(preloadPrivateKey, \\"=\\").concat(cacheKey); + cacheDataSet(cacheKey, component.componentWillPreload(params)); + cacheDataSet(preloadInitedComponent, component); + } + } + } + if (useDataCacheApis[key]) { + var _url = obj.url = obj.url || \\"\\"; + var _MarkIndex = _url.indexOf(\\"?\\"); + var _hasMark = _MarkIndex > -1; + var _urlQueryStr = _hasMark ? _url.substring(_MarkIndex + 1, _url.length) : \\"\\"; + var _params = queryToJson(_urlQueryStr); + var _cacheKey = getUniqueKey(); + obj.url += (_hasMark ? \\"&\\" : \\"?\\") + \\"\\".concat(routerParamsPrivateKey, \\"=\\").concat(_cacheKey); + cacheDataSet(_cacheKey, _params); + } + var p = new Promise((function(resolve, reject) { + [ \\"fail\\", \\"success\\", \\"complete\\" ].forEach((function(k) { + obj[k] = function(res) { + options[k] && options[k](res); + if (k === \\"success\\") { + if (key === \\"connectSocket\\") { + resolve(Promise.resolve().then((function() { + return Object.assign(task, res); + }))); + } else { + resolve(res); + } + } else if (k === \\"fail\\") { + reject(res); + } + }; + })); + if (args.length) { + var _wx2; + task = (_wx2 = wx)[key].apply(_wx2, [ obj ].concat(args)); + } else { + task = wx[key](obj); + } + })); + if (key === \\"uploadFile\\" || key === \\"downloadFile\\") { + p.progress = function(cb) { + if (task) { + task.onProgressUpdate(cb); + } + return p; + }; + p.abort = function(cb) { + cb && cb(); + if (task) { + task.abort(); + } + return p; + }; + } + return p; + }; + } else { + taro[key] = function() { + for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) { + args[_key3] = arguments[_key3]; + } + var argsLen = args.length; + var newArgs = args.concat(); + var lastArg = newArgs[argsLen - 1]; + if (lastArg && lastArg.isTaroComponent && lastArg.$scope) { + newArgs.splice(argsLen - 1, 1, lastArg.$scope); + } + return wx[key].apply(wx, newArgs); + }; + } + })); + } + function pxTransform(size) { + var _ref = this.config || {}, _ref$designWidth = _ref.designWidth, designWidth = _ref$designWidth === void 0 ? 750 : _ref$designWidth, _ref$deviceRatio = _ref.deviceRatio, deviceRatio = _ref$deviceRatio === void 0 ? { + 640: 2.34 / 2, + 750: 1, + 828: 1.81 / 2 + } : _ref$deviceRatio; + if (!(designWidth in deviceRatio)) { + throw new Error(\\"deviceRatio \\\\u914d\\\\u7f6e\\\\u4e2d\\\\u4e0d\\\\u5b58\\\\u5728 \\".concat(designWidth, \\" \\\\u7684\\\\u8bbe\\\\u7f6e\\\\uff01\\")); + } + return parseInt(size, 10) * deviceRatio[designWidth] + \\"rpx\\"; + } + function canIUseWebp() { + var _wx$getSystemInfoSync = wx.getSystemInfoSync(), platform = _wx$getSystemInfoSync.platform; + var platformLower = platform.toLowerCase(); + if (platformLower === \\"android\\" || platformLower === \\"devtools\\") { + return true; + } + return false; + } + function wxCloud(taro) { + var wxC = wx.cloud || {}; + var wxcloud = {}; + var apiList = [ \\"init\\", \\"database\\", \\"uploadFile\\", \\"downloadFile\\", \\"getTempFileURL\\", \\"deleteFile\\", \\"callFunction\\", \\"CloudID\\" ]; + apiList.forEach((function(v) { + wxcloud[v] = wxC[v]; + })); + taro.cloud = wxcloud; + } + function initNativeApi(taro) { + processApis(taro); + var link = new taro.Link(taroInterceptor); + taro.request = link.request.bind(link); + taro.addInterceptor = link.addInterceptor.bind(link); + taro.cleanInterceptors = link.cleanInterceptors.bind(link); + taro.getCurrentPages = getCurrentPages; + taro.getApp = getApp; + taro.requirePlugin = requirePlugin; + taro.initPxTransform = taro.initPxTransform.bind(taro); + taro.pxTransform = pxTransform.bind(taro); + taro.canIUseWebp = canIUseWebp; + taro.env = wx.env; + wxCloud(taro); + } + var components = { + Progress: { + \\"border-radius\\": \\"0\\", + \\"font-size\\": \\"16\\", + duration: \\"30\\", + bindActiveEnd: \\"\\" + }, + RichText: { + space: \\"\\" + }, + Text: { + \\"user-select\\": \\"false\\" + }, + Map: { + polygons: \\"[]\\", + subkey: \\"\\", + rotate: \\"0\\", + skew: \\"0\\", + \\"enable-3D\\": \\"false\\", + \\"show-compass\\": \\"false\\", + \\"show-scale\\": \\"false\\", + \\"enable-overlooking\\": \\"false\\", + \\"enable-zoom\\": \\"true\\", + \\"enable-scroll\\": \\"true\\", + \\"enable-rotate\\": \\"false\\", + \\"enable-satellite\\": \\"false\\", + \\"enable-traffic\\": \\"false\\", + setting: \\"[]\\", + bindLabelTap: \\"\\", + bindRegionChange: \\"\\", + bindPoiTap: \\"\\" + }, + Button: { + lang: \\"en\\", + \\"session-from\\": \\"\\", + \\"send-message-title\\": \\"\\", + \\"send-message-path\\": \\"\\", + \\"send-message-img\\": \\"\\", + \\"app-parameter\\": \\"\\", + \\"show-message-card\\": \\"false\\", + bindGetUserInfo: \\"\\", + bindContact: \\"\\", + bindGetPhoneNumber: \\"\\", + bindError: \\"\\", + bindOpenSetting: \\"\\", + bindLaunchApp: \\"\\" + }, + Form: { + \\"report-submit-timeout\\": \\"0\\" + }, + Input: { + \\"auto-focus\\": \\"false\\", + \\"always-embed\\": \\"false\\", + \\"adjust-position\\": \\"true\\", + \\"hold-keyboard\\": \\"false\\", + bindKeyboardHeightChange: \\"\\" + }, + Picker: { + \\"header-text\\": \\"\\" + }, + PickerView: { + bindPickStart: \\"\\", + bindPickEnd: \\"\\" + }, + Slider: { + color: singleQuote(\\"#e9e9e9\\"), + \\"selected-color\\": singleQuote(\\"#1aad19\\") + }, + Textarea: { + \\"show-confirm-bar\\": \\"true\\", + \\"adjust-position\\": \\"true\\", + \\"hold-keyboard\\": \\"false\\", + \\"disable-default-padding\\": \\"false\\", + bindKeyboardHeightChange: \\"\\" + }, + ScrollView: { + \\"enable-flex\\": \\"false\\", + \\"scroll-anchoring\\": \\"false\\", + \\"refresher-enabled\\": \\"false\\", + \\"refresher-threshold\\": \\"45\\", + \\"refresher-default-style\\": singleQuote(\\"black\\"), + \\"refresher-background\\": singleQuote(\\"#FFF\\"), + \\"refresher-triggered\\": \\"false\\", + enhanced: \\"false\\", + bounces: \\"true\\", + \\"show-scrollbar\\": \\"true\\", + \\"paging-enabled\\": \\"false\\", + \\"fast-deceleration\\": \\"false\\", + bindDragStart: \\"\\", + bindDragging: \\"\\", + bindDragEnd: \\"\\", + bindRefresherPulling: \\"\\", + bindRefresherRefresh: \\"\\", + bindRefresherRestore: \\"\\", + bindRefresherAbort: \\"\\" + }, + Swiper: { + \\"snap-to-edge\\": \\"false\\", + \\"easing-function\\": singleQuote(\\"default\\") + }, + SwiperItem: { + \\"skip-hidden-item-layout\\": \\"false\\" + }, + Navigator: { + target: singleQuote(\\"self\\"), + \\"app-id\\": \\"\\", + path: \\"\\", + \\"extra-data\\": \\"\\", + version: singleQuote(\\"version\\") + }, + Camera: { + mode: singleQuote(\\"normal\\"), + resolution: singleQuote(\\"medium\\"), + \\"frame-size\\": singleQuote(\\"medium\\"), + bindInitDone: \\"\\", + bindScanCode: \\"\\" + }, + Image: { + webp: \\"false\\", + \\"show-menu-by-longpress\\": \\"false\\" + }, + LivePlayer: { + mode: singleQuote(\\"live\\"), + \\"sound-mode\\": singleQuote(\\"speaker\\"), + \\"auto-pause-if-navigate\\": \\"true\\", + \\"auto-pause-if-open-native\\": \\"true\\", + \\"picture-in-picture-mode\\": \\"[]\\", + bindAudioVolumeNotify: \\"\\", + bindEnterPictureInPicture: \\"\\", + bindLeavePictureInPicture: \\"\\" + }, + Video: { + title: \\"\\", + \\"play-btn-position\\": singleQuote(\\"bottom\\"), + \\"enable-play-gesture\\": \\"false\\", + \\"auto-pause-if-navigate\\": \\"true\\", + \\"auto-pause-if-open-native\\": \\"true\\", + \\"vslide-gesture\\": \\"false\\", + \\"vslide-gesture-in-fullscreen\\": \\"true\\", + \\"ad-unit-id\\": \\"\\", + \\"poster-for-crawler\\": \\"\\", + \\"show-casting-button\\": \\"false\\", + \\"picture-in-picture-mode\\": \\"[]\\", + \\"enable-auto-rotation\\": \\"false\\", + \\"show-screen-lock-button\\": \\"false\\", + bindProgress: \\"\\", + bindLoadedMetadata: \\"\\", + bindControlsToggle: \\"\\", + bindEnterPictureInPicture: \\"\\", + bindLeavePictureInPicture: \\"\\", + bindSeekComplete: \\"\\" + }, + Canvas: { + type: \\"\\" + }, + Ad: { + \\"ad-type\\": singleQuote(\\"banner\\"), + \\"ad-theme\\": singleQuote(\\"white\\") + }, + Editor: { + \\"read-only\\": \\"false\\", + placeholder: \\"\\", + \\"show-img-size\\": \\"false\\", + \\"show-img-toolbar\\": \\"false\\", + \\"show-img-resize\\": \\"false\\", + focus: \\"false\\", + bindReady: \\"\\", + bindFocus: \\"\\", + bindBlur: \\"\\", + bindInput: \\"\\", + bindStatusChange: \\"\\", + name: \\"\\" + }, + MatchMedia: { + \\"min-width\\": \\"\\", + \\"max-width\\": \\"\\", + width: \\"\\", + \\"min-height\\": \\"\\", + \\"max-height\\": \\"\\", + height: \\"\\", + orientation: \\"\\" + }, + FunctionalPageNavigator: { + version: singleQuote(\\"release\\"), + name: \\"\\", + args: \\"\\", + bindSuccess: \\"\\", + bindFail: \\"\\", + bindCancel: \\"\\" + }, + LivePusher: { + url: \\"\\", + mode: singleQuote(\\"RTC\\"), + autopush: \\"false\\", + muted: \\"false\\", + \\"enable-camera\\": \\"true\\", + \\"auto-focus\\": \\"true\\", + orientation: singleQuote(\\"vertical\\"), + beauty: \\"0\\", + whiteness: \\"0\\", + aspect: singleQuote(\\"9:16\\"), + \\"min-bitrate\\": \\"200\\", + \\"max-bitrate\\": \\"1000\\", + \\"audio-quality\\": singleQuote(\\"high\\"), + \\"waiting-image\\": \\"\\", + \\"waiting-image-hash\\": \\"\\", + zoom: \\"false\\", + \\"device-position\\": singleQuote(\\"front\\"), + \\"background-mute\\": \\"false\\", + mirror: \\"false\\", + \\"remote-mirror\\": \\"false\\", + \\"local-mirror\\": \\"false\\", + \\"audio-reverb-type\\": \\"0\\", + \\"enable-mic\\": \\"true\\", + \\"enable-agc\\": \\"false\\", + \\"enable-ans\\": \\"false\\", + \\"audio-volume-type\\": singleQuote(\\"voicecall\\"), + \\"video-width\\": \\"360\\", + \\"video-height\\": \\"640\\", + animation: \\"\\", + bindStateChange: \\"\\", + bindNetStatus: \\"\\", + bindBgmStart: \\"\\", + bindBgmProgress: \\"\\", + bindBgmComplete: \\"\\" + }, + OfficialAccount: { + bindLoad: \\"\\", + bindError: \\"\\" + }, + OpenData: { + type: \\"\\", + \\"open-gid\\": \\"\\", + lang: singleQuote(\\"en\\"), + \\"default-text\\": \\"\\", + \\"default-avatar\\": \\"\\", + bindError: \\"\\" + }, + NavigationBar: { + title: \\"\\", + loading: \\"false\\", + \\"front-color\\": \\"\\", + \\"background-color\\": \\"\\", + \\"color-animation-duration\\": \\"0\\", + \\"color-animation-timing-func\\": singleQuote(\\"linear\\") + }, + PageMeta: { + \\"background-text-style\\": \\"\\", + \\"background-color\\": \\"\\", + \\"background-color-top\\": \\"\\", + \\"background-color-bottom\\": \\"\\", + \\"scroll-top\\": singleQuote(\\"\\"), + \\"scroll-duration\\": \\"300\\", + \\"page-style\\": singleQuote(\\"\\"), + \\"root-font-size\\": singleQuote(\\"\\"), + bindResize: \\"\\", + bindScroll: \\"\\", + bindScrollDone: \\"\\" + }, + VoipRoom: { + openid: \\"\\", + mode: singleQuote(\\"camera\\"), + \\"device-position\\": singleQuote(\\"front\\"), + bindError: \\"\\" + }, + AdCustom: { + \\"unit-id\\": \\"\\", + \\"ad-intervals\\": \\"\\", + bindLoad: \\"\\", + bindError: \\"\\" + } + }; + var hostConfig = { + initNativeApi: initNativeApi, + onTaroElementCreate: function onTaroElementCreate(tagName) { + warn(tagName === \\"MAP\\", \\"\\\\u5fae\\\\u4fe1\\\\u5c0f\\\\u7a0b\\\\u5e8f map \\\\u7ec4\\\\u4ef6\\\\u7684 \`setting\` \\\\u5c5e\\\\u6027\\\\u9700\\\\u8981\\\\u4f20\\\\u9012\\\\u4e00\\\\u4e2a\\\\u9ed8\\\\u8ba4\\\\u503c\\\\u3002\\\\u8be6\\\\u60c5\\\\uff1a\\\\n https://developers.weixin.qq.com/miniprogram/dev/component/map.html\\"); + } + }; + mergeReconciler(hostConfig); + mergeInternalComponents(components); + var taro_runtime = __webpack_require__(2); + var classCallCheck = __webpack_require__(3); + var createClass = __webpack_require__(4); + var possibleConstructorReturn = __webpack_require__(6); + var getPrototypeOf = __webpack_require__(5); + var inherits = __webpack_require__(7); + var react = __webpack_require__(0); + var app = __webpack_require__(13); + var app_App = function(_Component) { + Object(inherits[\\"a\\"])(App, _Component); + function App() { + Object(classCallCheck[\\"a\\"])(this, App); + return Object(possibleConstructorReturn[\\"a\\"])(this, Object(getPrototypeOf[\\"a\\"])(App).apply(this, arguments)); + } + Object(createClass[\\"a\\"])(App, [ { + key: \\"componentDidMount\\", + value: function componentDidMount() {} + }, { + key: \\"componentDidShow\\", + value: function componentDidShow() {} + }, { + key: \\"componentDidHide\\", + value: function componentDidHide() {} + }, { + key: \\"componentDidCatchError\\", + value: function componentDidCatchError() {} + }, { + key: \\"render\\", + value: function render() { + return this.props.children; + } + } ]); + return App; + }(react[\\"Component\\"]); + var lib_src_app = app_App; + var taro_react = __webpack_require__(8); + var config = { + pages: [ \\"pages/index/index\\", \\"pages/detail/index\\" ], + window: { + backgroundTextStyle: \\"light\\", + navigationBarBackgroundColor: \\"#fff\\", + navigationBarTitleText: \\"WeChat\\", + navigationBarTextStyle: \\"black\\" + }, + tabBar: { + custom: true, + color: \\"#000000\\", + selectedColor: \\"#000000\\", + backgroundColor: \\"#000000\\", + list: [ { + pagePath: \\"pages/index/index\\", + text: \\"\\\\u9996\\\\u9875\\", + iconPath: \\"assets/view.png\\", + selectedIconPath: \\"assets/view_red.png\\" + }, { + pagePath: \\"pages/detail/index\\", + text: \\"\\\\u8be6\\\\u60c5\\\\u9875\\", + iconPath: \\"assets/nav.png\\", + selectedIconPath: \\"assets/nav_red.png\\" + } ] + }, + usingComponents: {} + }; + taro_runtime[\\"window\\"].__taroAppConfig = config; + var inst = App(Object(taro_runtime[\\"createReactApp\\"])(lib_src_app, react, taro_react[\\"a\\"], config)); + } +}, [ [ 16, 0, 1, 3, 2 ] ] ]); + + + +/** filePath: dist/app.json **/ +{\\"pages\\":[\\"pages/index/index\\",\\"pages/detail/index\\"],\\"window\\":{\\"backgroundTextStyle\\":\\"light\\",\\"navigationBarBackgroundColor\\":\\"#fff\\",\\"navigationBarTitleText\\":\\"WeChat\\",\\"navigationBarTextStyle\\":\\"black\\"},\\"tabBar\\":{\\"custom\\":true,\\"color\\":\\"#000000\\",\\"selectedColor\\":\\"#000000\\",\\"backgroundColor\\":\\"#000000\\",\\"list\\":[{\\"pagePath\\":\\"pages/index/index\\",\\"text\\":\\"首页\\",\\"iconPath\\":\\"assets/view.png\\",\\"selectedIconPath\\":\\"assets/view_red.png\\"},{\\"pagePath\\":\\"pages/detail/index\\",\\"text\\":\\"详情页\\",\\"iconPath\\":\\"assets/nav.png\\",\\"selectedIconPath\\":\\"assets/nav_red.png\\"}]},\\"usingComponents\\":{}} + +/** filePath: dist/app.wxss **/ + + +/** filePath: dist/assets/nav.png **/ +�PNG + + +IHDR D D 8�� sRGB ��� �IDATx�Mh\\\\U�;��1 5��-j�u�)���� +m0PтR�U �B�BA\\\\��B +�V\\\\4����RJ�*��bh>��$�.�IM AG!1�$��ӹaxsߛ�+�<8����?����wsow��#\`��0F�#\`��0F�#\`��0F�#���=̌�������}��0�����;�]�?0555�05�����'fff���&�B1~��rss�������մ���FBs��wҟî&�OFFF~�T�\\"�����777 �+Ơ_c�NNN���|�|icc���/��FUU��7C�e�����;eA�q9��R�[_����k��#�����o�������&�}�U��1:::�R�g�i��R�huuuJ��|�I#�r*=�8��c����9cW�'��)�^�\\":;;���g)����5>��s|=94Ϣ9�f � ��I�?�>[WW�V.���T��d�\\\\YY��4���|��-r��� ��+�L@�>���,�����#��{��ߌ��}0������O{���;�~����r ��K�8��<��FZ���hL��8m��bZ�ւf��&�� B�J���D盞����7����;��ע둟�Y��O#�bҨ�r��=�1���\\\\|�skqks��6�& �w7J|}����S�y������l��5K4�o�N7fŚ%kq9ee�e�����p�������_ +9ہ����t+�,�r�Km{ܘk����lq�P l�$���wb_���hu��'��1����}�>5�q��r�\`��4ƽ���������֭ŭͧ ���S~�����%��ES8ji?^�霏?z��ey���zNG����x잓FZ帘�[1��ɧ+���,hm>�|��)^���\\\\nh�r$^_]]��Wx?�50�5n��-i�]�t�A��Y�c�DŽr���p +��k^�������E=�c�Ts���kQ͟jkk�^�������y��9�� D��>6W�*-:ꙛ�����t�#+���V��O��$�����[%X��K===_-..�?���[�~�Τ����lv1���9\`C�T�j4�}�6���.�M����OGհ�0F�#\`��0F�#\`��0F�#\`��0F�%� A�LEEK\` IEND�B\`� + +/** filePath: dist/assets/nav_red.png **/ +�PNG + + +IHDR D D 8�� tEXtSoftware Adobe ImageReadyq�e<