/*! For license information please see deposit.160cd4b3a572d6029747.js.LICENSE.txt */
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.swh=e():(t.swh=t.swh||{},t.swh.deposit=e())}(self,(function(){return function(){var t={87757:function(t,e,r){r(35666)},59537:function(t,e,r){"use strict";r.d(e,{Jp:function(){return n},_3:function(){return o}});r(87757),r(31955);function n(t){return new Date(t).toLocaleString()}function o(t,e,r,n){if(void 0===r&&(r=!1),void 0===n&&(n=""),"display"===e&&t){var o=encodeURI(t);n||(n=o);var i="";return r&&(i='target="_blank" rel="noopener noreferrer"'),'"+n+""}return t}},35666:function(t){var e=function(t){"use strict";var e,r=Object.prototype,n=r.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function u(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var o=e&&e.prototype instanceof y?e:y,i=Object.create(o.prototype),a=new T(n||[]);return i._invoke=function(t,e,r){var n=d;return function(o,i){if(n===h)throw new Error("Generator is already running");if(n===p){if("throw"===o)throw i;return R()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=j(a,r);if(c){if(c===v)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===d)throw n=p,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=h;var u=l(t,e,r);if("normal"===u.type){if(n=r.done?p:f,u.arg===v)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n=p,r.method="throw",r.arg=u.arg)}}}(t,r,a),i}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=s;var d="suspendedStart",f="suspendedYield",h="executing",p="completed",v={};function y(){}function m(){}function w(){}var g={};g[i]=function(){return this};var b=Object.getPrototypeOf,x=b&&b(b(k([])));x&&x!==r&&n.call(x,i)&&(g=x);var _=w.prototype=y.prototype=Object.create(g);function E(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function L(t,e){function r(o,i,a,c){var u=l(t[o],t,i);if("throw"!==u.type){var s=u.arg,d=s.value;return d&&"object"==typeof d&&n.call(d,"__await")?e.resolve(d.__await).then((function(t){r("next",t,a,c)}),(function(t){r("throw",t,a,c)})):e.resolve(d).then((function(t){s.value=t,a(s)}),(function(t){return r("throw",t,a,c)}))}c(u.arg)}var o;this._invoke=function(t,n){function i(){return new e((function(e,o){r(t,n,e,o)}))}return o=o?o.then(i,i):i()}}function j(t,r){var n=t.iterator[r.method];if(n===e){if(r.delegate=null,"throw"===r.method){if(t.iterator.return&&(r.method="return",r.arg=e,j(t,r),"throw"===r.method))return v;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return v}var o=l(n,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,v;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,v):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function O(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function T(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function k(t){if(t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function r(){for(;++o=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),s=n.call(a,"finallyLoc");if(u&&s){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),O(r),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;O(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:k(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}(t.exports);try{regeneratorRuntime=e}catch(t){Function("r","regeneratorRuntime = r")(e)}},31955:function(){"use strict";function t(t){for(var e=1;e");return r||(r=o),''+r+""}return t}function n(r,n){var o;$(document).ready((function(){$.fn.dataTable.ext.errMode="none",o=$("#swh-admin-deposit-list").on("error.dt",(function(t,e,r,n){$("#swh-admin-deposit-list-error").text(n)})).DataTable({serverSide:!0,processing:!0,dom:'<<"d-flex justify-content-between align-items-center"f<"#list-exclude">l>rt<"bottom"ip>>',ajax:{url:Urls.admin_deposit_list(),data:function(t){t.excludePattern=$("#swh-admin-deposit-list-exclude-filter").val()}},columns:[{data:"id",name:"id"},{data:"type",name:"type"},{data:"uri",name:"uri",render:function(r,n,o){var i=$.fn.dataTable.render.text().display(r),a="",c="";return o.swhid_context&&r?a=e(o.swhid_context,n,i):r&&(a=i),r&&(c=(0,t._3)(i,n,!0,'')),a+" "+c}},{data:"reception_date",name:"reception_date",render:t.Jp},{data:"status",name:"status"},{data:"raw_metadata",name:"raw_metadata",render:function(t,e,r){return"display"===e&&r.raw_metadata?'':t}},{data:"status_detail",name:"status_detail",render:function(t,e,r){if("display"===e&&t){var n=t;return"object"==typeof t&&(n=JSON.stringify(t,null,4)),''+n+"
"}return t},orderable:!1,visible:!1},{data:"swhid",name:"swhid",render:function(t,r,n){return e(t,r)},orderable:!1,visible:!1},{data:"swhid_context",name:"swhid_context",render:function(t,r,n){return e(t,r)},orderable:!1,visible:!1}],scrollX:!0,scrollY:"50vh",scrollCollapse:!0,order:[[0,"desc"]]}),$("div#list-exclude").html('\n
\n \n
\n
\n'),$("#swh-admin-deposit-list tbody").on("click","tr button.metadata",(function(){var t=o.row(this.parentNode.parentNode).data(),e=t.raw_metadata,r=$("").text(e).html();swh.webapp.showModalHtml("Metadata of deposit "+t.id,''+r+"
","90%"),swh.webapp.highlightCode()})),$("#swh-admin-deposit-list-exclude-filter").keyup((function(){o.draw()})),o.draw()})),$("a.toggle-col").on("click",(function(t){t.preventDefault();var e=o.column($(this).attr("data-column"));e.visible(!e.visible()),e.visible()?$(this).removeClass("col-hidden"):$(this).addClass("col-hidden")}))}}(),o}()}));
//# sourceMappingURL=deposit.160cd4b3a572d6029747.js.map