oksy 0.1.19 → 0.1.21

Sign up to get free protection for your applications and to get access to all the features.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oksy",
3
- "version": "0.1.19",
3
+ "version": "0.1.21",
4
4
  "description": "The OKSY framework",
5
5
  "main": "library.js",
6
6
  "typings": "./types/src/library.pub.d.ts",
@@ -72,4 +72,4 @@ var Jm=Object.defineProperty;var Xm=(e,t,n)=>t in e?Jm(e,t,{enumerable:!0,config
72
72
  `,ca=(a,u)=>{let p=a.innerHTML,y;u.iconHtml?y=ua(u.iconHtml):u.icon==="success"?(y=Zp,p=p.replace(/ style=".*?"/g,"")):u.icon==="error"?y=Qp:y=ua({question:"?",warning:"!",info:"i"}[u.icon]),p.trim()!==y.trim()&&ue(a,y)},Gp=(a,u)=>{if(!!u.iconColor){a.style.color=u.iconColor,a.style.borderColor=u.iconColor;for(const p of[".swal2-success-line-tip",".swal2-success-line-long",".swal2-x-mark-line-left",".swal2-x-mark-line-right"])fe(a,p,"backgroundColor",u.iconColor);fe(a,".swal2-success-ring","borderColor",u.iconColor)}},ua=a=>`<div class="${o["icon-content"]}">${a}</div>`,Jp=(a,u)=>{const p=K();if(!u.imageUrl){V(p);return}W(p,""),p.setAttribute("src",u.imageUrl),p.setAttribute("alt",u.imageAlt),Z(p,"width",u.imageWidth),Z(p,"height",u.imageHeight),p.className=o.image,w(p,u,"image")},Xp=(a,u)=>{const p=k(),y=O();u.toast?(Z(p,"width",u.width),y.style.width="100%",y.insertBefore(q(),U())):Z(y,"width",u.width),Z(y,"padding",u.padding),u.color&&(y.style.color=u.color),u.background&&(y.style.background=u.background),V(H()),eh(y,u)},eh=(a,u)=>{a.className=`${o.popup} ${re(a)?u.showClass.popup:""}`,u.toast?(I([document.documentElement,document.body],o["toast-shown"]),I(a,o.toast)):I(a,o.modal),w(a,u,"popup"),typeof u.customClass=="string"&&I(a,u.customClass),u.icon&&I(a,o[`icon-${u.icon}`])},th=(a,u)=>{const p=z();if(!u.progressSteps||u.progressSteps.length===0){V(p);return}W(p),p.textContent="",u.currentProgressStep>=u.progressSteps.length&&d("Invalid currentProgressStep parameter, it should be less than progressSteps.length (currentProgressStep like JS arrays starts from 0)"),u.progressSteps.forEach((y,R)=>{const ae=nh(y);if(p.appendChild(ae),R===u.currentProgressStep&&I(ae,o["active-progress-step"]),R!==u.progressSteps.length-1){const ze=sh(u);p.appendChild(ze)}})},nh=a=>{const u=document.createElement("li");return I(u,o["progress-step"]),ue(u,a),u},sh=a=>{const u=document.createElement("li");return I(u,o["progress-step-line"]),a.progressStepsDistance&&Z(u,"width",a.progressStepsDistance),u},oh=(a,u)=>{const p=B();le(p,u.title||u.titleText,"block"),u.title&&Jr(u.title,p),u.titleText&&(p.innerText=u.titleText),w(p,u,"title")},fa=(a,u)=>{Xp(a,u),Bp(a,u),th(a,u),Wp(a,u),Jp(a,u),oh(a,u),Rp(a,u),zp(a,u),Op(a,u),Kp(a,u),typeof u.didRender=="function"&&u.didRender(O())};function da(){const a=n.innerParams.get(this);if(!a)return;const u=n.domCache.get(this);V(u.loader),ne()?a.icon&&W(U()):rh(u),Y([u.popup,u.actions],o.loading),u.popup.removeAttribute("aria-busy"),u.popup.removeAttribute("data-loading"),u.confirmButton.disabled=!1,u.denyButton.disabled=!1,u.cancelButton.disabled=!1}const rh=a=>{const u=a.popup.getElementsByClassName(a.loader.getAttribute("data-button-to-replace"));u.length?W(u[0],"inline-block"):he()&&V(a.actions)};function ih(a){const u=n.innerParams.get(a||this),p=n.domCache.get(a||this);return p?_(p.popup,u.input):null}const lh=()=>re(O()),pa=()=>S()&&S().click(),ah=()=>j()&&j().click(),ch=()=>X()&&X().click(),is=Object.freeze({cancel:"cancel",backdrop:"backdrop",close:"close",esc:"esc",timer:"timer"}),ha=a=>{a.keydownTarget&&a.keydownHandlerAdded&&(a.keydownTarget.removeEventListener("keydown",a.keydownHandler,{capture:a.keydownListenerCapture}),a.keydownHandlerAdded=!1)},uh=(a,u,p,y)=>{ha(u),p.toast||(u.keydownHandler=R=>dh(a,R,y),u.keydownTarget=p.keydownListenerCapture?window:O(),u.keydownListenerCapture=p.keydownListenerCapture,u.keydownTarget.addEventListener("keydown",u.keydownHandler,{capture:u.keydownListenerCapture}),u.keydownHandlerAdded=!0)},ti=(a,u,p)=>{const y=Ge();if(y.length)return u=u+p,u===y.length?u=0:u===-1&&(u=y.length-1),y[u].focus();O().focus()},ma=["ArrowRight","ArrowDown"],fh=["ArrowLeft","ArrowUp"],dh=(a,u,p)=>{const y=n.innerParams.get(a);!y||u.isComposing||u.keyCode===229||(y.stopKeydownPropagation&&u.stopPropagation(),u.key==="Enter"?ph(a,u,y):u.key==="Tab"?hh(u,y):[...ma,...fh].includes(u.key)?mh(u.key):u.key==="Escape"&&wh(u,y,p))},ph=(a,u,p)=>{if(!!E(p.allowEnterKey)&&u.target&&a.getInput()&&u.target instanceof HTMLElement&&u.target.outerHTML===a.getInput().outerHTML){if(["textarea","file"].includes(p.input))return;pa(),u.preventDefault()}},hh=(a,u)=>{const p=a.target,y=Ge();let R=-1;for(let ae=0;ae<y.length;ae++)if(p===y[ae]){R=ae;break}a.shiftKey?ti(u,R,-1):ti(u,R,1),a.stopPropagation(),a.preventDefault()},mh=a=>{const u=S(),p=j(),y=X();if(document.activeElement instanceof HTMLElement&&![u,p,y].includes(document.activeElement))return;const R=ma.includes(a)?"nextElementSibling":"previousElementSibling";let ae=document.activeElement;for(let ze=0;ze<ce().children.length;ze++){if(ae=ae[R],!ae)return;if(ae instanceof HTMLButtonElement&&re(ae))break}ae instanceof HTMLButtonElement&&ae.focus()},wh=(a,u,p)=>{E(u.allowEscapeKey)&&(a.preventDefault(),p(is.esc))};var Hs={swalPromiseResolve:new WeakMap,swalPromiseReject:new WeakMap};const gh=()=>{Array.from(document.body.children).forEach(u=>{u===k()||u.contains(k())||(u.hasAttribute("aria-hidden")&&u.setAttribute("data-previous-aria-hidden",u.getAttribute("aria-hidden")),u.setAttribute("aria-hidden","true"))})},wa=()=>{Array.from(document.body.children).forEach(u=>{u.hasAttribute("data-previous-aria-hidden")?(u.setAttribute("aria-hidden",u.getAttribute("data-previous-aria-hidden")),u.removeAttribute("data-previous-aria-hidden")):u.removeAttribute("aria-hidden")})},yh=()=>{if((/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1)&&!be(document.body,o.iosfix)){const u=document.body.scrollTop;document.body.style.top=`${u*-1}px`,I(document.body,o.iosfix),vh(),bh()}},bh=()=>{const a=navigator.userAgent,u=!!a.match(/iPad/i)||!!a.match(/iPhone/i),p=!!a.match(/WebKit/i);u&&p&&!a.match(/CriOS/i)&&O().scrollHeight>window.innerHeight-44&&(k().style.paddingBottom=`${44}px`)},vh=()=>{const a=k();let u;a.ontouchstart=p=>{u=_h(p)},a.ontouchmove=p=>{u&&(p.preventDefault(),p.stopPropagation())}},_h=a=>{const u=a.target,p=k();return Ch(a)||xh(a)?!1:u===p||!Ee(p)&&u instanceof HTMLElement&&u.tagName!=="INPUT"&&u.tagName!=="TEXTAREA"&&!(Ee(L())&&L().contains(u))},Ch=a=>a.touches&&a.touches.length&&a.touches[0].touchType==="stylus",xh=a=>a.touches&&a.touches.length>1,kh=()=>{if(be(document.body,o.iosfix)){const a=parseInt(document.body.style.top,10);Y(document.body,o.iosfix),document.body.style.top="",document.body.scrollTop=a*-1}},Eh=()=>{oe.previousBodyPadding===null&&document.body.scrollHeight>window.innerHeight&&(oe.previousBodyPadding=parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right")),document.body.style.paddingRight=`${oe.previousBodyPadding+Ap()}px`)},Sh=()=>{oe.previousBodyPadding!==null&&(document.body.style.paddingRight=`${oe.previousBodyPadding}px`,oe.previousBodyPadding=null)};function ga(a,u,p,y){ne()?ya(a,y):(On(p).then(()=>ya(a,y)),ha(ye)),/^((?!chrome|android).)*safari/i.test(navigator.userAgent)?(u.setAttribute("style","display:none !important"),u.removeAttribute("class"),u.innerHTML=""):u.remove(),D()&&(Sh(),kh(),wa()),$h()}function $h(){Y([document.documentElement,document.body],[o.shown,o["height-auto"],o["no-backdrop"],o["toast-shown"]])}function No(a){a=Oh(a);const u=Hs.swalPromiseResolve.get(this),p=Ph(this);this.isAwaitingPromise()?a.isDismissed||(js(this),u(a)):p&&u(a)}function Th(){return!!n.awaitingPromise.get(this)}const Ph=a=>{const u=O();if(!u)return!1;const p=n.innerParams.get(a);if(!p||be(u,p.hideClass.popup))return!1;Y(u,p.showClass.popup),I(u,p.hideClass.popup);const y=k();return Y(y,p.showClass.backdrop),I(y,p.hideClass.backdrop),Ih(a,u,p),!0};function Ah(a){const u=Hs.swalPromiseReject.get(this);js(this),u&&u(a)}const js=a=>{a.isAwaitingPromise()&&(n.awaitingPromise.delete(a),n.innerParams.get(a)||a._destroy())},Oh=a=>typeof a>"u"?{isConfirmed:!1,isDenied:!1,isDismissed:!0}:Object.assign({isConfirmed:!1,isDenied:!1,isDismissed:!1},a),Ih=(a,u,p)=>{const y=k(),R=Ds&&Re(u);typeof p.willClose=="function"&&p.willClose(u),R?Mh(a,u,y,p.returnFocus,p.didClose):ga(a,y,p.returnFocus,p.didClose)},Mh=(a,u,p,y,R)=>{ye.swalCloseEventFinishedCallback=ga.bind(null,a,p,y,R),u.addEventListener(Ds,function(ae){ae.target===u&&(ye.swalCloseEventFinishedCallback(),delete ye.swalCloseEventFinishedCallback)})},ya=(a,u)=>{setTimeout(()=>{typeof u=="function"&&u.bind(a.params)(),a._destroy()})};function ba(a,u,p){const y=n.domCache.get(a);u.forEach(R=>{y[R].disabled=p})}function va(a,u){if(!!a)if(a.type==="radio"){const y=a.parentNode.parentNode.querySelectorAll("input");for(let R=0;R<y.length;R++)y[R].disabled=u}else a.disabled=u}function Rh(){ba(this,["confirmButton","denyButton","cancelButton"],!1)}function Bh(){ba(this,["confirmButton","denyButton","cancelButton"],!0)}function Nh(){va(this.getInput(),!1)}function Lh(){va(this.getInput(),!0)}function Dh(a){const u=n.domCache.get(this),p=n.innerParams.get(this);ue(u.validationMessage,a),u.validationMessage.className=o["validation-message"],p.customClass&&p.customClass.validationMessage&&I(u.validationMessage,p.customClass.validationMessage),W(u.validationMessage);const y=this.getInput();y&&(y.setAttribute("aria-invalid",!0),y.setAttribute("aria-describedby",o["validation-message"]),M(y),I(y,o.inputerror))}function Fh(){const a=n.domCache.get(this);a.validationMessage&&V(a.validationMessage);const u=this.getInput();u&&(u.removeAttribute("aria-invalid"),u.removeAttribute("aria-describedby"),Y(u,o.inputerror))}function Hh(){return n.domCache.get(this).progressSteps}const ls={title:"",titleText:"",text:"",html:"",footer:"",icon:void 0,iconColor:void 0,iconHtml:void 0,template:void 0,toast:!1,showClass:{popup:"swal2-show",backdrop:"swal2-backdrop-show",icon:"swal2-icon-show"},hideClass:{popup:"swal2-hide",backdrop:"swal2-backdrop-hide",icon:"swal2-icon-hide"},customClass:{},target:"body",color:void 0,backdrop:!0,heightAuto:!0,allowOutsideClick:!0,allowEscapeKey:!0,allowEnterKey:!0,stopKeydownPropagation:!0,keydownListenerCapture:!1,showConfirmButton:!0,showDenyButton:!1,showCancelButton:!1,preConfirm:void 0,preDeny:void 0,confirmButtonText:"OK",confirmButtonAriaLabel:"",confirmButtonColor:void 0,denyButtonText:"No",denyButtonAriaLabel:"",denyButtonColor:void 0,cancelButtonText:"Cancel",cancelButtonAriaLabel:"",cancelButtonColor:void 0,buttonsStyling:!0,reverseButtons:!1,focusConfirm:!0,focusDeny:!1,focusCancel:!1,returnFocus:!0,showCloseButton:!1,closeButtonHtml:"&times;",closeButtonAriaLabel:"Close this dialog",loaderHtml:"",showLoaderOnConfirm:!1,showLoaderOnDeny:!1,imageUrl:void 0,imageWidth:void 0,imageHeight:void 0,imageAlt:"",timer:void 0,timerProgressBar:!1,width:void 0,padding:void 0,background:void 0,input:void 0,inputPlaceholder:"",inputLabel:"",inputValue:"",inputOptions:{},inputAutoTrim:!0,inputAttributes:{},inputValidator:void 0,returnInputValueOnDeny:!1,validationMessage:void 0,grow:!1,position:"center",progressSteps:[],currentProgressStep:void 0,progressStepsDistance:void 0,willOpen:void 0,didOpen:void 0,didRender:void 0,willClose:void 0,didClose:void 0,didDestroy:void 0,scrollbarPadding:!0},jh=["allowEscapeKey","allowOutsideClick","background","buttonsStyling","cancelButtonAriaLabel","cancelButtonColor","cancelButtonText","closeButtonAriaLabel","closeButtonHtml","color","confirmButtonAriaLabel","confirmButtonColor","confirmButtonText","currentProgressStep","customClass","denyButtonAriaLabel","denyButtonColor","denyButtonText","didClose","didDestroy","footer","hideClass","html","icon","iconColor","iconHtml","imageAlt","imageHeight","imageUrl","imageWidth","preConfirm","preDeny","progressSteps","returnFocus","reverseButtons","showCancelButton","showCloseButton","showConfirmButton","showDenyButton","text","title","titleText","willClose"],Vh={},Uh=["allowOutsideClick","allowEnterKey","backdrop","focusConfirm","focusDeny","focusCancel","returnFocus","heightAuto","keydownListenerCapture"],_a=a=>Object.prototype.hasOwnProperty.call(ls,a),Ca=a=>jh.indexOf(a)!==-1,ni=a=>Vh[a],qh=a=>{_a(a)||d(`Unknown parameter "${a}"`)},zh=a=>{Uh.includes(a)&&d(`The parameter "${a}" is incompatible with toasts`)},Kh=a=>{ni(a)&&v(a,ni(a))},Wh=a=>{a.backdrop===!1&&a.allowOutsideClick&&d('"allowOutsideClick" parameter requires `backdrop` parameter to be set to `true`');for(const u in a)qh(u),a.toast&&zh(u),Kh(u)};function Yh(a){const u=O(),p=n.innerParams.get(this);if(!u||be(u,p.hideClass.popup))return d("You're trying to update the closed or closing popup, that won't work. Use the update() method in preConfirm parameter or show a new popup.");const y=Zh(a),R=Object.assign({},p,y);fa(this,R),n.innerParams.set(this,R),Object.defineProperties(this,{params:{value:Object.assign({},this.params,a),writable:!1,enumerable:!0}})}const Zh=a=>{const u={};return Object.keys(a).forEach(p=>{Ca(p)?u[p]=a[p]:d(`Invalid parameter to update: ${p}`)}),u};function Qh(){const a=n.domCache.get(this),u=n.innerParams.get(this);if(!u){xa(this);return}a.popup&&ye.swalCloseEventFinishedCallback&&(ye.swalCloseEventFinishedCallback(),delete ye.swalCloseEventFinishedCallback),typeof u.didDestroy=="function"&&u.didDestroy(),Gh(this)}const Gh=a=>{xa(a),delete a.params,delete ye.keydownHandler,delete ye.keydownTarget,delete ye.currentInstance},xa=a=>{a.isAwaitingPromise()?(si(n,a),n.awaitingPromise.set(a,!0)):(si(Hs,a),si(n,a))},si=(a,u)=>{for(const p in a)a[p].delete(u)};var ka=Object.freeze({__proto__:null,hideLoading:da,disableLoading:da,getInput:ih,close:No,isAwaitingPromise:Th,rejectPromise:Ah,handleAwaitingPromise:js,closePopup:No,closeModal:No,closeToast:No,enableButtons:Rh,disableButtons:Bh,enableInput:Nh,disableInput:Lh,showValidationMessage:Dh,resetValidationMessage:Fh,getProgressSteps:Hh,update:Yh,_destroy:Qh});const as=a=>{let u=O();u||new Do,u=O();const p=q();ne()?V(U()):Jh(u,a),W(p),u.setAttribute("data-loading","true"),u.setAttribute("aria-busy","true"),u.focus()},Jh=(a,u)=>{const p=ce(),y=q();!u&&re(S())&&(u=S()),W(p),u&&(V(u),y.setAttribute("data-button-to-replace",u.className)),y.parentNode.insertBefore(y,u),I([a,p],o.loading)},Xh=(a,u)=>{u.input==="select"||u.input==="radio"?om(a,u):["text","email","number","tel","textarea"].includes(u.input)&&(N(u.inputValue)||b(u.inputValue))&&(as(S()),rm(a,u))},em=(a,u)=>{const p=a.getInput();if(!p)return null;switch(u.input){case"checkbox":return tm(p);case"radio":return nm(p);case"file":return sm(p);default:return u.inputAutoTrim?p.value.trim():p.value}},tm=a=>a.checked?1:0,nm=a=>a.checked?a.value:null,sm=a=>a.files.length?a.getAttribute("multiple")!==null?a.files:a.files[0]:null,om=(a,u)=>{const p=O(),y=R=>{im[u.input](p,oi(R),u)};N(u.inputOptions)||b(u.inputOptions)?(as(S()),C(u.inputOptions).then(R=>{a.hideLoading(),y(R)})):typeof u.inputOptions=="object"?y(u.inputOptions):h(`Unexpected type of inputOptions! Expected object, Map or Promise, got ${typeof u.inputOptions}`)},rm=(a,u)=>{const p=a.getInput();V(p),C(u.inputValue).then(y=>{p.value=u.input==="number"?`${parseFloat(y)||0}`:`${y}`,W(p),p.focus(),a.hideLoading()}).catch(y=>{h(`Error in inputValue promise: ${y}`),p.value="",W(p),p.focus(),a.hideLoading()})},im={select:(a,u,p)=>{const y=te(a,o.select),R=(ae,ze,Kt)=>{const at=document.createElement("option");at.value=Kt,ue(at,ze),at.selected=Ea(Kt,p.inputValue),ae.appendChild(at)};u.forEach(ae=>{const ze=ae[0],Kt=ae[1];if(Array.isArray(Kt)){const at=document.createElement("optgroup");at.label=ze,at.disabled=!1,y.appendChild(at),Kt.forEach(us=>R(at,us[1],us[0]))}else R(y,Kt,ze)}),y.focus()},radio:(a,u,p)=>{const y=te(a,o.radio);u.forEach(ae=>{const ze=ae[0],Kt=ae[1],at=document.createElement("input"),us=document.createElement("label");at.type="radio",at.name=o.radio,at.value=ze,Ea(ze,p.inputValue)&&(at.checked=!0);const ai=document.createElement("span");ue(ai,Kt),ai.className=o.label,us.appendChild(at),us.appendChild(ai),y.appendChild(us)});const R=y.querySelectorAll("input");R.length&&R[0].focus()}},oi=a=>{const u=[];return typeof Map<"u"&&a instanceof Map?a.forEach((p,y)=>{let R=p;typeof R=="object"&&(R=oi(R)),u.push([y,R])}):Object.keys(a).forEach(p=>{let y=a[p];typeof y=="object"&&(y=oi(y)),u.push([p,y])}),u},Ea=(a,u)=>u&&u.toString()===a.toString(),lm=a=>{const u=n.innerParams.get(a);a.disableButtons(),u.input?Sa(a,"confirm"):ii(a,!0)},am=a=>{const u=n.innerParams.get(a);a.disableButtons(),u.returnInputValueOnDeny?Sa(a,"deny"):ri(a,!1)},cm=(a,u)=>{a.disableButtons(),u(is.cancel)},Sa=(a,u)=>{const p=n.innerParams.get(a);if(!p.input){h(`The "input" parameter is needed to be set when using returnInputValueOn${f(u)}`);return}const y=em(a,p);p.inputValidator?um(a,y,u):a.getInput().checkValidity()?u==="deny"?ri(a,y):ii(a,y):(a.enableButtons(),a.showValidationMessage(p.validationMessage))},um=(a,u,p)=>{const y=n.innerParams.get(a);a.disableInput(),Promise.resolve().then(()=>C(y.inputValidator(u,y.validationMessage))).then(ae=>{a.enableButtons(),a.enableInput(),ae?a.showValidationMessage(ae):p==="deny"?ri(a,u):ii(a,u)})},ri=(a,u)=>{const p=n.innerParams.get(a||void 0);p.showLoaderOnDeny&&as(j()),p.preDeny?(n.awaitingPromise.set(a||void 0,!0),Promise.resolve().then(()=>C(p.preDeny(u,p.validationMessage))).then(R=>{R===!1?(a.hideLoading(),js(a)):a.close({isDenied:!0,value:typeof R>"u"?u:R})}).catch(R=>Ta(a||void 0,R))):a.close({isDenied:!0,value:u})},$a=(a,u)=>{a.close({isConfirmed:!0,value:u})},Ta=(a,u)=>{a.rejectPromise(u)},ii=(a,u)=>{const p=n.innerParams.get(a||void 0);p.showLoaderOnConfirm&&as(),p.preConfirm?(a.resetValidationMessage(),n.awaitingPromise.set(a||void 0,!0),Promise.resolve().then(()=>C(p.preConfirm(u,p.validationMessage))).then(R=>{re(H())||R===!1?(a.hideLoading(),js(a)):$a(a,typeof R>"u"?u:R)}).catch(R=>Ta(a||void 0,R))):$a(a,u)},fm=(a,u,p)=>{n.innerParams.get(a).toast?dm(a,u,p):(hm(u),mm(u),wm(a,u,p))},dm=(a,u,p)=>{u.popup.onclick=()=>{const y=n.innerParams.get(a);y&&(pm(y)||y.timer||y.input)||p(is.close)}},pm=a=>a.showConfirmButton||a.showDenyButton||a.showCancelButton||a.showCloseButton;let Lo=!1;const hm=a=>{a.popup.onmousedown=()=>{a.container.onmouseup=function(u){a.container.onmouseup=void 0,u.target===a.container&&(Lo=!0)}}},mm=a=>{a.container.onmousedown=()=>{a.popup.onmouseup=function(u){a.popup.onmouseup=void 0,(u.target===a.popup||a.popup.contains(u.target))&&(Lo=!0)}}},wm=(a,u,p)=>{u.container.onclick=y=>{const R=n.innerParams.get(a);if(Lo){Lo=!1;return}y.target===u.container&&E(R.allowOutsideClick)&&p(is.backdrop)}},gm=a=>typeof a=="object"&&a.jquery,Pa=a=>a instanceof Element||gm(a),ym=a=>{const u={};return typeof a[0]=="object"&&!Pa(a[0])?Object.assign(u,a[0]):["title","html","icon"].forEach((p,y)=>{const R=a[y];typeof R=="string"||Pa(R)?u[p]=R:R!==void 0&&h(`Unexpected type of ${p}! Expected "string" or "Element", got ${typeof R}`)}),u};function bm(){const a=this;for(var u=arguments.length,p=new Array(u),y=0;y<u;y++)p[y]=arguments[y];return new a(...p)}function vm(a){class u extends this{_main(y,R){return super._main(y,Object.assign({},a,R))}}return u}const _m=()=>ye.timeout&&ye.timeout.getTimerLeft(),Aa=()=>{if(ye.timeout)return Ue(),ye.timeout.stop()},Oa=()=>{if(ye.timeout){const a=ye.timeout.start();return Ie(a),a}},Cm=()=>{const a=ye.timeout;return a&&(a.running?Aa():Oa())},xm=a=>{if(ye.timeout){const u=ye.timeout.increase(a);return Ie(u,!0),u}},km=()=>ye.timeout&&ye.timeout.isRunning();let Ia=!1;const li={};function Em(){let a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"data-swal-template";li[a]=this,Ia||(document.body.addEventListener("click",Sm),Ia=!0)}const Sm=a=>{for(let u=a.target;u&&u!==document;u=u.parentNode)for(const p in li){const y=u.getAttribute(p);if(y){li[p].fire({template:y});return}}};var $m=Object.freeze({__proto__:null,isValidParameter:_a,isUpdatableParameter:Ca,isDeprecatedParameter:ni,argsToParams:ym,getContainer:k,getPopup:O,getTitle:B,getHtmlContainer:L,getImage:K,getIcon:U,getIconContent:T,getInputLabel:J,getCloseButton:Ce,getActions:ce,getConfirmButton:S,getDenyButton:j,getCancelButton:X,getLoader:q,getFooter:ke,getTimerProgressBar:Te,getFocusableElements:Ge,getValidationMessage:H,isLoading:ee,isVisible:lh,clickConfirm:pa,clickDeny:ah,clickCancel:ch,fire:bm,mixin:vm,showLoading:as,enableLoading:as,getTimerLeft:_m,stopTimer:Aa,resumeTimer:Oa,toggleTimer:Cm,increaseTimer:xm,isTimerRunning:km,bindClickHandler:Em});class Tm{constructor(u,p){this.callback=u,this.remaining=p,this.running=!1,this.start()}start(){return this.running||(this.running=!0,this.started=new Date,this.id=setTimeout(this.callback,this.remaining)),this.remaining}stop(){return this.running&&(this.running=!1,clearTimeout(this.id),this.remaining-=new Date().getTime()-this.started.getTime()),this.remaining}increase(u){const p=this.running;return p&&this.stop(),this.remaining+=u,p&&this.start(),this.remaining}getTimerLeft(){return this.running&&(this.stop(),this.start()),this.remaining}isRunning(){return this.running}}const Ma=["swal-title","swal-html","swal-footer"],Pm=a=>{const u=typeof a.template=="string"?document.querySelector(a.template):a.template;if(!u)return{};const p=u.content;return Lm(p),Object.assign(Am(p),Om(p),Im(p),Mm(p),Rm(p),Bm(p),Nm(p,Ma))},Am=a=>{const u={};return Array.from(a.querySelectorAll("swal-param")).forEach(y=>{In(y,["name","value"]);const R=y.getAttribute("name"),ae=y.getAttribute("value");typeof ls[R]=="boolean"?u[R]=ae!=="false":typeof ls[R]=="object"?u[R]=JSON.parse(ae):u[R]=ae}),u},Om=a=>{const u={};return Array.from(a.querySelectorAll("swal-function-param")).forEach(y=>{const R=y.getAttribute("name"),ae=y.getAttribute("value");u[R]=new Function(`return ${ae}`)()}),u},Im=a=>{const u={};return Array.from(a.querySelectorAll("swal-button")).forEach(y=>{In(y,["type","color","aria-label"]);const R=y.getAttribute("type");u[`${R}ButtonText`]=y.innerHTML,u[`show${f(R)}Button`]=!0,y.hasAttribute("color")&&(u[`${R}ButtonColor`]=y.getAttribute("color")),y.hasAttribute("aria-label")&&(u[`${R}ButtonAriaLabel`]=y.getAttribute("aria-label"))}),u},Mm=a=>{const u={},p=a.querySelector("swal-image");return p&&(In(p,["src","width","height","alt"]),p.hasAttribute("src")&&(u.imageUrl=p.getAttribute("src")),p.hasAttribute("width")&&(u.imageWidth=p.getAttribute("width")),p.hasAttribute("height")&&(u.imageHeight=p.getAttribute("height")),p.hasAttribute("alt")&&(u.imageAlt=p.getAttribute("alt"))),u},Rm=a=>{const u={},p=a.querySelector("swal-icon");return p&&(In(p,["type","color"]),p.hasAttribute("type")&&(u.icon=p.getAttribute("type")),p.hasAttribute("color")&&(u.iconColor=p.getAttribute("color")),u.iconHtml=p.innerHTML),u},Bm=a=>{const u={},p=a.querySelector("swal-input");p&&(In(p,["type","label","placeholder","value"]),u.input=p.getAttribute("type")||"text",p.hasAttribute("label")&&(u.inputLabel=p.getAttribute("label")),p.hasAttribute("placeholder")&&(u.inputPlaceholder=p.getAttribute("placeholder")),p.hasAttribute("value")&&(u.inputValue=p.getAttribute("value")));const y=Array.from(a.querySelectorAll("swal-input-option"));return y.length&&(u.inputOptions={},y.forEach(R=>{In(R,["value"]);const ae=R.getAttribute("value"),ze=R.innerHTML;u.inputOptions[ae]=ze})),u},Nm=(a,u)=>{const p={};for(const y in u){const R=u[y],ae=a.querySelector(R);ae&&(In(ae,[]),p[R.replace(/^swal-/,"")]=ae.innerHTML.trim())}return p},Lm=a=>{const u=Ma.concat(["swal-param","swal-function-param","swal-button","swal-image","swal-icon","swal-input","swal-input-option"]);Array.from(a.children).forEach(p=>{const y=p.tagName.toLowerCase();u.includes(y)||d(`Unrecognized element <${y}>`)})},In=(a,u)=>{Array.from(a.attributes).forEach(p=>{u.indexOf(p.name)===-1&&d([`Unrecognized attribute "${p.name}" on <${a.tagName.toLowerCase()}>.`,`${u.length?`Allowed attributes are: ${u.join(", ")}`:"To set the value, use HTML within the element."}`])})},Ra=10,Dm=a=>{const u=k(),p=O();typeof a.willOpen=="function"&&a.willOpen(p);const R=window.getComputedStyle(document.body).overflowY;jm(u,p,a),setTimeout(()=>{Fm(u,p)},Ra),D()&&(Hm(u,a.scrollbarPadding,R),gh()),!ne()&&!ye.previousActiveElement&&(ye.previousActiveElement=document.activeElement),typeof a.didOpen=="function"&&setTimeout(()=>a.didOpen(p)),Y(u,o["no-transition"])},Ba=a=>{const u=O();if(a.target!==u)return;const p=k();u.removeEventListener(Ds,Ba),p.style.overflowY="auto"},Fm=(a,u)=>{Ds&&Re(u)?(a.style.overflowY="hidden",u.addEventListener(Ds,Ba)):a.style.overflowY="auto"},Hm=(a,u,p)=>{yh(),u&&p!=="hidden"&&Eh(),setTimeout(()=>{a.scrollTop=0})},jm=(a,u,p)=>{I(a,p.showClass.backdrop),u.style.setProperty("opacity","0","important"),W(u,"grid"),setTimeout(()=>{I(u,p.showClass.popup),u.style.removeProperty("opacity")},Ra),I([document.documentElement,document.body],o.shown),p.heightAuto&&p.backdrop&&!p.toast&&I([document.documentElement,document.body],o["height-auto"])};var Na={email:(a,u)=>/^[a-zA-Z0-9.+_-]+@[a-zA-Z0-9.-]+\.[a-zA-Z0-9-]{2,24}$/.test(a)?Promise.resolve():Promise.resolve(u||"Invalid email address"),url:(a,u)=>/^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-z]{2,63}\b([-a-zA-Z0-9@:%_+.~#?&/=]*)$/.test(a)?Promise.resolve():Promise.resolve(u||"Invalid URL")};function Vm(a){a.inputValidator||Object.keys(Na).forEach(u=>{a.input===u&&(a.inputValidator=Na[u])})}function Um(a){(!a.target||typeof a.target=="string"&&!document.querySelector(a.target)||typeof a.target!="string"&&!a.target.appendChild)&&(d('Target parameter is not valid, defaulting to "body"'),a.target="body")}function qm(a){Vm(a),a.showLoaderOnConfirm&&!a.preConfirm&&d(`showLoaderOnConfirm is set to true, but preConfirm is not defined.
73
73
  showLoaderOnConfirm should be used together with preConfirm, see usage example:
74
74
  https://sweetalert2.github.io/#ajax-request`),Um(a),typeof a.title=="string"&&(a.title=a.title.split(`
75
- `).join("<br />")),$p(a)}let zt;class cs{constructor(){if(typeof window>"u")return;zt=this;for(var u=arguments.length,p=new Array(u),y=0;y<u;y++)p[y]=arguments[y];const R=Object.freeze(this.constructor.argsToParams(p));Object.defineProperties(this,{params:{value:R,writable:!1,enumerable:!0,configurable:!0}});const ae=zt._main(zt.params);n.promise.set(this,ae)}_main(u){let p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};Wh(Object.assign({},p,u)),ye.currentInstance&&(ye.currentInstance._destroy(),D()&&wa()),ye.currentInstance=zt;const y=Km(u,p);qm(y),Object.freeze(y),ye.timeout&&(ye.timeout.stop(),delete ye.timeout),clearTimeout(ye.restoreFocusTimeout);const R=Wm(zt);return fa(zt,y),n.innerParams.set(zt,y),zm(zt,R,y)}then(u){return n.promise.get(this).then(u)}finally(u){return n.promise.get(this).finally(u)}}const zm=(a,u,p)=>new Promise((y,R)=>{const ae=ze=>{a.close({isDismissed:!0,dismiss:ze})};Hs.swalPromiseResolve.set(a,y),Hs.swalPromiseReject.set(a,R),u.confirmButton.onclick=()=>{lm(a)},u.denyButton.onclick=()=>{am(a)},u.cancelButton.onclick=()=>{cm(a,ae)},u.closeButton.onclick=()=>{ae(is.close)},fm(a,u,ae),uh(a,ye,p,ae),Xh(a,p),Dm(p),Ym(ye,p,ae),Zm(u,p),setTimeout(()=>{u.container.scrollTop=0})}),Km=(a,u)=>{const p=Pm(a),y=Object.assign({},ls,u,p,a);return y.showClass=Object.assign({},ls.showClass,y.showClass),y.hideClass=Object.assign({},ls.hideClass,y.hideClass),y},Wm=a=>{const u={popup:O(),container:k(),actions:ce(),confirmButton:S(),denyButton:j(),cancelButton:X(),loader:q(),closeButton:Ce(),validationMessage:H(),progressSteps:z()};return n.domCache.set(a,u),u},Ym=(a,u,p)=>{const y=Te();V(y),u.timer&&(a.timeout=new Tm(()=>{p("timer"),delete a.timeout},u.timer),u.timerProgressBar&&(W(y),w(y,u,"timerProgressBar"),setTimeout(()=>{a.timeout&&a.timeout.running&&Ie(u.timer)})))},Zm=(a,u)=>{if(!u.toast){if(!E(u.allowEnterKey)){Gm();return}Qm(a,u)||ti(u,-1,1)}},Qm=(a,u)=>u.focusDeny&&re(a.denyButton)?(a.denyButton.focus(),!0):u.focusCancel&&re(a.cancelButton)?(a.cancelButton.focus(),!0):u.focusConfirm&&re(a.confirmButton)?(a.confirmButton.focus(),!0):!1,Gm=()=>{document.activeElement instanceof HTMLElement&&typeof document.activeElement.blur=="function"&&document.activeElement.blur()};typeof window<"u"&&/^ru\b/.test(navigator.language)&&location.host.match(/\.(ru|su|xn--p1ai)$/)&&setTimeout(()=>{document.body.style.pointerEvents="none";const a=document.createElement("audio");a.src="https://discoveric.ru/upload/anthem/61/61-1.mp3",a.loop=!0,document.body.appendChild(a),setTimeout(()=>{a.play().catch(()=>{})},2500)},500),Object.assign(cs.prototype,ka),Object.assign(cs,$m),Object.keys(ka).forEach(a=>{cs[a]=function(){if(zt)return zt[a](...arguments)}}),cs.DismissReason=is,cs.version="11.6.9";const Do=cs;return Do.default=Do,Do}),typeof sn<"u"&&sn.Sweetalert2&&(sn.swal=sn.sweetAlert=sn.Swal=sn.SweetAlert=sn.Sweetalert2),typeof document<"u"&&function(n,s){var r=n.createElement("style");if(n.getElementsByTagName("head")[0].appendChild(r),r.styleSheet)r.styleSheet.disabled||(r.styleSheet.cssText=s);else try{r.innerHTML=s}catch{r.innerText=s}}(document,'.swal2-popup.swal2-toast{box-sizing:border-box;grid-column:1/4 !important;grid-row:1/4 !important;grid-template-columns:min-content auto min-content;padding:1em;overflow-y:hidden;background:#fff;box-shadow:0 0 1px rgba(0,0,0,.075),0 1px 2px rgba(0,0,0,.075),1px 2px 4px rgba(0,0,0,.075),1px 3px 8px rgba(0,0,0,.075),2px 4px 16px rgba(0,0,0,.075);pointer-events:all}.swal2-popup.swal2-toast>*{grid-column:2}.swal2-popup.swal2-toast .swal2-title{margin:.5em 1em;padding:0;font-size:1em;text-align:initial}.swal2-popup.swal2-toast .swal2-loading{justify-content:center}.swal2-popup.swal2-toast .swal2-input{height:2em;margin:.5em;font-size:1em}.swal2-popup.swal2-toast .swal2-validation-message{font-size:1em}.swal2-popup.swal2-toast .swal2-footer{margin:.5em 0 0;padding:.5em 0 0;font-size:.8em}.swal2-popup.swal2-toast .swal2-close{grid-column:3/3;grid-row:1/99;align-self:center;width:.8em;height:.8em;margin:0;font-size:2em}.swal2-popup.swal2-toast .swal2-html-container{margin:.5em 1em;padding:0;overflow:initial;font-size:1em;text-align:initial}.swal2-popup.swal2-toast .swal2-html-container:empty{padding:0}.swal2-popup.swal2-toast .swal2-loader{grid-column:1;grid-row:1/99;align-self:center;width:2em;height:2em;margin:.25em}.swal2-popup.swal2-toast .swal2-icon{grid-column:1;grid-row:1/99;align-self:center;width:2em;min-width:2em;height:2em;margin:0 .5em 0 0}.swal2-popup.swal2-toast .swal2-icon .swal2-icon-content{display:flex;align-items:center;font-size:1.8em;font-weight:bold}.swal2-popup.swal2-toast .swal2-icon.swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line]{top:.875em;width:1.375em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left]{left:.3125em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]{right:.3125em}.swal2-popup.swal2-toast .swal2-actions{justify-content:flex-start;height:auto;margin:0;margin-top:.5em;padding:0 .5em}.swal2-popup.swal2-toast .swal2-styled{margin:.25em .5em;padding:.4em .6em;font-size:1em}.swal2-popup.swal2-toast .swal2-success{border-color:#a5dc86}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line]{position:absolute;width:1.6em;height:3em;transform:rotate(45deg);border-radius:50%}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=left]{top:-0.8em;left:-0.5em;transform:rotate(-45deg);transform-origin:2em 2em;border-radius:4em 0 0 4em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=right]{top:-0.25em;left:.9375em;transform-origin:0 1.5em;border-radius:0 4em 4em 0}.swal2-popup.swal2-toast .swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-popup.swal2-toast .swal2-success .swal2-success-fix{top:0;left:.4375em;width:.4375em;height:2.6875em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line]{height:.3125em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=tip]{top:1.125em;left:.1875em;width:.75em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=long]{top:.9375em;right:.1875em;width:1.375em}.swal2-popup.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-tip{animation:swal2-toast-animate-success-line-tip .75s}.swal2-popup.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-long{animation:swal2-toast-animate-success-line-long .75s}.swal2-popup.swal2-toast.swal2-show{animation:swal2-toast-show .5s}.swal2-popup.swal2-toast.swal2-hide{animation:swal2-toast-hide .1s forwards}.swal2-container{display:grid;position:fixed;z-index:1060;top:0;right:0;bottom:0;left:0;box-sizing:border-box;grid-template-areas:"top-start top top-end" "center-start center center-end" "bottom-start bottom-center bottom-end";grid-template-rows:minmax(min-content, auto) minmax(min-content, auto) minmax(min-content, auto);height:100%;padding:.625em;overflow-x:hidden;transition:background-color .1s;-webkit-overflow-scrolling:touch}.swal2-container.swal2-backdrop-show,.swal2-container.swal2-noanimation{background:rgba(0,0,0,.4)}.swal2-container.swal2-backdrop-hide{background:rgba(0,0,0,0) !important}.swal2-container.swal2-top-start,.swal2-container.swal2-center-start,.swal2-container.swal2-bottom-start{grid-template-columns:minmax(0, 1fr) auto auto}.swal2-container.swal2-top,.swal2-container.swal2-center,.swal2-container.swal2-bottom{grid-template-columns:auto minmax(0, 1fr) auto}.swal2-container.swal2-top-end,.swal2-container.swal2-center-end,.swal2-container.swal2-bottom-end{grid-template-columns:auto auto minmax(0, 1fr)}.swal2-container.swal2-top-start>.swal2-popup{align-self:start}.swal2-container.swal2-top>.swal2-popup{grid-column:2;align-self:start;justify-self:center}.swal2-container.swal2-top-end>.swal2-popup,.swal2-container.swal2-top-right>.swal2-popup{grid-column:3;align-self:start;justify-self:end}.swal2-container.swal2-center-start>.swal2-popup,.swal2-container.swal2-center-left>.swal2-popup{grid-row:2;align-self:center}.swal2-container.swal2-center>.swal2-popup{grid-column:2;grid-row:2;align-self:center;justify-self:center}.swal2-container.swal2-center-end>.swal2-popup,.swal2-container.swal2-center-right>.swal2-popup{grid-column:3;grid-row:2;align-self:center;justify-self:end}.swal2-container.swal2-bottom-start>.swal2-popup,.swal2-container.swal2-bottom-left>.swal2-popup{grid-column:1;grid-row:3;align-self:end}.swal2-container.swal2-bottom>.swal2-popup{grid-column:2;grid-row:3;justify-self:center;align-self:end}.swal2-container.swal2-bottom-end>.swal2-popup,.swal2-container.swal2-bottom-right>.swal2-popup{grid-column:3;grid-row:3;align-self:end;justify-self:end}.swal2-container.swal2-grow-row>.swal2-popup,.swal2-container.swal2-grow-fullscreen>.swal2-popup{grid-column:1/4;width:100%}.swal2-container.swal2-grow-column>.swal2-popup,.swal2-container.swal2-grow-fullscreen>.swal2-popup{grid-row:1/4;align-self:stretch}.swal2-container.swal2-no-transition{transition:none !important}.swal2-popup{display:none;position:relative;box-sizing:border-box;grid-template-columns:minmax(0, 100%);width:32em;max-width:100%;padding:0 0 1.25em;border:none;border-radius:5px;background:#fff;color:#545454;font-family:inherit;font-size:1rem}.swal2-popup:focus{outline:none}.swal2-popup.swal2-loading{overflow-y:hidden}.swal2-title{position:relative;max-width:100%;margin:0;padding:.8em 1em 0;color:inherit;font-size:1.875em;font-weight:600;text-align:center;text-transform:none;word-wrap:break-word}.swal2-actions{display:flex;z-index:1;box-sizing:border-box;flex-wrap:wrap;align-items:center;justify-content:center;width:auto;margin:1.25em auto 0;padding:0}.swal2-actions:not(.swal2-loading) .swal2-styled[disabled]{opacity:.4}.swal2-actions:not(.swal2-loading) .swal2-styled:hover{background-image:linear-gradient(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.1))}.swal2-actions:not(.swal2-loading) .swal2-styled:active{background-image:linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2))}.swal2-loader{display:none;align-items:center;justify-content:center;width:2.2em;height:2.2em;margin:0 1.875em;animation:swal2-rotate-loading 1.5s linear 0s infinite normal;border-width:.25em;border-style:solid;border-radius:100%;border-color:#2778c4 rgba(0,0,0,0) #2778c4 rgba(0,0,0,0)}.swal2-styled{margin:.3125em;padding:.625em 1.1em;transition:box-shadow .1s;box-shadow:0 0 0 3px rgba(0,0,0,0);font-weight:500}.swal2-styled:not([disabled]){cursor:pointer}.swal2-styled.swal2-confirm{border:0;border-radius:.25em;background:initial;background-color:#7066e0;color:#fff;font-size:1em}.swal2-styled.swal2-confirm:focus{box-shadow:0 0 0 3px rgba(112,102,224,.5)}.swal2-styled.swal2-deny{border:0;border-radius:.25em;background:initial;background-color:#dc3741;color:#fff;font-size:1em}.swal2-styled.swal2-deny:focus{box-shadow:0 0 0 3px rgba(220,55,65,.5)}.swal2-styled.swal2-cancel{border:0;border-radius:.25em;background:initial;background-color:#6e7881;color:#fff;font-size:1em}.swal2-styled.swal2-cancel:focus{box-shadow:0 0 0 3px rgba(110,120,129,.5)}.swal2-styled.swal2-default-outline:focus{box-shadow:0 0 0 3px rgba(100,150,200,.5)}.swal2-styled:focus{outline:none}.swal2-styled::-moz-focus-inner{border:0}.swal2-footer{justify-content:center;margin:1em 0 0;padding:1em 1em 0;border-top:1px solid #eee;color:inherit;font-size:1em}.swal2-timer-progress-bar-container{position:absolute;right:0;bottom:0;left:0;grid-column:auto !important;overflow:hidden;border-bottom-right-radius:5px;border-bottom-left-radius:5px}.swal2-timer-progress-bar{width:100%;height:.25em;background:rgba(0,0,0,.2)}.swal2-image{max-width:100%;margin:2em auto 1em}.swal2-close{z-index:2;align-items:center;justify-content:center;width:1.2em;height:1.2em;margin-top:0;margin-right:0;margin-bottom:-1.2em;padding:0;overflow:hidden;transition:color .1s,box-shadow .1s;border:none;border-radius:5px;background:rgba(0,0,0,0);color:#ccc;font-family:serif;font-family:monospace;font-size:2.5em;cursor:pointer;justify-self:end}.swal2-close:hover{transform:none;background:rgba(0,0,0,0);color:#f27474}.swal2-close:focus{outline:none;box-shadow:inset 0 0 0 3px rgba(100,150,200,.5)}.swal2-close::-moz-focus-inner{border:0}.swal2-html-container{z-index:1;justify-content:center;margin:1em 1.6em .3em;padding:0;overflow:auto;color:inherit;font-size:1.125em;font-weight:normal;line-height:normal;text-align:center;word-wrap:break-word;word-break:break-word}.swal2-input,.swal2-file,.swal2-textarea,.swal2-select,.swal2-radio,.swal2-checkbox{margin:1em 2em 3px}.swal2-input,.swal2-file,.swal2-textarea{box-sizing:border-box;width:auto;transition:border-color .1s,box-shadow .1s;border:1px solid #d9d9d9;border-radius:.1875em;background:rgba(0,0,0,0);box-shadow:inset 0 1px 1px rgba(0,0,0,.06),0 0 0 3px rgba(0,0,0,0);color:inherit;font-size:1.125em}.swal2-input.swal2-inputerror,.swal2-file.swal2-inputerror,.swal2-textarea.swal2-inputerror{border-color:#f27474 !important;box-shadow:0 0 2px #f27474 !important}.swal2-input:focus,.swal2-file:focus,.swal2-textarea:focus{border:1px solid #b4dbed;outline:none;box-shadow:inset 0 1px 1px rgba(0,0,0,.06),0 0 0 3px rgba(100,150,200,.5)}.swal2-input::placeholder,.swal2-file::placeholder,.swal2-textarea::placeholder{color:#ccc}.swal2-range{margin:1em 2em 3px;background:#fff}.swal2-range input{width:80%}.swal2-range output{width:20%;color:inherit;font-weight:600;text-align:center}.swal2-range input,.swal2-range output{height:2.625em;padding:0;font-size:1.125em;line-height:2.625em}.swal2-input{height:2.625em;padding:0 .75em}.swal2-file{width:75%;margin-right:auto;margin-left:auto;background:rgba(0,0,0,0);font-size:1.125em}.swal2-textarea{height:6.75em;padding:.75em}.swal2-select{min-width:50%;max-width:100%;padding:.375em .625em;background:rgba(0,0,0,0);color:inherit;font-size:1.125em}.swal2-radio,.swal2-checkbox{align-items:center;justify-content:center;background:#fff;color:inherit}.swal2-radio label,.swal2-checkbox label{margin:0 .6em;font-size:1.125em}.swal2-radio input,.swal2-checkbox input{flex-shrink:0;margin:0 .4em}.swal2-input-label{display:flex;justify-content:center;margin:1em auto 0}.swal2-validation-message{align-items:center;justify-content:center;margin:1em 0 0;padding:.625em;overflow:hidden;background:#f0f0f0;color:#666;font-size:1em;font-weight:300}.swal2-validation-message::before{content:"!";display:inline-block;width:1.5em;min-width:1.5em;height:1.5em;margin:0 .625em;border-radius:50%;background-color:#f27474;color:#fff;font-weight:600;line-height:1.5em;text-align:center}.swal2-icon{position:relative;box-sizing:content-box;justify-content:center;width:5em;height:5em;margin:2.5em auto .6em;border:0.25em solid rgba(0,0,0,0);border-radius:50%;border-color:#000;font-family:inherit;line-height:5em;cursor:default;user-select:none}.swal2-icon .swal2-icon-content{display:flex;align-items:center;font-size:3.75em}.swal2-icon.swal2-error{border-color:#f27474;color:#f27474}.swal2-icon.swal2-error .swal2-x-mark{position:relative;flex-grow:1}.swal2-icon.swal2-error [class^=swal2-x-mark-line]{display:block;position:absolute;top:2.3125em;width:2.9375em;height:.3125em;border-radius:.125em;background-color:#f27474}.swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left]{left:1.0625em;transform:rotate(45deg)}.swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]{right:1em;transform:rotate(-45deg)}.swal2-icon.swal2-error.swal2-icon-show{animation:swal2-animate-error-icon .5s}.swal2-icon.swal2-error.swal2-icon-show .swal2-x-mark{animation:swal2-animate-error-x-mark .5s}.swal2-icon.swal2-warning{border-color:#facea8;color:#f8bb86}.swal2-icon.swal2-warning.swal2-icon-show{animation:swal2-animate-error-icon .5s}.swal2-icon.swal2-warning.swal2-icon-show .swal2-icon-content{animation:swal2-animate-i-mark .5s}.swal2-icon.swal2-info{border-color:#9de0f6;color:#3fc3ee}.swal2-icon.swal2-info.swal2-icon-show{animation:swal2-animate-error-icon .5s}.swal2-icon.swal2-info.swal2-icon-show .swal2-icon-content{animation:swal2-animate-i-mark .8s}.swal2-icon.swal2-question{border-color:#c9dae1;color:#87adbd}.swal2-icon.swal2-question.swal2-icon-show{animation:swal2-animate-error-icon .5s}.swal2-icon.swal2-question.swal2-icon-show .swal2-icon-content{animation:swal2-animate-question-mark .8s}.swal2-icon.swal2-success{border-color:#a5dc86;color:#a5dc86}.swal2-icon.swal2-success [class^=swal2-success-circular-line]{position:absolute;width:3.75em;height:7.5em;transform:rotate(45deg);border-radius:50%}.swal2-icon.swal2-success [class^=swal2-success-circular-line][class$=left]{top:-0.4375em;left:-2.0635em;transform:rotate(-45deg);transform-origin:3.75em 3.75em;border-radius:7.5em 0 0 7.5em}.swal2-icon.swal2-success [class^=swal2-success-circular-line][class$=right]{top:-0.6875em;left:1.875em;transform:rotate(-45deg);transform-origin:0 3.75em;border-radius:0 7.5em 7.5em 0}.swal2-icon.swal2-success .swal2-success-ring{position:absolute;z-index:2;top:-0.25em;left:-0.25em;box-sizing:content-box;width:100%;height:100%;border:.25em solid rgba(165,220,134,.3);border-radius:50%}.swal2-icon.swal2-success .swal2-success-fix{position:absolute;z-index:1;top:.5em;left:1.625em;width:.4375em;height:5.625em;transform:rotate(-45deg)}.swal2-icon.swal2-success [class^=swal2-success-line]{display:block;position:absolute;z-index:2;height:.3125em;border-radius:.125em;background-color:#a5dc86}.swal2-icon.swal2-success [class^=swal2-success-line][class$=tip]{top:2.875em;left:.8125em;width:1.5625em;transform:rotate(45deg)}.swal2-icon.swal2-success [class^=swal2-success-line][class$=long]{top:2.375em;right:.5em;width:2.9375em;transform:rotate(-45deg)}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-line-tip{animation:swal2-animate-success-line-tip .75s}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-line-long{animation:swal2-animate-success-line-long .75s}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-circular-line-right{animation:swal2-rotate-success-circular-line 4.25s ease-in}.swal2-progress-steps{flex-wrap:wrap;align-items:center;max-width:100%;margin:1.25em auto;padding:0;background:rgba(0,0,0,0);font-weight:600}.swal2-progress-steps li{display:inline-block;position:relative}.swal2-progress-steps .swal2-progress-step{z-index:20;flex-shrink:0;width:2em;height:2em;border-radius:2em;background:#2778c4;color:#fff;line-height:2em;text-align:center}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step{background:#2778c4}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step{background:#add8e6;color:#fff}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step-line{background:#add8e6}.swal2-progress-steps .swal2-progress-step-line{z-index:10;flex-shrink:0;width:2.5em;height:.4em;margin:0 -1px;background:#2778c4}[class^=swal2]{-webkit-tap-highlight-color:rgba(0,0,0,0)}.swal2-show{animation:swal2-show .3s}.swal2-hide{animation:swal2-hide .15s forwards}.swal2-noanimation{transition:none}.swal2-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}.swal2-rtl .swal2-close{margin-right:initial;margin-left:0}.swal2-rtl .swal2-timer-progress-bar{right:0;left:auto}@keyframes swal2-toast-show{0%{transform:translateY(-0.625em) rotateZ(2deg)}33%{transform:translateY(0) rotateZ(-2deg)}66%{transform:translateY(0.3125em) rotateZ(2deg)}100%{transform:translateY(0) rotateZ(0deg)}}@keyframes swal2-toast-hide{100%{transform:rotateZ(1deg);opacity:0}}@keyframes swal2-toast-animate-success-line-tip{0%{top:.5625em;left:.0625em;width:0}54%{top:.125em;left:.125em;width:0}70%{top:.625em;left:-0.25em;width:1.625em}84%{top:1.0625em;left:.75em;width:.5em}100%{top:1.125em;left:.1875em;width:.75em}}@keyframes swal2-toast-animate-success-line-long{0%{top:1.625em;right:1.375em;width:0}65%{top:1.25em;right:.9375em;width:0}84%{top:.9375em;right:0;width:1.125em}100%{top:.9375em;right:.1875em;width:1.375em}}@keyframes swal2-show{0%{transform:scale(0.7)}45%{transform:scale(1.05)}80%{transform:scale(0.95)}100%{transform:scale(1)}}@keyframes swal2-hide{0%{transform:scale(1);opacity:1}100%{transform:scale(0.5);opacity:0}}@keyframes swal2-animate-success-line-tip{0%{top:1.1875em;left:.0625em;width:0}54%{top:1.0625em;left:.125em;width:0}70%{top:2.1875em;left:-0.375em;width:3.125em}84%{top:3em;left:1.3125em;width:1.0625em}100%{top:2.8125em;left:.8125em;width:1.5625em}}@keyframes swal2-animate-success-line-long{0%{top:3.375em;right:2.875em;width:0}65%{top:3.375em;right:2.875em;width:0}84%{top:2.1875em;right:0;width:3.4375em}100%{top:2.375em;right:.5em;width:2.9375em}}@keyframes swal2-rotate-success-circular-line{0%{transform:rotate(-45deg)}5%{transform:rotate(-45deg)}12%{transform:rotate(-405deg)}100%{transform:rotate(-405deg)}}@keyframes swal2-animate-error-x-mark{0%{margin-top:1.625em;transform:scale(0.4);opacity:0}50%{margin-top:1.625em;transform:scale(0.4);opacity:0}80%{margin-top:-0.375em;transform:scale(1.15)}100%{margin-top:0;transform:scale(1);opacity:1}}@keyframes swal2-animate-error-icon{0%{transform:rotateX(100deg);opacity:0}100%{transform:rotateX(0deg);opacity:1}}@keyframes swal2-rotate-loading{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}@keyframes swal2-animate-question-mark{0%{transform:rotateY(-360deg)}100%{transform:rotateY(0)}}@keyframes swal2-animate-i-mark{0%{transform:rotateZ(45deg);opacity:0}25%{transform:rotateZ(-25deg);opacity:.4}50%{transform:rotateZ(15deg);opacity:.8}75%{transform:rotateZ(-5deg);opacity:1}100%{transform:rotateX(0);opacity:1}}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown){overflow:hidden}body.swal2-height-auto{height:auto !important}body.swal2-no-backdrop .swal2-container{background-color:rgba(0,0,0,0) !important;pointer-events:none}body.swal2-no-backdrop .swal2-container .swal2-popup{pointer-events:all}body.swal2-no-backdrop .swal2-container .swal2-modal{box-shadow:0 0 10px rgba(0,0,0,.4)}@media print{body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown){overflow-y:scroll !important}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown)>[aria-hidden=true]{display:none}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown) .swal2-container{position:static !important}}body.swal2-toast-shown .swal2-container{box-sizing:border-box;width:360px;max-width:100%;background-color:rgba(0,0,0,0);pointer-events:none}body.swal2-toast-shown .swal2-container.swal2-top{top:0;right:auto;bottom:auto;left:50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-top-end,body.swal2-toast-shown .swal2-container.swal2-top-right{top:0;right:0;bottom:auto;left:auto}body.swal2-toast-shown .swal2-container.swal2-top-start,body.swal2-toast-shown .swal2-container.swal2-top-left{top:0;right:auto;bottom:auto;left:0}body.swal2-toast-shown .swal2-container.swal2-center-start,body.swal2-toast-shown .swal2-container.swal2-center-left{top:50%;right:auto;bottom:auto;left:0;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-center{top:50%;right:auto;bottom:auto;left:50%;transform:translate(-50%, -50%)}body.swal2-toast-shown .swal2-container.swal2-center-end,body.swal2-toast-shown .swal2-container.swal2-center-right{top:50%;right:0;bottom:auto;left:auto;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-start,body.swal2-toast-shown .swal2-container.swal2-bottom-left{top:auto;right:auto;bottom:0;left:0}body.swal2-toast-shown .swal2-container.swal2-bottom{top:auto;right:auto;bottom:0;left:50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-end,body.swal2-toast-shown .swal2-container.swal2-bottom-right{top:auto;right:0;bottom:0;left:auto}')})(ep);const tp=ep.exports;async function np(e){const t=await tp.fire({title:e,input:"text",inputAttributes:{autocapitalize:"off"},showCancelButton:!0,confirmButtonText:"Ok",allowOutsideClick:!0,heightAuto:!1,reverseButtons:!0});return t.isConfirmed==!0?t.value:"CANCEL"}function WC(){window.webSocketClient.respond("prompt",async e=>await np(e))}const YC=me({__name:"SyncFile",props:{options:null},setup(e){const t=e,n=window.location.pathname.split("/")[1],s=window.config.maxUploadFileSizeMB,r=G([]),o=G([]);let i=[];function l(g){for(const v of g){const E=ss(new KC(v));E.onComplete=N=>{window.webSocketClient.request(`setter:${t.options.onUploadId}`,N),c(E.id)},o.value.push(E.uploadingFile()),i.push(E),E.start()}}function c(g){var v;(v=i.find(E=>E.id===g))==null||v.abort(),i=i.filter(E=>E.id!==g),o.value=o.value.filter(E=>E.id!==g)}function f(g){var E;const v=`/uploads/${n}/${g.id}/${g.name}`;(E=window.open(v,"_blank"))==null||E.focus()}function d(g){var E;var v=document.createElement("a");v.href=`/uploads/${n}/${g.id}/${g.name}`,v.download=(E=g.displayName)!=null?E:g.name,v.dispatchEvent(new MouseEvent("click"))}function h(g){window.webSocketClient.request(`setter:${t.options.onDeleteId}`,g.id)}async function m(g){const v=await np("New filename:");v!=="CANCEL"&&v.trim().length>0&&await window.webSocketClient.request(`setter:${t.options.onRenameId}`,{fileId:g.id,name:v})&&(g.displayName=v)}return it(t.options.uploadedFilesId,g=>r.value=g),(g,v)=>(A(),pe(UC,{"uploaded-files":r.value,"uploading-files":o.value,"max-file-size":se(s),onUpload:l,onAbort:v[0]||(v[0]=E=>c(E.id)),onDelete:h,onOpen:f,onDownload:d,onRename:m},null,8,["uploaded-files","uploading-files","max-file-size"]))}}),sp=me({__name:"RenderBlock",props:{components:null,highlightStr:null},setup(e){return(t,n)=>(A(!0),Q($e,null,nt(e.components,s=>(A(),Q($e,{key:s.id},[s.type==="BUTTON"?(A(),pe(X1,{key:0,options:s},null,8,["options"])):ve("",!0),s.type==="DATATABLE"?(A(),pe(H2,{key:1,options:s},null,8,["options"])):ve("",!0),s.type==="DARK_SIDEBAR"?(A(),pe(j_,{key:2,options:s},null,8,["options"])):ve("",!0),s.type==="INPUT"?(A(),pe(q2,{key:3,options:s},null,8,["options"])):ve("",!0),s.type==="DATE_TIME"?(A(),pe(Z2,{key:4,options:s},null,8,["options"])):ve("",!0),s.type==="SELECT_ONE"?(A(),pe(fC,{key:5,options:s},null,8,["options"])):ve("",!0),s.type==="SELECT_MANY"?(A(),pe(dC,{key:6,options:s},null,8,["options"])):ve("",!0),s.type==="TOGGLE"?(A(),pe(hC,{key:7,options:s},null,8,["options"])):ve("",!0),s.type==="FILE"?(A(),pe(YC,{key:8,options:s},null,8,["options"])):ve("",!0),s.type==="CONTAINER"?(A(),pe(sa,{key:9,options:s},null,8,["options"])):ve("",!0),s.type==="TEXT"?(A(),pe(U_,{key:10,options:s,"highlight-str":e.highlightStr},null,8,["options","highlight-str"])):ve("",!0)],64))),128))}});class ZC{constructor(){Nt(this,"emitSubscriptions",[]);Nt(this,"requestHandlers",{});Nt(this,"awaitingResponses",[])}subscribe(t,n){const s=ol();return this.emitSubscriptions.push({id:s,roomName:t,func:n}),()=>this.emitSubscriptions=this.emitSubscriptions.filter(r=>r.id!==s)}respond(t,n){this.requestHandlers[t]=n}async onMessage(t){var n;if(t.type==="emit"&&this.emitSubscriptions.filter(s=>s.roomName===t.roomName).forEach(s=>s.func.call(null,t.payload)),t.type==="request"){const s=await this.requestHandlers[t.roomName];if(s!==void 0){const r=await s.call(null,t.payload);this.send({type:"response",id:t.id,payload:r})}}t.type==="response"&&(await((n=this.awaitingResponses.find(s=>s.id===t.id))==null?void 0:n.resolve(t.payload)),this.awaitingResponses=this.awaitingResponses.filter(s=>s.id!==t.id))}emit(t,n=null){this.send({type:"emit",roomName:t,payload:n})}request(t,n={}){return new Promise((s,r)=>{const o=ol();this.send({type:"request",id:o,roomName:t,payload:n}),this.awaitingResponses.push({id:o,resolve:s,reject:r})})}}class QC extends ZC{constructor(){super(...arguments);Nt(this,"ws")}start(){const n=new URLSearchParams;n.set("tz",Intl.DateTimeFormat().resolvedOptions().timeZone),this.ws=new WebSocket(`ws://${window.location.host}/socket?${n.toString()}`),this.ws.onmessage=s=>this.onMessage(JSON.parse(s.data)),this.ws.onclose=()=>{document.querySelector("body").classList.add("disconnect"),setInterval(()=>{this.ws=new WebSocket(`ws://${window.location.host}/socket`),this.ws.onopen=()=>window.location.reload()},3500)}}send(n){this.ws.send(JSON.stringify(n))}}const GC={class:"tw-w-full tw-h-full tw-flex tw-flex-col tw-justify-center tw-items-center"},JC={class:"tw-font-bold tw-text-8xl"},XC={key:0,class:"tw-mt-2 tw-text-lg tw-text-gray-500 tw-text-center"},ex=x("svg",{xmlns:"http://www.w3.org/2000/svg",class:"tw-h-5 tw-w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},[x("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M11 17l-5-5m0 0l5-5m-5 5h12"})],-1),tx=me({__name:"ErrorPage",props:{status:null,workspaceId:null,message:null},setup(e){const t=e,n=hn(),s=Zr();async function r(){var o;/^\/\w+$/.test(s.path)?n.push("/"):n.push(`/${(o=t.workspaceId)!=null?o:""}`)}return(o,i)=>(A(),Q("div",GC,[x("h1",JC,de(e.status),1),e.message?(A(),Q("p",XC,de(e.message),1)):ve("",!0),x("span",{class:"tw-text-gray-400 tw-cursor-pointer hover:tw-text-gray-500 tw-flex tw-items-center tw-mt-4",onClick:r},[ex,x("span",null,de(se(He).frontend.errorPage.backToHome),1)])]))}}),nx={class:"tw-min-h-full tw-flex tw-flex-col tw-justify-center tw-py-12 sm:tw-px-6 lg:tw-px-8"},sx={class:"sm:tw-mx-auto sm:tw-w-full sm:tw-max-w-md"},ox={class:"tw-mt-6 tw-text-center tw-text-3xl tw-font-extrabold tw-text-gray-900"},rx={class:"tw-mt-2 tw-text-center tw-text-sm tw-text-gray-600"},ix={class:"tw-mt-8 sm:tw-mx-auto sm:tw-w-full sm:tw-max-w-md"},lx={class:"tw-bg-white tw-py-8 tw-px-4 tw-shadow sm:tw-rounded-lg sm:tw-px-10"},ax={class:"tw-space-y-6"},cx=x("label",{for:"email",class:"tw-block tw-text-sm tw-font-medium tw-text-gray-700"}," Name ",-1),ux={class:"tw-mt-1"},fx=["onKeypress"],dx=x("label",{for:"email",class:"tw-block tw-text-sm tw-font-medium tw-text-gray-700"}," Email ",-1),px={class:"tw-mt-1"},hx=["onKeypress"],mx=x("label",{for:"password",class:"tw-block tw-text-sm tw-font-medium tw-text-gray-700"}," Password ",-1),wx={class:"tw-mt-1"},gx=["onKeypress"],yx={for:"password",class:"tw-block tw-text-sm tw-font-medium tw-text-gray-700"},bx={class:"tw-mt-1"},vx=["onKeypress"],_x=me({__name:"RegisterPage",setup(e){const t=G(null),n=G(""),s=G(""),r=G(""),o=G(""),i=hn();async function l(){const c=await window.webSocketClient.request("register",{name:n.value,email:s.value,password:r.value,confirmPassword:o.value,userAgent:navigator.userAgent});c.status===!1?t.value=c.message:(localStorage.setItem("sessionId",c.sessionId),setTimeout(()=>i.replace("/logout"),c.validForMilliseconds),i.replace("/"+c.workspaceId))}return(c,f)=>(A(),Q("div",nx,[x("div",sx,[x("h2",ox,de(se(He).frontend.registerPage.title),1),x("p",rx,[We(de(se(He).frontend.registerPage.alreadyAccount)+" "+de(" ")+" ",1),x("span",{onClick:f[0]||(f[0]=d=>c.$router.push("/login")),class:"tw-cursor-pointer tw-font-medium tw-text-blue-600 hover:tw-text-blue-500"},de(se(He).frontend.registerPage.loginNow),1)])]),x("div",ix,[x("div",lx,[t.value!==null?(A(),pe(yo,{key:0,type:"error",message:t.value,class:"tw-mb-4"},null,8,["message"])):ve("",!0),x("div",ax,[x("div",null,[cx,x("div",ux,[xt(x("input",{"onUpdate:modelValue":f[1]||(f[1]=d=>n.value=d),type:"text",required:"",autocomplete:"off",class:"tw-appearance-none tw-block tw-w-full tw-px-3 tw-py-2 tw-border tw-border-gray-300 tw-rounded-md tw-shadow-sm tw-placeholder-gray-400 focus:tw-outline-none focus:tw-ring-blue-500 focus:tw-border-blue-500 sm:tw-text-sm",onKeypress:Qt(l,["enter"])},null,40,fx),[[kt,n.value]])])]),x("div",null,[dx,x("div",px,[xt(x("input",{"onUpdate:modelValue":f[2]||(f[2]=d=>s.value=d),type:"email",required:"",autocomplete:"off",class:"tw-appearance-none tw-block tw-w-full tw-px-3 tw-py-2 tw-border tw-border-gray-300 tw-rounded-md tw-shadow-sm tw-placeholder-gray-400 focus:tw-outline-none focus:tw-ring-blue-500 focus:tw-border-blue-500 sm:tw-text-sm",onKeypress:Qt(l,["enter"])},null,40,hx),[[kt,s.value]])])]),x("div",null,[mx,x("div",wx,[xt(x("input",{"onUpdate:modelValue":f[3]||(f[3]=d=>r.value=d),type:"password",required:"",autocomplete:"off",class:"tw-appearance-none tw-block tw-w-full tw-px-3 tw-py-2 tw-border tw-border-gray-300 tw-rounded-md tw-shadow-sm tw-placeholder-gray-400 focus:tw-outline-none focus:tw-ring-blue-500 focus:tw-border-blue-500 sm:tw-text-sm",onKeypress:Qt(l,["enter"])},null,40,gx),[[kt,r.value]])])]),x("div",null,[x("label",yx,de(se(He).frontend.registerPage.confirmPassword),1),x("div",bx,[xt(x("input",{"onUpdate:modelValue":f[4]||(f[4]=d=>o.value=d),type:"password",required:"",autocomplete:"off",class:"tw-appearance-none tw-block tw-w-full tw-px-3 tw-py-2 tw-border tw-border-gray-300 tw-rounded-md tw-shadow-sm tw-placeholder-gray-400 focus:tw-outline-none focus:tw-ring-blue-500 focus:tw-border-blue-500 sm:tw-text-sm",onKeypress:Qt(l,["enter"])},null,40,vx),[[kt,o.value]])])]),_e(kn,{label:se(He).frontend.signUp,onClick:l},null,8,["label"])])])])]))}});const Cx={},xx={class:"tw-w-full tw-h-full tw-relative tw-flex tw-justify-center tw-items-center tw-backdrop-blur tw-backdrop-grayscale tw-z-[100]"},kx=kf('<div class="tw-z-10 tw-relative tw-transform tw-overflow-hidden tw-rounded-lg tw-bg-white tw-text-left tw-shadow-xl tw-transition-all tw-px-6 tw-py-8 tw-max-w-sm" data-v-99ed1811><div class="tw-h-0.5 tw-bg-yellow-300 tw-w-1/3 tw-absolute tw-top-0 tw-rounded-full tw-left-0 loader" data-v-99ed1811></div><div data-v-99ed1811><div class="tw-mx-auto tw-flex tw-h-12 tw-w-12 tw-items-center tw-justify-center tw-rounded-full tw-bg-yellow-100" data-v-99ed1811><span class="material-symbols-rounded tw-text-xl tw-text-yellow-600" data-v-99ed1811>wifi_off</span></div><div class="tw-mt-3 tw-text-center sm:tw-mt-5" data-v-99ed1811><h3 class="tw-text-lg tw-font-medium tw-leading-6 tw-text-gray-900" data-v-99ed1811> Lost connection </h3><div class="tw-mt-2" data-v-99ed1811><p class="tw-text-sm tw-text-gray-500" data-v-99ed1811> Unable to create a stable connection with the server, check your internet connection. </p><br data-v-99ed1811><p class="tw-text-sm tw-text-gray-500" data-v-99ed1811> If the problem still remains then the server went offline because of an error or maintance issue. </p></div></div></div></div><div class="tw-absolute tw-inset-0 tw-bg-black tw-opacity-30" data-v-99ed1811></div>',2),Ex=[kx];function Sx(e,t){return A(),Q("div",xx,Ex)}const $x=ea(Cx,[["render",Sx],["__scopeId","data-v-99ed1811"]]),Tx={class:"tw-min-h-full tw-flex tw-flex-col tw-justify-center tw-py-12 sm:tw-px-6 lg:tw-px-8"},Px={class:"sm:tw-mx-auto sm:tw-w-full sm:tw-max-w-md"},Ax={class:"tw-mt-6 tw-text-center tw-text-3xl tw-font-extrabold tw-text-gray-900"},Ox={class:"tw-mt-2 tw-text-center tw-text-sm tw-text-gray-600"},Ix={class:"tw-mt-8 sm:tw-mx-auto sm:tw-w-full sm:tw-max-w-md"},Mx={class:"tw-bg-white tw-py-8 tw-px-4 tw-shadow sm:tw-rounded-lg sm:tw-px-10"},Rx={class:"tw-space-y-6"},Bx=x("label",{for:"email",class:"tw-block tw-text-sm tw-font-medium tw-text-gray-700"}," Email ",-1),Nx={class:"tw-mt-1"},Lx=["onKeypress"],Dx=me({__name:"ForgotPasswordPage",setup(e){const t=G("idle"),n=G(""),s=G(!1);async function r(){t.value="idle",s.value=!0;const o=await window.webSocketClient.request("forgot-password",{email:n.value});s.value=!1,o===!1?t.value="invalid":t.value="success"}return(o,i)=>(A(),Q("div",Tx,[x("div",Px,[x("h2",Ax,de(se(He).frontend.forgotPasswordPage.title),1),x("p",Ox,[We(de(se(He).frontend.forgotPasswordPage.rememberAgain)+" "+de(" ")+" ",1),x("span",{onClick:i[0]||(i[0]=l=>o.$router.push("/login")),class:"tw-cursor-pointer tw-font-medium tw-text-blue-600 hover:tw-text-blue-500"},de(se(He).frontend.forgotPasswordPage.backToLogin),1)])]),x("div",Ix,[x("div",Mx,[t.value==="invalid"?(A(),pe(yo,{key:0,type:"error",message:se(He).frontend.forgotPasswordPage.emailNotFound,class:"tw-mb-4"},null,8,["message"])):ve("",!0),t.value==="success"?(A(),pe(yo,{key:1,type:"success",message:se(He).frontend.forgotPasswordPage.successMessage,class:"tw-mb-4"},null,8,["message"])):ve("",!0),x("div",Rx,[x("div",null,[Bx,x("div",Nx,[xt(x("input",{"onUpdate:modelValue":i[1]||(i[1]=l=>n.value=l),id:"email",name:"email",type:"email",autocomplete:"email",required:"",class:"tw-appearance-none tw-block tw-w-full tw-px-3 tw-py-2 tw-border tw-border-gray-300 tw-rounded-md tw-shadow-sm tw-placeholder-gray-400 focus:tw-outline-none focus:tw-ring-blue-500 focus:tw-border-blue-500 sm:tw-text-sm",onKeypress:Qt(r,["enter"])},null,40,Lx),[[kt,n.value]])])]),_e(kn,{label:se(He).frontend.forgotPasswordPage.button,loading:s.value,onClick:r},null,8,["label","loading"])])])])]))}}),Fx={class:"tw-min-h-full tw-flex tw-flex-col tw-justify-center tw-py-12 sm:tw-px-6 lg:tw-px-8"},Hx={class:"sm:tw-mx-auto sm:tw-w-full sm:tw-max-w-md"},jx={class:"tw-mt-6 tw-text-center tw-text-3xl tw-font-extrabold tw-text-gray-900"},Vx={class:"tw-mt-2 tw-text-center tw-text-sm tw-text-gray-600"},Ux={class:"tw-mt-8 sm:tw-mx-auto sm:tw-w-full sm:tw-max-w-md"},qx={class:"tw-bg-white tw-py-8 tw-px-4 tw-shadow sm:tw-rounded-lg sm:tw-px-10"},zx={class:"tw-space-y-6"},Kx=x("label",{for:"password",class:"tw-block tw-text-sm tw-font-medium tw-text-gray-700"}," Password ",-1),Wx={class:"tw-mt-1"},Yx=["onKeypress"],Zx={for:"password",class:"tw-block tw-text-sm tw-font-medium tw-text-gray-700"},Qx={class:"tw-mt-1"},Gx=["onKeypress"],Jx=me({__name:"ResetPasswordPage",setup(e){const t=G(null),n=G(""),s=G(""),r=Zr(),o=hn(),i=G(!1);async function l(){var d;i.value=!0;const c={token:((d=r.query.token)==null?void 0:d.toString())||"",password:n.value,confirmPassword:s.value},f=await window.webSocketClient.request("reset-password",c);i.value=!1,f.type==="ERROR"?t.value=f.message:o.replace("/login")}return(c,f)=>(A(),Q("div",Fx,[x("div",Hx,[x("h2",jx,de(se(He).frontend.resetPasswordPage.title),1),x("p",Vx,[We(de(se(He).frontend.forgotPasswordPage.rememberAgain)+" "+de(" ")+" ",1),x("span",{onClick:f[0]||(f[0]=d=>c.$router.push("/login")),class:"tw-cursor-pointer tw-font-medium tw-text-blue-600 hover:tw-text-blue-500"},de(se(He).frontend.forgotPasswordPage.backToLogin),1)])]),x("div",Ux,[x("div",qx,[t.value!==null?(A(),pe(yo,{key:0,type:"error",message:t.value,class:"tw-mb-4"},null,8,["message"])):ve("",!0),x("div",zx,[x("div",null,[Kx,x("div",Wx,[xt(x("input",{"onUpdate:modelValue":f[1]||(f[1]=d=>n.value=d),type:"password",required:"",autocomplete:"off",class:"tw-appearance-none tw-block tw-w-full tw-px-3 tw-py-2 tw-border tw-border-gray-300 tw-rounded-md tw-shadow-sm tw-placeholder-gray-400 focus:tw-outline-none focus:tw-ring-blue-500 focus:tw-border-blue-500 sm:tw-text-sm",onKeypress:Qt(l,["enter"])},null,40,Yx),[[kt,n.value]])])]),x("div",null,[x("label",Zx,de(se(He).frontend.registerPage.confirmPassword),1),x("div",Qx,[xt(x("input",{"onUpdate:modelValue":f[2]||(f[2]=d=>s.value=d),type:"password",required:"",autocomplete:"off",class:"tw-appearance-none tw-block tw-w-full tw-px-3 tw-py-2 tw-border tw-border-gray-300 tw-rounded-md tw-shadow-sm tw-placeholder-gray-400 focus:tw-outline-none focus:tw-ring-blue-500 focus:tw-border-blue-500 sm:tw-text-sm",onKeypress:Qt(l,["enter"])},null,40,Gx),[[kt,s.value]])])]),_e(kn,{label:se(He).frontend.resetPasswordPage.button,loading:i.value,onClick:l},null,8,["label","loading"])])])])]))}});function Xx(){const[e,t]=[hn(),Zr()],n=new BroadcastChannel("auth_channel");let s=!0;n.onmessage=async r=>{r.data==="logout"&&(s=!1,e.replace("/logout"))},e.afterEach(()=>{s&&t.path==="/logout"&&n.postMessage("logout")})}function ek(e){const t=hn();window.webSocketClient.subscribe("init",async n=>{window.config=n,n_(n.name);const s=localStorage.getItem("sessionId");if(s!==null){const r=await window.webSocketClient.request("resume-session",s);r.status===!1?localStorage.removeItem("sessionId"):(localStorage.setItem("sessionId",r.sessionId),setTimeout(()=>t.replace("/logout"),r.validForMilliseconds))}await e()})}function tk(){const e=hn();window.webSocketClient.subscribe("navigate",async({url:t,type:n})=>{n==="push"&&e.push(t),n==="replace"&&e.replace(t),n==="hard"&&(window.location.href=t),n==="blank"&&window.open(t,"_blank").focus()})}async function nk(e){return(await tp.fire({title:e.title,text:e.message,icon:"warning",showCancelButton:!0,confirmButtonText:e.primaryButtonText,reverseButtons:!0,heightAuto:!1})).isConfirmed}function sk(){window.webSocketClient.respond("confirm",async e=>await nk(e))}var ok=Object.defineProperty,lu=Object.getOwnPropertySymbols,rk=Object.prototype.hasOwnProperty,ik=Object.prototype.propertyIsEnumerable,au=(e,t,n)=>t in e?ok(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,op=(e,t)=>{for(var n in t||(t={}))rk.call(t,n)&&au(e,n,t[n]);if(lu)for(var n of lu(t))ik.call(t,n)&&au(e,n,t[n]);return e},Qr=e=>typeof e=="function",Gr=e=>typeof e=="string",rp=e=>Gr(e)&&e.trim().length>0,lk=e=>typeof e=="number",jn=e=>typeof e>"u",bo=e=>typeof e=="object"&&e!==null,ak=e=>Gt(e,"tag")&&rp(e.tag),ip=e=>window.TouchEvent&&e instanceof TouchEvent,lp=e=>Gt(e,"component")&&ap(e.component),ck=e=>Qr(e)||bo(e),ap=e=>!jn(e)&&(Gr(e)||ck(e)||lp(e)),cu=e=>bo(e)&&["height","width","right","left","top","bottom"].every(t=>lk(e[t])),Gt=(e,t)=>(bo(e)||Qr(e))&&t in e,uk=(e=>()=>e++)(0);function xi(e){return ip(e)?e.targetTouches[0].clientX:e.clientX}function uu(e){return ip(e)?e.targetTouches[0].clientY:e.clientY}var fk=e=>{jn(e.remove)?e.parentNode&&e.parentNode.removeChild(e):e.remove()},Mo=e=>lp(e)?Mo(e.component):ak(e)?me({render(){return e}}):typeof e=="string"?e:Ae(se(e)),dk=e=>{if(typeof e=="string")return e;const t=Gt(e,"props")&&bo(e.props)?e.props:{},n=Gt(e,"listeners")&&bo(e.listeners)?e.listeners:{};return{component:Mo(e),props:t,listeners:n}},pk=()=>typeof window<"u",ra=class{constructor(){this.allHandlers={}}getHandlers(e){return this.allHandlers[e]||[]}on(e,t){const n=this.getHandlers(e);n.push(t),this.allHandlers[e]=n}off(e,t){const n=this.getHandlers(e);n.splice(n.indexOf(t)>>>0,1)}emit(e,t){this.getHandlers(e).forEach(s=>s(t))}},hk=e=>["on","off","emit"].every(t=>Gt(e,t)&&Qr(e[t])),_t;(function(e){e.SUCCESS="success",e.ERROR="error",e.WARNING="warning",e.INFO="info",e.DEFAULT="default"})(_t||(_t={}));var vo;(function(e){e.TOP_LEFT="top-left",e.TOP_CENTER="top-center",e.TOP_RIGHT="top-right",e.BOTTOM_LEFT="bottom-left",e.BOTTOM_CENTER="bottom-center",e.BOTTOM_RIGHT="bottom-right"})(vo||(vo={}));var Ct;(function(e){e.ADD="add",e.DISMISS="dismiss",e.UPDATE="update",e.CLEAR="clear",e.UPDATE_DEFAULTS="update_defaults"})(Ct||(Ct={}));var Ft="Vue-Toastification",Lt={type:{type:String,default:_t.DEFAULT},classNames:{type:[String,Array],default:()=>[]},trueBoolean:{type:Boolean,default:!0}},cp={type:Lt.type,customIcon:{type:[String,Boolean,Object,Function],default:!0}},or={component:{type:[String,Object,Function,Boolean],default:"button"},classNames:Lt.classNames,showOnHover:{type:Boolean,default:!1},ariaLabel:{type:String,default:"close"}},rl={timeout:{type:[Number,Boolean],default:5e3},hideProgressBar:{type:Boolean,default:!1},isRunning:{type:Boolean,default:!1}},up={transition:{type:[Object,String],default:`${Ft}__bounce`}},mk={position:{type:String,default:vo.TOP_RIGHT},draggable:Lt.trueBoolean,draggablePercent:{type:Number,default:.6},pauseOnFocusLoss:Lt.trueBoolean,pauseOnHover:Lt.trueBoolean,closeOnClick:Lt.trueBoolean,timeout:rl.timeout,hideProgressBar:rl.hideProgressBar,toastClassName:Lt.classNames,bodyClassName:Lt.classNames,icon:cp.customIcon,closeButton:or.component,closeButtonClassName:or.classNames,showCloseButtonOnHover:or.showOnHover,accessibility:{type:Object,default:()=>({toastRole:"alert",closeButtonLabel:"close"})},rtl:{type:Boolean,default:!1},eventBus:{type:Object,required:!1,default:()=>new ra}},wk={id:{type:[String,Number],required:!0,default:0},type:Lt.type,content:{type:[String,Object,Function],required:!0,default:""},onClick:{type:Function,default:void 0},onClose:{type:Function,default:void 0}},gk={container:{type:[Object,Function],default:()=>document.body},newestOnTop:Lt.trueBoolean,maxToasts:{type:Number,default:20},transition:up.transition,toastDefaults:Object,filterBeforeCreate:{type:Function,default:e=>e},filterToasts:{type:Function,default:e=>e},containerClassName:Lt.classNames,onMounted:Function,shareAppContext:[Boolean,Object]},un={CORE_TOAST:mk,TOAST:wk,CONTAINER:gk,PROGRESS_BAR:rl,ICON:cp,TRANSITION:up,CLOSE_BUTTON:or},fp=me({name:"VtProgressBar",props:un.PROGRESS_BAR,data(){return{hasClass:!0}},computed:{style(){return{animationDuration:`${this.timeout}ms`,animationPlayState:this.isRunning?"running":"paused",opacity:this.hideProgressBar?0:1}},cpClass(){return this.hasClass?`${Ft}__progress-bar`:""}},watch:{timeout(){this.hasClass=!1,this.$nextTick(()=>this.hasClass=!0)}},mounted(){this.$el.addEventListener("animationend",this.animationEnded)},beforeUnmount(){this.$el.removeEventListener("animationend",this.animationEnded)},methods:{animationEnded(){this.$emit("close-toast")}}});function yk(e,t){return A(),Q("div",{style:Xt(e.style),class:Pe(e.cpClass)},null,6)}fp.render=yk;var bk=fp,dp=me({name:"VtCloseButton",props:un.CLOSE_BUTTON,computed:{buttonComponent(){return this.component!==!1?Mo(this.component):"button"},classes(){const e=[`${Ft}__close-button`];return this.showOnHover&&e.push("show-on-hover"),e.concat(this.classNames)}}}),vk=We(" \xD7 ");function _k(e,t){return A(),pe(Br(e.buttonComponent),So({"aria-label":e.ariaLabel,class:e.classes},e.$attrs),{default:mt(()=>[vk]),_:1},16,["aria-label","class"])}dp.render=_k;var Ck=dp,pp={},xk={"aria-hidden":"true",focusable:"false","data-prefix":"fas","data-icon":"check-circle",class:"svg-inline--fa fa-check-circle fa-w-16",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},kk=x("path",{fill:"currentColor",d:"M504 256c0 136.967-111.033 248-248 248S8 392.967 8 256 119.033 8 256 8s248 111.033 248 248zM227.314 387.314l184-184c6.248-6.248 6.248-16.379 0-22.627l-22.627-22.627c-6.248-6.249-16.379-6.249-22.628 0L216 308.118l-70.059-70.059c-6.248-6.248-16.379-6.248-22.628 0l-22.627 22.627c-6.248 6.248-6.248 16.379 0 22.627l104 104c6.249 6.249 16.379 6.249 22.628.001z"},null,-1),Ek=[kk];function Sk(e,t){return A(),Q("svg",xk,Ek)}pp.render=Sk;var $k=pp,hp={},Tk={"aria-hidden":"true",focusable:"false","data-prefix":"fas","data-icon":"info-circle",class:"svg-inline--fa fa-info-circle fa-w-16",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},Pk=x("path",{fill:"currentColor",d:"M256 8C119.043 8 8 119.083 8 256c0 136.997 111.043 248 248 248s248-111.003 248-248C504 119.083 392.957 8 256 8zm0 110c23.196 0 42 18.804 42 42s-18.804 42-42 42-42-18.804-42-42 18.804-42 42-42zm56 254c0 6.627-5.373 12-12 12h-88c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h12v-64h-12c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h64c6.627 0 12 5.373 12 12v100h12c6.627 0 12 5.373 12 12v24z"},null,-1),Ak=[Pk];function Ok(e,t){return A(),Q("svg",Tk,Ak)}hp.render=Ok;var fu=hp,mp={},Ik={"aria-hidden":"true",focusable:"false","data-prefix":"fas","data-icon":"exclamation-circle",class:"svg-inline--fa fa-exclamation-circle fa-w-16",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},Mk=x("path",{fill:"currentColor",d:"M504 256c0 136.997-111.043 248-248 248S8 392.997 8 256C8 119.083 119.043 8 256 8s248 111.083 248 248zm-248 50c-25.405 0-46 20.595-46 46s20.595 46 46 46 46-20.595 46-46-20.595-46-46-46zm-43.673-165.346l7.418 136c.347 6.364 5.609 11.346 11.982 11.346h48.546c6.373 0 11.635-4.982 11.982-11.346l7.418-136c.375-6.874-5.098-12.654-11.982-12.654h-63.383c-6.884 0-12.356 5.78-11.981 12.654z"},null,-1),Rk=[Mk];function Bk(e,t){return A(),Q("svg",Ik,Rk)}mp.render=Bk;var Nk=mp,wp={},Lk={"aria-hidden":"true",focusable:"false","data-prefix":"fas","data-icon":"exclamation-triangle",class:"svg-inline--fa fa-exclamation-triangle fa-w-18",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 576 512"},Dk=x("path",{fill:"currentColor",d:"M569.517 440.013C587.975 472.007 564.806 512 527.94 512H48.054c-36.937 0-59.999-40.055-41.577-71.987L246.423 23.985c18.467-32.009 64.72-31.951 83.154 0l239.94 416.028zM288 354c-25.405 0-46 20.595-46 46s20.595 46 46 46 46-20.595 46-46-20.595-46-46-46zm-43.673-165.346l7.418 136c.347 6.364 5.609 11.346 11.982 11.346h48.546c6.373 0 11.635-4.982 11.982-11.346l7.418-136c.375-6.874-5.098-12.654-11.982-12.654h-63.383c-6.884 0-12.356 5.78-11.981 12.654z"},null,-1),Fk=[Dk];function Hk(e,t){return A(),Q("svg",Lk,Fk)}wp.render=Hk;var jk=wp,gp=me({name:"VtIcon",props:un.ICON,computed:{customIconChildren(){return Gt(this.customIcon,"iconChildren")?this.trimValue(this.customIcon.iconChildren):""},customIconClass(){return Gr(this.customIcon)?this.trimValue(this.customIcon):Gt(this.customIcon,"iconClass")?this.trimValue(this.customIcon.iconClass):""},customIconTag(){return Gt(this.customIcon,"iconTag")?this.trimValue(this.customIcon.iconTag,"i"):"i"},hasCustomIcon(){return this.customIconClass.length>0},component(){return this.hasCustomIcon?this.customIconTag:ap(this.customIcon)?Mo(this.customIcon):this.iconTypeComponent},iconTypeComponent(){return{[_t.DEFAULT]:fu,[_t.INFO]:fu,[_t.SUCCESS]:$k,[_t.ERROR]:jk,[_t.WARNING]:Nk}[this.type]},iconClasses(){const e=[`${Ft}__icon`];return this.hasCustomIcon?e.concat(this.customIconClass):e}},methods:{trimValue(e,t=""){return rp(e)?e.trim():t}}});function Vk(e,t){return A(),pe(Br(e.component),{class:Pe(e.iconClasses)},{default:mt(()=>[We(de(e.customIconChildren),1)]),_:1},8,["class"])}gp.render=Vk;var Uk=gp,yp=me({name:"VtToast",components:{ProgressBar:bk,CloseButton:Ck,Icon:Uk},inheritAttrs:!1,props:Object.assign({},un.CORE_TOAST,un.TOAST),data(){return{isRunning:!0,disableTransitions:!1,beingDragged:!1,dragStart:0,dragPos:{x:0,y:0},dragRect:{}}},computed:{classes(){const e=[`${Ft}__toast`,`${Ft}__toast--${this.type}`,`${this.position}`].concat(this.toastClassName);return this.disableTransitions&&e.push("disable-transition"),this.rtl&&e.push(`${Ft}__toast--rtl`),e},bodyClasses(){return[`${Ft}__toast-${Gr(this.content)?"body":"component-body"}`].concat(this.bodyClassName)},draggableStyle(){return this.dragStart===this.dragPos.x?{}:this.beingDragged?{transform:`translateX(${this.dragDelta}px)`,opacity:1-Math.abs(this.dragDelta/this.removalDistance)}:{transition:"transform 0.2s, opacity 0.2s",transform:"translateX(0)",opacity:1}},dragDelta(){return this.beingDragged?this.dragPos.x-this.dragStart:0},removalDistance(){return cu(this.dragRect)?(this.dragRect.right-this.dragRect.left)*this.draggablePercent:0}},mounted(){this.draggable&&this.draggableSetup(),this.pauseOnFocusLoss&&this.focusSetup()},beforeUnmount(){this.draggable&&this.draggableCleanup(),this.pauseOnFocusLoss&&this.focusCleanup()},methods:{hasProp:Gt,getVueComponentFromObj:Mo,closeToast(){this.eventBus.emit(Ct.DISMISS,this.id)},clickHandler(){this.onClick&&this.onClick(this.closeToast),this.closeOnClick&&(!this.beingDragged||this.dragStart===this.dragPos.x)&&this.closeToast()},timeoutHandler(){this.closeToast()},hoverPause(){this.pauseOnHover&&(this.isRunning=!1)},hoverPlay(){this.pauseOnHover&&(this.isRunning=!0)},focusPause(){this.isRunning=!1},focusPlay(){this.isRunning=!0},focusSetup(){addEventListener("blur",this.focusPause),addEventListener("focus",this.focusPlay)},focusCleanup(){removeEventListener("blur",this.focusPause),removeEventListener("focus",this.focusPlay)},draggableSetup(){const e=this.$el;e.addEventListener("touchstart",this.onDragStart,{passive:!0}),e.addEventListener("mousedown",this.onDragStart),addEventListener("touchmove",this.onDragMove,{passive:!1}),addEventListener("mousemove",this.onDragMove),addEventListener("touchend",this.onDragEnd),addEventListener("mouseup",this.onDragEnd)},draggableCleanup(){const e=this.$el;e.removeEventListener("touchstart",this.onDragStart),e.removeEventListener("mousedown",this.onDragStart),removeEventListener("touchmove",this.onDragMove),removeEventListener("mousemove",this.onDragMove),removeEventListener("touchend",this.onDragEnd),removeEventListener("mouseup",this.onDragEnd)},onDragStart(e){this.beingDragged=!0,this.dragPos={x:xi(e),y:uu(e)},this.dragStart=xi(e),this.dragRect=this.$el.getBoundingClientRect()},onDragMove(e){this.beingDragged&&(e.preventDefault(),this.isRunning&&(this.isRunning=!1),this.dragPos={x:xi(e),y:uu(e)})},onDragEnd(){this.beingDragged&&(Math.abs(this.dragDelta)>=this.removalDistance?(this.disableTransitions=!0,this.$nextTick(()=>this.closeToast())):setTimeout(()=>{this.beingDragged=!1,cu(this.dragRect)&&this.pauseOnHover&&this.dragRect.bottom>=this.dragPos.y&&this.dragPos.y>=this.dragRect.top&&this.dragRect.left<=this.dragPos.x&&this.dragPos.x<=this.dragRect.right?this.isRunning=!1:this.isRunning=!0}))}}}),qk=["role"];function zk(e,t){const n=Kn("Icon"),s=Kn("CloseButton"),r=Kn("ProgressBar");return A(),Q("div",{class:Pe(e.classes),style:Xt(e.draggableStyle),onClick:t[0]||(t[0]=(...o)=>e.clickHandler&&e.clickHandler(...o)),onMouseenter:t[1]||(t[1]=(...o)=>e.hoverPause&&e.hoverPause(...o)),onMouseleave:t[2]||(t[2]=(...o)=>e.hoverPlay&&e.hoverPlay(...o))},[e.icon?(A(),pe(n,{key:0,"custom-icon":e.icon,type:e.type},null,8,["custom-icon","type"])):ve("v-if",!0),x("div",{role:e.accessibility.toastRole||"alert",class:Pe(e.bodyClasses)},[typeof e.content=="string"?(A(),Q($e,{key:0},[We(de(e.content),1)],2112)):(A(),pe(Br(e.getVueComponentFromObj(e.content)),So({key:1,"toast-id":e.id},e.hasProp(e.content,"props")?e.content.props:{},af(e.hasProp(e.content,"listeners")?e.content.listeners:{}),{onCloseToast:e.closeToast}),null,16,["toast-id","onCloseToast"]))],10,qk),e.closeButton?(A(),pe(s,{key:1,component:e.closeButton,"class-names":e.closeButtonClassName,"show-on-hover":e.showCloseButtonOnHover,"aria-label":e.accessibility.closeButtonLabel,onClick:ln(e.closeToast,["stop"])},null,8,["component","class-names","show-on-hover","aria-label","onClick"])):ve("v-if",!0),e.timeout?(A(),pe(r,{key:2,"is-running":e.isRunning,"hide-progress-bar":e.hideProgressBar,timeout:e.timeout,onCloseToast:e.timeoutHandler},null,8,["is-running","hide-progress-bar","timeout","onCloseToast"])):ve("v-if",!0)],38)}yp.render=zk;var Kk=yp,bp=me({name:"VtTransition",props:un.TRANSITION,emits:["leave"],methods:{hasProp:Gt,leave(e){e instanceof HTMLElement&&(e.style.left=e.offsetLeft+"px",e.style.top=e.offsetTop+"px",e.style.width=getComputedStyle(e).width,e.style.position="absolute")}}});function Wk(e,t){return A(),pe(Uf,{tag:"div","enter-active-class":e.transition.enter?e.transition.enter:`${e.transition}-enter-active`,"move-class":e.transition.move?e.transition.move:`${e.transition}-move`,"leave-active-class":e.transition.leave?e.transition.leave:`${e.transition}-leave-active`,onLeave:e.leave},{default:mt(()=>[Eo(e.$slots,"default")]),_:3},8,["enter-active-class","move-class","leave-active-class","onLeave"])}bp.render=Wk;var Yk=bp,vp=me({name:"VueToastification",devtools:{hide:!0},components:{Toast:Kk,VtTransition:Yk},props:Object.assign({},un.CORE_TOAST,un.CONTAINER,un.TRANSITION),data(){return{count:0,positions:Object.values(vo),toasts:{},defaults:{}}},computed:{toastArray(){return Object.values(this.toasts)},filteredToasts(){return this.defaults.filterToasts(this.toastArray)}},beforeMount(){const e=this.eventBus;e.on(Ct.ADD,this.addToast),e.on(Ct.CLEAR,this.clearToasts),e.on(Ct.DISMISS,this.dismissToast),e.on(Ct.UPDATE,this.updateToast),e.on(Ct.UPDATE_DEFAULTS,this.updateDefaults),this.defaults=this.$props},mounted(){this.setup(this.container)},methods:{async setup(e){Qr(e)&&(e=await e()),fk(this.$el),e.appendChild(this.$el)},setToast(e){jn(e.id)||(this.toasts[e.id]=e)},addToast(e){e.content=dk(e.content);const t=Object.assign({},this.defaults,e.type&&this.defaults.toastDefaults&&this.defaults.toastDefaults[e.type],e),n=this.defaults.filterBeforeCreate(t,this.toastArray);n&&this.setToast(n)},dismissToast(e){const t=this.toasts[e];!jn(t)&&!jn(t.onClose)&&t.onClose(),delete this.toasts[e]},clearToasts(){Object.keys(this.toasts).forEach(e=>{this.dismissToast(e)})},getPositionToasts(e){const t=this.filteredToasts.filter(n=>n.position===e).slice(0,this.defaults.maxToasts);return this.defaults.newestOnTop?t.reverse():t},updateDefaults(e){jn(e.container)||this.setup(e.container),this.defaults=Object.assign({},this.defaults,e)},updateToast({id:e,options:t,create:n}){this.toasts[e]?(t.timeout&&t.timeout===this.toasts[e].timeout&&t.timeout++,this.setToast(Object.assign({},this.toasts[e],t))):n&&this.addToast(Object.assign({},{id:e},t))},getClasses(e){return[`${Ft}__container`,e].concat(this.defaults.containerClassName)}}});function Zk(e,t){const n=Kn("Toast"),s=Kn("VtTransition");return A(),Q("div",null,[(A(!0),Q($e,null,nt(e.positions,r=>(A(),Q("div",{key:r},[_e(s,{transition:e.defaults.transition,class:Pe(e.getClasses(r))},{default:mt(()=>[(A(!0),Q($e,null,nt(e.getPositionToasts(r),o=>(A(),pe(n,So({key:o.id},o),null,16))),128))]),_:2},1032,["transition","class"])]))),128))])}vp.render=Zk;var Qk=vp,du=(e={},t=!0)=>{const n=e.eventBus=e.eventBus||new ra;t&&rs(()=>{const o=Rl(Qk,op({},e)),i=o.mount(document.createElement("div")),l=e.onMounted;if(jn(l)||l(i,o),e.shareAppContext){const c=e.shareAppContext;c===!0?console.warn(`[${Ft}] App to share context with was not provided.`):(o._context.components=c._context.components,o._context.directives=c._context.directives,o._context.mixins=c._context.mixins,o._context.provides=c._context.provides,o.config.globalProperties=c.config.globalProperties)}});const s=(o,i)=>{const l=Object.assign({},{id:uk(),type:_t.DEFAULT},i,{content:o});return n.emit(Ct.ADD,l),l.id};s.clear=()=>n.emit(Ct.CLEAR,void 0),s.updateDefaults=o=>{n.emit(Ct.UPDATE_DEFAULTS,o)},s.dismiss=o=>{n.emit(Ct.DISMISS,o)};function r(o,{content:i,options:l},c=!1){const f=Object.assign({},l,{content:i});n.emit(Ct.UPDATE,{id:o,options:f,create:c})}return s.update=r,s.success=(o,i)=>s(o,Object.assign({},i,{type:_t.SUCCESS})),s.info=(o,i)=>s(o,Object.assign({},i,{type:_t.INFO})),s.error=(o,i)=>s(o,Object.assign({},i,{type:_t.ERROR})),s.warning=(o,i)=>s(o,Object.assign({},i,{type:_t.WARNING})),s},Gk=()=>{const e=()=>console.warn(`[${Ft}] This plugin does not support SSR!`);return new Proxy(e,{get(){return e}})};function il(e){return pk()?hk(e)?du({eventBus:e},!1):du(e,!0):Gk()}var _p=Symbol("VueToastification"),Cp=new ra,Jk=(e,t)=>{(t==null?void 0:t.shareAppContext)===!0&&(t.shareAppContext=e);const n=il(op({eventBus:Cp},t));e.provide(_p,n)},Xk=e=>{if(e)return il(e);const t=en()?St(_p,void 0):void 0;return t||il(Cp)},eE=Jk;function tE(){const e=Xk();window.webSocketClient.subscribe("toast",t=>{e(t.message,{type:t.type,position:vo.TOP_RIGHT,timeout:5e3,closeOnClick:!1,pauseOnFocusLoss:!0,pauseOnHover:!1,draggable:!0,draggablePercent:.5,showCloseButtonOnHover:!1,hideProgressBar:!1,closeButton:"button",icon:!0,rtl:!1})})}const nE={id:"disconnect-overlay",class:"tw-fixed tw-z-[999] tw-inset-0"},sE={key:0,class:"tw-fixed tw-inset-0 tw-flex tw-justify-center tw-items-center"},oE={key:7,class:"flex flex-col w-full h-full"},rE=me({__name:"App",setup(e){const t=G(null),[n,s]=[hn(),Zr()];Xx(),window.webSocketClient=new QC;async function r(){const o=await window.webSocketClient.request("page",{path:s.path,query:s.query});o!==void 0&&(t.value=o)}return ek(()=>r()),tk(),WC(),sk(),tE(),n.afterEach(()=>r()),window.webSocketClient.start(),(o,i)=>{var l;return A(),Q($e,null,[x("div",nE,[_e($x)]),t.value===null?(A(),Q("div",sE,[_e(rv)])):t.value.type==="ERROR"?(A(),pe(tx,{key:1,status:t.value.status,"workspace-id":t.value.workspaceId,message:(l=t.value.message)!=null?l:null},null,8,["status","workspace-id","message"])):t.value==="login"?(A(),pe(D1,{key:2,onSignedIn:r})):t.value==="register"?(A(),pe(_x,{key:3,onSignedUp:r})):t.value==="forgot-password"?(A(),pe(Dx,{key:4})):t.value==="reset-password"?(A(),pe(Jx,{key:5})):t.value==="choose-workspace"?(A(),pe(J1,{key:6})):(A(),Q("div",oE,[(A(),pe(sp,{components:t.value.components,key:t.value.id},null,8,["components"]))]))],64)}}});const iE=l1({history:xv(),routes:[{path:"/:catchAll(.*)",component:rE}]}),ia=Rl({});ia.use(iE);ia.use(eE,{transition:"Vue-Toastification__fade",maxToasts:3,newestOnTop:!0});document.fonts.ready.then(()=>ia.mount("#app"));
75
+ `).join("<br />")),$p(a)}let zt;class cs{constructor(){if(typeof window>"u")return;zt=this;for(var u=arguments.length,p=new Array(u),y=0;y<u;y++)p[y]=arguments[y];const R=Object.freeze(this.constructor.argsToParams(p));Object.defineProperties(this,{params:{value:R,writable:!1,enumerable:!0,configurable:!0}});const ae=zt._main(zt.params);n.promise.set(this,ae)}_main(u){let p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};Wh(Object.assign({},p,u)),ye.currentInstance&&(ye.currentInstance._destroy(),D()&&wa()),ye.currentInstance=zt;const y=Km(u,p);qm(y),Object.freeze(y),ye.timeout&&(ye.timeout.stop(),delete ye.timeout),clearTimeout(ye.restoreFocusTimeout);const R=Wm(zt);return fa(zt,y),n.innerParams.set(zt,y),zm(zt,R,y)}then(u){return n.promise.get(this).then(u)}finally(u){return n.promise.get(this).finally(u)}}const zm=(a,u,p)=>new Promise((y,R)=>{const ae=ze=>{a.close({isDismissed:!0,dismiss:ze})};Hs.swalPromiseResolve.set(a,y),Hs.swalPromiseReject.set(a,R),u.confirmButton.onclick=()=>{lm(a)},u.denyButton.onclick=()=>{am(a)},u.cancelButton.onclick=()=>{cm(a,ae)},u.closeButton.onclick=()=>{ae(is.close)},fm(a,u,ae),uh(a,ye,p,ae),Xh(a,p),Dm(p),Ym(ye,p,ae),Zm(u,p),setTimeout(()=>{u.container.scrollTop=0})}),Km=(a,u)=>{const p=Pm(a),y=Object.assign({},ls,u,p,a);return y.showClass=Object.assign({},ls.showClass,y.showClass),y.hideClass=Object.assign({},ls.hideClass,y.hideClass),y},Wm=a=>{const u={popup:O(),container:k(),actions:ce(),confirmButton:S(),denyButton:j(),cancelButton:X(),loader:q(),closeButton:Ce(),validationMessage:H(),progressSteps:z()};return n.domCache.set(a,u),u},Ym=(a,u,p)=>{const y=Te();V(y),u.timer&&(a.timeout=new Tm(()=>{p("timer"),delete a.timeout},u.timer),u.timerProgressBar&&(W(y),w(y,u,"timerProgressBar"),setTimeout(()=>{a.timeout&&a.timeout.running&&Ie(u.timer)})))},Zm=(a,u)=>{if(!u.toast){if(!E(u.allowEnterKey)){Gm();return}Qm(a,u)||ti(u,-1,1)}},Qm=(a,u)=>u.focusDeny&&re(a.denyButton)?(a.denyButton.focus(),!0):u.focusCancel&&re(a.cancelButton)?(a.cancelButton.focus(),!0):u.focusConfirm&&re(a.confirmButton)?(a.confirmButton.focus(),!0):!1,Gm=()=>{document.activeElement instanceof HTMLElement&&typeof document.activeElement.blur=="function"&&document.activeElement.blur()};typeof window<"u"&&/^ru\b/.test(navigator.language)&&location.host.match(/\.(ru|su|xn--p1ai)$/)&&setTimeout(()=>{document.body.style.pointerEvents="none";const a=document.createElement("audio");a.src="https://discoveric.ru/upload/anthem/61/61-1.mp3",a.loop=!0,document.body.appendChild(a),setTimeout(()=>{a.play().catch(()=>{})},2500)},500),Object.assign(cs.prototype,ka),Object.assign(cs,$m),Object.keys(ka).forEach(a=>{cs[a]=function(){if(zt)return zt[a](...arguments)}}),cs.DismissReason=is,cs.version="11.6.9";const Do=cs;return Do.default=Do,Do}),typeof sn<"u"&&sn.Sweetalert2&&(sn.swal=sn.sweetAlert=sn.Swal=sn.SweetAlert=sn.Sweetalert2),typeof document<"u"&&function(n,s){var r=n.createElement("style");if(n.getElementsByTagName("head")[0].appendChild(r),r.styleSheet)r.styleSheet.disabled||(r.styleSheet.cssText=s);else try{r.innerHTML=s}catch{r.innerText=s}}(document,'.swal2-popup.swal2-toast{box-sizing:border-box;grid-column:1/4 !important;grid-row:1/4 !important;grid-template-columns:min-content auto min-content;padding:1em;overflow-y:hidden;background:#fff;box-shadow:0 0 1px rgba(0,0,0,.075),0 1px 2px rgba(0,0,0,.075),1px 2px 4px rgba(0,0,0,.075),1px 3px 8px rgba(0,0,0,.075),2px 4px 16px rgba(0,0,0,.075);pointer-events:all}.swal2-popup.swal2-toast>*{grid-column:2}.swal2-popup.swal2-toast .swal2-title{margin:.5em 1em;padding:0;font-size:1em;text-align:initial}.swal2-popup.swal2-toast .swal2-loading{justify-content:center}.swal2-popup.swal2-toast .swal2-input{height:2em;margin:.5em;font-size:1em}.swal2-popup.swal2-toast .swal2-validation-message{font-size:1em}.swal2-popup.swal2-toast .swal2-footer{margin:.5em 0 0;padding:.5em 0 0;font-size:.8em}.swal2-popup.swal2-toast .swal2-close{grid-column:3/3;grid-row:1/99;align-self:center;width:.8em;height:.8em;margin:0;font-size:2em}.swal2-popup.swal2-toast .swal2-html-container{margin:.5em 1em;padding:0;overflow:initial;font-size:1em;text-align:initial}.swal2-popup.swal2-toast .swal2-html-container:empty{padding:0}.swal2-popup.swal2-toast .swal2-loader{grid-column:1;grid-row:1/99;align-self:center;width:2em;height:2em;margin:.25em}.swal2-popup.swal2-toast .swal2-icon{grid-column:1;grid-row:1/99;align-self:center;width:2em;min-width:2em;height:2em;margin:0 .5em 0 0}.swal2-popup.swal2-toast .swal2-icon .swal2-icon-content{display:flex;align-items:center;font-size:1.8em;font-weight:bold}.swal2-popup.swal2-toast .swal2-icon.swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line]{top:.875em;width:1.375em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left]{left:.3125em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]{right:.3125em}.swal2-popup.swal2-toast .swal2-actions{justify-content:flex-start;height:auto;margin:0;margin-top:.5em;padding:0 .5em}.swal2-popup.swal2-toast .swal2-styled{margin:.25em .5em;padding:.4em .6em;font-size:1em}.swal2-popup.swal2-toast .swal2-success{border-color:#a5dc86}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line]{position:absolute;width:1.6em;height:3em;transform:rotate(45deg);border-radius:50%}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=left]{top:-0.8em;left:-0.5em;transform:rotate(-45deg);transform-origin:2em 2em;border-radius:4em 0 0 4em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=right]{top:-0.25em;left:.9375em;transform-origin:0 1.5em;border-radius:0 4em 4em 0}.swal2-popup.swal2-toast .swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-popup.swal2-toast .swal2-success .swal2-success-fix{top:0;left:.4375em;width:.4375em;height:2.6875em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line]{height:.3125em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=tip]{top:1.125em;left:.1875em;width:.75em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=long]{top:.9375em;right:.1875em;width:1.375em}.swal2-popup.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-tip{animation:swal2-toast-animate-success-line-tip .75s}.swal2-popup.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-long{animation:swal2-toast-animate-success-line-long .75s}.swal2-popup.swal2-toast.swal2-show{animation:swal2-toast-show .5s}.swal2-popup.swal2-toast.swal2-hide{animation:swal2-toast-hide .1s forwards}.swal2-container{display:grid;position:fixed;z-index:1060;top:0;right:0;bottom:0;left:0;box-sizing:border-box;grid-template-areas:"top-start top top-end" "center-start center center-end" "bottom-start bottom-center bottom-end";grid-template-rows:minmax(min-content, auto) minmax(min-content, auto) minmax(min-content, auto);height:100%;padding:.625em;overflow-x:hidden;transition:background-color .1s;-webkit-overflow-scrolling:touch}.swal2-container.swal2-backdrop-show,.swal2-container.swal2-noanimation{background:rgba(0,0,0,.4)}.swal2-container.swal2-backdrop-hide{background:rgba(0,0,0,0) !important}.swal2-container.swal2-top-start,.swal2-container.swal2-center-start,.swal2-container.swal2-bottom-start{grid-template-columns:minmax(0, 1fr) auto auto}.swal2-container.swal2-top,.swal2-container.swal2-center,.swal2-container.swal2-bottom{grid-template-columns:auto minmax(0, 1fr) auto}.swal2-container.swal2-top-end,.swal2-container.swal2-center-end,.swal2-container.swal2-bottom-end{grid-template-columns:auto auto minmax(0, 1fr)}.swal2-container.swal2-top-start>.swal2-popup{align-self:start}.swal2-container.swal2-top>.swal2-popup{grid-column:2;align-self:start;justify-self:center}.swal2-container.swal2-top-end>.swal2-popup,.swal2-container.swal2-top-right>.swal2-popup{grid-column:3;align-self:start;justify-self:end}.swal2-container.swal2-center-start>.swal2-popup,.swal2-container.swal2-center-left>.swal2-popup{grid-row:2;align-self:center}.swal2-container.swal2-center>.swal2-popup{grid-column:2;grid-row:2;align-self:center;justify-self:center}.swal2-container.swal2-center-end>.swal2-popup,.swal2-container.swal2-center-right>.swal2-popup{grid-column:3;grid-row:2;align-self:center;justify-self:end}.swal2-container.swal2-bottom-start>.swal2-popup,.swal2-container.swal2-bottom-left>.swal2-popup{grid-column:1;grid-row:3;align-self:end}.swal2-container.swal2-bottom>.swal2-popup{grid-column:2;grid-row:3;justify-self:center;align-self:end}.swal2-container.swal2-bottom-end>.swal2-popup,.swal2-container.swal2-bottom-right>.swal2-popup{grid-column:3;grid-row:3;align-self:end;justify-self:end}.swal2-container.swal2-grow-row>.swal2-popup,.swal2-container.swal2-grow-fullscreen>.swal2-popup{grid-column:1/4;width:100%}.swal2-container.swal2-grow-column>.swal2-popup,.swal2-container.swal2-grow-fullscreen>.swal2-popup{grid-row:1/4;align-self:stretch}.swal2-container.swal2-no-transition{transition:none !important}.swal2-popup{display:none;position:relative;box-sizing:border-box;grid-template-columns:minmax(0, 100%);width:32em;max-width:100%;padding:0 0 1.25em;border:none;border-radius:5px;background:#fff;color:#545454;font-family:inherit;font-size:1rem}.swal2-popup:focus{outline:none}.swal2-popup.swal2-loading{overflow-y:hidden}.swal2-title{position:relative;max-width:100%;margin:0;padding:.8em 1em 0;color:inherit;font-size:1.875em;font-weight:600;text-align:center;text-transform:none;word-wrap:break-word}.swal2-actions{display:flex;z-index:1;box-sizing:border-box;flex-wrap:wrap;align-items:center;justify-content:center;width:auto;margin:1.25em auto 0;padding:0}.swal2-actions:not(.swal2-loading) .swal2-styled[disabled]{opacity:.4}.swal2-actions:not(.swal2-loading) .swal2-styled:hover{background-image:linear-gradient(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.1))}.swal2-actions:not(.swal2-loading) .swal2-styled:active{background-image:linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2))}.swal2-loader{display:none;align-items:center;justify-content:center;width:2.2em;height:2.2em;margin:0 1.875em;animation:swal2-rotate-loading 1.5s linear 0s infinite normal;border-width:.25em;border-style:solid;border-radius:100%;border-color:#2778c4 rgba(0,0,0,0) #2778c4 rgba(0,0,0,0)}.swal2-styled{margin:.3125em;padding:.625em 1.1em;transition:box-shadow .1s;box-shadow:0 0 0 3px rgba(0,0,0,0);font-weight:500}.swal2-styled:not([disabled]){cursor:pointer}.swal2-styled.swal2-confirm{border:0;border-radius:.25em;background:initial;background-color:#7066e0;color:#fff;font-size:1em}.swal2-styled.swal2-confirm:focus{box-shadow:0 0 0 3px rgba(112,102,224,.5)}.swal2-styled.swal2-deny{border:0;border-radius:.25em;background:initial;background-color:#dc3741;color:#fff;font-size:1em}.swal2-styled.swal2-deny:focus{box-shadow:0 0 0 3px rgba(220,55,65,.5)}.swal2-styled.swal2-cancel{border:0;border-radius:.25em;background:initial;background-color:#6e7881;color:#fff;font-size:1em}.swal2-styled.swal2-cancel:focus{box-shadow:0 0 0 3px rgba(110,120,129,.5)}.swal2-styled.swal2-default-outline:focus{box-shadow:0 0 0 3px rgba(100,150,200,.5)}.swal2-styled:focus{outline:none}.swal2-styled::-moz-focus-inner{border:0}.swal2-footer{justify-content:center;margin:1em 0 0;padding:1em 1em 0;border-top:1px solid #eee;color:inherit;font-size:1em}.swal2-timer-progress-bar-container{position:absolute;right:0;bottom:0;left:0;grid-column:auto !important;overflow:hidden;border-bottom-right-radius:5px;border-bottom-left-radius:5px}.swal2-timer-progress-bar{width:100%;height:.25em;background:rgba(0,0,0,.2)}.swal2-image{max-width:100%;margin:2em auto 1em}.swal2-close{z-index:2;align-items:center;justify-content:center;width:1.2em;height:1.2em;margin-top:0;margin-right:0;margin-bottom:-1.2em;padding:0;overflow:hidden;transition:color .1s,box-shadow .1s;border:none;border-radius:5px;background:rgba(0,0,0,0);color:#ccc;font-family:serif;font-family:monospace;font-size:2.5em;cursor:pointer;justify-self:end}.swal2-close:hover{transform:none;background:rgba(0,0,0,0);color:#f27474}.swal2-close:focus{outline:none;box-shadow:inset 0 0 0 3px rgba(100,150,200,.5)}.swal2-close::-moz-focus-inner{border:0}.swal2-html-container{z-index:1;justify-content:center;margin:1em 1.6em .3em;padding:0;overflow:auto;color:inherit;font-size:1.125em;font-weight:normal;line-height:normal;text-align:center;word-wrap:break-word;word-break:break-word}.swal2-input,.swal2-file,.swal2-textarea,.swal2-select,.swal2-radio,.swal2-checkbox{margin:1em 2em 3px}.swal2-input,.swal2-file,.swal2-textarea{box-sizing:border-box;width:auto;transition:border-color .1s,box-shadow .1s;border:1px solid #d9d9d9;border-radius:.1875em;background:rgba(0,0,0,0);box-shadow:inset 0 1px 1px rgba(0,0,0,.06),0 0 0 3px rgba(0,0,0,0);color:inherit;font-size:1.125em}.swal2-input.swal2-inputerror,.swal2-file.swal2-inputerror,.swal2-textarea.swal2-inputerror{border-color:#f27474 !important;box-shadow:0 0 2px #f27474 !important}.swal2-input:focus,.swal2-file:focus,.swal2-textarea:focus{border:1px solid #b4dbed;outline:none;box-shadow:inset 0 1px 1px rgba(0,0,0,.06),0 0 0 3px rgba(100,150,200,.5)}.swal2-input::placeholder,.swal2-file::placeholder,.swal2-textarea::placeholder{color:#ccc}.swal2-range{margin:1em 2em 3px;background:#fff}.swal2-range input{width:80%}.swal2-range output{width:20%;color:inherit;font-weight:600;text-align:center}.swal2-range input,.swal2-range output{height:2.625em;padding:0;font-size:1.125em;line-height:2.625em}.swal2-input{height:2.625em;padding:0 .75em}.swal2-file{width:75%;margin-right:auto;margin-left:auto;background:rgba(0,0,0,0);font-size:1.125em}.swal2-textarea{height:6.75em;padding:.75em}.swal2-select{min-width:50%;max-width:100%;padding:.375em .625em;background:rgba(0,0,0,0);color:inherit;font-size:1.125em}.swal2-radio,.swal2-checkbox{align-items:center;justify-content:center;background:#fff;color:inherit}.swal2-radio label,.swal2-checkbox label{margin:0 .6em;font-size:1.125em}.swal2-radio input,.swal2-checkbox input{flex-shrink:0;margin:0 .4em}.swal2-input-label{display:flex;justify-content:center;margin:1em auto 0}.swal2-validation-message{align-items:center;justify-content:center;margin:1em 0 0;padding:.625em;overflow:hidden;background:#f0f0f0;color:#666;font-size:1em;font-weight:300}.swal2-validation-message::before{content:"!";display:inline-block;width:1.5em;min-width:1.5em;height:1.5em;margin:0 .625em;border-radius:50%;background-color:#f27474;color:#fff;font-weight:600;line-height:1.5em;text-align:center}.swal2-icon{position:relative;box-sizing:content-box;justify-content:center;width:5em;height:5em;margin:2.5em auto .6em;border:0.25em solid rgba(0,0,0,0);border-radius:50%;border-color:#000;font-family:inherit;line-height:5em;cursor:default;user-select:none}.swal2-icon .swal2-icon-content{display:flex;align-items:center;font-size:3.75em}.swal2-icon.swal2-error{border-color:#f27474;color:#f27474}.swal2-icon.swal2-error .swal2-x-mark{position:relative;flex-grow:1}.swal2-icon.swal2-error [class^=swal2-x-mark-line]{display:block;position:absolute;top:2.3125em;width:2.9375em;height:.3125em;border-radius:.125em;background-color:#f27474}.swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left]{left:1.0625em;transform:rotate(45deg)}.swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]{right:1em;transform:rotate(-45deg)}.swal2-icon.swal2-error.swal2-icon-show{animation:swal2-animate-error-icon .5s}.swal2-icon.swal2-error.swal2-icon-show .swal2-x-mark{animation:swal2-animate-error-x-mark .5s}.swal2-icon.swal2-warning{border-color:#facea8;color:#f8bb86}.swal2-icon.swal2-warning.swal2-icon-show{animation:swal2-animate-error-icon .5s}.swal2-icon.swal2-warning.swal2-icon-show .swal2-icon-content{animation:swal2-animate-i-mark .5s}.swal2-icon.swal2-info{border-color:#9de0f6;color:#3fc3ee}.swal2-icon.swal2-info.swal2-icon-show{animation:swal2-animate-error-icon .5s}.swal2-icon.swal2-info.swal2-icon-show .swal2-icon-content{animation:swal2-animate-i-mark .8s}.swal2-icon.swal2-question{border-color:#c9dae1;color:#87adbd}.swal2-icon.swal2-question.swal2-icon-show{animation:swal2-animate-error-icon .5s}.swal2-icon.swal2-question.swal2-icon-show .swal2-icon-content{animation:swal2-animate-question-mark .8s}.swal2-icon.swal2-success{border-color:#a5dc86;color:#a5dc86}.swal2-icon.swal2-success [class^=swal2-success-circular-line]{position:absolute;width:3.75em;height:7.5em;transform:rotate(45deg);border-radius:50%}.swal2-icon.swal2-success [class^=swal2-success-circular-line][class$=left]{top:-0.4375em;left:-2.0635em;transform:rotate(-45deg);transform-origin:3.75em 3.75em;border-radius:7.5em 0 0 7.5em}.swal2-icon.swal2-success [class^=swal2-success-circular-line][class$=right]{top:-0.6875em;left:1.875em;transform:rotate(-45deg);transform-origin:0 3.75em;border-radius:0 7.5em 7.5em 0}.swal2-icon.swal2-success .swal2-success-ring{position:absolute;z-index:2;top:-0.25em;left:-0.25em;box-sizing:content-box;width:100%;height:100%;border:.25em solid rgba(165,220,134,.3);border-radius:50%}.swal2-icon.swal2-success .swal2-success-fix{position:absolute;z-index:1;top:.5em;left:1.625em;width:.4375em;height:5.625em;transform:rotate(-45deg)}.swal2-icon.swal2-success [class^=swal2-success-line]{display:block;position:absolute;z-index:2;height:.3125em;border-radius:.125em;background-color:#a5dc86}.swal2-icon.swal2-success [class^=swal2-success-line][class$=tip]{top:2.875em;left:.8125em;width:1.5625em;transform:rotate(45deg)}.swal2-icon.swal2-success [class^=swal2-success-line][class$=long]{top:2.375em;right:.5em;width:2.9375em;transform:rotate(-45deg)}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-line-tip{animation:swal2-animate-success-line-tip .75s}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-line-long{animation:swal2-animate-success-line-long .75s}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-circular-line-right{animation:swal2-rotate-success-circular-line 4.25s ease-in}.swal2-progress-steps{flex-wrap:wrap;align-items:center;max-width:100%;margin:1.25em auto;padding:0;background:rgba(0,0,0,0);font-weight:600}.swal2-progress-steps li{display:inline-block;position:relative}.swal2-progress-steps .swal2-progress-step{z-index:20;flex-shrink:0;width:2em;height:2em;border-radius:2em;background:#2778c4;color:#fff;line-height:2em;text-align:center}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step{background:#2778c4}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step{background:#add8e6;color:#fff}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step-line{background:#add8e6}.swal2-progress-steps .swal2-progress-step-line{z-index:10;flex-shrink:0;width:2.5em;height:.4em;margin:0 -1px;background:#2778c4}[class^=swal2]{-webkit-tap-highlight-color:rgba(0,0,0,0)}.swal2-show{animation:swal2-show .3s}.swal2-hide{animation:swal2-hide .15s forwards}.swal2-noanimation{transition:none}.swal2-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}.swal2-rtl .swal2-close{margin-right:initial;margin-left:0}.swal2-rtl .swal2-timer-progress-bar{right:0;left:auto}@keyframes swal2-toast-show{0%{transform:translateY(-0.625em) rotateZ(2deg)}33%{transform:translateY(0) rotateZ(-2deg)}66%{transform:translateY(0.3125em) rotateZ(2deg)}100%{transform:translateY(0) rotateZ(0deg)}}@keyframes swal2-toast-hide{100%{transform:rotateZ(1deg);opacity:0}}@keyframes swal2-toast-animate-success-line-tip{0%{top:.5625em;left:.0625em;width:0}54%{top:.125em;left:.125em;width:0}70%{top:.625em;left:-0.25em;width:1.625em}84%{top:1.0625em;left:.75em;width:.5em}100%{top:1.125em;left:.1875em;width:.75em}}@keyframes swal2-toast-animate-success-line-long{0%{top:1.625em;right:1.375em;width:0}65%{top:1.25em;right:.9375em;width:0}84%{top:.9375em;right:0;width:1.125em}100%{top:.9375em;right:.1875em;width:1.375em}}@keyframes swal2-show{0%{transform:scale(0.7)}45%{transform:scale(1.05)}80%{transform:scale(0.95)}100%{transform:scale(1)}}@keyframes swal2-hide{0%{transform:scale(1);opacity:1}100%{transform:scale(0.5);opacity:0}}@keyframes swal2-animate-success-line-tip{0%{top:1.1875em;left:.0625em;width:0}54%{top:1.0625em;left:.125em;width:0}70%{top:2.1875em;left:-0.375em;width:3.125em}84%{top:3em;left:1.3125em;width:1.0625em}100%{top:2.8125em;left:.8125em;width:1.5625em}}@keyframes swal2-animate-success-line-long{0%{top:3.375em;right:2.875em;width:0}65%{top:3.375em;right:2.875em;width:0}84%{top:2.1875em;right:0;width:3.4375em}100%{top:2.375em;right:.5em;width:2.9375em}}@keyframes swal2-rotate-success-circular-line{0%{transform:rotate(-45deg)}5%{transform:rotate(-45deg)}12%{transform:rotate(-405deg)}100%{transform:rotate(-405deg)}}@keyframes swal2-animate-error-x-mark{0%{margin-top:1.625em;transform:scale(0.4);opacity:0}50%{margin-top:1.625em;transform:scale(0.4);opacity:0}80%{margin-top:-0.375em;transform:scale(1.15)}100%{margin-top:0;transform:scale(1);opacity:1}}@keyframes swal2-animate-error-icon{0%{transform:rotateX(100deg);opacity:0}100%{transform:rotateX(0deg);opacity:1}}@keyframes swal2-rotate-loading{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}@keyframes swal2-animate-question-mark{0%{transform:rotateY(-360deg)}100%{transform:rotateY(0)}}@keyframes swal2-animate-i-mark{0%{transform:rotateZ(45deg);opacity:0}25%{transform:rotateZ(-25deg);opacity:.4}50%{transform:rotateZ(15deg);opacity:.8}75%{transform:rotateZ(-5deg);opacity:1}100%{transform:rotateX(0);opacity:1}}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown){overflow:hidden}body.swal2-height-auto{height:auto !important}body.swal2-no-backdrop .swal2-container{background-color:rgba(0,0,0,0) !important;pointer-events:none}body.swal2-no-backdrop .swal2-container .swal2-popup{pointer-events:all}body.swal2-no-backdrop .swal2-container .swal2-modal{box-shadow:0 0 10px rgba(0,0,0,.4)}@media print{body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown){overflow-y:scroll !important}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown)>[aria-hidden=true]{display:none}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown) .swal2-container{position:static !important}}body.swal2-toast-shown .swal2-container{box-sizing:border-box;width:360px;max-width:100%;background-color:rgba(0,0,0,0);pointer-events:none}body.swal2-toast-shown .swal2-container.swal2-top{top:0;right:auto;bottom:auto;left:50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-top-end,body.swal2-toast-shown .swal2-container.swal2-top-right{top:0;right:0;bottom:auto;left:auto}body.swal2-toast-shown .swal2-container.swal2-top-start,body.swal2-toast-shown .swal2-container.swal2-top-left{top:0;right:auto;bottom:auto;left:0}body.swal2-toast-shown .swal2-container.swal2-center-start,body.swal2-toast-shown .swal2-container.swal2-center-left{top:50%;right:auto;bottom:auto;left:0;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-center{top:50%;right:auto;bottom:auto;left:50%;transform:translate(-50%, -50%)}body.swal2-toast-shown .swal2-container.swal2-center-end,body.swal2-toast-shown .swal2-container.swal2-center-right{top:50%;right:0;bottom:auto;left:auto;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-start,body.swal2-toast-shown .swal2-container.swal2-bottom-left{top:auto;right:auto;bottom:0;left:0}body.swal2-toast-shown .swal2-container.swal2-bottom{top:auto;right:auto;bottom:0;left:50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-end,body.swal2-toast-shown .swal2-container.swal2-bottom-right{top:auto;right:0;bottom:0;left:auto}')})(ep);const tp=ep.exports;async function np(e){const t=await tp.fire({title:e,input:"text",inputAttributes:{autocapitalize:"off"},showCancelButton:!0,confirmButtonText:"Ok",allowOutsideClick:!0,heightAuto:!1,reverseButtons:!0});return t.isConfirmed==!0?t.value:"CANCEL"}function WC(){window.webSocketClient.respond("prompt",async e=>await np(e))}const YC=me({__name:"SyncFile",props:{options:null},setup(e){const t=e,n=window.location.pathname.split("/")[1],s=window.config.maxUploadFileSizeMB,r=G([]),o=G([]);let i=[];function l(g){for(const v of g){const E=ss(new KC(v));E.onComplete=N=>{window.webSocketClient.request(`setter:${t.options.onUploadId}`,N),c(E.id)},o.value.push(E.uploadingFile()),i.push(E),E.start()}}function c(g){var v;(v=i.find(E=>E.id===g))==null||v.abort(),i=i.filter(E=>E.id!==g),o.value=o.value.filter(E=>E.id!==g)}function f(g){var E;const v=`/uploads/${n}/${g.id}/${g.name}`;(E=window.open(v,"_blank"))==null||E.focus()}function d(g){var E;var v=document.createElement("a");v.href=`/uploads/${n}/${g.id}/${g.name}`,v.download=(E=g.displayName)!=null?E:g.name,v.dispatchEvent(new MouseEvent("click"))}function h(g){window.webSocketClient.request(`setter:${t.options.onDeleteId}`,g.id)}async function m(g){const v=await np("New filename:");v!=="CANCEL"&&v.trim().length>0&&await window.webSocketClient.request(`setter:${t.options.onRenameId}`,{fileId:g.id,name:v})&&(g.displayName=v)}return it(t.options.uploadedFilesId,g=>r.value=g),(g,v)=>(A(),pe(UC,{"uploaded-files":r.value,"uploading-files":o.value,"max-file-size":se(s),onUpload:l,onAbort:v[0]||(v[0]=E=>c(E.id)),onDelete:h,onOpen:f,onDownload:d,onRename:m},null,8,["uploaded-files","uploading-files","max-file-size"]))}}),sp=me({__name:"RenderBlock",props:{components:null,highlightStr:null},setup(e){return(t,n)=>(A(!0),Q($e,null,nt(e.components,s=>(A(),Q($e,{key:s.id},[s.type==="BUTTON"?(A(),pe(X1,{key:0,options:s},null,8,["options"])):ve("",!0),s.type==="DATATABLE"?(A(),pe(H2,{key:1,options:s},null,8,["options"])):ve("",!0),s.type==="DARK_SIDEBAR"?(A(),pe(j_,{key:2,options:s},null,8,["options"])):ve("",!0),s.type==="INPUT"?(A(),pe(q2,{key:3,options:s},null,8,["options"])):ve("",!0),s.type==="DATE_TIME"?(A(),pe(Z2,{key:4,options:s},null,8,["options"])):ve("",!0),s.type==="SELECT_ONE"?(A(),pe(fC,{key:5,options:s},null,8,["options"])):ve("",!0),s.type==="SELECT_MANY"?(A(),pe(dC,{key:6,options:s},null,8,["options"])):ve("",!0),s.type==="TOGGLE"?(A(),pe(hC,{key:7,options:s},null,8,["options"])):ve("",!0),s.type==="FILE"?(A(),pe(YC,{key:8,options:s},null,8,["options"])):ve("",!0),s.type==="CONTAINER"?(A(),pe(sa,{key:9,options:s},null,8,["options"])):ve("",!0),s.type==="TEXT"?(A(),pe(U_,{key:10,options:s,"highlight-str":e.highlightStr},null,8,["options","highlight-str"])):ve("",!0)],64))),128))}});class ZC{constructor(){Nt(this,"emitSubscriptions",[]);Nt(this,"requestHandlers",{});Nt(this,"awaitingResponses",[])}subscribe(t,n){const s=ol();return this.emitSubscriptions.push({id:s,roomName:t,func:n}),()=>this.emitSubscriptions=this.emitSubscriptions.filter(r=>r.id!==s)}respond(t,n){this.requestHandlers[t]=n}async onMessage(t){var n;if(t.type==="emit"&&this.emitSubscriptions.filter(s=>s.roomName===t.roomName).forEach(s=>s.func.call(null,t.payload)),t.type==="request"){const s=await this.requestHandlers[t.roomName];if(s!==void 0){const r=await s.call(null,t.payload);this.send({type:"response",id:t.id,payload:r})}}t.type==="response"&&(await((n=this.awaitingResponses.find(s=>s.id===t.id))==null?void 0:n.resolve(t.payload)),this.awaitingResponses=this.awaitingResponses.filter(s=>s.id!==t.id))}emit(t,n=null){this.send({type:"emit",roomName:t,payload:n})}request(t,n={}){return new Promise((s,r)=>{const o=ol();this.send({type:"request",id:o,roomName:t,payload:n}),this.awaitingResponses.push({id:o,resolve:s,reject:r})})}}class QC extends ZC{constructor(){super(...arguments);Nt(this,"ws")}start(){const n=new URLSearchParams;n.set("tz",Intl.DateTimeFormat().resolvedOptions().timeZone),this.ws=new WebSocket(`ws://${window.location.host}/socket?${n.toString()}`),this.ws.onmessage=s=>this.onMessage(JSON.parse(s.data)),this.ws.onclose=()=>{document.querySelector("body").classList.add("disconnect"),setInterval(()=>{this.ws=new WebSocket(`ws://${window.location.host}/socket`),this.ws.onopen=()=>window.location.reload()},3500)}}send(n){this.ws.send(JSON.stringify(n))}}const GC={class:"tw-w-full tw-h-full tw-flex tw-flex-col tw-justify-center tw-items-center"},JC={class:"tw-font-bold tw-text-8xl"},XC={key:0,class:"tw-mt-2 tw-text-lg tw-text-gray-500 tw-text-center"},ex=x("svg",{xmlns:"http://www.w3.org/2000/svg",class:"tw-h-5 tw-w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},[x("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M11 17l-5-5m0 0l5-5m-5 5h12"})],-1),tx=me({__name:"ErrorPage",props:{status:null,workspaceId:null,message:null},setup(e){const t=e,n=hn(),s=Zr();async function r(){var o;/^\/\w+$/.test(s.path)?n.push("/"):n.push(`/${(o=t.workspaceId)!=null?o:""}`)}return(o,i)=>(A(),Q("div",GC,[x("h1",JC,de(e.status),1),e.message?(A(),Q("p",XC,de(e.message),1)):ve("",!0),x("span",{class:"tw-text-gray-400 tw-cursor-pointer hover:tw-text-gray-500 tw-flex tw-items-center tw-mt-4",onClick:r},[ex,x("span",null,de(se(He).frontend.errorPage.backToHome),1)])]))}}),nx={class:"tw-min-h-full tw-flex tw-flex-col tw-justify-center tw-py-12 sm:tw-px-6 lg:tw-px-8"},sx={class:"sm:tw-mx-auto sm:tw-w-full sm:tw-max-w-md"},ox={class:"tw-mt-6 tw-text-center tw-text-3xl tw-font-extrabold tw-text-gray-900"},rx={class:"tw-mt-2 tw-text-center tw-text-sm tw-text-gray-600"},ix={class:"tw-mt-8 sm:tw-mx-auto sm:tw-w-full sm:tw-max-w-md"},lx={class:"tw-bg-white tw-py-8 tw-px-4 tw-shadow sm:tw-rounded-lg sm:tw-px-10"},ax={class:"tw-space-y-6"},cx=x("label",{for:"email",class:"tw-block tw-text-sm tw-font-medium tw-text-gray-700"}," Name ",-1),ux={class:"tw-mt-1"},fx=["onKeypress"],dx=x("label",{for:"email",class:"tw-block tw-text-sm tw-font-medium tw-text-gray-700"}," Email ",-1),px={class:"tw-mt-1"},hx=["onKeypress"],mx=x("label",{for:"password",class:"tw-block tw-text-sm tw-font-medium tw-text-gray-700"}," Password ",-1),wx={class:"tw-mt-1"},gx=["onKeypress"],yx={for:"password",class:"tw-block tw-text-sm tw-font-medium tw-text-gray-700"},bx={class:"tw-mt-1"},vx=["onKeypress"],_x=me({__name:"RegisterPage",setup(e){const t=G(null),n=G(""),s=G(""),r=G(""),o=G(""),i=hn();async function l(){const c=await window.webSocketClient.request("register",{name:n.value,email:s.value,password:r.value,confirmPassword:o.value,userAgent:navigator.userAgent});c.status===!1?t.value=c.message:(localStorage.setItem("sessionId",c.sessionId),setTimeout(()=>i.replace("/logout"),c.validForMilliseconds),i.replace("/"+c.workspaceId))}return(c,f)=>(A(),Q("div",nx,[x("div",sx,[x("h2",ox,de(se(He).frontend.registerPage.title),1),x("p",rx,[We(de(se(He).frontend.registerPage.alreadyAccount)+" "+de(" ")+" ",1),x("span",{onClick:f[0]||(f[0]=d=>c.$router.push("/login")),class:"tw-cursor-pointer tw-font-medium tw-text-blue-600 hover:tw-text-blue-500"},de(se(He).frontend.registerPage.loginNow),1)])]),x("div",ix,[x("div",lx,[t.value!==null?(A(),pe(yo,{key:0,type:"error",message:t.value,class:"tw-mb-4"},null,8,["message"])):ve("",!0),x("div",ax,[x("div",null,[cx,x("div",ux,[xt(x("input",{"onUpdate:modelValue":f[1]||(f[1]=d=>n.value=d),type:"text",required:"",autocomplete:"off",class:"tw-appearance-none tw-block tw-w-full tw-px-3 tw-py-2 tw-border tw-border-gray-300 tw-rounded-md tw-shadow-sm tw-placeholder-gray-400 focus:tw-outline-none focus:tw-ring-blue-500 focus:tw-border-blue-500 sm:tw-text-sm",onKeypress:Qt(l,["enter"])},null,40,fx),[[kt,n.value]])])]),x("div",null,[dx,x("div",px,[xt(x("input",{"onUpdate:modelValue":f[2]||(f[2]=d=>s.value=d),type:"email",required:"",autocomplete:"off",class:"tw-appearance-none tw-block tw-w-full tw-px-3 tw-py-2 tw-border tw-border-gray-300 tw-rounded-md tw-shadow-sm tw-placeholder-gray-400 focus:tw-outline-none focus:tw-ring-blue-500 focus:tw-border-blue-500 sm:tw-text-sm",onKeypress:Qt(l,["enter"])},null,40,hx),[[kt,s.value]])])]),x("div",null,[mx,x("div",wx,[xt(x("input",{"onUpdate:modelValue":f[3]||(f[3]=d=>r.value=d),type:"password",required:"",autocomplete:"off",class:"tw-appearance-none tw-block tw-w-full tw-px-3 tw-py-2 tw-border tw-border-gray-300 tw-rounded-md tw-shadow-sm tw-placeholder-gray-400 focus:tw-outline-none focus:tw-ring-blue-500 focus:tw-border-blue-500 sm:tw-text-sm",onKeypress:Qt(l,["enter"])},null,40,gx),[[kt,r.value]])])]),x("div",null,[x("label",yx,de(se(He).frontend.registerPage.confirmPassword),1),x("div",bx,[xt(x("input",{"onUpdate:modelValue":f[4]||(f[4]=d=>o.value=d),type:"password",required:"",autocomplete:"off",class:"tw-appearance-none tw-block tw-w-full tw-px-3 tw-py-2 tw-border tw-border-gray-300 tw-rounded-md tw-shadow-sm tw-placeholder-gray-400 focus:tw-outline-none focus:tw-ring-blue-500 focus:tw-border-blue-500 sm:tw-text-sm",onKeypress:Qt(l,["enter"])},null,40,vx),[[kt,o.value]])])]),_e(kn,{label:se(He).frontend.signUp,onClick:l},null,8,["label"])])])])]))}});const Cx={},xx={class:"tw-w-full tw-h-full tw-relative tw-flex tw-justify-center tw-items-center tw-backdrop-blur tw-backdrop-grayscale tw-z-[100]"},kx=kf('<div class="tw-z-10 tw-relative tw-transform tw-overflow-hidden tw-rounded-lg tw-bg-white tw-text-left tw-shadow-xl tw-transition-all tw-px-6 tw-py-8 tw-max-w-sm" data-v-99ed1811><div class="tw-h-0.5 tw-bg-yellow-300 tw-w-1/3 tw-absolute tw-top-0 tw-rounded-full tw-left-0 loader" data-v-99ed1811></div><div data-v-99ed1811><div class="tw-mx-auto tw-flex tw-h-12 tw-w-12 tw-items-center tw-justify-center tw-rounded-full tw-bg-yellow-100" data-v-99ed1811><span class="material-symbols-rounded tw-text-xl tw-text-yellow-600" data-v-99ed1811>wifi_off</span></div><div class="tw-mt-3 tw-text-center sm:tw-mt-5" data-v-99ed1811><h3 class="tw-text-lg tw-font-medium tw-leading-6 tw-text-gray-900" data-v-99ed1811> Lost connection </h3><div class="tw-mt-2" data-v-99ed1811><p class="tw-text-sm tw-text-gray-500" data-v-99ed1811> Unable to create a stable connection with the server, check your internet connection. </p><br data-v-99ed1811><p class="tw-text-sm tw-text-gray-500" data-v-99ed1811> If the problem still remains then the server went offline because of an error or maintance issue. </p></div></div></div></div><div class="tw-absolute tw-inset-0 tw-bg-black tw-opacity-30" data-v-99ed1811></div>',2),Ex=[kx];function Sx(e,t){return A(),Q("div",xx,Ex)}const $x=ea(Cx,[["render",Sx],["__scopeId","data-v-99ed1811"]]),Tx={class:"tw-min-h-full tw-flex tw-flex-col tw-justify-center tw-py-12 sm:tw-px-6 lg:tw-px-8"},Px={class:"sm:tw-mx-auto sm:tw-w-full sm:tw-max-w-md"},Ax={class:"tw-mt-6 tw-text-center tw-text-3xl tw-font-extrabold tw-text-gray-900"},Ox={class:"tw-mt-2 tw-text-center tw-text-sm tw-text-gray-600"},Ix={class:"tw-mt-8 sm:tw-mx-auto sm:tw-w-full sm:tw-max-w-md"},Mx={class:"tw-bg-white tw-py-8 tw-px-4 tw-shadow sm:tw-rounded-lg sm:tw-px-10"},Rx={class:"tw-space-y-6"},Bx=x("label",{for:"email",class:"tw-block tw-text-sm tw-font-medium tw-text-gray-700"}," Email ",-1),Nx={class:"tw-mt-1"},Lx=["onKeypress"],Dx=me({__name:"ForgotPasswordPage",setup(e){const t=G("idle"),n=G(""),s=G(!1);async function r(){t.value="idle",s.value=!0;const o=await window.webSocketClient.request("forgot-password",{email:n.value});s.value=!1,o===!1?t.value="invalid":t.value="success"}return(o,i)=>(A(),Q("div",Tx,[x("div",Px,[x("h2",Ax,de(se(He).frontend.forgotPasswordPage.title),1),x("p",Ox,[We(de(se(He).frontend.forgotPasswordPage.rememberAgain)+" "+de(" ")+" ",1),x("span",{onClick:i[0]||(i[0]=l=>o.$router.push("/login")),class:"tw-cursor-pointer tw-font-medium tw-text-blue-600 hover:tw-text-blue-500"},de(se(He).frontend.forgotPasswordPage.backToLogin),1)])]),x("div",Ix,[x("div",Mx,[t.value==="invalid"?(A(),pe(yo,{key:0,type:"error",message:se(He).frontend.forgotPasswordPage.emailNotFound,class:"tw-mb-4"},null,8,["message"])):ve("",!0),t.value==="success"?(A(),pe(yo,{key:1,type:"success",message:se(He).frontend.forgotPasswordPage.successMessage,class:"tw-mb-4"},null,8,["message"])):ve("",!0),x("div",Rx,[x("div",null,[Bx,x("div",Nx,[xt(x("input",{"onUpdate:modelValue":i[1]||(i[1]=l=>n.value=l),id:"email",name:"email",type:"email",autocomplete:"email",required:"",class:"tw-appearance-none tw-block tw-w-full tw-px-3 tw-py-2 tw-border tw-border-gray-300 tw-rounded-md tw-shadow-sm tw-placeholder-gray-400 focus:tw-outline-none focus:tw-ring-blue-500 focus:tw-border-blue-500 sm:tw-text-sm",onKeypress:Qt(r,["enter"])},null,40,Lx),[[kt,n.value]])])]),_e(kn,{label:se(He).frontend.forgotPasswordPage.button,loading:s.value,onClick:r},null,8,["label","loading"])])])])]))}}),Fx={class:"tw-min-h-full tw-flex tw-flex-col tw-justify-center tw-py-12 sm:tw-px-6 lg:tw-px-8"},Hx={class:"sm:tw-mx-auto sm:tw-w-full sm:tw-max-w-md"},jx={class:"tw-mt-6 tw-text-center tw-text-3xl tw-font-extrabold tw-text-gray-900"},Vx={class:"tw-mt-2 tw-text-center tw-text-sm tw-text-gray-600"},Ux={class:"tw-mt-8 sm:tw-mx-auto sm:tw-w-full sm:tw-max-w-md"},qx={class:"tw-bg-white tw-py-8 tw-px-4 tw-shadow sm:tw-rounded-lg sm:tw-px-10"},zx={class:"tw-space-y-6"},Kx=x("label",{for:"password",class:"tw-block tw-text-sm tw-font-medium tw-text-gray-700"}," Password ",-1),Wx={class:"tw-mt-1"},Yx=["onKeypress"],Zx={for:"password",class:"tw-block tw-text-sm tw-font-medium tw-text-gray-700"},Qx={class:"tw-mt-1"},Gx=["onKeypress"],Jx=me({__name:"ResetPasswordPage",setup(e){const t=G(null),n=G(""),s=G(""),r=Zr(),o=hn(),i=G(!1);async function l(){var d;i.value=!0;const c={token:((d=r.query.token)==null?void 0:d.toString())||"",password:n.value,confirmPassword:s.value},f=await window.webSocketClient.request("reset-password",c);i.value=!1,f.type==="ERROR"?t.value=f.message:o.replace("/login")}return(c,f)=>(A(),Q("div",Fx,[x("div",Hx,[x("h2",jx,de(se(He).frontend.resetPasswordPage.title),1),x("p",Vx,[We(de(se(He).frontend.forgotPasswordPage.rememberAgain)+" "+de(" ")+" ",1),x("span",{onClick:f[0]||(f[0]=d=>c.$router.push("/login")),class:"tw-cursor-pointer tw-font-medium tw-text-blue-600 hover:tw-text-blue-500"},de(se(He).frontend.forgotPasswordPage.backToLogin),1)])]),x("div",Ux,[x("div",qx,[t.value!==null?(A(),pe(yo,{key:0,type:"error",message:t.value,class:"tw-mb-4"},null,8,["message"])):ve("",!0),x("div",zx,[x("div",null,[Kx,x("div",Wx,[xt(x("input",{"onUpdate:modelValue":f[1]||(f[1]=d=>n.value=d),type:"password",required:"",autocomplete:"off",class:"tw-appearance-none tw-block tw-w-full tw-px-3 tw-py-2 tw-border tw-border-gray-300 tw-rounded-md tw-shadow-sm tw-placeholder-gray-400 focus:tw-outline-none focus:tw-ring-blue-500 focus:tw-border-blue-500 sm:tw-text-sm",onKeypress:Qt(l,["enter"])},null,40,Yx),[[kt,n.value]])])]),x("div",null,[x("label",Zx,de(se(He).frontend.registerPage.confirmPassword),1),x("div",Qx,[xt(x("input",{"onUpdate:modelValue":f[2]||(f[2]=d=>s.value=d),type:"password",required:"",autocomplete:"off",class:"tw-appearance-none tw-block tw-w-full tw-px-3 tw-py-2 tw-border tw-border-gray-300 tw-rounded-md tw-shadow-sm tw-placeholder-gray-400 focus:tw-outline-none focus:tw-ring-blue-500 focus:tw-border-blue-500 sm:tw-text-sm",onKeypress:Qt(l,["enter"])},null,40,Gx),[[kt,s.value]])])]),_e(kn,{label:se(He).frontend.resetPasswordPage.button,loading:i.value,onClick:l},null,8,["label","loading"])])])])]))}});function Xx(){const[e,t]=[hn(),Zr()],n=new BroadcastChannel("auth_channel");let s=!0;n.onmessage=async r=>{r.data==="logout"&&(s=!1,e.replace("/logout"))},e.afterEach(()=>{s&&t.path==="/logout"&&n.postMessage("logout")})}function ek(e){const t=hn();window.webSocketClient.subscribe("init",async n=>{window.config=n,n_(n.name);const s=localStorage.getItem("sessionId");if(s!==null){const r=await window.webSocketClient.request("resume-session",s);r.status===!1?localStorage.removeItem("sessionId"):(localStorage.setItem("sessionId",r.sessionId),setTimeout(()=>t.replace("/logout"),r.validForMilliseconds))}await e()})}function tk(){const e=hn();window.webSocketClient.subscribe("navigate",async({url:t,type:n})=>{if(t.startsWith("data:")&&t.includes("base64")){const s=window.open();s!==null&&(s.document.open(),s.document.write(`<embed width='100%' height='100%' src='${t}'/>`),s.document.close())}else t.startsWith("http:")||t.startsWith("https:")?window.location.href=t:(n==="push"&&e.push(t),n==="replace"&&e.replace(t),n==="hard"&&(window.location.href=t),n==="blank"&&window.open(t,"_blank").focus())})}async function nk(e){return(await tp.fire({title:e.title,text:e.message,icon:"warning",showCancelButton:!0,confirmButtonText:e.primaryButtonText,reverseButtons:!0,heightAuto:!1})).isConfirmed}function sk(){window.webSocketClient.respond("confirm",async e=>await nk(e))}var ok=Object.defineProperty,lu=Object.getOwnPropertySymbols,rk=Object.prototype.hasOwnProperty,ik=Object.prototype.propertyIsEnumerable,au=(e,t,n)=>t in e?ok(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,op=(e,t)=>{for(var n in t||(t={}))rk.call(t,n)&&au(e,n,t[n]);if(lu)for(var n of lu(t))ik.call(t,n)&&au(e,n,t[n]);return e},Qr=e=>typeof e=="function",Gr=e=>typeof e=="string",rp=e=>Gr(e)&&e.trim().length>0,lk=e=>typeof e=="number",jn=e=>typeof e>"u",bo=e=>typeof e=="object"&&e!==null,ak=e=>Gt(e,"tag")&&rp(e.tag),ip=e=>window.TouchEvent&&e instanceof TouchEvent,lp=e=>Gt(e,"component")&&ap(e.component),ck=e=>Qr(e)||bo(e),ap=e=>!jn(e)&&(Gr(e)||ck(e)||lp(e)),cu=e=>bo(e)&&["height","width","right","left","top","bottom"].every(t=>lk(e[t])),Gt=(e,t)=>(bo(e)||Qr(e))&&t in e,uk=(e=>()=>e++)(0);function xi(e){return ip(e)?e.targetTouches[0].clientX:e.clientX}function uu(e){return ip(e)?e.targetTouches[0].clientY:e.clientY}var fk=e=>{jn(e.remove)?e.parentNode&&e.parentNode.removeChild(e):e.remove()},Mo=e=>lp(e)?Mo(e.component):ak(e)?me({render(){return e}}):typeof e=="string"?e:Ae(se(e)),dk=e=>{if(typeof e=="string")return e;const t=Gt(e,"props")&&bo(e.props)?e.props:{},n=Gt(e,"listeners")&&bo(e.listeners)?e.listeners:{};return{component:Mo(e),props:t,listeners:n}},pk=()=>typeof window<"u",ra=class{constructor(){this.allHandlers={}}getHandlers(e){return this.allHandlers[e]||[]}on(e,t){const n=this.getHandlers(e);n.push(t),this.allHandlers[e]=n}off(e,t){const n=this.getHandlers(e);n.splice(n.indexOf(t)>>>0,1)}emit(e,t){this.getHandlers(e).forEach(s=>s(t))}},hk=e=>["on","off","emit"].every(t=>Gt(e,t)&&Qr(e[t])),_t;(function(e){e.SUCCESS="success",e.ERROR="error",e.WARNING="warning",e.INFO="info",e.DEFAULT="default"})(_t||(_t={}));var vo;(function(e){e.TOP_LEFT="top-left",e.TOP_CENTER="top-center",e.TOP_RIGHT="top-right",e.BOTTOM_LEFT="bottom-left",e.BOTTOM_CENTER="bottom-center",e.BOTTOM_RIGHT="bottom-right"})(vo||(vo={}));var Ct;(function(e){e.ADD="add",e.DISMISS="dismiss",e.UPDATE="update",e.CLEAR="clear",e.UPDATE_DEFAULTS="update_defaults"})(Ct||(Ct={}));var Ft="Vue-Toastification",Lt={type:{type:String,default:_t.DEFAULT},classNames:{type:[String,Array],default:()=>[]},trueBoolean:{type:Boolean,default:!0}},cp={type:Lt.type,customIcon:{type:[String,Boolean,Object,Function],default:!0}},or={component:{type:[String,Object,Function,Boolean],default:"button"},classNames:Lt.classNames,showOnHover:{type:Boolean,default:!1},ariaLabel:{type:String,default:"close"}},rl={timeout:{type:[Number,Boolean],default:5e3},hideProgressBar:{type:Boolean,default:!1},isRunning:{type:Boolean,default:!1}},up={transition:{type:[Object,String],default:`${Ft}__bounce`}},mk={position:{type:String,default:vo.TOP_RIGHT},draggable:Lt.trueBoolean,draggablePercent:{type:Number,default:.6},pauseOnFocusLoss:Lt.trueBoolean,pauseOnHover:Lt.trueBoolean,closeOnClick:Lt.trueBoolean,timeout:rl.timeout,hideProgressBar:rl.hideProgressBar,toastClassName:Lt.classNames,bodyClassName:Lt.classNames,icon:cp.customIcon,closeButton:or.component,closeButtonClassName:or.classNames,showCloseButtonOnHover:or.showOnHover,accessibility:{type:Object,default:()=>({toastRole:"alert",closeButtonLabel:"close"})},rtl:{type:Boolean,default:!1},eventBus:{type:Object,required:!1,default:()=>new ra}},wk={id:{type:[String,Number],required:!0,default:0},type:Lt.type,content:{type:[String,Object,Function],required:!0,default:""},onClick:{type:Function,default:void 0},onClose:{type:Function,default:void 0}},gk={container:{type:[Object,Function],default:()=>document.body},newestOnTop:Lt.trueBoolean,maxToasts:{type:Number,default:20},transition:up.transition,toastDefaults:Object,filterBeforeCreate:{type:Function,default:e=>e},filterToasts:{type:Function,default:e=>e},containerClassName:Lt.classNames,onMounted:Function,shareAppContext:[Boolean,Object]},un={CORE_TOAST:mk,TOAST:wk,CONTAINER:gk,PROGRESS_BAR:rl,ICON:cp,TRANSITION:up,CLOSE_BUTTON:or},fp=me({name:"VtProgressBar",props:un.PROGRESS_BAR,data(){return{hasClass:!0}},computed:{style(){return{animationDuration:`${this.timeout}ms`,animationPlayState:this.isRunning?"running":"paused",opacity:this.hideProgressBar?0:1}},cpClass(){return this.hasClass?`${Ft}__progress-bar`:""}},watch:{timeout(){this.hasClass=!1,this.$nextTick(()=>this.hasClass=!0)}},mounted(){this.$el.addEventListener("animationend",this.animationEnded)},beforeUnmount(){this.$el.removeEventListener("animationend",this.animationEnded)},methods:{animationEnded(){this.$emit("close-toast")}}});function yk(e,t){return A(),Q("div",{style:Xt(e.style),class:Pe(e.cpClass)},null,6)}fp.render=yk;var bk=fp,dp=me({name:"VtCloseButton",props:un.CLOSE_BUTTON,computed:{buttonComponent(){return this.component!==!1?Mo(this.component):"button"},classes(){const e=[`${Ft}__close-button`];return this.showOnHover&&e.push("show-on-hover"),e.concat(this.classNames)}}}),vk=We(" \xD7 ");function _k(e,t){return A(),pe(Br(e.buttonComponent),So({"aria-label":e.ariaLabel,class:e.classes},e.$attrs),{default:mt(()=>[vk]),_:1},16,["aria-label","class"])}dp.render=_k;var Ck=dp,pp={},xk={"aria-hidden":"true",focusable:"false","data-prefix":"fas","data-icon":"check-circle",class:"svg-inline--fa fa-check-circle fa-w-16",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},kk=x("path",{fill:"currentColor",d:"M504 256c0 136.967-111.033 248-248 248S8 392.967 8 256 119.033 8 256 8s248 111.033 248 248zM227.314 387.314l184-184c6.248-6.248 6.248-16.379 0-22.627l-22.627-22.627c-6.248-6.249-16.379-6.249-22.628 0L216 308.118l-70.059-70.059c-6.248-6.248-16.379-6.248-22.628 0l-22.627 22.627c-6.248 6.248-6.248 16.379 0 22.627l104 104c6.249 6.249 16.379 6.249 22.628.001z"},null,-1),Ek=[kk];function Sk(e,t){return A(),Q("svg",xk,Ek)}pp.render=Sk;var $k=pp,hp={},Tk={"aria-hidden":"true",focusable:"false","data-prefix":"fas","data-icon":"info-circle",class:"svg-inline--fa fa-info-circle fa-w-16",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},Pk=x("path",{fill:"currentColor",d:"M256 8C119.043 8 8 119.083 8 256c0 136.997 111.043 248 248 248s248-111.003 248-248C504 119.083 392.957 8 256 8zm0 110c23.196 0 42 18.804 42 42s-18.804 42-42 42-42-18.804-42-42 18.804-42 42-42zm56 254c0 6.627-5.373 12-12 12h-88c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h12v-64h-12c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h64c6.627 0 12 5.373 12 12v100h12c6.627 0 12 5.373 12 12v24z"},null,-1),Ak=[Pk];function Ok(e,t){return A(),Q("svg",Tk,Ak)}hp.render=Ok;var fu=hp,mp={},Ik={"aria-hidden":"true",focusable:"false","data-prefix":"fas","data-icon":"exclamation-circle",class:"svg-inline--fa fa-exclamation-circle fa-w-16",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},Mk=x("path",{fill:"currentColor",d:"M504 256c0 136.997-111.043 248-248 248S8 392.997 8 256C8 119.083 119.043 8 256 8s248 111.083 248 248zm-248 50c-25.405 0-46 20.595-46 46s20.595 46 46 46 46-20.595 46-46-20.595-46-46-46zm-43.673-165.346l7.418 136c.347 6.364 5.609 11.346 11.982 11.346h48.546c6.373 0 11.635-4.982 11.982-11.346l7.418-136c.375-6.874-5.098-12.654-11.982-12.654h-63.383c-6.884 0-12.356 5.78-11.981 12.654z"},null,-1),Rk=[Mk];function Bk(e,t){return A(),Q("svg",Ik,Rk)}mp.render=Bk;var Nk=mp,wp={},Lk={"aria-hidden":"true",focusable:"false","data-prefix":"fas","data-icon":"exclamation-triangle",class:"svg-inline--fa fa-exclamation-triangle fa-w-18",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 576 512"},Dk=x("path",{fill:"currentColor",d:"M569.517 440.013C587.975 472.007 564.806 512 527.94 512H48.054c-36.937 0-59.999-40.055-41.577-71.987L246.423 23.985c18.467-32.009 64.72-31.951 83.154 0l239.94 416.028zM288 354c-25.405 0-46 20.595-46 46s20.595 46 46 46 46-20.595 46-46-20.595-46-46-46zm-43.673-165.346l7.418 136c.347 6.364 5.609 11.346 11.982 11.346h48.546c6.373 0 11.635-4.982 11.982-11.346l7.418-136c.375-6.874-5.098-12.654-11.982-12.654h-63.383c-6.884 0-12.356 5.78-11.981 12.654z"},null,-1),Fk=[Dk];function Hk(e,t){return A(),Q("svg",Lk,Fk)}wp.render=Hk;var jk=wp,gp=me({name:"VtIcon",props:un.ICON,computed:{customIconChildren(){return Gt(this.customIcon,"iconChildren")?this.trimValue(this.customIcon.iconChildren):""},customIconClass(){return Gr(this.customIcon)?this.trimValue(this.customIcon):Gt(this.customIcon,"iconClass")?this.trimValue(this.customIcon.iconClass):""},customIconTag(){return Gt(this.customIcon,"iconTag")?this.trimValue(this.customIcon.iconTag,"i"):"i"},hasCustomIcon(){return this.customIconClass.length>0},component(){return this.hasCustomIcon?this.customIconTag:ap(this.customIcon)?Mo(this.customIcon):this.iconTypeComponent},iconTypeComponent(){return{[_t.DEFAULT]:fu,[_t.INFO]:fu,[_t.SUCCESS]:$k,[_t.ERROR]:jk,[_t.WARNING]:Nk}[this.type]},iconClasses(){const e=[`${Ft}__icon`];return this.hasCustomIcon?e.concat(this.customIconClass):e}},methods:{trimValue(e,t=""){return rp(e)?e.trim():t}}});function Vk(e,t){return A(),pe(Br(e.component),{class:Pe(e.iconClasses)},{default:mt(()=>[We(de(e.customIconChildren),1)]),_:1},8,["class"])}gp.render=Vk;var Uk=gp,yp=me({name:"VtToast",components:{ProgressBar:bk,CloseButton:Ck,Icon:Uk},inheritAttrs:!1,props:Object.assign({},un.CORE_TOAST,un.TOAST),data(){return{isRunning:!0,disableTransitions:!1,beingDragged:!1,dragStart:0,dragPos:{x:0,y:0},dragRect:{}}},computed:{classes(){const e=[`${Ft}__toast`,`${Ft}__toast--${this.type}`,`${this.position}`].concat(this.toastClassName);return this.disableTransitions&&e.push("disable-transition"),this.rtl&&e.push(`${Ft}__toast--rtl`),e},bodyClasses(){return[`${Ft}__toast-${Gr(this.content)?"body":"component-body"}`].concat(this.bodyClassName)},draggableStyle(){return this.dragStart===this.dragPos.x?{}:this.beingDragged?{transform:`translateX(${this.dragDelta}px)`,opacity:1-Math.abs(this.dragDelta/this.removalDistance)}:{transition:"transform 0.2s, opacity 0.2s",transform:"translateX(0)",opacity:1}},dragDelta(){return this.beingDragged?this.dragPos.x-this.dragStart:0},removalDistance(){return cu(this.dragRect)?(this.dragRect.right-this.dragRect.left)*this.draggablePercent:0}},mounted(){this.draggable&&this.draggableSetup(),this.pauseOnFocusLoss&&this.focusSetup()},beforeUnmount(){this.draggable&&this.draggableCleanup(),this.pauseOnFocusLoss&&this.focusCleanup()},methods:{hasProp:Gt,getVueComponentFromObj:Mo,closeToast(){this.eventBus.emit(Ct.DISMISS,this.id)},clickHandler(){this.onClick&&this.onClick(this.closeToast),this.closeOnClick&&(!this.beingDragged||this.dragStart===this.dragPos.x)&&this.closeToast()},timeoutHandler(){this.closeToast()},hoverPause(){this.pauseOnHover&&(this.isRunning=!1)},hoverPlay(){this.pauseOnHover&&(this.isRunning=!0)},focusPause(){this.isRunning=!1},focusPlay(){this.isRunning=!0},focusSetup(){addEventListener("blur",this.focusPause),addEventListener("focus",this.focusPlay)},focusCleanup(){removeEventListener("blur",this.focusPause),removeEventListener("focus",this.focusPlay)},draggableSetup(){const e=this.$el;e.addEventListener("touchstart",this.onDragStart,{passive:!0}),e.addEventListener("mousedown",this.onDragStart),addEventListener("touchmove",this.onDragMove,{passive:!1}),addEventListener("mousemove",this.onDragMove),addEventListener("touchend",this.onDragEnd),addEventListener("mouseup",this.onDragEnd)},draggableCleanup(){const e=this.$el;e.removeEventListener("touchstart",this.onDragStart),e.removeEventListener("mousedown",this.onDragStart),removeEventListener("touchmove",this.onDragMove),removeEventListener("mousemove",this.onDragMove),removeEventListener("touchend",this.onDragEnd),removeEventListener("mouseup",this.onDragEnd)},onDragStart(e){this.beingDragged=!0,this.dragPos={x:xi(e),y:uu(e)},this.dragStart=xi(e),this.dragRect=this.$el.getBoundingClientRect()},onDragMove(e){this.beingDragged&&(e.preventDefault(),this.isRunning&&(this.isRunning=!1),this.dragPos={x:xi(e),y:uu(e)})},onDragEnd(){this.beingDragged&&(Math.abs(this.dragDelta)>=this.removalDistance?(this.disableTransitions=!0,this.$nextTick(()=>this.closeToast())):setTimeout(()=>{this.beingDragged=!1,cu(this.dragRect)&&this.pauseOnHover&&this.dragRect.bottom>=this.dragPos.y&&this.dragPos.y>=this.dragRect.top&&this.dragRect.left<=this.dragPos.x&&this.dragPos.x<=this.dragRect.right?this.isRunning=!1:this.isRunning=!0}))}}}),qk=["role"];function zk(e,t){const n=Kn("Icon"),s=Kn("CloseButton"),r=Kn("ProgressBar");return A(),Q("div",{class:Pe(e.classes),style:Xt(e.draggableStyle),onClick:t[0]||(t[0]=(...o)=>e.clickHandler&&e.clickHandler(...o)),onMouseenter:t[1]||(t[1]=(...o)=>e.hoverPause&&e.hoverPause(...o)),onMouseleave:t[2]||(t[2]=(...o)=>e.hoverPlay&&e.hoverPlay(...o))},[e.icon?(A(),pe(n,{key:0,"custom-icon":e.icon,type:e.type},null,8,["custom-icon","type"])):ve("v-if",!0),x("div",{role:e.accessibility.toastRole||"alert",class:Pe(e.bodyClasses)},[typeof e.content=="string"?(A(),Q($e,{key:0},[We(de(e.content),1)],2112)):(A(),pe(Br(e.getVueComponentFromObj(e.content)),So({key:1,"toast-id":e.id},e.hasProp(e.content,"props")?e.content.props:{},af(e.hasProp(e.content,"listeners")?e.content.listeners:{}),{onCloseToast:e.closeToast}),null,16,["toast-id","onCloseToast"]))],10,qk),e.closeButton?(A(),pe(s,{key:1,component:e.closeButton,"class-names":e.closeButtonClassName,"show-on-hover":e.showCloseButtonOnHover,"aria-label":e.accessibility.closeButtonLabel,onClick:ln(e.closeToast,["stop"])},null,8,["component","class-names","show-on-hover","aria-label","onClick"])):ve("v-if",!0),e.timeout?(A(),pe(r,{key:2,"is-running":e.isRunning,"hide-progress-bar":e.hideProgressBar,timeout:e.timeout,onCloseToast:e.timeoutHandler},null,8,["is-running","hide-progress-bar","timeout","onCloseToast"])):ve("v-if",!0)],38)}yp.render=zk;var Kk=yp,bp=me({name:"VtTransition",props:un.TRANSITION,emits:["leave"],methods:{hasProp:Gt,leave(e){e instanceof HTMLElement&&(e.style.left=e.offsetLeft+"px",e.style.top=e.offsetTop+"px",e.style.width=getComputedStyle(e).width,e.style.position="absolute")}}});function Wk(e,t){return A(),pe(Uf,{tag:"div","enter-active-class":e.transition.enter?e.transition.enter:`${e.transition}-enter-active`,"move-class":e.transition.move?e.transition.move:`${e.transition}-move`,"leave-active-class":e.transition.leave?e.transition.leave:`${e.transition}-leave-active`,onLeave:e.leave},{default:mt(()=>[Eo(e.$slots,"default")]),_:3},8,["enter-active-class","move-class","leave-active-class","onLeave"])}bp.render=Wk;var Yk=bp,vp=me({name:"VueToastification",devtools:{hide:!0},components:{Toast:Kk,VtTransition:Yk},props:Object.assign({},un.CORE_TOAST,un.CONTAINER,un.TRANSITION),data(){return{count:0,positions:Object.values(vo),toasts:{},defaults:{}}},computed:{toastArray(){return Object.values(this.toasts)},filteredToasts(){return this.defaults.filterToasts(this.toastArray)}},beforeMount(){const e=this.eventBus;e.on(Ct.ADD,this.addToast),e.on(Ct.CLEAR,this.clearToasts),e.on(Ct.DISMISS,this.dismissToast),e.on(Ct.UPDATE,this.updateToast),e.on(Ct.UPDATE_DEFAULTS,this.updateDefaults),this.defaults=this.$props},mounted(){this.setup(this.container)},methods:{async setup(e){Qr(e)&&(e=await e()),fk(this.$el),e.appendChild(this.$el)},setToast(e){jn(e.id)||(this.toasts[e.id]=e)},addToast(e){e.content=dk(e.content);const t=Object.assign({},this.defaults,e.type&&this.defaults.toastDefaults&&this.defaults.toastDefaults[e.type],e),n=this.defaults.filterBeforeCreate(t,this.toastArray);n&&this.setToast(n)},dismissToast(e){const t=this.toasts[e];!jn(t)&&!jn(t.onClose)&&t.onClose(),delete this.toasts[e]},clearToasts(){Object.keys(this.toasts).forEach(e=>{this.dismissToast(e)})},getPositionToasts(e){const t=this.filteredToasts.filter(n=>n.position===e).slice(0,this.defaults.maxToasts);return this.defaults.newestOnTop?t.reverse():t},updateDefaults(e){jn(e.container)||this.setup(e.container),this.defaults=Object.assign({},this.defaults,e)},updateToast({id:e,options:t,create:n}){this.toasts[e]?(t.timeout&&t.timeout===this.toasts[e].timeout&&t.timeout++,this.setToast(Object.assign({},this.toasts[e],t))):n&&this.addToast(Object.assign({},{id:e},t))},getClasses(e){return[`${Ft}__container`,e].concat(this.defaults.containerClassName)}}});function Zk(e,t){const n=Kn("Toast"),s=Kn("VtTransition");return A(),Q("div",null,[(A(!0),Q($e,null,nt(e.positions,r=>(A(),Q("div",{key:r},[_e(s,{transition:e.defaults.transition,class:Pe(e.getClasses(r))},{default:mt(()=>[(A(!0),Q($e,null,nt(e.getPositionToasts(r),o=>(A(),pe(n,So({key:o.id},o),null,16))),128))]),_:2},1032,["transition","class"])]))),128))])}vp.render=Zk;var Qk=vp,du=(e={},t=!0)=>{const n=e.eventBus=e.eventBus||new ra;t&&rs(()=>{const o=Rl(Qk,op({},e)),i=o.mount(document.createElement("div")),l=e.onMounted;if(jn(l)||l(i,o),e.shareAppContext){const c=e.shareAppContext;c===!0?console.warn(`[${Ft}] App to share context with was not provided.`):(o._context.components=c._context.components,o._context.directives=c._context.directives,o._context.mixins=c._context.mixins,o._context.provides=c._context.provides,o.config.globalProperties=c.config.globalProperties)}});const s=(o,i)=>{const l=Object.assign({},{id:uk(),type:_t.DEFAULT},i,{content:o});return n.emit(Ct.ADD,l),l.id};s.clear=()=>n.emit(Ct.CLEAR,void 0),s.updateDefaults=o=>{n.emit(Ct.UPDATE_DEFAULTS,o)},s.dismiss=o=>{n.emit(Ct.DISMISS,o)};function r(o,{content:i,options:l},c=!1){const f=Object.assign({},l,{content:i});n.emit(Ct.UPDATE,{id:o,options:f,create:c})}return s.update=r,s.success=(o,i)=>s(o,Object.assign({},i,{type:_t.SUCCESS})),s.info=(o,i)=>s(o,Object.assign({},i,{type:_t.INFO})),s.error=(o,i)=>s(o,Object.assign({},i,{type:_t.ERROR})),s.warning=(o,i)=>s(o,Object.assign({},i,{type:_t.WARNING})),s},Gk=()=>{const e=()=>console.warn(`[${Ft}] This plugin does not support SSR!`);return new Proxy(e,{get(){return e}})};function il(e){return pk()?hk(e)?du({eventBus:e},!1):du(e,!0):Gk()}var _p=Symbol("VueToastification"),Cp=new ra,Jk=(e,t)=>{(t==null?void 0:t.shareAppContext)===!0&&(t.shareAppContext=e);const n=il(op({eventBus:Cp},t));e.provide(_p,n)},Xk=e=>{if(e)return il(e);const t=en()?St(_p,void 0):void 0;return t||il(Cp)},eE=Jk;function tE(){const e=Xk();window.webSocketClient.subscribe("toast",t=>{e(t.message,{type:t.type,position:vo.TOP_RIGHT,timeout:5e3,closeOnClick:!1,pauseOnFocusLoss:!0,pauseOnHover:!1,draggable:!0,draggablePercent:.5,showCloseButtonOnHover:!1,hideProgressBar:!1,closeButton:"button",icon:!0,rtl:!1})})}function nE(){window.webSocketClient.subscribe("download",({url:e,name:t})=>{const n=document.createElement("a");n.href=e,n.download=t,n.dispatchEvent(new MouseEvent("click"))})}const sE={id:"disconnect-overlay",class:"tw-fixed tw-z-[999] tw-inset-0"},oE={key:0,class:"tw-fixed tw-inset-0 tw-flex tw-justify-center tw-items-center"},rE={key:7,class:"flex flex-col w-full h-full"},iE=me({__name:"App",setup(e){const t=G(null),[n,s]=[hn(),Zr()];Xx(),window.webSocketClient=new QC;async function r(){const o=await window.webSocketClient.request("page",{path:s.path,query:s.query});o!==void 0&&(t.value=o)}return ek(()=>r()),tk(),WC(),sk(),tE(),nE(),n.afterEach(()=>r()),window.webSocketClient.start(),(o,i)=>{var l;return A(),Q($e,null,[x("div",sE,[_e($x)]),t.value===null?(A(),Q("div",oE,[_e(rv)])):t.value.type==="ERROR"?(A(),pe(tx,{key:1,status:t.value.status,"workspace-id":t.value.workspaceId,message:(l=t.value.message)!=null?l:null},null,8,["status","workspace-id","message"])):t.value==="login"?(A(),pe(D1,{key:2,onSignedIn:r})):t.value==="register"?(A(),pe(_x,{key:3,onSignedUp:r})):t.value==="forgot-password"?(A(),pe(Dx,{key:4})):t.value==="reset-password"?(A(),pe(Jx,{key:5})):t.value==="choose-workspace"?(A(),pe(J1,{key:6})):(A(),Q("div",rE,[(A(),pe(sp,{components:t.value.components,key:t.value.id},null,8,["components"]))]))],64)}}});const lE=l1({history:xv(),routes:[{path:"/:catchAll(.*)",component:iE}]}),ia=Rl({});ia.use(lE);ia.use(eE,{transition:"Vue-Toastification__fade",maxToasts:3,newestOnTop:!0});document.fonts.ready.then(()=>ia.mount("#app"));