function J(){return function(){}}function K(o){return function(){return o}} (function(o,x){function n(){}function da(a,b){var c=x.createElement("div");c.className=a;for(var d=a="",e=0;e/g,">")}function Da(a){if(!a||!a.replace)return a;return a.replace(//g,">").replace(/\"/g,""")}function ga(a,b){if(!a)throw"Missing this";if(!_.isFunction(b))throw"Missing function";return function(){return b.apply(a,arguments)}}function Ea(a,b){return function(){for(var c=[this],d=0;d>2;c=(c&3)<<4|d>>4;g=(d&15)<<2|e>>6;h=e&63;if(isNaN(d))g=h=64;else if(isNaN(e))h=64;b=b+this.u.charAt(f)+this.u.charAt(c)+this.u.charAt(g)+this.u.charAt(h)}return b},ud:function(a){var b="",c,d,e, f,g,h=0;for(a=a.replace(/[^A-Za-z0-9\+\/\=]/g,"");h>4;d=(d&15)<<4|f>>2;e=(f&3)<<6|g;b+=String.fromCharCode(c);if(f!=64)b+=String.fromCharCode(d);if(g!=64)b+=String.fromCharCode(e)}return b=ba.qb(b)},rb:function(a){a=a.replace(/\r\n/g,"\n");for(var b="",c=0;c127&&d<2048)b+= String.fromCharCode(d>>6|192);else{b+=String.fromCharCode(d>>12|224);b+=String.fromCharCode(d>>6&63|128)}b+=String.fromCharCode(d&63|128)}}return b},qb:function(a){for(var b="",c=0,d=c1=c2=0;c191&&d<224){c2=a.charCodeAt(c+1);b+=String.fromCharCode((d&31)<<6|c2&63);c+=2}else{c2=a.charCodeAt(c+1);c3=a.charCodeAt(c+2);b+=String.fromCharCode((d&15)<<12|(c2&63)<<6|c3&63);c+=3}}return b}};if(typeof x.getAttribute=="undefined")x.getAttribute= J();if(typeof Node=="undefined")Node={ELEMENT_NODE:1,ATTRIBUTE_NODE:2,TEXT_NODE:3,CDATA_SECTION_NODE:4,ENTITY_REFERENCE_NODE:5,ENTITY_NODE:6,PROCESSING_INSTRUCTION_NODE:7,COMMENT_NODE:8,DOCUMENT_NODE:9,DOCUMENT_TYPE_NODE:10,DOCUMENT_FRAGMENT_NODE:11,NOTATION_NODE:12};o.console||(o.console={log:n,error:n});var R,q=_.each,S=_.extend,k=o.jQuery,W=k.browser.msie;function r(){o.console.log.apply(this,arguments)}function $(){o.console.error.apply(this,arguments)}var m=o.angular||(o.angular={}),Ca=m.validator|| (m.validator={}),s=m.filter||(m.filter={}),ca=m.callbacks||(m.callbacks={});m.alert||(m.alert=function(){r(arguments);o.alert.apply(o,arguments)});ia.prototype={load:function(){this.Fb();this.Na("/stylesheets/jquery-ui/smoothness/jquery-ui-1.7.1.css");this.Na("/stylesheets/css");r("Server: "+this.i.z);this.Eb();this.Db();this.zb()},Eb:function(){r("Loader.configureJQueryPlugins()");k.fn.scope=function(){for(var a=this;a&&a.get(0);){var b=a.data("scope");if(b)return b;a=a.parent()}return null};k.fn.controller= function(){return this.data("controller")||Q.Yb}},Ic:function(){return""+(new Date).getTime()},Db:function(){var a=this.i;if(!a.G){var b=a.z.match(/https?:\/\/([\w]*)/);a.G=b?b[1]:"$MEMORY"}},zb:function(){function a(){g.Sb(function(l){!l&&c.find("[ng-auth=eager]").length&&g.ja()})}r("Loader.bindHtml()");var b=new ja(this.location),c=this.document,d=new na(this.i.z,this.i.G),e=new z(c[0],d,b,this.i);d.tc=Ea(e,e.e);d=new P(c.find("body"),this.i.z);var f=this.i.G=="$MEMORY"?new aa(this.window):new ka(this.i.z, k.getScript);f=new la(f,new U(k(c.body)),function(){e.c()});var g=new ma(f,d),h="/data/"+this.i.G,i=new T(function(l,p){f.N("POST",h,l,p)},g,e.anchor);e.cb.push(function(){i.Fa()});var j=new w({$anchor:e.anchor,$binder:e,$config:this.i,$console:o.console,$datastore:i,$save:function(l){i.Cc(j.q,l,e.anchor)},$window:o,$uid:this.Ic,$users:g},"ROOT");c.data("scope",j);r("$binder.entity()");e.K(j);r("$binder.compile()");e.compile();r("ControlBar.bind()");d.bind();r("$users.fetchCurrentUser()");a();r("PopUp.bind()"); (new B(c)).bind();r("$binder.parseAnchor()");e.Va();r("$binder.executeInit()");e.Rb();r("$binder.updateView()");e.c();b.La=ga(e,e.vc,b);b.Cd=function(){alert("update")};b.watch();c.find("body").show();r("ready()")},Fb:function(){var a=o.location.href+"#";a=a.split("#")[1];var b={Lb:null};a=a.split("&");for(var c=0;c=0&&a.splice(c,1);return b},find:function(a,b,c){if(b){var d=m.Function.compile(b);_.detect(a,function(e){if(d(e)){c= e;return true}});return c}},findById:function(a,b){return m.Xc.find(a,function(c){return c.A==b},null)},filter:function(a,b){var c=[];c.Ab=function(j){for(var l=0;l-1;case "object":for(var p in j)if(p.charAt(0)!=="$"&&e(j[p],l))return true;return false;case "array":for(p=0;p=0&&a.splice(d,1);a.unshift((c?"-":"+")+b);return a}, orderByDirection:function(a,b,c,d){c=c||"ng-ascend";d=d||"ng-descend";a=a[0]||"";var e=true;if(a.charAt(0)=="-"){a=a.substring(1);e=false}else if(a.charAt(0)=="+")a=a.substring(1);return a==b?e?c:d:""},merge:function(a,b,c){var d=a[b];if(!d){d={};a[b]=d}Y(c,d);return a}},Ga={quote:function(a){return'"'+a.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n").replace(/\f/g,"\\f").replace(/\r/g,"\\r").replace(/\t/g,"\\t").replace(/\v/g,"\\v")+'"'},quoteUnicode:function(a){a=m.String.quote(a); for(var b=[],c=0;c-1;){c1||z.J(a[0])!==null};z.J=function(a){return(a=a.replace(/\n/gm," ").match(/^\{\{(.*)\}\}$/))?a[1]:null};z.prototype={wc:function(a){var b={};a.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(c,d,e){if(d)b[decodeURIComponent(d)]=decodeURIComponent(e)});return b},Va:function(a){var b=this;a=a||this.pa.Ha();var c=a.indexOf("#");if(!(c<0)){a=this.wc(a.substring(c+1));q(b.anchor,function(d,e){delete b.anchor[e]});q(a,function(d,e){b.anchor[e]=d})}},vc:function(a){r("URL change detected", a);this.Va(a);this.c()},Jc:function(){var a=this.pa.Ha(),b=a.indexOf("#");if(b>-1)a=a.substring(0,b);a+="#";b="";for(var c in this.anchor){var d=this.anchor[c];if(typeof d==="undefined"||d===null)delete this.anchor[c];else{a+=b+encodeURIComponent(c);if(d!==true)a+="="+encodeURIComponent(d);b="&"}}this.pa.Fc(a);return a},c:function(){(new Date).getTime();var a=k(this.C).scope();a.j("$invalidWidgets",[]);a.c();(new Date).getTime();this.Jc();_.each(this.cb,function(b){b()})},U:function(a){var b=k(this.C), c=b.find(a);if(b.is(a))c=c.andSelf();return c},Rb:function(){this.U("[ng-init]").each(function(){var a=k(this),b=a.scope();try{b.eval(a.attr("ng-init"))}catch(c){alert("EVAL ERROR:\n"+a.attr("ng-init")+"\n"+y(c,true))}})},K:function(a){this.U("[ng-entity]").attr("ng-watch",function(){try{var b=k(this);return a.K(b.attr("ng-entity"))+(b.attr("ng-watch")||"")}catch(c){alert(c)}})},compile:function(){var a=k(this.C),b=this;if(this.i.bd){var c=this.U(":submit").not("[ng-action]");c.attr("ng-action","$save()"); c.not(":disabled").not("ng-bind-attr").attr("ng-bind-attr",'{disabled:"{{$invalidWidgets}}"}')}this.Wa(this.C)(this.C,a.scope(),"");this.U("a[ng-action]").live("click",function(){var d=k(this);try{d.scope().eval(d.attr("ng-action"));d.removeAttr("ng-error");d.removeClass("ng-exception")}catch(e){d.addClass("ng-exception");d.attr("ng-error",y(e,true))}b.c();return false})},Hc:function(a,b,c){b=b.concat();var d=b.pop(),e=z.$(a.nodeValue);if(e.length>1||z.J(e[0])){var f=a.parentNode;if(ea(f)){f.setAttribute("ng-bind-template", a.nodeValue);c.push({path:b,b:function(l){return new N(l,l.getAttribute("ng-bind-template"))}})}else for(var g=0;g2&&a.setAttribute("ng-bind-attr",d)}a.getAttribute||r(a);var j=a.getAttribute("ng-repeat");if(j){a.removeAttribute("ng-repeat");var l=this.Wa(a);d=x.createComment("ng-repeat: "+j);e=a.parentNode;e.insertBefore(d,a);e.removeChild(a);function p(t,u,A){var I=k(a).clone();I.css("display","");I.attr("ng-repeat-index",""+A);I.data("scope",t);l(I[0],t,u+A+":");return I}c.push({path:b,b:function(t,u,A){return new Ba(k(t),j,p,A)}})}else{a.getAttribute("ng-eval")&&c.push({path:b, b:this.nc});a.getAttribute("ng-bind")&&c.push({path:b,b:this.Ta});a.getAttribute("ng-bind-attr")&&c.push({path:b,b:this.jc});a.getAttribute("ng-hide")&&c.push({path:b,b:this.oc});a.getAttribute("ng-show")&&c.push({path:b,b:this.pc});a.getAttribute("ng-class")&&c.push({path:b,b:this.kc});a.getAttribute("ng-class-odd")&&c.push({path:b,b:this.mc});a.getAttribute("ng-class-even")&&c.push({path:b,b:this.lc});a.getAttribute("ng-style")&&c.push({path:b,b:this.qc});a.getAttribute("ng-watch")&&c.push({path:b, b:this.rc});d=a.nodeName;if(d=="INPUT"||d=="TEXTAREA"||d=="SELECT"||d=="BUTTON"){var C=this;c.push({path:b,b:function(t,u,A){t.name=A+t.name.split(":").pop();return C.Pc.Gb(k(t),u)}})}if(d=="OPTION")if(!k("')};M.prototype={e:function(a){var b=this.view.find("input").attr("checked")?this.value:null;if(this.d===b)return false;else{a.j(this.$a,b);return true}},c:function(a){if((a=a.get(this.$a))&&this.value!==a){this.value=a;this.view.find("a").attr("href",this.value.url).text(this.value.text); this.view.find("span").text(m.filter.bytes(this.value.size))}this.view.find("input").attr("checked",!!a)}};Q.prototype={e:K(true),c:n};Q.Yb=new Q;var Ja=Q;oa.prototype={e:function(a){var b=this.view.value;if(this.d===b)return false;else{a.m(this.exp,b);this.d=b;return true}},c:function(a){var b=this.view,c=a.get(this.exp);if(typeof c==="undefined"){c=this.p;a.m(this.exp,c)}c=c?c:"";if(this.d!=c)this.d=b.value=c;var d=false;b.removeAttribute("ng-error");if(this.Bc)d=!(c&&c.length>0);var e=d?"Required Value": null;if(!d&&this.O&&c){e=a.Mc(this.O,c);d=!!e}if(this.Ka!==e){this.Ka=d;if(e!==null){b.setAttribute("ng-error",e);a.fc(this)}k(b).toggleClass("ng-validation-error",d)}}};pa.prototype={e:function(a){var b=this.view;b=b.checked?b.value:"";if(this.d===b)return false;else{a.m(this.exp,b);this.d=b;return true}},c:function(a){var b=this.view,c=a.eval(this.exp);if(typeof c==="undefined"){c=this.p;a.m(this.exp,c)}b.checked=b.value==""+c}};qa.prototype={e:function(a){if(this.view.selectedIndex<0)a.m(this.exp, null);else{var b=this.view.value;if(this.d===b)return false;else{a.m(this.exp,b);this.d=b;return true}}},c:function(a){var b=this.view,c=a.get(this.exp);if(typeof c==="undefined"){c=this.p;a.m(this.exp,c)}if(c!==this.d){b.value=c?c:"";this.d=c}}};ra.prototype={selected:function(){for(var a=[],b=this.view.options,c=0;cd;--b){var p=this.children.pop().element[0];p.parentNode.removeChild(p)}if(h&&h.element[0].nodeName==="OPTION")if(d=k(h.element[0].parentNode).data("controller")){d.d=undefined;d.c(a)}})}};B.va="mouseleave mouseout click dblclick keypress keyup";B.uc=function(){B.ma();var a=k(this);a.bind(B.va,B.ma);var b=a.position(),c=x.documentElement,d=(self.innerWidth||c&&c.clientWidth|| x.body.clientWidth)-b.left;c=a.hasClass("ng-exception")?"EXCEPTION:":"Validation error...";a=a.attr("ng-error");d=d>375?"left":"right";c=k("
"+c+"
"+a+"
");k("body").append(c);if(d==="left")a=b.left+this.offsetWidth+11;else{a=b.left-315;c.find(".ng-arrow-right").css({left:301})}c.css({left:a+"px",top:b.top-3+"px"});return true};B.ma=function(){k("#ng-callout").unbind(B.va, B.ma).remove();return true};B.prototype={bind:function(){this.C.find(".ng-validation-error,.ng-exception").live("mouseover",B.uc)}};U.kb='
loading....
';U.prototype={yb:function(){this.ca===0&&this.Pa.show();this.ca++},Ob:function(){this.ca--;this.ca===0&&this.Pa.hide("fold")}}})(window,document);