Your IP : 18.191.103.151
(function(){if(window.BXMobileApp)return;var syncApiObject=function(objectName){this.objectName=objectName;try{this.object=eval(objectName)}catch(t){this.object=null}};syncApiObject.prototype.getFunc=function(t){if(typeof this.object!="undefined"&&this.object!=null){var e=this;return function(){return function(){if(typeof e.object[t]=="function"){var a=e.object[t].apply(e.object,arguments);if(BXMobileAppContext.getPlatform()=="android"){if(typeof a=="string"){var i=null;try{i=JSON.parse(a);a=i}catch(t){}}}return a}else{console.error(e.objectName+" error: function '"+t+"' not found");return false}}.apply(e,arguments)}}return function(){console.error("Mobile Sync API: "+this.objectName+" is not defined",this)}};var _pageNavigator=new syncApiObject("BXMobileNavigator");window.BXMobileApp={eventAddLog:{},debug:false,supportNativeEvents:function(){return app.enableInVersion(17)},apiVersion:typeof appVersion!="undefined"?appVersion:1,cordovaVersion:"3.6.3",UI:{IOS:{flip:function(){app.flipScreen()}},Slider:{state:{CENTER:0,LEFT:1,RIGHT:2},setState:function(t){switch(t){case this.state.CENTER:app.openContent();break;case this.state.LEFT:app.openLeft();break;case this.state.RIGHT:app.exec("openRight");break;default:}},setStateEnabled:function(t,e){switch(t){case this.state.LEFT:app.enableSliderMenu(e);break;case this.state.RIGHT:app.exec("enableRight",e);break;default:}}},Photo:{show:function(t){app.openPhotos(t)}},Document:{showCacheList:function(t){app.showDocumentsCache(t)},open:function(t){app.openDocument(t)}},DatePicker:{setParams:function(t){if(typeof t=="object")this.params=t},show:function(t){this.setParams(t);app.showDatePicker(this.params)},hide:function(){app.hideDatePicker()}},SelectPicker:{show:function(t){app.showSelectPicker(t)},hide:function(){app.hideSelectPicker()}},BarCodeScanner:{open:function(t){app.openBarCodeScanner(t)}},NotifyPanel:{setNotificationNumber:function(t){app.setCounters({notifications:t})},setMessagesNumber:function(t){app.setCounters({messages:t})},setCounters:function(t){app.setCounters(t)},refreshPage:function(t){app.refreshPanelPage(t)},setPages:function(t){app.setPanelPages(t)}},Page:{isVisible:function(t){app.exec("checkOpenStatus",t)},reload:function(){app.reload()},reloadUnique:function(){UI.Page.params.get({callback:function(t){BX.localStorage.set("mobileReloadPageData",{url:location.pathname+location.search,data:t});app.reload()}})},close:function(t){app.closeController(t)},closeModalDialog:function(){app.exec("closeModalDialog")},captureKeyboardEvents:function(t){app.enableCaptureKeyboard(!(typeof t=="boolean"&&t===false))},setId:function(t){app.setPageID(t)},getTitle:function(){return this.TopBar.title},params:{set:function(t){app.changeCurPageParams(t)},get:function(t){if(BX.localStorage&&BX.message["USER_ID"]){var e=BX.localStorage.get("mobileReloadPageData");if(e&&e.url==location.pathname+location.search&&t.callback){BX.localStorage.remove("mobileReloadPageData");t.callback(e.data);return}}app.getPageParams(t)}},TopBar:{show:function(){app.visibleNavigationBar(true)},hide:function(){app.visibleNavigationBar(false)},setColors:function(t){app.exec("setTopBarColors",t)},addRightButton:function(t){app.addButtons({rightButton:t})},updateButtons:function(t){this.buttons=t;app.addButtons(t)},title:{params:{imageUrl:"",text:"",detailText:"",callback:""},timeout:0,isAboutToShow:false,show:function(){this.isAboutToShow=this.timeout>0;if(!this.isAboutToShow){clearTimeout(this.showTitleTimeout);this.showTitleTimeout=setTimeout(function(){app.titleAction("show")},300)}},hide:function(){app.titleAction("hide")},setImage:function(t){this.params.imageUrl=t;this.redraw()},setText:function(t){this.params.text=t;this.redraw()},setDetailText:function(t){this.params.detailText=t;this.redraw()},setCallback:function(t){this.params.callback=t;this.redraw()},redraw:function(){if(this.timeout>0)clearTimeout(this.timeout);this.timeout=setTimeout(BX.proxy(this._applyParams,this),200)},_applyParams:function(){app.titleAction("setParams",this.params);this.timeout=0;if(this.isAboutToShow)this.show()}}},SlidingPanel:{buttons:{},hide:function(){app.hideButtonPanel()},show:function(t){app.showSlidingPanel(t)},addButton:function(t){},removeButton:function(t){}},Refresh:{params:{enable:false,callback:false,pulltext:"Pull to refresh",downtext:"Release to refresh",loadtext:"Loading...",timeout:"60"},setParams:function(t){this.params.pulltext=t.pullText?t.pullText:this.params.pulltext;this.params.downtext=t.releaseText?t.releaseText:this.params.downtext;this.params.loadtext=t.loadText?t.loadText:this.params.loadtext;this.params.callback=t.callback?t.callback:this.params.callback;this.params.enable=typeof t.enabled=="boolean"?t.enabled:this.params.enable;this.params.timeout=t.timeout?t.timeout:this.params.timeout;app.pullDown(this.params)},setEnabled:function(t){this.params.enable=typeof t=="boolean"?t:this.params.enable;app.pullDown(this.params)},start:function(){app.exec("pullDownLoadingStart")},stop:function(){app.exec("pullDownLoadingStop")}},BottomBar:{buttons:{},show:function(){},hide:function(){},addButton:function(t){}},PopupLoader:{show:function(t){app.exec("showPopupLoader",{text:t})},hide:function(){app.exec("hidePopupLoader")}},LoadingScreen:{show:function(){app.showLoadingScreen()},hide:function(){app.hideLoadingScreen()},setEnabled:function(t){app.enableLoadingScreen(!(typeof t=="boolean"&&t===false))}},TextPanel:{defaultParams:{placeholder:"Text here...",button_name:"Send",mentionDataSource:{},action:function(){},smileButton:{},plusAction:"",callback:"-1",useImageButton:true},params:{},isAboutToShow:false,temporaryParams:{},timeout:0,setParams:function(t){if(typeof t=="undefined"&&this.params=={}){this.params=this.defaultParams}else{this.params=t}if(this.isAboutToShow){this.redraw()}},show:function(t){if(typeof t=="object"&&t!=null){this.setParams(t)}else if(this.params=={}){this.params=this.defaultParams}var e=this.getParams();if(!this.isAboutToShow){for(var a in this.temporaryParams){e[a]=this.temporaryParams[a]}this.temporaryParams={}}if(BXMobileApp.apiVersion>=10){clearTimeout(this.showTimeout);this.showTimeout=setTimeout(function(){app.textPanelAction("show",e)},100)}else{delete e["text"];app.showInput(e)}this.isAboutToShow=true},hide:function(){if(BXMobileApp.apiVersion>=10)app.textPanelAction("hide");else app.hideInput()},focus:function(){if(BXMobileApp.apiVersion>=10)app.textPanelAction("focus",this.getParams())},clear:function(){if(BXMobileApp.apiVersion>=10)app.textPanelAction("clear",this.getParams());else app.clearInput()},setUseImageButton:function(t){this.params["useImageButton"]=!(typeof t=="boolean"&&t===false);this.redraw()},setAction:function(t){this.params["action"]=t;this.redraw()},setText:function(t){if(!this.isAboutToShow){this.temporaryParams["text"]=t}else{var e=app.clone(this.params,true);e["text"]=t;app.textPanelAction("setParams",e)}},getText:function(t){app.textPanelAction("getText",{callback:t})},showLoading:function(t){app.showInputLoading(t)},getParams:function(){var t={};for(var e in this.params){t[e]=this.params[e]}return t},redraw:function(){if(this.timeout>0)clearTimeout(this.timeout);this.timeout=setTimeout(BX.proxy(this._applyParams,this),100)},_applyParams:function(){app.textPanelAction("setParams",this.params);this.timeout=0;if(this.isAboutToShow)this.show()}},Scroll:{setEnabled:function(t){app.enableScroll(t)}}},Badge:{setIconBadge:function(t){app.exec("setBadge",t)},setButtonBadge:function(t,e){app.exec("setButtonBadge",{code:t,value:e})}},types:{COMMON:0,BUTTON:1,PANEL:2,TABLE:3,MENU:4,ACTION_SHEET:5,NOTIFY_BAR:6},parentTypes:{TOP_BAR:0,BOTTOM_BAR:1,SLIDING_PANEL:2,UNKNOWN:3}},PushManager:{getLastNotification:new syncApiObject("BXMobileAppContext").getFunc("getLastNotification"),prepareParams:function(t){if(typeof t!="object"||typeof t.params=="undefined"){return{ACTION:"NONE"}}var e={};try{e=JSON.parse(t.params)}catch(a){e={ACTION:t.params}}return e}},PageManager:{loadPageBlank:function(t){app.loadPageBlank(t)},loadPageUnique:function(t){if(typeof t!="object")return false;t.unique=true;app.loadPageBlank(t);if(typeof t.data=="object"){BXMobileApp.onCustomEvent("onPageParamsChangedLegacy",{url:t.url,data:t.data},true,true)}return true},loadPageStart:function(t){app.loadPageStart(t)},loadPageModal:function(t){app.showModalDialog(t)},setWhiteList:function(t){_pageNavigator.getFunc("setWhiteList")(t)},createPage:function(t){return new function t(e){this.pageData=e;this.getData=function(){return this.pageData.data};this.go=function(){BXMobileApp.PageManager.goToPageWithUniqueCode(this.pageData.uniqueCode)};this.getListeners=function(){return this.pageData.listeners}}(t)},getAllPages:function(){var t=[];var e=_pageNavigator.getFunc("getAllPages")();for(var a=0;a<e.length;a++){t.push(this.createPage(e[a]))}return t},getCurrent:function(){var t=_pageNavigator.getFunc("getCurrent")();if(t){return this.createPage(t)}return null},getPrevious:function(){var t=_pageNavigator.getFunc("getPrevious")();if(t){return this.createPage(t)}return null},goToFirst:_pageNavigator.getFunc("goToFirst"),goBack:_pageNavigator.getFunc("goBack"),goToPageWithId:_pageNavigator.getFunc("goToPageWithId"),goToPageWithUniqueCode:_pageNavigator.getFunc("goToPageWithUniqueCode"),isFirst:_pageNavigator.getFunc("isFirst"),isLast:_pageNavigator.getFunc("isLast"),isVisible:_pageNavigator.getFunc("isVisible")},TOOLS:{extend:function(t,e){var a=function(){};a.prototype=e.prototype;t.prototype=new a;t.prototype.constructor=t;t.superclass=e.prototype;if(e.prototype.constructor==Object.prototype.constructor){e.prototype.constructor=e}},merge:function(t,e){for(var a in t){if(typeof e[a]!="undefined"){t[a]=e[a]}}return t}},Events:{list:[],subscribe:function(t){this.list.push(t);app.exec("subscribeEvent",{eventName:t})},unsubscribe:function(t){var e;if(e=this.list.indexOf(t)>=0){delete this.list[e]}app.exec("unsubscribeEvent",{eventName:t})},post:function(t,e){if(app.enableInVersion(17)){if(typeof e=="object")e=JSON.stringify(e);app.exec("fireEvent",{eventName:t,params:e},false);return true}return false},postToComponent:function(t,e,a){if(app.enableInVersion(25)){if(typeof e=="object")e=JSON.stringify(e);app.exec("fireEvent",{eventName:t,params:e,componentCode:a},false);return true}return false},addEventListener:function(t,e,a){BXMobileApp.addCustomEvent(t,e,a)}},onCustomEvent:function(t,e,a,i){var o=true;if(this.supportNativeEvents()&&a){o=false;BXMobileApp.Events.post(t,e);if(i){BX.onCustomEvent(t,BX.type.isArray(e)?e:[e])}}else{app.onCustomEvent(t,e,false,false)}if(BXMobileApp.debug)console.log("Fire event"+(o?" (old)":""),t,location.href)},addCustomEvent:function(t,e,a){if(BX.type.isString(t)){a=e;e=t;t=window}if(BXMobileApp.debug){if(typeof BXMobileApp.eventAddLog[e]=="undefined"){BXMobileApp.eventAddLog[e]=[]}BXMobileApp.eventAddLog[e].push(function e(){var i={};if(Error&&Error["captureStackTrace"]){Error.captureStackTrace(i,e);return{stack:i.stack,eventObject:t,listener:a}}return{eventObject:t,listener:a}}());BX.addCustomEvent(e,function(){console.log("Event has been caught",e)})}BXMobileApp.Events.subscribe(e);BX.addCustomEvent(t,e,a)}};var UI=window.BXMobileApp.UI;window.BXMPage=UI.Page;window.BXMSlider=UI.Slider;window.BXMUI=BXMobileApp.UI;window.BXMPager=BXMobileApp.PageManager;UI.Element=function(t,e){this.id=typeof t=="undefined"?this.type+"_"+Math.random():t;this.parentId=e.parentId?e.parentId:UI.UNKNOWN;this.isCreated=false;this.isShown=false};UI.Element.prototype.onCreate=function(){this.isCreated=true;if(this.isShown){app.exec("show",{type:this.type,id:this.id})}};UI.Element.prototype.getIdentifiers=function(){return{id:this.id,type:this.type,parentId:this.parentId}};UI.Element.prototype.show=function(){this.isShown=true;if(this.isCreated){app.exec("show",{type:this.type,id:this.id})}};UI.Element.prototype.hide=function(){this.isShown=false;app.exec("hide",{type:this.type,id:this.id})};UI.Element.prototype.destroy=function(){};var defineUIElement=function(t,e){UI[t]=e["constructor"];BXMobileApp.TOOLS.extend(UI[t],UI.Element);for(var a in e){if(a=="constructor")continue;UI[t].prototype[a]=e[a]}};defineUIElement("Button",{constructor:function(t,e){this.params=e;UI.Button.superclass.constructor.apply(this,[t,e])},setBadge:function(t){if(this.params.badgeCode){UI.Badge.setButtonBadge(this.params.badgeCode,t)}},remove:function(){app.removeButtons(this.params)}});defineUIElement("Menu",{constructor:function(t,e){this.items=t.items;this.type=UI.types.MENU;UI.Menu.superclass.constructor.apply(this,[e,t]);app.menuCreate({items:this.items,useNavigationBarColor:t["useNavigationBarColor"]})},show:function(){app.menuShow()},hide:function(){app.menuHide()}});defineUIElement("NotificationBar",{constructor:function(t,e){this.params=BXMobileApp.TOOLS.merge(t,{});this.type=UI.types.NOTIFY_BAR;UI["NotificationBar"].superclass.constructor.apply(this,[e,t]);var a=this.params;a["id"]=this.id;a["onCreate"]=BX.proxy(function(t){this.onCreate(t)},this);app.exec("notificationBar",{action:"add",params:a})},onCreate:function(t){this.isCreated=true;if(this.isShown){app.exec("notificationBar",{action:"show",params:this.params})}},show:function(){if(this.isCreated){app.exec("notificationBar",{action:"show",params:this.params})}this.isShown=true},hide:function(){if(this.isShown){app.exec("notificationBar",{action:"hide",params:this.params})}this.isShown=false}});defineUIElement("ActionSheet",{constructor:function(t,e){this.items=t.buttons;this.title=t.title?t.title:"";this.type=UI.types.ACTION_SHEET;UI.ActionSheet.superclass.constructor.apply(this,[e,t]);app.exec("createActionSheet",{onCreate:BX.proxy(function(t){this.onCreate(t)},this),id:this.id,title:this.title,buttons:this.items})},show:function(){if(this.isCreated){app.exec("showActionSheet",{id:this.id})}this.isShown=true},onCreate:function(t){this.isCreated=true;if(this.isShown){app.exec("showActionSheet",{id:this.id})}}});defineUIElement("Table",{constructor:function(t,e){this.params={table_id:e,url:t.url||"",isroot:false,TABLE_SETTINGS:{callback:function(){},markmode:false,modal:false,multiple:false,okname:"OK",cancelname:"Cancel",showtitle:false,alphabet_index:false,selected:{},button:{}}};this.params.table_settings=this.params.TABLE_SETTINGS;this.params=BXMobileApp.TOOLS.merge(this.params,t);this.params.type=UI.types.TABLE;UI.Table.superclass.constructor.apply(this,[e,t])},show:function(){app.openBXTable(this.params)},useCache:function(t){this.params.TABLE_SETTINGS.cache=t||false},useAlphabet:function(t){this.params.TABLE_SETTINGS.alphabet_index=t||false},setModal:function(t){this.params.TABLE_SETTINGS.modal=t||false},clearCache:function(){return app.exec("removeTableCache",{table_id:this.id})}});window.__origWebSocket=WebSocket;var websocketPlugin=window.websocketPlugin=new BXCordovaPlugin("WebSocketCordovaPlugin");window.websocketPlugin.open=function(){this.exec("open")};window.websocketPlugin.close=function(t,e){this.exec("close",{code:t,reason:e})};window.websocketPlugin.init=function(t){this.exec("init",t)};if(typeof BXMobileAppContext!="undefined"&&BXMobileAppContext["useNativeWebSocket"]){window.WebSocket=function(t){this.open=BX.proxy(websocketPlugin.open,websocketPlugin);this.close=BX.proxy(websocketPlugin.close,websocketPlugin);var e=BX.proxy(function(t){if(typeof this.onclose=="function"){this.onclose(t)}},this);var a=BX.proxy(function(t){if(typeof this.onopen=="function"){this.onopen(t)}},this);var i=BX.proxy(function(t){if(typeof this.onmessage=="function"){this.onmessage(t)}},this);var o=BX.proxy(function(t){if(typeof this.onerror=="function"){this.onerror(t)}},this);websocketPlugin.init({server:t,onmessage:i,onclose:e,onopen:a,onerror:o})}}})();