提交 368a7b31 作者: Hao

供应商分页的问题

父级 49e463f3
NODE_ENV=development
VITE_USER_APP_API_URL=http://im.wei-it.com/api
VITE_USER_APP_WS_API_URL=ws://im.wei-it.com/ws/
VITE_USER_APP_API_URL=https://im.wei-it.com/api
VITE_USER_APP_WS_API_URL=wss://im.wei-it.com/ws/
NODE_ENV=production
VITE_USER_APP_API_URL=http://im.wei-it.com/api
VITE_USER_APP_WS_API_URL=ws://im.wei-it.com/ws/
\ No newline at end of file
VITE_USER_APP_API_URL=https://im.wei-it.com/api
VITE_USER_APP_WS_API_URL=wss://im.wei-it.com/ws/
\ No newline at end of file
import http from "../index";
//登录
const Login = (query: any) => {
return http({
url: `/kf/auth/login`,
method: "post",
data: query,
});
};
//新增询价单
const InquiryAdd = (query: any) => {
return http({
url: `/inquiryAdd`,
method: "get",
data: query,
});
};
//快捷回复
const Kjiehuifu = (query: any) => {
return http({
url: "/Kjiehuifu",
method: "get",
data: query,
});
};
// const Kjiehuifu = (query: any) => {
// return http({
// url: "/Kjiehuifu",
// method: "get",
// data: query,
// });
// };
//获取用户列表
const getUserList = (query: any) => {
return http({
url: "/kf/chat/getChatList",
url: "/common/getChatList",
method: "get",
data: query,
});
......@@ -35,13 +19,22 @@ const getUserList = (query: any) => {
//查看未读消息
const checkMesssages = (query: any) => {
return http({
url: "/kf/chat/getChatHisList",
url: "/common/getChatHisList",
method: "get",
params: query,
});
};
//优先找在线客服,注意是商品对应供应商的账号(客服iD)
const getKfCode = (query: any) => {
return http({
url: "/common/getKfCode",
method: "get",
params: query,
});
};
//上传接口
//上传接口
const getUploadConfigInfo = (query: any) => {
return http({
url: "/upload/getUploadConfigInfo",
......@@ -52,17 +45,15 @@ const getUploadConfigInfo = (query: any) => {
//系统上传
const upload = (query: any) => {
return http({
url: "/upload/uploadFile",
url: "/common/uploadFile",
method: "post",
data: query,
});
};
export {
Login,
InquiryAdd,
Kjiehuifu,
getUserList,
checkMesssages,
upload,
getUploadConfigInfo,
getKfCode
};
......@@ -4,59 +4,19 @@ export const useUserStore = defineStore("user", {
state: () => {
return {
isConnected: false, //连接状态
messages: [],
customerInfo: {
username: "1489785944",
messages: [],
chatInfo: {
clientId: "",
serviceId: "1805880457362661377",
},
count: 0,
userInfo: {
password: "",
token: "",
username:""
},
};
},
actions: {
setCount(num: number) {
this.count = num;
},
setCustomerInfo(res: any) {
this.customerInfo = res;
},
setUserInfo(res: any) {
this.userInfo = res;
},
setUserListMessages(res: any) {
const messages: any = this.customerInfo.messages || [];
const obj = {
isSent: false,
msgType: res.msgType,
content: res.content,
cmd: res.cmd,
to: res.to,
id: res.id,
form: res.from,
userImg:"https://cdn.lirimall.com//lirigo/filetempImage/新鲜水果_1661668973048.png",
time: moment(res.createTime).format("HH:mm:ss"),
};
messages.push(obj);
this.customerInfo.messages = messages;
},
setusernameMessage(res: any) {
const friends = res.friends;
for (const key in friends) {
const chatDatas = friends[key];
chatDatas.forEach((item: any) => {
item.userImg =
"https://cdn.lirimall.com//lirigo/filetempImage/新鲜水果_1661668973048.png";
item.time = moment(res.createTime).format("HH:mm:ss");
});
for (const index in chatDatas) {
const userId = chatDatas[index].from;
this.customerInfo.messages = chatDatas;
}
}
setChatInfo(res: any) {
this.chatInfo = res;
},
connect() {
// 连接成功后,将 isConnected 状态设置为 true
......
import { ElMessage } from "element-plus";
import { useUserStore } from "../store/modules/user";
import {
useRoute
} from 'vue-router';
const route = useRoute() || {}
const routeParams = route.query || {}
let HeartbeatTime: any = null;
let websocket: WebSocket | null = null; // 用于存储实例化后websocket
let rec: any; // 断线重连后,延迟5秒重新创建WebSocket连接 rec用来存储延迟请求的代码
// 创建websocket
let callBack: any = null;
const connectMsg = (fun) => {
callBack = fun
console.log(callBack)
const useUser = useUserStore()
useUser.setUserInfo({
username: routeParams.loginId || '1721217621001',
})
const wsUrl = `${import.meta.env.VITE_USER_APP_WS_API_URL}?type=yk&code=${useUser.userInfo.username
}&kf=${useUser.customerInfo.username}`
console.log(wsUrl)
initWebSocket(wsUrl)
}
const connectMsg = (fun: Function) => {
callBack = fun;
const useUser = useUserStore();
const wsUrl = `${import.meta.env.VITE_USER_APP_WS_API_URL}?type=yk&code=${
useUser.chatInfo.clientId
}&kf=${useUser.chatInfo.serviceId}`;
console.log(wsUrl);
initWebSocket(wsUrl);
};
function creatWebSocket(wsUrl: string) {
// 判断当前浏览器是否支持WebSocket
if ("WebSocket" in window) {
......@@ -43,37 +34,37 @@ function creatWebSocket(wsUrl: string) {
// 初始化websocket
function initWebSocket(wsUrl: string) {
if (!websocket) websocket = new WebSocket(wsUrl);
websocket.onopen = function(eee) {
websocket.onopen = function (eee) {
websocketOpen();
};
// // 接收
websocket.onmessage = function(e: MessageEvent<any>) {
websocket.onmessage = function (e: MessageEvent<any>) {
websocketonmessage(e);
};
// 连接发生错误
websocket.onerror = function() {
websocket.onerror = function () {
// isConnect = false; // 连接断开修改标识
reConnect(wsUrl); // 连接错误 需要重连
};
websocket.onclose = function(e) {
websocket.onclose = function (e) {
websocketclose(e);
};
}
//调取心跳
function websocketHeartbeat() {
clearInterval(HeartbeatTime)
clearInterval(HeartbeatTime);
HeartbeatTime = setInterval(() => {
console.log('调取心跳')
console.log("调取心跳");
websocketsend({
cmd: 13
cmd: 13,
});
}, 10000)
}, 10000);
}
// 定义重连函数
const reConnect = (wsUrl: string) => {
if (useUserStore().isConnected) return; // 如果已经连上就不在重连了
rec && clearTimeout(rec);
rec = setTimeout(function() {
rec = setTimeout(function () {
// 延迟5秒重连 避免过多次过频繁请求重连
creatWebSocket(wsUrl);
}, 5000);
......@@ -82,19 +73,19 @@ const reConnect = (wsUrl: string) => {
// 创建连接
function websocketOpen() {
useUserStore().connect();
websocketHeartbeat()
websocketHeartbeat();
}
// 数据接收
function websocketonmessage(e: MessageEvent<any>) {
const res = JSON.parse(e.data); // 解析JSON格式的数据
console.log(res,'res')
console.log(res, "res");
if (res.command == 11) {
console.log('收到')
console.log("收到");
//将数据放在store中
// 下面的判断则是后台返回的接收到的数据 如何处理自己决定
setTimeout(() => {
console.log(callBack,'callBack')
callBack()
console.log(callBack, "callBack");
callBack();
// useUserStore().setUserListMessages(res.data).then();
}, 10);
}
......@@ -102,8 +93,8 @@ function websocketonmessage(e: MessageEvent<any>) {
// 关闭
function websocketclose(e: any) {
console.log('关闭')
clearInterval(HeartbeatTime)
console.log("关闭");
clearInterval(HeartbeatTime);
useUserStore().disconnect(); // 修改连接状态
}
......@@ -151,4 +142,10 @@ const closeWebSocket = () => {
}
};
export { connectMsg, initWebSocket, sendWebSocket, creatWebSocket, closeWebSocket };
export {
connectMsg,
initWebSocket,
sendWebSocket,
creatWebSocket,
closeWebSocket,
};
......@@ -7,17 +7,24 @@
</el-header>
<el-container>
<el-container>
<el-main id="srollId" ref="srollId" :style="{
<el-main
id="srollId"
ref="srollId"
:style="{
padding: '0px 24px',
height: '60vh',
width: '100%',
}">
}"
>
<div class="title-message">You have no history messages</div>
<div class="we-connecting">
We are connecting you to online customer service
</div>
<!-- 推荐商品 -->
<div class="message-container message-container-right" v-if="productInfo.isShow">
<div
class="message-container message-container-right"
v-if="productInfo.isShow"
>
<div class="classSendLink">
<div class="classSendDiv">
<div class="classSend-img">
......@@ -68,19 +75,28 @@
</div>
<!-- 图片 -->
<div v-else-if="message?.msgType == 1" class="message-container image-content"
:class="getMessageClass(message?.isSent)">
<div
v-else-if="message?.msgType == 1"
class="message-container image-content"
:class="getMessageClass(message?.isSent)"
>
<div class="message-container">
<div class="bubble">
<div class="img-wraper">
<el-image :src="message?.content" :preview-src-list="[message?.content]" />
<el-image
:src="message?.content"
:preview-src-list="[message?.content]"
/>
</div>
</div>
</div>
</div>
<!-- 视频 -->
<div v-else-if="message?.msgType == 2" class="message-container video-content"
:class="getMessageClass(message?.isSent)">
<div
v-else-if="message?.msgType == 2"
class="message-container video-content"
:class="getMessageClass(message?.isSent)"
>
<div class="message-container">
<div class="bubble">
<div class="img-wraper">
......@@ -90,8 +106,11 @@
</div>
</div>
<!-- rfq -->
<div class="message-container message-container-right" v-else-if="message.msgType == 3"
@click.prevent="handleMessageClick($event)">
<div
class="message-container message-container-right"
v-else-if="message.msgType == 3"
@click.prevent="handleMessageClick($event)"
>
<div class="classSendLink">
<div class="classSendDiv">
<div class="classSend-img">
......@@ -116,7 +135,10 @@
</div>
</div>
<!-- 询价单 -->
<div class="message-container message-container-right" v-else-if="message.msgType == 4">
<div
class="message-container message-container-right"
v-else-if="message.msgType == 4"
>
<div class="inquiry-list">
<div class="inquiry-top">
<div class="product-left">
......@@ -148,19 +170,29 @@
</div>
</div>
<!-- 普通聊天 -->
<div v-else class="message-container" :class="getMessageClass(message?.isSent)">
<div
v-else
class="message-container"
:class="getMessageClass(message?.isSent)"
>
<div class="message-container">
<div class="bubble">
<div class="message" v-html="message?.content"
@click.prevent="handleMessageClick($event)"></div>
<div
class="message"
v-html="message?.content"
@click.prevent="handleMessageClick($event)"
></div>
</div>
</div>
</div>
</div>
</el-main>
<el-footer class="el-footer" :style="{ border: '1px solid #E9ECF1' }">
<AutomaticPrompt @keydown.enter="handleButtonClick" @updateState="getState"
ref="automaticPromptRef"></AutomaticPrompt>
<AutomaticPrompt
@keydown.enter="handleButtonClick"
@updateState="getState"
ref="automaticPromptRef"
></AutomaticPrompt>
<div class="btn-send">
<div>[ Send shortcut key: Enter ]</div>
<div>
......@@ -171,9 +203,14 @@
</div>
</el-footer>
</el-container>
<el-aside width="300px" class="shirnk-aside" v-shrink="{ isShrink, width: '0px' }" :style="{
<!-- <el-aside
width="300px"
class="shirnk-aside"
v-shrink="{ isShrink, width: '0px' }"
:style="{
height: 'calc( 100vh - 50px )',
}">
}"
>
<div class="shrink-text pointer" @click="changeiShrink">
<el-icon size="15">
<DArrowLeft v-if="isShrink" />
......@@ -188,7 +225,11 @@
<div class="recentlyViewd" v-if="pageType == 1">
Recommended Products
</div>
<div v-for="(item, index) in productList" :key="index" class="browse-glance">
<div
v-for="(item, index) in productList"
:key="index"
class="browse-glance"
>
<img :src="item.productImg" class="browse-img" />
<div class="browse-glowup">
<div class="title ellipsis">{{ item.productName }}</div>
......@@ -204,43 +245,86 @@
<div v-else style="width: 300px;">
<div class="recentlyViewd">Request for Quotation</div>
<div class="recently-input-box">
<el-form label-position="top" style="max-width: 600px;" label-width="auto"
class="demo-dynamic" ref="ruleFormRef" :rules="rules" :model="ruleForm">
<el-form
label-position="top"
style="max-width: 600px;"
label-width="auto"
class="demo-dynamic"
ref="ruleFormRef"
:rules="rules"
:model="ruleForm"
>
<el-form-item prop="ProductName" label="Product Name">
<el-input v-model="ruleForm.ProductName" style="height: 36px;"
placeholder="Please enter" prop="Email" />
<el-input
v-model="ruleForm.ProductName"
style="height: 36px;"
placeholder="Please enter"
prop="Email"
/>
</el-form-item>
<el-form-item prop="Email" label="Product Category">
<el-select placeholder="Please select" prop="Email" style="height: 36px;"
v-model="ruleForm.Email">
<el-select
placeholder="Please select"
prop="Email"
style="height: 36px;"
v-model="ruleForm.Email"
>
<el-option label="Restaurant" value="1" />
<el-option label="Order No." value="2" />
<el-option label="Tel" value="3" />
</el-select>
</el-form-item>
<el-form-item prop="unit" label="Purchase Quantity">
<el-input style="max-width: 300px; height: 36px;" placeholder="Please enter"
v-model="ruleForm.purchaseQuantity" class="input-with-select" prop="Email">
<el-input
style="max-width: 300px; height: 36px;"
placeholder="Please enter"
v-model="ruleForm.purchaseQuantity"
class="input-with-select"
prop="Email"
>
<template #append>
<el-select :clearable="false" placeholder="Select" style="width: 136px;"
v-model="ruleForm.unit">
<el-option v-for="item in unitList" :label="item.value"
:value="item.value" />
<el-select
:clearable="false"
placeholder="Select"
style="width: 136px;"
v-model="ruleForm.unit"
>
<el-option
v-for="item in unitList"
:label="item.value"
:value="item.value"
/>
</el-select>
</template>
</el-input>
</el-form-item>
<el-form-item label="Other requirements explanation" prop="otherRequirements">
<el-input v-model="ruleForm.otherRequirements"
:autosize="{ minRows: 3, maxRows: 10 }" type="textarea"
placeholder="Please enter" />
<el-form-item
label="Other requirements explanation"
prop="otherRequirements"
>
<el-input
v-model="ruleForm.otherRequirements"
:autosize="{ minRows: 3, maxRows: 10 }"
type="textarea"
placeholder="Please enter"
/>
</el-form-item>
<el-form-item prop="flieUrl">
<input type="file" ref="requireFile" style="display: none;"
@change="fileImgChange" />
<el-input v-model="ruleForm.flieUrl" style="display: none;" />
<div class="requirements-box pointer" v-if="!ruleForm.flieUrl"
@click="requireFileOk">
<input
type="file"
ref="requireFile"
style="display: none;"
@change="fileImgChange"
/>
<el-input
v-model="ruleForm.flieUrl"
style="display: none;"
/>
<div
class="requirements-box pointer"
v-if="!ruleForm.flieUrl"
@click="requireFileOk"
>
<el-button icon="UploadFilled" class="uploadInfo" />
<div class="upload">
<div class="click-to-upload">
......@@ -252,8 +336,12 @@
<div class="requirements-box1" v-if="ruleForm.flieUrl">
<div class="box">
<div class="upload-name">
<span class="flieName ellipsis"
style="-webkit-line-clamp:1;display:block">{{ruleForm.flieName.split('.')[0]}}</span>
<span
class="flieName ellipsis"
style="-webkit-line-clamp: 1; display: block;"
>
{{ ruleForm.flieName.split('.')[0] }}
</span>
<span>.{{ ruleForm.flieName.split('.')[1] }}</span>
</div>
<div class="upload-info">
......@@ -269,68 +357,49 @@
</div>
</el-form-item>
<el-form-item prop="EmailAddress" label="Email Address">
<el-input style="height: 36px;" placeholder="Please enter"
v-model="ruleForm.EmailAddress" />
<el-input
style="height: 36px;"
placeholder="Please enter"
v-model="ruleForm.EmailAddress"
/>
</el-form-item>
<div class="footerSubmit pointer" @click="submitForm(ruleFormRef)">
<div
class="footerSubmit pointer"
@click="submitForm(ruleFormRef)"
>
Submit
</div>
</el-form>
</div>
</div>
</div>
</el-aside>
</el-aside> -->
</el-container>
</el-container>
</div>
</template>
<script lang="ts" setup>
import '../assets/font/iconfont.css'
import {
ElMessage
} from 'element-plus'
import moment from 'moment'
import type {
FormInstance
} from 'element-plus'
import {
ref,
onMounted,
watch,
nextTick,
reactive
} from 'vue'
import {
useUserStore
} from '../store/modules/user'
import AutomaticPrompt from '../components/AutomaticPrompt.vue'
import ImageViewer from '@luohc92/vue3-image-viewer'
import {
sendWebSocket,
initWebSocket,
connectMsg
} from '../utils/websocket'
import '@luohc92/vue3-image-viewer/dist/style.css'
import {
checkMesssages
} from '../axios/model/user'
import {
require,
unitList
} from '@/utils/index'
import {
useRoute
} from 'vue-router'
import {
upLoadFilesHander
} from '../minxins/UploadMixin'
const route = useRoute()
const routeParams = route.query
const img =
import '../assets/font/iconfont.css'
import { ElMessage } from 'element-plus'
import moment from 'moment'
import type { FormInstance } from 'element-plus'
import { ref, onMounted, watch, nextTick, reactive } from 'vue'
import { useUserStore } from '../store/modules/user'
import AutomaticPrompt from '../components/AutomaticPrompt.vue'
import ImageViewer from '@luohc92/vue3-image-viewer'
import { sendWebSocket, initWebSocket, connectMsg } from '../utils/websocket'
import '@luohc92/vue3-image-viewer/dist/style.css'
import { checkMesssages, getKfCode } from '../axios/model/user'
import { require, unitList } from '@/utils/index'
import { useRoute } from 'vue-router'
import { upLoadFilesHander } from '../minxins/UploadMixin'
const route = useRoute()
const routeParams = route.query
const img =
'https://us-east-pat.s3.amazonaws.com/test/b2b/cos/images/19d114ec-d244-4e12-a409-6a39c8c1c44c.webp'
const pageType = routeParams.type || 1
const requireFile = ref < any > (null)
const ruleForm = ref({
const pageType = routeParams.type || 1
const requireFile = ref<any>(null)
const ruleForm = ref({
ProductName: '',
Email: '',
purchaseQuantity: '',
......@@ -341,50 +410,57 @@
flieUrl: '',
otherRequirements: '',
EmailAddress: '',
})
//进入页面直接发送请求从后端获取热点数据
onMounted(async () => {
})
//进入页面直接发送请求从后端获取热点数据
onMounted(async () => {
getKfCodeInfo()
})
//获取客服信息
//用户端根据商品priceId或者supplierId获取将要客服ID,优先找在线客服,注意是商品对应供应商的账号(客服iD)
function getKfCodeInfo() {
let pramas = {
priceId: routeParams.priceId,
supplierId: routeParams.supplierId,
}
getKfCode(pramas).then(({ code, data, description }) => {
if (code == 200) {
const chatInfo = {
clientId: routeParams.supplierId || new Date().getTime(),
serviceId: data || routeParams.priceId,
}
store.setChatInfo(chatInfo)
connectMsg(getCheckMesssages)
getCheckMesssages()
setMessage()
// connectMsg().then((res: any) => {
// getCheckMesssages()
// setMessage()
// })
}
})
// const connectMsg = () => {
// return new Promise((resolve: any) => {
// useUser.connect()
// initWebSocket(toIp)
// setTimeout(() => {
// resolve()
// }, 800)
// })
// }
let isShrink = ref('')
const changeiShrink = () => {
}
let isShrink = ref('')
const changeiShrink = () => {
isShrink.value = !isShrink.value
}
//收缩
const vShrink: Directive < HTMLElement, boolean | Props > = {
mounted(el: any, binding: {
}
//收缩
const vShrink: Directive<HTMLElement, boolean | Props> = {
mounted(
el: any,
binding: {
value: any
}) {
let {
option
} = formatCOlorOption(binding.value)
},
) {
let { option } = formatCOlorOption(binding.value)
option.isUpdate && renderStyle(el, option)
},
updated(el: HTMLElement, binding: {
updated(
el: HTMLElement,
binding: {
value: any
}, vnode: any) {
},
vnode: any,
) {
//修改之后
let {
option
} = formatCOlorOption(binding.value)
let { option } = formatCOlorOption(binding.value)
if (option.isShrink) {
renderStyle(el, option)
} else {
......@@ -395,47 +471,40 @@
renderStyle(el, obj)
}
},
}
}
function getCheckMesssages() {
const useUser = useUserStore()
function getCheckMesssages() {
let query = {
sessionId: `${store.customerInfo.username}-${ useUser.userInfo.username}`,
}
console.log(query)
checkMesssages(query).then(({
code,
result,
message
}) => {
result = result || []
result.forEach((item) => {
sessionId: `${store.chatInfo.clientId}-${store.chatInfo.serviceId}`,
}
checkMesssages(query).then(({ code, data, description }) => {
data = data || []
data.forEach((item: any) => {
if ([3, 4].includes(item.msgType)) {
item.content = JSON.parse(item.content);
item.content = JSON.parse(item.content)
}
item.isSent = item.fromCode == useUser.userInfo.username
item.isSent = item.fromCode == store.chatInfo.serviceId
item.userImg = '/assets/img/user.png'
item.time = moment(item.createTime).format('HH:MM')
})
messages.value = result
messages.value = data
})
}
//设置style的属性值
function renderStyle(el: HTMLElement, option: {
}
//设置style的属性值
function renderStyle(
el: HTMLElement,
option: {
[x: string]: any
}) {
},
) {
for (let key in option) el.style[key] = option[key]
}
}
function fileImgChange() {
function fileImgChange() {
var e: any = window.event || event
var oFile = e.target.files[0]
upLoadFilesHander(oFile).then((ress) => {
const {
success,
result
}: any = ress
const { success, result }: any = ress
if (success) {
console.log(oFile, 'oFile')
ruleForm.value.flieUrl = result
......@@ -450,202 +519,189 @@
spinner: 'el-icon-loading',
})
loading.close()
}
//合并指令传递的数据和默认配置的数据
function formatCOlorOption(val: string | Props) {
}
//合并指令传递的数据和默认配置的数据
function formatCOlorOption(val: string | Props) {
const option =
typeof val !== 'string' ?
Object.assign(defaultStyle, val) : {
typeof val !== 'string'
? Object.assign(defaultStyle, val)
: {
val,
...defaultStyle,
}
return {
option,
}
}
const deleteFlieName = (val: any) => {
}
const deleteFlieName = (val: any) => {
console.log(isUpload.value, '打印', 'val')
ruleForm.value.flieUrl = ''
}
}
//过渡
const defaultStyle: {
transition ? : string
} = {
//过渡
const defaultStyle: {
transition?: string
} = {
transition: 'all 0.6s linear',
}
const requireFileOk = () => {
}
const requireFileOk = () => {
requireFile.value.click()
}
const rules = reactive({
ProductName: [{
}
const rules = reactive({
ProductName: [
{
required: true,
message: 'Enter a specific product name',
trigger: 'blur',
}, ],
Email: [{
},
],
Email: [
{
required: false,
message: 'Select',
trigger: 'blur',
}, ],
flieUrl: [{
},
],
flieUrl: [
{
required: true,
message: 'Please select',
trigger: 'blur',
}, ],
explanation: [{
},
],
explanation: [
{
required: false,
message: 'Please enter',
trigger: 'blur',
}, ],
unit: [{
},
],
unit: [
{
required: true,
message: 'Please enter',
trigger: 'blur',
}, ],
EmailAddress: [{
},
],
EmailAddress: [
{
required: true,
message: 'Please enter',
trigger: 'blur',
}, ],
})
const ruleFormRef = ref < FormInstance > ()
const customerInfo = ref({})
const messages = ref([])
const isUpload = ref < Boolean > (true)
const productInfo = ref({
},
],
})
const ruleFormRef = ref<FormInstance>()
const messages = ref([])
const isUpload = ref<Boolean>(true)
const productInfo = ref({
productImg: img,
productName: 'The secret to looking glowup nowadays',
price: '$1.40 - 2.50',
link: 'send',
isShow: false,
})
})
const productList = ref([{
productImg: 'https://us-east-pat.s3.amazonaws.com/test/b2b/cos/images/6829c33f-8227-4b87-8df6-f41aa7e7e50e.jpg',
productName: 'D07 Lady Ladies Wrist Smart Watch Blood Oxygen NFC IP68 Waterproof',
const productList = ref([
{
productImg:
'https://us-east-pat.s3.amazonaws.com/test/b2b/cos/images/6829c33f-8227-4b87-8df6-f41aa7e7e50e.jpg',
productName:
'D07 Lady Ladies Wrist Smart Watch Blood Oxygen NFC IP68 Waterproof',
price: 'US$ 28 - 32',
link: 'Send',
},
{
productImg: 'https://us-east-pat.s3.amazonaws.com/test/b2b/cos/images/c033aab2-4283-4f6f-baad-31087d21db91.jpg',
productName: 'Js8 PRO Max Ladies Smart Watch Heart Rate Blood Sports Wholease Wrist Amoled 2.1inch Big Screen',
productImg:
'https://us-east-pat.s3.amazonaws.com/test/b2b/cos/images/c033aab2-4283-4f6f-baad-31087d21db91.jpg',
productName:
'Js8 PRO Max Ladies Smart Watch Heart Rate Blood Sports Wholease Wrist Amoled 2.1inch Big Screen',
price: ' US$ 19.6 - 23',
link: 'Send',
},
{
productImg: 'https://us-east-pat.s3.amazonaws.com/test/b2b/cos/images/af6ce6c1-dcb2-4a8e-a8f1-ed1d747480a6.webp',
productName: 'HK85 Fashion Mens Smart Watch Ladies Women Wrist Sports Watch Play Music Bluetooth Call',
productImg:
'https://us-east-pat.s3.amazonaws.com/test/b2b/cos/images/af6ce6c1-dcb2-4a8e-a8f1-ed1d747480a6.webp',
productName:
'HK85 Fashion Mens Smart Watch Ladies Women Wrist Sports Watch Play Music Bluetooth Call',
price: 'US$ 19.6 - 23',
link: 'Send',
},
])
const store: any = useUserStore()
const automaticPromptRef = ref('')
let msg = ''
//获取历史记录
const getHistoryMessage: any = () => {
const data = {
cmd: '19',
type: '1',
fromUserId: store.customerInfo.username,
group_id: '',
userId: store.userInfo.username,
}
sendWebSocket(data)
}
//设置message
const setMessage: any = () => {
customerInfo.value = store.customerInfo
messages.value = customerInfo.value.messages || []
}
//获取子组件中state的值,这个好像是写多余了,可以直接使用automaticPromptRef.value.setState('');获取state值
const getState = (v: string) => {
])
const store: any = useUserStore()
const automaticPromptRef = ref('')
let msg = ''
//获取子组件中state的值,这个好像是写多余了,可以直接使用automaticPromptRef.value.setState('');获取state值
const getState = (v: string) => {
msg = v
}
//监听聊天框数据的改变
watch(
}
//监听聊天框数据的改变
watch(
messages,
(newVal, oldVal) => {
if (newVal?.length > 0) setSrollHeight()
}, {
deep: true
},
)
//让聊天滑动窗口滑到底部
const setSrollHeight = () => {
{
deep: true,
},
)
//让聊天滑动窗口滑到底部
const setSrollHeight = () => {
nextTick(() => {
const div = document.getElementById('srollId')
if (div) div.scrollTop = div?.scrollHeight
})
}
}
//发送按钮
const handleButtonClick = () => {
//发送按钮
const handleButtonClick = () => {
if (!msg.trim()) {
return ElMessage({
message: 'Please enter content',
type: 'error',
})
}
sendData(msg.trim(), 0)
automaticPromptRef.value.setState('')
}
const sendData = (msg, msgType) => {
let data = {
content: msg,
isSent: true,
cmd: '11',
msgType: 0,
msgType,
chatType: '2',
fromLang: 'cn',
toLang: 'en',
group_id: '',
time: moment(new Date()).format('HH:mm:ss'),
to: customerInfo.value.username,
form: store.userInfo.username,
to: store.chatInfo.serviceId,
form: store.chatInfo.clientId,
}
console.log(customerInfo.value.username, 'value')
console.log(data, 'data')
console.log(data)
messages.value?.push(data)
sendWebSocket(data)
automaticPromptRef.value.setState('')
}
//关闭商品弹窗
const toCloseLink = () => {
}
//关闭商品弹窗
const toCloseLink = () => {
productInfo.value.isShow = false
}
//发布询价单
const submitForm = (formEl: any) => {
}
//发布询价单
const submitForm = (formEl: any) => {
if (!formEl) return
formEl.validate((valid: boolean) => {
console.log(valid, 'valid')
if (valid) {
const data = {
content: ruleForm.value,
isSent: true,
cmd: '11',
msgType: 4,
chatType: '2',
fromLang: 'cn',
toLang: 'en',
group_id: '',
time: moment(new Date()).format('HH:mm:ss'),
to: customerInfo.value.username,
form: store.userInfo.username,
}
messages.value?.push(data)
sendWebSocket(data)
sendData(ruleForm.value, 4)
} else {
return false
}
})
}
const openWindow = (event: any) => {
}
const openWindow = (event: any) => {
urlDownload(event)
}
const handleMessageClick = (event: any) => {
}
const handleMessageClick = (event: any) => {
const target = event.target
console.log(target, 'target')
if (target.tagName === 'A') {
......@@ -663,12 +719,12 @@
maskBgColor: 'rgba(0,0,0,0.7)',
})
}
}
const downLoad = (message: any) => {
}
const downLoad = (message: any) => {
urlDownload(message.content.flieUrl)
}
}
const urlDownload = (url: string, fileName = '下载文件') => {
const urlDownload = (url: string, fileName = '下载文件') => {
// 创建隐藏的可下载链接
let eleLink = document.createElement('a')
eleLink.download = fileName
......@@ -678,43 +734,22 @@
document.body.appendChild(eleLink)
eleLink.click()
// 然后移除
console.log(url, '下载url')
document.body.removeChild(eleLink)
}
}
const handleLinkClick = (msg: string) => {
messages.value.push({
content: msg,
isSent: true
})
}
//消息框样式动态选择
const getMessageClass = (isSent: boolean) => {
//消息框样式动态选择
const getMessageClass = (isSent: boolean) => {
return isSent ? 'message-container-right' : 'message-container-left'
}
//发送商品信息
const toSendLink = (e: any) => {
const data = {
content: e,
isSent: true,
cmd: '11',
msgType: 3,
chatType: '2',
fromLang: 'cn',
toLang: 'en',
group_id: '',
time: moment(new Date()).format('HH:mm:ss'),
to: customerInfo.value.username,
form: store.userInfo.username,
}
messages.value?.push(data)
sendWebSocket(data)
}
}
//发送商品信息
const toSendLink = (e: any) => {
sendData(e, 3)
}
</script>
<style lang="scss" scoped>
$primary-color: #e0493f;
$primary-color: #e0493f;
.shirnk-aside {
.shirnk-aside {
position: relative;
overflow: initial;
......@@ -737,9 +772,9 @@
overflow-y: scroll;
height: 100%;
}
}
}
.inquiry-list {
.inquiry-list {
display: flex;
width: 360px;
padding: 12px 12px 8px 12px;
......@@ -816,9 +851,9 @@
}
}
}
}
}
.we-connecting {
.we-connecting {
display: flex;
padding: 8px;
font-size: 12px;
......@@ -830,24 +865,24 @@
margin: 16px auto;
margin-top: 0px;
color: #798494;
}
}
.title-message {
.title-message {
color: #798494;
height: 56px;
line-height: 56px;
text-align: center;
font-feature-settings: 'clig'off, 'liga'off;
font-feature-settings: 'clig' off, 'liga' off;
font-family: 'Helvetica Neue';
font-size: 12px;
font-style: normal;
font-weight: 400;
}
}
.message-time {
.message-time {
color: #798494;
text-align: center;
font-feature-settings: 'clig'off, 'liga'off;
font-feature-settings: 'clig' off, 'liga' off;
font-family: 'Inter';
font-size: 14px;
font-style: normal;
......@@ -876,9 +911,9 @@
&::before {
margin-right: 8px;
}
}
}
.class-send-box {
.class-send-box {
display: flex;
justify-content: space-between;
......@@ -895,9 +930,9 @@
line-height: 20px;
text-align: center;
}
}
}
.class-send-title {
.class-send-title {
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
......@@ -910,27 +945,27 @@
font-style: normal;
font-weight: 400;
line-height: 20px;
}
}
.classSend-price {
.classSend-price {
display: flex;
flex: 1;
flex-direction: column;
justify-content: space-between;
}
}
.class-send-price {
.class-send-price {
color: #0c203d;
font-feature-settings: 'clig'off, 'liga'off;
font-feature-settings: 'clig' off, 'liga' off;
font-family: 'Helvetica Neue';
font-size: 18px;
font-style: normal;
font-weight: 700;
line-height: 24px;
letter-spacing: 0.72px;
}
}
.recentlyViewd {
.recentlyViewd {
display: flex;
height: 44px;
width: 100%;
......@@ -940,19 +975,19 @@
align-items: center;
background: #f8f8faff;
color: #010914;
font-feature-settings: 'clig'off, 'liga'off;
}
font-feature-settings: 'clig' off, 'liga' off;
}
.onlineCustomer {
.onlineCustomer {
color: #010914;
font-family: 'PingFang SC';
font-size: 14px;
margin-left: 8px;
font-style: normal;
font-weight: 400;
}
}
.el-header-left {
.el-header-left {
height: 76px;
width: 100%;
border: 1px solid #e6e8ed;
......@@ -974,17 +1009,17 @@
font-size: 14px;
}
}
}
}
.el-container-center {
.el-container-center {
background: #fff;
}
}
.el-header {
.el-header {
padding: 0px;
}
}
.el-header-center {
.el-header-center {
border-top: 1px solid #e6e8ed;
border-bottom: 1px solid #e6e8ed;
border-right: 1px solid #e6e8ed;
......@@ -1006,9 +1041,9 @@
.url {
color: #798494;
}
}
}
.el-header-right {
.el-header-right {
height: 76px;
width: 100%;
border: 1px solid #e6e8ed;
......@@ -1029,9 +1064,9 @@
font-weight: 500;
line-height: 20px;
}
}
}
.el-footer {
.el-footer {
width: 100%;
border-top: 0px;
padding: 0px;
......@@ -1045,7 +1080,8 @@
bottom: 10px;
position: absolute;
width: 100%;
padding: 18px 21px;
background: #fff;
padding: 14px 21px 18px 21px;
padding-bottom: 0px;
.send {
......@@ -1093,9 +1129,9 @@
text-align: center;
margin-right: 8px;
}
}
}
.el-menu-item {
.el-menu-item {
line-height: initial;
padding: 0px !important;
height: 86px;
......@@ -1105,9 +1141,9 @@
background: #eff0f1;
border-left: 3px solid #1890ff;
}
}
}
.user-info-box {
.user-info-box {
display: flex;
width: 100%;
height: 100%;
......@@ -1199,7 +1235,7 @@
max-width: 80px;
overflow: hidden;
color: #798494;
font-feature-settings: 'clig'off, 'liga'off;
font-feature-settings: 'clig' off, 'liga' off;
text-overflow: ellipsis;
font-family: 'Inter';
margin-top: 3px;
......@@ -1216,9 +1252,9 @@
font-family: 'Inter';
font-weight: 400;
}
}
}
.customer-info-right {
.customer-info-right {
.customer-info-box {
display: flex;
......@@ -1275,7 +1311,7 @@
flex: 1 0 0;
overflow: hidden;
color: #010914;
font-feature-settings: 'clig'off, 'liga'off;
font-feature-settings: 'clig' off, 'liga' off;
text-overflow: ellipsis;
font-family: 'Inter';
font-size: 14px;
......@@ -1287,7 +1323,7 @@
.avatar-right-price {
display: flex;
color: #010914;
font-feature-settings: 'clig'off, 'liga'off;
font-feature-settings: 'clig' off, 'liga' off;
font-family: 'Inter';
font-size: 16px;
font-style: normal;
......@@ -1306,29 +1342,29 @@
}
}
}
}
}
.el-input__wrapper {
.el-input__wrapper {
width: 48px;
}
}
.user-wrapper {
.user-wrapper {
padding: 16px;
}
}
.user-info {
.user-info {
padding-top: 15px;
padding-bottom: 10px;
}
}
.chat-bar {
.chat-bar {
height: 50px;
width: 100%;
line-height: 50px;
text-align: left;
}
}
.send-btn {
.send-btn {
position: absolute;
right: 0;
bottom: 10px;
......@@ -1340,28 +1376,28 @@
justify-content: flex-end;
margin-top: 10px;
margin-right: 10px;
}
}
.underline-link {
.underline-link {
text-decoration: underline;
}
}
.message-container {
.message-container {
display: flex;
align-items: start;
margin-bottom: 10px;
position: relative;
}
}
.message-container .time {
.message-container .time {
text-align: center;
color: #999;
font-size: 14px;
position: absolute;
width: 100%;
}
}
.avatar {
.avatar {
width: 32px;
height: 32px;
border-radius: 50%;
......@@ -1376,9 +1412,9 @@
width: 100%;
height: 100%;
}
}
}
.bubble {
.bubble {
background-color: #e8e8e8;
color: #000;
padding: 10px 14px;
......@@ -1422,18 +1458,18 @@
margin-bottom: 0px;
}
}
}
}
.official-box {
.official-box {
width: 464px;
}
}
.official-box ul li {
.official-box ul li {
position: relative;
padding-left: 15px;
}
}
.official-box ul li::before {
.official-box ul li::before {
content: ' ';
left: 2px;
position: absolute;
......@@ -1443,25 +1479,25 @@
top: 50%;
transform: translateY(-50%);
border-radius: 50%;
}
}
.message-container-right {
.message-container-right {
justify-content: flex-end;
}
}
.message-container-left {
.message-container-left {
justify-content: flex-start;
}
}
.avatar-number-input :deep(.el-input) {
.avatar-number-input :deep(.el-input) {
width: 102px !important;
}
}
.avatar-number-input {
.avatar-number-input {
width: 102px !important;
}
}
.add {
.add {
display: flex;
height: var(--Layout-lg, 32px);
padding: 0 var(--Spacing-lg, 12px) 0 var(--Spacing-md, 8px);
......@@ -1479,9 +1515,9 @@
width: 20px;
height: 20px;
}
}
}
.form {
.form {
margin-top: 32px;
:deep(.el-form-item__label) {
......@@ -1505,7 +1541,7 @@
flex: 1 0 0;
overflow: hidden;
color: #798494;
font-feature-settings: 'clig'off, 'liga'off;
font-feature-settings: 'clig' off, 'liga' off;
text-overflow: ellipsis;
font-family: 'PingFang SC';
font-size: 14px;
......@@ -1518,13 +1554,13 @@
:deep(.el-textarea__inner) {
background: #f2f3f5;
}
}
}
#srollId {
#srollId {
border-right: 1px solid #e6e8ed;
}
}
.browse-glance {
.browse-glance {
display: flex;
position: relative;
padding: 16px 12px 16px 12px;
......@@ -1547,7 +1583,7 @@
.units {
margin-top: 8px;
color: #0c203d;
font-feature-settings: 'clig'off, 'liga'off;
font-feature-settings: 'clig' off, 'liga' off;
font-family: 'Helvetica Neue';
font-size: 12px;
font-style: normal;
......@@ -1560,7 +1596,7 @@
flex: 1;
color: #0c203d;
font-feature-settings: 'clig'off, 'liga'off;
font-feature-settings: 'clig' off, 'liga' off;
font-family: 'Helvetica Neue';
font-size: 14px;
font-style: normal;
......@@ -1594,9 +1630,9 @@
font-weight: 400;
margin: 0px auto;
}
}
}
.classSendLink {
.classSendLink {
.classSend-img {
width: 72px;
height: 72px;
......@@ -1617,9 +1653,9 @@
padding: 12px 12px 0px 12px;
border-radius: 8px 0 8px 8px;
border: 1px solid #e9ecf1;
}
}
.sendlinkbox {
.sendlinkbox {
height: 40px;
line-height: 40px;
display: flex;
......@@ -1645,30 +1681,29 @@
display: flex;
align-items: center;
color: #626d7a;
font-feature-settings: 'clig'off,
'liga'off;
font-feature-settings: 'clig' off, 'liga' off;
font-family: 'Helvetica Neue';
font-size: 12px;
font-style: normal;
font-weight: 400;
line-height: 16px;
}
}
.el-image {
.el-image {
img {
width: 100%;
height: 100%;
}
}
}
.img-wraper {
.img-wraper {
video {
width: 100%;
height: 100%;
}
}
}
.sendlinkbox {
.sendlinkbox {
div {
display: flex;
align-items: center;
......@@ -1694,50 +1729,50 @@
left: 0px;
}
}
}
}
.click-to-upload {
.click-to-upload {
color: #073a3d;
font-family: 'Inter';
font-size: 14px;
font-style: normal;
margin-bottom: 4px;
line-height: 20px;
}
}
.or-drag-and-drap {
.or-drag-and-drap {
color: #475467;
font-family: 'Inter';
font-size: 14px;
font-style: normal;
font-weight: 400;
}
}
.recently-input-box {
.recently-input-box {
padding: 12px;
}
}
.requirements-box {
.requirements-box {
position: relative;
z-index: 0;
}
}
.image-content,
.video-content {
.image-content,
.video-content {
width: 300px;
}
}
input {
input {
position: absolute;
top: 0px;
left: 0px;
height: 100%;
width: 100%;
background: transparent;
}
}
.requirements-box,
.requirements-box1 {
.requirements-box,
.requirements-box1 {
.box {
display: flex;
justify-content: space-between;
......@@ -1784,64 +1819,64 @@
margin-left: 6px;
}
}
}
}
.requirements-box {
.requirements-box {
border: 1px solid #eaecf0;
padding: 12px 58px 12px 14px;
}
}
.or-drag-and-drap {
.or-drag-and-drap {
line-height: 20px;
}
}
.requirements-box1 {
.requirements-box1 {
background: #f6f9fcff;
}
}
.uploadInfo {
.uploadInfo {
width: 40px;
height: 40px;
}
}
:deep(.el-select) {
:deep(.el-select) {
height: 36px;
background: #ffffffff;
}
}
:deep(.el-select__wrapper) {
:deep(.el-select__wrapper) {
height: 36px !important;
}
}
:deep(.el-input__validateIcon) {
:deep(.el-input__validateIcon) {
display: none;
}
}
.product-count {
.product-count {
color: #0c203dff;
font-feature-settings: 'clig'off, 'liga'off;
font-feature-settings: 'clig' off, 'liga' off;
font-family: 'Helvetica Neue';
font-size: 18px;
font-style: normal;
font-weight: 700;
line-height: 24px;
letter-spacing: 0.72px;
}
}
.flieName {
.flieName {
width: 80%;
}
}
.from-unit {
.from-unit {
color: #475263ff;
font-family: 'Inter';
font-size: 10px;
font-style: normal;
font-weight: 400;
line-height: 16px;
}
}
.product-info {
.product-info {
align-self: stretch;
color: #475263;
font-family: 'Inter';
......@@ -1851,9 +1886,9 @@
line-height: 20px;
padding-bottom: 8px;
border-bottom: 1px solid #e6e8ed;
}
}
.footerSubmit {
.footerSubmit {
width: 80px;
height: 32px;
font-size: 14px;
......@@ -1865,15 +1900,15 @@
text-align: center;
color: #fff;
border-radius: 4px;
}
}
:deep(.el-form-item__label):before {
:deep(.el-form-item__label):before {
display: none;
}
}
.is-required :deep(.el-form-item__label)::after {
.is-required :deep(.el-form-item__label)::after {
content: '*';
color: var(--el-color-danger);
margin-left: 4px;
}
}
</style>
No preview for this file type
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -21,7 +21,7 @@ import{c as commonjsGlobal}from"./vendor.d471d1e7.js";(function(){const t=docume
* vue-router v4.3.0
* (c) 2024 Eduardo San Martin Morote
* @license MIT
*/const isBrowser=typeof document<"u";function isESModule(e){return e.__esModule||e[Symbol.toStringTag]==="Module"}const assign$1=Object.assign;function applyToParams(e,t){const r={};for(const a in t){const n=t[a];r[a]=isArray(n)?n.map(e):e(n)}return r}const noop$1=()=>{},isArray=Array.isArray,HASH_RE=/#/g,AMPERSAND_RE=/&/g,SLASH_RE=/\//g,EQUAL_RE=/=/g,IM_RE=/\?/g,PLUS_RE=/\+/g,ENC_BRACKET_OPEN_RE=/%5B/g,ENC_BRACKET_CLOSE_RE=/%5D/g,ENC_CARET_RE=/%5E/g,ENC_BACKTICK_RE=/%60/g,ENC_CURLY_OPEN_RE=/%7B/g,ENC_PIPE_RE=/%7C/g,ENC_CURLY_CLOSE_RE=/%7D/g,ENC_SPACE_RE=/%20/g;function commonEncode(e){return encodeURI(""+e).replace(ENC_PIPE_RE,"|").replace(ENC_BRACKET_OPEN_RE,"[").replace(ENC_BRACKET_CLOSE_RE,"]")}function encodeHash(e){return commonEncode(e).replace(ENC_CURLY_OPEN_RE,"{").replace(ENC_CURLY_CLOSE_RE,"}").replace(ENC_CARET_RE,"^")}function encodeQueryValue(e){return commonEncode(e).replace(PLUS_RE,"%2B").replace(ENC_SPACE_RE,"+").replace(HASH_RE,"%23").replace(AMPERSAND_RE,"%26").replace(ENC_BACKTICK_RE,"`").replace(ENC_CURLY_OPEN_RE,"{").replace(ENC_CURLY_CLOSE_RE,"}").replace(ENC_CARET_RE,"^")}function encodeQueryKey(e){return encodeQueryValue(e).replace(EQUAL_RE,"%3D")}function encodePath(e){return commonEncode(e).replace(HASH_RE,"%23").replace(IM_RE,"%3F")}function encodeParam(e){return e==null?"":encodePath(e).replace(SLASH_RE,"%2F")}function decode(e){try{return decodeURIComponent(""+e)}catch{}return""+e}const TRAILING_SLASH_RE=/\/$/,removeTrailingSlash=e=>e.replace(TRAILING_SLASH_RE,"");function parseURL(e,t,r="/"){let a,n={},l="",o="";const u=t.indexOf("#");let c=t.indexOf("?");return u<c&&u>=0&&(c=-1),c>-1&&(a=t.slice(0,c),l=t.slice(c+1,u>-1?u:t.length),n=e(l)),u>-1&&(a=a||t.slice(0,u),o=t.slice(u,t.length)),a=resolveRelativePath(a!=null?a:t,r),{fullPath:a+(l&&"?")+l+o,path:a,query:n,hash:decode(o)}}function stringifyURL(e,t){const r=t.query?e(t.query):"";return t.path+(r&&"?")+r+(t.hash||"")}function stripBase(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function isSameRouteLocation(e,t,r){const a=t.matched.length-1,n=r.matched.length-1;return a>-1&&a===n&&isSameRouteRecord(t.matched[a],r.matched[n])&&isSameRouteLocationParams(t.params,r.params)&&e(t.query)===e(r.query)&&t.hash===r.hash}function isSameRouteRecord(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function isSameRouteLocationParams(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const r in e)if(!isSameRouteLocationParamsValue(e[r],t[r]))return!1;return!0}function isSameRouteLocationParamsValue(e,t){return isArray(e)?isEquivalentArray(e,t):isArray(t)?isEquivalentArray(t,e):e===t}function isEquivalentArray(e,t){return isArray(t)?e.length===t.length&&e.every((r,a)=>r===t[a]):e.length===1&&e[0]===t}function resolveRelativePath(e,t){if(e.startsWith("/"))return e;if(!e)return t;const r=t.split("/"),a=e.split("/"),n=a[a.length-1];(n===".."||n===".")&&a.push("");let l=r.length-1,o,u;for(o=0;o<a.length;o++)if(u=a[o],u!==".")if(u==="..")l>1&&l--;else break;return r.slice(0,l).join("/")+"/"+a.slice(o).join("/")}var NavigationType;(function(e){e.pop="pop",e.push="push"})(NavigationType||(NavigationType={}));var NavigationDirection;(function(e){e.back="back",e.forward="forward",e.unknown=""})(NavigationDirection||(NavigationDirection={}));function normalizeBase(e){if(!e)if(isBrowser){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),removeTrailingSlash(e)}const BEFORE_HASH_RE=/^[^#]+#/;function createHref(e,t){return e.replace(BEFORE_HASH_RE,"#")+t}function getElementPosition(e,t){const r=document.documentElement.getBoundingClientRect(),a=e.getBoundingClientRect();return{behavior:t.behavior,left:a.left-r.left-(t.left||0),top:a.top-r.top-(t.top||0)}}const computeScrollPosition=()=>({left:window.scrollX,top:window.scrollY});function scrollToPosition(e){let t;if("el"in e){const r=e.el,a=typeof r=="string"&&r.startsWith("#"),n=typeof r=="string"?a?document.getElementById(r.slice(1)):document.querySelector(r):r;if(!n)return;t=getElementPosition(n,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 getScrollKey(e,t){return(history.state?history.state.position-t:-1)+e}const scrollPositions=new Map;function saveScrollPosition(e,t){scrollPositions.set(e,t)}function getSavedScrollPosition(e){const t=scrollPositions.get(e);return scrollPositions.delete(e),t}let createBaseLocation=()=>location.protocol+"//"+location.host;function createCurrentLocation(e,t){const{pathname:r,search:a,hash:n}=t,l=e.indexOf("#");if(l>-1){let u=n.includes(e.slice(l))?e.slice(l).length:1,c=n.slice(u);return c[0]!=="/"&&(c="/"+c),stripBase(c,"")}return stripBase(r,e)+a+n}function useHistoryListeners(e,t,r,a){let n=[],l=[],o=null;const u=({state:v})=>{const x=createCurrentLocation(e,location),w=r.value,C=t.value;let k=0;if(v){if(r.value=x,t.value=v,o&&o===w){o=null;return}k=C?v.position-C.position:0}else a(x);n.forEach(V=>{V(r.value,w,{delta:k,type:NavigationType.pop,direction:k?k>0?NavigationDirection.forward:NavigationDirection.back:NavigationDirection.unknown})})};function c(){o=r.value}function _(v){n.push(v);const x=()=>{const w=n.indexOf(v);w>-1&&n.splice(w,1)};return l.push(x),x}function f(){const{history:v}=window;!v.state||v.replaceState(assign$1({},v.state,{scroll:computeScrollPosition()}),"")}function m(){for(const v of l)v();l=[],window.removeEventListener("popstate",u),window.removeEventListener("beforeunload",f)}return window.addEventListener("popstate",u),window.addEventListener("beforeunload",f,{passive:!0}),{pauseListeners:c,listen:_,destroy:m}}function buildState(e,t,r,a=!1,n=!1){return{back:e,current:t,forward:r,replaced:a,position:window.history.length,scroll:n?computeScrollPosition():null}}function useHistoryStateNavigation(e){const{history:t,location:r}=window,a={value:createCurrentLocation(e,r)},n={value:t.state};n.value||l(a.value,{back:null,current:a.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function l(c,_,f){const m=e.indexOf("#"),v=m>-1?(r.host&&document.querySelector("base")?e:e.slice(m))+c:createBaseLocation()+e+c;try{t[f?"replaceState":"pushState"](_,"",v),n.value=_}catch(x){console.error(x),r[f?"replace":"assign"](v)}}function o(c,_){const f=assign$1({},t.state,buildState(n.value.back,c,n.value.forward,!0),_,{position:n.value.position});l(c,f,!0),a.value=c}function u(c,_){const f=assign$1({},n.value,t.state,{forward:c,scroll:computeScrollPosition()});l(f.current,f,!0);const m=assign$1({},buildState(a.value,c,null),{position:f.position+1},_);l(c,m,!1),a.value=c}return{location:a,state:n,push:u,replace:o}}function createWebHistory(e){e=normalizeBase(e);const t=useHistoryStateNavigation(e),r=useHistoryListeners(e,t.state,t.location,t.replace);function a(l,o=!0){o||r.pauseListeners(),history.go(l)}const n=assign$1({location:"",base:e,go:a,createHref:createHref.bind(null,e)},t,r);return Object.defineProperty(n,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(n,"state",{enumerable:!0,get:()=>t.state.value}),n}function isRouteLocation(e){return typeof e=="string"||e&&typeof e=="object"}function isRouteName(e){return typeof e=="string"||typeof e=="symbol"}const START_LOCATION_NORMALIZED={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0},NavigationFailureSymbol=Symbol("");var NavigationFailureType;(function(e){e[e.aborted=4]="aborted",e[e.cancelled=8]="cancelled",e[e.duplicated=16]="duplicated"})(NavigationFailureType||(NavigationFailureType={}));function createRouterError(e,t){return assign$1(new Error,{type:e,[NavigationFailureSymbol]:!0},t)}function isNavigationFailure(e,t){return e instanceof Error&&NavigationFailureSymbol in e&&(t==null||!!(e.type&t))}const BASE_PARAM_PATTERN="[^/]+?",BASE_PATH_PARSER_OPTIONS={sensitive:!1,strict:!1,start:!0,end:!0},REGEX_CHARS_RE=/[.+*?^${}()[\]/\\]/g;function tokensToParser(e,t){const r=assign$1({},BASE_PATH_PARSER_OPTIONS,t),a=[];let n=r.start?"^":"";const l=[];for(const _ of e){const f=_.length?[]:[90];r.strict&&!_.length&&(n+="/");for(let m=0;m<_.length;m++){const v=_[m];let x=40+(r.sensitive?.25:0);if(v.type===0)m||(n+="/"),n+=v.value.replace(REGEX_CHARS_RE,"\\$&"),x+=40;else if(v.type===1){const{value:w,repeatable:C,optional:k,regexp:V}=v;l.push({name:w,repeatable:C,optional:k});const O=V||BASE_PARAM_PATTERN;if(O!==BASE_PARAM_PATTERN){x+=10;try{new RegExp(`(${O})`)}catch(T){throw new Error(`Invalid custom RegExp for param "${w}" (${O}): `+T.message)}}let W=C?`((?:${O})(?:/(?:${O}))*)`:`(${O})`;m||(W=k&&_.length<2?`(?:/${W})`:"/"+W),k&&(W+="?"),n+=W,x+=20,k&&(x+=-8),C&&(x+=-20),O===".*"&&(x+=-50)}f.push(x)}a.push(f)}if(r.strict&&r.end){const _=a.length-1;a[_][a[_].length-1]+=.7000000000000001}r.strict||(n+="/?"),r.end?n+="$":r.strict&&(n+="(?:/|$)");const o=new RegExp(n,r.sensitive?"":"i");function u(_){const f=_.match(o),m={};if(!f)return null;for(let v=1;v<f.length;v++){const x=f[v]||"",w=l[v-1];m[w.name]=x&&w.repeatable?x.split("/"):x}return m}function c(_){let f="",m=!1;for(const v of e){(!m||!f.endsWith("/"))&&(f+="/"),m=!1;for(const x of v)if(x.type===0)f+=x.value;else if(x.type===1){const{value:w,repeatable:C,optional:k}=x,V=w in _?_[w]:"";if(isArray(V)&&!C)throw new Error(`Provided param "${w}" is an array but it is not repeatable (* or + modifiers)`);const O=isArray(V)?V.join("/"):V;if(!O)if(k)v.length<2&&(f.endsWith("/")?f=f.slice(0,-1):m=!0);else throw new Error(`Missing required param "${w}"`);f+=O}}return f||"/"}return{re:o,score:a,keys:l,parse:u,stringify:c}}function compareScoreArray(e,t){let r=0;for(;r<e.length&&r<t.length;){const a=t[r]-e[r];if(a)return a;r++}return e.length<t.length?e.length===1&&e[0]===40+40?-1:1:e.length>t.length?t.length===1&&t[0]===40+40?1:-1:0}function comparePathParserScore(e,t){let r=0;const a=e.score,n=t.score;for(;r<a.length&&r<n.length;){const l=compareScoreArray(a[r],n[r]);if(l)return l;r++}if(Math.abs(n.length-a.length)===1){if(isLastScoreNegative(a))return 1;if(isLastScoreNegative(n))return-1}return n.length-a.length}function isLastScoreNegative(e){const t=e[e.length-1];return e.length>0&&t[t.length-1]<0}const ROOT_TOKEN={type:0,value:""},VALID_PARAM_RE=/[a-zA-Z0-9_]/;function tokenizePath(e){if(!e)return[[]];if(e==="/")return[[ROOT_TOKEN]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(x){throw new Error(`ERR (${r})/"${_}": ${x}`)}let r=0,a=r;const n=[];let l;function o(){l&&n.push(l),l=[]}let u=0,c,_="",f="";function m(){!_||(r===0?l.push({type:0,value:_}):r===1||r===2||r===3?(l.length>1&&(c==="*"||c==="+")&&t(`A repeatable param (${_}) must be alone in its segment. eg: '/:ids+.`),l.push({type:1,value:_,regexp:f,repeatable:c==="*"||c==="+",optional:c==="*"||c==="?"})):t("Invalid state to consume buffer"),_="")}function v(){_+=c}for(;u<e.length;){if(c=e[u++],c==="\\"&&r!==2){a=r,r=4;continue}switch(r){case 0:c==="/"?(_&&m(),o()):c===":"?(m(),r=1):v();break;case 4:v(),r=a;break;case 1:c==="("?r=2:VALID_PARAM_RE.test(c)?v():(m(),r=0,c!=="*"&&c!=="?"&&c!=="+"&&u--);break;case 2:c===")"?f[f.length-1]=="\\"?f=f.slice(0,-1)+c:r=3:f+=c;break;case 3:m(),r=0,c!=="*"&&c!=="?"&&c!=="+"&&u--,f="";break;default:t("Unknown state");break}}return r===2&&t(`Unfinished custom RegExp for param "${_}"`),m(),o(),n}function createRouteRecordMatcher(e,t,r){const a=tokensToParser(tokenizePath(e.path),r),n=assign$1(a,{record:e,parent:t,children:[],alias:[]});return t&&!n.record.aliasOf==!t.record.aliasOf&&t.children.push(n),n}function createRouterMatcher(e,t){const r=[],a=new Map;t=mergeOptions({strict:!1,end:!0,sensitive:!1},t);function n(f){return a.get(f)}function l(f,m,v){const x=!v,w=normalizeRouteRecord(f);w.aliasOf=v&&v.record;const C=mergeOptions(t,f),k=[w];if("alias"in f){const W=typeof f.alias=="string"?[f.alias]:f.alias;for(const T of W)k.push(assign$1({},w,{components:v?v.record.components:w.components,path:T,aliasOf:v?v.record:w}))}let V,O;for(const W of k){const{path:T}=W;if(m&&T[0]!=="/"){const $=m.record.path,G=$[$.length-1]==="/"?"":"/";W.path=m.record.path+(T&&G+T)}if(V=createRouteRecordMatcher(W,m,C),v?v.alias.push(V):(O=O||V,O!==V&&O.alias.push(V),x&&f.name&&!isAliasRecord(V)&&o(f.name)),w.children){const $=w.children;for(let G=0;G<$.length;G++)l($[G],V,v&&v.children[G])}v=v||V,(V.record.components&&Object.keys(V.record.components).length||V.record.name||V.record.redirect)&&c(V)}return O?()=>{o(O)}:noop$1}function o(f){if(isRouteName(f)){const m=a.get(f);m&&(a.delete(f),r.splice(r.indexOf(m),1),m.children.forEach(o),m.alias.forEach(o))}else{const m=r.indexOf(f);m>-1&&(r.splice(m,1),f.record.name&&a.delete(f.record.name),f.children.forEach(o),f.alias.forEach(o))}}function u(){return r}function c(f){let m=0;for(;m<r.length&&comparePathParserScore(f,r[m])>=0&&(f.record.path!==r[m].record.path||!isRecordChildOf(f,r[m]));)m++;r.splice(m,0,f),f.record.name&&!isAliasRecord(f)&&a.set(f.record.name,f)}function _(f,m){let v,x={},w,C;if("name"in f&&f.name){if(v=a.get(f.name),!v)throw createRouterError(1,{location:f});C=v.record.name,x=assign$1(paramsFromLocation(m.params,v.keys.filter(O=>!O.optional).concat(v.parent?v.parent.keys.filter(O=>O.optional):[]).map(O=>O.name)),f.params&&paramsFromLocation(f.params,v.keys.map(O=>O.name))),w=v.stringify(x)}else if(f.path!=null)w=f.path,v=r.find(O=>O.re.test(w)),v&&(x=v.parse(w),C=v.record.name);else{if(v=m.name?a.get(m.name):r.find(O=>O.re.test(m.path)),!v)throw createRouterError(1,{location:f,currentLocation:m});C=v.record.name,x=assign$1({},m.params,f.params),w=v.stringify(x)}const k=[];let V=v;for(;V;)k.unshift(V.record),V=V.parent;return{name:C,path:w,params:x,matched:k,meta:mergeMetaFields(k)}}return e.forEach(f=>l(f)),{addRoute:l,resolve:_,removeRoute:o,getRoutes:u,getRecordMatcher:n}}function paramsFromLocation(e,t){const r={};for(const a of t)a in e&&(r[a]=e[a]);return r}function normalizeRouteRecord(e){return{path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:void 0,beforeEnter:e.beforeEnter,props:normalizeRecordProps(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 normalizeRecordProps(e){const t={},r=e.props||!1;if("component"in e)t.default=r;else for(const a in e.components)t[a]=typeof r=="object"?r[a]:r;return t}function isAliasRecord(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function mergeMetaFields(e){return e.reduce((t,r)=>assign$1(t,r.meta),{})}function mergeOptions(e,t){const r={};for(const a in e)r[a]=a in t?t[a]:e[a];return r}function isRecordChildOf(e,t){return t.children.some(r=>r===e||isRecordChildOf(e,r))}function parseQuery(e){const t={};if(e===""||e==="?")return t;const a=(e[0]==="?"?e.slice(1):e).split("&");for(let n=0;n<a.length;++n){const l=a[n].replace(PLUS_RE," "),o=l.indexOf("="),u=decode(o<0?l:l.slice(0,o)),c=o<0?null:decode(l.slice(o+1));if(u in t){let _=t[u];isArray(_)||(_=t[u]=[_]),_.push(c)}else t[u]=c}return t}function stringifyQuery(e){let t="";for(let r in e){const a=e[r];if(r=encodeQueryKey(r),a==null){a!==void 0&&(t+=(t.length?"&":"")+r);continue}(isArray(a)?a.map(l=>l&&encodeQueryValue(l)):[a&&encodeQueryValue(a)]).forEach(l=>{l!==void 0&&(t+=(t.length?"&":"")+r,l!=null&&(t+="="+l))})}return t}function normalizeQuery(e){const t={};for(const r in e){const a=e[r];a!==void 0&&(t[r]=isArray(a)?a.map(n=>n==null?null:""+n):a==null?a:""+a)}return t}const matchedRouteKey=Symbol(""),viewDepthKey=Symbol(""),routerKey=Symbol(""),routeLocationKey=Symbol(""),routerViewLocationKey=Symbol("");function useCallbacks(){let e=[];function t(a){return e.push(a),()=>{const n=e.indexOf(a);n>-1&&e.splice(n,1)}}function r(){e=[]}return{add:t,list:()=>e.slice(),reset:r}}function guardToPromiseFn(e,t,r,a,n,l=o=>o()){const o=a&&(a.enterCallbacks[n]=a.enterCallbacks[n]||[]);return()=>new Promise((u,c)=>{const _=v=>{v===!1?c(createRouterError(4,{from:r,to:t})):v instanceof Error?c(v):isRouteLocation(v)?c(createRouterError(2,{from:t,to:v})):(o&&a.enterCallbacks[n]===o&&typeof v=="function"&&o.push(v),u())},f=l(()=>e.call(a&&a.instances[n],t,r,_));let m=Promise.resolve(f);e.length<3&&(m=m.then(_)),m.catch(v=>c(v))})}function extractComponentsGuards(e,t,r,a,n=l=>l()){const l=[];for(const o of e)for(const u in o.components){let c=o.components[u];if(!(t!=="beforeRouteEnter"&&!o.instances[u]))if(isRouteComponent(c)){const f=(c.__vccOpts||c)[t];f&&l.push(guardToPromiseFn(f,r,a,o,u,n))}else{let _=c();l.push(()=>_.then(f=>{if(!f)return Promise.reject(new Error(`Couldn't resolve component "${u}" at "${o.path}"`));const m=isESModule(f)?f.default:f;o.components[u]=m;const x=(m.__vccOpts||m)[t];return x&&guardToPromiseFn(x,r,a,o,u,n)()}))}}return l}function isRouteComponent(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function useLink(e){const t=inject(routerKey),r=inject(routeLocationKey),a=computed(()=>t.resolve(unref(e.to))),n=computed(()=>{const{matched:c}=a.value,{length:_}=c,f=c[_-1],m=r.matched;if(!f||!m.length)return-1;const v=m.findIndex(isSameRouteRecord.bind(null,f));if(v>-1)return v;const x=getOriginalPath(c[_-2]);return _>1&&getOriginalPath(f)===x&&m[m.length-1].path!==x?m.findIndex(isSameRouteRecord.bind(null,c[_-2])):v}),l=computed(()=>n.value>-1&&includesParams(r.params,a.value.params)),o=computed(()=>n.value>-1&&n.value===r.matched.length-1&&isSameRouteLocationParams(r.params,a.value.params));function u(c={}){return guardEvent(c)?t[unref(e.replace)?"replace":"push"](unref(e.to)).catch(noop$1):Promise.resolve()}return{route:a,href:computed(()=>a.value.href),isActive:l,isExactActive:o,navigate:u}}const RouterLinkImpl=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,setup(e,{slots:t}){const r=reactive(useLink(e)),{options:a}=inject(routerKey),n=computed(()=>({[getLinkClass(e.activeClass,a.linkActiveClass,"router-link-active")]:r.isActive,[getLinkClass(e.exactActiveClass,a.linkExactActiveClass,"router-link-exact-active")]:r.isExactActive}));return()=>{const l=t.default&&t.default(r);return e.custom?l:h("a",{"aria-current":r.isExactActive?e.ariaCurrentValue:null,href:r.href,onClick:r.navigate,class:n.value},l)}}}),RouterLink=RouterLinkImpl;function guardEvent(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 includesParams(e,t){for(const r in t){const a=t[r],n=e[r];if(typeof a=="string"){if(a!==n)return!1}else if(!isArray(n)||n.length!==a.length||a.some((l,o)=>l!==n[o]))return!1}return!0}function getOriginalPath(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const getLinkClass=(e,t,r)=>e!=null?e:t!=null?t:r,RouterViewImpl=defineComponent({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:r}){const a=inject(routerViewLocationKey),n=computed(()=>e.route||a.value),l=inject(viewDepthKey,0),o=computed(()=>{let _=unref(l);const{matched:f}=n.value;let m;for(;(m=f[_])&&!m.components;)_++;return _}),u=computed(()=>n.value.matched[o.value]);provide(viewDepthKey,computed(()=>o.value+1)),provide(matchedRouteKey,u),provide(routerViewLocationKey,n);const c=ref();return watch(()=>[c.value,u.value,e.name],([_,f,m],[v,x,w])=>{f&&(f.instances[m]=_,x&&x!==f&&_&&_===v&&(f.leaveGuards.size||(f.leaveGuards=x.leaveGuards),f.updateGuards.size||(f.updateGuards=x.updateGuards))),_&&f&&(!x||!isSameRouteRecord(f,x)||!v)&&(f.enterCallbacks[m]||[]).forEach(C=>C(_))},{flush:"post"}),()=>{const _=n.value,f=e.name,m=u.value,v=m&&m.components[f];if(!v)return normalizeSlot(r.default,{Component:v,route:_});const x=m.props[f],w=x?x===!0?_.params:typeof x=="function"?x(_):x:null,k=h(v,assign$1({},w,t,{onVnodeUnmounted:V=>{V.component.isUnmounted&&(m.instances[f]=null)},ref:c}));return normalizeSlot(r.default,{Component:k,route:_})||k}}});function normalizeSlot(e,t){if(!e)return null;const r=e(t);return r.length===1?r[0]:r}const RouterView=RouterViewImpl;function createRouter(e){const t=createRouterMatcher(e.routes,e),r=e.parseQuery||parseQuery,a=e.stringifyQuery||stringifyQuery,n=e.history,l=useCallbacks(),o=useCallbacks(),u=useCallbacks(),c=shallowRef(START_LOCATION_NORMALIZED);let _=START_LOCATION_NORMALIZED;isBrowser&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const f=applyToParams.bind(null,N=>""+N),m=applyToParams.bind(null,encodeParam),v=applyToParams.bind(null,decode);function x(N,U){let q,J;return isRouteName(N)?(q=t.getRecordMatcher(N),J=U):J=N,t.addRoute(J,q)}function w(N){const U=t.getRecordMatcher(N);U&&t.removeRoute(U)}function C(){return t.getRoutes().map(N=>N.record)}function k(N){return!!t.getRecordMatcher(N)}function V(N,U){if(U=assign$1({},U||c.value),typeof N=="string"){const B=parseURL(r,N,U.path),E=t.resolve({path:B.path},U),R=n.createHref(B.fullPath);return assign$1(B,E,{params:v(E.params),hash:decode(B.hash),redirectedFrom:void 0,href:R})}let q;if(N.path!=null)q=assign$1({},N,{path:parseURL(r,N.path,U.path).path});else{const B=assign$1({},N.params);for(const E in B)B[E]==null&&delete B[E];q=assign$1({},N,{params:m(B)}),U.params=m(U.params)}const J=t.resolve(q,U),_e=N.hash||"";J.params=f(v(J.params));const de=stringifyURL(a,assign$1({},N,{hash:encodeHash(_e),path:J.path})),y=n.createHref(de);return assign$1({fullPath:de,hash:_e,query:a===stringifyQuery?normalizeQuery(N.query):N.query||{}},J,{redirectedFrom:void 0,href:y})}function O(N){return typeof N=="string"?parseURL(r,N,c.value.path):assign$1({},N)}function W(N,U){if(_!==N)return createRouterError(8,{from:U,to:N})}function T(N){return b(N)}function $(N){return T(assign$1(O(N),{replace:!0}))}function G(N){const U=N.matched[N.matched.length-1];if(U&&U.redirect){const{redirect:q}=U;let J=typeof q=="function"?q(N):q;return typeof J=="string"&&(J=J.includes("?")||J.includes("#")?J=O(J):{path:J},J.params={}),assign$1({query:N.query,hash:N.hash,params:J.path!=null?{}:N.params},J)}}function b(N,U){const q=_=V(N),J=c.value,_e=N.state,de=N.force,y=N.replace===!0,B=G(q);if(B)return b(assign$1(O(B),{state:typeof B=="object"?assign$1({},_e,B.state):_e,force:de,replace:y}),U||q);const E=q;E.redirectedFrom=U;let R;return!de&&isSameRouteLocation(a,J,q)&&(R=createRouterError(16,{to:E,from:J}),Ee(J,J,!0,!1)),(R?Promise.resolve(R):ee(E,J)).catch(A=>isNavigationFailure(A)?isNavigationFailure(A,2)?A:ge(A):ue(A,E,J)).then(A=>{if(A){if(isNavigationFailure(A,2))return b(assign$1({replace:y},O(A.to),{state:typeof A.to=="object"?assign$1({},_e,A.to.state):_e,force:de}),U||E)}else A=K(E,J,!0,y,_e);return H(E,J,A),A})}function S(N,U){const q=W(N,U);return q?Promise.reject(q):Promise.resolve()}function I(N){const U=Me.values().next().value;return U&&typeof U.runWithContext=="function"?U.runWithContext(N):N()}function ee(N,U){let q;const[J,_e,de]=extractChangingRecords(N,U);q=extractComponentsGuards(J.reverse(),"beforeRouteLeave",N,U);for(const B of J)B.leaveGuards.forEach(E=>{q.push(guardToPromiseFn(E,N,U))});const y=S.bind(null,N,U);return q.push(y),we(q).then(()=>{q=[];for(const B of l.list())q.push(guardToPromiseFn(B,N,U));return q.push(y),we(q)}).then(()=>{q=extractComponentsGuards(_e,"beforeRouteUpdate",N,U);for(const B of _e)B.updateGuards.forEach(E=>{q.push(guardToPromiseFn(E,N,U))});return q.push(y),we(q)}).then(()=>{q=[];for(const B of de)if(B.beforeEnter)if(isArray(B.beforeEnter))for(const E of B.beforeEnter)q.push(guardToPromiseFn(E,N,U));else q.push(guardToPromiseFn(B.beforeEnter,N,U));return q.push(y),we(q)}).then(()=>(N.matched.forEach(B=>B.enterCallbacks={}),q=extractComponentsGuards(de,"beforeRouteEnter",N,U,I),q.push(y),we(q))).then(()=>{q=[];for(const B of o.list())q.push(guardToPromiseFn(B,N,U));return q.push(y),we(q)}).catch(B=>isNavigationFailure(B,8)?B:Promise.reject(B))}function H(N,U,q){u.list().forEach(J=>I(()=>J(N,U,q)))}function K(N,U,q,J,_e){const de=W(N,U);if(de)return de;const y=U===START_LOCATION_NORMALIZED,B=isBrowser?history.state:{};q&&(J||y?n.replace(N.fullPath,assign$1({scroll:y&&B&&B.scroll},_e)):n.push(N.fullPath,_e)),c.value=N,Ee(N,U,q,y),ge()}let ne;function he(){ne||(ne=n.listen((N,U,q)=>{if(!Re.listening)return;const J=V(N),_e=G(J);if(_e){b(assign$1(_e,{replace:!0}),J).catch(noop$1);return}_=J;const de=c.value;isBrowser&&saveScrollPosition(getScrollKey(de.fullPath,q.delta),computeScrollPosition()),ee(J,de).catch(y=>isNavigationFailure(y,12)?y:isNavigationFailure(y,2)?(b(y.to,J).then(B=>{isNavigationFailure(B,20)&&!q.delta&&q.type===NavigationType.pop&&n.go(-1,!1)}).catch(noop$1),Promise.reject()):(q.delta&&n.go(-q.delta,!1),ue(y,J,de))).then(y=>{y=y||K(J,de,!1),y&&(q.delta&&!isNavigationFailure(y,8)?n.go(-q.delta,!1):q.type===NavigationType.pop&&isNavigationFailure(y,20)&&n.go(-1,!1)),H(J,de,y)}).catch(noop$1)}))}let ve=useCallbacks(),oe=useCallbacks(),ie;function ue(N,U,q){ge(N);const J=oe.list();return J.length?J.forEach(_e=>_e(N,U,q)):console.error(N),Promise.reject(N)}function ye(){return ie&&c.value!==START_LOCATION_NORMALIZED?Promise.resolve():new Promise((N,U)=>{ve.add([N,U])})}function ge(N){return ie||(ie=!N,he(),ve.list().forEach(([U,q])=>N?q(N):U()),ve.reset()),N}function Ee(N,U,q,J){const{scrollBehavior:_e}=e;if(!isBrowser||!_e)return Promise.resolve();const de=!q&&getSavedScrollPosition(getScrollKey(N.fullPath,0))||(J||!q)&&history.state&&history.state.scroll||null;return nextTick().then(()=>_e(N,U,de)).then(y=>y&&scrollToPosition(y)).catch(y=>ue(y,N,U))}const xe=N=>n.go(N);let Ve;const Me=new Set,Re={currentRoute:c,listening:!0,addRoute:x,removeRoute:w,hasRoute:k,getRoutes:C,resolve:V,options:e,push:T,replace:$,go:xe,back:()=>xe(-1),forward:()=>xe(1),beforeEach:l.add,beforeResolve:o.add,afterEach:u.add,onError:oe.add,isReady:ye,install(N){const U=this;N.component("RouterLink",RouterLink),N.component("RouterView",RouterView),N.config.globalProperties.$router=U,Object.defineProperty(N.config.globalProperties,"$route",{enumerable:!0,get:()=>unref(c)}),isBrowser&&!Ve&&c.value===START_LOCATION_NORMALIZED&&(Ve=!0,T(n.location).catch(_e=>{}));const q={};for(const _e in START_LOCATION_NORMALIZED)Object.defineProperty(q,_e,{get:()=>c.value[_e],enumerable:!0});N.provide(routerKey,U),N.provide(routeLocationKey,shallowReactive(q)),N.provide(routerViewLocationKey,c);const J=N.unmount;Me.add(N),N.unmount=function(){Me.delete(N),Me.size<1&&(_=START_LOCATION_NORMALIZED,ne&&ne(),ne=null,c.value=START_LOCATION_NORMALIZED,Ve=!1,ie=!1),J()}}};function we(N){return N.reduce((U,q)=>U.then(()=>I(q)),Promise.resolve())}return Re}function extractChangingRecords(e,t){const r=[],a=[],n=[],l=Math.max(t.matched.length,e.matched.length);for(let o=0;o<l;o++){const u=t.matched[o];u&&(e.matched.find(_=>isSameRouteRecord(_,u))?a.push(u):r.push(u));const c=e.matched[o];c&&(t.matched.find(_=>isSameRouteRecord(_,c))||n.push(c))}return[r,a,n]}function useRoute(){return inject(routeLocationKey)}const routes=[{path:"/",name:"home",component:()=>__vitePreload(()=>import("./homeView.5ea54932.js"),["assets/homeView.5ea54932.js","assets/vendor.d471d1e7.js","assets/homeView.eb1e7277.css"])}],router=createRouter({history:createWebHistory(),routes});var isVue2=!1;/*!
*/const isBrowser=typeof document<"u";function isESModule(e){return e.__esModule||e[Symbol.toStringTag]==="Module"}const assign$1=Object.assign;function applyToParams(e,t){const r={};for(const a in t){const n=t[a];r[a]=isArray(n)?n.map(e):e(n)}return r}const noop$1=()=>{},isArray=Array.isArray,HASH_RE=/#/g,AMPERSAND_RE=/&/g,SLASH_RE=/\//g,EQUAL_RE=/=/g,IM_RE=/\?/g,PLUS_RE=/\+/g,ENC_BRACKET_OPEN_RE=/%5B/g,ENC_BRACKET_CLOSE_RE=/%5D/g,ENC_CARET_RE=/%5E/g,ENC_BACKTICK_RE=/%60/g,ENC_CURLY_OPEN_RE=/%7B/g,ENC_PIPE_RE=/%7C/g,ENC_CURLY_CLOSE_RE=/%7D/g,ENC_SPACE_RE=/%20/g;function commonEncode(e){return encodeURI(""+e).replace(ENC_PIPE_RE,"|").replace(ENC_BRACKET_OPEN_RE,"[").replace(ENC_BRACKET_CLOSE_RE,"]")}function encodeHash(e){return commonEncode(e).replace(ENC_CURLY_OPEN_RE,"{").replace(ENC_CURLY_CLOSE_RE,"}").replace(ENC_CARET_RE,"^")}function encodeQueryValue(e){return commonEncode(e).replace(PLUS_RE,"%2B").replace(ENC_SPACE_RE,"+").replace(HASH_RE,"%23").replace(AMPERSAND_RE,"%26").replace(ENC_BACKTICK_RE,"`").replace(ENC_CURLY_OPEN_RE,"{").replace(ENC_CURLY_CLOSE_RE,"}").replace(ENC_CARET_RE,"^")}function encodeQueryKey(e){return encodeQueryValue(e).replace(EQUAL_RE,"%3D")}function encodePath(e){return commonEncode(e).replace(HASH_RE,"%23").replace(IM_RE,"%3F")}function encodeParam(e){return e==null?"":encodePath(e).replace(SLASH_RE,"%2F")}function decode(e){try{return decodeURIComponent(""+e)}catch{}return""+e}const TRAILING_SLASH_RE=/\/$/,removeTrailingSlash=e=>e.replace(TRAILING_SLASH_RE,"");function parseURL(e,t,r="/"){let a,n={},l="",o="";const u=t.indexOf("#");let c=t.indexOf("?");return u<c&&u>=0&&(c=-1),c>-1&&(a=t.slice(0,c),l=t.slice(c+1,u>-1?u:t.length),n=e(l)),u>-1&&(a=a||t.slice(0,u),o=t.slice(u,t.length)),a=resolveRelativePath(a!=null?a:t,r),{fullPath:a+(l&&"?")+l+o,path:a,query:n,hash:decode(o)}}function stringifyURL(e,t){const r=t.query?e(t.query):"";return t.path+(r&&"?")+r+(t.hash||"")}function stripBase(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function isSameRouteLocation(e,t,r){const a=t.matched.length-1,n=r.matched.length-1;return a>-1&&a===n&&isSameRouteRecord(t.matched[a],r.matched[n])&&isSameRouteLocationParams(t.params,r.params)&&e(t.query)===e(r.query)&&t.hash===r.hash}function isSameRouteRecord(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function isSameRouteLocationParams(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const r in e)if(!isSameRouteLocationParamsValue(e[r],t[r]))return!1;return!0}function isSameRouteLocationParamsValue(e,t){return isArray(e)?isEquivalentArray(e,t):isArray(t)?isEquivalentArray(t,e):e===t}function isEquivalentArray(e,t){return isArray(t)?e.length===t.length&&e.every((r,a)=>r===t[a]):e.length===1&&e[0]===t}function resolveRelativePath(e,t){if(e.startsWith("/"))return e;if(!e)return t;const r=t.split("/"),a=e.split("/"),n=a[a.length-1];(n===".."||n===".")&&a.push("");let l=r.length-1,o,u;for(o=0;o<a.length;o++)if(u=a[o],u!==".")if(u==="..")l>1&&l--;else break;return r.slice(0,l).join("/")+"/"+a.slice(o).join("/")}var NavigationType;(function(e){e.pop="pop",e.push="push"})(NavigationType||(NavigationType={}));var NavigationDirection;(function(e){e.back="back",e.forward="forward",e.unknown=""})(NavigationDirection||(NavigationDirection={}));function normalizeBase(e){if(!e)if(isBrowser){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),removeTrailingSlash(e)}const BEFORE_HASH_RE=/^[^#]+#/;function createHref(e,t){return e.replace(BEFORE_HASH_RE,"#")+t}function getElementPosition(e,t){const r=document.documentElement.getBoundingClientRect(),a=e.getBoundingClientRect();return{behavior:t.behavior,left:a.left-r.left-(t.left||0),top:a.top-r.top-(t.top||0)}}const computeScrollPosition=()=>({left:window.scrollX,top:window.scrollY});function scrollToPosition(e){let t;if("el"in e){const r=e.el,a=typeof r=="string"&&r.startsWith("#"),n=typeof r=="string"?a?document.getElementById(r.slice(1)):document.querySelector(r):r;if(!n)return;t=getElementPosition(n,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 getScrollKey(e,t){return(history.state?history.state.position-t:-1)+e}const scrollPositions=new Map;function saveScrollPosition(e,t){scrollPositions.set(e,t)}function getSavedScrollPosition(e){const t=scrollPositions.get(e);return scrollPositions.delete(e),t}let createBaseLocation=()=>location.protocol+"//"+location.host;function createCurrentLocation(e,t){const{pathname:r,search:a,hash:n}=t,l=e.indexOf("#");if(l>-1){let u=n.includes(e.slice(l))?e.slice(l).length:1,c=n.slice(u);return c[0]!=="/"&&(c="/"+c),stripBase(c,"")}return stripBase(r,e)+a+n}function useHistoryListeners(e,t,r,a){let n=[],l=[],o=null;const u=({state:v})=>{const x=createCurrentLocation(e,location),w=r.value,C=t.value;let k=0;if(v){if(r.value=x,t.value=v,o&&o===w){o=null;return}k=C?v.position-C.position:0}else a(x);n.forEach(V=>{V(r.value,w,{delta:k,type:NavigationType.pop,direction:k?k>0?NavigationDirection.forward:NavigationDirection.back:NavigationDirection.unknown})})};function c(){o=r.value}function _(v){n.push(v);const x=()=>{const w=n.indexOf(v);w>-1&&n.splice(w,1)};return l.push(x),x}function f(){const{history:v}=window;!v.state||v.replaceState(assign$1({},v.state,{scroll:computeScrollPosition()}),"")}function m(){for(const v of l)v();l=[],window.removeEventListener("popstate",u),window.removeEventListener("beforeunload",f)}return window.addEventListener("popstate",u),window.addEventListener("beforeunload",f,{passive:!0}),{pauseListeners:c,listen:_,destroy:m}}function buildState(e,t,r,a=!1,n=!1){return{back:e,current:t,forward:r,replaced:a,position:window.history.length,scroll:n?computeScrollPosition():null}}function useHistoryStateNavigation(e){const{history:t,location:r}=window,a={value:createCurrentLocation(e,r)},n={value:t.state};n.value||l(a.value,{back:null,current:a.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function l(c,_,f){const m=e.indexOf("#"),v=m>-1?(r.host&&document.querySelector("base")?e:e.slice(m))+c:createBaseLocation()+e+c;try{t[f?"replaceState":"pushState"](_,"",v),n.value=_}catch(x){console.error(x),r[f?"replace":"assign"](v)}}function o(c,_){const f=assign$1({},t.state,buildState(n.value.back,c,n.value.forward,!0),_,{position:n.value.position});l(c,f,!0),a.value=c}function u(c,_){const f=assign$1({},n.value,t.state,{forward:c,scroll:computeScrollPosition()});l(f.current,f,!0);const m=assign$1({},buildState(a.value,c,null),{position:f.position+1},_);l(c,m,!1),a.value=c}return{location:a,state:n,push:u,replace:o}}function createWebHistory(e){e=normalizeBase(e);const t=useHistoryStateNavigation(e),r=useHistoryListeners(e,t.state,t.location,t.replace);function a(l,o=!0){o||r.pauseListeners(),history.go(l)}const n=assign$1({location:"",base:e,go:a,createHref:createHref.bind(null,e)},t,r);return Object.defineProperty(n,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(n,"state",{enumerable:!0,get:()=>t.state.value}),n}function isRouteLocation(e){return typeof e=="string"||e&&typeof e=="object"}function isRouteName(e){return typeof e=="string"||typeof e=="symbol"}const START_LOCATION_NORMALIZED={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0},NavigationFailureSymbol=Symbol("");var NavigationFailureType;(function(e){e[e.aborted=4]="aborted",e[e.cancelled=8]="cancelled",e[e.duplicated=16]="duplicated"})(NavigationFailureType||(NavigationFailureType={}));function createRouterError(e,t){return assign$1(new Error,{type:e,[NavigationFailureSymbol]:!0},t)}function isNavigationFailure(e,t){return e instanceof Error&&NavigationFailureSymbol in e&&(t==null||!!(e.type&t))}const BASE_PARAM_PATTERN="[^/]+?",BASE_PATH_PARSER_OPTIONS={sensitive:!1,strict:!1,start:!0,end:!0},REGEX_CHARS_RE=/[.+*?^${}()[\]/\\]/g;function tokensToParser(e,t){const r=assign$1({},BASE_PATH_PARSER_OPTIONS,t),a=[];let n=r.start?"^":"";const l=[];for(const _ of e){const f=_.length?[]:[90];r.strict&&!_.length&&(n+="/");for(let m=0;m<_.length;m++){const v=_[m];let x=40+(r.sensitive?.25:0);if(v.type===0)m||(n+="/"),n+=v.value.replace(REGEX_CHARS_RE,"\\$&"),x+=40;else if(v.type===1){const{value:w,repeatable:C,optional:k,regexp:V}=v;l.push({name:w,repeatable:C,optional:k});const O=V||BASE_PARAM_PATTERN;if(O!==BASE_PARAM_PATTERN){x+=10;try{new RegExp(`(${O})`)}catch(T){throw new Error(`Invalid custom RegExp for param "${w}" (${O}): `+T.message)}}let W=C?`((?:${O})(?:/(?:${O}))*)`:`(${O})`;m||(W=k&&_.length<2?`(?:/${W})`:"/"+W),k&&(W+="?"),n+=W,x+=20,k&&(x+=-8),C&&(x+=-20),O===".*"&&(x+=-50)}f.push(x)}a.push(f)}if(r.strict&&r.end){const _=a.length-1;a[_][a[_].length-1]+=.7000000000000001}r.strict||(n+="/?"),r.end?n+="$":r.strict&&(n+="(?:/|$)");const o=new RegExp(n,r.sensitive?"":"i");function u(_){const f=_.match(o),m={};if(!f)return null;for(let v=1;v<f.length;v++){const x=f[v]||"",w=l[v-1];m[w.name]=x&&w.repeatable?x.split("/"):x}return m}function c(_){let f="",m=!1;for(const v of e){(!m||!f.endsWith("/"))&&(f+="/"),m=!1;for(const x of v)if(x.type===0)f+=x.value;else if(x.type===1){const{value:w,repeatable:C,optional:k}=x,V=w in _?_[w]:"";if(isArray(V)&&!C)throw new Error(`Provided param "${w}" is an array but it is not repeatable (* or + modifiers)`);const O=isArray(V)?V.join("/"):V;if(!O)if(k)v.length<2&&(f.endsWith("/")?f=f.slice(0,-1):m=!0);else throw new Error(`Missing required param "${w}"`);f+=O}}return f||"/"}return{re:o,score:a,keys:l,parse:u,stringify:c}}function compareScoreArray(e,t){let r=0;for(;r<e.length&&r<t.length;){const a=t[r]-e[r];if(a)return a;r++}return e.length<t.length?e.length===1&&e[0]===40+40?-1:1:e.length>t.length?t.length===1&&t[0]===40+40?1:-1:0}function comparePathParserScore(e,t){let r=0;const a=e.score,n=t.score;for(;r<a.length&&r<n.length;){const l=compareScoreArray(a[r],n[r]);if(l)return l;r++}if(Math.abs(n.length-a.length)===1){if(isLastScoreNegative(a))return 1;if(isLastScoreNegative(n))return-1}return n.length-a.length}function isLastScoreNegative(e){const t=e[e.length-1];return e.length>0&&t[t.length-1]<0}const ROOT_TOKEN={type:0,value:""},VALID_PARAM_RE=/[a-zA-Z0-9_]/;function tokenizePath(e){if(!e)return[[]];if(e==="/")return[[ROOT_TOKEN]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(x){throw new Error(`ERR (${r})/"${_}": ${x}`)}let r=0,a=r;const n=[];let l;function o(){l&&n.push(l),l=[]}let u=0,c,_="",f="";function m(){!_||(r===0?l.push({type:0,value:_}):r===1||r===2||r===3?(l.length>1&&(c==="*"||c==="+")&&t(`A repeatable param (${_}) must be alone in its segment. eg: '/:ids+.`),l.push({type:1,value:_,regexp:f,repeatable:c==="*"||c==="+",optional:c==="*"||c==="?"})):t("Invalid state to consume buffer"),_="")}function v(){_+=c}for(;u<e.length;){if(c=e[u++],c==="\\"&&r!==2){a=r,r=4;continue}switch(r){case 0:c==="/"?(_&&m(),o()):c===":"?(m(),r=1):v();break;case 4:v(),r=a;break;case 1:c==="("?r=2:VALID_PARAM_RE.test(c)?v():(m(),r=0,c!=="*"&&c!=="?"&&c!=="+"&&u--);break;case 2:c===")"?f[f.length-1]=="\\"?f=f.slice(0,-1)+c:r=3:f+=c;break;case 3:m(),r=0,c!=="*"&&c!=="?"&&c!=="+"&&u--,f="";break;default:t("Unknown state");break}}return r===2&&t(`Unfinished custom RegExp for param "${_}"`),m(),o(),n}function createRouteRecordMatcher(e,t,r){const a=tokensToParser(tokenizePath(e.path),r),n=assign$1(a,{record:e,parent:t,children:[],alias:[]});return t&&!n.record.aliasOf==!t.record.aliasOf&&t.children.push(n),n}function createRouterMatcher(e,t){const r=[],a=new Map;t=mergeOptions({strict:!1,end:!0,sensitive:!1},t);function n(f){return a.get(f)}function l(f,m,v){const x=!v,w=normalizeRouteRecord(f);w.aliasOf=v&&v.record;const C=mergeOptions(t,f),k=[w];if("alias"in f){const W=typeof f.alias=="string"?[f.alias]:f.alias;for(const T of W)k.push(assign$1({},w,{components:v?v.record.components:w.components,path:T,aliasOf:v?v.record:w}))}let V,O;for(const W of k){const{path:T}=W;if(m&&T[0]!=="/"){const $=m.record.path,G=$[$.length-1]==="/"?"":"/";W.path=m.record.path+(T&&G+T)}if(V=createRouteRecordMatcher(W,m,C),v?v.alias.push(V):(O=O||V,O!==V&&O.alias.push(V),x&&f.name&&!isAliasRecord(V)&&o(f.name)),w.children){const $=w.children;for(let G=0;G<$.length;G++)l($[G],V,v&&v.children[G])}v=v||V,(V.record.components&&Object.keys(V.record.components).length||V.record.name||V.record.redirect)&&c(V)}return O?()=>{o(O)}:noop$1}function o(f){if(isRouteName(f)){const m=a.get(f);m&&(a.delete(f),r.splice(r.indexOf(m),1),m.children.forEach(o),m.alias.forEach(o))}else{const m=r.indexOf(f);m>-1&&(r.splice(m,1),f.record.name&&a.delete(f.record.name),f.children.forEach(o),f.alias.forEach(o))}}function u(){return r}function c(f){let m=0;for(;m<r.length&&comparePathParserScore(f,r[m])>=0&&(f.record.path!==r[m].record.path||!isRecordChildOf(f,r[m]));)m++;r.splice(m,0,f),f.record.name&&!isAliasRecord(f)&&a.set(f.record.name,f)}function _(f,m){let v,x={},w,C;if("name"in f&&f.name){if(v=a.get(f.name),!v)throw createRouterError(1,{location:f});C=v.record.name,x=assign$1(paramsFromLocation(m.params,v.keys.filter(O=>!O.optional).concat(v.parent?v.parent.keys.filter(O=>O.optional):[]).map(O=>O.name)),f.params&&paramsFromLocation(f.params,v.keys.map(O=>O.name))),w=v.stringify(x)}else if(f.path!=null)w=f.path,v=r.find(O=>O.re.test(w)),v&&(x=v.parse(w),C=v.record.name);else{if(v=m.name?a.get(m.name):r.find(O=>O.re.test(m.path)),!v)throw createRouterError(1,{location:f,currentLocation:m});C=v.record.name,x=assign$1({},m.params,f.params),w=v.stringify(x)}const k=[];let V=v;for(;V;)k.unshift(V.record),V=V.parent;return{name:C,path:w,params:x,matched:k,meta:mergeMetaFields(k)}}return e.forEach(f=>l(f)),{addRoute:l,resolve:_,removeRoute:o,getRoutes:u,getRecordMatcher:n}}function paramsFromLocation(e,t){const r={};for(const a of t)a in e&&(r[a]=e[a]);return r}function normalizeRouteRecord(e){return{path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:void 0,beforeEnter:e.beforeEnter,props:normalizeRecordProps(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 normalizeRecordProps(e){const t={},r=e.props||!1;if("component"in e)t.default=r;else for(const a in e.components)t[a]=typeof r=="object"?r[a]:r;return t}function isAliasRecord(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function mergeMetaFields(e){return e.reduce((t,r)=>assign$1(t,r.meta),{})}function mergeOptions(e,t){const r={};for(const a in e)r[a]=a in t?t[a]:e[a];return r}function isRecordChildOf(e,t){return t.children.some(r=>r===e||isRecordChildOf(e,r))}function parseQuery(e){const t={};if(e===""||e==="?")return t;const a=(e[0]==="?"?e.slice(1):e).split("&");for(let n=0;n<a.length;++n){const l=a[n].replace(PLUS_RE," "),o=l.indexOf("="),u=decode(o<0?l:l.slice(0,o)),c=o<0?null:decode(l.slice(o+1));if(u in t){let _=t[u];isArray(_)||(_=t[u]=[_]),_.push(c)}else t[u]=c}return t}function stringifyQuery(e){let t="";for(let r in e){const a=e[r];if(r=encodeQueryKey(r),a==null){a!==void 0&&(t+=(t.length?"&":"")+r);continue}(isArray(a)?a.map(l=>l&&encodeQueryValue(l)):[a&&encodeQueryValue(a)]).forEach(l=>{l!==void 0&&(t+=(t.length?"&":"")+r,l!=null&&(t+="="+l))})}return t}function normalizeQuery(e){const t={};for(const r in e){const a=e[r];a!==void 0&&(t[r]=isArray(a)?a.map(n=>n==null?null:""+n):a==null?a:""+a)}return t}const matchedRouteKey=Symbol(""),viewDepthKey=Symbol(""),routerKey=Symbol(""),routeLocationKey=Symbol(""),routerViewLocationKey=Symbol("");function useCallbacks(){let e=[];function t(a){return e.push(a),()=>{const n=e.indexOf(a);n>-1&&e.splice(n,1)}}function r(){e=[]}return{add:t,list:()=>e.slice(),reset:r}}function guardToPromiseFn(e,t,r,a,n,l=o=>o()){const o=a&&(a.enterCallbacks[n]=a.enterCallbacks[n]||[]);return()=>new Promise((u,c)=>{const _=v=>{v===!1?c(createRouterError(4,{from:r,to:t})):v instanceof Error?c(v):isRouteLocation(v)?c(createRouterError(2,{from:t,to:v})):(o&&a.enterCallbacks[n]===o&&typeof v=="function"&&o.push(v),u())},f=l(()=>e.call(a&&a.instances[n],t,r,_));let m=Promise.resolve(f);e.length<3&&(m=m.then(_)),m.catch(v=>c(v))})}function extractComponentsGuards(e,t,r,a,n=l=>l()){const l=[];for(const o of e)for(const u in o.components){let c=o.components[u];if(!(t!=="beforeRouteEnter"&&!o.instances[u]))if(isRouteComponent(c)){const f=(c.__vccOpts||c)[t];f&&l.push(guardToPromiseFn(f,r,a,o,u,n))}else{let _=c();l.push(()=>_.then(f=>{if(!f)return Promise.reject(new Error(`Couldn't resolve component "${u}" at "${o.path}"`));const m=isESModule(f)?f.default:f;o.components[u]=m;const x=(m.__vccOpts||m)[t];return x&&guardToPromiseFn(x,r,a,o,u,n)()}))}}return l}function isRouteComponent(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function useLink(e){const t=inject(routerKey),r=inject(routeLocationKey),a=computed(()=>t.resolve(unref(e.to))),n=computed(()=>{const{matched:c}=a.value,{length:_}=c,f=c[_-1],m=r.matched;if(!f||!m.length)return-1;const v=m.findIndex(isSameRouteRecord.bind(null,f));if(v>-1)return v;const x=getOriginalPath(c[_-2]);return _>1&&getOriginalPath(f)===x&&m[m.length-1].path!==x?m.findIndex(isSameRouteRecord.bind(null,c[_-2])):v}),l=computed(()=>n.value>-1&&includesParams(r.params,a.value.params)),o=computed(()=>n.value>-1&&n.value===r.matched.length-1&&isSameRouteLocationParams(r.params,a.value.params));function u(c={}){return guardEvent(c)?t[unref(e.replace)?"replace":"push"](unref(e.to)).catch(noop$1):Promise.resolve()}return{route:a,href:computed(()=>a.value.href),isActive:l,isExactActive:o,navigate:u}}const RouterLinkImpl=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,setup(e,{slots:t}){const r=reactive(useLink(e)),{options:a}=inject(routerKey),n=computed(()=>({[getLinkClass(e.activeClass,a.linkActiveClass,"router-link-active")]:r.isActive,[getLinkClass(e.exactActiveClass,a.linkExactActiveClass,"router-link-exact-active")]:r.isExactActive}));return()=>{const l=t.default&&t.default(r);return e.custom?l:h("a",{"aria-current":r.isExactActive?e.ariaCurrentValue:null,href:r.href,onClick:r.navigate,class:n.value},l)}}}),RouterLink=RouterLinkImpl;function guardEvent(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 includesParams(e,t){for(const r in t){const a=t[r],n=e[r];if(typeof a=="string"){if(a!==n)return!1}else if(!isArray(n)||n.length!==a.length||a.some((l,o)=>l!==n[o]))return!1}return!0}function getOriginalPath(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const getLinkClass=(e,t,r)=>e!=null?e:t!=null?t:r,RouterViewImpl=defineComponent({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:r}){const a=inject(routerViewLocationKey),n=computed(()=>e.route||a.value),l=inject(viewDepthKey,0),o=computed(()=>{let _=unref(l);const{matched:f}=n.value;let m;for(;(m=f[_])&&!m.components;)_++;return _}),u=computed(()=>n.value.matched[o.value]);provide(viewDepthKey,computed(()=>o.value+1)),provide(matchedRouteKey,u),provide(routerViewLocationKey,n);const c=ref();return watch(()=>[c.value,u.value,e.name],([_,f,m],[v,x,w])=>{f&&(f.instances[m]=_,x&&x!==f&&_&&_===v&&(f.leaveGuards.size||(f.leaveGuards=x.leaveGuards),f.updateGuards.size||(f.updateGuards=x.updateGuards))),_&&f&&(!x||!isSameRouteRecord(f,x)||!v)&&(f.enterCallbacks[m]||[]).forEach(C=>C(_))},{flush:"post"}),()=>{const _=n.value,f=e.name,m=u.value,v=m&&m.components[f];if(!v)return normalizeSlot(r.default,{Component:v,route:_});const x=m.props[f],w=x?x===!0?_.params:typeof x=="function"?x(_):x:null,k=h(v,assign$1({},w,t,{onVnodeUnmounted:V=>{V.component.isUnmounted&&(m.instances[f]=null)},ref:c}));return normalizeSlot(r.default,{Component:k,route:_})||k}}});function normalizeSlot(e,t){if(!e)return null;const r=e(t);return r.length===1?r[0]:r}const RouterView=RouterViewImpl;function createRouter(e){const t=createRouterMatcher(e.routes,e),r=e.parseQuery||parseQuery,a=e.stringifyQuery||stringifyQuery,n=e.history,l=useCallbacks(),o=useCallbacks(),u=useCallbacks(),c=shallowRef(START_LOCATION_NORMALIZED);let _=START_LOCATION_NORMALIZED;isBrowser&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const f=applyToParams.bind(null,N=>""+N),m=applyToParams.bind(null,encodeParam),v=applyToParams.bind(null,decode);function x(N,U){let q,J;return isRouteName(N)?(q=t.getRecordMatcher(N),J=U):J=N,t.addRoute(J,q)}function w(N){const U=t.getRecordMatcher(N);U&&t.removeRoute(U)}function C(){return t.getRoutes().map(N=>N.record)}function k(N){return!!t.getRecordMatcher(N)}function V(N,U){if(U=assign$1({},U||c.value),typeof N=="string"){const B=parseURL(r,N,U.path),E=t.resolve({path:B.path},U),R=n.createHref(B.fullPath);return assign$1(B,E,{params:v(E.params),hash:decode(B.hash),redirectedFrom:void 0,href:R})}let q;if(N.path!=null)q=assign$1({},N,{path:parseURL(r,N.path,U.path).path});else{const B=assign$1({},N.params);for(const E in B)B[E]==null&&delete B[E];q=assign$1({},N,{params:m(B)}),U.params=m(U.params)}const J=t.resolve(q,U),_e=N.hash||"";J.params=f(v(J.params));const de=stringifyURL(a,assign$1({},N,{hash:encodeHash(_e),path:J.path})),y=n.createHref(de);return assign$1({fullPath:de,hash:_e,query:a===stringifyQuery?normalizeQuery(N.query):N.query||{}},J,{redirectedFrom:void 0,href:y})}function O(N){return typeof N=="string"?parseURL(r,N,c.value.path):assign$1({},N)}function W(N,U){if(_!==N)return createRouterError(8,{from:U,to:N})}function T(N){return b(N)}function $(N){return T(assign$1(O(N),{replace:!0}))}function G(N){const U=N.matched[N.matched.length-1];if(U&&U.redirect){const{redirect:q}=U;let J=typeof q=="function"?q(N):q;return typeof J=="string"&&(J=J.includes("?")||J.includes("#")?J=O(J):{path:J},J.params={}),assign$1({query:N.query,hash:N.hash,params:J.path!=null?{}:N.params},J)}}function b(N,U){const q=_=V(N),J=c.value,_e=N.state,de=N.force,y=N.replace===!0,B=G(q);if(B)return b(assign$1(O(B),{state:typeof B=="object"?assign$1({},_e,B.state):_e,force:de,replace:y}),U||q);const E=q;E.redirectedFrom=U;let R;return!de&&isSameRouteLocation(a,J,q)&&(R=createRouterError(16,{to:E,from:J}),Ee(J,J,!0,!1)),(R?Promise.resolve(R):ee(E,J)).catch(A=>isNavigationFailure(A)?isNavigationFailure(A,2)?A:ge(A):ue(A,E,J)).then(A=>{if(A){if(isNavigationFailure(A,2))return b(assign$1({replace:y},O(A.to),{state:typeof A.to=="object"?assign$1({},_e,A.to.state):_e,force:de}),U||E)}else A=K(E,J,!0,y,_e);return H(E,J,A),A})}function S(N,U){const q=W(N,U);return q?Promise.reject(q):Promise.resolve()}function I(N){const U=Me.values().next().value;return U&&typeof U.runWithContext=="function"?U.runWithContext(N):N()}function ee(N,U){let q;const[J,_e,de]=extractChangingRecords(N,U);q=extractComponentsGuards(J.reverse(),"beforeRouteLeave",N,U);for(const B of J)B.leaveGuards.forEach(E=>{q.push(guardToPromiseFn(E,N,U))});const y=S.bind(null,N,U);return q.push(y),we(q).then(()=>{q=[];for(const B of l.list())q.push(guardToPromiseFn(B,N,U));return q.push(y),we(q)}).then(()=>{q=extractComponentsGuards(_e,"beforeRouteUpdate",N,U);for(const B of _e)B.updateGuards.forEach(E=>{q.push(guardToPromiseFn(E,N,U))});return q.push(y),we(q)}).then(()=>{q=[];for(const B of de)if(B.beforeEnter)if(isArray(B.beforeEnter))for(const E of B.beforeEnter)q.push(guardToPromiseFn(E,N,U));else q.push(guardToPromiseFn(B.beforeEnter,N,U));return q.push(y),we(q)}).then(()=>(N.matched.forEach(B=>B.enterCallbacks={}),q=extractComponentsGuards(de,"beforeRouteEnter",N,U,I),q.push(y),we(q))).then(()=>{q=[];for(const B of o.list())q.push(guardToPromiseFn(B,N,U));return q.push(y),we(q)}).catch(B=>isNavigationFailure(B,8)?B:Promise.reject(B))}function H(N,U,q){u.list().forEach(J=>I(()=>J(N,U,q)))}function K(N,U,q,J,_e){const de=W(N,U);if(de)return de;const y=U===START_LOCATION_NORMALIZED,B=isBrowser?history.state:{};q&&(J||y?n.replace(N.fullPath,assign$1({scroll:y&&B&&B.scroll},_e)):n.push(N.fullPath,_e)),c.value=N,Ee(N,U,q,y),ge()}let ne;function he(){ne||(ne=n.listen((N,U,q)=>{if(!Re.listening)return;const J=V(N),_e=G(J);if(_e){b(assign$1(_e,{replace:!0}),J).catch(noop$1);return}_=J;const de=c.value;isBrowser&&saveScrollPosition(getScrollKey(de.fullPath,q.delta),computeScrollPosition()),ee(J,de).catch(y=>isNavigationFailure(y,12)?y:isNavigationFailure(y,2)?(b(y.to,J).then(B=>{isNavigationFailure(B,20)&&!q.delta&&q.type===NavigationType.pop&&n.go(-1,!1)}).catch(noop$1),Promise.reject()):(q.delta&&n.go(-q.delta,!1),ue(y,J,de))).then(y=>{y=y||K(J,de,!1),y&&(q.delta&&!isNavigationFailure(y,8)?n.go(-q.delta,!1):q.type===NavigationType.pop&&isNavigationFailure(y,20)&&n.go(-1,!1)),H(J,de,y)}).catch(noop$1)}))}let ve=useCallbacks(),oe=useCallbacks(),ie;function ue(N,U,q){ge(N);const J=oe.list();return J.length?J.forEach(_e=>_e(N,U,q)):console.error(N),Promise.reject(N)}function ye(){return ie&&c.value!==START_LOCATION_NORMALIZED?Promise.resolve():new Promise((N,U)=>{ve.add([N,U])})}function ge(N){return ie||(ie=!N,he(),ve.list().forEach(([U,q])=>N?q(N):U()),ve.reset()),N}function Ee(N,U,q,J){const{scrollBehavior:_e}=e;if(!isBrowser||!_e)return Promise.resolve();const de=!q&&getSavedScrollPosition(getScrollKey(N.fullPath,0))||(J||!q)&&history.state&&history.state.scroll||null;return nextTick().then(()=>_e(N,U,de)).then(y=>y&&scrollToPosition(y)).catch(y=>ue(y,N,U))}const xe=N=>n.go(N);let Ve;const Me=new Set,Re={currentRoute:c,listening:!0,addRoute:x,removeRoute:w,hasRoute:k,getRoutes:C,resolve:V,options:e,push:T,replace:$,go:xe,back:()=>xe(-1),forward:()=>xe(1),beforeEach:l.add,beforeResolve:o.add,afterEach:u.add,onError:oe.add,isReady:ye,install(N){const U=this;N.component("RouterLink",RouterLink),N.component("RouterView",RouterView),N.config.globalProperties.$router=U,Object.defineProperty(N.config.globalProperties,"$route",{enumerable:!0,get:()=>unref(c)}),isBrowser&&!Ve&&c.value===START_LOCATION_NORMALIZED&&(Ve=!0,T(n.location).catch(_e=>{}));const q={};for(const _e in START_LOCATION_NORMALIZED)Object.defineProperty(q,_e,{get:()=>c.value[_e],enumerable:!0});N.provide(routerKey,U),N.provide(routeLocationKey,shallowReactive(q)),N.provide(routerViewLocationKey,c);const J=N.unmount;Me.add(N),N.unmount=function(){Me.delete(N),Me.size<1&&(_=START_LOCATION_NORMALIZED,ne&&ne(),ne=null,c.value=START_LOCATION_NORMALIZED,Ve=!1,ie=!1),J()}}};function we(N){return N.reduce((U,q)=>U.then(()=>I(q)),Promise.resolve())}return Re}function extractChangingRecords(e,t){const r=[],a=[],n=[],l=Math.max(t.matched.length,e.matched.length);for(let o=0;o<l;o++){const u=t.matched[o];u&&(e.matched.find(_=>isSameRouteRecord(_,u))?a.push(u):r.push(u));const c=e.matched[o];c&&(t.matched.find(_=>isSameRouteRecord(_,c))||n.push(c))}return[r,a,n]}function useRoute(){return inject(routeLocationKey)}const routes=[{path:"/",name:"home",component:()=>__vitePreload(()=>import("./homeView.f74d468a.js"),["assets/homeView.f74d468a.js","assets/vendor.d471d1e7.js","assets/homeView.157a0cfd.css"])}],router=createRouter({history:createWebHistory(),routes});var isVue2=!1;/*!
* pinia v2.1.7
* (c) 2023 Eduardo San Martin Morote
* @license MIT
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -10,9 +10,9 @@
this.resizeTo(800,600);
this.focus();
</script> -->
<script type="module" crossorigin src="/assets/index.aa30d5b2.js"></script>
<script type="module" crossorigin src="/assets/index.23cf875b.js"></script>
<link rel="modulepreload" crossorigin href="/assets/vendor.d471d1e7.js">
<link rel="stylesheet" href="/assets/index.9bcc9311.css">
<link rel="stylesheet" href="/assets/index.5aee5cd9.css">
</head>
<body>
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论