Current directory: /home/klas4s23/domains/585455.klas4s23.mid-ica.nl/public_html/Gastenboek/uploads
"use strict";(()=>{var tr=Object.defineProperty;var rr=(t,e)=>{for(var r in e)tr(t,r,{get:e[r],enumerable:!0})};function it(t){let e=document.cookie.split("; ");for(let r of e){let[o,n]=r.split("=");if(o===t)return decodeURIComponent(n)}return null}function De(t,e,r={}){let o=`${encodeURIComponent(t)}=${encodeURIComponent(e)}`;if(r.expires){let n=r.expires instanceof Date?r.expires.toUTCString():r.expires;o+=`; expires=${n}`}r.path&&(o+=`; path=${r.path}`),r.domain&&(o+=`; domain=${r.domain}`),r.secure&&(o+="; secure"),document.cookie=o}var C=class{static{this.UserID=null}static{this.SessionToken=null}static getSessionId(){return it("sessionId")}static setSessionId(e,r){De("sessionId",e,{expires:r})}static clearSessionId(){De("sessionId","",{expires:new Date(0)})}static login(e,r){this.setSessionId(e,r)}static logout(){this.clearSessionId()}static isLoggedIn(){let e=this.getSessionId();return e!=null&&e!==""}};function G(t,e){return function(){return t.apply(e,arguments)}}var{toString:or}=Object.prototype,{getPrototypeOf:Ne}=Object,{iterator:ue,toStringTag:lt}=Symbol,fe=(t=>e=>{let r=or.call(e);return t[r]||(t[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),I=t=>(t=t.toLowerCase(),e=>fe(e)===t),de=t=>e=>typeof e===t,{isArray:W}=Array,K=de("undefined");function nr(t){return t!==null&&!K(t)&&t.constructor!==null&&!K(t.constructor)&&O(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}var ct=I("ArrayBuffer");function sr(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&ct(t.buffer),e}var ir=de("string"),O=de("function"),ut=de("number"),pe=t=>t!==null&&typeof t=="object",ar=t=>t===!0||t===!1,ce=t=>{if(fe(t)!=="object")return!1;let e=Ne(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(lt in t)&&!(ue in t)},lr=I("Date"),cr=I("File"),ur=I("Blob"),fr=I("FileList"),dr=t=>pe(t)&&O(t.pipe),pr=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||O(t.append)&&((e=fe(t))==="formdata"||e==="object"&&O(t.toString)&&t.toString()==="[object FormData]"))},mr=I("URLSearchParams"),[hr,br,gr,yr]=["ReadableStream","Request","Response","Headers"].map(I),wr=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function $(t,e,{allOwnKeys:r=!1}={}){if(t===null||typeof t>"u")return;let o,n;if(typeof t!="object"&&(t=[t]),W(t))for(o=0,n=t.length;o<n;o++)e.call(null,t[o],o,t);else{let s=r?Object.getOwnPropertyNames(t):Object.keys(t),i=s.length,l;for(o=0;o<i;o++)l=s[o],e.call(null,t[l],l,t)}}function ft(t,e){e=e.toLowerCase();let r=Object.keys(t),o=r.length,n;for(;o-- >0;)if(n=r[o],e===n.toLowerCase())return n;return null}var j=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,dt=t=>!K(t)&&t!==j;function Fe(){let{caseless:t}=dt(this)&&this||{},e={},r=(o,n)=>{let s=t&&ft(e,n)||n;ce(e[s])&&ce(o)?e[s]=Fe(e[s],o):ce(o)?e[s]=Fe({},o):W(o)?e[s]=o.slice():e[s]=o};for(let o=0,n=arguments.length;o<n;o++)arguments[o]&&$(arguments[o],r);return e}var Er=(t,e,r,{allOwnKeys:o}={})=>($(e,(n,s)=>{r&&O(n)?t[s]=G(n,r):t[s]=n},{allOwnKeys:o}),t),xr=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),Sr=(t,e,r,o)=>{t.prototype=Object.create(e.prototype,o),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),r&&Object.assign(t.prototype,r)},Rr=(t,e,r,o)=>{let n,s,i,l={};if(e=e||{},t==null)return e;do{for(n=Object.getOwnPropertyNames(t),s=n.length;s-- >0;)i=n[s],(!o||o(i,t,e))&&!l[i]&&(e[i]=t[i],l[i]=!0);t=r!==!1&&Ne(t)}while(t&&(!r||r(t,e))&&t!==Object.prototype);return e},Lr=(t,e,r)=>{t=String(t),(r===void 0||r>t.length)&&(r=t.length),r-=e.length;let o=t.indexOf(e,r);return o!==-1&&o===r},Tr=t=>{if(!t)return null;if(W(t))return t;let e=t.length;if(!ut(e))return null;let r=new Array(e);for(;e-- >0;)r[e]=t[e];return r},Ar=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&Ne(Uint8Array)),Or=(t,e)=>{let o=(t&&t[ue]).call(t),n;for(;(n=o.next())&&!n.done;){let s=n.value;e.call(t,s[0],s[1])}},Cr=(t,e)=>{let r,o=[];for(;(r=t.exec(e))!==null;)o.push(r);return o},Ir=I("HTMLFormElement"),Pr=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,o,n){return o.toUpperCase()+n}),at=(({hasOwnProperty:t})=>(e,r)=>t.call(e,r))(Object.prototype),Dr=I("RegExp"),pt=(t,e)=>{let r=Object.getOwnPropertyDescriptors(t),o={};$(r,(n,s)=>{let i;(i=e(n,s,t))!==!1&&(o[s]=i||n)}),Object.defineProperties(t,o)},Fr=t=>{pt(t,(e,r)=>{if(O(t)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;let o=t[r];if(O(o)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},Nr=(t,e)=>{let r={},o=n=>{n.forEach(s=>{r[s]=!0})};return W(t)?o(t):o(String(t).split(e)),r},Ur=()=>{},_r=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e;function kr(t){return!!(t&&O(t.append)&&t[lt]==="FormData"&&t[ue])}var Br=t=>{let e=new Array(10),r=(o,n)=>{if(pe(o)){if(e.indexOf(o)>=0)return;if(!("toJSON"in o)){e[n]=o;let s=W(o)?[]:{};return $(o,(i,l)=>{let f=r(i,n+1);!K(f)&&(s[l]=f)}),e[n]=void 0,s}}return o};return r(t,0)},Mr=I("AsyncFunction"),Hr=t=>t&&(pe(t)||O(t))&&O(t.then)&&O(t.catch),mt=((t,e)=>t?setImmediate:e?((r,o)=>(j.addEventListener("message",({source:n,data:s})=>{n===j&&s===r&&o.length&&o.shift()()},!1),n=>{o.push(n),j.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",O(j.postMessage)),jr=typeof queueMicrotask<"u"?queueMicrotask.bind(j):typeof process<"u"&&process.nextTick||mt,Wr=t=>t!=null&&O(t[ue]),a={isArray:W,isArrayBuffer:ct,isBuffer:nr,isFormData:pr,isArrayBufferView:sr,isString:ir,isNumber:ut,isBoolean:ar,isObject:pe,isPlainObject:ce,isReadableStream:hr,isRequest:br,isResponse:gr,isHeaders:yr,isUndefined:K,isDate:lr,isFile:cr,isBlob:ur,isRegExp:Dr,isFunction:O,isStream:dr,isURLSearchParams:mr,isTypedArray:Ar,isFileList:fr,forEach:$,merge:Fe,extend:Er,trim:wr,stripBOM:xr,inherits:Sr,toFlatObject:Rr,kindOf:fe,kindOfTest:I,endsWith:Lr,toArray:Tr,forEachEntry:Or,matchAll:Cr,isHTMLForm:Ir,hasOwnProperty:at,hasOwnProp:at,reduceDescriptors:pt,freezeMethods:Fr,toObjectSet:Nr,toCamelCase:Pr,noop:Ur,toFiniteNumber:_r,findKey:ft,global:j,isContextDefined:dt,isSpecCompliantForm:kr,toJSONObject:Br,isAsyncFn:Mr,isThenable:Hr,setImmediate:mt,asap:jr,isIterable:Wr};function q(t,e,r,o,n){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=t,this.name="AxiosError",e&&(this.code=e),r&&(this.config=r),o&&(this.request=o),n&&(this.response=n,this.status=n.status?n.status:null)}a.inherits(q,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:a.toJSONObject(this.config),code:this.code,status:this.status}}});var ht=q.prototype,bt={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(t=>{bt[t]={value:t}});Object.defineProperties(q,bt);Object.defineProperty(ht,"isAxiosError",{value:!0});q.from=(t,e,r,o,n,s)=>{let i=Object.create(ht);return a.toFlatObject(t,i,function(f){return f!==Error.prototype},l=>l!=="isAxiosError"),q.call(i,t.message,e,r,o,n),i.cause=t,i.name=t.name,s&&Object.assign(i,s),i};var h=q;var me=null;function Ue(t){return a.isPlainObject(t)||a.isArray(t)}function yt(t){return a.endsWith(t,"[]")?t.slice(0,-2):t}function gt(t,e,r){return t?t.concat(e).map(function(n,s){return n=yt(n),!r&&s?"["+n+"]":n}).join(r?".":""):e}function qr(t){return a.isArray(t)&&!t.some(Ue)}var vr=a.toFlatObject(a,{},null,function(e){return/^is[A-Z]/.test(e)});function Jr(t,e,r){if(!a.isObject(t))throw new TypeError("target must be an object");e=e||new(me||FormData),r=a.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(b,m){return!a.isUndefined(m[b])});let o=r.metaTokens,n=r.visitor||u,s=r.dots,i=r.indexes,f=(r.Blob||typeof Blob<"u"&&Blob)&&a.isSpecCompliantForm(e);if(!a.isFunction(n))throw new TypeError("visitor must be a function");function c(p){if(p===null)return"";if(a.isDate(p))return p.toISOString();if(!f&&a.isBlob(p))throw new h("Blob is not supported. Use a Buffer instead.");return a.isArrayBuffer(p)||a.isTypedArray(p)?f&&typeof Blob=="function"?new Blob([p]):Buffer.from(p):p}function u(p,b,m){let w=p;if(p&&!m&&typeof p=="object"){if(a.endsWith(b,"{}"))b=o?b:b.slice(0,-2),p=JSON.stringify(p);else if(a.isArray(p)&&qr(p)||(a.isFileList(p)||a.endsWith(b,"[]"))&&(w=a.toArray(p)))return b=yt(b),w.forEach(function(T,N){!(a.isUndefined(T)||T===null)&&e.append(i===!0?gt([b],N,s):i===null?b:b+"[]",c(T))}),!1}return Ue(p)?!0:(e.append(gt(m,b,s),c(p)),!1)}let d=[],g=Object.assign(vr,{defaultVisitor:u,convertValue:c,isVisitable:Ue});function S(p,b){if(!a.isUndefined(p)){if(d.indexOf(p)!==-1)throw Error("Circular reference detected in "+b.join("."));d.push(p),a.forEach(p,function(w,R){(!(a.isUndefined(w)||w===null)&&n.call(e,w,a.isString(R)?R.trim():R,b,g))===!0&&S(w,b?b.concat(R):[R])}),d.pop()}}if(!a.isObject(t))throw new TypeError("data must be an object");return S(t),e}var _=Jr;function wt(t){let e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(o){return e[o]})}function Et(t,e){this._pairs=[],t&&_(t,this,e)}var xt=Et.prototype;xt.append=function(e,r){this._pairs.push([e,r])};xt.toString=function(e){let r=e?function(o){return e.call(this,o,wt)}:wt;return this._pairs.map(function(n){return r(n[0])+"="+r(n[1])},"").join("&")};var he=Et;function zr(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function X(t,e,r){if(!e)return t;let o=r&&r.encode||zr;a.isFunction(r)&&(r={serialize:r});let n=r&&r.serialize,s;if(n?s=n(e,r):s=a.isURLSearchParams(e)?e.toString():new he(e,r).toString(o),s){let i=t.indexOf("#");i!==-1&&(t=t.slice(0,i)),t+=(t.indexOf("?")===-1?"?":"&")+s}return t}var _e=class{constructor(){this.handlers=[]}use(e,r,o){return this.handlers.push({fulfilled:e,rejected:r,synchronous:o?o.synchronous:!1,runWhen:o?o.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){a.forEach(this.handlers,function(o){o!==null&&e(o)})}},ke=_e;var be={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1};var St=typeof URLSearchParams<"u"?URLSearchParams:he;var Rt=typeof FormData<"u"?FormData:null;var Lt=typeof Blob<"u"?Blob:null;var Tt={isBrowser:!0,classes:{URLSearchParams:St,FormData:Rt,Blob:Lt},protocols:["http","https","file","blob","url","data"]};var He={};rr(He,{hasBrowserEnv:()=>Me,hasStandardBrowserEnv:()=>Vr,hasStandardBrowserWebWorkerEnv:()=>Gr,navigator:()=>Be,origin:()=>Kr});var Me=typeof window<"u"&&typeof document<"u",Be=typeof navigator=="object"&&navigator||void 0,Vr=Me&&(!Be||["ReactNative","NativeScript","NS"].indexOf(Be.product)<0),Gr=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Kr=Me&&window.location.href||"http://localhost";var y={...He,...Tt};function je(t,e){return _(t,new y.classes.URLSearchParams,Object.assign({visitor:function(r,o,n,s){return y.isNode&&a.isBuffer(r)?(this.append(o,r.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)}},e))}function $r(t){return a.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function Xr(t){let e={},r=Object.keys(t),o,n=r.length,s;for(o=0;o<n;o++)s=r[o],e[s]=t[s];return e}function Qr(t){function e(r,o,n,s){let i=r[s++];if(i==="__proto__")return!0;let l=Number.isFinite(+i),f=s>=r.length;return i=!i&&a.isArray(n)?n.length:i,f?(a.hasOwnProp(n,i)?n[i]=[n[i],o]:n[i]=o,!l):((!n[i]||!a.isObject(n[i]))&&(n[i]=[]),e(r,o,n[i],s)&&a.isArray(n[i])&&(n[i]=Xr(n[i])),!l)}if(a.isFormData(t)&&a.isFunction(t.entries)){let r={};return a.forEachEntry(t,(o,n)=>{e($r(o),n,r,0)}),r}return null}var ge=Qr;function Zr(t,e,r){if(a.isString(t))try{return(e||JSON.parse)(t),a.trim(t)}catch(o){if(o.name!=="SyntaxError")throw o}return(r||JSON.stringify)(t)}var We={transitional:be,adapter:["xhr","http","fetch"],transformRequest:[function(e,r){let o=r.getContentType()||"",n=o.indexOf("application/json")>-1,s=a.isObject(e);if(s&&a.isHTMLForm(e)&&(e=new FormData(e)),a.isFormData(e))return n?JSON.stringify(ge(e)):e;if(a.isArrayBuffer(e)||a.isBuffer(e)||a.isStream(e)||a.isFile(e)||a.isBlob(e)||a.isReadableStream(e))return e;if(a.isArrayBufferView(e))return e.buffer;if(a.isURLSearchParams(e))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let l;if(s){if(o.indexOf("application/x-www-form-urlencoded")>-1)return je(e,this.formSerializer).toString();if((l=a.isFileList(e))||o.indexOf("multipart/form-data")>-1){let f=this.env&&this.env.FormData;return _(l?{"files[]":e}:e,f&&new f,this.formSerializer)}}return s||n?(r.setContentType("application/json",!1),Zr(e)):e}],transformResponse:[function(e){let r=this.transitional||We.transitional,o=r&&r.forcedJSONParsing,n=this.responseType==="json";if(a.isResponse(e)||a.isReadableStream(e))return e;if(e&&a.isString(e)&&(o&&!this.responseType||n)){let i=!(r&&r.silentJSONParsing)&&n;try{return JSON.parse(e)}catch(l){if(i)throw l.name==="SyntaxError"?h.from(l,h.ERR_BAD_RESPONSE,this,null,this.response):l}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:y.classes.FormData,Blob:y.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};a.forEach(["delete","get","head","post","put","patch"],t=>{We.headers[t]={}});var v=We;var Yr=a.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),At=t=>{let e={},r,o,n;return t&&t.split(`
`).forEach(function(i){n=i.indexOf(":"),r=i.substring(0,n).trim().toLowerCase(),o=i.substring(n+1).trim(),!(!r||e[r]&&Yr[r])&&(r==="set-cookie"?e[r]?e[r].push(o):e[r]=[o]:e[r]=e[r]?e[r]+", "+o:o)}),e};var Ot=Symbol("internals");function Q(t){return t&&String(t).trim().toLowerCase()}function ye(t){return t===!1||t==null?t:a.isArray(t)?t.map(ye):String(t)}function eo(t){let e=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g,o;for(;o=r.exec(t);)e[o[1]]=o[2];return e}var to=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function qe(t,e,r,o,n){if(a.isFunction(o))return o.call(this,e,r);if(n&&(e=r),!!a.isString(e)){if(a.isString(o))return e.indexOf(o)!==-1;if(a.isRegExp(o))return o.test(e)}}function ro(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,r,o)=>r.toUpperCase()+o)}function oo(t,e){let r=a.toCamelCase(" "+e);["get","set","has"].forEach(o=>{Object.defineProperty(t,o+r,{value:function(n,s,i){return this[o].call(this,e,n,s,i)},configurable:!0})})}var J=class{constructor(e){e&&this.set(e)}set(e,r,o){let n=this;function s(l,f,c){let u=Q(f);if(!u)throw new Error("header name must be a non-empty string");let d=a.findKey(n,u);(!d||n[d]===void 0||c===!0||c===void 0&&n[d]!==!1)&&(n[d||f]=ye(l))}let i=(l,f)=>a.forEach(l,(c,u)=>s(c,u,f));if(a.isPlainObject(e)||e instanceof this.constructor)i(e,r);else if(a.isString(e)&&(e=e.trim())&&!to(e))i(At(e),r);else if(a.isObject(e)&&a.isIterable(e)){let l={},f,c;for(let u of e){if(!a.isArray(u))throw TypeError("Object iterator must return a key-value pair");l[c=u[0]]=(f=l[c])?a.isArray(f)?[...f,u[1]]:[f,u[1]]:u[1]}i(l,r)}else e!=null&&s(r,e,o);return this}get(e,r){if(e=Q(e),e){let o=a.findKey(this,e);if(o){let n=this[o];if(!r)return n;if(r===!0)return eo(n);if(a.isFunction(r))return r.call(this,n,o);if(a.isRegExp(r))return r.exec(n);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,r){if(e=Q(e),e){let o=a.findKey(this,e);return!!(o&&this[o]!==void 0&&(!r||qe(this,this[o],o,r)))}return!1}delete(e,r){let o=this,n=!1;function s(i){if(i=Q(i),i){let l=a.findKey(o,i);l&&(!r||qe(o,o[l],l,r))&&(delete o[l],n=!0)}}return a.isArray(e)?e.forEach(s):s(e),n}clear(e){let r=Object.keys(this),o=r.length,n=!1;for(;o--;){let s=r[o];(!e||qe(this,this[s],s,e,!0))&&(delete this[s],n=!0)}return n}normalize(e){let r=this,o={};return a.forEach(this,(n,s)=>{let i=a.findKey(o,s);if(i){r[i]=ye(n),delete r[s];return}let l=e?ro(s):String(s).trim();l!==s&&delete r[s],r[l]=ye(n),o[l]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){let r=Object.create(null);return a.forEach(this,(o,n)=>{o!=null&&o!==!1&&(r[n]=e&&a.isArray(o)?o.join(", "):o)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,r])=>e+": "+r).join(`
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...r){let o=new this(e);return r.forEach(n=>o.set(n)),o}static accessor(e){let o=(this[Ot]=this[Ot]={accessors:{}}).accessors,n=this.prototype;function s(i){let l=Q(i);o[l]||(oo(n,i),o[l]=!0)}return a.isArray(e)?e.forEach(s):s(e),this}};J.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);a.reduceDescriptors(J.prototype,({value:t},e)=>{let r=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(o){this[r]=o}}});a.freezeMethods(J);var L=J;function Z(t,e){let r=this||v,o=e||r,n=L.from(o.headers),s=o.data;return a.forEach(t,function(l){s=l.call(r,s,n.normalize(),e?e.status:void 0)}),n.normalize(),s}function Y(t){return!!(t&&t.__CANCEL__)}function Ct(t,e,r){h.call(this,t??"canceled",h.ERR_CANCELED,e,r),this.name="CanceledError"}a.inherits(Ct,h,{__CANCEL__:!0});var D=Ct;function ee(t,e,r){let o=r.config.validateStatus;!r.status||!o||o(r.status)?t(r):e(new h("Request failed with status code "+r.status,[h.ERR_BAD_REQUEST,h.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function ve(t){let e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function no(t,e){t=t||10;let r=new Array(t),o=new Array(t),n=0,s=0,i;return e=e!==void 0?e:1e3,function(f){let c=Date.now(),u=o[s];i||(i=c),r[n]=f,o[n]=c;let d=s,g=0;for(;d!==n;)g+=r[d++],d=d%t;if(n=(n+1)%t,n===s&&(s=(s+1)%t),c-i<e)return;let S=u&&c-u;return S?Math.round(g*1e3/S):void 0}}var It=no;function so(t,e){let r=0,o=1e3/e,n,s,i=(c,u=Date.now())=>{r=u,n=null,s&&(clearTimeout(s),s=null),t.apply(null,c)};return[(...c)=>{let u=Date.now(),d=u-r;d>=o?i(c,u):(n=c,s||(s=setTimeout(()=>{s=null,i(n)},o-d)))},()=>n&&i(n)]}var Pt=so;var z=(t,e,r=3)=>{let o=0,n=It(50,250);return Pt(s=>{let i=s.loaded,l=s.lengthComputable?s.total:void 0,f=i-o,c=n(f),u=i<=l;o=i;let d={loaded:i,total:l,progress:l?i/l:void 0,bytes:f,rate:c||void 0,estimated:c&&l&&u?(l-i)/c:void 0,event:s,lengthComputable:l!=null,[e?"download":"upload"]:!0};t(d)},r)},Je=(t,e)=>{let r=t!=null;return[o=>e[0]({lengthComputable:r,total:t,loaded:o}),e[1]]},ze=t=>(...e)=>a.asap(()=>t(...e));var Dt=y.hasStandardBrowserEnv?((t,e)=>r=>(r=new URL(r,y.origin),t.protocol===r.protocol&&t.host===r.host&&(e||t.port===r.port)))(new URL(y.origin),y.navigator&&/(msie|trident)/i.test(y.navigator.userAgent)):()=>!0;var Ft=y.hasStandardBrowserEnv?{write(t,e,r,o,n,s){let i=[t+"="+encodeURIComponent(e)];a.isNumber(r)&&i.push("expires="+new Date(r).toGMTString()),a.isString(o)&&i.push("path="+o),a.isString(n)&&i.push("domain="+n),s===!0&&i.push("secure"),document.cookie=i.join("; ")},read(t){let e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Ve(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function Ge(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function te(t,e,r){let o=!Ve(e);return t&&(o||r==!1)?Ge(t,e):e}var Nt=t=>t instanceof L?{...t}:t;function P(t,e){e=e||{};let r={};function o(c,u,d,g){return a.isPlainObject(c)&&a.isPlainObject(u)?a.merge.call({caseless:g},c,u):a.isPlainObject(u)?a.merge({},u):a.isArray(u)?u.slice():u}function n(c,u,d,g){if(a.isUndefined(u)){if(!a.isUndefined(c))return o(void 0,c,d,g)}else return o(c,u,d,g)}function s(c,u){if(!a.isUndefined(u))return o(void 0,u)}function i(c,u){if(a.isUndefined(u)){if(!a.isUndefined(c))return o(void 0,c)}else return o(void 0,u)}function l(c,u,d){if(d in e)return o(c,u);if(d in t)return o(void 0,c)}let f={url:s,method:s,data:s,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:l,headers:(c,u,d)=>n(Nt(c),Nt(u),d,!0)};return a.forEach(Object.keys(Object.assign({},t,e)),function(u){let d=f[u]||n,g=d(t[u],e[u],u);a.isUndefined(g)&&d!==l||(r[u]=g)}),r}var we=t=>{let e=P({},t),{data:r,withXSRFToken:o,xsrfHeaderName:n,xsrfCookieName:s,headers:i,auth:l}=e;e.headers=i=L.from(i),e.url=X(te(e.baseURL,e.url,e.allowAbsoluteUrls),t.params,t.paramsSerializer),l&&i.set("Authorization","Basic "+btoa((l.username||"")+":"+(l.password?unescape(encodeURIComponent(l.password)):"")));let f;if(a.isFormData(r)){if(y.hasStandardBrowserEnv||y.hasStandardBrowserWebWorkerEnv)i.setContentType(void 0);else if((f=i.getContentType())!==!1){let[c,...u]=f?f.split(";").map(d=>d.trim()).filter(Boolean):[];i.setContentType([c||"multipart/form-data",...u].join("; "))}}if(y.hasStandardBrowserEnv&&(o&&a.isFunction(o)&&(o=o(e)),o||o!==!1&&Dt(e.url))){let c=n&&s&&Ft.read(s);c&&i.set(n,c)}return e};var io=typeof XMLHttpRequest<"u",Ut=io&&function(t){return new Promise(function(r,o){let n=we(t),s=n.data,i=L.from(n.headers).normalize(),{responseType:l,onUploadProgress:f,onDownloadProgress:c}=n,u,d,g,S,p;function b(){S&&S(),p&&p(),n.cancelToken&&n.cancelToken.unsubscribe(u),n.signal&&n.signal.removeEventListener("abort",u)}let m=new XMLHttpRequest;m.open(n.method.toUpperCase(),n.url,!0),m.timeout=n.timeout;function w(){if(!m)return;let T=L.from("getAllResponseHeaders"in m&&m.getAllResponseHeaders()),A={data:!l||l==="text"||l==="json"?m.responseText:m.response,status:m.status,statusText:m.statusText,headers:T,config:t,request:m};ee(function(H){r(H),b()},function(H){o(H),b()},A),m=null}"onloadend"in m?m.onloadend=w:m.onreadystatechange=function(){!m||m.readyState!==4||m.status===0&&!(m.responseURL&&m.responseURL.indexOf("file:")===0)||setTimeout(w)},m.onabort=function(){m&&(o(new h("Request aborted",h.ECONNABORTED,t,m)),m=null)},m.onerror=function(){o(new h("Network Error",h.ERR_NETWORK,t,m)),m=null},m.ontimeout=function(){let N=n.timeout?"timeout of "+n.timeout+"ms exceeded":"timeout exceeded",A=n.transitional||be;n.timeoutErrorMessage&&(N=n.timeoutErrorMessage),o(new h(N,A.clarifyTimeoutError?h.ETIMEDOUT:h.ECONNABORTED,t,m)),m=null},s===void 0&&i.setContentType(null),"setRequestHeader"in m&&a.forEach(i.toJSON(),function(N,A){m.setRequestHeader(A,N)}),a.isUndefined(n.withCredentials)||(m.withCredentials=!!n.withCredentials),l&&l!=="json"&&(m.responseType=n.responseType),c&&([g,p]=z(c,!0),m.addEventListener("progress",g)),f&&m.upload&&([d,S]=z(f),m.upload.addEventListener("progress",d),m.upload.addEventListener("loadend",S)),(n.cancelToken||n.signal)&&(u=T=>{m&&(o(!T||T.type?new D(null,t,m):T),m.abort(),m=null)},n.cancelToken&&n.cancelToken.subscribe(u),n.signal&&(n.signal.aborted?u():n.signal.addEventListener("abort",u)));let R=ve(n.url);if(R&&y.protocols.indexOf(R)===-1){o(new h("Unsupported protocol "+R+":",h.ERR_BAD_REQUEST,t));return}m.send(s||null)})};var ao=(t,e)=>{let{length:r}=t=t?t.filter(Boolean):[];if(e||r){let o=new AbortController,n,s=function(c){if(!n){n=!0,l();let u=c instanceof Error?c:this.reason;o.abort(u instanceof h?u:new D(u instanceof Error?u.message:u))}},i=e&&setTimeout(()=>{i=null,s(new h(`timeout ${e} of ms exceeded`,h.ETIMEDOUT))},e),l=()=>{t&&(i&&clearTimeout(i),i=null,t.forEach(c=>{c.unsubscribe?c.unsubscribe(s):c.removeEventListener("abort",s)}),t=null)};t.forEach(c=>c.addEventListener("abort",s));let{signal:f}=o;return f.unsubscribe=()=>a.asap(l),f}},_t=ao;var lo=function*(t,e){let r=t.byteLength;if(!e||r<e){yield t;return}let o=0,n;for(;o<r;)n=o+e,yield t.slice(o,n),o=n},co=async function*(t,e){for await(let r of uo(t))yield*lo(r,e)},uo=async function*(t){if(t[Symbol.asyncIterator]){yield*t;return}let e=t.getReader();try{for(;;){let{done:r,value:o}=await e.read();if(r)break;yield o}}finally{await e.cancel()}},Ke=(t,e,r,o)=>{let n=co(t,e),s=0,i,l=f=>{i||(i=!0,o&&o(f))};return new ReadableStream({async pull(f){try{let{done:c,value:u}=await n.next();if(c){l(),f.close();return}let d=u.byteLength;if(r){let g=s+=d;r(g)}f.enqueue(new Uint8Array(u))}catch(c){throw l(c),c}},cancel(f){return l(f),n.return()}},{highWaterMark:2})};var xe=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Bt=xe&&typeof ReadableStream=="function",fo=xe&&(typeof TextEncoder=="function"?(t=>e=>t.encode(e))(new TextEncoder):async t=>new Uint8Array(await new Response(t).arrayBuffer())),Mt=(t,...e)=>{try{return!!t(...e)}catch{return!1}},po=Bt&&Mt(()=>{let t=!1,e=new Request(y.origin,{body:new ReadableStream,method:"POST",get duplex(){return t=!0,"half"}}).headers.has("Content-Type");return t&&!e}),kt=64*1024,$e=Bt&&Mt(()=>a.isReadableStream(new Response("").body)),Ee={stream:$e&&(t=>t.body)};xe&&(t=>{["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!Ee[e]&&(Ee[e]=a.isFunction(t[e])?r=>r[e]():(r,o)=>{throw new h(`Response type '${e}' is not supported`,h.ERR_NOT_SUPPORT,o)})})})(new Response);var mo=async t=>{if(t==null)return 0;if(a.isBlob(t))return t.size;if(a.isSpecCompliantForm(t))return(await new Request(y.origin,{method:"POST",body:t}).arrayBuffer()).byteLength;if(a.isArrayBufferView(t)||a.isArrayBuffer(t))return t.byteLength;if(a.isURLSearchParams(t)&&(t=t+""),a.isString(t))return(await fo(t)).byteLength},ho=async(t,e)=>{let r=a.toFiniteNumber(t.getContentLength());return r??mo(e)},Ht=xe&&(async t=>{let{url:e,method:r,data:o,signal:n,cancelToken:s,timeout:i,onDownloadProgress:l,onUploadProgress:f,responseType:c,headers:u,withCredentials:d="same-origin",fetchOptions:g}=we(t);c=c?(c+"").toLowerCase():"text";let S=_t([n,s&&s.toAbortSignal()],i),p,b=S&&S.unsubscribe&&(()=>{S.unsubscribe()}),m;try{if(f&&po&&r!=="get"&&r!=="head"&&(m=await ho(u,o))!==0){let A=new Request(e,{method:"POST",body:o,duplex:"half"}),U;if(a.isFormData(o)&&(U=A.headers.get("content-type"))&&u.setContentType(U),A.body){let[H,le]=Je(m,z(ze(f)));o=Ke(A.body,kt,H,le)}}a.isString(d)||(d=d?"include":"omit");let w="credentials"in Request.prototype;p=new Request(e,{...g,signal:S,method:r.toUpperCase(),headers:u.normalize().toJSON(),body:o,duplex:"half",credentials:w?d:void 0});let R=await fetch(p),T=$e&&(c==="stream"||c==="response");if($e&&(l||T&&b)){let A={};["status","statusText","headers"].forEach(st=>{A[st]=R[st]});let U=a.toFiniteNumber(R.headers.get("content-length")),[H,le]=l&&Je(U,z(ze(l),!0))||[];R=new Response(Ke(R.body,kt,H,()=>{le&&le(),b&&b()}),A)}c=c||"text";let N=await Ee[a.findKey(Ee,c)||"text"](R,t);return!T&&b&&b(),await new Promise((A,U)=>{ee(A,U,{data:N,headers:L.from(R.headers),status:R.status,statusText:R.statusText,config:t,request:p})})}catch(w){throw b&&b(),w&&w.name==="TypeError"&&/Load failed|fetch/i.test(w.message)?Object.assign(new h("Network Error",h.ERR_NETWORK,t,p),{cause:w.cause||w}):h.from(w,w&&w.code,t,p)}});var Xe={http:me,xhr:Ut,fetch:Ht};a.forEach(Xe,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});var jt=t=>`- ${t}`,bo=t=>a.isFunction(t)||t===null||t===!1,Se={getAdapter:t=>{t=a.isArray(t)?t:[t];let{length:e}=t,r,o,n={};for(let s=0;s<e;s++){r=t[s];let i;if(o=r,!bo(r)&&(o=Xe[(i=String(r)).toLowerCase()],o===void 0))throw new h(`Unknown adapter '${i}'`);if(o)break;n[i||"#"+s]=o}if(!o){let s=Object.entries(n).map(([l,f])=>`adapter ${l} `+(f===!1?"is not supported by the environment":"is not available in the build")),i=e?s.length>1?`since :
`+s.map(jt).join(`
`):" "+jt(s[0]):"as no adapter specified";throw new h("There is no suitable adapter to dispatch the request "+i,"ERR_NOT_SUPPORT")}return o},adapters:Xe};function Qe(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new D(null,t)}function Re(t){return Qe(t),t.headers=L.from(t.headers),t.data=Z.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),Se.getAdapter(t.adapter||v.adapter)(t).then(function(o){return Qe(t),o.data=Z.call(t,t.transformResponse,o),o.headers=L.from(o.headers),o},function(o){return Y(o)||(Qe(t),o&&o.response&&(o.response.data=Z.call(t,t.transformResponse,o.response),o.response.headers=L.from(o.response.headers))),Promise.reject(o)})}var Le="1.9.0";var Te={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{Te[t]=function(o){return typeof o===t||"a"+(e<1?"n ":" ")+t}});var Wt={};Te.transitional=function(e,r,o){function n(s,i){return"[Axios v"+Le+"] Transitional option '"+s+"'"+i+(o?". "+o:"")}return(s,i,l)=>{if(e===!1)throw new h(n(i," has been removed"+(r?" in "+r:"")),h.ERR_DEPRECATED);return r&&!Wt[i]&&(Wt[i]=!0,console.warn(n(i," has been deprecated since v"+r+" and will be removed in the near future"))),e?e(s,i,l):!0}};Te.spelling=function(e){return(r,o)=>(console.warn(`${o} is likely a misspelling of ${e}`),!0)};function go(t,e,r){if(typeof t!="object")throw new h("options must be an object",h.ERR_BAD_OPTION_VALUE);let o=Object.keys(t),n=o.length;for(;n-- >0;){let s=o[n],i=e[s];if(i){let l=t[s],f=l===void 0||i(l,s,t);if(f!==!0)throw new h("option "+s+" must be "+f,h.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new h("Unknown option "+s,h.ERR_BAD_OPTION)}}var re={assertOptions:go,validators:Te};var F=re.validators,V=class{constructor(e){this.defaults=e||{},this.interceptors={request:new ke,response:new ke}}async request(e,r){try{return await this._request(e,r)}catch(o){if(o instanceof Error){let n={};Error.captureStackTrace?Error.captureStackTrace(n):n=new Error;let s=n.stack?n.stack.replace(/^.+\n/,""):"";try{o.stack?s&&!String(o.stack).endsWith(s.replace(/^.+\n.+\n/,""))&&(o.stack+=`
`+s):o.stack=s}catch{}}throw o}}_request(e,r){typeof e=="string"?(r=r||{},r.url=e):r=e||{},r=P(this.defaults,r);let{transitional:o,paramsSerializer:n,headers:s}=r;o!==void 0&&re.assertOptions(o,{silentJSONParsing:F.transitional(F.boolean),forcedJSONParsing:F.transitional(F.boolean),clarifyTimeoutError:F.transitional(F.boolean)},!1),n!=null&&(a.isFunction(n)?r.paramsSerializer={serialize:n}:re.assertOptions(n,{encode:F.function,serialize:F.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),re.assertOptions(r,{baseUrl:F.spelling("baseURL"),withXsrfToken:F.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let i=s&&a.merge(s.common,s[r.method]);s&&a.forEach(["delete","get","head","post","put","patch","common"],p=>{delete s[p]}),r.headers=L.concat(i,s);let l=[],f=!0;this.interceptors.request.forEach(function(b){typeof b.runWhen=="function"&&b.runWhen(r)===!1||(f=f&&b.synchronous,l.unshift(b.fulfilled,b.rejected))});let c=[];this.interceptors.response.forEach(function(b){c.push(b.fulfilled,b.rejected)});let u,d=0,g;if(!f){let p=[Re.bind(this),void 0];for(p.unshift.apply(p,l),p.push.apply(p,c),g=p.length,u=Promise.resolve(r);d<g;)u=u.then(p[d++],p[d++]);return u}g=l.length;let S=r;for(d=0;d<g;){let p=l[d++],b=l[d++];try{S=p(S)}catch(m){b.call(this,m);break}}try{u=Re.call(this,S)}catch(p){return Promise.reject(p)}for(d=0,g=c.length;d<g;)u=u.then(c[d++],c[d++]);return u}getUri(e){e=P(this.defaults,e);let r=te(e.baseURL,e.url,e.allowAbsoluteUrls);return X(r,e.params,e.paramsSerializer)}};a.forEach(["delete","get","head","options"],function(e){V.prototype[e]=function(r,o){return this.request(P(o||{},{method:e,url:r,data:(o||{}).data}))}});a.forEach(["post","put","patch"],function(e){function r(o){return function(s,i,l){return this.request(P(l||{},{method:e,headers:o?{"Content-Type":"multipart/form-data"}:{},url:s,data:i}))}}V.prototype[e]=r(),V.prototype[e+"Form"]=r(!0)});var oe=V;var Ze=class t{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(s){r=s});let o=this;this.promise.then(n=>{if(!o._listeners)return;let s=o._listeners.length;for(;s-- >0;)o._listeners[s](n);o._listeners=null}),this.promise.then=n=>{let s,i=new Promise(l=>{o.subscribe(l),s=l}).then(n);return i.cancel=function(){o.unsubscribe(s)},i},e(function(s,i,l){o.reason||(o.reason=new D(s,i,l),r(o.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;let r=this._listeners.indexOf(e);r!==-1&&this._listeners.splice(r,1)}toAbortSignal(){let e=new AbortController,r=o=>{e.abort(o)};return this.subscribe(r),e.signal.unsubscribe=()=>this.unsubscribe(r),e.signal}static source(){let e;return{token:new t(function(n){e=n}),cancel:e}}},qt=Ze;function Ye(t){return function(r){return t.apply(null,r)}}function et(t){return a.isObject(t)&&t.isAxiosError===!0}var tt={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(tt).forEach(([t,e])=>{tt[e]=t});var vt=tt;function Jt(t){let e=new oe(t),r=G(oe.prototype.request,e);return a.extend(r,oe.prototype,e,{allOwnKeys:!0}),a.extend(r,e,null,{allOwnKeys:!0}),r.create=function(n){return Jt(P(t,n))},r}var x=Jt(v);x.Axios=oe;x.CanceledError=D;x.CancelToken=qt;x.isCancel=Y;x.VERSION=Le;x.toFormData=_;x.AxiosError=h;x.Cancel=x.CanceledError;x.all=function(e){return Promise.all(e)};x.spread=Ye;x.isAxiosError=et;x.mergeConfig=P;x.AxiosHeaders=L;x.formToJSON=t=>ge(a.isHTMLForm(t)?new FormData(t):t);x.getAdapter=Se.getAdapter;x.HttpStatusCode=vt;x.default=x;var ne=x;var{Axios:Pi,AxiosError:Di,CanceledError:Fi,isCancel:Ni,CancelToken:Ui,VERSION:_i,all:ki,Cancel:Bi,isAxiosError:Mi,spread:Hi,toFormData:ji,AxiosHeaders:Wi,HttpStatusCode:qi,formToJSON:vi,getAdapter:Ji,mergeConfig:zi}=ne;var rt=class{constructor(){this.API_URL="http://87.106.224.51:5010/api";this.ProdOrDebug="production";this.IsProduction=()=>this.ProdOrDebug==="production";this.IsDebug=()=>this.ProdOrDebug==="development";this.RequestStability=500}},yo=new rt,se=yo;var E=class{static async POST(e,r){let o=C.getSessionId()||"";return r=r||{},(await ne.post(se.API_URL+e,r,{headers:{sessiontoken:o||"","Content-Type":"application/json",Accept:"application/json"}})).data}static async GET(e){let r=C.getSessionId()||"";return(await ne.get(se.API_URL+e,{headers:{sessiontoken:r||"","Content-Type":"application/json",Accept:"application/json"}})).data}};var zt=async(t,e)=>{let r="/login/login",o={Email:t,Password:e};try{let n=await E.POST(r,o);if(n&&n.Token&&n.ExpirationDate){let s=new Date(n.ExpirationDate);C.login(n.Token,s)}else throw new Error("Login failed: No session ID returned")}catch(n){throw console.error("Login failed:",n),new Error("Login failed: "+n.message)}},Vt=async(t,e,r)=>{let o="/login/register";try{let n={Username:t,Email:e,Password:r},s=await E.POST(o,n);if(s&&s.Token&&s.ExpirationDate){let i=new Date(s.ExpirationDate);C.login(s.Token,i)}else throw new Error("Registration failed: No session ID returned")}catch(n){throw console.error("Registration failed:",n),new Error("Registration failed: "+n.message)}},Gt=async t=>{let e="/login/checksession";try{let r=await E.POST(e);if(!r||!r.message||r.message!=="ok")throw new Error("Invalid session ID");return r}catch(r){console.error("Session check failed:",r);return}};var k=class{static async GetLists(e,r,o,n){let l={page:e,length:r,filters:o||{},sort:n||{}};return await E.POST("/lists/getLists",l)}static async GetMyLists(e,r,o,n){let l={page:e,length:r,filters:o||{},sort:n||{}};return await E.POST("/lists/getMyLists",l)}static async GetSpecificList(e){let r={ListID:e};return await E.POST("/lists/getspecificlist",r)}static async UpdateList(e,r,o,n){let s={ListID:e,Name:r,IsPublic:o,Words:n.map(l=>({Word_EN:l.Word_EN,Word_NL:l.Word_NL,Word_ID:l.Word_ID,WordIndex:l.WordIndex}))};return await E.POST("/lists/updateList",s)}static async DeleteList(e){let r={ListID:e};return await E.POST("/lists/deletelist",r)}static async CreateList(e){let r={Name:e};return await E.POST("/lists/createlist",r)}};var B=class{static log(e){console.log(e)}static error(e){console.log("[ERROR] "+e)}static warn(e){console.log("[WARN] "+e)}static debug(e){se.IsDebug()&&console.log("[DEBUG] "+e)}static info(e){console.log("[INFO] "+e)}};var ie=class{static async GetUserInfo(){let e=await E.POST("/account/getuserinfo");if(e===void 0){B.error("Failed to fetch user info");return}return e}};var Ae=class{constructor(e,r,o){this.Correct=e,this.Finished=r,this.WordIndex=o}};var Oe=class{constructor(e,r,o,n){this.Question=e,this.Answer=r,this.CorrectAnswer=o,this.Correct=n}},ae=class{constructor(e,r,o,n,s,i,l,f,c){this.ListID=e,this.Name=r,this.Description=o,this.WordCount=n,this.PracticeCount=s,this.CreatedAt=i,this.UpdatedAt=l,this.Owner=f,this.IsPublic=c}},Ce=class{constructor(e,r,o,n,s,i,l,f){this.Orientation=e,this.StartTime=r,this.Duration=o,this.Score=n,this.Words=s,this.CurrentWordIndex=i,this.IsFinished=l,this.ListInfo=f}};var Ie=class{constructor(e,r,o,n,s,i,l,f){this.ListID=e,this.Name=r,this.Description=o,this.WordCount=n,this.CreatedAt=s,this.UpdatedAt=i,this.Owner=l,this.IsPublic=f}},Pe=class{constructor(e,r,o,n,s){this.Word=e,this.WordIndex=r,this.Orientation=o,this.ListInfo=n,this.ExerciseStartedAt=s}};var Kt=async(t,e)=>{let r="/exercise/startexercise",o={listID:t,orientation:e};B.debug("Starting exercise with body: "+JSON.stringify(o));try{if(!await E.POST(r,o))throw new Error("Failed to start exercise: No session ID returned");return}catch(n){throw console.error("Failed to start exercise:",n),new Error("Failed to start exercise: "+n.message)}},$t=async()=>{let t="/exercise/getword";try{let e=await E.POST(t);if(!e||!e.Word)throw new Error("Failed to get word: No word returned");let r=new Ie(e.ListInfo.ListID,e.ListInfo.Name,e.ListInfo.Description,e.ListInfo.WordCount,new Date(e.ListInfo.CreatedAt),new Date(e.ListInfo.UpdatedAt),e.ListInfo.Owner,e.ListInfo.IsPublic);return new Pe(e.Word,e.WordIndex,e.Orientation,r,new Date(e.ExerciseStartTime))}catch(e){throw console.error("Failed to get word:",e),new Error("Failed to get word: "+e.message)}},Xt=async()=>{let t="/exercise/getresult";try{let e=await E.POST(t);if(!e||!e)throw new Error("Failed to get exercise result: No result returned");let r=[];e&&e.Words&&(r=e.Words.map(s=>new Oe(s.Question,s.Answer,s.CorrectAnswer,s.Correct)));let o;return e&&e.ListInfo?o=new ae(e.ListInfo.ListID,e.ListInfo.Name,e.ListInfo.Description,e.ListInfo.WordCount,e.ListInfo.PracticeCount,new Date(e.ListInfo.CreatedAt),new Date(e.ListInfo.UpdatedAt),e.ListInfo.Owner,e.ListInfo.IsPublic):o=new ae(0,"","",0,0,new Date,new Date,"",!1),new Ce(e.Orientation,new Date(e.StartTime),e.Duration,e.Score,r,e.CurrentWordIndex,e.IsFinished,o)}catch(e){throw console.error("Failed to get exercise result:",e),new Error("Failed to get exercise result: "+e.message)}},Qt=async t=>{let e="/exercise/checkanswer",r={answer:t};try{let o=await E.POST(e,r);if(!o)throw new Error("Failed to check answer: No result returned");return new Ae(o.Correct,o.Finished,o.WordIndex)}catch(o){throw console.error("Failed to check answer:",o),new Error("Failed to check answer: "+o.message)}};var Zt={Login:{Login:zt,Register:Vt,CheckSession:Gt},GetLists:{GetLists:k.GetLists,GetSpecificList:k.GetSpecificList,UpdateList:k.UpdateList,DeleteList:k.DeleteList},Exercise:{StartExercise:Kt,GetWord:$t,getResult:Xt,CheckAnswer:Qt},Account:{GetUserInfo:ie.GetUserInfo}};var wo=t=>{if(!t){console.error("Invalid URL");return}window.location.href=t},M=wo;var Eo=Zt.Login.Login,ot=class{constructor(){this.loginForm=document.getElementById("login-form"),this.emailField=document.getElementById("login-form-email"),this.passwordField=document.getElementById("login-form-password")}async Init(e){this.addEventListeners(),e===void 0||await e}addEventListeners(){this.loginForm.addEventListener("submit",async e=>{if(e.preventDefault(),!this.emailField.value||!this.emailField.value.includes("@")||!this.emailField.value.includes(".")||!this.passwordField.value){alert("Please fill in all fields.");return}try{await Eo(this.emailField.value,this.passwordField.value),M("./index.html")}catch(r){console.error("Login failed:",r),alert("Login failed. Please check your credentials and try again.")}})}},Yt=ot;var nt=class{constructor(){this.topBar=document.getElementById("top-bar");this.topBarLeft=document.getElementById("top-bar-left");this.topBarRight=document.getElementById("top-bar-right");this.topbar_MyLists=document.getElementById("topbar-MyLists");this.topbar_Logout=document.getElementById("topbar-Logout");this.topbar_Login=document.getElementById("topbar-Login");this.topbar_Register=document.getElementById("topbar-Register");this.topbar_Profile=document.getElementById("topbar-Profile");B.debug("TopBarModule scaffolded.")}async Init(e){this.addEventListeners(),!(e===void 0||await e!==!0)&&(this.topbar_MyLists.style.display="block",this.topbar_Profile.style.display="block",this.topbar_Logout.style.display="block",this.topbar_Login.style.display="none",this.topbar_Register.style.display="none")}async render(){}addEventListeners(){this.topbar_Logout.addEventListener("click",async()=>{confirm("Are you sure you want to log out?")&&(C.logout(),M("./index.html"))}),this.topbar_Login.addEventListener("click",async()=>{M("./login.html")}),this.topbar_Register.addEventListener("click",async()=>{M("./register.html")}),this.topbar_Profile.addEventListener("click",async()=>{M("./accountPage.html")}),this.topbar_MyLists.addEventListener("click",async()=>{M("./myLists.html")})}},er=nt;var xo=new Yt,So=new er;async function Ro(){await So.Init(),await xo.Init()}Ro();})();