-
Notifications
You must be signed in to change notification settings - Fork 0
/
268.js
3 lines (3 loc) · 30.8 KB
/
268.js
1
2
3
/*! For license information please see 268.js.LICENSE.txt */
"use strict";(self.webpackChunk_lenna_proj_lenna_web=self.webpackChunk_lenna_proj_lenna_web||[]).push([[268],{268:(e,t,n)=>{n.r(t),n.d(t,{NavigationFailureType:()=>F,RouterLink:()=>$e,RouterView:()=>qe,START_LOCATION:()=>N,createMemoryHistory:()=>q,createRouter:()=>tt,createRouterMatcher:()=>te,createWebHashHistory:()=>G,createWebHistory:()=>U,isNavigationFailure:()=>W,matchedRouteKey:()=>f,onBeforeRouteLeave:()=>Se,onBeforeRouteUpdate:()=>je,parseQuery:()=>Re,routeLocationKey:()=>h,routerKey:()=>d,routerViewLocationKey:()=>g,stringifyQuery:()=>Ae,useLink:()=>Te,useRoute:()=>ot,useRouter:()=>rt,viewDepthKey:()=>p});var r=n(788);function o(){return"undefined"!=typeof navigator&&"undefined"!=typeof window?window:void 0!==n.g?n.g:{}}const a="function"==typeof Proxy;let s,i;class c{constructor(e,t){this.target=null,this.targetQueue=[],this.onQueue=[],this.plugin=e,this.hook=t;const n={};if(e.settings)for(const t in e.settings){const r=e.settings[t];n[t]=r.defaultValue}const r=`__vue-devtools-plugin-settings__${e.id}`;let o=Object.assign({},n);try{const e=localStorage.getItem(r),t=JSON.parse(e);Object.assign(o,t)}catch(e){}this.fallbacks={getSettings:()=>o,setSettings(e){try{localStorage.setItem(r,JSON.stringify(e))}catch(e){}o=e},now:()=>(void 0!==s||("undefined"!=typeof window&&window.performance?(s=!0,i=window.performance):s=!1),s?i.now():Date.now())},t&&t.on("plugin:settings:set",((e,t)=>{e===this.plugin.id&&this.fallbacks.setSettings(t)})),this.proxiedOn=new Proxy({},{get:(e,t)=>this.target?this.target.on[t]:(...e)=>{this.onQueue.push({method:t,args:e})}}),this.proxiedTarget=new Proxy({},{get:(e,t)=>this.target?this.target[t]:"on"===t?this.proxiedOn:Object.keys(this.fallbacks).includes(t)?(...e)=>(this.targetQueue.push({method:t,args:e,resolve:()=>{}}),this.fallbacks[t](...e)):(...e)=>new Promise((n=>{this.targetQueue.push({method:t,args:e,resolve:n})}))})}async setRealTarget(e){this.target=e;for(const e of this.onQueue)this.target.on[e.method](...e.args);for(const e of this.targetQueue)e.resolve(await this.target[e.method](...e.args))}}const l="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag,u=e=>l?Symbol(e):"_vr_"+e,f=u("rvlm"),p=u("rvd"),d=u("r"),h=u("rl"),g=u("rvl"),m="undefined"!=typeof window,v=Object.assign;function y(e,t){const n={};for(const r in t){const o=t[r];n[r]=Array.isArray(o)?o.map(e):e(o)}return n}const _=()=>{},b=/\/$/;function w(e,t,n="/"){let r,o={},a="",s="";const i=t.indexOf("?"),c=t.indexOf("#",i>-1?i:0);return i>-1&&(r=t.slice(0,i),a=t.slice(i+1,c>-1?c:t.length),o=e(a)),c>-1&&(r=r||t.slice(0,c),s=t.slice(c,t.length)),r=function(e,t){if(e.startsWith("/"))return e;if(!e)return t;const n=t.split("/"),r=e.split("/");let o,a,s=n.length-1;for(o=0;o<r.length;o++)if(a=r[o],1!==s&&"."!==a){if(".."!==a)break;s--}return n.slice(0,s).join("/")+"/"+r.slice(o-(o===r.length?1:0)).join("/")}(null!=r?r:t,n),{fullPath:r+(a&&"?")+a+s,path:r,query:o,hash:s}}function E(e,t){return t&&e.toLowerCase().startsWith(t.toLowerCase())?e.slice(t.length)||"/":e}function k(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function O(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(!R(e[n],t[n]))return!1;return!0}function R(e,t){return Array.isArray(e)?A(e,t):Array.isArray(t)?A(t,e):e===t}function A(e,t){return Array.isArray(t)?e.length===t.length&&e.every(((e,n)=>e===t[n])):1===e.length&&e[0]===t}var x,C;function P(e){if(!e)if(m){const t=document.querySelector("base");e=(e=t&&t.getAttribute("href")||"/").replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return"/"!==e[0]&&"#"!==e[0]&&(e="/"+e),e.replace(b,"")}!function(e){e.pop="pop",e.push="push"}(x||(x={})),function(e){e.back="back",e.forward="forward",e.unknown=""}(C||(C={}));const S=/^[^#]+#/;function j(e,t){return e.replace(S,"#")+t}const I=()=>({left:window.pageXOffset,top:window.pageYOffset});function L(e,t){return(history.state?history.state.position-t:-1)+e}const T=new Map;let $=()=>location.protocol+"//"+location.host;function V(e,t){const{pathname:n,search:r,hash:o}=t,a=e.indexOf("#");if(a>-1){let t=o.includes(e.slice(a))?e.slice(a).length:1,n=o.slice(t);return"/"!==n[0]&&(n="/"+n),E(n,"")}return E(n,e)+r+o}function D(e,t,n,r=!1,o=!1){return{back:e,current:t,forward:n,replaced:r,position:window.history.length,scroll:o?I():null}}function U(e){const t=function(e){const{history:t,location:n}=window,r={value:V(e,n)},o={value:t.state};function a(r,a,s){const i=e.indexOf("#"),c=i>-1?(n.host&&document.querySelector("base")?e:e.slice(i))+r:$()+e+r;try{t[s?"replaceState":"pushState"](a,"",c),o.value=a}catch(e){console.error(e),n[s?"replace":"assign"](c)}}return o.value||a(r.value,{back:null,current:r.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0),{location:r,state:o,push:function(e,n){const s=v({},o.value,t.state,{forward:e,scroll:I()});a(s.current,s,!0),a(e,v({},D(r.value,e,null),{position:s.position+1},n),!1),r.value=e},replace:function(e,n){a(e,v({},t.state,D(o.value.back,e,o.value.forward,!0),n,{position:o.value.position}),!0),r.value=e}}}(e=P(e)),n=function(e,t,n,r){let o=[],a=[],s=null;const i=({state:a})=>{const i=V(e,location),c=n.value,l=t.value;let u=0;if(a){if(n.value=i,t.value=a,s&&s===c)return void(s=null);u=l?a.position-l.position:0}else r(i);o.forEach((e=>{e(n.value,c,{delta:u,type:x.pop,direction:u?u>0?C.forward:C.back:C.unknown})}))};function c(){const{history:e}=window;e.state&&e.replaceState(v({},e.state,{scroll:I()}),"")}return window.addEventListener("popstate",i),window.addEventListener("beforeunload",c),{pauseListeners:function(){s=n.value},listen:function(e){o.push(e);const t=()=>{const t=o.indexOf(e);t>-1&&o.splice(t,1)};return a.push(t),t},destroy:function(){for(const e of a)e();a=[],window.removeEventListener("popstate",i),window.removeEventListener("beforeunload",c)}}}(e,t.state,t.location,t.replace),r=v({location:"",base:e,go:function(e,t=!0){t||n.pauseListeners(),history.go(e)},createHref:j.bind(null,e)},t,n);return Object.defineProperty(r,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(r,"state",{enumerable:!0,get:()=>t.state.value}),r}function q(e=""){let t=[],n=[""],r=0;function o(e){r++,r===n.length||n.splice(r),n.push(e)}const a={location:"",state:{},base:e=P(e),createHref:j.bind(null,e),replace(e){n.splice(r--,1),o(e)},push(e,t){o(e)},listen:e=>(t.push(e),()=>{const n=t.indexOf(e);n>-1&&t.splice(n,1)}),destroy(){t=[],n=[""],r=0},go(e,o=!0){const a=this.location,s=e<0?C.back:C.forward;r=Math.max(0,Math.min(r+e,n.length-1)),o&&function(e,n,{direction:r,delta:o}){const a={direction:r,delta:o,type:x.pop};for(const r of t)r(e,n,a)}(this.location,a,{direction:s,delta:e})}};return Object.defineProperty(a,"location",{enumerable:!0,get:()=>n[r]}),a}function G(e){return(e=location.host?e||location.pathname+location.search:"").includes("#")||(e+="#"),U(e)}function B(e){return"string"==typeof e||"symbol"==typeof e}const N={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0},M=u("nf");var F;function Q(e,t){return v(new Error,{type:e,[M]:!0},t)}function W(e,t){return e instanceof Error&&M in e&&(null==t||!!(e.type&t))}!function(e){e[e.aborted=4]="aborted",e[e.cancelled=8]="cancelled",e[e.duplicated=16]="duplicated"}(F||(F={}));const K="[^/]+?",H={sensitive:!1,strict:!1,start:!0,end:!0},z=/[.+*?^${}()[\]/\\]/g;function J(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?1===e.length&&80===e[0]?-1:1:e.length>t.length?1===t.length&&80===t[0]?1:-1:0}function X(e,t){let n=0;const r=e.score,o=t.score;for(;n<r.length&&n<o.length;){const e=J(r[n],o[n]);if(e)return e;n++}return o.length-r.length}const Y={type:0,value:""},Z=/[a-zA-Z0-9_]/;function ee(e,t,n){const r=function(e,t){const n=v({},H,t),r=[];let o=n.start?"^":"";const a=[];for(const t of e){const e=t.length?[]:[90];n.strict&&!t.length&&(o+="/");for(let r=0;r<t.length;r++){const s=t[r];let i=40+(n.sensitive?.25:0);if(0===s.type)r||(o+="/"),o+=s.value.replace(z,"\\$&"),i+=40;else if(1===s.type){const{value:e,repeatable:n,optional:c,regexp:l}=s;a.push({name:e,repeatable:n,optional:c});const u=l||K;if(u!==K){i+=10;try{new RegExp(`(${u})`)}catch(t){throw new Error(`Invalid custom RegExp for param "${e}" (${u}): `+t.message)}}let f=n?`((?:${u})(?:/(?:${u}))*)`:`(${u})`;r||(f=c&&t.length<2?`(?:/${f})`:"/"+f),c&&(f+="?"),o+=f,i+=20,c&&(i+=-8),n&&(i+=-20),".*"===u&&(i+=-50)}e.push(i)}r.push(e)}if(n.strict&&n.end){const e=r.length-1;r[e][r[e].length-1]+=.7000000000000001}n.strict||(o+="/?"),n.end?o+="$":n.strict&&(o+="(?:/|$)");const s=new RegExp(o,n.sensitive?"":"i");return{re:s,score:r,keys:a,parse:function(e){const t=e.match(s),n={};if(!t)return null;for(let e=1;e<t.length;e++){const r=t[e]||"",o=a[e-1];n[o.name]=r&&o.repeatable?r.split("/"):r}return n},stringify:function(t){let n="",r=!1;for(const o of e){r&&n.endsWith("/")||(n+="/"),r=!1;for(const e of o)if(0===e.type)n+=e.value;else if(1===e.type){const{value:a,repeatable:s,optional:i}=e,c=a in t?t[a]:"";if(Array.isArray(c)&&!s)throw new Error(`Provided param "${a}" is an array but it is not repeatable (* or + modifiers)`);const l=Array.isArray(c)?c.join("/"):c;if(!l){if(!i)throw new Error(`Missing required param "${a}"`);o.length<2&&(n.endsWith("/")?n=n.slice(0,-1):r=!0)}n+=l}}return n}}}(function(e){if(!e)return[[]];if("/"===e)return[[Y]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(e){throw new Error(`ERR (${n})/"${l}": ${e}`)}let n=0,r=n;const o=[];let a;function s(){a&&o.push(a),a=[]}let i,c=0,l="",u="";function f(){l&&(0===n?a.push({type:0,value:l}):1===n||2===n||3===n?(a.length>1&&("*"===i||"+"===i)&&t(`A repeatable param (${l}) must be alone in its segment. eg: '/:ids+.`),a.push({type:1,value:l,regexp:u,repeatable:"*"===i||"+"===i,optional:"*"===i||"?"===i})):t("Invalid state to consume buffer"),l="")}function p(){l+=i}for(;c<e.length;)if(i=e[c++],"\\"!==i||2===n)switch(n){case 0:"/"===i?(l&&f(),s()):":"===i?(f(),n=1):p();break;case 4:p(),n=r;break;case 1:"("===i?n=2:Z.test(i)?p():(f(),n=0,"*"!==i&&"?"!==i&&"+"!==i&&c--);break;case 2:")"===i?"\\"==u[u.length-1]?u=u.slice(0,-1)+i:n=3:u+=i;break;case 3:f(),n=0,"*"!==i&&"?"!==i&&"+"!==i&&c--,u="";break;default:t("Unknown state")}else r=n,n=4;return 2===n&&t(`Unfinished custom RegExp for param "${l}"`),f(),s(),o}(e.path),n),o=v(r,{record:e,parent:t,children:[],alias:[]});return t&&!o.record.aliasOf==!t.record.aliasOf&&t.children.push(o),o}function te(e,t){const n=[],r=new Map;function o(e,n,r){const i=!r,c=function(e){return{path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:void 0,beforeEnter:e.beforeEnter,props:ne(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||{}:{default:e.component}}}(e);c.aliasOf=r&&r.record;const l=ae(t,e),u=[c];if("alias"in e){const t="string"==typeof e.alias?[e.alias]:e.alias;for(const e of t)u.push(v({},c,{components:r?r.record.components:c.components,path:e,aliasOf:r?r.record:c}))}let f,p;for(const t of u){const{path:u}=t;if(n&&"/"!==u[0]){const e=n.record.path,r="/"===e[e.length-1]?"":"/";t.path=n.record.path+(u&&r+u)}if(f=ee(t,n,l),r?r.alias.push(f):(p=p||f,p!==f&&p.alias.push(f),i&&e.name&&!re(f)&&a(e.name)),"children"in c){const e=c.children;for(let t=0;t<e.length;t++)o(e[t],f,r&&r.children[t])}r=r||f,s(f)}return p?()=>{a(p)}:_}function a(e){if(B(e)){const t=r.get(e);t&&(r.delete(e),n.splice(n.indexOf(t),1),t.children.forEach(a),t.alias.forEach(a))}else{const t=n.indexOf(e);t>-1&&(n.splice(t,1),e.record.name&&r.delete(e.record.name),e.children.forEach(a),e.alias.forEach(a))}}function s(e){let t=0;for(;t<n.length&&X(e,n[t])>=0&&(e.record.path!==n[t].record.path||!se(e,n[t]));)t++;n.splice(t,0,e),e.record.name&&!re(e)&&r.set(e.record.name,e)}return t=ae({strict:!1,end:!0,sensitive:!1},t),e.forEach((e=>o(e))),{addRoute:o,resolve:function(e,t){let o,a,s,i={};if("name"in e&&e.name){if(o=r.get(e.name),!o)throw Q(1,{location:e});s=o.record.name,i=v(function(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}(t.params,o.keys.filter((e=>!e.optional)).map((e=>e.name))),e.params),a=o.stringify(i)}else if("path"in e)a=e.path,o=n.find((e=>e.re.test(a))),o&&(i=o.parse(a),s=o.record.name);else{if(o=t.name?r.get(t.name):n.find((e=>e.re.test(t.path))),!o)throw Q(1,{location:e,currentLocation:t});s=o.record.name,i=v({},t.params,e.params),a=o.stringify(i)}const c=[];let l=o;for(;l;)c.unshift(l.record),l=l.parent;return{name:s,path:a,params:i,matched:c,meta:oe(c)}},removeRoute:a,getRoutes:function(){return n},getRecordMatcher:function(e){return r.get(e)}}}function ne(e){const t={},n=e.props||!1;if("component"in e)t.default=n;else for(const r in e.components)t[r]="boolean"==typeof n?n:n[r];return t}function re(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function oe(e){return e.reduce(((e,t)=>v(e,t.meta)),{})}function ae(e,t){const n={};for(const r in e)n[r]=r in t?t[r]:e[r];return n}function se(e,t){return t.children.some((t=>t===e||se(e,t)))}const ie=/#/g,ce=/&/g,le=/\//g,ue=/=/g,fe=/\?/g,pe=/\+/g,de=/%5B/g,he=/%5D/g,ge=/%5E/g,me=/%60/g,ve=/%7B/g,ye=/%7C/g,_e=/%7D/g,be=/%20/g;function we(e){return encodeURI(""+e).replace(ye,"|").replace(de,"[").replace(he,"]")}function Ee(e){return we(e).replace(pe,"%2B").replace(be,"+").replace(ie,"%23").replace(ce,"%26").replace(me,"`").replace(ve,"{").replace(_e,"}").replace(ge,"^")}function ke(e){return null==e?"":function(e){return we(e).replace(ie,"%23").replace(fe,"%3F")}(e).replace(le,"%2F")}function Oe(e){try{return decodeURIComponent(""+e)}catch(e){}return""+e}function Re(e){const t={};if(""===e||"?"===e)return t;const n=("?"===e[0]?e.slice(1):e).split("&");for(let e=0;e<n.length;++e){const r=n[e].replace(pe," "),o=r.indexOf("="),a=Oe(o<0?r:r.slice(0,o)),s=o<0?null:Oe(r.slice(o+1));if(a in t){let e=t[a];Array.isArray(e)||(e=t[a]=[e]),e.push(s)}else t[a]=s}return t}function Ae(e){let t="";for(let n in e){const r=e[n];(n=Ee(n).replace(ue,"%3D"),null!=r)?(Array.isArray(r)?r.map((e=>e&&Ee(e))):[r&&Ee(r)]).forEach((e=>{void 0!==e&&(t+=(t.length?"&":"")+n,null!=e&&(t+="="+e))})):void 0!==r&&(t+=(t.length?"&":"")+n)}return t}function xe(e){const t={};for(const n in e){const r=e[n];void 0!==r&&(t[n]=Array.isArray(r)?r.map((e=>null==e?null:""+e)):null==r?r:""+r)}return t}function Ce(){let e=[];return{add:function(t){return e.push(t),()=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)}},list:()=>e,reset:function(){e=[]}}}function Pe(e,t,n){const o=()=>{e[t].delete(n)};(0,r.onUnmounted)(o),(0,r.onDeactivated)(o),(0,r.onActivated)((()=>{e[t].add(n)})),e[t].add(n)}function Se(e){const t=(0,r.inject)(f,{}).value;t&&Pe(t,"leaveGuards",e)}function je(e){const t=(0,r.inject)(f,{}).value;t&&Pe(t,"updateGuards",e)}function Ie(e,t,n,r,o){const a=r&&(r.enterCallbacks[o]=r.enterCallbacks[o]||[]);return()=>new Promise(((s,i)=>{const c=e=>{var c;!1===e?i(Q(4,{from:n,to:t})):e instanceof Error?i(e):"string"==typeof(c=e)||c&&"object"==typeof c?i(Q(2,{from:t,to:e})):(a&&r.enterCallbacks[o]===a&&"function"==typeof e&&a.push(e),s())},l=e.call(r&&r.instances[o],t,n,c);let u=Promise.resolve(l);e.length<3&&(u=u.then(c)),u.catch((e=>i(e)))}))}function Le(e,t,n,r){const o=[];for(const s of e)for(const e in s.components){let i=s.components[e];if("beforeRouteEnter"===t||s.instances[e])if("object"==typeof(a=i)||"displayName"in a||"props"in a||"__vccOpts"in a){const a=(i.__vccOpts||i)[t];a&&o.push(Ie(a,n,r,s,e))}else{let a=i();o.push((()=>a.then((o=>{if(!o)return Promise.reject(new Error(`Couldn't resolve component "${e}" at "${s.path}"`));const a=(i=o).__esModule||l&&"Module"===i[Symbol.toStringTag]?o.default:o;var i;s.components[e]=a;const c=(a.__vccOpts||a)[t];return c&&Ie(c,n,r,s,e)()}))))}}var a;return o}function Te(e){const t=(0,r.inject)(d),n=(0,r.inject)(h),o=(0,r.computed)((()=>t.resolve((0,r.unref)(e.to)))),a=(0,r.computed)((()=>{const{matched:e}=o.value,{length:t}=e,r=e[t-1],a=n.matched;if(!r||!a.length)return-1;const s=a.findIndex(k.bind(null,r));if(s>-1)return s;const i=Ve(e[t-2]);return t>1&&Ve(r)===i&&a[a.length-1].path!==i?a.findIndex(k.bind(null,e[t-2])):s})),s=(0,r.computed)((()=>a.value>-1&&function(e,t){for(const n in t){const r=t[n],o=e[n];if("string"==typeof r){if(r!==o)return!1}else if(!Array.isArray(o)||o.length!==r.length||r.some(((e,t)=>e!==o[t])))return!1}return!0}(n.params,o.value.params))),i=(0,r.computed)((()=>a.value>-1&&a.value===n.matched.length-1&&O(n.params,o.value.params)));if(__VUE_PROD_DEVTOOLS__&&m){const e=(0,r.getCurrentInstance)();if(e){const t={route:o.value,isActive:s.value,isExactActive:i.value};e.__vrl_devtools=e.__vrl_devtools||[],e.__vrl_devtools.push(t),(0,r.watchEffect)((()=>{t.route=o.value,t.isActive=s.value,t.isExactActive=i.value}),{flush:"post"})}}return{route:o,href:(0,r.computed)((()=>o.value.href)),isActive:s,isExactActive:i,navigate:function(n={}){return function(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey||e.defaultPrevented||void 0!==e.button&&0!==e.button)){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}}(n)?t[(0,r.unref)(e.replace)?"replace":"push"]((0,r.unref)(e.to)).catch(_):Promise.resolve()}}}const $e=(0,r.defineComponent)({name:"RouterLink",props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"}},useLink:Te,setup(e,{slots:t}){const n=(0,r.reactive)(Te(e)),{options:o}=(0,r.inject)(d),a=(0,r.computed)((()=>({[De(e.activeClass,o.linkActiveClass,"router-link-active")]:n.isActive,[De(e.exactActiveClass,o.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive})));return()=>{const o=t.default&&t.default(n);return e.custom?o:(0,r.h)("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:a.value},o)}}});function Ve(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const De=(e,t,n)=>null!=e?e:null!=t?t:n;function Ue(e,t){if(!e)return null;const n=e(t);return 1===n.length?n[0]:n}const qe=(0,r.defineComponent)({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},setup(e,{attrs:t,slots:n}){const o=(0,r.inject)(g),a=(0,r.computed)((()=>e.route||o.value)),s=(0,r.inject)(p,0),i=(0,r.computed)((()=>a.value.matched[s]));(0,r.provide)(p,s+1),(0,r.provide)(f,i),(0,r.provide)(g,a);const c=(0,r.ref)();return(0,r.watch)((()=>[c.value,i.value,e.name]),(([e,t,n],[r,o,a])=>{t&&(t.instances[n]=e,o&&o!==t&&e&&e===r&&(t.leaveGuards.size||(t.leaveGuards=o.leaveGuards),t.updateGuards.size||(t.updateGuards=o.updateGuards))),!e||!t||o&&k(t,o)&&r||(t.enterCallbacks[n]||[]).forEach((t=>t(e)))}),{flush:"post"}),()=>{const o=a.value,l=i.value,u=l&&l.components[e.name],f=e.name;if(!u)return Ue(n.default,{Component:u,route:o});const p=l.props[e.name],d=p?!0===p?o.params:"function"==typeof p?p(o):p:null,h=(0,r.h)(u,v({},d,t,{onVnodeUnmounted:e=>{e.component.isUnmounted&&(l.instances[f]=null)},ref:c}));if(__VUE_PROD_DEVTOOLS__&&m&&h.ref){const e={depth:s,name:l.name,path:l.path,meta:l.meta};(Array.isArray(h.ref)?h.ref.map((e=>e.i)):[h.ref.i]).forEach((t=>{t.__vrv_devtools=e}))}return Ue(n.default,{Component:h,route:o})||h}}});function Ge(e,t){const n=v({},e,{matched:e.matched.map((e=>function(e,t){const n={};for(const r in e)t.includes(r)||(n[r]=e[r]);return n}(e,["instances","children","aliasOf"])))});return{_custom:{type:null,readOnly:!0,display:e.fullPath,tooltip:t,value:n}}}function Be(e){return{_custom:{display:e}}}let Ne=0;function Me(e,t,n){if(t.__hasDevtools)return;t.__hasDevtools=!0;const s=Ne++;!function(e,t){const n=e,r=o(),s=o().__VUE_DEVTOOLS_GLOBAL_HOOK__,i=a&&n.enableEarlyProxy;if(!s||!r.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__&&i){const e=i?new c(n,s):null;(r.__VUE_DEVTOOLS_PLUGINS__=r.__VUE_DEVTOOLS_PLUGINS__||[]).push({pluginDescriptor:n,setupFn:t,proxy:e}),e&&t(e.proxiedTarget)}else s.emit("devtools-plugin:setup",e,t)}({id:"org.vuejs.router"+(s?"."+s:""),label:"Vue Router",packageName:"vue-router",homepage:"https://router.vuejs.org",logo:"https://router.vuejs.org/logo.png",componentStateTypes:["Routing"],app:e},(o=>{o.on.inspectComponent(((e,n)=>{e.instanceData&&e.instanceData.state.push({type:"Routing",key:"$route",editable:!1,value:Ge(t.currentRoute.value,"Current Route")})})),o.on.visitComponentTree((({treeNode:e,componentInstance:t})=>{if(t.__vrv_devtools){const n=t.__vrv_devtools;e.tags.push({label:(n.name?`${n.name.toString()}: `:"")+n.path,textColor:0,tooltip:"This component is rendered by <router-view>",backgroundColor:Qe})}Array.isArray(t.__vrl_devtools)&&(t.__devtoolsApi=o,t.__vrl_devtools.forEach((t=>{let n=He,r="";t.isExactActive?(n=Ke,r="This is exactly active"):t.isActive&&(n=We,r="This link is active"),e.tags.push({label:t.route.path,textColor:0,tooltip:r,backgroundColor:n})})))})),(0,r.watch)(t.currentRoute,(()=>{l(),o.notifyComponentUpdate(),o.sendInspectorTree(c),o.sendInspectorState(c)}));const a="router:navigations:"+s;o.addTimelineLayer({id:a,label:`Router${s?" "+s:""} Navigations`,color:4237508}),t.onError(((e,t)=>{o.addTimelineEvent({layerId:a,event:{title:"Error during Navigation",subtitle:t.fullPath,logType:"error",time:o.now(),data:{error:e},groupId:t.meta.__navigationId}})}));let i=0;t.beforeEach(((e,t)=>{const n={guard:Be("beforeEach"),from:Ge(t,"Current Location during this navigation"),to:Ge(e,"Target location")};Object.defineProperty(e.meta,"__navigationId",{value:i++}),o.addTimelineEvent({layerId:a,event:{time:o.now(),title:"Start of navigation",subtitle:e.fullPath,data:n,groupId:e.meta.__navigationId}})})),t.afterEach(((e,t,n)=>{const r={guard:Be("afterEach")};n?(r.failure={_custom:{type:Error,readOnly:!0,display:n?n.message:"",tooltip:"Navigation Failure",value:n}},r.status=Be("❌")):r.status=Be("✅"),r.from=Ge(t,"Current Location during this navigation"),r.to=Ge(e,"Target location"),o.addTimelineEvent({layerId:a,event:{title:"End of navigation",subtitle:e.fullPath,time:o.now(),data:r,logType:n?"warning":"default",groupId:e.meta.__navigationId}})}));const c="router-inspector:"+s;function l(){if(!u)return;const e=u;let r=n.getRoutes().filter((e=>!e.parent));r.forEach(Ze),e.filter&&(r=r.filter((t=>et(t,e.filter.toLowerCase())))),r.forEach((e=>Ye(e,t.currentRoute.value))),e.rootNodes=r.map(ze)}let u;o.addInspector({id:c,label:"Routes"+(s?" "+s:""),icon:"book",treeFilterPlaceholder:"Search routes"}),o.on.getInspectorTree((t=>{u=t,t.app===e&&t.inspectorId===c&&l()})),o.on.getInspectorState((t=>{if(t.app===e&&t.inspectorId===c){const e=n.getRoutes().find((e=>e.record.__vd_id===t.nodeId));e&&(t.state={options:Fe(e)})}})),o.sendInspectorTree(c),o.sendInspectorState(c)}))}function Fe(e){const{record:t}=e,n=[{editable:!1,key:"path",value:t.path}];return null!=t.name&&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((e=>`${e.name}${function(e){return e.optional?e.repeatable?"*":"?":e.repeatable?"+":""}(e)}`)).join(" "),tooltip:"Param keys",value:e.keys}}}),null!=t.redirect&&n.push({editable:!1,key:"redirect",value:t.redirect}),e.alias.length&&n.push({editable:!1,key:"aliases",value:e.alias.map((e=>e.record.path))}),n.push({key:"score",editable:!1,value:{_custom:{type:null,readOnly:!0,display:e.score.map((e=>e.join(", "))).join(" | "),tooltip:"Score used to sort routes",value:e.score}}}),n}const Qe=15485081,We=2450411,Ke=8702998,He=16486972;function ze(e){const t=[],{record:n}=e;null!=n.name&&t.push({label:String(n.name),textColor:0,backgroundColor:2282478}),n.aliasOf&&t.push({label:"alias",textColor:0,backgroundColor:He}),e.__vd_match&&t.push({label:"matches",textColor:0,backgroundColor:Qe}),e.__vd_exactActive&&t.push({label:"exact",textColor:0,backgroundColor:Ke}),e.__vd_active&&t.push({label:"active",textColor:0,backgroundColor:We}),n.redirect&&t.push({label:"redirect: "+("string"==typeof n.redirect?n.redirect:"Object"),textColor:16777215,backgroundColor:6710886});let r=n.__vd_id;return null==r&&(r=String(Je++),n.__vd_id=r),{id:r,label:n.path,tags:t,children:e.children.map(ze)}}let Je=0;const Xe=/^\/(.*)\/([a-z]*)$/;function Ye(e,t){const n=t.matched.length&&k(t.matched[t.matched.length-1],e.record);e.__vd_exactActive=e.__vd_active=n,n||(e.__vd_active=t.matched.some((t=>k(t,e.record)))),e.children.forEach((e=>Ye(e,t)))}function Ze(e){e.__vd_match=!1,e.children.forEach(Ze)}function et(e,t){const n=String(e.re).match(Xe);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((e=>et(e,t))),("/"!==e.record.path||"/"===t)&&(e.__vd_match=e.re.test(t),!0);const r=e.record.path.toLowerCase(),o=Oe(r);return!(t.startsWith("/")||!o.includes(t)&&!r.includes(t))||!(!o.startsWith(t)&&!r.startsWith(t))||!(!e.record.name||!String(e.record.name).includes(t))||e.children.some((e=>et(e,t)))}function tt(e){const t=te(e.routes,e),n=e.parseQuery||Re,o=e.stringifyQuery||Ae,a=e.history,s=Ce(),i=Ce(),c=Ce(),l=(0,r.shallowRef)(N);let u=N;m&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const f=y.bind(null,(e=>""+e)),p=y.bind(null,ke),b=y.bind(null,Oe);function E(e,r){if(r=v({},r||l.value),"string"==typeof e){const o=w(n,e,r.path),s=t.resolve({path:o.path},r),i=a.createHref(o.fullPath);return v(o,s,{params:b(s.params),hash:Oe(o.hash),redirectedFrom:void 0,href:i})}let s;if("path"in e)s=v({},e,{path:w(n,e.path,r.path).path});else{const t=v({},e.params);for(const e in t)null==t[e]&&delete t[e];s=v({},e,{params:p(e.params)}),r.params=p(r.params)}const i=t.resolve(s,r),c=e.hash||"";i.params=f(b(i.params));const u=function(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}(o,v({},e,{hash:(d=c,we(d).replace(ve,"{").replace(_e,"}").replace(ge,"^")),path:i.path}));var d;const h=a.createHref(u);return v({fullPath:u,hash:c,query:o===Ae?xe(e.query):e.query||{}},i,{redirectedFrom:void 0,href:h})}function R(e){return"string"==typeof e?w(n,e,l.value.path):v({},e)}function A(e,t){if(u!==e)return Q(8,{from:t,to:e})}function C(e){return S(e)}function P(e){const t=e.matched[e.matched.length-1];if(t&&t.redirect){const{redirect:n}=t;let r="function"==typeof n?n(e):n;return"string"==typeof r&&(r=r.includes("?")||r.includes("#")?r=R(r):{path:r},r.params={}),v({query:e.query,hash:e.hash,params:e.params},r)}}function S(e,t){const n=u=E(e),r=l.value,a=e.state,s=e.force,i=!0===e.replace,c=P(n);if(c)return S(v(R(c),{state:a,force:s,replace:i}),t||n);const f=n;let p;return f.redirectedFrom=t,!s&&function(e,t,n){const r=t.matched.length-1,o=n.matched.length-1;return r>-1&&r===o&&k(t.matched[r],n.matched[o])&&O(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}(o,r,n)&&(p=Q(16,{to:f,from:r}),H(r,r,!0,!1)),(p?Promise.resolve(p):$(f,r)).catch((e=>W(e)?W(e,2)?e:K(e):F(e,f,r))).then((e=>{if(e){if(W(e,2))return S(v(R(e.to),{state:a,force:s,replace:i}),t||f)}else e=D(f,r,!0,i,a);return V(f,r,e),e}))}function j(e,t){const n=A(e,t);return n?Promise.reject(n):Promise.resolve()}function $(e,t){let n;const[r,o,a]=function(e,t){const n=[],r=[],o=[],a=Math.max(t.matched.length,e.matched.length);for(let s=0;s<a;s++){const a=t.matched[s];a&&(e.matched.find((e=>k(e,a)))?r.push(a):n.push(a));const i=e.matched[s];i&&(t.matched.find((e=>k(e,i)))||o.push(i))}return[n,r,o]}(e,t);n=Le(r.reverse(),"beforeRouteLeave",e,t);for(const o of r)o.leaveGuards.forEach((r=>{n.push(Ie(r,e,t))}));const c=j.bind(null,e,t);return n.push(c),nt(n).then((()=>{n=[];for(const r of s.list())n.push(Ie(r,e,t));return n.push(c),nt(n)})).then((()=>{n=Le(o,"beforeRouteUpdate",e,t);for(const r of o)r.updateGuards.forEach((r=>{n.push(Ie(r,e,t))}));return n.push(c),nt(n)})).then((()=>{n=[];for(const r of e.matched)if(r.beforeEnter&&!t.matched.includes(r))if(Array.isArray(r.beforeEnter))for(const o of r.beforeEnter)n.push(Ie(o,e,t));else n.push(Ie(r.beforeEnter,e,t));return n.push(c),nt(n)})).then((()=>(e.matched.forEach((e=>e.enterCallbacks={})),n=Le(a,"beforeRouteEnter",e,t),n.push(c),nt(n)))).then((()=>{n=[];for(const r of i.list())n.push(Ie(r,e,t));return n.push(c),nt(n)})).catch((e=>W(e,8)?e:Promise.reject(e)))}function V(e,t,n){for(const r of c.list())r(e,t,n)}function D(e,t,n,r,o){const s=A(e,t);if(s)return s;const i=t===N,c=m?history.state:{};n&&(r||i?a.replace(e.fullPath,v({scroll:i&&c&&c.scroll},o)):a.push(e.fullPath,o)),l.value=e,H(e,t,n,i),K()}let U;let q,G=Ce(),M=Ce();function F(e,t,n){K(e);const r=M.list();return r.length?r.forEach((r=>r(e,t,n))):console.error(e),Promise.reject(e)}function K(e){return q||(q=!e,U=a.listen(((e,t,n)=>{const r=E(e),o=P(r);if(o)return void S(v(o,{replace:!0}),r).catch(_);u=r;const s=l.value;var i,c;m&&(i=L(s.fullPath,n.delta),c=I(),T.set(i,c)),$(r,s).catch((e=>W(e,12)?e:W(e,2)?(S(e.to,r).then((e=>{W(e,20)&&!n.delta&&n.type===x.pop&&a.go(-1,!1)})).catch(_),Promise.reject()):(n.delta&&a.go(-n.delta,!1),F(e,r,s)))).then((e=>{(e=e||D(r,s,!1))&&(n.delta?a.go(-n.delta,!1):n.type===x.pop&&W(e,20)&&a.go(-1,!1)),V(r,s,e)})).catch(_)})),G.list().forEach((([t,n])=>e?n(e):t())),G.reset()),e}function H(t,n,o,a){const{scrollBehavior:s}=e;if(!m||!s)return Promise.resolve();const i=!o&&function(e){const t=T.get(e);return T.delete(e),t}(L(t.fullPath,0))||(a||!o)&&history.state&&history.state.scroll||null;return(0,r.nextTick)().then((()=>s(t,n,i))).then((e=>e&&function(e){let t;if("el"in e){const n=e.el,r="string"==typeof n&&n.startsWith("#"),o="string"==typeof n?r?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!o)return;t=function(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)}}(o,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(null!=t.left?t.left:window.pageXOffset,null!=t.top?t.top:window.pageYOffset)}(e))).catch((e=>F(e,t,n)))}const z=e=>a.go(e);let J;const X=new Set,Y={currentRoute:l,addRoute:function(e,n){let r,o;return B(e)?(r=t.getRecordMatcher(e),o=n):o=e,t.addRoute(o,r)},removeRoute:function(e){const n=t.getRecordMatcher(e);n&&t.removeRoute(n)},hasRoute:function(e){return!!t.getRecordMatcher(e)},getRoutes:function(){return t.getRoutes().map((e=>e.record))},resolve:E,options:e,push:C,replace:function(e){return C(v(R(e),{replace:!0}))},go:z,back:()=>z(-1),forward:()=>z(1),beforeEach:s.add,beforeResolve:i.add,afterEach:c.add,onError:M.add,isReady:function(){return q&&l.value!==N?Promise.resolve():new Promise(((e,t)=>{G.add([e,t])}))},install(e){const n=this;e.component("RouterLink",$e),e.component("RouterView",qe),e.config.globalProperties.$router=n,Object.defineProperty(e.config.globalProperties,"$route",{enumerable:!0,get:()=>(0,r.unref)(l)}),m&&!J&&l.value===N&&(J=!0,C(a.location).catch((e=>{})));const o={};for(const e in N)o[e]=(0,r.computed)((()=>l.value[e]));e.provide(d,n),e.provide(h,(0,r.reactive)(o)),e.provide(g,l);const s=e.unmount;X.add(e),e.unmount=function(){X.delete(e),X.size<1&&(u=N,U&&U(),l.value=N,J=!1,q=!1),s()},__VUE_PROD_DEVTOOLS__&&m&&Me(e,n,t)}};return Y}function nt(e){return e.reduce(((e,t)=>e.then((()=>t()))),Promise.resolve())}function rt(){return(0,r.inject)(d)}function ot(){return(0,r.inject)(h)}}}]);
//# sourceMappingURL=268.js.map