kero
Version:
2 lines • 120 kB
JavaScript
function implement(e){var t,i;for(t in e)i=e[t],Class.Mutators.hasOwnProperty(t)?Class.Mutators[t].call(this,i):this.prototype[t]=i}function classify(e){return e.extend=Class.extend,e.implement=implement,e}function Ctor(){}function mix(e,t,i){for(var a in t)if(t.hasOwnProperty(a)){if(i&&-1===indexOf(i,a))continue;"prototype"!==a&&(e[a]=t[a])}}function _findRegisteredClass(e,t){for(var i=0;i<CompMgr.registeredControls.length;i++)if(CompMgr.registeredControls[i].className===e)return"undefined"!=typeof t&&(CompMgr.registeredControls[i]=t),CompMgr.registeredControls[i];return!1}function _getUpgradedListOfElement(e){var t=e.getAttribute("data-upgraded");return null===t?[""]:t.split(",")}function _isElementUpgraded(e,t){var i=_getUpgradedListOfElement(e);return-1!=i.indexOf(t)}function _upgradeElement(e,t){if(!("object"==typeof e&&e instanceof Element))throw new Error("Invalid argument provided to upgrade MDL element.");var i=_getUpgradedListOfElement(e),a=[];if(t)_isElementUpgraded(e,t)||a.push(_findRegisteredClass(t));else for(var n=e.className,s=0;s<CompMgr.registeredControls.length;s++){var r=CompMgr.registeredControls[s];n.indexOf(r.cssClass)>-1&&-1===a.indexOf(r)&&!_isElementUpgraded(e,r.className)&&a.push(r)}for(var o,s=0,u=a.length;u>s;s++){if(o=a[s],!o)throw new Error("Unable to find a registered component for the given class.");if(!e[o.className]){i.push(o.className),e.setAttribute("data-upgraded",i.join(","));var l=new o.classConstructor(e);CompMgr.createdControls.push(l);for(var h=0,d=o.callbacks.length;d>h;h++)o.callbacks[h](e);e[o.className]=l}}}function _upgradeDomInternal(e,t,i){if("undefined"==typeof e&&"undefined"==typeof t)for(var a=0;a<CompMgr.registeredControls.length;a++)_upgradeDomInternal(CompMgr.registeredControls[a].className,registeredControls[a].cssClass,i);else{var n=e;if(!t){var s=_findRegisteredClass(n);s&&(t=s.cssClass)}var r;r=i?u.hasClass(i,t)?[i]:i.querySelectorAll("."+t):document.querySelectorAll("."+t);for(var o=0;o<r.length;o++)_upgradeElement(r[o],n)}}function BarrettMu_modulo(e){var t=RSAUtils,i=t.biDivideByRadixPower(e,this.k-1),a=t.biMultiply(i,this.mu),n=t.biDivideByRadixPower(a,this.k+1),s=t.biModuloByRadixPower(e,this.k+1),r=t.biMultiply(n,this.modulus),o=t.biModuloByRadixPower(r,this.k+1),u=t.biSubtract(s,o);u.isNeg&&(u=t.biAdd(u,this.bkplus1));for(var l=t.biCompare(u,this.modulus)>=0;l;)u=t.biSubtract(u,this.modulus),l=t.biCompare(u,this.modulus)>=0;return u}function BarrettMu_multiplyMod(e,t){var i=RSAUtils.biMultiply(e,t);return this.modulo(i)}function BarrettMu_powMod(e,t){var i=new BigInt;i.digits[0]=1;for(var a=e,n=t;;){if(0!=(1&n.digits[0])&&(i=this.multiplyMod(i,a)),n=RSAUtils.biShiftRight(n,1),0==n.digits[0]&&0==RSAUtils.biHighIndex(n))break;a=this.multiplyMod(a,a)}return i}function AbstractMasker(){}function AbstractSplitMasker(){}function AddressMasker(e){this.update(e)}function NumberMasker(e){this.update(e)}function CurrencyMasker(e){this.update(e)}function PercentMasker(e){this.update(e)}function toColorfulString(e){var t;return e?null==e.color?e.value:(t=e.color,'<font color="'+t+'">'+e.value+"</font>"):""}function StringElement(e){this.value=e}function FormatResult(e,t){this.value=e,this.color=t}function NumberFormater(e){this.precision=e}function DateFormater(e){this.pattern=e}function _updateDom(e,t){for(var i in t){var a=t[i];for(var e in a){var n=a[e];if("trigger"==e)u.trigger(e,n[0]);else if(u.isArray(n))u.each(n,function(t,i){e[t](i)});else try{e[i](a)}catch(s){e[i](a[i])}}}}var U_LANGUAGES="i_languages",U_THEME="u_theme",U_LOCALE="u_locale",U_USERCODE="usercode",enumerables=!0,enumerablesTest={toString:1},toString=Object.prototype.toString;for(var i in enumerablesTest)enumerables=null;enumerables&&(enumerables=["hasOwnProperty","valueOf","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","constructor"]),window.u=window.u||{};var u=window.u;if(u.enumerables=enumerables,u.extend=function(e,t){var i,a=arguments;if(a.length>1)for(var n=1;n<a.length;n++)if(i=a[n],e&&i&&"object"==typeof i){var s,r,o;for(s in i)e[s]=i[s];if(enumerables)for(r=enumerables.length;r--;)o=enumerables[r],i.hasOwnProperty&&i.hasOwnProperty(o)&&(e[o]=i[o])}return e},u.extend(u,{setCookie:function(e,t,i,a,n,s){var r=e+"="+encodeURIComponent(t);i&&(r+="; expires="+i.toGMTString()),a&&(r+="; path="+a),n&&(r+="; domain="+n),s&&(r+="; secure="+s),document.cookie=r},getCookie:function(e){var t="(?:; )?"+e+"=([^;]*);?",i=new RegExp(t);return i.test(document.cookie)?decodeURIComponent(RegExp.$1):null},createShellObject:function(e){var t=function(){};return t.prototype=e,new t},execIgnoreError:function(e,t,i){try{e.call(t,i)}catch(a){}},on:function(e,t,i,a){if(e){if(arguments.length<4)a=i,i=void 0;else var n=function(t){if(t){var n=e.querySelectorAll(i);n.forEach(function(e){e==t.target&&a.call(t.target,t)})}};if(e.uEvent||(e.uEvent={}),e.uEvent[t]){var s=i?n:a,r=!1;e.uEvent[t].forEach(function(e){e==s&&(r=!0)}),r||e.uEvent[t].push(i?n:a)}else e.uEvent[t]=[i?n:a],u.event&&u.event[t]&&u.event[t].setup&&u.event[t].setup.call(e),e.uEvent[t+"fn"]=function(i){i||(i="undefined"!=typeof event&&event?event:window.event),e.uEvent[t].forEach(function(t){i.target=i.target||i.srcElement,t&&t.call(e,i)})},e.addEventListener?e.addEventListener(t,e.uEvent[t+"fn"]):e.attachEvent?e.attachEvent("on"+t,e.uEvent[t+"fn"]):e["on"+t]=e.uEvent[t+"fn"]}},off:function(e,t,i){if(i)return void(e&&e.uEvent&&e.uEvent[t]&&e.uEvent[t].forEach(function(a,n){a==i&&e.uEvent[t].splice(n,1)}));var a=e.uEvent[t+"fn"];e.removeEventListener?e.removeEventListener(t,a):e.removeEvent?e.removeEvent("on"+t,a):delete e["on"+t],u.event&&u.event[t]&&u.event[t].teardown&&u.event[t].teardown.call(e),e.uEvent[t]=void 0,e.uEvent[t+"fn"]=void 0},trigger:function(e,t){e.uEvent&&e.uEvent[t]&&e.uEvent[t+"fn"]()},addClass:function(e,t){return"undefined"==typeof e.classList?u._addClass&&u._addClass(e,t):e.classList.add(t),u},removeClass:function(e,t){return"undefined"==typeof e.classList?u._removeClass&&u._removeClass(e,t):e.classList.remove(t),u},hasClass:function(e,t){return e&&(!e.nodeName||"#text"!==e.nodeName&&"#comment"!==e.nodeName)?"undefined"==typeof e.classList?u._hasClass?u._hasClass(e,t):!1:e.classList.contains(t):!1},toggleClass:function(e,t){return"undefined"==typeof e.classList?u._toggleClass(e,t):e.classList.toggle(t)},closest:function(e,t){for(var i=e;null!=i&&!u.hasClass(i,t)&&i!=document.body;)i=i.parentNode;return i==document.body?null:i},css:function(e,t,i){if(t instanceof Object)for(var a in t){var n=t[a];["width","height","top","bottom","left","right"].indexOf(a)>-1&&u.isNumber(n)&&(n+="px"),e.style[a]=n}else arguments.length>2?e.style[t]=i:u.getStyle(e,t)},wrap:function(e,t){var i=u.makeDOM(t);e.parentNode.insertBefore(i,e),i.appendChild(e)},getStyle:function(e,t){var i;return i=window.getComputedStyle?window.getComputedStyle(e):e.currentStyle,void 0!==i[t]?i[t]:""},getZIndex:function(){return u.globalZIndex||(u.globalZIndex=2e3),u.globalZIndex++},makeDOM:function(e){var t=document.createElement("div");t.innerHTML=e;var i=t.children[0];return i},makeModal:function(e){var t=document.createElement("div");return u.addClass(t,"u-overlay"),t.style.zIndex=u.getZIndex(),document.body.appendChild(t),e.style.zIndex=u.getZIndex(),u.on(t,"click",function(e){u.stopEvent(e)}),t},getOffset:function(e,t){return t||(t={},t.top=0,t.left=0),e==document.body?t:(t.top+=e.offsetTop,t.left+=e.offsetLeft,e.offsetParent?u.getOffset(e.offsetParent,t):t)},getScroll:function(e,t){return t||(t={},t.top=0,t.left=0),e==document.body?(t.top+=e.scrollTop,t.left+=e.scrollLeft,t):(t.top+=e.scrollTop,t.left+=e.scrollLeft,e.parentNode?u.getScroll(e.parentNode,t):t)},showPanelByEle:function(e){var t=e.ele,i=e.panel,a=e.position,n=u.getOffset(t),s=u.getScroll(t),r=n.left,o=n.top,l=s.left,h=s.top,d=t.offsetWidth,c=t.offsetHeight,f=i.offsetWidth,p=i.offsetHeight,g=document.body.clientWidth,m=document.body.clientHeight,a=a||"top",v=r-l,b=o-h;"left"==a||"right"==a||("topCenter"==a?(v+=(d-f)/2,b-=p):"bottomLeft"==a&&(v=v,b+=c)),v+f>g&&(v=g-f),0>v&&(v=0),b+p>m&&(b=m-p),0>b&&(b=0),i.style.left=v+"px",i.style.top=b+"px"},stopEvent:function(e){"undefined"!=typeof e&&(e.stopPropagation?e.stopPropagation():e.cancelBubble=!0,e&&e.preventDefault?e.preventDefault():window.event.returnValue=!1)},getFunction:function(e,t){if(!t||"function"==typeof t)return t;if("function"==typeof e[t])return e[t];if("function"==typeof window[t])return window[t];if(-1!=t.indexOf(".")){var i=u.getJSObject(e,t);if("function"==typeof i)return i;if(i=u.getJSObject(window,t),"function"==typeof i)return i}return t},getJSObject:function(e,t){if(t){if("object"==typeof t)return t;for(var i=t.split("."),a=e,n=0;n<i.length;n++)if(a=a[i[n]],!a)return null;return a}},isDate:function(e){return"[object Date]"===Object.prototype.toString.call(e)||e instanceof Date},isNumber:function(e){return e-parseFloat(e)+1>=0},isArray:Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},inArray:function(e,t){if(!t instanceof Array)throw"arguments is not Array";for(var i=0,a=t.length;a>i;i++)if(e==t[i])return!0;return!1},each:function(e,t){if(e.forEach)e.forEach(function(e,i){t(i,e)});else{if(!(e instanceof Object))return;for(var i in e)t(i,e[i])}}}),function(){var e={},t={},i={},a={},n={"float":{precision:2},datetime:{format:"YYYY-MM-DD HH:mm:ss",metaType:"DateTimeFormatMeta",speratorSymbol:"-"},time:{format:"HH:mm"},date:{format:"YYYY-MM-DD"},currency:{precision:2,curSymbol:"¥"},percent:{}};a.getEnvironment=function(){return u.createShellObject(e)},a.getClientAttributes=function(){return u.createShellObject(t)},a.setContextPath=function(t){return e[IWEB_CONTEXT_PATH]=t},a.getContextPath=function(t){return e[IWEB_CONTEXT_PATH]},a.setClientAttribute=function(e,i){t[e]=i},a.getSessionAttributes=function(){return u.createShellObject(i)},a.setSessionAttribute=function(e,t){i[e]=t,setCookie("ISES_"+e,t)},a.removeClientAttribute=function(e){t[e]=null,execIgnoreError(function(){delete t[e]})},a.getLocale=function(){return this.getEnvironment().locale},a.getLanguages=function(){return this.getEnvironment().languages},a.collectEnvironment=function(){var e=this.getEnvironment(),i=this.getSessionAttributes();for(var a in t)i[a]=t[a];return e.clientAttributes=i,e},a.setMaskerMeta=function(e,t){if("function"==typeof e)getMetaFunc=e;else if(n[e])if("object"!=typeof t)n[e]=t;else for(var i in t)n[e][i]=t[i];else n[e]=t},a.getMaskerMeta=function(e){if("function"==typeof getMetaFunc){var t=getMetaFunc.call(this);return t[e]}return u.extend({},n[e])},e.languages=u.getCookie(U_LANGUAGES)?u.getCookie(U_LANGUAGES).split(","):navigator.language?navigator.language:"zh-CN","zh-cn"==e.languages&&(e.languages="zh-CN"),"en-us"==e.languages&&(e.languages="en-US"),e.theme=u.getCookie(U_THEME),e.locale=u.getCookie(U_LOCALE),e.usercode=u.getCookie(U_USERCODE),document.cookie.replace(/ISES_(\w*)=([^;]*);?/gi,function(e,t,a){i[t]=a});var s=function(){};s.prototype=a,u.core=new s}(),u.extend(u,{isIE:!1,isFF:!1,isOpera:!1,isChrome:!1,isSafari:!1,isWebkit:!1,isIE8_BEFORE:!1,isIE8:!1,isIE8_CORE:!1,isIE9:!1,isIE9_CORE:!1,isIE10:!1,isIE10_ABOVE:!1,isIE11:!1,isIOS:!1,isIphone:!1,isIPAD:!1,isStandard:!1,version:0,isWin:!1,isUnix:!1,isLinux:!1,isAndroid:!1,isMac:!1,hasTouch:!1,isMobile:!1}),function(){var e,t,i=navigator.userAgent,a=/(msie\s|trident.*rv:)([\w.]+)/,n=/(firefox)\/([\w.]+)/,s=/(opera).+version\/([\w.]+)/,r=/(chrome)\/([\w.]+)/,o=/version\/([\w.]+).*(safari)/,l=i.toLowerCase(),h={browser:"",version:""},d=a.exec(l);if(null!=d&&(h={browser:"IE",version:d[2]||"0"}),d=n.exec(l),null!=d&&(h={browser:d[1]||"",version:d[2]||"0"}),d=s.exec(l),null!=d&&(h={browser:d[1]||"",version:d[2]||"0"}),d=r.exec(l),null!=d&&(h={browser:d[1]||"",version:d[2]||"0"}),d=o.exec(l),null!=d&&(h={browser:d[2]||"",version:d[1]||"0"}),null!=d&&(h={browser:"",version:"0"}),(t=l.match(/opera.([\d.]+)/))?u.isOpera=!0:"IE"==h.browser&&11==h.version?(u.isIE11=!0,u.isIE=!0):(t=l.match(/chrome\/([\d.]+)/))?(u.isChrome=!0,u.isStandard=!0):(t=l.match(/version\/([\d.]+).*safari/))?(u.isSafari=!0,u.isStandard=!0):(t=l.match(/gecko/))?(u.isFF=!0,u.isStandard=!0):(t=l.match(/msie ([\d.]+)/))?u.isIE=!0:(t=l.match(/firefox\/([\d.]+)/))&&(u.isFF=!0,u.isStandard=!0),l.match(/webkit\/([\d.]+)/)&&(u.isWebkit=!0),l.match(/ipad/i)&&(u.isIOS=!0,u.isIPAD=!0,u.isStandard=!0),l.match(/iphone/i)&&(u.isIOS=!0,u.isIphone=!0),"Mac68K"!=navigator.platform&&"MacPPC"!=navigator.platform&&"Macintosh"!=navigator.platform&&"MacIntel"!=navigator.platform||(u.isMac=!0),"Win32"!=navigator.platform&&"Windows"!=navigator.platform&&"Win64"!=navigator.platform||(u.isWin=!0),"X11"!=navigator.platform||u.isWin||u.isMac||(u.isUnix=!0),String(navigator.platform).indexOf("Linux")>-1&&(u.isLinux=!0),(l.indexOf("Android")>-1||l.indexOf("android")>-1||l.indexOf("Adr")>-1||l.indexOf("adr")>-1)&&(u.isAndroid=!0),u.version=e&&h.version?h.version:0,u.isIE){var c=parseInt(u.version),f=document.documentMode;null==f?6!=c&&7!=c||(u.isIE8_BEFORE=!0):(7==f?u.isIE8_BEFORE=!0:8==f?u.isIE8=!0:9==f?(u.isIE9=!0,u.isSTANDARD=!0):10==f?(u.isIE10=!0,u.isSTANDARD=!0,u.isIE10_ABOVE=!0):u.isSTANDARD=!0,8==c?u.isIE8_CORE=!0:9==c?u.isIE9_CORE=!0:11==h.version&&(u.isIE11=!0))}"ontouchend"in document&&(u.hasTouch=!0),(u.isIOS||u.isAndroid)&&(u.isMobile=!0)}(),u.isIE8_BEFORE)throw alert("uui 不支持IE8以前的浏览器版本,请更新IE浏览器或使用其它浏览器!"),new Error("uui 不支持IE8以前的浏览器版本,请更新IE浏览器或使用其它浏览器!");if(u.isIE8&&!u.polyfill)throw alert("IE8浏览器中使用uui 必须在u.js之前引入u-polyfill.js!"),new Error("IE8浏览器中使用uui 必须在uui之前引入u-polyfill.js!");window.iweb={},window.iweb.Core=u.core,window.iweb.browser={isIE:u.isIE,isFF:u.isFF,isOpera:u.isOpera,isChrome:u.isChrome,isSafari:u.isSafari,isWebkit:u.isWebkit,isIE8_BEFORE:u.isIE8_BEFORE,isIE8:u.isIE8,isIE8_CORE:u.isIE8_CORE,isIE9:u.isIE9,isIE9_CORE:u.isIE9_CORE,isIE10:u.isIE10,isIE10_ABOVE:u.isIE10_ABOVE,isIE11:u.isIE11,isIOS:u.isIOS,isIphone:u.isIphone,isIPAD:u.isIPAD,isStandard:u.isStandard,version:0,isWin:u.isWin,isUnix:u.isUnix,isLinux:u.isLinux,isAndroid:u.isAndroid,isMac:u.isMac,hasTouch:u.hasTouch},u.isDomElement=function(e){return window.HTMLElement?e instanceof HTMLElement:e&&e.tagName&&1===e.nodeType},u.event={};var touchStartEvent=u.hasTouch?"touchstart":"mousedown",touchStopEvent=u.hasTouch?"touchend":"mouseup",touchMoveEvent=u.hasTouch?"touchmove":"mousemove";u.event.tap={tapholdThreshold:750,emitTapOnTaphold:!0,touchstartFun:function(){u.trigger(this,"vmousedown")},touchendFun:function(){u.trigger(this,"vmouseup"),u.trigger(this,"vclick")},setup:function(){var e=this,t=!1;u.on(e,"vmousedown",function(i){function a(){clearTimeout(r)}function n(){a(),u.off(e,"vclick"),u.off(e,"vmouseup"),u.off(document,"vmousecancel")}function s(i){n(),t||o!==i.target?t&&i.preventDefault():u.trigger(e,"tap")}if(t=!1,i.which&&1!==i.which)return!1;var r,o=i.target;u.on(e,"vmouseup",a),u.on(e,"vclick",s),u.on(document,"vmousecancel",n),r=setTimeout(function(){u.event.tap.emitTapOnTaphold||(t=!0),u.trigger(e,"taphold"),n()},u.event.tap.tapholdThreshold)}),u.on(e,"touchstart",u.event.tap.touchstartFun),u.on(e,"touchend",u.event.tap.touchendFun)},teardown:function(){u.off(thisObject,"vmousedown"),u.off(thisObject,"vclick"),u.off(thisObject,"vmouseup"),u.off(document,"vmousecancel")}},u.event.taphold=u.event.tap,u.event.swipe={scrollSupressionThreshold:30,durationThreshold:1e3,horizontalDistanceThreshold:30,verticalDistanceThreshold:30,getLocation:function(e){var t=window.pageXOffset,i=window.pageYOffset,a=e.clientX,n=e.clientY;return 0===e.pageY&&Math.floor(n)>Math.floor(e.pageY)||0===e.pageX&&Math.floor(a)>Math.floor(e.pageX)?(a-=t,n-=i):(n<e.pageY-i||a<e.pageX-t)&&(a=e.pageX-t,n=e.pageY-i),{x:a,y:n}},start:function(e){var t=e.touches?e.touches[0]:e,i=u.event.swipe.getLocation(t);return{time:(new Date).getTime(),coords:[i.x,i.y],origin:e.target}},stop:function(e){var t=e.touches?e.touches[0]:e,i=u.event.swipe.getLocation(t);return{time:(new Date).getTime(),coords:[i.x,i.y]}},handleSwipe:function(e,t,i,a){if(t.time-e.time<u.event.swipe.durationThreshold&&Math.abs(e.coords[0]-t.coords[0])>u.event.swipe.horizontalDistanceThreshold&&Math.abs(e.coords[1]-t.coords[1])<u.event.swipe.verticalDistanceThreshold){var n=e.coords[0]>t.coords[0]?"swipeleft":"swiperight";return u.trigger(i,"swipe"),u.trigger(i,n),!0}return!1},eventInProgress:!1,setup:function(){var e,t=this,i={};e=t["mobile-events"],e||(e={length:0},t["mobile-events"]=e),e.length++,e.swipe=i,i.start=function(e){if(!u.event.swipe.eventInProgress){u.event.swipe.eventInProgress=!0;var a,n=u.event.swipe.start(e),s=e.target,r=!1;i.move=function(e){n&&(a=u.event.swipe.stop(e),r||(r=u.event.swipe.handleSwipe(n,a,t,s),r&&(u.event.swipe.eventInProgress=!1)),Math.abs(n.coords[0]-a.coords[0])>u.event.swipe.scrollSupressionThreshold&&e.preventDefault())},i.stop=function(){r=!0,u.event.swipe.eventInProgress=!1,u.off(document,touchMoveEvent,i.move),i.move=null},u.on(document,touchMoveEvent,i.move),u.on(document,touchStopEvent,i.stop)}},u.on(t,touchStartEvent,i.start)},teardown:function(){var e,t;e=thisObject["mobile-events"],e&&(t=e.swipe,delete e.swipe,e.length--,0===e.length&&(thisObject["mobile-events"]=null)),t&&(t.start&&u.off(thisObject,touchStartEvent,t.start),t.move&&u.off(document,touchMoveEvent,t.move),t.stop&&u.off(document,touchStopEvent,t.stop))}},u.event.swipeleft=u.event.swipe,u.event.swiperight=u.event.swipe,NodeList.prototype.forEach=Array.prototype.forEach,String.prototype.lengthb=function(){var e=this.replace(/[^\x00-\xff]/g,"**");return e.length},String.prototype.replaceAll=function(e,t){var i=new RegExp(e,"g");return this.replace(i,t)};var XmlHttp={get:"get",post:"post",reqCount:4,createXhr:function(){var e=null;return u.isIE8?e=new ActiveXObject("Microsoft.XMLHTTP"):u.isIE?e=new ActiveXObject("Msxml2.XMLHTTP"):window.XMLHttpRequest&&(e=new XMLHttpRequest),e},ajax:function(e){var t=e.url,i=e.success,a=void 0==e.async?!0:e.async,n=e.error,s=e.data||{},r=(void 0==e.type?XmlHttp.post:e.type).toLowerCase();s.compressType;t=XmlHttp.serializeUrl(t),s=XmlHttp.serializeParams(s),r==XmlHttp.get&&null!=s&&(t+="&"+s,s=null);var o=XmlHttp.createXhr();o.open(r,t+escape(new Date),a),r==XmlHttp.post&&o.setRequestHeader("Content-type","application/x-www-form-urlencoded;charset=UTF-8");var u=0;a?(o.onreadystatechange=function(){u++,o.readyState==XmlHttp.reqCount&&XmlHttp.execBack(o,i,n)},o.send(s)):(o.send(s),XmlHttp.execBack(o,i,n))},execBack:function(e,t,i){if(200==e.status||304==e.status||4==e.readyState)t(e.responseText,e.status,e);else if(i)i(e.responseText,e.status,e);else{var a="no error callback function!";e.responseText&&(a=e.responseText),alert(a)}},serializeUrl:function(e){var t="cache="+Math.random();return e+=e.indexOf("?")>0?"&"+t:"?"+t},serializeParams:function(e){var t=void 0;if(t==e||null==e||""==e)return null;if(e.constructor==Object){var i="";for(var a in e)i+=a+"="+encodeURIComponent(e[a])+"&";return i.substring(0,i.length-1)}return e}};u.ajax=XmlHttp.ajax;var Class=function(e){return this instanceof Class||!isFunction(e)?void 0:classify(e)};Class.create=function(e,t){function i(){var t;return e.apply(this,arguments),this.constructor===i&&this.initialize&&(t=this.initialize.apply(this,arguments)),t?t:this}return isFunction(e)||(t=e,e=null),t||(t={}),e||(e=t.Extends||Class),t.Extends=e,e!==Class&&mix(i,e,e.StaticsWhiteList),implement.call(i,t),classify(i)},Class.extend=function(e){return e||(e={}),e.Extends=this,Class.create(e)},Class.Mutators={Extends:function(e){var t=this.prototype,i=createProto(e.prototype);mix(i,t),i.constructor=this,this.prototype=i,this.superclass=e.prototype},Implements:function(e){isArray(e)||(e=[e]);for(var t,i=this.prototype;t=e.shift();)mix(i,t.prototype||t)},Statics:function(e){mix(this,e)}};var createProto=Object.__proto__?function(e){return{__proto__:e}}:function(e){return Ctor.prototype=e,new Ctor},toString=Object.prototype.toString,isArray=Array.isArray||function(e){return"[object Array]"===toString.call(e)},isFunction=function(e){return"[object Function]"===toString.call(e)},indexOf=function(e,t){if(Array.prototype.indexOf&&e.indexOf)return e.indexOf(t);for(var i=0,a=e.length;a>i;i++)if(e[i]===t)return i;return-1};u.Class=Class;var CompMgr={plugs:{},dataAdapters:{},registeredControls:[],createdControls:[],apply:function(e){if(e)var t=e.el||document.body,i=e.model;"string"==typeof t&&(t=document.body.querySelector(t)),null!=t&&"object"==typeof t||(t=document.body);var a=t.querySelectorAll("[u-meta]");a.forEach(function(e){if(!e.comp){var t=JSON.parse(e.getAttribute("u-meta"));if(t&&t.type){var a=CompMgr.createDataAdapter({el:e,options:t,model:i});a&&(e.adpt=a,e["u-meta"]=a)}}})},addPlug:function(e){var t=e.plug,i=e.name;if(this.plugs||(this.plugs={}),this.plugs[i])throw new Error("plug has exist:"+i);t.compType=i,this.plugs[i]=t},addDataAdapter:function(e){var t=e.adapter,i=e.name;if(this.dataAdapters||(dataAdapters={}),this.dataAdapters[i])throw new Error("dataAdapter has exist:"+i);this.dataAdapters[i]=t},getDataAdapter:function(e){return e?(this.dataAdapters||(dataAdapters={}),this.dataAdapters[e]):void 0},createDataAdapter:function(e){var t=e.options,i=t.type,a=t.id,n=this.dataAdapters[i];if(!n)return null;var s=new n(e);return s.type=i,s.id=a,s},_createComp:function(e){var t=e.options,i=t.type,a=this.plugs[i];if(!a)return null;var n=new a(e);return n.type=i,n},regComp:function(e){var t={classConstructor:e.comp,className:e.compAsString||e.compAsString,cssClass:e.css||e.css,callbacks:[]};e.comp.prototype.compType=e.compAsString;for(var i=0;i<this.registeredControls.length;i++){var a=this.registeredControls[i];if(a.cssClass===t.cssClass)throw new Error("The provided cssClass has already been registered: "+a.cssClass);if(a.className===t.className)throw new Error("The provided className has already been registered")}this.registeredControls.push(t)},updateComp:function(e){for(var t=0;t<this.registeredControls.length;t++)_upgradeDomInternal(this.registeredControls[t].className,null,e)}};u.compMgr=CompMgr,window.trans=u.trans=function(e,t){return u.uuii18n?u.uuii18n.t("uui-trans:"+e):t},"undefined"==typeof u.RSAUtils&&(u.RSAUtils={});var RSAUtils=u.RSAUtils,biRadixBase=2,biRadixBits=16,bitsPerDigit=biRadixBits,biRadix=65536,biHalfRadix=biRadix>>>1,biRadixSquared=biRadix*biRadix,maxDigitVal=biRadix-1,maxInteger=9999999999999998,maxDigits,ZERO_ARRAY,bigZero,bigOne,BigInt=u.BigInt=function(e){"boolean"==typeof e&&1==e?this.digits=null:this.digits=ZERO_ARRAY.slice(0),this.isNeg=!1};RSAUtils.setMaxDigits=function(e){maxDigits=e,ZERO_ARRAY=new Array(maxDigits);for(var t=0;t<ZERO_ARRAY.length;t++)ZERO_ARRAY[t]=0;bigZero=new BigInt,bigOne=new BigInt,bigOne.digits[0]=1},RSAUtils.setMaxDigits(20);var dpl10=15;RSAUtils.biFromNumber=function(e){var t=new BigInt;t.isNeg=0>e,e=Math.abs(e);for(var i=0;e>0;)t.digits[i++]=e&maxDigitVal,e=Math.floor(e/biRadix);return t};var lr10=RSAUtils.biFromNumber(1e15);RSAUtils.biFromDecimal=function(e){for(var t,i="-"==e.charAt(0),a=i?1:0;a<e.length&&"0"==e.charAt(a);)++a;if(a==e.length)t=new BigInt;else{var n=e.length-a,s=n%dpl10;for(0==s&&(s=dpl10),t=RSAUtils.biFromNumber(Number(e.substr(a,s))),a+=s;a<e.length;)t=RSAUtils.biAdd(RSAUtils.biMultiply(t,lr10),RSAUtils.biFromNumber(Number(e.substr(a,dpl10)))),a+=dpl10;t.isNeg=i}return t},RSAUtils.biCopy=function(e){var t=new BigInt(!0);return t.digits=e.digits.slice(0),t.isNeg=e.isNeg,t},RSAUtils.reverseStr=function(e){for(var t="",i=e.length-1;i>-1;--i)t+=e.charAt(i);return t};var hexatrigesimalToChar=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"];RSAUtils.biToString=function(e,t){var i=new BigInt;i.digits[0]=t;for(var a=RSAUtils.biDivideModulo(e,i),n=hexatrigesimalToChar[a[1].digits[0]];1==RSAUtils.biCompare(a[0],bigZero);)a=RSAUtils.biDivideModulo(a[0],i),digit=a[1].digits[0],n+=hexatrigesimalToChar[a[1].digits[0]];return(e.isNeg?"-":"")+RSAUtils.reverseStr(n)},RSAUtils.biToDecimal=function(e){var t=new BigInt;t.digits[0]=10;for(var i=RSAUtils.biDivideModulo(e,t),a=String(i[1].digits[0]);1==RSAUtils.biCompare(i[0],bigZero);)i=RSAUtils.biDivideModulo(i[0],t),a+=String(i[1].digits[0]);return(e.isNeg?"-":"")+RSAUtils.reverseStr(a)};var hexToChar=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];RSAUtils.digitToHex=function(e){for(var t=15,i="",a=0;4>a;++a)i+=hexToChar[e&t],e>>>=4;return RSAUtils.reverseStr(i)},RSAUtils.biToHex=function(e){for(var t="",i=(RSAUtils.biHighIndex(e),RSAUtils.biHighIndex(e));i>-1;--i)t+=RSAUtils.digitToHex(e.digits[i]);return t},RSAUtils.charToHex=function(e){var t,i=48,a=i+9,n=97,s=n+25,r=65,o=90;return t=e>=i&&a>=e?e-i:e>=r&&o>=e?10+e-r:e>=n&&s>=e?10+e-n:0},RSAUtils.hexToDigit=function(e){for(var t=0,i=Math.min(e.length,4),a=0;i>a;++a)t<<=4,t|=RSAUtils.charToHex(e.charCodeAt(a));return t},RSAUtils.biFromHex=function(e){for(var t=new BigInt,i=e.length,a=i,n=0;a>0;a-=4,++n)t.digits[n]=RSAUtils.hexToDigit(e.substr(Math.max(a-4,0),Math.min(a,4)));return t},RSAUtils.biFromString=function(e,t){var i="-"==e.charAt(0),a=i?1:0,n=new BigInt,s=new BigInt;s.digits[0]=1;for(var r=e.length-1;r>=a;r--){var o=e.charCodeAt(r),u=RSAUtils.charToHex(o),l=RSAUtils.biMultiplyDigit(s,u);n=RSAUtils.biAdd(n,l),s=RSAUtils.biMultiplyDigit(s,t)}return n.isNeg=i,n},RSAUtils.biDump=function(e){return(e.isNeg?"-":"")+e.digits.join(" ")},RSAUtils.biAdd=function(e,t){var i;if(e.isNeg!=t.isNeg)t.isNeg=!t.isNeg,i=RSAUtils.biSubtract(e,t),t.isNeg=!t.isNeg;else{i=new BigInt;for(var a,n=0,s=0;s<e.digits.length;++s)a=e.digits[s]+t.digits[s]+n,i.digits[s]=a%biRadix,n=Number(a>=biRadix);i.isNeg=e.isNeg}return i},RSAUtils.biSubtract=function(e,t){var i;if(e.isNeg!=t.isNeg)t.isNeg=!t.isNeg,i=RSAUtils.biAdd(e,t),t.isNeg=!t.isNeg;else{i=new BigInt;var a,n;n=0;for(var s=0;s<e.digits.length;++s)a=e.digits[s]-t.digits[s]+n,i.digits[s]=a%biRadix,i.digits[s]<0&&(i.digits[s]+=biRadix),n=0-Number(0>a);if(-1==n){n=0;for(var s=0;s<e.digits.length;++s)a=0-i.digits[s]+n,i.digits[s]=a%biRadix,i.digits[s]<0&&(i.digits[s]+=biRadix),n=0-Number(0>a);i.isNeg=!e.isNeg}else i.isNeg=e.isNeg}return i},RSAUtils.biHighIndex=function(e){for(var t=e.digits.length-1;t>0&&0==e.digits[t];)--t;return t},RSAUtils.biNumBits=function(e){var t,i=RSAUtils.biHighIndex(e),a=e.digits[i],n=(i+1)*bitsPerDigit;for(t=n;t>n-bitsPerDigit&&0==(32768&a);--t)a<<=1;return t},RSAUtils.biMultiply=function(e,t){for(var i,a,n,s=new BigInt,r=RSAUtils.biHighIndex(e),o=RSAUtils.biHighIndex(t),u=0;o>=u;++u){i=0,n=u;for(var l=0;r>=l;++l,++n)a=s.digits[n]+e.digits[l]*t.digits[u]+i,s.digits[n]=a&maxDigitVal,i=a>>>biRadixBits;s.digits[u+r+1]=i}return s.isNeg=e.isNeg!=t.isNeg,s},RSAUtils.biMultiplyDigit=function(e,t){var i,a,n,s=new BigInt;i=RSAUtils.biHighIndex(e),a=0;for(var r=0;i>=r;++r)n=s.digits[r]+e.digits[r]*t+a,s.digits[r]=n&maxDigitVal,a=n>>>biRadixBits;return s.digits[1+i]=a,s},RSAUtils.arrayCopy=function(e,t,i,a,n){for(var s=Math.min(t+n,e.length),r=t,o=a;s>r;++r,++o)i[o]=e[r]};var highBitMasks=[0,32768,49152,57344,61440,63488,64512,65024,65280,65408,65472,65504,65520,65528,65532,65534,65535];RSAUtils.biShiftLeft=function(e,t){var i=Math.floor(t/bitsPerDigit),a=new BigInt;RSAUtils.arrayCopy(e.digits,0,a.digits,i,a.digits.length-i);for(var n=t%bitsPerDigit,s=bitsPerDigit-n,r=a.digits.length-1,o=r-1;r>0;--r,--o)a.digits[r]=a.digits[r]<<n&maxDigitVal|(a.digits[o]&highBitMasks[n])>>>s;return a.digits[0]=a.digits[r]<<n&maxDigitVal,a.isNeg=e.isNeg,a};var lowBitMasks=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535];RSAUtils.biShiftRight=function(e,t){var i=Math.floor(t/bitsPerDigit),a=new BigInt;RSAUtils.arrayCopy(e.digits,i,a.digits,0,e.digits.length-i);for(var n=t%bitsPerDigit,s=bitsPerDigit-n,r=0,o=r+1;r<a.digits.length-1;++r,++o)a.digits[r]=a.digits[r]>>>n|(a.digits[o]&lowBitMasks[n])<<s;return a.digits[a.digits.length-1]>>>=n,a.isNeg=e.isNeg,a},RSAUtils.biMultiplyByRadixPower=function(e,t){var i=new BigInt;return RSAUtils.arrayCopy(e.digits,0,i.digits,t,i.digits.length-t),i},RSAUtils.biDivideByRadixPower=function(e,t){var i=new BigInt;return RSAUtils.arrayCopy(e.digits,t,i.digits,0,i.digits.length-t),i},RSAUtils.biModuloByRadixPower=function(e,t){var i=new BigInt;return RSAUtils.arrayCopy(e.digits,0,i.digits,0,t),i},RSAUtils.biCompare=function(e,t){if(e.isNeg!=t.isNeg)return 1-2*Number(e.isNeg);for(var i=e.digits.length-1;i>=0;--i)if(e.digits[i]!=t.digits[i])return e.isNeg?1-2*Number(e.digits[i]>t.digits[i]):1-2*Number(e.digits[i]<t.digits[i]);return 0},RSAUtils.biDivideModulo=function(e,t){var i,a,n=RSAUtils.biNumBits(e),s=RSAUtils.biNumBits(t),r=t.isNeg;if(s>n)return e.isNeg?(i=RSAUtils.biCopy(bigOne),i.isNeg=!t.isNeg,e.isNeg=!1,t.isNeg=!1,a=biSubtract(t,e),e.isNeg=!0,t.isNeg=r):(i=new BigInt,a=RSAUtils.biCopy(e)),[i,a];i=new BigInt,a=e;for(var o=Math.ceil(s/bitsPerDigit)-1,u=0;t.digits[o]<biHalfRadix;)t=RSAUtils.biShiftLeft(t,1),++u,++s,o=Math.ceil(s/bitsPerDigit)-1;a=RSAUtils.biShiftLeft(a,u),n+=u;for(var l=Math.ceil(n/bitsPerDigit)-1,h=RSAUtils.biMultiplyByRadixPower(t,l-o);-1!=RSAUtils.biCompare(a,h);)++i.digits[l-o],a=RSAUtils.biSubtract(a,h);for(var d=l;d>o;--d){var c=d>=a.digits.length?0:a.digits[d],f=d-1>=a.digits.length?0:a.digits[d-1],p=d-2>=a.digits.length?0:a.digits[d-2],g=o>=t.digits.length?0:t.digits[o],m=o-1>=t.digits.length?0:t.digits[o-1];c==g?i.digits[d-o-1]=maxDigitVal:i.digits[d-o-1]=Math.floor((c*biRadix+f)/g);for(var v=i.digits[d-o-1]*(g*biRadix+m),b=c*biRadixSquared+(f*biRadix+p);v>b;)--i.digits[d-o-1],v=i.digits[d-o-1]*(g*biRadix|m),b=c*biRadix*biRadix+(f*biRadix+p);h=RSAUtils.biMultiplyByRadixPower(t,d-o-1),a=RSAUtils.biSubtract(a,RSAUtils.biMultiplyDigit(h,i.digits[d-o-1])),a.isNeg&&(a=RSAUtils.biAdd(a,h),--i.digits[d-o-1])}return a=RSAUtils.biShiftRight(a,u),i.isNeg=e.isNeg!=r,e.isNeg&&(i=r?RSAUtils.biAdd(i,bigOne):RSAUtils.biSubtract(i,bigOne),t=RSAUtils.biShiftRight(t,u),a=RSAUtils.biSubtract(t,a)),0==a.digits[0]&&0==RSAUtils.biHighIndex(a)&&(a.isNeg=!1),[i,a]},RSAUtils.biDivide=function(e,t){return RSAUtils.biDivideModulo(e,t)[0]},RSAUtils.biModulo=function(e,t){return RSAUtils.biDivideModulo(e,t)[1]},RSAUtils.biMultiplyMod=function(e,t,i){return RSAUtils.biModulo(RSAUtils.biMultiply(e,t),i)},RSAUtils.biPow=function(e,t){for(var i=bigOne,a=e;;){if(0!=(1&t)&&(i=RSAUtils.biMultiply(i,a)),t>>=1,0==t)break;a=RSAUtils.biMultiply(a,a)}return i},RSAUtils.biPowMod=function(e,t,i){for(var a=bigOne,n=e,s=t;;){if(0!=(1&s.digits[0])&&(a=RSAUtils.biMultiplyMod(a,n,i)),s=RSAUtils.biShiftRight(s,1),0==s.digits[0]&&0==RSAUtils.biHighIndex(s))break;n=RSAUtils.biMultiplyMod(n,n,i)}return a},u.BarrettMu=function(e){this.modulus=RSAUtils.biCopy(e),this.k=RSAUtils.biHighIndex(this.modulus)+1;var t=new BigInt;t.digits[2*this.k]=1,this.mu=RSAUtils.biDivide(t,this.modulus),this.bkplus1=new BigInt,this.bkplus1.digits[this.k+1]=1,this.modulo=BarrettMu_modulo,this.multiplyMod=BarrettMu_multiplyMod,this.powMod=BarrettMu_powMod};var RSAKeyPair=function(e,t,i){var a=RSAUtils;this.e=a.biFromHex(e),this.d=a.biFromHex(t),this.m=a.biFromHex(i),this.chunkSize=2*a.biHighIndex(this.m),this.radix=16,this.barrett=new u.BarrettMu(this.m)};RSAUtils.getKeyPair=function(e,t,i){return new RSAKeyPair(e,t,i)},"undefined"==typeof u.twoDigit&&(u.twoDigit=function(e){return(10>e?"0":"")+String(e)}),RSAUtils._encryptedString=function(e,t){for(var i=[],a=t.length,n=0;a>n;)i[n]=t.charCodeAt(n),n++;for(;i.length%e.chunkSize!=0;)i[n++]=0;var s,r,o,u=i.length,l="";for(n=0;u>n;n+=e.chunkSize){for(o=new BigInt,s=0,r=n;r<n+e.chunkSize;++s,r++)o.digits[s]=i[r],o.digits[s]+=i[r]<<8;var h=e.barrett.powMod(o,e.e),d=16==e.radix?RSAUtils.biToHex(h):RSAUtils.biToString(h,e.radix);l+=d+" "}return l.substring(0,l.length-1)},RSAUtils._decryptedString=function(e,t){var i,a,n,s=t.split(" "),r="";for(i=0;i<s.length;++i){var o;for(o=16==e.radix?RSAUtils.biFromHex(s[i]):RSAUtils.biFromString(s[i],e.radix),n=e.barrett.powMod(o,e.d),a=0;a<=RSAUtils.biHighIndex(n);++a)r+=String.fromCharCode(255&n.digits[a],n.digits[a]>>8);
}return 0==r.charCodeAt(r.length-1)&&(r=r.substring(0,r.length-1)),r},RSAUtils.setMaxDigits(130),RSAUtils.encryptedString=function(e){var t=e.text;if(e.exponent&&e.modulus){var i=RSAUtils.getKeyPair(e.exponent,"",e.modulus);t=RSAUtils._encryptedString(i,e.text)}return t},RSAUtils.decryptedString=function(e){var t=e.text;if(e.exponent&&e.modulus){var i=RSAUtils.getKeyPair("",e.exponent,e.modulus);t=RSAUtils._decryptedString(i,e.text)}return t},AbstractMasker.prototype.format=function(e){if(null==e)return null;var t=this.formatArgument(e);return this.innerFormat(t)},AbstractMasker.prototype.formatArgument=function(e){},AbstractMasker.prototype.innerFormat=function(e){},AbstractSplitMasker.prototype=new AbstractMasker,AbstractSplitMasker.prototype.elements=new Array,AbstractSplitMasker.prototype.format=function(e){if(null==e)return null;var t=this.formatArgument(e);return this.innerFormat(t)},AbstractSplitMasker.prototype.formatArgument=function(e){return e},AbstractSplitMasker.prototype.innerFormat=function(e){if(null==e||""==e)return new FormatResult(e);this.doSplit();var t="";return t=this.getElementsValue(this.elements,e),new FormatResult(t)},AbstractSplitMasker.prototype.getElementsValue=function(e,t){var i="";if(e instanceof Array)for(var a=0;a<e.length;a++)i+=this.getElementsValue(e[a],t);else e.getValue&&(i=e.getValue(t));return i},AbstractSplitMasker.prototype.getExpress=function(){},AbstractSplitMasker.prototype.doSplit=function(){var e=this.getExpress();null!=this.elements&&0!=this.elements.length||(this.elements=this.doQuotation(e,this.getSeperators(),this.getReplaceds(),0))},AbstractSplitMasker.prototype.doQuotation=function(e,t,i,a){if(0==e.length)return null;var n,s=new Array,r=new RegExp('".*?"',"g"),o=0;do if(n=r.exec(e),null!=n){var u=n.index,l=r.lastIndex;if(u!=l&&u>o){var h=this.doSeperator(e.substring(o,u),t,i,a);null!=h&&h.length>0&&s.push(h)}s.push(new StringElement(e.substring(u+1,l-1))),o=l}while(null!=n);if(o<e.length){var h=this.doSeperator(e.substring(o,e.length),t,i,a);null!=h&&h.length>0&&s.push(h)}return s},AbstractSplitMasker.prototype.doSeperator=function(e,t,i,a){if(a>=t.length){var n=new Array;return n.push(this.getVarElement(e)),n}if(0==e.length)return null;var s,r=0,n=new Array,o=new RegExp(t[a],"g");do if(s=o.exec(e),null!=s){var u=s.index,l=o.lastIndex;if(u!=l){if(u>r){var h=this.doSeperator(e.substring(r,u),t,i,a+1);null!=h&&h.length>0&&n.push(h)}null!=i[a]?n.push(new StringElement(i[a])):n.push(new StringElement(e.substring(u,l))),r=l}}while(null!=s);if(r<e.length){var h=this.doSeperator(e.substring(r,e.length),t,i,a+1);null!=h&&h.length>0&&n.push(h)}return n},AddressMasker.prototype=new AbstractSplitMasker,AddressMasker.prototype.update=function(e){this.formatMeta=u.extend({},AddressMasker.DefaultFormatMeta,e)},AddressMasker.prototype.getExpress=function(){return this.formatMeta.express},AddressMasker.prototype.getReplaceds=function(){return[this.formatMeta.separator]},AddressMasker.prototype.getSeperators=function(){return["(\\s)+?"]},AddressMasker.prototype.getVarElement=function(e){var t={};return"C"==e&&(t.getValue=function(e){return e.country}),"S"==e&&(t.getValue=function(e){return e.state}),"T"==e&&(t.getValue=function(e){return e.city}),"D"==e&&(t.getValue=function(e){return e.section}),"R"==e&&(t.getValue=function(e){return e.road}),"P"==e&&(t.getValue=function(e){return e.postcode}),void 0==typeof t.getValue?new StringElement(e):t},AddressMasker.prototype.formatArgument=function(e){return e},NumberMasker.prototype=new AbstractMasker,NumberMasker.prototype.formatMeta=null,NumberMasker.prototype.update=function(e){this.formatMeta=u.extend({},NumberMasker.DefaultFormatMeta,e)},NumberMasker.prototype.innerFormat=function(e){var t,i,a,n;t=e.value,t>0?(i=this.formatMeta.positiveFormat,n=t+""):0>t?(i=this.formatMeta.negativeFormat,n=(t+"").substr(1,(t+"").length-1)):(i=this.formatMeta.positiveFormat,n=t+""),a=n.indexOf("."),n=this.setTheSeperator(n,a),n=this.setTheMark(n,a);var s=null;return 0>t&&this.formatMeta.isNegRed&&(s="FF0000"),new FormatResult(i.replaceAll("n",n),s)},NumberMasker.prototype.setTheMark=function(e,t){var i,a,n;if(!this.formatMeta.isMarkEnable)return e;for(0>=t&&(t=e.length),a=e.charCodeAt(0),i=0,45==a&&(i=1),n=t-3;n>i;)e=e.substr(0,n-0)+this.formatMeta.markSymbol+e.substr(n,e.length-n),n-=3;return e},NumberMasker.prototype.setTheSeperator=function(e,t){var i;return t>0&&(i=NumberMasker.toCharArray(e),i[t]=this.formatMeta.pointSymbol,e=i.join("")),e},NumberMasker.toCharArray=function(e){for(var e=e.split(""),t=new Array,i=0;i<e.length;i++)t.push(e[i]);return t},NumberMasker.prototype.formatArgument=function(e){var t={};return t.value=e,t},CurrencyMasker.prototype=new NumberMasker,CurrencyMasker.prototype.formatMeta=null,CurrencyMasker.prototype.update=function(e){this.formatMeta=u.extend({},CurrencyMasker.DefaultFormatMeta,e)},CurrencyMasker.prototype.innerFormat=function(e){if(!e.value)return{value:""};var t=new NumberMasker(this.formatMeta).innerFormat(e);return t.value=this.formatMeta.curSymbol+t.value,t},PercentMasker.prototype=new NumberMasker,PercentMasker.prototype.update=function(e){this.formatMeta=u.extend({},NumberMasker.DefaultFormatMeta,e)},PercentMasker.prototype.formatArgument=function(e){return e},PercentMasker.prototype.innerFormat=function(e){var t="";if(""!=e){var i=new NumberMasker(this.formatMeta).innerFormat({value:e}).value,a=String(i),n=a.length-a.indexOf(".")-1,s=n-2;0>s&&(s=0),t=100*parseFloat(i),t=(t*Math.pow(10,s)/Math.pow(10,s)).toFixed(s),t+="%"}return{value:t}},StringElement.prototype=new Object,StringElement.prototype.value="",StringElement.prototype.getValue=function(e){return this.value},FormatResult.prototype=new Object,NumberMasker.DefaultFormatMeta={isNegRed:!0,isMarkEnable:!0,markSymbol:",",pointSymbol:".",positiveFormat:"n",negativeFormat:"-n"},CurrencyMasker.DefaultFormatMeta=u.extend({},NumberMasker.DefaultFormatMeta,{positiveFormat:"n",negativeFormat:"-n"}),AddressMasker.defaultFormatMeta={express:"C S T R P",separator:" "},u.AddressMasker=AddressMasker,u.NumberMasker=NumberMasker,u.CurrencyMasker=CurrencyMasker,u.PercentMasker=PercentMasker,NumberFormater.prototype.update=function(e){this.precision=e},NumberFormater.prototype.format=function(e){if(!u.isNumber(e))return"";for(;"0"==(e+"").charAt(0)&&e.length>1&&0!=(e+"").indexOf("0.");)e=e.substring(1);var t=e;if(u.isNumber(this.precision)){if(window.BigNumber)t=new BigNumber(e).toFixed(this.precision);else{var i=parseFloat(e);t=(Math.round(i*Math.pow(10,this.precision))/Math.pow(10,this.precision)).toFixed(this.precision)}if("NaN"==t)return""}return t},DateFormater.prototype.update=function(e){this.pattern=e},DateFormater.prototype.format=function(e){return moment(e).format(this.pattern)},u.NumberFormater=NumberFormater,u.DateFormater=DateFormater,u.date={_dateLocale:{"zh-CN":{months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"周日_周一_周二_周三_周四_周五_周六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_")},"en-US":{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thurday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"S_M_T_W_T_F_S".split("_")}},_formattingTokens:/(\[[^\[]*\])|(\\)?(Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Q|YYYY|YY|e|E|a|A|hh?|HH?|mm?|ss?|S{1,4}|x|X|zz?|ZZ?|.)/g,leftZeroFill:function(e,t,i){for(var a=""+Math.abs(e),n=e>=0;a.length<t;)a="0"+a;return(n?i?"+":"":"-")+a},_formats:{YY:function(e){return u.date.leftZeroFill(e.getFullYear()%100,2)},YYYY:function(e){return e.getFullYear()},M:function(e){return e.getMonth()+1},MM:function(e){var t=u.date._formats.M(e);return u.date.leftZeroFill(t,2)},MMM:function(e,t){var i=e.getMonth();return u.date._dateLocale[t].monthsShort[i]},MMMM:function(e,t){var i=e.getMonth();return u.date._dateLocale[t].months[i]},D:function(e){return e.getDate()},DD:function(e){var t=u.date._formats.D(e);return u.date.leftZeroFill(t,2)},d:function(e){return e.getDay()},dd:function(e,t){var i=u.date._formats.d(e);return u.date._dateLocale[t].weekdaysMin[i]},ddd:function(e,t){var i=u.date._formats.d(e);return u.date._dateLocale[t].weekdaysShort[i]},dddd:function(e,t){var i=u.date._formats.d(e);return u.date._dateLocale[t].weekdays[i]},a:function(e){return e.getHours()>12?"pm":"am"},h:function(e){var t=e.getHours();return t=t>12?t-12:t},hh:function(e){var t=u.date._formats.h(e);return u.date.leftZeroFill(t,2)},H:function(e){return e.getHours()},HH:function(e){return u.date.leftZeroFill(e.getHours(),2)},m:function(e){return e.getMinutes()},mm:function(e){return u.date.leftZeroFill(e.getMinutes(),2)},s:function(e){return e.getSeconds()},ss:function(e){return u.date.leftZeroFill(e.getSeconds(),2)}},format:function(e,t,i){if(!e)return e;var a,n,s=t.match(u.date._formattingTokens),r="",o=u.date.getDateObj(e);if(!o)return e;for(i=i||u.core.getLanguages(),a=0,n=s.length;n>a;a++)r+=u.date._formats[s[a]]?u.date._formats[s[a]](o,i):s[a];return r},_addOrSubtract:function(e,t,i,a){var n=e.getTime(),s=e.getDate(),r=e.getMonth(),o=u.date.getDateObj(e);return"ms"===t?(n+=i*a,o.setTime(n)):"s"==t?(n+=1e3*i*a,o.setTime(n)):"m"==t?(n+=6e4*i*a,o.setTime(n)):"h"==t?(n+=36e5*i*a,o.setTime(n)):"d"==t?(s+=i*a,o.setDate(s)):"w"==t?(s+=7*i*a,o.setDate(s)):"M"==t?(r+=i*a,o.setMonth(s)):"y"==t&&(r+=12*i*a,o.setMonth(s)),o},add:function(e,t,i){return u.date._addOrSubtract(e,t,i,1)},sub:function(e,t,i){return u.date._addOrSubtract(e,t,i,-1)},getDateObj:function(e){if(!e||"undefined"==typeof e)return e;var t=!1,i=new Date(e);if(isNaN(i)){var a,n,s,r,o,u;if(a=e.indexOf("-"),n=e.indexOf(":"),s=e.indexOf(" "),a>0||n>0||s>0)i=new Date,s>0?(u=e.split(" "),r=u[0].split("-"),o=u[1].split(":")):a>0?r=e.split("-"):n>0&&(o=e.split(":")),r&&r.length>0&&(i.setYear(r[0]),i.setMonth(parseInt(r[1]-1)),i.setDate(r[2]?r[2]:0),t=!0),o&&o.length>0&&(i.setHours(o[0]?o[0]:0),i.setMinutes(o[1]?o[1]:0),i.setSeconds(o[2]?o[2]:0),t=!0);else{if(i=new Date(parseInt(e)),isNaN(i))throw new TypeError("invalid Date parameter");t=!0}}else t=!0;return t?i:null}},u.floatRender=function(e,t){var i=e;if("undefined"==typeof e||null===e)return e;"function"==typeof e&&(i=e());var a=u.core.getMaskerMeta("float")||{};"number"==typeof t&&(a.precision=t);var n=new u.NumberFormater(a.precision),s=new NumberMasker(a);return s.format(n.format(i)).value},u.integerRender=function(e){var t=e;return"undefined"==typeof e||null===e?e:("function"==typeof e&&(t=e()),t)};var _dateRender=function(e,t,i){var a=e;if("undefined"==typeof e||null===e)return e;"function"==typeof e&&(a=e());var n=u.core.getMaskerMeta(i)||{};"undefined"!=typeof t&&(n.format=t);var s=u.date.format(a,n.format);return s};u.dateRender=function(e,t){return _dateRender(e,t,"date")},u.dateTimeRender=function(e,t){return _dateRender(e,t,"datetime")},u.timeRender=function(e,t){return _dateRender(e,t,"time")},u.percentRender=function(e){var t=e;if("undefined"==typeof e||null===e)return e;"function"==typeof e&&(t=e());var i=u.core.getMaskerMeta("percent")||{},a=new PercentMasker(i),n=a.format(t);return n&&n.value?n.value:""},u.dateToUTCString=function(e){if(!e)return"";e.indexOf("-")>-1&&(e=e.replace(/\-/g,"/"));var t=Date.parse(e);return isNaN(t)?"":t};var _hotkeys={};_hotkeys.special_keys={27:"esc",9:"tab",32:"space",13:"enter",8:"backspace",145:"scroll",20:"capslock",144:"numlock",19:"pause",45:"insert",36:"home",46:"del",35:"end",33:"pageup",34:"pagedown",37:"left",38:"up",39:"right",40:"down",112:"f1",113:"f2",114:"f3",115:"f4",116:"f5",117:"f6",118:"f7",119:"f8",120:"f9",121:"f10",122:"f11",123:"f12"},_hotkeys.shift_nums={"`":"~",1:"!",2:"@",3:"#",4:"$",5:"%",6:"^",7:"&",8:"*",9:"(",0:")","-":"_","=":"+",";":":","'":'"',",":"<",".":">","/":"?","\\":"|"},_hotkeys.add=function(e,t,i){u.isFunction(t)&&(i=t,t={});var a={},n={type:"keydown",propagate:!1,disableInInput:!1,target:document.body,checkParent:!0},s=this;a=u.extend(a,n,t||{}),e=e.toLowerCase();var r=function(e){var t=this;if(t=3==t.nodeType?t.parentNode:t,a.disableInInput){var i=t;if("INPUT"==i.tagName||"TEXTAREA"==i.tagName)return}var n=e.which,r=e.type,o=String.fromCharCode(n).toLowerCase(),u=s.special_keys[n],l=e.shiftKey,h=e.ctrlKey,d=e.altKey,c=null;if(a.checkParent)for(;!t["u.hotkeys"]&&t.parentNode;)t=t.parentNode;var f=t["u.hotkeys"].events[r].callbackMap;if(l||h||d){var p="";d&&(p+="alt+"),h&&(p+="ctrl+"),l&&(p+="shift+"),c=f[p+u]||f[p+o]||f[p+s.shift_nums[o]]}else c=f[u]||f[o];return c&&(c.cb(e),!c.propagate)?(e.stopPropagation(),e.preventDefault(),!1):void 0},o=a.target["u.hotkeys"];return o||(a.target["u.hotkeys"]=o={events:{}}),o.events[a.type]||(o.events[a.type]={callbackMap:{}},u.on(a.target,a.type,r)),o.events[a.type].callbackMap[e]={cb:i,propagate:a.propagate},u.hotkeys},_hotkeys.remove=function(e,t){t=t||{},target=t.target||document.body,type=t.type||"keydown",e=e.toLowerCase(),delete target["u.hotkeys"].events[type].callbackMap[e]},_hotkeys.scan=function(e,t){e=e||document.body,e.querySelectorAll("[u-enter]").forEach(function(i){var a=i.getAttribute("u-enter");if(a)if("#"==a.substring(0,1))u.hotkeys.add("enter",{target:this},function(){var t=e.querySelector(a);t&&t.focus()});else{t=t||window;var n=u.getFunction(t,a);u.hotkeys.add("enter",{target:this},function(){n.call(this)})}}),e.querySelectorAll("[u-hotkey]").forEach(function(e){var t=e.getAttribute("u-hotkey");t&&u.hotkeys.add(t,function(){e.click()})})},u.hotkeys=_hotkeys;var App=function(){this.dataTables={}};App.fn=App.prototype,App.fn.init=function(e,t,i){var a=this;t=t||document.body,u.isArray(t)||(t=[t]),this.elements=t,u.each(this.elements,function(t,n){"string"==typeof n&&(n=document.querySelector(n)),n&&n.querySelectorAll("[u-meta]").forEach(function(t){var i=JSON.parse(t.getAttribute("u-meta"));if(i.type=i.type||"string",i&&i.type){a.adjustFunc&&a.adjustFunc.call(a,i);var n=u.compMgr.createDataAdapter({el:t,options:i,model:e,app:a});t["u-meta"]=n}}),u.hotkeys&&u.hotkeys.scan(n),"undefined"!=typeof i&&1!=i||ko.applyBindings(e,n),u.compMgr.updateComp(n)}),_getDataTables(this,e)},App.fn.createComp=function(e,t){var i=JSON.parse(e.getAttribute("u-meta"));if(i&&i.type){var a=u.compMgr.createDataAdapter({el:e,options:i,model:t,app:this});e["u-meta"]=a}return a},App.fn.setAdjustMetaFunc=function(e){this.adjustFunc=e},App.fn.addDataTable=function(e){return this.dataTables[e.id]=e,this},App.fn.getDataTable=function(e){return this.dataTables[e]},App.fn.getDataTables=function(){return this.dataTables},App.fn.getComp=function(e){var t=null;return u.each(this.elements,function(i,a){"string"==typeof a&&(a=document.querySelector(a)),a&&a.querySelectorAll("[u-meta]").forEach(function(i){if(i["u-meta"]){var a=i["u-meta"];if(a.id===e)return t=a,!1}})}),t},App.fn.getCompsByDataTable=function(e,t){for(var i=this.getComps(t),a=[],n=0;n<i.length;n++)(i[n].dataModel&&i[n].dataModel.id==e||i[n].dataTable&&i[n].dataTable.id==e)&&a.push(i[n]);return a},App.fn.getComps=function(e){var t=e?e:this.elements,i=[];return"string"==typeof t&&(t=document.querySelectorAll(t)),u.isArray(t)||t instanceof NodeList||(t=[t]),u.each(t,function(e,t){t&&t.querySelectorAll("[u-meta]").forEach(function(e){if(e["u-meta"]){var t=e["u-meta"];t&&i.push(t)}})}),i},App.fn.compsValidate=function(e,t){for(var i=this.getComps(e),a=!0,n=[],s=0;s<i.length;s++)if(i[s].doValidate){var r=i[s].doValidate({trueValue:!0,showMsg:!0});r="object"==typeof r?r.passed:r,a=r&&a,r||n.push(i[s])}return t?n:a},App.fn.compsValidateMultiParam=function(e){for(var t=e.element,i=this.getComps(t),a=!0,n=e.showMsg,s=new Array,r=0;r<i.length;r++)i[r].doValidate&&(result=i[r].doValidate({trueValue:!0,showMsg:n}),a=result.passed&&a,result.passed||s.push(result));return{passed:a,notPassedArr:s}},App.fn.showComp=function(e){var t=e.element,i=u.getOffset(t),a=u.getScroll(t),n=i.top-a.top,s=document.body.clientHeight,r=document.body.scrollTop;(n>s||0>n)&&(document.body.scrollTop=r+n)},App.fn.getCompsByType=function(e,t){var i=t?t:this.elements,a=[];return u.isArray(i)||(i=[i]),u.each(i,function(t,i){i&&i.querySelectorAll("[u-meta]").forEach(function(t){if(t["u-meta"]){var i=t["u-meta"];i&&i.type==e&&a.push(i)}})}),a},App.fn.getEnvironment=function(){return window.iweb.Core.collectEnvironment()},App.fn.setClientAttribute=function(e,t){window.iweb.Core.setClientAttribute(e,t)},App.fn.getClientAttribute=function(e){return window.iweb.Core.getClientAttributes()[e]},App.fn.serverEvent=function(){return new ServerEvent(this)},App.fn.ajax=function(e){e=this._wrapAjax(e),u.ajax(e)},App.fn._wrapAjax=function(e){var t=this;this.serverEventObj=this.serverEvent();var i=e.success,a=e.error,n=e.deferred;return n&&n.resolve||(n={resolve:function(){},reject:function(){}}),e.success=function(e,a,s){"string"==typeof e&&(e=JSON.parse(e)),t.serverEventObj.processXHRError(t,e,a,s)?(i.call(null,e),t._successFunc(e,n)):n.reject()},e.error=function(e,i,s){"string"==typeof e&&(e=JSON.parse(e)),t.serverEventObj.processXHRError(t,e,i,s)?(a.call(null,e),t._successFunc(e,n)):n.reject()},e.data?e.data.environment=ko.utils.stringifyJson(window.iweb.Core.collectEnvironment()):e.data={environment:ko.utils.stringifyJson(window.iweb.Core.collectEnvironment())},e},App.fn._successFunc=function(e,t){t.resolve()},window.processXHRError=function(rsl,state,xhr){return"string"==typeof rsl&&(rsl=JSON.parse(rsl)),xhr.getResponseHeader&&xhr.getResponseHeader("X-Error")?(u.showMessageDialog({type:"info",title:"提示",msg:rsl.message,backdrop:!0}),rsl.operate&&eval(rsl.operate),!1):!0},App.fn.setUserCache=function(e,t){var i=this.getEnvironment().usercode;i&&localStorage.setItem(i+e,t)},App.fn.getUserCache=function(e){var t=this.getEnv