You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

3 lines
501 KiB

4 years ago
//{"version":"3.1.18"}
var __UniServiceStartTime__=Date.now(),global=this,process={env:{}},setTimeout=global.setTimeout;!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t():"function"==typeof define&&define.amd?define(t):t()}(0,function(){"use strict";var subversion={framework:"0.29.6",transformer:">=0.1.5 <0.5"};function getHookKey(e,t,n){return t+"@"+n+"#"+e}var CallbackManager=function(e){this.instanceId=String(e),this.lastCallbackId=0,this.callbacks={},this.hooks={}};CallbackManager.prototype.add=function(e){return this.lastCallbackId++,this.callbacks[this.lastCallbackId]=e,this.lastCallbackId},CallbackManager.prototype.remove=function(e){var t=this.callbacks[e];return delete this.callbacks[e],t},CallbackManager.prototype.registerHook=function(e,t,n,r){var i=getHookKey(e,t,n);this.hooks[i]&&console.warn('[JS Framework] Override an existing component hook "'+i+'".'),this.hooks[i]=r},CallbackManager.prototype.triggerHook=function(e,t,n,r){var i=getHookKey(e,t,n),o=this.hooks[i];if("function"!=typeof o)return console.error("[JS Framework] Invalid hook function type ("+typeof o+') on "'+i+'".'),null;var a=null;try{a=o.apply(null,r||[])}catch(e){throw console.error('[JS Framework] Failed to execute the hook function on "'+i+'".'),e}return a},CallbackManager.prototype.consume=function(e,t,n){var r=this.callbacks[e];if(void 0!==n&&!1!==n||delete this.callbacks[e],"function"==typeof r)try{return r.call(null,t,n)}catch(e){throw console.error("[JS Framework] Failed to execute the callback function:\n "+e.toString()),e}return new Error('invalid callback id "'+e+'"')},CallbackManager.prototype.close=function(){this.callbacks={},this.hooks={}};var nextNodeRef=1;function uniqueId(){return(nextNodeRef++).toString()}function typof(e){var t=Object.prototype.toString.call(e);return t.substring(8,t.length-1)}function isPlainObject(e){return"[object Object]"===Object.prototype.toString.call(e)}function hasOwn(e,t){return isPlainObject(e)&&Object.prototype.hasOwnProperty.call(e,t)}function bufferToBase64(e){if("function"!=typeof btoa)return"";var t=Array.prototype.map.call(new Uint8Array(e),function(e){return String.fromCharCode(e)}).join("");return btoa(t)}function isEmpty(e){if(!e||"object"!=typeof e)return!0;for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t))return!1;return!0}var LEVELS=["off","error","warn","info","log","debug"],levelMap={};function generateLevelMap(){LEVELS.forEach(function(t){var n=LEVELS.indexOf(t);levelMap[t]={},LEVELS.forEach(function(e){LEVELS.indexOf(e)<=n&&(levelMap[t][e]=!0)})})}function checkLevel(e){var t=global.WXEnvironment&&global.WXEnvironment.logLevel||"log";return levelMap[t]&&levelMap[t][e]}function debugLog(e){global.nativeLog("wxInteractionAnalyzer: [jsfm]"+e,"__DEBUG")}var docMap={};function addDoc(e,t){e&&(docMap[e]=t)}function getDoc(e){return docMap[e]}function removeDoc(e){delete docMap[e]}function getTaskCenter(e){var t=docMap[e];return t&&t.taskCenter?t.taskCenter:null}function appendBody(e,t,n){var r=e.documentElement;if(!(0<r.pureChildren.length||t.parentNode)){var i=r.children,o=i.indexOf(n);o<0?i.push(t):i.splice(o,0,t),1===t.nodeType?("body"===t.role?(t.docId=e.id,t.ownerDocument=e,t.parentNode=r,linkParent(t,r)):(t.children.forEach(function(e){e.parentNode=t}),setBody(e,t),t.docId=e.id,t.ownerDocument=e,linkParent(t,r),delete e.nodeMap[t.nodeId]),r.pureChildren.push(t),sendBody(e,t)):(t.parentNode=r,e.nodeMap[t.ref]=t),t.ready=!0,t.computeClassList&&t.computeClassList()}}function sendBody(e,t){var n=t.toJSON();e&&e.taskCenter&&"function"==typeof e.taskCenter.send&&e.taskCenter.send("dom",{action:"createBody"},[n])}function setBody(e,t){t.role="body",t.depth=1,delete e.nodeMap[t.nodeId],t.ref="_root",e.nodeMap._root=t,e.body=t}function linkParent(t,e){(t.parentNode=e).docId&&(t.docId=e.docId,t.ownerDocument=e.ownerDocument,(t.ownerDocument.nodeMap[t.nodeId]=t).depth=e.depth+1),t.children.forEach(function(e){linkParent(e,t)})}function nextElement(e){for(;e;){if(1===e.nodeType)return e;e=e.nextSibling}}function previousElement(e){for(;e;){if(1===e.nodeType)return e;e=e.previousSibl