1(function(u,c){typeof exports=="object"&&typeof module<"u"?c(exports,require("bootstrap")):typeof define=="function"&&define.amd?define(["exports","bootstrap"],c):(u=typeof globalThis<"u"?globalThis:u||self,c(u.combo={},u.bootstrap))})(this,function(u,c){"use strict";var et=Object.defineProperty;var it=(u,c,H)=>c in u?et(u,c,{enumerable:!0,configurable:!0,writable:!0,value:H}):u[c]=H;var i=(u,c,H)=>(it(u,typeof c!="symbol"?c+"":c,H),H);class H{static toBoolean(t){return typeof t=="boolean"?t:t==="true"}}let F;class E{static getLogger(){return F===void 0&&(F=new E),F}error(t){if(console.error(t),process.env.NODE_ENV!=="production")throw new Error(t)}}let J=g=>crypto.getRandomValues(new Uint8Array(g)),q=(g,t,e)=>{let s=(2<<Math.log(g.length-1)/Math.LN2)-1,l=-~(1.6*s*t/g.length);return()=>{let r="";for(;;){let n=e(l),o=l;for(;o--;)if(r+=g[n[o]&s]||"",r.length===t)return r}}},G=(g,t)=>q(g,t,J);class ${static toHtmlId(t){return t.toString().replace(/[_.\s:\/\\]/g,"-")}static createRandomId(){return G("abcdefghijklmnopqrstuvwxyz",10)()}static createRandomIdWithPrefix(t){return t+"-"+this.createRandomId()}static toEntities(t){let e=[];for(let s=0;s<t.length;s++){let l=`&#${t.charCodeAt(s)};`;e.push(l)}return e.join("")}}class Q{static isString(t){return typeof t=="string"||t instanceof String}}const w=class{constructor(t){i(this,"tab","unknown");i(this,"mutable",!0);i(this,"values",[]);i(this,"defaultValues",[]);i(this,"multiple",!1);i(this,"children",{});i(this,"name");i(this,"type");i(this,"label");i(this,"url");i(this,"description");i(this,"parent");i(this,"domainValues");i(this,"width");this.name=t}getLabelAnchor(){if(this.getUrl()===void 0&&this.getDescription()===void 0)return this.getLabel();let t=this.getUrl();return this.getUrl()===void 0?(t="#",`
2<span class="d-inline-block" tabindex="0" data-bs-toggle="tooltip" title="${this.getDescription()}">
3    <a href="${t}" title="${this.getDescription()}" style="text-decoration:none;pointer-events: none;">${this.getLabel()}</a>
4</span>`):`<a href="${t}" title="${this.getDescription()}" data-bs-toggle="tooltip" style="text-decoration:none" target="_blank">${this.getLabel()}</a>`}setType(t){return this.type=t,this}setLabel(t){return this.label=t,this}setUrl(t){return this.url=t,this}addValue(t,e){return this.values.push(t),this.defaultValues.push(e),this}getType(){return this.type}getLabel(){return this.label===void 0?this.getName().split(/[_\-]/).map(t=>t.charAt(0).toUpperCase()+t.slice(1)).join(" "):this.label}getUrl(){return this.url}getName(){return this.name}getDescription(){return this.description}getTab(){return this.tab}static createFromJson(t,e=null){t.hasOwnProperty("name")||E.getLogger().error("To create a form meta field, the name property is mandatory.");let s=t.name,l=w.createFromName(s);e!=null&&l.setParent(e);let r,n;for(let o in t){if(!t.hasOwnProperty(o))continue;let a=t[o];switch(o){case"name":continue;case"label":l.setLabel(a);continue;case"tab":l.setTab(a);continue;case"type":l.setType(a);continue;case"mutable":l.setMutable(a);continue;case"description":l.setDescription(a);continue;case"url":l.setUrl(a);continue;case"value":r=a;continue;case"default":n=a;continue;case"domain-values":l.setDomainValues(a);continue;case"multiple":l.setMultiple(a);continue;case"width":l.setControlWidth(a);continue;case"children":let p=a;for(let b in p){if(!p.hasOwnProperty(b))continue;let d=w.createFromJson(p[b],l);l.addChild(d)}continue;default:E.getLogger().error(`The property (${o}) of the form (${s}) is unknown`)}}return Array.isArray(r)?r.forEach((o,a)=>{let p=n[a];p!==void 0?l.addValue(o,p):l.addValue(o,"")}):l.addValue(r,n),l}setMultiple(t){return this.multiple=t,this}setParent(t){return this.parent=t,this}static createFromName(t){return new w(t)}isMutable(){return this.mutable}setTab(t){return this.tab=t,this}setMutable(t){return this.mutable=H.toBoolean(t),this}setDescription(t){return this.description=t,this}getDefaultValue(){return this.defaultValues[0]}getValue(){return this.values[0]}getDomainValues(){return this.domainValues}setDomainValues(t){if(!Array.isArray(t)){console.error(`The domains values should be an array. (${t}) is not an array`);return}return this.domainValues=t,this}setControlWidth(t){return this.width=t,this}getControlWidth(){return this.width===void 0&&this.parent!==void 0?12/this.parent.getChildren().length:this.width}getValues(){return this.values}getDefaultValues(){return this.defaultValues}getChildren(){return Object.values(this.children)}addChild(t){return this.children[t.getName()]=t,this}toHtmlLabel(t,e){let s=this.getLabelAnchor(),l;return this.getType()===w.BOOLEAN?l="form-check-label":l="col-form-label",typeof e<"u"&&(l=`${e} ${l}`),`<label for="${t}" class="${l}">${s}</label>`}toHtmlControl(t,e=null,s=null){let l=this.getType(),r=this.isMutable(),n=this.getDomainValues(),o,a;if(n!==void 0){a="select";let p="";s!==void 0&&(p=` (${s})`);let b="";this.getMultiple()&&(b="multiple"),a=`<select class="form-select" aria-label="${this.getLabel()}" name="${this.getName()}" id="${t}" ${b}>`;let d="";e===null&&(d="selected"),a+=`<option value="" ${d}>Default${p}</option>`;for(let h of n)h===e?d="selected":d="",a+=`<option value="${h}" ${d}>${h}</option>`;return a+="</select>",a}else{let p="No value";r&&(p=`Enter a ${this.getLabel()}`),s!=null&&(Q.isString(s)?p=$.toEntities(s):p=s);let b=`placeholder="${p}"`,d="",h,P=this.getName();r!==void 0&&!r?o="disabled":o="";let C="input",v="form-control",m="",A=3;switch(l){case w.DATE_TIME:h="datetime-local",e!==null?(e=e.slice(0,19),d=`value="${e}"`):!r&&s!==null&&(s=s.slice(0,19),d=`value="${s}"`),b="";break;case w.PARAGRAPH:C="textarea",e!==null&&(e=$.toEntities(e),d=`${e}`);break;case w.JSON:C="textarea",e!==null&&(typeof e=="object"&&(e=JSON.stringify(e,null,2)),e=$.toEntities(e),d=`${e}`),A=15;break;case w.BOOLEAN:h="checkbox",v="form-check-input",s!==null?(d=`value="${s}"`,e===s&&(m="checked")):e==="on"&&(m="checked"),b="";break;default:h="text",e!=null&&(d=`value="${e}"`)}switch(C){case"textarea":a=`<textarea id="${t}" name="${P}" class="${v}" rows="${A}" ${b} ${o}>${d}</textarea>`;break;default:case"input":a=`<input type="${h}" name="${P}" class="${v}" id="${t}" ${b} ${d} ${m} ${o}/>`;break}return a}}toJavascriptObject(){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()}}getMultiple(){return this.multiple}};let T=w;i(T,"TABULAR_TYPE","tabular"),i(T,"DATE_TIME","datetime"),i(T,"PARAGRAPH","paragraph"),i(T,"BOOLEAN","boolean"),i(T,"JSON","json");class I{constructor(t){i(this,"name");i(this,"width");i(this,"label");i(this,"widthField");i(this,"widthLabel");this.name=t}getName(){return this.name}setWidth(t){return this.width=t,this}getWidth(){return this.width}static createFromJson(t){t.hasOwnProperty("name")||E.getLogger().error("A name property is mandatory to create a tab and was not found in the json provided");let e=t.name,s=new I(e);for(let l in t){if(!t.hasOwnProperty(l))continue;let r=t[l];switch(l){case"name":continue;case"label":s.setLabel(r);continue;case"width-field":s.setWidthField(r);continue;case"width-label":s.setWidthLabel(r);continue;default:E.getLogger().error(`The property (${l}) of the tab (${e}) is unknown`)}}return s}setLabel(t){return this.label=t,this}getLabel(){return this.label===void 0?this.name:this.label}setWidthField(t){return this.widthField=t,this}setWidthLabel(t){return this.widthLabel=t,this}getLabelWidth(){return this.widthLabel===void 0?3:this.widthLabel}getFieldWidth(){return this.widthField===void 0?12-this.getLabelWidth():this.widthField}static createFromName(t){return new I(t)}}class B{constructor(t){i(this,"formFields",{});i(this,"tabs",{});i(this,"width",8);i(this,"name");i(this,"label");i(this,"url");i(this,"getTabPaneId");i(this,"getTabNavId");i(this,"getControlId");if(t==null)throw new Error("The if of the form should not be null");this.name=t,this.getControlId=function(e){let s=$.toHtmlId(e);return`${t}-control-${s}`},this.getTabNavId=function(e){let s=$.toHtmlId(e.getName());return`${t}-tab-nav-${s}`},this.getTabPaneId=function(e){let s=$.toHtmlId(e.getName());return`${t}-tab-pane-${s}`}}getLabel(){return this.label}getUrl(){return this.url}getId(){return this.name}getControlWidth(){return this.width}getLabelWidth(){return 12-this.getControlWidth()}static createFromJson(t,e){let s=B.createFromId(t);for(let l in e){if(!e.hasOwnProperty(l))continue;let r=e[l];switch(l){case"fields":let n=r;for(let a in n)n.hasOwnProperty(a)&&s.addFormField(T.createFromJson(n[a]));continue;case"tabs":let o=r;for(let a in o)o.hasOwnProperty(a)&&s.addTab(I.createFromJson(o[a]));break;case"width":s.setControlWidth(r);break;case"label":s.setLabel(r);break;case"url":s.setUrl(r);break;default:E.getLogger().error(`The form property (${l}) is unknown`)}}return s}static createFromId(t){return new B(t)}addFormField(t){return this.formFields[t.getName()]=t,this.tabs.hasOwnProperty(t.getTab())||(this.tabs[t.getTab()]=I.createFromName(t.getTab())),this}getFields(){return Object.values(this.formFields)}getTabs(){return Object.values(this.tabs)}addTab(t){this.tabs[t.getName()]=t}valueOf(){return this.getId()}getFieldsForTab(t){return this.getFields().filter(e=>e.getTab()===t)}toHtmlElement(){let t=this.getId(),e='<ul class="nav nav-tabs mb-3">',s,l,r=this.getTabs(),n=r[0];for(let h of r){Object.is(h,n)?(s="active",l="true"):(s="",l="false");let P=h.getLabel(),C=this.getTabPaneId(h),v=this.getTabNavId(h);e+=`
5<li class="nav-item">
6<button
7    class="nav-link ${s}"
8    id="${v}"
9    type="button"
10    role="tab"
11    aria-selected = "${l}"
12    aria-controls = "${C}"
13    data-bs-toggle = "tab"
14    data-bs-target = "#${C}" >${P}
15    </button>
16</li>`}e+="</ul>";let o='<div class="tab-content">',a,p,b=0;for(let h of r){let P=this.getTabPaneId(h),C=this.getTabNavId(h);h===n?s="active":s="",o+=`<div class="tab-pane ${s}" id="${P}" role="tabpanel" aria-labelledby="${C}">`,p=h.getLabelWidth(),a=h.getFieldWidth();let v=this.getFieldsForTab(h.getName());if(v.length===1){let m=v[0];if(m.getChildren().length===0){b++;let A=this.getControlId(b),k=m.toHtmlLabel(A),M=m.getValue(),W=m.getDefaultValue(),j=m.toHtmlControl(A,M,W);o+=`
17<div class="row mb-3 text-center"><div class="col-sm-12">${k}</div></div>
18<div class="row mb-3"><div class="col-sm-12">${j}</div></div>
19`,o+="</div>";continue}}for(let m of v)switch(m.getChildren().length){case 0:b++;let k=this.getControlId(b),M=m.toHtmlLabel(k,`col-sm-${p}`),W=m.getValue(),j=m.getDefaultValue(),K=m.toHtmlControl(k,W,j);o+=`
20<div class="row mb-3">
21    ${M}
22    <div class="col-sm-${a}">${K}</div>
23</div>
24`;break;default:let Y=m.getLabelAnchor();o+=`<div class="row mb-3 text-center">${Y}</div>`,o+='<div class="row mb-3">';let U=0;for(const L of m.getChildren()){let O=L.getControlWidth();o+=`<div class="col-sm-${O} text-center">`,o+=L.getLabelAnchor(),o+="</div>";let D=L.getValues().length;D>U&&(U=D)}o+="</div>";for(let L=0;L<U;L++){o+='<div class="row mb-3">';for(const O of m.getChildren()){let D=O.getValues()[L],Z=O.getDefaultValues()[L];b++;let _=this.getControlId(b),tt=O.getControlWidth();o+=`<div class="col-sm-${tt}">`,o+=O.toHtmlControl(_,D,Z),o+="</div>"}o+="</div>"}break}o+="</div>"}o+="</div>";let d=document.createElement("form");return d.setAttribute("id",t),d.innerHTML=`${e} ${o}`,d}setControlWidth(t){return this.width=t,this}setLabel(t){this.label=t}setUrl(t){this.url=t}}let S={};const N=class{constructor(t){i(this,"footerButtons",[]);i(this,"bodies",[]);i(this,"isBuild",!1);i(this,"bodyStyles",{});i(this,"dialogStyles",{});i(this,"showFooter",!0);i(this,"dialogClasses",[]);i(this,"modalId");i(this,"modalRootHtmlElement");i(this,"headerText");i(this,"isResetOnClose");i(this,"closeButton");i(this,"isCentered");i(this,"callBack");i(this,"bootStrapModal");i(this,"modalContent");i(this,"modalBody");i(this,"placementElement");this.modalId=t;let e=document.getElementById(t);e!==null?(E.getLogger().error(`The id (${t}) given to create a modal was already used by an element in the DOM. We have reused it.`),this.modalRootHtmlElement=e,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")),this.modalContent=document.createElement("div"),this.modalContent.classList.add("modal-content")}setHeader(t){return this.headerText=t,this}addBody(t){return this.bodies.push(t),this}addBodyStyle(t,e){return this.bodyStyles[t]=e,this}setPlacementBottomToElement(t){return this.placementElement=t,this}noFooter(){return this.showFooter=!1,this}addDialogStyle(t,e){return this.dialogStyles[t]=e,this}addDialogClass(t){return this.dialogClasses.push(t),this}resetOnClose(){return this.isResetOnClose=!0,this}addFooterButton(t){return this.footerButtons.push(t),this}addFooterCloseButton(t="Close"){this.closeButton=document.createElement("button"),this.closeButton.classList.add("btn","btn-secondary"),this.closeButton.innerHTML=t;let e=this;return this.closeButton.addEventListener("click",function(){e.bootStrapModal.hide()}),this.addFooterButton(this.closeButton),this}centered(){return this.isCentered=!0,this}show(){if(this.isResetOnClose===!0){let t=this;this.getElement().addEventListener("hidden.bs.modal",function(){t.reset()})}if(typeof this.callBack<"u"&&typeof this.closeButton<"u"){let t=this;this.closeButton.addEventListener("click",function(){t.dismissHide(),t.callBack()})}this.build().show()}dismissHide(){this.build().hide()}getModalId(){return this.modalId}setCallBackOnClose(t){return this.callBack=t,this}static createFromId(t){let e=new N(t);return S[t]=e,e}static createTemporary(){return this.createFromId($.createRandomId())}getElement(){return this.modalRootHtmlElement}wasBuild(){return this.isBuild}setCentered(t){return this.isCentered=t,this}resetIfBuild(){return this.wasBuild()&&this.reset(),this}reset(){this.modalRootHtmlElement.querySelectorAll('[data-bs-toggle="tab"]').forEach(t=>{let e=c.Tab.getInstance(t);e!==null&&e.dispose()}),this.bootStrapModal!==void 0&&this.dismissHide(),this.modalRootHtmlElement.innerHTML="",this.isBuild=!1,this.bodies=[],this.footerButtons=[],this.headerText=void 0}build(){if(typeof this.bootStrapModal<"u")return this.bootStrapModal;let t=c.Modal.getInstance(this.modalRootHtmlElement);if(t!==null)return this.bootStrapModal=t,t;if(document.body.appendChild(this.modalRootHtmlElement),typeof this.placementElement<"u"){let r=this.placementElement.getBoundingClientRect();this.modalRootHtmlElement.style.margin="0",this.modalRootHtmlElement.style.left=r.left+"px";let n=5;this.modalRootHtmlElement.style.top=r.top+n+"px",this.modalRootHtmlElement.style.width="unset",this.modalRootHtmlElement.style.height="unset"}const e=document.createElement("div");e.classList.add("modal-dialog","modal-dialog-scrollable","modal-lg"),this.isCentered?e.classList.add("modal-dialog-centered"):(e.style.setProperty("margin","5rem auto"),e.style.setProperty("height","calc(100% - 9rem)"));for(let r in this.dialogStyles)this.dialogStyles.hasOwnProperty(r)&&e.style.setProperty(r,this.dialogStyles[r]);for(let r in this.dialogClasses)e.classList.add(r);this.modalRootHtmlElement.appendChild(e),e.appendChild(this.modalContent),this.modalBody=document.createElement("div"),this.modalBody.classList.add("modal-body");for(let r in this.bodyStyles)this.bodyStyles.hasOwnProperty(r)&&this.modalBody.style.setProperty(r,this.bodyStyles[r]);if(this.modalContent.appendChild(this.modalBody),this.headerText!==void 0){let r=`
25<div class="modal-header">
26    <h5 class="modal-title">${this.headerText}</h5>
27    <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
28</div>
29`;this.modalContent.insertAdjacentHTML("afterbegin",r)}for(let r of this.bodies)switch(typeof r){case"string":this.modalBody.insertAdjacentHTML("beforeend",r);break;default:case"object":this.modalBody.appendChild(r);break}if(this.showFooter){let r=document.createElement("div");r.classList.add("modal-footer"),this.modalContent.appendChild(r),this.footerButtons.length===0&&this.addFooterCloseButton();for(let n of this.footerButtons)typeof n=="string"?r.insertAdjacentHTML("beforeend",n):r.appendChild(n)}let s=`#${this.modalId} [data-bs-toggle="tooltip"]`;document.querySelectorAll(s).forEach(r=>new c.Tooltip(r));let l={backdrop:!0,keyboard:!0,focus:!0};return this.bootStrapModal=new c.Modal(this.modalRootHtmlElement,l),this.bootStrapModal}static getOrCreate(t){let e=N.getModal(t);return e===null&&(e=N.createFromId(t)),e}};let R=N;i(R,"getModal",function(t){return t in S?S[t]:null}),i(R,"listModals",function(){console.log(Object.keys(S).join(", "))}),i(R,"resetAllModals",function(){for(let t in S)S.hasOwnProperty(t)&&S[t].reset()});class x{constructor(t){i(this,"popoverRootHtmlElement");i(this,"placement","left");i(this,"bootStrapPopOver");i(this,"content","");i(this,"isHtml",!0);i(this,"trigger","focus");i(this,"dismissOnNextClick",!0);i(this,"title","");i(this,"withoutArrow",!0);this.popoverRootHtmlElement=t}getElement(){return this.popoverRootHtmlElement}setPlacementToLeft(){return this.placement="left",this}setPlacementToRight(){return this.placement="right",this}setPlacementToAuto(){return this.placement="auto",this}setPlacementToTop(){return this.placement="top",this}setPlacementTBottom(){return this.placement="bottom",this}setTriggerToClick(){return this.trigger="click",this}setWithoutArrow(){return this.withoutArrow=!0,this}static createForElementWithId(t){let e=document.getElementById(t);if(e===null)throw new Error(`The element with the id (${t}) was not found. We can't create a popover.`);return new x(e)}show(){return this.build().show(),this}build(){if(typeof this.bootStrapPopOver<"u")return this.bootStrapPopOver;let t=c.Popover.getInstance(this.popoverRootHtmlElement);if(t!==null)return this.bootStrapPopOver=t,this.bootStrapPopOver;let e={container:"body"};this.dismissOnNextClick?(e.trigger="focus",this.popoverRootHtmlElement.setAttribute("tabindex","0")):e.trigger=this.trigger,e.placement=this.placement,e.html=this.isHtml,e.content=this.content,e.title=this.title;let s='<div class="popover-arrow"></div>';this.withoutArrow&&(s=""),e.template=`<div class="popover" role="tooltip">${s}<h3 class="popover-header"></h3><div class="popover-body"></div></div>
30`;let l=this.getDataNamespace();return this.popoverRootHtmlElement.setAttribute(`data${l}-toggle`,"popover"),this.popoverRootHtmlElement.setAttribute(`data${l}-trigger`,this.trigger),this.popoverRootHtmlElement.setAttribute(`data${l}-placement`,String(this.placement)),this.popoverRootHtmlElement.setAttribute(`data${l}-html`,String(this.isHtml)),this.popoverRootHtmlElement.setAttribute(`data${l}-container`,"body"),this.popoverRootHtmlElement.setAttribute(`data${l}-content`,this.content),this.bootStrapPopOver=new c.Popover(this.popoverRootHtmlElement,e),this.bootStrapPopOver}getDataNamespace(){let t="-bs",e=5;if("bootstrap"in window){let s=window.bootstrap;if(typeof s.Popover.VERSION<"u")return e=parseInt(s.Popover.VERSION.substring(0,1),10),e<5?"":t}if("jQuery"in window){let l=window.jQuery.fn.tooltip.constructor.VERSION;if(typeof l<"u")return e=parseInt(l.substring(0,1),10),e<5?"":t}return t}setTextContent(t){return this.content=t,this.isHtml=!1,this}setHtmlContent(t){return this.content=t,this.isHtml=!0,this}setEnableDismissOnNextClick(){return this.dismissOnNextClick=!0,this}setDisableDismissOnNextClick(){return this.dismissOnNextClick=!1,this}setTitle(t){return this.title=t,this}}class X{static hasWindowGuard(t){if(!this.hasWindow(t))throw Error("The element has no window")}static hasWindow(t){return!(!t||!t.ownerDocument||!t.ownerDocument.defaultView)}static getWindow(t){return this.hasWindowGuard(t),t.ownerDocument.defaultView}static formDataToObject(t){let e={};for(let s of t){let l=s[0],r=s[1];if(e.hasOwnProperty(l)){let n=e[l];Array.isArray(n)?e[l].push(r):e[l]=[n,r]}else e[l]=r}return e}}class z{constructor(t){i(this,"method","GET");i(this,"url");this.url=t}async getJson(){let t=await this.getResponse();return t.status!==200?{}:t.json()}async getText(){let t=await this.getResponse();return t.status!==200?"":t.text()}setMethod(t){return this.method=t.toUpperCase(),this}sendFormDataAsJson(t){return fetch(this.url.toString(),{method:this.method,body:JSON.stringify(X.formDataToObject(t)),headers:{"Content-Type":"application/json"}})}async getResponse(){let t=await fetch(this.url.toString(),{method:this.method});if(t.status!==200){let e=R.createTemporary();e.addBody(`Bad request:  the call ${this.url} to the backend sends back the following exit code`+t.status),e.show()}return t}}const f=class{constructor(t){i(this,"url");let e=window.DOKU_BASE,s=window.JSINFO;switch(t){case f.AJAX:this.url=new URL(e+"lib/exe/ajax.php",window.location.href),this.url.searchParams.set("id",s.id);break;case f.RUNNER:this.url=new URL(e+"lib/exe/taskrunner.php",window.location.href),this.url.searchParams.set("id",s.id);break;case f.FETCH:this.url=new URL(e+"lib/exe/fetch.php",window.location.href);break;case f.EDIT:this.url=new URL(e+"doku.php",window.location.href),this.url.searchParams.set("do","edit"),this.url.searchParams.set("id",s.id);break;case f.SHOW:this.url=new URL(e+"doku.php",window.location.href),this.url.searchParams.set("id",s.id);break;default:throw new Error(`The type ${t} is unknown`)}}setProperty(t,e){return this.url.searchParams.set(t,e),this}toString(){return this.url.toString()}getCall(){return this.url.searchParams.get(f.CALL)}toRequest(){return new z(this.url)}static createAjax(t){return new f(this.AJAX).setProperty(f.CALL,t)}static createRunner(){return new f(this.RUNNER)}static createFetch(t,e){let s=new f(this.FETCH);if(typeof t>"u")throw new Error("The media id is mandatory");return s.setProperty("media",t),typeof e<"u"&&s.setProperty("drive",e),s}static createEdit(t){let e=new f(this.EDIT);return typeof t<"u"&&e.setProperty("id",t),e}};let y=f;i(y,"AJAX","AJAX"),i(y,"RUNNER","RUNNER"),i(y,"CALL","call"),i(y,"EDIT","edit"),i(y,"SHOW","show"),i(y,"FETCH","fetch");class V{constructor(t){i(this,"date");this.date=t}static createFromIso(t){let e=new Date(t);return new V(e)}toSqlTimestampString(){return`${this.date.getFullYear()}-${(this.date.getMonth()+1).toString().padStart(2,"0")}-${this.date.getDate().toString().padStart(2,"0")} ${this.date.getHours().toString().padStart(2,"0")}:${this.date.getMinutes().toString().padStart(2,"0")}:${this.date.getSeconds().toString().padStart(2,"0")}`}}u.Date=V,u.DokuUrl=y,u.Form=B,u.Html=$,u.Modal=R,u.Popover=x,Object.defineProperty(u,Symbol.toStringTag,{value:"Module"})});
31