http://www.diandian.com/login 这个是点点网的的登录界面,右上角有浏览和注册两个按钮 ,随便一个点一下界面都是用js改变界面的 但好像都没刷新 但是为什么url变了。
应该和浏览器有关吧!我刚用google/火狐/IE8,前2者url确实改变了,IE8没有改变!
你查看源文件应该知道,其实东西都再一个页面中!那个浏览和注册确实是一个链接
他是用html5实现的效果,html5可以实现url改变,但是页面无刷新的。但是ie9以前的版本都不支持html5的。
首先当你进入该网站的时候,那些个需要的图片已经放到本地了
这个div就定义了加载哪些图片,而上边那个js中是为了方便后面程序调用。
再次 这个网站的程序并没有向我们之前那样,调用哪个程序直接在元素中使用,比如
<onclick="aa()">这样的程序,而是通过如上图事件源的方式来捕获,
这个是为了保护js的代码,点点的代码隐藏,本例中的登录界面布局是:
里面并没有直接在元素中写事件处理的具体方法,而是通过加载js进来,如下:
其中的socurceNanme写明白了请求的js编号为20120329164011,把这个编号的js加载过来。
因为编了号,所以也不知道具体是对应加载的那个js,还是为了保护js代码;
上面那个listenerbody中只给出了部分js代码,这个就是用于处理点击注册、登录按钮等等事件的。
最近工作忙,没时间仔细研究,
你可以自己跟下代码。
自己研究下。下面是那个处理注册和登录按钮的js,文件代码,解压后得到的。
1 KISSY.add("ua/base", 2 function() { 3 var a = navigator.userAgent, 4 b = "", 5 c = "mobile", 6 d = b, 7 e = b, 8 f, 9 g = [6, 9], 10 h, 11 i, 12 j = "{{version}}", 13 k = "<!--[if IE " + j + "]><s></s><![endif]-->", 14 l = document.createElement("div"), 15 m, 16 n = {}, 17 o = function(a) { 18 var b = 0; 19 return parseFloat(a.replace(/\./g, 20 function() { 21 return b++===0 ? ".": "" 22 23 })) 24 25 }; 26 l.innerHTML = k.replace(j, ""), 27 m = l.getElementsByTagName("s"); 28 if (m.length > 0) { 29 e = "ie", 30 n[d = "trident"] = .1, 31 (f = a.match(/Trident\/([\d.]*)/)) && f[1] && (n[d] = o(f[1])); 32 for (h = g[0], i = g[1]; h <= i; h++) { 33 l.innerHTML = k.replace(j, h); 34 if (m.length > 0) { 35 n[e] = h; 36 break 37 38 } 39 40 } 41 42 } else if ((f = a.match(/AppleWebKit\/([\d.]*)/)) && f[1]) { 43 n[d = "webkit"] = o(f[1]), 44 (f = a.match(/Chrome\/([\d.]*)/)) && f[1] ? n[e = "chrome"] = o(f[1]) : (f = a.match(/\/([\d.]*) Safari/)) && f[1] && (n[e = "safari"] = o(f[1])); 45 if (/ Mobile\//.test(a)) n[c] = "apple"; 46 else if (f = a.match(/NokiaN[^\/]*|Android \d\.\d|webOS\/\d\.\d/)) n[c] = f[0].toLowerCase() 47 48 } else if ((f = a.match(/Presto\/([\d.]*)/)) && f[1]) n[d = "presto"] = o(f[1]), 49 (f = a.match(/Opera\/([\d.]*)/)) && f[1] && (n[e = "opera"] = o(f[1]), (f = a.match(/Opera\/.* Version\/([\d.]*)/)) && f[1] && (n[e] = o(f[1])), (f = a.match(/Opera Mini[^;]*/)) && f ? n[c] = f[0].toLowerCase() : (f = a.match(/Opera Mobi[^;]*/)) && f && (n[c] = f[0])); 50 else if ((f = a.match(/MSIE\s([^;]*)/)) && f[1]) n[d = "trident"] = .1, 51 n[e = "ie"] = o(f[1]), 52 (f = a.match(/Trident\/([\d.]*)/)) && f[1] && (n[d] = o(f[1])); 53 else if (f = a.match(/Gecko/)) n[d = "gecko"] = .1, 54 (f = a.match(/rv:([\d.]*)/)) && f[1] && (n[d] = o(f[1])), 55 (f = a.match(/Firefox\/([\d.]*)/)) && f[1] && (n[e = "firefox"] = o(f[1])); 56 return n.core = d, 57 n.shell = e, 58 n._numberify = o, 59 n 60 61 }), 62 KISSY.add("ua/extra", 63 function(a, b) { 64 var c = navigator.userAgent, 65 d, 66 e, 67 f, 68 g = {}, 69 h = b._numberify; 70 if (d = c.match(/360SE/)) g[f = "se360"] = 3; 71 else if ((d = c.match(/Maxthon/)) && (e = window.external)) { 72 f = "maxthon"; 73 try { 74 g[f] = h(e.max_version) 75 76 } catch(i) { 77 g[f] = .1 78 79 } 80 81 } else if (d = c.match(/TencentTraveler\s([\d.]*)/)) g[f = "tt"] = d[1] ? h(d[1]) : .1; 82 else if (d = c.match(/TheWorld/)) g[f = "theworld"] = 3; 83 else if (d = c.match(/SE\s([\d.]*)/)) g[f = "sougou"] = d[1] ? h(d[1]) : .1; 84 return f && (g.shell = f), 85 a.mix(b, g), 86 b 87 88 }, 89 { 90 requires: ["ua/base"] 91 92 }), 93 KISSY.add("ua", 94 function(a, b) { 95 return b 96 97 }, 98 { 99 requires: ["ua/extra"] 100 101 }), 102 KISSY.add("dom/base", 103 function(a, b, c) { 104 function d(a, b) { 105 return a && a.nodeType === b 106 107 } 108 var e = { 109 ELEMENT_NODE: 1, 110 ATTRIBUTE_NODE: 2, 111 TEXT_NODE: 3, 112 CDATA_SECTION_NODE: 4, 113 ENTITY_REFERENCE_NODE: 5, 114 ENTITY_NODE: 6, 115 PROCESSING_INSTRUCTION_NODE: 7, 116 COMMENT_NODE: 8, 117 DOCUMENT_NODE: 9, 118 DOCUMENT_TYPE_NODE: 10, 119 DOCUMENT_FRAGMENT_NODE: 11, 120 NOTATION_NODE: 12 121 122 }, 123 f = { 124 _isCustomDomain: function(a) { 125 a = a || window; 126 var b = a.document.domain, 127 c = a.location.hostname; 128 return b != c && b != "[" + c + "]" 129 130 }, 131 _genEmptyIframeSrc: function(a) { 132 a = a || window; 133 if (b.ie && f._isCustomDomain(a)) return "javascript:void(function(){" + encodeURIComponent("document.open();document.domain='" + a.document.domain + "';" + "document.close();") + "}())" 134 135 }, 136 _NODE_TYPE: e, 137 _isElementNode: function(a) { 138 return d(a, f.ELEMENT_NODE) 139 140 }, 141 _getWin: function(a) { 142 return a && "scrollTo" in a && a.document ? a: d(a, f.DOCUMENT_NODE) ? a.defaultView || a.parentWindow: a === c || a === null ? window: !1 143 144 }, 145 _nodeTypeIs: d, 146 _isNodeList: function(a) { 147 return a && !a.nodeType && a.item && !a.setTimeout 148 149 }, 150 _nodeName: function(a, b) { 151 return a && a.nodeName.toLowerCase() === b.toLowerCase() 152 153 } 154 155 }; 156 return a.mix(f, e), 157 f 158 159 }, 160 { 161 requires: ["ua"] 162 163 }), 164 KISSY.add("dom/attr", 165 function(a, b, c, d) { 166 function y(a) { 167 return b._nodeTypeIs(a, b.TEXT_NODE) 168 169 } 170 function z(a, b) { 171 b = t[b] || b; 172 var c = v[b]; 173 return c && c.get ? c.get(a, b) : a[b] 174 175 } 176 var e = document, 177 f = e.documentElement, 178 g = !f.hasAttribute, 179 h = f.textContent === d ? "innerText": "textContent", 180 i = "", 181 j = b._nodeName, 182 k = b._isElementNode, 183 l = /^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i, 184 m = /^(?:button|input|object|select|textarea)$/i, 185 n = /^a(?:rea)?$/i, 186 o = /:|^on/, 187 p = /\r/g, 188 q = {}, 189 r = { 190 val: 1, 191 css: 1, 192 html: 1, 193 text: 1, 194 data: 1, 195 width: 1, 196 height: 1, 197 offset: 1, 198 scrollTop: 1, 199 scrollLeft: 1 200 201 }, 202 s = { 203 tabindex: { 204 get: function(a) { 205 var b = a.getAttributeNode("tabindex"); 206 return b && b.specified ? parseInt(b.value, 10) : m.test(a.nodeName) || n.test(a.nodeName) && a.href ? 0: d 207 208 } 209 210 }, 211 style: { 212 get: function(a) { 213 return a.style.cssText 214 215 }, 216 set: function(a, b) { 217 a.style.cssText = b 218 219 } 220 221 } 222 223 }, 224 t = { 225 tabindex: "tabIndex", 226 readonly: "readOnly", 227 "for": "htmlFor", 228 "class": "className", 229 maxlength: "maxLength", 230 cellspacing: "cellSpacing", 231 cellpadding: "cellPadding", 232 rowspan: "rowSpan", 233 colspan: "colSpan", 234 usemap: "useMap", 235 frameborder: "frameBorder", 236 contenteditable: "contentEditable" 237 238 }, 239 u = { 240 get: function(a, c) { 241 return b.prop(a, c) ? c.toLowerCase() : d 242 243 }, 244 set: function(a, c, d) { 245 var e; 246 return c === !1 ? b.removeAttr(a, d) : (e = t[d] || d, e in a && (a[e] = !0), a.setAttribute(d, d.toLowerCase())), 247 d 248 249 } 250 251 }, 252 v = {}, 253 w = {}, 254 x = { 255 option: { 256 get: function(a) { 257 var b = a.attributes.value; 258 return ! b || b.specified ? a.value: a.text 259 260 } 261 262 }, 263 select: { 264 get: function(a) { 265 var c = a.selectedIndex, 266 d = a.options, 267 e = a.type === "select-one"; 268 if (c < 0) return null; 269 if (e) return b.val(d[c]); 270 var f = [], 271 g = 0, 272 h = d.length; 273 for (; g < h; ++g) d[g].selected && f.push(b.val(d[g])); 274 return f 275 276 }, 277 set: function(c, d) { 278 var e = a.makeArray(d), 279 f = c.options; 280 return a.each(f, 281 function(c) { 282 c.selected = a.inArray(b.val(c), e) 283 284 }), 285 e.length || (c.selectedIndex = -1), 286 e 287 288 } 289 290 } 291 292 }; 293 return g && (w = { 294 get: function(a, b) { 295 var c; 296 return c = a.getAttributeNode(b), 297 c && c.nodeValue !== "" ? c.nodeValue: d 298 299 }, 300 set: function(a, b, c) { 301 var d = a.getAttributeNode(c); 302 if (d) d.nodeValue = b; 303 else try { 304 var e = a.ownerDocument.createAttribute(c); 305 e.value = b, 306 a.setAttributeNode(e) 307 308 } catch(f) { 309 return a.setAttribute(c, b, 0) 310 311 } 312 313 } 314 315 }, 316 q = t, s.tabIndex = s.tabindex, a.each(["href", "src", "width", "height", "colSpan", "rowSpan"], 317 function(a) { 318 s[a] = { 319 get: function(b) { 320 var c = b.getAttribute(a, 2); 321 return c === null ? d: c 322 323 } 324 325 } 326 327 }), x.button = s.value = w), 328 a.each(["radio", "checkbox"], 329 function(c) { 330 x[c] = { 331 get: function(a) { 332 return a.getAttribute("value") === null ? "on": a.value 333 334 }, 335 set: function(c, d) { 336 if (a.isArray(d)) return c.checked = a.inArray(b.val(c), d) 337 338 } 339 340 } 341 342 }), 343 a.mix(b, { 344 prop: function(c, e, f) { 345 if (a.isPlainObject(e)) { 346 for (var g in e) b.prop(c, g, e[g]); 347 return 348 349 } 350 var h = b.query(c); 351 e = t[e] || e; 352 var i = v[e]; 353 if (f !== d) h.each(function(a) { 354 i && i.set ? i.set(a, f, e) : a[e] = f 355 356 }); 357 else if (h.length) return z(h[0], e) 358 359 }, 360 hasProp: function(a, c) { 361 var e = b.query(a); 362 for (var f = 0; f < e.length; f++) { 363 var g = e[f]; 364 if (z(g, c) !== d) return ! 0 365 366 } 367 return ! 1 368 369 }, 370 removeProp: function(c, e) { 371 e = t[e] || e, 372 b.query(c).each(function(b) { 373 try { 374 b[e] = d, 375 delete b[e] 376 377 } catch(c) { 378 a.log("delete el property error : "), 379 a.log(c) 380 381 } 382 383 }) 384 385 }, 386 attr: function(c, e, f, g) { 387 if (a.isPlainObject(e)) { 388 g = f; 389 for (var h in e) b.attr(c, h, e[h], g); 390 return 391 392 } 393 if (! (e = a.trim(e))) return; 394 if (g && r[e]) return b[e](c, f); 395 e = e.toLowerCase(); 396 if (g && r[e]) return b[e](c, f); 397 var i = b.query(c); 398 if (f === d) return b.__attr(i[0], e); 399 i.each(function(a) { 400 b.__attr(a, e, f) 401 402 }) 403 404 }, 405 __attr: function(a, b, c) { 406 if (!k(a)) return; 407 b = q[b] || b; 408 var e, 409 f; 410 j(a, "form") ? e = w: l.test(b) ? e = u: o.test(b) ? e = w: e = s[b]; 411 if (c === d) return e && e.get ? e.get(a, b) : (f = a.getAttribute(b), f === null ? d: f); 412 e && e.set ? e.set(a, c, b) : a.setAttribute(b, i + c) 413 414 }, 415 removeAttr: function(a, c) { 416 c = c.toLowerCase(), 417 c = q[c] || c, 418 b.query(a).each(function(a) { 419 if (k(a)) { 420 var b; 421 a.removeAttribute(c), 422 l.test(c) && (b = t[c] || c) in a && (a[b] = !1) 423 424 } 425 426 }) 427 428 }, 429 hasAttr: g ? 430 function(a, c) { 431 c = c.toLowerCase(); 432 var d = b.query(a); 433 for (var e = 0; e < d.length; e++) { 434 var f = d[e], 435 g = f.getAttributeNode(c); 436 if (g && g.specified) return ! 0 437 438 } 439 return ! 1 440 441 }: function(a, c) { 442 var d = b.query(a); 443 for (var e = 0; e < d.length; e++) { 444 var f = d[e]; 445 if (f.hasAttribute(c)) return ! 0 446 447 } 448 return ! 1 449 450 }, 451 val: function(c, e) { 452 var f, 453 g; 454 if (e === d) { 455 var h = b.get(c); 456 if (h) return f = x[h.nodeName.toLowerCase()] || x[h.type], 457 f && "get" in f && (g = f.get(h, "value")) !== d ? g: (g = h.value, typeof g == "string" ? g.replace(p, "") : a.isNullOrUndefined(g) ? "": g); 458 return 459 460 } 461 b.query(c).each(function(b) { 462 if (b.nodeType !== 1) return; 463 var c = e; 464 a.isNullOrUndefined(c) ? c = "": typeof c == "number" ? c += "": a.isArray(c) && (c = a.map(c, 465 function(b) { 466 return a.isNullOrUndefined(c) ? "": b + "" 467 468 })), 469 f = x[b.nodeName.toLowerCase()] || x[b.type]; 470 if (!f || !("set" in f) || f.set(b, c, "value") === d) b.value = c 471 472 }) 473 474 }, 475 text: function(a, c) { 476 if (c === d) { 477 var e = b.get(a); 478 return k(e) ? e[h] || i: y(e) ? e.nodeValue: d 479 480 } 481 b.query(a).each(function(a) { 482 k(a) ? a[h] = c: y(a) && (a.nodeValue = c) 483 484 }) 485 486 } 487 488 }), 489 b 490 491 }, 492 { 493 requires: ["./base", "ua"] 494 495 }), 496 KISSY.add("dom/class", 497 function(a, b, c) { 498 function g(a) { 499 return (d + a + d).replace(f, d) 500 501 } 502 function h(d, f, g, h) { 503 if (! (f = a.trim(f))) return h ? !1: c; 504 var i = b.query(d), 505 j = i.length, 506 k = f.split(e), 507 l, 508 m, 509 n = []; 510 for (var o = 0; o < k.length; o++) { 511 var p = a.trim(k[o]); 512 p && n.push(p) 513 514 } 515 for (o = 0; o < j; o++) { 516 l = i[o]; 517 if (b._isElementNode(l)) { 518 m = g(l, n, n.length); 519 if (m !== c) return m 520 521 } 522 523 } 524 return h ? !1: c 525 526 } 527 var d = " ", 528 e = /[\.\s]\s*\.?/, 529 f = /[\n\t]/g; 530 return a.mix(b, { 531 __hasClass: function(a, b) { 532 var c = a.className; 533 return c ? (c = g(c), c.indexOf(d + b + d) > -1) : !1 534 535 }, 536 hasClass: function(a, b) { 537 return h(a, b, 538 function(a, b, c) { 539 var e = a.className; 540 if (e) { 541 var f = g(e), 542 h = 0, 543 i = !0; 544 for (; h < c; h++) if (f.indexOf(d + b[h] + d) < 0) { 545 i = !1; 546 break 547 548 } 549 if (i) return ! 0 550 551 } 552 553 }, 554 !0) 555 556 }, 557 addClass: function(b, e) { 558 h(b, e, 559 function(b, c, f) { 560 var h = b.className; 561 if (!h) b.className = e; 562 else { 563 var i = g(h), 564 j = h, 565 k = 0; 566 for (; k < f; k++) i.indexOf(d + c[k] + d) < 0 && (j += d + c[k]); 567 b.className = a.trim(j) 568 569 } 570 571 }, 572 c) 573 574 }, 575 removeClass: function(b, e) { 576 h(b, e, 577 function(b, c, e) { 578 var f = b.className; 579 if (f) if (!e) b.className = ""; 580 else { 581 var h = g(f), 582 i = 0, 583 j; 584 for (; i < e; i++) { 585 j = d + c[i] + d; 586 while (h.indexOf(j) >= 0) h = h.replace(j, d) 587 588 } 589 b.className = a.trim(h) 590 591 } 592 593 }, 594 c) 595 596 }, 597 replaceClass: function(a, c, d) { 598 b.removeClass(a, c), 599 b.addClass(a, d) 600 601 }, 602 toggleClass: function(d, e, f) { 603 var g = a.isBoolean(f), 604 i; 605 h(d, e, 606 function(a, c, d) { 607 var e = 0, 608 h; 609 for (; e < d; e++) h = c[e], 610 i = g ? !f: b.hasClass(a, h), 611 b[i ? "removeClass": "addClass"](a, h) 612 613 }, 614 c) 615 616 } 617 618 }), 619 b 620 621 }, 622 { 623 requires: ["dom/base"] 624 625 }), 626 KISSY.add("dom/create", 627 function(a, b, c, d) { 628 function s(a, b) { 629 return a.getElementsByTagName(b) 630 631 } 632 function t(c) { 633 var d = a.require("event"); 634 d && d.detach(c), 635 b.removeData(c) 636 637 } 638 function u(a, c, d) { 639 if (g(c, b.DOCUMENT_FRAGMENT_NODE)) { 640 var e = c.childNodes, 641 f = d.childNodes, 642 i = 0; 643 while (e[i]) f[i] && u(a, e[i], f[i]), 644 i++ 645 646 } else if (h(c)) { 647 var j = s(c, "*"), 648 k = s(d, "*"), 649 l = 0; 650 while (j[l]) k[l] && a(j[l], k[l]), 651 l++ 652 653 } 654 655 } 656 function v(c, d) { 657 var e = a.require("event"); 658 if (h(d) && !b.hasData(c)) return; 659 var f = b.data(c); 660 for (var g in f) b.data(d, g, f[g]); 661 e && (e._removeData(d), e._clone(c, d)) 662 663 } 664 function w(a, c) { 665 c.clearAttributes && c.clearAttributes(), 666 c.mergeAttributes && c.mergeAttributes(a); 667 var d = c.nodeName.toLowerCase(), 668 e = a.childNodes; 669 if (d === "object" && !c.childNodes.length) for (var f = 0; f < e.length; f++) c.appendChild(e[f].cloneNode(!0)); 670 else if (d !== "input" || a.type !== "checkbox" && a.type !== "radio") { 671 if (d === "option") c.selected = a.defaultSelected; 672 else if (d === "input" || d === "textarea") c.defaultValue = a.defaultValue 673 674 } else a.checked && (c.defaultChecked = c.checked = a.checked), 675 c.value !== a.value && (c.value = a.value); 676 c.removeAttribute(b.__EXPANDO) 677 678 } 679 function x(c, d) { 680 return a.isPlainObject(d) && (h(c) ? b.attr(c, d, !0) : g(c, b.DOCUMENT_FRAGMENT_NODE) && b.attr(c.childNodes, d, !0)), 681 c 682 683 } 684 function y(b, c) { 685 var d = null, 686 e, 687 f; 688 if (b && (b.push || b.item) && b[0]) { 689 c = c || b[0].ownerDocument, 690 d = c.createDocumentFragment(), 691 b = a.makeArray(b); 692 for (e = 0, f = b.length; e < f; e++) d.appendChild(b[e]) 693 694 } else a.log("Unable to convert " + b + " to fragment."); 695 return d 696 697 } 698 var e = document, 699 f = c.ie, 700 g = b._nodeTypeIs, 701 h = b._isElementNode, 702 i = a.isString, 703 j = "div", 704 k = "parentNode", 705 l = e.createElement(j), 706 m = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig, 707 n = /<([\w:]+)/, 708 o = /^\s+/, 709 p = f && f < 9, 710 q = /<|&#?\w+;/, 711 r = /^<(\w+)\s*\/?>(?:<\/\1>)?$/; 712 a.mix(b, { 713 create: function(c, f, l, s) { 714 if (h(c) || g(c, b.TEXT_NODE)) return b.clone(c); 715 var t = null; 716 if (!i(c)) return t; 717 s === d && (s = !0), 718 s && (c = a.trim(c)); 719 if (!c) return t; 720 var u = b._creators, 721 v, 722 w, 723 z = l || e, 724 A, 725 B = j, 726 C, 727 D; 728 return q.test(c) ? (A = r.exec(c)) ? t = z.createElement(A[1]) : (c = c.replace(m, "<$1></$2>"), (A = n.exec(c)) && (C = A[1]) && (B = C.toLowerCase()), v = (u[B] || u[j])(c, z), p && (w = c.match(o)) && v.insertBefore(z.createTextNode(w[0]), v.firstChild), D = v.childNodes, D.length === 1 ? t = D[0][k].removeChild(D[0]) : D.length ? t = y(D, z) : a.error(c + " : create node error")) : t = z.createTextNode(c), 729 x(t, f) 730 731 }, 732 _creators: { 733 div: function(a, b) { 734 var c = b && b != e ? b.createElement(j) : l; 735 return c.innerHTML = "m<div>" + a + "<" + "/div>", 736 c.lastChild 737 738 } 739 740 }, 741 html: function(a, c, e, f) { 742 var g = b.query(a), 743 i = g[0]; 744 if (!i) return; 745 if (c === d) return h(i) ? i.innerHTML: null; 746 var j = !1; 747 c += ""; 748 if (!c.match(/<(?:script|style)/i) && (!p || !c.match(o)) && !E[(c.match(n) || ["", ""])[1].toLowerCase()]) try { 749 g.each(function(a) { 750 h(a) && (t(s(a, "*")), a.innerHTML = c) 751 752 }), 753 j = !0 754 755 } catch(k) {} 756 j || (c = b.create(c, 0, i.ownerDocument, !1), g.each(function(a) { 757 h(a) && (b.empty(a), b.append(c, a, e)) 758 759 })), 760 f && f() 761 762 }, 763 remove: function(a, c) { 764 b.query(a).each(function(a) { 765 if (!c && h(a)) { 766 var b = s(a, "*"); 767 t(b), 768 t(a) 769 770 } 771 a.parentNode && a.parentNode.removeChild(a) 772 773 }) 774 775 }, 776 clone: function(a, c, d, e) { 777 var f = b.get(a); 778 if (!f) return null; 779 var i = f.cloneNode(c); 780 if (h(f) || g(f, b.DOCUMENT_FRAGMENT_NODE)) h(f) && w(f, i), 781 c && u(w, f, i); 782 return d && (v(f, i), c && e && u(v, f, i)), 783 i 784 785 }, 786 empty: function(a) { 787 b.query(a).each(function(a) { 788 b.remove(a.childNodes) 789 790 }) 791 792 }, 793 _nl2frag: y 794 795 }); 796 var z = b._creators, 797 A = b.create, 798 B = "<table>", 799 C = "</table>", 800 D = /(?:\/(?:thead|tfoot|caption|col|colgroup)>)+\s*<tbody/, 801 E = { 802 option: "select", 803 optgroup: "select", 804 area: "map", 805 thead: "table", 806 td: "tr", 807 th: "tr", 808 tr: "tbody", 809 tbody: "table", 810 tfoot: "table", 811 caption: "table", 812 colgroup: "table", 813 col: "colgroup", 814 legend: "fieldset" 815 816 }; 817 for (var F in E)(function(a) { 818 z[F] = function(b, c) { 819 return A("<" + a + ">" + b + "<" + "/" + a + ">", null, c) 820 821 } 822 823 })(E[F]); 824 return f < 8 && (z.tbody = function(a, b) { 825 var c = A(B + a + C, null, b), 826 d = c.children.tags("tbody")[0]; 827 return c.children.length > 1 && d && !D.test(a) && d[k].removeChild(d), 828 c 829 830 }), 831 a.mix(z, { 832 thead: z.tbody, 833 tfoot: z.tbody, 834 caption: z.tbody, 835 colgroup: z.tbody 836 837 }), 838 b 839 840 }, 841 { 842 requires: ["./base", "ua"] 843 844 }), 845 KISSY.add("dom/data", 846 function(a, b, c) { 847 function l(a) { 848 return a && a.nodeType 849 850 } 851 var d = window, 852 e = "_ks_data_" + a.now(), 853 f = {}, 854 g = {}, 855 h = {}; 856 h.applet = 1, 857 h.object = 1, 858 h.embed = 1; 859 var i = { 860 hasData: function(b, d) { 861 if (b) if (d !== c) { 862 if (d in b) return ! 0 863 864 } else if (!a.isEmptyObject(b)) return ! 0; 865 return ! 1 866 867 } 868 869 }, 870 j = { 871 hasData: function(a, b) { 872 if (a == d) return j.hasData(g, b); 873 var c = a[e]; 874 return i.hasData(c, b) 875 876 }, 877 data: function(a, b, f) { 878 if (a == d) return j.data(g, b, f); 879 var h = a[e]; 880 if (f === c) return b !== c ? h && h[b] : (h = a[e] = a[e] || {}, 881 h); 882 h = a[e] = a[e] || {}, 883 h[b] = f 884 885 }, 886 removeData: function(b, f) { 887 if (b == d) return j.removeData(g, f); 888 var h = b[e]; 889 if (!h) return; 890 if (f !== c) delete h[f], 891 a.isEmptyObject(h) && j.removeData(b, c); 892 else try { 893 delete b[e] 894 895 } catch(i) { 896 b[e] = null 897 898 } 899 900 } 901 902 }, 903 k = { 904 hasData: function(a, b) { 905 var c = a[e]; 906 if (!c) return ! 1; 907 var d = f[c]; 908 return i.hasData(d, b) 909 910 }, 911 data: function(b, d, g) { 912 if (h[b.nodeName.toLowerCase()]) return; 913 var i = b[e]; 914 i || (i = b[e] = a.guid()); 915 var j = f[i]; 916 if (g === c) return d !== c ? j && j[d] : (j = f[i] = f[i] || {}, 917 j); 918 j = f[i] = f[i] || {}, 919 j[d] = g 920 921 }, 922 removeData: function(b, d) { 923 var g = b[e]; 924 if (!g) return; 925 var h = f[g]; 926 if (!h) return; 927 if (d !== c) delete h[d], 928 a.isEmptyObject(h) && k.removeData(b, c); 929 else { 930 delete f[g]; 931 try { 932 delete b[e] 933 934 } catch(i) {} 935 b.removeAttribute && b.removeAttribute(e) 936 937 } 938 939 } 940 941 }; 942 return a.mix(b, { 943 __EXPANDO: e, 944 hasData: function(a, c) { 945 var d = !1, 946 e = b.query(a); 947 for (var f = 0; f < e.length; f++) { 948 var g = e[f]; 949 l(g) ? d = k.hasData(g, c) : d = j.hasData(g, c); 950 if (d) return d 951 952 } 953 return d 954 955 }, 956 data: function(d, e, f) { 957 if (a.isPlainObject(e)) { 958 for (var g in e) b.data(d, g, e[g]); 959 return 960 961 } 962 if (f === c) { 963 var h = b.get(d); 964 if (l(h)) return k.data(h, e, f); 965 if (h) return j.data(h, e, f) 966 967 } else b.query(d).each(function(a) { 968 l(a) ? k.data(a, e, f) : j.data(a, e, f) 969 970 }) 971 972 }, 973 removeData: function(a, c) { 974 b.query(a).each(function(a) { 975 l(a) ? k.removeData(a, c) : j.removeData(a, c) 976 977 }) 978 979 } 980 981 }), 982 b 983 984 }, 985 { 986 requires: ["./base"] 987 988 }), 989 KISSY.add("dom/insertion", 990 function(a, b, c) { 991 function j(a) { 992 for (var b = 0; b < a.length; b++) { 993 var d = a[b]; 994 if (d.nodeType == c.DOCUMENT_FRAGMENT_NODE) j(d.childNodes); 995 else if (f(d, "input")) k(d); 996 else if (h(d)) { 997 var e = d.getElementsByTagName("input"); 998 for (var g = 0; g < e.length; g++) j(e[g]) 999 1000 } 1001 1002 } 1003 1004 } 1005 function k(a) { 1006 if (a.type === "checkbox" || a.type === "radio") a.defaultChecked = a.checked 1007 1008 } 1009 function m(a) { 1010 return ! a.type || l.test(a.type) 1011 1012 } 1013 function n(a, b) { 1014 var d = [], 1015 f, 1016 i, 1017 j; 1018 for (f = 0; a[f]; f++) { 1019 i = a[f], 1020 j = i.nodeName.toLowerCase(); 1021 if (i.nodeType == c.DOCUMENT_FRAGMENT_NODE) d.push.apply(d, n(g(i.childNodes), b)); 1022 else if (j === "script" && m(i)) i.parentNode && i.parentNode.removeChild(i), 1023 b && b.push(i); 1024 else { 1025 if (h(i) && !e.test(j)) { 1026 var k = [], 1027 l, 1028 o, 1029 p = i.getElementsByTagName("script"); 1030 for (o = 0; o < p.length; o++) l = p[o], 1031 m(l) && k.push(l); 1032 a.splice.apply(a, [f + 1, 0].concat(k)) 1033 1034 } 1035 d.push(i) 1036 1037 } 1038 1039 } 1040 return d 1041 1042 } 1043 function o(b) { 1044 if (b.src) a.getScript(b.src); 1045 else { 1046 var c = a.trim(b.text || b.textContent || b.innerHTML || ""); 1047 c && a.globalEval(c) 1048 1049 } 1050 1051 } 1052 function p(d, e, f, g) { 1053 d = c.query(d), 1054 g && (g = []), 1055 d = n(d, g), 1056 b.ie < 8 && j(d), 1057 e = c.query(e); 1058 var h = d.length, 1059 i = e.length; 1060 if (!h && (!g || !g.length) || !i) return; 1061 var k = c._nl2frag(d), 1062 l; 1063 i > 1 && (l = c.clone(k, !0)); 1064 for (var m = 0; m < i; m++) { 1065 var p = e[m]; 1066 if (h) { 1067 var q = m > 0 ? c.clone(l, !0) : k; 1068 f(q, p) 1069 1070 } 1071 g && g.length && a.each(g, o) 1072 1073 } 1074 1075 } 1076 var d = "parentNode", 1077 e = /^(?:button|input|object|select|textarea)$/i, 1078 f = c._nodeName, 1079 g = a.makeArray, 1080 h = c._isElementNode, 1081 i = "nextSibling", 1082 l = /\/(java|ecma)script/i; 1083 a.mix(c, { 1084 insertBefore: function(a, b, c) { 1085 p(a, b, 1086 function(a, b) { 1087 b[d] && b[d].insertBefore(a, b) 1088 1089 }, 1090 c) 1091 1092 }, 1093 insertAfter: function(a, b, c) { 1094 p(a, b, 1095 function(a, b) { 1096 b[d] && b[d].insertBefore(a, b[i]) 1097 1098 }, 1099 c) 1100 1101 }, 1102 appendTo: function(a, b, c) { 1103 p(a, b, 1104 function(a, b) { 1105 b.appendChild(a) 1106 1107 }, 1108 c) 1109 1110 }, 1111 prependTo: function(a, b, c) { 1112 p(a, b, 1113 function(a, b) { 1114 b.insertBefore(a, b.firstChild) 1115 1116 }, 1117 c) 1118 1119 } 1120 1121 }); 1122 var q = { 1123 prepend: "prependTo", 1124 append: "appendTo", 1125 before: "insertBefore", 1126 after: "insertAfter" 1127 1128 }; 1129 for (var r in q) c[r] = c[q[r]]; 1130 return c 1131 1132 }, 1133 { 1134 requires: ["ua", "./create"] 1135 1136 }), 1137 KISSY.add("dom/offset", 1138 function(a, b, c, d) { 1139 function F(a) { 1140 var d, 1141 e = 0, 1142 i = 0, 1143 j = f.body, 1144 l = k(a[v]); 1145 if (a[E]) { 1146 d = a[E](), 1147 e = d[z], 1148 i = d[A]; 1149 var m = g && f["documentMode"] != 9 && (n ? h.clientTop: j.clientTop) || 0, 1150 o = g && f["documentMode"] != 9 && (n ? h.clientLeft: j.clientLeft) || 0; 1151 e -= o, 1152 i -= m, 1153 c.mobile == "apple" && (e -= b[C](l), i -= b[D](l)) 1154 1155 } 1156 return { 1157 left: e, 1158 top: i 1159 1160 } 1161 1162 } 1163 function G(a) { 1164 var c = F(a), 1165 d = k(a[v]); 1166 return c.left += b[C](d), 1167 c.top += b[D](d), 1168 c 1169 1170 } 1171 function H(a, b) { 1172 var c = { 1173 left: 0, 1174 top: 0 1175 1176 }, 1177 d = k(a[v]), 1178 e = a; 1179 b = b || d; 1180 do { 1181 var f = d == b ? G(e) : F(e); 1182 c.left += f.left, 1183 c.top += f.top 1184 1185 } 1186 while (d && d != b && (e = d.frameElement) && (d = d.parent)); 1187 return c 1188 1189 } 1190 function I(a, c) { 1191 b.css(a, q) === "static" && (a.style[q] = r); 1192 var d = H(a), 1193 e = {}, 1194 f, 1195 g; 1196 for (g in c) f = p(b.css(a, g), 10) || 0, 1197 e[g] = f + c[g] - d[g]; 1198 b.css(a, e) 1199 1200 } 1201 var e = window, 1202 f = document, 1203 g = c.ie, 1204 h = f.documentElement, 1205 i = b._isElementNode, 1206 j = b._nodeTypeIs, 1207 k = b._getWin, 1208 l = "CSS1Compat", 1209 m = "compatMode", 1210 n = f[m] === l, 1211 o = Math.max, 1212 p = parseInt, 1213 q = "position", 1214 r = "relative", 1215 s = "document", 1216 t = "body", 1217 u = "documentElement", 1218 v = "ownerDocument", 1219 w = "viewport", 1220 x = "scroll", 1221 y = "client", 1222 z = "left", 1223 A = "top", 1224 B = a.isNumber, 1225 C = x + "Left", 1226 D = x + "Top", 1227 E = "getBoundingClientRect"; 1228 return a.mix(b, { 1229 offset: function(a, c, e) { 1230 if (c === d) { 1231 var f = b.get(a), 1232 g; 1233 return f && (g = H(f, e)), 1234 g 1235 1236 } 1237 b.query(a).each(function(a) { 1238 I(a, c) 1239 1240 }) 1241 1242 }, 1243 scrollIntoView: function(a, c, e, f, g) { 1244 if (! (a = b.get(a))) return; 1245 c && (c = b.get(c)), 1246 c || (c = a.ownerDocument), 1247 g !== !0 && (f = f === d ? !0: !!f, e = e === d ? !0: !!e), 1248 j(c, b.DOCUMENT_NODE) && (c = k(c)); 1249 var h = !!k(c), 1250 i = b.offset(a), 1251 l = b.outerHeight(a), 1252 m = b.outerWidth(a), 1253 n, 1254 o, 1255 q, 1256 r, 1257 s, 1258 t, 1259 u, 1260 v, 1261 w, 1262 x; 1263 h ? (u = c, x = b.height(u), w = b.width(u), v = { 1264 left: b.scrollLeft(u), 1265 top: b.scrollTop(u) 1266 1267 }, 1268 s = { 1269 left: i[z] - v[z], 1270 top: i[A] - v[A] 1271 1272 }, 1273 t = { 1274 left: i[z] + m - (v[z] + w), 1275 top: i[A] + l - (v[A] + x) 1276 1277 }, 1278 r = v) : (n = b.offset(c), o = c.clientHeight, q = c.clientWidth, r = { 1279 left: b.scrollLeft(c), 1280 top: b.scrollTop(c) 1281 1282 }, 1283 s = { 1284 left: i[z] - n[z] - (p(b.css(c, "borderLeftWidth")) || 0), 1285 top: i[A] - n[A] - (p(b.css(c, "borderTopWidth")) || 0) 1286 1287 }, 1288 t = { 1289 left: i[z] + m - (n[z] + q + (p(b.css(c, "borderRightWidth")) || 0)), 1290 top: i[A] + l - (n[A] + o + (p(b.css(c, "borderBottomWidth")) || 0)) 1291 1292 }); 1293 if (s.top < 0 || t.top > 0) e === !0 ? b.scrollTop(c, r.top + s.top) : e === !1 ? b.scrollTop(c, r.top + t.top) : s.top < 0 ? b.scrollTop(c, r.top + s.top) : b.scrollTop(c, r.top + t.top); 1294 f && (s.left < 0 || t.left > 0) && (e === !0 ? b.scrollLeft(c, r.left + s.left) : e === !1 ? b.scrollLeft(c, r.left + t.left) : s.left < 0 ? b.scrollLeft(c, r.left + s.left) : b.scrollLeft(c, r.left + t.left)) 1295 1296 }, 1297 docWidth: 0, 1298 docHeight: 0, 1299 viewportHeight: 0, 1300 viewportWidth: 0 1301 1302 }), 1303 a.each(["Left", "Top"], 1304 function(a, c) { 1305 var f = x + a; 1306 b[f] = function(g, h) { 1307 if (B(g)) return arguments.callee(e, g); 1308 g = b.get(g); 1309 var j, 1310 l = k(g), 1311 m; 1312 if (l) if (h !== d) { 1313 h = parseFloat(h); 1314 var n = a == "Left" ? h: b.scrollLeft(l), 1315 o = a == "Top" ? h: b.scrollTop(l); 1316 l.scrollTo(n, o) 1317 1318 } else j = l["page" + (c ? "Y": "X") + "Offset"], 1319 B(j) || (m = l[s], j = m[u][f], B(j) || (j = m[t][f])); 1320 else i(g) && (h !== d ? g[f] = parseFloat(h) : j = g[f]); 1321 return j 1322 1323 } 1324 1325 }), 1326 a.each(["Width", "Height"], 1327 function(a) { 1328 b["doc" + a] = function(c) { 1329 c = b.get(c); 1330 var d = k(c), 1331 e = d[s]; 1332 return o(e[u][x + a], e[t][x + a], b[w + a](e)) 1333 1334 }, 1335 b[w + a] = function(c) { 1336 c = b.get(c); 1337 var d = y + a, 1338 e = k(c), 1339 f = e[s], 1340 g = f[t], 1341 h = f[u], 1342 i = h[d]; 1343 return f[m] === l && i || g && g[d] || i 1344 1345 } 1346 1347 }), 1348 b 1349 1350 }, 1351 { 1352 requires: ["./base", "ua"] 1353 1354 }), 1355 KISSY.add("dom/style", 1356 function(a, b, c, d) { 1357 function C(a) { 1358 return a.replace(u, v) 1359 1360 } 1361 function F(a) { 1362 var d, 1363 f; 1364 if (!B[a]) { 1365 d = e.body || e.documentElement, 1366 f = e.createElement(a), 1367 b.prepend(f, d); 1368 var g = b.css(f, "display"); 1369 d.removeChild(f); 1370 if (g === "none" || g === "") { 1371 if (!D) { 1372 D = e.createElement("iframe"), 1373 D.frameBorder = D.width = D.height = 0, 1374 b.prepend(D, d); 1375 var h; 1376 if (h = b._genEmptyIframeSrc()) D.src = h 1377 1378 } else b.prepend(D, d); 1379 if (!E || !D.createElement) try { 1380 E = D.contentWindow.document, 1381 E.write((e.compatMode === "CSS1Compat" ? "<!doctype html>": "") + "<html><head>" + (c.ie && b._isCustomDomain() ? "<script>document.domain = '" + e.domain + "';</script>": "") + "</head><body>"), 1382 E.close() 1383 1384 } catch(i) { 1385 return "block" 1386 1387 } 1388 f = E.createElement(a), 1389 E.body.appendChild(f), 1390 g = b.css(f, "display"), 1391 d.removeChild(D) 1392 1393 } 1394 B[a] = g 1395 1396 } 1397 return B[a] 1398 1399 } 1400 function G(a) { 1401 return a.charAt(0).toUpperCase() + a.substring(1) 1402 1403 } 1404 function I(a, b, c) { 1405 var d = {}; 1406 for (var e in b) d[e] = a[h][e], 1407 a[h][e] = b[e]; 1408 c.call(a); 1409 for (e in b) a[h][e] = d[e] 1410 1411 } 1412 function J(b, c, e) { 1413 var f; 1414 if (b.nodeType === 3 || b.nodeType === 8 || !(f = b[h])) return d; 1415 c = C(c); 1416 var g, 1417 i = z[c]; 1418 c = A[c] || c; 1419 if (e !== d) { 1420 e === null || e === x ? e = x: !isNaN(Number(e)) && !t[c] && (e += y), 1421 i && i.set && (e = i.set(b, e)); 1422 if (e !== d) try { 1423 b[h][c] = e 1424 1425 } catch(j) { 1426 a.log("css set error :" + j) 1427 1428 } 1429 return d 1430 1431 } 1432 return i && "get" in i && (g = i.get(b, !1)) !== d || (g = f[c]), 1433 g === d ? "": g 1434 1435 } 1436 function K(c, d, e) { 1437 if (a.isWindow(c)) return d == l ? b.viewportWidth(c) : b.viewportHeight(c); 1438 if (c.nodeType == 9) return d == l ? b.docWidth(c) : b.docHeight(c); 1439 var f = d === l ? ["Left", "Right"] : ["Top", "Bottom"], 1440 g = d === l ? c.offsetWidth: c.offsetHeight; 1441 if (g > 0) return e !== "border" && a.each(f, 1442 function(a) { 1443 e || (g -= parseFloat(b.css(c, "padding" + a)) || 0), 1444 e === "margin" ? g += parseFloat(b.css(c, e + a)) || 0: g -= parseFloat(b.css(c, "border" + a + "Width")) || 0 1445 1446 }), 1447 g; 1448 g = b._getComputedStyle(c, d); 1449 if (g < 0 || a.isNullOrUndefined(g)) g = c.style[d] || 0; 1450 return g = parseFloat(g) || 0, 1451 e && a.each(f, 1452 function(a) { 1453 g += parseFloat(b.css(c, "padding" + a)) || 0, 1454 e !== "padding" && (g += parseFloat(b.css(c, "border" + a + "Width")) || 0), 1455 e === "margin" && (g += parseFloat(b.css(c, e + a)) || 0) 1456 1457 }), 1458 g 1459 1460 } 1461 var e = document, 1462 f = e.documentElement, 1463 g = c.ie, 1464 h = "style", 1465 i = "float", 1466 j = "cssFloat", 1467 k = "styleFloat", 1468 l = "width", 1469 m = "height", 1470 n = "auto", 1471 o = "display", 1472 p = o + a.now(), 1473 q = "none", 1474 r = parseInt, 1475 s = /^-?\d+(?:px)?$/i, 1476 t = { 1477 fillOpacity: 1, 1478 fontWeight: 1, 1479 lineHeight: 1, 1480 opacity: 1, 1481 orphans: 1, 1482 widows: 1, 1483 zIndex: 1, 1484 zoom: 1 1485 1486 }, 1487 u = /-([a-z])/ig, 1488 v = function(a, b) { 1489 return b.toUpperCase() 1490 1491 }, 1492 w = /([A-Z]|^ms)/g, 1493 x = "", 1494 y = "px", 1495 z = {}, 1496 A = {}, 1497 B = {}; 1498 f[h][j] !== d ? A[i] = j: f[h][k] !== d && (A[i] = k); 1499 var D, 1500 E; 1501 a.mix(b, { 1502 _camelCase: C, 1503 _cssNumber: t, 1504 _CUSTOM_STYLES: z, 1505 _cssProps: A, 1506 _getComputedStyle: function(a, c) { 1507 var d = "", 1508 e = {}, 1509 f = a.ownerDocument; 1510 c = c.replace(w, "-$1").toLowerCase(); 1511 if (e = f.defaultView.getComputedStyle(a, null)) d = e.getPropertyValue(c) || e[c]; 1512 return d == "" && !b.__contains(f.documentElement, a) && (c = A[c] || c, d = a[h][c]), 1513 d 1514 1515 }, 1516 style: function(c, e, f) { 1517 if (a.isPlainObject(e)) { 1518 for (var g in e) b.style(c, g, e[g]); 1519 return 1520 1521 } 1522 if (f === d) { 1523 var h = b.get(c), 1524 i = ""; 1525 return h && (i = J(h, e, f)), 1526 i 1527 1528 } 1529 b.query(c).each(function(a) { 1530 J(a, e, f) 1531 1532 }) 1533 1534 }, 1535 css: function(c, e, f) { 1536 if (a.isPlainObject(e)) { 1537 for (var g in e) b.css(c, g, e[g]); 1538 return 1539 1540 } 1541 e = C(e); 1542 var h = z[e]; 1543 if (f === d) { 1544 var i = b.get(c), 1545 j = ""; 1546 return i && (h && "get" in h && (j = h.get(i, !0)) !== d || (j = b._getComputedStyle(i, e))), 1547 j === d ? "": j 1548 1549 } 1550 b.style(c, e, f) 1551 1552 }, 1553 show: function(a) { 1554 b.query(a).each(function(a) { 1555 a[h][o] = b.data(a, p) || x; 1556 if (b.css(a, o) === q) { 1557 var c = a.tagName.toLowerCase(), 1558 d = F(c); 1559 b.data(a, p, d), 1560 a[h][o] = d 1561 1562 } 1563 1564 }) 1565 1566 }, 1567 hide: function(a) { 1568 b.query(a).each(function(a) { 1569 var c = a[h], 1570 d = c[o]; 1571 d !== q && (d && b.data(a, p, d), c[o] = q) 1572 1573 }) 1574 1575 }, 1576 toggle: function(a) { 1577 b.query(a).each(function(a) { 1578 b.css(a, o) === q ? b.show(a) : b.hide(a) 1579 1580 }) 1581 1582 }, 1583 addStyleSheet: function(c, d, e) { 1584 a.isString(c) && (e = d, d = c, c = window), 1585 c = b.get(c); 1586 var f = b._getWin(c), 1587 g = f.document, 1588 h; 1589 e && (e = e.replace("#", x)) && (h = b.get("#" + e, g)); 1590 if (h) return; 1591 h = b.create("<style>", { 1592 id: e 1593 1594 }, 1595 g), 1596 b.get("head", g).appendChild(h), 1597 h.styleSheet ? h.styleSheet.cssText = d: h.appendChild(g.createTextNode(d)) 1598 1599 }, 1600 unselectable: function(a) { 1601 b.query(a).each(function(a) { 1602 if (c.gecko) a[h].MozUserSelect = "none"; 1603 else if (c.webkit) a[h].KhtmlUserSelect = "none"; 1604 else if (c.ie || c.opera) { 1605 var b, 1606 d = 0, 1607 e = a.getElementsByTagName("*"); 1608 a.setAttribute("unselectable", "on"); 1609 while (b = e[d++]) switch (b.tagName.toLowerCase()) { 1610 case "iframe": 1611 case "textarea": 1612 case "input": 1613 case "select": 1614 break; 1615 default: 1616 b.setAttribute("unselectable", "on") 1617 1618 } 1619 1620 } 1621 1622 }) 1623 1624 }, 1625 innerWidth: 0, 1626 innerHeight: 0, 1627 outerWidth: 0, 1628 outerHeight: 0, 1629 width: 0, 1630 height: 0 1631 1632 }), 1633 a.each([l, m], 1634 function(a) { 1635 b["inner" + G(a)] = function(c) { 1636 var d = b.get(c); 1637 return d ? K(d, a, "padding") : null 1638 1639 }, 1640 b["outer" + G(a)] = function(c, d) { 1641 var e = b.get(c); 1642 return e ? K(e, a, d ? "margin": "border") : null 1643 1644 }, 1645 b[a] = function(c, d) { 1646 var e = b.css(c, a, d); 1647 return e && (e = parseFloat(e)), 1648 e 1649 1650 } 1651 1652 }); 1653 var H = { 1654 position: "absolute", 1655 visibility: "hidden", 1656 display: "block" 1657 1658 }; 1659 return a.each(["height", "width"], 1660 function(a) { 1661 z[a] = { 1662 get: function(b, c) { 1663 var d; 1664 if (c) return b.offsetWidth !== 0 ? d = K(b, a) : I(b, H, 1665 function() { 1666 d = K(b, a) 1667 1668 }), 1669 d + "px" 1670 1671 }, 1672 set: function(a, b) { 1673 if (!s.test(b)) return b; 1674 b = parseFloat(b); 1675 if (b >= 0) return b + "px" 1676 1677 } 1678 1679 } 1680 1681 }), 1682 a.each(["left", "top"], 1683 function(d) { 1684 z[d] = { 1685 get: function(e, f) { 1686 if (f) { 1687 var h = b._getComputedStyle(e, d), 1688 i; 1689 if (h === n) { 1690 h = 0; 1691 if (a.inArray(b.css(e, "position"), ["absolute", "fixed"])) { 1692 i = e[d === "left" ? "offsetLeft": "offsetTop"]; 1693 if (g && document["documentMode"] != 9 || c.opera) i -= e.offsetParent && e.offsetParent["client" + (d == "left" ? "Left": "Top")] || 0; 1694 h = i - (r(b.css(e, "margin-" + d)) || 0) 1695 1696 } 1697 h += "px" 1698 1699 } 1700 return h 1701 1702 } 1703 1704 } 1705 1706 } 1707 1708 }), 1709 b 1710 1711 }, 1712 { 1713 requires: ["dom/base", "ua"] 1714 1715 }), 1716 KISSY.add("dom/selector", 1717 function(a, b, c) { 1718 function r(a, b) { 1719 var e, 1720 f, 1721 g = typeof a == "string", 1722 h = b === c ? [d] : z(b); 1723 g && (a = n(a), h.length == 1 && a && (e = v(a, h[0]))); 1724 if (!e) { 1725 e = []; 1726 if (a) { 1727 for (f = 0; f < h.length; f++) k.apply(e, s(a, h[f])); 1728 e.length > 1 && (h.length > 1 || g && a.indexOf(m) > -1) && y(e) 1729 1730 } 1731 1732 } 1733 return e.each = function(a) { 1734 var b = this, 1735 c, 1736 d; 1737 for (d = 0; d < b.length; d++) { 1738 c = b[d]; 1739 if (a(c, d) === !1) break 1740 1741 } 1742 1743 }, 1744 e 1745 1746 } 1747 function s(a, b) { 1748 var c = [], 1749 d = typeof a == "string"; 1750 return d && a.match(q) || !d ? c = w(a, b) : d && a.indexOf(m) > -1 ? c = u(a, b) : c = t(a, b), 1751 c 1752 1753 } 1754 function t(a, b) { 1755 var c = [], 1756 d = f("sizzle"); 1757 return d ? d(a, b, c) : E(a), 1758 c 1759 1760 } 1761 function u(a, b) { 1762 var c = [], 1763 d, 1764 e = a.split(/\s*,\s*/); 1765 for (d = 0; d < e.length; d++) k.apply(c, s(e[d], b)); 1766 return c 1767 1768 } 1769 function v(a, b) { 1770 var c, 1771 d, 1772 e, 1773 f, 1774 g, 1775 h; 1776 return p.test(a) ? (d = A(a.slice(1), b), d ? c = [d] : c = []) : (e = q.exec(a), e && (f = e[1], g = e[2], h = e[3], b = f ? A(f, b) : b, b && (h ? !f || a.indexOf(l) != -1 ? c = [].concat(C(h, g, b)) : (d = A(f, b), d && D(d, h) && (c = [d])) : g && (c = B(g, b))), c = c || [])), 1777 c 1778 1779 } 1780 function w(a, b) { 1781 var c, 1782 d = typeof a == "string"; 1783 return d ? c = v(a, b) || [] : a && (g(a) || i(a)) ? c = e(a, 1784 function(a) { 1785 return x(a, b) 1786 1787 }) : a && x(a, b) && (c = [a]), 1788 c 1789 1790 } 1791 function x(a, c) { 1792 return a ? c == d ? !0: b.__contains(c, a) : !1 1793 1794 } 1795 function z(a) { 1796 return a === c ? [d] : r(a, c) 1797 1798 } 1799 function A(a, c) { 1800 var d = c, 1801 e; 1802 c.nodeType !== b.DOCUMENT_NODE && (d = c.ownerDocument), 1803 e = d.getElementById(a); 1804 if (!e || e.id !== a) e && e.parentNode ? b.__attr(e, "id") !== a ? e = b.filter(o, "#" + a, c)[0] || null: x(e, c) || (e = null) : e = null; 1805 return e 1806 1807 } 1808 function B(a, b) { 1809 return b && h(b.getElementsByTagName(a)) || [] 1810 1811 } 1812 function D(a, c) { 1813 return b.__hasClass(a, c) 1814 1815 } 1816 function E(b) { 1817 a.error("Unsupported selector: " + b) 1818 1819 } 1820 var d = document, 1821 e = a.filter, 1822 f = function(b) { 1823 return a.require(b) 1824 1825 }, 1826 g = a.isArray, 1827 h = a.makeArray, 1828 i = b._isNodeList, 1829 j = b._nodeName, 1830 k = Array.prototype.push, 1831 l = " ", 1832 m = ",", 1833 n = a.trim, 1834 o = "*", 1835 p = /^#[\w-]+$/, 1836 q = /^(?:#([\w-]+))?\s*([\w-]+|\*)?\.?([\w-]+)?$/, 1837 y; (function() { 1838 var a, 1839 b, 1840 c, 1841 e = !0; [0, 0].sort(function() { 1842 return e = !1, 1843 0 1844 1845 }), 1846 y = function(b) { 1847 if (a) { 1848 c = e, 1849 b.sort(a); 1850 if (c) { 1851 var d = 1, 1852 f = b.length; 1853 while (d < f) b[d] === b[d - 1] ? b.splice(d, 1) : d++ 1854 1855 } 1856 1857 } 1858 return b 1859 1860 }, 1861 d.documentElement.compareDocumentPosition ? a = b = function(a, b) { 1862 return a == b ? (c = !0, 0) : !a.compareDocumentPosition || !b.compareDocumentPosition ? a.compareDocumentPosition ? -1: 1: a.compareDocumentPosition(b) & 4 ? -1: 1 1863 1864 }: a = b = function(a, b) { 1865 if (a == b) return c = !0, 1866 0; 1867 if (a.sourceIndex && b.sourceIndex) return a.sourceIndex - b.sourceIndex 1868 1869 } 1870 1871 })(), 1872 function() { 1873 var a = d.createElement("div"); 1874 a.appendChild(d.createComment("")), 1875 a.getElementsByTagName(o).length > 0 && (B = function(a, b) { 1876 var c = h(b.getElementsByTagName(a)); 1877 if (a === o) { 1878 var d = [], 1879 e = 0, 1880 f; 1881 while (f = c[e++]) f.nodeType === 1 && d.push(f); 1882 c = d 1883 1884 } 1885 return c 1886 1887 }) 1888 1889 } (); 1890 var C = d.getElementsByClassName ? 1891 function(a, b, c) { 1892 if (!c) return []; 1893 var d = c.getElementsByClassName(a), 1894 e, 1895 f = 0, 1896 g = d.length, 1897 i; 1898 if (b && b !== o) { 1899 e = []; 1900 for (; f < g; ++f) i = d[f], 1901 j(i, b) && e.push(i) 1902 1903 } else e = h(d); 1904 return e 1905 1906 }: d.querySelectorAll ? 1907 function(a, b, c) { 1908 return c && h(c.querySelectorAll((b ? b: "") + "." + a)) || [] 1909 1910 }: function(a, b, c) { 1911 if (!c) return []; 1912 var d = c.getElementsByTagName(b || o), 1913 e = [], 1914 f = 0, 1915 g = d.length, 1916 h; 1917 for (; f < g; ++f) h = d[f], 1918 D(h, a) && e.push(h); 1919 return e 1920 1921 }; 1922 return a.mix(b, { 1923 query: r, 1924 get: function(a, b) { 1925 return r(a, b)[0] || null 1926 1927 }, 1928 unique: y, 1929 filter: function(c, d, e) { 1930 var g = r(c, e), 1931 h = f("sizzle"), 1932 i, 1933 k, 1934 l, 1935 m, 1936 o = []; 1937 return typeof d == "string" && (d = n(d)) && (i = q.exec(d)) && (l = i[1], k = i[2], m = i[3], l ? l && !k && !m && (d = function(a) { 1938 return b.__attr(a, "id") === l 1939 1940 }) : d = function(a) { 1941 var b = !0, 1942 c = !0; 1943 return k && (b = j(a, k)), 1944 m && (c = D(a, m)), 1945 c && b 1946 1947 }), 1948 a.isFunction(d) ? o = a.filter(g, d) : d && h ? o = h.matches(d, g) : E(d), 1949 o 1950 1951 }, 1952 test: function(a, c, d) { 1953 var e = r(a, d); 1954 return e.length && b.filter(e, c, d).length === e.length 1955 1956 } 1957 1958 }), 1959 b 1960 1961 }, 1962 { 1963 requires: ["./base"] 1964 1965 }), 1966 KISSY.add("dom/style-ie", 1967 function(a, b, c, d) { 1968 var e = 100; 1969 if (!c.ie) return b; 1970 var f = document, 1971 g = f.documentElement, 1972 h = "opacity", 1973 i = "style", 1974 j = "filter", 1975 k = "currentStyle", 1976 l = "runtimeStyle", 1977 m = "left", 1978 n = "px", 1979 o = d._CUSTOM_STYLES, 1980 p = /^-?\d+(?:px)?$/i, 1981 q = /^-?\d/, 1982 r = /opacity=([^)]*)/, 1983 s = /alpha\([^)]*\)/i; 1984 try { 1985 a.isNullOrUndefined(g.style[h]) && (o[h] = { 1986 get: function(a, b) { 1987 return r.test((b && a[k] ? a[k][j] : a[i][j]) || "") ? parseFloat(RegExp.$1) / e + "": b ? "1": "" 1988 1989 }, 1990 set: function(b, c) { 1991 c = parseFloat(c); 1992 var d = b[i], 1993 f = b[k], 1994 g = isNaN(c) ? "": "alpha(" + h + "=" + c * e + ")", 1995 l = a.trim(f && f[j] || d[j] || ""); 1996 d.zoom = 1; 1997 if (c >= 1 && a.trim(l.replace(s, "")) === "") { 1998 d.removeAttribute(j); 1999 if (f && !f[j]) return 2000 2001 } 2002 d.filter = s.test(l) ? l.replace(s, g) : l + (l ? ", ": "") + g 2003 2004 } 2005 2006 }) 2007 2008 } catch(t) { 2009 a.log("IE filters ActiveX is disabled. ex = " + t) 2010 2011 } 2012 var u = c["ie"] == 8, 2013 v = {}, 2014 w = ["", "Top", "Left", "Right", "Bottom"]; 2015 return v.thin = u ? "1px": "2px", 2016 v.medium = u ? "3px": "4px", 2017 v.thick = u ? "5px": "6px", 2018 a.each(w, 2019 function(a) { 2020 var b = "border" + a + "Width", 2021 c = "border" + a + "Style"; 2022 o[b] = { 2023 get: function(a, d) { 2024 var e = d ? a[k] : 0, 2025 f = e && String(e[b]) || undefined; 2026 return f && f.indexOf("px") < 0 && (v[f] && e[c] !== "none" ? f = v[f] : f = 0), 2027 f 2028 2029 } 2030 2031 } 2032 2033 }), 2034 !(f.defaultView || {}).getComputedStyle && g[k] && (b._getComputedStyle = function(a, c) { 2035 c = b._cssProps[c] || c; 2036 var d = a[k] && a[k][c]; 2037 if (!p.test(d) && q.test(d)) { 2038 var e = a[i], 2039 f = e[m], 2040 g = a[l] && a[l][m]; 2041 g && (a[l][m] = a[k][m]), 2042 e[m] = c === "fontSize" ? "1em": d || 0, 2043 d = e.pixelLeft + n, 2044 e[m] = f, 2045 g && (a[l][m] = g) 2046 2047 } 2048 return d === "" ? "auto": d 2049 2050 }), 2051 b 2052 2053 }, 2054 { 2055 requires: ["./base", "ua", "./style"] 2056 2057 }), 2058 KISSY.add("dom/traversal", 2059 function(a, b, c) { 2060 function f(e, f, h, i, j, k) { 2061 if (! (e = b.get(e))) return null; 2062 if (f === 0) return e; 2063 k || (e = e[h]); 2064 if (!e) return null; 2065 j = j && b.get(j) || null, 2066 f === c && (f = 1); 2067 var l = [], 2068 m = a.isArray(f), 2069 n, 2070 o; 2071 a.isNumber(f) && (n = 0, o = f, f = function() { 2072 return++n === o 2073 2074 }); 2075 while (e && e != j) { 2076 if (d(e) && g(e, f) && (!i || i(e))) { 2077 l.push(e); 2078 if (!m) break 2079 2080 } 2081 e = e[h] 2082 2083 } 2084 return m ? l: l[0] || null 2085 2086 } 2087 function g(c, d) { 2088 if (!d) return ! 0; 2089 if (a.isArray(d)) { 2090 for (var e = 0; e < d.length; e++) if (b.test(c, d[e])) return ! 0 2091 2092 } else if (b.test(c, d)) return ! 0; 2093 return ! 1 2094 2095 } 2096 function h(a, c, e) { 2097 var f = [], 2098 g = b.get(a), 2099 h, 2100 i = g, 2101 j; 2102 g && e && (i = g.parentNode); 2103 if (i) for (h = 0, j = i.firstChild; j; j = j.nextSibling) d(j) && j !== g && (!c || b.test(j, c)) && (f[h++] = j); 2104 return f 2105 2106 } 2107 var d = b._isElementNode, 2108 e = 16; 2109 return a.mix(b, { 2110 closest: function(a, c, d) { 2111 return f(a, c, "parentNode", 2112 function(a) { 2113 return a.nodeType != b.DOCUMENT_FRAGMENT_NODE 2114 2115 }, 2116 d, !0) 2117 2118 }, 2119 parent: function(a, c, d) { 2120 return f(a, c, "parentNode", 2121 function(a) { 2122 return a.nodeType != b.DOCUMENT_FRAGMENT_NODE 2123 2124 }, 2125 d) 2126 2127 }, 2128 first: function(a, d) { 2129 var e = b.get(a); 2130 return f(e && e.firstChild, d, "nextSibling", c, c, !0) 2131 2132 }, 2133 last: function(a, d) { 2134 var e = b.get(a); 2135 return f(e && e.lastChild, d, "previousSibling", c, c, !0) 2136 2137 }, 2138 next: function(a, b) { 2139 return f(a, b, "nextSibling", c) 2140 2141 }, 2142 prev: function(a, b) { 2143 return f(a, b, "previousSibling", c) 2144 2145 }, 2146 siblings: function(a, b) { 2147 return h(a, b, !0) 2148 2149 }, 2150 children: function(a, b) { 2151 return h(a, b, c) 2152 2153 }, 2154 __contains: document.documentElement.contains ? 2155 function(a, c) { 2156 if (a.nodeType == b.TEXT_NODE) return ! 1; 2157 var d; 2158 if (c.nodeType == b.TEXT_NODE) c = c.parentNode, 2159 d = !0; 2160 else { 2161 if (c.nodeType == b.DOCUMENT_NODE) return ! 1; 2162 d = a !== c 2163 2164 } 2165 return d && (a.contains ? a.contains(c) : !0) 2166 2167 }: document.documentElement.compareDocumentPosition ? 2168 function(a, b) { 2169 return !! (a.compareDocumentPosition(b) & e) 2170 2171 }: 0, 2172 contains: function(a, c) { 2173 a = b.get(a), 2174 c = b.get(c); 2175 if (a && c) return b.__contains(a, c) 2176 2177 }, 2178 equals: function(a, c) { 2179 a = b.query(a), 2180 c = b.query(c); 2181 if (a.length != c.length) return ! 1; 2182 for (var d = a.length; d >= 0; d--) if (a[d] != c[d]) return ! 1; 2183 return ! 0 2184 2185 } 2186 2187 }), 2188 b 2189 2190 }, 2191 { 2192 requires: ["./base"] 2193 2194 }), 2195 KISSY.add("dom", 2196 function(a, b) { 2197 return b 2198 2199 }, 2200 { 2201 requires: ["dom/attr", "dom/class", "dom/create", "dom/data", "dom/insertion", "dom/offset", "dom/style", "dom/selector", "dom/style-ie", "dom/traversal"] 2202 2203 }), 2204 KISSY.add("event/keycodes", 2205 function() { 2206 var a = { 2207 MAC_ENTER: 3, 2208 BACKSPACE: 8, 2209 TAB: 9, 2210 NUM_CENTER: 12, 2211 ENTER: 13, 2212 SHIFT: 16, 2213 CTRL: 17, 2214 ALT: 18, 2215 PAUSE: 19, 2216 CAPS_LOCK: 20, 2217 ESC: 27, 2218 SPACE: 32, 2219 PAGE_UP: 33, 2220 PAGE_DOWN: 34, 2221 END: 35, 2222 HOME: 36, 2223 LEFT: 37, 2224 UP: 38, 2225 RIGHT: 39, 2226 DOWN: 40, 2227 PRINT_SCREEN: 44, 2228 INSERT: 45, 2229 DELETE: 46, 2230 ZERO: 48, 2231 ONE: 49, 2232 TWO: 50, 2233 THREE: 51, 2234 FOUR: 52, 2235 FIVE: 53, 2236 SIX: 54, 2237 SEVEN: 55, 2238 EIGHT: 56, 2239 NINE: 57, 2240 QUESTION_MARK: 63, 2241 A: 65, 2242 B: 66, 2243 C: 67, 2244 D: 68, 2245 E: 69, 2246 F: 70, 2247 G: 71, 2248 H: 72, 2249 I: 73, 2250 J: 74, 2251 K: 75, 2252 L: 76, 2253 M: 77, 2254 N: 78, 2255 O: 79, 2256 P: 80, 2257 Q: 81, 2258 R: 82, 2259 S: 83, 2260 T: 84, 2261 U: 85, 2262 V: 86, 2263 W: 87, 2264 X: 88, 2265 Y: 89, 2266 Z: 90, 2267 META: 91, 2268 WIN_KEY_RIGHT: 92, 2269 CONTEXT_MENU: 93, 2270 NUM_ZERO: 96, 2271 NUM_ONE: 97, 2272 NUM_TWO: 98, 2273 NUM_THREE: 99, 2274 NUM_FOUR: 100, 2275 NUM_FIVE: 101, 2276 NUM_SIX: 102, 2277 NUM_SEVEN: 103, 2278 NUM_EIGHT: 104, 2279 NUM_NINE: 105, 2280 NUM_MULTIPLY: 106, 2281 NUM_PLUS: 107, 2282 NUM_MINUS: 109, 2283 NUM_PERIOD: 110, 2284 NUM_DIVISION: 111, 2285 F1: 112, 2286 F2: 113, 2287 F3: 114, 2288 F4: 115, 2289 F5: 116, 2290 F6: 117, 2291 F7: 118, 2292 F8: 119, 2293 F9: 120, 2294 F10: 121, 2295 F11: 122, 2296 F12: 123, 2297 NUMLOCK: 144, 2298 SEMICOLON: 186, 2299 DASH: 189, 2300 EQUALS: 187, 2301 COMMA: 188, 2302 PERIOD: 190, 2303 SLASH: 191, 2304 APOSTROPHE: 192, 2305 SINGLE_QUOTE: 222, 2306 OPEN_SQUARE_BRACKET: 219, 2307 BACKSLASH: 220, 2308 CLOSE_SQUARE_BRACKET: 221, 2309 WIN_KEY: 224, 2310 MAC_FF_META: 224, 2311 WIN_IME: 229 2312 2313 }; 2314 return a.isTextModifyingKeyEvent = function(b) { 2315 if (b.altKey && !b.ctrlKey || b.metaKey || b.keyCode >= a.F1 && b.keyCode <= a.F12) return ! 1; 2316 switch (b.keyCode) { 2317 case a.ALT: 2318 case a.CAPS_LOCK: 2319 case a.CONTEXT_MENU: 2320 case a.CTRL: 2321 case a.DOWN: 2322 case a.END: 2323 case a.ESC: 2324 case a.HOME: 2325 case a.INSERT: 2326 case a.LEFT: 2327 case a.MAC_FF_META: 2328 case a.META: 2329 case a.NUMLOCK: 2330 case a.NUM_CENTER: 2331 case a.PAGE_DOWN: 2332 case a.PAGE_UP: 2333 case a.PAUSE: 2334 case a.PHANTOM: 2335 case a.PRINT_SCREEN: 2336 case a.RIGHT: 2337 case a.SHIFT: 2338 case a.UP: 2339 case a.WIN_KEY: 2340 case a.WIN_KEY_RIGHT: 2341 return ! 1; 2342 default: 2343 return ! 0 2344 2345 } 2346 2347 }, 2348 a.isCharacterKey = function(b) { 2349 if (b >= a.ZERO && b <= a.NINE) return ! 0; 2350 if (b >= 2351 a.NUM_ZERO && b <= a.NUM_MULTIPLY) return ! 0; 2352 if (b >= a.A && b <= a.Z) return ! 0; 2353 if (goog.userAgent.WEBKIT && b == 0) return ! 0; 2354 switch (b) { 2355 case a.SPACE: 2356 case a.QUESTION_MARK: 2357 case a.NUM_PLUS: 2358 case a.NUM_MINUS: 2359 case a.NUM_PERIOD: 2360 case a.NUM_DIVISION: 2361 case a.SEMICOLON: 2362 case a.DASH: 2363 case a.EQUALS: 2364 case a.COMMA: 2365 case a.PERIOD: 2366 case a.SLASH: 2367 case a.APOSTROPHE: 2368 case a.SINGLE_QUOTE: 2369 case a.OPEN_SQUARE_BRACKET: 2370 case a.BACKSLASH: 2371 case a.CLOSE_SQUARE_BRACKET: 2372 return ! 0; 2373 default: 2374 return ! 1 2375 2376 } 2377 2378 }, 2379 a 2380 2381 }), 2382 KISSY.add("event/object", 2383 function(a, b) { 2384 function e(a, b, c) { 2385 var d = this; 2386 d.currentTarget = a, 2387 d.originalEvent = b || {}, 2388 b ? (d.type = b.type, d._fix()) : (d.type = c, d.target = a), 2389 d.currentTarget = a, 2390 d.fixed = !0 2391 2392 } 2393 var c = document, 2394 d = "altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode metaKey newValue offsetX offsetY originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which axis".split(" "); 2395 return a.augment(e, { 2396 _fix: function() { 2397 var a = this, 2398 e = a.originalEvent, 2399 f = d.length, 2400 g, 2401 h = a.currentTarget, 2402 i = h.nodeType === 9 ? h: h.ownerDocument || c; 2403 while (f) g = d[--f], 2404 a[g] = e[g]; 2405 a.target || (a.target = a.srcElement || c), 2406 a.target.nodeType === 3 && (a.target = a.target.parentNode), 2407 !a.relatedTarget && a.fromElement && (a.relatedTarget = a.fromElement === a.target ? a.toElement: a.fromElement); 2408 if (a.pageX === b && a.clientX !== b) { 2409 var j = i.documentElement, 2410 k = i.body; 2411 a.pageX = a.clientX + (j && j.scrollLeft || k && k.scrollLeft || 0) - (j && j.clientLeft || k && k.clientLeft || 0), 2412 a.pageY = a.clientY + (j && j.scrollTop || k && k.scrollTop || 0) - (j && j.clientTop || k && k.clientTop || 0) 2413 2414 } 2415 a.which === b && (a.which = a.charCode === b ? a.keyCode: a.charCode), 2416 a.metaKey === b && (a.metaKey = a.ctrlKey), 2417 !a.which && a.button !== b && (a.which = a.button & 1 ? 1: a.button & 2 ? 3: a.button & 4 ? 2: 0) 2418 2419 }, 2420 preventDefault: function() { 2421 var a = this.originalEvent; 2422 a.preventDefault ? a.preventDefault() : a.returnValue = !1, 2423 this.isDefaultPrevented = !0 2424 2425 }, 2426 stopPropagation: function() { 2427 var a = this.originalEvent; 2428 a.stopPropagation ? a.stopPropagation() : a.cancelBubble = !0, 2429 this.isPropagationStopped = !0 2430 2431 }, 2432 stopImmediatePropagation: function() { 2433 var a = this; 2434 a.isImmediatePropagationStopped = !0, 2435 a.stopPropagation() 2436 2437 }, 2438 halt: function(a) { 2439 a ? this.stopImmediatePropagation() : this.stopPropagation(), 2440 this.preventDefault() 2441 2442 } 2443 2444 }), 2445 e 2446 2447 }), 2448 KISSY.add("event/utils", 2449 function(a, b) { 2450 function c(b, c, d) { 2451 var e = b.scope || d, 2452 f = 1, 2453 g, 2454 h, 2455 i = c.scope || d; 2456 return b.fn !== c.fn || e !== i ? f = 0: (g = b.data) !== (h = c.data) && (!g && h || g && !h ? f = 0: g && h && (!g.equals || !h.equals ? a.error("no equals in data") : g.equals(h, d) || (f = 0))), 2457 f 2458 2459 } 2460 function d(a) { 2461 return a && a.nodeType !== b.TEXT_NODE && a.nodeType !== b.COMMENT_NODE 2462 2463 } 2464 function e(b, c, d, e) { 2465 if (e && e.indexOf(" ") > 0) { 2466 var f = a.makeArray(arguments); 2467 return a.each(e.split(/\s+/), 2468 function(a) { 2469 var e = [].concat(f); 2470 e.splice(0, 4, d, a), 2471 b[c].apply(b, e) 2472 2473 }), 2474 !0 2475 2476 } 2477 return 0 2478 2479 } 2480 function f(b, c) { 2481 a.each(b.split(/\s+/), c) 2482 2483 } 2484 var g = document, 2485 h = g.addEventListener ? 2486 function(a, b, c, d) { 2487 a.addEventListener && a.addEventListener(b, c, !!d) 2488 2489 }: function(a, b, c) { 2490 a.attachEvent && a.attachEvent("on" + b, c) 2491 2492 }, 2493 i = g.removeEventListener ? 2494 function(a, b, c, d) { 2495 a.removeEventListener && a.removeEventListener(b, c, !!d) 2496 2497 }: function(a, b, c) { 2498 a.detachEvent && a.detachEvent("on" + b, c) 2499 2500 }; 2501 return { 2502 splitAndRun: f, 2503 batchForType: e, 2504 isValidTarget: d, 2505 isIdenticalHandler: c, 2506 simpleAdd: h, 2507 simpleRemove: i 2508 2509 } 2510 2511 }, 2512 { 2513 requires: ["dom"] 2514 2515 }), 2516 KISSY.add("event/base", 2517 function(a, b, c, d, e) { 2518 function u(a, b) { 2519 var c = w(a) || {}; 2520 return c[b] || [] 2521 2522 } 2523 function v(a, b) { 2524 var c = u(a, b.type).slice(0), 2525 d, 2526 f, 2527 g = 0, 2528 h = c.length, 2529 i; 2530 for (; g < h; ++g) { 2531 i = c[g], 2532 d = i.fn.call(i.scope || a, b, i.data), 2533 d !== e && (f !== !1 && (f = d), d === !1 && b.halt()); 2534 if (b.isImmediatePropagationStopped) break 2535 2536 } 2537 return f 2538 2539 } 2540 function w(a) { 2541 var b = t._data(a); 2542 return b && b.events 2543 2544 } 2545 function x(a, b, c, d, e) { 2546 var f = r[b] || {}; ! d.length && (!f.setup || f.setup.call(a) === !1) && j(a, b, c), 2547 f.add && f.add.call(a, e) 2548 2549 } 2550 function y(b, d, g, h) { 2551 if (!f(b)) return ! 1; 2552 var i, 2553 j = !0; 2554 g instanceof c ? i = g: (i = new c(b, e, d), a.mix(i, g)), 2555 i.type = d, 2556 h && i.halt(); 2557 var k = b, 2558 m = "on" + d; 2559 do i.currentTarget = k, 2560 v(k, i), 2561 k[m] && k[m].call(k) === !1 && i.preventDefault(), 2562 k = k.parentNode || k.ownerDocument || k === b.ownerDocument && window; 2563 while (k && !i.isPropagationStopped); 2564 if (!i.isDefaultPrevented) { 2565 if (d !== "click" || !l(b, "a")) { 2566 var n; 2567 try { 2568 m && b[d] && (n = b[m], n && (b[m] = null), p = d, b[d]()) 2569 2570 } catch(o) { 2571 a.log("trigger action error : "), 2572 a.log(o) 2573 2574 } 2575 n && (b[m] = n), 2576 p = q 2577 2578 } 2579 2580 } else j = !1; 2581 return j 2582 2583 } 2584 var f = d.isValidTarget, 2585 g = d.isIdenticalHandler, 2586 h = d.batchForType, 2587 i = d.simpleRemove, 2588 j = d.simpleAdd, 2589 k = d.splitAndRun, 2590 l = b._nodeName, 2591 m = a.makeArray, 2592 n = a.each, 2593 o = a.trim, 2594 p = "", 2595 q = "trigger-none-" + a.now(), 2596 r = {}, 2597 s = "ksEventTargetId" + a.now(), 2598 t = { 2599 _clone: function(a, c) { 2600 if (c.nodeType !== b.ELEMENT_NODE || !t._hasData(a)) return; 2601 var d = t._data(a), 2602 e = d.events; 2603 n(e, 2604 function(a, b) { 2605 n(a, 2606 function(a) { 2607 t.on(c, b, a.fn, a.scope, a.data) 2608 2609 }) 2610 2611 }) 2612 2613 }, 2614 _hasData: function(a) { 2615 return b.hasData(a, s) 2616 2617 }, 2618 _data: function(a) { 2619 var c = m(arguments); 2620 return c.splice(1, 0, s), 2621 b.data.apply(b, c) 2622 2623 }, 2624 _removeData: function(a) { 2625 var c = m(arguments); 2626 return c.splice(1, 0, s), 2627 b.removeData.apply(b, c) 2628 2629 }, 2630 special: r, 2631 __add: function(b, d, e, h, i, j) { 2632 var k; 2633 if (!d || !a.isFunction(h) || b && !f(d)) return; 2634 k = t._data(d), 2635 k || t._data(d, k = {}); 2636 var l = k.events = k.events || {}, 2637 m = l[e] = l[e] || [], 2638 n = { 2639 fn: h, 2640 scope: i, 2641 data: j 2642 2643 }, 2644 o = k.handler; 2645 o || (o = k.handler = function(b, d) { 2646 if (b && b.type == p) return; 2647 var e = o.target; 2648 if (!b || !b.fixed) b = new c(e, b); 2649 var f = b.type; 2650 return a.isPlainObject(d) && a.mix(b, d), 2651 f && (b.type = f), 2652 v(e, b) 2653 2654 }, 2655 o.target = d); 2656 for (var q = m.length - 1; q >= 0; --q) if (g(m[q], n, d)) return; 2657 b && (x(d, e, o, m, n), d = null), 2658 m.push(n) 2659 2660 }, 2661 add: function(a, c, d, e, f) { 2662 return c = o(c), 2663 h(t, "add", a, c, d, e, f) ? a: (b.query(a).each(function(a) { 2664 t.__add(!0, a, c, d, e, f) 2665 2666 }), a) 2667 2668 }, 2669 __remove: function(b, c, d, h, j, k) { 2670 if (!c || b && !f(c)) return; 2671 var l = t._data(c), 2672 m = l && l.events, 2673 n, 2674 o, 2675 p, 2676 q, 2677 s, 2678 u = b && r[d] || {}; 2679 if (!m) return; 2680 if (!d) { 2681 for (d in m) t.__remove(b, c, d); 2682 return 2683 2684 } 2685 if (n = m[d]) { 2686 o = n.length; 2687 if (h && o) { 2688 var v = { 2689 data: k, 2690 fn: h, 2691 scope: j 2692 2693 }, 2694 w; 2695 for (p = 0, q = 0, s = []; p < o; ++p) w = n[p], 2696 g(w, v, c) ? u.remove && u.remove.call(c, w) : s[q++] = w; 2697 m[d] = s, 2698 o = s.length 2699 2700 } 2701 if (h === e || o === 0) b && (!u.tearDown || u.tearDown.call(c) === !1) && i(c, d, l.handler), 2702 delete m[d] 2703 2704 } 2705 a.isEmptyObject(m) && (l.handler.target = null, delete l.handler, delete l.events, t._removeData(c)) 2706 2707 }, 2708 remove: function(a, c, d, e, f) { 2709 return c = o(c), 2710 h(t, "remove", a, c, d, e) ? a: (b.query(a).each(function(a) { 2711 t.__remove(!0, a, c, d, e, f) 2712 2713 }), a) 2714 2715 }, 2716 _handle: v, 2717 fire: function(a, c, d, e) { 2718 var f = !0; 2719 return c = o(c), 2720 c.indexOf(" ") > -1 ? (k(c, 2721 function(b) { 2722 f = t.fire(a, b, d, e) && f 2723 2724 }), f) : (d = d || {}, 2725 d.type = c, b.query(a).each(function(a) { 2726 f = y(a, c, d, e) && f 2727 2728 }), f) 2729 2730 } 2731 2732 }; 2733 return t.__getListeners = u, 2734 t.on = t.add, 2735 t.detach = t.remove, 2736 t 2737 2738 }, 2739 { 2740 requires: ["dom", "./object", "./utils"] 2741 2742 }), 2743 KISSY.add("event/target", 2744 function(a, b, c, d, e) { 2745 function k(b, d, f) { 2746 if (f instanceof c) return f.currentTarget = b, 2747 f; 2748 var g = new c(b, e, d); 2749 return a.isPlainObject(f) && a.mix(g, f), 2750 g.type = d, 2751 g 2752 2753 } 2754 function l(a) { 2755 return a[f] = a[f] || {}, 2756 a[f] 2757 2758 } 2759 function m(a) { 2760 return a[i] = a[i] || {}, 2761 a[i] 2762 2763 } 2764 function n(a, b) { 2765 var c = l(a); 2766 return c[b] && c[b].bubbles || c[j] && c[j].bubbles 2767 2768 } 2769 function o(a) { 2770 return function(c, d, e) { 2771 var f = this; 2772 return c = g(c), 2773 h(c, 2774 function(c) { 2775 b["__" + a](!1, f, c, d, e) 2776 2777 }), 2778 f 2779 2780 } 2781 2782 } 2783 var f = "__~ks_publish", 2784 g = a.trim, 2785 h = d.splitAndRun, 2786 i = "__~ks_bubble_targets", 2787 j = "*", 2788 p = { 2789 fire: function(a, c) { 2790 var d = this, 2791 e, 2792 f, 2793 i; 2794 return a = g(a), 2795 a.indexOf(" ") > 0 ? (h(a, 2796 function(a) { 2797 f = d.fire(a, c), 2798 f === !1 && (e = !1) 2799 2800 }), e) : (i = k(d, a, c), e = b._handle(d, i), !i.isPropagationStopped && n(d, a) && (f = d.bubble(a, i), e !== !1 && (e = f)), e) 2801 2802 }, 2803 publish: function(a, b) { 2804 var c = this, 2805 d = l(c); 2806 a = g(a), 2807 a && (d[a] = b) 2808 2809 }, 2810 bubble: function(b, c) { 2811 var d = this, 2812 e, 2813 f = m(d); 2814 return a.each(f, 2815 function(a) { 2816 var d = a.fire(b, c); 2817 e !== !1 && (e = d) 2818 2819 }), 2820 e 2821 2822 }, 2823 addTarget: function(b) { 2824 var c = this, 2825 d = m(c); 2826 d[a.stamp(b)] = b 2827 2828 }, 2829 removeTarget: function(b) { 2830 var c = this, 2831 d = m(c); 2832 delete d[a.stamp(b)] 2833 2834 }, 2835 on: o("add") 2836 2837 }; 2838 return p.detach = o("remove"), 2839 p 2840 2841 }, 2842 { 2843 requires: ["./base", "./object", "./utils"] 2844 2845 }), 2846 KISSY.add("event/focusin", 2847 function(a, b, c) { 2848 return b.ie || a.each([{ 2849 name: "focusin", 2850 fix: "focus" 2851 2852 }, 2853 { 2854 name: "focusout", 2855 fix: "blur" 2856 2857 }], 2858 function(a) { 2859 function d(b) { 2860 var d = b.target; 2861 return c.fire(d, a.name) 2862 2863 } 2864 var b = 0; 2865 c.special[a.name] = { 2866 setup: function() { 2867 b++===0 && document.addEventListener(a.fix, d, !0) 2868 2869 }, 2870 tearDown: function() {--b === 0 && document.removeEventListener(a.fix, d, !0) 2871 2872 } 2873 2874 } 2875 2876 }), 2877 c 2878 2879 }, 2880 { 2881 requires: ["ua", "./base"] 2882 2883 }), 2884 KISSY.add("event/hashchange", 2885 function(a, b, c, d) { 2886 var e = document, 2887 f = e.documentMode, 2888 g = f || d.ie, 2889 h = "hashchange"; 2890 if (! ("on" + h in window) || g && g < 8) { 2891 function i(a) { 2892 return a.contentWindow.document 2893 2894 } 2895 var j = 50, 2896 k = window, 2897 l = "<html><head><title>" + (e.title || "") + " - {hash}</title>{head}</head><body>{hash}</body></html>", 2898 m = function() { 2899 var a = location.href; 2900 return "#" + a.replace(/^[^#]*#?(.*)$/, "$1") 2901 2902 }, 2903 n, 2904 o, 2905 p = function() { 2906 var a = m(); 2907 a !== o && (o = a, q(a)), 2908 n = setTimeout(p, j) 2909 2910 }, 2911 q = g && g < 8 ? 2912 function(b) { 2913 var d = a.substitute(l, { 2914 hash: b, 2915 head: c._isCustomDomain() ? "<script>document.domain = '" + e.domain + "';</script>": "" 2916 2917 }), 2918 f = i(u); 2919 try { 2920 f.open(), 2921 f.write(d), 2922 f.close() 2923 2924 } catch(g) {} 2925 2926 }: function() { 2927 r() 2928 2929 }, 2930 r = function() { 2931 b.fire(k, h) 2932 2933 }, 2934 s = function() { 2935 n || p() 2936 2937 }, 2938 t = function() { 2939 n && clearTimeout(n), 2940 n = 0 2941 2942 }, 2943 u; 2944 g < 8 && (s = function() { 2945 if (!u) { 2946 var d = c._genEmptyIframeSrc(); 2947 u = c.create("<iframe " + (d ? 'src="' + d + '"': "") + ' style="display: none" ' + 'height="0" ' + 'width="0" ' + 'tabindex="-1" ' + 'title="empty"/>'), 2948 c.prepend(u, e.documentElement), 2949 b.add(u, "load", 2950 function() { 2951 b.remove(u, "load"), 2952 q(m()), 2953 b.add(u, "load", f), 2954 p() 2955 2956 }), 2957 e.onpropertychange = function() { 2958 try { 2959 event.propertyName === "title" && (i(u).title = e.title + " - " + m()) 2960 2961 } catch(a) {} 2962 2963 }; 2964 function f() { 2965 var b = a.trim(i(u).body.innerText), 2966 c = m(); 2967 b != c && (a.log("set loc hash :" + b), location.hash = b, o = b), 2968 r() 2969 2970 } 2971 2972 } 2973 2974 }, 2975 t = function() { 2976 n && clearTimeout(n), 2977 n = 0, 2978 b.detach(u), 2979 c.remove(u), 2980 u = 0 2981 2982 }), 2983 b.special[h] = { 2984 setup: function() { 2985 if (this !== k) return; 2986 o = m(), 2987 s() 2988 2989 }, 2990 tearDown: function() { 2991 if (this !== k) return; 2992 t() 2993 2994 } 2995 2996 } 2997 2998 } 2999 3000 }, 3001 { 3002 requires: ["./base", "dom", "ua"] 3003 3004 }), 3005 KISSY.add("event/valuechange", 3006 function(a, b, c) { 3007 function j(a) { 3008 c.removeData(a, g); 3009 if (c.hasData(a, h)) { 3010 var b = c.data(a, h); 3011 clearTimeout(b), 3012 c.removeData(a, h) 3013 3014 } 3015 3016 } 3017 function k(a) { 3018 var b = a.target; 3019 j(b) 3020 3021 } 3022 function l(a) { 3023 if (c.hasData(a, h)) return; 3024 c.data(a, h, setTimeout(function() { 3025 var e = a.value, 3026 f = c.data(a, g); 3027 e !== f && (b.fire(a, d, { 3028 prevVal: f, 3029 newVal: e 3030 3031 }, 3032 !0), c.data(a, g, e)), 3033 c.data(a, h, setTimeout(arguments.callee, i)) 3034 3035 }, 3036 i)) 3037 3038 } 3039 function m(a) { 3040 var b = a.target; 3041 a.type == "focus" && c.data(b, g, b.value), 3042 l(b) 3043 3044 } 3045 function n(a) { 3046 o(a), 3047 b.on(a, "blur", k), 3048 b.on(a, "mousedown keyup keydown focus", m) 3049 3050 } 3051 function o(a) { 3052 j(a), 3053 b.remove(a, "blur", k), 3054 b.remove(a, "mousedown keyup keydown focus", m) 3055 3056 } 3057 var d = "valuechange", 3058 e = c._nodeName, 3059 f = "event/valuechange", 3060 g = f + "/history", 3061 h = f + "/poll", 3062 i = 50; 3063 return b.special[d] = { 3064 setup: function() { 3065 var a = this; (e(a, "input") || e(a, "textarea")) && n(a) 3066 3067 }, 3068 tearDown: function() { 3069 var a = this; 3070 o(a) 3071 3072 } 3073 3074 }, 3075 b 3076 3077 }, 3078 { 3079 requires: ["./base", "dom"] 3080 3081 }), 3082 KISSY.add("event/delegate", 3083 function(a, b, c, d) { 3084 function g(a, b) { 3085 if (a.fn === undefined && a.selector === undefined) return ! 0; 3086 if (a.fn === undefined) return this.selector == a.selector; 3087 var c = this.scope || b, 3088 d = a.scope || b; 3089 return this.fn == a.fn && this.selector == a.selector && c == d 3090 3091 } 3092 function h(a, c) { 3093 var d = this, 3094 e = a.target, 3095 f = b.closest(e, [c.selector], d); 3096 return j.call(d, f, a, c) 3097 3098 } 3099 function i(a, c) { 3100 var d = this, 3101 e, 3102 f = a.target, 3103 g = a.relatedTarget; 3104 a.type = c.preType, 3105 f = b.closest(f, c.selector, d); 3106 if (f && f !== g && (!g || !b.contains(f, g))) { 3107 var h = a.currentTarget; 3108 a.currentTarget = f, 3109 e = c.fn.call(c.scope || d, a), 3110 a.currentTarget = h 3111 3112 } 3113 return e 3114 3115 } 3116 function j(a, b, c) { 3117 var d = this; 3118 if (a) { 3119 var e = b.currentTarget; 3120 for (var f = 0; f < a.length; f++) { 3121 b.currentTarget = a[f]; 3122 var g = c.fn.call(c.scope || d, b); 3123 g === !1 && b.halt(); 3124 if (b.isPropagationStopped) break 3125 3126 } 3127 b.currentTarget = e 3128 3129 } 3130 3131 } 3132 var e = d.batchForType, 3133 f = { 3134 focus: { 3135 type: "focusin" 3136 3137 }, 3138 blur: { 3139 type: "focusout" 3140 3141 }, 3142 mouseenter: { 3143 type: "mouseover", 3144 handler: i 3145 3146 }, 3147 mouseleave: { 3148 type: "mouseout", 3149 handler: i 3150 3151 } 3152 3153 }; 3154 return a.mix(c, { 3155 delegate: function(a, d, i, j, k) { 3156 return e(c, "delegate", a, d, i, j, k) ? a: (b.query(a).each(function(a) { 3157 var b = d, 3158 e = h; 3159 f[d] && (d = f[b].type, e = f[b].handler || e), 3160 c.on(a, d, e, a, { 3161 fn: j, 3162 selector: i, 3163 preType: b, 3164 scope: k, 3165 equals: g 3166 3167 }) 3168 3169 }), a) 3170 3171 }, 3172 undelegate: function(a, d, i, j, k) { 3173 return e(c, "undelegate", a, d, i, j, k) ? a: (b.query(a).each(function(a) { 3174 var b = d, 3175 e = h; 3176 f[d] && (d = f[b].type, e = f[b].handler || e), 3177 c.remove(a, d, e, a, { 3178 fn: j, 3179 selector: i, 3180 preType: b, 3181 scope: k, 3182 equals: g 3183 3184 }) 3185 3186 }), a) 3187 3188 } 3189 3190 }), 3191 c 3192 3193 }, 3194 { 3195 requires: ["dom", "./base", "./utils"] 3196 3197 }), 3198 KISSY.add("event/mouseenter", 3199 function(a, b, c, d) { 3200 return d.ie || a.each([{ 3201 name: "mouseenter", 3202 fix: "mouseover" 3203 3204 }, 3205 { 3206 name: "mouseleave", 3207 fix: "mouseout" 3208 3209 }], 3210 function(d) { 3211 function e(e) { 3212 var f = this, 3213 g = e.relatedTarget; 3214 e.type = d.name; 3215 try { 3216 if (g && g !== document && !g.parentNode) return; 3217 g !== f && (!g || !c.contains(f, g)) && b._handle(f, e) 3218 3219 } catch(h) { 3220 a.log("withinElement error : ", "error"), 3221 a.log(h, "error") 3222 3223 } 3224 3225 } 3226 b.special[d.name] = { 3227 setup: function() { 3228 b.add(this, d.fix, e) 3229 3230 }, 3231 tearDown: function() { 3232 b.remove(this, d.fix, e) 3233 3234 } 3235 3236 } 3237 3238 }), 3239 b 3240 3241 }, 3242 { 3243 requires: ["./base", "dom", "ua"] 3244 3245 }), 3246 KISSY.add("event/submit", 3247 function(a, b, c, d) { 3248 var e = document.documentMode; 3249 if (b.ie && (b.ie < 9 || e && e < 9)) { 3250 var f = d._nodeName; 3251 c.special.submit = { 3252 setup: function() { 3253 var a = this; 3254 if (f(a, "form")) return ! 1; 3255 c.on(a, "click keypress", g) 3256 3257 }, 3258 tearDown: function() { 3259 var a = this; 3260 if (f(a, "form")) return ! 1; 3261 c.remove(a, "click keypress", g), 3262 d.query("form", a).each(function(a) { 3263 a.__submit__fix && (a.__submit__fix = 0, c.remove(a, "submit", h)) 3264 3265 }) 3266 3267 } 3268 3269 }; 3270 function g(a) { 3271 var b = a.target, 3272 d = f(b, "input") || f(b, "button") ? b.form: null; 3273 d && !d.__submit__fix && (d.__submit__fix = 1, c.on(d, "submit", h)) 3274 3275 } 3276 function h(a) { 3277 var b = this; 3278 b.parentNode && c.fire(b.parentNode, "submit", a) 3279 3280 } 3281 3282 } 3283 3284 }, 3285 { 3286 requires: ["ua", "./base", "dom"] 3287 3288 }), 3289 KISSY.add("event/change", 3290 function(a, b, c, d) { 3291 var e = document.documentMode; 3292 if (b.ie && (b.ie < 9 || e && e < 9)) { 3293 var f = /^(?:textarea|input|select)$/i; 3294 function g(a) { 3295 return f.test(a.nodeName) 3296 3297 } 3298 function h(a) { 3299 var b = a.type; 3300 return b == "checkbox" || b == "radio" 3301 3302 } 3303 c.special.change = { 3304 setup: function() { 3305 var a = this; 3306 if (g(a)) { 3307 if (!h(a)) return ! 1; 3308 c.on(a, "propertychange", i), 3309 c.on(a, "click", j) 3310 3311 } else c.on(a, "beforeactivate", k) 3312 3313 }, 3314 tearDown: function() { 3315 var a = this; 3316 if (g(a)) { 3317 if (!h(a)) return ! 1; 3318 c.remove(a, "propertychange", i), 3319 c.remove(a, "click", j) 3320 3321 } else c.remove(a, "beforeactivate", k), 3322 d.query("textarea,input,select", a).each(function(a) { 3323 a.__changeHandler && (a.__changeHandler = 0, c.remove(a, "change", l)) 3324 3325 }) 3326 3327 } 3328 3329 }; 3330 function i(a) { 3331 a.originalEvent.propertyName == "checked" && (this.__changed = 1) 3332 3333 } 3334 function j(a) { 3335 this.__changed && (this.__changed = 0, c.fire(this, "change", a)) 3336 3337 } 3338 function k(a) { 3339 var b = a.target; 3340 g(b) && !b.__changeHandler && (b.__changeHandler = 1, c.on(b, "change", l)) 3341 3342 } 3343 function l(a) { 3344 var b = this; 3345 if (h(b)) return; 3346 var d; (d = b.parentNode) && c.fire(d, "change", a) 3347 3348 } 3349 3350 } 3351 3352 }, 3353 { 3354 requires: ["ua", "./base", "dom"] 3355 3356 }), 3357 KISSY.add("event/mousewheel", 3358 function(a, b, c, d, e) { 3359 function j(c) { 3360 var d, 3361 f = this, 3362 g, 3363 h, 3364 i = c.detail; 3365 return c.wheelDelta && (h = c.wheelDelta / 120), 3366 c.detail && (h = -(i % 3 == 0 ? i / 3: i)), 3367 c.axis !== undefined && (c.axis === c.HORIZONTAL_AXIS ? (g = 0, d = -1 * h) : c.axis === c.VERTICAL_AXIS && (d = 0, g = h)), 3368 c.wheelDeltaY !== undefined && (g = c.wheelDeltaY / 120), 3369 c.wheelDeltaX !== undefined && (d = -1 * c.wheelDeltaX / 120), 3370 !d && !g && (g = h), 3371 c = new e(f, c), 3372 a.mix(c, { 3373 deltaY: g, 3374 delta: h, 3375 deltaX: d, 3376 type: "mousewheel" 3377 3378 }), 3379 b._handle(f, c) 3380 3381 } 3382 var f = c.gecko ? "DOMMouseScroll": "mousewheel", 3383 g = d.simpleRemove, 3384 h = d.simpleAdd, 3385 i = "mousewheelHandler"; 3386 b.special.mousewheel = { 3387 setup: function() { 3388 var c = this, 3389 d, 3390 e = b._data(c); 3391 d = e[d] = a.bind(j, c), 3392 h(this, f, d) 3393 3394 }, 3395 tearDown: function() { 3396 var a = this, 3397 c, 3398 d = b._data(a); 3399 c = d[c], 3400 g(this, f, c), 3401 delete d[c] 3402 3403 } 3404 3405 } 3406 3407 }, 3408 { 3409 requires: ["./base", "ua", "./utils", "./object"] 3410 3411 }), 3412 KISSY.add("event", 3413 function(a, b, c, d, e) { 3414 return c.KeyCodes = b, 3415 c.Target = d, 3416 c.Object = e, 3417 c 3418 3419 }, 3420 { 3421 requires: ["event/keycodes", "event/base", "event/target", "event/object", "event/focusin", "event/hashchange", "event/valuechange", "event/delegate", "event/mouseenter", "event/submit", "event/change", "event/mousewheel"] 3422 3423 }), 3424 KISSY.add("node/base", 3425 function(a, b, c) { 3426 function g(h, i, j) { 3427 var k = this, 3428 l; 3429 if (k instanceof g) { 3430 if (!h) return c; 3431 if (a.isString(h)) { 3432 l = b.create(h, i, j); 3433 if (l.nodeType === b.DOCUMENT_FRAGMENT_NODE) return d.push.apply(this, e(l.childNodes)), 3434 c 3435 3436 } else { 3437 if (a.isArray(h) || f(h)) return d.push.apply(this, e(h)), 3438 c; 3439 l = h 3440 3441 } 3442 return k[0] = l, 3443 k.length = 1, 3444 c 3445 3446 } 3447 return new g(h, i, j) 3448 3449 } 3450 var d = Array.prototype, 3451 e = a.makeArray, 3452 f = b._isNodeList; 3453 return a.augment(g, { 3454 length: 0, 3455 item: function(b) { 3456 var c = this; 3457 return a.isNumber(b) ? b >= c.length ? null: new g(c[b]) : new g(b) 3458 3459 }, 3460 add: function(b, e, f) { 3461 a.isNumber(e) && (f = e, e = c); 3462 var h = g.all(b, e).getDOMNodes(), 3463 i = new g(this); 3464 if (f === c) d.push.apply(i, h); 3465 else { 3466 var j = [f, 0]; 3467 j.push.apply(j, h), 3468 d.splice.apply(i, j) 3469 3470 } 3471 return i 3472 3473 }, 3474 slice: function(a, b) { 3475 return new g(d.slice.call(this, a, b)) 3476 3477 }, 3478 getDOMNodes: function() { 3479 return d.slice.call(this) 3480 3481 }, 3482 each: function(b, c) { 3483 var d = this; 3484 return a.each(d, 3485 function(a, e) { 3486 return a = new g(a), 3487 b.call(c || a, a, e, d) 3488 3489 }), 3490 d 3491 3492 }, 3493 getDOMNode: function() { 3494 return this[0] 3495 3496 }, 3497 end: function() { 3498 var a = this; 3499 return a.__parent || a 3500 3501 }, 3502 all: function(a) { 3503 var b, 3504 c = this; 3505 return c.length > 0 ? b = g.all(a, c) : b = new g, 3506 b.__parent = c, 3507 b 3508 3509 }, 3510 one: function(a) { 3511 var b = this, 3512 c = b.all(a), 3513 d = c.length ? c.slice(0, 1) : null; 3514 return d && (d.__parent = b), 3515 d 3516 3517 } 3518 3519 }), 3520 a.mix(g, { 3521 all: function(d, e) { 3522 return a.isString(d) && (d = a.trim(d)) && d.length >= 3 && a.startsWith(d, "<") && a.endsWith(d, ">") ? (e && (e.getDOMNode && (e = e.getDOMNode()), e.ownerDocument && (e = e.ownerDocument)), new g(d, c, e)) : new g(b.query(d, e)) 3523 3524 }, 3525 one: function(a, b) { 3526 var c = g.all(a, b); 3527 return c.length ? c.slice(0, 1) : null 3528 3529 } 3530 3531 }), 3532 a.mix(g, b._NODE_TYPE), 3533 g 3534 3535 }, 3536 { 3537 requires: ["dom"] 3538 3539 }), 3540 KISSY.add("node/attach", 3541 function(a, b, c, d, e) { 3542 function l(a, c, d) { 3543 d.unshift(c); 3544 var f = b[a].apply(b, d); 3545 return f === e ? c: f 3546 3547 } 3548 function m(a, c, f) { 3549 f.unshift(c); 3550 var g = b[a].apply(b, f); 3551 return g === e ? c: g === null ? null: new d(g) 3552 3553 } 3554 function n(c, d, f, g) { 3555 return g[f] === e && !a.isObject(g[0]) ? (g.unshift(d), b[c].apply(b, g)) : l(c, d, g) 3556 3557 } 3558 var f = d.prototype, 3559 g = a.makeArray, 3560 h = ["equals", "contains", "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"], 3561 i = ["filter", "first", "parent", "closest", "next", "prev", "clone", "siblings", "children"], 3562 j = { 3563 attr: 1, 3564 text: 0, 3565 css: 1, 3566 style: 1, 3567 val: 0, 3568 prop: 1, 3569 offset: 0, 3570 html: 0, 3571 data: 1 3572 3573 }, 3574 k = ["on", "detach", "fire", "delegate", "undelegate"]; 3575 a.each(h, 3576 function(a) { 3577 f[a] = function() { 3578 var b = g(arguments); 3579 return l(a, this, b) 3580 3581 } 3582 3583 }), 3584 a.each(i, 3585 function(a) { 3586 f[a] = function() { 3587 var b = g(arguments); 3588 return m(a, this, b) 3589 3590 } 3591 3592 }), 3593 a.each(j, 3594 function(a, b) { 3595 f[b] = function() { 3596 var c = g(arguments); 3597 return n(b, this, a, c) 3598 3599 } 3600 3601 }), 3602 a.each(k, 3603 function(a) { 3604 f[a] = function() { 3605 var b = this, 3606 d = g(arguments); 3607 return d.unshift(b), 3608 c[a].apply(c, d), 3609 b 3610 3611 } 3612 3613 }) 3614 3615 }, 3616 { 3617 requires: ["dom", "event", "./base"] 3618 3619 }), 3620 KISSY.add("node/override", 3621 function(a, b, c, d) { 3622 a.each(["append", "prepend", "before", "after"], 3623 function(c) { 3624 d.prototype[c] = function(d) { 3625 var e = d, 3626 f = this; 3627 return a.isString(e) && (e = b.create(e)), 3628 e && b[c](e, f), 3629 f 3630 3631 } 3632 3633 }) 3634 3635 }, 3636 { 3637 requires: ["dom", "event", "./base", "./attach"] 3638 3639 }), 3640 KISSY.add("anim/easing", 3641 function() { 3642 var a = Math.PI, 3643 b = Math.pow, 3644 c = Math.sin, 3645 d = 1.70158, 3646 e = { 3647 swing: function(b) { 3648 return - Math.cos(b * a) / 2 + .5 3649 3650 }, 3651 easeNone: function(a) { 3652 return a 3653 3654 }, 3655 easeIn: function(a) { 3656 return a * a 3657 3658 }, 3659 easeOut: function(a) { 3660 return (2 - a) * a 3661 3662 }, 3663 easeBoth: function(a) { 3664 return (a *= 2) < 1 ? .5 * a * a: .5 * (1 - --a * (a - 2)) 3665 3666 }, 3667 easeInStrong: function(a) { 3668 return a * a * a * a 3669 3670 }, 3671 easeOutStrong: function(a) { 3672 return 1 - --a * a * a * a 3673 3674 }, 3675 easeBothStrong: function(a) { 3676 return (a *= 2) < 1 ? .5 * a * a * a * a: .5 * (2 - (a -= 2) * a * a * a) 3677 3678 }, 3679 elasticIn: function(d) { 3680 var e = .3, 3681 f = e / 4; 3682 return d === 0 || d === 1 ? d: -(b(2, 10 * (d -= 1)) * c((d - f) * 2 * a / e)) 3683 3684 }, 3685 elasticOut: function(d) { 3686 var e = .3, 3687 f = e / 4; 3688 return d === 0 || d === 1 ? d: b(2, -10 * d) * c((d - f) * 2 * a / e) + 1 3689 3690 }, 3691 elasticBoth: function(d) { 3692 var e = .45, 3693 f = e / 4; 3694 return d === 0 || (d *= 2) === 2 ? d: d < 1 ? -0.5 * b(2, 10 * (d -= 1)) * c((d - f) * 2 * a / e) : b(2, -10 * (d -= 1)) * c((d - f) * 2 * a / e) * .5 + 1 3695 3696 }, 3697 backIn: function(a) { 3698 return a === 1 && (a -= .001), 3699 a * a * ((d + 1) * a - d) 3700 3701 }, 3702 backOut: function(a) { 3703 return (a -= 1) * a * ((d + 1) * a + d) + 1 3704 3705 }, 3706 backBoth: function(a) { 3707 return (a *= 2) < 1 ? .5 * a * a * (((d *= 1.525) + 1) * a - d) : .5 * ((a -= 2) * a * (((d *= 1.525) + 1) * a + d) + 2) 3708 3709 }, 3710 bounceIn: function(a) { 3711 return 1 - e.bounceOut(1 - a) 3712 3713 }, 3714 bounceOut: function(a) { 3715 var b = 7.5625, 3716 c; 3717 return a < 1 / 2.75 ? c = b * a * a: a < 2 / 2.75 ? c = b * (a -= 1.5 / 2.75) * a + .75: a < 2.5 / 2.75 ? c = b * (a -= 2.25 / 2.75) * a + .9375: c = b * (a -= 2.625 / 2.75) * a + .984375, 3718 c 3719 3720 }, 3721 bounceBoth: function(a) { 3722 return a < .5 ? e.bounceIn(a * 2) * .5: e.bounceOut(a * 2 - 1) * .5 + .5 3723 3724 } 3725 3726 }; 3727 return e.NativeTimeFunction = { 3728 easeNone: "linear", 3729 ease: "ease", 3730 easeIn: "ease-in", 3731 easeOut: "ease-out", 3732 easeBoth: "ease-in-out", 3733 easeInStrong: "cubic-bezier(0.9, 0.0, 0.9, 0.5)", 3734 easeOutStrong: "cubic-bezier(0.1, 0.5, 0.1, 1.0)", 3735 easeBothStrong: "cubic-bezier(0.9, 0.0, 0.1, 1.0)" 3736 3737 }, 3738 e 3739 3740 }), 3741 KISSY.add("anim/manager", 3742 function(a) { 3743 var b = a.stamp; 3744 return { 3745 interval: 15, 3746 runnings: {}, 3747 timer: null, 3748 start: function(a) { 3749 var c = this, 3750 d = b(a); 3751 if (c.runnings[d]) return; 3752 c.runnings[d] = a, 3753 c.startTimer() 3754 3755 }, 3756 stop: function(a) { 3757 this.notRun(a) 3758 3759 }, 3760 notRun: function(c) { 3761 var d = this, 3762 e = b(c); 3763 delete d.runnings[e], 3764 a.isEmptyObject(d.runnings) && d.stopTimer() 3765 3766 }, 3767 pause: function(a) { 3768 this.notRun(a) 3769 3770 }, 3771 resume: function(a) { 3772 this.start(a) 3773 3774 }, 3775 startTimer: function() { 3776 var a = this; 3777 a.timer || (a.timer = setTimeout(function() { 3778 a.runFrames() ? a.stopTimer() : (a.timer = 0, a.startTimer()) 3779 3780 }, 3781 a.interval)) 3782 3783 }, 3784 stopTimer: function() { 3785 var a = this, 3786 b = a.timer; 3787 b && (clearTimeout(b), a.timer = 0) 3788 3789 }, 3790 runFrames: function() { 3791 var a = this, 3792 b = 1, 3793 c = a.runnings; 3794 for (var d in c) c.hasOwnProperty(d) && (b = 0, c[d]._frame()); 3795 return b 3796 3797 } 3798 3799 } 3800 3801 }), 3802 KISSY.add("anim/fx", 3803 function(a, b, c) { 3804 function d(a) { 3805 this.load(a) 3806 3807 } 3808 function e(a, d) { 3809 return !! a.style && a.style[d] != null || b.attr(a, d, c, 1) == null ? 0: 1 3810 3811 } 3812 return a.augment(d, { 3813 load: function(b) { 3814 var c = this; 3815 a.mix(c, b), 3816 c.startTime = a.now(), 3817 c.pos = 0, 3818 c.unit = c.unit || "" 3819 3820 }, 3821 frame: function(b) { 3822 var c = this, 3823 d = 0, 3824 e, 3825 f = a.now(); 3826 return b || f >= c.duration + c.startTime ? (c.pos = 1, d = 1) : (e = f - c.startTime, c.pos = c.easing(e / c.duration)), 3827 c.update(), 3828 d 3829 3830 }, 3831 interpolate: function(b, d, e) { 3832 return a.isNumber(b) && a.isNumber(d) ? (b + (d - b) * e).toFixed(3) : c 3833 3834 }, 3835 update: function() { 3836 var d = this, 3837 f = d.prop, 3838 g = d.elem, 3839 h = d.from, 3840 i = d.to, 3841 j = d.interpolate(h, i, d.pos); 3842 j === c ? d.finished || (d.finished = 1, b.css(g, f, i), a.log(d.prop + " update directly ! : " + j + " : " + h + " : " + i)) : (j += d.unit, e(g, f) ? b.attr(g, f, j, 1) : b.css(g, f, j)) 3843 3844 }, 3845 cur: function() { 3846 var a = this, 3847 d = a.prop, 3848 f = a.elem; 3849 if (e(f, d)) return b.attr(f, d, c, 1); 3850 var g, 3851 h = b.css(f, d); 3852 return isNaN(g = parseFloat(h)) ? !h || h === "auto" ? 0: h: g 3853 3854 } 3855 3856 }), 3857 d.Factories = {}, 3858 d.getFx = function(a) { 3859 var b = d.Factories[a.prop] || d; 3860 return new b(a) 3861 3862 }, 3863 d 3864 3865 }, 3866 { 3867 requires: ["dom"] 3868 3869 }), 3870 KISSY.add("anim/queue", 3871 function(a, b) { 3872 function f(a, e, f) { 3873 e = e || d; 3874 var g, 3875 h = b.data(a, c); 3876 return ! h && !f && b.data(a, c, h = {}), 3877 h && (g = h[e], !g && !f && (g = h[e] = [])), 3878 g 3879 3880 } 3881 function g(e, f) { 3882 f = f || d; 3883 var g = b.data(e, c); 3884 g && delete g[f], 3885 a.isEmptyObject(g) && b.removeData(e, c) 3886 3887 } 3888 var c = a.guid("ks-queue-" + a.now() + "-"), 3889 d = a.guid("ks-queue-" + a.now() + "-"), 3890 e = "...", 3891 h = { 3892 queueCollectionKey: c, 3893 queue: function(a) { 3894 var b = a.elem, 3895 c = a.config.queue, 3896 d = f(b, c); 3897 return d.push(a), 3898 d[0] !== e && h.dequeue(a), 3899 d 3900 3901 }, 3902 remove: function(b) { 3903 var c = b.elem, 3904 d = b.config.queue, 3905 e = f(c, d, 1), 3906 g; 3907 e && (g = a.indexOf(b, e), g > -1 && e.splice(g, 1)) 3908 3909 }, 3910 removeQueues: function(a) { 3911 b.removeData(a, c) 3912 3913 }, 3914 removeQueue: g, 3915 dequeue: function(a) { 3916 var b = a.elem, 3917 c = a.config.queue, 3918 d = f(b, c, 1), 3919 h = d && d.shift(); 3920 h == e && (h = d.shift()), 3921 h ? (d.unshift(e), h._runInternal()) : g(b, c) 3922 3923 } 3924 3925 }; 3926 return h 3927 3928 }, 3929 { 3930 requires: ["dom"] 3931 3932 }), 3933 KISSY.add("anim/base", 3934 function(a, b, c, d, e, f, g, h) { 3935 function o(c, d, e, f, g) { 3936 var h = this, 3937 j; 3938 if (! (c = b.get(c))) return; 3939 if (! (h instanceof o)) return new o(c, d, e, f, g); 3940 a.isString(d) ? d = a.unparam(d, ";", ":") : d = a.clone(d); 3941 for (var k in d) { 3942 var l = i(a.trim(k)); 3943 k != l && (d[l] = d[k], delete d[k]) 3944 3945 } 3946 a.isPlainObject(e) ? j = a.clone(e) : j = { 3947 duration: parseFloat(e) || undefined, 3948 easing: f, 3949 complete: g 3950 3951 }, 3952 j = a.merge(m, j), 3953 h.config = j, 3954 j.duration *= 1e3, 3955 h.elem = h.domEl = c, 3956 h.props = d, 3957 h._backupProps = {}, 3958 h._fxs = {}, 3959 h.on("complete", p) 3960 3961 } 3962 function p(c) { 3963 var d = this, 3964 e = d._backupProps, 3965 f = d.config; 3966 a.isEmptyObject(e = d._backupProps) || b.css(d.elem, e), 3967 f.complete && f.complete.call(d, c) 3968 3969 } 3970 function q() { 3971 var c = this, 3972 h = c.config, 3973 i = c._backupProps, 3974 m = c.elem, 3975 o, 3976 p, 3977 q, 3978 r = h.specialEasing || {}, 3979 t = c._fxs, 3980 u = c.props; 3981 s(c); 3982 if (c.fire("start") === !1) { 3983 c.stop(0); 3984 return 3985 3986 } 3987 if (j(m)) { 3988 o = b.css(m, "display") == "none"; 3989 for (q in u) { 3990 p = u[q]; 3991 if (p == "hide" && o || p == "show" && !o) { 3992 c.stop(1); 3993 return 3994 3995 } 3996 3997 } 3998 3999 } 4000 a.each(u, 4001 function(b, c) { 4002 if (!u.hasOwnProperty(c)) return; 4003 var e; 4004 a.isArray(b) ? (e = r[c] = b[1], u[c] = b[0]) : e = r[c] = r[c] || h.easing, 4005 a.isString(e) && (e = r[c] = d[e]), 4006 r[c] = e || d.easeNone 4007 4008 }), 4009 a.each(l, 4010 function(c, d) { 4011 var e, 4012 f, 4013 g; 4014 if (g = u[d]) { 4015 f = {}, 4016 a.each(c, 4017 function(a) { 4018 f[a] = b.css(m, a), 4019 r[a] = r[d] 4020 4021 }), 4022 b.css(m, d, g); 4023 for (e in f) u[e] = b.css(m, e), 4024 b.css(m, e, f[e]); 4025 delete u[d] 4026 4027 } 4028 4029 }); 4030 for (q in u) { 4031 if (!u.hasOwnProperty(q)) continue; 4032 p = a.trim(u[q]); 4033 var v, 4034 w, 4035 x = { 4036 elem: m, 4037 prop: q, 4038 duration: h.duration, 4039 easing: r[q] 4040 4041 }, 4042 y = g.getFx(x); 4043 a.inArray(p, k) ? (i[q] = b.style(m, q), p == "toggle" && (p = o ? "show": "hide"), p == "hide" ? (v = 0, w = y.cur(), i.display = "none") : (w = 0, v = y.cur(), b.css(m, q, w), b.show(m)), p = v) : (v = p, w = y.cur()), 4044 p += ""; 4045 var z = "", 4046 A = p.match(n); 4047 A && (v = parseFloat(A[2]), z = A[3], z && z !== "px" && (b.css(m, q, p), w = v / y.cur() * w, b.css(m, q, w + z)), A[1] && (v = (A[1] === "-=" ? -1: 1) * v + w)), 4048 x.from = w, 4049 x.to = v, 4050 x.unit = z, 4051 y.load(x), 4052 t[q] = y 4053 4054 } 4055 j(m) && (u.width || u.height) && (a.mix(i, { 4056 overflow: b.style(m, "overflow"), 4057 "overflow-x": b.style(m, "overflowX"), 4058 "overflow-y": b.style(m, "overflowY") 4059 4060 }), b.css(m, "overflow", "hidden"), b.css(m, "display") === "inline" && b.css(m, "float") === "none" && (e.ie ? b.css(m, "zoom", 1) : b.css(m, "display", "inline-block"))), 4061 f.start(c) 4062 4063 } 4064 function s(c) { 4065 var d = c.elem, 4066 e = b.data(d, r); 4067 e || b.data(d, r, e = {}), 4068 e[a.stamp(c)] = c 4069 4070 } 4071 function t(c) { 4072 var d = c.elem, 4073 e = b.data(d, r); 4074 e && (delete e[a.stamp(c)], a.isEmptyObject(e) && b.removeData(d, r)) 4075 4076 } 4077 function u(c) { 4078 var d = c.elem, 4079 e = b.data(d, r); 4080 return e ? !!e[a.stamp(c)] : 0 4081 4082 } 4083 function v(c, d, e, f) { 4084 e && f !== !1 && h.removeQueue(c, f); 4085 var g = b.data(c, r), 4086 i = a.merge(g); 4087 for (var j in i) { 4088 var k = i[j]; 4089 k.config.queue == f && k.stop(d) 4090 4091 } 4092 4093 } 4094 var i = b._camelCase, 4095 j = b._isElementNode, 4096 k = ["hide", "show", "toggle"], 4097 l = { 4098 border: ["borderBottomWidth", "borderLeftWidth", "borderRightWidth", "borderTopWidth"], 4099 borderBottom: ["borderBottomWidth"], 4100 borderLeft: ["borderLeftWidth"], 4101 borderTop: ["borderTopWidth"], 4102 borderRight: ["borderRightWidth"], 4103 font: ["fontSize", "fontWeight"], 4104 margin: ["marginBottom", "marginLeft", "marginRight", "marginTop"], 4105 padding: ["paddingBottom", "paddingLeft", "paddingRight", "paddingTop"] 4106 4107 }, 4108 m = { 4109 duration: 1, 4110 easing: "easeNone" 4111 4112 }, 4113 n = /^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i; 4114 o.SHORT_HANDS = l, 4115 a.augment(o, c.Target, { 4116 isRunning: function() { 4117 return u(this) 4118 4119 }, 4120 _runInternal: q, 4121 run: function() { 4122 var a = this, 4123 b = a.config.queue; 4124 return b === !1 ? q.call(a) : h.queue(a), 4125 a 4126 4127 }, 4128 _frame: function() { 4129 var a = this, 4130 b, 4131 c = 1, 4132 d = a._fxs; 4133 for (b in d) d.hasOwnProperty(b) && (c &= d[b].frame()); (a.fire("step") === !1 || c) && a.stop(c) 4134 4135 }, 4136 stop: function(a) { 4137 var b = this, 4138 c = b.config, 4139 d = c.queue, 4140 e, 4141 g = b._fxs; 4142 if (!b.isRunning()) { 4143 d !== !1 && h.remove(b); 4144 return 4145 4146 } 4147 if (a) { 4148 for (e in g) g.hasOwnProperty(e) && g[e].frame(1); 4149 b.fire("complete") 4150 4151 } 4152 return f.stop(b), 4153 t(b), 4154 d !== !1 && h.dequeue(b), 4155 b 4156 4157 } 4158 4159 }); 4160 var r = a.guid("ks-anim-unqueued-" + a.now() + "-"); 4161 return o.stop = function(c, d, e, f) { 4162 if (f === null || a.isString(f) || f === !1) return v.apply(undefined, arguments); 4163 e && h.removeQueues(c); 4164 var g = b.data(c, r), 4165 i = a.merge(g); 4166 for (var j in i) i[j].stop(d) 4167 4168 }, 4169 o.isRunning = function(c) { 4170 var d = b.data(c, r); 4171 return d && !a.isEmptyObject(d) 4172 4173 }, 4174 o.Q = h, 4175 !l, 4176 o 4177 4178 }, 4179 { 4180 requires: ["dom", "event", "./easing", "ua", "./manager", "./fx", "./queue"] 4181 4182 }), 4183 KISSY.add("anim/color", 4184 function(a, b, c, d) { 4185 function m(b) { 4186 b += ""; 4187 var c; 4188 if (c = b.match(h)) return [parseInt(c[1]), parseInt(c[2]), parseInt(c[3])]; 4189 if (c = b.match(i)) return [parseInt(c[1]), parseInt(c[2]), parseInt(c[3]), parseInt(c[4])]; 4190 if (c = b.match(j)) { 4191 for (var d = 1; d < c.length; d++) c[d].length < 2 && (c[d] += c[d]); 4192 return [parseInt(c[1], e), parseInt(c[2], e), parseInt(c[3], e)] 4193 4194 } 4195 return g[b = b.toLowerCase()] ? g[b] : (a.log("only allow rgb or hex color string : " + b, "warn"), [255, 255, 255]) 4196 4197 } 4198 function n() { 4199 n.superclass.constructor.apply(this, arguments) 4200 4201 } 4202 var e = 16, 4203 f = Math.floor, 4204 g = { 4205 black: [0, 0, 0], 4206 silver: [192, 192, 192], 4207 gray: [128, 128, 128], 4208 white: [255, 255, 255], 4209 maroon: [128, 0, 0], 4210 red: [255, 0, 0], 4211 purple: [128, 0, 128], 4212 fuchsia: [255, 0, 255], 4213 green: [0, 128, 0], 4214 lime: [0, 255, 0], 4215 olive: [128, 128, 0], 4216 yellow: [255, 255, 0], 4217 navy: [0, 0, 128], 4218 blue: [0, 0, 255], 4219 teal: [0, 128, 128], 4220 aqua: [0, 255, 255] 4221 4222 }, 4223 h = /^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i, 4224 i = /^rgba\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+),\s*([0-9]+)\)$/i, 4225 j = /^#?([0-9A-F]{1,2})([0-9A-F]{1,2})([0-9A-F]{1,2})$/i, 4226 k = c.SHORT_HANDS, 4227 l = ["backgroundColor", "borderBottomColor", "borderLeftColor", "borderRightColor", "borderTopColor", "color", "outlineColor"]; 4228 return k.background = ["backgroundColor"], 4229 k.borderColor = ["borderBottomColor", "borderLeftColor", "borderRightColor", "borderTopColor"], 4230 k.border.push("borderBottomColor", "borderLeftColor", "borderRightColor", "borderTopColor"), 4231 k.borderBottom.push("borderBottomColor"), 4232 k.borderLeft.push("borderLeftColor"), 4233 k.borderRight.push("borderRightColor"), 4234 k.borderTop.push("borderTopColor"), 4235 a.extend(n, d, { 4236 load: function() { 4237 var a = this; 4238 n.superclass.load.apply(a, arguments), 4239 a.from && (a.from = m(a.from)), 4240 a.to && (a.to = m(a.to)) 4241 4242 }, 4243 interpolate: function(b, c, d) { 4244 var e = n.superclass.interpolate; 4245 if (b.length == 3 && c.length == 3) return "rgb(" + [f(e(b[0], c[0], d)), f(e(b[1], c[1], d)), f(e(b[2], c[2], d))].join(", ") + ")"; 4246 if (b.length == 4 || c.length == 4) return "rgba(" + [f(e(b[0], c[0], d)), f(e(b[1], c[1], d)), f(e(b[2], c[2], d)), f(e(b[3] || 1, c[3] || 1, d))].join(", ") + ")"; 4247 a.log("anim/color unknown value : " + b) 4248 4249 } 4250 4251 }), 4252 a.each(l, 4253 function(a) { 4254 d.Factories[a] = n 4255 4256 }), 4257 n 4258 4259 }, 4260 { 4261 requires: ["dom", "./base", "./fx"] 4262 4263 }), 4264 KISSY.add("anim", 4265 function(a, b, c) { 4266 return b.Easing = c, 4267 b 4268 4269 }, 4270 { 4271 requires: ["anim/base", "anim/easing", "anim/color"] 4272 4273 }), 4274 KISSY.add("node/anim", 4275 function(a, b, c, d, e) { 4276 function g(a, b, c) { 4277 var d = [], 4278 e = {}; 4279 for (var g = c || 0; g < b; g++) d.push.apply(d, f[g]); 4280 for (g = 0; g < d.length; g++) e[d[g]] = a; 4281 return e 4282 4283 } 4284 var f = [["height", "marginTop", "marginBottom", "paddingTop", "paddingBottom"], ["width", "marginLeft", "marginRight", "paddingLeft", "paddingRight"], ["opacity"]]; 4285 a.augment(d, { 4286 animate: function() { 4287 var b = this, 4288 d = a.makeArray(arguments); 4289 return a.each(b, 4290 function(a) { 4291 c.apply(e, [a].concat(d)).run() 4292 4293 }), 4294 b 4295 4296 }, 4297 stop: function(b, d, e) { 4298 var f = this; 4299 return a.each(f, 4300 function(a) { 4301 c.stop(a, b, d, e) 4302 4303 }), 4304 f 4305 4306 }, 4307 isRunning: function() { 4308 var a = this; 4309 for (var b = 0; b < a.length; b++) if (c.isRunning(a[b])) return 1; 4310 return 0 4311 4312 } 4313 4314 }), 4315 a.each({ 4316 show: g("show", 3), 4317 hide: g("hide", 3), 4318 toggle: g("toggle", 3), 4319 fadeIn: g("show", 3, 2), 4320 fadeOut: g("hide", 3, 2), 4321 fadeToggle: g("toggle", 3, 2), 4322 slideDown: g("show", 1), 4323 slideUp: g("hide", 1), 4324 slideToggle: g("toggle", 1) 4325 4326 }, 4327 function(e, f) { 4328 d.prototype[f] = function(d, g, h) { 4329 var i = this; 4330 return b[f] && !d ? b[f](i) : a.each(i, 4331 function(a) { 4332 c(a, e, d, h || "easeOut", g).run() 4333 4334 }), 4335 i 4336 4337 } 4338 4339 }) 4340 4341 }, 4342 { 4343 requires: ["dom", "anim", "./base"] 4344 4345 }), 4346 KISSY.add("node", 4347 function(a, b, c) { 4348 return c.KeyCodes = b.KeyCodes, 4349 c 4350 4351 }, 4352 { 4353 requires: ["event", "node/base", "node/attach", "node/override", "node/anim"] 4354 4355 }), 4356 KISSY.add("json/json2", 4357 function(S, UA) { 4358 function f(a) { 4359 return a < 10 ? "0" + a: a 4360 4361 } 4362 function quote(a) { 4363 return escapable.lastIndex = 0, 4364 escapable.test(a) ? '"' + a.replace(escapable, 4365 function(a) { 4366 var b = meta[a]; 4367 return typeof b == "string" ? b: "\\u" + ("0000" + a.charCodeAt(0).toString(16)).slice( - 4) 4368 4369 }) + '"': '"' + a + '"' 4370 4371 } 4372 function str(a, b) { 4373 var c, 4374 d, 4375 e, 4376 f, 4377 g = gap, 4378 h, 4379 i = b[a]; 4380 i && typeof i == "object" && typeof i.toJSON == "function" && (i = i.toJSON(a)), 4381 typeof rep == "function" && (i = rep.call(b, a, i)); 4382 switch (typeof i) { 4383 case "string": 4384 return quote(i); 4385 case "number": 4386 return isFinite(i) ? String(i) : "null"; 4387 case "boolean": 4388 case "null": 4389 return String(i); 4390 case "object": 4391 if (!i) return "null"; 4392 gap += indent, 4393 h = []; 4394 if (Object.prototype.toString.apply(i) === "[object Array]") { 4395 f = i.length; 4396 for (c = 0; c < f; c += 1) h[c] = str(c, i) || "null"; 4397 return e = h.length === 0 ? "[]": gap ? "[\n" + gap + h.join(",\n" + gap) + "\n" + g + "]": "[" + h.join(",") + "]", 4398 gap = g, 4399 e 4400 4401 } 4402 if (rep && typeof rep == "object") { 4403 f = rep.length; 4404 for (c = 0; c < f; c += 1) d = rep[c], 4405 typeof d == "string" && (e = str(d, i), e && h.push(quote(d) + (gap ? ": ": ":") + e)) 4406 4407 } else for (d in i) Object.hasOwnProperty.call(i, d) && (e = str(d, i), e && h.push(quote(d) + (gap ? ": ": ":") + e)); 4408 return e = h.length === 0 ? "{}": gap ? "{\n" + gap + h.join(",\n" + gap) + "\n" + g + "}": "{" + h.join(",") + "}", 4409 gap = g, 4410 e 4411 4412 } 4413 4414 } 4415 var win = window, 4416 JSON = win.JSON; 4417 if (!JSON || UA.ie < 9) JSON = win.JSON = {}; 4418 typeof Date.prototype.toJSON != "function" && (Date.prototype.toJSON = function(a) { 4419 return isFinite(this.valueOf()) ? this.getUTCFullYear() + "-" + f(this.getUTCMonth() + 1) + "-" + f(this.getUTCDate()) + "T" + f(this.getUTCHours()) + ":" + f(this.getUTCMinutes()) + ":" + f(this.getUTCSeconds()) + "Z": null 4420 4421 }, 4422 String.prototype.toJSON = Number.prototype.toJSON = Boolean.prototype.toJSON = function(a) { 4423 return this.valueOf() 4424 4425 }); 4426 var cx = /[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g, 4427 escapable = /[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g, 4428 gap, 4429 indent, 4430 meta = { 4431 "\b": "\\b", 4432 "\t": "\\t", 4433 "\n": "\\n", 4434 "\f": "\\f", 4435 "\r": "\\r", 4436 '"': '\\"', 4437 "\\": "\\\\" 4438 4439 }, 4440 rep; 4441 return typeof JSON.stringify != "function" && (JSON.stringify = function(a, b, c) { 4442 var d; 4443 gap = "", 4444 indent = ""; 4445 if (typeof c == "number") for (d = 0; d < c; d += 1) indent += " "; 4446 else typeof c == "string" && (indent = c); 4447 rep = b; 4448 if (!b || typeof b == "function" || typeof b == "object" && typeof b.length == "number") return str("", { 4449 "": a 4450 4451 }); 4452 throw new Error("JSON.stringify") 4453 4454 }), 4455 typeof JSON.parse != "function" && (JSON.parse = function(text, reviver) { 4456 function walk(a, b) { 4457 var c, 4458 d, 4459 e = a[b]; 4460 if (e && typeof e == "object") for (c in e) Object.hasOwnProperty.call(e, c) && (d = walk(e, c), d !== undefined ? e[c] = d: delete e[c]); 4461 return reviver.call(a, b, e) 4462 4463 } 4464 var j; 4465 text = String(text), 4466 cx.lastIndex = 0, 4467 cx.test(text) && (text = text.replace(cx, 4468 function(a) { 4469 return "\\u" + ("0000" + a.charCodeAt(0).toString(16)).slice( - 4) 4470 4471 })); 4472 if (/^[\],:{}\s]*$/.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g, "@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, "]").replace(/(?:^|:|,)(?:\s*\[)+/g, ""))) return j = eval("(" + text + ")"), 4473 typeof reviver == "function" ? walk({ 4474 "": j 4475 4476 }, 4477 "") : j; 4478 throw new SyntaxError("JSON.parse") 4479 4480 }), 4481 JSON 4482 4483 }, 4484 { 4485 requires: ["ua"] 4486 4487 }), 4488 KISSY.add("json", 4489 function(a, b) { 4490 return { 4491 parse: function(c) { 4492 return a.isNullOrUndefined(c) || c === "" ? null: b.parse(c) 4493 4494 }, 4495 stringify: b.stringify 4496 4497 } 4498 4499 }, 4500 { 4501 requires: ["json/json2"] 4502 4503 }), 4504 KISSY.add("ajax/form-serializer", 4505 function(a, b) { 4506 var c = /^(?:select|textarea)/i, 4507 d = /\r?\n/g, 4508 e = /^(?:color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i; 4509 return { 4510 serialize: function(f) { 4511 var g = [], 4512 h = {}; 4513 return b.query(f).each(function(b) { 4514 var c = b.elements ? a.makeArray(b.elements) : [b]; 4515 g.push.apply(g, c) 4516 4517 }), 4518 g = a.filter(g, 4519 function(a) { 4520 return a.name && !a.disabled && (a.checked || c.test(a.nodeName) || e.test(a.type)) 4521 4522 }), 4523 a.each(g, 4524 function(c) { 4525 var e = b.val(c), 4526 f; 4527 e = a.map(a.makeArray(e), 4528 function(a) { 4529 return a.replace(d, "\r\n") 4530 4531 }), 4532 f = h[c.name] = h[c.name] || [], 4533 f.push.apply(f, e) 4534 4535 }), 4536 a.param(h, undefined, undefined, !1) 4537 4538 } 4539 4540 } 4541 4542 }, 4543 { 4544 requires: ["dom"] 4545 4546 }), 4547 KISSY.add("ajax/xhrobject", 4548 function(a, b) { 4549 function g(b) { 4550 var c = b.responseText, 4551 d = b.responseXML, 4552 e = b.config, 4553 f = e.converters, 4554 g = b.converters || {}, 4555 h, 4556 i, 4557 j = e.contents, 4558 k = e.dataType; 4559 if (c || d) { 4560 var l = b.mimeType || b.getResponseHeader("Content-Type"); 4561 while (k[0] == "*") k.shift(); 4562 if (!k.length) for (h in j) if (j[h].test(l)) { 4563 k[0] != h && k.unshift(h); 4564 break 4565 4566 } 4567 k[0] = k[0] || "text", 4568 k[0] == "text" && c !== undefined ? i = c: k[0] == "xml" && d !== undefined ? i = d: a.each(["text", "xml"], 4569 function(a) { 4570 var b = k[0], 4571 e = g[a] && g[a][b] || f[a] && f[a][b]; 4572 if (e) return k.unshift(a), 4573 i = a == "text" ? c: d, 4574 !1 4575 4576 }) 4577 4578 } 4579 var m = k[0]; 4580 for (var n = 1; n < k.length; n++) { 4581 h = k[n]; 4582 var o = g[m] && g[m][h] || f[m] && f[m][h]; 4583 if (!o) throw "no covert for " + m + " => " + h; 4584 i = o(i), 4585 m = h 4586 4587 } 4588 b.responseData = i 4589 4590 } 4591 function h(b) { 4592 a.mix(this, { 4593 responseData: null, 4594 config: b || {}, 4595 timeoutTimer: null, 4596 responseText: null, 4597 responseXML: null, 4598 responseHeadersString: "", 4599 responseHeaders: null, 4600 requestHeaders: {}, 4601 readyState: 0, 4602 state: 0, 4603 statusText: null, 4604 status: 0, 4605 transport: null 4606 4607 }) 4608 4609 } 4610 var c = 200, 4611 d = 300, 4612 e = 304, 4613 f = /^(.*?):[ \t]*([^\r\n]*)\r?$/mg; 4614 return a.augment(h, b.Target, { 4615 setRequestHeader: function(a, b) { 4616 return this.requestHeaders[a] = b, 4617 this 4618 4619 }, 4620 getAllResponseHeaders: function() { 4621 return this.state === 2 ? this.responseHeadersString: null 4622 4623 }, 4624 getResponseHeader: function(a) { 4625 var b; 4626 if (this.state === 2) { 4627 if (!this.responseHeaders) { 4628 this.responseHeaders = {}; 4629 while (b = f.exec(this.responseHeadersString)) this.responseHeaders[b[1]] = b[2] 4630 4631 } 4632 b = this.responseHeaders[a] 4633 4634 } 4635 return b === undefined ? null: b 4636 4637 }, 4638 overrideMimeType: function(a) { 4639 return this.state || (this.mimeType = a), 4640 this 4641 4642 }, 4643 abort: function(a) { 4644 return a = a || "abort", 4645 this.transport && this.transport.abort(a), 4646 this.callback(0, a), 4647 this 4648 4649 }, 4650 callback: function(a, b) { 4651 var f = this; 4652 if (f.state == 2) return; 4653 f.state = 2, 4654 f.readyState = 4; 4655 var h; 4656 if (a >= c && a < d || a == e) if (a == e) b = "notmodified", 4657 h = !0; 4658 else try { 4659 g(f), 4660 b = "success", 4661 h = !0 4662 4663 } catch(i) { 4664 b = "parsererror : " + i 4665 4666 } else a < 0 && (a = 0); 4667 f.status = a, 4668 f.statusText = b, 4669 h ? f.fire("success") : f.fire("error"), 4670 f.fire("complete"), 4671 f.transport = undefined 4672 4673 } 4674 4675 }), 4676 h 4677 4678 }, 4679 { 4680 requires: ["event"] 4681 4682 }), 4683 KISSY.add("ajax/base", 4684 function(a, b, c, d) { 4685 function r(b) { 4686 b = a.mix(a.clone(q), b || {}, 4687 undefined, undefined, !0); 4688 if (!a.isBoolean(b.crossDomain)) { 4689 var c = g.exec(b.url.toLowerCase()); 4690 b.crossDomain = !(!c || c[1] == m[1] && c[2] == m[2] && (c[3] || (c[1] === "http:" ? i: j)) == (m[3] || (m[1] === "http:" ? i: j))) 4691 4692 } 4693 return b.processData && b.data && !a.isString(b.data) && (b.data = a.param(b.data, undefined, undefined, b.serializeArray)), 4694 b.type = b.type.toUpperCase(), 4695 b.hasContent = !k.test(b.type), 4696 b.hasContent || (b.data && (b.url += (/\?/.test(b.url) ? "&": "?") + b.data), b.cache === !1 && (b.url += (/\?/.test(b.url) ? "&": "?") + "_ksTS=" + (a.now() + "_" + a.guid()))), 4697 b.dataType = a.trim(b.dataType || "*").split(f), 4698 b.context = b.context || b, 4699 b 4700 4701 } 4702 function s(a, b) { 4703 u.fire(a, { 4704 ajaxConfig: b.config, 4705 xhr: b 4706 4707 }) 4708 4709 } 4710 function t(a) { 4711 var b = this, 4712 c = b.config, 4713 d = a.type; 4714 this.timeoutTimer && clearTimeout(this.timeoutTimer), 4715 c[d] && c[d].call(c.context, b.responseData, b.statusText, b), 4716 s(d, b) 4717 4718 } 4719 function u(b) { 4720 if (!b.url) return undefined; 4721 b = r(b); 4722 var c = new d(b); 4723 s("start", c); 4724 var e = p[b.dataType[0]] || p["*"], 4725 f = new e(c); 4726 c.transport = f, 4727 b.contentType && c.setRequestHeader("Content-Type", b.contentType); 4728 var g = b.dataType[0], 4729 h = b.accepts; 4730 c.setRequestHeader("Accept", g && h[g] ? h[g] + (g === "*" ? "": ", */*; q=0.01") : h["*"]); 4731 for (var i in b.headers) c.setRequestHeader(i, b.headers[i]); 4732 c.on("complete success error", t), 4733 c.readyState = 1, 4734 s("send", c), 4735 b.async && b.timeout > 0 && (c.timeoutTimer = setTimeout(function() { 4736 c.abort("timeout") 4737 4738 }, 4739 b.timeout * 1e3)); 4740 try { 4741 c.state = 1, 4742 f.send() 4743 4744 } catch(j) { 4745 c.status < 2 ? c.callback( - 1, j) : a.error(j) 4746 4747 } 4748 return c 4749 4750 } 4751 var e = /^(?:about|app|app\-storage|.+\-extension|file|widget):$/, 4752 f = /\s+/, 4753 g = /^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/, 4754 h = function(a) { 4755 return a 4756 4757 }, 4758 i = 80, 4759 j = 443, 4760 k = /^(?:GET|HEAD)$/, 4761 l, 4762 m; 4763 try { 4764 l = location.href 4765 4766 } catch(n) { 4767 a.log("ajax/base get curLocation error : "), 4768 a.log(n), 4769 l = document.createElement("a"), 4770 l.href = "", 4771 l = l.href 4772 4773 } 4774 m = g.exec(l); 4775 var o = e.test(m[1]), 4776 p = {}, 4777 q = { 4778 type: "GET", 4779 contentType: "application/x-www-form-urlencoded; charset=UTF-8", 4780 async: !0, 4781 serializeArray: !0, 4782 processData: !0, 4783 accepts: { 4784 xml: "application/xml, text/xml", 4785 html: "text/html", 4786 text: "text/plain", 4787 json: "application/json, text/javascript", 4788 "*": "*/*" 4789 4790 }, 4791 converters: { 4792 text: { 4793 json: b.parse, 4794 html: h, 4795 text: h, 4796 xml: a.parseXML 4797 4798 } 4799 4800 }, 4801 contents: { 4802 xml: /xml/, 4803 html: /html/, 4804 json: /json/ 4805 4806 } 4807 4808 }; 4809 return q.converters.html = q.converters.text, 4810 a.mix(u, c.Target), 4811 a.mix(u, { 4812 isLocal: o, 4813 setupConfig: function(b) { 4814 a.mix(q, b, undefined, undefined, !0) 4815 4816 }, 4817 setupTransport: function(a, b) { 4818 p[a] = b 4819 4820 }, 4821 getTransport: function(a) { 4822 return p[a] 4823 4824 }, 4825 getConfig: function() { 4826 return q 4827 4828 } 4829 4830 }), 4831 u 4832 4833 }, 4834 { 4835 requires: ["json", "event", "./xhrobject"] 4836 4837 }), 4838 KISSY.add("ajax/xhrbase", 4839 function(a, b) { 4840 function j(a, b) { 4841 try { 4842 return new(b || d).XMLHttpRequest 4843 4844 } catch(c) {} 4845 return undefined 4846 4847 } 4848 function k(b, c) { 4849 try { 4850 return new(c || d).ActiveXObject("Microsoft.XMLHTTP") 4851 4852 } catch(e) { 4853 a.log("createActiveXHR error") 4854 4855 } 4856 return undefined 4857 4858 } 4859 function l(a) { 4860 return e && a instanceof e 4861 4862 } 4863 var c = 200, 4864 d = window, 4865 e = d.XDomainRequest, 4866 f = 204, 4867 g = 404, 4868 h = 1223, 4869 i = { 4870 proto: {} 4871 4872 }; 4873 return i.xhr = d.ActiveXObject ? 4874 function(a, c) { 4875 return a && e ? new e: !b.isLocal && j(a, c) || k(a, c) 4876 4877 }: j, 4878 a.mix(i.proto, { 4879 sendInternal: function() { 4880 var b = this, 4881 c = b.xhrObj, 4882 d = c.config, 4883 e = b.xhr, 4884 f, 4885 g; 4886 d.username ? e.open(d.type, d.url, d.async, d.username, d.password) : e.open(d.type, d.url, d.async); 4887 if (f = d.xhrFields) for (g in f) e[g] = f[g]; 4888 c.mimeType && e.overrideMimeType && e.overrideMimeType(c.mimeType), 4889 !d.crossDomain && !c.requestHeaders["X-Requested-With"] && (c.requestHeaders["X-Requested-With"] = "XMLHttpRequest"); 4890 try { 4891 if (!d.crossDomain) for (g in c.requestHeaders) e.setRequestHeader(g, c.requestHeaders[g]) 4892 4893 } catch(h) { 4894 a.log("setRequestHeader in xhr error : "), 4895 a.log(h) 4896 4897 } 4898 e.send(d.hasContent && d.data || null), 4899 !d.async || e.readyState == 4 ? b._callback() : l(e) ? (e.onload = function() { 4900 e.readyState = 4, 4901 e.status = 200, 4902 b._callback() 4903 4904 }, 4905 e.onerror = function() { 4906 e.readyState = 4, 4907 e.status = 500, 4908 b._callback() 4909 4910 }) : e.onreadystatechange = function() { 4911 b._callback() 4912 4913 } 4914 4915 }, 4916 abort: function() { 4917 this._callback(0, 1) 4918 4919 }, 4920 _callback: function(d, e) { 4921 try { 4922 var i = this, 4923 j = i.xhr, 4924 k = i.xhrObj, 4925 m = k.config; 4926 if (e || j.readyState == 4) { 4927 l(j) ? (j.onerror = a.noop, j.onload = a.noop) : j.onreadystatechange = a.noop; 4928 if (e) j.readyState !== 4 && j.abort(); 4929 else { 4930 var n = j.status; 4931 l(j) || (k.responseHeadersString = j.getAllResponseHeaders()); 4932 var o = j.responseXML; 4933 o && o.documentElement && (k.responseXML = o), 4934 k.responseText = j.responseText; 4935 try { 4936 var p = j.statusText 4937 4938 } catch(q) { 4939 a.log("xhr statustext error : "), 4940 a.log(q), 4941 p = "" 4942 4943 } ! n && b.isLocal && !m.crossDomain ? n = k.responseText ? c: g: n === h && (n = f), 4944 k.callback(n, p) 4945 4946 } 4947 4948 } 4949 4950 } catch(r) { 4951 j.onreadystatechange = a.noop, 4952 e || k.callback( - 1, r) 4953 4954 } 4955 4956 } 4957 4958 }), 4959 i 4960 4961 }, 4962 { 4963 requires: ["./base"] 4964 4965 }), 4966 KISSY.add("ajax/subdomain", 4967 function(a, b, c, d) { 4968 function i(a) { 4969 var b = this, 4970 c = a.config; 4971 b.xhrObj = a; 4972 var d = c.url.match(e); 4973 b.__hostname = d[2], 4974 b.__protocol = d[1], 4975 c.crossDomain = !1 4976 4977 } 4978 function j() { 4979 var a = this, 4980 b = a.__hostname, 4981 d = h[b]; 4982 d.ready = 1, 4983 c.detach(d.iframe, "load", j, a), 4984 a.send() 4985 4986 } 4987 var e = /^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/, 4988 f = "/sub_domain_proxy.html", 4989 g = document, 4990 h = {}; 4991 return a.augment(i, b.proto, { 4992 send: function() { 4993 var e = this, 4994 i = e.xhrObj.config, 4995 k = e.__hostname, 4996 l, 4997 m = h[k], 4998 n = f; 4999 i.xdr && i.xdr.subDomain && i.xdr.subDomain.proxy && (n = i.xdr.subDomain.proxy); 5000 if (m && m.ready) { 5001 e.xhr = b.xhr(0, m.iframe.contentWindow), 5002 e.xhr ? e.sendInternal() : a.error("document.domain not set correctly!"); 5003 return 5004 5005 } 5006 m ? l = m.iframe: (m = h[k] = {}, 5007 l = m.iframe = document.createElement("iframe"), d.css(l, { 5008 position: "absolute", 5009 left: "-9999px", 5010 top: "-9999px" 5011 5012 }), d.prepend(l, g.body || g.documentElement), l.src = e.__protocol + "//" + k + n), 5013 c.on(l, "load", j, e) 5014 5015 } 5016 5017 }), 5018 i 5019 5020 }, 5021 { 5022 requires: ["./xhrbase", "event", "dom"] 5023 5024 }), 5025 KISSY.add("ajax/xdr", 5026 function(a, b, c) { 5027 function i(a, b, d) { 5028 if (h) return; 5029 h = !0; 5030 var f = '<object id="' + e + '" type="application/x-shockwave-flash" data="' + a + '" width="0" height="0">' + '<param name="movie" value="' + a + '" />' + '<param name="FlashVars" value="yid=' + b + "&uid=" + d + '&host=KISSY.io" />' + '<param name="allowScriptAccess" value="always" />' + "</object>", 5031 i = g.createElement("div"); 5032 c.prepend(i, g.body || g.documentElement), 5033 i.innerHTML = f 5034 5035 } 5036 function j(b) { 5037 a.log("use flash xdr"), 5038 this.xhrObj = b 5039 5040 } 5041 var d = {}, 5042 e = "io_swf", 5043 f, 5044 g = document, 5045 h = !1; 5046 return a.augment(j, { 5047 send: function() { 5048 var b = this, 5049 c = b.xhrObj, 5050 e = c.config, 5051 g = e.xdr || {}; 5052 i(g.src || a.Config.base + "ajax/io.swf", 1, 1); 5053 if (!f) { 5054 setTimeout(function() { 5055 b.send() 5056 5057 }, 5058 200); 5059 return 5060 5061 } 5062 b._uid = a.guid(), 5063 d[b._uid] = b, 5064 f.send(e.url, { 5065 id: b._uid, 5066 uid: b._uid, 5067 method: e.type, 5068 data: e.hasContent && e.data || {} 5069 5070 }) 5071 5072 }, 5073 abort: function() { 5074 f.abort(this._uid) 5075 5076 }, 5077 _xdrResponse: function(a, b) { 5078 var c = this, 5079 e, 5080 f = c.xhrObj; 5081 f.responseText = decodeURI(b.c.responseText); 5082 switch (a) { 5083 case "success": 5084 e = { 5085 status: 200, 5086 statusText: "success" 5087 5088 }, 5089 delete d[b.id]; 5090 break; 5091 case "abort": 5092 delete d[b.id]; 5093 break; 5094 case "timeout": 5095 case "transport error": 5096 case "failure": 5097 delete d[b.id], 5098 e = { 5099 status: 500, 5100 statusText: a 5101 5102 } 5103 5104 } 5105 e && f.callback(e.status, e.statusText) 5106 5107 } 5108 5109 }), 5110 b.applyTo = function(b, c, d) { 5111 var e = c.split("."), 5112 f = a; 5113 a.each(e, 5114 function(a) { 5115 f = f[a] 5116 5117 }), 5118 f.apply(null, d) 5119 5120 }, 5121 b.xdrReady = function() { 5122 f = g.getElementById(e) 5123 5124 }, 5125 b.xdrResponse = function(a, b, c) { 5126 var e = d[b.uid]; 5127 e && e._xdrResponse(a, b, c) 5128 5129 }, 5130 a.io = b, 5131 j 5132 5133 }, 5134 { 5135 requires: ["./base", "dom"] 5136 5137 }), 5138 KISSY.add("ajax/xhr", 5139 function(a, b, c, d, e) { 5140 var f = /^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/, 5141 g = window.XDomainRequest, 5142 h = c.xhr(); 5143 if (h) { 5144 function i(a) { 5145 var b = a.split("."); 5146 return b.length < 2 ? b.join(".") : b.reverse().slice(0, 2).reverse().join(".") 5147 5148 } 5149 function j(a) { 5150 var b = a.config, 5151 c = b.xdr || {}; 5152 if (b.crossDomain) { 5153 var j = b.url.match(f); 5154 if (i(location.hostname) == i(j[2])) return new d(a); 5155 if (! ("withCredentials" in h) && (String(c.use) === "flash" || !g)) return new e(a) 5156 5157 } 5158 return this.xhrObj = a, 5159 undefined 5160 5161 } 5162 a.augment(j, c.proto, { 5163 send: function() { 5164 var a = this, 5165 b = a.xhrObj, 5166 d = b.config; 5167 a.xhr = c.xhr(d.crossDomain), 5168 a.sendInternal() 5169 5170 } 5171 5172 }), 5173 b.setupTransport("*", j) 5174 5175 } 5176 return b 5177 5178 }, 5179 { 5180 requires: ["./base", "./xhrbase", "./subdomain", "./xdr"] 5181 5182 }), 5183 KISSY.add("ajax/script", 5184 function(a, b) { 5185 function f(a) { 5186 return ! a.config.crossDomain && !a.config.forceScript ? new(b.getTransport("*"))(a) : (this.xhrObj = a, 0) 5187 5188 } 5189 var c = document, 5190 d = 200, 5191 e = 500; 5192 return b.setupConfig({ 5193 accepts: { 5194 script: "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript" 5195 5196 }, 5197 contents: { 5198 script: /javascript|ecmascript/ 5199 5200 }, 5201 converters: { 5202 text: { 5203 script: function(b) { 5204 return a.globalEval(b), 5205 b 5206 5207 } 5208 5209 } 5210 5211 } 5212 5213 }), 5214 a.augment(f, { 5215 send: function() { 5216 var a = this, 5217 b, 5218 d = this.xhrObj, 5219 e = d.config, 5220 f = c.head || c.getElementsByTagName("head")[0] || c.documentElement; 5221 a.head = f, 5222 b = c.createElement("script"), 5223 a.script = b, 5224 b.async = "async", 5225 e.scriptCharset && (b.charset = e.scriptCharset), 5226 b.src = e.url, 5227 b.onerror = b.onload = b.onreadystatechange = function(b) { 5228 b = b || window.event, 5229 a._callback((b.type || "error").toLowerCase()) 5230 5231 }, 5232 f.insertBefore(b, f.firstChild) 5233 5234 }, 5235 _callback: function(a, b) { 5236 var c = this.script, 5237 f = this.xhrObj, 5238 g = this.head; 5239 if (!c) return; 5240 if (b || !c.readyState || /loaded|complete/.test(c.readyState) || a == "error") c.onerror = c.onload = c.onreadystatechange = null, 5241 g && c.parentNode && g.removeChild(c), 5242 this.script = undefined, 5243 this.head = undefined, 5244 !b && a != "error" ? f.callback(d, "success") : a == "error" && f.callback(e, "scripterror") 5245 5246 }, 5247 abort: function() { 5248 this._callback(0, 1) 5249 5250 } 5251 5252 }), 5253 b.setupTransport("script", f), 5254 b 5255 5256 }, 5257 { 5258 requires: ["./base", "./xhr"] 5259 5260 }), 5261 KISSY.add("ajax/jsonp", 5262 function(a, b) { 5263 return b.setupConfig({ 5264 jsonp: "callback", 5265 jsonpCallback: function() { 5266 return a.guid("jsonp") 5267 5268 } 5269 5270 }), 5271 b.on("start", 5272 function(b) { 5273 var c = b.xhr, 5274 d = c.config; 5275 if (d.dataType[0] == "jsonp") { 5276 var e, 5277 f = d.jsonpCallback, 5278 g = a.isFunction(f) ? f() : f, 5279 h = window[g]; 5280 d.url += (/\?/.test(d.url) ? "&": "?") + d.jsonp + "=" + g, 5281 window[g] = function(b) { 5282 arguments.length > 1 && (b = a.makeArray(arguments)), 5283 e = [b] 5284 5285 }, 5286 c.on("complete", 5287 function() { 5288 window[g] = h; 5289 if (h === undefined) try { 5290 delete window[g] 5291 5292 } catch(a) {} else e && h(e[0]) 5293 5294 }), 5295 c.converters = c.converters || {}, 5296 c.converters.script = c.converters.script || {}, 5297 c.converters.script.json = function() { 5298 return e || a.error(" not call jsonpCallback : " + g), 5299 e[0] 5300 5301 }, 5302 d.dataType.length = 2, 5303 d.dataType[0] = "script", 5304 d.dataType[1] = "json" 5305 5306 } 5307 5308 }), 5309 b 5310 5311 }, 5312 { 5313 requires: ["./base"] 5314 5315 }), 5316 KISSY.add("ajax/form", 5317 function(a, b, c, d) { 5318 return b.on("start", 5319 function(a) { 5320 var b = a.xhr, 5321 e = b.config; 5322 if (e.form) { 5323 var f = c.get(e.form), 5324 g = f.encoding || f.enctype; 5325 if (g.toLowerCase() != "multipart/form-data") { 5326 var h = d.serialize(f); 5327 h && (e.hasContent ? (e.data = e.data || "", e.data && (e.data += "&"), e.data += h) : e.url += (/\?/.test(e.url) ? "&": "?") + h) 5328 5329 } else { 5330 var i = e.dataType[0]; 5331 i == "*" && (i = "text"), 5332 e.dataType.length = 2, 5333 e.dataType[0] = "iframe", 5334 e.dataType[1] = i 5335 5336 } 5337 5338 } 5339 5340 }), 5341 b 5342 5343 }, 5344 { 5345 requires: ["./base", "dom", "./form-serializer"] 5346 5347 }), 5348 KISSY.add("ajax/iframe-upload", 5349 function(a, b, c, d) { 5350 function i(c) { 5351 var d = a.guid("ajax-iframe"); 5352 c.iframe = b.create("<iframe id='" + d + "'" + " name='" + d + "'" + " style='position:absolute;left:-9999px;top:-9999px;'/>"), 5353 c.iframeId = d, 5354 b.prepend(c.iframe, e.body || e.documentElement) 5355 5356 } 5357 function j(c, d, f) { 5358 c = a.unparam(c); 5359 var g = []; 5360 for (var h in c) { 5361 var i = a.isArray(c[h]), 5362 j = a.makeArray(c[h]); 5363 for (var k = 0; k < j.length; k++) { 5364 var l = e.createElement("input"); 5365 l.type = "hidden", 5366 l.name = h + (i && f ? "[]": ""), 5367 l.value = j[k], 5368 b.append(l, d), 5369 g.push(l) 5370 5371 } 5372 5373 } 5374 return g 5375 5376 } 5377 function k(a) { 5378 b.remove(a) 5379 5380 } 5381 function l(a) { 5382 this.xhr = a 5383 5384 } 5385 var e = document, 5386 f = 200, 5387 g = 500, 5388 h = 30; 5389 return d.setupConfig({ 5390 converters: { 5391 iframe: d.getConfig().converters.text, 5392 text: { 5393 iframe: function(a) { 5394 return a 5395 5396 } 5397 5398 } 5399 5400 } 5401 5402 }), 5403 a.augment(l, { 5404 send: function() { 5405 var a = this.xhr, 5406 d = a.config, 5407 e, 5408 f = b.get(d.form); 5409 this.attrs = { 5410 target: b.attr(f, "target") || "", 5411 action: b.attr(f, "action") || "" 5412 5413 }, 5414 this.form = f, 5415 i(a), 5416 b.attr(f, { 5417 target: a.iframeId, 5418 action: d.url 5419 5420 }), 5421 d.data && (e = j(d.data, f, d.serializeArray)), 5422 this.fields = e; 5423 var g = a.iframe; 5424 c.on(g, "load error", this._callback, this), 5425 f.submit() 5426 5427 }, 5428 _callback: function(a) { 5429 var d = this.form, 5430 e = this.xhr, 5431 i = a.type, 5432 j = e.iframe; 5433 if (!j) return; 5434 b.attr(d, this.attrs); 5435 if (i == "load") { 5436 var l = j.contentWindow.document; 5437 e.responseXML = l, 5438 e.responseText = b.text(l.body), 5439 e.callback(f, "success") 5440 5441 } else i == "error" && e.callback(g, "error"); 5442 k(this.fields), 5443 c.detach(j), 5444 setTimeout(function() { 5445 b.remove(j) 5446 5447 }, 5448 h), 5449 e.iframe = null 5450 5451 }, 5452 abort: function() { 5453 this._callback(0, 1) 5454 5455 } 5456 5457 }), 5458 d.setupTransport("iframe", l), 5459 d 5460 5461 }, 5462 { 5463 requires: ["dom", "event", "./base"] 5464 5465 }), 5466 KISSY.add("ajax", 5467 function(a, b, c) { 5468 var d = undefined; 5469 return a.mix(c, { 5470 serialize: b.serialize, 5471 get: function(b, e, f, g, h) { 5472 return a.isFunction(e) && (g = f, f = e, e = d), 5473 c({ 5474 type: h || "get", 5475 url: b, 5476 data: e, 5477 success: f, 5478 dataType: g 5479 5480 }) 5481 5482 }, 5483 post: function(b, e, f, g) { 5484 return a.isFunction(e) && (g = f, f = e, e = d), 5485 c.get(b, e, f, g, "post") 5486 5487 }, 5488 jsonp: function(b, e, f) { 5489 return a.isFunction(e) && (f = e, e = d), 5490 c.get(b, e, f, "jsonp") 5491 5492 }, 5493 getScript: a.getScript, 5494 getJSON: function(b, e, f) { 5495 return a.isFunction(e) && (f = e, e = d), 5496 c.get(b, e, f, "json") 5497 5498 }, 5499 upload: function(b, e, f, g, h) { 5500 return a.isFunction(f) && (h = g, g = f, f = d), 5501 c({ 5502 url: b, 5503 type: "post", 5504 dataType: h, 5505 form: e, 5506 data: f, 5507 success: g 5508 5509 }) 5510 5511 } 5512 5513 }), 5514 c 5515 5516 }, 5517 { 5518 requires: ["ajax/form-serializer", "ajax/base", "ajax/xhrobject", "ajax/xhr", "ajax/script", "ajax/jsonp", "ajax/form", "ajax/iframe-upload"] 5519 5520 }), 5521 KISSY.add("base/attribute", 5522 function(a, b) { 5523 function d(b, c) { 5524 return a.isString(c) ? b[c] : c 5525 5526 } 5527 function e(a, b, c, d, e, f, g) { 5528 return g = g || c, 5529 a.fire(b + m(c) + "Change", { 5530 attrName: g, 5531 subAttrName: f, 5532 prevVal: d, 5533 newVal: e 5534 5535 }) 5536 5537 } 5538 function f(a, b, c) { 5539 var d = a[b] || {}; 5540 return c && (a[b] = d), 5541 d 5542 5543 } 5544 function g(a) { 5545 return f(a, "__attrs", !0) 5546 5547 } 5548 function h(a) { 5549 return f(a, "__attrVals", !0) 5550 5551 } 5552 function i(a, c) { 5553 for (var d = 0, e = c.length; a != b && d < e; d++) a = a[c[d]]; 5554 return a 5555 5556 } 5557 function j(a, c, d) { 5558 var e = c.length - 1, 5559 f = a; 5560 if (e >= 0) { 5561 for (var g = 0; g < e; g++) a = a[c[g]]; 5562 a != b ? a[c[g]] = d: f = b 5563 5564 } 5565 return f 5566 5567 } 5568 function k(b, c, d, f, g) { 5569 var k; 5570 f = f || {}; 5571 var l = ".", 5572 m, 5573 n, 5574 o, 5575 p = c; 5576 c.indexOf(l) !== -1 && (m = c.split(l), c = m.shift()), 5577 o = b.get(c), 5578 m && (n = i(o, m)); 5579 if (!m && o === d) return undefined; 5580 if (m && n === d) return undefined; 5581 if (m) { 5582 var q = a.clone(o); 5583 j(q, m, d), 5584 d = q 5585 5586 } 5587 return ! f.silent && !1 === e(b, "before", c, o, d, p) ? !1: (k = b.__set(c, d), k === !1 ? k: (f.silent || (d = h(b)[c], e(b, "after", c, o, d, p), g ? g.push({ 5588 prevVal: o, 5589 newVal: d, 5590 attrName: c, 5591 subAttrName: p 5592 5593 }) : e(b, "", "*", [o], [d], [p], [c])), b)) 5594 5595 } 5596 function l() {} 5597 function m(a) { 5598 return a.charAt(0).toUpperCase() + a.substring(1) 5599 5600 } 5601 l.INVALID = {}; 5602 var c = l.INVALID; 5603 return a.augment(l, { 5604 getAttrs: function() { 5605 return g(this) 5606 5607 }, 5608 getAttrVals: function() { 5609 var a = this, 5610 b = {}, 5611 c, 5612 d = g(a); 5613 for (c in d) b[c] = a.get(c); 5614 return b 5615 5616 }, 5617 addAttr: function(b, c, d) { 5618 var e = this, 5619 f = g(e), 5620 h = a.clone(c); 5621 return f[b] ? a.mix(f[b], h, d) : f[b] = h, 5622 e 5623 5624 }, 5625 addAttrs: function(b, c) { 5626 var d = this; 5627 return a.each(b, 5628 function(a, b) { 5629 d.addAttr(b, a) 5630 5631 }), 5632 c && d.set(c), 5633 d 5634 5635 }, 5636 hasAttr: function(a) { 5637 return a && g(this).hasOwnProperty(a) 5638 5639 }, 5640 removeAttr: function(a) { 5641 var b = this; 5642 return b.hasAttr(a) && (delete g(b)[a], delete h(b)[a]), 5643 b 5644 5645 }, 5646 set: function(b, c, d) { 5647 var f, 5648 g = this; 5649 if (a.isPlainObject(b)) { 5650 var h = b; 5651 b = 0, 5652 f = !0, 5653 d = c; 5654 var i = []; 5655 for (b in h) { 5656 f = k(g, b, h[b], d, i); 5657 if (f === !1) break 5658 5659 } 5660 var j = [], 5661 l = [], 5662 m = [], 5663 n = []; 5664 return a.each(i, 5665 function(a) { 5666 l.push(a.prevVal), 5667 m.push(a.newVal), 5668 j.push(a.attrName), 5669 n.push(a.subAttrName) 5670 5671 }), 5672 j.length && e(g, "", "*", l, m, n, j), 5673 f 5674 5675 } 5676 return k(g, b, c, d) 5677 5678 }, 5679 __set: function(a, e) { 5680 var i = this, 5681 j, 5682 k = f(g(i), a, !0), 5683 l = k.validator, 5684 m = k.setter; 5685 if (l = d(i, l)) if (l.call(i, e, a) === !1) return ! 1; 5686 if (m = d(i, m)) j = m.call(i, e, a); 5687 if (j === c) return ! 1; 5688 j !== b && (e = j), 5689 h(i)[a] = e 5690 5691 }, 5692 get: function(a) { 5693 var b = this, 5694 c = ".", 5695 e, 5696 j, 5697 k, 5698 l; 5699 a.indexOf(c) !== -1 && (e = a.split(c), a = e.shift()), 5700 j = f(g(b), a), 5701 k = j.getter, 5702 l = a in h(b) ? h(b)[a] : b.__getDefAttrVal(a); 5703 if (k = d(b, k)) l = k.call(b, l, a); 5704 return e && (l = i(l, e)), 5705 l 5706 5707 }, 5708 __getDefAttrVal: function(a) { 5709 var c = this, 5710 e = f(g(c), a), 5711 h, 5712 i; 5713 if (h = d(c, e.valueFn)) i = h.call(c), 5714 i !== b && (e.value = i), 5715 delete e.valueFn, 5716 g(c)[a] = e; 5717 return e.value 5718 5719 }, 5720 reset: function(b, c) { 5721 var d = this; 5722 if (a.isString(b)) return d.hasAttr(b) ? d.set(b, d.__getDefAttrVal(b), c) : d; 5723 c = b; 5724 var e = g(d), 5725 f = {}; 5726 for (b in e) f[b] = d.__getDefAttrVal(b); 5727 return d.set(f, c), 5728 d 5729 5730 } 5731 5732 }), 5733 b && (l.prototype.addAttrs = b), 5734 l 5735 5736 }), 5737 KISSY.add("base/base", 5738 function(a, b, c) { 5739 function d(a) { 5740 var b = this.constructor; 5741 while (b) e(this, b.ATTRS), 5742 b = b.superclass ? b.superclass.constructor: null; 5743 f(this, a) 5744 5745 } 5746 function e(a, b) { 5747 if (b) for (var c in b) b.hasOwnProperty(c) && a.addAttr(c, b[c], !1) 5748 5749 } 5750 function f(a, b) { 5751 if (b) for (var c in b) b.hasOwnProperty(c) && a.__set(c, b[c]) 5752 5753 } 5754 return a.augment(d, c.Target, b), 5755 d 5756 5757 }, 5758 { 5759 requires: ["./attribute", "event"] 5760 5761 }), 5762 KISSY.add("base", 5763 function(a, b, c) { 5764 return b.Attribute = c, 5765 b 5766 5767 }, 5768 { 5769 requires: ["base/base", "base/attribute"] 5770 5771 }), 5772 KISSY.add("cookie/base", 5773 function(a) { 5774 function f(b) { 5775 return a.isString(b) && b !== "" 5776 5777 } 5778 var b = document, 5779 c = 864e5, 5780 d = encodeURIComponent, 5781 e = decodeURIComponent; 5782 return { 5783 get: function(a) { 5784 var c, 5785 d; 5786 return f(a) && (d = String(b.cookie).match(new RegExp("(?:^| )" + a + "(?:(?:=([^;]*))|;|$)"))) && (c = d[1] ? e(d[1]) : ""), 5787 c 5788 5789 }, 5790 set: function(a, e, g, h, i, j) { 5791 var k = String(d(e)), 5792 l = g; 5793 typeof l == "number" && (l = new Date, l.setTime(l.getTime() + g * c)), 5794 l instanceof Date && (k += "; expires=" + l.toUTCString()), 5795 f(h) && (k += "; domain=" + h), 5796 f(i) && (k += "; path=" + i), 5797 j && (k += "; secure"), 5798 b.cookie = a + "=" + k 5799 5800 }, 5801 remove: function(a, b, c, d) { 5802 this.set(a, "", -1, b, c, d) 5803 5804 } 5805 5806 } 5807 5808 }), 5809 KISSY.add("cookie", 5810 function(a, b) { 5811 return b 5812 5813 }, 5814 { 5815 requires: ["cookie/base"] 5816 5817 }), 5818 KISSY.add("core", 5819 function(a, b, c, d, e, f, g, h, i, j) { 5820 var k = { 5821 UA: b, 5822 DOM: c, 5823 Event: d, 5824 EventTarget: d.Target, 5825 EventObject: d.Object, 5826 Node: e, 5827 NodeList: e, 5828 JSON: f, 5829 Ajax: g, 5830 IO: g, 5831 ajax: g, 5832 io: g, 5833 jsonp: g.jsonp, 5834 Anim: h, 5835 Easing: h.Easing, 5836 Base: i, 5837 Cookie: j, 5838 one: e.one, 5839 all: e.all, 5840 get: c.get, 5841 query: c.query 5842 5843 }; 5844 return a.mix(a, k), 5845 k 5846 5847 }, 5848 { 5849 requires: ["ua", "dom", "event", "node", "json", "ajax", "anim", "base", "cookie"] 5850 5851 }), 5852 KISSY.add("ajax/diandian", 5853 function(a, b) { 5854 var c = { 5855 dataType: "json", 5856 xdr: { 5857 subDomain: { 5858 proxy: "/proxy.html" 5859 5860 } 5861 5862 } 5863 5864 }; 5865 window.DDformKey ? (c.data = { 5866 formKey: window.DDformKey 5867 5868 }, 5869 a.log("FormKey has patched.", "info")) : a.log("FormKey is not found.", "info"), 5870 b.setupConfig(c) 5871 5872 }, 5873 { 5874 requires: ["ajax"] 5875 5876 }), 5877 KISSY.add("dom/diandian", 5878 function(a, b) { 5879 a.mix(b, { 5880 createFragment: function(a, c) { 5881 var d = document.createDocumentFragment(), 5882 e = b.create("<div>"), 5883 c = c || !1; 5884 b.html(e, a, c); 5885 while (e.firstChild) d.appendChild(e.firstChild); 5886 return d 5887 5888 }, 5889 appendHtml: function(a, c, d) { 5890 var d = d || !1, 5891 e = b.createFragment(c, d); 5892 a.appendChild(e) 5893 5894 } 5895 5896 }) 5897 5898 }, 5899 { 5900 requires: ["dom"] 5901 5902 }), 5903 KISSY.use("core");
还有你说的那个URL变化是通过js来控制的,
至于代码,应该很简单,自己到网上找一下就行。