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.
1 lines
146 KiB
1 lines
146 KiB
var plusContext={};const DC_INTERVAL_ID="__dc__Interval_id__";var __dc__setInterval=function(e,t){return setIntervalWeex(DC_INTERVAL_ID,e,t)},__dc__clearInterval=function(e){clearIntervalWeex(DC_INTERVAL_ID,e)};plusContext.setInterval=__dc__setInterval,plusContext.clearInterval=__dc__clearInterval,plusContext.setTimeout=function(e,t){var n=arguments.length,i=Array(2<n?n-2:0);for(idx=2;idx<n;idx++)i[idx-2]=arguments[idx];var o=__dc__setInterval(function(){__dc__clearInterval(o),e.apply(void 0,i)},t=t||1);return o},plusContext.clearTimeout=__dc__clearInterval,plusContext.getLocationHerf=function(e){return e.weex.config.bundleUrl};var PlusObject=function(plusContext,param){plusContext.__param__=param;var dc_plusobjects={},dc_plusMouldes={};function PlusObject(e,t){for(var n in this.weex=t,this.__HtMl_Id__,this.weexBridge=t.requireModule("plus"),this.globalEvent=t.requireModule("globalEvent"),dc_plusMouldes){var i;this[n]||(i=dc_plusMouldes[n](plusContext,this,this.require,param[n]))&&(this[n]=i)}}return PlusObject.prototype.updateConfigInfo=function(){var e=this.weexBridge.getConfigInfo();if(e)for(var t in"string"==typeof e&&(e=JSON.parse(e)),this.__WebVieW_Id__=e.__WebVieW_Id__,this.__HtMl_Id__=e.__HtMl_Id__,e){var n=this[t];if("object"==typeof n&&e[t])if(n.updateInfo)n.updateInfo(e[t]);else{var i,o=e[t];for(i in o)n[i]=n[i]||o[i]}}},PlusObject.prototype.require=function(e){var t;return this[e]||(t=dc_plusMouldes[e](plusContext,this,this.require,param[e]))&&(this[e]=t),this[e]},PlusObject.prototype.importMoudle=function(name){if(this[name])return this[name];var script=this.weexBridge.importMoudle(name);return eval(script),this.require(name)},PlusObject.register=function(e,t){dc_plusMouldes[e]=t},PlusObject.newPlus=function(e,t){var n=dc_plusobjects[e];return n||((n=new PlusObject(e,t)).updateConfigInfo(),dc_plusobjects[e]=n),n},PlusObject.deletePlus=function(e){dc_plusobjects[e]&&delete dc_plusobjects[e]},PlusObject}(plusContext,param);function WebviewGroupMoudle(e,s,t){var c="WebviewGroup";function n(e,t){s.webview.NView.prototype.constructor.apply(this,[c]),this.__children=[];var n=[];if(Array.isArray(e))for(var i=0;i<e.length;i++){var o=e[i];o.styles=o.styles||{},o.styles.name=o.id;var r=new s.webview.Webview(o.url,o.styles,!0,o.extras);s.webview.__pushWindow__(r),this.__children.push(r);o=[r.__uuid__,[o.url,o.styles,r.__callback_id__,location.host+location.pathname,o.extras]];n.push(o)}s.webview.exec(this,"createGroup",[n,t,this.__callback_id__])}var i=n.prototype;return(s=s).tools.extend(i,t.NView.prototype),(i.constructor=n).prototype.setSelectIndex=function(e){s.webview.exec(this,"setSelectIndex",[e])},n.prototype.children=function(){return this.__children},t.createGroup=function(e,t){return new n(e,t)},n}function LoadWebviewMoudle(e,u,t){var l=t,_="NWindow",c=(u=u).bridge,f=u.tools;function d(){return e.getLocationHerf(u)}function p(e){if(Array.isArray(e))for(var t=0;t<e.length;t++)n(e[t])}function n(e){var t;(t=e).onclick&&"function"==typeof t.onclick&&(e=c.callbackId(function(){t.onclick(t)}),t.__cb__={id:e,htmlId:u.__HtMl_Id__})}function h(e){if(Array.isArray(e))for(var t,n=0;n<e.length;n++)(t=e[n])&&"input"==t.tag?t.inputStyles&&(t.inputStyles.onComplete&&"function"==typeof t.inputStyles.onComplete&&(t.inputStyles.__onCompleteCallBackId__=c.callbackId(t.inputStyles.onComplete)),t.inputStyles.onFocus&&"function"==typeof t.inputStyles.onFocus&&(t.inputStyles.__onFocusCallBackId__=c.callbackId(t.inputStyles.onFocus)),t.inputStyles.onBlur&&"function"==typeof t.inputStyles.onBlur&&(t.inputStyles.__onBlurCallBackId__=c.callbackId(t.inputStyles.onBlur))):t&&"richtext"==t.tag&&t.richTextStyles&&t.richTextStyles.onClick&&"function"==typeof t.richTextStyles.onClick&&(t.richTextStyles.__onClickCallBackId__=c.callbackId(t.richTextStyles.onClick))}function i(e,t,n,i){if(this.__view_array__=new Array,l.NView.prototype.constructor.apply(this,[_]),this.id=null,t&&t.name&&(this.id=t.name),i)for(var o in i)this[o]=i[o];!this.id&&e&&(this.id=t.name=e),f.platform==f.IOS&&t&&t.navigationbar&&(this.__navigationbar__=t.navigationbar);var r=[],s=null;if(t&&(s=t.titleNView||t.navigationbar)&&(s.uuid="_Nav_Bar_"+this.__uuid__,r.push(s.uuid),u.nativeObj.__appendSubViewInfo(s),p(s.buttons),h(s.tags)),t&&t.subNViews&&Array.isArray(t.subNViews)){for(var c=0;c<t.subNViews.length;c++){var a=t.subNViews[c];h(a.tags),a.uuid=f.UUID("Nativeview"),r.push(a.uuid),u.nativeObj.__appendSubViewInfo(a)}this.__subNViewsUids__=r,this.checkJSObject=!0,setTimeout(function(){this.checkJSObject=!1,u.nativeObj.__removeSubViewInfos(r)})}n||(l.__pushWindow__(this),l.exec(this,_,[e,t,this.__callback_id__,d(),i]))}var o=i.prototype;function r(){e.__needNotifyNative__&&"touchmove"==this.type&&(e.__needNotifyNative__=l.execSync(u.webview.currentWebview(),"needTouchEvent",[])),o.oldPreventDefault.call(this)}return u.tools.extend(o,l.NView.prototype),o.constructor=i,o.show=function(e,t,n,i){var o;n&&"function"==typeof n&&(o=c.callbackId(function(){n()})),l.exec(this,"show",[e,t,null,o,i])},o.close=function(e,t,n){this===u.webview.__JSON_Window_Stack[u.__HtMl_Id__]&&u.bridge.callbackFromNative(this.__callback_id__,{status:u.bridge.OK,message:{evt:"close"},keepCallback:!0}),l.exec(this,"close",[e,t,n])},o.setStyle=function(e){var t;e&&"object"==typeof e&&(!e||(t=e.titleNView||e.navigationbar)&&(h(t.tags),p(t.buttons)),l.exec(this,"setOption",[e]))},o.updateSubNViews=function(e){if(Array.isArray(e))for(var t,n=0;n<e.length;n++)(t=e[n])&&h(t.tags);l.exec(this,"updateSubNViews",[e])},o.nativeInstanceObject=function(){var e=u.ios||u.android;return e&&e.getWebviewById?e.getWebviewById(this.__uuid__):null},o.hide=function(e,t,n){l.exec(this,"hide",[e,t,n])},o.setVisible=function(e){l.exec(this,"setVisible",[e])},o.pause=function(){l.exec(this,"pause",[])},o.resume=function(){l.exec(this,"resume",[])},o.isPause=function(){return l.execSync(this,"isPause",[])},o.isVisible=function(){return l.execSync(this,"isVisible",[])},o.setFixBottom=function(e){l.exec(this,"setFixBottom",[e])},o.getSubNViews=function(){var e=[],t=l.execSync(this,"getSubNViews",[]);if(t&&Array.isArray(t)&&0<t.length){for(var n=0;n<t.length;n++){var i=u.nativeObj.View.__getViewByUidAndCreate(t[n]);e.push(i)}return e}if(this.checkJSObject&&this.__subNViewsUids__)for(n=0;n<this.__subNViewsUids__.length;n++)(i=u.nativeObj.View.__getViewByUidFromCache(this.__subNViewsUids__[n]))&&e.push(i);return e},o.getNavigationbar=function(){return this.getTitleNView()},o.setTitleNViewButtonBadge=function(e){l.exec(this,"setTitleNViewButtonBadge",[e])},o.removeTitleNViewButtonBadge=function(e){l.exec(this,"removeTitleNViewButtonBadge",[e])},o.showTitleNViewButtonRedDot=function(e){l.exec(this,"showTitleNViewButtonRedDot",[e])},o.hideTitleNViewButtonRedDot=function(e){l.exec(this,"hideTitleNViewButtonRedDot",[e])},o.setTitleNViewSearchInputFocus=function(e){l.exec(this,"setTitleNViewSearchInputFocus",[e])},o.setTitleNViewSearchInputText=function(e){l.exec(this,"setTitleNViewSearchInputText",[e])},o.getTitleNViewSearchInputText=function(){return l.execSync(this,"getTitleNViewSearchInputText")},o.setTitleNViewButtonStyle=function(e,t){null!=e&&t&&(n(t),l.exec(this,"setTitleNViewButtonStyle",[e,t]))},o.getTitleNView=function(){var e,t;return f.platform==f.IOS?(t="_Nav_Bar_"+this.__uuid__,!(e=u.nativeObj.View.getViewById(t))&&this.__navigationbar__&&((e=new u.nativeObj.View(t,this.__navigationbar__,"",!0)).__uuid__=t)):(t=this.__uuid__,(e=u.nativeObj.View.getViewById(t))?!e&&this.__navigationbar__&&((e=new u.nativeObj.View(t,this.__navigationbar__,"",!0)).__uuid__=t):(t=l.execSync(this,"getTitleNView",[]))&&((e=new u.nativeObj.View(t.id,t.styles,!0)).__uuid__=t.uuid)),e},e.__needNotifyNative__=!1,o.__needTouchEvent__=function(){Event.prototype.preventDefault!==r&&(o.oldPreventDefault=Event.prototype.preventDefault,Event.prototype.preventDefault=r)},o.drag=function(e,t,n){if(e&&e.direction&&"string"==typeof e.direction&&e.moveMode&&"string"==typeof e.moveMode){var i=e.moveMode.toLocaleLowerCase();if("followfinger"==i||"follow"==i||"silent"==i||"bounce"==i){var o,r,s=e.direction.toLocaleLowerCase();if("left"==s||"right"==s||"rtl"==s||"ltr"==s){if("rtl"==s&&(e.direction="left"),"ltr"==s&&(e.direction="right"),t){s=t.view;if(null!=s&&("string"==typeof s||s instanceof u.webview.Webview||s instanceof u.nativeObj.View)&&("string"!=typeof s&&(t.view=s.__uuid__),t.moveMode)){if("string"!=typeof t.moveMode)return;s=t.moveMode.toLocaleLowerCase();if("follow"!=s&&"silent"!=s)return;if("silent"==i&&"silent"==s)return}}n&&"function"==typeof n&&(o=u.webview.currentWebview().__uuid__,r=c.callbackId(n)),l.exec(this,"drag",[e,t,o,r])}}}},o.setJsFile=function(e,t){e&&"string"==typeof e&&l.exec(this,"setPreloadJsFile",[e,t])},o.appendJsFile=function(e){e&&"string"==typeof e&&l.exec(this,"appendPreloadJsFile",[e])},o.setContentVisible=function(e){l.exec(this,"setContentVisible",[e])},o.opener=function(){var e=l.execSync(this,"opener",[]);return e?u.webview._find__Window_By_UUID__(e.uuid,e.id,e.extras):null},o.opened=function(){var e=l.execSync(this,"opened",[]);if(e){for(var t=[],n={},i=0;i<e.length;i++){var o=e[i],r=u.webview.__JSON_Window_Stack[o];r||((r=new u.webview.Webview(null,null,!0,o.extras)).__uuid__=o.uuid,r.id=o.id,c.exec("UI","execMethod",["UI","setcallbackid",[r.__uuid__,[r.__callback_id__]]])),t.push(r),n[r.__uuid__]=r}return t}},o.remove=function(e){var t;if("string"==typeof e)t=e;else{if(!(e instanceof u.webview.Webview))return e instanceof u.nativeObj.View?void l.exec(this,"removeNativeView",[_,e.__uuid__]):void 0;t=e.__uuid__}l.exec(this,"remove",[t])},o.removeFromParent=function(){l.exec(this,"removeFromParent",[])},o.parent=function(){var e=l.execSync(this,"parent",[]);return e?u.webview._find__Window_By_UUID__(e.uuid,e.id,e.extras):null},o.children=function(){for(var e=[],t=l.execSync(this,"children",[]),n=0;n<t.length;n++)e.push(u.webview._find__Window_By_UUID__(t[n].uuid,t[n].id,t[n].extras));return e},o.getURL=function(){return l.execSync(this,"getUrl",[])},o.getTitle=function(){return l.execSync(this,"getTitle",[])},o.getStyle=function(){return l.execSync(this,"getOption")},o.loadURL=function(e,t){e&&"string"==typeof e&&l.exec(this,"load",[e,d(),t])},o.loadData=function(e,t){e&&"string"==typeof e&&l.exec(this,"loadData",[e,t])},o.stop=function(){l.exec(this,"stop",[])},o.reload=function(e){l.exec(this,"reload",[e])},o.draw=function(e,t,n,i){var o,r;f.platform==f.IOS?e.__captureWebview?e.__captureWebview(this.__uuid__,i,t,n):"function"==typeof n&&n({code:-1,message:"参数错误"}):(o=function(e){"function"==typeof n&&n(e)},e&&e.__id__?(r=c.callbackId(function(){"function"==typeof t&&t()},o),l.exec(this,"draw",[e.__id__,this.__uuid__,r,i])):o({code:-1,message:"已经销毁的对象"}))},o.checkRenderedContent=function(e,t,n){var i=c.callbackId(function(e){"function"==typeof t&&t(e)},function(e){"function"==typeof n&&n(e)});l.exec(this,"checkRenderedContent",[this.__uuid__,i,e])},o.back=function(){l.exec(this,"back",[])},o.forward=function(){l.exec(this,"forward",[])},o.canBack=function(n){var e;n&&"function"==typeof n&&(n&&(e=c.callbackId(function(e){var t={};t.canBack=e,n(t)})),l.exec(this,"canBack",[e]))},o.canForward=function(n){var e;n&&"function"==typeof n&&(n&&(e=c.callbackId(function(e){var t={};t.canForward=e,n(t)})),l.exec(this,"canForward",[e]))},o.clear=function(){l.exec(this,"clear",[])},o.evalJS=function(e){e&&"string"==typeof e&&l.exec(this,"evalJS",[e])},o.evalJSSync=function(e){if(e&&"string"==typeof e)return l.execSync(this,"evalJSSync",[e])},o.test=function(e){l.exec(this,"test",[e])},o.append=function(e){e&&(e instanceof i||e instanceof u.webview.WebviewGroup?(this.__view_array__.push(e),l.exec(this,"append",[e.__IDENTITY__,e.__uuid__])):e instanceof u.nativeObj.View?l.exec(this,"appendNativeView",[e.IDENTITY||_,e.__uuid__]):l.exec(this,"appendNativeView",[e.IDENTITY||_,e.__uuid__||e.id||e._UUID_]))},o.setPullToRefresh=function(e,t){var n;t&&(n=u.bridge.callbackId(t)),this.addEventListener("pulldownrefreshevent",t,!1),l.exec(this,"setPullToRefresh",[e,n])},o.endPullToRefresh=function(){l.exec(this,"endPullToRefresh",[])},o.beginPullToRefresh=function(){l.exec(this,"beginPullToRefresh",[])},o.setBounce=function(e,t){l.exec(this,"setBounce",[e,t])},o.resetBounce=function(){l.exec(this,"resetBounce",[])},o.setBlockNetworkImage=function(e){l.exec(this,"setBlockNetworkImage",[e])},o.captureSnapshot=function(e,t,n){var i="function"!=typeof t?null:function(e){t()},o="function"!=typeof n?null:function(e){n(e)},o=u.bridge.callbackId(i,o);u.tools.platform==u.tools.IOS?i():l.exec(this,"captureSnapshot",[e,o])},o.clearSnapshot=function(e){u.tools.platform!=u.tools.IOS&&l.exec(this,"clearSnapshot",[e])},o.overrideUrlLoading=function(e,t){var n=c.callbackId(function(e){"function"==typeof t&&t(e)});l.exec(this,"overrideUrlLoading",[e,n])},o.overrideResourceRequest=function(e){l.exec(this,"overrideResourceRequest",[e])},o.isHardwareAccelerated=function(){return f.platform!=f.IOS&&l.execSync(this,"isHardwareAccelerated",[])},o.listenResourceLoading=function(e,t){var n=c.callbackId(function(e){"function"==typeof t&&t(e)});l.exec(this,"listenResourceLoading",[e,n])},o.setCssFile=function(e){l.exec(this,"setCssFile",[e])},o.setCssText=function(e){l.exec(this,"setCssText",[e])},o.showBehind=function(e){l.exec(this,"showBehind",[e.__IDENTITY__,e.__uuid__])},o.animate=function(e,t){var n;f.platform!=f.IOS?(t&&(n=c.callbackId(function(){"function"==typeof t&&t()})),l.exec(this,"webview_animate",[e,n])):setTimeout(t,10)},o.interceptTouchEvent=function(e){l.exec(this,"interceptTouchEvent",[e])},o.setFavoriteOptions=function(e){l.exec(this,"setFavoriteOptions",[e])},o.getFavoriteOptions=function(){return l.execSync(this,"getFavoriteOptions")},o.setShareOptions=function(e){l.exec(this,"setShareOptions",[e])},o.getShareOptions=function(){return l.execSync(this,"getShareOptions")},o.getSafeAreaInsets=function(){return u.tools.ANDROID==u.tools.platform?{bottom:0,left:0,right:0,top:0,deviceBottom:0,deviceLeft:0,deviceRight:0,deviceTop:0}:l.execSync(this,"getSafeAreaInsets")},o.restore=function(){l.exec(this,"webview_restore",null)},o.setSoftinputTemporary=function(e){l.exec(this,"setSoftinputTemporary",[e])},i}service.register("weexPlus",{create:function(t,e,n){return{instance:{WeexPlus:function(e){return PlusObject.newPlus(t,e)}}}},refresh:function(e,t,n){},destroy:function(e,t){PlusObject.deletePlus(e)}}),PlusObject.register("tools",function(t,e,n,i){var o={__UUID__:0,UNKNOWN:-1,IOS:0,ANDROID:1,platform:-1,debug:!1,UUID:function(e){return e+this.__UUID__+++(new Date).valueOf()},extend:function(e,t){for(var n in t)e[n]=t[n]},typeName:function(e){return Object.prototype.toString.call(e).slice(8,-1)},isDate:function(e){return"Date"==this.typeName(e)},isArray:function(e){return"Array"==this.typeName(e)},isDebug:function(){return this.debug},stringify:function(e){return(t&&t.JSON3?t.JSON3:JSON).stringify(e)},isNumber:function(e){return"number"==typeof e||e instanceof Number},getElementOffsetInWebview:function(e,t){for(var n=0,i=e;i;)n+=i[t],i=i.offsetParent;return n},getElementOffsetXInWebview:function(e){return this.getElementOffsetInWebview(e,"offsetLeft")},getElementOffsetYInWebview:function(e){return this.getElementOffsetInWebview(e,"offsetTop")},execJSfile:function(e){var t=document.createElement("script");t.type="text/javascript",t.src=e,function e(t){var n=document.head,i=document.body;n?n.insertBefore(t,n.firstChild):i?i.insertBefore(t,i.firstChild):setTimeout(function(){e(t)},100)}(t)},copyObjProp2Obj:function(e,t,n){var i,o=!!Array.isArray(n);for(i in t){var r=!0;if(o)for(var s=0;s<n.length;s++)if(i==n[s]){r=!1;break}r?e[i]=t[i]:r=!0}},clone:function(e){if(!e||"function"==typeof e||this.isDate(e)||"object"!=typeof e)return e;var t,n;if(this.isArray(e)){for(t=[],n=0;n<e.length;++n)t.push(this.clone(e[n]));return t}for(n in t={},e)n in t&&t[n]==e[n]||(t[n]=o.clone(e[n]));return t}};return o.debug=!(!t.__param__||!t.__param__.debug),o.platform=t.__param__.platform,o}),PlusObject.register("bridge",function(plusContext,plus,require,param){var T=plus.tools;return plus.globalEvent.addEventListener("nativeToUniJs",function(e){if(e)try{eval(e.data)}catch(e){}}),{NO_RESULT:0,OK:1,CLASS_NOT_FOUND_EXCEPTION:2,ILLEGAL_ACCESS_EXCEPTION:3,INSTANTIATION_EXCEPTION:4,MALFORMED_URL_EXCEPTION:5,IO_EXCEPTION:6,INVALID_ACTION:7,JSON_EXCEPTION:8,ERROR:9,callbacks:{},exec:function(e,t,n,i,o){n&&n.push(i),T.IOS==T.platform?plus.weexBridge.exec(T.stringify([plus.__HtMl_Id__,e,t,i||null,n])):T.ANDROID==T.platform&&plus.weexBridge.exec(T.stringify(n),"pdr:"+T.stringify([e,t,!0]))},execSync2:function(e,t,n,i,o){return this.execSync(e,t,n,i,o)},execSync:function(service,action,args,fn,force){var ret,json,ret;if(T.IOS==T.platform?(json=T.stringify([plus.__HtMl_Id__,service,action,null,args]),ret=plus.weexBridge.execSync(json)):T.ANDROID==T.platform&&(ret=plus.weexBridge.execSync(T.stringify(args),"pdr:"+T.stringify([service,action,!1]))),fn)return fn(ret);var _ret=void 0;try{_ret=eval(ret)}catch(e){}return _ret},nativeEval:function(e){e()},callbackFromNative:function(e,t){var n=this.callbacks[e];n&&(t.status==this.OK&&n.success?n.success&&n.success(t.message):n.fail&&n.fail(t.message),t.keepCallback||delete this.callbacks[e])},callbackId:function(e,t){var n=T.UUID("plus");return this.callbacks[n]={success:e,fail:t},n}}}),PlusObject.register("obj",function(e,t,n,i){function o(){var s=this;s.__callbacks__={},s.__callback_id__=t.bridge.callbackId(function(e){var t=e.evt,n=e.args,i=s.__callbacks__[t];if(i)for(var o=i.length,r=0;r<o;r++)s.onCallback(i[r],t,n)})}return o.prototype.addEventListener=function(e,t,n){var i=!1;return t&&this.__callbacks__&&(this.__callbacks__[e]||(this.__callbacks__[e]=[],i=!0),this.__callbacks__[e].push(t)),i},o.prototype.removeEventListener=function(e,t){var n=!1,i=this;return i.__callbacks__&&i.__callbacks__[e]&&(i.__callbacks__[e].pop(t),(n=0===i.__callbacks__[e].length)&&(i.__callbacks__[e]=null)),n},{Callback:o}}),PlusObject.register("device",function(e,t,n,i){var r=t.require("bridge");return{imei:i&&i.imei||"",imsi:i&&i.imsi||[],model:i&&i.model||"",vendor:i&&i.vendor||"",uuid:i&&i.uuid||"",dial:function(e,t){r.exec("Device","dial",[e,t])},beep:function(e){r.exec("Device","beep",[e])},vibrate:function(e){r.exec("Device","vibrate",[e])},setWakelock:function(e){r.exec("Device","setWakelock",[e])},isWakelock:function(){return r.execSync("Device","isWakelock",[])},setVolume:function(e){r.execSync("Device","setVolume",[e])},getVolume:function(){return r.execSync("Device","getVolume",[])},execCallback:function(t,e){var n="function"!=typeof t.complete?function(){}:t.complete,i="function"!=typeof t.success?n:function(e){t.success(e),n(e)},o="function"!=typeof t.fail?n:function(e){t.fail(e),n(e)};callbackID=r.callbackId(i,o),r.exec("Device",e,[callbackID])},getInfo:function(e){this.execCallback(e,"getInfo")},getOAID:function(e){this.execCallback(e,"getOAID")},getVAID:function(e){this.execCallback(e,"getVAID")},getAAID:function(e){this.execCallback(e,"getAAID")},isCaptured:function(){return r.execSync("Device","isCaptured",[])},updateInfo:function(e){e&&(this.imei=e.imei,this.imsi=e.imsi,this.model=e.model,this.vendor=e.vendor,this.uuid=e.uuid)}}}),PlusObject.register("os",function(e,t,n,i){return{language:(i=i||{}).language||null,version:i.version||null,name:i.name||null,vendor:i.vendor||null,updateInfo:function(e){e&&(this.language=e.language,this.version=e.version,this.name=e.name,this.vendor=e.vendor)}}}),PlusObject.register("screen",function(e,t,n,i){var o=t.require("bridge");return{resolutionHeight:(i=i||{}).resolutionHeight||null,resolutionWidth:i.resolutionWidth||null,scale:i.scale||null,dpiX:i.dpiX||null,dpiY:i.dpiY||null,height:i.height||null,width:i.width||null,setBrightness:function(e,t){o.execSync("Device","setBrightness",[e,t])},lockOrientation:function(e){o.exec("Device","lockOrientation",[e])},unlockOrientation:function(){o.exec("Device","unlockOrientation",[])},getBrightness:function(e){return o.execSync("Device","getBrightness",[e])},getCureentSize:function(){return o.execSync("Device","getCurrentSize",[])},getCurrentSize:function(){return o.execSync("Device","getCurrentSize",[])},updateInfo:function(e){e&&(this.resolutionHeight=e.resolutionHeight,this.resolutionWidth=e.resolutionWidth,this.scale=e.scale,this.dpiX=e.dpiX,this.dpiY=e.dpiY,this.width=e.width,this.height=e.height)}}}),PlusObject.register("display",function(e,t,n,i){return{resolutionHeight:(i=i||{}).resolutionHeight||null,resolutionWidth:i.resolutionWidth||null,updateInfo:function(e){e&&(this.resolutionHeight=e.resolutionHeight,this.resolutionWidth=e.resolutionWidth)}}}),PlusObject.register("networkinfo",function(e,t,n,i){var o=t.require("bridge");return{CONNECTION_TYPE:i.CONNECTION_TYPE,CONNECTION_UNKNOW:0,CONNECTION_NONE:1,CONNECTION_ETHERNET:2,CONNECTION_WIFI:3,CONNECTION_CELL2G:4,CONNECTION_CELL3G:5,CONNECTION_CELL4G:7,getCurrentType:function(){return o.execSync("Device","getCurrentType",null)},getCurrentAPN:function(){return o.execSync("Device","getCurrentAPN",null)},isSetProxy:function(){return o.execSync("Device","isSetProxy",null)}}}),PlusObject.register("runtime",function(e,t,n,i){var c=t.bridge,a="Runtime";return{appid:null,arguments:(i=i||{}).arguments||null,version:i.version||null,innerVersion:i.innerVersion||null,uniVersion:i.uniVersion||null,launchLoadedTime:null,launcher:null,origin:null,processId:null,startupTime:null,restart:function(){c.exec(a,"restart",[])},install:function(e,t,n,i){i=c.callbackId(n,i);c.exec(a,"install",[e,i,t])},getProperty:function(e,t){t=c.callbackId(t);c.exec(a,"getProperty",[e,t])},quit:function(){c.exec(a,"quit",[])},openURL:function(e,t,n){var i=c.callbackId(null,function(e){"function"==typeof t&&t(e)});c.exec(a,"openURL",[e,i,n])},launchApplication:function(e,t){var n=c.callbackId(null,function(e){"function"==typeof t&&t(e)});c.exec(a,"launchApplication",[e,n])},setBadgeNumber:function(e,t){"number"==typeof e&&c.exec(a,"setBadgeNumber",[e,t])},openFile:function(e,t,n){var i=c.callbackId(null,function(e){"function"==typeof n&&n(e)});c.exec(a,"openFile",[e,t,i])},isStreamValid:function(){return c.execSync(a,"isStreamValid")},openWeb:function(e){return c.exec(a,"openWeb",[e])},isApplicationExist:function(e){return null!=e&&"string"!=typeof e&&c.execSync(a,"isApplicationExist",[e])},processDirectPage:function(){return c.execSync(a,"processDirectPage",[])},isCustomLaunchPath:function(){return c.execSync(a,"isCustomLaunchPath")},updateInfo:function(e){e&&(this.appid=e.appid,this.arguments=e.arguments,this.version=e.version,this.versionCode=e.versionCode,this.innerVersion=e.innerVersion,this.uniVersion=e.uniVersion,this.launchLoadedTime=e.launchLoadedTime,this.launcher=e.launcher,this.origin=e.origin,this.processId=e.processId,this.startupTime=e.startupTime,this.channel=e.channel)},getDCloudId:function(){return c.execSync(a,"getDCloudId")},agreePrivacy:function(){c.exec(a,"agreePrivacy",[])},disagreePrivacy:function(){c.exec(a,"disagreePrivacy",[])},isAgreePrivacy:function(){return c.execSync(a,"isAgreePrivacy",[])},downloadFile:function(o,r,s){var e;if("string"==typeof o.url)10<o.url.length&&"blob:file:"==o.url.substring(0,10)?((e=new XMLHttpRequest).open("GET",o.url,!0),e.setRequestHeader("Content-type","application/x-www-form-urlencoded"),e.responseType="blob",e.onload=function(e){if(200==this.status){var t=this.response;try{const i=new FileReader;i.onload=function(e){var t=c.callbackId(r,s);c.exec(a,"downloadBlob",[e.target.result,o.fileName,t])},i.readAsDataURL(t),i.onerror=function(){s({code:-1,message:"blob error"})}}catch(e){s(n={code:-1,message:e})}}else{var n={code:-1,message:this.status};s(n)}},e.onerror=function(e){s({code:-1,message:"data error"})},e.send()):((e=document.createElement("a")).href=o.url+"&DCLOUD_DOWNLOAD_BLOB:"+o.fileName,e.download=o.fileName,e.click());else try{const t=new FileReader;t.onload=function(e){var t=c.callbackId(r,s);c.exec(a,"downloadBlob",[e.target.result,o.fileName,t])},t.readAsDataURL(o.url),t.onerror=function(){s({code:-1,message:"blob error"})}}catch(e){s({code:-1,message:e})}}}}),PlusObject.register("accelerometer",function(r,s,e,t){function o(e,t,n){this.xAxis=e,this.yAxis=t,this.zAxis=n}var n=s.bridge,c=s.tools,i="Accelerometer",a=!1,u={},l=[],_=null;function f(e){var t=n.callbackId(function(e){var t=l.slice(0);_=new o(e.x,e.y,e.z);for(var n=0,i=t.length;n<i;n++)t[n].win(_)},function(e){for(var t=l.slice(0),n=0,i=t.length;n<i;n++)t[n].fail(e)});n.exec(i,"start",[t,e]),a=!0}function d(e,t){return{win:e,fail:t}}function p(e){e=l.indexOf(e);-1<e&&(l.splice(e,1),0===l.length&&(n.exec(i,"stop",[]),a=!1))}return{getCurrentAcceleration:function(t,n,e){var i=d(function(e){p(i),t(e)},function(e){p(i),n&&n(e)});l.push(i),a||f(-1)},watchAcceleration:function(e,t,n){var i=n&&n.frequency&&"number"==typeof n.frequency?n.frequency:500,n=c.UUID("watch"),o=d(function(){},function(e){p(o),t&&t(e)});return l.push(o),u[n]={timer:(r.setInterval?r:s).setInterval(function(){_&&e(_)},i),listeners:o},a?_&&e(_):f(i),n},clearWatch:function(e){e&&u[e]&&((r.clearInterval?r:s).clearInterval(u[e].timer),p(u[e].listeners),delete u[e])}}}),PlusObject.register("geolocation",function(s,c){var a="Geolocation",u=(c=c).bridge,l=c.tools,_={};function n(e,t,n,i,o,r,s){this.latitude=e,this.longitude=t,this.accuracy=void 0!==i?i:null,this.altitude=void 0!==n?n:null,this.heading=void 0!==o?o:null,this.speed=void 0!==r?r:null,0!==this.speed&&null!==this.speed||(this.heading=NaN),this.altitudeAccuracy=void 0!==s?s:null}function f(e,t){e?(this.coordsType=e.coordsType,this.address=e.address,this.addresses=e.addresses,this.coords=new n(e.latitude,e.longitude,e.altitude,e.accuracy,e.heading,e.velocity,e.altitudeAccuracy)):this.coords=new n,this.timestamp=void 0!==t?t:(new Date).getTime()}function d(e,t){this.code=e||null,this.message=t||""}function p(e){var t={maximumAge:0,enableHighAccuracy:!1,timeout:1/0,geocode:!0};return e&&(void 0!==e.maximumAge&&!isNaN(e.maximumAge)&&0<e.maximumAge&&(t.maximumAge=e.maximumAge),void 0!==e.enableHighAccuracy&&(t.enableHighAccuracy=e.enableHighAccuracy),void 0===e.timeout||isNaN(e.timeout)||(e.timeout<0?t.timeout=0:t.timeout=e.timeout),e.coordsType&&(t.coordsType=e.coordsType),e.provider&&(t.provider=e.provider),void 0!==e.geocode&&(t.geocode=e.geocode)),t}function h(e,n){return s.setTimeout,c.setTimeout(function(){y(t),t=null,e(new d(d.TIMEOUT,"Position retrieval timed out."))},n)}function y(e){s.clearTimeout?!0!==e&&s.clearTimeout(e):!0!==e&&c.clearTimeout(e)}d.PERMISSION_DENIED=1,d.POSITION_UNAVAILABLE=2,d.TIMEOUT=3,d.UNKNOWN_ERROR=4;var v=c.geolocation={lastPosition:null,getCurrentPosition:function(e,t,n){g(e,t,n,!0)},watchPosition:function(t,n,i){i=p(i);var o=l.UUID("timer");_[o]=g(t,n,i,!1);function r(e){y(_[o].timer),e=new d(e.code,e.message),n&&n(e)}var e=u.callbackId(function(e){y(_[o].timer),i.timeout!==1/0&&(_[o].timer=h(r,i.timeout));e=new f({latitude:e.latitude,longitude:e.longitude,altitude:e.altitude,accuracy:e.accuracy,heading:e.heading,velocity:e.velocity,coordsType:e.coordsType,address:e.address,addresses:e.addresses,altitudeAccuracy:e.altitudeAccuracy},void 0===e.timestamp?(new Date).getTime():e.timestamp instanceof Date?e.timestamp.getTime():e.timestamp);v.lastPosition=e,t(e)},r);return u.exec(a,"watchPosition",[e,o,i.enableHighAccuracy,i.coordsType,i.provider,i.geocode,i.timeout,i.maximumAge],{cbid:e,l:s.getLocationHerf(c)}),o},clearWatch:function(e){e&&void 0!==_[e]&&(y(_[e].timer),_[e].timer=!1,u.exec(a,"clearWatch",[e]))}};function g(t,n,e,i){e=p(e);var o={timer:null},r=function(e){y(o.timer),o.timer=null;e=new d(e.code,e.message);n&&n(e)};return v.lastPosition&&e.maximumAge&&(new Date).getTime()-v.lastPosition.timestamp<=e.maximumAge?t(v.lastPosition):0===e.timeout?r(new d(d.TIMEOUT,"timeout value in PositionOptions set to 0 and no cached Position object available, or cached Position object's age exceeds provided PositionOptions' maximumAge parameter.")):(e.timeout!==1/0?o.timer=h(r,e.timeout):o.timer=!0,i&&(r=u.callbackId(function(e){y(o.timer),o.timer&&(e=new f({latitude:e.latitude,longitude:e.longitude,altitude:e.altitude,accuracy:e.accuracy,heading:e.heading,velocity:e.velocity,coordsType:e.coordsType,address:e.address,addresses:e.addresses,altitudeAccuracy:e.altitudeAccuracy},void 0===e.timestamp?(new Date).getTime():e.timestamp instanceof Date?e.timestamp.getTime():e.timestamp),v.lastPosition=e,t(e))},r),u.exec(a,"getCurrentPosition",[r,e.enableHighAccuracy,e.maximumAge,e.coordsType,e.provider,e.geocode,e.timeout],{cbid:r,l:s.getLocationHerf(c)}))),o}return v}),PlusObject.register("stream",function(e,t){var i=t.bridge,o=t.tools,r="Stream";t.stream={open:function(e,t,n){n=i.callbackId(t,n);i.exec(r,"open",[e,n])},setRestoreState:function(e){i.exec(r,"setRestoreState",[e])},preload:function(e){i.exec(r,"preload",[e])},list:function(e,t,n){n=i.callbackId(t,n);i.exec(r,"list",[e,n])},remove:function(e){i.exec(r,"remove",[e])},freetrafficRequest:function(e,t,n){o.platform!=o.IOS?(t=i.callbackId(t,n),i.exec(r,"freetrafficRequest",[e,t])):"function"==typeof n&&n({code:-3,message:"不支持"})},freetrafficBind:function(e,t,n){o.platform!=o.IOS?(t=i.callbackId(t,n),i.exec(r,"freetrafficBind",[e,t])):"function"==typeof n&&n({code:-3,message:"不支持"})},freetrafficRelease:function(e,t,n){o.platform!=o.IOS?(t=i.callbackId(t,n),i.exec(r,"freetrafficRelease",[e,t])):"function"==typeof n&&n({code:-3,message:"不支持"})},freetrafficInfo:function(e,t){o.platform!=o.IOS?(e=i.callbackId(e,t),i.exec(r,"freetrafficInfo",[e])):"function"==typeof t&&t({code:-3,message:"不支持"})},freetrafficIsValid:function(){if(o.platform!=o.IOS)return i.exec(r,"freetrafficIsValid",null);"function"==typeof errorCallback&&errorCallback({code:-3,message:"不支持"})},activate:function(){o.platform!=o.IOS?i.exec(r,"activate",null):"function"==typeof errorCallback&&errorCallback({code:-3,message:"不支持"})}}}),PlusObject.register("video",function(s,c){var r;c.__Media_Live__Push__=(r=[],{pushCallback_LivePush:function(e,t,n,i,o){r[o]={fun:t,nokeep:n,pushobj:i}},execCallback_LivePush:function(e,t,n){var i;r[n]&&((i={}).type=e,i.target=r[n].pushobj,i.detail=t,r[n].fun&&r[n].fun(i))}});var a=c.bridge,u="VideoPlayer",l="LivePusher",_=c.tools,i={},n={};function f(e){return _.getElementOffsetXInWebview(e)}function d(e){return _.getElementOffsetYInWebview(e)}function o(e,t,n,i){this.id=_.UUID("dt"),this.IDENTITY=u,this.userId=n,div=s.document&&document.getElementById(e);var o=this.id;i||(i=[],div&&(c.tools.platform==c.tools.ANDROID?document.addEventListener("plusorientationchange",function(){setTimeout(function(){var e=[f(div),d(div),div.offsetWidth,div.offsetHeight];a.exec(u,"resize",[o,e])},200)},!1):div.addEventListener("resize",function(){var e=[f(div),d(div),div.offsetWidth,div.offsetHeight];a.exec(u,"resize",[o,e])},!1),i=[f(div),d(div),div.offsetWidth,div.offsetHeight]),a.exec(u,"VideoPlayer",[this.id,i,t,n]))}var e=o.prototype;function t(t,e,n,i){this.IDENTITY="LivePusher",this.id=n,this.__uuid__=c.tools.UUID("LivePusher"),this.options=e,this.onCapture=null,me=this;var o=null;null!=n&&null!=n||(this.id=this.__uuid__);var r=s.document&&document.getElementById(t);null!=r&&null!=r&&(c.tools.ANDROID==c.tools.platform?window.onresize=function(){var e=document.getElementById(t),e=[f(e),d(e),e.offsetWidth,e.offsetHeight];a.exec(l,"resize",[me.__uuid__,e])}:c.tools.IOS==c.tools.platform&&r.addEventListener("resize",function(){var e=[f(r),d(r),r.offsetWidth,r.offsetHeight];a.exec(l,"resize",[me.__uuid__,e])},!1),o=[f(r),d(r),r.offsetWidth,r.offsetHeight]),null!=i&&null!=i&&!i||a.exec(l,"LivePusher",[this.__uuid__,this.id,o,e])}e.play=function(){a.exec(u,"VideoPlayer_play",[this.id])},e.pause=function(){a.exec(u,"VideoPlayer_pause",[this.id])},e.stop=function(){a.exec(u,"VideoPlayer_stop",[this.id])},e.close=function(){a.exec(u,"VideoPlayer_close",[this.id])},e.sendDanmu=function(e){a.exec(u,"VideoPlayer_sendDanmu",[this.id,e])},e.seek=function(e){a.exec(u,"VideoPlayer_seek",[this.id,e])},e.playbackRate=function(e){a.exec(u,"VideoPlayer_playbackRate",[this.id,e])},e.requestFullScreen=function(e){a.exec(u,"VideoPlayer_requestFullScreen",[this.id,e])},e.exitFullScreen=function(){a.exec(u,"VideoPlayer_exitFullScreen",[this.id])},e.hide=function(){a.exec(u,"VideoPlayer_hide",[this.id])},e.show=function(){a.exec(u,"VideoPlayer_show",[this.id])},e.hideStatusBar=function(){a.exec(u,"VideoPlayer_hideStatusBar",[this.id])},e.showStatusBar=function(){a.exec(u,"VideoPlayer_showStatusBar",[this.id])},e.setOptions=function(e){a.exec(u,"VideoPlayer_setOptions",[this.id,e])},e.setStyles=e.setOptions,e.addEventListener=function(e,t){var n,i=this;t&&(n=function(e){"function"==typeof t&&(e.target=i,t(e))},t.callback=n,n=a.callbackId(n)),a.exec(u,"VideoPlayer_addEventListener",[this.id,e,n,c.__HtMl_Id__])};e=t.prototype;function p(t,e){e&&e.onCapture&&"function"==typeof e.onCapture&&(e.__onCaptureCallbackId__=a.callbackId(e.onCapture));var n=document.getElementById(t);c.tools.ANDROID==c.tools.platform?window.onresize=function(){var e=document.getElementById(t),e=[f(e),d(e),e.offsetWidth,e.offsetHeight];a.exec(u,"resize",e)}:c.tools.IOS==c.tools.platform&&n.addEventListener("resize",function(){var e=[f(n),d(n),n.offsetWidth,n.offsetHeight];a.exec(u,"resize",e)},!1);var i=[n.offsetLeft,n.offsetTop,n.offsetWidth,n.offsetHeight];a.exec(u,"VideoCapture",[i,e])}e.start=function(t,n){var e="function"!=typeof t?null:function(e){t()},i="function"!=typeof n?null:function(e){n(e)},i=a.callbackId(e,i);a.exec(l,"start",[this.__uuid__,i])},e.preview=function(){a.exec(l,"preview",[this.__uuid__])},e.stop=function(e){a.exec(l,"stop",[this.__uuid__,e])},e.pause=function(){a.exec(l,"pause",[this.__uuid__])},e.close=function(){a.exec(l,"close",[this.__uuid__])},e.resume=function(){a.exec(l,"resume",[this.__uuid__])},e.close=function(){a.exec(l,"close",[this.__uuid__])},e.setStyles=function(e){a.exec(l,"setOptions",[this.__uuid__],e)},e.setOptions=function(e){a.exec(l,"setOptions",[this.__uuid__],e)},e.switchCamera=function(e){a.exec(l,"switchCamera",[this.__uuid__])},e.addEventListener=function(e,t,n){var i,o=this;t&&(i=function(e){"function"==typeof callback&&(e.target=o,t(e))},t.listener=i,i=a.callbackId(i)),c.__Media_Live__Push__.pushCallback_LivePush(e,t,n,this,i),a.exec(l,"addEventListener",[this.__uuid__,c.__HtMl_Id__,e,i])},e.snapshot=function(t,n){var e="function"!=typeof t?null:function(e){t(e)},i="function"!=typeof n?null:function(e){n(e)},i=a.callbackId(e,i);a.exec(l,"snapshot",[this.__uuid__,i])};e=p.prototype;function h(e,t){t&&t.video&&(t.video.onCaptionChanged&&"function"==typeof t.video.onCaptionChanged&&(t.video.__onCaptionChangedCallbackId__=a.callbackId(t.onCapture)),t.video.onWatermarkChanged&&"function"==typeof t.video.onWatermarkChanged&&(t.video.__onWatermarkChangedCallbackId__=a.callbackId(t.onCapture))),div=document.getElementById(e),div.addEventListener("resize",function(){var e=[div.offsetLeft,div.offsetTop,div.offsetWidth,div.offsetHeight];a.exec(_BARCODE,"resize",[e])},!1);e=[div.offsetLeft,div.offsetTop,div.offsetWidth,div.offsetHeight];a.exec(u,"VideoEditor",[e,t])}e.setFilter=function(e){a.exec(u,"VideoCapture_setFilter",[e])},e.setFacing=function(e){a.exec(u,"VideoCapture_setFacing",[e])},e.setResolution=function(e){a.exec(u,"VideoCapture_setResolution",[e])},e.start=function(){a.exec(u,"VideoCapture_start",[])},e.stop=function(){a.exec(u,"VideoCapture_stop",[])},e.getSupportedResolutions=function(){return a.execSync(u,"VideoCapture_getSupportedResolutions",[])},e.close=function(){a.exec(u,"VideoCapture_close",[]),this.isClose=!0};e=h.prototype;e.setCaption=function(e,t){a.exec(u,"VideoEditor_setCaption",[e,t])},e.setWatermark=function(e,t){a.exec(u,"VideoEditor_setWatermark",[e,t])},e.setIndex=function(e){a.exec(u,"VideoEditor_setIndex",[e])},e.play=function(){a.exec(u,"VideoEditor_play",[])},e.pause=function(){a.exec(u,"VideoEditor_pause",[])},e.close=function(){a.exec(u,"VideoEditor_close",[]),this.isClose=!0};e={VideoPlayer:o,createVideoPlayer:function(e,t){return e=new o(null,t,e),n[e.id]=e,n[e.id]},getVideoPlayerById:function(e){if(e&&"string"==typeof e){var t=a.execSync(u,"getVideoPlayerById",[e]);if(null!=t&&null!=t.uid){if(n[t.uid])return n[t.uid];if(null==t||null==t)return null;e=new c.video.VideoPlayer(null,null,t.name,!0);return e.id=t.uid,n[t.uid]=e}}},createLivePusher:function(e,t,n){var n=null==n||null==n||n?!0:!1;return n=new c.video.LivePusher(null,t,e,n),i[n.__uuid__]=n,i[n.__uuid__]},getLivePusherById:function(e){if(e&&"string"==typeof e){var t=a.execSync(l,"getLivePusherById",[e]);if(null!=t&&null!=t&&t.uuid){if(i[t.uuid])return i[t.uuid];e=new c.video.LivePusher(null,null,e,!1);return e.__uuid__=t.uuid,i[t.uuid]=e}return null}},VideoCapture:p,VideoEditor:h,LivePusher:t,getSupportedResolutions:function(){return a.execSync(u,"getSupportedResolutions",[])},getVideoInfo:function(e,t){var n=null;t&&"function"==typeof t&&(n=a.callbackId(t)),a.exec(u,"getVideoInfo",[e,n])}};c.video=e}),PlusObject.register("maps",function(u,l,e,t){var r=l.bridge,_=l.tools,f="Maps",o="createObject",i="updateObject",s="updateObjectSYNC",c="execMethod",d={callback:[],pushCallback:function(e,t,n){this.callback[e]={fun:t,nokeep:n}},execCallback:function(e,t){this.callback[e]&&(this.callback[e].fun&&this.callback[e].fun(e,t),this.callback[e].nokeep&&delete this.callback[e])}},p={};function h(e,t,n,i){return _.ANDROID==_.platform?r.exec(f,o,[_.stringify([e,t,n,i])],null):r.exec(f,o,[e,t,n,i],null)}function y(e,t,n){return _.ANDROID==_.platform?r.exec(f,i,[_.stringify([e,[t,n]])],null):r.exec(f,i,[e,[t,n]],null)}function a(e,t,n){return _.ANDROID==_.platform?r.exec(f,c,[_.stringify([e,[t,n]])],null):r.exec(f,c,[e,[t,n]],null)}function v(e,t,n,i,o){var r,s;s={zoom:12,type:"MAPTYPE_NORMAL",traffic:!1,zoomControls:!1},(r=t)&&r.center instanceof m&&(s.center=r.center),r&&"number"==typeof r.zoom&&r.zoom<=22&&1<=r.zoom&&(s.zoom=r.zoom),!r||"MAPTYPE_NORMAL"!=r.type&&"MAPTYPE_SATELLITE"!=r.type||(s.type=r.type),r&&"boolean"==typeof r.traffic&&(s.traffic=r.traffic),r&&"boolean"==typeof r.zoomControls&&(s.zoomControls=r.zoomControls),r&&"string"==typeof r.position&&(s.position=r.position),r&&(s.top=r.top,s.left=r.left,s.width=r.width,s.height=r.height),t=s;var c,a=this;this.IDENTITY=f,this._UUID_=o||_.UUID("map"),this._map_id_=n,this._ui_div_id_=e,this.__showUserLocationVisable__=!1,this.center=t.center||new l.maps.Point(116.39716,39.91669),this.zoom=t.zoom,this.userLocation=null,this.mapType=t.type,this.zoomControlsVisable=t.zoomControls,this.trafficVisable=t.traffic,this.visable=!0,this.onclick=function(e){},this.onstatuschanged=function(){},d.pushCallback(this._UUID_,function(e,t){var n;"click"==t.callbackType?a.onclick&&a.onclick(t.payload):"change"==t.callbackType&&(a&&(a.zoom=t.zoom),a.onstatuschanged&&((n={}).target=a,n.zoom=t.zoom,n.center=new m(t.center.long,t.center.lat),t.northease&&(n.bounds=new I(new m(t.northease.long,t.northease.lat),new m(t.southwest.long,t.southwest.lat))),a.onstatuschanged(n)))}),i||(i=[t],(c=u.document&&u.document.getElementById(this._ui_div_id_))&&(l.tools.platform==l.tools.ANDROID?document.addEventListener("plusorientationchange",function(){setTimeout(function(){var e=[c.offsetLeft,c.offsetTop,c.offsetWidth,c.offsetHeight];y(a._UUID_,"resize",e)},200)},!1):c.addEventListener("resize",function(){var e=[c.offsetLeft,c.offsetTop,c.offsetWidth,c.offsetHeight];y(a._UUID_,"resize",e)},!1),i=[t,c.offsetLeft,c.offsetTop,c.offsetWidth,c.offsetHeight]),p[this._UUID_]=h(this._UUID_,"mapview",i,this._map_id_))}var n=v.prototype;function g(e){this._UUID_=_.UUID("Bubble"),this.label="string"==typeof e?e:"",this.icon=null,this.marker=null,this.__contentImage=null,this.__contentImageAsDataURL=null,this.onclick=function(e){}}n.close=function(){a("map","close",this._UUID_),p[this._UUID_]&&delete p[this._UUID_]},n.centerAndZoom=function(e,t){e instanceof m&&"number"==typeof t&&(t=[this.center=e,this.zoom=t],y(this._UUID_,"centerAndZoom",t))},n.setCenter=function(e){e instanceof m&&(e=[this.center=e],y(this._UUID_,"setCenter",e))},n.getCenter=function(){return this.center},n.setZoom=function(e){"number"==typeof e&&(this.zoom=e,y(this._UUID_,"setZoom",[e]))},n.resize=function(){var e,t=u.document&&u.document.getElementById(this._ui_div_id_);t?(e=[t.offsetLeft,t.offsetTop,t.offsetWidth,t.offsetHeight],y(this._UUID_,"resize",e)):console.log("map 在自定义组件模式下不支持'resize'方法,请使用'setStyles'方法")},n.getZoom=function(){return this.zoom},n.setMapType=function(e){"MAPTYPE_NORMAL"!=e&&"MAPTYPE_SATELLITE"!=e||(this.mapType=e,y(this._UUID_,"setMapType",[e]))},n.getMapType=function(){return this.mapType},n.showUserLocation=function(e){"boolean"==typeof e&&this.__showUserLocationVisable__!=e&&(e=[this.__showUserLocationVisable__=e],y(this._UUID_,"showUserLocation",e))},n.isShowUserLocation=function(){return this.__showUserLocationVisable__},n.getUserLocation=function(n){if("function"!=typeof n)return!1;var e=_.UUID("callback");d.pushCallback(e,function(e,t){n&&n(t.state,t.point)},!0);e=[e,l.__HtMl_Id__];return y(this._UUID_,"getUserLocation",e),!0},n.getCurrentCenter=function(n){if("function"!=typeof n)return!1;function e(e,t){n&&n(t.state,t.point)}var t=r.callbackId(e);d.pushCallback(t,e,!0);t=[t,l.__HtMl_Id__];return y(this._UUID_,"getCurrentCenter",t),!0},n.setTraffic=function(e){"boolean"==typeof e&&e!=this.trafficVisable&&(e=[this.trafficVisable=e],y(this._UUID_,"setTraffic",e))},n.isTraffic=function(){return this.trafficVisable},n.showZoomControls=function(e){"boolean"==typeof e&&e!=this.zoomControlsVisable&&(e=[this.zoomControlsVisable=e],y(this._UUID_,"showZoomControls",e))},n.isShowZoomControls=function(){return this.zoomControlsVisable},n.getBounds=function(){var e,t,n,n=(e=this._UUID_,t="getBounds",n=[],_.ANDROID==_.platform?r.execSync(f,s,[_.stringify([e,[t,n]])],null):r.execSync(f,s,[e,[t,n]],null));return new I(new m(n.northease.longitude,n.northease.latitude),new m(n.southwest.longitude,n.southwest.latitude))},n.reset=function(){y(this._UUID_,"reset",[null])},n.show=function(){var e,t;1!=this.visable&&(this.visable=!0,t=[null],(e=u.document&&u.document.getElementById(this._ui_div_id_))&&(e.style.display="",t=[e.offsetLeft,e.offsetTop,e.offsetWidth,e.offsetHeight]),y(this._UUID_,"show",t))},n.hide=function(){0!=this.visable&&(this.visable=!1,u.document&&u.document.getElementById(this._ui_div_id_)&&(document.getElementById(this._ui_div_id_).style.display="none"),y(this._UUID_,"hide",[null]))},n.addOverlay=function(e){if(e instanceof D||e instanceof k||e instanceof U||e instanceof T||e instanceof S){e=[e._UUID_];return y(this._UUID_,"addOverlay",e),!0}return!1},n.removeOverlay=function(e){if(e instanceof D||e instanceof k||e instanceof U||e instanceof T||e instanceof S){e=[e._UUID_];return y(this._UUID_,"removeOverlay",e),!0}return!1},n.clearOverlays=function(){y(this._UUID_,"clearOverlays",[null])},v.calculateDistance=function(e,t,n,i){var o=r.callbackId(function(e){"function"==typeof n&&n({distance:e})},function(e){"function"==typeof i&&i(e)});r.exec(f,"calculateDistance",[e,t,o])},v.calculateArea=function(e,t,n){var i=r.callbackId(function(e){"function"==typeof t&&t({area:e})},function(e){"function"==typeof n&&n(e)});r.exec(f,"calculateArea",[e,i])},v.convertCoordinates=function(e,t,n,i){var o=r.callbackId(function(e){var t;"function"==typeof n&&((t={}).coord=new m(e.long,e.lat),t.coordType=e.type,n(t))},function(e){"function"==typeof i&&i(e)});r.exec(f,"convertCoordinates",[e,t,o])},v.geocode=function(e,t,n,i){var o=r.callbackId(function(e){var t;"function"==typeof n&&((t={}).coord=new m(e.long,e.lat),t.address=e.addr,t.coordType=e.type,n(t))},function(e){"function"==typeof i&&i(e)});r.exec(f,"geocode",[e,t,o])},v.reverseGeocode=function(e,t,n,i){var o=r.callbackId(function(e){var t;"function"==typeof n&&((t={}).coord=new m(e.long,e.lat),t.address=e.addr,t.coordType=e.type,n(t))},function(e){"function"==typeof i&&i(e)});r.exec(f,"reverseGeocode",[e,t,o])};var b=g.prototype;function I(e,t,n,i){"number"==typeof e&&"number"==typeof t&&"number"==typeof n&&"number"==typeof i?(this.northease=new m(e,t),this.northeast=new m(e,t),this.southwest=new m(n,i)):e instanceof m&&t instanceof m&&(this.northease=e,this.northeast=e,this.southwest=t)}function m(e,t){this.longitude=e,this.latitude=t}b.setIcon=function(e){"string"==typeof e&&(this.icon=e,this.marker&&y(this.marker._UUID_,"setBubbleIcon",[this.icon]))},b.loadImage=function(e){this.__contentImage=e,this.__contentImageAsDataURL=null,this.marker&&y(this.marker._UUID_,"loadImage",[e])},b.loadImageDataURL=function(e){this.__contentImage=null,this.__contentImageAsDataURL=e,this.marker&&y(this.marker._UUID_,"loadImageDataURL",[e])},b.getLabel=function(){return this.label},b.setLabel=function(e){"string"==typeof e&&(this.label=e,this.marker&&y(this.marker._UUID_,"setBubbleLabel",[this.label]))},b.belongMarker=function(){return this.marker},I.prototype.setNorthEase=function(e){e instanceof m&&(this.northease=e,this.northeast=e)},I.prototype.setNorthEast=function(e){e instanceof m&&(this.northease=e,this.northeast=e)},I.prototype.getNorthEase=function(){return this.northease},I.prototype.getNorthEast=function(){return this.northeast},I.prototype.setSouthWest=function(e){e instanceof m&&(this.southwest=e)},I.prototype.getSouthWest=function(){return this.southwest},I.prototype.contains=function(e){return e instanceof m&&(e.longitude<=this.northease.longitude&&e.longitude>=this.southwest.longitude&&e.latitude<=this.northease.latitude&&e.latitude>=this.southwest.latitude)},I.prototype.equals=function(e){return e instanceof I&&(this.northease.equals(e.northease)&&this.southwest.equals(e.southwest))},I.prototype.getCenter=function(){var e=(this.northease.longitude-this.southwest.longitude)/2,t=(this.northease.latitude-this.southwest.latitude)/2;return new m(e+this.southwest.longitude,t+this.southwest.latitude)};b=m.prototype;function x(){this._UUID_=null,this.visable=!0}b.setLng=function(e){this.longitude=e},b.getLng=function(){return this.longitude},b.setLat=function(e){this.latitude=e},b.getLat=function(){return this.latitude},b.equals=function(e){return this.longitude==e.longitude&&this.latitude==e.latitude};b=x.prototype;function S(e){var n=this;this._UUID_=_.UUID("marker"),this.point=e,this.icon="",this.caption="",this.bubble=null,this.canDraggable=!1,this.onclick=function(e){},this.onDrag=function(e){},d.pushCallback(this._UUID_,function(e,t){"bubbleclick"==t.type?n.bubble&&n.bubble.onclick&&n.bubble.onclick(n.bubble):"markerclick"==t.type?n.onclick&&n.onclick(n):"onDrag"==t.type&&(n.point=t.pt,n.onDrag(n))}),h(this._UUID_,"marker",[e])}b.show=function(){1!=this.visable&&(this.visable=!0,y(this._UUID_,"show",["true"]))},b.hide=function(){0!=this.visable&&(this.visable=!1,y(this._UUID_,"hide",["false"]))},b.isVisible=function(){return this.visable},b.bringToTop=function(){y(this._UUID_,"bringToTop",[])};b=S.prototype=new x;function w(){this.strokeColor="#FFFFFF",this.strokeOpacity=1,this.fillColor="#FFFFFF",this.fillOpacity=1,this.lineWidth=5,this.visable=!0}b.constructor=S,b.setPoint=function(e){e instanceof m&&(e=[this.point=e],y(this._UUID_,"setPoint",e))},b.getPoint=function(){return this.point},b.setIcon=function(e){"string"==typeof e&&(this.icon=e,y(this._UUID_,"setIcon",[e]))},b.setLabel=function(e){"string"==typeof e&&(this.caption=e,y(this._UUID_,"setLabel",[e]))},b.getLabel=function(){return this.caption},b.setBubble=function(e,t){var n,i;e instanceof g?((n=e.marker)&&n!=this&&(i=[n.bubble=null,null,null,null,!1],y(n._UUID_,"setBubble",i)),(e.marker=this).bubble=e,i=[this.bubble.label,this.bubble.icon,this.bubble.__contentImageAsDataURL,this.bubble.__contentImage,t],y(this._UUID_,"setBubble",i)):null==e&&y(this._UUID_,"setBubble",[null,null,null,null,t])},b.hideBubble=function(){this.bubble&&y(this._UUID_,"hideBubble",[])},b.getBubble=function(){return this.bubble},b.setDraggable=function(e){e!=this.canDraggable&&(this.canDraggable=!this.canDraggable,y(this._UUID_,"setDraggable",[this.canDraggable]))},b.isDraggable=function(){return this.canDraggable},b.setIcons=function(e,t){y(this._UUID_,"setIcons",[e,t])};b=w.prototype=new x;function D(e,t){this.center=e,this.radius=t,this._UUID_=_.UUID("circle"),h(this._UUID_,"circle",[e,t])}b.constructor=w,b.setStrokeColor=function(e){"string"==typeof e&&(this.strokeColor=e,y(this._UUID_,"setStrokeColor",[e]))},b.getStrokeColor=function(){return this.strokeColor},b.setStrokeOpacity=function(e){"number"==typeof e&&(e<0?e=0:1<e&&(e=1),this.strokeOpacity=e,y(this._UUID_,"setStrokeOpacity",[e]))},b.getStrokeOpacity=function(){return this.strokeOpacity},b.setFillColor=function(e){"string"==typeof e&&(this.fillColor=e,y(this._UUID_,"setFillColor",[e]))},b.getFillColor=function(){return this.fillColor},b.setFillOpacity=function(e){"number"==typeof e&&(e<0?e=0:1<e&&(e=1),this.fillOpacity=e,y(this._UUID_,"setFillOpacity",[e]))},b.getFillOpacity=function(){return this.fillOpacity},b.setLineWidth=function(e){"number"==typeof e&&(e<0&&(e=0),this.lineWidth=e,y(this._UUID_,"setLineWidth",[e]))},b.getLineWidth=function(){return this.lineWidth};b=D.prototype=new w;function k(e){this.path=e,this._UUID_=_.UUID("polygon"),h(this._UUID_,"polygon",[e])}b.constructor=D,b.setCenter=function(e){e instanceof m&&(this.center=e,y(this._UUID_,"setCenter",[e]))},b.getCenter=function(){return this.center},b.setRadius=function(e){"number"==typeof e&&0<=e&&(this.radius=e,y(this._UUID_,"setRadius",[e]))},b.getRadius=function(){return this.radius};b=k.prototype=new w;function U(e){this.path=e,this._UUID_=_.UUID("polyline"),h(this._UUID_,"polyline",[e])}b.constructor=k,b.setPath=function(e){this.path=e,y(this._UUID_,"setPath",[e])},b.getPath=function(){return this.path};b=U.prototype=new w;function T(e,t,n){this._UUID_=_.UUID("route"),this.startPoint=e,this.endPoint=t,this.pointCount=0,this.pointList=[],this.distance=0,this.routeTip="",void 0===n&&h(this._UUID_,"route",[e,t,n])}function N(){this.__state__=0,this.__type__=1,this.startPosition=null,this.endPosition=null,this.routeNumber=0,this.routeList=[]}function E(){this.__state__=0,this.__type__=0,this.totalNumber=0,this.currentNumber=0,this.pageNumber=0,this.pageIndex=0,this.poiList=[]}function C(e){var n=this;this._UUID_=_.UUID("search"),this.pageCapacity=10,this.map=e,this.onPoiSearchComplete=function(e,t){},this.onRouteSearchComplete=function(e,t){},d.pushCallback(this._UUID_,function(e,t){0==t.__type__?n.onPoiSearchComplete&&n.onPoiSearchComplete(t.__state__,t):1==t.__type__&&n.onRouteSearchComplete&&n.onRouteSearchComplete(t.__state__,t)}),h(this._UUID_,"search",[null])}b.constructor=U,b.setPath=function(e){this.path=e,y(this._UUID_,"setPath",[e])},b.getPath=function(){return this.path},(T.prototype=new x).constructor=T,N.prototype.getRoute=function(e){return 0<=e&&e<this.routeNumber?this.routeList[e]:null},E.prototype.getPosition=function(e){return 0<=e&&e<this.currentNumber?this.poiList[e]:null};b=C.prototype;function A(e,t,n,i){return new v(void 0,t,e,n,i)}b.setPageCapacity=function(e){e=[this.pageCapacity=e];y(this._UUID_,"setPageCapacity",e)},b.getPageCapacity=function(){return this.pageCapacity},b.poiSearchInCity=function(e,t,n){if("string"!=typeof e||"string"!=typeof t)return!1;n=[e,t,n];return y(this._UUID_,"poiSearchInCity",n),!0},b.poiSearchNearBy=function(e,t,n,i){if("string"==typeof e&&t instanceof m&&"number"==typeof n){i=[e,t,n,i];return y(this._UUID_,"poiSearchNearBy",i),!0}return!1},b.poiSearchInbounds=function(e,t,n,i){if("string"==typeof e&&t instanceof m&&n instanceof m){i=[e,t,n,i];return y(this._UUID_,"poiSearchInbounds",i),!0}return!1},b.setTransitPolicy=function(e){e=[e];y(this._UUID_,"setTransitPolicy",e)},b.transitSearch=function(e,t,n){if((e instanceof m||"string"==typeof e)&&(t instanceof m||"string"==typeof t)&&"string"==typeof n){n=[e,t,n];return y(this._UUID_,"transitSearch",n),!0}return!1},b.setDrivingPolicy=function(e){e=[e];y(this._UUID_,"setDrivingPolicy",e)},b.drivingSearch=function(e,t,n,i){if((e instanceof m||"string"==typeof e)&&(n instanceof m||"string"==typeof n)&&"string"==typeof t&&"string"==typeof i){i=[e,t,n,i];return y(this._UUID_,"drivingSearch",i),!0}return!1},b.walkingSearch=function(e,t,n,i){if((e instanceof m||"string"==typeof e)&&(n instanceof m||"string"==typeof n)&&"string"==typeof t&&"string"==typeof i){i=[e,t,n,i];return y(this._UUID_,"walkingSearch",i),!0}return!1},n.setStyles=function(e){json_map=_.ANDROID==_.platform?r.exec(f,"setStyles",[_.stringify([this._UUID_,e])],null):r.exec(f,"setStyles",[this._UUID_,e],null)},l.maps={Map:v,openSysMap:function(e,t,n){e instanceof m&&n instanceof m&&a("map","openSysMap",[e,t,n])},MapType:{MAPTYPE_SATELLITE:"MAPTYPE_SATELLITE",MAPTYPE_NORMAL:"MAPTYPE_NORMAL"},Marker:S,Bubble:g,Point:m,Bounds:I,Circle:D,Polygon:k,Polyline:U,Position:function(e){this.point=e,this.address="",this.city="",this.name="",this.phone="",this.postcode=""},Route:T,Search:C,SearchPolicy:{TRANSIT_TIME_FIRST:"TRANSIT_TIME_FIRST",TRANSIT_TRANSFER_FIRST:"TRANSIT_TRANSFER_FIRST",TRANSIT_WALK_FIRST:"TRANSIT_WALK_FIRST",TRANSIT_FEE_FIRST:"TRANSIT_FEE_FIRST",DRIVING_TIME_FIRST:"DRIVING_TIME_FIRST",DRIVING_NO_EXPRESSWAY:"DRIVING_NO_EXPRESSWAY",DRIVING_FEE_FIRST:"DRIVING_FEE_FIRST"},__SearchRouteResult__:N,__SearchPoiResult__:E,__bridge__:d,create:A,getMapById:function(e){var t=_.ANDROID==_.platform?r.execSync(f,"getMapById",[_.stringify([e])],null):r.execSync(f,"getMapById",[e],null);if(t){var n=p[t.uuid];return n||(n=A(e,t.options,"no",t.uuid),p[t.uuid]=n),n}return null}}}),PlusObject.register("storage",function(e,t){var r=t.bridge,s="Storage";return{getLength:function(){return r.execSync2(s,"getLength",[null])},getAllKeys:function(){return r.execSync2(s,"getAllKeys",[null])},getAllKeysAsync:function(e,t){var n;e&&"function"==typeof e&&(n="function"!=typeof t?null:function(e){t(e)},n=[r.callbackId(e,n)],r.exec(s,"getAllKeysAsync",n))},getItem:function(e){return"string"==typeof e&&r.execSync2(s,"getItem",[e],function(e){var t=e.indexOf(":");return"null"===e.substr(0,t)?null:e.substr(t+1)})},getItemAsync:function(e,t,n){var i;"string"==typeof e&&t&&"function"==typeof t&&(i="function"!=typeof n?null:function(e){n(e)},e=[r.callbackId(t,i),e],r.exec(s,"getItemAsync",e))},setItem:function(e,t){return"string"==typeof e&&"string"==typeof t&&r.execSync2(s,"setItem",[e,t])},setItemAsync:function(e,t,n,i){var o;"string"==typeof e&&"string"==typeof t&&n&&"function"==typeof n&&(o="function"!=typeof i?null:function(e){i(e)},t=[r.callbackId(n,o),e,t],r.exec(s,"setItemAsync",t))},removeItem:function(e){return"string"==typeof e&&r.execSync2(s,"removeItem",[e])},removeItemAsync:function(e,t,n){var i;"string"==typeof e&&t&&"function"==typeof t&&(i="function"!=typeof n?null:function(e){n(e)},e=[r.callbackId(t,i),e],r.exec(s,"removeItemAsync",e))},clear:function(){return r.execSync2(s,"clear",[null])},clearAsync:function(e,t){var n;e&&"function"==typeof e&&(n="function"!=typeof t?null:function(e){t(e)},n=[r.callbackId(e,n)],r.exec(s,"clearAsync",n))},key:function(e){return"number"==typeof e&&r.execSync2(s,"key",[e])}}}),PlusObject.register("camera",function(e,t){var n,s=t.require("bridge"),c="Camera";function i(){this.index=1,this.__busy__=!1,this.supportedImageResolutions=[],this.supportedVideoResolutions=[],this.supportedImageFormats=[],this.supportedVideoFormats=[]}t=i.prototype;return t.captureImage=function(t,n,e){var i,o,r=this;r.__busy__||(i="function"!=typeof t?null:function(e){r.__busy__=!1,t(e)},o="function"!=typeof n?null:function(e){r.__busy__=!1,n(e)},o=s.callbackId(i,o),(e=e||{}).index||(e.index=this.index),s.exec(c,"captureImage",[o,e]))},t.startVideoCapture=function(t,n,e){var i,o,r=this;r.__busy__||(i="function"!=typeof t?null:function(e){r.__busy__=!1,t(e)},o="function"!=typeof n?null:function(e){r.__busy__=!1,n(e)},o=s.callbackId(i,o),(e=e||{}).index||(e.index=this.index),s.exec(c,"startVideoCapture",[o,e]))},t.stopVideoCapture=function(){s.exec(c,"stopVideoCapture",[])},{getCamera:function(e){if(n)return n;(n=new i).index=e;e=s.execSync(c,"getCamera",[n.__UUID__,e]);return e?(n.supportedImageFormats=e.supportedImageFormats,n.supportedVideoFormats=e.supportedVideoFormats,n.supportedImageResolutions=e.supportedImageResolutions,n.supportedVideoResolutions=e.supportedVideoResolutions):(n.supportedImageFormats=["png","jpg"],n.supportedImageResolutions=["640*480","1280*720","960*540","high","medium","low"],n.supportedVideoFormats=["mp4"],n.supportedVideoResolutions=["640*480","1280*720","960*540"]),n}}}),PlusObject.register("nativeObj",function(e,o,t,n){var s="NativeObj",c=o.bridge,r=o.tools,a={},u={},i={},l={};function _(e,t,n){this.__id__=r.UUID("Bitmap"),this.id=e,this.type="bitmap",n||(u[this.__id__]=this,c.exec(s,"Bitmap",[this.__id__,e,t]))}function f(e){if(Array.isArray(e))for(var t,n=0;n<e.length;n++)(t=e[n])&&"input"==t.tag?t.inputStyles&&(t.inputStyles.onComplete&&"function"==typeof t.inputStyles.onComplete&&(t.inputStyles.__onCompleteCallBackId__=c.callbackId(t.inputStyles.onComplete)),t.inputStyles.onFocus&&"function"==typeof t.inputStyles.onFocus&&(t.inputStyles.__onFocusCallBackId__=c.callbackId(t.inputStyles.onFocus)),t.inputStyles.onBlur&&"function"==typeof t.inputStyles.onBlur&&(t.inputStyles.__onBlurCallBackId__=c.callbackId(t.inputStyles.onBlur))):t&&"richtext"==t.tag&&t.richTextStyles&&t.richTextStyles.onClick&&"function"==typeof t.richTextStyles.onClick&&(t.richTextStyles.__onClickCallBackId__=c.callbackId(t.richTextStyles.onClick))}function d(e,t,n,i,o){this.__id__=e,this.id=e,this.__uuid__=r.UUID("NativeView"),this.type="nativeView",this.IDENTITY=s,i||(f(n),c.exec(s,"View",[this.__id__,this.__uuid__,t,n,o]),a[this.__uuid__]=this)}function p(e,t){var n,i=null;for(n in l){var o=l[n];if(t){if(o.uid&&o.uid==e||o.uuid&&o.uuid==e){i=o;break}}else if(o.id==e){i=o;break}}return i}function h(e){var t=a[e.uuid];return t||((t=new(e.type&&"ImageSlider"==e.type?o.nativeObj.ImageSlider:i[e.type]||o.nativeObj.View)(e.id,e.styles,"",!0)).__uuid__=e.uuid,a[t.__uuid__]=t),t}return _.prototype.clear=function(){c.exec(s,"clear",[this.__id__]),this.__id__=void 0,u[this.__id__]&&delete u[this.__id__]},_.prototype.recycle=function(){c.exec(s,"bitmapRecycle",[this.__id__])},_.prototype.load=function(e,t,n){function i(e){"function"==typeof n&&n(e)}var o;this.__id__?(o=c.callbackId(function(){"function"==typeof t&&t()},i),c.exec(s,"load",[this.__id__,e,o])):i({code:-1,message:"已经销毁的对象"})},_.prototype.loadBase64Data=function(e,t,n){function i(e){"function"==typeof n&&n(e)}var o;this.__id__?(o=c.callbackId(function(){"function"==typeof t&&t()},i),c.exec(s,"loadBase64Data",[this.__id__,e,o])):i({code:-1,message:"已经销毁的对象"})},_.prototype.save=function(e,t,n,i){function o(e){"function"==typeof i&&i(e)}var r;this.__id__?(r=c.callbackId(function(e){"function"==typeof n&&(e={target:e.path,width:e.w,height:e.h,size:e.size},n(e))},o),c.exec(s,"save",[this.__id__,e,t,r])):o({code:-1,message:"已经销毁的对象"})},_.prototype.__captureWebview=function(e,t,n,i){function o(e){"function"==typeof i&&i(e)}var r;this.__id__?(r=c.callbackId(function(){"function"==typeof n&&n()},o),c.exec(s,"captureWebview",[this.__id__,e,r,t])):o({code:-1,message:"已经销毁的对象"})},_.prototype.toBase64Data=function(){return this.__id__?c.execSync(s,"toBase64Data",[this.__id__]):null},_.getItems=function(){for(var e=[],t=c.execSync(s,"getItems",[]),n=0;n<t.length;n++){var i,o=t[n].__id__,r=u[o];r||((i=new _(t[n].id,null,!0)).__id__=o,r=u[o]=i),e.push(r)}return e},_.getBitmapById=function(e){var t=c.execSync(s,"getBitmapById",[e]);if(t){var n=u[t.__id__];return n||((e=new _(t.id,null,!0)).__id__=t.__id__,n=u[t.__id__]=e),n}return null},d.prototype.setImages=function(e){c.exec(s,"setImages",[this.__id__,this.__uuid__,e])},d.prototype.currentImageIndex=function(){return c.execSync(s,"currentImageIndex",[this.__id__,this.__uuid__])},d.prototype.addImages=function(e){c.exec(s,"addImages",[this.__id__,this.__uuid__,e])},d.prototype.drawBitmap=function(e,t,n,i){c.exec(s,"drawBitmap",[this.__id__,this.__uuid__,e,t,n,i])},d.prototype.drawText=function(e,t,n,i){c.exec(s,"drawText",[this.__id__,this.__uuid__,e,t,n,i])},d.prototype.drawRichText=function(e,t,n,i){n&&n.onClick&&"function"==typeof n.onClick&&(n.__onClickCallBackId__=c.callbackId(n.onClick)),c.exec(s,"drawRichText",[this.__id__,this.__uuid__,e,t,n,i])},d.prototype.drawInput=function(e,t,n){t.onComplete&&"function"==typeof t.onComplete&&(t.__onCompleteCallBackId__=c.callbackId(t.onComplete)),t.onFocus&&"function"==typeof t.onFocus&&(t.__onFocusCallBackId__=c.callbackId(t.onFocus)),t.onBlur&&"function"==typeof t.onBlur&&(t.__onBlurCallBackId__=c.callbackId(t.onBlur)),c.exec(s,"drawInput",[this.__id__,this.__uuid__,e,t,n])},d.prototype.getInputValueById=function(e){return c.execSync(s,"getInputValueById",[this.__id__,this.__uuid__,e])},d.prototype.getInputFocusById=function(e){return c.execSync(s,"getInputFocusById",[this.__id__,this.__uuid__,e])},d.prototype.setInputFocusById=function(e,t){c.exec(s,"setInputFocusById",[this.__id__,this.__uuid__,e,t])},d.prototype.show=function(){c.exec(s,"show",[this.__id__,this.__uuid__])},d.prototype.setStyle=function(e){c.exec(s,"setStyle",[this.__id__,this.__uuid__,e])},d.prototype.hide=function(){c.exec(s,"hide",[this.__id__,this.__uuid__])},d.prototype.clear=function(){this.close()},d.prototype.close=function(){c.exec(s,"view_close",[this.__id__,this.__uuid__]),delete a[this.__uuid__]},d.prototype.animate=function(e,t){var n;t&&(n=c.callbackId(function(){"function"==typeof t&&t()})),c.exec(s,"view_animate",[this.__id__,this.__uuid__,e,n])},d.prototype.reset=function(){c.exec(s,"view_reset",[this.__id__,this.__uuid__])},d.prototype.restore=function(){c.exec(s,"view_restore",[this.__id__,this.__uuid__])},d.prototype.isVisible=function(){return c.execSync(s,"isVisible",[this.__id__,this.__uuid__])},d.prototype.drawRect=function(e,t,n){c.exec(s,"view_drawRect",[this.__id__,this.__uuid__,e,t,n])},d.prototype.interceptTouchEvent=function(e){c.exec(s,"interceptTouchEvent",[this.__id__,this.__uuid__,e])},d.prototype.addEventListener=function(e,t){var n,i=this;t&&(n=function(e){"function"==typeof t&&(e.target=i,t(e))},t.callback=n,n=c.callbackId(n)),c.exec(s,"addEventListener",[this.__id__,this.__uuid__,e,n])},d.prototype.setEventListener=function(e,t){var n,i=this;t&&(n=function(e){"function"==typeof t&&(e.target=i,t(e))},t.callback=n,n=c.callbackId(n)),c.exec(s,"setEventListener",[this.__id__,this.__uuid__,e,n])},d.prototype.setTouchEventRect=function(e){c.exec(s,"setTouchEventRect",[this.__id__,this.__uuid__,e])},d.getViewById=function(e){var t=c.execSync(s,"getViewById",[e]);return(t=t||p(e,!1))?h(t):null},d.__getViewByUidAndCreate=h,d.__getViewByUidFromCache=function(e){e=p(e,!0);return e?h(e):null},d.startAnimation=function(e,t,n,i){var o,r;e&&t&&(t=t instanceof d?{viewId:t.__uuid__}:{uuid:t.bitmap?t.bitmap.__id__:null,texts:{value:t.text,textStyles:t.textStyles,textRect:t.textRect}},n&&(r=n instanceof d?{viewId:n.__uuid__}:{uuid:n.bitmap?n.bitmap.__id__:null,texts:{value:n.text,textStyles:n.textStyles,textRect:n.textRect}}),i&&(o=c.callbackId(function(){"function"==typeof i&&i()})),c.exec(s,"startAnimation",[e,t,r,o]))},d.clearAnimation=function(e){e=e||"none",c.exec(s,"clearAnimation",[e])},d.prototype.clearRect=function(e,t){c.exec(s,"view_clearRect",[this.__id__,this.__uuid__,e,t])},d.prototype.draw=function(e){f(e),c.exec(s,"view_draw",[this.__id__,this.__uuid__,e])},{Bitmap:_,View:d,ImageSlider:function(e,t,n,i){return(i=new d(e,t,n,i,"ImageSlider")).type="ImageSlider",i},__createNView:function(e,t,n,i){return(i=new o.nativeObj.View(t,n,i)).__uuid__=e,a[i.__uuid__]=i},__appendSubViewInfo:function(e){l[e.uuid]=e},__removeSubViewInfos:function(e){for(var t=0;t<e.length;t++)delete l[e[t]]},__regChildViews:function(e,t){e&&"function"==typeof t&&(i[e]=t)}}}),PlusObject.register("orientation",function(r,s,e,t){var n=(s=s).bridge,c=s.tools,i="Orientation",a=!1,u={},l=[],_=null,o=function(e,t,n,i,o,r){this.alpha=e,this.beta=t,this.gamma=n,this.magneticHeading=i,this.trueHeading=o,this.headingAccuracy=r},f=void 0,d=void 0,p=void 0;function h(e){var t=l.slice(0);_=new o(e.alpha,e.beta,e.gamma,f,d,p);for(var n=0,i=t.length;n<i;n++)t[n].win(_)}function y(){var e=n.callbackId(function(e){f=e.magneticHeading,d=e.trueHeading,p=e.headingAccuracy,h(e)},function(e){h(e)});n.exec(i,"start",[e]),a=!0}function v(e,t){return{win:e,fail:t}}function g(e){e=l.indexOf(e);-1<e&&(l.splice(e,1),0===l.length&&(n.exec(i,"stop",[]),a=!1))}var b={getCurrentOrientation:function(t,n){var i=v(function(e){g(i),t(e)},function(e){g(i),n&&n(e)});l.push(i),a||y()},watchOrientation:function(e,t,n){var i=n&&n.frequency&&("number"==typeof n.frequency||n.frequency instanceof Number)?n.frequency:500,n=c.UUID("watch"),o=v(function(){},function(e){g(o),t&&t(e)});return l.push(o),u[n]={timer:(r.setInterval?r:s).setInterval(function(){_&&e(_)},i),listeners:o},a?_&&e(_):y(),n},clearWatch:function(e){e&&u[e]&&((r.clearInterval?r:s).clearInterval(u[e].timer),g(u[e].listeners),delete u[e])}};s.orientation=b}),PlusObject.register("nativeUI",function(e,s,t,n){var c=s.bridge,a="NativeUI",u=s.bridge,r=s.tools;function i(e){c.exec(a,"setUiStyle",[e])}function o(e,t){this.__uuid__=s.tools.UUID("WaitingView"),this.onclose=null;var n=this,i=u.callbackId(function(){"function"==typeof n.onclose&&n.onclose()});c.exec(a,"WaitingView",[this.__uuid__,[e,t,i]])}function l(e,t,n){var i;this.__uuid__=s.tools.UUID("NativeObj_"),n&&(i=u.callbackId(function(e){var t={};t.index=e,n(t)})),c.exec("NativeUI",e,[s.__HtMl_Id__,[t,i,this.__uuid__]])}return o.prototype.close=function(){c.exec(a,"WaitingView_close",[this.__uuid__])},o.prototype.setTitle=function(e){c.exec(a,"WaitingView_setTitle",[this.__uuid__,[e]])},l.prototype.close=function(){c.exec("NativeUI","_NativeObj_close",[this.__uuid__])},{pickTime:function(n,t,e){var i,o,r;n&&"function"==typeof n&&(i=!1,"object"==typeof e&&(r=e.time,"[object Date]"===Object.prototype.toString.call(r)&&(e.__hours=r.getHours(),e.__minutes=r.getMinutes(),i=!0)),o="function"!=typeof n?null:function(e){var t=void 0!==e?new Date(e):null,e={};e.date=t,n(e)},r="function"!=typeof t?null:function(e){t(e)},r=u.callbackId(o,r),c.exec(a,"pickTime",[s.__HtMl_Id__,[r,e]]),i&&(delete e.__hours,delete e.__minutes))},pickDate:function(n,t,e){var i,o;n&&"function"==typeof n&&(i={},e&&("[object Date]"===Object.prototype.toString.call(e.minDate)?(i.startYear=e.minDate.getFullYear(),i.startMonth=e.minDate.getMonth(),i.startDay=e.minDate.getDate()):r.isNumber(e.startYear)&&(i.startYear=e.startYear,i.startMonth=0,i.startDay=1),"[object Date]"===Object.prototype.toString.call(e.maxDate)?(i.endYear=e.maxDate.getFullYear(),i.endMonth=e.maxDate.getMonth(),i.endDay=e.maxDate.getDate()):r.isNumber(e.endYear)&&(i.endYear=e.endYear,i.endMonth=11,i.endDay=31),"[object Date]"===Object.prototype.toString.call(e.date)&&(i.setYear=e.date.getFullYear(),i.setMonth=e.date.getMonth(),i.setDay=e.date.getDate()),i.popover=e.popover,i.title=e.title),o="function"!=typeof n?null:function(e){var t=void 0!==e?new Date(e):null,e={};e.date=t,n(e)},e="function"!=typeof t?null:function(e){t(e)},e=u.callbackId(o,e),c.exec(a,"pickDate",[s.__HtMl_Id__,[e,i]]))},alert:function(e,t,n,i){var o;e&&(e="string"!=typeof e?e.toString():e,t&&(o=u.callbackId(function(e){t(e)})),c.exec(a,"alert",[s.__HtMl_Id__,[e,o,n,i]]))},confirm:function(e,n,t,i){var o;e&&(e="string"!=typeof e?e.toString():e,n&&(o=u.callbackId(function(e){var t={};t.index=e,n(t)})),c.exec(a,"confirm",[s.__HtMl_Id__,[e,o,t,i]]))},showWaiting:function(e,t){return new o(e,t)},prompt:function(e,t,n,i,o){var r;e&&(e="string"!=typeof e?e.toString():e,t&&(r=u.callbackId(function(e){e.value=e.message,t(e)})),c.exec(a,"prompt",[s.__HtMl_Id__,[e,r,n,i,o]]))},toast:function(e,t){e&&(e="string"!=typeof e?e.toString():e,c.exec(a,"toast",[s.__HtMl_Id__,[e,t]]))},closeToast:function(){c.exec(a,"closeToast",[s.__HtMl_Id__,[]])},showMenu:function(e,n,i){var t;e&&(e.onclick&&(e.__plus__onclickCallbackId=u.callbackId(e.onclick)),i&&(t=u.callbackId(function(e){var t={};t.index=e.index,t.target=n[e.index],i(t)})),c.exec(a,"showMenu",[s.__HtMl_Id__,[e,n,t]]))},hideMenu:function(){c.exec(a,"hideMenu",[s.__HtMl_Id__])},isTitlebarVisible:function(){return c.execSync(a,"isTitlebarVisible",[s.__HtMl_Id__])},setTitlebarVisible:function(e){return c.exec(a,"setTitlebarVisible",[s.__HtMl_Id__,[e]])},getTitlebarHeight:function(){return c.execSync(a,"getTitlebarHeight",[s.__HtMl_Id__])},actionSheet:function(e,t){return new l("actionSheet",e,t)},closeWaiting:function(){u.exec(a,"closeWaiting",[])},setUiStyle:i,setUIStyle:i,previewImage:function(e,t){var n=t,i=u.callbackId(function(e){"function"==typeof n.onLongPress&&n.onLongPress(e)});u.exec(a,"previewImage",[this.__uuid__,[e,t,i]])}}}),PlusObject.register("navigator",function(plusContext,plus,require,param){var bridge=plus.bridge,T=plus.tools,_PLUSNAME="Navigator";return{closeSplashscreen:function(){bridge.exec(_PLUSNAME,"closeSplashscreen",[0])},updateSplashscreen:function(e){bridge.exec(_PLUSNAME,"updateSplashscreen",[e])},isFullscreen:function(){return bridge.execSync(_PLUSNAME,"isFullScreen",[0])},setFullscreen:function(e){bridge.exec(_PLUSNAME,"setFullscreen",[e])},isImmersedStatusbar:function(){return bridge.execSync(_PLUSNAME,"isImmersedStatusbar",[])},getStatusbarHeight:function(e){return this.__statusBarHeight__||(this.__statusBarHeight__=bridge.execSync(_PLUSNAME,"getStatusbarHeight",[])),this.__statusBarHeight__},setStatusBarBackground:function(e){bridge.exec(_PLUSNAME,"setStatusBarBackground",[e])},getStatusBarBackground:function(){return bridge.execSync(_PLUSNAME,"getStatusBarBackground",[])},setStatusBarStyle:function(e){bridge.exec(_PLUSNAME,"setStatusBarStyle",[e])},getStatusBarStyle:function(){return bridge.execSync(_PLUSNAME,"getStatusBarStyle",[])},getUiStyle:function(){return bridge.execSync(_PLUSNAME,"getUiStyle",[])},setUserAgent:function(e,t){bridge.execSync(_PLUSNAME,"setUserAgent",[e,t])},getUserAgent:function(){return bridge.execSync(_PLUSNAME,"getUserAgent",[],function(r){try{var reslut=eval(r);return null==reslut?null:r}catch(e){return r}return r})},removeCookie:function(e){bridge.exec(_PLUSNAME,"removeCookie",[e])},removeSessionCookie:function(e,t){bridge.exec(_PLUSNAME,"removeSessionCookie",[])},removeAllCookie:function(e,t){bridge.exec(_PLUSNAME,"removeAllCookie",[])},setCookie:function(e,t){bridge.exec(_PLUSNAME,"setCookie",[e,t])},getCookie:function(url){return bridge.execSync(_PLUSNAME,"getCookie",[url],function(r){try{var reslut=eval(r);return null==reslut?null:r}catch(e){return r}return r})},setLogs:function(e){bridge.exec(_PLUSNAME,"setLogs",[e])},isLogs:function(){return bridge.execSync(_PLUSNAME,"isLogs",[0])},createShortcut:function(e,t,n){n=bridge.callbackId(t,n);bridge.exec(_PLUSNAME,"createShortcut",[e,n])},hasShortcut:function(e,t){T.platform!=T.IOS&&(t=bridge.callbackId(t),bridge.exec(_PLUSNAME,"hasShortcut",[e,t]))},checkPermission:function(e){return bridge.execSync(_PLUSNAME,"checkPermission",[e])},requestPermission:function(e,t){t=bridge.callbackId(t);return bridge.exec(_PLUSNAME,"requestPermission",[e,t])},isBackground:function(){return bridge.execSync(_PLUSNAME,"isBackground",[])},hasNotchInScreen:function(){return bridge.execSync(_PLUSNAME,"hasNotchInScreen",[])},hasSplashscreen:function(){return bridge.execSync(_PLUSNAME,"hasSplashscreen",[])},hideSystemNavigation:function(){return bridge.exec(_PLUSNAME,"hideSystemNavigation",[])},showSystemNavigation:function(){return bridge.exec(_PLUSNAME,"showSystemNavigation",[])},getSafeAreaInsets:function(){return plus.tools.ANDROID==plus.tools.platform?{bottom:0,left:0,right:0,top:0,deviceBottom:0,deviceLeft:0,deviceRight:0,deviceTop:0}:bridge.execSync(_PLUSNAME,"getSafeAreaInsets",[])},getOrientation:function(){return bridge.execSync(_PLUSNAME,"getOrientation",[])},getUIStyle:function(){return bridge.execSync(_PLUSNAME,"getUiStyle",[])},isRoot:function(){return plus.tools.ANDROID!=plus.tools.platform&&bridge.execSync(_PLUSNAME,"isRoot",[])},isSimulator:function(){return bridge.execSync(_PLUSNAME,"isSimulator",[])},getSignature:function(){return bridge.execSync(_PLUSNAME,"getSignature",[])}}}),PlusObject.register("webview",function(e,c,t){var s=(c=c).bridge,a="UI",u="execMethod",l="syncExecMethod",_={},r=c.bridge,n=c.tools;function i(e,t,n){s.exec(a,u,[e.__IDENTITY__,t,[e.__uuid__,n]])}function o(e){this.__IDENTITY__=e,this.__uuid__=c.tools.UUID(e),this.id,c.obj.Callback.call(this)}function f(){return n.platform!=n.IOS&&s.execSync(a,l,[a,"defaultHardwareAccelerated",[]])}function d(e){if(e&&"string"==typeof e){var t,n=s.execSync(a,l,[a,"findWindowByName",[c.__HtMl_Id__,[e]]]);if(n){var i=_[n.uuid];return null==i&&((i=new c.webview.Webview(null,null,!0,n.extras)).__uuid__=n.uuid,i.id=n.id,s.exec(a,u,[a,"setcallbackid",[i.__uuid__,[i.__callback_id__]]]),_[i.__uuid__]=i),i}for(t in _){var o=_[t];if(o&&o.id===e)return o}return null}}function p(){var e,t=_[c.__HtMl_Id__];return null!=t&&void 0!==t||(e=s.execSync2(a,l,[a,"currentWebview",[c.__HtMl_Id__]]))&&((t=new c.webview.Webview(null,null,!0,e.extras)).__uuid__=c.__HtMl_Id__,t.id=e.id,_[t.__uuid__]=t,s.exec(a,u,[a,"setcallbackid",[t.__uuid__,[t.__callback_id__]]])),t}o.prototype.getMetrics=function(n){n&&i(this,"getMetrics",[r.callbackId(function(e){var t={};t.canForward=e,n(t)}),c.__HtMl_Id__])},o.prototype.onCallback=function(e,t,n){"popGesture"==t?(t=n.private_args,t={target:c.webview._find__Window_By_UUID__(t.uuid,t.id,t.extras),type:n.type,progress:n.progress},"result"in n&&(t.result=n.result),n=t):(n=n||{}).target=this,e(n)},o.prototype.addEventListener=function(e,t,n){c.obj.Callback.prototype.addEventListener.apply(this,[e,t,n])&&i(this,"addEventListener",[e,c.__HtMl_Id__])},o.prototype.removeEventListener=function(e,t){c.obj.Callback.prototype.removeEventListener.apply(this,[e,t])&&i(this,"removeEventListener",[e,c.__HtMl_Id__])};var h={open:function(e,t,n,i,o,r,s){return(s=c.webview.create(e,t,n,s)).show(i,o,r),s},show:function(e,t,n,i,o){var r=null;if("string"==typeof e)r=d(e);else{if(!(e instanceof c.webview.Webview))return;r=e}r&&r.show(t,n,i,o)},hide:function(e,t,n,i){var o=null;if("string"==typeof e)o=d(e);else{if(!(e instanceof c.webview.Webview))return;o=e}o&&o.hide(t,n,i)},NView:o,createGroup:null,getWapLaunchWebview:function(){if(n.IOS==n.platform)return null;var e=s.execSync(a,l,[a,"getWapLaunchWebview",[]]);if(e){var t=_[e.uuid];return null==t&&((t=new c.webview.Webview(null,null,!0,e.extras)).__uuid__=e.uuid,t.id=e.id,s.exec(a,u,[a,"setcallbackid",[t.__uuid__,[t.__callback_id__]]]),_[t.__uuid__]=t),t}return null},getLaunchWebview:function(){var e=s.execSync2(a,l,[a,"getLaunchWebview",[]]);if(e){var t=_[e.uuid];return null==t&&((t=new c.webview.Webview(null,null,!0,e.extras)).__uuid__=e.uuid,t.id=e.id,s.exec(a,u,[a,"setcallbackid",[t.__uuid__,[t.__callback_id__]]]),_[t.__uuid__]=t),t}},getSecondWebview:function(){var e=s.execSync2(a,l,[a,"getSecondWebview",[]]);if(e){var t=_[e.uuid];return null==t&&((t=new c.webview.Webview(null,null,!0,e.extras)).__uuid__=e.uuid,t.id=e.id,s.exec(a,u,[a,"setcallbackid",[t.__uuid__,[t.__callback_id__]]]),_[t.__uuid__]=t),t}},getWebviewById:d,getTopWebview:function(){var e=s.execSync(a,l,[a,"getTopWebview",[c.__HtMl_Id__]]);if(e){var t=_[e.uuid];return null==t&&((t=new c.webview.Webview(null,null,!0,e.extras)).__uuid__=e.uuid,t.id=e.id,s.exec(a,u,[a,"setcallbackid",[t.__uuid__,[t.__callback_id__]]]),_[t.__uuid__]=t),t}return null},close:function(e,t,n){var i=null;if("string"==typeof e)i=d(e);else{if(!(e instanceof c.webview.Webview))return;i=e}i&&i.close(t,n)},create:function(e,t,n,i){return(n=n||{}).name=t,new c.webview.Webview(e,n,!1,i)},prefetchURL:function(e){s.exec(a,u,[a,"prefetchURL",[c.__HtMl_Id__,[e]]])},prefetchURLs:function(e){s.exec(a,u,[a,"prefetchURLs",[c.__HtMl_Id__,[e]]])},currentWebview:p,__currentWebview:p,postMessageToUniNView:function(e,t){var n=_[c.__HtMl_Id__];s.exec(a,u,[a,"postMessageToUniNView",[n.__uuid__,[e,t]]])},__callNativeModuleSync__:function(e,t){var n=_[c.__HtMl_Id__];return s.execSync2(a,l,[a,"__callNativeModuleSync",[n.__uuid__,[e,t]]])},all:function(){for(var e=s.execSync(a,l,[a,"enumWindow",[c.__HtMl_Id__]]),t=[],n={},i=0;i<e.length;i++){var o=e[i],r=_[o.uuid];r||((r=new c.webview.Webview(null,null,!0,o.extras)).__uuid__=o.uuid,r.id=o.id,s.exec(a,u,[a,"setcallbackid",[r.__uuid__,[r.__callback_id__]]])),t.push(r),n[r.__uuid__]=r}return _=n,t},getDisplayWebview:function(){var e=s.execSync(a,l,[a,"getDisplayWebview",[c.__HtMl_Id__]]),t=[];if(!e)return t;for(var n={},i=0;i<e.length;i++){var o=e[i],r=_[o.uuid];r?r.id||(r.id=o.id):((r=new c.webview.Webview(null,null,!0,o.extras)).__uuid__=o.uuid,r.id=o.id,s.exec(a,u,[a,"setcallbackid",[r.__uuid__,[r.__callback_id__]]])),t.push(r),n[r.__uuid__]=r}return _=n,t},defauleHardwareAccelerated:f,defaultHardwareAccelerated:f,exec:i,execSync:function(e,t,n){return s.execSync(a,l,[e.__IDENTITY__,t,[e.__uuid__,n]])},_find__Window_By_UUID__:function(e,t,n){if(e&&"string"==typeof e){var i=_[e];return i||((i=new c.webview.Webview(null,null,!0,n)).__uuid__=e,i.id__=t,i.id=t,s.exec(a,u,[a,"setcallbackid",[i.__uuid__,[i.__callback_id__]]]),_[e]=i),i}},__pushWindow__:function(e){_[e.__uuid__]=e},__popWindow__:function(e){delete _[e.__uuid__]},__JSON_Window_Stack:_,__Webview_LoadEvent_CallBack_:function(e){var t=_[e.WebviewID];t&&("onloading"==e.Event?null!=t.onloading&&t.onloading({target:t}):"onclose"==e.Event?(null!=t.onclose&&t.onclose({target:t}),delete _[e.WebviewID]):"onerror"==e.Event?null!=t.onerror&&t.onerror({target:t}):"onloaded"==e.Event&&null!=t.onloaded&&t.onloaded({target:t}))},startAnimation:function(e,t,n){var i,o;e&&e.view&&e.styles&&e.styles.toLeft&&("string"==typeof e.view||e.view instanceof c.webview.Webview)&&(e.view instanceof c.webview.Webview&&(e.view=e.view.__uuid__),t&&t.view&&("string"==typeof t.view||t.view instanceof c.webview.Webview)&&t.view instanceof c.webview.Webview&&(t.view=t.view.__uuid__),n&&"function"==typeof n&&(i=c.webview.currentWebview().__uuid__,o=r.callbackId(function(e){e.target=c.webview._find__Window_By_UUID__(e.target.uuid),n(e)})),s.exec(a,u,[a,"startAnimation",[c.__HtMl_Id__,[e,t,i,o]]]))}};return h.WebviewGroup=LoadWebviewMoudle(e,c,h),h.Webview=LoadWebviewMoudle(e,c,h),h}),PlusObject.register("cache",function(e,t,n,i){var o=t.bridge,r="Cache";t.cache={clear:function(t){var e=o.callbackId(function(e){t&&t()},null);o.exec(r,"clear",[e])},calculate:function(t){var e=o.callbackId(function(e){t&&t(e)},null);o.exec(r,"calculate",[e])},setMaxSize:function(e){o.exec(r,"setMaxSize",[e])}}}),PlusObject.register("contacts",function(e,t,n,i){function c(e){this.code=e||null}var a,u,l="Contacts",_=(t=t).bridge,f=t.tools;function o(e,t,n,i,o,r,s,c,a,u,l,_,f,d,p){this.id=e||null,this.rawId=p||null,this.target=0,this.displayName=t||null,this.name=n||null,this.nickname=i||null,this.phoneNumbers=o||null,this.emails=r||null,this.addresses=s||null,this.ims=c||null,this.organizations=a||null,this.birthday=u||null,this.note=l||null,this.photos=_||null,this.categories=f||null,this.urls=d||null}c.UNKNOWN_ERROR=0,c.INVALID_ARGUMENT_ERROR=1,c.TIMEOUT_ERROR=2,c.PENDING_OPERATION_ERROR=3,c.IO_ERROR=4,c.NOT_SUPPORTED_ERROR=5,c.PERMISSION_DENIED_ERROR=20;var r=o.prototype;function s(e){this.type=e}r.remove=function(e,t){var n=t&&function(e){t(new c(e))};null===this.id?n(c.UNKNOWN_ERROR):(n=_.callbackId(e,n),_.exec(l,"remove",[n,this.id,this.target],{cbid:n}))},r.clone=function(){var e=f.clone(this);function t(e){if(e)for(var t=e.length,n=0;n<t;++n)e[n].id=null}return e.id=null,t(e.phoneNumbers),t(e.emails),t(e.addresses),t(e.ims),t(e.organizations),t(e.categories),t(e.photos),t(e.urls),e},r.save=function(o,t){function r(e){t&&t(new c(e))}var s=this,e=function(e){var t=e.birthday;if(null!==t){if(!f.isDate(t))try{t=new Date(t)}catch(e){t=null}f.isDate(t)&&(t=t.valueOf()),e.birthday=t}return e}(f.clone(this)),n=_.callbackId(function(e){if(e)try{var t=(0==s.target?a:u).create(e);o&&(i=function(e){var t=e.birthday;try{f.isDate(t)||(e.birthday=new Date(parseFloat(t)))}catch(e){console.log("Cordova Contact convertIn error: exception creating date.")}return e}(t),(t=s).id=i.id,n(i.phoneNumbers,t.phoneNumbers),n(i.emails,t.emails),n(i.addresses,t.addresses),n(i.ims,t.ims),n(i.organizations,t.organizations),n(i.categories,t.categories),n(i.photos,t.photos),n(i.urls,t.urls),o(s))}catch(e){console.log(e)}else r(c.UNKNOWN_ERROR);function n(e,t){if(e&&t)for(var n=e.length,i=0;i<n;++i)t[i].id=e[i].id}var i},r);_.exec(l,"save",[n,e,this.target],{cbid:n})};r=s.prototype;r.create=function(e){var t,n=new o;for(t in n.target=this.type,e)void 0!==n[t]&&e.hasOwnProperty(t)&&(n[t]=e[t]);return n},r.find=function(e,o,t,n){t=_.callbackId(function(e){for(var t=[],n=0,i=e.length;n<i;n++)t.push(a.create(e[n]));o(t)},t);_.exec(l,"search",[t,e,n],{cbid:t})};var d=t.contacts={getAddressBook:function(t,n,i){0===t&&1===t||(t=0);var e=_.callbackId(function(e){n&&(d.ADDRESSBOOK_PHONE==t?a=a||new s(0):u=u||new s(1),n(a))},function(e){i(new c(e))});_.exec(l,"getAddressBook",[e,t],{cbid:e})},ADDRESSBOOK_PHONE:0,ADDRESSBOOK_SIM:1}}),PlusObject.register("proximity",function(e,t){var r=t.bridge,s=t.tools,c="Proximity",a=!1,u={},l=[];function _(e){e=l.indexOf(e);-1<e&&(l.splice(e,1),0===l.length&&(r.exec(c,"stop",[]),a=!1))}var n={getCurrentProximity:function(t,n){var e=r.callbackId(function(e){s.IOS==s.platform&&(e=0==e?0:1/0),t&&t(e)},function(e){n&&n(e)});r.exec(c,"getCurrentProximity",[e])},watchProximity:function(t,n){var e,i=s.UUID("watch"),o={win:function(e){s.IOS==s.platform&&(e=0==e?0:1/0),t&&t(e)},fail:function(e){_(o),n&&n(e)}};return l.push(o),u[i]={listeners:o},a||(e=r.callbackId(function(e){for(var t=l.slice(0),n=0,i=t.length;n<i;n++)t[n].win(e)},function(e){for(var t=l.slice(0),n=0,i=t.length;n<i;n++)t[n].fail(e)}),r.exec(c,"start",[e]),a=!0),i},clearWatch:function(e){e&&u[e]&&(_(u[e].listeners),delete u[e])}};t.proximity=n}),PlusObject.register("net",function(e,t,n,i){var o=t.bridge,r=t.tools;function s(e,t,n,i){this.target=e,this.lengthComputable=t,this.loaded=n,this.total=i}function c(){}function a(){this.__init__(),this.__UUID__=r.UUID("xhr")}c.Timeout=0,c.Other=1,a.Uninitialized=0,a.Open=1,a.Sent=2,a.Receiving=3,a.Loaded=4,a.__F__="XMLHttpRequest";t=a.prototype;return t.__init__=function(){this.readyState=a.Uninitialized,this.responseText="",this.responseXML=null,this.status=a.Uninitialized,this.statusText=null,this.onreadystatechange,this.responseType=null,this.response=null,this.withCredentials=!0,this.timeout=12e4,this.__noParseResponseHeader__=null,this.__requestHeaders__={},this.__responseHeaders__={},this.__cacheReponseHeaders__={},this.__progessEvent__=new s(this,!1,0,0),Object.defineProperty(this.__progessEvent__,"target",{enumerable:!1})},t.abort=function(){this.readyState>a.Uninitialized&&("function"==typeof this.onabort&&this.onabort(this.__progessEvent__),this.__init__(),o.exec(a.__F__,"abort",[this.__UUID__]))},t.getAllResponseHeaders=function(){if(this.readyState>=a.Receiving){if(this.__noParseResponseHeader__)return this.__noParseResponseHeader__;var e,t="";for(e in this.__responseHeaders__)t=t+e+": "+this.__responseHeaders__[e]+"\r\n";return this.__noParseResponseHeader__=t,this.__noParseResponseHeader__}return null},t.getResponseHeader=function(e){if("string"==typeof e&&this.readyState>=a.Receiving){var t=null;if(e=e.toLowerCase(),t=this.__cacheReponseHeaders__[e])return t;for(n in this.__responseHeaders__){var n,i=this.__responseHeaders__[n];e===(n=n.toLowerCase())&&(t=t?t+", "+i:i)}return this.__cacheReponseHeaders__[e]=t}return null},t.setRequestHeader=function(e,t){var n;"string"==typeof e&&"string"==typeof t&&a.Open==this.readyState&&(n=this.__requestHeaders__[e],this.__requestHeaders__[e]=n?n+", "+t:t)},t.open=function(e,t,n,i){a.Open!=this.readyState&&a.Loaded!=this.readyState||this.__init__(),a.Uninitialized==this.readyState&&(this.readyState=a.Open,o.exec(a.__F__,"open",[this.__UUID__,e,"string"==typeof(t=t)?0==(t=t.replace(/(^\s*)|(\s*$)/g,"")).indexOf("http://")||0==t.indexOf("https://")?t:t=0==t.indexOf("/")?location.origin+t:location.origin+location.pathname+t:"",n,i,this.timeout]),"function"==typeof this.onreadystatechange&&this.onreadystatechange())},t.overrideMimeType=function(e){o.exec(a.__F__,"overrideMimeType",[this.__UUID__,e])},t.send=function(e){var n=this;if(a.Open!=this.readyState)throw new Error("XMLHttpRequest not open");this.readyState=a.Sent,"function"==typeof this.onloadstart&&this.onloadstart(n.__progessEvent__);var t=o.callbackId(function(e){if(a.Receiving==e.readyState)a.Sent==n.readyState?(n.readyState=a.Receiving,n.status=e.status,n.statusText=e.statusText,n.__responseHeaders__=e.header,n.__progessEvent__.lengthComputable=e.lengthComputable,n.__progessEvent__.total=e.totalSize):a.Receiving==n.readyState&&(n.responseText=e.responseText,n.__progessEvent__.loaded=e.revSize),"function"==typeof n.onreadystatechange&&n.onreadystatechange(),"function"==typeof n.onprogress&&n.onprogress(n.__progessEvent__);else if(a.Loaded==e.readyState){n.readyState=a.Loaded,e.status&&(n.status=e.status);try{n.responseText&&(t=new DOMParser,n.responseXML=t.parseFromString(n.responseText,"text/xml"))}catch(e){n.responseXML=null}try{var t;"document"==n.responseType?(t=new DOMParser,n.response=n.responseXML):"json"==n.responseType&&(n.response=JSON.parse(n.responseText))}catch(e){n.response=null}"function"==typeof n.onreadystatechange&&n.onreadystatechange(),e.error==c.Timeout?"function"==typeof n.ontimeout&&n.ontimeout(n.__progessEvent__):e.error==c.Other?"function"==typeof n.onerror&&n.onerror(n.__progessEvent__):"function"==typeof n.onload&&n.onload(n.__progessEvent__),"function"==typeof n.onloadend&&n.onloadend(n.__progessEvent__)}});return o.exec(a.__F__,"send",[this.__UUID__,t,e,this.__requestHeaders__]),void("function"==typeof this.onreadystatechange&&this.onreadystatechange())},{XMLHttpRequest:a}}),PlusObject.register("zip",function(e,t,n,i){var o=t.bridge,r="Zip";return{compressVideo:function(e,t,n){n=o.callbackId(function(e){t&&(e={tempFilePath:e.tempFilePath,size:e.size},t(e))},n);o.exec(r,"compressVideo",[e,n])},decompress:function(e,t,n,i){i=o.callbackId(n,i);o.exec(r,"decompress",[e,t,i])},compress:function(e,t,n,i){i=o.callbackId(n,i);o.exec(r,"compress",[e,t,i])},compressImage:function(e,t,n){n=o.callbackId(function(e){t&&(e={target:e.path,width:e.w,height:e.h,size:e.size},t(e))},n);o.exec(r,"compressImage",[e,n])}}}),PlusObject.register("beacon",function(e,t,n,i){var o="iBeacon",r=t.bridge,s={startBeaconDiscovery:function(t){if("object"==typeof t){var n="function"!=typeof t.complete?function(){}:t.complete,e="function"!=typeof t.success?n:function(e){t.success(e),n(e)},i="function"!=typeof t.fail?n:function(e){t.fail(e),n(e)};return callbackID=r.callbackId(e,i),r.exec(o,"startBeaconDiscovery",[callbackID,t.uuids])}},stopBeaconDiscovery:function(t){var n="function"!=typeof t.complete?function(){}:t.complete,e="function"!=typeof t.success?n:function(e){t.success(e),n(e)},i="function"!=typeof t.fail?n:function(e){t.fail(e),n(e)};return callbackID=r.callbackId(e,i),r.exec(o,"stopBeaconDiscovery",[callbackID])},getBeacons:function(t){var n="function"!=typeof t.complete?function(){}:t.complete,e="function"!=typeof t.success?n:function(e){t.success(e),n(e)},i="function"!=typeof t.fail?n:function(e){t.fail(e),n(e)};return callbackID=r.callbackId(e,i),r.exec(o,"getBeacons",[callbackID])},onBeaconUpdate:function(e){e="function"!=typeof e?null:e;return callbackID=r.callbackId(e),r.exec(o,"onBeaconUpdate",[callbackID])},onBeaconServiceChange:function(e){e="function"!=typeof e?null:e;return callbackID=r.callbackId(e),r.execSync(o,"onBeaconServiceChange",[callbackID])}};t.ibeacon=s}),PlusObject.register("bluetooth",function(e,t,n,i){var o="Bluetooth",a=t.bridge,r={closeBluetoothAdapter:function(e){return callbackID=this.getCallbackIDByFunction(e.success,e.fail,e.complete),a.exec(o,"closeBluetoothAdapter",[callbackID])},openBluetoothAdapter:function(e){return callbackID=this.getCallbackIDByFunction(e.success,e.fail,e.complete),a.exec(o,"openBluetoothAdapter",[callbackID])},getBluetoothAdapterState:function(e){return callbackID=this.getCallbackIDByFunction(e.success,e.fail,e.complete),a.exec(o,"getBluetoothAdapterState",[callbackID])},getBluetoothDevices:function(r){var s=this,c="function"!=typeof r.complete?function(){}:r.complete,e="function"!=typeof r.success?null:function(e){for(var t=e.devices,n=0;n<t.length;n++){var i=t[n];if(i.advertisData&&"string"==typeof i.advertisData&&"{}"!=i.advertisData&&(i.advertisData=s.string2ArrayBuffer(i.advertisData)),i.serviceData&&"{}"!=i.serviceData)for(var o in i.serviceData)"string"==typeof i.serviceData[o]&&""!=i.serviceData[o]&&(i.serviceData[o]=s.string2ArrayBuffer(i.serviceData[o]))}r.success(e),c(e)},t="function"!=typeof r.fail?null:function(e){r.fail(e),c(e)},t=a.callbackId(e,t);return a.exec(o,"getBluetoothDevices",[t])},getConnectedBluetoothDevices:function(e){return callbackID=this.getCallbackIDByFunction(e.success,e.fail,e.complete),a.exec(o,"getConnectedBluetoothDevices",[callbackID,e])},startBluetoothDevicesDiscovery:function(e){return callbackID=this.getCallbackIDByFunction(e.success,e.fail,e.complete),a.exec(o,"startBluetoothDevicesDiscovery",[callbackID,e])},stopBluetoothDevicesDiscovery:function(e){return callbackID=this.getCallbackIDByFunction(e.success,e.fail,e.complete),a.exec(o,"stopBluetoothDevicesDiscovery",[callbackID])},onBluetoothAdapterStateChange:function(e){return callbackID=this.getCallbackIDByFunction(e),a.exec(o,"onBluetoothAdapterStateChange",[callbackID])},onBluetoothDeviceFound:function(r){var s=this,e="function"!=typeof r?null:function(e){for(var t=e.devices,n=0;n<t.length;n++){var i=t[n];if(i.advertisData&&"string"==typeof i.advertisData&&"{}"!=i.advertisData&&(i.advertisData=s.string2ArrayBuffer(i.advertisData)),i.serviceData&&"{}"!=i.serviceData)for(var o in i.serviceData)"string"==typeof i.serviceData[o]&&""!=i.serviceData[o]&&(i.serviceData[o]=s.string2ArrayBuffer(i.serviceData[o]))}r(e)};return callbackID=a.callbackId(e),a.exec(o,"onBluetoothDeviceFound",[callbackID])},createBLEConnection:function(e){return callbackID=this.getCallbackIDByFunction(e.success,e.fail,e.complete),a.exec(o,"createBLEConnection",[callbackID,e])},closeBLEConnection:function(e){return callbackID=this.getCallbackIDByFunction(e.success,e.fail,e.complete),a.exec(o,"closeBLEConnection",[callbackID,e])},setBLEMTU:function(e){return callbackID=this.getCallbackIDByFunction(e.success,e.fail,e.complete),a.exec(o,"setBLEMTU",[callbackID,e])},getBLEDeviceRSSI:function(e){return callbackID=this.getCallbackIDByFunction(e.success,e.fail,e.complete),a.exec(o,"getBLEDeviceRSSI",[callbackID,e])},getBLEDeviceCharacteristics:function(e){return callbackID=this.getCallbackIDByFunction(e.success,e.fail,e.complete),a.exec(o,"getBLEDeviceCharacteristics",[callbackID,e])},getBLEDeviceServices:function(e){return callbackID=this.getCallbackIDByFunction(e.success,e.fail,e.complete),a.exec(o,"getBLEDeviceServices",[callbackID,e])},notifyBLECharacteristicValueChange:function(e){return callbackID=this.getCallbackIDByFunction(e.success,e.fail,e.complete),a.exec(o,"notifyBLECharacteristicValueChange",[callbackID,e])},onBLECharacteristicValueChange:function(t){var n=this,e="function"!=typeof t?null:function(e){e.value&&"string"==typeof e.value&&(e.value=n.string2ArrayBuffer(e.value)),t(e)};return callbackID=a.callbackId(e),a.exec(o,"onBLECharacteristicValueChange",[callbackID])},onBLEConnectionStateChange:function(e){return callbackID=this.getCallbackIDByFunction(e),a.exec(o,"onBLEConnectionStateChange",[callbackID])},readBLECharacteristicValue:function(e){return callbackID=this.getCallbackIDByFunction(e.success,e.fail,e.complete),a.exec(o,"readBLECharacteristicValue",[callbackID,e])},writeBLECharacteristicValue:function(e){if("string"!=typeof e.value)return callbackID=this.getCallbackIDByFunction(e.success,e.fail,e.complete),e.value=this.ab2hex(e.value),a.exec(o,"writeBLECharacteristicValue",[callbackID,e]);e.fail({code:10019,message:"Value cannot be a string"})},ab2hex:function(e){return Array.prototype.map.call(new Uint8Array(e),function(e){return("00"+e.toString(16)).slice(-2)}).join("")},string2ArrayBuffer:function(e){return new Uint8Array(e.match(/[\da-f]{2}/gi).map(function(e){return parseInt(e,16)})).buffer},getCallbackIDByFunction:function(t,n,i){var i="function"!=typeof i?function(){}:i,e="function"!=typeof t?null:function(e){t(e),i(e)},o="function"!=typeof n?null:function(e){n(e),i(e)};return a.callbackId(e,o)}};t.bluetooth=r}),PlusObject.register("fingerprint",function(e,t,n,i){var r=(t=t).bridge,s="fingerprint";function c(e,t){this.code=e,this.message=t,this.UNSUPPORT=1,this.KEYGUARD_INSECURE=2,this.FINGERPRINT_UNENROLLED=3,this.AUTHENTICATE_MISMATCH=4,this.AUTHENTICATE_OVERLIMIT=5,this.CANCEL=6,this.UNKNOWN_ERROR=7}t.fingerprint={isSupport:function(){return r.execSync(s,"isSupport")},isEnrolledFingerprints:function(){return r.execSync(s,"isEnrolledFingerprints")},isKeyguardSecure:function(){return r.execSync(s,"isKeyguardSecure")},authenticate:function(t,n,e){var i="function"!=typeof t?null:function(e){t(e)},o="function"!=typeof n?null:function(e){n(new c(e.code,e.message))};callbackID=r.callbackId(i,o),r.exec(s,"authenticate",[callbackID,e])},cancel:function(){return r.exec(s,"cancel")}}}),PlusObject.register("payment",function(s,c,e,t){var a="Payment",u=c.bridge;function l(){this.id="",this.description="",this.serviceReady=!0,this.installService=function(){u.exec(a,"installService",[this.id])},this.appStoreReceipt=function(){return u.execSync(a,"appStoreReceipt",[this.id])},this.restoreComplateRequest=function(e,t,n){"appleiap"!==this.id&&n({errorcode:"-3"});var i="function"!=typeof t?null:function(e){t(e)},o="function"!=typeof n?null:function(e){n(e)},o=u.callbackId(i,o);u.exec(a,"restoreComplateRequest",[this.id,o,e])},this.requestOrder=function(e,t,n){var i,o;"appleiap"===this.id?(i="function"!=typeof t?null:function(e){t(e)},o="function"!=typeof n?null:function(e){n(e)},o=u.callbackId(i,o),u.exec(a,"requestOrder",[this.id,o,e])):n({errorcode:"-3"})}}var _={Channel:l,getChannels:function(r,t){var e="function"!=typeof r?null:function(e){for(var t=[],n=e.length,i=0;i<n;i++){var o=new _.Channel;o.id=e[i].id,o.description=e[i].description,o.serviceReady=e[i].serviceReady,t[i]=o}r(t)},n="function"!=typeof t?null:function(e){t(e)},n=u.callbackId(e,n);u.exec(a,"getChannels",[n])},request:function(e,t,n,i){var o="function"!=typeof n?null:function(e){n(e)},r="function"!=typeof i?null:function(e){i(e)};e instanceof l?(o=u.callbackId(o,r),u.exec(a,"request",[e.id,t,o])):(s.setTimeout?s:c).setTimeout(function(){r({code:62e3})},0)}};c.payment=_}),PlusObject.register("messaging",function(e,t,n,i){var r=t.bridge,s="Messaging";function c(e){this.__hasPendingOperation__=!1,this.to=[],this.cc=[],this.bcc=[],this.subject="",this.body="",this.bodyType="text",this.silent=!1,this.attachment=[],this.type=e}c.prototype.addAttachment=function(e){"string"==typeof e&&this.attachment.push(e)},t.messaging={createMessage:function(e){return new c(e)},sendMessage:function(t,e,n){var i,o;t instanceof c&&(i="function"!=typeof e?null:function(){t.__hasPendingOperation__=!1,e()},o="function"!=typeof n?null:function(e){t.__hasPendingOperation__=!1,n(e)},t.__hasPendingOperation__?o({code:2,message:"sending"}):(t.__hasPendingOperation__=!0,o=r.callbackId(i,o),r.exec(s,"sendMessage",[o,t],{cbid:o})))},listenMessage:function(t,n){var e="function"!=typeof t?null:function(e){t(e)},i="function"!=typeof n?null:function(e){n(e)},i=r.callbackId(e,i);r.exec(s,"listenMessage",[i],{cbid:i})},TYPE_SMS:1,TYPE_MMS:2,TYPE_EMAIL:3}}),PlusObject.register("downloader",function(e,t,n,i){var o=t.bridge,r=t.tools,s="Downloader",a=function(e,t){return void 0===e?t:e};function c(e,t,n){this.type=a(e,""),this.handles=[],this.capture=a(n,!1),"function"==typeof t&&this.handles.push(t)}function u(e,t,n){var i=this;i.id=r.UUID("dt"),i.url=a(e,""),i.downloadedSize=0,i.totalSize=0,i.options=t||{},i.filename=a(i.options.filename,""),i.method=a(i.options.method,"GET"),i.timeout=a(i.options.timeout,120),i.retry=a(i.options.retry,3),i.retryInterval=a(i.options.retryInterval,30),i.priority=a(i.options.priority,1),i.onCompleted=n||null,i.eventHandlers={},i.data=a(i.options.data,null),i.__requestHeaders__={},i.__responseHeaders__={},i.__noParseResponseHeader__=null,i.__cacheReponseHeaders__={}}c.prototype.fire=function(e){for(var t=0;t<this.handles.length;++t)this.handles[t].apply(this,arguments)};t=u.prototype;t.getFileName=function(){return this.filename},t.start=function(){o.exec(s,"start",[this.id,this.__requestHeaders__])},t.pause=function(){o.exec(s,"pause",[this.id])},t.resume=function(){o.exec(s,"resume",[this.id])},t.abort=function(){o.exec(s,"abort",[this.id])},t.getAllResponseHeaders=function(){if(this.__noParseResponseHeader__)return this.__noParseResponseHeader__;var e,t="";for(e in this.__responseHeaders__)t=t+e+" : "+this.__responseHeaders__[e]+"\r\n";return this.__noParseResponseHeader__=t,this.__noParseResponseHeader__},t.getResponseHeader=function(e){if("string"!=typeof e)return"";var t=null;if(e=e.toLowerCase(),t=this.__cacheReponseHeaders__[e])return t;for(n in this.__responseHeaders__){var n,i=this.__responseHeaders__[n];e===(n=n.toLowerCase())&&(t=t?t+", "+i:i)}return this.__cacheReponseHeaders__[e]=t},t.setRequestHeader=function(e,t){var n;"string"==typeof e&&"string"==typeof t&&(n=this.__requestHeaders__[e],this.__requestHeaders__[e]=n?n+", "+t:t)},t.addEventListener=function(e,t,n){var i;"string"==typeof e&&"function"==typeof t&&(i=e.toLowerCase(),void 0===this.eventHandlers[i]?this.eventHandlers[i]=new c(e,t,n):this.eventHandlers[i].handles.push(t))},t.__handlerEvt__=function(e){var t=this;t.filename=a(e.filename,t.filename),t.state=a(e.state,t.state),t.downloadedSize=a(e.downloadedSize,t.downloadedSize),t.totalSize=a(e.totalSize,t.totalSize),t.__responseHeaders__=a(e.headers,{}),4==t.state&&"function"==typeof t.onCompleted&&t.onCompleted(t,e.status||null);var n=this.eventHandlers.statechanged;n&&n.fire(t,e.status||null)};var l={__taskList__:[],createDownload:function(e,t,n){if("string"!=typeof e)return null;n=new u(e,t,n);return l.__taskList__[n.id]=n,o.exec(s,"createDownload",[n]),n},enumerate:function(c,e){var t=o.callbackId(function(e){for(var t=[],n=e.length,i=0,o=l.__taskList__;i<n;i++){var r,s=e[i];s&&s.uuid&&((r=o[s.uuid])||((r=new u).id=s.uuid,o[r.id]=r),r.state=a(s.state,r.state),r.options=a(s.options,r.options),r.filename=a(s.filename,r.filename),r.url=a(s.url,r.url),r.downloadedSize=a(s.downloadedSize,r.downloadedSize),r.totalSize=a(s.totalSize,r.totalSize),r.__responseHeaders__=a(e.headers,r.__responseHeaders__),t.push(r))}"function"==typeof c&&c(t)});o.exec(s,"enumerate",[t,e])},clear:function(e){var t=-1e4;("number"==typeof e||e instanceof Number)&&(t=e),o.exec(s,"clear",[t])},startAll:function(){o.exec(s,"startAll",[0])},__handlerEvt__:function(e,t){var n=l.__taskList__[e];n&&(6==t.state&&delete l.__taskList__[e],n.__handlerEvt__(t))}};return l}),PlusObject.register("uploader",function(e,t,n,i){var o=t.bridge,r=t.tools,s=function(){return r.UUID("uploader")},a="Uploader",u=function(e,t){return void 0===e?t:e};function c(e,t,n){this.type=u(e,""),this.handles=[],this.capture=u(n,!1),"function"==typeof t&&this.handles.push(t)}function l(e,t,n){this.__UUID__=s(),this.url=u(e,""),this.options=t||{},this.uploadedSize=0,this.totalSize=0,this.responseText="",this.method=u(this.options.method,"GET"),this.chunkSize=u(this.options.chunkSize,0),this.timeout=u(this.options.timeout,120),this.retry=u(this.options.retry,3),this.retryInterval=u(this.options.retryInterval,30),this.priority=u(this.options.priority,1),this.onCompleted=n||null,this.eventHandlers={},this.__requestHeaders__={},this.__responseHeaders__={},this.__noParseResponseHeader__=null,this.__cacheReponseHeaders__={}}return c.prototype.fire=function(e){for(var t=0;t<this.handles.length;++t)this.handles[t].apply(this,arguments)},l.prototype.addFile=function(e,t){return"string"==typeof e&&"object"==typeof t&&(o.exec(a,"addFile",[this.__UUID__,e,t]),!0)},l.prototype.addData=function(e,t){return"string"==typeof e&&"string"==typeof t&&(o.exec(a,"addData",[this.__UUID__,e,t]),!0)},l.prototype.getAllResponseHeaders=function(){if(this.__noParseResponseHeader__)return this.__noParseResponseHeader__;var e,t="";for(e in this.__responseHeaders__)t=t+e+" : "+this.__responseHeaders__[e]+"\r\n";return this.__noParseResponseHeader__=t,this.__noParseResponseHeader__},l.prototype.getResponseHeader=function(e){if("string"!=typeof e)return"";var t=null;if(e=e.toLowerCase(),t=this.__cacheReponseHeaders__[e])return t;for(n in this.__responseHeaders__){var n,i=this.__responseHeaders__[n];e===(n=n.toLowerCase())&&(t=t?t+", "+i:i)}return this.__cacheReponseHeaders__[e]=t},l.prototype.setRequestHeader=function(e,t){var n;"string"==typeof e&&"string"==typeof t&&(n=this.__requestHeaders__[e],this.__requestHeaders__[e]=n?n+", "+t:t)},l.prototype.start=function(){o.exec(a,"start",[this.__UUID__,this.__requestHeaders__])},l.prototype.pause=function(){o.exec(a,"pause",[this.__UUID__])},l.prototype.resume=function(){o.exec(a,"resume",[this.__UUID__])},l.prototype.abort=function(){o.exec(a,"abort",[this.__UUID__])},l.prototype.addEventListener=function(e,t,n){var i;"string"==typeof e&&"function"==typeof t&&(i=e.toLowerCase(),void 0===this.eventHandlers[i]?this.eventHandlers[i]=new c(e,t,n):this.eventHandlers[i].handles.push(t))},l.prototype.__handlerEvt__=function(e){var t=this;t.state=u(e.state,t.state),t.uploadedSize=u(e.uploadedSize,t.uploadedSize),t.totalSize=u(e.totalSize,t.totalSize),t.__responseHeaders__=u(e.headers,{}),4==t.state&&"function"==typeof t.onCompleted&&(t.responseText=u(e.responseText,t.responseText),t.onCompleted(t,e.status||null));var n=this.eventHandlers.statechanged;n&&n.fire(t,void 0===e.status?null:e.status)},{__taskList__:{},createUpload:function(e,t,n){if("string"!=typeof e)return null;n=new l(e,t,n);return this.__taskList__[n.__UUID__]=n,o.exec(a,"createUpload",[n]),n},enumerate:function(s,e){var c=this.__taskList__,t=o.callbackId(function(e){for(var t=0;t<e.length;t++){var n,i=e[t];i&&i.uuid&&((n=c[i.uuid])||((n=new l).__UUID__=i.uuid,c[n.__UUID__]=n),n.state=u(i.state,n.state),n.options=u(i.options,n.options),n.url=u(i.url,n.url),n.uploadedSize=u(i.uploadedSize,n.uploadedSize),n.totalSize=u(i.totalSize,n.totalSize),n.responseText=u(i.responseText,n.responseText),n.__responseHeaders__=u(e.headers,n.__responseHeaders__))}var o,r=[];for(o in c)r.push(c[o]);"function"==typeof s&&s(r)});o.exec(a,"enumerate",[t])},clear:function(e){e="number"==typeof e?e:4;o.exec(a,"clear",[e])},startAll:function(){o.exec(a,"startAll",[0])},__handlerEvt__:function(e,t){e=this.__taskList__[e];e&&e.__handlerEvt__(t)}}}),PlusObject.register("io",function(s,c,e,t){var a=c.bridge,u=(c.tools,[]),l={NATIVEF:"File",exec:function(e,t,n,i){t=a.callbackId(e,t);a.exec(l.NATIVEF,n,[t,i])}};function _(e){this.code=e.code||null,this.message=e.message||""}function f(e){var t="未知错误";switch(e){case _.NOT_FOUND_ERR:t="文件没有发现";break;case _.SECURITY_ERR:t="没有获得授权";break;case _.ABORT_ERR:t="取消";break;case _.NOT_READABLE_ERR:t="不允许读";break;case _.ENCODING_ERR:t="编码错误";break;case _.NO_MODIFICATION_ALLOWED_ERR:t="不允许修改";break;case _.INVALID_STATE_ERR:t="无效的状态";break;case _.SYNTAX_ERR:t="语法错误";break;case _.INVALID_MODIFICATION_ERR:t="无效的修改";break;case _.QUOTA_EXCEEDED_ERR:t="执行出错";break;case _.TYPE_MISMATCH_ERR:t="类型不匹配";break;case _.PATH_EXISTS_ERR:t="路径存在"}return{code:e,message:t}}function i(e,t){t=t||{},this.type=e,this.bubbles=!1,this.cancelBubble=!1,this.cancelable=!1,this.lengthComputable=!1,this.loaded=t.loaded||0,this.total=t.total||0,this.target=t.target||null}function d(e,t,n,i,o){this.size=o||0,this.type=n||null,this.name=e||"",this.lastModifiedDate=new Date(i)||null,this.fullPath=t||null}_.NOT_FOUND_ERR=1,_.SECURITY_ERR=2,_.ABORT_ERR=3,_.NOT_READABLE_ERR=4,_.ENCODING_ERR=5,_.NO_MODIFICATION_ALLOWED_ERR=6,_.INVALID_STATE_ERR=7,_.SYNTAX_ERR=8,_.INVALID_MODIFICATION_ERR=9,_.QUOTA_EXCEEDED_ERR=10,_.TYPE_MISMATCH_ERR=11,_.PATH_EXISTS_ERR=12;var n=d.prototype;function r(e){this.modificationTime=void 0!==e?new Date(e):null,this.size=0,this.directoryCount=0,this.fileCount=0}function o(e,t,n,i,o,r){this.isFile=void 0!==e&&e,this.isDirectory=void 0!==t&&t,this.name=n||"",this.fullPath=i||"",this.fileSystem=o||null,this.__PURL__=r||"",this.__remoteURL__=r?"http://localhost:13131/"+r:""}n.slice=function(e,t,n){var i=0<this.size?this.size-1:0,o=0,r=i;if(arguments.length&&(o=e<0?Math.max(i+e,0):Math.min(i,e)),2<=arguments.length&&(r=t<0?Math.max(i+t,0):Math.min(t,i)),r<o)return null;i=new d(this.name,this.fullPath,this.type,this.lastModifiedDate,r-o+1);return i.start=o,i.end=r,i},n.close=function(){};var p=o.prototype;function h(e,t,n,i){p.constructor.apply(this,[!0,!1,e,t,n,i])}function y(e,t,n,i){p.constructor.apply(this,[!1,!0,e,t,n,i])}p.getMetadata=function(n,t,e){var i="function"!=typeof n?null:function(e){var t=new r(e.lastModifiedDate);t.size=e.size,t.directoryCount=e.directoryCount,t.fileCount=e.fileCount,n(t)},o="function"!=typeof t?null:function(e){t(new _(e))};l.exec(i,o,"getMetadata",[this.fullPath,e])},p.setMetadata=function(e,t,n){l.exec(e,t,"setMetadata",[this.fullPath,n])},p.moveTo=function(e,t,n,i){function o(e){"function"==typeof i&&i(new _(e))}var r,s=this;e?(r=this.fullPath,t=t||this.name,l.exec(function(e){if(e){if("function"==typeof n){var t=new(e.isDirectory?y:h)(e.name,e.fullPath,s.fileSystem,e.remoteURL);try{n(t)}catch(e){}}}else o(f(_.NOT_FOUND_ERR))},o,"moveTo",[r,e.fullPath,t])):o(f(_.NOT_FOUND_ERR))},p.copyTo=function(e,t,n,i){function o(e){"function"==typeof i&&i(new _(e))}var r,s=this;e?(r=this.fullPath,t=t||this.name,l.exec(function(e){if(e){if("function"==typeof n){var t=e.isDirectory?new y(e.name,e.fullPath,e.fileSystem,s.remoteURL):new h(e.name,e.fullPath,s.fileSystem,e.remoteURL);try{n(t)}catch(e){}}}else o(f(_.NOT_FOUND_ERR))},o,"copyTo",[r,e.fullPath,t])):o(f(_.NOT_FOUND_ERR))},p.remove=function(e,t){var n="function"!=typeof t?null:function(e){t(new _(e))};l.exec(e,n,"remove",[this.fullPath])},p.toURL=function(){return this.__PURL__},p.toLocalURL=function(){return"file://"+this.fullPath},p.toRemoteURL=function(){return this.__remoteURL__},p.getParent=function(t,n){var i=this,e="function"!=typeof t?null:function(e){e=new y(e.name,e.fullPath,i.fileSystem,e.remoteURL);t(e)},o="function"!=typeof n?null:function(e){n(new _(e))};l.exec(e,o,"getParent",[this.fullPath])},((h.prototype=new o).constructor=h).prototype.createWriter=function(t,n){this.file(function(e){e=new b(e);null===e.fileName||""===e.fileName?"function"==typeof n&&n(new _(f(_.INVALID_STATE_ERR))):"function"==typeof t&&t(e)},n)},h.prototype.file=function(t,n){var e="function"!=typeof t?null:function(e){e=new d(e.name,e.fullPath,e.type,e.lastModifiedDate,e.size);t(e)},i="function"!=typeof n?null:function(e){n(new _(e))};l.exec(e,i,"getFileMetadata",[this.fullPath])};n=new o;function v(e,t){this.path=e||null,this.__fileSystem__=t||null}function g(){this.fileName="",this.readyState=0,this.result=null,this.error=null,this.onloadstart=null,this.onprogress=null,this.onload=null,this.onabort=null,this.onerror=null,this.onloadend=null}(y.prototype=n).constructor=y,n.createReader=function(){return new v(this.fullPath,this.fileSystem)},n.getDirectory=function(e,t,n,i){var o=this,r="function"!=typeof n?null:function(e){e=new y(e.name,e.fullPath,o.fileSystem,e.remoteURL);n(e)},s="function"!=typeof i?null:function(e){i(new _(e))};l.exec(r,s,"getDirectory",[this.fullPath,e,t])},n.removeRecursively=function(e,t){var n="function"!=typeof t?null:function(e){t(new _(e))};l.exec(e,n,"removeRecursively",[this.fullPath])},n.getFile=function(e,t,n,i){var o=this,r="function"!=typeof n?null:function(e){e=new h(e.name,e.fullPath,o.fileSystem,e.remoteURL);n(e)},s="function"!=typeof i?null:function(e){i(new _(e))};l.exec(r,s,"getFile",[this.fullPath,e,t])},v.prototype.readEntries=function(o,t){var r=this,e="function"!=typeof o?null:function(e){for(var t=[],n=0;n<e.length;n++){var i=null;e[n].isDirectory?i=new y(e[n].name,e[n].fullPath,r.__fileSystem__,e[n].remoteURL):e[n].isFile&&(i=new h(e[n].name,e[n].fullPath,r.__fileSystem__,e[n].remoteURL)),t.push(i)}o(t)},n="function"!=typeof t?null:function(e){t(new _(e))};l.exec(e,n,"readEntries",[this.path])},g.EMPTY=0,g.LOADING=1,g.DONE=2;n=g.prototype;function b(e){this.fileName="",this.readyState=0,this.result=null,this.length=0,e&&(this.fileName=e.fullPath||e,this.length=e.size||0),this.position=0,this.error=null,this.onwritestart=null,this.onprogress=null,this.onwrite=null,this.onabort=null,this.onsuccess=null,this.onerror=null,this.onwriteend=null}n.abort=function(){this.result=null,this.readyState!=g.DONE&&this.readyState!=g.EMPTY&&(this.readyState=g.DONE,"function"==typeof this.onabort&&this.onabort(new i("abort",{target:this})),"function"==typeof this.onloadend&&this.onloadend(new i("loadend",{target:this})))},n.readAsText=function(e,t){if(this.fileName="",void 0===e.fullPath?this.fileName=e:this.fileName=e.fullPath,this.readyState==g.LOADING)throw new _(_.INVALID_STATE_ERR);this.readyState=g.LOADING,"function"==typeof this.onloadstart&&this.onloadstart(new i("loadstart",{target:this}));var t=t||"UTF-8",n=this;l.exec(function(e){n.readyState!==g.DONE&&(n.result=e,"function"==typeof n.onload&&n.onload(new i("load",{target:n})),n.readyState=g.DONE,"function"==typeof n.onloadend&&n.onloadend(new i("loadend",{target:n})))},function(e){n.readyState!==g.DONE&&(n.readyState=g.DONE,n.result=null,n.error=new _(e),"function"==typeof n.onerror&&n.onerror(new i("error",{target:n})),"function"==typeof n.onloadend&&n.onloadend(new i("loadend",{target:n})))},"readAsText",[this.fileName,t,e.start,e.end])},n.readAsDataURL=function(e){if(this.fileName="",void 0===e.fullPath?this.fileName=e:this.fileName=e.fullPath,this.readyState==g.LOADING)throw new _(_.INVALID_STATE_ERR);this.readyState=g.LOADING,"function"==typeof this.onloadstart&&this.onloadstart(new i("loadstart",{target:this}));var t=this;l.exec(function(e){t.readyState!==g.DONE&&(t.readyState=g.DONE,t.result=e,"function"==typeof t.onload&&t.onload(new i("load",{target:t})),"function"==typeof t.onloadend&&t.onloadend(new i("loadend",{target:t})))},function(e){t.readyState!==g.DONE&&(t.readyState=g.DONE,t.result=null,t.error=new _(e),"function"==typeof t.onerror&&t.onerror(new i("error",{target:t})),"function"==typeof t.onloadend&&t.onloadend(new i("loadend",{target:t})))},"readAsDataURL",[this.fileName,e.start,e.end])},n.readAsBase64=function(e){if(this.fileName="",void 0===e.fullPath?this.fileName=e:this.fileName=e.fullPath,this.readyState==g.LOADING)throw new _(_.INVALID_STATE_ERR);this.readyState=g.LOADING,"function"==typeof this.onloadstart&&this.onloadstart(new i("loadstart",{target:this}));var t=this;l.exec(function(e){t.readyState!==g.DONE&&(t.readyState=g.DONE,t.result=e,"function"==typeof t.onload&&t.onload(new i("load",{target:t})),"function"==typeof t.onloadend&&t.onloadend(new i("loadend",{target:t})))},function(e){t.readyState!==g.DONE&&(t.readyState=g.DONE,t.result=null,t.error=new _(e),"function"==typeof t.onerror&&t.onerror(new i("error",{target:t})),"function"==typeof t.onloadend&&t.onloadend(new i("loadend",{target:t})))},"readAsBase64",[this.fileName,e.start,e.end])},n.readAsArrayBuffer=function(e){},b.INIT=0,b.WRITING=1,b.DONE=2;n=b.prototype;function I(e,t){this.name=e||null,this.root=null,t&&(this.root=new y(t.name,t.fullPath,this,t.remoteURL))}function m(t,e,n){var i="function"!=typeof t.complete?function(){}:t.complete,o="function"!=typeof t.success?i:function(e){t.success(e),i(e)},r="function"!=typeof t.fail?i:function(e){t.fail(e),i(e)};callbackID=a.callbackId(o,r),a.exec(l.NATIVEF,e,[callbackID,n()])}return n.abort=function(){if(this.readyState===b.DONE||this.readyState===b.INIT)throw new _(f(_.INVALID_STATE_ERR));this.error=new _(f(_.ABORT_ERR)),this.readyState=b.DONE,"function"==typeof this.onabort&&this.onabort(new i("abort",{target:this})),"function"==typeof this.onwriteend&&this.onwriteend(new i("writeend",{target:this}))},n.write=function(e){var t=this;if("string"!=typeof e)throw new _(_.TYPE_MISMATCH_ERR);if(this.readyState===b.WRITING)throw new _(_.INVALID_STATE_ERR);this.readyState=b.WRITING,"function"==typeof t.onwritestart&&t.onwritestart(new i("writestart",{target:t})),l.exec(function(e){t.readyState!==b.DONE&&(t.position+=e,t.length+=e,t.readyState=b.DONE,"function"==typeof t.onwrite&&t.onwrite(new i("write",{target:t})),"function"==typeof t.onsuccess&&t.onsuccess(new i("success",{target:t})),"function"==typeof t.onwriteend&&t.onwriteend(new i("writeend",{target:t})))},function(e){t.readyState!==b.DONE&&(t.readyState=b.DONE,t.error=new _(e),"function"==typeof t.onerror&&t.onerror(new i("error",{target:t})),"function"==typeof t.onwriteend&&t.onwriteend(new i("writeend",{target:t})))},"write",[this.fileName,e,this.position])},n.writeAsBinary=function(e){var t=this;if("string"!=typeof e)throw new _(_.TYPE_MISMATCH_ERR);if(this.readyState===b.WRITING)throw new _(_.INVALID_STATE_ERR);this.readyState=b.WRITING,"function"==typeof t.onwritestart&&t.onwritestart(new i("writestart",{target:t})),l.exec(function(e){t.readyState!==b.DONE&&(t.position+=e,t.length+=e,t.readyState=b.DONE,"function"==typeof t.onwrite&&t.onwrite(new i("write",{target:t})),"function"==typeof t.onsuccess&&t.onsuccess(new i("success",{target:t})),"function"==typeof t.onwriteend&&t.onwriteend(new i("writeend",{target:t})))},function(e){t.readyState!==b.DONE&&(t.readyState=b.DONE,t.error=new _(e),"function"==typeof t.onerror&&t.onerror(new i("error",{target:t})),"function"==typeof t.onwriteend&&t.onwriteend(new i("writeend",{target:t})))},"writeAsBinary",[this.fileName,e,this.position])},n.seek=function(e){if(this.readyState===b.WRITING)throw new _(_.INVALID_STATE_ERR);!e&&0!==e||(e<0?this.position=Math.max(e+this.length,0):e>this.length?this.position=this.length:this.position=e)},n.truncate=function(e){if(this.readyState===b.WRITING)throw new _(_.INVALID_STATE_ERR);this.readyState=b.WRITING;var t=this;"function"==typeof t.onwritestart&&t.onwritestart(new i("writestart",{target:this})),l.exec(function(e){t.readyState!==b.DONE&&(t.readyState=b.DONE,t.length=e,t.position=Math.min(t.position,e),"function"==typeof t.onwrite&&t.onwrite(new i("write",{target:t})),"function"==typeof t.onwriteend&&t.onwriteend(new i("writeend",{target:t})))},function(e){t.readyState!==b.DONE&&(t.readyState=b.DONE,t.error=new _(e),"function"==typeof t.onerror&&t.onerror(new i("error",{target:t})),"function"==typeof t.onwriteend&&t.onwriteend(new i("writeend",{target:t})))},"truncate",[this.fileName,e,this.position])},{FileSystem:I,DirectoryEntry:y,DirectoryReader:v,FileReader:g,FileWriter:b,requestFileSystem:function(t,n,i){function o(e){"function"==typeof i&&i(new _(e))}var r,e;t<1||4<t?o(f(_.SYNTAX_ERR)):(e=function(e){e?"function"==typeof n&&(r||(r=new I(e.name,e.root),u[t]=r),n(r)):o(f(_.NOT_FOUND_ERR))},(r=u[t])?(s.setTimeout?s:c).setTimeout(e(r),0):l.exec(e,o,"requestFileSystem",[t]))},resolveLocalFileSystemURL:function(e,n,t){function i(e){t&&t(new _(e))}"string"==typeof e?l.exec(function(e){var t;e?n&&((t=u[e.type])||(t=new I(e.fsName,e.fsRoot),u[e.type]=t),e=new(e.isDirectory?y:h)(e.name,e.fullPath,t,e.remoteURL),n(e)):i(f(_.NOT_FOUND_ERR))},i,"resolveLocalFileSystemURL",[e]):setTimeout(function(){i(f(_.ENCODING_ERR))},0)},convertLocalFileSystemURL:function(e){return a.execSync(l.NATIVEF,"convertLocalFileSystemURL",[e])},convertAbsoluteFileSystem:function(e){return a.execSync(l.NATIVEF,"convertAbsoluteFileSystem",[e])},getImageInfo:function(t){var n="function"!=typeof t.complete?function(){}:t.complete,e="function"!=typeof t.success?n:function(e){t.success(e),n(e)},i="function"!=typeof t.fail?n:function(e){t.fail(e),n(e)},o="string"!=typeof t.savePath?"":t.savePath;callbackID=a.callbackId(e,i),a.exec(l.NATIVEF,"getImageInfo",[callbackID,t.src,o])},getFileInfo:function(e){m(e,"getFileInfo",function(){return{filePath:e.filePath,digestAlgorithm:e.digestAlgorithm}})},getAudioInfo:function(e){m(e,"getAudioInfo",function(){return{filePath:e.filePath}})},getVideoInfo:function(e){m(e,"getVideoInfo",function(){return{filePath:e.filePath}})},chooseFile:function(e,t,n){var i="function"!=typeof t?null:function(e){t(e)},o="function"!=typeof n?null:function(e){n(e)};callbackID=a.callbackId(i,o),a.exec(l.NATIVEF,"chooseFile",[callbackID,e])},PRIVATE_WWW:1,PRIVATE_DOC:2,PUBLIC_DOCUMENTS:3,PUBLIC_DOWNLOADS:4}}),PlusObject.register("gallery",function(e,t,n,i){var r=t.bridge,s="Gallery",c=0,a=1;function u(e,t){this.code=e||null,this.message=t||""}u.BUSY=1;var l={__galleryStatus:c,onPickImageFinished:null,pick:function(n,t,e){var i,o;a!=l.__galleryStatus?(l.__galleryStatus=a,i=r.callbackId(function(e){var t;l.__galleryStatus=c,"function"==typeof n&&(e&&e.multiple?((t={}).files=e.files,n(t)):n(e.files[0]))},function(e){l.__galleryStatus=c,"function"==typeof t&&t(e)}),o=r.callbackId(function(){"function"==typeof e.onmaxed&&e.onmaxed()}),r.exec(s,"pick",[i,e,o],{cbid:i})):setTimeout(function(){"function"==typeof t&&t(new u(u.BUSY,"已经打开了相册"))},0)},save:function(e,t,n){if("string"!=typeof e)return!1;var i=r.callbackId(function(e){"function"==typeof t&&t(e)},function(e){"function"==typeof n&&n(e)});return r.exec(s,"save",[e,i],{cbid:i}),!0}};return l}),PlusObject.register("barcode",function(a,o,e,t){var u="barcode",l=(o=o).tools,_=o.bridge,r={};function n(e,t,n,i,o,r){var s=this;s.IDENTITY=u,s.onmarked=null,s.onerror=null,s.isClose=!1,s.__uuid__=l.UUID("bc");var c=s.callbackId=null;o=o||s.__uuid__,this.callbackId=_.callbackId(function(e){"function"==typeof s.onmarked&&s.onmarked(e.type,e.message,e.file)},function(e){"function"==typeof s.onerror&&s.onerror(e)}),a.document&&(div=document.getElementById(e),null!=div&&null!=div&&(div.addEventListener("resize",function(){var e=[div.offsetLeft,div.offsetTop,div.offsetWidth,div.offsetHeight];_.exec(u,"resize",[e])},!1),c=[div.offsetLeft,div.offsetTop,div.offsetWidth,div.offsetHeight])),null!=r&&null!=r&&!r||_.exec(u,"Barcode",[this.__uuid__,this.callbackId,o,c,t,n,i])}var i=n.prototype;i.setStyle=function(e){this.isClose||_.exec(u,"setStyle",[this.__uuid__,e])},i.start=function(e){this.isClose||_.exec(u,"start",[this.__uuid__,e])},i.setFlash=function(e){this.isClose||_.exec(u,"setFlash",[this.__uuid__,e])},i.cancel=function(){this.isClose||_.exec(u,"cancel",[this.__uuid__])},i.close=function(){this.isClose||(_.exec(u,"close",[this.__uuid__]),this.isClose=!0)};i={Barcode:n,create:function(e,t,n,i){return e=new o.barcode.Barcode(null,t,n,i,e,!0),r[e.__uuid__]=e,r[e.__uuid__]},getBarcodeById:function(e){if(e&&"string"==typeof e){var t=_.execSync(u,"getBarcodeById",[e]);if(null!=t&&null!=t.uuid){if(r[t.uuid])return r[t.uuid];if(null==t||null==t)return null;e=new o.barcode.Barcode(null,t.filters,t.options,t.autoDecodeCharset,e,!1);return e.__uuid__=t.uuid,_.exec(u,"addCallBack",[e.__uuid__,e.callbackId]),r[e.__uuid__]=e}}},scan:function(e,t,n,i,o){var r="function"!=typeof t?null:function(e){t(e.type,e.message,e.file,e.charSet)},s="function"!=typeof n?null:function(e){n(e)},s=_.callbackId(r,s);_.exec(u,"scan",[s,e,i,o])},QR:0,EAN13:1,EAN8:2,AZTEC:3,DATAMATRIX:4,UPCA:5,UPCE:6,CODABAR:7,CODE39:8,CODE93:9,CODE128:10,ITF:11,MAXICODE:12,PDF417:13,RSS14:14,RSSEXPANDED:15};return i}),PlusObject.register("audio",function(e,t,n,i){var o=t.bridge,r=t.tools,s="Audio",c="RecorderExecMethod",a="AudioExecMethod",u="AudioSyncExecMethod";t.audio={getRecorder:function(){var e={_Audio_UUID__:r.UUID("Record"),supportedFormats:["amr","3gp","aac"],supportedSamplerates:[44100,16e3,8e3],record:function(e,t,n){n=o.callbackId(t,n);o.exec(s,c,["record",[this._Audio_UUID__,n,e]])},stop:function(){o.exec(s,c,["stop",[this._Audio_UUID__]])},pause:function(){o.exec(s,c,["pause",[this._Audio_UUID__]])},resume:function(){o.exec(s,c,["resume",[this._Audio_UUID__]])}};return r.IOS==r.platform&&(e.supportedFormats=["wav","aac","amr","mp3"]),e},createPlayer:function(e){var t={_Player_Param:e,_Audio_Player_UUID_:r.UUID("Player"),play:function(e,t){t=o.callbackId(e,t);o.exec(s,a,["play",[this._Audio_Player_UUID_,t]])},pause:function(){o.exec(s,a,["pause",[this._Audio_Player_UUID_]])},resume:function(){o.exec(s,a,["resume",[this._Audio_Player_UUID_]])},stop:function(){o.exec(s,a,["stop",[this._Audio_Player_UUID_]])},seekTo:function(e){o.exec(s,a,["seekTo",[this._Audio_Player_UUID_,e]])},getDuration:function(){return o.execSync2(s,u,["getDuration",[this._Audio_Player_UUID_]])},getPosition:function(){return o.execSync2(s,u,["getPosition",[this._Audio_Player_UUID_]])},setRoute:function(e){o.exec(s,a,["setRoute",[this._Audio_Player_UUID_,e]])},setSessionCategory:function(e){o.exec(s,a,["setSessionCategory",[this._Audio_Player_UUID_,e]])},isPaused:function(){return o.execSync2(s,u,["getPaused",[this._Audio_Player_UUID_]])},getBuffered:function(){return o.execSync2(s,u,["getBuffered",[this._Audio_Player_UUID_]])},getStyles:function(e){return o.execSync2(s,u,["getStyles",[this._Audio_Player_UUID_,e]])},setStyles:function(e){o.exec(s,a,["setStyles",[this._Audio_Player_UUID_,e]])},addEventListener:function(e,t){t=o.callbackId(t);o.exec(s,a,["addEventListener",[this._Audio_Player_UUID_,e,t]])},removeEventListener:function(e){o.exec(s,a,["removeEventListener",[this._Audio_Player_UUID_,e]])},close:function(){o.exec(s,a,["close",[this._Audio_Player_UUID_]])}},e={};return"string"==typeof t._Player_Param?e.src=t._Player_Param:e=t._Player_Param,o.execSync(s,u,["CreatePlayer",[t._Audio_Player_UUID_,e]]),t},ROUTE_SPEAKER:0,ROUTE_EARPIECE:1}}),PlusObject.register("push",function(e,o,t,n){var r=o.bridge,s=o.tools,c="Push";o.push={__isUniPush__:n&&n.__isUniPush__,getClientInfo:function(){var e=this.__isUniPush__?_().getClientInfo():r.execSync2(c,"getClientInfo",[]);return e},getClientInfoAsync:function(t,n){var e;this.__isUniPush__?_().getClientInfoAsync(function(e){0==e.ret?"function"==typeof t&&t(e.payload):"function"==typeof n&&n(e.payload)}):(e=r.callbackId(function(e){"function"==typeof t&&t(e)},function(e){"function"==typeof n&&n(e)}),r.exec(c,"getClientInfoAsync",[e]))},createMessage:function(e,t,n){s.platform==s.IOS?this.__isUniPush__?_().createMessage({content:e,payload:t,options:n}):r.exec(c,"createMessage",[e,t,n]):(n&&n.icon&&(n.icon=o.io.convertLocalFileSystemURL(n.icon)),e=new l(e,t,n),n=this.__isUniPush__?_().createMessage(e):r.execSync(c,"createMessage",[e]),e.__UUID__=n)},clear:function(){this.__isUniPush__?_().clear():r.exec(c,"clear",[])},addEventListener:function(e,t,n){var i;this.__isUniPush__?_().addPushEvent(o.__HtMl_Id__,e,t):(i=s.UUID(e),u.pushCallback_Push(i,t,n),r.exec(c,"addEventListener",[o.__HtMl_Id__,i,e]))},remove:function(e){this.__isUniPush__&&s.platform==s.ANDROID?_().remove(e.__UUID__):r.exec(c,"remove",[e.__UUID__])},getAllMessage:function(){return this.__isUniPush__&&s.platform==s.ANDROID?_().getAllMessage():r.execSync(c,"getAllMessage",[])},setAutoNotification:function(e){this.__isUniPush__&&s.platform==s.ANDROID?_().setAutoNotification(e):r.exec(c,"setAutoNotification",[e])}};var i,a,u=(i=[],{pushCallback_Push:function(e,t,n){i[e]={fun:t,nokeep:n}},execCallback_Push:function(e,t,n){i[e]&&i[e].fun&&i[e].fun(n)}});function l(e,t,n){this.__UUID__=null,this.message=e,this.Payload=t,this.options=n}function _(){return a||((a=o.weex.requireModule("UniPush")).initialize(),s.platform==s.ANDROID&&o.webview.currentWebview().addEventListener("close",function(){a.removePushEvent(o.__HtMl_Id__)})),a}o.push.__Mkey__Push__=u}),PlusObject.register("key",function(n,o){var r=(o=o).bridge,s="UI",i=o.tools,c="execMethod";return keyEvent={backbutton:"back",menubutton:"menu",searchbutton:"search",volumeupbutton:"volumeup",volumedownbutton:"volumedown",keyup:"keyup",keydown:"keydown",longpressed:"longpressed"},o.key={addEventListener:function(e,n,t){var i;e&&n&&"string"==typeof e&&"function"==typeof n&&(i=o.webview.__currentWebview(),o.obj.Callback.prototype.addEventListener.apply(i,[keyEvent[e],function(e){var t={};t.keycode=e.keyType,t.keyCode=e.keyCode,t.keyType=e.keyType,n(t)},t])&&(e=[keyEvent[e],o.__HtMl_Id__],r.exec(s,c,[i.__IDENTITY__,"addEventListener",[i.__uuid__,e]])))},removeEventListener:function(e,t){var n;e&&t&&"string"==typeof e&&"function"==typeof t&&(n=o.webview.__currentWebview(),o.obj.Callback.prototype.removeEventListener.apply(n,[keyEvent[e],t])&&(e=[keyEvent[e],o.__HtMl_Id__],n=o.webview.__currentWebview(),r.exec(s,c,[n.__IDENTITY__,"removeEventListener",[n.__uuid__,e]])))},setAssistantType:function(e){var t;i.platform==i.IOS?n.__keyboardAssist.setInputType(e):(t=[e,o.__HtMl_Id__],e=o.webview.currentWebview(),r.exec(s,c,[e.__IDENTITY__,"setAssistantType",[e.__uuid__,t]]))},hideSoftKeybord:function(){var e,t;i.platform==i.IOS?r.exec("Runtime","hideSoftKeybord"):(e=[o.__HtMl_Id__],t=o.webview.__currentWebview(),r.exec(s,c,[t.__IDENTITY__,"hideSoftKeybord",[t.__uuid__,e]]))},showSoftKeybord:function(){var e=[o.__HtMl_Id__],t=o.webview.__currentWebview();r.exec(s,c,[t.__IDENTITY__,"showSoftKeybord",[t.__uuid__,e]])}}}),PlusObject.register("oauth",function(e,n,t,i){var s="OAuth",c=n.bridge;function o(){this.id="",this.description="",this.nativeClient=!1,this.authResult=null,this.userInfo=null,this.appleInfo=null,this.univerifyInfo=null}function a(e){if(Array.isArray(e))for(var t=0;t<e.length;t++)(function(e){var t;e.onclick&&"function"==typeof e.onclick&&(t=c.callbackId(function(){e.onclick(e)}),e.__cb__={id:t,htmlId:n.__HtMl_Id__})})(e[t])}o.prototype.closeAuthView=function(){"univerify"==this.id&&c.exec(s,"closeAuthView",[this.id],{sid:this.id})},o.prototype.preLogin=function(t,n){var e="function"!=typeof t?null:function(e){t({})},i="function"!=typeof n?null:function(e){n(e)};"univerify"==this.id?(i=c.callbackId(e,i),c.exec(s,"preLogin",[this.id,i],{cbid:i,sid:this.id})):n({code:10012,message:"univerify only"})},o.prototype.login=function(n,t,e){e&&"object"==typeof e&&(!(o=e.univerifyStyle)||"object"!=typeof o||(r=o.buttons)&&"object"==typeof r&&a(r.list));var i=this,o="function"!=typeof n?null:function(e){var t={};(t.target=i).univerifyInfo=e.univerifyInfo,i.authResult=e.authResult,i.userInfo=e.userInfo,i.appleInfo=e.appleInfo,i.extra=e.extra,n(t)},r="function"!=typeof t?null:function(e){t(e)},r=c.callbackId(o,r);c.exec(s,"login",[this.id,r,e],{cbid:r,sid:this.id})},o.prototype.authorize=function(n,t,e){var i=this,o="function"!=typeof n?null:function(e){var t={};(t=e).target=i,n(t)},r="function"!=typeof t?null:function(e){t(e)};"weixin"==i.id?(r=c.callbackId(o,r),c.exec(s,"authorize",[this.id,r,e],{cbid:r,sid:this.id})):t({code:10012,message:"WeChat only"})},o.prototype.logout=function(n,t){var i=this,e="function"!=typeof n?null:function(e){var t={};i.authResult=null,i.userInfo=null,i.appleInfo=null,i.extra=e.extra,t.target=i,n(t)},o="function"!=typeof t?null:function(e){t(e)};this.authResult=null,this.userInfo=null,this.appleInfo=null;o=c.callbackId(e,o);c.exec(s,"logout",[this.id,o],{cbid:o,sid:this.id})},o.prototype.getUserInfo=function(n,t){var i=this,e="function"!=typeof n?null:function(e){var t={};i.authResult=e.authResult,i.userInfo=e.userInfo,i.appleInfo=e.appleInfo,i.extra=e.extra,t.target=i,n(t)},o="function"!=typeof t?null:function(e){t(e)},o=c.callbackId(e,o);c.exec(s,"getUserInfo",[this.id,o],{cbid:o,sid:this.id})},o.prototype.addPhoneNumber=function(n,t){var i=this,e="function"!=typeof n?null:function(e){var t={};i.authResult=e.authResult,i.userInfo=e.userInfo,i.appleInfo=e.appleInfo,i.extra=e.extra,t.target=i,n(t)},o="function"!=typeof t?null:function(e){t(e)},o=c.callbackId(e,o);c.exec(s,"addPhoneNumber",[this.id,o],{cbid:o,sid:this.id})};var u={AuthService:o,getServices:function(r,t){var e="function"!=typeof r?null:function(e){for(var t=[],n=e.length,i=0;i<n;i++){var o=new u.AuthService;o.id=e[i].id,o.description=e[i].description,o.authResult=e[i].authResult,o.userInfo=e[i].userInfo,o.appleInfo=e[i].appleInfo,o.univerifyInfo=e[i].univerifyInfo,o.nativeClient=e[i].nativeClient,t[i]=o}r(t)},n="function"!=typeof t?null:function(e){t(e)},n=c.callbackId(e,n);c.exec(s,"getServices",[n])}};n.oauth=u}),PlusObject.register("share",function(i,r,e,t){var s=r.bridge,c=r.tools,a="Share",u={};function l(e,t,n,i){this.id=e,this.description=t,this.authenticated=n,this.accessToken=i,this.nativeClient=!1}var n=l.prototype;function o(e,t){var o=this;o.__UUID__=c.UUID("Authorize"),o.__componentid__=e,o.display=t,o.onloaded=null,o.onauthenticated=null,o.onerror=null,o.__top__=0,o.__left__=0,o.__width__=0;o.__height__=0;t=i.document&&i.document.getElementById(o.__componentid__);t&&(o.__left__=t.offsetLeft,o.__top__=t.offsetTop,o.__width__=t.offsetWidth,o.__height__=t.offsetHeight);function n(e){"function"==typeof o.onerror&&o.onerror(e)}t=s.callbackId(function(i){"load"==i.evt?"function"==typeof o.onloaded&&o.onloaded():"auth"==i.evt&&"function"==typeof o.onauthenticated&&r.share.getServices(function(e){for(var t=0;t<e.length;t++){var n=e[t];if(n.id==i.type){n.authenticated=i.authenticated,n.accessToken=i.accessToken,o.onauthenticated(n);break}}},function(e){n(e)})},n);s.exec(a,"create",[o.__UUID__,t,o.display,o.__left__,o.__top__,o.__width__,o.__height__])}n.authorize=function(t,n,e){var i=this,o="function"!=typeof t?null:function(e){i.authenticated=e.authenticated,i.accessToken=e.accessToken,t(i)},r="function"!=typeof n?null:function(e){n(e)},r=s.callbackId(o,r);s.exec(a,"authorize",[r,this.id,e])},n.forbid=function(){this.authenticated=!1,this.accessToken=null,s.exec(a,"forbid",[this.id])},n.send=function(e,t,n){var i="function"!=typeof t?null:function(e){t()},o="function"!=typeof n?null:function(e){n(e)},o=s.callbackId(i,o);s.exec(a,"send",[o,this.id,e])},n.launchMiniProgram=function(e,t,n){var i="function"!=typeof t?null:function(e){t(e)},o="function"!=typeof n?null:function(e){n(e)},o=s.callbackId(i,o);s.exec(a,"launchMiniProgram",[o,this.id,e])},o.prototype.load=function(e){this.id=e,s.exec(a,"load",[this.__UUID__,e])},o.prototype.setVisible=function(e){s.exec(a,"setVisible",[this.__UUID__,e])};n={Authorize:o,getServices:function(r,t){var e="function"!=typeof r?null:function(e){for(var t=[],n=0;n<e.length;n++){var i,o=e[n];o.id&&((i=(i=u[o.id])||new l).id=o.id,i.description=o.description,i.authenticated=o.authenticated,i.accessToken=o.accessToken,i.nativeClient=o.nativeClient,u[o.id]=i,t.push(i))}r(t)},n="function"!=typeof t?null:function(e){t(e)},n=s.callbackId(e,n);s.exec(a,"getServices",[n])},sendWithSystem:function(e,t,n){var i="function"!=typeof t?null:function(e){t()},o="function"!=typeof n?null:function(e){n(e)},o=s.callbackId(i,o);s.exec(a,"sendWithSystem",[o,e])}};r.share=n}),PlusObject.register("speech",function(e,o,t,n){var s="Speech",c=o.bridge,i={startRecognize:function(e,t,n){var i,o="function"!=typeof t?null:function(e){t(e)},r="function"!=typeof n?null:function(e){n(e)},o=c.callbackId(o,r),r={};e.onstart&&(i="function"!=typeof e.onstart?null:function(){e.onstart()},r.onstart=c.callbackId(i)),e.onend&&(i="function"!=typeof e.onend?null:function(){e.onend()},r.onend=c.callbackId(i)),c.exec(s,"startRecognize",[o,e,r])},stopRecognize:function(){c.exec(s,"stopRecognize",[])},addEventListener:function(e,t,n){var i;t&&(i=function(e){"function"==typeof t&&t(e)},t.listener=i,i=c.callbackId(i)),c.exec(s,"addEventListener",[e,i,o.__HtMl_Id__])}};o.speech=i}),PlusObject.register("ios",function(plusContext,plus){var bridge=plus.bridge,tools=plus.tools,_Server="Invocation",_importHash=[],_frameObjHash={},_currentFrameObj=null,iosTools={},classTemplate={};iosTools.undefObjectHash={};var jsbDef="";function JNBType(e,t){this.type=e,this.value=t}function JSBBaseObject(){this.__TYPE__="JSBObject",this.__UUID__=tools.UUID("JSBaseObject")}function JSImplements(e,t){e=__compatibilityNamespace(e);var o=this;this.__UUID__=tools.UUID("JSImplements"),this.callback=t,this.callbackId=bridge.callbackId(function(e){for(var t=e.arguments,n=[],i=0;i<t.length;i++)n.push(plus.ios.__Tool.New(t[i],!0));o.callback[e.method].apply(o,n)},null);var n,i=[];for(n in t)i.push(n);e=bridge.execSync2(_Server,"implements",[this.__UUID__,e,i,this.callbackId],null,!0);return plus.ios.__Tool.New(e,!0)}function JSBridge(){this.__Tool=iosTools,this.__JSBBaseObject=JSBBaseObject}plus.tools.IOS==plus.tools.platform?jsbDef+="plus.ios.":plus.tools.ANDROID==plus.tools.platform&&(jsbDef+="plus.android."),iosTools.process=function(e){for(var t=[],n=0;n<e.length;n++)t.push(this.warp(e[n]));return t},iosTools.attach=function(e,t){var n=this.undefObjectHash[e];if(n&&t){for(var i=0;i<n.length;i++)n[i].__proto__=t.prototype;delete this.undefObjectHash.className}},iosTools.New=function(e,t){var n=null;if(e){if("object"==e.type){var i,o=classTemplate.isImport(e.className);if(o)n=new o(t);else{if(e.superClassNames)for(var r=0;r<e.superClassNames.length&&!(o=classTemplate.isImport(e.superClassNames[r]));r++);o?n=new o(t):(n=new JSBBaseObject,(i=this.undefObjectHash[e.className])||(this.undefObjectHash[e.className]=i=[]),i.push(n))}return n.className=e.className,n.__UUID__=e.value,n}if("struct"==e.type)return new JNBType(e.type,e.value);if(Array.isArray(e.value))for(r=0;r<e.value.length;r++)e.value[r]=iosTools.New(e.value[r],t);return e.value}return null},iosTools.handleClassName=function(e){return e.replace("$",".")},iosTools.saveContent=function(e,t){bridge.execSync2(_Server,"__saveContent",[e,t],null,!0)},iosTools.warp=function(i){var e,t={};return i&&"JSBObject"==i.__TYPE__?(t.type="object",t.value=i.__UUID__):i instanceof JNBType?(t.type=i.type,t.value=i.value,0==i.type.indexOf("@block")&&(t.type=i.type,e=bridge.callbackId(function(e){i.value;for(var t=[],n=0;n<e.length;n++)t.push(plus.ios.__Tool.New(e[n],!0));i.value.apply(this,t)}),t.value=e,alert(t.value))):void 0===i||null==i?(t.type="null",t.value=i):"string"==typeof i||"String"==typeof i?(t.type="string",t.value=i):"number"==typeof i?(t.type="number",t.value=i):"boolean"==typeof i?(t.type="boolean",t.value=i):"function"==typeof i?(t.type="block",e=bridge.callbackId(function(e){for(var t=[],n=0;n<e.length;n++)t.push(plus.ios.__Tool.New(e[n],!0));i.apply(this,t)}),t.value=e):plus.tools.IOS==plus.tools.platform&&"object"==typeof i?(t.type="jsonObject",t.value=i):t=i,t},JNBType.prototype.constructor=JNBType,JSBBaseObject.prototype.plusSetAttribute=function(){var e=null;try{for(var t=[],n=1;n<arguments.length;n++)t.push(iosTools.warp(arguments[n]));e=plus.bridge.execSync2(_Server,"__plusSetAttribute",[this.__UUID__,arguments[0],t],null,!0),e=iosTools.New(e,!0)}catch(e){throw e}return e},JSBBaseObject.prototype.plusGetAttribute=function(e){var t=null;try{t=plus.bridge.execSync2(_Server,"__plusGetAttribute",[this.__UUID__,e],null,!0),t=plus.ios.__Tool.New(t,!0)}catch(e){throw e}return t},JSBBaseObject.prototype.importClass=function(){return plus.android.importClass(this)},JSBBaseObject.prototype.plusCallMethod=function(e){var t=null;try{var n,i="",o=[],r=0;for(n in e){if("string"!=typeof n)return;var s=e[n];if(0==r){if(i=n,void 0===s){r++;break}i+=":"}else i+=n+":";o.push(s),r++}if(0==r)return;o=plus.ios.__Tool.process(o),t=plus.bridge.execSync2(_Server,"__exec",[this.__UUID__,i,o],null,!0);t=plus.ios.__Tool.New(t,!0)}catch(e){throw e}return t},JSImplements.prototype=new JSBBaseObject,JSImplements.prototype.constructor=JSImplements,classTemplate.hashTable={},classTemplate.importClass=function(e,t){var n=this.isImport(e);if(n)return n;for(var i=this.newClassDefine(e,t),t=bridge.execSync2(_Server,"import",[e],null,!0),o=t.ClassMethod,r=0;r<o.length;r++)i+=this.AddMethodToClass(e,o[r],!0);for(var s=t.InstanceMethod,r=0;r<s.length;r++)i+=this.AddMethodToClass(e,s[r]);if(plus.tools.ANDROID==plus.tools.platform)for(var c=t.ClassConstKeys,a=t.ClassConstValues,r=0;r<c.length;r++)i+=this.AddStaticConstToClass(e,c[r],a[r]);return this.hashTable[e]=n=classTemplate.createClass(e,i),iosTools.attach(e,n),n},classTemplate.isImport=function(e){return classTemplate.hashTable[e]},classTemplate.newClassDefine=function(e,t){var n,i="",o=e;e=iosTools.handleClassName(e),t=t&&iosTools.handleClassName(t),n=jsbDef+t;for(var r=(e=jsbDef+e).split("."),s="plus",c=1;c<r.length-1;c++)i+="if(!"+(s=s+"."+r[c])+")",i+=s+"={};";return i+=s+"."+r[r.length-1]+"=",i+="function(nocreate) { this.__UUID__ = plus.tools.UUID('JSB'); this.__TYPE__ = 'JSBObject'; var args = plus.ios.__Tool.process(arguments); if ( nocreate && plus.tools.IOS == plus.tools.platform ) {} else { plus.bridge.execSync2('"+_Server+"', '__Instance',[this.__UUID__, '"+o+"',args],null,true); } };",(t=t?n:"plus.ios.__JSBBaseObject")&&(i+=e+".prototype = new "+t+"('__super__constructor__');",i+=e+".prototype.constructor = "+e+";"),i},classTemplate.createClass=function(className,javasrcipt){className=iosTools.handleClassName(className);var newCls="(function(plus){"+javasrcipt+"return "+jsbDef+className+";})(plus);";return eval(newCls)},classTemplate.AddStaticConstToClass=function(e,t,n){var i;return e=iosTools.handleClassName(e),Array.isArray(n)&&0==n.length?(i=jsbDef+e+"."+t+"=[];",i+=jsbDef+e+".prototype."+t+"=[];"):(i=jsbDef+e+"."+t+"="+n+";",i+=jsbDef+e+".prototype."+t+"="+n+";"),i},classTemplate.AddMethodToClass=function(e,t,n){var i=e;e=iosTools.handleClassName(e);var o="";if(plus.tools.IOS==plus.tools.platform){var r=t.split(":"),s=r.length;if(0<s)for(var c=0;c<s;c++)o+=r[c];else o=r}else o=t;return e=n?jsbDef+e+"."+o:jsbDef+e+".prototype."+o,e+=" = function (){ var ret = null; try { var args = plus.ios.__Tool.process(arguments);",e+=n?"ret = plus.bridge.execSync2('"+_Server+"', '__execStatic', ['"+i+"', '"+t+"', args],null,true);":"ret = plus.bridge.execSync2('"+_Server+"', '__exec', [this.__UUID__, '"+t+"', args],null,true);",e+="ret = plus.ios.__Tool.New(ret, true); } catch (e) { throw e; } return ret; };"},JSBridge.prototype.requestPermissions=function(e,t,n){Array.isArray(e)?(t=bridge.callbackId(t,n),bridge.exec(_Server,"requestPermissions",[t,e])):n({code:"-1",message:"请求权限必须为数组类型"})},JSBridge.prototype.importClass=function(e){var t,n;if((e=__compatibilityNamespace(e)).__TYPE__){if(!e.className)return;n=e.__UUID__,e=(t=e).className}var i=classTemplate.isImport(e);if(i)return i;var o=bridge.execSync2(_Server,"__inheritList",[e,n],null,!0);if(o){for(var r=o.length,s=r-1;0<=s;s--)i=s==r-1?classTemplate.importClass(o[s],null):classTemplate.importClass(o[s],o[s+1]);return t&&(t.__proto__=i.prototype),i}return null},JSBridge.prototype.invoke=function(e,t){for(var n=null,i=[],o=2;o<arguments.length;o++)i.push(plus.ios.__Tool.warp(arguments[o]));if("string"==typeof e)try{n=plus.bridge.execSync2(_Server,"__execStatic",[e,t,i],null,!0)}catch(e){throw e}else e&&"JSBObject"==e.__TYPE__?n=plus.bridge.execSync2(_Server,"__exec",[e.__UUID__,t,i],null,!0):null==e&&"string"==typeof t&&(n=plus.bridge.execSync2(_Server,"__execCFunction",[t,i],null,!0));return n=plus.ios.__Tool.New(n,!0)},JSBridge.prototype.autoCollection=function(e){e&&"JSBObject"==e.__TYPE__&&plus.bridge.execSync2(_Server,"__autoCollection",[e.__UUID__],null,!0)},JSBridge.prototype.setAttribute=function(e,t,n){"function"==typeof e||e&&"JSBObject"==e.__TYPE__&&e.plusSetAttribute(t,n)},JSBridge.prototype.getAttribute=function(e,t){return"function"!=typeof e&&e&&"JSBObject"==e.__TYPE__?e.plusGetAttribute(t):null},JSBridge.prototype.load=function(e){plus.bridge.execSync2(_Server,"__loadDylib",[e],null,!0)},JSBridge.prototype.newObject=function(e,t){var n=null;if("string"==typeof e){for(var i=[],o=1;o<arguments.length;o++)i.push(plus.ios.__Tool.warp(arguments[o]));n=plus.bridge.execSync2(_Server,"__newObject",[e,i],null,!0)}return(n=plus.ios.__Tool.New(n,!0))||new JNBType(e,t)},JSBridge.prototype.currentWebview=function(){var e;return _currentFrameObj||(e=plus.bridge.execSync2(_Server,"currentWebview",[],null,!0),_currentFrameObj=plus.ios.__Tool.New(e,!0)),_currentFrameObj},JSBridge.prototype.getWebviewById=function(e){if(e===plus.__HtMl_Id__)return this.currentWebview();var t=_frameObjHash[e];return t||(t=plus.bridge.execSync2(_Server,"getWebviewById",[e],null,!0),(t=plus.ios.__Tool.New(t,!0))&&(_frameObjHash[e]=t)),t},JSBridge.prototype.deleteObject=function(e){bridge.execSync2(_Server,"__release",[e.__UUID__],null,!0)},JSBridge.prototype.implements=function(e,t){return new JSImplements(e,t)};var __compatibilityNS={"io.dcloud.adapter.":"io.dcloud.common.adapter.","io.dcloud.android.content.":"io.dcloud.feature.internal.reflect.","io.dcloud.app.":"io.dcloud.common.app.","io.dcloud.constant.":"io.dcloud.common.constant.","io.dcloud.core.":"io.dcloud.common.core.","io.dcloud.DHInterface.":"io.dcloud.common.DHInterface.","io.dcloud.net.":"io.dcloud.common.util.net.","io.dcloud.permission.":"io.dcloud.common.core.permission.","io.dcloud.sdk.":"io.dcloud.feature.internal.sdk.","io.dcloud.splash.":"io.dcloud.feature.internal.splash.","io.dcloud.ui.":"io.dcloud.common.core.ui.","io.dcloud.util.":"io.dcloud.common.util."};function __compatibilityNamespace(e){if("string"!=typeof e||tools.platform==tools.IOS)return e;var t,n,i;for(i in __compatibilityNS)if(0==e.indexOf(i)){n=__compatibilityNS[t=i];break}return n&&e?e.replace(t,n):e}plus.ios=plus.android=new JSBridge,plus.ios.import=plus.ios.importClass,plus.tools.ANDROID==plus.tools.platform&&(plus.android.runtimeMainActivity=function(){if(plus.android.__runtimeMainActivity__)return plus.android.__runtimeMainActivity__;var t,e=plus.bridge.callbackId(function(e){t.onActivityResult&&t.onActivityResult(e[0],e[1],e[2])}),e=(t=plus.bridge.execSync2(_Server,"getContext",[e],null,!0)).className;return t.superClassNames=[],t=plus.ios.__Tool.New(t,!0),plus.android.importClass(e),plus.android.__runtimeMainActivity__=t})}),PlusObject.register("statistic",function(e,t,n,i){var o=t.bridge,r="Statistic";t.statistic={eventTrig:function(e,t){o.exec(r,"eventTrig",[e,t])},eventStart:function(e,t){o.exec(r,"eventStart",[e,t])},eventEnd:function(e,t){o.exec(r,"eventEnd",[e,t])},eventDuration:function(e,t,n){o.exec(r,"eventDuration",[e,t,n])}}}),PlusObject.register("sqlite",function(e,t,n,i){var o="Sqlite",r=t.bridge,s={isOpenDatabase:function(e){return r.execSync(o,"isOpenDatabase",[e])},openDatabase:function(e){if(e&&e.name&&e.path)return callbackID=this.getCallbackIDByFunction(e.success,e.fail),r.exec(o,"openDatabase",[callbackID,e.name,e.path])},closeDatabase:function(e){if(e&&e.name)return callbackID=this.getCallbackIDByFunction(e.success,e.fail),r.exec(o,"closeDatabase",[callbackID,e.name])},transaction:function(e){if(e&&e.name&&e.operation)return callbackID=this.getCallbackIDByFunction(e.success,e.fail),r.exec(o,"transaction",[callbackID,e.name,e.operation])},executeSql:function(e){if(e&&e.name&&e.sql)return callbackID=this.getCallbackIDByFunction(e.success,e.fail),r.exec(o,"executeSql",[callbackID,e.name,e.sql])},selectSql:function(e){if(e&&e.name&&e.sql)return callbackID=this.getCallbackIDByFunction(e.success,e.fail),r.exec(o,"selectSql",[callbackID,e.name,e.sql])},getCallbackIDByFunction:function(t,n,e){var i="function"!=typeof t?null:function(e){t(e)},o="function"!=typeof n?null:function(e){n(e)};return r.callbackId(i,o)}};t.sqlite=s}),PlusObject.register("ad",function(e,r,t,n){var c=(r=r).bridge,i=r.tools,s="Ad";function o(e,t,n,i,o){r.nativeObj.View.prototype.constructor.call(this,e,t,n,i,o),this.type="UniAdView"}var a=o.prototype;function u(){var s=this;this.__cbs__={},this.callbackId=c.callbackId(function(e){var t=e.evt,n=e.args,i=s.__cbs__[t];if(i)for(var o=i.length,r=0,r=0;r<o;r++)i[r](n)})}function l(e){this.__uuid__=i.UUID("RewardedVideoAd"),this.__cbs__=new u,c.exec(s,"RewardedVideoAd",[this.__uuid__,e,this.__cbs__.callbackId])}function _(e){this.__uuid__=i.UUID("FullScreenVideoAd"),this.__cbs__=new u,c.exec(s,"FullscreenVideoAd",[this.__uuid__,e,this.__cbs__.callbackId])}function f(e){this.__uuid__=i.UUID("InterstitialAd"),this.__cbs__=new u,c.exec(s,"InterstitialAd",[this.__uuid__,e,this.__cbs__.callbackId])}r.tools.extend(a,r.nativeObj.View.prototype),a.constructor=o,r.nativeObj.__regChildViews("UniAdView",o),o.prototype.bind=function(e){c.exec(s,"bind",[e&&e.__id,e&&e.__provider,this.__uuid__])},o.prototype.renderingBind=function(e){c.exec(s,"renderingBind",[e&&e.__id,e&&e.__provider,this.__uuid__])},o.prototype.changeDownloadStatus=function(){c.exec(s,"changeDownloadStatus",[this.__uuid__])},o.prototype.setDownloadListener=function(e){this.setEventListener("download",e)},o.prototype.setRenderingListener=function(e){this.setEventListener("render",e)},o.prototype.setDislikeListener=function(e){this.setEventListener("dislike",e)},o.prototype.setAdClickedListener=function(e){this.setEventListener("adClicked",e)},u.prototype.push=function(e,t){this.__cbs__[e]||(this.__cbs__[e]=[]),this.__cbs__[e].push(t)},u.prototype.pop=function(e,t){this.__cbs__[e]&&this.__cbs__[e].pop(t)},l.prototype.load=function(){c.exec(s,"load",[this.__uuid__])},l.prototype.show=function(){c.exec(s,"show",[this.__uuid__])},l.prototype.getProvider=function(){return c.execSync(s,"getProvider",[this.__uuid__])},l.prototype.destroy=function(){c.exec(s,"destroy",[this.__uuid__])},l.prototype.onLoad=function(e){this.__cbs__.push("load",e)},l.prototype.offLoad=function(e){this.__cbs__.pop("load",e)},l.prototype.onError=function(e){this.__cbs__.push("error",e)},l.prototype.offError=function(e){this.__cbs__.pop("error",e)},l.prototype.onClose=function(e){this.__cbs__.push("close",e)},l.prototype.offClose=function(e){this.__cbs__.pop("close",e)},l.prototype.onVerify=function(e){this.__cbs__.push("verify",e)},l.prototype.offVerify=function(e){this.__cbs__.pop("verify",e)},l.prototype.onAdClicked=function(e){this.__cbs__.push("adClicked",e)},l.prototype.offAdClicked=function(e){this.__cbs__.pop("adClicked",e)},_.prototype.load=function(){c.exec(s,"fullscreen_load",[this.__uuid__])},_.prototype.show=function(){c.exec(s,"fullscreen_show",[this.__uuid__])},_.prototype.getProvider=function(){return c.execSync(s,"fullscreen_getProvider",[this.__uuid__])},_.prototype.destroy=function(){c.exec(s,"fullscreen_destroy",[this.__uuid__])},_.prototype.onLoad=function(e){this.__cbs__.push("load",e)},_.prototype.offLoad=function(e){this.__cbs__.pop("load",e)},_.prototype.onError=function(e){this.__cbs__.push("error",e)},_.prototype.offError=function(e){this.__cbs__.pop("error",e)},_.prototype.onClose=function(e){this.__cbs__.push("close",e)},_.prototype.offClose=function(e){this.__cbs__.pop("close",e)},_.prototype.onAdClicked=function(e){this.__cbs__.push("adClicked",e)},_.prototype.offAdClicked=function(e){this.__cbs__.pop("adClicked",e)},f.prototype.load=function(){c.exec(s,"interstitial_load",[this.__uuid__])},f.prototype.show=function(){c.exec(s,"interstitial_show",[this.__uuid__])},f.prototype.getProvider=function(){return c.execSync(s,"interstitial_getProvider",[this.__uuid__])},f.prototype.destroy=function(){c.exec(s,"interstitial_destroy",[this.__uuid__])},f.prototype.onLoad=function(e){this.__cbs__.push("load",e)},f.prototype.offLoad=function(e){this.__cbs__.pop("load",e)},f.prototype.onError=function(e){this.__cbs__.push("error",e)},f.prototype.offError=function(e){this.__cbs__.pop("error",e)},f.prototype.onClose=function(e){this.__cbs__.push("close",e)},f.prototype.offClose=function(e){this.__cbs__.pop("close",e)},f.prototype.onAdClicked=function(e){this.__cbs__.push("adClicked",e)},f.prototype.offAdClicked=function(e){this.__cbs__.pop("adClicked",e)},r.ad={setSplashAd:function(e){c.exec(s,"setSplashAd",[e])},showContentPage:function(e,t,n){var i="function"!=typeof t?null:function(e){t(e)},o="function"!=typeof n?null:function(e){n(e)},o=c.callbackId(i,o);c.exec(s,"showContentPage",[o,e])},getProviders:function(t,n){var e="function"!=typeof t?null:function(e){t(e)},i="function"!=typeof n?null:function(e){n(e)},i=c.callbackId(e,i);c.exec(s,"getProviders",[i])},getAds:function(e,t,n){var i="function"!=typeof t?null:function(e){t(e)},o="function"!=typeof n?null:function(e){n(e)},o=c.callbackId(i,o);c.exec(s,"getAds",[o,e])},getDrawAds:function(e,t,n){var i="function"!=typeof t?null:function(e){t(e)},o="function"!=typeof n?null:function(e){n(e)},o=c.callbackId(i,o);c.exec(s,"getDrawAds",[o,e])},releaseAdData:function(e){c.exec(s,"releaseAdData",[e&&e.__id,e&&e.__provider])},measureAdHeight:function(e,t){return c.execSync(s,"measureAdHeight",[t&&t.__id,t&&t.__provider,e])},createAdView:function(e){return new o((e=e||{}).id,e,null,!1,"UniAdView")},createRewardedVideoAd:function(e){return new l(e=e||{})},createFullScreenVideoAd:function(e){return new _(e=e||{})},createInterstitialAd:function(e){return new f(e=e||{})}}}); |