"undefined"==typeof AdfDhtmlDvtToolkitPeer&&AdfRichUIPeer.createPeerClass(AdfDhtmlCommonFlashPeer,"AdfDhtmlDvtToolkitPeer",!1);AdfDhtmlDvtToolkitPeer.InitSubclass=function(){AdfObject.ensureClassInitialization(AdfDhtmlDvtToolkitPeer);AdfRichUIPeer.addSuppressedPPRAttributes(this,AdfDvtToolkitComponent.__CLIENT_WIDTH_KEY);AdfRichUIPeer.addSuppressedPPRAttributes(this,AdfDvtToolkitComponent.__CLIENT_HEIGHT_KEY)};AdfDhtmlDvtToolkitPeer._FETCH_SPINNER_XML="\x3cfetch/\x3e";
AdfDhtmlDvtToolkitPeer.prototype.InitDomElement=function(a,b){AdfDhtmlDvtToolkitPeer.superclass.InitDomElement.call(this,a,b);var c=AdfDhtmlDvtToolkitPeer._getResourcesString(a.getClientId());c&&(c=AdfDhtmlCommonFlashUtils.toJson(c))&&dvt.Bundle.addLocalizedStrings(c);if(c=AdfDhtmlDvtToolkitPeer._getStyleClassString(a.getClientId()))if(c=AdfDhtmlCommonFlashUtils.toJson(c))this._stylesObj=this._getStylesObj(c,b);"ATTACHMENT"==this.getClientImageFormat(a)&&this.DisplayDataUri(a);if(a.getProperty(AdfDhtmlCommonFlashPeer.__IS_IN_TABLE_KEY)&&
"HTML5"==this.getClientImageFormat(a)){var d=AdfAgent.AGENT.getComputedStyle(b),c=Number(d.width.substring(0,d.width.length-2))|0,d=Number(d.height.substring(0,d.height.length-2))|0;this._setDimensions(a,c,d);this._createAndRender(a,b)}AdfAgent.AGENT.getPlatform()!=AdfAgent.IE_PLATFORM&&(c=this.createCallback(this.OnDragEnd),this._dragCallbacks={touchend:c,mouseup:c},AdfAgent.AGENT.startMouseEventCapture(this._dragCallbacks))};
AdfDhtmlDvtToolkitPeer.prototype.ComponentRemoved=function(a){AdfDhtmlDvtToolkitPeer.superclass.ComponentRemoved.call(this,a);AdfAgent.AGENT.getPlatform()!=AdfAgent.IE_PLATFORM&&AdfAgent.AGENT.stopMouseEventCapture(this._dragCallbacks)};AdfDhtmlDvtToolkitPeer.prototype.OnDragEnd=function(a){this._view&&this._view.getEventManager&&this._view.getEventManager().endDrag&&this._view.getEventManager().endDrag()};
AdfDhtmlDvtToolkitPeer.prototype.ResizeNotify=function(a,b,c,d){AdfDhtmlDvtToolkitPeer.superclass.ResizeNotify.call(a,b,c,d);if(!this.IsInMashup())if(a=this.getComponent(),b=this.getClientImageFormat(a),"HTML5"==b)this._view?(c!=this._clientWidth||d!=this._clientHeight)&&5<=Math.abs(this._clientWidth-c)+Math.abs(this._clientHeight-d)&&(this._setDimensions(a,c,d),this._render(a,null)):(this._setDimensions(a,c,d),this._createAndRender(a,this.getDomElement()));else if("PNG"==b){b=a.getProperty(AdfDvtToolkitComponent.__CLIENT_WIDTH_KEY);
var e=a.getProperty(AdfDvtToolkitComponent.__CLIENT_HEIGHT_KEY);if(5<Math.abs(b-c)||5<Math.abs(e-d))this._setDimensions(a,c,d),c=new AdfCommonFlashReloadEvent(a),c.setPartial(!0),AdfPage.PAGE.queueEventToServer(c)}};AdfDhtmlDvtToolkitPeer.prototype.DomReplaceNotify=function(a){AdfDhtmlDvtToolkitPeer.superclass.DomReplaceNotify.call(a);a=this.getComponent();var b=AdfDhtmlDvtToolkitPeer._getOptionsString(a.getClientId());this._render(a,b)};AdfDhtmlDvtToolkitPeer.prototype.ApplyRootSvgAttributes=function(a){};
AdfDhtmlDvtToolkitPeer.prototype.CreateView=function(a,b,c){};AdfDhtmlDvtToolkitPeer.prototype.GetView=function(){return this._view};AdfDhtmlDvtToolkitPeer.prototype.GetDataProperties=function(){return[]};AdfDhtmlDvtToolkitPeer.prototype.UpdateData=function(a){var b=this.GetDataProperties();if(a&&!(0>=b.length)){for(var c={},d=0;d<b.length;d++){var e=b[d];c[e]=a[e]}this.queueRender(c)}};AdfDhtmlDvtToolkitPeer.prototype.SkipQueueRender=function(a){this._skipQueueRender=a};
AdfDhtmlDvtToolkitPeer.prototype.queueRender=function(a){this._skipQueueRender||"HTML5"!=this.getClientImageFormat(this.getComponent())||(this._view.applyOptions(a),this._bQueuedRender||(a=this.createCallback(this._doQueuedRender),window.setTimeout(a,0),this._bQueuedRender=!0))};
AdfDhtmlDvtToolkitPeer.prototype._setDimensions=function(a,b,c){this._clientWidth=b;this._clientHeight=c;a.setProperty(AdfDvtToolkitComponent.__CLIENT_HEIGHT_KEY,c);a.setProperty(AdfDvtToolkitComponent.__CLIENT_WIDTH_KEY,b)};
AdfDhtmlDvtToolkitPeer.prototype._createAndRender=function(a,b){var c=a.getClientId(),d=new dvt.Context(b,c);this.ApplyRootSvgAttributes(d.getSvgDocument());d.setLocaleHelpers({numberConverterFactory:{createConverter:function(a){return"percent"==a.style?(a=dvt.Bundle.getTranslatedString(dvt.Bundle.UTIL_PREFIX,"PERCENT_CONVERTER_"+a.maximumFractionDigits),AdfDvtValueFormatUtils._parseValueFormat(a)):null}}});this._view=this.CreateView(d,this.HandleEvent,this);d.getStage().addChild(this._view);c=AdfDhtmlDvtToolkitPeer._getOptionsString(c);
AdfAgent.AGENT.getPlatform()==AdfAgent.GECKO_PLATFORM?(d=this.createCallback(this._render),window.setTimeout(d,0,a,c)):this._render(a,c)};AdfDhtmlDvtToolkitPeer.prototype._doQueuedRender=function(){this.RenderComponent();this._bQueuedRender=!1};
AdfDhtmlDvtToolkitPeer.prototype._render=function(a,b){if(b===AdfDhtmlDvtToolkitPeer._FETCH_SPINNER_XML)this._displayFetchSpinner();else if(this._hideFetchSpinner(),"HTML5"==this.getClientImageFormat(a)){AdfDhtmlCommonFlashUtils.perfMessage("0"+a.getClientId()+": Begin Render");var c=AdfDhtmlCommonFlashUtils.toJson(b);c&&(c=dvt.JsonUtils.merge(c,this._stylesObj));c=this.ProcessOptionsObj(c);this.RenderComponent(c);AdfDhtmlCommonFlashUtils.perfMessage("0"+a.getClientId()+": End Render")}};
AdfDhtmlDvtToolkitPeer.prototype.RenderComponent=function(a){this._view.render(a,this._clientWidth,this._clientHeight)};AdfDhtmlDvtToolkitPeer.prototype.ProcessOptionsObj=function(a){return a};
AdfDhtmlDvtToolkitPeer.prototype._getStylesObj=function(a,b){var c={},d=document.createElement("div"),e;e="display:none;"+("font-family:"+AdfDvtStyleProcessor._INHERITED_FONT_FAMILY+";");e+="font-size:"+AdfDvtStyleProcessor._INHERITED_FONT_SIZE+";";e+="color:"+AdfDvtStyleProcessor._INHERITED_FONT_COLOR+";";e+="font-weight:"+AdfDvtStyleProcessor._INHERITED_FONT_WEIGHT+";";e+="font-style:"+AdfDvtStyleProcessor._INHERITED_FONT_STYLE+";";d.setAttribute("style",e);b.appendChild(d);for(e=0;e<a.length;e++){var f=
a[e],g=f[0],h=f[1];h&&(g=g+" "+h);h=document.createElement("div");h.className=g;h.setAttribute("style","display:none;");d.appendChild(h);for(g=2;g<f.length;g+=2)this._resolveStyle(h,f[g],f[g+1],c);d.removeChild(h)}b.removeChild(d);return c};AdfDhtmlDvtToolkitPeer.prototype._resolveStyle=function(a,b,c,d){b=new AdfDvtJsonPath(d,b);var e;c&&(e=(e=AdfDvtStyleProcessor[c])?e(a,b.getValue()):AdfDvtStyleProcessor.defaultStyleProcessor(a,c));null==e||"string"==typeof e&&""==e.replace(/^\s+/g,"")||b.setValue(e)};
AdfDhtmlDvtToolkitPeer._getOptionsString=function(a){return AdfDhtmlCommonFlashPeer.GetXmlComment(a,"_xmlDiv")};AdfDhtmlDvtToolkitPeer._getResourcesString=function(a){return AdfDhtmlCommonFlashPeer.GetXmlComment(a,"_resourcesDiv")};AdfDhtmlDvtToolkitPeer._getStyleClassString=function(a){return AdfDhtmlCommonFlashPeer.GetXmlComment(a,"_styleClassesDiv")};