New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

miniapp-framework

Package Overview
Dependencies
Maintainers
2
Versions
123
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

miniapp-framework - npm Package Compare versions

Comparing version 0.1.11 to 0.1.12

2

dist/native/renderer.js

@@ -1,1 +0,1 @@

/*! miniapp framework version: 0.1.11 bulid time: Thu Sep 20 2018 00:52:09 GMT+0800 (CST) */!function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(o,r,function(t){return e[t]}.bind(null,r));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=135)}({1:function(e,t,n){"use strict";n.d(t,"c",function(){return a}),n.d(t,"a",function(){return c}),n.d(t,"d",function(){return s}),n.d(t,"b",function(){return u});var o=n(6),r={all:-1,debug:0,log:1,info:1,warn:2,error:3,none:4},i="error";try{Object(o.a)().__set_log_level__=function(e){i=e}}catch(e){s("mount __set_log_level__ at global object err",e)}function a(){if(r[i]<=r.log){for(var e,t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];(e=console).log.apply(e,["[Log]"].concat(n))}}function c(){if(r[i]<=r.debug){for(var e,t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];(e=console).log.apply(e,["[Debug]"].concat(n))}}function s(){if(r[i]<=r.warn){for(var e,t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];(e=console).log.apply(e,["[WARN]"].concat(n))}}function u(){if(r[i]<=r.error){for(var e,t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];(e=console).log.apply(e,["[ERROR]"].concat(n))}}},10:function(module,__webpack_exports__,__webpack_require__){"use strict";function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function retrocycle($){var px=/^\$(?:\[(?:\d+|"(?:[^\\"\u0000-\u001f]|\\(?:[\\"\/bfnrt]|u[0-9a-zA-Z]{4}))*")\])*$/;return function rez(value){value&&"object"===_typeof(value)&&(Array.isArray(value)?value.forEach(function(element,i){if("object"===_typeof(element)&&null!==element){var path=element.$ref;"string"==typeof path&&px.test(path)?value[i]=eval(path):rez(element)}}):Object.keys(value).forEach(function(name){var item=value[name];if("object"===_typeof(item)&&null!==item){var path=item.$ref;"string"==typeof path&&px.test(path)?value[name]=eval(path):rez(item)}}))}($),$}__webpack_require__.d(__webpack_exports__,"a",function(){return retrocycle})},11:function(e,t,n){"use strict";function o(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function r(e,t,n){return t&&o(e.prototype,t),n&&o(e,n),e}var i,a,c=0,s=[],u=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.current=[],this.elements=t,this.options={container:window,wait:100,x:0,y:0,cls:"appear",once:!1,onReset:function(){},onAppear:function(){},onDisappear:function(){}},this.container=null,this.appearWatchElements=null,this.initConfig.apply(this,arguments)}return r(e,null,[{key:"createEvent",value:function(){i=document.createEvent("HTMLEvents"),a=document.createEvent("HTMLEvents"),i.initEvent("appear",!1,!0),a.initEvent("disappear",!1,!0)}}]),r(e,[{key:"initConfig",value:function(e){this.extend(this.options,e||(e={})),this.appearWatchElements=this.appearWatchElements||this.getElements(),this.bindEvent()}},{key:"extend",value:function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}},{key:"inViewport",value:function(e,t,n){var o=e.getBoundingClientRect(),r=o.top,i=o.right,a=o.bottom,s=o.left;return s=t.right>s&&t.left<i,r=t.bottom>r-c&&t.top<a,s&&r}},{key:"getElements",value:function(e){var t,n=this.options.container;return this.container=n,t=s||[],t=[].slice.call(t,null)}},{key:"check",value:function(e){var t=this;l(function(){t.calculate(e)})}},{key:"calculate",value:function(e){var t=this,n=this.container,o=e||this.getElements(),r=p(window,{x:this.options.x,y:this.options.y}),c=this.options.once;arguments[0];n&&o&&o.length>0&&[].forEach.call(o,function(e,n){if(e){if(e.isOnce&&e._hasAppear)return s.splice(n,1),void o.splice(n,1);t.checkEveryDom(e,r,c,i,a,"normal",n)}})}},{key:"checkEveryDom",value:function(e,t,n,o,r,i,a){var c=p(e),s=this.getDirection(e._eleOffset,c),u=this.inViewport(e,t,i),l=e._appear,f=e._hasAppear,d=e._hasDisAppear;e._eleOffset=c,o.direction=s,r.direction=s,u&&!l?(n&&!f||!n)&&(e.dispatchEvent(o),e._hasAppear=!0,e._appear=!0):!u&&l&&(n&&!d||!n)&&(e.dispatchEvent(r),e._hasDisAppear=!0,e._appear=!1)}},{key:"reset",value:function(e){return this.initConfig(e),this.appearWatchElements.forEach(function(e){delete e._hasAppear,delete e._hasDisAppear,delete e._appear}),this}},{key:"bindEvent",value:function(){var e=this,t=function(e,t){var n,o,r,i=null,a=0,c=function(){a=Date.now(),i=null,r=e.apply(n,o)};return function(){var s=Date.now(),u=t-(s-a);return n=this,o=arguments,u<=0?(clearTimeout(i),i=null,a=s,r=e.apply(n,o)):i||(i=setTimeout(c,u)),r}}(function(){e.check()},this.options.wait);this.__handle&&(this.container.removeEventListener("scroll",this.__handle,!1,!0),this.__handle=null),this.__handle=t,this.container.addEventListener("scroll",t,!1,!0)}},{key:"getDirection",value:function(e,t){var n="none",o=e.left-t.left,r=e.top-t.top;return 0==r&&(n=0!=o?o>0?"left":"right":"none"),0==o&&(n=0!=r?r>0?"up":"down":"none"),n}}]),e}(),l=window.requestAnimationFrame||window.webkitRequestAnimationFrame||function(e){setTimeout(e,1/60*1e3)};function f(e){e.offsetTop&&"number"==typeof e.offsetTop&&(c=e.offsetTop)}function p(e,t){var n,o,r,i;if(e){if(t||(t={x:0,y:0}),e===window)i=0,o=(n=0)+e.innerWidth,r=i+e.innerHeight;else if(null===e.parentNode)n=0,i=0,o=0,r=0;else{var a=e.getBoundingClientRect(),c=a.top,s=a.right,u=a.bottom;n=a.left,i=c,o=s,r=u}return{left:n,top:i,right:o+t.x,bottom:r+t.y}}}var d,v,h,y=u,m={root:null,rootMargin:"0px",threshold:0};function g(e){e.forEach(function(e){var t=e.target;e.boundingClientRect;e.intersectionRatio>0?(t.dataset.appeared=!0,t.dispatchEvent(d)):t.dataset.appeared&&(t.dataset.appeared=!1,t.dispatchEvent(v))})}function b(){d=document.createEvent("HTMLEvents"),v=document.createEvent("HTMLEvents"),d.initEvent("appear",!1,!0),v.initEvent("disappear",!1,!0),h=new IntersectionObserver(g,m)}var w=null,_="function"==typeof IntersectionObserver,E=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0,n=t.prototype.addEventListener,o=t.prototype.removeEventListener;t.prototype.addEventListener=function(t,o,r,i){var a=t&&String(t).toLowerCase(),c="appear"===a||"disappear"===a;c&&(_?function(e){e===document&&(e=document.documentElement),h.observe(e)}(this):function(e){if(-1===s.indexOf(e)&&!e.appended){var t=Boolean(e.getAttribute("isonce"))||Boolean(e.getAttribute("data-once"));e.isOnce=t,e.appended=!0,s.push(e),e._eleOffset=p(e)}}(this)),_||(w&&c&&w.check([this]),"scroll"!==a||i||(w=new y({container:this}),e.push(w))),n.call(this,t,o,r)},t.prototype.removeEventListener=function(t,n,r,i){var a=this,c=t&&String(t).toLowerCase();_||"scroll"!==c||i||e.forEach(function(t,n){t.__handle&&t.container===a&&(a.removeEventListener("scroll",t.__handle,!1,!0),t.__handle=null,t.appearWatchElements=[],t.container=null,e.splice(n,1))}),o.call(this,t,n,r)}};t.a=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window;if(!_){var t=[];return y.createEvent(),E(t,e.Node),w=new y({container:e}),t.push(w),{config:f}}b(),E([],e.Node)}},135:function(e,t,n){"use strict";n.r(t);var o=n(39),r=n.n(o),i=n(9),a=n.n(i);function c(e){var t=location.href,n=new RegExp("".concat(e,"=([^&]+)")).exec(t);return n?decodeURIComponent(n[1]):"$unknown"}var s=n(40),u=n.n(s);n(1);var l=n(7),f=n.n(l),p=n(10),d="https://g.alicdn.com/miniapp/miniapp-console/rax-console.js?r="+Date.now(),v=null;var h=[],y=["info","log","error","debug","warn"];function m(e){var t=(e||{}).payload,n=void 0===t?{}:t;"switch"!==n.type?v&&v.instance?-1!==y.indexOf(n.type)&&v&&v.instance&&v.instance.addMessage({source:"console-api",type:"log",level:n.type,parameters:n.args.map(function(e){return Object(p.a)(e)})}):h.push(e):!0===n.value?function(){if(v)return f.a.resolve(v);var e=document.createElement("script");return new f.a(function(t,n){e.onload=function(){v={load:window.RaxConsole.default,unload:window.RaxConsole.unload},t(v)},e.charset="utf-8",e.onerror=n,e.src=d,document.head.appendChild(e)})}().then(function(e){e.instance=e.load(),h.forEach(m),h=[]}):!1===n.value&&(v.unload(),v.instance=null)}var g=n(11);Object(g.a)(window);var b=r()({}),w="undefined"!=typeof __sfc__?__sfc__.options.pageName:c("pageName"),_="undefined"!=typeof __sfc__?__sfc__.options.clientId:c("clientId"),E={inited:!1};b.$on("[[VideoContextAction]]",function(e){var t=e.data,n=t.action,o=t.id,r=t.args,i=document.getElementById(o);null!==i&&i[n].apply(i,r)}),b.$on("[[ModuleAPIEvent]]",function(e){var t=e.data,n=t.type,o=t.data;switch(n){case"pageScrollTo":var r=o.behavior,i=o.scrollTop;window.scrollTo({top:i||0,behavior:r||"auto"})}}),b.$on("r#",function(e){E.inited||(!function(e){var t={postMessage:function(t){e.$emit("r2w",{data:t},"AppWorker")}};e.$on("w2r",function(e){"function"==typeof t.onmessage&&t.onmessage(e.data)}),u()({worker:t,tagNamePrefix:"a-"})}(b),E.inited=!0)}),b.$on("console",function(e){m(e.data)}),window.__renderer_to_worker__=function(e){b.$emit(e.type,{payload:e,pageName:w},"AppWorker")},b.$emit("r$",{clientId:_,pageName:w,pageQuery:function(){var e=location.search||"";return"?"===e[0]&&(e=e.slice(1)),a.a.parse(e)}()},"AppWorker")},14:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n={};for(var o in t){var r=t[o];i.shouldPrefix(o)?i[o](r,n):n[o]=r}for(var a in n){var c=n[a];if(Array.isArray(c))for(var s=0;s<c.length;s++)e.style[a]=c[s];else e.style[a]=c}};var o={flex:!0,alignItems:!0,alignSelf:!0,flexDirection:!0,justifyContent:!0,flexWrap:!0,lineClamp:!0,textSizeAdjust:!0,textDecorationLine:!0,textDecorationColor:!0,textDecorationStyle:!0,textDecorationSkip:!0,writingMode:!0,animatin:!0,animationName:!0,animationDuration:!0,animationTimingFunction:!0,animationDelay:!0,animationIterationCount:!0,animationDirection:!0,animationFillMode:!0,animationPlayState:!0,transform:!0,transformOrigin:!0,transformStyle:!0,perspective:!0,perspectiveOrigin:!0,backfaceVisibility:!0,appearance:!0,userSelect:!0,columns:!0,columnWidth:!0,columnCount:!0,columnGap:!0,columnRule:!0,columnRuleWidth:!0,columnRuleStyle:!0,columnRuleColor:!0,columnSpan:!0,columnFill:!0,columnBreakBefore:!0,columnBreakAfter:!0,columnBreakInside:!0},r={position:"sticky",display:"flex"},i={shouldPrefix:function(e){return o[e]||r[e]}};Object.keys(o).forEach(function(e){var t="webkit"+e[0].toUpperCase()+e.slice(1);i[e]=function(n){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return o[t]=n,o[e]=n,o}}),Object.keys(r).forEach(function(e){var t=o[e];i[e]=function(n){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return o[e]=n===t?["-webkit-"+t,t]:n,o}}),e.exports=t.default},17:function(e,t){var n,o,r=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function c(e){if(n===setTimeout)return setTimeout(e,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(e){n=i}try{o="function"==typeof clearTimeout?clearTimeout:a}catch(e){o=a}}();var s,u=[],l=!1,f=-1;function p(){l&&s&&(l=!1,s.length?u=s.concat(u):f=-1,u.length&&d())}function d(){if(!l){var e=c(p);l=!0;for(var t=u.length;t;){for(s=u,u=[];++f<t;)s&&s[f].run();f=-1,t=u.length}s=null,l=!1,function(e){if(o===clearTimeout)return clearTimeout(e);if((o===a||!o)&&clearTimeout)return o=clearTimeout,clearTimeout(e);try{o(e)}catch(t){try{return o.call(null,e)}catch(t){return o.call(this,e)}}}(e)}}function v(e,t){this.fun=e,this.array=t}function h(){}r.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];u.push(new v(e,t)),1!==u.length||l||c(d)},v.prototype.run=function(){this.fun.apply(null,this.array)},r.title="browser",r.browser=!0,r.env={},r.argv=[],r.version="",r.versions={},r.on=h,r.addListener=h,r.once=h,r.off=h,r.removeListener=h,r.removeAllListeners=h,r.emit=h,r.prependListener=h,r.prependOnceListener=h,r.listeners=function(e){return[]},r.binding=function(e){throw new Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(e){throw new Error("process.chdir is not supported")},r.umask=function(){return 0}},18:function(e,t,n){"use strict";function o(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.exports=function(e,t,n,i){t=t||"&",n=n||"=";var a={};if("string"!=typeof e||0===e.length)return a;var c=/\+/g;e=e.split(t);var s=1e3;i&&"number"==typeof i.maxKeys&&(s=i.maxKeys);var u=e.length;s>0&&u>s&&(u=s);for(var l=0;l<u;++l){var f,p,d,v,h=e[l].replace(c,"%20"),y=h.indexOf(n);y>=0?(f=h.substr(0,y),p=h.substr(y+1)):(f=h,p=""),d=decodeURIComponent(f),v=decodeURIComponent(p),o(a,d)?r(a[d])?a[d].push(v):a[d]=[a[d],v]:a[d]=v}return a};var r=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},19:function(e,t,n){"use strict";function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var r=function(e){switch(o(e)){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};e.exports=function(e,t,n,s){return t=t||"&",n=n||"=",null===e&&(e=void 0),"object"===o(e)?a(c(e),function(o){var c=encodeURIComponent(r(o))+n;return i(e[o])?a(e[o],function(e){return c+encodeURIComponent(r(e))}).join(t):c+encodeURIComponent(r(e[o]))}).join(t):s?encodeURIComponent(r(s))+n+encodeURIComponent(r(e)):""};var i=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};function a(e,t){if(e.map)return e.map(t);for(var n=[],o=0;o<e.length;o++)n.push(t(e[o],o));return n}var c=Object.keys||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push(n);return t}},39:function(e,t,n){(function(o,r){var i,a;function c(e){return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}console.log("Start windmill renderer (0.4.1) framework. Build at 2018-09-18 16:04"),function(o,r){"object"===c(t)&&void 0!==e?e.exports=r():void 0===(a="function"==typeof(i=r)?i.call(t,n,t,e):i)||(e.exports=a)}(0,function(){"use strict";"function"!=typeof Object.assign&&Object.defineProperty(Object,"assign",{writable:!0,enumerable:!1,configurable:!0,value:function(e,t){var n=arguments;if(null==e)throw new TypeError("Cannot convert undefined or null to object");for(var o=Object(e),r=1;r<arguments.length;r++){var i=n[r];if(null!=i)for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(o[a]=i[a])}return o}});var e=function(){var e=1e5;return function(){var t=String(e);return e+=1,t}}();function t(e,t,n){void 0===n&&(n=!0);var r=void 0!==o?o:"undefined"!=typeof self?self:new Function("return this")();try{Object.defineProperty(r,e,{value:t,configurable:!0,enumerable:!0,writable:!n})}catch(n){r[e]=t}}function n(e){return Object.prototype.toString.call(e).slice(8,-1)}function i(e){return"Object"===n(e)}function a(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t]}var s=function(){},u={},l=["Android","iOS"];var f=function(e){return e.charAt(0).toUpperCase()+e.slice(1)};function p(e,t){return"object"===(void 0===r?"undefined":c(r))&&r&&r.env&&"test"===r.env.PURPOSE?"function"==typeof __test_logger__&&(s=__test_logger__,!0):(u.debugMode,!0)}function d(e,t){p()&&s("debug",e)}function v(e,t){p()&&s("warn",e)}function h(e,t){p()&&s("error",e)}function y(e){if(h(e),"test"!==r.env.PURPOSE)throw new Error(e)}s=function(e,t){var n="["+f(e)+"][wml-r] "+t;return u.isWeex&&l.indexOf(u.platform)>-1?console.log(n):console.error(n)};var m={network:["request","uploadFile"],miniApp:["setAppShareInfo","hideLauncherLoading","setWebViewTop","setWebViewBackgroundImage"],mtop:["request"],storage:["length","setItem","getItem","removeItem"],memoryStorage:["setItem","getItem"],tabBar:["show","hide"],navigator:["push","pop","openMessagePage","reloadPage","getBackStack","popToHome","navigateTo","redirectTo","switchTab"],user:["login","logout","info"],modal:["alert","confirm","toast","showLoading","hideLoading"],navigatorBar:["show","hide","setTitle","setRightItem","setStyle","setDrawer","setActionSheet","hasIndexBadge","scaleIndexBadge","resetIndexBadge","getHeight","openDrawer","isDrawerOpened","closeDrawer","setLeftItem","showMenu","hideMenu","getStatusBarHeight","setNavigationBar"],clipboard:["writeText","readText"],picker:["pick","pickDate","pickTime","chooseCity"],webSocket:["webSocket","send","close","onOpen","onMessage","onClose","onError"],calendar:["addEvent","checkEvent","removeEvent"],connection:["getType","getDownlinkMax","onChange"],screen:["setAlwaysOn","setBrightness","getScreenBrightness"],broadcast:["createChannel","postMessage","onMessage","close"],share:["doShare"],cookie:["read","write","getAllObjects"],audio:["load","play","pause","stop","setVolume","canPlayType"],wopc:["authLogin","checkAuthSession","doAuth","getSessionKey","setSessionKey"],WopcMtopPlugin:["request"],device:["onShake","vibrate"],keyboard:["hideKeyboard"],contact:["choosePhoneContact"],location:["getLocation"],alipay:["tradePay"],userTrack:["commit","commitut","commitEvent","customAdvance","pageAppear","pageDisappear","skipPage","updatePageUtparam","updateNextPageUtparam"],"nuvajs-exec":["exec"],aluWVJSBridge:["userIsLogin","refreshAlipayCookie"],TBDeviceInfo:["getUtdid"],actionSheet:["showActionSheet"],image:["chooseImage","previewImage","compressImage","getImageInfo","saveImage"],media:["startVoice","stopVoice"],audioRecord:["startRecord","stopRecord","cancelRecord"],audioPlayer:["playVoice","pauseVoice","stopVoice"],file:["saveFile","getFileInfo","getFileList","removeFile"],video:["chooseVideo","getVideoInfo"],phone:["makePhoneCall"],compass:["startCompass","stopCompass","onCompassChange"],tbsecurity:["secureToken"]};var g="__WINDMILL_MODULE_GETTER__",b=function(){};b.prototype.$on=function(e,t){return void 0===t&&(t=a),d('$on "'+e+'"'),!e&&y("invalid event name "+e+" for windmill.$on."),t===a&&y("bind event "+e+" with no callback through windmill.$on."),this.bridge.onReceiveMessage({data:{type:e},origin:this.label,type:"Event"},t)},b.prototype.$once=function(e,t){return void 0===t&&(t=a),d('$once "'+e+'"'),!e&&y("invalid event name "+e+" for windmill.$once."),t===a&&y("bind event "+e+" with no callback through windmill.$once."),this.bridge.onReceiveMessage({data:{type:e,once:!0},origin:this.label,type:"Event"},t)},b.prototype.$off=function(e,t){return d('$off "'+e+'"'),!e&&y("invalid event name "+e+" for windmill.$off."),this.bridge.unbindEventListener("Event."+e,t)},b.prototype.$cycle=function(e,t){return void 0===t&&(t=a),d('$cycle "'+e+'"'),e&&/^app:|^page(:|@)/.test(e)||y("invalid lifecycle name "+e+" for windmill.$cycle."),t===a&&y("hook lifecycle "+e+" with no callback function through windmill.$cycle."),"AppWorker"!==this.label&&/^app:/.test(e)&&y("Shouldn't bind lifecycle hook for app in a page client."),this.bridge.onReceiveMessage({type:"Lifecycle",origin:this.label,data:{type:e}},t)},b.prototype.$decycle=function(e,t){return d('$decycle "'+e+'"'),e&&/^app:|^page(:|@)/.test(e)||y("invalid lifecycle name "+e+" for windmill.$decycle."),this.bridge.unbindEventListener("Lifecycle."+e,t)},b.prototype.$emit=function(e,t,n){return void 0===t&&(t={}),d('$emit("'+e+'")'),!e&&y("invalid event name "+e+" for windmill.$emit."),n&&n!==this.label?this.bridge.postMessage({data:{type:e,data:t},origin:this.label,target:n,type:"Event"}):this.bridge.emitEvent(""+e,t)},b.prototype.$callAsync=function(e,t){var n=this;return void 0===t&&(t={}),d('$callAsync "'+e+'"'),e||y("invalid method name "+e+" for windmill.$callAsync."),new Promise(function(o,r){n.bridge.dispatchMessage({type:"ModuleCall",origin:n.label,target:"AppWorker",data:{method:e,params:t}},o,r,!1)})},b.prototype.$call=function(e,t,n,o){return void 0===t&&(t={}),void 0===n&&(n=a),void 0===o&&(o=a),d('$call "'+e+'", params: '+JSON.stringify(t)),e||y("invalid method name "+e+" for windmill.$call."),this.bridge.dispatchMessage({type:"ModuleCall",origin:this.label,target:"AppWorker",data:{method:e,params:t}},n,o,!0)},b.prototype.$registerModules=function(e){!function(e,t){if(void 0===t&&(t=!1),i(e)){var n=function(n){var o=e[n];m[n]?t||v('The "'+n+'" module has already been registered.It would be overridden.'):m[n]=[];var r=m[n];Array.isArray(o)?o.forEach(function(e){-1===r.indexOf(e)?r.push(e):t||v('The "'+e+'" of the "'+n+'" module has already been registered.')}):h('Invalid parameter type! The method list of the "'+n+'" module should be an Array.')};for(var o in e)n(o)}else h("Invalid parameter type! The module definition is not a plain object.")}(e,!0)},b.prototype.$getAvailableModules=function(){return function(e){var t={};try{t=JSON.parse(JSON.stringify(e))}catch(e){}return t}(m)};var w="[[EVENT_MAP]]";function _(e,t){var n=e[w];return Array.isArray(n[t])||(n[t]=[]),n[t]}var E,S=function(){d("Create new EventEmitter."),Object.defineProperty(this,w,{configurable:!1,enumerable:!1,writable:!1,value:{}})};function k(e){var t;try{t=JSON.stringify(e)}catch(n){t=e}y("failed to postMessage: "+t)}function A(e,t,n,o,r,i){var a=t+"."+n;return e.WindVane?e.WindVane.call(t,n,o,r,i):y("should have WindVane in global context"+(a?" to call "+a:"")+".")}S.prototype.on=function(e,t){return d('EventEmitter: on("'+e+'")'),_(this,e).push({listener:t,once:!1,callCount:0}),this},S.prototype.once=function(e,t){return d('EventEmitter: once("'+e+'")'),_(this,e).push({listener:t,once:!0,callCount:0}),this},S.prototype.off=function(e,t){d('EventEmitter: off("'+e+'"'+(t?", listener":"")+")");var n=this[w];if(t){var o=n[e];if(Array.isArray(o)){var r=o.findIndex(function(e){return e.listener===t});-1!==r&&o.splice(r,1)}}else delete n[e];return this},S.prototype.emit=function(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];d('EventEmitter: emit("'+e+'", '+JSON.stringify(t)+")");var o=this[w],r=o[e];return Array.isArray(r)&&(o[e]=r.filter(function(n){try{n.listener.apply(null,t),n.callCount+=1}catch(t){return h('Failed to emit "'+e+'" event.'),h(t.toString()),!0}return!n.once})),this};var $=!1;var x=function(){this._messages=[]};x.prototype.postMessage=function(e){d("cache message in lazyMsgModule. "+JSON.stringify(e)),this._messages.push(e)},x.prototype.replaceWith=function(e){M=!1,this._messageModule=e,this._flush()},x.prototype._flush=function(){var e=this;this._messages.forEach(function(t){return e._messageModule.postMessage(t)})};var M,O,T=new x;function j(e,t){var n=e?function(e){return e.requireModule("@weex/windmill")||e.requireModule("windmill")}(e):function(){if(!E){var e="undefined"!=typeof window?window:o;E={postMessage:function(t){return A(e,"Windmill","postMessage",t,function(){},k)},onmessage:function(t){if(console.debug("Set onMessage for webview."),!$)return $=!0,A(e,"Windmill","onMessage",{},t,k)}}}return E}();if(!n)return y("can't find message module ("+(e?"windmill module":"message module in webview")+")."),M=!0,T;if("function"==typeof t){d('Set the "onmessage" method to the bridge through callback.');try{n.onmessage(t)}catch(e){h('Failed to set the "onmessage" method to the bridge through callback.'),h(e.toString())}}return M&&T.replaceWith(n),n}function C(e){var t=e.match(/([^@]+)(@\S+)/);return t&&t[1]||e}var I=function(e,t){var o=this;void 0===t&&(t={}),d("Create a new RendererBridge."),O=t.isWeex,this._emitter=new S,d("Register onmessage api for "+(O?"Weex windmill module":"webview")+"."),O&&(this._weex=e),this._onMessage=function(e){if(d("Receive message from the worker. (message: "+JSON.stringify(e)+")"),!i(e)&&(h("The parameter of onmessage should be a plain object! Not "+n(e)),"string"==typeof e))try{e=JSON.parse(e)}catch(e){return void h("Failed to parse the message string. "+e.toString())}var t=e.type,r=e.data;void 0===r&&(r={});var a=e.origin,c=e.callbackId;switch(t){case"Callback":o._emitter.emit("callback@AppWorker:"+c,r);break;case"Event":var s=C(r.type);o._emitter.emit(t+"."+s,Object.assign({origin:a},r,{type:s}));break;case"Lifecycle":o._emitter.emit(t+"."+r.lifecycle,r.options);break;case"SetData":o._emitter.emit("Event.setdata",r);break;default:y('Unknown message type received from worker: "'+t+'"')}},j(e,this._onMessage)};I.prototype.dispatchMessage=function(e,t,n,o){d("Dispatch message to worker. (message: "+JSON.stringify(e)+")"),e.callbackId=this._genCallbackId(function(o){return o.status&&"SUCCESS"===o.status?t(o):(o.status,h("call API "+e.data.method+" from renderer failed: "+o.status+", "+o.error),n(o))},{keepAlive:o});try{e.keepAlive=!0,this.postMessage(e)}catch(e){n(e)}},I.prototype.postMessage=function(e){try{d("Call postMessage to worker. (message: "+JSON.stringify(e)+")"),j(this._weex,this._onMessage).postMessage(e)}catch(e){y(e.message||e.toString()||"postMessage failed.")}},I.prototype._genCallbackId=function(t,n){var o=n.keepAlive,r=n.callbackId,i=r||e();return this._emitter[o?"on":"once"]("callback@AppWorker:"+i,t),i},I.prototype.onReceiveMessage=function(e,t){var n=e.type,o=e.data;void 0===o&&(o={});var r=o.type;"Event"===n&&(r=C(r),o.type=r);var i=o.once?"once":"on";this._emitter[i](n+"."+r,t)},I.prototype.unbindEventListener=function(e,t){this._emitter.off(C(e),t)},I.prototype.emitEvent=function(e,t){void 0===t&&(t={});var n=C(e);this._emitter.emit("Event."+n,{type:n,data:t})};var R=function(e){function t(t,n){void 0===n&&(n={}),e.call(this),this._name=n.pageName||"",this.label=n.clientId||"",t&&i(t.config)&&(this._name=t.config.pageName||"",this.label=t.config.clientId||"",t.config.availableModules?(this.$registerModules(t.config.availableModules),this._gotAvailableModulesFromWeex=!0):v("No available modules in weex options.")),d("Create a new RendererRuntime. ("+this.label+", "+this._name+")"),this.bridge=new I(t,n),this._init()}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._init=function(){var e=this;this.bridge.onReceiveMessage({origin:"AppWorker",target:this.label,type:"Event",data:{type:"registerModules"}},function(t){t&&"registerModules"===t.type&&(d("Register available modules in renderer. ("+Object.keys(t.data)+")"),e.$registerModules(t.data))})},t.prototype.ready=function(){this.bridge.dispatchMessage({origin:this.label,target:"AppWorker",type:"Event",data:{type:"[[RendererRuntimeReady]]",data:{label:this.label,handshake:!this._gotAvailableModulesFromWeex}}},a,a)},t.prototype.$getCurrentActivePageId=function(){return this.label},t}(b),P=["$on","$once","$off","$emit","$cycle","$decycle","$call","$callAsync","$navTo","$getAvailableModules","$getCurrentActivePageId"];return function(e,n){var o=!(!e||!e.requireModule);!function(e){if(!e||!e.platform)return console.error("set logger environment failed.");Object.assign(u,e)}({platform:o&&e.config.env.platform,debugMode:o&&e.config.env.debugMode,isWeex:o}),d("Setup Windmill renderer framework."),e&&!e.requireModule&&(n=e,e=void 0),n||(n={}),(n=Object.assign({},n)).isWeex=o,d("Instantiate renderer in "+(o?"Weex container":"WindVane container")+".");var r=new R(e,n),i=function(e,t){var n={};return t.forEach(function(t){"function"==typeof e[t]&&(n[t]=function(){for(var n=[],o=arguments.length;o--;)n[o]=arguments[o];return e[t].apply(e,n)})}),n}(r,P);return d("Prepare runtime APIs: "+JSON.stringify(P)),n.exposeModuleGetter&&t(g,function(e,t){var n=t||function(){for(var t,n=[],o=arguments.length;o--;)n[o]=arguments[o];return(t=e()).$call.apply(t,n)};return function(e){if(!e)return d("Require a universal module proxy."),{call:n};var t=m[e];if(Array.isArray(t)){d('Require the "'+e+'" module.');var o={};return t.forEach(function(t){o[t]=function(){for(var o=[],r=arguments.length;r--;)o[r]=arguments[r];return n.apply(void 0,[e+"."+t].concat(o))}}),o}v('Require unknown module "'+e+"\".It may not exist or haven't been registered.")}}(function(){return i})),r.ready(),i}})}).call(this,n(4),n(17))},4:function(e,t){function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var o;o=function(){return this}();try{o=o||Function("return this")()||(0,eval)("this")}catch(e){"object"===("undefined"==typeof window?"undefined":n(window))&&(o=window)}e.exports=o},40:function(e,t,n){"use strict";function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(e){return e&&e.__esModule?e:{default:e}}(n(14));function i(e){return(i="function"==typeof Symbol&&"symbol"===o(Symbol.iterator)?function(e){return o(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":o(e)})(e)}var a=!1;try{addEventListener("test",null,{get passive(){a=!0}})}catch(e){}var c="textContent"in document?"textContent":"nodeValue",s=["touchstart","touchmove","touchend","touchcancel"],u=!a||{capture:!0,passive:!0},l={load:!0,error:!0,unload:!0,abort:!0,loadstart:!0,progress:!0,loadend:!0,blur:!0,focus:!0,scroll:!0,appear:!0,disappear:!0,invalid:!0};t.default=function(e){var t,n=e.worker,o=e.tagNamePrefix,a=void 0===o?"":o,f=new Map,p={};function d(e){return e?"BODY"===e.nodeName?document.body:f.get(e.$$id):null}function v(e){return e?f.delete(e.$$id):null}function h(e,t){l[t]?function(e,t){function o(o){var r={$$id:e.$$id};n.postMessage({type:"event",event:{type:t,target:r,currentTarget:r,detail:o.detail}})}e["__$".concat(t,"_listener__")]=o,e.addEventListener(t,o)}(e,t):p[t]?p[t]++:(p[t]=1,document.addEventListener(t,g,u))}function y(e){var t=e.changedTouches&&e.changedTouches[0]||e.touches&&e.touches[0]||e;return t&&{pageX:t.pageX,pageY:t.pageY}}function m(e){for(var t=[],n=0,o=e.length;n<o;n++){var r=e[n],i=r.clientX,a=r.clientY,c=r.pageX,s=r.pageY,u=r.identifier,l=r.target;t.push({clientX:i,clientY:a,pageX:c,pageY:s,identifier:u,$$id:l.$$id})}return t}function g(e){if("click"===e.type&&t)return!1;var o={type:e.type};for(var r in e.target&&(o.target=e.target.$$id),"scroll"===e.type&&e.target===document&&(o.target=document.body.$$id,o.scrollTop=document.documentElement.scrollTop||document.body.scrollTop),e.detail&&(o.detail=e.detail),e){var a=e[r];"object"===i(a)||"function"==typeof a||r===r.toUpperCase()||o.hasOwnProperty(r)||(o[r]=a)}if(-1!==s.indexOf(e.type)&&(o.touches=m(e.touches),o.changedTouches=m(e.changedTouches)),n.postMessage({type:"event",event:o}),"touchstart"===e.type)t=y(e);else if("touchend"===e.type&&t){var c=y(e);c&&Math.sqrt(Math.pow(c.pageX-t.pageX,2)+Math.pow(c.pageY-t.pageY,2))<10&&(o.type="click",n.postMessage({type:"event",event:o}))}}function b(e){var t;if(3===e.nodeType)t=document.createTextNode(e.data);else if(1===e.nodeType){if(t=document.createElement(a+e.nodeName),e.className&&(t.className=e.className),e.style&&(0,r.default)(t,e.style),e.attributes)for(var n=0;n<e.attributes.length;n++){var o=e.attributes[n];"object"===i(o.value)||"boolean"==typeof o.value?t[o.name]=o.value:t.setAttribute(o.name,o.value)}if(e.childNodes)for(var c=0;c<e.childNodes.length;c++)t.appendChild(b(e.childNodes[c]));if(e.events)for(var s=0;s<e.events.length;s++)h(t,e.events[s])}else 8===e.nodeType&&(t=document.createComment(e.data));return function(e,t){t.$$id=e.$$id,f.set(e.$$id,t)}(e,t),t}var w={childList:function(e){var t=e.target,n=e.removedNodes,o=e.addedNodes,r=e.nextSibling,i=t;i&&"BODY"===i.nodeName&&(document.body.$$id=i.$$id);var a=d(i);if(n)for(var c=n.length;c--;){var s=d(n[c]);v(s),a&&s&&a.removeChild(s)}if(o)for(var u=0;u<o.length;u++){var l=d(o[u]);l||(l=b(o[u])),a&&a.insertBefore(l,r&&d(r)||null)}},attributes:function(e){var t=e.target,n=e.attributeName,o=e.newValue,a=e.style,c=d(t);c&&(a?(0,r.default)(c,a):null==o?c.removeAttribute(n):"object"===i(o)||"boolean"==typeof o?c[n]=o:c.setAttribute(n,o))},characterData:function(e){var t=e.target,n=e.newValue;d(t)[c]=n},addEvent:function(e){var t=e.target,n=e.eventName,o=d(t);o&&h(o,n)},removeEvent:function(e){var t=e.target,n=e.eventName,o=d(t);o&&function(e,t){l[t]?function(e,t){var n=e["__$".concat(t,"_listener__")];n&&(e.removeEventListener(t,n),e["__$".concat(t,"_listener__")]=null)}(e,t):(p[t]--,0===p[t]&&document.removeEventListener(t,g))}(o,n)},canvasRenderingContext2D:function(e){var t=e.target,n=e.method,o=e.args,r=e.properties,i=d(t);if(i){var a=i.getContext("2d");if(r)for(var c in r)r.hasOwnProperty(c)&&(a[c]=r[c]);n&&a[n].apply(a,o)}}};n.onmessage=function(e){var t=e.data;if("MutationRecord"===t.type)for(var n=t.mutations,o=0;o<n.length;o++){var r=n[o];w[r.type](r)}},n.postMessage({type:"init",url:location.href,width:document.documentElement.clientWidth})},e.exports=t.default},6:function(e,t,n){"use strict";(function(e){n.d(t,"a",function(){return r});var o="undefined"!=typeof navigator?navigator.userAgent:"unknow";/iOS/.test(o),/Android/.test(o),/AliTB/.test(o);function r(){return void 0!==e?e:"undefined"!=typeof self?self:new Function("return this")()}}).call(this,n(4))},7:function(e,t,n){"use strict";function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function r(e){return(r="function"==typeof Symbol&&"symbol"===o(Symbol.iterator)?function(e){return o(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":o(e)})(e)}function i(){}var a="function"==typeof setImmediate&&setImmediate||function(e){"function"==typeof setTimeout?setTimeout(e,0):e()},c=function(e){"undefined"!=typeof console&&console&&console.log("Possible Unhandled Promise Rejection:",e)};function s(e){if("object"!==r(this))throw new TypeError("Promises must be constructed via new");if("function"!=typeof e)throw new TypeError("Promise resolver is not a function");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],d(e,this)}function u(e,t){for(;3===e._state;)e=e._value;0!==e._state?(e._handled=!0,a(function(){var n=1===e._state?t.onFulfilled:t.onRejected;if(null!==n){var o;try{o=n(e._value)}catch(e){return void f(t.promise,e)}l(t.promise,o)}else(1===e._state?l:f)(t.promise,e._value)})):e._deferreds.push(t)}function l(e,t){try{if(t===e)throw new TypeError("A promise cannot be resolved with itself.");if(t&&("object"===r(t)||"function"==typeof t)){var n=t.then;if(t instanceof s)return e._state=3,e._value=t,void p(e);if("function"==typeof n)return void d(function(e,t){return function(){e.apply(t,arguments)}}(n,t),e)}e._state=1,e._value=t,p(e)}catch(t){f(e,t)}}function f(e,t){e._state=2,e._value=t,p(e)}function p(e){2===e._state&&0===e._deferreds.length&&a(function(){e._handled||c(e._value)});for(var t=0,n=e._deferreds.length;t<n;t++)u(e,e._deferreds[t]);e._deferreds=null}function d(e,t){var n=!1;try{e(function(e){n||(n=!0,l(t,e))},function(e){n||(n=!0,f(t,e))})}catch(e){if(n)return;n=!0,f(t,e)}}s.prototype.catch=function(e){return this.then(null,e)},s.prototype.then=function(e,t){var n=new this.constructor(i);return u(this,new function(e,t,n){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof t?t:null,this.promise=n}(e,t,n)),n},s.all=function(e){var t=Array.prototype.slice.call(e);return new s(function(e,n){if(0===t.length)return e([]);var o=t.length;function i(a,c){try{if(c&&("object"===r(c)||"function"==typeof c)){var s=c.then;if("function"==typeof s)return void s.call(c,function(e){i(a,e)},n)}t[a]=c,0==--o&&e(t)}catch(e){n(e)}}for(var a=0;a<t.length;a++)i(a,t[a])})},s.resolve=function(e){return e&&"object"===r(e)&&e.constructor===s?e:new s(function(t){t(e)})},s.reject=function(e){return new s(function(t,n){n(e)})},s.race=function(e){return new s(function(t,n){for(var o=0,r=e.length;o<r;o++)e[o].then(t,n)})},s._setImmediateFn=function(e){a=e},s._setUnhandledRejectionFn=function(e){c=e},e.exports=s},9:function(e,t,n){"use strict";t.decode=t.parse=n(18),t.encode=t.stringify=n(19)}});
/*! miniapp framework version: 0.1.12 bulid time: Thu Sep 20 2018 11:20:41 GMT+0800 (中国标准时间) */!function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(o,r,function(t){return e[t]}.bind(null,r));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=135)}({1:function(e,t,n){"use strict";n.d(t,"c",function(){return a}),n.d(t,"a",function(){return c}),n.d(t,"d",function(){return s}),n.d(t,"b",function(){return u});var o=n(6),r={all:-1,debug:0,log:1,info:1,warn:2,error:3,none:4},i="error";try{Object(o.a)().__set_log_level__=function(e){i=e}}catch(e){s("mount __set_log_level__ at global object err",e)}function a(){if(r[i]<=r.log){for(var e,t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];(e=console).log.apply(e,["[Log]"].concat(n))}}function c(){if(r[i]<=r.debug){for(var e,t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];(e=console).log.apply(e,["[Debug]"].concat(n))}}function s(){if(r[i]<=r.warn){for(var e,t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];(e=console).log.apply(e,["[WARN]"].concat(n))}}function u(){if(r[i]<=r.error){for(var e,t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];(e=console).log.apply(e,["[ERROR]"].concat(n))}}},10:function(module,__webpack_exports__,__webpack_require__){"use strict";function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function retrocycle($){var px=/^\$(?:\[(?:\d+|"(?:[^\\"\u0000-\u001f]|\\(?:[\\"\/bfnrt]|u[0-9a-zA-Z]{4}))*")\])*$/;return function rez(value){value&&"object"===_typeof(value)&&(Array.isArray(value)?value.forEach(function(element,i){if("object"===_typeof(element)&&null!==element){var path=element.$ref;"string"==typeof path&&px.test(path)?value[i]=eval(path):rez(element)}}):Object.keys(value).forEach(function(name){var item=value[name];if("object"===_typeof(item)&&null!==item){var path=item.$ref;"string"==typeof path&&px.test(path)?value[name]=eval(path):rez(item)}}))}($),$}__webpack_require__.d(__webpack_exports__,"a",function(){return retrocycle})},11:function(e,t,n){"use strict";function o(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function r(e,t,n){return t&&o(e.prototype,t),n&&o(e,n),e}var i,a,c=0,s=[],u=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.current=[],this.elements=t,this.options={container:window,wait:100,x:0,y:0,cls:"appear",once:!1,onReset:function(){},onAppear:function(){},onDisappear:function(){}},this.container=null,this.appearWatchElements=null,this.initConfig.apply(this,arguments)}return r(e,null,[{key:"createEvent",value:function(){i=document.createEvent("HTMLEvents"),a=document.createEvent("HTMLEvents"),i.initEvent("appear",!1,!0),a.initEvent("disappear",!1,!0)}}]),r(e,[{key:"initConfig",value:function(e){this.extend(this.options,e||(e={})),this.appearWatchElements=this.appearWatchElements||this.getElements(),this.bindEvent()}},{key:"extend",value:function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}},{key:"inViewport",value:function(e,t,n){var o=e.getBoundingClientRect(),r=o.top,i=o.right,a=o.bottom,s=o.left;return s=t.right>s&&t.left<i,r=t.bottom>r-c&&t.top<a,s&&r}},{key:"getElements",value:function(e){var t,n=this.options.container;return this.container=n,t=s||[],t=[].slice.call(t,null)}},{key:"check",value:function(e){var t=this;l(function(){t.calculate(e)})}},{key:"calculate",value:function(e){var t=this,n=this.container,o=e||this.getElements(),r=p(window,{x:this.options.x,y:this.options.y}),c=this.options.once;arguments[0];n&&o&&o.length>0&&[].forEach.call(o,function(e,n){if(e){if(e.isOnce&&e._hasAppear)return s.splice(n,1),void o.splice(n,1);t.checkEveryDom(e,r,c,i,a,"normal",n)}})}},{key:"checkEveryDom",value:function(e,t,n,o,r,i,a){var c=p(e),s=this.getDirection(e._eleOffset,c),u=this.inViewport(e,t,i),l=e._appear,f=e._hasAppear,d=e._hasDisAppear;e._eleOffset=c,o.direction=s,r.direction=s,u&&!l?(n&&!f||!n)&&(e.dispatchEvent(o),e._hasAppear=!0,e._appear=!0):!u&&l&&(n&&!d||!n)&&(e.dispatchEvent(r),e._hasDisAppear=!0,e._appear=!1)}},{key:"reset",value:function(e){return this.initConfig(e),this.appearWatchElements.forEach(function(e){delete e._hasAppear,delete e._hasDisAppear,delete e._appear}),this}},{key:"bindEvent",value:function(){var e=this,t=function(e,t){var n,o,r,i=null,a=0,c=function(){a=Date.now(),i=null,r=e.apply(n,o)};return function(){var s=Date.now(),u=t-(s-a);return n=this,o=arguments,u<=0?(clearTimeout(i),i=null,a=s,r=e.apply(n,o)):i||(i=setTimeout(c,u)),r}}(function(){e.check()},this.options.wait);this.__handle&&(this.container.removeEventListener("scroll",this.__handle,!1,!0),this.__handle=null),this.__handle=t,this.container.addEventListener("scroll",t,!1,!0)}},{key:"getDirection",value:function(e,t){var n="none",o=e.left-t.left,r=e.top-t.top;return 0==r&&(n=0!=o?o>0?"left":"right":"none"),0==o&&(n=0!=r?r>0?"up":"down":"none"),n}}]),e}(),l=window.requestAnimationFrame||window.webkitRequestAnimationFrame||function(e){setTimeout(e,1/60*1e3)};function f(e){e.offsetTop&&"number"==typeof e.offsetTop&&(c=e.offsetTop)}function p(e,t){var n,o,r,i;if(e){if(t||(t={x:0,y:0}),e===window)i=0,o=(n=0)+e.innerWidth,r=i+e.innerHeight;else if(null===e.parentNode)n=0,i=0,o=0,r=0;else{var a=e.getBoundingClientRect(),c=a.top,s=a.right,u=a.bottom;n=a.left,i=c,o=s,r=u}return{left:n,top:i,right:o+t.x,bottom:r+t.y}}}var d,v,h,y=u,m={root:null,rootMargin:"0px",threshold:0};function g(e){e.forEach(function(e){var t=e.target;e.boundingClientRect;e.intersectionRatio>0?(t.dataset.appeared=!0,t.dispatchEvent(d)):t.dataset.appeared&&(t.dataset.appeared=!1,t.dispatchEvent(v))})}function b(){d=document.createEvent("HTMLEvents"),v=document.createEvent("HTMLEvents"),d.initEvent("appear",!1,!0),v.initEvent("disappear",!1,!0),h=new IntersectionObserver(g,m)}var w=null,_="function"==typeof IntersectionObserver,E=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0,n=t.prototype.addEventListener,o=t.prototype.removeEventListener;t.prototype.addEventListener=function(t,o,r,i){var a=t&&String(t).toLowerCase(),c="appear"===a||"disappear"===a;c&&(_?function(e){e===document&&(e=document.documentElement),h.observe(e)}(this):function(e){if(-1===s.indexOf(e)&&!e.appended){var t=Boolean(e.getAttribute("isonce"))||Boolean(e.getAttribute("data-once"));e.isOnce=t,e.appended=!0,s.push(e),e._eleOffset=p(e)}}(this)),_||(w&&c&&w.check([this]),"scroll"!==a||i||(w=new y({container:this}),e.push(w))),n.call(this,t,o,r)},t.prototype.removeEventListener=function(t,n,r,i){var a=this,c=t&&String(t).toLowerCase();_||"scroll"!==c||i||e.forEach(function(t,n){t.__handle&&t.container===a&&(a.removeEventListener("scroll",t.__handle,!1,!0),t.__handle=null,t.appearWatchElements=[],t.container=null,e.splice(n,1))}),o.call(this,t,n,r)}};t.a=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window;if(!_){var t=[];return y.createEvent(),E(t,e.Node),w=new y({container:e}),t.push(w),{config:f}}b(),E([],e.Node)}},135:function(e,t,n){"use strict";n.r(t);var o=n(39),r=n.n(o),i=n(9),a=n.n(i);function c(e){var t=location.href,n=new RegExp("".concat(e,"=([^&]+)")).exec(t);return n?decodeURIComponent(n[1]):"$unknown"}var s=n(40),u=n.n(s);n(1);var l=n(7),f=n.n(l),p=n(10),d="https://g.alicdn.com/miniapp/miniapp-console/rax-console.js?r="+Date.now(),v=null;var h=[],y=["info","log","error","debug","warn"];function m(e){var t=(e||{}).payload,n=void 0===t?{}:t;"switch"!==n.type?v&&v.instance?-1!==y.indexOf(n.type)&&v&&v.instance&&v.instance.addMessage({source:"console-api",type:"log",level:n.type,parameters:n.args.map(function(e){return Object(p.a)(e)})}):h.push(e):!0===n.value?function(){if(v)return f.a.resolve(v);var e=document.createElement("script");return new f.a(function(t,n){e.onload=function(){v={load:window.RaxConsole.default,unload:window.RaxConsole.unload},t(v)},e.charset="utf-8",e.onerror=n,e.src=d,document.head.appendChild(e)})}().then(function(e){e.instance=e.load(),h.forEach(m),h=[]}):!1===n.value&&(v.unload(),v.instance=null)}var g=n(11);Object(g.a)(window);var b=r()({}),w="undefined"!=typeof __sfc__?__sfc__.options.pageName:c("pageName"),_="undefined"!=typeof __sfc__?__sfc__.options.clientId:c("clientId"),E={inited:!1};b.$on("[[VideoContextAction]]",function(e){var t=e.data,n=t.action,o=t.id,r=t.args,i=document.getElementById(o);null!==i&&i[n].apply(i,r)}),b.$on("[[ModuleAPIEvent]]",function(e){var t=e.data,n=t.type,o=t.data;switch(n){case"pageScrollTo":var r=o.behavior,i=o.scrollTop;window.scrollTo({top:i||0,behavior:r||"auto"})}}),b.$on("r#",function(e){E.inited||(!function(e){var t={postMessage:function(t){e.$emit("r2w",{data:t},"AppWorker")}};e.$on("w2r",function(e){"function"==typeof t.onmessage&&t.onmessage(e.data)}),u()({worker:t,tagNamePrefix:"a-"})}(b),E.inited=!0)}),b.$on("console",function(e){m(e.data)}),window.__renderer_to_worker__=function(e){b.$emit(e.type,{payload:e,pageName:w},"AppWorker")},b.$emit("r$",{clientId:_,pageName:w,pageQuery:function(){var e=location.search||"";return"?"===e[0]&&(e=e.slice(1)),a.a.parse(e)}()},"AppWorker")},14:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n={};for(var o in t){var r=t[o];i.shouldPrefix(o)?i[o](r,n):n[o]=r}for(var a in n){var c=n[a];if(Array.isArray(c))for(var s=0;s<c.length;s++)e.style[a]=c[s];else e.style[a]=c}};var o={flex:!0,alignItems:!0,alignSelf:!0,flexDirection:!0,justifyContent:!0,flexWrap:!0,lineClamp:!0,textSizeAdjust:!0,textDecorationLine:!0,textDecorationColor:!0,textDecorationStyle:!0,textDecorationSkip:!0,writingMode:!0,animatin:!0,animationName:!0,animationDuration:!0,animationTimingFunction:!0,animationDelay:!0,animationIterationCount:!0,animationDirection:!0,animationFillMode:!0,animationPlayState:!0,transform:!0,transformOrigin:!0,transformStyle:!0,perspective:!0,perspectiveOrigin:!0,backfaceVisibility:!0,appearance:!0,userSelect:!0,columns:!0,columnWidth:!0,columnCount:!0,columnGap:!0,columnRule:!0,columnRuleWidth:!0,columnRuleStyle:!0,columnRuleColor:!0,columnSpan:!0,columnFill:!0,columnBreakBefore:!0,columnBreakAfter:!0,columnBreakInside:!0},r={position:"sticky",display:"flex"},i={shouldPrefix:function(e){return o[e]||r[e]}};Object.keys(o).forEach(function(e){var t="webkit"+e[0].toUpperCase()+e.slice(1);i[e]=function(n){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return o[t]=n,o[e]=n,o}}),Object.keys(r).forEach(function(e){var t=o[e];i[e]=function(n){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return o[e]=n===t?["-webkit-"+t,t]:n,o}}),e.exports=t.default},17:function(e,t){var n,o,r=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function c(e){if(n===setTimeout)return setTimeout(e,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(e){n=i}try{o="function"==typeof clearTimeout?clearTimeout:a}catch(e){o=a}}();var s,u=[],l=!1,f=-1;function p(){l&&s&&(l=!1,s.length?u=s.concat(u):f=-1,u.length&&d())}function d(){if(!l){var e=c(p);l=!0;for(var t=u.length;t;){for(s=u,u=[];++f<t;)s&&s[f].run();f=-1,t=u.length}s=null,l=!1,function(e){if(o===clearTimeout)return clearTimeout(e);if((o===a||!o)&&clearTimeout)return o=clearTimeout,clearTimeout(e);try{o(e)}catch(t){try{return o.call(null,e)}catch(t){return o.call(this,e)}}}(e)}}function v(e,t){this.fun=e,this.array=t}function h(){}r.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];u.push(new v(e,t)),1!==u.length||l||c(d)},v.prototype.run=function(){this.fun.apply(null,this.array)},r.title="browser",r.browser=!0,r.env={},r.argv=[],r.version="",r.versions={},r.on=h,r.addListener=h,r.once=h,r.off=h,r.removeListener=h,r.removeAllListeners=h,r.emit=h,r.prependListener=h,r.prependOnceListener=h,r.listeners=function(e){return[]},r.binding=function(e){throw new Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(e){throw new Error("process.chdir is not supported")},r.umask=function(){return 0}},18:function(e,t,n){"use strict";function o(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.exports=function(e,t,n,i){t=t||"&",n=n||"=";var a={};if("string"!=typeof e||0===e.length)return a;var c=/\+/g;e=e.split(t);var s=1e3;i&&"number"==typeof i.maxKeys&&(s=i.maxKeys);var u=e.length;s>0&&u>s&&(u=s);for(var l=0;l<u;++l){var f,p,d,v,h=e[l].replace(c,"%20"),y=h.indexOf(n);y>=0?(f=h.substr(0,y),p=h.substr(y+1)):(f=h,p=""),d=decodeURIComponent(f),v=decodeURIComponent(p),o(a,d)?r(a[d])?a[d].push(v):a[d]=[a[d],v]:a[d]=v}return a};var r=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},19:function(e,t,n){"use strict";function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var r=function(e){switch(o(e)){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};e.exports=function(e,t,n,s){return t=t||"&",n=n||"=",null===e&&(e=void 0),"object"===o(e)?a(c(e),function(o){var c=encodeURIComponent(r(o))+n;return i(e[o])?a(e[o],function(e){return c+encodeURIComponent(r(e))}).join(t):c+encodeURIComponent(r(e[o]))}).join(t):s?encodeURIComponent(r(s))+n+encodeURIComponent(r(e)):""};var i=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};function a(e,t){if(e.map)return e.map(t);for(var n=[],o=0;o<e.length;o++)n.push(t(e[o],o));return n}var c=Object.keys||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push(n);return t}},39:function(e,t,n){(function(o,r){var i,a;function c(e){return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}console.log("Start windmill renderer (0.4.1) framework. Build at 2018-09-18 16:04"),function(o,r){"object"===c(t)&&void 0!==e?e.exports=r():void 0===(a="function"==typeof(i=r)?i.call(t,n,t,e):i)||(e.exports=a)}(0,function(){"use strict";"function"!=typeof Object.assign&&Object.defineProperty(Object,"assign",{writable:!0,enumerable:!1,configurable:!0,value:function(e,t){var n=arguments;if(null==e)throw new TypeError("Cannot convert undefined or null to object");for(var o=Object(e),r=1;r<arguments.length;r++){var i=n[r];if(null!=i)for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(o[a]=i[a])}return o}});var e=function(){var e=1e5;return function(){var t=String(e);return e+=1,t}}();function t(e,t,n){void 0===n&&(n=!0);var r=void 0!==o?o:"undefined"!=typeof self?self:new Function("return this")();try{Object.defineProperty(r,e,{value:t,configurable:!0,enumerable:!0,writable:!n})}catch(n){r[e]=t}}function n(e){return Object.prototype.toString.call(e).slice(8,-1)}function i(e){return"Object"===n(e)}function a(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t]}var s=function(){},u={},l=["Android","iOS"];var f=function(e){return e.charAt(0).toUpperCase()+e.slice(1)};function p(e,t){return"object"===(void 0===r?"undefined":c(r))&&r&&r.env&&"test"===r.env.PURPOSE?"function"==typeof __test_logger__&&(s=__test_logger__,!0):(u.debugMode,!0)}function d(e,t){p()&&s("debug",e)}function v(e,t){p()&&s("warn",e)}function h(e,t){p()&&s("error",e)}function y(e){if(h(e),"test"!==r.env.PURPOSE)throw new Error(e)}s=function(e,t){var n="["+f(e)+"][wml-r] "+t;return u.isWeex&&l.indexOf(u.platform)>-1?console.log(n):console.error(n)};var m={network:["request","uploadFile"],miniApp:["setAppShareInfo","hideLauncherLoading","setWebViewTop","setWebViewBackgroundImage"],mtop:["request"],storage:["length","setItem","getItem","removeItem"],memoryStorage:["setItem","getItem"],tabBar:["show","hide"],navigator:["push","pop","openMessagePage","reloadPage","getBackStack","popToHome","navigateTo","redirectTo","switchTab"],user:["login","logout","info"],modal:["alert","confirm","toast","showLoading","hideLoading"],navigatorBar:["show","hide","setTitle","setRightItem","setStyle","setDrawer","setActionSheet","hasIndexBadge","scaleIndexBadge","resetIndexBadge","getHeight","openDrawer","isDrawerOpened","closeDrawer","setLeftItem","showMenu","hideMenu","getStatusBarHeight","setNavigationBar"],clipboard:["writeText","readText"],picker:["pick","pickDate","pickTime","chooseCity"],webSocket:["webSocket","send","close","onOpen","onMessage","onClose","onError"],calendar:["addEvent","checkEvent","removeEvent"],connection:["getType","getDownlinkMax","onChange"],screen:["setAlwaysOn","setBrightness","getScreenBrightness"],broadcast:["createChannel","postMessage","onMessage","close"],share:["doShare"],cookie:["read","write","getAllObjects"],audio:["load","play","pause","stop","setVolume","canPlayType"],wopc:["authLogin","checkAuthSession","doAuth","getSessionKey","setSessionKey"],WopcMtopPlugin:["request"],device:["onShake","vibrate"],keyboard:["hideKeyboard"],contact:["choosePhoneContact"],location:["getLocation"],alipay:["tradePay"],userTrack:["commit","commitut","commitEvent","customAdvance","pageAppear","pageDisappear","skipPage","updatePageUtparam","updateNextPageUtparam"],"nuvajs-exec":["exec"],aluWVJSBridge:["userIsLogin","refreshAlipayCookie"],TBDeviceInfo:["getUtdid"],actionSheet:["showActionSheet"],image:["chooseImage","previewImage","compressImage","getImageInfo","saveImage"],media:["startVoice","stopVoice"],audioRecord:["startRecord","stopRecord","cancelRecord"],audioPlayer:["playVoice","pauseVoice","stopVoice"],file:["saveFile","getFileInfo","getFileList","removeFile"],video:["chooseVideo","getVideoInfo"],phone:["makePhoneCall"],compass:["startCompass","stopCompass","onCompassChange"],tbsecurity:["secureToken"]};var g="__WINDMILL_MODULE_GETTER__",b=function(){};b.prototype.$on=function(e,t){return void 0===t&&(t=a),d('$on "'+e+'"'),!e&&y("invalid event name "+e+" for windmill.$on."),t===a&&y("bind event "+e+" with no callback through windmill.$on."),this.bridge.onReceiveMessage({data:{type:e},origin:this.label,type:"Event"},t)},b.prototype.$once=function(e,t){return void 0===t&&(t=a),d('$once "'+e+'"'),!e&&y("invalid event name "+e+" for windmill.$once."),t===a&&y("bind event "+e+" with no callback through windmill.$once."),this.bridge.onReceiveMessage({data:{type:e,once:!0},origin:this.label,type:"Event"},t)},b.prototype.$off=function(e,t){return d('$off "'+e+'"'),!e&&y("invalid event name "+e+" for windmill.$off."),this.bridge.unbindEventListener("Event."+e,t)},b.prototype.$cycle=function(e,t){return void 0===t&&(t=a),d('$cycle "'+e+'"'),e&&/^app:|^page(:|@)/.test(e)||y("invalid lifecycle name "+e+" for windmill.$cycle."),t===a&&y("hook lifecycle "+e+" with no callback function through windmill.$cycle."),"AppWorker"!==this.label&&/^app:/.test(e)&&y("Shouldn't bind lifecycle hook for app in a page client."),this.bridge.onReceiveMessage({type:"Lifecycle",origin:this.label,data:{type:e}},t)},b.prototype.$decycle=function(e,t){return d('$decycle "'+e+'"'),e&&/^app:|^page(:|@)/.test(e)||y("invalid lifecycle name "+e+" for windmill.$decycle."),this.bridge.unbindEventListener("Lifecycle."+e,t)},b.prototype.$emit=function(e,t,n){return void 0===t&&(t={}),d('$emit("'+e+'")'),!e&&y("invalid event name "+e+" for windmill.$emit."),n&&n!==this.label?this.bridge.postMessage({data:{type:e,data:t},origin:this.label,target:n,type:"Event"}):this.bridge.emitEvent(""+e,t)},b.prototype.$callAsync=function(e,t){var n=this;return void 0===t&&(t={}),d('$callAsync "'+e+'"'),e||y("invalid method name "+e+" for windmill.$callAsync."),new Promise(function(o,r){n.bridge.dispatchMessage({type:"ModuleCall",origin:n.label,target:"AppWorker",data:{method:e,params:t}},o,r,!1)})},b.prototype.$call=function(e,t,n,o){return void 0===t&&(t={}),void 0===n&&(n=a),void 0===o&&(o=a),d('$call "'+e+'", params: '+JSON.stringify(t)),e||y("invalid method name "+e+" for windmill.$call."),this.bridge.dispatchMessage({type:"ModuleCall",origin:this.label,target:"AppWorker",data:{method:e,params:t}},n,o,!0)},b.prototype.$registerModules=function(e){!function(e,t){if(void 0===t&&(t=!1),i(e)){var n=function(n){var o=e[n];m[n]?t||v('The "'+n+'" module has already been registered.It would be overridden.'):m[n]=[];var r=m[n];Array.isArray(o)?o.forEach(function(e){-1===r.indexOf(e)?r.push(e):t||v('The "'+e+'" of the "'+n+'" module has already been registered.')}):h('Invalid parameter type! The method list of the "'+n+'" module should be an Array.')};for(var o in e)n(o)}else h("Invalid parameter type! The module definition is not a plain object.")}(e,!0)},b.prototype.$getAvailableModules=function(){return function(e){var t={};try{t=JSON.parse(JSON.stringify(e))}catch(e){}return t}(m)};var w="[[EVENT_MAP]]";function _(e,t){var n=e[w];return Array.isArray(n[t])||(n[t]=[]),n[t]}var E,S=function(){d("Create new EventEmitter."),Object.defineProperty(this,w,{configurable:!1,enumerable:!1,writable:!1,value:{}})};function k(e){var t;try{t=JSON.stringify(e)}catch(n){t=e}y("failed to postMessage: "+t)}function A(e,t,n,o,r,i){var a=t+"."+n;return e.WindVane?e.WindVane.call(t,n,o,r,i):y("should have WindVane in global context"+(a?" to call "+a:"")+".")}S.prototype.on=function(e,t){return d('EventEmitter: on("'+e+'")'),_(this,e).push({listener:t,once:!1,callCount:0}),this},S.prototype.once=function(e,t){return d('EventEmitter: once("'+e+'")'),_(this,e).push({listener:t,once:!0,callCount:0}),this},S.prototype.off=function(e,t){d('EventEmitter: off("'+e+'"'+(t?", listener":"")+")");var n=this[w];if(t){var o=n[e];if(Array.isArray(o)){var r=o.findIndex(function(e){return e.listener===t});-1!==r&&o.splice(r,1)}}else delete n[e];return this},S.prototype.emit=function(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];d('EventEmitter: emit("'+e+'", '+JSON.stringify(t)+")");var o=this[w],r=o[e];return Array.isArray(r)&&(o[e]=r.filter(function(n){try{n.listener.apply(null,t),n.callCount+=1}catch(t){return h('Failed to emit "'+e+'" event.'),h(t.toString()),!0}return!n.once})),this};var $=!1;var x=function(){this._messages=[]};x.prototype.postMessage=function(e){d("cache message in lazyMsgModule. "+JSON.stringify(e)),this._messages.push(e)},x.prototype.replaceWith=function(e){M=!1,this._messageModule=e,this._flush()},x.prototype._flush=function(){var e=this;this._messages.forEach(function(t){return e._messageModule.postMessage(t)})};var M,O,T=new x;function j(e,t){var n=e?function(e){return e.requireModule("@weex/windmill")||e.requireModule("windmill")}(e):function(){if(!E){var e="undefined"!=typeof window?window:o;E={postMessage:function(t){return A(e,"Windmill","postMessage",t,function(){},k)},onmessage:function(t){if(console.debug("Set onMessage for webview."),!$)return $=!0,A(e,"Windmill","onMessage",{},t,k)}}}return E}();if(!n)return y("can't find message module ("+(e?"windmill module":"message module in webview")+")."),M=!0,T;if("function"==typeof t){d('Set the "onmessage" method to the bridge through callback.');try{n.onmessage(t)}catch(e){h('Failed to set the "onmessage" method to the bridge through callback.'),h(e.toString())}}return M&&T.replaceWith(n),n}function C(e){var t=e.match(/([^@]+)(@\S+)/);return t&&t[1]||e}var I=function(e,t){var o=this;void 0===t&&(t={}),d("Create a new RendererBridge."),O=t.isWeex,this._emitter=new S,d("Register onmessage api for "+(O?"Weex windmill module":"webview")+"."),O&&(this._weex=e),this._onMessage=function(e){if(d("Receive message from the worker. (message: "+JSON.stringify(e)+")"),!i(e)&&(h("The parameter of onmessage should be a plain object! Not "+n(e)),"string"==typeof e))try{e=JSON.parse(e)}catch(e){return void h("Failed to parse the message string. "+e.toString())}var t=e.type,r=e.data;void 0===r&&(r={});var a=e.origin,c=e.callbackId;switch(t){case"Callback":o._emitter.emit("callback@AppWorker:"+c,r);break;case"Event":var s=C(r.type);o._emitter.emit(t+"."+s,Object.assign({origin:a},r,{type:s}));break;case"Lifecycle":o._emitter.emit(t+"."+r.lifecycle,r.options);break;case"SetData":o._emitter.emit("Event.setdata",r);break;default:y('Unknown message type received from worker: "'+t+'"')}},j(e,this._onMessage)};I.prototype.dispatchMessage=function(e,t,n,o){d("Dispatch message to worker. (message: "+JSON.stringify(e)+")"),e.callbackId=this._genCallbackId(function(o){return o.status&&"SUCCESS"===o.status?t(o):(o.status,h("call API "+e.data.method+" from renderer failed: "+o.status+", "+o.error),n(o))},{keepAlive:o});try{e.keepAlive=!0,this.postMessage(e)}catch(e){n(e)}},I.prototype.postMessage=function(e){try{d("Call postMessage to worker. (message: "+JSON.stringify(e)+")"),j(this._weex,this._onMessage).postMessage(e)}catch(e){y(e.message||e.toString()||"postMessage failed.")}},I.prototype._genCallbackId=function(t,n){var o=n.keepAlive,r=n.callbackId,i=r||e();return this._emitter[o?"on":"once"]("callback@AppWorker:"+i,t),i},I.prototype.onReceiveMessage=function(e,t){var n=e.type,o=e.data;void 0===o&&(o={});var r=o.type;"Event"===n&&(r=C(r),o.type=r);var i=o.once?"once":"on";this._emitter[i](n+"."+r,t)},I.prototype.unbindEventListener=function(e,t){this._emitter.off(C(e),t)},I.prototype.emitEvent=function(e,t){void 0===t&&(t={});var n=C(e);this._emitter.emit("Event."+n,{type:n,data:t})};var R=function(e){function t(t,n){void 0===n&&(n={}),e.call(this),this._name=n.pageName||"",this.label=n.clientId||"",t&&i(t.config)&&(this._name=t.config.pageName||"",this.label=t.config.clientId||"",t.config.availableModules?(this.$registerModules(t.config.availableModules),this._gotAvailableModulesFromWeex=!0):v("No available modules in weex options.")),d("Create a new RendererRuntime. ("+this.label+", "+this._name+")"),this.bridge=new I(t,n),this._init()}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._init=function(){var e=this;this.bridge.onReceiveMessage({origin:"AppWorker",target:this.label,type:"Event",data:{type:"registerModules"}},function(t){t&&"registerModules"===t.type&&(d("Register available modules in renderer. ("+Object.keys(t.data)+")"),e.$registerModules(t.data))})},t.prototype.ready=function(){this.bridge.dispatchMessage({origin:this.label,target:"AppWorker",type:"Event",data:{type:"[[RendererRuntimeReady]]",data:{label:this.label,handshake:!this._gotAvailableModulesFromWeex}}},a,a)},t.prototype.$getCurrentActivePageId=function(){return this.label},t}(b),P=["$on","$once","$off","$emit","$cycle","$decycle","$call","$callAsync","$navTo","$getAvailableModules","$getCurrentActivePageId"];return function(e,n){var o=!(!e||!e.requireModule);!function(e){if(!e||!e.platform)return console.error("set logger environment failed.");Object.assign(u,e)}({platform:o&&e.config.env.platform,debugMode:o&&e.config.env.debugMode,isWeex:o}),d("Setup Windmill renderer framework."),e&&!e.requireModule&&(n=e,e=void 0),n||(n={}),(n=Object.assign({},n)).isWeex=o,d("Instantiate renderer in "+(o?"Weex container":"WindVane container")+".");var r=new R(e,n),i=function(e,t){var n={};return t.forEach(function(t){"function"==typeof e[t]&&(n[t]=function(){for(var n=[],o=arguments.length;o--;)n[o]=arguments[o];return e[t].apply(e,n)})}),n}(r,P);return d("Prepare runtime APIs: "+JSON.stringify(P)),n.exposeModuleGetter&&t(g,function(e,t){var n=t||function(){for(var t,n=[],o=arguments.length;o--;)n[o]=arguments[o];return(t=e()).$call.apply(t,n)};return function(e){if(!e)return d("Require a universal module proxy."),{call:n};var t=m[e];if(Array.isArray(t)){d('Require the "'+e+'" module.');var o={};return t.forEach(function(t){o[t]=function(){for(var o=[],r=arguments.length;r--;)o[r]=arguments[r];return n.apply(void 0,[e+"."+t].concat(o))}}),o}v('Require unknown module "'+e+"\".It may not exist or haven't been registered.")}}(function(){return i})),r.ready(),i}})}).call(this,n(4),n(17))},4:function(e,t){function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var o;o=function(){return this}();try{o=o||Function("return this")()||(0,eval)("this")}catch(e){"object"===("undefined"==typeof window?"undefined":n(window))&&(o=window)}e.exports=o},40:function(e,t,n){"use strict";function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(e){return e&&e.__esModule?e:{default:e}}(n(14));function i(e){return(i="function"==typeof Symbol&&"symbol"===o(Symbol.iterator)?function(e){return o(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":o(e)})(e)}var a=!1;try{addEventListener("test",null,{get passive(){a=!0}})}catch(e){}var c="textContent"in document?"textContent":"nodeValue",s=["touchstart","touchmove","touchend","touchcancel"],u=!a||{capture:!0,passive:!0},l={load:!0,error:!0,unload:!0,abort:!0,loadstart:!0,progress:!0,loadend:!0,blur:!0,focus:!0,scroll:!0,appear:!0,disappear:!0,invalid:!0};t.default=function(e){var t,n=e.worker,o=e.tagNamePrefix,a=void 0===o?"":o,f=new Map,p={};function d(e){return e?"BODY"===e.nodeName?document.body:f.get(e.$$id):null}function v(e){return e?f.delete(e.$$id):null}function h(e,t){l[t]?function(e,t){function o(o){var r={$$id:e.$$id};n.postMessage({type:"event",event:{type:t,target:r,currentTarget:r,detail:o.detail}})}e["__$".concat(t,"_listener__")]=o,e.addEventListener(t,o)}(e,t):p[t]?p[t]++:(p[t]=1,document.addEventListener(t,g,u))}function y(e){var t=e.changedTouches&&e.changedTouches[0]||e.touches&&e.touches[0]||e;return t&&{pageX:t.pageX,pageY:t.pageY}}function m(e){for(var t=[],n=0,o=e.length;n<o;n++){var r=e[n],i=r.clientX,a=r.clientY,c=r.pageX,s=r.pageY,u=r.identifier,l=r.target;t.push({clientX:i,clientY:a,pageX:c,pageY:s,identifier:u,$$id:l.$$id})}return t}function g(e){if("click"===e.type&&t)return!1;var o={type:e.type};for(var r in e.target&&(o.target=e.target.$$id),"scroll"===e.type&&e.target===document&&(o.target=document.body.$$id,o.scrollTop=document.documentElement.scrollTop||document.body.scrollTop),e.detail&&(o.detail=e.detail),e){var a=e[r];"object"===i(a)||"function"==typeof a||r===r.toUpperCase()||o.hasOwnProperty(r)||(o[r]=a)}if(-1!==s.indexOf(e.type)&&(o.touches=m(e.touches),o.changedTouches=m(e.changedTouches)),n.postMessage({type:"event",event:o}),"touchstart"===e.type)t=y(e);else if("touchend"===e.type&&t){var c=y(e);c&&Math.sqrt(Math.pow(c.pageX-t.pageX,2)+Math.pow(c.pageY-t.pageY,2))<10&&(o.type="click",n.postMessage({type:"event",event:o}))}}function b(e){var t;if(3===e.nodeType)t=document.createTextNode(e.data);else if(1===e.nodeType){if(t=document.createElement(a+e.nodeName),e.className&&(t.className=e.className),e.style&&(0,r.default)(t,e.style),e.attributes)for(var n=0;n<e.attributes.length;n++){var o=e.attributes[n];"object"===i(o.value)||"boolean"==typeof o.value?t[o.name]=o.value:t.setAttribute(o.name,o.value)}if(e.childNodes)for(var c=0;c<e.childNodes.length;c++)t.appendChild(b(e.childNodes[c]));if(e.events)for(var s=0;s<e.events.length;s++)h(t,e.events[s])}else 8===e.nodeType&&(t=document.createComment(e.data));return function(e,t){t.$$id=e.$$id,f.set(e.$$id,t)}(e,t),t}var w={childList:function(e){var t=e.target,n=e.removedNodes,o=e.addedNodes,r=e.nextSibling,i=t;i&&"BODY"===i.nodeName&&(document.body.$$id=i.$$id);var a=d(i);if(n)for(var c=n.length;c--;){var s=d(n[c]);v(s),a&&s&&a.removeChild(s)}if(o)for(var u=0;u<o.length;u++){var l=d(o[u]);l||(l=b(o[u])),a&&a.insertBefore(l,r&&d(r)||null)}},attributes:function(e){var t=e.target,n=e.attributeName,o=e.newValue,a=e.style,c=d(t);c&&(a?(0,r.default)(c,a):null==o?c.removeAttribute(n):"object"===i(o)||"boolean"==typeof o?c[n]=o:c.setAttribute(n,o))},characterData:function(e){var t=e.target,n=e.newValue;d(t)[c]=n},addEvent:function(e){var t=e.target,n=e.eventName,o=d(t);o&&h(o,n)},removeEvent:function(e){var t=e.target,n=e.eventName,o=d(t);o&&function(e,t){l[t]?function(e,t){var n=e["__$".concat(t,"_listener__")];n&&(e.removeEventListener(t,n),e["__$".concat(t,"_listener__")]=null)}(e,t):(p[t]--,0===p[t]&&document.removeEventListener(t,g))}(o,n)},canvasRenderingContext2D:function(e){var t=e.target,n=e.method,o=e.args,r=e.properties,i=d(t);if(i){var a=i.getContext("2d");if(r)for(var c in r)r.hasOwnProperty(c)&&(a[c]=r[c]);n&&a[n].apply(a,o)}}};n.onmessage=function(e){var t=e.data;if("MutationRecord"===t.type)for(var n=t.mutations,o=0;o<n.length;o++){var r=n[o];w[r.type](r)}},n.postMessage({type:"init",url:location.href,width:document.documentElement.clientWidth})},e.exports=t.default},6:function(e,t,n){"use strict";(function(e){n.d(t,"a",function(){return r});var o="undefined"!=typeof navigator?navigator.userAgent:"unknow";/iOS/.test(o),/Android/.test(o),/AliTB/.test(o);function r(){return void 0!==e?e:"undefined"!=typeof self?self:new Function("return this")()}}).call(this,n(4))},7:function(e,t,n){"use strict";function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function r(e){return(r="function"==typeof Symbol&&"symbol"===o(Symbol.iterator)?function(e){return o(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":o(e)})(e)}function i(){}var a="function"==typeof setImmediate&&setImmediate||function(e){"function"==typeof setTimeout?setTimeout(e,0):e()},c=function(e){"undefined"!=typeof console&&console&&console.log("Possible Unhandled Promise Rejection:",e)};function s(e){if("object"!==r(this))throw new TypeError("Promises must be constructed via new");if("function"!=typeof e)throw new TypeError("Promise resolver is not a function");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],d(e,this)}function u(e,t){for(;3===e._state;)e=e._value;0!==e._state?(e._handled=!0,a(function(){var n=1===e._state?t.onFulfilled:t.onRejected;if(null!==n){var o;try{o=n(e._value)}catch(e){return void f(t.promise,e)}l(t.promise,o)}else(1===e._state?l:f)(t.promise,e._value)})):e._deferreds.push(t)}function l(e,t){try{if(t===e)throw new TypeError("A promise cannot be resolved with itself.");if(t&&("object"===r(t)||"function"==typeof t)){var n=t.then;if(t instanceof s)return e._state=3,e._value=t,void p(e);if("function"==typeof n)return void d(function(e,t){return function(){e.apply(t,arguments)}}(n,t),e)}e._state=1,e._value=t,p(e)}catch(t){f(e,t)}}function f(e,t){e._state=2,e._value=t,p(e)}function p(e){2===e._state&&0===e._deferreds.length&&a(function(){e._handled||c(e._value)});for(var t=0,n=e._deferreds.length;t<n;t++)u(e,e._deferreds[t]);e._deferreds=null}function d(e,t){var n=!1;try{e(function(e){n||(n=!0,l(t,e))},function(e){n||(n=!0,f(t,e))})}catch(e){if(n)return;n=!0,f(t,e)}}s.prototype.catch=function(e){return this.then(null,e)},s.prototype.then=function(e,t){var n=new this.constructor(i);return u(this,new function(e,t,n){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof t?t:null,this.promise=n}(e,t,n)),n},s.all=function(e){var t=Array.prototype.slice.call(e);return new s(function(e,n){if(0===t.length)return e([]);var o=t.length;function i(a,c){try{if(c&&("object"===r(c)||"function"==typeof c)){var s=c.then;if("function"==typeof s)return void s.call(c,function(e){i(a,e)},n)}t[a]=c,0==--o&&e(t)}catch(e){n(e)}}for(var a=0;a<t.length;a++)i(a,t[a])})},s.resolve=function(e){return e&&"object"===r(e)&&e.constructor===s?e:new s(function(t){t(e)})},s.reject=function(e){return new s(function(t,n){n(e)})},s.race=function(e){return new s(function(t,n){for(var o=0,r=e.length;o<r;o++)e[o].then(t,n)})},s._setImmediateFn=function(e){a=e},s._setUnhandledRejectionFn=function(e){c=e},e.exports=s},9:function(e,t,n){"use strict";t.decode=t.parse=n(18),t.encode=t.stringify=n(19)}});
{
"name": "miniapp-framework",
"version": "0.1.11",
"version": "0.1.12",
"description": "",

@@ -35,3 +35,3 @@ "files": [

"uglify-js": "^3.4.4",
"windmill-module-api": "^0.2.22"
"windmill-module-api": "^0.2.23"
},

@@ -38,0 +38,0 @@ "devDependencies": {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc