YUI.add("aui-toolbar",function(e,t){var n=e.Lang,r=n.isArray,i=n.isString,s=n.isFunction,o="boundingBox",u="btn",a="button",f="checkbox",l="children",c="click",h="createDocumentFragment",p="enclosingWidgetInitialized",d="focus",v="group",m="id",g="mousemove",y="normal",b="radio",w="title",E="toolbar",S="toolbarRenderer",x="vertical",T=".",N=" ",C=e.getClassName,k=C(u),L=C(u,v),A=C(u,v,f),O=C(u,v,b),M=C(u,v,x);e.Toolbar=e.Component.create({NAME:E,ATTRS:{children:{validator:r},toolbarRenderer:{valueFn:function(){return new e.ToolbarRenderer}}},UI_ATTRS:[l],isSupportedWidget:function(t){return e.instanceOf(t,e.Button)||e.instanceOf(t,e.ToggleButton)||e.instanceOf(t,e.ButtonGroup)},prototype:{CONTENT_TEMPLATE:null,TEMPLATES:{button:'<button class="aui-btn">{content}</button>',icon:'<i class="{cssClass}"></i>',group:'<div class="aui-btn-group {cssClass}"></div>'},bindUI:function(){var e=this,t=e.get(o);t.delegate([c,g,d],e._onUserInitInteraction,T+k,e)},add:function(t,n){var r=this,i=r.get(o),s=r.get(S);i.insert(s.render(e.Array(t)),n)},clear:function(){var e=this,t=e.get(o);t.get(l).remove()},getEnclosingWidget:function(t){return e.instanceOf(t,e.EventFacade)&&(t=t.domEvent?t.domEvent.target:t.target),e.Widget.getByNode(t)},item:function(t){var n=this,r=n.get(o).get(l).item(t),i;return n._initEnclosingWidgetIfNeeded(r),i=n.getEnclosingWidget(r),e.Toolbar.isSupportedWidget(i)?i:r},remove:function(e){var t=this,n=t.get(o);return n.get(l).item(e).remove()},_onUserInitInteraction:function(e){var t=this,n=e.currentTarget;t._initEnclosingWidgetIfNeeded(n)},_initEnclosingWidgetIfNeeded:function(t){if(!t||t.getData(p))return;t.setData(p,!0);var n=e.Widget.getByNode(t),r=e.instanceOf(n,e.Button)||e.instanceOf(n,e.ToggleButton),i=e.instanceOf(n,e.ButtonGroup);if(r||i)return;var s=t.ancestor(T+k,!0);s&&(e.Button.hasWidgetLazyConstructorData(t)?(new e.Button(e.Button.getWidgetLazyConstructorFromNodeData(t)),e.Button.setWidgetLazyConstructorNodeData(t,null)):t.plug(e.Plugin.Button));var o=t.ancestor(T+L,!0);if(o){var u;o.hasClass(A)?u=f:o.hasClass(O)&&(u=b),u&&new e.ButtonGroup({boundingBox:o,type:u,render:!0})}},_uiSetChildren:function(e){var t=this;if(!e)return;t.clear(),t.add(e)}}});var _=function(){};_.prototype={TEMPLATES:{button:e.Button.prototype.TEMPLATE,group:'<div class="'+L+' {cssClass}"></div>',icon:'<i class="{cssClass}" />'},RENDERER:{button:function(t){var r=this,i=t.value,s=i.domType||a,u,f;if(e.instanceOf(i,e.Button)||e.instanceOf(i,e.ToggleButton))return i.get(o);f=e.one(i.boundingBox||i.srcNode);if(f)try{f.setAttribute("type",s)}catch(l){}else f=e.Node.create(e.ButtonExt.getTypedButtonTemplate(r.TEMPLATES.button,s));u=[k,i.cssClass],i.primary&&u.push(e.ButtonCore.CLASS_NAMES.PRIMARY),f.addClass(u.join(N)),i.id&&f.setAttribute(m,i.id),i.label&&f.append(i.label);if(i.icon){var c=n.sub(r.TEMPLATES.icon,{cssClass:i.icon});e.Button.syncIconUI(f,c,i.iconAlign)}return i.title&&f.setAttribute(w,i.title),e.Button.setWidgetLazyConstructorNodeData(f,i),f},group:function(t){var r=this,i=t.value,s=t.groupType,u=t.orientation,a=[];if(e.instanceOf(i,e.ButtonGroup))return i.get(o);s===f?a.push(A):s===b&&a.push(O),u===x&&a.push(M);var l=e.Node.create(n.sub(r.TEMPLATES.group,{cssClass:a.join(N)}));return e.Array.each(i,function(t,n){var s=r.renderNode(t);l.appendChild(s),e.Toolbar.isSupportedWidget(t)||e.Button.setWidgetLazyConstructorNodeData(s,i[n])}),l}},render:function(t){var n=this;if(!t)return;var r=e.one(e.config.doc).invoke(h);return e.Array.each(t,function(e){r.appendChild(n.renderNode(e))}),r},renderNode:function(t){var n=this,r,i;if(e.Toolbar.isSupportedWidget(t))return t.render().get(o);r=n._getChildRenderHints(t),i=n.RENDERER[r.renderer];if(s(i))return i.call(n,r)},_getChildRenderHints:function(t){var n=null,s=y,o;return e.instanceOf(t,e.Button)?o=a:e.instanceOf(t,e.ButtonGroup)?o=v:r(t)?(o=v,n=i(t[0])?t.shift():null,s=i(t[0])?t.shift():y):o=a,{groupType:n,orientation:s,renderer:o,value:t}}},e.ToolbarRenderer=_},"2.0.0",{requires:["arraylist","arraylist-add","aui-component","aui-button-core"]});YUI.add("aui-widget-toolbars",function(e,t){var n=e.WidgetStdMod,r="boundingBox",i="toolbars",s="syncUI",o="toolbarsChange",u=function(){};u.ATTRS={toolbars:{},toolbarPosition:{value:{body:n.AFTER,footer:n.AFTER,header:n.BEFORE}}},u.prototype={toolbars:null,initializer:function(){var t=this;t.toolbars={},e.after(t._syncUIToolbars,t,s),t.after(o,t._afterToolbarsChange)},addToolbar:function(t,n){var i=this;return n=i.getToolbarSection(n),i.removeToolbar(n),e.instanceOf(t,e.Toolbar)||(t=new e.Toolbar({children:t,render:i.getStdModNode(n,!0)})),t.addTarget(i),i.toolbars[n]=t,i.setStdModContent(n,t.get(r),i.get("toolbarPosition."+n)),i._syncPrimaryButtonUI(),t},getToolbar:function(e){var t=this;return t.toolbars[t.getToolbarSection(e)]},getToolbarSection:function(e){return e||n.FOOTER},removeToolbar:function(e){var t=this,n=t.toolbars[t.getToolbarSection(e)];return n&&n.destroy(),n},_syncPrimaryButtonUI:function(){var t=this,n=t.get(r).one("."+e.ButtonCore.CLASS_NAMES.PRIMARY);n&&n.focus().focus()},_syncUIToolbars:function(){var e=this;e._uiSetToolbars(this.get(i))},_uiSetToolbars:function(t){var n=this;e.each(t,e.bind(n.addToolbar,n))}},e.WidgetToolbars=u},"2.0.0",{requires:["widget-stdmod","aui-toolbar"]});YUI.add("aui-modal",function(e,t){var n=e.Lang,r=e.UA,i=e.WidgetStdMod,s="ownerDocument",o=e.getClassName,u=".",a="",f=" ",l="br",c="click",h="destroyOnHide",p="draggable",d="draggableChange",v="fillHeight",m="height",g="modal",y="mousemove",b="resizable",w="resizableChange",E="visibleChange",S="width",x=o("modal-body"),T=o("modal-footer"),N=o("modal-header");e.Modal=e.Base.create(g,e.Widget,[e.WidgetCssClass,e.WidgetPosition,e.WidgetStdMod,e.WidgetToggle,e.WidgetAutohide,e.WidgetToolbars,e.WidgetPositionAlign,e.WidgetPositionConstrain,e.WidgetStack,e.WidgetModality],{initializer:function(){var t=this,n=[e.after(t._afterFillHeight,t,v),t.after("resize:end",e.bind(t._syncResizeDimensions,t)),t.after(d,t._afterDraggableChange),t.after(w,t._afterResizableChange),t.after(E,t._afterVisibleChange)];t._applyPlugin(t._onUserInitInteraction),t._eventHandles=n},destructor:function(){var t=this;(new e.EventHandle(t._eventHandles)).detach(),t._userInteractionHandle&&t._userInteractionHandle.detach()},_addBubbleTargets:function(t){var r=this;return n.isObject(t)||(t={}),e.mix(t,{bubbleTargets:r})},_afterFillHeight:function(e){var t=this;t._fillMaxHeight(t.get(m))},_afterDraggableChange:function(t){var n=this;t.newVal?n._applyPlugin(n._plugDrag):n.unplug(e.Plugin.Drag)},_afterResizableChange:function(t){var n=this;t.newVal?n._applyPlugin(n._plugResize):n.unplug(e.Plugin.Resize)},_afterVisibleChange:function(e){var t=this;!e.newVal&&t.get(h)&&t.destroy()},_applyPlugin:function(e){var t=this;r.touchEnabled?e.call(t):t._userInteractionHandle||(t._userInteractionHandle=t.once([c,y],t._onUserInitInteraction,t))},_fillMaxHeight:function(e){var t=this,n=t.get(v),r=t.getStdModNode(n,!0);r&&r.setStyle("maxHeight",e)},_getStdModTemplate:function(t){return e.Node.create(e.Modal.TEMPLATES[t],this._stdModNode.get(s))},_beforeResizeCorrectDimensions:function(t){var n=this;if(n.resize.proxy)return new e.Do.Prevent},_onUserInitInteraction:function(){var e=this,t=e.get(p),n=e.get(b);e._userInteractionHandle=null,t&&e._plugDrag(),n&&e._plugResize()},_plugDrag:function(){var t=this,n=t.get(p);t.plug(e.Plugin.Drag,t._addBubbleTargets(n))},_plugResize:function(){var t=this,n=t.get(b);t.plug(e.Plugin.Resize,t._addBubbleTargets(n)),e.before(t._beforeResizeCorrectDimensions,t.resize,"_correctDimensions",t)},_syncResizeDimensions:function(e){var t=this,n=e.info;t.set(S,n.offsetWidth),t.set(m,n.offsetHeight)}},{CSS_PREFIX:o(g),ATTRS:{bodyContent:{value:a},destroyOnHide:{validator:n.isBoolean,value:!1},draggable:{value:{handles:[u+N],plugins:[{fn:e.Plugin.DDConstrained}]}},resizable:{value:{handles:l}},toolbars:{valueFn:function(){var e=this;return{header:[{cssClass:"close",label:"\u00d7",on:{click:function(t){e.hide(),t.domEvent.stopPropagation()}},render:!0}]}}}},TEMPLATES:{header:'<div class="'+i.SECTION_CLASS_NAMES[i.HEADER]+f+N+'"></div>',body:'<div class="'+i.SECTION_CLASS_NAMES[i.BODY]+f+x+'"></div>',footer:'<div class="'+i.SECTION_CLASS_NAMES[i.FOOTER]+f+T+'"></div>'}})},"2.0.0",{requires:["widget","widget-autohide","widget-buttons","widget-modality","widget-position","widget-position-align","widget-position-constrain","widget-stack","widget-stdmod","dd-plugin","dd-constrain","resize-plugin","aui-classnamemanager","aui-widget-cssclass","aui-widget-toggle","aui-widget-toolbars"]});AUI.add(
	'liferay-widget-zindex',
	function(A) {
		var Lang = A.Lang;

		var STR_HOST = 'host';

		var WidgetZIndex = A.Component.create(
			{
				EXTENDS: A.Plugin.Base,

				NAME: 'widgetzindex',

				NS: 'zindex',

				prototype: {
					initializer: function() {
						var instance = this;

						var host = instance.get(STR_HOST);

						if (!host.get('rendered') && host.get('visible')) {
							instance._setHostZIndex();
						}

						instance.onHostEvent(
							'visibleChange',
							function(event) {
								if (event.newVal) {
									instance._setHostZIndex();
								}
							}
						);
					},

					_setHostZIndex: function() {
						var instance = this;

						instance.get(STR_HOST).set('zIndex', ++Liferay.zIndex.WINDOW);
					}
				}
			}
		);

		Liferay.WidgetZIndex = WidgetZIndex;
	},
	'',
	{
		requires: ['aui-modal', 'plugin']
	}
);AUI.add(
	'liferay-util-window',
	function(A) {
		var Lang = A.Lang;

		var DOM = A.DOM;

		var Util = Liferay.Util;
		var Window = Util.Window;

		var LiferayModal = A.Component.create(
			{
				NAME: A.Modal.NAME,

				ATTRS: {
					autoHeight: {
						value: false
					},

					autoHeightRatio: {
						value: 0.95
					},

					autoSizeNode: {
						setter: A.one
					},

					autoWidth: {
						value: false
					},

					autoWidthRatio: {
						value: 0.95
					}
				},

				EXTENDS: A.Modal,

				prototype: {
				}
			}
		);

		A.mix(
			Window,
			{
				DEFAULTS: {
					centered: true,
					modal: true,
					headerContent: '&nbsp;',
					visible: true,
					zIndex: Liferay.zIndex.WINDOW
				},

				IFRAME_SUFFIX: '_iframe_',

				TITLE_TEMPLATE: '<h3 />',

				_winResizeHandler: null,

				getByChild: function(child) {
					var instance = this;

					var node = A.one(child).ancestor('.modal', true);

					return A.Widget.getByNode(node);
				},

				getById: function(id) {
					var instance = this;

					return instance._map[id];
				},

				getWindow: function(config) {
					var instance = this;

					instance._ensureDefaultId(config);

					var modal = instance._getWindow(config);

					instance._setWindowDefaultSizeIfNeeded(modal);

					instance._bindDOMWinResizeIfNeeded();

					modal.render();

					return modal;
				},

				hideByChild: function(child) {
					var instance = this;

					return instance.getByChild(child).hide();
				},

				refreshByChild: function(child) {
					var instance = this;

					var dialog = instance.getByChild(child);

					if (dialog && dialog.io) {
						dialog.io.start();
					}
				},

				_bindDOMWinResizeIfNeeded: function() {
					var instance = this;

					if (!instance._winResizeHandler) {
						instance._winResizeHandler = A.getWin().after('windowresize', instance._syncWindowsUI, instance);
					}
				},

				_bindWindowHooks: function(modal, config) {
					var instance = this;

					var id = modal.get('id');

					var openingWindow = config.openingWindow;

					var refreshWindow = config.refreshWindow;

					modal._opener = openingWindow;
					modal._refreshWindow = refreshWindow;

					modal.after(
						'destroy',
						function(event) {
							instance._unregister(modal);

							modal = null;
						}
					);

					var liferayHandles = modal._liferayHandles;

					liferayHandles.push(
						Liferay.after(
							'hashChange',
							function(event) {
								modal.iframe.set('uri', event.uri);
							}
						)
					);

					liferayHandles.push(
						Liferay.after(
							'popupReady',
							function(event) {
								var iframeId = id + instance.IFRAME_SUFFIX;

								if (event.windowName === iframeId) {
									event.dialog = modal;
									event.details[0].dialog = modal;

									if (event.doc) {
										Util.afterIframeLoaded(event);

										var modalUtil = event.win.Liferay.Util;

										modalUtil.Window._opener = modal._opener;

										modalUtil.Window._name = id;
									}

									modal.iframe.node.focus();
								}
							}
						)
					);
				},

				_ensureDefaultId: function(config) {
					var instance = this;

					if (!Lang.isValue(config.id)) {
						config.id = A.guid();
					}

					if (!config.iframeId) {
						config.iframeId = config.id + instance.IFRAME_SUFFIX;
					}
				},

				_getWindow: function(config) {
					var instance = this;

					var id = config.id;

					var modalConfig = instance._getWindowConfig(config);

					var dialogIframeConfig = instance._getDialogIframeConfig(config);

					var modal = instance.getById(id);

					if (!modal) {
						var titleNode = A.Node.create(instance.TITLE_TEMPLATE);

						if (config.stack !== false) {
							A.mix(
								modalConfig,
								{
									plugins: [Liferay.WidgetZIndex]
								}
							);
						}

						modal = new LiferayModal(
							A.merge(
								{
									headerContent: titleNode,
									id: id
								},
								modalConfig
							)
						);

						modal.titleNode = titleNode;

						instance._register(modal);

						instance._bindWindowHooks(modal, config);
					}
					else {
						if (!config.zIndex && modal.hasPlugin('zindex')) {
							delete modalConfig.zIndex;
						}

						var openingWindow = config.openingWindow;

						modal._opener = openingWindow;
						modal._refreshWindow = config.refreshWindow;

						instance._map[id]._opener = openingWindow;

						modal.setAttrs(modalConfig);
					}

					if (dialogIframeConfig) {
						modal.plug(A.Plugin.DialogIframe, dialogIframeConfig);
					}

					if (!Lang.isValue(config.title)) {
						config.title = instance.DEFAULTS.headerContent;
					}

					modal.titleNode.html(config.title);

					modal.fillHeight(modal.bodyNode);

					return modal;
				},

				_getWindowConfig: function(config) {
					var instance = this;

					var modalConfig = A.merge(instance.DEFAULTS, config.dialog);

					var height = modalConfig.height;

					var width = modalConfig.width;

					if (height === 'auto' || height === '' || height === undefined || height > DOM.winHeight()) {
						modalConfig.autoHeight = true;
					}

					if (width === 'auto' || width === '' || width === undefined || width > DOM.winWidth()) {
						modalConfig.autoWidth = true;
					}

					modalConfig.id = config.id;

					delete modalConfig.headerContent;

					return modalConfig;
				},

				_getDialogIframeConfig: function(config) {
					var instance = this;

					var dialogIframeConfig;

					var iframeId = config.iframeId;

					var uri = config.uri;

					if (uri) {
						if (config.cache === false) {
							uri = Liferay.Util.addParams(A.guid() + '=' + Lang.now(), uri);
						}

						dialogIframeConfig = A.merge(
							config.dialogIframe,
							{
								bindLoadHandler: function() {
									var instance = this;

									var modal = instance.get('host');

									var popupReady = false;

									var liferayHandles = modal._liferayHandles;

									liferayHandles.push(
										Liferay.on(
											'popupReady',
											function(event) {
												instance.fire('load', event);

												popupReady = true;
											}
										)
									);

									liferayHandles.push(
										instance.node.on(
											'load',
											function(event) {
												if (!popupReady) {
													Liferay.fire(
														'popupReady',
														{
															windowName: iframeId
														}
													);
												}

												popupReady = false;
											}
										)
									);
								},

								iframeId: iframeId,
								uri: uri
							}
						);
					}

					return dialogIframeConfig;
				},

				_register: function(modal) {
					var instance = this;

					var id = modal.get('id');

					modal._liferayHandles = [];

					instance._map[id] = modal;
					instance._map[id + instance.IFRAME_SUFFIX] = modal;
				},

				_setWindowDefaultSizeIfNeeded: function(modal) {
					var instance = this;

					var autoSizeNode = modal.get('autoSizeNode');

					if (modal.get('autoHeight')) {
						var height;

						if (autoSizeNode) {
							height = autoSizeNode.get('offsetHeight');
						}
						else {
							height = DOM.winHeight();
						}

						height *= modal.get('autoHeightRatio');

						modal.set('height', height);
					}

					if (modal.get('autoWidth')) {
						var width;

						if (autoSizeNode) {
							width = autoSizeNode.get('offsetWidth');
						}
						else {
							width = DOM.winWidth();
						}

						width *= modal.get('autoWidthRatio');

						modal.set('width', width);
					}
				},

				_syncWindowsUI: function() {
					var instance = this;

					var modals = instance._map;

					A.each(
						modals,
						function(modal) {
							if (modal.get('visible')) {
								instance._setWindowDefaultSizeIfNeeded(modal);

								modal.align();
							}
						}
					);
				},

				_unregister: function(modal) {
					var instance = this;

					var id = modal.get('id');

					delete instance._map[id];
					delete instance._map[id + instance.IFRAME_SUFFIX];

					A.Array.invoke(modal._liferayHandles, 'detach');
				}
			}
		);
	},
	'',
	{
		requires: ['aui-dialog-iframe-deprecated', 'aui-modal', 'event-resize', 'liferay-widget-zindex']
	}
);;(function(A, Liferay) {
	var Language = {};

	Language.get = function(key) {
		return key;
	};

	A.use(
		'io-base',
		function(A) {
			Language.get = A.cached(
				function(key, extraParams) {
					var instance = this;

					var url = themeDisplay.getPathContext() + '/language/' + themeDisplay.getLanguageId() + '/' + key + '/';

					if (extraParams) {
						if (typeof extraParams == 'string') {
							url += extraParams;
						}
						else if (Liferay.Util.isArray(extraParams)) {
							url += extraParams.join('/');
						}
					}

					var authUrl = url;

					var authToken = Liferay.authToken;

					if (authToken) {
						authUrl = Liferay.Util.addParams('p_auth=' + authToken, url);
					}

					A.io(
						authUrl,
						{
							on: {
								complete: function(i, o) {
									value = o.responseText;
								}
							},
							sync: true,
							type: 'GET'
						}
					);

					return value;
				}
			);
		}
	);

	Liferay.Language = Language;
})(AUI(), Liferay);YUI.add("transition",function(e,t){var n="",r="",i=e.config.doc,s="documentElement",o=i[s].style,u="transition",a="transitionProperty",f,l,c,h,p,d,v={},m=["Webkit","Moz"],g={Webkit:"webkitTransitionEnd"},y=function(){this.init.apply(this,arguments)};y._TRANSFORM="transform",y._toCamel=function(e){return e=e.replace(/-([a-z])/gi,function(e,t){return t.toUpperCase()}),e},y._toHyphen=function(e){return e=e.replace(/([A-Z]?)([a-z]+)([A-Z]?)/g,function(e,t,n,r){var i=(t?"-"+t.toLowerCase():"")+n;return r&&(i+="-"+r.toLowerCase()),i}),e},y.SHOW_TRANSITION="fadeIn",y.HIDE_TRANSITION="fadeOut",y.useNative=!1,"transition"in o&&"transitionProperty"in o&&"transitionDuration"in o&&"transitionTimingFunction"in o&&"transitionDelay"in o?(y.useNative=!0,y.supported=!0):e.Array.each(m,function(e){var t=e+"Transition";t in i[s].style&&(n=e,r=y._toHyphen(e)+"-",y.useNative=!0,y.supported=!0,y._VENDOR_PREFIX=e)}),typeof o.transform=="undefined"&&e.Array.each(m,function(e){var t=e+"Transform";typeof o[t]!="undefined"&&(y._TRANSFORM=t)}),n&&(u=n+"Transition",a=n+"TransitionProperty"),f=r+"transition-property",l=r+"transition-duration",c=r+"transition-timing-function",h=r+"transition-delay",p="transitionend",d="on"+n.toLowerCase()+"transitionend",p=g[n]||p,y.fx={},y.toggles={},y._hasEnd={},y._reKeywords=/^(?:node|duration|iterations|easing|delay|on|onstart|onend)$/i,e.Node.DOM_EVENTS[p]=1,y.NAME="transition",y.DEFAULT_EASING="ease",y.DEFAULT_DURATION=.5,y.DEFAULT_DELAY=0,y._nodeAttrs={},y.prototype={constructor:y,init:function(e,t){var n=this;return n._node=e,!n._running&&t&&(n._config=t,e._transition=n,n._duration="duration"in t?t.duration:n.constructor.DEFAULT_DURATION,n._delay="delay"in t?t.delay:n.constructor.DEFAULT_DELAY,n._easing=t.easing||n.constructor.DEFAULT_EASING,n._count=0,n._running=!1),n},addProperty:function(t,n){var r=this,i=this._node,s=e.stamp(i),o=e.one(i),u=y._nodeAttrs[s],a,f,l,c,h;u||(u=y._nodeAttrs[s]={}),c=u[t],n&&n.value!==undefined?h=n.value:n!==undefined&&(h=n,n=v),typeof h=="function"&&(h=h.call(o,o)),c&&c.transition&&c.transition!==r&&c.transition._count--,r._count++,l=(typeof n.duration!="undefined"?n.duration:r._duration)||1e-4,u[t]={value:h,duration:l,delay:typeof n.delay!="undefined"?n.delay:r._delay,easing:n.easing||r._easing,transition:r},a=e.DOM.getComputedStyle(i,t),f=typeof h=="string"?a:parseFloat(a),y.useNative&&f===h&&setTimeout(function(){r._onNativeEnd.call(i,{propertyName:t,elapsedTime:l})},l*1e3)},removeProperty:function(t){var n=this,r=y._nodeAttrs[e.stamp(n._node)];r&&r[t]&&(delete r[t],n._count--)},initAttrs:function(t){var n,r=this._node;t.transform&&!t[y._TRANSFORM]&&(t[y._TRANSFORM]=t.transform,delete t.transform);for(n in t)t.hasOwnProperty(n)&&!y._reKeywords.test(n)&&(this.addProperty(n,t[n]),r.style[n]===""&&e.DOM.setStyle(r,n,e.DOM.getComputedStyle(r,n)))},run:function(t){var n=this,r=n._node,i=n._config,s={type:"transition:start",config:i};return n._running||(n._running=!0,i.on&&i.on.start&&i.on.start.call(e.one(r),s),n.initAttrs(n._config),n._callback=t,n._start()),n},_start:function(){this._runNative()},_prepDur:function(e){return e=parseFloat(e)*1e3,e+"ms"},_runNative:function(){var t=this,n=t._node,r=e.stamp(n),i=n.style,s=n.ownerDocument.defaultView.getComputedStyle(n),o=y._nodeAttrs[r],u="",a=s[y._toCamel(f)],d=f+": ",v=l+": ",m=c+": ",g=h+": ",b,w,E;a!=="all"&&(d+=a+",",v+=s[y._toCamel(l)]+",",m+=s[y._toCamel(c)]+",",g+=s[y._toCamel(h)]+",");for(E in o)b=y._toHyphen(E),w=o[E],(w=o[E])&&w.transition===t&&(E in n.style?(v+=t._prepDur(w.duration)+",",g+=t._prepDur(w.delay)+",",m+=w.easing+",",d+=b+",",u+=b+": "+w.value+"; "):this.removeProperty(E));d=d.replace(/,$/,";"),v=v.replace(/,$/,";"),m=m.replace(/,$/,";"),g=g.replace(/,$/,";"),y._hasEnd[r]||(n.addEventListener(p,t._onNativeEnd,""),y._hasEnd[r]=!0),i.cssText+=d+v+m+g+u},_end:function(t){var n=this,r=n._node,i=n._callback,s=n._config,o={type:"transition:end",config:s,elapsedTime:t},u=e.one(r);n._running=!1,n._callback=null,r&&(s.on&&s.on.end?setTimeout(function(){s.on.end.call(u,o),i&&i.call(u,o)},1):i&&setTimeout(function(){i.call(u,o)},1))},_endNative:function(e){var t=this._node,n=t.ownerDocument.defaultView.getComputedStyle(t,"")[y._toCamel(f)];e=y._toHyphen(e),typeof n=="string"&&(n=n.replace(new RegExp("(?:^|,\\s)"+e+",?"),","),n=n.replace(/^,|,$/,""),t.style[u]=n)},_onNativeEnd:function(t){var n=this,r=e.stamp(n),i=t,s=y._toCamel(i.propertyName),o=i.elapsedTime,u=y._nodeAttrs[r],f=u[s],l=f?f.transition:null,c,h;l&&(l.removeProperty(s),l._endNative(s),h=l._config[s],c={type:"propertyEnd",propertyName:s,elapsedTime:o,config:h},h&&h.on&&h.on.end&&h.on.end.call(e.one(n),c),l._count<=0&&(l._end(o),n.style[a]=""))},destroy:function(){var e=this,t=e._node;t&&(t.removeEventListener(p,e._onNativeEnd,!1),e._node=null)}},e.Transition=y,e.TransitionNative=y,e.Node.prototype.transition=function(t,n,r){var i=y._nodeAttrs[e.stamp(this._node)],s=i?i.transition||null:null,o,u;if(typeof t=="string"){typeof n=="function"&&(r=n,n=null),o=y.fx[t];if(n&&typeof n!="boolean"){n=e.clone(n);for(u in o)o.hasOwnProperty(u)&&(u in n||(n[u]=o[u]))}else n=o}else r=n,n=t;return s&&!s._running?s.init(this,n):s=new y(this._node,n),s.run(r),this},e.Node.prototype.show=function(t,n,r){return this._show(),t&&e.Transition&&(typeof t!="string"&&!t.push&&(typeof n=="function"&&(r=n,n=t),t=y.SHOW_TRANSITION),this.transition(t,n,r)),this},e.NodeList.prototype.show=function(t,n,r){var i=this._nodes,s=0,o;while(o=i[s++])e.one(o).show(t,n,r);return this};var b=function(e,t,n){return function(){t&&t.call(e),n&&typeof n=="function"&&n.apply(e._node,arguments)}};e.Node.prototype.hide=function(t,n,r){return t&&e.Transition?(typeof n=="function"&&(r=n,n=null),r=b(this,this._hide,r),typeof t!="string"&&!t.push&&(typeof n=="function"&&(r=n,n=t),t=y.HIDE_TRANSITION),this.transition(t,n,r)):this._hide(),this},e.NodeList.prototype.hide=function(t,n,r){var i=this._nodes,s=0,o;while(o=i[s++])e.one(o).hide(t,n,r);return this},e.NodeList.prototype
.transition=function(t,n){var r=this._nodes,i=0,s;while(s=r[i++])e.one(s).transition(t,n);return this},e.Node.prototype.toggleView=function(t,n,r){this._toggles=this._toggles||[],r=arguments[arguments.length-1];if(typeof t!="string"){n=t,this._toggleView(n,r);return}return typeof n=="function"&&(n=undefined),typeof n=="undefined"&&t in this._toggles&&(n=!this._toggles[t]),n=n?1:0,n?this._show():r=b(this,this._hide,r),this._toggles[t]=n,this.transition(e.Transition.toggles[t][n],r),this},e.NodeList.prototype.toggleView=function(t,n,r){var i=this._nodes,s=0,o;while(o=i[s++])o=e.one(o),o.toggleView.apply(o,arguments);return this},e.mix(y.fx,{fadeOut:{opacity:0,duration:.5,easing:"ease-out"},fadeIn:{opacity:1,duration:.5,easing:"ease-in"},sizeOut:{height:0,width:0,duration:.75,easing:"ease-out"},sizeIn:{height:function(e){return e.get("scrollHeight")+"px"},width:function(e){return e.get("scrollWidth")+"px"},duration:.5,easing:"ease-in",on:{start:function(){var e=this.getStyle("overflow");e!=="hidden"&&(this.setStyle("overflow","hidden"),this._transitionOverflow=e)},end:function(){this._transitionOverflow&&(this.setStyle("overflow",this._transitionOverflow),delete this._transitionOverflow)}}}}),e.mix(y.toggles,{size:["sizeOut","sizeIn"],fade:["fadeOut","fadeIn"]})},"patched-v3.11.0",{requires:["node-style"]});YUI.add("querystring-stringify",function(e,t){var n=e.namespace("QueryString"),r=[],i=e.Lang;n.escape=encodeURIComponent,n.stringify=function(e,t,s){var o,u,a,f,l,c,h=t&&t.sep?t.sep:"&",p=t&&t.eq?t.eq:"=",d=t&&t.arrayKey?t.arrayKey:!1;if(i.isNull(e)||i.isUndefined(e)||i.isFunction(e))return s?n.escape(s)+p:"";if(i.isBoolean(e)||Object.prototype.toString.call(e)==="[object Boolean]")e=+e;if(i.isNumber(e)||i.isString(e))return n.escape(s)+p+n.escape(e);if(i.isArray(e)){c=[],s=d?s+"[]":s,f=e.length;for(a=0;a<f;a++)c.push(n.stringify(e[a],t,s));return c.join(h)}for(a=r.length-1;a>=0;--a)if(r[a]===e)throw new Error("QueryString.stringify. Cyclical reference");r.push(e),c=[],o=s?s+"[":"",u=s?"]":"";for(a in e)e.hasOwnProperty(a)&&(l=o+a+u,c.push(n.stringify(e[a],t,l)));return r.pop(),c=c.join(h),!c&&s?s+"=":c}},"patched-v3.11.0",{requires:["yui-base"]});YUI.add("cookie",function(e,t){function h(e){throw new TypeError(e)}function p(e){(!s(e)||e==="")&&h("Cookie name must be a non-empty string.")}function d(e){(!s(e)||e==="")&&h("Subcookie name must be a non-empty string.")}var n=e.Lang,r=e.Object,i=null,s=n.isString,o=n.isObject,u=n.isUndefined,a=n.isFunction,f=encodeURIComponent,l=decodeURIComponent,c=e.config.doc;e.Cookie={_createCookieString:function(e,t,n,r){r=r||{};var i=f(e)+"="+(n?f(t):t),u=r.expires,a=r.path,l=r.domain;return o(r)&&(u instanceof Date&&(i+="; expires="+u.toUTCString()),s(a)&&a!==""&&(i+="; path="+a),s(l)&&l!==""&&(i+="; domain="+l),r.secure===!0&&(i+="; secure")),i},_createCookieHashString:function(e){o(e)||h("Cookie._createCookieHashString(): Argument must be an object.");var t=[];return r.each(e,function(e,n){!a(e)&&!u(e)&&t.push(f(n)+"="+f(String(e)))}),t.join("&")},_parseCookieHash:function(e){var t=e.split("&"),n=i,r={};if(e.length)for(var s=0,o=t.length;s<o;s++)n=t[s].split("="),r[l(n[0])]=l(n[1]);return r},_parseCookieString:function(e,t,n){var r={};if(s(e)&&e.length>0){var o=t===!1?function(e){return e}:l,a=e.split(/;\s/g),f=i,c=i,h=i;for(var p=0,d=a.length;p<d;p++){h=a[p].match(/([^=]+)=/i);if(h instanceof Array)try{f=l(h[1]),c=o(a[p].substring(h[1].length+1))}catch(v){}else f=l(a[p]),c="";!u(n)&&n.reverseCookieLoading?u(r[f])&&(r[f]=c):r[f]=c}}return r},_setDoc:function(e){c=e},exists:function(e){p(e);var t=this._parseCookieString(c.cookie,!0);return t.hasOwnProperty(e)},get:function(e,t){p(e);var n,r,s;return a(t)?(s=t,t={}):o(t)?s=t.converter:t={},n=this._parseCookieString(c.cookie,!t.raw,t),r=n[e],u(r)?i:a(s)?s(r):r},getSub:function(e,t,n,r){var s=this.getSubs(e,r);return s!==i?(d(t),u(s[t])?i:a(n)?n(s[t]):s[t]):i},getSubs:function(e,t){p(e);var n=this._parseCookieString(c.cookie,!1,t);return s(n[e])?this._parseCookieHash(n[e]):i},remove:function(t,n){return p(t),n=e.merge(n||{},{expires:new Date(0)}),this.set(t,"",n)},removeSub:function(e,t,n){p(e),d(t),n=n||{};var r=this.getSubs(e);if(o(r)&&r.hasOwnProperty(t)){delete r[t];if(!n.removeIfEmpty)return this.setSubs(e,r,n);for(var i in r)if(r.hasOwnProperty(i)&&!a(r[i])&&!u(r[i]))return this.setSubs(e,r,n);return this.remove(e,n)}return""},set:function(e,t,n){p(e),u(t)&&h("Cookie.set(): Value cannot be undefined."),n=n||{};var r=this._createCookieString(e,t,!n.raw,n);return c.cookie=r,r},setSub:function(e,t,n,r){p(e),d(t),u(n)&&h("Cookie.setSub(): Subcookie value cannot be undefined.");var i=this.getSubs(e);return o(i)||(i={}),i[t]=n,this.setSubs(e,i,r)},setSubs:function(e,t,n){p(e),o(t)||h("Cookie.setSubs(): Cookie value must be an object.");var r=this._createCookieString(e,this._createCookieHashString(t),!1,n);return c.cookie=r,r}}},"patched-v3.11.0",{requires:["yui-base"]});AUI.add(
	'liferay-session',
	function(A) {
		var Lang = A.Lang;

		var BUFFER_TIME = [];

		var CONFIG = A.config;

		var DOC = CONFIG.doc;

		var MAP_SESSION_STATE_EVENTS = {
			active: 'activated'
		};

		var SRC = {};

		var SRC_EVENT_OBJ = {
			src: SRC
		};

		var URL_BASE = themeDisplay.getPathMain() + '/portal/';

		var SessionBase = A.Component.create(
			{
				ATTRS: {
					autoExtend: {
						value: false
					},
					redirectUrl: {
						value: ''
					},
					redirectOnExpire: {
						value: true
					},
					sessionState: {
						value: 'active'
					},
					sessionLength: {
						getter: '_getLengthInMillis',
						value: 0
					},
					timestamp: {
						getter: '_getTimestamp',
						setter: '_setTimestamp',
						value: 0
					},
					warningLength: {
						getter: '_getLengthInMillis',
						setter: '_setWarningLength',
						value: 0
					},
					warningTime: {
						getter: '_getWarningTime',
						value: 0
					}
				},
				EXTENDS: A.Base,
				NAME: 'liferaysession',
				prototype: {
					initializer: function(config) {
						var instance = this;

						instance._cookieOptions = {
							path: '/',
							secure: A.UA.secure
						};

						instance._registered = {};

						instance.set('timestamp');

						instance._initEvents();

						instance._startTimer();
					},

					registerInterval: function(fn) {
						var instance = this;

						var fnId;
						var registered = instance._registered;

						if (Lang.isFunction(fn)) {
							fnId = A.stamp(fn);

							registered[fnId] = fn;
						}

						return fnId;
					},

					resetInterval: function() {
						var instance = this;

						instance._stopTimer();
						instance._startTimer();
					},

					unregisterInterval: function(fnId) {
						var instance = this;

						var registered = instance._registered;

						if (A.Object.owns(registered, fnId)) {
							delete registered[fnId];
						}

						return fnId;
					},

					expire: function() {
						var instance = this;

						instance.set('sessionState', 'expired', SRC_EVENT_OBJ);
					},

					extend: function() {
						var instance = this;

						instance.set('sessionState', 'active', SRC_EVENT_OBJ);
					},

					warn: function() {
						var instance = this;

						instance.set('sessionState', 'warned', SRC_EVENT_OBJ);
					},

					_afterSessionStateChange: function(event) {
						var instance = this;

						var newVal = event.newVal;

						var src = null;

						if (('src' in event) && event.details.length) {
							src = event.details[0];
						}

						instance.fire(MAP_SESSION_STATE_EVENTS[newVal] || newVal, src);
					},

					_defActivatedFn: function(event) {
						var instance = this;

						instance._elapsed = 0;

						instance.set('timestamp');

						if (event.src == SRC) {
							instance._getExtendIO().start();
						}
					},

					_defExpiredFn: function(event) {
						var instance = this;

						A.clearInterval(instance._intervalId);

						instance.set('timestamp', 'expired');

						if (event.src === SRC) {
							instance._getExpireIO().start();
						}
					},

					_getExpireIO: function() {
						var instance = this;

						var expireIO = instance._expireIO;

						if (!expireIO) {
							expireIO = A.io.request(
								URL_BASE + 'expire_session',
								{
									autoLoad: false,
									on: {
										success: function(event, id, obj) {
											Liferay.fire('sessionExpired');

											if (instance.get('redirectOnExpire')) {
												location.href = instance.get('redirectUrl');
											}
										}
									}
								}
							);

							instance._expireIO = expireIO;
						}

						return expireIO;
					},

					_getExtendIO: function() {
						var instance = this;

						var extendIO = instance._extendIO;

						if (!extendIO) {
							extendIO = A.io.request(
								URL_BASE + 'extend_session',
								{
									autoLoad: false
								}
							);

							instance._extendIO = extendIO;
						}

						return extendIO;
					},

					_getLengthInMillis: function(value) {
						var instance = this;

						return value * 60000;
					},

					_getTimestamp: function(value) {
						var instance = this;

						return A.Cookie.get(instance._cookieKey, instance._cookieOptions) || 0;
					},

					_getWarningTime: function() {
						var instance = this;

						return instance.get('sessionLength') - instance.get('warningLength');
					},

					_initEvents: function() {
						var instance = this;

						instance.on('sessionStateChange', instance._onSessionStateChange);

						instance.after('sessionStateChange', instance._afterSessionStateChange);

						instance.publish(
							'activated',
							{
								defaultFn: A.bind('_defActivatedFn', instance)
							}
						);

						instance.publish(
							'expired',
							{
								defaultFn: A.bind('_defExpiredFn', instance)
							}
						);

						instance.publish('warned');
					},

					_onSessionStateChange: function(event) {
						var instance = this;

						var newVal = event.newVal;
						var prevVal = event.prevVal;

						if (prevVal == 'expired' && prevVal != newVal) {
							event.preventDefault();
						}
						else if (prevVal == 'active' && prevVal == newVal) {
							instance._afterSessionStateChange(event);
						}
					},

					_setTimestamp: function(value) {
						var instance = this;

						value = String(value || Lang.now());

						return A.Cookie.set(instance._cookieKey, value, instance._cookieOptions);
					},

					_setWarningLength: function(value) {
						var instance = this;

						return Math.min(instance.get('sessionLength'), value);
					},

					_startTimer: function() {
						var instance = this;

						var warningTime = instance.get('warningTime');
						var sessionLength = instance.get('sessionLength');

						instance._elapsed = 0;

						var registered = instance._registered;
						var interval = 1000;

						instance._intervalId = A.setInterval(
							function() {
								var elapsed = (instance._elapsed += 1000);

								var extend = false;

								var isExpirationMoment = (elapsed == sessionLength);
								var isWarningMoment = (elapsed == warningTime);

								var hasExpired = (elapsed >= sessionLength);
								var hasWarned = (elapsed >= warningTime);

								var updateSessionState = true;

								if (hasWarned) {
									if (isWarningMoment || isExpirationMoment) {
										var timestamp = instance.get('timestamp');

										if (timestamp == 'expired') {
											isExpirationMoment = true;
											hasExpired = true;
										}
										else {
											if (instance.get('autoExtend')) {
												hasExpired = false;
												hasWarned = false;

												isExpirationMoment = false;
												isWarningMoment = false;

												extend = true;
											}
											else {
												var timeOffset = Math.floor((Lang.now() - timestamp) / 1000) * 1000;

												if (timeOffset < warningTime) {
													instance._elapsed = timeOffset;

													updateSessionState = false;
													hasWarned = false;
												}
											}
										}
									}

									if (updateSessionState) {
										if (isExpirationMoment) {
											instance.expire();
										}
										else if (isWarningMoment) {
											instance.warn();
										}
										else if (extend) {
											instance.extend();
										}
									}
								}

								for (var i in registered) {
									registered[i](elapsed, interval, hasWarned, hasExpired, isWarningMoment, isExpirationMoment);
								}
							},
							interval
						);
					},

					_stopTimer: function() {
						var instance = this;

						A.clearInterval(instance._intervalId);
					},

					_cookieKey: 'LFR_SESSION_STATE_' + themeDisplay.getUserId()
				}
			}
		);

		SessionBase.SRC = SRC;

		var SessionDisplay = A.Component.create(
			{
				ATTRS: {
					pageTitle: {
						value: DOC.title
					}
				},
				EXTENDS: A.Plugin.Base,
				NAME: 'liferaysessiondisplay',
				NS: 'display',
				prototype: {
					initializer: function(config) {
						var instance = this;

						var host = instance.get('host');

						if (Liferay.Util.getTop() == CONFIG.win) {
							instance._host = host;

							instance._toggleText = {
								hide: '\u0048\u0069\u0064\u0065',
								show: '\u0053\u0068\u006f\u0077'
							};

							instance._expiredText = '\u0057\u0061\u0072\u006e\u0069\u006e\u0067\u0021\u0020\u0044\u0075\u0065\u0020\u0074\u006f\u0020\u0069\u006e\u0061\u0063\u0074\u0069\u0076\u0069\u0074\u0079\u002c\u0020\u0079\u006f\u0075\u0072\u0020\u0073\u0065\u0073\u0073\u0069\u006f\u006e\u0020\u0068\u0061\u0073\u0020\u0065\u0078\u0070\u0069\u0072\u0065\u0064\u002e\u0020\u0050\u006c\u0065\u0061\u0073\u0065\u0020\u0073\u0061\u0076\u0065\u0020\u0061\u006e\u0079\u0020\u0064\u0061\u0074\u0061\u0020\u0079\u006f\u0075\u0020\u006d\u0061\u0079\u0020\u0068\u0061\u0076\u0065\u0020\u0065\u006e\u0074\u0065\u0072\u0065\u0064\u0020\u0062\u0065\u0066\u006f\u0072\u0065\u0020\u0072\u0065\u0066\u0072\u0065\u0073\u0068\u0069\u006e\u0067\u0020\u0074\u0068\u0065\u0020\u0070\u0061\u0067\u0065\u002e';
							instance._extendText = '\u0045\u0078\u0074\u0065\u006e\u0064';

							instance._warningText = '\u0057\u0061\u0072\u006e\u0069\u006e\u0067\u0021\u0020\u0044\u0075\u0065\u0020\u0074\u006f\u0020\u0069\u006e\u0061\u0063\u0074\u0069\u0076\u0069\u0074\u0079\u002c\u0020\u0079\u006f\u0075\u0072\u0020\u0073\u0065\u0073\u0073\u0069\u006f\u006e\u0020\u0077\u0069\u006c\u006c\u0020\u0065\u0078\u0070\u0069\u0072\u0065\u0020\u0069\u006e\u0020\u007b\u0030\u007d\u002e\u0020\u0054\u006f\u0020\u0065\u0078\u0074\u0065\u006e\u0064\u0020\u0079\u006f\u0075\u0072\u0020\u0073\u0065\u0073\u0073\u0069\u006f\u006e\u0020\u0061\u006e\u006f\u0074\u0068\u0065\u0072\u0020\u007b\u0031\u007d\u0020\u006d\u0069\u006e\u0075\u0074\u0065\u0028\u0073\u0029\u002c\u0020\u0070\u006c\u0065\u0061\u0073\u0065\u0020\u0070\u0072\u0065\u0073\u0073\u0020\u0074\u0068\u0065\u0020\u003c\u0065\u006d\u003e\u0045\u0078\u0074\u0065\u006e\u0064\u003c\u002f\u0065\u006d\u003e\u0020\u0062\u0075\u0074\u0074\u006f\u006e\u002e';
							instance._warningText = Lang.sub(instance._warningText, ['<span class="countdown-timer">{0}</span>', host.get('sessionLength') / 60000]);

							host.on('sessionStateChange', instance._onHostSessionStateChange, instance);

							instance.afterHostMethod('_defActivatedFn', instance._afterDefActivatedFn);
							instance.afterHostMethod('_defExpiredFn', instance._afterDefExpiredFn);
						}
						else {
							host.unplug(instance);
						}
					},

					_afterDefActivatedFn: function(event) {
						var instance = this;

						instance._uiSetActivated();
					},

					_afterDefExpiredFn: function(event) {
						var instance = this;

						instance._host.unregisterInterval(instance._intervalId);

						instance._uiSetExpired();
					},

					_beforeHostWarned: function(event) {
						var instance = this;

						var host = instance._host;

						var warningLength = host.get('warningLength');

						var remainingTime = warningLength;

						var banner = instance._getBanner();

						var counterTextNode = banner.one('.countdown-timer');

						instance._uiSetRemainingTime(remainingTime, counterTextNode);

						banner.show();

						instance._intervalId = host.registerInterval(
							function(elapsed, interval, hasWarned, hasExpired, isWarningMoment, isExpirationMoment) {
								if (!hasWarned) {
									instance._uiSetActivated();
								}
								else if (!hasExpired) {
									if (isWarningMoment) {
										if (remainingTime <= 0) {
											remainingTime = warningLength;
										}

										banner.show();
									}

									instance._uiSetRemainingTime(remainingTime, counterTextNode);

								}

								remainingTime -= interval;
							}
						);
					},

					_getBanner: function() {
						var instance = this;

						var banner = instance._banner;

						if (!banner) {
							banner = new Liferay.Notice(
								{
									closeText: instance._extendText,
									content: instance._warningText,
									noticeClass: 'popup-alert-notice',
									onClose: function() {
										instance._host.extend();
									},
									toggleText: false
								}
							);

							instance._banner = banner;
						}

						return banner;
					},

					_onHostSessionStateChange: function(event) {
						var instance = this;

						if (event.newVal == 'warned') {
							instance._beforeHostWarned(event);
						}
					},

					_uiSetActivated: function() {
						var instance = this;

						DOC.title = instance.reset('pageTitle').get('pageTitle');

						instance._host.unregisterInterval(instance._intervalId);

						var banner = instance._getBanner();

						if (banner) {
							banner.hide();
						}
					},

					_uiSetExpired: function() {
						var instance = this;

						var banner = instance._getBanner();

						banner.html(instance._expiredText);

						banner.replaceClass('popup-alert-notice', 'popup-alert-warning');

						banner.addClass('alert-error');

						banner.show();

						DOC.title = instance.get('pageTitle');
					},

					_uiSetRemainingTime: function(remainingTime, counterTextNode) {
						var instance = this;

						var banner = instance._getBanner();

						counterTextNode = counterTextNode || banner.one('.countdown-timer');

						counterTextNode.text(instance._formatTime(remainingTime));

						DOC.title = banner.text();
					},

					_formatNumber: function(value) {
						var instance = this;

						var floor = Math.floor;
						var padNumber = Lang.String.padNumber;

						return Lang.String.padNumber(Math.floor(value), 2);
					},

					_formatTime: function(time) {
						var instance = this;

						time = Number(time);

						if (Lang.isNumber(time) && time > 0) {
							time /= 1000;

							BUFFER_TIME[0] = instance._formatNumber(time / 3600);

							time %= 3600;

							BUFFER_TIME[1] = instance._formatNumber(time / 60);

							time %= 60;

							BUFFER_TIME[2] = instance._formatNumber(time);

							time = BUFFER_TIME.join(':');
						}
						else {
							time = 0;
						}

						return time;
					}
				}
			}
		);

		Liferay.SessionBase = SessionBase;
		Liferay.SessionDisplay = SessionDisplay;
	},
	'',
	{
		requires: ['aui-io-request', 'aui-timer', 'cookie', 'liferay-notice']
	}
);YUI.add("aui-io-request",function(e,t){var n=e.Lang,r=n.isBoolean,i=n.isFunction,s=n.isString,o=e.namespace("config.io"),u=function(e){return function(){return o[e]}},a="active",f="arguments",l="autoLoad",c="cache",h="cfg",p="complete",d="content-type",v="context",m="data",g="dataType",y="",b="end",w="failure",E="form",S="get",x="headers",T="IORequest",N="json",C="method",k="responseData",L="start",A="success",O="sync",M="timeout",_="transaction",D="uri",P="xdr",H="xml",B="Parser error: IO dataType is not correctly parsing",j={all:"*/*",html:"text/html",json:"application/json, text/javascript",text:"text/plain",xml:"application/xml, text/xml"},F=e.Component.create({NAME:T,ATTRS:{autoLoad:{value:!0,validator:r},cache:{value:!0,validator:r},dataType:{setter:function(e){return(e||y).toLowerCase()},value:null,validator:s},responseData:{setter:function(e){return this._setResponseData(e)},value:null},uri:{setter:function(e){return this._parseURL(e)},value:null,validator:s},active:{value:!1,validator:r},cfg:{getter:function(){var t=this;return{arguments:t.get(f),context:t.get(v),data:t.getFormattedData(),form:t.get(E),headers:t.get(x),method:t.get(C),on:{complete:e.bind(t.fire,t,p),end:e.bind(t._end,t),failure:e.bind(t.fire,t,w),start:e.bind(t.fire,t,L),success:e.bind(t._success,t)},sync:t.get(O),timeout:t.get(M),xdr:t.get(P)}},readOnly:!0},transaction:{value:null},arguments:{valueFn:u(f)},context:{valueFn:u(v)},data:{valueFn:u(m)},form:{valueFn:u(E)},headers:{getter:function(t){var n=[],r=this,i=r.get(g);return i&&n.push(j[i]),n.push(j.all),e.merge(t,{Accept:n.join(", ")})},valueFn:u(x)},method:{valueFn:u(C)},selector:{value:null},sync:{valueFn:u(O)},timeout:{valueFn:u(M)},xdr:{valueFn:u(P)}},EXTENDS:e.Plugin.Base,prototype:{init:function(e){var t=this;F.superclass.init.apply(this,arguments),t._autoStart()},destructor:function(){var e=this;e.stop(),e.set(_,null)},getFormattedData:function(){var e=this,t=e.get(m),n=o.dataFormatter;return i(n)&&(t=n.call(e,t)),t},start:function(){var t=this;t.destructor(),t.set(a,!0);var n=t._yuiIOObj;n||(n=new e.IO,t._yuiIOObj=n);var r=n.send(t.get(D),t.get(h));t.set(_,r)},stop:function(){var e=this,t=e.get(_);t&&t.abort()},_autoStart:function(){var e=this;e.get(l)&&e.start()},_parseURL:function(e){var t=this,n=t.get(c),r=t.get(C);if(n===!1&&r==S){var s=+(new Date),u=e.replace(/(\?|&)_=.*?(&|$)/,"$1_="+s+"$2");e=u+(u==e?(e.match(/\?/)?"&":"?")+"_="+s:"")}var a=o.uriFormatter;return i(a)&&(e=a.apply(t,[e])),e},_end:function(e,t){var n=this;n.set(a,!1),n.set(_,null),n.fire(b,e,t)},_success:function(e,t,n){var r=this;r.set(k,t),r.fire(A,e,t,n)},_setResponseData:function(t){var n=null,r=this;if(t){var i=r.get(g),s=t.getResponseHeader(d)||"";if(i==H||!i&&s.indexOf(H)>=0){n=t.responseXML;if(n.documentElement.tagName=="parsererror")throw B}else n=t.responseText;n===y&&(n=null);if(i==N)try{n=e.JSON.parse(n)}catch(o){}else{var u=r.get("selector");if(n&&u){var a;n.documentElement?a=e.one(n):a=e.Node.create(n),n=a.all(u)}}}return n}}});e.IORequest=F,e.io.request=function(t,n){return new e.IORequest(e.merge(n,{uri:t}))}},"2.0.0",{requires:["io-base","json","plugin","querystring-stringify","aui-component"]});AUI.add(
	'liferay-ajax-session',
	function(A) {
		var Lang = A.Lang;

		var IORequest = A.Component.create(
			{
				EXTENDS: A.IORequest,

				prototype: {
					initializer: function() {
						var instance = this;

						if (Liferay.Session) {
							instance.after('complete', instance._resetSessionInterval, instance);
						}
					},

					_resetSessionInterval: function(event, id, obj, args) {
						var instance = this;

						if (!args || (args && (args.sessionExtend || !Lang.isBoolean(args.sessionExtend)))) {
							Liferay.Session.resetInterval();
						}
					}
				}
			}
		);

		A._IORequest = A.IORequest;
		A.IORequest = IORequest;
	},
	'',
	{
		requires: ['aui-io-request', 'liferay-session']
	}
);YUI.add("substitute",function(e,t){var n=e.Lang,r="dump",i=" ",s="{",o="}",u=/(~-(\d+)-~)/g,a=/\{LBRACE\}/g,f=/\{RBRACE\}/g,l=function(t,l,c,h){var p,d,v,m,g,y,b=[],w,E,S=t.length;for(;;){p=t.lastIndexOf(s,S);if(p<0)break;d=t.indexOf(o,p);if(p+1>=d)break;w=t.substring(p+1,d),m=w,y=null,v=m.indexOf(i),v>-1&&(y=m.substring(v+1),m=m.substring(0,v)),g=l[m],c&&(g=c(m,g,y)),n.isObject(g)?e.dump?n.isArray(g)?g=e.dump(g,parseInt(y,10)):(y=y||"",E=y.indexOf(r),E>-1&&(y=y.substring(4)),g.toString===Object.prototype.toString||E>-1?g=e.dump(g,parseInt(y,10)):g=g.toString()):g=g.toString():n.isUndefined(g)&&(g="~-"+b.length+"-~",b.push(w)),t=t.substring(0,p)+g+t.substring(d+1),h||(S=p-1)}return t.replace(u,function(e,t,n){return s+b[parseInt(n,10)]+o}).replace(a,s).replace(f,o)};e.substitute=l,n.substitute=l},"patched-v3.11.0",{requires:["yui-base"],optional:["dump"]});