function currentTime(){var e=new Date;return e.getTime()}function disableConsole(){console.log=function(){"use strict"},console.info=function(){"use strict"},console.warn=function(){"use strict"},console.debug=function(){"use strict"},console.error=function(){"use strict"}}function loadJSX(e){console.log("Loading script file: "+e+" at "+timeSinceStart()+"ms.");var o=csInterface.getSystemPath(SystemPath.EXTENSION);csInterface.evalScript('$.evalFile("'+o+e+'")',function(o){console.debug("Done loading: "+e+" at "+timeSinceStart()+"ms.")})}function loadToolTips(e){for(console.group("Loading tooltips:"),i=0;i<e.length;i++)try{$("#"+e[i][0]).attr("rel","tooltip"),$("#"+e[i][0]).attr("data-trigger","hover"),$("#"+e[i][0]).attr("data-html","true"),$("#"+e[i][0]).tooltip({delay:{show:1200,hide:100}}),$("#"+e[i][0]).attr("title",e[i][1]).tooltip("fixTitle")}catch(o){alert("Tooltip error with: "+e[i][0]),console.groupEnd(),console.error("Tooltip error with: "+e[i][0]);break}console.groupEnd()}function logReturnMessage(e){if("undefined"!=e)try{var o=JSON.parse(e);o.message?console.log(o.message):console.log(o)}catch(n){console.log(e)}else console.warn("No return message")}function setButtonScripts(e){"use strict";for(var o=0;o<e.length;o++)!function(){var n=o;$(e[n][0]).click(function(){event.shiftKey&&(event.ctrlKey||event.metaKey)&&event.altKey?($(".topcoat-button").css("color","#FF0000"),setPersistence(!1),location.reload()):(console.log("Starting script: "+e[n][1]),buttonClicked(),csInterface.evalScript(e[n][1],function(o){logReturnMessage(e[n][1]+" returned: "+o)}))})}()}function getCookie(e){"use strict";try{if(minimumPhotoshopVersionForCookies>versionMajor)return!1;var o="";e+="=";for(var n=document.cookie.split(";"),t=0;t<n.length;t++){for(var r=n[t];" "==r.charAt(0);)r=r.substring(1);if(0==r.indexOf(e))return o=r.substring(e.length,r.length)}return!1}catch(i){alert("Please send a screenshot of this error to support@gregbenzphotography.com.\n\nError retrieving: "+e+".\nerror message = '"+i+"'"),console.error("getCookie error.\n"+i)}}function setCookie(e,o){"use strict";try{if(minimumPhotoshopVersionForCookies>versionMajor)return console.log("This version of Photoshop does not support cookies."),!1;if(permanentCookie){var n=new Date,t=18250,r=24,i=60,s=60,a=1e3,c=t*r*i*s*a;n.setTime(n.getTime()+c),cookieExpiration="; expires="+n.toGMTString()}else cookieExpiration="";document.cookie=e+"="+o+cookieExpiration}catch(l){alert("Please send a screenshot of this error to support@gregbenzphotography.com.\n\nError saving: "+e+".\nerror message = '"+l+"'"),console.error("setCookie error.\n"+l)}}function deleteAllCookies(){console.log("Clearing all cookies."),document.cookie.split(";").forEach(function(e){document.cookie=e.replace(/^ +/,"").replace(/=.*/,"=;expires="+(new Date).toUTCString())})}function setPersistence(e){"use strict";if(console.debug("Set persistence = "+e+" at "+timeSinceStart()+"ms."),e){var o=new CSEvent;o.type="com.adobe.PhotoshopPersistent",o.scope="APPLICATION",o.extensionId=window.__adobe_cep__.getExtensionId(),(new CSInterface).dispatchEvent(o)}else{var o=new CSEvent;o.type="com.adobe.PhotoshopUnPersistent",o.scope="APPLICATION",o.extensionId=window.__adobe_cep__.getExtensionId(),(new CSInterface).dispatchEvent(o)}}function buttonClicked(){function e(){themeManager.init();var e=new CSEvent("com.adobe.PhotoshopLoseFocus","APPLICATION");e.extensionId=csInterface.getExtensionID(),csInterface.dispatchEvent(e)}try{e()}catch(o){alert("Please update to the latest version of Photoshop CC, aka v14.2.  Or upgrade to CC2014 or later."),console.error("buttonClicked() error\n"+o)}}function get_browser(){var e,o=navigator.userAgent,n=o.match(/(opera|chrome|safari|firefox|msie|trident(?=\/))\/?\s*(\d+)/i)||[];return/trident/i.test(n[1])?(e=/\brv[ :]+(\d+)/g.exec(o)||[],{name:"IE",version:e[1]||""}):"Chrome"===n[1]&&(e=o.match(/\bOPR\/(\d+)/),null!=e)?{name:"Opera",version:e[1]}:(n=n[2]?[n[1],n[2]]:[navigator.appName,navigator.appVersion,"-?"],null!=(e=o.match(/version\/(\d+)/i))&&n.splice(1,1,e[1]),{name:n[0],version:n[1]})}"undefined"==typeof lumenziaT0&&(lumenziaT0=currentTime()),console.info("========================\nsub.js loading.");var csInterface=new CSInterface,version=csInterface.hostEnvironment.appVersion,versionMajor=version.substr(0,version.indexOf(".")),cookieExpiration,permanentCookie=!0,reportLaunches=!0,minimumPhotoshopVersionForCookies=16;if(reportLaunches&&versionMajor>=minimumPhotoshopVersionForCookies){var name="numberOfLaunches",numberOfLaunches=Number(getCookie(name));numberOfLaunches?(console.debug("# of panel launches = "+(numberOfLaunches+1)),setCookie(name,numberOfLaunches+1)):(console.warn("No panel launch counter found.  Initializing to 1."),setCookie(name,1))}console.info("sub.js finished loading.\n========================\n");