/*! * Bean - copyright (c) Jacob Thornton 2011-2012 * https://github.com/fat/bean * MIT license */ (function(a,c,b){if(typeof module!="undefined"&&module.exports){module.exports=b()}else{if(typeof define=="function"&&define.amd){define(b)}else{c[a]=b()}}})("bean",this,function(l,O){l=l||"bean";O=O||this;var G=window,H=O[l],t=/[^\.]*(?=\..*)\.|.*/,C=/\..*/,j="addEventListener",a="removeEventListener",g=document||{},u=g.documentElement||{},q=u[j],v=q?j:"attachEvent",A={},n=Array.prototype.slice,I=function(P,Q){return P.split(Q||" ")},k=function(P){return typeof P=="string"},o=function(P){return typeof P=="function"},z="click dblclick mouseup mousedown contextmenu mousewheel mousemultiwheel DOMMouseScroll mouseover mouseout mousemove selectstart selectend keydown keypress keyup orientationchange focus blur change reset select submit load unload beforeunload resize move DOMContentLoaded readystatechange message error abort scroll ",c="show input invalid touchstart touchmove touchend touchcancel gesturestart gesturechange gestureend textinput readystatechange pageshow pagehide popstate hashchange offline online afterprint beforeprint dragstart dragenter dragover dragleave drag drop dragend loadstart progress suspend emptied stalled loadmetadata loadeddata canplay canplaythrough playing waiting seeking seeked ended durationchange timeupdate play pause ratechange volumechange cuechange checking noupdate downloading cached updateready obsolete ",M=(function(R,Q,P){for(P=0;P0){P=I(P);for(R=P.length;R--;){F(T,P[R],V)}return T}U=S&&P.replace(C,"");if(U&&y[U]){U=y[U].base}if(!P||S){if(W=S&&P.replace(t,"")){W=I(W,".")}b(T,U,V,W)}else{if(o(P)){b(T,null,P)}else{for(Q in P){if(P.hasOwnProperty(Q)){F(T,Q,P[Q])}}}}return T},x=function(Q,Z,P,X){var W,V,T,R,U,Y,S;if(P===undefined&&typeof Z=="object"){for(V in Z){if(Z.hasOwnProperty(V)){x.call(this,Q,V,Z[V])}}return}if(!o(P)){W=X;U=n.call(arguments,4);X=m(P,W,w)}else{U=n.call(arguments,3);X=W=P}T=I(Z);if(this===A){X=s(F,Q,Z,X,W)}for(R=T.length;R--;){S=K.put(Y=new i(Q,T[R].replace(C,""),X,W,I(T[R].replace(t,""),"."),U,false));if(Y[v]&&S){J(Q,Y.eventType,true,Y.customType)}}return Q},f=function(R,Q,S,P){return x.apply(null,!k(S)?n.call(arguments):[R,S,Q,P].concat(arguments.length>3?n.call(arguments,5):[]))},h=function(){return x.apply(A,arguments)},r=function(S,X,V){var U=I(X),T,R,Q,W,P;for(T=U.length;T--;){X=U[T].replace(C,"");if(W=U[T].replace(t,"")){W=I(W,".")}if(!W&&!V&&S[v]){L(M[X],X,S)}else{P=K.get(S,X,null,false);V=[false].concat(V);for(R=0,Q=P.length;R