main.js 107 KB
!function(e,t){t=t(e),"function"==typeof define&&define.amd?(define("amdConfig",function(){return t}),require(t)):"object"==typeof module&&module.exports?module.exports=t:e.amdConfig=t}(this,function(e){var i={layer_css:"23df697dad",photoswipe_css:"cbf6540cf0",photoswipe_skin_css:"e63d415fd3",dtpicker_css:"d033ec7b17",idangerous_css:"5d4a820240",imgdrawing_css:"94760daef6",_calendar_css:"c1fd9267a8",chart_css:"daf18ec828",comment_css:"6ddcecf2d4",grid_css:"6f8db75aed",listAdvancedSearch_css:"0c06b07935",listSwipe_css:"74bfd57e0c",praise_css:"8d5598b2d6",swipe_css:"7a2b7afc2b",tab_css:"8aa4f35ea9",AMap_css:"229ad49477",Button_css:"3400db1cfa",Calendar_css:"c390816699",ColumnBreak_css:"28bb34a642",CountPanel_css:"b097c0efd1",Countdown_css:"d3ffc045b9",DataDetail_css:"1112d74ae4",DetailTable_css:"ad8dc57051",DynamicForm_css:"f38ccdb776",FButton_css:"a007e00298",FCheck_css:"b31790e2cc",FCheckItem_css:"b796ca388b",FCheckbox_css:"b0b733b161",FFile_css:"020cc95182",FHandwriting_css:"43c6ccf5df",FLbs_css:"0c3e8a8ac9",FLbs4amap_css:"77233e2809",FPhoto_css:"93735cbbe5",FRange_css:"0130d3449b",FScores_css:"4bc800b189",FSound_css:"a8bc2f8b19",FloatButton_css:"723ab3bb1e",Form_css:"c7c0ffd1be",GridTable_css:"044bb56fe4",HoriList_css:"a9d7d8188e",Iframe_css:"0eeaa3adac",LargeList_css:"6307253066",Map_css:"9a72509e0d",NGridTable_css:"584ea4773c",NHoriList_css:"a9d7d8188e",NLargeList_css:"6307253066",NList_css:"9c859d0b96",NTimeline_css:"8188135ff6",NavHeader_css:"ef37a0041c",Navigation_css:"09673833a3",NoticeBar_css:"176b8d48c4",QRCode_css:"955e02e409",Reply_css:"b85f056878",RichText_css:"17d685207a",SearchBox_css:"097ff744cf",SegControl_css:"7c3752509d",Slide_css:"5f96076fa5",Steps_css:"7b4a8252ae",Tab_css:"3e50fdc75f",TabBar_css:"ca9bd28f1c",Timelinr_css:"b114c1fff9",TipPanel_css:"5ee8379a57",Toolbar_css:"6e3e1e6056",TopSearch_css:"30dfd8e1d8",Tree_css:"ce661a7bfb",UserAvatar_css:"595a6e818c",Weather_css:"6d4425b094","service.commonbrowser_css":"64795391e0","service.customsearch_css":"cd1a3be670","service.deptbrowser_css":"4cff0e96b7","service.detailtable_css":"54dc0cee92","service.fnabrowser_css":"32cb376ba4","service.hrmbrowser_css":"f38e319483","service.map_css":"00b50c714e","service.portal_css":"c11549cdbd","service.position_css":"51af36e88d","service.position4amap_css":"6857357e84","service.replybox_css":"62dfada699","service.search_css":"a4245a07f4","service.searchbox_css":"ebe276006f","service.topsearch_css":"bb4d79361c","service.treebrowser_css":"bd440d43dd","service.viewimg_css":"fc26707f45",require:"8d42a5d08e",css:"887692644c",text:"79ca616fcc",zepto:"399f3413df",fastclick:"007453ae6f",mobilebone:"6d5186cfe3",juicer:"9b63a27f50",lazyload:"891fbdebd3",hammer:"9dbc3372b0",baidumap:"8bafbc8dd2",amap:"fcd038d03f",amapHelper:"04f464d5f1",watermark:"0831637bc3",LZString:"acde2b62a1",amdConfig:"f030ea10a1",main:"9b6841869f",mobilemode:"abcb039664",mUtil:"b421206100",i18n:"e28b5cc0af",pageStack:"922127e546",pageEvent:"9484c8b47b",mApi:"40618c9275","mApi/basic":"4289980455","mApi/popup":"bbc1d36b9b","mApi/sql":"c1faa61a3b","mApi/refresh":"48b872d37b","mApi/qrcode":"60382c82aa","mApi/lbs":"effd8e43c7","mApi/lbs4amap":"3dd596053f","mApi/msgpush":"8a18d675d4","mApi/jump":"98d73ea821","mApi/menu":"55b381451d","mApi/other":"3064b42d70","mApi/event":"f661a9d5d7","mApi/custom":"f4adb3f27c","mApi/form":"89cc065629",Component:"4a6826b563","main/log":"ee8ae58b7c",main_demo:"3c759c26a7",main_export:"6e5e5c79d9","ext/aop":"a921bb3326",permission:"5f894682d5","permission/pageview":"40742f8316",ssoInit:"1b0b27a3f6",varParseHelper:"08e99067a5",imgViewerHelper:"6933b80c5a",pullToRefreshHelper:"110432ddd7",docHelper:"15792358d9","wev-loading":"e87a77eb58","wev-pagination":"716667ab44",layer:"1167b6dae6",mService:"74779b82e4","mService/hrmbrowser/result":"4d65b46e1e",photoswipe:"bbf4075ce2",photoswipe_ui:"2d47cae2a1",apiHelper:"2f1f725800",browserHelper:"790967f133",chartHelper:"c89d8bdd4a",formExtHelper:"8e2377e7c6",fieldParseHelper:"852cd7b7cd",fieldTriggerHelper:"2a43fdc0ac",attrLinkageHelper:"ea9f18c06e",lazyImgHelper:"45525d5f51",mapHelper:"6aa4c89e27",remindHelper:"0bbb70aa5f",swipeHelper:"7dc06c7236",weatherHelper:"4dd99fc404",audioHelper:"30338852a5",securityHelper:"2d05230191",pageExpandHelper:"f00974a7b3",dtpicker:"e1ed673345",echarts:"1882d39b53",idangerous:"dd12928ddc",imgdrawing:"164a2ccd2b",ichart:"427a747634",ImageOrientationFix:"c283453b35",exif:"9531e5503b",qrcode:"913847e4af",swipe:"0f95112a10",sortable:"5fba0d797b",timeCircles:"e11e10d78b",rainyxDate:"d28e946648",_calendar:"7bc9c4f13e",pgbar:"4aeae64b32","mService/commonbrowser":"3186fa6a87","mService/customsearch":"9038892850","mService/deptbrowser":"b89d6fcaf3","mService/detailtable":"f000d9c0e2","mService/fnabrowser":"f0096d4961","mService/hrmbrowser":"658669846e","mService/hrmbrowser/list":"46937cfef1","mService/hrmbrowser/tree":"81a36dd08b","mService/map":"6c27e624e6","mService/portal":"e15b598511","mService/position":"afbfe95ad9","mService/position4amap":"55dbf262d8","mService/replybox":"7119d90843","mService/search":"416dc6e205","mService/searchbox":"6fd2a5496b","mService/topsearch":"bf354a8f14","mService/treebrowser":"941baff9b1","mService/viewimg":"976f0578c2",AMap:"5369c36fa3",APIList:"46b06ef7c6",BarChart:"5011aee483",Button:"4fd894d32e",Calendar:"b7354f1480",Chart:"d3469e4a7f",ColumnBreak:"8168e45418",CountPanel:"1fa449b2b1",Countdown:"97bab039cd",DataDetail:"a0bd6a37b6",DataSet:"49033fd3b8",DetailTable:"0f2099541c",FAPIBrowser:"884b4ae913",FBrowser:"735435ef11",FButton:"c7a3f369d1",FCheck:"8ca9acb96e",FCheckbox:"33346d136d",FCheckItem:"b429cf6271",FDateTime:"8bd63111ab",FFile:"e3d9511a25",FHandwriting:"f2a888bdab",FHidden:"2563659f34",FInputText:"8d54390418",FLbs:"b871fc4c55",FLbs4amap:"e3047a390b",FPhoto:"c71d125c2e",FRange:"a619b4d815",FScores:"f9078849ae",FSelect:"8cb8d6905e",FSound:"9cc0b152da",FTextarea:"0cdabb82eb",FloatButton:"3438384ac4",Form:"3f259bd16a",DynamicForm:"6fa58430e4",FunnelChart:"2ec872ee91",GaugeChart:"e3fb2b142f",GridTable:"5bc0678933",HoriList:"6a33be57d4",Html:"f49ad84e4f",Iframe:"befffaf345",LargeList:"47a210601b",LineChart:"ee560bbc8d",List:"1aac143826",Map:"6893e17830",NGridTable:"6d9b554487",NList:"5cec28ccd9",NavHeader:"040a51f4e5",NavPanel:"d9102c304a",Navigation:"28759dd84b",NoticeBar:"2972f1feea",Picture:"05c4e6fa95",PieChart:"9c85d0cbce",ProgressBar:"9af521fc7b",QRCode:"ddb73cd64a",RSSList:"9b2b489567",RadarChart:"6c6557e16b",Reply:"a023cd0060",RichText:"2e883feb96",SearchBox:"3b5ae62622",SegControl:"31442a5e23",Slide:"085f50253b",Steps:"b7378e6cde",Tab:"c79975dbd3",TabBar:"ed34f2c562",Timelinr:"0989f511dd",NTimeline:"fe10ce2a70",TipPanel:"5886f97029",Toolbar:"982e6960db",TopSearch:"d53d8f9eb5",Tree:"c88fac68e6",UrlGridTable:"9ac8507b2a",UrlList:"4d7d754f21",UserAvatar:"278a1d5d97",Video:"f97cf3dcc4",Weather:"cdfdb6ba39",NHoriList:"4a8128dc69",NLargeList:"6cc97c07bd"},r={waitSeconds:0,baseUrl:"/mobilemode/mobile/dist/",urlArgs:function(e,t){if(~t.indexOf("?v="))return"";var n=(new Date).getTime(),r=i[e]||n;return~["mApi/custom"].indexOf(e)&&(r=n),"?v="+r},paths:{require:"js/lib/require/require.min_wev8",css:"js/lib/require-css/css.min_wev8",text:"js/lib/require-text/text",zepto:"js/lib/zepto/zepto.min_wev8",fastclick:"js/lib/fastclick/fastclick.min_wev8",mobilebone:"js/lib/mobilebone/mobilebone_wev8",juicer:"js/lib/juicer/juicer.min_wev8",lazyload:"js/lib/lazyload/lazyload",hammer:"js/lib/hammer/hammer.min",baidumap:"js/lib/baidu/api_https_wev8",amap:"js/lib/amap/api_https_amap",amapHelper:"js/helper/amapHelper",watermark:"js/lib/watermark/watermark_wev8",LZString:"js/lib/lz-string/lz-string.min",amdConfig:"js/amdConfig",main:"js/main/main",mobilemode:"js/main/mobilemode",mUtil:"js/mobilemode.util_wev8",i18n:"js/main/i18n",pageStack:"js/main/pageStack",pageEvent:"js/main/pageEvent",mApi:"js/api/mobilemode.api_wev8","mApi/basic":"js/api/mobilemode.api.basic_wev8","mApi/popup":"js/api/mobilemode.api.popup_wev8","mApi/sql":"js/api/mobilemode.api.sql_wev8","mApi/refresh":"js/api/mobilemode.api.refresh_wev8","mApi/qrcode":"js/api/mobilemode.api.qrcode_wev8","mApi/lbs":"js/api/mobilemode.api.lbs_wev8","mApi/lbs4amap":"js/api/mobilemode.api.lbs4amap_wev8","mApi/msgpush":"js/api/mobilemode.api.msgpush_wev8","mApi/jump":"js/api/mobilemode.api.jump_wev8","mApi/menu":"js/api/mobilemode.api.menu_wev8","mApi/other":"js/api/mobilemode.api.other_wev8","mApi/event":"js/api/mobilemode.api.event_wev8","mApi/custom":"js/api/mobilemode.api.custom_wev8","mApi/date":"js/api/mobilemode.api.date_wev8","mApi/form":"js/api/mobilemode.api.form_wev8",Component:"js/main/Component","main/log":"js/main/log",loader:"js/loader",main_demo:"js/main_demo/main",main_export:"js/main_export/main","ext/aop":"js/extension/aop",permission:"js/main/permission","permission/pageview":"js/main/permission/pageview",ssoInit:"js/main/permission/ssoInit",varParseHelper:"js/helper/varParseHelper",imgViewerHelper:"js/helper/imgViewerHelper",pullToRefreshHelper:"js/helper/pullToRefreshHelper",docHelper:"js/helper/docHelper","wev-loading":"js/component/base/Loading","wev-pagination":"js/component/base/Pagination",layer:"js/lib/layer/layer",layer_css:"css/lib/layer/layer",mService:"js/service/service_wev8","mService/hrmbrowser/result":"js/service/service.hrmbrowser.result_wev8",photoswipe:"js/lib/photoSwipe/photoswipe.min",photoswipe_ui:"js/lib/photoSwipe/photoswipe-ui-default.min",photoswipe_css:"css/lib/photoSwipe/photoswipe",photoswipe_skin_css:"css/lib/photoSwipe/default-skin/default-skin",chart_css:"css/common/chart",comment_css:"css/common/comment",praise_css:"css/common/praise",commonTab_css:"css/common/tab",grid_css:"css/common/grid",listSwipe_css:"css/common/listSwipe",listAdvancedSearch_css:"css/common/listAdvancedSearch",swipe_css:"css/common/swipe",apiHelper:"js/helper/apiHelper",browserHelper:"js/helper/browserHelper",chartHelper:"js/helper/chartHelper",formExtHelper:"js/helper/formExtHelper_wev8",fieldParseHelper:"js/helper/fieldParseHelper",fieldTriggerHelper:"js/helper/fieldTriggerHelper_wev8",attrLinkageHelper:"js/helper/attrLinkageHelper",lazyImgHelper:"js/helper/lazyImgHelper",mapHelper:"js/helper/mapHelper",remindHelper:"js/helper/remindHelper",swipeHelper:"js/helper/swipeHelper",weatherHelper:"js/helper/weatherHelper",audioHelper:"js/helper/audioHelper",securityHelper:"js/helper/securityHelper",pageExpandHelper:"js/helper/pageExpandHelper",dtpicker:"js/lib/datepicker/dtpicker_wev8",dtpicker_css:"css/lib/datepicker/dtpicker_wev8",echarts:"js/lib/echarts/echarts.common.min",idangerous:"js/lib/swiper/idangerous.swiper-2.7.min",idangerous_css:"css/lib/swiper/idangerous.swiper-2.7",imgdrawing:"js/lib/imgdrawing/imgdrawing_wev8",imgdrawing_css:"css/lib/imgdrawing/imgdrawing_wev8",ichart:"js/lib/ichart/ichart.1.2.min",ImageOrientationFix:"js/lib/imgdrawing/ImageOrientationFix.min_wev8",exif:"js/lib/imgdrawing/exif.min_wev8",qrcode:"js/lib/qrcode/jquery.qrcode",swipe:"js/lib/swipe/swipe_wev8",sortable:"js/lib/sortable/Sortable.min",timeCircles:"js/lib/countdown/TimeCircles_wev8",rainyxDate:"js/lib/calendar/rainyxDate_wev8",_calendar:"js/lib/calendar/calendar_wev8",_calendar_css:"css/lib/calendar/calendar_wev8",pgbar:"js/lib/progressbar/progressbar.min"},shim:{juicer:{exports:"juicer"},qrcode:{exports:"qrcode"},zepto:{exports:"$"},dtpicker:["css!dtpicker_css"],idangerous:["css!idangerous_css"],ImageOrientationFix:["exif"],imgdrawing:["exif","ImageOrientationFix","css!imgdrawing_css"],layer:["css!layer_css"],photoswipe:["photoswipe_ui","css!photoswipe_css","css!photoswipe_skin_css"],_calendar:["idangerous","css!idangerous_css","rainyxDate","css!_calendar_css"]},exclude:["mApi/custom"]};return["commonbrowser","customsearch","deptbrowser","detailtable","fnabrowser","hrmbrowser","hrmbrowser/list","hrmbrowser/tree","map","portal","position","position4amap","replybox","search","searchbox","topsearch","treebrowser","viewimg"].forEach(function(e){var t="mService/"+e,n="service."+e.replace("/",".");r.paths[t]="js/service/"+n+"_wev8",-1==e.indexOf("/")&&(r.paths[t+"_css"]="css/service/"+n)}),["AMap","APIList","BarChart","Button","Calendar","Chart","Chart2","ColumnBreak","CountPanel","Countdown","DataDetail","DataSet","DetailTable","FAPIBrowser","FBrowser","FButton","FCheck","FCheckbox","FCheckItem","FDateTime","FFile","FHandwriting","FHidden","FInputText","FLbs","FLbs4amap","FPhoto","FRange","FScores","FSelect","FSound","FTextarea","FloatButton","Form","DynamicForm","FunnelChart","GaugeChart","GridTable","HoriList","Html","Iframe","LargeList","LineChart","List","Map","NGridTable","NList","NavHeader","NavPanel","Navigation","NoticeBar","Picture","PieChart","ProgressBar","QRCode","RSSList","RadarChart","Reply","RichText","SearchBox","SegControl","Slide","Steps","Tab","TabBar","Timelinr","NTimeline","TipPanel","Toolbar","TopSearch","TouchButton","Tree","UrlGridTable","UrlList","UserAvatar","Video","Weather","NHoriList","NLargeList"].forEach(function(e){r.paths[e]="js/component/"+e+"_wev8",r.paths[e+"_css"]="css/component/"+e}),r}),function(t,n){document.MBLOADED||("function"==typeof define&&(define.amd||define.cmd)?define("mobilebone",function(e){return n(t,e)}):t.Mobilebone=n(t,{}))}(this,function(l,L){if(document.MBLOADED)return"Don't repeat load Mobilebone!";var O={},P=[].slice,u=/^#?\w+(?:[\-_]\w+)*$/i,D="WebkitAppearance"in document.documentElement.style||void 0!==document.webkitHidden,I="pushState"in history&&"replaceState"in history;L.support=I;var p=!1;if(L.VERSION="2.6.2",L.captureLink=!0,L.captureForm=!0,L.rootTransition=l,L.mergeCallback=!0,L.classAnimation="slide",L.classPage="page",L.classMask="mask",L.pushStateEnabled=!0,L.evalScript=!1,0<=window.navigator.userAgent.indexOf("Firefox")&&window.top!==window&&(L.pushStateEnabled=!1),0==I)return L;history.popstate=!1,L.transition=function(e,t,n,l){if(0!=arguments.length){3==arguments.length&&1==isNaN(1*n)&&(n=(l=n).back),t=t||null,n=n||!1,l=l||{};var r=L.isDulicatePage(e,t);if(r&&!n){var i=L.createDuplicatePage(e,t,l.formdata);e=i[0],t=i[1]}if(e!=t){var a={root:this.rootTransition,form:this.form||this.classAnimation,onpagefirstinto:this.onpagefirstinto,animationstart:this.animationstart,animationend:this.animationend,preventdefault:this.preventdefault,fallback:this.fallback,callback:this.callback},u=function(n){if(!n||!n.getAttribute)return{};var r={},i=R(n.getAttribute("data-params")||"");return["title","root","form"].forEach(function(e){r[e]=n.getAttribute("data-"+e)||i[e]||l[e]||a[e]}),"string"==typeof r.root&&(r.root=L.getFunction(r.root)),["onpagefirstinto","callback","fallback","animationstart","animationend","preventdefault"].forEach(function(e){if(1==L.mergeCallback&&"function"==typeof a[e]){var t=n.getAttribute("data-"+e)||i[e];"function"==typeof r.root[t]?r[e]=function(){a[e].apply(this,arguments),r.root[t].apply(this,arguments)}:"function"==typeof l[e]?r[e]=function(){a[e].apply(this,arguments),l[e].apply(this,arguments)}:r[e]=a[e]}else r[e]=n.getAttribute("data-"+e)||i[e]||l[e]||a[e]}),r},o=u(t),p=u(e);if(null!=t&&t.classList){var s=o.preventdefault,c=!1;"string"==typeof s&&(s=o.root[s])}if(null!=e&&e.classList){var f=p.preventdefault,d=!1;"string"==typeof f&&(f=p.root[f])}if("function"==typeof s&&(c=s.call(o.root,e,t,l)),1==c&&s===f)return!1;if("function"==typeof f&&(d=f.call(p.root,e,t,l)),1==d)return!1;var h=function(s,c){1!=s.flagAniBind&&["animationstart","animationend"].forEach(function(e,t){var n=p[e]||s[e],r="webkit"+e.replace(/^a|s|e/g,function(e){return e.toUpperCase()}),i=D?r:e;t&&!s._hide&&(s._hide=!0,s.addEventListener(i,function(){0==this.classList.contains("in")&&(this.style.display="none",1==this.removeSelf&&(this.parentElement.removeChild(this),this.removeSelf=null)),this.classList.remove(u(this).form)}));var a=null,o="_"+i;"string"==typeof n&&p.root[n]?a=function(){c.root[n].call(c.root,this,this.classList.contains("in")?"into":"out",l)}:"function"==typeof n&&(a=function(){n.call(c.root,this,this.classList.contains("in")?"into":"out",l)}),s[o]&&s.removeEventListener(i,s[o]),a&&(s.addEventListener(i,a),s[o]=a),s.flagAniBind=!0})},m=l.reverse,g=n||m?"add":"remove";if(null!=t&&t.classList&&1!=c){t.offsetWidth=t.offsetWidth,t.style.display="block",t.classList.add("out"),t.classList.remove("in"),t.classList[g]("reverse"),t.classList.add(o.form),t.removeSelf=t.removeSelf||r&&N(t.id)&&n,h(t,o);var v=o.fallback;"string"==typeof v&&(v=o.root[v]),"function"==typeof v&&v.call(o.root,e,t,l)}if(null!=e&&e.classList){var b=p.title,y=document.querySelector("h1"),_=document.querySelector("."+this.classPage);b&&!1!==l.title?(document.title=b,y&&(y.innerHTML=b,y.title=b)):_==e&&!t&&document.title&&e.setAttribute("data-title",document.title);var w=e.id||l.id,E=l.id||e.id,S=O["_"+w];!1!==l.remove&&O[w]&&O[w]!=e&&(S&&O[S]&&1==l.reload&&(delete O[S],delete O["_"+w]),O[w]!=t?O[w].parentElement&&O[w].parentElement.removeChild(O[w]):t.removeSelf=!0,delete O[w]),e.offsetWidth=e.offsetWidth,e.style.display="block",e.classList.remove("out"),e.classList.add("in"),e.classList[g]("reverse"),t&&e.classList.add(p.form);var T=p.onpagefirstinto;(!e.firstintoBind||l.reload&&!n)&&("string"==typeof T&&p.root[T]?p.root[T].call(p.root,e,t,l):"function"==typeof T&&T.call(p.root,e,t,l),P.call(e.querySelectorAll("form")).forEach(function(e){L.submit(e)}),e.firstintoBind=!0),h(e,p);var C,x=E;if(x&&0==/^#/.test(x)&&(x="#"+x),C=x.replace(/^#/,"#&"),I&&this.pushStateEnabled&&!1!==l.history&&x&&C!=location.hash){history.popstate=!1;var A=l.formdata?"?"+l.formdata:"",k=t&&"true"!=t.getAttribute("data-replaceState");history[t&&!l.replaceState&&k?"pushState":"replaceState"](null,document.title,x.replace(/^#/,"#&")+A)}O[w]||(O[w]=e,E!==w&&(O[E]=e,O["_"+w]=E));var j=p.callback;"string"==typeof j&&(j=p.root[j]),"function"==typeof j&&j.call(p.root,e,t,l,n),setTimeout(function(){history.popstate=!0},17)}}}},L.getCleanUrl=function(e,t,n){var r="",i="",a="";if(e)if(1==e.nodeType)if(e.action){if(r=e.getAttribute("action"),e.method&&"POST"==e.method.toUpperCase())return r;window.$&&$.fn&&$.fn.serialize?i=$(e).serialize():(i={},P.call(e.querySelectorAll("input,select,textarea")).forEach(function(e){if(e.name&&!e.disabled){var t=e.value.trim(),n=e.name;/^radio|checkbox/i.test(e.type)?e.checked&&(i[n]?i[n].push(t):i[n]=[t]):i[n]=[t]}}))}else{r=e.getAttribute("href"),i=e.getAttribute("data-formdata")||e.getAttribute("data-data")||"";var o="container",s=e.getAttribute("data-"+o);if(-1==i.indexOf(o)&&s){var c=o+"="+s;i=i?i+"&"+c:c}}else e.url&&(r=e.url,i=e.data);if(!(r=r||t))return"";if("object"==typeof(i=i||n||"")){var l=[];for(key in i)i[key].forEach||(i[key]=[i[key]]),i[key].forEach(function(e){l.push(key+"="+encodeURIComponent(e))});i=0<l.length?l.join("&"):""}return"?"==(a=r.split("#")[0].replace(/&+$/,"")).slice(-1)&&(a=a.split("?")[0]),""!=i&&(/\?/.test(a)?a=a+"&"+(i=i.replace(/^&|\?/,"")):""!=i&&(a=a+"?"+(i=i.replace("?","")))),a},L.createPage=function(e,t,n){var r=null,i=null,a=this.classPage,o=null;if(e){void 0===n&&"object"==typeof t&&(n=t),n=n||{};var s,c,l,u={};t&&(1==t.nodeType?((t.href||t.action)&&(s=t.getAttribute("data-title")||n.title),r=n.response,c=t.getAttribute("data-container"),i=document.getElementById(c),l=t.getAttribute("data-classpage"),o=(u.target=t).getAttribute("data-reload"),("form"==t.tagName.toLowerCase()||null!==o&&"false"!=o)&&(u.reload=!0),u.back="back"==t.getAttribute("data-rel"),"false"==t.getAttribute("data-history")&&(u.history=!1)):(r=t.response||n.response,s=t.title||n.title,i=t.container||n.container,l=t.classPage||n.classPage,u.target=t.target,"history"in t&&(u.history=t.history),u.back=t.back||n.back),i&&l&&(a=l));var p=(a==l?i:document).querySelector(".in."+a),f=null,d=document.createElement("div");"string"==typeof e?d.innerHTML=e:d.appendChild(e),1==L.evalScript&&1!=e.firstintoBind&&P.call(d.getElementsByTagName("script")).forEach(function(e){var t=e.innerHTML.trim(),n=e.getAttribute("type");if(""!=t.trim()&&!e.src){var r=document.getElementsByTagName("head")[0]||document.documentElement,i=document.createElement("script");n&&(i.type=n),i.appendChild(document.createTextNode(t)),setTimeout(function(){r.insertBefore(i,r.firstChild),r.removeChild(i),i=null},17),e=null}});var h=d.getElementsByTagName("title")[0];if((f=d.querySelector("."+a))||(d.className=a+" out",f=d),"string"==typeof s?f.setAttribute("data-title",s):h&&h.innerText&&f.setAttribute("data-title",h.innerText),u.response=r||e,u.id=this.getCleanUrl(t)||f.id||"unique"+Date.now(),~u.id.indexOf("?")){var m=u.id.split("?");u.id=m[0],u.formdata=m[1]}"object"==typeof n&&(void 0!==n.history&&(u.history=n.history),void 0!==n.remove&&(u.remove=n.remove),void 0!==n.target&&(u.target=n.target),void 0!==n.title&&(u.title=n.title)),a==l&&(u.history=!1,u.classPage=a),i=i||document.body;var g=f.id;g&&O[g]&&i.contains(O[g])?i.insertBefore(f,O[g]):i.appendChild(f),d=null,this.transition(f,p,u)}};var f=function(e){return(e||"").replace(/_sub.*$/g,"")},N=function(e){return!!e&&f(e)!==e};L.isDulicatePage=function(e,t){return!(!e||!t||e!=t&&f(e.id)!==f(t.id))},L.createDuplicatePage=function(n,r,i){if(!L.isDulicatePage(n,r)||!i)return[n,r];var a=f(n.id),e=[].slice.call(document.querySelectorAll("body > [id^="+a+"]")),o=e.length,s=e.map(function(e){return e.id}),c=function(e,t){return~s.indexOf(e+t)?c(e,t+1):e+t};if(1===o){var t=new RegExp("#&"+a+"(&|\\?)?","g");r.formdata=location.hash.replace(t,"")}return e.every(function(e,t){return e.formdata===i?(n=e,!1):(t===o-1&&((n=r.cloneNode(!0)).id=c(a+"_sub",t),n.classList.remove("in"),n.classList.add("out"),n.removeAttribute("style"),n.formdata=i,document.body.appendChild(n)),!0)}),[n,r]},L.getFunction=function(e){if("string"==typeof e){for(var t=l,n=e.split("."),r=0;r<n.length&&(t=t[n[r]]);r+=1);return t}},L.ajax=function(n){if(n){var e,t={url:"",type:"",dataType:"",data:{},timeout:1e4,async:!0,username:"",password:"",success:function(){},error:function(){},complete:function(){}},r={},i=null,a=null,o={};if(1==n.nodeType){for(key in o=R(n.getAttribute("data-params")||""),t)r[key]=n.getAttribute("data-"+key)||o[key]||t[key],"function"==typeof t[key]&&"string"==typeof r[key]&&(r[key]=this.getFunction(r[key]),"function"!=typeof r[key]&&(r[key]=t[key]));r.url=this.getCleanUrl(n,r.url),r.target=n,r.back="back"==n.getAttribute("data-rel");var s=n.tagName.toLowerCase();if("form"==s)r.type=n.method,a=new FormData(n);else if("a"==s){var c=n.getAttribute("data-container"),l=n.getAttribute("data-classpage"),u=c&&document.getElementById(c);u&&l&&l!=L.classPage&&(r.history=!1,r.title=!1)}"true"!=(e=n.getAttribute("data-mask"))&&""!=e||(i=n.querySelector("."+this.classMask))}else{if(!n.url)return;for(key2 in t)r[key2]=n[key2]||t[key2];r.url=this.getCleanUrl(null,r.url,r.data),r.title=n.title,r.back=n.back,r.container=n.container}var p=u||document.body;"string"!=typeof e&&(i=p.querySelector("."+this.classMask)),null==i&&((i=document.createElement("div")).className=this.classMask,i.innerHTML='<i class="loading"></i>',"string"==typeof e?n.appendChild(i):p.appendChild(i)),i.style.display="block";var f=new XMLHttpRequest;f.open(r.type||"GET",r.url+(/\?/.test(r.url)?"&":"?")+"r="+Date.now(),r.async,r.username,r.password),f.timeout=r.timeout,f.onload=function(){var t=null;if(200==f.status){if("json"==r.dataType||"JSON"==r.dataType)try{t=JSON.parse(f.response),r.response=t,setTimeout(function(){L.createPage(L.jsonHandle(t),n,r)},20)}catch(e){r.message="JSON parse error:"+e.message,r.error.call(r,f,f.status)}else if("unknown"==r.dataType){r.history=!1;try{t=JSON.parse(f.response),r.response=t,setTimeout(function(){L.createPage(L.jsonHandle(t),n,r)},20)}catch(e){t=f.response,setTimeout(function(){L.createPage(t,n,r)},20)}}else t=f.response,setTimeout(function(){L.createPage(t,n,r)},20);r.success.call(r,t,f.status)}else r.message="The status code exception!",r.error.call(r,f,f.status);r.complete.call(r,f,f.status),i.style.display="none"},f.onerror=function(e){r.message="Illegal request address or an unexpected network error!",r.error.call(r,f,f.status),i.style.display="none"},f.ontimeout=function(){r.message="The request timeout!",r.error.call(r,f,f.status),i.style.display="none"},f.setRequestHeader("Type","ajax"),f.setRequestHeader("From","mobilebone"),f.send(a)}},L.submit=function(e){if(e&&"string"==typeof e.action){var t=e.getAttribute("data-ajax");"false"==t||0==L.captureForm&&"true"!=t||e.addEventListener("submit",function(e){var t=this.getAttribute("data-preventdefault"),n=L.getFunction(t);if("function"==typeof n&&1==n(this))return e.preventDefault(),!1;L.ajax(this),e.preventDefault()})}},L.isBack=function(e,t){return 1==history.tempBack?!(history.tempBack=null):void 0===e||!!t},L.jsonHandle=function(e){return'<p style="text-align:center;">Dear master, if you see me, show that JSON parsing function is undefined!</p>'},L.init=function(e,t){if(1==p)return"Don't repeat initialization!";var n=location.hash.replace("#&","#"),r=null,i=null,a=null;if(t=t||{},~n.indexOf("?")&&(n=(a=n.split("?"))[0],t.formdata=a[1]),""==n||"#"==n||t.forceDefaultPage){var o=e&&"#"+e||"."+this.classPage;this.transition(document.querySelector(o),null,t)}else 1==u.test(n)&&(r=document.querySelector(f(n)))&&r.classList.contains(this.classPage)?(N(n)&&((r=this.createDuplicatePage(r,r,t.formdata)[0]).formdata=t.formdata,r.id=n.replace("#","")),this.transition(r,null,t)):(2==n.split("container=").length&&(i=document.getElementById(n.split("container=")[1].split("&")[0])),this.ajax({url:location.hash.replace("#&","#").replace("#",""),dataType:"unknown",container:i,error:function(){r=document.querySelector("."+L.classPage),L.transition(r)}}));var s=l.$||l.jQuery||l.Zepto;s&&s.fn&&s.fn.tap&&"ontouchstart"in window==1?(s(document).tap(this.handleTapEvent),document.addEventListener("click",function(e){var t=e.target;if(t&&("a"==t.tagName.toLowerCase()||(t=t.getParentElementByTag("a")))){var n=t.getAttribute("data-ajax"),r=t.href;"external"==t.getAttribute("data-rel")||"false"==n||r.replace("://","").split("/")[0]!==location.href.replace("://","").split("/")[0]&&"true"!=n||0==L.captureLink&&"true"!=n?/^http/i.test(r)&&(location.href=r):e.preventDefault()}})):document.addEventListener("click",this.handleTapEvent);var c=!!navigator.userAgent.match(/safari/i)&&!navigator.userAgent.match(/chrome/i)&&void 0!==document.hidden&&!window.chrome;"ontouchstart"in window==1&&c&&(document.addEventListener("touchmove",function(){history.popstateswipe=!0}),document.addEventListener("touchend",function(){history.popstateswipe=!1})),p=!0},L.handleTapEvent=function(e){var t,n=null;e&&1==e.nodeType&&((n=e).preventDefault=function(){}),(t=(n=n||e.target||e.touches[0]).href)&&0!=/a/i.test(n.tagName)||!(n=n.getParentElementByTag("a"))||(t=n.href);var r=document.querySelector(".in."+L.classPage);if(null!=r&&n){var i={target:n},a=n.getAttribute("data-preventdefault")||R(n.getAttribute("data-params")||"").preventdefault,o=L.getFunction(a);if("function"==typeof o&&1==o(n))return e.preventDefault(),!1;var s=n.getAttribute("data-formdata");s&&(i.formdata=s);var c=n.getElementsByClassName(L.classMask)[0];if(c&&"none"!=c.style.display)return e.preventDefault(),!1;var l=n.getAttribute("data-container"),u=n.getAttribute("data-classpage"),p=l&&document.getElementById(l);p&&u&&u!=L.classPage&&(r=p.querySelector(".in."+u)||p.querySelector(u),i.history=!1,i.title=!1,i.classPage=u);var f=1==L.captureLink,d=n.getAttribute("data-rel"),h=!1;"back"==d&&(h=!0);var m="external"==d;if(t)if(t=t.replace("#&","#"),""!==n.getAttribute("href").replace(/#/g,"")){if(/^javascript/.test(t)){if(0==h)return}else if((1==(m=m||t.replace("://","").split("/")[0]!==location.href.replace("://","").split("/")[0])||0==f)&&"true"!=n.getAttribute("data-ajax"))return;if(1==/^#/.test(n.getAttribute("href"))){var g,v,b=t.split("#")[1];b&&~b.indexOf("?")&&(b=(v=b.split("?"))[0],i.formdata=v[1]),g=b&&document.getElementById(b),0==h&&"auto"==d&&(h=L.isBack(g,r)),g&&(i.reload="true"==n.getAttribute("data-reload"),L.transition(g,r,h,i)),e.preventDefault()}else if(/^javascript/.test(t))history.tempBack=!0,history.back();else if("false"!=n.getAttribute("data-ajax")){var y=L.getCleanUrl(n).split("?")[0],_=n.getAttribute("data-reload");if(n.getAttribute("href"),null!=_&&"false"!=_||!O[y])L.ajax(n);else{0==h&&"auto"==d&&(h=L.isBack(O[y],r)),i.id=y;var w=p||document.body;0==w.contains(O[y])&&w.appendChild(O[y]),L.transition(O[y],r,h,i)}e.preventDefault()}}else e.preventDefault()}},Element.prototype.getParentElementByTag=function(t){if(!t)return null;var n=null,r=this,i=function(){if(!(r=r.parentElement))return null;var e=r.tagName.toLowerCase();e===t?n=r:"body"==e?n=null:i()};return i(),n};var R=function(e){var n={};return"string"==typeof e&&e.split("&").forEach(function(e){var t=e.split("=");1<t.length&&(n[t[0]]=e.replace(t[0]+"=",""))}),n};return window.addEventListener("popstate",function(){if(1==history.popstateswipe)return location.reload(),void(history.popstateswipe=!1);if(0!=history.popstate){var e,t=location.hash.replace("#&","").replace(/^#/,""),n=null,r=null,i="";if(~t.indexOf("?")&&(t=(e=t.split("?"))[0],i=e[1]),""==t){if((n=document.querySelector("."+L.classPage)).id)return}else{if(n=O[t],N(t)&&(!n||!document.getElementById(n.id))){var a=document.getElementById(f(t));(n=L.createDuplicatePage(a,a,i)[0]).formdata=i,n.id=t.replace("#","")}if(2==t.split("container=").length&&(r=document.getElementById(t.split("container=")[1].split("&")[0])),n&&0==u.test(t))return void L.transition(n,(r||document).querySelector(".in."+L.classPage),!0,{id:t,history:!1,container:r,formdata:i})}if(!n){if(0==u.test(t))return void L.ajax({url:location.hash.replace("#&","").replace(/^#/,""),dataType:"unknown",back:L.isBack(),container:r});n=document.querySelector("#"+t)}var o=document.querySelector(".in."+L.classPage);n&&n==o||0==L.pushStateEnabled||n&&L.transition(n,o,L.isBack(n,o),{id:t,history:!1,remove:!1,formdata:i})}else history.popstate=!0}),document.MBLOADED=!0,L}),function(){function s(i,e){var t;if(e=e||{},this.trackingClick=!1,this.trackingClickStart=0,this.targetElement=null,this.touchStartX=0,this.touchStartY=0,this.lastTouchIdentifier=0,this.touchBoundary=e.touchBoundary||10,this.layer=i,this.tapDelay=e.tapDelay||200,this.tapTimeout=e.tapTimeout||700,!s.notNeeded(i)){for(var n=["onMouse","onClick","onTouchStart","onTouchMove","onTouchEnd","onTouchCancel"],r=0,a=n.length;r<a;r++)this[n[r]]=o(this[n[r]],this);c&&(i.addEventListener("mouseover",this.onMouse,!0),i.addEventListener("mousedown",this.onMouse,!0),i.addEventListener("mouseup",this.onMouse,!0)),i.addEventListener("click",this.onClick,!0),i.addEventListener("touchstart",this.onTouchStart,!1),i.addEventListener("touchmove",this.onTouchMove,!1),i.addEventListener("touchend",this.onTouchEnd,!1),i.addEventListener("touchcancel",this.onTouchCancel,!1),Event.prototype.stopImmediatePropagation||(i.removeEventListener=function(e,t,n){var r=Node.prototype.removeEventListener;"click"===e?r.call(i,e,t.hijacked||t,n):r.call(i,e,t,n)},i.addEventListener=function(e,t,n){var r=Node.prototype.addEventListener;"click"===e?r.call(i,e,t.hijacked||(t.hijacked=function(e){e.propagationStopped||t(e)}),n):r.call(i,e,t,n)}),"function"==typeof i.onclick&&(t=i.onclick,i.addEventListener("click",function(e){t(e)},!1),i.onclick=null)}function o(e,t){return function(){return e.apply(t,arguments)}}}var e=0<=navigator.userAgent.indexOf("Windows Phone"),c=0<navigator.userAgent.indexOf("Android")&&!e,l=/iP(ad|hone|od)/.test(navigator.userAgent)&&!e,u=l&&/OS 4_\d(_\d)?/.test(navigator.userAgent),p=l&&/OS [6-7]_\d/.test(navigator.userAgent),i=0<navigator.userAgent.indexOf("BB10");s.prototype.needsClick=function(e){switch(e.nodeName.toLowerCase()){case"button":case"select":case"textarea":if(e.disabled)return!0;break;case"input":if(l&&"file"===e.type||e.disabled)return!0;break;case"label":case"iframe":case"video":return!0}return/\bneedsclick\b/.test(e.className)},s.prototype.needsFocus=function(e){switch(e.nodeName.toLowerCase()){case"textarea":return!0;case"select":return!c;case"input":switch(e.type){case"button":case"checkbox":case"file":case"image":case"radio":case"submit":return!1}return!e.disabled&&!e.readOnly;default:return/\bneedsfocus\b/.test(e.className)}},s.prototype.sendClick=function(e,t){var n,r;document.activeElement&&document.activeElement!==e&&document.activeElement.blur(),r=t.changedTouches[0],(n=document.createEvent("MouseEvents")).initMouseEvent(this.determineEventType(e),!0,!0,window,1,r.screenX,r.screenY,r.clientX,r.clientY,!1,!1,!1,!1,0,null),n.forwardedTouchEvent=!0,e.dispatchEvent(n)},s.prototype.determineEventType=function(e){return c&&"select"===e.tagName.toLowerCase()?"mousedown":"click"},s.prototype.focus=function(e){var t;l&&e.setSelectionRange&&0!==e.type.indexOf("date")&&"time"!==e.type&&"month"!==e.type?(t=e.value.length,e.setSelectionRange(t,t)):e.focus()},s.prototype.updateScrollParent=function(e){var t,n;if(!(t=e.fastClickScrollParent)||!t.contains(e)){n=e;do{if(n.scrollHeight>n.offsetHeight){t=n,e.fastClickScrollParent=n;break}n=n.parentElement}while(n)}t&&(t.fastClickLastScrollTop=t.scrollTop)},s.prototype.getTargetElementFromEventTarget=function(e){return e.nodeType===Node.TEXT_NODE?e.parentNode:e},s.prototype.onTouchStart=function(e){var t,n,r;if(1<e.targetTouches.length)return!0;if(t=this.getTargetElementFromEventTarget(e.target),n=e.targetTouches[0],l){if((r=window.getSelection()).rangeCount&&!r.isCollapsed)return!0;if(!u){if(n.identifier&&n.identifier===this.lastTouchIdentifier)return e.preventDefault(),!1;this.lastTouchIdentifier=n.identifier,this.updateScrollParent(t)}}return this.trackingClick=!0,this.trackingClickStart=e.timeStamp,this.targetElement=t,this.touchStartX=n.pageX,this.touchStartY=n.pageY,e.timeStamp-this.lastClickTime<this.tapDelay&&e.preventDefault(),!0},s.prototype.touchHasMoved=function(e){var t=e.changedTouches[0],n=this.touchBoundary;return Math.abs(t.pageX-this.touchStartX)>n||Math.abs(t.pageY-this.touchStartY)>n},s.prototype.onTouchMove=function(e){return this.trackingClick&&(this.targetElement!==this.getTargetElementFromEventTarget(e.target)||this.touchHasMoved(e))&&(this.trackingClick=!1,this.targetElement=null),!0},s.prototype.findControl=function(e){return void 0!==e.control?e.control:e.htmlFor?document.getElementById(e.htmlFor):e.querySelector("button, input:not([type=hidden]), keygen, meter, output, progress, select, textarea")},s.prototype.onTouchEnd=function(e){var t,n,r,i,a,o=this.targetElement;if(!this.trackingClick)return!0;if(e.timeStamp-this.lastClickTime<this.tapDelay)return this.cancelNextClick=!0;if(e.timeStamp-this.trackingClickStart>this.tapTimeout)return!0;if(this.cancelNextClick=!1,this.lastClickTime=e.timeStamp,n=this.trackingClickStart,this.trackingClick=!1,this.trackingClickStart=0,p&&(a=e.changedTouches[0],(o=document.elementFromPoint(a.pageX-window.pageXOffset,a.pageY-window.pageYOffset)||o).fastClickScrollParent=this.targetElement.fastClickScrollParent),"label"===(r=o.tagName.toLowerCase())){if(t=this.findControl(o)){if(this.focus(o),c)return!1;o=t}}else if(this.needsFocus(o))return 100<e.timeStamp-n||l&&window.top!==window&&"input"===r?this.targetElement=null:(this.focus(o),this.sendClick(o,e),l&&"select"===r||(this.targetElement=null,e.preventDefault())),!1;return!(!l||u||!(i=o.fastClickScrollParent)||i.fastClickLastScrollTop===i.scrollTop)||(this.needsClick(o)||(e.preventDefault(),this.sendClick(o,e)),!1)},s.prototype.onTouchCancel=function(){this.trackingClick=!1,this.targetElement=null},s.prototype.onMouse=function(e){return!(this.targetElement&&!e.forwardedTouchEvent&&e.cancelable&&(!this.needsClick(this.targetElement)||this.cancelNextClick)&&(e.stopImmediatePropagation?e.stopImmediatePropagation():e.propagationStopped=!0,e.stopPropagation(),e.preventDefault(),1))},s.prototype.onClick=function(e){var t;return this.trackingClick?(this.targetElement=null,!(this.trackingClick=!1)):"submit"===e.target.type&&0===e.detail||((t=this.onMouse(e))||(this.targetElement=null),t)},s.prototype.destroy=function(){var e=this.layer;c&&(e.removeEventListener("mouseover",this.onMouse,!0),e.removeEventListener("mousedown",this.onMouse,!0),e.removeEventListener("mouseup",this.onMouse,!0)),e.removeEventListener("click",this.onClick,!0),e.removeEventListener("touchstart",this.onTouchStart,!1),e.removeEventListener("touchmove",this.onTouchMove,!1),e.removeEventListener("touchend",this.onTouchEnd,!1),e.removeEventListener("touchcancel",this.onTouchCancel,!1)},s.notNeeded=function(e){var t,n,r;if(void 0===window.ontouchstart)return!0;if(n=+(/Chrome\/([0-9]+)/.exec(navigator.userAgent)||[,0])[1]){if(!c)return!0;if(t=document.querySelector("meta[name=viewport]")){if(-1!==t.content.indexOf("user-scalable=no"))return!0;if(31<n&&document.documentElement.scrollWidth<=window.outerWidth)return!0}}if(i&&10<=(r=navigator.userAgent.match(/Version\/([0-9]*)\.([0-9]*)/))[1]&&3<=r[2]&&(t=document.querySelector("meta[name=viewport]"))){if(-1!==t.content.indexOf("user-scalable=no"))return!0;if(document.documentElement.scrollWidth<=window.outerWidth)return!0}return"none"===e.style.msTouchAction||"manipulation"===e.style.touchAction||!!(27<=+(/Firefox\/([0-9]+)/.exec(navigator.userAgent)||[,0])[1]&&(t=document.querySelector("meta[name=viewport]"))&&(-1!==t.content.indexOf("user-scalable=no")||document.documentElement.scrollWidth<=window.outerWidth))||"none"===e.style.touchAction||"manipulation"===e.style.touchAction},s.attach=function(e,t){return new s(e,t)},"function"==typeof define&&"object"==typeof define.amd&&define.amd?define("fastclick",[],function(){return s}):"undefined"!=typeof module&&module.exports?(module.exports=s.attach,module.exports.FastClick=s):window.FastClick=s}(),define("juicer",[],function(){return function(){var p=function(){var i=[].slice.call(arguments);return i.push(p.options),i[0].match(/^\s*#([\w:\-\.]+)\s*$/gim)&&i[0].replace(/^\s*#([\w:\-\.]+)\s*$/gim,function(e,t){var n=document,r=n&&n.getElementById(t);i[0]=r?r.value||r.innerHTML:e}),1==arguments.length?p.compile.apply(p,i):2<=arguments.length?p.to_html.apply(p,i):void 0},t={escapehash:{"<":"&lt;",">":"&gt;","&":"&amp;",'"':"&quot;","'":"&#x27;","/":"&#x2f;"},escapereplace:function(e){return t.escapehash[e]},escaping:function(e){return"string"!=typeof e?e:e.replace(/[&<>"]/gim,this.escapereplace)},detection:function(e){return void 0===e?"":e}},r=function(e){if("undefined"!=typeof console){if(console.warn)return void console.warn(e);if(console.log)return void console.log(e)}throw e},i=function(e,t){if((e=e!==Object(e)?{}:e).__proto__)return e.__proto__=t,e;var n=function(){},r=Object.create?Object.create(t):(n.prototype=t,new n);for(var i in e)e.hasOwnProperty(i)&&(r[i]=e[i]);return r};p.__cache={},p.version="0.6.5-stable",p.settings={},p.tags={operationOpen:"{@",operationClose:"}",interpolateOpen:"\\${",interpolateClose:"}",noneencodeOpen:"\\$\\${",noneencodeClose:"}",commentOpen:"\\{#",commentClose:"\\}"},p.options={cache:!0,strip:!0,errorhandling:!0,detection:!0,_method:i({__escapehtml:t,__throw:r,__juicer:p},{})},p.tagInit=function(){var e=p.tags.operationOpen+"each\\s*([^}]*?)\\s*as\\s*(\\w*?)\\s*(,\\s*\\w*?)?"+p.tags.operationClose,t=p.tags.operationOpen+"\\/each"+p.tags.operationClose,n=p.tags.operationOpen+"if\\s*([^}]*?)"+p.tags.operationClose,r=p.tags.operationOpen+"\\/if"+p.tags.operationClose,i=p.tags.operationOpen+"else"+p.tags.operationClose,a=p.tags.operationOpen+"else if\\s*([^}]*?)"+p.tags.operationClose,o=p.tags.interpolateOpen+"([\\s\\S]+?)"+p.tags.interpolateClose,s=p.tags.noneencodeOpen+"([\\s\\S]+?)"+p.tags.noneencodeClose,c=p.tags.commentOpen+"[^}]*?"+p.tags.commentClose,l=p.tags.operationOpen+"each\\s*(\\w*?)\\s*in\\s*range\\(([^}]+?)\\s*,\\s*([^}]+?)\\)"+p.tags.operationClose,u=p.tags.operationOpen+"include\\s*([^}]*?)\\s*,\\s*([^}]*?)"+p.tags.operationClose;p.settings.forstart=new RegExp(e,"igm"),p.settings.forend=new RegExp(t,"igm"),p.settings.ifstart=new RegExp(n,"igm"),p.settings.ifend=new RegExp(r,"igm"),p.settings.elsestart=new RegExp(i,"igm"),p.settings.elseifstart=new RegExp(a,"igm"),p.settings.interpolate=new RegExp(o,"igm"),p.settings.noneencode=new RegExp(s,"igm"),p.settings.inlinecomment=new RegExp(c,"igm"),p.settings.rangestart=new RegExp(l,"igm"),p.settings.include=new RegExp(u,"igm")},p.tagInit(),p.set=function(e,t){var r=this,n=function(e,t){var n=e.match(/^tag::(.*)$/i);if(n)return r.tags[n[1]]=t.replace(/[\$\(\)\[\]\+\^\{\}\?\*\|\.]/gim,function(e){return"\\"+e}),void r.tagInit();r.options[e]=t};if(2!==arguments.length){if(e===Object(e))for(var i in e)e.hasOwnProperty(i)&&n(i,e[i])}else n(e,t)},p.register=function(e,t){var n=this.options._method;return!n.hasOwnProperty(e)&&(n[e]=t)},p.unregister=function(e){var t=this.options._method;if(t.hasOwnProperty(e))return delete t[e]},p.template=function(e){var r=this;this.options=e,this.__interpolate=function(e,t,n){var r,i=e.split("|"),a=i[0]||"";return 1<i.length&&(e=i.shift(),a="_method."+(r=i.shift().split(",")).shift()+".call({}, "+[e].concat(r)+")"),"<%= "+(t?"_method.__escapehtml.escaping":"")+"("+(n&&!1===n.detection?"":"_method.__escapehtml.detection")+"("+a+")) %>"},this.__removeShell=function(e,n){var a=0;return e=e.replace(p.settings.forstart,function(e,t,n,r){n=n||"value",r=r&&r.substr(1);var i="i"+a++;return"<% ~function() {for(var "+i+" in "+t+") {if("+t+".hasOwnProperty("+i+")) {var "+n+"="+t+"["+i+"];"+(r?"var "+r+"="+i+";":"")+" %>"}).replace(p.settings.forend,"<% }}}(); %>").replace(p.settings.ifstart,function(e,t){return"<% if("+t+") { %>"}).replace(p.settings.ifend,"<% } %>").replace(p.settings.elsestart,function(e){return"<% } else { %>"}).replace(p.settings.elseifstart,function(e,t){return"<% } else if("+t+") { %>"}).replace(p.settings.noneencode,function(e,t){return r.__interpolate(t,!1,n)}).replace(p.settings.interpolate,function(e,t){return r.__interpolate(t,!0,n)}).replace(p.settings.inlinecomment,"").replace(p.settings.rangestart,function(e,t,n,r){var i="j"+a++;return"<% ~function() {for(var "+i+"="+n+";"+i+"<"+r+";"+i+"++) {{var "+t+"="+i+"; %>"}).replace(p.settings.include,function(e,t,n){return"<%= _method.__juicer("+t+", "+n+"); %>"}),n&&!1===n.errorhandling||(e="<% try { %>"+e,e+='<% } catch(e) {_method.__throw("Juicer Render Exception: "+e.message);} %>'),e},this.__toNative=function(e,t){return this.__convert(e,!t||t.strip)},this.__lexicalAnalyze=function(e){var n=[],r=[],t="",i=["if","each","_","_method","console","break","case","catch","continue","debugger","default","delete","do","finally","for","function","in","instanceof","new","return","switch","this","throw","try","typeof","var","void","while","with","null","typeof","class","enum","export","extends","import","super","implements","interface","let","package","private","protected","public","static","yield","const","arguments","true","false","undefined","NaN"],a=function(e,t){if(Array.prototype.indexOf&&e.indexOf===Array.prototype.indexOf)return e.indexOf(t);for(var n=0;n<e.length;n++)if(e[n]===t)return n;return-1},o=function(e,t){if(t=t.match(/\w+/gim)[0],-1===a(n,t)&&-1===a(i,t)&&-1===a(r,t)){if("undefined"!=typeof window&&"function"==typeof window[t]&&window[t].toString().match(/^\s*?function \w+\(\) \{\s*?\[native code\]\s*?\}\s*?$/i))return e;if("undefined"!=typeof global&&"function"==typeof global[t]&&global[t].toString().match(/^\s*?function \w+\(\) \{\s*?\[native code\]\s*?\}\s*?$/i))return e;if("function"==typeof p.options._method[t]||p.options._method.hasOwnProperty(t))return r.push(t),e;n.push(t)}return e};e.replace(p.settings.forstart,o).replace(p.settings.interpolate,o).replace(p.settings.ifstart,o).replace(p.settings.elseifstart,o).replace(p.settings.include,o).replace(/[\+\-\*\/%!\?\|\^&~<>=,\(\)\[\]]\s*([A-Za-z_]+)/gim,o);for(var s=0;s<n.length;s++)t+="var "+n[s]+"=_."+n[s]+";";for(s=0;s<r.length;s++)t+="var "+r[s]+"=_method."+r[s]+";";return"<% "+t+" %>"},this.__convert=function(e,t){var n=[].join("");return n+="'use strict';",n+="var _=_||{};",(n+="var _out='';_out+='")+(!1!==t?e.replace(/\\/g,"\\\\").replace(/[\r\t\n]/g," ").replace(/'(?=[^%]*%>)/g,"\t").split("'").join("\\'").split("\t").join("'").replace(/<%=(.+?)%>/g,"';_out+=$1;_out+='").split("<%").join("';").split("%>").join("_out+='")+"';return _out;":e.replace(/\\/g,"\\\\").replace(/[\r]/g,"\\r").replace(/[\t]/g,"\\t").replace(/[\n]/g,"\\n").replace(/'(?=[^%]*%>)/g,"\t").split("'").join("\\'").split("\t").join("'").replace(/<%=(.+?)%>/g,"';_out+=$1;_out+='").split("<%").join("';").split("%>").join("_out+='")+"';return _out.replace(/[\\r\\n]\\s+[\\r\\n]/g, '\\r\\n');")},this.parse=function(e,t){var n=this;return t&&!1===t.loose||(e=this.__lexicalAnalyze(e)+e),e=this.__removeShell(e,t),e=this.__toNative(e,t),this._render=new Function("_, _method",e),this.render=function(e,t){return t&&t===r.options._method||(t=i(t,r.options._method)),n._render.call(this,e,t)},this}},p.compile=function(e,t){t&&t===this.options||(t=i(t,this.options));try{var n=this.__cache[e]?this.__cache[e]:new this.template(this.options).parse(e,t);return t&&!1===t.cache||(this.__cache[e]=n),n}catch(e){return r("Juicer Compile Exception: "+e.message),{render:function(){}}}},p.to_html=function(e,t,n){return n&&n===this.options||(n=i(n,this.options)),this.compile(e,n).render(t,n._method)},"undefined"!=typeof module&&module.exports?module.exports=p:this.juicer=p}(),juicer}),define("mApi/event",function(){var t={},e=function(e){if(e&&t[e])return t[e];var i={};(t[e]=this).on=function(e,t){if(!e||!t)return this;var n=i[e]||[];return n.ready&&t(),i[e]=n,i[e].push(t),this},this.off=function(e,t){return e||t?(e.split(",").forEach(function(e){!function(e,t){var n=i[e];if(n){if(t){var r=n.indexOf(t);~r&&n.splice(r,1)}else delete i[e];i[e]&&i[e].length||(n.ready=!1)}}(e.trim(),t)}),this):i={}},this.trigger=function(e){var t=[].slice.call(arguments,1),n=i[e];return n||(i[e]=n=[]),n.ready=!0,n.forEach(function(e){e.apply(null,t)}),this}};return e.getInstance=function(e){return t[e]},e}),define("mUtil",["mobilebone","juicer","mApi/event"],function(Mobilebone){String.prototype.replaceAll=function(e,t){if(void 0!==e&&void 0!==t)return this.replace(new RegExp(e,"gm"),t)};var __meta__=window.__meta__||{user:{},pageParams:{},globalVars:{}};__meta__.multiLangLabels=null;var type=function(t){return function(e){return{}.toString.call(e)=="[object "+t+"]"}},isString=type("String"),isObject=type("Object"),isFunction=type("Function"),isArray=type("Array"),isBoolean=type("Boolean"),isElement=function(e){return isObject(e)&&1==e.nodeType},isEmpty=function(e){return null==e||""===e},completeUrl=function(e){return 0==e.indexOf("/")&&__meta__.serverPath&&(e=__meta__.serverPath+e),__meta__.sessionKey&&(e=util.addParam(e,"sessionkey",__meta__.sessionKey)),(-1!=e.indexOf("/mobilemode/api/")||-1!=e.indexOf("/mobilemode/apps/")&&-1!=e.indexOf(".jsp"))&&(e=util.addParam(e,"appid",__meta__.appid)),__meta__.wechatUser&&__meta__.wechatUser.openid&&(e=util.addParam(e,"wechatopenid",__meta__.wechatUser.openid),e=util.addParam(e,"wechatopenid".toUpperCase(),__meta__.wechatUser.openid)),e},regexpUtils={variablesExp:new RegExp("{(.*?)}"),varparserExp:new RegExp("\\$m\\.(\\w{1,})(\\(([^\\(\\)]*)\\))??(\\.(\\w{1,}))??;","gi")},ua=navigator.userAgent,util={runtime:{isEmobile:function(){return!!navigator.userAgent.match(/e-mobile/i)},isEmobile6:function(){return this.isEmobile()&&!this.isEmobile7()},isEmobile7:function(){return!!navigator.userAgent.match(/e-mobile(7|\/7)/i)},isWechat:function(){return!!navigator.userAgent.match(/MicroMessenger/i)},isWxwork:function(){return!!navigator.userAgent.match(/wxwork/i)},isWebkit:function(){return"WebkitAppearance"in document.documentElement.style||void 0!==document.webkitHidden}},checkEmpJsApi:function(e){return!this.runtime.isEmobile6()&&window.em&&this.isFunction(em.checkJsApi)&&em.checkJsApi(e)},invokeEmApi:function(e){var t=[].slice.call(arguments).slice(1);em.ready(function(){em[e].apply(em,t)})},getOSType:function(){return/Android/i.test(ua)?"ANDROID":/OS [0-9_]+ like Mac OS X/i.test(ua)?"IOS":/Windows NT|Mac OS X|Linux/i.test(ua)?"PC":"UNKNOWN"},getClientType:function(){var e=this.runtime;return e.isEmobile()?"EMOBILE":e.isWechat()?"WECHAT":"undefined"!=typeof DingTalkPC?"DING_TALk":/Trident|Presto|AppleWebKit|Gecko/i.test(ua)?"WEB_BROWSER":"UNKNOWN"},action:function(e,t,n){return"function"==typeof t&&(n=t,t=null),n=n||function(){},util.ajax(e,t,n)},log:function(e){},ajax:function(e,t,n,r){"function"==typeof t&&(r=n,n=t,t=null);var i={url:completeUrl(e),data:t,type:"GET",success:function(e){n&&n(e)}};return $.extend(i,r),$.ajax(i)},getJSON:function(r,e,i,t){var a=this;"function"==typeof e&&(t=i,i=e,e=null);var o=function(e){a.console.error(e),"function"==typeof t&&t.call(this,e)};return r=completeUrl(r),$.get(r,e,function(e){if(null!=e&&""!=$.trim(e)){var t;if("1"==(t=isObject(e)?e:JSON.parse(e)).status)i.call(this,t);else{var n=t.errMsg;n?o(n):a.getLabel(383311,"服务器处理请求时出现异常",function(e){o(e)})}}else console.error("url:"+r+"\n预期返回json,但是返回了空")})},jionActionUrl:function(e,t){return 0!=(t=t||"").indexOf("&")&&(t="&"+t),"/mobilemode/mobile/server.jsp?invoker="+e+t},addParam:function(e,t,n){return-1==e.indexOf(t+"=",e.indexOf("?"))&&(e+=(-1==e.indexOf("?")?"?":"&")+t+"="+n),e},getCurrPageParam:function(){return this.getPageParam(this.getCurrentPageId())},getPageParam:function(e){return __meta__.pageParams[e]||{}},setPageParam:function(e,t){__meta__.pageParams[e]=t},getGlobalVars:function(){return __meta__.globalVars||{}},getActionUrl:function(e,t,n){var r,i="";-1==e.indexOf(".")?(i="com.api.mobilemode.web.mobile.component."+e+"Action",r=n?this.getPageParam(n):this.getCurrPageParam(),t=$.extend(!0,{},r,t)):i="com.api.mobilemode.web.mobile."+e+"Action";var a="";for(var o in t)a+="&"+o+"="+t[o];return this.jionActionUrl(i,a)},parseTemplate:function(e,t){var n=require("juicer");return t.hasOwnProperty("timestamp")||(t.timestamp=(new Date).valueOf()),n(e,t)},isIOS:function(){return navigator.userAgent.match(/iPhone|iPad/i)},back:function(){history.go(-1)},eval:function(e,t){if(!e)return!0;var n=this.isFunction(e),r=[].slice.call(arguments).slice(2);t="'"+(t=t||this.getCurrentPageId()||"")+"'";try{var i=function(e){return new Function("\t\t\t\t\t\treturn (function (z) {\n\t\t\t\t\t\t    var _this = this;\t\t\t\t\t\t\tvar _u = require('mUtil'); \n\t\t\t\t\t\t\tvar Mobilebone = require('mobilebone');\n\t\t\t\t\t\t\tvar $ = function () {\n\t\t\t\t\t\t\t\tvar args = [].slice.call(arguments);\n\t\t\t\t\t\t\t\tvar pageIn = "+t+" ? z('#' + "+t+") : document.querySelector('.in.' + Mobilebone.classPage); \n\t\t\t\t\t\t\t\targs[0] = _u.parseIdToAttrSelector(args[0]); \n\t\t\t\t\t\t\t\targs.push(pageIn);\n\t\t\t\t\t\t\t\treturn z.apply(z, args);\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\tvar $load = function (fn) {\n\t\t\t\t\t\t\t\t_u.onload("+t+", fn);\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\tvar $pluginLoad = function (comId, fn) { \n\t\t\t\t\t\t\t\t_u.pluginLoad("+t+", comId, fn); \n\t\t\t\t\t\t\t}; \n\t\t\t\t\t\t\tvar $p = function (name) { return window.$p(name,"+t+");} \n\t\t\t\t\t\t\tvar $f = function (name, rowindex, pageid) { if(new String(rowindex).indexOf('page_') == 0) { pageid = rowindex; rowindex = undefined; } return window.$f(name, rowindex, pageid ? pageid :"+t+");} \n\t\t\t\t\t\t\tvar $sql = function (sql, sqlParams, datasource, callback) { return Mobile_NS.SQL(sql, sqlParams, datasource, callback,"+t+");} \n\t\t\t\t\t\t\tObject.keys(z).forEach(function (key) {\n\t\t\t\t\t\t\t\t$[key] = z[key];\n\t\t\t\t\t\t\t});\n"+e.replace(/Mobile_NS\.SQL/g,"$sql")+"\n}).call(this, Zepto)")},a=window,o="";return event&&event.target&&(a=event.target,o="window._event = window.event;"),n?(r=r.reduce(function(e,t){return(isObject(t)||isArray(t)||isString(t))&&(t=JSON.stringify(t)),e+","+t},""),i(o+"return ("+e.toString()+").call(this"+r+")").call(a)):i(o+e).call(a)}catch(e){return this.console.error(e),!1}},parseIdToAttrSelector:function(e){return/^#\d.*/.test(e)?"[id='"+(e=e.replace(/^#/,""))+"']":e},getCurrentPageId:function(){var e=__meta__.appHomepageId;if(e)return e;var t=document.querySelector(".in."+Mobilebone.classPage);return t&&t.id},setCurrentPageId:function(e){__meta__.appHomepageId=e},getPageIntId:function(e){return e.replace(/.*_([0-9]+).*/g,"$1")},getInstance:function(e,t){return require("Component").getInstance(e,t)},getDetailTableInstance:function(r,e,i){var a,o=this;return i=i||this.getCurrentPageId(),r&&$(e?".wev-comp-DetailTable[data-form='"+e+"']":".wev-comp-DetailTable",$("#"+i)).forEach(function(e){var t=e.id.replace("NMEC_",""),n=o.getInstance(t,i);n.viewModel.table.name.toLowerCase()==r.toLowerCase()&&(a=n)}),a},UUID:function(){var e="xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)});return/^[a-zA-Z]/.test(e)?e:this.UUID()},getCurrUser:function(){return __meta__.user.id},getUserLanguage:function(){var e=__meta__.user.languageId||7;return-1==e?7:e},getCurrDept:function(){return __meta__.user.deptId},getCurrDeptName:function(){return __meta__.user.deptName},getCurrSubCompany:function(){return __meta__.user.subCompanyId},getCurrSubCompanyName:function(){return __meta__.user.subCompanyName},getCurrJobtitle:function(){return __meta__.user.jobtitleId},getCurrJobtitleName:function(){return __meta__.user.jobtitleName},getCurrLoginId:function(){return __meta__.user.loginid},getCurrWorkCode:function(){return __meta__.user.workcode},getCurrUserName:function(){return __meta__.user.userName},getAppid:function(){return __meta__.appid},getResourceVersion:function(){return __meta__.resourceVersion},getSessionKey:function(){return __meta__.sessionKey},setSessionKey:function(e){__meta__.sessionKey=e},getClientDeviceId:function(){return __meta__.clientDeviceId||""},dateToStr:function(e,t){var n={"M+":e.getMonth()+1,"d+":e.getDate(),"h+":e.getHours()%12==0?12:e.getHours()%12,"H+":e.getHours(),"m+":e.getMinutes(),"s+":e.getSeconds(),"q+":Math.floor((e.getMonth()+3)/3),S:e.getMilliseconds()};for(var r in/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(e.getFullYear()+"").substr(4-RegExp.$1.length))),/(E+)/.test(t)&&(t=t.replace(RegExp.$1,(1<RegExp.$1.length?2<RegExp.$1.length?"星期":"周":"")+"日一二三四五六".charAt(e.getDay()))),n)new RegExp("("+r+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?n[r]:("00"+n[r]).substr((""+n[r]).length)));return t},getCurrDate:function(){return util.dateToStr(new Date,"yyyy-MM-dd")},getCurrTime:function(e){return util.dateToStr(new Date,e?"HH:mm:ss":"HH:mm")},getCurrDateTime:function(){return util.dateToStr(new Date,"yyyy-MM-dd HH:mm:ss")},getCurrWeek:function(){var e=(new Date).getDay();return{7:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],8:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],9:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"]}[util.getUserLanguage()][e]},getWechatUserInfo:function(){return __meta__.wechatUser},fmtParamValue:function(e,t){switch(e){case"{PAGE_NO}":e=t.pageNo;break;case"{PAGE_SIZE}":e=t.pageSize;break;case"{SEARCH_KEY}":e=t.searchKey||"";break;case"{CURRUSER}":e=this.getCurrUser();break;case"{CURRDEPT}":e=this.getCurrDept();break;case"{CURRDEPTSUB}":e=this.getCurrSubCompany();break;case"{CURRDATE}":e=this.getCurrDate();break;default:var n=new RegExp("^param\\((.*?)\\).*?","g"),r=e.match(n);if(!r)return e;r=r[0].replace(n,"$1").replace(/["']/g,""),e=Mobile_NS.getParameter(r)}return e},getPageId:function(e){return"page_"+e},getHomepageId:function(){return $(".page[data-homepage]").attr("id")},getPageScriptPath:function(e){return"/mobilemode/mobile/page/app"+this.getAppid()+"/js/page/page"+e+".js?v="+this.getResourceVersion()},getPageScript:function(e){var t=this.getPageScriptPath(e);return this.require(t)},require:function(e){var t=$.Deferred();return this.isString(e)&&(e=[e]),require(e,t.resolve),t},getComponentOpt:function(e,t){var r=$.Deferred(),n=this.getPageIntId(t);return this.getPageScript(n).then(function(t){var n={};Object.keys(t.props).forEach(function(e){-1!=Object.keys(t.props[e]).indexOf("tabs")&&(t.props[e].tabs||[]).forEach(function(e){e.tabContent&&e.tabContent.forEach(function(e){e.el&&(n[e.el]=e.option||{})})})}),$.extend(t.props,n),r.resolve(t.props[e])}),r},getComponent:function(e){var t=$.Deferred();return require([e],function(e){t.resolve(e)}),t},parseUrl:function(e){var t,n,r,i;if(0==(e=e||"").indexOf("/mobilemode/appHomepageView.jsp")){var a,o=e.indexOf("&");-1!=o?(r=e.substring(o+1),a=e.substring(0,o)):(a=e,r=""),i=a.replace("/mobilemode/appHomepageView.jsp?appHomepageId=",""),t="#"+this.getPageId(i),n=!0}else 0==e.indexOf("javascript:")&&(e=e.replaceAll("\n","").replaceAll("'","\\'"),e="javascript:Mobile_NS.eval('"+(e=encodeURIComponent(e))+"');"),t=e,n=!(i="-1"),r="";return[t,n,r,i]},strToFunc:function(e,t){try{return new Function(t||[],e)}catch(e){return console.error(e),new Function}},strToParamJSON:function(e,t){t||(t=";");var n={};if(this.isString(e))for(var r=e.split(t),i=0;i<r.length;i++){var a=r[i],o=a.indexOf("=");if(-1!=o){var s=a.substring(0,o),c=a.substring(o+1);n[s]=c}}else this.isObject(e)&&(n=e);return n},onload:function(e,t){new(require("mApi/event"))(e).on("load",t)},pluginLoad:function(n,e,s){if(this.isFunction(s)||this.isFunction(e)){var t=[],r=$.Deferred();this.isString(e)?(t=e.split(",").map($.trim),r.resolve(t)):this.isFunction(e)&&(s=e,this.onload(n,function(){var e=require("Component").getPageComs(n);t=e.map(function(e){return e.id}),r.resolve(t)})),r.then(function(e){var t=e.length;if(!t)return s();e.forEach(function(e){var r,i,a,o;r=n,i=e,a=function(){!--t&&s()},(o=new(require("mApi/event"))(r+"_"+i)).on("load",function(){var e=require("Component"),t=e.getInstance(i,r),n=e.status;return t.dataload?n.DATALOAD===t.status?a():void o.on("dataload",a):a()})})})}},unload:function(e){this.unbind(e,"dataload, load")},unbind:function(r,i){var a=require("mApi/event"),e=require("Component").getPageComs(r);new a(r).off("load"),e.forEach(function(e){var t=r+"_"+e.id,n=a.getInstance(t);n&&n.off(i||"")})},trigger:function(e,t,n,r){var i=require("mApi/event"),a=t||this.getCurrentPageId();if(n){if("dataload"===e){var o=require("Component"),s=o.getInstance(n),c=o.status;s&&s.updateStatus(c.DATALOAD)}a+="_"+n}var l=new i(a);l.trigger.apply(l,[e].concat(r||[]))},isTel:function(e){return/(\+\d+)?1[34578]\d{9}$/.test(e)||/^((0\d{2,3})-)(\d{7,8})(-(\d{3,}))?$/.test(e)},console:{error:function(e){return console?console.error?console.error(e):console.log?console.log("%c error: "+e,"color: red"):void Mobile_NS.alert(e):Mobile_NS.alert(e)}},vetically:function(e){return $(e).css({position:"absolute",top:"50%",width:"100%",bottom:"auto",transform:"translateY(-50%)"})},toPixel:function(e,t){return isNaN(e)||(e+="px"),t?t+":"+e+";":e},parseJSON:function(e,t){return e=JSON.stringify(e),t=JSON.stringify(t||""),JSON.parse("{"+e+":"+t+"}")},concat:function(e,t){return e.push.apply(e,t)},replaceJSON:function(o,replace,skip){var t=this;if(skip=skip||function(){return!1},isString(o))return replace(o);if(isFunction(o)){var str=o.toString(),repStr=replace(str);return str===repStr?o:eval("(function() { return "+repStr+";})();")}return isArray(o)?o=o.map(function(e){return t.replaceJSON(e,replace,skip)}):isObject(o)&&Object.keys(o).forEach(function(e){skip(e)||(o[e]=t.replaceJSON(o[e],replace,skip))}),o},replaceVal:function(e,r,i){var a=this;if(!e)return e;if(this.isObject(r)){r=$.extend({},r);var t="";for(var n in r)t+=t?"|"+n:n,i||(r[n.toLowerCase()]=r[n]);t&&(e=e.replace(new RegExp("{("+t+")}","g"+(i?"":"i")),function(e,t){i||(t=t.toLowerCase());var n=null===r[t]||void 0===r[t]?"":r[t];return(a.isObject(n)||a.isArray(n))&&(n=JSON.stringify(n)),n}))}return e},containsVarParser:function(e){var t=regexpUtils.varparserExp;return t.lastIndex=0,e&&t.test(e)},renderVarParser:function(e,t){e?require(["varParseHelper"],function(e){e.parse(t)}):t&&t()},replaceVarParser:function(e){if(!e)return e;var t,n=regexpUtils.varparserExp,r=["convertToAudio","convertToCircleProgressBar"];n.lastIndex=0;for(var i=__meta__.varparser=__meta__.varparser||{s:{},t:{}};null!=(t=n.exec(e));){var a=t[0];if(!a.match("{(\\w+)(\\.(\\w{1,}))??}")){var o="";!~r.indexOf(a.match(/\$m\.(\w{1,})\(/)[1])&&Object.keys(i.s).every(function(e){return i.s[e]!==a||(o=e,!1)}),!o&&(o="var_"+this.UUID())&&(i.s[o]=a),e=e.replace(a,"<em class='"+o+"' style='display:none;'></em>")}}return e},replaceValAndVarParser:function(e,t){return this.replaceVarParser(this.replaceVariables(this.replaceVal(e,t)))},replaceSysVars:function(e){var n={curruser:this.getCurrUser(),currdept:this.getCurrDept(),currdeptname:this.getCurrDeptName(),currdeptsub:this.getCurrSubCompany(),currdeptsubname:this.getCurrSubCompanyName(),currjobtitle:this.getCurrJobtitle(),currjobtitlename:this.getCurrJobtitleName(),currloginid:this.getCurrLoginId(),currworkcode:this.getCurrWorkCode(),currdate:this.getCurrDate(),currtime:this.getCurrTime(),currtimesec:this.getCurrTime(!0),currdatetime:this.getCurrDateTime(),currusername:this.getCurrUserName(),currweekday:this.getCurrWeek(),uuid:this.UUID(),deviceId:this.getClientDeviceId()};return $.each(this.getWechatUserInfo(),function(e,t){n["wechat"+e]=t}),$.each(this.getGlobalVars(),function(e,t){n["globalVar_"+e]=t}),this.replaceVal(e,n)},replacePageParam:function(e,t){var n=t?this.getPageParam(t):this.getCurrPageParam();return this.replaceVal(e,n,!0)},replaceVariables:function(e,t){return e.match("{(\\w+)}")?(e=this.replaceSysVars(e),e=this.replacePageParam(e,t)):e},containsVariables:function(e){return e&&regexpUtils.variablesExp.test(e)},getMultiLabel:function(n,r){var i=this,a=__meta__.multiLangLabels,o=i.isFunction(r),s={},c=function(){Object.keys(n).forEach(function(e){var t;s[e]=(a[t=e]||{label:n[t]}).label})};if(a)c(),o&&r(s);else{var e=i.getActionUrl("service.MobileLanguage",{action:"getLabels"});this.ajax(e,function(e){var t={};1==e.status?(e.datas.forEach(function(e){t[e.id]=e}),a=__meta__.multiLangLabels=t,c()):(s=n,i.console.error(e.errMsg)),o&&r(s)},{type:"GET",dataType:"json",async:o})}return s},getLabel:function(t,e,n){t=String(t);var r=this.isFunction(n),i=this.parseJSON(t,e);return r?this.getMultiLabel(i,function(e){n(e[t])}):this.getMultiLabel(i,n)[t]},getKeyValue:function(key,o){return eval("o."+key)},replaceI18n:function(e){var n=require("i18n");return e.replace(/\$i18n{(.*?)}/g,function(e,t){return n[t]})},replaceAttachUrl:function(e){return __meta__.sessionKey?e.replace(/\/weaver\/weaver.file.FileDownload\?fileid=/g,"/mobile/plugin/Download.jsp?sessionkey="+__meta__.sessionKey+"&url="):e},getAttachUrl:function(e,t){var n=__meta__.sessionKey?"/mobile/plugin/Download.jsp?sessionkey="+__meta__.sessionKey+"&url="+e+"&from=mobilemode":"/weaver/weaver.file.FileDownload?fileid="+e+"&_fromMobilemode=1";return t&&(n+=t),n},previewFile:function(e,t,n){var r=this.getAttachUrl(e,n),i=[],a=util.getOSType(),o=t.substring(t.lastIndexOf("."));"ANDROID"==a?i=[".jpg",".png",".gif",".bmp",".dib",".jfif",".jpe",".jpeg",".flac",".mp3",".mp4",".m4v",".txt",".xml",".css",".html",".htm",".shtml"]:"IOS"==a&&(i=[".doc",".docx",".xls",".xlsx",".ppt",".pptx"]),this.checkEmpJsApi("openLink")?-1!=i.indexOf(o)?this.invokeEmApi("openLink",{title:t,url:r,openType:2}):location.href=r:this.runtime.isEmobile6()?location.href="/download.do?fileid="+e+"&module=3&scope=11&filename="+encodeURIComponent(t):location.href=r,$("audio").length&&require(["audioHelper"],function(e){e.pauseAllAudios(),e.reloadAudios($("audio"))})},canPullToRefresh:function(e){var t=$("#"+e),n=t.closest(".wev-tab-panel"),r=function(){var e=$(this).data("type");return!~["FloatButton"].indexOf(e)},i=t.closest(".page-scroller").children("abbr").filter(r),a=!!n.length,o=i.length;if(0!=o){var s=i.get(o-1).id,c=e===s;if(!a)return c;if(c=n.closest("abbr").get(0).id===s){var l=n.children("abbr").filter(r),u=l.length;return e===l.get(u-1).id}return!1}},compressByLZ:function(e){var t,n,r,i={},a="",o=[],s=Math.pow(2,16),c=e.length;for(t=0;t<c;t+=1)r=a+(n=e.charAt(t)),a=i.hasOwnProperty(r)?r:(a&&!i[a]&&(i[a]=a.charCodeAt()),i[a]&&(o.push(i[a]),i[r]=s++),String(n));return""!==a&&o.push(i[a]||a.charCodeAt()),o.join(",")},isString:isString,isElement:isElement,isObject:isObject,isFunction:isFunction,isArray:isArray,isBoolean:isBoolean,completeUrl:completeUrl,isEmpty:isEmpty};return util}),define("i18n",[],function(){return{7:{FIELDS_MUST_FILLED:"以下字段必填:",CONFIRM_DEL_DATA:"确认删除数据?",NO_DATA:"没有数据显示",PHOTOGRAPH:"拍照",SELECT_IMAGE:"添加图片",SELECT_FILE:"点击选择上传文件",LOAD_MORE:"加载更多",ADD:"新增",SELECTED:"已选",SELECT_ALL:"全选",DELETE:"删除",LOADING_DATA:"正在加载...",NO_PERMISSION_ACCESS:"无权限访问",RECENTLY:"最近",SAME_DEPARTMENT:"同部门",ORGANIZATION:"组织",SUBORDINATES:"下属",COMMON_GORUP:"常用组",ALL:"所有",HRM_BRORSER_TIP:"请输入姓名/首字母/电话",SEAECH:"搜索",SURE:"确定",RESET:"重置",CANCEL:"取消",MAIN_FIELD:"主表字段:",DETAIL_FIELD:"明细字段:",SAVE_IMAGE:"保存图片",SAVE_SUCCESS:"保存成功",IMAGE_LOADING_ERROER:"图片加载异常",SUBJECT_STRUCTURE:"按科目结构",BY_LIST:"按列表",COMMENT:"评论",REPLY:"回复",DOCUMENT:"文档",WORKFLOW:"流程",CUSTOMER:"客户",PROJECT:"项目",ATTACH:"附件",NETWORK_ERROR:"网络请求失败,请稍后重试!",FILTER:"筛选",IMG_DRAWING_TIP:"图片过长,请使用双指进行滚动操作",PER_PAGE:"每页",TOTAL:"共",ITEMS:"条",MOBILE_OR_PHONE_TIP:"请输入正确手机号或固定电话!",UNSELECT_ALL:"全不选"},8:{FIELDS_MUST_FILLED:"The following fields must be filled:",CONFIRM_DEL_DATA:"Confirm delete data?",NO_DATA:"No data to display",LOAD_MORE:"Load more",PHOTOGRAPH:"Photograph",SELECT_IMAGE:"Add image",SELECT_FILE:"Add file",LOAD_MORE:"Load more",ADD:"Add",SELECTED:"Selected",SELECT_ALL:"Select all",DELETE:"Delete",LOADING_DATA:"Loading...",NO_PERMISSION_ACCESS:"no permission access",RECENTLY:"Recently",SAME_DEPARTMENT:"The same department",ORGANIZATION:"Organization",SUBORDINATES:"Subordinates",COMMON_GORUP:"Common group",ALL:"All",HRM_BRORSER_TIP:"Please enter your name / initials / telephone number",SEAECH:"Search",SURE:"Sure",RESET:"Reset",CANCEL:"Cancel",MAIN_FIELD:"Main field: ",DETAIL_FIELD:"Detail field: ",SAVE_IMAGE:"Save Image",SAVE_SUCCESS:"successful",IMAGE_LOADING_ERROER:"Image loading error ",SUBJECT_STRUCTURE:"Subject structure",BY_LIST:"By list",COMMENT:"Comment",REPLY:"@",DOCUMENT:"Document",WORKFLOW:"Workflow",CUSTOMER:"Customer",PROJECT:"Project",ATTACH:"Attachment",NETWORK_ERROR:"The network request failed. It is recommended that WiFi be submitted again to the GOod network area or the connection room.",FILTER:"Filter",IMG_DRAWING_TIP:"Please use double fingers to scroll the long picture.",PER_PAGE:"Per page",TOTAL:"total",ITEMS:"items",MOBILE_OR_PHONE_TIP:"Please enter the correct cell phone number or landline number!",UNSELECT_ALL:"Unselect All"},9:{FIELDS_MUST_FILLED:"以下字段必填:",CONFIRM_DEL_DATA:"確認刪除數據?",NO_DATA:"没有数据",PHOTOGRAPH:"拍照",SELECT_IMAGE:"添加圖片",SELECT_FILE:"點擊選擇上傳文件",LOAD_MORE:"加載更多",ADD:"新增",SELECTED:"已選",SELECT_ALL:"全選",DELETE:"删除",LOADING_DATA:"正在加載...",NO_PERMISSION_ACCESS:"無許可權訪問",RECENTLY:"最近",SAME_DEPARTMENT:"同部門",ORGANIZATION:"組織",SUBORDINATES:"下屬",COMMON_GORUP:"常用組",ALL:"所有",HRM_BRORSER_TIP:"請輸入姓名/首字母/電話",SEAECH:"蒐索",SURE:"確定",RESET:"重置",CANCEL:"取消",MAIN_FIELD:"主表字段:",DETAIL_FIELD:"明細字段:",SAVE_IMAGE:"保存圖片",SAVE_SUCCESS:"保存成功",IMAGE_LOADING_ERROER:"圖片加載出錯",SUBJECT_STRUCTURE:"按科目結構",BY_LIST:"按列表",COMMENT:"評論",REPLY:"回復",DOCUMENT:"文檔",WORKFLOW:"流程",CUSTOMER:"客戶",PROJECT:"項目",ATTACH:"附件",NETWORK_ERROR:"網絡請求失敗,建議到網速良好區域或連接室內wifi再次進行提交操作!",FILTER:"篩選",IMG_DRAWING_TIP:"圖片過長,請使用雙指進行滾動操作",PER_PAGE:"每頁",TOTAL:"共",ITEMS:"條",MOBILE_OR_PHONE_TIP:"請輸入正確手機號或固定電話!",UNSELECT_ALL:"全不選"},init:function(e){var t=this,n=this[e];Object.keys(this[e]).forEach(function(e){t[e]=n[e]})}}}),define("zepto",[],function(){var Zepto=function(){function c(e){return null==e?String(e):H[$.call(e)]||"object"}function o(e){return"function"==c(e)}function a(e){return null!=e&&e==e.window}function s(e){return null!=e&&e.nodeType==e.DOCUMENT_NODE}function i(e){return"object"==c(e)}function l(e){return i(e)&&!a(e)&&Object.getPrototypeOf(e)==Object.prototype}function u(e){var t=!!e&&"length"in e&&e.length,n=_.type(e);return"function"!=n&&!a(e)&&("array"==n||0===t||"number"==typeof t&&0<t&&t-1 in e)}function p(e){return e.replace(/::/g,"/").replace(/([A-Z]+)([A-Z][a-z])/g,"$1_$2").replace(/([a-z\d])([A-Z])/g,"$1_$2").replace(/_/g,"-").toLowerCase()}function n(e){return e in t?t[e]:t[e]=new RegExp("(^|\\s)"+e+"(\\s|$)")}function f(e,t){return"number"!=typeof t||j[p(e)]?t:t+"px"}function r(e){return"children"in e?C.call(e.children):_.map(e.childNodes,function(e){return 1==e.nodeType?e:void 0})}function d(e,t){return null==t?_(e):_(e).filter(t)}function h(e,t,n,r){return o(t)?t.call(e,n,r):t}function m(e,t,n){null==n?e.removeAttribute(t):e.setAttribute(t,n)}function g(e,t){var n=e.className||"",r=n&&n.baseVal!==b;return t===b?r?n.baseVal:n:void(r?n.baseVal=t:e.className=t)}function v(t){try{return t?"true"==t||"false"!=t&&("null"==t?null:+t+""==t?+t:/^[\[\{]/.test(t)?_.parseJSON(t):t):t}catch(e){return t}}var b,y,_,w,E,S,T=[],C=T.slice,x=T.filter,A=window.document,k={},t={},j={"column-count":1,columns:1,"font-weight":1,"line-height":1,opacity:1,"z-index":1,zoom:1},L=/^\s*<(\w+|!)[^>]*>/,O=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,P=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,D=/^(?:body|html)$/i,I=/([A-Z])/g,N=["val","css","html","text","data","width","height","offset"],e=A.createElement("table"),R=A.createElement("tr"),M={tr:A.createElement("tbody"),tbody:e,thead:e,tfoot:e,td:R,th:R,"*":A.createElement("div")},F=/complete|loaded|interactive/,U=/^[\w-]*$/,H={},$=H.toString,q={},B=A.createElement("div"),V={tabindex:"tabIndex",readonly:"readOnly",for:"htmlFor",class:"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},W=Array.isArray||function(e){return e instanceof Array};return q.matches=function(e,t){if(!t||!e||1!==e.nodeType)return!1;var n=e.matches||e.webkitMatchesSelector||e.mozMatchesSelector||e.oMatchesSelector||e.matchesSelector;if(n)return n.call(e,t);var r,i=e.parentNode,a=!i;return a&&(i=B).appendChild(e),r=~q.qsa(i,t).indexOf(e),a&&B.removeChild(e),r},E=function(e){return e.replace(/-+(.)?/g,function(e,t){return t?t.toUpperCase():""})},S=function(n){return x.call(n,function(e,t){return n.indexOf(e)==t})},q.fragment=function(e,t,n){var r,i,a;return O.test(e)&&(r=_(A.createElement(RegExp.$1))),r||(e.replace&&(e=e.replace(P,"<$1></$2>")),t===b&&(t=L.test(e)&&RegExp.$1),t in M||(t="*"),(a=M[t]).innerHTML=""+e,r=_.each(C.call(a.childNodes),function(){a.removeChild(this)})),l(n)&&(i=_(r),_.each(n,function(e,t){-1<N.indexOf(e)?i[e](t):i.attr(e,t)})),r},q.Z=function(e,t){return(e=e||[]).__proto__=_.fn,e.selector=t||"",e},q.isZ=function(e){return e instanceof q.Z},q.init=function(e,t){var n,r;if(!e)return q.Z();if("string"==typeof e)if("<"==(e=e.trim())[0]&&L.test(e))n=q.fragment(e,RegExp.$1,t),e=null;else{if(t!==b)return _(t).find(e);n=q.qsa(A,e)}else{if(o(e))return _(A).ready(e);if(q.isZ(e))return e;if(W(e))r=e,n=x.call(r,function(e){return null!=e});else if(i(e))n=[e],e=null;else if(L.test(e))n=q.fragment(e.trim(),RegExp.$1,t),e=null;else{if(t!==b)return _(t).find(e);n=q.qsa(A,e)}}return q.Z(n,e)},(_=function(e,t){return q.init(e,t)}).extend=function(t){var n,e=C.call(arguments,1);return"boolean"==typeof t&&(n=t,t=e.shift()),e.forEach(function(e){!function e(t,n,r){for(y in n)r&&(l(n[y])||W(n[y]))?(l(n[y])&&!l(t[y])&&(t[y]={}),W(n[y])&&!W(t[y])&&(t[y]=[]),e(t[y],n[y],r)):n[y]!==b&&(t[y]=n[y])}(t,e,n)}),t},q.qsa=function(e,t){var n,r="#"==t[0],i=!r&&"."==t[0],a=r||i?t.slice(1):t,o=U.test(a);return s(e)&&o&&r?(n=e.getElementById(a))?[n]:[]:1!==e.nodeType&&9!==e.nodeType?[]:C.call(o&&!r?i?e.getElementsByClassName(a):e.getElementsByTagName(t):e.querySelectorAll(t))},_.contains=A.documentElement.contains?function(e,t){return e!==t&&e.contains(t)}:function(e,t){for(;t&&(t=t.parentNode);)if(t===e)return!0;return!1},_.type=c,_.isFunction=o,_.isWindow=a,_.isArray=W,_.isPlainObject=l,_.isEmptyObject=function(e){var t;for(t in e)return!1;return!0},_.inArray=function(e,t,n){return T.indexOf.call(t,e,n)},_.camelCase=E,_.trim=function(e){return null==e?"":String.prototype.trim.call(e)},_.uuid=0,_.support={},_.expr={},_.map=function(e,t){var n,r,i,a,o=[];if(u(e))for(r=0;r<e.length;r++)null!=(n=t(e[r],r))&&o.push(n);else for(i in e)null!=(n=t(e[i],i))&&o.push(n);return 0<(a=o).length?_.fn.concat.apply([],a):a},_.each=function(e,t){var n,r;if(u(e)){for(n=0;n<e.length;n++)if(!1===t.call(e[n],n,e[n]))return e}else for(r in e)if(!1===t.call(e[r],r,e[r]))return e;return e},_.grep=function(e,t){return x.call(e,t)},window.JSON&&(_.parseJSON=JSON.parse),_.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(e,t){H["[object "+t+"]"]=t.toLowerCase()}),_.fn={forEach:T.forEach,reduce:T.reduce,push:T.push,sort:T.sort,indexOf:T.indexOf,concat:T.concat,map:function(n){return _(_.map(this,function(e,t){return n.call(e,t,e)}))},slice:function(){return _(C.apply(this,arguments))},ready:function(e){return F.test(A.readyState)&&A.body?e(_):A.addEventListener("DOMContentLoaded",function(){e(_)},!1),this},get:function(e){return e===b?C.call(this):this[0<=e?e:e+this.length]},toArray:function(){return this.get()},size:function(){return this.length},remove:function(){return this.each(function(){null!=this.parentNode&&this.parentNode.removeChild(this)})},each:function(n){return T.every.call(this,function(e,t){return!1!==n.call(e,t,e)}),this},filter:function(t){return o(t)?this.not(this.not(t)):_(x.call(this,function(e){return q.matches(e,t)}))},add:function(e,t){return _(S(this.concat(_(e,t))))},is:function(e){return 0<this.length&&q.matches(this[0],e)},not:function(t){var n=[];if(o(t)&&t.call!==b)this.each(function(e){t.call(this,e)||n.push(this)});else{var r="string"==typeof t?this.filter(t):u(t)&&o(t.item)?C.call(t):_(t);this.forEach(function(e){r.indexOf(e)<0&&n.push(e)})}return _(n)},has:function(e){return this.filter(function(){return i(e)?_.contains(this,e):_(this).find(e).size()})},eq:function(e){return-1===e?this.slice(e):this.slice(e,+e+1)},first:function(){var e=this[0];return e&&!i(e)?e:_(e)},last:function(){var e=this[this.length-1];return e&&!i(e)?e:_(e)},find:function(e){var n=this;return e?"object"==typeof e?_(e).filter(function(){var t=this;return T.some.call(n,function(e){return _.contains(e,t)})}):1==this.length?_(q.qsa(this[0],e)):this.map(function(){return q.qsa(this,e)}):_()},closest:function(n,r){var i=[],a="object"==typeof n&&_(n);return this.each(function(e,t){for(;t&&!(a?0<=a.indexOf(t):q.matches(t,n));)t=t!==r&&!s(t)&&t.parentNode;t&&i.indexOf(t)<0&&i.push(t)}),_(i)},parents:function(e){for(var t=[],n=this;0<n.length;)n=_.map(n,function(e){return(e=e.parentNode)&&!s(e)&&t.indexOf(e)<0?(t.push(e),e):void 0});return d(t,e)},parent:function(e){return d(S(this.pluck("parentNode")),e)},children:function(e){return d(this.map(function(){return r(this)}),e)},contents:function(){return this.map(function(){return C.call(this.childNodes)})},siblings:function(e){return d(this.map(function(e,t){return x.call(r(t.parentNode),function(e){return e!==t})}),e)},empty:function(){return this.each(function(){this.innerHTML=""})},pluck:function(t){return _.map(this,function(e){return e[t]})},show:function(){return this.each(function(){var e,t,n;"none"==this.style.display&&(this.style.display=""),"none"==getComputedStyle(this,"").getPropertyValue("display")&&(this.style.display=(e=this.nodeName,k[e]||(t=A.createElement(e),A.body.appendChild(t),n=getComputedStyle(t,"").getPropertyValue("display"),t.parentNode.removeChild(t),"none"==n&&(n="block"),k[e]=n),k[e]))})},replaceWith:function(e){return this.before(e).remove()},wrap:function(t){var n=o(t);if(this[0]&&!n)var r=_(t).get(0),i=r.parentNode||1<this.length;return this.each(function(e){_(this).wrapAll(n?t.call(this,e):i?r.cloneNode(!0):r)})},wrapAll:function(e){if(this[0]){_(this[0]).before(e=_(e));for(var t;(t=e.children()).length;)e=t.first();_(e).append(this)}return this},wrapInner:function(i){var a=o(i);return this.each(function(e){var t=_(this),n=t.contents(),r=a?i.call(this,e):i;n.length?n.wrapAll(r):t.append(r)})},unwrap:function(){return this.parent().each(function(){_(this).replaceWith(_(this).children())}),this},clone:function(){return this.map(function(){return this.cloneNode(!0)})},hide:function(){return this.css("display","none")},toggle:function(t){return this.each(function(){var e=_(this);(t===b?"none"==e.css("display"):t)?e.show():e.hide()})},prev:function(e){return _(this.pluck("previousElementSibling")).filter(e||"*")},next:function(e){return _(this.pluck("nextElementSibling")).filter(e||"*")},html:function(n){return 0 in arguments?this.each(function(e){var t=this.innerHTML;_(this).empty().append(h(this,n,e,t))}):0 in this?this[0].innerHTML:null},text:function(n){return 0 in arguments?this.each(function(e){var t=h(this,n,e,this.textContent);this.textContent=null==t?"":""+t}):0 in this?this.pluck("textContent").join(""):null},attr:function(t,n){var e;return"string"!=typeof t||1 in arguments?this.each(function(e){if(1===this.nodeType)if(i(t))for(y in t)m(this,y,t[y]);else m(this,t,h(this,n,e,this.getAttribute(t)))}):this.length&&1===this[0].nodeType?!(e=this[0].getAttribute(t))&&t in this[0]?this[0][t]:e:b},removeAttr:function(e){return this.each(function(){1===this.nodeType&&e.split(" ").forEach(function(e){m(this,e)},this)})},prop:function(t,n){return t=V[t]||t,1 in arguments?this.each(function(e){this[t]=h(this,n,e,this[t])}):this[0]&&this[0][t]},data:function(e,t){var n="data-"+e.replace(I,"-$1").toLowerCase(),r=1 in arguments?this.attr(n,t):this.attr(n);return null!==r?v(r):b},val:function(t){return 0 in arguments?(null==t&&(t=""),this.each(function(e){this.value=h(this,t,e,this.value)})):this[0]&&(this[0].multiple?_(this[0]).find("option").filter(function(){return this.selected}).pluck("value"):this[0].value)},offset:function(a){if(a)return this.each(function(e){var t=_(this),n=h(this,a,e,t.offset()),r=t.offsetParent().offset(),i={top:n.top-r.top,left:n.left-r.left};"static"==t.css("position")&&(i.position="relative"),t.css(i)});if(!this.length)return null;if(A.documentElement!==this[0]&&!_.contains(A.documentElement,this[0]))return{top:0,left:0};var e=this[0].getBoundingClientRect();return{left:e.left+window.pageXOffset,top:e.top+window.pageYOffset,width:Math.round(e.width),height:Math.round(e.height)}},css:function(e,t){if(arguments.length<2){var n=this[0];if("string"==typeof e){if(!n)return;return n.style[E(e)]||getComputedStyle(n,"").getPropertyValue(e)}if(W(e)){if(!n)return;var r={},i=getComputedStyle(n,"");return _.each(e,function(e,t){r[t]=n.style[E(t)]||i.getPropertyValue(t)}),r}}var a="";if("string"==c(e))t||0===t?a=p(e)+":"+f(e,t):this.each(function(){this.style.removeProperty(p(e))});else for(y in e)e[y]||0===e[y]?a+=p(y)+":"+f(y,e[y])+";":this.each(function(){this.style.removeProperty(p(y))});return this.each(function(){this.style.cssText+=";"+a})},index:function(e){return e?this.indexOf(_(e)[0]):this.parent().children().indexOf(this[0])},hasClass:function(e){return!!e&&T.some.call(this,function(e){return this.test(g(e))},n(e))},addClass:function(n){return n?this.each(function(e){if("className"in this){w=[];var t=g(this);h(this,n,e,t).split(/\s+/g).forEach(function(e){_(this).hasClass(e)||w.push(e)},this),w.length&&g(this,t+(t?" ":"")+w.join(" "))}}):this},removeClass:function(t){return this.each(function(e){if("className"in this){if(t===b)return g(this,"");w=g(this),h(this,t,e,w).split(/\s+/g).forEach(function(e){w=w.replace(n(e)," ")}),g(this,w.trim())}})},toggleClass:function(n,r){return n?this.each(function(e){var t=_(this);h(this,n,e,g(this)).split(/\s+/g).forEach(function(e){(r===b?!t.hasClass(e):r)?t.addClass(e):t.removeClass(e)})}):this},scrollTop:function(e){if(this.length){var t="scrollTop"in this[0];return e===b?t?this[0].scrollTop:this[0].pageYOffset:this.each(t?function(){this.scrollTop=e}:function(){this.scrollTo(this.scrollX,e)})}},scrollLeft:function(e){if(this.length){var t="scrollLeft"in this[0];return e===b?t?this[0].scrollLeft:this[0].pageXOffset:this.each(t?function(){this.scrollLeft=e}:function(){this.scrollTo(e,this.scrollY)})}},position:function(){if(this.length){var e=this[0],t=this.offsetParent(),n=this.offset(),r=D.test(t[0].nodeName)?{top:0,left:0}:t.offset();return n.top-=parseFloat(_(e).css("margin-top"))||0,n.left-=parseFloat(_(e).css("margin-left"))||0,r.top+=parseFloat(_(t[0]).css("border-top-width"))||0,r.left+=parseFloat(_(t[0]).css("border-left-width"))||0,{top:n.top-r.top,left:n.left-r.left}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent||A.body;e&&!D.test(e.nodeName)&&"static"==_(e).css("position");)e=e.offsetParent;return e})}},_.fn.detach=_.fn.remove,["width","height"].forEach(function(r){var i=r.replace(/./,function(e){return e[0].toUpperCase()});_.fn[r]=function(t){var e,n=this[0];return t===b?a(n)?n["inner"+i]:s(n)?n.documentElement["scroll"+i]:(e=this.offset())&&e[r]:this.each(function(e){(n=_(this)).css(r,h(this,t,e,n[r]()))})}}),["after","prepend","before","append"].forEach(function(t,o){var s=o%2;_.fn[t]=function(){var n,r,i=_.map(arguments,function(e){var t=[];return"array"==(n=c(e))?(e.forEach(function(e){return e.nodeType!==b?t.push(e):_.zepto.isZ(e)?t=t.concat(e.get()):void(t=t.concat(q.fragment(e)))}),t):"object"==n||null==e?e:q.fragment(e)}),a=1<this.length;return i.length<1?this:this.each(function(e,t){r=s?t:t.parentNode,t=0==o?t.nextSibling:1==o?t.firstChild:2==o?t:null;var n=_.contains(A.documentElement,r);i.forEach(function(e){if(a)e=e.cloneNode(!0);else if(!r)return _(e).remove();r.insertBefore(e,t),n&&function e(t,n){n(t);for(var r=0,i=t.childNodes.length;r<i;r++)e(t.childNodes[r],n)}(e,function(e){if(!(null==e.nodeName||"SCRIPT"!==e.nodeName.toUpperCase()||e.type&&"text/javascript"!==e.type||e.src)){var t=e.ownerDocument?e.ownerDocument.defaultView:window;t.eval.call(t,e.innerHTML)}})})})},_.fn[s?t+"To":"insert"+(o?"Before":"After")]=function(e){return _(e)[t](this),this}}),q.Z.prototype=_.fn,q.uniq=S,q.deserializeValue=v,_.zepto=q,_}(),rx,sx,mw,ew,fw,Mv;return window.Zepto=Zepto,void 0===window.$&&(window.$=Zepto),function(u){function p(e){return e._zid||(e._zid=t++)}function o(e,t,n,r){if((t=f(t)).ns)var i=(a=t.ns,new RegExp("(?:^| )"+a.replace(" "," .* ?")+"(?: |$)"));var a;return(E[p(e)]||[]).filter(function(e){return e&&(!t.e||e.e==t.e)&&(!t.ns||i.test(e.ns))&&(!n||p(e.fn)===p(n))&&(!r||e.sel==r)})}function f(e){var t=(""+e).split(".");return{e:t[0],ns:t.slice(1).sort().join(" ")}}function d(e,t){return e.del&&!n&&e.e in r||!!t}function h(e){return S[e]||n&&r[e]||e}function l(i,e,t,a,o,s,c){var n=p(i),l=E[n]||(E[n]=[]);e.split(/\s/).forEach(function(e){if("ready"==e)return u(document).ready(t);var n=f(e);n.fn=t,n.sel=o,n.e in S&&(t=function(e){var t=e.relatedTarget;return!t||t!==this&&!u.contains(this,t)?n.fn.apply(this,arguments):void 0});var r=(n.del=s)||t;n.proxy=function(e){if(!(e=g(e)).isImmediatePropagationStopped()){e.data=a;var t=r.apply(i,e._args==b?[e]:[e].concat(e._args));return!1===t&&(e.preventDefault(),e.stopPropagation()),t}},n.i=l.length,l.push(n),"addEventListener"in i&&i.addEventListener(h(n.e),n.proxy,d(n,c))})}function m(t,e,n,r,i){var a=p(t);(e||"").split(/\s/).forEach(function(e){o(t,e,n,r).forEach(function(e){delete E[a][e.i],"removeEventListener"in t&&t.removeEventListener(h(e.e),e.proxy,d(e,i))})})}function g(r,i){return(i||!r.isDefaultPrevented)&&(i||(i=r),u.each(e,function(e,t){var n=i[e];r[e]=function(){return this[t]=s,n&&n.apply(i,arguments)},r[t]=T}),r.timeStamp||(r.timeStamp=Date.now()),(i.defaultPrevented!==b?i.defaultPrevented:"returnValue"in i?!1===i.returnValue:i.getPreventDefault&&i.getPreventDefault())&&(r.isDefaultPrevented=s)),r}function v(e){var t,n={originalEvent:e};for(t in e)i.test(t)||e[t]===b||(n[t]=e[t]);return g(n,e)}var b,t=1,y=Array.prototype.slice,_=u.isFunction,w=function(e){return"string"==typeof e},E={},a={},n="onfocusin"in window,r={focus:"focusin",blur:"focusout"},S={mouseenter:"mouseover",mouseleave:"mouseout"};a.click=a.mousedown=a.mouseup=a.mousemove="MouseEvents",u.event={add:l,remove:m},u.proxy=function(e,t){var n=2 in arguments&&y.call(arguments,2);if(_(e)){var r=function(){return e.apply(t,n?n.concat(y.call(arguments)):arguments)};return r._zid=p(e),r}if(w(t))return n?(n.unshift(e[t],e),u.proxy.apply(null,n)):u.proxy(e[t],e);throw new TypeError("expected function")},u.fn.bind=function(e,t,n){return this.on(e,t,n)},u.fn.unbind=function(e,t){return this.off(e,t)},u.fn.one=function(e,t,n,r){return this.on(e,t,n,r,1)};var s=function(){return!0},T=function(){return!1},i=/^([A-Z]|returnValue$|layer[XY]$|webkitMovement[XY]$)/,e={preventDefault:"isDefaultPrevented",stopImmediatePropagation:"isImmediatePropagationStopped",stopPropagation:"isPropagationStopped"};u.fn.delegate=function(e,t,n){return this.on(t,e,n)},u.fn.undelegate=function(e,t,n){return this.off(t,e,n)},u.fn.live=function(e,t){return u(document.body).delegate(this.selector,e,t),this},u.fn.die=function(e,t){return u(document.body).undelegate(this.selector,e,t),this},u.fn.on=function(t,i,n,a,o){var s,c,r=this;return t&&!w(t)?(u.each(t,function(e,t){r.on(e,i,n,t,o)}),r):(w(i)||_(a)||!1===a||(a=n,n=i,i=b),(a===b||!1===n)&&(a=n,n=b),!1===a&&(a=T),r.each(function(e,r){o&&(s=function(e){return m(r,e.type,a),a.apply(this,arguments)}),i&&(c=function(e){var t,n=u(e.target).closest(i,r).get(0);return n&&n!==r?(t=u.extend(v(e),{currentTarget:n,liveFired:r}),(s||a).apply(n,[t].concat(y.call(arguments,1)))):void 0}),l(r,t,a,n,i,c||s)}))},u.fn.off=function(e,n,t){var r=this;return e&&!w(e)?(u.each(e,function(e,t){r.off(e,n,t)}),r):(w(n)||_(t)||!1===t||(t=n,n=b),!1===t&&(t=T),r.each(function(){m(this,e,t,n)}))},u.fn.trigger=function(e,t){return(e=w(e)||u.isPlainObject(e)?u.Event(e):g(e))._args=t,this.each(function(){e.type in r&&"function"==typeof this[e.type]?this[e.type]():"dispatchEvent"in this?this.dispatchEvent(e):u(this).triggerHandler(e,t)})},u.fn.triggerHandler=function(n,r){var i,a;return this.each(function(e,t){(i=v(w(n)?u.Event(n):n))._args=r,i.target=t,u.each(o(t,n.type||n),function(e,t){return a=t.proxy(i),!i.isImmediatePropagationStopped()&&void 0})}),a},"focusin focusout focus blur load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select keydown keypress keyup error".split(" ").forEach(function(t){u.fn[t]=function(e){return 0 in arguments?this.bind(t,e):this.trigger(t)}}),u.Event=function(e,t){w(e)||(e=(t=e).type);var n=document.createEvent(a[e]||"Events"),r=!0;if(t)for(var i in t)"bubbles"==i?r=!!t[i]:n[i]=t[i];return n.initEvent(e,r,!0),g(n)}}(Zepto),function(kh){function mh(e,t,n,r){return e.global?(i=t||Ch,a=n,o=r,s=kh.Event(a),kh(i).trigger(s,o),!s.isDefaultPrevented()):void 0;var i,a,o,s}function ph(e,t){var n=t.context;return!1!==t.beforeSend.call(n,e,t)&&!1!==mh(t,n,"ajaxBeforeSend",[e,t])&&void mh(t,n,"ajaxSend",[e,t])}function qh(e,t,n,r){var i=n.context,a="success";n.success.call(i,e,a,t),r&&r.resolveWith(i,[e,a,t]),mh(n,i,"ajaxSuccess",[t,n,e]),sh(a,t,n)}function rh(e,t,n,r,i){var a=r.context;r.error.call(a,n,t,e),i&&i.rejectWith(a,[n,t,e]),mh(r,a,"ajaxError",[n,r,e||t]),sh(t,n,r)}function sh(e,t,n){var r,i=n.context;n.complete.call(i,t,e),mh(n,i,"ajaxComplete",[t,n]),(r=n).global&&!--kh.active&&mh(r,null,"ajaxStop")}function th(){}function vh(e,t){return""==t?e:(e+"&"+t).replace(/[&?]{1,2}/,"?")}function xh(e,t,n,r){return kh.isFunction(t)&&(r=n,n=t,t=void 0),kh.isFunction(n)||(r=n,n=void 0),{url:e,data:t,success:n,dataType:r}}var zh,Ah,Bh=+new Date,Ch=window.document,Dh=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,Eh=/^(?:text|application)\/javascript/i,Fh=/^(?:text|application)\/xml/i,Gh="application/json",Hh="text/html",Ih=/^\s*$/,Jh=Ch.createElement("a");Jh.href=window.location.href,kh.active=0,kh.ajaxJSONP=function(n,r){if(!("type"in n))return kh.ajax(n);var i,a,e=n.jsonpCallback,o=(kh.isFunction(e)?e():e)||"Zepto"+Bh++,s=Ch.createElement("script"),c=window[o],t=function(e){kh(s).triggerHandler("error",e||"abort")},l={abort:t};return r&&r.promise(l),kh(s).on("load error",function(e,t){clearTimeout(a),kh(s).off().remove(),"error"!=e.type&&i?qh(i[0],l,n,r):rh(null,t||"error",l,n,r),window[o]=c,i&&kh.isFunction(c)&&c(i[0]),c=i=void 0}),!1===ph(l,n)?t("abort"):(window[o]=function(){i=arguments},s.src=n.url.replace(/\?(.+)=\?/,"?$1="+o),Ch.head.appendChild(s),0<n.timeout&&(a=setTimeout(function(){t("timeout")},n.timeout))),l},kh.ajaxSettings={type:"GET",beforeSend:th,success:th,error:th,complete:th,context:null,global:!0,xhr:function(){return new window.XMLHttpRequest},accepts:{script:"text/javascript, application/javascript, application/x-javascript",json:Gh,xml:"application/xml, text/xml",html:Hh,text:"text/plain"},crossDomain:!1,timeout:0,processData:!0,cache:!0},kh.ajax=function(Qi){var Ri,Si,pi,Th,Ti=kh.extend({},Qi||{}),Ui=kh.Deferred&&kh.Deferred();for(zh in kh.ajaxSettings)void 0===Ti[zh]&&(Ti[zh]=kh.ajaxSettings[zh]);(Th=Ti).global&&0==kh.active++&&mh(Th,null,"ajaxStart"),Ti.crossDomain||((Ri=Ch.createElement("a")).href=Ti.url,Ri.href=Ri.href,Ti.crossDomain=Jh.protocol+"//"+Jh.host!=Ri.protocol+"//"+Ri.host),Ti.url||(Ti.url=window.location.toString()),-1<(Si=Ti.url.indexOf("#"))&&(Ti.url=Ti.url.slice(0,Si)),(pi=Ti).processData&&pi.data&&"string"!=kh.type(pi.data)&&(pi.data=kh.param(pi.data,pi.traditional)),!pi.data||pi.type&&"GET"!=pi.type.toUpperCase()&&"jsonp"!=pi.dataType||(pi.url=vh(pi.url,pi.data),pi.data=void 0);var Vi=Ti.dataType,Wi=/\?.+=\?/.test(Ti.url);if(Wi&&(Vi="jsonp"),!1!==Ti.cache&&(Qi&&!0===Qi.cache||"script"!=Vi&&"jsonp"!=Vi)||(Ti.url=vh(Ti.url,"_="+Date.now())),"jsonp"==Vi)return Wi||(Ti.url=vh(Ti.url,Ti.jsonp?Ti.jsonp+"=?":!1===Ti.jsonp?"":"callback=?")),kh.ajaxJSONP(Ti,Ui);var Xi,Yi=Ti.accepts[Vi],Zi={},$i=function(e,t){Zi[e.toLowerCase()]=[e,t]},_i=/^([\w-]+:)\/\//.test(Ti.url)?RegExp.$1:window.location.protocol,aj=Ti.xhr(),bj=aj.setRequestHeader;if(Ui&&Ui.promise(aj),Ti.crossDomain||$i("X-Requested-With","XMLHttpRequest"),$i("Accept",Yi||"*/*"),(Yi=Ti.mimeType||Yi)&&(-1<Yi.indexOf(",")&&(Yi=Yi.split(",",2)[0]),aj.overrideMimeType&&aj.overrideMimeType(Yi)),(Ti.contentType||!1!==Ti.contentType&&Ti.data&&"GET"!=Ti.type.toUpperCase())&&$i("Content-Type",Ti.contentType||"application/x-www-form-urlencoded"),Ti.headers)for(Ah in Ti.headers)$i(Ah,Ti.headers[Ah]);if(aj.setRequestHeader=$i,aj.onreadystatechange=function(){if(4==aj.readyState){aj.onreadystatechange=th,clearTimeout(Xi);var fj,gj=!1;if(200<=aj.status&&aj.status<300||304==aj.status||0==aj.status&&"file:"==_i){if(Vi=Vi||((mi=Ti.mimeType||aj.getResponseHeader("content-type"))&&(mi=mi.split(";",2)[0]),mi&&(mi==Hh?"html":mi==Gh?"json":Eh.test(mi)?"script":Fh.test(mi)&&"xml")||"text"),"arraybuffer"==aj.responseType||"blob"==aj.responseType)fj=aj.response;else{fj=aj.responseText;try{"script"==Vi?eval(fj):"xml"==Vi?fj=aj.responseXML:"json"==Vi&&(fj=Ih.test(fj)?null:kh.parseJSON(fj))}catch(e){gj=e}if(gj)return rh(gj,"parsererror",aj,Ti,Ui)}qh(fj,aj,Ti,Ui)}else rh(aj.statusText||null,aj.status?"error":"abort",aj,Ti,Ui)}var mi},!1===ph(aj,Ti))return aj.abort(),rh(null,"abort",aj,Ti,Ui),aj;var cj=!("async"in Ti)||Ti.async;if(aj.open(Ti.type,Ti.url,cj,Ti.username,Ti.password),Ti.xhrFields)for(Ah in Ti.xhrFields)aj[Ah]=Ti.xhrFields[Ah];for(Ah in Zi)bj.apply(aj,Zi[Ah]);return 0<Ti.timeout&&(Xi=setTimeout(function(){aj.onreadystatechange=th,aj.abort(),rh(null,"timeout",aj,Ti,Ui)},Ti.timeout)),aj.send(Ti.data?Ti.data:null),aj},kh.get=function(){return kh.ajax(xh.apply(null,arguments))},kh.post=function(){var e=xh.apply(null,arguments);return e.type="POST",kh.ajax(e)},kh.getJSON=function(){var e=xh.apply(null,arguments);return e.dataType="json",kh.ajax(e)},kh.fn.load=function(e,t,n){if(!this.length)return this;var r,i=this,a=e.split(/\s/),o=xh(e,t,n),s=o.success;return 1<a.length&&(o.url=a[0],r=a[1]),o.success=function(e){i.html(r?kh("<div>").html(e.replace(Dh,"")).find(r):e),s&&s.apply(i,arguments)},kh.ajax(o),this};var Kh=encodeURIComponent;kh.param=function(e,t){var n=[];return n.add=function(e,t){kh.isFunction(t)&&(t=t()),null==t&&(t=""),this.push(Kh(e)+"="+Kh(t))},function n(r,e,i,a){var o,s=kh.isArray(e),c=kh.isPlainObject(e);kh.each(e,function(e,t){o=kh.type(t),a&&(e=i?a:a+"["+(c||"object"==o||"array"==o?e:"")+"]"),!a&&s?r.add(t.name,t.value):"array"==o||!i&&"object"==o?n(r,t,i,e):r.add(e,t)})}(n,e,t),n.join("&").replace(/%20/g,"+")}}(Zepto),Mv=Zepto,Mv.fn.serializeArray=function(){var n,r,t=[],i=function(e){return e.forEach?e.forEach(i):void t.push({name:n,value:e})};return this[0]&&Mv.each(this[0].elements,function(e,t){r=t.type,(n=t.name)&&"fieldset"!=t.nodeName.toLowerCase()&&!t.disabled&&"submit"!=r&&"reset"!=r&&"button"!=r&&"file"!=r&&("radio"!=r&&"checkbox"!=r||t.checked)&&i(Mv(t).val())}),t},Mv.fn.serialize=function(){var t=[];return this.serializeArray().forEach(function(e){t.push(encodeURIComponent(e.name)+"="+encodeURIComponent(e.value))}),t.join("&")},Mv.fn.submit=function(e){if(0 in arguments)this.bind("submit",e);else if(this.length){var t=Mv.Event("submit");this.eq(0).trigger(t),t.isDefaultPrevented()||this.get(0).submit()}return this},function(n){"__proto__"in{}||n.extend(n.zepto,{Z:function(e,t){return e=e||[],n.extend(e,n.fn),e.selector=t||"",e.__Z=!0,e},isZ:function(e){return"array"===n.type(e)&&"__Z"in e}});try{getComputedStyle(void 0)}catch(e){var r=getComputedStyle;window.getComputedStyle=function(e,t){try{return r(e,t)}catch(e){return null}}}}(Zepto),ew=Zepto,fw={nextAll:function(e){for(var t=ew(),n=this.next();n.length;)(void 0===e||n.is(e))&&(t=t.add(n)),n=n.next();return t},prevAll:function(e){for(var t=ew(),n=this.prev();n.length;)(void 0===e||n.is(e))&&(t=t.add(n)),n=n.prev();return t}},ew.extend(ew.fn,fw),mw=Zepto,mw.Callbacks=function(r){r=mw.extend({},r);var t,n,i,a,o,s,c=[],l=!r.once&&[],u=function(e){for(t=r.memory&&e,n=!0,s=a||0,a=0,o=c.length,i=!0;c&&s<o;++s)if(!1===c[s].apply(e[0],e[1])&&r.stopOnFalse){t=!1;break}i=!1,c&&(l?l.length&&u(l.shift()):t?c.length=0:p.disable())},p={add:function(){if(c){var e=c.length,n=function(e){mw.each(e,function(e,t){"function"==typeof t?r.unique&&p.has(t)||c.push(t):t&&t.length&&"string"!=typeof t&&n(t)})};n(arguments),i?o=c.length:t&&(a=e,u(t))}return this},remove:function(){return c&&mw.each(arguments,function(e,t){for(var n;-1<(n=mw.inArray(t,c,n));)c.splice(n,1),i&&(n<=o&&--o,n<=s&&--s)}),this},has:function(e){return!(!c||!(e?-1<mw.inArray(e,c):c.length))},empty:function(){return o=c.length=0,this},disable:function(){return c=l=t=void 0,this},disabled:function(){return!c},lock:function(){return l=void 0,t||p.disable(),this},locked:function(){return!l},fireWith:function(e,t){return!c||n&&!l||(t=[e,(t=t||[]).slice?t.slice():t],i?l.push(t):u(t)),this},fire:function(){return p.fireWith(this,arguments)},fired:function(){return!!n}};return p},function(u){var p=Array.prototype.slice;function f(e){var i=[["resolve","done",u.Callbacks({once:1,memory:1}),"resolved"],["reject","fail",u.Callbacks({once:1,memory:1}),"rejected"],["notify","progress",u.Callbacks({memory:1})]],a="pending",o={state:function(){return a},always:function(){return s.done(arguments).fail(arguments),this},then:function(){var t=arguments;return f(function(a){u.each(i,function(e,r){var i=u.isFunction(t[e])&&t[e];s[r[1]](function(){var e=i&&i.apply(this,arguments);if(e&&u.isFunction(e.promise))e.promise().done(a.resolve).fail(a.reject).progress(a.notify);else{var t=this===o?a.promise():this,n=i?[e]:arguments;a[r[0]+"With"](t,n)}})}),t=null}).promise()},promise:function(e){return null!=e?u.extend(e,o):o}},s={};return u.each(i,function(e,t){var n=t[2],r=t[3];o[t[1]]=n.add,r&&n.add(function(){a=r},i[1^e][2].disable,i[2][2].lock),s[t[0]]=function(){return s[t[0]+"With"](this===s?o:this,arguments),this},s[t[0]+"With"]=n.fireWith}),o.promise(s),e&&e.call(s,s),s}u.when=function(e){var i,t,n,r=p.call(arguments),a=r.length,o=0,s=1!==a||e&&u.isFunction(e.promise)?a:0,c=1===s?e:f(),l=function(t,n,r){return function(e){n[t]=this,r[t]=1<arguments.length?p.call(arguments):e,r===i?c.notifyWith(n,r):--s||c.resolveWith(n,r)}};if(1<a)for(i=new Array(a),t=new Array(a),n=new Array(a);o<a;++o)r[o]&&u.isFunction(r[o].promise)?r[o].promise().done(l(o,n,r)).fail(c.reject).progress(l(o,t,i)):--s;return s||c.resolveWith(n,r),c.promise()},u.Deferred=f}(Zepto),rx=Zepto,sx=function(){var e,t,n,r,i,a,o=arguments[0]||{},s=1,c=arguments.length,l=!1;for("boolean"==typeof o&&(l=o,o=arguments[1]||{},s=2),"object"==typeof o||rx.isFunction(o)||(o={}),c===s&&(o=this,--s);s<c;s++)if(null!=(e=arguments[s]))for(t in e)n=o[t],o!==(r=e[t])&&(l&&r&&(rx.isPlainObject(r)||(i=rx.isArray(r)))?(a=i?(i=!1,n&&rx.isArray(n)?n:[]):n&&rx.isPlainObject(n)?n:{},o[t]=sx(l,a,r)):void 0!==r&&e.hasOwnProperty(t)&&(o[t]=r));return o},rx.extend=sx,$}),define("Component",["juicer","mUtil","i18n","zepto"],function(s,c){"use strict";var n=c.isString,t=c.isElement,r=c.isObject,i=c.isArray,l={UNLOAD:1,LOAD:2,DATALOAD:3},u=function(o){o=o||{};var n={handlers:{},once:{}},e=function(){return!0};this.$on=function(e,t){n.handlers[e]=t},this.$once=function(e,t){n.once[e]=t},this.$off=function(e){n.once[e]?delete n.once[e]:n.handlers[e]?delete n.handlers[e]:e||(n.handlers={},n.once={})},this.$emit=function(e){var t=[].slice.call(arguments,1);n.once[e]?(n.once[e].apply(this,t),delete n.once[e]):n.handlers[e]&&n.handlers[e].apply(this,t)},this.beforeMount=e,this.mounted=e,this.transferToVM=e,this.tpl="",this.css="",this.components={},this.status=l.UNLOAD,this.id=u.util.getId(o.el),this.pageid=o.pageid||c.getCurrentPageId(),this.$container=$(o.container||"body"),this.updateStatus=function(e){this.status=e},this.render=function(){var i=this,a=u.util;return o.type=o.type||i.type,$.when(a.initData(o.url||o.option||{}),a.getTpl(o.type,this.tpl),a.getCss(this.css)).then(function(e){var t=i.$container.find("[id='"+i.id+"']"),n=i.pageid;o.url||o.needTransfer?i.transferToVM(e):i.viewModel=$.extend(!0,i.viewModel,e),i.viewModel=a.formatVM(i.viewModel,n,function(e){return!!~(i.keysOfSkipedVarParse||[]).indexOf(e)}),i.id=e.id||i.id,n?(u.instances[n]=u.instances[n]||{},u.instances[n][i.id]=i):u.instances[i.id]=i,i.components=a.map(i.components,function(e){return e.props=e.props||{},e.uid=e.props.uid="_"+c.UUID(),e.content=s(e.tmpl,e.props),e});var r=i.beforeMount();return(r="object"==typeof r?r:$.Deferred().resolve()).then(function(){return $.extend(!0,i.viewModel,{id:i.id,compType:o.type}),i.$el=a.render(t,$.extend(!0,{},i.viewModel,i.components)),i.$comp=i.$el.children(".wev-comp-"+i.type),i.components=a.map(i.components,function(e){return e.$el=i.$el.find("#"+e.uid),e}),Object.keys(i.components).forEach(function(e){i.components[e].mounted()}),i.mounted()})})}};return u.tpls={},u.instances={},u.util={getId:function(e){return n(e)?e:t(e)?e.id:e},getTpl:function(t,e){var n=$.Deferred();return t in u.tpls?n.resolve():e?(require([e],function(e){u.tpls[t]=s(c.replaceI18n(e)),n.resolve()}),n):u.tpls[t]=s("")},getCss:function(e){var t=$.Deferred();return e?(n(e)?e=["css!"+e]:i(e)&&(e=e.map(function(e){return"css!"+e})),require(e,function(){t.resolve()}),t):t.resolve()},render:function(e,t){var n=u.tpls[t.compType].render(t);return $(e).html(n)},initData:function(n,e){var t=$.Deferred();return r(n)?t.resolve(n):(c.getJSON(n,function(e){t.resolve(e.data)},function(e){var t=n.split("mec_id=")[1];c.console.error("无法获取到组件id为 "+t+" 的相关数据")}),t)},map:function(t,n){var r={};return Object.keys(t).map(function(e){r[e]=n(t[e])}),r},formatVM:function(e,n,t){var r=this,i=this.getDataSet(n),a=c.getUserLanguage(),o=c.containsVarParser(JSON.stringify(e));return(e=c.replaceJSON(e,function(t){return t=c.replaceVariables(t,n),t=r.replaceMutilLanguage(t,a),i.length&&i.forEach(function(e){t=e.replace(t)}),o&&(t=c.replaceVarParser(t)),t},t)).needParseVar=o,e},replaceMutilLanguage:function(t,n){var r=this;return(t.match(/~`~`(.|\n)+?`~`~/g)||[]).map(function(e){t=t.replace(e,r.replaceStandMutilLanguage(e,n))}),t},replaceStandMutilLanguage:function(e,t){var n=e.replace(/^~`~`|`~`~$/g,"").split("`~`");if(1==n.length&&n[0]===e)return e;for(var r="",i=0;i<n.length;i++){var a=n[i],o=a.replace(/([\d]{1,2}) [\s\S]*/,"$1");(a=a.replace(/[\d]{1,2} /,"").trim())&&!r&&(r=a),a&&t==o&&(e=a)}return 0<=e.indexOf("~")?r:e},getDataSet:function(e){var t=u.instances[e];return t?Object.keys(t).filter(function(e){return"DataSet"===t[e].type}).map(function(e){return t[e]}):[]}},{super:function(e,t){u.call(e,t)},init:function(e){function t(){}return t.prototype=u.prototype,e.prototype=new t,e},getInstance:function(e,t){return(t=t||c.getCurrentPageId())?u.instances[t][e]:u.instances[e]},getPageComs:function(e){if(!e)return[];var t=u.instances[e]||{};return Object.keys(t).map(function(e){return t[e]})},load:function(e,r,i){var a=-1,o={},s=e.length;e.forEach(function(n){if(n.type){var e=o[n.priority]||[];n.index=e.push(n)-1,n.ready=$.Deferred(),n.render=$.Deferred(),o[n.priority]=e,require([n.type],function(e){var t=new e(n);t.$once("loaded",function(e){t.updateStatus(l.LOAD),c.isFunction(i)&&setTimeout(function(){i(t,e)},0),s-1===e&&c.isFunction(r)&&setTimeout(r,0)}),n.ready.then(function(){return t.render().then(function(){t.$emit("loaded",++a),t.$el.data("loaded",!0),n.render.resolve()})})})}}),Object.keys(o).sort(function(e,t){return e-t}).reduce(function(e,t){return(e=e||$.Deferred().resolve()).then(function(){var e=(o[t]||[]).map(function(e){return e.ready.resolve(),e.render});return $.when.apply($.when,e)})},"")},preload:function(e){e.forEach(function(e){require([e.type])})},replaceMutilLanguage:function(e,t){return u.util.replaceMutilLanguage(e,t)},render:function(e,t){return u.util.render(e,t)},status:l}}),define("mApi/basic",["mUtil"],function(p){return{ajax:function(e,t,n,r){return p.ajax(e,t,n,r)},openUrl:function(e,t,n){var r=require("mobilebone");if(n=n||{},p.isObject(t)&&(n=t),0==e.indexOf("/mobilemode/appHomepageView.jsp")){var i,a=e.indexOf("&");-1!=a?(queryString=e.substring(a+1),i=e.substring(0,a)):(i=e,queryString="");var o=i.replace("/mobilemode/appHomepageView.jsp?appHomepageId=","");if(!o)return void p.getLabel(5466,"未找到相关页面",function(e){Mobile_NS.alert(e)});var s=p.getPageId(o),c=$.extend({reload:!0,formdata:queryString},n),l=document.querySelector(".in."+r.classPage);if(null==l)return;var u=document.getElementById(s);u&&r.transition(u,l,!1,c)}else!0===t||p.isFunction(t)||-1!=e.indexOf("ajax=true")?r.ajax($.extend({url:e,success:function(){p.isFunction(t)&&t.call()}},n)):location.href=e},getParameter:function(e,t){var n;return t=t||p.getCurrentPageId(),null!=(n=p.getPageParam(t)[e])&&void 0!==n||(n=""),n},getGlobalVar:function(e){return p.getGlobalVars()[e]||""},getCurrUser:function(){return p.getCurrUser()},getWechatUserInfo:function(){return p.getWechatUserInfo()},getCurrentPageId:function(){return p.getCurrentPageId()},backPage:function(){p.back()},eval:function(e){if(p.isString(e))try{e=decodeURIComponent(e)}catch(e){}p.eval(e)},login:function(e,t,n){p.ajax("/mobilemode/mobile/verifyLogin2.jsp",{loginid:e,password:t},function(e){"1"==(e="string"==typeof e?JSON.parse(e):e).message&&(p.setSessionKey(e.sessionkey),$.extend(__meta__.user,e.user)),n&&n(e)},{type:"POST"})},callApi:function(e,t,n,r,i){i=i||{},p.isFunction(t)&&(r=t,t=null);var a=p.isString(t)&&~["get","post"].indexOf(t.toLowerCase().trim());return!a&&p.isFunction(n)?(i=r||{},r=n,n="GET"):a&&(i=r||{},r=n,n=t,t=null),i.url=p.completeUrl("/mobilemode/api"+e),i.data=t,i.type=n,i.success=r,$.ajax(i)}}}),define("mApi",["mUtil","mApi/basic","mApi/custom"],function(e,t,n){var r="mApi/popup",i="mApi/form",a="mApi/jump",o="mApi/refresh",s="mApi/msgpush",c="mApi/other",l="mService";function u(e,r){var i=[].slice.call(arguments);return i=i.slice(2),function(){var t=$.Deferred(),n=[].slice.call(arguments);return require([e],function(e){$.when(e[r].apply(e,[].concat(i,n))).done(function(){t.resolve.apply(null,arguments)})}),t}}var p={ajax:t.ajax,openUrl:t.openUrl,getParameter:t.getParameter,getCurrUser:t.getCurrUser,getCurrentPageId:t.getCurrentPageId,backPage:t.backPage,eval:t.eval,login:t.login,callApi:t.callApi,getWechatUserInfo:t.getWechatUserInfo,getGlobalVar:t.getGlobalVar,msg:u(r,"msg"),alert:u(r,"alert"),Alert:u(r,"Alert"),confirm:u(r,"confirm"),Confirm:u(r,"Confirm"),prompt:u(r,"prompt"),showLoader:u(r,"showLoader"),hideLoader:u(r,"hideLoader"),footerMenu:u(r,"footerMenu"),dropDownMenu:u(r,"dropDownMenu"),getFormField:function(e,t,n){return require("mApi/form").getField(e,t,n)},formSubmit:u(i,"submit"),formDelete:u(i,"deleteData"),datePicker:u(i,"wrapToDatetime"),toggle:u(i,"wrapToToggle"),backToHomepage:u(a,"backToHomepage"),createTopfloorPage:u(a,"createTopfloorPage"),closeTopfloorPage:u(a,"closeTopfloorPage"),openUrlLeftReplace:u(a,"openUrlLeftReplace"),openUrlRightReplace:u(a,"openUrlRightReplace"),openWebView:u(a,"openWebView"),SQL:u("mApi/sql","run"),refresh:u(o,"refresh"),refreshList:u(o,"refreshList"),refreshPrevPageList:u(o,"refreshPrevPageList"),refreshSpecifiedList:u(o,"refreshSpecifiedList"),triggerRefresh:u(o,"triggerRefresh"),refreshCalendar:u(o,"refreshCalendar"),triggerLazyLoad:u(o,"triggerLazyLoad"),refreshRemind:u(o,"refreshRemind"),scanQRCode:u("mApi/qrcode","scan"),getCurrentPosition:u("mApi/lbs","getCurrentPosition"),getCurrPosition:u("mApi/lbs4amap","getCurrPosition"),sendMessage:u(s,"sendMessage"),sendEmobileMsg:u(s,"sendEmobileMsg"),sendWechatMsg:u(s,"sendWechatMsg"),callMobile:u(c,"callMobile"),addFormmodeDataShare:u(c,"addFormmodeDataShare"),encrypt:u(c,"encrypt"),progressBar:u(c,"progressBar"),circleProgressBar:u(c,"circleProgressBar"),initWeather:u(c,"initWeather"),getLayoutUrl:u(c,"getLayoutUrl"),toggleListData:u(c,"toggleListData"),getListCheckedData:u(c,"getListCheckedData"),switchListSelectable:u(c,"switchListSelectable"),previewImg:u(c,"previewImg"),addEventListener:u(c,"addEventListener"),doPageExpand:u(c,"doPageExpand"),getDataSetDetail:function(e,t,n){return require("mApi/other").getDataSetDetail(e,t,n)},getCurrDate:e.getCurrDate,getCurrTime:e.getCurrTime,openLBSWin:u(l,"show","position"),openLBSPage:u(l,"show","position4amap"),openMap:function(t,n){require(["mService"],function(e){e.show("map",{coordinate:t,type:n})})}};return window.Mobile_NS=p,window.$u=p.openUrl,window.$p=p.getParameter,window.$u_l_replace=p.openUrlLeftReplace,window.$u_r_replace=p.openUrlRightReplace,window.$f=p.getFormField,window.$d=p.getDataSetDetail,Object.keys(n).forEach(function(e){p.hasOwnProperty(e)||(p[e]=n[e])}),window.$load=function(t){var n=e.getCurrentPageId();require(["mApi/event"],function(e){new e(n).on("load",t)})},p}),define("pageEvent",[],function(){var r={change:[]};return{register:function(e,t){return r[e]&&r[e].push(t),this},destory:function(e,t){if(!r[e])return this;var n=r[e].indexOf(t);return~n&&r[e].splice(n,1),this},trigger:function(e){r[e]&&(r[e].forEach(function(e){e()}),r[e]=[])}}}),define("pageStack",[],function(){var n=[];return{pop:function(e){if(!e)return n.pop();var t=this.getAllPrevPageIds();n.splice(t.lastIndexOf(e)+1,n.length)},push:function(){return n.push.apply(n,arguments)},getPrevPage:function(){return n[n.length-2]},getAllPrevPages:function(){return n.slice(0,n.length-1)},getAllPrevPageIds:function(){return this.getAllPrevPages().map(function(e){return e.id})}}}),define("main_demo",["mobilebone","fastclick","mUtil","i18n","zepto","Component","mApi","pageEvent","pageStack"],function(e,t,c,n){var l=require("pageEvent");t.attach(document.body),e.evalScript=!0,e.onpagefirstinto=function(e,t,n){var r=e.id,i=c.getPageIntId(r),a={pageKey:c.UUID()+"_"+i};(n.formdata||"").split("&").forEach(function(e){var t=e.indexOf("=");if(-1!=t){var n=e.substring(0,t),r=e.substring(t+1);a[n]=r}}),c.setPageParam(r,a)},e.callback=function(e,t,n,r){if(r){var i=$(e).children(".page-content").children(".tabpanel.in")[0];i&&(e=i)}var a=e.id,o=t&&t.id,s=require("pageStack");e.classList.contains("page-scroller")&&(a=a.replace("_scroller","")),$(e).hasClass("tabpanel")&&$(t).hasClass("tabpanel")||(n.replaceState?(s.pop(),s.push(e)):!r&&s.push(e)||s.pop(a)),o&&c.unload(o),c.setCurrentPageId(a),l.trigger("change")},n.init(c.getUserLanguage()),e.init()}),function(){var i="-default";require(["amdConfig"],function(n){var r={paths:{}};Object.keys(n.paths).filter(function(e){var t=n.paths[e];return~e.indexOf("_css")&&~t.indexOf("css/service/")}).forEach(function(e){var t=e.replace(/(mService\/|_css)/g,"");r.paths[e]="css/service/service."+t+i}),Object.keys(n.paths).forEach(function(e){var t=n.paths[e];~e.indexOf("_css")&&(~t.indexOf("css/common")||~t.indexOf("css/component"))&&(r.paths[e]=t+i)}),require(r),window.amdConfig=null}),require(["main_demo"])}();