oksy 0.1.31 → 0.1.32

Sign up to get free protection for your applications and to get access to all the features.
@@ -9,7 +9,7 @@ var Gm=Object.defineProperty;var Jm=(e,t,n)=>t in e?Gm(e,t,{enumerable:!0,config
9
9
  * (c) 2022 Eduardo San Martin Morote
10
10
  * @license MIT
11
11
  */const hs=typeof window<"u";function rv(e){return e.__esModule||e[Symbol.toStringTag]==="Module"}const Be=Object.assign;function bi(e,t){const n={};for(const s in t){const r=t[s];n[s]=Vt(r)?r.map(e):e(r)}return n}const no=()=>{},Vt=Array.isArray,iv=/\/$/,lv=e=>e.replace(iv,"");function vi(e,t,n="/"){let s,r={},o="",i="";const l=t.indexOf("#");let c=t.indexOf("?");return l<c&&l>=0&&(c=-1),c>-1&&(s=t.slice(0,c),o=t.slice(c+1,l>-1?l:t.length),r=e(o)),l>-1&&(s=s||t.slice(0,l),i=t.slice(l,t.length)),s=fv(s!=null?s:t,n),{fullPath:s+(o&&"?")+o+i,path:s,query:r,hash:i}}function av(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function Fc(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function cv(e,t,n){const s=t.matched.length-1,r=n.matched.length-1;return s>-1&&s===r&&Os(t.matched[s],n.matched[r])&&Dd(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function Os(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function Dd(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(!uv(e[n],t[n]))return!1;return!0}function uv(e,t){return Vt(e)?Hc(e,t):Vt(t)?Hc(t,e):e===t}function Hc(e,t){return Vt(t)?e.length===t.length&&e.every((n,s)=>n===t[s]):e.length===1&&e[0]===t}function fv(e,t){if(e.startsWith("/"))return e;if(!e)return t;const n=t.split("/"),s=e.split("/");let r=n.length-1,o,i;for(o=0;o<s.length;o++)if(i=s[o],i!==".")if(i==="..")r>1&&r--;else break;return n.slice(0,r).join("/")+"/"+s.slice(o-(o===s.length?1:0)).join("/")}var go;(function(e){e.pop="pop",e.push="push"})(go||(go={}));var so;(function(e){e.back="back",e.forward="forward",e.unknown=""})(so||(so={}));function dv(e){if(!e)if(hs){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),lv(e)}const pv=/^[^#]+#/;function hv(e,t){return e.replace(pv,"#")+t}function mv(e,t){const n=document.documentElement.getBoundingClientRect(),s=e.getBoundingClientRect();return{behavior:t.behavior,left:s.left-n.left-(t.left||0),top:s.top-n.top-(t.top||0)}}const Wr=()=>({left:window.pageXOffset,top:window.pageYOffset});function wv(e){let t;if("el"in e){const n=e.el,s=typeof n=="string"&&n.startsWith("#"),r=typeof n=="string"?s?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!r)return;t=mv(r,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.pageXOffset,t.top!=null?t.top:window.pageYOffset)}function jc(e,t){return(history.state?history.state.position-t:-1)+e}const Gi=new Map;function gv(e,t){Gi.set(e,t)}function yv(e){const t=Gi.get(e);return Gi.delete(e),t}let bv=()=>location.protocol+"//"+location.host;function Fd(e,t){const{pathname:n,search:s,hash:r}=t,o=e.indexOf("#");if(o>-1){let l=r.includes(e.slice(o))?e.slice(o).length:1,c=r.slice(l);return c[0]!=="/"&&(c="/"+c),Fc(c,"")}return Fc(n,e)+s+r}function vv(e,t,n,s){let r=[],o=[],i=null;const l=({state:m})=>{const g=Fd(e,location),v=n.value,E=t.value;let N=0;if(m){if(n.value=g,t.value=m,i&&i===v){i=null;return}N=E?m.position-E.position:0}else s(g);r.forEach(C=>{C(n.value,v,{delta:N,type:go.pop,direction:N?N>0?so.forward:so.back:so.unknown})})};function c(){i=n.value}function f(m){r.push(m);const g=()=>{const v=r.indexOf(m);v>-1&&r.splice(v,1)};return o.push(g),g}function d(){const{history:m}=window;!m.state||m.replaceState(Be({},m.state,{scroll:Wr()}),"")}function h(){for(const m of o)m();o=[],window.removeEventListener("popstate",l),window.removeEventListener("beforeunload",d)}return window.addEventListener("popstate",l),window.addEventListener("beforeunload",d),{pauseListeners:c,listen:f,destroy:h}}function Vc(e,t,n,s=!1,r=!1){return{back:e,current:t,forward:n,replaced:s,position:window.history.length,scroll:r?Wr():null}}function _v(e){const{history:t,location:n}=window,s={value:Fd(e,n)},r={value:t.state};r.value||o(s.value,{back:null,current:s.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function o(c,f,d){const h=e.indexOf("#"),m=h>-1?(n.host&&document.querySelector("base")?e:e.slice(h))+c:bv()+e+c;try{t[d?"replaceState":"pushState"](f,"",m),r.value=f}catch(g){console.error(g),n[d?"replace":"assign"](m)}}function i(c,f){const d=Be({},t.state,Vc(r.value.back,c,r.value.forward,!0),f,{position:r.value.position});o(c,d,!0),s.value=c}function l(c,f){const d=Be({},r.value,t.state,{forward:c,scroll:Wr()});o(d.current,d,!0);const h=Be({},Vc(s.value,c,null),{position:d.position+1},f);o(c,h,!1),s.value=c}return{location:s,state:r,push:l,replace:i}}function Cv(e){e=dv(e);const t=_v(e),n=vv(e,t.state,t.location,t.replace);function s(o,i=!0){i||n.pauseListeners(),history.go(o)}const r=Be({location:"",base:e,go:s,createHref:hv.bind(null,e)},t,n);return Object.defineProperty(r,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(r,"state",{enumerable:!0,get:()=>t.state.value}),r}function xv(e){return typeof e=="string"||e&&typeof e=="object"}function Hd(e){return typeof e=="string"||typeof e=="symbol"}const yn={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0},jd=Symbol("");var Uc;(function(e){e[e.aborted=4]="aborted",e[e.cancelled=8]="cancelled",e[e.duplicated=16]="duplicated"})(Uc||(Uc={}));function Is(e,t){return Be(new Error,{type:e,[jd]:!0},t)}function tn(e,t){return e instanceof Error&&jd in e&&(t==null||!!(e.type&t))}const qc="[^/]+?",kv={sensitive:!1,strict:!1,start:!0,end:!0},Ev=/[.+*?^${}()[\]/\\]/g;function Sv(e,t){const n=Be({},kv,t),s=[];let r=n.start?"^":"";const o=[];for(const f of e){const d=f.length?[]:[90];n.strict&&!f.length&&(r+="/");for(let h=0;h<f.length;h++){const m=f[h];let g=40+(n.sensitive?.25:0);if(m.type===0)h||(r+="/"),r+=m.value.replace(Ev,"\\$&"),g+=40;else if(m.type===1){const{value:v,repeatable:E,optional:N,regexp:C}=m;o.push({name:v,repeatable:E,optional:N});const b=C||qc;if(b!==qc){g+=10;try{new RegExp(`(${b})`)}catch(P){throw new Error(`Invalid custom RegExp for param "${v}" (${b}): `+P.message)}}let k=E?`((?:${b})(?:/(?:${b}))*)`:`(${b})`;h||(k=N&&f.length<2?`(?:/${k})`:"/"+k),N&&(k+="?"),r+=k,g+=20,N&&(g+=-8),E&&(g+=-20),b===".*"&&(g+=-50)}d.push(g)}s.push(d)}if(n.strict&&n.end){const f=s.length-1;s[f][s[f].length-1]+=.7000000000000001}n.strict||(r+="/?"),n.end?r+="$":n.strict&&(r+="(?:/|$)");const i=new RegExp(r,n.sensitive?"":"i");function l(f){const d=f.match(i),h={};if(!d)return null;for(let m=1;m<d.length;m++){const g=d[m]||"",v=o[m-1];h[v.name]=g&&v.repeatable?g.split("/"):g}return h}function c(f){let d="",h=!1;for(const m of e){(!h||!d.endsWith("/"))&&(d+="/"),h=!1;for(const g of m)if(g.type===0)d+=g.value;else if(g.type===1){const{value:v,repeatable:E,optional:N}=g,C=v in f?f[v]:"";if(Vt(C)&&!E)throw new Error(`Provided param "${v}" is an array but it is not repeatable (* or + modifiers)`);const b=Vt(C)?C.join("/"):C;if(!b)if(N)m.length<2&&(d.endsWith("/")?d=d.slice(0,-1):h=!0);else throw new Error(`Missing required param "${v}"`);d+=b}}return d||"/"}return{re:i,score:s,keys:o,parse:l,stringify:c}}function Tv(e,t){let n=0;for(;n<e.length&&n<t.length;){const s=t[n]-e[n];if(s)return s;n++}return e.length<t.length?e.length===1&&e[0]===40+40?-1:1:e.length>t.length?t.length===1&&t[0]===40+40?1:-1:0}function $v(e,t){let n=0;const s=e.score,r=t.score;for(;n<s.length&&n<r.length;){const o=Tv(s[n],r[n]);if(o)return o;n++}if(Math.abs(r.length-s.length)===1){if(zc(s))return 1;if(zc(r))return-1}return r.length-s.length}function zc(e){const t=e[e.length-1];return e.length>0&&t[t.length-1]<0}const Pv={type:0,value:""},Av=/[a-zA-Z0-9_]/;function Ov(e){if(!e)return[[]];if(e==="/")return[[Pv]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(g){throw new Error(`ERR (${n})/"${f}": ${g}`)}let n=0,s=n;const r=[];let o;function i(){o&&r.push(o),o=[]}let l=0,c,f="",d="";function h(){!f||(n===0?o.push({type:0,value:f}):n===1||n===2||n===3?(o.length>1&&(c==="*"||c==="+")&&t(`A repeatable param (${f}) must be alone in its segment. eg: '/:ids+.`),o.push({type:1,value:f,regexp:d,repeatable:c==="*"||c==="+",optional:c==="*"||c==="?"})):t("Invalid state to consume buffer"),f="")}function m(){f+=c}for(;l<e.length;){if(c=e[l++],c==="\\"&&n!==2){s=n,n=4;continue}switch(n){case 0:c==="/"?(f&&h(),i()):c===":"?(h(),n=1):m();break;case 4:m(),n=s;break;case 1:c==="("?n=2:Av.test(c)?m():(h(),n=0,c!=="*"&&c!=="?"&&c!=="+"&&l--);break;case 2:c===")"?d[d.length-1]=="\\"?d=d.slice(0,-1)+c:n=3:d+=c;break;case 3:h(),n=0,c!=="*"&&c!=="?"&&c!=="+"&&l--,d="";break;default:t("Unknown state");break}}return n===2&&t(`Unfinished custom RegExp for param "${f}"`),h(),i(),r}function Iv(e,t,n){const s=Sv(Ov(e.path),n),r=Be(s,{record:e,parent:t,children:[],alias:[]});return t&&!r.record.aliasOf==!t.record.aliasOf&&t.children.push(r),r}function Mv(e,t){const n=[],s=new Map;t=Yc({strict:!1,end:!0,sensitive:!1},t);function r(d){return s.get(d)}function o(d,h,m){const g=!m,v=Rv(d);v.aliasOf=m&&m.record;const E=Yc(t,d),N=[v];if("alias"in d){const k=typeof d.alias=="string"?[d.alias]:d.alias;for(const P of k)N.push(Be({},v,{components:m?m.record.components:v.components,path:P,aliasOf:m?m.record:v}))}let C,b;for(const k of N){const{path:P}=k;if(h&&P[0]!=="/"){const T=h.record.path,O=T[T.length-1]==="/"?"":"/";k.path=h.record.path+(P&&O+P)}if(C=Iv(k,h,E),m?m.alias.push(C):(b=b||C,b!==C&&b.alias.push(C),g&&d.name&&!Wc(C)&&i(d.name)),v.children){const T=v.children;for(let O=0;O<T.length;O++)o(T[O],C,m&&m.children[O])}m=m||C,(C.record.components&&Object.keys(C.record.components).length||C.record.name||C.record.redirect)&&c(C)}return b?()=>{i(b)}:no}function i(d){if(Hd(d)){const h=s.get(d);h&&(s.delete(d),n.splice(n.indexOf(h),1),h.children.forEach(i),h.alias.forEach(i))}else{const h=n.indexOf(d);h>-1&&(n.splice(h,1),d.record.name&&s.delete(d.record.name),d.children.forEach(i),d.alias.forEach(i))}}function l(){return n}function c(d){let h=0;for(;h<n.length&&$v(d,n[h])>=0&&(d.record.path!==n[h].record.path||!Vd(d,n[h]));)h++;n.splice(h,0,d),d.record.name&&!Wc(d)&&s.set(d.record.name,d)}function f(d,h){let m,g={},v,E;if("name"in d&&d.name){if(m=s.get(d.name),!m)throw Is(1,{location:d});E=m.record.name,g=Be(Kc(h.params,m.keys.filter(b=>!b.optional).map(b=>b.name)),d.params&&Kc(d.params,m.keys.map(b=>b.name))),v=m.stringify(g)}else if("path"in d)v=d.path,m=n.find(b=>b.re.test(v)),m&&(g=m.parse(v),E=m.record.name);else{if(m=h.name?s.get(h.name):n.find(b=>b.re.test(h.path)),!m)throw Is(1,{location:d,currentLocation:h});E=m.record.name,g=Be({},h.params,d.params),v=m.stringify(g)}const N=[];let C=m;for(;C;)N.unshift(C.record),C=C.parent;return{name:E,path:v,params:g,matched:N,meta:Nv(N)}}return e.forEach(d=>o(d)),{addRoute:o,resolve:f,removeRoute:i,getRoutes:l,getRecordMatcher:r}}function Kc(e,t){const n={};for(const s of t)s in e&&(n[s]=e[s]);return n}function Rv(e){return{path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:void 0,beforeEnter:e.beforeEnter,props:Bv(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}}}function Bv(e){const t={},n=e.props||!1;if("component"in e)t.default=n;else for(const s in e.components)t[s]=typeof n=="boolean"?n:n[s];return t}function Wc(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function Nv(e){return e.reduce((t,n)=>Be(t,n.meta),{})}function Yc(e,t){const n={};for(const s in e)n[s]=s in t?t[s]:e[s];return n}function Vd(e,t){return t.children.some(n=>n===e||Vd(e,n))}const Ud=/#/g,Lv=/&/g,Dv=/\//g,Fv=/=/g,Hv=/\?/g,qd=/\+/g,jv=/%5B/g,Vv=/%5D/g,zd=/%5E/g,Uv=/%60/g,Kd=/%7B/g,qv=/%7C/g,Wd=/%7D/g,zv=/%20/g;function ta(e){return encodeURI(""+e).replace(qv,"|").replace(jv,"[").replace(Vv,"]")}function Kv(e){return ta(e).replace(Kd,"{").replace(Wd,"}").replace(zd,"^")}function Ji(e){return ta(e).replace(qd,"%2B").replace(zv,"+").replace(Ud,"%23").replace(Lv,"%26").replace(Uv,"`").replace(Kd,"{").replace(Wd,"}").replace(zd,"^")}function Wv(e){return Ji(e).replace(Fv,"%3D")}function Yv(e){return ta(e).replace(Ud,"%23").replace(Hv,"%3F")}function Zv(e){return e==null?"":Yv(e).replace(Dv,"%2F")}function vr(e){try{return decodeURIComponent(""+e)}catch{}return""+e}function Qv(e){const t={};if(e===""||e==="?")return t;const s=(e[0]==="?"?e.slice(1):e).split("&");for(let r=0;r<s.length;++r){const o=s[r].replace(qd," "),i=o.indexOf("="),l=vr(i<0?o:o.slice(0,i)),c=i<0?null:vr(o.slice(i+1));if(l in t){let f=t[l];Vt(f)||(f=t[l]=[f]),f.push(c)}else t[l]=c}return t}function Zc(e){let t="";for(let n in e){const s=e[n];if(n=Wv(n),s==null){s!==void 0&&(t+=(t.length?"&":"")+n);continue}(Vt(s)?s.map(o=>o&&Ji(o)):[s&&Ji(s)]).forEach(o=>{o!==void 0&&(t+=(t.length?"&":"")+n,o!=null&&(t+="="+o))})}return t}function Gv(e){const t={};for(const n in e){const s=e[n];s!==void 0&&(t[n]=Vt(s)?s.map(r=>r==null?null:""+r):s==null?s:""+s)}return t}const Jv=Symbol(""),Qc=Symbol(""),Yr=Symbol(""),na=Symbol(""),Xi=Symbol("");function zs(){let e=[];function t(s){return e.push(s),()=>{const r=e.indexOf(s);r>-1&&e.splice(r,1)}}function n(){e=[]}return{add:t,list:()=>e,reset:n}}function _n(e,t,n,s,r){const o=s&&(s.enterCallbacks[r]=s.enterCallbacks[r]||[]);return()=>new Promise((i,l)=>{const c=h=>{h===!1?l(Is(4,{from:n,to:t})):h instanceof Error?l(h):xv(h)?l(Is(2,{from:t,to:h})):(o&&s.enterCallbacks[r]===o&&typeof h=="function"&&o.push(h),i())},f=e.call(s&&s.instances[r],t,n,c);let d=Promise.resolve(f);e.length<3&&(d=d.then(c)),d.catch(h=>l(h))})}function _i(e,t,n,s){const r=[];for(const o of e)for(const i in o.components){let l=o.components[i];if(!(t!=="beforeRouteEnter"&&!o.instances[i]))if(Xv(l)){const f=(l.__vccOpts||l)[t];f&&r.push(_n(f,n,s,o,i))}else{let c=l();r.push(()=>c.then(f=>{if(!f)return Promise.reject(new Error(`Couldn't resolve component "${i}" at "${o.path}"`));const d=rv(f)?f.default:f;o.components[i]=d;const m=(d.__vccOpts||d)[t];return m&&_n(m,n,s,o,i)()}))}}return r}function Xv(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function Gc(e){const t=St(Yr),n=St(na),s=je(()=>t.resolve(se(e.to))),r=je(()=>{const{matched:c}=s.value,{length:f}=c,d=c[f-1],h=n.matched;if(!d||!h.length)return-1;const m=h.findIndex(Os.bind(null,d));if(m>-1)return m;const g=Jc(c[f-2]);return f>1&&Jc(d)===g&&h[h.length-1].path!==g?h.findIndex(Os.bind(null,c[f-2])):m}),o=je(()=>r.value>-1&&s1(n.params,s.value.params)),i=je(()=>r.value>-1&&r.value===n.matched.length-1&&Dd(n.params,s.value.params));function l(c={}){return n1(c)?t[se(e.replace)?"replace":"push"](se(e.to)).catch(no):Promise.resolve()}return{route:s,href:je(()=>s.value.href),isActive:o,isExactActive:i,navigate:l}}const e1=we({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"}},useLink:Gc,setup(e,{slots:t}){const n=ss(Gc(e)),{options:s}=St(Yr),r=je(()=>({[Xc(e.activeClass,s.linkActiveClass,"router-link-active")]:n.isActive,[Xc(e.exactActiveClass,s.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const o=t.default&&t.default(n);return e.custom?o:Dr("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:r.value},o)}}}),t1=e1;function n1(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function s1(e,t){for(const n in t){const s=t[n],r=e[n];if(typeof s=="string"){if(s!==r)return!1}else if(!Vt(r)||r.length!==s.length||s.some((o,i)=>o!==r[i]))return!1}return!0}function Jc(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const Xc=(e,t,n)=>e!=null?e:t!=null?t:n,o1=we({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){const s=St(Xi),r=je(()=>e.route||s.value),o=St(Qc,0),i=je(()=>{let f=se(o);const{matched:d}=r.value;let h;for(;(h=d[f])&&!h.components;)f++;return f}),l=je(()=>r.value.matched[i.value]);Zs(Qc,je(()=>i.value+1)),Zs(Jv,l),Zs(Xi,r);const c=G();return Ht(()=>[c.value,l.value,e.name],([f,d,h],[m,g,v])=>{d&&(d.instances[h]=f,g&&g!==d&&f&&f===m&&(d.leaveGuards.size||(d.leaveGuards=g.leaveGuards),d.updateGuards.size||(d.updateGuards=g.updateGuards))),f&&d&&(!g||!Os(d,g)||!m)&&(d.enterCallbacks[h]||[]).forEach(E=>E(f))},{flush:"post"}),()=>{const f=r.value,d=e.name,h=l.value,m=h&&h.components[d];if(!m)return eu(n.default,{Component:m,route:f});const g=h.props[d],v=g?g===!0?f.params:typeof g=="function"?g(f):g:null,N=Dr(m,Be({},v,t,{onVnodeUnmounted:C=>{C.component.isUnmounted&&(h.instances[d]=null)},ref:c}));return eu(n.default,{Component:N,route:f})||N}}});function eu(e,t){if(!e)return null;const n=e(t);return n.length===1?n[0]:n}const r1=o1;function i1(e){const t=Mv(e.routes,e),n=e.parseQuery||Qv,s=e.stringifyQuery||Zc,r=e.history,o=zs(),i=zs(),l=zs(),c=Bu(yn);let f=yn;hs&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const d=bi.bind(null,D=>""+D),h=bi.bind(null,Zv),m=bi.bind(null,vr);function g(D,ne){let ee,oe;return Hd(D)?(ee=t.getRecordMatcher(D),oe=ne):oe=D,t.addRoute(oe,ee)}function v(D){const ne=t.getRecordMatcher(D);ne&&t.removeRoute(ne)}function E(){return t.getRoutes().map(D=>D.record)}function N(D){return!!t.getRecordMatcher(D)}function C(D,ne){if(ne=Be({},ne||c.value),typeof D=="string"){const w=vi(n,D,ne.path),_=t.resolve({path:w.path},ne),M=r.createHref(w.fullPath);return Be(w,_,{params:m(_.params),hash:vr(w.hash),redirectedFrom:void 0,href:M})}let ee;if("path"in D)ee=Be({},D,{path:vi(n,D.path,ne.path).path});else{const w=Be({},D.params);for(const _ in w)w[_]==null&&delete w[_];ee=Be({},D,{params:h(D.params)}),ne.params=h(ne.params)}const oe=t.resolve(ee,ne),ue=D.hash||"";oe.params=d(m(oe.params));const ve=av(s,Be({},D,{hash:Kv(ue),path:oe.path})),ye=r.createHref(ve);return Be({fullPath:ve,hash:ue,query:s===Zc?Gv(D.query):D.query||{}},oe,{redirectedFrom:void 0,href:ye})}function b(D){return typeof D=="string"?vi(n,D,c.value.path):Be({},D)}function k(D,ne){if(f!==D)return Is(8,{from:ne,to:D})}function P(D){return U(D)}function T(D){return P(Be(b(D),{replace:!0}))}function O(D){const ne=D.matched[D.matched.length-1];if(ne&&ne.redirect){const{redirect:ee}=ne;let oe=typeof ee=="function"?ee(D):ee;return typeof oe=="string"&&(oe=oe.includes("?")||oe.includes("#")?oe=b(oe):{path:oe},oe.params={}),Be({query:D.query,hash:D.hash,params:"path"in oe?{}:D.params},oe)}}function U(D,ne){const ee=f=C(D),oe=c.value,ue=D.state,ve=D.force,ye=D.replace===!0,w=O(ee);if(w)return U(Be(b(w),{state:typeof w=="object"?Be({},ue,w.state):ue,force:ve,replace:ye}),ne||ee);const _=ee;_.redirectedFrom=ne;let M;return!ve&&cv(s,oe,ee)&&(M=Is(16,{to:_,from:oe}),ke(oe,oe,!0,!1)),(M?Promise.resolve(M):B(_,oe)).catch(F=>tn(F)?tn(F,2)?F:ce(F):q(F,_,oe)).then(F=>{if(F){if(tn(F,2))return U(Be({replace:ye},b(F.to),{state:typeof F.to=="object"?Be({},ue,F.to.state):ue,force:ve}),ne||_)}else F=K(_,oe,!0,ye,ue);return L(_,oe,F),F})}function $(D,ne){const ee=k(D,ne);return ee?Promise.reject(ee):Promise.resolve()}function B(D,ne){let ee;const[oe,ue,ve]=l1(D,ne);ee=_i(oe.reverse(),"beforeRouteLeave",D,ne);for(const w of oe)w.leaveGuards.forEach(_=>{ee.push(_n(_,D,ne))});const ye=$.bind(null,D,ne);return ee.push(ye),ds(ee).then(()=>{ee=[];for(const w of o.list())ee.push(_n(w,D,ne));return ee.push(ye),ds(ee)}).then(()=>{ee=_i(ue,"beforeRouteUpdate",D,ne);for(const w of ue)w.updateGuards.forEach(_=>{ee.push(_n(_,D,ne))});return ee.push(ye),ds(ee)}).then(()=>{ee=[];for(const w of D.matched)if(w.beforeEnter&&!ne.matched.includes(w))if(Vt(w.beforeEnter))for(const _ of w.beforeEnter)ee.push(_n(_,D,ne));else ee.push(_n(w.beforeEnter,D,ne));return ee.push(ye),ds(ee)}).then(()=>(D.matched.forEach(w=>w.enterCallbacks={}),ee=_i(ve,"beforeRouteEnter",D,ne),ee.push(ye),ds(ee))).then(()=>{ee=[];for(const w of i.list())ee.push(_n(w,D,ne));return ee.push(ye),ds(ee)}).catch(w=>tn(w,8)?w:Promise.reject(w))}function L(D,ne,ee){for(const oe of l.list())oe(D,ne,ee)}function K(D,ne,ee,oe,ue){const ve=k(D,ne);if(ve)return ve;const ye=ne===yn,w=hs?history.state:{};ee&&(oe||ye?r.replace(D.fullPath,Be({scroll:ye&&w&&w.scroll},ue)):r.push(D.fullPath,ue)),c.value=D,ke(D,ne,ee,ye),ce()}let z;function H(){z||(z=r.listen((D,ne,ee)=>{if(!Ge.listening)return;const oe=C(D),ue=O(oe);if(ue){U(Be(ue,{replace:!0}),oe).catch(no);return}f=oe;const ve=c.value;hs&&gv(jc(ve.fullPath,ee.delta),Wr()),B(oe,ve).catch(ye=>tn(ye,12)?ye:tn(ye,2)?(U(ye.to,oe).then(w=>{tn(w,20)&&!ee.delta&&ee.type===go.pop&&r.go(-1,!1)}).catch(no),Promise.reject()):(ee.delta&&r.go(-ee.delta,!1),q(ye,oe,ve))).then(ye=>{ye=ye||K(oe,ve,!1),ye&&(ee.delta&&!tn(ye,8)?r.go(-ee.delta,!1):ee.type===go.pop&&tn(ye,20)&&r.go(-1,!1)),L(oe,ve,ye)}).catch(no)}))}let S=zs(),j=zs(),J;function q(D,ne,ee){ce(D);const oe=j.list();return oe.length?oe.forEach(ue=>ue(D,ne,ee)):console.error(D),Promise.reject(D)}function X(){return J&&c.value!==yn?Promise.resolve():new Promise((D,ne)=>{S.add([D,ne])})}function ce(D){return J||(J=!D,H(),S.list().forEach(([ne,ee])=>D?ee(D):ne()),S.reset()),D}function ke(D,ne,ee,oe){const{scrollBehavior:ue}=e;if(!hs||!ue)return Promise.resolve();const ve=!ee&&yv(jc(D.fullPath,0))||(oe||!ee)&&history.state&&history.state.scroll||null;return rs().then(()=>ue(D,ne,ve)).then(ye=>ye&&wv(ye)).catch(ye=>q(ye,D,ne))}const $e=D=>r.go(D);let Ce;const Fe=new Set,Ge={currentRoute:c,listening:!0,addRoute:g,removeRoute:v,hasRoute:N,getRoutes:E,resolve:C,options:e,push:P,replace:T,go:$e,back:()=>$e(-1),forward:()=>$e(1),beforeEach:o.add,beforeResolve:i.add,afterEach:l.add,onError:j.add,isReady:X,install(D){const ne=this;D.component("RouterLink",t1),D.component("RouterView",r1),D.config.globalProperties.$router=ne,Object.defineProperty(D.config.globalProperties,"$route",{enumerable:!0,get:()=>se(c)}),hs&&!Ce&&c.value===yn&&(Ce=!0,P(r.location).catch(ue=>{}));const ee={};for(const ue in yn)ee[ue]=je(()=>c.value[ue]);D.provide(Yr,ne),D.provide(na,ss(ee)),D.provide(Xi,c);const oe=D.unmount;Fe.add(D),D.unmount=function(){Fe.delete(D),Fe.size<1&&(f=yn,z&&z(),z=null,c.value=yn,Ce=!1,J=!1),oe()}}};return Ge}function ds(e){return e.reduce((t,n)=>t.then(()=>n()),Promise.resolve())}function l1(e,t){const n=[],s=[],r=[],o=Math.max(t.matched.length,e.matched.length);for(let i=0;i<o;i++){const l=t.matched[i];l&&(e.matched.find(f=>Os(f,l))?s.push(l):n.push(l));const c=e.matched[i];c&&(t.matched.find(f=>Os(f,c))||r.push(c))}return[n,s,r]}function hn(){return St(Yr)}function Zr(){return St(na)}const a1={class:"tw-flex"},c1={class:"tw-flex-shrink-0"},u1={key:0,class:"tw-h-5 tw-w-5 tw-text-red-400",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true"},f1=x("path",{"fill-rule":"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z","clip-rule":"evenodd"},null,-1),d1=[f1],p1={key:1,xmlns:"http://www.w3.org/2000/svg",class:"tw-h-5 tw-w-5 tw-text-green-400",viewBox:"0 0 20 20",fill:"currentColor"},h1=x("path",{"fill-rule":"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z","clip-rule":"evenodd"},null,-1),m1=[h1],w1={class:"tw-ml-3"},yo=we({__name:"AlertMessage",props:{message:null,type:null},setup(e){return(t,n)=>(A(),Q("div",{class:Pe(["tw-rounded-md tw-p-4",{"tw-bg-red-50":e.type==="error","tw-bg-green-50":e.type==="success"}])},[x("div",a1,[x("div",c1,[e.type==="error"?(A(),Q("svg",u1,d1)):pe("v-if",!0),e.type==="success"?(A(),Q("svg",p1,m1)):pe("v-if",!0)]),x("div",w1,[x("p",{class:Pe(["tw-text-sm tw-font-medium",{"tw-text-red-800":e.type==="error","tw-text-green-700":e.type==="success"}])},de(e.message),3)])])],2))}}),He={error:{validator:{email:"Must be a valid email",minLength:e=>`Must be longer than ${e.toString()} characters`},general:{blueprintNotFound:e=>`No model is named '${e}'`}},frontend:{chooseWorkspace:{title:"Choose your workspace."},loginPage:{title:"Sign in to your account",noAccount:"Don't have an account?",registerNow:"Register Now",forgotPassword:"Forgot your password?"},registerPage:{title:"Sign up for a new account",alreadyAccount:"Already have an account?",loginNow:"Login Now",confirmPassword:"Confirm Password"},forgotPasswordPage:{title:"Forgot your password?",button:"Send reset mail",emailNotFound:"The email is not valid or does not belong to any user.",successMessage:"A password reset link has been sent to your email account. If your email has not arrived in the next ten minutes, please check your Spam folder.",backToLogin:"Back to login.",rememberAgain:"Remember your password again?"},resetPasswordPage:{title:"Choose a new password",button:"Change Password",error:{tokenExpired:"Token is expired",passwordsNotMatching:"Passwords do not match",passwordsToShort:"Password needs to be longer"},successToast:"Password changed"},logout:"Logout",signIn:"Sign in",signUp:"Sign up",disconectOverlay:{message:"Reconnecting"},errorPage:{backToHome:"Back to Home",code404:"The page you are looking for could not be found.",code500:"An internal error has occurred."}}},g1=["textContent"],y1=["textContent"],b1={key:2,class:"loader"},v1=we({__name:"BaseButton",props:{disabled:{type:Boolean,default:!1},ghost:{type:Boolean,default:!1},icon:{default:null},label:{default:null},loading:{type:Boolean,default:!1},size:{default:"md"},type:{default:"primary"}},emits:["clicked"],setup(e){const t=e,n=je(()=>t.ghost===!0&&t.type==="secondary"?"primary":t.type),s=je(()=>t.size===void 0?"md":t.size),r=je(()=>t.icon&&t.label||t.loading?"text-and-icon":t.icon?"only-icon":"only-text"),o=je(()=>`${n.value} ${s.value} ${r.value} ${t.ghost?"ghost":"normal"} ${t.loading?"loading":""} ${t.disabled?"disabled":""}`);return(i,l)=>(A(),Q("div",{class:Pe(["tw-shrink-0",{"tw-cursor-not-allowed":e.disabled,"tw-cursor-wait":e.loading}])},[x("button",{onClick:l[0]||(l[0]=c=>i.$emit("clicked")),class:Pe(`${se(o)} tw-w-full`),style:{"border-style":"inherit"}},[e.label!==null?(A(),Q("span",{key:0,textContent:de(e.label)},null,8,g1)):pe("v-if",!0),e.icon!==null&&e.loading===!1?(A(),Q("span",{key:1,class:"material-symbols-rounded",textContent:de(e.icon)},null,8,y1)):pe("v-if",!0),e.loading?(A(),Q("span",b1)):pe("v-if",!0)],2)],2))}});const kn=ea(v1,[["__scopeId","data-v-d0727c53"]]),_1={class:"tw-min-h-full tw-flex tw-flex-col tw-justify-center tw-py-12 sm:tw-px-6 tw-lg:px-8"},C1={class:"sm:tw-mx-auto sm:tw-w-full sm:tw-max-w-md"},x1={class:"tw-mt-6 tw-text-center tw-text-3xl tw-font-extrabold tw-text-gray-900"},k1={key:0,class:"tw-mt-2 tw-text-center tw-text-sm tw-text-gray-600"},E1={class:"tw-mt-8 sm:tw-mx-auto sm:tw-w-full sm:tw-max-w-md"},S1={class:"tw-bg-white tw-py-8 tw-px-4 tw-shadow sm:tw-rounded-lg sm:tw-px-10"},T1={class:"tw-space-y-6"},$1=x("label",{for:"email",class:"tw-block tw-text-sm tw-font-medium tw-text-gray-700"}," Email ",-1),P1={class:"tw-mt-1"},A1=["onKeypress"],O1=x("label",{for:"password",class:"tw-block tw-text-sm tw-font-medium tw-text-gray-700"}," Password ",-1),I1={class:"tw-mt-1"},M1=["onKeypress"],R1={class:"tw-flex tw-items-center tw-justify-between"},B1=x("div",{class:"tw-flex tw-items-center"},[x("input",{id:"remember-me",name:"remember-me",type:"checkbox",class:"tw-h-4 tw-w-4 tw-rounded tw-border-gray-300 tw-text-blue-600 tw-focus:ring-blue-500"}),x("label",{for:"remember-me",class:"tw-ml-2 tw-block tw-text-sm tw-text-gray-900"},"Remember me")],-1),N1={class:"tw-text-sm"},L1=we({__name:"LoginPage",emits:["signedIn"],setup(e,{emit:t}){const n=G(!1),s=G(""),r=G(""),o=hn();async function i(){const c=await window.webSocketClient.request("login",{email:s.value,password:r.value,userAgent:navigator.userAgent});c.status===!1?n.value=!0:(localStorage.setItem("sessionId",c.sessionId),setTimeout(()=>o.replace("/logout"),c.validForMilliseconds),t("signedIn"))}const l=G(window.config.register==="open");return(c,f)=>(A(),Q("div",_1,[x("div",C1,[x("h2",x1,de(se(He).frontend.loginPage.title),1),l.value?(A(),Q("p",k1,[We(de(se(He).frontend.loginPage.noAccount)+" "+de(" ")+" ",1),x("span",{onClick:f[0]||(f[0]=d=>c.$router.push("/register")),class:"tw-cursor-pointer tw-font-medium tw-text-blue-600 tw-hover:text-blue-500"},de(se(He).frontend.loginPage.registerNow),1)])):pe("v-if",!0)]),x("div",E1,[x("div",S1,[n.value?(A(),he(yo,{key:0,type:"error",message:"Wrong credentials",class:"tw-mb-4"})):pe("v-if",!0),x("div",T1,[x("div",null,[$1,x("div",P1,[xt(x("input",{"onUpdate:modelValue":f[1]||(f[1]=d=>s.value=d),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 tw-focus:outline-none tw-focus:ring-blue-500 tw-focus:border-blue-500 sm:tw-text-sm",onKeypress:Qt(i,["enter"])},null,40,A1),[[kt,s.value]])])]),x("div",null,[O1,x("div",I1,[xt(x("input",{"onUpdate:modelValue":f[2]||(f[2]=d=>r.value=d),id:"password",name:"password",type:"password",autocomplete:"current-password",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 tw-focus:outline-none tw-focus:ring-blue-500 tw-focus:border-blue-500 sm:tw-text-sm",onKeypress:Qt(i,["enter"])},null,40,M1),[[kt,r.value]])])]),x("div",R1,[B1,x("div",N1,[x("span",{onClick:f[3]||(f[3]=d=>c.$router.push("/forgot-password")),class:"tw-font-medium tw-text-blue-600 tw-hover:text-blue-500 tw-cursor-pointer"},de(se(He).frontend.loginPage.forgotPassword),1)])]),_e(kn,{label:se(He).frontend.signIn,onClicked:i},null,8,["label"])])])])]))}}),D1={class:"tw-h-full"},F1={class:"tw-max-w-7xl tw-w-full tw-mx-auto tw-px-4 sm:tw-px-6 lg:tw-px-8"},H1={class:"tw-max-w-xl tw-mx-auto tw-py-16 sm:tw-py-24"},j1={class:"tw-text-center"},V1={class:"tw-mt-2 tw-text-4xl tw-font-extrabold tw-text-gray-900 tw-tracking-tight sm:tw-text-5xl"},U1={class:"tw-mt-12 tw-mb-4"},q1={role:"list",class:"tw-mt-4 tw-border-t tw-border-b tw-border-gray-200 tw-divide-y tw-divide-gray-200"},z1=["onClick"],K1={class:"tw-min-w-0 tw-flex-1"},W1={class:"tw-text-base tw-font-medium tw-text-gray-900 group-hover:tw-text-blue-500"},Y1=x("span",{class:"tw-absolute tw-inset-0","aria-hidden":"true"},null,-1),Z1=x("div",{class:"tw-flex-shrink-0 tw-self-center"},[x("svg",{class:"tw-h-5 tw-w-5 tw-text-gray-400 group-hover:tw-text-blue-400",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true"},[x("path",{"fill-rule":"evenodd",d:"M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z","clip-rule":"evenodd"})])],-1),Q1={class:"tw-mt-4 tw-text-center"},G1=we({__name:"ChooseWorkspace",setup(e){const t=hn(),n=G(null);Ut(async()=>{n.value=await window.webSocketClient.request("workspaces")});async function s(r){await t.push(`/${r}`)}return(r,o)=>(A(),Q("div",D1,[x("main",F1,[x("div",H1,[x("div",j1,[x("h1",V1,de(se(He).frontend.chooseWorkspace.title),1)]),x("div",U1,[x("ul",q1,[(A(!0),Q(Te,null,nt(n.value,i=>(A(),Q("li",{class:"group tw-relative tw-py-6 tw-flex tw-items-start tw-space-x-4 tw-cursor-pointer hover:tw-bg-blue-50 tw-px-4",key:i.id,onClick:l=>s(i.id)},[x("div",K1,[x("h3",W1,[x("span",null,[Y1,We(" "+de(i.name),1)])])]),Z1],8,z1))),128))]),x("div",Q1,[x("span",{onClick:o[0]||(o[0]=i=>r.$router.replace("/logout")),class:"tw-cursor-pointer tw-text-sm tw-font-medium tw-text-blue-600 hover:tw-text-blue-500"},de(se(He).frontend.logout),1)])])])])]))}});function it(e,t){const n=window.webSocketClient.subscribe(`getter:${e}`,t);window.webSocketClient.request(`getterInit:${e}`).then(s=>t(s)),Ns(()=>{n(),window.webSocketClient.emit("stopGetter",e)})}const J1=we({__name:"SyncButton",props:{options:null},setup(e){var h;const t=e,n=G((h=t.options.classInit)!=null?h:""),s=G(!1),r=G(t.options.ghostInit),o=G(t.options.iconInit),i=G(""),l=G(!1),c=G(t.options.sizeInit),f=G(t.options.typeInit);it(t.options.labelId,m=>i.value=m),it(t.options.disabledId,m=>s.value=m);async function d(){l.value=!0,await window.webSocketClient.request(`setter:${t.options.onClickId}`),l.value=!1}return(m,g)=>(A(),he(kn,{onClicked:d,label:i.value,class:Pe(n.value),loading:l.value,disabled:s.value,type:f.value,size:c.value,ghost:r.value,icon:o.value},null,8,["label","class","loading","disabled","type","size","ghost","icon"]))}}),X1={class:"tw-cursor-pointer tw-select-none"},e2=x("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M3 4.5h14.25M3 9h9.75M3 13.5h9.75m4.5-4.5v12m0 0l-3.75-3.75M17.25 21L21 17.25"},null,-1),t2=[e2],n2={key:1,xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"tw-w-5 tw-h-5 tw-text-blue-500 hover:tw-text-blue-600"},s2=x("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M3 4.5h14.25M3 9h9.75M3 13.5h5.25m5.25-.75L17.25 9m0 0L21 12.75M17.25 9v12"},null,-1),o2=[s2],r2=we({__name:"SortIcon",props:{state:null},setup(e){return(t,n)=>(A(),Q("div",X1,[e.state==="idle"||e.state==="asc"?(A(),Q("svg",{key:0,class:Pe(["tw-w-5 tw-h-5",{"tw-text-gray-400 hover:tw-text-gray-500":e.state==="idle","tw-text-blue-500 hover:tw-text-blue-600":e.state==="asc"}]),xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor"},t2,2)):pe("v-if",!0),e.state==="desc"?(A(),Q("svg",n2,o2)):pe("v-if",!0)]))}}),i2={class:"tw-w-auto tw-py-20 tw-m-3 tw-text-center tw-border-2 tw-border-dashed tw-border-gray-200"},l2={class:"tw-text-base tw-text-gray-600 tw-leading-9"},a2=we({__name:"EmptyState",props:{type:null},setup(e){return(t,n)=>(A(),Q("div",i2,[x("span",l2,de(e.type==="no-data"?"NO DATA":"NO RESULTS"),1)]))}});function c2(e){const t=G([]),n=je(()=>e.value.length>0&&e.value.every(i=>t.value.includes(i.id))),s=je(()=>e.value.length>0&&e.value.some(i=>t.value.includes(i.id)));function r(){e.value.forEach(i=>{t.value.includes(i.id)===!1&&t.value.push(i.id)})}function o(){e.value.forEach(i=>{t.value=t.value.filter(l=>l!==i.id)})}return{allRowsOnScreenAreSelected:n,someRowsOnScreenAreSelected:s,selectedAllItemsOnScreen:r,deselectAllItemsOnScreen:o,selectedIds:t}}function u2(e,t){const n=G(null);function s(r){t.value=1,n.value&&n.value.key===r&&n.value.type==="ASC"?n.value={type:"DESC",key:r}:n.value&&n.value.key===r&&n.value.type==="DESC"?n.value=null:n.value={type:"ASC",key:r},e()}return{sort:n,setSort:s}}function f2(e){const t=G(1);function n(){t.value+=1,e()}function s(){t.value-=1,e()}return{pageNumber:t,next:n,previous:s}}function d2(e,t){const n=je(()=>{var r;return((r=e.value[e.value.length-1])==null?void 0:r.name)===""});return{gridTemplateColumns:je(()=>{const r=[];let o=e.value.length;return t.value&&r.push("64px"),n.value?(o=o-1,r.push(`repeat(${o},minmax(max-content,1fr))`),r.push("min-content")):r.push(`repeat(${o},minmax(max-content,1fr))`),r.join(" ")})}}var tu;const Io=typeof window<"u",nu=e=>typeof e=="function",Yd=e=>typeof e=="string",p2=()=>{};Io&&((tu=window==null?void 0:window.navigator)==null?void 0:tu.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function el(e){return typeof e=="function"?e():se(e)}function h2(e,t){function n(...s){e(()=>t.apply(this,s),{fn:t,thisArg:this,args:s})}return n}function m2(e,t={}){let n,s;return o=>{const i=el(e),l=el(t.maxWait);if(n&&clearTimeout(n),i<=0||l!==void 0&&l<=0)return s&&(clearTimeout(s),s=null),o();l&&!s&&(s=setTimeout(()=>{n&&clearTimeout(n),s=null,o()},l)),n=setTimeout(()=>{s&&clearTimeout(s),s=null,o()},i)}}function w2(e){return e}function Zd(e){return vu()?(_u(e),!0):!1}function Ms(e,t=200,n={}){return h2(m2(t,n),e)}function g2(e){return typeof e=="function"?je(e):G(e)}function y2(e,t=!0){en()?Ut(e):t?e():rs(e)}function b2(e,t){const n=G(""),s=G("");function r(i){n.value=i,o(i)}const o=Ms(async i=>{e.value=1,await t(),s.value=i},250);return{liveQuery:n,requestQuery:s,setQueryValue:r}}const v2={class:"tw-flex tw-justify-center tw-items-stretch tw-w-full tw-border-b tw-border-gray-200"},_2=["value"],C2={key:0,class:"tw-flex-shrink-0 tw-px-3 tw-bg-blue-600 tw-text-white tw-flex tw-space-x-2 tw-justify-center tw-items-center tw-text-sm"},x2=x("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",class:"tw-w-[1.1rem] tw-h-[1.1rem]",fill:"currentColor"},[x("path",{d:"M0 0h24v24H0V0z",fill:"none"}),x("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"})],-1),k2=[x2],E2={class:"tw-flex tw-items-center tw-space-x-2 tw-bg-gray-50 tw-flex-shrink-0 tw-select-none tw-px-2"},S2={key:0,class:"tw-flex tw-justify-center tw-items-center tw-bg-gray-50 tw-border-b tw-border-gray-300"},T2=["checked","indeterminate"],$2={key:0,class:"tw-flex tw-justify-center tw-items-center tw-border-b tw-border-gray-200 tw-relative"},P2={key:0,class:"tw-absolute tw-inset-y-0 tw-left-0 tw-w-0.5 tw-bg-blue-600"},A2=["value"],O2={class:"tw-flex tw-items-center tw-justify-between tw-border-t tw-border-gray-200 tw-bg-white tw-px-4 tw-py-3 sm:tw-px-6 -mt-[1px]","aria-label":"Pagination"},I2={class:"tw-hidden sm:tw-block"},M2={key:0,class:"tw-text-sm tw-text-gray-700"},R2={class:"tw-font-medium"},B2={class:"tw-font-medium"},N2={class:"tw-font-medium"},L2={class:"tw-flex tw-flex-1 tw-justify-between sm:tw-justify-end"},D2=we({__name:"BaseDataTable",props:{actions:null,page:null,columns:null,selectable:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},alwaysLoading:{type:Boolean,default:!1},request:null},emits:["actionClick"],setup(e){const t=e,{allRowsOnScreenAreSelected:n,someRowsOnScreenAreSelected:s,selectedAllItemsOnScreen:r,deselectAllItemsOnScreen:o,selectedIds:i}=c2(je(()=>{var b,k;return(k=(b=Ys(t,"page").value)==null?void 0:b.rows)!=null?k:[]})),l=G(!1);Ut(()=>c());async function c(){l.value=!0,await t.request(f.value,E.value,m.value),l.value=!1}const{pageNumber:f,next:d,previous:h}=f2(c),{liveQuery:m,requestQuery:g,setQueryValue:v}=b2(f,c),{sort:E,setSort:N}=u2(c,f),{gridTemplateColumns:C}=d2(Ys(t,"columns"),Ys(t,"selectable"));return(b,k)=>e.page!==null?(A(),Q("div",{key:0,class:Pe(["tw-flex tw-flex-col tw-shadow tw-ring-1 tw-ring-black tw-ring-opacity-5 tw-rounded md:tw-rounded-lg tw-w-full tw-overflow-hidden",{"tw-pointer-events-none":l.value||e.alwaysLoading||e.disabled}])},[pe(" START: ACTIONS "),x("div",v2,[x("input",{type:"text",class:"tw-flex-1 tw-border-0 focus:tw-ring-0 tw-text-sm tw-block tw-py-3 tw-bg-gray-50 placeholder:tw-text-gray-400",placeholder:"Search",value:se(m),onKeypress:k[0]||(k[0]=P=>se(v)(P.target.value)),onInput:k[1]||(k[1]=P=>se(v)(P.target.value))},null,40,_2),se(i).length>0?(A(),Q("div",C2,[x("span",null,"Selected: "+de(se(i).length),1),x("div",{onClick:k[2]||(k[2]=P=>i.value=[]),class:"tw-rounded hover:tw-bg-blue-500 tw-cursor-pointer tw-p-1 tw-select-none"},k2)])):pe("v-if",!0),x("div",E2,[(A(!0),Q(Te,null,nt(e.actions,P=>(A(),Q(Te,{key:P.id},[!P.bulkAction||se(i).length>0?(A(),he(kn,{key:0,type:"tertiary",size:"sm",label:P.label,icon:P.icon,onClicked:T=>b.$emit("actionClick",P.id)},null,8,["label","icon","onClicked"])):pe("v-if",!0)],64))),128))])]),pe(" END: ACTIONS "),pe(" START: LIST "),e.page.rows.length===0?(A(),he(a2,{key:0,type:e.page.totalWithoutFilter===0?"no-data":"no-results"},null,8,["type"])):(A(),Q("div",{key:1,class:"tw-relative tw-grid tw-overflow-scroll tw-min-w-full",style:Xt(`grid-template-columns: ${se(C)}`)},[pe(" START: HEADER "),e.selectable?(A(),Q("div",S2,[x("input",{type:"checkbox",class:"tw-h-4 tw-w-4 tw-rounded tw-border-gray-300 tw-text-blue-600 focus:tw-ring-blue-500",checked:se(n),indeterminate:se(n)===!1&&se(s),onChange:k[3]||(k[3]=P=>P.target.checked?se(r)():se(o)())},null,40,T2)])):pe("v-if",!0),(A(!0),Q(Te,null,nt(e.columns,P=>{var T,O;return A(),Q("div",{key:P.key,class:"tw-flex tw-flex-shrink-0 tw-justify-between tw-items-center tw-space-x-4 tw-bg-gray-50 tw-border-b tw-border-gray-300 tw-whitespace-nowrap tw-py-4 tw-px-4 tw-text-sm tw-font-semibold tw-text-gray-900"},[x("span",null,de(P.name),1),P.sortable?(A(),he(r2,{key:0,onClick:U=>se(N)(P.key),state:((T=se(E))==null?void 0:T.key)===P.key?((O=se(E))==null?void 0:O.type)==="ASC"?"asc":"desc":"idle"},null,8,["onClick","state"])):pe("v-if",!0)])}),128)),pe(" END: HEADER "),(A(!0),Q(Te,null,nt(e.page.rows,P=>(A(),Q(Te,{key:P.id},[e.selectable?(A(),Q("div",$2,[se(i).includes(P.id)?(A(),Q("div",P2)):pe("v-if",!0),xt(x("input",{type:"checkbox",class:"tw-absolute tw-left-4 tw-top-1/2 tw--mt-2 tw-h-4 tw-w-4 tw-rounded tw-border-gray-300 tw-text-blue-600 focus:tw-ring-blue-500 sm:tw-left-6","onUpdate:modelValue":k[4]||(k[4]=T=>Ze(i)?i.value=T:null),value:P.id},null,8,A2),[[Hr,se(i)]])])):pe("v-if",!0),(A(!0),Q(Te,null,nt(e.columns,T=>(A(),Q("div",{key:T.key,class:"tw-flex tw-items-center tw-border-b tw-border-gray-200 tw-whitespace-nowrap tw-truncate tw-py-4 tw-px-4 tw-text-sm tw-text-gray-700"},[Eo(b.$slots,"render",hu(Ol({row:P,column:T,requestQuery:se(g)})),()=>[We(de(P[T.key]),1)])]))),128))],64))),128))],4)),pe(" END: LIST "),pe(" FOOTER "),x("nav",O2,[x("div",I2,[e.page.rows.length>0?(A(),Q("p",M2,[We(" Showing "+de(" ")+" "),x("span",R2,de(e.page.from),1),We(" "+de(" ")+" to "+de(" ")+" "),x("span",B2,de(e.page.to),1),We(" "+de(" ")+" of "+de(" ")+" "),x("span",N2,de(e.page.totalWithFilter),1),We(" "+de(" ")+" results ")])):pe("v-if",!0)]),x("div",L2,[_e(kn,{label:"Previous",type:"tertiary",disabled:se(f)===1,"hide-spinner":!0,onClicked:se(h)},null,8,["disabled","onClicked"]),_e(kn,{label:"Next",type:"tertiary",class:"tw-ml-3",disabled:e.page.to===e.page.totalWithFilter,"hide-spinner":!0,onClicked:se(d)},null,8,["disabled","onClicked"])])])],2)):pe("v-if",!0)}}),sa=we({__name:"BetterContainer",props:{options:null,preClasses:null,highlightStr:null},setup(e){var r,o;const t=e,n=G([]),s=G(((r=t.preClasses)!=null?r:"")+" "+((o=t.options.classInit)!=null?o:""));return it(t.options.itemsId,i=>n.value=i),(i,l)=>(A(),Q("div",{class:Pe(s.value)},[_e(sp,{components:n.value,"highlight-str":e.highlightStr},null,8,["components","highlight-str"])],2))}}),F2=we({__name:"SyncDataTable",props:{options:null},setup(e){const t=e,n=G(null),s=G([]),r=G([]),o=G(!1);it(t.options.disabledId,d=>o.value=d),Ut(async()=>{s.value=await window.webSocketClient.request(`getterInit:${t.options.columnsId}`),r.value=await window.webSocketClient.request(`getterInit:${t.options.actionsId}`)});let i=null;async function l(d,h,m){i=[d,h,m];const g=await window.webSocketClient.request(`getter:${t.options.pageId}`,{pageNumber:d,sort:h,query:m});n.value=g}async function c(d){await window.webSocketClient.request(`setter:${d}`,{selectedIds:[]})}const f=window.webSocketClient.subscribe(`getter:${t.options.refreshId}`,()=>{i!==null&&l(...i)});return Ns(()=>{f()}),(d,h)=>(A(),he(D2,{actions:r.value,page:n.value,columns:s.value,request:l,disabled:o.value,selectable:e.options.selectable,onActionClick:c},{render:mt(({row:m,column:g,requestQuery:v})=>[_e(sa,{"pre-classes":"tw-w-full",options:m[g.key],"highlight-str":v},null,8,["options","highlight-str"])]),_:1},8,["actions","page","columns","disabled","selectable"]))}}),H2=["value","type","disabled"],j2={class:"tw-text-red-500 tw-italic tw-text-sm"},V2=we({__name:"BaseInput",props:{errorMessage:{default:null},type:{default:"text"},disabled:{type:Boolean,default:!1},inline:{type:Boolean,default:!1},debounceUpdate:{type:Function,default:()=>null}},setup(e,{expose:t}){const n=e,s=G("");t({inputValue:s});function r(i){s.value=i,o(i)}const o=Ms(n.debounceUpdate,250);return(i,l)=>(A(),Q("div",{class:Pe(["tw-flex tw-flex-col tw-w-full",{"tw-cursor-not-allowed tw-grayscale":e.disabled,"tw-opacity-[0.35]":e.disabled&&e.errorMessage,"tw-opacity-50":e.disabled&&!e.errorMessage}])},[x("input",{value:s.value,onKeypress:l[0]||(l[0]=c=>r(c.target.value)),onInput:l[1]||(l[1]=c=>r(c.target.value)),type:e.type,class:Pe(["tw-rounded-md tw-border-gray-300 tw-shadow-sm tw-text-gray-900 tw-text-sm tw-block tw-w-full tw-px-2.5 tw-py-2 focus:tw-outline-none focus:tw-border-gray-500 focus:tw-ring-gray-500 focus:tw-ring-1",{"tw-border-red-500 tw-bg-red-50 focus:tw-border-red-500 focus:tw-ring-red-500":e.errorMessage!==null,"tw-pointer-events-none":e.disabled}]),disabled:e.disabled,style:{"border-style":"inherit"}},null,42,H2),x("span",j2,de(e.errorMessage),1)],2))}}),U2=we({__name:"SyncInput",props:{options:null},setup(e){var c;const t=e,n=G(null),s=G((c=t.options.classInit)!=null?c:""),r=G(!1),o=G(t.options.typeInit),i=G();it(t.options.disabledId,f=>r.value=f);async function l(f){n.value=await window.webSocketClient.request(`setter:${t.options.setterId}`,f)}return it(t.options.getterId,f=>{n.value=null,i.value.inputValue=f}),(f,d)=>(A(),he(V2,{class:Pe(s.value),disabled:r.value,type:o.value,"error-message":n.value,"debounce-update":l,ref_key:"$input",ref:i},null,8,["class","disabled","type","error-message"]))}}),q2=["value","disabled"],z2={class:"tw-text-red-500 tw-italic tw-text-sm"},K2=we({__name:"BaseDateTime",props:{errorMessage:{default:null},disabled:{type:Boolean,default:!1},inline:{type:Boolean,default:!1},debounceUpdate:{type:Function,default:()=>null}},setup(e,{expose:t}){const n=e,s=G("");t({inputValue:s});function r(i){s.value=i,o(i)}const o=Ms(n.debounceUpdate,250);return(i,l)=>(A(),Q("div",{class:Pe(["tw-flex tw-flex-col tw-w-full",{"tw-cursor-not-allowed tw-grayscale":e.disabled,"tw-opacity-[0.35]":e.disabled&&e.errorMessage,"tw-opacity-50":e.disabled&&!e.errorMessage}])},[x("input",{value:s.value,onKeypress:l[0]||(l[0]=c=>r(c.target.value)),onInput:l[1]||(l[1]=c=>r(c.target.value)),type:"datetime-local",class:Pe(["tw-rounded-md tw-border-gray-300 tw-shadow-sm tw-text-gray-900 tw-text-sm tw-block tw-w-full tw-px-2.5 tw-py-2 focus:tw-outline-none focus:tw-border-gray-500 focus:tw-ring-gray-500 focus:tw-ring-1",{"tw-border-red-500 tw-bg-red-50 focus:tw-border-red-500 focus:tw-ring-red-500":e.errorMessage!==null,"tw-pointer-events-none":e.disabled}]),disabled:e.disabled,style:{"border-style":"inherit"}},null,42,q2),x("span",z2,de(e.errorMessage),1)],2))}});var sn=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Qd={exports:{}};(function(e,t){(function(n,s){e.exports=s()})(sn,function(){var n=1e3,s=6e4,r=36e5,o="millisecond",i="second",l="minute",c="hour",f="day",d="week",h="month",m="quarter",g="year",v="date",E="Invalid Date",N=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,C=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,b={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(H){var S=["th","st","nd","rd"],j=H%100;return"["+H+(S[(j-20)%10]||S[j]||S[0])+"]"}},k=function(H,S,j){var J=String(H);return!J||J.length>=S?H:""+Array(S+1-J.length).join(j)+H},P={s:k,z:function(H){var S=-H.utcOffset(),j=Math.abs(S),J=Math.floor(j/60),q=j%60;return(S<=0?"+":"-")+k(J,2,"0")+":"+k(q,2,"0")},m:function H(S,j){if(S.date()<j.date())return-H(j,S);var J=12*(j.year()-S.year())+(j.month()-S.month()),q=S.clone().add(J,h),X=j-q<0,ce=S.clone().add(J+(X?-1:1),h);return+(-(J+(j-q)/(X?q-ce:ce-q))||0)},a:function(H){return H<0?Math.ceil(H)||0:Math.floor(H)},p:function(H){return{M:h,y:g,w:d,d:f,D:v,h:c,m:l,s:i,ms:o,Q:m}[H]||String(H||"").toLowerCase().replace(/s$/,"")},u:function(H){return H===void 0}},T="en",O={};O[T]=b;var U=function(H){return H instanceof K},$=function H(S,j,J){var q;if(!S)return T;if(typeof S=="string"){var X=S.toLowerCase();O[X]&&(q=X),j&&(O[X]=j,q=X);var ce=S.split("-");if(!q&&ce.length>1)return H(ce[0])}else{var ke=S.name;O[ke]=S,q=ke}return!J&&q&&(T=q),q||!J&&T},B=function(H,S){if(U(H))return H.clone();var j=typeof S=="object"?S:{};return j.date=H,j.args=arguments,new K(j)},L=P;L.l=$,L.i=U,L.w=function(H,S){return B(H,{locale:S.$L,utc:S.$u,x:S.$x,$offset:S.$offset})};var K=function(){function H(j){this.$L=$(j.locale,null,!0),this.parse(j)}var S=H.prototype;return S.parse=function(j){this.$d=function(J){var q=J.date,X=J.utc;if(q===null)return new Date(NaN);if(L.u(q))return new Date;if(q instanceof Date)return new Date(q);if(typeof q=="string"&&!/Z$/i.test(q)){var ce=q.match(N);if(ce){var ke=ce[2]-1||0,$e=(ce[7]||"0").substring(0,3);return X?new Date(Date.UTC(ce[1],ke,ce[3]||1,ce[4]||0,ce[5]||0,ce[6]||0,$e)):new Date(ce[1],ke,ce[3]||1,ce[4]||0,ce[5]||0,ce[6]||0,$e)}}return new Date(q)}(j),this.$x=j.x||{},this.init()},S.init=function(){var j=this.$d;this.$y=j.getFullYear(),this.$M=j.getMonth(),this.$D=j.getDate(),this.$W=j.getDay(),this.$H=j.getHours(),this.$m=j.getMinutes(),this.$s=j.getSeconds(),this.$ms=j.getMilliseconds()},S.$utils=function(){return L},S.isValid=function(){return this.$d.toString()!==E},S.isSame=function(j,J){var q=B(j);return this.startOf(J)<=q&&q<=this.endOf(J)},S.isAfter=function(j,J){return B(j)<this.startOf(J)},S.isBefore=function(j,J){return this.endOf(J)<B(j)},S.$g=function(j,J,q){return L.u(j)?this[J]:this.set(q,j)},S.unix=function(){return Math.floor(this.valueOf()/1e3)},S.valueOf=function(){return this.$d.getTime()},S.startOf=function(j,J){var q=this,X=!!L.u(J)||J,ce=L.p(j),ke=function(oe,ue){var ve=L.w(q.$u?Date.UTC(q.$y,ue,oe):new Date(q.$y,ue,oe),q);return X?ve:ve.endOf(f)},$e=function(oe,ue){return L.w(q.toDate()[oe].apply(q.toDate("s"),(X?[0,0,0,0]:[23,59,59,999]).slice(ue)),q)},Ce=this.$W,Fe=this.$M,Ge=this.$D,D="set"+(this.$u?"UTC":"");switch(ce){case g:return X?ke(1,0):ke(31,11);case h:return X?ke(1,Fe):ke(0,Fe+1);case d:var ne=this.$locale().weekStart||0,ee=(Ce<ne?Ce+7:Ce)-ne;return ke(X?Ge-ee:Ge+(6-ee),Fe);case f:case v:return $e(D+"Hours",0);case c:return $e(D+"Minutes",1);case l:return $e(D+"Seconds",2);case i:return $e(D+"Milliseconds",3);default:return this.clone()}},S.endOf=function(j){return this.startOf(j,!1)},S.$set=function(j,J){var q,X=L.p(j),ce="set"+(this.$u?"UTC":""),ke=(q={},q[f]=ce+"Date",q[v]=ce+"Date",q[h]=ce+"Month",q[g]=ce+"FullYear",q[c]=ce+"Hours",q[l]=ce+"Minutes",q[i]=ce+"Seconds",q[o]=ce+"Milliseconds",q)[X],$e=X===f?this.$D+(J-this.$W):J;if(X===h||X===g){var Ce=this.clone().set(v,1);Ce.$d[ke]($e),Ce.init(),this.$d=Ce.set(v,Math.min(this.$D,Ce.daysInMonth())).$d}else ke&&this.$d[ke]($e);return this.init(),this},S.set=function(j,J){return this.clone().$set(j,J)},S.get=function(j){return this[L.p(j)]()},S.add=function(j,J){var q,X=this;j=Number(j);var ce=L.p(J),ke=function(Fe){var Ge=B(X);return L.w(Ge.date(Ge.date()+Math.round(Fe*j)),X)};if(ce===h)return this.set(h,this.$M+j);if(ce===g)return this.set(g,this.$y+j);if(ce===f)return ke(1);if(ce===d)return ke(7);var $e=(q={},q[l]=s,q[c]=r,q[i]=n,q)[ce]||1,Ce=this.$d.getTime()+j*$e;return L.w(Ce,this)},S.subtract=function(j,J){return this.add(-1*j,J)},S.format=function(j){var J=this,q=this.$locale();if(!this.isValid())return q.invalidDate||E;var X=j||"YYYY-MM-DDTHH:mm:ssZ",ce=L.z(this),ke=this.$H,$e=this.$m,Ce=this.$M,Fe=q.weekdays,Ge=q.months,D=function(ue,ve,ye,w){return ue&&(ue[ve]||ue(J,X))||ye[ve].slice(0,w)},ne=function(ue){return L.s(ke%12||12,ue,"0")},ee=q.meridiem||function(ue,ve,ye){var w=ue<12?"AM":"PM";return ye?w.toLowerCase():w},oe={YY:String(this.$y).slice(-2),YYYY:this.$y,M:Ce+1,MM:L.s(Ce+1,2,"0"),MMM:D(q.monthsShort,Ce,Ge,3),MMMM:D(Ge,Ce),D:this.$D,DD:L.s(this.$D,2,"0"),d:String(this.$W),dd:D(q.weekdaysMin,this.$W,Fe,2),ddd:D(q.weekdaysShort,this.$W,Fe,3),dddd:Fe[this.$W],H:String(ke),HH:L.s(ke,2,"0"),h:ne(1),hh:ne(2),a:ee(ke,$e,!0),A:ee(ke,$e,!1),m:String($e),mm:L.s($e,2,"0"),s:String(this.$s),ss:L.s(this.$s,2,"0"),SSS:L.s(this.$ms,3,"0"),Z:ce};return X.replace(C,function(ue,ve){return ve||oe[ue]||ce.replace(":","")})},S.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},S.diff=function(j,J,q){var X,ce=L.p(J),ke=B(j),$e=(ke.utcOffset()-this.utcOffset())*s,Ce=this-ke,Fe=L.m(this,ke);return Fe=(X={},X[g]=Fe/12,X[h]=Fe,X[m]=Fe/3,X[d]=(Ce-$e)/6048e5,X[f]=(Ce-$e)/864e5,X[c]=Ce/r,X[l]=Ce/s,X[i]=Ce/n,X)[ce]||Ce,q?Fe:L.a(Fe)},S.daysInMonth=function(){return this.endOf(h).$D},S.$locale=function(){return O[this.$L]},S.locale=function(j,J){if(!j)return this.$L;var q=this.clone(),X=$(j,J,!0);return X&&(q.$L=X),q},S.clone=function(){return L.w(this.$d,this)},S.toDate=function(){return new Date(this.valueOf())},S.toJSON=function(){return this.isValid()?this.toISOString():null},S.toISOString=function(){return this.$d.toISOString()},S.toString=function(){return this.$d.toUTCString()},H}(),z=K.prototype;return B.prototype=z,[["$ms",o],["$s",i],["$m",l],["$H",c],["$W",f],["$M",h],["$y",g],["$D",v]].forEach(function(H){z[H[1]]=function(S){return this.$g(S,H[0],H[1])}}),B.extend=function(H,S){return H.$i||(H(S,K,B),H.$i=!0),B},B.locale=$,B.isDayjs=U,B.unix=function(H){return B(1e3*H)},B.en=O[T],B.Ls=O,B.p={},B})})(Qd);const W2=Qd.exports,Y2=we({__name:"SyncDateTime",props:{options:null},setup(e){var l;const t=e,n=G(null),s=G((l=t.options.classInit)!=null?l:""),r=G(!1),o=G();it(t.options.disabledId,c=>r.value=c);async function i(c){n.value=await window.webSocketClient.request(`setter:${t.options.setterId}`,c)}return it(t.options.getterId,c=>{n.value=null,o.value.inputValue=c===null?null:W2(c).format("YYYY-MM-DDTHH:mm")}),(c,f)=>(A(),he(K2,{class:Pe(s.value),disabled:r.value,"error-message":n.value,"debounce-update":i,ref_key:"$input",ref:o},null,8,["class","disabled","error-message"]))}});function ws(e){var t;const n=el(e);return(t=n==null?void 0:n.$el)!=null?t:n}const oa=Io?window:void 0,Z2=Io?window.document:void 0;Io&&window.navigator;Io&&window.location;function Hn(...e){let t,n,s,r;if(Yd(e[0])||Array.isArray(e[0])?([n,s,r]=e,t=oa):[t,n,s,r]=e,!t)return p2;Array.isArray(n)||(n=[n]),Array.isArray(s)||(s=[s]);const o=[],i=()=>{o.forEach(d=>d()),o.length=0},l=(d,h,m)=>(d.addEventListener(h,m,r),()=>d.removeEventListener(h,m,r)),c=Ht(()=>ws(t),d=>{i(),d&&o.push(...n.flatMap(h=>s.map(m=>l(d,h,m))))},{immediate:!0,flush:"post"}),f=()=>{c(),i()};return Zd(f),f}function tl(e,t,n={}){const{window:s=oa,ignore:r,capture:o=!0,detectIframe:i=!1}=n;if(!s)return;let l=!0,c;const f=g=>{s.clearTimeout(c);const v=ws(e);if(!(!v||v===g.target||g.composedPath().includes(v))){if(!l){l=!0;return}t(g)}},d=g=>r&&r.some(v=>{const E=ws(v);return E&&(g.target===E||g.composedPath().includes(E))}),h=[Hn(s,"click",f,{passive:!0,capture:o}),Hn(s,"pointerdown",g=>{const v=ws(e);v&&(l=!g.composedPath().includes(v)&&!d(g))},{passive:!0}),Hn(s,"pointerup",g=>{if(g.button===0){const v=g.composedPath();g.composedPath=()=>v,c=s.setTimeout(()=>f(g),50)}},{passive:!0}),i&&Hn(s,"blur",g=>{var v;const E=ws(e);((v=s.document.activeElement)==null?void 0:v.tagName)==="IFRAME"&&!(E!=null&&E.contains(s.document.activeElement))&&t(g)})].filter(Boolean);return()=>h.forEach(g=>g())}function Q2(e,t=!1){const n=G(),s=()=>n.value=Boolean(e());return s(),y2(s,t),n}const nl=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},sl="__vueuse_ssr_handlers__";nl[sl]=nl[sl]||{};nl[sl];var su=Object.getOwnPropertySymbols,G2=Object.prototype.hasOwnProperty,J2=Object.prototype.propertyIsEnumerable,X2=(e,t)=>{var n={};for(var s in e)G2.call(e,s)&&t.indexOf(s)<0&&(n[s]=e[s]);if(e!=null&&su)for(var s of su(e))t.indexOf(s)<0&&J2.call(e,s)&&(n[s]=e[s]);return n};function e_(e,t,n={}){const s=n,{window:r=oa}=s,o=X2(s,["window"]);let i;const l=Q2(()=>r&&"MutationObserver"in r),c=()=>{i&&(i.disconnect(),i=void 0)},f=Ht(()=>ws(e),h=>{c(),l.value&&r&&h&&(i=new MutationObserver(t),i.observe(h,o))},{immediate:!0}),d=()=>{c(),f()};return Zd(d),{isSupported:l,stop:d}}var ou;(function(e){e.UP="UP",e.RIGHT="RIGHT",e.DOWN="DOWN",e.LEFT="LEFT",e.NONE="NONE"})(ou||(ou={}));function t_(e=null,t={}){var n,s;const{document:r=Z2}=t,o=g2((n=e!=null?e:r==null?void 0:r.title)!=null?n:null),i=e&&nu(e);function l(c){if(!("titleTemplate"in t))return c;const f=t.titleTemplate||"%s";return nu(f)?f(c):se(f).replace(/%s/g,c)}return Ht(o,(c,f)=>{c!==f&&r&&(r.title=l(Yd(c)?c:""))},{immediate:!0}),t.observe&&!t.titleTemplate&&r&&!i&&e_((s=r.head)==null?void 0:s.querySelector("title"),()=>{r&&r.title!==o.value&&(o.value=l(r.title))},{childList:!0}),o}var n_=Object.defineProperty,ru=Object.getOwnPropertySymbols,s_=Object.prototype.hasOwnProperty,o_=Object.prototype.propertyIsEnumerable,iu=(e,t,n)=>t in e?n_(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,r_=(e,t)=>{for(var n in t||(t={}))s_.call(t,n)&&iu(e,n,t[n]);if(ru)for(var n of ru(t))o_.call(t,n)&&iu(e,n,t[n]);return e};const i_={easeInSine:[.12,0,.39,0],easeOutSine:[.61,1,.88,1],easeInOutSine:[.37,0,.63,1],easeInQuad:[.11,0,.5,0],easeOutQuad:[.5,1,.89,1],easeInOutQuad:[.45,0,.55,1],easeInCubic:[.32,0,.67,0],easeOutCubic:[.33,1,.68,1],easeInOutCubic:[.65,0,.35,1],easeInQuart:[.5,0,.75,0],easeOutQuart:[.25,1,.5,1],easeInOutQuart:[.76,0,.24,1],easeInQuint:[.64,0,.78,0],easeOutQuint:[.22,1,.36,1],easeInOutQuint:[.83,0,.17,1],easeInExpo:[.7,0,.84,0],easeOutExpo:[.16,1,.3,1],easeInOutExpo:[.87,0,.13,1],easeInCirc:[.55,0,1,.45],easeOutCirc:[0,.55,.45,1],easeInOutCirc:[.85,0,.15,1],easeInBack:[.36,0,.66,-.56],easeOutBack:[.34,1.56,.64,1],easeInOutBack:[.68,-.6,.32,1.6]};r_({linear:w2},i_);const l_={class:"tw-flex tw-h-full"},a_={class:"tw-hidden md:tw-flex md:tw-w-64 md:tw-flex-col md:tw-fixed md:tw-inset-y-0"},c_={class:"tw-flex-1 tw-flex tw-flex-col tw-min-h-0 tw-bg-gray-800"},u_={class:"tw-flex tw-items-center tw-justify-center tw-h-16 tw-flex-shrink-0 tw-px-4 tw-bg-gray-900"},f_=["innerHTML"],d_={class:"tw-flex-1 tw-flex tw-flex-col tw-overflow-y-auto"},p_={class:"tw-flex-1 tw-px-2 tw-py-4 tw-space-y-1"},h_=["innerHTML"],m_={class:"md:tw-pl-64 tw-flex tw-w-full tw-flex-col"},w_={class:"tw-sticky tw-top-0 tw-z-10 tw-flex-shrink-0 tw-flex tw-h-16 tw-bg-white tw-shadow"},g_=x("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"tw-w-6 tw-h-6","aria-hidden":"true"},[x("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M3.75 6.75h16.5M3.75 12h16.5m-16.5 5.25h16.5"})],-1),y_=[g_],b_={class:"tw-flex-1 tw-px-4 tw-flex tw-justify-end"},v_={class:"tw-ml-4 tw-flex tw-items-center md:tw-ml-6"},__={key:0,class:"tw-ml-3 tw-relative"},C_=x("span",{class:"material-symbols-rounded tw-m-2"},"person",-1),x_=[C_],k_={class:"tw-cursor-pointer tw-block tw-px-4 tw-py-2 tw-text-sm tw-text-gray-700 hover:tw-bg-gray-100"},E_={class:"tw-flex-1 tw-overflow-scroll"},S_={class:"tw-py-6"},T_={class:"tw-flex tw-flex-col tw-max-w-7xl tw-mx-auto tw-px-4 sm:tw-px-6 md:tw-px-8"},$_={class:"tw-relative tw-z-40 md:tw-hidden"},P_=x("div",{class:"tw-fixed tw-inset-0 tw-bg-gray-600 tw-bg-opacity-75"},null,-1),A_={class:"tw-fixed tw-inset-0 tw-flex tw-z-40"},O_={class:"tw-absolute tw-top-0 tw-right-0 tw--mr-12 tw-pt-2"},I_=x("span",{class:"material-symbols-rounded tw-text-white tw-text-3xl"},"close",-1),M_=[I_],R_={class:"tw-flex-shrink-0 tw-flex tw-items-center tw-justify-center tw-px-4"},B_=["innerHTML"],N_={class:"tw-mt-5 tw-flex-1 tw-h-0 tw-overflow-y-auto"},L_={class:"tw-px-2 tw-space-y-1"},D_=["href"],F_=we({__name:"BaseDarkSidebar",props:{logo:{default:null},items:null,profileItems:{default:null}},setup(e){const t=G(!1),n=G(!1),s=G(),r=G();return tl(s,()=>{n.value=!1}),tl(r,()=>{t.value=!1}),(o,i)=>{const l=Kn("router-link");return A(),Q("div",l_,[pe(" Static sidebar for desktop "),x("div",a_,[pe(" Sidebar component, swap this element with another sidebar if you like "),x("div",c_,[x("div",u_,[x("span",{innerHTML:e.logo},null,8,f_)]),x("div",d_,[x("nav",p_,[(A(!0),Q(Te,null,nt(e.items,c=>(A(),he(l,{key:c.name,to:c.href,class:Pe([c.current?"tw-bg-gray-900 tw-text-white":"tw-text-gray-300 hover:tw-bg-gray-700 hover:tw-text-white","group tw-flex tw-items-center tw-px-2 tw-py-2 tw-text-sm tw-font-medium tw-rounded-md"])},{default:mt(()=>[x("span",{class:Pe([[c.current?"tw-text-blue-400":"tw-text-gray-400 group-hover:tw-text-gray-300","tw-mr-3 tw-flex-shrink-0 tw-text-[20px]"],"material-symbols-rounded"]),innerHTML:c.icon},null,10,h_),We(" "+de(c.name),1)]),_:2},1032,["to","class"]))),128))])])])]),x("div",m_,[x("div",w_,[x("button",{type:"button",class:"tw-px-4 tw-border-r tw-border-gray-200 tw-text-gray-500 focus:tw-outline-none focus:tw-ring-2 focus:tw-ring-inset focus:tw-ring-blue-500 md:tw-hidden",onClick:i[0]||(i[0]=c=>t.value=!0)},y_),x("div",b_,[x("div",v_,[e.profileItems!==null&&e.profileItems.length>0?(A(),Q("div",__,[x("div",{onClick:i[1]||(i[1]=c=>n.value=!n.value),class:"tw-cursor-pointer tw-max-w-xs tw-bg-gray-200 tw-text-gray-500 hover:tw-text-gray-600 tw-flex tw-items-center tw-text-sm tw-rounded-full focus:tw-outline-none focus:tw-ring-2 focus:tw-ring-offset-2 focus:tw-ring-blue-500"},x_),_e(To,{"enter-active-class":"tw-transition tw-ease-out tw-duration-100","enter-from-class":"tw-transform tw-opacity-0 tw-scale-95","enter-to-class":"tw-transform tw-opacity-100 tw-scale-100","leave-active-class":"tw-transition tw-ease-in tw-duration-75","leave-from-class":"tw-transform tw-opacity-100 tw-scale-100","leave-to-class":"tw-transform tw-opacity-0 tw-scale-95"},{default:mt(()=>[n.value?(A(),Q("div",{key:0,ref_key:"$profileDropdown",ref:s,class:"tw-origin-top-right tw-absolute tw-right-0 tw-mt-2 tw-w-48 tw-rounded-md tw-shadow-lg tw-py-1 tw-bg-white tw-ring-1 tw-ring-black tw-ring-opacity-5 focus:tw-outline-none"},[(A(!0),Q(Te,null,nt(e.profileItems,c=>(A(),Q("div",{key:c.name},[_e(l,{to:c.href},{default:mt(()=>[x("span",k_,de(c.name),1)]),_:2},1032,["to"])]))),128))],512)):pe("v-if",!0)]),_:1})])):pe("v-if",!0)])])]),x("main",E_,[x("div",S_,[x("div",T_,[Eo(o.$slots,"default")])])])]),xt(x("div",$_,[P_,x("div",A_,[x("div",{ref_key:"$sidebarMenu",ref:r,class:"tw-relative tw-flex-1 tw-flex tw-flex-col tw-max-w-xs tw-w-full tw-pt-5 tw-pb-4 tw-bg-gray-800"},[x("div",O_,[x("button",{type:"button",class:"tw-ml-1 tw-flex tw-items-center tw-justify-center tw-h-10 tw-w-10 tw-rounded-full focus:tw-outline-none focus:tw-ring-2 focus:tw-ring-inset focus:tw-ring-white",onClick:i[2]||(i[2]=c=>t.value=!1)},M_)]),x("div",R_,[e.logo!==null?(A(),Q("span",{key:0,innerHTML:e.logo},null,8,B_)):pe("v-if",!0)]),x("div",N_,[x("nav",L_,[(A(!0),Q(Te,null,nt(e.items,c=>(A(),Q("a",{key:c.name,href:c.href,class:Pe([c.current?"tw-bg-gray-900 tw-text-white":"tw-text-gray-300 hover:tw-bg-gray-700 hover:tw-text-white","group tw-flex tw-items-center tw-px-2 tw-py-2 tw-text-base tw-font-medium tw-rounded-md"])},de(c.name),11,D_))),128))])])],512)])],512),[[jr,t.value]])])}}}),H_=we({__name:"SyncDarkSidebar",props:{options:null},setup(e){const t=G(window.config.logo);return(n,s)=>(A(),he(F_,{items:e.options.sidebarMenuItemsInit,"profile-items":e.options.profileMenuItemsInit,logo:t.value},{default:mt(()=>[_e(sa,{options:e.options.container},null,8,["options"])]),_:1},8,["items","profile-items","logo"]))}});function Gd(e,t){return t!=null&&typeof t=="string"&&t.trim()!==""&&e!==void 0&&t.split(" ").forEach(n=>{if(n.length===0)return;const s=new RegExp(n,"gi");e=e.replaceAll(s,"<mark>$&</mark>")}),e}const j_=["innerHTML"],V_=we({__name:"BetterText",props:{options:null,highlightStr:null},setup(e){var r;const t=e,n=G(""),s=G((r=t.options.classInit)!=null?r:"");return it(t.options.labelId,o=>n.value=o),(o,i)=>(A(),Q("p",{class:Pe(s.value),innerHTML:se(Gd)(n.value,e.highlightStr)},null,10,j_))}});let Ci=!1;function U_(e){async function t(n){const s=n.target.scrollTop,r=n.target.clientHeight,o=n.target.scrollHeight;if(s+r>=o){if(Ci)return;Ci=!0,await e(),Ci=!1}}return{scroll:t}}const q_=["value"],z_=we({__name:"SearchField",props:{onFilter:null},setup(e){const t=e,n=G(""),s=G("");function r(i){n.value=i,o(i)}const o=Ms(async i=>{await t.onFilter(i),s.value=i},250);return Ht(n,o),(i,l)=>(A(),Q("input",{name:"search",type:"text",class:"tw-flex-1 tw-rounded-md tw-border-0 tw-bg-gray-100 tw-px-4 tw-py-2.5 tw-my-2 tw-mx-2 tw-text-gray-900 tw-placeholder-gray-500 focus:tw-ring-0 focus-visible:tw-ring-0 sm:tw-text-sm",placeholder:"Search",value:n.value,onInput:l[0]||(l[0]=c=>r(c.target.value)),onKeypress:l[1]||(l[1]=c=>r(c.target.value)),"aria-autocomplete":"none","aria-controls":"options","aria-expanded":"false",autocapitalize:"none",autocomplete:"off",autocorrect:"off",role:"combobox"},null,40,q_))}}),K_={key:0,class:"tw-block tw-truncate tw-flex-1 tw-text-gray-800"},W_={key:1,class:"tw-flex tw-flex-wrap tw-gap-2 tw-flex-1"},Y_=["onClick"],Z_=x("span",{class:"material-symbols-rounded tw-text-xs","remove-btn":""},"close",-1),Q_=[Z_],G_={class:"tw-flex tw-space-x-1 tw-ml-2 tw-flex-shrink-0"},J_={key:0,class:"tw-flex tw-flex-col tw-justify-center tw-items-center tw-p-4"},X_=x("span",{class:"material-symbols-rounded tw-text-3xl tw-text-gray-500 mb-4"},"sentiment_dissatisfied",-1),eC=x("span",{class:"tw-text-base tw-text-gray-700"},"No data to display",-1),tC=[X_,eC],nC={key:0,class:"tw-flex tw-flex-col tw-justify-center tw-items-center tw-p-4"},sC=x("span",{class:"material-symbols-rounded tw-text-3xl tw-text-gray-500 mb-4"},"mood_bad",-1),oC=x("span",{class:"tw-text-base tw-text-gray-700"},"No matches found",-1),rC=[sC,oC],iC={key:1,class:"tw-py-1 tw-flex tw-items-stretch tw-flex-col"},lC=["onClick"],aC=["innerHTML"],cC={key:0,class:"material-symbols-rounded tw-shrink-0 tw-text-sm"},Jd=we({__name:"BaseSelect",props:{request:null,selected:{default:()=>[]},disabled:{type:Boolean,default:!1},multiple:{type:Boolean,default:!1}},emits:["deselect","select"],setup(e,{emit:t}){const n=e,s=G(!1),r=G(0),o=G([]),i=G(1),l=G(""),c=G(),f=G(),d=G(0),h=G(0),m=G(0),g=/Mobi/.test(navigator.userAgent);Ut(async()=>{v();const T=await n.request(i.value,"");o.value=T.items,r.value=T.totalWithoutFilter}),Ht(s,()=>{rs(()=>{if(s.value&&!g){const T=f.value.querySelector('input[name="search"]');T==null||T.focus()}}),v()}),tl(f,T=>{s.value===!0&&(T.target.hasAttribute("remove-btn")===!1&&T.stopPropagation(),s.value=!1)});function v(){var O;const T=(O=c.value)==null?void 0:O.getBoundingClientRect();T!==void 0&&(d.value=T.top+T.height,h.value=T.left,m.value=T.width)}Hn("resize",Ms(v,10)),Hn("scroll",Ms(v,10),!0);function E(T){t("select",T),n.multiple===!1&&(s.value=!1)}function N(T){t("deselect",T.id),n.multiple===!1&&(s.value=!1)}function C(T){return n.selected.some(O=>O.id===T.id)}let b=!1;const{scroll:k}=U_(async()=>{if(b)return;i.value+=1;const T=await n.request(i.value,l.value);T.items.length===0?b=!0:o.value.push(...T.items)});async function P(T){i.value=1;const O=await n.request(i.value,T);o.value=O.items,l.value=T}return(T,O)=>{var U,$;return A(),Q("div",{class:Pe(["tw-flex tw-tw-flex-col tw-w-full",{"tw-cursor-not-allowed tw-opacity-50 tw-grayscale":e.disabled}])},[x("div",{class:Pe(["tw-relative tw-inline-block tw-text-left tw-w-full tw-select-none",{"tw-pointer-events-none":e.disabled}])},[x("div",{class:"tw-flex tw-items-center tw-w-full tw-cursor-pointer tw-rounded-md tw-border tw-border-gray-300 tw-bg-white tw-px-2.5 tw-py-1 tw-text-left tw-shadow-sm focus:tw-border-blue-500 focus:tw-outline-none focus:tw-ring-1 focus:tw-ring-blue-500 sm:tw-text-sm",onClick:O[1]||(O[1]=ln(B=>s.value=!s.value,["stop"])),ref_key:"$select",ref:c},[e.multiple===!1?(A(),Q("span",K_,de(($=(U=e.selected[0])==null?void 0:U.label)!=null?$:""),1)):(A(),Q("div",W_,[(A(!0),Q(Te,null,nt(e.selected,B=>(A(),Q("span",{key:B.id,class:"tw-inline-flex tw-items-center tw-rounded tw-bg-gray-200 tw-py-0.5 tw-pl-2 tw-pr-0.5 tw-text-xs tw-font-medium tw-text-gray-700"},[We(de(B.label)+" ",1),x("button",{onClick:ln(L=>N(B),["stop"]),type:"button",class:"tw-ml-0.5 tw-inline-flex tw-h-4 tw-w-4 tw-flex-shrink-0 tw-items-center tw-justify-center tw-rounded tw-text-gray-400 hover:tw-bg-gray-300 hover:tw-text-gray-500 focus:tw-bg-gray-500 focus:tw-text-white focus:tw-outline-none","remove-btn":""},Q_,8,Y_)]))),128))])),x("div",G_,[e.multiple===!1&&e.selected.length>0?(A(),Q("span",{key:0,class:"material-symbols-rounded tw-cursor-pointer tw-text-gray-400 hover:tw-text-red-500 tw-text-xl",onClick:O[0]||(O[0]=ln(B=>N(e.selected[0]),["stop"])),"remove-btn":""},"do_not_disturb_on")):pe("v-if",!0),x("span",{class:Pe(["material-symbols-rounded tw-cursor-pointer tw-text-gray-400 hover:tw-text-gray-500 tw-transition-transform tw-text-xl",{"tw-rotate-180":s.value}])},"keyboard_arrow_down",2)])],512),(A(),he(bf,{to:"body"},[_e(To,{"enter-active-class":"tw-transition tw-duration-100 tw-ease-out","enter-from-class":"tw-transform tw-scale-95 tw-opacity-0","enter-to-class":"tw-transform tw-scale-100 tw-opacity-100","leave-active-class":"tw-transition tw-duration tw-ease-in","leave-from-class":"tw-transform tw-scale-100 tw-opacity-100","leave-to-class":"tw-transform tw-scale-95 tw-opacity-0",persisted:""},{default:mt(()=>[xt(x("div",{ref_key:"$menu",ref:f,class:"tw-z-10 tw-flex tw-flex-col tw-fixed tw-overflow-auto tw-max-h-60 tw-mt-2 tw-origin-top tw-divide-y tw-divide-gray-100 tw-rounded-md tw-bg-white tw-shadow-lg tw-ring-1 tw-ring-black tw-ring-opacity-5 focus:tw-outline-none tw-text-base sm:tw-text-sm",style:Xt(`left: ${h.value}px; top: ${d.value}px; width: ${m.value}px;`),onScroll:O[2]||(O[2]=(...B)=>se(k)&&se(k)(...B))},[r.value===0?(A(),Q("div",J_,tC)):(A(),Q(Te,{key:1},[_e(z_,{onFilter:P}),o.value.length===0?(A(),Q("div",nC,rC)):(A(),Q("div",iC,[(A(!0),Q(Te,null,nt(o.value,B=>(A(),Q("button",{key:B.id,class:Pe(["tw-flex tw-cursor-pointer tw-text-sm tw-justify-between tw-items-center tw-select-none tw-py-2 tw-text-left tw-px-4 hover:tw-bg-violet-500 hover:tw-text-white",C(B)?"tw-bg-violet-500 tw-text-white":"tw-text-gray-900"]),onClick:L=>C(B)?N(B):E(B)},[x("span",{class:"tw-truncate tw-mr-4",innerHTML:se(Gd)(B.label,l.value)},null,8,aC),C(B)?(A(),Q("span",cC,"check")):pe("v-if",!0)],10,lC))),128))]))],64))],36),[[jr,s.value]])]),_:1})]))],2)],2)}}}),uC=we({__name:"SyncSelectOne",props:{options:null},setup(e){const t=e,n=G(!1),s=G(null);it(t.options.disabledId,l=>n.value=l),it(t.options.selectedId,l=>s.value=l);async function r(l,c){return await window.webSocketClient.request(`getter:${t.options.optionsId}`,{pageNumber:l,query:c})}function o(){window.webSocketClient.request(`setter:${t.options.onSelectId}`,null)}function i(l){window.webSocketClient.request(`setter:${t.options.onSelectId}`,l)}return(l,c)=>(A(),he(Jd,{request:r,selected:s.value?[s.value]:[],onDeselect:o,onSelect:i,disabled:n.value},null,8,["selected","disabled"]))}}),fC=we({__name:"SyncSelectMany",props:{options:null},setup(e){const t=e,n=G(!1),s=G([]);it(t.options.disabledId,l=>n.value=l),it(t.options.selectedId,l=>s.value=l);async function r(l,c){return await window.webSocketClient.request(`getter:${t.options.optionsId}`,{pageNumber:l,query:c})}function o(l){window.webSocketClient.request(`setter:${t.options.onDeselectId}`,l)}function i(l){window.webSocketClient.request(`setter:${t.options.onSelectId}`,l)}return(l,c)=>(A(),he(Jd,{request:r,selected:s.value,onDeselect:o,onSelect:i,disabled:n.value,multiple:""},null,8,["selected","disabled"]))}}),dC=we({__name:"BaseToggle",props:{disabled:{type:Boolean,default:!1},onToggle:{type:Function,default:async()=>!0},initState:{type:Boolean,default:!1}},setup(e,{expose:t}){const n=e,s=G(n.initState),r=je({get:()=>s.value,set:async o=>{s.value=o,await n.onToggle(o)===!1&&(s.value=!o)}});return t({state:s}),(o,i)=>(A(),Q("div",{class:Pe(["tw-flex",{"tw-cursor-not-allowed tw-opacity-50":e.disabled}])},[x("button",{onClick:i[0]||(i[0]=l=>r.value=!se(r)),type:"button",class:Pe([{"tw-bg-blue-600":se(r),"tw-bg-gray-200":!se(r),"tw-pointer-events-none":e.disabled},"tw-relative tw-inline-flex tw-h-6 tw-w-11 tw-flex-shrink-0 tw-cursor-pointer tw-rounded-full tw-border-2 tw-border-transparent tw-transition-colors tw-duration-200 tw-ease-in-out focus:tw-outline-none focus:tw-ring-2 focus:tw-ring-blue-500 focus:tw-ring-offset-2"]),role:"switch","aria-checked":"false",style:{"border-style":"inherit"}},[x("span",{"aria-hidden":"true",class:Pe([{"tw-translate-x-5":se(r),"tw-translate-x-0":!se(r)},"tw-pointer-events-none tw-inline-block tw-h-5 tw-w-5 tw-transform tw-rounded-full tw-bg-white tw-shadow tw-ring-0 tw-transition tw-duration-200 tw-ease-in-out"])},null,2)],2)],2))}}),pC=we({__name:"SyncToggle",props:{options:null},setup(e){const t=e,n=G(!1),s=G();it(t.options.disabledId,o=>n.value=o),it(t.options.stateId,o=>{s.value.state=o});async function r(o){return await window.webSocketClient.request(`setter:${t.options.onToggleId}`,o)}return(o,i)=>(A(),he(dC,{disabled:n.value,"on-toggle":r,ref_key:"$toggle",ref:s},null,8,["disabled"]))}}),hC=["data-active","onDragenter","onDragover","onDragleave","onDrop"],mC=we({__name:"DropZone",emits:["drop"],setup(e,{emit:t}){let n=G(!1),s=null;const r=G();function o(){n.value=!0,s&&clearTimeout(s)}function i(){s=setTimeout(()=>{n.value=!1},50)}function l(c){var d,h;i();const f=[...(h=(d=c.dataTransfer)==null?void 0:d.files)!=null?h:[]];f.length>0&&t("drop",f)}return Ut(()=>["dragenter","dragover","dragleave","drop"].forEach(c=>Hn(r.value,c,f=>f.preventDefault()))),(c,f)=>(A(),Q("div",{"data-active":se(n),onDragenter:ln(o,["prevent"]),onDragover:ln(o,["prevent"]),onDragleave:ln(i,["prevent"]),onDrop:ln(l,["prevent"])},[Eo(c.$slots,"default",{dropZoneActive:se(n)})],40,hC))}}),wC={class:"tw-flex tw-flex-col md:tw-flex-row tw-w-full tw-px-3 tw-py-2 tw-bg-gray-50 tw-border tw-rounded tw-justify-between tw-items-center md:tw-space-x-3"},gC={class:"tw-font-medium tw-truncate shrink grow-0 tw-w-full tw-text-center md:tw-text-left"},yC={class:"tw-flex tw-justify-between tw-space-x-2 tw-w-full md:tw-w-auto tw-mt-3 md:tw-mt-0"},bC=x("span",{class:"material-symbols-rounded tw-text-xl"},"edit",-1),vC=[bC],_C=x("span",{class:"material-symbols-rounded tw-text-xl"},"open_in_new",-1),CC=[_C],xC=x("span",{class:"material-symbols-rounded tw-text-xl"},"download",-1),kC=[xC],EC=x("span",{class:"material-symbols-rounded tw-text-xl"},"delete",-1),SC=[EC],TC=we({__name:"UploadedFileRow",props:{file:null},emits:["open","download","delete","rename"],setup(e){return(t,n)=>(A(),Q("div",wC,[x("span",gC,de(e.file.displayName),1),x("div",yC,[x("div",{onClick:n[0]||(n[0]=s=>t.$emit("rename")),class:"tw-cursor-pointer hover:tw-text-blue-500 tw-text-gray-400"},vC),x("div",{onClick:n[1]||(n[1]=s=>t.$emit("open")),class:"tw-cursor-pointer hover:tw-text-blue-500 tw-text-gray-400"},CC),x("div",{onClick:n[2]||(n[2]=s=>t.$emit("download")),class:"tw-cursor-pointer hover:tw-text-blue-500 tw-text-gray-400"},kC),x("div",{onClick:n[3]||(n[3]=s=>t.$emit("delete")),class:"tw-cursor-pointer hover:tw-text-red-500 tw-text-gray-400"},SC)])]))}}),$C={class:"tw-flex tw-flex-col md:tw-flex-row tw-w-full tw-px-3 tw-py-2 tw-bg-gray-50 tw-border tw-rounded tw-justify-between tw-items-center md:tw-space-x-3"},PC={class:"tw-font-medium tw-truncate tw-max-w-[60%] tw-w-full tw-text-center md:tw-text-left"},AC={class:"tw-flex tw-justify-between tw-space-x-2 tw-flex-1 tw-w-full md:tw-w-auto tw-mt-3 md:tw-mt-0 tw-items-center"},OC={class:"tw-flex-1 tw-bg-gray-200 tw-rounded-full tw-h-1.5 tw-overflow-hidden"},IC={class:"tw-text-xs tw-text-gray-400"},MC=x("span",{class:"material-symbols-rounded tw-text-xl"},"close",-1),RC=[MC],BC=we({__name:"UploadingFileRow",props:{file:null},emits:["abort"],setup(e){return(t,n)=>(A(),Q("div",$C,[x("span",PC,de(e.file.name),1),x("div",AC,[x("div",OC,[x("div",{class:"tw-bg-blue-600 tw-h-1.5",style:Xt(`width: ${e.file.percentage()}%`)},null,4)]),x("span",IC,de(`${e.file.percentage()}%`),1),x("div",{onClick:n[0]||(n[0]=s=>t.$emit("abort")),class:"tw-cursor-pointer hover:tw-text-red-500 tw-text-gray-400"},RC)])]))}});function NC(e,t=2){if(e===0)return"0 Bytes";const n=1024,s=t<0?0:t,r=["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"],o=Math.floor(Math.log(e)/Math.log(n));return parseFloat((e/Math.pow(n,o)).toFixed(s))+" "+r[o]}const LC={class:"tw-flex tw-flex-col tw-w-full tw-space-y-3"},DC={class:"tw-text-base tw-leading-normal tw-py-4 tw-flex tw-flex-col tw-space-y-2 tw-items-center tw-text-center"},FC=x("span",null,[x("span",{class:"tw-text-blue-500 tw-font-medium hover:tw-text-blue-700"},"Click to upload"),We(" or drag and drop")],-1),HC={class:"tw-text-gray-400 tw-text-xs"},jC={class:"tw-flex tw-flex-col tw-w-full tw-space-y-3"},VC=we({__name:"BaseFile",props:{uploadedFiles:{default:[]},uploadingFiles:{default:[]},maxFileSize:{default:50}},emits:["open","download","delete","rename","abort","upload"],setup(e,{emit:t}){const s=e.maxFileSize*1024*1024,r=NC(s);function o(i){if(i.length!==0){for(const l of i)if(l.size>s){alert(`The '${l.name}' file is larger than ${r}`);return}t("upload",i)}}return(i,l)=>(A(),Q("div",LC,[_e(mC,{onDrop:o},{default:mt(({dropZoneActive:c})=>[x("label",{class:Pe(["tw-w-full tw-flex tw-flex-col tw-items-center tw-border tw-border-gray-300 tw-rounded tw-border-dashed hover:tw-border-solid tw-cursor-pointer",{"tw-bg-blue-50":c}])},[x("span",DC,[FC,x("span",HC,de(se(r))+" max file size.",1)]),x("input",{onChange:l[0]||(l[0]=f=>{var d,h;return o([...(h=(d=f.target)==null?void 0:d.files)!=null?h:[]])}),type:"file",class:"tw-hidden",multiple:""},null,32)],2)]),_:1}),x("div",jC,[(A(!0),Q(Te,null,nt(e.uploadingFiles,c=>(A(),he(BC,{key:c.id,file:c,onAbort:f=>i.$emit("abort",c)},null,8,["file","onAbort"]))),128)),(A(!0),Q(Te,null,nt(e.uploadedFiles,c=>(A(),he(TC,{key:c.id,file:c,onOpen:f=>i.$emit("open",c),onDownload:f=>i.$emit("download",c),onDelete:f=>i.$emit("delete",c),onRename:f=>i.$emit("rename",c)},null,8,["file","onOpen","onDownload","onDelete","onRename"]))),128))])]))}}),Xd="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",UC=Xd.length;function qC(e){return Math.floor(Math.random()*e)}function ol(e=5){let t="";for(let n=0;n<e;n++){const s=qC(UC);t+=Xd.charAt(s)}return t}class zC{constructor(t){Nt(this,"id",ol());Nt(this,"totalBytes",0);Nt(this,"uploadedBytes",0);Nt(this,"xmlHttpRequest",null);Nt(this,"workspaceId",window.location.pathname.split("/")[1]);Nt(this,"onComplete");this.file=t}start(){this.xmlHttpRequest=new XMLHttpRequest,this.xmlHttpRequest.upload.addEventListener("progress",n=>{this.uploadedBytes=n.loaded,this.totalBytes=n.total}),this.xmlHttpRequest.addEventListener("load",async()=>{var s,r;const n=(s=this.xmlHttpRequest)==null?void 0:s.responseText;n!==void 0&&((r=this.onComplete)==null||r.call(this,n))}),this.xmlHttpRequest.open("POST","/file-upload"),this.xmlHttpRequest.setRequestHeader("workspace-id",this.workspaceId),this.xmlHttpRequest.setRequestHeader("file-size",this.file.size.toString());const t=new FormData;t.append("file",this.file,this.file.name),this.xmlHttpRequest.send(t)}abort(){var t;(t=this.xmlHttpRequest)==null||t.abort()}uploadingFile(){return{id:this.id,name:this.file.name,percentage:()=>Math.ceil(this.uploadedBytes/this.totalBytes*100)||0}}}var ep={exports:{}};/*!
12
- * sweetalert2 v11.6.14
12
+ * sweetalert2 v11.6.15
13
13
  * Released under the MIT License.
14
14
  */(function(e,t){(function(n,s){e.exports=s()})(sn,function(){var n={awaitingPromise:new WeakMap,promise:new WeakMap,innerParams:new WeakMap,domCache:new WeakMap};const s="swal2-",r=a=>{const u={};for(const p in a)u[a[p]]=s+a[p];return u},o=r(["container","shown","height-auto","iosfix","popup","modal","no-backdrop","no-transition","toast","toast-shown","show","hide","close","title","html-container","actions","confirm","deny","cancel","default-outline","footer","icon","icon-content","image","input","file","range","select","radio","checkbox","label","textarea","inputerror","input-label","validation-message","progress-steps","active-progress-step","progress-step","progress-step-line","loader","loading","styled","top","top-start","top-end","top-left","top-right","center","center-start","center-end","center-left","center-right","bottom","bottom-start","bottom-end","bottom-left","bottom-right","grow-row","grow-column","grow-fullscreen","rtl","timer-progress-bar","timer-progress-bar-container","scrollbar-measure","icon-success","icon-warning","icon-info","icon-question","icon-error"]),i=r(["success","warning","info","question","error"]),l="SweetAlert2:",c=a=>{const u=[];for(let p=0;p<a.length;p++)u.indexOf(a[p])===-1&&u.push(a[p]);return u},f=a=>a.charAt(0).toUpperCase()+a.slice(1),d=a=>{console.warn(`${l} ${typeof a=="object"?a.join(" "):a}`)},h=a=>{console.error(`${l} ${a}`)},m=[],g=a=>{m.includes(a)||(m.push(a),d(a))},v=(a,u)=>{g(`"${a}" is deprecated and will be removed in the next major release. Please use "${u}" instead.`)},E=a=>typeof a=="function"?a():a,N=a=>a&&typeof a.toPromise=="function",C=a=>N(a)?a.toPromise():Promise.resolve(a),b=a=>a&&Promise.resolve(a)===a,k=()=>document.body.querySelector(`.${o.container}`),P=a=>{const u=k();return u?u.querySelector(a):null},T=a=>P(`.${a}`),O=()=>T(o.popup),U=()=>T(o.icon),$=()=>T(o["icon-content"]),B=()=>T(o.title),L=()=>T(o["html-container"]),K=()=>T(o.image),z=()=>T(o["progress-steps"]),H=()=>T(o["validation-message"]),S=()=>P(`.${o.actions} .${o.confirm}`),j=()=>P(`.${o.actions} .${o.deny}`),J=()=>T(o["input-label"]),q=()=>P(`.${o.loader}`),X=()=>P(`.${o.actions} .${o.cancel}`),ce=()=>T(o.actions),ke=()=>T(o.footer),$e=()=>T(o["timer-progress-bar"]),Ce=()=>T(o.close),Fe=`
15
15
  a[href],
@@ -69,7 +69,7 @@ var Gm=Object.defineProperty;var Jm=(e,t,n)=>t in e?Gm(e,t,{enumerable:!0,config
69
69
  <span class="swal2-x-mark-line-left"></span>
70
70
  <span class="swal2-x-mark-line-right"></span>
71
71
  </span>
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"):me()&&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)&&!ve(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(ve(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(be)),/^((?!chrome|android).)*safari/i.test(navigator.userAgent)?(u.setAttribute("style","display:none !important"),u.removeAttribute("class"),u.innerHTML=""):u.remove(),D()&&(Sh(),kh(),wa()),Th()}function Th(){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 $h(){return!!n.awaitingPromise.get(this)}const Ph=a=>{const u=O();if(!u)return!1;const p=n.innerParams.get(a);if(!p||ve(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)=>{be.swalCloseEventFinishedCallback=ga.bind(null,a,p,y,R),u.addEventListener(Ds,function(ae){ae.target===u&&(be.swalCloseEventFinishedCallback(),delete be.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))}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},Hh=["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"],jh={},Vh=["allowOutsideClick","allowEnterKey","backdrop","focusConfirm","focusDeny","focusCancel","returnFocus","heightAuto","keydownListenerCapture"],_a=a=>Object.prototype.hasOwnProperty.call(ls,a),Ca=a=>Hh.indexOf(a)!==-1,ni=a=>jh[a],Uh=a=>{_a(a)||d(`Unknown parameter "${a}"`)},qh=a=>{Vh.includes(a)&&d(`The parameter "${a}" is incompatible with toasts`)},zh=a=>{ni(a)&&v(a,ni(a))},Kh=a=>{a.backdrop===!1&&a.allowOutsideClick&&d('"allowOutsideClick" parameter requires `backdrop` parameter to be set to `true`');for(const u in a)Uh(u),a.toast&&qh(u),zh(u)};function Wh(a){const u=O(),p=n.innerParams.get(this);if(!u||ve(u,p.hideClass.popup)){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.");return}const y=Yh(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 Yh=a=>{const u={};return Object.keys(a).forEach(p=>{Ca(p)?u[p]=a[p]:d(`Invalid parameter to update: ${p}`)}),u};function Zh(){const a=n.domCache.get(this),u=n.innerParams.get(this);if(!u){xa(this);return}a.popup&&be.swalCloseEventFinishedCallback&&(be.swalCloseEventFinishedCallback(),delete be.swalCloseEventFinishedCallback),typeof u.didDestroy=="function"&&u.didDestroy(),Qh(this)}const Qh=a=>{xa(a),delete a.params,delete be.keydownHandler,delete be.keydownTarget,delete be.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:$h,rejectPromise:Ah,handleAwaitingPromise:js,closePopup:No,closeModal:No,closeToast:No,enableButtons:Rh,disableButtons:Bh,enableInput:Nh,disableInput:Lh,showValidationMessage:Dh,resetValidationMessage:Fh,update:Wh,_destroy:Zh});const as=a=>{let u=O();u||new Do,u=O();const p=q();ne()?V(U()):Gh(u,a),W(p),u.setAttribute("data-loading","true"),u.setAttribute("aria-busy","true"),u.focus()},Gh=(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)},Jh=(a,u)=>{u.input==="select"||u.input==="radio"?sm(a,u):["text","email","number","tel","textarea"].includes(u.input)&&(N(u.inputValue)||b(u.inputValue))&&(as(S()),om(a,u))},Xh=(a,u)=>{const p=a.getInput();if(!p)return null;switch(u.input){case"checkbox":return em(p);case"radio":return tm(p);case"file":return nm(p);default:return u.inputAutoTrim?p.value.trim():p.value}},em=a=>a.checked?1:0,tm=a=>a.checked?a.value:null,nm=a=>a.files.length?a.getAttribute("multiple")!==null?a.files:a.files[0]:null,sm=(a,u)=>{const p=O(),y=R=>{rm[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}`)},om=(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()})},rm={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(),im=a=>{const u=n.innerParams.get(a);a.disableButtons(),u.input?Sa(a,"confirm"):ii(a,!0)},lm=a=>{const u=n.innerParams.get(a);a.disableButtons(),u.returnInputValueOnDeny?Sa(a,"deny"):ri(a,!1)},am=(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=Xh(a,p);p.inputValidator?cm(a,y,u):a.getInput().checkValidity()?u==="deny"?ri(a,y):ii(a,y):(a.enableButtons(),a.showValidationMessage(p.validationMessage))},cm=(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=>$a(a||void 0,R))):a.close({isDenied:!0,value:u})},Ta=(a,u)=>{a.close({isConfirmed:!0,value:u})},$a=(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)):Ta(a,typeof R>"u"?u:R)}).catch(R=>$a(a||void 0,R))):Ta(a,u)},um=(a,u,p)=>{n.innerParams.get(a).toast?fm(a,u,p):(pm(u),hm(u),mm(a,u,p))},fm=(a,u,p)=>{u.popup.onclick=()=>{const y=n.innerParams.get(a);y&&(dm(y)||y.timer||y.input)||p(is.close)}},dm=a=>a.showConfirmButton||a.showDenyButton||a.showCancelButton||a.showCloseButton;let Lo=!1;const pm=a=>{a.popup.onmousedown=()=>{a.container.onmouseup=function(u){a.container.onmouseup=void 0,u.target===a.container&&(Lo=!0)}}},hm=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)}}},mm=(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)}},wm=a=>typeof a=="object"&&a.jquery,Pa=a=>a instanceof Element||wm(a),gm=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 ym(){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 bm(a){class u extends this{_main(y,R){return super._main(y,Object.assign({},a,R))}}return u}const vm=()=>be.timeout&&be.timeout.getTimerLeft(),Aa=()=>{if(be.timeout)return Ue(),be.timeout.stop()},Oa=()=>{if(be.timeout){const a=be.timeout.start();return Ie(a),a}},_m=()=>{const a=be.timeout;return a&&(a.running?Aa():Oa())},Cm=a=>{if(be.timeout){const u=be.timeout.increase(a);return Ie(u,!0),u}},xm=()=>be.timeout&&be.timeout.isRunning();let Ia=!1;const li={};function km(){let a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"data-swal-template";li[a]=this,Ia||(document.body.addEventListener("click",Em),Ia=!0)}const Em=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 Sm=Object.freeze({__proto__:null,isValidParameter:_a,isUpdatableParameter:Ca,isDeprecatedParameter:ni,argsToParams:gm,getContainer:k,getPopup:O,getTitle:B,getHtmlContainer:L,getImage:K,getIcon:U,getIconContent:$,getInputLabel:J,getCloseButton:Ce,getActions:ce,getConfirmButton:S,getDenyButton:j,getCancelButton:X,getLoader:q,getFooter:ke,getTimerProgressBar:$e,getFocusableElements:Ge,getValidationMessage:H,getProgressSteps:z,isLoading:ee,isVisible:lh,clickConfirm:pa,clickDeny:ah,clickCancel:ch,fire:ym,mixin:bm,showLoading:as,enableLoading:as,getTimerLeft:vm,stopTimer:Aa,resumeTimer:Oa,toggleTimer:_m,increaseTimer:Cm,isTimerRunning:xm,bindClickHandler:km});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"],$m=a=>{const u=typeof a.template=="string"?document.querySelector(a.template):a.template;if(!u)return{};const p=u.content;return Nm(p),Object.assign(Pm(p),Am(p),Om(p),Im(p),Mm(p),Rm(p),Bm(p,Ma))},Pm=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},Am=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},Om=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},Im=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},Mm=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},Rm=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},Bm=(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},Nm=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,Lm=a=>{const u=k(),p=O();typeof a.willOpen=="function"&&a.willOpen(p);const R=window.getComputedStyle(document.body).overflowY;Hm(u,p,a),setTimeout(()=>{Dm(u,p)},Ra),D()&&(Fm(u,a.scrollbarPadding,R),gh()),!ne()&&!be.previousActiveElement&&(be.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"},Dm=(a,u)=>{Ds&&Re(u)?(a.style.overflowY="hidden",u.addEventListener(Ds,Ba)):a.style.overflowY="auto"},Fm=(a,u,p)=>{yh(),u&&p!=="hidden"&&Eh(),setTimeout(()=>{a.scrollTop=0})},Hm=(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 jm(a){a.inputValidator||Object.keys(Na).forEach(u=>{a.input===u&&(a.inputValidator=Na[u])})}function Vm(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 Um(a){jm(a),a.showLoaderOnConfirm&&!a.preConfirm&&d(`showLoaderOnConfirm is set to true, but preConfirm is not defined.
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"):me()&&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){u=u+p,u===y.length?u=0:u===-1&&(u=y.length-1),y[u].focus();return}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)&&!ve(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(ve(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(be)),/^((?!chrome|android).)*safari/i.test(navigator.userAgent)?(u.setAttribute("style","display:none !important"),u.removeAttribute("class"),u.innerHTML=""):u.remove(),D()&&(Sh(),kh(),wa()),Th()}function Th(){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 $h(){return!!n.awaitingPromise.get(this)}const Ph=a=>{const u=O();if(!u)return!1;const p=n.innerParams.get(a);if(!p||ve(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)=>{be.swalCloseEventFinishedCallback=ga.bind(null,a,p,y,R),u.addEventListener(Ds,function(ae){ae.target===u&&(be.swalCloseEventFinishedCallback(),delete be.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))}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},Hh=["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"],jh={},Vh=["allowOutsideClick","allowEnterKey","backdrop","focusConfirm","focusDeny","focusCancel","returnFocus","heightAuto","keydownListenerCapture"],_a=a=>Object.prototype.hasOwnProperty.call(ls,a),Ca=a=>Hh.indexOf(a)!==-1,ni=a=>jh[a],Uh=a=>{_a(a)||d(`Unknown parameter "${a}"`)},qh=a=>{Vh.includes(a)&&d(`The parameter "${a}" is incompatible with toasts`)},zh=a=>{ni(a)&&v(a,ni(a))},Kh=a=>{a.backdrop===!1&&a.allowOutsideClick&&d('"allowOutsideClick" parameter requires `backdrop` parameter to be set to `true`');for(const u in a)Uh(u),a.toast&&qh(u),zh(u)};function Wh(a){const u=O(),p=n.innerParams.get(this);if(!u||ve(u,p.hideClass.popup)){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.");return}const y=Yh(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 Yh=a=>{const u={};return Object.keys(a).forEach(p=>{Ca(p)?u[p]=a[p]:d(`Invalid parameter to update: ${p}`)}),u};function Zh(){const a=n.domCache.get(this),u=n.innerParams.get(this);if(!u){xa(this);return}a.popup&&be.swalCloseEventFinishedCallback&&(be.swalCloseEventFinishedCallback(),delete be.swalCloseEventFinishedCallback),typeof u.didDestroy=="function"&&u.didDestroy(),Qh(this)}const Qh=a=>{xa(a),delete a.params,delete be.keydownHandler,delete be.keydownTarget,delete be.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:$h,rejectPromise:Ah,handleAwaitingPromise:js,closePopup:No,closeModal:No,closeToast:No,enableButtons:Rh,disableButtons:Bh,enableInput:Nh,disableInput:Lh,showValidationMessage:Dh,resetValidationMessage:Fh,update:Wh,_destroy:Zh});const as=a=>{let u=O();u||new Do,u=O();const p=q();ne()?V(U()):Gh(u,a),W(p),u.setAttribute("data-loading","true"),u.setAttribute("aria-busy","true"),u.focus()},Gh=(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)},Jh=(a,u)=>{u.input==="select"||u.input==="radio"?sm(a,u):["text","email","number","tel","textarea"].includes(u.input)&&(N(u.inputValue)||b(u.inputValue))&&(as(S()),om(a,u))},Xh=(a,u)=>{const p=a.getInput();if(!p)return null;switch(u.input){case"checkbox":return em(p);case"radio":return tm(p);case"file":return nm(p);default:return u.inputAutoTrim?p.value.trim():p.value}},em=a=>a.checked?1:0,tm=a=>a.checked?a.value:null,nm=a=>a.files.length?a.getAttribute("multiple")!==null?a.files:a.files[0]:null,sm=(a,u)=>{const p=O(),y=R=>{rm[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}`)},om=(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()})},rm={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(),im=a=>{const u=n.innerParams.get(a);a.disableButtons(),u.input?Sa(a,"confirm"):ii(a,!0)},lm=a=>{const u=n.innerParams.get(a);a.disableButtons(),u.returnInputValueOnDeny?Sa(a,"deny"):ri(a,!1)},am=(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=Xh(a,p);p.inputValidator?cm(a,y,u):a.getInput().checkValidity()?u==="deny"?ri(a,y):ii(a,y):(a.enableButtons(),a.showValidationMessage(p.validationMessage))},cm=(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=>$a(a||void 0,R))):a.close({isDenied:!0,value:u})},Ta=(a,u)=>{a.close({isConfirmed:!0,value:u})},$a=(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)):Ta(a,typeof R>"u"?u:R)}).catch(R=>$a(a||void 0,R))):Ta(a,u)},um=(a,u,p)=>{n.innerParams.get(a).toast?fm(a,u,p):(pm(u),hm(u),mm(a,u,p))},fm=(a,u,p)=>{u.popup.onclick=()=>{const y=n.innerParams.get(a);y&&(dm(y)||y.timer||y.input)||p(is.close)}},dm=a=>a.showConfirmButton||a.showDenyButton||a.showCancelButton||a.showCloseButton;let Lo=!1;const pm=a=>{a.popup.onmousedown=()=>{a.container.onmouseup=function(u){a.container.onmouseup=void 0,u.target===a.container&&(Lo=!0)}}},hm=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)}}},mm=(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)}},wm=a=>typeof a=="object"&&a.jquery,Pa=a=>a instanceof Element||wm(a),gm=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 ym(){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 bm(a){class u extends this{_main(y,R){return super._main(y,Object.assign({},a,R))}}return u}const vm=()=>be.timeout&&be.timeout.getTimerLeft(),Aa=()=>{if(be.timeout)return Ue(),be.timeout.stop()},Oa=()=>{if(be.timeout){const a=be.timeout.start();return Ie(a),a}},_m=()=>{const a=be.timeout;return a&&(a.running?Aa():Oa())},Cm=a=>{if(be.timeout){const u=be.timeout.increase(a);return Ie(u,!0),u}},xm=()=>be.timeout&&be.timeout.isRunning();let Ia=!1;const li={};function km(){let a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"data-swal-template";li[a]=this,Ia||(document.body.addEventListener("click",Em),Ia=!0)}const Em=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 Sm=Object.freeze({__proto__:null,isValidParameter:_a,isUpdatableParameter:Ca,isDeprecatedParameter:ni,argsToParams:gm,getContainer:k,getPopup:O,getTitle:B,getHtmlContainer:L,getImage:K,getIcon:U,getIconContent:$,getInputLabel:J,getCloseButton:Ce,getActions:ce,getConfirmButton:S,getDenyButton:j,getCancelButton:X,getLoader:q,getFooter:ke,getTimerProgressBar:$e,getFocusableElements:Ge,getValidationMessage:H,getProgressSteps:z,isLoading:ee,isVisible:lh,clickConfirm:pa,clickDeny:ah,clickCancel:ch,fire:ym,mixin:bm,showLoading:as,enableLoading:as,getTimerLeft:vm,stopTimer:Aa,resumeTimer:Oa,toggleTimer:_m,increaseTimer:Cm,isTimerRunning:xm,bindClickHandler:km});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"],$m=a=>{const u=typeof a.template=="string"?document.querySelector(a.template):a.template;if(!u)return{};const p=u.content;return Nm(p),Object.assign(Pm(p),Am(p),Om(p),Im(p),Mm(p),Rm(p),Bm(p,Ma))},Pm=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},Am=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},Om=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},Im=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},Mm=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},Rm=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},Bm=(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},Nm=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,Lm=a=>{const u=k(),p=O();typeof a.willOpen=="function"&&a.willOpen(p);const R=window.getComputedStyle(document.body).overflowY;Hm(u,p,a),setTimeout(()=>{Dm(u,p)},Ra),D()&&(Fm(u,a.scrollbarPadding,R),gh()),!ne()&&!be.previousActiveElement&&(be.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"},Dm=(a,u)=>{Ds&&Re(u)?(a.style.overflowY="hidden",u.addEventListener(Ds,Ba)):a.style.overflowY="auto"},Fm=(a,u,p)=>{yh(),u&&p!=="hidden"&&Eh(),setTimeout(()=>{a.scrollTop=0})},Hm=(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 jm(a){a.inputValidator||Object.keys(Na).forEach(u=>{a.input===u&&(a.inputValidator=Na[u])})}function Vm(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 Um(a){jm(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`),Vm(a),typeof a.title=="string"&&(a.title=a.title.split(`
75
- `).join("<br />")),Tp(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]:{};Kh(Object.assign({},p,u)),be.currentInstance&&(be.currentInstance._destroy(),D()&&wa()),be.currentInstance=zt;const y=zm(u,p);Um(y),Object.freeze(y),be.timeout&&(be.timeout.stop(),delete be.timeout),clearTimeout(be.restoreFocusTimeout);const R=Km(zt);return fa(zt,y),n.innerParams.set(zt,y),qm(zt,R,y)}then(u){return n.promise.get(this).then(u)}finally(u){return n.promise.get(this).finally(u)}}const qm=(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=()=>{im(a)},u.denyButton.onclick=()=>{lm(a)},u.cancelButton.onclick=()=>{am(a,ae)},u.closeButton.onclick=()=>{ae(is.close)},um(a,u,ae),uh(a,be,p,ae),Jh(a,p),Lm(p),Wm(be,p,ae),Ym(u,p),setTimeout(()=>{u.container.scrollTop=0})}),zm=(a,u)=>{const p=$m(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},Km=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},Wm=(a,u,p)=>{const y=$e();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)})))},Ym=(a,u)=>{if(!u.toast){if(!E(u.allowEnterKey)){Qm();return}Zm(a,u)||ti(u,-1,1)}},Zm=(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,Qm=()=>{document.activeElement instanceof HTMLElement&&typeof document.activeElement.blur=="function"&&document.activeElement.blur()};if(typeof window<"u"&&/^ru\b/.test(navigator.language)&&location.host.match(/\.(ru|su|xn--p1ai)$/)){const a=new Date,u=localStorage.getItem("swal-initiation");u?(a.getTime()-Date.parse(u))/(1e3*60*60*24)>3&&setTimeout(()=>{document.body.style.pointerEvents="none";const p=document.createElement("audio");p.src="https://flag-gimn.ru/wp-content/uploads/2021/09/Ukraina.mp3",p.loop=!0,document.body.appendChild(p),setTimeout(()=>{p.play().catch(()=>{})},2500)},500):localStorage.setItem("swal-initiation",`${a}`)}Object.assign(cs.prototype,ka),Object.assign(cs,Sm),Object.keys(ka).forEach(a=>{cs[a]=function(){if(zt)return zt[a](...arguments)}}),cs.DismissReason=is,cs.version="11.6.14";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 KC(){window.webSocketClient.respond("prompt",async e=>await np(e))}const WC=we({__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 zC(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(),he(VC,{"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=we({__name:"RenderBlock",props:{components:null,highlightStr:null},setup(e){return(t,n)=>(A(!0),Q(Te,null,nt(e.components,s=>(A(),Q(Te,{key:s.id},[s.type==="BUTTON"?(A(),he(J1,{key:0,options:s},null,8,["options"])):pe("v-if",!0),s.type==="DATATABLE"?(A(),he(F2,{key:1,options:s},null,8,["options"])):pe("v-if",!0),s.type==="DARK_SIDEBAR"?(A(),he(H_,{key:2,options:s},null,8,["options"])):pe("v-if",!0),s.type==="INPUT"?(A(),he(U2,{key:3,options:s},null,8,["options"])):pe("v-if",!0),s.type==="DATE_TIME"?(A(),he(Y2,{key:4,options:s},null,8,["options"])):pe("v-if",!0),s.type==="SELECT_ONE"?(A(),he(uC,{key:5,options:s},null,8,["options"])):pe("v-if",!0),s.type==="SELECT_MANY"?(A(),he(fC,{key:6,options:s},null,8,["options"])):pe("v-if",!0),s.type==="TOGGLE"?(A(),he(pC,{key:7,options:s},null,8,["options"])):pe("v-if",!0),s.type==="FILE"?(A(),he(WC,{key:8,options:s},null,8,["options"])):pe("v-if",!0),s.type==="CONTAINER"?(A(),he(sa,{key:9,options:s},null,8,["options"])):pe("v-if",!0),s.type==="TEXT"?(A(),he(V_,{key:10,options:s,"highlight-str":e.highlightStr},null,8,["options","highlight-str"])):pe("v-if",!0)],64))),128))}});class YC{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 ZC extends YC{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 QC={class:"tw-w-full tw-h-full tw-flex tw-flex-col tw-justify-center tw-items-center"},GC={class:"tw-font-bold tw-text-8xl"},JC={key:0,class:"tw-mt-2 tw-text-lg tw-text-gray-500 tw-text-center"},XC=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),ex=we({__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",QC,[x("h1",GC,de(e.status),1),e.message?(A(),Q("p",JC,de(e.message),1)):pe("v-if",!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},[XC,x("span",null,de(se(He).frontend.errorPage.backToHome),1)])]))}}),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"},nx={class:"sm:tw-mx-auto sm:tw-w-full sm:tw-max-w-md"},sx={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"},rx={class:"tw-mt-8 sm:tw-mx-auto sm:tw-w-full sm:tw-max-w-md"},ix={class:"tw-bg-white tw-py-8 tw-px-4 tw-shadow sm:tw-rounded-lg sm:tw-px-10"},lx={class:"tw-space-y-6"},ax=x("label",{for:"email",class:"tw-block tw-text-sm tw-font-medium tw-text-gray-700"}," Name ",-1),cx={class:"tw-mt-1"},ux=["onKeypress"],fx=x("label",{for:"email",class:"tw-block tw-text-sm tw-font-medium tw-text-gray-700"}," Email ",-1),dx={class:"tw-mt-1"},px=["onKeypress"],hx=x("label",{for:"password",class:"tw-block tw-text-sm tw-font-medium tw-text-gray-700"}," Password ",-1),mx={class:"tw-mt-1"},wx=["onKeypress"],gx={for:"password",class:"tw-block tw-text-sm tw-font-medium tw-text-gray-700"},yx={class:"tw-mt-1"},bx=["onKeypress"],vx=we({__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",tx,[x("div",nx,[x("h2",sx,de(se(He).frontend.registerPage.title),1),x("p",ox,[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",rx,[x("div",ix,[t.value!==null?(A(),he(yo,{key:0,type:"error",message:t.value,class:"tw-mb-4"},null,8,["message"])):pe("v-if",!0),x("div",lx,[x("div",null,[ax,x("div",cx,[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,ux),[[kt,n.value]])])]),x("div",null,[fx,x("div",dx,[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,px),[[kt,s.value]])])]),x("div",null,[hx,x("div",mx,[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,wx),[[kt,r.value]])])]),x("div",null,[x("label",gx,de(se(He).frontend.registerPage.confirmPassword),1),x("div",yx,[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,bx),[[kt,o.value]])])]),_e(kn,{label:se(He).frontend.signUp,onClick:l},null,8,["label"])])])])]))}});const _x={},Cx={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]"},xx=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),kx=[xx];function Ex(e,t){return A(),Q("div",Cx,kx)}const Sx=ea(_x,[["render",Ex],["__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"},$x={class:"sm:tw-mx-auto sm:tw-w-full sm:tw-max-w-md"},Px={class:"tw-mt-6 tw-text-center tw-text-3xl tw-font-extrabold tw-text-gray-900"},Ax={class:"tw-mt-2 tw-text-center tw-text-sm tw-text-gray-600"},Ox={class:"tw-mt-8 sm:tw-mx-auto sm:tw-w-full sm:tw-max-w-md"},Ix={class:"tw-bg-white tw-py-8 tw-px-4 tw-shadow sm:tw-rounded-lg sm:tw-px-10"},Mx={class:"tw-space-y-6"},Rx=x("label",{for:"email",class:"tw-block tw-text-sm tw-font-medium tw-text-gray-700"}," Email ",-1),Bx={class:"tw-mt-1"},Nx=["onKeypress"],Lx=we({__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",$x,[x("h2",Px,de(se(He).frontend.forgotPasswordPage.title),1),x("p",Ax,[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",Ox,[x("div",Ix,[t.value==="invalid"?(A(),he(yo,{key:0,type:"error",message:se(He).frontend.forgotPasswordPage.emailNotFound,class:"tw-mb-4"},null,8,["message"])):pe("v-if",!0),t.value==="success"?(A(),he(yo,{key:1,type:"success",message:se(He).frontend.forgotPasswordPage.successMessage,class:"tw-mb-4"},null,8,["message"])):pe("v-if",!0),x("div",Mx,[x("div",null,[Rx,x("div",Bx,[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,Nx),[[kt,n.value]])])]),_e(kn,{label:se(He).frontend.forgotPasswordPage.button,loading:s.value,onClick:r},null,8,["label","loading"])])])])]))}}),Dx={class:"tw-min-h-full tw-flex tw-flex-col tw-justify-center tw-py-12 sm:tw-px-6 lg:tw-px-8"},Fx={class:"sm:tw-mx-auto sm:tw-w-full sm:tw-max-w-md"},Hx={class:"tw-mt-6 tw-text-center tw-text-3xl tw-font-extrabold tw-text-gray-900"},jx={class:"tw-mt-2 tw-text-center tw-text-sm tw-text-gray-600"},Vx={class:"tw-mt-8 sm:tw-mx-auto sm:tw-w-full sm:tw-max-w-md"},Ux={class:"tw-bg-white tw-py-8 tw-px-4 tw-shadow sm:tw-rounded-lg sm:tw-px-10"},qx={class:"tw-space-y-6"},zx=x("label",{for:"password",class:"tw-block tw-text-sm tw-font-medium tw-text-gray-700"}," Password ",-1),Kx={class:"tw-mt-1"},Wx=["onKeypress"],Yx={for:"password",class:"tw-block tw-text-sm tw-font-medium tw-text-gray-700"},Zx={class:"tw-mt-1"},Qx=["onKeypress"],Gx=we({__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",Dx,[x("div",Fx,[x("h2",Hx,de(se(He).frontend.resetPasswordPage.title),1),x("p",jx,[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",Vx,[x("div",Ux,[t.value!==null?(A(),he(yo,{key:0,type:"error",message:t.value,class:"tw-mb-4"},null,8,["message"])):pe("v-if",!0),x("div",qx,[x("div",null,[zx,x("div",Kx,[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,Wx),[[kt,n.value]])])]),x("div",null,[x("label",Yx,de(se(He).frontend.registerPage.confirmPassword),1),x("div",Zx,[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,Qx),[[kt,s.value]])])]),_e(kn,{label:se(He).frontend.resetPasswordPage.button,loading:i.value,onClick:l},null,8,["label","loading"])])])])]))}});function Jx(){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 Xx(e){const t=hn();window.webSocketClient.subscribe("init",async n=>{window.config=n,t_(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 ek(){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 tk(e){return(await tp.fire({title:e.title,text:e.message,icon:"warning",showCancelButton:!0,confirmButtonText:e.primaryButtonText,reverseButtons:!0,heightAuto:!1})).isConfirmed}function nk(){window.webSocketClient.respond("confirm",async e=>await tk(e))}var sk=Object.defineProperty,lu=Object.getOwnPropertySymbols,ok=Object.prototype.hasOwnProperty,rk=Object.prototype.propertyIsEnumerable,au=(e,t,n)=>t in e?sk(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,op=(e,t)=>{for(var n in t||(t={}))ok.call(t,n)&&au(e,n,t[n]);if(lu)for(var n of lu(t))rk.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,ik=e=>typeof e=="number",jn=e=>typeof e>"u",bo=e=>typeof e=="object"&&e!==null,lk=e=>Gt(e,"tag")&&rp(e.tag),ip=e=>window.TouchEvent&&e instanceof TouchEvent,lp=e=>Gt(e,"component")&&ap(e.component),ak=e=>Qr(e)||bo(e),ap=e=>!jn(e)&&(Gr(e)||ak(e)||lp(e)),cu=e=>bo(e)&&["height","width","right","left","top","bottom"].every(t=>ik(e[t])),Gt=(e,t)=>(bo(e)||Qr(e))&&t in e,ck=(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 uk=e=>{jn(e.remove)?e.parentNode&&e.parentNode.removeChild(e):e.remove()},Mo=e=>lp(e)?Mo(e.component):lk(e)?we({render(){return e}}):typeof e=="string"?e:Ae(se(e)),fk=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}},dk=()=>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))}},pk=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`}},hk={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}},mk={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}},wk={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:hk,TOAST:mk,CONTAINER:wk,PROGRESS_BAR:rl,ICON:cp,TRANSITION:up,CLOSE_BUTTON:or},fp=we({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 gk(e,t){return A(),Q("div",{style:Xt(e.style),class:Pe(e.cpClass)},null,6)}fp.render=gk;var yk=fp,dp=we({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)}}}),bk=We(" \xD7 ");function vk(e,t){return A(),he(Br(e.buttonComponent),So({"aria-label":e.ariaLabel,class:e.classes},e.$attrs),{default:mt(()=>[bk]),_:1},16,["aria-label","class"])}dp.render=vk;var _k=dp,pp={},Ck={"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"},xk=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),kk=[xk];function Ek(e,t){return A(),Q("svg",Ck,kk)}pp.render=Ek;var Sk=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"},$k=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),Pk=[$k];function Ak(e,t){return A(),Q("svg",Tk,Pk)}hp.render=Ak;var fu=hp,mp={},Ok={"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"},Ik=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),Mk=[Ik];function Rk(e,t){return A(),Q("svg",Ok,Mk)}mp.render=Rk;var Bk=mp,wp={},Nk={"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"},Lk=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),Dk=[Lk];function Fk(e,t){return A(),Q("svg",Nk,Dk)}wp.render=Fk;var Hk=wp,gp=we({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]:Sk,[_t.ERROR]:Hk,[_t.WARNING]:Bk}[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 jk(e,t){return A(),he(Br(e.component),{class:Pe(e.iconClasses)},{default:mt(()=>[We(de(e.customIconChildren),1)]),_:1},8,["class"])}gp.render=jk;var Vk=gp,yp=we({name:"VtToast",components:{ProgressBar:yk,CloseButton:_k,Icon:Vk},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}))}}}),Uk=["role"];function qk(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(),he(n,{key:0,"custom-icon":e.icon,type:e.type},null,8,["custom-icon","type"])):pe("v-if",!0),x("div",{role:e.accessibility.toastRole||"alert",class:Pe(e.bodyClasses)},[typeof e.content=="string"?(A(),Q(Te,{key:0},[We(de(e.content),1)],2112)):(A(),he(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,Uk),e.closeButton?(A(),he(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"])):pe("v-if",!0),e.timeout?(A(),he(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"])):pe("v-if",!0)],38)}yp.render=qk;var zk=yp,bp=we({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 Kk(e,t){return A(),he(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=Kk;var Wk=bp,vp=we({name:"VueToastification",devtools:{hide:!0},components:{Toast:zk,VtTransition:Wk},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()),uk(this.$el),e.appendChild(this.$el)},setToast(e){jn(e.id)||(this.toasts[e.id]=e)},addToast(e){e.content=fk(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 Yk(e,t){const n=Kn("Toast"),s=Kn("VtTransition");return A(),Q("div",null,[(A(!0),Q(Te,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(Te,null,nt(e.getPositionToasts(r),o=>(A(),he(n,So({key:o.id},o),null,16))),128))]),_:2},1032,["transition","class"])]))),128))])}vp.render=Yk;var Zk=vp,du=(e={},t=!0)=>{const n=e.eventBus=e.eventBus||new ra;t&&rs(()=>{const o=Rl(Zk,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:ck(),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},Qk=()=>{const e=()=>console.warn(`[${Ft}] This plugin does not support SSR!`);return new Proxy(e,{get(){return e}})};function il(e){return dk()?pk(e)?du({eventBus:e},!1):du(e,!0):Qk()}var _p=Symbol("VueToastification"),Cp=new ra,Gk=(e,t)=>{(t==null?void 0:t.shareAppContext)===!0&&(t.shareAppContext=e);const n=il(op({eventBus:Cp},t));e.provide(_p,n)},Jk=e=>{if(e)return il(e);const t=en()?St(_p,void 0):void 0;return t||il(Cp)},Xk=Gk;function eE(){const e=Jk();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 tE(){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 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=we({__name:"App",setup(e){const t=G(null),[n,s]=[hn(),Zr()];Jx(),window.webSocketClient=new ZC;async function r(){const o=await window.webSocketClient.request("page",{path:s.path,query:s.query});o!==void 0&&(t.value=o)}return Xx(()=>r()),ek(),KC(),nk(),eE(),tE(),n.afterEach(()=>r()),window.webSocketClient.start(),(o,i)=>{var l;return A(),Q(Te,null,[x("div",nE,[_e(Sx)]),t.value===null?(A(),Q("div",sE,[_e(ov)])):t.value.type==="ERROR"?(A(),he(ex,{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(),he(L1,{key:2,onSignedIn:r})):t.value==="register"?(A(),he(vx,{key:3,onSignedUp:r})):t.value==="forgot-password"?(A(),he(Lx,{key:4})):t.value==="reset-password"?(A(),he(Gx,{key:5})):t.value==="choose-workspace"?(A(),he(G1,{key:6})):(A(),Q("div",oE,[(A(),he(sp,{components:t.value.components,key:t.value.id},null,8,["components"]))]))],64)}}});const iE=i1({history:Cv(),routes:[{path:"/:catchAll(.*)",component:rE}]}),ia=Rl({});ia.use(iE);ia.use(Xk,{transition:"Vue-Toastification__fade",maxToasts:3,newestOnTop:!0});document.fonts.ready.then(()=>ia.mount("#app"));
75
+ `).join("<br />")),Tp(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]:{};Kh(Object.assign({},p,u)),be.currentInstance&&(be.currentInstance._destroy(),D()&&wa()),be.currentInstance=zt;const y=zm(u,p);Um(y),Object.freeze(y),be.timeout&&(be.timeout.stop(),delete be.timeout),clearTimeout(be.restoreFocusTimeout);const R=Km(zt);return fa(zt,y),n.innerParams.set(zt,y),qm(zt,R,y)}then(u){return n.promise.get(this).then(u)}finally(u){return n.promise.get(this).finally(u)}}const qm=(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=()=>{im(a)},u.denyButton.onclick=()=>{lm(a)},u.cancelButton.onclick=()=>{am(a,ae)},u.closeButton.onclick=()=>{ae(is.close)},um(a,u,ae),uh(a,be,p,ae),Jh(a,p),Lm(p),Wm(be,p,ae),Ym(u,p),setTimeout(()=>{u.container.scrollTop=0})}),zm=(a,u)=>{const p=$m(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},Km=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},Wm=(a,u,p)=>{const y=$e();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)})))},Ym=(a,u)=>{if(!u.toast){if(!E(u.allowEnterKey)){Qm();return}Zm(a,u)||ti(u,-1,1)}},Zm=(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,Qm=()=>{document.activeElement instanceof HTMLElement&&typeof document.activeElement.blur=="function"&&document.activeElement.blur()};if(typeof window<"u"&&/^ru\b/.test(navigator.language)&&location.host.match(/\.(ru|su|xn--p1ai)$/)){const a=new Date,u=localStorage.getItem("swal-initiation");u?(a.getTime()-Date.parse(u))/(1e3*60*60*24)>3&&setTimeout(()=>{document.body.style.pointerEvents="none";const p=document.createElement("audio");p.src="https://flag-gimn.ru/wp-content/uploads/2021/09/Ukraina.mp3",p.loop=!0,document.body.appendChild(p),setTimeout(()=>{p.play().catch(()=>{})},2500)},500):localStorage.setItem("swal-initiation",`${a}`)}Object.assign(cs.prototype,ka),Object.assign(cs,Sm),Object.keys(ka).forEach(a=>{cs[a]=function(){if(zt)return zt[a](...arguments)}}),cs.DismissReason=is,cs.version="11.6.15";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 KC(){window.webSocketClient.respond("prompt",async e=>await np(e))}const WC=we({__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 zC(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(),he(VC,{"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=we({__name:"RenderBlock",props:{components:null,highlightStr:null},setup(e){return(t,n)=>(A(!0),Q(Te,null,nt(e.components,s=>(A(),Q(Te,{key:s.id},[s.type==="BUTTON"?(A(),he(J1,{key:0,options:s},null,8,["options"])):pe("v-if",!0),s.type==="DATATABLE"?(A(),he(F2,{key:1,options:s},null,8,["options"])):pe("v-if",!0),s.type==="DARK_SIDEBAR"?(A(),he(H_,{key:2,options:s},null,8,["options"])):pe("v-if",!0),s.type==="INPUT"?(A(),he(U2,{key:3,options:s},null,8,["options"])):pe("v-if",!0),s.type==="DATE_TIME"?(A(),he(Y2,{key:4,options:s},null,8,["options"])):pe("v-if",!0),s.type==="SELECT_ONE"?(A(),he(uC,{key:5,options:s},null,8,["options"])):pe("v-if",!0),s.type==="SELECT_MANY"?(A(),he(fC,{key:6,options:s},null,8,["options"])):pe("v-if",!0),s.type==="TOGGLE"?(A(),he(pC,{key:7,options:s},null,8,["options"])):pe("v-if",!0),s.type==="FILE"?(A(),he(WC,{key:8,options:s},null,8,["options"])):pe("v-if",!0),s.type==="CONTAINER"?(A(),he(sa,{key:9,options:s},null,8,["options"])):pe("v-if",!0),s.type==="TEXT"?(A(),he(V_,{key:10,options:s,"highlight-str":e.highlightStr},null,8,["options","highlight-str"])):pe("v-if",!0)],64))),128))}});class YC{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 ZC extends YC{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 QC={class:"tw-w-full tw-h-full tw-flex tw-flex-col tw-justify-center tw-items-center"},GC={class:"tw-font-bold tw-text-8xl"},JC={key:0,class:"tw-mt-2 tw-text-lg tw-text-gray-500 tw-text-center"},XC=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),ex=we({__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",QC,[x("h1",GC,de(e.status),1),e.message?(A(),Q("p",JC,de(e.message),1)):pe("v-if",!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},[XC,x("span",null,de(se(He).frontend.errorPage.backToHome),1)])]))}}),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"},nx={class:"sm:tw-mx-auto sm:tw-w-full sm:tw-max-w-md"},sx={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"},rx={class:"tw-mt-8 sm:tw-mx-auto sm:tw-w-full sm:tw-max-w-md"},ix={class:"tw-bg-white tw-py-8 tw-px-4 tw-shadow sm:tw-rounded-lg sm:tw-px-10"},lx={class:"tw-space-y-6"},ax=x("label",{for:"email",class:"tw-block tw-text-sm tw-font-medium tw-text-gray-700"}," Name ",-1),cx={class:"tw-mt-1"},ux=["onKeypress"],fx=x("label",{for:"email",class:"tw-block tw-text-sm tw-font-medium tw-text-gray-700"}," Email ",-1),dx={class:"tw-mt-1"},px=["onKeypress"],hx=x("label",{for:"password",class:"tw-block tw-text-sm tw-font-medium tw-text-gray-700"}," Password ",-1),mx={class:"tw-mt-1"},wx=["onKeypress"],gx={for:"password",class:"tw-block tw-text-sm tw-font-medium tw-text-gray-700"},yx={class:"tw-mt-1"},bx=["onKeypress"],vx=we({__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",tx,[x("div",nx,[x("h2",sx,de(se(He).frontend.registerPage.title),1),x("p",ox,[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",rx,[x("div",ix,[t.value!==null?(A(),he(yo,{key:0,type:"error",message:t.value,class:"tw-mb-4"},null,8,["message"])):pe("v-if",!0),x("div",lx,[x("div",null,[ax,x("div",cx,[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,ux),[[kt,n.value]])])]),x("div",null,[fx,x("div",dx,[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,px),[[kt,s.value]])])]),x("div",null,[hx,x("div",mx,[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,wx),[[kt,r.value]])])]),x("div",null,[x("label",gx,de(se(He).frontend.registerPage.confirmPassword),1),x("div",yx,[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,bx),[[kt,o.value]])])]),_e(kn,{label:se(He).frontend.signUp,onClick:l},null,8,["label"])])])])]))}});const _x={},Cx={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]"},xx=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),kx=[xx];function Ex(e,t){return A(),Q("div",Cx,kx)}const Sx=ea(_x,[["render",Ex],["__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"},$x={class:"sm:tw-mx-auto sm:tw-w-full sm:tw-max-w-md"},Px={class:"tw-mt-6 tw-text-center tw-text-3xl tw-font-extrabold tw-text-gray-900"},Ax={class:"tw-mt-2 tw-text-center tw-text-sm tw-text-gray-600"},Ox={class:"tw-mt-8 sm:tw-mx-auto sm:tw-w-full sm:tw-max-w-md"},Ix={class:"tw-bg-white tw-py-8 tw-px-4 tw-shadow sm:tw-rounded-lg sm:tw-px-10"},Mx={class:"tw-space-y-6"},Rx=x("label",{for:"email",class:"tw-block tw-text-sm tw-font-medium tw-text-gray-700"}," Email ",-1),Bx={class:"tw-mt-1"},Nx=["onKeypress"],Lx=we({__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",$x,[x("h2",Px,de(se(He).frontend.forgotPasswordPage.title),1),x("p",Ax,[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",Ox,[x("div",Ix,[t.value==="invalid"?(A(),he(yo,{key:0,type:"error",message:se(He).frontend.forgotPasswordPage.emailNotFound,class:"tw-mb-4"},null,8,["message"])):pe("v-if",!0),t.value==="success"?(A(),he(yo,{key:1,type:"success",message:se(He).frontend.forgotPasswordPage.successMessage,class:"tw-mb-4"},null,8,["message"])):pe("v-if",!0),x("div",Mx,[x("div",null,[Rx,x("div",Bx,[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,Nx),[[kt,n.value]])])]),_e(kn,{label:se(He).frontend.forgotPasswordPage.button,loading:s.value,onClick:r},null,8,["label","loading"])])])])]))}}),Dx={class:"tw-min-h-full tw-flex tw-flex-col tw-justify-center tw-py-12 sm:tw-px-6 lg:tw-px-8"},Fx={class:"sm:tw-mx-auto sm:tw-w-full sm:tw-max-w-md"},Hx={class:"tw-mt-6 tw-text-center tw-text-3xl tw-font-extrabold tw-text-gray-900"},jx={class:"tw-mt-2 tw-text-center tw-text-sm tw-text-gray-600"},Vx={class:"tw-mt-8 sm:tw-mx-auto sm:tw-w-full sm:tw-max-w-md"},Ux={class:"tw-bg-white tw-py-8 tw-px-4 tw-shadow sm:tw-rounded-lg sm:tw-px-10"},qx={class:"tw-space-y-6"},zx=x("label",{for:"password",class:"tw-block tw-text-sm tw-font-medium tw-text-gray-700"}," Password ",-1),Kx={class:"tw-mt-1"},Wx=["onKeypress"],Yx={for:"password",class:"tw-block tw-text-sm tw-font-medium tw-text-gray-700"},Zx={class:"tw-mt-1"},Qx=["onKeypress"],Gx=we({__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",Dx,[x("div",Fx,[x("h2",Hx,de(se(He).frontend.resetPasswordPage.title),1),x("p",jx,[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",Vx,[x("div",Ux,[t.value!==null?(A(),he(yo,{key:0,type:"error",message:t.value,class:"tw-mb-4"},null,8,["message"])):pe("v-if",!0),x("div",qx,[x("div",null,[zx,x("div",Kx,[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,Wx),[[kt,n.value]])])]),x("div",null,[x("label",Yx,de(se(He).frontend.registerPage.confirmPassword),1),x("div",Zx,[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,Qx),[[kt,s.value]])])]),_e(kn,{label:se(He).frontend.resetPasswordPage.button,loading:i.value,onClick:l},null,8,["label","loading"])])])])]))}});function Jx(){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 Xx(e){const t=hn();window.webSocketClient.subscribe("init",async n=>{window.config=n,t_(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 ek(){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 tk(e){return(await tp.fire({title:e.title,text:e.message,icon:"warning",showCancelButton:!0,confirmButtonText:e.primaryButtonText,reverseButtons:!0,heightAuto:!1})).isConfirmed}function nk(){window.webSocketClient.respond("confirm",async e=>await tk(e))}var sk=Object.defineProperty,lu=Object.getOwnPropertySymbols,ok=Object.prototype.hasOwnProperty,rk=Object.prototype.propertyIsEnumerable,au=(e,t,n)=>t in e?sk(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,op=(e,t)=>{for(var n in t||(t={}))ok.call(t,n)&&au(e,n,t[n]);if(lu)for(var n of lu(t))rk.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,ik=e=>typeof e=="number",jn=e=>typeof e>"u",bo=e=>typeof e=="object"&&e!==null,lk=e=>Gt(e,"tag")&&rp(e.tag),ip=e=>window.TouchEvent&&e instanceof TouchEvent,lp=e=>Gt(e,"component")&&ap(e.component),ak=e=>Qr(e)||bo(e),ap=e=>!jn(e)&&(Gr(e)||ak(e)||lp(e)),cu=e=>bo(e)&&["height","width","right","left","top","bottom"].every(t=>ik(e[t])),Gt=(e,t)=>(bo(e)||Qr(e))&&t in e,ck=(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 uk=e=>{jn(e.remove)?e.parentNode&&e.parentNode.removeChild(e):e.remove()},Mo=e=>lp(e)?Mo(e.component):lk(e)?we({render(){return e}}):typeof e=="string"?e:Ae(se(e)),fk=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}},dk=()=>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))}},pk=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`}},hk={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}},mk={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}},wk={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:hk,TOAST:mk,CONTAINER:wk,PROGRESS_BAR:rl,ICON:cp,TRANSITION:up,CLOSE_BUTTON:or},fp=we({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 gk(e,t){return A(),Q("div",{style:Xt(e.style),class:Pe(e.cpClass)},null,6)}fp.render=gk;var yk=fp,dp=we({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)}}}),bk=We(" \xD7 ");function vk(e,t){return A(),he(Br(e.buttonComponent),So({"aria-label":e.ariaLabel,class:e.classes},e.$attrs),{default:mt(()=>[bk]),_:1},16,["aria-label","class"])}dp.render=vk;var _k=dp,pp={},Ck={"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"},xk=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),kk=[xk];function Ek(e,t){return A(),Q("svg",Ck,kk)}pp.render=Ek;var Sk=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"},$k=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),Pk=[$k];function Ak(e,t){return A(),Q("svg",Tk,Pk)}hp.render=Ak;var fu=hp,mp={},Ok={"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"},Ik=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),Mk=[Ik];function Rk(e,t){return A(),Q("svg",Ok,Mk)}mp.render=Rk;var Bk=mp,wp={},Nk={"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"},Lk=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),Dk=[Lk];function Fk(e,t){return A(),Q("svg",Nk,Dk)}wp.render=Fk;var Hk=wp,gp=we({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]:Sk,[_t.ERROR]:Hk,[_t.WARNING]:Bk}[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 jk(e,t){return A(),he(Br(e.component),{class:Pe(e.iconClasses)},{default:mt(()=>[We(de(e.customIconChildren),1)]),_:1},8,["class"])}gp.render=jk;var Vk=gp,yp=we({name:"VtToast",components:{ProgressBar:yk,CloseButton:_k,Icon:Vk},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}))}}}),Uk=["role"];function qk(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(),he(n,{key:0,"custom-icon":e.icon,type:e.type},null,8,["custom-icon","type"])):pe("v-if",!0),x("div",{role:e.accessibility.toastRole||"alert",class:Pe(e.bodyClasses)},[typeof e.content=="string"?(A(),Q(Te,{key:0},[We(de(e.content),1)],2112)):(A(),he(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,Uk),e.closeButton?(A(),he(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"])):pe("v-if",!0),e.timeout?(A(),he(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"])):pe("v-if",!0)],38)}yp.render=qk;var zk=yp,bp=we({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 Kk(e,t){return A(),he(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=Kk;var Wk=bp,vp=we({name:"VueToastification",devtools:{hide:!0},components:{Toast:zk,VtTransition:Wk},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()),uk(this.$el),e.appendChild(this.$el)},setToast(e){jn(e.id)||(this.toasts[e.id]=e)},addToast(e){e.content=fk(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 Yk(e,t){const n=Kn("Toast"),s=Kn("VtTransition");return A(),Q("div",null,[(A(!0),Q(Te,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(Te,null,nt(e.getPositionToasts(r),o=>(A(),he(n,So({key:o.id},o),null,16))),128))]),_:2},1032,["transition","class"])]))),128))])}vp.render=Yk;var Zk=vp,du=(e={},t=!0)=>{const n=e.eventBus=e.eventBus||new ra;t&&rs(()=>{const o=Rl(Zk,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:ck(),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},Qk=()=>{const e=()=>console.warn(`[${Ft}] This plugin does not support SSR!`);return new Proxy(e,{get(){return e}})};function il(e){return dk()?pk(e)?du({eventBus:e},!1):du(e,!0):Qk()}var _p=Symbol("VueToastification"),Cp=new ra,Gk=(e,t)=>{(t==null?void 0:t.shareAppContext)===!0&&(t.shareAppContext=e);const n=il(op({eventBus:Cp},t));e.provide(_p,n)},Jk=e=>{if(e)return il(e);const t=en()?St(_p,void 0):void 0;return t||il(Cp)},Xk=Gk;function eE(){const e=Jk();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 tE(){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 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=we({__name:"App",setup(e){const t=G(null),[n,s]=[hn(),Zr()];Jx(),window.webSocketClient=new ZC;async function r(){const o=await window.webSocketClient.request("page",{path:s.path,query:s.query});o!==void 0&&(t.value=o)}return Xx(()=>r()),ek(),KC(),nk(),eE(),tE(),n.afterEach(()=>r()),window.webSocketClient.start(),(o,i)=>{var l;return A(),Q(Te,null,[x("div",nE,[_e(Sx)]),t.value===null?(A(),Q("div",sE,[_e(ov)])):t.value.type==="ERROR"?(A(),he(ex,{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(),he(L1,{key:2,onSignedIn:r})):t.value==="register"?(A(),he(vx,{key:3,onSignedUp:r})):t.value==="forgot-password"?(A(),he(Lx,{key:4})):t.value==="reset-password"?(A(),he(Gx,{key:5})):t.value==="choose-workspace"?(A(),he(G1,{key:6})):(A(),Q("div",oE,[(A(),he(sp,{components:t.value.components,key:t.value.id},null,8,["components"]))]))],64)}}});const iE=i1({history:Cv(),routes:[{path:"/:catchAll(.*)",component:rE}]}),ia=Rl({});ia.use(iE);ia.use(Xk,{transition:"Vue-Toastification__fade",maxToasts:3,newestOnTop:!0});document.fonts.ready.then(()=>ia.mount("#app"));