Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Скачиваний:
9
Добавлен:
27.05.2015
Размер:
64.5 Кб
Скачать
/*
YUI 3.4.1 (build 4118)
Copyright 2011 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
YUI.add("attribute-complex",function(b){var a=b.Object,c=".";b.Attribute.Complex=function(){};b.Attribute.Complex.prototype={_normAttrVals:function(g){var i={},h={},j,d,f,e;if(g){for(e in g){if(g.hasOwnProperty(e)){if(e.indexOf(c)!==-1){j=e.split(c);d=j.shift();f=h[d]=h[d]||[];f[f.length]={path:j,value:g[e]};}else{i[e]=g[e];}}}return{simple:i,complex:h};}else{return null;}},_getAttrInitVal:function(m,j,p){var e=j.value,o=j.valueFn,d,f,h,g,q,n,k;if(o){if(!o.call){o=this[o];}if(o){e=o.call(this);}}if(!j.readOnly&&p){d=p.simple;if(d&&d.hasOwnProperty(m)){e=d[m];}f=p.complex;if(f&&f.hasOwnProperty(m)){k=f[m];for(h=0,g=k.length;h<g;++h){q=k[h].path;n=k[h].value;a.setValue(e,q,n);}}}return e;}};b.mix(b.Attribute,b.Attribute.Complex,true,null,1);},"3.4.1",{requires:["attribute-base"]});/*
YUI 3.4.1 (build 4118)
Copyright 2011 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
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;}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.4.1",{requires:["event-synthetic"]});/*
YUI 3.4.1 (build 4118)
Copyright 2011 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
YUI.add("classnamemanager",function(c){var b="classNamePrefix",d="classNameDelimiter",a=c.config;a[b]=a[b]||"yui3";a[d]=a[d]||"-";c.ClassNameManager=function(){var e=a[b],f=a[d];return{getClassName:c.cached(function(){var g=c.Array(arguments);if(g[g.length-1]!==true){g.unshift(e);}else{g.pop();}return g.join(f);})};}();},"3.4.1",{requires:["yui-base"]});/*
YUI 3.4.1 (build 4118)
Copyright 2011 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
YUI.add("widget-base",function(b){var g=b.Lang,r=b.Node,e=b.ClassNameManager,w=e.getClassName,M,s=b.cached(function(L){return L.substring(0,1).toUpperCase()+L.substring(1);}),F="content",P="visible",K="hidden",y="disabled",B="focused",d="width",A="height",N="boundingBox",v="contentBox",k="parentNode",m="ownerDocument",x="auto",j="srcNode",I="body",H="tabIndex",q="id",i="render",J="rendered",n="destroyed",a="strings",o="<div></div>",z="Change",p="loading",E="_uiSet",D="",G=function(){},u=true,O=false,t,l={},f=[P,y,A,d,B],C=b.UA.webkit,h={};function c(Q){var T=this,L,S,R=T.constructor;T._strs={};T._cssPrefix=R.CSS_PREFIX||w(R.NAME.toLowerCase());c.superclass.constructor.apply(T,arguments);S=T.get(i);if(S){if(S!==u){L=S;}T.render(L);}}c.NAME="widget";t=c.UI_SRC="ui";c.ATTRS=l;l[q]={valueFn:"_guid",writeOnce:u};l[J]={value:O,readOnly:u};l[N]={value:null,setter:"_setBB",writeOnce:u};l[v]={valueFn:"_defaultCB",setter:"_setCB",writeOnce:u};l[H]={value:null,validator:"_validTabIndex"};l[B]={value:O,readOnly:u};l[y]={value:O};l[P]={value:u};l[A]={value:D};l[d]={value:D};l[a]={value:{},setter:"_strSetter",getter:"_strGetter"};l[i]={value:O,writeOnce:u};c.CSS_PREFIX=w(c.NAME.toLowerCase());c.getClassName=function(){return w.apply(e,[c.CSS_PREFIX].concat(b.Array(arguments),true));};M=c.getClassName;c.getByNode=function(L){var R,Q=M();L=r.one(L);if(L){L=L.ancestor("."+Q,true);if(L){R=h[b.stamp(L,u)];}}return R||null;};b.extend(c,b.Base,{getClassName:function(){return w.apply(e,[this._cssPrefix].concat(b.Array(arguments),true));},initializer:function(L){h[b.stamp(this.get(N))]=this;if(this._applyParser){this._applyParser(L);}},destructor:function(){var L=this.get(N),Q=b.stamp(L,u);if(Q in h){delete h[Q];}this._destroyBox();},destroy:function(L){this._destroyAllNodes=L;return c.superclass.destroy.apply(this);},_destroyBox:function(){var R=this.get(N),Q=this.get(v),L=this._destroyAllNodes,S=R&&R.compareTo(Q);if(this.UI_EVENTS){this._destroyUIEvents();}this._unbindUI(R);if(L){R.empty();R.remove(u);}else{if(Q){Q.remove(u);}if(!S){R.remove(u);}}},render:function(L){if(!this.get(n)&&!this.get(J)){this.publish(i,{queuable:O,fireOnce:u,defaultTargetOnly:u,defaultFn:this._defRenderFn});this.fire(i,{parentNode:(L)?r.one(L):null});}return this;},_defRenderFn:function(L){this._parentNode=L.parentNode;this.renderer();this._set(J,u);this._removeLoadingClassNames();},renderer:function(){var L=this;L._renderUI();L.renderUI();L._bindUI();L.bindUI();L._syncUI();L.syncUI();},bindUI:G,renderUI:G,syncUI:G,hide:function(){return this.set(P,O);},show:function(){return this.set(P,u);},focus:function(){return this._set(B,u);},blur:function(){return this._set(B,O);},enable:function(){return this.set(y,O);},disable:function(){return this.set(y,u);},_uiSizeCB:function(L){this.get(v).toggleClass(M(F,"expanded"),L);},_renderBox:function(L){var T=this,Q=T.get(v),R=T.get(N),V=T.get(j),S=T.DEF_PARENT_NODE,U=(V&&V.get(m))||R.get(m)||Q.get(m);if(V&&!V.compareTo(Q)&&!Q.inDoc(U)){V.replace(Q);}if(!R.compareTo(Q.get(k))&&!R.compareTo(Q)){if(Q.inDoc(U)){Q.replace(R);}R.appendChild(Q);}L=L||(S&&r.one(S));if(L){L.appendChild(R);}else{if(!R.inDoc(U)){r.one(I).insert(R,0);}}},_setBB:function(L){return this._setBox(this.get(q),L,this.BOUNDING_TEMPLATE);},_setCB:function(L){return(this.CONTENT_TEMPLATE===null)?this.get(N):this._setBox(null,L,this.CONTENT_TEMPLATE);},_defaultCB:function(L){return this.get(j)||null;},_setBox:function(R,Q,L){Q=r.one(Q)||r.create(L);if(!Q.get(q)){Q.set(q,R||b.guid());}return Q;},_renderUI:function(){this._renderBoxClassNames();this._renderBox(this._parentNode);},_renderBoxClassNames:function(){var S=this._getClasses(),L,Q=this.get(N),R;Q.addClass(M());for(R=S.length-3;R>=0;R--){L=S[R];Q.addClass(L.CSS_PREFIX||w(L.NAME.toLowerCase()));}this.get(v).addClass(this.getClassName(F));},_removeLoadingClassNames:function(){var R=this.get(N),L=this.get(v),Q=this.getClassName(p),S=M(p);R.removeClass(S).removeClass(Q);L.removeClass(S).removeClass(Q);},_bindUI:function(){this._bindAttrUI(this._UI_ATTRS.BIND);this._bindDOM();},_unbindUI:function(L){this._unbindDOM(L);},_bindDOM:function(){var L=this.get(N).get(m);this._hDocFocus=L.on("focus",this._onDocFocus,this);if(C){this._hDocMouseDown=L.on("mousedown",this._onDocMouseDown,this);}},_unbindDOM:function(L){if(this._hDocFocus){this._hDocFocus.detach();}if(C&&this._hDocMouseDown){this._hDocMouseDown.detach();}},_syncUI:function(){this._syncAttrUI(this._UI_ATTRS.SYNC);},_uiSetHeight:function(L){this._uiSetDim(A,L);this._uiSizeCB((L!==D&&L!==x));},_uiSetWidth:function(L){this._uiSetDim(d,L);},_uiSetDim:function(L,Q){this.get(N).setStyle(L,g.isNumber(Q)?Q+this.DEF_UNIT:Q);},_uiSetVisible:function(L){this.get(N).toggleClass(this.getClassName(K),!L);},_uiSetDisabled:function(L){this.get(N).toggleClass(this.getClassName(y),L);},_uiSetFocused:function(R,Q){var L=this.get(N);L.toggleClass(this.getClassName(B),R);if(Q!==t){if(R){L.focus();}else{L.blur();}}},_uiSetTabIndex:function(Q){var L=this.get(N);if(g.isNumber(Q)){L.set(H,Q);}else{L.removeAttribute(H);}},_onDocMouseDown:function(L){if(this._domFocus){this._onDocFocus(L);}},_onDocFocus:function(L){this._domFocus=this.get(N).contains(L.target);this._set(B,this._domFocus,{src:t});},toString:function(){return this.name+"["+this.get(q)+"]";},DEF_UNIT:"px",DEF_PARENT_NODE:null,CONTENT_TEMPLATE:o,BOUNDING_TEMPLATE:o,_guid:function(){return b.guid();},_validTabIndex:function(L){return(g.isNumber(L)||g.isNull(L));},_bindAttrUI:function(Q){var R,L=Q.length;for(R=0;R<L;R++){this.after(Q[R]+z,this._setAttrUI);}},_syncAttrUI:function(R){var S,Q=R.length,L;for(S=0;S<Q;S++){L=R[S];this[E+s(L)](this.get(L));}},_setAttrUI:function(L){this[E+s(L.attrName)](L.newVal,L.src);},_strSetter:function(L){return b.merge(this.get(a),L);},getString:function(L){return this.get(a)[L];},getStrings:function(){return this.get(a);},_UI_ATTRS:{BIND:f,SYNC:f.concat(H)}});b.Widget=c;},"3.4.1",{requires:["attribute","event-focus","base-base","base-pluginhost","node-base","node-style","classnamemanager"],skinnable:true});
/*
YUI 3.4.1 (build 4118)
Copyright 2011 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
YUI.add("widget-htmlparser",function(f){var e=f.Widget,c=f.Node,d=f.Lang,a="srcNode",b="contentBox";e.HTML_PARSER={};e._buildCfg={aggregates:["HTML_PARSER"]};e.ATTRS[a]={value:null,setter:c.one,getter:"_getSrcNode",writeOnce:true};f.mix(e.prototype,{_getSrcNode:function(g){return g||this.get(b);},_applyParsedConfig:function(i,g,h){return(h)?f.mix(g,h,false):g;},_applyParser:function(g){var i=this,j=i.get(a),h=i._getHtmlParser(),l,k;if(h&&j){f.Object.each(h,function(n,m,p){k=null;if(d.isFunction(n)){k=n.call(i,j);}else{if(d.isArray(n)){k=j.all(n[0]);if(k.isEmpty()){k=null;}}else{k=j.one(n);}}if(k!==null&&k!==undefined){l=l||{};l[m]=k;}});}g=i._applyParsedConfig(j,g,l);},_getHtmlParser:function(){var h=this._getClasses(),k={},g,j;for(g=h.length-1;g>=0;g--){j=h[g].HTML_PARSER;if(j){f.mix(k,j,true);}}return k;}});},"3.4.1",{requires:["widget-base"]});/*
YUI 3.4.1 (build 4118)
Copyright 2011 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
YUI.add("widget-uievents",function(g){var f="boundingBox",e=g.Widget,d="render",a=g.Lang,c=":",b=g.Widget._uievts=g.Widget._uievts||{};g.mix(e.prototype,{_destroyUIEvents:function(){var h=g.stamp(this,true);g.each(b,function(j,i){if(j.instances[h]){delete j.instances[h];if(g.Object.isEmpty(j.instances)){j.handle.detach();if(b[i]){delete b[i];}}}});},UI_EVENTS:g.Node.DOM_EVENTS,_getUIEventNode:function(){return this.get(f);},_createUIEvent:function(i){var l=this._getUIEventNode(),h=(g.stamp(l)+i),k=b[h],j;if(!k){j=l.delegate(i,function(m){var n=e.getByNode(this);if(n){if(n._filterUIEvent(m)){n.fire(m.type,{domEvent:m});}}},"."+g.Widget.getClassName());b[h]=k={instances:{},handle:j};}k.instances[g.stamp(this)]=1;},_filterUIEvent:function(h){return(h.currentTarget.compareTo(h.container)||h.container.compareTo(this._getUIEventNode()));},_getUIEvent:function(j){if(a.isString(j)){var k=this.parseType(j)[1],h,i;if(k){h=k.indexOf(c);if(h>-1){k=k.substring(h+c.length);}if(this.UI_EVENTS[k]){i=k;}}return i;}},_initUIEvent:function(i){var j=this._getUIEvent(i),h=this._uiEvtsInitQueue||{};if(j&&!h[j]){this._uiEvtsInitQueue=h[j]=1;this.after(d,function(){this._createUIEvent(j);delete this._uiEvtsInitQueue[j];});}},on:function(h){this._initUIEvent(h);return e.superclass.on.apply(this,arguments);},publish:function(i,h){var j=this._getUIEvent(i);if(j&&h&&h.defaultFn){this._initUIEvent(j);}return e.superclass.publish.apply(this,arguments);}},true);},"3.4.1",{requires:["widget-base","node-event-delegate"]});/*
YUI 3.4.1 (build 4118)
Copyright 2011 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
YUI.add("widget-skin",function(e){var d="boundingBox",b="contentBox",a="skin",c=e.ClassNameManager.getClassName;e.Widget.prototype.getSkinName=function(){var f=this.get(b)||this.get(d),h=new RegExp("\\b"+c(a)+"-(\\S+)"),g;if(f){f.ancestor(function(i){g=i.get("className").match(h);return g;});}return(g)?g[1]:null;};},"3.4.1",{requires:["widget-base"]});/*
YUI 3.4.1 (build 4118)
Copyright 2011 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
YUI.add("widget-stdmod",function(b){var f=b.Lang,q=b.Node,x=b.UA,e=b.Widget,d="",J="hd",G="bd",j="ft",D="header",M="body",K="footer",N="fillHeight",m="stdmod",u="Node",I="Content",C="firstChild",h="childNodes",n="ownerDocument",v="contentBox",z="height",F="offsetHeight",y="auto",l="headerContentChange",B="bodyContentChange",o="footerContentChange",r="fillHeightChange",t="heightChange",O="contentUpdate",w="renderUI",E="bindUI",g="syncUI",H="_applyParsedConfig",s=b.Widget.UI_SRC;function P(L){this._stdModNode=this.get(v);b.before(this._renderUIStdMod,this,w);b.before(this._bindUIStdMod,this,E);b.before(this._syncUIStdMod,this,g);}P.HEADER=D;P.BODY=M;P.FOOTER=K;P.AFTER="after";P.BEFORE="before";P.REPLACE="replace";var k=P.HEADER,A=P.BODY,p=P.FOOTER,a=k+I,c=p+I,i=A+I;P.ATTRS={headerContent:{value:null},footerContent:{value:null},bodyContent:{value:null},fillHeight:{value:P.BODY,validator:function(L){return this._validateFillHeight(L);}}};P.HTML_PARSER={headerContent:function(L){return this._parseStdModHTML(k);},bodyContent:function(L){return this._parseStdModHTML(A);},footerContent:function(L){return this._parseStdModHTML(p);}};P.SECTION_CLASS_NAMES={header:e.getClassName(J),body:e.getClassName(G),footer:e.getClassName(j)};P.TEMPLATES={header:'<div class="'+P.SECTION_CLASS_NAMES[k]+'"></div>',body:'<div class="'+P.SECTION_CLASS_NAMES[A]+'"></div>',footer:'<div class="'+P.SECTION_CLASS_NAMES[p]+'"></div>'};P.prototype={_syncUIStdMod:function(){var L=this._stdModParsed;if(!L||!L[a]){this._uiSetStdMod(k,this.get(a));}if(!L||!L[i]){this._uiSetStdMod(A,this.get(i));}if(!L||!L[c]){this._uiSetStdMod(p,this.get(c));}this._uiSetFillHeight(this.get(N));},_renderUIStdMod:function(){this._stdModNode.addClass(e.getClassName(m));this._renderStdModSections();this.after(l,this._afterHeaderChange);this.after(B,this._afterBodyChange);this.after(o,this._afterFooterChange);},_renderStdModSections:function(){if(f.isValue(this.get(a))){this._renderStdMod(k);}if(f.isValue(this.get(i))){this._renderStdMod(A);}if(f.isValue(this.get(c))){this._renderStdMod(p);}},_bindUIStdMod:function(){this.after(r,this._afterFillHeightChange);this.after(t,this._fillHeight);this.after(O,this._fillHeight);},_afterHeaderChange:function(L){if(L.src!==s){this._uiSetStdMod(k,L.newVal,L.stdModPosition);}},_afterBodyChange:function(L){if(L.src!==s){this._uiSetStdMod(A,L.newVal,L.stdModPosition);}},_afterFooterChange:function(L){if(L.src!==s){this._uiSetStdMod(p,L.newVal,L.stdModPosition);}},_afterFillHeightChange:function(L){this._uiSetFillHeight(L.newVal);},_validateFillHeight:function(L){return !L||L==P.BODY||L==P.HEADER||L==P.FOOTER;},_uiSetFillHeight:function(R){var Q=this.getStdModNode(R);var L=this._currFillNode;if(L&&Q!==L){L.setStyle(z,d);}if(Q){this._currFillNode=Q;}this._fillHeight();},_fillHeight:function(){if(this.get(N)){var L=this.get(z);if(L!=d&&L!=y){this.fillHeight(this._currFillNode);}}},_uiSetStdMod:function(S,R,L){if(f.isValue(R)){var Q=this.getStdModNode(S)||this._renderStdMod(S);this._addStdModContent(Q,R,L);this.set(S+I,this._getStdModContent(S),{src:s});}else{this._eraseStdMod(S);}this.fire(O);},_renderStdMod:function(R){var L=this.get(v),Q=this._findStdModSection(R);if(!Q){Q=this._getStdModTemplate(R);}this._insertStdModSection(L,R,Q);this[R+u]=Q;return this[R+u];},_eraseStdMod:function(Q){var L=this.getStdModNode(Q);if(L){L.remove(true);delete this[Q+u];}},_insertStdModSection:function(L,S,R){var Q=L.get(C);if(S===p||!Q){L.appendChild(R);}else{if(S===k){L.insertBefore(R,Q);}else{var T=this[p+u];if(T){L.insertBefore(R,T);}else{L.appendChild(R);}}}},_getStdModTemplate:function(L){return q.create(P.TEMPLATES[L],this._stdModNode.get(n));},_addStdModContent:function(R,Q,L){switch(L){case P.BEFORE:L=0;break;case P.AFTER:L=undefined;break;default:L=P.REPLACE;}R.insert(Q,L);},_getPreciseHeight:function(R){var L=(R)?R.get(F):0,S="getBoundingClientRect";if(R&&R.hasMethod(S)){var Q=R.invoke(S);if(Q){L=Q.bottom-Q.top;}}return L;},_findStdModSection:function(L){return this.get(v).one("> ."+P.SECTION_CLASS_NAMES[L]);},_parseStdModHTML:function(Q){var L=this._findStdModSection(Q);if(L){if(!this._stdModParsed){this._stdModParsed={};b.before(this._applyStdModParsedConfig,this,H);}this._stdModParsed[Q+I]=1;return L.get("innerHTML");}return null;},_applyStdModParsedConfig:function(S,L,R){var Q=this._stdModParsed;if(Q){Q[a]=!(a in L)&&(a in Q);Q[i]=!(i in L)&&(i in Q);Q[c]=!(c in L)&&(c in Q);}},_getStdModContent:function(L){return(this[L+u])?this[L+u].get(h):null;},setStdModContent:function(R,Q,L){this.set(R+I,Q,{stdModPosition:L});},getStdModNode:function(L){return this[L+u]||null;},fillHeight:function(Q){if(Q){var V=this.get(v),W=[this.headerNode,this.bodyNode,this.footerNode],L,X,Y=0,T=0,S=false;for(var U=0,R=W.length;U<R;U++){L=W[U];if(L){if(L!==Q){Y+=this._getPreciseHeight(L);}else{S=true;}}}if(S){if(x.ie||x.opera){Q.set(F,0);}X=V.get(F)-parseInt(V.getComputedStyle("paddingTop"),10)-parseInt(V.getComputedStyle("paddingBottom"),10)-parseInt(V.getComputedStyle("borderBottomWidth"),10)-parseInt(V.getComputedStyle("borderTopWidth"),10);if(f.isNumber(X)){T=X-Y;if(T>=0){Q.set(F,T);}}}}}};b.WidgetStdMod=P;},"3.4.1",{requires:["base-build","widget"]});/*
YUI 3.4.1 (build 4118)
Copyright 2011 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
YUI.add("widget-position",function(a){var i=a.Lang,l=a.Widget,n="xy",j="position",g="positioned",k="boundingBox",h="relative",m="renderUI",f="bindUI",d="syncUI",c=l.UI_SRC,e="xyChange";function b(o){this._posNode=this.get(k);a.after(this._renderUIPosition,this,m);a.after(this._syncUIPosition,this,d);a.after(this._bindUIPosition,this,f);}b.ATTRS={x:{setter:function(o){this._setX(o);},getter:function(){return this._getX();},lazyAdd:false},y:{setter:function(o){this._setY(o);},getter:function(){return this._getY();},lazyAdd:false},xy:{value:[0,0],validator:function(o){return this._validateXY(o);}}};b.POSITIONED_CLASS_NAME=l.getClassName(g);b.prototype={_renderUIPosition:function(){this._posNode.addClass(b.POSITIONED_CLASS_NAME);},_syncUIPosition:function(){var o=this._posNode;if(o.getStyle(j)===h){this.syncXY();}this._uiSetXY(this.get(n));},_bindUIPosition:function(){this.after(e,this._afterXYChange);},move:function(){var o=arguments,p=(i.isArray(o[0]))?o[0]:[o[0],o[1]];this.set(n,p);},syncXY:function(){this.set(n,this._posNode.getXY(),{src:c});},_validateXY:function(o){return(i.isArray(o)&&i.isNumber(o[0])&&i.isNumber(o[1]));},_setX:function(o){this.set(n,[o,this.get(n)[1]]);},_setY:function(o){this.set(n,[this.get(n)[0],o]);},_getX:function(){return this.get(n)[0];},_getY:function(){return this.get(n)[1];},_afterXYChange:function(o){if(o.src!=c){this._uiSetXY(o.newVal);}},_uiSetXY:function(o){this._posNode.setXY(o);}};a.WidgetPosition=b;},"3.4.1",{requires:["base-build","node-screen","widget"]});/*
YUI 3.4.1 (build 4118)
Copyright 2011 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
YUI.add("widget-position-align",function(a){var f=a.Lang,d="align",b="alignOn",g="visible",i="boundingBox",e="offsetWidth",j="offsetHeight",h="region",k="viewportRegion";function c(l){if(!this._posNode){a.error("WidgetPosition needs to be added to the Widget, "+"before WidgetPositionAlign is added");}a.after(this._bindUIPosAlign,this,"bindUI");a.after(this._syncUIPosAlign,this,"syncUI");}c.ATTRS={align:{value:null},centered:{setter:"_setAlignCenter",lazyAdd:false,value:false},alignOn:{value:[],validator:a.Lang.isArray}};c.TL="tl";c.TR="tr";c.BL="bl";c.BR="br";c.TC="tc";c.RC="rc";c.BC="bc";c.LC="lc";c.CC="cc";c.prototype={_posAlignUIHandles:null,destructor:function(){this._detachPosAlignUIHandles();},_bindUIPosAlign:function(){this.after("alignChange",this._afterAlignChange);this.after("alignOnChange",this._afterAlignOnChange);this.after("visibleChange",this._syncUIPosAlign);},_syncUIPosAlign:function(){var l=this.get(d);this._uiSetVisiblePosAlign(this.get(g));if(l){this._uiSetAlign(l.node,l.points);}},align:function(m,l){if(arguments.length){this.set(d,{node:m,points:l});}else{this._syncUIPosAlign();}return this;},centered:function(l){return this.align(l,[c.CC,c.CC]);},_setAlignCenter:function(l){if(l){this.set(d,{node:l===true?null:l,points:[c.CC,c.CC]});}return l;},_uiSetAlign:function(o,n){if(!f.isArray(n)||n.length!==2){a.error("align: Invalid Points Arguments");return;}var m=this._getRegion(o),l,p,q;if(!m){return;}l=n[0];p=n[1];switch(p){case c.TL:q=[m.left,m.top];break;case c.TR:q=[m.right,m.top];break;case c.BL:q=[m.left,m.bottom];break;case c.BR:q=[m.right,m.bottom];break;case c.TC:q=[m.left+Math.floor(m.width/2),m.top];break;case c.BC:q=[m.left+Math.floor(m.width/2),m.bottom];break;case c.LC:q=[m.left,m.top+Math.floor(m.height/2)];break;case c.RC:q=[m.right,m.top+Math.floor(m.height/2)];break;case c.CC:q=[m.left+Math.floor(m.width/2),m.top+Math.floor(m.height/2)];break;default:break;}if(q){this._doAlign(l,q[0],q[1]);}},_uiSetVisiblePosAlign:function(l){if(l){this._attachPosAlignUIHandles();}else{this._detachPosAlignUIHandles();}},_attachPosAlignUIHandles:function(){if(this._posAlignUIHandles){return;}var n=this.get(i),m=a.bind(this._syncUIPosAlign,this),l=[];a.Array.each(this.get(b),function(r){var q=r.eventName,p=a.one(r.node)||n;if(q){l.push(p.on(q,m));}});this._posAlignUIHandles=l;},_detachPosAlignUIHandles:function(){var l=this._posAlignUIHandles;if(l){new a.EventHandle(l).detach();this._posAlignUIHandles=null;}},_doAlign:function(m,l,p){var o=this._posNode,n;switch(m){case c.TL:n=[l,p];break;case c.TR:n=[l-o.get(e),p];break;case c.BL:n=[l,p-o.get(j)];break;case c.BR:n=[l-o.get(e),p-o.get(j)];break;case c.TC:n=[l-(o.get(e)/2),p];break;case c.BC:n=[l-(o.get(e)/2),p-o.get(j)];break;case c.LC:n=[l,p-(o.get(j)/2)];break;case c.RC:n=[l-o.get(e),p-(o.get(j)/2)];break;case c.CC:n=[l-(o.get(e)/2),p-(o.get(j)/2)];break;default:break;}if(n){this.move(n);}},_getRegion:function(m){var l;if(!m){l=this._posNode.get(k);}else{m=a.Node.one(m);if(m){l=m.get(h);}}return l;},_afterAlignChange:function(l){var m=l.newVal;if(m){this._uiSetAlign(m.node,m.points);}},_afterAlignOnChange:function(l){this._detachPosAlignUIHandles();if(this.get(g)){this._attachPosAlignUIHandles();}}};a.WidgetPositionAlign=c;},"3.4.1",{requires:["widget-position"]});/*
YUI 3.4.1 (build 4118)
Copyright 2011 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
YUI.add("widget-stack",function(e){var m=e.Lang,s=e.UA,B=e.Node,f=e.Widget,A="zIndex",o="shim",y="visible",C="boundingBox",v="renderUI",g="bindUI",r="syncUI",p="offsetWidth",d="offsetHeight",l="parentNode",a="firstChild",w="ownerDocument",h="width",u="height",k="px",n="shimdeferred",D="shimresize",x="visibleChange",c="widthChange",j="heightChange",z="shimChange",b="zIndexChange",i="contentUpdate",q="stacked";function t(E){this._stackNode=this.get(C);this._stackHandles={};e.after(this._renderUIStack,this,v);e.after(this._syncUIStack,this,r);e.after(this._bindUIStack,this,g);}t.ATTRS={shim:{value:(s.ie==6)},zIndex:{value:1,setter:function(E){return this._setZIndex(E);}}};t.HTML_PARSER={zIndex:function(E){return E.getStyle(A);}};t.SHIM_CLASS_NAME=f.getClassName(o);t.STACKED_CLASS_NAME=f.getClassName(q);t.SHIM_TEMPLATE='<iframe class="'+t.SHIM_CLASS_NAME+'" frameborder="0" title="Widget Stacking Shim" src="javascript:false" tabindex="-1" role="presentation"></iframe>';t.prototype={_syncUIStack:function(){this._uiSetShim(this.get(o));this._uiSetZIndex(this.get(A));},_bindUIStack:function(){this.after(z,this._afterShimChange);this.after(b,this._afterZIndexChange);},_renderUIStack:function(){this._stackNode.addClass(t.STACKED_CLASS_NAME);},_setZIndex:function(E){if(m.isString(E)){E=parseInt(E,10);}if(!m.isNumber(E)){E=0;}return E;},_afterShimChange:function(E){this._uiSetShim(E.newVal);},_afterZIndexChange:function(E){this._uiSetZIndex(E.newVal);},_uiSetZIndex:function(E){this._stackNode.setStyle(A,E);},_uiSetShim:function(E){if(E){if(this.get(y)){this._renderShim();}else{this._renderShimDeferred();}if(s.ie==6){this._addShimResizeHandlers();}}else{this._destroyShim();}},_renderShimDeferred:function(){this._stackHandles[n]=this._stackHandles[n]||[];var F=this._stackHandles[n],E=function(G){if(G.newVal){this._renderShim();}};F.push(this.on(x,E));},_addShimResizeHandlers:function(){this._stackHandles[D]=this._stackHandles[D]||[];var F=this.sizeShim,E=this._stackHandles[D];E.push(this.after(x,F));E.push(this.after(c,F));E.push(this.after(j,F));E.push(this.after(i,F));},_detachStackHandles:function(E){var F=this._stackHandles[E],G;if(F&&F.length>0){while((G=F.pop())){G.detach();}}},_renderShim:function(){var E=this._shimNode,F=this._stackNode;if(!E){E=this._shimNode=this._getShimTemplate();F.insertBefore(E,F.get(a));this._detachStackHandles(n);this.sizeShim();}},_destroyShim:function(){if(this._shimNode){this._shimNode.get(l).removeChild(this._shimNode);this._shimNode=null;this._detachStackHandles(n);this._detachStackHandles(D);}},sizeShim:function(){var F=this._shimNode,E=this._stackNode;if(F&&s.ie===6&&this.get(y)){F.setStyle(h,E.get(p)+k);F.setStyle(u,E.get(d)+k);}},_getShimTemplate:function(){return B.create(t.SHIM_TEMPLATE,this._stackNode.get(w));}};e.WidgetStack=t;},"3.4.1",{requires:["base-build","widget"]});/*
YUI 3.4.1 (build 4118)
Copyright 2011 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
YUI.add("widget-position-constrain",function(c){var f="constrain",d="constrain|xyChange",b="constrainChange",n="preventOverlap",e="align",o="",g="bindUI",i="xy",a="x",m="y",j=c.Node,p="viewportRegion",l="region",k;function h(q){if(!this._posNode){c.error("WidgetPosition needs to be added to the Widget, before WidgetPositionConstrain is added");}c.after(this._bindUIPosConstrained,this,g);}h.ATTRS={constrain:{value:null,setter:"_setConstrain"},preventOverlap:{value:false}};k=h._PREVENT_OVERLAP={x:{"tltr":1,"blbr":1,"brbl":1,"trtl":1},y:{"trbr":1,"tlbl":1,"bltl":1,"brtr":1}};h.prototype={getConstrainedXY:function(t,s){s=s||this.get(f);var r=this._getRegion((s===true)?null:s),q=this._posNode.get(l);return[this._constrain(t[0],a,q,r),this._constrain(t[1],m,q,r)];},constrain:function(u,r){var t,q,s=r||this.get(f);if(s){t=u||this.get(i);q=this.getConstrainedXY(t,s);if(q[0]!==t[0]||q[1]!==t[1]){this.set(i,q,{constrained:true});}}},_setConstrain:function(q){return(q===true)?q:j.one(q);},_constrain:function(q,r,z,s){if(s){if(this.get(n)){q=this._preventOverlap(q,r,z,s);}var v=(r==a),y=(v)?s.width:s.height,u=(v)?z.width:z.height,t=(v)?s.left:s.top,w=(v)?s.right-u:s.bottom-u;if(q<t||q>w){if(u<y){if(q<t){q=t;}else{if(q>w){q=w;}}}else{q=t;}}}return q;},_preventOverlap:function(r,s,C,t){var w=this.get(e),B=(s===a),z,v,u,y,A,q;if(w&&w.points&&k[s][w.points.join(o)]){v=this._getRegion(w.node);if(v){z=(B)?C.width:C.height;u=(B)?v.left:v.top;y=(B)?v.right:v.bottom;A=(B)?v.left-t.left:v.top-t.top;q=(B)?t.right-v.right:t.bottom-v.bottom;}if(r>u){if(q<z&&A>z){r=u-z;}}else{if(A<z&&q>z){r=y;}}}return r;},_bindUIPosConstrained:function(){this.after(b,this._afterConstrainChange);this._enableConstraints(this.get(f));},_afterConstrainChange:function(q){this._enableConstraints(q.newVal);},_enableConstraints:function(q){if(q){this.constrain();this._cxyHandle=this._cxyHandle||this.on(d,this._constrainOnXYChange);}else{if(this._cxyHandle){this._cxyHandle.detach();this._cxyHandle=null;}}},_constrainOnXYChange:function(q){if(!q.constrained){q.newVal=this.getConstrainedXY(q.newVal);}},_getRegion:function(q){var r;if(!q){r=this._posNode.get(p);}else{q=j.one(q);if(q){r=q.get(l);}}return r;}};c.WidgetPositionConstrain=h;},"3.4.1",{requires:["widget-position"]});/*
YUI 3.4.1 (build 4118)
Copyright 2011 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
YUI.add("widget-modality",function(c){var p="widget",q="renderUI",f="bindUI",k="syncUI",u="boundingBox",m="contentBox",r="visible",e="zIndex",l="Change",i=c.Lang.isBoolean,s=c.ClassNameManager.getClassName,j="maskShow",a="maskHide",t="clickoutside",n="focusoutside",d=(function(){
/*! IS_POSITION_FIXED_SUPPORTED - Juriy Zaytsev (kangax) - http://yura.thinkweb2.com/cft/ */
var y=c.config.doc,w=null,x,v;if(y.createElement){x=y.createElement("div");if(x&&x.style){x.style.position="fixed";x.style.top="10px";v=y.body;if(v&&v.appendChild&&v.removeChild){v.appendChild(x);w=(x.offsetTop===10);v.removeChild(x);}}}return w;}());function o(v){if(v&&v.modal){c.after(this._renderUIModal,this,q);c.after(this._syncUIModal,this,k);c.after(this._bindUIModal,this,f);if(this.get("rendered")){this._renderUIModal();this._syncUIModal();this._bindUIModal();}}}var h="modal",b="mask",g={modal:s(p,h),mask:s(p,b)};o.ATTRS={maskNode:{getter:"_getMaskNode",readOnly:true},modal:{value:false,validator:i},focusOn:{valueFn:function(){return[{eventName:t},{eventName:n}];},validator:c.Lang.isArray}};o.CLASSES=g;o._GET_MASK=function(){var v=c.one(".yui3-widget-mask")||null,w=c.one("window");if(v){return v;}else{v=c.Node.create("<div></div>");v.addClass(g.mask);if(d){v.setStyles({position:"fixed",width:"100%",height:"100%",top:"0",left:"0",display:"block"});}else{v.setStyles({position:"absolute",width:w.get("winWidth")+"px",height:w.get("winHeight")+"px",top:"0",left:"0",display:"block"});}return v;}};o.STACK=[];o.prototype={_maskNode:o._GET_MASK(),_uiHandlesModal:null,_renderUIModal:function(){var v=this.get(u);this._repositionMask(this);v.addClass(g.modal);},_bindUIModal:function(){this.after(r+l,this._afterHostVisibleChangeModal);this.after(e+l,this._afterHostZIndexChangeModal);this.after("focusOnChange",this._afterFocusOnChange);if(!d||c.UA.ios||c.UA.android){c.on("scroll",this._resyncMask);}},_syncUIModal:function(){this._uiSetHostVisibleModal(this.get(r));this._uiSetHostZIndexModal(this.get(e));},_focus:function(w){var x=this.get(u),v=x.get("tabIndex");x.set("tabIndex",v>=0?v:0);this.focus();},_blur:function(){this.blur();},_getMaskNode:function(){return o._GET_MASK();},_uiSetHostVisibleModal:function(A){var v=o.STACK,y=this.get("maskNode"),z=this.get("modal"),x,w;if(A){c.Array.each(v,function(B){B._detachUIHandlesModal();B._blur();});v.unshift(this);this._repositionMask(this);this._uiSetHostZIndexModal(this.get(e));o._GET_MASK().show();if(z){c.later(1,this,"_attachUIHandlesModal");this._focus();}}else{w=c.Array.indexOf(v,this);if(w>=0){v.splice(w,1);}this._detachUIHandlesModal();this._blur();if(v.length){x=v[0];this._repositionMask(x);x._uiSetHostZIndexModal(x.get(e));if(x.get("modal")){c.later(1,x,"_attachUIHandlesModal");x._focus();}}else{if(y.getStyle("display")==="block"){y.hide();}}}},_uiSetHostZIndexModal:function(v){if(this.get("modal")){this.get("maskNode").setStyle(e,v||0);}},_attachUIHandlesModal:function(){if(this._uiHandlesModal||o.STACK[0]!==this){return;}var C=this.get(u),z=this.get("maskNode"),B=this.get("focusOn"),w=c.bind(this._focus,this),x=[],y,v,A;for(y=0,v=B.length;y<v;y++){A={};A.node=B[y].node;A.ev=B[y].eventName;A.keyCode=B[y].keyCode;if(!A.node&&!A.keyCode&&A.ev){x.push(C.on(A.ev,w));}else{if(A.node&&!A.keyCode&&A.ev){x.push(A.node.on(A.ev,w));}else{if(A.node&&A.keyCode&&A.ev){x.push(A.node.on(A.ev,w,A.keyCode));}else{c.Log('focusOn ATTR Error: The event with name "'+A.ev+'" could not be attached.');}}}}if(!d){x.push(c.one("win").on("scroll",c.bind(function(D){z.setStyle("top",z.get("docScrollY"));},this)));}this._uiHandlesModal=x;},_detachUIHandlesModal:function(){c.each(this._uiHandlesModal,function(v){v.detach();});this._uiHandlesModal=null;},_afterHostVisibleChangeModal:function(v){this._uiSetHostVisibleModal(v.newVal);},_afterHostZIndexChangeModal:function(v){this._uiSetHostZIndexModal(v.newVal);},isNested:function(){var w=o.STACK.length,v=(w>1)?true:false;return v;},_repositionMask:function(v){var y=this.get("modal"),x=v.get("modal"),z=this.get("maskNode"),A,w;if(y&&!x){z.remove();this.fire(a);}else{if((!y&&x)||(y&&x)){z.remove();this.fire(a);A=v.get(u);w=A.get("parentNode")||c.one("body");w.insert(z,w.get("firstChild"));this.fire(j);}}},_resyncMask:function(A){var B=A.currentTarget,v=B.get("docScrollX"),C=B.get("docScrollY"),y=B.get("innerWidth")||B.get("winWidth"),z=B.get("innerHeight")||B.get("winHeight"),x=o._GET_MASK();x.setStyles({"top":C+"px","left":v+"px","width":y+"px","height":z+"px"});},_afterFocusOnChange:function(v){this._detachUIHandlesModal();if(this.get(r)){this._attachUIHandlesModal();}}};c.WidgetModality=o;},"3.4.1",{requires:["widget","event-outside","base-build"]});/*
YUI 3.4.1 (build 4118)
Copyright 2011 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
YUI.add("event-key",function(g){var e="+alt",c="+ctrl",d="+meta",b="+shift",a=g.Lang.trim,f={KEY_MAP:{enter:13,esc:27,backspace:8,tab:9,pageup:33,pagedown:34},_typeRE:/^(up|down|press):/,_keysRE:/^(?:up|down|press):|\+(alt|ctrl|meta|shift)/g,processArgs:function(m){var p=m.splice(3,1)[0],o=g.Array.hash(p.match(/\+(?:alt|ctrl|meta|shift)\b/g)||[]),j={type:this._typeRE.test(p)?RegExp.$1:null,mods:o,keys:null},n=p.replace(this._keysRE,""),k,q,h,l;if(n){n=n.split(",");j.keys={};for(l=n.length-1;l>=0;--l){k=a(n[l]);if(!k){continue;}if(+k==k){j.keys[k]=o;}else{h=k.toLowerCase();if(this.KEY_MAP[h]){j.keys[this.KEY_MAP[h]]=o;if(!j.type){j.type="down";}}else{q=k.charAt(0).toUpperCase();h=h.charAt(0);j.keys[q.charCodeAt(0)]=(h!==q&&k===q)?g.merge(o,{"+shift":true}):o;}}}}if(!j.type){j.type="press";}return j;},on:function(n,k,m,j){var h=k._extra,i="key"+h.type,l=h.keys,o=(j)?"delegate":"on";k._detach=n[o](i,function(q){var p=l?l[q.keyCode]:h.mods;if(p&&(!p[e]||(p[e]&&q.altKey))&&(!p[c]||(p[c]&&q.ctrlKey))&&(!p[d]||(p[d]&&q.metaKey))&&(!p[b]||(p[b]&&q.shiftKey))){m.fire(q);}},j);},detach:function(j,h,i){h._detach.detach();}};f.delegate=f.on;f.detachDelegate=f.detach;g.Event.define("key",f,true);},"3.4.1",{requires:["event-synthetic"]});/*
YUI 3.4.1 (build 4118)
Copyright 2011 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
YUI.add("widget-autohide",function(a){var o="widgetAutohide",m="autohide",k="clickoutside",c="focusoutside",l="document",e="key",p="esc",f="bindUI",n="syncUI",i="rendered",j="boundingBox",h="visible",d="Change",b=a.ClassNameManager.getClassName;function g(q){a.after(this._bindUIAutohide,this,f);a.after(this._syncUIAutohide,this,n);if(this.get(i)){this._bindUIAutohide();this._syncUIAutohide();}}g.ATTRS={hideOn:{valueFn:function(){return[{node:a.one(l),eventName:e,keyCode:p}];},validator:a.Lang.isArray}};g.prototype={_uiHandlesAutohide:null,destructor:function(){this._detachUIHandlesAutohide();},_bindUIAutohide:function(){this.after(h+d,this._afterHostVisibleChangeAutohide);this.after("hideOnChange",this._afterHideOnChange);},_syncUIAutohide:function(){this._uiSetHostVisibleAutohide(this.get(h));},_uiSetHostVisibleAutohide:function(q){if(q){a.later(1,this,"_attachUIHandlesAutohide");}else{this._detachUIHandlesAutohide();}},_attachUIHandlesAutohide:function(){if(this._uiHandlesAutohide){return;}var w=this.get(j),u=a.bind(this.hide,this),r=[],q=this,s=this.get("hideOn"),t=0,v={node:undefined,ev:undefined,keyCode:undefined};for(;t<s.length;t++){v.node=s[t].node;v.ev=s[t].eventName;v.keyCode=s[t].keyCode;if(!v.node&&!v.keyCode&&v.ev){r.push(w.on(v.ev,u));}else{if(v.node&&!v.keyCode&&v.ev){r.push(v.node.on(v.ev,u));}else{if(v.node&&v.keyCode&&v.ev){r.push(v.node.on(v.ev,u,v.keyCode));}else{}}}}this._uiHandlesAutohide=r;},_detachUIHandlesAutohide:function(){a.each(this._uiHandlesAutohide,function(q){q.detach();});this._uiHandlesAutohide=null;},_afterHostVisibleChangeAutohide:function(q){this._uiSetHostVisibleAutohide(q.newVal);},_afterHideOnChange:function(q){this._detachUIHandlesAutohide();if(this.get(h)){this._attachUIHandlesAutohide();}}};a.WidgetAutohide=g;},"3.4.1",{requires:["base-build","widget","event-outside","event-key"]});/*
YUI 3.4.1 (build 4118)
Copyright 2011 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
YUI.add("widget-buttons",function(a){var i="boundingBox",h="visible",g="click",l="renderUI",f="bindUI",m="syncUI",k="button",d="buttonsChange",c=a.ClassNameManager.getClassName,b=a.Node.create,e=a.Lang;function j(n){a.after(this._renderUIButtons,this,l);a.after(this._bindUIButtons,this,f);a.after(this._syncUIButtons,this,m);}j.BUTTON_CLASS_NAMES={buttons:a.Widget.getClassName("buttons"),wrapper:a.Widget.getClassName(k,"wrapper"),button:c(k),content:c(k,"content"),icon:c(k,"icon")};j.ATTRS={buttons:{value:[{type:"close"}],validator:e.isArray}};j.DEFAULT_BUTTONS={"close":{section:a.WidgetStdMod.HEADER,value:'<span class="'+j.BUTTON_CLASS_NAMES.icon+'" />',classNames:c(k,"close"),action:function(n){n.preventDefault();this.hide();}}};j.TEMPLATES={wrapper:'<span class="'+j.BUTTON_CLASS_NAMES.wrapper+'"></span>',defaultTemplate:'<a href="{href}" class="'+j.BUTTON_CLASS_NAMES.button+'">'+'<span class="'+j.BUTTON_CLASS_NAMES.content+'">{value}</span></a>'};j.prototype={_hdBtnNode:null,_ftBtnNode:null,_buttonsArray:null,_uiHandlesButtons:null,_renderUIButtons:function(){this.get(i).addClass(j.BUTTON_CLASS_NAMES.buttons);this._buttonsArray=[];this._removeButtonNode(true,true);this._hdBtnNode=b(j.TEMPLATES.wrapper);this._ftBtnNode=b(j.TEMPLATES.wrapper);this._createButtons();},_bindUIButtons:function(){var n=this;this._uiHandlesButtons=[];a.each(this._buttonsArray,function(p){n._attachEventsToButton(p);});this.after(d,this._afterButtonsChange);},_syncUIButtons:function(){if(this._hdBtnNode.hasChildNodes()){this.setStdModContent(a.WidgetStdMod.HEADER,this._hdBtnNode,a.WidgetStdMod.AFTER);}if(this._ftBtnNode.hasChildNodes()){this.setStdModContent(a.WidgetStdMod.FOOTER,this._ftBtnNode,a.WidgetStdMod.AFTER);}},addButton:function(n){var o=this.get("buttons");o.push(n);this.set("buttons",o);},_createButtons:function(){var t=a.WidgetStdMod.HEADER,s=a.WidgetStdMod.FOOTER,q=j.TEMPLATES,p=j.DEFAULT_BUTTONS,n=this._hdBtnNode,r=this._ftBtnNode,o=this._buttonsArray;a.each(this.get("buttons"),function(u){var v,w,x;if(!e.isObject(u)){return;}if(u.type&&p[u.type]){u=p[u.type];}v=e.sub(q.defaultTemplate,{href:u.href||"#",value:u.value});w=b(v);x=a.Array(u.classNames);a.Array.each(x,w.addClass,w);o.push({node:w,cb:u.action});switch(u.section){case t:n.appendChild(w);break;case s:r.appendChild(w);break;default:}});return true;},_attachEventsToButton:function(n){this._uiHandlesButtons.push(n.node.after(g,n.cb,this));},_afterButtonsChange:function(n){this._detachEventsFromButtons();this._renderUIButtons();this._bindUIButtons();this._syncUIButtons();},_removeButtonNode:function(n,o){if(n&&this._hdBtnNode&&this._hdBtnNode.hasChildNodes()){this._hdBtnNode.remove();this._hdBtnNode=null;}if(o&&this._ftBtnNode&&this._ftBtnNode.hasChildNodes()){this._ftBtnNode.remove();this._ftBtnNode=null;}},_detachEventsFromButtons:function(){a.each(this._uiHandlesButtons,function(n){n.detach();});this._uiHandlesButtons=[];}};a.WidgetButtons=j;},"3.4.1",{requires:["base-build","widget","widget-stdmod"]});/*
YUI 3.4.1 (build 4118)
Copyright 2011 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
YUI.add("panel",function(a){a.Panel=a.Base.create("panel",a.Widget,[a.WidgetStdMod,a.WidgetPosition,a.WidgetStack,a.WidgetPositionAlign,a.WidgetPositionConstrain,a.WidgetModality,a.WidgetAutohide,a.WidgetButtons]);},"3.4.1",{requires:["widget","widget-stdmod","widget-position","widget-stack","widget-position-align","widget-position-constrain","widget-modality","widget-autohide","widget-buttons"]});/*
YUI 3.4.1 (build 4118)
Copyright 2011 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
YUI.add("querystring-stringify-simple",function(c){var b=c.namespace("QueryString"),a=encodeURIComponent;b.stringify=function(j,k){var d=[],h=k&&k.arrayKey?true:false,g,f,e;for(g in j){if(j.hasOwnProperty(g)){if(c.Lang.isArray(j[g])){for(f=0,e=j[g].length;f<e;f++){d.push(a(h?g+"[]":g)+"="+a(j[g][f]));}}else{d.push(a(g)+"="+a(j[g]));}}}return d.join("&");};},"3.4.1",{requires:["yui-base"]});/*
YUI 3.4.1 (build 4118)
Copyright 2011 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
YUI.add("io-base",function(a){var i=a.Lang.isNumber,j=a.Lang.isObject,g=["start","complete","end","success","failure"],b=["status","statusText","responseText","responseXML"],f=a.config.win,d=f.XMLHttpRequest,h=f.XDomainRequest,e=0;function c(k){var l=this;l._uid="io:"+e++;l._init(k);a.io._map[l._uid]=l;}c.prototype={_id:0,_headers:{"X-Requested-With":"XMLHttpRequest"},_timeout:{},_init:function(k){var m=this,l;m.cfg=k||{};a.augment(m,a.EventTarget);for(l=0;l<5;l++){m.publish("io:"+g[l],a.merge({broadcast:1},k));m.publish("io-trn:"+g[l],k);}},_create:function(l,r){var q=this,o={id:i(r)?r:q._id++,uid:q._uid},m=l.xdr,k=m&&m.use,n=(m&&m.use==="native"&&h),p=q._transport;if(!k){k=(l.form&&l.form.upload)?"iframe":"xhr";}switch(k){case"native":case"xhr":o.c=n?new h():d?new d():new ActiveXObject("Microsoft.XMLHTTP");o.t=n?true:false;break;default:o.c=(p&&p[k])||{};o.t=true;}return o;},_destroy:function(k){if(f&&!k.t){if(d){k.c.onreadystatechange=null;}else{if(a.UA.ie&&!k.e){k.c.abort();}}}k=k.c=null;},_evt:function(o,l,k){var q=this,m,r=k["arguments"],s=q.cfg.emitFacade,n="io:"+o,p="io-trn:"+o;if(l.e){l.c={status:0,statusText:l.e};}m=[(s)?{id:l.id,data:l.c,cfg:k,"arguments":r}:l.id];if(!s){if(o===g[0]||o===g[2]){if(r){m.push(r);}}else{m.push(l.c);if(r){m.push(r);}}}m.unshift(n);q.fire.apply(q,m);if(k.on){m[0]=p;q.once(p,k.on[o],k.context||a);q.fire.apply(q,m);}},start:function(l,k){this._evt(g[0],l,k);},complete:function(l,k){this._evt(g[1],l,k);},end:function(l,k){this._evt(g[2],l,k);this._destroy(l);},success:function(l,k){this._evt(g[3],l,k);this.end(l,k);},failure:function(l,k){this._evt(g[4],l,k);this.end(l,k);},_retry:function(m,l,k){this._destroy(m);k.xdr.use="flash";return this.send(l,k,m.id);},_concat:function(k,l){k+=(k.indexOf("?")===-1?"?":"&")+l;return k;},setHeader:function(k,l){if(l){this._headers[k]=l;}else{delete this._headers[k];}},_setHeaders:function(l,k){k=a.merge(this._headers,k);a.Object.each(k,function(n,m){if(n!=="disable"){l.setRequestHeader(m,k[m]);}});},_startTimeout:function(l,k){var m=this;m._timeout[l.id]=f.setTimeout(function(){m._abort(l,"timeout");},k);},_clearTimeout:function(k){f.clearTimeout(this._timeout[k]);delete this._timeout[k];},_result:function(n,l){var k;try{k=n.c.status;}catch(m){k=0;}if(k>=200&&k<300||k===304||k===1223){this.success(n,l);}else{this.failure(n,l);}},_rS:function(l,k){var m=this;if(l.c.readyState===4){if(k.timeout){m._clearTimeout(l.id);}f.setTimeout(function(){m.complete(l,k);m._result(l,k);},0);}},_abort:function(l,k){if(l&&l.c){l.e=k;l.c.abort();}},send:function(m,n,l){var o,k,r,s,w,q,v=this,x=m,p={};n=n?a.Object(n):{};o=v._create(n,l);k=n.method?n.method.toUpperCase():"GET";w=n.sync;q=n.data;if(j(q)){q=a.QueryString.stringify(q);}if(n.form){if(n.form.upload){return v.upload(o,m,n);}else{q=v._serialize(n.form,q);}}if(q){switch(k){case"GET":case"HEAD":case"DELETE":x=v._concat(x,q);q="";break;case"POST":case"PUT":n.headers=a.merge({"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"},n.headers);break;}}if(o.t){return v.xdr(x,o,n);}if(!w){o.c.onreadystatechange=function(){v._rS(o,n);};}try{o.c.open(k,x,!w,n.username||null,n.password||null);v._setHeaders(o.c,n.headers||{});v.start(o,n);if(n.xdr&&n.xdr.credentials){if(!a.UA.ie){o.c.withCredentials=true;}}o.c.send(q);if(w){for(r=0,s=b.length;r<s;++r){p[b[r]]=o.c[b[r]];}p.getAllResponseHeaders=function(){return o.c.getAllResponseHeaders();};p.getResponseHeader=function(u){return o.c.getResponseHeader(u);};v.complete(o,n);v._result(o,n);return p;}}catch(t){if(o.t){return v._retry(o,m,n);}else{v.complete(o,n);v._result(o,n);}}if(n.timeout){v._startTimeout(o,n.timeout);}return{id:o.id,abort:function(){return o.c?v._abort(o,"abort"):false;},isInProgress:function(){return o.c?(o.c.readyState%4):false;},io:v};}};a.io=function(l,k){var m=a.io._map["io:0"]||new c();return m.send.apply(m,[l,k]);};a.io.header=function(k,l){var m=a.io._map["io:0"]||new c();m.setHeader(k,l);};a.IO=c;a.io._map={};},"3.4.1",{requires:["event-custom-base","querystring-stringify-simple"]});/*
YUI 3.4.1 (build 4118)
Copyright 2011 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
YUI.add("datatype-xml-parse",function(b){var a=b.Lang;b.mix(b.namespace("DataType.XML"),{parse:function(f){var d=null;if(a.isString(f)){try{if(!a.isUndefined(ActiveXObject)){d=new ActiveXObject("Microsoft.XMLDOM");d.async=false;d.loadXML(f);}}catch(c){try{if(!a.isUndefined(DOMParser)){d=new DOMParser().parseFromString(f,"text/xml");}}catch(g){}}}if((a.isNull(d))||(a.isNull(d.documentElement))||(d.documentElement.nodeName==="parsererror")){}return d;}});b.namespace("Parsers").xml=b.DataType.XML.parse;},"3.4.1");/*
YUI 3.4.1 (build 4118)
Copyright 2011 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
YUI.add("io-xdr",function(a){var k=a.publish("io:xdrReady",{fireOnce:true}),e={},g={},j=a.config.doc,l=a.config.win,f=l&&l.XDomainRequest;function h(m,q,d){var n='<object id="io_swf" type="application/x-shockwave-flash" data="'+m+'" width="0" height="0">'+'<param name="movie" value="'+m+'">'+'<param name="FlashVars" value="yid='+q+"&uid="+d+'">'+'<param name="allowScriptAccess" value="always">'+"</object>",p=j.createElement("div");j.body.appendChild(p);p.innerHTML=n;}function b(p,m,n){if(m==="flash"){p.c.responseText=decodeURI(p.c.responseText);}if(n==="xml"){p.c.responseXML=a.DataType.XML.parse(p.c.responseText);}return p;}function i(d,m){return d.c.abort(d.id,m);}function c(d){return f?g[d.id]!==4:d.c.isInProgress(d.id);}a.mix(a.IO.prototype,{_transport:{},_ieEvt:function(n,q){var p=this,m=n.id,d="timeout";n.c.onprogress=function(){g[m]=3;};n.c.onload=function(){g[m]=4;p.xdrResponse("success",n,q);};n.c.onerror=function(){g[m]=4;p.xdrResponse("failure",n,q);};if(q[d]){n.c.ontimeout=function(){g[m]=4;p.xdrResponse(d,n,q);};n.c[d]=q[d];}},xdr:function(d,m,p){var n=this;if(p.xdr.use==="flash"){e[m.id]=p;l.setTimeout(function(){try{m.c.send(d,{id:m.id,uid:m.uid,method:p.method,data:p.data,headers:p.headers});}catch(o){n.xdrResponse("transport error",m,p);delete e[m.id];}},a.io.xdr.delay);}else{if(f){n._ieEvt(m,p);m.c.open(p.method||"GET",d);m.c.send(p.data);}else{m.c.send(d,m,p);}}return{id:m.id,abort:function(){return m.c?i(m,p):false;},isInProgress:function(){return m.c?c(m.id):false;},io:n};},xdrResponse:function(q,s,v){v=e[s.id]?e[s.id]:v;var t=this,n=f?g:e,p=v.xdr.use,r=v.xdr.dataType;switch(q){case"start":t.start(s,v);break;case"success":t.success(b(s,p,r),v);delete n[s.id];break;case"timeout":case"abort":case"transport error":s.c={status:0,statusText:q};case"failure":t.failure(b(s,p,r),v);delete n[s.id];break;}},_xdrReady:function(m,d){a.fire(k,m,d);},transport:function(d){if(d.id==="flash"){h(a.UA.ie?d.src+"?d="+new Date().valueOf().toString():d.src,a.id,d.uid);}this._transport[d.id]=(d.id==="flash")?j.getElementById("io_swf"):d.src;}});a.io.xdrReady=function(n,d){var m=a.io._map[d];a.io.xdr.delay=0;m._xdrReady.apply(m,[n,d]);};a.io.xdrResponse=function(d,m,p){var n=a.io._map[m.uid];n.xdrResponse.apply(n,[d,m,p]);};a.io.transport=function(m){var d=a.io._map["io:0"]||new a.IO();m.uid=d._uid;d.transport.apply(d,[m]);};a.io.xdr={delay:100};},"3.4.1",{requires:["io-base","datatype-xml"]});/*
YUI 3.4.1 (build 4118)
Copyright 2011 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
YUI.add("io-form",function(b){var a=encodeURIComponent;b.mix(b.IO.prototype,{_serialize:function(w,B){var q=[],y=w.useDisabled||false,A=0,g=(typeof w.id==="string")?w.id:w.id.getAttribute("id"),t,r,k,z,u,p,x,l,m,h;if(!g){g=b.guid("io:");w.id.setAttribute("id",g);}r=b.config.doc.getElementById(g);for(p=0,x=r.elements.length;p<x;++p){t=r.elements[p];u=t.disabled;k=t.name;if(y?k:k&&!u){k=a(k)+"=";z=a(t.value);switch(t.type){case"select-one":if(t.selectedIndex>-1){h=t.options[t.selectedIndex];q[A++]=k+a(h.attributes.value&&h.attributes.value.specified?h.value:h.text);}break;case"select-multiple":if(t.selectedIndex>-1){for(l=t.selectedIndex,m=t.options.length;l<m;++l){h=t.options[l];if(h.selected){q[A++]=k+a(h.attributes.value&&h.attributes.value.specified?h.value:h.text);}}}break;case"radio":case"checkbox":if(t.checked){q[A++]=k+z;}break;case"file":case undefined:case"reset":case"button":break;case"submit":default:q[A++]=k+z;}}}return B?q.join("&")+"&"+B:q.join("&");}},true);},"3.4.1",{requires:["io-base","node-base"]});/*
YUI 3.4.1 (build 4118)
Copyright 2011 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
YUI.add("io-upload-iframe",function(g){var b=g.config.win,f=g.config.doc,c=(f.documentMode&&f.documentMode>=8),a=decodeURIComponent;function h(j,l,k){var d=g.Node.create('<iframe id="io_iframe'+j.id+'" name="io_iframe'+j.id+'" />');d._node.style.position="absolute";d._node.style.top="-1000px";d._node.style.left="-1000px";g.one("body").appendChild(d);g.on("load",function(){k._uploadComplete(j,l);},"#io_iframe"+j.id);}function e(d){g.Event.purgeElement("#io_iframe"+d,false);g.one("body").removeChild(g.one("#io_iframe"+d));}g.mix(g.IO.prototype,{_addData:function(p,n){if(g.Lang.isObject(n)){n=g.QueryString.stringify(n);}var q=[],d=n.split("="),k,j;for(k=0,j=d.length-1;k<j;k++){q[k]=f.createElement("input");q[k].type="hidden";q[k].name=a(d[k].substring(d[k].lastIndexOf("&")+1));q[k].value=(k+1===j)?a(d[k+1]):a(d[k+1].substring(0,(d[k+1].lastIndexOf("&"))));p.appendChild(q[k]);}return q;},_removeData:function(k,m){var j,d;for(j=0,d=m.length;j<d;j++){k.removeChild(m[j]);}},_setAttrs:function(i,j,d){i.setAttribute("action",d);i.setAttribute("method","POST");i.setAttribute("target","io_iframe"+j);i.setAttribute(g.UA.ie&&!c?"encoding":"enctype","multipart/form-data");},_resetAttrs:function(i,d){g.Object.each(d,function(j,k){if(j){i.setAttribute(k,j);}else{i.removeAttribute(k);}});},_startTimeout:function(d,j){var i=this;i._timeout[d.id]=b.setTimeout(function(){d.status=0;d.statusText="timeout";i.complete(d,j);i.end(d,j);},j.timeout);},_clearTimeout:function(i){var d=this;b.clearTimeout(d._timeout[i]);delete d._timeout[i];},_uploadComplete:function(m,q){var n=this,l=g.one("#io_iframe"+m.id).get("contentWindow.document"),i=l.one("body"),k;if(q.timeout){n._clearTimeout(m.id);}try{if(i){k=i.one("pre:first-child");m.c.responseText=k?k.get("text"):i.get("text");}else{m.c.responseXML=l._node;}}catch(j){m.e="upload failure";}n.complete(m,q);n.end(m,q);b.setTimeout(function(){e(m.id);},0);},_upload:function(l,j,n){var m=this,k=(typeof n.form.id==="string")?f.getElementById(n.form.id):n.form.id,i={action:k.getAttribute("action"),target:k.getAttribute("target")},d;m._setAttrs(k,l.id,j);if(n.data){d=m._addData(k,n.data);}if(n.timeout){m._startTimeout(l,n);}k.submit();m.start(l,n);if(n.data){m._removeData(k,d);}m._resetAttrs(k,i);return{id:l.id,abort:function(){l.status=0;l.statusText="abort";if(g.one("#io_iframe"+l.id)){e(l.id);m.complete(l,n);m.end(l,n);}else{return false;}},isInProgress:function(){return g.one("#io_iframe"+l.id)?true:false;},io:m};},upload:function(i,d,j){h(i,j,this);return this._upload(i,d,j);}});},"3.4.1",{requires:["io-base","node-base"]});/*
YUI 3.4.1 (build 4118)
Copyright 2011 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
YUI.add("queue-promote",function(a){a.mix(a.Queue.prototype,{indexOf:function(b){return a.Array.indexOf(this._q,b);},promote:function(c){var b=this.indexOf(c);if(b>-1){this._q.unshift(this._q.splice(b,1)[0]);}},remove:function(c){var b=this.indexOf(c);if(b>-1){this._q.splice(b,1);}}});},"3.4.1",{requires:["yui-base"]});/*
YUI 3.4.1 (build 4118)
Copyright 2011 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
YUI.add("io-queue",function(b){var c=b.io._map["io:0"]||new b.IO();b.mix(b.IO.prototype,{_q:new b.Queue(),_qActiveId:null,_qInit:false,_qState:1,_qShift:function(){var e=this,d=e._q.next();e._qActiveId=d.id;e._qState=0;e.send(d.uri,d.cfg,d.id);},queue:function(d,g){var f=this,e={uri:d,cfg:g,id:this._id++};if(!f._qInit){b.on("io:complete",function(i,h){f._qNext(i);},f);f._qInit=true;}f._q.add(e);if(f._qState===1){f._qShift();}return e;},_qNext:function(e){var d=this;d._qState=1;if(d._qActiveId===e&&d._q.size()>0){d._qShift();}},qPromote:function(d){this._q.promote(d);},qRemove:function(d){this._q.remove(d);},qStart:function(){var d=this;d._qState=1;if(d._q.size()>0){d._qShift();}},qStop:function(){this._qState=0;},qSize:function(){return this._q.size();}},true);function a(d,e){return c.queue.apply(c,[d,e]);}a.start=function(){c.qStart();};a.stop=function(){c.qStop();};a.promote=function(d){c.qPromote(d);};a.remove=function(d){c.qRemove(d);};a.size=function(){c.qSize();};b.io.queue=a;},"3.4.1",{requires:["io-base","queue-promote"]});/*
YUI 3.4.1 (build 4118)
Copyright 2011 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
YUI.add("selection",function(b){var a="textContent",d="innerHTML",c="fontFamily";if(b.UA.ie){a="nodeValue";}b.Selection=function(o){var j,p,f,g,e,l;if(b.config.win.getSelection){j=b.config.win.getSelection();}else{if(b.config.doc.selection){j=b.config.doc.selection.createRange();}}this._selection=j;if(j.pasteHTML){this.isCollapsed=(j.compareEndPoints("StartToEnd",j))?false:true;if(this.isCollapsed){this.anchorNode=this.focusNode=b.one(j.parentElement());if(o){f=b.config.doc.elementFromPoint(o.clientX,o.clientY);}e=j.duplicate();if(!f){p=j.parentElement();g=p.childNodes;for(l=0;l<g.length;l++){if(e.inRange(j)){if(!f){f=g[l];}}}}this.ieNode=f;if(f){if(f.nodeType!==3){if(f.firstChild){f=f.firstChild;}if(f&&f.tagName&&f.tagName.toLowerCase()==="body"){if(f.firstChild){f=f.firstChild;}}}this.anchorNode=this.focusNode=b.Selection.resolve(f);e.moveToElementText(j.parentElement());var m=j.compareEndPoints("StartToStart",e),q=0;if(m){q=Math.abs(j.move("character",-9999));}this.anchorOffset=this.focusOffset=q;this.anchorTextNode=this.focusTextNode=b.one(f);}}else{if(j.htmlText&&j.htmlText!==""){var k=b.Node.create(j.htmlText);if(k&&k.get("id")){var h=k.get("id");this.anchorNode=this.focusNode=b.one("#"+h);}else{if(k){k=k.get("childNodes");this.anchorNode=this.focusNode=k.item(0);}}}}}else{this.isCollapsed=j.isCollapsed;this.anchorNode=b.Selection.resolve(j.anchorNode);this.focusNode=b.Selection.resolve(j.focusNode);this.anchorOffset=j.anchorOffset;this.focusOffset=j.focusOffset;this.anchorTextNode=b.one(j.anchorNode);this.focusTextNode=b.one(j.focusNode);}if(b.Lang.isString(j.text)){this.text=j.text;}else{if(j.toString){this.text=j.toString();}else{this.text="";}}};b.Selection.removeFontFamily=function(f){f.removeAttribute("face");var e=f.getAttribute("style").toLowerCase();if(e===""||(e=="font-family: ")){f.removeAttribute("style");}if(e.match(b.Selection.REG_FONTFAMILY)){e=e.replace(b.Selection.REG_FONTFAMILY,"");f.setAttribute("style",e);}};b.Selection.filter=function(e){var h=(new Date()).getTime();var g=b.all(b.Selection.ALL),k=b.all("strong,em"),n=b.config.doc,p,f={},i="",l;var j=(new Date()).getTime();g.each(function(r){var q=b.Node.getDOMNode(r);if(q.style[c]){f["."+r._yuid]=q.style[c];r.addClass(r._yuid);b.Selection.removeFontFamily(q);}});var o=(new Date()).getTime();b.all(".hr").addClass("yui-skip").addClass("yui-non");if(b.UA.ie){p=n.getElementsByTagName("hr");b.each(p,function(t){var r=n.createElement("div");r.className="hr yui-non yui-skip";r.setAttribute("readonly",true);r.setAttribute("contenteditable",false);if(t.parentNode){t.parentNode.replaceChild(r,t);}var q=r.style;q.border="1px solid #ccc";q.lineHeight="0";q.height="0";q.fontSize="0";q.marginTop="5px";q.marginBottom="5px";q.marginLeft="0px";q.marginRight="0px";q.padding="0";});}b.each(f,function(r,q){i+=q+" { font-family: "+r.replace(/"/gi,"")+"; }";});b.StyleSheet(i,"editor");k.each(function(u,q){var r=u.get("tagName").toLowerCase(),s="i";if(r==="strong"){s="b";}b.Selection.prototype._swap(k.item(q),s);});l=b.all("ol,ul");l.each(function(r,q){var s=r.all("li");if(!s.size()){r.remove();}});if(e){b.Selection.filterBlocks();}var m=(new Date()).getTime();};b.Selection.filterBlocks=function(){var f=(new Date()).getTime();var n=b.config.doc.body.childNodes,h,g,q=false,k=true,e,r,t,p,m,o,u;if(n){for(h=0;h<n.length;h++){g=b.one(n[h]);if(!g.test(b.Selection.BLOCKS)){k=true;if(n[h].nodeType==3){o=n[h][a].match(b.Selection.REG_CHAR);u=n[h][a].match(b.Selection.REG_NON);if(o===null&&u){k=false;}}if(k){if(!q){q=[];}q.push(n[h]);}}else{q=b.Selection._wrapBlock(q);}}q=b.Selection._wrapBlock(q);}r=b.all(b.Selection.DEFAULT_BLOCK_TAG);if(r.size()===1){t=r.item(0).all("br");if(t.size()===1){if(!t.item(0).test(".yui-cursor")){t.item(0).remove();}var j=r.item(0).get("innerHTML");if(j===""||j===" "){r.set("innerHTML",b.Selection.CURSOR);e=new b.Selection();e.focusCursor(true,true);}if(t.item(0).test(".yui-cursor")&&b.UA.ie){t.item(0).remove();}}}else{r.each(function(s){var i=s.get("innerHTML");if(i===""){s.remove();}});}if(!b.UA.ie){}var l=(new Date()).getTime();};b.Selection.REG_FONTFAMILY=/font-family: ;/;b.Selection.REG_CHAR=/[a-zA-Z-0-9_!@#\$%\^&*\(\)-=_+\[\]\\{}|;':",.\/<>\?]/gi;b.Selection.REG_NON=/[\s|\n|\t]/gi;b.Selection.REG_NOHTML=/<\S[^><]*>/g;b.Selection._wrapBlock=function(f){if(f){var e=b.Node.create("<"+b.Selection.DEFAULT_BLOCK_TAG+"></"+b.Selection.DEFAULT_BLOCK_TAG+">"),h=b.one(f[0]),g;for(g=1;g<f.length;g++){e.append(f[g]);}h.replace(e);e.prepend(h);}return false;};b.Selection.unfilter=function(){var g=b.all("body [class]"),h="",f,i,e=b.one("body");g.each(function(j){if(j.hasClass(j._yuid)){j.setStyle(c,j.getStyle(c));j.removeClass(j._yuid);if(j.getAttribute("class")===""){j.removeAttribute("class");}}});f=b.all(".yui-non");f.each(function(j){if(!j.hasClass("yui-skip")&&j.get("innerHTML")===""){j.remove();}else{j.removeClass("yui-non").removeClass("yui-skip");}});i=b.all("body [id]");i.each(function(j){if(j.get("id").indexOf("yui_3_")===0){j.removeAttribute("id");j.removeAttribute("_yuid");}});if(e){h=e.get("innerHTML");}b.all(".hr").addClass("yui-skip").addClass("yui-non");return h;};b.Selection.resolve=function(f){if(f&&f.nodeType===3){try{f=f.parentNode;}catch(e){f="body";}}return b.one(f);};b.Selection.getText=function(f){var e=f.get("innerHTML").replace(b.Selection.REG_NOHTML,"");e=e.replace("<span><br></span>","").replace("<br>","");return e;};b.Selection.DEFAULT_BLOCK_TAG="p";b.Selection.ALL="[style],font[face]";b.Selection.BLOCKS="p,div,ul,ol,table,style";b.Selection.TMP="yui-tmp";b.Selection.DEFAULT_TAG="span";b.Selection.CURID="yui-cursor";b.Selection.CUR_WRAPID="yui-cursor-wrapper";b.Selection.CURSOR='<span><br class="yui-cursor"></span>';b.Selection.hasCursor=function(){var e=b.all("#"+b.Selection.CUR_WRAPID);return e.size();};b.Selection.cleanCursor=function(){var f,e="br.yui-cursor";f=b.all(e);if(f.size()){f.each(function(g){var i=g.get("parentNode.parentNode.childNodes"),h;if(i.size()){g.remove();}else{h=b.Selection.getText(i.item(0));
if(h!==""){g.remove();}}});}};b.Selection.prototype={text:null,isCollapsed:null,anchorNode:null,anchorOffset:null,anchorTextNode:null,focusNode:null,focusOffset:null,focusTextNode:null,_selection:null,_wrap:function(g,e){var f=b.Node.create("<"+e+"></"+e+">");f.set(d,g.get(d));g.set(d,"");g.append(f);return b.Node.getDOMNode(f);},_swap:function(g,e){var f=b.Node.create("<"+e+"></"+e+">");f.set(d,g.get(d));g.replace(f,g);return b.Node.getDOMNode(f);},getSelected:function(){b.Selection.filter();b.config.doc.execCommand("fontname",null,b.Selection.TMP);var f=b.all(b.Selection.ALL),e=[];f.each(function(h,g){if(h.getStyle(c)==b.Selection.TMP){h.setStyle(c,"");b.Selection.removeFontFamily(h);if(!h.test("body")){e.push(b.Node.getDOMNode(f.item(g)));}}});return b.all(e);},insertContent:function(e){return this.insertAtCursor(e,this.anchorTextNode,this.anchorOffset,true);},insertAtCursor:function(l,g,i,o){var q=b.Node.create("<"+b.Selection.DEFAULT_TAG+' class="yui-non"></'+b.Selection.DEFAULT_TAG+">"),f,j,h,p,k=this.createRange(),n;if(g&&g.test("body")){n=b.Node.create("<span></span>");g.append(n);g=n;}if(k.pasteHTML){if(i===0&&g&&!g.previous()&&g.get("nodeType")===3){g.insert(l,"before");if(k.moveToElementText){k.moveToElementText(b.Node.getDOMNode(g.previous()));}k.collapse(false);k.select();return g.previous();}else{p=b.Node.create(l);try{k.pasteHTML('<span id="rte-insert"></span>');}catch(m){}f=b.one("#rte-insert");if(f){f.set("id","");f.replace(p);if(k.moveToElementText){k.moveToElementText(b.Node.getDOMNode(p));}k.collapse(false);k.select();return p;}else{b.on("available",function(){f.set("id","");f.replace(p);if(k.moveToElementText){k.moveToElementText(b.Node.getDOMNode(p));}k.collapse(false);k.select();},"#rte-insert");}}}else{if(i>0){f=g.get(a);j=b.one(b.config.doc.createTextNode(f.substr(0,i)));h=b.one(b.config.doc.createTextNode(f.substr(i)));g.replace(j,g);p=b.Node.create(l);if(p.get("nodeType")===11){n=b.Node.create("<span></span>");n.append(p);p=n;}j.insert(p,"after");if(h){p.insert(q,"after");q.insert(h,"after");this.selectNode(q,o);}}else{if(g.get("nodeType")===3){g=g.get("parentNode");}p=b.Node.create(l);l=g.get("innerHTML").replace(/\n/gi,"");if(l===""||l==="<br>"){g.append(p);}else{if(p.get("parentNode")){g.insert(p,"before");}else{b.one("body").prepend(p);}}if(g.get("firstChild").test("br")){g.get("firstChild").remove();}}}return p;},wrapContent:function(f){f=(f)?f:b.Selection.DEFAULT_TAG;if(!this.isCollapsed){var h=this.getSelected(),k=[],g,i,j,e;h.each(function(o,l){var m=o.get("tagName").toLowerCase();if(m==="font"){k.push(this._swap(h.item(l),f));}else{k.push(this._wrap(h.item(l),f));}},this);g=this.createRange();j=k[0];i=k[k.length-1];if(this._selection.removeAllRanges){g.setStart(k[0],0);g.setEnd(i,i.childNodes.length);this._selection.removeAllRanges();this._selection.addRange(g);}else{if(g.moveToElementText){g.moveToElementText(b.Node.getDOMNode(j));e=this.createRange();e.moveToElementText(b.Node.getDOMNode(i));g.setEndPoint("EndToEnd",e);}g.select();}k=b.all(k);return k;}else{return b.all([]);}},replace:function(k,i){var f=this.createRange(),j,e,g,h;if(f.getBookmark){g=f.getBookmark();e=this.anchorNode.get("innerHTML").replace(k,i);this.anchorNode.set("innerHTML",e);f.moveToBookmark(g);h=b.one(f.parentElement());}else{j=this.anchorTextNode;e=j.get(a);g=e.indexOf(k);e=e.replace(k,"");j.set(a,e);h=this.insertAtCursor(i,j,g,true);}return h;},remove:function(){this._selection.removeAllRanges();return this;},createRange:function(){if(b.config.doc.selection){return b.config.doc.selection.createRange();}else{return b.config.doc.createRange();}},selectNode:function(i,k,f){if(!i){return;}f=f||0;i=b.Node.getDOMNode(i);var g=this.createRange();if(g.selectNode){g.selectNode(i);this._selection.removeAllRanges();this._selection.addRange(g);if(k){try{this._selection.collapse(i,f);}catch(h){this._selection.collapse(i,0);}}}else{if(i.nodeType===3){i=i.parentNode;}try{g.moveToElementText(i);}catch(j){}if(k){g.collapse(((f)?false:true));}g.select();}return this;},setCursor:function(){this.removeCursor(false);return this.insertContent(b.Selection.CURSOR);},getCursor:function(){return b.all("#"+b.Selection.CURID);},removeCursor:function(e){var f=this.getCursor();if(f){if(e){f.removeAttribute("id");f.set("innerHTML",'<br class="yui-cursor">');}else{f.remove();}}return f;},focusCursor:function(g,e){if(g!==false){g=true;}if(e!==false){e=true;}var f=this.removeCursor(true);if(f){f.each(function(h){this.selectNode(h,g,e);},this);}},toString:function(){return"Selection Object";}};},"3.4.1",{skinnable:false,requires:["node"]});
Соседние файлы в папке Оформление курсовой работы_files