@adyen/adyen-salesforce-pwa
Version:
This NPM package enables you to go live fast with payments with Adyen as a payment service provider when building your Salesforce PWA Retail application.
3 lines • 23.8 kB
JavaScript
/*! For license information please see get-env.js.LICENSE.txt */
(()=>{var t={965:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}var o=["projectID","environmentID"];function i(){i=function(){return e};var t,e={},r=Object.prototype,o=r.hasOwnProperty,a="function"==typeof Symbol?Symbol:{},s=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",u=a.toStringTag||"@@toStringTag";function f(t,e,r,n){Object.defineProperty(t,e,{value:r,enumerable:!n,configurable:!n,writable:!n})}try{f({},"")}catch(t){f=function(t,e,r){return t[e]=r}}function l(e,r,n,o){var i=r&&r.prototype instanceof v?r:v,a=Object.create(i.prototype);return f(a,"_invoke",function(e,r,n){var o=1;return function(i,a){if(3===o)throw Error("Generator is already running");if(4===o){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var s=n.delegate;if(s){var c=x(s,n);if(c){if(c===h)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(1===o)throw o=4,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=3;var u=p(e,r,n);if("normal"===u.type){if(o=n.done?4:2,u.arg===h)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(o=4,n.method="throw",n.arg=u.arg)}}}(e,n,new D(o||[])),!0),a}function p(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var h={};function v(){}function y(){}function d(){}var g={};f(g,s,(function(){return this}));var m=Object.getPrototypeOf,w=m&&m(m(P([])));w&&w!==r&&o.call(w,s)&&(g=w);var b=d.prototype=v.prototype=Object.create(g);function E(t){["next","throw","return"].forEach((function(e){f(t,e,(function(t){return this._invoke(e,t)}))}))}function O(t,e){function r(i,a,s,c){var u=p(t[i],t,a);if("throw"!==u.type){var f=u.arg,l=f.value;return l&&"object"==n(l)&&o.call(l,"__await")?e.resolve(l.__await).then((function(t){r("next",t,s,c)}),(function(t){r("throw",t,s,c)})):e.resolve(l).then((function(t){f.value=t,s(f)}),(function(t){return r("throw",t,s,c)}))}c(u.arg)}var i;f(this,"_invoke",(function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}),!0)}function x(e,r){var n=r.method,o=e.i[n];if(o===t)return r.delegate=null,"throw"===n&&e.i.return&&(r.method="return",r.arg=t,x(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),h;var i=p(o,e.i,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,h;var a=i.arg;return a?a.done?(r[e.r]=a.value,r.next=e.n,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,h):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,h)}function j(t){this.tryEntries.push(t)}function _(e){var r=e[4]||{};r.type="normal",r.arg=t,e[4]=r}function D(t){this.tryEntries=[[-1]],t.forEach(j,this),this.reset(!0)}function P(e){if(null!=e){var r=e[s];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,a=function r(){for(;++i<e.length;)if(o.call(e,i))return r.value=e[i],r.done=!1,r;return r.value=t,r.done=!0,r};return a.next=a}}throw new TypeError(n(e)+" is not iterable")}return y.prototype=d,f(b,"constructor",d),f(d,"constructor",y),f(d,u,y.displayName="GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,f(t,u,"GeneratorFunction")),t.prototype=Object.create(b),t},e.awrap=function(t){return{__await:t}},E(O.prototype),f(O.prototype,c,(function(){return this})),e.AsyncIterator=O,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new O(l(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},E(b),f(b,u,"Generator"),f(b,s,(function(){return this})),f(b,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.unshift(n);return function t(){for(;r.length;)if((n=r.pop())in e)return t.value=n,t.done=!1,t;return t.done=!0,t}},e.values=P,D.prototype={constructor:D,reset:function(e){if(this.prev=this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(_),!e)for(var r in this)"t"===r.charAt(0)&&o.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0][4];if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(t){a.type="throw",a.arg=e,r.next=t}for(var o=r.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i[4],s=this.prev,c=i[1],u=i[2];if(-1===i[0])return n("end"),!1;if(!c&&!u)throw Error("try statement without catch or finally");if(null!=i[0]&&i[0]<=s){if(s<c)return this.method="next",this.arg=t,n(c),!0;if(s<u)return n(u),!1}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n[0]>-1&&n[0]<=this.prev&&this.prev<n[2]){var o=n;break}}o&&("break"===t||"continue"===t)&&o[0]<=e&&e<=o[2]&&(o=null);var i=o?o[4]:{};return i.type=t,i.arg=e,o?(this.method="next",this.next=o[2],h):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),h},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r[2]===t)return this.complete(r[4],r[3]),_(r),h}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r[0]===t){var n=r[4];if("throw"===n.type){var o=n.arg;_(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={i:P(e),r,n},"next"===this.method&&(this.arg=t),h}},e}function a(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function s(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?a(Object(r),!0).forEach((function(e){c(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):a(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function c(t,e,r){return(e=p(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function u(t,e,r,n,o,i,a){try{var s=t[i](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,o)}function f(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){u(i,n,o,a,s,"next",t)}function s(t){u(i,n,o,a,s,"throw",t)}a(void 0)}))}}function l(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,p(n.key),n)}}function p(t){var e=function(t){if("object"!=n(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==n(e)?e:e+""}function h(t,e,r){return e=y(e),function(t,e){if(e&&("object"==n(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,v()?Reflect.construct(e,r||[],y(t).constructor):e.apply(t,r))}function v(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(v=function(){return!!t})()}function y(t){return y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},y(t)}function d(t,e){return d=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},d(t,e)}var g=function(t){function e(t){var r,n=t.projectID,i=t.environmentID,a=function(t,e){if(null==t)return{};var r,n,o=function(t,e){if(null==t)return{};var r={};for(var n in t)if({}.hasOwnProperty.call(t,n)){if(-1!==e.indexOf(n))continue;r[n]=t[n]}return r}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n<i.length;n++)r=i[n],-1===e.indexOf(r)&&{}.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}(t,o);if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),r=h(this,e,[a]),!n)throw new Error("projectID is not defined in .env file");if(!i)throw new Error("environmentID is not defined in .env file");return r.projectID=n,r.environmentID=i,r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&d(t,e)}(e,t),r=e,n=[{key:"pushEnv",value:(c=f(i().mark((function t(e){var r,n,o,a;return i().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r="api/projects/".concat(this.projectID,"/target/").concat(this.environmentID,"/env-var/"),(n=new URL(this.opts.origin)).pathname=r,t.t0=s,t.t1=s,t.t2={},t.next=8,this.getHeaders();case 8:return t.t3=t.sent,t.t4=(0,t.t1)(t.t2,t.t3),t.t5={},t.t6={"Content-Type":"application/json",Accept:"application/json"},o=(0,t.t0)(t.t4,t.t5,t.t6),t.next=15,this.opts.fetch(n.toString(),{env:e,method:"PATCH",headers:o});case 15:return a=t.sent,t.next=18,this.throwForStatus(a);case 18:return t.abrupt("return",a);case 19:case"end":return t.stop()}}),t,this)}))),function(t){return c.apply(this,arguments)})},{key:"getEnv",value:(a=f(i().mark((function t(){var e,r,n,o;return i().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e="api/projects/".concat(this.projectID,"/target/").concat(this.environmentID,"/env-var/"),(r=new URL(this.opts.origin)).pathname=e,t.t0=s,t.t1=s,t.t2={},t.next=8,this.getHeaders();case 8:return t.t3=t.sent,t.t4=(0,t.t1)(t.t2,t.t3),t.t5={},t.t6={Accept:"application/json"},n=(0,t.t0)(t.t4,t.t5,t.t6),t.next=15,this.opts.fetch(r.toString(),{method:"GET",headers:n});case 15:return o=t.sent,t.next=18,this.throwForStatus(o);case 18:return t.next=20,o.json();case 20:return t.abrupt("return",t.sent);case 21:case"end":return t.stop()}}),t,this)}))),function(){return a.apply(this,arguments)})}],n&&l(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n,a,c}(r(168).CloudAPIClient);t.exports.CloudAPIClientCustom=g},998:(t,e,r)=>{const n=r(896),o=r(928),i=r(857),a=r(982),s=r(56).version,c=/(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/gm;function u(t){console.log(`[dotenv@${s}][DEBUG] ${t}`)}function f(t){return t&&t.DOTENV_KEY&&t.DOTENV_KEY.length>0?t.DOTENV_KEY:process.env.DOTENV_KEY&&process.env.DOTENV_KEY.length>0?process.env.DOTENV_KEY:""}function l(t,e){let r;try{r=new URL(e)}catch(t){if("ERR_INVALID_URL"===t.code)throw new Error("INVALID_DOTENV_KEY: Wrong format. Must be in valid uri format like dotenv://:key_1234@dotenv.org/vault/.env.vault?environment=development");throw t}const n=r.password;if(!n)throw new Error("INVALID_DOTENV_KEY: Missing key part");const o=r.searchParams.get("environment");if(!o)throw new Error("INVALID_DOTENV_KEY: Missing environment part");const i=`DOTENV_VAULT_${o.toUpperCase()}`,a=t.parsed[i];if(!a)throw new Error(`NOT_FOUND_DOTENV_ENVIRONMENT: Cannot locate environment ${i} in your .env.vault file.`);return{ciphertext:a,key:n}}function p(t){let e=o.resolve(process.cwd(),".env");return t&&t.path&&t.path.length>0&&(e=t.path),e.endsWith(".vault")?e:`${e}.vault`}const h={configDotenv:function(t){let e=o.resolve(process.cwd(),".env"),r="utf8";const a=Boolean(t&&t.debug);var s;t&&(null!=t.path&&(e="~"===(s=t.path)[0]?o.join(i.homedir(),s.slice(1)):s),null!=t.encoding&&(r=t.encoding));try{const o=h.parse(n.readFileSync(e,{encoding:r}));let i=process.env;return t&&null!=t.processEnv&&(i=t.processEnv),h.populate(i,o,t),{parsed:o}}catch(t){return a&&u(`Failed to load ${e} ${t.message}`),{error:t}}},_configVault:function(t){console.log(`[dotenv@${s}][INFO] Loading env from encrypted .env.vault`);const e=h._parseVault(t);let r=process.env;return t&&null!=t.processEnv&&(r=t.processEnv),h.populate(r,e,t),{parsed:e}},_parseVault:function(t){const e=p(t),r=h.configDotenv({path:e});if(!r.parsed)throw new Error(`MISSING_DATA: Cannot parse ${e} for an unknown reason`);const n=f(t).split(","),o=n.length;let i;for(let t=0;t<o;t++)try{const e=l(r,n[t].trim());i=h.decrypt(e.ciphertext,e.key);break}catch(e){if(t+1>=o)throw e}return h.parse(i)},config:function(t){const e=p(t);return 0===f(t).length?h.configDotenv(t):n.existsSync(e)?h._configVault(t):(r=`You set DOTENV_KEY but you are missing a .env.vault file at ${e}. Did you forget to build it?`,console.log(`[dotenv@${s}][WARN] ${r}`),h.configDotenv(t));var r},decrypt:function(t,e){const r=Buffer.from(e.slice(-64),"hex");let n=Buffer.from(t,"base64");const o=n.slice(0,12),i=n.slice(-16);n=n.slice(12,-16);try{const t=a.createDecipheriv("aes-256-gcm",r,o);return t.setAuthTag(i),`${t.update(n)}${t.final()}`}catch(t){const e=t instanceof RangeError,r="Invalid key length"===t.message,n="Unsupported state or unable to authenticate data"===t.message;if(e||r)throw new Error("INVALID_DOTENV_KEY: It must be 64 characters long (or more)");if(n)throw new Error("DECRYPTION_FAILED: Please check your DOTENV_KEY");throw console.error("Error: ",t.code),console.error("Error: ",t.message),t}},parse:function(t){const e={};let r,n=t.toString();for(n=n.replace(/\r\n?/gm,"\n");null!=(r=c.exec(n));){const t=r[1];let n=r[2]||"";n=n.trim();const o=n[0];n=n.replace(/^(['"`])([\s\S]*)\1$/gm,"$2"),'"'===o&&(n=n.replace(/\\n/g,"\n"),n=n.replace(/\\r/g,"\r")),e[t]=n}return e},populate:function(t,e,r={}){const n=Boolean(r&&r.debug),o=Boolean(r&&r.override);if("object"!=typeof e)throw new Error("OBJECT_REQUIRED: Please check the processEnv argument being passed to populate");for(const r of Object.keys(e))Object.prototype.hasOwnProperty.call(t,r)?(!0===o&&(t[r]=e[r]),n&&u(!0===o?`"${r}" is already defined and WAS overwritten`:`"${r}" is already defined and was NOT overwritten`)):t[r]=e[r]}};t.exports.configDotenv=h.configDotenv,t.exports._configVault=h._configVault,t.exports._parseVault=h._parseVault,t.exports.config=h.config,t.exports.decrypt=h.decrypt,t.exports.parse=h.parse,t.exports.populate=h.populate,t.exports=h},168:t=>{"use strict";t.exports=require("@salesforce/pwa-kit-dev/utils/script-utils")},982:t=>{"use strict";t.exports=require("crypto")},896:t=>{"use strict";t.exports=require("fs")},857:t=>{"use strict";t.exports=require("os")},928:t=>{"use strict";t.exports=require("path")},56:t=>{"use strict";t.exports=JSON.parse('{"name":"dotenv","version":"16.3.1","description":"Loads environment variables from .env file","main":"lib/main.js","types":"lib/main.d.ts","exports":{".":{"types":"./lib/main.d.ts","require":"./lib/main.js","default":"./lib/main.js"},"./config":"./config.js","./config.js":"./config.js","./lib/env-options":"./lib/env-options.js","./lib/env-options.js":"./lib/env-options.js","./lib/cli-options":"./lib/cli-options.js","./lib/cli-options.js":"./lib/cli-options.js","./package.json":"./package.json"},"scripts":{"dts-check":"tsc --project tests/types/tsconfig.json","lint":"standard","lint-readme":"standard-markdown","pretest":"npm run lint && npm run dts-check","test":"tap tests/*.js --100 -Rspec","prerelease":"npm test","release":"standard-version"},"repository":{"type":"git","url":"git://github.com/motdotla/dotenv.git"},"funding":"https://github.com/motdotla/dotenv?sponsor=1","keywords":["dotenv","env",".env","environment","variables","config","settings"],"readmeFilename":"README.md","license":"BSD-2-Clause","devDependencies":{"@definitelytyped/dtslint":"^0.0.133","@types/node":"^18.11.3","decache":"^4.6.1","sinon":"^14.0.1","standard":"^17.0.0","standard-markdown":"^7.1.0","standard-version":"^9.5.0","tap":"^16.3.0","tar":"^6.1.11","typescript":"^4.8.4"},"engines":{"node":">=12"},"browser":{"fs":false}}')}},e={};function r(n){var o=e[n];if(void 0!==o)return o.exports;var i=e[n]={exports:{}};return t[n](i,i.exports,r),i.exports}(()=>{"use strict";function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t(e)}function e(){e=function(){return n};var r,n={},o=Object.prototype,i=o.hasOwnProperty,a="function"==typeof Symbol?Symbol:{},s=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",u=a.toStringTag||"@@toStringTag";function f(t,e,r,n){Object.defineProperty(t,e,{value:r,enumerable:!n,configurable:!n,writable:!n})}try{f({},"")}catch(r){f=function(t,e,r){return t[e]=r}}function l(t,e,n,o){var i=e&&e.prototype instanceof v?e:v,a=Object.create(i.prototype);return f(a,"_invoke",function(t,e,n){var o=1;return function(i,a){if(3===o)throw Error("Generator is already running");if(4===o){if("throw"===i)throw a;return{value:r,done:!0}}for(n.method=i,n.arg=a;;){var s=n.delegate;if(s){var c=x(s,n);if(c){if(c===h)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(1===o)throw o=4,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=3;var u=p(t,e,n);if("normal"===u.type){if(o=n.done?4:2,u.arg===h)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(o=4,n.method="throw",n.arg=u.arg)}}}(t,n,new D(o||[])),!0),a}function p(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}n.wrap=l;var h={};function v(){}function y(){}function d(){}var g={};f(g,s,(function(){return this}));var m=Object.getPrototypeOf,w=m&&m(m(P([])));w&&w!==o&&i.call(w,s)&&(g=w);var b=d.prototype=v.prototype=Object.create(g);function E(t){["next","throw","return"].forEach((function(e){f(t,e,(function(t){return this._invoke(e,t)}))}))}function O(e,r){function n(o,a,s,c){var u=p(e[o],e,a);if("throw"!==u.type){var f=u.arg,l=f.value;return l&&"object"==t(l)&&i.call(l,"__await")?r.resolve(l.__await).then((function(t){n("next",t,s,c)}),(function(t){n("throw",t,s,c)})):r.resolve(l).then((function(t){f.value=t,s(f)}),(function(t){return n("throw",t,s,c)}))}c(u.arg)}var o;f(this,"_invoke",(function(t,e){function i(){return new r((function(r,o){n(t,e,r,o)}))}return o=o?o.then(i,i):i()}),!0)}function x(t,e){var n=e.method,o=t.i[n];if(o===r)return e.delegate=null,"throw"===n&&t.i.return&&(e.method="return",e.arg=r,x(t,e),"throw"===e.method)||"return"!==n&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+n+"' method")),h;var i=p(o,t.i,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,h;var a=i.arg;return a?a.done?(e[t.r]=a.value,e.next=t.n,"return"!==e.method&&(e.method="next",e.arg=r),e.delegate=null,h):a:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,h)}function j(t){this.tryEntries.push(t)}function _(t){var e=t[4]||{};e.type="normal",e.arg=r,t[4]=e}function D(t){this.tryEntries=[[-1]],t.forEach(j,this),this.reset(!0)}function P(e){if(null!=e){var n=e[s];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=function t(){for(;++o<e.length;)if(i.call(e,o))return t.value=e[o],t.done=!1,t;return t.value=r,t.done=!0,t};return a.next=a}}throw new TypeError(t(e)+" is not iterable")}return y.prototype=d,f(b,"constructor",d),f(d,"constructor",y),f(d,u,y.displayName="GeneratorFunction"),n.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},n.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,f(t,u,"GeneratorFunction")),t.prototype=Object.create(b),t},n.awrap=function(t){return{__await:t}},E(O.prototype),f(O.prototype,c,(function(){return this})),n.AsyncIterator=O,n.async=function(t,e,r,o,i){void 0===i&&(i=Promise);var a=new O(l(t,e,r,o),i);return n.isGeneratorFunction(e)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},E(b),f(b,u,"Generator"),f(b,s,(function(){return this})),f(b,"toString",(function(){return"[object Generator]"})),n.keys=function(t){var e=Object(t),r=[];for(var n in e)r.unshift(n);return function t(){for(;r.length;)if((n=r.pop())in e)return t.value=n,t.done=!1,t;return t.done=!0,t}},n.values=P,D.prototype={constructor:D,reset:function(t){if(this.prev=this.next=0,this.sent=this._sent=r,this.done=!1,this.delegate=null,this.method="next",this.arg=r,this.tryEntries.forEach(_),!t)for(var e in this)"t"===e.charAt(0)&&i.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=r)},stop:function(){this.done=!0;var t=this.tryEntries[0][4];if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r){a.type="throw",a.arg=t,e.next=r}for(var o=e.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i[4],s=this.prev,c=i[1],u=i[2];if(-1===i[0])return n("end"),!1;if(!c&&!u)throw Error("try statement without catch or finally");if(null!=i[0]&&i[0]<=s){if(s<c)return this.method="next",this.arg=r,n(c),!0;if(s<u)return n(u),!1}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n[0]>-1&&n[0]<=this.prev&&this.prev<n[2]){var o=n;break}}o&&("break"===t||"continue"===t)&&o[0]<=e&&e<=o[2]&&(o=null);var i=o?o[4]:{};return i.type=t,i.arg=e,o?(this.method="next",this.next=o[2],h):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),h},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r[2]===t)return this.complete(r[4],r[3]),_(r),h}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r[0]===t){var n=r[4];if("throw"===n.type){var o=n.arg;_(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={i:P(t),r:e,n},"next"===this.method&&(this.arg=r),h}},n}function n(t,e,r,n,o,i,a){try{var s=t[i](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,o)}var o,i=r(168),a=i.readCredentials,s=i.DEFAULT_CLOUD_ORIGIN,c=i.getCredentialsFile,u=r(965).CloudAPIClientCustom,f=r(998);(o=e().mark((function t(){var r,n,o,i,l,p;return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(r=f.config()).error){t.next=3;break}throw r.error;case 3:return n=r.parsed,t.next=6,a(c(s));case 6:return o=t.sent,i={credentials:o,projectID:n.PROJECT_ID,environmentID:n.ENVIRONMENT_ID},l=new u(i),t.next=11,l.getEnv();case 11:((p=t.sent).warnings||[]).forEach((function(t){return console.log(t)})),console.log("env vars fetched!",p);case 15:case"end":return t.stop()}}),t)})),function(){var t=this,e=arguments;return new Promise((function(r,i){var a=o.apply(t,e);function s(t){n(a,r,i,s,c,"next",t)}function c(t){n(a,r,i,s,c,"throw",t)}s(void 0)}))})()})(),Object.defineProperty(exports,"__esModule",{value:!0})})();