{"remainingRequest":"/home/cmiss/Jenkins/workspace/mapintegratedvuer/node_modules/thread-loader/dist/cjs.js!/home/cmiss/Jenkins/workspace/mapintegratedvuer/node_modules/babel-loader/lib/index.js!/home/cmiss/Jenkins/workspace/mapintegratedvuer/node_modules/eslint-loader/index.js??ref--14-0!/home/cmiss/Jenkins/workspace/mapintegratedvuer/src/components/scripts/utilities.js","dependencies":[{"path":"/home/cmiss/Jenkins/workspace/mapintegratedvuer/src/components/scripts/utilities.js","mtime":1684894761594},{"path":"/home/cmiss/Jenkins/workspace/mapintegratedvuer/babel.config.js","mtime":1684261475125},{"path":"/home/cmiss/Jenkins/workspace/mapintegratedvuer/node_modules/cache-loader/dist/cjs.js","mtime":499162500000},{"path":"/home/cmiss/Jenkins/workspace/mapintegratedvuer/node_modules/thread-loader/dist/cjs.js","mtime":499162500000},{"path":"/home/cmiss/Jenkins/workspace/mapintegratedvuer/node_modules/babel-loader/lib/index.js","mtime":456789000000},{"path":"/home/cmiss/Jenkins/workspace/mapintegratedvuer/node_modules/eslint-loader/index.js","mtime":499162500000}],"contextDependencies":[],"result":[{"type":"Buffer","data":"base64:dmFyIF9yZWdlbmVyYXRvclJ1bnRpbWUgPSByZXF1aXJlKCIvaG9tZS9jbWlzcy9KZW5raW5zL3dvcmtzcGFjZS9tYXBpbnRlZ3JhdGVkdnVlci9ub2RlX21vZHVsZXMvQGJhYmVsL3J1bnRpbWUvaGVscGVycy9yZWdlbmVyYXRvclJ1bnRpbWUuanMiKS5kZWZhdWx0Owp2YXIgX2FzeW5jVG9HZW5lcmF0b3IgPSByZXF1aXJlKCIvaG9tZS9jbWlzcy9KZW5raW5zL3dvcmtzcGFjZS9tYXBpbnRlZ3JhdGVkdnVlci9ub2RlX21vZHVsZXMvQGJhYmVsL3J1bnRpbWUvaGVscGVycy9hc3luY1RvR2VuZXJhdG9yLmpzIikuZGVmYXVsdDsKcmVxdWlyZSgiY29yZS1qcy9tb2R1bGVzL2VzLmFycmF5Lml0ZXJhdG9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XBpY29uLWljb25faHVtYW4iLAogICAgICBkaXNwbGF5TGF0ZXN0Q2hhbmdlczogdHJ1ZSwKICAgICAgZGlzcGxheVdhcm5pbmc6IHRydWUKICAgIH0sCiAgICAiSHVtYW4gTWFsZSI6IHsKICAgICAgdGF4bzogIk5DQklUYXhvbjo5NjA2IiwKICAgICAgYmlvbG9naWNhbFNleDogIlBBVE86MDAwMDM4NCIsCiAgICAgIGljb25DbGFzczogIm1hcGljb24taWNvbl9odW1hbiIsCiAgICAgIGRpc3BsYXlMYXRlc3RDaGFuZ2VzOiB0cnVlLAogICAgICBkaXNwbGF5V2FybmluZzogdHJ1ZQogICAgfSwKICAgICJSYXQiOiB7CiAgICAgIHRheG86ICJOQ0JJVGF4b246MTAxMTQiLAogICAgICBpY29uQ2xhc3M6ICJtYXBpY29uLWljb25fcmF0IiwKICAgICAgZGlzcGxheUxhdGVzdENoYW5nZXM6IHRydWUKICAgIH0sCiAgICAiTW91c2UiOiB7CiAgICAgIHRheG86ICJOQ0JJVGF4b246MTAwOTAiLAogICAgICBpY29uQ2xhc3M6ICJtYXBpY29uLWljb25fbW91c2UiLAogICAgICBkaXNwbGF5TGF0ZXN0Q2hhbmdlczogdHJ1ZSwKICAgICAgZGlzcGxheVdhcm5pbmc6IHRydWUKICAgIH0sCiAgICAiUGlnIjogewogICAgICB0YXhvOiAiTkNCSVRheG9uOjk4MjMiLAogICAgICBpY29uQ2xhc3M6ICJtYXBpY29uLWljb25fcGlnIiwKICAgICAgZGlzcGxheUxhdGVzdENoYW5nZXM6IHRydWUsCiAgICAgIGRpc3BsYXlXYXJuaW5nOiB0cnVlCiAgICB9LAogICAgIkNhdCI6IHsKICAgICAgdGF4bzogIk5DQklUYXhvbjo5Njg1IiwKICAgICAgaWNvbkNsYXNzOiAibWFwaWNvbi1pY29uX2NhdCIsCiAgICAgIGRpc3BsYXlMYXRlc3RDaGFuZ2VzOiB0cnVlLAogICAgICBkaXNwbGF5V2FybmluZzogdHJ1ZQogICAgfQ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W5jdGlvbiBfY2FsbGVlMihzcGFyY0FwaSwgc3BlY2llcykgewogICAgdmFyIHJlc3BvbnNlLCBkYXRhLCBidWNrZXQ7CiAgICByZXR1cm4gX3JlZ2VuZXJhdG9yUnVudGltZSgpLndyYXAoZnVuY3Rpb24gX2NhbGxlZTIkKF9jb250ZXh0MikgewogICAgICB3aGlsZSAoMSkgc3dpdGNoIChfY29udGV4dDIucHJldiA9IF9jb250ZXh0Mi5uZXh0KSB7CiAgICAgICAgY2FzZSAwOgogICAgICAgICAgX2NvbnRleHQyLm5leHQgPSAyOwogICAgICAgICAgcmV0dXJuIGZldGNoKCIiLmNvbmNhdChzcGFyY0FwaSwgImdldF9ib2R5X3NjYWZmb2xkX2luZm8vIikuY29uY2F0KHNwZWNpZXMpKTsKICAgICAgICBjYXNlIDI6CiAgICAgICAgICByZXNwb25zZSA9IF9jb250ZXh0Mi5zZW50OwogICAgICAgICAgaWYgKCFyZXNwb25zZS5vaykgewogICAgICAgICAgICBfY29udGV4dDIubmV4dCA9IDExOwogICAgICAgICAgICBicmVhazsKICAgICAgICAgIH0KICAgICAgICAgIF9jb250ZXh0Mi5uZXh0ID0gNjsKICAgICAgICAgIHJldHVybiByZXNwb25zZS5qc29uKCk7CiAgICAgICAgY2FzZSA2OgogICAgICAgICAgZGF0YSA9IF9jb250ZXh0Mi5zZW50OwogICAgICAgICAgLy9Db25zdHJ1Y3QgdGhlIHVybCBlbmRwb2ludCBmb3IgZG93bmxvYWRpbmcgdGhlIHNjYWZmb2xkCiAgICAgICAgICBidWNrZXQgPSBleHRyYWN0UzNCdWNrZXROYW1lKGRhdGEuczN1cmkpOwogICAgICAgICAgcmV0dXJuIF9jb250ZXh0Mi5hYnJ1cHQoInJldHVybiIsICIiLmNvbmNhdChzcGFyY0FwaSwgInMzLXJlc291cmNlLyIpLmNvbmNhdChkYXRhLmlkLCAiLyIpLmNvbmNhdChkYXRhLnZlcnNpb24sICIvZmlsZXMvIikuY29uY2F0KGRhdGEucGF0aCwgIj9zM0J1Y2tldE5hbWU9IikuY29uY2F0KGJ1Y2tldCkpOwogICAgICAgIGNhc2UgMTE6CiAgICAgICAgICBpZiAoIShzcGVjaWVzID09PSAicmF0IikpIHsKICAgICAgICAgICAgX2NvbnRleHQyLm5leHQgPSAxNTsKICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICB9CiAgICAgICAgICByZXR1cm4gX2NvbnRleHQyLmFicnVwdCgicmV0dXJuIiwgImh0dHBzOi8vbWFwY29yZS1idWNrZXQxLnMzLnVzLXdlc3QtMi5hbWF6b25hd3MuY29tL1dob2xlQm9keS8zMS1NYXktMjAyMS9yYXRCb2R5L3JhdEJvZHlfc3luY21hcF9tZXRhZGF0YS5qc29uIik7CiAgICAgICAgY2FzZSAxNToKICAgICAgICAgIGlmICghKHNwZWNpZXMgPT09ICJodW1hbiIpKSB7CiAgICAgICAgICAgIF9jb250ZXh0Mi5uZXh0ID0gMTc7CiAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgfQogICAgICAgICAgcmV0dXJuIF9jb250ZXh0Mi5hYnJ1cHQoInJldHVybiIsICJodHRwczovL21hcGNvcmUtYnVja2V0MS5zMy51cy13ZXN0LTIuYW1hem9uYXdzLmNvbS9XaG9sZUJvZHkvMjctNC0yMy1odW1hbi9odW1hbl9ib2R5X21ldGFkYXRhLmpzb24iKTsKICAgICAgICBjYXNlIDE3OgogICAgICAgIGNhc2UgImVuZCI6CiAgICAgICAgICByZXR1cm4gX2NvbnRleHQyLnN0b3AoKTsKICAgICAgfQogICAgfSwgX2NhbGxlZTIpOwogIH0pKTsKICByZXR1cm4gZnVuY3Rpb24gZ2V0Qm9keVNjYWZmb2xkKF94MywgX3g0KSB7CiAgICByZXR1cm4gX3JlZjIuYXBwbHkodGhpcywgYXJndW1lbnRzKTsKICB9Owp9KCk7CmV4cG9ydHMuYXZhaWxhYmxlU3BlY2llcyA9IGF2YWlsYWJsZVNwZWNpZXM7CmV4cG9ydHMuY2FwaXRhbGlzZSA9IGNhcGl0YWxpc2U7CmV4cG9ydHMuZmluZFNwZWNpZXNLZXkgPSBmaW5kU3BlY2llc0tleTsKZXhwb3J0cy5pbml0aWFsU3RhdGUgPSBpbml0aWFsU3RhdGU7CmV4cG9ydHMuaW5pdGlhbERlZmF1bHRTdGF0ZSA9IGluaXRpYWxEZWZhdWx0U3RhdGU7CmV4cG9ydHMuZ2V0Qm9keVNjYWZmb2xkID0gZ2V0Qm9keVNjYWZmb2xkOw=="},{"version":3,"names":["initialDefaultState","mainTabName","zIndex","showDialogIcons","activeDockedId","currentCount","entries","resource","type","mode","id","state","undefined","label","discoverId","sideBarVisibility","search","startUp","initialState","_ref","_asyncToGenerator","_regeneratorRuntime","mark","_callee","sparcApi","url","wrap","_callee$","_context","prev","next","getBodyScaffold","sent","abrupt","stop","_x","_x2","apply","arguments","capitalise","term","charAt","toUpperCase","slice","availableSpecies","taxo","biologicalSex","iconClass","displayLatestChanges","displayWarning","findSpeciesKey","condition","list","key","extractS3BucketName","uri","substring","split","_ref2","_callee2","species","response","data","bucket","_callee2$","_context2","fetch","concat","ok","json","s3uri","version","path","_x3","_x4","exports"],"sources":["/home/cmiss/Jenkins/workspace/mapintegratedvuer/src/components/scripts/utilities.js"],"sourcesContent":["const initialDefaultState = () => {\n return {\n mainTabName: \"Flatmap\",\n zIndex: 1,\n showDialogIcons: false,\n activeDockedId: 1,\n currentCount: 1,\n entries: [\n {\n resource: \"Rat\",\n type: \"MultiFlatmap\",\n zIndex: 1,\n mode: \"main\",\n id: 1,\n state: undefined,\n label: \"\",\n discoverId: undefined\n }\n ],\n sideBarVisibility: true,\n search: '',\n startUp: true\n };\n}\n\n/*\n * Initial state for the split flow\n */\nconst initialState = async (type, sparcApi) => {\n const state = initialDefaultState();\n if (type === \"FC\") {\n state.mainTabName = \"Flatmap\";\n state.entries[0].resource = \"FunctionalConnectivity\";\n state.entries[0].type = \"Flatmap\";\n state.entries[0].label = \"Functional\";\n } else if (type === \"WholeBody\") {\n const url = await getBodyScaffold(sparcApi, \"human\");\n state.mainTabName = \"Scaffold\";\n state.entries[0].resource = url;\n state.entries[0].type = \"Scaffold\";\n state.entries[0].label = \"Human\";\n }\n\n return state;\n}\n\nconst capitalise = term => {\n if (term)\n return term.charAt(0).toUpperCase() + term.slice(1);\n return term;\n};\n\n/*\n * Provide a list of available species for the flatmap\n */\nconst availableSpecies = () => {\n return {\n \"Human Female\": { taxo: \"NCBITaxon:9606\", biologicalSex: \"PATO:0000383\", iconClass: \"mapicon-icon_human\", displayLatestChanges: true, displayWarning: true },\n \"Human Male\": { taxo: \"NCBITaxon:9606\", biologicalSex: \"PATO:0000384\", iconClass: \"mapicon-icon_human\", displayLatestChanges: true, displayWarning: true },\n \"Rat\": { taxo: \"NCBITaxon:10114\", iconClass: \"mapicon-icon_rat\", displayLatestChanges: true },\n \"Mouse\": { taxo: \"NCBITaxon:10090\", iconClass: \"mapicon-icon_mouse\", displayLatestChanges: true, displayWarning: true },\n \"Pig\": { taxo: \"NCBITaxon:9823\", iconClass: \"mapicon-icon_pig\", displayLatestChanges: true, displayWarning: true },\n \"Cat\": { taxo: \"NCBITaxon:9685\", iconClass: \"mapicon-icon_cat\", displayLatestChanges: true, displayWarning: true },\n }\n}\n\n/*\n * Look for the key in availableSpecies with the provided condition\n */\nconst findSpeciesKey = condition => {\n if (condition) {\n const list = availableSpecies();\n for (let key in list) {\n if (condition.taxo === list[key].taxo) {\n if (condition.biologicalSex && list[key].biologicalSex) {\n if (condition.biologicalSex === list[key].biologicalSex)\n return key;\n } else {\n return key;\n }\n }\n }\n }\n return \"\";\n}\n\nconst extractS3BucketName = uri => {\n if (uri) {\n const substring = uri.split(\"//\")[1]\n if (substring) {\n return substring.split(\"/\")[0]\n }\n }\n return undefined\n}\n\nconst getBodyScaffold = async (sparcApi, species) => {\n //Get body scaffold information\n const response = await fetch(`${sparcApi}get_body_scaffold_info/${species}`);\n if (response.ok) {\n const data = await response.json();\n //Construct the url endpoint for downloading the scaffold\n const bucket = extractS3BucketName(data.s3uri);\n return `${sparcApi}s3-resource/${data.id}/${data.version}/files/${data.path}?s3BucketName=${bucket}`;\n } else {\n //Use default url if data is not found for any reason\n if (species === \"rat\") {\n return \"https://mapcore-bucket1.s3.us-west-2.amazonaws.com/WholeBody/31-May-2021/ratBody/ratBody_syncmap_metadata.json\";\n } else if (species === \"human\") {\n return \"https://mapcore-bucket1.s3.us-west-2.amazonaws.com/WholeBody/27-4-23-human/human_body_metadata.json\";\n }\n }\n}\n\nexports.availableSpecies = availableSpecies;\nexports.capitalise = capitalise;\nexports.findSpeciesKey = findSpeciesKey;\nexports.initialState = initialState;\nexports.initialDefaultState = initialDefaultState;\nexports.getBodyScaffold = getBodyScaffold;"],"mappings":";;;;;;;;AAAA,IAAMA,mBAAmB,GAAG,SAAtBA,mBAAmBA,CAAA,EAAS;EAChC,OAAO;IACLC,WAAW,EAAE,SAAS;IACtBC,MAAM,EAAE,CAAC;IACTC,eAAe,EAAE,KAAK;IACtBC,cAAc,EAAE,CAAC;IACjBC,YAAY,EAAE,CAAC;IACfC,OAAO,EAAE,CACP;MACEC,QAAQ,EAAE,KAAK;MACfC,IAAI,EAAE,cAAc;MACpBN,MAAM,EAAE,CAAC;MACTO,IAAI,EAAE,MAAM;MACZC,EAAE,EAAE,CAAC;MACLC,KAAK,EAAEC,SAAS;MAChBC,KAAK,EAAE,EAAE;MACTC,UAAU,EAAEF;IACd,CAAC,CACF;IACDG,iBAAiB,EAAE,IAAI;IACvBC,MAAM,EAAE,EAAE;IACVC,OAAO,EAAE;EACX,CAAC;AACH,CAAC;;AAED;AACA;AACA;AACA,IAAMC,YAAY;EAAA,IAAAC,IAAA,GAAAC,iBAAA,eAAAC,mBAAA,GAAAC,IAAA,CAAG,SAAAC,QAAOf,IAAI,EAAEgB,QAAQ;IAAA,IAAAb,KAAA,EAAAc,GAAA;IAAA,OAAAJ,mBAAA,GAAAK,IAAA,UAAAC,SAAAC,QAAA;MAAA,kBAAAA,QAAA,CAAAC,IAAA,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