YUI.add("array-extras",function(n,r){var a=n.Array,u=n.Lang,f=Array.prototype;a.lastIndexOf=u._isNative(f.lastIndexOf)?function(n,r,t){return t||0===t?n.lastIndexOf(r,t):n.lastIndexOf(r)}:function(n,r,t){var e=n.length,i=e-1;if(-1<(i=!t&&0!==t?i:Math.min(t<0?e+t:t,e))&&0<e)for(;-1<i;--i)if(i in n&&n[i]===r)return i;return-1},a.unique=function(n,r){var t,e,i,u,a=0,f=n.length,l=[];n:for(;a<f;a++){for(u=n[a],t=0,i=l.length;t<i;t++)if(e=l[t],r){if(r.call(n,u,e,a,n))continue n}else if(u===e)continue n;l.push(u)}return l},a.filter=u._isNative(f.filter)?function(n,r,t){return f.filter.call(n,r,t)}:function(n,r,t){for(var e,i=0,u=n.length,a=[];i<u;++i)i in n&&(e=n[i],r.call(t,e,i,n))&&a.push(e);return a},a.reject=function(n,e,i){return a.filter(n,function(n,r,t){return!e.call(i,n,r,t)})},a.every=u._isNative(f.every)?function(n,r,t){return f.every.call(n,r,t)}:function(n,r,t){for(var e=0,i=n.length;e<i;++e)if(e in n&&!r.call(t,n[e],e,n))return!1;return!0},a.map=u._isNative(f.map)?function(n,r,t){return f.map.call(n,r,t)}:function(n,r,t){for(var e=0,i=n.length,u=f.concat.call(n);e<i;++e)e in n&&(u[e]=r.call(t,n[e],e,n));return u},a.reduce=u._isNative(f.reduce)?function(n,r,i,u){return f.reduce.call(n,function(n,r,t,e){return i.call(u,n,r,t,e)},r)}:function(n,r,t,e){for(var i=0,u=n.length,a=r;i<u;++i)i in n&&(a=t.call(e,a,n[i],i,n));return a},a.find=function(n,r,t){for(var e=0,i=n.length;e<i;e++)if(e in n&&r.call(t,n[e],e,n))return n[e];return null},a.grep=function(n,t){return a.filter(n,function(n,r){return t.test(n)})},a.partition=function(t,e,i){var u={matches:[],rejects:[]};return a.each(t,function(n,r){(e.call(i,n,r,t)?u.matches:u.rejects).push(n)}),u},a.zip=function(n,t){var e=[];return a.each(n,function(n,r){e.push([n,t[r]])}),e},a.flatten=function(n){var r,t,e,i=[];if(n)for(r=0,t=n.length;r<t;++r)e=n[r],u.isArray(e)?i.push.apply(i,a.flatten(e)):i.push(e);return i}},"patched-v3.18.7",{requires:["yui-base"]});