@vtj/pro 0.8.134 → 0.8.136
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/@vtj/materials/assets/antdv/index.umd.js +2 -2
- package/dist/@vtj/materials/assets/charts/index.umd.js +2 -2
- package/dist/@vtj/materials/assets/element/index.umd.js +2 -2
- package/dist/@vtj/materials/assets/ui/index.umd.js +2 -2
- package/dist/@vtj/materials/deps/@vtj/charts/index.umd.js +2 -2
- package/dist/@vtj/materials/deps/@vtj/icons/index.umd.js +2 -2
- package/dist/@vtj/materials/deps/@vtj/ui/index.umd.js +12 -12
- package/dist/@vtj/materials/deps/@vtj/ui/style.css +1 -1
- package/dist/@vtj/materials/deps/@vtj/utils/index.umd.js +2 -2
- package/dist/@vtj/materials/deps/ant-design-vue/antd.min.js +1 -1
- package/dist/@vtj/materials/deps/element-plus/index.full.min.js +13 -13
- package/dist/@vtj/materials/deps/element-plus/zh-cn.js +1 -1
- package/dist/@vtj/materials/deps/vue-router/vue-router.global.js +40 -22
- package/dist/@vtj/materials/deps/vue-router/vue-router.global.prod.js +2 -2
- package/dist/assets/{Editor-Dtm2GYTx-xp460S5i.js → Editor-Dtm2GYTx-BT6MLqBK.js} +1 -1
- package/dist/assets/element-plus-DUXCcJ7v.js +21 -0
- package/dist/assets/extension-CPPqgHgD.css +1 -0
- package/dist/assets/{extension-DR30K3Yp.js → extension-HrOMgIFJ.js} +63 -63
- package/dist/assets/{index-CCwRxaP3.js → index-9vHGsqPM.js} +2 -2
- package/dist/assets/{index-4rLhjS-2.js → index-DpvyxLap.js} +1 -1
- package/dist/assets/{monaco-editor-DbXJANJ4.js → monaco-editor-DHettOks.js} +1 -1
- package/dist/assets/{preview-CKGRCS4J.js → preview-DlsTJUxD.js} +2 -2
- package/dist/assets/vue-router-BCeT4m1E.js +5 -0
- package/dist/index.html +6 -6
- package/package.json +11 -11
- package/dist/assets/element-plus-yz11ZeSD.js +0 -21
- package/dist/assets/extension-DQ_KE2A9.css +0 -1
- package/dist/assets/vue-router-Cbi7cS6v.js +0 -5
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import{s as at,u as Y,aw as lt,G as j,k as T,n as ut,H as ft,a8 as ht,a5 as pt,d as ze,a0 as dt,I as Ke,K as le,e as mt,f as gt}from"./@vue-C7bUvahi.js";/*!
|
|
2
|
-
* vue-router v4.4.3
|
|
3
|
-
* (c) 2024 Eduardo San Martin Morote
|
|
4
|
-
* @license MIT
|
|
5
|
-
*/const K=typeof document!="undefined";function Ue(e){return e.__esModule||e[Symbol.toStringTag]==="Module"}const w=Object.assign;function ue(e,t){const n={};for(const r in t){const o=t[r];n[r]=I(o)?o.map(e):e(o)}return n}const X=()=>{},I=Array.isArray,Ve=/#/g,vt=/&/g,yt=/\//g,Rt=/=/g,Et=/\?/g,De=/\+/g,Pt=/%5B/g,wt=/%5D/g,Qe=/%5E/g,St=/%60/g,We=/%7B/g,Ct=/%7C/g,Fe=/%7D/g,kt=/%20/g;function ve(e){return encodeURI(""+e).replace(Ct,"|").replace(Pt,"[").replace(wt,"]")}function bt(e){return ve(e).replace(We,"{").replace(Fe,"}").replace(Qe,"^")}function de(e){return ve(e).replace(De,"%2B").replace(kt,"+").replace(Ve,"%23").replace(vt,"%26").replace(St,"`").replace(We,"{").replace(Fe,"}").replace(Qe,"^")}function At(e){return de(e).replace(Rt,"%3D")}function Ot(e){return ve(e).replace(Ve,"%23").replace(Et,"%3F")}function _t(e){return e==null?"":Ot(e).replace(yt,"%2F")}function Z(e){try{return decodeURIComponent(""+e)}catch(t){}return""+e}const xt=/\/$/,Mt=e=>e.replace(xt,"");function fe(e,t,n="/"){let r,o={},a="",p="";const d=t.indexOf("#");let i=t.indexOf("?");return d<i&&d>=0&&(i=-1),i>-1&&(r=t.slice(0,i),a=t.slice(i+1,d>-1?d:t.length),o=e(a)),d>-1&&(r=r||t.slice(0,d),p=t.slice(d,t.length)),r=Nt(r!=null?r:t,n),{fullPath:r+(a&&"?")+a+p,path:r,query:o,hash:Z(p)}}function Lt(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function be(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function It(e,t,n){const r=t.matched.length-1,o=n.matched.length-1;return r>-1&&r===o&&U(t.matched[r],n.matched[o])&&Ye(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function U(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function Ye(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(!Tt(e[n],t[n]))return!1;return!0}function Tt(e,t){return I(e)?Ae(e,t):I(t)?Ae(t,e):e===t}function Ae(e,t){return I(t)?e.length===t.length&&e.every((n,r)=>n===t[r]):e.length===1&&e[0]===t}function Nt(e,t){if(e.startsWith("/"))return e;if(!e)return t;const n=t.split("/"),r=e.split("/"),o=r[r.length-1];(o===".."||o===".")&&r.push("");let a=n.length-1,p,d;for(p=0;p<r.length;p++)if(d=r[p],d!==".")if(d==="..")a>1&&a--;else break;return n.slice(0,a).join("/")+"/"+r.slice(p).join("/")}const $={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};var V;(function(e){e.pop="pop",e.push="push"})(V||(V={}));var q;(function(e){e.back="back",e.forward="forward",e.unknown=""})(q||(q={}));const he="";function Xe(e){if(!e)if(K){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),Mt(e)}const jt=/^[^#]+#/;function Ze(e,t){return e.replace(jt,"#")+t}function Ht(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 te=()=>({left:window.scrollX,top:window.scrollY});function $t(e){let t;if("el"in e){const n=e.el,r=typeof n=="string"&&n.startsWith("#"),o=typeof n=="string"?r?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!o)return;t=Ht(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 Oe(e,t){return(history.state?history.state.position-t:-1)+e}const me=new Map;function Bt(e,t){me.set(e,t)}function Gt(e){const t=me.get(e);return me.delete(e),t}let qt=()=>location.protocol+"//"+location.host;function Je(e,t){const{pathname:n,search:r,hash:o}=t,a=e.indexOf("#");if(a>-1){let d=o.includes(e.slice(a))?e.slice(a).length:1,i=o.slice(d);return i[0]!=="/"&&(i="/"+i),be(i,"")}return be(n,e)+r+o}function zt(e,t,n,r){let o=[],a=[],p=null;const d=({state:l})=>{const u=Je(e,location),P=n.value,S=t.value;let b=0;if(l){if(n.value=u,t.value=l,p&&p===P){p=null;return}b=S?l.position-S.position:0}else r(u);o.forEach(A=>{A(n.value,P,{delta:b,type:V.pop,direction:b?b>0?q.forward:q.back:q.unknown})})};function i(){p=n.value}function f(l){o.push(l);const u=()=>{const P=o.indexOf(l);P>-1&&o.splice(P,1)};return a.push(u),u}function h(){const{history:l}=window;l.state&&l.replaceState(w({},l.state,{scroll:te()}),"")}function c(){for(const l of a)l();a=[],window.removeEventListener("popstate",d),window.removeEventListener("beforeunload",h)}return window.addEventListener("popstate",d),window.addEventListener("beforeunload",h,{passive:!0}),{pauseListeners:i,listen:f,destroy:c}}function _e(e,t,n,r=!1,o=!1){return{back:e,current:t,forward:n,replaced:r,position:window.history.length,scroll:o?te():null}}function Kt(e){const{history:t,location:n}=window,r={value:Je(e,n)},o={value:t.state};o.value||a(r.value,{back:null,current:r.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function a(i,f,h){const c=e.indexOf("#"),l=c>-1?(n.host&&document.querySelector("base")?e:e.slice(c))+i:qt()+e+i;try{t[h?"replaceState":"pushState"](f,"",l),o.value=f}catch(u){console.error(u),n[h?"replace":"assign"](l)}}function p(i,f){const h=w({},t.state,_e(o.value.back,i,o.value.forward,!0),f,{position:o.value.position});a(i,h,!0),r.value=i}function d(i,f){const h=w({},o.value,t.state,{forward:i,scroll:te()});a(h.current,h,!0);const c=w({},_e(r.value,i,null),{position:h.position+1},f);a(i,c,!1),r.value=i}return{location:r,state:o,push:d,replace:p}}function Ut(e){e=Xe(e);const t=Kt(e),n=zt(e,t.state,t.location,t.replace);function r(a,p=!0){p||n.pauseListeners(),history.go(a)}const o=w({location:"",base:e,go:r,createHref:Ze.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 yn(e=""){let t=[],n=[he],r=0;e=Xe(e);function o(d){r++,r!==n.length&&n.splice(r),n.push(d)}function a(d,i,{direction:f,delta:h}){const c={direction:f,delta:h,type:V.pop};for(const l of t)l(d,i,c)}const p={location:he,state:{},base:e,createHref:Ze.bind(null,e),replace(d){n.splice(r--,1),o(d)},push(d,i){o(d)},listen(d){return t.push(d),()=>{const i=t.indexOf(d);i>-1&&t.splice(i,1)}},destroy(){t=[],n=[he],r=0},go(d,i=!0){const f=this.location,h=d<0?q.back:q.forward;r=Math.max(0,Math.min(r+d,n.length-1)),i&&a(this.location,f,{direction:h,delta:d})}};return Object.defineProperty(p,"location",{enumerable:!0,get:()=>n[r]}),p}function Rn(e){return e=location.host?e||location.pathname+location.search:"",e.includes("#")||(e+="#"),Ut(e)}function Vt(e){return typeof e=="string"||e&&typeof e=="object"}function et(e){return typeof e=="string"||typeof e=="symbol"}const tt=Symbol("");var xe;(function(e){e[e.aborted=4]="aborted",e[e.cancelled=8]="cancelled",e[e.duplicated=16]="duplicated"})(xe||(xe={}));function D(e,t){return w(new Error,{type:e,[tt]:!0},t)}function N(e,t){return e instanceof Error&&tt in e&&(t==null||!!(e.type&t))}const Me="[^/]+?",Dt={sensitive:!1,strict:!1,start:!0,end:!0},Qt=/[.+*?^${}()[\]/\\]/g;function Wt(e,t){const n=w({},Dt,t),r=[];let o=n.start?"^":"";const a=[];for(const f of e){const h=f.length?[]:[90];n.strict&&!f.length&&(o+="/");for(let c=0;c<f.length;c++){const l=f[c];let u=40+(n.sensitive?.25:0);if(l.type===0)c||(o+="/"),o+=l.value.replace(Qt,"\\$&"),u+=40;else if(l.type===1){const{value:P,repeatable:S,optional:b,regexp:A}=l;a.push({name:P,repeatable:S,optional:b});const E=A||Me;if(E!==Me){u+=10;try{new RegExp(`(${E})`)}catch(L){throw new Error(`Invalid custom RegExp for param "${P}" (${E}): `+L.message)}}let C=S?`((?:${E})(?:/(?:${E}))*)`:`(${E})`;c||(C=b&&f.length<2?`(?:/${C})`:"/"+C),b&&(C+="?"),o+=C,u+=20,b&&(u+=-8),S&&(u+=-20),E===".*"&&(u+=-50)}h.push(u)}r.push(h)}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 p=new RegExp(o,n.sensitive?"":"i");function d(f){const h=f.match(p),c={};if(!h)return null;for(let l=1;l<h.length;l++){const u=h[l]||"",P=a[l-1];c[P.name]=u&&P.repeatable?u.split("/"):u}return c}function i(f){let h="",c=!1;for(const l of e){(!c||!h.endsWith("/"))&&(h+="/"),c=!1;for(const u of l)if(u.type===0)h+=u.value;else if(u.type===1){const{value:P,repeatable:S,optional:b}=u,A=P in f?f[P]:"";if(I(A)&&!S)throw new Error(`Provided param "${P}" is an array but it is not repeatable (* or + modifiers)`);const E=I(A)?A.join("/"):A;if(!E)if(b)l.length<2&&(h.endsWith("/")?h=h.slice(0,-1):c=!0);else throw new Error(`Missing required param "${P}"`);h+=E}}return h||"/"}return{re:p,score:r,keys:a,parse:d,stringify:i}}function Ft(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 nt(e,t){let n=0;const r=e.score,o=t.score;for(;n<r.length&&n<o.length;){const a=Ft(r[n],o[n]);if(a)return a;n++}if(Math.abs(o.length-r.length)===1){if(Le(r))return 1;if(Le(o))return-1}return o.length-r.length}function Le(e){const t=e[e.length-1];return e.length>0&&t[t.length-1]<0}const Yt={type:0,value:""},Xt=/[a-zA-Z0-9_]/;function Zt(e){if(!e)return[[]];if(e==="/")return[[Yt]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(u){throw new Error(`ERR (${n})/"${f}": ${u}`)}let n=0,r=n;const o=[];let a;function p(){a&&o.push(a),a=[]}let d=0,i,f="",h="";function c(){f&&(n===0?a.push({type:0,value:f}):n===1||n===2||n===3?(a.length>1&&(i==="*"||i==="+")&&t(`A repeatable param (${f}) must be alone in its segment. eg: '/:ids+.`),a.push({type:1,value:f,regexp:h,repeatable:i==="*"||i==="+",optional:i==="*"||i==="?"})):t("Invalid state to consume buffer"),f="")}function l(){f+=i}for(;d<e.length;){if(i=e[d++],i==="\\"&&n!==2){r=n,n=4;continue}switch(n){case 0:i==="/"?(f&&c(),p()):i===":"?(c(),n=1):l();break;case 4:l(),n=r;break;case 1:i==="("?n=2:Xt.test(i)?l():(c(),n=0,i!=="*"&&i!=="?"&&i!=="+"&&d--);break;case 2:i===")"?h[h.length-1]=="\\"?h=h.slice(0,-1)+i:n=3:h+=i;break;case 3:c(),n=0,i!=="*"&&i!=="?"&&i!=="+"&&d--,h="";break;default:t("Unknown state");break}}return n===2&&t(`Unfinished custom RegExp for param "${f}"`),c(),p(),o}function Jt(e,t,n){const r=Wt(Zt(e.path),n),o=w(r,{record:e,parent:t,children:[],alias:[]});return t&&!o.record.aliasOf==!t.record.aliasOf&&t.children.push(o),o}function en(e,t){const n=[],r=new Map;t=Ne({strict:!1,end:!0,sensitive:!1},t);function o(c){return r.get(c)}function a(c,l,u){const P=!u,S=tn(c);S.aliasOf=u&&u.record;const b=Ne(t,c),A=[S];if("alias"in c){const L=typeof c.alias=="string"?[c.alias]:c.alias;for(const G of L)A.push(w({},S,{components:u?u.record.components:S.components,path:G,aliasOf:u?u.record:S}))}let E,C;for(const L of A){const{path:G}=L;if(l&&G[0]!=="/"){const H=l.record.path,M=H[H.length-1]==="/"?"":"/";L.path=l.record.path+(G&&M+G)}if(E=Jt(L,l,b),u?u.alias.push(E):(C=C||E,C!==E&&C.alias.push(E),P&&c.name&&!Te(E)&&p(c.name)),rt(E)&&i(E),S.children){const H=S.children;for(let M=0;M<H.length;M++)a(H[M],E,u&&u.children[M])}u=u||E}return C?()=>{p(C)}:X}function p(c){if(et(c)){const l=r.get(c);l&&(r.delete(c),n.splice(n.indexOf(l),1),l.children.forEach(p),l.alias.forEach(p))}else{const l=n.indexOf(c);l>-1&&(n.splice(l,1),c.record.name&&r.delete(c.record.name),c.children.forEach(p),c.alias.forEach(p))}}function d(){return n}function i(c){const l=on(c,n);n.splice(l,0,c),c.record.name&&!Te(c)&&r.set(c.record.name,c)}function f(c,l){let u,P={},S,b;if("name"in c&&c.name){if(u=r.get(c.name),!u)throw D(1,{location:c});b=u.record.name,P=w(Ie(l.params,u.keys.filter(C=>!C.optional).concat(u.parent?u.parent.keys.filter(C=>C.optional):[]).map(C=>C.name)),c.params&&Ie(c.params,u.keys.map(C=>C.name))),S=u.stringify(P)}else if(c.path!=null)S=c.path,u=n.find(C=>C.re.test(S)),u&&(P=u.parse(S),b=u.record.name);else{if(u=l.name?r.get(l.name):n.find(C=>C.re.test(l.path)),!u)throw D(1,{location:c,currentLocation:l});b=u.record.name,P=w({},l.params,c.params),S=u.stringify(P)}const A=[];let E=u;for(;E;)A.unshift(E.record),E=E.parent;return{name:b,path:S,params:P,matched:A,meta:rn(A)}}e.forEach(c=>a(c));function h(){n.length=0,r.clear()}return{addRoute:a,resolve:f,removeRoute:p,clearRoutes:h,getRoutes:d,getRecordMatcher:o}}function Ie(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}function tn(e){return{path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:void 0,beforeEnter:e.beforeEnter,props:nn(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 nn(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 Te(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function rn(e){return e.reduce((t,n)=>w(t,n.meta),{})}function Ne(e,t){const n={};for(const r in e)n[r]=r in t?t[r]:e[r];return n}function on(e,t){let n=0,r=t.length;for(;n!==r;){const a=n+r>>1;nt(e,t[a])<0?r=a:n=a+1}const o=sn(e);return o&&(r=t.lastIndexOf(o,r-1)),r}function sn(e){let t=e;for(;t=t.parent;)if(rt(t)&&nt(e,t)===0)return t}function rt({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function cn(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 a=r[o].replace(De," "),p=a.indexOf("="),d=Z(p<0?a:a.slice(0,p)),i=p<0?null:Z(a.slice(p+1));if(d in t){let f=t[d];I(f)||(f=t[d]=[f]),f.push(i)}else t[d]=i}return t}function je(e){let t="";for(let n in e){const r=e[n];if(n=At(n),r==null){r!==void 0&&(t+=(t.length?"&":"")+n);continue}(I(r)?r.map(a=>a&&de(a)):[r&&de(r)]).forEach(a=>{a!==void 0&&(t+=(t.length?"&":"")+n,a!=null&&(t+="="+a))})}return t}function an(e){const t={};for(const n in e){const r=e[n];r!==void 0&&(t[n]=I(r)?r.map(o=>o==null?null:""+o):r==null?r:""+r)}return t}const ye=Symbol(""),He=Symbol(""),ne=Symbol(""),Re=Symbol(""),ge=Symbol("");function F(){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 ot(e,t,n){const r=()=>{e[t].delete(n)};ft(r),ht(r),pt(()=>{e[t].add(n)}),e[t].add(n)}function En(e){const t=j(ye,{}).value;t&&ot(t,"leaveGuards",e)}function Pn(e){const t=j(ye,{}).value;t&&ot(t,"updateGuards",e)}function B(e,t,n,r,o,a=p=>p()){const p=r&&(r.enterCallbacks[o]=r.enterCallbacks[o]||[]);return()=>new Promise((d,i)=>{const f=l=>{l===!1?i(D(4,{from:n,to:t})):l instanceof Error?i(l):Vt(l)?i(D(2,{from:t,to:l})):(p&&r.enterCallbacks[o]===p&&typeof l=="function"&&p.push(l),d())},h=a(()=>e.call(r&&r.instances[o],t,n,f));let c=Promise.resolve(h);e.length<3&&(c=c.then(f)),c.catch(l=>i(l))})}function pe(e,t,n,r,o=a=>a()){const a=[];for(const p of e)for(const d in p.components){let i=p.components[d];if(!(t!=="beforeRouteEnter"&&!p.instances[d]))if(ln(i)){const h=(i.__vccOpts||i)[t];h&&a.push(B(h,n,r,p,d,o))}else{let f=i();a.push(()=>f.then(h=>{if(!h)return Promise.reject(new Error(`Couldn't resolve component "${d}" at "${p.path}"`));const c=Ue(h)?h.default:h;p.components[d]=c;const u=(c.__vccOpts||c)[t];return u&&B(u,n,r,p,d,o)()}))}}return a}function ln(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function wn(e){return e.matched.every(t=>t.redirect)?Promise.reject(new Error("Cannot load a route that redirects.")):Promise.all(e.matched.map(t=>t.components&&Promise.all(Object.keys(t.components).reduce((n,r)=>{const o=t.components[r];return typeof o=="function"&&!("displayName"in o)&&n.push(o().then(a=>{if(!a)return Promise.reject(new Error(`Couldn't resolve component "${r}" at "${t.path}". Ensure you passed a function that returns a promise.`));const p=Ue(a)?a.default:a;t.components[r]=p})),n},[])))).then(()=>e)}function $e(e){const t=j(ne),n=j(Re),r=T(()=>{const i=Y(e.to);return t.resolve(i)}),o=T(()=>{const{matched:i}=r.value,{length:f}=i,h=i[f-1],c=n.matched;if(!h||!c.length)return-1;const l=c.findIndex(U.bind(null,h));if(l>-1)return l;const u=Be(i[f-2]);return f>1&&Be(h)===u&&c[c.length-1].path!==u?c.findIndex(U.bind(null,i[f-2])):l}),a=T(()=>o.value>-1&&pn(n.params,r.value.params)),p=T(()=>o.value>-1&&o.value===n.matched.length-1&&Ye(n.params,r.value.params));function d(i={}){return hn(i)?t[Y(e.replace)?"replace":"push"](Y(e.to)).catch(X):Promise.resolve()}return{route:r,href:T(()=>r.value.href),isActive:a,isExactActive:p,navigate:d}}const un=ze({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:$e,setup(e,{slots:t}){const n=dt($e(e)),{options:r}=j(ne),o=T(()=>({[Ge(e.activeClass,r.linkActiveClass,"router-link-active")]:n.isActive,[Ge(e.exactActiveClass,r.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const a=t.default&&t.default(n);return e.custom?a:Ke("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:o.value},a)}}}),fn=un;function hn(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 pn(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(!I(o)||o.length!==r.length||r.some((a,p)=>a!==o[p]))return!1}return!0}function Be(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const Ge=(e,t,n)=>e!=null?e:t!=null?t:n,dn=ze({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){const r=j(ge),o=T(()=>e.route||r.value),a=j(He,0),p=T(()=>{let f=Y(a);const{matched:h}=o.value;let c;for(;(c=h[f])&&!c.components;)f++;return f}),d=T(()=>o.value.matched[p.value]);le(He,T(()=>p.value+1)),le(ye,d),le(ge,o);const i=mt();return gt(()=>[i.value,d.value,e.name],([f,h,c],[l,u,P])=>{h&&(h.instances[c]=f,u&&u!==h&&f&&f===l&&(h.leaveGuards.size||(h.leaveGuards=u.leaveGuards),h.updateGuards.size||(h.updateGuards=u.updateGuards))),f&&h&&(!u||!U(h,u)||!l)&&(h.enterCallbacks[c]||[]).forEach(S=>S(f))},{flush:"post"}),()=>{const f=o.value,h=e.name,c=d.value,l=c&&c.components[h];if(!l)return qe(n.default,{Component:l,route:f});const u=c.props[h],P=u?u===!0?f.params:typeof u=="function"?u(f):u:null,b=Ke(l,w({},P,t,{onVnodeUnmounted:A=>{A.component.isUnmounted&&(c.instances[h]=null)},ref:i}));return qe(n.default,{Component:b,route:f})||b}}});function qe(e,t){if(!e)return null;const n=e(t);return n.length===1?n[0]:n}const mn=dn;function Sn(e){const t=en(e.routes,e),n=e.parseQuery||cn,r=e.stringifyQuery||je,o=e.history,a=F(),p=F(),d=F(),i=at($);let f=$;K&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const h=ue.bind(null,s=>""+s),c=ue.bind(null,_t),l=ue.bind(null,Z);function u(s,g){let m,v;return et(s)?(m=t.getRecordMatcher(s),v=g):v=s,t.addRoute(v,m)}function P(s){const g=t.getRecordMatcher(s);g&&t.removeRoute(g)}function S(){return t.getRoutes().map(s=>s.record)}function b(s){return!!t.getRecordMatcher(s)}function A(s,g){if(g=w({},g||i.value),typeof s=="string"){const y=fe(n,s,g.path),_=t.resolve({path:y.path},g),W=o.createHref(y.fullPath);return w(y,_,{params:l(_.params),hash:Z(y.hash),redirectedFrom:void 0,href:W})}let m;if(s.path!=null)m=w({},s,{path:fe(n,s.path,g.path).path});else{const y=w({},s.params);for(const _ in y)y[_]==null&&delete y[_];m=w({},s,{params:c(y)}),g.params=c(g.params)}const v=t.resolve(m,g),k=s.hash||"";v.params=h(l(v.params));const O=Lt(r,w({},s,{hash:bt(k),path:v.path})),R=o.createHref(O);return w({fullPath:O,hash:k,query:r===je?an(s.query):s.query||{}},v,{redirectedFrom:void 0,href:R})}function E(s){return typeof s=="string"?fe(n,s,i.value.path):w({},s)}function C(s,g){if(f!==s)return D(8,{from:g,to:s})}function L(s){return M(s)}function G(s){return L(w(E(s),{replace:!0}))}function H(s){const g=s.matched[s.matched.length-1];if(g&&g.redirect){const{redirect:m}=g;let v=typeof m=="function"?m(s):m;return typeof v=="string"&&(v=v.includes("?")||v.includes("#")?v=E(v):{path:v},v.params={}),w({query:s.query,hash:s.hash,params:v.path!=null?{}:s.params},v)}}function M(s,g){const m=f=A(s),v=i.value,k=s.state,O=s.force,R=s.replace===!0,y=H(m);if(y)return M(w(E(y),{state:typeof y=="object"?w({},k,y.state):k,force:O,replace:R}),g||m);const _=m;_.redirectedFrom=g;let W;return!O&&It(r,v,m)&&(W=D(16,{to:_,from:v}),Ce(v,v,!0,!1)),(W?Promise.resolve(W):Ee(_,v)).catch(x=>N(x)?N(x,2)?x:ie(x):se(x,_,v)).then(x=>{if(x){if(N(x,2))return M(w({replace:R},E(x.to),{state:typeof x.to=="object"?w({},k,x.to.state):k,force:O}),g||_)}else x=we(_,v,!0,R,k);return Pe(_,v,x),x})}function st(s,g){const m=C(s,g);return m?Promise.reject(m):Promise.resolve()}function re(s){const g=ee.values().next().value;return g&&typeof g.runWithContext=="function"?g.runWithContext(s):s()}function Ee(s,g){let m;const[v,k,O]=gn(s,g);m=pe(v.reverse(),"beforeRouteLeave",s,g);for(const y of v)y.leaveGuards.forEach(_=>{m.push(B(_,s,g))});const R=st.bind(null,s,g);return m.push(R),z(m).then(()=>{m=[];for(const y of a.list())m.push(B(y,s,g));return m.push(R),z(m)}).then(()=>{m=pe(k,"beforeRouteUpdate",s,g);for(const y of k)y.updateGuards.forEach(_=>{m.push(B(_,s,g))});return m.push(R),z(m)}).then(()=>{m=[];for(const y of O)if(y.beforeEnter)if(I(y.beforeEnter))for(const _ of y.beforeEnter)m.push(B(_,s,g));else m.push(B(y.beforeEnter,s,g));return m.push(R),z(m)}).then(()=>(s.matched.forEach(y=>y.enterCallbacks={}),m=pe(O,"beforeRouteEnter",s,g,re),m.push(R),z(m))).then(()=>{m=[];for(const y of p.list())m.push(B(y,s,g));return m.push(R),z(m)}).catch(y=>N(y,8)?y:Promise.reject(y))}function Pe(s,g,m){d.list().forEach(v=>re(()=>v(s,g,m)))}function we(s,g,m,v,k){const O=C(s,g);if(O)return O;const R=g===$,y=K?history.state:{};m&&(v||R?o.replace(s.fullPath,w({scroll:R&&y&&y.scroll},k)):o.push(s.fullPath,k)),i.value=s,Ce(s,g,m,R),ie()}let Q;function it(){Q||(Q=o.listen((s,g,m)=>{if(!ke.listening)return;const v=A(s),k=H(v);if(k){M(w(k,{replace:!0}),v).catch(X);return}f=v;const O=i.value;K&&Bt(Oe(O.fullPath,m.delta),te()),Ee(v,O).catch(R=>N(R,12)?R:N(R,2)?(M(R.to,v).then(y=>{N(y,20)&&!m.delta&&m.type===V.pop&&o.go(-1,!1)}).catch(X),Promise.reject()):(m.delta&&o.go(-m.delta,!1),se(R,v,O))).then(R=>{R=R||we(v,O,!1),R&&(m.delta&&!N(R,8)?o.go(-m.delta,!1):m.type===V.pop&&N(R,20)&&o.go(-1,!1)),Pe(v,O,R)}).catch(X)}))}let oe=F(),Se=F(),J;function se(s,g,m){ie(s);const v=Se.list();return v.length?v.forEach(k=>k(s,g,m)):console.error(s),Promise.reject(s)}function ct(){return J&&i.value!==$?Promise.resolve():new Promise((s,g)=>{oe.add([s,g])})}function ie(s){return J||(J=!s,it(),oe.list().forEach(([g,m])=>s?m(s):g()),oe.reset()),s}function Ce(s,g,m,v){const{scrollBehavior:k}=e;if(!K||!k)return Promise.resolve();const O=!m&&Gt(Oe(s.fullPath,0))||(v||!m)&&history.state&&history.state.scroll||null;return ut().then(()=>k(s,g,O)).then(R=>R&&$t(R)).catch(R=>se(R,s,g))}const ce=s=>o.go(s);let ae;const ee=new Set,ke={currentRoute:i,listening:!0,addRoute:u,removeRoute:P,clearRoutes:t.clearRoutes,hasRoute:b,getRoutes:S,resolve:A,options:e,push:L,replace:G,go:ce,back:()=>ce(-1),forward:()=>ce(1),beforeEach:a.add,beforeResolve:p.add,afterEach:d.add,onError:Se.add,isReady:ct,install(s){const g=this;s.component("RouterLink",fn),s.component("RouterView",mn),s.config.globalProperties.$router=g,Object.defineProperty(s.config.globalProperties,"$route",{enumerable:!0,get:()=>Y(i)}),K&&!ae&&i.value===$&&(ae=!0,L(o.location).catch(k=>{}));const m={};for(const k in $)Object.defineProperty(m,k,{get:()=>i.value[k],enumerable:!0});s.provide(ne,g),s.provide(Re,lt(m)),s.provide(ge,i);const v=s.unmount;ee.add(s),s.unmount=function(){ee.delete(s),ee.size<1&&(f=$,Q&&Q(),Q=null,i.value=$,ae=!1,J=!1),v()}}};function z(s){return s.reduce((g,m)=>g.then(()=>re(m)),Promise.resolve())}return ke}function gn(e,t){const n=[],r=[],o=[],a=Math.max(t.matched.length,e.matched.length);for(let p=0;p<a;p++){const d=t.matched[p];d&&(e.matched.find(f=>U(f,d))?r.push(d):n.push(d));const i=e.matched[p];i&&(t.matched.find(f=>U(f,i))||o.push(i))}return[n,r,o]}function Cn(){return j(ne)}function kn(e){return j(Re)}export{xe as NavigationFailureType,fn as RouterLink,mn as RouterView,$ as START_LOCATION,yn as createMemoryHistory,Sn as createRouter,en as createRouterMatcher,Rn as createWebHashHistory,Ut as createWebHistory,N as isNavigationFailure,wn as loadRouteLocation,ye as matchedRouteKey,En as onBeforeRouteLeave,Pn as onBeforeRouteUpdate,cn as parseQuery,Re as routeLocationKey,ne as routerKey,ge as routerViewLocationKey,je as stringifyQuery,$e as useLink,kn as useRoute,Cn as useRouter,He as viewDepthKey};
|