1!function(){function t(t){return t&&t.__esModule?t.default:t}function e(t,e,n,r,a,o,i){try{var l=t[o](i),u=l.value}catch(t){return void n(t)}l.done?e(u):Promise.resolve(u).then(r,a)}function n(t){return function(){var n=this,r=arguments;return new Promise((function(a,o){var i=t.apply(n,r);function l(t){e(i,a,o,l,u,"next",t)}function u(t){e(i,a,o,l,u,"throw",t)}l(void 0)}))}}function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function o(t,e,n){return e&&a(t.prototype,e),n&&a(t,n),t}function i(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var l,u=function(){"use strict";function t(){r(this,t)}return o(t,null,[{key:"toBoolean",value:function(t){return"boolean"==typeof t?t:"true"===t}}]),t}(),s=function(){"use strict";function t(){r(this,t)}return o(t,[{key:"error",value:function(t){console.error(t)}}],[{key:"getLogger",value:function(){return void 0===l&&(l=new t),l}}]),t}();let c=t=>crypto.getRandomValues(new Uint8Array(t)),h=(t,e)=>((t,e,n)=>{let r=(2<<Math.log(t.length-1)/Math.LN2)-1,a=-~(1.6*r*e/t.length);return()=>{let o="";for(;;){let i=n(a),l=a;for(;l--;)if(o+=t[i[l]&r]||"",o.length===e)return o}}})(t,e,c);var d=function(){"use strict";function t(){r(this,t)}return o(t,null,[{key:"toHtmlId",value:function(t){return t.toString().replace(/[_.\s:\/\\]/g,"-")}},{key:"createRandomId",value:function(){return h("abcdefghijklmnopqrstuvwxyz",10)()}},{key:"toEntities",value:function(t){for(var e=[],n=0;n<t.length;n++){var r="&#".concat(t[n].charCodeAt(),";");e.push(r)}return e.join("")}}]),t}(),f=function(){"use strict";function t(e){r(this,t),i(this,"tab","unknown"),i(this,"mutable",!0),i(this,"values",[]),i(this,"defaultValues",[]),i(this,"multiple",!1),i(this,"children",{}),this.name=e}return o(t,[{key:"getLabelAnchor",value:function(){if(void 0===this.getUrl()&&void 0===this.getDescription())return this.getLabel();var t=this.getUrl();return void 0===this.getUrl()?(t="#",'\n<span class="d-inline-block" tabindex="0" data-bs-toggle="tooltip" title="'.concat(this.getDescription(),'">\n <a href="').concat(t,'" title="').concat(this.getDescription(),'" style="text-decoration:none;pointer-events: none;">').concat(this.getLabel(),"</a>\n</span>")):'<a href="'.concat(t,'" title="').concat(this.getDescription(),'" data-bs-toggle="tooltip" style="text-decoration:none" target="_blank">').concat(this.getLabel(),"</a>")}},{key:"setType",value:function(t){return this.type=t,this}},{key:"setLabel",value:function(t){return this.label=t,this}},{key:"setUrl",value:function(t){return this.url=t,this}},{key:"addValue",value:function(t,e){return this.values.push(t),this.defaultValues.push(e),this}},{key:"getType",value:function(){return this.type}},{key:"getLabel",value:function(){return void 0===this.label?this.getName().split(/_|-/).map((function(t){return t.charAt(0).toUpperCase()+t.slice(1)})).join(" "):this.label}},{key:"getUrl",value:function(){return this.url}},{key:"getName",value:function(){return this.name}},{key:"getDescription",value:function(){return this.description}},{key:"getTab",value:function(){return this.tab}},{key:"setMultiple",value:function(t){return this.multiple=t,this}},{key:"setParent",value:function(t){return this.parent=t,this}},{key:"isMutable",value:function(){return this.mutable}},{key:"setTab",value:function(t){return this.tab=t,this}},{key:"setMutable",value:function(t){return this.mutable=u.toBoolean(t),this}},{key:"setDescription",value:function(t){return this.description=t,this}},{key:"getDefaultValue",value:function(){return this.defaultValues[0]}},{key:"getValue",value:function(){return this.values[0]}},{key:"getDomainValues",value:function(){return this.domainValues}},{key:"setDomainValues",value:function(t){if(Array.isArray(t))return this.domainValues=t,this;console.error("The domains values should be an array. (".concat(t,") is not an array"))}},{key:"setControlWidth",value:function(t){return this.width=t,this}},{key:"getControlWidth",value:function(){return void 0===this.width&&void 0!==this.parent?12/this.parent.getChildren().length:this.width}},{key:"getValues",value:function(){return this.values}},{key:"getDefaultValues",value:function(){return this.defaultValues}},{key:"getChildren",value:function(){return Object.values(this.children)}},{key:"addChild",value:function(t){return this.children[t.getName()]=t,this}},{key:"toHtmlLabel",value:function(e,n){var r=this.getLabelAnchor(),a="";return a=this.getType()===t.BOOLEAN?"form-check-label":"col-form-label",void 0!==n&&(a="".concat(n," ").concat(a)),'<label for="'.concat(e,'" class="').concat(a,'">').concat(r,"</label>")}},{key:"toHtmlControl",value:function(e,n,r){var a,o,i=void 0===n?null:n,l=void 0===r?null:r,u=this.getType(),s=this.isMutable(),c=this.getDomainValues();if(void 0!==c){o="select";var h="";void 0!==l&&(h=" (".concat(l,")"));var f="";this.getMultiple()&&(f="multiple"),o='<select class="form-select" aria-label="'.concat(this.getLabel(),'" name="').concat(this.getName(),'" id="').concat(e,'" ').concat(f,">");var v="";null===i&&(v="selected"),o+='<option value="" '.concat(v,">Default").concat(h,"</option>");var y=!0,m=!1,g=void 0;try{for(var p,b=c[Symbol.iterator]();!(y=(p=b.next()).done);y=!0){var k=p.value;v=k===i?"selected":"",o+='<option value="'.concat(k,'" ').concat(v,">").concat(k,"</option>")}}catch(t){m=!0,g=t}finally{try{y||null==b.return||b.return()}finally{if(m)throw g}}return o+="</select>"}var w="No value";s&&(w="Enter a ".concat(this.getLabel())),null!=l&&(w="string"==typeof l||l instanceof String?d.toEntities(l):l);var L='placeholder="'.concat(w,'"'),E="",T=void 0,x=this.getName();a=void 0!==s&&!1===s?"disabled":"";var C="input",O="form-control",F="",B=3;switch(u){case t.DATE_TIME:T="datetime-local",null!==i?(i=i.slice(0,19),E='value="'.concat(i,'"')):s||null===l||(l=l.slice(0,19),E='value="'.concat(l,'"')),L="";break;case t.PARAGRAPH:C="textarea",null!==i&&(i=d.toEntities(i),E="".concat(i));break;case t.JSON:C="textarea",null!==i&&(i=JSON.stringify(JSON.parse(i),null,2),i=d.toEntities(i),E="".concat(i)),B=15;break;case t.BOOLEAN:T="checkbox",O="form-check-input",null!==l?(E='value="'.concat(l,'"'),i===l&&(F="checked")):"on"===i&&(F="checked"),L="";break;default:T="text",null!=i&&(E='value="'.concat(i,'"'))}if("textarea"===C)o='<textarea id="'.concat(e,'" name="').concat(x,'" class="').concat(O,'" rows="').concat(B,'" ').concat(L," ").concat(a,">").concat(E,"</textarea>");else o='<input type="'.concat(T,'" name="').concat(x,'" class="').concat(O,'" id="').concat(e,'" ').concat(L," ").concat(E," ").concat(F," ").concat(a,"/>");return o}},{key:"toJavascriptObject",value:function(){return{name:this.getName(),label:this.getLabel(),type:this.getType(),description:this.getDescription(),tab:this.getTab(),mutable:this.isMutable(),value:this.getValue(),default:this.getDefaultValue(),url:this.getUrl()}}},{key:"getMultiple",value:function(){return this.multiple}}],[{key:"createFromJson",value:function(e,n){var r=void 0===n?null:n;e.hasOwnProperty("name")||s.getLogger().error("To create a form meta field, the name property is mandatory.");var a,o,i=e.name,l=t.createFromName(i);for(var u in null!=r&&l.setParent(r),e)if(e.hasOwnProperty(u)){var c=e[u];switch(u){case"name":continue;case"label":l.setLabel(c);continue;case"tab":l.setTab(c);continue;case"type":l.setType(c);continue;case"mutable":l.setMutable(c);continue;case"description":l.setDescription(c);continue;case"url":l.setUrl(c);continue;case"value":a=c;continue;case"default":o=c;continue;case"domain-values":l.setDomainValues(c);continue;case"multiple":l.setMultiple(c);continue;case"width":l.setControlWidth(c);continue;case"children":var h=c;for(var d in h)if(h.hasOwnProperty(d)){var f=t.createFromJson(h[d],l);l.addChild(f)}continue;default:s.getLogger().error("The property (".concat(u,") of the form (").concat(i,") is unknown"))}}return Array.isArray(a)?a.forEach((function(t,e){var n=o[e];void 0!==n?l.addValue(t,n):l.addValue(t)})):l.addValue(a,o),l}},{key:"createFromName",value:function(e){return new t(e)}}]),t}();i(f,"TABULAR_TYPE","tabular"),i(f,"DATE_TIME","datetime"),i(f,"PARAGRAPH","paragraph"),i(f,"BOOLEAN","boolean"),i(f,"JSON","json");var v=function(){"use strict";function t(e){r(this,t),this.name=e}return o(t,[{key:"getName",value:function(){return this.name}},{key:"setWidth",value:function(t){this.width=t}},{key:"getWidth",value:function(){return this.width}},{key:"setLabel",value:function(t){return this.label=t,this}},{key:"getLabel",value:function(){return void 0===this.label?this.name:this.label}},{key:"setWidthField",value:function(t){return this.widthField=t,this}},{key:"setWidthLabel",value:function(t){return this.widthLabel=t,this}},{key:"getLabelWidth",value:function(){return void 0===this.widthLabel?3:this.widthLabel}},{key:"getFieldWidth",value:function(){return void 0===this.widthField?12-this.getLabelWidth():this.widthField}}],[{key:"createFromJson",value:function(e){e.hasOwnProperty("name")||s.getLogger().error("A name property is mandatory to create a tab and was not found in the json provided");var n=e.name,r=new t(n);for(var a in e)if(e.hasOwnProperty(a)){var o=e[a];switch(a){case"name":continue;case"label":r.setLabel(o);continue;case"width-field":r.setWidthField(o);continue;case"width-label":r.setWidthLabel(o);continue;default:s.getLogger().error("The property (".concat(a,") of the tab (").concat(n,") is unknown"))}}return r}},{key:"createFromName",value:function(e){return new t(e)}}]),t}(),y=function(){function t(e){if(r(this,t),i(this,"formFields",{}),i(this,"tabs",{}),i(this,"width",8),null==e)throw new Error("The if of the form should not be null");this.name=e}return o(t,[{key:"getLabel",value:function(){return this.label}},{key:"getUrl",value:function(){return this.url}},{key:"getId",value:function(){return this.name}},{key:"getControlWidth",value:function(){return this.width}},{key:"getLabelWidth",value:function(){return 12-this.getControlWidth()}},{key:"addFormField",value:function(t){return this.formFields[t.getName()]=t,this.tabs.hasOwnProperty(t.getTab())||(this.tabs[t.getTab()]=v.createFromName(t.getTab())),this}},{key:"getFields",value:function(){return Object.values(this.formFields)}},{key:"getTabs",value:function(){return Object.values(this.tabs)}},{key:"addTab",value:function(t){this.tabs[t.getName()]=t}},{key:"valueOf",value:function(){return this.getId()}},{key:"getFieldsForTab",value:function(t){return this.getFields().filter((function(e){return e.getTab()===t}))}},{key:"toHtmlElement",value:function(){var t,e,n=this.getId(),r='<ul class="nav nav-tabs mb-3">';this.getTabPaneId=function(t){var e=d.toHtmlId(t.getName());return"".concat(n,"-tab-pane-").concat(e)},this.getTabNavId=function(t){var e=d.toHtmlId(t.getName());return"".concat(n,"-tab-nav-").concat(e)},this.getControlId=function(t){var e=d.toHtmlId(t);return"".concat(n,"-control-").concat(e)};var a=this.getTabs(),o=a[0],i=!0,l=!1,u=void 0;try{for(var s=a[Symbol.iterator]();!(i=(D=s.next()).done);i=!0){var c=D.value;Object.is(c,o)?(t="active",e="true"):(t="",e="false");var h=c.getLabel(),f=this.getTabPaneId(c),v=this.getTabNavId(c);r+='\n<li class="nav-item">\n<button\n class="nav-link '.concat(t,'"\n id="').concat(v,'"\n type="button"\n role="tab"\n aria-selected = "').concat(e,'"\n aria-controls = "').concat(f,'"\n data-bs-toggle = "tab"\n data-bs-target = "#').concat(f,'" >').concat(h,"\n </button>\n</li>")}}catch(t){l=!0,u=t}finally{try{i||null==s.return||s.return()}finally{if(l)throw u}}r+="</ul>";var y='<div class="tab-content">',m=void 0,g=void 0,p=0,b=!0,k=!1,w=void 0;try{for(var L,E=a[Symbol.iterator]();!(b=(L=E.next()).done);b=!0){c=L.value;var T=this.getTabPaneId(c);v=this.getTabNavId(c);y+='<div class="tab-pane '.concat(t=c===o?"active":"",'" id="').concat(T,'" role="tabpanel" aria-labelledby="').concat(v,'">'),g=c.getLabelWidth(),m=c.getFieldWidth();var x=this.getFieldsForTab(c.getName());if(1===x.length)if(0===(I=x[0]).getChildren().length){p++;var C=this.getControlId(p),O=I.toHtmlLabel(C),F=I.getValue(),B=I.getDefaultValue(),M=I.toHtmlControl(C,F,B);y+='\n<div class="row mb-3 text-center"><div class="col-sm-12">'.concat(O,'</div></div>\n<div class="row mb-3"><div class="col-sm-12">').concat(M,"</div></div>\n"),y+="</div>";continue}i=!0,l=!1,u=void 0;try{var A;for(s=x[Symbol.iterator]();!(i=(A=s.next()).done);i=!0){var I;if(0===(I=A.value).getChildren().length){p++;C=this.getControlId(p),O=I.toHtmlLabel(C,"col-sm-".concat(g)),F=I.getValue(),B=I.getDefaultValue(),M=I.toHtmlControl(C,F,B);y+='\n<div class="row mb-3">\n '.concat(O,'\n <div class="col-sm-').concat(m,'">').concat(M,"</div>\n</div>\n")}else{var H=I.getLabelAnchor();y+='<div class="row mb-3 text-center">'.concat(H,"</div>"),y+='<div class="row mb-3">';var S=0;i=!0,l=!1,u=void 0;try{var N;for(s=I.getChildren()[Symbol.iterator]();!(i=(N=s.next()).done);i=!0){var P=(V=N.value).getControlWidth();y+='<div class="col-sm-'.concat(P,' text-center">'),y+=V.getLabelAnchor(),y+="</div>";var j=V.getValues().length;j>S&&(S=j)}}catch(t){l=!0,u=t}finally{try{i||null==s.return||s.return()}finally{if(l)throw u}}y+="</div>";for(var R=0;R<S;R++){y+='<div class="row mb-3">';i=!0,l=!1,u=void 0;try{var D;for(s=I.getChildren()[Symbol.iterator]();!(i=(D=s.next()).done);i=!0){var V;F=(V=D.value).getValues()[R],B=V.getDefaultValues()[R];p++;C=this.getControlId(p),P=V.getControlWidth();y+='<div class="col-sm-'.concat(P,'">'),y+=V.toHtmlControl(C,F,B),y+="</div>"}}catch(t){l=!0,u=t}finally{try{i||null==s.return||s.return()}finally{if(l)throw u}}y+="</div>"}}}}catch(t){l=!0,u=t}finally{try{i||null==s.return||s.return()}finally{if(l)throw u}}y+="</div>"}}catch(t){k=!0,w=t}finally{try{b||null==E.return||E.return()}finally{if(k)throw w}}y+="</div>";var W=document.createElement("form");return W.setAttribute("id",n),W.innerHTML="".concat(r," ").concat(y),W}},{key:"setControlWidth",value:function(t){return this.width=t,this}},{key:"setLabel",value:function(t){this.label=t}},{key:"setUrl",value:function(t){this.url=t}}],[{key:"createFromJson",value:function(e,n){var r=t.createFromId(e);for(var a in n)if(n.hasOwnProperty(a)){var o=n[a];switch(a){case"fields":var i=o;for(var l in i)i.hasOwnProperty(l)&&r.addFormField(f.createFromJson(i[l]));continue;case"tabs":var u=o;for(var c in u)u.hasOwnProperty(c)&&r.addTab(v.createFromJson(u[c]));break;case"width":r.setControlWidth(o);break;case"label":r.setLabel(o);break;case"url":r.setUrl(o);break;default:s.getLogger().error("The form property (".concat(a,") is unknown"))}}return r}},{key:"createFromId",value:function(e){return new t(e)}}]),t}(),m={};m=bootstrap;var g={},p=function(){"use strict";function t(e){r(this,t),i(this,"footerButtons",[]),i(this,"bodies",[]),i(this,"isBuild",!1),this.modalId=e;var n=document.getElementById(e);null!==n?(s.getLogger().error("The id (".concat(e,") given to create a modal was already used by an element in the DOM. We have reused it.")),this.modalRootHtmlElement=n,this.reset()):(this.modalRootHtmlElement=document.createElement("div"),this.modalRootHtmlElement.setAttribute("id",this.modalId),this.modalRootHtmlElement.classList.add("modal","fade"),this.modalRootHtmlElement.setAttribute("aria-hidden","true"))}return o(t,[{key:"setHeader",value:function(t){return this.headerText=t,this}},{key:"addBody",value:function(t){return this.bodies.push(t),this}},{key:"resetOnClose",value:function(){return this.isResetOnClose=!0,this}},{key:"addFooterButton",value:function(t){return this.footerButtons.push(t),this}},{key:"addFooterCloseButton",value:function(t){var e=void 0===t?"Close":t;this.closeButton=document.createElement("button"),this.closeButton.classList.add("btn","btn-secondary"),this.closeButton.innerHTML=e;var n=this;return this.closeButton.addEventListener("click",(function(){n.bootStrapModal.hide()})),this.addFooterButton(this.closeButton),this}},{key:"centered",value:function(){return this.isCentered=!0,this}},{key:"show",value:function(){if(null==this.modalRootHtmlElement)throw new Error("This modal has no HTML element, you can't use it anymore");if(this.isBuild||this.build(),!0===this.isResetOnClose){var t=this;this.getElement().addEventListener("hidden.bs.modal",(function(){t.reset()}))}if(void 0!==this.callBack&&void 0!==this.closeButton){var e=this;this.closeButton.addEventListener("click",(function(){e.dismissHide(),e.callBack()}))}this.bootStrapModal.show()}},{key:"dismissHide",value:function(){void 0!==this.bootStrapModal&&this.bootStrapModal.hide()}},{key:"getModalId",value:function(){return this.modalId}},{key:"setCallBackOnClose",value:function(t){return this.callBack=t,this}},{key:"getElement",value:function(){return this.modalRootHtmlElement}},{key:"wasBuild",value:function(){return this.isBuild}},{key:"resetIfBuild",value:function(){return this.wasBuild()&&this.reset(),this}},{key:"reset",value:function(){this.modalRootHtmlElement.querySelectorAll('[data-bs-toggle="tab"]').forEach((function(t){var e=m.Tab.getInstance(t);null!==e&&e.dispose()})),void 0!==this.bootStrapModal&&this.dismissHide(),this.modalRootHtmlElement.innerHTML="",this.isBuild=!1,this.bodies=[],this.footerButtons=[],this.headerText=void 0}},{key:"build",value:function(){this.isBuild=!0,document.body.appendChild(this.modalRootHtmlElement);var t=document.createElement("div");if(t.classList.add("modal-dialog","modal-dialog-scrollable","modal-fullscreen-md-down","modal-lg"),this.isCentered&&t.classList.add("modal-dialog-centered"),t.style.setProperty("margin","5rem auto"),t.style.setProperty("height","calc(100% - 9rem)"),this.modalRootHtmlElement.appendChild(t),this.modalContent=document.createElement("div"),this.modalContent.classList.add("modal-content"),t.appendChild(this.modalContent),this.modalBody=document.createElement("div"),this.modalBody.classList.add("modal-body"),this.modalContent.appendChild(this.modalBody),this.bootStrapModal=m.Modal.getInstance(this.modalRootHtmlElement),null===this.bootStrapModal){this.bootStrapModal=new m.Modal(this.modalRootHtmlElement,{backdrop:!0,keyboard:!0,focus:!0})}if(void 0!==this.headerText){var e='\n<div class="modal-header">\n <h5 class="modal-title">'.concat(this.headerText,'</h5>\n <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>\n</div>\n');this.modalContent.insertAdjacentHTML("afterbegin",e)}var n,r=!0,a=!1,o=void 0;try{for(var i,l=this.bodies[Symbol.iterator]();!(r=(i=l.next()).done);r=!0){var u=i.value;if("string"===(void 0===u?"undefined":(n=u)&&n.constructor===Symbol?"symbol":typeof n))this.modalBody.insertAdjacentHTML("beforeend",u);else this.modalBody.appendChild(u)}}catch(t){a=!0,o=t}finally{try{r||null==l.return||l.return()}finally{if(a)throw o}}var s=document.createElement("div");s.classList.add("modal-footer"),this.modalContent.appendChild(s),0===this.footerButtons.length&&this.addFooterCloseButton();var c=!0,h=!1,d=void 0;try{for(var f,v=this.footerButtons[Symbol.iterator]();!(c=(f=v.next()).done);c=!0){var y=f.value;"string"==typeof y||y instanceof String?s.insertAdjacentHTML("beforeend",y):s.appendChild(y)}}catch(t){h=!0,d=t}finally{try{c||null==v.return||v.return()}finally{if(h)throw d}}var g="#".concat(this.modalId,' [data-bs-toggle="tooltip"]');document.querySelectorAll(g).forEach((function(t){return new m.Tooltip(t)}))}}],[{key:"createFromId",value:function(e){var n=new t(e);return g[e]=n,n}},{key:"createTemporary",value:function(){return this.createFromId(d.createRandomId())}},{key:"getOrCreate",value:function(e){var n=t.getModal(e);return null===n&&(n=t.createFromId(e)),n}}]),t}();i(p,"getModal",(function(t){return t in g?g[t]:null})),i(p,"listModals",(function(){console.log(Object.keys(g).join(", "))})),i(p,"resetAllModals",(function(){for(var t in g)if(g.hasOwnProperty(t)){g[t].reset()}}));var b={},k=function(t){var e,n=Object.prototype,r=n.hasOwnProperty,a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function u(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,n){return t[e]=n}}function s(t,e,n,r){var a=e&&e.prototype instanceof m?e:m,o=Object.create(a.prototype),i=new F(r||[]);return o._invoke=function(t,e,n){var r=h;return function(a,o){if(r===f)throw new Error("Generator is already running");if(r===v){if("throw"===a)throw o;return M()}for(n.method=a,n.arg=o;;){var i=n.delegate;if(i){var l=x(i,n);if(l){if(l===y)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===h)throw r=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=f;var u=c(t,e,n);if("normal"===u.type){if(r=n.done?v:d,u.arg===y)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r=v,n.method="throw",n.arg=u.arg)}}}(t,n,i),o}function c(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=s;var h="suspendedStart",d="suspendedYield",f="executing",v="completed",y={};function m(){}function g(){}function p(){}var b={};u(b,o,(function(){return this}));var k=Object.getPrototypeOf,w=k&&k(k(B([])));w&&w!==n&&r.call(w,o)&&(b=w);var L=p.prototype=m.prototype=Object.create(b);function E(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function T(t,e){function n(a,o,i,l){var u=c(t[a],t,o);if("throw"!==u.type){var s=u.arg,h=s.value;return h&&"object"==typeof h&&r.call(h,"__await")?e.resolve(h.__await).then((function(t){n("next",t,i,l)}),(function(t){n("throw",t,i,l)})):e.resolve(h).then((function(t){s.value=t,i(s)}),(function(t){return n("throw",t,i,l)}))}l(u.arg)}var a;this._invoke=function(t,r){function o(){return new e((function(e,a){n(t,r,e,a)}))}return a=a?a.then(o,o):o()}}function x(t,n){var r=t.iterator[n.method];if(r===e){if(n.delegate=null,"throw"===n.method){if(t.iterator.return&&(n.method="return",n.arg=e,x(t,n),"throw"===n.method))return y;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return y}var a=c(r,t.iterator,n.arg);if("throw"===a.type)return n.method="throw",n.arg=a.arg,n.delegate=null,y;var o=a.arg;return o?o.done?(n[t.resultName]=o.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,y):o:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,y)}function C(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function O(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function F(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(C,this),this.reset(!0)}function B(t){if(t){var n=t[o];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,i=function n(){for(;++a<t.length;)if(r.call(t,a))return n.value=t[a],n.done=!1,n;return n.value=e,n.done=!0,n};return i.next=i}}return{next:M}}function M(){return{value:e,done:!0}}return g.prototype=p,u(L,"constructor",p),u(p,"constructor",g),g.displayName=u(p,l,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,u(t,l,"GeneratorFunction")),t.prototype=Object.create(L),t},t.awrap=function(t){return{__await:t}},E(T.prototype),u(T.prototype,i,(function(){return this})),t.AsyncIterator=T,t.async=function(e,n,r,a,o){void 0===o&&(o=Promise);var i=new T(s(e,n,r,a),o);return t.isGeneratorFunction(n)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},E(L),u(L,l,"Generator"),u(L,o,(function(){return this})),u(L,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=B,F.prototype={constructor:F,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(O),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function a(r,a){return l.type="throw",l.arg=t,n.next=r,a&&(n.method="next",n.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],l=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var u=r.call(i,"catchLoc"),s=r.call(i,"finallyLoc");if(u&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=t,i.arg=e,o?(this.method="next",this.next=o.finallyLoc,y):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),y},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),O(n),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var a=r.arg;O(n)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:B(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),y}},t}(b);try{regeneratorRuntime=k}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=k:Function("r","regeneratorRuntime = r")(k)}var w=function(){"use strict";function t(){r(this,t)}return o(t,null,[{key:"hasWindowGuard",value:function(t){if(!this.hasWindow(t))throw Error("The element has no window")}},{key:"hasWindow",value:function(t){return!(!t||!t.ownerDocument||!t.ownerDocument.defaultView)}},{key:"getWindow",value:function(t){return this.hasWindowGuard(t),t.ownerDocument.defaultView}},{key:"formDataToObject",value:function(t){var e={},n=!0,r=!1,a=void 0;try{for(var o,i=t[Symbol.iterator]();!(n=(o=i.next()).done);n=!0){var l=o.value,u=l[0],s=l[1];if(e.hasOwnProperty(u)){var c=e[u];Array.isArray(c)?e[u].push(s):e[u]=[c,s]}else e[u]=s}}catch(t){r=!0,a=t}finally{try{n||null==i.return||i.return()}finally{if(r)throw a}}return e}}]),t}(),L=function(){"use strict";function t(e){r(this,t),this.url=new URL(DOKU_BASE+"lib/exe/ajax.php",window.location.href),this.url.searchParams.set("call",e),this.call=e,this.url.searchParams.set("id",JSINFO.id)}return o(t,[{key:"setProperty",value:function(t,e){return this.url.searchParams.set(t,e),this}},{key:"toString",value:function(){return this.url.toString()}},{key:"getCall",value:function(){return this.call}}]),t}(),E=function(){"use strict";function e(t){r(this,e),i(this,"method","GET"),this.url=new L(t)}return o(e,[{key:"getJson",value:function(){return n(t(b).mark((function e(){var n;return t(b).wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getResponse();case 2:if(200===(n=t.sent).status){t.next=5;break}return t.abrupt("return",{});case 5:return t.abrupt("return",n.json());case 6:case"end":return t.stop()}}),e,this)})).bind(this))()}},{key:"getText",value:function(){return n(t(b).mark((function e(){var n;return t(b).wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getResponse();case 2:if(200===(n=t.sent).status){t.next=5;break}return t.abrupt("return","");case 5:return t.abrupt("return",n.text());case 6:case"end":return t.stop()}}),e,this)})).bind(this))()}},{key:"setMethod",value:function(t){return this.method=t.toUpperCase(),this}},{key:"setProperty",value:function(t,e){return this.url.setProperty(t,e),this}},{key:"sendFormDataAsJson",value:function(t){return fetch(this.url.toString(),{method:this.method,body:JSON.stringify(w.formDataToObject(t)),headers:{"Content-Type":"application/json"}})}},{key:"getResponse",value:function(){return n(t(b).mark((function e(){var n,r;return t(b).wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,fetch(this.url.toString(),{method:this.method});case 2:return 200!==(n=t.sent).status&&((r=p.createTemporary()).addBody("Bad request: the call ".concat(this.url.getCall()," to the backend sends back the following exit code")+n.status),r.show()),t.abrupt("return",n);case 5:case"end":return t.stop()}}),e,this)})).bind(this))()}}]),e}();i(E,"createDokuRequest",(function(t){return new E(t)})),window.combo=function(){"use strict";function t(){r(this,t)}return o(t,null,[{key:"toHtmlId",value:function(t){return d.toHtmlId(t)}},{key:"getOrCreateModal",value:function(t){return p.getOrCreate(t)}},{key:"removeAllModals",value:function(){p.resetAllModals()}},{key:"createDokuRequest",value:function(t){return E.createDokuRequest(t)}},{key:"createFormMetaField",value:function(t){return f.createFromName(t)}},{key:"createFormFromJson",value:function(t,e){return y.createFromJson(t,e)}},{key:"createTemporaryModal",value:function(){return p.createTemporary()}}]),t}()}(); 2//# sourceMappingURL=combo.min.js.map 3