~ted/lazr-js/annoying-debug-message

« back to all changes in this revision

Viewing changes to src-js/lazrjs/yui/event/event-min.js

  • Committer: Launchpad Patch Queue Manager
  • Date: 2010-09-09 14:20:30 UTC
  • mfrom: (182.1.3 yui-3.2)
  • Revision ID: launchpad@pqm.canonical.com-20100909142030-13w6vo0ixfysxc15
[r=beuno] Update lazr-js to yui-3.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
Copyright (c) 2010, Yahoo! Inc. All rights reserved.
3
3
Code licensed under the BSD License:
4
4
http://developer.yahoo.com/yui/license.html
5
 
version: 3.1.2
6
 
build: 56
 
5
version: 3.2.0
 
6
build: 2676
7
7
*/
8
 
(function(){var stateChangeListener,GLOBAL_ENV=YUI.Env,config=YUI.config,doc=config.doc,docElement=doc.documentElement,doScrollCap=docElement.doScroll,add=YUI.Env.add,remove=YUI.Env.remove,targetEvent=(doScrollCap)?"onreadystatechange":"DOMContentLoaded",pollInterval=config.pollInterval||40,_ready=function(e){GLOBAL_ENV._ready();};if(!GLOBAL_ENV._ready){GLOBAL_ENV._ready=function(){if(!GLOBAL_ENV.DOMReady){GLOBAL_ENV.DOMReady=true;remove(doc,targetEvent,_ready);}};
9
 
/* DOMReady: based on work by: Dean Edwards/John Resig/Matthias Miller/Diego Perini */
10
 
if(doScrollCap){if(self!==self.top){stateChangeListener=function(){if(doc.readyState=="complete"){remove(doc,targetEvent,stateChangeListener);_ready();}};add(doc,targetEvent,stateChangeListener);}else{GLOBAL_ENV._dri=setInterval(function(){try{docElement.doScroll("left");clearInterval(GLOBAL_ENV._dri);GLOBAL_ENV._dri=null;_ready();}catch(domNotReady){}},pollInterval);}}else{add(doc,targetEvent,_ready);}}})();YUI.add("event-base",function(A){(function(){var C=YUI.Env,B=function(){A.fire("domready");};A.publish("domready",{fireOnce:true,async:true});if(C.DOMReady){B();}else{A.before(B,C,"_ready");}})();(function(){var C=A.UA,B={63232:38,63233:40,63234:37,63235:39,63276:33,63277:34,25:9,63272:46,63273:36,63275:35},D=function(F){try{if(F&&3==F.nodeType){F=F.parentNode;}}catch(E){return null;}return A.one(F);};A.DOMEventFacade=function(L,F,E){E=E||{};var H=L,G=F,I=A.config.doc,M=I.body,N=H.pageX,K=H.pageY,J,P,O=E.overrides||{};this.altKey=H.altKey;this.ctrlKey=H.ctrlKey;this.metaKey=H.metaKey;this.shiftKey=H.shiftKey;this.type=O.type||H.type;this.clientX=H.clientX;this.clientY=H.clientY;if(!N&&0!==N){N=H.clientX||0;K=H.clientY||0;if(C.ie){N+=Math.max(I.documentElement.scrollLeft,M.scrollLeft);K+=Math.max(I.documentElement.scrollTop,M.scrollTop);}}this._yuifacade=true;this._event=H;this.pageX=N;this.pageY=K;J=H.keyCode||H.charCode||0;if(C.webkit&&(J in B)){J=B[J];}this.keyCode=J;this.charCode=J;this.button=H.which||H.button;this.which=this.button;this.target=D(H.target||H.srcElement);this.currentTarget=D(G);P=H.relatedTarget;if(!P){if(H.type=="mouseout"){P=H.toElement;}else{if(H.type=="mouseover"){P=H.fromElement;}}}this.relatedTarget=D(P);if(H.type=="mousewheel"||H.type=="DOMMouseScroll"){this.wheelDelta=(H.detail)?(H.detail*-1):Math.round(H.wheelDelta/80)||((H.wheelDelta<0)?-1:1);}this.stopPropagation=function(){if(H.stopPropagation){H.stopPropagation();}else{H.cancelBubble=true;}E.stopped=1;};this.stopImmediatePropagation=function(){if(H.stopImmediatePropagation){H.stopImmediatePropagation();}else{this.stopPropagation();}E.stopped=2;};this.preventDefault=function(Q){if(H.preventDefault){H.preventDefault();}H.returnValue=Q||false;E.prevented=1;};this.halt=function(Q){if(Q){this.stopImmediatePropagation();}else{this.stopPropagation();}this.preventDefault();};};})();(function(){A.Env.evt.dom_wrappers={};A.Env.evt.dom_map={};var H=A.Env.evt,J=YUI.Env.add,D=YUI.Env.remove,G=function(){YUI.Env.windowLoaded=true;A.Event._load();D(window,"load",G);},B=function(){A.Event._unload();D(window,"unload",B);},C="domready",E="~yui|2|compat~",F=function(L){try{return(L&&typeof L!=="string"&&A.Lang.isNumber(L.length)&&!L.tagName&&!L.alert);}catch(K){return false;}},I=function(){var M=false,N=0,L=[],O=H.dom_wrappers,K=null,P=H.dom_map;return{POLL_RETRYS:1000,POLL_INTERVAL:40,lastError:null,_interval:null,_dri:null,DOMReady:false,startInterval:function(){if(!I._interval){I._interval=setInterval(A.bind(I._poll,I),I.POLL_INTERVAL);}},onAvailable:function(Q,U,Y,R,V,X){var W=A.Array(Q),S,T;for(S=0;S<W.length;S=S+1){L.push({id:W[S],fn:U,obj:Y,override:R,checkReady:V,compat:X});}N=this.POLL_RETRYS;setTimeout(A.bind(I._poll,I),0);T=new A.EventHandle({_delete:function(){if(T.handle){T.handle.detach();return;}var a,Z;for(a=0;a<W.length;a++){for(Z=0;Z<L.length;Z++){if(W[a]===L[Z].id){L.splice(Z,1);}}}}});return T;},onContentReady:function(U,R,T,S,Q){return this.onAvailable(U,R,T,S,true,Q);},attach:function(T,S,R,Q){return I._attach(A.Array(arguments,0,true));},_createWrapper:function(W,V,Q,R,U){var T,X=A.stamp(W),S="event:"+X+V;if(false===U){S+="native";}if(Q){S+="capture";}T=O[S];if(!T){T=A.publish(S,{silent:true,bubbles:false,contextFn:function(){if(R){return T.el;}else{T.nodeRef=T.nodeRef||A.one(T.el);return T.nodeRef;}}});T.overrides={};T.el=W;T.key=S;T.domkey=X;T.type=V;T.fn=function(Y){T.fire(I.getEvent(Y,W,(R||(false===U))));};T.capture=Q;if(W==A.config.win&&V=="load"){T.fireOnce=true;K=S;}O[S]=T;P[X]=P[X]||{};P[X][S]=T;J(W,V,T.fn,Q);}return T;},_attach:function(W,S){var b,d,U,a,Q,T=false,V,X=W[0],Y=W[1],R=W[2]||A.config.win,e=S&&S.facade,c=S&&S.capture,Z=S&&S.overrides;if(W[W.length-1]===E){b=true;}if(!Y||!Y.call){return false;}if(F(R)){d=[];A.each(R,function(g,f){W[2]=g;d.push(I._attach(W,S));});return new A.EventHandle(d);}else{if(A.Lang.isString(R)){if(b){U=A.DOM.byId(R);}else{U=A.Selector.query(R);switch(U.length){case 0:U=null;break;case 1:U=U[0];break;default:W[2]=U;return I._attach(W,S);}}if(U){R=U;}else{V=this.onAvailable(R,function(){V.handle=I._attach(W,S);},I,true,false,b);return V;}}}if(!R){return false;}if(A.Node&&R instanceof A.Node){R=A.Node.getDOMNode(R);}a=this._createWrapper(R,X,c,b,e);if(Z){A.mix(a.overrides,Z);}if(R==A.config.win&&X=="load"){if(YUI.Env.windowLoaded){T=true;}}if(b){W.pop();}Q=W[3];V=a._on(Y,Q,(W.length>4)?W.slice(4):null);if(T){a.fire();}return V;},detach:function(X,Y,S,V){var W=A.Array(arguments,0,true),a,T,Z,U,Q,R;if(W[W.length-1]===E){a=true;}if(X&&X.detach){return X.detach();}if(typeof S=="string"){if(a){S=A.DOM.byId(S);}else{S=A.Selector.query(S);T=S.length;if(T<1){S=null;}else{if(T==1){S=S[0];}}}}if(!S){return false;}if(S.detach){W.splice(2,1);return S.detach.apply(S,W);}else{if(F(S)){Z=true;for(U=0,T=S.length;U<T;++U){W[2]=S[U];Z=(A.Event.detach.apply(A.Event,W)&&Z);}return Z;}}if(!X||!Y||!Y.call){return this.purgeElement(S,false,X);}Q="event:"+A.stamp(S)+X;R=O[Q];if(R){return R.detach(Y);}else{return false;}},getEvent:function(T,R,Q){var S=T||window.event;
11
 
return(Q)?S:new A.DOMEventFacade(S,R,O["event:"+A.stamp(R)+T.type]);},generateId:function(Q){var R=Q.id;if(!R){R=A.stamp(Q);Q.id=R;}return R;},_isValidCollection:F,_load:function(Q){if(!M){M=true;if(A.fire){A.fire(C);}I._poll();}},_poll:function(){if(this.locked){return;}if(A.UA.ie&&!YUI.Env.DOMReady){this.startInterval();return;}this.locked=true;var R,Q,V,S,U,W,T=!M;if(!T){T=(N>0);}U=[];W=function(Z,a){var Y,X=a.override;if(a.compat){if(a.override){if(X===true){Y=a.obj;}else{Y=X;}}else{Y=Z;}a.fn.call(Y,a.obj);}else{Y=a.obj||A.one(Z);a.fn.apply(Y,(A.Lang.isArray(X))?X:[]);}};for(R=0,Q=L.length;R<Q;++R){V=L[R];if(V&&!V.checkReady){S=(V.compat)?A.DOM.byId(V.id):A.Selector.query(V.id,null,true);if(S){W(S,V);L[R]=null;}else{U.push(V);}}}for(R=0,Q=L.length;R<Q;++R){V=L[R];if(V&&V.checkReady){S=(V.compat)?A.DOM.byId(V.id):A.Selector.query(V.id,null,true);if(S){if(M||(S.get&&S.get("nextSibling"))||S.nextSibling){W(S,V);L[R]=null;}}else{U.push(V);}}}N=(U.length===0)?0:N-1;if(T){this.startInterval();}else{clearInterval(this._interval);this._interval=null;}this.locked=false;return;},purgeElement:function(T,Q,X){var V=(A.Lang.isString(T))?A.Selector.query(T,null,true):T,Z=this.getListeners(V,X),U,W,Y,S,R;if(Q&&V){Z=Z||[];S=A.Selector.query("*",V);U=0;W=S.length;for(;U<W;++U){R=this.getListeners(S[U],X);if(R){Z=Z.concat(R);}}}if(Z){U=0;W=Z.length;for(;U<W;++U){Y=Z[U];Y.detachAll();D(Y.el,Y.type,Y.fn,Y.capture);delete O[Y.key];delete P[Y.domkey][Y.key];}}},getListeners:function(U,T){var V=A.stamp(U,true),Q=P[V],S=[],R=(T)?"event:"+V+T:null;if(!Q){return null;}if(R){if(Q[R]){S.push(Q[R]);}R+="native";if(Q[R]){S.push(Q[R]);}}else{A.each(Q,function(X,W){S.push(X);});}return(S.length)?S:null;},_unload:function(Q){A.each(O,function(S,R){S.detachAll();D(S.el,S.type,S.fn,S.capture);delete O[R];delete P[S.domkey][R];});},nativeAdd:J,nativeRemove:D};}();A.Event=I;if(A.config.injected||YUI.Env.windowLoaded){G();}else{J(window,"load",G);}if(A.UA.ie){A.on(C,I._poll,I,true);}A.on("unload",B);I.Custom=A.CustomEvent;I.Subscriber=A.Subscriber;I.Target=A.EventTarget;I.Handle=A.EventHandle;I.Facade=A.EventFacade;I._poll();})();A.Env.evt.plugins.available={on:function(D,C,F,E){var B=arguments.length>4?A.Array(arguments,4,true):[];return A.Event.onAvailable.call(A.Event,F,C,E,B);}};A.Env.evt.plugins.contentready={on:function(D,C,F,E){var B=arguments.length>4?A.Array(arguments,4,true):[];return A.Event.onContentReady.call(A.Event,F,C,E,B);}};},"3.1.2",{requires:["event-custom-base"]});YUI.add("event-delegate",function(B){var I=B.Event,F=B.Lang,E={},A={mouseenter:"mouseover",mouseleave:"mouseout"},H=function(K){try{if(K&&3==K.nodeType){return K.parentNode;}}catch(J){}return K;},D=function(K,P,M){var Q=H((P.target||P.srcElement)),N=E[K],T,O,L,S,R;var J=function(X,U,V){var W;if(!X||X===V){W=false;}else{W=B.Selector.test(X,U,V)?X:J(X.parentNode,U,V);}return W;};for(T in N){if(N.hasOwnProperty(T)){O=N[T];S=N.fn;L=null;if(B.Selector.test(Q,T,M)){L=Q;}else{if(B.Selector.test(Q,((T.replace(/,/gi," *,"))+" *"),M)){L=J(Q,T,M);}}if(L){if(!R){R=new B.DOMEventFacade(P,M);R.container=R.currentTarget;}R.currentTarget=B.one(L);B.publish(O,{contextFn:function(){return R.currentTarget;}});if(S){S(R,O);}else{B.fire(O,R);}}}}},G=function(M,L,K){var O={focus:I._attachFocus,blur:I._attachBlur},N=O[M],J=[M,function(P){D(L,(P||window.event),K);},K];if(N){return N(J,{capture:true,facade:false});}else{return I._attach(J,{facade:false});}},C=B.cached(function(J){return J.replace(/[|,:]/g,"~");});I.delegate=function(R,U,K,W){if(!W){return false;}var O=B.Array(arguments,0,true),M=K,N;if(F.isString(K)){M=B.Selector.query(K,null,true);if(!M){N=I.onAvailable(K,function(){N.handle=I.delegate.apply(I,O);},I,true,false);return N;}}M=B.Node.getDOMNode(M);var S=B.stamp(M),L="delegate:"+S+R+C(W),J=R+S,Q=E[J],T,V,P;if(!Q){Q={};if(A[R]){if(!I._fireMouseEnter){return false;}R=A[R];Q.fn=I._fireMouseEnter;}T=G(R,J,M);B.after(function(X){if(T.sub==X){delete E[J];B.detachAll(L);}},T.evt,"_delete");Q.handle=T;E[J]=Q;}P=Q.listeners;Q.listeners=P?(P+1):1;Q[W]=L;O[0]=L;O.splice(2,2);V=B.on.apply(B,O);B.after(function(){Q.listeners=(Q.listeners-1);if(Q.listeners===0){Q.handle.detach();}},V,"detach");return V;};B.delegate=I.delegate;},"3.1.2",{requires:["node-base"]});YUI.add("event-mousewheel",function(C){var B="DOMMouseScroll",A=function(E){var D=C.Array(E,0,true),F;if(C.UA.gecko){D[0]=B;F=C.config.win;}else{F=C.config.doc;}if(D.length<3){D[2]=F;}else{D.splice(2,0,F);}return D;};C.Env.evt.plugins.mousewheel={on:function(){return C.Event._attach(A(arguments));},detach:function(){return C.Event.detach.apply(C.Event,A(arguments));}};},"3.1.2",{requires:["node-base"]});YUI.add("event-mouseenter",function(F){var C=F.Event,E=F.Lang,B=F.Env.evt.plugins,D={},A={on:function(M,O,H){var L=F.Array(arguments,0,true),J=H,K;if(E.isString(H)){J=F.all(H);if(J.size()===0){K=C.onAvailable(H,function(){K.handle=F.on.apply(F,L);},C,true,false);return K;}}var R=(M==="mouseenter")?"mouseover":"mouseout",Q=M+":"+F.stamp(J)+R,I=D[Q],N,P,G;if(!I){N=F.on(R,F.rbind(C._fireMouseEnter,F,Q),J);F.after(function(S){if(N.sub==S){delete D[Q];F.detachAll(Q);}},N.evt,"_delete");I={};I.handle=N;D[Q]=I;}G=I.count;I.count=G?(G+1):1;L[0]=Q;L.splice(2,1);P=F.on.apply(F,L);F.after(function(){I.count=(I.count-1);if(I.count===0){I.handle.detach();}},P,"detach");return P;}};C._fireMouseEnter=function(J,H){var G=J.relatedTarget,I=J.currentTarget;if(I!==G&&!I.contains(G)){F.publish(H,{contextFn:function(){return I;}});F.fire(H,J);}};B.mouseenter=A;B.mouseleave=A;},"3.1.2",{requires:["node-base"]});YUI.add("event-key",function(A){A.Env.evt.plugins.key={on:function(E,G,B,K,C){var I=A.Array(arguments,0,true),F,J,H,D;F=K&&K.split(":");if(!K||K.indexOf(":")==-1||!F[1]){I[0]="key"+((F&&F[0])||"press");return A.on.apply(A,I);}J=F[0];H=(F[1])?F[1].split(/,|\+/):null;D=(A.Lang.isString(B)?B:A.stamp(B))+K;D=D.replace(/,/g,"_");if(!A.getEvent(D)){A.on(E+J,function(P){var Q=false,M=false,N,L,O;for(N=0;N<H.length;
12
 
N=N+1){L=H[N];O=parseInt(L,10);if(A.Lang.isNumber(O)){if(P.charCode===O){Q=true;}else{M=true;}}else{if(Q||!M){Q=(P[L+"Key"]);M=!Q;}}}if(Q){A.fire(D,P);}},B);}I.splice(2,2);I[0]=D;return A.on.apply(A,I);}};},"3.1.2",{requires:["node-base"]});YUI.add("event-focus",function(A){(function(){var I=A.UA,J=A.Event,E=A.Env.evt.plugins,C=I.ie,F=(I.opera||I.webkit),D={focus:(C?"focusin":(F?"DOMFocusIn":"focus")),blur:(C?"focusout":(F?"DOMFocusOut":"blur"))},G={capture:(I.gecko?true:false)},H=function(M,L){var K=A.Array(M,0,true),N=M[2];L.overrides=L.overrides||{};L.overrides.type=M[0];if(N){if(A.DOM.isWindow(N)){L.capture=false;}else{K[0]=D[K[0]];}}return J._attach(K,L);},B={on:function(){return H(arguments,G);}};J._attachFocus=H;J._attachBlur=H;E.focus=B;E.blur=B;})();},"3.1.2",{requires:["node-base"]});YUI.add("event-resize",function(A){(function(){var C,B,E="window:resize",D=function(F){if(A.UA.gecko){A.fire(E,F);}else{if(B){B.cancel();}B=A.later(A.config.windowResizeDelay||40,A,function(){A.fire(E,F);});}};A.Env.evt.plugins.windowresize={on:function(H,G){if(!C){C=A.Event._attach(["resize",D]);}var F=A.Array(arguments,0,true);F[0]=E;return A.on.apply(A,F);}};})();},"3.1.2",{requires:["node-base"]});YUI.add("event",function(A){},"3.1.2",{use:["event-base","event-delegate","event-mousewheel","event-mouseenter","event-key","event-focus","event-resize"]});
 
 
b'\\ No newline at end of file'
 
8
(function(){var d,b=YUI.Env,c=YUI.config,h=c.doc,e=h&&h.documentElement,i=e&&e.doScroll,k=YUI.Env.add,f=YUI.Env.remove,g=(i)?"onreadystatechange":"DOMContentLoaded",a=c.pollInterval||40,j=function(l){b._ready();};if(!b._ready){b._ready=function(){if(!b.DOMReady){b.DOMReady=true;f(h,g,j);}};
 
9
/*! DOMReady: based on work by: Dean Edwards/John Resig/Matthias Miller/Diego Perini */
 
10
if(i){if(self!==self.top){d=function(){if(h.readyState=="complete"){f(h,g,d);j();}};k(h,g,d);}else{b._dri=setInterval(function(){try{e.doScroll("left");clearInterval(b._dri);b._dri=null;j();}catch(l){}},a);}}else{k(h,g,j);}}})();YUI.add("event-base",function(a){(function(){var c=YUI.Env,b=function(){a.fire("domready");};a.publish("domready",{fireOnce:true,async:true});if(c.DOMReady){b();}else{a.before(b,c,"_ready");}})();(function(){var c=a.UA,b={63232:38,63233:40,63234:37,63235:39,63276:33,63277:34,25:9,63272:46,63273:36,63275:35},d=function(g){try{if(g&&3==g.nodeType){g=g.parentNode;}}catch(f){return null;}return a.one(g);};a.DOMEventFacade=function(m,g,f){f=f||{};var i=m,h=g,j=a.config.doc,n=j.body,o=i.pageX,l=i.pageY,k,r,p=j.documentElement,q=f.overrides||{};this.altKey=i.altKey;this.ctrlKey=i.ctrlKey;this.metaKey=i.metaKey;this.shiftKey=i.shiftKey;this.type=q.type||i.type;this.clientX=i.clientX;this.clientY=i.clientY;if(("clientX" in i)&&(!o)&&(0!==o)){o=i.clientX;l=i.clientY;if(c.ie){o+=(p.scrollLeft||n.scrollLeft||0);l+=(p.scrollTop||n.scrollTop||0);}}this._yuifacade=true;this._event=i;this.pageX=o;this.pageY=l;k=i.keyCode||i.charCode||0;if(c.webkit&&(k in b)){k=b[k];}this.keyCode=k;this.charCode=k;this.button=i.which||i.button;this.which=this.button;this.target=d(i.target||i.srcElement);this.currentTarget=d(h);r=i.relatedTarget;if(!r){if(i.type=="mouseout"){r=i.toElement;}else{if(i.type=="mouseover"){r=i.fromElement;}}}this.relatedTarget=d(r);if(i.type=="mousewheel"||i.type=="DOMMouseScroll"){this.wheelDelta=(i.detail)?(i.detail*-1):Math.round(i.wheelDelta/80)||((i.wheelDelta<0)?-1:1);}this.stopPropagation=function(){if(i.stopPropagation){i.stopPropagation();}else{i.cancelBubble=true;}f.stopped=1;this.stopped=1;};this.stopImmediatePropagation=function(){if(i.stopImmediatePropagation){i.stopImmediatePropagation();}else{this.stopPropagation();}f.stopped=2;this.stopped=2;};this.preventDefault=function(e){if(i.preventDefault){i.preventDefault();}i.returnValue=e||false;f.prevented=1;this.prevented=1;};this.halt=function(e){if(e){this.stopImmediatePropagation();}else{this.stopPropagation();}this.preventDefault();};if(this._touch){this._touch(i,g,f);}};})();(function(){a.Env.evt.dom_wrappers={};a.Env.evt.dom_map={};var j=a.Env.evt,c=a.config,g=c.win,l=YUI.Env.add,e=YUI.Env.remove,i=function(){YUI.Env.windowLoaded=true;a.Event._load();e(g,"load",i);},b=function(){a.Event._unload();e(g,"unload",b);},d="domready",f="~yui|2|compat~",h=function(n){try{return(n&&typeof n!=="string"&&a.Lang.isNumber(n.length)&&!n.tagName&&!n.alert);}catch(m){return false;}},k=function(){var o=false,p=0,n=[],q=j.dom_wrappers,m=null,r=j.dom_map;return{POLL_RETRYS:1000,POLL_INTERVAL:40,lastError:null,_interval:null,_dri:null,DOMReady:false,startInterval:function(){if(!k._interval){k._interval=setInterval(a.bind(k._poll,k),k.POLL_INTERVAL);}},onAvailable:function(s,w,A,t,x,z){var y=a.Array(s),u,v;for(u=0;u<y.length;u=u+1){n.push({id:y[u],fn:w,obj:A,override:t,checkReady:x,compat:z});}p=this.POLL_RETRYS;setTimeout(a.bind(k._poll,k),0);v=new a.EventHandle({_delete:function(){if(v.handle){v.handle.detach();return;}var C,B;for(C=0;C<y.length;C++){for(B=0;B<n.length;B++){if(y[C]===n[B].id){n.splice(B,1);}}}}});return v;},onContentReady:function(w,t,v,u,s){return this.onAvailable(w,t,v,u,true,s);},attach:function(v,u,t,s){return k._attach(a.Array(arguments,0,true));},_createWrapper:function(y,x,s,t,w){var v,z=a.stamp(y),u="event:"+z+x;if(false===w){u+="native";}if(s){u+="capture";}v=q[u];if(!v){v=a.publish(u,{silent:true,bubbles:false,contextFn:function(){if(t){return v.el;}else{v.nodeRef=v.nodeRef||a.one(v.el);return v.nodeRef;}}});v.overrides={};v.el=y;v.key=u;v.domkey=z;v.type=x;v.fn=function(A){v.fire(k.getEvent(A,y,(t||(false===w))));};v.capture=s;if(y==g&&x=="load"){v.fireOnce=true;m=u;}q[u]=v;r[z]=r[z]||{};r[z][u]=v;l(y,x,v.fn,s);}return v;},_attach:function(y,x){var D,F,v,C,s,u=false,w,z=y[0],A=y[1],t=y[2]||g,G=x&&x.facade,E=x&&x.capture,B=x&&x.overrides;if(y[y.length-1]===f){D=true;}if(!A||!A.call){return false;}if(h(t)){F=[];a.each(t,function(I,H){y[2]=I;F.push(k._attach(y,x));});return new a.EventHandle(F);}else{if(a.Lang.isString(t)){if(D){v=a.DOM.byId(t);}else{v=a.Selector.query(t);switch(v.length){case 0:v=null;break;case 1:v=v[0];break;default:y[2]=v;return k._attach(y,x);}}if(v){t=v;}else{w=this.onAvailable(t,function(){w.handle=k._attach(y,x);},k,true,false,D);return w;}}}if(!t){return false;}if(a.Node&&t instanceof a.Node){t=a.Node.getDOMNode(t);}C=this._createWrapper(t,z,E,D,G);if(B){a.mix(C.overrides,B);}if(t==g&&z=="load"){if(YUI.Env.windowLoaded){u=true;}}if(D){y.pop();}s=y[3];w=C._on(A,s,(y.length>4)?y.slice(4):null);if(u){C.fire();}return w;},detach:function(z,A,u,x){var y=a.Array(arguments,0,true),C,v,B,w,s,t;if(y[y.length-1]===f){C=true;}if(z&&z.detach){return z.detach();}if(typeof u=="string"){if(C){u=a.DOM.byId(u);}else{u=a.Selector.query(u);v=u.length;if(v<1){u=null;}else{if(v==1){u=u[0];}}}}if(!u){return false;}if(u.detach){y.splice(2,1);return u.detach.apply(u,y);}else{if(h(u)){B=true;for(w=0,v=u.length;w<v;++w){y[2]=u[w];B=(a.Event.detach.apply(a.Event,y)&&B);}return B;}}if(!z||!A||!A.call){return this.purgeElement(u,false,z);}s="event:"+a.stamp(u)+z;t=q[s];if(t){return t.detach(A);}else{return false;}},getEvent:function(v,t,s){var u=v||g.event;return(s)?u:new a.DOMEventFacade(u,t,q["event:"+a.stamp(t)+v.type]);},generateId:function(s){var t=s.id;if(!t){t=a.stamp(s);s.id=t;}return t;},_isValidCollection:h,_load:function(s){if(!o){o=true;if(a.fire){a.fire(d);}k._poll();}},_poll:function(){if(this.locked){return;}if(a.UA.ie&&!YUI.Env.DOMReady){this.startInterval();
 
11
return;}this.locked=true;var t,s,x,u,w,y,v=!o;if(!v){v=(p>0);}w=[];y=function(B,C){var A,z=C.override;if(C.compat){if(C.override){if(z===true){A=C.obj;}else{A=z;}}else{A=B;}C.fn.call(A,C.obj);}else{A=C.obj||a.one(B);C.fn.apply(A,(a.Lang.isArray(z))?z:[]);}};for(t=0,s=n.length;t<s;++t){x=n[t];if(x&&!x.checkReady){u=(x.compat)?a.DOM.byId(x.id):a.Selector.query(x.id,null,true);if(u){y(u,x);n[t]=null;}else{w.push(x);}}}for(t=0,s=n.length;t<s;++t){x=n[t];if(x&&x.checkReady){u=(x.compat)?a.DOM.byId(x.id):a.Selector.query(x.id,null,true);if(u){if(o||(u.get&&u.get("nextSibling"))||u.nextSibling){y(u,x);n[t]=null;}}else{w.push(x);}}}p=(w.length===0)?0:p-1;if(v){this.startInterval();}else{clearInterval(this._interval);this._interval=null;}this.locked=false;return;},purgeElement:function(v,s,z){var x=(a.Lang.isString(v))?a.Selector.query(v,null,true):v,B=this.getListeners(x,z),w,y,A,u,t;if(s&&x){B=B||[];u=a.Selector.query("*",x);w=0;y=u.length;for(;w<y;++w){t=this.getListeners(u[w],z);if(t){B=B.concat(t);}}}if(B){w=0;y=B.length;for(;w<y;++w){A=B[w];A.detachAll();e(A.el,A.type,A.fn,A.capture);delete q[A.key];delete r[A.domkey][A.key];}}},getListeners:function(w,v){var x=a.stamp(w,true),s=r[x],u=[],t=(v)?"event:"+x+v:null,y=j.plugins;if(!s){return null;}if(t){if(y[v]&&y[v].eventDef){t+="_synth";}if(s[t]){u.push(s[t]);}t+="native";if(s[t]){u.push(s[t]);}}else{a.each(s,function(A,z){u.push(A);});}return(u.length)?u:null;},_unload:function(s){a.each(q,function(u,t){u.detachAll();e(u.el,u.type,u.fn,u.capture);delete q[t];delete r[u.domkey][t];});},nativeAdd:l,nativeRemove:e};}();a.Event=k;if(c.injected||YUI.Env.windowLoaded){i();}else{l(g,"load",i);}if(a.UA.ie){a.on(d,k._poll,k,true);}a.on("unload",b);k.Custom=a.CustomEvent;k.Subscriber=a.Subscriber;k.Target=a.EventTarget;k.Handle=a.EventHandle;k.Facade=a.EventFacade;k._poll();})();a.Env.evt.plugins.available={on:function(d,c,f,e){var b=arguments.length>4?a.Array(arguments,4,true):[];return a.Event.onAvailable.call(a.Event,f,c,e,b);}};a.Env.evt.plugins.contentready={on:function(d,c,f,e){var b=arguments.length>4?a.Array(arguments,4,true):[];return a.Event.onContentReady.call(a.Event,f,c,e,b);}};},"3.2.0",{requires:["event-custom-base"]});YUI.add("event-delegate",function(g){var d=g.Array,b=g.Lang,a=b.isString,f=g.Selector.test,c=g.Env.evt.handles;function e(q,s,j,i){var o=d(arguments,0,true),p=a(j)?j:null,n=q.split(/\|/),l,h,k,r,m;if(n.length>1){r=n.shift();q=n.shift();}l=g.Node.DOM_EVENTS[q];if(b.isObject(l)&&l.delegate){m=l.delegate.apply(l,arguments);}if(!m){if(!q||!s||!j||!i){return;}h=(p)?g.Selector.query(p,null,true):j;if(!h&&a(j)){m=g.on("available",function(){g.mix(m,g.delegate.apply(g,o),true);},j);}if(!m&&h){o.splice(2,2,h);if(a(i)){i=g.delegate.compileFilter(i);}m=g.on.apply(g,o);m.sub.filter=i;m.sub._notify=e.notifySub;}}if(m&&r){k=c[r]||(c[r]={});k=k[q]||(k[q]=[]);k.push(m);}return m;}e.notifySub=function(l,q,j){q=q.slice();if(this.args){q.push.apply(q,this.args);}var o=q[0],k=e._applyFilter(this.filter,q),h=o.currentTarget,m,p,n;if(k){k=d(k);for(m=k.length-1;m>=0;--m){n=k[m];q[0]=new g.DOMEventFacade(o,n,j);q[0].container=h;l=this.context||n;p=this.fn.apply(l,q);if(p===false){break;}}return p;}};e.compileFilter=g.cached(function(h){return function(j,i){return f(j._node,h,i.currentTarget._node);};});e._applyFilter=function(k,j){var m=j[0],h=m.currentTarget,l=m.target,i=[];j.unshift(l);while(l&&l!==h){if(k.apply(l,j)){i.push(l);}j[0]=l=l.get("parentNode");}if(i.length<=1){i=i[0];}j.shift();return i;};g.delegate=g.Event.delegate=e;},"3.2.0",{requires:["node-base"]});YUI.add("event-synthetic",function(b){var h=b.Env.evt.dom_map,d=b.Array,g=b.Lang,j=g.isObject,c=g.isString,e=b.Selector.query,i=function(){};function f(l,k){this.handle=l;this.emitFacade=k;}f.prototype.fire=function(q){var k=d(arguments,0,true),o=this.handle,p=o.evt,m=o.sub,r=m.context,l=m.filter,n=q||{};if(this.emitFacade){if(!q||!q.preventDefault){n=p._getFacade();if(j(q)&&!q.preventDefault){b.mix(n,q,true);k[0]=n;}else{k.unshift(n);}}n.type=p.type;n.details=k.slice();if(l){n.container=p.host;}}else{if(l&&j(q)&&q.currentTarget){k.shift();}}m.context=r||n.currentTarget||p.host;p.fire.apply(p,k);m.context=r;};function a(){this._init.apply(this,arguments);}b.mix(a,{Notifier:f,getRegistry:function(q,p,n){var o=q._node,m=b.stamp(o),l="event:"+m+p+"_synth",k=h[m]||(h[m]={});if(!k[l]&&n){k[l]={type:"_synth",fn:i,capture:false,el:o,key:l,domkey:m,notifiers:[],detachAll:function(){var r=this.notifiers,s=r.length;while(--s>=0){r[s].detach();}}};}return(k[l])?k[l].notifiers:null;},_deleteSub:function(l){if(l&&l.fn){var k=this.eventDef,m=(l.filter)?"detachDelegate":"detach";this.subscribers={};this.subCount=0;k[m](l.node,l,this.notifier,l.filter);k._unregisterSub(l);delete l.fn;delete l.node;delete l.context;}},prototype:{constructor:a,_init:function(){var k=this.publishConfig||(this.publishConfig={});this.emitFacade=("emitFacade" in k)?k.emitFacade:true;k.emitFacade=false;},processArgs:i,on:i,detach:i,delegate:i,detachDelegate:i,_on:function(m,o){var n=[],k=m[2],q=o?"delegate":"on",l,p;l=(c(k))?e(k):d(k);if(!l.length&&c(k)){p=b.on("available",function(){b.mix(p,b[q].apply(b,m),true);},k);return p;}b.each(l,function(t){var u=m.slice(),r,s;t=b.one(t);if(t){r=this.processArgs(u,o);if(o){s=u.splice(3,1)[0];}u.splice(0,4,u[1],u[3]);if(!this.preventDups||!this.getSubs(t,m,null,true)){p=this._getNotifier(t,u,r,s);this[q](t,p.sub,p.notifier,s);n.push(p);}}},this);return(n.length===1)?n[0]:new b.EventHandle(n);},_getNotifier:function(n,q,o,m){var s=new b.CustomEvent(this.type,this.publishConfig),p=s.on.apply(s,q),r=new f(p,this.emitFacade),l=a.getRegistry(n,this.type,true),k=p.sub;p.notifier=r;k.node=n;k.filter=m;k._extra=o;b.mix(s,{eventDef:this,notifier:r,host:n,currentTarget:n,target:n,el:n._node,_delete:a._deleteSub},true);l.push(p);return p;},_unregisterSub:function(m){var k=a.getRegistry(m.node,this.type),l;if(k){for(l=k.length-1;l>=0;--l){if(k[l].sub===m){k.splice(l,1);break;}}}},_detach:function(m){var r=m[2],p=(c(r))?e(r):d(r),q,o,k,n,l;
 
12
m.splice(2,1);for(o=0,k=p.length;o<k;++o){q=b.one(p[o]);if(q){n=this.getSubs(q,m);if(n){for(l=n.length-1;l>=0;--l){n[l].detach();}}}}},getSubs:function(l,q,k,n){var r=a.getRegistry(l,this.type),s=[],m,p,o;if(r){if(!k){k=this.subMatch;}for(m=0,p=r.length;m<p;++m){o=r[m];if(k.call(this,o.sub,q)){if(n){return o;}else{s.push(r[m]);}}}}return s.length&&s;},subMatch:function(l,k){return !k[1]||l.fn===k[1];}}},true);b.SyntheticEvent=a;b.Event.define=function(m,l,o){if(!l){l={};}var n=(j(m))?m:b.merge({type:m},l),p,k;if(o||!b.Node.DOM_EVENTS[n.type]){p=function(){a.apply(this,arguments);};b.extend(p,a,n);k=new p();m=k.type;b.Node.DOM_EVENTS[m]=b.Env.evt.plugins[m]={eventDef:k,on:function(){return k._on(d(arguments));},delegate:function(){return k._on(d(arguments),true);},detach:function(){return k._detach(d(arguments));}};}return k;};},"3.2.0",{requires:["node-base","event-custom"]});YUI.add("event-mousewheel",function(c){var b="DOMMouseScroll",a=function(e){var d=c.Array(e,0,true),f;if(c.UA.gecko){d[0]=b;f=c.config.win;}else{f=c.config.doc;}if(d.length<3){d[2]=f;}else{d.splice(2,0,f);}return d;};c.Env.evt.plugins.mousewheel={on:function(){return c.Event._attach(a(arguments));},detach:function(){return c.Event.detach.apply(c.Event,a(arguments));}};},"3.2.0",{requires:["node-base"]});YUI.add("event-mouseenter",function(c){function b(h,d){var g=h.currentTarget,f=h.relatedTarget;if(g!==f&&!g.contains(f)){d.fire(h);}}var a={proxyType:"mouseover",on:function(f,d,e){d.onHandle=f.on(this.proxyType,b,null,e);},detach:function(e,d){d.onHandle.detach();},delegate:function(g,e,f,d){e.delegateHandle=c.delegate(this.proxyType,b,g,d,null,f);},detachDelegate:function(e,d){d.delegateHandle.detach();}};c.Event.define("mouseenter",a,true);c.Event.define("mouseleave",c.merge(a,{proxyType:"mouseout"}),true);},"3.2.0",{requires:["event-synthetic"]});YUI.add("event-key",function(a){a.Env.evt.plugins.key={on:function(e,g,b,k,c){var i=a.Array(arguments,0,true),f,j,h,d;f=k&&k.split(":");if(!k||k.indexOf(":")==-1||!f[1]){i[0]="key"+((f&&f[0])||"press");return a.on.apply(a,i);}j=f[0];h=(f[1])?f[1].split(/,|\+/):null;d=(a.Lang.isString(b)?b:a.stamp(b))+k;d=d.replace(/,/g,"_");if(!a.getEvent(d)){a.on(e+j,function(p){var q=false,m=false,n,l,o;for(n=0;n<h.length;n=n+1){l=h[n];o=parseInt(l,10);if(a.Lang.isNumber(o)){if(p.charCode===o){q=true;}else{m=true;}}else{if(q||!m){q=(p[l+"Key"]);m=!q;}}}if(q){a.fire(d,p);}},b);}i.splice(2,2);i[0]=d;return a.on.apply(a,i);}};},"3.2.0",{requires:["node-base"]});YUI.add("event-focus",function(e){var d=e.Event,c=e.Lang,a=c.isString,b=c.isFunction(e.DOM.create('<p onbeforeactivate=";">').onbeforeactivate);function f(h,g,j){var i="_"+h+"Notifiers";e.Event.define(h,{_attach:function(l,m,k){if(e.DOM.isWindow(l)){return d._attach([h,function(n){m.fire(n);},l]);}else{return d._attach([g,this._proxy,l,this,m,k],{capture:true});}},_proxy:function(o,s,p){var m=o.target,q=m.getData(i),t=e.stamp(o.currentTarget._node),k=(b||o.target!==o.currentTarget),l=s.handle.sub,r=[m,o].concat(l.args||[]),n;s.currentTarget=(p)?m:o.currentTarget;s.container=(p)?o.currentTarget:null;if(!l.filter||l.filter.apply(m,r)){if(!q){q={};m.setData(i,q);if(k){n=d._attach([j,this._notify,m._node]).sub;n.once=true;}}if(!q[t]){q[t]=[];}q[t].push(s);if(!k){this._notify(o);}}},_notify:function(p,l){var m=p.currentTarget,r=m.getData(i),s=m.get("ownerDocument")||m,q=m,k=[],t,n,o;if(r){while(q&&q!==s){k.push.apply(k,r[e.stamp(q)]||[]);q=q.get("parentNode");}k.push.apply(k,r[e.stamp(s)]||[]);for(n=0,o=k.length;n<o;++n){t=k[n];p.currentTarget=k[n].currentTarget;if(t.container){p.container=t.container;}else{delete p.container;}t.fire(p);}m.clearData(i);}},on:function(m,k,l){k.onHandle=this._attach(m._node,l);},detach:function(l,k){k.onHandle.detach();},delegate:function(n,l,m,k){if(a(k)){l.filter=e.delegate.compileFilter(k);}l.delegateHandle=this._attach(n._node,m,true);},detachDelegate:function(l,k){k.delegateHandle.detach();}},true);}if(b){f("focus","beforeactivate","focusin");f("blur","beforedeactivate","focusout");}else{f("focus","focus","focus");f("blur","blur","blur");}},"3.2.0",{requires:["event-synthetic"]});YUI.add("event-resize",function(a){(function(){var c,b,e="window:resize",d=function(f){if(a.UA.gecko){a.fire(e,f);}else{if(b){b.cancel();}b=a.later(a.config.windowResizeDelay||40,a,function(){a.fire(e,f);});}};a.Env.evt.plugins.windowresize={on:function(h,g){if(!c){c=a.Event._attach(["resize",d]);}var f=a.Array(arguments,0,true);f[0]=e;return a.on.apply(a,f);}};})();},"3.2.0",{requires:["node-base"]});YUI.add("event",function(a){},"3.2.0",{use:["event-base","event-delegate","event-synthetic","event-mousewheel","event-mouseenter","event-key","event-focus","event-resize"]});
 
 
b'\\ No newline at end of file'