File size: 35,901 Bytes
369fac9
 
 
 
 
 
1
2
3
4
5
6
7
import{_ as z,e as v,f as pe,g as st,o as _,c as w,F as D,h as F,t as O,d as y,n as I,i as ot,p as K,b as X,j as it,k as B,l as oe,m as ie,K as we,a as ae,q as Se,v as ge}from"./index-02ab79b9.js";function Fe(e,t){return function(){return e.apply(t,arguments)}}const{toString:at}=Object.prototype,{getPrototypeOf:he}=Object,G=(e=>t=>{const r=at.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),x=e=>(e=e.toLowerCase(),t=>G(t)===e),Q=e=>t=>typeof t===e,{isArray:U}=Array,$=Q("undefined");function ct(e){return e!==null&&!$(e)&&e.constructor!==null&&!$(e.constructor)&&T(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Be=x("ArrayBuffer");function lt(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Be(e.buffer),t}const ut=Q("string"),T=Q("function"),Le=Q("number"),Z=e=>e!==null&&typeof e=="object",dt=e=>e===!0||e===!1,M=e=>{if(G(e)!=="object")return!1;const t=he(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},ft=x("Date"),pt=x("File"),ht=x("Blob"),mt=x("FileList"),yt=e=>Z(e)&&T(e.pipe),_t=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||T(e.append)&&((t=G(e))==="formdata"||t==="object"&&T(e.toString)&&e.toString()==="[object FormData]"))},bt=x("URLSearchParams"),Et=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function H(e,t,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let n,s;if(typeof e!="object"&&(e=[e]),U(e))for(n=0,s=e.length;n<s;n++)t.call(null,e[n],n,e);else{const o=r?Object.getOwnPropertyNames(e):Object.keys(e),i=o.length;let c;for(n=0;n<i;n++)c=o[n],t.call(null,e[c],c,e)}}function Ue(e,t){t=t.toLowerCase();const r=Object.keys(e);let n=r.length,s;for(;n-- >0;)if(s=r[n],t===s.toLowerCase())return s;return null}const je=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),Ie=e=>!$(e)&&e!==je;function ce(){const{caseless:e}=Ie(this)&&this||{},t={},r=(n,s)=>{const o=e&&Ue(t,s)||s;M(t[o])&&M(n)?t[o]=ce(t[o],n):M(n)?t[o]=ce({},n):U(n)?t[o]=n.slice():t[o]=n};for(let n=0,s=arguments.length;n<s;n++)arguments[n]&&H(arguments[n],r);return t}const wt=(e,t,r,{allOwnKeys:n}={})=>(H(t,(s,o)=>{r&&T(s)?e[o]=Fe(s,r):e[o]=s},{allOwnKeys:n}),e),St=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),gt=(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},Rt=(e,t,r,n)=>{let s,o,i;const c={};if(t=t||{},e==null)return t;do{for(s=Object.getOwnPropertyNames(e),o=s.length;o-- >0;)i=s[o],(!n||n(i,e,t))&&!c[i]&&(t[i]=e[i],c[i]=!0);e=r!==!1&&he(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},Ot=(e,t,r)=>{e=String(e),(r===void 0||r>e.length)&&(r=e.length),r-=t.length;const n=e.indexOf(t,r);return n!==-1&&n===r},Tt=e=>{if(!e)return null;if(U(e))return e;let t=e.length;if(!Le(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},At=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&he(Uint8Array)),vt=(e,t)=>{const n=(e&&e[Symbol.iterator]).call(e);let s;for(;(s=n.next())&&!s.done;){const o=s.value;t.call(e,o[0],o[1])}},xt=(e,t)=>{let r;const n=[];for(;(r=e.exec(t))!==null;)n.push(r);return n},Ct=x("HTMLFormElement"),Nt=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,n,s){return n.toUpperCase()+s}),Re=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),Pt=x("RegExp"),$e=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};H(r,(s,o)=>{let i;(i=t(s,o,e))!==!1&&(n[o]=i||s)}),Object.defineProperties(e,n)},kt=e=>{$e(e,(t,r)=>{if(T(e)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const n=e[r];if(!!T(n)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},Dt=(e,t)=>{const r={},n=s=>{s.forEach(o=>{r[o]=!0})};return U(e)?n(e):n(String(e).split(t)),r},Ft=()=>{},Bt=(e,t)=>(e=+e,Number.isFinite(e)?e:t),te="abcdefghijklmnopqrstuvwxyz",Oe="0123456789",ze={DIGIT:Oe,ALPHA:te,ALPHA_DIGIT:te+te.toUpperCase()+Oe},Lt=(e=16,t=ze.ALPHA_DIGIT)=>{let r="";const{length:n}=t;for(;e--;)r+=t[Math.random()*n|0];return r};function Ut(e){return!!(e&&T(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const jt=e=>{const t=new Array(10),r=(n,s)=>{if(Z(n)){if(t.indexOf(n)>=0)return;if(!("toJSON"in n)){t[s]=n;const o=U(n)?[]:{};return H(n,(i,c)=>{const f=r(i,s+1);!$(f)&&(o[c]=f)}),t[s]=void 0,o}}return n};return r(e,0)},It=x("AsyncFunction"),$t=e=>e&&(Z(e)||T(e))&&T(e.then)&&T(e.catch),a={isArray:U,isArrayBuffer:Be,isBuffer:ct,isFormData:_t,isArrayBufferView:lt,isString:ut,isNumber:Le,isBoolean:dt,isObject:Z,isPlainObject:M,isUndefined:$,isDate:ft,isFile:pt,isBlob:ht,isRegExp:Pt,isFunction:T,isStream:yt,isURLSearchParams:bt,isTypedArray:At,isFileList:mt,forEach:H,merge:ce,extend:wt,trim:Et,stripBOM:St,inherits:gt,toFlatObject:Rt,kindOf:G,kindOfTest:x,endsWith:Ot,toArray:Tt,forEachEntry:vt,matchAll:xt,isHTMLForm:Ct,hasOwnProperty:Re,hasOwnProp:Re,reduceDescriptors:$e,freezeMethods:kt,toObjectSet:Dt,toCamelCase:Nt,noop:Ft,toFiniteNumber:Bt,findKey:Ue,global:je,isContextDefined:Ie,ALPHABET:ze,generateString:Lt,isSpecCompliantForm:Ut,toJSONObject:jt,isAsyncFn:It,isThenable:$t};function m(e,t,r,n,s){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),s&&(this.response=s)}a.inherits(m,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.response&&this.response.status?this.response.status:null}}});const He=m.prototype,qe={};["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(e=>{qe[e]={value:e}});Object.defineProperties(m,qe);Object.defineProperty(He,"isAxiosError",{value:!0});m.from=(e,t,r,n,s,o)=>{const i=Object.create(He);return a.toFlatObject(e,i,function(f){return f!==Error.prototype},c=>c!=="isAxiosError"),m.call(i,e.message,t,r,n,s),i.cause=e,i.name=e.name,o&&Object.assign(i,o),i};const zt=null;function le(e){return a.isPlainObject(e)||a.isArray(e)}function Me(e){return a.endsWith(e,"[]")?e.slice(0,-2):e}function Te(e,t,r){return e?e.concat(t).map(function(s,o){return s=Me(s),!r&&o?"["+s+"]":s}).join(r?".":""):t}function Ht(e){return a.isArray(e)&&!e.some(le)}const qt=a.toFlatObject(a,{},null,function(t){return/^is[A-Z]/.test(t)});function Y(e,t,r){if(!a.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,r=a.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(h,E){return!a.isUndefined(E[h])});const n=r.metaTokens,s=r.visitor||p,o=r.dots,i=r.indexes,f=(r.Blob||typeof Blob<"u"&&Blob)&&a.isSpecCompliantForm(t);if(!a.isFunction(s))throw new TypeError("visitor must be a function");function d(u){if(u===null)return"";if(a.isDate(u))return u.toISOString();if(!f&&a.isBlob(u))throw new m("Blob is not supported. Use a Buffer instead.");return a.isArrayBuffer(u)||a.isTypedArray(u)?f&&typeof Blob=="function"?new Blob([u]):Buffer.from(u):u}function p(u,h,E){let g=u;if(u&&!E&&typeof u=="object"){if(a.endsWith(h,"{}"))h=n?h:h.slice(0,-2),u=JSON.stringify(u);else if(a.isArray(u)&&Ht(u)||(a.isFileList(u)||a.endsWith(h,"[]"))&&(g=a.toArray(u)))return h=Me(h),g.forEach(function(P,rt){!(a.isUndefined(P)||P===null)&&t.append(i===!0?Te([h],rt,o):i===null?h:h+"[]",d(P))}),!1}return le(u)?!0:(t.append(Te(E,h,o),d(u)),!1)}const l=[],b=Object.assign(qt,{defaultVisitor:p,convertValue:d,isVisitable:le});function R(u,h){if(!a.isUndefined(u)){if(l.indexOf(u)!==-1)throw Error("Circular reference detected in "+h.join("."));l.push(u),a.forEach(u,function(g,N){(!(a.isUndefined(g)||g===null)&&s.call(t,g,a.isString(N)?N.trim():N,h,b))===!0&&R(g,h?h.concat(N):[N])}),l.pop()}}if(!a.isObject(e))throw new TypeError("data must be an object");return R(e),t}function Ae(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(n){return t[n]})}function me(e,t){this._pairs=[],e&&Y(e,this,t)}const Ve=me.prototype;Ve.append=function(t,r){this._pairs.push([t,r])};Ve.toString=function(t){const r=t?function(n){return t.call(this,n,Ae)}:Ae;return this._pairs.map(function(s){return r(s[0])+"="+r(s[1])},"").join("&")};function Mt(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Je(e,t,r){if(!t)return e;const n=r&&r.encode||Mt,s=r&&r.serialize;let o;if(s?o=s(t,r):o=a.isURLSearchParams(t)?t.toString():new me(t,r).toString(n),o){const i=e.indexOf("#");i!==-1&&(e=e.slice(0,i)),e+=(e.indexOf("?")===-1?"?":"&")+o}return e}class Vt{constructor(){this.handlers=[]}use(t,r,n){return this.handlers.push({fulfilled:t,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){a.forEach(this.handlers,function(n){n!==null&&t(n)})}}const ve=Vt,We={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Jt=typeof URLSearchParams<"u"?URLSearchParams:me,Wt=typeof FormData<"u"?FormData:null,Kt=typeof Blob<"u"?Blob:null,Xt={isBrowser:!0,classes:{URLSearchParams:Jt,FormData:Wt,Blob:Kt},protocols:["http","https","file","blob","url","data"]},Ke=typeof window<"u"&&typeof document<"u",Gt=(e=>Ke&&["ReactNative","NativeScript","NS"].indexOf(e)<0)(typeof navigator<"u"&&navigator.product),Qt=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),Zt=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Ke,hasStandardBrowserWebWorkerEnv:Qt,hasStandardBrowserEnv:Gt},Symbol.toStringTag,{value:"Module"})),A={...Zt,...Xt};function Yt(e,t){return Y(e,new A.classes.URLSearchParams,Object.assign({visitor:function(r,n,s,o){return A.isNode&&a.isBuffer(r)?(this.append(n,r.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},t))}function en(e){return a.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function tn(e){const t={},r=Object.keys(e);let n;const s=r.length;let o;for(n=0;n<s;n++)o=r[n],t[o]=e[o];return t}function Xe(e){function t(r,n,s,o){let i=r[o++];if(i==="__proto__")return!0;const c=Number.isFinite(+i),f=o>=r.length;return i=!i&&a.isArray(s)?s.length:i,f?(a.hasOwnProp(s,i)?s[i]=[s[i],n]:s[i]=n,!c):((!s[i]||!a.isObject(s[i]))&&(s[i]=[]),t(r,n,s[i],o)&&a.isArray(s[i])&&(s[i]=tn(s[i])),!c)}if(a.isFormData(e)&&a.isFunction(e.entries)){const r={};return a.forEachEntry(e,(n,s)=>{t(en(n),s,r,0)}),r}return null}function nn(e,t,r){if(a.isString(e))try{return(t||JSON.parse)(e),a.trim(e)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(e)}const ye={transitional:We,adapter:["xhr","http"],transformRequest:[function(t,r){const n=r.getContentType()||"",s=n.indexOf("application/json")>-1,o=a.isObject(t);if(o&&a.isHTMLForm(t)&&(t=new FormData(t)),a.isFormData(t))return s?JSON.stringify(Xe(t)):t;if(a.isArrayBuffer(t)||a.isBuffer(t)||a.isStream(t)||a.isFile(t)||a.isBlob(t))return t;if(a.isArrayBufferView(t))return t.buffer;if(a.isURLSearchParams(t))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let c;if(o){if(n.indexOf("application/x-www-form-urlencoded")>-1)return Yt(t,this.formSerializer).toString();if((c=a.isFileList(t))||n.indexOf("multipart/form-data")>-1){const f=this.env&&this.env.FormData;return Y(c?{"files[]":t}:t,f&&new f,this.formSerializer)}}return o||s?(r.setContentType("application/json",!1),nn(t)):t}],transformResponse:[function(t){const r=this.transitional||ye.transitional,n=r&&r.forcedJSONParsing,s=this.responseType==="json";if(t&&a.isString(t)&&(n&&!this.responseType||s)){const i=!(r&&r.silentJSONParsing)&&s;try{return JSON.parse(t)}catch(c){if(i)throw c.name==="SyntaxError"?m.from(c,m.ERR_BAD_RESPONSE,this,null,this.response):c}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:A.classes.FormData,Blob:A.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};a.forEach(["delete","get","head","post","put","patch"],e=>{ye.headers[e]={}});const _e=ye,rn=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"]),sn=e=>{const t={};let r,n,s;return e&&e.split(`
`).forEach(function(i){s=i.indexOf(":"),r=i.substring(0,s).trim().toLowerCase(),n=i.substring(s+1).trim(),!(!r||t[r]&&rn[r])&&(r==="set-cookie"?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)}),t},xe=Symbol("internals");function j(e){return e&&String(e).trim().toLowerCase()}function V(e){return e===!1||e==null?e:a.isArray(e)?e.map(V):String(e)}function on(e){const t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(e);)t[n[1]]=n[2];return t}const an=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function ne(e,t,r,n,s){if(a.isFunction(n))return n.call(this,t,r);if(s&&(t=r),!!a.isString(t)){if(a.isString(n))return t.indexOf(n)!==-1;if(a.isRegExp(n))return n.test(t)}}function cn(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,r,n)=>r.toUpperCase()+n)}function ln(e,t){const r=a.toCamelCase(" "+t);["get","set","has"].forEach(n=>{Object.defineProperty(e,n+r,{value:function(s,o,i){return this[n].call(this,t,s,o,i)},configurable:!0})})}class ee{constructor(t){t&&this.set(t)}set(t,r,n){const s=this;function o(c,f,d){const p=j(f);if(!p)throw new Error("header name must be a non-empty string");const l=a.findKey(s,p);(!l||s[l]===void 0||d===!0||d===void 0&&s[l]!==!1)&&(s[l||f]=V(c))}const i=(c,f)=>a.forEach(c,(d,p)=>o(d,p,f));return a.isPlainObject(t)||t instanceof this.constructor?i(t,r):a.isString(t)&&(t=t.trim())&&!an(t)?i(sn(t),r):t!=null&&o(r,t,n),this}get(t,r){if(t=j(t),t){const n=a.findKey(this,t);if(n){const s=this[n];if(!r)return s;if(r===!0)return on(s);if(a.isFunction(r))return r.call(this,s,n);if(a.isRegExp(r))return r.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,r){if(t=j(t),t){const n=a.findKey(this,t);return!!(n&&this[n]!==void 0&&(!r||ne(this,this[n],n,r)))}return!1}delete(t,r){const n=this;let s=!1;function o(i){if(i=j(i),i){const c=a.findKey(n,i);c&&(!r||ne(n,n[c],c,r))&&(delete n[c],s=!0)}}return a.isArray(t)?t.forEach(o):o(t),s}clear(t){const r=Object.keys(this);let n=r.length,s=!1;for(;n--;){const o=r[n];(!t||ne(this,this[o],o,t,!0))&&(delete this[o],s=!0)}return s}normalize(t){const r=this,n={};return a.forEach(this,(s,o)=>{const i=a.findKey(n,o);if(i){r[i]=V(s),delete r[o];return}const c=t?cn(o):String(o).trim();c!==o&&delete r[o],r[c]=V(s),n[c]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const r=Object.create(null);return a.forEach(this,(n,s)=>{n!=null&&n!==!1&&(r[s]=t&&a.isArray(n)?n.join(", "):n)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,r])=>t+": "+r).join(`
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...r){const n=new this(t);return r.forEach(s=>n.set(s)),n}static accessor(t){const n=(this[xe]=this[xe]={accessors:{}}).accessors,s=this.prototype;function o(i){const c=j(i);n[c]||(ln(s,i),n[c]=!0)}return a.isArray(t)?t.forEach(o):o(t),this}}ee.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);a.reduceDescriptors(ee.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(n){this[r]=n}}});a.freezeMethods(ee);const C=ee;function re(e,t){const r=this||_e,n=t||r,s=C.from(n.headers);let o=n.data;return a.forEach(e,function(c){o=c.call(r,o,s.normalize(),t?t.status:void 0)}),s.normalize(),o}function Ge(e){return!!(e&&e.__CANCEL__)}function q(e,t,r){m.call(this,e==null?"canceled":e,m.ERR_CANCELED,t,r),this.name="CanceledError"}a.inherits(q,m,{__CANCEL__:!0});function un(e,t,r){const n=r.config.validateStatus;!r.status||!n||n(r.status)?e(r):t(new m("Request failed with status code "+r.status,[m.ERR_BAD_REQUEST,m.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}const dn=A.hasStandardBrowserEnv?{write(e,t,r,n,s,o){const i=[e+"="+encodeURIComponent(t)];a.isNumber(r)&&i.push("expires="+new Date(r).toGMTString()),a.isString(n)&&i.push("path="+n),a.isString(s)&&i.push("domain="+s),o===!0&&i.push("secure"),document.cookie=i.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function fn(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function pn(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Qe(e,t){return e&&!fn(t)?pn(e,t):t}const hn=A.hasStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");let n;function s(o){let i=o;return t&&(r.setAttribute("href",i),i=r.href),r.setAttribute("href",i),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:r.pathname.charAt(0)==="/"?r.pathname:"/"+r.pathname}}return n=s(window.location.href),function(i){const c=a.isString(i)?s(i):i;return c.protocol===n.protocol&&c.host===n.host}}():function(){return function(){return!0}}();function mn(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function yn(e,t){e=e||10;const r=new Array(e),n=new Array(e);let s=0,o=0,i;return t=t!==void 0?t:1e3,function(f){const d=Date.now(),p=n[o];i||(i=d),r[s]=f,n[s]=d;let l=o,b=0;for(;l!==s;)b+=r[l++],l=l%e;if(s=(s+1)%e,s===o&&(o=(o+1)%e),d-i<t)return;const R=p&&d-p;return R?Math.round(b*1e3/R):void 0}}function Ce(e,t){let r=0;const n=yn(50,250);return s=>{const o=s.loaded,i=s.lengthComputable?s.total:void 0,c=o-r,f=n(c),d=o<=i;r=o;const p={loaded:o,total:i,progress:i?o/i:void 0,bytes:c,rate:f||void 0,estimated:f&&i&&d?(i-o)/f:void 0,event:s};p[t?"download":"upload"]=!0,e(p)}}const _n=typeof XMLHttpRequest<"u",bn=_n&&function(e){return new Promise(function(r,n){let s=e.data;const o=C.from(e.headers).normalize();let{responseType:i,withXSRFToken:c}=e,f;function d(){e.cancelToken&&e.cancelToken.unsubscribe(f),e.signal&&e.signal.removeEventListener("abort",f)}let p;if(a.isFormData(s)){if(A.hasStandardBrowserEnv||A.hasStandardBrowserWebWorkerEnv)o.setContentType(!1);else if((p=o.getContentType())!==!1){const[h,...E]=p?p.split(";").map(g=>g.trim()).filter(Boolean):[];o.setContentType([h||"multipart/form-data",...E].join("; "))}}let l=new XMLHttpRequest;if(e.auth){const h=e.auth.username||"",E=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";o.set("Authorization","Basic "+btoa(h+":"+E))}const b=Qe(e.baseURL,e.url);l.open(e.method.toUpperCase(),Je(b,e.params,e.paramsSerializer),!0),l.timeout=e.timeout;function R(){if(!l)return;const h=C.from("getAllResponseHeaders"in l&&l.getAllResponseHeaders()),g={data:!i||i==="text"||i==="json"?l.responseText:l.response,status:l.status,statusText:l.statusText,headers:h,config:e,request:l};un(function(P){r(P),d()},function(P){n(P),d()},g),l=null}if("onloadend"in l?l.onloadend=R:l.onreadystatechange=function(){!l||l.readyState!==4||l.status===0&&!(l.responseURL&&l.responseURL.indexOf("file:")===0)||setTimeout(R)},l.onabort=function(){!l||(n(new m("Request aborted",m.ECONNABORTED,e,l)),l=null)},l.onerror=function(){n(new m("Network Error",m.ERR_NETWORK,e,l)),l=null},l.ontimeout=function(){let E=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const g=e.transitional||We;e.timeoutErrorMessage&&(E=e.timeoutErrorMessage),n(new m(E,g.clarifyTimeoutError?m.ETIMEDOUT:m.ECONNABORTED,e,l)),l=null},A.hasStandardBrowserEnv&&(c&&a.isFunction(c)&&(c=c(e)),c||c!==!1&&hn(b))){const h=e.xsrfHeaderName&&e.xsrfCookieName&&dn.read(e.xsrfCookieName);h&&o.set(e.xsrfHeaderName,h)}s===void 0&&o.setContentType(null),"setRequestHeader"in l&&a.forEach(o.toJSON(),function(E,g){l.setRequestHeader(g,E)}),a.isUndefined(e.withCredentials)||(l.withCredentials=!!e.withCredentials),i&&i!=="json"&&(l.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&l.addEventListener("progress",Ce(e.onDownloadProgress,!0)),typeof e.onUploadProgress=="function"&&l.upload&&l.upload.addEventListener("progress",Ce(e.onUploadProgress)),(e.cancelToken||e.signal)&&(f=h=>{!l||(n(!h||h.type?new q(null,e,l):h),l.abort(),l=null)},e.cancelToken&&e.cancelToken.subscribe(f),e.signal&&(e.signal.aborted?f():e.signal.addEventListener("abort",f)));const u=mn(b);if(u&&A.protocols.indexOf(u)===-1){n(new m("Unsupported protocol "+u+":",m.ERR_BAD_REQUEST,e));return}l.send(s||null)})},ue={http:zt,xhr:bn};a.forEach(ue,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const Ne=e=>`- ${e}`,En=e=>a.isFunction(e)||e===null||e===!1,Ze={getAdapter:e=>{e=a.isArray(e)?e:[e];const{length:t}=e;let r,n;const s={};for(let o=0;o<t;o++){r=e[o];let i;if(n=r,!En(r)&&(n=ue[(i=String(r)).toLowerCase()],n===void 0))throw new m(`Unknown adapter '${i}'`);if(n)break;s[i||"#"+o]=n}if(!n){const o=Object.entries(s).map(([c,f])=>`adapter ${c} `+(f===!1?"is not supported by the environment":"is not available in the build"));let i=t?o.length>1?`since :
`+o.map(Ne).join(`
`):" "+Ne(o[0]):"as no adapter specified";throw new m("There is no suitable adapter to dispatch the request "+i,"ERR_NOT_SUPPORT")}return n},adapters:ue};function se(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new q(null,e)}function Pe(e){return se(e),e.headers=C.from(e.headers),e.data=re.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Ze.getAdapter(e.adapter||_e.adapter)(e).then(function(n){return se(e),n.data=re.call(e,e.transformResponse,n),n.headers=C.from(n.headers),n},function(n){return Ge(n)||(se(e),n&&n.response&&(n.response.data=re.call(e,e.transformResponse,n.response),n.response.headers=C.from(n.response.headers))),Promise.reject(n)})}const ke=e=>e instanceof C?e.toJSON():e;function L(e,t){t=t||{};const r={};function n(d,p,l){return a.isPlainObject(d)&&a.isPlainObject(p)?a.merge.call({caseless:l},d,p):a.isPlainObject(p)?a.merge({},p):a.isArray(p)?p.slice():p}function s(d,p,l){if(a.isUndefined(p)){if(!a.isUndefined(d))return n(void 0,d,l)}else return n(d,p,l)}function o(d,p){if(!a.isUndefined(p))return n(void 0,p)}function i(d,p){if(a.isUndefined(p)){if(!a.isUndefined(d))return n(void 0,d)}else return n(void 0,p)}function c(d,p,l){if(l in t)return n(d,p);if(l in e)return n(void 0,d)}const f={url:o,method:o,data:o,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:c,headers:(d,p)=>s(ke(d),ke(p),!0)};return a.forEach(Object.keys(Object.assign({},e,t)),function(p){const l=f[p]||s,b=l(e[p],t[p],p);a.isUndefined(b)&&l!==c||(r[p]=b)}),r}const Ye="1.6.7",be={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{be[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const De={};be.transitional=function(t,r,n){function s(o,i){return"[Axios v"+Ye+"] Transitional option '"+o+"'"+i+(n?". "+n:"")}return(o,i,c)=>{if(t===!1)throw new m(s(i," has been removed"+(r?" in "+r:"")),m.ERR_DEPRECATED);return r&&!De[i]&&(De[i]=!0,console.warn(s(i," has been deprecated since v"+r+" and will be removed in the near future"))),t?t(o,i,c):!0}};function wn(e,t,r){if(typeof e!="object")throw new m("options must be an object",m.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let s=n.length;for(;s-- >0;){const o=n[s],i=t[o];if(i){const c=e[o],f=c===void 0||i(c,o,e);if(f!==!0)throw new m("option "+o+" must be "+f,m.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new m("Unknown option "+o,m.ERR_BAD_OPTION)}}const de={assertOptions:wn,validators:be},k=de.validators;class W{constructor(t){this.defaults=t,this.interceptors={request:new ve,response:new ve}}async request(t,r){try{return await this._request(t,r)}catch(n){if(n instanceof Error){let s;Error.captureStackTrace?Error.captureStackTrace(s={}):s=new Error;const o=s.stack?s.stack.replace(/^.+\n/,""):"";n.stack?o&&!String(n.stack).endsWith(o.replace(/^.+\n.+\n/,""))&&(n.stack+=`
`+o):n.stack=o}throw n}}_request(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=L(this.defaults,r);const{transitional:n,paramsSerializer:s,headers:o}=r;n!==void 0&&de.assertOptions(n,{silentJSONParsing:k.transitional(k.boolean),forcedJSONParsing:k.transitional(k.boolean),clarifyTimeoutError:k.transitional(k.boolean)},!1),s!=null&&(a.isFunction(s)?r.paramsSerializer={serialize:s}:de.assertOptions(s,{encode:k.function,serialize:k.function},!0)),r.method=(r.method||this.defaults.method||"get").toLowerCase();let i=o&&a.merge(o.common,o[r.method]);o&&a.forEach(["delete","get","head","post","put","patch","common"],u=>{delete o[u]}),r.headers=C.concat(i,o);const c=[];let f=!0;this.interceptors.request.forEach(function(h){typeof h.runWhen=="function"&&h.runWhen(r)===!1||(f=f&&h.synchronous,c.unshift(h.fulfilled,h.rejected))});const d=[];this.interceptors.response.forEach(function(h){d.push(h.fulfilled,h.rejected)});let p,l=0,b;if(!f){const u=[Pe.bind(this),void 0];for(u.unshift.apply(u,c),u.push.apply(u,d),b=u.length,p=Promise.resolve(r);l<b;)p=p.then(u[l++],u[l++]);return p}b=c.length;let R=r;for(l=0;l<b;){const u=c[l++],h=c[l++];try{R=u(R)}catch(E){h.call(this,E);break}}try{p=Pe.call(this,R)}catch(u){return Promise.reject(u)}for(l=0,b=d.length;l<b;)p=p.then(d[l++],d[l++]);return p}getUri(t){t=L(this.defaults,t);const r=Qe(t.baseURL,t.url);return Je(r,t.params,t.paramsSerializer)}}a.forEach(["delete","get","head","options"],function(t){W.prototype[t]=function(r,n){return this.request(L(n||{},{method:t,url:r,data:(n||{}).data}))}});a.forEach(["post","put","patch"],function(t){function r(n){return function(o,i,c){return this.request(L(c||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:o,data:i}))}}W.prototype[t]=r(),W.prototype[t+"Form"]=r(!0)});const J=W;class Ee{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(o){r=o});const n=this;this.promise.then(s=>{if(!n._listeners)return;let o=n._listeners.length;for(;o-- >0;)n._listeners[o](s);n._listeners=null}),this.promise.then=s=>{let o;const i=new Promise(c=>{n.subscribe(c),o=c}).then(s);return i.cancel=function(){n.unsubscribe(o)},i},t(function(o,i,c){n.reason||(n.reason=new q(o,i,c),r(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const r=this._listeners.indexOf(t);r!==-1&&this._listeners.splice(r,1)}static source(){let t;return{token:new Ee(function(s){t=s}),cancel:t}}}const Sn=Ee;function gn(e){return function(r){return e.apply(null,r)}}function Rn(e){return a.isObject(e)&&e.isAxiosError===!0}const fe={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(fe).forEach(([e,t])=>{fe[t]=e});const On=fe;function et(e){const t=new J(e),r=Fe(J.prototype.request,t);return a.extend(r,J.prototype,t,{allOwnKeys:!0}),a.extend(r,t,null,{allOwnKeys:!0}),r.create=function(s){return et(L(e,s))},r}const S=et(_e);S.Axios=J;S.CanceledError=q;S.CancelToken=Sn;S.isCancel=Ge;S.VERSION=Ye;S.toFormData=Y;S.AxiosError=m;S.Cancel=S.CanceledError;S.all=function(t){return Promise.all(t)};S.spread=gn;S.isAxiosError=Rn;S.mergeConfig=L;S.AxiosHeaders=C;S.formToJSON=e=>Xe(a.isHTMLForm(e)?new FormData(e):e);S.getAdapter=Ze.getAdapter;S.HttpStatusCode=On;S.default=S;const Tn=S;const tt=e=>(K("data-v-f95f1d7c"),e=e(),X(),e),An=tt(()=>y("i",{class:"fa-solid fa-cloud-arrow-up dropzone-icon"},null,-1)),vn=tt(()=>y("i",{class:"fa-regular fa-file-video dropzone-icon"},null,-1)),xn={__name:"Dropzone",emits:["fileUploaded"],setup(e,{emit:t}){const r=v(null),n=v(null),s=pe(()=>!!n.value),o=v(!1),i=t;st(()=>n.value,(u,h)=>{u&&i("fileUploaded",u)});const c=u=>{u.preventDefault(),u.stopPropagation()},f=u=>{c(u),o.value=!0},d=u=>{c(u),o.value=!1},p=u=>{c(u),o.value=!1;let h=u.dataTransfer.files[0],E=new DataTransfer;E.items.add(h);let g=E.files;r.value.files=g,n.value=h},l=()=>{r.value.click()},b=u=>{const h=u.target;h&&h.files&&(n.value=h.files[0])},R=u=>Math.round(u/1e6);return(u,h)=>(_(),w("div",{class:I(["dropzone",{"dropzone-dragging":o.value}]),id:"dropzone",onDrag:c,onDragstart:c,onDragend:c,onDragover:f,onDragenter:d,onDragleave:c,onDrop:p,onClick:ot(l,["self"])},[s.value?(_(),w(D,{key:1},[vn,F(" "+O(n.value.name)+" ("+O(R(n.value.size))+" MB) ",1)],64)):(_(),w(D,{key:0},[An,F(" Drop files or Click here to select files to upload. ")],64)),y("input",{type:"file",name:"files",class:"dropzone-input",ref_key:"dropzoneInput",ref:r,onChange:b},null,544)],34))}},Cn=z(xn,[["__scopeId","data-v-f95f1d7c"]]);const Nn={},Pn=e=>(K("data-v-3efb54fc"),e=e(),X(),e),kn={class:"dropzone"},Dn=Pn(()=>y("div",{class:"loading-animation"},[y("div",{class:"dot"}),y("div",{class:"dot"}),y("div",{class:"dot"})],-1));function Fn(e,t){return _(),w("div",kn,[Dn,F(" Processing ... ")])}const Bn=z(Nn,[["render",Fn],["__scopeId","data-v-3efb54fc"]]);const Ln=["src"],Un={__name:"Video",props:{videoName:String,startAt:{required:!1,type:Number}},setup(e){const t="http://127.0.0.1",{videoName:r,startAt:n}=e,s=pe(()=>`${t}/api/video/stream?video_name=${r}`),o=v(null),i=v(null);it(()=>{n&&(o.value.currentTime=n)});const c=()=>{i.value.scrollIntoView({behavior:"smooth",block:"center"})};return(f,d)=>(_(),w(D,null,[y("p",null,O(s.value),1),y("div",{class:"player",ref_key:"videoContainer",ref:i},[y("video",{controls:"",ref_key:"video",ref:o,onLoadeddata:c,autoplay:"",loop:"",muted:""},[y("source",{src:`${s.value}`,type:"video/mp4"},null,8,Ln)],544)],512)],64))}},jn=z(Un,[["__scopeId","data-v-ea1329c7"]]);const nt=e=>(K("data-v-e0283d6e"),e=e(),X(),e),In={class:"result-section"},$n={class:"tab-links"},zn={class:"tab-container"},Hn={key:0,class:"main"},qn={key:0,class:"info-color"},Mn={key:1,class:"info-color"},Vn={class:"main"},Jn={class:"error-color"},Wn={key:0,class:"fa-solid fa-circle-exclamation error-color"},Kn={key:1,class:"fa-solid fa-circle-check"},Xn={key:1,class:"errors"},Gn=nt(()=>y("i",{class:"fa-solid fa-caret-right"},null,-1)),Qn={class:"box-error"},Zn=["onClick"],Yn=["src"],er=nt(()=>y("hr",null,null,-1)),tr={key:0,class:"video-container"},nr={__name:"Result",props:["data"],setup(e){const{data:t}=e,r=pe(()=>{let i={total:0,totalInString:"",details:{}},c=t.details.length;return i.total=c,c==0||c==1?i.totalInString=`${c} error`:i.totalInString=`${c} errors`,t.details.forEach(f=>{let d=f.stage;i.details[d]=i.details[d]?i.details[d]+1:1}),i}),n=v("summary"),s=v(0),o=i=>{n.value="video",s.value=i};return(i,c)=>(_(),w("section",In,[y("ul",$n,[y("li",{class:I({active:n.value=="summary"}),onClick:c[0]||(c[0]=()=>n.value="summary")}," Summary ",2),y("li",{class:I({active:n.value=="detail"}),onClick:c[1]||(c[1]=()=>n.value="detail")}," Detail ",2),y("li",{class:I({active:n.value=="video"}),onClick:c[2]||(c[2]=()=>n.value="video")}," Full Video ",2)]),y("div",zn,[n.value=="summary"?(_(),w(D,{key:0},[e.data.counter?(_(),w("p",Hn,[e.data.type!="bicep_curl"?(_(),w("span",qn," Counter: "+O(e.data.counter),1)):(_(),w("span",Mn," Left arm counter: "+O(e.data.counter.left_counter)+" - Right arm counter: "+O(e.data.counter.right_counter),1))])):B("",!0),y("p",Vn,[F(" There are "),y("span",Jn,O(r.value.totalInString),1),F(" found. "),r.value.total>0?(_(),w("i",Wn)):(_(),w("i",Kn))]),r.value.total>0?(_(),w("ul",Xn,[(_(!0),w(D,null,oe(r.value.details,(f,d)=>(_(),w("li",null,[Gn,F(" "+O(d)+": "+O(f),1)]))),256))])):B("",!0)],64)):B("",!0),(_(),ie(we,null,[n.value=="detail"?(_(!0),w(D,{key:0},oe(e.data.details,(f,d)=>(_(),w("div",Qn,[y("p",null,[F(O(d+1)+". "+O(f.stage)+" at ",1),y("span",{class:"error-time",onClick:p=>o(f.timestamp)},O(f.timestamp)+" second ",9,Zn)]),y("img",{src:`${f.frame}`},null,8,Yn),er]))),256)):B("",!0)],1024)),(_(),ie(we,null,[n.value=="video"?(_(),w("div",tr,[ae(jn,{"video-name":e.data.file_name,"start-at":s.value},null,8,["video-name","start-at"])])):B("",!0)],1024))])]))}},rr=z(nr,[["__scopeId","data-v-e0283d6e"]]);const sr=e=>(K("data-v-1253291f"),e=e(),X(),e),or={class:"input-section"},ir={class:"right-container"},ar={class:"exercises-container"},cr=["onClick"],lr=sr(()=>y("span",null,"Process!",-1)),ur=[lr],dr={__name:"VideoStreaming",setup(e){const t="http://127.0.0.1",r=["squat","plank","bicep_curl","lunge"],n=v({videoFile:null,exerciseType:null}),s=v(null),o=v(!1),i=async()=>{if(!n.value.videoFile){alert("No video selected");return}if(!n.value.exerciseType){alert("No exercise type selected");return}s.value=null;try{o.value=!0;const{data:c}=await Tn.post(`${t}/api/video/upload?type=${n.value.exerciseType}`,{file:n.value.videoFile},{headers:{"Content-Type":"multipart/form-data"}});s.value=c}catch(c){console.error("Error: ",c)}finally{o.value=!1}};return(c,f)=>(_(),w(D,null,[y("section",or,[Se(ae(Cn,{onFileUploaded:f[0]||(f[0]=d=>n.value.videoFile=d)},null,512),[[ge,!o.value]]),Se(ae(Bn,null,null,512),[[ge,o.value]]),y("div",ir,[y("div",ar,[(_(),w(D,null,oe(r,d=>y("p",{class:I(["exercise",{active:n.value.exerciseType==d}]),onClick:p=>n.value.exerciseType=d},O(d),11,cr)),64))]),y("button",{class:"process-btn",onClick:i},ur)])]),s.value?(_(),ie(rr,{key:0,data:s.value},null,8,["data"])):B("",!0)],64))}},pr=z(dr,[["__scopeId","data-v-1253291f"]]);export{pr as default};