function AdfSafariAgent(a,b){this.Init(a,b)}AdfObject.createSubclass(AdfSafariAgent,AdfAgent);AdfSafariAgent.prototype.Init=function(a,b){AdfSafariAgent.superclass.Init.call(this,AdfAgent.WEBKIT_PLATFORM,AdfAgent.guessOS(),a,b)};AdfSafariAgent.prototype.getWindowScrollWidth=function(a){return a.document.body.scrollWidth};AdfSafariAgent.prototype.getWindowScrollHeight=function(a){return a.document.body.scrollHeight};
AdfSafariAgent.prototype.getBrowserViewportScrollTop=function(){var a=navigator.userAgent,b=this.getDomDocument();return-1!=a.indexOf("Chrome")&&61<=AdfSafariAgent.__getAgentVersion(a)?b.documentElement.scrollTop:-1!=a.indexOf("Safari")&&13<=AdfSafariAgent.__getAgentVersion(a)?this.getDomWindow().pageYOffset:b.body.scrollTop};
AdfSafariAgent.prototype.getBrowserViewportScrollLeft=function(){var a=navigator.userAgent,b=this.getDomDocument();return-1!=a.indexOf("Chrome")&&61<=AdfSafariAgent.__getAgentVersion(a)?b.documentElement.scrollLeft:-1!=a.indexOf("Safari")&&13<=AdfSafariAgent.__getAgentVersion(a)?this.getDomWindow().pageXOffset:b.body.scrollLeft};
AdfSafariAgent.prototype.InitClass=function(){var a=[];a[AdfKeyStroke.CTRL_MASK]="Ctrl";a[AdfKeyStroke.SHIFT_MASK]="Shift";a[AdfKeyStroke.ALT_MASK]="Option";a[AdfKeyStroke.META_MASK]="Cmd";this._MODIFIER_DISPLAY_NAMES=a};AdfSafariAgent.prototype.CreateDefaultLogWriter=function(a){return a};AdfSafariAgent.prototype.CreateNativeLogWriter=function(){var a=this.getDomWindow();return a.console?new AdfSafariLogWriter(a,new AdfAlertLogWriter):new AdfAlertLogWriter};
AdfSafariAgent.prototype.execScript=function(a,b){var d=a.document,e=d.body;if(null==e)with(a)a.eval(b);else{var f=d.createElement("script");f.setAttribute("type","text/javascript");f.appendChild(d.createTextNode(b));e.appendChild(f);e.removeChild(f)}};AdfSafariAgent.prototype.disableUserSelect=function(a){a.style.setProperty("-webkit-user-select","none")};AdfSafariAgent.prototype.enableUserSelect=function(a){a.style.setProperty("-webkit-user-select","")};
AdfSafariAgent.prototype.getBoxSizing=function(a,b){b||(b=this.getComputedStyle(a));return b.getPropertyValue("-webkit-box-sizing")};AdfSafariAgent.prototype.getModifierDisplayName=function(a){return this.getOs()!=AdfAgent.MAC_OS?AdfSafariAgent.superclass.getModifierDisplayName.call(this,a):AdfSafariAgent._MODIFIER_DISPLAY_NAMES[a]};
AdfSafariAgent.prototype.isSessionStorageEnabled=function(){if(void 0===this._isSessionStorageEnabled)try{sessionStorage.setItem("_adfTestKey","on"),sessionStorage.removeItem("_adfTestKey"),this._isSessionStorageEnabled=!0}catch(a){"QUOTA_EXCEEDED_ERR"===a.name&&22==a.code?AdfLogger.LOGGER.fine("Access to sessionStorage has been disabled because 'private browsing' is enabled. As a result user activity monitoring has been disabled. Name: "+a.name+", Message: "+a.message):AdfLogger.LOGGER.fine("Access to sessionStorage failed for some unexpected reason. As a result user activity monitoring has been disabled. Name: "+
a.name+", Message: "+a.message),this._isSessionStorageEnabled=!1}return this._isSessionStorageEnabled};AdfSafariAgent.prototype.CreateUIInputEvent=function(a,b,d){return new AdfSafariUIInputEvent(a,b,d)};
AdfSafariAgent.prototype.cloneEvent=function(a,b){var d=a.type;if("load"==d){if(-1==navigator.userAgent.toLowerCase().indexOf("chrome"))return AdfSafariAgent.superclass.cloneEvent.call(this,a,b);var e=b?b:a.target,f=e.ownerDocument,g=f.createEvent("Event");g.initEvent("click",!1,!1);f.addEventListener(d,this.stopPropagation,!0);e.dispatchEvent(g);f.removeEventListener(d,this.stopPropagation,!0);return g}return AdfSafariAgent.superclass.cloneEvent.call(this,a,b)};
AdfSafariAgent.prototype.slice=function(a,b,d){if(!("undefined"===typeof Blob||"undefined"===typeof Blob.prototype.slice&&"undefined"===typeof Blob.prototype.webkitSlice)){if(null==a)return null;if(a.slice)return a.slice(b,d);if(a.webkitSlice)return a.webkitSlice(b,d)}};AdfSafariAgent.__getAgentVersion=function(a){var b;-1!=a.indexOf("Chrome/")?b=AdfAgent.__parseFloatVersion(a,/Chrome\/(\d+([.]\d+)*)/):-1!=a.indexOf("Version/")&&(b=AdfAgent.__parseFloatVersion(a,/Version\/(\d+([.]\d+)*)/));return b};
AdfSafariAgent.__getSupported=function(a,b){var d=!0;-1!=a.indexOf("Chrome/")?b<AdfAgent._MIN_CHROME_VERSION&&(d=!1):-1!=a.indexOf("Version/")&&b<AdfAgent._MIN_SAFARI_VERSION&&(d=!1);return d};AdfSafariAgent.__getSpecificAgentClassName=function(a,b){return-1==a.indexOf("Mobile")&&-1==a.indexOf("Android")&&-1==a.indexOf("iPhone")?"AdfSafariAgent":"AdfSafariMobileAgent"};AdfSafariAgent.prototype.createTouchMoveManager=function(a,b,d){return new AdfSafariTouchMoveManager(a,b,d)};