/************************************************************************
*
* ADOBE CONFIDENTIAL
* ___________________
*
* Copyright 2015-2019 Adobe Systems Incorporated
* All Rights Reserved.
*
* NOTICE: All information contained herein is, and remains
* the property of Adobe Systems Incorporated and its suppliers,
* if any. The intellectual and technical concepts contained
* herein are proprietary to Adobe Systems Incorporated and its
* suppliers and are protected by trade secret or copyright law.
* Dissemination of this information or reproduction of this material
* is strictly forbidden unless prior written permission is obtained
* from Adobe Systems Incorporated.
* @PreserveInCompilation
**************************************************************************/

!function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=36)}([function(e,t,r){"use strict";var n,o=r(5),i=r(1),s=r(8),a={},c=i.getValue("LOG_DIR")+"CCX Process.log",p=i.getValue("LOG_DIR")+"CCX Process (prev).log",_=!1,u=new s(["logWrite"]);function l(){o.ensureDir(i.getValue("LOG_DIR"),function(e){if(e)return n=void 0,void console.log(e);var t;t=function(e){if(e)return n=void 0,void console.log(e);var t=n;n=void 0,_=!0,o.appendFile(c,t,function(e){e&&console.log(e),_=!1,n&&l(),u.notify("logWrite")})},o.stat(c,function(e,r){!e&&r.size>i.getValue("MAX_LOG_SIZE")?o.rename(c,p,t):t(null)})})}var S=[];a.log=function(){var e=Array.prototype.slice.call(arguments).join(": ");i.getValue("CONSOLE_LOGGING")&&console.log(e),function(e){S.length>=i.getValue("MAX_ANALYTICS_LOGS")&&S.shift(),S.push(e)}(e);var t=(new Date).toString()+" "+e+"\n";n?n+=t:(n=t,_||l())},a.getRecentLogs=function(){return S},a.clearRecentLogs=function(){S=[]},a._listenerManager=u,a.addLogWriteListener=function(e){u.add("logWrite",e)},a.removeLogWriteListener=function(e){u.remove("logWrite",e)},e.exports=a},function(e,t,r){var n,o=r(4),i=r(24),s=r(16),a={ENVIRONMENT:"production",ACTIVE_VERSIONS:["V1","V2","V2_5"],SETTINGS_FILE:"settings.json",SETTINGS_FILE_VERSION:3,LOOKUP_MAP_FILE:"map.json",PSDK_LOOKUP_MAP_FILE_VERSION:4,STOCK_LOOKUP_MAP_FILE_VERSION:1,ASSETS_DIRNAME:"assets",CC_SETTINGS_FILE:"C3Config.xml",CONSOLE_LOGGING:!1,SCOPES:"openid,AdobeID,creative_cloud,creative_sdk",SYNC_INITIAL_RETRY:24e4,MAX_LOG_SIZE:5242880,PROXY_REQUEST_TIMEOUT:2e3,GET_NOTIFICATION_DATA_TIMEOUT:2e3,NETWORK_STATUS_INTERVAL:1e3,STOP_SYNCING_BEYOND:6048e5,PSDK_API_VERSION:2,SOPHIA_API_VERSION:2,PSDK_SERVER_TIMEOUT:3e4,SOPHIA_SERVER_TIMEOUT:3e4,STOCK_API_VERSION:1,STOCK_SERVER_TIMEOUT:3e4,STOCK_TEST_API_KEY:"XDStockAPITest",TIER_1_LOCALES:["en_US","fr_FR","de_DE","ja_JP","ko_KR"],SUPPORTED_LOCALES:["cs_CZ","da_DK","de_DE","en_US","en_AE","en_GB","en_IL","es_ES","es_MX","fi_FI","fr_FR","fr_CA","fr_MA","hu_HU","it_IT","ja_JP","ko_KR","nb_NO","nl_NL","pl_PL","pt_BR","ru_RU","sv_SE","tr_TR","uk_UA","zh_CN","zh_TW"],DOWNLOAD_ASSET_TIMEOUT:6e4,NUM_CONCURRENT_REQUESTS:10,MIN_RANDOMIZED_TIME:1e3,MAX_RANDOMIZED_TIME:9e5,MAX_TIMEOUT:Math.pow(2,31)-1,MIN_TIMEOUT:36e6,TRIAL_DAYS:7,PRODUCT_LIST:["PHSP","PHXS","IDSN","PPRO","ILST","AEFT","MUSE","DRWV"],STOCK_PRODUCT_LIST:["PHXS","ILST","IDSN"],IGNORED_FILES_REGEXP:"^map.json|\\bassets\\b",SOPHIA_CLIENT_CODE:"ccx",PSDK_PARAMETERS_SCHEMA:{id:"psdk_parameters",type:"object",properties:{productCode:{type:"string"},productVersion:{type:"string"},productLanguage:{type:"string"},productPlatform:{type:"string"},productDevice:{type:"string"},productOS:{type:"string"},productArch:{type:"string"},countryCode:{type:"string"},subscriptionStatus:{type:"string"},trialEndDTS:{type:["string","null"]},radarSessionGuid:{type:"string"},contextGuid:{type:"string"}},required:["productCode","productVersion","productLanguage","countryCode","subscriptionStatus"]},SOPHIA_PARAMETERS_SCHEMA:{id:"sophia_parameters",type:"object",properties:{clientCode:{type:"string"},surfaceID:{type:"array",items:"string"},contextualParams:{type:"object",$ref:"psdk_parameters"},analyticsParams:{type:"object"}},required:["clientCode","surfaceID","contextualParams","analyticsParams"]},STOCK_TEMPLATE_PARAMETERS_SCHEMA:{id:"stock_parameters",type:"object",properties:{productCode:{type:"string"},productVersion:{type:"string"},productLanguage:{type:"string"},productPlatform:{type:"string"},productDevice:{type:"string"},productOS:{type:"string"},productArch:{type:"string"},countryCode:{type:"string"},radarSessionGuid:{type:"string"},contextGuid:{type:"string"}},required:["productCode","productVersion","productLanguage","countryCode","subscriptionStatus"]},PSDK_MAP_DATA_SCHEMA:{id:"MAP_DATA",type:"object",properties:{userCards:{type:"object"},userCardsCache:{type:"object"},assetsCache:{type:"object"},version:{type:"number"}},required:["userCards","userCardsCache","assetsCache","version"]},CARDS_CONTROL_SCHEMA:{id:"/CARDS_CONTROL",type:"object",properties:{modeID:{type:["string","null"]},cardOrder:{type:["array","null"],items:{type:"number"}}},required:["modeID","cardOrder"]},SOPHIA_RESPONSE_SCHEMA:{id:"/SOPHIA_RESPONSE",type:"object",properties:{analyticsParams:{type:"object"},cardControl:{type:"array",items:{type:"object",properties:{surfaceId:{type:"string"},containers:{type:"array",items:{type:"object",properties:{containerAnalyticsParams:{type:"object"},index:{type:"integer"}}}}}}},cards:{type:"array",items:{type:"object",properties:{backgroundImage:{type:"string"}}}},expirationDTS:{type:"string"}},required:["expirationDTS","cards","cardControl"]},CARDS_DATA_SCHEMA:{id:"CARDS_DATA",type:"object",properties:{cards:{type:"array"},expirationDTS:{type:"string"},cardControl:{type:"array",items:{$ref:"/CARDS_CONTROL"}},version:{type:"number"}},required:["expirationDTS","cards","cardControl"]},STOCK_MAP_DATA_SCHEMA:{id:"STOCK_MAP_DATA",type:"object",properties:{stockTemplates:{type:"object"},stockTemplatesCache:{type:"object"},assetsCache:{type:"object"},version:{type:"number"}},required:["stockTemplates","stockTemplatesCache","assetsCache","version"]},STOCK_TEMPLATES_DATA_SCHEMA:{id:"STOCK_TEMPLATES_DATA",type:"object",properties:{templates:{type:"array"},expirationDTS:{type:"string"},nb_results:{type:"number"}},required:["expirationDTS"]},VULCAN_PREFIX:"vulcan.SuiteMessage.",VULCAN_STARTUP_MESSAGE:"ccxprocess.Initialized",VULCAN_PING_REQUEST:"ccxprocess.in.request.app.ping",VULCAN_PING_RESPONSE:"ccxprocess.out.response.app.ping",VULCAN_PSDK_FEED_REQUEST:"ccxprocess.PSDKFeedRequest",VULCAN_PSDK_FEED_RESPONSE:"ccxprocess.PSDKFeedResponse",VULCAN_PSDK_FEED_BROADCAST:"ccxprocess.PSDKFeedBroadcast",VULCAN_GET_USER_REQUEST:"ccxprocess.GetUserRequest",VULCAN_GET_USER_RESPONSE:"ccxprocess.GetUserResponse",VULCAN_START_SETTINGS_REQUEST:"ccxprocess.StartSettingsRequest",VULCAN_START_SETTINGS_PATCH_UPDATE:"ccxprocess.StartSettingsPatchUpdate",VULCAN_STOCK_TEMPLATE_REQUEST:"ccxprocess.StockTemplateRequest",VULCAN_STOCK_TEMPLATE_RESPONSE:"ccxprocess.StockTemplateResponse",VULCAN_CC_PHOTO_DOWNLOAD_REQUEST:"ccxprocess.CCPhotoDownloadRequest",VULCAN_CC_PHOTO_DOWNLOAD_RESPONSE:"ccxprocess.CCPhotoDownloadResponse",VULCAN_CC_PHOTO_DOWNLOAD_PROGRESS:"ccxprocess.CCPhotoDownloadProgress",VULCAN_CC_PHOTO_DOWNLOAD_ERROR:"ccxprocess.CCPhotoDownloadError",VULCAN_SPECIFIER_MAP:{photoshop:"PHXS",illustrator:"ILST",indesign:"IDSN",aftereffects:"AEFT",dreamweaver:"DRWV",premierepro:"PPRO"},SKIP_LOGGING_MESSAGE_LIST:["ccxprocess.in.request.app.ping","ccxprocess.out.response.app.ping"],NOTIFICATION_REQUEST:"accc.notifications",NOTIFICATION_PSDK_RESPONSE:"ccxprocess.notification.psdk",NOTIFICATION_STOCK_RESPONSE:"ccxprocess.notification.stock",NOTIFICATION_PSDK_QUERY_DATA_BY_ID_RESPONSE:"ccxprocess.notification.psdk.byID.data",NOTIFICATION_STOCK_QUERY_DATA_BY_ID_RESPONSE:"ccxprocess.notification.stock.byID.data",NOTIFICATION_PSDK_QUERY_DATA_BY_TIME_RESPONSE:"ccxprocess.notification.psdk.byTime.data",NOTIFICATION_STOCK_QUERY_DATA_BY_TIME_RESPONSE:"ccxprocess.notification.stock.byTime.data",ANS_PSDK_NOTIFICATION_TYPE:"com.adobe.psdk.v1",ANS_PSDK_NOTIFICATION_SUB_TYPE:"operational.profile.updated",ANS_STOCK_NOTIFICATION_TYPE:"com.adobe.stock",ANS_STOCK_NOTIFICATION_SUB_TYPE:"templates.update",ANALYTICS_ENABLED:!1,ANALYTICS_INGEST_PATH:"/ingest",ANALYTICS_X_PRODUCT:"CCXStart/2.5",ANALYTICS_PROJECT:"ccx-process-service",ANALYTICS_INGEST_TYPE:"dunamis",ANALYTICS_MAX_QUEUED_EVENTS:150,ANALYTICS_DEBOUNCE:1e4,ANALYTICS_API_KEY:"ccx-process-service",CARD_DATA_SCHEMA:{v2:{id:"/CARD_DATA",type:"object",properties:{cardType:{type:"string"},cardName:{type:"string"},displayTemplate:{type:"string"},backgroundImage:{type:["string","null"]},backgroundImageLocalPath:{type:["string","null"]},backgroundFillColor:{type:["string","null"]},startDTS:{type:["string","null"]},endDTS:{type:["string","null"]},overlayTintColor:{type:["string","null"]}},required:["cardType"]},"CCX_TUTORIAL_2.5":{id:"/TUTORIAL_CARD_DATA",type:"object",properties:{tutorials:{type:"array",items:{type:"object",properties:{metadata:{type:"object",properties:{images:{type:"object",properties:{hero:{type:"string"},thumbnail:{type:"string"}}}}}}}}}}},PRODUCT_PRIORITY:{PHXS:9,ILST:8,IDSN:7,PPRO:6,AEFT:5,DRVW:4,MUSE:3},URGENT_PRIORITY:1e3,PSDK_PRIORITY:200,STOCK_PRIORITY:100,V1:{VERSION_LESS_THAN:"2.0",START_VERSION:"1.0",SOPHIA_PREFETCH_CLIENTS:{AEFT:"15.0",DRWV:"18.0",IDSN:"13.0",ILST:"22.0",MUSE:"2018.0",PHXS:"19.0",PPRO:"12.0"},SOPHIA_SURFACEID:["welcome","openDoc"],SOPHIA_SURFACE_MODE_MAP:{openDoc:"openDoc",welcome:"welcome"},priority:-101},V2:{VERSION_LESS_THAN:"2.4",START_VERSION:"2.2.1.120",START_RELEASE:"CCXStart-2-1",SOPHIA_PREFETCH_CLIENTS:{AEFT:"16.0",DRWV:"19.0",IDSN:"14.0",ILST:"23.0",MUSE:"2019.0",PHXS:"20.0",PPRO:"13.0"},SOPHIA_SURFACEID:["CCX_Start_2.0_FirstRun","CCX_Start_2.0_Footer","CCX_Start_2.0_Learn","CCX_Start_2.0_Discover","CCX_Start_2.0_Trial"],SOPHIA_SURFACE_MODE_MAP:{"CCX_Start_2.0_FirstRun":"firstrun","CCX_Start_2.0_Footer":"footer","CCX_Start_2.0_Learn":"learn","CCX_Start_2.0_Discover":"discover","CCX_Start_2.0_Trial":"trial"},priority:0},V2_4:{VERSION_LESS_THAN:"2.5",START_VERSION:"2.4.0.11",START_RELEASE:"CCXStart-2-4",SOPHIA_SURFACEID:["CCX_TUTORIAL_2.5","CCX_Start_2.5_Learn","CCX_Start_2.5_Toast","CCX_Start_2.5_Home"],SOPHIA_SURFACE_MODE_MAP:{"CCX_TUTORIAL_2.5":"CCX_TUTORIAL_2.5","CCX_Start_2.5_Learn":"CCX_Start_2.5_Learn","CCX_Start_2.5_Home":"CCX_Start_2.5_Home","CCX_Start_2.5_Toast":"CCX_Start_2.5_Toast"},SOPHIA_PREFETCH_CLIENTS:{AEFT:"16.0",DRWV:"19.0",IDSN:"14.0",ILST:"23.0",MUSE:"2019.0",PHXS:"20.0",PPRO:"13.0"},priority:5},V2_5:{VERSION_LESS_THAN:"3.0",START_VERSION:"2.5.3.3",START_RELEASE:"CCXStart-2-5",SOPHIA_PREFETCH_CLIENTS:{AEFT:"99.0",DRWV:"99.0",IDSN:"99.0",ILST:"99.0",MUSE:"2099.0",PHXS:"99.0",PPRO:"99.0"},SOPHIA_SURFACEID:["CCX_TUTORIAL_2.5","CCX_Start_2.5_Learn","CCX_Start_2.5_Toast","CCX_Start_2.5_Home"],SOPHIA_SURFACE_MODE_MAP:{"CCX_TUTORIAL_2.5":"CCX_TUTORIAL_2.5","CCX_Start_2.5_Learn":"CCX_Start_2.5_Learn","CCX_Start_2.5_Home":"CCX_Start_2.5_Home","CCX_Start_2.5_Toast":"CCX_Start_2.5_Toast"},priority:10}},c={staging:{LABEL:"Staging",CLIENT_ID:"CCXInAppWelcomeProcess2",CLIENT_SECRET:"220debb8-26c5-4ce3-9c92-cc38bf589c7d",IMS:"ims-na1-stg1.adobelogin.com",PSDK_HOST:"psdk-stage.adobe.io",SOPHIA_HOST:"p13n-stage.adobe.io",ANALYTICS_HOST:"cc-api-data-stage.adobe.io",STORAGE_HOST:"cc-api-storage-stage.adobe.io",IMAGE_SERVICE_HOST:"cc-api-image-stage.adobe.io",STOCK_HOST:"stock-stage.adobe.io"},production:{LABEL:"Production",CLIENT_ID:"CCXInAppWelcomeProcess2",CLIENT_SECRET:"07a10ad7-27d4-4aec-8c8d-e4b47dffd414",IMS:"ims-na1.adobelogin.com",PSDK_HOST:"psdk.adobe.io",SOPHIA_HOST:"p13n.adobe.io",ANALYTICS_HOST:"cc-api-data.adobe.io",STORAGE_HOST:"cc-api-storage.adobe.io",IMAGE_SERVICE_HOST:"cc-api-image.adobe.io",STOCK_HOST:"stock.adobe.io"}};var p={SETTINGS_FILE_VERSION:a.SETTINGS_FILE_VERSION};var _={};_._init=function(){if(_.isPlatformWindows()){var e=process.env.USERPROFILE.replace(/\\/g,"/");a.ROOT_DIR=e+"/AppData/Roaming/",a.LOG_DIR=process.env.TEMP.replace(/\\/g,"/")+"/CreativeCloud/CCX Welcome/";var t=(process.env["ProgramFiles(x86)"]||process.env.PROGRAMFILES).replace(/\\/g,"/");a.CC_DIR=t+"/Adobe/Adobe Creative Cloud/"}else a.ROOT_DIR=process.env.HOME+"/Library/Caches/",a.LOG_DIR=process.env.HOME+"/Library/Logs/CreativeCloud/CCX Welcome/",a.CC_DIR="/Applications/Utilities/Adobe Creative Cloud/";a.ROOT_DIR+="Adobe/CCX Welcome/",a.DATA_DIR=a.ROOT_DIR+"data/",a.STOCK_DIR=a.ROOT_DIR+"stock/",a.PSDK_API_ROOT="/PSDK/v"+a.PSDK_API_VERSION,a.PSDK_ENGAGEMENT_PATH=a.PSDK_API_ROOT+"/engagement-stream-desktop",a.SOPHIA_ENGAGEMENT_PATH="/v1/fetchcontent",a.STOCK_API_ROOT="/Rest/Media/"+a.STOCK_API_VERSION,a.STOCK_TEMPLATE_API_PATH=a.STOCK_API_ROOT+"/Search/Templates",a.TMP_PHOTOS_DOWNLOAD_DIRECTORY="com.adobe.ccx.start.lrphotos/",a.PROGRESS_THROTTLE_INTERVAL=250,a.DOWNLOAD_TMP_EXTENSION=".tmp",["openDoc","firstrun","footer","learn","discover","trial","welcome"].forEach(e=>{a.CARD_DATA_SCHEMA[e]=a.CARD_DATA_SCHEMA.v2}),function(){try{n=i.readFileSync(a.ROOT_DIR+a.SETTINGS_FILE,"utf8");var e=JSON.parse(n);p.SETTINGS_FILE_VERSION===e.SETTINGS_FILE_VERSION&&(p=e)}catch(e){}}(),function(){var e=!1;try{var t=i.readFileSync(a.CC_DIR+a.CC_SETTINGS_FILE,"utf8");new s.Parser({async:!1}).parseString(t,function(t,r){t||r.C3Config.config[0].namespace.forEach(function(t){t&&t.$&&t.$.name&&"accc.container"===t.$.name&&t.property.forEach(function(t){t&&t.$&&t.$.name&&"IMS_ENV"===t.$.name&&"STG"===t._&&(e=!0)})})})}catch(e){}return e}()&&(a.ENVIRONMENT="staging"),process.argv.forEach(function(e){"--debug"===e&&(a.CONSOLE_LOGGING=!0)}),a.CONSOLE_LOGGING||(console.log("Outputting logs to: "+a.LOG_DIR),console.log("To view log messages on the console, use the --debug argument"))},_.isPlatformWindows=function(){return 0===process.platform.indexOf("win")},_.getValue=function(e,t){return t?p[t]&&void 0!==p[t][e]?p[t][e]:a[t]&&a[t][e]:void 0!==p[e]?p[e]:a[e]},_.setValue=function(e,t,r){return r?(p[r]=p[r]||{},p[r][e]=t):p[e]=t,function(){var e=JSON.stringify(p,void 0,2);if(e===n)return!1;try{var t=a.SETTINGS_FILE+".TEMP_"+o.v4();i.writeFileSync(a.ROOT_DIR+t,e),i.renameSync(a.ROOT_DIR+t,a.ROOT_DIR+a.SETTINGS_FILE),n=e}catch(e){}return!0}()},_.getEnvironment=function(){var e=_.getValue("ENVIRONMENT");return c[e]||c[a.ENVIRONMENT]},_._init(),e.exports=_},function(e,t,r){"use strict";var n=r(23),o=r(22),i=r(15),s=r(5),a=r(9),c=r(1),p=r(21).Validator,_=r(0),u={extend:function(e,t){Object.getOwnPropertyNames(t).forEach(function(r){try{"object"===t[r].constructor?("object"!==e[r].constructor&&(e[r]={}),u.extend(e[r],t[r])):e[r]=t[r]}catch(n){e[r]=t[r]}})},getTimeToExpiry:function(e){if(!e)return 0;var t=(new Date).valueOf(),r=new Date(e).valueOf()-t;return isNaN(r)?0:Math.max(0,r)},isDateExpired:function(e){return 0===u.getTimeToExpiry(e)},wrapCallback:function(e){return function(){e&&e.apply(this,arguments)}},getMIMEExtension:function(e){var t;return e&&(t=o.extension(e)),t},getRandomizedTime:function(){var e=c.getValue("MIN_RANDOMIZED_TIME"),t=c.getValue("MAX_RANDOMIZED_TIME");return Math.floor(Math.random()*(t-e))+e},validateDataFields:function(e,t,r){var n=new p;r&&r.forEach(function(e){n.addSchema(e,e.id)});var o=n.validate(e,t);return 0===o.errors.length?null:o.errors},getCurrentTime:function(){return(new Date).getTime()},getProcessVersion:function(){return n.version+"-13"},isWindows:function(){return"win32"===process.platform},formatDateString:function(e,t){return i(e).format(t)},truncateEventQueue:function(e,t){var r=e;if(e&&e.length>t&&t>0){var n=e.length-t;r=e.slice(n,e.length)}return r},getDefaultTrialEndDTS:function(){var e=new Date;return e.setTime(e.getTime()+24*c.getValue("TRIAL_DAYS")*60*60*1e3),e.toISOString()},validateTrialEndDate:function(e){if(null===e)return!0;if(!e)return!1;var t=new Date(e);return i(t).isValid()&&i(t).diff(i(),"days")<=365},getReleaseKey:function(e){return e.productCode+"-"+(e.productVersion&&e.productVersion.split(".")[0])},ccxVersionToString:(e={})=>e.ccxVersion?c.getValue("ACTIVE_VERSIONS").find(t=>{const r=c.getValue("VERSION_LESS_THAN",t);return-1===u.compareMajorMinorVersions(r,e.ccxVersion)}):"V1",sanitizeLocale:(e="")=>{const t=c.getValue("SUPPORTED_LOCALES");if(t.includes(e))return e;const r=e.slice(0,2);return t.find(e=>e.slice(0,2)===r)||"en_US"},compareMajorMinorVersions:function(e,t){let r,n,o,i;try{r=parseInt(e.split(".")[0],10),o=parseInt(e.split(".")[1]||"0",10)}catch(e){return 1}try{n=parseInt(t.split(".")[0],10),i=parseInt(t.split(".")[1]||"0",10)}catch(e){return-1}return r===n&&o===i?0:r<n||r===n&&o<i?1:-1},getClientsThatNeedRefresh:function(e){const t={};c.getValue("ACTIVE_VERSIONS").forEach(e=>{t[e]={}});const r=e.getCachedRequestData();Object.keys(r).forEach(e=>{Object.keys(r[e]).forEach(n=>{r[e][n].forEach(r=>{const o=u.ccxVersionToString(r),i=c.getValue("SOPHIA_PREFETCH_CLIENTS",o)[e];if(!i)return;if(-1!==u.compareMajorMinorVersions(i,n))return;const s=[e,n,r.subscriptionStatus,r.productLanguage,r.countryCode].join("-");t[o][s]||(t[o][s]=r)})})});const n={};return Object.keys(t).map(e=>{n[e]=Object.values(t[e])}),n},throttle:function(e,t,r){var n,o;return t=t||250,function(){var i=r||this,s=(new Date).getTime(),a=arguments;n&&s<n+t?(clearTimeout(o),o=setTimeout(function(){n=s,e.apply(i,a)},t)):(n=s,e.apply(i,a))}},hasBeenUsedRecently:function(e){if(!e)return!1;const t=new Date(e);return!isNaN(t)&&(t.setMilliseconds(c.getValue("STOP_SYNCING_BEYOND")),t>new Date)},deleteTempFiles:function(e,t,r=(()=>{})){var n="CCXWelcome > GeneralUtils > deleteTempFiles > ",o=new Date;void 0===t&&(t=864e5),s.readdir(e,function(i,c){i?_.log(n+i+": Error while deleting temp files"):Promise.all(c.map(function(r){return new Promise((i,c)=>{var p=a.join(e,r);s.stat(p,function(e,r){return e?(_.log(n+e+": Unable to read tmp file - "+p),i()):Number(o)-Number(r.mtime)<t?i():(_.log(n+": deleting tmp file - "+p),void s.unlink(p,function(e){e&&_.log(n+e+": Error deleting tmp file - "+p),i()}))})})})).then(r)})}};e.exports=u},,function(e,t){e.exports=require("uuid")},function(e,t){e.exports=require("fs-extra")},,,function(e,t,r){"use strict";function n(e){this._restrictedTypes=e,this._listeners={}}n.prototype._checkType=function(e){if(this._restrictedTypes&&-1===this._restrictedTypes.indexOf(e)){var t="["+this._restrictedTypes.join(", ")+"]";throw new Error(e+" is not allowed. Should be one of: "+t)}},n.prototype.add=function(e,t){this._checkType(e),this._listeners[e]=this._listeners[e]||[],this._listeners[e].push(t)},n.prototype.remove=function(e,t){this._checkType(e);var r=this._listeners[e];if(r){var n=r.indexOf(t);-1!==n&&r.splice(n,1)}},n.prototype.removeAll=function(e){e?(this._checkType(e),delete this._listeners[e]):this._listeners={}},n.prototype.notify=function(e,t){this._checkType(e);var n=this._listeners[e];n&&n.slice(0).forEach(function(e){try{e.apply(void 0,t||[])}catch(e){r(0).log("Listener Manager > Error in listener callback: "+(e?e.toString()+" "+e.stack:""))}})},n.prototype.hasListeners=function(e){this._checkType(e);var t=this._listeners[e];return!!(t&&t.length>0)},n.prototype.forEach=function(e){var t=this._listeners;Object.keys(t).forEach(function(r){t[r].forEach(function(t){e(r,t)})})},e.exports=n},function(e,t){e.exports=require("path")},function(e,t,r){"use strict";function n(){this._operations=[],this._isRunning=!1}n.prototype.addOperation=function(e,t,r){if(this._isRunning)throw new Error("Cannot add operations after calling run()");this._operations.push({operation:e,argsArray:t||[],thisObject:r})},n.prototype._runSeriesRecursive=function(e,t){var r=this,n=e[0];n.argsArray.push(function(n,o){n?t(n):1!==e.length?r._runSeriesRecursive(e.slice(1),t):t()}),n.operation.apply(n.thisObject,n.argsArray)},n.prototype.runSeries=function(e){this._runSeriesRecursive(this._operations,e)},n.prototype.run=function(e,t){function r(t,r,n){e&&e(t,r,n)}if(this._isRunning)throw new Error("Cannot call run() more than once");this._isRunning=!0;var n=this._operations.length;0===n&&r(null,!1,[]);var o,i=0,s=!1,a=[],c=[];this._operations.forEach(function(e,p){e.argsArray.push(function(e,_){!function(e,p,_){if(e&&t&&t(e),!s){if(o=o||e,a[_])return s=!0,void r(new Error("Operation not valid: calls callback multiple times"));if(i++,c[_]=p,a[_]=!0,i===n){s=!0;var u=!!c.reduce(function(e,t){return e||t},!1);r(o||null,u,c)}}}(e,_,p)}),e.operation.apply(e.thisObject,e.argsArray)})},e.exports=n},,function(e,t){e.exports=require("os")},,,function(e,t){e.exports=require("moment")},function(e,t){e.exports=require("xml2js")},,,,,function(e,t){e.exports=require("jsonschema")},function(e,t){e.exports=require("mime")},function(e){e.exports={name:"ccx-welcome-process",version:"2.5.3",private:!0,description:"CCX Welcome Process",dependencies:{"fs-ext":"git+ssh://git@git.corp.adobe.com:michsmit/node-fs-ext.git#v0.5.1","fs-extra":"6.0.1",glob:"7.1.1","idle-gc":"1.0.1",ingest:"git+ssh://git@git.corp.adobe.com:CCX/Ingest.git#v1.0.1",jsonschema:"1.2.4",mime:"1.3.4",moment:"2.14.1","node-ProxyResolver":"git+ssh://git@git.corp.adobe.com:ProjectCentral/node-ProxyResolver.git#v1.2.3","node-imslib":"git+ssh://git@git.corp.adobe.com:ProjectCentral/node-imslib.git#v1.2.7","node-vulcanjs":"git+ssh://git@git.corp.adobe.com:slade/VulcanJS.git#v1.2.4","os-locale":"^2.1.0","ps-node":"^0.1.6",request:"2.61.0",uuid:"2.0.1",xml2js:"0.4.7"},devDependencies:{"7zip":"0.0.6","@babel/core":"^7.0.0-beta.49","@babel/preset-env":"^7.0.0-beta.49","@ccx/hyperdrive-builder":"git+ssh://git@git.corp.adobe.com:CCX/hyperdrive-builder.git#v3.0.14","@types/fs-extra":"^5.0.2","@types/jest":"^22.2.3","@types/node":"^10.1.4","@types/xml2js":"^0.4.2","@zolesio/npm-tessa-plugin":"^0.2.3",fetch:"^1.1.0",grunt:"1.0.1","grunt-contrib-clean":"1.0.0","grunt-contrib-compress":"1.3.0","grunt-contrib-copy":"1.0.0","grunt-contrib-requirejs":"1.0.0","grunt-node-gyp":"3.1.0",husky:"^0.14.3",inquirer:"0.9.0",jest:"^23.1.0","jest-date-mock":"^1.0.2","jest-extended":"^0.7.2",jsftp:"2.0.0","map-stream":"0.0.7",matchdep:"1.0.1",minimist:"^1.2.0",mkdirp:"0.5.1",mockery:"2.0.0",mustache:"2.3.0",nock:"9.0.14","node-uglifier":"0.5.4",prettier:"^1.13.3","pretty-quick":"^1.6.0","source-map-support":"^0.5.6","terser-webpack-plugin":"^1.1.0","ts-jest":"^22.4.6","ts-loader":"^4.3.0","ts-node":"^6.0.5",typescript:"^2.8.4","vinyl-ftp":"^0.6.0",webpack:"^4.10.2","webpack-node-externals":"^1.7.2"},prettier:{tabWidth:4,useTabs:!1,singleQuote:!0,trailingComma:"es5"},resolutions:{ffi:"2.2.0",ref:"1.3.5"},engines:{node:">=8.11.0"},scripts:{test:"jest --coverage=false --silent",coverage:"jest --silent",updateBuildCoverageComment:"grunt updateBuildCoverageComment",start:"ts-node main --debug",precommit:"pretty-quick --staged",tessa:"tessa-npm-plugin","tessa-plugin-pr":"tessa-npm-plugin --testOnly .",setup:"node packaging/credentials"},cepPanels:[{product:"CCX Start",subproduct:"Extension",version:"2.5.3",certification:"Not Tested",destination:"com.adobe.ccx.start-2019",name:"com.adobe.ccx.start"},{product:"CCX Start",subproduct:"CmdN",version:"2.5.1",certification:"Integration Ready",destination:"com.adobe.ccx.fnft-2.5.1",name:"com.adobe.ccx.fnft"}],thor:[{product:"ACCC",subproduct:"Application",version:"4.6",certification:"Integration Ready",name:"ACCCx4_6_0_{{build}}",volume:"Creative Cloud",build:"^\\d+$"},{product:"ACCC",subproduct:"HDSetup",version:"4.6",certification:"Integration Ready",name:"HDSetup",volume:"Release"}]}},function(e,t){e.exports=require("fs")},,,,,,,,function(e,t,r){"use strict";var n=r(5),o=r(9),i=r(10),s=r(2),a=console.log,c={_getExtensionFolder:function(){var e;0===process.platform.indexOf("win")?e=(process.env["ProgramFiles(x86)"]||process.env.PROGRAMFILES).replace(/\\/g,"/")+"/Common Files/Adobe/CEP/extensions":e="/Library/Application Support/Adobe/CEP/extensions";return e},_getPanelsFolder:function(){var e="../Resources/panels",t=__dirname;return e=o.normalize(t+"/"+e)},_checkPanelNeedsUpdate:function(e,t,r){n.readFile(e,"utf-8",function(e,o){e&&"ENOENT"!==e.code&&a("Error reading existing panel: "+e),!e&&o?n.readFile(t,"utf-8",function(e,t){e&&a("Error reading bundled panel: "+e),o.trim()===t.trim()?r(!1):r(!0)}):r(!0)})},_deployPanel:function(e,t,r,i){e=o.normalize(e),t=o.normalize(t);var s=e+"/CSXS/manifest.xml",p=t+"/Contents",_=t+"/manifest.xml";c._checkPanelNeedsUpdate(s,_,function(t){if(!t)return a("Panel already exists at: "+e),void i(null);n.remove(e,function(t){if(t)return a(t),i(t);a("Upgrading Panel "+r+" from "+p+" to "+e),n.copy(p,e,function(e){if(a("Copying of files to the destination folder complete"),e)return a(e),i(e);var t=s+".temp";n.copy(_,t,function(e){if(a("Copying temp manifest complete"),e)return a(e),i(e);n.rename(t,s,function(e){if(a("Renaming manifest complete"),e)return a(e),i(e);i(null)})})})})})},_deployPanels:function(e){var t=c._getPanelsFolder();n.exists(t,function(r){if(!r)return a("Could not find panels bundle."),e(null);var o=c._getExtensionFolder();n.ensureDir(o,function(r){if(r)return a(r),e(r);n.readdir(t,function(r,n){if(r)return a(r),e(r);var s=new i;n.forEach(function(e){s.addOperation(c._deployPanel,[o+"/"+e,t+"/"+e,e])}),s.run(function(t){e(t)})})})})},setLoggerFunction:function(e){a=e||console.log},checkAndDeploy:function(e){a("Check and deploy panels.");var t=s.wrapCallback(e),r=new i;r.addOperation(c._deployPanels),r.run(function(e){t(e)})}};e.exports=c},function(e,t){e.exports=require("child_process")},function(e,t){e.exports=require("ps-node")},function(e,t,r){"use strict";var n=r(9),o=r(5),i=r(34),s=r(33),a=r(32),c=process.argv.slice(2),p={darwin:{installPath:"/Library/Application Support/Adobe/Vulcan/specifiers/",appName:"CCXProcess.app",appFolder:"../../.."},win32:{installPath:n.join(process.env.CommonProgramFiles||"","Adobe","Vulcan","specifiers"),appName:"CCXProcess.exe",appFolder:".."},win64:{installPath:n.join(process.env.CommonProgramFiles||"","Adobe","Vulcan","specifiers"),appName:"CCXProcess.exe",appFolder:".."}},_=n.resolve(p[process.platform].installPath),u="/Library/Logs/CreativeCloud";"win32"===process.platform&&(u=n.join(process.env.TEMP,"CreativeCloud","CCX Welcome"));var l=n.resolve(u,"./CCXProcessInstall.log");try{o.ensureDirSync(u)}catch(e){console.log("Error with log directory permissions ",e)}function S(){console.log.apply(console,arguments);try{var e=(new Date).toString()+":"+Array.prototype.slice.call(arguments).join(" ")+r(12).EOL;o.appendFileSync(l,e,"utf-8")}catch(e){console.log("Error writing to log file",e)}}a.setLoggerFunction(S);var d=(new Date).valueOf(),T=function(e){var t=e?"Success ":"Failed ";S(t+="("+((new Date).valueOf()-d)+"ms)"),process.exit(e?0:1)},C=function(e){"darwin"===process.platform?s.exec('pkill -f ".*CCXProcess.app/Contents/MacOS/../js/main.js$"',function(t){t?(S("Error while killing CCXProcess process : "+t),e(!1)):(S("CCXProcess process successfully killed."),e(!0))}):(S("Killing CCXProcess..."),i.lookup({command:".*\\CCXProcess.exe"},function(t,r){if(t)S("Error while looking up for CCXProcess : "+t),e(!1);else if(r&&r.length>0){var n=r.length,o=null;S("Number of CCXProcess Instances: ",r.length),r.forEach(function(t){S("CCXProcess is running, trying to kill now: "+t.pid),i.kill(t.pid,function(r){S(r?"Error while killing CCXProcess("+t.pid+"): "+r:"Succesfully killed CCXProcess("+t.pid+")"),function(t){o=o||t,0==--n&&e(!o)}(r)})})}else S("CCXProcess is not running."),e(!1)}))};if(process.on("unhandledRejection",function(e,t){S("Unhandled Rejection at:",t,"reason:",e)}),process.on("uncaughtException",function(e){S("Uncaught Exception:",e,e.stack)}),S("Version: ","2.5.3"," Build: ","13"),process.chdir(__dirname),-1!==c.indexOf("install")){var E='<SpecifierManifest Version="1.0"><Name>ccxprocess</Name><Version>1</Version><Locale></Locale><Group></Group><Path>{{path}}</Path></SpecifierManifest>'.replace("{{path}}",n.resolve(n.join(__dirname,p[process.platform].appFolder,p[process.platform].appName)));S("Installing..."),o.ensureDir(_,function(e){e&&(S("Unable to install: ",e),T(!1)),o.writeFile(n.join(_,"ccxprocess.xml"),E,{encoding:"utf8"},function(e){e&&(S("Unable to install: ",e),T(!1));try{o.utimesSync(_,new Date,new Date)}catch(e){}C(function(){a.checkAndDeploy(function(e){S("Installed Succesfully"),T(!e)})})})})}else-1!==c.indexOf("uninstall")?(S("Uninstalling..."),C(function(){o.unlink(n.join(_,"ccxprocess.xml"),function(e){e?"ENOENT"===e.code?S("Vulcan specifier not installed. Nothing to remove."):(S("Unable to uninstall: ",e),T(!1)):S("Removed vulcan specifier"),S("Uninstalled Succesfully"),T(!0)})})):(S("Expected to be invoked with argument: install or uninstall"),T(!1))},function(e,t,r){e.exports=r(35)}]);