sensu-dashboard-sonian 0.9.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (41) hide show
  1. data/.gitignore +6 -0
  2. data/Gemfile +4 -0
  3. data/MIT-LICENSE.txt +20 -0
  4. data/README.org +4 -0
  5. data/Rakefile +1 -0
  6. data/bin/sensu-dashboard +9 -0
  7. data/lib/sensu-dashboard/app.rb +449 -0
  8. data/lib/sensu-dashboard/public/css/autoSuggest.css +217 -0
  9. data/lib/sensu-dashboard/public/css/style.css +177 -0
  10. data/lib/sensu-dashboard/public/img/cross.png +0 -0
  11. data/lib/sensu-dashboard/public/img/footer_bg.png +0 -0
  12. data/lib/sensu-dashboard/public/img/header_bg.png +0 -0
  13. data/lib/sensu-dashboard/public/img/loading_circle.gif +0 -0
  14. data/lib/sensu-dashboard/public/img/main_content_bg.png +0 -0
  15. data/lib/sensu-dashboard/public/img/megaphone_icon.png +0 -0
  16. data/lib/sensu-dashboard/public/img/megaphone_icon_off.png +0 -0
  17. data/lib/sensu-dashboard/public/js/FABridge.js +604 -0
  18. data/lib/sensu-dashboard/public/js/functions.js +379 -0
  19. data/lib/sensu-dashboard/public/js/jquery-1.5.1.min.js +16 -0
  20. data/lib/sensu-dashboard/public/js/jquery.autoSuggest.js +375 -0
  21. data/lib/sensu-dashboard/public/js/jquery.leanModal.min.js +1 -0
  22. data/lib/sensu-dashboard/public/js/jquery.sortElements.js +69 -0
  23. data/lib/sensu-dashboard/public/js/jquery.tmpl.min.js +1 -0
  24. data/lib/sensu-dashboard/public/js/jquery.zclip.min.js +12 -0
  25. data/lib/sensu-dashboard/public/js/modernizr-1.7.min.js +2 -0
  26. data/lib/sensu-dashboard/public/js/swfobject.js +4 -0
  27. data/lib/sensu-dashboard/public/js/web_socket.js +312 -0
  28. data/lib/sensu-dashboard/public/js/webtoolkit.sha1.js +174 -0
  29. data/lib/sensu-dashboard/public/swf/WebSocketMain.swf +0 -0
  30. data/lib/sensu-dashboard/public/swf/ZeroClipboard.swf +0 -0
  31. data/lib/sensu-dashboard/version.rb +5 -0
  32. data/lib/sensu-dashboard/views/client_templates.erb +68 -0
  33. data/lib/sensu-dashboard/views/clients.erb +37 -0
  34. data/lib/sensu-dashboard/views/event_templates.erb +190 -0
  35. data/lib/sensu-dashboard/views/index.erb +48 -0
  36. data/lib/sensu-dashboard/views/layout.erb +124 -0
  37. data/lib/sensu-dashboard/views/sonian.sass +213 -0
  38. data/lib/sensu-dashboard/views/stash_templates.erb +44 -0
  39. data/lib/sensu-dashboard/views/stashes.erb +32 -0
  40. data/sensu-dashboard.gemspec +22 -0
  41. metadata +166 -0
@@ -0,0 +1 @@
1
+ (function(a){a.fn.extend({leanModal:function(c){var d={top:100,bottom:100,overflow:"scroll",overlay:0.5};c=a.extend(d,c);return this.each(function(){var e=c;a(this).click(function(j){var f=a("<div id='lean_overlay'></div>");var i=a(this).attr("href");a("body").append(f);a("#lean_overlay").click(function(){b(i)});var h=a(i).outerHeight();var g=a(i).outerWidth();a("#lean_overlay").css({display:"block",opacity:0});a("#lean_overlay").fadeTo(200,e.overlay);a(i).css({display:"block",position:"fixed",opacity:0,"z-index":11000,left:50+"%","margin-left":-(g/2)+"px",top:e.top+"px",bottom:e.bottom+"px",overflow:e.overflow});a(i).fadeTo(200,1);j.preventDefault()})});function b(e){a("#lean_overlay").fadeOut(200);a(e).css({display:"none"})}}})})(jQuery);
@@ -0,0 +1,69 @@
1
+ /**
2
+ * jQuery.fn.sortElements
3
+ * --------------
4
+ * @author James Padolsey (http://james.padolsey.com)
5
+ * @version 0.11
6
+ * @updated 18-MAR-2010
7
+ * --------------
8
+ * @param Function comparator:
9
+ * Exactly the same behaviour as [1,2,3].sort(comparator)
10
+ *
11
+ * @param Function getSortable
12
+ * A function that should return the element that is
13
+ * to be sorted. The comparator will run on the
14
+ * current collection, but you may want the actual
15
+ * resulting sort to occur on a parent or another
16
+ * associated element.
17
+ *
18
+ * E.g. $('td').sortElements(comparator, function(){
19
+ * return this.parentNode;
20
+ * })
21
+ *
22
+ * The <td>'s parent (<tr>) will be sorted instead
23
+ * of the <td> itself.
24
+ */
25
+ jQuery.fn.sortElements = (function(){
26
+
27
+ var sort = [].sort;
28
+
29
+ return function(comparator, getSortable) {
30
+
31
+ getSortable = getSortable || function(){return this;};
32
+
33
+ var placements = this.map(function(){
34
+
35
+ var sortElement = getSortable.call(this),
36
+ parentNode = sortElement.parentNode,
37
+
38
+ // Since the element itself will change position, we have
39
+ // to have some way of storing it's original position in
40
+ // the DOM. The easiest way is to have a 'flag' node:
41
+ nextSibling = parentNode.insertBefore(
42
+ document.createTextNode(''),
43
+ sortElement.nextSibling
44
+ );
45
+
46
+ return function() {
47
+
48
+ if (parentNode === this) {
49
+ throw new Error(
50
+ "You can't sort elements if any one is a descendant of another."
51
+ );
52
+ }
53
+
54
+ // Insert before flag:
55
+ parentNode.insertBefore(this, nextSibling);
56
+ // Remove flag:
57
+ parentNode.removeChild(nextSibling);
58
+
59
+ };
60
+
61
+ });
62
+
63
+ return sort.call(this, comparator).each(function(i){
64
+ placements[i].call(getSortable.call(this));
65
+ });
66
+
67
+ };
68
+
69
+ })();
@@ -0,0 +1 @@
1
+ (function(a){var r=a.fn.domManip,d="_tmplitem",q=/^[^<]*(<[\w\W]+>)[^>]*$|\{\{\! /,b={},f={},e,p={key:0,data:{}},h=0,c=0,l=[];function g(e,d,g,i){var c={data:i||(d?d.data:{}),_wrap:d?d._wrap:null,tmpl:null,parent:d||null,nodes:[],calls:u,nest:w,wrap:x,html:v,update:t};e&&a.extend(c,e,{nodes:[],parent:d});if(g){c.tmpl=g;c._ctnt=c._ctnt||c.tmpl(a,c);c.key=++h;(l.length?f:b)[h]=c}return c}a.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(f,d){a.fn[f]=function(n){var g=[],i=a(n),k,h,m,l,j=this.length===1&&this[0].parentNode;e=b||{};if(j&&j.nodeType===11&&j.childNodes.length===1&&i.length===1){i[d](this[0]);g=this}else{for(h=0,m=i.length;h<m;h++){c=h;k=(h>0?this.clone(true):this).get();a.fn[d].apply(a(i[h]),k);g=g.concat(k)}c=0;g=this.pushStack(g,f,i.selector)}l=e;e=null;a.tmpl.complete(l);return g}});a.fn.extend({tmpl:function(d,c,b){return a.tmpl(this[0],d,c,b)},tmplItem:function(){return a.tmplItem(this[0])},template:function(b){return a.template(b,this[0])},domManip:function(d,l,j){if(d[0]&&d[0].nodeType){var f=a.makeArray(arguments),g=d.length,i=0,h;while(i<g&&!(h=a.data(d[i++],"tmplItem")));if(g>1)f[0]=[a.makeArray(d)];if(h&&c)f[2]=function(b){a.tmpl.afterManip(this,b,j)};r.apply(this,f)}else r.apply(this,arguments);c=0;!e&&a.tmpl.complete(b);return this}});a.extend({tmpl:function(d,h,e,c){var j,k=!c;if(k){c=p;d=a.template[d]||a.template(null,d);f={}}else if(!d){d=c.tmpl;b[c.key]=c;c.nodes=[];c.wrapped&&n(c,c.wrapped);return a(i(c,null,c.tmpl(a,c)))}if(!d)return[];if(typeof h==="function")h=h.call(c||{});e&&e.wrapped&&n(e,e.wrapped);j=a.isArray(h)?a.map(h,function(a){return a?g(e,c,d,a):null}):[g(e,c,d,h)];return k?a(i(c,null,j)):j},tmplItem:function(b){var c;if(b instanceof a)b=b[0];while(b&&b.nodeType===1&&!(c=a.data(b,"tmplItem"))&&(b=b.parentNode));return c||p},template:function(c,b){if(b){if(typeof b==="string")b=o(b);else if(b instanceof a)b=b[0]||{};if(b.nodeType)b=a.data(b,"tmpl")||a.data(b,"tmpl",o(b.innerHTML));return typeof c==="string"?(a.template[c]=b):b}return c?typeof c!=="string"?a.template(null,c):a.template[c]||a.template(null,q.test(c)?c:a(c)):null},encode:function(a){return(""+a).split("<").join("&lt;").split(">").join("&gt;").split('"').join("&#34;").split("'").join("&#39;")}});a.extend(a.tmpl,{tag:{tmpl:{_default:{$2:"null"},open:"if($notnull_1){_=_.concat($item.nest($1,$2));}"},wrap:{_default:{$2:"null"},open:"$item.calls(_,$1,$2);_=[];",close:"call=$item.calls();_=call._.concat($item.wrap(call,_));"},each:{_default:{$2:"$index, $value"},open:"if($notnull_1){$.each($1a,function($2){with(this){",close:"}});}"},"if":{open:"if(($notnull_1) && $1a){",close:"}"},"else":{_default:{$1:"true"},open:"}else if(($notnull_1) && $1a){"},html:{open:"if($notnull_1){_.push($1a);}"},"=":{_default:{$1:"$data"},open:"if($notnull_1){_.push($.encode($1a));}"},"!":{open:""}},complete:function(){b={}},afterManip:function(f,b,d){var e=b.nodeType===11?a.makeArray(b.childNodes):b.nodeType===1?[b]:[];d.call(f,b);m(e);c++}});function i(e,g,f){var b,c=f?a.map(f,function(a){return typeof a==="string"?e.key?a.replace(/(<\w+)(?=[\s>])(?![^>]*_tmplitem)([^>]*)/g,"$1 "+d+'="'+e.key+'" $2'):a:i(a,e,a._ctnt)}):e;if(g)return c;c=c.join("");c.replace(/^\s*([^<\s][^<]*)?(<[\w\W]+>)([^>]*[^>\s])?\s*$/,function(f,c,e,d){b=a(e).get();m(b);if(c)b=j(c).concat(b);if(d)b=b.concat(j(d))});return b?b:j(c)}function j(c){var b=document.createElement("div");b.innerHTML=c;return a.makeArray(b.childNodes)}function o(b){return new Function("jQuery","$item","var $=jQuery,call,_=[],$data=$item.data;with($data){_.push('"+a.trim(b).replace(/([\\'])/g,"\\$1").replace(/[\r\t\n]/g," ").replace(/\$\{([^\}]*)\}/g,"{{= $1}}").replace(/\{\{(\/?)(\w+|.)(?:\(((?:[^\}]|\}(?!\}))*?)?\))?(?:\s+(.*?)?)?(\(((?:[^\}]|\}(?!\}))*?)\))?\s*\}\}/g,function(m,l,j,d,b,c,e){var i=a.tmpl.tag[j],h,f,g;if(!i)throw"Template command not found: "+j;h=i._default||[];if(c&&!/\w$/.test(b)){b+=c;c=""}if(b){b=k(b);e=e?","+k(e)+")":c?")":"";f=c?b.indexOf(".")>-1?b+c:"("+b+").call($item"+e:b;g=c?f:"(typeof("+b+")==='function'?("+b+").call($item):("+b+"))"}else g=f=h.$1||"null";d=k(d);return"');"+i[l?"close":"open"].split("$notnull_1").join(b?"typeof("+b+")!=='undefined' && ("+b+")!=null":"true").split("$1a").join(g).split("$1").join(f).split("$2").join(d?d.replace(/\s*([^\(]+)\s*(\((.*?)\))?/g,function(d,c,b,a){a=a?","+a+")":b?")":"";return a?"("+c+").call($item"+a:d}):h.$2||"")+"_.push('"})+"');}return _;")}function n(c,b){c._wrap=i(c,true,a.isArray(b)?b:[q.test(b)?b:a(b).html()]).join("")}function k(a){return a?a.replace(/\\'/g,"'").replace(/\\\\/g,"\\"):null}function s(b){var a=document.createElement("div");a.appendChild(b.cloneNode(true));return a.innerHTML}function m(o){var n="_"+c,k,j,l={},e,p,i;for(e=0,p=o.length;e<p;e++){if((k=o[e]).nodeType!==1)continue;j=k.getElementsByTagName("*");for(i=j.length-1;i>=0;i--)m(j[i]);m(k)}function m(j){var p,i=j,k,e,m;if(m=j.getAttribute(d)){while(i.parentNode&&(i=i.parentNode).nodeType===1&&!(p=i.getAttribute(d)));if(p!==m){i=i.parentNode?i.nodeType===11?0:i.getAttribute(d)||0:0;if(!(e=b[m])){e=f[m];e=g(e,b[i]||f[i],null,true);e.key=++h;b[h]=e}c&&o(m)}j.removeAttribute(d)}else if(c&&(e=a.data(j,"tmplItem"))){o(e.key);b[e.key]=e;i=a.data(j.parentNode,"tmplItem");i=i?i.key:0}if(e){k=e;while(k&&k.key!=i){k.nodes.push(j);k=k.parent}delete e._ctnt;delete e._wrap;a.data(j,"tmplItem",e)}function o(a){a=a+n;e=l[a]=l[a]||g(e,b[e.parent.key+n]||e.parent,null,true)}}}function u(a,d,c,b){if(!a)return l.pop();l.push({_:a,tmpl:d,item:this,data:c,options:b})}function w(d,c,b){return a.tmpl(a.template(d),c,b,this)}function x(b,d){var c=b.options||{};c.wrapped=d;return a.tmpl(a.template(b.tmpl),b.data,c,b.item)}function v(d,c){var b=this._wrap;return a.map(a(a.isArray(b)?b.join(""):b).filter(d||"*"),function(a){return c?a.innerText||a.textContent:a.outerHTML||s(a)})}function t(){var b=this.nodes;a.tmpl(null,null,null,this).insertBefore(b[0]);a(b).remove()}})(jQuery)
@@ -0,0 +1,12 @@
1
+ /*
2
+ * zClip :: jQuery ZeroClipboard v1.1.1
3
+ * http://steamdev.com/zclip
4
+ *
5
+ * Copyright 2011, SteamDev
6
+ * Released under the MIT license.
7
+ * http://www.opensource.org/licenses/mit-license.php
8
+ *
9
+ * Date: Wed Jun 01, 2011
10
+ */
11
+
12
+ (function(a){a.fn.zclip=function(c){if(typeof c=="object"&&!c.length){var b=a.extend({path:"ZeroClipboard.swf",copy:null,beforeCopy:null,afterCopy:null,clickAfter:true,setHandCursor:true,setCSSEffects:true},c);return this.each(function(){var e=a(this);if(e.is(":visible")&&(typeof b.copy=="string"||a.isFunction(b.copy))){ZeroClipboard.setMoviePath(b.path);var d=new ZeroClipboard.Client();if(a.isFunction(b.copy)){e.bind("zClip_copy",b.copy)}if(a.isFunction(b.beforeCopy)){e.bind("zClip_beforeCopy",b.beforeCopy)}if(a.isFunction(b.afterCopy)){e.bind("zClip_afterCopy",b.afterCopy)}d.setHandCursor(b.setHandCursor);d.setCSSEffects(b.setCSSEffects);d.addEventListener("mouseOver",function(f){e.trigger("mouseenter")});d.addEventListener("mouseOut",function(f){e.trigger("mouseleave")});d.addEventListener("mouseDown",function(f){e.trigger("mousedown");if(!a.isFunction(b.copy)){d.setText(b.copy)}else{d.setText(e.triggerHandler("zClip_copy"))}if(a.isFunction(b.beforeCopy)){e.trigger("zClip_beforeCopy")}});d.addEventListener("complete",function(f,g){if(a.isFunction(b.afterCopy)){e.trigger("zClip_afterCopy")}else{if(g.length>500){g=g.substr(0,500)+"...\n\n("+(g.length-500)+" characters not shown)"}e.removeClass("hover");alert("Copied text to clipboard:\n\n "+g)}if(b.clickAfter){e.trigger("click")}});d.glue(e[0],e.parent()[0]);a(window).bind("load resize",function(){d.reposition()})}})}else{if(typeof c=="string"){return this.each(function(){var f=a(this);c=c.toLowerCase();var e=f.data("zclipId");var d=a("#"+e+".zclip");if(c=="remove"){d.remove();f.removeClass("active hover")}else{if(c=="hide"){d.hide();f.removeClass("active hover")}else{if(c=="show"){d.show()}}}})}}}})(jQuery);var ZeroClipboard={version:"1.0.7",clients:{},moviePath:"ZeroClipboard.swf",nextId:1,$:function(a){if(typeof(a)=="string"){a=document.getElementById(a)}if(!a.addClass){a.hide=function(){this.style.display="none"};a.show=function(){this.style.display=""};a.addClass=function(b){this.removeClass(b);this.className+=" "+b};a.removeClass=function(d){var e=this.className.split(/\s+/);var b=-1;for(var c=0;c<e.length;c++){if(e[c]==d){b=c;c=e.length}}if(b>-1){e.splice(b,1);this.className=e.join(" ")}return this};a.hasClass=function(b){return !!this.className.match(new RegExp("\\s*"+b+"\\s*"))}}return a},setMoviePath:function(a){this.moviePath=a},dispatch:function(d,b,c){var a=this.clients[d];if(a){a.receiveEvent(b,c)}},register:function(b,a){this.clients[b]=a},getDOMObjectPosition:function(c,a){var b={left:0,top:0,width:c.width?c.width:c.offsetWidth,height:c.height?c.height:c.offsetHeight};if(c&&(c!=a)){b.left+=c.offsetLeft;b.top+=c.offsetTop}return b},Client:function(a){this.handlers={};this.id=ZeroClipboard.nextId++;this.movieId="ZeroClipboardMovie_"+this.id;ZeroClipboard.register(this.id,this);if(a){this.glue(a)}}};ZeroClipboard.Client.prototype={id:0,ready:false,movie:null,clipText:"",handCursorEnabled:true,cssEffects:true,handlers:null,glue:function(d,b,e){this.domElement=ZeroClipboard.$(d);var f=99;if(this.domElement.style.zIndex){f=parseInt(this.domElement.style.zIndex,10)+1}if(typeof(b)=="string"){b=ZeroClipboard.$(b)}else{if(typeof(b)=="undefined"){b=document.getElementsByTagName("body")[0]}}var c=ZeroClipboard.getDOMObjectPosition(this.domElement,b);this.div=document.createElement("div");this.div.className="zclip";this.div.id="zclip-"+this.movieId;$(this.domElement).data("zclipId","zclip-"+this.movieId);var a=this.div.style;a.position="absolute";a.left=""+c.left+"px";a.top=""+c.top+"px";a.width=""+c.width+"px";a.height=""+c.height+"px";a.zIndex=f;if(typeof(e)=="object"){for(addedStyle in e){a[addedStyle]=e[addedStyle]}}b.appendChild(this.div);this.div.innerHTML=this.getHTML(c.width,c.height)},getHTML:function(d,a){var c="";var b="id="+this.id+"&width="+d+"&height="+a;if(navigator.userAgent.match(/MSIE/)){var e=location.href.match(/^https/i)?"https://":"http://";c+='<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="'+e+'download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="'+d+'" height="'+a+'" id="'+this.movieId+'" align="middle"><param name="allowScriptAccess" value="always" /><param name="allowFullScreen" value="false" /><param name="movie" value="'+ZeroClipboard.moviePath+'" /><param name="loop" value="false" /><param name="menu" value="false" /><param name="quality" value="best" /><param name="bgcolor" value="#ffffff" /><param name="flashvars" value="'+b+'"/><param name="wmode" value="transparent"/></object>'}else{c+='<embed id="'+this.movieId+'" src="'+ZeroClipboard.moviePath+'" loop="false" menu="false" quality="best" bgcolor="#ffffff" width="'+d+'" height="'+a+'" name="'+this.movieId+'" align="middle" allowScriptAccess="always" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" flashvars="'+b+'" wmode="transparent" />'}return c},hide:function(){if(this.div){this.div.style.left="-2000px"}},show:function(){this.reposition()},destroy:function(){if(this.domElement&&this.div){this.hide();this.div.innerHTML="";var a=document.getElementsByTagName("body")[0];try{a.removeChild(this.div)}catch(b){}this.domElement=null;this.div=null}},reposition:function(c){if(c){this.domElement=ZeroClipboard.$(c);if(!this.domElement){this.hide()}}if(this.domElement&&this.div){var b=ZeroClipboard.getDOMObjectPosition(this.domElement);var a=this.div.style;a.left=""+b.left+"px";a.top=""+b.top+"px"}},setText:function(a){this.clipText=a;if(this.ready){this.movie.setText(a)}},addEventListener:function(a,b){a=a.toString().toLowerCase().replace(/^on/,"");if(!this.handlers[a]){this.handlers[a]=[]}this.handlers[a].push(b)},setHandCursor:function(a){this.handCursorEnabled=a;if(this.ready){this.movie.setHandCursor(a)}},setCSSEffects:function(a){this.cssEffects=!!a},receiveEvent:function(d,f){d=d.toString().toLowerCase().replace(/^on/,"");switch(d){case"load":this.movie=document.getElementById(this.movieId);if(!this.movie){var c=this;setTimeout(function(){c.receiveEvent("load",null)},1);return}if(!this.ready&&navigator.userAgent.match(/Firefox/)&&navigator.userAgent.match(/Windows/)){var c=this;setTimeout(function(){c.receiveEvent("load",null)},100);this.ready=true;return}this.ready=true;try{this.movie.setText(this.clipText)}catch(h){}try{this.movie.setHandCursor(this.handCursorEnabled)}catch(h){}break;case"mouseover":if(this.domElement&&this.cssEffects){this.domElement.addClass("hover");if(this.recoverActive){this.domElement.addClass("active")}}break;case"mouseout":if(this.domElement&&this.cssEffects){this.recoverActive=false;if(this.domElement.hasClass("active")){this.domElement.removeClass("active");this.recoverActive=true}this.domElement.removeClass("hover")}break;case"mousedown":if(this.domElement&&this.cssEffects){this.domElement.addClass("active")}break;case"mouseup":if(this.domElement&&this.cssEffects){this.domElement.removeClass("active");this.recoverActive=false}break}if(this.handlers[d]){for(var b=0,a=this.handlers[d].length;b<a;b++){var g=this.handlers[d][b];if(typeof(g)=="function"){g(this,f)}else{if((typeof(g)=="object")&&(g.length==2)){g[0][g[1]](this,f)}else{if(typeof(g)=="string"){window[g](this,f)}}}}}}};
@@ -0,0 +1,2 @@
1
+ // Modernizr v1.7 www.modernizr.com
2
+ window.Modernizr=function(a,b,c){function G(){e.input=function(a){for(var b=0,c=a.length;b<c;b++)t[a[b]]=!!(a[b]in l);return t}("autocomplete autofocus list placeholder max min multiple pattern required step".split(" ")),e.inputtypes=function(a){for(var d=0,e,f,h,i=a.length;d<i;d++)l.setAttribute("type",f=a[d]),e=l.type!=="text",e&&(l.value=m,l.style.cssText="position:absolute;visibility:hidden;",/^range$/.test(f)&&l.style.WebkitAppearance!==c?(g.appendChild(l),h=b.defaultView,e=h.getComputedStyle&&h.getComputedStyle(l,null).WebkitAppearance!=="textfield"&&l.offsetHeight!==0,g.removeChild(l)):/^(search|tel)$/.test(f)||(/^(url|email)$/.test(f)?e=l.checkValidity&&l.checkValidity()===!1:/^color$/.test(f)?(g.appendChild(l),g.offsetWidth,e=l.value!=m,g.removeChild(l)):e=l.value!=m)),s[a[d]]=!!e;return s}("search tel url email datetime date month week time datetime-local number range color".split(" "))}function F(a,b){var c=a.charAt(0).toUpperCase()+a.substr(1),d=(a+" "+p.join(c+" ")+c).split(" ");return!!E(d,b)}function E(a,b){for(var d in a)if(k[a[d]]!==c&&(!b||b(a[d],j)))return!0}function D(a,b){return(""+a).indexOf(b)!==-1}function C(a,b){return typeof a===b}function B(a,b){return A(o.join(a+";")+(b||""))}function A(a){k.cssText=a}var d="1.7",e={},f=!0,g=b.documentElement,h=b.head||b.getElementsByTagName("head")[0],i="modernizr",j=b.createElement(i),k=j.style,l=b.createElement("input"),m=":)",n=Object.prototype.toString,o=" -webkit- -moz- -o- -ms- -khtml- ".split(" "),p="Webkit Moz O ms Khtml".split(" "),q={svg:"http://www.w3.org/2000/svg"},r={},s={},t={},u=[],v,w=function(a){var c=b.createElement("style"),d=b.createElement("div"),e;c.textContent=a+"{#modernizr{height:3px}}",h.appendChild(c),d.id="modernizr",g.appendChild(d),e=d.offsetHeight===3,c.parentNode.removeChild(c),d.parentNode.removeChild(d);return!!e},x=function(){function d(d,e){e=e||b.createElement(a[d]||"div");var f=(d="on"+d)in e;f||(e.setAttribute||(e=b.createElement("div")),e.setAttribute&&e.removeAttribute&&(e.setAttribute(d,""),f=C(e[d],"function"),C(e[d],c)||(e[d]=c),e.removeAttribute(d))),e=null;return f}var a={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return d}(),y=({}).hasOwnProperty,z;C(y,c)||C(y.call,c)?z=function(a,b){return b in a&&C(a.constructor.prototype[b],c)}:z=function(a,b){return y.call(a,b)},r.flexbox=function(){function c(a,b,c,d){a.style.cssText=o.join(b+":"+c+";")+(d||"")}function a(a,b,c,d){b+=":",a.style.cssText=(b+o.join(c+";"+b)).slice(0,-b.length)+(d||"")}var d=b.createElement("div"),e=b.createElement("div");a(d,"display","box","width:42px;padding:0;"),c(e,"box-flex","1","width:10px;"),d.appendChild(e),g.appendChild(d);var f=e.offsetWidth===42;d.removeChild(e),g.removeChild(d);return f},r.canvas=function(){var a=b.createElement("canvas");return a.getContext&&a.getContext("2d")},r.canvastext=function(){return e.canvas&&C(b.createElement("canvas").getContext("2d").fillText,"function")},r.webgl=function(){return!!a.WebGLRenderingContext},r.touch=function(){return"ontouchstart"in a||w("@media ("+o.join("touch-enabled),(")+"modernizr)")},r.geolocation=function(){return!!navigator.geolocation},r.postmessage=function(){return!!a.postMessage},r.websqldatabase=function(){var b=!!a.openDatabase;return b},r.indexedDB=function(){for(var b=-1,c=p.length;++b<c;){var d=p[b].toLowerCase();if(a[d+"_indexedDB"]||a[d+"IndexedDB"])return!0}return!1},r.hashchange=function(){return x("hashchange",a)&&(b.documentMode===c||b.documentMode>7)},r.history=function(){return !!(a.history&&history.pushState)},r.draganddrop=function(){return x("dragstart")&&x("drop")},r.websockets=function(){return"WebSocket"in a},r.rgba=function(){A("background-color:rgba(150,255,150,.5)");return D(k.backgroundColor,"rgba")},r.hsla=function(){A("background-color:hsla(120,40%,100%,.5)");return D(k.backgroundColor,"rgba")||D(k.backgroundColor,"hsla")},r.multiplebgs=function(){A("background:url(//:),url(//:),red url(//:)");return(new RegExp("(url\\s*\\(.*?){3}")).test(k.background)},r.backgroundsize=function(){return F("backgroundSize")},r.borderimage=function(){return F("borderImage")},r.borderradius=function(){return F("borderRadius","",function(a){return D(a,"orderRadius")})},r.boxshadow=function(){return F("boxShadow")},r.textshadow=function(){return b.createElement("div").style.textShadow===""},r.opacity=function(){B("opacity:.55");return/^0.55$/.test(k.opacity)},r.cssanimations=function(){return F("animationName")},r.csscolumns=function(){return F("columnCount")},r.cssgradients=function(){var a="background-image:",b="gradient(linear,left top,right bottom,from(#9f9),to(white));",c="linear-gradient(left top,#9f9, white);";A((a+o.join(b+a)+o.join(c+a)).slice(0,-a.length));return D(k.backgroundImage,"gradient")},r.cssreflections=function(){return F("boxReflect")},r.csstransforms=function(){return!!E(["transformProperty","WebkitTransform","MozTransform","OTransform","msTransform"])},r.csstransforms3d=function(){var a=!!E(["perspectiveProperty","WebkitPerspective","MozPerspective","OPerspective","msPerspective"]);a&&"webkitPerspective"in g.style&&(a=w("@media ("+o.join("transform-3d),(")+"modernizr)"));return a},r.csstransitions=function(){return F("transitionProperty")},r.fontface=function(){var a,c,d=h||g,e=b.createElement("style"),f=b.implementation||{hasFeature:function(){return!1}};e.type="text/css",d.insertBefore(e,d.firstChild),a=e.sheet||e.styleSheet;var i=f.hasFeature("CSS2","")?function(b){if(!a||!b)return!1;var c=!1;try{a.insertRule(b,0),c=/src/i.test(a.cssRules[0].cssText),a.deleteRule(a.cssRules.length-1)}catch(d){}return c}:function(b){if(!a||!b)return!1;a.cssText=b;return a.cssText.length!==0&&/src/i.test(a.cssText)&&a.cssText.replace(/\r+|\n+/g,"").indexOf(b.split(" ")[0])===0};c=i('@font-face { font-family: "font"; src: url(data:,); }'),d.removeChild(e);return c},r.video=function(){var a=b.createElement("video"),c=!!a.canPlayType;if(c){c=new Boolean(c),c.ogg=a.canPlayType('video/ogg; codecs="theora"');var d='video/mp4; codecs="avc1.42E01E';c.h264=a.canPlayType(d+'"')||a.canPlayType(d+', mp4a.40.2"'),c.webm=a.canPlayType('video/webm; codecs="vp8, vorbis"')}return c},r.audio=function(){var a=b.createElement("audio"),c=!!a.canPlayType;c&&(c=new Boolean(c),c.ogg=a.canPlayType('audio/ogg; codecs="vorbis"'),c.mp3=a.canPlayType("audio/mpeg;"),c.wav=a.canPlayType('audio/wav; codecs="1"'),c.m4a=a.canPlayType("audio/x-m4a;")||a.canPlayType("audio/aac;"));return c},r.localstorage=function(){try{return!!localStorage.getItem}catch(a){return!1}},r.sessionstorage=function(){try{return!!sessionStorage.getItem}catch(a){return!1}},r.webWorkers=function(){return!!a.Worker},r.applicationcache=function(){return!!a.applicationCache},r.svg=function(){return!!b.createElementNS&&!!b.createElementNS(q.svg,"svg").createSVGRect},r.inlinesvg=function(){var a=b.createElement("div");a.innerHTML="<svg/>";return(a.firstChild&&a.firstChild.namespaceURI)==q.svg},r.smil=function(){return!!b.createElementNS&&/SVG/.test(n.call(b.createElementNS(q.svg,"animate")))},r.svgclippaths=function(){return!!b.createElementNS&&/SVG/.test(n.call(b.createElementNS(q.svg,"clipPath")))};for(var H in r)z(r,H)&&(v=H.toLowerCase(),e[v]=r[H](),u.push((e[v]?"":"no-")+v));e.input||G(),e.crosswindowmessaging=e.postmessage,e.historymanagement=e.history,e.addTest=function(a,b){a=a.toLowerCase();if(!e[a]){b=!!b(),g.className+=" "+(b?"":"no-")+a,e[a]=b;return e}},A(""),j=l=null,f&&a.attachEvent&&function(){var a=b.createElement("div");a.innerHTML="<elem></elem>";return a.childNodes.length!==1}()&&function(a,b){function p(a,b){var c=-1,d=a.length,e,f=[];while(++c<d)e=a[c],(b=e.media||b)!="screen"&&f.push(p(e.imports,b),e.cssText);return f.join("")}function o(a){var b=-1;while(++b<e)a.createElement(d[b])}var c="abbr|article|aside|audio|canvas|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",d=c.split("|"),e=d.length,f=new RegExp("(^|\\s)("+c+")","gi"),g=new RegExp("<(/*)("+c+")","gi"),h=new RegExp("(^|[^\\n]*?\\s)("+c+")([^\\n]*)({[\\n\\w\\W]*?})","gi"),i=b.createDocumentFragment(),j=b.documentElement,k=j.firstChild,l=b.createElement("body"),m=b.createElement("style"),n;o(b),o(i),k.insertBefore(m,k.firstChild),m.media="print",a.attachEvent("onbeforeprint",function(){var a=-1,c=p(b.styleSheets,"all"),k=[],o;n=n||b.body;while((o=h.exec(c))!=null)k.push((o[1]+o[2]+o[3]).replace(f,"$1.iepp_$2")+o[4]);m.styleSheet.cssText=k.join("\n");while(++a<e){var q=b.getElementsByTagName(d[a]),r=q.length,s=-1;while(++s<r)q[s].className.indexOf("iepp_")<0&&(q[s].className+=" iepp_"+d[a])}i.appendChild(n),j.appendChild(l),l.className=n.className,l.innerHTML=n.innerHTML.replace(g,"<$1font")}),a.attachEvent("onafterprint",function(){l.innerHTML="",j.removeChild(l),j.appendChild(n),m.styleSheet.cssText=""})}(a,b),e._enableHTML5=f,e._version=d,g.className=g.className.replace(/\bno-js\b/,"")+" js "+u.join(" ");return e}(this,this.document)
@@ -0,0 +1,4 @@
1
+ /* SWFObject v2.2 <http://code.google.com/p/swfobject/>
2
+ is released under the MIT License <http://www.opensource.org/licenses/mit-license.php>
3
+ */
4
+ var swfobject=function(){var D="undefined",r="object",S="Shockwave Flash",W="ShockwaveFlash.ShockwaveFlash",q="application/x-shockwave-flash",R="SWFObjectExprInst",x="onreadystatechange",O=window,j=document,t=navigator,T=false,U=[h],o=[],N=[],I=[],l,Q,E,B,J=false,a=false,n,G,m=true,M=function(){var aa=typeof j.getElementById!=D&&typeof j.getElementsByTagName!=D&&typeof j.createElement!=D,ah=t.userAgent.toLowerCase(),Y=t.platform.toLowerCase(),ae=Y?/win/.test(Y):/win/.test(ah),ac=Y?/mac/.test(Y):/mac/.test(ah),af=/webkit/.test(ah)?parseFloat(ah.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,X=!+"\v1",ag=[0,0,0],ab=null;if(typeof t.plugins!=D&&typeof t.plugins[S]==r){ab=t.plugins[S].description;if(ab&&!(typeof t.mimeTypes!=D&&t.mimeTypes[q]&&!t.mimeTypes[q].enabledPlugin)){T=true;X=false;ab=ab.replace(/^.*\s+(\S+\s+\S+$)/,"$1");ag[0]=parseInt(ab.replace(/^(.*)\..*$/,"$1"),10);ag[1]=parseInt(ab.replace(/^.*\.(.*)\s.*$/,"$1"),10);ag[2]=/[a-zA-Z]/.test(ab)?parseInt(ab.replace(/^.*[a-zA-Z]+(.*)$/,"$1"),10):0}}else{if(typeof O.ActiveXObject!=D){try{var ad=new ActiveXObject(W);if(ad){ab=ad.GetVariable("$version");if(ab){X=true;ab=ab.split(" ")[1].split(",");ag=[parseInt(ab[0],10),parseInt(ab[1],10),parseInt(ab[2],10)]}}}catch(Z){}}}return{w3:aa,pv:ag,wk:af,ie:X,win:ae,mac:ac}}(),k=function(){if(!M.w3){return}if((typeof j.readyState!=D&&j.readyState=="complete")||(typeof j.readyState==D&&(j.getElementsByTagName("body")[0]||j.body))){f()}if(!J){if(typeof j.addEventListener!=D){j.addEventListener("DOMContentLoaded",f,false)}if(M.ie&&M.win){j.attachEvent(x,function(){if(j.readyState=="complete"){j.detachEvent(x,arguments.callee);f()}});if(O==top){(function(){if(J){return}try{j.documentElement.doScroll("left")}catch(X){setTimeout(arguments.callee,0);return}f()})()}}if(M.wk){(function(){if(J){return}if(!/loaded|complete/.test(j.readyState)){setTimeout(arguments.callee,0);return}f()})()}s(f)}}();function f(){if(J){return}try{var Z=j.getElementsByTagName("body")[0].appendChild(C("span"));Z.parentNode.removeChild(Z)}catch(aa){return}J=true;var X=U.length;for(var Y=0;Y<X;Y++){U[Y]()}}function K(X){if(J){X()}else{U[U.length]=X}}function s(Y){if(typeof O.addEventListener!=D){O.addEventListener("load",Y,false)}else{if(typeof j.addEventListener!=D){j.addEventListener("load",Y,false)}else{if(typeof O.attachEvent!=D){i(O,"onload",Y)}else{if(typeof O.onload=="function"){var X=O.onload;O.onload=function(){X();Y()}}else{O.onload=Y}}}}}function h(){if(T){V()}else{H()}}function V(){var X=j.getElementsByTagName("body")[0];var aa=C(r);aa.setAttribute("type",q);var Z=X.appendChild(aa);if(Z){var Y=0;(function(){if(typeof Z.GetVariable!=D){var ab=Z.GetVariable("$version");if(ab){ab=ab.split(" ")[1].split(",");M.pv=[parseInt(ab[0],10),parseInt(ab[1],10),parseInt(ab[2],10)]}}else{if(Y<10){Y++;setTimeout(arguments.callee,10);return}}X.removeChild(aa);Z=null;H()})()}else{H()}}function H(){var ag=o.length;if(ag>0){for(var af=0;af<ag;af++){var Y=o[af].id;var ab=o[af].callbackFn;var aa={success:false,id:Y};if(M.pv[0]>0){var ae=c(Y);if(ae){if(F(o[af].swfVersion)&&!(M.wk&&M.wk<312)){w(Y,true);if(ab){aa.success=true;aa.ref=z(Y);ab(aa)}}else{if(o[af].expressInstall&&A()){var ai={};ai.data=o[af].expressInstall;ai.width=ae.getAttribute("width")||"0";ai.height=ae.getAttribute("height")||"0";if(ae.getAttribute("class")){ai.styleclass=ae.getAttribute("class")}if(ae.getAttribute("align")){ai.align=ae.getAttribute("align")}var ah={};var X=ae.getElementsByTagName("param");var ac=X.length;for(var ad=0;ad<ac;ad++){if(X[ad].getAttribute("name").toLowerCase()!="movie"){ah[X[ad].getAttribute("name")]=X[ad].getAttribute("value")}}P(ai,ah,Y,ab)}else{p(ae);if(ab){ab(aa)}}}}}else{w(Y,true);if(ab){var Z=z(Y);if(Z&&typeof Z.SetVariable!=D){aa.success=true;aa.ref=Z}ab(aa)}}}}}function z(aa){var X=null;var Y=c(aa);if(Y&&Y.nodeName=="OBJECT"){if(typeof Y.SetVariable!=D){X=Y}else{var Z=Y.getElementsByTagName(r)[0];if(Z){X=Z}}}return X}function A(){return !a&&F("6.0.65")&&(M.win||M.mac)&&!(M.wk&&M.wk<312)}function P(aa,ab,X,Z){a=true;E=Z||null;B={success:false,id:X};var ae=c(X);if(ae){if(ae.nodeName=="OBJECT"){l=g(ae);Q=null}else{l=ae;Q=X}aa.id=R;if(typeof aa.width==D||(!/%$/.test(aa.width)&&parseInt(aa.width,10)<310)){aa.width="310"}if(typeof aa.height==D||(!/%$/.test(aa.height)&&parseInt(aa.height,10)<137)){aa.height="137"}j.title=j.title.slice(0,47)+" - Flash Player Installation";var ad=M.ie&&M.win?"ActiveX":"PlugIn",ac="MMredirectURL="+O.location.toString().replace(/&/g,"%26")+"&MMplayerType="+ad+"&MMdoctitle="+j.title;if(typeof ab.flashvars!=D){ab.flashvars+="&"+ac}else{ab.flashvars=ac}if(M.ie&&M.win&&ae.readyState!=4){var Y=C("div");X+="SWFObjectNew";Y.setAttribute("id",X);ae.parentNode.insertBefore(Y,ae);ae.style.display="none";(function(){if(ae.readyState==4){ae.parentNode.removeChild(ae)}else{setTimeout(arguments.callee,10)}})()}u(aa,ab,X)}}function p(Y){if(M.ie&&M.win&&Y.readyState!=4){var X=C("div");Y.parentNode.insertBefore(X,Y);X.parentNode.replaceChild(g(Y),X);Y.style.display="none";(function(){if(Y.readyState==4){Y.parentNode.removeChild(Y)}else{setTimeout(arguments.callee,10)}})()}else{Y.parentNode.replaceChild(g(Y),Y)}}function g(ab){var aa=C("div");if(M.win&&M.ie){aa.innerHTML=ab.innerHTML}else{var Y=ab.getElementsByTagName(r)[0];if(Y){var ad=Y.childNodes;if(ad){var X=ad.length;for(var Z=0;Z<X;Z++){if(!(ad[Z].nodeType==1&&ad[Z].nodeName=="PARAM")&&!(ad[Z].nodeType==8)){aa.appendChild(ad[Z].cloneNode(true))}}}}}return aa}function u(ai,ag,Y){var X,aa=c(Y);if(M.wk&&M.wk<312){return X}if(aa){if(typeof ai.id==D){ai.id=Y}if(M.ie&&M.win){var ah="";for(var ae in ai){if(ai[ae]!=Object.prototype[ae]){if(ae.toLowerCase()=="data"){ag.movie=ai[ae]}else{if(ae.toLowerCase()=="styleclass"){ah+=' class="'+ai[ae]+'"'}else{if(ae.toLowerCase()!="classid"){ah+=" "+ae+'="'+ai[ae]+'"'}}}}}var af="";for(var ad in ag){if(ag[ad]!=Object.prototype[ad]){af+='<param name="'+ad+'" value="'+ag[ad]+'" />'}}aa.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+ah+">"+af+"</object>";N[N.length]=ai.id;X=c(ai.id)}else{var Z=C(r);Z.setAttribute("type",q);for(var ac in ai){if(ai[ac]!=Object.prototype[ac]){if(ac.toLowerCase()=="styleclass"){Z.setAttribute("class",ai[ac])}else{if(ac.toLowerCase()!="classid"){Z.setAttribute(ac,ai[ac])}}}}for(var ab in ag){if(ag[ab]!=Object.prototype[ab]&&ab.toLowerCase()!="movie"){e(Z,ab,ag[ab])}}aa.parentNode.replaceChild(Z,aa);X=Z}}return X}function e(Z,X,Y){var aa=C("param");aa.setAttribute("name",X);aa.setAttribute("value",Y);Z.appendChild(aa)}function y(Y){var X=c(Y);if(X&&X.nodeName=="OBJECT"){if(M.ie&&M.win){X.style.display="none";(function(){if(X.readyState==4){b(Y)}else{setTimeout(arguments.callee,10)}})()}else{X.parentNode.removeChild(X)}}}function b(Z){var Y=c(Z);if(Y){for(var X in Y){if(typeof Y[X]=="function"){Y[X]=null}}Y.parentNode.removeChild(Y)}}function c(Z){var X=null;try{X=j.getElementById(Z)}catch(Y){}return X}function C(X){return j.createElement(X)}function i(Z,X,Y){Z.attachEvent(X,Y);I[I.length]=[Z,X,Y]}function F(Z){var Y=M.pv,X=Z.split(".");X[0]=parseInt(X[0],10);X[1]=parseInt(X[1],10)||0;X[2]=parseInt(X[2],10)||0;return(Y[0]>X[0]||(Y[0]==X[0]&&Y[1]>X[1])||(Y[0]==X[0]&&Y[1]==X[1]&&Y[2]>=X[2]))?true:false}function v(ac,Y,ad,ab){if(M.ie&&M.mac){return}var aa=j.getElementsByTagName("head")[0];if(!aa){return}var X=(ad&&typeof ad=="string")?ad:"screen";if(ab){n=null;G=null}if(!n||G!=X){var Z=C("style");Z.setAttribute("type","text/css");Z.setAttribute("media",X);n=aa.appendChild(Z);if(M.ie&&M.win&&typeof j.styleSheets!=D&&j.styleSheets.length>0){n=j.styleSheets[j.styleSheets.length-1]}G=X}if(M.ie&&M.win){if(n&&typeof n.addRule==r){n.addRule(ac,Y)}}else{if(n&&typeof j.createTextNode!=D){n.appendChild(j.createTextNode(ac+" {"+Y+"}"))}}}function w(Z,X){if(!m){return}var Y=X?"visible":"hidden";if(J&&c(Z)){c(Z).style.visibility=Y}else{v("#"+Z,"visibility:"+Y)}}function L(Y){var Z=/[\\\"<>\.;]/;var X=Z.exec(Y)!=null;return X&&typeof encodeURIComponent!=D?encodeURIComponent(Y):Y}var d=function(){if(M.ie&&M.win){window.attachEvent("onunload",function(){var ac=I.length;for(var ab=0;ab<ac;ab++){I[ab][0].detachEvent(I[ab][1],I[ab][2])}var Z=N.length;for(var aa=0;aa<Z;aa++){y(N[aa])}for(var Y in M){M[Y]=null}M=null;for(var X in swfobject){swfobject[X]=null}swfobject=null})}}();return{registerObject:function(ab,X,aa,Z){if(M.w3&&ab&&X){var Y={};Y.id=ab;Y.swfVersion=X;Y.expressInstall=aa;Y.callbackFn=Z;o[o.length]=Y;w(ab,false)}else{if(Z){Z({success:false,id:ab})}}},getObjectById:function(X){if(M.w3){return z(X)}},embedSWF:function(ab,ah,ae,ag,Y,aa,Z,ad,af,ac){var X={success:false,id:ah};if(M.w3&&!(M.wk&&M.wk<312)&&ab&&ah&&ae&&ag&&Y){w(ah,false);K(function(){ae+="";ag+="";var aj={};if(af&&typeof af===r){for(var al in af){aj[al]=af[al]}}aj.data=ab;aj.width=ae;aj.height=ag;var am={};if(ad&&typeof ad===r){for(var ak in ad){am[ak]=ad[ak]}}if(Z&&typeof Z===r){for(var ai in Z){if(typeof am.flashvars!=D){am.flashvars+="&"+ai+"="+Z[ai]}else{am.flashvars=ai+"="+Z[ai]}}}if(F(Y)){var an=u(aj,am,ah);if(aj.id==ah){w(ah,true)}X.success=true;X.ref=an}else{if(aa&&A()){aj.data=aa;P(aj,am,ah,ac);return}else{w(ah,true)}}if(ac){ac(X)}})}else{if(ac){ac(X)}}},switchOffAutoHideShow:function(){m=false},ua:M,getFlashPlayerVersion:function(){return{major:M.pv[0],minor:M.pv[1],release:M.pv[2]}},hasFlashPlayerVersion:F,createSWF:function(Z,Y,X){if(M.w3){return u(Z,Y,X)}else{return undefined}},showExpressInstall:function(Z,aa,X,Y){if(M.w3&&A()){P(Z,aa,X,Y)}},removeSWF:function(X){if(M.w3){y(X)}},createCSS:function(aa,Z,Y,X){if(M.w3){v(aa,Z,Y,X)}},addDomLoadEvent:K,addLoadEvent:s,getQueryParamValue:function(aa){var Z=j.location.search||j.location.hash;if(Z){if(/\?/.test(Z)){Z=Z.split("?")[1]}if(aa==null){return L(Z)}var Y=Z.split("&");for(var X=0;X<Y.length;X++){if(Y[X].substring(0,Y[X].indexOf("="))==aa){return L(Y[X].substring((Y[X].indexOf("=")+1)))}}}return""},expressInstallCallback:function(){if(a){var X=c(R);if(X&&l){X.parentNode.replaceChild(l,X);if(Q){w(Q,true);if(M.ie&&M.win){l.style.display="block"}}if(E){E(B)}}a=false}}}}();
@@ -0,0 +1,312 @@
1
+ // Copyright: Hiroshi Ichikawa <http://gimite.net/en/>
2
+ // Lincense: New BSD Lincense
3
+ // Reference: http://dev.w3.org/html5/websockets/
4
+ // Reference: http://tools.ietf.org/html/draft-hixie-thewebsocketprotocol
5
+
6
+ (function() {
7
+
8
+ if (window.WebSocket) return;
9
+
10
+ var console = window.console;
11
+ if (!console) console = {log: function(){ }, error: function(){ }};
12
+
13
+ function hasFlash() {
14
+ if ('navigator' in window && 'plugins' in navigator && navigator.plugins['Shockwave Flash']) {
15
+ return !!navigator.plugins['Shockwave Flash'].description;
16
+ }
17
+ if ('ActiveXObject' in window) {
18
+ try {
19
+ return !!new ActiveXObject('ShockwaveFlash.ShockwaveFlash').GetVariable('$version');
20
+ } catch (e) {}
21
+ }
22
+ return false;
23
+ }
24
+
25
+ if (!hasFlash()) {
26
+ console.error("Flash Player is not installed.");
27
+ return;
28
+ }
29
+
30
+ WebSocket = function(url, protocol, proxyHost, proxyPort, headers) {
31
+ var self = this;
32
+ self.readyState = WebSocket.CONNECTING;
33
+ self.bufferedAmount = 0;
34
+ WebSocket.__addTask(function() {
35
+ self.__flash =
36
+ WebSocket.__flash.create(url, protocol, proxyHost || null, proxyPort || 0, headers || null);
37
+
38
+ self.__flash.addEventListener("open", function(fe) {
39
+ try {
40
+ if (self.onopen) self.onopen();
41
+ } catch (e) {
42
+ console.error(e.toString());
43
+ }
44
+ });
45
+
46
+ self.__flash.addEventListener("close", function(fe) {
47
+ try {
48
+ if (self.onclose) self.onclose();
49
+ } catch (e) {
50
+ console.error(e.toString());
51
+ }
52
+ });
53
+
54
+ self.__flash.addEventListener("message", function(fe) {
55
+ var data = decodeURIComponent(fe.getData());
56
+ try {
57
+ if (self.onmessage) {
58
+ var e;
59
+ if (window.MessageEvent) {
60
+ e = document.createEvent("MessageEvent");
61
+ e.initMessageEvent("message", false, false, data, null, null, window);
62
+ } else { // IE
63
+ e = {data: data};
64
+ }
65
+ self.onmessage(e);
66
+ }
67
+ } catch (e) {
68
+ console.error(e.toString());
69
+ }
70
+ });
71
+
72
+ self.__flash.addEventListener("stateChange", function(fe) {
73
+ try {
74
+ self.readyState = fe.getReadyState();
75
+ self.bufferedAmount = fe.getBufferedAmount();
76
+ } catch (e) {
77
+ console.error(e.toString());
78
+ }
79
+ });
80
+
81
+ //console.log("[WebSocket] Flash object is ready");
82
+ });
83
+ }
84
+
85
+ WebSocket.prototype.send = function(data) {
86
+ if (!this.__flash || this.readyState == WebSocket.CONNECTING) {
87
+ throw "INVALID_STATE_ERR: Web Socket connection has not been established";
88
+ }
89
+ var result = this.__flash.send(data);
90
+ if (result < 0) { // success
91
+ return true;
92
+ } else {
93
+ this.bufferedAmount = result;
94
+ return false;
95
+ }
96
+ };
97
+
98
+ WebSocket.prototype.close = function() {
99
+ if (!this.__flash) return;
100
+ if (this.readyState != WebSocket.OPEN) return;
101
+ this.__flash.close();
102
+ // Sets/calls them manually here because Flash WebSocketConnection.close cannot fire events
103
+ // which causes weird error:
104
+ // > You are trying to call recursively into the Flash Player which is not allowed.
105
+ this.readyState = WebSocket.CLOSED;
106
+ if (this.onclose) this.onclose();
107
+ };
108
+
109
+ /**
110
+ * Implementation of {@link <a href="http://www.w3.org/TR/DOM-Level-2-Events/events.html#Events-registration">DOM 2 EventTarget Interface</a>}
111
+ *
112
+ * @param {string} type
113
+ * @param {function} listener
114
+ * @param {boolean} useCapture !NB Not implemented yet
115
+ * @return void
116
+ */
117
+ WebSocket.prototype.addEventListener = function(type, listener, useCapture) {
118
+ if (!('__events' in this)) {
119
+ this.__events = {};
120
+ }
121
+ if (!(type in this.__events)) {
122
+ this.__events[type] = [];
123
+ if ('function' == typeof this['on' + type]) {
124
+ this.__events[type].defaultHandler = this['on' + type];
125
+ this['on' + type] = WebSocket_FireEvent(this, type);
126
+ }
127
+ }
128
+ this.__events[type].push(listener);
129
+ };
130
+
131
+ /**
132
+ * Implementation of {@link <a href="http://www.w3.org/TR/DOM-Level-2-Events/events.html#Events-registration">DOM 2 EventTarget Interface</a>}
133
+ *
134
+ * @param {string} type
135
+ * @param {function} listener
136
+ * @param {boolean} useCapture NB! Not implemented yet
137
+ * @return void
138
+ */
139
+ WebSocket.prototype.removeEventListener = function(type, listener, useCapture) {
140
+ if (!('__events' in this)) {
141
+ this.__events = {};
142
+ }
143
+ if (!(type in this.__events)) return;
144
+ for (var i = this.__events.length; i > -1; --i) {
145
+ if (listener === this.__events[type][i]) {
146
+ this.__events[type].splice(i, 1);
147
+ break;
148
+ }
149
+ }
150
+ };
151
+
152
+ /**
153
+ * Implementation of {@link <a href="http://www.w3.org/TR/DOM-Level-2-Events/events.html#Events-registration">DOM 2 EventTarget Interface</a>}
154
+ *
155
+ * @param {WebSocketEvent} event
156
+ * @return void
157
+ */
158
+ WebSocket.prototype.dispatchEvent = function(event) {
159
+ if (!('__events' in this)) throw 'UNSPECIFIED_EVENT_TYPE_ERR';
160
+ if (!(event.type in this.__events)) throw 'UNSPECIFIED_EVENT_TYPE_ERR';
161
+
162
+ for (var i = 0, l = this.__events[event.type].length; i < l; ++ i) {
163
+ this.__events[event.type][i](event);
164
+ if (event.cancelBubble) break;
165
+ }
166
+
167
+ if (false !== event.returnValue &&
168
+ 'function' == typeof this.__events[event.type].defaultHandler)
169
+ {
170
+ this.__events[event.type].defaultHandler(event);
171
+ }
172
+ };
173
+
174
+ /**
175
+ *
176
+ * @param {object} object
177
+ * @param {string} type
178
+ */
179
+ function WebSocket_FireEvent(object, type) {
180
+ return function(data) {
181
+ var event = new WebSocketEvent();
182
+ event.initEvent(type, true, true);
183
+ event.target = event.currentTarget = object;
184
+ for (var key in data) {
185
+ event[key] = data[key];
186
+ }
187
+ object.dispatchEvent(event, arguments);
188
+ };
189
+ }
190
+
191
+ /**
192
+ * Basic implementation of {@link <a href="http://www.w3.org/TR/DOM-Level-2-Events/events.html#Events-interface">DOM 2 EventInterface</a>}
193
+ *
194
+ * @class
195
+ * @constructor
196
+ */
197
+ function WebSocketEvent(){}
198
+
199
+ /**
200
+ *
201
+ * @type boolean
202
+ */
203
+ WebSocketEvent.prototype.cancelable = true;
204
+
205
+ /**
206
+ *
207
+ * @type boolean
208
+ */
209
+ WebSocketEvent.prototype.cancelBubble = false;
210
+
211
+ /**
212
+ *
213
+ * @return void
214
+ */
215
+ WebSocketEvent.prototype.preventDefault = function() {
216
+ if (this.cancelable) {
217
+ this.returnValue = false;
218
+ }
219
+ };
220
+
221
+ /**
222
+ *
223
+ * @return void
224
+ */
225
+ WebSocketEvent.prototype.stopPropagation = function() {
226
+ this.cancelBubble = true;
227
+ };
228
+
229
+ /**
230
+ *
231
+ * @param {string} eventTypeArg
232
+ * @param {boolean} canBubbleArg
233
+ * @param {boolean} cancelableArg
234
+ * @return void
235
+ */
236
+ WebSocketEvent.prototype.initEvent = function(eventTypeArg, canBubbleArg, cancelableArg) {
237
+ this.type = eventTypeArg;
238
+ this.cancelable = cancelableArg;
239
+ this.timeStamp = new Date();
240
+ };
241
+
242
+
243
+ WebSocket.CONNECTING = 0;
244
+ WebSocket.OPEN = 1;
245
+ WebSocket.CLOSED = 2;
246
+
247
+ WebSocket.__tasks = [];
248
+
249
+ WebSocket.__initialize = function() {
250
+ if (!WebSocket.__swfLocation) {
251
+ //console.error("[WebSocket] set WebSocket.__swfLocation to location of WebSocketMain.swf");
252
+ //return;
253
+ WebSocket.__swfLocation = "swf/WebSocketMain.swf";
254
+ }
255
+ var container = document.createElement("div");
256
+ container.id = "webSocketContainer";
257
+ // Puts the Flash out of the window. Note that we cannot use display: none or visibility: hidden
258
+ // here because it prevents Flash from loading at least in IE.
259
+ container.style.position = "absolute";
260
+ container.style.left = "-100px";
261
+ container.style.top = "-100px";
262
+ var holder = document.createElement("div");
263
+ holder.id = "webSocketFlash";
264
+ container.appendChild(holder);
265
+ document.body.appendChild(container);
266
+ swfobject.embedSWF(
267
+ WebSocket.__swfLocation, "webSocketFlash", "8", "8", "9.0.0",
268
+ null, {bridgeName: "webSocket"}, null, null,
269
+ function(e) {
270
+ if (!e.success) console.error("[WebSocket] swfobject.embedSWF failed");
271
+ }
272
+ );
273
+ FABridge.addInitializationCallback("webSocket", function() {
274
+ try {
275
+ //console.log("[WebSocket] FABridge initializad");
276
+ WebSocket.__flash = FABridge.webSocket.root();
277
+ WebSocket.__flash.setCallerUrl(location.href);
278
+ for (var i = 0; i < WebSocket.__tasks.length; ++i) {
279
+ WebSocket.__tasks[i]();
280
+ }
281
+ WebSocket.__tasks = [];
282
+ } catch (e) {
283
+ console.error("[WebSocket] " + e.toString());
284
+ }
285
+ });
286
+ };
287
+
288
+ WebSocket.__addTask = function(task) {
289
+ if (WebSocket.__flash) {
290
+ task();
291
+ } else {
292
+ WebSocket.__tasks.push(task);
293
+ }
294
+ }
295
+
296
+ // called from Flash
297
+ function webSocketLog(message) {
298
+ console.log(decodeURIComponent(message));
299
+ }
300
+
301
+ // called from Flash
302
+ function webSocketError(message) {
303
+ console.error(decodeURIComponent(message));
304
+ }
305
+
306
+ if (window.addEventListener) {
307
+ window.addEventListener("load", WebSocket.__initialize, false);
308
+ } else {
309
+ window.attachEvent("onload", WebSocket.__initialize);
310
+ }
311
+
312
+ })();
@@ -0,0 +1,174 @@
1
+ /**
2
+ *
3
+ * Secure Hash Algorithm (SHA1)
4
+ * http://www.webtoolkit.info/
5
+ *
6
+ **/
7
+
8
+ function SHA1 (msg) {
9
+
10
+ function rotate_left(n,s) {
11
+ var t4 = ( n<<s ) | (n>>>(32-s));
12
+ return t4;
13
+ };
14
+
15
+ function lsb_hex(val) {
16
+ var str="";
17
+ var i;
18
+ var vh;
19
+ var vl;
20
+
21
+ for( i=0; i<=6; i+=2 ) {
22
+ vh = (val>>>(i*4+4))&0x0f;
23
+ vl = (val>>>(i*4))&0x0f;
24
+ str += vh.toString(16) + vl.toString(16);
25
+ }
26
+ return str;
27
+ };
28
+
29
+ function cvt_hex(val) {
30
+ var str="";
31
+ var i;
32
+ var v;
33
+
34
+ for( i=7; i>=0; i-- ) {
35
+ v = (val>>>(i*4))&0x0f;
36
+ str += v.toString(16);
37
+ }
38
+ return str;
39
+ };
40
+
41
+
42
+ function Utf8Encode(string) {
43
+ string = string.replace(/\r\n/g,"\n");
44
+ var utftext = "";
45
+
46
+ for (var n = 0; n < string.length; n++) {
47
+
48
+ var c = string.charCodeAt(n);
49
+
50
+ if (c < 128) {
51
+ utftext += String.fromCharCode(c);
52
+ }
53
+ else if((c > 127) && (c < 2048)) {
54
+ utftext += String.fromCharCode((c >> 6) | 192);
55
+ utftext += String.fromCharCode((c & 63) | 128);
56
+ }
57
+ else {
58
+ utftext += String.fromCharCode((c >> 12) | 224);
59
+ utftext += String.fromCharCode(((c >> 6) & 63) | 128);
60
+ utftext += String.fromCharCode((c & 63) | 128);
61
+ }
62
+
63
+ }
64
+
65
+ return utftext;
66
+ };
67
+
68
+ var blockstart;
69
+ var i, j;
70
+ var W = new Array(80);
71
+ var H0 = 0x67452301;
72
+ var H1 = 0xEFCDAB89;
73
+ var H2 = 0x98BADCFE;
74
+ var H3 = 0x10325476;
75
+ var H4 = 0xC3D2E1F0;
76
+ var A, B, C, D, E;
77
+ var temp;
78
+
79
+ msg = Utf8Encode(msg);
80
+
81
+ var msg_len = msg.length;
82
+
83
+ var word_array = new Array();
84
+ for( i=0; i<msg_len-3; i+=4 ) {
85
+ j = msg.charCodeAt(i)<<24 | msg.charCodeAt(i+1)<<16 |
86
+ msg.charCodeAt(i+2)<<8 | msg.charCodeAt(i+3);
87
+ word_array.push( j );
88
+ }
89
+
90
+ switch( msg_len % 4 ) {
91
+ case 0:
92
+ i = 0x080000000;
93
+ break;
94
+ case 1:
95
+ i = msg.charCodeAt(msg_len-1)<<24 | 0x0800000;
96
+ break;
97
+
98
+ case 2:
99
+ i = msg.charCodeAt(msg_len-2)<<24 | msg.charCodeAt(msg_len-1)<<16 | 0x08000;
100
+ break;
101
+
102
+ case 3:
103
+ i = msg.charCodeAt(msg_len-3)<<24 | msg.charCodeAt(msg_len-2)<<16 | msg.charCodeAt(msg_len-1)<<8| 0x80;
104
+ break;
105
+ }
106
+
107
+ word_array.push( i );
108
+
109
+ while( (word_array.length % 16) != 14 ) word_array.push( 0 );
110
+
111
+ word_array.push( msg_len>>>29 );
112
+ word_array.push( (msg_len<<3)&0x0ffffffff );
113
+
114
+
115
+ for ( blockstart=0; blockstart<word_array.length; blockstart+=16 ) {
116
+
117
+ for( i=0; i<16; i++ ) W[i] = word_array[blockstart+i];
118
+ for( i=16; i<=79; i++ ) W[i] = rotate_left(W[i-3] ^ W[i-8] ^ W[i-14] ^ W[i-16], 1);
119
+
120
+ A = H0;
121
+ B = H1;
122
+ C = H2;
123
+ D = H3;
124
+ E = H4;
125
+
126
+ for( i= 0; i<=19; i++ ) {
127
+ temp = (rotate_left(A,5) + ((B&C) | (~B&D)) + E + W[i] + 0x5A827999) & 0x0ffffffff;
128
+ E = D;
129
+ D = C;
130
+ C = rotate_left(B,30);
131
+ B = A;
132
+ A = temp;
133
+ }
134
+
135
+ for( i=20; i<=39; i++ ) {
136
+ temp = (rotate_left(A,5) + (B ^ C ^ D) + E + W[i] + 0x6ED9EBA1) & 0x0ffffffff;
137
+ E = D;
138
+ D = C;
139
+ C = rotate_left(B,30);
140
+ B = A;
141
+ A = temp;
142
+ }
143
+
144
+ for( i=40; i<=59; i++ ) {
145
+ temp = (rotate_left(A,5) + ((B&C) | (B&D) | (C&D)) + E + W[i] + 0x8F1BBCDC) & 0x0ffffffff;
146
+ E = D;
147
+ D = C;
148
+ C = rotate_left(B,30);
149
+ B = A;
150
+ A = temp;
151
+ }
152
+
153
+ for( i=60; i<=79; i++ ) {
154
+ temp = (rotate_left(A,5) + (B ^ C ^ D) + E + W[i] + 0xCA62C1D6) & 0x0ffffffff;
155
+ E = D;
156
+ D = C;
157
+ C = rotate_left(B,30);
158
+ B = A;
159
+ A = temp;
160
+ }
161
+
162
+ H0 = (H0 + A) & 0x0ffffffff;
163
+ H1 = (H1 + B) & 0x0ffffffff;
164
+ H2 = (H2 + C) & 0x0ffffffff;
165
+ H3 = (H3 + D) & 0x0ffffffff;
166
+ H4 = (H4 + E) & 0x0ffffffff;
167
+
168
+ }
169
+
170
+ var temp = cvt_hex(H0) + cvt_hex(H1) + cvt_hex(H2) + cvt_hex(H3) + cvt_hex(H4);
171
+
172
+ return temp.toLowerCase();
173
+
174
+ }