/*
Copyright 2013, KISSY UI Library v1.31
MIT Licensed
build time: Jul 25 15:56
*/
var KISSY=function(a){var b=this,g,l=0;return g={__BUILD_TIME:"20130725155557",Env:{host:b},Config:{debug:"",fns:{}},version:"1.31",config:function(b,j){var k,h,d=this,f,c=g.Config,e=c.fns;g.isObject(b)?g.each(b,function(a,n){(f=e[n])?f.call(d,a):c[n]=a}):(k=e[b],j===a?h=k?k.call(d):c[b]:k?h=k.call(d,j):c[b]=j);return h},log:function(i,j,k){if(g.Config.debug&&(k&&(i=k+": "+i),b.console!==a&&console.log))console[j&&console[j]?j:"log"](i)},error:function(a){if(g.Config.debug)throw a instanceof
Error?a:Error(a);},guid:function(a){return(a||"")+l++}}}();
(function(a,b){function g(){}function l(e,a){var n;d?n=d(e):(g.prototype=e,n=new g);n.constructor=a;return n}function i(e,f,n,c,d,g){if(!f||!e)return e;var k,l,u,v;f[j]=e;g.push(f);u=a.keys(f);v=u.length;for(k=0;k<v;k++)if(l=u[k],l!=j){var w=e,t=f,z=n,B=c,C=d,D=g;if(z||!(l in w)||C){var A=w[l],y=t[l];if(A===y)A===b&&(w[l]=A);else if(B&&(y=B.call(t,l,y)),C&&y&&(a.isArray(y)||a.isPlainObject(y)))y[j]?w[l]=y[j]:(t=A&&(a.isArray(A)||a.isPlainObject(A))?A:a.isArray(y)?[]:{},w[l]=t,i(t,y,z,B,h,D));else if(y!==
b&&(z||!(l in w)))w[l]=y}}return e}var j="__MIX_CIRCULAR",k=this,h=!0,d=Object.create,f=!{toString:1}.propertyIsEnumerable("toString"),c="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toString,toLocaleString,valueOf".split(",");(function(e,a){for(var n in a)e[n]=a[n]})(a,{stamp:function(e,f,n){var n=n||"__~ks_stamped",c=e[n];if(!c&&!f)try{c=e[n]=a.guid(n)}catch(d){c=b}return c},keys:function(e){var a=[],n,b;for(n in e)a.push(n);if(f)for(b=c.length-1;0<=b;b--)n=c[b],e.hasOwnProperty(n)&&
a.push(n);return a},mix:function(e,f,n,c,d){"object"===typeof n&&(c=n.whitelist,d=n.deep,n=n.overwrite);if(c&&"function"!==typeof c)var g=c,c=function(e,n){return a.inArray(e,g)?n:b};n===b&&(n=h);var k=[],l=0;for(i(e,f,n,c,d,k);f=k[l++];)delete f[j];return e},merge:function(e){var e=a.makeArray(arguments),f={},n,b=e.length;for(n=0;n<b;n++)a.mix(f,e[n]);return f},augment:function(e,f){var n=a.makeArray(arguments),c=n.length-2,d=1,h=n[c],j=n[c+1];a.isArray(j)||(h=j,j=b,c++);"boolean"!==typeof h&&(h=
b,c++);for(;d<c;d++)a.mix(e.prototype,n[d].prototype||n[d],h,j);return e},extend:function(e,f,n,b){if(!f||!e)return e;var c=f.prototype,d;d=l(c,e);e.prototype=a.mix(d,e.prototype);e.superclass=l(c,f);n&&a.mix(d,n);b&&a.mix(e,b);return e},namespace:function(){var e=a.makeArray(arguments),f=e.length,n=null,b,c,d,j=e[f-1]===h&&f--;for(b=0;b<f;b++){d=(""+e[b]).split(".");n=j?k:this;for(c=k[d[0]]===n?1:0;c<d.length;++c)n=n[d[c]]=n[d[c]]||{}}return n}})})(KISSY);
(function(a,b){var g=Array.prototype,l=g.indexOf,i=g.lastIndexOf,j=g.filter,k=g.every,h=g.some,d=g.map;a.mix(a,{each:function(f,c,e){if(f){var m,n,d=0;m=f&&f.length;n=m===b||"function"===a.type(f);e=e||null;if(n)for(n=a.keys(f);d<n.length&&!(m=n[d],!1===c.call(e,f[m],m,f));d++);else for(n=f[0];d<m&&!1!==c.call(e,n,d,f);n=f[++d]);}return f},indexOf:l?function(a,b){return l.call(b,a)}:function(a,b){for(var e=0,m=b.length;e<m;++e)if(b[e]===a)return e;return-1},lastIndexOf:i?function(a,b){return i.call(b,
a)}:function(a,b){for(var e=b.length-1;0<=e&&b[e]!==a;e--);return e},unique:function(f,b){var e=f.slice();b&&e.reverse();for(var m=0,n,d;m<e.length;){for(d=e[m];(n=a.lastIndexOf(d,e))!==m;)e.splice(n,1);m+=1}b&&e.reverse();return e},inArray:function(f,b){return-1<a.indexOf(f,b)},filter:j?function(a,b,e){return j.call(a,b,e||this)}:function(f,b,e){var m=[];a.each(f,function(a,f,d){b.call(e||this,a,f,d)&&m.push(a)});return m},map:d?function(a,b,e){return d.call(a,b,e||this)}:function(a,b,e){for(var m=
a.length,n=Array(m),d=0;d<m;d++){var h="string"==typeof a?a.charAt(d):a[d];if(h||d in a)n[d]=b.call(e||this,h,d,a)}return n},reduce:function(a,d,e){var m=a.length;if("function"!==typeof d)throw new TypeError("callback is not function!");if(0===m&&2==arguments.length)throw new TypeError("arguments invalid");var n=0,h;if(3<=arguments.length)h=arguments[2];else{do{if(n in a){h=a[n++];break}n+=1;if(n>=m)throw new TypeError;}while(1)}for(;n<m;)n in a&&(h=d.call(b,h,a[n],n,a)),n++;return h},every:k?function(a,
b,e){return k.call(a,b,e||this)}:function(a,b,e){for(var d=a&&a.length||0,n=0;n<d;n++)if(n in a&&!b.call(e,a[n],n,a))return!1;return!0},some:h?function(a,b,e){return h.call(a,b,e||this)}:function(a,b,e){for(var d=a&&a.length||0,n=0;n<d;n++)if(n in a&&b.call(e,a[n],n,a))return!0;return!1},makeArray:function(b){if(null==b)return[];if(a.isArray(b))return b;var d=typeof b.length,e=typeof b;if("number"!=d||b.alert||"string"==e||"function"==e&&!("item"in b&&"number"==d))return[b];for(var d=[],e=0,m=b.length;e<
m;e++)d[e]=b[e];return d}})})(KISSY);
(function(a,b){function g(e){var a=typeof e;return null==e||"object"!==a&&"function"!==a}function l(){if(d)return d;var e=j;a.each(k,function(a){e+=a+"|"});e=e.slice(0,-1);return d=RegExp(e,"g")}function i(){if(f)return f;var e=j;a.each(h,function(a){e+=a+"|"});e+="&#(\\d{1,5});";return f=RegExp(e,"g")}var j="",k={"&amp;":"&","&gt;":">","&lt;":"<","&#x60;":"`","&#x2F;":"/","&quot;":'"',"&#x27;":"'"},h={},d,f,c=/[\-#$\^*()+\[\]{}|\\,.?\s]/g;(function(){for(var a in k)h[k[a]]=a})();a.mix(a,{urlEncode:function(a){return encodeURIComponent(""+
a)},urlDecode:function(a){return decodeURIComponent(a.replace(/\+/g," "))},fromUnicode:function(a){return a.replace(/\\u([a-f\d]{4})/ig,function(a,e){return String.fromCharCode(parseInt(e,16))})},escapeHtml:function(a){return(a+"").replace(l(),function(a){return h[a]})},escapeRegExp:function(a){return a.replace(c,"\\$&")},unEscapeHtml:function(a){return a.replace(i(),function(a,e){return k[a]||String.fromCharCode(+e)})},param:function(e,d,n,f){d=d||"&";n=n||"=";f===b&&(f=!0);var c=[],h,i,k,l,v,w=
a.urlEncode;for(h in e)if(v=e[h],h=w(h),g(v))c.push(h),v!==b&&c.push(n,w(v+j)),c.push(d);else if(a.isArray(v)&&v.length){i=0;for(l=v.length;i<l;++i)k=v[i],g(k)&&(c.push(h,f?w("[]"):j),k!==b&&c.push(n,w(k+j)),c.push(d))}c.pop();return c.join(j)},unparam:function(e,d,n){if("string"!=typeof e||!(e=a.trim(e)))return{};for(var n=n||"=",f={},c,h=a.urlDecode,e=e.split(d||"&"),j=0,g=e.length;j<g;++j){c=e[j].indexOf(n);if(-1==c)d=h(e[j]),c=b;else{d=h(e[j].substring(0,c));c=e[j].substring(c+1);try{c=h(c)}catch(i){}a.endsWith(d,
"[]")&&(d=d.substring(0,d.length-2))}d in f?a.isArray(f[d])?f[d].push(c):f[d]=[f[d],c]:f[d]=c}return f}});a.escapeHTML=a.escapeHtml;a.unEscapeHTML=a.unEscapeHtml})(KISSY);
(function(a){function b(a,b,i){var j=[].slice,k=j.call(arguments,3),h=function(){},d=function(){var d=j.call(arguments);return b.apply(this instanceof h?this:i,a?d.concat(k):k.concat(d))};h.prototype=b.prototype;d.prototype=new h;return d}a.mix(a,{noop:function(){},bind:b(0,b,null,0),rbind:b(0,b,null,1),later:function(b,l,i,j,k){var l=l||0,h=b,d=a.makeArray(k),f;"string"==typeof b&&(h=j[b]);b=function(){h.apply(j,d)};f=i?setInterval(b,l):setTimeout(b,l);return{id:f,interval:i,cancel:function(){this.interval?
clearInterval(f):clearTimeout(f)}}},throttle:function(b,l,i){l=l||150;if(-1===l)return function(){b.apply(i||this,arguments)};var j=a.now();return function(){var k=a.now();k-j>l&&(j=k,b.apply(i||this,arguments))}},buffer:function(b,l,i){function j(){j.stop();k=a.later(b,l,0,i||this,arguments)}l=l||150;if(-1===l)return function(){b.apply(i||this,arguments)};var k=null;j.stop=function(){k&&(k.cancel(),k=0)};return j}})})(KISSY);
(function(a,b){function g(b,f,c){var e=b,m,n,h,i;if(!b)return e;if(b[k])return c[b[k]].destination;if("object"===typeof b){i=b.constructor;if(a.inArray(i,[Boolean,String,Number,Date,RegExp]))e=new i(b.valueOf());else if(m=a.isArray(b))e=f?a.filter(b,f):b.concat();else if(n=a.isPlainObject(b))e={};b[k]=i=a.guid();c[i]={destination:e,input:b}}if(m)for(b=0;b<e.length;b++)e[b]=g(e[b],f,c);else if(n)for(h in b)if(h!==k&&(!f||f.call(b,b[h],h,b)!==j))e[h]=g(b[h],f,c);return e}function l(d,f,c,e){if(d[h]===
f&&f[h]===d)return i;d[h]=f;f[h]=d;var m=function(a,e){return null!==a&&a!==b&&a[e]!==b},n;for(n in f)!m(d,n)&&m(f,n)&&c.push("expected has key '"+n+"', but missing from actual.");for(n in d)!m(f,n)&&m(d,n)&&c.push("expected missing key '"+n+"', but present in actual.");for(n in f)n!=h&&(a.equals(d[n],f[n],c,e)||e.push("'"+n+"' was '"+(f[n]?f[n].toString():f[n])+"' in expected, but was '"+(d[n]?d[n].toString():d[n])+"' in actual."));a.isArray(d)&&a.isArray(f)&&d.length!=f.length&&e.push("arrays were not the same length");
delete d[h];delete f[h];return 0===c.length&&0===e.length}var i=!0,j=!1,k="__~ks_cloned",h="__~ks_compared";a.mix(a,{equals:function(a,f,c,e){c=c||[];e=e||[];return a===f?i:a===b||null===a||f===b||null===f?null==a&&null==f:a instanceof Date&&f instanceof Date?a.getTime()==f.getTime():"string"==typeof a&&"string"==typeof f||"number"===typeof a&&"number"===typeof f?a==f:"object"===typeof a&&"object"===typeof f?l(a,f,c,e):a===f},clone:function(d,f){var c={},e=g(d,f,c);a.each(c,function(a){a=a.input;
if(a[k])try{delete a[k]}catch(e){a[k]=b}});c=null;return e},now:Date.now||function(){return+new Date}})})(KISSY);
(function(a,b){var g=/^[\s\xa0]+|[\s\xa0]+$/g,l=String.prototype.trim,i=/\\?\{([^{}]+)\}/g;a.mix(a,{trim:l?function(a){return null==a?"":l.call(a)}:function(a){return null==a?"":(a+"").replace(g,"")},substitute:function(a,g,h){return"string"!=typeof a||!g?a:a.replace(h||i,function(a,f){return"\\"===a.charAt(0)?a.slice(1):g[f]===b?"":g[f]})},ucfirst:function(a){a+="";return a.charAt(0).toUpperCase()+a.substring(1)},startsWith:function(a,b){return 0===a.lastIndexOf(b,0)},endsWith:function(a,b){var h=
a.length-b.length;return 0<=h&&a.indexOf(b,h)==h}})})(KISSY);
(function(a,b){var g={},l=Object.prototype,i=l.toString;a.mix(a,{isBoolean:0,isNumber:0,isString:0,isFunction:0,isArray:0,isDate:0,isRegExp:0,isObject:0,type:function(a){return null==a?""+a:g[i.call(a)]||"object"},isNull:function(a){return null===a},isUndefined:function(a){return a===b},isEmptyObject:function(a){for(var g in a)if(g!==b)return!1;return!0},isPlainObject:function(j){if(!j||"object"!==a.type(j)||j.nodeType||j.window==j)return!1;var g,h;try{if((h=j.constructor)&&!l.hasOwnProperty.call(j,
"constructor")&&!l.hasOwnProperty.call(h.prototype,"isPrototypeOf"))return!1}catch(d){return!1}for(g in j);return g===b||l.hasOwnProperty.call(j,g)}});a.each("Boolean,Number,String,Function,Array,Date,RegExp,Object".split(","),function(b,i){g["[object "+b+"]"]=i=b.toLowerCase();a["is"+b]=function(b){return a.type(b)==i}})})(KISSY);
(function(a,b){function g(a,n,f){if(a instanceof k)return f(a[c]);var d=a[c];if(a=a[e])a.push([n,f]);else if(i(d))g(d,n,f);else return n&&n(d);return b}function l(a){if(!(this instanceof l))return new l(a);this.promise=a||new j}function i(a){return a&&a instanceof j}function j(a){this[c]=a;a===b&&(this[e]=[])}function k(a){if(a instanceof k)return a;j.apply(this,arguments);return this}function h(a,b,e){function f(a){try{return b?b(a):a}catch(e){return new k(e)}}function c(a){try{return e?e(a):new k(a)}catch(b){return new k(b)}}
function d(a){i||(i=1,h.resolve(f(a)))}var h=new l,i=0;a instanceof j?g(a,d,function(a){i||(i=1,h.resolve(c(a)))}):d(a);return h.promise}function d(a){return!f(a)&&i(a)&&a[e]===b&&(!i(a[c])||d(a[c]))}function f(a){return i(a)&&a[e]===b&&a[c]instanceof k}var c="__promise_value",e="__promise_pendings";l.prototype={constructor:l,resolve:function(f){var n=this.promise,d;if(!(d=n[e]))return null;n[c]=f;d=[].concat(d);n[e]=b;a.each(d,function(a){g(n,a[0],a[1])});return f},reject:function(a){return this.resolve(new k(a))}};
j.prototype={constructor:j,then:function(a,b){return h(this,a,b)},fail:function(a){return h(this,0,a)},fin:function(a){return h(this,function(b){return a(b,!0)},function(b){return a(b,!1)})},done:function(a,b){(a||b?this.then(a,b):this).fail(function(a){setTimeout(function(){throw a;},0)})},isResolved:function(){return d(this)},isRejected:function(){return f(this)}};a.extend(k,j);KISSY.Defer=l;KISSY.Promise=j;j.Defer=l;a.mix(j,{when:h,isPromise:i,isResolved:d,isRejected:f,all:function(a){var b=a.length;
if(!b)return null;for(var e=l(),f=0;f<a.length;f++)(function(f,d){h(f,function(f){a[d]=f;0===--b&&e.resolve(a)},function(a){e.reject(a)})})(a[f],f);return e.promise}})})(KISSY);
(function(a){function b(a,b){for(var g=0,h=a.length-1,d=[],f;0<=h;h--)f=a[h],"."!=f&&(".."===f?g++:g?g--:d[d.length]=f);if(b)for(;g--;g)d[d.length]="..";return d=d.reverse()}var g=/^(\/?)([\s\S]+\/(?!$)|\/)?((?:\.{1,2}$|[\s\S]+?)?(\.[^.\/]*)?)$/,l={resolve:function(){var g="",j,k=arguments,h,d=0;for(j=k.length-1;0<=j&&!d;j--)h=k[j],"string"==typeof h&&h&&(g=h+"/"+g,d="/"==h.charAt(0));g=b(a.filter(g.split("/"),function(a){return!!a}),!d).join("/");return(d?"/":"")+g||"."},normalize:function(g){var j=
"/"==g.charAt(0),k="/"==g.slice(-1),g=b(a.filter(g.split("/"),function(a){return!!a}),!j).join("/");!g&&!j&&(g=".");g&&k&&(g+="/");return(j?"/":"")+g},join:function(){var b=a.makeArray(arguments);return l.normalize(a.filter(b,function(a){return a&&"string"==typeof a}).join("/"))},relative:function(b,g){var b=l.normalize(b),g=l.normalize(g),k=a.filter(b.split("/"),function(a){return!!a}),h=[],d,f,c=a.filter(g.split("/"),function(a){return!!a});f=Math.min(k.length,c.length);for(d=0;d<f&&k[d]==c[d];d++);
for(f=d;d<k.length;)h.push(".."),d++;h=h.concat(c.slice(f));return h=h.join("/")},basename:function(a,b){var k;k=(a.match(g)||[])[3]||"";b&&k&&k.slice(-1*b.length)==b&&(k=k.slice(0,-1*b.length));return k},dirname:function(a){var b=a.match(g)||[],a=b[1]||"",b=b[2]||"";if(!a&&!b)return".";b&&(b=b.substring(0,b.length-1));return a+b},extname:function(a){return(a.match(g)||[])[4]||""}};a.Path=l})(KISSY);
(function(a,b){function g(b){b._queryMap||(b._queryMap=a.unparam(b._query))}function l(a){this._query=a||""}function i(a,b){return encodeURI(a).replace(b,function(a){a=a.charCodeAt(0).toString(16);return"%"+(1==a.length?"0"+a:a)})}function j(b){if(b instanceof j)return b.clone();var e=this;a.mix(e,{scheme:"",userInfo:"",hostname:"",port:"",path:"",query:"",fragment:""});b=j.getComponents(b);a.each(b,function(b,f){b=b||"";if("query"==f)e.query=new l(b);else{try{b=a.urlDecode(b)}catch(n){}e[f]=b}});
return e}var k=/[#\/\?@]/g,h=/[#\?]/g,d=/[#@]/g,f=/#/g,c=RegExp("^(?:([\\w\\d+.-]+):)?(?://(?:([^/?#@]*)@)?([\\w\\d\\-\\u0100-\\uffff.+%]*|\\[[^\\]]+\\])(?::([0-9]+))?)?([^?#]+)?(?:\\?([^#]*))?(?:#(.*))?$"),e=a.Path,m={scheme:1,userInfo:2,hostname:3,port:4,path:5,query:6,fragment:7};l.prototype={constructor:l,clone:function(){return new l(this.toString())},reset:function(a){this._query=a||"";this._queryMap=null;return this},count:function(){var b=0,e,f;g(this);e=this._queryMap;for(f in e)a.isArray(e[f])?
b+=e[f].length:b++;return b},has:function(b){var e;g(this);e=this._queryMap;return b?b in e:!a.isEmptyObject(e)},get:function(a){var b;g(this);b=this._queryMap;return a?b[a]:b},keys:function(){g(this);return a.keys(this._queryMap)},set:function(b,e){var f;g(this);f=this._queryMap;"string"==typeof b?this._queryMap[b]=e:(b instanceof l&&(b=b.get()),a.each(b,function(a,b){f[b]=a}));return this},remove:function(a){g(this);a?delete this._queryMap[a]:this._queryMap={};return this},add:function(e,f){var d=
this,c,h;a.isObject(e)?(e instanceof l&&(e=e.get()),a.each(e,function(a,b){d.add(b,a)})):(g(d),c=d._queryMap,h=c[e],h=h===b?f:[].concat(h).concat(f),c[e]=h);return d},toString:function(e){g(this);return a.param(this._queryMap,b,b,e)}};j.prototype={constructor:j,clone:function(){var b=new j,e=this;a.each(m,function(a,f){b[f]=e[f]});b.query=b.query.clone();return b},resolve:function(b){"string"==typeof b&&(b=new j(b));var f=0,d,c=this.clone();a.each("scheme,userInfo,hostname,port,path,query,fragment".split(","),
function(h){if(h=="path")if(f)c[h]=b[h];else{if(h=b.path){f=1;if(!a.startsWith(h,"/"))if(c.hostname&&!c.path)h="/"+h;else if(c.path){d=c.path.lastIndexOf("/");d!=-1&&(h=c.path.slice(0,d+1)+h)}c.path=e.normalize(h)}}else if(h=="query"){if(f||b.query.toString()){c.query=b.query.clone();f=1}}else if(f||b[h]){c[h]=b[h];f=1}});return c},getScheme:function(){return this.scheme},setScheme:function(a){this.scheme=a;return this},getHostname:function(){return this.hostname},setHostname:function(a){this.hostname=
a;return this},setUserInfo:function(a){this.userInfo=a;return this},getUserInfo:function(){return this.userInfo},setPort:function(a){this.port=a;return this},getPort:function(){return this.port},setPath:function(a){this.path=a;return this},getPath:function(){return this.path},setQuery:function(b){"string"==typeof b&&(a.startsWith(b,"?")&&(b=b.slice(1)),b=new l(i(b,d)));this.query=b;return this},getQuery:function(){return this.query},getFragment:function(){return this.fragment},setFragment:function(b){a.startsWith(b,
"#")&&(b=b.slice(1));this.fragment=b;return this},isSameOriginAs:function(a){return this.hostname.toLowerCase()==a.hostname.toLowerCase()&&this.scheme.toLowerCase()==a.scheme.toLowerCase()&&this.port.toLowerCase()==a.port.toLowerCase()},toString:function(b){var c=[],d,m;if(d=this.scheme)c.push(i(d,k)),c.push(":");if(d=this.hostname){c.push("//");if(m=this.userInfo)c.push(i(m,k)),c.push("@");c.push(encodeURIComponent(d));if(m=this.port)c.push(":"),c.push(m)}if(m=this.path)d&&!a.startsWith(m,"/")&&
(m="/"+m),m=e.normalize(m),c.push(i(m,h));if(b=this.query.toString.call(this.query,b))c.push("?"),c.push(b);if(b=this.fragment)c.push("#"),c.push(i(b,f));return c.join("")}};j.Query=l;j.getComponents=function(b){var e=(b||"").match(c)||[],f={};a.each(m,function(a,b){f[b]=e[a]});return f};a.Uri=j})(KISSY);
(function(a,b){function g(a){var b=0;return parseFloat(a.replace(/\./g,function(){return 0===b++?".":""}))}function l(a,b){var e;b.trident=0.1;if((e=a.match(/Trident\/([\d.]*)/))&&e[1])b.trident=g(e[1]);b.core="trident"}function i(a){var b,e;return(b=a.match(/MSIE ([^;]*)|Trident.*; rv ([0-9.]+)/))&&(e=b[1]||b[2])?g(e):0}function j(a){var f,c="",d="",m,j=[6,9],k,v=h&&h.createElement("div"),w=[],t={webkit:b,trident:b,gecko:b,presto:b,chrome:b,safari:b,firefox:b,ie:b,opera:b,mobile:b,core:b,shell:b,
phantomjs:b,os:b,ipad:b,iphone:b,ipod:b,ios:b,android:b,nodejs:b};v&&(v.innerHTML="<\!--[if IE {{version}}]><s></s><![endif]--\>".replace("{{version}}",""),w=v.getElementsByTagName("s"));if(0<w.length){l(a,t);m=j[0];for(j=j[1];m<=j;m++)if(v.innerHTML="<\!--[if IE {{version}}]><s></s><![endif]--\>".replace("{{version}}",m),0<w.length){t[d="ie"]=m;break}if(!t.ie&&(k=i(a)))t[d="ie"]=k}else if((m=a.match(/AppleWebKit\/([\d.]*)/))&&m[1]){t[c="webkit"]=g(m[1]);if((m=a.match(/OPR\/(\d+\.\d+)/))&&m[1])t[d=
"opera"]=g(m[1]);else if((m=a.match(/Chrome\/([\d.]*)/))&&m[1])t[d="chrome"]=g(m[1]);else if((m=a.match(/\/([\d.]*) Safari/))&&m[1])t[d="safari"]=g(m[1]);if(/ Mobile\//.test(a)&&a.match(/iPad|iPod|iPhone/)){t.mobile="apple";if((m=a.match(/OS ([^\s]*)/))&&m[1])t.ios=g(m[1].replace("_","."));f="ios";if((m=a.match(/iPad|iPod|iPhone/))&&m[0])t[m[0].toLowerCase()]=t.ios}else if(/ Android/.test(a)){if(/Mobile/.test(a)&&(f=t.mobile="android"),(m=a.match(/Android ([^\s]*);/))&&m[1])t.android=g(m[1])}else if(m=
a.match(/NokiaN[^\/]*|Android \d\.\d|webOS\/\d\.\d/))t.mobile=m[0].toLowerCase();if((m=a.match(/PhantomJS\/([^\s]*)/))&&m[1])t.phantomjs=g(m[1])}else if((m=a.match(/Presto\/([\d.]*)/))&&m[1]){if(t[c="presto"]=g(m[1]),(m=a.match(/Opera\/([\d.]*)/))&&m[1]){t[d="opera"]=g(m[1]);if((m=a.match(/Opera\/.* Version\/([\d.]*)/))&&m[1])t[d]=g(m[1]);if((m=a.match(/Opera Mini[^;]*/))&&m)t.mobile=m[0].toLowerCase();else if((m=a.match(/Opera Mobi[^;]*/))&&m)t.mobile=m[0]}}else if(k=i(a))t[d="ie"]=k,l(a,t);else if(m=
a.match(/Gecko/)){t[c="gecko"]=0.1;if((m=a.match(/rv:([\d.]*)/))&&m[1])t[c]=g(m[1]),/Mobile|Tablet/.test(a)&&(e.mobile="firefox");if((m=a.match(/Firefox\/([\d.]*)/))&&m[1])t[d="firefox"]=g(m[1])}f||(/windows|win32/i.test(a)?f="windows":/macintosh|mac_powerpc/i.test(a)?f="macintosh":/linux/i.test(a)?f="linux":/rhino/i.test(a)&&(f="rhino"));t.os=f;t.core=t.core||c;t.shell=d;return t}var k=a.Env.host,h=k.document,k=k.navigator,d=KISSY.UA=j(k&&k.userAgent||"");if("object"===typeof process){var f,c;if((f=
process.versions)&&(c=f.node))d.os=process.platform,d.nodejs=g(c)}d.getDescriptorFromUserAgent=j;var e="webkit,trident,gecko,presto,chrome,safari,firefox,ie,opera".split(",");f=h&&h.documentElement;var m="";f&&(a.each(e,function(a){var b=d[a];b&&(m+=" ks-"+a+(parseInt(b)+""),m+=" ks-"+a)}),a.trim(m)&&(f.className=a.trim(f.className+m)))})(KISSY);
(function(a){var b=a.Env,g=b.host,l=a.UA,i=g.document||{},j="ontouchstart"in i&&!l.phantomjs,k=(i=i.documentMode)||l.ie,h=(b.nodejs&&"object"===typeof global?global:g).JSON;i&&9>i&&(h=0);a.Features={isTouchSupported:function(){return j},isDeviceMotionSupported:function(){return!!g.DeviceMotionEvent},isHashChangeSupported:function(){return"onhashchange"in g&&(!k||7<k)},isNativeJSONSupported:function(){return h}}})(KISSY);(function(a){(a.Loader={}).Status={INIT:0,LOADING:1,LOADED:2,ERROR:3,ATTACHED:4}})(KISSY);
(function(a){function b(a){if("string"==typeof a)return g(a);for(var b=[],e=0,f=a.length;e<f;e++)b[e]=g(a[e]);return b}function g(a){"/"==a.charAt(a.length-1)&&(a+="index");return a}var l=a.Loader,i=a.Path,j=a.Env.host,k=a.startsWith,h=l.Status,d=h.ATTACHED,f=h.LOADED,c=h.ERROR,e=l.Utils={},m=j.document;a.mix(e,{docHead:function(){return m.getElementsByTagName("head")[0]||m.documentElement},normalDepModuleName:function(a,b){var f=0,c;if(!b)return b;if("string"==typeof b)return k(b,"../")||k(b,"./")?
i.resolve(i.dirname(a),b):i.normalize(b);for(c=b.length;f<c;f++)b[f]=e.normalDepModuleName(a,b[f]);return b},createModulesInfo:function(b,f){a.each(f,function(a){e.createModuleInfo(b,a)})},createModuleInfo:function(b,e,f){var e=g(e),c=b.Env.mods,d=c[e];return d?d:c[e]=d=new l.Module(a.mix({name:e,runtime:b},f))},isAttached:function(b,e){var f;a:{var c=b.Env.mods,m,h;f=a.makeArray(e);for(h=0;h<f.length;h++)if(m=c[f[h]],!m||m.status!==d){f=0;break a}f=1}return f},getModules:function(b,f){var c=[b],
m,h,g,j,i=b.Env.mods;a.each(f,function(f){m=i[f];if(!m||"css"!=m.getType())h=e.unalias(b,f),(g=a.reduce(h,function(a,b){j=i[b];return a&&j&&j.status==d},!0))?c.push(i[h[0]].value):c.push(null)});return c},attachModsRecursively:function(a,b,f,c){var f=f||[],d,m=1,h=a.length,g=f.length;for(d=0;d<h;d++)m=e.attachModRecursively(a[d],b,f,c)&&m,f.length=g;return m},attachModRecursively:function(b,m,h,g){var j,i=m.Env.mods[b];if(!i)return 0;j=i.status;if(j==d)return 1;j==c&&g.push(i);if(j!=f)return 0;if(a.inArray(b,
h))return h.push(b),0;h.push(b);return e.attachModsRecursively(i.getNormalizedRequires(),m,h,g)?(e.attachMod(m,i),1):0},attachMod:function(a,b){if(b.status==f){var c=b.fn;b.value="function"===typeof c?c.apply(b,e.getModules(a,b.getRequiresWithAlias())):c;b.status=d}},getModNamesAsArray:function(a){"string"==typeof a&&(a=a.replace(/\s+/g,"").split(","));return a},normalizeModNames:function(a,b,f){return e.unalias(a,e.normalizeModNamesWithAlias(a,b,f))},unalias:function(a,e){for(var f=[].concat(e),
c,d,m,h=0,g,j=a.Env.mods;!h;){h=1;for(c=f.length-1;0<=c;c--)if((d=j[f[c]])&&(m=d.alias)){h=0;for(g=m.length-1;0<=g;g--)m[g]||m.splice(g,1);f.splice.apply(f,[c,1].concat(b(m)))}}return f},normalizeModNamesWithAlias:function(a,f,c){var a=[],d,m;if(f){d=0;for(m=f.length;d<m;d++)f[d]&&a.push(b(f[d]))}c&&(a=e.normalDepModuleName(c,a));return a},registerModule:function(b,c,d,m){var c=g(c),h=b.Env.mods,j=h[c];if(!j||!j.fn)e.createModuleInfo(b,c),j=h[c],a.mix(j,{name:c,status:f,fn:d}),a.mix(j,m)},getMappedPath:function(a,
b,e){for(var a=e||a.Config.mappedRules||[],f,e=0;e<a.length;e++)if(f=a[e],b.match(f[0]))return b.replace(f[0],f[1]);return b}})})(KISSY);
(function(a){function b(a,b){return b in a?a[b]:a.runtime.Config[b]}function g(b){a.mix(this,b)}function l(b){this.status=i.Status.INIT;a.mix(this,b);this.callbacks=[]}var i=a.Loader,j=a.Path,k=i.Utils;a.augment(g,{reset:function(b){a.mix(this,b)},getTag:function(){return b(this,"tag")},getName:function(){return this.name},getBase:function(){return b(this,"base")},getPrefixUriForCombo:function(){var a=this.getName();return this.getBase()+(a&&!this.isIgnorePackageNameInUri()?a+"/":"")},getPackageUri:function(){return this.packageUri?
this.packageUri:this.packageUri=new a.Uri(this.getPrefixUriForCombo())},getBaseUri:function(){return b(this,"baseUri")},isDebug:function(){return b(this,"debug")},isIgnorePackageNameInUri:function(){return b(this,"ignorePackageNameInUri")},getCharset:function(){return b(this,"charset")},isCombine:function(){return b(this,"combine")},getGroup:function(){return b(this,"group")}});i.Package=g;a.augment(l,{addCallback:function(a){this.callbacks.push(a)},notifyAll:function(){for(var a,b=this.callbacks.length,
c=0;c<b;c++){a=this.callbacks[c];try{a(this)}catch(e){setTimeout(function(){throw e;},0)}}this.callbacks=[]},setValue:function(a){this.value=a},getType:function(){var a=this.type;a||(this.type=a=".css"==j.extname(this.name).toLowerCase()?"css":"js");return a},getFullPath:function(){var a,b,c,e;if(!this.fullpath){b=this.getPackage();a=b.getBaseUri();e=this.getPath();if(b.isIgnorePackageNameInUri()&&(c=b.getName()))e=j.relative(c,e);b=a.resolve(e);if(a=this.getTag())a+="."+this.getType(),b.query.set("t",
a);this.fullpath=k.getMappedPath(this.runtime,b.toString())}return this.fullpath},getPath:function(){var a;if(!(a=this.path)){a=this.name;var b="."+this.getType(),c="-min";a=j.join(j.dirname(a),j.basename(a,b));this.getPackage().isDebug()&&(c="");a=this.path=a+c+b}return a},getValue:function(){return this.value},getName:function(){return this.name},getPackage:function(){var b;if(!(b=this.packageInfo)){b=this.name;var f=this.runtime.config("packages"),c="",e;for(e in f)a.startsWith(b,e)&&e.length>
c.length&&(c=e);b=this.packageInfo=f[c]||h}return b},getTag:function(){return this.tag||this.getPackage().getTag()},getCharset:function(){return this.charset||this.getPackage().getCharset()},getRequiredMods:function(){var b=this.runtime;return a.map(this.getNormalizedRequires(),function(a){return k.createModuleInfo(b,a)})},getRequiresWithAlias:function(){var a=this.requiresWithAlias,b=this.requires;if(!b||0==b.length)return b||[];a||(this.requiresWithAlias=a=k.normalizeModNamesWithAlias(this.runtime,
b,this.name));return a},getNormalizedRequires:function(){var a,b=this.normalizedRequiresStatus,c=this.status,e=this.requires;if(!e||0==e.length)return e||[];if((a=this.normalizedRequires)&&b==c)return a;this.normalizedRequiresStatus=c;return this.normalizedRequires=k.normalizeModNames(this.runtime,e,this.name)}});i.Module=l;var h=new i.Package({name:"",runtime:a})})(KISSY);
(function(a){function b(){for(var k in j){var h=j[k],d=h.node,f,c=0;if(l.webkit)d.sheet&&(c=1);else if(d.sheet)try{d.sheet.cssRules&&(c=1)}catch(e){f=e.name,"NS_ERROR_DOM_SECURITY_ERR"==f&&(c=1)}c&&(h.callback&&h.callback.call(d),delete j[k])}i=a.isEmptyObject(j)?0:setTimeout(b,g)}var g=30,l=a.UA,i=0,j={};a.mix(a.Loader.Utils,{pollCss:function(a,h){var d;d=j[a.href]={};d.node=a;d.callback=h;i||b()}})})(KISSY);
(function(a){var b=a.Env.host.document,g=a.Loader.Utils,l=a.Path,i={},j=536>a.UA.webkit;a.mix(a,{getScript:function(k,h,d){function f(){var a=o.readyState;if(!a||"loaded"==a||"complete"==a)o.onreadystatechange=o.onload=null,r(0)}var c=h,e=0,m,n,q,p;a.startsWith(l.extname(k).toLowerCase(),".css")&&(e=1);a.isPlainObject(c)&&(h=c.success,m=c.error,n=c.timeout,d=c.charset,q=c.attrs);c=i[k]=i[k]||[];c.push([h,m]);if(1<c.length)return c.node;var h=g.docHead(),o=b.createElement(e?"link":"script");q&&a.each(q,
function(a,b){o.setAttribute(b,a)});d&&(o.charset=d);e?(o.href=k,o.rel="stylesheet"):(o.src=k,o.async=!0);c.node=o;var r=function(b){var e;if(p){p.cancel();p=void 0}a.each(i[k],function(a){(e=a[b])&&e.call(o)});delete i[k]},d="onload"in o;e&&j&&(d=!1);d?(o.onload=f,o.onerror=function(){o.onerror=null;r(1)}):e?g.pollCss(o,function(){r(0)}):o.onreadystatechange=f;n&&(p=a.later(function(){r(1)},1E3*n));e?h.appendChild(o):h.insertBefore(o,h.firstChild);return o}})})(KISSY);
(function(a,b){function g(b){b=b.replace(/\\/g,"/");"/"!=b.charAt(b.length-1)&&(b+="/");k?b=k.resolve(b):(a.startsWith(b,"file:")||(b="file:"+b),b=new a.Uri(b));return b}var l=a.Loader,i=l.Utils,j=a.Env.host.location,k,h,d=a.Config.fns;if(!a.UA.nodejs&&j&&(h=j.href))k=new a.Uri(h);d.map=function(a){var b=this.Config;return!1===a?b.mappedRules=[]:b.mappedRules=(b.mappedRules||[]).concat(a||[])};d.mapCombo=function(a){var b=this.Config;return!1===a?b.mappedComboRules=[]:b.mappedComboRules=(b.mappedComboRules||
[]).concat(a||[])};d.packages=function(f){var c,e=this.Config,m=e.packages=e.packages||{};return f?(a.each(f,function(b,e){c=b.name||e;var f=g(b.base||b.path);b.name=c;b.base=f.toString();b.baseUri=f;b.runtime=a;delete b.path;m[c]?m[c].reset(b):m[c]=new l.Package(b)}),b):!1===f?(e.packages={},b):m};d.modules=function(b){var c=this,e=c.Env;b&&a.each(b,function(b,f){i.createModuleInfo(c,f,b);a.mix(e.mods[f],b)})};d.base=function(a){var c=this.Config;if(!a)return c.base;a=g(a);c.base=a.toString();c.baseUri=
a;return b}})(KISSY);
(function(a,b){function g(b,e){a.mix(this,{runtime:b,requireLoadedMods:{},waitingModules:e})}var l,i,j,k,h=b,d,f,c,e,m;l=a.Loader;i=l.Status;j=l.Utils;k=a.UA;f=i.LOADING;c=i.LOADED;e=i.ERROR;m=i.ATTACHED;a.augment(g,{use:function(a){var b,e=a.length;for(b=0;b<e;b++)this.loadModule(a[b])},loadModRequires:function(a){var b=this.requireLoadedMods,e=a.name;b[e]||(b[e]=1,a=a.getNormalizedRequires(),this.use(a))},loadModule:function(a){var b=this,d=b.waitingModules,h,g,i=j.createModuleInfo(b.runtime,a);
h=i.status;h==m||h==e||(h===c?b.loadModRequires(i):(g=d.contains(a),g||(i.addCallback(function(){b.loadModRequires(i);d.remove(a);d.notifyAll()}),d.add(a),h<f&&b.fetchModule(i))))},fetchModule:function(c){function m(){c.fn||(c.status=e);c.notifyAll()}var g=this.runtime,i=c.getName(),l=c.getCharset(),s=c.getFullPath(),u=k.ie,v="css"==c.getType();c.status=f;u&&!v&&(d=i);a.getScript(s,{attrs:u?{"data-mod-name":i}:b,success:function(){v?j.registerModule(g,i,a.noop):h&&(j.registerModule(g,i,h.fn,h.config),
h=b);a.later(m)},error:m,charset:l})}});g.add=function(b,e,c,f){if("function"===typeof b)if(c=e,e=b,k.ie){var b=a.Env.host.document.getElementsByTagName("script"),m,g,i;for(g=b.length-1;0<=g;g--)if(i=b[g],"interactive"==i.readyState){m=i;break}b=m?m.getAttribute("data-mod-name"):d;j.registerModule(f,b,e,c);d=null}else h={fn:e,config:c}};l.SimpleLoader=g})(KISSY);
(function(a){function b(b,e,c){var f=b&&b.length,d=[],m=[];a.each(b,function(b){a.getScript(b.fullpath,{success:function(){m.push(b);--f||e(m,d)},error:function(){d.push(b);--f||e(m,d)},charset:c})})}function g(b,e){a.mix(this,{runtime:b,waitingModules:e})}function l(b){a.each(b,function(b){var e=[];a.each(b.mods,function(a){a.status==c&&e.push(a.name)})})}function i(a,b){for(var a=a.split(/\//),b=b.split(/\//),e=Math.min(a.length,b.length),c=0;c<e&&a[c]===b[c];c++);return a.slice(0,c).join("/")+
"/"}function j(a){var b=5381,e;for(e=a.length;-1<--e;)b=(b<<5)+b+a.charCodeAt(e);return b+""}var k=a.Loader,h=k.Status,d=k.Utils,f=h.LOADING,c=h.LOADED,e=h.ERROR,m=a.now(),n=h.ATTACHED;g.groupTag=m;a.augment(g,{use:function(c){var f=this.runtime,c=a.keys(this.calculate(c));d.createModulesInfo(f,c);c=this.getComboUrls(c);a.each(c.css,function(c){b(c,function(b,c){l(b);a.each(b,function(b){a.each(b.mods,function(b){d.registerModule(f,b.getName(),a.noop);b.notifyAll()})});a.each(c,function(b){a.each(b.mods,
function(a){a.status=e;a.notifyAll()})})},c.charset)});a.each(c.js,function(c){b(c,function(b){l(b);a.each(c,function(b){a.each(b.mods,function(a){a.fn||(a.status=e);a.notifyAll()})})},c.charset)})},calculate:function(a,b,m){var h,g,j,i,k=this.waitingModules,l=this.runtime,m=m||{},b=b||{};for(h=0;h<a.length;h++)g=a[h],b[g]||(b[g]=1,j=d.createModuleInfo(l,g),i=j.status,i!==e&&(i!=c&&i!=n&&!k.contains(g)&&(i!=f&&(j.status=f,m[g]=1),j.addCallback(function(a){k.remove(a.getName());k.notifyAll()}),k.add(g)),
this.calculate(j.getNormalizedRequires(),b,m)));return m},getComboMods:function(b,e){for(var c={},f,h=this.runtime,g=0,j=b.length,k,n,l,B,C,D,A,y,H;g<j;++g){k=b[g];k=d.createModuleInfo(h,k);l=k.getType();H=k.getFullPath();n=k.getPackage();A=n.getName();C=n.getCharset();B=n.getTag();y=n.getGroup();D=n.getPrefixUriForCombo();f=n.getPackageUri();var x=A;(k.canBeCombined=n.isCombine()&&a.startsWith(H,D))&&y?(x=y+"_"+C+"_"+m,(n=e[x])?n.isSameOriginAs(f)?n.setPath(i(n.getPath(),f.getPath())):(x=A,e[A]=
f):e[x]=f.clone()):e[A]=f;f=c[l]=c[l]||{};(l=f[x])?1==l.tags.length&&l.tags[0]==B||l.tags.push(B):(l=f[x]=[],l.charset=C,l.tags=[B]);l.push(k)}return c},getComboUrls:function(a){var b=this.runtime,e=b.Config,c=e.comboPrefix,f=e.comboSep,m=e.comboMaxFileNum,h=e.comboMaxUrlLength,g={},a=this.getComboMods(a,g),i={},k;for(k in a){i[k]={};for(var n in a[k]){var l=[],D=[],A=a[k][n],y=A.tags,H=(y=1<y.length?j(y.join("")):y[0])?"?t="+encodeURIComponent(y)+"."+k:"",y=H.length,x=g[n].toString(),L=x.length,
J=x+c,I=i[k][n]=[],x=J.length;I.charset=A.charset;I.mods=[];for(var K=function(){I.push({fullpath:d.getMappedPath(b,J+l.join(f)+H,e.mappedComboRules),mods:D})},E=0;E<A.length;E++){var F=A[E];I.mods.push(F);var G=F.getFullPath();if(F.canBeCombined){if(G=G.slice(L).replace(/\?.*$/,""),l.push(G),D.push(F),l.length>m||x+l.join(f).length+y>h)l.pop(),D.pop(),K(),l=[],D=[],E--}else I.push({fullpath:G,mods:[F]})}l.length&&K()}}return i}});k.ComboLoader=g})(KISSY);
(function(a,b){function g(b){a.mix(this,{fn:b,waitMods:{}})}function l(f){var d=f.src||"";if(!d.match(e))return 0;var f=(f=f.getAttribute("data-config"))?(new Function("return "+f))():{},h=f.comboPrefix=f.comboPrefix||"??",g=f.comboSep=f.comboSep||",",j,i=d.indexOf(h);-1==i?j=d.replace(c,"$1"):(j=d.substring(0,i),"/"!=j.charAt(j.length-1)&&(j+="/"),d=d.substring(i+h.length).split(g),a.each(d,function(a){return a.match(e)?(j+=a.replace(c,"$1"),!1):b}));return a.mix({base:j},f)}function i(){var a=k.host.document.getElementsByTagName("script"),
b,e;for(b=a.length-1;0<=b;b--)if(e=l(a[b]))return e;return null}var j=KISSY.Loader,k=a.Env,h=j.Utils,d=j.SimpleLoader,f=j.ComboLoader;g.prototype={constructor:g,notifyAll:function(){var b=this.fn;b&&a.isEmptyObject(this.waitMods)&&(this.fn=null,b())},add:function(a){this.waitMods[a]=1},remove:function(a){delete this.waitMods[a]},contains:function(a){return this.waitMods[a]}};j.WaitingModules=g;a.mix(a,{add:function(b,e,c){"string"==typeof b?h.registerModule(a,b,e,c):d.add(b,e,c,a)},use:function(e,
c){function j(){var f=[];h.attachModsRecursively(k,a,b,f)?c&&(u?c.apply(a,h.getModules(a,e)):setTimeout(function(){c.apply(a,h.getModules(a,e))},0)):f.length?s&&(u?s.apply(a,f):setTimeout(function(){s.apply(a,f)},0)):(v.fn=j,l.use(k))}var i=a.Config,k,l,s,u,v=new g(j);a.isPlainObject(c)&&(u=c.sync,s=c.error,c=c.success);e=h.getModNamesAsArray(e);e=h.normalizeModNamesWithAlias(a,e);k=h.unalias(a,e);l=i.combine&&!a.UA.nodejs?new f(a,v):new d(a,v);u?v.notifyAll():setTimeout(function(){v.notifyAll()},
0);return a},require:function(b){return h.getModules(a,h.normalizeModNamesWithAlias(a,[b]))[1]}});var c=/^(.*)(seed|kissy)(?:-min)?\.js[^/]*/i,e=/(seed|kissy)(?:-min)?\.js/i;a.UA.nodejs?a.config({charset:"utf-8",base:__dirname.replace(/\\/g,"/").replace(/\/$/,"")+"/"}):a.config(a.mix({comboMaxUrlLength:2E3,comboMaxFileNum:40,charset:"utf-8",tag:"20130725155557"},i()));k.mods={}})(KISSY);
(function(a,b){function g(){j&&!i.nodejs&&p(l,n,g);d.resolve(a)}var l=a.Env.host,i=a.UA,j=l.document,k=j&&j.documentElement,h=l.location,d=new a.Defer,f=d.promise,c=/^#?([\w-]+)$/,e=/\S/,m=!(!j||!j.addEventListener),n="load",q=m?function(a,b,e){a.addEventListener(b,e,!1)}:function(a,b,e){a.attachEvent("on"+b,e)},p=m?function(a,b,e){a.removeEventListener(b,e,!1)}:function(a,b,e){a.detachEvent("on"+b,e)};a.mix(a,{isWindow:function(a){return null!=a&&a==a.window},parseXML:function(a){if(a.documentElement)return a;
var e;try{l.DOMParser?e=(new DOMParser).parseFromString(a,"text/xml"):(e=new ActiveXObject("Microsoft.XMLDOM"),e.async=!1,e.loadXML(a))}catch(c){e=b}!e||!e.documentElement||e.getElementsByTagName("parsererror");return e},globalEval:function(a){a&&e.test(a)&&(l.execScript||function(a){l.eval.call(l,a)})(a)},ready:function(a){f.done(a);return this},available:function(b,e){var b=(b+"").match(c)[1],f=1,d,h=a.later(function(){((d=j.getElementById(b))&&(e(d)||1)||500<++f)&&h.cancel()},40,!0)}});if(h&&-1!==
(h.search||"").indexOf("ks-debug"))a.Config.debug=!0;(function(){if(!j||"complete"===j.readyState)g();else if(q(l,n,g),m){var a=function(){p(j,"DOMContentLoaded",a);g()};q(j,"DOMContentLoaded",a)}else{var b=function(){"complete"===j.readyState&&(p(j,"readystatechange",b),g())};q(j,"readystatechange",b);var e,c=k&&k.doScroll;try{e=null===l.frameElement}catch(f){e=!1}if(c&&e){var d=function(){try{c("left"),g()}catch(a){setTimeout(d,40)}};d()}}})();if(i.ie)try{j.execCommand("BackgroundImageCache",!1,
!0)}catch(o){}})(KISSY,void 0);(function(a){a.config({modules:{core:{alias:"dom,event,ajax,anim,base,node,json,ua,cookie".split(",")}}});if("undefined"!=typeof location){var b=a.startsWith(location.href,"https")?"https://s.tbcdn.cn/s/kissy/":"http://a.tbcdn.cn/s/kissy/";a.config({packages:{gallery:{base:b},mobile:{base:b}}})}})(KISSY);
(function(a,b,g){a({ajax:{requires:["dom","json","event"]}});a({anim:{requires:["dom","event"]}});a({base:{requires:["event/custom"]}});a({button:{requires:["component/base","event"]}});a({calendar:{requires:["node","event"]}});a({color:{requires:["base"]}});a({combobox:{requires:["dom","component/base","node","menu","ajax"]}});a({"component/base":{requires:["rich-base","node","event"]}});a({"component/extension":{requires:["dom","node"]}});a({"component/plugin/drag":{requires:["rich-base","dd/base"]}});
a({"component/plugin/resize":{requires:["resizable"]}});a({datalazyload:{requires:["dom","event","base"]}});a({dd:{alias:["dd/base","dd/droppable"]}});a({"dd/base":{requires:["dom","node","event","rich-base","base"]}});a({"dd/droppable":{requires:["dd/base","dom","node","rich-base"]}});a({"dd/plugin/constrain":{requires:["base","node"]}});a({"dd/plugin/proxy":{requires:["node","base","dd/base"]}});a({"dd/plugin/scroll":{requires:["dd/base","base","node","dom"]}});a({dom:{alias:["dom/base",g.ie&&(9>
g.ie||9>document.documentMode)?"dom/ie":""]}});a({"dom/ie":{requires:["dom/base"]}});a({editor:{requires:["node","htmlparser","component/base","core"]}});a({event:{alias:["event/base","event/dom","event/custom"]}});a({"event/custom":{requires:["event/base"]}});a({"event/dom":{alias:["event/dom/base",b.isTouchSupported()?"event/dom/touch":"",b.isDeviceMotionSupported()?"event/dom/shake":"",b.isHashChangeSupported()?"":"event/dom/hashchange",9>g.ie?"event/dom/ie":"",g.ie?"":"event/dom/focusin"]}});
a({"event/dom/base":{requires:["dom","event/base"]}});a({"event/dom/focusin":{requires:["event/dom/base"]}});a({"event/dom/hashchange":{requires:["event/dom/base","dom"]}});a({"event/dom/ie":{requires:["event/dom/base","dom"]}});a({"event/dom/shake":{requires:["event/dom/base"]}});a({"event/dom/touch":{requires:["event/dom/base","dom"]}});a({imagezoom:{requires:["node","overlay"]}});a({json:{requires:[KISSY.Features.isNativeJSONSupported()?"":"json/json2"]}});a({kison:{requires:["base"]}});a({menu:{requires:["component/extension",
"node","component/base","event"]}});a({menubutton:{requires:["node","menu","button","component/base"]}});a({mvc:{requires:["event","base","ajax","json","node"]}});a({node:{requires:["dom","event/dom","anim"]}});a({overlay:{requires:["node","component/base","component/extension","event"]}});a({resizable:{requires:["node","rich-base","dd/base"]}});a({"rich-base":{requires:["base"]}});a({separator:{requires:["component/base"]}});a({"split-button":{requires:["component/base","button","menubutton"]}});
a({stylesheet:{requires:["dom"]}});a({swf:{requires:["dom","json","base"]}});a({switchable:{requires:["dom","event","anim",KISSY.Features.isTouchSupported()?"dd/base":""]}});a({tabs:{requires:["button","toolbar","component/base"]}});a({toolbar:{requires:["component/base","node"]}});a({tree:{requires:["node","component/base","event"]}});a({waterfall:{requires:["node","base"]}});a({xtemplate:{alias:["xtemplate/facade"]}});a({"xtemplate/compiler":{requires:["xtemplate/runtime"]}});a({"xtemplate/facade":{requires:["xtemplate/runtime",
"xtemplate/compiler"]}})})(function(a){KISSY.config("modules",a)},KISSY.Features,KISSY.UA);(function(a){(function(a){a.add("empty",a.noop);a.add("promise",function(){return a.Promise});a.add("ua",function(){return a.UA});a.add("uri",function(){return a.Uri});a.add("path",function(){return a.Path})})(KISSY);a.UA.nodejs&&(a.KISSY=a,module.exports=a)})(KISSY);
KISSY.add("dom/base/api",function(a){var b=a.Env.host,g=a.UA,l={ELEMENT_NODE:1,ATTRIBUTE_NODE:2,TEXT_NODE:3,CDATA_SECTION_NODE:4,ENTITY_REFERENCE_NODE:5,ENTITY_NODE:6,PROCESSING_INSTRUCTION_NODE:7,COMMENT_NODE:8,DOCUMENT_NODE:9,DOCUMENT_TYPE_NODE:10,DOCUMENT_FRAGMENT_NODE:11,NOTATION_NODE:12},i={isCustomDomain:function(a){var a=a||b,g=a.document.domain,a=a.location.hostname;return g!=a&&g!="["+a+"]"},getEmptyIframeSrc:function(a){a=a||b;return g.ie&&i.isCustomDomain(a)?"javascript:void(function(){"+
encodeURIComponent("document.open();document.domain='"+a.document.domain+"';document.close();")+"}())":""},NodeType:l,getWindow:function(a){return!a?b:"scrollTo"in a&&a.document?a:a.nodeType==l.DOCUMENT_NODE?a.defaultView||a.parentWindow:!1},_isNodeList:function(a){return a&&!a.nodeType&&a.item&&!a.setTimeout},nodeName:function(a){var b=i.get(a),a=b.nodeName.toLowerCase();g.ie&&(b=b.scopeName)&&"HTML"!=b&&(a=b.toLowerCase()+":"+a);return a},_RE_NUM_NO_PX:RegExp("^("+/[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source+
")(?!px)[a-z%]+$","i")};a.mix(i,l);return i});
KISSY.add("dom/base/attr",function(a,b,g){function l(a,b){var b=o[b]||b,e=s[b];return e&&e.get?e.get(a,b):a[b]}var i=a.Env.host.document,j=b.NodeType,k=(i=i&&i.documentElement)&&i.textContent===g?"innerText":"textContent",h=b.nodeName,d=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,f=/^(?:button|input|object|select|textarea)$/i,c=/^a(?:rea)?$/i,e=/:|^on/,m=/\r/g,n={},q={val:1,css:1,html:1,text:1,data:1,width:1,height:1,
offset:1,scrollTop:1,scrollLeft:1},p={tabindex:{get:function(a){var b=a.getAttributeNode("tabindex");return b&&b.specified?parseInt(b.value,10):f.test(a.nodeName)||c.test(a.nodeName)&&a.href?0:g}}},o={hidefocus:"hideFocus",tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},r={get:function(a,
e){return b.prop(a,e)?e.toLowerCase():g},set:function(a,e,c){!1===e?b.removeAttr(a,c):(e=o[c]||c,e in a&&(a[e]=!0),a.setAttribute(c,c.toLowerCase()));return c}},s={},u={},v={select:{get:function(a){var e=a.selectedIndex,c=a.options,f;if(0>e)return null;if("select-one"===a.type)return b.val(c[e]);a=[];e=0;for(f=c.length;e<f;++e)c[e].selected&&a.push(b.val(c[e]));return a},set:function(e,c){var f=a.makeArray(c);a.each(e.options,function(e){e.selected=a.inArray(b.val(e),f)});f.length||(e.selectedIndex=
-1);return f}}};a.each(["radio","checkbox"],function(e){v[e]={get:function(a){return null===a.getAttribute("value")?"on":a.value},set:function(e,c){if(a.isArray(c))return e.checked=a.inArray(b.val(e),c)}}});p.style={get:function(a){return a.style.cssText}};a.mix(b,{_valHooks:v,_propFix:o,_attrHooks:p,_propHooks:s,_attrNodeHook:u,_attrFix:n,prop:function(e,c,f){var d=b.query(e),h,m;if(a.isPlainObject(c))return a.each(c,function(a,e){b.prop(d,e,a)}),g;c=o[c]||c;m=s[c];if(f!==g)for(e=d.length-1;0<=e;e--)h=
d[e],m&&m.set?m.set(h,f,c):h[c]=f;else if(d.length)return l(d[0],c);return g},hasProp:function(a,e){var c=b.query(a),f,d=c.length,h;for(f=0;f<d;f++)if(h=c[f],l(h,e)!==g)return!0;return!1},removeProp:function(a,e){var e=o[e]||e,c=b.query(a),f,d;for(f=c.length-1;0<=f;f--){d=c[f];try{d[e]=g,delete d[e]}catch(h){}}},attr:function(c,f,m,i){var k=b.query(c),l=k[0];if(a.isPlainObject(f)){var i=m,o;for(o in f)b.attr(k,o,f[o],i);return g}if(!(f=a.trim(f)))return g;if(i&&q[f])return b[f](c,m);f=f.toLowerCase();
if(i&&q[f])return b[f](c,m);f=n[f]||f;c=d.test(f)?r:e.test(f)?u:p[f];if(m===g){if(l&&l.nodeType===j.ELEMENT_NODE){"form"==h(l)&&(c=u);if(c&&c.get)return c.get(l,f);f=l.getAttribute(f);return null===f?g:f}}else for(i=k.length-1;0<=i;i--)if((l=k[i])&&l.nodeType===j.ELEMENT_NODE)"form"==h(l)&&(c=u),c&&c.set?c.set(l,m,f):l.setAttribute(f,""+m);return g},removeAttr:function(a,e){var e=e.toLowerCase(),e=n[e]||e,c=b.query(a),f,h,m;for(m=c.length-1;0<=m;m--)if(h=c[m],h.nodeType==j.ELEMENT_NODE&&(h.removeAttribute(e),
d.test(e)&&(f=o[e]||e)in h))h[f]=!1},hasAttr:i&&!i.hasAttribute?function(a,e){var e=e.toLowerCase(),c=b.query(a),f,d;for(f=0;f<c.length;f++)if(d=c[f],(d=d.getAttributeNode(e))&&d.specified)return!0;return!1}:function(a,e){var c=b.query(a),f,d=c.length;for(f=0;f<d;f++)if(c[f].hasAttribute(e))return!0;return!1},val:function(e,c){var f,d,i,j,k;if(c===g){if(i=b.get(e)){if((f=v[h(i)]||v[i.type])&&"get"in f&&(d=f.get(i,"value"))!==g)return d;d=i.value;return"string"===typeof d?d.replace(m,""):null==d?"":
d}return g}d=b.query(e);for(j=d.length-1;0<=j;j--){i=d[j];if(1!==i.nodeType)break;k=c;null==k?k="":"number"===typeof k?k+="":a.isArray(k)&&(k=a.map(k,function(a){return a==null?"":a+""}));f=v[h(i)]||v[i.type];if(!f||!("set"in f)||f.set(i,k,"value")===g)i.value=k}return g},text:function(a,e){var c,f,d;if(e===g){c=b.get(a);if(c.nodeType==j.ELEMENT_NODE)return c[k]||"";if(c.nodeType==j.TEXT_NODE)return c.nodeValue}else{f=b.query(a);for(d=f.length-1;0<=d;d--)c=f[d],c.nodeType==j.ELEMENT_NODE?c[k]=e:c.nodeType==
j.TEXT_NODE&&(c.nodeValue=e)}return g}});return b},{requires:["./api"]});KISSY.add("dom/base",function(a,b){a.mix(a,{DOM:b,get:b.get,query:b.query});return b},{requires:"./base/api,./base/attr,./base/class,./base/create,./base/data,./base/insertion,./base/offset,./base/style,./base/selector,./base/traversal".split(",")});
KISSY.add("dom/base/class",function(a,b,g){function l(h,d,f,c){if(!(d=a.trim(d)))return c?!1:g;var h=b.query(h),e=h.length,m=d.split(j),d=[],k,l;for(l=0;l<m.length;l++)(k=a.trim(m[l]))&&d.push(k);for(l=0;l<e;l++)if(m=h[l],m.nodeType==i.ELEMENT_NODE&&(m=f(m,d,d.length),m!==g))return m;return c?!1:g}var i=b.NodeType,j=/[\.\s]\s*\.?/,k=/[\n\t]/g;a.mix(b,{hasClass:function(a,b){return l(a,b,function(a,b,e){var a=a.className,d,h;if(a){a=(" "+a+" ").replace(k," ");d=0;for(h=!0;d<e;d++)if(0>a.indexOf(" "+
b[d]+" ")){h=!1;break}if(h)return!0}},!0)},addClass:function(b,d){l(b,d,function(b,c,e){var h=b.className,g,i;if(h){g=(" "+h+" ").replace(k," ");for(i=0;i<e;i++)0>g.indexOf(" "+c[i]+" ")&&(h+=" "+c[i]);b.className=a.trim(h)}else b.className=d},g)},removeClass:function(b,d){l(b,d,function(b,c,e){var d=b.className,h,g;if(d)if(e){d=(" "+d+" ").replace(k," ");for(h=0;h<e;h++)for(g=" "+c[h]+" ";0<=d.indexOf(g);)d=d.replace(g," ");b.className=a.trim(d)}else b.className=""},g)},replaceClass:function(a,d,
f){b.removeClass(a,d);b.addClass(a,f)},toggleClass:function(h,d,f){var c=a.isBoolean(f),e,m;l(h,d,function(a,h,g){for(m=0;m<g;m++)d=h[m],e=c?!f:b.hasClass(a,d),b[e?"removeClass":"addClass"](a,d)},g)}});return b},{requires:["./api"]});
KISSY.add("dom/base/create",function(a,b,g){function l(e){var c=a.require("event/dom");c&&c.detach(e);b.removeData(e)}function i(a,b){var c=b&&b!=d?b.createElement(e):m;c.innerHTML="m<div>"+a+"</div>";return c.lastChild}function j(a,b,e){var c=b.nodeType;if(c==f.DOCUMENT_FRAGMENT_NODE){b=b.childNodes;e=e.childNodes;for(c=0;b[c];)e[c]&&j(a,b[c],e[c]),c++}else if(c==f.ELEMENT_NODE){b=b.getElementsByTagName("*");e=e.getElementsByTagName("*");for(c=0;b[c];)e[c]&&a(b[c],e[c]),c++}}function k(e,c){var d=
a.require("event/dom"),h,m;if(c.nodeType!=f.ELEMENT_NODE||b.hasData(e)){h=b.data(e);for(m in h)b.data(c,m,h[m]);d&&(d._DOMUtils.removeData(c),d._clone(e,c))}}function h(b){var e=null,c,f;if(b&&(b.push||b.item)&&b[0]){e=b[0].ownerDocument;e=e.createDocumentFragment();b=a.makeArray(b);c=0;for(f=b.length;c<f;c++)e.appendChild(b[c])}return e}var d=a.Env.host.document,f=b.NodeType,c=a.UA.ie,e="div",m=d&&d.createElement(e),n=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,q=/<([\w:]+)/,
p=/^\s+/,o=c&&9>c,r=/<|&#?\w+;/,s=d&&"outerHTML"in d.documentElement,u=/^<(\w+)\s*\/?>(?:<\/\1>)?$/;a.mix(b,{create:function(c,m,j,k){var l=null;if(!c)return l;if(c.nodeType)return b.clone(c);if("string"!=typeof c)return l;k===g&&(k=!0);k&&(c=a.trim(c));var k=b._creators,s,v,j=j||d,z,t=e;if(r.test(c))if(z=u.exec(c))l=j.createElement(z[1]);else{c=c.replace(n,"<$1></$2>");if((z=q.exec(c))&&(s=z[1]))t=s.toLowerCase();s=(k[t]||i)(c,j);o&&(v=c.match(p))&&s.insertBefore(j.createTextNode(v[0]),s.firstChild);
c=s.childNodes;1===c.length?l=c[0].parentNode.removeChild(c[0]):c.length&&(l=h(c))}else l=j.createTextNode(c);a.isPlainObject(m)&&(l.nodeType==f.ELEMENT_NODE?b.attr(l,m,!0):l.nodeType==f.DOCUMENT_FRAGMENT_NODE&&b.attr(l.childNodes,m,!0));return l},_fixCloneAttributes:null,_creators:{div:i},_defaultCreator:i,html:function(a,e,c,d){var a=b.query(a),h=a[0],m=!1,i,j;if(h){if(e===g)return h.nodeType==f.ELEMENT_NODE?h.innerHTML:null;e+="";if(!e.match(/<(?:script|style|link)/i)&&(!o||!e.match(p))&&!t[(e.match(q)||
["",""])[1].toLowerCase()])try{for(i=a.length-1;0<=i;i--)j=a[i],j.nodeType==f.ELEMENT_NODE&&(l(j.getElementsByTagName("*")),j.innerHTML=e);m=!0}catch(k){}m||(e=b.create(e,0,h.ownerDocument,0),b.empty(a),b.append(e,a,c));d&&d()}},outerHTML:function(a,c,h){var i=b.query(a),j=i.length;if(a=i[0]){if(c===g){if(s)return a.outerHTML;c=(c=a.ownerDocument)&&c!=d?c.createElement(e):m;c.innerHTML="";c.appendChild(b.clone(a,!0));return c.innerHTML}c+="";if(!c.match(/<(?:script|style|link)/i)&&s)for(h=j-1;0<=
h;h--)a=i[h],a.nodeType==f.ELEMENT_NODE&&(l(a),l(a.getElementsByTagName("*")),a.outerHTML=c);else a=b.create(c,0,a.ownerDocument,0),b.insertBefore(a,i,h),b.remove(i)}},remove:function(a,e){var c,d=b.query(a),h,m;for(m=d.length-1;0<=m;m--)c=d[m],!e&&c.nodeType==f.ELEMENT_NODE&&(h=c.getElementsByTagName("*"),l(h),l(c)),c.parentNode&&c.parentNode.removeChild(c)},clone:function(a,e,c,d){"object"===typeof e&&(d=e.deepWithDataAndEvent,c=e.withDataAndEvent,e=e.deep);var a=b.get(a),h,m=b._fixCloneAttributes,
g;if(!a)return null;g=a.nodeType;h=a.cloneNode(e);if(g==f.ELEMENT_NODE||g==f.DOCUMENT_FRAGMENT_NODE)m&&g==f.ELEMENT_NODE&&m(a,h),e&&m&&j(m,a,h);c&&(k(a,h),e&&d&&j(k,a,h));return h},empty:function(a){var a=b.query(a),e,c;for(c=a.length-1;0<=c;c--)e=a[c],b.remove(e.childNodes)},_nodeListToFragment:h});var v=b._creators,w=b.create,t={option:"select",optgroup:"select",area:"map",thead:"table",td:"tr",th:"tr",tr:"tbody",tbody:"table",tfoot:"table",caption:"table",colgroup:"table",col:"colgroup",legend:"fieldset"},
z;for(z in t)(function(a){v[z]=function(b,e){return w("<"+a+">"+b+"</"+a+">",null,e)}})(t[z]);return b},{requires:["./api"]});
KISSY.add("dom/base/data",function(a,b,g){var l=a.Env.host,i="__ks_data_"+a.now(),j={},k={},h={applet:1,object:1,embed:1},d={hasData:function(b,c){if(b)if(c!==g){if(c in b)return!0}else if(!a.isEmptyObject(b))return!0;return!1}},f={hasData:function(a,b){return a==l?f.hasData(k,b):d.hasData(a[i],b)},data:function(a,b,c){if(a==l)return f.data(k,b,c);var d=a[i];if(c!==g)d=a[i]=a[i]||{},d[b]=c;else return b!==g?d&&d[b]:d=a[i]=a[i]||{}},removeData:function(b,c){if(b==l)return f.removeData(k,c);var d=b[i];
if(c!==g)delete d[c],a.isEmptyObject(d)&&f.removeData(b);else try{delete b[i]}catch(h){b[i]=g}}},c={hasData:function(a,b){var c=a[i];return!c?!1:d.hasData(j[c],b)},data:function(b,c,f){if(h[b.nodeName.toLowerCase()])return g;var d=b[i];if(!d){if(c!==g&&f===g)return g;d=b[i]=a.guid()}b=j[d];if(f!==g)b=j[d]=j[d]||{},b[c]=f;else return c!==g?b&&b[c]:b=j[d]=j[d]||{}},removeData:function(b,f){var d=b[i],h;if(d)if(h=j[d],f!==g)delete h[f],a.isEmptyObject(h)&&c.removeData(b);else{delete j[d];try{delete b[i]}catch(k){b[i]=
g}b.removeAttribute&&b.removeAttribute(i)}}};a.mix(b,{__EXPANDO:i,hasData:function(a,d){for(var h=!1,g=b.query(a),i=0;i<g.length&&!(h=g[i],h=h.nodeType?c.hasData(h,d):f.hasData(h,d));i++);return h},data:function(e,d,h){var e=b.query(e),i=e[0];if(a.isPlainObject(d)){for(var j in d)b.data(e,j,d[j]);return g}if(h===g){if(i)return i.nodeType?c.data(i,d):f.data(i,d)}else for(j=e.length-1;0<=j;j--)i=e[j],i.nodeType?c.data(i,d,h):f.data(i,d,h);return g},removeData:function(a,d){var h=b.query(a),g,i;for(i=
h.length-1;0<=i;i--)g=h[i],g.nodeType?c.removeData(g,d):f.removeData(g,d)}});return b},{requires:["./api"]});
KISSY.add("dom/base/insertion",function(a,b){function g(a,b){var i=[],l,p,o;for(l=0;a[l];l++)if(p=a[l],o=h(p),p.nodeType==j.DOCUMENT_FRAGMENT_NODE)i.push.apply(i,g(d(p.childNodes),b));else if("script"===o&&(!p.type||c.test(p.type)))p.parentNode&&p.parentNode.removeChild(p),b&&b.push(p);else{if(p.nodeType==j.ELEMENT_NODE&&!k.test(o)){o=[];var r,s,u=p.getElementsByTagName("script");for(s=0;s<u.length;s++)r=u[s],(!r.type||c.test(r.type))&&o.push(r);f.apply(a,[l+1,0].concat(o))}i.push(p)}return i}function l(b){b.src?
a.getScript(b.src):(b=a.trim(b.text||b.textContent||b.innerHTML||""))&&a.globalEval(b)}function i(e,c,f,d){e=b.query(e);d&&(d=[]);e=g(e,d);b._fixInsertionChecked&&b._fixInsertionChecked(e);var c=b.query(c),h,i,j,k,u=c.length;if((e.length||d&&d.length)&&u){e=b._nodeListToFragment(e);1<u&&(k=b.clone(e,!0),c=a.makeArray(c));for(h=0;h<u;h++)i=c[h],e&&(j=0<h?b.clone(k,!0):e,f(j,i)),d&&d.length&&a.each(d,l)}}var j=b.NodeType,k=/^(?:button|input|object|select|textarea)$/i,h=b.nodeName,d=a.makeArray,f=[].splice,
c=/\/(java|ecma)script/i;a.mix(b,{_fixInsertionChecked:null,insertBefore:function(a,b,c){i(a,b,function(a,b){b.parentNode&&b.parentNode.insertBefore(a,b)},c)},insertAfter:function(a,b,c){i(a,b,function(a,b){b.parentNode&&b.parentNode.insertBefore(a,b.nextSibling)},c)},appendTo:function(a,b,c){i(a,b,function(a,b){b.appendChild(a)},c)},prependTo:function(a,b,c){i(a,b,function(a,b){b.insertBefore(a,b.firstChild)},c)},wrapAll:function(a,c){c=b.clone(b.get(c),!0);a=b.query(a);a[0].parentNode&&b.insertBefore(c,
a[0]);for(var f;(f=c.firstChild)&&1==f.nodeType;)c=f;b.appendTo(a,c)},wrap:function(c,f){c=b.query(c);f=b.get(f);a.each(c,function(a){b.wrapAll(a,f)})},wrapInner:function(c,f){c=b.query(c);f=b.get(f);a.each(c,function(a){var c=a.childNodes;c.length?b.wrapAll(c,f):a.appendChild(f)})},unwrap:function(c){c=b.query(c);a.each(c,function(a){a=a.parentNode;b.replaceWith(a,a.childNodes)})},replaceWith:function(a,c){var f=b.query(a),c=b.query(c);b.remove(c,!0);b.insertBefore(c,f);b.remove(f)}});a.each({prepend:"prependTo",
append:"appendTo",before:"insertBefore",after:"insertAfter"},function(a,c){b[c]=b[a]});return b},{requires:["./api"]});
KISSY.add("dom/base/offset",function(a,b,g){function l(a){var b,c=a.ownerDocument.body;if(!a.getBoundingClientRect)return{left:0,top:0};b=a.getBoundingClientRect();a=b[n];b=b[q];a-=d.clientLeft||c.clientLeft||0;b-=d.clientTop||c.clientTop||0;return{left:a,top:b}}function i(a,c){var e={left:0,top:0},d=f(a[m]),h,g=a,c=c||d;do{if(d==c){var i=g;h=l(i);i=f(i[m]);h.left+=b[o](i);h.top+=b[r](i)}else h=l(g);e.left+=h.left;e.top+=h.top}while(d&&d!=c&&(g=d.frameElement)&&(d=d.parent));return e}var j=a.Env.host,
k=j.document,h=b.NodeType,d=k&&k.documentElement,f=b.getWindow,c=Math.max,e=parseFloat,m="ownerDocument",n="left",q="top",p=a.isNumber,o="scrollLeft",r="scrollTop";a.mix(b,{offset:function(a,c,f){if(c===g){var a=b.get(a),d;a&&(d=i(a,f));return d}f=b.query(a);for(d=f.length-1;0<=d;d--){var a=f[d],h=c;"static"===b.css(a,"position")&&(a.style.position="relative");var m=i(a),j={},k=void 0,l=void 0;for(l in h)k=e(b.css(a,l))||0,j[l]=e(k+h[l]-m[l]);b.css(a,j)}return g},scrollIntoView:function(c,d,i,m){var j,
k,l,p;if(l=b.get(c)){d&&(d=b.get(d));d||(d=l.ownerDocument);d.nodeType==h.DOCUMENT_NODE&&(d=f(d));a.isPlainObject(i)&&(m=i.allowHorizontalScroll,p=i.onlyScrollIfNeeded,i=i.alignWithTop);m=m===g?!0:m;k=!!f(d);var c=b.offset(l),o=b.outerHeight(l);j=b.outerWidth(l);var r,y,H,x;k?(k=d,r=b.height(k),y=b.width(k),x={left:b.scrollLeft(k),top:b.scrollTop(k)},k=c[n]-x[n],l=c[q]-x[q],j=c[n]+j-(x[n]+y),c=c[q]+o-(x[q]+r)):(r=b.offset(d),y=d.clientHeight,H=d.clientWidth,x={left:b.scrollLeft(d),top:b.scrollTop(d)},
k=c[n]-(r[n]+(e(b.css(d,"borderLeftWidth"))||0)),l=c[q]-(r[q]+(e(b.css(d,"borderTopWidth"))||0)),j=c[n]+j-(r[n]+H+(e(b.css(d,"borderRightWidth"))||0)),c=c[q]+o-(r[q]+y+(e(b.css(d,"borderBottomWidth"))||0)));if(p){if(0>l||0<c)!0===i?b.scrollTop(d,x.top+l):!1===i?b.scrollTop(d,x.top+c):0>l?b.scrollTop(d,x.top+l):b.scrollTop(d,x.top+c)}else(i=i===g?!0:!!i)?b.scrollTop(d,x.top+l):b.scrollTop(d,x.top+c);if(m)if(p){if(0>k||0<j)!0===i?b.scrollLeft(d,x.left+k):!1===i?b.scrollLeft(d,x.left+j):0>k?b.scrollLeft(d,
x.left+k):b.scrollLeft(d,x.left+j)}else(i=i===g?!0:!!i)?b.scrollLeft(d,x.left+k):b.scrollLeft(d,x.left+j)}},docWidth:0,docHeight:0,viewportHeight:0,viewportWidth:0,scrollTop:0,scrollLeft:0});a.each(["Left","Top"],function(a,c){var e="scroll"+a;b[e]=function(d,i){if(p(d))return arguments.callee(j,d);var d=b.get(d),m,k,l,n=f(d);n?i!==g?(i=parseFloat(i),k="Left"==a?i:b.scrollLeft(n),l="Top"==a?i:b.scrollTop(n),n.scrollTo(k,l)):(m=n["page"+(c?"Y":"X")+"Offset"],p(m)||(k=n.document,m=k.documentElement[e],
p(m)||(m=k.body[e]))):d.nodeType==h.ELEMENT_NODE&&(i!==g?d[e]=parseFloat(i):m=d[e]);return m}});a.each(["Width","Height"],function(a){b["doc"+a]=function(e){e=b.get(e);e=f(e).document;return c(e.documentElement["scroll"+a],e.body["scroll"+a],b["viewport"+a](e))};b["viewport"+a]=function(c){var c=b.get(c),e="client"+a,c=f(c).document,d=c.body,h=c.documentElement[e];return"CSS1Compat"===c.compatMode&&h||d&&d[e]||h}});return b},{requires:["./api"]});
KISSY.add("dom/base/selector",function(a,b,g){function l(a){var b,c;for(c=0;c<this.length&&!(b=this[c],!1===a(b,c));c++);}function i(c,f){var d,h,m="string"==typeof c,n=f===g&&(h=1)?[e]:i(f);c?m?(c=w(c),h&&"body"==c?d=[e.body]:1==n.length&&c&&(d=k(c,n[0]))):h&&(d=c.nodeType||c.setTimeout?[c]:c.getDOMNodes?c.getDOMNodes():q(c)?c:o(c)?a.makeArray(c):[c]):d=[];if(!d&&(d=[],c)){for(h=0;h<n.length;h++)s.apply(d,j(c,n[h]));1<d.length&&(1<n.length||m&&-1<c.indexOf(v))&&b.unique(d)}d.each=l;return d}function j(b,
c){var e="string"==typeof b;if(e&&b.match(z)||!e)e=h(b,c);else if(e&&-1<b.replace(/"(?:(?:\\.)|[^"])*"/g,"").replace(/'(?:(?:\\.)|[^'])*'/g,"").indexOf(v)){var e=[],f,d=b.split(/\s*,\s*/);for(f=0;f<d.length;f++)s.apply(e,j(d[f],c))}else e=[],(f=a.require("sizzle"))&&f(b,c,e);return e}function k(a,c){var e,h,i,g;if(t.test(a))e=(h=d(a.slice(1),c))?[h]:[];else if(i=z.exec(a)){h=i[1];g=i[2];i=i[3];if(c=h?d(h,c):c)i?!h||-1!=a.indexOf(u)?e=[].concat(b._getElementsByClassName(i,g,c)):(h=d(h,c),f(h,i)&&(e=
[h])):g&&(e=p(b._getElementsByTagName(g,c)));e=e||[]}return e}function h(a,c){var f;"string"==typeof a?f=k(a,c)||[]:q(a)||o(a)?f=n(a,function(a){return!a?!1:c==e?!0:b._contains(c,a)}):(!a?0:c==e||b._contains(c,a))&&(f=[a]);return f}function d(a,c){var e=c.nodeType==m.DOCUMENT_NODE;return b._getElementById(a,c,e?c:c.ownerDocument,e)}function f(a,b){var c=a&&a.className;return c&&-1<(u+c+u).indexOf(u+b+u)}function c(a,b){var c=a&&a.getAttributeNode(b);return c&&c.nodeValue}var e=a.Env.host.document,
m=b.NodeType,n=a.filter,q=a.isArray,p=a.makeArray,o=b._isNodeList,r=b.nodeName,s=Array.prototype.push,u=" ",v=",",w=a.trim,t=/^#[\w-]+$/,z=/^(?:#([\w-]+))?\s*([\w-]+|\*)?\.?([\w-]+)?$/;a.mix(b,{_getAttr:c,_hasSingleClass:f,_getElementById:function(a,c,e,f){var d=e.getElementById(a),h=b._getAttr(d,"id");return!d&&!f&&!b._contains(e,c)||d&&h!=a?b.filter("*","#"+a,c)[0]||null:f||d&&b._contains(c,d)?d:null},_getElementsByTagName:function(a,b){return b.getElementsByTagName(a)},_getElementsByClassName:function(a,
b,c){return p(c.querySelectorAll((b||"")+"."+a))},_compareNodeOrder:function(a,b){return!a.compareDocumentPosition||!b.compareDocumentPosition?a.compareDocumentPosition?-1:1:a.compareDocumentPosition(b)&4?-1:1},query:i,get:function(a,b){return i(a,b)[0]||null},unique:function(){function a(e,f){return e==f?(c=!0,0):b._compareNodeOrder(e,f)}var c,e=!0;[0,0].sort(function(){e=!1;return 0});return function(b){c=e;b.sort(a);if(c)for(var f=1,d=b.length;f<d;)b[f]===b[f-1]?b.splice(f,1):f++;return b}}(),
filter:function(b,e,d){var b=i(b,d),d=a.require("sizzle"),h,g,m,j,k=[];if("string"==typeof e&&(e=w(e))&&(h=z.exec(e)))m=h[1],g=h[2],j=h[3],m?m&&!g&&!j&&(e=function(a){return c(a,"id")==m}):e=function(a){var b=!0,c=!0;g&&(b=r(a)==g.toLowerCase());j&&(c=f(a,j));return c&&b};a.isFunction(e)?k=a.filter(b,e):e&&d&&(k=d.matches(e,b));return k},test:function(a,c,e){a=i(a,e);return a.length&&b.filter(a,c,e).length===a.length}});return b},{requires:["./api"]});
KISSY.add("dom/base/style",function(a,b,g){function l(a){return a.replace(s,"ms-").replace(u,v)}function i(a,b,c){var e={},f;for(f in b)e[f]=a[m][f],a[m][f]=b[f];c.call(a);for(f in b)a[m][f]=e[f]}function j(a,b,c){var e,f,d;if(3===a.nodeType||8===a.nodeType||!(e=a[m]))return g;b=l(b);d=B[b];b=C[b]||b;if(c!==g){null===c||c===t?c=t:!isNaN(Number(c))&&!r[b]&&(c+=z);d&&d.set&&(c=d.set(a,c));if(c!==g){try{e[b]=c}catch(h){}c===t&&e.removeAttribute&&e.removeAttribute(b)}e.cssText||a.removeAttribute("style");
return g}if(!d||!("get"in d&&(f=d.get(a,!1))!==g))f=e[b];return f===g?"":f}function k(a){var b,c=arguments;0!==a.offsetWidth?b=h.apply(g,c):i(a,A,function(){b=h.apply(g,c)});return b}function h(c,e,f){if(a.isWindow(c))return e==q?b.viewportWidth(c):b.viewportHeight(c);if(9==c.nodeType)return e==q?b.docWidth(c):b.docHeight(c);var d=e===q?["Left","Right"]:["Top","Bottom"],h=e===q?c.offsetWidth:c.offsetHeight;if(0<h)return"border"!==f&&a.each(d,function(a){f||(h-=parseFloat(b.css(c,"padding"+a))||0);
h="margin"===f?h+(parseFloat(b.css(c,f+a))||0):h-(parseFloat(b.css(c,"border"+a+"Width"))||0)}),h;h=b._getComputedStyle(c,e);if(null==h||0>Number(h))h=c.style[e]||0;h=parseFloat(h)||0;f&&a.each(d,function(a){h+=parseFloat(b.css(c,"padding"+a))||0;"padding"!==f&&(h+=parseFloat(b.css(c,"border"+a+"Width"))||0);"margin"===f&&(h+=parseFloat(b.css(c,f+a))||0)});return h}var d=a.Env.host,f=a.UA,c=b.nodeName,e=d.document,m="style",n=/^margin/,q="width",p="display"+a.now(),o=parseInt,r={fillOpacity:1,fontWeight:1,
lineHeight:1,opacity:1,orphans:1,widows:1,zIndex:1,zoom:1},s=/^-ms-/,u=/-([a-z])/ig,v=function(a,b){return b.toUpperCase()},w=/([A-Z]|^ms)/g,t="",z="px",B={},C={},D={};C["float"]="cssFloat";a.mix(b,{_camelCase:l,_CUSTOM_STYLES:B,_cssProps:C,_getComputedStyle:function(a,c){var e="",f,d,h,i,g;d=a.ownerDocument;c=c.replace(w,"-$1").toLowerCase();if(f=d.defaultView.getComputedStyle(a,null))e=f.getPropertyValue(c)||f[c];""===e&&!b.contains(d,a)&&(c=C[c]||c,e=a[m][c]);b._RE_NUM_NO_PX.test(e)&&n.test(c)&&
(g=a.style,d=g.width,h=g.minWidth,i=g.maxWidth,g.minWidth=g.maxWidth=g.width=e,e=f.width,g.width=d,g.minWidth=h,g.maxWidth=i);return e},style:function(c,e,f){var c=b.query(c),d,h=c[0];if(a.isPlainObject(e)){for(d in e)for(h=c.length-1;0<=h;h--)j(c[h],d,e[d]);return g}if(f===g)return d="",h&&(d=j(h,e,f)),d;for(h=c.length-1;0<=h;h--)j(c[h],e,f);return g},css:function(c,e,f){var c=b.query(c),d=c[0],h;if(a.isPlainObject(e)){for(h in e)for(d=c.length-1;0<=d;d--)j(c[d],h,e[h]);return g}e=l(e);h=B[e];if(f===
g){f="";if(d&&(!h||!("get"in h&&(f=h.get(d,!0))!==g)))f=b._getComputedStyle(d,e);return f===g?"":f}for(d=c.length-1;0<=d;d--)j(c[d],e,f);return g},show:function(a){var a=b.query(a),c,f,d;for(d=a.length-1;0<=d;d--)if(f=a[d],f[m].display=b.data(f,p)||t,"none"===b.css(f,"display")){c=f.tagName.toLowerCase();var h=void 0,g=D[c],i=void 0;D[c]||(h=e.body||e.documentElement,i=e.createElement(c),b.prepend(i,h),g=b.css(i,"display"),h.removeChild(i),D[c]=g);c=g;b.data(f,p,c);f[m].display=c}},hide:function(a){var a=
b.query(a),c,e;for(e=a.length-1;0<=e;e--){c=a[e];var f=c[m],d=f.display;"none"!==d&&(d&&b.data(c,p,d),f.display="none")}},toggle:function(a){var a=b.query(a),c,e;for(e=a.length-1;0<=e;e--)c=a[e],"none"===b.css(c,"display")?b.show(c):b.hide(c)},addStyleSheet:function(a,c,e){a=a||d;"string"==typeof a&&(e=c,c=a,a=d);var a=b.get(a),a=b.getWindow(a).document,f;if(e&&(e=e.replace("#",t)))f=b.get("#"+e,a);f||(f=b.create("<style>",{id:e},a),b.get("head",a).appendChild(f),f.styleSheet?f.styleSheet.cssText=
c:f.appendChild(a.createTextNode(c)))},unselectable:function(e){var e=b.query(e),d,h,g=0,i,j;for(h=e.length-1;0<=h;h--)if(d=e[h],f.gecko)d[m].MozUserSelect="none";else if(f.webkit)d[m].KhtmlUserSelect="none";else if(f.ie||f.opera){j=d.getElementsByTagName("*");d.setAttribute("unselectable","on");for(i=["iframe","textarea","input","select"];d=j[g++];)a.inArray(c(d),i)||d.setAttribute("unselectable","on")}},innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0,width:0,height:0});a.each([q,"height"],
function(c){b["inner"+a.ucfirst(c)]=function(a){return(a=b.get(a))&&k(a,c,"padding")};b["outer"+a.ucfirst(c)]=function(a,e){var f=b.get(a);return f&&k(f,c,e?"margin":"border")};b[c]=function(a,e){var f=b.css(a,c,e);f&&(f=parseFloat(f));return f}});var A={position:"absolute",visibility:"hidden",display:"block"};a.each(["height","width"],function(a){B[a]={get:function(b,c){return c?k(b,a)+"px":g}}});a.each(["left","top"],function(c){B[c]={get:function(d,h){var g;if(h&&(g=b._getComputedStyle(d,c),"auto"===
g)){g=0;if(a.inArray(b.css(d,"position"),["absolute","fixed"])){g=d["left"===c?"offsetLeft":"offsetTop"];if(f.ie&&9>(e.documentMode||0)||f.opera)g-=d.offsetParent&&d.offsetParent["client"+("left"==c?"Left":"Top")]||0;g-=o(b.css(d,"margin-"+c))||0}g+="px"}return g}}});return b},{requires:["./api"]});
KISSY.add("dom/base/traversal",function(a,b,g){function l(h,d,f,c,e,m,j){if(!(h=b.get(h)))return null;if(0===d)return h;m||(h=h[f]);if(!h)return null;e=e&&b.get(e)||null;d===g&&(d=1);var m=[],l=a.isArray(d),p,o;a.isNumber(d)&&(p=0,o=d,d=function(){return++p===o});for(;h&&h!=e;){if((h.nodeType==k.ELEMENT_NODE||h.nodeType==k.TEXT_NODE&&j)&&i(h,d)&&(!c||c(h)))if(m.push(h),!l)break;h=h[f]}return l?m:m[0]||null}function i(h,d){if(!d)return!0;if(a.isArray(d)){var f,c=d.length;if(!c)return!0;for(f=0;f<c;f++)if(b.test(h,
d[f]))return!0}else if(b.test(h,d))return!0;return!1}function j(h,d,f,c){var e=[],g,i;if((g=h=b.get(h))&&f)g=h.parentNode;if(g){f=a.makeArray(g.childNodes);for(g=0;g<f.length;g++)i=f[g],(c||i.nodeType==k.ELEMENT_NODE)&&i!=h&&e.push(i);d&&(e=b.filter(e,d))}return e}var k=b.NodeType;a.mix(b,{_contains:function(a,b){return!!(a.compareDocumentPosition(b)&16)},closest:function(a,b,f,c){return l(a,b,"parentNode",function(a){return a.nodeType!=k.DOCUMENT_FRAGMENT_NODE},f,!0,c)},parent:function(a,b,f){return l(a,
b,"parentNode",function(a){return a.nodeType!=k.DOCUMENT_FRAGMENT_NODE},f,g)},first:function(a,d,f){a=b.get(a);return l(a&&a.firstChild,d,"nextSibling",g,g,!0,f)},last:function(a,d,f){a=b.get(a);return l(a&&a.lastChild,d,"previousSibling",g,g,!0,f)},next:function(a,b,f){return l(a,b,"nextSibling",g,g,g,f)},prev:function(a,b,f){return l(a,b,"previousSibling",g,g,g,f)},siblings:function(a,b,f){return j(a,b,!0,f)},children:function(a,b){return j(a,b,g)},contents:function(a,b){return j(a,b,g,1)},contains:function(a,
d){a=b.get(a);d=b.get(d);return a&&d?b._contains(a,d):!1},index:function(h,d){var f=b.query(h),c,e=0;c=f[0];if(!d){f=c&&c.parentNode;if(!f)return-1;for(;c=c.previousSibling;)c.nodeType==k.ELEMENT_NODE&&e++;return e}e=b.query(d);return"string"===typeof d?a.indexOf(c,e):a.indexOf(e[0],f)},equals:function(a,d){a=b.query(a);d=b.query(d);if(a.length!=d.length)return!1;for(var f=a.length;0<=f;f--)if(a[f]!=d[f])return!1;return!0}});return b},{requires:["./api"]});
KISSY.add("dom/ie/attr",function(a,b){var g=b._attrHooks,l=b._attrNodeHook,i=b.NodeType,j=b._valHooks,k=b._propFix;if(8>(document.documentMode||a.UA.ie))g.style.set=function(a,b){a.style.cssText=b},a.mix(l,{get:function(a,b){var f=a.getAttributeNode(b);return f&&(f.specified||f.nodeValue)?f.nodeValue:void 0},set:function(a,b,f){var c=a.getAttributeNode(f),e;if(c)c.nodeValue=b;else try{e=a.ownerDocument.createAttribute(f),e.value=b,a.setAttributeNode(e)}catch(g){return a.setAttribute(f,b,0)}}}),a.mix(b._attrFix,
k),g.tabIndex=g.tabindex,a.each("href,src,width,height,colSpan,rowSpan".split(","),function(a){g[a]={get:function(b){b=b.getAttribute(a,2);return b===null?void 0:b}}}),j.button=g.value=l,g.placeholder={get:function(a,b){return a[b]||l.get(a,b)}},j.option={get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}};(g.href=g.href||{}).set=function(a,b,f){for(var c=a.childNodes,e,g=c.length,j=0<g,g=g-1;0<=g;g--)c[g].nodeType!=i.TEXT_NODE&&(j=0);j&&(e=a.ownerDocument.createElement("b"),
e.style.display="none",a.appendChild(e));a.setAttribute(f,""+b);e&&a.removeChild(e)};return b},{requires:["dom/base"]});
KISSY.add("dom/ie/create",function(a,b){var g=document.documentMode||a.UA.ie;b._fixCloneAttributes=function(a,h){h.clearAttributes&&h.clearAttributes();h.mergeAttributes&&h.mergeAttributes(a);var d=h.nodeName.toLowerCase(),f=a.childNodes;if("object"===d&&!h.childNodes.length)for(d=0;d<f.length;d++)h.appendChild(f[d].cloneNode(!0));else if("input"===d&&("checkbox"===a.type||"radio"===a.type)){if(a.checked&&(h.defaultChecked=h.checked=a.checked),h.value!==a.value)h.value=a.value}else if("option"===
d)h.selected=a.defaultSelected;else if("input"===d||"textarea"===d)h.defaultValue=a.defaultValue;h.removeAttribute(b.__EXPANDO)};var l=b._creators,i=b._defaultCreator,j=/<tbody/i;8>g&&(l.table=function(g,h){var d=i(g,h);if(j.test(g))return d;var f=d.firstChild,c=a.makeArray(f.childNodes);a.each(c,function(a){"tbody"==b.nodeName(a)&&!a.childNodes.length&&f.removeChild(a)});return d})},{requires:["dom/base"]});KISSY.add("dom/ie",function(a,b){return b},{requires:"./ie/attr,./ie/create,./ie/insertion,./ie/selector,./ie/style,./ie/traversal,./ie/input-selection".split(",")});
KISSY.add("dom/ie/input-selection",function(a,b){function g(a,b){var f=0,c=0,e=a.ownerDocument.selection.createRange(),g=l(a);g.inRange(e)&&(g.setEndPoint("EndToStart",e),f=j(a,g).length,b&&(c=f+j(a,e).length));return[f,c]}function l(a){if("textarea"==a.type){var b=a.document.body.createTextRange();b.moveToElementText(a);return b}return a.createTextRange()}function i(a,b,f){var c=Math.min(b,f),e=Math.max(b,f);return c==e?0:"textarea"==a.type?(a=a.value.substring(c,e).replace(/\r\n/g,"\n").length,
b>f&&(a=-a),a):f-b}function j(a,b){if("textarea"==a.type){var f=b.text,c=b.duplicate();if(0==c.compareEndPoints("StartToEnd",c))return f;c.moveEnd("character",-1);c.text==f&&(f+="\r\n");return f}return b.text}var k=b._propHooks;k.selectionStart={set:function(a,b){var f=a.ownerDocument.selection.createRange();if(l(a).inRange(f)){var c=g(a,1)[1],e=i(a,b,c);f.collapse(!1);f.moveStart("character",-e);b>c&&f.collapse(!0);f.select()}},get:function(a){return g(a)[0]}};k.selectionEnd={set:function(a,b){var f=
a.ownerDocument.selection.createRange();if(l(a).inRange(f)){var c=g(a)[0],e=i(a,c,b);f.collapse(!0);f.moveEnd("character",e);c>b&&f.collapse(!1);f.select()}},get:function(a){return g(a,1)[1]}}},{requires:["dom/base"]});
KISSY.add("dom/ie/insertion",function(a,b){if(8>(document.documentMode||a.UA.ie))b._fixInsertionChecked=function l(a){for(var j=0;j<a.length;j++){var k=a[j];if(k.nodeType==b.NodeType.DOCUMENT_FRAGMENT_NODE)l(k.childNodes);else if("input"==b.nodeName(k)){if("checkbox"===k.type||"radio"===k.type)k.defaultChecked=k.checked}else if(k.nodeType==b.NodeType.ELEMENT_NODE)for(var k=k.getElementsByTagName("input"),h=0;h<k.length;h++)l(k[h])}}},{requires:["dom/base"]});
KISSY.add("dom/ie/selector",function(a,b){var g=a.Env.host.document;b._compareNodeOrder=function(a,b){return a.sourceIndex-b.sourceIndex};g.querySelectorAll||(b._getElementsByClassName=function(a,g,j){if(!j)return[];for(var g=j.getElementsByTagName(g||"*"),j=[],k=0,h=0,d=g.length,f;k<d;++k)f=g[k],b._hasSingleClass(f,a)&&(j[h++]=f);return j});b._getElementsByTagName=function(b,g){var j=a.makeArray(g.getElementsByTagName(b)),k,h,d,f;if(b==="*"){k=[];for(d=h=0;f=j[h++];)f.nodeType===1&&(k[d++]=f);j=
k}return j}},{requires:["dom/base"]});
KISSY.add("dom/ie/style",function(a,b){var g=b._cssProps,l=document.documentMode||a.UA.ie,i=a.Env.host.document,i=i&&i.documentElement,j=/^(top|right|bottom|left)$/,k=b._CUSTOM_STYLES,h=/opacity\s*=\s*([^)]*)/,d=/alpha\([^)]*\)/i;g["float"]="styleFloat";k.backgroundPosition={get:function(a,b){return b?a.currentStyle.backgroundPositionX+" "+a.currentStyle.backgroundPositionY:a.style.backgroundPosition}};try{null==i.style.opacity&&(k.opacity={get:function(a,b){return h.test((b&&a.currentStyle?a.currentStyle.filter:
a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(b,c){var c=parseFloat(c),f=b.style,h=b.currentStyle,g=isNaN(c)?"":"alpha(opacity="+100*c+")",i=a.trim(h&&h.filter||f.filter||"");f.zoom=1;if((1<=c||!g)&&!a.trim(i.replace(d,"")))if(f.removeAttribute("filter"),!g||h&&!h.filter)return;f.filter=d.test(i)?i.replace(d,g):i+(i?", ":"")+g}})}catch(f){}var l=8==l,c={};c.thin=l?"1px":"2px";c.medium=l?"3px":"4px";c.thick=l?"5px":"6px";a.each(["","Top","Left","Right","Bottom"],function(a){var b=
"border"+a+"Width",f="border"+a+"Style";k[b]={get:function(a,e){var d=e?a.currentStyle:0,h=d&&""+d[b]||void 0;h&&0>h.indexOf("px")&&(h=c[h]&&"none"!==d[f]?c[h]:0);return h}}});b._getComputedStyle=function(a,c){var c=g[c]||c,f=a.currentStyle&&a.currentStyle[c];if(b._RE_NUM_NO_PX.test(f)&&!j.test(c)){var d=a.style,h=d.left,i=a.runtimeStyle.left;a.runtimeStyle.left=a.currentStyle.left;d.left="fontSize"===c?"1em":f||0;f=d.pixelLeft+"px";d.left=h;a.runtimeStyle.left=i}return""===f?"auto":f}},{requires:["dom/base"]});
KISSY.add("dom/ie/traversal",function(a,b){b._contains=function(a,l){a.nodeType==b.NodeType.DOCUMENT_NODE&&(a=a.documentElement);l=l.parentNode;return a==l?!0:l&&l.nodeType==b.NodeType.ELEMENT_NODE?a.contains&&a.contains(l):!1}},{requires:["dom/base"]});KISSY.add("event/base",function(a,b,g,l,i){return a.Event={_Utils:b,_Object:g,_Observer:l,_ObservableEvent:i}},{requires:["./base/utils","./base/object","./base/observer","./base/observable"]});
KISSY.add("event/base/object",function(a){function b(){this.timeStamp=a.now()}var g=function(){return!1},l=function(){return!0};b.prototype={constructor:b,isDefaultPrevented:g,isPropagationStopped:g,isImmediatePropagationStopped:g,preventDefault:function(){this.isDefaultPrevented=l},stopPropagation:function(){this.isPropagationStopped=l},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=l;this.stopPropagation()},halt:function(a){a?this.stopImmediatePropagation():this.stopPropagation();
this.preventDefault()}};return b});
KISSY.add("event/base/observable",function(a){function b(b){a.mix(this,b);this.reset()}b.prototype={constructor:b,hasObserver:function(){return!!this.observers.length},reset:function(){this.observers=[]},removeObserver:function(a){var b,i=this.observers,j=i.length;for(b=0;b<j;b++)if(i[b]==a){i.splice(b,1);break}this.checkMemory()},checkMemory:function(){},findObserver:function(a){var b=this.observers,i;for(i=b.length-1;0<=i;--i)if(a.equals(b[i]))return i;return-1}};return b});
KISSY.add("event/base/observer",function(a){function b(b){a.mix(this,b)}b.prototype={constructor:b,equals:function(b){var l=this;return!!a.reduce(l.keys,function(a,j){return a&&l[j]===b[j]},1)},simpleNotify:function(a,b){var i;i=this.fn.call(this.context||b.currentTarget,a,this.data);this.once&&b.removeObserver(this);return i},notifyInternal:function(a,b){return this.simpleNotify(a,b)},notify:function(a,b){var i;i=a._ks_groups;if(!i||this.groups&&this.groups.match(i))return i=this.notifyInternal(a,
b),!1===i&&a.halt(),i}};return b});
KISSY.add("event/base/utils",function(a){var b,g;return{splitAndRun:g=function(b,g){b=a.trim(b);-1==b.indexOf(" ")?g(b):a.each(b.split(/\s+/),g)},normalizeParam:function(g,i,j){var k=i||{},k=a.isFunction(i)?{fn:i,context:j}:a.merge(k),i=b(g),g=i[0];k.groups=i[1];k.type=g;return k},batchForType:function(b,i){var j=a.makeArray(arguments);g(j[2+i],function(a){var h=[].concat(j);h.splice(0,2);h[i]=a;b.apply(null,h)})},getTypedGroups:b=function(a){if(0>a.indexOf("."))return[a,""];var b=a.match(/([^.]+)?(\..+)?$/),
a=[b[1]];(b=b[2])?(b=b.split(".").sort(),a.push(b.join("."))):a.push("");return a},getGroupsRe:function(a){return RegExp(a.split(".").join(".*\\.")+"(?:\\.|$)")}}});
KISSY.add("event/custom/api-impl",function(a,b,g,l){var i=a.trim,j=g._Utils,k=j.splitAndRun;return a.mix(b,{fire:function(a,b,f){var c=void 0,f=f||{};k(b,function(b){var d,b=j.getTypedGroups(b);d=b[1];b=b[0];d&&(d=j.getGroupsRe(d),f._ks_groups=d);d=(l.getCustomEvent(a,b)||new l({currentTarget:a,type:b})).fire(f);!1!==c&&(c=d)});return c},publish:function(b,d,f){var c;k(d,function(e){c=l.getCustomEvent(b,e,1);a.mix(c,f)});return b},addTarget:function(h,d){var f=b.getTargets(h);a.inArray(d,f)||f.push(d);
return h},removeTarget:function(h,d){var f=b.getTargets(h),c=a.indexOf(d,f);-1!=c&&f.splice(c,1);return h},getTargets:function(a){a["__~ks_bubble_targets"]=a["__~ks_bubble_targets"]||[];return a["__~ks_bubble_targets"]},on:function(a,b,f,c){b=i(b);j.batchForType(function(b,c,f){c=j.normalizeParam(b,c,f);b=c.type;if(b=l.getCustomEvent(a,b,1))b.on(c)},0,b,f,c);return a},detach:function(b,d,f,c){d=i(d);j.batchForType(function(c,f,d){var g=j.normalizeParam(c,f,d);(c=g.type)?(c=l.getCustomEvent(b,c,1))&&
c.detach(g):(c=l.getCustomEvents(b),a.each(c,function(a){a.detach(g)}))},0,d,f,c);return b}})},{requires:["./api","event/base","./observable"]});KISSY.add("event/custom/api",function(){return{}});KISSY.add("event/custom",function(a,b,g,l){var i={};a.each(g,function(b,g){i[g]=function(){var h=a.makeArray(arguments);h.unshift(this);return b.apply(null,h)}});g=a.mix({_ObservableCustomEvent:l,Target:i},g);a.mix(b,{Target:i,custom:g});a.EventTarget=i;return g},{requires:["./base","./custom/api-impl","./custom/observable"]});
KISSY.add("event/custom/object",function(a,b){function g(b){g.superclass.constructor.call(this);a.mix(this,b)}a.extend(g,b._Object);return g},{requires:["event/base"]});
KISSY.add("event/custom/observable",function(a,b,g,l,i){function j(){j.superclass.constructor.apply(this,arguments);this.defaultFn=null;this.defaultTargetOnly=!1;this.bubbles=!0}var k=i._Utils;a.extend(j,i._ObservableEvent,{constructor:j,on:function(a){a=new g(a);-1==this.findObserver(a)&&this.observers.push(a)},checkMemory:function(){var b=this.currentTarget,f=j.getCustomEvents(b);f&&(this.hasObserver()||delete f[this.type],a.isEmptyObject(f)&&delete b[h])},fire:function(a){if(this.hasObserver()||
this.bubbles){var a=a||{},f=this.type,c=this.defaultFn,e,h,g;e=this.currentTarget;var i=a,k;a.type=f;i instanceof l||(i.target=e,i=new l(i));i.currentTarget=e;a=this.notify(i);!1!==k&&(k=a);if(this.bubbles){g=(h=b.getTargets(e))&&h.length||0;for(e=0;e<g&&!i.isPropagationStopped();e++)a=b.fire(h[e],f,i),!1!==k&&(k=a)}c&&!i.isDefaultPrevented()&&(f=j.getCustomEvent(i.target,i.type),(!this.defaultTargetOnly&&!f.defaultTargetOnly||this==i.target)&&c.call(this));return k}},notify:function(a){var b=this.observers,
c,e,h=b.length,g;for(g=0;g<h&&!a.isImmediatePropagationStopped();g++)c=b[g].notify(a,this),!1!==e&&(e=c),!1===c&&a.halt();return e},detach:function(a){var b,c=a.fn,e=a.context,h=this.currentTarget,g=this.observers,a=a.groups;if(g.length){a&&(b=k.getGroupsRe(a));var i,j,l,r,s=g.length;if(c||b){e=e||h;i=a=0;for(j=[];a<s;++a)if(l=g[a],r=l.context||h,e!=r||c&&c!=l.fn||b&&!l.groups.match(b))j[i++]=l;this.observers=j}else this.reset();this.checkMemory()}}});var h="__~ks_custom_events";j.getCustomEvent=
function(a,b,c){var e,h=j.getCustomEvents(a,c);e=h&&h[b];!e&&c&&(e=h[b]=new j({currentTarget:a,type:b}));return e};j.getCustomEvents=function(a,b){!a[h]&&b&&(a[h]={});return a[h]};return j},{requires:["./api","./observer","./object","event/base"]});KISSY.add("event/custom/observer",function(a,b){function g(){g.superclass.constructor.apply(this,arguments)}a.extend(g,b._Observer,{keys:["fn","context","groups"]});return g},{requires:["event/base"]});
KISSY.add("event/dom/base/api",function(a,b,g,l,i,j,k){function h(a,b){var f=l[b]||{};a.originalType||(a.selector?f.delegateFix&&(a.originalType=b,b=f.delegateFix):f.onFix&&(a.originalType=b,b=f.onFix));return b}function d(b,e,f){var d,g,i,f=a.merge(f),e=h(f,e);d=j.getCustomEvents(b,1);if(!(i=d.handle))i=d.handle=function(a){var b=a.type,c=i.currentTarget;if(!(j.triggeredEvent==b||"undefined"==typeof KISSY))if(b=j.getCustomEvent(c,b))return a.currentTarget=c,a=new k(a),b.notify(a)},i.currentTarget=
b;if(!(g=d.events))g=d.events={};d=g[e];d||(d=g[e]=new j({type:e,fn:i,currentTarget:b}),d.setup());d.on(f);b=null}var f=b._Utils;a.mix(b,{add:function(b,e,h,i){e=a.trim(e);b=g.query(b);f.batchForType(function(a,b,c,e){c=f.normalizeParam(b,c,e);b=c.type;for(e=a.length-1;0<=e;e--)d(a[e],b,c)},1,b,e,h,i);return b},remove:function(b,e,d,i){e=a.trim(e);b=g.query(b);f.batchForType(function(b,c,e,d){e=f.normalizeParam(c,e,d);c=e.type;for(d=b.length-1;0<=d;d--){var g=b[d],i=c,k=e,k=a.merge(k),m=void 0,i=
h(k,i),g=j.getCustomEvents(g),m=(g||{}).events;if(g&&m)if(i)(m=m[i])&&m.detach(k);else for(i in m)m[i].detach(k)}},1,b,e,d,i);return b},delegate:function(a,e,f,d,h){return b.add(a,e,{fn:d,context:h,selector:f})},undelegate:function(a,e,f,d,h){return b.remove(a,e,{fn:d,context:h,selector:f})},fire:function(b,e,d,h){var i=void 0,d=d||{};d.synthetic=1;f.splitAndRun(e,function(e){d.type=e;var k,l,s,e=f.getTypedGroups(e);(l=e[1])&&(l=f.getGroupsRe(l));e=e[0];a.mix(d,{type:e,_ks_groups:l});b=g.query(b);
for(l=b.length-1;0<=l;l--)k=b[l],s=j.getCustomEvent(k,e),!h&&!s&&(s=new j({type:e,currentTarget:k})),s&&(k=s.fire(d,h),!1!==i&&(i=k))});return i},fireHandler:function(a,e,f){return b.fire(a,e,f,1)},_clone:function(b,e){var f;(f=j.getCustomEvents(b))&&a.each(f.events,function(b,c){a.each(b.observers,function(a){d(e,c,a)})})},_ObservableDOMEvent:j});b.on=b.add;b.detach=b.remove;return b},{requires:"event/base,dom,./special,./utils,./observable,./object".split(",")});
KISSY.add("event/dom/base",function(a,b,g,l,i,j){a.mix(b,{KeyCodes:g,_DOMUtils:l,Gesture:i,_Special:j});return b},{requires:"event/base,./base/key-codes,./base/utils,./base/gesture,./base/special,./base/api,./base/mouseenter,./base/mousewheel,./base/valuechange".split(",")});KISSY.add("event/dom/base/gesture",function(){return{start:"mousedown",move:"mousemove",end:"mouseup",tap:"click",doubleTap:"dblclick"}});
KISSY.add("event/dom/base/key-codes",function(a){var b=a.UA,g={MAC_ENTER:3,BACKSPACE:8,TAB:9,NUM_CENTER:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:44,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,QUESTION_MARK:63,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,
Y:89,Z:90,META:91,WIN_KEY_RIGHT:92,CONTEXT_MENU:93,NUM_ZERO:96,NUM_ONE:97,NUM_TWO:98,NUM_THREE:99,NUM_FOUR:100,NUM_FIVE:101,NUM_SIX:102,NUM_SEVEN:103,NUM_EIGHT:104,NUM_NINE:105,NUM_MULTIPLY:106,NUM_PLUS:107,NUM_MINUS:109,NUM_PERIOD:110,NUM_DIVISION:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,NUMLOCK:144,SEMICOLON:186,DASH:189,EQUALS:187,COMMA:188,PERIOD:190,SLASH:191,APOSTROPHE:192,SINGLE_QUOTE:222,OPEN_SQUARE_BRACKET:219,BACKSLASH:220,CLOSE_SQUARE_BRACKET:221,
WIN_KEY:224,MAC_FF_META:224,WIN_IME:229,isTextModifyingKeyEvent:function(a){if(a.altKey&&!a.ctrlKey||a.metaKey||a.keyCode>=g.F1&&a.keyCode<=g.F12)return!1;switch(a.keyCode){case g.ALT:case g.CAPS_LOCK:case g.CONTEXT_MENU:case g.CTRL:case g.DOWN:case g.END:case g.ESC:case g.HOME:case g.INSERT:case g.LEFT:case g.MAC_FF_META:case g.META:case g.NUMLOCK:case g.NUM_CENTER:case g.PAGE_DOWN:case g.PAGE_UP:case g.PAUSE:case g.PRINT_SCREEN:case g.RIGHT:case g.SHIFT:case g.UP:case g.WIN_KEY:case g.WIN_KEY_RIGHT:return!1;
default:return!0}},isCharacterKey:function(a){if(a>=g.ZERO&&a<=g.NINE||a>=g.NUM_ZERO&&a<=g.NUM_MULTIPLY||a>=g.A&&a<=g.Z||b.webkit&&0==a)return!0;switch(a){case g.SPACE:case g.QUESTION_MARK:case g.NUM_PLUS:case g.NUM_MINUS:case g.NUM_PERIOD:case g.NUM_DIVISION:case g.SEMICOLON:case g.DASH:case g.EQUALS:case g.COMMA:case g.PERIOD:case g.SLASH:case g.APOSTROPHE:case g.SINGLE_QUOTE:case g.OPEN_SQUARE_BRACKET:case g.BACKSLASH:case g.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}};return g});
KISSY.add("event/dom/base/mouseenter",function(a,b,g,l){a.each([{name:"mouseenter",fix:"mouseover"},{name:"mouseleave",fix:"mouseout"}],function(a){l[a.name]={onFix:a.fix,delegateFix:a.fix,handle:function(a,b,h){var d=a.currentTarget,f=a.relatedTarget;if(!f||f!==d&&!g.contains(d,f))return[b.simpleNotify(a,h)]}}});return b},{requires:["./api","dom","./special"]});
KISSY.add("event/dom/base/mousewheel",function(a,b){var g=a.UA.gecko?"DOMMouseScroll":"mousewheel";b.mousewheel={onFix:g,delegateFix:g}},{requires:["./special"]});
KISSY.add("event/dom/base/object",function(a,b,g){function l(a){this.scale=this.rotation=this.targetTouches=this.touches=this.changedTouches=this.which=this.wheelDelta=this.view=this.toElement=this.srcElement=this.shiftKey=this.screenY=this.screenX=this.relatedTarget=this.relatedNode=this.prevValue=this.pageY=this.pageX=this.offsetY=this.offsetX=this.newValue=this.metaKey=this.keyCode=this.handler=this.fromElement=this.eventPhase=this.detail=this.data=this.ctrlKey=this.clientY=this.clientX=this.charCode=
this.cancelable=this.button=this.bubbles=this.attrName=this.attrChange=this.altKey=g;l.superclass.constructor.call(this);this.originalEvent=a;this.isDefaultPrevented=a.defaultPrevented||a.returnValue===d||a.getPreventDefault&&a.getPreventDefault()?function(){return h}:function(){return d};i(this);j(this)}function i(a){for(var b=a.originalEvent,d=f.length,h,i=b.currentTarget,i=9===i.nodeType?i:i.ownerDocument||k;d;)h=f[--d],a[h]=b[h];a.target||(a.target=a.srcElement||i);3===a.target.nodeType&&(a.target=
a.target.parentNode);!a.relatedTarget&&a.fromElement&&(a.relatedTarget=a.fromElement===a.target?a.toElement:a.fromElement);a.pageX===g&&a.clientX!==g&&(b=i.documentElement,d=i.body,a.pageX=a.clientX+(b&&b.scrollLeft||d&&d.scrollLeft||0)-(b&&b.clientLeft||d&&d.clientLeft||0),a.pageY=a.clientY+(b&&b.scrollTop||d&&d.scrollTop||0)-(b&&b.clientTop||d&&d.clientTop||0));a.which===g&&(a.which=a.charCode===g?a.keyCode:a.charCode);a.metaKey===g&&(a.metaKey=a.ctrlKey);!a.which&&a.button!==g&&(a.which=a.button&
1?1:a.button&2?3:a.button&4?2:0)}function j(b){var e,f,d,h=b.detail;b.wheelDelta&&(d=b.wheelDelta/120);b.detail&&(d=-(0==h%3?h/3:h));b.axis!==g&&(b.axis===b.HORIZONTAL_AXIS?(f=0,e=-1*d):b.axis===b.VERTICAL_AXIS&&(e=0,f=d));b.wheelDeltaY!==g&&(f=b.wheelDeltaY/120);b.wheelDeltaX!==g&&(e=-1*b.wheelDeltaX/120);!e&&!f&&(f=d);(e!==g||f!==g||d!==g)&&a.mix(b,{deltaY:f,delta:d,deltaX:e})}var k=a.Env.host.document,h=!0,d=!1,f="type,altKey,attrChange,attrName,bubbles,button,cancelable,charCode,clientX,clientY,ctrlKey,currentTarget,data,detail,eventPhase,fromElement,handler,keyCode,metaKey,newValue,offsetX,offsetY,pageX,pageY,prevValue,relatedNode,relatedTarget,screenX,screenY,shiftKey,srcElement,target,toElement,view,wheelDelta,which,axis,changedTouches,touches,targetTouches,rotation,scale".split(",");
a.extend(l,b._Object,{constructor:l,preventDefault:function(){var a=this.originalEvent;a.preventDefault?a.preventDefault():a.returnValue=d;l.superclass.preventDefault.call(this)},stopPropagation:function(){var a=this.originalEvent;a.stopPropagation?a.stopPropagation():a.cancelBubble=h;l.superclass.stopPropagation.call(this)}});return b.DOMEventObject=l},{requires:["event/base"]});
KISSY.add("event/dom/base/observable",function(a,b,g,l,i,j,k){function h(b){a.mix(this,b);this.reset()}var d=k._Utils;a.extend(h,k._ObservableEvent,{setup:function(){var a=this.type,b=g[a]||{},e=this.currentTarget,d=l.data(e).handle;(!b.setup||!1===b.setup.call(e,a))&&l.simpleAdd(e,a,d)},constructor:h,reset:function(){h.superclass.reset.call(this);this.lastCount=this.delegateCount=0},notify:function(a){var c=a.target,e=this.currentTarget,d=this.observers,h=[],g,i,j=this.delegateCount||0,k,l;if(j&&
!c.disabled)for(;c!=e;){k=[];for(i=0;i<j;i++)l=d[i],b.test(c,l.selector)&&k.push(l);k.length&&h.push({currentTarget:c,currentTargetObservers:k});c=c.parentNode||e}h.push({currentTarget:e,currentTargetObservers:d.slice(j)});i=0;for(c=h.length;!a.isPropagationStopped()&&i<c;++i){e=h[i];k=e.currentTargetObservers;e=e.currentTarget;a.currentTarget=e;for(e=0;!a.isImmediatePropagationStopped()&&e<k.length;e++)d=k[e],d=d.notify(a,this),!1!==g&&(g=d)}return g},fire:function(f,c){var f=f||{},e=this.type,d=
g[e];d&&d.onFix&&(e=d.onFix);var i,k,d=this.currentTarget,l=!0;f.type=e;f instanceof j||(k=f,f=new j({currentTarget:d,target:d}),a.mix(f,k));k=d;i=b.getWindow(k.ownerDocument||k);var o=i.document,r=[],s=0,u="on"+e;do r.push(k),k=k.parentNode||k.ownerDocument||k===o&&i;while(k);k=r[s];do{f.currentTarget=k;if(i=h.getCustomEvent(k,e))i=i.notify(f),!1!==l&&(l=i);k[u]&&!1===k[u].call(k)&&f.preventDefault();k=r[++s]}while(!c&&k&&!f.isPropagationStopped());if(!c&&!f.isDefaultPrevented()){var v;try{if(u&&
d[e]&&("focus"!==e&&"blur"!==e||0!==d.offsetWidth)&&!a.isWindow(d))(v=d[u])&&(d[u]=null),h.triggeredEvent=e,d[e]()}catch(w){}v&&(d[u]=v);h.triggeredEvent=""}return l},on:function(a){var b=this.observers,e=g[this.type]||{},a=a instanceof i?a:new i(a);-1==this.findObserver(a)&&(a.selector?(b.splice(this.delegateCount,0,a),this.delegateCount++):a.last?(b.push(a),this.lastCount++):b.splice(b.length-this.lastCount,0,a),e.add&&e.add.call(this.currentTarget,a))},detach:function(a){var b,e=g[this.type]||
{},h="selector"in a,i=a.selector,j=a.context,k=a.fn,l=this.currentTarget,r=this.observers,a=a.groups;if(r.length){a&&(b=d.getGroupsRe(a));var s,u,v,w,t=r.length;if(k||h||b){j=j||l;s=a=0;for(u=[];a<t;++a)v=r[a],w=v.context||l,j!=w||k&&k!=v.fn||h&&(i&&i!=v.selector||!i&&!v.selector)||b&&!v.groups.match(b)?u[s++]=v:(v.selector&&this.delegateCount&&this.delegateCount--,v.last&&this.lastCount&&this.lastCount--,e.remove&&e.remove.call(l,v));this.observers=u}else this.reset();this.checkMemory()}},checkMemory:function(){var b=
this.type,c,e,d=g[b]||{},h=this.currentTarget,i=l.data(h);if(i&&(c=i.events,this.hasObserver()||(e=i.handle,(!d.tearDown||!1===d.tearDown.call(h,b))&&l.simpleRemove(h,b,e),delete c[b]),a.isEmptyObject(c)))i.handle=null,l.removeData(h)}});h.triggeredEvent="";h.getCustomEvent=function(a,b){var e=l.data(a),d;e&&(d=e.events);if(d)return d[b]};h.getCustomEvents=function(a,b){var e=l.data(a);!e&&b&&l.data(a,e={});return e};return h},{requires:"dom,./special,./utils,./observer,./object,event/base".split(",")});
KISSY.add("event/dom/base/observer",function(a,b,g){function l(a){l.superclass.constructor.apply(this,arguments)}a.extend(l,g._Observer,{keys:"fn,selector,data,context,originalType,groups,last".split(","),notifyInternal:function(a,g){var k,h,d=a.type;this.originalType&&(a.type=this.originalType);(k=b[a.type])&&k.handle?(k=k.handle(a,this,g))&&0<k.length&&(h=k[0]):h=this.simpleNotify(a,g);a.type=d;return h}});return l},{requires:["./special","event/base"]});KISSY.add("event/dom/base/special",function(){return{}});
KISSY.add("event/dom/base/utils",function(a,b){var g=a.Env.host.document;return{simpleAdd:g&&g.addEventListener?function(a,b,g,k){a.addEventListener&&a.addEventListener(b,g,!!k)}:function(a,b,g){a.attachEvent&&a.attachEvent("on"+b,g)},simpleRemove:g&&g.removeEventListener?function(a,b,g,k){a.removeEventListener&&a.removeEventListener(b,g,!!k)}:function(a,b,g){a.detachEvent&&a.detachEvent("on"+b,g)},data:function(a,g){return b.data(a,"ksEventTargetId_1.30",g)},removeData:function(a){return b.removeData(a,
"ksEventTargetId_1.30")}}},{requires:["dom"]});
KISSY.add("event/dom/base/valuechange",function(a,b,g,l){function i(a){if(g.hasData(a,q)){var b=g.data(a,q);clearTimeout(b);g.removeData(a,q)}}function j(a){i(a.target)}function k(a){var c=a.value,f=g.data(a,n);c!==f&&(b.fireHandler(a,e,{prevVal:f,newVal:c}),g.data(a,n,c))}function h(a){g.hasData(a,q)||g.data(a,q,setTimeout(function(){k(a);g.data(a,q,setTimeout(arguments.callee,p))},p))}function d(a){var b=a.target;"focus"==a.type&&g.data(b,n,b.value);h(b)}function f(a){k(a.target)}function c(a){g.removeData(a,
n);i(a);b.remove(a,"blur",j);b.remove(a,"webkitspeechchange",f);b.remove(a,"mousedown keyup keydown focus",d)}var e="valuechange",m=g.nodeName,n="event/valuechange/history",q="event/valuechange/poll",p=50;l[e]={setup:function(){var a=m(this);if("input"==a||"textarea"==a)c(this),b.on(this,"blur",j),b.on(this,"webkitspeechchange",f),b.on(this,"mousedown keyup keydown focus",d)},tearDown:function(){c(this)}};return b},{requires:["./api","dom","./special"]});
KISSY.add("event/dom/focusin",function(a,b){var g=b._Special;a.each([{name:"focusin",fix:"focus"},{name:"focusout",fix:"blur"}],function(l){function i(a){return b.fire(a.target,l.name)}var j=a.guid("attaches_"+a.now()+"_");g[l.name]={setup:function(){var a=this.ownerDocument||this;j in a||(a[j]=0);a[j]+=1;1===a[j]&&a.addEventListener(l.fix,i,!0)},tearDown:function(){var a=this.ownerDocument||this;a[j]-=1;0===a[j]&&a.removeEventListener(l.fix,i,!0)}}});return b},{requires:["event/dom/base"]});
KISSY.add("event/dom/hashchange",function(a,b,g){var l=a.UA,i=b._Special,j=a.Env.host,k=j.document,h=k&&k.documentMode,d="__replace_history_"+a.now(),l=h||l.ie;b.REPLACE_HISTORY=d;var f="<html><head><title>"+(k&&k.title||"")+" - {hash}</title>{head}</head><body>{hash}</body></html>",c=function(){return"#"+(new a.Uri(location.href)).getFragment()},e,m,n=function(){var b=c(),f;if(f=a.endsWith(b,d))b=b.slice(0,-d.length),location.hash=b;b!==m&&(m=b,q(b,f));e=setTimeout(n,50)},q=l&&8>l?function(b,c){var e=
a.substitute(f,{hash:a.escapeHTML(b),head:g.isCustomDomain()?"<script>document.domain = '"+k.domain+"';<\/script>":""}),d=r.contentWindow.document;try{c?d.open("text/html","replace"):d.open(),d.write(e),d.close()}catch(h){}}:function(){b.fireHandler(j,"hashchange")},p=function(){e||n()},o=function(){e&&clearTimeout(e);e=0},r;l&&8>l&&(p=function(){if(!r){var e=g.getEmptyIframeSrc();r=g.create("<iframe "+(e?'src="'+e+'"':"")+' style="display: none" height="0" width="0" tabindex="-1" title="empty"/>');
g.prepend(r,k.documentElement);b.add(r,"load",function(){b.remove(r,"load");q(c());b.add(r,"load",f);n()});k.onpropertychange=function(){try{"title"===event.propertyName&&(r.contentWindow.document.title=k.title+" - "+c())}catch(a){}};var f=function(){var e=a.trim(r.contentWindow.document.body.innerText),f=c();e!=f&&(m=location.hash=e);b.fireHandler(j,"hashchange")}}},o=function(){e&&clearTimeout(e);e=0;b.detach(r);g.remove(r);r=0});i.hashchange={setup:function(){if(this===j){m=c();p()}},tearDown:function(){this===
j&&o()}}},{requires:["event/dom/base","dom"]});
KISSY.add("event/dom/ie/change",function(a,b,g){function l(a){a=a.type;return"checkbox"==a||"radio"==a}function i(a){"checked"==a.originalEvent.propertyName&&(this.__changed=1)}function j(a){this.__changed&&(this.__changed=0,b.fire(this,"change",a))}function k(a){a=a.target;d.test(a.nodeName)&&!a.__changeHandler&&(a.__changeHandler=1,b.on(a,"change",{fn:h,last:1}))}function h(a){if(!a.isPropagationStopped()&&!l(this)){var c;(c=this.parentNode)&&b.fire(c,"change",a)}}var d=/^(?:textarea|input|select)$/i;
b._Special.change={setup:function(){if(d.test(this.nodeName))if(l(this))b.on(this,"propertychange",i),b.on(this,"click",j);else return!1;else b.on(this,"beforeactivate",k)},tearDown:function(){if(d.test(this.nodeName))if(l(this))b.remove(this,"propertychange",i),b.remove(this,"click",j);else return!1;else b.remove(this,"beforeactivate",k),a.each(g.query("textarea,input,select",this),function(a){a.__changeHandler&&(a.__changeHandler=0,b.remove(a,"change",{fn:h,last:1}))})}}},{requires:["event/dom/base",
"dom"]});KISSY.add("event/dom/ie",function(){},{requires:["./ie/change","./ie/submit"]});
KISSY.add("event/dom/ie/submit",function(a,b,g){function l(a){var a=a.target,h=j(a);if((a="input"==h||"button"==h?a.form:null)&&!a.__submit__fix)a.__submit__fix=1,b.on(a,"submit",{fn:i,last:1})}function i(a){this.parentNode&&!a.isPropagationStopped()&&!a.synthetic&&b.fire(this.parentNode,"submit",a)}var j=g.nodeName;b._Special.submit={setup:function(){if("form"==j(this))return!1;b.on(this,"click keypress",l)},tearDown:function(){if("form"==j(this))return!1;b.remove(this,"click keypress",l);a.each(g.query("form",
this),function(a){a.__submit__fix&&(a.__submit__fix=0,b.remove(a,"submit",{fn:i,last:1}))})}}},{requires:["event/dom/base","dom"]});
KISSY.add("event/dom/shake",function(a,b,g){function l(a){var b=a.accelerationIncludingGravity,a=b.x,i=b.y,b=b.z,l;d!==g&&(l=e(m(a-d),m(i-f),m(b-c)),l>j&&q(),l>k&&(h=1));d=a;f=i;c=b}var i=b._Special,j=5,k=20,h=0,d,f,c,e=Math.max,m=Math.abs,n=a.Env.host,q=a.buffer(function(){h&&(b.fireHandler(n,"shake",{accelerationIncludingGravity:{x:d,y:f,z:c}}),d=g,h=0)},250);i.shake={setup:function(){this==n&&n.addEventListener("devicemotion",l,!1)},tearDown:function(){this==n&&(q.stop(),d=g,h=0,n.removeEventListener("devicemotion",
l,!1))}}},{requires:["event/dom/base"]});
KISSY.add("event/dom/touch/double-tap",function(a,b,g,l){function i(){}a.extend(i,l,{onTouchStart:function(a){if(!1===i.superclass.onTouchStart.apply(this,arguments))return!1;this.startTime=a.timeStamp;this.singleTapTimer&&(clearTimeout(this.singleTapTimer),this.singleTapTimer=0)},onTouchMove:function(){return!1},onTouchEnd:function(a){var b=this.lastEndTime,h=a.timeStamp,d=a.target,f=a.changedTouches[0],c=h-this.startTime;this.lastEndTime=h;if(b&&(c=h-b,300>c)){this.lastEndTime=0;g.fire(d,"doubleTap",
{touch:f,duration:c/1E3});return}c=h-this.startTime;300<c?g.fire(d,"singleTap",{touch:f,duration:c/1E3}):this.singleTapTimer=setTimeout(function(){g.fire(d,"singleTap",{touch:f,duration:c/1E3})},300)}});b.singleTap=b.doubleTap={handle:new i};return i},{requires:["./handle-map","event/dom/base","./single-touch"]});
KISSY.add("event/dom/touch/gesture",function(a,b){var g=b.Gesture,l,i,j;a.Features.isTouchSupported()&&(l="touchstart",i="touchmove",j="touchend");l&&(g.start=l,g.move=i,g.end=j,g.tap="tap",g.doubleTap="doubleTap");return g},{requires:["event/dom/base"]});KISSY.add("event/dom/touch/handle-map",function(){return{}});
KISSY.add("event/dom/touch/handle",function(a,b,g,l,i){function j(a){this.doc=a;this.eventHandle={};this.init()}var k=a.guid("touch-handle"),h=a.Features,d={};d[i.start]="onTouchStart";d[i.move]="onTouchMove";d[i.end]="onTouchEnd";"mousedown"!==i.start&&(d.touchcancel="onTouchEnd");var f=a.throttle(function(a){this.callEventHandle("onTouchMove",a)},30);j.prototype={init:function(){var a=this.doc,b,f;for(b in d){f=d[b];l.on(a,b,this[f],this)}},normalize:function(a){var b=a.type,d;if(!h.isTouchSupported()){if(b.indexOf("mouse")!=
-1&&a.which!=1)return;d=[a];b=!b.match(/up$/i);a.touches=b?d:[];a.targetTouches=b?d:[];a.changedTouches=d}return a},onTouchMove:function(a){f.call(this,a)},onTouchStart:function(a){var b,d,f=this.eventHandle;for(b in f){d=f[b].handle;d.isActive=1}this.callEventHandle("onTouchStart",a)},onTouchEnd:function(a){this.callEventHandle("onTouchEnd",a)},callEventHandle:function(a,b){var d=this.eventHandle,f,h;if(b=this.normalize(b)){for(f in d){h=d[f].handle;if(!h.processed){h.processed=1;if(h.isActive&&
h[a](b)===false)h.isActive=0}}for(f in d){h=d[f].handle;h.processed=0}}},addEventHandle:function(a){var b=this.eventHandle,d=g[a].handle;b[a]?b[a].count++:b[a]={count:1,handle:d}},removeEventHandle:function(a){var b=this.eventHandle;if(b[a]){b[a].count--;b[a].count||delete b[a]}},destroy:function(){var a=this.doc,b,f;for(b in d){f=d[b];l.detach(a,b,this[f],this)}}};return{addDocumentHandle:function(a,e){var d=b.getWindow(a.ownerDocument||a).document,f=g[e].setup,h=b.data(d,k);h||b.data(d,k,h=new j(d));
f&&f.call(a,e);h.addEventHandle(e)},removeDocumentHandle:function(c,e){var d=b.getWindow(c.ownerDocument||c).document,f=g[e].tearDown,h=b.data(d,k);f&&f.call(c,e);if(h){h.removeEventHandle(e);if(a.isEmptyObject(h.eventHandle)){h.destroy();b.removeData(d,k)}}}}},{requires:"dom,./handle-map,event/dom/base,./gesture,./tap,./swipe,./double-tap,./pinch,./tap-hold,./rotate".split(",")});
KISSY.add("event/dom/touch/multi-touch",function(a,b){function g(){}g.prototype={requiredTouchCount:2,onTouchStart:function(a){var b=this.requiredTouchCount,g=a.touches.length;g===b?this.start():g>b&&this.end(a)},onTouchEnd:function(a){this.end(a)},start:function(){this.isTracking||(this.isTracking=!0,this.isStarted=!1)},fireEnd:a.noop,getCommonTarget:function(a){var g=a.touches,a=g[0].target,g=g[1].target;if(a==g||b.contains(a,g))return a;for(;;){if(b.contains(g,a))return g;g=g.parentNode}},end:function(a){this.isTracking&&
(this.isTracking=!1,this.isStarted&&(this.isStarted=!1,this.fireEnd(a)))}};return g},{requires:["dom"]});
KISSY.add("event/dom/touch/pinch",function(a,b,g,l,i){function j(){}function k(a){(!a.touches||2==a.touches.length)&&a.preventDefault()}a.extend(j,l,{onTouchMove:function(b){if(this.isTracking){var d=b.touches,f,c=d[0],e=d[1];f=c.pageX-e.pageX;c=c.pageY-e.pageY;f=Math.sqrt(f*f+c*c);this.lastTouches=d;this.isStarted?g.fire(this.target,"pinch",a.mix(b,{distance:f,scale:f/this.startDistance})):(this.isStarted=!0,this.startDistance=f,d=this.target=this.getCommonTarget(b),g.fire(d,"pinchStart",a.mix(b,
{distance:f,scale:1})))}},fireEnd:function(b){g.fire(this.target,"pinchEnd",a.mix(b,{touches:this.lastTouches}))}});l=new j;b.pinchStart=b.pinchEnd={handle:l};b.pinch={handle:l,setup:function(){g.on(this,i.move,k)},tearDown:function(){g.detach(this,i.move,k)}};return j},{requires:["./handle-map","event/dom/base","./multi-touch","./gesture"]});
KISSY.add("event/dom/touch/rotate",function(a,b,g,l,i,j){function k(){}function h(a){(!a.touches||2==a.touches.length)&&a.preventDefault()}var d=180/Math.PI;a.extend(k,g,{onTouchMove:function(b){if(this.isTracking){var c=b.touches,e=c[0],h=c[1],g=this.lastAngle,e=Math.atan2(h.pageY-e.pageY,h.pageX-e.pageX)*d;if(g!==j){var h=Math.abs(e-g),i=(e+360)%360,k=(e-360)%360;Math.abs(i-g)<h?e=i:Math.abs(k-g)<h&&(e=k)}this.lastTouches=c;this.lastAngle=e;this.isStarted?l.fire(this.target,"rotate",a.mix(b,{angle:e,
rotation:e-this.startAngle})):(this.isStarted=!0,this.startAngle=e,this.target=this.getCommonTarget(b),l.fire(this.target,"rotateStart",a.mix(b,{angle:e,rotation:0})))}},end:function(){this.lastAngle=j;k.superclass.end.apply(this,arguments)},fireEnd:function(b){l.fire(this.target,"rotateEnd",a.mix(b,{touches:this.lastTouches}))}});g=new k;b.rotateEnd=b.rotateStart={handle:g};b.rotate={handle:g,setup:function(){l.on(this,i.move,h)},tearDown:function(){l.detach(this,i.move,h)}};return k},{requires:["./handle-map",
"./multi-touch","event/dom/base","./gesture"]});KISSY.add("event/dom/touch/single-touch",function(a){function b(){}b.prototype={requiredTouchCount:1,onTouchStart:function(a){if(a.touches.length!=this.requiredTouchCount)return!1;this.lastTouches=a.touches},onTouchMove:a.noop,onTouchEnd:a.noop};return b});
KISSY.add("event/dom/touch/swipe",function(a,b,g,l){function i(a,b,e){var i=b.changedTouches[0],j=i.pageX-a.startX,l=i.pageY-a.startY,p=Math.abs(j),o=Math.abs(l);if(e)a.isVertical&&a.isHorizontal&&(o>p?a.isHorizontal=0:a.isVertical=0);else if(a.isVertical&&o<d&&(a.isVertical=0),a.isHorizontal&&p<d)a.isHorizontal=0;if(a.isHorizontal)j=0>j?"left":"right";else if(a.isVertical)j=0>l?"up":"down",p=o;else return!1;g.fire(b.target,e?h:k,{originalEvent:b.originalEvent,touch:i,direction:j,distance:p,duration:(b.timeStamp-
a.startTime)/1E3})}function j(){}var k="swipe",h="swiping",d=50;a.extend(j,l,{onTouchStart:function(a){if(!1===j.superclass.onTouchStart.apply(this,arguments))return!1;var b=a.touches[0];this.startTime=a.timeStamp;this.isVertical=this.isHorizontal=1;this.startX=b.pageX;this.startY=b.pageY;-1!=a.type.indexOf("mouse")&&a.preventDefault()},onTouchMove:function(a){var b=a.changedTouches[0],e=b.pageY-this.startY,b=Math.abs(b.pageX-this.startX),e=Math.abs(e);if(1E3<a.timeStamp-this.startTime)return!1;this.isVertical&&
35<b&&(this.isVertical=0);this.isHorizontal&&35<e&&(this.isHorizontal=0);return i(this,a,1)},onTouchEnd:function(a){return!1===this.onTouchMove(a)?!1:i(this,a,0)}});b[k]=b[h]={handle:new j};return j},{requires:["./handle-map","event/dom/base","./single-touch"]});
KISSY.add("event/dom/touch/tap-hold",function(a,b,g,l,i){function j(){}function k(a){(!a.touches||1==a.touches.length)&&a.preventDefault()}a.extend(j,g,{onTouchStart:function(b){if(!1===j.superclass.onTouchStart.call(this,b))return!1;this.timer=setTimeout(function(){l.fire(b.target,"tapHold",{touch:b.touches[0],duration:(a.now()-b.timeStamp)/1E3})},1E3)},onTouchMove:function(){clearTimeout(this.timer);return!1},onTouchEnd:function(){clearTimeout(this.timer)}});b.tapHold={setup:function(){l.on(this,
i.start,k)},tearDown:function(){l.detach(this,i.start,k)},handle:new j};return j},{requires:["./handle-map","./single-touch","event/dom/base","./gesture"]});KISSY.add("event/dom/touch/tap",function(a,b,g,l){function i(){}a.extend(i,l,{onTouchMove:function(){return!1},onTouchEnd:function(a){g.fire(a.target,"tap",{touch:a.changedTouches[0]})}});b.tap={handle:new i};return i},{requires:["./handle-map","event/dom/base","./single-touch"]});
KISSY.add("event/dom/touch",function(a,b,g,l){var a=b._Special,b={setup:function(a){l.addDocumentHandle(this,a)},tearDown:function(a){l.removeDocumentHandle(this,a)}},i;for(i in g)a[i]=b},{requires:["event/dom/base","./touch/handle-map","./touch/handle"]});
KISSY.add("json/json2",function(){function a(a){return 10>a?"0"+a:a}function b(a){j.lastIndex=0;return j.test(a)?'"'+a.replace(j,function(a){var b=d[a];return"string"===typeof b?b:"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+a+'"'}function g(a,e){var d,i,j,l,o=k,r,s=e[a];s&&"object"===typeof s&&"function"===typeof s.toJSON&&(s=s.toJSON(a));"function"===typeof f&&(s=f.call(e,a,s));switch(typeof s){case "string":return b(s);case "number":return isFinite(s)?""+s:"null";case "boolean":case "null":return""+
s;case "object":if(!s)return"null";k+=h;r=[];if("[object Array]"===Object.prototype.toString.apply(s)){l=s.length;for(d=0;d<l;d+=1)r[d]=g(d,s)||"null";j=0===r.length?"[]":k?"[\n"+k+r.join(",\n"+k)+"\n"+o+"]":"["+r.join(",")+"]";k=o;return j}if(f&&"object"===typeof f){l=f.length;for(d=0;d<l;d+=1)i=f[d],"string"===typeof i&&(j=g(i,s))&&r.push(b(i)+(k?": ":":")+j)}else for(i in s)Object.hasOwnProperty.call(s,i)&&(j=g(i,s))&&r.push(b(i)+(k?": ":":")+j);j=0===r.length?"{}":k?"{\n"+k+r.join(",\n"+k)+"\n"+
o+"}":"{"+r.join(",")+"}";k=o;return j}}var l={};"function"!==typeof Date.prototype.toJSON&&(Date.prototype.toJSON=function(){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+a(this.getUTCMonth()+1)+"-"+a(this.getUTCDate())+"T"+a(this.getUTCHours())+":"+a(this.getUTCMinutes())+":"+a(this.getUTCSeconds())+"Z":null},String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(){return this.valueOf()});var i=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
j=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,k,h,d={"":"\\b","\t":"\\t","\n":"\\n","":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},f;l.stringify=function(a,b,d){var i;h=k="";if(typeof d==="number")for(i=0;i<d;i=i+1)h=h+" ";else typeof d==="string"&&(h=d);if((f=b)&&typeof b!=="function"&&(typeof b!=="object"||typeof b.length!=="number"))throw Error("JSON.stringify");return g("",{"":a})};l.parse=function(a,b){function d(a,
c){var f,h,g=a[c];if(g&&typeof g==="object")for(f in g)if(Object.hasOwnProperty.call(g,f)){h=d(g,f);h!==void 0?g[f]=h:delete g[f]}return b.call(a,c,g)}var f,a=""+a;i.lastIndex=0;i.test(a)&&(a=a.replace(i,function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)}));if(/^[\],:{}\s]*$/.test(a.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,""))){f=eval("("+a+")");return typeof b===
"function"?d({"":f},""):f}throw new SyntaxError("JSON.parse");};return l});KISSY.add("json",function(a,b){b||(b=JSON);return a.JSON={parse:function(a){return null==a||""===a?null:b.parse(a)},stringify:b.stringify}},{requires:[KISSY.Features.isNativeJSONSupported()?"":"json/json2"]});
KISSY.add("ajax",function(a,b,g){function l(b,k,h,d,f){a.isFunction(k)&&(d=h,h=k,k=i);return g({type:f||"get",url:b,data:k,success:h,dataType:d})}var i=void 0;a.mix(g,{serialize:b.serialize,get:l,post:function(b,g,h,d){a.isFunction(g)&&(d=h,h=g,g=i);return l(b,g,h,d,"post")},jsonp:function(b,g,h){a.isFunction(g)&&(h=g,g=i);return l(b,g,h,"jsonp")},getScript:a.getScript,getJSON:function(b,g,h){a.isFunction(g)&&(h=g,g=i);return l(b,g,h,"json")},upload:function(b,k,h,d,f){a.isFunction(h)&&(f=d,d=h,h=
i);return g({url:b,type:"post",dataType:f,form:k,data:h,success:d})}});a.mix(a,{Ajax:g,IO:g,ajax:g,io:g,jsonp:g.jsonp});return g},{requires:"ajax/form-serializer,ajax/base,ajax/xhr-transport,ajax/script-transport,ajax/jsonp,ajax/form,ajax/iframe-transport,ajax/methods".split(",")});
KISSY.add("ajax/base",function(a,b,g,l){function i(b){var c=b.context;delete b.context;b=a.mix(a.clone(q),b,{deep:!0});b.context=c||b;var f,h=b.type,g=b.dataType,c=b.uri=m.resolve(b.url);b.uri.setQuery("");"crossDomain"in b||(b.crossDomain=!b.uri.isSameOriginAs(m));h=b.type=h.toUpperCase();b.hasContent=!e.test(h);if(b.processData&&(f=b.data)&&"string"!=typeof f)b.data=a.param(f,l,l,b.serializeArray);g=b.dataType=a.trim(g||"*").split(d);!("cache"in b)&&a.inArray(g[0],["script","jsonp"])&&(b.cache=
!1);b.hasContent||(b.data&&c.query.add(a.unparam(b.data)),!1===b.cache&&c.query.set("_ksTS",a.now()+"_"+a.guid()));return b}function j(a,b){k.fire(a,{ajaxConfig:b.config,io:b})}function k(b){function e(a){return function(c){if(g=d.timeoutTimer)clearTimeout(g),d.timeoutTimer=0;var e=b[a];e&&e.apply(q,c);j(a,d)}}var d=this;if(!(d instanceof k))return new k(b);c.call(d);b=i(b);a.mix(d,{responseData:null,config:b||{},timeoutTimer:null,responseText:null,responseXML:null,responseHeadersString:"",responseHeaders:null,
requestHeaders:{},readyState:0,state:0,statusText:null,status:0,transport:null,_defer:new a.Defer(this)});var f;j("start",d);f=new (n[b.dataType[0]]||n["*"])(d);d.transport=f;b.contentType&&d.setRequestHeader("Content-Type",b.contentType);var h=b.dataType[0],g,l,m=b.timeout,q=b.context,B=b.headers,C=b.accepts;d.setRequestHeader("Accept",h&&C[h]?C[h]+("*"===h?"":", */*; q=0.01"):C["*"]);for(l in B)d.setRequestHeader(l,B[l]);if(b.beforeSend&&!1===b.beforeSend.call(q,d,b))return d;d.then(e("success"),
e("error"));d.fin(e("complete"));d.readyState=1;j("send",d);b.async&&0<m&&(d.timeoutTimer=setTimeout(function(){d.abort("timeout")},1E3*m));try{d.state=1,f.send()}catch(D){2>d.state&&d._ioReady(-1,D.message)}return d}var h=/^(?:about|app|app\-storage|.+\-extension|file|widget)$/,d=/\s+/,f=function(a){return a},c=a.Promise,e=/^(?:GET|HEAD)$/,m=new a.Uri((a.Env.host.location||{}).href),h=m&&h.test(m.getScheme()),n={},q={type:"GET",contentType:"application/x-www-form-urlencoded; charset=UTF-8",async:!0,
serializeArray:!0,processData:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":"*/*"},converters:{text:{json:b.parse,html:f,text:f,xml:a.parseXML}},contents:{xml:/xml/,html:/html/,json:/json/}};q.converters.html=q.converters.text;a.mix(k,g.Target);a.mix(k,{isLocal:h,setupConfig:function(b){a.mix(q,b,{deep:!0})},setupTransport:function(a,b){n[a]=b},getTransport:function(a){return n[a]},getConfig:function(){return q}});return k},
{requires:["json","event"]});
KISSY.add("ajax/form-serializer",function(a,b){function g(a){return a.replace(i,"\r\n")}var l=/^(?:select|textarea)/i,i=/\r?\n/g,j,k=/^(?:color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i;return j={serialize:function(b,d){return a.param(j.getFormData(b),void 0,void 0,d||!1)},getFormData:function(h){var d=[],f={};a.each(b.query(h),function(b){b=b.elements?a.makeArray(b.elements):[b];d.push.apply(d,b)});d=a.filter(d,function(a){return a.name&&!a.disabled&&
(a.checked||l.test(a.nodeName)||k.test(a.type))});a.each(d,function(c){var e=b.val(c),d;null!==e&&(e=a.isArray(e)?a.map(e,g):g(e),(d=f[c.name])?(d&&!a.isArray(d)&&(d=f[c.name]=[d]),d.push.apply(d,a.makeArray(e))):f[c.name]=e)});return f}}},{requires:["dom"]});
KISSY.add("ajax/form",function(a,b,g,l){b.on("start",function(b){var j,k,h,b=b.io.config;if(h=b.form)j=g.get(h),k=j.encoding||j.enctype,h=b.data,"multipart/form-data"!=k.toLowerCase()?(j=l.getFormData(j),b.hasContent?(j=a.param(j,void 0,void 0,b.serializeArray),b.data=h?b.data+("&"+j):j):b.uri.query.add(j)):(h=b.dataType,b=h[0],"*"==b&&(b="text"),h.length=2,h[0]="iframe",h[1]=b)});return b},{requires:["./base","dom","./form-serializer"]});
KISSY.add("ajax/iframe-transport",function(a,b,g,l){function i(d){var f=a.guid("io-iframe"),c=b.getEmptyIframeSrc(),d=d.iframe=b.create("<iframe "+(c?' src="'+c+'" ':"")+' id="'+f+'" name="'+f+'" style="position:absolute;left:-9999px;top:-9999px;"/>');b.prepend(d,h.body||h.documentElement);return d}function j(d,f,c){var e=[],g,i,j,k;a.each(d,function(d,l){g=a.isArray(d);i=a.makeArray(d);for(j=0;j<i.length;j++)k=h.createElement("input"),k.type="hidden",k.name=l+(g&&c?"[]":""),k.value=i[j],b.append(k,
f),e.push(k)});return e}function k(a){this.io=a}var h=a.Env.host.document;l.setupConfig({converters:{iframe:l.getConfig().converters.text,text:{iframe:function(a){return a}},xml:{iframe:function(a){return a}}}});a.augment(k,{send:function(){function d(){g.on(k,"load error",f._callback,f);o.submit()}var f=this,c=f.io,e=c.config,h,k,l,p=e.data,o=b.get(e.form);f.attrs={target:b.attr(o,"target")||"",action:b.attr(o,"action")||"",method:b.attr(o,"method")};f.form=o;k=i(c);b.attr(o,{target:k.id,action:c._getUrlForSend(),
method:"post"});p&&(l=a.unparam(p));l&&(h=j(l,o,e.serializeArray));f.fields=h;6==a.UA.ie?setTimeout(d,0):d()},_callback:function(d){var f=this,c=f.form,e=f.io,d=d.type,h,i=e.iframe;if(i)if("abort"==d&&6==a.UA.ie?setTimeout(function(){b.attr(c,f.attrs)},0):b.attr(c,f.attrs),b.remove(this.fields),g.detach(i),setTimeout(function(){b.remove(i)},30),e.iframe=null,"load"==d)try{if((h=i.contentWindow.document)&&h.body)e.responseText=a.trim(b.text(h.body)),a.startsWith(e.responseText,"<?xml")&&(e.responseText=
void 0);e.responseXML=h&&h.XMLDocument?h.XMLDocument:h;h?e._ioReady(200,"success"):e._ioReady(500,"parser error")}catch(j){e._ioReady(500,"parser error")}else"error"==d&&e._ioReady(500,"error")},abort:function(){this._callback({type:"abort"})}});l.setupTransport("iframe",k);return l},{requires:["dom","event","./base"]});
KISSY.add("ajax/jsonp",function(a,b){var g=a.Env.host;b.setupConfig({jsonp:"callback",jsonpCallback:function(){return a.guid("jsonp")}});b.on("start",function(b){var i=b.io,j=i.config,b=j.dataType;if("jsonp"==b[0]){var k,h=j.jsonpCallback,d=a.isFunction(h)?h():h,f=g[d];j.uri.query.set(j.jsonp,d);g[d]=function(b){1<arguments.length&&(b=a.makeArray(arguments));k=[b]};i.fin(function(){g[d]=f;if(void 0===f)try{delete g[d]}catch(a){}else k&&f(k[0])});i=i.converters=i.converters||{};i.script=i.script||
{};i.script.json=function(){return k[0]};b.length=2;b[0]="script";b[1]="json"}});return b},{requires:["./base"]});
KISSY.add("ajax/methods",function(a,b,g){function l(b){var i=b.responseText,h=b.responseXML,d=b.config,f=d.converters,c=b.converters||{},e,l,n=d.contents,q=d.dataType;if(i||h){for(d=b.mimeType||b.getResponseHeader("Content-Type");"*"==q[0];)q.shift();if(!q.length)for(e in n)if(n[e].test(d)){q[0]!=e&&q.unshift(e);break}q[0]=q[0]||"text";if("text"==q[0]&&i!==g)l=i;else if("xml"==q[0]&&h!==g)l=h;else{var p={text:i,xml:h};a.each(["text","xml"],function(a){var b=q[0];return(c[a]&&c[a][b]||f[a]&&f[a][b])&&
p[a]?(q.unshift(a),l="text"==a?i:h,!1):g})}}n=q[0];for(d=1;d<q.length;d++){e=q[d];var o=c[n]&&c[n][e]||f[n]&&f[n][e];if(!o)throw"no covert for "+n+" => "+e;l=o(l);n=e}b.responseData=l}var i=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg;a.extend(b,a.Promise,{setRequestHeader:function(a,b){this.requestHeaders[a]=b;return this},getAllResponseHeaders:function(){return 2===this.state?this.responseHeadersString:null},getResponseHeader:function(a){var b,h;if(2===this.state){if(!(h=this.responseHeaders))for(h=this.responseHeaders=
{};b=i.exec(this.responseHeadersString);)h[b[1]]=b[2];b=h[a]}return b===g?null:b},overrideMimeType:function(a){this.state||(this.mimeType=a);return this},abort:function(a){a=a||"abort";this.transport&&this.transport.abort(a);this._ioReady(0,a);return this},getNativeXhr:function(){var a;return(a=this.transport)?a.nativeXhr:null},_ioReady:function(a,b){if(2!=this.state){this.state=2;this.readyState=4;var h;if(200<=a&&300>a||304==a)if(304==a)b="not modified",h=!0;else try{l(this),b="success",h=!0}catch(d){b=
"parser error"}else 0>a&&(a=0);this.status=a;this.statusText=b;this._defer[h?"resolve":"reject"]([this.responseData,b,this])}},_getUrlForSend:function(){var b=this.config,g=b.uri,h=a.Uri.getComponents(b.url).query||"";return g.toString(b.serializeArray)+(h?(g.query.has()?"&":"?")+h:h)}})},{requires:["./base"]});
KISSY.add("ajax/script-transport",function(a,b,g,l){function i(a){if(!a.config.crossDomain)return new (b.getTransport("*"))(a);this.io=a;return this}var j=a.Env.host,k=j.document;b.setupConfig({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{text:{script:function(b){a.globalEval(b);return b}}}});a.augment(i,{send:function(){var a=this,b,f=a.io,c=f.config,e=k.head||k.getElementsByTagName("head")[0]||
k.documentElement;a.head=e;b=k.createElement("script");a.script=b;b.async=!0;c.scriptCharset&&(b.charset=c.scriptCharset);b.src=f._getUrlForSend();b.onerror=b.onload=b.onreadystatechange=function(b){b=b||j.event;a._callback((b.type||"error").toLowerCase())};e.insertBefore(b,e.firstChild)},_callback:function(a,b){var f=this.script,c=this.io,e=this.head;if(f&&(b||!f.readyState||/loaded|complete/.test(f.readyState)||"error"==a))f.onerror=f.onload=f.onreadystatechange=null,e&&f.parentNode&&e.removeChild(f),
this.head=this.script=l,!b&&"error"!=a?c._ioReady(200,"success"):"error"==a&&c._ioReady(500,"script error")},abort:function(){this._callback(0,1)}});b.setupTransport("script",i);return b},{requires:["./base","./xhr-transport"]});
KISSY.add("ajax/sub-domain-transport",function(a,b,g,l){function i(a){var b=a.config;this.io=a;b.crossDomain=!1}function j(){var a=this.io.config.uri.getHostname(),a=h[a];a.ready=1;g.detach(a.iframe,"load",j,this);this.send()}var k=a.Env.host.document,h={};a.augment(i,b.proto,{send:function(){var d=this.io.config,f=d.uri,c=f.getHostname(),e;e=h[c];var i="/sub_domain_proxy.html";d.xdr&&d.xdr.subDomain&&d.xdr.subDomain.proxy&&(i=d.xdr.subDomain.proxy);e&&e.ready?(this.nativeXhr=b.nativeXhr(0,e.iframe.contentWindow))&&
this.sendInternal():(e?d=e.iframe:(e=h[c]={},d=e.iframe=k.createElement("iframe"),l.css(d,{position:"absolute",left:"-9999px",top:"-9999px"}),l.prepend(d,k.body||k.documentElement),e=new a.Uri,e.setScheme(f.getScheme()),e.setPort(f.getPort()),e.setHostname(c),e.setPath(i),d.src=e.toString()),g.on(d,"load",j,this))}});return i},{requires:["./xhr-transport-base","event","dom"]});
KISSY.add("ajax/xdr-flash-transport",function(a,b,g){function l(a,b,h){f||(f=!0,a='<object id="'+k+'" type="application/x-shockwave-flash" data="'+a+'" width="0" height="0"><param name="movie" value="'+a+'" /><param name="FlashVars" value="yid='+b+"&uid="+h+'&host=KISSY.IO" /><param name="allowScriptAccess" value="always" /></object>',b=d.createElement("div"),g.prepend(b,d.body||d.documentElement),b.innerHTML=a)}function i(a){this.io=a}var j={},k="io_swf",h,d=a.Env.host.document,f=!1;a.augment(i,
{send:function(){var b=this,e=b.io,d=e.config;l((d.xdr||{}).src||a.Config.base+"ajax/io.swf",1,1);h?(b._uid=a.guid(),j[b._uid]=b,h.send(e._getUrlForSend(),{id:b._uid,uid:b._uid,method:d.type,data:d.hasContent&&d.data||{}})):setTimeout(function(){b.send()},200)},abort:function(){h.abort(this._uid)},_xdrResponse:function(a,b){var d,f=b.id,h,g=b.c,i=this.io;if(g&&(h=g.responseText))i.responseText=decodeURI(h);switch(a){case "success":d={status:200,statusText:"success"};delete j[f];break;case "abort":delete j[f];
break;case "timeout":case "transport error":case "failure":delete j[f],d={status:"status"in g?g.status:500,statusText:g.statusText||a}}d&&i._ioReady(d.status,d.statusText)}});b.applyTo=function(c,e,d){var c=e.split(".").slice(1),f=b;a.each(c,function(a){f=f[a]});f.apply(null,d)};b.xdrReady=function(){h=d.getElementById(k)};b.xdrResponse=function(a,b){var d=j[b.uid];d&&d._xdrResponse(a,b)};return i},{requires:["./base","dom"]});
KISSY.add("ajax/xhr-transport-base",function(a,b){function g(a,b){try{return new (b||i).XMLHttpRequest}catch(d){}}function l(a){var b;a.ifModified&&(b=a.uri,!1===a.cache&&(b=b.clone(),b.query.remove("_ksTS")),b=b.toString());return b}var i=a.Env.host,j=7<a.UA.ie&&i.XDomainRequest,k={proto:{}},h={},d={};b.__lastModifiedCached=h;b.__eTagCached=d;k.nativeXhr=i.ActiveXObject?function(a,c){var d;if(!k.supportCORS&&a&&j)d=new j;else if(!(d=!b.isLocal&&g(a,c)))a:{try{d=new (c||i).ActiveXObject("Microsoft.XMLHTTP");
break a}catch(h){}d=void 0}return d}:g;k._XDomainRequest=j;k.supportCORS="withCredentials"in k.nativeXhr();a.mix(k.proto,{sendInternal:function(){var a=this,b=a.io,e=b.config,g=a.nativeXhr,i=e.type,k=e.async,p,o=b.mimeType,r=b.requestHeaders||{},b=b._getUrlForSend(),s=l(e),u,v;if(s){if(u=h[s])r["If-Modified-Since"]=u;if(u=d[s])r["If-None-Match"]=u}(p=e.username)?g.open(i,b,k,p,e.password):g.open(i,b,k);if(i=e.xhrFields)for(v in i)g[v]=i[v];o&&g.overrideMimeType&&g.overrideMimeType(o);r["X-Requested-With"]||
(r["X-Requested-With"]="XMLHttpRequest");if("undefined"!==typeof g.setRequestHeader)for(v in r)g.setRequestHeader(v,r[v]);g.send(e.hasContent&&e.data||null);!k||4==g.readyState?a._callback():j&&g instanceof j?(g.onload=function(){g.readyState=4;g.status=200;a._callback()},g.onerror=function(){g.readyState=4;g.status=500;a._callback()}):g.onreadystatechange=function(){a._callback()}},abort:function(){this._callback(0,1)},_callback:function(f,c){var e=this.nativeXhr,g=this.io,i,k,p,o,r,s=g.config;try{if(c||
4==e.readyState)if(j&&e instanceof j?(e.onerror=a.noop,e.onload=a.noop):e.onreadystatechange=a.noop,c)4!==e.readyState&&e.abort();else{i=l(s);var u=e.status;j&&e instanceof j||(g.responseHeadersString=e.getAllResponseHeaders());i&&(k=e.getResponseHeader("Last-Modified"),p=e.getResponseHeader("ETag"),k&&(h[i]=k),p&&(d[p]=p));if((r=e.responseXML)&&r.documentElement)g.responseXML=r;g.responseText=e.responseText;try{o=e.statusText}catch(v){o=""}!u&&b.isLocal&&!s.crossDomain?u=g.responseText?200:404:1223===
u&&(u=204);g._ioReady(u,o)}}catch(w){e.onreadystatechange=a.noop,c||g._ioReady(-1,w)}}});return k},{requires:["./base"]});
KISSY.add("ajax/xhr-transport",function(a,b,g,l,i){function j(b){var f=b.config,c=f.crossDomain,e=f.xdr||{},j=e.subDomain=e.subDomain||{};this.io=b;if(c){f=f.uri.getHostname();if(k.domain&&a.endsWith(f,k.domain)&&!1!==j.proxy)return new l(b);if(!g.supportCORS&&("flash"===""+e.use||!h))return new i(b)}this.nativeXhr=g.nativeXhr(c);return this}var k=a.Env.host.document,h=g._XDomainRequest;a.augment(j,g.proto,{send:function(){this.sendInternal()}});b.setupTransport("*",j);return b},{requires:["./base",
"./xhr-transport-base","./sub-domain-transport","./xdr-flash-transport"]});
KISSY.add("cookie",function(a){function b(a){return"string"==typeof a&&""!==a}var g=a.Env.host.document,l=encodeURIComponent,i=a.urlDecode;return a.Cookie={get:function(a){var k,h;if(b(a)&&(h=(""+g.cookie).match(RegExp("(?:^| )"+a+"(?:(?:=([^;]*))|;|$)"))))k=h[1]?i(h[1]):"";return k},set:function(a,i,h,d,f,c){var i=""+l(i),e=h;"number"===typeof e&&(e=new Date,e.setTime(e.getTime()+864E5*h));e instanceof Date&&(i+="; expires="+e.toUTCString());b(d)&&(i+="; domain="+d);b(f)&&(i+="; path="+f);c&&(i+=
"; secure");g.cookie=a+"="+i},remove:function(a,b,g,d){this.set(a,"",-1,b,g,d)}}});
KISSY.add("base/attribute",function(a,b){function g(a,b){return"string"==typeof b?a[b]:b}function l(b,c,d,e,f,g,h){h=h||d;return b.fire(c+a.ucfirst(d)+"Change",{attrName:h,subAttrName:g,prevVal:e,newVal:f})}function i(a,b,c){var d=a[b]||{};c&&(a[b]=d);return d}function j(a){return i(a,"__attrs",!0)}function k(a){return i(a,"__attrVals",!0)}function h(a,c){for(var d=0,e=c.length;a!=b&&d<e;d++)a=a[c[d]];return a}function d(a,b){var c;!a.hasAttr(b)&&-1!==b.indexOf(".")&&(c=b.split("."),b=c.shift());
return{path:c,name:b}}function f(c,d,e){var f=e;if(d){var c=f=c===b?{}:a.clone(c),g=d.length-1;if(0<=g){for(var h=0;h<g;h++)c=c[d[h]];c!=b&&(c[d[h]]=e)}}return f}function c(a,c,e,g,i){var g=g||{},j,m,n;n=d(a,c);var z=c,c=n.name;j=n.path;n=a.get(c);j&&(m=h(n,j));if(!j&&n===e||j&&m===e)return b;e=f(n,j,e);if(!g.silent&&!1===l(a,"before",c,n,e,z))return!1;e=a.setInternal(c,e,g);if(!1===e)return e;g.silent||(e=k(a)[c],l(a,"after",c,n,e,z),i?i.push({prevVal:n,newVal:e,attrName:c,subAttrName:z}):l(a,"",
"*",[n],[e],[z],[c]));return a}function e(){}function m(a,c){var d=j(a),e=i(d,c),f=e.valueFn;if(f&&(f=g(a,f)))f=f.call(a),f!==b&&(e.value=f),delete e.valueFn,d[c]=e;return e.value}function n(a,c,e,h){var k,l;k=d(a,c);c=k.name;if(k=k.path)l=a.get(c),e=f(l,k,e);if((k=i(j(a),c,!0).validator)&&(k=g(a,k)))if(a=k.call(a,e,c,h),a!==b&&!0!==a)return a;return b}e.INVALID={};var q=e.INVALID;e.prototype={getAttrs:function(){return j(this)},getAttrVals:function(){var a={},b,c=j(this);for(b in c)a[b]=this.get(b);
return a},addAttr:function(b,c,e){var d=j(this),c=a.clone(c);d[b]?a.mix(d[b],c,e):d[b]=c;return this},addAttrs:function(b,c){var d=this;a.each(b,function(a,b){d.addAttr(b,a)});c&&d.set(c);return d},hasAttr:function(a){return j(this).hasOwnProperty(a)},removeAttr:function(a){this.hasAttr(a)&&(delete j(this)[a],delete k(this)[a]);return this},set:function(d,e,f){if(a.isPlainObject(d)){var f=e,e=Object(d),g=[],h,i=[];for(d in e)(h=n(this,d,e[d],e))!==b&&i.push(h);if(i.length)return f&&f.error&&f.error(i),
!1;for(d in e)c(this,d,e[d],f,g);var j=[],k=[],m=[],q=[];a.each(g,function(a){k.push(a.prevVal);m.push(a.newVal);j.push(a.attrName);q.push(a.subAttrName)});j.length&&l(this,"","*",k,m,q,j);return this}return c(this,d,e,f)},setInternal:function(a,c,d){var e,f,h=i(j(this),a,!0).setter;f=n(this,a,c);if(f!==b)return d.error&&d.error(f),!1;if(h&&(h=g(this,h)))e=h.call(this,c,a);if(e===q)return!1;e!==b&&(c=e);k(this)[a]=c},get:function(a){var c,d=this.hasAttr(a),e=k(this),f;!d&&-1!==a.indexOf(".")&&(c=
a.split("."),a=c.shift());d=i(j(this),a).getter;f=a in e?e[a]:m(this,a);if(d&&(d=g(this,d)))f=d.call(this,f,a);!(a in e)&&f!==b&&(e[a]=f);c&&(f=h(f,c));return f},reset:function(a,b){if("string"==typeof a)return this.hasAttr(a)?this.set(a,m(this,a),b):this;var b=a,c=j(this),d={};for(a in c)d[a]=m(this,a);this.set(d,b);return this}};return e});
KISSY.add("base",function(a,b,g){function l(a){var b=this.constructor;for(this.userConfig=a;b;){var g=b.ATTRS;if(g){var h=void 0;for(h in g)this.addAttr(h,g[h],!1)}b=b.superclass?b.superclass.constructor:null}if(a)for(var d in a)this.setInternal(d,a[d])}a.augment(l,g.Target,b);l.Attribute=b;return a.Base=l},{requires:["base/attribute","event/custom"]});KISSY.add("anim",function(a,b,g){b.Easing=g;a.mix(a,{Anim:b,Easing:b.Easing});return b},{requires:["anim/base","anim/easing","anim/color","anim/background-position"]});
KISSY.add("anim/background-position",function(a,b,g,l){function i(a){a=a.replace(/left|top/g,"0px").replace(/right|bottom/g,"100%").replace(/([0-9\.]+)(\s|\)|$)/g,"$1px$2");a=a.match(/(-?[0-9\.]+)(px|%|em|pt)\s(-?[0-9\.]+)(px|%|em|pt)/);return[parseFloat(a[1]),a[2],parseFloat(a[3]),a[4]]}function j(){j.superclass.constructor.apply(this,arguments)}a.extend(j,l,{load:function(){j.superclass.load.apply(this,arguments);this.unit=["px","px"];if(this.from){var a=i(this.from);this.from=[a[0],a[2]]}else this.from=
[0,0];this.to?(a=i(this.to),this.to=[a[0],a[2]],this.unit=[a[1],a[3]]):this.to=[0,0]},interpolate:function(a,b,d){var f=this.unit,c=j.superclass.interpolate;return c(a[0],b[0],d)+f[0]+" "+c(a[1],b[1],d)+f[1]},cur:function(){return b.css(this.anim.config.el,"backgroundPosition")},update:function(){var a=this.prop,g=this.anim.config.el,d=this.interpolate(this.from,this.to,this.pos);b.css(g,a,d)}});return l.Factories.backgroundPosition=j},{requires:["dom","./base","./fx"]});
KISSY.add("anim/base",function(a,b,g,l,i,j,k){function h(c,e,f,g,i){if(c.el)return f=c.el,e=c.props,delete c.el,delete c.props,new h(f,e,c);if(c=b.get(c)){if(!(this instanceof h))return new h(c,e,f,g,i);e="string"==typeof e?a.unparam(""+e,";",":"):a.clone(e);a.each(e,function(b,c){var d=a.trim(p(c));d?c!=d&&(e[d]=e[c],delete e[c]):delete e[c]});f=a.isPlainObject(f)?a.clone(f):{duration:parseFloat(f)||void 0,easing:g,complete:i};f=a.merge(u,f);f.el=c;f.props=e;this.config=f;this._duration=1E3*f.duration;
this.domEl=c;this._backupProps={};this._fxs={};this.on("complete",d)}}function d(c){var e,d,f=this.config;a.isEmptyObject(e=this._backupProps)||b.css(f.el,e);(d=f.complete)&&d.call(this,c)}function f(){var e=this.config,d=this._backupProps,f=e.el,g,h,k,m=e.specialEasing||{},n=this._fxs,p=e.props;c(this);if(!1===this.fire("beforeStart"))this.stop(0);else{if(f.nodeType==o.ELEMENT_NODE)for(k in h="none"===b.css(f,"display"),p)if(g=p[k],"hide"==g&&h||"show"==g&&!h){this.stop(1);return}if(f.nodeType==
o.ELEMENT_NODE&&(p.width||p.height))g=f.style,a.mix(d,{overflow:g.overflow,"overflow-x":g.overflowX,"overflow-y":g.overflowY}),g.overflow="hidden","inline"===b.css(f,"display")&&"none"===b.css(f,"float")&&(q.ie?g.zoom=1:g.display="inline-block");a.each(p,function(b,c){var d;a.isArray(b)?(d=m[c]=b[1],p[c]=b[0]):d=m[c]=m[c]||e.easing;"string"==typeof d&&(d=m[c]=l[d]);m[c]=d||l.easeNone});a.each(s,function(c,d){var e,g;if(g=p[d])e={},a.each(c,function(a){e[a]=b.css(f,a);m[a]=m[d]}),b.css(f,d,g),a.each(e,
function(a,c){p[c]=b.css(f,c);b.css(f,c,a)}),delete p[d]});for(k in p){g=a.trim(p[k]);var t,u,w={prop:k,anim:this,easing:m[k]},E=j.getFx(w);a.inArray(g,r)?(d[k]=b.style(f,k),"toggle"==g&&(g=h?"show":"hide"),"hide"==g?(t=0,u=E.cur(),d.display="none"):(u=0,t=E.cur(),b.css(f,k,u),b.show(f)),g=t):(t=g,u=E.cur());g+="";var F="",G=g.match(v);if(G){t=parseFloat(G[2]);if((F=G[3])&&"px"!==F)b.css(f,k,g),u*=t/E.cur(),b.css(f,k,u+F);G[1]&&(t=("-="===G[1]?-1:1)*t+u)}w.from=u;w.to=t;w.unit=F;E.load(w);n[k]=E}this._startTime=
a.now();i.start(this)}}function c(c){var d=c.config.el,e=b.data(d,w);e||b.data(d,w,e={});e[a.stamp(c)]=c}function e(c){var d=c.config.el,e=b.data(d,w);e&&(delete e[a.stamp(c)],a.isEmptyObject(e)&&b.removeData(d,w))}function m(c,d,e){c=b.data(c,"resume"==e?t:w);c=a.merge(c);a.each(c,function(a){if(void 0===d||a.config.queue==d)a[e]()})}function n(c,d,e,f){e&&!1!==f&&k.removeQueue(c,f);c=b.data(c,w);c=a.merge(c);a.each(c,function(a){a.config.queue==f&&a.stop(d)})}var q=a.UA,p=b._camelCase,o=b.NodeType,
r=["hide","show","toggle"],s={background:["backgroundPosition"],border:["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth"],borderBottom:["borderBottomWidth"],borderLeft:["borderLeftWidth"],borderTop:["borderTopWidth"],borderRight:["borderRightWidth"],font:["fontSize","fontWeight"],margin:["marginBottom","marginLeft","marginRight","marginTop"],padding:["paddingBottom","paddingLeft","paddingRight","paddingTop"]},u={duration:1,easing:"easeNone"},v=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i;
h.SHORT_HANDS=s;h.prototype={constructor:h,isRunning:function(){var c=b.data(this.config.el,w);return c?!!c[a.stamp(this)]:0},isPaused:function(){var c=b.data(this.config.el,t);return c?!!c[a.stamp(this)]:0},pause:function(){if(this.isRunning()){this._pauseDiff=a.now()-this._startTime;i.stop(this);e(this);var c=this.config.el,d=b.data(c,t);d||b.data(c,t,d={});d[a.stamp(this)]=this}return this},resume:function(){if(this.isPaused()){this._startTime=a.now()-this._pauseDiff;var d=this.config.el,e=b.data(d,
t);e&&(delete e[a.stamp(this)],a.isEmptyObject(e)&&b.removeData(d,t));c(this);i.start(this)}return this},_runInternal:f,run:function(){!1===this.config.queue?f.call(this):k.queue(this);return this},_frame:function(){var a,b=this.config,c=1,d,e,f=this._fxs;for(a in f)if(!(e=f[a]).finished)b.frame&&(d=b.frame(e)),1==d||0==d?(e.finished=d,c&=d):(c&=e.frame())&&b.frame&&b.frame(e);(!1===this.fire("step")||c)&&this.stop(c)},stop:function(a){var b=this.config,c=b.queue,d,f=this._fxs;if(!this.isRunning())return!1!==
c&&k.remove(this),this;if(a){for(d in f)if(!(a=f[d]).finished)b.frame?b.frame(a,1):a.frame(1);this.fire("complete")}i.stop(this);e(this);!1!==c&&k.dequeue(this);return this}};a.augment(h,g.Target);var w=a.guid("ks-anim-unqueued-"+a.now()+"-"),t=a.guid("ks-anim-paused-"+a.now()+"-");h.stop=function(c,d,e,f){if(null===f||"string"==typeof f||!1===f)return n.apply(void 0,arguments);e&&k.removeQueues(c);var g=b.data(c,w),g=a.merge(g);a.each(g,function(a){a.stop(d)})};a.each(["pause","resume"],function(a){h[a]=
function(b,c){if(null===c||"string"==typeof c||!1===c)return m(b,c,a);m(b,void 0,a)}});h.isRunning=function(c){return(c=b.data(c,w))&&!a.isEmptyObject(c)};h.isPaused=function(c){return(c=b.data(c,t))&&!a.isEmptyObject(c)};h.Q=k;return h},{requires:"dom,event,./easing,./manager,./fx,./queue".split(",")});
KISSY.add("anim/color",function(a,b,g,l){function i(a){var a=a+"",b;if(b=a.match(f))return[parseInt(b[1]),parseInt(b[2]),parseInt(b[3])];if(b=a.match(c))return[parseInt(b[1]),parseInt(b[2]),parseInt(b[3]),parseInt(b[4])];if(b=a.match(e)){for(a=1;a<b.length;a++)2>b[a].length&&(b[a]+=b[a]);return[parseInt(b[1],k),parseInt(b[2],k),parseInt(b[3],k)]}return d[a=a.toLowerCase()]?d[a]:[255,255,255]}function j(){j.superclass.constructor.apply(this,arguments)}var k=16,h=Math.floor,d={black:[0,0,0],silver:[192,
192,192],gray:[128,128,128],white:[255,255,255],maroon:[128,0,0],red:[255,0,0],purple:[128,0,128],fuchsia:[255,0,255],green:[0,128,0],lime:[0,255,0],olive:[128,128,0],yellow:[255,255,0],navy:[0,0,128],blue:[0,0,255],teal:[0,128,128],aqua:[0,255,255]},f=/^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i,c=/^rgba\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+),\s*([0-9]+)\)$/i,e=/^#?([0-9A-F]{1,2})([0-9A-F]{1,2})([0-9A-F]{1,2})$/i,b=g.SHORT_HANDS;b.background=b.background||[];b.background.push("backgroundColor");
b.borderColor=["borderBottomColor","borderLeftColor","borderRightColor","borderTopColor"];b.border.push("borderBottomColor","borderLeftColor","borderRightColor","borderTopColor");b.borderBottom.push("borderBottomColor");b.borderLeft.push("borderLeftColor");b.borderRight.push("borderRightColor");b.borderTop.push("borderTopColor");a.extend(j,l,{load:function(){j.superclass.load.apply(this,arguments);this.from&&(this.from=i(this.from));this.to&&(this.to=i(this.to))},interpolate:function(a,b,c){var d=
j.superclass.interpolate;if(3==a.length&&3==b.length)return"rgb("+[h(d(a[0],b[0],c)),h(d(a[1],b[1],c)),h(d(a[2],b[2],c))].join(", ")+")";if(4==a.length||4==b.length)return"rgba("+[h(d(a[0],b[0],c)),h(d(a[1],b[1],c)),h(d(a[2],b[2],c)),h(d(a[3]||1,b[3]||1,c))].join(", ")+")"}});a.each("backgroundColor,borderBottomColor,borderLeftColor,borderRightColor,borderTopColor,color,outlineColor".split(","),function(a){l.Factories[a]=j});return j},{requires:["dom","./base","./fx"]});
KISSY.add("anim/easing",function(){var a=Math.PI,b=Math.pow,g=Math.sin,l={swing:function(b){return-Math.cos(b*a)/2+0.5},easeNone:function(a){return a},easeIn:function(a){return a*a},easeOut:function(a){return(2-a)*a},easeBoth:function(a){return 1>(a*=2)?0.5*a*a:0.5*(1- --a*(a-2))},easeInStrong:function(a){return a*a*a*a},easeOutStrong:function(a){return 1- --a*a*a*a},easeBothStrong:function(a){return 1>(a*=2)?0.5*a*a*a*a:0.5*(2-(a-=2)*a*a*a)},elasticIn:function(i){return 0===i||1===i?i:-(b(2,10*(i-=
1))*g((i-0.075)*2*a/0.3))},elasticOut:function(i){return 0===i||1===i?i:b(2,-10*i)*g((i-0.075)*2*a/0.3)+1},elasticBoth:function(i){return 0===i||2===(i*=2)?i:1>i?-0.5*b(2,10*(i-=1))*g((i-0.1125)*2*a/0.45):0.5*b(2,-10*(i-=1))*g((i-0.1125)*2*a/0.45)+1},backIn:function(a){1===a&&(a-=0.001);return a*a*(2.70158*a-1.70158)},backOut:function(a){return(a-=1)*a*(2.70158*a+1.70158)+1},backBoth:function(a){var b,g=(b=2.5949095)+1;return 1>(a*=2)?0.5*a*a*(g*a-b):0.5*((a-=2)*a*(g*a+b)+2)},bounceIn:function(a){return 1-
l.bounceOut(1-a)},bounceOut:function(a){return a<1/2.75?7.5625*a*a:a<2/2.75?7.5625*(a-=1.5/2.75)*a+0.75:a<2.5/2.75?7.5625*(a-=2.25/2.75)*a+0.9375:7.5625*(a-=2.625/2.75)*a+0.984375},bounceBoth:function(a){return 0.5>a?0.5*l.bounceIn(2*a):0.5*l.bounceOut(2*a-1)+0.5}};return l});
KISSY.add("anim/fx",function(a,b,g){function l(a){this.load(a)}function i(a,i){return(!a.style||null==a.style[i])&&null!=b.attr(a,i,g,1)?1:0}l.prototype={constructor:l,load:function(b){a.mix(this,b);this.pos=0;this.unit=this.unit||""},frame:function(b){var g=this.anim,h=0;if(this.finished)return 1;var d=a.now(),f=g._startTime,g=g._duration;b||d>=g+f?h=this.pos=1:this.pos=this.easing((d-f)/g);this.update();this.finished=this.finished||h;return h},interpolate:function(b,i,h){return a.isNumber(b)&&a.isNumber(i)?
(b+(i-b)*h).toFixed(3):g},update:function(){var a=this.prop,k=this.anim.config.el,h=this.to,d=this.interpolate(this.from,h,this.pos);d===g?this.finished||(this.finished=1,b.css(k,a,h)):(d+=this.unit,i(k,a)?b.attr(k,a,d,1):b.css(k,a,d))},cur:function(){var a=this.prop,k=this.anim.config.el;if(i(k,a))return b.attr(k,a,g,1);var h,a=b.css(k,a);return isNaN(h=parseFloat(a))?!a||"auto"===a?0:a:h}};l.Factories={};l.getFx=function(a){return new (l.Factories[a.prop]||l)(a)};return l},{requires:["dom"]});
KISSY.add("anim/manager",function(a){var b=a.stamp;return{interval:15,runnings:{},timer:null,start:function(a){var l=b(a);this.runnings[l]||(this.runnings[l]=a,this.startTimer())},stop:function(a){this.notRun(a)},notRun:function(g){delete this.runnings[b(g)];a.isEmptyObject(this.runnings)&&this.stopTimer()},pause:function(a){this.notRun(a)},resume:function(a){this.start(a)},startTimer:function(){var a=this;a.timer||(a.timer=setTimeout(function(){a.runFrames()?a.stopTimer():(a.timer=0,a.startTimer())},
a.interval))},stopTimer:function(){var a=this.timer;a&&(clearTimeout(a),this.timer=0)},runFrames:function(){var a=1,b,i=this.runnings;for(b in i)a=0,i[b]._frame();return a}}});
KISSY.add("anim/queue",function(a,b){function g(a,d,f){var d=d||j,c,e=b.data(a,i);!e&&!f&&b.data(a,i,e={});e&&(c=e[d],!c&&!f&&(c=e[d]=[]));return c}function l(g,d){var d=d||j,f=b.data(g,i);f&&delete f[d];a.isEmptyObject(f)&&b.removeData(g,i)}var i=a.guid("ks-queue-"+a.now()+"-"),j=a.guid("ks-queue-"+a.now()+"-"),k={queueCollectionKey:i,queue:function(a){var b=g(a.config.el,a.config.queue);b.push(a);"..."!==b[0]&&k.dequeue(a);return b},remove:function(b){var d=g(b.config.el,b.config.queue,1);d&&(b=
a.indexOf(b,d),-1<b&&d.splice(b,1))},removeQueues:function(a){b.removeData(a,i)},removeQueue:l,dequeue:function(a){var b=a.config.el,a=a.config.queue,f=g(b,a,1),c=f&&f.shift();"..."==c&&(c=f.shift());c?(f.unshift("..."),c._runInternal()):l(b,a)}};return k},{requires:["dom"]});
KISSY.add("node/anim",function(a,b,g,l,i){function j(a,b,f){for(var c=[],e={},f=f||0;f<b;f++)c.push.apply(c,k[f]);for(f=0;f<c.length;f++)e[c[f]]=a;return e}var k=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];a.augment(l,{animate:function(b){var d=a.makeArray(arguments);a.each(this,function(b){var c=a.clone(d),e=c[0];e.props?(e.el=b,g(e).run()):g.apply(i,[b].concat(c)).run()});return this},stop:function(b,
d,f){a.each(this,function(a){g.stop(a,b,d,f)});return this},pause:function(b,d){a.each(this,function(a){g.pause(a,d)});return this},resume:function(b,d){a.each(this,function(a){g.resume(a,d)});return this},isRunning:function(){for(var a=0;a<this.length;a++)if(g.isRunning(this[a]))return!0;return!1},isPaused:function(){for(var a=0;a<this.length;a++)if(g.isPaused(this[a]))return 1;return 0}});a.each({show:j("show",3),hide:j("hide",3),toggle:j("toggle",3),fadeIn:j("show",3,2),fadeOut:j("hide",3,2),fadeToggle:j("toggle",
3,2),slideDown:j("show",1),slideUp:j("hide",1),slideToggle:j("toggle",1)},function(h,d){l.prototype[d]=function(f,c,e){if(b[d]&&!f)b[d](this);else a.each(this,function(a){g(a,h,f,e||"easeOut",c).run()});return this}})},{requires:["dom","anim","./base"]});
KISSY.add("node/attach",function(a,b,g,l,i){function j(a,f,c){c.unshift(f);a=b[a].apply(b,c);return a===i?f:a}var k=l.prototype,h=a.makeArray;l.KeyCodes=g.KeyCodes;a.each("nodeName,equals,contains,index,scrollTop,scrollLeft,height,width,innerHeight,innerWidth,outerHeight,outerWidth,addStyleSheet,appendTo,prependTo,insertBefore,before,after,insertAfter,test,hasClass,addClass,removeClass,replaceClass,toggleClass,removeAttr,hasAttr,hasProp,scrollIntoView,remove,empty,removeData,hasData,unselectable,wrap,wrapAll,replaceWith,wrapInner,unwrap".split(","),function(a){k[a]=
function(){var b=h(arguments);return j(a,this,b)}});a.each("filter,first,last,parent,closest,next,prev,clone,siblings,contents,children".split(","),function(a){k[a]=function(){var f=h(arguments);f.unshift(this);f=b[a].apply(b,f);return f===i?this:f===null?null:new l(f)}});a.each({attr:1,text:0,css:1,style:1,val:0,prop:1,offset:0,html:0,outerHTML:0,data:1},function(d,f){k[f]=function(){var c;c=h(arguments);c[d]===i&&!a.isObject(c[0])?(c.unshift(this),c=b[f].apply(b,c)):c=j(f,this,c);return c}});a.each("on,detach,fire,fireHandler,delegate,undelegate".split(","),
function(a){k[a]=function(){var b=h(arguments);b.unshift(this);g[a].apply(g,b);return this}})},{requires:["dom","event/dom","./base"]});
KISSY.add("node/base",function(a,b,g){function l(c,e,g){if(!(this instanceof l))return new l(c,e,g);if(c)if("string"==typeof c){if(c=b.create(c,e,g),c.nodeType===k.DOCUMENT_FRAGMENT_NODE)return h.apply(this,d(c.childNodes)),this}else{if(a.isArray(c)||f(c))return h.apply(this,d(c)),this}else return this;this[0]=c;this.length=1;return this}var i=Array.prototype,j=i.slice,k=b.NodeType,h=i.push,d=a.makeArray,f=b._isNodeList;l.prototype={constructor:l,length:0,item:function(b){return a.isNumber(b)?b>=
this.length?null:new l(this[b]):new l(b)},add:function(b,e,d){a.isNumber(e)&&(d=e,e=g);b=l.all(b,e).getDOMNodes();e=new l(this);d===g?h.apply(e,b):(d=[d,0],d.push.apply(d,b),i.splice.apply(e,d));return e},slice:function(a,b){return new l(j.apply(this,arguments))},getDOMNodes:function(){return j.call(this)},each:function(b,d){var f=this;a.each(f,function(a,g){a=new l(a);return b.call(d||a,a,g,f)});return f},getDOMNode:function(){return this[0]},end:function(){return this.__parent||this},all:function(a){a=
0<this.length?l.all(a,this):new l;a.__parent=this;return a},one:function(a){a=this.all(a);if(a=a.length?a.slice(0,1):null)a.__parent=this;return a}};a.mix(l,{all:function(c,d){return"string"==typeof c&&(c=a.trim(c))&&3<=c.length&&a.startsWith(c,"<")&&a.endsWith(c,">")?(d&&(d.getDOMNode&&(d=d[0]),d=d.ownerDocument||d),new l(c,g,d)):new l(b.query(c,d))},one:function(a,b){var d=l.all(a,b);return d.length?d.slice(0,1):null}});l.NodeType=k;return l},{requires:["dom"]});
KISSY.add("node",function(a,b){a.mix(a,{Node:b,NodeList:b,one:b.one,all:b.all});return b},{requires:["node/base","node/attach","node/override","node/anim"]});
KISSY.add("node/override",function(a,b,g){var l=g.prototype;a.each(["append","prepend","before","after"],function(a){l[a]=function(g){"string"==typeof g&&(g=b.create(g));if(g)b[a](g,this);return this}});a.each(["wrap","wrapAll","replaceWith","wrapInner"],function(a){var b=l[a];l[a]=function(a){"string"==typeof a&&(a=g.all(a,this[0].ownerDocument));return b.call(this,a)}})},{requires:["dom","./base","./attach"]});KISSY.use("ua,dom,event,node,json,ajax,anim,base,cookie",{sync:!0});
