yuang-framework-ui-pc 1.0.8 → 1.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/style.css +1 -1
- package/dist/yuang-framework-ui-pc.es.js +11 -3650
- package/dist/yuang-framework-ui-pc.umd.js +1 -36
- package/package.json +2 -9
- package/src/App.vue +19 -3
- package/src/{packages/index.js → components/index.ts} +1 -6
- package/src/main.ts +4 -1
- package/src/router/index.ts +7 -1
- package/src/shims-vue.d.ts +1 -1
- package/src/views/components/yu-button/index.vue +13 -0
- package/src/config/http.ts +0 -44
- package/src/utils/gatewayUtils.ts +0 -22
- package/src/utils/ssoUtils.ts +0 -57
- /package/src/{packages → components}/YuButton/index.vue +0 -0
|
@@ -1,36 +1 @@
|
|
|
1
|
-
(function(_,ve){typeof exports=="object"&&typeof module<"u"?module.exports=ve(require("vue")):typeof define=="function"&&define.amd?define(["vue"],ve):(_=typeof globalThis<"u"?globalThis:_||self,_["yuang-framework-ui-pc"]=ve(_.Vue))})(this,function(_){"use strict";const qn=((e,t)=>{const n=e.__vccOpts||e;for(const[r,o]of t)n[r]=o;return n})(_.defineComponent({__name:"index",setup(e){const{proxy:t}=_.getCurrentInstance(),n=()=>{t.$message.success("我是测试按钮")};return(r,o)=>(_.openBlock(),_.createElementBlock("div",null,[_.createElementVNode("button",{onClick:n},"我是测试按钮")]))}}),[["__scopeId","data-v-842edfb2"]]);function yt(e,t){return function(){return e.apply(t,arguments)}}const{toString:Hn}=Object.prototype,{getPrototypeOf:$e}=Object,be=(e=>t=>{const n=Hn.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),q=e=>(e=e.toLowerCase(),t=>be(t)===e),Re=e=>t=>typeof t===e,{isArray:ne}=Array,ce=Re("undefined");function zn(e){return e!==null&&!ce(e)&&e.constructor!==null&&!ce(e.constructor)&&V(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Et=q("ArrayBuffer");function Kn(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Et(e.buffer),t}const Wn=Re("string"),V=Re("function"),wt=Re("number"),_e=e=>e!==null&&typeof e=="object",Gn=e=>e===!0||e===!1,Se=e=>{if(be(e)!=="object")return!1;const t=$e(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},Jn=q("Date"),Qn=q("File"),Xn=q("Blob"),Yn=q("FileList"),Zn=e=>_e(e)&&V(e.pipe),er=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||V(e.append)&&((t=be(e))==="formdata"||t==="object"&&V(e.toString)&&e.toString()==="[object FormData]"))},tr=q("URLSearchParams"),[nr,rr,or,sr]=["ReadableStream","Request","Response","Headers"].map(q),ir=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function le(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,o;if(typeof e!="object"&&(e=[e]),ne(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{const i=n?Object.getOwnPropertyNames(e):Object.keys(e),s=i.length;let a;for(r=0;r<s;r++)a=i[r],t.call(null,e[a],a,e)}}function vt(e,t){t=t.toLowerCase();const n=Object.keys(e);let r=n.length,o;for(;r-- >0;)if(o=n[r],t===o.toLowerCase())return o;return null}const Y=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,bt=e=>!ce(e)&&e!==Y;function je(){const{caseless:e}=bt(this)&&this||{},t={},n=(r,o)=>{const i=e&&vt(t,o)||o;Se(t[i])&&Se(r)?t[i]=je(t[i],r):Se(r)?t[i]=je({},r):ne(r)?t[i]=r.slice():t[i]=r};for(let r=0,o=arguments.length;r<o;r++)arguments[r]&&le(arguments[r],n);return t}const ar=(e,t,n,{allOwnKeys:r}={})=>(le(t,(o,i)=>{n&&V(o)?e[i]=yt(o,n):e[i]=o},{allOwnKeys:r}),e),cr=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),lr=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},ur=(e,t,n,r)=>{let o,i,s;const a={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),i=o.length;i-- >0;)s=o[i],(!r||r(s,e,t))&&!a[s]&&(t[s]=e[s],a[s]=!0);e=n!==!1&&$e(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},fr=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},dr=e=>{if(!e)return null;if(ne(e))return e;let t=e.length;if(!wt(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},hr=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&$e(Uint8Array)),pr=(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let o;for(;(o=r.next())&&!o.done;){const i=o.value;t.call(e,i[0],i[1])}},mr=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},gr=q("HTMLFormElement"),yr=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),Rt=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Er=q("RegExp"),_t=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};le(n,(o,i)=>{let s;(s=t(o,i,e))!==!1&&(r[i]=s||o)}),Object.defineProperties(e,r)},wr=e=>{_t(e,(t,n)=>{if(V(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(V(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},vr=(e,t)=>{const n={},r=o=>{o.forEach(i=>{n[i]=!0})};return ne(e)?r(e):r(String(e).split(t)),n},br=()=>{},Rr=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t,Be="abcdefghijklmnopqrstuvwxyz",St="0123456789",Ot={DIGIT:St,ALPHA:Be,ALPHA_DIGIT:Be+Be.toUpperCase()+St},_r=(e=16,t=Ot.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n};function Sr(e){return!!(e&&V(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const Or=e=>{const t=new Array(10),n=(r,o)=>{if(_e(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[o]=r;const i=ne(r)?[]:{};return le(r,(s,a)=>{const u=n(s,o+1);!ce(u)&&(i[a]=u)}),t[o]=void 0,i}}return r};return n(e,0)},Ar=q("AsyncFunction"),Tr=e=>e&&(_e(e)||V(e))&&V(e.then)&&V(e.catch),At=((e,t)=>e?setImmediate:t?((n,r)=>(Y.addEventListener("message",({source:o,data:i})=>{o===Y&&i===n&&r.length&&r.shift()()},!1),o=>{r.push(o),Y.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",V(Y.postMessage)),Pr=typeof queueMicrotask<"u"?queueMicrotask.bind(Y):typeof process<"u"&&process.nextTick||At,h={isArray:ne,isArrayBuffer:Et,isBuffer:zn,isFormData:er,isArrayBufferView:Kn,isString:Wn,isNumber:wt,isBoolean:Gn,isObject:_e,isPlainObject:Se,isReadableStream:nr,isRequest:rr,isResponse:or,isHeaders:sr,isUndefined:ce,isDate:Jn,isFile:Qn,isBlob:Xn,isRegExp:Er,isFunction:V,isStream:Zn,isURLSearchParams:tr,isTypedArray:hr,isFileList:Yn,forEach:le,merge:je,extend:ar,trim:ir,stripBOM:cr,inherits:lr,toFlatObject:ur,kindOf:be,kindOfTest:q,endsWith:fr,toArray:dr,forEachEntry:pr,matchAll:mr,isHTMLForm:gr,hasOwnProperty:Rt,hasOwnProp:Rt,reduceDescriptors:_t,freezeMethods:wr,toObjectSet:vr,toCamelCase:yr,noop:br,toFiniteNumber:Rr,findKey:vt,global:Y,isContextDefined:bt,ALPHABET:Ot,generateString:_r,isSpecCompliantForm:Sr,toJSONObject:Or,isAsyncFn:Ar,isThenable:Tr,setImmediate:At,asap:Pr};function O(e,t,n,r,o){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),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o)}h.inherits(O,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:h.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const Tt=O.prototype,Pt={};["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=>{Pt[e]={value:e}}),Object.defineProperties(O,Pt),Object.defineProperty(Tt,"isAxiosError",{value:!0}),O.from=(e,t,n,r,o,i)=>{const s=Object.create(Tt);return h.toFlatObject(e,s,function(u){return u!==Error.prototype},a=>a!=="isAxiosError"),O.call(s,e.message,t,n,r,o),s.cause=e,s.name=e.name,i&&Object.assign(s,i),s};const Nr=null;function Ue(e){return h.isPlainObject(e)||h.isArray(e)}function Nt(e){return h.endsWith(e,"[]")?e.slice(0,-2):e}function Ct(e,t,n){return e?e.concat(t).map(function(o,i){return o=Nt(o),!n&&i?"["+o+"]":o}).join(n?".":""):t}function Cr(e){return h.isArray(e)&&!e.some(Ue)}const kr=h.toFlatObject(h,{},null,function(t){return/^is[A-Z]/.test(t)});function Oe(e,t,n){if(!h.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=h.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(E,y){return!h.isUndefined(y[E])});const r=n.metaTokens,o=n.visitor||c,i=n.dots,s=n.indexes,u=(n.Blob||typeof Blob<"u"&&Blob)&&h.isSpecCompliantForm(t);if(!h.isFunction(o))throw new TypeError("visitor must be a function");function f(g){if(g===null)return"";if(h.isDate(g))return g.toISOString();if(!u&&h.isBlob(g))throw new O("Blob is not supported. Use a Buffer instead.");return h.isArrayBuffer(g)||h.isTypedArray(g)?u&&typeof Blob=="function"?new Blob([g]):Buffer.from(g):g}function c(g,E,y){let A=g;if(g&&!y&&typeof g=="object"){if(h.endsWith(E,"{}"))E=r?E:E.slice(0,-2),g=JSON.stringify(g);else if(h.isArray(g)&&Cr(g)||(h.isFileList(g)||h.endsWith(E,"[]"))&&(A=h.toArray(g)))return E=Nt(E),A.forEach(function(v,x){!(h.isUndefined(v)||v===null)&&t.append(s===!0?Ct([E],x,i):s===null?E:E+"[]",f(v))}),!1}return Ue(g)?!0:(t.append(Ct(y,E,i),f(g)),!1)}const l=[],d=Object.assign(kr,{defaultVisitor:c,convertValue:f,isVisitable:Ue});function m(g,E){if(!h.isUndefined(g)){if(l.indexOf(g)!==-1)throw Error("Circular reference detected in "+E.join("."));l.push(g),h.forEach(g,function(A,S){(!(h.isUndefined(A)||A===null)&&o.call(t,A,h.isString(S)?S.trim():S,E,d))===!0&&m(A,E?E.concat(S):[S])}),l.pop()}}if(!h.isObject(e))throw new TypeError("data must be an object");return m(e),t}function kt(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function Fe(e,t){this._pairs=[],e&&Oe(e,this,t)}const xt=Fe.prototype;xt.append=function(t,n){this._pairs.push([t,n])},xt.toString=function(t){const n=t?function(r){return t.call(this,r,kt)}:kt;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function xr(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Dt(e,t,n){if(!t)return e;const r=n&&n.encode||xr,o=n&&n.serialize;let i;if(o?i=o(t,n):i=h.isURLSearchParams(t)?t.toString():new Fe(t,n).toString(r),i){const s=e.indexOf("#");s!==-1&&(e=e.slice(0,s)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class It{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){h.forEach(this.handlers,function(r){r!==null&&t(r)})}}const Lt={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Dr={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:Fe,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},Ve=typeof window<"u"&&typeof document<"u",Ir=(e=>Ve&&["ReactNative","NativeScript","NS"].indexOf(e)<0)(typeof navigator<"u"&&navigator.product),Lr=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",$r=Ve&&window.location.href||"http://localhost",H={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Ve,hasStandardBrowserEnv:Ir,hasStandardBrowserWebWorkerEnv:Lr,origin:$r},Symbol.toStringTag,{value:"Module"})),...Dr};function jr(e,t){return Oe(e,new H.classes.URLSearchParams,Object.assign({visitor:function(n,r,o,i){return H.isNode&&h.isBuffer(n)?(this.append(r,n.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},t))}function Br(e){return h.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Ur(e){const t={},n=Object.keys(e);let r;const o=n.length;let i;for(r=0;r<o;r++)i=n[r],t[i]=e[i];return t}function $t(e){function t(n,r,o,i){let s=n[i++];if(s==="__proto__")return!0;const a=Number.isFinite(+s),u=i>=n.length;return s=!s&&h.isArray(o)?o.length:s,u?(h.hasOwnProp(o,s)?o[s]=[o[s],r]:o[s]=r,!a):((!o[s]||!h.isObject(o[s]))&&(o[s]=[]),t(n,r,o[s],i)&&h.isArray(o[s])&&(o[s]=Ur(o[s])),!a)}if(h.isFormData(e)&&h.isFunction(e.entries)){const n={};return h.forEachEntry(e,(r,o)=>{t(Br(r),o,n,0)}),n}return null}function Fr(e,t,n){if(h.isString(e))try{return(t||JSON.parse)(e),h.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const ue={transitional:Lt,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",o=r.indexOf("application/json")>-1,i=h.isObject(t);if(i&&h.isHTMLForm(t)&&(t=new FormData(t)),h.isFormData(t))return o?JSON.stringify($t(t)):t;if(h.isArrayBuffer(t)||h.isBuffer(t)||h.isStream(t)||h.isFile(t)||h.isBlob(t)||h.isReadableStream(t))return t;if(h.isArrayBufferView(t))return t.buffer;if(h.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let a;if(i){if(r.indexOf("application/x-www-form-urlencoded")>-1)return jr(t,this.formSerializer).toString();if((a=h.isFileList(t))||r.indexOf("multipart/form-data")>-1){const u=this.env&&this.env.FormData;return Oe(a?{"files[]":t}:t,u&&new u,this.formSerializer)}}return i||o?(n.setContentType("application/json",!1),Fr(t)):t}],transformResponse:[function(t){const n=this.transitional||ue.transitional,r=n&&n.forcedJSONParsing,o=this.responseType==="json";if(h.isResponse(t)||h.isReadableStream(t))return t;if(t&&h.isString(t)&&(r&&!this.responseType||o)){const s=!(n&&n.silentJSONParsing)&&o;try{return JSON.parse(t)}catch(a){if(s)throw a.name==="SyntaxError"?O.from(a,O.ERR_BAD_RESPONSE,this,null,this.response):a}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:H.classes.FormData,Blob:H.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};h.forEach(["delete","get","head","post","put","patch"],e=>{ue.headers[e]={}});const Vr=h.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"]),Mr=e=>{const t={};let n,r,o;return e&&e.split(`
|
|
2
|
-
`).forEach(function(s){o=s.indexOf(":"),n=s.substring(0,o).trim().toLowerCase(),r=s.substring(o+1).trim(),!(!n||t[n]&&Vr[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},jt=Symbol("internals");function fe(e){return e&&String(e).trim().toLowerCase()}function Ae(e){return e===!1||e==null?e:h.isArray(e)?e.map(Ae):String(e)}function qr(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const Hr=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Me(e,t,n,r,o){if(h.isFunction(r))return r.call(this,t,n);if(o&&(t=n),!!h.isString(t)){if(h.isString(r))return t.indexOf(r)!==-1;if(h.isRegExp(r))return r.test(t)}}function zr(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function Kr(e,t){const n=h.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(o,i,s){return this[r].call(this,t,o,i,s)},configurable:!0})})}class F{constructor(t){t&&this.set(t)}set(t,n,r){const o=this;function i(a,u,f){const c=fe(u);if(!c)throw new Error("header name must be a non-empty string");const l=h.findKey(o,c);(!l||o[l]===void 0||f===!0||f===void 0&&o[l]!==!1)&&(o[l||u]=Ae(a))}const s=(a,u)=>h.forEach(a,(f,c)=>i(f,c,u));if(h.isPlainObject(t)||t instanceof this.constructor)s(t,n);else if(h.isString(t)&&(t=t.trim())&&!Hr(t))s(Mr(t),n);else if(h.isHeaders(t))for(const[a,u]of t.entries())i(u,a,r);else t!=null&&i(n,t,r);return this}get(t,n){if(t=fe(t),t){const r=h.findKey(this,t);if(r){const o=this[r];if(!n)return o;if(n===!0)return qr(o);if(h.isFunction(n))return n.call(this,o,r);if(h.isRegExp(n))return n.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=fe(t),t){const r=h.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||Me(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let o=!1;function i(s){if(s=fe(s),s){const a=h.findKey(r,s);a&&(!n||Me(r,r[a],a,n))&&(delete r[a],o=!0)}}return h.isArray(t)?t.forEach(i):i(t),o}clear(t){const n=Object.keys(this);let r=n.length,o=!1;for(;r--;){const i=n[r];(!t||Me(this,this[i],i,t,!0))&&(delete this[i],o=!0)}return o}normalize(t){const n=this,r={};return h.forEach(this,(o,i)=>{const s=h.findKey(r,i);if(s){n[s]=Ae(o),delete n[i];return}const a=t?zr(i):String(i).trim();a!==i&&delete n[i],n[a]=Ae(o),r[a]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return h.forEach(this,(r,o)=>{r!=null&&r!==!1&&(n[o]=t&&h.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
|
|
3
|
-
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(o=>r.set(o)),r}static accessor(t){const r=(this[jt]=this[jt]={accessors:{}}).accessors,o=this.prototype;function i(s){const a=fe(s);r[a]||(Kr(o,s),r[a]=!0)}return h.isArray(t)?t.forEach(i):i(t),this}}F.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),h.reduceDescriptors(F.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}}),h.freezeMethods(F);function qe(e,t){const n=this||ue,r=t||n,o=F.from(r.headers);let i=r.data;return h.forEach(e,function(a){i=a.call(n,i,o.normalize(),t?t.status:void 0)}),o.normalize(),i}function Bt(e){return!!(e&&e.__CANCEL__)}function re(e,t,n){O.call(this,e??"canceled",O.ERR_CANCELED,t,n),this.name="CanceledError"}h.inherits(re,O,{__CANCEL__:!0});function Ut(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new O("Request failed with status code "+n.status,[O.ERR_BAD_REQUEST,O.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function Wr(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function Gr(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o=0,i=0,s;return t=t!==void 0?t:1e3,function(u){const f=Date.now(),c=r[i];s||(s=f),n[o]=u,r[o]=f;let l=i,d=0;for(;l!==o;)d+=n[l++],l=l%e;if(o=(o+1)%e,o===i&&(i=(i+1)%e),f-s<t)return;const m=c&&f-c;return m?Math.round(d*1e3/m):void 0}}function Jr(e,t){let n=0,r=1e3/t,o,i;const s=(f,c=Date.now())=>{n=c,o=null,i&&(clearTimeout(i),i=null),e.apply(null,f)};return[(...f)=>{const c=Date.now(),l=c-n;l>=r?s(f,c):(o=f,i||(i=setTimeout(()=>{i=null,s(o)},r-l)))},()=>o&&s(o)]}const Te=(e,t,n=3)=>{let r=0;const o=Gr(50,250);return Jr(i=>{const s=i.loaded,a=i.lengthComputable?i.total:void 0,u=s-r,f=o(u),c=s<=a;r=s;const l={loaded:s,total:a,progress:a?s/a:void 0,bytes:u,rate:f||void 0,estimated:f&&a&&c?(a-s)/f:void 0,event:i,lengthComputable:a!=null,[t?"download":"upload"]:!0};e(l)},n)},Ft=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},Vt=e=>(...t)=>h.asap(()=>e(...t)),Qr=H.hasStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");let r;function o(i){let s=i;return t&&(n.setAttribute("href",s),s=n.href),n.setAttribute("href",s),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return r=o(window.location.href),function(s){const a=h.isString(s)?o(s):s;return a.protocol===r.protocol&&a.host===r.host}}():function(){return function(){return!0}}(),Xr=H.hasStandardBrowserEnv?{write(e,t,n,r,o,i){const s=[e+"="+encodeURIComponent(t)];h.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),h.isString(r)&&s.push("path="+r),h.isString(o)&&s.push("domain="+o),i===!0&&s.push("secure"),document.cookie=s.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 Yr(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Zr(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Mt(e,t){return e&&!Yr(t)?Zr(e,t):t}const qt=e=>e instanceof F?{...e}:e;function Z(e,t){t=t||{};const n={};function r(f,c,l){return h.isPlainObject(f)&&h.isPlainObject(c)?h.merge.call({caseless:l},f,c):h.isPlainObject(c)?h.merge({},c):h.isArray(c)?c.slice():c}function o(f,c,l){if(h.isUndefined(c)){if(!h.isUndefined(f))return r(void 0,f,l)}else return r(f,c,l)}function i(f,c){if(!h.isUndefined(c))return r(void 0,c)}function s(f,c){if(h.isUndefined(c)){if(!h.isUndefined(f))return r(void 0,f)}else return r(void 0,c)}function a(f,c,l){if(l in t)return r(f,c);if(l in e)return r(void 0,f)}const u={url:i,method:i,data:i,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a,headers:(f,c)=>o(qt(f),qt(c),!0)};return h.forEach(Object.keys(Object.assign({},e,t)),function(c){const l=u[c]||o,d=l(e[c],t[c],c);h.isUndefined(d)&&l!==a||(n[c]=d)}),n}const Ht=e=>{const t=Z({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:o,xsrfCookieName:i,headers:s,auth:a}=t;t.headers=s=F.from(s),t.url=Dt(Mt(t.baseURL,t.url),e.params,e.paramsSerializer),a&&s.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):"")));let u;if(h.isFormData(n)){if(H.hasStandardBrowserEnv||H.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if((u=s.getContentType())!==!1){const[f,...c]=u?u.split(";").map(l=>l.trim()).filter(Boolean):[];s.setContentType([f||"multipart/form-data",...c].join("; "))}}if(H.hasStandardBrowserEnv&&(r&&h.isFunction(r)&&(r=r(t)),r||r!==!1&&Qr(t.url))){const f=o&&i&&Xr.read(i);f&&s.set(o,f)}return t},eo=typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(n,r){const o=Ht(e);let i=o.data;const s=F.from(o.headers).normalize();let{responseType:a,onUploadProgress:u,onDownloadProgress:f}=o,c,l,d,m,g;function E(){m&&m(),g&&g(),o.cancelToken&&o.cancelToken.unsubscribe(c),o.signal&&o.signal.removeEventListener("abort",c)}let y=new XMLHttpRequest;y.open(o.method.toUpperCase(),o.url,!0),y.timeout=o.timeout;function A(){if(!y)return;const v=F.from("getAllResponseHeaders"in y&&y.getAllResponseHeaders()),B={data:!a||a==="text"||a==="json"?y.responseText:y.response,status:y.status,statusText:y.statusText,headers:v,config:e,request:y};Ut(function(D){n(D),E()},function(D){r(D),E()},B),y=null}"onloadend"in y?y.onloadend=A:y.onreadystatechange=function(){!y||y.readyState!==4||y.status===0&&!(y.responseURL&&y.responseURL.indexOf("file:")===0)||setTimeout(A)},y.onabort=function(){y&&(r(new O("Request aborted",O.ECONNABORTED,e,y)),y=null)},y.onerror=function(){r(new O("Network Error",O.ERR_NETWORK,e,y)),y=null},y.ontimeout=function(){let x=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const B=o.transitional||Lt;o.timeoutErrorMessage&&(x=o.timeoutErrorMessage),r(new O(x,B.clarifyTimeoutError?O.ETIMEDOUT:O.ECONNABORTED,e,y)),y=null},i===void 0&&s.setContentType(null),"setRequestHeader"in y&&h.forEach(s.toJSON(),function(x,B){y.setRequestHeader(B,x)}),h.isUndefined(o.withCredentials)||(y.withCredentials=!!o.withCredentials),a&&a!=="json"&&(y.responseType=o.responseType),f&&([d,g]=Te(f,!0),y.addEventListener("progress",d)),u&&y.upload&&([l,m]=Te(u),y.upload.addEventListener("progress",l),y.upload.addEventListener("loadend",m)),(o.cancelToken||o.signal)&&(c=v=>{y&&(r(!v||v.type?new re(null,e,y):v),y.abort(),y=null)},o.cancelToken&&o.cancelToken.subscribe(c),o.signal&&(o.signal.aborted?c():o.signal.addEventListener("abort",c)));const S=Wr(o.url);if(S&&H.protocols.indexOf(S)===-1){r(new O("Unsupported protocol "+S+":",O.ERR_BAD_REQUEST,e));return}y.send(i||null)})},to=(e,t)=>{let n=new AbortController,r;const o=function(u){if(!r){r=!0,s();const f=u instanceof Error?u:this.reason;n.abort(f instanceof O?f:new re(f instanceof Error?f.message:f))}};let i=t&&setTimeout(()=>{o(new O(`timeout ${t} of ms exceeded`,O.ETIMEDOUT))},t);const s=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach(u=>{u&&(u.removeEventListener?u.removeEventListener("abort",o):u.unsubscribe(o))}),e=null)};e.forEach(u=>u&&u.addEventListener&&u.addEventListener("abort",o));const{signal:a}=n;return a.unsubscribe=s,[a,()=>{i&&clearTimeout(i),i=null}]},no=function*(e,t){let n=e.byteLength;if(!t||n<t){yield e;return}let r=0,o;for(;r<n;)o=r+t,yield e.slice(r,o),r=o},ro=async function*(e,t,n){for await(const r of e)yield*no(ArrayBuffer.isView(r)?r:await n(String(r)),t)},zt=(e,t,n,r,o)=>{const i=ro(e,t,o);let s=0,a,u=f=>{a||(a=!0,r&&r(f))};return new ReadableStream({async pull(f){try{const{done:c,value:l}=await i.next();if(c){u(),f.close();return}let d=l.byteLength;if(n){let m=s+=d;n(m)}f.enqueue(new Uint8Array(l))}catch(c){throw u(c),c}},cancel(f){return u(f),i.return()}},{highWaterMark:2})},Pe=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Kt=Pe&&typeof ReadableStream=="function",He=Pe&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),Wt=(e,...t)=>{try{return!!e(...t)}catch{return!1}},oo=Kt&&Wt(()=>{let e=!1;const t=new Request(H.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),Gt=64*1024,ze=Kt&&Wt(()=>h.isReadableStream(new Response("").body)),Ne={stream:ze&&(e=>e.body)};Pe&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!Ne[t]&&(Ne[t]=h.isFunction(e[t])?n=>n[t]():(n,r)=>{throw new O(`Response type '${t}' is not supported`,O.ERR_NOT_SUPPORT,r)})})})(new Response);const so=async e=>{if(e==null)return 0;if(h.isBlob(e))return e.size;if(h.isSpecCompliantForm(e))return(await new Request(e).arrayBuffer()).byteLength;if(h.isArrayBufferView(e)||h.isArrayBuffer(e))return e.byteLength;if(h.isURLSearchParams(e)&&(e=e+""),h.isString(e))return(await He(e)).byteLength},io=async(e,t)=>{const n=h.toFiniteNumber(e.getContentLength());return n??so(t)},Ke={http:Nr,xhr:eo,fetch:Pe&&(async e=>{let{url:t,method:n,data:r,signal:o,cancelToken:i,timeout:s,onDownloadProgress:a,onUploadProgress:u,responseType:f,headers:c,withCredentials:l="same-origin",fetchOptions:d}=Ht(e);f=f?(f+"").toLowerCase():"text";let[m,g]=o||i||s?to([o,i],s):[],E,y;const A=()=>{!E&&setTimeout(()=>{m&&m.unsubscribe()}),E=!0};let S;try{if(u&&oo&&n!=="get"&&n!=="head"&&(S=await io(c,r))!==0){let j=new Request(t,{method:"POST",body:r,duplex:"half"}),D;if(h.isFormData(r)&&(D=j.headers.get("content-type"))&&c.setContentType(D),j.body){const[ye,X]=Ft(S,Te(Vt(u)));r=zt(j.body,Gt,ye,X,He)}}h.isString(l)||(l=l?"include":"omit"),y=new Request(t,{...d,signal:m,method:n.toUpperCase(),headers:c.normalize().toJSON(),body:r,duplex:"half",credentials:l});let v=await fetch(y);const x=ze&&(f==="stream"||f==="response");if(ze&&(a||x)){const j={};["status","statusText","headers"].forEach(Ee=>{j[Ee]=v[Ee]});const D=h.toFiniteNumber(v.headers.get("content-length")),[ye,X]=a&&Ft(D,Te(Vt(a),!0))||[];v=new Response(zt(v.body,Gt,ye,()=>{X&&X(),x&&A()},He),j)}f=f||"text";let B=await Ne[h.findKey(Ne,f)||"text"](v,e);return!x&&A(),g&&g(),await new Promise((j,D)=>{Ut(j,D,{data:B,headers:F.from(v.headers),status:v.status,statusText:v.statusText,config:e,request:y})})}catch(v){throw A(),v&&v.name==="TypeError"&&/fetch/i.test(v.message)?Object.assign(new O("Network Error",O.ERR_NETWORK,e,y),{cause:v.cause||v}):O.from(v,v&&v.code,e,y)}})};h.forEach(Ke,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const Jt=e=>`- ${e}`,ao=e=>h.isFunction(e)||e===null||e===!1,Qt={getAdapter:e=>{e=h.isArray(e)?e:[e];const{length:t}=e;let n,r;const o={};for(let i=0;i<t;i++){n=e[i];let s;if(r=n,!ao(n)&&(r=Ke[(s=String(n)).toLowerCase()],r===void 0))throw new O(`Unknown adapter '${s}'`);if(r)break;o[s||"#"+i]=r}if(!r){const i=Object.entries(o).map(([a,u])=>`adapter ${a} `+(u===!1?"is not supported by the environment":"is not available in the build"));let s=t?i.length>1?`since :
|
|
4
|
-
`+i.map(Jt).join(`
|
|
5
|
-
`):" "+Jt(i[0]):"as no adapter specified";throw new O("There is no suitable adapter to dispatch the request "+s,"ERR_NOT_SUPPORT")}return r},adapters:Ke};function We(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new re(null,e)}function Xt(e){return We(e),e.headers=F.from(e.headers),e.data=qe.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Qt.getAdapter(e.adapter||ue.adapter)(e).then(function(r){return We(e),r.data=qe.call(e,e.transformResponse,r),r.headers=F.from(r.headers),r},function(r){return Bt(r)||(We(e),r&&r.response&&(r.response.data=qe.call(e,e.transformResponse,r.response),r.response.headers=F.from(r.response.headers))),Promise.reject(r)})}const Yt="1.7.3",Ge={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Ge[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const Zt={};Ge.transitional=function(t,n,r){function o(i,s){return"[Axios v"+Yt+"] Transitional option '"+i+"'"+s+(r?". "+r:"")}return(i,s,a)=>{if(t===!1)throw new O(o(s," has been removed"+(n?" in "+n:"")),O.ERR_DEPRECATED);return n&&!Zt[s]&&(Zt[s]=!0,console.warn(o(s," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(i,s,a):!0}};function co(e,t,n){if(typeof e!="object")throw new O("options must be an object",O.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const i=r[o],s=t[i];if(s){const a=e[i],u=a===void 0||s(a,i,e);if(u!==!0)throw new O("option "+i+" must be "+u,O.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new O("Unknown option "+i,O.ERR_BAD_OPTION)}}const Je={assertOptions:co,validators:Ge},W=Je.validators;class ee{constructor(t){this.defaults=t,this.interceptors={request:new It,response:new It}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let o;Error.captureStackTrace?Error.captureStackTrace(o={}):o=new Error;const i=o.stack?o.stack.replace(/^.+\n/,""):"";try{r.stack?i&&!String(r.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(r.stack+=`
|
|
6
|
-
`+i):r.stack=i}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Z(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:i}=n;r!==void 0&&Je.assertOptions(r,{silentJSONParsing:W.transitional(W.boolean),forcedJSONParsing:W.transitional(W.boolean),clarifyTimeoutError:W.transitional(W.boolean)},!1),o!=null&&(h.isFunction(o)?n.paramsSerializer={serialize:o}:Je.assertOptions(o,{encode:W.function,serialize:W.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let s=i&&h.merge(i.common,i[n.method]);i&&h.forEach(["delete","get","head","post","put","patch","common"],g=>{delete i[g]}),n.headers=F.concat(s,i);const a=[];let u=!0;this.interceptors.request.forEach(function(E){typeof E.runWhen=="function"&&E.runWhen(n)===!1||(u=u&&E.synchronous,a.unshift(E.fulfilled,E.rejected))});const f=[];this.interceptors.response.forEach(function(E){f.push(E.fulfilled,E.rejected)});let c,l=0,d;if(!u){const g=[Xt.bind(this),void 0];for(g.unshift.apply(g,a),g.push.apply(g,f),d=g.length,c=Promise.resolve(n);l<d;)c=c.then(g[l++],g[l++]);return c}d=a.length;let m=n;for(l=0;l<d;){const g=a[l++],E=a[l++];try{m=g(m)}catch(y){E.call(this,y);break}}try{c=Xt.call(this,m)}catch(g){return Promise.reject(g)}for(l=0,d=f.length;l<d;)c=c.then(f[l++],f[l++]);return c}getUri(t){t=Z(this.defaults,t);const n=Mt(t.baseURL,t.url);return Dt(n,t.params,t.paramsSerializer)}}h.forEach(["delete","get","head","options"],function(t){ee.prototype[t]=function(n,r){return this.request(Z(r||{},{method:t,url:n,data:(r||{}).data}))}}),h.forEach(["post","put","patch"],function(t){function n(r){return function(i,s,a){return this.request(Z(a||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:i,data:s}))}}ee.prototype[t]=n(),ee.prototype[t+"Form"]=n(!0)});class Qe{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(i){n=i});const r=this;this.promise.then(o=>{if(!r._listeners)return;let i=r._listeners.length;for(;i-- >0;)r._listeners[i](o);r._listeners=null}),this.promise.then=o=>{let i;const s=new Promise(a=>{r.subscribe(a),i=a}).then(o);return s.cancel=function(){r.unsubscribe(i)},s},t(function(i,s,a){r.reason||(r.reason=new re(i,s,a),n(r.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 n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}static source(){let t;return{token:new Qe(function(o){t=o}),cancel:t}}}function lo(e){return function(n){return e.apply(null,n)}}function uo(e){return h.isObject(e)&&e.isAxiosError===!0}const Xe={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(Xe).forEach(([e,t])=>{Xe[t]=e});function en(e){const t=new ee(e),n=yt(ee.prototype.request,t);return h.extend(n,ee.prototype,t,{allOwnKeys:!0}),h.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return en(Z(e,o))},n}const L=en(ue);L.Axios=ee,L.CanceledError=re,L.CancelToken=Qe,L.isCancel=Bt,L.VERSION=Yt,L.toFormData=Oe,L.AxiosError=O,L.Cancel=L.CanceledError,L.all=function(t){return Promise.all(t)},L.spread=lo,L.isAxiosError=uo,L.mergeConfig=Z,L.AxiosHeaders=F,L.formToJSON=e=>$t(h.isHTMLForm(e)?new FormData(e):e),L.getAdapter=Qt.getAdapter,L.HttpStatusCode=Xe,L.default=L;function fo(){return tn().__VUE_DEVTOOLS_GLOBAL_HOOK__}function tn(){return typeof navigator<"u"&&typeof window<"u"?window:typeof globalThis<"u"?globalThis:{}}const ho=typeof Proxy=="function",po="devtools-plugin:setup",mo="plugin:settings:set";let oe,Ye;function go(){var e;return oe!==void 0||(typeof window<"u"&&window.performance?(oe=!0,Ye=window.performance):typeof globalThis<"u"&&(!((e=globalThis.perf_hooks)===null||e===void 0)&&e.performance)?(oe=!0,Ye=globalThis.perf_hooks.performance):oe=!1),oe}function yo(){return go()?Ye.now():Date.now()}class Eo{constructor(t,n){this.target=null,this.targetQueue=[],this.onQueue=[],this.plugin=t,this.hook=n;const r={};if(t.settings)for(const s in t.settings){const a=t.settings[s];r[s]=a.defaultValue}const o=`__vue-devtools-plugin-settings__${t.id}`;let i=Object.assign({},r);try{const s=localStorage.getItem(o),a=JSON.parse(s);Object.assign(i,a)}catch{}this.fallbacks={getSettings(){return i},setSettings(s){try{localStorage.setItem(o,JSON.stringify(s))}catch{}i=s},now(){return yo()}},n&&n.on(mo,(s,a)=>{s===this.plugin.id&&this.fallbacks.setSettings(a)}),this.proxiedOn=new Proxy({},{get:(s,a)=>this.target?this.target.on[a]:(...u)=>{this.onQueue.push({method:a,args:u})}}),this.proxiedTarget=new Proxy({},{get:(s,a)=>this.target?this.target[a]:a==="on"?this.proxiedOn:Object.keys(this.fallbacks).includes(a)?(...u)=>(this.targetQueue.push({method:a,args:u,resolve:()=>{}}),this.fallbacks[a](...u)):(...u)=>new Promise(f=>{this.targetQueue.push({method:a,args:u,resolve:f})})})}async setRealTarget(t){this.target=t;for(const n of this.onQueue)this.target.on[n.method](...n.args);for(const n of this.targetQueue)n.resolve(await this.target[n.method](...n.args))}}function wo(e,t){const n=e,r=tn(),o=fo(),i=ho&&n.enableEarlyProxy;if(o&&(r.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__||!i))o.emit(po,e,t);else{const s=i?new Eo(n,o):null;(r.__VUE_DEVTOOLS_PLUGINS__=r.__VUE_DEVTOOLS_PLUGINS__||[]).push({pluginDescriptor:n,setupFn:t,proxy:s}),s&&t(s.proxiedTarget)}}/*!
|
|
7
|
-
* vue-router v4.4.3
|
|
8
|
-
* (c) 2024 Eduardo San Martin Morote
|
|
9
|
-
* @license MIT
|
|
10
|
-
*/const z=typeof document<"u";function vo(e){return e.__esModule||e[Symbol.toStringTag]==="Module"}const C=Object.assign;function Ze(e,t){const n={};for(const r in t){const o=t[r];n[r]=M(o)?o.map(e):e(o)}return n}const de=()=>{},M=Array.isArray;function T(e){const t=Array.from(arguments).slice(1);console.warn.apply(console,["[Vue Router warn]: "+e].concat(t))}const nn=/#/g,bo=/&/g,Ro=/\//g,_o=/=/g,So=/\?/g,rn=/\+/g,Oo=/%5B/g,Ao=/%5D/g,on=/%5E/g,To=/%60/g,sn=/%7B/g,Po=/%7C/g,an=/%7D/g,No=/%20/g;function et(e){return encodeURI(""+e).replace(Po,"|").replace(Oo,"[").replace(Ao,"]")}function Co(e){return et(e).replace(sn,"{").replace(an,"}").replace(on,"^")}function tt(e){return et(e).replace(rn,"%2B").replace(No,"+").replace(nn,"%23").replace(bo,"%26").replace(To,"`").replace(sn,"{").replace(an,"}").replace(on,"^")}function ko(e){return tt(e).replace(_o,"%3D")}function xo(e){return et(e).replace(nn,"%23").replace(So,"%3F")}function Do(e){return e==null?"":xo(e).replace(Ro,"%2F")}function se(e){try{return decodeURIComponent(""+e)}catch{process.env.NODE_ENV!=="production"&&T(`Error decoding "${e}". Using original value`)}return""+e}const Io=/\/$/,Lo=e=>e.replace(Io,"");function nt(e,t,n="/"){let r,o={},i="",s="";const a=t.indexOf("#");let u=t.indexOf("?");return a<u&&a>=0&&(u=-1),u>-1&&(r=t.slice(0,u),i=t.slice(u+1,a>-1?a:t.length),o=e(i)),a>-1&&(r=r||t.slice(0,a),s=t.slice(a,t.length)),r=Bo(r??t,n),{fullPath:r+(i&&"?")+i+s,path:r,query:o,hash:se(s)}}function $o(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function cn(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function ln(e,t,n){const r=t.matched.length-1,o=n.matched.length-1;return r>-1&&r===o&&G(t.matched[r],n.matched[o])&&un(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function G(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function un(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(!jo(e[n],t[n]))return!1;return!0}function jo(e,t){return M(e)?fn(e,t):M(t)?fn(t,e):e===t}function fn(e,t){return M(t)?e.length===t.length&&e.every((n,r)=>n===t[r]):e.length===1&&e[0]===t}function Bo(e,t){if(e.startsWith("/"))return e;if(process.env.NODE_ENV!=="production"&&!t.startsWith("/"))return T(`Cannot resolve a relative location without an absolute path. Trying to resolve "${e}" from "${t}". It should look like "/${t}".`),e;if(!e)return t;const n=t.split("/"),r=e.split("/"),o=r[r.length-1];(o===".."||o===".")&&r.push("");let i=n.length-1,s,a;for(s=0;s<r.length;s++)if(a=r[s],a!==".")if(a==="..")i>1&&i--;else break;return n.slice(0,i).join("/")+"/"+r.slice(s).join("/")}const J={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};var he;(function(e){e.pop="pop",e.push="push"})(he||(he={}));var pe;(function(e){e.back="back",e.forward="forward",e.unknown=""})(pe||(pe={}));function Uo(e){if(!e)if(z){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),Lo(e)}const Fo=/^[^#]+#/;function Vo(e,t){return e.replace(Fo,"#")+t}function Mo(e,t){const n=document.documentElement.getBoundingClientRect(),r=e.getBoundingClientRect();return{behavior:t.behavior,left:r.left-n.left-(t.left||0),top:r.top-n.top-(t.top||0)}}const Ce=()=>({left:window.scrollX,top:window.scrollY});function qo(e){let t;if("el"in e){const n=e.el,r=typeof n=="string"&&n.startsWith("#");if(process.env.NODE_ENV!=="production"&&typeof e.el=="string"&&(!r||!document.getElementById(e.el.slice(1))))try{const i=document.querySelector(e.el);if(r&&i){T(`The selector "${e.el}" should be passed as "el: document.querySelector('${e.el}')" because it starts with "#".`);return}}catch{T(`The selector "${e.el}" is invalid. If you are using an id selector, make sure to escape it. You can find more information about escaping characters in selectors at https://mathiasbynens.be/notes/css-escapes or use CSS.escape (https://developer.mozilla.org/en-US/docs/Web/API/CSS/escape).`);return}const o=typeof n=="string"?r?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!o){process.env.NODE_ENV!=="production"&&T(`Couldn't find element using selector "${e.el}" returned by scrollBehavior.`);return}t=Mo(o,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.scrollX,t.top!=null?t.top:window.scrollY)}function dn(e,t){return(history.state?history.state.position-t:-1)+e}const rt=new Map;function Ho(e,t){rt.set(e,t)}function zo(e){const t=rt.get(e);return rt.delete(e),t}let Ko=()=>location.protocol+"//"+location.host;function hn(e,t){const{pathname:n,search:r,hash:o}=t,i=e.indexOf("#");if(i>-1){let a=o.includes(e.slice(i))?e.slice(i).length:1,u=o.slice(a);return u[0]!=="/"&&(u="/"+u),cn(u,"")}return cn(n,e)+r+o}function Wo(e,t,n,r){let o=[],i=[],s=null;const a=({state:d})=>{const m=hn(e,location),g=n.value,E=t.value;let y=0;if(d){if(n.value=m,t.value=d,s&&s===g){s=null;return}y=E?d.position-E.position:0}else r(m);o.forEach(A=>{A(n.value,g,{delta:y,type:he.pop,direction:y?y>0?pe.forward:pe.back:pe.unknown})})};function u(){s=n.value}function f(d){o.push(d);const m=()=>{const g=o.indexOf(d);g>-1&&o.splice(g,1)};return i.push(m),m}function c(){const{history:d}=window;d.state&&d.replaceState(C({},d.state,{scroll:Ce()}),"")}function l(){for(const d of i)d();i=[],window.removeEventListener("popstate",a),window.removeEventListener("beforeunload",c)}return window.addEventListener("popstate",a),window.addEventListener("beforeunload",c,{passive:!0}),{pauseListeners:u,listen:f,destroy:l}}function pn(e,t,n,r=!1,o=!1){return{back:e,current:t,forward:n,replaced:r,position:window.history.length,scroll:o?Ce():null}}function Go(e){const{history:t,location:n}=window,r={value:hn(e,n)},o={value:t.state};o.value||i(r.value,{back:null,current:r.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function i(u,f,c){const l=e.indexOf("#"),d=l>-1?(n.host&&document.querySelector("base")?e:e.slice(l))+u:Ko()+e+u;try{t[c?"replaceState":"pushState"](f,"",d),o.value=f}catch(m){process.env.NODE_ENV!=="production"?T("Error with push/replace State",m):console.error(m),n[c?"replace":"assign"](d)}}function s(u,f){const c=C({},t.state,pn(o.value.back,u,o.value.forward,!0),f,{position:o.value.position});i(u,c,!0),r.value=u}function a(u,f){const c=C({},o.value,t.state,{forward:u,scroll:Ce()});process.env.NODE_ENV!=="production"&&!t.state&&T(`history.state seems to have been manually replaced without preserving the necessary values. Make sure to preserve existing history state if you are manually calling history.replaceState:
|
|
11
|
-
|
|
12
|
-
history.replaceState(history.state, '', url)
|
|
13
|
-
|
|
14
|
-
You can find more information at https://router.vuejs.org/guide/migration/#Usage-of-history-state`),i(c.current,c,!0);const l=C({},pn(r.value,u,null),{position:c.position+1},f);i(u,l,!1),r.value=u}return{location:r,state:o,push:a,replace:s}}function Jo(e){e=Uo(e);const t=Go(e),n=Wo(e,t.state,t.location,t.replace);function r(i,s=!0){s||n.pauseListeners(),history.go(i)}const o=C({location:"",base:e,go:r,createHref:Vo.bind(null,e)},t,n);return Object.defineProperty(o,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(o,"state",{enumerable:!0,get:()=>t.state.value}),o}function ke(e){return typeof e=="string"||e&&typeof e=="object"}function mn(e){return typeof e=="string"||typeof e=="symbol"}const ot=Symbol(process.env.NODE_ENV!=="production"?"navigation failure":"");var gn;(function(e){e[e.aborted=4]="aborted",e[e.cancelled=8]="cancelled",e[e.duplicated=16]="duplicated"})(gn||(gn={}));const Qo={1({location:e,currentLocation:t}){return`No match for
|
|
15
|
-
${JSON.stringify(e)}${t?`
|
|
16
|
-
while being at
|
|
17
|
-
`+JSON.stringify(t):""}`},2({from:e,to:t}){return`Redirected from "${e.fullPath}" to "${Yo(t)}" via a navigation guard.`},4({from:e,to:t}){return`Navigation aborted from "${e.fullPath}" to "${t.fullPath}" via a navigation guard.`},8({from:e,to:t}){return`Navigation cancelled from "${e.fullPath}" to "${t.fullPath}" with a new navigation.`},16({from:e,to:t}){return`Avoided redundant navigation to current location: "${e.fullPath}".`}};function ie(e,t){return process.env.NODE_ENV!=="production"?C(new Error(Qo[e](t)),{type:e,[ot]:!0},t):C(new Error,{type:e,[ot]:!0},t)}function K(e,t){return e instanceof Error&&ot in e&&(t==null||!!(e.type&t))}const Xo=["params","query","hash"];function Yo(e){if(typeof e=="string")return e;if(e.path!=null)return e.path;const t={};for(const n of Xo)n in e&&(t[n]=e[n]);return JSON.stringify(t,null,2)}const yn="[^/]+?",Zo={sensitive:!1,strict:!1,start:!0,end:!0},es=/[.+*?^${}()[\]/\\]/g;function ts(e,t){const n=C({},Zo,t),r=[];let o=n.start?"^":"";const i=[];for(const f of e){const c=f.length?[]:[90];n.strict&&!f.length&&(o+="/");for(let l=0;l<f.length;l++){const d=f[l];let m=40+(n.sensitive?.25:0);if(d.type===0)l||(o+="/"),o+=d.value.replace(es,"\\$&"),m+=40;else if(d.type===1){const{value:g,repeatable:E,optional:y,regexp:A}=d;i.push({name:g,repeatable:E,optional:y});const S=A||yn;if(S!==yn){m+=10;try{new RegExp(`(${S})`)}catch(x){throw new Error(`Invalid custom RegExp for param "${g}" (${S}): `+x.message)}}let v=E?`((?:${S})(?:/(?:${S}))*)`:`(${S})`;l||(v=y&&f.length<2?`(?:/${v})`:"/"+v),y&&(v+="?"),o+=v,m+=20,y&&(m+=-8),E&&(m+=-20),S===".*"&&(m+=-50)}c.push(m)}r.push(c)}if(n.strict&&n.end){const f=r.length-1;r[f][r[f].length-1]+=.7000000000000001}n.strict||(o+="/?"),n.end?o+="$":n.strict&&(o+="(?:/|$)");const s=new RegExp(o,n.sensitive?"":"i");function a(f){const c=f.match(s),l={};if(!c)return null;for(let d=1;d<c.length;d++){const m=c[d]||"",g=i[d-1];l[g.name]=m&&g.repeatable?m.split("/"):m}return l}function u(f){let c="",l=!1;for(const d of e){(!l||!c.endsWith("/"))&&(c+="/"),l=!1;for(const m of d)if(m.type===0)c+=m.value;else if(m.type===1){const{value:g,repeatable:E,optional:y}=m,A=g in f?f[g]:"";if(M(A)&&!E)throw new Error(`Provided param "${g}" is an array but it is not repeatable (* or + modifiers)`);const S=M(A)?A.join("/"):A;if(!S)if(y)d.length<2&&(c.endsWith("/")?c=c.slice(0,-1):l=!0);else throw new Error(`Missing required param "${g}"`);c+=S}}return c||"/"}return{re:s,score:r,keys:i,parse:a,stringify:u}}function ns(e,t){let n=0;for(;n<e.length&&n<t.length;){const r=t[n]-e[n];if(r)return r;n++}return e.length<t.length?e.length===1&&e[0]===80?-1:1:e.length>t.length?t.length===1&&t[0]===80?1:-1:0}function En(e,t){let n=0;const r=e.score,o=t.score;for(;n<r.length&&n<o.length;){const i=ns(r[n],o[n]);if(i)return i;n++}if(Math.abs(o.length-r.length)===1){if(wn(r))return 1;if(wn(o))return-1}return o.length-r.length}function wn(e){const t=e[e.length-1];return e.length>0&&t[t.length-1]<0}const rs={type:0,value:""},os=/[a-zA-Z0-9_]/;function ss(e){if(!e)return[[]];if(e==="/")return[[rs]];if(!e.startsWith("/"))throw new Error(process.env.NODE_ENV!=="production"?`Route paths should start with a "/": "${e}" should be "/${e}".`:`Invalid path "${e}"`);function t(m){throw new Error(`ERR (${n})/"${f}": ${m}`)}let n=0,r=n;const o=[];let i;function s(){i&&o.push(i),i=[]}let a=0,u,f="",c="";function l(){f&&(n===0?i.push({type:0,value:f}):n===1||n===2||n===3?(i.length>1&&(u==="*"||u==="+")&&t(`A repeatable param (${f}) must be alone in its segment. eg: '/:ids+.`),i.push({type:1,value:f,regexp:c,repeatable:u==="*"||u==="+",optional:u==="*"||u==="?"})):t("Invalid state to consume buffer"),f="")}function d(){f+=u}for(;a<e.length;){if(u=e[a++],u==="\\"&&n!==2){r=n,n=4;continue}switch(n){case 0:u==="/"?(f&&l(),s()):u===":"?(l(),n=1):d();break;case 4:d(),n=r;break;case 1:u==="("?n=2:os.test(u)?d():(l(),n=0,u!=="*"&&u!=="?"&&u!=="+"&&a--);break;case 2:u===")"?c[c.length-1]=="\\"?c=c.slice(0,-1)+u:n=3:c+=u;break;case 3:l(),n=0,u!=="*"&&u!=="?"&&u!=="+"&&a--,c="";break;default:t("Unknown state");break}}return n===2&&t(`Unfinished custom RegExp for param "${f}"`),l(),s(),o}function is(e,t,n){const r=ts(ss(e.path),n);if(process.env.NODE_ENV!=="production"){const i=new Set;for(const s of r.keys)i.has(s.name)&&T(`Found duplicated params with name "${s.name}" for path "${e.path}". Only the last one will be available on "$route.params".`),i.add(s.name)}const o=C(r,{record:e,parent:t,children:[],alias:[]});return t&&!o.record.aliasOf==!t.record.aliasOf&&t.children.push(o),o}function as(e,t){const n=[],r=new Map;t=Rn({strict:!1,end:!0,sensitive:!1},t);function o(l){return r.get(l)}function i(l,d,m){const g=!m,E=cs(l);process.env.NODE_ENV!=="production"&&ds(E,d),E.aliasOf=m&&m.record;const y=Rn(t,l),A=[E];if("alias"in l){const x=typeof l.alias=="string"?[l.alias]:l.alias;for(const B of x)A.push(C({},E,{components:m?m.record.components:E.components,path:B,aliasOf:m?m.record:E}))}let S,v;for(const x of A){const{path:B}=x;if(d&&B[0]!=="/"){const j=d.record.path,D=j[j.length-1]==="/"?"":"/";x.path=d.record.path+(B&&D+B)}if(process.env.NODE_ENV!=="production"&&x.path==="*")throw new Error(`Catch all routes ("*") must now be defined using a param with a custom regexp.
|
|
18
|
-
See more at https://router.vuejs.org/guide/migration/#Removed-star-or-catch-all-routes.`);if(S=is(x,d,y),process.env.NODE_ENV!=="production"&&d&&B[0]==="/"&&hs(S,d),m?(m.alias.push(S),process.env.NODE_ENV!=="production"&&fs(m,S)):(v=v||S,v!==S&&v.alias.push(S),g&&l.name&&!bn(S)&&s(l.name)),_n(S)&&u(S),E.children){const j=E.children;for(let D=0;D<j.length;D++)i(j[D],S,m&&m.children[D])}m=m||S}return v?()=>{s(v)}:de}function s(l){if(mn(l)){const d=r.get(l);d&&(r.delete(l),n.splice(n.indexOf(d),1),d.children.forEach(s),d.alias.forEach(s))}else{const d=n.indexOf(l);d>-1&&(n.splice(d,1),l.record.name&&r.delete(l.record.name),l.children.forEach(s),l.alias.forEach(s))}}function a(){return n}function u(l){const d=ps(l,n);n.splice(d,0,l),l.record.name&&!bn(l)&&r.set(l.record.name,l)}function f(l,d){let m,g={},E,y;if("name"in l&&l.name){if(m=r.get(l.name),!m)throw ie(1,{location:l});if(process.env.NODE_ENV!=="production"){const v=Object.keys(l.params||{}).filter(x=>!m.keys.find(B=>B.name===x));v.length&&T(`Discarded invalid param(s) "${v.join('", "')}" when navigating. See https://github.com/vuejs/router/blob/main/packages/router/CHANGELOG.md#414-2022-08-22 for more details.`)}y=m.record.name,g=C(vn(d.params,m.keys.filter(v=>!v.optional).concat(m.parent?m.parent.keys.filter(v=>v.optional):[]).map(v=>v.name)),l.params&&vn(l.params,m.keys.map(v=>v.name))),E=m.stringify(g)}else if(l.path!=null)E=l.path,process.env.NODE_ENV!=="production"&&!E.startsWith("/")&&T(`The Matcher cannot resolve relative paths but received "${E}". Unless you directly called \`matcher.resolve("${E}")\`, this is probably a bug in vue-router. Please open an issue at https://github.com/vuejs/router/issues/new/choose.`),m=n.find(v=>v.re.test(E)),m&&(g=m.parse(E),y=m.record.name);else{if(m=d.name?r.get(d.name):n.find(v=>v.re.test(d.path)),!m)throw ie(1,{location:l,currentLocation:d});y=m.record.name,g=C({},d.params,l.params),E=m.stringify(g)}const A=[];let S=m;for(;S;)A.unshift(S.record),S=S.parent;return{name:y,path:E,params:g,matched:A,meta:us(A)}}e.forEach(l=>i(l));function c(){n.length=0,r.clear()}return{addRoute:i,resolve:f,removeRoute:s,clearRoutes:c,getRoutes:a,getRecordMatcher:o}}function vn(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}function cs(e){return{path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:void 0,beforeEnter:e.beforeEnter,props:ls(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 ls(e){const t={},n=e.props||!1;if("component"in e)t.default=n;else for(const r in e.components)t[r]=typeof n=="object"?n[r]:n;return t}function bn(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function us(e){return e.reduce((t,n)=>C(t,n.meta),{})}function Rn(e,t){const n={};for(const r in e)n[r]=r in t?t[r]:e[r];return n}function st(e,t){return e.name===t.name&&e.optional===t.optional&&e.repeatable===t.repeatable}function fs(e,t){for(const n of e.keys)if(!n.optional&&!t.keys.find(st.bind(null,n)))return T(`Alias "${t.record.path}" and the original record: "${e.record.path}" must have the exact same param named "${n.name}"`);for(const n of t.keys)if(!n.optional&&!e.keys.find(st.bind(null,n)))return T(`Alias "${t.record.path}" and the original record: "${e.record.path}" must have the exact same param named "${n.name}"`)}function ds(e,t){t&&t.record.name&&!e.name&&!e.path&&T(`The route named "${String(t.record.name)}" has a child without a name and an empty path. Using that name won't render the empty path child so you probably want to move the name to the child instead. If this is intentional, add a name to the child route to remove the warning.`)}function hs(e,t){for(const n of t.keys)if(!e.keys.find(st.bind(null,n)))return T(`Absolute path "${e.record.path}" must have the exact same param named "${n.name}" as its parent "${t.record.path}".`)}function ps(e,t){let n=0,r=t.length;for(;n!==r;){const i=n+r>>1;En(e,t[i])<0?r=i:n=i+1}const o=ms(e);return o&&(r=t.lastIndexOf(o,r-1),process.env.NODE_ENV!=="production"&&r<0&&T(`Finding ancestor route "${o.record.path}" failed for "${e.record.path}"`)),r}function ms(e){let t=e;for(;t=t.parent;)if(_n(t)&&En(e,t)===0)return t}function _n({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function gs(e){const t={};if(e===""||e==="?")return t;const r=(e[0]==="?"?e.slice(1):e).split("&");for(let o=0;o<r.length;++o){const i=r[o].replace(rn," "),s=i.indexOf("="),a=se(s<0?i:i.slice(0,s)),u=s<0?null:se(i.slice(s+1));if(a in t){let f=t[a];M(f)||(f=t[a]=[f]),f.push(u)}else t[a]=u}return t}function Sn(e){let t="";for(let n in e){const r=e[n];if(n=ko(n),r==null){r!==void 0&&(t+=(t.length?"&":"")+n);continue}(M(r)?r.map(i=>i&&tt(i)):[r&&tt(r)]).forEach(i=>{i!==void 0&&(t+=(t.length?"&":"")+n,i!=null&&(t+="="+i))})}return t}function ys(e){const t={};for(const n in e){const r=e[n];r!==void 0&&(t[n]=M(r)?r.map(o=>o==null?null:""+o):r==null?r:""+r)}return t}const Es=Symbol(process.env.NODE_ENV!=="production"?"router view location matched":""),On=Symbol(process.env.NODE_ENV!=="production"?"router view depth":""),it=Symbol(process.env.NODE_ENV!=="production"?"router":""),An=Symbol(process.env.NODE_ENV!=="production"?"route location":""),at=Symbol(process.env.NODE_ENV!=="production"?"router view location":"");function me(){let e=[];function t(r){return e.push(r),()=>{const o=e.indexOf(r);o>-1&&e.splice(o,1)}}function n(){e=[]}return{add:t,list:()=>e.slice(),reset:n}}function Q(e,t,n,r,o,i=s=>s()){const s=r&&(r.enterCallbacks[o]=r.enterCallbacks[o]||[]);return()=>new Promise((a,u)=>{const f=d=>{d===!1?u(ie(4,{from:n,to:t})):d instanceof Error?u(d):ke(d)?u(ie(2,{from:t,to:d})):(s&&r.enterCallbacks[o]===s&&typeof d=="function"&&s.push(d),a())},c=i(()=>e.call(r&&r.instances[o],t,n,process.env.NODE_ENV!=="production"?ws(f,t,n):f));let l=Promise.resolve(c);if(e.length<3&&(l=l.then(f)),process.env.NODE_ENV!=="production"&&e.length>2){const d=`The "next" callback was never called inside of ${e.name?'"'+e.name+'"':""}:
|
|
19
|
-
${e.toString()}
|
|
20
|
-
. If you are returning a value instead of calling "next", make sure to remove the "next" parameter from your function.`;if(typeof c=="object"&&"then"in c)l=l.then(m=>f._called?m:(T(d),Promise.reject(new Error("Invalid navigation guard"))));else if(c!==void 0&&!f._called){T(d),u(new Error("Invalid navigation guard"));return}}l.catch(d=>u(d))})}function ws(e,t,n){let r=0;return function(){r++===1&&T(`The "next" callback was called more than once in one navigation guard when going from "${n.fullPath}" to "${t.fullPath}". It should be called exactly one time in each navigation guard. This will fail in production.`),e._called=!0,r===1&&e.apply(null,arguments)}}function ct(e,t,n,r,o=i=>i()){const i=[];for(const s of e){process.env.NODE_ENV!=="production"&&!s.components&&!s.children.length&&T(`Record with path "${s.path}" is either missing a "component(s)" or "children" property.`);for(const a in s.components){let u=s.components[a];if(process.env.NODE_ENV!=="production"){if(!u||typeof u!="object"&&typeof u!="function")throw T(`Component "${a}" in record with path "${s.path}" is not a valid component. Received "${String(u)}".`),new Error("Invalid route component");if("then"in u){T(`Component "${a}" in record with path "${s.path}" is a Promise instead of a function that returns a Promise. Did you write "import('./MyPage.vue')" instead of "() => import('./MyPage.vue')" ? This will break in production if not fixed.`);const f=u;u=()=>f}else u.__asyncLoader&&!u.__warnedDefineAsync&&(u.__warnedDefineAsync=!0,T(`Component "${a}" in record with path "${s.path}" is defined using "defineAsyncComponent()". Write "() => import('./MyPage.vue')" instead of "defineAsyncComponent(() => import('./MyPage.vue'))".`))}if(!(t!=="beforeRouteEnter"&&!s.instances[a]))if(vs(u)){const c=(u.__vccOpts||u)[t];c&&i.push(Q(c,n,r,s,a,o))}else{let f=u();process.env.NODE_ENV!=="production"&&!("catch"in f)&&(T(`Component "${a}" in record with path "${s.path}" is a function that does not return a Promise. If you were passing a functional component, make sure to add a "displayName" to the component. This will break in production if not fixed.`),f=Promise.resolve(f)),i.push(()=>f.then(c=>{if(!c)return Promise.reject(new Error(`Couldn't resolve component "${a}" at "${s.path}"`));const l=vo(c)?c.default:c;s.components[a]=l;const m=(l.__vccOpts||l)[t];return m&&Q(m,n,r,s,a,o)()}))}}}return i}function vs(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function Tn(e){const t=_.inject(it),n=_.inject(An);let r=!1,o=null;const i=_.computed(()=>{const c=_.unref(e.to);return process.env.NODE_ENV!=="production"&&(!r||c!==o)&&(ke(c)||(r?T(`Invalid value for prop "to" in useLink()
|
|
21
|
-
- to:`,c,`
|
|
22
|
-
- previous to:`,o,`
|
|
23
|
-
- props:`,e):T(`Invalid value for prop "to" in useLink()
|
|
24
|
-
- to:`,c,`
|
|
25
|
-
- props:`,e)),o=c,r=!0),t.resolve(c)}),s=_.computed(()=>{const{matched:c}=i.value,{length:l}=c,d=c[l-1],m=n.matched;if(!d||!m.length)return-1;const g=m.findIndex(G.bind(null,d));if(g>-1)return g;const E=Pn(c[l-2]);return l>1&&Pn(d)===E&&m[m.length-1].path!==E?m.findIndex(G.bind(null,c[l-2])):g}),a=_.computed(()=>s.value>-1&&_s(n.params,i.value.params)),u=_.computed(()=>s.value>-1&&s.value===n.matched.length-1&&un(n.params,i.value.params));function f(c={}){return Rs(c)?t[_.unref(e.replace)?"replace":"push"](_.unref(e.to)).catch(de):Promise.resolve()}if(process.env.NODE_ENV!=="production"&&z){const c=_.getCurrentInstance();if(c){const l={route:i.value,isActive:a.value,isExactActive:u.value,error:null};c.__vrl_devtools=c.__vrl_devtools||[],c.__vrl_devtools.push(l),_.watchEffect(()=>{l.route=i.value,l.isActive=a.value,l.isExactActive=u.value,l.error=ke(_.unref(e.to))?null:'Invalid "to" value'},{flush:"post"})}}return{route:i,href:_.computed(()=>i.value.href),isActive:a,isExactActive:u,navigate:f}}const bs=_.defineComponent({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:Tn,setup(e,{slots:t}){const n=_.reactive(Tn(e)),{options:r}=_.inject(it),o=_.computed(()=>({[Nn(e.activeClass,r.linkActiveClass,"router-link-active")]:n.isActive,[Nn(e.exactActiveClass,r.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const i=t.default&&t.default(n);return e.custom?i:_.h("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:o.value},i)}}});function Rs(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 _s(e,t){for(const n in t){const r=t[n],o=e[n];if(typeof r=="string"){if(r!==o)return!1}else if(!M(o)||o.length!==r.length||r.some((i,s)=>i!==o[s]))return!1}return!0}function Pn(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const Nn=(e,t,n)=>e??t??n,Ss=_.defineComponent({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){process.env.NODE_ENV!=="production"&&As();const r=_.inject(at),o=_.computed(()=>e.route||r.value),i=_.inject(On,0),s=_.computed(()=>{let f=_.unref(i);const{matched:c}=o.value;let l;for(;(l=c[f])&&!l.components;)f++;return f}),a=_.computed(()=>o.value.matched[s.value]);_.provide(On,_.computed(()=>s.value+1)),_.provide(Es,a),_.provide(at,o);const u=_.ref();return _.watch(()=>[u.value,a.value,e.name],([f,c,l],[d,m,g])=>{c&&(c.instances[l]=f,m&&m!==c&&f&&f===d&&(c.leaveGuards.size||(c.leaveGuards=m.leaveGuards),c.updateGuards.size||(c.updateGuards=m.updateGuards))),f&&c&&(!m||!G(c,m)||!d)&&(c.enterCallbacks[l]||[]).forEach(E=>E(f))},{flush:"post"}),()=>{const f=o.value,c=e.name,l=a.value,d=l&&l.components[c];if(!d)return Cn(n.default,{Component:d,route:f});const m=l.props[c],g=m?m===!0?f.params:typeof m=="function"?m(f):m:null,E=A=>{A.component.isUnmounted&&(l.instances[c]=null)},y=_.h(d,C({},g,t,{onVnodeUnmounted:E,ref:u}));if(process.env.NODE_ENV!=="production"&&z&&y.ref){const A={depth:s.value,name:l.name,path:l.path,meta:l.meta};(M(y.ref)?y.ref.map(v=>v.i):[y.ref.i]).forEach(v=>{v.__vrv_devtools=A})}return Cn(n.default,{Component:y,route:f})||y}}});function Cn(e,t){if(!e)return null;const n=e(t);return n.length===1?n[0]:n}const Os=Ss;function As(){const e=_.getCurrentInstance(),t=e.parent&&e.parent.type.name,n=e.parent&&e.parent.subTree&&e.parent.subTree.type;if(t&&(t==="KeepAlive"||t.includes("Transition"))&&typeof n=="object"&&n.name==="RouterView"){const r=t==="KeepAlive"?"keep-alive":"transition";T(`<router-view> can no longer be used directly inside <transition> or <keep-alive>.
|
|
26
|
-
Use slot props instead:
|
|
27
|
-
|
|
28
|
-
<router-view v-slot="{ Component }">
|
|
29
|
-
<${r}>
|
|
30
|
-
<component :is="Component" />
|
|
31
|
-
</${r}>
|
|
32
|
-
</router-view>`)}}function ge(e,t){const n=C({},e,{matched:e.matched.map(r=>js(r,["instances","children","aliasOf"]))});return{_custom:{type:null,readOnly:!0,display:e.fullPath,tooltip:t,value:n}}}function xe(e){return{_custom:{display:e}}}let Ts=0;function Ps(e,t,n){if(t.__hasDevtools)return;t.__hasDevtools=!0;const r=Ts++;wo({id:"org.vuejs.router"+(r?"."+r:""),label:"Vue Router",packageName:"vue-router",homepage:"https://router.vuejs.org",logo:"https://router.vuejs.org/logo.png",componentStateTypes:["Routing"],app:e},o=>{typeof o.now!="function"&&console.warn("[Vue Router]: You seem to be using an outdated version of Vue Devtools. Are you still using the Beta release instead of the stable one? You can find the links at https://devtools.vuejs.org/guide/installation.html."),o.on.inspectComponent((c,l)=>{c.instanceData&&c.instanceData.state.push({type:"Routing",key:"$route",editable:!1,value:ge(t.currentRoute.value,"Current Route")})}),o.on.visitComponentTree(({treeNode:c,componentInstance:l})=>{if(l.__vrv_devtools){const d=l.__vrv_devtools;c.tags.push({label:(d.name?`${d.name.toString()}: `:"")+d.path,textColor:0,tooltip:"This component is rendered by <router-view>",backgroundColor:kn})}M(l.__vrl_devtools)&&(l.__devtoolsApi=o,l.__vrl_devtools.forEach(d=>{let m=d.route.path,g=In,E="",y=0;d.error?(m=d.error,g=Ds,y=Is):d.isExactActive?(g=Dn,E="This is exactly active"):d.isActive&&(g=xn,E="This link is active"),c.tags.push({label:m,textColor:y,tooltip:E,backgroundColor:g})}))}),_.watch(t.currentRoute,()=>{u(),o.notifyComponentUpdate(),o.sendInspectorTree(a),o.sendInspectorState(a)});const i="router:navigations:"+r;o.addTimelineLayer({id:i,label:`Router${r?" "+r:""} Navigations`,color:4237508}),t.onError((c,l)=>{o.addTimelineEvent({layerId:i,event:{title:"Error during Navigation",subtitle:l.fullPath,logType:"error",time:o.now(),data:{error:c},groupId:l.meta.__navigationId}})});let s=0;t.beforeEach((c,l)=>{const d={guard:xe("beforeEach"),from:ge(l,"Current Location during this navigation"),to:ge(c,"Target location")};Object.defineProperty(c.meta,"__navigationId",{value:s++}),o.addTimelineEvent({layerId:i,event:{time:o.now(),title:"Start of navigation",subtitle:c.fullPath,data:d,groupId:c.meta.__navigationId}})}),t.afterEach((c,l,d)=>{const m={guard:xe("afterEach")};d?(m.failure={_custom:{type:Error,readOnly:!0,display:d?d.message:"",tooltip:"Navigation Failure",value:d}},m.status=xe("❌")):m.status=xe("✅"),m.from=ge(l,"Current Location during this navigation"),m.to=ge(c,"Target location"),o.addTimelineEvent({layerId:i,event:{title:"End of navigation",subtitle:c.fullPath,time:o.now(),data:m,logType:d?"warning":"default",groupId:c.meta.__navigationId}})});const a="router-inspector:"+r;o.addInspector({id:a,label:"Routes"+(r?" "+r:""),icon:"book",treeFilterPlaceholder:"Search routes"});function u(){if(!f)return;const c=f;let l=n.getRoutes().filter(d=>!d.parent||!d.parent.record.components);l.forEach(jn),c.filter&&(l=l.filter(d=>lt(d,c.filter.toLowerCase()))),l.forEach(d=>$n(d,t.currentRoute.value)),c.rootNodes=l.map(Ln)}let f;o.on.getInspectorTree(c=>{f=c,c.app===e&&c.inspectorId===a&&u()}),o.on.getInspectorState(c=>{if(c.app===e&&c.inspectorId===a){const d=n.getRoutes().find(m=>m.record.__vd_id===c.nodeId);d&&(c.state={options:Cs(d)})}}),o.sendInspectorTree(a),o.sendInspectorState(a)})}function Ns(e){return e.optional?e.repeatable?"*":"?":e.repeatable?"+":""}function Cs(e){const{record:t}=e,n=[{editable:!1,key:"path",value:t.path}];return t.name!=null&&n.push({editable:!1,key:"name",value:t.name}),n.push({editable:!1,key:"regexp",value:e.re}),e.keys.length&&n.push({editable:!1,key:"keys",value:{_custom:{type:null,readOnly:!0,display:e.keys.map(r=>`${r.name}${Ns(r)}`).join(" "),tooltip:"Param keys",value:e.keys}}}),t.redirect!=null&&n.push({editable:!1,key:"redirect",value:t.redirect}),e.alias.length&&n.push({editable:!1,key:"aliases",value:e.alias.map(r=>r.record.path)}),Object.keys(e.record.meta).length&&n.push({editable:!1,key:"meta",value:e.record.meta}),n.push({key:"score",editable:!1,value:{_custom:{type:null,readOnly:!0,display:e.score.map(r=>r.join(", ")).join(" | "),tooltip:"Score used to sort routes",value:e.score}}}),n}const kn=15485081,xn=2450411,Dn=8702998,ks=2282478,In=16486972,xs=6710886,Ds=16704226,Is=12131356;function Ln(e){const t=[],{record:n}=e;n.name!=null&&t.push({label:String(n.name),textColor:0,backgroundColor:ks}),n.aliasOf&&t.push({label:"alias",textColor:0,backgroundColor:In}),e.__vd_match&&t.push({label:"matches",textColor:0,backgroundColor:kn}),e.__vd_exactActive&&t.push({label:"exact",textColor:0,backgroundColor:Dn}),e.__vd_active&&t.push({label:"active",textColor:0,backgroundColor:xn}),n.redirect&&t.push({label:typeof n.redirect=="string"?`redirect: ${n.redirect}`:"redirects",textColor:16777215,backgroundColor:xs});let r=n.__vd_id;return r==null&&(r=String(Ls++),n.__vd_id=r),{id:r,label:n.path,tags:t,children:e.children.map(Ln)}}let Ls=0;const $s=/^\/(.*)\/([a-z]*)$/;function $n(e,t){const n=t.matched.length&&G(t.matched[t.matched.length-1],e.record);e.__vd_exactActive=e.__vd_active=n,n||(e.__vd_active=t.matched.some(r=>G(r,e.record))),e.children.forEach(r=>$n(r,t))}function jn(e){e.__vd_match=!1,e.children.forEach(jn)}function lt(e,t){const n=String(e.re).match($s);if(e.__vd_match=!1,!n||n.length<3)return!1;if(new RegExp(n[1].replace(/\$$/,""),n[2]).test(t))return e.children.forEach(s=>lt(s,t)),e.record.path!=="/"||t==="/"?(e.__vd_match=e.re.test(t),!0):!1;const o=e.record.path.toLowerCase(),i=se(o);return!t.startsWith("/")&&(i.includes(t)||o.includes(t))||i.startsWith(t)||o.startsWith(t)||e.record.name&&String(e.record.name).includes(t)?!0:e.children.some(s=>lt(s,t))}function js(e,t){const n={};for(const r in e)t.includes(r)||(n[r]=e[r]);return n}function Bs(e){const t=as(e.routes,e),n=e.parseQuery||gs,r=e.stringifyQuery||Sn,o=e.history;if(process.env.NODE_ENV!=="production"&&!o)throw new Error('Provide the "history" option when calling "createRouter()": https://router.vuejs.org/api/interfaces/RouterOptions.html#history');const i=me(),s=me(),a=me(),u=_.shallowRef(J);let f=J;z&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const c=Ze.bind(null,p=>""+p),l=Ze.bind(null,Do),d=Ze.bind(null,se);function m(p,b){let w,R;return mn(p)?(w=t.getRecordMatcher(p),process.env.NODE_ENV!=="production"&&!w&&T(`Parent route "${String(p)}" not found when adding child route`,b),R=b):R=p,t.addRoute(R,w)}function g(p){const b=t.getRecordMatcher(p);b?t.removeRoute(b):process.env.NODE_ENV!=="production"&&T(`Cannot remove non-existent route "${String(p)}"`)}function E(){return t.getRoutes().map(p=>p.record)}function y(p){return!!t.getRecordMatcher(p)}function A(p,b){if(b=C({},b||u.value),typeof p=="string"){const P=nt(n,p,b.path),I=t.resolve({path:P.path},b),te=o.createHref(P.fullPath);return process.env.NODE_ENV!=="production"&&(te.startsWith("//")?T(`Location "${p}" resolved to "${te}". A resolved location cannot start with multiple slashes.`):I.matched.length||T(`No match found for location with path "${p}"`)),C(P,I,{params:d(I.params),hash:se(P.hash),redirectedFrom:void 0,href:te})}if(process.env.NODE_ENV!=="production"&&!ke(p))return T(`router.resolve() was passed an invalid location. This will fail in production.
|
|
33
|
-
- Location:`,p),A({});let w;if(p.path!=null)process.env.NODE_ENV!=="production"&&"params"in p&&!("name"in p)&&Object.keys(p.params).length&&T(`Path "${p.path}" was passed with params but they will be ignored. Use a named route alongside params instead.`),w=C({},p,{path:nt(n,p.path,b.path).path});else{const P=C({},p.params);for(const I in P)P[I]==null&&delete P[I];w=C({},p,{params:l(P)}),b.params=l(b.params)}const R=t.resolve(w,b),k=p.hash||"";process.env.NODE_ENV!=="production"&&k&&!k.startsWith("#")&&T(`A \`hash\` should always start with the character "#". Replace "${k}" with "#${k}".`),R.params=c(d(R.params));const $=$o(r,C({},p,{hash:Co(k),path:R.path})),N=o.createHref($);return process.env.NODE_ENV!=="production"&&(N.startsWith("//")?T(`Location "${p}" resolved to "${N}". A resolved location cannot start with multiple slashes.`):R.matched.length||T(`No match found for location with path "${p.path!=null?p.path:p}"`)),C({fullPath:$,hash:k,query:r===Sn?ys(p.query):p.query||{}},R,{redirectedFrom:void 0,href:N})}function S(p){return typeof p=="string"?nt(n,p,u.value.path):C({},p)}function v(p,b){if(f!==p)return ie(8,{from:b,to:p})}function x(p){return D(p)}function B(p){return x(C(S(p),{replace:!0}))}function j(p){const b=p.matched[p.matched.length-1];if(b&&b.redirect){const{redirect:w}=b;let R=typeof w=="function"?w(p):w;if(typeof R=="string"&&(R=R.includes("?")||R.includes("#")?R=S(R):{path:R},R.params={}),process.env.NODE_ENV!=="production"&&R.path==null&&!("name"in R))throw T(`Invalid redirect found:
|
|
34
|
-
${JSON.stringify(R,null,2)}
|
|
35
|
-
when navigating to "${p.fullPath}". A redirect must contain a name or path. This will break in production.`),new Error("Invalid redirect");return C({query:p.query,hash:p.hash,params:R.path!=null?{}:p.params},R)}}function D(p,b){const w=f=A(p),R=u.value,k=p.state,$=p.force,N=p.replace===!0,P=j(w);if(P)return D(C(S(P),{state:typeof P=="object"?C({},k,P.state):k,force:$,replace:N}),b||w);const I=w;I.redirectedFrom=b;let te;return!$&&ln(r,R,w)&&(te=ie(16,{to:I,from:R}),Mn(R,R,!0,!1)),(te?Promise.resolve(te):Ee(I,R)).catch(U=>K(U)?K(U,2)?U:pt(U):ht(U,I,R)).then(U=>{if(U){if(K(U,2))return process.env.NODE_ENV!=="production"&&ln(r,A(U.to),I)&&b&&(b._count=b._count?b._count+1:1)>30?(T(`Detected a possibly infinite redirection in a navigation guard when going from "${R.fullPath}" to "${I.fullPath}". Aborting to avoid a Stack Overflow.
|
|
36
|
-
Are you always returning a new location within a navigation guard? That would lead to this error. Only return when redirecting or aborting, that should fix this. This might break in production if not fixed.`),Promise.reject(new Error("Infinite redirect in navigation guard"))):D(C({replace:N},S(U.to),{state:typeof U.to=="object"?C({},k,U.to.state):k,force:$}),b||I)}else U=Fn(I,R,!0,N,k);return Un(I,R,U),U})}function ye(p,b){const w=v(p,b);return w?Promise.reject(w):Promise.resolve()}function X(p){const b=Le.values().next().value;return b&&typeof b.runWithContext=="function"?b.runWithContext(p):p()}function Ee(p,b){let w;const[R,k,$]=Us(p,b);w=ct(R.reverse(),"beforeRouteLeave",p,b);for(const P of R)P.leaveGuards.forEach(I=>{w.push(Q(I,p,b))});const N=ye.bind(null,p,b);return w.push(N),ae(w).then(()=>{w=[];for(const P of i.list())w.push(Q(P,p,b));return w.push(N),ae(w)}).then(()=>{w=ct(k,"beforeRouteUpdate",p,b);for(const P of k)P.updateGuards.forEach(I=>{w.push(Q(I,p,b))});return w.push(N),ae(w)}).then(()=>{w=[];for(const P of $)if(P.beforeEnter)if(M(P.beforeEnter))for(const I of P.beforeEnter)w.push(Q(I,p,b));else w.push(Q(P.beforeEnter,p,b));return w.push(N),ae(w)}).then(()=>(p.matched.forEach(P=>P.enterCallbacks={}),w=ct($,"beforeRouteEnter",p,b,X),w.push(N),ae(w))).then(()=>{w=[];for(const P of s.list())w.push(Q(P,p,b));return w.push(N),ae(w)}).catch(P=>K(P,8)?P:Promise.reject(P))}function Un(p,b,w){a.list().forEach(R=>X(()=>R(p,b,w)))}function Fn(p,b,w,R,k){const $=v(p,b);if($)return $;const N=b===J,P=z?history.state:{};w&&(R||N?o.replace(p.fullPath,C({scroll:N&&P&&P.scroll},k)):o.push(p.fullPath,k)),u.value=p,Mn(p,b,w,N),pt()}let we;function Gs(){we||(we=o.listen((p,b,w)=>{const R=A(p),k=j(R);if(k){D(C(k,{replace:!0}),R).catch(de);return}f=R;const $=u.value;z&&Ho(dn($.fullPath,w.delta),Ce()),Ee(R,$).catch(N=>K(N,12)?N:K(N,2)?(D(N.to,R).then(P=>{K(P,20)&&!w.delta&&w.type===he.pop&&o.go(-1,!1)}).catch(de),Promise.reject()):(w.delta&&o.go(-w.delta,!1),ht(N,R,$))).then(N=>{N=N||Fn(R,$,!1),N&&(w.delta&&!K(N,8)?o.go(-w.delta,!1):w.type===he.pop&&K(N,20)&&o.go(-1,!1)),Un(R,$,N)}).catch(de)}))}let dt=me(),Vn=me(),Ie;function ht(p,b,w){pt(p);const R=Vn.list();return R.length?R.forEach(k=>k(p,b,w)):(process.env.NODE_ENV!=="production"&&T("uncaught error during route navigation:"),console.error(p)),Promise.reject(p)}function Js(){return Ie&&u.value!==J?Promise.resolve():new Promise((p,b)=>{dt.add([p,b])})}function pt(p){return Ie||(Ie=!p,Gs(),dt.list().forEach(([b,w])=>p?w(p):b()),dt.reset()),p}function Mn(p,b,w,R){const{scrollBehavior:k}=e;if(!z||!k)return Promise.resolve();const $=!w&&zo(dn(p.fullPath,0))||(R||!w)&&history.state&&history.state.scroll||null;return _.nextTick().then(()=>k(p,b,$)).then(N=>N&&qo(N)).catch(N=>ht(N,p,b))}const mt=p=>o.go(p);let gt;const Le=new Set,Qs={currentRoute:u,listening:!0,addRoute:m,removeRoute:g,clearRoutes:t.clearRoutes,hasRoute:y,getRoutes:E,resolve:A,options:e,push:x,replace:B,go:mt,back:()=>mt(-1),forward:()=>mt(1),beforeEach:i.add,beforeResolve:s.add,afterEach:a.add,onError:Vn.add,isReady:Js,install(p){const b=this;p.component("RouterLink",bs),p.component("RouterView",Os),p.config.globalProperties.$router=b,Object.defineProperty(p.config.globalProperties,"$route",{enumerable:!0,get:()=>_.unref(u)}),z&&!gt&&u.value===J&&(gt=!0,x(o.location).catch(k=>{process.env.NODE_ENV!=="production"&&T("Unexpected error when starting the router:",k)}));const w={};for(const k in J)Object.defineProperty(w,k,{get:()=>u.value[k],enumerable:!0});p.provide(it,b),p.provide(An,_.shallowReactive(w)),p.provide(at,u);const R=p.unmount;Le.add(p),p.unmount=function(){Le.delete(p),Le.size<1&&(f=J,we&&we(),we=null,u.value=J,gt=!1,Ie=!1),R()},process.env.NODE_ENV!=="production"&&z&&Ps(p,b,t)}};function ae(p){return p.reduce((b,w)=>b.then(()=>X(w)),Promise.resolve())}return Qs}function Us(e,t){const n=[],r=[],o=[],i=Math.max(t.matched.length,e.matched.length);for(let s=0;s<i;s++){const a=t.matched[s];a&&(e.matched.find(f=>G(f,a))?r.push(a):n.push(a));const u=e.matched[s];u&&(t.matched.find(f=>G(f,u))||o.push(u))}return[n,r,o]}const Bn=Bs({history:Jo("/framework-ui-pc"),routes:[]});Bn.beforeEach(async(e,t,n)=>{n()});/*! js-cookie v3.0.5 | MIT */function De(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)e[r]=n[r]}return e}var Fs={read:function(e){return e[0]==='"'&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function ut(e,t){function n(o,i,s){if(!(typeof document>"u")){s=De({},t,s),typeof s.expires=="number"&&(s.expires=new Date(Date.now()+s.expires*864e5)),s.expires&&(s.expires=s.expires.toUTCString()),o=encodeURIComponent(o).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var a="";for(var u in s)s[u]&&(a+="; "+u,s[u]!==!0&&(a+="="+s[u].split(";")[0]));return document.cookie=o+"="+e.write(i,o)+a}}function r(o){if(!(typeof document>"u"||arguments.length&&!o)){for(var i=document.cookie?document.cookie.split("; "):[],s={},a=0;a<i.length;a++){var u=i[a].split("="),f=u.slice(1).join("=");try{var c=decodeURIComponent(u[0]);if(s[c]=e.read(f,c),o===c)break}catch{}}return o?s[o]:s}}return Object.create({set:n,get:r,remove:function(o,i){n(o,"",De({},i,{expires:-1}))},withAttributes:function(o){return ut(this.converter,De({},this.attributes,o))},withConverter:function(o){return ut(De({},this.converter,o),this.attributes)}},{attributes:{value:Object.freeze(t)},converter:{value:Object.freeze(e)}})}var Vs=ut(Fs,{path:"/"});const Ms="Sso-Access-Token",qs="ssoAccessToken",Hs="ssoRefreshToken",zs=function(){Vs.remove(Ms),localStorage.removeItem(qs),localStorage.removeItem(Hs)},ft=L.create({baseURL:"/gateway-api/",timeout:5e3,headers:{}});ft.interceptors.request.use(e=>{let t=localStorage.getItem("gatewayAccessToken")??"",n=localStorage.getItem("ssoAccessToken")??"";return t&&(e.headers["Gateway-Access-Token"]=t),n&&(e.headers["Sso-Access-Token"]=n),e.headers["Request-Id"]="test",e},e=>Promise.reject(e)),ft.interceptors.response.use(e=>e.data.statusCode===401?(zs(),Bn.push("/sso/login"),Promise.reject(new Error(e.data.message))):e,e=>Promise.reject(e));const Ks=Object.freeze(Object.defineProperty({__proto__:null,initGateway:()=>new Promise(async e=>{if(!localStorage.getItem("gatewayAccessToken")){let n=await ft.get("/server/gateway/getGatewayAccessToken");if(n.data.statusCode!=200)return EleMessage.error(n.data.message);localStorage.setItem("gatewayAccessToken",n.data.data.gatewayAccessToken)}e()})},Symbol.toStringTag,{value:"Module"})),Ws=[qn];return{install:function(e){Ws.forEach(t=>{e.component(t.name,t)})},gatewayUtils:Ks}});
|
|
1
|
+
(function(e,o){typeof exports=="object"&&typeof module<"u"?module.exports=o(require("vue")):typeof define=="function"&&define.amd?define(["vue"],o):(e=typeof globalThis<"u"?globalThis:e||self,e["yuang-framework-ui-pc"]=o(e.Vue))})(this,function(e){"use strict";const i=[((t,n)=>{const c=t.__vccOpts||t;for(const[s,u]of n)c[s]=u;return c})(e.defineComponent({__name:"index",setup(t){const{proxy:n}=e.getCurrentInstance(),c=()=>{n.$message.success("我是测试按钮")};return(s,u)=>(e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("button",{onClick:c},"我是测试按钮")]))}}),[["__scopeId","data-v-581224de"]])];return function(t){i.forEach(n=>{t.component(n.name,n)})}});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "yuang-framework-ui-pc",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.10",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
|
@@ -23,15 +23,8 @@
|
|
|
23
23
|
"author": "yuang",
|
|
24
24
|
"license": "ISC",
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@wangeditor/editor": "^5.1.23",
|
|
27
|
-
"@wangeditor/editor-for-vue": "^5.1.12",
|
|
28
|
-
"axios": "^1.7.3",
|
|
29
26
|
"element-plus": "^2.7.8",
|
|
30
|
-
"
|
|
31
|
-
"moment": "^2.30.1",
|
|
32
|
-
"pinia": "^2.1.7",
|
|
33
|
-
"vue": "^3.4.29",
|
|
34
|
-
"vue-router": "^4.3.3"
|
|
27
|
+
"yuang-framework-ui-common": "^1.0.3"
|
|
35
28
|
},
|
|
36
29
|
"devDependencies": {
|
|
37
30
|
"@rushstack/eslint-patch": "^1.8.0",
|
package/src/App.vue
CHANGED
|
@@ -1,12 +1,28 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<RouterView/>
|
|
3
|
-
<yu-button></yu-button>
|
|
2
|
+
<RouterView v-if="isShowRouterView"/>
|
|
4
3
|
</template>
|
|
5
4
|
<script setup lang="ts">
|
|
6
5
|
import {RouterView} from 'vue-router'
|
|
6
|
+
import {onBeforeMount, ref, getCurrentInstance} from 'vue';
|
|
7
|
+
import {initGateway} from 'yuang-framework-ui-common/lib/utils/gatewayUtils'
|
|
7
8
|
|
|
8
|
-
|
|
9
|
+
let isShowRouterView = ref(false);
|
|
9
10
|
|
|
11
|
+
const {proxy} = getCurrentInstance() as any;
|
|
12
|
+
|
|
13
|
+
onBeforeMount(async () => {
|
|
14
|
+
await initGateway();
|
|
15
|
+
isShowRouterView.value = true;
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
// proxy.$http.post("/sso-api/server/sso/login", {}).then((res: any) => {
|
|
19
|
+
// if (res.data.statusCode != 200) {
|
|
20
|
+
// return proxy.$message.error(res.data.message);
|
|
21
|
+
// }
|
|
22
|
+
// });
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
})
|
|
10
26
|
</script>
|
|
11
27
|
|
|
12
28
|
|
package/src/main.ts
CHANGED
|
@@ -15,7 +15,7 @@ import { ElMessage } from 'element-plus'
|
|
|
15
15
|
const app = createApp(App)
|
|
16
16
|
|
|
17
17
|
|
|
18
|
-
import http from '
|
|
18
|
+
import http from 'yuang-framework-ui-common/lib/config/http';
|
|
19
19
|
|
|
20
20
|
app.config.globalProperties.$http = http;
|
|
21
21
|
app.config.globalProperties.$message = ElMessage
|
|
@@ -36,4 +36,7 @@ npm config get registry
|
|
|
36
36
|
npm config set registry=https://registry.npmmirror.com
|
|
37
37
|
|
|
38
38
|
|
|
39
|
+
npm run build
|
|
40
|
+
npm publish
|
|
41
|
+
|
|
39
42
|
*/
|
package/src/router/index.ts
CHANGED
|
@@ -3,7 +3,13 @@ import {createRouter, createWebHistory} from 'vue-router'
|
|
|
3
3
|
const router = createRouter({
|
|
4
4
|
history: createWebHistory(import.meta.env.BASE_URL),
|
|
5
5
|
routes: [
|
|
6
|
-
|
|
6
|
+
{
|
|
7
|
+
path: '/components/yu-button/index',
|
|
8
|
+
component: () => import('@/views/components/yu-button/index.vue'),
|
|
9
|
+
meta: {
|
|
10
|
+
title: ''
|
|
11
|
+
}
|
|
12
|
+
}
|
|
7
13
|
]
|
|
8
14
|
})
|
|
9
15
|
|
package/src/shims-vue.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* shims-vue.d.ts文件是一种声明文件,用来告诉TypeScript如何处理.vue文件,填补TypeScript对.vue文件类型识别缺失的文件,为Vue.js的单文件组件提供类型定义支持。
|
|
3
|
-
* 否则会报错:Vue: Could not find a declaration file for module @/
|
|
3
|
+
* 否则会报错:Vue: Could not find a declaration file for module @/components/YuButton/index.
|
|
4
4
|
*/
|
|
5
5
|
/* eslint-disable */
|
|
6
6
|
declare module '*.vue' {
|
package/src/config/http.ts
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import axios from "axios"
|
|
2
|
-
import router from "@/router/index";
|
|
3
|
-
|
|
4
|
-
import {clearSsoAccessToken} from '@/utils/ssoUtils';
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
const $http = axios.create({
|
|
8
|
-
baseURL: '/gateway-api/',
|
|
9
|
-
timeout: 5000,
|
|
10
|
-
headers: {}
|
|
11
|
-
})
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
/* 请求拦截 */
|
|
15
|
-
$http.interceptors.request.use(config => {
|
|
16
|
-
|
|
17
|
-
let gatewayAccessToken = localStorage.getItem("gatewayAccessToken") ?? '';
|
|
18
|
-
let ssoAccessToken = localStorage.getItem("ssoAccessToken") ?? '';
|
|
19
|
-
if (gatewayAccessToken) {
|
|
20
|
-
config.headers["Gateway-Access-Token"] = gatewayAccessToken;
|
|
21
|
-
}
|
|
22
|
-
if (ssoAccessToken) {
|
|
23
|
-
config.headers["Sso-Access-Token"] = ssoAccessToken;
|
|
24
|
-
}
|
|
25
|
-
config.headers["Request-Id"] = 'test';
|
|
26
|
-
return config;
|
|
27
|
-
}, err => Promise.reject(err));
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
/* 响应拦截器 */
|
|
31
|
-
$http.interceptors.response.use((res) => {
|
|
32
|
-
// 登录过期处理
|
|
33
|
-
if (res.data.statusCode === 401) {
|
|
34
|
-
clearSsoAccessToken();
|
|
35
|
-
router.push('/sso/login');
|
|
36
|
-
return Promise.reject(new Error(res.data.message));
|
|
37
|
-
}
|
|
38
|
-
return res;
|
|
39
|
-
}, (error) => {
|
|
40
|
-
return Promise.reject(error);
|
|
41
|
-
});
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
export default $http
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import {ElMessage} from 'element-plus/es';
|
|
2
|
-
|
|
3
|
-
import http from '@/config/http';
|
|
4
|
-
|
|
5
|
-
const initGateway = () => {
|
|
6
|
-
return new Promise(async resolve => {
|
|
7
|
-
let gatewayAccessToken = localStorage.getItem("gatewayAccessToken");
|
|
8
|
-
if (!gatewayAccessToken) {
|
|
9
|
-
let res = await http.get('/server/gateway/getGatewayAccessToken');
|
|
10
|
-
if (res.data.statusCode != 200) {
|
|
11
|
-
return EleMessage.error(res.data.message);
|
|
12
|
-
}
|
|
13
|
-
localStorage.setItem("gatewayAccessToken", res.data.data.gatewayAccessToken);
|
|
14
|
-
}
|
|
15
|
-
resolve();
|
|
16
|
-
})
|
|
17
|
-
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
export {
|
|
21
|
-
initGateway
|
|
22
|
-
}
|
package/src/utils/ssoUtils.ts
DELETED
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import Cookies from 'js-cookie'
|
|
5
|
-
|
|
6
|
-
const getSsoLoginUrl = function () {
|
|
7
|
-
return 'http://localhost:8110/sso-ui-pc/sso/login';
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
const getSsoLogoutUrl = function () {
|
|
11
|
-
return 'http://localhost:8110/sso-ui-pc/sso/logout';
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
const ssoAccessTokenCookieKey:string = 'Sso-Access-Token';
|
|
16
|
-
const ssoAccessTokenLocalKey:string = 'ssoAccessToken';
|
|
17
|
-
const ssoRefreshTokenLocalKey:string = 'ssoRefreshToken';
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
const getSsoAccessToken = function () {
|
|
21
|
-
let ssoAccessToken = Cookies.get(ssoAccessTokenCookieKey);
|
|
22
|
-
|
|
23
|
-
if (!ssoAccessToken) {
|
|
24
|
-
ssoAccessToken = localStorage.getItem(ssoAccessTokenLocalKey) as string;
|
|
25
|
-
return ssoAccessToken
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
return ssoAccessToken
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
const setSsoAccessToken = function (param: any) {
|
|
33
|
-
localStorage.setItem(ssoAccessTokenLocalKey, param.ssoAccessToken);
|
|
34
|
-
localStorage.setItem(ssoRefreshTokenLocalKey, param.ssoRefreshToken);
|
|
35
|
-
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
const clearSsoAccessToken = function () {
|
|
40
|
-
Cookies.remove(ssoAccessTokenCookieKey);
|
|
41
|
-
|
|
42
|
-
localStorage.removeItem(ssoAccessTokenLocalKey);
|
|
43
|
-
localStorage.removeItem(ssoRefreshTokenLocalKey);
|
|
44
|
-
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
export {
|
|
49
|
-
getSsoLoginUrl,
|
|
50
|
-
getSsoLogoutUrl,
|
|
51
|
-
|
|
52
|
-
getSsoAccessToken,
|
|
53
|
-
setSsoAccessToken,
|
|
54
|
-
|
|
55
|
-
clearSsoAccessToken,
|
|
56
|
-
|
|
57
|
-
}
|
|
File without changes
|