window.ol||(window.ol={});ol.pkg=function(j,h,g){var d,e,b;if(arguments.length==3){d=j;e=h;b=g}else{d=window;e=j;b=h}if(!e||!e.length){return null}var m=e.split(".");for(var l=d,k=0;k<m.length-1;k++){l[m[k]]||(l[m[k]]={});l=l[m[k]]}l=(l[m[m.length-1]]=b||l[m[m.length-1]]||{});return l};ol.Cache={_cache:{},size:0,set:function(b,a){if(this._cache[b]){this.size++}this._cache[b]=a;return a},get:function(c,a){var b=this._cache[c];if(b){return b}this.size++;if(typeof(a)=="function"){b=a();this._cache[c]=b}else{if(a){b=a;this._cache[c]=b}else{b=jQuery(c);this._cache[c]=b}}return b},remove:function(a){this.size--;this._cache[a]=null}};ol.pkg("ol.lang");if(!
/*@cc_on!@*/
0&&window.JSON&&window.JSON.parse&&window.JSON.stringify){ol.lang.json=(function(){var a=/___$/;return{parse:function(c){try{return window.JSON.parse(c)}catch(b){return false}},stringify:function(c){try{return window.JSON.stringify(c,function(d,e){return !a.test(d)?e:null})}catch(b){return null}}}})()}else{ol.lang.json=function(){function f(n){return n<10?"0"+n:n}Date.prototype.toJSON=function(){return[this.getUTCFullYear(),"-",f(this.getUTCMonth()+1),"-",f(this.getUTCDate()),"T",f(this.getUTCHours()),":",f(this.getUTCMinutes()),":",f(this.getUTCSeconds()),"Z"].join("")};var m={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};function stringify(value){var a,i,k,l,r=/["\\\x00-\x1f\x7f-\x9f]/g,v;switch(typeof value){case"string":return r.test(value)?'"'+value.replace(r,function(a){var c=m[a];if(c){return c}c=a.charCodeAt();return"\\u00"+Math.floor(c/16).toString(16)+(c%16).toString(16)})+'"':'"'+value+'"';case"number":return isFinite(value)?String(value):"null";case"boolean":case"null":return String(value);case"object":if(!value){return"null"}a=[];if(typeof value.length==="number"&&!value.propertyIsEnumerable("length")){l=value.length;for(i=0;i<l;i+=1){a.push(stringify(value[i])||"null")}return"["+a.join(",")+"]"}for(k in value){if(k.match("___$")){continue}if(value.hasOwnProperty(k)){if(typeof k==="string"){v=stringify(value[k]);if(v){a.push(stringify(k)+":"+v)}}}}return"{"+a.join(",")+"}"}}return{stringify:stringify,parse:function(text){if(/^[\],:{}\s]*$/.test(text.replace(/\\["\\\/b-u]/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,""))){return eval("("+text+")")}return false}}}()}Array.prototype.indexOf=function(e,h){var b,a,g="\0";if(h!=null){b=this.slice(h);a=h}else{b=this;a=0}var f=g+b.join(g)+g,c=f.indexOf(g+e+g);if(c==-1){return -1}a+=f.slice(0,c).replace(/[^\0]/g,"").length;return a};Array.prototype.clone=function(){return this.slice(0)};String.prototype.endWith=function(a){if(a==null||a==""||this.length==0||a.length>this.length){return false}if(this.substring(this.length-a.length)==a){return true}else{return false}return true};String.prototype.startWith=function(a){if(a==null||a==""||this.length==0||a.length>this.length){return false}if(this.substr(0,a.length)==a){return true}else{return false}return true};String.prototype.trim=function(){return this.replace(/^(\s|\u00A0)+|(\s|\u00A0)+$/g,"")};String.prototype.len=function(){return this.replace(/[^\x00-\xff]/g,"aa").length};String.prototype.replaceAll=function(b,a){return this.replace(new RegExp(b,"gm"),a)};String.prototype.parseDate=function(m){var c={"\\.":{v:"\\."},"\\?":{v:"\\?"},"M+":{v:"(0[1-9]|1[0-2]|[1-9])",k:"MM"},"d+":{v:"(3[01]|[12][0-9]|0[1-9]|[1-9])",k:"dd"},"y+":{v:"(\\d{4})",k:"yyyy"},"H+":{v:"(2[0-3]|[01][0-9]|[0-9])",k:"HH"},"m+":{v:"([0-5][0-9]|[0-9])",k:"mm"},"s+":{v:"([0-5][0-9]|[0-9])",k:"ss"},S:{v:"(\\d+)",k:"S"}};var j=[];var e=m;var b;var g;for(var f in c){if((b=m.search(new RegExp("("+f+")")))!=-1){g=c[f];e=e.replace(RegExp.$1,g.v);if(g.k){j.push({n:g.k,order:b})}}}j.sort(function(k,d){return k.order-d.order});g={};for(var h=0;h<j.length;h++){g[j[h].n]=h+1}var a=this.match(new RegExp(e));if(!a){throw"Invalid String for parse to Date!"}var l=new Date();if(g.yyyy){l.setFullYear(a[g.yyyy])}if(g.dd){l.setDate(a[g.dd])}else{l.setDate(1)}if(g.MM){l.setMonth(a[g.MM]-1)}if(g.HH){l.setHours(a[g.HH])}else{l.setHours(0)}if(g.mm){l.setMinutes(a[g.mm])}else{l.setMinutes(0)}if(g.ss){l.setSeconds(a[g.ss])}else{l.setSeconds(0)}if(g.S){l.setMilliseconds(a[g.S])}else{l.setMilliseconds(0)}return l};Date.prototype.format=function(a){var d={"M+":this.getMonth()+1,"d+":this.getDate(),"h+":this.getHours()%12==0?12:this.getHours()%12,"H+":this.getHours(),"m+":this.getMinutes(),"s+":this.getSeconds(),"q+":Math.floor((this.getMonth()+3)/3),S:this.getMilliseconds()};var c={"0":"\u65e5","1":"\u4e00","2":"\u4e8c","3":"\u4e09","4":"\u56db","5":"\u4e94","6":"\u516d"};if(/(y+)/.test(a)){a=a.replace(RegExp.$1,(this.getFullYear()+"").substr(4-RegExp.$1.length))}if(/(E+)/.test(a)){a=a.replace(RegExp.$1,((RegExp.$1.length>1)?(RegExp.$1.length>2?"\u661f\u671f":"\u5468"):"")+c[this.getDay()+""])}for(var b in d){if(new RegExp("("+b+")").test(a)){a=a.replace(RegExp.$1,(RegExp.$1.length==1)?(d[b]):(("00"+d[b]).substr((""+d[b]).length)))}}return a};ol.pkg("ol.util");ol.util.trim=function(a){if(a==null){return""}return a.trim()};ol.util.isEmpty=function(a){if(ol.util.trim(a)==""){return true}return false};ol.util.isDate=function(a){if(a==null||a==""){return false}re=/\d{4}-{1}\d{2}-{1}\d{2}$/;return a.match(re)};ol.util.isNumeric=function(a){strRef="1234567890";if(a==""){return false}for(i=0;i<a.length;i++){tempChar=a.substring(i,i+1);if(strRef.indexOf(tempChar,0)==-1){return false}}return true};ol.util.isFloat=function(b){var a=/^[0-9]+.?[0-9]*$/;return a.test(s)};ol.util.isEmail=function(e,f){if(!e){return false}var c=/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/;var d=new RegExp(c);var a;if(f){a=e.split(f)}else{a=[e]}for(var b=0;b<a.length;b++){if(a[b].match(d)==null){return false}}return true};ol.util.isFunction=function(a){if(!a){return false}return Object.prototype.toString.call(a)==="[object Function]"};ol.util.isArray=function(a){if(!a){return false}return Object.prototype.toString.call(a)==="[object Array]"};ol.util.isObject=function(a){if(!a){return false}return Object.prototype.toString.call(a)==="[object Object]"};(function(){ol.template=function(h){this.init=function(){h=c(h);var k;for(var j=0;j<h.length;j++){k=e(h[j]);f[k[0]]=a(k)}};this.parse=function(j,k){if(!j||!(j=f[j])){return""}return d(j,k)};this.init()};ol.template.parse=function(j,k){var h=d(a(e(j)),k);return h};ol.template.startDelimiter="<!--";ol.template.endDelimiter="-->";var f={},g=new RegExp(ol.template.startDelimiter+"#macro .*?"+ol.template.endDelimiter+"[\\s\\S]*?"+ol.template.startDelimiter+"/#macro.*"+ol.template.endDelimiter,"g"),c=function(h){return h.match(g)},b=new RegExp("("+ol.template.startDelimiter+"(/?)#([\\s\\S]*?)"+ol.template.endDelimiter+")|(')|([\r\n\t])|({#([^}]*?)})","g"),e=function(q){var p=q.replace(b,function(v,t,B,A,z,y,x,w){if(t){return"\n"+(B?"-":"+")+A.replace(/[\r\n\t]/g,"")+"\n"}if(z){return"\\'"}if(y){return""}if(x){return"'+("+w.replace(/\\'/g,"'")+")+'"}});p=p.split(/\n/);var r,l,j,u,h,m=["var f=[];"];for(var k=0;k<p.length;k++){r=p[k];if(!r){continue}l=r.charAt(0);if(l!=="+"&&l!=="-"){m.push("f.push('"+r+"');");continue}j=r.split(/\s/);switch(j[0]){case"+macro":u=j[1];h=j[2];m.push('f.push("<!--'+u+' start-->");');break;case"-macro":m.push('f.push("<!--'+u+' end-->");');break;case"+elseif":j.splice(0,1);m.push("}else if"+j.join(" ")+"{");break;case"+else":m.push("}else{");break;case"+if":case"+for":case"+switch":j[0]=j[0].substr(1);m.push(j.join(" ")+"{");break;case"+case":case"+default":j[0]=j[0].substr(1);m.push(j.join(" ")+":");break;case"-switch":case"-for":case"-if":m.push("}");break;case"+list":if(j.length!=4){throw u+": list command error!"}var o=j[3]+"_index";var n=j[3]+"_length";m.push("if("+j[1]+".constructor === Array){");m.push("var "+j[3]+";");m.push("var "+n+"="+j[1]+".length;");m.push("var "+o+";");m.push("for(var _$_i="+n+";_$_i--;){");m.push(o+"="+n+"-_$_i-1;");m.push(j[3]+"="+j[1]+"["+o+"];");break;case"-list":m.push("}}");break;case"+break":m.push("break;");break;case"-list":m.push("}}}");break;case"+eval":j.splice(0,1);m.push(j.join(" "));break;case"+var":j[0]=j[0].substr(1);m.push(j.join(" ")+";");break;default:break}}m.push("return f.join('');");return[u,h||"data",m.join("")]},a=function(h){try{return new Function(h[1],h[2])}catch(j){logger.error("template:"+h[0],j)}},d=function(h,j){return h(j)}})();ol.pkg("ol.form.validator");(function(){var d=function(m,l){if(logger&&logger.warn){logger.warn(m,l)}};var k=function(m,l){if(logger&&logger.error){logger.error(m,l)}};var g={allowEmpty:true,async:true};var a={};var h={};var j=function(q,u,m,n,t,l){jQuery.extend(l,m);if(n){t=h[n];if(!t){d(n+" rule is undefined!");return true}}var o;if(n){l.type=n}if(t.length==3){o=t(q,u,l)}else{o=t(q,l)}if(!o){if(l.errorFunction){var p=function(){l.errorFunction(u||q,l)};if(m.async){setTimeout(p,1)}else{p()}}return false}return true};var b=function(q,r,n,l){if(!n.type){if(!j(q,r,n,null,n.rule,l)){return false}}else{var o=n.type;if(typeof(n.type)=="string"){o=[n.type]}var p={};for(var m=0;m<o.length;m++){if(!p[o[m]]){if(!j(q,r,n,o[m],null,l)){return false}p[o[m]]=1}}}return true};var e=function(n){var p=n.attr("validator");if(!p){return true}var m=a[p];var v;switch(n.attr("tagName")){case"SELECT":v=n.val();break;default:v=n[0].value}var r={};var t=[];for(var o=0;o<m.length;o++){var q={};if(!b(v,n,m[o],q)){return false}t.push(q)}for(var o=0;o<m.length;o++){var u=m[o];if(u.successFunction){if(u.async){var l=t[o];setTimeout(function(){u.successFunction(n||v,l)},1)}else{u.successFunction(n||v,t[o])}}}return true};ol.form.validator=function(p,n){if(typeof(n)=="object"){var q={};if(b(p,null,n,q)&&n.successFunction){if(n.async){setTimeout(function(){n.successFunction(p,q)},1)}else{n.successFunction(p,q)}}return}var l=p,o=n;var u=jQuery(l);var v=u.attr("tagName");o=(typeof(o)=="boolean"?o:true);switch(v){case"SELECT":case"INPUT":case"TEXTAREA":return e(u)}var r=u.find("select[validator],input[validator],textarea[validator]");var t=true;for(var m=0;m<r.length;m++){if(!e(jQuery(r[m]))){if(o){return false}else{t=false}}}return t};ol.form.validator.register=function(m,l){h[m]=l};ol.form.validator.get=function(l){return h[l]};var c=0;ol.form.validator.bind=function(n,m){if(!ol.util.isArray(m)){m=[m]}var p=[];var t=jQuery(n);for(var q=0;q<t.length;q++){var r=jQuery(t[q]);var l=r.attr("validator");if(!l){l="validator"+(++c)+(new Date()).getTime();r.attr("validator",l)}if(!a[l]){a[l]=[]}for(var o=0;o<m.length;o++){m[o]=jQuery.extend({},g,m[o]);a[l].push(m[o])}p.push(l)}return p};var f=ol.form.validator;f.register("regex",function(m,l){if(l.allowEmpty&&ol.util.isEmpty(m)){return true}if(!l.regex){k("regex","need parameter of 'regex'!");return false}return l.regex.test(m)});f.register("require",function(m,l){l.allowEmpty=false;return !ol.util.isEmpty(m)});f.register("email",function(m,l){if(l.allowEmpty&&ol.util.isEmpty(m)){return true}var n=null;if(l.separater){n=l.separater}return ol.util.isEmail(m,n)});f.register("eq",function(o,l){if(!l.compareTo){k("eq","need parameter of 'compareTo'!");return false}var m=jQuery(l.compareTo).val();if(!l.format){return o==m}var n=f.get("date");if(!(n(o,l)&&n(m,l))){return false}return o.parseDate(l.format).getTime()==m.parseDate(l.format).getTime()});f.register("lt",function(p,m){if(m.allowEmpty&&ol.util.isEmpty(p)){return true}if(!m.compareTo){k("lt","need parameter of 'compareTo'!");return false}var n=jQuery(m.compareTo).val();if(!m.format){m.negative=true;var l=f.get("float");if(!l(p,m)){return false}if(!l(n,m)){return false}p=parseFloat(p);n=parseFloat(n);return p<n}var o=f.get("date");if(!(o(p,m)&&o(n,m))){return false}return p.parseDate(m.format)<n.parseDate(m.format)});f.register("le",function(o,n){var m=f.get("eq");var l=f.get("lt");return m(o,n)||l(o,n)});f.register("gt",function(p,m){if(m.allowEmpty&&ol.util.isEmpty(p)){return true}if(!m.compareTo){k("gt","need parameter of 'compareTo'!");return false}var n=jQuery(m.compareTo).val();if(!m.format){m.negative=true;var l=f.get("float");if(!l(p,m)){return false}if(!l(n,m)){return false}p=parseFloat(p);n=parseFloat(n);return p>n}var o=f.get("date");if(!(o(p,m)&&o(n,m))){return false}return p.parseDate(m.format)>n.parseDate(m.format)});f.register("ge",function(o,n){var l=f.get("eq");var m=f.get("gt");return l(o,n)||m(o,n)});f.register("length",function(n,m){if(m.allowEmpty&&ol.util.isEmpty(n)){return true}if(!(m.min||m.max)){k("length","need parameter of 'min' or 'max'!");return false}var l=n.len();if(m.min&&l<m.min){return false}if(m.max&&l>m.max){return false}return true});f.register("range",function(o,n){if(n.allowEmpty&&ol.util.isEmpty(o)){return true}if(!(n.min||n.max)){k("range","need parameter of 'min' or 'max'!");return false}n.negative=true;var m=f.get("float");if(!m(o,n)){return false}var l=parseFloat(o);if(n.min&&l<n.min){return false}if(n.max&&l>n.max){return false}return true});f.register("chinese",function(m,l){if(l.allowEmpty&&ol.util.isEmpty(m)){return true}l.regex=/^[\u4E00-\u9FA5]$/;return f.get("regex")(m,l)});f.register("int",function(m,l){if(l.allowEmpty&&ol.util.isEmpty(m)){return true}if(l.negative){l.regex=/^[-]?\d+$/}else{l.regex=/^\d+$/}return f.get("regex")(m,l)});f.register("float",function(m,l){if(l.allowEmpty&&ol.util.isEmpty(m)){return true}if(l.negative){l.regex=/^[-]?\d+(\.\d+)?$/}else{l.regex=/^\d+(\.\d+)?$/}return f.get("regex")(m,l)});f.register("date",function(q,n){if(n.allowEmpty&&ol.util.isEmpty(q)){return true}if(!n.format){d("date","need parameter of 'format'!");return false}var p={"\\.":"\\.","M+":"(0[1-9]|[1-9]|1[0-2])","d+":"(0[1-9]|[1-9]|[12][0-9]|3[01])","y+":"(\\d{4})","H+":"([0-9]|[01][0-9]|2[0-3])","m+":"([0-9]|[0-5][0-9])","s+":"([0-9]|[0-5][0-9])",S:"(\\d+)"};var l=n.format;for(var m in p){if(new RegExp("("+m+")").test(n.format)){l=l.replace(RegExp.$1,p[m])}}n.regex=new RegExp("^"+l+"$");if(!f.get("regex")(q,n)){return false}return q==q.parseDate(n.format).format(n.format)});f.register("url",function(m,l){if(l.allowEmpty&&ol.util.isEmpty(m)){return true}if(m.startWith("http://")){m=m.substring(7)}else{if(m.startWith("https://")){m=m.substring(8)}else{if(l.requireProtocol){return false}}}if(!m){return false}l.regex=/^[A-Za-z0-9]+\.[A-Za-z0-9]+[\/=\?%\-&_~`@[\]\':+!]*([^<>\"\"])*$/;return f.get("regex")(m,l)})})();
