Page MenuHomeSoftware Heritage

save.54b7e912b123a09672d4.js.map
No OneTemporary

save.54b7e912b123a09672d4.js.map

{
"version": 3,
"file": "js/save.54b7e912b123a09672d4.js",
"mappings": ";CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,IACQ,mBAAXG,QAAyBA,OAAOC,IAC9CD,OAAO,GAAIH,GACe,iBAAZC,QACdA,QAAa,IAAID,KAEjBD,EAAU,IAAIA,EAAU,KAAK,GAAIA,EAAU,IAAQ,KAAIC,KARzD,CASGK,MAAM,WACT,iECVAH,EAAOD,QAAU,EAAjB,gFCcaK,GAAgBC,WAAAA,IAAY,ooCCHlC,SAASC,EAAiBC,GAC/B,IAAKA,EAASC,GACZ,MAAMD,EAER,OAAOA,EA2BF,SAASF,EAAYI,GAC1B,MAAUC,WAAaD,EAGlB,SAASE,EAASC,EAAKC,EAAcC,GAE1C,YAFuD,IAA3BD,IAAAA,EAAU,SAAiB,IAAbC,IAAAA,EAAO,MACjDD,EAAQ,eAAiBE,EAAAA,EAAAA,IAAY,aAC9BC,MAAMJ,EAAK,CAChBK,YAAa,UACbJ,QAASA,EACTK,OAAQ,OACRJ,KAAMA,IAIH,SAASK,EAAaP,EAAKQ,QAAkB,IAAlBA,IAAAA,EAAa,KAE7C,YAAqEC,IAD5C,CAAC,QAAS,SAAU,QACxBC,MAAK,SAAAC,GAAQ,OAAIA,IAAaX,EAAIW,gBAGlDX,EAAIY,SAASC,WAAWL,IAGlB,IAAIM,OAAO,2CACZC,KAAKf,EAAIY,SAASI,MAAMR,EAAWS,UAoBxC,SAASC,EAAUC,EAAMC,EAASC,QAAkB,IAAlBA,IAAAA,GAAW,GAClD,IAAIC,EAAc,GACdC,EAAe,GAQnB,OAPIF,IACFC,EAAW,iJAIXC,EAAe,qBAEV,2BAA2BJ,EAAlC,IAA0CI,EAA1C,kBAAwEH,EAAUE,EAAlF,kBAsBaE,EAA4B,0EAA3C,WAA2CC,GAA3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MAAMgK,QACRwH,GACVlI,EAAEtJ,MAAM0I,KAAK,YAAY,MAI/BmF,OAAO6D,SAAS,EAAG",
"sources": [
"webpack://swh/webpack/universalModuleDefinition",
"webpack://swh/./node_modules/@babel/runtime/regenerator/index.js",
"webpack://swh/./assets/src/utils/constants.js",
"webpack://swh/./assets/src/utils/functions.js",
"webpack://swh/./assets/src/bundles/save/artifact-form-row.ejs",
"webpack://swh/./assets/src/utils/requests-filter-checkbox.ejs",
"webpack://swh/./node_modules/regenerator-runtime/runtime.js",
"webpack://swh/./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js",
"webpack://swh/./node_modules/@babel/runtime/helpers/esm/inherits.js",
"webpack://swh/./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js",
"webpack://swh/./node_modules/js-cookie/dist/js.cookie.mjs",
"webpack://swh/webpack/bootstrap",
"webpack://swh/webpack/runtime/compat get default export",
"webpack://swh/webpack/runtime/define property getters",
"webpack://swh/webpack/runtime/hasOwnProperty shorthand",
"webpack://swh/webpack/runtime/make namespace object",
"webpack://swh/./assets/src/bundles/save/index.js"
],
"sourcesContent": [
"(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"swh\"] = factory();\n\telse\n\t\troot[\"swh\"] = root[\"swh\"] || {}, root[\"swh\"][\"save\"] = factory();\n})(self, function() {\nreturn ",
"module.exports = require(\"regenerator-runtime\");\n",
"/**\n * Copyright (C) 2019 The Software Heritage developers\n * See the AUTHORS file at the top-level directory of this distribution\n * License: GNU Affero General Public License version 3, or any later version\n * See top-level LICENSE file for more information\n */\n\nimport {staticAsset} from 'utils/functions';\n\n// Constants defining Bootstrap Breakpoints\nexport const BREAKPOINT_SM = 768;\nexport const BREAKPOINT_MD = 992;\nexport const BREAKPOINT_LG = 1200;\n\nexport const swhSpinnerSrc = staticAsset('img/swh-spinner.gif');\n",
"/**\n * Copyright (C) 2018-2020 The Software Heritage developers\n * See the AUTHORS file at the top-level directory of this distribution\n * License: GNU Affero General Public License version 3, or any later version\n * See top-level LICENSE file for more information\n */\n\n// utility functions\n\nimport Cookies from 'js-cookie';\n\nexport function handleFetchError(response) {\n if (!response.ok) {\n throw response;\n }\n return response;\n}\n\nexport function handleFetchErrors(responses) {\n for (let i = 0; i < responses.length; ++i) {\n if (!responses[i].ok) {\n throw responses[i];\n }\n }\n return responses;\n}\n\nexport function errorMessageFromResponse(errorData, defaultMessage) {\n let errorMessage = '';\n try {\n const reason = JSON.parse(errorData['reason']);\n Object.entries(reason).forEach((keys, _) => {\n const key = keys[0];\n const message = keys[1][0]; // take only the first issue\n errorMessage += `\\n${key}: ${message}`;\n });\n } catch (_) {\n errorMessage = errorData['reason']; // can't parse it, leave it raw\n }\n return errorMessage ? `Error: ${errorMessage}` : defaultMessage;\n}\n\nexport function staticAsset(asset) {\n return `${__STATIC__}${asset}`;\n}\n\nexport function csrfPost(url, headers = {}, body = null) {\n headers['X-CSRFToken'] = Cookies.get('csrftoken');\n return fetch(url, {\n credentials: 'include',\n headers: headers,\n method: 'POST',\n body: body\n });\n}\n\nexport function isGitRepoUrl(url, pathPrefix = '/') {\n const allowedProtocols = ['http:', 'https:', 'git:'];\n if (allowedProtocols.find(protocol => protocol === url.protocol) === undefined) {\n return false;\n }\n if (!url.pathname.startsWith(pathPrefix)) {\n return false;\n }\n const re = new RegExp('[\\\\w\\\\.-]+\\\\/?(?!=.git)(?:\\\\.git\\\\/?)?$');\n return re.test(url.pathname.slice(pathPrefix.length));\n};\n\nexport function removeUrlFragment() {\n history.replaceState('', document.title, window.location.pathname + window.location.search);\n}\n\nexport function selectText(startNode, endNode) {\n const selection = window.getSelection();\n selection.removeAllRanges();\n const range = document.createRange();\n range.setStart(startNode, 0);\n if (endNode.nodeName !== '#text') {\n range.setEnd(endNode, endNode.childNodes.length);\n } else {\n range.setEnd(endNode, endNode.textContent.length);\n }\n selection.addRange(range);\n}\n\nexport function htmlAlert(type, message, closable = false) {\n let closeButton = '';\n let extraClasses = '';\n if (closable) {\n closeButton =\n `<button type=\"button\" class=\"close\" data-dismiss=\"alert\" aria-label=\"Close\">\n <span aria-hidden=\"true\">&times;</span>\n </button>`;\n extraClasses = 'alert-dismissible';\n }\n return `<div class=\"alert alert-${type} ${extraClasses}\" role=\"alert\">${message}${closeButton}</div>`;\n}\n\nexport function isValidURL(string) {\n try {\n new URL(string);\n } catch (_) {\n return false;\n }\n return true;\n}\n\nexport async function isArchivedOrigin(originPath) {\n if (!isValidURL(originPath)) {\n // Not a valid URL, return immediately\n return false;\n } else {\n const response = await fetch(Urls.api_1_origin(originPath));\n return response.ok && response.status === 200; // Success response represents an archived origin\n }\n}\n\nasync function getCanonicalGithubOriginURL(ownerRepo) {\n const ghApiResponse = await fetch(`https://api.github.com/repos/${ownerRepo}`);\n if (ghApiResponse.ok && ghApiResponse.status === 200) {\n const ghApiResponseData = await ghApiResponse.json();\n return ghApiResponseData.html_url;\n }\n}\n\nexport async function getCanonicalOriginURL(originUrl) {\n let originUrlLower = originUrl.toLowerCase();\n // github.com URL processing\n const ghUrlRegex = /^http[s]*:\\/\\/github.com\\//;\n if (originUrlLower.match(ghUrlRegex)) {\n // remove trailing .git\n if (originUrlLower.endsWith('.git')) {\n originUrlLower = originUrlLower.slice(0, -4);\n }\n // remove trailing slash\n if (originUrlLower.endsWith('/')) {\n originUrlLower = originUrlLower.slice(0, -1);\n }\n // extract {owner}/{repo}\n const ownerRepo = originUrlLower.replace(ghUrlRegex, '');\n // fetch canonical URL from github Web API\n const url = getCanonicalGithubOriginURL(ownerRepo);\n if (url) {\n return url;\n }\n }\n\n const ghpagesUrlRegex = /^http[s]*:\\/\\/(?<owner>[^/]+).github.io\\/(?<repo>[^/]+)\\/?.*/;\n const parsedUrl = originUrlLower.match(ghpagesUrlRegex);\n if (parsedUrl) {\n const ownerRepo = `${parsedUrl.groups.owner}/${parsedUrl.groups.repo}`;\n // fetch canonical URL from github Web API\n const url = getCanonicalGithubOriginURL(ownerRepo);\n if (url) {\n return url;\n }\n }\n\n return originUrl;\n}\n\nexport function getHumanReadableDate(data) {\n // Display iso format date string into a human readable date\n // This is expected to be used by date field in datatable listing views\n // Example: 3/24/2022, 10:31:08 AM\n const date = new Date(data);\n return date.toLocaleString();\n}\n",
"module.exports = function anonymous(locals, escapeFn, include, rethrow\n) {\nescapeFn = escapeFn || function (markup) {\n return markup == undefined\n ? ''\n : String(markup)\n .replace(_MATCH_HTML, encode_char);\n};\nvar _ENCODE_HTML_RULES = {\n \"&\": \"&amp;\"\n , \"<\": \"&lt;\"\n , \">\": \"&gt;\"\n , '\"': \"&#34;\"\n , \"'\": \"&#39;\"\n }\n , _MATCH_HTML = /[&<>'\"]/g;\nfunction encode_char(c) {\n return _ENCODE_HTML_RULES[c] || c;\n};\n;\n var __output = \"\";\n function __append(s) { if (s !== undefined && s !== null) __output += s }\n with (locals || {}) {\n ; __append(\"\\n\\n<div class=\\\"swh-save-origin-archives-form swh-save-origin-artifact-form form-row\\\">\\n <div class=\\\"form-group col-md-7\\\">\\n <label for=\\\"swh-input-artifact-url-\")\n ; __append(escapeFn( formId ))\n ; __append(\"\\\">Artifact url</label>\\n <input type=\\\"text\\\" class=\\\"form-control\\\" id=\\\"swh-input-artifact-url-\")\n ; __append(escapeFn( formId ))\n ; __append(\"\\\" required>\\n <div class=\\\"invalid-feedback\\\">The artifact url is mandatory</div>\\n </div>\\n <div class=\\\"form-group col-md-2\\\">\\n <label for=\\\"swh-input-artifact-version-\")\n ; __append(escapeFn( formId ))\n ; __append(\"\\\">Artifact version</label>\\n <input type=\\\"text\\\" class=\\\"form-control\\\" id=\\\"swh-input-artifact-version-\")\n ; __append(escapeFn( formId ))\n ; __append(\"\\\" required>\\n <div class=\\\"invalid-feedback\\\">The artifact version is mandatory</div>\\n </div>\\n <div class=\\\"col-md-2\\\">\\n \")\n ; if (deletableRow) { \n ; __append(\"\\n <label for=\\\"swh-remove-archive-artifact-\")\n ; __append(escapeFn( formId ))\n ; __append(\"\\\">&nbsp;</label>\\n <button id=\\\"swh-remove-archive-artifact-\")\n ; __append(escapeFn( formId ))\n ; __append(\"\\\" type=\\\"button\\\" class=\\\"btn btn-default btn-block\\\" onclick=\\\"swh.save.deleteArtifactFormRow(event)\\\">\\n <i class=\\\"mdi mdi-file-remove mdi-fw\\\" aria-hidden=\\\"true\\\"></i>Remove artifact\\n </button>\\n \")\n ; } else { \n ; __append(\"\\n <label for=\\\"swh-add-archive-artifact\\\">&nbsp;</label>\\n <button id=\\\"swh-add-archive-artifact\\\" type=\\\"button\\\" class=\\\"btn btn-default btn-block\\\" onclick=\\\"swh.save.addArtifactFormRow()\\\">\\n <i class=\\\"mdi mdi-file-plus mdi-fw\\\" aria-hidden=\\\"true\\\"></i>Add artifact\\n </button>\\n \")\n ; } \n ; __append(\"\\n </div>\\n</div>\")\n }\n return __output;\n\n}",
"module.exports = function anonymous(locals, escapeFn, include, rethrow\n) {\nescapeFn = escapeFn || function (markup) {\n return markup == undefined\n ? ''\n : String(markup)\n .replace(_MATCH_HTML, encode_char);\n};\nvar _ENCODE_HTML_RULES = {\n \"&\": \"&amp;\"\n , \"<\": \"&lt;\"\n , \">\": \"&gt;\"\n , '\"': \"&#34;\"\n , \"'\": \"&#39;\"\n }\n , _MATCH_HTML = /[&<>'\"]/g;\nfunction encode_char(c) {\n return _ENCODE_HTML_RULES[c] || c;\n};\n;\n var __output = \"\";\n function __append(s) { if (s !== undefined && s !== null) __output += s }\n with (locals || {}) {\n ; __append(\"\\n<div class=\\\"custom-control custom-checkbox swhid-option\\\">\\n <input class=\\\"custom-control-input\\\" value=\\\"option-user-requests-filter\\\" type=\\\"checkbox\\\"\\n \")\n ; if (checked) { \n ; __append(\"\\n checked=\\\"checked\\\"\\n \")\n ; } \n ; __append(\"\\n id=\\\"\")\n ; __append(escapeFn( inputId ))\n ; __append(\"\\\">\\n <label class=\\\"custom-control-label font-weight-normal\\\" for=\\\"\")\n ; __append(escapeFn( inputId ))\n ; __append(\"\\\">\\n show only your own requests\\n </label>\\n</div>\\n\")\n }\n return __output;\n\n}",
"/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nvar runtime = (function (exports) {\n \"use strict\";\n\n var Op = Object.prototype;\n var hasOwn = Op.hasOwnProperty;\n var undefined; // More compressible than void 0.\n var $Symbol = typeof Symbol === \"function\" ? Symbol : {};\n var iteratorSymbol = $Symbol.iterator || \"@@iterator\";\n var asyncIteratorSymbol = $Symbol.asyncIterator || \"@@asyncIterator\";\n var toStringTagSymbol = $Symbol.toStringTag || \"@@toStringTag\";\n\n function define(obj, key, value) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n return obj[key];\n }\n try {\n // IE 8 has a broken Object.defineProperty that only works on DOM objects.\n define({}, \"\");\n } catch (err) {\n define = function(obj, key, value) {\n return obj[key] = value;\n };\n }\n\n function wrap(innerFn, outerFn, self, tryLocsList) {\n // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.\n var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;\n var generator = Object.create(protoGenerator.prototype);\n var context = new Context(tryLocsList || []);\n\n // The ._invoke method unifies the implementations of the .next,\n // .throw, and .return methods.\n generator._invoke = makeInvokeMethod(innerFn, self, context);\n\n return generator;\n }\n exports.wrap = wrap;\n\n // Try/catch helper to minimize deoptimizations. Returns a completion\n // record like context.tryEntries[i].completion. This interface could\n // have been (and was previously) designed to take a closure to be\n // invoked without arguments, but in all the cases we care about we\n // already have an existing method we want to call, so there's no need\n // to create a new function object. We can even get away with assuming\n // the method takes exactly one argument, since that happens to be true\n // in every case, so we don't have to touch the arguments object. The\n // only additional allocation required is the completion record, which\n // has a stable shape and so hopefully should be cheap to allocate.\n function tryCatch(fn, obj, arg) {\n try {\n return { type: \"normal\", arg: fn.call(obj, arg) };\n } catch (err) {\n return { type: \"throw\", arg: err };\n }\n }\n\n var GenStateSuspendedStart = \"suspendedStart\";\n var GenStateSuspendedYield = \"suspendedYield\";\n var GenStateExecuting = \"executing\";\n var GenStateCompleted = \"completed\";\n\n // Returning this object from the innerFn has the same effect as\n // breaking out of the dispatch switch statement.\n var ContinueSentinel = {};\n\n // Dummy constructor functions that we use as the .constructor and\n // .constructor.prototype properties for functions that return Generator\n // objects. For full spec compliance, you may wish to configure your\n // minifier not to mangle the names of these two functions.\n function Generator() {}\n function GeneratorFunction() {}\n function GeneratorFunctionPrototype() {}\n\n // This is a polyfill for %IteratorPrototype% for environments that\n // don't natively support it.\n var IteratorPrototype = {};\n IteratorPrototype[iteratorSymbol] = function () {\n return this;\n };\n\n var getProto = Object.getPrototypeOf;\n var NativeIteratorPrototype = getProto && getProto(getProto(values([])));\n if (NativeIteratorPrototype &&\n NativeIteratorPrototype !== Op &&\n hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {\n // This environment has a native %IteratorPrototype%; use it instead\n // of the polyfill.\n IteratorPrototype = NativeIteratorPrototype;\n }\n\n var Gp = GeneratorFunctionPrototype.prototype =\n Generator.prototype = Object.create(IteratorPrototype);\n GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;\n GeneratorFunctionPrototype.constructor = GeneratorFunction;\n GeneratorFunction.displayName = define(\n GeneratorFunctionPrototype,\n toStringTagSymbol,\n \"GeneratorFunction\"\n );\n\n // Helper for defining the .next, .throw, and .return methods of the\n // Iterator interface in terms of a single ._invoke method.\n function defineIteratorMethods(prototype) {\n [\"next\", \"throw\", \"return\"].forEach(function(method) {\n define(prototype, method, function(arg) {\n return this._invoke(method, arg);\n });\n });\n }\n\n exports.isGeneratorFunction = function(genFun) {\n var ctor = typeof genFun === \"function\" && genFun.constructor;\n return ctor\n ? ctor === GeneratorFunction ||\n // For the native GeneratorFunction constructor, the best we can\n // do is to check its .name property.\n (ctor.displayName || ctor.name) === \"GeneratorFunction\"\n : false;\n };\n\n exports.mark = function(genFun) {\n if (Object.setPrototypeOf) {\n Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);\n } else {\n genFun.__proto__ = GeneratorFunctionPrototype;\n define(genFun, toStringTagSymbol, \"GeneratorFunction\");\n }\n genFun.prototype = Object.create(Gp);\n return genFun;\n };\n\n // Within the body of any async function, `await x` is transformed to\n // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test\n // `hasOwn.call(value, \"__await\")` to determine if the yielded value is\n // meant to be awaited.\n exports.awrap = function(arg) {\n return { __await: arg };\n };\n\n function AsyncIterator(generator, PromiseImpl) {\n function invoke(method, arg, resolve, reject) {\n var record = tryCatch(generator[method], generator, arg);\n if (record.type === \"throw\") {\n reject(record.arg);\n } else {\n var result = record.arg;\n var value = result.value;\n if (value &&\n typeof value === \"object\" &&\n hasOwn.call(value, \"__await\")) {\n return PromiseImpl.resolve(value.__await).then(function(value) {\n invoke(\"next\", value, resolve, reject);\n }, function(err) {\n invoke(\"throw\", err, resolve, reject);\n });\n }\n\n return PromiseImpl.resolve(value).then(function(unwrapped) {\n // When a yielded Promise is resolved, its final value becomes\n // the .value of the Promise<{value,done}> result for the\n // current iteration.\n result.value = unwrapped;\n resolve(result);\n }, function(error) {\n // If a rejected Promise was yielded, throw the rejection back\n // into the async generator function so it can be handled there.\n return invoke(\"throw\", error, resolve, reject);\n });\n }\n }\n\n var previousPromise;\n\n function enqueue(method, arg) {\n function callInvokeWithMethodAndArg() {\n return new PromiseImpl(function(resolve, reject) {\n invoke(method, arg, resolve, reject);\n });\n }\n\n return previousPromise =\n // If enqueue has been called before, then we want to wait until\n // all previous Promises have been resolved before calling invoke,\n // so that results are always delivered in the correct order. If\n // enqueue has not been called before, then it is important to\n // call invoke immediately, without waiting on a callback to fire,\n // so that the async generator function has the opportunity to do\n // any necessary setup in a predictable way. This predictability\n // is why the Promise constructor synchronously invokes its\n // executor callback, and why async functions synchronously\n // execute code before the first await. Since we implement simple\n // async functions in terms of async generators, it is especially\n // important to get this right, even though it requires care.\n previousPromise ? previousPromise.then(\n callInvokeWithMethodAndArg,\n // Avoid propagating failures to Promises returned by later\n // invocations of the iterator.\n callInvokeWithMethodAndArg\n ) : callInvokeWithMethodAndArg();\n }\n\n // Define the unified helper method that is used to implement .next,\n // .throw, and .return (see defineIteratorMethods).\n this._invoke = enqueue;\n }\n\n defineIteratorMethods(AsyncIterator.prototype);\n AsyncIterator.prototype[asyncIteratorSymbol] = function () {\n return this;\n };\n exports.AsyncIterator = AsyncIterator;\n\n // Note that simple async functions are implemented on top of\n // AsyncIterator objects; they just return a Promise for the value of\n // the final result produced by the iterator.\n exports.async = function(innerFn, outerFn, self, tryLocsList, PromiseImpl) {\n if (PromiseImpl === void 0) PromiseImpl = Promise;\n\n var iter = new AsyncIterator(\n wrap(innerFn, outerFn, self, tryLocsList),\n PromiseImpl\n );\n\n return exports.isGeneratorFunction(outerFn)\n ? iter // If outerFn is a generator, return the full iterator.\n : iter.next().then(function(result) {\n return result.done ? result.value : iter.next();\n });\n };\n\n function makeInvokeMethod(innerFn, self, context) {\n var state = GenStateSuspendedStart;\n\n return function invoke(method, arg) {\n if (state === GenStateExecuting) {\n throw new Error(\"Generator is already running\");\n }\n\n if (state === GenStateCompleted) {\n if (method === \"throw\") {\n throw arg;\n }\n\n // Be forgiving, per 25.3.3.3.3 of the spec:\n // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume\n return doneResult();\n }\n\n context.method = method;\n context.arg = arg;\n\n while (true) {\n var delegate = context.delegate;\n if (delegate) {\n var delegateResult = maybeInvokeDelegate(delegate, context);\n if (delegateResult) {\n if (delegateResult === ContinueSentinel) continue;\n return delegateResult;\n }\n }\n\n if (context.method === \"next\") {\n // Setting context._sent for legacy support of Babel's\n // function.sent implementation.\n context.sent = context._sent = context.arg;\n\n } else if (context.method === \"throw\") {\n if (state === GenStateSuspendedStart) {\n state = GenStateCompleted;\n throw context.arg;\n }\n\n context.dispatchException(context.arg);\n\n } else if (context.method === \"return\") {\n context.abrupt(\"return\", context.arg);\n }\n\n state = GenStateExecuting;\n\n var record = tryCatch(innerFn, self, context);\n if (record.type === \"normal\") {\n // If an exception is thrown from innerFn, we leave state ===\n // GenStateExecuting and loop back for another invocation.\n state = context.done\n ? GenStateCompleted\n : GenStateSuspendedYield;\n\n if (record.arg === ContinueSentinel) {\n continue;\n }\n\n return {\n value: record.arg,\n done: context.done\n };\n\n } else if (record.type === \"throw\") {\n state = GenStateCompleted;\n // Dispatch the exception by looping back around to the\n // context.dispatchException(context.arg) call above.\n context.method = \"throw\";\n context.arg = record.arg;\n }\n }\n };\n }\n\n // Call delegate.iterator[context.method](context.arg) and handle the\n // result, either by returning a { value, done } result from the\n // delegate iterator, or by modifying context.method and context.arg,\n // setting context.delegate to null, and returning the ContinueSentinel.\n function maybeInvokeDelegate(delegate, context) {\n var method = delegate.iterator[context.method];\n if (method === undefined) {\n // A .throw or .return when the delegate iterator has no .throw\n // method always terminates the yield* loop.\n context.delegate = null;\n\n if (context.method === \"throw\") {\n // Note: [\"return\"] must be used for ES3 parsing compatibility.\n if (delegate.iterator[\"return\"]) {\n // If the delegate iterator has a return method, give it a\n // chance to clean up.\n context.method = \"return\";\n context.arg = undefined;\n maybeInvokeDelegate(delegate, context);\n\n if (context.method === \"throw\") {\n // If maybeInvokeDelegate(context) changed context.method from\n // \"return\" to \"throw\", let that override the TypeError below.\n return ContinueSentinel;\n }\n }\n\n context.method = \"throw\";\n context.arg = new TypeError(\n \"The iterator does not provide a 'throw' method\");\n }\n\n return ContinueSentinel;\n }\n\n var record = tryCatch(method, delegate.iterator, context.arg);\n\n if (record.type === \"throw\") {\n context.method = \"throw\";\n context.arg = record.arg;\n context.delegate = null;\n return ContinueSentinel;\n }\n\n var info = record.arg;\n\n if (! info) {\n context.method = \"throw\";\n context.arg = new TypeError(\"iterator result is not an object\");\n context.delegate = null;\n return ContinueSentinel;\n }\n\n if (info.done) {\n // Assign the result of the finished delegate to the temporary\n // variable specified by delegate.resultName (see delegateYield).\n context[delegate.resultName] = info.value;\n\n // Resume execution at the desired location (see delegateYield).\n context.next = delegate.nextLoc;\n\n // If context.method was \"throw\" but the delegate handled the\n // exception, let the outer generator proceed normally. If\n // context.method was \"next\", forget context.arg since it has been\n // \"consumed\" by the delegate iterator. If context.method was\n // \"return\", allow the original .return call to continue in the\n // outer generator.\n if (context.method !== \"return\") {\n context.method = \"next\";\n context.arg = undefined;\n }\n\n } else {\n // Re-yield the result returned by the delegate method.\n return info;\n }\n\n // The delegate iterator is finished, so forget it and continue with\n // the outer generator.\n context.delegate = null;\n return ContinueSentinel;\n }\n\n // Define Generator.prototype.{next,throw,return} in terms of the\n // unified ._invoke helper method.\n defineIteratorMethods(Gp);\n\n define(Gp, toStringTagSymbol, \"Generator\");\n\n // A Generator should always return itself as the iterator object when the\n // @@iterator function is called on it. Some browsers' implementations of the\n // iterator prototype chain incorrectly implement this, causing the Generator\n // object to not be returned from this call. This ensures that doesn't happen.\n // See https://github.com/facebook/regenerator/issues/274 for more details.\n Gp[iteratorSymbol] = function() {\n return this;\n };\n\n Gp.toString = function() {\n return \"[object Generator]\";\n };\n\n function pushTryEntry(locs) {\n var entry = { tryLoc: locs[0] };\n\n if (1 in locs) {\n entry.catchLoc = locs[1];\n }\n\n if (2 in locs) {\n entry.finallyLoc = locs[2];\n entry.afterLoc = locs[3];\n }\n\n this.tryEntries.push(entry);\n }\n\n function resetTryEntry(entry) {\n var record = entry.completion || {};\n record.type = \"normal\";\n delete record.arg;\n entry.completion = record;\n }\n\n function Context(tryLocsList) {\n // The root entry object (effectively a try statement without a catch\n // or a finally block) gives us a place to store values thrown from\n // locations where there is no enclosing try statement.\n this.tryEntries = [{ tryLoc: \"root\" }];\n tryLocsList.forEach(pushTryEntry, this);\n this.reset(true);\n }\n\n exports.keys = function(object) {\n var keys = [];\n for (var key in object) {\n keys.push(key);\n }\n keys.reverse();\n\n // Rather than returning an object with a next method, we keep\n // things simple and return the next function itself.\n return function next() {\n while (keys.length) {\n var key = keys.pop();\n if (key in object) {\n next.value = key;\n next.done = false;\n return next;\n }\n }\n\n // To avoid creating an additional object, we just hang the .value\n // and .done properties off the next function object itself. This\n // also ensures that the minifier will not anonymize the function.\n next.done = true;\n return next;\n };\n };\n\n function values(iterable) {\n if (iterable) {\n var iteratorMethod = iterable[iteratorSymbol];\n if (iteratorMethod) {\n return iteratorMethod.call(iterable);\n }\n\n if (typeof iterable.next === \"function\") {\n return iterable;\n }\n\n if (!isNaN(iterable.length)) {\n var i = -1, next = function next() {\n while (++i < iterable.length) {\n if (hasOwn.call(iterable, i)) {\n next.value = iterable[i];\n next.done = false;\n return next;\n }\n }\n\n next.value = undefined;\n next.done = true;\n\n return next;\n };\n\n return next.next = next;\n }\n }\n\n // Return an iterator with no values.\n return { next: doneResult };\n }\n exports.values = values;\n\n function doneResult() {\n return { value: undefined, done: true };\n }\n\n Context.prototype = {\n constructor: Context,\n\n reset: function(skipTempReset) {\n this.prev = 0;\n this.next = 0;\n // Resetting context._sent for legacy support of Babel's\n // function.sent implementation.\n this.sent = this._sent = undefined;\n this.done = false;\n this.delegate = null;\n\n this.method = \"next\";\n this.arg = undefined;\n\n this.tryEntries.forEach(resetTryEntry);\n\n if (!skipTempReset) {\n for (var name in this) {\n // Not sure about the optimal order of these conditions:\n if (name.charAt(0) === \"t\" &&\n hasOwn.call(this, name) &&\n !isNaN(+name.slice(1))) {\n this[name] = undefined;\n }\n }\n }\n },\n\n stop: function() {\n this.done = true;\n\n var rootEntry = this.tryEntries[0];\n var rootRecord = rootEntry.completion;\n if (rootRecord.type === \"throw\") {\n throw rootRecord.arg;\n }\n\n return this.rval;\n },\n\n dispatchException: function(exception) {\n if (this.done) {\n throw exception;\n }\n\n var context = this;\n function handle(loc, caught) {\n record.type = \"throw\";\n record.arg = exception;\n context.next = loc;\n\n if (caught) {\n // If the dispatched exception was caught by a catch block,\n // then let that catch block handle the exception normally.\n context.method = \"next\";\n context.arg = undefined;\n }\n\n return !! caught;\n }\n\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n var record = entry.completion;\n\n if (entry.tryLoc === \"root\") {\n // Exception thrown outside of any try block that could handle\n // it, so set the completion value of the entire function to\n // throw the exception.\n return handle(\"end\");\n }\n\n if (entry.tryLoc <= this.prev) {\n var hasCatch = hasOwn.call(entry, \"catchLoc\");\n var hasFinally = hasOwn.call(entry, \"finallyLoc\");\n\n if (hasCatch && hasFinally) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n } else if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n\n } else if (hasCatch) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n }\n\n } else if (hasFinally) {\n if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n\n } else {\n throw new Error(\"try statement without catch or finally\");\n }\n }\n }\n },\n\n abrupt: function(type, arg) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc <= this.prev &&\n hasOwn.call(entry, \"finallyLoc\") &&\n this.prev < entry.finallyLoc) {\n var finallyEntry = entry;\n break;\n }\n }\n\n if (finallyEntry &&\n (type === \"break\" ||\n type === \"continue\") &&\n finallyEntry.tryLoc <= arg &&\n arg <= finallyEntry.finallyLoc) {\n // Ignore the finally entry if control is not jumping to a\n // location outside the try/catch block.\n finallyEntry = null;\n }\n\n var record = finallyEntry ? finallyEntry.completion : {};\n record.type = type;\n record.arg = arg;\n\n if (finallyEntry) {\n this.method = \"next\";\n this.next = finallyEntry.finallyLoc;\n return ContinueSentinel;\n }\n\n return this.complete(record);\n },\n\n complete: function(record, afterLoc) {\n if (record.type === \"throw\") {\n throw record.arg;\n }\n\n if (record.type === \"break\" ||\n record.type === \"continue\") {\n this.next = record.arg;\n } else if (record.type === \"return\") {\n this.rval = this.arg = record.arg;\n this.method = \"return\";\n this.next = \"end\";\n } else if (record.type === \"normal\" && afterLoc) {\n this.next = afterLoc;\n }\n\n return ContinueSentinel;\n },\n\n finish: function(finallyLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.finallyLoc === finallyLoc) {\n this.complete(entry.completion, entry.afterLoc);\n resetTryEntry(entry);\n return ContinueSentinel;\n }\n }\n },\n\n \"catch\": function(tryLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc === tryLoc) {\n var record = entry.completion;\n if (record.type === \"throw\") {\n var thrown = record.arg;\n resetTryEntry(entry);\n }\n return thrown;\n }\n }\n\n // The context.catch method must only be called with a location\n // argument that corresponds to a known catch block.\n throw new Error(\"illegal catch attempt\");\n },\n\n delegateYield: function(iterable, resultName, nextLoc) {\n this.delegate = {\n iterator: values(iterable),\n resultName: resultName,\n nextLoc: nextLoc\n };\n\n if (this.method === \"next\") {\n // Deliberately forget the last sent value so that we don't\n // accidentally pass it on to the delegate.\n this.arg = undefined;\n }\n\n return ContinueSentinel;\n }\n };\n\n // Regardless of whether this script is executing as a CommonJS module\n // or not, return the runtime object so that we can declare the variable\n // regeneratorRuntime in the outer scope, which allows this module to be\n // injected easily by `bin/regenerator --include-runtime script.js`.\n return exports;\n\n}(\n // If this script is executing as a CommonJS module, use module.exports\n // as the regeneratorRuntime namespace. Otherwise create a new empty\n // object. Either way, the resulting object will be used to initialize\n // the regeneratorRuntime variable at the top of this file.\n typeof module === \"object\" ? module.exports : {}\n));\n\ntry {\n regeneratorRuntime = runtime;\n} catch (accidentalStrictMode) {\n // This module should not be running in strict mode, so the above\n // assignment should always work unless something is misconfigured. Just\n // in case runtime.js accidentally runs in strict mode, we can escape\n // strict mode using a global Function call. This could conceivably fail\n // if a Content Security Policy forbids using Function, but in that case\n // the proper solution is to fix the accidental strict mode problem. If\n // you've misconfigured your bundler to force strict mode and applied a\n // CSP to forbid Function, and you're not willing to fix either of those\n // problems, please detail your unique predicament in a GitHub issue.\n Function(\"r\", \"regeneratorRuntime = r\")(runtime);\n}\n",
"function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n\n if (info.done) {\n resolve(value);\n } else {\n Promise.resolve(value).then(_next, _throw);\n }\n}\n\nexport default function _asyncToGenerator(fn) {\n return function () {\n var self = this,\n args = arguments;\n return new Promise(function (resolve, reject) {\n var gen = fn.apply(self, args);\n\n function _next(value) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value);\n }\n\n function _throw(err) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err);\n }\n\n _next(undefined);\n });\n };\n}",
"import setPrototypeOf from \"./setPrototypeOf.js\";\nexport default function _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) setPrototypeOf(subClass, superClass);\n}",
"export default function _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}",
"/*! js-cookie v3.0.1 | MIT */\n/* eslint-disable no-var */\nfunction assign (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n target[key] = source[key];\n }\n }\n return target\n}\n/* eslint-enable no-var */\n\n/* eslint-disable no-var */\nvar defaultConverter = {\n read: function (value) {\n if (value[0] === '\"') {\n value = value.slice(1, -1);\n }\n return value.replace(/(%[\\dA-F]{2})+/gi, decodeURIComponent)\n },\n write: function (value) {\n return encodeURIComponent(value).replace(\n /%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,\n decodeURIComponent\n )\n }\n};\n/* eslint-enable no-var */\n\n/* eslint-disable no-var */\n\nfunction init (converter, defaultAttributes) {\n function set (key, value, attributes) {\n if (typeof document === 'undefined') {\n return\n }\n\n attributes = assign({}, defaultAttributes, attributes);\n\n if (typeof attributes.expires === 'number') {\n attributes.expires = new Date(Date.now() + attributes.expires * 864e5);\n }\n if (attributes.expires) {\n attributes.expires = attributes.expires.toUTCString();\n }\n\n key = encodeURIComponent(key)\n .replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent)\n .replace(/[()]/g, escape);\n\n var stringifiedAttributes = '';\n for (var attributeName in attributes) {\n if (!attributes[attributeName]) {\n continue\n }\n\n stringifiedAttributes += '; ' + attributeName;\n\n if (attributes[attributeName] === true) {\n continue\n }\n\n // Considers RFC 6265 section 5.2:\n // ...\n // 3. If the remaining unparsed-attributes contains a %x3B (\";\")\n // character:\n // Consume the characters of the unparsed-attributes up to,\n // not including, the first %x3B (\";\") character.\n // ...\n stringifiedAttributes += '=' + attributes[attributeName].split(';')[0];\n }\n\n return (document.cookie =\n key + '=' + converter.write(value, key) + stringifiedAttributes)\n }\n\n function get (key) {\n if (typeof document === 'undefined' || (arguments.length && !key)) {\n return\n }\n\n // To prevent the for loop in the first place assign an empty array\n // in case there are no cookies at all.\n var cookies = document.cookie ? document.cookie.split('; ') : [];\n var jar = {};\n for (var i = 0; i < cookies.length; i++) {\n var parts = cookies[i].split('=');\n var value = parts.slice(1).join('=');\n\n try {\n var foundKey = decodeURIComponent(parts[0]);\n jar[foundKey] = converter.read(value, foundKey);\n\n if (key === foundKey) {\n break\n }\n } catch (e) {}\n }\n\n return key ? jar[key] : jar\n }\n\n return Object.create(\n {\n set: set,\n get: get,\n remove: function (key, attributes) {\n set(\n key,\n '',\n assign({}, attributes, {\n expires: -1\n })\n );\n },\n withAttributes: function (attributes) {\n return init(this.converter, assign({}, this.attributes, attributes))\n },\n withConverter: function (converter) {\n return init(assign({}, this.converter, converter), this.attributes)\n }\n },\n {\n attributes: { value: Object.freeze(defaultAttributes) },\n converter: { value: Object.freeze(converter) }\n }\n )\n}\n\nvar api = init(defaultConverter, { path: '/' });\n/* eslint-enable no-var */\n\nexport default api;\n",
"// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n",
"// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = function(module) {\n\tvar getter = module && module.__esModule ?\n\t\tfunction() { return module['default']; } :\n\t\tfunction() { return module; };\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};",
"// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};",
"__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }",
"// define __esModule on exports\n__webpack_require__.r = function(exports) {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};",
"/**\n * Copyright (C) 2018-2022 The Software Heritage developers\n * See the AUTHORS file at the top-level directory of this distribution\n * License: GNU Affero General Public License version 3, or any later version\n * See top-level LICENSE file for more information\n */\n\nimport {csrfPost, handleFetchError, isGitRepoUrl, htmlAlert,\n getCanonicalOriginURL, getHumanReadableDate} from 'utils/functions';\nimport {swhSpinnerSrc} from 'utils/constants';\nimport artifactFormRowTemplate from './artifact-form-row.ejs';\nimport userRequestsFilterCheckboxFn from 'utils/requests-filter-checkbox.ejs';\n\nlet saveRequestsTable;\n\nasync function originSaveRequest(\n originType, originUrl, extraData,\n acceptedCallback, pendingCallback, errorCallback\n) {\n // Actually trigger the origin save request\n const addSaveOriginRequestUrl = Urls.api_1_save_origin(originType, originUrl);\n $('.swh-processing-save-request').css('display', 'block');\n let headers = {};\n let body = null;\n if (extraData !== {}) {\n body = JSON.stringify(extraData);\n headers = {\n 'Content-Type': 'application/json'\n };\n };\n\n try {\n const response = await csrfPost(addSaveOriginRequestUrl, headers, body);\n handleFetchError(response);\n const data = await response.json();\n $('.swh-processing-save-request').css('display', 'none');\n if (data.save_request_status === 'accepted') {\n acceptedCallback();\n } else {\n pendingCallback();\n }\n } catch (response) {\n $('.swh-processing-save-request').css('display', 'none');\n const errorData = await response.json();\n errorCallback(response.status, errorData);\n };\n}\n\nfunction addArtifactVersionAutofillHandler(formId) {\n // autofill artifact version input with the filename from\n // the artifact url without extensions\n $(`#swh-input-artifact-url-${formId}`).on('input', function(event) {\n const artifactUrl = $(this).val().trim();\n let filename = artifactUrl.split('/').slice(-1)[0];\n if (filename !== artifactUrl) {\n filename = filename.replace(/tar.*$/, 'tar');\n const filenameNoExt = filename.split('.').slice(0, -1).join('.');\n const artifactVersion = $(`#swh-input-artifact-version-${formId}`);\n if (filenameNoExt !== filename) {\n artifactVersion.val(filenameNoExt);\n }\n }\n });\n}\n\nexport function maybeRequireExtraInputs() {\n // Read the actual selected value and depending on the origin type, display some extra\n // inputs or hide them. This makes the extra inputs disabled when not displayed.\n const originType = $('#swh-input-visit-type').val();\n let display = 'none';\n let disabled = true;\n\n if (originType === 'archives') {\n display = 'flex';\n disabled = false;\n }\n $('.swh-save-origin-archives-form').css('display', display);\n if (!disabled) {\n // help paragraph must have block display for proper rendering\n $('#swh-save-origin-archives-help').css('display', 'block');\n }\n $('.swh-save-origin-archives-form .form-control').prop('disabled', disabled);\n\n if (originType === 'archives' && $('.swh-save-origin-archives-form').length === 1) {\n // insert first artifact row when the archives visit type is selected for the first time\n $('.swh-save-origin-archives-form').last().after(\n artifactFormRowTemplate({deletableRow: false, formId: 0}));\n addArtifactVersionAutofillHandler(0);\n }\n}\n\nexport function addArtifactFormRow() {\n const formId = $('.swh-save-origin-artifact-form').length;\n $('.swh-save-origin-artifact-form').last().after(\n artifactFormRowTemplate({\n deletableRow: true,\n formId: formId\n })\n );\n addArtifactVersionAutofillHandler(formId);\n}\n\nexport function deleteArtifactFormRow(event) {\n $(event.target).closest('.swh-save-origin-artifact-form').remove();\n}\n\nconst saveRequestCheckboxId = 'swh-save-requests-user-filter';\nconst userRequestsFilterCheckbox = userRequestsFilterCheckboxFn({\n 'inputId': saveRequestCheckboxId,\n 'checked': false // no filtering by default on that view\n});\n\nexport function initOriginSave() {\n\n $(document).ready(() => {\n\n $.fn.dataTable.ext.errMode = 'none';\n\n // set git as the default value as before\n $('#swh-input-visit-type').val('git');\n\n saveRequestsTable = $('#swh-origin-save-requests')\n .on('error.dt', (e, settings, techNote, message) => {\n $('#swh-origin-save-request-list-error').text('An error occurred while retrieving the save requests list');\n console.log(message);\n })\n .DataTable({\n serverSide: true,\n processing: true,\n language: {\n processing: `<img src=\"${swhSpinnerSrc}\"></img>`\n },\n ajax: {\n url: Urls.origin_save_requests_list('all'),\n data: (d) => {\n if (swh.webapp.isUserLoggedIn() && $(`#${saveRequestCheckboxId}`).prop('checked')) {\n d.user_requests_only = '1';\n }\n }\n },\n searchDelay: 1000,\n // see https://datatables.net/examples/advanced_init/dom_toolbar.html and the comments section\n // this option customizes datatables UI components by adding an extra checkbox above the table\n // while keeping bootstrap layout\n dom: '<\"row\"<\"col-sm-3\"l><\"col-sm-6 text-left user-requests-filter\"><\"col-sm-3\"f>>' +\n '<\"row\"<\"col-sm-12\"tr>>' +\n '<\"row\"<\"col-sm-5\"i><\"col-sm-7\"p>>',\n fnInitComplete: function() {\n if (swh.webapp.isUserLoggedIn()) {\n $('div.user-requests-filter').html(userRequestsFilterCheckbox);\n $(`#${saveRequestCheckboxId}`).on('change', () => {\n saveRequestsTable.draw();\n });\n }\n },\n columns: [\n {\n data: 'save_request_date',\n name: 'request_date',\n render: getHumanReadableDate\n },\n {\n data: 'visit_type',\n name: 'visit_type'\n },\n {\n data: 'origin_url',\n name: 'origin_url',\n render: (data, type, row) => {\n if (type === 'display') {\n let html = '';\n const sanitizedURL = $.fn.dataTable.render.text().display(data);\n if (row.save_task_status === 'succeeded') {\n if (row.visit_status === 'full' || row.visit_status === 'partial') {\n let browseOriginUrl = `${Urls.browse_origin()}?origin_url=${encodeURIComponent(sanitizedURL)}`;\n if (row.visit_date) {\n browseOriginUrl += `&amp;timestamp=${encodeURIComponent(row.visit_date)}`;\n }\n html += `<a href=\"${browseOriginUrl}\">${sanitizedURL}</a>`;\n } else {\n const tooltip = 'origin was successfully loaded, waiting for data to be available in database';\n html += `<span title=\"${tooltip}\">${sanitizedURL}</span>`;\n }\n } else {\n html += sanitizedURL;\n }\n html += `&nbsp;<a href=\"${sanitizedURL}\" target=\"_blank\" rel=\"noopener noreferrer\">` +\n '<i class=\"mdi mdi-open-in-new\" aria-hidden=\"true\"></i></a>';\n return html;\n }\n return data;\n }\n },\n {\n data: 'save_request_status',\n name: 'status'\n },\n {\n data: 'save_task_status',\n name: 'loading_task_status'\n },\n {\n name: 'info',\n render: (data, type, row) => {\n if (row.save_task_status === 'succeeded' || row.save_task_status === 'failed' ||\n row.note != null) {\n return `<i class=\"mdi mdi-information-outline swh-save-request-info\"\n aria-hidden=\"true\" style=\"cursor: pointer\"\n onclick=\"swh.save.displaySaveRequestInfo(event, ${row.id})\"></i>`;\n } else {\n return '';\n }\n }\n },\n {\n render: (data, type, row) => {\n if (row.save_request_status === 'accepted') {\n const saveAgainButton =\n '<button class=\"btn btn-default btn-sm swh-save-origin-again\" type=\"button\" ' +\n `onclick=\"swh.save.fillSaveRequestFormAndScroll(` +\n `'${row.visit_type}', '${row.origin_url}');\">` +\n '<i class=\"mdi mdi-camera mdi-fw\" aria-hidden=\"true\"></i>' +\n 'Save again</button>';\n return saveAgainButton;\n } else {\n return '';\n }\n }\n }\n ],\n scrollY: '50vh',\n scrollCollapse: true,\n order: [[0, 'desc']],\n responsive: {\n details: {\n type: 'none'\n }\n }\n });\n\n swh.webapp.addJumpToPagePopoverToDataTable(saveRequestsTable);\n\n if (window.location.pathname === Urls.origin_save() && window.location.hash === '#requests') {\n // Keep old URLs to the save list working\n window.location = Urls.origin_save_list();\n } else if ($('#swh-origin-save-requests')) {\n saveRequestsTable.draw();\n }\n\n const saveRequestAcceptedAlert = htmlAlert(\n 'success',\n 'The \"save code now\" request has been accepted and will be processed as soon as possible.',\n true\n );\n\n const saveRequestPendingAlert = htmlAlert(\n 'warning',\n 'The \"save code now\" request has been put in pending state and may be accepted for processing after manual review.',\n true\n );\n\n const saveRequestRateLimitedAlert = htmlAlert(\n 'danger',\n 'The rate limit for \"save code now\" requests has been reached. Please try again later.',\n true\n );\n\n const saveRequestUnknownErrorAlert = htmlAlert(\n 'danger',\n 'An unexpected error happened when submitting the \"save code now request\".',\n true\n );\n\n $('#swh-save-origin-form').submit(async event => {\n event.preventDefault();\n event.stopPropagation();\n $('.alert').alert('close');\n if (event.target.checkValidity()) {\n $(event.target).removeClass('was-validated');\n const originType = $('#swh-input-visit-type').val();\n let originUrl = $('#swh-input-origin-url').val();\n\n originUrl = await getCanonicalOriginURL(originUrl);\n\n // read the extra inputs for the 'archives' type\n const extraData = {};\n if (originType === 'archives') {\n extraData['archives_data'] = [];\n for (let i = 0; i < $('.swh-save-origin-artifact-form').length; ++i) {\n extraData['archives_data'].push({\n 'artifact_url': $(`#swh-input-artifact-url-${i}`).val(),\n 'artifact_version': $(`#swh-input-artifact-version-${i}`).val()\n });\n }\n }\n\n originSaveRequest(originType, originUrl, extraData,\n () => $('#swh-origin-save-request-status').html(saveRequestAcceptedAlert),\n () => $('#swh-origin-save-request-status').html(saveRequestPendingAlert),\n (statusCode, errorData) => {\n $('#swh-origin-save-request-status').css('color', 'red');\n if (statusCode === 403) {\n const errorAlert = htmlAlert('danger', `Error: ${errorData['reason']}`);\n $('#swh-origin-save-request-status').html(errorAlert);\n } else if (statusCode === 429) {\n $('#swh-origin-save-request-status').html(saveRequestRateLimitedAlert);\n } else if (statusCode === 400) {\n const errorAlert = htmlAlert('danger', errorData['reason']);\n $('#swh-origin-save-request-status').html(errorAlert);\n } else {\n $('#swh-origin-save-request-status').html(saveRequestUnknownErrorAlert);\n }\n });\n } else {\n $(event.target).addClass('was-validated');\n }\n });\n\n $('#swh-show-origin-save-requests-list').on('click', (event) => {\n event.preventDefault();\n $('.nav-tabs a[href=\"#swh-origin-save-requests-list\"]').tab('show');\n });\n\n $('#swh-input-origin-url').on('input', function(event) {\n const originUrl = $(this).val().trim();\n $(this).val(originUrl);\n $('#swh-input-visit-type option').each(function() {\n const val = $(this).val();\n if (val && originUrl.includes(val)) {\n $(this).prop('selected', true);\n // origin URL input need to be validated once new visit type set\n validateSaveOriginUrl($('#swh-input-origin-url')[0]);\n }\n });\n });\n\n if (window.location.hash === '#requests') {\n $('.nav-tabs a[href=\"#swh-origin-save-requests-list\"]').tab('show');\n }\n\n $(window).on('hashchange', () => {\n if (window.location.hash === '#requests') {\n $('.nav-tabs a[href=\"#swh-origin-save-requests-list\"]').tab('show');\n } else {\n $('.nav-tabs a[href=\"#swh-origin-save-requests-create\"]').tab('show');\n }\n });\n\n });\n\n}\n\nexport function validateSaveOriginUrl(input) {\n const originType = $('#swh-input-visit-type').val();\n let originUrl = null;\n let validUrl = true;\n\n try {\n originUrl = new URL(input.value.trim());\n } catch (TypeError) {\n validUrl = false;\n }\n\n if (validUrl) {\n const allowedProtocols = ['http:', 'https:', 'svn:', 'git:', 'rsync:', 'pserver:', 'ssh:', 'bzr:'];\n validUrl = (\n allowedProtocols.find(protocol => protocol === originUrl.protocol) !== undefined\n );\n }\n\n if (validUrl && originType === 'git') {\n validUrl = isGitRepoUrl(originUrl);\n }\n\n let customValidity = '';\n if (validUrl) {\n if ((originUrl.password !== '' && originUrl.password !== 'anonymous')) {\n customValidity = 'The origin url contains a password and cannot be accepted for security reasons';\n }\n } else {\n customValidity = 'The origin url is not valid or does not reference a code repository';\n }\n input.setCustomValidity(customValidity);\n $(input).siblings('.invalid-feedback').text(customValidity);\n}\n\nexport function initTakeNewSnapshot() {\n\n const newSnapshotRequestAcceptedAlert = htmlAlert(\n 'success',\n 'The \"take new snapshot\" request has been accepted and will be processed as soon as possible.',\n true\n );\n\n const newSnapshotRequestPendingAlert = htmlAlert(\n 'warning',\n 'The \"take new snapshot\" request has been put in pending state and may be accepted for processing after manual review.',\n true\n );\n\n const newSnapshotRequestRateLimitAlert = htmlAlert(\n 'danger',\n 'The rate limit for \"take new snapshot\" requests has been reached. Please try again later.',\n true\n );\n\n const newSnapshotRequestUnknownErrorAlert = htmlAlert(\n 'danger',\n 'An unexpected error happened when submitting the \"save code now request\".',\n true\n );\n\n $(document).ready(() => {\n $('#swh-take-new-snapshot-form').submit(event => {\n event.preventDefault();\n event.stopPropagation();\n\n const originType = $('#swh-input-visit-type').val();\n const originUrl = $('#swh-input-origin-url').val();\n const extraData = {};\n\n originSaveRequest(originType, originUrl, extraData,\n () => $('#swh-take-new-snapshot-request-status').html(newSnapshotRequestAcceptedAlert),\n () => $('#swh-take-new-snapshot-request-status').html(newSnapshotRequestPendingAlert),\n (statusCode, errorData) => {\n $('#swh-take-new-snapshot-request-status').css('color', 'red');\n if (statusCode === 403) {\n const errorAlert = htmlAlert('danger', `Error: ${errorData['detail']}`, true);\n $('#swh-take-new-snapshot-request-status').html(errorAlert);\n } else if (statusCode === 429) {\n $('#swh-take-new-snapshot-request-status').html(newSnapshotRequestRateLimitAlert);\n } else {\n $('#swh-take-new-snapshot-request-status').html(newSnapshotRequestUnknownErrorAlert);\n }\n });\n });\n });\n}\n\nexport function formatValuePerType(type, value) {\n // Given some typed value, format and return accordingly formatted value\n const mapFormatPerTypeFn = {\n 'json': (v) => JSON.stringify(v, null, 2),\n 'date': (v) => new Date(v).toLocaleString(),\n 'raw': (v) => v,\n 'duration': (v) => v + ' seconds'\n };\n\n return value === null ? null : mapFormatPerTypeFn[type](value);\n}\n\nexport async function displaySaveRequestInfo(event, saveRequestId) {\n event.stopPropagation();\n const saveRequestTaskInfoUrl = Urls.origin_save_task_info(saveRequestId);\n // close popover when clicking again on the info icon\n if ($(event.target).data('bs.popover')) {\n $(event.target).popover('dispose');\n return;\n }\n $('.swh-save-request-info').popover('dispose');\n $(event.target).popover({\n animation: false,\n boundary: 'viewport',\n container: 'body',\n title: 'Save request task information ' +\n '<i style=\"cursor: pointer; position: absolute; right: 1rem;\" ' +\n `class=\"mdi mdi-close swh-save-request-info-close\"></i>`,\n content: `<div class=\"swh-popover swh-save-request-info-popover\">\n <div class=\"text-center\">\n <img src=${swhSpinnerSrc}></img>\n <p>Fetching task information ...</p>\n </div>\n </div>`,\n html: true,\n placement: 'left',\n sanitizeFn: swh.webapp.filterXSS\n });\n\n $(event.target).on('shown.bs.popover', function() {\n const popoverId = $(this).attr('aria-describedby');\n $(`#${popoverId} .mdi-close`).click(() => {\n $(this).popover('dispose');\n });\n });\n\n $(event.target).popover('show');\n const response = await fetch(saveRequestTaskInfoUrl);\n const saveRequestTaskInfo = await response.json();\n\n let content;\n if ($.isEmptyObject(saveRequestTaskInfo)) {\n content = 'Not available';\n\n } else if (saveRequestTaskInfo.note != null) {\n content = `<pre>${saveRequestTaskInfo.note}</pre>`;\n } else {\n const saveRequestInfo = [];\n const taskData = {\n 'Type': ['raw', 'type'],\n 'Visit status': ['raw', 'visit_status'],\n 'Arguments': ['json', 'arguments'],\n 'Id': ['raw', 'id'],\n 'Backend id': ['raw', 'backend_id'],\n 'Scheduling date': ['date', 'scheduled'],\n 'Start date': ['date', 'started'],\n 'Completion date': ['date', 'ended'],\n 'Duration': ['duration', 'duration'],\n 'Runner': ['raw', 'worker'],\n 'Log': ['raw', 'message']\n };\n for (const [title, [type, property]] of Object.entries(taskData)) {\n if (saveRequestTaskInfo.hasOwnProperty(property)) {\n saveRequestInfo.push({\n key: title,\n value: formatValuePerType(type, saveRequestTaskInfo[property])\n });\n }\n }\n content = '<table class=\"table\"><tbody>';\n for (const info of saveRequestInfo) {\n content +=\n `<tr>\n <th class=\"swh-metadata-table-row swh-metadata-table-key\">${info.key}</th>\n <td class=\"swh-metadata-table-row swh-metadata-table-value\">\n <pre>${info.value}</pre>\n </td>\n </tr>`;\n }\n content += '</tbody></table>';\n }\n $('.swh-popover').html(content);\n $(event.target).popover('update');\n}\n\nexport function fillSaveRequestFormAndScroll(visitType, originUrl) {\n $('#swh-input-origin-url').val(originUrl);\n let originTypeFound = false;\n $('#swh-input-visit-type option').each(function() {\n const val = $(this).val();\n if (val && originUrl.includes(val)) {\n $(this).prop('selected', true);\n originTypeFound = true;\n }\n });\n if (!originTypeFound) {\n $('#swh-input-visit-type option').each(function() {\n const val = $(this).val();\n if (val === visitType) {\n $(this).prop('selected', true);\n }\n });\n }\n window.scrollTo(0, 0);\n}\n"
],
"names": [
"root",
"factory",
"exports",
"module",
"define",
"amd",
"self",
"swhSpinnerSrc",
"staticAsset",
"handleFetchError",
"response",
"ok",
"asset",
"__STATIC__",
"csrfPost",
"url",
"headers",
"body",
"Cookies",
"fetch",
"credentials",
"method",
"isGitRepoUrl",
"pathPrefix",
"undefined",
"find",
"protocol",
"pathname",
"startsWith",
"RegExp",
"test",
"slice",
"length",
"htmlAlert",
"type",
"message",
"closable",
"closeButton",
"extraClasses",
"getCanonicalGithubOriginURL",
"ownerRepo",
"ghApiResponse",
"status",
"json",
"ghApiResponseData",
"html_url",
"getCanonicalOriginURL",
"originUrl",
"originUrlLower",
"toLowerCase",
"ghUrlRegex",
"match",
"endsWith",
"replace",
"ghpagesUrlRegex",
"parsedUrl",
"groups",
"owner",
"repo",
"getHumanReadableDate",
"data",
"Date",
"toLocaleString",
"anonymous",
"locals",
"escapeFn",
"include",
"rethrow",
"markup",
"String",
"_MATCH_HTML",
"encode_char",
"_ENCODE_HTML_RULES",
"c",
"__output",
"__append",
"s",
"formId",
"deletableRow",
"checked",
"inputId",
"runtime",
"Op",
"Object",
"prototype",
"hasOwn",
"hasOwnProperty",
"$Symbol",
"Symbol",
"iteratorSymbol",
"iterator",
"asyncIteratorSymbol",
"asyncIterator",
"toStringTagSymbol",
"toStringTag",
"obj",
"key",
"value",
"defineProperty",
"enumerable",
"configurable",
"writable",
"err",
"wrap",
"innerFn",
"outerFn",
"tryLocsList",
"protoGenerator",
"Generator",
"generator",
"create",
"context",
"Context",
"_invoke",
"state",
"GenStateSuspendedStart",
"arg",
"GenStateExecuting",
"Error",
"GenStateCompleted",
"doneResult",
"delegate",
"delegateResult",
"maybeInvokeDelegate",
"ContinueSentinel",
"sent",
"_sent",
"dispatchException",
"abrupt",
"record",
"tryCatch",
"done",
"GenStateSuspendedYield",
"makeInvokeMethod",
"fn",
"call",
"GeneratorFunction",
"GeneratorFunctionPrototype",
"IteratorPrototype",
"this",
"getProto",
"getPrototypeOf",
"NativeIteratorPrototype",
"values",
"Gp",
"defineIteratorMethods",
"forEach",
"AsyncIterator",
"PromiseImpl",
"invoke",
"resolve",
"reject",
"result",
"__await",
"then",
"unwrapped",
"error",
"previousPromise",
"callInvokeWithMethodAndArg",
"TypeError",
"info",
"resultName",
"next",
"nextLoc",
"pushTryEntry",
"locs",
"entry",
"tryLoc",
"catchLoc",
"finallyLoc",
"afterLoc",
"tryEntries",
"push",
"resetTryEntry",
"completion",
"reset",
"iterable",
"iteratorMethod",
"isNaN",
"i",
"constructor",
"displayName",
"isGeneratorFunction",
"genFun",
"ctor",
"name",
"mark",
"setPrototypeOf",
"__proto__",
"awrap",
"async",
"Promise",
"iter",
"toString",
"keys",
"object",
"reverse",
"pop",
"skipTempReset",
"prev",
"charAt",
"stop",
"rootRecord",
"rval",
"exception",
"handle",
"loc",
"caught",
"hasCatch",
"hasFinally",
"finallyEntry",
"complete",
"finish",
"thrown",
"delegateYield",
"regeneratorRuntime",
"accidentalStrictMode",
"Function",
"asyncGeneratorStep",
"gen",
"_next",
"_throw",
"_asyncToGenerator",
"args",
"arguments",
"apply",
"_inherits",
"subClass",
"superClass",
"_setPrototypeOf",
"o",
"p",
"assign",
"target",
"source",
"api",
"init",
"converter",
"defaultAttributes",
"set",
"attributes",
"document",
"expires",
"now",
"toUTCString",
"encodeURIComponent",
"decodeURIComponent",
"escape",
"stringifiedAttributes",
"attributeName",
"split",
"cookie",
"write",
"get",
"cookies",
"jar",
"parts",
"join",
"foundKey",
"read",
"e",
"remove",
"withAttributes",
"withConverter",
"freeze",
"path",
"__webpack_module_cache__",
"__webpack_require__",
"moduleId",
"cachedModule",
"__webpack_modules__",
"n",
"getter",
"__esModule",
"d",
"a",
"definition",
"prop",
"r",
"saveRequestsTable",
"originSaveRequest",
"originType",
"extraData",
"acceptedCallback",
"pendingCallback",
"errorCallback",
"addSaveOriginRequestUrl",
"Urls",
"api_1_save_origin",
"$",
"css",
"JSON",
"stringify",
"save_request_status",
"errorData",
"addArtifactVersionAutofillHandler",
"on",
"event",
"artifactUrl",
"val",
"trim",
"filename",
"filenameNoExt",
"artifactVersion",
"maybeRequireExtraInputs",
"display",
"disabled",
"last",
"after",
"artifactFormRowTemplate",
"addArtifactFormRow",
"deleteArtifactFormRow",
"closest",
"saveRequestCheckboxId",
"userRequestsFilterCheckbox",
"userRequestsFilterCheckboxFn",
"initOriginSave",
"ready",
"dataTable",
"ext",
"errMode",
"settings",
"techNote",
"text",
"console",
"log",
"DataTable",
"serverSide",
"processing",
"language",
"ajax",
"origin_save_requests_list",
"swh",
"webapp",
"isUserLoggedIn",
"user_requests_only",
"searchDelay",
"dom",
"fnInitComplete",
"html",
"draw",
"columns",
"render",
"row",
"sanitizedURL",
"save_task_status",
"visit_status",
"browseOriginUrl",
"browse_origin",
"visit_date",
"note",
"id",
"visit_type",
"origin_url",
"scrollY",
"scrollCollapse",
"order",
"responsive",
"details",
"addJumpToPagePopoverToDataTable",
"window",
"location",
"origin_save",
"hash",
"origin_save_list",
"saveRequestAcceptedAlert",
"saveRequestPendingAlert",
"saveRequestRateLimitedAlert",
"saveRequestUnknownErrorAlert",
"submit",
"preventDefault",
"stopPropagation",
"alert",
"checkValidity",
"removeClass",
"statusCode",
"errorAlert",
"addClass",
"tab",
"each",
"includes",
"validateSaveOriginUrl",
"input",
"validUrl",
"URL",
"customValidity",
"password",
"setCustomValidity",
"siblings",
"initTakeNewSnapshot",
"newSnapshotRequestAcceptedAlert",
"newSnapshotRequestPendingAlert",
"newSnapshotRequestRateLimitAlert",
"newSnapshotRequestUnknownErrorAlert",
"formatValuePerType",
"v",
"displaySaveRequestInfo",
"saveRequestId",
"saveRequestTaskInfoUrl",
"origin_save_task_info",
"popover",
"animation",
"boundary",
"container",
"title",
"content",
"placement",
"sanitizeFn",
"filterXSS",
"popoverId",
"attr",
"click",
"saveRequestTaskInfo",
"isEmptyObject",
"saveRequestInfo",
"taskData",
"entries",
"property",
"fillSaveRequestFormAndScroll",
"visitType",
"originTypeFound",
"scrollTo"
],
"sourceRoot": ""
}

File Metadata

Mime Type
application/json
Expires
Jun 4 2025, 6:35 PM (14 w, 5 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3370432

Event Timeline