/************************************************************************!
*
* 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.
**************************************************************************/!function(e){var r={};function n(t){if(r[t])return r[t].exports;var i=r[t]={i:t,l:!1,exports:{}};return e[t].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=e,n.c=r,n.d=function(e,r,t){n.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,r){if(1&r&&(e=n(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(n.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var i in e)n.d(t,i,function(r){return e[r]}.bind(null,i));return t},n.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(r,"a",r),r},n.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},n.p="",n(n.s=150)}({12:function(e,r,n){var t=n(2);function i(){this._operations=[],this._isRunning=!1}i.prototype.addOperation=function(e,r,n){if(this._isRunning)throw new t(t.INVALID_PARAMETER,"Cannot add operations after calling run()");this._operations.push({operation:e,argsArray:r||[],thisObject:n})},i.prototype.run=function(e,r){function n(r,n,t){e&&e(r,n,t)}if(this._isRunning)throw new t(t.INVALID_PARAMETER,"Cannot call run() more than once");this._isRunning=!0;var i=this._operations.length;0===i&&n(null,!1,[]);var o,a=0,s=!1,c=[],l=[];this._operations.forEach(function(e,p){e.argsArray.push(function(e,u){!function(e,p,u){if(e&&r&&r(e),!s){if(o=o||e,c[u])return s=!0,void n(new t(t.INVALID_PARAMETER,"Operation not valid: calls callback multiple times"));if(a++,l[u]=p,c[u]=!0,a===i){s=!0;var E=!!l.reduce(function(e,r){return e||r},!1);n(o||null,E,l)}}}(e,u,p)}),e.operation.apply(e.thisObject,e.argsArray)})},Object.freeze(i),Object.seal(i.prototype),e.exports=i},14:function(e,r){e.exports=require("path")},150:function(e,r,n){var t=n(14),i=n(28),o=n(151),a=n(36),s=n(152),c=process.argv.slice(2),l={darwin:{installPath:"/Library/Application Support/Adobe/Vulcan/specifiers/",appName:"CCLibrary.app",appFolder:"../../.."},win32:{installPath:t.join(process.env.CommonProgramFiles||"","Adobe","Vulcan","specifiers"),appName:"CCLibrary.exe",appFolder:".."},win64:{installPath:t.join(process.env.CommonProgramFiles||"","Adobe","Vulcan","specifiers"),appName:"CCLibrary.exe",appFolder:".."}},p=t.resolve(l[process.platform].installPath),u="/Library/Logs/CreativeCloud/Creative Cloud Libraries";"win32"===process.platform&&(u=t.join(process.env.TEMP,"CreativeCloud","Creative Cloud Libraries"));var E=t.resolve(u,"./CCLibraryProcessInstall.log");try{i.ensureDirSync(u)}catch(e){console.error("Error with log directory permissions ",e)}function _(){console.log.apply(console,arguments);try{var e=(new Date).toString()+":"+Array.prototype.slice.call(arguments).join(" ")+n(24).EOL;i.appendFileSync(E,e,"utf-8")}catch(e){console.error("Error writing to log file",e)}}s.setLoggerFunction(_);var d=(new Date).valueOf(),f=function(e,r){var n=(new Date).valueOf()-d,t=e?"Success ":"Failed ";_(t+="("+n+"ms)"),process.exit(e?0:r||1)},g=function(e){_("Killing CCLibrary process..."),"darwin"===process.platform?a.exec('pkill -f ".*CCLibrary.app/Contents/MacOS/../js/server.js$"',function(r){r?(_("Error while killing CCLibrary process : "+r),e(!1)):(_("CCLibrary process successfully killed."),e(!0))}):o.lookup({command:".*\\CCLibrary.exe"},function(r,n){if(r)_("Error while looking up CCLibrary process : "+r),e(!1);else if(n&&n.length>0){var t=n.length,i=null;_("Number of CCLibrary Instances: ",n.length),n.forEach(function(r){_("CCLibrary is running, trying to kill now: "+r.pid),o.kill(r.pid,function(n){_(n?"Error while killing CCLibrary("+r.pid+"): "+n:"Succesfully killed CCLibrary("+r.pid+")"),function(r){i=i||r,0==--t&&e(!i)}(n)})})}else _("CCLibrary is not running."),e(!1)})};if(process.on("unhandledRejection",function(e,r){_("Unhandled Rejection at:",r,"reason:",e)}),process.on("uncaughtException",function(e){_("Uncaught Exception:",e,e.stack)}),_("Version: ",global.version," Build: ","14"),process.chdir(__dirname),-1!==c.indexOf("install")){var A='<SpecifierManifest Version="1.0"><Name>cclibraries</Name><Version>1</Version><Locale></Locale><Group></Group><Path>{{path}}</Path></SpecifierManifest>'.replace("{{path}}",t.resolve(t.join(__dirname,l[process.platform].appFolder,l[process.platform].appName)));_("Installing..."),i.ensureDir(p,function(e){e&&(_("Unable to install: ",e),f(!1,101)),i.writeFile(t.join(p,"cclibraries.xml"),A,{encoding:"utf8"},function(e){e&&(_("Unable to install: ",e),f(!1,102));try{i.utimesSync(p,new Date,new Date)}catch(e){}g(function(){s.checkAndDeploy(function(e){_("CCLibrary process installed successfully."),f(!e,e?103:void 0)})})})})}else-1!==c.indexOf("uninstall")?g(function(){-1!==c.indexOf("--update=true")&&(_("Uninstalling as part of update: no action required"),f(!0)),_("Uninstalling..."),i.unlink(t.join(p,"cclibraries.xml"),function(e){e&&("ENOENT"===e.code?_("Vulcan specifier not installed. Nothing to remove."):(_("Unable to uninstall: ",e),f(!1,104))),s.checkAndUnDeploy(function(e){f(!e,e?105:void 0)})})}):-1!==c.indexOf("--test")?(_("Testing customhook OK"),f(!0)):(_("Expected to be invoked with argument: install or uninstall"),f(!1,100))},151:function(e,r){e.exports=require("ps-node")},152:function(e,r,n){var t=n(28),i=n(14),o=n(37),a=n(12),s=n(9),c=console.log,l={_getExtensionFolder:function(){var e="/Library/Application Support/Adobe/CEP/extensions";0===process.platform.indexOf("win")&&(e=(process.env["ProgramFiles(x86)"]||process.env.PROGRAMFILES).replace(/\\/g,"/")+"/Common Files/Adobe/CEP/extensions");return e},_getPanelsFolder:function(){var e="../Resources/panels";return e=i.join(__dirname,e)},_getOldPanels:function(){return o&&o.cepPanelsToRemove||[]},_getInstalledPanels:function(){var e=[];return o&&o.cepPanels&&o.cepPanels.forEach(function(r){r&&r.destination&&e.push(r.destination)}),e},_removePanels:function(e,r){var n=new a,i=function(e,r){var n=l._getExtensionFolder(),i=n+"/"+e;t.remove(i,function(t){if(t&&"ENOENT"!==t.code)return c(t),r(t);c("Removing Panel "+e+" from "+n),r(null)})};e.forEach(function(e){e&&n.addOperation(i,[e])}),n.run(function(){r(null)})},setLoggerFunction:function(e){c=e||console.log},checkAndDeploy:function(e){var r=l._getPanelsFolder(),n=l._getExtensionFolder(),i=function(e,i){var o=n+"/"+e,a=o+"/CSXS/manifest.xml";t.exists(a,function(n){if(n)return c("Panel already exists at: "+e),void i(null);var s=r+"/"+e+"/Contents",l=r+"/"+e+"/manifest.xml";t.remove(o,function(r){if(r)return c(r),i(r);c("Upgrading Panel "+e+" from "+s),t.copy(s,o,function(e){if(e)return c(e),i(e);var r=a+".temp";t.copy(l,r,function(e){if(e)return c(e),i(e);t.rename(r,a,function(e){if(e)return c(e),i(e);i(null)})})})})})},o=s.wrapCallback(e),p=new a;p.addOperation(function(e){t.exists(r,function(o){if(!o)return c("Could not find panels bundle."),void e(null);t.ensureDir(n,function(n){if(n)return c(n),e(n);t.readdir(r,function(r,n){if(r)return c(r),e(r);var t=new a;n.forEach(function(e){t.addOperation(i,[e])}),t.run(function(r){e(r)})})})})},[]),p.addOperation(l._removePanels,[l._getOldPanels()]),p.run(function(e){o(e)})},checkAndUnDeploy:function(e){var r=s.wrapCallback(e),n=new a;n.addOperation(l._removePanels,[l._getOldPanels()]),n.addOperation(l._removePanels,[l._getInstalledPanels()]),n.run(function(e){r(e)})}};e.exports=l},2:function(e,r){var n=["INVALID_PARAMETER","READ_ONLY","NOT_IMPLEMENTED","NOT_SUPPORTED","REQUIRES_FILESYSTEM","DELETED_LOCALLY"];function t(e,r,i,o){if(-1!==n.indexOf(e))if(Error.call(this),Error.captureStackTrace)Error.captureStackTrace(this,t);else{var a=new Error;a.name=this.name,this.stack=a.stack}this.code=e,this._message=r,this.message="["+e+"] "+r,this.libraryId=i,this.underlyingError=o}t.prototype=Object.create(Error.prototype),t.prototype.name="AdobeLibraryError",t.INVALID_PARAMETER="INVALID_PARAMETER",t.READ_ONLY="READ_ONLY",t.NOT_IMPLEMENTED="NOT_IMPLEMENTED",t.NOT_SUPPORTED="NOT_SUPPORTED",t.REQUIRES_FILESYSTEM="REQUIRES_FILESYSTEM",t.DELETED_LOCALLY="DELETED_LOCALLY",t.NOT_ALLOWED="NOT_ALLOWED",t.FILE_TOO_LARGE="FILE_TOO_LARGE",t.EXCEEDS_MAX_LIBRARY_SIZE="EXCEEDS_MAX_LIBRARY_SIZE",t.CORRUPTED_LIBRARY="CORRUPTED_LIBRARY",t.THUMBNAIL_NOT_AVAILABLE="THUMBNAIL_NOT_AVAILABLE",t.STALE_THUMBNAIL="STALE_THUMBNAIL",t.RENDITION_NOT_AVAILABLE="RENDITION_NOT_AVAILABLE",t.FS_ERROR="FS_ERROR",t.OUT_OF_SPACE="OUT_OF_SPACE",t.LOGGED_OUT="LOGGED_OUT",t.EXCEEDS_QUOTA="EXCEEDS_QUOTA",t.RETRYABLE_SERVER_ERROR="RETRYABLE_SERVER_ERROR",t.TRANSFER_ERROR="TRANSFER_ERROR",t.TRANSFER_ABORTED="TRANSFER_ABORTED",t.NETWORK_ERROR="NETWORK_ERROR",t.ACCESS_DENIED="ACCESS_DENIED",t.URL_VALIDATION_FAILED="URL_VALIDATION_FAILED",t.NO_COMPATIBLE_APP_FOUND="NO_COMPATIBLE_APP_FOUND",t.APP_LAUNCH_FAILED="APP_LAUNCH_FAILED",t.OPERATION_CANCELLED="OPERATION_CANCELLED",t.INVALID_DATA="INVALID_DATA",Object.freeze(t),Object.seal(t.prototype),e.exports=t},24:function(e,r){e.exports=require("os")},28:function(e,r){e.exports=require("fs-extra")},36:function(e,r){e.exports=require("child_process")},37:function(e){e.exports={name:"cc-libraries-api-js",version:"3.4.3",private:!0,description:"Adobe Creative Cloud Libraries API for JavaScript",dependencies:{"dcx-js":"git+ssh://git@git.corp.adobe.com:ProjectCentral/dcx-js.git#v1.7.23","fs-extra":"7.0.1",glob:"7.1.1",punycode:"2.1.1",uuid:"3.3.2","uuid-browser":"3.1.0",yauzl:"2.9.1",yazl:"2.4.3"},optionalDependencies:{bufferutil:"1.3.0",ffi:"2.2.0","font-manager":"git+ssh://git@git.corp.adobe.com:michsmit/font-manager.git#v0.3.4","fs-ext":"1.2.1","idle-gc":"1.0.1","image-size":"0.6.2","node-ProxyResolver":"git+ssh://git@git.corp.adobe.com:ProjectCentral/node-ProxyResolver.git#v1.2.5","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.5","node-thumbnailgenerator":"git+ssh://git@git.corp.adobe.com:ProjectCentral/node-ThumbnailGenerator.git#v1.4.2",node_ssl:"git+ssh://git@git.corp.adobe.com:ProjectCentral/node_ssl.git#v1.3.0","ps-node":"^0.1.6",ref:"1.3.5",restify:"7.2.0",ws:"6.1.2",xml2js:"0.4.17","@ccx/ingest":"git+ssh://git@git.corp.adobe.com:CCX/Ingest.git#2.0.0"},devDependencies:{"7zip":"0.0.6","@babel/core":"^7.1.2","@babel/preset-env":"^7.1.0","@ccx/hyperdrive-builder":"git+ssh://git@git.corp.adobe.com:CCX/hyperdrive-builder.git#v3.0.43","babel-loader":"^8.0.4",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-eslint":"21.0.0","grunt-jsdoc":"2.1.0","grunt-node-gyp":"3.1.0","ignore-loader":"^0.1.2","ink-docstrap":"1.3.0",istanbul:"0.4.5","jasmine-node":"1.14.5",jsftp:"2.1.3",matchdep:"1.0.1",mkdirp:"0.5.1",mockery:"2.0.0",mustache:"2.3.0",nock:"9.0.14","node-fetch":"2.6.0","raw-loader":"^0.5.1",request:"2.87.0","request-promise-native":"^1.0.7",sugar:"1.4.1",webpack:"^4.20.2","webpack-node-externals":"^1.7.2",zock:"git+ssh://git@git.corp.adobe.com:DMA/zock.git#master"},engines:{node:">=8.11.0"},bin:{"cc-libraries":"./scripts/cli"},main:"src/main.js",scripts:{test:"grunt test",install:"node ./scripts/skip_native || node-gyp rebuild",start:"node server",debug:"node server.js --debug"},cepPanels:[{source:"https://artifactory.corp.adobe.com/artifactory/generic-cc-libraries-release/2.3.1050r/CCLibraries.zxp",destination:"CC_LIBRARIES_PANEL_EXTENSION_2_3_1050"},{source:"https://artifactory.corp.adobe.com/artifactory/generic-cc-libraries-release/2.6.64/CCLibraries.zxp",destination:"CC_LIBRARIES_PANEL_EXTENSION_2_6_64"},{source:"https://artifactory.corp.adobe.com/artifactory/generic-cc-libraries-release/2.10.86/CCLibraries.zxp",destination:"CC_LIBRARIES_PANEL_EXTENSION_2_10_86"},{source:"https://artifactory.corp.adobe.com/artifactory/generic-cc-libraries-release/2.11.27/CCLibraries.zxp",destination:"CC_LIBRARIES_PANEL_EXTENSION_2_11_27"},{source:"https://artifactory.corp.adobe.com/artifactory/generic-cc-libraries-release/2.13.141/CCLibraries.zxp",destination:"CC_LIBRARIES_PANEL_EXTENSION_2_13_141"},{source:"https://artifactory.corp.adobe.com/artifactory/generic-cc-libraries-release/3.4.23/CCLibraries.zxp",destination:"CC_LIBRARIES_PANEL_EXTENSION_3_4_23"}],cepPanelsToRemove:["CC_LIBRARIES_PANEL_EXTENSION_2_3_1012","CC_LIBRARIES_PANEL_EXTENSION_2_3_1026_DEV","CC_LIBRARIES_PANEL_EXTENSION_2_3_1038_DEV","CC_LIBRARIES_PANEL_EXTENSION_2_3_1044_DEV","CC_LIBRARIES_PANEL_EXTENSION_2_3_1046_DEV","CC_LIBRARIES_PANEL_EXTENSION_2_3_1047_DEV","CC_LIBRARIES_PANEL_EXTENSION_2_3_1048","CC_LIBRARIES_PANEL_EXTENSION_2_6_60_DEV","CC_LIBRARIES_PANEL_EXTENSION_2_10_56"],thor:[{product:"ACCC",subproduct:"Application",version:"4.9",certification:"Integration Ready",name:"ACCCx4_9_0_{{build}}",volume:"Creative Cloud",build:"^\\d+$"},{product:"ACCC",subproduct:"HDSetup",version:"4.9",certification:"Integration Ready",name:"HDSetup",volume:"Release"}]}},9:function(e,r){var n={wrapCallback:function(e){return function(){e&&e.apply(this,arguments)}},constructStringFromTemplate:function(e,r){var n=e;return Object.keys(r).forEach(function(e){n=n.replace("{{"+e+"}}",r[e])}),n},parseLocalisationFile:function(e){var r,n,t,i,o={},a=0,s=e.split(/\n/);for(a=0;a<s.length;a++)if(s[a]=s[a].replace(/^\s\s*/,"").replace(/\s\s*$/,""),s[a].length>0&&"#"!==s[a].match("^#")){for(n=(r=s[a].split("="))[0].replace(/^\s\s*/,"").replace(/\s\s*$/,""),t=1===r.length?"":r[1];t.match(/\\$/)&&"\\"===t.match(/\\$/).toString();)t=t.substring(0,t.length-1),t+=s[++a].replace(/\s\s*$/,"");for(i=2;i<r.length;i++)t+="="+r[i];t=t.replace(/^\s\s*/,"").replace(/\s\s*$/,""),o[n]=t}return o},compareVersions:function(e,r){if(e=(e||"0").toString().replace(/(\.0)*$/,"").replace(/[^.0-9]+/gim,"."),r=(r||"0").toString().replace(/(\.0)*$/,"").replace(/[^.0-9]+/gim,"."),(isNaN(parseInt(e,10))||parseInt(e,10)>250)&&(e="0"),(isNaN(parseInt(r,10))||parseInt(r,10)>250)&&(r="0"),e===r)return 0;var n,t,i=e.split("."),o=r.split(".");for(n=0;n<i.length&&n<o.length;n++){if(t=parseInt(i[n],10)-parseInt(o[n],10),isNaN(t))return isNaN(parseInt(i[n],10))?1:-1;if(t>0)return-1;if(t<0)return 1}return(t=i.length-o.length)>0?-1:t<0?1:0}};Object.seal(n),e.exports=n}});