/*! For license information please see arDominionB5Plugin.bundle.7522e096e2153c557e7c.js.LICENSE.txt */
(()=>{var e={8174:()=>{!function(e){Drupal.behaviors.autocomplete={attach:function(t){e("form:has(select.form-autocomplete)",t).each((function(){var t=e(this),i=[];function s(s,n,r,o){return s.data("relatedResourceForm")?(i.add(s.data("relatedResourceForm")),s.data("relatedResourceForm")):function(s,n,r,o){var a=e("<iframe/>").width(0).height(0).css("border",0);return a.one("load",(function(){var r=a.contents().find(o),l=e(r[0].form);i.add(l),l.one("submit",(function(){a.one("load",(function(){n.val(this.contentWindow.document.location).trigger("change"),function(e){i.remove(e),0==i.length&&t.submit()}(l)})),r.val(s.val()),l.submit()})),s.data("relatedResourceForm",l)})),a.attr("src",r),a.appendTo("body"),$relatedResourceForm}(s,n,r,o)}function n(t,i,s){var n=!1;return i=i.trim().toLowerCase(),s=s||{},t.each((function(t){var r=e(this),o=r.find("span").text()||r.find("input[type=text]").val();if(i===o.trim().toLowerCase()){if(n=!0,s.hasOwnProperty("highlight")||!0===s.highlight){var a=e("span",this);a&&(a.css("background","yellow"),setTimeout((function(){a.css("background","none")}),1e3))}return!1}})),n}function r(t,s,r){if(!n(s.children("li"),r[0],{highlight:!0})){var o=e('<li title="Remove item">').click((function(){e(this).hide("fast",(function(){e(this).remove(),s.toggle(!!s.children().length)})),i.remove(l.data("relatedResourceForm"))}));o.appendTo(s);var a=e('<input name="'+t.attr("name")+'" type="hidden" />');if(r[1])a.val(r[1]),e("<span>"+r[0]+"</span>").appendTo(o);else{a.val("");var l=e('<input type="text" class="yui-ac-input" />');l.val(r[0]).blur((function(){e(this);var t=e(this).val();n(o.siblings(),t)&&(t=""),t||(o.hide("fast",(function(){e(this).remove()})),i.remove(l.data("relatedResourceForm")))})).click((function(e){e.stopPropagation()})).appendTo(o)}return a.appendTo(o),s.show(),o}}function o(){var t,n=e(this),o=e('<input type="text" class="'+n.attr("class")+'" id="'+n.attr("id")+'"/>');if(n.attr("aria-describedby")&&o.attr("aria-describedby",n.attr("aria-describedby")),n.attr("disabled")&&o.attr("disabled",n.attr("disabled")),o.insertAfter(this),e(this).attr("multiple")){var a=e("<ul/>").hide().insertAfter(this);e("option:selected",this).each((function(){e('<li title="Remove item"><input name="'+n.attr("name")+'" type="hidden" value="'+e(this).val()+'"/><span>'+e(this).html()+"</span></li>").click((function(){e(this).hide("fast",(function(){e(this).remove(),a.toggle(!!a.children().length)}))})).appendTo(a.show())}))}else{var l=e('<input name="'+e(this).attr("name")+'" type="hidden" value="'+(e(this).val()?e(this).val():"")+'"/>').insertAfter(this);o.val(e("option:selected",this).text()).change((function(){o.val().length||l.val("").trigger("change")}))}if(f=e(this).siblings(".list").val())[m,g]=f.split(" ",2),(d=new YAHOO.util.XHRDataSource(m)).maxCacheEntries=1,d.responseType=YAHOO.util.DataSourceBase.TYPE_HTMLTABLE,d.parseHTMLTableData=function(t,i){var s=[];return e("tbody tr",i).each((function(){s.push([e("td a",this).html(),e("td a",this).attr("href")])})),n.data("xhrResults",s),{results:s}};else{var d=new YAHOO.util.LocalDataSource;e("option",this).each((function(){e(this).val()&&d.liveData.push([e(this).html(),e(this).val()])}))}o.keydown((function(){t=arguments[0]}));var h=new YAHOO.widget.AutoComplete(o[0],e("<div/>").insertAfter(this)[0],d);h.maxResultsDisplayed=20,h.minQueryLength=0,h.queryDelay=parseFloat(n.data("autocomplete-delay"))||1,"relatedAuthorityRecord[subType]"==e(this).attr("name")?h.generateRequest=function(t){return"&parent="+e("#relatedAuthorityRecord_type").val()+"&query="+t}:"parent"!=e(this).attr("name")&&"relatedTerms[]"!=e(this).attr("name")||-1==e(this).siblings(".list").val().indexOf("/term/autocomplete")?"converseTerm"==e(this).attr("name")&&-1!=e(this).siblings(".list").val().indexOf("/term/autocomplete")?h.generateRequest=function(t){return"?taxonomy="+e("input[name=taxonomy]").val()+"&parent="+e("input[name=parent]").val()+"&query="+t}:"collection"==e(this).attr("name")&&e(this).closest("section.advanced-search").length?h.generateRequest=function(t){return"&repository="+e("section.advanced-search select[name=repos]").val()+"&query="+t}:void 0!==d.liveData.indexOf&&-1!=d.liveData.indexOf("?")&&(h.generateRequest=function(e){return"&query="+e}):h.generateRequest=function(t){return"?taxonomy="+e("input[name=taxonomy]").val()+"&query="+t};var u=0;h.dataRequestEvent.subscribe((function(){var e=++u;o.addClass("throbbing"),h.dataReturnEvent.subscribe((function(){u==e&&o.removeClass("throbbing")}))})),h.itemSelectEvent.subscribe((function(e,t){c.call(void 0,t[2])}));var c=function(e){n.attr("multiple")?(t&&t.preventDefault(),r(n,a,e),o.select()):(l.val(e[1]).trigger("change"),o.trigger({type:"itemSelected",itemValue:l.attr("value")})),e[0].indexOf("<b>")>=0&&e[0].indexOf("</b>")>=0?o.val(e[0].substring(0,e[0].indexOf("<b>"))+e[0].substring(e[0].indexOf("<b>")+3,e[0].indexOf("</b>"))+e[0].substring(e[0].indexOf("</b>")+4,e[0].length)):o.val(e[0])};function p(){-1==h._nDelayID&&(h._nDelayID=setTimeout((function(){h._sendQuery(h.getInputEl().value)}),1e3*h.queryDelay))}n.attr("multiple")||h.textboxBlurEvent.subscribe((function(){var e=o.val().trim().toLowerCase(),t=n.data("xhrResults")||[];if(e&&e.length&&t.length)for(var i=0;i<t.length;i++)if(t[i][0].trim().toLowerCase()===e){c(t[i]);break}})),n.attr("multiple")&&h.textboxBlurEvent.subscribe((function(){o.val("")})),h.textboxFocusEvent.subscribe(p),o.click(p);var f,m,g,v=e(this).siblings(".add");(f=v.val())?([m,g]=f.split(" ",2),!0===v.data("link-existing")&&(m+=(m.match(/[\?]/g)?"&":"?")+"linkExisting=true"),h.unmatchedItemSelectEvent.subscribe((function(){var e;if(o.removeClass("throbbing"),o.val())if(n.attr("multiple")){t&&t.preventDefault();var d=r(n,a,[o.val()]);o.select(),e=s(d.find("input[type=text]"),d.find("input[type=hidden]"),m,g)}else 0==o.parents("div.yui-dialog, .atom-table-modal").length&&(e=s(o,l,m,g));else l.val("").trigger("change"),i.remove(e)})),n.attr("multiple")||h.itemSelectEvent.subscribe((function(){i.remove($relatedResourceForm),o.trigger({type:"itemSelected",itemValue:l.attr("value")})}))):h.unmatchedItemSelectEvent.subscribe((function(){l.val("").trigger("change"),o.val("")})),e(this).remove()}i.add=function(e){return-1==this.indexOf(e)&&this.push(e),this},i.remove=function(e){var t=this.indexOf(e);return t>-1&&this.splice(t,1),this},t.submit((function(e){return function(){for(var e=0,t=0;t<i.length;t++)i[t].submit(),e++;return 0==e}()})),e("select.form-autocomplete",this).each(o),e(document).on("loadFunctions","select.form-autocomplete",o)}))}}}(jQuery)},5708:()=>{!function(e){Drupal.behaviors.blank={attach:function(t){e("section, .section, .field",t).filter((function(){return!e("input, #treeView, > .search-results, #imageflow",this).length&&!jQuery.trim(e(":not(h2, h2 *, h3, h3 *, h4, h4 *)",this).contents().filter((function(){return 3==this.nodeType})).text())})).remove()}}}(jQuery)},5964:()=>{!function(e){"use strict";var t=function(t){this.$element=e(t),this.$reposFilter=this.$element.find('select[name="repos"]'),this.$collectionFilter=this.$element.find('input[name="collection"]'),this.$collectionFilterAutoComp=this.$element.find('input[id="collection"]'),this.$skipUnmatched=this.$element.find('input[name="skipUnmatched"]'),this.$skipMatched=this.$element.find('input[name="skipMatched"]'),this.$noIndexSelect=this.$element.find('input[name="noIndex"]'),this.$updateTypeSelect=this.$element.find('select[name="updateType"]'),this.$objectTypeSelect=this.$element.find('select[name="objectType"]'),this.$matchingPanel=this.$element.find('div[id="matchingOptions"]'),this.$importAsNewPanel=this.$element.find('div[id="importAsNewOptions"]'),this.$updateBlock=this.$element.find('div[id="updateBlock"]'),this.$noIndexBlock=this.$element.find('div[id="noIndex"]'),this.$repoLimitBlock=this.$element.find("div.repos-limit"),this.$collectionLimitBlock=this.$element.find("div.collection-limit"),this.init(),this.listen()};t.prototype={constructor:t,init:function(){this.toggleReposFilter(),this.togglePanels(),this.onObjectTypeChange()},listen:function(){this.$collectionFilter.on("change",e.proxy(this.toggleReposFilter,this)),this.$updateTypeSelect.on("change",e.proxy(this.togglePanels,this)),this.$objectTypeSelect.on("change",e.proxy(this.onObjectTypeChange,this))},onObjectTypeChange:function(e){this.toggleNoIndex(),this.toggleUpdateBlock()},toggleNoIndex:function(e){"event"===this.$objectTypeSelect.val()?(this.$noIndexBlock.hide(),this.$noIndexSelect.attr("checked",!1)):this.$noIndexBlock.show()},toggleReposFilter:function(e){this.$reposFilter.length&&""!=this.$collectionFilter.val()?(this.$reposFilter.attr("disabled","disabled"),this.$reposFilter.val("")):this.$reposFilter.length&&""==this.$collectionFilter.val()&&this.$reposFilter.removeAttr("disabled")},togglePanels:function(e){"import-as-new"==this.$updateTypeSelect.val()?this.resetMatchingBlock():(this.$reposFilter.removeAttr("disabled"),this.$skipMatched.attr("checked",!1),this.updateMatchingPanel())},toggleUpdateBlock:function(e){switch(this.$objectTypeSelect.val()){case"informationObject":case"authorityRecord":case"ead":case"eac-cpf":case"repository":this.updateMatchingPanel(),this.$updateBlock.show();break;default:this.$updateTypeSelect.val("import-as-new"),this.resetMatchingBlock(),this.$updateBlock.hide()}},updateMatchingPanel:function(){if("import-as-new"==this.$updateTypeSelect.val())this.resetMatchingBlock();else{switch(this.$objectTypeSelect.val()){case"authorityRecord":case"eac-cpf":this.$collectionFilter.val(""),this.$repoLimitBlock.show(),this.$collectionLimitBlock.hide();break;case"repository":this.$reposFilter.val(""),this.$collectionFilter.val(""),this.$repoLimitBlock.hide(),this.$collectionLimitBlock.hide();break;default:this.$repoLimitBlock.show(),this.$collectionLimitBlock.show()}this.$importAsNewPanel.hide(),this.$matchingPanel.show()}},resetMatchingBlock:function(){this.$reposFilter.val(""),this.$collectionFilter.val(""),this.$collectionFilterAutoComp.val(""),this.$skipUnmatched.attr("checked",!1),this.$skipMatched.attr("checked",!1),this.$matchingPanel.hide(),this.$importAsNewPanel.show()}},e((function(){var i=e("body.object.importSelect");0<i.length&&new t(i.get(0))}))}(window.jQuery)},1306:()=>{"use strict";!function(e){var t=1;function i(i){t+=i,function(t,i,s){var n="?page="+s,r=window.location.pathname+"/user/editingHistory"+n;e("#editingHistoryActivityIndicator").removeClass("hidden"),e.ajax({url:r,success:function(i){var n=JSON.parse(i);t.empty(),n.results.forEach((function(i){var s,n,r,o,a;t.append((s=i,n=e("<tr>"),r=e("<td></td>").append(e("<a></a>").attr("href",s.slug).text(s.title)),o=e("<td></td>").text(s.createdAt),a=e("<td></td>").text(s.actionType),n.append(r).append(o).append(a)))})),e("#previousButton").toggleClass("hidden",s<=1),e("#nextButton").toggleClass("hidden",n.pages<=s),e("#nextButton").toggle(n.pages>s),n.pages&&e("#editingHistory").removeClass("hidden"),e("#editingHistoryActivityIndicator").addClass("hidden")}})}(e("#editingHistoryRows"),0,t)}function s(){e("#previousButton").click((function(){i(-1)})),e("#nextButton").click((function(){i(1)})),i(0)}e((()=>{e("body").is(".user.index")&&e(s)}))}(jQuery)},6981:()=>{!function(e){"use strict";var t=function(t){this.$element=e(t),this.$type=this.$element.find('select[name="type"]'),this.$formatSelect=this.$element.find('select[name="format"]'),this.formatDescriptionCsv=this.$formatSelect.find('option[value="csv"]').text(),this.formatDescriptionXml=this.$formatSelect.find('option[value="xml"]').text(),this.$includeAllLevels=this.$element.find('input[name="includeAllLevels"]'),0!=this.$includeAllLevels.length&&(this.$includeAllLevelsHolder=this.$includeAllLevels.parent().parent()),this.$levelDiv=this.$element.find('div[id="exportLevels"]'),0!=this.$levelDiv.length&&this.$levelDiv.hide(),this.$levelSelect=this.$element.find('select[id="levels"]'),this.$includeDescendants=this.$element.find('input[name="includeDescendants"]'),this.$includeDigitalObjects=this.$element.find('input[name="includeDigitalObjects"]'),this.$includeDrafts=this.$element.find('input[name="includeDrafts"]'),this.$exportSubmit=this.$element.find('input[id="exportSubmit"]'),this.$exportDiv=this.$element.find('div[id="export-options"]'),this.$genericHelpIcon=this.$element.find("a.generic-help-icon"),this.animationMS=250,this.init(),this.listen()};t.prototype={constructor:t,init:function(){this.resetLevelsOptions()},listen:function(){this.$type.on("change",e.proxy(this.onObjectTypeChange,this)),0!=this.$genericHelpIcon.length&&this.$genericHelpIcon.on("click",e.proxy(this.toggleGenericHelp,this)),0!=this.$includeDescendants.length&&this.$includeDescendants.on("change",e.proxy(this.onExclusiveChange,this,1)),0!=this.$includeDigitalObjects.length&&this.$includeDigitalObjects.on("change",e.proxy(this.onExclusiveChange,this,2)),0!=this.$includeAllLevels.length&&this.$includeAllLevels.on("change",e.proxy(this.onIncludeAllLevelsChange,this)),this.$exportSubmit.on("click",e.proxy(this.onExportSubmit,this))},onExclusiveChange:function(e){var t=!1;if(1===e?this.$includeDescendants.prop("checked")?(this.setDescendantsState(!0),this.setDigitalObjectsState(!1),this.$includeAllLevelsHolder.slideDown(this.animationMS)):(t=!0,this.setDigitalObjectsState(!0)):this.$includeDigitalObjects.prop("checked")?(this.setDescendantsState(!1),this.setDigitalObjectsState(!0),this.$includeAllLevelsHolder&&this.$includeAllLevelsHolder.is(":animated")||(t=!0)):this.setDescendantsState(!0),t&&this.$includeAllLevelsHolder){var i=this;this.$includeAllLevelsHolder.slideUp(this.animationMS).promise().done((function(){i.resetLevelsOptions()}))}},setDescendantsState:function(e){var t=this.$includeDescendants.parent();e?t.removeClass("muted"):(this.$includeDescendants.prop("checked",!1),t.addClass("muted"))},setDigitalObjectsState:function(e){if(0!=this.$includeDigitalObjects.length){var t=this.$includeDigitalObjects.parent();e?t.removeClass("muted"):(this.$includeDigitalObjects.prop("checked",!1),t.addClass("muted"))}},resetLevelsOptions:function(){null!=this.$includeAllLevelsHolder&&0!=this.$includeAllLevelsHolder.length&&(this.$includeAllLevelsHolder.hide(),this.$includeAllLevels.prop("checked",!0)),null!=this.$levelDiv&&0!=this.$levelDiv.length&&(this.$levelDiv.slideUp(this.animationMS),this.$levelSelect.val(""))},onIncludeAllLevelsChange:function(){this.$levelDiv.slideToggle(this.animationMS),this.$includeAllLevels.prop("checked")&&this.$levelSelect.val("")},onObjectTypeChange:function(){var e=window.location.href.split("?")[0]+"?type=",t=this.$type.val().trim();switch(t){case"actor":case"repository":e+=t;break;default:e+="informationObject"}window.location.href=e},onExportSubmit:function(){0==this.$includeDescendants.length||this.$includeAllLevels.prop("checked")||null!=this.$levelSelect.val()||(event.preventDefault(),this.showAlert())},showAlert:function(){e("body").is(".clipboard.export")&&0==e("#wrapper.container > .alert").length&&e('<div class="alert alert-error"><button type="button" data-dismiss="alert" class="close">&times;</button>').append(this.$exportDiv.data("export-alert-message")).prependTo(e("#wrapper.container"))},toggleGenericHelp:function(t){t.preventDefault();var i=this.$genericHelpIcon.toggleClass("open").hasClass("open");this.$genericHelpIcon.attr("aria-expanded",i),e(".generic-help").toggle(400)}},e((function(){var i=e("body.clipboard.export");0<i.length&&new t(i.get(0))}))}(window.jQuery)},5420:()=>{!function(e){"use strict";var t=function(){this.$generateIdentifierBtn=e("#generate-identifier"),this.$identifier=e("#identifier"),this.$maskEnabled=e("#using-identifier-mask"),this.init()};t.prototype={constructor:t,init:function(){this.$generateIdentifierBtn.on("click",e.proxy(this.genIdentifier,this)),this.$identifier.on("input",e.proxy(this.identifierChanged,this))},genIdentifier:function(t){var i=this.$identifier,s=this.$maskEnabled;return t.preventDefault(),e.ajax({url:this.$generateIdentifierBtn.data("generate-identifier-url"),type:"GET",success:function(e){i.val(e.identifier),s.attr("value","1")}})},identifierChanged:function(e){this.$maskEnabled.attr("value","0")}},e((function(){new t}))}(jQuery)},263:()=>{!function(e){"use strict";function t(){e("#fullwidth-treeview-activity-indicator").show()}function i(){e("#fullwidth-treeview-activity-indicator").hide()}e((function(){e(".browse.hierarchy").length&&function(){var s="Data",n=e('<div id="fullwidth-treeview"></div>'),r=e('<div id="fullwidth-treeview-row"></div>'),o=e("#main-column"),a=e("#fullwidth-treeview-more-button"),l=e("#fullwidth-treeview-reset-button"),d=e("#fullwidth-treeview-configuration").data("items-per-page"),h=new Qubit.TreeviewPager(d,n,window.location.pathname+s);l.show();var u=!0;t();var c=e(document).height()-e("#main-column").offset().top-50;o.after(r.append(n).animate({height:c},500));var p={plugins:["state","types"],types:Qubit.treeviewTypes,core:{data:{url:function(e){if("#"===e.id){var t="?nodeLimit="+(h.getSkip()+h.getLimit());return window.location.pathname+s+t}return e.a_attr.href+"/informationobject/fullWidthTreeView"},dataFilter:function(e){var t=JSON.parse(e);return void 0===t.nodes?JSON.stringify(t):(0===h.total&&h.setTotal(t.total),JSON.stringify(t.nodes))},data:function(e){return"#"===e.id?{}:{firstLoad:!1,referenceCode:e.original.referenceCode}}},check_callback:function(e,t,i,s,n){return"deselect_all"===e||"create_node"===e}}};n.jstree(p).bind("ready.jstree",(function(){n.jstree(!0).restore_state(),h.updateMoreLink(a),u=!1,i()})).bind("select_node.jstree",(function(e,t){u||(n.jstree(!0).deselect_all(),n.jstree(!0).save_state(),window.location=t.node.a_attr.href)})),a.on("click",(function(){h.next(),t(),h.getAndAppendNodes((function(){i(),h.updateMoreLink(a)}))})),l.on("click",(function(){h.reset(a)}))}()}))}(jQuery)},8525:()=>{!function(e){Drupal.behaviors.multiInput={attach:function(t){e("ul.multiInput > li",t).click((function(t){this===t.target&&e(this).hide("fast",(function(){e(this).remove()}))})),e("input.multiInput",t).each((function(){var t=0,i=this.name.replace("[new]","");e(this).removeAttr("name").bind("blur click keydown",(function(s){if(e(this).val()&&("keydown"!==s.type||9===s.which||13===s.which)){"keydown"===s.type&&s.preventDefault();var n=e(this).prev("ul.multiInput");n.length||(n=e('<ul class="multiInput"/>').insertBefore(this)),e('<li><input type="text" name="'+i+"[new"+t+++']" value="'+this.value+'"/></li>').click((function(t){t.target===this&&e(this).hide("fast",(function(){e(this).remove()}))})).appendTo(n),this.value=""}}))}))}}}(jQuery)},5637:()=>{"use strict";!function(e){e.Pager=function(e,t){this.skip=0,this.limit=e,this.total=0,this.locationHashStorage=!0,void 0!==t&&t.disableLocationHashStorage&&(this.locationHashStorage=!1),this.init()},e.Pager.prototype={init:function(){var e=this.getLocationHashData();JSON.stringify(e)!=JSON.stringify({})&&(this.skip=parseInt(e.skip),this.limit=parseInt(e.limit))},getLocationHashData:function(){var e={};return window.location.hash.indexOf("#")>-1&&window.location.hash.substring(1).split("&").forEach((function(t,i){var s=t.split("="),n=s[0],r=s[1];e[n]=r})),e},storeDataAsLocationHash:function(e){if(this.locationHashStorage){var t="";for(var i in e)""!=t&&(t+="&"),t=t+i+"="+e[i];window.location.hash=t}},storeState:function(){this.storeDataAsLocationHash({skip:this.skip,limit:this.limit})},getSkip:function(){return this.skip},setSkip:function(e){this.skip=e,this.storeState()},getLimit:function(){return this.limit},setLimit:function(e){this.limit=e,this.storeState()},getTotal:function(){return this.total},setTotal:function(e){this.total=e},next:function(){this.setSkip(this.skip+this.limit)},getRemaining:function(){var e=this.getTotal()-(this.getSkip()+this.getLimit());return e<=0?0:e},replaceUrlTags:function(e){return(e=e.replace("{skip}",this.getSkip())).replace("{limit}",this.getLimit())}}}(Qubit)},5905:()=>{"use strict";!function(e,t){t.TreeviewPager=function(e,i,s){t.Pager.call(this,e),this.treeEl=i,this.url=s,this.rootId="#"},t.TreeviewPager.prototype=new t.Pager,t.TreeviewPager.prototype.getAndAppendNodes=function(t){var i="?skip="+this.getSkip()+"&nodeLimit="+this.getLimit(),s=this.url+i,n=[],r=this;e.ajax({url:s,success:function(e){e.nodes.forEach((function(e){n.push(e)}));var i=function(){if(n.length){var e=n.shift();r.treeEl.jstree(!0).create_node(r.rootId,e,"last",i)}else t()};i()}})},t.TreeviewPager.prototype.updateMoreLink=function(t,i){var s=0;this.getRemaining()>0?(t.val(t.data("label").replace("%1%",this.getRemaining())),t.show()):t.hide(),void 0!==i&&(this.getSkip()?i.show():i.hide()),this.getSkip()&&e("li.jstree-node:last").length&&(s=jQuery("li.jstree-node:last")[0].offsetTop),e(".jstree-container-ul").parent().scrollTop(s)},t.TreeviewPager.prototype.reset=function(e,t){this.setSkip(0),!1!==this.treeEl.jstree(!0)&&(void 0!==this.treeEl.jstree(!0).clear_state&&this.treeEl.jstree(!0).clear_state(),this.treeEl.jstree(!0).refresh(!0,!0)),this.updateMoreLink(e,t)}}(jQuery,Qubit)},4750:(e,t,i)=>{"use strict";i.r(t),i.d(t,{afterMain:()=>S,afterRead:()=>b,afterWrite:()=>k,applyStyles:()=>E,arrow:()=>X,auto:()=>a,basePlacements:()=>l,beforeMain:()=>w,beforeRead:()=>v,beforeWrite:()=>_,bottom:()=>n,clippingParents:()=>u,computeStyles:()=>ee,createPopper:()=>$e,createPopperBase:()=>Oe,createPopperLite:()=>Fe,detectOverflow:()=>me,end:()=>h,eventListeners:()=>ie,flip:()=>ge,hide:()=>be,left:()=>o,main:()=>x,modifierPhases:()=>C,offset:()=>we,placements:()=>g,popper:()=>p,popperGenerator:()=>Pe,popperOffsets:()=>xe,preventOverflow:()=>Se,read:()=>y,reference:()=>f,right:()=>r,start:()=>d,top:()=>s,variationPlacements:()=>m,viewport:()=>c,write:()=>T});var s="top",n="bottom",r="right",o="left",a="auto",l=[s,n,r,o],d="start",h="end",u="clippingParents",c="viewport",p="popper",f="reference",m=l.reduce((function(e,t){return e.concat([t+"-"+d,t+"-"+h])}),[]),g=[].concat(l,[a]).reduce((function(e,t){return e.concat([t,t+"-"+d,t+"-"+h])}),[]),v="beforeRead",y="read",b="afterRead",w="beforeMain",x="main",S="afterMain",_="beforeWrite",T="write",k="afterWrite",C=[v,y,b,w,x,S,_,T,k];function P(e){return e?(e.nodeName||"").toLowerCase():null}function O(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function $(e){return e instanceof O(e).Element||e instanceof Element}function F(e){return e instanceof O(e).HTMLElement||e instanceof HTMLElement}function A(e){return"undefined"!=typeof ShadowRoot&&(e instanceof O(e).ShadowRoot||e instanceof ShadowRoot)}const E={name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var i=t.styles[e]||{},s=t.attributes[e]||{},n=t.elements[e];F(n)&&P(n)&&(Object.assign(n.style,i),Object.keys(s).forEach((function(e){var t=s[e];!1===t?n.removeAttribute(e):n.setAttribute(e,!0===t?"":t)})))}))},effect:function(e){var t=e.state,i={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,i.popper),t.styles=i,t.elements.arrow&&Object.assign(t.elements.arrow.style,i.arrow),function(){Object.keys(t.elements).forEach((function(e){var s=t.elements[e],n=t.attributes[e]||{},r=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:i[e]).reduce((function(e,t){return e[t]="",e}),{});F(s)&&P(s)&&(Object.assign(s.style,r),Object.keys(n).forEach((function(e){s.removeAttribute(e)})))}))}},requires:["computeStyles"]};function D(e){return e.split("-")[0]}var I=Math.max,U=Math.min,B=Math.round;function L(e,t){void 0===t&&(t=!1);var i=e.getBoundingClientRect(),s=1,n=1;if(F(e)&&t){var r=e.offsetHeight,o=e.offsetWidth;o>0&&(s=B(i.width)/o||1),r>0&&(n=B(i.height)/r||1)}return{width:i.width/s,height:i.height/n,top:i.top/n,right:i.right/s,bottom:i.bottom/n,left:i.left/s,x:i.left/s,y:i.top/n}}function R(e){var t=L(e),i=e.offsetWidth,s=e.offsetHeight;return Math.abs(t.width-i)<=1&&(i=t.width),Math.abs(t.height-s)<=1&&(s=t.height),{x:e.offsetLeft,y:e.offsetTop,width:i,height:s}}function j(e,t){var i=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(i&&A(i)){var s=t;do{if(s&&e.isSameNode(s))return!0;s=s.parentNode||s.host}while(s)}return!1}function N(e){return O(e).getComputedStyle(e)}function M(e){return["table","td","th"].indexOf(P(e))>=0}function z(e){return(($(e)?e.ownerDocument:e.document)||window.document).documentElement}function H(e){return"html"===P(e)?e:e.assignedSlot||e.parentNode||(A(e)?e.host:null)||z(e)}function q(e){return F(e)&&"fixed"!==N(e).position?e.offsetParent:null}function V(e){for(var t=O(e),i=q(e);i&&M(i)&&"static"===N(i).position;)i=q(i);return i&&("html"===P(i)||"body"===P(i)&&"static"===N(i).position)?t:i||function(e){var t=-1!==navigator.userAgent.toLowerCase().indexOf("firefox");if(-1!==navigator.userAgent.indexOf("Trident")&&F(e)&&"fixed"===N(e).position)return null;var i=H(e);for(A(i)&&(i=i.host);F(i)&&["html","body"].indexOf(P(i))<0;){var s=N(i);if("none"!==s.transform||"none"!==s.perspective||"paint"===s.contain||-1!==["transform","perspective"].indexOf(s.willChange)||t&&"filter"===s.willChange||t&&s.filter&&"none"!==s.filter)return i;i=i.parentNode}return null}(e)||t}function W(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function G(e,t,i){return I(e,U(t,i))}function Q(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function K(e,t){return t.reduce((function(t,i){return t[i]=e,t}),{})}const X={name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,i=e.state,a=e.name,d=e.options,h=i.elements.arrow,u=i.modifiersData.popperOffsets,c=D(i.placement),p=W(c),f=[o,r].indexOf(c)>=0?"height":"width";if(h&&u){var m=function(e,t){return Q("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:K(e,l))}(d.padding,i),g=R(h),v="y"===p?s:o,y="y"===p?n:r,b=i.rects.reference[f]+i.rects.reference[p]-u[p]-i.rects.popper[f],w=u[p]-i.rects.reference[p],x=V(h),S=x?"y"===p?x.clientHeight||0:x.clientWidth||0:0,_=b/2-w/2,T=m[v],k=S-g[f]-m[y],C=S/2-g[f]/2+_,P=G(T,C,k),O=p;i.modifiersData[a]=((t={})[O]=P,t.centerOffset=P-C,t)}},effect:function(e){var t=e.state,i=e.options.element,s=void 0===i?"[data-popper-arrow]":i;null!=s&&("string"!=typeof s||(s=t.elements.popper.querySelector(s)))&&j(t.elements.popper,s)&&(t.elements.arrow=s)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Y(e){return e.split("-")[1]}var J={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Z(e){var t,i=e.popper,a=e.popperRect,l=e.placement,d=e.variation,u=e.offsets,c=e.position,p=e.gpuAcceleration,f=e.adaptive,m=e.roundOffsets,g=e.isFixed,v=u.x,y=void 0===v?0:v,b=u.y,w=void 0===b?0:b,x="function"==typeof m?m({x:y,y:w}):{x:y,y:w};y=x.x,w=x.y;var S=u.hasOwnProperty("x"),_=u.hasOwnProperty("y"),T=o,k=s,C=window;if(f){var P=V(i),$="clientHeight",F="clientWidth";P===O(i)&&"static"!==N(P=z(i)).position&&"absolute"===c&&($="scrollHeight",F="scrollWidth"),(l===s||(l===o||l===r)&&d===h)&&(k=n,w-=(g&&P===C&&C.visualViewport?C.visualViewport.height:P[$])-a.height,w*=p?1:-1),l!==o&&(l!==s&&l!==n||d!==h)||(T=r,y-=(g&&P===C&&C.visualViewport?C.visualViewport.width:P[F])-a.width,y*=p?1:-1)}var A,E=Object.assign({position:c},f&&J),D=!0===m?function(e){var t=e.x,i=e.y,s=window.devicePixelRatio||1;return{x:B(t*s)/s||0,y:B(i*s)/s||0}}({x:y,y:w}):{x:y,y:w};return y=D.x,w=D.y,p?Object.assign({},E,((A={})[k]=_?"0":"",A[T]=S?"0":"",A.transform=(C.devicePixelRatio||1)<=1?"translate("+y+"px, "+w+"px)":"translate3d("+y+"px, "+w+"px, 0)",A)):Object.assign({},E,((t={})[k]=_?w+"px":"",t[T]=S?y+"px":"",t.transform="",t))}const ee={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,i=e.options,s=i.gpuAcceleration,n=void 0===s||s,r=i.adaptive,o=void 0===r||r,a=i.roundOffsets,l=void 0===a||a,d={placement:D(t.placement),variation:Y(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:n,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,Z(Object.assign({},d,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:o,roundOffsets:l})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,Z(Object.assign({},d,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}};var te={passive:!0};const ie={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,i=e.instance,s=e.options,n=s.scroll,r=void 0===n||n,o=s.resize,a=void 0===o||o,l=O(t.elements.popper),d=[].concat(t.scrollParents.reference,t.scrollParents.popper);return r&&d.forEach((function(e){e.addEventListener("scroll",i.update,te)})),a&&l.addEventListener("resize",i.update,te),function(){r&&d.forEach((function(e){e.removeEventListener("scroll",i.update,te)})),a&&l.removeEventListener("resize",i.update,te)}},data:{}};var se={left:"right",right:"left",bottom:"top",top:"bottom"};function ne(e){return e.replace(/left|right|bottom|top/g,(function(e){return se[e]}))}var re={start:"end",end:"start"};function oe(e){return e.replace(/start|end/g,(function(e){return re[e]}))}function ae(e){var t=O(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function le(e){return L(z(e)).left+ae(e).scrollLeft}function de(e){var t=N(e),i=t.overflow,s=t.overflowX,n=t.overflowY;return/auto|scroll|overlay|hidden/.test(i+n+s)}function he(e){return["html","body","#document"].indexOf(P(e))>=0?e.ownerDocument.body:F(e)&&de(e)?e:he(H(e))}function ue(e,t){var i;void 0===t&&(t=[]);var s=he(e),n=s===(null==(i=e.ownerDocument)?void 0:i.body),r=O(s),o=n?[r].concat(r.visualViewport||[],de(s)?s:[]):s,a=t.concat(o);return n?a:a.concat(ue(H(o)))}function ce(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function pe(e,t){return t===c?ce(function(e){var t=O(e),i=z(e),s=t.visualViewport,n=i.clientWidth,r=i.clientHeight,o=0,a=0;return s&&(n=s.width,r=s.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(o=s.offsetLeft,a=s.offsetTop)),{width:n,height:r,x:o+le(e),y:a}}(e)):$(t)?function(e){var t=L(e);return t.top=t.top+e.clientTop,t.left=t.left+e.clientLeft,t.bottom=t.top+e.clientHeight,t.right=t.left+e.clientWidth,t.width=e.clientWidth,t.height=e.clientHeight,t.x=t.left,t.y=t.top,t}(t):ce(function(e){var t,i=z(e),s=ae(e),n=null==(t=e.ownerDocument)?void 0:t.body,r=I(i.scrollWidth,i.clientWidth,n?n.scrollWidth:0,n?n.clientWidth:0),o=I(i.scrollHeight,i.clientHeight,n?n.scrollHeight:0,n?n.clientHeight:0),a=-s.scrollLeft+le(e),l=-s.scrollTop;return"rtl"===N(n||i).direction&&(a+=I(i.clientWidth,n?n.clientWidth:0)-r),{width:r,height:o,x:a,y:l}}(z(e)))}function fe(e){var t,i=e.reference,a=e.element,l=e.placement,u=l?D(l):null,c=l?Y(l):null,p=i.x+i.width/2-a.width/2,f=i.y+i.height/2-a.height/2;switch(u){case s:t={x:p,y:i.y-a.height};break;case n:t={x:p,y:i.y+i.height};break;case r:t={x:i.x+i.width,y:f};break;case o:t={x:i.x-a.width,y:f};break;default:t={x:i.x,y:i.y}}var m=u?W(u):null;if(null!=m){var g="y"===m?"height":"width";switch(c){case d:t[m]=t[m]-(i[g]/2-a[g]/2);break;case h:t[m]=t[m]+(i[g]/2-a[g]/2)}}return t}function me(e,t){void 0===t&&(t={});var i=t,o=i.placement,a=void 0===o?e.placement:o,d=i.boundary,h=void 0===d?u:d,m=i.rootBoundary,g=void 0===m?c:m,v=i.elementContext,y=void 0===v?p:v,b=i.altBoundary,w=void 0!==b&&b,x=i.padding,S=void 0===x?0:x,_=Q("number"!=typeof S?S:K(S,l)),T=y===p?f:p,k=e.rects.popper,C=e.elements[w?T:y],O=function(e,t,i){var s="clippingParents"===t?function(e){var t=ue(H(e)),i=["absolute","fixed"].indexOf(N(e).position)>=0&&F(e)?V(e):e;return $(i)?t.filter((function(e){return $(e)&&j(e,i)&&"body"!==P(e)})):[]}(e):[].concat(t),n=[].concat(s,[i]),r=n[0],o=n.reduce((function(t,i){var s=pe(e,i);return t.top=I(s.top,t.top),t.right=U(s.right,t.right),t.bottom=U(s.bottom,t.bottom),t.left=I(s.left,t.left),t}),pe(e,r));return o.width=o.right-o.left,o.height=o.bottom-o.top,o.x=o.left,o.y=o.top,o}($(C)?C:C.contextElement||z(e.elements.popper),h,g),A=L(e.elements.reference),E=fe({reference:A,element:k,strategy:"absolute",placement:a}),D=ce(Object.assign({},k,E)),B=y===p?D:A,R={top:O.top-B.top+_.top,bottom:B.bottom-O.bottom+_.bottom,left:O.left-B.left+_.left,right:B.right-O.right+_.right},M=e.modifiersData.offset;if(y===p&&M){var q=M[a];Object.keys(R).forEach((function(e){var t=[r,n].indexOf(e)>=0?1:-1,i=[s,n].indexOf(e)>=0?"y":"x";R[e]+=q[i]*t}))}return R}const ge={name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,i=e.options,h=e.name;if(!t.modifiersData[h]._skip){for(var u=i.mainAxis,c=void 0===u||u,p=i.altAxis,f=void 0===p||p,v=i.fallbackPlacements,y=i.padding,b=i.boundary,w=i.rootBoundary,x=i.altBoundary,S=i.flipVariations,_=void 0===S||S,T=i.allowedAutoPlacements,k=t.options.placement,C=D(k),P=v||(C!==k&&_?function(e){if(D(e)===a)return[];var t=ne(e);return[oe(e),t,oe(t)]}(k):[ne(k)]),O=[k].concat(P).reduce((function(e,i){return e.concat(D(i)===a?function(e,t){void 0===t&&(t={});var i=t,s=i.placement,n=i.boundary,r=i.rootBoundary,o=i.padding,a=i.flipVariations,d=i.allowedAutoPlacements,h=void 0===d?g:d,u=Y(s),c=u?a?m:m.filter((function(e){return Y(e)===u})):l,p=c.filter((function(e){return h.indexOf(e)>=0}));0===p.length&&(p=c);var f=p.reduce((function(t,i){return t[i]=me(e,{placement:i,boundary:n,rootBoundary:r,padding:o})[D(i)],t}),{});return Object.keys(f).sort((function(e,t){return f[e]-f[t]}))}(t,{placement:i,boundary:b,rootBoundary:w,padding:y,flipVariations:_,allowedAutoPlacements:T}):i)}),[]),$=t.rects.reference,F=t.rects.popper,A=new Map,E=!0,I=O[0],U=0;U<O.length;U++){var B=O[U],L=D(B),R=Y(B)===d,j=[s,n].indexOf(L)>=0,N=j?"width":"height",M=me(t,{placement:B,boundary:b,rootBoundary:w,altBoundary:x,padding:y}),z=j?R?r:o:R?n:s;$[N]>F[N]&&(z=ne(z));var H=ne(z),q=[];if(c&&q.push(M[L]<=0),f&&q.push(M[z]<=0,M[H]<=0),q.every((function(e){return e}))){I=B,E=!1;break}A.set(B,q)}if(E)for(var V=function(e){var t=O.find((function(t){var i=A.get(t);if(i)return i.slice(0,e).every((function(e){return e}))}));if(t)return I=t,"break"},W=_?3:1;W>0&&"break"!==V(W);W--);t.placement!==I&&(t.modifiersData[h]._skip=!0,t.placement=I,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function ve(e,t,i){return void 0===i&&(i={x:0,y:0}),{top:e.top-t.height-i.y,right:e.right-t.width+i.x,bottom:e.bottom-t.height+i.y,left:e.left-t.width-i.x}}function ye(e){return[s,r,n,o].some((function(t){return e[t]>=0}))}const be={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,i=e.name,s=t.rects.reference,n=t.rects.popper,r=t.modifiersData.preventOverflow,o=me(t,{elementContext:"reference"}),a=me(t,{altBoundary:!0}),l=ve(o,s),d=ve(a,n,r),h=ye(l),u=ye(d);t.modifiersData[i]={referenceClippingOffsets:l,popperEscapeOffsets:d,isReferenceHidden:h,hasPopperEscaped:u},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":h,"data-popper-escaped":u})}},we={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,i=e.options,n=e.name,a=i.offset,l=void 0===a?[0,0]:a,d=g.reduce((function(e,i){return e[i]=function(e,t,i){var n=D(e),a=[o,s].indexOf(n)>=0?-1:1,l="function"==typeof i?i(Object.assign({},t,{placement:e})):i,d=l[0],h=l[1];return d=d||0,h=(h||0)*a,[o,r].indexOf(n)>=0?{x:h,y:d}:{x:d,y:h}}(i,t.rects,l),e}),{}),h=d[t.placement],u=h.x,c=h.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=u,t.modifiersData.popperOffsets.y+=c),t.modifiersData[n]=d}},xe={name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,i=e.name;t.modifiersData[i]=fe({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},Se={name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,i=e.options,a=e.name,l=i.mainAxis,h=void 0===l||l,u=i.altAxis,c=void 0!==u&&u,p=i.boundary,f=i.rootBoundary,m=i.altBoundary,g=i.padding,v=i.tether,y=void 0===v||v,b=i.tetherOffset,w=void 0===b?0:b,x=me(t,{boundary:p,rootBoundary:f,padding:g,altBoundary:m}),S=D(t.placement),_=Y(t.placement),T=!_,k=W(S),C="x"===k?"y":"x",P=t.modifiersData.popperOffsets,O=t.rects.reference,$=t.rects.popper,F="function"==typeof w?w(Object.assign({},t.rects,{placement:t.placement})):w,A="number"==typeof F?{mainAxis:F,altAxis:F}:Object.assign({mainAxis:0,altAxis:0},F),E=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,B={x:0,y:0};if(P){if(h){var L,j="y"===k?s:o,N="y"===k?n:r,M="y"===k?"height":"width",z=P[k],H=z+x[j],q=z-x[N],Q=y?-$[M]/2:0,K=_===d?O[M]:$[M],X=_===d?-$[M]:-O[M],J=t.elements.arrow,Z=y&&J?R(J):{width:0,height:0},ee=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},te=ee[j],ie=ee[N],se=G(0,O[M],Z[M]),ne=T?O[M]/2-Q-se-te-A.mainAxis:K-se-te-A.mainAxis,re=T?-O[M]/2+Q+se+ie+A.mainAxis:X+se+ie+A.mainAxis,oe=t.elements.arrow&&V(t.elements.arrow),ae=oe?"y"===k?oe.clientTop||0:oe.clientLeft||0:0,le=null!=(L=null==E?void 0:E[k])?L:0,de=z+re-le,he=G(y?U(H,z+ne-le-ae):H,z,y?I(q,de):q);P[k]=he,B[k]=he-z}if(c){var ue,ce="x"===k?s:o,pe="x"===k?n:r,fe=P[C],ge="y"===C?"height":"width",ve=fe+x[ce],ye=fe-x[pe],be=-1!==[s,o].indexOf(S),we=null!=(ue=null==E?void 0:E[C])?ue:0,xe=be?ve:fe-O[ge]-$[ge]-we+A.altAxis,Se=be?fe+O[ge]+$[ge]-we-A.altAxis:ye,_e=y&&be?function(e,t,i){var s=G(e,t,i);return s>i?i:s}(xe,fe,Se):G(y?xe:ve,fe,y?Se:ye);P[C]=_e,B[C]=_e-fe}t.modifiersData[a]=B}},requiresIfExists:["offset"]};function _e(e,t,i){void 0===i&&(i=!1);var s,n,r=F(t),o=F(t)&&function(e){var t=e.getBoundingClientRect(),i=B(t.width)/e.offsetWidth||1,s=B(t.height)/e.offsetHeight||1;return 1!==i||1!==s}(t),a=z(t),l=L(e,o),d={scrollLeft:0,scrollTop:0},h={x:0,y:0};return(r||!r&&!i)&&(("body"!==P(t)||de(a))&&(d=(s=t)!==O(s)&&F(s)?{scrollLeft:(n=s).scrollLeft,scrollTop:n.scrollTop}:ae(s)),F(t)?((h=L(t,!0)).x+=t.clientLeft,h.y+=t.clientTop):a&&(h.x=le(a))),{x:l.left+d.scrollLeft-h.x,y:l.top+d.scrollTop-h.y,width:l.width,height:l.height}}function Te(e){var t=new Map,i=new Set,s=[];function n(e){i.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!i.has(e)){var s=t.get(e);s&&n(s)}})),s.push(e)}return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){i.has(e.name)||n(e)})),s}var ke={placement:"bottom",modifiers:[],strategy:"absolute"};function Ce(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return!t.some((function(e){return!(e&&"function"==typeof e.getBoundingClientRect)}))}function Pe(e){void 0===e&&(e={});var t=e,i=t.defaultModifiers,s=void 0===i?[]:i,n=t.defaultOptions,r=void 0===n?ke:n;return function(e,t,i){void 0===i&&(i=r);var n,o,a={placement:"bottom",orderedModifiers:[],options:Object.assign({},ke,r),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},l=[],d=!1,h={state:a,setOptions:function(i){var n="function"==typeof i?i(a.options):i;u(),a.options=Object.assign({},r,a.options,n),a.scrollParents={reference:$(e)?ue(e):e.contextElement?ue(e.contextElement):[],popper:ue(t)};var o,d,c=function(e){var t=Te(e);return C.reduce((function(e,i){return e.concat(t.filter((function(e){return e.phase===i})))}),[])}((o=[].concat(s,a.options.modifiers),d=o.reduce((function(e,t){var i=e[t.name];return e[t.name]=i?Object.assign({},i,t,{options:Object.assign({},i.options,t.options),data:Object.assign({},i.data,t.data)}):t,e}),{}),Object.keys(d).map((function(e){return d[e]}))));return a.orderedModifiers=c.filter((function(e){return e.enabled})),a.orderedModifiers.forEach((function(e){var t=e.name,i=e.options,s=void 0===i?{}:i,n=e.effect;if("function"==typeof n){var r=n({state:a,name:t,instance:h,options:s});l.push(r||function(){})}})),h.update()},forceUpdate:function(){if(!d){var e=a.elements,t=e.reference,i=e.popper;if(Ce(t,i)){a.rects={reference:_e(t,V(i),"fixed"===a.options.strategy),popper:R(i)},a.reset=!1,a.placement=a.options.placement,a.orderedModifiers.forEach((function(e){return a.modifiersData[e.name]=Object.assign({},e.data)}));for(var s=0;s<a.orderedModifiers.length;s++)if(!0!==a.reset){var n=a.orderedModifiers[s],r=n.fn,o=n.options,l=void 0===o?{}:o,u=n.name;"function"==typeof r&&(a=r({state:a,options:l,name:u,instance:h})||a)}else a.reset=!1,s=-1}}},update:(n=function(){return new Promise((function(e){h.forceUpdate(),e(a)}))},function(){return o||(o=new Promise((function(e){Promise.resolve().then((function(){o=void 0,e(n())}))}))),o}),destroy:function(){u(),d=!0}};if(!Ce(e,t))return h;function u(){l.forEach((function(e){return e()})),l=[]}return h.setOptions(i).then((function(e){!d&&i.onFirstUpdate&&i.onFirstUpdate(e)})),h}}var Oe=Pe(),$e=Pe({defaultModifiers:[ie,xe,ee,E,we,ge,Se,X,be]}),Fe=Pe({defaultModifiers:[ie,xe,ee,E]})},5158:e=>{e.exports=function(e){if("number"!=typeof e||isNaN(e))throw new TypeError("Expected a number, got "+typeof e);var t=e<0,i=["B","KB","MB","GB","TB","PB","EB","ZB","YB"];if(t&&(e=-e),e<1)return(t?"-":"")+e+" B";var s=Math.min(Math.floor(Math.log(e)/Math.log(1024)),i.length-1);e=Number(e/Math.pow(1024,s));var n=i[s];return e>=10||e%1==0?(t?"-":"")+e.toFixed(0)+" "+n:(t?"-":"")+e.toFixed(1)+" "+n}},1220:e=>{"use strict";class t extends Error{constructor(){super("Authorization required"),this.name="AuthError",this.isAuthError=!0}}e.exports=t},6808:(e,t,i)=>{"use strict";const s=i(2368),n=i(8871);e.exports=class extends s{constructor(e,t){super(e,t),this.provider=t.provider,this.id=this.provider,this.name=this.opts.name||this.id.split("-").map((e=>e.charAt(0).toUpperCase()+e.slice(1))).join(" "),this.pluginId=this.opts.pluginId,this.tokenKey=`companion-${this.pluginId}-auth-token`,this.companionKeysParams=this.opts.companionKeysParams,this.preAuthToken=null}headers(){return Promise.all([super.headers(),this.getAuthToken()]).then((e=>{let[t,i]=e;const s={};return i&&(s["uppy-auth-token"]=i),this.companionKeysParams&&(s["uppy-credentials-params"]=btoa(JSON.stringify({params:this.companionKeysParams}))),{...t,...s}}))}onReceiveResponse(e){e=super.onReceiveResponse(e);const t=this.uppy.getPlugin(this.pluginId),i=t.getPluginState().authenticated?401!==e.status:e.status<400;return t.setPluginState({authenticated:i}),e}setAuthToken(e){return this.uppy.getPlugin(this.pluginId).storage.setItem(this.tokenKey,e)}getAuthToken(){return this.uppy.getPlugin(this.pluginId).storage.getItem(this.tokenKey)}async ensurePreAuth(){if(this.companionKeysParams&&!this.preAuthToken&&(await this.fetchPreAuthToken(),!this.preAuthToken))throw new Error("Could not load authentication data required for third-party login. Please try again later.")}authUrl(e){void 0===e&&(e={});const t=new URLSearchParams(e);return this.preAuthToken&&t.set("uppyPreAuthToken",this.preAuthToken),`${this.hostname}/${this.id}/connect?${t}`}fileUrl(e){return`${this.hostname}/${this.id}/get/${e}`}async fetchPreAuthToken(){if(this.companionKeysParams)try{const e=await this.post(`${this.id}/preauth/`,{params:this.companionKeysParams});this.preAuthToken=e.token}catch(e){this.uppy.log(`[CompanionClient] unable to fetch preAuthToken ${e}`,"warning")}}list(e){return this.get(`${this.id}/list/${e||""}`)}logout(){return this.get(`${this.id}/logout`).then((e=>Promise.all([e,this.uppy.getPlugin(this.pluginId).storage.removeItem(this.tokenKey)]))).then((e=>{let[t]=e;return t}))}static initPlugin(e,t,i){if(e.type="acquirer",e.files=[],i&&(e.opts={...i,...t}),t.serverUrl||t.serverPattern)throw new Error("`serverUrl` and `serverPattern` have been renamed to `companionUrl` and `companionAllowedHosts` respectively in the 0.30.5 release. Please consult the docs (for example, https://uppy.io/docs/instagram/ for the Instagram plugin) and use the updated options.`");if(t.companionAllowedHosts){const i=t.companionAllowedHosts;if(!("string"==typeof i||Array.isArray(i)||i instanceof RegExp))throw new TypeError(`${e.id}: the option "companionAllowedHosts" must be one of string, Array, RegExp`);e.opts.companionAllowedHosts=i}else/^(?!https?:\/\/).*$/i.test(t.companionUrl)?e.opts.companionAllowedHosts=`https://${t.companionUrl.replace(/^\/\//,"")}`:e.opts.companionAllowedHosts=new URL(t.companionUrl).origin;e.storage=e.opts.storage||n}}},2368:(e,t,i)=>{"use strict";var s,n,r,o,a;function l(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var d=0;function h(e){return"__private_"+d+++"_"+e}const u=i(6865),c=i(1220);async function p(e){if(401===e.status)throw new c;const t=e.json();if(e.status<200||e.status>300){let i=`Failed request with status: ${e.status}. ${e.statusText}`;try{const e=await t;i=e.message?`${i} message: ${e.message}`:i,i=e.requestId?`${i} request-Id: ${e.requestId}`:i}finally{throw new Error(i)}}return t}function f(e){return/^(https?:|)\/\//.test(e)?e:`${this.hostname}/${e}`}function m(e,t){return i=>{var s;if(null==(s=i)||!s.isAuthError){const s=new Error(`Could not ${e} ${l(this,r)[r](t)}`);s.cause=i,i=s}return Promise.reject(i)}}e.exports=(n=h("getPostResponseFunc"),r=h("getUrl"),o=h("errorHandler"),a=s=class e{constructor(e,t){Object.defineProperty(this,o,{value:m}),Object.defineProperty(this,r,{value:f}),Object.defineProperty(this,n,{writable:!0,value:e=>t=>e?t:this.onReceiveResponse(t)}),this.uppy=e,this.opts=t,this.onReceiveResponse=this.onReceiveResponse.bind(this),this.allowedHeaders=["accept","content-type","uppy-auth-token"],this.preflightDone=!1}get hostname(){const{companion:e}=this.uppy.getState(),t=this.opts.companionUrl;return(e&&e[t]?e[t]:t).replace(/\/$/,"")}headers(){const t=this.opts.companionHeaders||{};return Promise.resolve({...e.defaultHeaders,...t})}onReceiveResponse(e){const t=this.uppy.getState().companion||{},i=this.opts.companionUrl,{headers:s}=e;return s.has("i-am")&&s.get("i-am")!==t[i]&&this.uppy.setState({companion:{...t,[i]:s.get("i-am")}}),e}preflight(e){return this.preflightDone?Promise.resolve(this.allowedHeaders.slice()):fetch(l(this,r)[r](e),{method:"OPTIONS"}).then((e=>(e.headers.has("access-control-allow-headers")&&(this.allowedHeaders=e.headers.get("access-control-allow-headers").split(",").map((e=>e.trim().toLowerCase()))),this.preflightDone=!0,this.allowedHeaders.slice()))).catch((e=>(this.uppy.log(`[CompanionClient] unable to make preflight request ${e}`,"warning"),this.preflightDone=!0,this.allowedHeaders.slice())))}preflightAndHeaders(e){return Promise.all([this.preflight(e),this.headers()]).then((e=>{let[t,i]=e;return Object.keys(i).forEach((e=>{t.includes(e.toLowerCase())||(this.uppy.log(`[CompanionClient] excluding disallowed header ${e}`),delete i[e])})),i}))}get(e,t){return this.preflightAndHeaders(e).then((t=>u(l(this,r)[r](e),{method:"get",headers:t,credentials:this.opts.companionCookiesRule||"same-origin"}))).then(l(this,n)[n](t)).then(p).catch(l(this,o)[o]("get",e))}post(e,t,i){const s="post";return this.preflightAndHeaders(e).then((i=>u(l(this,r)[r](e),{method:s,headers:i,credentials:this.opts.companionCookiesRule||"same-origin",body:JSON.stringify(t)}))).then(l(this,n)[n](i)).then(p).catch(l(this,o)[o](s,e))}delete(e,t,i){const s="delete";return this.preflightAndHeaders(e).then((i=>u(`${this.hostname}/${e}`,{method:s,headers:i,credentials:this.opts.companionCookiesRule||"same-origin",body:t?JSON.stringify(t):null}))).then(l(this,n)[n](i)).then(p).catch(l(this,o)[o](s,e))}},s.VERSION="2.0.5",s.defaultHeaders={Accept:"application/json","Content-Type":"application/json","Uppy-Versions":`@uppy/companion-client=${s.VERSION}`},a)},3145:(e,t,i)=>{"use strict";const s=i(2368);e.exports=class extends s{constructor(e,t){super(e,t),this.provider=t.provider,this.id=this.provider,this.name=this.opts.name||this.id.split("-").map((e=>e.charAt(0).toUpperCase()+e.slice(1))).join(" "),this.pluginId=this.opts.pluginId}fileUrl(e){return`${this.hostname}/search/${this.id}/get/${e}`}search(e,t){return t=t?`&${t}`:"",this.get(`search/${this.id}/list?q=${encodeURIComponent(e)}${t}`)}}},9906:(e,t,i)=>{var s,n,r,o,a;let l,d;function h(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var u=0;function c(e){return"__private_"+u+++"_"+e}const p=i(4800);e.exports=(s=c("queued"),n=c("emitter"),r=c("isOpen"),o=c("socket"),a=c("handleMessage"),l=Symbol.for("uppy test: getSocket"),d=Symbol.for("uppy test: getQueued"),class{constructor(e){Object.defineProperty(this,s,{writable:!0,value:[]}),Object.defineProperty(this,n,{writable:!0,value:p()}),Object.defineProperty(this,r,{writable:!0,value:!1}),Object.defineProperty(this,o,{writable:!0,value:void 0}),Object.defineProperty(this,a,{writable:!0,value:e=>{try{const t=JSON.parse(e.data);this.emit(t.action,t.payload)}catch(e){console.log(e)}}}),this.opts=e,e&&!1===e.autoOpen||this.open()}get isOpen(){return h(this,r)[r]}[l](){return h(this,o)[o]}[d](){return h(this,s)[s]}open(){h(this,o)[o]=new WebSocket(this.opts.target),h(this,o)[o].onopen=()=>{for(h(this,r)[r]=!0;h(this,s)[s].length>0&&h(this,r)[r];){const e=h(this,s)[s].shift();this.send(e.action,e.payload)}},h(this,o)[o].onclose=()=>{h(this,r)[r]=!1},h(this,o)[o].onmessage=h(this,a)[a]}close(){var e;null==(e=h(this,o)[o])||e.close()}send(e,t){h(this,r)[r]?h(this,o)[o].send(JSON.stringify({action:e,payload:t})):h(this,s)[s].push({action:e,payload:t})}on(e,t){h(this,n)[n].on(e,t)}emit(e,t){h(this,n)[n].emit(e,t)}once(e,t){h(this,n)[n].once(e,t)}})},6385:(e,t,i)=>{"use strict";const s=i(2368),n=i(6808),r=i(3145),o=i(9906);e.exports={RequestClient:s,Provider:n,SearchProvider:r,Socket:o}},8871:e=>{"use strict";e.exports.setItem=(e,t)=>new Promise((i=>{localStorage.setItem(e,t),i()})),e.exports.getItem=e=>Promise.resolve(localStorage.getItem(e)),e.exports.removeItem=e=>new Promise((t=>{localStorage.removeItem(e),t()}))},8937:(e,t,i)=>{const s=i(3363);e.exports=class{constructor(e,t){void 0===t&&(t={}),this.uppy=e,this.opts=t}getPluginState(){const{plugins:e}=this.uppy.getState();return e[this.id]||{}}setPluginState(e){const{plugins:t}=this.uppy.getState();this.uppy.setState({plugins:{...t,[this.id]:{...t[this.id],...e}}})}setOptions(e){this.opts={...this.opts,...e},this.setPluginState(),this.i18nInit()}i18nInit(){const e=new s([this.defaultLocale,this.uppy.locale,this.opts.locale]);this.i18n=e.translate.bind(e),this.i18nArray=e.translateArray.bind(e),this.setPluginState()}addTarget(){throw new Error("Extend the addTarget method to add your plugin to another plugin's target")}install(){}uninstall(){}render(){throw new Error("Extend the render method to add your plugin to a DOM element")}update(){}afterUpdate(){}}},3e3:(e,t,i)=>{const s=i(5158),n=i(4193);class r extends Error{constructor(){super(...arguments),this.isRestriction=!0}}"undefined"==typeof AggregateError&&(globalThis.AggregateError=class extends Error{constructor(e,t){super(t),this.errors=e}}),e.exports={Restricter:class{constructor(e,t){this.i18n=t,this.getOpts=()=>{const t=e();if(null!=t.restrictions.allowedFileTypes&&!Array.isArray(t.restrictions.allowedFileTypes))throw new TypeError("`restrictions.allowedFileTypes` must be an array");return t}}validate(e,t){const{maxFileSize:i,minFileSize:o,maxTotalFileSize:a,maxNumberOfFiles:l,allowedFileTypes:d}=this.getOpts().restrictions;if(l&&t.length+1>l)throw new r(`${this.i18n("youCanOnlyUploadX",{smart_count:l})}`);if(d&&!d.some((t=>t.includes("/")?!!e.type&&n(e.type.replace(/;.*?$/,""),t):!("."!==t[0]||!e.extension)&&e.extension.toLowerCase()===t.slice(1).toLowerCase()))){const e=d.join(", ");throw new r(this.i18n("youCanOnlyUploadFileTypes",{types:e}))}if(a&&null!=e.size&&t.reduce(((e,t)=>e+t.size),e.size)>a)throw new r(this.i18n("exceedsSize",{size:s(a),file:e.name}));if(i&&null!=e.size&&e.size>i)throw new r(this.i18n("exceedsSize",{size:s(i),file:e.name}));if(o&&null!=e.size&&e.size<o)throw new r(this.i18n("inferiorSize",{size:s(o)}))}validateMinNumberOfFiles(e){const{minNumberOfFiles:t}=this.getOpts().restrictions;if(Object.keys(e).length<t)throw new r(this.i18n("youHaveToAtLeastSelectX",{smart_count:t}))}getMissingRequiredMetaFields(e){const t=new r(this.i18n("missingRequiredMetaFieldOnFile",{fileName:e.name})),{requiredMetaFields:i}=this.getOpts().restrictions,s=Object.prototype.hasOwnProperty,n=[];for(const t of i)s.call(e.meta,t)&&""!==e.meta[t]||n.push(t);return{missingFields:n,error:t}}},defaultOptions:{maxFileSize:null,minFileSize:null,maxTotalFileSize:null,maxNumberOfFiles:null,minNumberOfFiles:null,allowedFileTypes:null,requiredMetaFields:[]},RestrictionError:r}},4649:(e,t,i)=>{function s(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var n=0;function r(e){return"__private_"+n+++"_"+e}const{render:o}=i(6400),a=i(2729),l=i(8937);var d=r("updateUI");class h extends l{constructor(){super(...arguments),Object.defineProperty(this,d,{writable:!0,value:void 0})}mount(e,t){const i=t.id,n=a(e);if(n){this.isTargetDOMEl=!0;const t=document.createDocumentFragment();return s(this,d)[d]=function(e){let t=null,i=null;return function(){for(var s=arguments.length,n=new Array(s),r=0;r<s;r++)n[r]=arguments[r];return i=n,t||(t=Promise.resolve().then((()=>(t=null,e(...i))))),t}}((e=>{this.uppy.getPlugin(this.id)&&(o(this.render(e),t),this.afterUpdate())})),this.uppy.log(`Installing ${i} to a DOM element '${e}'`),this.opts.replaceTargetContent&&(n.innerHTML=""),o(this.render(this.uppy.getState()),t),this.el=t.firstElementChild,n.appendChild(t),this.onMount(),this.el}let r;if("object"==typeof e&&e instanceof h)r=e;else if("function"==typeof e){const t=e;this.uppy.iteratePlugins((e=>{if(e instanceof t)return r=e,!1}))}if(r)return this.uppy.log(`Installing ${i} to ${r.id}`),this.parent=r,this.el=r.addTarget(t),this.onMount(),this.el;this.uppy.log(`Not installing ${i}`);let l=`Invalid target option given to ${i}.`;throw l+="function"==typeof e?" The given target is not a Plugin class. Please check that you're not specifying a React Component instead of a plugin. If you are using @uppy/* packages directly, make sure you have only 1 version of @uppy/core installed: run `npm ls @uppy/core` on the command line and verify that all the versions match and are deduped correctly.":"If you meant to target an HTML element, please make sure that the element exists. Check that the <script> tag initializing Uppy is right before the closing </body> tag at the end of the page. (see https://github.com/transloadit/uppy/issues/1042)\n\nIf you meant to target a plugin, please confirm that your `import` statements or `require` calls are correct.",new Error(l)}update(e){var t,i;null!=this.el&&(null==(t=(i=s(this,d))[d])||t.call(i,e))}unmount(){var e;this.isTargetDOMEl&&(null==(e=this.el)||e.remove()),this.onUnmount()}onMount(){}onUnmount(){}}e.exports=h},1790:(e,t,i)=>{"use strict";let s,n;function r(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var o=0;function a(e){return"__private_"+o+++"_"+e}const l=i(3363),d=i(4800),{nanoid:h}=i(2961),u=i(3096),c=i(6273),p=i(9404),f=i(8744),m=i(8619),g=i(8585),v=i(2008),{justErrorsLogger:y,debugLogger:b}=i(4519),{Restricter:w,defaultOptions:x,RestrictionError:S}=i(3e3),_=i(8998);var T=a("plugins"),k=a("restricter"),C=a("storeUnsubscribe"),P=a("emitter"),O=a("preProcessors"),$=a("uploaders"),F=a("postProcessors"),A=a("informAndEmit"),E=a("checkRequiredMetaFieldsOnFile"),D=a("checkRequiredMetaFields"),I=a("assertNewUploadAllowed"),U=a("checkAndCreateFileStateObject"),B=a("startIfAutoProceed"),L=a("addListeners"),R=a("updateOnlineStatus"),j=a("createUpload"),N=a("getUpload"),M=a("removeUpload"),z=a("runUpload");s=Symbol.for("uppy test: getPlugins"),n=Symbol.for("uppy test: createUpload");class H{constructor(e){Object.defineProperty(this,z,{value:ee}),Object.defineProperty(this,M,{value:Z}),Object.defineProperty(this,N,{value:J}),Object.defineProperty(this,j,{value:Y}),Object.defineProperty(this,L,{value:X}),Object.defineProperty(this,B,{value:K}),Object.defineProperty(this,U,{value:Q}),Object.defineProperty(this,I,{value:G}),Object.defineProperty(this,D,{value:W}),Object.defineProperty(this,E,{value:V}),Object.defineProperty(this,A,{value:q}),Object.defineProperty(this,T,{writable:!0,value:Object.create(null)}),Object.defineProperty(this,k,{writable:!0,value:void 0}),Object.defineProperty(this,C,{writable:!0,value:void 0}),Object.defineProperty(this,P,{writable:!0,value:d()}),Object.defineProperty(this,O,{writable:!0,value:new Set}),Object.defineProperty(this,$,{writable:!0,value:new Set}),Object.defineProperty(this,F,{writable:!0,value:new Set}),Object.defineProperty(this,R,{writable:!0,value:this.updateOnlineStatus.bind(this)}),this.defaultLocale=_;const t={id:"uppy",autoProceed:!1,allowMultipleUploads:!0,allowMultipleUploadBatches:!0,debug:!1,restrictions:x,meta:{},onBeforeFileAdded:e=>e,onBeforeUpload:e=>e,store:c(),logger:y,infoTimeout:5e3};this.opts={...t,...e,restrictions:{...t.restrictions,...e&&e.restrictions}},e&&e.logger&&e.debug?this.log("You are using a custom `logger`, but also set `debug: true`, which uses built-in logger to output logs to console. Ignoring `debug: true` and using your custom `logger`.","warning"):e&&e.debug&&(this.opts.logger=b),this.log(`Using Core v${this.constructor.VERSION}`),this.i18nInit(),this.calculateProgress=u(this.calculateProgress.bind(this),500,{leading:!0,trailing:!0}),this.store=this.opts.store,this.setState({plugins:{},files:{},currentUploads:{},allowNewUpload:!0,capabilities:{uploadProgress:g(),individualCancellation:!0,resumableUploads:!1},totalProgress:0,meta:{...this.opts.meta},info:[],recoveredState:null}),r(this,k)[k]=new w((()=>this.opts),this.i18n),r(this,C)[C]=this.store.subscribe(((e,t,i)=>{this.emit("state-update",e,t,i),this.updateAll(t)})),this.opts.debug&&"undefined"!=typeof window&&(window[this.opts.id]=this),r(this,L)[L]()}emit(e){for(var t=arguments.length,i=new Array(t>1?t-1:0),s=1;s<t;s++)i[s-1]=arguments[s];r(this,P)[P].emit(e,...i)}on(e,t){return r(this,P)[P].on(e,t),this}once(e,t){return r(this,P)[P].once(e,t),this}off(e,t){return r(this,P)[P].off(e,t),this}updateAll(e){this.iteratePlugins((t=>{t.update(e)}))}setState(e){this.store.setState(e)}getState(){return this.store.getState()}get state(){return this.getState()}setFileState(e,t){if(!this.getState().files[e])throw new Error(`Can’t set state for ${e} (the file could have been removed)`);this.setState({files:{...this.getState().files,[e]:{...this.getState().files[e],...t}}})}i18nInit(){const e=new l([this.defaultLocale,this.opts.locale]);this.i18n=e.translate.bind(e),this.i18nArray=e.translateArray.bind(e),this.locale=e.locale}setOptions(e){this.opts={...this.opts,...e,restrictions:{...this.opts.restrictions,...e&&e.restrictions}},e.meta&&this.setMeta(e.meta),this.i18nInit(),e.locale&&this.iteratePlugins((e=>{e.setOptions()})),this.setState()}resetProgress(){const e={percentage:0,bytesUploaded:0,uploadComplete:!1,uploadStarted:null},t={...this.getState().files},i={};Object.keys(t).forEach((s=>{const n={...t[s]};n.progress={...n.progress,...e},i[s]=n})),this.setState({files:i,totalProgress:0}),this.emit("reset-progress")}addPreProcessor(e){r(this,O)[O].add(e)}removePreProcessor(e){return r(this,O)[O].delete(e)}addPostProcessor(e){r(this,F)[F].add(e)}removePostProcessor(e){return r(this,F)[F].delete(e)}addUploader(e){r(this,$)[$].add(e)}removeUploader(e){return r(this,$)[$].delete(e)}setMeta(e){const t={...this.getState().meta,...e},i={...this.getState().files};Object.keys(i).forEach((t=>{i[t]={...i[t],meta:{...i[t].meta,...e}}})),this.log("Adding metadata:"),this.log(e),this.setState({meta:t,files:i})}setFileMeta(e,t){const i={...this.getState().files};if(!i[e])return void this.log("Was trying to set metadata for a file that has been removed: ",e);const s={...i[e].meta,...t};i[e]={...i[e],meta:s},this.setState({files:i})}getFile(e){return this.getState().files[e]}getFiles(){const{files:e}=this.getState();return Object.values(e)}getObjectOfFilesPerState(){const{files:e,totalProgress:t,error:i}=this.getState(),s=Object.values(e),n=s.filter((e=>{let{progress:t}=e;return!t.uploadComplete&&t.uploadStarted})),r=s.filter((e=>!e.progress.uploadStarted)),o=s.filter((e=>e.progress.uploadStarted||e.progress.preprocess||e.progress.postprocess)),a=s.filter((e=>e.progress.uploadStarted)),l=s.filter((e=>e.isPaused)),d=s.filter((e=>e.progress.uploadComplete)),h=s.filter((e=>e.error)),u=n.filter((e=>!e.isPaused)),c=s.filter((e=>e.progress.preprocess||e.progress.postprocess));return{newFiles:r,startedFiles:o,uploadStartedFiles:a,pausedFiles:l,completeFiles:d,erroredFiles:h,inProgressFiles:n,inProgressNotPausedFiles:u,processingFiles:c,isUploadStarted:a.length>0,isAllComplete:100===t&&d.length===s.length&&0===c.length,isAllErrored:!!i&&h.length===s.length,isAllPaused:0!==n.length&&l.length===n.length,isUploadInProgress:n.length>0,isSomeGhost:s.some((e=>e.isGhost))}}validateRestrictions(e,t){void 0===t&&(t=this.getFiles());try{return r(this,k)[k].validate(e,t),{result:!0}}catch(e){return{result:!1,reason:e.message}}}checkIfFileAlreadyExists(e){const{files:t}=this.getState();return!(!t[e]||t[e].isGhost)}addFile(e){r(this,I)[I](e);const{files:t}=this.getState();let i=r(this,U)[U](t,e);return t[i.id]&&t[i.id].isGhost&&(i={...t[i.id],data:e.data,isGhost:!1},this.log(`Replaced the blob in the restored ghost file: ${i.name}, ${i.id}`)),this.setState({files:{...t,[i.id]:i}}),this.emit("file-added",i),this.emit("files-added",[i]),this.log(`Added file: ${i.name}, ${i.id}, mime type: ${i.type}`),r(this,B)[B](),i.id}addFiles(e){r(this,I)[I]();const t={...this.getState().files},i=[],s=[];for(let n=0;n<e.length;n++)try{let s=r(this,U)[U](t,e[n]);t[s.id]&&t[s.id].isGhost&&(s={...t[s.id],data:e[n].data,isGhost:!1},this.log(`Replaced blob in a ghost file: ${s.name}, ${s.id}`)),t[s.id]=s,i.push(s)}catch(e){e.isRestriction||s.push(e)}if(this.setState({files:t}),i.forEach((e=>{this.emit("file-added",e)})),this.emit("files-added",i),i.length>5?this.log(`Added batch of ${i.length} files`):Object.keys(i).forEach((e=>{this.log(`Added file: ${i[e].name}\n id: ${i[e].id}\n type: ${i[e].type}`)})),i.length>0&&r(this,B)[B](),s.length>0){let e="Multiple errors occurred while adding files:\n";if(s.forEach((t=>{e+=`\n * ${t.message}`})),this.info({message:this.i18n("addBulkFilesFailed",{smart_count:s.length}),details:e},"error",this.opts.infoTimeout),"function"==typeof AggregateError)throw new AggregateError(s,e);{const t=new Error(e);throw t.errors=s,t}}}removeFiles(e,t){const{files:i,currentUploads:s}=this.getState(),n={...i},r={...s},o=Object.create(null);function a(e){return void 0===o[e]}e.forEach((e=>{i[e]&&(o[e]=i[e],delete n[e])})),Object.keys(r).forEach((e=>{const t=s[e].fileIDs.filter(a);0!==t.length?r[e]={...s[e],fileIDs:t}:delete r[e]}));const l={currentUploads:r,files:n};0===Object.keys(n).length&&(l.allowNewUpload=!0,l.error=null,l.recoveredState=null),this.setState(l),this.calculateTotalProgress();const d=Object.keys(o);d.forEach((e=>{this.emit("file-removed",o[e],t)})),d.length>5?this.log(`Removed ${d.length} files`):this.log(`Removed files: ${d.join(", ")}`)}removeFile(e,t){void 0===t&&(t=null),this.removeFiles([e],t)}pauseResume(e){if(!this.getState().capabilities.resumableUploads||this.getFile(e).uploadComplete)return;const t=!this.getFile(e).isPaused;return this.setFileState(e,{isPaused:t}),this.emit("upload-pause",e,t),t}pauseAll(){const e={...this.getState().files};Object.keys(e).filter((t=>!e[t].progress.uploadComplete&&e[t].progress.uploadStarted)).forEach((t=>{const i={...e[t],isPaused:!0};e[t]=i})),this.setState({files:e}),this.emit("pause-all")}resumeAll(){const e={...this.getState().files};Object.keys(e).filter((t=>!e[t].progress.uploadComplete&&e[t].progress.uploadStarted)).forEach((t=>{const i={...e[t],isPaused:!1,error:null};e[t]=i})),this.setState({files:e}),this.emit("resume-all")}retryAll(){const e={...this.getState().files},t=Object.keys(e).filter((t=>e[t].error));if(t.forEach((t=>{const i={...e[t],isPaused:!1,error:null};e[t]=i})),this.setState({files:e,error:null}),this.emit("retry-all",t),0===t.length)return Promise.resolve({successful:[],failed:[]});const i=r(this,j)[j](t,{forceAllowNewUpload:!0});return r(this,z)[z](i)}cancelAll(){this.emit("cancel-all");const{files:e}=this.getState(),t=Object.keys(e);t.length&&this.removeFiles(t,"cancel-all"),this.setState({totalProgress:0,error:null,recoveredState:null})}retryUpload(e){this.setFileState(e,{error:null,isPaused:!1}),this.emit("upload-retry",e);const t=r(this,j)[j]([e],{forceAllowNewUpload:!0});return r(this,z)[z](t)}reset(){this.cancelAll()}logout(){this.iteratePlugins((e=>{e.provider&&e.provider.logout&&e.provider.logout()}))}calculateProgress(e,t){if(!this.getFile(e.id))return void this.log(`Not setting progress for a file that has been removed: ${e.id}`);const i=Number.isFinite(t.bytesTotal)&&t.bytesTotal>0;this.setFileState(e.id,{progress:{...this.getFile(e.id).progress,bytesUploaded:t.bytesUploaded,bytesTotal:t.bytesTotal,percentage:i?Math.round(t.bytesUploaded/t.bytesTotal*100):0}}),this.calculateTotalProgress()}calculateTotalProgress(){const e=this.getFiles().filter((e=>e.progress.uploadStarted||e.progress.preprocess||e.progress.postprocess));if(0===e.length)return this.emit("progress",0),void this.setState({totalProgress:0});const t=e.filter((e=>null!=e.progress.bytesTotal)),i=e.filter((e=>null==e.progress.bytesTotal));if(0===t.length){const t=100*e.length,s=i.reduce(((e,t)=>e+t.progress.percentage),0),n=Math.round(s/t*100);return void this.setState({totalProgress:n})}let s=t.reduce(((e,t)=>e+t.progress.bytesTotal),0);const n=s/t.length;s+=n*i.length;let r=0;t.forEach((e=>{r+=e.progress.bytesUploaded})),i.forEach((e=>{r+=n*(e.progress.percentage||0)/100}));let o=0===s?0:Math.round(r/s*100);o>100&&(o=100),this.setState({totalProgress:o}),this.emit("progress",o)}updateOnlineStatus(){void 0===window.navigator.onLine||window.navigator.onLine?(this.emit("is-online"),this.wasOffline&&(this.emit("back-online"),this.info(this.i18n("connectedToInternet"),"success",3e3),this.wasOffline=!1)):(this.emit("is-offline"),this.info(this.i18n("noInternetConnection"),"error",0),this.wasOffline=!0)}getID(){return this.opts.id}use(e,t){if("function"!=typeof e)throw new TypeError(`Expected a plugin class, but got ${null===e?"null":typeof e}. Please verify that the plugin was imported and spelled correctly.`);const i=new e(this,t),s=i.id;if(!s)throw new Error("Your plugin must have an id");if(!i.type)throw new Error("Your plugin must have a type");const n=this.getPlugin(s);if(n){const e=`Already found a plugin named '${n.id}'. Tried to use: '${s}'.\nUppy plugins must have unique \`id\` options. See https://uppy.io/docs/plugins/#id.`;throw new Error(e)}return e.VERSION&&this.log(`Using ${s} v${e.VERSION}`),i.type in r(this,T)[T]?r(this,T)[T][i.type].push(i):r(this,T)[T][i.type]=[i],i.install(),this}getPlugin(e){for(const t of Object.values(r(this,T)[T])){const i=t.find((t=>t.id===e));if(null!=i)return i}}[s](e){return r(this,T)[T][e]}iteratePlugins(e){Object.values(r(this,T)[T]).flat(1).forEach(e)}removePlugin(e){this.log(`Removing plugin ${e.id}`),this.emit("plugin-remove",e),e.uninstall&&e.uninstall();const t=r(this,T)[T][e.type],i=t.findIndex((t=>t.id===e.id));-1!==i&&t.splice(i,1);const s={plugins:{...this.getState().plugins,[e.id]:void 0}};this.setState(s)}close(){this.log(`Closing Uppy instance ${this.opts.id}: removing all files and uninstalling plugins`),this.reset(),r(this,C)[C](),this.iteratePlugins((e=>{this.removePlugin(e)})),"undefined"!=typeof window&&window.removeEventListener&&(window.removeEventListener("online",r(this,R)[R]),window.removeEventListener("offline",r(this,R)[R]))}hideInfo(){const{info:e}=this.getState();this.setState({info:e.slice(1)}),this.emit("info-hidden")}info(e,t,i){void 0===t&&(t="info"),void 0===i&&(i=3e3);const s="object"==typeof e;this.setState({info:[...this.getState().info,{type:t,message:s?e.message:e,details:s?e.details:null}]}),setTimeout((()=>this.hideInfo()),i),this.emit("info-visible")}log(e,t){const{logger:i}=this.opts;switch(t){case"error":i.error(e);break;case"warning":i.warn(e);break;default:i.debug(e)}}restore(e){return this.log(`Core: attempting to restore upload "${e}"`),this.getState().currentUploads[e]?r(this,z)[z](e):(r(this,M)[M](e),Promise.reject(new Error("Nonexistent upload")))}[n](){return r(this,j)[j](...arguments)}addResultData(e,t){if(!r(this,N)[N](e))return void this.log(`Not setting result for an upload that has been removed: ${e}`);const{currentUploads:i}=this.getState(),s={...i[e],result:{...i[e].result,...t}};this.setState({currentUploads:{...i,[e]:s}})}upload(){var e;null!=(e=r(this,T)[T].uploader)&&e.length||this.log("No uploader type plugins are used","warning");let{files:t}=this.getState();const i=this.opts.onBeforeUpload(t);return!1===i?Promise.reject(new Error("Not starting the upload because onBeforeUpload returned false")):(i&&"object"==typeof i&&(t=i,this.setState({files:t})),Promise.resolve().then((()=>r(this,k)[k].validateMinNumberOfFiles(t))).catch((e=>{throw r(this,A)[A](e),e})).then((()=>{if(!r(this,D)[D](t))throw new S(this.i18n("missingRequiredMetaField"))})).catch((e=>{throw e})).then((()=>{const{currentUploads:e}=this.getState(),i=Object.values(e).flatMap((e=>e.fileIDs)),s=[];Object.keys(t).forEach((e=>{const t=this.getFile(e);t.progress.uploadStarted||-1!==i.indexOf(e)||s.push(t.id)}));const n=r(this,j)[j](s);return r(this,z)[z](n)})).catch((e=>{throw this.emit("error",e),this.log(e,"error"),e})))}}function q(e,t){const{message:i,details:s=""}=e;e.isRestriction?this.emit("restriction-failed",t,e):this.emit("error",e),this.info({message:i,details:s},"error",this.opts.infoTimeout),this.log(`${i} ${s}`.trim(),"error")}function V(e){const{missingFields:t,error:i}=r(this,k)[k].getMissingRequiredMetaFields(e);return!(t.length>0&&(this.setFileState(e.id,{missingRequiredMetaFields:t}),this.log(i.message),this.emit("restriction-failed",e,i),1))}function W(e){let t=!0;for(const i of Object.values(e))r(this,E)[E](i)||(t=!1);return t}function G(e){const{allowNewUpload:t}=this.getState();if(!1===t){const t=new S(this.i18n("noMoreFilesAllowed"));throw r(this,A)[A](t,e),t}}function Q(e,t){const i=p(t),s=v(i,t),n=f(s).extension,o=Boolean(t.isRemote),a=m({...t,type:i});if(this.checkIfFileAlreadyExists(a)){const e=new S(this.i18n("noDuplicates",{fileName:s}));throw r(this,A)[A](e,t),e}const l=t.meta||{};l.name=s,l.type=i;const d=Number.isFinite(t.data.size)?t.data.size:null;let h={source:t.source||"",id:a,name:s,extension:n||"",meta:{...this.getState().meta,...l},type:i,data:t.data,progress:{percentage:0,bytesUploaded:0,bytesTotal:d,uploadComplete:!1,uploadStarted:null},size:d,isRemote:o,remote:t.remote||"",preview:t.preview};const u=this.opts.onBeforeFileAdded(h,e);if(!1===u){const e=new S("Cannot add the file because onBeforeFileAdded returned false.");throw this.emit("restriction-failed",t,e),e}"object"==typeof u&&null!==u&&(h=u);try{const t=Object.keys(e).map((t=>e[t]));r(this,k)[k].validate(h,t)}catch(e){throw r(this,A)[A](e,h),e}return h}function K(){this.opts.autoProceed&&!this.scheduledAutoProceed&&(this.scheduledAutoProceed=setTimeout((()=>{this.scheduledAutoProceed=null,this.upload().catch((e=>{e.isRestriction||this.log(e.stack||e.message||e)}))}),4))}function X(){const e=(e,t,i)=>{let s=e.message||"Unknown error";e.details&&(s+=` ${e.details}`),this.setState({error:s}),null!=t&&t.id in this.getState().files&&this.setFileState(t.id,{error:s,response:i})};this.on("error",e),this.on("upload-error",((t,i,s)=>{if(e(i,t,s),"object"==typeof i&&i.message){const e=new Error(i.message);e.details=i.message,i.details&&(e.details+=` ${i.details}`),e.message=this.i18n("failedToUpload",{file:t.name}),r(this,A)[A](e)}else r(this,A)[A](i)})),this.on("upload",(()=>{this.setState({error:null})})),this.on("upload-started",(e=>{this.getFile(e.id)?this.setFileState(e.id,{progress:{uploadStarted:Date.now(),uploadComplete:!1,percentage:0,bytesUploaded:0,bytesTotal:e.size}}):this.log(`Not setting progress for a file that has been removed: ${e.id}`)})),this.on("upload-progress",this.calculateProgress),this.on("upload-success",((e,t)=>{if(!this.getFile(e.id))return void this.log(`Not setting progress for a file that has been removed: ${e.id}`);const i=this.getFile(e.id).progress;this.setFileState(e.id,{progress:{...i,postprocess:r(this,F)[F].size>0?{mode:"indeterminate"}:null,uploadComplete:!0,percentage:100,bytesUploaded:i.bytesTotal},response:t,uploadURL:t.uploadURL,isPaused:!1}),null==e.size&&this.setFileState(e.id,{size:t.bytesUploaded||i.bytesTotal}),this.calculateTotalProgress()})),this.on("preprocess-progress",((e,t)=>{this.getFile(e.id)?this.setFileState(e.id,{progress:{...this.getFile(e.id).progress,preprocess:t}}):this.log(`Not setting progress for a file that has been removed: ${e.id}`)})),this.on("preprocess-complete",(e=>{if(!this.getFile(e.id))return void this.log(`Not setting progress for a file that has been removed: ${e.id}`);const t={...this.getState().files};t[e.id]={...t[e.id],progress:{...t[e.id].progress}},delete t[e.id].progress.preprocess,this.setState({files:t})})),this.on("postprocess-progress",((e,t)=>{this.getFile(e.id)?this.setFileState(e.id,{progress:{...this.getState().files[e.id].progress,postprocess:t}}):this.log(`Not setting progress for a file that has been removed: ${e.id}`)})),this.on("postprocess-complete",(e=>{if(!this.getFile(e.id))return void this.log(`Not setting progress for a file that has been removed: ${e.id}`);const t={...this.getState().files};t[e.id]={...t[e.id],progress:{...t[e.id].progress}},delete t[e.id].progress.postprocess,this.setState({files:t})})),this.on("restored",(()=>{this.calculateTotalProgress()})),this.on("dashboard:file-edit-complete",(e=>{e&&r(this,E)[E](e)})),"undefined"!=typeof window&&window.addEventListener&&(window.addEventListener("online",r(this,R)[R]),window.addEventListener("offline",r(this,R)[R]),setTimeout(r(this,R)[R],3e3))}function Y(e,t){void 0===t&&(t={});const{forceAllowNewUpload:i=!1}=t,{allowNewUpload:s,currentUploads:n}=this.getState();if(!s&&!i)throw new Error("Cannot create a new upload: already uploading.");const r=h();return this.emit("upload",{id:r,fileIDs:e}),this.setState({allowNewUpload:!1!==this.opts.allowMultipleUploadBatches&&!1!==this.opts.allowMultipleUploads,currentUploads:{...n,[r]:{fileIDs:e,step:0,result:{}}}}),r}function J(e){const{currentUploads:t}=this.getState();return t[e]}function Z(e){const t={...this.getState().currentUploads};delete t[e],this.setState({currentUploads:t})}async function ee(e){let{currentUploads:t}=this.getState(),i=t[e];const s=i.step||0,n=[...r(this,O)[O],...r(this,$)[$],...r(this,F)[F]];try{for(let r=s;r<n.length&&i;r++){const s=n[r],o={...i,step:r};this.setState({currentUploads:{...t,[e]:o}}),await s(o.fileIDs,e),t=this.getState().currentUploads,i=t[e]}}catch(t){throw r(this,M)[M](e),t}if(i){i.fileIDs.forEach((e=>{const t=this.getFile(e);t&&t.progress.postprocess&&this.emit("postprocess-complete",t)}));const s=i.fileIDs.map((e=>this.getFile(e))),n=s.filter((e=>!e.error)),r=s.filter((e=>e.error));await this.addResultData(e,{successful:n,failed:r,uploadID:e}),t=this.getState().currentUploads,i=t[e]}let o;return i&&(o=i.result,this.emit("complete",o),r(this,M)[M](e)),null==o&&this.log(`Not setting result for an upload that has been removed: ${e}`),o}H.VERSION="2.1.7",e.exports=H},2008:e=>{e.exports=function(e,t){return t.name?t.name:"image"===e.split("/")[0]?`${e.split("/")[0]}.${e.split("/")[1]}`:"noname"}},9429:(e,t,i)=>{"use strict";const s=i(1790),n=i(4649),r=i(8937),{debugLogger:o}=i(4519);e.exports=s,e.exports.Uppy=s,e.exports.UIPlugin=n,e.exports.BasePlugin=r,e.exports.debugLogger=o},8998:e=>{e.exports={strings:{addBulkFilesFailed:{0:"Failed to add %{smart_count} file due to an internal error",1:"Failed to add %{smart_count} files due to internal errors"},youCanOnlyUploadX:{0:"You can only upload %{smart_count} file",1:"You can only upload %{smart_count} files"},youHaveToAtLeastSelectX:{0:"You have to select at least %{smart_count} file",1:"You have to select at least %{smart_count} files"},exceedsSize:"%{file} exceeds maximum allowed size of %{size}",missingRequiredMetaField:"Missing required meta fields",missingRequiredMetaFieldOnFile:"Missing required meta fields in %{fileName}",inferiorSize:"This file is smaller than the allowed size of %{size}",youCanOnlyUploadFileTypes:"You can only upload: %{types}",noMoreFilesAllowed:"Cannot add more files",noDuplicates:"Cannot add the duplicate file '%{fileName}', it already exists",companionError:"Connection with Companion failed",authAborted:"Authentication aborted",companionUnauthorizeHint:"To unauthorize to your %{provider} account, please go to %{url}",failedToUpload:"Failed to upload %{file}",noInternetConnection:"No Internet connection",connectedToInternet:"Connected to the Internet",noFilesFound:"You have no files or folders here",selectX:{0:"Select %{smart_count}",1:"Select %{smart_count}"},allFilesFromFolderNamed:"All files from folder %{name}",openFolderNamed:"Open folder %{name}",cancel:"Cancel",logOut:"Log out",filter:"Filter",resetFilter:"Reset filter",loading:"Loading...",authenticateWithTitle:"Please authenticate with %{pluginName} to select files",authenticateWith:"Connect to %{pluginName}",signInWithGoogle:"Sign in with Google",searchImages:"Search for images",enterTextToSearch:"Enter text to search for images",search:"Search",emptyFolderAdded:"No files were added from empty folder",folderAlreadyAdded:'The folder "%{folder}" was already added',folderAdded:{0:"Added %{smart_count} file from %{folder}",1:"Added %{smart_count} files from %{folder}"}}}},4519:(e,t,i)=>{const s=i(6770),n={debug:()=>{},warn:()=>{},error:function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return console.error(`[Uppy] [${s()}]`,...t)}},r={debug:function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return console.debug(`[Uppy] [${s()}]`,...t)},warn:function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return console.warn(`[Uppy] [${s()}]`,...t)},error:function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return console.error(`[Uppy] [${s()}]`,...t)}};e.exports={justErrorsLogger:n,debugLogger:r}},8585:e=>{e.exports=function(e){if(null==e&&(e="undefined"!=typeof navigator?navigator.userAgent:null),!e)return!0;const t=/Edge\/(\d+\.\d+)/.exec(e);if(!t)return!0;const i=t[1];let[s,n]=i.split(".");return s=parseInt(s,10),n=parseInt(n,10),s<15||15===s&&n<15063||s>18||18===s&&n>=18218}},6052:(e,t,i)=>{let s;const{h:n,Component:r}=i(6400);s=Symbol.for("uppy test: disable unused locale key warning"),e.exports=class extends r{constructor(){super(...arguments),this.triggerFileInputClick=()=>{this.fileInput.click()},this.triggerFolderInputClick=()=>{this.folderInput.click()},this.onFileInputChange=e=>{this.props.handleInputChange(e),e.target.value=null},this.renderHiddenInput=(e,t)=>n("input",{className:"uppy-Dashboard-input",hidden:!0,"aria-hidden":"true",tabIndex:-1,webkitdirectory:e,type:"file",name:"files[]",multiple:1!==this.props.maxNumberOfFiles,onChange:this.onFileInputChange,accept:this.props.allowedFileTypes,ref:t}),this.renderMyDeviceAcquirer=()=>n("div",{className:"uppy-DashboardTab",role:"presentation","data-uppy-acquirer-id":"MyDevice"},n("button",{type:"button",className:"uppy-u-reset uppy-c-btn uppy-DashboardTab-btn",role:"tab",tabIndex:0,"data-uppy-super-focusable":!0,onClick:this.triggerFileInputClick},n("svg",{"aria-hidden":"true",focusable:"false",width:"32",height:"32",viewBox:"0 0 32 32"},n("g",{fill:"none",fillRule:"evenodd"},n("rect",{className:"uppy-ProviderIconBg",width:"32",height:"32",rx:"16",fill:"#2275D7"}),n("path",{d:"M21.973 21.152H9.863l-1.108-5.087h14.464l-1.246 5.087zM9.935 11.37h3.958l.886 1.444a.673.673 0 0 0 .585.316h6.506v1.37H9.935v-3.13zm14.898 3.44a.793.793 0 0 0-.616-.31h-.978v-2.126c0-.379-.275-.613-.653-.613H15.75l-.886-1.445a.673.673 0 0 0-.585-.316H9.232c-.378 0-.667.209-.667.587V14.5h-.782a.793.793 0 0 0-.61.303.795.795 0 0 0-.155.663l1.45 6.633c.078.36.396.618.764.618h13.354c.36 0 .674-.246.76-.595l1.631-6.636a.795.795 0 0 0-.144-.675z",fill:"#FFF"}))),n("div",{className:"uppy-DashboardTab-name"},this.props.i18n("myDevice")))),this.renderBrowseButton=(e,t)=>{const i=this.props.acquirers.length;return n("button",{type:"button",className:"uppy-u-reset uppy-Dashboard-browse",onClick:t,"data-uppy-super-focusable":0===i},e)},this.renderDropPasteBrowseTagline=()=>{const e=this.props.acquirers.length,t=this.renderBrowseButton(this.props.i18n("browseFiles"),this.triggerFileInputClick),i=this.renderBrowseButton(this.props.i18n("browseFolders"),this.triggerFolderInputClick),s=this.props.fileManagerSelectionType,r=s.charAt(0).toUpperCase()+s.slice(1);return n("div",{class:"uppy-Dashboard-AddFiles-title"},this.props.disableLocalFiles?this.props.i18n("importFiles"):e>0?this.props.i18nArray(`dropPasteImport${r}`,{browseFiles:t,browseFolders:i,browse:t}):this.props.i18nArray(`dropPaste${r}`,{browseFiles:t,browseFolders:i,browse:t}))},this.renderAcquirer=e=>n("div",{className:"uppy-DashboardTab",role:"presentation","data-uppy-acquirer-id":e.id},n("button",{type:"button",className:"uppy-u-reset uppy-c-btn uppy-DashboardTab-btn",role:"tab",tabIndex:0,"data-cy":e.id,"aria-controls":`uppy-DashboardContent-panel--${e.id}`,"aria-selected":this.props.activePickerPanel.id===e.id,"data-uppy-super-focusable":!0,onClick:()=>this.props.showPanel(e.id)},e.icon(),n("div",{className:"uppy-DashboardTab-name"},e.name))),this.renderAcquirers=(e,t)=>{const i=[...e],s=i.splice(e.length-2,e.length);return n("div",{className:"uppy-Dashboard-AddFiles-list",role:"tablist"},!t&&this.renderMyDeviceAcquirer(),i.map((e=>this.renderAcquirer(e))),n("span",{role:"presentation",style:{"white-space":"nowrap"}},s.map((e=>this.renderAcquirer(e)))))}}[s](){this.props.i18nArray("dropPasteBoth"),this.props.i18nArray("dropPasteFiles"),this.props.i18nArray("dropPasteFolders"),this.props.i18nArray("dropPasteImportBoth"),this.props.i18nArray("dropPasteImportFiles"),this.props.i18nArray("dropPasteImportFolders")}renderPoweredByUppy(){const{i18nArray:e}=this.props,t=e("poweredBy",{uppy:n("span",null,n("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon uppy-Dashboard-poweredByIcon",width:"11",height:"11",viewBox:"0 0 11 11"},n("path",{d:"M7.365 10.5l-.01-4.045h2.612L5.5.806l-4.467 5.65h2.604l.01 4.044h3.718z",fillRule:"evenodd"})),n("span",{className:"uppy-Dashboard-poweredByUppy"},"Uppy"))});return n("a",{tabIndex:"-1",href:"https://uppy.io",rel:"noreferrer noopener",target:"_blank",className:"uppy-Dashboard-poweredBy"},t)}render(){return n("div",{className:"uppy-Dashboard-AddFiles"},this.renderHiddenInput(!1,(e=>{this.fileInput=e})),this.renderHiddenInput(!0,(e=>{this.folderInput=e})),this.renderDropPasteBrowseTagline(),this.props.acquirers.length>0&&this.renderAcquirers(this.props.acquirers,this.props.disableLocalFiles),n("div",{className:"uppy-Dashboard-AddFiles-info"},this.props.note&&n("div",{className:"uppy-Dashboard-note"},this.props.note),this.props.proudlyDisplayPoweredByUppy&&this.renderPoweredByUppy(this.props)))}}},5808:(e,t,i)=>{const{h:s}=i(6400),n=i(4184),r=i(6052);e.exports=e=>s("div",{className:n("uppy-Dashboard-AddFilesPanel",e.className),"data-uppy-panelType":"AddFiles","aria-hidden":e.showAddFilesPanel},s("div",{className:"uppy-DashboardContent-bar"},s("div",{className:"uppy-DashboardContent-title",role:"heading","aria-level":"1"},e.i18n("addingMoreFiles")),s("button",{className:"uppy-DashboardContent-back",type:"button",onClick:()=>e.toggleAddFilesPanel(!1)},e.i18n("back"))),s(r,e))},5519:(e,t,i)=>{function s(){return s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(e[s]=i[s])}return e},s.apply(this,arguments)}const{h:n}=i(6400),r=i(4184),o=i(3754),a=i(8689),l=i(6052),d=i(5808),h=i(5859),u=i(4477),c=i(7246),p=i(5261),f=i(9167);e.exports=function(e){const t=0===e.totalFileCount,i=e.containerWidth>576,m=r({"uppy-Root":e.isTargetDOMEl}),g=r({"uppy-Dashboard":!0,"uppy-Dashboard--isDisabled":e.disabled,"uppy-Dashboard--animateOpenClose":e.animateOpenClose,"uppy-Dashboard--isClosing":e.isClosing,"uppy-Dashboard--isDraggingOver":e.isDraggingOver,"uppy-Dashboard--modal":!e.inline,"uppy-size--md":e.containerWidth>576,"uppy-size--lg":e.containerWidth>700,"uppy-size--xl":e.containerWidth>900,"uppy-size--height-md":e.containerHeight>400,"uppy-Dashboard--isAddFilesPanelVisible":e.showAddFilesPanel,"uppy-Dashboard--isInnerWrapVisible":e.areInsidesReadyToBeVisible});let v=1;e.containerWidth>900?v=5:e.containerWidth>700?v=4:e.containerWidth>576&&(v=3);const y=e.showSelectedFiles&&!t,b=e.recoveredState?Object.keys(e.recoveredState.files).length:null,w=e.files?Object.keys(e.files).filter((t=>e.files[t].isGhost)).length:null,x=n("div",{className:g,"data-uppy-theme":e.theme,"data-uppy-num-acquirers":e.acquirers.length,"data-uppy-drag-drop-supported":!e.disableLocalFiles&&o(),"aria-hidden":e.inline?"false":e.isHidden,"aria-disabled":e.disabled,"aria-label":e.inline?e.i18n("dashboardTitle"):e.i18n("dashboardWindowTitle"),onPaste:e.handlePaste,onDragOver:e.handleDragOver,onDragLeave:e.handleDragLeave,onDrop:e.handleDrop},n("div",{"aria-hidden":"true",className:"uppy-Dashboard-overlay",tabIndex:-1,onClick:e.handleClickOutside}),n("div",{className:"uppy-Dashboard-inner","aria-modal":!e.inline&&"true",role:!e.inline&&"dialog",style:{width:e.inline&&e.width?e.width:"",height:e.inline&&e.height?e.height:""}},e.inline?null:n("button",{className:"uppy-u-reset uppy-Dashboard-close",type:"button","aria-label":e.i18n("closeModal"),title:e.i18n("closeModal"),onClick:e.closeModal},n("span",{"aria-hidden":"true"},"×")),n("div",{className:"uppy-Dashboard-innerWrap"},n("div",{className:"uppy-Dashboard-dropFilesHereHint"},e.i18n("dropHint")),y&&n(c,e),b&&n("div",{className:"uppy-Dashboard-serviceMsg"},n("svg",{className:"uppy-Dashboard-serviceMsg-icon","aria-hidden":"true",focusable:"false",width:"21",height:"16",viewBox:"0 0 24 19"},n("g",{transform:"translate(0 -1)",fill:"none",fillRule:"evenodd"},n("path",{d:"M12.857 1.43l10.234 17.056A1 1 0 0122.234 20H1.766a1 1 0 01-.857-1.514L11.143 1.429a1 1 0 011.714 0z",fill:"#FFD300"}),n("path",{fill:"#000",d:"M11 6h2l-.3 8h-1.4z"}),n("circle",{fill:"#000",cx:"12",cy:"17",r:"1"}))),n("strong",{className:"uppy-Dashboard-serviceMsg-title"},e.i18n("sessionRestored")),n("div",{className:"uppy-Dashboard-serviceMsg-text"},w>0?e.i18n("recoveredXFiles",{smart_count:w}):e.i18n("recoveredAllFiles"))),y?n(a,s({},e,{itemsPerRow:v})):n(l,s({},e,{isSizeMD:i})),n(f,null,e.showAddFilesPanel?n(d,s({key:"AddFiles"},e,{isSizeMD:i})):null),n(f,null,e.fileCardFor?n(p,s({key:"FileCard"},e)):null),n(f,null,e.activePickerPanel?n(h,s({key:"Picker"},e)):null),n(f,null,e.showFileEditor?n(u,s({key:"Editor"},e)):null),n("div",{className:"uppy-Dashboard-progressindicators"},e.progressindicators.map((t=>e.uppy.getPlugin(t.id).render(e.state)))))));return n("div",{className:m,dir:e.direction},x)}},4477:(e,t,i)=>{const{h:s}=i(6400),n=i(4184);e.exports=function(e){const t=e.files[e.fileCardFor];return s("div",{className:n("uppy-DashboardContent-panel",e.className),role:"tabpanel","data-uppy-panelType":"FileEditor",id:"uppy-DashboardContent-panel--editor"},s("div",{className:"uppy-DashboardContent-bar"},s("div",{className:"uppy-DashboardContent-title",role:"heading","aria-level":"1"},e.i18nArray("editing",{file:s("span",{className:"uppy-DashboardContent-titleFile"},t.meta?t.meta.name:t.name)})),s("button",{className:"uppy-DashboardContent-back",type:"button",onClick:e.hideAllPanels},e.i18n("cancel")),s("button",{className:"uppy-DashboardContent-save",type:"button",onClick:e.saveFileEditor},e.i18n("save"))),s("div",{className:"uppy-DashboardContent-panelBody"},e.editors.map((t=>e.uppy.getPlugin(t.id).render(e.state)))))}},5261:(e,t,i)=>{const{h:s,Component:n}=i(6400),r=i(4184),{nanoid:o}=i(2961),a=i(1882),l=i(8805),d=i(9282);e.exports=class extends n{constructor(e){super(e),this.form=document.createElement("form"),this.updateMeta=(e,t)=>{this.setState((i=>{let{formState:s}=i;return{formState:{...s,[t]:e}}}))},this.handleSave=e=>{e.preventDefault();const t=this.props.fileCardFor;this.props.saveFileCard(this.state.formState,t)},this.handleCancel=()=>{this.props.toggleFileCard(!1)},this.saveOnEnter=e=>{if(13===e.keyCode){e.stopPropagation(),e.preventDefault();const t=this.props.files[this.props.fileCardFor];this.props.saveFileCard(this.state.formState,t.id)}},this.renderMetaFields=()=>{const e=this.getMetaFields()||[],t={text:"uppy-u-reset uppy-c-textInput uppy-Dashboard-FileCard-input"};return e.map((e=>{const i=`uppy-Dashboard-FileCard-input-${e.id}`,n=this.props.requiredMetaFields.includes(e.id);return s("fieldset",{key:e.id,className:"uppy-Dashboard-FileCard-fieldset"},s("label",{className:"uppy-Dashboard-FileCard-label",htmlFor:i},e.name),void 0!==e.render?e.render({value:this.state.formState[e.id],onChange:t=>this.updateMeta(t,e.id),fieldCSSClasses:t,required:n,form:this.form.id},s):s("input",{className:t.text,id:i,form:this.form.id,type:e.type||"text",required:n,value:this.state.formState[e.id],placeholder:e.placeholder,onKeyUp:"form"in HTMLInputElement.prototype?void 0:this.saveOnEnter,onKeyDown:"form"in HTMLInputElement.prototype?void 0:this.saveOnEnter,onKeyPress:"form"in HTMLInputElement.prototype?void 0:this.saveOnEnter,onInput:t=>this.updateMeta(t.target.value,e.id),"data-uppy-super-focusable":!0}))}))};const t=this.props.files[this.props.fileCardFor],i=this.getMetaFields()||[],n={};i.forEach((e=>{n[e.id]=t.meta[e.id]||""})),this.state={formState:n},this.form.id=o()}componentWillMount(){this.form.addEventListener("submit",this.handleSave),document.body.appendChild(this.form)}componentWillUnmount(){this.form.removeEventListener("submit",this.handleSave),document.body.removeChild(this.form)}getMetaFields(){return"function"==typeof this.props.metaFields?this.props.metaFields(this.props.files[this.props.fileCardFor]):this.props.metaFields}render(){const e=this.props.files[this.props.fileCardFor],t=this.props.canEditFile(e);return s("div",{className:r("uppy-Dashboard-FileCard",this.props.className),"data-uppy-panelType":"FileCard",onDragOver:l,onDragLeave:l,onDrop:l,onPaste:l},s("div",{className:"uppy-DashboardContent-bar"},s("div",{className:"uppy-DashboardContent-title",role:"heading","aria-level":"1"},this.props.i18nArray("editing",{file:s("span",{className:"uppy-DashboardContent-titleFile"},e.meta?e.meta.name:e.name)})),s("button",{className:"uppy-DashboardContent-back",type:"button",form:this.form.id,title:this.props.i18n("finishEditingFile"),onClick:this.handleCancel},this.props.i18n("cancel"))),s("div",{className:"uppy-Dashboard-FileCard-inner"},s("div",{className:"uppy-Dashboard-FileCard-preview",style:{backgroundColor:a(e.type).color}},s(d,{file:e}),t&&s("button",{type:"button",className:"uppy-u-reset uppy-c-btn uppy-Dashboard-FileCard-edit",onClick:t=>{this.handleSave(t),this.props.openFileEditor(e)},form:this.form.id},this.props.i18n("editFile"))),s("div",{className:"uppy-Dashboard-FileCard-info"},this.renderMetaFields()),s("div",{className:"uppy-Dashboard-FileCard-actions"},s("button",{className:"uppy-u-reset uppy-c-btn uppy-c-btn-primary uppy-Dashboard-FileCard-actionsBtn",type:"form"in HTMLButtonElement.prototype?"submit":"button",onClick:"form"in HTMLButtonElement.prototype?void 0:this.handleSave,form:this.form.id},this.props.i18n("saveChanges")),s("button",{className:"uppy-u-reset uppy-c-btn uppy-c-btn-link uppy-Dashboard-FileCard-actionsBtn",type:"button",onClick:this.handleCancel,form:this.form.id},this.props.i18n("cancel")))))}}},6757:(e,t,i)=>{const{h:s}=i(6400),n=i(818);function r(e){let{file:t,uploadInProgressOrComplete:i,metaFields:n,canEditFile:r,i18n:o,onClick:a}=e;return!i&&n&&n.length>0||!i&&r(t)?s("button",{className:"uppy-u-reset uppy-Dashboard-Item-action uppy-Dashboard-Item-action--edit",type:"button","aria-label":o("editFileWithFilename",{file:t.meta.name}),title:o("editFileWithFilename",{file:t.meta.name}),onClick:()=>a()},s("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon",width:"14",height:"14",viewBox:"0 0 14 14"},s("g",{fillRule:"evenodd"},s("path",{d:"M1.5 10.793h2.793A1 1 0 0 0 5 10.5L11.5 4a1 1 0 0 0 0-1.414L9.707.793a1 1 0 0 0-1.414 0l-6.5 6.5A1 1 0 0 0 1.5 8v2.793zm1-1V8L9 1.5l1.793 1.793-6.5 6.5H2.5z",fillRule:"nonzero"}),s("rect",{x:"1",y:"12.293",width:"11",height:"1",rx:".5"}),s("path",{fillRule:"nonzero",d:"M6.793 2.5L9.5 5.207l.707-.707L7.5 1.793z"})))):null}function o(e){let{i18n:t,onClick:i,file:n}=e;return s("button",{className:"uppy-u-reset uppy-Dashboard-Item-action uppy-Dashboard-Item-action--remove",type:"button","aria-label":t("removeFile",{file:n.meta.name}),title:t("removeFile",{file:n.meta.name}),onClick:()=>i()},s("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon",width:"18",height:"18",viewBox:"0 0 18 18"},s("path",{d:"M9 0C4.034 0 0 4.034 0 9s4.034 9 9 9 9-4.034 9-9-4.034-9-9-9z"}),s("path",{fill:"#FFF",d:"M13 12.222l-.778.778L9 9.778 5.778 13 5 12.222 8.222 9 5 5.778 5.778 5 9 8.222 12.222 5l.778.778L9.778 9z"})))}function a(e){const{i18n:t}=e;return s("button",{className:"uppy-u-reset uppy-Dashboard-Item-action uppy-Dashboard-Item-action--copyLink",type:"button","aria-label":t("copyLink"),title:t("copyLink"),onClick:t=>((e,t)=>{n(t.file.uploadURL,t.i18n("copyLinkToClipboardFallback")).then((()=>{t.uppy.log("Link copied to clipboard."),t.uppy.info(t.i18n("copyLinkToClipboardSuccess"),"info",3e3)})).catch(t.uppy.log).then((()=>e.target.focus({preventScroll:!0})))})(t,e)},s("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon",width:"14",height:"14",viewBox:"0 0 14 12"},s("path",{d:"M7.94 7.703a2.613 2.613 0 0 1-.626 2.681l-.852.851a2.597 2.597 0 0 1-1.849.766A2.616 2.616 0 0 1 2.764 7.54l.852-.852a2.596 2.596 0 0 1 2.69-.625L5.267 7.099a1.44 1.44 0 0 0-.833.407l-.852.851a1.458 1.458 0 0 0 1.03 2.486c.39 0 .755-.152 1.03-.426l.852-.852c.231-.231.363-.522.406-.824l1.04-1.038zm4.295-5.937A2.596 2.596 0 0 0 10.387 1c-.698 0-1.355.272-1.849.766l-.852.851a2.614 2.614 0 0 0-.624 2.688l1.036-1.036c.041-.304.173-.6.407-.833l.852-.852c.275-.275.64-.426 1.03-.426a1.458 1.458 0 0 1 1.03 2.486l-.852.851a1.442 1.442 0 0 1-.824.406l-1.04 1.04a2.596 2.596 0 0 0 2.683-.628l.851-.85a2.616 2.616 0 0 0 0-3.697zm-6.88 6.883a.577.577 0 0 0 .82 0l3.474-3.474a.579.579 0 1 0-.819-.82L5.355 7.83a.579.579 0 0 0 0 .819z"})))}e.exports=function(e){const{uppy:t,file:i,uploadInProgressOrComplete:n,canEditFile:l,metaFields:d,showLinkToFileUploadResult:h,showRemoveButton:u,i18n:c,toggleFileCard:p,openFileEditor:f}=e;return s("div",{className:"uppy-Dashboard-Item-actionWrapper"},s(r,{i18n:c,file:i,uploadInProgressOrComplete:n,canEditFile:l,metaFields:d,onClick:()=>{d&&d.length>0?p(!0,i.id):f(i)}}),h&&i.uploadURL?s(a,{file:i,uppy:t,i18n:c}):null,u?s(o,{i18n:c,file:i,uppy:t,onClick:()=>e.uppy.removeFile(i.id,"removed-by-user")}):null)}},3844:(e,t,i)=>{const{h:s,Fragment:n}=i(6400),r=i(5158),o=i(469),a=i(8092),l=e=>{let{file:t,onClick:i}=e;return t.error?s("button",{className:"uppy-u-reset uppy-Dashboard-Item-errorDetails","aria-label":t.error,"data-microtip-position":"bottom","data-microtip-size":"medium",onClick:i,type:"button"},"?"):null};e.exports=function(e){const{file:t}=e;return s("div",{className:"uppy-Dashboard-Item-fileInfo","data-uppy-file-source":t.source},s("div",{className:"uppy-Dashboard-Item-fileName"},(e=>{const{author:t,name:i}=e.file.meta;return s("div",{className:"uppy-Dashboard-Item-name",title:i},o(i,e.containerWidth<=352?35:e.containerWidth<=576?60:t?20:30))})(e),s(l,{file:e.file,onClick:()=>alert(e.file.error)})),s("div",{className:"uppy-Dashboard-Item-status"},(e=>{const{author:t}=e.file.meta,{providerName:i}=e.file.remote;return t?s("div",{className:"uppy-Dashboard-Item-author"},s("a",{href:`${t.url}?utm_source=Companion&utm_medium=referral`,target:"_blank",rel:"noopener noreferrer"},o(t.name,13)),i?s(n,null," · ",i," · "):null):null})(e),(e=>e.file.size&&s("div",{className:"uppy-Dashboard-Item-statusSize"},r(e.file.size)))(e),(e=>e.file.isGhost&&s("span",null," • ",s("button",{className:"uppy-u-reset uppy-c-btn uppy-Dashboard-Item-reSelect",type:"button",onClick:e.toggleAddFilesPanel},e.i18n("reSelect"))))(e)),s(a,{file:e.file,i18n:e.i18n,toggleFileCard:e.toggleFileCard,metaFields:e.metaFields}))}},6012:(e,t,i)=>{const{h:s}=i(6400),n=i(9282),r=i(8092),o=i(1882);e.exports=function(e){return s("div",{className:"uppy-Dashboard-Item-previewInnerWrap",style:{backgroundColor:o(e.file.type).color}},e.showLinkToFileUploadResult&&e.file.uploadURL&&s("a",{className:"uppy-Dashboard-Item-previewLink",href:e.file.uploadURL,rel:"noreferrer noopener",target:"_blank","aria-label":e.file.meta.name},s("span",{hidden:!0},e.file.meta.name)),s(n,{file:e.file}),s(r,{file:e.file,i18n:e.i18n,toggleFileCard:e.toggleFileCard,metaFields:e.metaFields}))}},1911:(e,t,i)=>{const{h:s}=i(6400);function n(e){return e.isUploaded?e.i18n("uploadComplete"):e.error?e.i18n("retryUpload"):e.resumableUploads?e.file.isPaused?e.i18n("resumeUpload"):e.i18n("pauseUpload"):e.individualCancellation?e.i18n("cancelUpload"):""}function r(e){return s("div",{className:"uppy-Dashboard-Item-progress"},s("button",{className:"uppy-u-reset uppy-Dashboard-Item-progressIndicator",type:"button","aria-label":n(e),title:n(e),onClick:()=>function(e){e.isUploaded||(!e.error||e.hideRetryButton?e.resumableUploads&&!e.hidePauseResumeButton?e.uppy.pauseResume(e.file.id):e.individualCancellation&&!e.hideCancelButton&&e.uppy.removeFile(e.file.id):e.uppy.retryUpload(e.file.id))}(e)},e.children))}function o(e){let{children:t}=e;return s("svg",{"aria-hidden":"true",focusable:"false",width:"70",height:"70",viewBox:"0 0 36 36",className:"uppy-c-icon uppy-Dashboard-Item-progressIcon--circle"},t)}function a(e){let{progress:t}=e;const i=2*Math.PI*15;return s("g",null,s("circle",{className:"uppy-Dashboard-Item-progressIcon--bg",r:"15",cx:"18",cy:"18","stroke-width":"2",fill:"none"}),s("circle",{className:"uppy-Dashboard-Item-progressIcon--progress",r:"15",cx:"18",cy:"18",transform:"rotate(-90, 18, 18)",fill:"none","stroke-width":"2","stroke-dasharray":i,"stroke-dashoffset":i-i/100*t}))}e.exports=function(e){return e.file.progress.uploadStarted?e.isUploaded?s("div",{className:"uppy-Dashboard-Item-progress"},s("div",{className:"uppy-Dashboard-Item-progressIndicator"},s(o,null,s("circle",{r:"15",cx:"18",cy:"18",fill:"#1bb240"}),s("polygon",{className:"uppy-Dashboard-Item-progressIcon--check",transform:"translate(2, 3)",points:"14 22.5 7 15.2457065 8.99985857 13.1732815 14 18.3547104 22.9729883 9 25 11.1005634"})))):e.recoveredState?void 0:e.error&&!e.hideRetryButton?s(r,e,s("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon uppy-Dashboard-Item-progressIcon--retry",width:"28",height:"31",viewBox:"0 0 16 19"},s("path",{d:"M16 11a8 8 0 1 1-8-8v2a6 6 0 1 0 6 6h2z"}),s("path",{d:"M7.9 3H10v2H7.9z"}),s("path",{d:"M8.536.5l3.535 3.536-1.414 1.414L7.12 1.914z"}),s("path",{d:"M10.657 2.621l1.414 1.415L8.536 7.57 7.12 6.157z"}))):e.resumableUploads&&!e.hidePauseResumeButton?s(r,e,s(o,null,s(a,{progress:e.file.progress.percentage}),e.file.isPaused?s("polygon",{className:"uppy-Dashboard-Item-progressIcon--play",transform:"translate(3, 3)",points:"12 20 12 10 20 15"}):s("g",{className:"uppy-Dashboard-Item-progressIcon--pause",transform:"translate(14.5, 13)"},s("rect",{x:"0",y:"0",width:"2",height:"10",rx:"0"}),s("rect",{x:"5",y:"0",width:"2",height:"10",rx:"0"})))):e.resumableUploads||!e.individualCancellation||e.hideCancelButton?s("div",{className:"uppy-Dashboard-Item-progress"},s("div",{className:"uppy-Dashboard-Item-progressIndicator"},s(o,null,s(a,{progress:e.file.progress.percentage})))):s(r,e,s(o,null,s(a,{progress:e.file.progress.percentage}),s("polygon",{className:"cancel",transform:"translate(2, 2)",points:"19.8856516 11.0625 16 14.9481516 12.1019737 11.0625 11.0625 12.1143484 14.9481516 16 11.0625 19.8980263 12.1019737 20.9375 16 17.0518484 19.8856516 20.9375 20.9375 19.8980263 17.0518484 16 20.9375 12"}))):null}},8092:(e,t,i)=>{const{h:s}=i(6400);e.exports=function(e){const{file:t,toggleFileCard:i,i18n:n,metaFields:r}=e,{missingRequiredMetaFields:o}=t;if(null==o||!o.length)return null;const a=o.map((e=>((e,t)=>t.filter((t=>t.id===e))[0].name)(e,r))).join(", ");return s("div",{className:"uppy-Dashboard-Item-errorMessage"},n("missingRequiredMetaFields",{smart_count:o.length,fields:a})," ",s("button",{type:"button",class:"uppy-u-reset uppy-Dashboard-Item-errorMessageBtn",onClick:()=>i(!0,t.id)},n("editFile")))}},5845:(e,t,i)=>{const{h:s,Component:n}=i(6400),r=i(4184),o=i(81),a=i(6012),l=i(1911),d=i(3844),h=i(6757);e.exports=class extends n{componentDidMount(){const{file:e}=this.props;e.preview||this.props.handleRequestThumbnail(e)}shouldComponentUpdate(e){return!o(this.props,e)}componentDidUpdate(){const{file:e}=this.props;e.preview||this.props.handleRequestThumbnail(e)}componentWillUnmount(){const{file:e}=this.props;e.preview||this.props.handleCancelThumbnail(e)}render(){const{file:e}=this.props,t=e.progress.preprocess||e.progress.postprocess,i=e.progress.uploadComplete&&!t&&!e.error,n=e.progress.uploadStarted||t,o=e.progress.uploadStarted&&!e.progress.uploadComplete||t,u=e.error||!1,{isGhost:c}=e;let p=(this.props.individualCancellation||!o)&&!i;i&&this.props.showRemoveButtonAfterComplete&&(p=!0);const f=r({"uppy-Dashboard-Item":!0,"is-inprogress":o&&!this.props.recoveredState,"is-processing":t,"is-complete":i,"is-error":!!u,"is-resumable":this.props.resumableUploads,"is-noIndividualCancellation":!this.props.individualCancellation,"is-ghost":c});return s("div",{className:f,id:`uppy_${e.id}`,role:this.props.role},s("div",{className:"uppy-Dashboard-Item-preview"},s(a,{file:e,showLinkToFileUploadResult:this.props.showLinkToFileUploadResult,i18n:this.props.i18n,toggleFileCard:this.props.toggleFileCard,metaFields:this.props.metaFields}),s(l,{uppy:this.props.uppy,file:e,error:u,isUploaded:i,hideRetryButton:this.props.hideRetryButton,hideCancelButton:this.props.hideCancelButton,hidePauseResumeButton:this.props.hidePauseResumeButton,recoveredState:this.props.recoveredState,showRemoveButtonAfterComplete:this.props.showRemoveButtonAfterComplete,resumableUploads:this.props.resumableUploads,individualCancellation:this.props.individualCancellation,i18n:this.props.i18n})),s("div",{className:"uppy-Dashboard-Item-fileInfoAndButtons"},s(d,{file:e,id:this.props.id,acquirers:this.props.acquirers,containerWidth:this.props.containerWidth,i18n:this.props.i18n,toggleAddFilesPanel:this.props.toggleAddFilesPanel,toggleFileCard:this.props.toggleFileCard,metaFields:this.props.metaFields}),s(h,{file:e,metaFields:this.props.metaFields,showLinkToFileUploadResult:this.props.showLinkToFileUploadResult,showRemoveButton:p,canEditFile:this.props.canEditFile,uploadInProgressOrComplete:n,toggleFileCard:this.props.toggleFileCard,openFileEditor:this.props.openFileEditor,uppy:this.props.uppy,i18n:this.props.i18n})))}}},8689:(e,t,i)=>{function s(){return s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(e[s]=i[s])}return e},s.apply(this,arguments)}const n=i(4184),{h:r}=i(6400),o=i(5845),a=i(4825);e.exports=e=>{const t=0===e.totalFileCount,i=n("uppy-Dashboard-files",{"uppy-Dashboard-files--noFiles":t}),l=1===e.itemsPerRow?71:200,d={id:e.id,error:e.error,i18n:e.i18n,uppy:e.uppy,acquirers:e.acquirers,resumableUploads:e.resumableUploads,individualCancellation:e.individualCancellation,hideRetryButton:e.hideRetryButton,hidePauseResumeButton:e.hidePauseResumeButton,hideCancelButton:e.hideCancelButton,showLinkToFileUploadResult:e.showLinkToFileUploadResult,showRemoveButtonAfterComplete:e.showRemoveButtonAfterComplete,isWide:e.isWide,metaFields:e.metaFields,recoveredState:e.recoveredState,toggleFileCard:e.toggleFileCard,handleRequestThumbnail:e.handleRequestThumbnail,handleCancelThumbnail:e.handleCancelThumbnail},h=Object.keys(e.files);e.recoveredState&&h.sort(((t,i)=>e.files[i].isGhost-e.files[t].isGhost));const u=function(e,t){const i=[];let s=[];return e.forEach((e=>{s.length<t?s.push(e):(i.push(s),s=[e])})),s.length&&i.push(s),i}(h,e.itemsPerRow);return r(a,{class:i,role:"list",data:u,renderRow:t=>r("div",{role:"presentation",key:t[0]},t.map((t=>r(o,s({key:t,uppy:e.uppy},d,{role:"listitem",openFileEditor:e.openFileEditor,canEditFile:e.canEditFile,toggleAddFilesPanel:e.toggleAddFilesPanel,file:e.files[t]}))))),rowHeight:l})}},9282:(e,t,i)=>{const{h:s}=i(6400),n=i(1882);e.exports=function(e){const{file:t}=e;if(t.preview)return s("img",{className:"uppy-Dashboard-Item-previewImg",alt:t.name,src:t.preview});const{color:i,icon:r}=n(t.type);return s("div",{className:"uppy-Dashboard-Item-previewIconWrap"},s("span",{className:"uppy-Dashboard-Item-previewIcon",style:{color:i}},r),s("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-Dashboard-Item-previewIconBg",width:"58",height:"76",viewBox:"0 0 58 76"},s("rect",{fill:"#FFF",width:"58",height:"76",rx:"3",fillRule:"evenodd"})))}},5859:(e,t,i)=>{const{h:s}=i(6400),n=i(4184),r=i(8805);e.exports=function(e){return s("div",{className:n("uppy-DashboardContent-panel",e.className),role:"tabpanel","data-uppy-panelType":"PickerPanel",id:`uppy-DashboardContent-panel--${e.activePickerPanel.id}`,onDragOver:r,onDragLeave:r,onDrop:r,onPaste:r},s("div",{className:"uppy-DashboardContent-bar"},s("div",{className:"uppy-DashboardContent-title",role:"heading","aria-level":"1"},e.i18n("importFrom",{name:e.activePickerPanel.name})),s("button",{className:"uppy-DashboardContent-back",type:"button",onClick:e.hideAllPanels},e.i18n("cancel"))),s("div",{className:"uppy-DashboardContent-panelBody"},e.uppy.getPlugin(e.activePickerPanel.id).render(e.state)))}},7246:(e,t,i)=>{const{h:s}=i(6400),n="preprocessing",r="uploading";function o(e){switch(function(e,t,i,s){if(void 0===s&&(s={}),e)return"error";if(t)return"complete";if(i)return"paused";let o="waiting";const a=Object.keys(s);for(let e=0;e<a.length;e++){const{progress:t}=s[a[e]];if(t.uploadStarted&&!t.uploadComplete)return r;t.preprocess&&o!==r&&(o=n),t.postprocess&&o!==r&&o!==n&&(o="postprocessing")}return o}(e.isAllErrored,e.isAllComplete,e.isAllPaused,e.files)){case"uploading":return e.i18n("uploadingXFiles",{smart_count:e.inProgressNotPausedFiles.length});case"preprocessing":case"postprocessing":return e.i18n("processingXFiles",{smart_count:e.processingFiles.length});case"paused":return e.i18n("uploadPaused");case"waiting":return e.i18n("xFilesSelected",{smart_count:e.newFiles.length});case"complete":return e.i18n("uploadComplete")}}e.exports=function(e){let{allowNewUpload:t}=e;return t&&e.maxNumberOfFiles&&(t=e.totalFileCount<e.maxNumberOfFiles),s("div",{className:"uppy-DashboardContent-bar"},e.isAllComplete||e.hideCancelButton?s("div",null):s("button",{className:"uppy-DashboardContent-back",type:"button",onClick:()=>e.uppy.cancelAll()},e.i18n("cancel")),s("div",{className:"uppy-DashboardContent-title",role:"heading","aria-level":"1"},s(o,e)),t?s("button",{className:"uppy-DashboardContent-addMore",type:"button","aria-label":e.i18n("addMoreFiles"),title:e.i18n("addMoreFiles"),onClick:()=>e.toggleAddFilesPanel(!0)},s("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon",width:"15",height:"15",viewBox:"0 0 15 15"},s("path",{d:"M8 6.5h6a.5.5 0 0 1 .5.5v.5a.5.5 0 0 1-.5.5H8v6a.5.5 0 0 1-.5.5H7a.5.5 0 0 1-.5-.5V8h-6a.5.5 0 0 1-.5-.5V7a.5.5 0 0 1 .5-.5h6v-6A.5.5 0 0 1 7 0h.5a.5.5 0 0 1 .5.5v6z"})),s("span",{className:"uppy-DashboardContent-addMoreCaption"},e.i18n("addMore"))):s("div",null))}},9167:(e,t,i)=>{const{cloneElement:s,Component:n,toChildArray:r}=i(6400),o=i(4184),a="uppy-transition-slideDownUp";e.exports=class extends n{constructor(e){super(e),this.state={cachedChildren:null,className:""}}componentWillUpdate(e){const{cachedChildren:t}=this.state,i=r(e.children)[0];if(t===i)return null;const s={cachedChildren:i};i&&!t&&(s.className=`${a}-enter`,cancelAnimationFrame(this.animationFrame),clearTimeout(this.leaveTimeout),this.leaveTimeout=void 0,this.animationFrame=requestAnimationFrame((()=>{this.setState({className:`${a}-enter ${a}-enter-active`}),this.enterTimeout=setTimeout((()=>{this.setState({className:""})}),250)}))),t&&!i&&void 0===this.leaveTimeout&&(s.cachedChildren=t,s.className=`${a}-leave`,cancelAnimationFrame(this.animationFrame),clearTimeout(this.enterTimeout),this.enterTimeout=void 0,this.animationFrame=requestAnimationFrame((()=>{this.setState({className:`${a}-leave ${a}-leave-active`}),this.leaveTimeout=setTimeout((()=>{this.setState({cachedChildren:null,className:""})}),250)}))),this.setState(s)}render(){const{cachedChildren:e,className:t}=this.state;return e?s(e,{className:o(t,e.props.className)}):null}}},4825:(e,t,i)=>{function s(){return s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(e[s]=i[s])}return e},s.apply(this,arguments)}const{h:n,Component:r}=i(6400),o={position:"relative",width:"100%",minHeight:"100%"},a={position:"absolute",top:0,left:0,width:"100%",overflow:"visible"};e.exports=class extends r{constructor(e){super(e),this.handleScroll=()=>{this.setState({offset:this.base.scrollTop})},this.handleResize=()=>{this.resize()},this.focusElement=null,this.state={offset:0,height:0}}componentDidMount(){this.resize(),window.addEventListener("resize",this.handleResize)}componentWillUpdate(){this.base.contains(document.activeElement)&&(this.focusElement=document.activeElement)}componentDidUpdate(){this.focusElement&&this.focusElement.parentNode&&document.activeElement!==this.focusElement&&this.focusElement.focus(),this.focusElement=null,this.resize()}componentWillUnmount(){window.removeEventListener("resize",this.handleResize)}resize(){const{height:e}=this.state;e!==this.base.offsetHeight&&this.setState({height:this.base.offsetHeight})}render(e){let{data:t,rowHeight:i,renderRow:r,overscanCount:l=10,...d}=e;const{offset:h,height:u}=this.state;let c=Math.floor(h/i),p=Math.floor(u/i);l&&(c=Math.max(0,c-c%l),p+=l);const f=c+p+4,m=t.slice(c,f),g={...o,height:t.length*i},v={...a,top:c*i};return n("div",s({onScroll:this.handleScroll},d),n("div",{role:"presentation",style:g},n("div",{role:"presentation",style:v},m.map(r))))}}},3121:(e,t,i)=>{var s,n,r,o,a,l,d,h;function u(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var c=0;function p(e){return"__private_"+c+++"_"+e}const{h:f}=i(6400),{UIPlugin:m}=i(9429),g=i(3215),v=i(873),y=i(7753),b=i(1147),w=i(6361),x=i(4031),S=i(8958),{nanoid:_}=i(2961),T=i(3962),k=i(6673),C=i(845).default||i(845),P=i(9045),O=i(5519),$=i(5233);function F(){const e={};return e.promise=new Promise(((t,i)=>{e.resolve=t,e.reject=i})),e}function A(){return f("svg",{"aria-hidden":"true",focusable:"false",width:"30",height:"30",viewBox:"0 0 30 30"},f("path",{d:"M15 30c8.284 0 15-6.716 15-15 0-8.284-6.716-15-15-15C6.716 0 0 6.716 0 15c0 8.284 6.716 15 15 15zm4.258-12.676v6.846h-8.426v-6.846H5.204l9.82-12.364 9.82 12.364H19.26z"}))}e.exports=(n=p("openFileEditorWhenFilesAdded"),r=p("attachRenderFunctionToTarget"),o=p("isTargetSupported"),a=p("getAcquirers"),l=p("getProgressIndicators"),d=p("getEditors"),h=s=class extends m{constructor(e,t){var i;super(e,t),i=this,this.removeTarget=e=>{const t=this.getPluginState().targets.filter((t=>t.id!==e.id));this.setPluginState({targets:t})},this.addTarget=e=>{const t=e.id||e.constructor.name,i=e.title||t,s=e.type;if("acquirer"!==s&&"progressindicator"!==s&&"editor"!==s){const e="Dashboard: can only be targeted by plugins of types: acquirer, progressindicator, editor";return void this.uppy.log(e,"error")}const n={id:t,name:i,type:s},r=this.getPluginState().targets.slice();return r.push(n),this.setPluginState({targets:r}),this.el},this.hideAllPanels=()=>{const e=this.getPluginState(),t={activePickerPanel:!1,showAddFilesPanel:!1,activeOverlayType:null,fileCardFor:null,showFileEditor:!1};e.activePickerPanel===t.activePickerPanel&&e.showAddFilesPanel===t.showAddFilesPanel&&e.showFileEditor===t.showFileEditor&&e.activeOverlayType===t.activeOverlayType||this.setPluginState(t)},this.showPanel=e=>{const{targets:t}=this.getPluginState(),i=t.filter((t=>"acquirer"===t.type&&t.id===e))[0];this.setPluginState({activePickerPanel:i,activeOverlayType:"PickerPanel"})},this.canEditFile=e=>{const{targets:t}=this.getPluginState();return u(this,d)[d](t).some((t=>this.uppy.getPlugin(t.id).canEditFile(e)))},this.openFileEditor=e=>{const{targets:t}=this.getPluginState(),i=u(this,d)[d](t);this.setPluginState({showFileEditor:!0,fileCardFor:e.id||null,activeOverlayType:"FileEditor"}),i.forEach((t=>{this.uppy.getPlugin(t.id).selectFile(e)}))},this.saveFileEditor=()=>{const{targets:e}=this.getPluginState();u(this,d)[d](e).forEach((e=>{this.uppy.getPlugin(e.id).save()})),this.hideAllPanels()},this.openModal=()=>{const{promise:e,resolve:t}=F();if(this.savedScrollPosition=window.pageYOffset,this.savedActiveElement=document.activeElement,this.opts.disablePageScrollWhenModalOpen&&document.body.classList.add("uppy-Dashboard-isFixed"),this.opts.animateOpenClose&&this.getPluginState().isClosing){const e=()=>{this.setPluginState({isHidden:!1}),this.el.removeEventListener("animationend",e,!1),t()};this.el.addEventListener("animationend",e,!1)}else this.setPluginState({isHidden:!1}),t();return this.opts.browserBackButtonClose&&this.updateBrowserHistory(),document.addEventListener("keydown",this.handleKeyDownInModal),this.uppy.emit("dashboard:modal-open"),e},this.closeModal=function(e){void 0===e&&(e={});const{manualClose:t=!0}=e,{isHidden:s,isClosing:n}=i.getPluginState();if(s||n)return;const{promise:r,resolve:o}=F();if(i.opts.disablePageScrollWhenModalOpen&&document.body.classList.remove("uppy-Dashboard-isFixed"),i.opts.animateOpenClose){i.setPluginState({isClosing:!0});const e=()=>{i.setPluginState({isHidden:!0,isClosing:!1}),i.superFocus.cancel(),i.savedActiveElement.focus(),i.el.removeEventListener("animationend",e,!1),o()};i.el.addEventListener("animationend",e,!1)}else i.setPluginState({isHidden:!0}),i.superFocus.cancel(),i.savedActiveElement.focus(),o();var a;return document.removeEventListener("keydown",i.handleKeyDownInModal),t&&i.opts.browserBackButtonClose&&null!=(a=history.state)&&a[i.modalName]&&history.back(),i.uppy.emit("dashboard:modal-closed"),r},this.isModalOpen=()=>!this.getPluginState().isHidden||!1,this.requestCloseModal=()=>this.opts.onRequestCloseModal?this.opts.onRequestCloseModal():this.closeModal(),this.setDarkModeCapability=e=>{const{capabilities:t}=this.uppy.getState();this.uppy.setState({capabilities:{...t,darkMode:e}})},this.handleSystemDarkModeChange=e=>{const t=e.matches;this.uppy.log("[Dashboard] Dark mode is "+(t?"on":"off")),this.setDarkModeCapability(t)},this.toggleFileCard=(e,t)=>{const i=this.uppy.getFile(t);e?this.uppy.emit("dashboard:file-edit-start",i):this.uppy.emit("dashboard:file-edit-complete",i),this.setPluginState({fileCardFor:e?t:null,activeOverlayType:e?"FileCard":null})},this.toggleAddFilesPanel=e=>{this.setPluginState({showAddFilesPanel:e,activeOverlayType:e?"AddFiles":null})},this.addFiles=e=>{const t=e.map((e=>({source:this.id,name:e.name,type:e.type,data:e,meta:{relativePath:e.relativePath||null}})));try{this.uppy.addFiles(t)}catch(e){this.uppy.log(e)}},this.startListeningToResize=()=>{this.resizeObserver=new ResizeObserver((e=>{const t=e[0],{width:i,height:s}=t.contentRect;this.uppy.log(`[Dashboard] resized: ${i} / ${s}`,"debug"),this.setPluginState({containerWidth:i,containerHeight:s,areInsidesReadyToBeVisible:!0})})),this.resizeObserver.observe(this.el.querySelector(".uppy-Dashboard-inner")),this.makeDashboardInsidesVisibleAnywayTimeout=setTimeout((()=>{const e=this.getPluginState(),t=!this.opts.inline&&e.isHidden;e.areInsidesReadyToBeVisible||t||(this.uppy.log("[Dashboard] resize event didn't fire on time: defaulted to mobile layout","debug"),this.setPluginState({areInsidesReadyToBeVisible:!0}))}),1e3)},this.stopListeningToResize=()=>{this.resizeObserver.disconnect(),clearTimeout(this.makeDashboardInsidesVisibleAnywayTimeout)},this.recordIfFocusedOnUppyRecently=e=>{this.el.contains(e.target)?this.ifFocusedOnUppyRecently=!0:(this.ifFocusedOnUppyRecently=!1,this.superFocus.cancel())},this.disableAllFocusableElements=e=>{const t=w(this.el.querySelectorAll(P));e?t.forEach((e=>{const t=e.getAttribute("tabindex");t&&(e.dataset.inertTabindex=t),e.setAttribute("tabindex","-1")})):t.forEach((e=>{"inertTabindex"in e.dataset?e.setAttribute("tabindex",e.dataset.inertTabindex):e.removeAttribute("tabindex")})),this.dashboardIsDisabled=e},this.updateBrowserHistory=()=>{var e;null!=(e=history.state)&&e[this.modalName]||history.pushState({...history.state,[this.modalName]:!0},""),window.addEventListener("popstate",this.handlePopState,!1)},this.handlePopState=e=>{var t;!this.isModalOpen()||e.state&&e.state[this.modalName]||this.closeModal({manualClose:!1}),!this.isModalOpen()&&null!=(t=e.state)&&t[this.modalName]&&history.back()},this.handleKeyDownInModal=e=>{27===e.keyCode&&this.requestCloseModal(e),9===e.keyCode&&T.forModal(e,this.getPluginState().activeOverlayType,this.el)},this.handleClickOutside=()=>{this.opts.closeModalOnClickOutside&&this.requestCloseModal()},this.handlePaste=e=>{this.uppy.iteratePlugins((t=>{"acquirer"===t.type&&(null==t.handleRootPaste||t.handleRootPaste(e))}));const t=w(e.clipboardData.files);t.length>0&&(this.uppy.log("[Dashboard] Files pasted"),this.addFiles(t))},this.handleInputChange=e=>{e.preventDefault();const t=w(e.target.files);t.length>0&&(this.uppy.log("[Dashboard] Files selected through input"),this.addFiles(t))},this.handleDragOver=e=>{var t,i;e.preventDefault(),e.stopPropagation();const s=(()=>{let t=!0;return this.uppy.iteratePlugins((i=>{null!=i.canHandleRootDrop&&i.canHandleRootDrop(e)&&(t=!0)})),t})(),n=(()=>{const{types:t}=e.dataTransfer;return t.some((e=>"Files"===e))})();if(!s&&!n||this.opts.disabled||this.opts.disableLocalFiles&&(n||!s)||!this.uppy.getState().allowNewUpload)return e.dataTransfer.dropEffect="none",void clearTimeout(this.removeDragOverClassTimeout);e.dataTransfer.dropEffect="copy",clearTimeout(this.removeDragOverClassTimeout),this.setPluginState({isDraggingOver:!0}),null==(t=(i=this.opts).onDragOver)||t.call(i,e)},this.handleDragLeave=e=>{var t,i;e.preventDefault(),e.stopPropagation(),clearTimeout(this.removeDragOverClassTimeout),this.removeDragOverClassTimeout=setTimeout((()=>{this.setPluginState({isDraggingOver:!1})}),50),null==(t=(i=this.opts).onDragLeave)||t.call(i,e)},this.handleDrop=async e=>{var t,i;e.preventDefault(),e.stopPropagation(),clearTimeout(this.removeDragOverClassTimeout),this.setPluginState({isDraggingOver:!1}),this.uppy.iteratePlugins((t=>{"acquirer"===t.type&&(null==t.handleRootDrop||t.handleRootDrop(e))}));let s=!1;const n=await x(e.dataTransfer,{logDropError:e=>{this.uppy.log(e,"error"),s||(this.uppy.info(e.message,"error"),s=!0)}});n.length>0&&(this.uppy.log("[Dashboard] Files dropped"),this.addFiles(n)),null==(t=(i=this.opts).onDrop)||t.call(i,e)},this.handleRequestThumbnail=e=>{this.opts.waitForThumbnailsBeforeUpload||this.uppy.emit("thumbnail:request",e)},this.handleCancelThumbnail=e=>{this.opts.waitForThumbnailsBeforeUpload||this.uppy.emit("thumbnail:cancel",e)},this.handleKeyDownInInline=e=>{9===e.keyCode&&T.forInline(e,this.getPluginState().activeOverlayType,this.el)},this.handlePasteOnBody=e=>{this.el.contains(document.activeElement)&&this.handlePaste(e)},this.handleComplete=e=>{let{failed:t}=e;this.opts.closeAfterFinish&&0===t.length&&this.requestCloseModal()},this.handleCancelRestore=()=>{this.uppy.emit("restore-canceled")},Object.defineProperty(this,n,{writable:!0,value:e=>{const t=e[0];this.canEditFile(t)&&this.openFileEditor(t)}}),this.initEvents=()=>{if(this.opts.trigger&&!this.opts.inline){const e=b(this.opts.trigger);e?e.forEach((e=>e.addEventListener("click",this.openModal))):this.uppy.log("Dashboard modal trigger not found. Make sure `trigger` is set in Dashboard options, unless you are planning to call `dashboard.openModal()` method yourself","warning")}this.startListeningToResize(),document.addEventListener("paste",this.handlePasteOnBody),this.uppy.on("plugin-remove",this.removeTarget),this.uppy.on("file-added",this.hideAllPanels),this.uppy.on("dashboard:modal-closed",this.hideAllPanels),this.uppy.on("file-editor:complete",this.hideAllPanels),this.uppy.on("complete",this.handleComplete),document.addEventListener("focus",this.recordIfFocusedOnUppyRecently,!0),document.addEventListener("click",this.recordIfFocusedOnUppyRecently,!0),this.opts.inline&&this.el.addEventListener("keydown",this.handleKeyDownInInline),this.opts.autoOpenFileEditor&&this.uppy.on("files-added",u(this,n)[n])},this.removeEvents=()=>{const e=b(this.opts.trigger);!this.opts.inline&&e&&e.forEach((e=>e.removeEventListener("click",this.openModal))),this.stopListeningToResize(),document.removeEventListener("paste",this.handlePasteOnBody),window.removeEventListener("popstate",this.handlePopState,!1),this.uppy.off("plugin-remove",this.removeTarget),this.uppy.off("file-added",this.hideAllPanels),this.uppy.off("dashboard:modal-closed",this.hideAllPanels),this.uppy.off("file-editor:complete",this.hideAllPanels),this.uppy.off("complete",this.handleComplete),document.removeEventListener("focus",this.recordIfFocusedOnUppyRecently),document.removeEventListener("click",this.recordIfFocusedOnUppyRecently),this.opts.inline&&this.el.removeEventListener("keydown",this.handleKeyDownInInline),this.opts.autoOpenFileEditor&&this.uppy.off("files-added",u(this,n)[n])},this.superFocusOnEachUpdate=()=>{const e=this.el.contains(document.activeElement),t=document.activeElement===document.body||null===document.activeElement,i=0===this.uppy.getState().info.length,s=!this.opts.inline;i&&(s||e||t&&this.ifFocusedOnUppyRecently)?this.superFocus(this.el,this.getPluginState().activeOverlayType):this.superFocus.cancel()},this.afterUpdate=()=>{!this.opts.disabled||this.dashboardIsDisabled?(!this.opts.disabled&&this.dashboardIsDisabled&&this.disableAllFocusableElements(!1),this.superFocusOnEachUpdate()):this.disableAllFocusableElements(!0)},this.saveFileCard=(e,t)=>{this.uppy.setFileMeta(t,e),this.toggleFileCard(!1,t)},Object.defineProperty(this,r,{writable:!0,value:e=>{const t=this.uppy.getPlugin(e.id);return{...e,icon:t.icon||this.opts.defaultPickerIcon,render:t.render}}}),Object.defineProperty(this,o,{writable:!0,value:e=>{const t=this.uppy.getPlugin(e.id);return"function"!=typeof t.isSupported||t.isSupported()}}),Object.defineProperty(this,a,{writable:!0,value:C((e=>e.filter((e=>"acquirer"===e.type&&u(this,o)[o](e))).map(u(this,r)[r])))}),Object.defineProperty(this,l,{writable:!0,value:C((e=>e.filter((e=>"progressindicator"===e.type)).map(u(this,r)[r])))}),Object.defineProperty(this,d,{writable:!0,value:C((e=>e.filter((e=>"editor"===e.type)).map(u(this,r)[r])))}),this.render=e=>{const t=this.getPluginState(),{files:i,capabilities:s,allowNewUpload:n}=e,{newFiles:r,uploadStartedFiles:o,completeFiles:h,erroredFiles:c,inProgressFiles:p,inProgressNotPausedFiles:f,processingFiles:m,isUploadStarted:g,isAllComplete:v,isAllErrored:y,isAllPaused:b}=this.uppy.getObjectOfFilesPerState(),w=u(this,a)[a](t.targets),x=u(this,l)[l](t.targets),S=u(this,d)[d](t.targets);let _;return _="auto"===this.opts.theme?s.darkMode?"dark":"light":this.opts.theme,["files","folders","both"].indexOf(this.opts.fileManagerSelectionType)<0&&(this.opts.fileManagerSelectionType="files",console.warn(`Unsupported option for "fileManagerSelectionType". Using default of "${this.opts.fileManagerSelectionType}".`)),O({state:e,isHidden:t.isHidden,files:i,newFiles:r,uploadStartedFiles:o,completeFiles:h,erroredFiles:c,inProgressFiles:p,inProgressNotPausedFiles:f,processingFiles:m,isUploadStarted:g,isAllComplete:v,isAllErrored:y,isAllPaused:b,totalFileCount:Object.keys(i).length,totalProgress:e.totalProgress,allowNewUpload:n,acquirers:w,theme:_,disabled:this.opts.disabled,disableLocalFiles:this.opts.disableLocalFiles,direction:this.opts.direction,activePickerPanel:t.activePickerPanel,showFileEditor:t.showFileEditor,saveFileEditor:this.saveFileEditor,disableAllFocusableElements:this.disableAllFocusableElements,animateOpenClose:this.opts.animateOpenClose,isClosing:t.isClosing,progressindicators:x,editors:S,autoProceed:this.uppy.opts.autoProceed,id:this.id,closeModal:this.requestCloseModal,handleClickOutside:this.handleClickOutside,handleInputChange:this.handleInputChange,handlePaste:this.handlePaste,inline:this.opts.inline,showPanel:this.showPanel,hideAllPanels:this.hideAllPanels,i18n:this.i18n,i18nArray:this.i18nArray,uppy:this.uppy,note:this.opts.note,recoveredState:e.recoveredState,metaFields:t.metaFields,resumableUploads:s.resumableUploads||!1,individualCancellation:s.individualCancellation,isMobileDevice:s.isMobileDevice,fileCardFor:t.fileCardFor,toggleFileCard:this.toggleFileCard,toggleAddFilesPanel:this.toggleAddFilesPanel,showAddFilesPanel:t.showAddFilesPanel,saveFileCard:this.saveFileCard,openFileEditor:this.openFileEditor,canEditFile:this.canEditFile,width:this.opts.width,height:this.opts.height,showLinkToFileUploadResult:this.opts.showLinkToFileUploadResult,fileManagerSelectionType:this.opts.fileManagerSelectionType,proudlyDisplayPoweredByUppy:this.opts.proudlyDisplayPoweredByUppy,hideCancelButton:this.opts.hideCancelButton,hideRetryButton:this.opts.hideRetryButton,hidePauseResumeButton:this.opts.hidePauseResumeButton,showRemoveButtonAfterComplete:this.opts.showRemoveButtonAfterComplete,containerWidth:t.containerWidth,containerHeight:t.containerHeight,areInsidesReadyToBeVisible:t.areInsidesReadyToBeVisible,isTargetDOMEl:this.isTargetDOMEl,parentElement:this.el,allowedFileTypes:this.uppy.opts.restrictions.allowedFileTypes,maxNumberOfFiles:this.uppy.opts.restrictions.maxNumberOfFiles,requiredMetaFields:this.uppy.opts.restrictions.requiredMetaFields,showSelectedFiles:this.opts.showSelectedFiles,handleCancelRestore:this.handleCancelRestore,handleRequestThumbnail:this.handleRequestThumbnail,handleCancelThumbnail:this.handleCancelThumbnail,isDraggingOver:t.isDraggingOver,handleDragOver:this.handleDragOver,handleDragLeave:this.handleDragLeave,handleDrop:this.handleDrop})},this.discoverProviderPlugins=()=>{this.uppy.iteratePlugins((e=>{e&&!e.target&&e.opts&&e.opts.target===this.constructor&&this.addTarget(e)}))},this.install=()=>{this.setPluginState({isHidden:!0,fileCardFor:null,activeOverlayType:null,showAddFilesPanel:!1,activePickerPanel:!1,showFileEditor:!1,metaFields:this.opts.metaFields,targets:[],areInsidesReadyToBeVisible:!1,isDraggingOver:!1});const{inline:e,closeAfterFinish:t}=this.opts;if(e&&t)throw new Error("[Dashboard] `closeAfterFinish: true` cannot be used on an inline Dashboard, because an inline Dashboard cannot be closed at all. Either set `inline: false`, or disable the `closeAfterFinish` option.");const{allowMultipleUploads:i,allowMultipleUploadBatches:s}=this.uppy.opts;(i||s)&&t&&this.uppy.log("[Dashboard] When using `closeAfterFinish`, we recommended setting the `allowMultipleUploadBatches` option to `false` in the Uppy constructor. See https://uppy.io/docs/uppy/#allowMultipleUploads-true","warning");const{target:n}=this.opts;n&&this.mount(n,this),(this.opts.plugins||[]).forEach((e=>{const t=this.uppy.getPlugin(e);t&&t.mount(this,t)})),this.opts.disableStatusBar||this.uppy.use(g,{id:`${this.id}:StatusBar`,target:this,hideUploadButton:this.opts.hideUploadButton,hideRetryButton:this.opts.hideRetryButton,hidePauseResumeButton:this.opts.hidePauseResumeButton,hideCancelButton:this.opts.hideCancelButton,showProgressDetails:this.opts.showProgressDetails,hideAfterFinish:this.opts.hideProgressAfterFinish,locale:this.opts.locale,doneButtonHandler:this.opts.doneButtonHandler}),this.opts.disableInformer||this.uppy.use(v,{id:`${this.id}:Informer`,target:this}),this.opts.disableThumbnailGenerator||this.uppy.use(y,{id:`${this.id}:ThumbnailGenerator`,thumbnailWidth:this.opts.thumbnailWidth,thumbnailHeight:this.opts.thumbnailHeight,thumbnailType:this.opts.thumbnailType,waitForThumbnailsBeforeUpload:this.opts.waitForThumbnailsBeforeUpload,lazy:!this.opts.waitForThumbnailsBeforeUpload}),this.darkModeMediaQuery="undefined"!=typeof window&&window.matchMedia?window.matchMedia("(prefers-color-scheme: dark)"):null;const r=!!this.darkModeMediaQuery&&this.darkModeMediaQuery.matches;this.uppy.log("[Dashboard] Dark mode is "+(r?"on":"off")),this.setDarkModeCapability(r),"auto"===this.opts.theme&&this.darkModeMediaQuery.addListener(this.handleSystemDarkModeChange),this.discoverProviderPlugins(),this.initEvents()},this.uninstall=()=>{if(!this.opts.disableInformer){const e=this.uppy.getPlugin(`${this.id}:Informer`);e&&this.uppy.removePlugin(e)}if(!this.opts.disableStatusBar){const e=this.uppy.getPlugin(`${this.id}:StatusBar`);e&&this.uppy.removePlugin(e)}if(!this.opts.disableThumbnailGenerator){const e=this.uppy.getPlugin(`${this.id}:ThumbnailGenerator`);e&&this.uppy.removePlugin(e)}(this.opts.plugins||[]).forEach((e=>{const t=this.uppy.getPlugin(e);t&&t.unmount()})),"auto"===this.opts.theme&&this.darkModeMediaQuery.removeListener(this.handleSystemDarkModeChange),this.unmount(),this.removeEvents()},this.id=this.opts.id||"Dashboard",this.title="Dashboard",this.type="orchestrator",this.modalName=`uppy-Dashboard-${_()}`,this.defaultLocale=$;const s={target:"body",metaFields:[],trigger:null,inline:!1,width:750,height:550,thumbnailWidth:280,thumbnailType:"image/jpeg",waitForThumbnailsBeforeUpload:!1,defaultPickerIcon:A,showLinkToFileUploadResult:!1,showProgressDetails:!1,hideUploadButton:!1,hideCancelButton:!1,hideRetryButton:!1,hidePauseResumeButton:!1,hideProgressAfterFinish:!1,doneButtonHandler:()=>{this.uppy.reset(),this.requestCloseModal()},note:null,closeModalOnClickOutside:!1,closeAfterFinish:!1,disableStatusBar:!1,disableInformer:!1,disableThumbnailGenerator:!1,disablePageScrollWhenModalOpen:!0,animateOpenClose:!0,fileManagerSelectionType:"files",proudlyDisplayPoweredByUppy:!0,onRequestCloseModal:()=>this.closeModal(),showSelectedFiles:!0,showRemoveButtonAfterComplete:!1,browserBackButtonClose:!1,theme:"light",autoOpenFileEditor:!1,disabled:!1,disableLocalFiles:!1};this.opts={...s,...t},this.i18nInit(),this.superFocus=k(),this.ifFocusedOnUppyRecently=!1,this.makeDashboardInsidesVisibleAnywayTimeout=null,this.removeDragOverClassTimeout=null}onMount(){const e=this.el;S(e)||(e.dir="ltr")}},s.VERSION="2.1.4",h)},5233:e=>{e.exports={strings:{closeModal:"Close Modal",addMoreFiles:"Add more files",addingMoreFiles:"Adding more files",importFrom:"Import from %{name}",dashboardWindowTitle:"Uppy Dashboard Window (Press escape to close)",dashboardTitle:"Uppy Dashboard",copyLinkToClipboardSuccess:"Link copied to clipboard.",copyLinkToClipboardFallback:"Copy the URL below",copyLink:"Copy link",back:"Back",removeFile:"Remove file",editFile:"Edit file",editing:"Editing %{file}",finishEditingFile:"Finish editing file",saveChanges:"Save changes",myDevice:"My Device",dropHint:"Drop your files here",uploadComplete:"Upload complete",uploadPaused:"Upload paused",resumeUpload:"Resume upload",pauseUpload:"Pause upload",retryUpload:"Retry upload",cancelUpload:"Cancel upload",xFilesSelected:{0:"%{smart_count} file selected",1:"%{smart_count} files selected"},uploadingXFiles:{0:"Uploading %{smart_count} file",1:"Uploading %{smart_count} files"},processingXFiles:{0:"Processing %{smart_count} file",1:"Processing %{smart_count} files"},poweredBy:"Powered by %{uppy}",addMore:"Add more",editFileWithFilename:"Edit file %{file}",save:"Save",cancel:"Cancel",dropPasteFiles:"Drop files here or %{browseFiles}",dropPasteFolders:"Drop files here or %{browseFolders}",dropPasteBoth:"Drop files here, %{browseFiles} or %{browseFolders}",dropPasteImportFiles:"Drop files here, %{browseFiles} or import from:",dropPasteImportFolders:"Drop files here, %{browseFolders} or import from:",dropPasteImportBoth:"Drop files here, %{browseFiles}, %{browseFolders} or import from:",importFiles:"Import files from:",browseFiles:"browse files",browseFolders:"browse folders",recoveredXFiles:{0:"We could not fully recover 1 file. Please re-select it and resume the upload.",1:"We could not fully recover %{smart_count} files. Please re-select them and resume the upload."},recoveredAllFiles:"We restored all files. You can now resume the upload.",sessionRestored:"Session restored",reSelect:"Re-select",missingRequiredMetaFields:{0:"Missing required meta field: %{fields}.",1:"Missing required meta fields: %{fields}."}}}},818:e=>{e.exports=function(e,t){return t=t||"Copy the URL below",new Promise((i=>{const s=document.createElement("textarea");s.setAttribute("style",{position:"fixed",top:0,left:0,width:"2em",height:"2em",padding:0,border:"none",outline:"none",boxShadow:"none",background:"transparent"}),s.value=e,document.body.appendChild(s),s.select();const n=()=>{document.body.removeChild(s),window.prompt(t,e),i()};try{return document.execCommand("copy")?(document.body.removeChild(s),i()):n()}catch(e){return document.body.removeChild(s),n()}}))}},6673:(e,t,i)=>{const s=i(1296),n=i(9045),r=i(6470);e.exports=function(){let e=!1;return s(((t,i)=>{const s=r(t,i),o=s.contains(document.activeElement);if(o&&e)return;const a=s.querySelector("[data-uppy-super-focusable]");if(!o||a)if(a)a.focus({preventScroll:!0}),e=!0;else{const t=s.querySelector(n);null==t||t.focus({preventScroll:!0}),e=!1}}),260)}},6470:e=>{e.exports=function(e,t){if(t){const i=e.querySelector(`[data-uppy-paneltype="${t}"]`);if(i)return i}return e}},1882:(e,t,i)=>{const{h:s}=i(6400);e.exports=function(e){const t={color:"#838999",icon:s("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon",width:"25",height:"25",viewBox:"0 0 25 25"},s("g",{fill:"#A7AFB7",fillRule:"nonzero"},s("path",{d:"M5.5 22a.5.5 0 0 1-.5-.5v-18a.5.5 0 0 1 .5-.5h10.719a.5.5 0 0 1 .367.16l3.281 3.556a.5.5 0 0 1 .133.339V21.5a.5.5 0 0 1-.5.5h-14zm.5-1h13V7.25L16 4H6v17z"}),s("path",{d:"M15 4v3a1 1 0 0 0 1 1h3V7h-3V4h-1z"})))};if(!e)return t;const i=e.split("/")[0],n=e.split("/")[1];return"text"===i?{color:"#5a5e69",icon:s("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon",width:"25",height:"25",viewBox:"0 0 25 25"},s("path",{d:"M4.5 7h13a.5.5 0 1 1 0 1h-13a.5.5 0 0 1 0-1zm0 3h15a.5.5 0 1 1 0 1h-15a.5.5 0 1 1 0-1zm0 3h15a.5.5 0 1 1 0 1h-15a.5.5 0 1 1 0-1zm0 3h10a.5.5 0 1 1 0 1h-10a.5.5 0 1 1 0-1z",fill:"#5A5E69",fillRule:"nonzero"}))}:"image"===i?{color:"#686de0",icon:s("svg",{"aria-hidden":"true",focusable:"false",width:"25",height:"25",viewBox:"0 0 25 25"},s("g",{fill:"#686DE0",fillRule:"evenodd"},s("path",{d:"M5 7v10h15V7H5zm0-1h15a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1z",fillRule:"nonzero"}),s("path",{d:"M6.35 17.172l4.994-5.026a.5.5 0 0 1 .707 0l2.16 2.16 3.505-3.505a.5.5 0 0 1 .707 0l2.336 2.31-.707.72-1.983-1.97-3.505 3.505a.5.5 0 0 1-.707 0l-2.16-2.159-3.938 3.939-1.409.026z",fillRule:"nonzero"}),s("circle",{cx:"7.5",cy:"9.5",r:"1.5"})))}:"audio"===i?{color:"#068dbb",icon:s("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon",width:"25",height:"25",viewBox:"0 0 25 25"},s("path",{d:"M9.5 18.64c0 1.14-1.145 2-2.5 2s-2.5-.86-2.5-2c0-1.14 1.145-2 2.5-2 .557 0 1.079.145 1.5.396V7.25a.5.5 0 0 1 .379-.485l9-2.25A.5.5 0 0 1 18.5 5v11.64c0 1.14-1.145 2-2.5 2s-2.5-.86-2.5-2c0-1.14 1.145-2 2.5-2 .557 0 1.079.145 1.5.396V8.67l-8 2v7.97zm8-11v-2l-8 2v2l8-2zM7 19.64c.855 0 1.5-.484 1.5-1s-.645-1-1.5-1-1.5.484-1.5 1 .645 1 1.5 1zm9-2c.855 0 1.5-.484 1.5-1s-.645-1-1.5-1-1.5.484-1.5 1 .645 1 1.5 1z",fill:"#049BCF",fillRule:"nonzero"}))}:"video"===i?{color:"#19af67",icon:s("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon",width:"25",height:"25",viewBox:"0 0 25 25"},s("path",{d:"M16 11.834l4.486-2.691A1 1 0 0 1 22 10v6a1 1 0 0 1-1.514.857L16 14.167V17a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V9a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v2.834zM15 9H5v8h10V9zm1 4l5 3v-6l-5 3z",fill:"#19AF67",fillRule:"nonzero"}))}:"application"===i&&"pdf"===n?{color:"#e25149",icon:s("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon",width:"25",height:"25",viewBox:"0 0 25 25"},s("path",{d:"M9.766 8.295c-.691-1.843-.539-3.401.747-3.726 1.643-.414 2.505.938 2.39 3.299-.039.79-.194 1.662-.537 3.148.324.49.66.967 1.055 1.51.17.231.382.488.629.757 1.866-.128 3.653.114 4.918.655 1.487.635 2.192 1.685 1.614 2.84-.566 1.133-1.839 1.084-3.416.249-1.141-.604-2.457-1.634-3.51-2.707a13.467 13.467 0 0 0-2.238.426c-1.392 4.051-4.534 6.453-5.707 4.572-.986-1.58 1.38-4.206 4.914-5.375.097-.322.185-.656.264-1.001.08-.353.306-1.31.407-1.737-.678-1.059-1.2-2.031-1.53-2.91zm2.098 4.87c-.033.144-.068.287-.104.427l.033-.01-.012.038a14.065 14.065 0 0 1 1.02-.197l-.032-.033.052-.004a7.902 7.902 0 0 1-.208-.271c-.197-.27-.38-.526-.555-.775l-.006.028-.002-.003c-.076.323-.148.632-.186.8zm5.77 2.978c1.143.605 1.832.632 2.054.187.26-.519-.087-1.034-1.113-1.473-.911-.39-2.175-.608-3.55-.608.845.766 1.787 1.459 2.609 1.894zM6.559 18.789c.14.223.693.16 1.425-.413.827-.648 1.61-1.747 2.208-3.206-2.563 1.064-4.102 2.867-3.633 3.62zm5.345-10.97c.088-1.793-.351-2.48-1.146-2.28-.473.119-.564 1.05-.056 2.405.213.566.52 1.188.908 1.859.18-.858.268-1.453.294-1.984z",fill:"#E2514A",fillRule:"nonzero"}))}:"application"===i&&-1!==["zip","x-7z-compressed","x-rar-compressed","x-tar","x-gzip","x-apple-diskimage"].indexOf(n)?{color:"#00C469",icon:s("svg",{"aria-hidden":"true",focusable:"false",width:"25",height:"25",viewBox:"0 0 25 25"},s("path",{d:"M10.45 2.05h1.05a.5.5 0 0 1 .5.5v.024a.5.5 0 0 1-.5.5h-1.05a.5.5 0 0 1-.5-.5V2.55a.5.5 0 0 1 .5-.5zm2.05 1.024h1.05a.5.5 0 0 1 .5.5V3.6a.5.5 0 0 1-.5.5H12.5a.5.5 0 0 1-.5-.5v-.025a.5.5 0 0 1 .5-.5v-.001zM10.45 0h1.05a.5.5 0 0 1 .5.5v.025a.5.5 0 0 1-.5.5h-1.05a.5.5 0 0 1-.5-.5V.5a.5.5 0 0 1 .5-.5zm2.05 1.025h1.05a.5.5 0 0 1 .5.5v.024a.5.5 0 0 1-.5.5H12.5a.5.5 0 0 1-.5-.5v-.024a.5.5 0 0 1 .5-.5zm-2.05 3.074h1.05a.5.5 0 0 1 .5.5v.025a.5.5 0 0 1-.5.5h-1.05a.5.5 0 0 1-.5-.5v-.025a.5.5 0 0 1 .5-.5zm2.05 1.025h1.05a.5.5 0 0 1 .5.5v.024a.5.5 0 0 1-.5.5H12.5a.5.5 0 0 1-.5-.5v-.024a.5.5 0 0 1 .5-.5zm-2.05 1.024h1.05a.5.5 0 0 1 .5.5v.025a.5.5 0 0 1-.5.5h-1.05a.5.5 0 0 1-.5-.5v-.025a.5.5 0 0 1 .5-.5zm2.05 1.025h1.05a.5.5 0 0 1 .5.5v.025a.5.5 0 0 1-.5.5H12.5a.5.5 0 0 1-.5-.5v-.025a.5.5 0 0 1 .5-.5zm-2.05 1.025h1.05a.5.5 0 0 1 .5.5v.025a.5.5 0 0 1-.5.5h-1.05a.5.5 0 0 1-.5-.5v-.025a.5.5 0 0 1 .5-.5zm2.05 1.025h1.05a.5.5 0 0 1 .5.5v.024a.5.5 0 0 1-.5.5H12.5a.5.5 0 0 1-.5-.5v-.024a.5.5 0 0 1 .5-.5zm-1.656 3.074l-.82 5.946c.52.302 1.174.458 1.976.458.803 0 1.455-.156 1.975-.458l-.82-5.946h-2.311zm0-1.025h2.312c.512 0 .946.378 1.015.885l.82 5.946c.056.412-.142.817-.501 1.026-.686.398-1.515.597-2.49.597-.974 0-1.804-.199-2.49-.597a1.025 1.025 0 0 1-.5-1.026l.819-5.946c.07-.507.503-.885 1.015-.885zm.545 6.6a.5.5 0 0 1-.397-.561l.143-.999a.5.5 0 0 1 .495-.429h.74a.5.5 0 0 1 .495.43l.143.998a.5.5 0 0 1-.397.561c-.404.08-.819.08-1.222 0z",fill:"#00C469",fillRule:"nonzero"}))}:t}},8805:e=>{e.exports=function(e){const{tagName:t}=e.target;"INPUT"!==t&&"TEXTAREA"!==t?(e.preventDefault(),e.stopPropagation()):e.stopPropagation()}},3962:(e,t,i)=>{const s=i(6361),n=i(9045),r=i(6470);function o(e,t){const i=t[0];i&&(i.focus(),e.preventDefault())}function a(e,t,i){const a=r(i,t),l=s(a.querySelectorAll(n)),d=l.indexOf(document.activeElement);!function(e){return e.contains(document.activeElement)}(a)?o(e,l):e.shiftKey&&0===d?function(e,t){const i=t[t.length-1];i&&(i.focus(),e.preventDefault())}(e,l):e.shiftKey||d!==l.length-1||o(e,l)}e.exports={forModal:(e,t,i)=>{a(e,t,i)},forInline:(e,t,i)=>{null===t||a(e,t,i)}}},1623:(e,t,i)=>{"use strict";const{h:s,Component:n,createRef:r}=i(6400);e.exports=class extends n{constructor(){super(...arguments),this.ref=r()}componentWillEnter(e){this.ref.current.style.opacity="1",this.ref.current.style.transform="none",setTimeout(e,300)}componentWillLeave(e){this.ref.current.style.opacity="0",this.ref.current.style.transform="translateY(350%)",setTimeout(e,300)}render(){const{children:e}=this.props;return s("div",{className:"uppy-Informer-animated",ref:this.ref},e)}}},6455:(e,t,i)=>{"use strict";const{Component:s,cloneElement:n,h:r,toChildArray:o}=i(6400);function a(e,t){const i=e._ptgLinkedRefs||(e._ptgLinkedRefs={});return i[t]||(i[t]=i=>{e.refs[t]=i})}function l(e){const t={};for(let r=0;r<e.length;r++)null!=e[r]&&(t[(i=e[r],s=r.toString(36),void 0,null!=(n=null==i?void 0:i.key)?n:s)]=e[r]);var i,s,n;return t}function d(e,t){e=e||{},t=t||{};const i=i=>t.hasOwnProperty(i)?t[i]:e[i],s={};let n=[];for(const i in e)t.hasOwnProperty(i)?n.length&&(s[i]=n,n=[]):n.push(i);const r={};for(const e in t){if(s.hasOwnProperty(e))for(let t=0;t<s[e].length;t++){const n=s[e][t];r[s[e][t]]=i(n)}r[e]=i(e)}for(let e=0;e<n.length;e++)r[n[e]]=i(n[e]);return r}class h extends s{constructor(e,t){super(e,t),this.refs={},this.state={children:l(o(o(this.props.children))||[])},this.performAppear=this.performAppear.bind(this),this.performEnter=this.performEnter.bind(this),this.performLeave=this.performLeave.bind(this)}componentWillMount(){this.currentlyTransitioningKeys={},this.keysToAbortLeave=[],this.keysToEnter=[],this.keysToLeave=[]}componentDidMount(){const e=this.state.children;for(const t in e)e[t]&&this.performAppear(t)}componentWillReceiveProps(e){const t=l(o(e.children)||[]),i=this.state.children;let s;for(s in this.setState((e=>({children:d(e.children,t)}))),t)if(t.hasOwnProperty(s)){const e=i&&i.hasOwnProperty(s);t[s]&&e&&this.currentlyTransitioningKeys[s]?(this.keysToEnter.push(s),this.keysToAbortLeave.push(s)):!t[s]||e||this.currentlyTransitioningKeys[s]||this.keysToEnter.push(s)}for(s in i)if(i.hasOwnProperty(s)){const e=t&&t.hasOwnProperty(s);!i[s]||e||this.currentlyTransitioningKeys[s]||this.keysToLeave.push(s)}}componentDidUpdate(){const{keysToEnter:e}=this;this.keysToEnter=[],e.forEach(this.performEnter);const{keysToLeave:t}=this;this.keysToLeave=[],t.forEach(this.performLeave)}_finishAbort(e){const t=this.keysToAbortLeave.indexOf(e);-1!==t&&this.keysToAbortLeave.splice(t,1)}performAppear(e){this.currentlyTransitioningKeys[e]=!0;const t=this.refs[e];t.componentWillAppear?t.componentWillAppear(this._handleDoneAppearing.bind(this,e)):this._handleDoneAppearing(e)}_handleDoneAppearing(e){const t=this.refs[e];t.componentDidAppear&&t.componentDidAppear(),delete this.currentlyTransitioningKeys[e],this._finishAbort(e);const i=l(o(this.props.children)||[]);i&&i.hasOwnProperty(e)||this.performLeave(e)}performEnter(e){this.currentlyTransitioningKeys[e]=!0;const t=this.refs[e];t.componentWillEnter?t.componentWillEnter(this._handleDoneEntering.bind(this,e)):this._handleDoneEntering(e)}_handleDoneEntering(e){const t=this.refs[e];t.componentDidEnter&&t.componentDidEnter(),delete this.currentlyTransitioningKeys[e],this._finishAbort(e);const i=l(o(this.props.children)||[]);i&&i.hasOwnProperty(e)||this.performLeave(e)}performLeave(e){if(-1!==this.keysToAbortLeave.indexOf(e))return;this.currentlyTransitioningKeys[e]=!0;const t=this.refs[e];t.componentWillLeave?t.componentWillLeave(this._handleDoneLeaving.bind(this,e)):this._handleDoneLeaving(e)}_handleDoneLeaving(e){if(-1!==this.keysToAbortLeave.indexOf(e))return;const t=this.refs[e];t.componentDidLeave&&t.componentDidLeave(),delete this.currentlyTransitioningKeys[e];const i=l(o(this.props.children)||[]);if(i&&i.hasOwnProperty(e))this.performEnter(e);else{const t=(s={},n=this.state.children,Object.assign(s,n));delete t[e],this.setState({children:t})}var s,n}render(e,t){let{childFactory:i,transitionLeave:s,transitionName:o,transitionAppear:l,transitionEnter:d,transitionLeaveTimeout:h,transitionEnterTimeout:u,transitionAppearTimeout:c,component:p,...f}=e,{children:m}=t;const g=[];for(const e in m)if(m.hasOwnProperty(e)){const t=m[e];if(t){const s=a(this,e),r=n(i(t),{ref:s,key:e});g.push(r)}}return r(p,f,g)}}h.defaultProps={component:"span",childFactory:e=>e},e.exports=h},873:(e,t,i)=>{"use strict";var s,n;const{h:r}=i(6400),{UIPlugin:o}=i(9429),a=i(1623),l=i(6455);e.exports=(n=s=class extends o{constructor(e,t){super(e,t),this.render=e=>r("div",{className:"uppy uppy-Informer"},r(l,null,e.info.map((e=>r(a,{key:e.message},r("p",{role:"alert"},e.message," ",e.details&&r("span",{"aria-label":e.details,"data-microtip-position":"top-left","data-microtip-size":"medium",role:"tooltip",onClick:()=>alert(`${e.message} \n\n ${e.details}`)},"?"))))))),this.type="progressindicator",this.id=this.opts.id||"Informer",this.title="Informer",this.opts={...t}}install(){const{target:e}=this.opts;e&&this.mount(e,this)}},s.VERSION="2.0.5",n)},4049:(e,t,i)=>{const s=i(4184),n=i(3096),r=i(5158),o=i(1011),{h:a}=i(6400),l=i(3242);function d(){return a("svg",{className:"uppy-StatusBar-spinner","aria-hidden":"true",focusable:"false",width:"14",height:"14"},a("path",{d:"M13.983 6.547c-.12-2.509-1.64-4.893-3.939-5.936-2.48-1.127-5.488-.656-7.556 1.094C.524 3.367-.398 6.048.162 8.562c.556 2.495 2.46 4.52 4.94 5.183 2.932.784 5.61-.602 7.256-3.015-1.493 1.993-3.745 3.309-6.298 2.868-2.514-.434-4.578-2.349-5.153-4.84a6.226 6.226 0 0 1 2.98-6.778C6.34.586 9.74 1.1 11.373 3.493c.407.596.693 1.282.842 1.988.127.598.073 1.197.161 1.794.078.525.543 1.257 1.15.864.525-.341.49-1.05.456-1.592-.007-.15.02.3 0 0",fillRule:"evenodd"}))}function h(e){const{numUploads:t,complete:i,totalUploadedSize:s,totalSize:n,totalETA:l,i18n:d}=e,h=t>1;return a("div",{className:"uppy-StatusBar-statusSecondary"},h&&d("filesUploadedOfTotal",{complete:i,smart_count:t}),a("span",{className:"uppy-StatusBar-additionalInfo"},h&&" · ",d("dataUploadedOfTotal",{complete:r(s),total:r(n)})," · ",d("xTimeLeft",{time:o(l)})))}function u(e){const{i18n:t,complete:i,numUploads:s}=e;return a("div",{className:"uppy-StatusBar-statusSecondary"},t("filesUploadedOfTotal",{complete:i,smart_count:s}))}function c(e){const{i18n:t,newFiles:i,startUpload:n}=e,r=s("uppy-u-reset","uppy-c-btn","uppy-StatusBar-actionBtn","uppy-StatusBar-actionBtn--uploadNewlyAdded");return a("div",{className:"uppy-StatusBar-statusSecondary"},a("div",{className:"uppy-StatusBar-statusSecondaryHint"},t("xMoreFilesAdded",{smart_count:i})),a("button",{type:"button",className:r,"aria-label":t("uploadXFiles",{smart_count:i}),onClick:n},t("upload")))}const p=n(h,500,{leading:!0,trailing:!0});e.exports={UploadBtn:function(e){const{newFiles:t,isUploadStarted:i,recoveredState:n,i18n:r,uploadState:o,isSomeGhost:d,startUpload:h}=e,u=s("uppy-u-reset","uppy-c-btn","uppy-StatusBar-actionBtn","uppy-StatusBar-actionBtn--upload",{"uppy-c-btn-primary":o===l.STATE_WAITING},{"uppy-StatusBar-actionBtn--disabled":d}),c=r(t&&i&&!n?"uploadXNewFiles":"uploadXFiles",{smart_count:t});return a("button",{type:"button",className:u,"aria-label":r("uploadXFiles",{smart_count:t}),onClick:h,disabled:d,"data-uppy-super-focusable":!0},c)},RetryBtn:function(e){const{i18n:t,uppy:i}=e;return a("button",{type:"button",className:"uppy-u-reset uppy-c-btn uppy-StatusBar-actionBtn uppy-StatusBar-actionBtn--retry","aria-label":t("retryUpload"),onClick:()=>i.retryAll(),"data-uppy-super-focusable":!0},a("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon",width:"8",height:"10",viewBox:"0 0 8 10"},a("path",{d:"M4 2.408a2.75 2.75 0 1 0 2.75 2.75.626.626 0 0 1 1.25.018v.023a4 4 0 1 1-4-4.041V.25a.25.25 0 0 1 .389-.208l2.299 1.533a.25.25 0 0 1 0 .416l-2.3 1.533A.25.25 0 0 1 4 3.316v-.908z"})),t("retry"))},CancelBtn:function(e){const{i18n:t,uppy:i}=e;return a("button",{type:"button",className:"uppy-u-reset uppy-StatusBar-actionCircleBtn",title:t("cancel"),"aria-label":t("cancel"),onClick:()=>i.cancelAll(),"data-cy":"cancel","data-uppy-super-focusable":!0},a("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon",width:"16",height:"16",viewBox:"0 0 16 16"},a("g",{fill:"none",fillRule:"evenodd"},a("circle",{fill:"#888",cx:"8",cy:"8",r:"8"}),a("path",{fill:"#FFF",d:"M9.283 8l2.567 2.567-1.283 1.283L8 9.283 5.433 11.85 4.15 10.567 6.717 8 4.15 5.433 5.433 4.15 8 6.717l2.567-2.567 1.283 1.283z"}))))},PauseResumeButton:function(e){const{isAllPaused:t,i18n:i,isAllComplete:s,resumableUploads:n,uppy:r}=e,o=i(t?"resume":"pause");return a("button",{title:o,"aria-label":o,className:"uppy-u-reset uppy-StatusBar-actionCircleBtn",type:"button",onClick:function(){return s?null:n?t?r.resumeAll():r.pauseAll():r.cancelAll()},"data-uppy-super-focusable":!0},a("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon",width:"16",height:"16",viewBox:"0 0 16 16"},a("g",{fill:"none",fillRule:"evenodd"},a("circle",{fill:"#888",cx:"8",cy:"8",r:"8"}),a("path",{fill:"#FFF",d:t?"M6 4.25L11.5 8 6 11.75z":"M5 4.5h2v7H5v-7zm4 0h2v7H9v-7z"}))))},DoneBtn:function(e){const{i18n:t,doneButtonHandler:i}=e;return a("button",{type:"button",className:"uppy-u-reset uppy-c-btn uppy-StatusBar-actionBtn uppy-StatusBar-actionBtn--done",onClick:i,"data-uppy-super-focusable":!0},t("done"))},LoadingSpinner:d,ProgressDetails:h,ProgressBarProcessing:function(e){const{progress:t}=e,{value:i,mode:s,message:n}=t,r=Math.round(100*i);return a("div",{className:"uppy-StatusBar-content"},a(d,null),"determinate"===s?`${r}% · `:"",n)},ProgressBarError:function(e){const{error:t,i18n:i,complete:s,numUploads:n}=e;return a("div",{className:"uppy-StatusBar-content",title:i("uploadFailed")},a("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-StatusBar-statusIndicator uppy-c-icon",width:"11",height:"11",viewBox:"0 0 11 11"},a("path",{d:"M4.278 5.5L0 1.222 1.222 0 5.5 4.278 9.778 0 11 1.222 6.722 5.5 11 9.778 9.778 11 5.5 6.722 1.222 11 0 9.778z"})),a("div",{className:"uppy-StatusBar-status"},a("div",{className:"uppy-StatusBar-statusPrimary"},i("uploadFailed"),a("button",{className:"uppy-u-reset uppy-StatusBar-details","aria-label":i("showErrorDetails"),"data-microtip-position":"top-right","data-microtip-size":"medium",onClick:function(){const e=`${i("uploadFailed")} \n\n ${t}`;alert(e)},type:"button"},"?")),a(u,{i18n:i,complete:s,numUploads:n})))},ProgressBarUploading:function(e){const{i18n:t,supportsUploadProgress:i,totalProgress:s,showProgressDetails:n,isUploadStarted:r,isAllComplete:o,isAllPaused:l,newFiles:h,numUploads:f,complete:m,totalUploadedSize:g,totalSize:v,totalETA:y,startUpload:b}=e,w=h&&r;if(!r||o)return null;const x=t(l?"paused":"uploading");return a("div",{className:"uppy-StatusBar-content","aria-label":x,title:x},l?null:a(d,null),a("div",{className:"uppy-StatusBar-status"},a("div",{className:"uppy-StatusBar-statusPrimary"},i?`${x}: ${s}%`:x),l||w||!n?null:i?a(p,{numUploads:f,complete:m,totalUploadedSize:g,totalSize:v,totalETA:y,i18n:t}):a(u,{i18n:t,complete:m,numUploads:f}),w?a(c,{i18n:t,newFiles:h,startUpload:b}):null))},ProgressBarComplete:function(e){const{i18n:t}=e;return a("div",{className:"uppy-StatusBar-content",role:"status",title:t("complete")},a("div",{className:"uppy-StatusBar-status"},a("div",{className:"uppy-StatusBar-statusPrimary"},a("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-StatusBar-statusIndicator uppy-c-icon",width:"15",height:"11",viewBox:"0 0 15 11"},a("path",{d:"M.414 5.843L1.627 4.63l3.472 3.472L13.202 0l1.212 1.213L5.1 10.528z"})),t("complete"))))}}},858:(e,t,i)=>{const{h:s}=i(6400),n=i(4184),r=i(3242),o=i(1881),{UploadBtn:a,RetryBtn:l,CancelBtn:d,PauseResumeButton:h,DoneBtn:u,ProgressBarProcessing:c,ProgressBarError:p,ProgressBarUploading:f,ProgressBarComplete:m}=i(4049),{STATE_ERROR:g,STATE_WAITING:v,STATE_PREPROCESSING:y,STATE_UPLOADING:b,STATE_POSTPROCESSING:w,STATE_COMPLETE:x}=r;e.exports=function(e){const{newFiles:t,allowNewUpload:i,isUploadInProgress:r,isAllPaused:S,resumableUploads:_,error:T,hideUploadButton:k,hidePauseResumeButton:C,hideCancelButton:P,hideRetryButton:O,recoveredState:$,uploadState:F,totalProgress:A,files:E,supportsUploadProgress:D,hideAfterFinish:I,isSomeGhost:U,isTargetDOMEl:B,doneButtonHandler:L,isUploadStarted:R,i18n:j,startUpload:N,uppy:M,isAllComplete:z,showProgressDetails:H,numUploads:q,complete:V,totalSize:W,totalETA:G,totalUploadedSize:Q}=e,K=function(){switch(F){case w:case y:{const e=o(E);return"determinate"===e.mode?100*e.value:A}case g:return null;case b:return D?A:null;default:return A}}(),X=function(){if($)return!1;switch(F){case v:return k||0===t;case x:return I;default:return!1}}(),Y=null!=K?K:100,J=!T&&t&&!r&&!S&&i&&!k,Z=!P&&F!==v&&F!==x,ee=_&&!C&&F===b,te=T&&!z&&!O,ie=L&&F===x,se=n("uppy-StatusBar-progress",{"is-indeterminate":function(){switch(F){case w:case y:{const{mode:e}=o(E);return"indeterminate"===e}case b:return!D;default:return!1}}()}),ne=n({"uppy-Root":B},"uppy-StatusBar",`is-${F}`,{"has-ghosts":U});return s("div",{className:ne,"aria-hidden":X},s("div",{className:se,style:{width:`${Y}%`},role:"progressbar","aria-label":`${Y}%`,"aria-valuetext":`${Y}%`,"aria-valuemin":"0","aria-valuemax":"100","aria-valuenow":K}),(()=>{switch(F){case y:case w:return s(c,{progress:o(E)});case x:return s(m,{i18n:j});case g:return s(p,{error:T,i18n:j,numUploads:q,complete:V});case b:return s(f,{i18n:j,supportsUploadProgress:D,totalProgress:A,showProgressDetails:H,isUploadStarted:R,isAllComplete:z,isAllPaused:S,newFiles:t,numUploads:q,complete:V,totalUploadedSize:Q,totalSize:W,totalETA:G,startUpload:N});default:return null}})(),s("div",{className:"uppy-StatusBar-actions"},$||J?s(a,{newFiles:t,isUploadStarted:R,recoveredState:$,i18n:j,isSomeGhost:U,startUpload:N,uploadState:F}):null,te?s(l,{i18n:j,uppy:M}):null,ee?s(h,{isAllPaused:S,i18n:j,isAllComplete:z,resumableUploads:_,uppy:M}):null,Z?s(d,{i18n:j,uppy:M}):null,ie?s(u,{i18n:j,doneButtonHandler:L}):null))}},3242:e=>{e.exports={STATE_ERROR:"error",STATE_WAITING:"waiting",STATE_PREPROCESSING:"preprocessing",STATE_UPLOADING:"uploading",STATE_POSTPROCESSING:"postprocessing",STATE_COMPLETE:"complete"}},1881:e=>{e.exports=function(e){const t=[];let i,s;for(const{progress:n}of Object.values(e)){const{preprocess:e,postprocess:r}=n;null==s&&(e||r)&&({mode:i,message:s}=e||r),"determinate"===(null==e?void 0:e.mode)&&t.push(e.value),"determinate"===(null==r?void 0:r.mode)&&t.push(r.value)}return{mode:i,message:s,value:t.reduce(((e,i)=>e+i/t.length),0)}}},3215:(e,t,i)=>{var s,n;const{UIPlugin:r}=i(9429),o=i(522),a=i(9599),l=i(8958),d=i(3242),h=i(858),u=i(2658);function c(e,t,i,s){if(e&&!t)return d.STATE_ERROR;if(t)return d.STATE_COMPLETE;if(i)return d.STATE_WAITING;let n=d.STATE_WAITING;const r=Object.keys(s);for(let e=0;e<r.length;e++){const{progress:t}=s[r[e]];if(t.uploadStarted&&!t.uploadComplete)return d.STATE_UPLOADING;t.preprocess&&n!==d.STATE_UPLOADING&&(n=d.STATE_PREPROCESSING),t.postprocess&&n!==d.STATE_UPLOADING&&n!==d.STATE_PREPROCESSING&&(n=d.STATE_POSTPROCESSING)}return n}e.exports=(n=s=class extends r{constructor(e,t){super(e,t),this.startUpload=()=>{const{recoveredState:e}=this.uppy.getState();if(!e)return this.uppy.upload().catch((()=>{}));this.uppy.emit("restore-confirmed")},this.id=this.opts.id||"StatusBar",this.title="StatusBar",this.type="progressindicator",this.defaultLocale=u,this.opts={target:"body",hideUploadButton:!1,hideRetryButton:!1,hidePauseResumeButton:!1,hideCancelButton:!1,showProgressDetails:!1,hideAfterFinish:!0,doneButtonHandler:null,...t},this.i18nInit(),this.render=this.render.bind(this),this.install=this.install.bind(this)}render(e){const{capabilities:t,files:i,allowNewUpload:s,totalProgress:n,error:r,recoveredState:l}=e,{newFiles:d,startedFiles:u,completeFiles:p,inProgressNotPausedFiles:f,isUploadStarted:m,isAllComplete:g,isAllErrored:v,isAllPaused:y,isUploadInProgress:b,isSomeGhost:w}=this.uppy.getObjectOfFilesPerState(),x=l?Object.values(i):d,S=function(e){const t=function(e){let t=0;return e.forEach((e=>{t+=o(e.progress)})),t}(e);if(0===t)return 0;const i=e.reduce(((e,t)=>e+a(t.progress)),0);return Math.round(i/t*10)/10}(f),_=!!t.resumableUploads,T=!1!==t.uploadProgress;let k=0,C=0;return u.forEach((e=>{k+=e.progress.bytesTotal||0,C+=e.progress.bytesUploaded||0})),h({error:r,uploadState:c(r,g,l,e.files||{}),allowNewUpload:s,totalProgress:n,totalSize:k,totalUploadedSize:C,isAllComplete:!1,isAllPaused:y,isAllErrored:v,isUploadStarted:m,isUploadInProgress:b,isSomeGhost:w,recoveredState:l,complete:p.length,newFiles:x.length,numUploads:u.length,totalETA:S,files:i,i18n:this.i18n,uppy:this.uppy,startUpload:this.startUpload,doneButtonHandler:this.opts.doneButtonHandler,resumableUploads:_,supportsUploadProgress:T,showProgressDetails:this.opts.showProgressDetails,hideUploadButton:this.opts.hideUploadButton,hideRetryButton:this.opts.hideRetryButton,hidePauseResumeButton:this.opts.hidePauseResumeButton,hideCancelButton:this.opts.hideCancelButton,hideAfterFinish:this.opts.hideAfterFinish,isTargetDOMEl:this.isTargetDOMEl})}onMount(){const e=this.el;l(e)||(e.dir="ltr")}install(){const{target:e}=this.opts;e&&this.mount(e,this)}uninstall(){this.unmount()}},s.VERSION="2.1.3",n)},2658:e=>{e.exports={strings:{uploading:"Uploading",complete:"Complete",uploadFailed:"Upload failed",paused:"Paused",retry:"Retry",cancel:"Cancel",pause:"Pause",resume:"Resume",done:"Done",filesUploadedOfTotal:{0:"%{complete} of %{smart_count} file uploaded",1:"%{complete} of %{smart_count} files uploaded"},dataUploadedOfTotal:"%{complete} of %{total}",xTimeLeft:"%{time} left",uploadXFiles:{0:"Upload %{smart_count} file",1:"Upload %{smart_count} files"},uploadXNewFiles:{0:"Upload +%{smart_count} file",1:"Upload +%{smart_count} files"},upload:"Upload",retryUpload:"Retry upload",xMoreFilesAdded:{0:"%{smart_count} more file added",1:"%{smart_count} more files added"},showErrorDetails:"Show error details"}}},6273:e=>{"use strict";var t=0;function i(e){return"__private_"+t+++"_"+e}var s=i("publish");class n{constructor(){Object.defineProperty(this,s,{value:r}),this.state={},this.callbacks=[]}getState(){return this.state}setState(e){const t={...this.state},i={...this.state,...e};this.state=i,function(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}(this,s)[s](t,i,e)}subscribe(e){return this.callbacks.push(e),()=>{this.callbacks.splice(this.callbacks.indexOf(e),1)}}}function r(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];this.callbacks.forEach((e=>{e(...t)}))}n.VERSION="2.0.3",e.exports=function(){return new n}},7753:(e,t,i)=>{var s,n;const{UIPlugin:r}=i(9429),o=i(3517),a=i(6508),l=i(9373),{rotation:d}=i(1443),h=i(3107);e.exports=(n=s=class extends r{constructor(e,t){if(super(e,t),this.onFileAdded=e=>{!e.preview&&e.data&&l(e.type)&&!e.isRemote&&this.addToQueue(e.id)},this.onCancelRequest=e=>{const t=this.queue.indexOf(e.id);-1!==t&&this.queue.splice(t,1)},this.onFileRemoved=e=>{const t=this.queue.indexOf(e.id);-1!==t&&this.queue.splice(t,1),e.preview&&a(e.preview)&&URL.revokeObjectURL(e.preview)},this.onRestored=()=>{this.uppy.getFiles().filter((e=>e.isRestored)).forEach((e=>{e.preview&&!a(e.preview)||this.addToQueue(e.id)}))},this.onAllFilesRemoved=()=>{this.queue=[]},this.waitUntilAllProcessed=e=>{e.forEach((e=>{const t=this.uppy.getFile(e);this.uppy.emit("preprocess-progress",t,{mode:"indeterminate",message:this.i18n("generatingThumbnails")})}));const t=()=>{e.forEach((e=>{const t=this.uppy.getFile(e);this.uppy.emit("preprocess-complete",t)}))};return new Promise((e=>{this.queueProcessing?this.uppy.once("thumbnail:all-generated",(()=>{t(),e()})):(t(),e())}))},this.type="modifier",this.id=this.opts.id||"ThumbnailGenerator",this.title="Thumbnail Generator",this.queue=[],this.queueProcessing=!1,this.defaultThumbnailDimension=200,this.thumbnailType=this.opts.thumbnailType||"image/jpeg",this.defaultLocale=h,this.opts={thumbnailWidth:null,thumbnailHeight:null,waitForThumbnailsBeforeUpload:!1,lazy:!1,...t},this.i18nInit(),this.opts.lazy&&this.opts.waitForThumbnailsBeforeUpload)throw new Error("ThumbnailGenerator: The `lazy` and `waitForThumbnailsBeforeUpload` options are mutually exclusive. Please ensure at most one of them is set to `true`.")}createThumbnail(e,t,i){const s=URL.createObjectURL(e.data),n=new Promise(((e,t)=>{const i=new Image;i.src=s,i.addEventListener("load",(()=>{URL.revokeObjectURL(s),e(i)})),i.addEventListener("error",(e=>{URL.revokeObjectURL(s),t(e.error||new Error("Could not create thumbnail"))}))})),r=d(e.data).catch((()=>1));return Promise.all([n,r]).then((e=>{let[s,n]=e;const r=this.getProportionalDimensions(s,t,i,n.deg),o=this.rotateImage(s,n),a=this.resizeImage(o,r.width,r.height);return this.canvasToBlob(a,this.thumbnailType,80)})).then((e=>URL.createObjectURL(e)))}getProportionalDimensions(e,t,i,s){let n=e.width/e.height;return 90!==s&&270!==s||(n=e.height/e.width),null!=t?{width:t,height:Math.round(t/n)}:null!=i?{width:Math.round(i*n),height:i}:{width:this.defaultThumbnailDimension,height:Math.round(this.defaultThumbnailDimension/n)}}protect(e){const t=e.width/e.height,i=5e6,s=4096;let n=Math.floor(Math.sqrt(i*t)),r=Math.floor(i/Math.sqrt(i*t));if(n>s&&(n=s,r=Math.round(n/t)),r>s&&(r=s,n=Math.round(t*r)),e.width>n){const t=document.createElement("canvas");t.width=n,t.height=r,t.getContext("2d").drawImage(e,0,0,n,r),e=t}return e}resizeImage(e,t,i){e=this.protect(e);let s=Math.ceil(Math.log2(e.width/t));s<1&&(s=1);let n=t*2**(s-1),r=i*2**(s-1);for(;s--;){const t=document.createElement("canvas");t.width=n,t.height=r,t.getContext("2d").drawImage(e,0,0,n,r),e=t,n=Math.round(n/2),r=Math.round(r/2)}return e}rotateImage(e,t){let i=e.width,s=e.height;90!==t.deg&&270!==t.deg||(i=e.height,s=e.width);const n=document.createElement("canvas");n.width=i,n.height=s;const r=n.getContext("2d");return r.translate(i/2,s/2),t.canvas&&(r.rotate(t.rad),r.scale(t.scaleX,t.scaleY)),r.drawImage(e,-e.width/2,-e.height/2,e.width,e.height),n}canvasToBlob(e,t,i){try{e.getContext("2d").getImageData(0,0,1,1)}catch(e){if(18===e.code)return Promise.reject(new Error("cannot read image, probably an svg with external resources"))}return e.toBlob?new Promise((s=>{e.toBlob(s,t,i)})).then((e=>{if(null===e)throw new Error("cannot read image, probably an svg with external resources");return e})):Promise.resolve().then((()=>o(e.toDataURL(t,i),{}))).then((e=>{if(null===e)throw new Error("could not extract blob, probably an old browser");return e}))}setPreviewURL(e,t){this.uppy.setFileState(e,{preview:t})}addToQueue(e){this.queue.push(e),!1===this.queueProcessing&&this.processQueue()}processQueue(){if(this.queueProcessing=!0,this.queue.length>0){const e=this.uppy.getFile(this.queue.shift());return e?this.requestThumbnail(e).catch((()=>{})).then((()=>this.processQueue())):void this.uppy.log("[ThumbnailGenerator] file was removed before a thumbnail could be generated, but not removed from the queue. This is probably a bug","error")}this.queueProcessing=!1,this.uppy.log("[ThumbnailGenerator] Emptied thumbnail queue"),this.uppy.emit("thumbnail:all-generated")}requestThumbnail(e){return l(e.type)&&!e.isRemote?this.createThumbnail(e,this.opts.thumbnailWidth,this.opts.thumbnailHeight).then((t=>{this.setPreviewURL(e.id,t),this.uppy.log(`[ThumbnailGenerator] Generated thumbnail for ${e.id}`),this.uppy.emit("thumbnail:generated",this.uppy.getFile(e.id),t)})).catch((t=>{this.uppy.log(`[ThumbnailGenerator] Failed thumbnail for ${e.id}:`,"warning"),this.uppy.log(t,"warning"),this.uppy.emit("thumbnail:error",this.uppy.getFile(e.id),t)})):Promise.resolve()}install(){this.uppy.on("file-removed",this.onFileRemoved),this.uppy.on("cancel-all",this.onAllFilesRemoved),this.opts.lazy?(this.uppy.on("thumbnail:request",this.onFileAdded),this.uppy.on("thumbnail:cancel",this.onCancelRequest)):(this.uppy.on("file-added",this.onFileAdded),this.uppy.on("restored",this.onRestored)),this.opts.waitForThumbnailsBeforeUpload&&this.uppy.addPreProcessor(this.waitUntilAllProcessed)}uninstall(){this.uppy.off("file-removed",this.onFileRemoved),this.uppy.off("cancel-all",this.onAllFilesRemoved),this.opts.lazy?(this.uppy.off("thumbnail:request",this.onFileAdded),this.uppy.off("thumbnail:cancel",this.onCancelRequest)):(this.uppy.off("file-added",this.onFileAdded),this.uppy.off("restored",this.onRestored)),this.opts.waitForThumbnailsBeforeUpload&&this.uppy.removePreProcessor(this.waitUntilAllProcessed)}},s.VERSION="2.1.1",n)},3107:e=>{e.exports={strings:{generatingThumbnails:"Generating thumbnails..."}}},8429:e=>{"use strict";var t,i;function s(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var n=0;function r(e){return"__private_"+n+++"_"+e}e.exports=(t=r("emitter"),i=r("events"),class{constructor(e){Object.defineProperty(this,t,{writable:!0,value:void 0}),Object.defineProperty(this,i,{writable:!0,value:[]}),s(this,t)[t]=e}on(e,n){return s(this,i)[i].push([e,n]),s(this,t)[t].on(e,n)}remove(){for(const[e,n]of s(this,i)[i].splice(0))s(this,t)[t].off(e,n)}})},9045:e=>{"use strict";e.exports=['a[href]:not([tabindex^="-"]):not([inert]):not([aria-hidden])','area[href]:not([tabindex^="-"]):not([inert]):not([aria-hidden])',"input:not([disabled]):not([inert]):not([aria-hidden])","select:not([disabled]):not([inert]):not([aria-hidden])","textarea:not([disabled]):not([inert]):not([aria-hidden])","button:not([disabled]):not([inert]):not([aria-hidden])",'iframe:not([tabindex^="-"]):not([inert]):not([aria-hidden])','object:not([tabindex^="-"]):not([inert]):not([aria-hidden])','embed:not([tabindex^="-"]):not([inert]):not([aria-hidden])','[contenteditable]:not([tabindex^="-"]):not([inert]):not([aria-hidden])','[tabindex]:not([tabindex^="-"]):not([inert]):not([aria-hidden])']},6311:e=>{"use strict";class t extends Error{constructor(e,t){void 0===t&&(t=null),super("This looks like a network error, the endpoint might be blocked by an internet provider or a firewall."),this.cause=e,this.isNetworkError=!0,this.request=t}}e.exports=t},4772:e=>{"use strict";function t(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var i=0;function s(e){return"__private_"+i+++"_"+e}var n=s("aliveTimer"),r=s("isDone"),o=s("onTimedOut"),a=s("timeout");e.exports=class{constructor(e,i){Object.defineProperty(this,n,{writable:!0,value:void 0}),Object.defineProperty(this,r,{writable:!0,value:!1}),Object.defineProperty(this,o,{writable:!0,value:void 0}),Object.defineProperty(this,a,{writable:!0,value:void 0}),t(this,a)[a]=e,t(this,o)[o]=i}progress(){t(this,r)[r]||t(this,a)[a]>0&&(clearTimeout(t(this,n)[n]),t(this,n)[n]=setTimeout(t(this,o)[o],t(this,a)[a]))}done(){t(this,r)[r]||(clearTimeout(t(this,n)[n]),t(this,n)[n]=null,t(this,r)[r]=!0)}}},8618:e=>{"use strict";function t(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var i=0;function s(e){return"__private_"+i+++"_"+e}function n(){return new Error("Cancelled")}var r=s("activeRequests"),o=s("queuedHandlers"),a=s("paused"),l=s("pauseTimer"),d=s("downLimit"),h=s("upperLimit"),u=s("rateLimitingTimer"),c=s("call"),p=s("queueNext"),f=s("next"),m=s("queue"),g=s("dequeue"),v=s("resume"),y=s("increaseLimit");function b(e){t(this,r)[r]+=1;let i,s=!1;try{i=e()}catch(e){throw t(this,r)[r]-=1,e}return{abort:()=>{s||(s=!0,t(this,r)[r]-=1,i(),t(this,p)[p]())},done:()=>{s||(s=!0,t(this,r)[r]-=1,t(this,p)[p]())}}}function w(){queueMicrotask((()=>t(this,f)[f]()))}function x(){if(t(this,a)[a]||t(this,r)[r]>=this.limit)return;if(0===t(this,o)[o].length)return;const e=t(this,o)[o].shift(),i=t(this,c)[c](e.fn);e.abort=i.abort,e.done=i.done}function S(e,i){void 0===i&&(i={});const s={fn:e,priority:i.priority||0,abort:()=>{t(this,g)[g](s)},done:()=>{throw new Error("Cannot mark a queued request as done: this indicates a bug")}},n=t(this,o)[o].findIndex((e=>s.priority>e.priority));return-1===n?t(this,o)[o].push(s):t(this,o)[o].splice(n,0,s),s}function _(e){const i=t(this,o)[o].indexOf(e);-1!==i&&t(this,o)[o].splice(i,1)}e.exports={RateLimitedQueue:class{constructor(e){Object.defineProperty(this,g,{value:_}),Object.defineProperty(this,m,{value:S}),Object.defineProperty(this,f,{value:x}),Object.defineProperty(this,p,{value:w}),Object.defineProperty(this,c,{value:b}),Object.defineProperty(this,r,{writable:!0,value:0}),Object.defineProperty(this,o,{writable:!0,value:[]}),Object.defineProperty(this,a,{writable:!0,value:!1}),Object.defineProperty(this,l,{writable:!0,value:void 0}),Object.defineProperty(this,d,{writable:!0,value:1}),Object.defineProperty(this,h,{writable:!0,value:void 0}),Object.defineProperty(this,u,{writable:!0,value:void 0}),Object.defineProperty(this,v,{writable:!0,value:()=>this.resume()}),Object.defineProperty(this,y,{writable:!0,value:()=>{if(t(this,a)[a])t(this,u)[u]=setTimeout(t(this,y)[y],0);else{t(this,d)[d]=this.limit,this.limit=Math.ceil((t(this,h)[h]+t(this,d)[d])/2);for(let e=t(this,d)[d];e<=this.limit;e++)t(this,p)[p]();t(this,h)[h]-t(this,d)[d]>3?t(this,u)[u]=setTimeout(t(this,y)[y],2e3):t(this,d)[d]=Math.floor(t(this,d)[d]/2)}}}),this.limit="number"!=typeof e||0===e?1/0:e}run(e,i){return!t(this,a)[a]&&t(this,r)[r]<this.limit?t(this,c)[c](e):t(this,m)[m](e,i)}wrapPromiseFunction(e,t){var i=this;return function(){for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];let a;const l=new Promise(((s,o)=>{a=i.run((()=>{let t,i;try{i=Promise.resolve(e(...r))}catch(e){i=Promise.reject(e)}return i.then((e=>{t?o(t):(a.done(),s(e))}),(e=>{t?o(t):(a.done(),o(e))})),()=>{t=n()}}),t)}));return l.abort=()=>{a.abort()},l}}resume(){t(this,a)[a]=!1,clearTimeout(t(this,l)[l]);for(let e=0;e<this.limit;e++)t(this,p)[p]()}pause(e){void 0===e&&(e=null),t(this,a)[a]=!0,clearTimeout(t(this,l)[l]),null!=e&&(t(this,l)[l]=setTimeout(t(this,v)[v],e))}rateLimit(e){clearTimeout(t(this,u)[u]),this.pause(e),this.limit>1&&Number.isFinite(this.limit)&&(t(this,h)[h]=this.limit-1,this.limit=t(this,d)[d],t(this,u)[u]=setTimeout(t(this,y)[y],e))}get isPaused(){return t(this,a)[a]}},internalRateLimitedQueue:Symbol("__queue")}},3363:(e,t,i)=>{"use strict";var s;function n(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var r=0;function o(e){return"__private_"+r+++"_"+e}const a=i(4114);function l(e,t,i){const s=[];return e.forEach((e=>"string"!=typeof e?s.push(e):t[Symbol.split](e).forEach(((e,t,n)=>{""!==e&&s.push(e),t<n.length-1&&s.push(i)})))),s}function d(e,t){const i=/\$/g;let s=[e];if(null==t)return s;for(const e of Object.keys(t))if("_"!==e){let n=t[e];"string"==typeof n&&(n=i[Symbol.replace](n,"$$$$")),s=l(s,new RegExp(`%\\{${e}\\}`,"g"),n)}return s}function h(e){if(null==e||!e.strings)return;const t=this.locale;this.locale={...t,strings:{...t.strings,...e.strings}},this.locale.pluralize=e.pluralize||t.pluralize}e.exports=(s=o("apply"),class{constructor(e){Object.defineProperty(this,s,{value:h}),this.locale={strings:{},pluralize:e=>1===e?0:1},Array.isArray(e)?e.forEach(n(this,s)[s],this):n(this,s)[s](e)}translate(e,t){return this.translateArray(e,t).join("")}translateArray(e,t){if(!a(this.locale.strings,e))throw new Error(`missing string: ${e}`);const i=this.locale.strings[e];if("object"==typeof i){if(t&&void 0!==t.smart_count)return d(i[this.locale.pluralize(t.smart_count)],t);throw new Error("Attempted to use a string with plural forms, but no value was given for %{smart_count}")}return d(i,t)}})},3517:e=>{"use strict";const t=/^data:([^/]+\/[^,;]+(?:[^,]*?))(;base64)?,([\s\S]*)$/;e.exports=function(e,i,s){var n,r;const o=t.exec(e),a=null!=(n=null!=(r=i.mimeType)?r:null==o?void 0:o[1])?n:"plain/text";let l;if(null!=o[2]){const e=atob(decodeURIComponent(o[3])),t=new Uint8Array(e.length);for(let i=0;i<e.length;i++)t[i]=e.charCodeAt(i);l=[t]}else l=[decodeURIComponent(o[3])];return s?new File(l,i.name||"",{type:a}):new Blob(l,{type:a})}},7351:(e,t,i)=>{"use strict";const s=i(3096);e.exports=s((function(e,t,i){const{progress:s,bytesUploaded:n,bytesTotal:r}=t;s&&(e.uppy.log(`Upload progress: ${s}`),e.uppy.emit("upload-progress",i,{uploader:e,bytesUploaded:n,bytesTotal:r}))}),300,{leading:!0,trailing:!0})},6865:(e,t,i)=>{"use strict";const s=i(6311);e.exports=function(){return fetch(...arguments).catch((e=>{throw"AbortError"===e.name?e:new s(e)}))}},1147:(e,t,i)=>{"use strict";const s=i(5031);e.exports=function(e){if("string"==typeof e){const t=document.querySelectorAll(e);return 0===t.length?null:Array.from(t)}return"object"==typeof e&&s(e)?[e]:null}},2729:(e,t,i)=>{"use strict";const s=i(5031);e.exports=function(e,t){return void 0===t&&(t=document),"string"==typeof e?t.querySelector(e):s(e)?e:null}},8619:e=>{"use strict";function t(e){let t="";return e.replace(/[^A-Z0-9]/gi,(e=>(t+=`-${function(e){return e.charCodeAt(0).toString(32)}(e)}`,"/")))+t}e.exports=function(e){let i="uppy";return"string"==typeof e.name&&(i+=`-${t(e.name.toLowerCase())}`),void 0!==e.type&&(i+=`-${e.type}`),e.meta&&"string"==typeof e.meta.relativePath&&(i+=`-${t(e.meta.relativePath.toLowerCase())}`),void 0!==e.data.size&&(i+=`-${e.data.size}`),void 0!==e.data.lastModified&&(i+=`-${e.data.lastModified}`),i}},9599:e=>{"use strict";e.exports=function(e){return e.bytesTotal-e.bytesUploaded}},4031:(e,t,i)=>{"use strict";const s=i(9324),n=i(180);e.exports=function(e,t){var i;let{logDropError:r=(()=>{})}=void 0===t?{}:t;return null!=(i=e.items)&&i[0]&&"webkitGetAsEntry"in e.items[0]?s(e,r):n(e)}},180:(e,t,i)=>{"use strict";const s=i(6361);e.exports=function(e){const t=s(e.files);return Promise.resolve(t)}},9083:e=>{"use strict";e.exports=function e(t,i,s,n){let{onSuccess:r}=n;t.readEntries((n=>{const o=[...i,...n];n.length?setTimeout((()=>{e(t,o,s,{onSuccess:r})}),0):r(o)}),(e=>{s(e),r(i)}))}},2871:e=>{"use strict";e.exports=function(e){return e.fullPath&&e.fullPath!==`/${e.name}`?e.fullPath:null}},9324:(e,t,i)=>{"use strict";const s=i(6361),n=i(2871),r=i(9083);e.exports=function(e,t){const i=[],o=[],a=e=>new Promise((s=>{if(e.isFile)e.file((t=>{t.relativePath=n(e),i.push(t),s()}),(e=>{t(e),s()}));else if(e.isDirectory){const i=e.createReader();r(i,[],t,{onSuccess:e=>s(Promise.all(e.map(a)))})}}));return s(e.items).forEach((e=>{const t=e.webkitGetAsEntry();t&&o.push(a(t))})),Promise.all(o).then((()=>i))}},8744:e=>{"use strict";e.exports=function(e){const t=e.lastIndexOf(".");return-1===t||t===e.length-1?{name:e,extension:void 0}:{name:e.slice(0,t),extension:e.slice(t+1)}}},9404:(e,t,i)=>{"use strict";const s=i(8744),n=i(5624);e.exports=function(e){var t;if(e.type)return e.type;const i=e.name?null==(t=s(e.name).extension)?void 0:t.toLowerCase():null;return i&&i in n?n[i]:"application/octet-stream"}},5313:e=>{"use strict";e.exports=function(e){const t=/^(?:https?:\/\/|\/\/)?(?:[^@\n]+@)?(?:www\.)?([^\n]+)/i.exec(e)[1];return`${/^http:\/\//i.test(e)?"ws":"wss"}://${t}`}},522:e=>{"use strict";e.exports=function(e){if(!e.bytesUploaded)return 0;const t=Date.now()-e.uploadStarted;return e.bytesUploaded/(t/1e3)}},8958:e=>{"use strict";e.exports=function(e){for(var t;e&&!e.dir;)e=e.parentNode;return null==(t=e)?void 0:t.dir}},6770:e=>{"use strict";function t(e){return e<10?`0${e}`:e.toString()}e.exports=function(){const e=new Date;return`${t(e.getHours())}:${t(e.getMinutes())}:${t(e.getSeconds())}`}},4114:e=>{"use strict";e.exports=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}},5031:e=>{"use strict";e.exports=function(e){return(null==e?void 0:e.nodeType)===Node.ELEMENT_NODE}},3754:e=>{"use strict";e.exports=function(){const e=document.body;return"draggable"in e&&"ondragstart"in e&&"ondrop"in e&&"FormData"in window&&"FileReader"in window}},883:e=>{"use strict";e.exports=function(e){return!!e&&(0!==e.readyState&&4!==e.readyState||0===e.status)}},6508:e=>{"use strict";e.exports=function(e){return e.startsWith("blob:")}},9373:e=>{"use strict";e.exports=function(e){return!!e&&/^[^/]+\/(jpe?g|gif|png|svg|svg\+xml|bmp|webp|avif)$/.test(e)}},5624:e=>{"use strict";e.exports={md:"text/markdown",markdown:"text/markdown",mp4:"video/mp4",mp3:"audio/mp3",svg:"image/svg+xml",jpg:"image/jpeg",png:"image/png",gif:"image/gif",heic:"image/heic",heif:"image/heif",yaml:"text/yaml",yml:"text/yaml",csv:"text/csv",tsv:"text/tab-separated-values",tab:"text/tab-separated-values",avi:"video/x-msvideo",mks:"video/x-matroska",mkv:"video/x-matroska",mov:"video/quicktime",doc:"application/msword",docm:"application/vnd.ms-word.document.macroenabled.12",docx:"application/vnd.openxmlformats-officedocument.wordprocessingml.document",dot:"application/msword",dotm:"application/vnd.ms-word.template.macroenabled.12",dotx:"application/vnd.openxmlformats-officedocument.wordprocessingml.template",xla:"application/vnd.ms-excel",xlam:"application/vnd.ms-excel.addin.macroenabled.12",xlc:"application/vnd.ms-excel",xlf:"application/x-xliff+xml",xlm:"application/vnd.ms-excel",xls:"application/vnd.ms-excel",xlsb:"application/vnd.ms-excel.sheet.binary.macroenabled.12",xlsm:"application/vnd.ms-excel.sheet.macroenabled.12",xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",xlt:"application/vnd.ms-excel",xltm:"application/vnd.ms-excel.template.macroenabled.12",xltx:"application/vnd.openxmlformats-officedocument.spreadsheetml.template",xlw:"application/vnd.ms-excel",txt:"text/plain",text:"text/plain",conf:"text/plain",log:"text/plain",pdf:"application/pdf",zip:"application/zip","7z":"application/x-7z-compressed",rar:"application/x-rar-compressed",tar:"application/x-tar",gz:"application/gzip",dmg:"application/x-apple-diskimage"}},1011:(e,t,i)=>{"use strict";const s=i(8920);e.exports=function(e){const t=s(e);return`${0===t.hours?"":`${t.hours}h`}${0===t.minutes?"":`${0===t.hours?t.minutes:` ${t.minutes.toString(10).padStart(2,"0")}`}m`}${0!==t.hours?"":`${0===t.minutes?t.seconds:` ${t.seconds.toString(10).padStart(2,"0")}`}s`}`}},8920:e=>{"use strict";e.exports=function(e){return{hours:Math.floor(e/3600)%24,minutes:Math.floor(e/60)%60,seconds:Math.floor(e%60)}}},2966:e=>{"use strict";e.exports=function(e){const t=[],i=[];function s(e){t.push(e)}function n(e){i.push(e)}return Promise.all(e.map((e=>e.then(s,n)))).then((()=>({successful:t,failed:i})))}},6361:e=>{"use strict";e.exports=Array.from},469:e=>{"use strict";const t="...";e.exports=function(e,i){if(0===i)return"";if(e.length<=i)return e;if(i<=t.length+1)return`${e.slice(0,i-1)}…`;const s=i-t.length,n=Math.ceil(s/2),r=Math.floor(s/2);return e.slice(0,n)+t+e.slice(-r)}},6116:(e,t,i)=>{"use strict";var s,n;const r=i(8937),{nanoid:o}=i(2961),{Provider:a,RequestClient:l,Socket:d}=i(6385),h=i(7351),u=i(5313),c=i(2966),p=i(8429),f=i(4772),{RateLimitedQueue:m,internalRateLimitedQueue:g}=i(8618),v=i(6311),y=i(883),b=i(1234);function w(e,t){let i=t;return i||(i=new Error("Upload error")),"string"==typeof i&&(i=new Error(i)),i instanceof Error||(i=Object.assign(new Error("Upload error"),{data:i})),y(e)?(i=new v(i,e),i):(i.request=e,i)}function x(e){return e.data.slice(0,e.data.size,e.meta.type)}e.exports=(n=s=class extends r{constructor(e,t){super(e,t),this.type="uploader",this.id=this.opts.id||"XHRUpload",this.title="XHRUpload",this.defaultLocale=b;const i={formData:!0,fieldName:t.bundle?"files[]":"file",method:"post",metaFields:null,responseUrlFieldName:"url",bundle:!1,headers:{},timeout:3e4,limit:5,withCredentials:!1,responseType:"",getResponseData(t){let i={};try{i=JSON.parse(t)}catch(t){e.log(t)}return i},getResponseError(e,t){let i=new Error("Upload error");return y(t)&&(i=new v(i,t)),i},validateStatus:e=>e>=200&&e<300};if(this.opts={...i,...t},this.i18nInit(),this.handleUpload=this.handleUpload.bind(this),g in this.opts?this.requests=this.opts[g]:this.requests=new m(this.opts.limit),this.opts.bundle&&!this.opts.formData)throw new Error("`opts.formData` must be true when `opts.bundle` is enabled.");this.uploaderEvents=Object.create(null)}getOptions(e){const t=this.uppy.getState().xhrUpload,{headers:i}=this.opts,s={...this.opts,...t||{},...e.xhrUpload||{},headers:{}};return"function"==typeof i?s.headers=i(e):Object.assign(s.headers,this.opts.headers),t&&Object.assign(s.headers,t.headers),e.xhrUpload&&Object.assign(s.headers,e.xhrUpload.headers),s}addMetadata(e,t,i){(Array.isArray(i.metaFields)?i.metaFields:Object.keys(t)).forEach((i=>{e.append(i,t[i])}))}createFormDataUpload(e,t){const i=new FormData;this.addMetadata(i,e.meta,t);const s=x(e);return e.name?i.append(t.fieldName,s,e.meta.name):i.append(t.fieldName,s),i}createBundledUpload(e,t){const i=new FormData,{meta:s}=this.uppy.getState();return this.addMetadata(i,s,t),e.forEach((e=>{const t=this.getOptions(e),s=x(e);e.name?i.append(t.fieldName,s,e.name):i.append(t.fieldName,s)})),i}upload(e,t,i){const s=this.getOptions(e);return this.uppy.log(`uploading ${t} of ${i}`),new Promise(((t,i)=>{this.uppy.emit("upload-started",e);const n=s.formData?this.createFormDataUpload(e,s):e.data,r=new XMLHttpRequest;this.uploaderEvents[e.id]=new p(this.uppy);const a=new f(s.timeout,(()=>{r.abort(),d.done();const t=new Error(this.i18n("timedOut",{seconds:Math.ceil(s.timeout/1e3)}));this.uppy.emit("upload-error",e,t),i(t)})),l=o();r.upload.addEventListener("loadstart",(()=>{this.uppy.log(`[XHRUpload] ${l} started`)})),r.upload.addEventListener("progress",(t=>{this.uppy.log(`[XHRUpload] ${l} progress: ${t.loaded} / ${t.total}`),a.progress(),t.lengthComputable&&this.uppy.emit("upload-progress",e,{uploader:this,bytesUploaded:t.loaded,bytesTotal:t.total})})),r.addEventListener("load",(n=>{if(this.uppy.log(`[XHRUpload] ${l} finished`),a.done(),d.done(),this.uploaderEvents[e.id]&&(this.uploaderEvents[e.id].remove(),this.uploaderEvents[e.id]=null),s.validateStatus(n.target.status,r.responseText,r)){const i=s.getResponseData(r.responseText,r),o=i[s.responseUrlFieldName],a={status:n.target.status,body:i,uploadURL:o};return this.uppy.emit("upload-success",e,a),o&&this.uppy.log(`Download ${e.name} from ${o}`),t(e)}const o=s.getResponseData(r.responseText,r),h=w(r,s.getResponseError(r.responseText,r)),u={status:n.target.status,body:o};return this.uppy.emit("upload-error",e,h,u),i(h)})),r.addEventListener("error",(()=>{this.uppy.log(`[XHRUpload] ${l} errored`),a.done(),d.done(),this.uploaderEvents[e.id]&&(this.uploaderEvents[e.id].remove(),this.uploaderEvents[e.id]=null);const t=w(r,s.getResponseError(r.responseText,r));return this.uppy.emit("upload-error",e,t),i(t)})),r.open(s.method.toUpperCase(),s.endpoint,!0),r.withCredentials=s.withCredentials,""!==s.responseType&&(r.responseType=s.responseType);const d=this.requests.run((()=>{this.uppy.emit("upload-started",e);const t=this.getOptions(e);return Object.keys(t.headers).forEach((e=>{r.setRequestHeader(e,t.headers[e])})),r.send(n),()=>{a.done(),r.abort()}}));this.onFileRemove(e.id,(()=>{d.abort(),i(new Error("File removed"))})),this.onCancelAll(e.id,(()=>{d.abort(),i(new Error("Upload cancelled"))}))}))}uploadRemote(e){const t=this.getOptions(e);return new Promise(((i,s)=>{this.uppy.emit("upload-started",e);const n={};(Array.isArray(t.metaFields)?t.metaFields:Object.keys(e.meta)).forEach((t=>{n[t]=e.meta[t]})),new(e.remote.providerOptions.provider?a:l)(this.uppy,e.remote.providerOptions).post(e.remote.url,{...e.remote.body,endpoint:t.endpoint,size:e.data.size,fieldname:t.fieldName,metadata:n,httpMethod:t.method,useFormData:t.formData,headers:t.headers}).then((n=>{const{token:r}=n,o=u(e.remote.companionUrl),a=new d({target:`${o}/api/${r}`,autoOpen:!1});this.uploaderEvents[e.id]=new p(this.uppy),this.onFileRemove(e.id,(()=>{a.send("cancel",{}),l.abort(),i(`upload ${e.id} was removed`)})),this.onCancelAll(e.id,(()=>{a.send("cancel",{}),l.abort(),i(`upload ${e.id} was canceled`)})),this.onRetry(e.id,(()=>{a.send("pause",{}),a.send("resume",{})})),this.onRetryAll(e.id,(()=>{a.send("pause",{}),a.send("resume",{})})),a.on("progress",(t=>h(this,t,e))),a.on("success",(s=>{const n=t.getResponseData(s.response.responseText,s.response),r=n[t.responseUrlFieldName],o={status:s.response.status,body:n,uploadURL:r};return this.uppy.emit("upload-success",e,o),l.done(),this.uploaderEvents[e.id]&&(this.uploaderEvents[e.id].remove(),this.uploaderEvents[e.id]=null),i()})),a.on("error",(i=>{const n=i.response,r=n?t.getResponseError(n.responseText,n):Object.assign(new Error(i.error.message),{cause:i.error});this.uppy.emit("upload-error",e,r),l.done(),this.uploaderEvents[e.id]&&(this.uploaderEvents[e.id].remove(),this.uploaderEvents[e.id]=null),s(r)}));const l=this.requests.run((()=>(a.open(),e.isPaused&&a.send("pause",{}),()=>a.close())))})).catch((t=>{this.uppy.emit("upload-error",e,t),s(t)}))}))}uploadBundle(e){return new Promise(((t,i)=>{const{endpoint:s}=this.opts,{method:n}=this.opts,r=this.uppy.getState().xhrUpload,o=this.createBundledUpload(e,{...this.opts,...r||{}}),a=new XMLHttpRequest,l=new f(this.opts.timeout,(()=>{a.abort();const e=new Error(this.i18n("timedOut",{seconds:Math.ceil(this.opts.timeout/1e3)}));d(e),i(e)})),d=t=>{e.forEach((e=>{this.uppy.emit("upload-error",e,t)}))};a.upload.addEventListener("loadstart",(()=>{this.uppy.log("[XHRUpload] started uploading bundle"),l.progress()})),a.upload.addEventListener("progress",(t=>{l.progress(),t.lengthComputable&&e.forEach((e=>{this.uppy.emit("upload-progress",e,{uploader:this,bytesUploaded:t.loaded/t.total*e.size,bytesTotal:e.size})}))})),a.addEventListener("load",(s=>{if(l.done(),this.opts.validateStatus(s.target.status,a.responseText,a)){const i=this.opts.getResponseData(a.responseText,a),n={status:s.target.status,body:i};return e.forEach((e=>{this.uppy.emit("upload-success",e,n)})),t()}const n=this.opts.getResponseError(a.responseText,a)||new Error("Upload error");return n.request=a,d(n),i(n)})),a.addEventListener("error",(()=>{l.done();const e=this.opts.getResponseError(a.responseText,a)||new Error("Upload error");return d(e),i(e)})),this.uppy.on("cancel-all",(()=>{l.done(),a.abort()})),a.open(n.toUpperCase(),s,!0),a.withCredentials=this.opts.withCredentials,""!==this.opts.responseType&&(a.responseType=this.opts.responseType),Object.keys(this.opts.headers).forEach((e=>{a.setRequestHeader(e,this.opts.headers[e])})),a.send(o),e.forEach((e=>{this.uppy.emit("upload-started",e)}))}))}uploadFiles(e){const t=e.map(((t,i)=>{const s=parseInt(i,10)+1,n=e.length;return t.error?Promise.reject(new Error(t.error)):t.isRemote?this.uploadRemote(t,s,n):this.upload(t,s,n)}));return c(t)}onFileRemove(e,t){this.uploaderEvents[e].on("file-removed",(i=>{e===i.id&&t(i.id)}))}onRetry(e,t){this.uploaderEvents[e].on("upload-retry",(i=>{e===i&&t()}))}onRetryAll(e,t){this.uploaderEvents[e].on("retry-all",(()=>{this.uppy.getFile(e)&&t()}))}onCancelAll(e,t){this.uploaderEvents[e].on("cancel-all",(()=>{this.uppy.getFile(e)&&t()}))}handleUpload(e){if(0===e.length)return this.uppy.log("[XHRUpload] No files to upload!"),Promise.resolve();0!==this.opts.limit||this.opts[g]||this.uppy.log("[XHRUpload] When uploading multiple files at once, consider setting the `limit` option (to `10` for example), to limit the number of concurrent uploads, which helps prevent memory and network issues: https://uppy.io/docs/xhr-upload/#limit-0","warning"),this.uppy.log("[XHRUpload] Uploading...");const t=e.map((e=>this.uppy.getFile(e)));if(this.opts.bundle){if(t.some((e=>e.isRemote)))throw new Error("Can’t upload remote files when the `bundle: true` option is set");if("function"==typeof this.opts.headers)throw new TypeError("`headers` may not be a function when the `bundle: true` option is set");return this.uploadBundle(t)}return this.uploadFiles(t).then((()=>null))}install(){if(this.opts.bundle){const{capabilities:e}=this.uppy.getState();this.uppy.setState({capabilities:{...e,individualCancellation:!1}})}this.uppy.addUploader(this.handleUpload)}uninstall(){if(this.opts.bundle){const{capabilities:e}=this.uppy.getState();this.uppy.setState({capabilities:{...e,individualCancellation:!0}})}this.uppy.removeUploader(this.handleUpload)}},s.VERSION="2.0.7",n)},1234:e=>{"use strict";e.exports={strings:{timedOut:"Upload stalled for %{seconds} seconds, aborting."}}},5695:function(e,t,i){e.exports=function(e,t){"use strict";const i=e=>e&&"object"==typeof e&&"default"in e?e:{default:e},s=i(e),n=i(t),r="transitionend",o=e=>(e=>!(!e||"object"!=typeof e)&&(void 0!==e.jquery&&(e=e[0]),void 0!==e.nodeType))(e)?e.jquery?e[0]:e:"string"==typeof e&&e.length>0?document.querySelector(e):null,a=e=>{"function"==typeof e&&e()},l=(e,t,i=!0)=>{if(!i)return void a(e);const s=(e=>{if(!e)return 0;let{transitionDuration:t,transitionDelay:i}=window.getComputedStyle(e);const s=Number.parseFloat(t),n=Number.parseFloat(i);return s||n?(t=t.split(",")[0],i=i.split(",")[0],1e3*(Number.parseFloat(t)+Number.parseFloat(i))):0})(t)+5;let n=!1;const o=({target:i})=>{i===t&&(n=!0,t.removeEventListener(r,o),a(e))};t.addEventListener(r,o),setTimeout((()=>{n||t.dispatchEvent(new Event(r))}),s)};return class{constructor(e){(e=o(e))&&(this._element=e,s.default.set(this._element,this.constructor.DATA_KEY,this))}dispose(){s.default.remove(this._element,this.constructor.DATA_KEY),n.default.off(this._element,this.constructor.EVENT_KEY),Object.getOwnPropertyNames(this).forEach((e=>{this[e]=null}))}_queueCallback(e,t,i=!0){l(e,t,i)}static getInstance(e){return s.default.get(o(e),this.DATA_KEY)}static getOrCreateInstance(e,t={}){return this.getInstance(e)||new this(e,"object"==typeof t?t:null)}static get VERSION(){return"5.1.3"}static get NAME(){throw new Error('You have to implement the static method "NAME", for each component!')}static get DATA_KEY(){return`bs.${this.NAME}`}static get EVENT_KEY(){return`.${this.DATA_KEY}`}}}(i(493),i(9286))},493:function(e){e.exports=function(){"use strict";const e=new Map;return{set(t,i,s){e.has(t)||e.set(t,new Map);const n=e.get(t);n.has(i)||0===n.size?n.set(i,s):console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(n.keys())[0]}.`)},get:(t,i)=>e.has(t)&&e.get(t).get(i)||null,remove(t,i){if(!e.has(t))return;const s=e.get(t);s.delete(i),0===s.size&&e.delete(t)}}}()},9286:function(e){e.exports=function(){"use strict";const e=/[^.]*(?=\..*)\.|.*/,t=/\..*/,i=/::\d+$/,s={};let n=1;const r={mouseenter:"mouseover",mouseleave:"mouseout"},o=/^(mouseenter|mouseleave)/i,a=new Set(["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointerdown","pointermove","pointerup","pointerleave","pointercancel","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"]);function l(e,t){return t&&`${t}::${n++}`||e.uidEvent||n++}function d(e){const t=l(e);return e.uidEvent=t,s[t]=s[t]||{},s[t]}function h(e,t,i=null){const s=Object.keys(e);for(let n=0,r=s.length;n<r;n++){const r=e[s[n]];if(r.originalHandler===t&&r.delegationSelector===i)return r}return null}function u(e,t,i){const s="string"==typeof t,n=s?i:t;let r=f(e);return a.has(r)||(r=e),[s,n,r]}function c(t,i,s,n,r){if("string"!=typeof i||!t)return;if(s||(s=n,n=null),o.test(i)){const e=e=>function(t){if(!t.relatedTarget||t.relatedTarget!==t.delegateTarget&&!t.delegateTarget.contains(t.relatedTarget))return e.call(this,t)};n?n=e(n):s=e(s)}const[a,c,p]=u(i,s,n),f=d(t),g=f[p]||(f[p]={}),v=h(g,c,a?s:null);if(v)return void(v.oneOff=v.oneOff&&r);const y=l(c,i.replace(e,"")),b=a?function(e,t,i){return function s(n){const r=e.querySelectorAll(t);for(let{target:o}=n;o&&o!==this;o=o.parentNode)for(let a=r.length;a--;)if(r[a]===o)return n.delegateTarget=o,s.oneOff&&m.off(e,n.type,t,i),i.apply(o,[n]);return null}}(t,s,n):function(e,t){return function i(s){return s.delegateTarget=e,i.oneOff&&m.off(e,s.type,t),t.apply(e,[s])}}(t,s);b.delegationSelector=a?s:null,b.originalHandler=c,b.oneOff=r,b.uidEvent=y,g[y]=b,t.addEventListener(p,b,a)}function p(e,t,i,s,n){const r=h(t[i],s,n);r&&(e.removeEventListener(i,r,Boolean(n)),delete t[i][r.uidEvent])}function f(e){return e=e.replace(t,""),r[e]||e}const m={on(e,t,i,s){c(e,t,i,s,!1)},one(e,t,i,s){c(e,t,i,s,!0)},off(e,t,s,n){if("string"!=typeof t||!e)return;const[r,o,a]=u(t,s,n),l=a!==t,h=d(e),c=t.startsWith(".");if(void 0!==o){if(!h||!h[a])return;return void p(e,h,a,o,r?s:null)}c&&Object.keys(h).forEach((i=>{!function(e,t,i,s){const n=t[i]||{};Object.keys(n).forEach((r=>{if(r.includes(s)){const s=n[r];p(e,t,i,s.originalHandler,s.delegationSelector)}}))}(e,h,i,t.slice(1))}));const f=h[a]||{};Object.keys(f).forEach((s=>{const n=s.replace(i,"");if(!l||t.includes(n)){const t=f[s];p(e,h,a,t.originalHandler,t.delegationSelector)}}))},trigger(e,t,i){if("string"!=typeof t||!e)return null;const s=(()=>{const{jQuery:e}=window;return e&&!document.body.hasAttribute("data-bs-no-jquery")?e:null})(),n=f(t),r=t!==n,o=a.has(n);let l,d=!0,h=!0,u=!1,c=null;return r&&s&&(l=s.Event(t,i),s(e).trigger(l),d=!l.isPropagationStopped(),h=!l.isImmediatePropagationStopped(),u=l.isDefaultPrevented()),o?(c=document.createEvent("HTMLEvents"),c.initEvent(n,d,!0)):c=new CustomEvent(t,{bubbles:d,cancelable:!0}),void 0!==i&&Object.keys(i).forEach((e=>{Object.defineProperty(c,e,{get:()=>i[e]})})),u&&c.preventDefault(),h&&e.dispatchEvent(c),c.defaultPrevented&&void 0!==l&&l.preventDefault(),c}};return m}()},3175:function(e){e.exports=function(){"use strict";function e(e){return"true"===e||"false"!==e&&(e===Number(e).toString()?Number(e):""===e||"null"===e?null:e)}function t(e){return e.replace(/[A-Z]/g,(e=>`-${e.toLowerCase()}`))}return{setDataAttribute(e,i,s){e.setAttribute(`data-bs-${t(i)}`,s)},removeDataAttribute(e,i){e.removeAttribute(`data-bs-${t(i)}`)},getDataAttributes(t){if(!t)return{};const i={};return Object.keys(t.dataset).filter((e=>e.startsWith("bs"))).forEach((s=>{let n=s.replace(/^bs/,"");n=n.charAt(0).toLowerCase()+n.slice(1,n.length),i[n]=e(t.dataset[s])})),i},getDataAttribute:(i,s)=>e(i.getAttribute(`data-bs-${t(s)}`)),offset(e){const t=e.getBoundingClientRect();return{top:t.top+window.pageYOffset,left:t.left+window.pageXOffset}},position:e=>({top:e.offsetTop,left:e.offsetLeft})}}()},8737:function(e){e.exports=function(){"use strict";return{find:(e,t=document.documentElement)=>[].concat(...Element.prototype.querySelectorAll.call(t,e)),findOne:(e,t=document.documentElement)=>Element.prototype.querySelector.call(t,e),children:(e,t)=>[].concat(...e.children).filter((e=>e.matches(t))),parents(e,t){const i=[];let s=e.parentNode;for(;s&&s.nodeType===Node.ELEMENT_NODE&&3!==s.nodeType;)s.matches(t)&&i.push(s),s=s.parentNode;return i},prev(e,t){let i=e.previousElementSibling;for(;i;){if(i.matches(t))return[i];i=i.previousElementSibling}return[]},next(e,t){let i=e.nextElementSibling;for(;i;){if(i.matches(t))return[i];i=i.nextElementSibling}return[]},focusableChildren(e){const t=["a","button","input","textarea","select","details","[tabindex]",'[contenteditable="true"]'].map((e=>`${e}:not([tabindex^="-"])`)).join(", ");return this.find(t,e).filter((e=>!(e=>!e||e.nodeType!==Node.ELEMENT_NODE||!!e.classList.contains("disabled")||(void 0!==e.disabled?e.disabled:e.hasAttribute("disabled")&&"false"!==e.getAttribute("disabled")))(e)&&(e=>{return t=e,!(!t||"object"!=typeof t||(void 0!==t.jquery&&(t=t[0]),void 0===t.nodeType)||0===e.getClientRects().length||"visible"!==getComputedStyle(e).getPropertyValue("visibility"));var t})(e)))}}}()},3824:function(e,t,i){e.exports=function(e,t,i,s,n,r){"use strict";const o=e=>e&&"object"==typeof e&&"default"in e?e:{default:e};function a(e){if(e&&e.__esModule)return e;const t=Object.create(null);if(e)for(const i in e)if("default"!==i){const s=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(t,i,s.get?s:{enumerable:!0,get:()=>e[i]})}return t.default=e,Object.freeze(t)}const l=a(e),d=o(t),h=o(i),u=o(s),c=o(n),p=o(r),f=e=>!(!e||"object"!=typeof e)&&(void 0!==e.jquery&&(e=e[0]),void 0!==e.nodeType),m=e=>f(e)?e.jquery?e[0]:e:"string"==typeof e&&e.length>0?document.querySelector(e):null,g=e=>{if(!document.documentElement.attachShadow)return null;if("function"==typeof e.getRootNode){const t=e.getRootNode();return t instanceof ShadowRoot?t:null}return e instanceof ShadowRoot?e:e.parentNode?g(e.parentNode):null},v=()=>{},y=[],b=()=>"rtl"===document.documentElement.dir,w=new Set(["background","cite","href","itemtype","longdesc","poster","src","xlink:href"]),x=/^(?:(?:https?|mailto|ftp|tel|file|sms):|[^#&/:?]*(?:[#/?]|$))/i,S=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[\d+/a-z]+=*$/i,_=(e,t)=>{const i=e.nodeName.toLowerCase();if(t.includes(i))return!w.has(i)||Boolean(x.test(e.nodeValue)||S.test(e.nodeValue));const s=t.filter((e=>e instanceof RegExp));for(let e=0,t=s.length;e<t;e++)if(s[e].test(i))return!0;return!1};function T(e,t,i){if(!e.length)return e;if(i&&"function"==typeof i)return i(e);const s=(new window.DOMParser).parseFromString(e,"text/html"),n=[].concat(...s.body.querySelectorAll("*"));for(let e=0,i=n.length;e<i;e++){const i=n[e],s=i.nodeName.toLowerCase();if(!Object.keys(t).includes(s)){i.remove();continue}const r=[].concat(...i.attributes),o=[].concat(t["*"]||[],t[s]||[]);r.forEach((e=>{_(e,o)||i.removeAttribute(e.nodeName)}))}return s.body.innerHTML}const k="tooltip",C=new Set(["sanitize","allowList","sanitizeFn"]),P={animation:"boolean",template:"string",title:"(string|element|function)",trigger:"string",delay:"(number|object)",html:"boolean",selector:"(string|boolean)",placement:"(string|function)",offset:"(array|string|function)",container:"(string|element|boolean)",fallbackPlacements:"array",boundary:"(string|element)",customClass:"(string|function)",sanitize:"boolean",sanitizeFn:"(null|function)",allowList:"object",popperConfig:"(null|object|function)"},O={AUTO:"auto",TOP:"top",RIGHT:b()?"left":"right",BOTTOM:"bottom",LEFT:b()?"right":"left"},$={animation:!0,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,selector:!1,placement:"top",offset:[0,0],container:!1,fallbackPlacements:["top","right","bottom","left"],boundary:"clippingParents",customClass:"",sanitize:!0,sanitizeFn:null,allowList:{"*":["class","dir","id","lang","role",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],div:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","srcset","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},popperConfig:null},F={HIDE:"hide.bs.tooltip",HIDDEN:"hidden.bs.tooltip",SHOW:"show.bs.tooltip",SHOWN:"shown.bs.tooltip",INSERTED:"inserted.bs.tooltip",CLICK:"click.bs.tooltip",FOCUSIN:"focusin.bs.tooltip",FOCUSOUT:"focusout.bs.tooltip",MOUSEENTER:"mouseenter.bs.tooltip",MOUSELEAVE:"mouseleave.bs.tooltip"},A="fade",E="show",D="show",I="out",U=".tooltip-inner",B=".modal",L="hide.bs.modal",R="hover",j="focus";class N extends p.default{constructor(e,t){if(void 0===l)throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org)");super(e),this._isEnabled=!0,this._timeout=0,this._hoverState="",this._activeTrigger={},this._popper=null,this._config=this._getConfig(t),this.tip=null,this._setListeners()}static get Default(){return $}static get NAME(){return k}static get Event(){return F}static get DefaultType(){return P}enable(){this._isEnabled=!0}disable(){this._isEnabled=!1}toggleEnabled(){this._isEnabled=!this._isEnabled}toggle(e){if(this._isEnabled)if(e){const t=this._initializeOnDelegatedTarget(e);t._activeTrigger.click=!t._activeTrigger.click,t._isWithActiveTrigger()?t._enter(null,t):t._leave(null,t)}else{if(this.getTipElement().classList.contains(E))return void this._leave(null,this);this._enter(null,this)}}dispose(){clearTimeout(this._timeout),h.default.off(this._element.closest(B),L,this._hideModalHandler),this.tip&&this.tip.remove(),this._disposePopper(),super.dispose()}show(){if("none"===this._element.style.display)throw new Error("Please use show on visible elements");if(!this.isWithContent()||!this._isEnabled)return;const e=h.default.trigger(this._element,this.constructor.Event.SHOW),t=g(this._element),i=null===t?this._element.ownerDocument.documentElement.contains(this._element):t.contains(this._element);if(e.defaultPrevented||!i)return;"tooltip"===this.constructor.NAME&&this.tip&&this.getTitle()!==this.tip.querySelector(U).innerHTML&&(this._disposePopper(),this.tip.remove(),this.tip=null);const s=this.getTipElement(),n=(e=>{do{e+=Math.floor(1e6*Math.random())}while(document.getElementById(e));return e})(this.constructor.NAME);s.setAttribute("id",n),this._element.setAttribute("aria-describedby",n),this._config.animation&&s.classList.add(A);const r="function"==typeof this._config.placement?this._config.placement.call(this,s,this._element):this._config.placement,o=this._getAttachment(r);this._addAttachmentClass(o);const{container:a}=this._config;d.default.set(s,this.constructor.DATA_KEY,this),this._element.ownerDocument.documentElement.contains(this.tip)||(a.append(s),h.default.trigger(this._element,this.constructor.Event.INSERTED)),this._popper?this._popper.update():this._popper=l.createPopper(this._element,s,this._getPopperConfig(o)),s.classList.add(E);const u=this._resolvePossibleFunction(this._config.customClass);u&&s.classList.add(...u.split(" ")),"ontouchstart"in document.documentElement&&[].concat(...document.body.children).forEach((e=>{h.default.on(e,"mouseover",v)}));const c=this.tip.classList.contains(A);this._queueCallback((()=>{const e=this._hoverState;this._hoverState=null,h.default.trigger(this._element,this.constructor.Event.SHOWN),e===I&&this._leave(null,this)}),this.tip,c)}hide(){if(!this._popper)return;const e=this.getTipElement();if(h.default.trigger(this._element,this.constructor.Event.HIDE).defaultPrevented)return;e.classList.remove(E),"ontouchstart"in document.documentElement&&[].concat(...document.body.children).forEach((e=>h.default.off(e,"mouseover",v))),this._activeTrigger.click=!1,this._activeTrigger.focus=!1,this._activeTrigger.hover=!1;const t=this.tip.classList.contains(A);this._queueCallback((()=>{this._isWithActiveTrigger()||(this._hoverState!==D&&e.remove(),this._cleanTipClass(),this._element.removeAttribute("aria-describedby"),h.default.trigger(this._element,this.constructor.Event.HIDDEN),this._disposePopper())}),this.tip,t),this._hoverState=""}update(){null!==this._popper&&this._popper.update()}isWithContent(){return Boolean(this.getTitle())}getTipElement(){if(this.tip)return this.tip;const e=document.createElement("div");e.innerHTML=this._config.template;const t=e.children[0];return this.setContent(t),t.classList.remove(A,E),this.tip=t,this.tip}setContent(e){this._sanitizeAndSetContent(e,this.getTitle(),U)}_sanitizeAndSetContent(e,t,i){const s=c.default.findOne(i,e);t||!s?this.setElementContent(s,t):s.remove()}setElementContent(e,t){if(null!==e)return f(t)?(t=m(t),void(this._config.html?t.parentNode!==e&&(e.innerHTML="",e.append(t)):e.textContent=t.textContent)):void(this._config.html?(this._config.sanitize&&(t=T(t,this._config.allowList,this._config.sanitizeFn)),e.innerHTML=t):e.textContent=t)}getTitle(){const e=this._element.getAttribute("data-bs-original-title")||this._config.title;return this._resolvePossibleFunction(e)}updateAttachment(e){return"right"===e?"end":"left"===e?"start":e}_initializeOnDelegatedTarget(e,t){return t||this.constructor.getOrCreateInstance(e.delegateTarget,this._getDelegateConfig())}_getOffset(){const{offset:e}=this._config;return"string"==typeof e?e.split(",").map((e=>Number.parseInt(e,10))):"function"==typeof e?t=>e(t,this._element):e}_resolvePossibleFunction(e){return"function"==typeof e?e.call(this._element):e}_getPopperConfig(e){const t={placement:e,modifiers:[{name:"flip",options:{fallbackPlacements:this._config.fallbackPlacements}},{name:"offset",options:{offset:this._getOffset()}},{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"arrow",options:{element:`.${this.constructor.NAME}-arrow`}},{name:"onChange",enabled:!0,phase:"afterWrite",fn:e=>this._handlePopperPlacementChange(e)}],onFirstUpdate:e=>{e.options.placement!==e.placement&&this._handlePopperPlacementChange(e)}};return{...t,..."function"==typeof this._config.popperConfig?this._config.popperConfig(t):this._config.popperConfig}}_addAttachmentClass(e){this.getTipElement().classList.add(`${this._getBasicClassPrefix()}-${this.updateAttachment(e)}`)}_getAttachment(e){return O[e.toUpperCase()]}_setListeners(){this._config.trigger.split(" ").forEach((e=>{if("click"===e)h.default.on(this._element,this.constructor.Event.CLICK,this._config.selector,(e=>this.toggle(e)));else if("manual"!==e){const t=e===R?this.constructor.Event.MOUSEENTER:this.constructor.Event.FOCUSIN,i=e===R?this.constructor.Event.MOUSELEAVE:this.constructor.Event.FOCUSOUT;h.default.on(this._element,t,this._config.selector,(e=>this._enter(e))),h.default.on(this._element,i,this._config.selector,(e=>this._leave(e)))}})),this._hideModalHandler=()=>{this._element&&this.hide()},h.default.on(this._element.closest(B),L,this._hideModalHandler),this._config.selector?this._config={...this._config,trigger:"manual",selector:""}:this._fixTitle()}_fixTitle(){const e=this._element.getAttribute("title"),t=typeof this._element.getAttribute("data-bs-original-title");(e||"string"!==t)&&(this._element.setAttribute("data-bs-original-title",e||""),!e||this._element.getAttribute("aria-label")||this._element.textContent||this._element.setAttribute("aria-label",e),this._element.setAttribute("title",""))}_enter(e,t){t=this._initializeOnDelegatedTarget(e,t),e&&(t._activeTrigger["focusin"===e.type?j:R]=!0),t.getTipElement().classList.contains(E)||t._hoverState===D?t._hoverState=D:(clearTimeout(t._timeout),t._hoverState=D,t._config.delay&&t._config.delay.show?t._timeout=setTimeout((()=>{t._hoverState===D&&t.show()}),t._config.delay.show):t.show())}_leave(e,t){t=this._initializeOnDelegatedTarget(e,t),e&&(t._activeTrigger["focusout"===e.type?j:R]=t._element.contains(e.relatedTarget)),t._isWithActiveTrigger()||(clearTimeout(t._timeout),t._hoverState=I,t._config.delay&&t._config.delay.hide?t._timeout=setTimeout((()=>{t._hoverState===I&&t.hide()}),t._config.delay.hide):t.hide())}_isWithActiveTrigger(){for(const e in this._activeTrigger)if(this._activeTrigger[e])return!0;return!1}_getConfig(e){const t=u.default.getDataAttributes(this._element);return Object.keys(t).forEach((e=>{C.has(e)&&delete t[e]})),(e={...this.constructor.Default,...t,..."object"==typeof e&&e?e:{}}).container=!1===e.container?document.body:m(e.container),"number"==typeof e.delay&&(e.delay={show:e.delay,hide:e.delay}),"number"==typeof e.title&&(e.title=e.title.toString()),"number"==typeof e.content&&(e.content=e.content.toString()),((e,t,i)=>{Object.keys(i).forEach((s=>{const n=i[s],r=t[s],o=r&&f(r)?"element":null==(a=r)?`${a}`:{}.toString.call(a).match(/\s([a-z]+)/i)[1].toLowerCase();var a;if(!new RegExp(n).test(o))throw new TypeError(`${e.toUpperCase()}: Option "${s}" provided type "${o}" but expected type "${n}".`)}))})(k,e,this.constructor.DefaultType),e.sanitize&&(e.template=T(e.template,e.allowList,e.sanitizeFn)),e}_getDelegateConfig(){const e={};for(const t in this._config)this.constructor.Default[t]!==this._config[t]&&(e[t]=this._config[t]);return e}_cleanTipClass(){const e=this.getTipElement(),t=new RegExp(`(^|\\s)${this._getBasicClassPrefix()}\\S+`,"g"),i=e.getAttribute("class").match(t);null!==i&&i.length>0&&i.map((e=>e.trim())).forEach((t=>e.classList.remove(t)))}_getBasicClassPrefix(){return"bs-tooltip"}_handlePopperPlacementChange(e){const{state:t}=e;t&&(this.tip=t.elements.popper,this._cleanTipClass(),this._addAttachmentClass(this._getAttachment(t.placement)))}_disposePopper(){this._popper&&(this._popper.destroy(),this._popper=null)}static jQueryInterface(e){return this.each((function(){const t=N.getOrCreateInstance(this,e);if("string"==typeof e){if(void 0===t[e])throw new TypeError(`No method named "${e}"`);t[e]()}}))}}return M=N,z=()=>{const e=(()=>{const{jQuery:e}=window;return e&&!document.body.hasAttribute("data-bs-no-jquery")?e:null})();if(e){const t=M.NAME,i=e.fn[t];e.fn[t]=M.jQueryInterface,e.fn[t].Constructor=M,e.fn[t].noConflict=()=>(e.fn[t]=i,M.jQueryInterface)}},"loading"===document.readyState?(y.length||document.addEventListener("DOMContentLoaded",(()=>{y.forEach((e=>e()))})),y.push(z)):z(),N;var M,z}(i(4750),i(493),i(9286),i(3175),i(8737),i(5695))},4184:(e,t)=>{var i;!function(){"use strict";var s={}.hasOwnProperty;function n(){for(var e=[],t=0;t<arguments.length;t++){var i=arguments[t];if(i){var r=typeof i;if("string"===r||"number"===r)e.push(i);else if(Array.isArray(i)){if(i.length){var o=n.apply(null,i);o&&e.push(o)}}else if("object"===r)if(i.toString===Object.prototype.toString)for(var a in i)s.call(i,a)&&i[a]&&e.push(a);else e.push(i.toString())}}return e.join(" ")}e.exports?(n.default=n,e.exports=n):void 0===(i=function(){return n}.apply(t,[]))||(e.exports=i)}()},1443:function(e,t,i){!function(e){"use strict";function t(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}var s="undefined"!=typeof self?self:i.g;const n="undefined"!=typeof navigator,r=n&&"undefined"==typeof HTMLImageElement,o=!(void 0===i.g||"undefined"==typeof process||!process.versions||!process.versions.node),a=s.Buffer,l=!!a,d=e=>void 0!==e;function h(e){return void 0===e||(e instanceof Map?0===e.size:0===Object.values(e).filter(d).length)}function u(e){let t=new Error(e);throw delete t.stack,t}function c(e){let t=function(e){let t=0;return e.ifd0.enabled&&(t+=1024),e.exif.enabled&&(t+=2048),e.makerNote&&(t+=2048),e.userComment&&(t+=1024),e.gps.enabled&&(t+=512),e.interop.enabled&&(t+=100),e.ifd1.enabled&&(t+=1024),t+2048}(e);return e.jfif.enabled&&(t+=50),e.xmp.enabled&&(t+=2e4),e.iptc.enabled&&(t+=14e3),e.icc.enabled&&(t+=6e3),t}const p=e=>String.fromCharCode.apply(null,e),f="undefined"!=typeof TextDecoder?new TextDecoder("utf-8"):void 0;class m{static from(e,t){return e instanceof this&&e.le===t?e:new m(e,void 0,void 0,t)}constructor(e,t=0,i,s){if("boolean"==typeof s&&(this.le=s),Array.isArray(e)&&(e=new Uint8Array(e)),0===e)this.byteOffset=0,this.byteLength=0;else if(e instanceof ArrayBuffer){void 0===i&&(i=e.byteLength-t);let s=new DataView(e,t,i);this._swapDataView(s)}else if(e instanceof Uint8Array||e instanceof DataView||e instanceof m){void 0===i&&(i=e.byteLength-t),(t+=e.byteOffset)+i>e.byteOffset+e.byteLength&&u("Creating view outside of available memory in ArrayBuffer");let s=new DataView(e.buffer,t,i);this._swapDataView(s)}else if("number"==typeof e){let t=new DataView(new ArrayBuffer(e));this._swapDataView(t)}else u("Invalid input argument for BufferView: "+e)}_swapArrayBuffer(e){this._swapDataView(new DataView(e))}_swapBuffer(e){this._swapDataView(new DataView(e.buffer,e.byteOffset,e.byteLength))}_swapDataView(e){this.dataView=e,this.buffer=e.buffer,this.byteOffset=e.byteOffset,this.byteLength=e.byteLength}_lengthToEnd(e){return this.byteLength-e}set(e,t,i=m){return e instanceof DataView||e instanceof m?e=new Uint8Array(e.buffer,e.byteOffset,e.byteLength):e instanceof ArrayBuffer&&(e=new Uint8Array(e)),e instanceof Uint8Array||u("BufferView.set(): Invalid data argument."),this.toUint8().set(e,t),new i(this,t,e.byteLength)}subarray(e,t){return t=t||this._lengthToEnd(e),new m(this,e,t)}toUint8(){return new Uint8Array(this.buffer,this.byteOffset,this.byteLength)}getUint8Array(e,t){return new Uint8Array(this.buffer,this.byteOffset+e,t)}getString(e=0,t=this.byteLength){return i=this.getUint8Array(e,t),f?f.decode(i):l?Buffer.from(i).toString("utf8"):decodeURIComponent(escape(p(i)));var i}getLatin1String(e=0,t=this.byteLength){let i=this.getUint8Array(e,t);return p(i)}getUnicodeString(e=0,t=this.byteLength){const i=[];for(let s=0;s<t&&e+s<this.byteLength;s+=2)i.push(this.getUint16(e+s));return p(i)}getInt8(e){return this.dataView.getInt8(e)}getUint8(e){return this.dataView.getUint8(e)}getInt16(e,t=this.le){return this.dataView.getInt16(e,t)}getInt32(e,t=this.le){return this.dataView.getInt32(e,t)}getUint16(e,t=this.le){return this.dataView.getUint16(e,t)}getUint32(e,t=this.le){return this.dataView.getUint32(e,t)}getFloat32(e,t=this.le){return this.dataView.getFloat32(e,t)}getFloat64(e,t=this.le){return this.dataView.getFloat64(e,t)}getFloat(e,t=this.le){return this.dataView.getFloat32(e,t)}getDouble(e,t=this.le){return this.dataView.getFloat64(e,t)}getUintBytes(e,t,i){switch(t){case 1:return this.getUint8(e,i);case 2:return this.getUint16(e,i);case 4:return this.getUint32(e,i);case 8:return this.getUint64&&this.getUint64(e,i)}}getUint(e,t,i){switch(t){case 8:return this.getUint8(e,i);case 16:return this.getUint16(e,i);case 32:return this.getUint32(e,i);case 64:return this.getUint64&&this.getUint64(e,i)}}toString(e){return this.dataView.toString(e,this.constructor.name)}ensureChunk(){}}function g(e,t){u(`${e} '${t}' was not loaded, try using full build of exifr.`)}class v extends Map{constructor(e){super(),this.kind=e}get(e,t){return this.has(e)||g(this.kind,e),t&&(e in t||function(e,t){u(`Unknown ${e} '${t}'.`)}(this.kind,e),t[e].enabled||g(this.kind,e)),super.get(e)}keyList(){return Array.from(this.keys())}}var y=new v("file parser"),b=new v("segment parser"),w=new v("file reader");let x=s.fetch;const S="Invalid input argument";function _(e,t){return(i=e).startsWith("data:")||i.length>1e4?k(e,t,"base64"):o&&e.includes("://")?T(e,t,"url",C):o?k(e,t,"fs"):n?T(e,t,"url",C):void u(S);var i}async function T(e,t,i,s){return w.has(i)?k(e,t,i):s?async function(e,t){let i=await t(e);return new m(i)}(e,s):void u(`Parser ${i} is not loaded`)}async function k(e,t,i){let s=new(w.get(i))(e,t);return await s.read(),s}const C=e=>x(e).then((e=>e.arrayBuffer())),P=e=>new Promise(((t,i)=>{let s=new FileReader;s.onloadend=()=>t(s.result||new ArrayBuffer),s.onerror=i,s.readAsArrayBuffer(e)}));class O extends Map{get tagKeys(){return this.allKeys||(this.allKeys=Array.from(this.keys())),this.allKeys}get tagValues(){return this.allValues||(this.allValues=Array.from(this.values())),this.allValues}}function $(e,t,i){let s=new O;for(let[e,t]of i)s.set(e,t);if(Array.isArray(t))for(let i of t)e.set(i,s);else e.set(t,s);return s}function F(e,t,i){let s,n=e.get(t);for(s of i)n.set(s[0],s[1])}const A=new Map,E=new Map,D=new Map,I=37500,U=37510,B=33723,L=34675,R=34665,j=34853,N=40965,M=["chunked","firstChunkSize","firstChunkSizeNode","firstChunkSizeBrowser","chunkSize","chunkLimit"],z=["jfif","xmp","icc","iptc","ihdr"],H=["tiff",...z],q=["ifd0","ifd1","exif","gps","interop"],V=[...H,...q],W=["makerNote","userComment"],G=["translateKeys","translateValues","reviveValues","multiSegment"],Q=[...G,"sanitize","mergeOutput","silentErrors"];class K{get translate(){return this.translateKeys||this.translateValues||this.reviveValues}}class X extends K{get needed(){return this.enabled||this.deps.size>0}constructor(e,i,s,n){if(super(),t(this,"enabled",!1),t(this,"skip",new Set),t(this,"pick",new Set),t(this,"deps",new Set),t(this,"translateKeys",!1),t(this,"translateValues",!1),t(this,"reviveValues",!1),this.key=e,this.enabled=i,this.parse=this.enabled,this.applyInheritables(n),this.canBeFiltered=q.includes(e),this.canBeFiltered&&(this.dict=A.get(e)),void 0!==s)if(Array.isArray(s))this.parse=this.enabled=!0,this.canBeFiltered&&s.length>0&&this.translateTagSet(s,this.pick);else if("object"==typeof s){if(this.enabled=!0,this.parse=!1!==s.parse,this.canBeFiltered){let{pick:e,skip:t}=s;e&&e.length>0&&this.translateTagSet(e,this.pick),t&&t.length>0&&this.translateTagSet(t,this.skip)}this.applyInheritables(s)}else!0===s||!1===s?this.parse=this.enabled=s:u(`Invalid options argument: ${s}`)}applyInheritables(e){let t,i;for(t of G)i=e[t],void 0!==i&&(this[t]=i)}translateTagSet(e,t){if(this.dict){let i,s,{tagKeys:n,tagValues:r}=this.dict;for(i of e)"string"==typeof i?(s=r.indexOf(i),-1===s&&(s=n.indexOf(Number(i))),-1!==s&&t.add(Number(n[s]))):t.add(i)}else for(let i of e)t.add(i)}finalizeFilters(){!this.enabled&&this.deps.size>0?(this.enabled=!0,ie(this.pick,this.deps)):this.enabled&&this.pick.size>0&&ie(this.pick,this.deps)}}var Y={jfif:!1,tiff:!0,xmp:!1,icc:!1,iptc:!1,ifd0:!0,ifd1:!1,exif:!0,gps:!0,interop:!1,ihdr:void 0,makerNote:!1,userComment:!1,multiSegment:!1,skip:[],pick:[],translateKeys:!0,translateValues:!0,reviveValues:!0,sanitize:!0,mergeOutput:!0,silentErrors:!0,chunked:!0,firstChunkSize:void 0,firstChunkSizeNode:512,firstChunkSizeBrowser:65536,chunkSize:65536,chunkLimit:5},J=new Map;class Z extends K{static useCached(e){let t=J.get(e);return void 0!==t||(t=new this(e),J.set(e,t)),t}constructor(e){super(),!0===e?this.setupFromTrue():void 0===e?this.setupFromUndefined():Array.isArray(e)?this.setupFromArray(e):"object"==typeof e?this.setupFromObject(e):u(`Invalid options argument ${e}`),void 0===this.firstChunkSize&&(this.firstChunkSize=n?this.firstChunkSizeBrowser:this.firstChunkSizeNode),this.mergeOutput&&(this.ifd1.enabled=!1),this.filterNestedSegmentTags(),this.traverseTiffDependencyTree(),this.checkLoadedPlugins()}setupFromUndefined(){let e;for(e of M)this[e]=Y[e];for(e of Q)this[e]=Y[e];for(e of W)this[e]=Y[e];for(e of V)this[e]=new X(e,Y[e],void 0,this)}setupFromTrue(){let e;for(e of M)this[e]=Y[e];for(e of Q)this[e]=Y[e];for(e of W)this[e]=!0;for(e of V)this[e]=new X(e,!0,void 0,this)}setupFromArray(e){let t;for(t of M)this[t]=Y[t];for(t of Q)this[t]=Y[t];for(t of W)this[t]=Y[t];for(t of V)this[t]=new X(t,!1,void 0,this);this.setupGlobalFilters(e,void 0,q)}setupFromObject(e){let t;for(t of(q.ifd0=q.ifd0||q.image,q.ifd1=q.ifd1||q.thumbnail,Object.assign(this,e),M))this[t]=te(e[t],Y[t]);for(t of Q)this[t]=te(e[t],Y[t]);for(t of W)this[t]=te(e[t],Y[t]);for(t of H)this[t]=new X(t,Y[t],e[t],this);for(t of q)this[t]=new X(t,Y[t],e[t],this.tiff);this.setupGlobalFilters(e.pick,e.skip,q,V),!0===e.tiff?this.batchEnableWithBool(q,!0):!1===e.tiff?this.batchEnableWithUserValue(q,e):Array.isArray(e.tiff)?this.setupGlobalFilters(e.tiff,void 0,q):"object"==typeof e.tiff&&this.setupGlobalFilters(e.tiff.pick,e.tiff.skip,q)}batchEnableWithBool(e,t){for(let i of e)this[i].enabled=t}batchEnableWithUserValue(e,t){for(let i of e){let e=t[i];this[i].enabled=!1!==e&&void 0!==e}}setupGlobalFilters(e,t,i,s=i){if(e&&e.length){for(let e of s)this[e].enabled=!1;let t=ee(e,i);for(let[e,i]of t)ie(this[e].pick,i),this[e].enabled=!0}else if(t&&t.length){let e=ee(t,i);for(let[t,i]of e)ie(this[t].skip,i)}}filterNestedSegmentTags(){let{ifd0:e,exif:t,xmp:i,iptc:s,icc:n}=this;this.makerNote?t.deps.add(I):t.skip.add(I),this.userComment?t.deps.add(U):t.skip.add(U),i.enabled||e.skip.add(700),s.enabled||e.skip.add(B),n.enabled||e.skip.add(L)}traverseTiffDependencyTree(){let{ifd0:e,exif:t,gps:i,interop:s}=this;s.needed&&(t.deps.add(N),e.deps.add(N)),t.needed&&e.deps.add(R),i.needed&&e.deps.add(j),this.tiff.enabled=q.some((e=>!0===this[e].enabled))||this.makerNote||this.userComment;for(let e of q)this[e].finalizeFilters()}get onlyTiff(){return!z.map((e=>this[e].enabled)).some((e=>!0===e))&&this.tiff.enabled}checkLoadedPlugins(){for(let e of H)this[e].enabled&&!b.has(e)&&g("segment parser",e)}}function ee(e,t){let i,s,n,r,o=[];for(n of t){for(r of(i=A.get(n),s=[],i))(e.includes(r[0])||e.includes(r[1]))&&s.push(r[0]);s.length&&o.push([n,s])}return o}function te(e,t){return void 0!==e?e:void 0!==t?t:void 0}function ie(e,t){for(let i of t)e.add(i)}t(Z,"default",Y);class se{constructor(e){t(this,"parsers",{}),t(this,"output",{}),t(this,"errors",[]),t(this,"pushToErrors",(e=>this.errors.push(e))),this.options=Z.useCached(e)}async read(e){this.file=await function(e,t){return"string"==typeof e?_(e,t):n&&!r&&e instanceof HTMLImageElement?_(e.src,t):e instanceof Uint8Array||e instanceof ArrayBuffer||e instanceof DataView?new m(e):n&&e instanceof Blob?T(e,t,"blob",P):void u(S)}(e,this.options)}setup(){if(this.fileParser)return;let{file:e}=this,t=e.getUint16(0);for(let[i,s]of y)if(s.canHandle(e,t))return this.fileParser=new s(this.options,this.file,this.parsers),e[i]=!0;this.file.close&&this.file.close(),u("Unknown file format")}async parse(){let{output:e,errors:t}=this;return this.setup(),this.options.silentErrors?(await this.executeParsers().catch(this.pushToErrors),t.push(...this.fileParser.errors)):await this.executeParsers(),this.file.close&&this.file.close(),this.options.silentErrors&&t.length>0&&(e.errors=t),h(i=e)?void 0:i;var i}async executeParsers(){let{output:e}=this;await this.fileParser.parse();let t=Object.values(this.parsers).map((async t=>{let i=await t.parse();t.assignToOutput(e,i)}));this.options.silentErrors&&(t=t.map((e=>e.catch(this.pushToErrors)))),await Promise.all(t)}async extractThumbnail(){this.setup();let{options:e,file:t}=this,i=b.get("tiff",e);var s;if(t.tiff?s={start:0,type:"tiff"}:t.jpeg&&(s=await this.fileParser.getOrFindSegment("tiff")),void 0===s)return;let n=await this.fileParser.ensureSegmentChunk(s),r=this.parsers.tiff=new i(n,e,t),o=await r.extractThumbnail();return t.close&&t.close(),o}}async function ne(e,t){let i=new se(t);return await i.read(e),i.parse()}var re=Object.freeze({__proto__:null,parse:ne,Exifr:se,fileParsers:y,segmentParsers:b,fileReaders:w,tagKeys:A,tagValues:E,tagRevivers:D,createDictionary:$,extendDictionary:F,fetchUrlAsArrayBuffer:C,readBlobAsArrayBuffer:P,chunkedProps:M,otherSegments:z,segments:H,tiffBlocks:q,segmentsAndBlocks:V,tiffExtractables:W,inheritables:G,allFormatters:Q,Options:Z});class oe{static findPosition(e,t){let i=e.getUint16(t+2)+2,s="function"==typeof this.headerLength?this.headerLength(e,t,i):this.headerLength,n=t+s,r=i-s;return{offset:t,length:i,headerLength:s,start:n,size:r,end:n+r}}static parse(e,t={}){return new this(e,new Z({[this.type]:t}),e).parse()}normalizeInput(e){return e instanceof m?e:new m(e)}constructor(e,i={},s){t(this,"errors",[]),t(this,"raw",new Map),t(this,"handleError",(e=>{if(!this.options.silentErrors)throw e;this.errors.push(e.message)})),this.chunk=this.normalizeInput(e),this.file=s,this.type=this.constructor.type,this.globalOptions=this.options=i,this.localOptions=i[this.type],this.canTranslate=this.localOptions&&this.localOptions.translate}translate(){this.canTranslate&&(this.translated=this.translateBlock(this.raw,this.type))}get output(){return this.translated?this.translated:this.raw?Object.fromEntries(this.raw):void 0}translateBlock(e,t){let i=D.get(t),s=E.get(t),n=A.get(t),r=this.options[t],o=r.reviveValues&&!!i,a=r.translateValues&&!!s,l=r.translateKeys&&!!n,d={};for(let[t,r]of e)o&&i.has(t)?r=i.get(t)(r):a&&s.has(t)&&(r=this.translateValue(r,s.get(t))),l&&n.has(t)&&(t=n.get(t)||t),d[t]=r;return d}translateValue(e,t){return t[e]||t.DEFAULT||e}assignToOutput(e,t){this.assignObjectToOutput(e,this.constructor.type,t)}assignObjectToOutput(e,t,i){if(this.globalOptions.mergeOutput)return Object.assign(e,i);e[t]?Object.assign(e[t],i):e[t]=i}}function ae(e){return 192===e||194===e||196===e||219===e||221===e||218===e||254===e}function le(e){return e>=224&&e<=239}function de(e,t,i){for(let[s,n]of b)if(n.canHandle(e,t,i))return s}t(oe,"headerLength",4),t(oe,"type",void 0),t(oe,"multiSegment",!1),t(oe,"canHandle",(()=>!1));class he extends class{constructor(e,i,s){t(this,"errors",[]),t(this,"ensureSegmentChunk",(async e=>{let t=e.start,i=e.size||65536;if(this.file.chunked)if(this.file.available(t,i))e.chunk=this.file.subarray(t,i);else try{e.chunk=await this.file.readChunk(t,i)}catch(t){u(`Couldn't read segment: ${JSON.stringify(e)}. ${t.message}`)}else this.file.byteLength>t+i?e.chunk=this.file.subarray(t,i):void 0===e.size?e.chunk=this.file.subarray(t):u("Segment unreachable: "+JSON.stringify(e));return e.chunk})),this.extendOptions&&this.extendOptions(e),this.options=e,this.file=i,this.parsers=s}injectSegment(e,t){this.options[e].enabled&&this.createParser(e,t)}createParser(e,t){let i=new(b.get(e))(t,this.options,this.file);return this.parsers[e]=i}createParsers(e){for(let t of e){let{type:e,chunk:i}=t,s=this.options[e];if(s&&s.enabled){let t=this.parsers[e];t&&t.append||t||this.createParser(e,i)}}}async readSegments(e){let t=e.map(this.ensureSegmentChunk);await Promise.all(t)}}{constructor(...e){super(...e),t(this,"appSegments",[]),t(this,"jpegSegments",[]),t(this,"unknownSegments",[])}static canHandle(e,t){return 65496===t}async parse(){await this.findAppSegments(),await this.readSegments(this.appSegments),this.mergeMultiSegments(),this.createParsers(this.mergedAppSegments||this.appSegments)}setupSegmentFinderArgs(e){!0===e?(this.findAll=!0,this.wanted=new Set(b.keyList())):(e=void 0===e?b.keyList().filter((e=>this.options[e].enabled)):e.filter((e=>this.options[e].enabled&&b.has(e))),this.findAll=!1,this.remaining=new Set(e),this.wanted=new Set(e)),this.unfinishedMultiSegment=!1}async findAppSegments(e=0,t){this.setupSegmentFinderArgs(t);let{file:i,findAll:s,wanted:n,remaining:r}=this;if(!s&&this.file.chunked&&(s=Array.from(n).some((e=>{let t=b.get(e),i=this.options[e];return t.multiSegment&&i.multiSegment})),s&&await this.file.readWhole()),e=this.findAppSegmentsInRange(e,i.byteLength),!this.options.onlyTiff&&i.chunked){let t=!1;for(;r.size>0&&!t&&(i.canReadNextChunk||this.unfinishedMultiSegment);){let{nextChunkOffset:s}=i,n=this.appSegments.some((e=>!this.file.available(e.offset||e.start,e.length||e.size)));if(t=e>s&&!n?!await i.readNextChunk(e):!await i.readNextChunk(s),void 0===(e=this.findAppSegmentsInRange(e,i.byteLength)))return}}}findAppSegmentsInRange(e,t){t-=2;let i,s,n,r,o,a,{file:l,findAll:d,wanted:h,remaining:u,options:c}=this;for(;e<t;e++)if(255===l.getUint8(e))if(i=l.getUint8(e+1),le(i)){if(s=l.getUint16(e+2),n=de(l,e,s),n&&h.has(n)&&(r=b.get(n),o=r.findPosition(l,e),a=c[n],o.type=n,this.appSegments.push(o),!d&&(r.multiSegment&&a.multiSegment?(this.unfinishedMultiSegment=o.chunkNumber<o.chunkCount,this.unfinishedMultiSegment||u.delete(n)):u.delete(n),0===u.size)))break;c.recordUnknownSegments&&(o=oe.findPosition(l,e),o.marker=i,this.unknownSegments.push(o)),e+=s+1}else if(ae(i)){if(s=l.getUint16(e+2),218===i&&!1!==c.stopAfterSos)return;c.recordJpegSegments&&this.jpegSegments.push({offset:e,length:s,marker:i}),e+=s+1}return e}mergeMultiSegments(){if(!this.appSegments.some((e=>e.multiSegment)))return;let e=function(e,t){let i,s,n,r=new Map;for(let t=0;t<e.length;t++)i=e[t],s=i.type,r.has(s)?n=r.get(s):r.set(s,n=[]),n.push(i);return Array.from(r)}(this.appSegments);this.mergedAppSegments=e.map((([e,t])=>{let i=b.get(e,this.options);return i.handleMultiSegments?{type:e,chunk:i.handleMultiSegments(t)}:t[0]}))}getSegment(e){return this.appSegments.find((t=>t.type===e))}async getOrFindSegment(e){let t=this.getSegment(e);return void 0===t&&(await this.findAppSegments(0,[e]),t=this.getSegment(e)),t}}t(he,"type","jpeg"),y.set("jpeg",he);const ue=[void 0,1,1,2,4,8,1,1,2,4,8,4,8,4];class ce extends oe{parseHeader(){var e=this.chunk.getUint16();18761===e?this.le=!0:19789===e&&(this.le=!1),this.chunk.le=this.le,this.headerParsed=!0}parseTags(e,t,i=new Map){let{pick:s,skip:n}=this.options[t];s=new Set(s);let r=s.size>0,o=0===n.size,a=this.chunk.getUint16(e);e+=2;for(let l=0;l<a;l++){let a=this.chunk.getUint16(e);if(r){if(s.has(a)&&(i.set(a,this.parseTag(e,a,t)),s.delete(a),0===s.size))break}else!o&&n.has(a)||i.set(a,this.parseTag(e,a,t));e+=12}return i}parseTag(e,t,i){let{chunk:s}=this,n=s.getUint16(e+2),r=s.getUint32(e+4),o=ue[n];if(o*r<=4?e+=8:e=s.getUint32(e+8),(n<1||n>13)&&u(`Invalid TIFF value type. block: ${i.toUpperCase()}, tag: ${t.toString(16)}, type: ${n}, offset ${e}`),e>s.byteLength&&u(`Invalid TIFF value offset. block: ${i.toUpperCase()}, tag: ${t.toString(16)}, type: ${n}, offset ${e} is outside of chunk size ${s.byteLength}`),1===n)return s.getUint8Array(e,r);if(2===n)return""===(a=function(e){for(;e.endsWith("\0");)e=e.slice(0,-1);return e}(a=s.getString(e,r)).trim())?void 0:a;var a;if(7===n)return s.getUint8Array(e,r);if(1===r)return this.parseTagValue(n,e);{let t=new(function(e){switch(e){case 1:return Uint8Array;case 3:return Uint16Array;case 4:return Uint32Array;case 5:case 10:default:return Array;case 6:return Int8Array;case 8:return Int16Array;case 9:return Int32Array;case 11:return Float32Array;case 12:return Float64Array}}(n))(r),i=o;for(let s=0;s<r;s++)t[s]=this.parseTagValue(n,e),e+=i;return t}}parseTagValue(e,t){let{chunk:i}=this;switch(e){case 1:return i.getUint8(t);case 3:return i.getUint16(t);case 4:case 13:return i.getUint32(t);case 5:return i.getUint32(t)/i.getUint32(t+4);case 6:return i.getInt8(t);case 8:return i.getInt16(t);case 9:return i.getInt32(t);case 10:return i.getInt32(t)/i.getInt32(t+4);case 11:return i.getFloat(t);case 12:return i.getDouble(t);default:u(`Invalid tiff type ${e}`)}}}class pe extends ce{static canHandle(e,t){return 225===e.getUint8(t+1)&&1165519206===e.getUint32(t+4)&&0===e.getUint16(t+8)}async parse(){this.parseHeader();let{options:e}=this;return e.ifd0.enabled&&await this.parseIfd0Block(),e.exif.enabled&&await this.safeParse("parseExifBlock"),e.gps.enabled&&await this.safeParse("parseGpsBlock"),e.interop.enabled&&await this.safeParse("parseInteropBlock"),e.ifd1.enabled&&await this.safeParse("parseThumbnailBlock"),this.createOutput()}safeParse(e){let t=this[e]();return void 0!==t.catch&&(t=t.catch(this.handleError)),t}findIfd0Offset(){void 0===this.ifd0Offset&&(this.ifd0Offset=this.chunk.getUint32(4))}findIfd1Offset(){if(void 0===this.ifd1Offset){this.findIfd0Offset();let e=this.chunk.getUint16(this.ifd0Offset),t=this.ifd0Offset+2+12*e;this.ifd1Offset=this.chunk.getUint32(t)}}parseBlock(e,t){let i=new Map;return this[t]=i,this.parseTags(e,t,i),i}async parseIfd0Block(){if(this.ifd0)return;let{file:e}=this;this.findIfd0Offset(),this.ifd0Offset<8&&u("Malformed EXIF data"),!e.chunked&&this.ifd0Offset>e.byteLength&&u(`IFD0 offset points to outside of file.\nthis.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e.byteLength}`),e.tiff&&await e.ensureChunk(this.ifd0Offset,c(this.options));let t=this.parseBlock(this.ifd0Offset,"ifd0");return 0!==t.size?(this.exifOffset=t.get(R),this.interopOffset=t.get(N),this.gpsOffset=t.get(j),this.xmp=t.get(700),this.iptc=t.get(B),this.icc=t.get(L),this.options.sanitize&&(t.delete(R),t.delete(N),t.delete(j),t.delete(700),t.delete(B),t.delete(L)),t):void 0}async parseExifBlock(){if(this.exif)return;if(this.ifd0||await this.parseIfd0Block(),void 0===this.exifOffset)return;this.file.tiff&&await this.file.ensureChunk(this.exifOffset,c(this.options));let e=this.parseBlock(this.exifOffset,"exif");return this.interopOffset||(this.interopOffset=e.get(N)),this.makerNote=e.get(I),this.userComment=e.get(U),this.options.sanitize&&(e.delete(N),e.delete(I),e.delete(U)),this.unpack(e,41728),this.unpack(e,41729),e}unpack(e,t){let i=e.get(t);i&&1===i.length&&e.set(t,i[0])}async parseGpsBlock(){if(this.gps)return;if(this.ifd0||await this.parseIfd0Block(),void 0===this.gpsOffset)return;let e=this.parseBlock(this.gpsOffset,"gps");return e&&e.has(2)&&e.has(4)&&(e.set("latitude",fe(...e.get(2),e.get(1))),e.set("longitude",fe(...e.get(4),e.get(3)))),e}async parseInteropBlock(){if(!this.interop&&(this.ifd0||await this.parseIfd0Block(),void 0!==this.interopOffset||this.exif||await this.parseExifBlock(),void 0!==this.interopOffset))return this.parseBlock(this.interopOffset,"interop")}async parseThumbnailBlock(e=!1){if(!this.ifd1&&!this.ifd1Parsed&&(!this.options.mergeOutput||e))return this.findIfd1Offset(),this.ifd1Offset>0&&(this.parseBlock(this.ifd1Offset,"ifd1"),this.ifd1Parsed=!0),this.ifd1}async extractThumbnail(){if(this.headerParsed||this.parseHeader(),this.ifd1Parsed||await this.parseThumbnailBlock(!0),void 0===this.ifd1)return;let e=this.ifd1.get(513),t=this.ifd1.get(514);return this.chunk.getUint8Array(e,t)}get image(){return this.ifd0}get thumbnail(){return this.ifd1}createOutput(){let e,t,i,s={};for(t of q)if(e=this[t],!h(e))if(i=this.canTranslate?this.translateBlock(e,t):Object.fromEntries(e),this.options.mergeOutput){if("ifd1"===t)continue;Object.assign(s,i)}else s[t]=i;return this.makerNote&&(s.makerNote=this.makerNote),this.userComment&&(s.userComment=this.userComment),s}assignToOutput(e,t){if(this.globalOptions.mergeOutput)Object.assign(e,t);else for(let[i,s]of Object.entries(t))this.assignObjectToOutput(e,i,s)}}function fe(e,t,i,s){var n=e+t/60+i/3600;return"S"!==s&&"W"!==s||(n*=-1),n}t(pe,"type","tiff"),t(pe,"headerLength",10),b.set("tiff",pe);var me=Object.freeze({__proto__:null,default:re,Exifr:se,fileParsers:y,segmentParsers:b,fileReaders:w,tagKeys:A,tagValues:E,tagRevivers:D,createDictionary:$,extendDictionary:F,fetchUrlAsArrayBuffer:C,readBlobAsArrayBuffer:P,chunkedProps:M,otherSegments:z,segments:H,tiffBlocks:q,segmentsAndBlocks:V,tiffExtractables:W,inheritables:G,allFormatters:Q,Options:Z,parse:ne});const ge={ifd0:!1,ifd1:!1,exif:!1,gps:!1,interop:!1,sanitize:!1,reviveValues:!0,translateKeys:!1,translateValues:!1,mergeOutput:!1},ve=Object.assign({},ge,{firstChunkSize:4e4,gps:[1,2,3,4]}),ye=Object.assign({},ge,{tiff:!1,ifd1:!0,mergeOutput:!1}),be=Object.assign({},ge,{firstChunkSize:4e4,ifd0:[274]});async function we(e){let t=new se(be);await t.read(e);let i=await t.parse();if(i&&i.ifd0)return i.ifd0[274]}const xe=Object.freeze({1:{dimensionSwapped:!1,scaleX:1,scaleY:1,deg:0,rad:0},2:{dimensionSwapped:!1,scaleX:-1,scaleY:1,deg:0,rad:0},3:{dimensionSwapped:!1,scaleX:1,scaleY:1,deg:180,rad:180*Math.PI/180},4:{dimensionSwapped:!1,scaleX:-1,scaleY:1,deg:180,rad:180*Math.PI/180},5:{dimensionSwapped:!0,scaleX:1,scaleY:-1,deg:90,rad:90*Math.PI/180},6:{dimensionSwapped:!0,scaleX:1,scaleY:1,deg:90,rad:90*Math.PI/180},7:{dimensionSwapped:!0,scaleX:1,scaleY:-1,deg:270,rad:270*Math.PI/180},8:{dimensionSwapped:!0,scaleX:1,scaleY:1,deg:270,rad:270*Math.PI/180}});if(e.rotateCanvas=!0,e.rotateCss=!0,"object"==typeof navigator){let t=navigator.userAgent;if(t.includes("iPad")||t.includes("iPhone")){let i=t.match(/OS (\d+)_(\d+)/);if(i){let[,t,s]=i,n=Number(t)+.1*Number(s);e.rotateCanvas=n<13.4,e.rotateCss=!1}}else if(t.includes("OS X 10")){let[,i]=t.match(/OS X 10[_.](\d+)/);e.rotateCanvas=e.rotateCss=Number(i)<15}if(t.includes("Chrome/")){let[,i]=t.match(/Chrome\/(\d+)/);e.rotateCanvas=e.rotateCss=Number(i)<81}else if(t.includes("Firefox/")){let[,i]=t.match(/Firefox\/(\d+)/);e.rotateCanvas=e.rotateCss=Number(i)<77}}class Se extends m{constructor(...e){super(...e),t(this,"ranges",new _e),0!==this.byteLength&&this.ranges.add(0,this.byteLength)}_tryExtend(e,t,i){if(0===e&&0===this.byteLength&&i){let e=new DataView(i.buffer||i,i.byteOffset,i.byteLength);this._swapDataView(e)}else{let i=e+t;if(i>this.byteLength){let{dataView:e}=this._extend(i);this._swapDataView(e)}}}_extend(e){let t;t=l?a.allocUnsafe(e):new Uint8Array(e);let i=new DataView(t.buffer,t.byteOffset,t.byteLength);return t.set(new Uint8Array(this.buffer,this.byteOffset,this.byteLength),0),{uintView:t,dataView:i}}subarray(e,t,i=!1){return t=t||this._lengthToEnd(e),i&&this._tryExtend(e,t),this.ranges.add(e,t),super.subarray(e,t)}set(e,t,i=!1){i&&this._tryExtend(t,e.byteLength,e);let s=super.set(e,t);return this.ranges.add(t,s.byteLength),s}async ensureChunk(e,t){this.chunked&&(this.ranges.available(e,t)||await this.readChunk(e,t))}available(e,t){return this.ranges.available(e,t)}}class _e{constructor(){t(this,"list",[])}get length(){return this.list.length}add(e,t,i=0){let s=e+t,n=this.list.filter((t=>Te(e,t.offset,s)||Te(e,t.end,s)));if(n.length>0){e=Math.min(e,...n.map((e=>e.offset))),s=Math.max(s,...n.map((e=>e.end))),t=s-e;let i=n.shift();i.offset=e,i.length=t,i.end=s,this.list=this.list.filter((e=>!n.includes(e)))}else this.list.push({offset:e,length:t,end:s})}available(e,t){let i=e+t;return this.list.some((t=>t.offset<=e&&i<=t.end))}}function Te(e,t,i){return e<=t&&t<=i}class ke extends Se{constructor(e,i){super(0),t(this,"chunksRead",0),this.input=e,this.options=i}async readWhole(){this.chunked=!1,await this.readChunk(this.nextChunkOffset)}async readChunked(){this.chunked=!0,await this.readChunk(0,this.options.firstChunkSize)}async readNextChunk(e=this.nextChunkOffset){if(this.fullyRead)return this.chunksRead++,!1;let t=this.options.chunkSize,i=await this.readChunk(e,t);return!!i&&i.byteLength===t}async readChunk(e,t){if(this.chunksRead++,0!==(t=this.safeWrapAddress(e,t)))return this._readChunk(e,t)}safeWrapAddress(e,t){return void 0!==this.size&&e+t>this.size?Math.max(0,this.size-e):t}get nextChunkOffset(){if(0!==this.ranges.list.length)return this.ranges.list[0].length}get canReadNextChunk(){return this.chunksRead<this.options.chunkLimit}get fullyRead(){return void 0!==this.size&&this.nextChunkOffset===this.size}read(){return this.options.chunked?this.readChunked():this.readWhole()}close(){}}w.set("blob",class extends ke{async readWhole(){this.chunked=!1;let e=await P(this.input);this._swapArrayBuffer(e)}readChunked(){return this.chunked=!0,this.size=this.input.size,super.readChunked()}async _readChunk(e,t){let i=t?e+t:void 0,s=this.input.slice(e,i),n=await P(s);return this.set(n,e,!0)}}),e.Exifr=se,e.Options=Z,e.allFormatters=Q,e.chunkedProps=M,e.createDictionary=$,e.default=me,e.extendDictionary=F,e.fetchUrlAsArrayBuffer=C,e.fileParsers=y,e.fileReaders=w,e.gps=async function(e){let t=new se(ve);await t.read(e);let i=await t.parse();if(i&&i.gps){let{latitude:e,longitude:t}=i.gps;return{latitude:e,longitude:t}}},e.gpsOnlyOptions=ve,e.inheritables=G,e.orientation=we,e.orientationOnlyOptions=be,e.otherSegments=z,e.parse=ne,e.readBlobAsArrayBuffer=P,e.rotation=async function(t){let i=await we(t);return Object.assign({canvas:e.rotateCanvas,css:e.rotateCss},xe[i])},e.rotations=xe,e.segmentParsers=b,e.segments=H,e.segmentsAndBlocks=V,e.tagKeys=A,e.tagRevivers=D,e.tagValues=E,e.thumbnail=async function(e){let t=new se(ye);await t.read(e);let i=await t.extractThumbnail();return i&&l?a.from(i):i},e.thumbnailOnlyOptions=ye,e.thumbnailUrl=async function(e){let t=await this.thumbnail(e);if(void 0!==t){let e=new Blob([t]);return URL.createObjectURL(e)}},e.tiffBlocks=q,e.tiffExtractables=W,Object.defineProperty(e,"__esModule",{value:!0})}(t)},81:e=>{e.exports=function(e,t){if(e===t)return!0;for(var i in e)if(!(i in t))return!1;for(var i in t)if(e[i]!==t[i])return!1;return!0}},1296:(e,t,i)=>{var s=/^\s+|\s+$/g,n=/^[-+]0x[0-9a-f]+$/i,r=/^0b[01]+$/i,o=/^0o[0-7]+$/i,a=parseInt,l="object"==typeof i.g&&i.g&&i.g.Object===Object&&i.g,d="object"==typeof self&&self&&self.Object===Object&&self,h=l||d||Function("return this")(),u=Object.prototype.toString,c=Math.max,p=Math.min,f=function(){return h.Date.now()};function m(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function g(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==u.call(e)}(e))return NaN;if(m(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=m(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(s,"");var i=r.test(e);return i||o.test(e)?a(e.slice(2),i?2:8):n.test(e)?NaN:+e}e.exports=function(e,t,i){var s,n,r,o,a,l,d=0,h=!1,u=!1,v=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function y(t){var i=s,r=n;return s=n=void 0,d=t,o=e.apply(r,i)}function b(e){return d=e,a=setTimeout(x,t),h?y(e):o}function w(e){var i=e-l;return void 0===l||i>=t||i<0||u&&e-d>=r}function x(){var e=f();if(w(e))return S(e);a=setTimeout(x,function(e){var i=t-(e-l);return u?p(i,r-(e-d)):i}(e))}function S(e){return a=void 0,v&&s?y(e):(s=n=void 0,o)}function _(){var e=f(),i=w(e);if(s=arguments,n=this,l=e,i){if(void 0===a)return b(l);if(u)return a=setTimeout(x,t),y(l)}return void 0===a&&(a=setTimeout(x,t)),o}return t=g(t)||0,m(i)&&(h=!!i.leading,r=(u="maxWait"in i)?c(g(i.maxWait)||0,t):r,v="trailing"in i?!!i.trailing:v),_.cancel=function(){void 0!==a&&clearTimeout(a),d=0,s=l=n=a=void 0},_.flush=function(){return void 0===a?o:S(f())},_}},3096:(e,t,i)=>{var s="Expected a function",n=/^\s+|\s+$/g,r=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,a=/^0o[0-7]+$/i,l=parseInt,d="object"==typeof i.g&&i.g&&i.g.Object===Object&&i.g,h="object"==typeof self&&self&&self.Object===Object&&self,u=d||h||Function("return this")(),c=Object.prototype.toString,p=Math.max,f=Math.min,m=function(){return u.Date.now()};function g(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function v(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==c.call(e)}(e))return NaN;if(g(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=g(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(n,"");var i=o.test(e);return i||a.test(e)?l(e.slice(2),i?2:8):r.test(e)?NaN:+e}e.exports=function(e,t,i){var n=!0,r=!0;if("function"!=typeof e)throw new TypeError(s);return g(i)&&(n="leading"in i?!!i.leading:n,r="trailing"in i?!!i.trailing:r),function(e,t,i){var n,r,o,a,l,d,h=0,u=!1,c=!1,y=!0;if("function"!=typeof e)throw new TypeError(s);function b(t){var i=n,s=r;return n=r=void 0,h=t,a=e.apply(s,i)}function w(e){return h=e,l=setTimeout(S,t),u?b(e):a}function x(e){var i=e-d;return void 0===d||i>=t||i<0||c&&e-h>=o}function S(){var e=m();if(x(e))return _(e);l=setTimeout(S,function(e){var i=t-(e-d);return c?f(i,o-(e-h)):i}(e))}function _(e){return l=void 0,y&&n?b(e):(n=r=void 0,a)}function T(){var e=m(),i=x(e);if(n=arguments,r=this,d=e,i){if(void 0===l)return w(d);if(c)return l=setTimeout(S,t),b(d)}return void 0===l&&(l=setTimeout(S,t)),a}return t=v(t)||0,g(i)&&(u=!!i.leading,o=(c="maxWait"in i)?p(v(i.maxWait)||0,t):o,y="trailing"in i?!!i.trailing:y),T.cancel=function(){void 0!==l&&clearTimeout(l),h=0,n=d=r=l=void 0},T.flush=function(){return void 0===l?a:_(m())},T}(e,t,{leading:n,maxWait:t,trailing:r})}},845:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>r});var s=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function n(e,t){if(e.length!==t.length)return!1;for(var i=0;i<e.length;i++)if(!((n=e[i])===(r=t[i])||s(n)&&s(r)))return!1;var n,r;return!0}const r=function(e,t){var i;void 0===t&&(t=n);var s,r=[],o=!1;return function(){for(var n=[],a=0;a<arguments.length;a++)n[a]=arguments[a];return o&&i===this&&t(n,r)||(s=e.apply(this,n),o=!0,i=this,r=n),s}}},4193:(e,t,i)=>{var s=i(1196),n=/[\/\+\.]/;e.exports=function(e,t){function i(t){var i=s(t,e,n);return i&&i.length>=2}return t?i(t.split(";")[0]):i}},4800:e=>{e.exports=function(){var e={},t=e._fns={};return e.emit=function(e,i,s,n,r,o,a){var l=function(e){for(var i=t[e]?t[e]:[],s=e.indexOf(":"),n=-1===s?[e]:[e.substring(0,s),e.substring(s+1)],r=Object.keys(t),o=0,a=r.length;o<a;o++){var l=r[o];if("*"===l&&(i=i.concat(t[l])),2===n.length&&n[0]===l){i=i.concat(t[l]);break}}return i}(e);l.length&&function(e,t,i){for(var s=0,n=t.length;s<n&&t[s];s++)t[s].event=e,t[s].apply(t[s],i)}(e,l,[i,s,n,r,o,a])},e.on=function(e,i){t[e]||(t[e]=[]),t[e].push(i)},e.once=function(t,i){this.on(t,(function s(){i.apply(this,arguments),e.off(t,s)}))},e.off=function(e,t){var i=[];if(e&&t)for(var s=this._fns[e],n=0,r=s?s.length:0;n<r;n++)s[n]!==t&&i.push(s[n]);i.length?this._fns[e]=i:delete this._fns[e]},e}},6400:(e,t,i)=>{"use strict";i.r(t),i.d(t,{Component:()=>w,Fragment:()=>b,cloneElement:()=>M,createContext:()=>z,createElement:()=>g,createRef:()=>y,h:()=>g,hydrate:()=>N,isValidElement:()=>o,options:()=>n,render:()=>j,toChildArray:()=>P});var s,n,r,o,a,l,d,h,u={},c=[],p=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function f(e,t){for(var i in t)e[i]=t[i];return e}function m(e){var t=e.parentNode;t&&t.removeChild(e)}function g(e,t,i){var n,r,o,a={};for(o in t)"key"==o?n=t[o]:"ref"==o?r=t[o]:a[o]=t[o];if(arguments.length>2&&(a.children=arguments.length>3?s.call(arguments,2):i),"function"==typeof e&&null!=e.defaultProps)for(o in e.defaultProps)void 0===a[o]&&(a[o]=e.defaultProps[o]);return v(e,a,n,r,null)}function v(e,t,i,s,o){var a={type:e,props:t,key:i,ref:s,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==o?++r:o};return null==o&&null!=n.vnode&&n.vnode(a),a}function y(){return{current:null}}function b(e){return e.children}function w(e,t){this.props=e,this.context=t}function x(e,t){if(null==t)return e.__?x(e.__,e.__.__k.indexOf(e)+1):null;for(var i;t<e.__k.length;t++)if(null!=(i=e.__k[t])&&null!=i.__e)return i.__e;return"function"==typeof e.type?x(e):null}function S(e){var t,i;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if(null!=(i=e.__k[t])&&null!=i.__e){e.__e=e.__c.base=i.__e;break}return S(e)}}function _(e){(!e.__d&&(e.__d=!0)&&a.push(e)&&!T.__r++||d!==n.debounceRendering)&&((d=n.debounceRendering)||l)(T)}function T(){for(var e;T.__r=a.length;)e=a.sort((function(e,t){return e.__v.__b-t.__v.__b})),a=[],e.some((function(e){var t,i,s,n,r,o;e.__d&&(r=(n=(t=e).__v).__e,(o=t.__P)&&(i=[],(s=f({},n)).__v=n.__v+1,D(o,n,s,t.__n,void 0!==o.ownerSVGElement,null!=n.__h?[r]:null,i,null==r?x(n):r,n.__h),I(i,n),n.__e!=r&&S(n)))}))}function k(e,t,i,s,n,r,o,a,l,d){var h,p,f,m,g,y,w,S=s&&s.__k||c,_=S.length;for(i.__k=[],h=0;h<t.length;h++)if(null!=(m=i.__k[h]=null==(m=t[h])||"boolean"==typeof m?null:"string"==typeof m||"number"==typeof m||"bigint"==typeof m?v(null,m,null,null,m):Array.isArray(m)?v(b,{children:m},null,null,null):m.__b>0?v(m.type,m.props,m.key,null,m.__v):m)){if(m.__=i,m.__b=i.__b+1,null===(f=S[h])||f&&m.key==f.key&&m.type===f.type)S[h]=void 0;else for(p=0;p<_;p++){if((f=S[p])&&m.key==f.key&&m.type===f.type){S[p]=void 0;break}f=null}D(e,m,f=f||u,n,r,o,a,l,d),g=m.__e,(p=m.ref)&&f.ref!=p&&(w||(w=[]),f.ref&&w.push(f.ref,null,m),w.push(p,m.__c||g,m)),null!=g?(null==y&&(y=g),"function"==typeof m.type&&m.__k===f.__k?m.__d=l=C(m,l,e):l=O(e,m,f,S,g,l),"function"==typeof i.type&&(i.__d=l)):l&&f.__e==l&&l.parentNode!=e&&(l=x(f))}for(i.__e=y,h=_;h--;)null!=S[h]&&("function"==typeof i.type&&null!=S[h].__e&&S[h].__e==i.__d&&(i.__d=x(s,h+1)),L(S[h],S[h]));if(w)for(h=0;h<w.length;h++)B(w[h],w[++h],w[++h])}function C(e,t,i){for(var s,n=e.__k,r=0;n&&r<n.length;r++)(s=n[r])&&(s.__=e,t="function"==typeof s.type?C(s,t,i):O(i,s,s,n,s.__e,t));return t}function P(e,t){return t=t||[],null==e||"boolean"==typeof e||(Array.isArray(e)?e.some((function(e){P(e,t)})):t.push(e)),t}function O(e,t,i,s,n,r){var o,a,l;if(void 0!==t.__d)o=t.__d,t.__d=void 0;else if(null==i||n!=r||null==n.parentNode)e:if(null==r||r.parentNode!==e)e.appendChild(n),o=null;else{for(a=r,l=0;(a=a.nextSibling)&&l<s.length;l+=2)if(a==n)break e;e.insertBefore(n,r),o=r}return void 0!==o?o:n.nextSibling}function $(e,t,i){"-"===t[0]?e.setProperty(t,i):e[t]=null==i?"":"number"!=typeof i||p.test(t)?i:i+"px"}function F(e,t,i,s,n){var r;e:if("style"===t)if("string"==typeof i)e.style.cssText=i;else{if("string"==typeof s&&(e.style.cssText=s=""),s)for(t in s)i&&t in i||$(e.style,t,"");if(i)for(t in i)s&&i[t]===s[t]||$(e.style,t,i[t])}else if("o"===t[0]&&"n"===t[1])r=t!==(t=t.replace(/Capture$/,"")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+r]=i,i?s||e.addEventListener(t,r?E:A,r):e.removeEventListener(t,r?E:A,r);else if("dangerouslySetInnerHTML"!==t){if(n)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("href"!==t&&"list"!==t&&"form"!==t&&"tabIndex"!==t&&"download"!==t&&t in e)try{e[t]=null==i?"":i;break e}catch(e){}"function"==typeof i||(null!=i&&(!1!==i||"a"===t[0]&&"r"===t[1])?e.setAttribute(t,i):e.removeAttribute(t))}}function A(e){this.l[e.type+!1](n.event?n.event(e):e)}function E(e){this.l[e.type+!0](n.event?n.event(e):e)}function D(e,t,i,s,r,o,a,l,d){var h,u,c,p,m,g,v,y,x,S,_,T=t.type;if(void 0!==t.constructor)return null;null!=i.__h&&(d=i.__h,l=t.__e=i.__e,t.__h=null,o=[l]),(h=n.__b)&&h(t);try{e:if("function"==typeof T){if(y=t.props,x=(h=T.contextType)&&s[h.__c],S=h?x?x.props.value:h.__:s,i.__c?v=(u=t.__c=i.__c).__=u.__E:("prototype"in T&&T.prototype.render?t.__c=u=new T(y,S):(t.__c=u=new w(y,S),u.constructor=T,u.render=R),x&&x.sub(u),u.props=y,u.state||(u.state={}),u.context=S,u.__n=s,c=u.__d=!0,u.__h=[]),null==u.__s&&(u.__s=u.state),null!=T.getDerivedStateFromProps&&(u.__s==u.state&&(u.__s=f({},u.__s)),f(u.__s,T.getDerivedStateFromProps(y,u.__s))),p=u.props,m=u.state,c)null==T.getDerivedStateFromProps&&null!=u.componentWillMount&&u.componentWillMount(),null!=u.componentDidMount&&u.__h.push(u.componentDidMount);else{if(null==T.getDerivedStateFromProps&&y!==p&&null!=u.componentWillReceiveProps&&u.componentWillReceiveProps(y,S),!u.__e&&null!=u.shouldComponentUpdate&&!1===u.shouldComponentUpdate(y,u.__s,S)||t.__v===i.__v){u.props=y,u.state=u.__s,t.__v!==i.__v&&(u.__d=!1),u.__v=t,t.__e=i.__e,t.__k=i.__k,t.__k.forEach((function(e){e&&(e.__=t)})),u.__h.length&&a.push(u);break e}null!=u.componentWillUpdate&&u.componentWillUpdate(y,u.__s,S),null!=u.componentDidUpdate&&u.__h.push((function(){u.componentDidUpdate(p,m,g)}))}u.context=S,u.props=y,u.state=u.__s,(h=n.__r)&&h(t),u.__d=!1,u.__v=t,u.__P=e,h=u.render(u.props,u.state,u.context),u.state=u.__s,null!=u.getChildContext&&(s=f(f({},s),u.getChildContext())),c||null==u.getSnapshotBeforeUpdate||(g=u.getSnapshotBeforeUpdate(p,m)),_=null!=h&&h.type===b&&null==h.key?h.props.children:h,k(e,Array.isArray(_)?_:[_],t,i,s,r,o,a,l,d),u.base=t.__e,t.__h=null,u.__h.length&&a.push(u),v&&(u.__E=u.__=null),u.__e=!1}else null==o&&t.__v===i.__v?(t.__k=i.__k,t.__e=i.__e):t.__e=U(i.__e,t,i,s,r,o,a,d);(h=n.diffed)&&h(t)}catch(e){t.__v=null,(d||null!=o)&&(t.__e=l,t.__h=!!d,o[o.indexOf(l)]=null),n.__e(e,t,i)}}function I(e,t){n.__c&&n.__c(t,e),e.some((function(t){try{e=t.__h,t.__h=[],e.some((function(e){e.call(t)}))}catch(e){n.__e(e,t.__v)}}))}function U(e,t,i,n,r,o,a,l){var d,h,c,p=i.props,f=t.props,g=t.type,v=0;if("svg"===g&&(r=!0),null!=o)for(;v<o.length;v++)if((d=o[v])&&"setAttribute"in d==!!g&&(g?d.localName===g:3===d.nodeType)){e=d,o[v]=null;break}if(null==e){if(null===g)return document.createTextNode(f);e=r?document.createElementNS("http://www.w3.org/2000/svg",g):document.createElement(g,f.is&&f),o=null,l=!1}if(null===g)p===f||l&&e.data===f||(e.data=f);else{if(o=o&&s.call(e.childNodes),h=(p=i.props||u).dangerouslySetInnerHTML,c=f.dangerouslySetInnerHTML,!l){if(null!=o)for(p={},v=0;v<e.attributes.length;v++)p[e.attributes[v].name]=e.attributes[v].value;(c||h)&&(c&&(h&&c.__html==h.__html||c.__html===e.innerHTML)||(e.innerHTML=c&&c.__html||""))}if(function(e,t,i,s,n){var r;for(r in i)"children"===r||"key"===r||r in t||F(e,r,null,i[r],s);for(r in t)n&&"function"!=typeof t[r]||"children"===r||"key"===r||"value"===r||"checked"===r||i[r]===t[r]||F(e,r,t[r],i[r],s)}(e,f,p,r,l),c)t.__k=[];else if(v=t.props.children,k(e,Array.isArray(v)?v:[v],t,i,n,r&&"foreignObject"!==g,o,a,o?o[0]:i.__k&&x(i,0),l),null!=o)for(v=o.length;v--;)null!=o[v]&&m(o[v]);l||("value"in f&&void 0!==(v=f.value)&&(v!==e.value||"progress"===g&&!v||"option"===g&&v!==p.value)&&F(e,"value",v,p.value,!1),"checked"in f&&void 0!==(v=f.checked)&&v!==e.checked&&F(e,"checked",v,p.checked,!1))}return e}function B(e,t,i){try{"function"==typeof e?e(t):e.current=t}catch(e){n.__e(e,i)}}function L(e,t,i){var s,r;if(n.unmount&&n.unmount(e),(s=e.ref)&&(s.current&&s.current!==e.__e||B(s,null,t)),null!=(s=e.__c)){if(s.componentWillUnmount)try{s.componentWillUnmount()}catch(e){n.__e(e,t)}s.base=s.__P=null}if(s=e.__k)for(r=0;r<s.length;r++)s[r]&&L(s[r],t,"function"!=typeof e.type);i||null==e.__e||m(e.__e),e.__e=e.__d=void 0}function R(e,t,i){return this.constructor(e,i)}function j(e,t,i){var r,o,a;n.__&&n.__(e,t),o=(r="function"==typeof i)?null:i&&i.__k||t.__k,a=[],D(t,e=(!r&&i||t).__k=g(b,null,[e]),o||u,u,void 0!==t.ownerSVGElement,!r&&i?[i]:o?null:t.firstChild?s.call(t.childNodes):null,a,!r&&i?i:o?o.__e:t.firstChild,r),I(a,e)}function N(e,t){j(e,t,N)}function M(e,t,i){var n,r,o,a=f({},e.props);for(o in t)"key"==o?n=t[o]:"ref"==o?r=t[o]:a[o]=t[o];return arguments.length>2&&(a.children=arguments.length>3?s.call(arguments,2):i),v(e.type,a,n||e.key,r||e.ref,null)}function z(e,t){var i={__c:t="__cC"+h++,__:e,Consumer:function(e,t){return e.children(t)},Provider:function(e){var i,s;return this.getChildContext||(i=[],(s={})[t]=this,this.getChildContext=function(){return s},this.shouldComponentUpdate=function(e){this.props.value!==e.value&&i.some(_)},this.sub=function(e){i.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){i.splice(i.indexOf(e),1),t&&t.call(e)}}),e.children}};return i.Provider.__=i.Consumer.contextType=i}s=c.slice,n={__e:function(e,t,i,s){for(var n,r,o;t=t.__;)if((n=t.__c)&&!n.__)try{if((r=n.constructor)&&null!=r.getDerivedStateFromError&&(n.setState(r.getDerivedStateFromError(e)),o=n.__d),null!=n.componentDidCatch&&(n.componentDidCatch(e,s||{}),o=n.__d),o)return n.__E=n}catch(t){e=t}throw e}},r=0,o=function(e){return null!=e&&void 0===e.constructor},w.prototype.setState=function(e,t){var i;i=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=f({},this.state),"function"==typeof e&&(e=e(f({},i),this.props)),e&&f(i,e),null!=e&&this.__v&&(t&&this.__h.push(t),_(this))},w.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),_(this))},w.prototype.render=b,a=[],l="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,T.__r=0,h=0},1196:e=>{"use strict";function t(e,t){this.text=e=e||"",this.hasWild=~e.indexOf("*"),this.separator=t,this.parts=e.split(t)}t.prototype.match=function(e){var t,i,s=!0,n=this.parts,r=n.length;if("string"==typeof e||e instanceof String)if(this.hasWild||this.text==e){for(i=(e||"").split(this.separator),t=0;s&&t<r;t++)"*"!==n[t]&&(s=t<i.length&&n[t]===i[t]);s=s&&i}else s=!1;else if("function"==typeof e.splice)for(s=[],t=e.length;t--;)this.match(e[t])&&(s[s.length]=e[t]);else if("object"==typeof e)for(var o in s={},e)this.match(o)&&(s[o]=e[o]);return s},e.exports=function(e,i,s){var n=new t(e,s||/[\/\.]/);return void 0!==i?n.match(i):n}},8445:()=>{(e=>{"use strict";e((()=>{e("[id^=acl-modal-container-]").each(((t,i)=>{var s=e(i),n=e("#"+s.data("trigger-button")),r=s.find("input[type=hidden]:first()"),o=s.find(".form-autocomplete"),a=s.find(".btn-success"),l=bootstrap.Modal.getOrCreateInstance(s);s.on("shown.bs.modal",(()=>o.trigger("focus"))),a.on("click",(()=>{var t=r.val().trim().split("/").pop();if(t){var i=e("table#acl_"+t);if(i.length){var a="p-3 mb-2 rounded mark fw-bold",d=i.find("caption span");d.addClass(a),setTimeout((()=>d.removeClass(a)),2e3)}else{var h=s.next(".acl-table-container").clone();h.find("caption span").text(o.val()),h.find("table").prop("id","acl_"+t),h.find("input").each(((i,s)=>{var n=e(s);n.prop("id",n.prop("id").replace("{objectId}",t)),n.prop("name",n.prop("name").replace("{objectId}",t))})),h.find("label").each(((i,s)=>{var n=e(s);n.prop("for",n.prop("for").replace("{objectId}",t))})),h.insertBefore(n).removeClass("d-none")}}l.hide(),r.val(""),o.val("")}))}))}))})(jQuery)},9318:()=>{(e=>{"use strict";e((()=>e(".adv-search").each(((e,i)=>new t(i)))));class t{constructor(t){this.$element=e(t),this.$form=this.$element.find('form[name="advanced-search-form"]'),this.$reposFacet=e("#heading-repos").closest(".accordion"),this.$reposFilter=this.$element.find('select[name="repos"]'),this.$collectionFilter=this.$element.find('input[name="collection"]'),this.init(),this.listen()}init(){1<this.$form.find(".criterion").length&&this.$form.find(".criterion:last").remove(),this.checkReposFilter()}listen(){this.$form.on("click",".add-new-criteria .dropdown-item",this.addCriterion.bind(this)).on("click","input.reset",this.reset.bind(this)).on("click","a.delete-criterion",this.deleteCriterion.bind(this)).on("submit",this.submit.bind(this)),this.$collectionFilter.on("change",this.checkReposFilter.bind(this))}checkReposFilter(e){void 0!==this.$collectionFilter&&this.$reposFilter.length&&""!=this.$collectionFilter.val()?(this.$reposFilter.attr("disabled","disabled"),this.$reposFilter.val(""),this.$reposFacet.length&&this.$reposFacet.hide()):this.$reposFilter.length&&""==this.$collectionFilter.val()&&(this.$reposFilter.removeAttr("disabled"),this.$reposFacet.length&&this.$reposFacet.show())}submit(e){this.$form.find(':input[value=""]').attr("disabled","disabled"),this.$form.find('select[name="so0"]').attr("disabled","disabled")}reset(e){window.location.replace(this.$form.attr("action")+"?showAdvanced=1&topLod=0")}addCriterion(e){e.preventDefault(),this.cloneLastCriterion().insertAfter(this.$form.find(".criterion:last")).show().find(".adv-search-boolean select").val(e.target.id.replace("add-criterion-","")).end().find("input").first().trigger("focus")}cloneLastCriterion(){var e=this.$form.find(".criterion:last").clone(),i=parseInt(e.find("input:first").attr("name").match(/\d+/).shift())+1;return e.find("input, select").each((function(e,t){var s=this.getAttribute("name").replace(/[\d+]/,i);this.setAttribute("name",s)})),t.clearFormFields(e),e}deleteCriterion(i){i.preventDefault();var s=e(i.target.closest(".criterion"));0!=parseInt(s.find("input:first").attr("name").match(/\d+/).shift())||1!=this.$form.find(".criterion").length?(s.nextAll(".criterion").each((function(){var t=e(this),i=parseInt(t.find("input:first").attr("name").match(/\d+/).shift());t.find("input, select").each((function(e,t){var s=this.getAttribute("name").replace(/[\d+]/,i-1);this.setAttribute("name",s)}))})),s.remove()):t.clearFormFields(s)}static clearFormFields(t){t.find("input:text, input:password, input:file, select").val(""),t.find("input:radio, input:checkbox").removeAttr("checked").removeAttr("selected"),t.find("select").prop("selectedIndex",0),t.find("input:text.form-autocomplete").each((function(){var t=e(this).attr("id");e(this).siblings('input:hidden[name="'+t+'"]').val("")}))}}})(jQuery)},3744:()=>{(e=>{"use strict";e((()=>{var t=e("#collapse-aggregations");if(t.length){var i=e('<div class="d-none d-md-block">');i.appendTo(e("body")).is(":visible")&&(bootstrap.Collapse.getOrCreateInstance(t),e(".aggregation .collapse").each(((e,t)=>{var i=bootstrap.Collapse.getOrCreateInstance(t,{toggle:!1});e<3&&i.show()}))),i.remove()}}))})(jQuery)},2672:()=>{(e=>{"use strict";e((()=>{if(e("#editForm .accordion-item").length){var t=e(location.hash);t.length&&(t.on("shown.bs.collapse",(t=>{window.scrollTo(0,e(t.target).parent().offset().top)})),bootstrap.Collapse.getOrCreateInstance(t))}}))})(jQuery)},4185:()=>{(e=>{"use strict";e((()=>{e(document).on("change",".date input[id$=date]",(function(){var t=e(this),i=t.closest(".date"),s=i.find("[id$=startDate]"),n=i.find("[id$=endDate]");if(s.length&&n.length){var r=[],o=[],a=t.val().match(/\d+(?:[-/]0*(?:1[0-2]|\d)(?:[-/]0*(?:3[01]|[12]?\d))?(?!\d))?/g);a&&e.each(a,(function(t){var i=e.map(this.match(/\d+/g),(e=>e-0));0!==t?(e.each(r,(function(e){if(this<i[e]&&(0!==e||31<this||32>i[e])||0===e&&31<this&&32>i[e])return!1;this!=i[e]&&(r=i)})),e.each(o,(function(e){if(this>i[e])return!1;this!=i[e]&&(o=i)}))):r=o=i})),s.val(r.join("-")),n.val(o.join("-"))}}))}))})(jQuery)},3350:()=>{(e=>{"use strict";e((()=>{e(".delete-physical-storage").on("click",(function(){var t=e(this);t.closest("form").append(e("<input>",{type:"hidden",name:"delete_relations[]",value:t.attr("id")}));var i=t.closest("tr");i.hide(250,(()=>i.remove()))}))}))})(jQuery)},5008:()=>{(e=>{"use strict";Drupal.behaviors.expander={attach:()=>{var t=e("#js-i18n #read-more-less-links");e(".search-result .text-block, div.field:not(:has(div.field)) > div").expander({slicePoint:255,expandText:t.data("read-more-text"),userCollapseText:t.data("read-less-text")}).removeClass("d-none")}}})(jQuery)},4629:()=>{!function(e){"use strict";class t{constructor(t){this.$element=t,this.$treeViewConfig=e("#fullwidth-treeview-configuration"),this.collectionUrl=this.$treeViewConfig.data("collection-url"),this.itemsPerPage=this.$treeViewConfig.data("items-per-page"),this.dndEnabled="yes"==this.$treeViewConfig.data("enable-dnd"),this.pathToApi="/informationobject/fullWidthTreeView",this.$fwTreeView=e('<div id="fullwidth-treeview"></div>'),this.$fwTreeViewRow=e('<div id="fullwidth-treeview-row"></div>'),this.$mainHeader=e("#main-column h1").first(),this.$moreButton=e("#fullwidth-treeview-more-button").hide(),this.$resetButton=e("#fullwidth-treeview-reset-button").hide(),this.pager=new Qubit.TreeviewPager(this.itemsPerPage,this.$fwTreeView,this.collectionUrl+this.pathToApi),this.treeViewCollapseEnabled="yes"==this.$treeViewConfig.data("collapse-enabled"),this.$mainHeader.after(this.$fwTreeViewRow.append(this.$fwTreeView).animate({height:"200px"},500).resizable({handles:"s"})),this.addTreeviewToAccordion(),this.addButtonSection(),this.$accordionWrapper.after(this.$buttonSection),this.syncInitiated={},this.options={plugins:["types","dnd"],types:Qubit.treeviewTypes,dnd:{copy:!1,touch:"selected",open_timeout:0,drag_selection:!1,is_draggable:e=>this.dndEnabled&&"#"!==e[0].parent},core:{data:{url:e=>{var t="?nodeLimit="+(this.pager.getSkip()+this.pager.getLimit());return"#"===e.id?window.location.pathname.match("^[^;]*")[0]+this.pathToApi+t:e.a_attr.href+this.pathToApi},data:e=>"#"===e.id?{firstLoad:!0}:{firstLoad:!1,referenceCode:e.original.referenceCode},dataFilter:e=>{var t=JSON.parse(e);return"#"==this.pager.rootId&&(this.pager.rootId=t.nodes[0].id,this.pager.setTotal(t.nodes[0].total)),void 0===t.nodes?JSON.stringify(t):JSON.stringify(t.nodes)}},check_callback:(e,t,i,s,n)=>"create_node"===e||"move_node"===e&&(n.core||n.dnd&&t.parent===n.ref.parent&&"i"!==n.pos)}},this.init(this.options)}init(t){this.$fwTreeView.jstree(t).bind("ready.jstree",this.readyListener).bind("select_node.jstree",this.selectNodeListener).bind("hover_node.jstree",this.hoverNodeListener).bind("move_node.jstree",this.moveNodeListener),this.$moreButton.on("click",(()=>{this.pager.next(),this.pager.getAndAppendNodes((()=>{this.pager.updateMoreLink(this.$moreButton,this.$resetButton)}))})),e("#fullwidth-treeview-reset-button").on("click",(()=>{this.pager.reset(this.$moreButton,this.$resetButton)})),this.$accordionButton.text(this.$treeViewConfig.data("closed-text")),this.$accordionItem.on("shown.bs.collapse",(e=>{this.$accordionButton.text(this.$treeViewConfig.data("opened-text"))})),this.$accordionItem.on("hidden.bs.collapse",(e=>{this.$accordionButton.text(this.$treeViewConfig.data("closed-text"))})),bootstrap.Collapse.getOrCreateInstance(this.$accordionCollapsibleSection,{toggle:!this.treeViewCollapseEnabled}),e(".full-treeview-section div.accordion-item").one("shown.bs.collapse",(e=>{this.scrollToActive()})),e(window).on("popstate",(function(){}))}addButtonSection(){this.$buttonSection=e("<div>",{class:"d-flex flex-wrap gap-2 justify-content-end mb-3"}),this.$buttonSection.append(this.$resetButton),this.$buttonSection.append(this.$moreButton)}addTreeviewToAccordion(){this.$accordionWrapper=e("<section>",{class:"accordion full-treeview-section mb-3"}),this.$accordionItem=e("<div>",{class:"accordion-item"});var t=e("<h2>",{id:"heading-treeview",class:"accordion-header"});this.$accordionButton=e("<button>",{class:"accordion-button",type:"button","data-bs-toggle":"collapse","data-bs-target":"#collapse-treeview","aria-expanded":"true","aria-controls":"collapse-treeview"}),this.$accordionCollapsibleSection=e("<div>",{id:"collapse-treeview",class:"accordion-collapse collapse","aria-labelledby":"heading-treeview"}),this.$fwTreeViewRow.css("margin-bottom","0px"),this.$mainHeader.after(this.$accordionWrapper),this.$fwTreeViewRow.hide(),this.$accordionButton.appendTo(t),t.appendTo(this.$accordionItem),this.$fwTreeViewRow.appendTo(this.$accordionCollapsibleSection),this.$accordionCollapsibleSection.appendTo(this.$accordionItem),this.$accordionItem.appendTo(this.$accordionWrapper),this.$fwTreeViewRow.show()}scrollToActive(){var t;t=e("li > a.jstree-clicked")[0],this.pager.updateMoreLink(this.$moreButton,this.$resetButton),void 0!==t&&t.scrollIntoView(!1)}showAlert(t,i){i||(i="");var s=e('<div class="alert '+i+' alert-dismissible fade show" role="alert">').append(t),n='<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="'+e(".index #fullwidth-treeview-active").data("treeview-alert-close")+'"></button>';return s.append(n),s.prependTo(e("body > #wrapper")),window.scrollTo({top:0}),s}deleteAlerts(){e("body > #wrapper > .alert").remove()}readyListener=()=>{this.scrollToActive()};selectNodeListener=(t,i)=>{i.instance.open_node(i.node);var s=i.node.a_attr.href;e.get(s,(function(t){t=e(t),e("#main-column h1").first().replaceWith(e(t.find("#main-column h1").first()));var i=e("#main-column h1").first();document.title=i[0].textContent,!e("#breadcrumb").length&&e(t.find("#breadcrumb").length)&&e(".full-treeview-section").after(e("<nav>",{id:"breadcrumb"})),e("#breadcrumb").replaceWith(e(t.find("#breadcrumb"))),e("#main-column .row").replaceWith(e(t.find("#main-column .row").first())),t.find(".translation-links").length&&!e(".translation-links").length&&e("#breadcrumb").after(e('<div class="btn-group translation-links"></div>')),e(".translation-links").replaceWith(e(t.find(".translation-links"))),e("#main-column > .alert").remove(),e("#breadcrumb").before(t.find("#main-column > .alert")),Drupal.attachBehaviors(document),void 0!==jQuery("#clipboard-menu").data("clipboard")&&jQuery("#clipboard-menu").data("clipboard").updateAllButtons(),window.history.pushState(null,null,s)}))};moveNodeListener=(t,i)=>{if(i.old_position!==i.position){var s=JSON.parse(e.ajax({url:i.node.a_attr.href+"/informationobject/fullWidthTreeViewMove",type:"POST",async:!1,data:{oldPosition:i.old_position,newPosition:i.position}}).responseText);this.deleteAlerts(),s.error?(this.showAlert(s.error,"alert-danger"),i.instance.refresh()):(s.success,this.showAlert(s.success,"alert-info"))}};hoverNodeListener=(t,i)=>{let s=i.node.parent,n=this.$fwTreeView.jstree("get_json",s);if("#"!=s&&-1!=document.cookie.indexOf("atom_authenticated=1")&&!(s in this.syncInitiated)&&"href"in n.a_attr){this.syncInitiated[s]=!0,this.commandNodeAndChildren(this.$fwTreeView,s,"disable_node");let t=n.a_attr.href+"/informationobject/fullWidthTreeViewSync";e.get(t,(e=>{!0===e.repair_successful?this.$fwTreeView.jstree("refresh_node",s):!1===e.repair_successful&&delete this.syncInitiated[s],this.commandNodeAndChildren(this.$fwTreeView,s,"enable_node")}))}};commandNodeAndChildren=(e,t,i)=>{let s=e.jstree().get_node(t);e.jstree(i,t),s.children.forEach((t=>e.jstree(i,t)))}}e((()=>{var i=e(".index #fullwidth-treeview-active");i.length&&new t(i)}))}(jQuery)},4353:()=>{(e=>{"use strict";Drupal.behaviors.imageflow={attach:()=>{var t=e("#atom-digital-object-carousel");e(t).length&&e(t).imagesLoaded().always((()=>{e("#atom-slider-images").slick({slidesToShow:1,slidesToScroll:1,asNavFor:"#atom-slider-title",dots:!0,centerMode:!0,instructionsText:e(t).data("carousel-instructions-text-image-link"),regionLabel:e(t).data("carousel-images-region-label"),variableWidth:!0,centerPadding:"60px",nextArrow:'<button class="slick-next slick-arrow" type="button"><span class="slick-next-icon" aria-hidden="true"></span><span class="slick-sr-only">'+e(t).data("carousel-next-arrow-button-text")+"</span></button>",prevArrow:'<button class="slick-prev slick-arrow" type="button"><span class="slick-prev-icon" aria-hidden="true"></span><span class="slick-sr-only">'+e(t).data("carousel-prev-arrow-button-text")+"</span></button>"}),e("#atom-slider-title").slick({centerMode:!0,slidesToShow:1,slidesToScroll:1,draggable:!1,swipe:!1,arrows:!1,fade:!0,instructionsText:e(t).data("carousel-instructions-text-text-link"),regionLabel:e(t).data("carousel-title-region-label")}),e("#atom-slider-images").slick("slickGoTo",0)}))}}})(jQuery)},4429:()=>{!function(e){e.extend(Drupal,{l10nSelected:-1,l10nSourceInputs:[],l10nTargetInputs:[],l10nSourceMessages:[],l10nTargetMessages:[]});var t=e("#translate-plugin");t.length&&(Drupal.l10nSourceMessages=t.data("l10n-source-messages"),Drupal.l10nTargetMessages=t.data("l10n-target-messages")),Drupal.behaviors.l10nEditor={attach:function(t){for(var i in e("#l10n-client-hide").click((function(){e("#l10n-client-string-select, #l10n-client-string-editor, #l10n-client .labels .lbl").hide(),e("#l10n-client").height("2em"),e("#l10n-client-hide").hide(),e("#l10n-client-show").show(),e("body").css("border-bottom","0px")})),e("#l10n-client-show").click((function(){e("#l10n-client-string-select, #l10n-client-string-editor, #l10n-client .labels .lbl").show(),e("#l10n-client").height("22em"),e("#l10n-client-hide").show(),e("#l10n-client-show").hide(),e("body").css("border-bottom","22em solid #fff")})),e("#l10n-client-string-select li").click((function(){var t=e("#l10n-client-string-select li").index(this),i=e(this);e("#l10n-client-string-select li").removeClass("active"),i.addClass("active"),e("#l10n-client-string-editor textarea").hide(),null==Drupal.l10nSourceInputs[t]&&(Drupal.l10nSourceInputs[t]=e(document.createElement("textarea")).attr("name","source[]").attr("rows",6).attr("readonly","readonly").appendTo("#l10n-client-string-editor .source"),Drupal.l10nSourceInputs[t].val(Drupal.l10nSourceMessages[t])),null==Drupal.l10nTargetInputs[t]&&(Drupal.l10nTargetInputs[t]=e(document.createElement("textarea")).attr("name","target[]").attr("rows",6).appendTo("#l10n-client-string-editor .translation"),Drupal.l10nTargetInputs[t].val(Drupal.l10nTargetMessages[t]),Drupal.l10nTargetInputs[t].blur((function(){""!=e(this).val()?i.removeClass("untranslated").addClass("translated"):i.removeClass("translated").addClass("untranslated")}))),Drupal.l10nSourceInputs[t].show(),Drupal.l10nTargetInputs[t].show(),Drupal.l10nTargetInputs[t].select(),Drupal.l10nSelected=t})),Drupal.l10nTargetMessages)e(e("#l10n-client-string-select li")[i]).addClass(""==Drupal.l10nTargetMessages[i]?"untranslated":"translated");e("#l10n-client-form #edit-copy").click((function(){e("#l10n-client-form #edit-target").val(e("#l10n-client-string-editor .source-text").text())})),e("#l10n-client-form #edit-clear").click((function(){e("#l10n-client-form #edit-target").val("")}))}}}(jQuery)},2145:()=>{(e=>{"use strict";e((()=>{var t=e(".simple-map");t.length&&(window.initializeSimpleMap=function(){var e=new google.maps.LatLng(t.data("latitude"),t.data("longitude")),i=new google.maps.Map(t.get(0),{zoom:16,center:e,panControl:!1,mapTypeControl:!0,zoomControl:!0,scaleControl:!1,streetViewControl:!1,mapTypeControlOptions:{style:google.maps.MapTypeControlStyle.DROPDOWN_MENU},mapTypeId:google.maps.MapTypeId.ROADMAP,zoomControlOptions:{style:google.maps.ZoomControlStyle.SMALL}});new google.maps.Marker({position:e,map:i})},e.getScript("https://maps.google.com/maps/api/js?sensor=false&callback=initializeSimpleMap&key="+t.data("key")))}))})(jQuery)},5796:()=>{(e=>{"use strict";const t=jQuery(".masonry");t.length&&t.imagesLoaded().always((()=>{t.masonry({itemSelector:".masonry-item",percentPosition:!0})}))})()},1613:()=>{!function(e){"use strict";Drupal.behaviors.mediaelement={attach:function(t){e("video, audio",t).each((function(){e(this).mediaelementplayer({pluginPath:"node_modules/mediaelement/build/",renderers:["html5","flash_video"],alwaysShowControls:!0,stretching:"responsive"})}))}}}(jQuery)},229:()=>{(e=>{"use strict";class t{constructor(t){this.$element=e(t),this.$form=this.$element.closest("form"),this.$loadError=this.$element.find(".load-error"),this.$table=this.$element.find("table"),this.$rowTemplate=this.$table.find(".row-template"),this.$modal=this.$element.find(".modal"),this.$validationError=this.$modal.find(".validation-error"),this.$hiddenInputs=this.$modal.find("input[type=hidden]");var i=this.$modal.find("input[id]:first").attr("id");this.prefix=i.substr(0,i.indexOf("_")),this.b5Modal=bootstrap.Modal.getOrCreateInstance(this.$modal),this.currentResource=this.$element.data("current-resource"),this.currentResourceText=this.$element.data("current-resource-text"),this.requiredFields=this.$element.data("required-fields")?this.$element.data("required-fields").split(","):[],this.deleteFieldName=this.$element.data("delete-field-name"),this.checkedText=this.$element.data("checked-text"),this.uncheckedText=this.$element.data("unchecked-text"),this.iframeError=this.$element.data("iframe-error"),this.lazyLoadUrl=this.$element.data("lazy-load-url"),this.lazyLoadCount=0,this.currentRowId=void 0,this.newRowsCounter=0,this.rowsData={},this.iframes={},this.deleteRows=[],this.lazyLoad(),this.$element.on("click",".add-row",this.addRow.bind(this)),this.$element.on("click",".edit-row",this.editRow.bind(this)),this.$element.on("click",".delete-row",this.deleteRow.bind(this)),this.$element.on("click",".modal-submit",this.submitModal.bind(this)),this.$element.on("click",".show-more",this.lazyLoad.bind(this)),this.$modal.on("hidden.bs.modal",this.clearModal.bind(this)),this.$form.on("submit",this.prepareAndSubmit.bind(this)),this.$modal.on("change",'input[name="relatedDonor[resource]"]',this.updateContactInformation.bind(this)),this.$modal.on("change",'select[name="relatedAuthorityRecord[type]"]',this.toggleSubTypeInput.bind(this))}lazyLoad(){this.lazyLoadUrl?e.get(this.lazyLoadUrl,{skip:this.lazyLoadCount}).done((t=>{e.each(t.data,((e,t)=>{var i=this.$rowTemplate.clone().removeClass().attr("id",t.url).appendTo(this.$table.find("tbody"));t.informationObject=t.title,this.updateRowContent(i,t),this.lazyLoadCount++})),this.lazyLoadCount>=t.total&&this.$element.find(".show-more").remove()})).fail((()=>{this.$loadError.removeClass("d-none")})):this.$element.find(".show-more").remove()}updateRowContent(t,i){t.find("td").each(((t,s)=>{var n=e(s),r=n.data("field-id");r&&(this.prefix.length&&(r=r.substr(this.prefix.length+1,r.length)),n.text(i[r]))}))}addRow(){this.$modal.one("shown.bs.modal",(()=>this.$modal.find("input:focusable:first").trigger("focus"))),this.b5Modal.show()}editRow(t){var i=e(t.target).closest("tr").attr("id");i&&(this.rowsData[i]?this.loadModal(i):e.get(i).done((e=>{(e=JSON.parse(e)).resource={uri:e.object,text:e.objectDisplay},e.subType={uri:e.subType,text:e.subTypeDisplay},this.currentResource===e.object&&(e.resource={uri:e.subject,text:e.subjectDisplay},e.subType={uri:e.converseSubType,text:e.converseSubTypeDisplay}),e.subType.text&&(e.subType.text+=" "+this.currentResourceText),e.actor={uri:e.actor,text:e.actorDisplay},e.place={uri:e.place,text:e.placeDisplay},e.informationObject={uri:e.informationObject,text:e.informationObjectDisplay},["object","objectDisplay","subject","subjectDisplay","actorDisplay","placeDisplay","subTypeDisplay","converseSubType","converseSubTypeDisplay","informationObjectDisplay"].forEach((t=>delete e[t])),this.rowsData[i]=e,this.loadModal(i)})).fail((()=>{this.$loadError.removeClass("d-none")})))}loadModal(e){this.currentRowId=e,this.rowsData[e]&&this.updateInputs(this.rowsData[e]),this.b5Modal.show()}updateInputs(t){e.each(t,((i,s)=>{var n=i;this.prefix.length&&(n=this.prefix+"_"+i);var r=this.$modal.find("[id="+n+"]");if(r.length){if(!s&&t._sourceCulture&&t._sourceCulture.fields[i]){var o=e("<div>",{class:"default-translation"}).text(t._sourceCulture.fields[i]);t._sourceCulture.direction&&o.attr("dir",t._sourceCulture.direction),r.before(o)}"text"===r.attr("type")||["TEXTAREA","SELECT"].includes(r.prop("tagName"))?r.hasClass("form-autocomplete")&&"object"==typeof s&&s?(r.val(s.text),r.prev("input[type=hidden]").val(s.uri)):s&&r.val(s):"checkbox"===r.attr("type")&&r.prop("checked",s),"relatedAuthorityRecord_type"===n&&s&&this.$modal.find("#relatedAuthorityRecord_subType").removeAttr("disabled")}}))}deleteRow(t){var i=e(t.target).closest("tr"),s=i.attr("id");s.startsWith("new_relation_")||this.deleteRows.push(s),this.rowsData[s]&&delete this.rowsData[s],this.iframes[s]&&(e.each(this.iframes[s],((e,t)=>t.remove())),delete this.iframes[s]),i.hide(250,(()=>i.remove()))}clearModal(){this.clearInputs();var e=this.$modal.find(".nav-item:first button");e.length&&bootstrap.Tab.getOrCreateInstance(e).show(),this.$validationError.addClass("d-none"),this.$modal.find(".is-invalid").removeClass("is-invalid").removeAttr("aria-invalid"),this.$modal.find(".default-translation").remove(),this.currentRowId=void 0}clearInputs(t=[]){this.$modal.find(":input").each(((i,s)=>{var n=e(s),r=n.attr("id");t.includes(r)||("text"===n.attr("type")||"TEXTAREA"===n.prop("tagName")?(n.val(""),n.hasClass("form-autocomplete")&&n.prev("input[type=hidden]").val("")):"SELECT"===n.prop("tagName")?n.val(n.find("option:first").val()):"checkbox"===n.attr("type")&&n.prop("checked",!1),"relatedAuthorityRecord_subType"===r&&n.attr("disabled","disabled"))}))}submitModal(){var t=!1;if(e.each(this.requiredFields,((e,i)=>{var s=this.$modal.find("#"+i);s.val().length||(t=!0,s.addClass("is-invalid").attr("aria-invalid",!0))})),t)return this.$validationError.removeClass("d-none"),!1;if(this.currentRowId)i=this.$table.find('[id="'+this.currentRowId+'"]');else{this.currentRowId="new_relation_"+this.newRowsCounter++;var i=this.$rowTemplate.clone().removeClass().attr("id",this.currentRowId).appendTo(this.$table.find("tbody"))}var s={},n={};this.$modal.find(":input").each(((t,i)=>{var r=e(i),o=r.attr("id");if(o&&this.prefix.length&&(o=o.substr(this.prefix.length+1,o.length)),r.hasClass("form-autocomplete")){s[o]={text:r.val(),uri:r.prev("input[type=hidden]").val()},n[o]=s[o].text;var a=r.siblings(".add");if(a.length)if(this.iframes[this.currentRowId]=this.iframes[this.currentRowId]||{},this.iframes[this.currentRowId][o])s[o].uri.length||!s[o].text.length?delete this.iframes[this.currentRowId][o]:this.iframes[this.currentRowId][o].value=s[o].text;else if(!s[o].uri.length&&s[o].text.length){var l=a.val().split(" "),d=e('<iframe src="'+l[0]+'" class="d-none">');d.appendTo("body"),this.iframes[this.currentRowId][o]={value:s[o].text,selector:l[1],$iframe:d}}}else"text"===r.attr("type")||"TEXTAREA"===r.prop("tagName")?(s[o]=r.val(),n[o]=s[o]):"SELECT"===r.prop("tagName")?(s[o]=r.val(),n[o]=r.find("option:selected").text()):"checkbox"===r.attr("type")&&(s[o]=r.is(":checked"),n[o]=s[o]?this.checkedText:this.uncheckedText)})),this.rowsData[this.currentRowId]=s,this.updateRowContent(i,n),this.b5Modal.hide()}prepareAndSubmit(t,i=!1){if(!i&&(t.preventDefault(),!this.b5Modal._isShown)){var s=[];e.each(this.iframes,((t,i)=>{e.each(i,((i,n)=>{s.push(new Promise(((e,s)=>{n.$iframe.on("load",(r=>{var o=r.target.contentWindow.location.pathname;o===n.$iframe.attr("src")?s(n.value):(this.rowsData[t][i].uri=o,e())}))}))),e(n.$iframe[0].contentWindow.document).find(n.selector).val(n.value).closest("form").trigger("submit")}))})),Promise.allSettled(s).then((t=>{var i=e("<ul>",{class:"mb-0 mt-2"});if(e.each(t,((t,s)=>{"rejected"===s.status&&e("<li>").text(s.reason).appendTo(i)})),i.children().length)e("<div>",{class:"alert alert-danger mt-3",role:"alert"}).append(e("<p>").text(this.iframeError)).append(i).insertBefore(".actions");else{var s=0,n="dialog";this.prefix.length&&(n=this.prefix+"s"),e.each(this.rowsData,((t,i)=>{if(!t.startsWith("new_relation_")){var r=n+"["+s+"][id]";this.$form.append('<input type="hidden" name="'+r+'" value="'+t+'">')}this.$hiddenInputs.each(((t,i)=>{var r=e(i);if(!r.parent(".yui-ac").length){var o=(r=r.clone()).attr("name");o=o.replace(this.prefix,n+"["+s+"]"),r.attr("name",o),this.$form.append(r)}})),e.each(i,((e,t)=>{var i=n+"["+s+"]["+e+"]";"object"==typeof t&&t&&(t=t.uri),this.$form.append('<input type="hidden" name="'+i+'" value="'+t+'">')})),s++})),e.each(this.deleteRows,((e,t)=>{t.includes("/id/")&&(t=t.split("/id/")[1]),this.$form.append('<input type="hidden" name="'+this.deleteFieldName+"["+this.prefix+e+']" value="'+t+'"/>')})),this.$modal.remove(),this.$form.trigger("submit",!0)}}))}}updateContactInformation(t){var i=e(t.target).val();i?e.get(i+"/donor/primaryContact").done((e=>this.updateInputs(e))).fail((()=>this.clearInputs(["relatedDonor_resource"]))):this.clearInputs(["relatedDonor_resource"])}toggleSubTypeInput(t){var i=e(t.target).val(),s=this.$modal.find("#relatedAuthorityRecord_subType");s.val(""),s.prev("input[type=hidden]").val(""),i?s.removeAttr("disabled"):s.attr("disabled","disabled")}}e((()=>e(".atom-table-modal").each(((e,i)=>new t(i)))))})(jQuery)},8992:()=>{(e=>{"use strict";e((()=>{e("table.multi-row").each(((t,i)=>{var s=e(i);s.on("click",".multi-row-add",(function(){var t=s.find("> tbody > tr:last"),i=t.clone().hide(),n=parseInt(t.find("select, input, textarea").first().attr("name").match(/\d+/).shift());i.find(".yui-ac").each((function(){var t=e(this),i=t.children("input[name]:first").attr("name"),s=t.children("input[id]:first").attr("id"),n=t.children("input[class=add]")[0],r=t.children("input[class=list]")[0];t.replaceWith(e("<div>").append(e("<select>",{id:s,name:i,class:"form-autocomplete form-control"})).append(n).append(r))})),i.find("input, select, textarea").each((function(i){var s=e(this);if(s.is("input, textarea")&&("hidden"!=s.attr("type")||s.attr("id")&&s.attr("id").endsWith("Date")))s.val("");else if(s.is("select")){var r=t.find("input, select, textarea").eq(i)[0].selectedIndex;s[0].selectedIndex=r}if(s.attr("name")){var o=s.attr("name").replace(/\[\d+\]/,"["+(n+1)+"]");s.attr("name",o)}if(s.attr("id")){var a=s.attr("id").replace(/\_\d+\_/,"_"+(n+1)+"_");s.attr("id",a)}})),s.children("tbody").append(i),Drupal.behaviors.autocomplete.attach(),i.show(250,(()=>i.find(":input:focusable").first().trigger("focus")))})),s.on("keydown","input, select",(function(e){if("Enter"==e.key&&0==s.find(":animated").length)return s.find(".multi-row-add").trigger("click"),!1})),s.on("click",".multi-row-delete",(function(){var t=e(this),i=s.find("tbody tr"),n=s.find('tr[class^="related_obj_"]'),r=t.closest("tr");if(t.trigger("focusout"),1<i.length-n.length||r.attr("class")&&r.attr("class").indexOf("related_obj_")>=0){var o=parseInt(r.find("select, input, textarea").first().attr("name").match(/\d+/).shift());o--,r.nextAll().each((function(){o++,e(this).find("input, select, textarea").each((function(){var t=e(this);if(t.attr("name")){var i=t.attr("name").replace(/\[\d+\]/,"["+o+"]");t.attr("name",i)}if(t.attr("id")){var s=t.attr("id").replace(/\_\d+\_/,"_"+o+"_");t.attr("id",s)}}))})),r.hide(250,(()=>r.remove()))}else r.find("input, select, textarea").each((function(){var t=e(this);t.is("input, textarea")&&"hidden"!=t.attr("type")?t.val(""):t.is("select")&&(t[0].selectedIndex=0)}))}))}))}))})(jQuery)},6654:()=>{(e=>{"use strict";function t(t){t.children().each(((i,s)=>{if(e(s).offset().top>t.offset().top+20)return t.addClass("wrapped"),!1;t.removeClass("wrapped")}))}e((()=>{var i=e("#navbar-content");t(i),e(window).on("resize",(()=>{t(i)}))}))})(jQuery)},9036:()=>{(e=>{"use strict";e((()=>{const i=e("body.settings.permissions");i.length&&new t(i)}));class t{constructor(e){const t=e.find("#permissions-collapse"),i=e.find("#copyright-collapse");this.$cells=t.find("input[type=checkbox]").parent(),this.$cells.filter(":has(input:checked)").addClass("checked"),t.on("change","td",this.changeCellState.bind(this)).on("click",".all",this.enableAll.bind(this)).on("click",".none",this.disableAll.bind(this)).on("click","td",this.clickCell.bind(this)).on("click","button",this.toggleColumn.bind(this)),i.on("click","input[name=preview]",this.previewStatement.bind(this))}static togglePermission(t,i){t.each(((t,s)=>{let n,r;switch(s.tagName){case"INPUT":r=e(s),n=r.parent();break;case"TD":n=e(s),r=n.find("input");break;default:return!1}void 0===i&&(i=!n.hasClass("checked")),n.toggleClass("checked",i),r.prop("checked",i)}))}enableAll(e){e.preventDefault(),t.togglePermission(this.$cells,!0)}disableAll(e){e.preventDefault(),t.togglePermission(this.$cells,!1)}changeCellState(i){const s=e(i.target);t.togglePermission(s,s.prop("checked"))}clickCell(i){"TD"===i.target.tagName&&t.togglePermission(e(i.target))}toggleColumn(i){i.preventDefault();const s=e(i.target),n=s.closest("table").find("tr td:nth-child("+(s.parent().index()+2)+")");let r=!1;n.find("input[type=checkbox]").each(((e,t)=>{if(!t.checked)return r=!0,!1})),t.togglePermission(n,r)}previewStatement(t){t.preventDefault();const i=e(t.target).closest("form").attr("target","_blank"),s=e("<input/>",{type:"hidden",name:"preview",value:"true"}).appendTo(i);i.trigger("submit").removeAttr("target"),s.remove()}}})(jQuery)},1405:()=>{(e=>{"use strict";e((()=>{e("#privacy-message").on("closed.bs.alert",(()=>{e.get("/default/privacyMessageDismiss"),e(".navbar-brand").trigger("focus")}))}))})(jQuery)},5603:()=>{var e={behaviors:{}};e.attachBehaviors=t=>{t=t||document,$.each(e.behaviors,(function(){this.attach(t)}))},$((()=>e.attachBehaviors(document))),window.Qubit={treeviewTypes:{default:{icon:"fas fa-folder"},Item:{icon:"fas fa-file-alt"},File:{icon:"fas fa-file-alt"},Series:{icon:"fas fa-folder"},Subseries:{icon:"fas fa-folder"},subfonds:{icon:"fas fa-folder"},"Sous-fonds":{icon:"fas fa-folder"},Fonds:{icon:"fas fa-archive"},Collection:{icon:"fas fa-archive"}}},window.Drupal=e},6631:()=>{(e=>{"use strict";e((()=>{e("#jobs-refresh-button").on("click",(e=>{e.preventDefault(),window.location.reload()}))}))})(jQuery)},8567:()=>{!function(e){var t=["title","authorizedFormOfName","slug","filename"],i=0;function s(t,i){var s=window.location.href.split("/");s.pop();var n=s.join("/")+"/slugPreview";e.ajax({url:n,data:{text:t},type:"GET",cache:!1,success:function(e){i(!1,e.slug,e.padded)},error:function(){i(!0)}})}e((function(){var n=e("#rename-form");if(n.length){e("#rename-form input:text:visible:first").focus();var r=e("#rename-form-submit"),o=e("#rename-slug-warning"),a={},l={};for(var d in t){var h=t[d];a[h]=e("#"+h),l[h]=e("#rename_enable_"+h)}u(),n.on("keydown",(function(e){13==e.which&&(e.preventDefault(),a.title.is(":focus")&&c(),a.authorizedFormOfName.is(":focus")&&p(),m())})),e(document).ajaxStart((function(){i++})),e(document).ajaxStop((function(){i--})),e("#rename-form input[type=checkbox]").click((function(e){u()})),r.click((function(e){m()})),a.title.change((function(){c()})),a.authorizedFormOfName.change((function(){p()})),a.slug.change((function(){s(a.slug.val(),f)}))}function u(){for(var e in t){var i=t[e];a[i].attr("disabled",!l[i].is(":checked"))}}function c(){l.slug.is(":checked")&&s(a.title.val(),f)}function p(){l.slug.is(":checked")&&s(a.authorizedFormOfName.val(),f)}function f(e,t,i){o.hide(),e?alert("Error fetching slug preview."):(i&&o.show(),a.slug.val(t))}function m(){i>0?setTimeout(m,1e3):n.submit()}}))}(window.jQuery)},5630:()=>{(e=>{"use strict";e((()=>new t(e("#rights-form"))));class t{constructor(e){e.length&&(this.$basisSelect=e.find("#right_basis"),this.$basisFields=e.find("[id$=-basis-fields]"),this.toggleBasis(),this.$basisSelect.on("change",this.toggleBasis.bind(this)),this.$addButton=e.find("#act-rights-add"),this.$addContent=e.find("#act-rights-content-add"),this.newText=this.$addButton.data("act-rights-new-text"),this.counter=0,this.$addButton.on("show.bs.tab",this.addAct.bind(this)),e.on("click",".act-rights-delete",this.deleteAct.bind(this)))}toggleBasis(){var t=this.$basisSelect.val().match("[^/]*$")[0];this.$basisFields.each(((i,s)=>{var n=e(s);n.toggle(n.attr("id").startsWith(t))}))}addAct(t,i=[]){t.preventDefault();var s=this.$addButton.clone(),n=this.$addContent.clone(),r="act-rights-new-"+this.counter,o="act-rights-content-new-"+this.counter;e("<li>",{class:"nav-item",role:"presentation"}).append(s.attr("id",r).attr("data-bs-target","#"+o).attr("aria-controls",o).html(this.newText)).insertBefore(this.$addButton.parent()),n.attr("id",o).attr("aria-labelledby",r).insertBefore(this.$addContent),s.one("shown.bs.tab",(()=>{i.forEach((e=>e.remove())),this.updateInputs(),n.find(":input:focusable:first").trigger("focus")})),new bootstrap.Tab(s).show(),this.counter++}deleteAct(t){var i=e(t.target.closest(".tab-pane[id^=act-rights]")),s=e("#"+i.attr("aria-labelledby")),n=s.parent().next().children("button"),r=[s.parent()];if("0"===i.find("input[id$=id]").val()?r.push(i):i.find("input[id$=delete]").val("true"),n.attr("id")==this.$addButton.attr("id")){var o=s.parent().prev().children("button");if(!o.length)return void this.addAct(t,r);n=o}n.one("shown.bs.tab",(()=>{r.forEach((e=>e.remove())),this.updateInputs()})),bootstrap.Tab.getOrCreateInstance(n).show()}updateInputs(){e(".tab-pane[id^=act-rights]").each(((t,i)=>{var s=e(i);"act-rights-content-add"!=s.attr("id")&&(s.find(":input[id]").each(((i,s)=>{var n=e(s);n.attr("id",n.attr("id").replace(/_\d+_/,"_"+t+"_").replace("_blank_","_grantedRights_"+t+"_")),n.attr("name",n.attr("name").replace(/\[\d+\]/,"["+t+"]").replace("[blank]","[grantedRights]["+t+"]"))})),s.find("label[for]").each(((i,s)=>{var n=e(s);n.attr("for",n.attr("for").replace(/_\d+_/,"_"+t+"_").replace("_blank_","_grantedRights_"+t+"_"))})))}))}}})(jQuery)},8859:()=>{(e=>{"use strict";e((()=>{var t=e("#search-box-input");if(t.length){var i=e("#search-box-results"),s=bootstrap.Dropdown.getOrCreateInstance(t);t.autoComplete({bootstrapVersion:"4",noResultsText:"",events:{search:(t,i,s)=>{var n={query:t},r=e('#search-box input[name="repos"]:checked');r.length&&r.val()&&(n.repos=r.val()),e.ajax(s.data("url"),{data:n}).done((e=>i(e)))},searchPost:(e,t)=>(e.length&&t.val().length>=3?(i.html(e),s.show()):(s.hide(),i.html("")),[])}}),t.on("input",(e=>{e.target.value.length<3&&(s.hide(),i.html(""))})),t.on("show.bs.dropdown",(e=>{0==i.children().length&&e.preventDefault()}))}}))})(jQuery)},3044:()=>{(e=>{"use strict";e((()=>{let t=e("#finding-aid-collapse > .accordion-body > div").slice(1,4);function i(){return e("#finding_aid_finding_aids_enabled_1").is(":checked")}function s(){i()?t.show():t.hide()}i()||t.hide(),e("#finding_aid_finding_aids_enabled_0").on("change",s),e("#finding_aid_finding_aids_enabled_1").on("change",s)}))})(jQuery)},9715:()=>{!function(e){"use strict";e((()=>e(".sidebar-paginated-list").each(((i,s)=>new t(e(s))))));class t{constructor(e){this.$element=e,this.url=this.$element.data("url"),this.currentPage=1,this.totalPages=parseInt(this.$element.data("total-pages"),10),this.totalPages<2||(this.$prev=this.$element.find(".page-link-prev"),this.$next=this.$element.find(".page-link-next"),this.updatePageLinkState(this.$prev,!0),this.$pageInput=this.$element.find("input[type=number]"),this.$results=this.$element.find("> ul"),this.$spinner=this.$element.find(".spinner"),this.$resultStart=this.$element.find(".result-start"),this.$resultEnd=this.$element.find(".result-end"),this.init())}init(){this.$next.on("click",this.next.bind(this)),this.$prev.on("click",this.prev.bind(this)),this.$pageInput.on("change",this.change.bind(this))}next(e){e.preventDefault(),this.fetchResults(this.currentPage+1)}prev(e){e.preventDefault(),this.fetchResults(this.currentPage-1)}busy(e){if(void 0===e)return this._busy;this._busy=e;var t=this.$spinner;e?(this.updatePageLinkState(this.$prev,!0),this.updatePageLinkState(this.$next,!0),this.busyTimer&&clearTimeout(this.busyTimer),this.busyTimer=setTimeout((function(){t.removeClass("d-none")}),200)):(clearTimeout(this.busyTimer),t.addClass("d-none"),this.updatePageLinkState(this.$prev,1==this.currentPage),this.updatePageLinkState(this.$next,this.currentPage==this.totalPages))}fetchResults(t){this.busy()||(t<1||t>this.totalPages?this.$pageInput.prop("value",this.currentPage):e.ajax({url:this.url,type:"GET",context:this,dataType:"json",data:{page:t},beforeSend:function(){this.busy(!0)},success:function(i){this.currentPage=t,this.$pageInput.prop("value",t),this.$results.empty();for(var s=i.results.length,n=0;n<s;n++)this.$results.append(e('<a class="list-group-item list-group-item-action">').attr("href",i.results[n].url).attr("title",i.results[n].title).append(i.results[n].title));this.$resultStart.html(i.start),this.$resultEnd.html(i.end)},complete:function(){this.busy(!1)}}))}change(e){var t=this.fetchResults.bind(this),i=parseInt(this.$pageInput.prop("value"));this.pageTimer&&clearTimeout(this.pageTimer),this.pageTimer=setTimeout((function(){t(i)}),650)}updatePageLinkState(e,t){e.parent().toggleClass("disabled",t),e.attr("aria-disabled",t)}}}(jQuery)},6140:()=>{!function(e){"use strict";function t(e){e.preventDefault(),e.stopPropagation()}e((()=>new i(e("#treeview"))));class i{constructor(t){this.$element=t,this.$search=e("#treeview-search"),(this.$element.length||this.$search.length)&&(this.setLoading(!1),this.nodesSelector="li:not(.ancestor, .more)",this.resourceId=this.$element.data("current-id"),this.sortable=void 0!==this.$element.data("sortable")&&!!this.$element.data("sortable"),this.browser=void 0!==this.$element.data("browser")&&!!this.$element.data("browser"),this.$menu=this.$element.parent().prev("#treeview-menu"),this.$list=this.$element.siblings("#treeview-list"),this.$listNavTmpl=this.$list.find("nav").clone(),this.init())}init(){this.$element.on("click.treeview.atom","li",this.click.bind(this)).on("mousedown.treeview.atom","li",this.mousedownup.bind(this)).on("mouseup.treeview.atom","li",this.mousedownup.bind(this)).on("mouseenter.treeview.atom",".list-group-item",this.listItemMouseEnter.bind(this)).on("mouseleave.treeview.atom",".list-group-item",this.listItemMouseLeave.bind(this)).bind("scroll",this.scroll.bind(this)).bind("scroll-debounced",this.debouncedScroll.bind(this)).bind("mousewheel",this.mousewheel.bind(this)),this.$search.on("submit.treeview.atom","form",this.search.bind(this)).on("keydown.treeview.atom","input",this.searchChange.bind(this)).on("mouseenter.treeview.atom",".list-group-item",this.listItemMouseEnter.bind(this)).on("mouseleave.treeview.atom",".list-group-item",this.listItemMouseLeave.bind(this)),this.$list.on("click.treeview.atom",".pagination a",this.clickPagerButton.bind(this)),this.$menu.on("shown.bs.tab","#treeview-search-tab",(e=>{this.$search.find("input").focus()}));var e,t,i=this;this.notify=(80,e=function(e){i.$element.trigger("scroll-debounced",e)},function(){window.clearTimeout(t),t=window.setTimeout(e,80)}),this.installSortableBehavior()}setLoading(e,t){return this.loading=e,this.loading?(this.$element.addClass("loading"),t&&(t.append('<div class="loading" />'),t.children("i").css("visibility","hidden"))):(this.$element.removeClass("loading"),t&&t.children(".loading").remove().end().children("i").css("visibility","visible")),this}installSortableBehavior(){if(!this.sortable)return this;this.$element.sortable({items:this.nodesSelector,placeholder:"placeholder",forcePlaceholderSize:!0,start:this.drag.bind(this),stop:this.drop.bind(this),axis:"y"}),this.$element.disableSelection(),this.showGrip()}refreshSortableBehavior(){if(!this.sortable)return this;var e=this.$element.find(this.nodesSelector);return 1<e&&e.sortable("refresh"),this.showGrip(),this}showGrip(){return this.$element.find(".grip").remove().end().find(this.nodesSelector).append('<i class="grip fas fa-xs fa-grip-lines" aria-hidden="true"></i>'),this}mousedownup(e){this.loading&&t(e)}drag(e,t){this._position=t.item.prev().index();const i=t.item.parents("ul").offset().left;t.item.css("left",i);const s=bootstrap.Popover.getInstance(t.item.get(0));s&&s.hide()}drop(t,i){if(this._position==i.item.prev().index())return this;var s,n=i.item.prev(),r=i.item.next();return s=n.is(".ancestor")?{move:"moveBefore",target:r.data("xhr-location")}:{move:"moveAfter",target:n.data("xhr-location")},e.ajax({url:i.item.data("xhr-location").replace(/treeView$/,"treeViewSort"),context:this,dataType:"html",data:s,beforeSend:function(){this.setLoading(!0,i.item)},success:function(){i.item.effect("highlight",{color:"#dff0d8"},500)},complete:function(){this.setLoading(!1,i.item)},error:function(e,t,s){s.length&&this.$element.sortable("cancel"),i.item.effect("highlight",{color:"#f2dede"},500)}}),this}mousewheel(e,i,s,n){var r=this.$element.scrollTop();n>0&&r-n<=0?(this.$element.scrollTop(0),t(e)):n<0&&this.$element.get(0).scrollHeight-this.$element.scrollTop()+n<=this.$element.height()&&(this.$element.scrollTop(this.$element.get(0).scrollHeight-this.$element.height()),t(e))}scroll(e){e.target.contains(this.$element.get(0))&&this.notify(e)}debouncedScroll(t){var i=e(t.target);if(t.preventDefault(),i.scrollTop()+i.innerHeight()>=i.get(0).scrollHeight){var s=this;window.setTimeout((function(){var e=s.$element.find(".more:last");0<e.next().length||e.trigger("click")}),250)}}click(i){var s="LI"===i.target.tagName?e(i.target):e(i.target).closest("li");if(!this.loading||"A"===i.target.tagName)return s.hasClass("more")?(t(i),this.showMore(s)):"I"===i.target.tagName?s.hasClass("root")?(t(i),this):this.showItem(s):this;t(i)}showItem(t){this.setLoading(!0,t);var i=t.hasClass("ancestor"),s=t.prev().hasClass("ancestor");if(i&&!s)var n="itemAndSiblings",r=t.data("xhr-location");else n="item",r=i?t.prev().data("xhr-location"):t.data("xhr-location");return e.ajax({url:r,context:this,dataType:"html",data:{show:n,resourceId:this.resourceId,browser:this.browser}}).always((function(e){this.clearPopovers()})).fail((function(e){404==e.status&&t.removeClass("expand").children("i").remove()})).done((function(e){if(i&&!s)t.nextAll().remove(),t.replaceWith(e);else if(i)t.nextAll().addBack().remove(),this.$element.find(".ancestor:last-child").after(e);else{var n=this.$element.find(this.nodesSelector),r=n.eq(0).prev();r.hasClass("ancestor")?(n.remove(),this.$element.find(".more").remove(),r.after(t).next().addClass("ancestor").removeClass("expand").after(e)):(this.$element.find(".more").remove(),t.addClass("ancestor").removeClass("expand"),this.$element.find(this.nodesSelector).remove(),t.after(e))}this.refreshSortableBehavior()})).always((function(e){this.setLoading(!1,t)})),this}showMore(t){var i=t.find("a"),s=window.setInterval((function(){i.append(".")}),125),n=t.next().is("LI")?"prevSiblings":"nextSiblings";e.ajax({url:t.data("xhr-location"),context:this,dataType:"html",data:{show:n,resourceId:this.resourceId,browser:this.browser},beforeSend:function(){this.setLoading(!0,t)},success:function(e){t.replaceWith(e),this.refreshSortableBehavior()},complete:function(){this.setLoading(!1,t),window.clearTimeout(s)},error:function(){}})}clearPopovers(){e(".popover.bs-popover-end").remove()}clearSearchResults(){this.$search.children("form").nextAll().remove(),this.clearPopovers()}showAlert(t,i,s){const n=e('<div class="no-results alert rounded-0 rounded-bottom" role="alert"></div>').html(i).addClass(s);t.append(n)}search(t){t.preventDefault();var i=t.target.query.value;if(1>i.length||this.loading)return this;var s=this.$search.find('input[type="radio"][name="queryField"]:checked');if(s.length>0)var n={subquery:i,subqueryField:s.val()};else n={query:i};return this.setLoading(!0),e.ajax({url:t.target.action,context:this,dataType:"json",data:n}).always((function(e){this.clearSearchResults()})).fail((function(e){404==e.status?this.showAlert(this.$search,t.target.getAttribute("data-not-found"),["border-top-0","alert-warning"]):this.showAlert(this.$search,t.target.getAttribute("data-error"),["border-top-0","alert-warning"])})).done((function(t){const i=e('<div class="list-group list-group-flush rounded-0 border border-top-0"></div>'),s=e('<a href="#" class="list-group-item list-group-item-action text-truncate"></a>');for(const e in t.results){const n=t.results[e],r=s.clone().attr("href",n.url).attr("data-title",n.level).attr("data-content",n.identifier+n.title).html(n.title);i.append(r)}if(void 0!==t.more){const s=e(t.more).children("a"),n=s.attr("href"),r=s.text().trim();i.append(e('<a class="btn atom-btn-white w-100 border-0 rounded-0"><i class="fas fa-search me-1" aria-hidden="true"></i></a>').attr("href",n).append(" "+r))}this.$search.append(i)})).always((function(e){var t=this;window.setTimeout((function(){t.setLoading(!1)}),250)})),this}searchChange(e){27===e.which&&(this.clearSearchResults(),e.target.value="")}listItemMouseEnter(e){const t=e.target,i=t.tagName in["LI","A"]?t:t.closest(".list-group-item");i.dataset.content&&bootstrap.Popover.getOrCreateInstance(i,{html:!0,placement:"auto",content:i.dataset.content,title:i.dataset.title??""}).show()}listItemMouseLeave(e){const t=e.target,i=t.tagName in["LI","A"]?t:t.closest(".list-group-item"),s=bootstrap.Popover.getInstance(i);s&&s.hide()}clearListResults(){this.$list.children().remove(),this.clearPopovers()}clickPagerButton(t){return t.preventDefault(),this.setLoading(!0),e.ajax({url:t.target.href,context:this,dataType:"json"}).always((function(e){this.clearListResults()})).fail((function(e){this.showAlert(this.$list,this.$list.attr("data-error"),["alert-danger"])})).done((function(t){const i=e('<div class="list-group list-group-flush rounded-0 border"></div>'),s=e('<a href="#" class="list-group-item list-group-item-action text-truncate"></a>');for(const e in t.results){const n=t.results[e],r=s.clone().attr("href",n.url).html(n.title);i.append(r)}if(this.$list.append(i),void 0!==t.more){const i=e(t.more),s=this.generatePager(i);this.$list.append(s)}})).always((function(e){var t=this;window.setTimeout((function(){t.setLoading(!1)}),250)})),this}generatePager(e){const t=e.find(".result-count").text().trim(),i=e.find(".previous").children("a"),s=e.find(".next").children("a"),n=this.$listNavTmpl.clone();n.find(".result-count").html(t);const r=(e,t,i)=>{e.toggleClass("disabled",!i).children("a").attr("href",i?t:"#").attr("tabindex",i?null:"-1").attr("aria-disabled",i?"false":"true")};return r(n.find(".previous"),i.attr("href"),i.length>0),r(n.find(".next"),s.attr("href"),s.length>0),n}}}(window.jQuery)},2783:()=>{(e=>{"use strict";e((()=>{const t=e("#upload-limit-modal");if(!t.length)return;const i=e("#upload-limit-form",t),s=e(".btn-success",t),n=e("input#uploadLimit_value",t),r=bootstrap.Modal.getOrCreateInstance(t);s.on("click",(()=>{i.trigger("submit")})),i.on("submit",(t=>{t.preventDefault(),e.ajax({url:i.attr("action"),type:i.attr("method"),data:i.serialize()}).done(o).fail(a).always((()=>{r.hide()}))}));const o=t=>{e("#upload-limit-card").replaceWith(t);const i=e("#upload-limit-card .alert-success");l(i)},a=()=>{const t=e("#upload-limit-card .alert-danger");l(t)},l=t=>{t.removeClass("d-none").attr("aria-hidden",!1).delay(2500).queue((function(t){const i=e(this);i.slideUp(250,(function(){i.addClass("d-none").attr("aria-hidden",!0)})),t()}))};e("#uploadLimit_type_limited, label[for=uploadLimit_type_limited]",i).on("click",(e=>{n.trigger("focus")}))}))})(jQuery)},3856:()=>{(e=>{"use strict";const t=e("input.password-strength[type=password]");e((()=>new i(t)));class i{constructor(t){t.length&&(this.$form=t.parents("form"),this.$passwordInput=t,this.$confirmInput=e("input.password-confirm",this.$form),this.settings=this.$form.find(".password-strength-settings").get(0).dataset,this.requireStrongPassword=!!JSON.parse(this.settings.requireStrongPassword),this.$form.attr("novalidate","novalidate"),this.$progressBar=this.$form.find(".template").removeAttr("hidden").find(".progress-bar"),this.$passwordInput.on("focus input",this.passwordCheck.bind(this)),this.$form.on("submit",this.submit.bind(this)))}passwordCheck(e){const t=this.$passwordInput.get(0),s=t.value,n=i.score(s,this.settings.username,this.settings);this.$progressBar.css("width",n.strength+"%").attr("aria-valuenow",n.strength).removeClass().addClass((()=>{const e=["progress-bar"];return n.strength<50?e.push("bg-danger"):n.strength<100?e.push("bg-warning"):e.push("bg-success"),e}));const r=this.$progressBar.parent().parent();r.children("ul").remove(),n.strength<100&&r.append(n.message).find("ul").addClass("text-danger"),t.setCustomValidity(n.strength<100?this.settings.notStrong:"")}passwordMatchCheck(){const e=this.$confirmInput.get(0),t=this.$passwordInput.val();e.setCustomValidity(""),t.length&&t!=e.value&&e.setCustomValidity(this.settings.confirmFailure)}submit(e){let t=this.$form.find("input[name=email]").get(0);return t&&t.validity.typeMismatch?(t.reportValidity(),void e.preventDefault()):(t=this.$form.find("input[name=password]").get(0),!t.validity.valid&&this.requireStrongPassword?(t.reportValidity(),void e.preventDefault()):(this.passwordMatchCheck(),t=this.$confirmInput.get(0),t.validity.valid?void 0:(t.reportValidity(),void e.preventDefault())))}static score(e,t,i){var s=0,n=100,r=[],o=e.match(/[a-z]+/),a=e.match(/[A-Z]+/),l=e.match(/[0-9]+/),d=e.match(/[^a-zA-Z0-9]+/);switch(e.length<6&&(r.push(i.tooShort),n-=5*(6-e.length)+30),o||(r.push(i.addLowerCase),s++),a||(r.push(i.addUpperCase),s++),l||(r.push(i.addNumbers),s++),d||(r.push(i.addPunctuation),s++),s){case 1:n-=12.5;break;case 2:n-=25;break;case 3:case 4:n-=40}return""!==e&&e.toLowerCase()===t.toLowerCase()&&(r.push(i.sameAsUsername),n=5),{strength:n,message:r="<ul><li>"+r.join("</li><li>")+"</li></ul>"}}}})(jQuery)},2961:e=>{e.exports={nanoid:(e=21)=>{let t="",i=e;for(;i--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t},customAlphabet:(e,t=21)=>(i=t)=>{let s="",n=i;for(;n--;)s+=e[Math.random()*e.length|0];return s}}}},t={};function i(s){var n=t[s];if(void 0!==n)return n.exports;var r=t[s]={exports:{}};return e[s].call(r.exports,r,r.exports,i),r.exports}i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},i.d=(e,t)=>{for(var s in t)i.o(t,s)&&!i.o(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:t[s]})},i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{"use strict";i(5603),i(5708),i(1306),i(8174),i(5637),i(5905),i(263),i(5964),i(5420),i(8525),i(6981),i(4429),i(1405);var e=i(9429),t=i.n(e),s=i(6116),n=i.n(s),r=i(3121),o=i.n(r);!function(e){function i(i){this.$element=e(i),this.uppy=new(t())({debug:!1,id:"uppy-atom",autoProceed:!1,restrictions:{minNumberOfFiles:1},onBeforeFileAdded:(e,t)=>this.onBeforeFileAddedChecks(e,t)}),this.nextImageNum=1,this.uploadItems=[],this.result="",this.$submitButton=this.$element.find('input[type="submit"]'),this.$cancelButton=this.$element.find('a[title="Cancel"]'),this.$retryButton=e('<a class="btn atom-btn-outline-light" title="retry"/>').attr("type","hidden").text(this.$element.data("multifileupload-i18n-retry")).appendTo(".actions"),this.init(),this.listen()}i.prototype={init:function(){this.$retryButton.hide();let t=this.$element.data("multifileupload-i18n-max-size-note").replace("%{maxFileSizeMessage}",this.$element.data("multifileupload-i18n-max-file-size-message")+this.$element.data("multifileupload-max-file-size")/1024/1024+"MB").replace("%{maxPostSizeMessage}",this.$element.data("multifileupload-i18n-max-post-size-message")+this.$element.data("multifileupload-max-post-size")/1024/1024+"MB");this.uppy.use(o(),{id:"dashboard-atom",inline:!0,target:".uppy-dashboard",width:"100%",height:"400px",hideUploadButton:!0,replaceTargetContent:!0,showProgressDetails:!0,hideCancelButton:!0,hideAfterFinish:!0,hideRetryButton:!0,note:t,doneButtonHandler:null,browserBackButtonClose:!1,fileManagerSelectionType:"files",proudlyDisplayPoweredByUppy:!1,closeModalOnClickOutside:!1,hideDoneButton:!0,locale:{strings:{done:this.$element.data("multifileupload-i18n-save"),addMoreFiles:this.$element.data("multifileupload-i18n-add-more-files"),addMore:this.$element.data("multifileupload-i18n-add-more"),addingMoreFiles:this.$element.data("multifileupload-i18n-adding-more-files"),xFilesSelected:{0:this.$element.data("multifileupload-i18n-file-selected"),1:this.$element.data("multifileupload-i18n-files-selected")},uploading:this.$element.data("multifileupload-i18n-uploading"),complete:this.$element.data("multifileupload-i18n-complete"),uploadFailed:this.$element.data("multifileupload-i18n-upload-failed"),removeFile:this.$element.data("multifileupload-i18n-remove-file"),dropPaste:this.$element.data("multifileupload-i18n-drop-file"),filesUploadedOfTotal:{0:this.$element.data("multifileupload-i18n-file-uploaded-of-total"),1:this.$element.data("multifileupload-i18n-files-uploaded-of-total")},dataUploadedOfTotal:this.$element.data("multifileupload-i18n-data-uploaded-of-total"),xTimeLeft:this.$element.data("multifileupload-i18n-time-left"),uploadingXFiles:{0:this.$element.data("multifileupload-i18n-uploading-file"),1:this.$element.data("multifileupload-i18n-uploading-files")},cancel:this.$element.data("multifileupload-i18n-cancel"),edit:this.$element.data("multifileupload-i18n-edit"),saveChanges:this.$element.data("multifileupload-i18n-save"),back:this.$element.data("multifileupload-i18n-back"),editing:this.$element.data("multifileupload-i18n-editing"),failedToUpload:this.$element.data("multifileupload-i18n-failed-to-upload")}},thumbnailWidth:this.$element.data("multifileupload-thumb-width"),trigger:"#pick-files",metaFields:[{id:"title",name:this.$element.data("multifileupload-i18n-info-object-title")}]}).use(n(),{endpoint:this.$element.data("multifileupload-upload-response-path"),formData:!0,method:"post",limit:10,fieldName:"Filedata",parentSlug:this.$element.data("multifileupload-slug")}).on("upload-success",e.proxy(this.onUploadSuccess,this)).on("complete",e.proxy(this.onComplete,this)).on("file-added",e.proxy(this.onFileAdded,this)).on("cancel-all",e.proxy(this.onCancelAll,this))},listen:function(){this.$submitButton.on("click",e.proxy(this.onSubmitButton,this)),this.$retryButton.on("click",e.proxy(this.onRetryButton,this))},onRetryButton:function(){this.uppy.retryAll().then((e=>{null===this.uppy.getState().error&&e.successful.length>0&&0===e.failed.length&&(this.$retryButton.hide(),this.showAlert(this.$element.data("multifileupload-i18n-retry-success"),"alert-info"))}))},checkUploadSuccessful:function(){return this.uppy.getFiles().some((e=>!0===e.progress.uploadComplete))},onSubmitButton:function(){if(this.clearAlerts(),e(".uppy-DashboardContent-back").length&&e(".uppy-DashboardContent-back").click(),0==this.uppy.getFiles().length)return this.showAlert(this.$element.data("multifileupload-i18n-no-files-error"),"alert-info"),!1;if(this.uppy.getState().error){if(!0!==this.checkUploadSuccessful())return this.showAlert(this.$element.data("multifileupload-i18n-no-successful-files-error"),"alert-danger"),!1;this.$submitButton.attr("disabled","disabled"),this.$cancelButton.removeAttr("href").attr("disabled","disabled"),this.showAlert(this.$element.data("multifileupload-i18n-importing"),"alert-info"),e("#multiFileUploadForm").submit()}else this.uppy.upload().then((t=>{t.failed.length>0?(!0===this.checkUploadSuccessful()?this.showAlert(this.$element.data("multifileupload-i18n-some-files-failed-error"),"alert-danger"):this.showAlert(this.$element.data("multifileupload-i18n-no-successful-files-error"),"alert-danger"),this.$retryButton.show()):(this.$submitButton.attr("disabled","disabled"),this.$cancelButton.removeAttr("href").attr("disabled","disabled"),this.showAlert(this.$element.data("multifileupload-i18n-importing"),"alert-info"),e("#multiFileUploadForm").submit())}));return!1},onUploadSuccess:function(e,t){this.uploadItems.push({file:e,response:t})},onComplete:function(t){var i=this.uploadItems;e.each(t.successful,(function(t,s){var n=i.find((e=>e.file.id===s.id)).response;e('<div class="multiFileUploadItem" id='+s.id+'><div class="multiFileUploadInfo"><div class="form-item"><input type="hidden" class="filename" value="'+n.body.name+'"/><input type="hidden" class="md5sum" value="'+n.body.md5sum+'"/><input type="hidden" name="files['+s.id+'][name]" value="'+n.body.name+'"/><input type="hidden" name="files['+s.id+'][md5sum]" value="'+n.body.md5sum+'"/><input type="hidden" name="files['+s.id+'][tmpName]" value="'+n.body.tmpName+'"/><input type="hidden" class="title" name="files['+s.id+'][infoObjectTitle]" value="'+s.meta.title+'"/></div></div></div>').appendTo("#uploads")}))},onBeforeFileAddedChecks:function(t,i){if(t.data.size>this.$element.data("multifileupload-max-file-size")){let i=t.data.name,s=this.$element.data("multifileupload-max-file-size")/1024/1024,n=(t.data.size/1024/1024).toFixed(2),r=this.$element.data("multifileupload-i18n-size-error").replace("%{fileName}",i).replace("%{fileSize}",n).replace("%{maxSize}",s);return this.uppy.log(r),this.showAlert(r,"alert-info"),e(".uppy-DashboardContent-back").length&&e(".uppy-DashboardContent-back").click(),!1}if(this.getTotalFileSize(i)+t.data.size>this.$element.data("multifileupload-max-post-size")){let t=this.$element.data("multifileupload-max-post-size")/1024/1024,i=this.$element.data("multifileupload-i18n-post-size-error").replace("%{maxPostSize}",t);return this.clearAlerts(),this.uppy.log(i),this.showAlert(i,"alert-info"),e(".uppy-DashboardContent-back").length&&e(".uppy-DashboardContent-back").click(),!1}},getTotalFileSize:function(e){let t=0;for(var i in e||(e=this.uppy.getFiles()),e)t+=e[i].size;return t},onFileAdded:function(t){this.uppy.setFileMeta(t.id,{parentSlug:this.$element.data("multifileupload-slug"),title:this.replacePlaceHolder(e("input#title").val(),this.nextImageNum++)})},reset:function(){this.uploadItems=[],this.nextImageNum=1},onCancelAll:function(){for(uploads=document.getElementById("uploads");uploads.firstChild;)uploads.removeChild(uploads.lastChild);this.reset()},showAlert:function(t,i){return i||(i="alert-info"),e('<div class="alert '+i+' alert-dismissible fade show" role="alert">').append(t).append('<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="'+this.$element.data("multifileupload-i18n-alert-close")+'"></button>').prependTo(e("#uploaderContainer"))},clearAlerts:function(){e("div#uploaderContainer > div").remove(".alert")},replacePlaceHolder:function(e,t){var i=null;t=String(t);var s=e.match(/\%(d+)\%/);if(null!=s&&0<s[1].length){for(;s[1].length>t.length;)t="0"+t;i=e.replace("%"+s[1]+"%",t)}return null!=i&&e!=i||(i=e+" "+t),i}},e((function(){var t=e(".multifileupload-form");t.length&&new i(t.get(0))}))}(jQuery);var a=i(3824),l=i.n(a);(e=>{e((()=>{e("body.edit.show-edit-tooltips [id$=-help]").each(((t,i)=>{e(i).prevAll(":not([type=hidden]):first").attr({title:i.textContent.trim(),"data-bs-toggle":"tooltip","data-bs-trigger":"focus","data-bs-placement":"left"})})),e("[data-bs-toggle=tooltip]").each(((e,t)=>new(l())(t)))}))})(jQuery),i(8859),i(6654),i(4353),i(3744),i(5008),function(e){class t{constructor(t){this.$element=t,this.$menuHeaderCount=this.$element.closest("li").find("#counts-block"),this.onClipboardPage=e("body").is(".clipboard.view"),this.storage=localStorage,this.types=["informationObject","actor","repository"],this.initialItems={informationObject:[],actor:[],repository:[]},this.items=JSON.parse(this.storage.getItem("clipboard"))||this.initialItems,this.exportTokens=JSON.parse(this.storage.getItem("exportTokens"))||[],this.init()}init(){e(document).on("click","button.clipboard",this.toggle.bind(this)),e(document).on("click","button#clipboard-clear, li#node_clearClipboard a",this.clear.bind(this)),e(document).on("click","a#clipboard-save, li#node_saveClipboard a",this.save.bind(this)),e(document).on("click","button#clipboard-send",this.send.bind(this)),e(document).on("submit","#clipboard-load-form",this.load.bind(this)),e(document).on("submit","#clipboard-export-form",this.export.bind(this)),e(document).on("click",".clipboard-all, .clipboard-none",this.toggleAll.bind(this)),this.updateCounts(),this.onClipboardPage?this.loadClipboardContent():this.updateAllButtons(),this.checkExports()}load(t){t.preventDefault();var i=e(t.target),s=i.find("select#mode").val();e.ajax({url:i.attr("action"),type:"POST",cache:!1,data:i.serialize(),context:this,success:function(e){"merge"===s?this.types.map((function(t){e.clipboard[t]&&e.clipboard[t].map((function(e){-1===this.items[t].indexOf(e)&&this.items[t].push(e)}),this)}),this):"replace"===s&&(this.items=e.clipboard),this.storage.setItem("clipboard",JSON.stringify(this.items)),this.updateCounts(),this.showAlert(e.success,"alert-info")},error:function(e){var t=JSON.parse(e.responseText);this.showAlert(t.error,"alert-danger")}})}loadClipboardContent(){var t=new URL(window.location.href),i=t.searchParams.get("type");i&&this.types.includes(i)||(i="informationObject"),e.ajax({url:t,type:"POST",cache:!1,data:{slugs:this.items[i]},context:this,success:function(t){e("body > #wrapper").replaceWith(e(t).filter("#wrapper")),Drupal.attachBehaviors("#wrapper"),this.updateAllButtons()},error:function(){this.showAlert(this.$element.data("load-alert-message"),"alert-danger")}})}save(t){t.preventDefault(),0===this.items.informationObject.length&&0===this.items.actor.length&&0===this.items.repository.length||e.ajax({url:e(t.target).closest("a").attr("href"),type:"POST",cache:!1,data:{slugs:this.items},context:this,success:function(e){this.showAlert(e.success,"alert-info")},error:function(e){var t=JSON.parse(e.responseText);this.showAlert(t.error,"alert-danger")}})}send(t){var i=e(t.target);if(0===this.items.informationObject.length&&0===this.items.actor.length&&0===this.items.repository.length)return void this.showAlert(i.data("empty-message"),"alert-danger");let s=e("<form />",{id:"sendForm",action:i.data("url"),method:i.data("method")}),n=e("<input />",{type:"hidden",name:"base_url",value:i.data("site-base-url")});if(s.append(n),0!==this.items.informationObject.length){let t=e("<input />",{type:"hidden",name:"information_object_slugs",value:JSON.stringify(this.items.informationObject)});s.append(t)}if(0!==this.items.actor.length){let t=e("<input />",{type:"hidden",name:"actor_slugs",value:JSON.stringify(this.items.actor)});s.append(t)}if(0!==this.items.repository.length){let t=e("<input />",{type:"hidden",name:"repository_slugs",value:JSON.stringify(this.items.repository)});s.append(t)}this.showAlert(i.data("message"),"alert-info"),s.appendTo(document.body),s.submit()}export(t){t.preventDefault();var i=e(t.target),s=i.find("select#type").val();if(0!==this.items[s].length){var n=i.serializeArray();this.items[s].map((function(e){n.push({name:"slugs[]",value:e})})),e.ajax({url:i.attr("action"),type:"POST",cache:!1,data:n,context:this,success:function(e){this.showAlert(e.success,"alert-info"),e.token&&(this.exportTokens.push(e.token),this.storage.setItem("exportTokens",JSON.stringify(this.exportTokens)))},error:function(e){var t=JSON.parse(e.responseText);this.showAlert(t.error,"alert-danger")}})}else this.showAlert(this.$element.data("export-alert-message"),"alert-danger")}checkExports(){0!==this.exportTokens.length&&e.ajax({url:this.$element.data("export-check-url"),type:"POST",cache:!1,data:{tokens:this.exportTokens},context:this,success:function(e){e.alerts&&e.alerts.map((function(e){this.showAlert(e.message,"alert-"+e.type,e.deleteUrl)}),this),e.missingTokens&&(e.missingTokens.map((function(e){var t=this.exportTokens.indexOf(e);-1!==t&&this.exportTokens.splice(t,1)}),this),this.storage.setItem("exportTokens",JSON.stringify(this.exportTokens)))},error:function(e){var t=JSON.parse(e.responseText);this.showAlert(t.error,"alert-danger")}})}toggle(t){"function"==typeof t.preventDefault&&t.preventDefault(),this.items=JSON.parse(this.storage.getItem("clipboard"))||this.initialItems;var i=e(t.target).closest("button"),s=i.data("clipboard-type"),n=i.data("clipboard-slug"),r=this.items[s].indexOf(n);-1===r?(this.items[s].push(n),this.updateButton(i,!0)):(this.items[s].splice(r,1),this.updateButton(i,!1)),this.storage.setItem("clipboard",JSON.stringify(this.items)),this.updateCounts()}toggleAll(t){t.preventDefault();var i=e(t.target).hasClass("clipboard-all");e("button.clipboard").each(((t,s)=>{var n=e(s),r=n.hasClass("active");(!r&&i||r&&!i)&&n.trigger("click")}))}clear(t){t.preventDefault(),this.showRemoveAlert();var i=e(t.target).data("clipboard-type");i&&this.types.includes(i)?this.items[i]=[]:this.items=this.initialItems,this.storage.setItem("clipboard",JSON.stringify(this.items)),this.updateCounts(),this.updateAllButtons()}updateButton(e,t){var i=null!=e.data("tooltip");if(!e.hasClass("active")&&t||e.hasClass("active")&&!t){var s=e.data("title"),n=e.data("alt-title");e.data("alt-title",s),e.data("title",n),e.find("span").text(n),e.toggleClass("active"),i&&l().getOrCreateInstance(e).dispose(),t||this.showRemoveAlert()}i&&l().getOrCreateInstance(e,{title:e.data("title"),placement:"left"})}updateCounts(){var e=this.items.informationObject.length,t=this.items.actor.length,i=this.items.repository.length,s=e+t+i,n=this.$element.find("> span.clipboard-count");!n.length&&s>0?this.$element.append('<span class="clipboard-count position-absolute top-0 start-0 badge rounded-pill bg-primary">'+s+'<span class="visually-hidden">'+this.$element.data("total-count-label")+"</span></span>"):s>0?n.text(s):n.length&&n.remove();var r=this.$menuHeaderCount.data("information-object-label");r+=" count: "+e+"<br />",r+=this.$menuHeaderCount.data("actor-object-label"),r+=" count: "+t+"<br />",r+=this.$menuHeaderCount.data("repository-object-label"),r+=" count: "+i+"<br />",this.$menuHeaderCount.html(r)}updateAllButtons(){var t=this;e("button.clipboard").each((function(){var i=e(this),s=i.data("clipboard-type"),n=i.data("clipboard-slug"),r=-1!==t.items[s].indexOf(n);t.updateButton(i,r)}))}showAlert(t,i,s){i||(i="");var n=e('<div class="alert '+i+' alert-dismissible fade show" role="alert">').append(t),r='<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="'+this.$element.data("alert-close")+'"></button>';return s?n.append('<a href="'+s+'">'+r+"</a>"):n.append(r),n.prependTo(e("body > #wrapper")),window.scrollTo({top:0}),n}showRemoveAlert(){this.onClipboardPage&&0==e("body > #wrapper > .alert-clipboard-remove").length&&this.showAlert(this.$element.data("delete-alert-message"),"alert-danger alert-clipboard-remove")}}e((()=>{var i=e("#clipboard-menu");i.length&&new t(i)}))}(jQuery),i(2672),i(5796),i(8445),i(2783),i(9715),i(2145),i(8992),i(4185),i(6140),i(3856),i(229),i(9318),i(9036),i(1613),i(8567),i(5630),i(4629),i(3350),i(3044),i(6631)})()})();
//# sourceMappingURL=arDominionB5Plugin.bundle.7522e096e2153c557e7c.js.map