text: var cov_fak6e87dl=function(){var path="/Users/nuno/IdeaProjects/lambda-uri/lib/parser.js";var hash="5af00ebf7949350aceed1b8e455e01e57d5ed427";var global=new Function("return this")();var gcv="__coverage__";var coverageData={path:"/Users/nuno/IdeaProjects/lambda-uri/lib/parser.js",statementMap:{"0":{start:{line:22,column:8},end:{line:22,column:34}},"1":{start:{line:23,column:8},end:{line:23,column:32}},"2":{start:{line:24,column:8},end:{line:24,column:26}},"3":{start:{line:25,column:8},end:{line:25,column:40}},"4":{start:{line:26,column:8},end:{line:26,column:44}},"5":{start:{line:27,column:8},end:{line:27,column:34}},"6":{start:{line:28,column:8},end:{line:28,column:46}},"7":{start:{line:29,column:8},end:{line:29,column:40}},"8":{start:{line:34,column:8},end:{line:34,column:30}},"9":{start:{line:38,column:8},end:{line:38,column:26}},"10":{start:{line:42,column:8},end:{line:42,column:33}},"11":{start:{line:46,column:8},end:{line:46,column:29}},"12":{start:{line:50,column:8},end:{line:50,column:30}},"13":{start:{line:54,column:8},end:{line:54,column:35}},"14":{start:{line:58,column:8},end:{line:58,column:36}},"15":{start:{line:62,column:8},end:{line:62,column:145}},"16":{start:{line:74,column:8},end:{line:101,column:9}},"17":{start:{line:78,column:28},end:{line:78,column:200}},"18":{start:{line:80,column:12},end:{line:82,column:13}},"19":{start:{line:81,column:16},end:{line:81,column:54}},"20":{start:{line:84,column:33},end:{line:84,column:38}},"21":{start:{line:86,column:12},end:{line:88,column:13}},"22":{start:{line:87,column:16},end:{line:87,column:38}},"23":{start:{line:90,column:12},end:{line:99,column:13}},"24":{start:{line:91,column:16},end:{line:98,column:17}},"25":{start:{line:100,column:12},end:{line:100,column:50}},"26":{start:{line:102,column:8},end:{line:102,column:64}},"27":{start:{line:114,column:8},end:{line:126,column:9}},"28":{start:{line:115,column:12},end:{line:125,column:13}},"29":{start:{line:116,column:16},end:{line:122,column:22}},"30":{start:{line:124,column:16},end:{line:124,column:46}},"31":{start:{line:127,column:8},end:{line:127,column:57}},"32":{start:{line:131,column:0},end:{line:131,column:29}}},fnMap:{"0":{name:"(anonymous_0)",decl:{start:{line:14,column:4},end:{line:14,column:5}},loc:{start:{line:21,column:24},end:{line:30,column:5}},line:21},"1":{name:"(anonymous_1)",decl:{start:{line:33,column:4},end:{line:33,column:5}},loc:{start:{line:33,column:19},end:{line:35,column:5}},line:33},"2":{name:"(anonymous_2)",decl:{start:{line:37,column:4},end:{line:37,column:5}},loc:{start:{line:37,column:15},end:{line:39,column:5}},line:37},"3":{name:"(anonymous_3)",decl:{start:{line:41,column:4},end:{line:41,column:5}},loc:{start:{line:41,column:22},end:{line:43,column:5}},line:41},"4":{name:"(anonymous_4)",decl:{start:{line:45,column:4},end:{line:45,column:5}},loc:{start:{line:45,column:18},end:{line:47,column:5}},line:45},"5":{name:"(anonymous_5)",decl:{start:{line:49,column:4},end:{line:49,column:5}},loc:{start:{line:49,column:19},end:{line:51,column:5}},line:49},"6":{name:"(anonymous_6)",decl:{start:{line:53,column:4},end:{line:53,column:5}},loc:{start:{line:53,column:24},end:{line:55,column:5}},line:53},"7":{name:"(anonymous_7)",decl:{start:{line:57,column:4},end:{line:57,column:5}},loc:{start:{line:57,column:25},end:{line:59,column:5}},line:57},"8":{name:"(anonymous_8)",decl:{start:{line:61,column:4},end:{line:61,column:5}},loc:{start:{line:61,column:14},end:{line:63,column:5}},line:61},"9":{name:"(anonymous_9)",decl:{start:{line:72,column:4},end:{line:72,column:5}},loc:{start:{line:72,column:32},end:{line:103,column:5}},line:72},"10":{name:"(anonymous_10)",decl:{start:{line:112,column:4},end:{line:112,column:5}},loc:{start:{line:112,column:41},end:{line:128,column:5}},line:112}},branchMap:{"0":{loc:{start:{line:74,column:8},end:{line:101,column:9}},type:"if",locations:[{start:{line:74,column:8},end:{line:101,column:9}},{start:{line:74,column:8},end:{line:101,column:9}}],line:74},"1":{loc:{start:{line:74,column:12},end:{line:76,column:31}},type:"binary-expr",locations:[{start:{line:74,column:12},end:{line:74,column:35}},{start:{line:75,column:15},end:{line:75,column:29}},{start:{line:76,column:15},end:{line:76,column:31}}],line:74},"2":{loc:{start:{line:80,column:12},end:{line:82,column:13}},type:"if",locations:[{start:{line:80,column:12},end:{line:82,column:13}},{start:{line:80,column:12},end:{line:82,column:13}}],line:80},"3":{loc:{start:{line:86,column:12},end:{line:88,column:13}},type:"if",locations:[{start:{line:86,column:12},end:{line:88,column:13}},{start:{line:86,column:12},end:{line:88,column:13}}],line:86},"4":{loc:{start:{line:90,column:12},end:{line:99,column:13}},type:"if",locations:[{start:{line:90,column:12},end:{line:99,column:13}},{start:{line:90,column:12},end:{line:99,column:13}}],line:90},"5":{loc:{start:{line:90,column:16},end:{line:90,column:54}},type:"binary-expr",locations:[{start:{line:90,column:16},end:{line:90,column:30}},{start:{line:90,column:34},end:{line:90,column:54}}],line:90},"6":{loc:{start:{line:91,column:37},end:{line:91,column:75}},type:"cond-expr",locations:[{start:{line:91,column:54},end:{line:91,column:62}},{start:{line:91,column:65},end:{line:91,column:75}}],line:91},"7":{loc:{start:{line:114,column:8},end:{line:126,column:9}},type:"if",locations:[{start:{line:114,column:8},end:{line:126,column:9}},{start:{line:114,column:8},end:{line:126,column:9}}],line:114}},s:{"0":0,"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":0,"31":0,"32":0},f:{"0":0,"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0},b:{"0":[0,0],"1":[0,0,0],"2":[0,0],"3":[0,0],"4":[0,0],"5":[0,0],"6":[0,0],"7":[0,0]},_coverageSchema:"43e27e138ebf9cfc5966b082cf9a028302ed4184",hash:"5af00ebf7949350aceed1b8e455e01e57d5ed427"};var coverage=global[gcv]||(global[gcv]={});if(coverage[path]&&coverage[path].hash===hash){return coverage[path];}return coverage[path]=coverageData;}();class LambdaURI{/**
       *
       * @param {string} protocol
       * @param {string} user
       * @param {string} countryCode
       * @param {string} project
       * @param {string} lambdaId
       * @param {number} lambdaVersion
       * @param {number} lambdaInstance
       */constructor(protocol,user,countryCode,project,lambdaId,lambdaVersion,lambdaInstance){cov_fak6e87dl.f[0]++;cov_fak6e87dl.s[0]++;this._protocol=protocol;cov_fak6e87dl.s[1]++;this._project=project;cov_fak6e87dl.s[2]++;this._user=user;cov_fak6e87dl.s[3]++;this._countryCode=countryCode;cov_fak6e87dl.s[4]++;this._lambdaVersion=lambdaVersion;cov_fak6e87dl.s[5]++;this._lambdaId=lambdaId;cov_fak6e87dl.s[6]++;this._lambdaInstance=lambdaInstance;cov_fak6e87dl.s[7]++;this._countryCode=countryCode;}get protocol(){cov_fak6e87dl.f[1]++;cov_fak6e87dl.s[8]++;return this._protocol;}get user(){cov_fak6e87dl.f[2]++;cov_fak6e87dl.s[9]++;return this._user;}get countryCode(){cov_fak6e87dl.f[3]++;cov_fak6e87dl.s[10]++;return this._countryCode;}get project(){cov_fak6e87dl.f[4]++;cov_fak6e87dl.s[11]++;return this._project;}get lambdaId(){cov_fak6e87dl.f[5]++;cov_fak6e87dl.s[12]++;return this._lambdaId;}get lambdaVersion(){cov_fak6e87dl.f[6]++;cov_fak6e87dl.s[13]++;return this._lambdaVersion;}get lambdaInstance(){cov_fak6e87dl.f[7]++;cov_fak6e87dl.s[14]++;return this._lambdaInstance;}toString(){cov_fak6e87dl.f[8]++;cov_fak6e87dl.s[15]++;return`${this.protocol}//${this.user}@${this.countryCode}${this.project}.${this.lambdaId}.${this.lambdaVersion}.${this.lambdaInstance}`;}/**
       * @param {string} uri
       *
       * @return {LambdaURI}
       * @throws TypeError If argument is not string
       * @throws Error If is an invalid URI
       */static parseFromString(uri){cov_fak6e87dl.f[9]++;cov_fak6e87dl.s[16]++;if((cov_fak6e87dl.b[1][0]++,typeof uri==='string')&&(cov_fak6e87dl.b[1][1]++,uri.length>0)&&(cov_fak6e87dl.b[1][2]++,uri.length<255)){cov_fak6e87dl.b[0][0]++;const matches=(cov_fak6e87dl.s[17]++,uri.match(/(fog:\/\/)?(.*@.*)@([a-z]{2}_[a-z]{2})\.([a-z][a-z\-]+)\.([0-9a-fA-F]{8}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{12})\.([0-9]+)\.([0-9]+)/s));cov_fak6e87dl.s[18]++;if(!matches){cov_fak6e87dl.b[2][0]++;cov_fak6e87dl.s[19]++;throw new Error("Invalid lambda URI");}else{cov_fak6e87dl.b[2][1]++;}let ignoreProtocol=(cov_fak6e87dl.s[20]++,false);cov_fak6e87dl.s[21]++;if(!matches[1]){cov_fak6e87dl.b[3][0]++;cov_fak6e87dl.s[22]++;ignoreProtocol=true;}else{cov_fak6e87dl.b[3][1]++;}cov_fak6e87dl.s[23]++;if((cov_fak6e87dl.b[5][0]++,ignoreProtocol)||(cov_fak6e87dl.b[5][1]++,matches.length===8)){cov_fak6e87dl.b[4][0]++;cov_fak6e87dl.s[24]++;return new LambdaURI(ignoreProtocol?(cov_fak6e87dl.b[6][0]++,'fog://'):(cov_fak6e87dl.b[6][1]++,matches[1]),matches[2],matches[3],matches[4],matches[5],Number(matches[6]),Number(matches[7]));}else{cov_fak6e87dl.b[4][1]++;}cov_fak6e87dl.s[25]++;throw new Error("Invalid lambda URI");}else{cov_fak6e87dl.b[0][1]++;}cov_fak6e87dl.s[26]++;throw new TypeError("URI is invalid data type/length.");}/**
       * @TODO Country code
       * @param deployLambda
       * @return {LambdaURI}
       * @throws TypeError If argument is not object
       * @throws Error If object does have the methods
       */static parseFromLambda(deployLambda){cov_fak6e87dl.f[10]++;cov_fak6e87dl.s[27]++;if(typeof deployLambda==='object'){cov_fak6e87dl.b[7][0]++;cov_fak6e87dl.s[28]++;try{cov_fak6e87dl.s[29]++;return new LambdaURI('fog',deployLambda.getOwner(),'pt_pt',deployLambda.getProject(),uuid(deployLambda.getId()),deployLambda.getEtag(),1);}catch(e){cov_fak6e87dl.s[30]++;throw new Error(e.toString());}}else{cov_fak6e87dl.b[7][1]++;}cov_fak6e87dl.s[31]++;throw new TypeError("URI is invalid data type.");}}cov_fak6e87dl.s[32]++;module.exports={LambdaURI};