diff --git a/frontend/src/modules/inventory/components/PurchaseOrdersTab.vue b/frontend/src/modules/inventory/components/PurchaseOrdersTab.vue index 36e17c6..ee8b6a5 100644 --- a/frontend/src/modules/inventory/components/PurchaseOrdersTab.vue +++ b/frontend/src/modules/inventory/components/PurchaseOrdersTab.vue @@ -115,8 +115,8 @@ function removeOrderItem(index: number) { const orderTotalAmount = computed(() => { return orderItems.value.reduce((sum: number, item: any) => { const material = state.materials.find((m: any) => m.id === item.product_id) - const unitPrice = material?.cost_price || 0 - return sum + unitPrice * (item.quantity || 0) + const unitPrice = Number(material?.cost_price || 0) + return sum + unitPrice * Number(item.quantity || 0) }, 0) }) @@ -491,7 +491,7 @@ onMounted(() => { diff --git a/frontend/src/modules/inventory/components/SalesOrdersTab.vue b/frontend/src/modules/inventory/components/SalesOrdersTab.vue index 2c1a7a8..0647807 100644 --- a/frontend/src/modules/inventory/components/SalesOrdersTab.vue +++ b/frontend/src/modules/inventory/components/SalesOrdersTab.vue @@ -277,8 +277,8 @@ function removeConsumptionItem(index: number) { const consumptionTotalAmount = computed(() => { return consumptionItems.value.reduce((sum: number, item: any) => { const material = state.materials.find((m: any) => m.id === item.material_id) - const unitPrice = material?.cost_price || 0 - return sum + unitPrice * (item.quantity || 0) + const unitPrice = Number(material?.cost_price || 0) + return sum + unitPrice * Number(item.quantity || 0) }, 0) }) @@ -604,7 +604,7 @@ onMounted(() => { diff --git a/static/assets/BatchView-Bpd1N3Uo.js b/static/assets/BatchView-BMEYkwnK.js similarity index 99% rename from static/assets/BatchView-Bpd1N3Uo.js rename to static/assets/BatchView-BMEYkwnK.js index 8e4def2..b83f3bf 100644 --- a/static/assets/BatchView-Bpd1N3Uo.js +++ b/static/assets/BatchView-BMEYkwnK.js @@ -1 +1 @@ -import{C as e,D as t,E as n,F as r,I as i,L as a,N as o,O as s,P as c,R as l,S as u,T as d,_ as f,a as p,c as m,g as h,i as g,j as _,k as v,m as y,n as b,p as x,r as S,s as C,u as w,v as T,x as E,y as D}from"./index-BoystVy-.js";import{i as O}from"./utils-COFIQvWo.js";var ee={class:`page-container`},k={class:`page-header`},A={key:0,class:`upload-layout`},j={class:`upload-main-card`},M={key:0,class:`batch-file-list`},N={class:`batch-file-header`},P={class:`file-name`},F={class:`file-size`},I={key:1,class:`error-message`},L={class:`upload-side-card`},R={class:`material-panel compact-panel`},z={key:1,class:`inline-note`},B={key:1,class:`batch-dashboard`},V={class:`batch-progress-header`},H={class:`batch-progress-info`},U={class:`progress-bar`,style:{"margin-bottom":`var(--space-4)`}},W={class:`table-container`},G={key:0,class:`progress-bar`,style:{width:`100px`,display:`inline-block`}},K={key:1},q={key:1,style:{color:`var(--danger-color)`}},J={key:2,style:{color:`var(--text-secondary)`}},Y=b(e({__name:`BatchView`,setup(e){let b=w(),Y=m(),X=c(null),Z=null,Q=o({selectedFiles:[],selectedMaterial:`ABS`,dragOver:!1,uploading:!1,error:``,batchId:null,batchData:null}),te=e=>{let t=e.target;$(Array.from(t.files||[]))},ne=e=>{e.preventDefault(),Q.dragOver=!1,$(Array.from(e.dataTransfer?.files||[]))},$=e=>{let t=e.filter(e=>{let t=e.name.toLowerCase();return t.endsWith(`.stp`)||t.endsWith(`.step`)});t.length20?(Q.error=`单次批量上传最多 20 个文件`,Q.selectedFiles=n.slice(0,20)):Q.selectedFiles=n},re=e=>{Q.selectedFiles.splice(e,1)},ie=e=>({processing:`处理中`,completed:`已完成`,failed:`失败`,unknown:`未知`,rejected:`已拒绝`})[e]||e,ae=async()=>{if(!Y.token){Q.error=`请先登录后再上传文件`,b.push(`/login`);return}if(!Q.selectedFiles.length)return;Q.uploading=!0,Q.error=``;let e=new FormData;for(let t of Q.selectedFiles)e.append(`files`,t);e.append(`material`,Q.selectedMaterial),e.append(`draft_angle`,`2.0`),e.append(`shrinkage_rate`,`0.5`),e.append(`parting_precision`,`0.1`),e.append(`cavity_match`,`95`);try{let t=await fetch(`/api/batch-upload`,{method:`POST`,headers:{Authorization:`Bearer ${Y.token}`},body:e});if(t.status===401){p(),b.push(`/login`);return}if(!t.ok)throw Error(`上传失败: ${t.status}`);let n=await t.json();Q.batchId=n.batch_id,S(`已创建批量任务:${n.accepted} 个文件已接受`,`success`),oe(n.batch_id)}catch(e){Q.error=g(e,`批量上传`)}finally{Q.uploading=!1}},oe=e=>{let t=async()=>{try{let n=await C(`/api/batch/${e}`);if(Q.batchData=n,n.processing===0){S(`批量任务完成:${n.completed} 个成功,${n.failed} 个失败`,n.failed>0?`warning`:`success`);return}Z=setTimeout(t,3e3)}catch(e){g(e,`查询批量状态`)}};t()};return d(()=>{if(!Y.user){b.push(`/login`);return}}),n(()=>{Z&&clearTimeout(Z)}),(e,n)=>{let o=v(`t-button`),c=v(`t-option`),d=v(`t-select`),p=v(`t-form-item`),m=v(`t-tag`),g=v(`t-table-column`),S=v(`t-table`);return t(),D(`div`,ee,[h(`div`,k,[u(o,{variant:`text`,onClick:n[0]||=e=>r(b).back()},{default:_(()=>[...n[7]||=[h(`svg`,{width:`16`,height:`16`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2.2`,"stroke-linecap":`round`,"stroke-linejoin":`round`},[h(`path`,{d:`M19 12H5M12 19l-7-7 7-7`})],-1),E(` 返回 `,-1)]]),_:1}),n[8]||=h(`h1`,null,`批量分析`,-1),n[9]||=h(`p`,null,`同时上传多个 STP 文件,并行分析、统一查看进度`,-1)]),Q.batchId?(t(),D(`div`,B,[h(`div`,V,[h(`div`,H,[h(`h2`,null,`批量任务:`+l(Q.batchId.slice(0,8))+`...`,1),h(`p`,null,[E(` 共 `+l(Q.batchData?.total)+` 个任务, `,1),u(m,{type:`success`,variant:`light`},{default:_(()=>[E(`完成 `+l(Q.batchData?.completed),1)]),_:1}),Q.batchData?.failed?(t(),f(m,{key:0,type:`danger`,variant:`light`},{default:_(()=>[E(`失败 `+l(Q.batchData?.failed),1)]),_:1})):T(``,!0),Q.batchData?.processing?(t(),f(m,{key:1,type:`warning`,variant:`light`},{default:_(()=>[E(`进行中 `+l(Q.batchData?.processing),1)]),_:1})):T(``,!0)])]),u(o,{variant:`outline`,size:`small`,onClick:n[6]||=e=>{Q.batchId=``,Q.batchData=null}},{default:_(()=>[...n[16]||=[E(` 新建批量 `,-1)]]),_:1})]),h(`div`,U,[h(`div`,{class:`progress-fill`,style:a({width:(Q.batchData?.progress_percent||0)+`%`})},null,4)]),h(`div`,W,[u(S,{data:Q.batchData?.tasks||[],"row-key":`task_id`,stripe:``},{default:_(()=>[u(g,{title:`文件名`,colKey:`filename`}),u(g,{title:`状态`},{default:_(({row:e})=>[u(m,{type:e.status===`completed`?`success`:e.status===`failed`?`danger`:`warning`,variant:`light`},{default:_(()=>[E(l(ie(e.status)),1)]),_:2},1032,[`type`])]),_:1}),u(g,{title:`进度`},{default:_(({row:e})=>[e.status===`processing`?(t(),D(`div`,G,[h(`div`,{class:`progress-fill`,style:a({width:(e.progress||0)+`%`})},null,4)])):(t(),D(`span`,K,l(e.progress||0)+`%`,1))]),_:1}),u(g,{title:`错误信息`,colKey:`error`}),u(g,{title:`操作`},{default:_(({row:e})=>[e.status===`completed`?(t(),f(o,{key:0,theme:`primary`,size:`small`,onClick:t=>r(b).push(`/moldinsight/result/${e.task_id}`)},{default:_(()=>[...n[17]||=[E(` 查看结果 `,-1)]]),_:1},8,[`onClick`])):e.status===`failed`?(t(),D(`span`,q,l(e.error||`分析失败`),1)):(t(),D(`span`,J,`处理中...`))]),_:1})]),_:1},8,[`data`])])])):(t(),D(`div`,A,[h(`div`,j,[n[14]||=h(`h2`,{class:`section-title`},`1. 选择多个 STP 文件`,-1),h(`div`,{class:i([`upload-zone`,{"drag-over":Q.dragOver}]),onDragover:n[1]||=x(e=>Q.dragOver=!0,[`prevent`]),onDragleave:n[2]||=x(e=>Q.dragOver=!1,[`prevent`]),onDrop:ne,onClick:n[3]||=e=>X.value?.click()},[h(`input`,{ref_key:`fileInput`,ref:X,type:`file`,accept:`.stp,.step`,multiple:``,onChange:te,hidden:``},null,544),n[10]||=h(`div`,{class:`upload-icon`},`📁`,-1),n[11]||=h(`div`,{class:`upload-text`},[h(`span`,{class:`upload-title`},`点击选择或拖拽多个 STP/STEP 文件`),h(`span`,{class:`upload-hint`},`支持批量上传,单次最多 20 个文件`)],-1)],34),Q.selectedFiles.length?(t(),D(`div`,M,[h(`div`,N,[h(`span`,null,`已选择 `+l(Q.selectedFiles.length)+` 个文件`,1),u(o,{variant:`text`,size:`small`,onClick:n[4]||=e=>Q.selectedFiles=[]},{default:_(()=>[...n[12]||=[E(`清空`,-1)]]),_:1})]),(t(!0),D(y,null,s(Q.selectedFiles,(e,i)=>(t(),D(`div`,{key:i,class:`batch-file-item`},[h(`span`,P,l(e.name),1),h(`span`,F,l(r(O)(e.size)),1),u(o,{variant:`text`,size:`small`,onClick:e=>re(i)},{default:_(()=>[...n[13]||=[E(`×`,-1)]]),_:1},8,[`onClick`])]))),128))])):T(``,!0),Q.error?(t(),D(`div`,I,l(Q.error),1)):T(``,!0)]),h(`div`,L,[n[15]||=h(`h2`,{class:`section-title`},`2. 注塑模参数`,-1),h(`div`,R,[u(p,{label:`产品材料`},{default:_(()=>[u(d,{modelValue:Q.selectedMaterial,"onUpdate:modelValue":n[5]||=e=>Q.selectedMaterial=e},{default:_(()=>[u(c,{value:`ABS`,label:`ABS (1.05 g/cm³)`}),u(c,{value:`PP`,label:`PP (0.90 g/cm³)`}),u(c,{value:`PE`,label:`PE (0.95 g/cm³)`}),u(c,{value:`PC`,label:`PC (1.20 g/cm³)`}),u(c,{value:`PA`,label:`PA (1.14 g/cm³)`}),u(c,{value:`POM`,label:`POM (1.41 g/cm³)`}),u(c,{value:`PMMA`,label:`PMMA (1.18 g/cm³)`}),u(c,{value:`PBT`,label:`PBT (1.31 g/cm³)`})]),_:1},8,[`modelValue`])]),_:1})]),Q.selectedFiles.length?(t(),f(o,{key:0,theme:`primary`,class:`upload-submit-btn`,onClick:ae,disabled:Q.uploading},{default:_(()=>[E(l(Q.uploading?`上传中...`:`3. 开始批量分析`),1)]),_:1},8,[`disabled`])):(t(),D(`div`,z,`先选择 STP 文件,再填写材料并开始批量分析。`))])]))])}}}),[[`__scopeId`,`data-v-167d79eb`]]);export{Y as default}; \ No newline at end of file +import{C as e,D as t,E as n,F as r,I as i,L as a,N as o,O as s,P as c,R as l,S as u,T as d,_ as f,a as p,c as m,g as h,i as g,j as _,k as v,m as y,n as b,p as x,r as S,s as C,u as w,v as T,x as E,y as D}from"./index-Dngmm__P.js";import{i as O}from"./utils-COFIQvWo.js";var ee={class:`page-container`},k={class:`page-header`},A={key:0,class:`upload-layout`},j={class:`upload-main-card`},M={key:0,class:`batch-file-list`},N={class:`batch-file-header`},P={class:`file-name`},F={class:`file-size`},I={key:1,class:`error-message`},L={class:`upload-side-card`},R={class:`material-panel compact-panel`},z={key:1,class:`inline-note`},B={key:1,class:`batch-dashboard`},V={class:`batch-progress-header`},H={class:`batch-progress-info`},U={class:`progress-bar`,style:{"margin-bottom":`var(--space-4)`}},W={class:`table-container`},G={key:0,class:`progress-bar`,style:{width:`100px`,display:`inline-block`}},K={key:1},q={key:1,style:{color:`var(--danger-color)`}},J={key:2,style:{color:`var(--text-secondary)`}},Y=b(e({__name:`BatchView`,setup(e){let b=w(),Y=m(),X=c(null),Z=null,Q=o({selectedFiles:[],selectedMaterial:`ABS`,dragOver:!1,uploading:!1,error:``,batchId:null,batchData:null}),te=e=>{let t=e.target;$(Array.from(t.files||[]))},ne=e=>{e.preventDefault(),Q.dragOver=!1,$(Array.from(e.dataTransfer?.files||[]))},$=e=>{let t=e.filter(e=>{let t=e.name.toLowerCase();return t.endsWith(`.stp`)||t.endsWith(`.step`)});t.length20?(Q.error=`单次批量上传最多 20 个文件`,Q.selectedFiles=n.slice(0,20)):Q.selectedFiles=n},re=e=>{Q.selectedFiles.splice(e,1)},ie=e=>({processing:`处理中`,completed:`已完成`,failed:`失败`,unknown:`未知`,rejected:`已拒绝`})[e]||e,ae=async()=>{if(!Y.token){Q.error=`请先登录后再上传文件`,b.push(`/login`);return}if(!Q.selectedFiles.length)return;Q.uploading=!0,Q.error=``;let e=new FormData;for(let t of Q.selectedFiles)e.append(`files`,t);e.append(`material`,Q.selectedMaterial),e.append(`draft_angle`,`2.0`),e.append(`shrinkage_rate`,`0.5`),e.append(`parting_precision`,`0.1`),e.append(`cavity_match`,`95`);try{let t=await fetch(`/api/batch-upload`,{method:`POST`,headers:{Authorization:`Bearer ${Y.token}`},body:e});if(t.status===401){p(),b.push(`/login`);return}if(!t.ok)throw Error(`上传失败: ${t.status}`);let n=await t.json();Q.batchId=n.batch_id,S(`已创建批量任务:${n.accepted} 个文件已接受`,`success`),oe(n.batch_id)}catch(e){Q.error=g(e,`批量上传`)}finally{Q.uploading=!1}},oe=e=>{let t=async()=>{try{let n=await C(`/api/batch/${e}`);if(Q.batchData=n,n.processing===0){S(`批量任务完成:${n.completed} 个成功,${n.failed} 个失败`,n.failed>0?`warning`:`success`);return}Z=setTimeout(t,3e3)}catch(e){g(e,`查询批量状态`)}};t()};return d(()=>{if(!Y.user){b.push(`/login`);return}}),n(()=>{Z&&clearTimeout(Z)}),(e,n)=>{let o=v(`t-button`),c=v(`t-option`),d=v(`t-select`),p=v(`t-form-item`),m=v(`t-tag`),g=v(`t-table-column`),S=v(`t-table`);return t(),D(`div`,ee,[h(`div`,k,[u(o,{variant:`text`,onClick:n[0]||=e=>r(b).back()},{default:_(()=>[...n[7]||=[h(`svg`,{width:`16`,height:`16`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2.2`,"stroke-linecap":`round`,"stroke-linejoin":`round`},[h(`path`,{d:`M19 12H5M12 19l-7-7 7-7`})],-1),E(` 返回 `,-1)]]),_:1}),n[8]||=h(`h1`,null,`批量分析`,-1),n[9]||=h(`p`,null,`同时上传多个 STP 文件,并行分析、统一查看进度`,-1)]),Q.batchId?(t(),D(`div`,B,[h(`div`,V,[h(`div`,H,[h(`h2`,null,`批量任务:`+l(Q.batchId.slice(0,8))+`...`,1),h(`p`,null,[E(` 共 `+l(Q.batchData?.total)+` 个任务, `,1),u(m,{type:`success`,variant:`light`},{default:_(()=>[E(`完成 `+l(Q.batchData?.completed),1)]),_:1}),Q.batchData?.failed?(t(),f(m,{key:0,type:`danger`,variant:`light`},{default:_(()=>[E(`失败 `+l(Q.batchData?.failed),1)]),_:1})):T(``,!0),Q.batchData?.processing?(t(),f(m,{key:1,type:`warning`,variant:`light`},{default:_(()=>[E(`进行中 `+l(Q.batchData?.processing),1)]),_:1})):T(``,!0)])]),u(o,{variant:`outline`,size:`small`,onClick:n[6]||=e=>{Q.batchId=``,Q.batchData=null}},{default:_(()=>[...n[16]||=[E(` 新建批量 `,-1)]]),_:1})]),h(`div`,U,[h(`div`,{class:`progress-fill`,style:a({width:(Q.batchData?.progress_percent||0)+`%`})},null,4)]),h(`div`,W,[u(S,{data:Q.batchData?.tasks||[],"row-key":`task_id`,stripe:``},{default:_(()=>[u(g,{title:`文件名`,colKey:`filename`}),u(g,{title:`状态`},{default:_(({row:e})=>[u(m,{type:e.status===`completed`?`success`:e.status===`failed`?`danger`:`warning`,variant:`light`},{default:_(()=>[E(l(ie(e.status)),1)]),_:2},1032,[`type`])]),_:1}),u(g,{title:`进度`},{default:_(({row:e})=>[e.status===`processing`?(t(),D(`div`,G,[h(`div`,{class:`progress-fill`,style:a({width:(e.progress||0)+`%`})},null,4)])):(t(),D(`span`,K,l(e.progress||0)+`%`,1))]),_:1}),u(g,{title:`错误信息`,colKey:`error`}),u(g,{title:`操作`},{default:_(({row:e})=>[e.status===`completed`?(t(),f(o,{key:0,theme:`primary`,size:`small`,onClick:t=>r(b).push(`/moldinsight/result/${e.task_id}`)},{default:_(()=>[...n[17]||=[E(` 查看结果 `,-1)]]),_:1},8,[`onClick`])):e.status===`failed`?(t(),D(`span`,q,l(e.error||`分析失败`),1)):(t(),D(`span`,J,`处理中...`))]),_:1})]),_:1},8,[`data`])])])):(t(),D(`div`,A,[h(`div`,j,[n[14]||=h(`h2`,{class:`section-title`},`1. 选择多个 STP 文件`,-1),h(`div`,{class:i([`upload-zone`,{"drag-over":Q.dragOver}]),onDragover:n[1]||=x(e=>Q.dragOver=!0,[`prevent`]),onDragleave:n[2]||=x(e=>Q.dragOver=!1,[`prevent`]),onDrop:ne,onClick:n[3]||=e=>X.value?.click()},[h(`input`,{ref_key:`fileInput`,ref:X,type:`file`,accept:`.stp,.step`,multiple:``,onChange:te,hidden:``},null,544),n[10]||=h(`div`,{class:`upload-icon`},`📁`,-1),n[11]||=h(`div`,{class:`upload-text`},[h(`span`,{class:`upload-title`},`点击选择或拖拽多个 STP/STEP 文件`),h(`span`,{class:`upload-hint`},`支持批量上传,单次最多 20 个文件`)],-1)],34),Q.selectedFiles.length?(t(),D(`div`,M,[h(`div`,N,[h(`span`,null,`已选择 `+l(Q.selectedFiles.length)+` 个文件`,1),u(o,{variant:`text`,size:`small`,onClick:n[4]||=e=>Q.selectedFiles=[]},{default:_(()=>[...n[12]||=[E(`清空`,-1)]]),_:1})]),(t(!0),D(y,null,s(Q.selectedFiles,(e,i)=>(t(),D(`div`,{key:i,class:`batch-file-item`},[h(`span`,P,l(e.name),1),h(`span`,F,l(r(O)(e.size)),1),u(o,{variant:`text`,size:`small`,onClick:e=>re(i)},{default:_(()=>[...n[13]||=[E(`×`,-1)]]),_:1},8,[`onClick`])]))),128))])):T(``,!0),Q.error?(t(),D(`div`,I,l(Q.error),1)):T(``,!0)]),h(`div`,L,[n[15]||=h(`h2`,{class:`section-title`},`2. 注塑模参数`,-1),h(`div`,R,[u(p,{label:`产品材料`},{default:_(()=>[u(d,{modelValue:Q.selectedMaterial,"onUpdate:modelValue":n[5]||=e=>Q.selectedMaterial=e},{default:_(()=>[u(c,{value:`ABS`,label:`ABS (1.05 g/cm³)`}),u(c,{value:`PP`,label:`PP (0.90 g/cm³)`}),u(c,{value:`PE`,label:`PE (0.95 g/cm³)`}),u(c,{value:`PC`,label:`PC (1.20 g/cm³)`}),u(c,{value:`PA`,label:`PA (1.14 g/cm³)`}),u(c,{value:`POM`,label:`POM (1.41 g/cm³)`}),u(c,{value:`PMMA`,label:`PMMA (1.18 g/cm³)`}),u(c,{value:`PBT`,label:`PBT (1.31 g/cm³)`})]),_:1},8,[`modelValue`])]),_:1})]),Q.selectedFiles.length?(t(),f(o,{key:0,theme:`primary`,class:`upload-submit-btn`,onClick:ae,disabled:Q.uploading},{default:_(()=>[E(l(Q.uploading?`上传中...`:`3. 开始批量分析`),1)]),_:1},8,[`disabled`])):(t(),D(`div`,z,`先选择 STP 文件,再填写材料并开始批量分析。`))])]))])}}}),[[`__scopeId`,`data-v-167d79eb`]]);export{Y as default}; \ No newline at end of file diff --git a/static/assets/CustomersTab-DRzCY2Tl.js b/static/assets/CustomersTab-DftpbrJH.js similarity index 96% rename from static/assets/CustomersTab-DRzCY2Tl.js rename to static/assets/CustomersTab-DftpbrJH.js index 08a80c6..5f6ba12 100644 --- a/static/assets/CustomersTab-DRzCY2Tl.js +++ b/static/assets/CustomersTab-DftpbrJH.js @@ -1 +1 @@ -import{C as e,D as t,F as n,N as r,P as i,R as a,S as o,T as s,g as c,i as l,j as u,k as d,n as f,r as p,s as m,x as h,y as g}from"./index-BoystVy-.js";import{t as _}from"./useInventory-C7Zfw7oO.js";var v={class:`customers-tab`},y={class:`table-header`},b=f(e({__name:`CustomersTab`,setup(e){let{state:f,loadCustomers:b}=_(),x=i(!1),S=i(null),C=i(!1),w=r({name:``,contact_person:``,phone:``,email:``,address:``});function T(){S.value=null,w.name=``,w.contact_person=``,w.phone=``,w.email=``,w.address=``,x.value=!0}function E(e){S.value=e,w.name=e.name??``,w.contact_person=e.contact_person??``,w.phone=e.phone??``,w.email=e.email??``,w.address=e.address??``,x.value=!0}async function D(){if(!C.value){if(!w.name||!w.name.trim()){p(`请输入客户名称`,`warning`);return}C.value=!0;try{let e={name:w.name,contact_person:w.contact_person||null,phone:w.phone||null,email:w.email||null,address:w.address||null};S.value?(await m(`/api/customers/${S.value.id}`,{method:`PUT`,body:JSON.stringify(e)}),p(`客户更新成功`,`success`)):(await m(`/api/customers`,{method:`POST`,body:JSON.stringify(e)}),p(`客户已创建`,`success`)),x.value=!1,b()}catch(e){l(e,`保存客户`)}finally{C.value=!1}}}async function O(e){if(confirm(`确定要删除这个客户吗?`))try{await m(`/api/customers/${e}`,{method:`DELETE`}),p(`客户已删除`,`success`),b()}catch(e){l(e,`删除客户`)}}return s(()=>{b()}),(e,r)=>{let i=d(`t-button`),s=d(`t-table-column`),l=d(`t-table`),p=d(`t-input`),m=d(`t-form-item`),_=d(`t-form`),b=d(`t-dialog`);return t(),g(`div`,v,[c(`div`,y,[o(i,{type:`primary`,onClick:T},{default:u(()=>[...r[7]||=[h(`+ 新增客户`,-1)]]),_:1})]),o(l,{data:n(f).customers,style:{width:`100%`},loading:n(f).loading,"empty-text":`暂无客户数据`},{default:u(()=>[o(s,{prop:`code`,label:`编码`}),o(s,{prop:`name`,label:`名称`}),o(s,{prop:`contact_person`,label:`联系人`},{default:u(({row:e})=>[h(a(e.contact_person||`-`),1)]),_:1}),o(s,{prop:`phone`,label:`电话`},{default:u(({row:e})=>[h(a(e.phone||`-`),1)]),_:1}),o(s,{prop:`email`,label:`邮箱`},{default:u(({row:e})=>[h(a(e.email||`-`),1)]),_:1}),o(s,{label:`操作`,width:`180`},{default:u(({row:e})=>[o(i,{size:`small`,onClick:t=>E(e)},{default:u(()=>[...r[8]||=[h(`编辑`,-1)]]),_:1},8,[`onClick`]),o(i,{size:`small`,type:`danger`,onClick:t=>O(e.id)},{default:u(()=>[...r[9]||=[h(`删除`,-1)]]),_:1},8,[`onClick`])]),_:1})]),_:1},8,[`data`,`loading`]),o(b,{modelValue:x.value,"onUpdate:modelValue":r[6]||=e=>x.value=e,title:S.value?`编辑客户`:`新增客户`,width:`520px`,"close-on-click-modal":!1},{footer:u(()=>[o(i,{onClick:r[5]||=e=>x.value=!1,disabled:C.value},{default:u(()=>[...r[10]||=[h(`取消`,-1)]]),_:1},8,[`disabled`]),o(i,{type:`primary`,loading:C.value,disabled:C.value,onClick:D},{default:u(()=>[...r[11]||=[h(`保存`,-1)]]),_:1},8,[`loading`,`disabled`])]),default:u(()=>[o(_,{model:w,"label-width":`80px`},{default:u(()=>[o(m,{label:`名称`,required:``},{default:u(()=>[o(p,{modelValue:w.name,"onUpdate:modelValue":r[0]||=e=>w.name=e,placeholder:`请输入客户名称`},null,8,[`modelValue`])]),_:1}),o(m,{label:`联系人`},{default:u(()=>[o(p,{modelValue:w.contact_person,"onUpdate:modelValue":r[1]||=e=>w.contact_person=e,placeholder:`请输入联系人`},null,8,[`modelValue`])]),_:1}),o(m,{label:`电话`},{default:u(()=>[o(p,{modelValue:w.phone,"onUpdate:modelValue":r[2]||=e=>w.phone=e,placeholder:`请输入电话`},null,8,[`modelValue`])]),_:1}),o(m,{label:`邮箱`},{default:u(()=>[o(p,{modelValue:w.email,"onUpdate:modelValue":r[3]||=e=>w.email=e,type:`email`,placeholder:`请输入邮箱`},null,8,[`modelValue`])]),_:1}),o(m,{label:`地址`},{default:u(()=>[o(p,{modelValue:w.address,"onUpdate:modelValue":r[4]||=e=>w.address=e,placeholder:`请输入地址`},null,8,[`modelValue`])]),_:1})]),_:1},8,[`model`])]),_:1},8,[`modelValue`,`title`])])}}}),[[`__scopeId`,`data-v-36237339`]]);export{b as default}; \ No newline at end of file +import{C as e,D as t,F as n,N as r,P as i,R as a,S as o,T as s,g as c,i as l,j as u,k as d,n as f,r as p,s as m,x as h,y as g}from"./index-Dngmm__P.js";import{t as _}from"./useInventory-CrXJ8kdd.js";var v={class:`customers-tab`},y={class:`table-header`},b=f(e({__name:`CustomersTab`,setup(e){let{state:f,loadCustomers:b}=_(),x=i(!1),S=i(null),C=i(!1),w=r({name:``,contact_person:``,phone:``,email:``,address:``});function T(){S.value=null,w.name=``,w.contact_person=``,w.phone=``,w.email=``,w.address=``,x.value=!0}function E(e){S.value=e,w.name=e.name??``,w.contact_person=e.contact_person??``,w.phone=e.phone??``,w.email=e.email??``,w.address=e.address??``,x.value=!0}async function D(){if(!C.value){if(!w.name||!w.name.trim()){p(`请输入客户名称`,`warning`);return}C.value=!0;try{let e={name:w.name,contact_person:w.contact_person||null,phone:w.phone||null,email:w.email||null,address:w.address||null};S.value?(await m(`/api/customers/${S.value.id}`,{method:`PUT`,body:JSON.stringify(e)}),p(`客户更新成功`,`success`)):(await m(`/api/customers`,{method:`POST`,body:JSON.stringify(e)}),p(`客户已创建`,`success`)),x.value=!1,b()}catch(e){l(e,`保存客户`)}finally{C.value=!1}}}async function O(e){if(confirm(`确定要删除这个客户吗?`))try{await m(`/api/customers/${e}`,{method:`DELETE`}),p(`客户已删除`,`success`),b()}catch(e){l(e,`删除客户`)}}return s(()=>{b()}),(e,r)=>{let i=d(`t-button`),s=d(`t-table-column`),l=d(`t-table`),p=d(`t-input`),m=d(`t-form-item`),_=d(`t-form`),b=d(`t-dialog`);return t(),g(`div`,v,[c(`div`,y,[o(i,{type:`primary`,onClick:T},{default:u(()=>[...r[7]||=[h(`+ 新增客户`,-1)]]),_:1})]),o(l,{data:n(f).customers,style:{width:`100%`},loading:n(f).loading,"empty-text":`暂无客户数据`},{default:u(()=>[o(s,{prop:`code`,label:`编码`}),o(s,{prop:`name`,label:`名称`}),o(s,{prop:`contact_person`,label:`联系人`},{default:u(({row:e})=>[h(a(e.contact_person||`-`),1)]),_:1}),o(s,{prop:`phone`,label:`电话`},{default:u(({row:e})=>[h(a(e.phone||`-`),1)]),_:1}),o(s,{prop:`email`,label:`邮箱`},{default:u(({row:e})=>[h(a(e.email||`-`),1)]),_:1}),o(s,{label:`操作`,width:`180`},{default:u(({row:e})=>[o(i,{size:`small`,onClick:t=>E(e)},{default:u(()=>[...r[8]||=[h(`编辑`,-1)]]),_:1},8,[`onClick`]),o(i,{size:`small`,type:`danger`,onClick:t=>O(e.id)},{default:u(()=>[...r[9]||=[h(`删除`,-1)]]),_:1},8,[`onClick`])]),_:1})]),_:1},8,[`data`,`loading`]),o(b,{modelValue:x.value,"onUpdate:modelValue":r[6]||=e=>x.value=e,title:S.value?`编辑客户`:`新增客户`,width:`520px`,"close-on-click-modal":!1},{footer:u(()=>[o(i,{onClick:r[5]||=e=>x.value=!1,disabled:C.value},{default:u(()=>[...r[10]||=[h(`取消`,-1)]]),_:1},8,[`disabled`]),o(i,{type:`primary`,loading:C.value,disabled:C.value,onClick:D},{default:u(()=>[...r[11]||=[h(`保存`,-1)]]),_:1},8,[`loading`,`disabled`])]),default:u(()=>[o(_,{model:w,"label-width":`80px`},{default:u(()=>[o(m,{label:`名称`,required:``},{default:u(()=>[o(p,{modelValue:w.name,"onUpdate:modelValue":r[0]||=e=>w.name=e,placeholder:`请输入客户名称`},null,8,[`modelValue`])]),_:1}),o(m,{label:`联系人`},{default:u(()=>[o(p,{modelValue:w.contact_person,"onUpdate:modelValue":r[1]||=e=>w.contact_person=e,placeholder:`请输入联系人`},null,8,[`modelValue`])]),_:1}),o(m,{label:`电话`},{default:u(()=>[o(p,{modelValue:w.phone,"onUpdate:modelValue":r[2]||=e=>w.phone=e,placeholder:`请输入电话`},null,8,[`modelValue`])]),_:1}),o(m,{label:`邮箱`},{default:u(()=>[o(p,{modelValue:w.email,"onUpdate:modelValue":r[3]||=e=>w.email=e,type:`email`,placeholder:`请输入邮箱`},null,8,[`modelValue`])]),_:1}),o(m,{label:`地址`},{default:u(()=>[o(p,{modelValue:w.address,"onUpdate:modelValue":r[4]||=e=>w.address=e,placeholder:`请输入地址`},null,8,[`modelValue`])]),_:1})]),_:1},8,[`model`])]),_:1},8,[`modelValue`,`title`])])}}}),[[`__scopeId`,`data-v-36237339`]]);export{b as default}; \ No newline at end of file diff --git a/static/assets/DashboardTab-6_GGPgSj.js b/static/assets/DashboardTab-DlAvFlmh.js similarity index 90% rename from static/assets/DashboardTab-6_GGPgSj.js rename to static/assets/DashboardTab-DlAvFlmh.js index c4c6890..24d27c6 100644 --- a/static/assets/DashboardTab-6_GGPgSj.js +++ b/static/assets/DashboardTab-DlAvFlmh.js @@ -1 +1 @@ -import{C as e,D as t,F as n,O as r,R as i,S as a,_ as o,g as s,j as c,k as l,m as u,y as d}from"./index-BoystVy-.js";import{t as f}from"./useInventory-C7Zfw7oO.js";var p={style:{display:`flex`,"align-items":`center`,gap:`12px`}},m={style:{"font-size":`32px`}},h={style:{"font-size":`24px`,"font-weight":`700`}},g={style:{color:`var(--text-tertiary)`,"font-size":`13px`}},_=e({__name:`DashboardTab`,setup(e){let{state:_,formatCurrency:v}=f();return(e,f)=>{let y=l(`t-card`),b=l(`t-col`),x=l(`t-row`);return t(),o(x,{gutter:16},{default:c(()=>[(t(!0),d(u,null,r([{icon:`📦`,value:n(_).dashboard?.finished_product_count||0,label:`成品数量`},{icon:`📊`,value:n(_).dashboard?.total_stock||0,label:`物料库存总量`},{icon:`💰`,value:n(v)(n(_).dashboard?.total_value||0),label:`库存价值`},{icon:`🏭`,value:n(_).dashboard?.supplier_count||0,label:`供应商`},{icon:`👥`,value:n(_).dashboard?.customer_count||0,label:`客户`},{icon:`🏪`,value:n(_).dashboard?.warehouse_count||0,label:`仓库`}],e=>(t(),o(b,{span:8,key:e.label,style:{"margin-bottom":`16px`}},{default:c(()=>[a(y,{shadow:`hover`},{default:c(()=>[s(`div`,p,[s(`span`,m,i(e.icon),1),s(`div`,null,[s(`div`,h,i(e.value),1),s(`div`,g,i(e.label),1)])])]),_:2},1024)]),_:2},1024))),128))]),_:1})}}});export{_ as default}; \ No newline at end of file +import{C as e,D as t,F as n,O as r,R as i,S as a,_ as o,g as s,j as c,k as l,m as u,y as d}from"./index-Dngmm__P.js";import{t as f}from"./useInventory-CrXJ8kdd.js";var p={style:{display:`flex`,"align-items":`center`,gap:`12px`}},m={style:{"font-size":`32px`}},h={style:{"font-size":`24px`,"font-weight":`700`}},g={style:{color:`var(--text-tertiary)`,"font-size":`13px`}},_=e({__name:`DashboardTab`,setup(e){let{state:_,formatCurrency:v}=f();return(e,f)=>{let y=l(`t-card`),b=l(`t-col`),x=l(`t-row`);return t(),o(x,{gutter:16},{default:c(()=>[(t(!0),d(u,null,r([{icon:`📦`,value:n(_).dashboard?.finished_product_count||0,label:`成品数量`},{icon:`📊`,value:n(_).dashboard?.total_stock||0,label:`物料库存总量`},{icon:`💰`,value:n(v)(n(_).dashboard?.total_value||0),label:`库存价值`},{icon:`🏭`,value:n(_).dashboard?.supplier_count||0,label:`供应商`},{icon:`👥`,value:n(_).dashboard?.customer_count||0,label:`客户`},{icon:`🏪`,value:n(_).dashboard?.warehouse_count||0,label:`仓库`}],e=>(t(),o(b,{span:8,key:e.label,style:{"margin-bottom":`16px`}},{default:c(()=>[a(y,{shadow:`hover`},{default:c(()=>[s(`div`,p,[s(`span`,m,i(e.icon),1),s(`div`,null,[s(`div`,h,i(e.value),1),s(`div`,g,i(e.label),1)])])]),_:2},1024)]),_:2},1024))),128))]),_:1})}}});export{_ as default}; \ No newline at end of file diff --git a/static/assets/DesignSystemView-Cz2MAUqc.js b/static/assets/DesignSystemView-ClD2CUze.js similarity index 78% rename from static/assets/DesignSystemView-Cz2MAUqc.js rename to static/assets/DesignSystemView-ClD2CUze.js index fcbef46..b3904fe 100644 --- a/static/assets/DesignSystemView-Cz2MAUqc.js +++ b/static/assets/DesignSystemView-ClD2CUze.js @@ -1 +1 @@ -import{D as e,g as t,n,y as r}from"./index-BoystVy-.js";var i={};function a(n,i){return e(),r(`div`,null,[...i[0]||=[t(`div`,{class:`page-header`},[t(`h1`,{class:`page-title`},`设计体系`),t(`p`,{class:`page-subtitle`},`迁移中...`)],-1)]])}var o=n(i,[[`render`,a]]);export{o as default}; \ No newline at end of file +import{D as e,g as t,n,y as r}from"./index-Dngmm__P.js";var i={};function a(n,i){return e(),r(`div`,null,[...i[0]||=[t(`div`,{class:`page-header`},[t(`h1`,{class:`page-title`},`设计体系`),t(`p`,{class:`page-subtitle`},`迁移中...`)],-1)]])}var o=n(i,[[`render`,a]]);export{o as default}; \ No newline at end of file diff --git a/static/assets/FinanceTab-Bm0yAhLw.js b/static/assets/FinanceTab-C1ObNRfG.js similarity index 98% rename from static/assets/FinanceTab-Bm0yAhLw.js rename to static/assets/FinanceTab-C1ObNRfG.js index 12c841f..82d2040 100644 --- a/static/assets/FinanceTab-Bm0yAhLw.js +++ b/static/assets/FinanceTab-C1ObNRfG.js @@ -1 +1 @@ -import{C as e,D as t,F as n,O as r,P as i,R as a,S as o,T as s,_ as c,g as l,h as u,j as d,k as f,m as p,v as m,x as h,y as g}from"./index-BoystVy-.js";import{t as _}from"./useInventory-C7Zfw7oO.js";var v={style:{"margin-bottom":`16px`,display:`flex`,gap:`12px`,"align-items":`center`,"flex-wrap":`wrap`}},y={style:{"text-align":`center`}},b={style:{"font-size":`24px`,"font-weight":`700`,color:`#409eff`}},x={style:{"text-align":`center`}},S={style:{"font-size":`24px`,"font-weight":`700`,color:`#e6a23c`}},C={style:{"text-align":`center`}},w={style:{"font-size":`24px`,"font-weight":`700`,color:`#67c23a`}},T={style:{"text-align":`center`}},E={style:{"font-size":`24px`,"font-weight":`700`,color:`#f56c6c`}},D=e({__name:`FinanceTab`,setup(e){let{state:D,formatCurrency:O,formatDateTime:k,formatDate:A,loadFinance:j,refreshFinanceByPeriod:M}=_(),N=i(D.financePeriod.year),P=i(D.financePeriod.quarter),F=[{label:`全年`,value:``},{label:`Q1`,value:`1`},{label:`Q2`,value:`2`},{label:`Q3`,value:`3`},{label:`Q4`,value:`4`}],I=u(()=>P.value?`${N.value}年 Q${P.value}`:`${N.value}年 全年`);function L(){D.financePeriod.year=N.value,D.financePeriod.quarter=P.value,j()}s(()=>{L()});let R=u(()=>Number(D.financeSummary?.receivable_total)||0),z=u(()=>Number(D.financeSummary?.payable_total)||0),B=u(()=>Number(D.financeSummary?.period_receipt_total)||0),V=u(()=>Number(D.financeSummary?.period_payment_total)||0);function H(e){return e===`receipt`?`收款`:`付款`}function U(e){return e===`receipt`?`success`:`warning`}function W(e){return{confirmed:`已确认`,pending:`待确认`}[e]||e}return(e,i)=>{let s=f(`t-input-number`),u=f(`t-option`),_=f(`t-select`),k=f(`t-button`),j=f(`t-tag`),M=f(`t-card`),G=f(`t-col`),K=f(`t-row`),q=f(`t-table-column`),J=f(`t-table`),Y=f(`t-empty`);return t(),g(`div`,null,[l(`div`,v,[i[3]||=l(`span`,{style:{"font-weight":`600`}},`统计周期:`,-1),o(s,{modelValue:N.value,"onUpdate:modelValue":i[0]||=e=>N.value=e,min:2020,max:2099,style:{width:`120px`}},null,8,[`modelValue`]),i[4]||=l(`span`,null,`年`,-1),o(_,{modelValue:P.value,"onUpdate:modelValue":i[1]||=e=>P.value=e,placeholder:`选择季度`,style:{width:`120px`}},{default:d(()=>[(t(),g(p,null,r(F,e=>o(u,{key:e.value,label:e.label,value:e.value},null,8,[`label`,`value`])),64))]),_:1},8,[`modelValue`]),o(k,{type:`primary`,onClick:L},{default:d(()=>[...i[2]||=[h(`刷新统计`,-1)]]),_:1}),o(j,{type:`info`,size:`large`},{default:d(()=>[h(a(I.value),1)]),_:1})]),o(K,{gutter:16,style:{"margin-bottom":`16px`}},{default:d(()=>[o(G,{span:6},{default:d(()=>[o(M,{shadow:`hover`},{default:d(()=>[l(`div`,y,[i[5]||=l(`div`,{style:{color:`#909399`,"font-size":`14px`,"margin-bottom":`8px`}},`应收总额`,-1),l(`div`,b,a(n(O)(R.value)),1)])]),_:1})]),_:1}),o(G,{span:6},{default:d(()=>[o(M,{shadow:`hover`},{default:d(()=>[l(`div`,x,[i[6]||=l(`div`,{style:{color:`#909399`,"font-size":`14px`,"margin-bottom":`8px`}},`应付总额`,-1),l(`div`,S,a(n(O)(z.value)),1)])]),_:1})]),_:1}),o(G,{span:6},{default:d(()=>[o(M,{shadow:`hover`},{default:d(()=>[l(`div`,C,[i[7]||=l(`div`,{style:{color:`#909399`,"font-size":`14px`,"margin-bottom":`8px`}},`周期收款`,-1),l(`div`,w,a(n(O)(B.value)),1)])]),_:1})]),_:1}),o(G,{span:6},{default:d(()=>[o(M,{shadow:`hover`},{default:d(()=>[l(`div`,T,[i[8]||=l(`div`,{style:{color:`#909399`,"font-size":`14px`,"margin-bottom":`8px`}},`周期付款`,-1),l(`div`,E,a(n(O)(V.value)),1)])]),_:1})]),_:1})]),_:1}),o(M,{style:{"margin-bottom":`16px`}},{header:d(()=>[...i[9]||=[l(`span`,{style:{"font-weight":`600`}},`客户账款(周期)`,-1)]]),default:d(()=>[o(J,{data:n(D).customerFinanceStatement,loading:n(D).loading,stripe:``,size:`small`},{default:d(()=>[o(q,{prop:`partner_name`,label:`客户`}),o(q,{prop:`order_count`,label:`订单数`}),o(q,{prop:`transaction_count`,label:`流水数`}),o(q,{label:`订单金额`},{default:d(({row:e})=>[h(a(n(O)(e.order_total)),1)]),_:1}),o(q,{label:`订单已收`},{default:d(({row:e})=>[h(a(n(O)(e.settled_total)),1)]),_:1}),o(q,{label:`实收流水`},{default:d(({row:e})=>[h(a(n(O)(e.transaction_total)),1)]),_:1}),o(q,{label:`应收余额`},{default:d(({row:e})=>[h(a(n(O)(e.outstanding_total)),1)]),_:1})]),_:1},8,[`data`,`loading`]),!n(D).loading&&n(D).customerFinanceStatement.length===0?(t(),c(Y,{key:0,description:`暂无数据`})):m(``,!0)]),_:1}),o(M,{style:{"margin-bottom":`16px`}},{header:d(()=>[...i[10]||=[l(`span`,{style:{"font-weight":`600`}},`供应商账款(周期)`,-1)]]),default:d(()=>[o(J,{data:n(D).supplierFinanceStatement,loading:n(D).loading,stripe:``,size:`small`},{default:d(()=>[o(q,{prop:`partner_name`,label:`供应商`}),o(q,{prop:`order_count`,label:`订单数`}),o(q,{prop:`transaction_count`,label:`流水数`}),o(q,{label:`订单金额`},{default:d(({row:e})=>[h(a(n(O)(e.order_total)),1)]),_:1}),o(q,{label:`订单已付`},{default:d(({row:e})=>[h(a(n(O)(e.settled_total)),1)]),_:1}),o(q,{label:`实付流水`},{default:d(({row:e})=>[h(a(n(O)(e.transaction_total)),1)]),_:1}),o(q,{label:`应付余额`},{default:d(({row:e})=>[h(a(n(O)(e.outstanding_total)),1)]),_:1})]),_:1},8,[`data`,`loading`]),!n(D).loading&&n(D).supplierFinanceStatement.length===0?(t(),c(Y,{key:0,description:`暂无数据`})):m(``,!0)]),_:1}),o(M,{style:{"margin-bottom":`16px`}},{header:d(()=>[...i[11]||=[l(`span`,{style:{"font-weight":`600`}},`客户-商品追溯(周期)`,-1)]]),default:d(()=>[o(J,{data:n(D).customerProductStatement,loading:n(D).loading,stripe:``,size:`small`},{default:d(()=>[o(q,{prop:`partner_name`,label:`客户`}),o(q,{prop:`product_sku`,label:`SKU`}),o(q,{prop:`product_name`,label:`商品`}),o(q,{prop:`order_count`,label:`订单数`}),o(q,{prop:`order_quantity`,label:`数量`}),o(q,{label:`订单金额`},{default:d(({row:e})=>[h(a(n(O)(e.order_amount)),1)]),_:1}),o(q,{label:`已结款`},{default:d(({row:e})=>[h(a(n(O)(e.settled_amount)),1)]),_:1}),o(q,{label:`未结款`},{default:d(({row:e})=>[h(a(n(O)(e.outstanding_amount)),1)]),_:1})]),_:1},8,[`data`,`loading`]),!n(D).loading&&n(D).customerProductStatement.length===0?(t(),c(Y,{key:0,description:`暂无数据`})):m(``,!0)]),_:1}),o(M,{style:{"margin-bottom":`16px`}},{header:d(()=>[...i[12]||=[l(`span`,{style:{"font-weight":`600`}},`供应商-商品追溯(周期)`,-1)]]),default:d(()=>[o(J,{data:n(D).supplierProductStatement,loading:n(D).loading,stripe:``,size:`small`},{default:d(()=>[o(q,{prop:`partner_name`,label:`供应商`}),o(q,{prop:`product_sku`,label:`SKU`}),o(q,{prop:`product_name`,label:`商品`}),o(q,{prop:`order_count`,label:`订单数`}),o(q,{prop:`order_quantity`,label:`数量`}),o(q,{label:`订单金额`},{default:d(({row:e})=>[h(a(n(O)(e.order_amount)),1)]),_:1}),o(q,{label:`已结款`},{default:d(({row:e})=>[h(a(n(O)(e.settled_amount)),1)]),_:1}),o(q,{label:`未结款`},{default:d(({row:e})=>[h(a(n(O)(e.outstanding_amount)),1)]),_:1})]),_:1},8,[`data`,`loading`]),!n(D).loading&&n(D).supplierProductStatement.length===0?(t(),c(Y,{key:0,description:`暂无数据`})):m(``,!0)]),_:1}),o(M,null,{header:d(()=>[...i[13]||=[l(`span`,{style:{"font-weight":`600`}},`最近财务流水`,-1)]]),default:d(()=>[o(J,{data:n(D).financeTransactions,loading:n(D).loading,stripe:``,size:`small`},{default:d(()=>[o(q,{prop:`txn_no`,label:`单号`}),o(q,{label:`类型`},{default:d(({row:e})=>[o(j,{type:U(e.txn_type),size:`small`},{default:d(()=>[h(a(H(e.txn_type)),1)]),_:2},1032,[`type`])]),_:1}),o(q,{prop:`partner_name`,label:`往来方`}),o(q,{label:`金额`},{default:d(({row:e})=>[h(a(n(O)(e.amount)),1)]),_:1}),o(q,{label:`状态`},{default:d(({row:e})=>[o(j,{type:e.status===`confirmed`?`success`:`warning`,size:`small`},{default:d(()=>[h(a(W(e.status)),1)]),_:2},1032,[`type`])]),_:1}),o(q,{label:`日期`},{default:d(({row:e})=>[h(a(n(A)(e.txn_date)),1)]),_:1})]),_:1},8,[`data`,`loading`]),!n(D).loading&&n(D).financeTransactions.length===0?(t(),c(Y,{key:0,description:`暂无数据`})):m(``,!0)]),_:1})])}}});export{D as default}; \ No newline at end of file +import{C as e,D as t,F as n,O as r,P as i,R as a,S as o,T as s,_ as c,g as l,h as u,j as d,k as f,m as p,v as m,x as h,y as g}from"./index-Dngmm__P.js";import{t as _}from"./useInventory-CrXJ8kdd.js";var v={style:{"margin-bottom":`16px`,display:`flex`,gap:`12px`,"align-items":`center`,"flex-wrap":`wrap`}},y={style:{"text-align":`center`}},b={style:{"font-size":`24px`,"font-weight":`700`,color:`#409eff`}},x={style:{"text-align":`center`}},S={style:{"font-size":`24px`,"font-weight":`700`,color:`#e6a23c`}},C={style:{"text-align":`center`}},w={style:{"font-size":`24px`,"font-weight":`700`,color:`#67c23a`}},T={style:{"text-align":`center`}},E={style:{"font-size":`24px`,"font-weight":`700`,color:`#f56c6c`}},D=e({__name:`FinanceTab`,setup(e){let{state:D,formatCurrency:O,formatDateTime:k,formatDate:A,loadFinance:j,refreshFinanceByPeriod:M}=_(),N=i(D.financePeriod.year),P=i(D.financePeriod.quarter),F=[{label:`全年`,value:``},{label:`Q1`,value:`1`},{label:`Q2`,value:`2`},{label:`Q3`,value:`3`},{label:`Q4`,value:`4`}],I=u(()=>P.value?`${N.value}年 Q${P.value}`:`${N.value}年 全年`);function L(){D.financePeriod.year=N.value,D.financePeriod.quarter=P.value,j()}s(()=>{L()});let R=u(()=>Number(D.financeSummary?.receivable_total)||0),z=u(()=>Number(D.financeSummary?.payable_total)||0),B=u(()=>Number(D.financeSummary?.period_receipt_total)||0),V=u(()=>Number(D.financeSummary?.period_payment_total)||0);function H(e){return e===`receipt`?`收款`:`付款`}function U(e){return e===`receipt`?`success`:`warning`}function W(e){return{confirmed:`已确认`,pending:`待确认`}[e]||e}return(e,i)=>{let s=f(`t-input-number`),u=f(`t-option`),_=f(`t-select`),k=f(`t-button`),j=f(`t-tag`),M=f(`t-card`),G=f(`t-col`),K=f(`t-row`),q=f(`t-table-column`),J=f(`t-table`),Y=f(`t-empty`);return t(),g(`div`,null,[l(`div`,v,[i[3]||=l(`span`,{style:{"font-weight":`600`}},`统计周期:`,-1),o(s,{modelValue:N.value,"onUpdate:modelValue":i[0]||=e=>N.value=e,min:2020,max:2099,style:{width:`120px`}},null,8,[`modelValue`]),i[4]||=l(`span`,null,`年`,-1),o(_,{modelValue:P.value,"onUpdate:modelValue":i[1]||=e=>P.value=e,placeholder:`选择季度`,style:{width:`120px`}},{default:d(()=>[(t(),g(p,null,r(F,e=>o(u,{key:e.value,label:e.label,value:e.value},null,8,[`label`,`value`])),64))]),_:1},8,[`modelValue`]),o(k,{type:`primary`,onClick:L},{default:d(()=>[...i[2]||=[h(`刷新统计`,-1)]]),_:1}),o(j,{type:`info`,size:`large`},{default:d(()=>[h(a(I.value),1)]),_:1})]),o(K,{gutter:16,style:{"margin-bottom":`16px`}},{default:d(()=>[o(G,{span:6},{default:d(()=>[o(M,{shadow:`hover`},{default:d(()=>[l(`div`,y,[i[5]||=l(`div`,{style:{color:`#909399`,"font-size":`14px`,"margin-bottom":`8px`}},`应收总额`,-1),l(`div`,b,a(n(O)(R.value)),1)])]),_:1})]),_:1}),o(G,{span:6},{default:d(()=>[o(M,{shadow:`hover`},{default:d(()=>[l(`div`,x,[i[6]||=l(`div`,{style:{color:`#909399`,"font-size":`14px`,"margin-bottom":`8px`}},`应付总额`,-1),l(`div`,S,a(n(O)(z.value)),1)])]),_:1})]),_:1}),o(G,{span:6},{default:d(()=>[o(M,{shadow:`hover`},{default:d(()=>[l(`div`,C,[i[7]||=l(`div`,{style:{color:`#909399`,"font-size":`14px`,"margin-bottom":`8px`}},`周期收款`,-1),l(`div`,w,a(n(O)(B.value)),1)])]),_:1})]),_:1}),o(G,{span:6},{default:d(()=>[o(M,{shadow:`hover`},{default:d(()=>[l(`div`,T,[i[8]||=l(`div`,{style:{color:`#909399`,"font-size":`14px`,"margin-bottom":`8px`}},`周期付款`,-1),l(`div`,E,a(n(O)(V.value)),1)])]),_:1})]),_:1})]),_:1}),o(M,{style:{"margin-bottom":`16px`}},{header:d(()=>[...i[9]||=[l(`span`,{style:{"font-weight":`600`}},`客户账款(周期)`,-1)]]),default:d(()=>[o(J,{data:n(D).customerFinanceStatement,loading:n(D).loading,stripe:``,size:`small`},{default:d(()=>[o(q,{prop:`partner_name`,label:`客户`}),o(q,{prop:`order_count`,label:`订单数`}),o(q,{prop:`transaction_count`,label:`流水数`}),o(q,{label:`订单金额`},{default:d(({row:e})=>[h(a(n(O)(e.order_total)),1)]),_:1}),o(q,{label:`订单已收`},{default:d(({row:e})=>[h(a(n(O)(e.settled_total)),1)]),_:1}),o(q,{label:`实收流水`},{default:d(({row:e})=>[h(a(n(O)(e.transaction_total)),1)]),_:1}),o(q,{label:`应收余额`},{default:d(({row:e})=>[h(a(n(O)(e.outstanding_total)),1)]),_:1})]),_:1},8,[`data`,`loading`]),!n(D).loading&&n(D).customerFinanceStatement.length===0?(t(),c(Y,{key:0,description:`暂无数据`})):m(``,!0)]),_:1}),o(M,{style:{"margin-bottom":`16px`}},{header:d(()=>[...i[10]||=[l(`span`,{style:{"font-weight":`600`}},`供应商账款(周期)`,-1)]]),default:d(()=>[o(J,{data:n(D).supplierFinanceStatement,loading:n(D).loading,stripe:``,size:`small`},{default:d(()=>[o(q,{prop:`partner_name`,label:`供应商`}),o(q,{prop:`order_count`,label:`订单数`}),o(q,{prop:`transaction_count`,label:`流水数`}),o(q,{label:`订单金额`},{default:d(({row:e})=>[h(a(n(O)(e.order_total)),1)]),_:1}),o(q,{label:`订单已付`},{default:d(({row:e})=>[h(a(n(O)(e.settled_total)),1)]),_:1}),o(q,{label:`实付流水`},{default:d(({row:e})=>[h(a(n(O)(e.transaction_total)),1)]),_:1}),o(q,{label:`应付余额`},{default:d(({row:e})=>[h(a(n(O)(e.outstanding_total)),1)]),_:1})]),_:1},8,[`data`,`loading`]),!n(D).loading&&n(D).supplierFinanceStatement.length===0?(t(),c(Y,{key:0,description:`暂无数据`})):m(``,!0)]),_:1}),o(M,{style:{"margin-bottom":`16px`}},{header:d(()=>[...i[11]||=[l(`span`,{style:{"font-weight":`600`}},`客户-商品追溯(周期)`,-1)]]),default:d(()=>[o(J,{data:n(D).customerProductStatement,loading:n(D).loading,stripe:``,size:`small`},{default:d(()=>[o(q,{prop:`partner_name`,label:`客户`}),o(q,{prop:`product_sku`,label:`SKU`}),o(q,{prop:`product_name`,label:`商品`}),o(q,{prop:`order_count`,label:`订单数`}),o(q,{prop:`order_quantity`,label:`数量`}),o(q,{label:`订单金额`},{default:d(({row:e})=>[h(a(n(O)(e.order_amount)),1)]),_:1}),o(q,{label:`已结款`},{default:d(({row:e})=>[h(a(n(O)(e.settled_amount)),1)]),_:1}),o(q,{label:`未结款`},{default:d(({row:e})=>[h(a(n(O)(e.outstanding_amount)),1)]),_:1})]),_:1},8,[`data`,`loading`]),!n(D).loading&&n(D).customerProductStatement.length===0?(t(),c(Y,{key:0,description:`暂无数据`})):m(``,!0)]),_:1}),o(M,{style:{"margin-bottom":`16px`}},{header:d(()=>[...i[12]||=[l(`span`,{style:{"font-weight":`600`}},`供应商-商品追溯(周期)`,-1)]]),default:d(()=>[o(J,{data:n(D).supplierProductStatement,loading:n(D).loading,stripe:``,size:`small`},{default:d(()=>[o(q,{prop:`partner_name`,label:`供应商`}),o(q,{prop:`product_sku`,label:`SKU`}),o(q,{prop:`product_name`,label:`商品`}),o(q,{prop:`order_count`,label:`订单数`}),o(q,{prop:`order_quantity`,label:`数量`}),o(q,{label:`订单金额`},{default:d(({row:e})=>[h(a(n(O)(e.order_amount)),1)]),_:1}),o(q,{label:`已结款`},{default:d(({row:e})=>[h(a(n(O)(e.settled_amount)),1)]),_:1}),o(q,{label:`未结款`},{default:d(({row:e})=>[h(a(n(O)(e.outstanding_amount)),1)]),_:1})]),_:1},8,[`data`,`loading`]),!n(D).loading&&n(D).supplierProductStatement.length===0?(t(),c(Y,{key:0,description:`暂无数据`})):m(``,!0)]),_:1}),o(M,null,{header:d(()=>[...i[13]||=[l(`span`,{style:{"font-weight":`600`}},`最近财务流水`,-1)]]),default:d(()=>[o(J,{data:n(D).financeTransactions,loading:n(D).loading,stripe:``,size:`small`},{default:d(()=>[o(q,{prop:`txn_no`,label:`单号`}),o(q,{label:`类型`},{default:d(({row:e})=>[o(j,{type:U(e.txn_type),size:`small`},{default:d(()=>[h(a(H(e.txn_type)),1)]),_:2},1032,[`type`])]),_:1}),o(q,{prop:`partner_name`,label:`往来方`}),o(q,{label:`金额`},{default:d(({row:e})=>[h(a(n(O)(e.amount)),1)]),_:1}),o(q,{label:`状态`},{default:d(({row:e})=>[o(j,{type:e.status===`confirmed`?`success`:`warning`,size:`small`},{default:d(()=>[h(a(W(e.status)),1)]),_:2},1032,[`type`])]),_:1}),o(q,{label:`日期`},{default:d(({row:e})=>[h(a(n(A)(e.txn_date)),1)]),_:1})]),_:1},8,[`data`,`loading`]),!n(D).loading&&n(D).financeTransactions.length===0?(t(),c(Y,{key:0,description:`暂无数据`})):m(``,!0)]),_:1})])}}});export{D as default}; \ No newline at end of file diff --git a/static/assets/HomeView-BRi2I_ia.js b/static/assets/HomeView-C8A0ix5M.js similarity index 99% rename from static/assets/HomeView-BRi2I_ia.js rename to static/assets/HomeView-C8A0ix5M.js index fe181e8..a0f2de0 100644 --- a/static/assets/HomeView-BRi2I_ia.js +++ b/static/assets/HomeView-C8A0ix5M.js @@ -1,3 +1,3 @@ -import{C as e,D as t,F as n,I as r,N as i,P as a,R as o,T as s,g as c,n as l,s as u,u as d,v as f,w as p,x as m,y as h}from"./index-BoystVy-.js";function g(e){return e+.5|0}var _=(e,t,n)=>Math.max(Math.min(e,n),t);function v(e){return _(g(e*2.55),0,255)}function y(e){return _(g(e*255),0,255)}function b(e){return _(g(e/2.55)/100,0,1)}function x(e){return _(g(e*100),0,100)}var S={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},C=[...`0123456789ABCDEF`],w=e=>C[e&15],T=e=>C[(e&240)>>4]+C[e&15],E=e=>(e&240)>>4==(e&15),D=e=>E(e.r)&&E(e.g)&&E(e.b)&&E(e.a);function ee(e){var t=e.length,n;return e[0]===`#`&&(t===4||t===5?n={r:255&S[e[1]]*17,g:255&S[e[2]]*17,b:255&S[e[3]]*17,a:t===5?S[e[4]]*17:255}:(t===7||t===9)&&(n={r:S[e[1]]<<4|S[e[2]],g:S[e[3]]<<4|S[e[4]],b:S[e[5]]<<4|S[e[6]],a:t===9?S[e[7]]<<4|S[e[8]]:255})),n}var O=(e,t)=>e<255?t(e):``;function te(e){var t=D(e)?w:T;return e?`#`+t(e.r)+t(e.g)+t(e.b)+O(e.a,t):void 0}var ne=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function re(e,t,n){let r=t*Math.min(n,1-n),i=(t,i=(t+e/30)%12)=>n-r*Math.max(Math.min(i-3,9-i,1),-1);return[i(0),i(8),i(4)]}function ie(e,t,n){let r=(r,i=(r+e/60)%6)=>n-n*t*Math.max(Math.min(i,4-i,1),0);return[r(5),r(3),r(1)]}function ae(e,t,n){let r=re(e,1,.5),i;for(t+n>1&&(i=1/(t+n),t*=i,n*=i),i=0;i<3;i++)r[i]*=1-t-n,r[i]+=t;return r}function oe(e,t,n,r,i){return e===i?(t-n)/r+(t.5?l/(2-i-a):l/(i+a),s=oe(t,n,r,l,i),s=s*60+.5),[s|0,c||0,o]}function ce(e,t,n,r){return(Array.isArray(t)?e(t[0],t[1],t[2]):e(t,n,r)).map(y)}function le(e,t,n){return ce(re,e,t,n)}function ue(e,t,n){return ce(ae,e,t,n)}function de(e,t,n){return ce(ie,e,t,n)}function fe(e){return(e%360+360)%360}function pe(e){let t=ne.exec(e),n=255,r;if(!t)return;t[5]!==r&&(n=t[6]?v(+t[5]):y(+t[5]));let i=fe(+t[2]),a=t[3]/100,o=t[4]/100;return r=t[1]===`hwb`?ue(i,a,o):t[1]===`hsv`?de(i,a,o):le(i,a,o),{r:r[0],g:r[1],b:r[2],a:n}}function me(e,t){var n=se(e);n[0]=fe(n[0]+t),n=le(n),e.r=n[0],e.g=n[1],e.b=n[2]}function he(e){if(!e)return;let t=se(e),n=t[0],r=x(t[1]),i=x(t[2]);return e.a<255?`hsla(${n}, ${r}%, ${i}%, ${b(e.a)})`:`hsl(${n}, ${r}%, ${i}%)`}var ge={x:`dark`,Z:`light`,Y:`re`,X:`blu`,W:`gr`,V:`medium`,U:`slate`,A:`ee`,T:`ol`,S:`or`,B:`ra`,C:`lateg`,D:`ights`,R:`in`,Q:`turquois`,E:`hi`,P:`ro`,O:`al`,N:`le`,M:`de`,L:`yello`,F:`en`,K:`ch`,G:`arks`,H:`ea`,I:`ightg`,J:`wh`},_e={OiceXe:`f0f8ff`,antiquewEte:`faebd7`,aqua:`ffff`,aquamarRe:`7fffd4`,azuY:`f0ffff`,beige:`f5f5dc`,bisque:`ffe4c4`,black:`0`,blanKedOmond:`ffebcd`,Xe:`ff`,XeviTet:`8a2be2`,bPwn:`a52a2a`,burlywood:`deb887`,caMtXe:`5f9ea0`,KartYuse:`7fff00`,KocTate:`d2691e`,cSO:`ff7f50`,cSnflowerXe:`6495ed`,cSnsilk:`fff8dc`,crimson:`dc143c`,cyan:`ffff`,xXe:`8b`,xcyan:`8b8b`,xgTMnPd:`b8860b`,xWay:`a9a9a9`,xgYF:`6400`,xgYy:`a9a9a9`,xkhaki:`bdb76b`,xmagFta:`8b008b`,xTivegYF:`556b2f`,xSange:`ff8c00`,xScEd:`9932cc`,xYd:`8b0000`,xsOmon:`e9967a`,xsHgYF:`8fbc8f`,xUXe:`483d8b`,xUWay:`2f4f4f`,xUgYy:`2f4f4f`,xQe:`ced1`,xviTet:`9400d3`,dAppRk:`ff1493`,dApskyXe:`bfff`,dimWay:`696969`,dimgYy:`696969`,dodgerXe:`1e90ff`,fiYbrick:`b22222`,flSOwEte:`fffaf0`,foYstWAn:`228b22`,fuKsia:`ff00ff`,gaRsbSo:`dcdcdc`,ghostwEte:`f8f8ff`,gTd:`ffd700`,gTMnPd:`daa520`,Way:`808080`,gYF:`8000`,gYFLw:`adff2f`,gYy:`808080`,honeyMw:`f0fff0`,hotpRk:`ff69b4`,RdianYd:`cd5c5c`,Rdigo:`4b0082`,ivSy:`fffff0`,khaki:`f0e68c`,lavFMr:`e6e6fa`,lavFMrXsh:`fff0f5`,lawngYF:`7cfc00`,NmoncEffon:`fffacd`,ZXe:`add8e6`,ZcSO:`f08080`,Zcyan:`e0ffff`,ZgTMnPdLw:`fafad2`,ZWay:`d3d3d3`,ZgYF:`90ee90`,ZgYy:`d3d3d3`,ZpRk:`ffb6c1`,ZsOmon:`ffa07a`,ZsHgYF:`20b2aa`,ZskyXe:`87cefa`,ZUWay:`778899`,ZUgYy:`778899`,ZstAlXe:`b0c4de`,ZLw:`ffffe0`,lime:`ff00`,limegYF:`32cd32`,lRF:`faf0e6`,magFta:`ff00ff`,maPon:`800000`,VaquamarRe:`66cdaa`,VXe:`cd`,VScEd:`ba55d3`,VpurpN:`9370db`,VsHgYF:`3cb371`,VUXe:`7b68ee`,VsprRggYF:`fa9a`,VQe:`48d1cc`,VviTetYd:`c71585`,midnightXe:`191970`,mRtcYam:`f5fffa`,mistyPse:`ffe4e1`,moccasR:`ffe4b5`,navajowEte:`ffdead`,navy:`80`,Tdlace:`fdf5e6`,Tive:`808000`,TivedBb:`6b8e23`,Sange:`ffa500`,SangeYd:`ff4500`,ScEd:`da70d6`,pOegTMnPd:`eee8aa`,pOegYF:`98fb98`,pOeQe:`afeeee`,pOeviTetYd:`db7093`,papayawEp:`ffefd5`,pHKpuff:`ffdab9`,peru:`cd853f`,pRk:`ffc0cb`,plum:`dda0dd`,powMrXe:`b0e0e6`,purpN:`800080`,YbeccapurpN:`663399`,Yd:`ff0000`,Psybrown:`bc8f8f`,PyOXe:`4169e1`,saddNbPwn:`8b4513`,sOmon:`fa8072`,sandybPwn:`f4a460`,sHgYF:`2e8b57`,sHshell:`fff5ee`,siFna:`a0522d`,silver:`c0c0c0`,skyXe:`87ceeb`,UXe:`6a5acd`,UWay:`708090`,UgYy:`708090`,snow:`fffafa`,sprRggYF:`ff7f`,stAlXe:`4682b4`,tan:`d2b48c`,teO:`8080`,tEstN:`d8bfd8`,tomato:`ff6347`,Qe:`40e0d0`,viTet:`ee82ee`,JHt:`f5deb3`,wEte:`ffffff`,wEtesmoke:`f5f5f5`,Lw:`ffff00`,LwgYF:`9acd32`};function ve(){let e={},t=Object.keys(_e),n=Object.keys(ge),r,i,a,o,s;for(r=0;r>16&255,a>>8&255,a&255]}return e}var ye;function be(e){ye||(ye=ve(),ye.transparent=[0,0,0,0]);let t=ye[e.toLowerCase()];return t&&{r:t[0],g:t[1],b:t[2],a:t.length===4?t[3]:255}}var xe=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function Se(e){let t=xe.exec(e),n=255,r,i,a;if(t){if(t[7]!==r){let e=+t[7];n=t[8]?v(e):_(e*255,0,255)}return r=+t[1],i=+t[3],a=+t[5],r=255&(t[2]?v(r):_(r,0,255)),i=255&(t[4]?v(i):_(i,0,255)),a=255&(t[6]?v(a):_(a,0,255)),{r,g:i,b:a,a:n}}}function Ce(e){return e&&(e.a<255?`rgba(${e.r}, ${e.g}, ${e.b}, ${b(e.a)})`:`rgb(${e.r}, ${e.g}, ${e.b})`)}var we=e=>e<=.0031308?e*12.92:e**(1/2.4)*1.055-.055,Te=e=>e<=.04045?e/12.92:((e+.055)/1.055)**2.4;function Ee(e,t,n){let r=Te(b(e.r)),i=Te(b(e.g)),a=Te(b(e.b));return{r:y(we(r+n*(Te(b(t.r))-r))),g:y(we(i+n*(Te(b(t.g))-i))),b:y(we(a+n*(Te(b(t.b))-a))),a:e.a+n*(t.a-e.a)}}function De(e,t,n){if(e){let r=se(e);r[t]=Math.max(0,Math.min(r[t]+r[t]*n,t===0?360:1)),r=le(r),e.r=r[0],e.g=r[1],e.b=r[2]}}function Oe(e,t){return e&&Object.assign(t||{},e)}function ke(e){var t={r:0,g:0,b:0,a:255};return Array.isArray(e)?e.length>=3&&(t={r:e[0],g:e[1],b:e[2],a:255},e.length>3&&(t.a=y(e[3]))):(t=Oe(e,{r:0,g:0,b:0,a:1}),t.a=y(t.a)),t}function Ae(e){return e.charAt(0)===`r`?Se(e):pe(e)}var je=class e{constructor(t){if(t instanceof e)return t;let n=typeof t,r;n===`object`?r=ke(t):n===`string`&&(r=ee(t)||be(t)||Ae(t)),this._rgb=r,this._valid=!!r}get valid(){return this._valid}get rgb(){var e=Oe(this._rgb);return e&&(e.a=b(e.a)),e}set rgb(e){this._rgb=ke(e)}rgbString(){return this._valid?Ce(this._rgb):void 0}hexString(){return this._valid?te(this._rgb):void 0}hslString(){return this._valid?he(this._rgb):void 0}mix(e,t){if(e){let n=this.rgb,r=e.rgb,i,a=t===i?.5:t,o=2*a-1,s=n.a-r.a,c=((o*s===-1?o:(o+s)/(1+o*s))+1)/2;i=1-c,n.r=255&c*n.r+i*r.r+.5,n.g=255&c*n.g+i*r.g+.5,n.b=255&c*n.b+i*r.b+.5,n.a=a*n.a+(1-a)*r.a,this.rgb=n}return this}interpolate(e,t){return e&&(this._rgb=Ee(this._rgb,e._rgb,t)),this}clone(){return new e(this.rgb)}alpha(e){return this._rgb.a=y(e),this}clearer(e){let t=this._rgb;return t.a*=1-e,this}greyscale(){let e=this._rgb;return e.r=e.g=e.b=g(e.r*.3+e.g*.59+e.b*.11),this}opaquer(e){let t=this._rgb;return t.a*=1+e,this}negate(){let e=this._rgb;return e.r=255-e.r,e.g=255-e.g,e.b=255-e.b,this}lighten(e){return De(this._rgb,2,e),this}darken(e){return De(this._rgb,2,-e),this}saturate(e){return De(this._rgb,1,e),this}desaturate(e){return De(this._rgb,1,-e),this}rotate(e){return me(this._rgb,e),this}};function Me(){}var Ne=(()=>{let e=0;return()=>e++})();function k(e){return e==null}function A(e){if(Array.isArray&&Array.isArray(e))return!0;let t=Object.prototype.toString.call(e);return t.slice(0,7)===`[object`&&t.slice(-6)===`Array]`}function j(e){return e!==null&&Object.prototype.toString.call(e)===`[object Object]`}function M(e){return(typeof e==`number`||e instanceof Number)&&isFinite(+e)}function N(e,t){return M(e)?e:t}function P(e,t){return e===void 0?t:e}var Pe=(e,t)=>typeof e==`string`&&e.endsWith(`%`)?parseFloat(e)/100:+e/t,Fe=(e,t)=>typeof e==`string`&&e.endsWith(`%`)?parseFloat(e)/100*t:+e;function F(e,t,n){if(e&&typeof e.call==`function`)return e.apply(n,t)}function I(e,t,n,r){let i,a,o;if(A(e))if(a=e.length,r)for(i=a-1;i>=0;i--)t.call(n,e[i],i);else for(i=0;ie,x:e=>e.x,y:e=>e.y};function We(e){let t=e.split(`.`),n=[],r=``;for(let e of t)r+=e,r.endsWith(`\\`)?r=r.slice(0,-1)+`.`:(n.push(r),r=``);return n}function Ge(e){let t=We(e);return e=>{for(let n of t){if(n===``)break;e&&=e[n]}return e}}function Ke(e,t){return(Ue[t]||(Ue[t]=Ge(t)))(e)}function qe(e){return e.charAt(0).toUpperCase()+e.slice(1)}var Je=e=>e!==void 0,Ye=e=>typeof e==`function`,Xe=(e,t)=>{if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0};function Ze(e){return e.type===`mouseup`||e.type===`click`||e.type===`contextmenu`}var L=Math.PI,R=2*L,Qe=R+L,$e=1/0,et=L/180,z=L/2,tt=L/4,nt=L*2/3,rt=Math.log10,B=Math.sign;function it(e,t,n){return Math.abs(e-t)e-t).pop(),t}function st(e){return typeof e==`symbol`||typeof e==`object`&&!!e&&!(Symbol.toPrimitive in e||`toString`in e||`valueOf`in e)}function ct(e){return!st(e)&&!isNaN(parseFloat(e))&&isFinite(e)}function lt(e,t){let n=Math.round(e);return n-t<=e&&n+t>=e}function ut(e,t,n){let r,i,a;for(r=0,i=e.length;rc&&l=Math.min(t,n)-r&&e<=Math.max(t,n)+r}function vt(e,t,n){n||=(n=>e[n]1;)a=i+r>>1,n(a)?i=a:r=a;return{lo:i,hi:r}}var yt=(e,t,n,r)=>vt(e,n,r?r=>{let i=e[r][t];return ie[r][t]vt(e,n,r=>e[r][t]>=n);function xt(e,t,n){let r=0,i=e.length;for(;rr&&e[i-1]>n;)i--;return r>0||i{let n=`_onData`+qe(t),r=e[t];Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value(...t){let i=r.apply(this,t);return e._chartjs.listeners.forEach(e=>{typeof e[n]==`function`&&e[n](...t)}),i}})})}function wt(e,t){let n=e._chartjs;if(!n)return;let r=n.listeners,i=r.indexOf(t);i!==-1&&r.splice(i,1),!(r.length>0)&&(St.forEach(t=>{delete e[t]}),delete e._chartjs)}function Tt(e){let t=new Set(e);return t.size===e.length?e:Array.from(t)}var Et=function(){return typeof window>`u`?function(e){return e()}:window.requestAnimationFrame}();function Dt(e,t){let n=[],r=!1;return function(...i){n=i,r||(r=!0,Et.call(window,()=>{r=!1,e.apply(t,n)}))}}function Ot(e,t){let n;return function(...r){return t?(clearTimeout(n),n=setTimeout(e,t,r)):e.apply(this,r),t}}var kt=e=>e===`start`?`left`:e===`end`?`right`:`center`,G=(e,t,n)=>e===`start`?t:e===`end`?n:(t+n)/2,At=(e,t,n,r)=>e===(r?`left`:`right`)?n:e===`center`?(t+n)/2:t;function jt(e,t,n){let r=t.length,i=0,a=r;if(e._sorted){let{iScale:o,vScale:s,_parsed:c}=e,l=e.dataset&&e.dataset.options?e.dataset.options.spanGaps:null,u=o.axis,{min:d,max:f,minDefined:p,maxDefined:m}=o.getUserBounds();if(p){if(i=Math.min(yt(c,u,d).lo,n?r:yt(t,u,o.getPixelForValue(d)).lo),l){let e=c.slice(0,i+1).reverse().findIndex(e=>!k(e[s.axis]));i-=Math.max(0,e)}i=U(i,0,r-1)}if(m){let e=Math.max(yt(c,o.axis,f,!0).hi+1,n?0:yt(t,u,o.getPixelForValue(f),!0).hi+1);if(l){let t=c.slice(e-1).findIndex(e=>!k(e[s.axis]));e+=Math.max(0,t)}a=U(e,i,r)-i}else a=r-i}return{start:i,count:a}}function Mt(e){let{xScale:t,yScale:n,_scaleRanges:r}=e,i={xmin:t.min,xmax:t.max,ymin:n.min,ymax:n.max};if(!r)return e._scaleRanges=i,!0;let a=r.xmin!==t.min||r.xmax!==t.max||r.ymin!==n.min||r.ymax!==n.max;return Object.assign(r,i),a}var Nt=e=>e===0||e===1,Pt=(e,t,n)=>-(2**(10*--e)*Math.sin((e-t)*R/n)),Ft=(e,t,n)=>2**(-10*e)*Math.sin((e-t)*R/n)+1,It={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>-e*(e-2),easeInOutQuad:e=>(e/=.5)<1?.5*e*e:-.5*(--e*(e-2)-1),easeInCubic:e=>e*e*e,easeOutCubic:e=>--e*e*e+1,easeInOutCubic:e=>(e/=.5)<1?.5*e*e*e:.5*((e-=2)*e*e+2),easeInQuart:e=>e*e*e*e,easeOutQuart:e=>-(--e*e*e*e-1),easeInOutQuart:e=>(e/=.5)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2),easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>--e*e*e*e*e+1,easeInOutQuint:e=>(e/=.5)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2),easeInSine:e=>-Math.cos(e*z)+1,easeOutSine:e=>Math.sin(e*z),easeInOutSine:e=>-.5*(Math.cos(L*e)-1),easeInExpo:e=>e===0?0:2**(10*(e-1)),easeOutExpo:e=>e===1?1:-(2**(-10*e))+1,easeInOutExpo:e=>Nt(e)?e:e<.5?.5*2**(10*(e*2-1)):.5*(-(2**(-10*(e*2-1)))+2),easeInCirc:e=>e>=1?e:-(Math.sqrt(1-e*e)-1),easeOutCirc:e=>Math.sqrt(1- --e*e),easeInOutCirc:e=>(e/=.5)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1),easeInElastic:e=>Nt(e)?e:Pt(e,.075,.3),easeOutElastic:e=>Nt(e)?e:Ft(e,.075,.3),easeInOutElastic(e){let t=.1125,n=.45;return Nt(e)?e:e<.5?.5*Pt(e*2,t,n):.5+.5*Ft(e*2-1,t,n)},easeInBack(e){return e*e*(2.70158*e-1.70158)},easeOutBack(e){return--e*e*(2.70158*e+1.70158)+1},easeInOutBack(e){let t=1.70158;return(e/=.5)<1?.5*(e*e*(((t*=1.525)+1)*e-t)):.5*((e-=2)*e*(((t*=1.525)+1)*e+t)+2)},easeInBounce:e=>1-It.easeOutBounce(1-e),easeOutBounce(e){let t=7.5625,n=2.75;return e<1/n?t*e*e:e<2/n?t*(e-=1.5/n)*e+.75:e<2.5/n?t*(e-=2.25/n)*e+.9375:t*(e-=2.625/n)*e+.984375},easeInOutBounce:e=>e<.5?It.easeInBounce(e*2)*.5:It.easeOutBounce(e*2-1)*.5+.5};function Lt(e){if(e&&typeof e==`object`){let t=e.toString();return t===`[object CanvasPattern]`||t===`[object CanvasGradient]`}return!1}function Rt(e){return Lt(e)?e:new je(e)}function zt(e){return Lt(e)?e:new je(e).saturate(.5).darken(.1).hexString()}var Bt=[`x`,`y`,`borderWidth`,`radius`,`tension`],Vt=[`color`,`borderColor`,`backgroundColor`];function Ht(e){e.set(`animation`,{delay:void 0,duration:1e3,easing:`easeOutQuart`,fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),e.describe(`animation`,{_fallback:!1,_indexable:!1,_scriptable:e=>e!==`onProgress`&&e!==`onComplete`&&e!==`fn`}),e.set(`animations`,{colors:{type:`color`,properties:Vt},numbers:{type:`number`,properties:Bt}}),e.describe(`animations`,{_fallback:`animation`}),e.set(`transitions`,{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:`transparent`},visible:{type:`boolean`,duration:0}}},hide:{animations:{colors:{to:`transparent`},visible:{type:`boolean`,easing:`linear`,fn:e=>e|0}}}})}function Ut(e){e.set(`layout`,{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}var Wt=new Map;function Gt(e,t){t||={};let n=e+JSON.stringify(t),r=Wt.get(n);return r||(r=new Intl.NumberFormat(e,t),Wt.set(n,r)),r}function Kt(e,t,n){return Gt(t,n).format(e)}var qt={values(e){return A(e)?e:``+e},numeric(e,t,n){if(e===0)return`0`;let r=this.chart.options.locale,i,a=e;if(n.length>1){let t=Math.max(Math.abs(n[0].value),Math.abs(n[n.length-1].value));(t<1e-4||t>0x38d7ea4c68000)&&(i=`scientific`),a=Jt(e,n)}let o=rt(Math.abs(a)),s=isNaN(o)?1:Math.max(Math.min(-1*Math.floor(o),20),0),c={notation:i,minimumFractionDigits:s,maximumFractionDigits:s};return Object.assign(c,this.options.ticks.format),Kt(e,r,c)},logarithmic(e,t,n){if(e===0)return`0`;let r=n[t].significand||e/10**Math.floor(rt(e));return[1,2,3,5,10,15].includes(r)||t>.8*n.length?qt.numeric.call(this,e,t,n):``}};function Jt(e,t){let n=t.length>3?t[2].value-t[1].value:t[1].value-t[0].value;return Math.abs(n)>=1&&e!==Math.floor(e)&&(n=e-Math.floor(e)),n}var Yt={formatters:qt};function Xt(e){e.set(`scale`,{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:`ticks`,clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(e,t)=>t.lineWidth,tickColor:(e,t)=>t.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:``,padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:``,padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:Yt.formatters.values,minor:{},major:{},align:`center`,crossAlign:`near`,showLabelBackdrop:!1,backdropColor:`rgba(255, 255, 255, 0.75)`,backdropPadding:2}}),e.route(`scale.ticks`,`color`,``,`color`),e.route(`scale.grid`,`color`,``,`borderColor`),e.route(`scale.border`,`color`,``,`borderColor`),e.route(`scale.title`,`color`,``,`color`),e.describe(`scale`,{_fallback:!1,_scriptable:e=>!e.startsWith(`before`)&&!e.startsWith(`after`)&&e!==`callback`&&e!==`parser`,_indexable:e=>e!==`borderDash`&&e!==`tickBorderDash`&&e!==`dash`}),e.describe(`scales`,{_fallback:`scale`}),e.describe(`scale.ticks`,{_scriptable:e=>e!==`backdropPadding`&&e!==`callback`,_indexable:e=>e!==`backdropPadding`})}var Zt=Object.create(null),Qt=Object.create(null);function $t(e,t){if(!t)return e;let n=t.split(`.`);for(let t=0,r=n.length;te.chart.platform.getDevicePixelRatio(),this.elements={},this.events=[`mousemove`,`mouseout`,`click`,`touchstart`,`touchmove`],this.font={family:`'Helvetica Neue', 'Helvetica', 'Arial', sans-serif`,size:12,style:`normal`,lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(e,t)=>zt(t.backgroundColor),this.hoverBorderColor=(e,t)=>zt(t.borderColor),this.hoverColor=(e,t)=>zt(t.color),this.indexAxis=`x`,this.interaction={mode:`nearest`,intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(e),this.apply(t)}set(e,t){return en(this,e,t)}get(e){return $t(this,e)}describe(e,t){return en(Qt,e,t)}override(e,t){return en(Zt,e,t)}route(e,t,n,r){let i=$t(this,e),a=$t(this,n),o=`_`+t;Object.defineProperties(i,{[o]:{value:i[t],writable:!0},[t]:{enumerable:!0,get(){let e=this[o],t=a[r];return j(e)?Object.assign({},t,e):P(e,t)},set(e){this[o]=e}}})}apply(e){e.forEach(e=>e(this))}}({_scriptable:e=>!e.startsWith(`on`),_indexable:e=>e!==`events`,hover:{_fallback:`interaction`},interaction:{_scriptable:!1,_indexable:!1}},[Ht,Ut,Xt]);function tn(e){return!e||k(e.size)||k(e.family)?null:(e.style?e.style+` `:``)+(e.weight?e.weight+` `:``)+e.size+`px `+e.family}function nn(e,t,n,r,i){let a=t[i];return a||(a=t[i]=e.measureText(i).width,n.push(i)),a>r&&(r=a),r}function rn(e,t,n,r){r||={};let i=r.data=r.data||{},a=r.garbageCollect=r.garbageCollect||[];r.font!==t&&(i=r.data={},a=r.garbageCollect=[],r.font=t),e.save(),e.font=t;let o=0,s=n.length,c,l,u,d,f;for(c=0;cn.length){for(c=0;c0&&e.stroke()}}function ln(e,t,n){return n||=.5,!t||e&&e.x>t.left-n&&e.xt.top-n&&e.y0&&a.strokeColor!==``,c,l;for(e.save(),e.font=i.string,mn(e,a),c=0;c+e||0;function Cn(e,t){let n={},r=j(t),i=r?Object.keys(t):t,a=j(e)?r?n=>P(e[n],e[t[n]]):t=>e[t]:()=>e;for(let e of i)n[e]=Sn(a(e));return n}function wn(e){return Cn(e,{top:`y`,right:`x`,bottom:`y`,left:`x`})}function Tn(e){return Cn(e,[`topLeft`,`topRight`,`bottomLeft`,`bottomRight`])}function q(e){let t=wn(e);return t.width=t.left+t.right,t.height=t.top+t.bottom,t}function J(e,t){e||={},t||=K.font;let n=P(e.size,t.size);typeof n==`string`&&(n=parseInt(n,10));let r=P(e.style,t.style);r&&!(``+r).match(bn)&&(console.warn(`Invalid font style specified: "`+r+`"`),r=void 0);let i={family:P(e.family,t.family),lineHeight:xn(P(e.lineHeight,t.lineHeight),n),size:n,style:r,weight:P(e.weight,t.weight),string:``};return i.string=tn(i),i}function En(e,t,n,r){let i=!0,a,o,s;for(a=0,o=e.length;an&&e===0?0:e+t;return{min:o(r,-Math.abs(a)),max:o(i,a)}}function On(e,t){return Object.assign(Object.create(e),t)}function kn(e,t=[``],n,r,i=()=>e[0]){let a=n||e;return r===void 0&&(r=Gn(`_fallback`,e)),new Proxy({[Symbol.toStringTag]:`Object`,_cacheable:!0,_scopes:e,_rootScopes:a,_fallback:r,_getTarget:i,override:n=>kn([n,...e],t,a,r)},{deleteProperty(t,n){return delete t[n],delete t._keys,delete e[0][n],!0},get(n,r){return Pn(n,r,()=>Wn(r,t,e,n))},getOwnPropertyDescriptor(e,t){return Reflect.getOwnPropertyDescriptor(e._scopes[0],t)},getPrototypeOf(){return Reflect.getPrototypeOf(e[0])},has(e,t){return Kn(e).includes(t)},ownKeys(e){return Kn(e)},set(e,t,n){let r=e._storage||=i();return e[t]=r[t]=n,delete e._keys,!0}})}function An(e,t,n,r){let i={_cacheable:!1,_proxy:e,_context:t,_subProxy:n,_stack:new Set,_descriptors:jn(e,r),setContext:t=>An(e,t,n,r),override:i=>An(e.override(i),t,n,r)};return new Proxy(i,{deleteProperty(t,n){return delete t[n],delete e[n],!0},get(e,t,n){return Pn(e,t,()=>Fn(e,t,n))},getOwnPropertyDescriptor(t,n){return t._descriptors.allKeys?Reflect.has(e,n)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(e,n)},getPrototypeOf(){return Reflect.getPrototypeOf(e)},has(t,n){return Reflect.has(e,n)},ownKeys(){return Reflect.ownKeys(e)},set(t,n,r){return e[n]=r,delete t[n],!0}})}function jn(e,t={scriptable:!0,indexable:!0}){let{_scriptable:n=t.scriptable,_indexable:r=t.indexable,_allKeys:i=t.allKeys}=e;return{allKeys:i,scriptable:n,indexable:r,isScriptable:Ye(n)?n:()=>n,isIndexable:Ye(r)?r:()=>r}}var Mn=(e,t)=>e?e+qe(t):t,Nn=(e,t)=>j(t)&&e!==`adapters`&&(Object.getPrototypeOf(t)===null||t.constructor===Object);function Pn(e,t,n){if(Object.prototype.hasOwnProperty.call(e,t)||t===`constructor`)return e[t];let r=n();return e[t]=r,r}function Fn(e,t,n){let{_proxy:r,_context:i,_subProxy:a,_descriptors:o}=e,s=r[t];return Ye(s)&&o.isScriptable(t)&&(s=In(t,s,e,n)),A(s)&&s.length&&(s=Ln(t,s,e,o.isIndexable)),Nn(t,s)&&(s=An(s,i,a&&a[t],o)),s}function In(e,t,n,r){let{_proxy:i,_context:a,_subProxy:o,_stack:s}=n;if(s.has(e))throw Error(`Recursion detected: `+Array.from(s).join(`->`)+`->`+e);s.add(e);let c=t(a,o||r);return s.delete(e),Nn(e,c)&&(c=Vn(i._scopes,i,e,c)),c}function Ln(e,t,n,r){let{_proxy:i,_context:a,_subProxy:o,_descriptors:s}=n;if(a.index!==void 0&&r(e))return t[a.index%t.length];if(j(t[0])){let n=t,r=i._scopes.filter(e=>e!==n);t=[];for(let c of n){let n=Vn(r,i,e,c);t.push(An(n,a,o&&o[e],s))}}return t}function Rn(e,t,n){return Ye(e)?e(t,n):e}var zn=(e,t)=>e===!0?t:typeof e==`string`?Ke(t,e):void 0;function Bn(e,t,n,r,i){for(let a of t){let t=zn(n,a);if(t){e.add(t);let a=Rn(t._fallback,n,i);if(a!==void 0&&a!==n&&a!==r)return a}else if(t===!1&&r!==void 0&&n!==r)return null}return!1}function Vn(e,t,n,r){let i=t._rootScopes,a=Rn(t._fallback,n,r),o=[...e,...i],s=new Set;s.add(r);let c=Hn(s,o,n,a||n,r);return c===null||a!==void 0&&a!==n&&(c=Hn(s,o,a,c,r),c===null)?!1:kn(Array.from(s),[``],i,a,()=>Un(t,n,r))}function Hn(e,t,n,r,i){for(;n;)n=Bn(e,t,n,r,i);return n}function Un(e,t,n){let r=e._getTarget();t in r||(r[t]={});let i=r[t];return A(i)&&j(n)?n:i||{}}function Wn(e,t,n,r){let i;for(let a of t)if(i=Gn(Mn(a,e),n),i!==void 0)return Nn(e,i)?Vn(n,r,e,i):i}function Gn(e,t){for(let n of t){if(!n)continue;let t=n[e];if(t!==void 0)return t}}function Kn(e){let t=e._keys;return t||=e._keys=qn(e._scopes),t}function qn(e){let t=new Set;for(let n of e)for(let e of Object.keys(n).filter(e=>!e.startsWith(`_`)))t.add(e);return Array.from(t)}function Jn(e,t,n,r){let{iScale:i}=e,{key:a=`r`}=this._parsing,o=Array(r),s,c,l,u;for(s=0,c=r;ste===`x`?`y`:`x`;function Qn(e,t,n,r){let i=e.skip?t:e,a=t,o=n.skip?t:n,s=mt(a,i),c=mt(o,a),l=s/(s+c),u=c/(s+c);l=isNaN(l)?0:l,u=isNaN(u)?0:u;let d=r*l,f=r*u;return{previous:{x:a.x-d*(o.x-i.x),y:a.y-d*(o.y-i.y)},next:{x:a.x+f*(o.x-i.x),y:a.y+f*(o.y-i.y)}}}function $n(e,t,n){let r=e.length,i,a,o,s,c,l=Xn(e,0);for(let u=0;u!e.skip)),t.cubicInterpolationMode===`monotone`)tr(e,i);else{let n=r?e[e.length-1]:e[0];for(a=0,o=e.length;ae.ownerDocument.defaultView.getComputedStyle(e,null);function lr(e,t){return cr(e).getPropertyValue(t)}var ur=[`top`,`right`,`bottom`,`left`];function dr(e,t,n){let r={};n=n?`-`+n:``;for(let i=0;i<4;i++){let a=ur[i];r[a]=parseFloat(e[t+`-`+a+n])||0}return r.width=r.left+r.right,r.height=r.top+r.bottom,r}var fr=(e,t,n)=>(e>0||t>0)&&(!n||!n.shadowRoot);function pr(e,t){let n=e.touches,r=n&&n.length?n[0]:e,{offsetX:i,offsetY:a}=r,o=!1,s,c;if(fr(i,a,e.target))s=i,c=a;else{let e=t.getBoundingClientRect();s=r.clientX-e.left,c=r.clientY-e.top,o=!0}return{x:s,y:c,box:o}}function mr(e,t){if(`native`in e)return e;let{canvas:n,currentDevicePixelRatio:r}=t,i=cr(n),a=i.boxSizing===`border-box`,o=dr(i,`padding`),s=dr(i,`border`,`width`),{x:c,y:l,box:u}=pr(e,n),d=o.left+(u&&s.left),f=o.top+(u&&s.top),{width:p,height:m}=t;return a&&(p-=o.width+s.width,m-=o.height+s.height),{x:Math.round((c-d)/p*n.width/r),y:Math.round((l-f)/m*n.height/r)}}function hr(e,t,n){let r,i;if(t===void 0||n===void 0){let a=e&&or(e);if(!a)t=e.clientWidth,n=e.clientHeight;else{let e=a.getBoundingClientRect(),o=cr(a),s=dr(o,`border`,`width`),c=dr(o,`padding`);t=e.width-c.width-s.width,n=e.height-c.height-s.height,r=sr(o.maxWidth,a,`clientWidth`),i=sr(o.maxHeight,a,`clientHeight`)}}return{width:t,height:n,maxWidth:r||$e,maxHeight:i||$e}}var gr=e=>Math.round(e*10)/10;function _r(e,t,n,r){let i=cr(e),a=dr(i,`margin`),o=sr(i.maxWidth,e,`clientWidth`)||$e,s=sr(i.maxHeight,e,`clientHeight`)||$e,c=hr(e,t,n),{width:l,height:u}=c;if(i.boxSizing===`content-box`){let e=dr(i,`border`,`width`),t=dr(i,`padding`);l-=t.width+e.width,u-=t.height+e.height}return l=Math.max(0,l-a.width),u=Math.max(0,r?l/r:u-a.height),l=gr(Math.min(l,o,c.maxWidth)),u=gr(Math.min(u,s,c.maxHeight)),l&&!u&&(u=gr(l/2)),(t!==void 0||n!==void 0)&&r&&c.height&&u>c.height&&(u=c.height,l=gr(Math.floor(u*r))),{width:l,height:u}}function vr(e,t,n){let r=t||1,i=gr(e.height*r),a=gr(e.width*r);e.height=gr(e.height),e.width=gr(e.width);let o=e.canvas;return o.style&&(n||!o.style.height&&!o.style.width)&&(o.style.height=`${e.height}px`,o.style.width=`${e.width}px`),e.currentDevicePixelRatio!==r||o.height!==i||o.width!==a?(e.currentDevicePixelRatio=r,o.height=i,o.width=a,e.ctx.setTransform(r,0,0,r,0,0),!0):!1}var yr=function(){let e=!1;try{let t={get passive(){return e=!0,!1}};ar()&&(window.addEventListener(`test`,null,t),window.removeEventListener(`test`,null,t))}catch{}return e}();function br(e,t){let n=lr(e,t),r=n&&n.match(/^(\d+)(\.\d+)?px$/);return r?+r[1]:void 0}function xr(e,t,n,r){return{x:e.x+n*(t.x-e.x),y:e.y+n*(t.y-e.y)}}function Sr(e,t,n,r){return{x:e.x+n*(t.x-e.x),y:r===`middle`?n<.5?e.y:t.y:r===`after`?n<1?e.y:t.y:n>0?t.y:e.y}}function Cr(e,t,n,r){let i={x:e.cp2x,y:e.cp2y},a={x:t.cp1x,y:t.cp1y},o=xr(e,i,n),s=xr(i,a,n),c=xr(a,t,n);return xr(xr(o,s,n),xr(s,c,n),n)}var wr=function(e,t){return{x(n){return e+e+t-n},setWidth(e){t=e},textAlign(e){return e===`center`?e:e===`right`?`left`:`right`},xPlus(e,t){return e-t},leftForLtr(e,t){return e-t}}},Tr=function(){return{x(e){return e},setWidth(e){},textAlign(e){return e},xPlus(e,t){return e+t},leftForLtr(e,t){return e}}};function Er(e,t,n){return e?wr(t,n):Tr()}function Dr(e,t){let n,r;(t===`ltr`||t===`rtl`)&&(n=e.canvas.style,r=[n.getPropertyValue(`direction`),n.getPropertyPriority(`direction`)],n.setProperty(`direction`,t,`important`),e.prevTextDirection=r)}function Or(e,t){t!==void 0&&(delete e.prevTextDirection,e.canvas.style.setProperty(`direction`,t[0],t[1]))}function kr(e){return e===`angle`?{between:gt,compare:ht,normalize:H}:{between:W,compare:(e,t)=>e-t,normalize:e=>e}}function Ar({start:e,end:t,count:n,loop:r,style:i}){return{start:e%n,end:t%n,loop:r&&(t-e+1)%n===0,style:i}}function jr(e,t,n){let{property:r,start:i,end:a}=n,{between:o,normalize:s}=kr(r),c=t.length,{start:l,end:u,loop:d}=e,f,p;if(d){for(l+=c,u+=c,f=0,p=c;fc(i,y,_)&&s(i,y)!==0,x=()=>s(a,_)===0||c(a,y,_),S=()=>h||b(),C=()=>!h||x();for(let e=u,n=u;e<=d;++e)v=t[e%o],!v.skip&&(_=l(v[r]),_!==y&&(h=c(_,i,a),g===null&&S()&&(g=s(_,i)===0?e:n),g!==null&&C()&&(m.push(Ar({start:g,end:e,loop:f,count:o,style:p})),g=null),n=e,y=_));return g!==null&&m.push(Ar({start:g,end:d,loop:f,count:o,style:p})),m}function Nr(e,t){let n=[],r=e.segments;for(let i=0;ii&&e[a%t].skip;)a--;return a%=t,{start:i,end:a}}function Fr(e,t,n,r){let i=e.length,a=[],o=t,s=e[t],c;for(c=t+1;c<=n;++c){let n=e[c%i];n.skip||n.stop?s.skip||(r=!1,a.push({start:t%i,end:(c-1)%i,loop:r}),t=o=n.stop?c:null):(o=c,s.skip&&(t=c)),s=n}return o!==null&&a.push({start:t%i,end:o%i,loop:r}),a}function Ir(e,t){let n=e.points,r=e.options.spanGaps,i=n.length;if(!i)return[];let a=!!e._loop,{start:o,end:s}=Pr(n,i,a,r);return r===!0?Lr(e,[{start:o,end:s,loop:a}],n,t):Lr(e,Fr(n,o,sr({chart:e,initial:t.initial,numSteps:a,currentStep:Math.min(n-t.start,a)}))}_refresh(){this._request||=(this._running=!0,Et.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(e=Date.now()){let t=0;this._charts.forEach((n,r)=>{if(!n.running||!n.items.length)return;let i=n.items,a=i.length-1,o=!1,s;for(;a>=0;--a)s=i[a],s._active?(s._total>n.duration&&(n.duration=s._total),s.tick(e),o=!0):(i[a]=i[i.length-1],i.pop());o&&(r.draw(),this._notify(r,n,e,`progress`)),i.length||(n.running=!1,this._notify(r,n,e,`complete`),n.initial=!1),t+=i.length}),this._lastDate=e,t===0&&(this._running=!1)}_getAnims(e){let t=this._charts,n=t.get(e);return n||(n={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},t.set(e,n)),n}listen(e,t,n){this._getAnims(e).listeners[t].push(n)}add(e,t){!t||!t.length||this._getAnims(e).items.push(...t)}has(e){return this._getAnims(e).items.length>0}start(e){let t=this._charts.get(e);t&&(t.running=!0,t.start=Date.now(),t.duration=t.items.reduce((e,t)=>Math.max(e,t._duration),0),this._refresh())}running(e){if(!this._running)return!1;let t=this._charts.get(e);return!(!t||!t.running||!t.items.length)}stop(e){let t=this._charts.get(e);if(!t||!t.items.length)return;let n=t.items,r=n.length-1;for(;r>=0;--r)n[r].cancel();t.items=[],this._notify(e,t,Date.now(),`complete`)}remove(e){return this._charts.delete(e)}},Gr=`transparent`,Kr={boolean(e,t,n){return n>.5?t:e},color(e,t,n){let r=Rt(e||Gr),i=r.valid&&Rt(t||Gr);return i&&i.valid?i.mix(r,n).hexString():t},number(e,t,n){return e+(t-e)*n}},qr=class{constructor(e,t,n,r){let i=t[n];r=En([e.to,r,i,e.from]);let a=En([e.from,i,r]);this._active=!0,this._fn=e.fn||Kr[e.type||typeof a],this._easing=It[e.easing]||It.linear,this._start=Math.floor(Date.now()+(e.delay||0)),this._duration=this._total=Math.floor(e.duration),this._loop=!!e.loop,this._target=t,this._prop=n,this._from=a,this._to=r,this._promises=void 0}active(){return this._active}update(e,t,n){if(this._active){this._notify(!1);let r=this._target[this._prop],i=n-this._start,a=this._duration-i;this._start=n,this._duration=Math.floor(Math.max(a,e.duration)),this._total+=i,this._loop=!!e.loop,this._to=En([e.to,t,r,e.from]),this._from=En([e.from,r,t])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(e){let t=e-this._start,n=this._duration,r=this._prop,i=this._from,a=this._loop,o=this._to,s;if(this._active=i!==o&&(a||t1?2-s:s,s=this._easing(Math.min(1,Math.max(0,s))),this._target[r]=this._fn(i,o,s)}wait(){let e=this._promises||=[];return new Promise((t,n)=>{e.push({res:t,rej:n})})}_notify(e){let t=e?`res`:`rej`,n=this._promises||[];for(let e=0;e{let i=e[r];if(!j(i))return;let a={};for(let e of t)a[e]=i[e];(A(i.properties)&&i.properties||[r]).forEach(e=>{(e===r||!n.has(e))&&n.set(e,a)})})}_animateOptions(e,t){let n=t.options,r=Xr(e,n);if(!r)return[];let i=this._createAnimations(r,n);return n.$shared&&Yr(e.options.$animations,n).then(()=>{e.options=n},()=>{}),i}_createAnimations(e,t){let n=this._properties,r=[],i=e.$animations||={},a=Object.keys(t),o=Date.now(),s;for(s=a.length-1;s>=0;--s){let c=a[s];if(c.charAt(0)===`$`)continue;if(c===`options`){r.push(...this._animateOptions(e,t));continue}let l=t[c],u=i[c],d=n.get(c);if(u)if(d&&u.active()){u.update(d,l,o);continue}else u.cancel();if(!d||!d.duration){e[c]=l;continue}i[c]=u=new qr(d,e,c,l),r.push(u)}return r}update(e,t){if(this._properties.size===0){Object.assign(e,t);return}let n=this._createAnimations(e,t);if(n.length)return Wr.add(this._chart,n),!0}};function Yr(e,t){let n=[],r=Object.keys(t);for(let t=0;t0||!n&&t<0)return i.index}return null}function ci(e,t){let{chart:n,_cachedMeta:r}=e,i=n._stacks||={},{iScale:a,vScale:o,index:s}=r,c=a.axis,l=o.axis,u=ii(a,o,r),d=t.length,f;for(let e=0;en[e].axis===t).shift()}function ui(e,t){return On(e,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:`default`,type:`dataset`})}function di(e,t,n){return On(e,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:n,index:t,mode:`default`,type:`data`})}function fi(e,t){let n=e.controller.index,r=e.vScale&&e.vScale.axis;if(r){t||=e._parsed;for(let e of t){let t=e._stacks;if(!t||t[r]===void 0||t[r][n]===void 0)return;delete t[r][n],t[r]._visualValues!==void 0&&t[r]._visualValues[n]!==void 0&&delete t[r]._visualValues[n]}}}var pi=e=>e===`reset`||e===`none`,mi=(e,t)=>t?e:Object.assign({},e),hi=(e,t,n)=>e&&!t.hidden&&t._stacked&&{keys:ei(n,!0),values:null},gi=class{static defaults={};static datasetElementType=null;static dataElementType=null;constructor(e,t){this.chart=e,this._ctx=e.ctx,this.index=t,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){let e=this._cachedMeta;this.configure(),this.linkScales(),e._stacked=ri(e.vScale,e),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled(`filler`)&&console.warn(`Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options`)}updateIndex(e){this.index!==e&&fi(this._cachedMeta),this.index=e}linkScales(){let e=this.chart,t=this._cachedMeta,n=this.getDataset(),r=(e,t,n,r)=>e===`x`?t:e===`r`?r:n,i=t.xAxisID=P(n.xAxisID,li(e,`x`)),a=t.yAxisID=P(n.yAxisID,li(e,`y`)),o=t.rAxisID=P(n.rAxisID,li(e,`r`)),s=t.indexAxis,c=t.iAxisID=r(s,i,a,o),l=t.vAxisID=r(s,a,i,o);t.xScale=this.getScaleForId(i),t.yScale=this.getScaleForId(a),t.rScale=this.getScaleForId(o),t.iScale=this.getScaleForId(c),t.vScale=this.getScaleForId(l)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(e){return this.chart.scales[e]}_getOtherScale(e){let t=this._cachedMeta;return e===t.iScale?t.vScale:t.iScale}reset(){this._update(`reset`)}_destroy(){let e=this._cachedMeta;this._data&&wt(this._data,this),e._stacked&&fi(e)}_dataCheck(){let e=this.getDataset(),t=e.data||=[],n=this._data;if(j(t)){let e=this._cachedMeta;this._data=ni(t,e)}else if(n!==t){if(n){wt(n,this);let e=this._cachedMeta;fi(e),e._parsed=[]}t&&Object.isExtensible(t)&&Ct(t,this),this._syncList=[],this._data=t}}addElements(){let e=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(e.dataset=new this.datasetElementType)}buildOrUpdateElements(e){let t=this._cachedMeta,n=this.getDataset(),r=!1;this._dataCheck();let i=t._stacked;t._stacked=ri(t.vScale,t),t.stack!==n.stack&&(r=!0,fi(t),t.stack=n.stack),this._resyncElements(e),(r||i!==t._stacked)&&(ci(this,t._parsed),t._stacked=ri(t.vScale,t))}configure(){let e=this.chart.config,t=e.datasetScopeKeys(this._type),n=e.getOptionScopes(this.getDataset(),t,!0);this.options=e.createResolver(n,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(e,t){let{_cachedMeta:n,_data:r}=this,{iScale:i,_stacked:a}=n,o=i.axis,s=e===0&&t===r.length?!0:n._sorted,c=e>0&&n._parsed[e-1],l,u,d;if(this._parsing===!1)n._parsed=r,n._sorted=!0,d=r;else{d=A(r[e])?this.parseArrayData(n,r,e,t):j(r[e])?this.parseObjectData(n,r,e,t):this.parsePrimitiveData(n,r,e,t);let i=()=>u[o]===null||c&&u[o]t||u=0;--d)if(!p()){this.updateRangeFromParsed(c,e,f,s);break}}return c}getAllParsedValues(e){let t=this._cachedMeta._parsed,n=[],r,i,a;for(r=0,i=t.length;r=0&&ethis.getContext(n,r,t),u);return p.$shared&&(p.$shared=s,i[a]=Object.freeze(mi(p,s))),p}_resolveAnimations(e,t,n){let r=this.chart,i=this._cachedDataOpts,a=`animation-${t}`,o=i[a];if(o)return o;let s;if(r.options.animation!==!1){let r=this.chart.config,i=r.datasetAnimationScopeKeys(this._type,t),a=r.getOptionScopes(this.getDataset(),i);s=r.createResolver(a,this.getContext(e,n,t))}let c=new Jr(r,s&&s.animations);return s&&s._cacheable&&(i[a]=Object.freeze(c)),c}getSharedOptions(e){if(e.$shared)return this._sharedOptions||=Object.assign({},e)}includeOptions(e,t){return!t||pi(e)||this.chart._animationsDisabled}_getSharedOptions(e,t){let n=this.resolveDataElementOptions(e,t),r=this._sharedOptions,i=this.getSharedOptions(n),a=this.includeOptions(t,i)||i!==r;return this.updateSharedOptions(i,t,n),{sharedOptions:i,includeOptions:a}}updateElement(e,t,n,r){pi(r)?Object.assign(e,n):this._resolveAnimations(t,r).update(e,n)}updateSharedOptions(e,t,n){e&&!pi(t)&&this._resolveAnimations(void 0,t).update(e,n)}_setStyle(e,t,n,r){e.active=r;let i=this.getStyle(t,r);this._resolveAnimations(t,n,r).update(e,{options:!r&&this.getSharedOptions(i)||i})}removeHoverStyle(e,t,n){this._setStyle(e,n,`active`,!1)}setHoverStyle(e,t,n){this._setStyle(e,n,`active`,!0)}_removeDatasetHoverStyle(){let e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,`active`,!1)}_setDatasetHoverStyle(){let e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,`active`,!0)}_resyncElements(e){let t=this._data,n=this._cachedMeta.data;for(let[e,t,n]of this._syncList)this[e](t,n);this._syncList=[];let r=n.length,i=t.length,a=Math.min(i,r);a&&this.parse(0,a),i>r?this._insertElements(r,i-r,e):i{for(e.length+=t,o=e.length-1;o>=a;o--)e[o]=e[o-t]};for(s(i),o=e;oe-t))}return e._cache.$bar}function vi(e){let t=e.iScale,n=_i(t,e.type),r=t._length,i,a,o,s,c=()=>{o===32767||o===-32768||(Je(s)&&(r=Math.min(r,Math.abs(o-s)||r)),s=o)};for(i=0,a=n.length;i0?i[e-1]:null,s=eMath.abs(s)&&(c=s,l=o),t[n.axis]=l,t._custom={barStart:c,barEnd:l,start:i,end:a,min:o,max:s}}function Si(e,t,n,r){return A(e)?xi(e,t,n,r):t[n.axis]=n.parse(e,r),t}function Ci(e,t,n,r){let i=e.iScale,a=e.vScale,o=i.getLabels(),s=i===a,c=[],l,u,d,f;for(l=n,u=n+r;l=n?1:-1):B(e)}function Ei(e){let t,n,r,i,a;return e.horizontal?(t=e.base>e.x,n=`left`,r=`right`):(t=e.basee.controller.options.grouped),i=n.options.stacked,a=[],o=this._cachedMeta.controller.getParsed(t),s=o&&o[n.axis],c=e=>{let t=e._parsed.find(e=>e[n.axis]===s),r=t&&t[e.vScale.axis];if(k(r)||isNaN(r))return!0};for(let n of r)if(!(t!==void 0&&c(n))&&((i===!1||a.indexOf(n.stack)===-1||i===void 0&&n.stack===void 0)&&a.push(n.stack),n.index===e))break;return a.length||a.push(void 0),a}_getStackCount(e){return this._getStacks(void 0,e).length}_getAxisCount(){return this._getAxis().length}getFirstScaleIdForIndexAxis(){let e=this.chart.scales,t=this.chart.options.indexAxis;return Object.keys(e).filter(n=>e[n].axis===t).shift()}_getAxis(){let e={},t=this.getFirstScaleIdForIndexAxis();for(let n of this.chart.data.datasets)e[P(this.chart.options.indexAxis===`x`?n.xAxisID:n.yAxisID,t)]=!0;return Object.keys(e)}_getStackIndex(e,t,n){let r=this._getStacks(e,n),i=t===void 0?-1:r.indexOf(t);return i===-1?r.length-1:i}_getRuler(){let e=this.options,t=this._cachedMeta,n=t.iScale,r=[],i,a;for(i=0,a=t.data.length;i=0;--n)t=Math.max(t,e[n].size(this.resolveDataElementOptions(n))/2);return t>0&&t}getLabelAndValue(e){let t=this._cachedMeta,n=this.chart.data.labels||[],{xScale:r,yScale:i}=t,a=this.getParsed(e),o=r.getLabelForValue(a.x),s=i.getLabelForValue(a.y),c=a._custom;return{label:n[e]||``,value:`(`+o+`, `+s+(c?`, `+c:``)+`)`}}update(e){let t=this._cachedMeta.data;this.updateElements(t,0,t.length,e)}updateElements(e,t,n,r){let i=r===`reset`,{iScale:a,vScale:o}=this._cachedMeta,{sharedOptions:s,includeOptions:c}=this._getSharedOptions(t,r),l=a.axis,u=o.axis;for(let d=t;dgt(e,s,c,!0)?1:Math.max(t,t*n,r,r*n),m=(e,t,r)=>gt(e,s,c,!0)?-1:Math.min(t,t*n,r,r*n),h=p(0,l,d),g=p(z,u,f),_=m(L,l,d),v=m(L+z,u,f);r=(h-_)/2,i=(g-v)/2,a=-(h+_)/2,o=-(g+v)/2}return{ratioX:r,ratioY:i,offsetX:a,offsetY:o}}var Fi=class extends gi{static id=`doughnut`;static defaults={datasetElementType:!1,dataElementType:`arc`,animation:{animateRotate:!0,animateScale:!1},animations:{numbers:{type:`number`,properties:[`circumference`,`endAngle`,`innerRadius`,`outerRadius`,`startAngle`,`x`,`y`,`offset`,`borderWidth`,`spacing`]}},cutout:`50%`,rotation:0,circumference:360,radius:`100%`,spacing:0,indexAxis:`r`};static descriptors={_scriptable:e=>e!==`spacing`,_indexable:e=>e!==`spacing`&&!e.startsWith(`borderDash`)&&!e.startsWith(`hoverBorderDash`)};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(e){let t=e.data,{labels:{pointStyle:n,textAlign:r,color:i,useBorderRadius:a,borderRadius:o}}=e.legend.options;return t.labels.length&&t.datasets.length?t.labels.map((t,s)=>{let c=e.getDatasetMeta(0).controller.getStyle(s);return{text:t,fillStyle:c.backgroundColor,fontColor:i,hidden:!e.getDataVisibility(s),lineDash:c.borderDash,lineDashOffset:c.borderDashOffset,lineJoin:c.borderJoinStyle,lineWidth:c.borderWidth,strokeStyle:c.borderColor,textAlign:r,pointStyle:n,borderRadius:a&&(o||c.borderRadius),index:s}}):[]}},onClick(e,t,n){n.chart.toggleDataVisibility(t.index),n.chart.update()}}}};constructor(e,t){super(e,t),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(e,t){let n=this.getDataset().data,r=this._cachedMeta;if(this._parsing===!1)r._parsed=n;else{let i=e=>+n[e];if(j(n[e])){let{key:e=`value`}=this._parsing;i=t=>+Ke(n[t],e)}let a,o;for(a=e,o=e+t;a0&&!isNaN(e)?Math.abs(e)/t*R:0}getLabelAndValue(e){let t=this._cachedMeta,n=this.chart,r=n.data.labels||[],i=Kt(t._parsed[e],n.options.locale);return{label:r[e]||``,value:i}}getMaxBorderWidth(e){let t=0,n=this.chart,r,i,a,o,s;if(!e){for(r=0,i=n.data.datasets.length;r0&&this.getParsed(t-1);for(let n=0;n=_){v.skip=!0;continue}let b=this.getParsed(n),x=k(b[f]),S=v[d]=a.getPixelForValue(b[d],n),C=v[f]=i||x?o.getBasePixel():o.getPixelForValue(s?this.applyStack(o,b,s):b[f],n);v.skip=isNaN(S)||isNaN(C)||x,v.stop=n>0&&Math.abs(b[d]-y[d])>h,m&&(v.parsed=b,v.raw=c.data[n]),u&&(v.options=l||this.resolveDataElementOptions(n,p.active?`active`:r)),g||this.updateElement(p,n,v,r),y=b}}getMaxOverflow(){let e=this._cachedMeta,t=e.dataset,n=t.options&&t.options.borderWidth||0,r=e.data||[];if(!r.length)return n;let i=r[0].size(this.resolveDataElementOptions(0)),a=r[r.length-1].size(this.resolveDataElementOptions(r.length-1));return Math.max(n,i,a)/2}draw(){let e=this._cachedMeta;e.dataset.updateControlPoints(this.chart.chartArea,e.iScale.axis),super.draw()}},Li=class extends gi{static id=`polarArea`;static defaults={dataElementType:`arc`,animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:`number`,properties:[`x`,`y`,`startAngle`,`endAngle`,`innerRadius`,`outerRadius`]}},indexAxis:`r`,startAngle:0};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(e){let t=e.data;if(t.labels.length&&t.datasets.length){let{labels:{pointStyle:n,color:r}}=e.legend.options;return t.labels.map((t,i)=>{let a=e.getDatasetMeta(0).controller.getStyle(i);return{text:t,fillStyle:a.backgroundColor,strokeStyle:a.borderColor,fontColor:r,lineWidth:a.borderWidth,pointStyle:n,hidden:!e.getDataVisibility(i),index:i}})}return[]}},onClick(e,t,n){n.chart.toggleDataVisibility(t.index),n.chart.update()}}},scales:{r:{type:`radialLinear`,angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}};constructor(e,t){super(e,t),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(e){let t=this._cachedMeta,n=this.chart,r=n.data.labels||[],i=Kt(t._parsed[e].r,n.options.locale);return{label:r[e]||``,value:i}}parseObjectData(e,t,n,r){return Jn.bind(this)(e,t,n,r)}update(e){let t=this._cachedMeta.data;this._updateRadius(),this.updateElements(t,0,t.length,e)}getMinMax(){let e=this._cachedMeta,t={min:1/0,max:-1/0};return e.data.forEach((e,n)=>{let r=this.getParsed(n).r;!isNaN(r)&&this.chart.getDataVisibility(n)&&(rt.max&&(t.max=r))}),t}_updateRadius(){let e=this.chart,t=e.chartArea,n=e.options,r=Math.min(t.right-t.left,t.bottom-t.top),i=Math.max(r/2,0),a=(i-Math.max(n.cutoutPercentage?i/100*n.cutoutPercentage:1,0))/e.getVisibleDatasetCount();this.outerRadius=i-a*this.index,this.innerRadius=this.outerRadius-a}updateElements(e,t,n,r){let i=r===`reset`,a=this.chart,o=a.options.animation,s=this._cachedMeta.rScale,c=s.xCenter,l=s.yCenter,u=s.getIndexAngle(0)-.5*L,d=u,f,p=360/this.countVisibleElements();for(f=0;f{!isNaN(this.getParsed(n).r)&&this.chart.getDataVisibility(n)&&t++}),t}_computeAngle(e,t,n){return this.chart.getDataVisibility(e)?V(this.resolveDataElementOptions(e,t).angle||n):0}},Ri=Object.freeze({__proto__:null,BarController:Mi,BubbleController:Ni,DoughnutController:Fi,LineController:Ii,PieController:class extends Fi{static id=`pie`;static defaults={cutout:0,rotation:0,circumference:360,radius:`100%`}},PolarAreaController:Li,RadarController:class extends gi{static id=`radar`;static defaults={datasetElementType:`line`,dataElementType:`point`,indexAxis:`r`,showLine:!0,elements:{line:{fill:`start`}}};static overrides={aspectRatio:1,scales:{r:{type:`radialLinear`}}};getLabelAndValue(e){let t=this._cachedMeta.vScale,n=this.getParsed(e);return{label:t.getLabels()[e],value:``+t.getLabelForValue(n[t.axis])}}parseObjectData(e,t,n,r){return Jn.bind(this)(e,t,n,r)}update(e){let t=this._cachedMeta,n=t.dataset,r=t.data||[],i=t.iScale.getLabels();if(n.points=r,e!==`resize`){let t=this.resolveDatasetElementOptions(e);this.options.showLine||(t.borderWidth=0);let a={_loop:!0,_fullLoop:i.length===r.length,options:t};this.updateElement(n,void 0,a,e)}this.updateElements(r,0,r.length,e)}updateElements(e,t,n,r){let i=this._cachedMeta.rScale,a=r===`reset`;for(let o=t;o0&&this.getParsed(t-1);for(let l=t;l0&&Math.abs(n[f]-v[f])>g,h&&(m.parsed=n,m.raw=c.data[l]),d&&(m.options=u||this.resolveDataElementOptions(l,t.active?`active`:r)),_||this.updateElement(t,l,m,r),v=n}this.updateSharedOptions(u,r,l)}getMaxOverflow(){let e=this._cachedMeta,t=e.data||[];if(!this.options.showLine){let e=0;for(let n=t.length-1;n>=0;--n)e=Math.max(e,t[n].size(this.resolveDataElementOptions(n))/2);return e>0&&e}let n=e.dataset,r=n.options&&n.options.borderWidth||0;if(!t.length)return r;let i=t[0].size(this.resolveDataElementOptions(0)),a=t[t.length-1].size(this.resolveDataElementOptions(t.length-1));return Math.max(r,i,a)/2}}});function zi(){throw Error(`This method is not implemented: Check that a complete date adapter is provided.`)}var Bi={_date:class e{static override(t){Object.assign(e.prototype,t)}options;constructor(e){this.options=e||{}}init(){}formats(){return zi()}parse(){return zi()}format(){return zi()}add(){return zi()}diff(){return zi()}startOf(){return zi()}endOf(){return zi()}}};function Vi(e,t,n,r){let{controller:i,data:a,_sorted:o}=e,s=i._cachedMeta.iScale,c=e.dataset&&e.dataset.options?e.dataset.options.spanGaps:null;if(s&&t===s.axis&&t!==`r`&&o&&a.length){let o=s._reversePixels?bt:yt;if(!r){let r=o(a,t,n);if(c){let{vScale:t}=i._cachedMeta,{_parsed:n}=e,a=n.slice(0,r.lo+1).reverse().findIndex(e=>!k(e[t.axis]));r.lo-=Math.max(0,a);let o=n.slice(r.hi).findIndex(e=>!k(e[t.axis]));r.hi+=Math.max(0,o)}return r}else if(i._sharedOptions){let e=a[0],r=typeof e.getRange==`function`&&e.getRange(t);if(r){let e=o(a,t,n-r),i=o(a,t,n+r);return{lo:e.lo,hi:i.hi}}}}return{lo:0,hi:a.length-1}}function Hi(e,t,n,r,i){let a=e.getSortedVisibleDatasetMetas(),o=n[t];for(let e=0,n=a.length;e{e[o]&&e[o](t[n],i)&&(a.push({element:e,datasetIndex:r,index:c}),s||=e.inRange(t.x,t.y,i))}),r&&!s?[]:a}var Yi={evaluateInteractionItems:Hi,modes:{index(e,t,n,r){let i=mr(t,e),a=n.axis||`x`,o=n.includeInvisible||!1,s=n.intersect?Wi(e,i,a,r,o):qi(e,i,a,!1,r,o),c=[];return s.length?(e.getSortedVisibleDatasetMetas().forEach(e=>{let t=s[0].index,n=e.data[t];n&&!n.skip&&c.push({element:n,datasetIndex:e.index,index:t})}),c):[]},dataset(e,t,n,r){let i=mr(t,e),a=n.axis||`xy`,o=n.includeInvisible||!1,s=n.intersect?Wi(e,i,a,r,o):qi(e,i,a,!1,r,o);if(s.length>0){let t=s[0].datasetIndex,n=e.getDatasetMeta(t).data;s=[];for(let e=0;ee.pos===t)}function Qi(e,t){return e.filter(e=>Xi.indexOf(e.pos)===-1&&e.box.axis===t)}function $i(e,t){return e.sort((e,n)=>{let r=t?n:e,i=t?e:n;return r.weight===i.weight?r.index-i.index:r.weight-i.weight})}function ea(e){let t=[],n,r,i,a,o,s;for(n=0,r=(e||[]).length;ne.box.fullSize),!0),r=$i(Zi(t,`left`),!0),i=$i(Zi(t,`right`)),a=$i(Zi(t,`top`),!0),o=$i(Zi(t,`bottom`)),s=Qi(t,`x`),c=Qi(t,`y`);return{fullSize:n,leftAndTop:r.concat(a),rightAndBottom:i.concat(c).concat(o).concat(s),chartArea:Zi(t,`chartArea`),vertical:r.concat(i).concat(c),horizontal:a.concat(o).concat(s)}}function ia(e,t,n,r){return Math.max(e[n],t[n])+Math.max(e[r],t[r])}function aa(e,t){e.top=Math.max(e.top,t.top),e.left=Math.max(e.left,t.left),e.bottom=Math.max(e.bottom,t.bottom),e.right=Math.max(e.right,t.right)}function oa(e,t,n,r){let{pos:i,box:a}=n,o=e.maxPadding;if(!j(i)){n.size&&(e[i]-=n.size);let t=r[n.stack]||{size:0,count:1};t.size=Math.max(t.size,n.horizontal?a.height:a.width),n.size=t.size/t.count,e[i]+=n.size}a.getPadding&&aa(o,a.getPadding());let s=Math.max(0,t.outerWidth-ia(o,e,`left`,`right`)),c=Math.max(0,t.outerHeight-ia(o,e,`top`,`bottom`)),l=s!==e.w,u=c!==e.h;return e.w=s,e.h=c,n.horizontal?{same:l,other:u}:{same:u,other:l}}function sa(e){let t=e.maxPadding;function n(n){let r=Math.max(t[n]-e[n],0);return e[n]+=r,r}e.y+=n(`top`),e.x+=n(`left`),n(`right`),n(`bottom`)}function ca(e,t){let n=t.maxPadding;function r(e){let r={left:0,top:0,right:0,bottom:0};return e.forEach(e=>{r[e]=Math.max(t[e],n[e])}),r}return r(e?[`left`,`right`]:[`top`,`bottom`])}function la(e,t,n,r){let i=[],a,o,s,c,l,u;for(a=0,o=e.length,l=0;a{typeof e.beforeLayout==`function`&&e.beforeLayout()});let u=c.reduce((e,t)=>t.box.options&&t.box.options.display===!1?e:e+1,0)||1,d=Object.freeze({outerWidth:t,outerHeight:n,padding:i,availableWidth:a,availableHeight:o,vBoxMaxWidth:a/2/u,hBoxMaxHeight:o/2}),f=Object.assign({},i);aa(f,q(r));let p=Object.assign({maxPadding:f,w:a,h:o,x:i.left,y:i.top},i),m=na(c.concat(l),d);la(s.fullSize,p,d,m),la(c,p,d,m),la(l,p,d,m)&&la(c,p,d,m),sa(p),da(s.leftAndTop,p,d,m),p.x+=p.w,p.y+=p.h,da(s.rightAndBottom,p,d,m),e.chartArea={left:p.left,top:p.top,right:p.left+p.w,bottom:p.top+p.h,height:p.h,width:p.w},I(s.chartArea,t=>{let n=t.box;Object.assign(n,e.chartArea),n.update(p.w,p.h,{left:0,top:0,right:0,bottom:0})})}},fa=class{acquireContext(e,t){}releaseContext(e){return!1}addEventListener(e,t,n){}removeEventListener(e,t,n){}getDevicePixelRatio(){return 1}getMaximumSize(e,t,n,r){return t=Math.max(0,t||e.width),n||=e.height,{width:t,height:Math.max(0,r?Math.floor(t/r):n)}}isAttached(e){return!0}updateConfig(e){}},pa=class extends fa{acquireContext(e){return e&&e.getContext&&e.getContext(`2d`)||null}updateConfig(e){e.options.animation=!1}},ma=`$chartjs`,ha={touchstart:`mousedown`,touchmove:`mousemove`,touchend:`mouseup`,pointerenter:`mouseenter`,pointerdown:`mousedown`,pointermove:`mousemove`,pointerup:`mouseup`,pointerleave:`mouseout`,pointerout:`mouseout`},ga=e=>e===null||e===``;function _a(e,t){let n=e.style,r=e.getAttribute(`height`),i=e.getAttribute(`width`);if(e[ma]={initial:{height:r,width:i,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||`block`,n.boxSizing=n.boxSizing||`border-box`,ga(i)){let t=br(e,`width`);t!==void 0&&(e.width=t)}if(ga(r))if(e.style.height===``)e.height=e.width/(t||2);else{let t=br(e,`height`);t!==void 0&&(e.height=t)}return e}var va=yr?{passive:!0}:!1;function ya(e,t,n){e&&e.addEventListener(t,n,va)}function ba(e,t,n){e&&e.canvas&&e.canvas.removeEventListener(t,n,va)}function xa(e,t){let n=ha[e.type]||e.type,{x:r,y:i}=mr(e,t);return{type:n,chart:t,native:e,x:r===void 0?null:r,y:i===void 0?null:i}}function Sa(e,t){for(let n of e)if(n===t||n.contains(t))return!0}function Ca(e,t,n){let r=e.canvas,i=new MutationObserver(e=>{let t=!1;for(let n of e)t||=Sa(n.addedNodes,r),t&&=!Sa(n.removedNodes,r);t&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}function wa(e,t,n){let r=e.canvas,i=new MutationObserver(e=>{let t=!1;for(let n of e)t||=Sa(n.removedNodes,r),t&&=!Sa(n.addedNodes,r);t&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}var Ta=new Map,Ea=0;function Da(){let e=window.devicePixelRatio;e!==Ea&&(Ea=e,Ta.forEach((t,n)=>{n.currentDevicePixelRatio!==e&&t()}))}function Oa(e,t){Ta.size||window.addEventListener(`resize`,Da),Ta.set(e,t)}function ka(e){Ta.delete(e),Ta.size||window.removeEventListener(`resize`,Da)}function Aa(e,t,n){let r=e.canvas,i=r&&or(r);if(!i)return;let a=Dt((e,t)=>{let r=i.clientWidth;n(e,t),r{let t=e[0],n=t.contentRect.width,r=t.contentRect.height;n===0&&r===0||a(n,r)});return o.observe(i),Oa(e,a),o}function ja(e,t,n){n&&n.disconnect(),t===`resize`&&ka(e)}function Ma(e,t,n){let r=e.canvas,i=Dt(t=>{e.ctx!==null&&n(xa(t,e))},e);return ya(r,t,i),i}var Na=class extends fa{acquireContext(e,t){let n=e&&e.getContext&&e.getContext(`2d`);return n&&n.canvas===e?(_a(e,t),n):null}releaseContext(e){let t=e.canvas;if(!t[ma])return!1;let n=t[ma].initial;[`height`,`width`].forEach(e=>{let r=n[e];k(r)?t.removeAttribute(e):t.setAttribute(e,r)});let r=n.style||{};return Object.keys(r).forEach(e=>{t.style[e]=r[e]}),t.width=t.width,delete t[ma],!0}addEventListener(e,t,n){this.removeEventListener(e,t);let r=e.$proxies||={};r[t]=({attach:Ca,detach:wa,resize:Aa}[t]||Ma)(e,t,n)}removeEventListener(e,t){let n=e.$proxies||={},r=n[t];r&&(({attach:ja,detach:ja,resize:ja}[t]||ba)(e,t,r),n[t]=void 0)}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(e,t,n,r){return _r(e,t,n,r)}isAttached(e){let t=e&&or(e);return!!(t&&t.isConnected)}};function Pa(e){return!ar()||typeof OffscreenCanvas<`u`&&e instanceof OffscreenCanvas?pa:Na}var Fa=class{static defaults={};static defaultRoutes=void 0;x;y;active=!1;options;$animations;tooltipPosition(e){let{x:t,y:n}=this.getProps([`x`,`y`],e);return{x:t,y:n}}hasValue(){return ct(this.x)&&ct(this.y)}getProps(e,t){let n=this.$animations;if(!t||!n)return this;let r={};return e.forEach(e=>{r[e]=n[e]&&n[e].active()?n[e]._to:this[e]}),r}};function Ia(e,t){let n=e.options.ticks,r=La(e),i=Math.min(n.maxTicksLimit||r,r),a=n.major.enabled?za(t):[],o=a.length,s=a[0],c=a[o-1],l=[];if(o>i)return Ba(t,l,a,o/i),l;let u=Ra(a,t,i);if(o>0){let e,n,r=o>1?Math.round((c-s)/(o-1)):null;for(Va(t,l,u,k(r)?0:s-r,s),e=0,n=o-1;ei)return t}return Math.max(i,1)}function za(e){let t=[],n,r;for(n=0,r=e.length;ne===`left`?`right`:e===`right`?`left`:e,Wa=(e,t,n)=>t===`top`||t===`left`?e[t]+n:e[t]-n,Ga=(e,t)=>Math.min(t||e,e);function Ka(e,t){let n=[],r=e.length/t,i=e.length,a=0;for(;ao+s)))return c}function Ja(e,t){I(e,e=>{let n=e.gc,r=n.length/2,i;if(r>t){for(i=0;in?n:t,n=r&&t>n?t:n,{min:N(t,N(n,t)),max:N(n,N(t,n))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){let e=this.chart.data;return this.options.labels||(this.isHorizontal()?e.xLabels:e.yLabels)||e.labels||[]}getLabelItems(e=this.chart.chartArea){return this._labelItems||=this._computeLabelItems(e)}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){F(this.options.beforeUpdate,[this])}update(e,t,n){let{beginAtZero:r,grace:i,ticks:a}=this.options,o=a.sampleSize;this.beforeUpdate(),this.maxWidth=e,this.maxHeight=t,this._margins=n=Object.assign({left:0,right:0,top:0,bottom:0},n),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+n.left+n.right:this.height+n.top+n.bottom,this._dataLimitsCached||=(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=Dn(this,i,r),!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();let s=o=i||n<=1||!this.isHorizontal()){this.labelRotation=r;return}let l=this._getLabelSizes(),u=l.widest.width,d=l.highest.height,f=U(this.chart.width-u,0,this.maxWidth);o=e.offset?this.maxWidth/n:f/(n-1),u+6>o&&(o=f/(n-(e.offset?.5:1)),s=this.maxHeight-Ya(e.grid)-t.padding-Xa(e.title,this.chart.options.font),c=Math.sqrt(u*u+d*d),a=dt(Math.min(Math.asin(U((l.highest.height+6)/o,-1,1)),Math.asin(U(s/c,-1,1))-Math.asin(U(d/c,-1,1)))),a=Math.max(r,Math.min(i,a))),this.labelRotation=a}afterCalculateLabelRotation(){F(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){F(this.options.beforeFit,[this])}fit(){let e={width:0,height:0},{chart:t,options:{ticks:n,title:r,grid:i}}=this,a=this._isVisible(),o=this.isHorizontal();if(a){let a=Xa(r,t.options.font);if(o?(e.width=this.maxWidth,e.height=Ya(i)+a):(e.height=this.maxHeight,e.width=Ya(i)+a),n.display&&this.ticks.length){let{first:t,last:r,widest:i,highest:a}=this._getLabelSizes(),s=n.padding*2,c=V(this.labelRotation),l=Math.cos(c),u=Math.sin(c);if(o){let t=n.mirror?0:u*i.width+l*a.height;e.height=Math.min(this.maxHeight,e.height+t+s)}else{let t=n.mirror?0:l*i.width+u*a.height;e.width=Math.min(this.maxWidth,e.width+t+s)}this._calculatePadding(t,r,u,l)}}this._handleMargins(),o?(this.width=this._length=t.width-this._margins.left-this._margins.right,this.height=e.height):(this.width=e.width,this.height=this._length=t.height-this._margins.top-this._margins.bottom)}_calculatePadding(e,t,n,r){let{ticks:{align:i,padding:a},position:o}=this.options,s=this.labelRotation!==0,c=o!==`top`&&this.axis===`x`;if(this.isHorizontal()){let o=this.getPixelForTick(0)-this.left,l=this.right-this.getPixelForTick(this.ticks.length-1),u=0,d=0;s?c?(u=r*e.width,d=n*t.height):(u=n*e.height,d=r*t.width):i===`start`?d=t.width:i===`end`?u=e.width:i!==`inner`&&(u=e.width/2,d=t.width/2),this.paddingLeft=Math.max((u-o+a)*this.width/(this.width-o),0),this.paddingRight=Math.max((d-l+a)*this.width/(this.width-l),0)}else{let n=t.height/2,r=e.height/2;i===`start`?(n=0,r=e.height):i===`end`&&(n=t.height,r=0),this.paddingTop=n+a,this.paddingBottom=r+a}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){F(this.options.afterFit,[this])}isHorizontal(){let{axis:e,position:t}=this.options;return t===`top`||t===`bottom`||e===`x`}isFullSize(){return this.options.fullSize}_convertTicksToLabels(e){this.beforeTickToLabelConversion(),this.generateTickLabels(e);let t,n;for(t=0,n=e.length;t({width:a[e]||0,height:o[e]||0});return{first:C(0),last:C(t-1),widest:C(x),highest:C(S),widths:a,heights:o}}getLabelForValue(e){return e}getPixelForValue(e,t){return NaN}getValueForPixel(e){}getPixelForTick(e){let t=this.ticks;return e<0||e>t.length-1?null:this.getPixelForValue(t[e].value)}getPixelForDecimal(e){this._reversePixels&&(e=1-e);let t=this._startPixel+e*this._length;return _t(this._alignToPixels?an(this.chart,t,0):t)}getDecimalForPixel(e){let t=(e-this._startPixel)/this._length;return this._reversePixels?1-t:t}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){let{min:e,max:t}=this;return e<0&&t<0?t:e>0&&t>0?e:0}getContext(e){let t=this.ticks||[];if(e>=0&&eo*r?o/n:s/r:s*r0:!!e}_computeGridLineItems(e){let t=this.axis,n=this.chart,r=this.options,{grid:i,position:a,border:o}=r,s=i.offset,c=this.isHorizontal(),l=this.ticks.length+ +!!s,u=Ya(i),d=[],f=o.setContext(this.getContext()),p=f.display?f.width:0,m=p/2,h=function(e){return an(n,e,p)},g,_,v,y,b,x,S,C,w,T,E,D;if(a===`top`)g=h(this.bottom),x=this.bottom-u,C=g-m,T=h(e.top)+m,D=e.bottom;else if(a===`bottom`)g=h(this.top),T=e.top,D=h(e.bottom)-m,x=g+m,C=this.top+u;else if(a===`left`)g=h(this.right),b=this.right-u,S=g-m,w=h(e.left)+m,E=e.right;else if(a===`right`)g=h(this.left),w=e.left,E=h(e.right)-m,b=g+m,S=this.left+u;else if(t===`x`){if(a===`center`)g=h((e.top+e.bottom)/2+.5);else if(j(a)){let e=Object.keys(a)[0],t=a[e];g=h(this.chart.scales[e].getPixelForValue(t))}T=e.top,D=e.bottom,x=g+m,C=x+u}else if(t===`y`){if(a===`center`)g=h((e.left+e.right)/2);else if(j(a)){let e=Object.keys(a)[0],t=a[e];g=h(this.chart.scales[e].getPixelForValue(t))}b=g-m,S=b-u,w=e.left,E=e.right}let ee=P(r.ticks.maxTicksLimit,l),O=Math.max(1,Math.ceil(l/ee));for(_=0;_0&&(a-=r/2);break}f={left:a,top:i,width:r+t.width,height:n+t.height,color:e.backdropColor}}h.push({label:y,font:w,textOffset:D,options:{rotation:m,color:n,strokeColor:s,strokeWidth:l,textAlign:d,textBaseline:ee,translation:[b,x],backdrop:f}})}return h}_getXAxisLabelAlignment(){let{position:e,ticks:t}=this.options;if(-V(this.labelRotation))return e===`top`?`left`:`right`;let n=`center`;return t.align===`start`?n=`left`:t.align===`end`?n=`right`:t.align===`inner`&&(n=`inner`),n}_getYAxisLabelAlignment(e){let{position:t,ticks:{crossAlign:n,mirror:r,padding:i}}=this.options,a=this._getLabelSizes(),o=e+i,s=a.widest.width,c,l;return t===`left`?r?(l=this.right+i,n===`near`?c=`left`:n===`center`?(c=`center`,l+=s/2):(c=`right`,l+=s)):(l=this.right-o,n===`near`?c=`right`:n===`center`?(c=`center`,l-=s/2):(c=`left`,l=this.left)):t===`right`?r?(l=this.left+i,n===`near`?c=`right`:n===`center`?(c=`center`,l-=s/2):(c=`left`,l-=s)):(l=this.left+o,n===`near`?c=`left`:n===`center`?(c=`center`,l+=s/2):(c=`right`,l=this.right)):c=`right`,{textAlign:c,x:l}}_computeLabelArea(){if(this.options.ticks.mirror)return;let e=this.chart,t=this.options.position;if(t===`left`||t===`right`)return{top:0,left:this.left,bottom:e.height,right:this.right};if(t===`top`||t===`bottom`)return{top:this.top,left:0,bottom:this.bottom,right:e.width}}drawBackground(){let{ctx:e,options:{backgroundColor:t},left:n,top:r,width:i,height:a}=this;t&&(e.save(),e.fillStyle=t,e.fillRect(n,r,i,a),e.restore())}getLineWidthForValue(e){let t=this.options.grid;if(!this._isVisible()||!t.display)return 0;let n=this.ticks.findIndex(t=>t.value===e);return n>=0?t.setContext(this.getContext(n)).lineWidth:0}drawGrid(e){let t=this.options.grid,n=this.ctx,r=this._gridLineItems||=this._computeGridLineItems(e),i,a,o=(e,t,r)=>{!r.width||!r.color||(n.save(),n.lineWidth=r.width,n.strokeStyle=r.color,n.setLineDash(r.borderDash||[]),n.lineDashOffset=r.borderDashOffset,n.beginPath(),n.moveTo(e.x,e.y),n.lineTo(t.x,t.y),n.stroke(),n.restore())};if(t.display)for(i=0,a=r.length;i{this.draw(e)}}]:[{z:r,draw:e=>{this.drawBackground(),this.drawGrid(e),this.drawTitle()}},{z:i,draw:()=>{this.drawBorder()}},{z:n,draw:e=>{this.drawLabels(e)}}]}getMatchingVisibleMetas(e){let t=this.chart.getSortedVisibleDatasetMetas(),n=this.axis+`AxisID`,r=[],i,a;for(i=0,a=t.length;i{let r=n.split(`.`),i=r.pop(),a=[e].concat(r).join(`.`),o=t[n].split(`.`),s=o.pop(),c=o.join(`.`);K.route(a,i,c,s)})}function ao(e){return`id`in e&&`defaults`in e}var X=new class{constructor(){this.controllers=new no(gi,`datasets`,!0),this.elements=new no(Fa,`elements`),this.plugins=new no(Object,`plugins`),this.scales=new no(to,`scales`),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...e){this._each(`register`,e)}remove(...e){this._each(`unregister`,e)}addControllers(...e){this._each(`register`,e,this.controllers)}addElements(...e){this._each(`register`,e,this.elements)}addPlugins(...e){this._each(`register`,e,this.plugins)}addScales(...e){this._each(`register`,e,this.scales)}getController(e){return this._get(e,this.controllers,`controller`)}getElement(e){return this._get(e,this.elements,`element`)}getPlugin(e){return this._get(e,this.plugins,`plugin`)}getScale(e){return this._get(e,this.scales,`scale`)}removeControllers(...e){this._each(`unregister`,e,this.controllers)}removeElements(...e){this._each(`unregister`,e,this.elements)}removePlugins(...e){this._each(`unregister`,e,this.plugins)}removeScales(...e){this._each(`unregister`,e,this.scales)}_each(e,t,n){[...t].forEach(t=>{let r=n||this._getRegistryForType(t);n||r.isForType(t)||r===this.plugins&&t.id?this._exec(e,r,t):I(t,t=>{let r=n||this._getRegistryForType(t);this._exec(e,r,t)})})}_exec(e,t,n){let r=qe(e);F(n[`before`+r],[],n),t[e](n),F(n[`after`+r],[],n)}_getRegistryForType(e){for(let t=0;te.filter(e=>!t.some(t=>e.plugin.id===t.plugin.id));this._notify(r(t,n),e,`stop`),this._notify(r(n,t),e,`start`)}};function so(e){let t={},n=[],r=Object.keys(X.plugins.items);for(let e=0;e1&&ho(e[0].toLowerCase());if(t)return t}throw Error(`Cannot determine type of '${e}' axis. Please provide 'axis' or 'position' option.`)}function vo(e,t,n){if(n[t+`AxisID`]===e)return{axis:t}}function yo(e,t){if(t.data&&t.data.datasets){let n=t.data.datasets.filter(t=>t.xAxisID===e||t.yAxisID===e);if(n.length)return vo(e,`x`,n[0])||vo(e,`y`,n[0])}return{}}function bo(e,t){let n=Zt[e.type]||{scales:{}},r=t.scales||{},i=fo(e.type,t),a=Object.create(null);return Object.keys(r).forEach(t=>{let o=r[t];if(!j(o))return console.error(`Invalid scale configuration for scale: ${t}`);if(o._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${t}`);let s=_o(t,o,yo(t,e),K.scales[o.type]),c=mo(s,i),l=n.scales||{};a[t]=Ve(Object.create(null),[{axis:s},o,l[s],l[c]])}),e.data.datasets.forEach(n=>{let i=n.type||e.type,o=n.indexAxis||fo(i,t),s=(Zt[i]||{}).scales||{};Object.keys(s).forEach(e=>{let t=po(e,o),i=n[t+`AxisID`]||t;a[i]=a[i]||Object.create(null),Ve(a[i],[{axis:t},r[i],s[e]])})}),Object.keys(a).forEach(e=>{let t=a[e];Ve(t,[K.scales[t.type],K.scale])}),a}function xo(e){let t=e.options||={};t.plugins=P(t.plugins,{}),t.scales=bo(e,t)}function So(e){return e||={},e.datasets=e.datasets||[],e.labels=e.labels||[],e}function Co(e){return e||={},e.data=So(e.data),xo(e),e}var wo=new Map,To=new Set;function Eo(e,t){let n=wo.get(e);return n||(n=t(),wo.set(e,n),To.add(n)),n}var Do=(e,t,n)=>{let r=Ke(t,n);r!==void 0&&e.add(r)},Oo=class{constructor(e){this._config=Co(e),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(e){this._config.type=e}get data(){return this._config.data}set data(e){this._config.data=So(e)}get options(){return this._config.options}set options(e){this._config.options=e}get plugins(){return this._config.plugins}update(){let e=this._config;this.clearCache(),xo(e)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(e){return Eo(e,()=>[[`datasets.${e}`,``]])}datasetAnimationScopeKeys(e,t){return Eo(`${e}.transition.${t}`,()=>[[`datasets.${e}.transitions.${t}`,`transitions.${t}`],[`datasets.${e}`,``]])}datasetElementScopeKeys(e,t){return Eo(`${e}-${t}`,()=>[[`datasets.${e}.elements.${t}`,`datasets.${e}`,`elements.${t}`,``]])}pluginScopeKeys(e){let t=e.id,n=this.type;return Eo(`${n}-plugin-${t}`,()=>[[`plugins.${t}`,...e.additionalOptionScopes||[]]])}_cachedScopes(e,t){let n=this._scopeCache,r=n.get(e);return(!r||t)&&(r=new Map,n.set(e,r)),r}getOptionScopes(e,t,n){let{options:r,type:i}=this,a=this._cachedScopes(e,n),o=a.get(t);if(o)return o;let s=new Set;t.forEach(t=>{e&&(s.add(e),t.forEach(t=>Do(s,e,t))),t.forEach(e=>Do(s,r,e)),t.forEach(e=>Do(s,Zt[i]||{},e)),t.forEach(e=>Do(s,K,e)),t.forEach(e=>Do(s,Qt,e))});let c=Array.from(s);return c.length===0&&c.push(Object.create(null)),To.has(t)&&a.set(t,c),c}chartOptionScopes(){let{options:e,type:t}=this;return[e,Zt[t]||{},K.datasets[t]||{},{type:t},K,Qt]}resolveNamedOptions(e,t,n,r=[``]){let i={$shared:!0},{resolver:a,subPrefixes:o}=ko(this._resolverCache,e,r),s=a;if(jo(a,t)){i.$shared=!1,n=Ye(n)?n():n;let t=this.createResolver(e,n,o);s=An(a,n,t)}for(let e of t)i[e]=s[e];return i}createResolver(e,t,n=[``],r){let{resolver:i}=ko(this._resolverCache,e,n);return j(t)?An(i,t,void 0,r):i}};function ko(e,t,n){let r=e.get(t);r||(r=new Map,e.set(t,r));let i=n.join(),a=r.get(i);return a||(a={resolver:kn(t,n),subPrefixes:n.filter(e=>!e.toLowerCase().includes(`hover`))},r.set(i,a)),a}var Ao=e=>j(e)&&Object.getOwnPropertyNames(e).some(t=>Ye(e[t]));function jo(e,t){let{isScriptable:n,isIndexable:r}=jn(e);for(let i of t){let t=n(i),a=r(i),o=(a||t)&&e[i];if(t&&(Ye(o)||Ao(o))||a&&A(o))return!0}return!1}var Mo=`4.5.1`,No=[`top`,`bottom`,`left`,`right`,`chartArea`];function Po(e,t){return e===`top`||e===`bottom`||No.indexOf(e)===-1&&t===`x`}function Fo(e,t){return function(n,r){return n[e]===r[e]?n[t]-r[t]:n[e]-r[e]}}function Io(e){let t=e.chart,n=t.options.animation;t.notifyPlugins(`afterRender`),F(n&&n.onComplete,[e],t)}function Lo(e){let t=e.chart,n=t.options.animation;F(n&&n.onProgress,[e],t)}function Ro(e){return ar()&&typeof e==`string`?e=document.getElementById(e):e&&e.length&&(e=e[0]),e&&e.canvas&&(e=e.canvas),e}var zo={},Bo=e=>{let t=Ro(e);return Object.values(zo).filter(e=>e.canvas===t).pop()};function Vo(e,t,n){let r=Object.keys(e);for(let i of r){let r=+i;if(r>=t){let a=e[i];delete e[i],(n>0||r>t)&&(e[r+n]=a)}}}function Ho(e,t,n,r){return!n||e.type===`mouseout`?null:r?t:e}var Uo=class{static defaults=K;static instances=zo;static overrides=Zt;static registry=X;static version=Mo;static getChart=Bo;static register(...e){X.add(...e),Wo()}static unregister(...e){X.remove(...e),Wo()}constructor(e,t){let n=this.config=new Oo(t),r=Ro(e),i=Bo(r);if(i)throw Error(`Canvas is already in use. Chart with ID '`+i.id+`' must be destroyed before the canvas with ID '`+i.canvas.id+`' can be reused.`);let a=n.createResolver(n.chartOptionScopes(),this.getContext());this.platform=new(n.platform||(Pa(r))),this.platform.updateConfig(n);let o=this.platform.acquireContext(r,a.aspectRatio),s=o&&o.canvas,c=s&&s.height,l=s&&s.width;if(this.id=Ne(),this.ctx=o,this.canvas=s,this.width=l,this.height=c,this._options=a,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new oo,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=Ot(e=>this.update(e),a.resizeDelay||0),this._dataChanges=[],zo[this.id]=this,!o||!s){console.error(`Failed to create chart: can't acquire context from the given item`);return}Wr.listen(this,`complete`,Io),Wr.listen(this,`progress`,Lo),this._initialize(),this.attached&&this.update()}get aspectRatio(){let{options:{aspectRatio:e,maintainAspectRatio:t},width:n,height:r,_aspectRatio:i}=this;return k(e)?t&&i?i:r?n/r:null:e}get data(){return this.config.data}set data(e){this.config.data=e}get options(){return this._options}set options(e){this.config.options=e}get registry(){return X}_initialize(){return this.notifyPlugins(`beforeInit`),this.options.responsive?this.resize():vr(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins(`afterInit`),this}clear(){return on(this.canvas,this.ctx),this}stop(){return Wr.stop(this),this}resize(e,t){Wr.running(this)?this._resizeBeforeDraw={width:e,height:t}:this._resize(e,t)}_resize(e,t){let n=this.options,r=this.canvas,i=n.maintainAspectRatio&&this.aspectRatio,a=this.platform.getMaximumSize(r,e,t,i),o=n.devicePixelRatio||this.platform.getDevicePixelRatio(),s=this.width?`resize`:`attach`;this.width=a.width,this.height=a.height,this._aspectRatio=this.aspectRatio,vr(this,o,!0)&&(this.notifyPlugins(`resize`,{size:a}),F(n.onResize,[this,a],this),this.attached&&this._doResize(s)&&this.render())}ensureScalesHaveIDs(){I(this.options.scales||{},(e,t)=>{e.id=t})}buildOrUpdateScales(){let e=this.options,t=e.scales,n=this.scales,r=Object.keys(n).reduce((e,t)=>(e[t]=!1,e),{}),i=[];t&&(i=i.concat(Object.keys(t).map(e=>{let n=t[e],r=_o(e,n),i=r===`r`,a=r===`x`;return{options:n,dposition:i?`chartArea`:a?`bottom`:`left`,dtype:i?`radialLinear`:a?`category`:`linear`}}))),I(i,t=>{let i=t.options,a=i.id,o=_o(a,i),s=P(i.type,t.dtype);(i.position===void 0||Po(i.position,o)!==Po(t.dposition))&&(i.position=t.dposition),r[a]=!0;let c=null;a in n&&n[a].type===s?c=n[a]:(c=new(X.getScale(s))({id:a,type:s,ctx:this.ctx,chart:this}),n[c.id]=c),c.init(i,e)}),I(r,(e,t)=>{e||delete n[t]}),I(n,e=>{Y.configure(this,e,e.options),Y.addBox(this,e)})}_updateMetasets(){let e=this._metasets,t=this.data.datasets.length,n=e.length;if(e.sort((e,t)=>e.index-t.index),n>t){for(let e=t;et.length&&delete this._stacks,e.forEach((e,n)=>{t.filter(t=>t===e._dataset).length===0&&this._destroyDatasetMeta(n)})}buildOrUpdateControllers(){let e=[],t=this.data.datasets,n,r;for(this._removeUnreferencedMetasets(),n=0,r=t.length;n{this.getDatasetMeta(t).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins(`reset`)}update(e){let t=this.config;t.update();let n=this._options=t.createResolver(t.chartOptionScopes(),this.getContext()),r=this._animationsDisabled=!n.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins(`beforeUpdate`,{mode:e,cancelable:!0})===!1)return;let i=this.buildOrUpdateControllers();this.notifyPlugins(`beforeElementsUpdate`);let a=0;for(let e=0,t=this.data.datasets.length;e{e.reset()}),this._updateDatasets(e),this.notifyPlugins(`afterUpdate`,{mode:e}),this._layers.sort(Fo(`z`,`_idx`));let{_active:o,_lastEvent:s}=this;s?this._eventHandler(s,!0):o.length&&this._updateHoverStyles(o,o,!0),this.render()}_updateScales(){I(this.scales,e=>{Y.removeBox(this,e)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){let e=this.options;(!Xe(new Set(Object.keys(this._listeners)),new Set(e.events))||!!this._responsiveListeners!==e.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){let{_hiddenIndices:e}=this,t=this._getUniformDataChanges()||[];for(let{method:n,start:r,count:i}of t)Vo(e,r,n===`_removeElements`?-i:i)}_getUniformDataChanges(){let e=this._dataChanges;if(!e||!e.length)return;this._dataChanges=[];let t=this.data.datasets.length,n=t=>new Set(e.filter(e=>e[0]===t).map((e,t)=>t+`,`+e.splice(1).join(`,`))),r=n(0);for(let e=1;ee.split(`,`)).map(e=>({method:e[1],start:+e[2],count:+e[3]}))}_updateLayout(e){if(this.notifyPlugins(`beforeLayout`,{cancelable:!0})===!1)return;Y.update(this,this.width,this.height,e);let t=this.chartArea,n=t.width<=0||t.height<=0;this._layers=[],I(this.boxes,e=>{n&&e.position===`chartArea`||(e.configure&&e.configure(),this._layers.push(...e._layers()))},this),this._layers.forEach((e,t)=>{e._idx=t}),this.notifyPlugins(`afterLayout`)}_updateDatasets(e){if(this.notifyPlugins(`beforeDatasetsUpdate`,{mode:e,cancelable:!0})!==!1){for(let e=0,t=this.data.datasets.length;e=0;--t)this._drawDataset(e[t]);this.notifyPlugins(`afterDatasetsDraw`)}_drawDataset(e){let t=this.ctx,n={meta:e,index:e.index,cancelable:!0},r=Ur(this,e);this.notifyPlugins(`beforeDatasetDraw`,n)!==!1&&(r&&un(t,r),e.controller.draw(),r&&dn(t),n.cancelable=!1,this.notifyPlugins(`afterDatasetDraw`,n))}isPointInArea(e){return ln(e,this.chartArea,this._minPadding)}getElementsAtEventForMode(e,t,n,r){let i=Yi.modes[t];return typeof i==`function`?i(this,e,n,r):[]}getDatasetMeta(e){let t=this.data.datasets[e],n=this._metasets,r=n.filter(e=>e&&e._dataset===t).pop();return r||(r={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:t&&t.order||0,index:e,_dataset:t,_parsed:[],_sorted:!1},n.push(r)),r}getContext(){return this.$context||=On(null,{chart:this,type:`chart`})}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(e){let t=this.data.datasets[e];if(!t)return!1;let n=this.getDatasetMeta(e);return typeof n.hidden==`boolean`?!n.hidden:!t.hidden}setDatasetVisibility(e,t){let n=this.getDatasetMeta(e);n.hidden=!t}toggleDataVisibility(e){this._hiddenIndices[e]=!this._hiddenIndices[e]}getDataVisibility(e){return!this._hiddenIndices[e]}_updateVisibility(e,t,n){let r=n?`show`:`hide`,i=this.getDatasetMeta(e),a=i.controller._resolveAnimations(void 0,r);Je(t)?(i.data[t].hidden=!n,this.update()):(this.setDatasetVisibility(e,n),a.update(i,{visible:n}),this.update(t=>t.datasetIndex===e?r:void 0))}hide(e,t){this._updateVisibility(e,t,!1)}show(e,t){this._updateVisibility(e,t,!0)}_destroyDatasetMeta(e){let t=this._metasets[e];t&&t.controller&&t.controller._destroy(),delete this._metasets[e]}_stop(){let e,t;for(this.stop(),Wr.remove(this),e=0,t=this.data.datasets.length;e{t.addEventListener(this,n,r),e[n]=r},r=(e,t,n)=>{e.offsetX=t,e.offsetY=n,this._eventHandler(e)};I(this.options.events,e=>n(e,r))}bindResponsiveEvents(){this._responsiveListeners||={};let e=this._responsiveListeners,t=this.platform,n=(n,r)=>{t.addEventListener(this,n,r),e[n]=r},r=(n,r)=>{e[n]&&(t.removeEventListener(this,n,r),delete e[n])},i=(e,t)=>{this.canvas&&this.resize(e,t)},a,o=()=>{r(`attach`,o),this.attached=!0,this.resize(),n(`resize`,i),n(`detach`,a)};a=()=>{this.attached=!1,r(`resize`,i),this._stop(),this._resize(0,0),n(`attach`,o)},t.isAttached(this.canvas)?o():a()}unbindEvents(){I(this._listeners,(e,t)=>{this.platform.removeEventListener(this,t,e)}),this._listeners={},I(this._responsiveListeners,(e,t)=>{this.platform.removeEventListener(this,t,e)}),this._responsiveListeners=void 0}updateHoverStyle(e,t,n){let r=n?`set`:`remove`,i,a,o,s;for(t===`dataset`&&(i=this.getDatasetMeta(e[0].datasetIndex),i.controller[`_`+r+`DatasetHoverStyle`]()),o=0,s=e.length;o{let n=this.getDatasetMeta(e);if(!n)throw Error(`No dataset found at index `+e);return{datasetIndex:e,element:n.data[t],index:t}});Ie(n,t)||(this._active=n,this._lastEvent=null,this._updateHoverStyles(n,t))}notifyPlugins(e,t,n){return this._plugins.notify(this,e,t,n)}isPluginEnabled(e){return this._plugins._cache.filter(t=>t.plugin.id===e).length===1}_updateHoverStyles(e,t,n){let r=this.options.hover,i=(e,t)=>e.filter(e=>!t.some(t=>e.datasetIndex===t.datasetIndex&&e.index===t.index)),a=i(t,e),o=n?e:i(e,t);a.length&&this.updateHoverStyle(a,r.mode,!1),o.length&&r.mode&&this.updateHoverStyle(o,r.mode,!0)}_eventHandler(e,t){let n={event:e,replay:t,cancelable:!0,inChartArea:this.isPointInArea(e)},r=t=>(t.options.events||this.options.events).includes(e.native.type);if(this.notifyPlugins(`beforeEvent`,n,r)===!1)return;let i=this._handleEvent(e,t,n.inChartArea);return n.cancelable=!1,this.notifyPlugins(`afterEvent`,n,r),(i||n.changed)&&this.render(),this}_handleEvent(e,t,n){let{_active:r=[],options:i}=this,a=t,o=this._getActiveElements(e,r,n,a),s=Ze(e),c=Ho(e,this._lastEvent,n,s);n&&(this._lastEvent=null,F(i.onHover,[e,o,this],this),s&&F(i.onClick,[e,o,this],this));let l=!Ie(o,r);return(l||t)&&(this._active=o,this._updateHoverStyles(o,r,t)),this._lastEvent=c,l}_getActiveElements(e,t,n,r){if(e.type===`mouseout`)return[];if(!n)return t;let i=this.options.hover;return this.getElementsAtEventForMode(e,i.mode,i,r)}};function Wo(){return I(Uo.instances,e=>e._plugins.invalidate())}function Go(e,t,n){let{startAngle:r,x:i,y:a,outerRadius:o,innerRadius:s,options:c}=t,{borderWidth:l,borderJoinStyle:u}=c,d=Math.min(l/o,H(r-n));if(e.beginPath(),e.arc(i,a,o-l/2,r+d/2,n-d/2),s>0){let t=Math.min(l/s,H(r-n));e.arc(i,a,s+l/2,n-t/2,r+t/2,!0)}else{let t=Math.min(l/2,o*H(r-n));if(u===`round`)e.arc(i,a,t,n-L/2,r+L/2,!0);else if(u===`bevel`){let o=2*t*t,s=-o*Math.cos(n+L/2)+i,c=-o*Math.sin(n+L/2)+a,l=o*Math.cos(r+L/2)+i,u=o*Math.sin(r+L/2)+a;e.lineTo(s,c),e.lineTo(l,u)}}e.closePath(),e.moveTo(0,0),e.rect(0,0,e.canvas.width,e.canvas.height),e.clip(`evenodd`)}function Ko(e,t,n){let{startAngle:r,pixelMargin:i,x:a,y:o,outerRadius:s,innerRadius:c}=t,l=i/s;e.beginPath(),e.arc(a,o,s,r-l,n+l),c>i?(l=i/c,e.arc(a,o,c,n+l,r-l,!0)):e.arc(a,o,i,n+z,r-z),e.closePath(),e.clip()}function qo(e){return Cn(e,[`outerStart`,`outerEnd`,`innerStart`,`innerEnd`])}function Jo(e,t,n,r){let i=qo(e.options.borderRadius),a=(n-t)/2,o=Math.min(a,r*t/2),s=e=>{let t=(n-Math.min(a,e))*r/2;return U(e,0,Math.min(a,t))};return{outerStart:s(i.outerStart),outerEnd:s(i.outerEnd),innerStart:U(i.innerStart,0,o),innerEnd:U(i.innerEnd,0,o)}}function Yo(e,t,n,r){return{x:n+e*Math.cos(t),y:r+e*Math.sin(t)}}function Xo(e,t,n,r,i,a){let{x:o,y:s,startAngle:c,pixelMargin:l,innerRadius:u}=t,d=Math.max(t.outerRadius+r+n-l,0),f=u>0?u+r+n+l:0,p=0,m=i-c;if(r){let e=((u>0?u-r:0)+(d>0?d-r:0))/2;p=(m-(e===0?m:m*e/(e+r)))/2}let h=(m-Math.max(.001,m*d-n/L)/d)/2,g=c+h+p,_=i-h-p,{outerStart:v,outerEnd:y,innerStart:b,innerEnd:x}=Jo(t,f,d,_-g),S=d-v,C=d-y,w=g+v/S,T=_-y/C,E=f+b,D=f+x,ee=g+b/E,O=_-x/D;if(e.beginPath(),a){let t=(w+T)/2;if(e.arc(o,s,d,w,t),e.arc(o,s,d,t,T),y>0){let t=Yo(C,T,o,s);e.arc(t.x,t.y,y,T,_+z)}let n=Yo(D,_,o,s);if(e.lineTo(n.x,n.y),x>0){let t=Yo(D,O,o,s);e.arc(t.x,t.y,x,_+z,O+Math.PI)}let r=(_-x/f+(g+b/f))/2;if(e.arc(o,s,f,_-x/f,r,!0),e.arc(o,s,f,r,g+b/f,!0),b>0){let t=Yo(E,ee,o,s);e.arc(t.x,t.y,b,ee+Math.PI,g-z)}let i=Yo(S,g,o,s);if(e.lineTo(i.x,i.y),v>0){let t=Yo(S,w,o,s);e.arc(t.x,t.y,v,g-z,w)}}else{e.moveTo(o,s);let t=Math.cos(w)*d+o,n=Math.sin(w)*d+s;e.lineTo(t,n);let r=Math.cos(T)*d+o,i=Math.sin(T)*d+s;e.lineTo(r,i)}e.closePath()}function Zo(e,t,n,r,i){let{fullCircles:a,startAngle:o,circumference:s}=t,c=t.endAngle;if(a){Xo(e,t,n,r,c,i);for(let t=0;t=L&&p===0&&u!==`miter`&&Go(e,t,h),a||(Xo(e,t,n,r,h,i),e.stroke())}var $o=class extends Fa{static id=`arc`;static defaults={borderAlign:`center`,borderColor:`#fff`,borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0,selfJoin:!1};static defaultRoutes={backgroundColor:`backgroundColor`};static descriptors={_scriptable:!0,_indexable:e=>e!==`borderDash`};circumference;endAngle;fullCircles;innerRadius;outerRadius;pixelMargin;startAngle;constructor(e){super(),this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,e&&Object.assign(this,e)}inRange(e,t,n){let{angle:r,distance:i}=pt(this.getProps([`x`,`y`],n),{x:e,y:t}),{startAngle:a,endAngle:o,innerRadius:s,outerRadius:c,circumference:l}=this.getProps([`startAngle`,`endAngle`,`innerRadius`,`outerRadius`,`circumference`],n),u=(this.options.spacing+this.options.borderWidth)/2,d=P(l,o-a),f=gt(r,a,o)&&a!==o,p=d>=R||f,m=W(i,s+u,c+u);return p&&m}getCenterPoint(e){let{x:t,y:n,startAngle:r,endAngle:i,innerRadius:a,outerRadius:o}=this.getProps([`x`,`y`,`startAngle`,`endAngle`,`innerRadius`,`outerRadius`],e),{offset:s,spacing:c}=this.options,l=(r+i)/2,u=(a+o+c+s)/2;return{x:t+Math.cos(l)*u,y:n+Math.sin(l)*u}}tooltipPosition(e){return this.getCenterPoint(e)}draw(e){let{options:t,circumference:n}=this,r=(t.offset||0)/4,i=(t.spacing||0)/2,a=t.circular;if(this.pixelMargin=t.borderAlign===`inner`?.33:0,this.fullCircles=n>R?Math.floor(n/R):0,n===0||this.innerRadius<0||this.outerRadius<0)return;e.save();let o=(this.startAngle+this.endAngle)/2;e.translate(Math.cos(o)*r,Math.sin(o)*r);let s=r*(1-Math.sin(Math.min(L,n||0)));e.fillStyle=t.backgroundColor,e.strokeStyle=t.borderColor,Zo(e,this,s,i,a),Qo(e,this,s,i,a),e.restore()}};function es(e,t,n=t){e.lineCap=P(n.borderCapStyle,t.borderCapStyle),e.setLineDash(P(n.borderDash,t.borderDash)),e.lineDashOffset=P(n.borderDashOffset,t.borderDashOffset),e.lineJoin=P(n.borderJoinStyle,t.borderJoinStyle),e.lineWidth=P(n.borderWidth,t.borderWidth),e.strokeStyle=P(n.borderColor,t.borderColor)}function ts(e,t,n){e.lineTo(n.x,n.y)}function ns(e){return e.stepped?fn:e.tension||e.cubicInterpolationMode===`monotone`?pn:ts}function rs(e,t,n={}){let r=e.length,{start:i=0,end:a=r-1}=n,{start:o,end:s}=t,c=Math.max(i,o),l=Math.min(a,s),u=is&&a>s;return{count:r,start:c,loop:t.loop,ilen:l(o+(l?s-e:e))%a,y=()=>{h!==g&&(e.lineTo(u,g),e.lineTo(u,h),e.lineTo(u,_))};for(c&&(p=i[v(0)],e.moveTo(p.x,p.y)),f=0;f<=s;++f){if(p=i[v(f)],p.skip)continue;let t=p.x,n=p.y,r=t|0;r===m?(ng&&(g=n),u=(d*u+t)/++d):(y(),e.lineTo(t,n),m=r,d=0,h=g=n),_=n}y()}function os(e){let t=e.options,n=t.borderDash&&t.borderDash.length;return!e._decimated&&!e._loop&&!t.tension&&t.cubicInterpolationMode!==`monotone`&&!t.stepped&&!n?as:is}function ss(e){return e.stepped?Sr:e.tension||e.cubicInterpolationMode===`monotone`?Cr:xr}function cs(e,t,n,r){let i=t._path;i||(i=t._path=new Path2D,t.path(i,n,r)&&i.closePath()),es(e,t.options),e.stroke(i)}function ls(e,t,n,r){let{segments:i,options:a}=t,o=os(t);for(let s of i)es(e,a,s.style),e.beginPath(),o(e,t,s,{start:n,end:n+r-1})&&e.closePath(),e.stroke()}var us=typeof Path2D==`function`;function ds(e,t,n,r){us&&!t.options.segment?cs(e,t,n,r):ls(e,t,n,r)}var fs=class extends Fa{static id=`line`;static defaults={borderCapStyle:`butt`,borderDash:[],borderDashOffset:0,borderJoinStyle:`miter`,borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:`default`,fill:!1,spanGaps:!1,stepped:!1,tension:0};static defaultRoutes={backgroundColor:`backgroundColor`,borderColor:`borderColor`};static descriptors={_scriptable:!0,_indexable:e=>e!==`borderDash`&&e!==`fill`};constructor(e){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,e&&Object.assign(this,e)}updateControlPoints(e,t){let n=this.options;if((n.tension||n.cubicInterpolationMode===`monotone`)&&!n.stepped&&!this._pointsUpdated){let r=n.spanGaps?this._loop:this._fullLoop;ir(this._points,n,e,r,t),this._pointsUpdated=!0}}set points(e){this._points=e,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||=Ir(this,this.options.segment)}first(){let e=this.segments,t=this.points;return e.length&&t[e[0].start]}last(){let e=this.segments,t=this.points,n=e.length;return n&&t[e[n-1].end]}interpolate(e,t){let n=this.options,r=e[t],i=this.points,a=Nr(this,{property:t,start:r,end:r});if(!a.length)return;let o=[],s=ss(n),c,l;for(c=0,l=a.length;ce.replace(`rgb(`,`rgba(`).replace(`)`,`, 0.5)`));function Ds(e){return Ts[e%Ts.length]}function Os(e){return Es[e%Es.length]}function ks(e,t){return e.borderColor=Ds(t),e.backgroundColor=Os(t),++t}function As(e,t){return e.backgroundColor=e.data.map(()=>Ds(t++)),t}function js(e,t){return e.backgroundColor=e.data.map(()=>Os(t++)),t}function Ms(e){let t=0;return(n,r)=>{let i=e.getDatasetMeta(r).controller;i instanceof Fi?t=As(n,t):i instanceof Li?t=js(n,t):i&&(t=ks(n,t))}}function Ns(e){let t;for(t in e)if(e[t].borderColor||e[t].backgroundColor)return!0;return!1}function Ps(e){return e&&(e.borderColor||e.backgroundColor)}function Fs(){return K.borderColor!==`rgba(0,0,0,0.1)`||K.backgroundColor!==`rgba(0,0,0,0.1)`}var Is={id:`colors`,defaults:{enabled:!0,forceOverride:!1},beforeLayout(e,t,n){if(!n.enabled)return;let{data:{datasets:r},options:i}=e.config,{elements:a}=i,o=Ns(r)||Ps(i)||a&&Ns(a)||Fs();if(!n.forceOverride&&o)return;let s=Ms(e);r.forEach(s)}};function Ls(e,t,n,r,i){let a=i.samples||r;if(a>=n)return e.slice(t,t+n);let o=[],s=(n-2)/(a-2),c=0,l=t+n-1,u=t,d,f,p,m,h;for(o[c++]=e[u],d=0;dp&&(p=m,f=e[a],h=a);o[c++]=f,u=h}return o[c++]=e[l],o}function Rs(e,t,n,r){let i=0,a=0,o,s,c,l,u,d,f,p,m,h,g=[],_=t+n-1,v=e[t].x,y=e[_].x-v;for(o=t;oh&&(h=l,f=o),i=(a*i+s.x)/++a;else{let n=o-1;if(!k(d)&&!k(f)){let t=Math.min(d,f),r=Math.max(d,f);t!==p&&t!==n&&g.push({...e[t],x:i}),r!==p&&r!==n&&g.push({...e[r],x:i})}o>0&&n!==p&&g.push(e[n]),g.push(s),u=t,a=0,m=h=l,d=f=p=o}}return g}function zs(e){if(e._decimated){let t=e._data;delete e._decimated,delete e._data,Object.defineProperty(e,"data",{configurable:!0,enumerable:!0,writable:!0,value:t})}}function Bs(e){e.data.datasets.forEach(e=>{zs(e)})}function Vs(e,t){let n=t.length,r=0,i,{iScale:a}=e,{min:o,max:s,minDefined:c,maxDefined:l}=a.getUserBounds();return c&&(r=U(yt(t,a.axis,o).lo,0,n-1)),i=l?U(yt(t,a.axis,s).hi+1,r,n)-r:n-r,{start:r,count:i}}var Hs={id:`decimation`,defaults:{algorithm:`min-max`,enabled:!1},beforeElementsUpdate:(e,t,n)=>{if(!n.enabled){Bs(e);return}let r=e.width;e.data.datasets.forEach((t,i)=>{let{_data:a,indexAxis:o}=t,s=e.getDatasetMeta(i),c=a||t.data;if(En([o,e.options.indexAxis])===`y`||!s.controller.supportsDecimation)return;let l=e.scales[s.xAxisID];if(l.type!==`linear`&&l.type!==`time`||e.options.parsing)return;let{start:u,count:d}=Vs(s,c);if(d<=(n.threshold||4*r)){zs(t);return}k(a)&&(t._data=c,delete t.data,Object.defineProperty(t,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(e){this._data=e}}));let f;switch(n.algorithm){case`lttb`:f=Ls(c,u,d,r,n);break;case`min-max`:f=Rs(c,u,d,r);break;default:throw Error(`Unsupported decimation algorithm '${n.algorithm}'`)}t._decimated=f})},destroy(e){Bs(e)}};function Us(e,t,n){let r=e.segments,i=e.points,a=t.points,o=[];for(let e of r){let{start:r,end:s}=e;s=Ks(r,s,i);let c=Ws(n,i[r],i[s],e.loop);if(!t.segments){o.push({source:e,target:c,start:i[r],end:i[s]});continue}let l=Nr(t,c);for(let t of l){let r=Ws(n,a[t.start],a[t.end],t.loop),s=Mr(e,i,r);for(let e of s)o.push({source:e,target:t,start:{[n]:qs(c,r,`start`,Math.max)},end:{[n]:qs(c,r,`end`,Math.min)}})}}return o}function Ws(e,t,n,r){if(r)return;let i=t[e],a=n[e];return e===`angle`&&(i=H(i),a=H(a)),{property:e,start:i,end:a}}function Gs(e,t){let{x:n=null,y:r=null}=e||{},i=t.points,a=[];return t.segments.forEach(({start:e,end:t})=>{t=Ks(e,t,i);let o=i[e],s=i[t];r===null?n!==null&&(a.push({x:n,y:o.y}),a.push({x:n,y:s.y})):(a.push({x:o.x,y:r}),a.push({x:s.x,y:r}))}),a}function Ks(e,t,n){for(;t>e;t--){let e=n[t];if(!isNaN(e.x)&&!isNaN(e.y))break}return t}function qs(e,t,n,r){return e&&t?r(e[n],t[n]):e?e[n]:t?t[n]:0}function Js(e,t){let n=[],r=!1;return A(e)?(r=!0,n=e):n=Gs(e,t),n.length?new fs({points:n,options:{tension:0},_loop:r,_fullLoop:r}):null}function Ys(e){return e&&e.fill!==!1}function Xs(e,t,n){let r=e[t].fill,i=[t],a;if(!n)return r;for(;r!==!1&&i.indexOf(r)===-1;){if(!M(r))return r;if(a=e[r],!a)return!1;if(a.visible)return r;i.push(r),r=a.fill}return!1}function Zs(e,t,n){let r=tc(e);if(j(r))return isNaN(r.value)?!1:r;let i=parseFloat(r);return M(i)&&Math.floor(i)===i?Qs(r[0],t,i,n):[`origin`,`start`,`end`,`stack`,`shape`].indexOf(r)>=0&&r}function Qs(e,t,n,r){return(e===`-`||e===`+`)&&(n=t+n),n===t||n<0||n>=r?!1:n}function $s(e,t){let n=null;return e===`start`?n=t.bottom:e===`end`?n=t.top:j(e)?n=t.getPixelForValue(e.value):t.getBasePixel&&(n=t.getBasePixel()),n}function ec(e,t,n){let r;return r=e===`start`?n:e===`end`?t.options.reverse?t.min:t.max:j(e)?e.value:t.getBaseValue(),r}function tc(e){let t=e.options,n=t.fill,r=P(n&&n.target,n);return r===void 0&&(r=!!t.backgroundColor),r===!1||r===null?!1:r===!0?`origin`:r}function nc(e){let{scale:t,index:n,line:r}=e,i=[],a=r.segments,o=r.points,s=rc(t,n);s.push(Js({x:null,y:t.bottom},r));for(let e=0;e=0;--t){let n=i[t].$filler;n&&(n.line.updateControlPoints(a,n.axis),r&&n.fill&&fc(e.ctx,n,a))}},beforeDatasetsDraw(e,t,n){if(n.drawTime!==`beforeDatasetsDraw`)return;let r=e.getSortedVisibleDatasetMetas();for(let t=r.length-1;t>=0;--t){let n=r[t].$filler;Ys(n)&&fc(e.ctx,n,e.chartArea)}},beforeDatasetDraw(e,t,n){let r=t.meta.$filler;!Ys(r)||n.drawTime!==`beforeDatasetDraw`||fc(e.ctx,r,e.chartArea)},defaults:{propagate:!0,drawTime:`beforeDatasetDraw`}},bc=(e,t)=>{let{boxHeight:n=t,boxWidth:r=t}=e;return e.usePointStyle&&(n=Math.min(n,t),r=e.pointStyleWidth||Math.min(r,t)),{boxWidth:r,boxHeight:n,itemHeight:Math.max(t,n)}},xc=(e,t)=>e!==null&&t!==null&&e.datasetIndex===t.datasetIndex&&e.index===t.index,Sc=class extends Fa{constructor(e){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=e.chart,this.options=e.options,this.ctx=e.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(e,t,n){this.maxWidth=e,this.maxHeight=t,this._margins=n,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){let e=this.options.labels||{},t=F(e.generateLabels,[this.chart],this)||[];e.filter&&(t=t.filter(t=>e.filter(t,this.chart.data))),e.sort&&(t=t.sort((t,n)=>e.sort(t,n,this.chart.data))),this.options.reverse&&t.reverse(),this.legendItems=t}fit(){let{options:e,ctx:t}=this;if(!e.display){this.width=this.height=0;return}let n=e.labels,r=J(n.font),i=r.size,a=this._computeTitleHeight(),{boxWidth:o,itemHeight:s}=bc(n,i),c,l;t.font=r.string,this.isHorizontal()?(c=this.maxWidth,l=this._fitRows(a,i,o,s)+10):(l=this.maxHeight,c=this._fitCols(a,r,o,s)+10),this.width=Math.min(c,e.maxWidth||this.maxWidth),this.height=Math.min(l,e.maxHeight||this.maxHeight)}_fitRows(e,t,n,r){let{ctx:i,maxWidth:a,options:{labels:{padding:o}}}=this,s=this.legendHitBoxes=[],c=this.lineWidths=[0],l=r+o,u=e;i.textAlign=`left`,i.textBaseline=`middle`;let d=-1,f=-l;return this.legendItems.forEach((e,p)=>{let m=n+t/2+i.measureText(e.text).width;(p===0||c[c.length-1]+m+2*o>a)&&(u+=l,c[c.length-(p>0?0:1)]=0,f+=l,d++),s[p]={left:0,top:f,row:d,width:m,height:r},c[c.length-1]+=m+o}),u}_fitCols(e,t,n,r){let{ctx:i,maxHeight:a,options:{labels:{padding:o}}}=this,s=this.legendHitBoxes=[],c=this.columnSizes=[],l=a-e,u=o,d=0,f=0,p=0,m=0;return this.legendItems.forEach((e,a)=>{let{itemWidth:h,itemHeight:g}=Cc(n,t,i,e,r);a>0&&f+g+2*o>l&&(u+=d+o,c.push({width:d,height:f}),p+=d+o,m++,d=f=0),s[a]={left:p,top:f,col:m,width:h,height:g},d=Math.max(d,h),f+=g+o}),u+=d,c.push({width:d,height:f}),u}adjustHitBoxes(){if(!this.options.display)return;let e=this._computeTitleHeight(),{legendHitBoxes:t,options:{align:n,labels:{padding:r},rtl:i}}=this,a=Er(i,this.left,this.width);if(this.isHorizontal()){let i=0,o=G(n,this.left+r,this.right-this.lineWidths[i]);for(let s of t)i!==s.row&&(i=s.row,o=G(n,this.left+r,this.right-this.lineWidths[i])),s.top+=this.top+e+r,s.left=a.leftForLtr(a.x(o),s.width),o+=s.width+r}else{let i=0,o=G(n,this.top+e+r,this.bottom-this.columnSizes[i].height);for(let s of t)s.col!==i&&(i=s.col,o=G(n,this.top+e+r,this.bottom-this.columnSizes[i].height)),s.top=o,s.left+=this.left+r,s.left=a.leftForLtr(a.x(s.left),s.width),o+=s.height+r}}isHorizontal(){return this.options.position===`top`||this.options.position===`bottom`}draw(){if(this.options.display){let e=this.ctx;un(e,this),this._draw(),dn(e)}}_draw(){let{options:e,columnSizes:t,lineWidths:n,ctx:r}=this,{align:i,labels:a}=e,o=K.color,s=Er(e.rtl,this.left,this.width),c=J(a.font),{padding:l}=a,u=c.size,d=u/2,f;this.drawTitle(),r.textAlign=s.textAlign(`left`),r.textBaseline=`middle`,r.lineWidth=.5,r.font=c.string;let{boxWidth:p,boxHeight:m,itemHeight:h}=bc(a,u),g=function(e,t,n){if(isNaN(p)||p<=0||isNaN(m)||m<0)return;r.save();let i=P(n.lineWidth,1);if(r.fillStyle=P(n.fillStyle,o),r.lineCap=P(n.lineCap,`butt`),r.lineDashOffset=P(n.lineDashOffset,0),r.lineJoin=P(n.lineJoin,`miter`),r.lineWidth=i,r.strokeStyle=P(n.strokeStyle,o),r.setLineDash(P(n.lineDash,[])),a.usePointStyle)cn(r,{radius:m*Math.SQRT2/2,pointStyle:n.pointStyle,rotation:n.rotation,borderWidth:i},s.xPlus(e,p/2),t+d,a.pointStyleWidth&&p);else{let a=t+Math.max((u-m)/2,0),o=s.leftForLtr(e,p),c=Tn(n.borderRadius);r.beginPath(),Object.values(c).some(e=>e!==0)?vn(r,{x:o,y:a,w:p,h:m,radius:c}):r.rect(o,a,p,m),r.fill(),i!==0&&r.stroke()}r.restore()},_=function(e,t,n){_n(r,n.text,e,t+h/2,c,{strikethrough:n.hidden,textAlign:s.textAlign(n.textAlign)})},v=this.isHorizontal(),y=this._computeTitleHeight();f=v?{x:G(i,this.left+l,this.right-n[0]),y:this.top+l+y,line:0}:{x:this.left+l,y:G(i,this.top+y+l,this.bottom-t[0].height),line:0},Dr(this.ctx,e.textDirection);let b=h+l;this.legendItems.forEach((o,u)=>{r.strokeStyle=o.fontColor,r.fillStyle=o.fontColor;let m=r.measureText(o.text).width,h=s.textAlign(o.textAlign||=a.textAlign),x=p+d+m,S=f.x,C=f.y;if(s.setWidth(this.width),v?u>0&&S+x+l>this.right&&(C=f.y+=b,f.line++,S=f.x=G(i,this.left+l,this.right-n[f.line])):u>0&&C+b>this.bottom&&(S=f.x=S+t[f.line].width+l,f.line++,C=f.y=G(i,this.top+y+l,this.bottom-t[f.line].height)),g(s.x(S),C,o),S=At(h,S+p+d,v?S+x:this.right,e.rtl),_(s.x(S),C,o),v)f.x+=x+l;else if(typeof o.text!=`string`){let e=c.lineHeight;f.y+=Ec(o,e)+l}else f.y+=b}),Or(this.ctx,e.textDirection)}drawTitle(){let e=this.options,t=e.title,n=J(t.font),r=q(t.padding);if(!t.display)return;let i=Er(e.rtl,this.left,this.width),a=this.ctx,o=t.position,s=n.size/2,c=r.top+s,l,u=this.left,d=this.width;if(this.isHorizontal())d=Math.max(...this.lineWidths),l=this.top+c,u=G(e.align,u,this.right-d);else{let t=this.columnSizes.reduce((e,t)=>Math.max(e,t.height),0);l=c+G(e.align,this.top,this.bottom-t-e.labels.padding-this._computeTitleHeight())}let f=G(o,u,u+d);a.textAlign=i.textAlign(kt(o)),a.textBaseline=`middle`,a.strokeStyle=t.color,a.fillStyle=t.color,a.font=n.string,_n(a,t.text,f,l,n)}_computeTitleHeight(){let e=this.options.title,t=J(e.font),n=q(e.padding);return e.display?t.lineHeight+n.height:0}_getLegendItemAt(e,t){let n,r,i;if(W(e,this.left,this.right)&&W(t,this.top,this.bottom)){for(i=this.legendHitBoxes,n=0;ne.length>t.length?e:t)),t+n.size/2+r.measureText(i).width}function Tc(e,t,n){let r=e;return typeof t.text!=`string`&&(r=Ec(t,n)),r}function Ec(e,t){return t*(e.text?e.text.length:0)}function Dc(e,t){return!!((e===`mousemove`||e===`mouseout`)&&(t.onHover||t.onLeave)||t.onClick&&(e===`click`||e===`mouseup`))}var Oc={id:`legend`,_element:Sc,start(e,t,n){let r=e.legend=new Sc({ctx:e.ctx,options:n,chart:e});Y.configure(e,r,n),Y.addBox(e,r)},stop(e){Y.removeBox(e,e.legend),delete e.legend},beforeUpdate(e,t,n){let r=e.legend;Y.configure(e,r,n),r.options=n},afterUpdate(e){let t=e.legend;t.buildLabels(),t.adjustHitBoxes()},afterEvent(e,t){t.replay||e.legend.handleEvent(t.event)},defaults:{display:!0,position:`top`,align:`center`,fullSize:!0,reverse:!1,weight:1e3,onClick(e,t,n){let r=t.datasetIndex,i=n.chart;i.isDatasetVisible(r)?(i.hide(r),t.hidden=!0):(i.show(r),t.hidden=!1)},onHover:null,onLeave:null,labels:{color:e=>e.chart.options.color,boxWidth:40,padding:10,generateLabels(e){let t=e.data.datasets,{labels:{usePointStyle:n,pointStyle:r,textAlign:i,color:a,useBorderRadius:o,borderRadius:s}}=e.legend.options;return e._getSortedDatasetMetas().map(e=>{let c=e.controller.getStyle(n?0:void 0),l=q(c.borderWidth);return{text:t[e.index].label,fillStyle:c.backgroundColor,fontColor:a,hidden:!e.visible,lineCap:c.borderCapStyle,lineDash:c.borderDash,lineDashOffset:c.borderDashOffset,lineJoin:c.borderJoinStyle,lineWidth:(l.width+l.height)/4,strokeStyle:c.borderColor,pointStyle:r||c.pointStyle,rotation:c.rotation,textAlign:i||c.textAlign,borderRadius:o&&(s||c.borderRadius),datasetIndex:e.index}},this)}},title:{color:e=>e.chart.options.color,display:!1,position:`center`,text:``}},descriptors:{_scriptable:e=>!e.startsWith(`on`),labels:{_scriptable:e=>![`generateLabels`,`filter`,`sort`].includes(e)}}},kc=class extends Fa{constructor(e){super(),this.chart=e.chart,this.options=e.options,this.ctx=e.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(e,t){let n=this.options;if(this.left=0,this.top=0,!n.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=e,this.height=this.bottom=t;let r=A(n.text)?n.text.length:1;this._padding=q(n.padding);let i=r*J(n.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=i:this.width=i}isHorizontal(){let e=this.options.position;return e===`top`||e===`bottom`}_drawArgs(e){let{top:t,left:n,bottom:r,right:i,options:a}=this,o=a.align,s=0,c,l,u;return this.isHorizontal()?(l=G(o,n,i),u=t+e,c=i-n):(a.position===`left`?(l=n+e,u=G(o,r,t),s=L*-.5):(l=i-e,u=G(o,t,r),s=L*.5),c=r-t),{titleX:l,titleY:u,maxWidth:c,rotation:s}}draw(){let e=this.ctx,t=this.options;if(!t.display)return;let n=J(t.font),r=n.lineHeight/2+this._padding.top,{titleX:i,titleY:a,maxWidth:o,rotation:s}=this._drawArgs(r);_n(e,t.text,0,0,n,{color:t.color,maxWidth:o,rotation:s,textAlign:kt(t.align),textBaseline:`middle`,translation:[i,a]})}};function Ac(e,t){let n=new kc({ctx:e.ctx,options:t,chart:e});Y.configure(e,n,t),Y.addBox(e,n),e.titleBlock=n}var jc={id:`title`,_element:kc,start(e,t,n){Ac(e,n)},stop(e){let t=e.titleBlock;Y.removeBox(e,t),delete e.titleBlock},beforeUpdate(e,t,n){let r=e.titleBlock;Y.configure(e,r,n),r.options=n},defaults:{align:`center`,display:!1,font:{weight:`bold`},fullSize:!0,padding:10,position:`top`,text:``,weight:2e3},defaultRoutes:{color:`color`},descriptors:{_scriptable:!0,_indexable:!1}},Mc=new WeakMap,Nc={id:`subtitle`,start(e,t,n){let r=new kc({ctx:e.ctx,options:n,chart:e});Y.configure(e,r,n),Y.addBox(e,r),Mc.set(e,r)},stop(e){Y.removeBox(e,Mc.get(e)),Mc.delete(e)},beforeUpdate(e,t,n){let r=Mc.get(e);Y.configure(e,r,n),r.options=n},defaults:{align:`center`,display:!1,font:{weight:`normal`},fullSize:!0,padding:0,position:`top`,text:``,weight:1500},defaultRoutes:{color:`color`},descriptors:{_scriptable:!0,_indexable:!1}},Pc={average(e){if(!e.length)return!1;let t,n,r=new Set,i=0,a=0;for(t=0,n=e.length;te+t)/r.size,y:i/a}},nearest(e,t){if(!e.length)return!1;let n=t.x,r=t.y,i=1/0,a,o,s;for(a=0,o=e.length;aMath.max(Math.min(e,n),t);function v(e){return _(g(e*2.55),0,255)}function y(e){return _(g(e*255),0,255)}function b(e){return _(g(e/2.55)/100,0,1)}function x(e){return _(g(e*100),0,100)}var S={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},C=[...`0123456789ABCDEF`],w=e=>C[e&15],T=e=>C[(e&240)>>4]+C[e&15],E=e=>(e&240)>>4==(e&15),D=e=>E(e.r)&&E(e.g)&&E(e.b)&&E(e.a);function ee(e){var t=e.length,n;return e[0]===`#`&&(t===4||t===5?n={r:255&S[e[1]]*17,g:255&S[e[2]]*17,b:255&S[e[3]]*17,a:t===5?S[e[4]]*17:255}:(t===7||t===9)&&(n={r:S[e[1]]<<4|S[e[2]],g:S[e[3]]<<4|S[e[4]],b:S[e[5]]<<4|S[e[6]],a:t===9?S[e[7]]<<4|S[e[8]]:255})),n}var O=(e,t)=>e<255?t(e):``;function te(e){var t=D(e)?w:T;return e?`#`+t(e.r)+t(e.g)+t(e.b)+O(e.a,t):void 0}var ne=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function re(e,t,n){let r=t*Math.min(n,1-n),i=(t,i=(t+e/30)%12)=>n-r*Math.max(Math.min(i-3,9-i,1),-1);return[i(0),i(8),i(4)]}function ie(e,t,n){let r=(r,i=(r+e/60)%6)=>n-n*t*Math.max(Math.min(i,4-i,1),0);return[r(5),r(3),r(1)]}function ae(e,t,n){let r=re(e,1,.5),i;for(t+n>1&&(i=1/(t+n),t*=i,n*=i),i=0;i<3;i++)r[i]*=1-t-n,r[i]+=t;return r}function oe(e,t,n,r,i){return e===i?(t-n)/r+(t.5?l/(2-i-a):l/(i+a),s=oe(t,n,r,l,i),s=s*60+.5),[s|0,c||0,o]}function ce(e,t,n,r){return(Array.isArray(t)?e(t[0],t[1],t[2]):e(t,n,r)).map(y)}function le(e,t,n){return ce(re,e,t,n)}function ue(e,t,n){return ce(ae,e,t,n)}function de(e,t,n){return ce(ie,e,t,n)}function fe(e){return(e%360+360)%360}function pe(e){let t=ne.exec(e),n=255,r;if(!t)return;t[5]!==r&&(n=t[6]?v(+t[5]):y(+t[5]));let i=fe(+t[2]),a=t[3]/100,o=t[4]/100;return r=t[1]===`hwb`?ue(i,a,o):t[1]===`hsv`?de(i,a,o):le(i,a,o),{r:r[0],g:r[1],b:r[2],a:n}}function me(e,t){var n=se(e);n[0]=fe(n[0]+t),n=le(n),e.r=n[0],e.g=n[1],e.b=n[2]}function he(e){if(!e)return;let t=se(e),n=t[0],r=x(t[1]),i=x(t[2]);return e.a<255?`hsla(${n}, ${r}%, ${i}%, ${b(e.a)})`:`hsl(${n}, ${r}%, ${i}%)`}var ge={x:`dark`,Z:`light`,Y:`re`,X:`blu`,W:`gr`,V:`medium`,U:`slate`,A:`ee`,T:`ol`,S:`or`,B:`ra`,C:`lateg`,D:`ights`,R:`in`,Q:`turquois`,E:`hi`,P:`ro`,O:`al`,N:`le`,M:`de`,L:`yello`,F:`en`,K:`ch`,G:`arks`,H:`ea`,I:`ightg`,J:`wh`},_e={OiceXe:`f0f8ff`,antiquewEte:`faebd7`,aqua:`ffff`,aquamarRe:`7fffd4`,azuY:`f0ffff`,beige:`f5f5dc`,bisque:`ffe4c4`,black:`0`,blanKedOmond:`ffebcd`,Xe:`ff`,XeviTet:`8a2be2`,bPwn:`a52a2a`,burlywood:`deb887`,caMtXe:`5f9ea0`,KartYuse:`7fff00`,KocTate:`d2691e`,cSO:`ff7f50`,cSnflowerXe:`6495ed`,cSnsilk:`fff8dc`,crimson:`dc143c`,cyan:`ffff`,xXe:`8b`,xcyan:`8b8b`,xgTMnPd:`b8860b`,xWay:`a9a9a9`,xgYF:`6400`,xgYy:`a9a9a9`,xkhaki:`bdb76b`,xmagFta:`8b008b`,xTivegYF:`556b2f`,xSange:`ff8c00`,xScEd:`9932cc`,xYd:`8b0000`,xsOmon:`e9967a`,xsHgYF:`8fbc8f`,xUXe:`483d8b`,xUWay:`2f4f4f`,xUgYy:`2f4f4f`,xQe:`ced1`,xviTet:`9400d3`,dAppRk:`ff1493`,dApskyXe:`bfff`,dimWay:`696969`,dimgYy:`696969`,dodgerXe:`1e90ff`,fiYbrick:`b22222`,flSOwEte:`fffaf0`,foYstWAn:`228b22`,fuKsia:`ff00ff`,gaRsbSo:`dcdcdc`,ghostwEte:`f8f8ff`,gTd:`ffd700`,gTMnPd:`daa520`,Way:`808080`,gYF:`8000`,gYFLw:`adff2f`,gYy:`808080`,honeyMw:`f0fff0`,hotpRk:`ff69b4`,RdianYd:`cd5c5c`,Rdigo:`4b0082`,ivSy:`fffff0`,khaki:`f0e68c`,lavFMr:`e6e6fa`,lavFMrXsh:`fff0f5`,lawngYF:`7cfc00`,NmoncEffon:`fffacd`,ZXe:`add8e6`,ZcSO:`f08080`,Zcyan:`e0ffff`,ZgTMnPdLw:`fafad2`,ZWay:`d3d3d3`,ZgYF:`90ee90`,ZgYy:`d3d3d3`,ZpRk:`ffb6c1`,ZsOmon:`ffa07a`,ZsHgYF:`20b2aa`,ZskyXe:`87cefa`,ZUWay:`778899`,ZUgYy:`778899`,ZstAlXe:`b0c4de`,ZLw:`ffffe0`,lime:`ff00`,limegYF:`32cd32`,lRF:`faf0e6`,magFta:`ff00ff`,maPon:`800000`,VaquamarRe:`66cdaa`,VXe:`cd`,VScEd:`ba55d3`,VpurpN:`9370db`,VsHgYF:`3cb371`,VUXe:`7b68ee`,VsprRggYF:`fa9a`,VQe:`48d1cc`,VviTetYd:`c71585`,midnightXe:`191970`,mRtcYam:`f5fffa`,mistyPse:`ffe4e1`,moccasR:`ffe4b5`,navajowEte:`ffdead`,navy:`80`,Tdlace:`fdf5e6`,Tive:`808000`,TivedBb:`6b8e23`,Sange:`ffa500`,SangeYd:`ff4500`,ScEd:`da70d6`,pOegTMnPd:`eee8aa`,pOegYF:`98fb98`,pOeQe:`afeeee`,pOeviTetYd:`db7093`,papayawEp:`ffefd5`,pHKpuff:`ffdab9`,peru:`cd853f`,pRk:`ffc0cb`,plum:`dda0dd`,powMrXe:`b0e0e6`,purpN:`800080`,YbeccapurpN:`663399`,Yd:`ff0000`,Psybrown:`bc8f8f`,PyOXe:`4169e1`,saddNbPwn:`8b4513`,sOmon:`fa8072`,sandybPwn:`f4a460`,sHgYF:`2e8b57`,sHshell:`fff5ee`,siFna:`a0522d`,silver:`c0c0c0`,skyXe:`87ceeb`,UXe:`6a5acd`,UWay:`708090`,UgYy:`708090`,snow:`fffafa`,sprRggYF:`ff7f`,stAlXe:`4682b4`,tan:`d2b48c`,teO:`8080`,tEstN:`d8bfd8`,tomato:`ff6347`,Qe:`40e0d0`,viTet:`ee82ee`,JHt:`f5deb3`,wEte:`ffffff`,wEtesmoke:`f5f5f5`,Lw:`ffff00`,LwgYF:`9acd32`};function ve(){let e={},t=Object.keys(_e),n=Object.keys(ge),r,i,a,o,s;for(r=0;r>16&255,a>>8&255,a&255]}return e}var ye;function be(e){ye||(ye=ve(),ye.transparent=[0,0,0,0]);let t=ye[e.toLowerCase()];return t&&{r:t[0],g:t[1],b:t[2],a:t.length===4?t[3]:255}}var xe=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function Se(e){let t=xe.exec(e),n=255,r,i,a;if(t){if(t[7]!==r){let e=+t[7];n=t[8]?v(e):_(e*255,0,255)}return r=+t[1],i=+t[3],a=+t[5],r=255&(t[2]?v(r):_(r,0,255)),i=255&(t[4]?v(i):_(i,0,255)),a=255&(t[6]?v(a):_(a,0,255)),{r,g:i,b:a,a:n}}}function Ce(e){return e&&(e.a<255?`rgba(${e.r}, ${e.g}, ${e.b}, ${b(e.a)})`:`rgb(${e.r}, ${e.g}, ${e.b})`)}var we=e=>e<=.0031308?e*12.92:e**(1/2.4)*1.055-.055,Te=e=>e<=.04045?e/12.92:((e+.055)/1.055)**2.4;function Ee(e,t,n){let r=Te(b(e.r)),i=Te(b(e.g)),a=Te(b(e.b));return{r:y(we(r+n*(Te(b(t.r))-r))),g:y(we(i+n*(Te(b(t.g))-i))),b:y(we(a+n*(Te(b(t.b))-a))),a:e.a+n*(t.a-e.a)}}function De(e,t,n){if(e){let r=se(e);r[t]=Math.max(0,Math.min(r[t]+r[t]*n,t===0?360:1)),r=le(r),e.r=r[0],e.g=r[1],e.b=r[2]}}function Oe(e,t){return e&&Object.assign(t||{},e)}function ke(e){var t={r:0,g:0,b:0,a:255};return Array.isArray(e)?e.length>=3&&(t={r:e[0],g:e[1],b:e[2],a:255},e.length>3&&(t.a=y(e[3]))):(t=Oe(e,{r:0,g:0,b:0,a:1}),t.a=y(t.a)),t}function Ae(e){return e.charAt(0)===`r`?Se(e):pe(e)}var je=class e{constructor(t){if(t instanceof e)return t;let n=typeof t,r;n===`object`?r=ke(t):n===`string`&&(r=ee(t)||be(t)||Ae(t)),this._rgb=r,this._valid=!!r}get valid(){return this._valid}get rgb(){var e=Oe(this._rgb);return e&&(e.a=b(e.a)),e}set rgb(e){this._rgb=ke(e)}rgbString(){return this._valid?Ce(this._rgb):void 0}hexString(){return this._valid?te(this._rgb):void 0}hslString(){return this._valid?he(this._rgb):void 0}mix(e,t){if(e){let n=this.rgb,r=e.rgb,i,a=t===i?.5:t,o=2*a-1,s=n.a-r.a,c=((o*s===-1?o:(o+s)/(1+o*s))+1)/2;i=1-c,n.r=255&c*n.r+i*r.r+.5,n.g=255&c*n.g+i*r.g+.5,n.b=255&c*n.b+i*r.b+.5,n.a=a*n.a+(1-a)*r.a,this.rgb=n}return this}interpolate(e,t){return e&&(this._rgb=Ee(this._rgb,e._rgb,t)),this}clone(){return new e(this.rgb)}alpha(e){return this._rgb.a=y(e),this}clearer(e){let t=this._rgb;return t.a*=1-e,this}greyscale(){let e=this._rgb;return e.r=e.g=e.b=g(e.r*.3+e.g*.59+e.b*.11),this}opaquer(e){let t=this._rgb;return t.a*=1+e,this}negate(){let e=this._rgb;return e.r=255-e.r,e.g=255-e.g,e.b=255-e.b,this}lighten(e){return De(this._rgb,2,e),this}darken(e){return De(this._rgb,2,-e),this}saturate(e){return De(this._rgb,1,e),this}desaturate(e){return De(this._rgb,1,-e),this}rotate(e){return me(this._rgb,e),this}};function Me(){}var Ne=(()=>{let e=0;return()=>e++})();function k(e){return e==null}function A(e){if(Array.isArray&&Array.isArray(e))return!0;let t=Object.prototype.toString.call(e);return t.slice(0,7)===`[object`&&t.slice(-6)===`Array]`}function j(e){return e!==null&&Object.prototype.toString.call(e)===`[object Object]`}function M(e){return(typeof e==`number`||e instanceof Number)&&isFinite(+e)}function N(e,t){return M(e)?e:t}function P(e,t){return e===void 0?t:e}var Pe=(e,t)=>typeof e==`string`&&e.endsWith(`%`)?parseFloat(e)/100:+e/t,Fe=(e,t)=>typeof e==`string`&&e.endsWith(`%`)?parseFloat(e)/100*t:+e;function F(e,t,n){if(e&&typeof e.call==`function`)return e.apply(n,t)}function I(e,t,n,r){let i,a,o;if(A(e))if(a=e.length,r)for(i=a-1;i>=0;i--)t.call(n,e[i],i);else for(i=0;ie,x:e=>e.x,y:e=>e.y};function We(e){let t=e.split(`.`),n=[],r=``;for(let e of t)r+=e,r.endsWith(`\\`)?r=r.slice(0,-1)+`.`:(n.push(r),r=``);return n}function Ge(e){let t=We(e);return e=>{for(let n of t){if(n===``)break;e&&=e[n]}return e}}function Ke(e,t){return(Ue[t]||(Ue[t]=Ge(t)))(e)}function qe(e){return e.charAt(0).toUpperCase()+e.slice(1)}var Je=e=>e!==void 0,Ye=e=>typeof e==`function`,Xe=(e,t)=>{if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0};function Ze(e){return e.type===`mouseup`||e.type===`click`||e.type===`contextmenu`}var L=Math.PI,R=2*L,Qe=R+L,$e=1/0,et=L/180,z=L/2,tt=L/4,nt=L*2/3,rt=Math.log10,B=Math.sign;function it(e,t,n){return Math.abs(e-t)e-t).pop(),t}function st(e){return typeof e==`symbol`||typeof e==`object`&&!!e&&!(Symbol.toPrimitive in e||`toString`in e||`valueOf`in e)}function ct(e){return!st(e)&&!isNaN(parseFloat(e))&&isFinite(e)}function lt(e,t){let n=Math.round(e);return n-t<=e&&n+t>=e}function ut(e,t,n){let r,i,a;for(r=0,i=e.length;rc&&l=Math.min(t,n)-r&&e<=Math.max(t,n)+r}function vt(e,t,n){n||=(n=>e[n]1;)a=i+r>>1,n(a)?i=a:r=a;return{lo:i,hi:r}}var yt=(e,t,n,r)=>vt(e,n,r?r=>{let i=e[r][t];return ie[r][t]vt(e,n,r=>e[r][t]>=n);function xt(e,t,n){let r=0,i=e.length;for(;rr&&e[i-1]>n;)i--;return r>0||i{let n=`_onData`+qe(t),r=e[t];Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value(...t){let i=r.apply(this,t);return e._chartjs.listeners.forEach(e=>{typeof e[n]==`function`&&e[n](...t)}),i}})})}function wt(e,t){let n=e._chartjs;if(!n)return;let r=n.listeners,i=r.indexOf(t);i!==-1&&r.splice(i,1),!(r.length>0)&&(St.forEach(t=>{delete e[t]}),delete e._chartjs)}function Tt(e){let t=new Set(e);return t.size===e.length?e:Array.from(t)}var Et=function(){return typeof window>`u`?function(e){return e()}:window.requestAnimationFrame}();function Dt(e,t){let n=[],r=!1;return function(...i){n=i,r||(r=!0,Et.call(window,()=>{r=!1,e.apply(t,n)}))}}function Ot(e,t){let n;return function(...r){return t?(clearTimeout(n),n=setTimeout(e,t,r)):e.apply(this,r),t}}var kt=e=>e===`start`?`left`:e===`end`?`right`:`center`,G=(e,t,n)=>e===`start`?t:e===`end`?n:(t+n)/2,At=(e,t,n,r)=>e===(r?`left`:`right`)?n:e===`center`?(t+n)/2:t;function jt(e,t,n){let r=t.length,i=0,a=r;if(e._sorted){let{iScale:o,vScale:s,_parsed:c}=e,l=e.dataset&&e.dataset.options?e.dataset.options.spanGaps:null,u=o.axis,{min:d,max:f,minDefined:p,maxDefined:m}=o.getUserBounds();if(p){if(i=Math.min(yt(c,u,d).lo,n?r:yt(t,u,o.getPixelForValue(d)).lo),l){let e=c.slice(0,i+1).reverse().findIndex(e=>!k(e[s.axis]));i-=Math.max(0,e)}i=U(i,0,r-1)}if(m){let e=Math.max(yt(c,o.axis,f,!0).hi+1,n?0:yt(t,u,o.getPixelForValue(f),!0).hi+1);if(l){let t=c.slice(e-1).findIndex(e=>!k(e[s.axis]));e+=Math.max(0,t)}a=U(e,i,r)-i}else a=r-i}return{start:i,count:a}}function Mt(e){let{xScale:t,yScale:n,_scaleRanges:r}=e,i={xmin:t.min,xmax:t.max,ymin:n.min,ymax:n.max};if(!r)return e._scaleRanges=i,!0;let a=r.xmin!==t.min||r.xmax!==t.max||r.ymin!==n.min||r.ymax!==n.max;return Object.assign(r,i),a}var Nt=e=>e===0||e===1,Pt=(e,t,n)=>-(2**(10*--e)*Math.sin((e-t)*R/n)),Ft=(e,t,n)=>2**(-10*e)*Math.sin((e-t)*R/n)+1,It={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>-e*(e-2),easeInOutQuad:e=>(e/=.5)<1?.5*e*e:-.5*(--e*(e-2)-1),easeInCubic:e=>e*e*e,easeOutCubic:e=>--e*e*e+1,easeInOutCubic:e=>(e/=.5)<1?.5*e*e*e:.5*((e-=2)*e*e+2),easeInQuart:e=>e*e*e*e,easeOutQuart:e=>-(--e*e*e*e-1),easeInOutQuart:e=>(e/=.5)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2),easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>--e*e*e*e*e+1,easeInOutQuint:e=>(e/=.5)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2),easeInSine:e=>-Math.cos(e*z)+1,easeOutSine:e=>Math.sin(e*z),easeInOutSine:e=>-.5*(Math.cos(L*e)-1),easeInExpo:e=>e===0?0:2**(10*(e-1)),easeOutExpo:e=>e===1?1:-(2**(-10*e))+1,easeInOutExpo:e=>Nt(e)?e:e<.5?.5*2**(10*(e*2-1)):.5*(-(2**(-10*(e*2-1)))+2),easeInCirc:e=>e>=1?e:-(Math.sqrt(1-e*e)-1),easeOutCirc:e=>Math.sqrt(1- --e*e),easeInOutCirc:e=>(e/=.5)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1),easeInElastic:e=>Nt(e)?e:Pt(e,.075,.3),easeOutElastic:e=>Nt(e)?e:Ft(e,.075,.3),easeInOutElastic(e){let t=.1125,n=.45;return Nt(e)?e:e<.5?.5*Pt(e*2,t,n):.5+.5*Ft(e*2-1,t,n)},easeInBack(e){return e*e*(2.70158*e-1.70158)},easeOutBack(e){return--e*e*(2.70158*e+1.70158)+1},easeInOutBack(e){let t=1.70158;return(e/=.5)<1?.5*(e*e*(((t*=1.525)+1)*e-t)):.5*((e-=2)*e*(((t*=1.525)+1)*e+t)+2)},easeInBounce:e=>1-It.easeOutBounce(1-e),easeOutBounce(e){let t=7.5625,n=2.75;return e<1/n?t*e*e:e<2/n?t*(e-=1.5/n)*e+.75:e<2.5/n?t*(e-=2.25/n)*e+.9375:t*(e-=2.625/n)*e+.984375},easeInOutBounce:e=>e<.5?It.easeInBounce(e*2)*.5:It.easeOutBounce(e*2-1)*.5+.5};function Lt(e){if(e&&typeof e==`object`){let t=e.toString();return t===`[object CanvasPattern]`||t===`[object CanvasGradient]`}return!1}function Rt(e){return Lt(e)?e:new je(e)}function zt(e){return Lt(e)?e:new je(e).saturate(.5).darken(.1).hexString()}var Bt=[`x`,`y`,`borderWidth`,`radius`,`tension`],Vt=[`color`,`borderColor`,`backgroundColor`];function Ht(e){e.set(`animation`,{delay:void 0,duration:1e3,easing:`easeOutQuart`,fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),e.describe(`animation`,{_fallback:!1,_indexable:!1,_scriptable:e=>e!==`onProgress`&&e!==`onComplete`&&e!==`fn`}),e.set(`animations`,{colors:{type:`color`,properties:Vt},numbers:{type:`number`,properties:Bt}}),e.describe(`animations`,{_fallback:`animation`}),e.set(`transitions`,{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:`transparent`},visible:{type:`boolean`,duration:0}}},hide:{animations:{colors:{to:`transparent`},visible:{type:`boolean`,easing:`linear`,fn:e=>e|0}}}})}function Ut(e){e.set(`layout`,{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}var Wt=new Map;function Gt(e,t){t||={};let n=e+JSON.stringify(t),r=Wt.get(n);return r||(r=new Intl.NumberFormat(e,t),Wt.set(n,r)),r}function Kt(e,t,n){return Gt(t,n).format(e)}var qt={values(e){return A(e)?e:``+e},numeric(e,t,n){if(e===0)return`0`;let r=this.chart.options.locale,i,a=e;if(n.length>1){let t=Math.max(Math.abs(n[0].value),Math.abs(n[n.length-1].value));(t<1e-4||t>0x38d7ea4c68000)&&(i=`scientific`),a=Jt(e,n)}let o=rt(Math.abs(a)),s=isNaN(o)?1:Math.max(Math.min(-1*Math.floor(o),20),0),c={notation:i,minimumFractionDigits:s,maximumFractionDigits:s};return Object.assign(c,this.options.ticks.format),Kt(e,r,c)},logarithmic(e,t,n){if(e===0)return`0`;let r=n[t].significand||e/10**Math.floor(rt(e));return[1,2,3,5,10,15].includes(r)||t>.8*n.length?qt.numeric.call(this,e,t,n):``}};function Jt(e,t){let n=t.length>3?t[2].value-t[1].value:t[1].value-t[0].value;return Math.abs(n)>=1&&e!==Math.floor(e)&&(n=e-Math.floor(e)),n}var Yt={formatters:qt};function Xt(e){e.set(`scale`,{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:`ticks`,clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(e,t)=>t.lineWidth,tickColor:(e,t)=>t.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:``,padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:``,padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:Yt.formatters.values,minor:{},major:{},align:`center`,crossAlign:`near`,showLabelBackdrop:!1,backdropColor:`rgba(255, 255, 255, 0.75)`,backdropPadding:2}}),e.route(`scale.ticks`,`color`,``,`color`),e.route(`scale.grid`,`color`,``,`borderColor`),e.route(`scale.border`,`color`,``,`borderColor`),e.route(`scale.title`,`color`,``,`color`),e.describe(`scale`,{_fallback:!1,_scriptable:e=>!e.startsWith(`before`)&&!e.startsWith(`after`)&&e!==`callback`&&e!==`parser`,_indexable:e=>e!==`borderDash`&&e!==`tickBorderDash`&&e!==`dash`}),e.describe(`scales`,{_fallback:`scale`}),e.describe(`scale.ticks`,{_scriptable:e=>e!==`backdropPadding`&&e!==`callback`,_indexable:e=>e!==`backdropPadding`})}var Zt=Object.create(null),Qt=Object.create(null);function $t(e,t){if(!t)return e;let n=t.split(`.`);for(let t=0,r=n.length;te.chart.platform.getDevicePixelRatio(),this.elements={},this.events=[`mousemove`,`mouseout`,`click`,`touchstart`,`touchmove`],this.font={family:`'Helvetica Neue', 'Helvetica', 'Arial', sans-serif`,size:12,style:`normal`,lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(e,t)=>zt(t.backgroundColor),this.hoverBorderColor=(e,t)=>zt(t.borderColor),this.hoverColor=(e,t)=>zt(t.color),this.indexAxis=`x`,this.interaction={mode:`nearest`,intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(e),this.apply(t)}set(e,t){return en(this,e,t)}get(e){return $t(this,e)}describe(e,t){return en(Qt,e,t)}override(e,t){return en(Zt,e,t)}route(e,t,n,r){let i=$t(this,e),a=$t(this,n),o=`_`+t;Object.defineProperties(i,{[o]:{value:i[t],writable:!0},[t]:{enumerable:!0,get(){let e=this[o],t=a[r];return j(e)?Object.assign({},t,e):P(e,t)},set(e){this[o]=e}}})}apply(e){e.forEach(e=>e(this))}}({_scriptable:e=>!e.startsWith(`on`),_indexable:e=>e!==`events`,hover:{_fallback:`interaction`},interaction:{_scriptable:!1,_indexable:!1}},[Ht,Ut,Xt]);function tn(e){return!e||k(e.size)||k(e.family)?null:(e.style?e.style+` `:``)+(e.weight?e.weight+` `:``)+e.size+`px `+e.family}function nn(e,t,n,r,i){let a=t[i];return a||(a=t[i]=e.measureText(i).width,n.push(i)),a>r&&(r=a),r}function rn(e,t,n,r){r||={};let i=r.data=r.data||{},a=r.garbageCollect=r.garbageCollect||[];r.font!==t&&(i=r.data={},a=r.garbageCollect=[],r.font=t),e.save(),e.font=t;let o=0,s=n.length,c,l,u,d,f;for(c=0;cn.length){for(c=0;c0&&e.stroke()}}function ln(e,t,n){return n||=.5,!t||e&&e.x>t.left-n&&e.xt.top-n&&e.y0&&a.strokeColor!==``,c,l;for(e.save(),e.font=i.string,mn(e,a),c=0;c+e||0;function Cn(e,t){let n={},r=j(t),i=r?Object.keys(t):t,a=j(e)?r?n=>P(e[n],e[t[n]]):t=>e[t]:()=>e;for(let e of i)n[e]=Sn(a(e));return n}function wn(e){return Cn(e,{top:`y`,right:`x`,bottom:`y`,left:`x`})}function Tn(e){return Cn(e,[`topLeft`,`topRight`,`bottomLeft`,`bottomRight`])}function q(e){let t=wn(e);return t.width=t.left+t.right,t.height=t.top+t.bottom,t}function J(e,t){e||={},t||=K.font;let n=P(e.size,t.size);typeof n==`string`&&(n=parseInt(n,10));let r=P(e.style,t.style);r&&!(``+r).match(bn)&&(console.warn(`Invalid font style specified: "`+r+`"`),r=void 0);let i={family:P(e.family,t.family),lineHeight:xn(P(e.lineHeight,t.lineHeight),n),size:n,style:r,weight:P(e.weight,t.weight),string:``};return i.string=tn(i),i}function En(e,t,n,r){let i=!0,a,o,s;for(a=0,o=e.length;an&&e===0?0:e+t;return{min:o(r,-Math.abs(a)),max:o(i,a)}}function On(e,t){return Object.assign(Object.create(e),t)}function kn(e,t=[``],n,r,i=()=>e[0]){let a=n||e;return r===void 0&&(r=Gn(`_fallback`,e)),new Proxy({[Symbol.toStringTag]:`Object`,_cacheable:!0,_scopes:e,_rootScopes:a,_fallback:r,_getTarget:i,override:n=>kn([n,...e],t,a,r)},{deleteProperty(t,n){return delete t[n],delete t._keys,delete e[0][n],!0},get(n,r){return Pn(n,r,()=>Wn(r,t,e,n))},getOwnPropertyDescriptor(e,t){return Reflect.getOwnPropertyDescriptor(e._scopes[0],t)},getPrototypeOf(){return Reflect.getPrototypeOf(e[0])},has(e,t){return Kn(e).includes(t)},ownKeys(e){return Kn(e)},set(e,t,n){let r=e._storage||=i();return e[t]=r[t]=n,delete e._keys,!0}})}function An(e,t,n,r){let i={_cacheable:!1,_proxy:e,_context:t,_subProxy:n,_stack:new Set,_descriptors:jn(e,r),setContext:t=>An(e,t,n,r),override:i=>An(e.override(i),t,n,r)};return new Proxy(i,{deleteProperty(t,n){return delete t[n],delete e[n],!0},get(e,t,n){return Pn(e,t,()=>Fn(e,t,n))},getOwnPropertyDescriptor(t,n){return t._descriptors.allKeys?Reflect.has(e,n)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(e,n)},getPrototypeOf(){return Reflect.getPrototypeOf(e)},has(t,n){return Reflect.has(e,n)},ownKeys(){return Reflect.ownKeys(e)},set(t,n,r){return e[n]=r,delete t[n],!0}})}function jn(e,t={scriptable:!0,indexable:!0}){let{_scriptable:n=t.scriptable,_indexable:r=t.indexable,_allKeys:i=t.allKeys}=e;return{allKeys:i,scriptable:n,indexable:r,isScriptable:Ye(n)?n:()=>n,isIndexable:Ye(r)?r:()=>r}}var Mn=(e,t)=>e?e+qe(t):t,Nn=(e,t)=>j(t)&&e!==`adapters`&&(Object.getPrototypeOf(t)===null||t.constructor===Object);function Pn(e,t,n){if(Object.prototype.hasOwnProperty.call(e,t)||t===`constructor`)return e[t];let r=n();return e[t]=r,r}function Fn(e,t,n){let{_proxy:r,_context:i,_subProxy:a,_descriptors:o}=e,s=r[t];return Ye(s)&&o.isScriptable(t)&&(s=In(t,s,e,n)),A(s)&&s.length&&(s=Ln(t,s,e,o.isIndexable)),Nn(t,s)&&(s=An(s,i,a&&a[t],o)),s}function In(e,t,n,r){let{_proxy:i,_context:a,_subProxy:o,_stack:s}=n;if(s.has(e))throw Error(`Recursion detected: `+Array.from(s).join(`->`)+`->`+e);s.add(e);let c=t(a,o||r);return s.delete(e),Nn(e,c)&&(c=Vn(i._scopes,i,e,c)),c}function Ln(e,t,n,r){let{_proxy:i,_context:a,_subProxy:o,_descriptors:s}=n;if(a.index!==void 0&&r(e))return t[a.index%t.length];if(j(t[0])){let n=t,r=i._scopes.filter(e=>e!==n);t=[];for(let c of n){let n=Vn(r,i,e,c);t.push(An(n,a,o&&o[e],s))}}return t}function Rn(e,t,n){return Ye(e)?e(t,n):e}var zn=(e,t)=>e===!0?t:typeof e==`string`?Ke(t,e):void 0;function Bn(e,t,n,r,i){for(let a of t){let t=zn(n,a);if(t){e.add(t);let a=Rn(t._fallback,n,i);if(a!==void 0&&a!==n&&a!==r)return a}else if(t===!1&&r!==void 0&&n!==r)return null}return!1}function Vn(e,t,n,r){let i=t._rootScopes,a=Rn(t._fallback,n,r),o=[...e,...i],s=new Set;s.add(r);let c=Hn(s,o,n,a||n,r);return c===null||a!==void 0&&a!==n&&(c=Hn(s,o,a,c,r),c===null)?!1:kn(Array.from(s),[``],i,a,()=>Un(t,n,r))}function Hn(e,t,n,r,i){for(;n;)n=Bn(e,t,n,r,i);return n}function Un(e,t,n){let r=e._getTarget();t in r||(r[t]={});let i=r[t];return A(i)&&j(n)?n:i||{}}function Wn(e,t,n,r){let i;for(let a of t)if(i=Gn(Mn(a,e),n),i!==void 0)return Nn(e,i)?Vn(n,r,e,i):i}function Gn(e,t){for(let n of t){if(!n)continue;let t=n[e];if(t!==void 0)return t}}function Kn(e){let t=e._keys;return t||=e._keys=qn(e._scopes),t}function qn(e){let t=new Set;for(let n of e)for(let e of Object.keys(n).filter(e=>!e.startsWith(`_`)))t.add(e);return Array.from(t)}function Jn(e,t,n,r){let{iScale:i}=e,{key:a=`r`}=this._parsing,o=Array(r),s,c,l,u;for(s=0,c=r;ste===`x`?`y`:`x`;function Qn(e,t,n,r){let i=e.skip?t:e,a=t,o=n.skip?t:n,s=mt(a,i),c=mt(o,a),l=s/(s+c),u=c/(s+c);l=isNaN(l)?0:l,u=isNaN(u)?0:u;let d=r*l,f=r*u;return{previous:{x:a.x-d*(o.x-i.x),y:a.y-d*(o.y-i.y)},next:{x:a.x+f*(o.x-i.x),y:a.y+f*(o.y-i.y)}}}function $n(e,t,n){let r=e.length,i,a,o,s,c,l=Xn(e,0);for(let u=0;u!e.skip)),t.cubicInterpolationMode===`monotone`)tr(e,i);else{let n=r?e[e.length-1]:e[0];for(a=0,o=e.length;ae.ownerDocument.defaultView.getComputedStyle(e,null);function lr(e,t){return cr(e).getPropertyValue(t)}var ur=[`top`,`right`,`bottom`,`left`];function dr(e,t,n){let r={};n=n?`-`+n:``;for(let i=0;i<4;i++){let a=ur[i];r[a]=parseFloat(e[t+`-`+a+n])||0}return r.width=r.left+r.right,r.height=r.top+r.bottom,r}var fr=(e,t,n)=>(e>0||t>0)&&(!n||!n.shadowRoot);function pr(e,t){let n=e.touches,r=n&&n.length?n[0]:e,{offsetX:i,offsetY:a}=r,o=!1,s,c;if(fr(i,a,e.target))s=i,c=a;else{let e=t.getBoundingClientRect();s=r.clientX-e.left,c=r.clientY-e.top,o=!0}return{x:s,y:c,box:o}}function mr(e,t){if(`native`in e)return e;let{canvas:n,currentDevicePixelRatio:r}=t,i=cr(n),a=i.boxSizing===`border-box`,o=dr(i,`padding`),s=dr(i,`border`,`width`),{x:c,y:l,box:u}=pr(e,n),d=o.left+(u&&s.left),f=o.top+(u&&s.top),{width:p,height:m}=t;return a&&(p-=o.width+s.width,m-=o.height+s.height),{x:Math.round((c-d)/p*n.width/r),y:Math.round((l-f)/m*n.height/r)}}function hr(e,t,n){let r,i;if(t===void 0||n===void 0){let a=e&&or(e);if(!a)t=e.clientWidth,n=e.clientHeight;else{let e=a.getBoundingClientRect(),o=cr(a),s=dr(o,`border`,`width`),c=dr(o,`padding`);t=e.width-c.width-s.width,n=e.height-c.height-s.height,r=sr(o.maxWidth,a,`clientWidth`),i=sr(o.maxHeight,a,`clientHeight`)}}return{width:t,height:n,maxWidth:r||$e,maxHeight:i||$e}}var gr=e=>Math.round(e*10)/10;function _r(e,t,n,r){let i=cr(e),a=dr(i,`margin`),o=sr(i.maxWidth,e,`clientWidth`)||$e,s=sr(i.maxHeight,e,`clientHeight`)||$e,c=hr(e,t,n),{width:l,height:u}=c;if(i.boxSizing===`content-box`){let e=dr(i,`border`,`width`),t=dr(i,`padding`);l-=t.width+e.width,u-=t.height+e.height}return l=Math.max(0,l-a.width),u=Math.max(0,r?l/r:u-a.height),l=gr(Math.min(l,o,c.maxWidth)),u=gr(Math.min(u,s,c.maxHeight)),l&&!u&&(u=gr(l/2)),(t!==void 0||n!==void 0)&&r&&c.height&&u>c.height&&(u=c.height,l=gr(Math.floor(u*r))),{width:l,height:u}}function vr(e,t,n){let r=t||1,i=gr(e.height*r),a=gr(e.width*r);e.height=gr(e.height),e.width=gr(e.width);let o=e.canvas;return o.style&&(n||!o.style.height&&!o.style.width)&&(o.style.height=`${e.height}px`,o.style.width=`${e.width}px`),e.currentDevicePixelRatio!==r||o.height!==i||o.width!==a?(e.currentDevicePixelRatio=r,o.height=i,o.width=a,e.ctx.setTransform(r,0,0,r,0,0),!0):!1}var yr=function(){let e=!1;try{let t={get passive(){return e=!0,!1}};ar()&&(window.addEventListener(`test`,null,t),window.removeEventListener(`test`,null,t))}catch{}return e}();function br(e,t){let n=lr(e,t),r=n&&n.match(/^(\d+)(\.\d+)?px$/);return r?+r[1]:void 0}function xr(e,t,n,r){return{x:e.x+n*(t.x-e.x),y:e.y+n*(t.y-e.y)}}function Sr(e,t,n,r){return{x:e.x+n*(t.x-e.x),y:r===`middle`?n<.5?e.y:t.y:r===`after`?n<1?e.y:t.y:n>0?t.y:e.y}}function Cr(e,t,n,r){let i={x:e.cp2x,y:e.cp2y},a={x:t.cp1x,y:t.cp1y},o=xr(e,i,n),s=xr(i,a,n),c=xr(a,t,n);return xr(xr(o,s,n),xr(s,c,n),n)}var wr=function(e,t){return{x(n){return e+e+t-n},setWidth(e){t=e},textAlign(e){return e===`center`?e:e===`right`?`left`:`right`},xPlus(e,t){return e-t},leftForLtr(e,t){return e-t}}},Tr=function(){return{x(e){return e},setWidth(e){},textAlign(e){return e},xPlus(e,t){return e+t},leftForLtr(e,t){return e}}};function Er(e,t,n){return e?wr(t,n):Tr()}function Dr(e,t){let n,r;(t===`ltr`||t===`rtl`)&&(n=e.canvas.style,r=[n.getPropertyValue(`direction`),n.getPropertyPriority(`direction`)],n.setProperty(`direction`,t,`important`),e.prevTextDirection=r)}function Or(e,t){t!==void 0&&(delete e.prevTextDirection,e.canvas.style.setProperty(`direction`,t[0],t[1]))}function kr(e){return e===`angle`?{between:gt,compare:ht,normalize:H}:{between:W,compare:(e,t)=>e-t,normalize:e=>e}}function Ar({start:e,end:t,count:n,loop:r,style:i}){return{start:e%n,end:t%n,loop:r&&(t-e+1)%n===0,style:i}}function jr(e,t,n){let{property:r,start:i,end:a}=n,{between:o,normalize:s}=kr(r),c=t.length,{start:l,end:u,loop:d}=e,f,p;if(d){for(l+=c,u+=c,f=0,p=c;fc(i,y,_)&&s(i,y)!==0,x=()=>s(a,_)===0||c(a,y,_),S=()=>h||b(),C=()=>!h||x();for(let e=u,n=u;e<=d;++e)v=t[e%o],!v.skip&&(_=l(v[r]),_!==y&&(h=c(_,i,a),g===null&&S()&&(g=s(_,i)===0?e:n),g!==null&&C()&&(m.push(Ar({start:g,end:e,loop:f,count:o,style:p})),g=null),n=e,y=_));return g!==null&&m.push(Ar({start:g,end:d,loop:f,count:o,style:p})),m}function Nr(e,t){let n=[],r=e.segments;for(let i=0;ii&&e[a%t].skip;)a--;return a%=t,{start:i,end:a}}function Fr(e,t,n,r){let i=e.length,a=[],o=t,s=e[t],c;for(c=t+1;c<=n;++c){let n=e[c%i];n.skip||n.stop?s.skip||(r=!1,a.push({start:t%i,end:(c-1)%i,loop:r}),t=o=n.stop?c:null):(o=c,s.skip&&(t=c)),s=n}return o!==null&&a.push({start:t%i,end:o%i,loop:r}),a}function Ir(e,t){let n=e.points,r=e.options.spanGaps,i=n.length;if(!i)return[];let a=!!e._loop,{start:o,end:s}=Pr(n,i,a,r);return r===!0?Lr(e,[{start:o,end:s,loop:a}],n,t):Lr(e,Fr(n,o,sr({chart:e,initial:t.initial,numSteps:a,currentStep:Math.min(n-t.start,a)}))}_refresh(){this._request||=(this._running=!0,Et.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(e=Date.now()){let t=0;this._charts.forEach((n,r)=>{if(!n.running||!n.items.length)return;let i=n.items,a=i.length-1,o=!1,s;for(;a>=0;--a)s=i[a],s._active?(s._total>n.duration&&(n.duration=s._total),s.tick(e),o=!0):(i[a]=i[i.length-1],i.pop());o&&(r.draw(),this._notify(r,n,e,`progress`)),i.length||(n.running=!1,this._notify(r,n,e,`complete`),n.initial=!1),t+=i.length}),this._lastDate=e,t===0&&(this._running=!1)}_getAnims(e){let t=this._charts,n=t.get(e);return n||(n={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},t.set(e,n)),n}listen(e,t,n){this._getAnims(e).listeners[t].push(n)}add(e,t){!t||!t.length||this._getAnims(e).items.push(...t)}has(e){return this._getAnims(e).items.length>0}start(e){let t=this._charts.get(e);t&&(t.running=!0,t.start=Date.now(),t.duration=t.items.reduce((e,t)=>Math.max(e,t._duration),0),this._refresh())}running(e){if(!this._running)return!1;let t=this._charts.get(e);return!(!t||!t.running||!t.items.length)}stop(e){let t=this._charts.get(e);if(!t||!t.items.length)return;let n=t.items,r=n.length-1;for(;r>=0;--r)n[r].cancel();t.items=[],this._notify(e,t,Date.now(),`complete`)}remove(e){return this._charts.delete(e)}},Gr=`transparent`,Kr={boolean(e,t,n){return n>.5?t:e},color(e,t,n){let r=Rt(e||Gr),i=r.valid&&Rt(t||Gr);return i&&i.valid?i.mix(r,n).hexString():t},number(e,t,n){return e+(t-e)*n}},qr=class{constructor(e,t,n,r){let i=t[n];r=En([e.to,r,i,e.from]);let a=En([e.from,i,r]);this._active=!0,this._fn=e.fn||Kr[e.type||typeof a],this._easing=It[e.easing]||It.linear,this._start=Math.floor(Date.now()+(e.delay||0)),this._duration=this._total=Math.floor(e.duration),this._loop=!!e.loop,this._target=t,this._prop=n,this._from=a,this._to=r,this._promises=void 0}active(){return this._active}update(e,t,n){if(this._active){this._notify(!1);let r=this._target[this._prop],i=n-this._start,a=this._duration-i;this._start=n,this._duration=Math.floor(Math.max(a,e.duration)),this._total+=i,this._loop=!!e.loop,this._to=En([e.to,t,r,e.from]),this._from=En([e.from,r,t])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(e){let t=e-this._start,n=this._duration,r=this._prop,i=this._from,a=this._loop,o=this._to,s;if(this._active=i!==o&&(a||t1?2-s:s,s=this._easing(Math.min(1,Math.max(0,s))),this._target[r]=this._fn(i,o,s)}wait(){let e=this._promises||=[];return new Promise((t,n)=>{e.push({res:t,rej:n})})}_notify(e){let t=e?`res`:`rej`,n=this._promises||[];for(let e=0;e{let i=e[r];if(!j(i))return;let a={};for(let e of t)a[e]=i[e];(A(i.properties)&&i.properties||[r]).forEach(e=>{(e===r||!n.has(e))&&n.set(e,a)})})}_animateOptions(e,t){let n=t.options,r=Xr(e,n);if(!r)return[];let i=this._createAnimations(r,n);return n.$shared&&Yr(e.options.$animations,n).then(()=>{e.options=n},()=>{}),i}_createAnimations(e,t){let n=this._properties,r=[],i=e.$animations||={},a=Object.keys(t),o=Date.now(),s;for(s=a.length-1;s>=0;--s){let c=a[s];if(c.charAt(0)===`$`)continue;if(c===`options`){r.push(...this._animateOptions(e,t));continue}let l=t[c],u=i[c],d=n.get(c);if(u)if(d&&u.active()){u.update(d,l,o);continue}else u.cancel();if(!d||!d.duration){e[c]=l;continue}i[c]=u=new qr(d,e,c,l),r.push(u)}return r}update(e,t){if(this._properties.size===0){Object.assign(e,t);return}let n=this._createAnimations(e,t);if(n.length)return Wr.add(this._chart,n),!0}};function Yr(e,t){let n=[],r=Object.keys(t);for(let t=0;t0||!n&&t<0)return i.index}return null}function ci(e,t){let{chart:n,_cachedMeta:r}=e,i=n._stacks||={},{iScale:a,vScale:o,index:s}=r,c=a.axis,l=o.axis,u=ii(a,o,r),d=t.length,f;for(let e=0;en[e].axis===t).shift()}function ui(e,t){return On(e,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:`default`,type:`dataset`})}function di(e,t,n){return On(e,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:n,index:t,mode:`default`,type:`data`})}function fi(e,t){let n=e.controller.index,r=e.vScale&&e.vScale.axis;if(r){t||=e._parsed;for(let e of t){let t=e._stacks;if(!t||t[r]===void 0||t[r][n]===void 0)return;delete t[r][n],t[r]._visualValues!==void 0&&t[r]._visualValues[n]!==void 0&&delete t[r]._visualValues[n]}}}var pi=e=>e===`reset`||e===`none`,mi=(e,t)=>t?e:Object.assign({},e),hi=(e,t,n)=>e&&!t.hidden&&t._stacked&&{keys:ei(n,!0),values:null},gi=class{static defaults={};static datasetElementType=null;static dataElementType=null;constructor(e,t){this.chart=e,this._ctx=e.ctx,this.index=t,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){let e=this._cachedMeta;this.configure(),this.linkScales(),e._stacked=ri(e.vScale,e),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled(`filler`)&&console.warn(`Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options`)}updateIndex(e){this.index!==e&&fi(this._cachedMeta),this.index=e}linkScales(){let e=this.chart,t=this._cachedMeta,n=this.getDataset(),r=(e,t,n,r)=>e===`x`?t:e===`r`?r:n,i=t.xAxisID=P(n.xAxisID,li(e,`x`)),a=t.yAxisID=P(n.yAxisID,li(e,`y`)),o=t.rAxisID=P(n.rAxisID,li(e,`r`)),s=t.indexAxis,c=t.iAxisID=r(s,i,a,o),l=t.vAxisID=r(s,a,i,o);t.xScale=this.getScaleForId(i),t.yScale=this.getScaleForId(a),t.rScale=this.getScaleForId(o),t.iScale=this.getScaleForId(c),t.vScale=this.getScaleForId(l)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(e){return this.chart.scales[e]}_getOtherScale(e){let t=this._cachedMeta;return e===t.iScale?t.vScale:t.iScale}reset(){this._update(`reset`)}_destroy(){let e=this._cachedMeta;this._data&&wt(this._data,this),e._stacked&&fi(e)}_dataCheck(){let e=this.getDataset(),t=e.data||=[],n=this._data;if(j(t)){let e=this._cachedMeta;this._data=ni(t,e)}else if(n!==t){if(n){wt(n,this);let e=this._cachedMeta;fi(e),e._parsed=[]}t&&Object.isExtensible(t)&&Ct(t,this),this._syncList=[],this._data=t}}addElements(){let e=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(e.dataset=new this.datasetElementType)}buildOrUpdateElements(e){let t=this._cachedMeta,n=this.getDataset(),r=!1;this._dataCheck();let i=t._stacked;t._stacked=ri(t.vScale,t),t.stack!==n.stack&&(r=!0,fi(t),t.stack=n.stack),this._resyncElements(e),(r||i!==t._stacked)&&(ci(this,t._parsed),t._stacked=ri(t.vScale,t))}configure(){let e=this.chart.config,t=e.datasetScopeKeys(this._type),n=e.getOptionScopes(this.getDataset(),t,!0);this.options=e.createResolver(n,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(e,t){let{_cachedMeta:n,_data:r}=this,{iScale:i,_stacked:a}=n,o=i.axis,s=e===0&&t===r.length?!0:n._sorted,c=e>0&&n._parsed[e-1],l,u,d;if(this._parsing===!1)n._parsed=r,n._sorted=!0,d=r;else{d=A(r[e])?this.parseArrayData(n,r,e,t):j(r[e])?this.parseObjectData(n,r,e,t):this.parsePrimitiveData(n,r,e,t);let i=()=>u[o]===null||c&&u[o]t||u=0;--d)if(!p()){this.updateRangeFromParsed(c,e,f,s);break}}return c}getAllParsedValues(e){let t=this._cachedMeta._parsed,n=[],r,i,a;for(r=0,i=t.length;r=0&&ethis.getContext(n,r,t),u);return p.$shared&&(p.$shared=s,i[a]=Object.freeze(mi(p,s))),p}_resolveAnimations(e,t,n){let r=this.chart,i=this._cachedDataOpts,a=`animation-${t}`,o=i[a];if(o)return o;let s;if(r.options.animation!==!1){let r=this.chart.config,i=r.datasetAnimationScopeKeys(this._type,t),a=r.getOptionScopes(this.getDataset(),i);s=r.createResolver(a,this.getContext(e,n,t))}let c=new Jr(r,s&&s.animations);return s&&s._cacheable&&(i[a]=Object.freeze(c)),c}getSharedOptions(e){if(e.$shared)return this._sharedOptions||=Object.assign({},e)}includeOptions(e,t){return!t||pi(e)||this.chart._animationsDisabled}_getSharedOptions(e,t){let n=this.resolveDataElementOptions(e,t),r=this._sharedOptions,i=this.getSharedOptions(n),a=this.includeOptions(t,i)||i!==r;return this.updateSharedOptions(i,t,n),{sharedOptions:i,includeOptions:a}}updateElement(e,t,n,r){pi(r)?Object.assign(e,n):this._resolveAnimations(t,r).update(e,n)}updateSharedOptions(e,t,n){e&&!pi(t)&&this._resolveAnimations(void 0,t).update(e,n)}_setStyle(e,t,n,r){e.active=r;let i=this.getStyle(t,r);this._resolveAnimations(t,n,r).update(e,{options:!r&&this.getSharedOptions(i)||i})}removeHoverStyle(e,t,n){this._setStyle(e,n,`active`,!1)}setHoverStyle(e,t,n){this._setStyle(e,n,`active`,!0)}_removeDatasetHoverStyle(){let e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,`active`,!1)}_setDatasetHoverStyle(){let e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,`active`,!0)}_resyncElements(e){let t=this._data,n=this._cachedMeta.data;for(let[e,t,n]of this._syncList)this[e](t,n);this._syncList=[];let r=n.length,i=t.length,a=Math.min(i,r);a&&this.parse(0,a),i>r?this._insertElements(r,i-r,e):i{for(e.length+=t,o=e.length-1;o>=a;o--)e[o]=e[o-t]};for(s(i),o=e;oe-t))}return e._cache.$bar}function vi(e){let t=e.iScale,n=_i(t,e.type),r=t._length,i,a,o,s,c=()=>{o===32767||o===-32768||(Je(s)&&(r=Math.min(r,Math.abs(o-s)||r)),s=o)};for(i=0,a=n.length;i0?i[e-1]:null,s=eMath.abs(s)&&(c=s,l=o),t[n.axis]=l,t._custom={barStart:c,barEnd:l,start:i,end:a,min:o,max:s}}function Si(e,t,n,r){return A(e)?xi(e,t,n,r):t[n.axis]=n.parse(e,r),t}function Ci(e,t,n,r){let i=e.iScale,a=e.vScale,o=i.getLabels(),s=i===a,c=[],l,u,d,f;for(l=n,u=n+r;l=n?1:-1):B(e)}function Ei(e){let t,n,r,i,a;return e.horizontal?(t=e.base>e.x,n=`left`,r=`right`):(t=e.basee.controller.options.grouped),i=n.options.stacked,a=[],o=this._cachedMeta.controller.getParsed(t),s=o&&o[n.axis],c=e=>{let t=e._parsed.find(e=>e[n.axis]===s),r=t&&t[e.vScale.axis];if(k(r)||isNaN(r))return!0};for(let n of r)if(!(t!==void 0&&c(n))&&((i===!1||a.indexOf(n.stack)===-1||i===void 0&&n.stack===void 0)&&a.push(n.stack),n.index===e))break;return a.length||a.push(void 0),a}_getStackCount(e){return this._getStacks(void 0,e).length}_getAxisCount(){return this._getAxis().length}getFirstScaleIdForIndexAxis(){let e=this.chart.scales,t=this.chart.options.indexAxis;return Object.keys(e).filter(n=>e[n].axis===t).shift()}_getAxis(){let e={},t=this.getFirstScaleIdForIndexAxis();for(let n of this.chart.data.datasets)e[P(this.chart.options.indexAxis===`x`?n.xAxisID:n.yAxisID,t)]=!0;return Object.keys(e)}_getStackIndex(e,t,n){let r=this._getStacks(e,n),i=t===void 0?-1:r.indexOf(t);return i===-1?r.length-1:i}_getRuler(){let e=this.options,t=this._cachedMeta,n=t.iScale,r=[],i,a;for(i=0,a=t.data.length;i=0;--n)t=Math.max(t,e[n].size(this.resolveDataElementOptions(n))/2);return t>0&&t}getLabelAndValue(e){let t=this._cachedMeta,n=this.chart.data.labels||[],{xScale:r,yScale:i}=t,a=this.getParsed(e),o=r.getLabelForValue(a.x),s=i.getLabelForValue(a.y),c=a._custom;return{label:n[e]||``,value:`(`+o+`, `+s+(c?`, `+c:``)+`)`}}update(e){let t=this._cachedMeta.data;this.updateElements(t,0,t.length,e)}updateElements(e,t,n,r){let i=r===`reset`,{iScale:a,vScale:o}=this._cachedMeta,{sharedOptions:s,includeOptions:c}=this._getSharedOptions(t,r),l=a.axis,u=o.axis;for(let d=t;dgt(e,s,c,!0)?1:Math.max(t,t*n,r,r*n),m=(e,t,r)=>gt(e,s,c,!0)?-1:Math.min(t,t*n,r,r*n),h=p(0,l,d),g=p(z,u,f),_=m(L,l,d),v=m(L+z,u,f);r=(h-_)/2,i=(g-v)/2,a=-(h+_)/2,o=-(g+v)/2}return{ratioX:r,ratioY:i,offsetX:a,offsetY:o}}var Fi=class extends gi{static id=`doughnut`;static defaults={datasetElementType:!1,dataElementType:`arc`,animation:{animateRotate:!0,animateScale:!1},animations:{numbers:{type:`number`,properties:[`circumference`,`endAngle`,`innerRadius`,`outerRadius`,`startAngle`,`x`,`y`,`offset`,`borderWidth`,`spacing`]}},cutout:`50%`,rotation:0,circumference:360,radius:`100%`,spacing:0,indexAxis:`r`};static descriptors={_scriptable:e=>e!==`spacing`,_indexable:e=>e!==`spacing`&&!e.startsWith(`borderDash`)&&!e.startsWith(`hoverBorderDash`)};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(e){let t=e.data,{labels:{pointStyle:n,textAlign:r,color:i,useBorderRadius:a,borderRadius:o}}=e.legend.options;return t.labels.length&&t.datasets.length?t.labels.map((t,s)=>{let c=e.getDatasetMeta(0).controller.getStyle(s);return{text:t,fillStyle:c.backgroundColor,fontColor:i,hidden:!e.getDataVisibility(s),lineDash:c.borderDash,lineDashOffset:c.borderDashOffset,lineJoin:c.borderJoinStyle,lineWidth:c.borderWidth,strokeStyle:c.borderColor,textAlign:r,pointStyle:n,borderRadius:a&&(o||c.borderRadius),index:s}}):[]}},onClick(e,t,n){n.chart.toggleDataVisibility(t.index),n.chart.update()}}}};constructor(e,t){super(e,t),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(e,t){let n=this.getDataset().data,r=this._cachedMeta;if(this._parsing===!1)r._parsed=n;else{let i=e=>+n[e];if(j(n[e])){let{key:e=`value`}=this._parsing;i=t=>+Ke(n[t],e)}let a,o;for(a=e,o=e+t;a0&&!isNaN(e)?Math.abs(e)/t*R:0}getLabelAndValue(e){let t=this._cachedMeta,n=this.chart,r=n.data.labels||[],i=Kt(t._parsed[e],n.options.locale);return{label:r[e]||``,value:i}}getMaxBorderWidth(e){let t=0,n=this.chart,r,i,a,o,s;if(!e){for(r=0,i=n.data.datasets.length;r0&&this.getParsed(t-1);for(let n=0;n=_){v.skip=!0;continue}let b=this.getParsed(n),x=k(b[f]),S=v[d]=a.getPixelForValue(b[d],n),C=v[f]=i||x?o.getBasePixel():o.getPixelForValue(s?this.applyStack(o,b,s):b[f],n);v.skip=isNaN(S)||isNaN(C)||x,v.stop=n>0&&Math.abs(b[d]-y[d])>h,m&&(v.parsed=b,v.raw=c.data[n]),u&&(v.options=l||this.resolveDataElementOptions(n,p.active?`active`:r)),g||this.updateElement(p,n,v,r),y=b}}getMaxOverflow(){let e=this._cachedMeta,t=e.dataset,n=t.options&&t.options.borderWidth||0,r=e.data||[];if(!r.length)return n;let i=r[0].size(this.resolveDataElementOptions(0)),a=r[r.length-1].size(this.resolveDataElementOptions(r.length-1));return Math.max(n,i,a)/2}draw(){let e=this._cachedMeta;e.dataset.updateControlPoints(this.chart.chartArea,e.iScale.axis),super.draw()}},Li=class extends gi{static id=`polarArea`;static defaults={dataElementType:`arc`,animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:`number`,properties:[`x`,`y`,`startAngle`,`endAngle`,`innerRadius`,`outerRadius`]}},indexAxis:`r`,startAngle:0};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(e){let t=e.data;if(t.labels.length&&t.datasets.length){let{labels:{pointStyle:n,color:r}}=e.legend.options;return t.labels.map((t,i)=>{let a=e.getDatasetMeta(0).controller.getStyle(i);return{text:t,fillStyle:a.backgroundColor,strokeStyle:a.borderColor,fontColor:r,lineWidth:a.borderWidth,pointStyle:n,hidden:!e.getDataVisibility(i),index:i}})}return[]}},onClick(e,t,n){n.chart.toggleDataVisibility(t.index),n.chart.update()}}},scales:{r:{type:`radialLinear`,angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}};constructor(e,t){super(e,t),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(e){let t=this._cachedMeta,n=this.chart,r=n.data.labels||[],i=Kt(t._parsed[e].r,n.options.locale);return{label:r[e]||``,value:i}}parseObjectData(e,t,n,r){return Jn.bind(this)(e,t,n,r)}update(e){let t=this._cachedMeta.data;this._updateRadius(),this.updateElements(t,0,t.length,e)}getMinMax(){let e=this._cachedMeta,t={min:1/0,max:-1/0};return e.data.forEach((e,n)=>{let r=this.getParsed(n).r;!isNaN(r)&&this.chart.getDataVisibility(n)&&(rt.max&&(t.max=r))}),t}_updateRadius(){let e=this.chart,t=e.chartArea,n=e.options,r=Math.min(t.right-t.left,t.bottom-t.top),i=Math.max(r/2,0),a=(i-Math.max(n.cutoutPercentage?i/100*n.cutoutPercentage:1,0))/e.getVisibleDatasetCount();this.outerRadius=i-a*this.index,this.innerRadius=this.outerRadius-a}updateElements(e,t,n,r){let i=r===`reset`,a=this.chart,o=a.options.animation,s=this._cachedMeta.rScale,c=s.xCenter,l=s.yCenter,u=s.getIndexAngle(0)-.5*L,d=u,f,p=360/this.countVisibleElements();for(f=0;f{!isNaN(this.getParsed(n).r)&&this.chart.getDataVisibility(n)&&t++}),t}_computeAngle(e,t,n){return this.chart.getDataVisibility(e)?V(this.resolveDataElementOptions(e,t).angle||n):0}},Ri=Object.freeze({__proto__:null,BarController:Mi,BubbleController:Ni,DoughnutController:Fi,LineController:Ii,PieController:class extends Fi{static id=`pie`;static defaults={cutout:0,rotation:0,circumference:360,radius:`100%`}},PolarAreaController:Li,RadarController:class extends gi{static id=`radar`;static defaults={datasetElementType:`line`,dataElementType:`point`,indexAxis:`r`,showLine:!0,elements:{line:{fill:`start`}}};static overrides={aspectRatio:1,scales:{r:{type:`radialLinear`}}};getLabelAndValue(e){let t=this._cachedMeta.vScale,n=this.getParsed(e);return{label:t.getLabels()[e],value:``+t.getLabelForValue(n[t.axis])}}parseObjectData(e,t,n,r){return Jn.bind(this)(e,t,n,r)}update(e){let t=this._cachedMeta,n=t.dataset,r=t.data||[],i=t.iScale.getLabels();if(n.points=r,e!==`resize`){let t=this.resolveDatasetElementOptions(e);this.options.showLine||(t.borderWidth=0);let a={_loop:!0,_fullLoop:i.length===r.length,options:t};this.updateElement(n,void 0,a,e)}this.updateElements(r,0,r.length,e)}updateElements(e,t,n,r){let i=this._cachedMeta.rScale,a=r===`reset`;for(let o=t;o0&&this.getParsed(t-1);for(let l=t;l0&&Math.abs(n[f]-v[f])>g,h&&(m.parsed=n,m.raw=c.data[l]),d&&(m.options=u||this.resolveDataElementOptions(l,t.active?`active`:r)),_||this.updateElement(t,l,m,r),v=n}this.updateSharedOptions(u,r,l)}getMaxOverflow(){let e=this._cachedMeta,t=e.data||[];if(!this.options.showLine){let e=0;for(let n=t.length-1;n>=0;--n)e=Math.max(e,t[n].size(this.resolveDataElementOptions(n))/2);return e>0&&e}let n=e.dataset,r=n.options&&n.options.borderWidth||0;if(!t.length)return r;let i=t[0].size(this.resolveDataElementOptions(0)),a=t[t.length-1].size(this.resolveDataElementOptions(t.length-1));return Math.max(r,i,a)/2}}});function zi(){throw Error(`This method is not implemented: Check that a complete date adapter is provided.`)}var Bi={_date:class e{static override(t){Object.assign(e.prototype,t)}options;constructor(e){this.options=e||{}}init(){}formats(){return zi()}parse(){return zi()}format(){return zi()}add(){return zi()}diff(){return zi()}startOf(){return zi()}endOf(){return zi()}}};function Vi(e,t,n,r){let{controller:i,data:a,_sorted:o}=e,s=i._cachedMeta.iScale,c=e.dataset&&e.dataset.options?e.dataset.options.spanGaps:null;if(s&&t===s.axis&&t!==`r`&&o&&a.length){let o=s._reversePixels?bt:yt;if(!r){let r=o(a,t,n);if(c){let{vScale:t}=i._cachedMeta,{_parsed:n}=e,a=n.slice(0,r.lo+1).reverse().findIndex(e=>!k(e[t.axis]));r.lo-=Math.max(0,a);let o=n.slice(r.hi).findIndex(e=>!k(e[t.axis]));r.hi+=Math.max(0,o)}return r}else if(i._sharedOptions){let e=a[0],r=typeof e.getRange==`function`&&e.getRange(t);if(r){let e=o(a,t,n-r),i=o(a,t,n+r);return{lo:e.lo,hi:i.hi}}}}return{lo:0,hi:a.length-1}}function Hi(e,t,n,r,i){let a=e.getSortedVisibleDatasetMetas(),o=n[t];for(let e=0,n=a.length;e{e[o]&&e[o](t[n],i)&&(a.push({element:e,datasetIndex:r,index:c}),s||=e.inRange(t.x,t.y,i))}),r&&!s?[]:a}var Yi={evaluateInteractionItems:Hi,modes:{index(e,t,n,r){let i=mr(t,e),a=n.axis||`x`,o=n.includeInvisible||!1,s=n.intersect?Wi(e,i,a,r,o):qi(e,i,a,!1,r,o),c=[];return s.length?(e.getSortedVisibleDatasetMetas().forEach(e=>{let t=s[0].index,n=e.data[t];n&&!n.skip&&c.push({element:n,datasetIndex:e.index,index:t})}),c):[]},dataset(e,t,n,r){let i=mr(t,e),a=n.axis||`xy`,o=n.includeInvisible||!1,s=n.intersect?Wi(e,i,a,r,o):qi(e,i,a,!1,r,o);if(s.length>0){let t=s[0].datasetIndex,n=e.getDatasetMeta(t).data;s=[];for(let e=0;ee.pos===t)}function Qi(e,t){return e.filter(e=>Xi.indexOf(e.pos)===-1&&e.box.axis===t)}function $i(e,t){return e.sort((e,n)=>{let r=t?n:e,i=t?e:n;return r.weight===i.weight?r.index-i.index:r.weight-i.weight})}function ea(e){let t=[],n,r,i,a,o,s;for(n=0,r=(e||[]).length;ne.box.fullSize),!0),r=$i(Zi(t,`left`),!0),i=$i(Zi(t,`right`)),a=$i(Zi(t,`top`),!0),o=$i(Zi(t,`bottom`)),s=Qi(t,`x`),c=Qi(t,`y`);return{fullSize:n,leftAndTop:r.concat(a),rightAndBottom:i.concat(c).concat(o).concat(s),chartArea:Zi(t,`chartArea`),vertical:r.concat(i).concat(c),horizontal:a.concat(o).concat(s)}}function ia(e,t,n,r){return Math.max(e[n],t[n])+Math.max(e[r],t[r])}function aa(e,t){e.top=Math.max(e.top,t.top),e.left=Math.max(e.left,t.left),e.bottom=Math.max(e.bottom,t.bottom),e.right=Math.max(e.right,t.right)}function oa(e,t,n,r){let{pos:i,box:a}=n,o=e.maxPadding;if(!j(i)){n.size&&(e[i]-=n.size);let t=r[n.stack]||{size:0,count:1};t.size=Math.max(t.size,n.horizontal?a.height:a.width),n.size=t.size/t.count,e[i]+=n.size}a.getPadding&&aa(o,a.getPadding());let s=Math.max(0,t.outerWidth-ia(o,e,`left`,`right`)),c=Math.max(0,t.outerHeight-ia(o,e,`top`,`bottom`)),l=s!==e.w,u=c!==e.h;return e.w=s,e.h=c,n.horizontal?{same:l,other:u}:{same:u,other:l}}function sa(e){let t=e.maxPadding;function n(n){let r=Math.max(t[n]-e[n],0);return e[n]+=r,r}e.y+=n(`top`),e.x+=n(`left`),n(`right`),n(`bottom`)}function ca(e,t){let n=t.maxPadding;function r(e){let r={left:0,top:0,right:0,bottom:0};return e.forEach(e=>{r[e]=Math.max(t[e],n[e])}),r}return r(e?[`left`,`right`]:[`top`,`bottom`])}function la(e,t,n,r){let i=[],a,o,s,c,l,u;for(a=0,o=e.length,l=0;a{typeof e.beforeLayout==`function`&&e.beforeLayout()});let u=c.reduce((e,t)=>t.box.options&&t.box.options.display===!1?e:e+1,0)||1,d=Object.freeze({outerWidth:t,outerHeight:n,padding:i,availableWidth:a,availableHeight:o,vBoxMaxWidth:a/2/u,hBoxMaxHeight:o/2}),f=Object.assign({},i);aa(f,q(r));let p=Object.assign({maxPadding:f,w:a,h:o,x:i.left,y:i.top},i),m=na(c.concat(l),d);la(s.fullSize,p,d,m),la(c,p,d,m),la(l,p,d,m)&&la(c,p,d,m),sa(p),da(s.leftAndTop,p,d,m),p.x+=p.w,p.y+=p.h,da(s.rightAndBottom,p,d,m),e.chartArea={left:p.left,top:p.top,right:p.left+p.w,bottom:p.top+p.h,height:p.h,width:p.w},I(s.chartArea,t=>{let n=t.box;Object.assign(n,e.chartArea),n.update(p.w,p.h,{left:0,top:0,right:0,bottom:0})})}},fa=class{acquireContext(e,t){}releaseContext(e){return!1}addEventListener(e,t,n){}removeEventListener(e,t,n){}getDevicePixelRatio(){return 1}getMaximumSize(e,t,n,r){return t=Math.max(0,t||e.width),n||=e.height,{width:t,height:Math.max(0,r?Math.floor(t/r):n)}}isAttached(e){return!0}updateConfig(e){}},pa=class extends fa{acquireContext(e){return e&&e.getContext&&e.getContext(`2d`)||null}updateConfig(e){e.options.animation=!1}},ma=`$chartjs`,ha={touchstart:`mousedown`,touchmove:`mousemove`,touchend:`mouseup`,pointerenter:`mouseenter`,pointerdown:`mousedown`,pointermove:`mousemove`,pointerup:`mouseup`,pointerleave:`mouseout`,pointerout:`mouseout`},ga=e=>e===null||e===``;function _a(e,t){let n=e.style,r=e.getAttribute(`height`),i=e.getAttribute(`width`);if(e[ma]={initial:{height:r,width:i,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||`block`,n.boxSizing=n.boxSizing||`border-box`,ga(i)){let t=br(e,`width`);t!==void 0&&(e.width=t)}if(ga(r))if(e.style.height===``)e.height=e.width/(t||2);else{let t=br(e,`height`);t!==void 0&&(e.height=t)}return e}var va=yr?{passive:!0}:!1;function ya(e,t,n){e&&e.addEventListener(t,n,va)}function ba(e,t,n){e&&e.canvas&&e.canvas.removeEventListener(t,n,va)}function xa(e,t){let n=ha[e.type]||e.type,{x:r,y:i}=mr(e,t);return{type:n,chart:t,native:e,x:r===void 0?null:r,y:i===void 0?null:i}}function Sa(e,t){for(let n of e)if(n===t||n.contains(t))return!0}function Ca(e,t,n){let r=e.canvas,i=new MutationObserver(e=>{let t=!1;for(let n of e)t||=Sa(n.addedNodes,r),t&&=!Sa(n.removedNodes,r);t&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}function wa(e,t,n){let r=e.canvas,i=new MutationObserver(e=>{let t=!1;for(let n of e)t||=Sa(n.removedNodes,r),t&&=!Sa(n.addedNodes,r);t&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}var Ta=new Map,Ea=0;function Da(){let e=window.devicePixelRatio;e!==Ea&&(Ea=e,Ta.forEach((t,n)=>{n.currentDevicePixelRatio!==e&&t()}))}function Oa(e,t){Ta.size||window.addEventListener(`resize`,Da),Ta.set(e,t)}function ka(e){Ta.delete(e),Ta.size||window.removeEventListener(`resize`,Da)}function Aa(e,t,n){let r=e.canvas,i=r&&or(r);if(!i)return;let a=Dt((e,t)=>{let r=i.clientWidth;n(e,t),r{let t=e[0],n=t.contentRect.width,r=t.contentRect.height;n===0&&r===0||a(n,r)});return o.observe(i),Oa(e,a),o}function ja(e,t,n){n&&n.disconnect(),t===`resize`&&ka(e)}function Ma(e,t,n){let r=e.canvas,i=Dt(t=>{e.ctx!==null&&n(xa(t,e))},e);return ya(r,t,i),i}var Na=class extends fa{acquireContext(e,t){let n=e&&e.getContext&&e.getContext(`2d`);return n&&n.canvas===e?(_a(e,t),n):null}releaseContext(e){let t=e.canvas;if(!t[ma])return!1;let n=t[ma].initial;[`height`,`width`].forEach(e=>{let r=n[e];k(r)?t.removeAttribute(e):t.setAttribute(e,r)});let r=n.style||{};return Object.keys(r).forEach(e=>{t.style[e]=r[e]}),t.width=t.width,delete t[ma],!0}addEventListener(e,t,n){this.removeEventListener(e,t);let r=e.$proxies||={};r[t]=({attach:Ca,detach:wa,resize:Aa}[t]||Ma)(e,t,n)}removeEventListener(e,t){let n=e.$proxies||={},r=n[t];r&&(({attach:ja,detach:ja,resize:ja}[t]||ba)(e,t,r),n[t]=void 0)}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(e,t,n,r){return _r(e,t,n,r)}isAttached(e){let t=e&&or(e);return!!(t&&t.isConnected)}};function Pa(e){return!ar()||typeof OffscreenCanvas<`u`&&e instanceof OffscreenCanvas?pa:Na}var Fa=class{static defaults={};static defaultRoutes=void 0;x;y;active=!1;options;$animations;tooltipPosition(e){let{x:t,y:n}=this.getProps([`x`,`y`],e);return{x:t,y:n}}hasValue(){return ct(this.x)&&ct(this.y)}getProps(e,t){let n=this.$animations;if(!t||!n)return this;let r={};return e.forEach(e=>{r[e]=n[e]&&n[e].active()?n[e]._to:this[e]}),r}};function Ia(e,t){let n=e.options.ticks,r=La(e),i=Math.min(n.maxTicksLimit||r,r),a=n.major.enabled?za(t):[],o=a.length,s=a[0],c=a[o-1],l=[];if(o>i)return Ba(t,l,a,o/i),l;let u=Ra(a,t,i);if(o>0){let e,n,r=o>1?Math.round((c-s)/(o-1)):null;for(Va(t,l,u,k(r)?0:s-r,s),e=0,n=o-1;ei)return t}return Math.max(i,1)}function za(e){let t=[],n,r;for(n=0,r=e.length;ne===`left`?`right`:e===`right`?`left`:e,Wa=(e,t,n)=>t===`top`||t===`left`?e[t]+n:e[t]-n,Ga=(e,t)=>Math.min(t||e,e);function Ka(e,t){let n=[],r=e.length/t,i=e.length,a=0;for(;ao+s)))return c}function Ja(e,t){I(e,e=>{let n=e.gc,r=n.length/2,i;if(r>t){for(i=0;in?n:t,n=r&&t>n?t:n,{min:N(t,N(n,t)),max:N(n,N(t,n))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){let e=this.chart.data;return this.options.labels||(this.isHorizontal()?e.xLabels:e.yLabels)||e.labels||[]}getLabelItems(e=this.chart.chartArea){return this._labelItems||=this._computeLabelItems(e)}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){F(this.options.beforeUpdate,[this])}update(e,t,n){let{beginAtZero:r,grace:i,ticks:a}=this.options,o=a.sampleSize;this.beforeUpdate(),this.maxWidth=e,this.maxHeight=t,this._margins=n=Object.assign({left:0,right:0,top:0,bottom:0},n),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+n.left+n.right:this.height+n.top+n.bottom,this._dataLimitsCached||=(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=Dn(this,i,r),!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();let s=o=i||n<=1||!this.isHorizontal()){this.labelRotation=r;return}let l=this._getLabelSizes(),u=l.widest.width,d=l.highest.height,f=U(this.chart.width-u,0,this.maxWidth);o=e.offset?this.maxWidth/n:f/(n-1),u+6>o&&(o=f/(n-(e.offset?.5:1)),s=this.maxHeight-Ya(e.grid)-t.padding-Xa(e.title,this.chart.options.font),c=Math.sqrt(u*u+d*d),a=dt(Math.min(Math.asin(U((l.highest.height+6)/o,-1,1)),Math.asin(U(s/c,-1,1))-Math.asin(U(d/c,-1,1)))),a=Math.max(r,Math.min(i,a))),this.labelRotation=a}afterCalculateLabelRotation(){F(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){F(this.options.beforeFit,[this])}fit(){let e={width:0,height:0},{chart:t,options:{ticks:n,title:r,grid:i}}=this,a=this._isVisible(),o=this.isHorizontal();if(a){let a=Xa(r,t.options.font);if(o?(e.width=this.maxWidth,e.height=Ya(i)+a):(e.height=this.maxHeight,e.width=Ya(i)+a),n.display&&this.ticks.length){let{first:t,last:r,widest:i,highest:a}=this._getLabelSizes(),s=n.padding*2,c=V(this.labelRotation),l=Math.cos(c),u=Math.sin(c);if(o){let t=n.mirror?0:u*i.width+l*a.height;e.height=Math.min(this.maxHeight,e.height+t+s)}else{let t=n.mirror?0:l*i.width+u*a.height;e.width=Math.min(this.maxWidth,e.width+t+s)}this._calculatePadding(t,r,u,l)}}this._handleMargins(),o?(this.width=this._length=t.width-this._margins.left-this._margins.right,this.height=e.height):(this.width=e.width,this.height=this._length=t.height-this._margins.top-this._margins.bottom)}_calculatePadding(e,t,n,r){let{ticks:{align:i,padding:a},position:o}=this.options,s=this.labelRotation!==0,c=o!==`top`&&this.axis===`x`;if(this.isHorizontal()){let o=this.getPixelForTick(0)-this.left,l=this.right-this.getPixelForTick(this.ticks.length-1),u=0,d=0;s?c?(u=r*e.width,d=n*t.height):(u=n*e.height,d=r*t.width):i===`start`?d=t.width:i===`end`?u=e.width:i!==`inner`&&(u=e.width/2,d=t.width/2),this.paddingLeft=Math.max((u-o+a)*this.width/(this.width-o),0),this.paddingRight=Math.max((d-l+a)*this.width/(this.width-l),0)}else{let n=t.height/2,r=e.height/2;i===`start`?(n=0,r=e.height):i===`end`&&(n=t.height,r=0),this.paddingTop=n+a,this.paddingBottom=r+a}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){F(this.options.afterFit,[this])}isHorizontal(){let{axis:e,position:t}=this.options;return t===`top`||t===`bottom`||e===`x`}isFullSize(){return this.options.fullSize}_convertTicksToLabels(e){this.beforeTickToLabelConversion(),this.generateTickLabels(e);let t,n;for(t=0,n=e.length;t({width:a[e]||0,height:o[e]||0});return{first:C(0),last:C(t-1),widest:C(x),highest:C(S),widths:a,heights:o}}getLabelForValue(e){return e}getPixelForValue(e,t){return NaN}getValueForPixel(e){}getPixelForTick(e){let t=this.ticks;return e<0||e>t.length-1?null:this.getPixelForValue(t[e].value)}getPixelForDecimal(e){this._reversePixels&&(e=1-e);let t=this._startPixel+e*this._length;return _t(this._alignToPixels?an(this.chart,t,0):t)}getDecimalForPixel(e){let t=(e-this._startPixel)/this._length;return this._reversePixels?1-t:t}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){let{min:e,max:t}=this;return e<0&&t<0?t:e>0&&t>0?e:0}getContext(e){let t=this.ticks||[];if(e>=0&&eo*r?o/n:s/r:s*r0:!!e}_computeGridLineItems(e){let t=this.axis,n=this.chart,r=this.options,{grid:i,position:a,border:o}=r,s=i.offset,c=this.isHorizontal(),l=this.ticks.length+ +!!s,u=Ya(i),d=[],f=o.setContext(this.getContext()),p=f.display?f.width:0,m=p/2,h=function(e){return an(n,e,p)},g,_,v,y,b,x,S,C,w,T,E,D;if(a===`top`)g=h(this.bottom),x=this.bottom-u,C=g-m,T=h(e.top)+m,D=e.bottom;else if(a===`bottom`)g=h(this.top),T=e.top,D=h(e.bottom)-m,x=g+m,C=this.top+u;else if(a===`left`)g=h(this.right),b=this.right-u,S=g-m,w=h(e.left)+m,E=e.right;else if(a===`right`)g=h(this.left),w=e.left,E=h(e.right)-m,b=g+m,S=this.left+u;else if(t===`x`){if(a===`center`)g=h((e.top+e.bottom)/2+.5);else if(j(a)){let e=Object.keys(a)[0],t=a[e];g=h(this.chart.scales[e].getPixelForValue(t))}T=e.top,D=e.bottom,x=g+m,C=x+u}else if(t===`y`){if(a===`center`)g=h((e.left+e.right)/2);else if(j(a)){let e=Object.keys(a)[0],t=a[e];g=h(this.chart.scales[e].getPixelForValue(t))}b=g-m,S=b-u,w=e.left,E=e.right}let ee=P(r.ticks.maxTicksLimit,l),O=Math.max(1,Math.ceil(l/ee));for(_=0;_0&&(a-=r/2);break}f={left:a,top:i,width:r+t.width,height:n+t.height,color:e.backdropColor}}h.push({label:y,font:w,textOffset:D,options:{rotation:m,color:n,strokeColor:s,strokeWidth:l,textAlign:d,textBaseline:ee,translation:[b,x],backdrop:f}})}return h}_getXAxisLabelAlignment(){let{position:e,ticks:t}=this.options;if(-V(this.labelRotation))return e===`top`?`left`:`right`;let n=`center`;return t.align===`start`?n=`left`:t.align===`end`?n=`right`:t.align===`inner`&&(n=`inner`),n}_getYAxisLabelAlignment(e){let{position:t,ticks:{crossAlign:n,mirror:r,padding:i}}=this.options,a=this._getLabelSizes(),o=e+i,s=a.widest.width,c,l;return t===`left`?r?(l=this.right+i,n===`near`?c=`left`:n===`center`?(c=`center`,l+=s/2):(c=`right`,l+=s)):(l=this.right-o,n===`near`?c=`right`:n===`center`?(c=`center`,l-=s/2):(c=`left`,l=this.left)):t===`right`?r?(l=this.left+i,n===`near`?c=`right`:n===`center`?(c=`center`,l-=s/2):(c=`left`,l-=s)):(l=this.left+o,n===`near`?c=`left`:n===`center`?(c=`center`,l+=s/2):(c=`right`,l=this.right)):c=`right`,{textAlign:c,x:l}}_computeLabelArea(){if(this.options.ticks.mirror)return;let e=this.chart,t=this.options.position;if(t===`left`||t===`right`)return{top:0,left:this.left,bottom:e.height,right:this.right};if(t===`top`||t===`bottom`)return{top:this.top,left:0,bottom:this.bottom,right:e.width}}drawBackground(){let{ctx:e,options:{backgroundColor:t},left:n,top:r,width:i,height:a}=this;t&&(e.save(),e.fillStyle=t,e.fillRect(n,r,i,a),e.restore())}getLineWidthForValue(e){let t=this.options.grid;if(!this._isVisible()||!t.display)return 0;let n=this.ticks.findIndex(t=>t.value===e);return n>=0?t.setContext(this.getContext(n)).lineWidth:0}drawGrid(e){let t=this.options.grid,n=this.ctx,r=this._gridLineItems||=this._computeGridLineItems(e),i,a,o=(e,t,r)=>{!r.width||!r.color||(n.save(),n.lineWidth=r.width,n.strokeStyle=r.color,n.setLineDash(r.borderDash||[]),n.lineDashOffset=r.borderDashOffset,n.beginPath(),n.moveTo(e.x,e.y),n.lineTo(t.x,t.y),n.stroke(),n.restore())};if(t.display)for(i=0,a=r.length;i{this.draw(e)}}]:[{z:r,draw:e=>{this.drawBackground(),this.drawGrid(e),this.drawTitle()}},{z:i,draw:()=>{this.drawBorder()}},{z:n,draw:e=>{this.drawLabels(e)}}]}getMatchingVisibleMetas(e){let t=this.chart.getSortedVisibleDatasetMetas(),n=this.axis+`AxisID`,r=[],i,a;for(i=0,a=t.length;i{let r=n.split(`.`),i=r.pop(),a=[e].concat(r).join(`.`),o=t[n].split(`.`),s=o.pop(),c=o.join(`.`);K.route(a,i,c,s)})}function ao(e){return`id`in e&&`defaults`in e}var X=new class{constructor(){this.controllers=new no(gi,`datasets`,!0),this.elements=new no(Fa,`elements`),this.plugins=new no(Object,`plugins`),this.scales=new no(to,`scales`),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...e){this._each(`register`,e)}remove(...e){this._each(`unregister`,e)}addControllers(...e){this._each(`register`,e,this.controllers)}addElements(...e){this._each(`register`,e,this.elements)}addPlugins(...e){this._each(`register`,e,this.plugins)}addScales(...e){this._each(`register`,e,this.scales)}getController(e){return this._get(e,this.controllers,`controller`)}getElement(e){return this._get(e,this.elements,`element`)}getPlugin(e){return this._get(e,this.plugins,`plugin`)}getScale(e){return this._get(e,this.scales,`scale`)}removeControllers(...e){this._each(`unregister`,e,this.controllers)}removeElements(...e){this._each(`unregister`,e,this.elements)}removePlugins(...e){this._each(`unregister`,e,this.plugins)}removeScales(...e){this._each(`unregister`,e,this.scales)}_each(e,t,n){[...t].forEach(t=>{let r=n||this._getRegistryForType(t);n||r.isForType(t)||r===this.plugins&&t.id?this._exec(e,r,t):I(t,t=>{let r=n||this._getRegistryForType(t);this._exec(e,r,t)})})}_exec(e,t,n){let r=qe(e);F(n[`before`+r],[],n),t[e](n),F(n[`after`+r],[],n)}_getRegistryForType(e){for(let t=0;te.filter(e=>!t.some(t=>e.plugin.id===t.plugin.id));this._notify(r(t,n),e,`stop`),this._notify(r(n,t),e,`start`)}};function so(e){let t={},n=[],r=Object.keys(X.plugins.items);for(let e=0;e1&&ho(e[0].toLowerCase());if(t)return t}throw Error(`Cannot determine type of '${e}' axis. Please provide 'axis' or 'position' option.`)}function vo(e,t,n){if(n[t+`AxisID`]===e)return{axis:t}}function yo(e,t){if(t.data&&t.data.datasets){let n=t.data.datasets.filter(t=>t.xAxisID===e||t.yAxisID===e);if(n.length)return vo(e,`x`,n[0])||vo(e,`y`,n[0])}return{}}function bo(e,t){let n=Zt[e.type]||{scales:{}},r=t.scales||{},i=fo(e.type,t),a=Object.create(null);return Object.keys(r).forEach(t=>{let o=r[t];if(!j(o))return console.error(`Invalid scale configuration for scale: ${t}`);if(o._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${t}`);let s=_o(t,o,yo(t,e),K.scales[o.type]),c=mo(s,i),l=n.scales||{};a[t]=Ve(Object.create(null),[{axis:s},o,l[s],l[c]])}),e.data.datasets.forEach(n=>{let i=n.type||e.type,o=n.indexAxis||fo(i,t),s=(Zt[i]||{}).scales||{};Object.keys(s).forEach(e=>{let t=po(e,o),i=n[t+`AxisID`]||t;a[i]=a[i]||Object.create(null),Ve(a[i],[{axis:t},r[i],s[e]])})}),Object.keys(a).forEach(e=>{let t=a[e];Ve(t,[K.scales[t.type],K.scale])}),a}function xo(e){let t=e.options||={};t.plugins=P(t.plugins,{}),t.scales=bo(e,t)}function So(e){return e||={},e.datasets=e.datasets||[],e.labels=e.labels||[],e}function Co(e){return e||={},e.data=So(e.data),xo(e),e}var wo=new Map,To=new Set;function Eo(e,t){let n=wo.get(e);return n||(n=t(),wo.set(e,n),To.add(n)),n}var Do=(e,t,n)=>{let r=Ke(t,n);r!==void 0&&e.add(r)},Oo=class{constructor(e){this._config=Co(e),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(e){this._config.type=e}get data(){return this._config.data}set data(e){this._config.data=So(e)}get options(){return this._config.options}set options(e){this._config.options=e}get plugins(){return this._config.plugins}update(){let e=this._config;this.clearCache(),xo(e)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(e){return Eo(e,()=>[[`datasets.${e}`,``]])}datasetAnimationScopeKeys(e,t){return Eo(`${e}.transition.${t}`,()=>[[`datasets.${e}.transitions.${t}`,`transitions.${t}`],[`datasets.${e}`,``]])}datasetElementScopeKeys(e,t){return Eo(`${e}-${t}`,()=>[[`datasets.${e}.elements.${t}`,`datasets.${e}`,`elements.${t}`,``]])}pluginScopeKeys(e){let t=e.id,n=this.type;return Eo(`${n}-plugin-${t}`,()=>[[`plugins.${t}`,...e.additionalOptionScopes||[]]])}_cachedScopes(e,t){let n=this._scopeCache,r=n.get(e);return(!r||t)&&(r=new Map,n.set(e,r)),r}getOptionScopes(e,t,n){let{options:r,type:i}=this,a=this._cachedScopes(e,n),o=a.get(t);if(o)return o;let s=new Set;t.forEach(t=>{e&&(s.add(e),t.forEach(t=>Do(s,e,t))),t.forEach(e=>Do(s,r,e)),t.forEach(e=>Do(s,Zt[i]||{},e)),t.forEach(e=>Do(s,K,e)),t.forEach(e=>Do(s,Qt,e))});let c=Array.from(s);return c.length===0&&c.push(Object.create(null)),To.has(t)&&a.set(t,c),c}chartOptionScopes(){let{options:e,type:t}=this;return[e,Zt[t]||{},K.datasets[t]||{},{type:t},K,Qt]}resolveNamedOptions(e,t,n,r=[``]){let i={$shared:!0},{resolver:a,subPrefixes:o}=ko(this._resolverCache,e,r),s=a;if(jo(a,t)){i.$shared=!1,n=Ye(n)?n():n;let t=this.createResolver(e,n,o);s=An(a,n,t)}for(let e of t)i[e]=s[e];return i}createResolver(e,t,n=[``],r){let{resolver:i}=ko(this._resolverCache,e,n);return j(t)?An(i,t,void 0,r):i}};function ko(e,t,n){let r=e.get(t);r||(r=new Map,e.set(t,r));let i=n.join(),a=r.get(i);return a||(a={resolver:kn(t,n),subPrefixes:n.filter(e=>!e.toLowerCase().includes(`hover`))},r.set(i,a)),a}var Ao=e=>j(e)&&Object.getOwnPropertyNames(e).some(t=>Ye(e[t]));function jo(e,t){let{isScriptable:n,isIndexable:r}=jn(e);for(let i of t){let t=n(i),a=r(i),o=(a||t)&&e[i];if(t&&(Ye(o)||Ao(o))||a&&A(o))return!0}return!1}var Mo=`4.5.1`,No=[`top`,`bottom`,`left`,`right`,`chartArea`];function Po(e,t){return e===`top`||e===`bottom`||No.indexOf(e)===-1&&t===`x`}function Fo(e,t){return function(n,r){return n[e]===r[e]?n[t]-r[t]:n[e]-r[e]}}function Io(e){let t=e.chart,n=t.options.animation;t.notifyPlugins(`afterRender`),F(n&&n.onComplete,[e],t)}function Lo(e){let t=e.chart,n=t.options.animation;F(n&&n.onProgress,[e],t)}function Ro(e){return ar()&&typeof e==`string`?e=document.getElementById(e):e&&e.length&&(e=e[0]),e&&e.canvas&&(e=e.canvas),e}var zo={},Bo=e=>{let t=Ro(e);return Object.values(zo).filter(e=>e.canvas===t).pop()};function Vo(e,t,n){let r=Object.keys(e);for(let i of r){let r=+i;if(r>=t){let a=e[i];delete e[i],(n>0||r>t)&&(e[r+n]=a)}}}function Ho(e,t,n,r){return!n||e.type===`mouseout`?null:r?t:e}var Uo=class{static defaults=K;static instances=zo;static overrides=Zt;static registry=X;static version=Mo;static getChart=Bo;static register(...e){X.add(...e),Wo()}static unregister(...e){X.remove(...e),Wo()}constructor(e,t){let n=this.config=new Oo(t),r=Ro(e),i=Bo(r);if(i)throw Error(`Canvas is already in use. Chart with ID '`+i.id+`' must be destroyed before the canvas with ID '`+i.canvas.id+`' can be reused.`);let a=n.createResolver(n.chartOptionScopes(),this.getContext());this.platform=new(n.platform||(Pa(r))),this.platform.updateConfig(n);let o=this.platform.acquireContext(r,a.aspectRatio),s=o&&o.canvas,c=s&&s.height,l=s&&s.width;if(this.id=Ne(),this.ctx=o,this.canvas=s,this.width=l,this.height=c,this._options=a,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new oo,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=Ot(e=>this.update(e),a.resizeDelay||0),this._dataChanges=[],zo[this.id]=this,!o||!s){console.error(`Failed to create chart: can't acquire context from the given item`);return}Wr.listen(this,`complete`,Io),Wr.listen(this,`progress`,Lo),this._initialize(),this.attached&&this.update()}get aspectRatio(){let{options:{aspectRatio:e,maintainAspectRatio:t},width:n,height:r,_aspectRatio:i}=this;return k(e)?t&&i?i:r?n/r:null:e}get data(){return this.config.data}set data(e){this.config.data=e}get options(){return this._options}set options(e){this.config.options=e}get registry(){return X}_initialize(){return this.notifyPlugins(`beforeInit`),this.options.responsive?this.resize():vr(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins(`afterInit`),this}clear(){return on(this.canvas,this.ctx),this}stop(){return Wr.stop(this),this}resize(e,t){Wr.running(this)?this._resizeBeforeDraw={width:e,height:t}:this._resize(e,t)}_resize(e,t){let n=this.options,r=this.canvas,i=n.maintainAspectRatio&&this.aspectRatio,a=this.platform.getMaximumSize(r,e,t,i),o=n.devicePixelRatio||this.platform.getDevicePixelRatio(),s=this.width?`resize`:`attach`;this.width=a.width,this.height=a.height,this._aspectRatio=this.aspectRatio,vr(this,o,!0)&&(this.notifyPlugins(`resize`,{size:a}),F(n.onResize,[this,a],this),this.attached&&this._doResize(s)&&this.render())}ensureScalesHaveIDs(){I(this.options.scales||{},(e,t)=>{e.id=t})}buildOrUpdateScales(){let e=this.options,t=e.scales,n=this.scales,r=Object.keys(n).reduce((e,t)=>(e[t]=!1,e),{}),i=[];t&&(i=i.concat(Object.keys(t).map(e=>{let n=t[e],r=_o(e,n),i=r===`r`,a=r===`x`;return{options:n,dposition:i?`chartArea`:a?`bottom`:`left`,dtype:i?`radialLinear`:a?`category`:`linear`}}))),I(i,t=>{let i=t.options,a=i.id,o=_o(a,i),s=P(i.type,t.dtype);(i.position===void 0||Po(i.position,o)!==Po(t.dposition))&&(i.position=t.dposition),r[a]=!0;let c=null;a in n&&n[a].type===s?c=n[a]:(c=new(X.getScale(s))({id:a,type:s,ctx:this.ctx,chart:this}),n[c.id]=c),c.init(i,e)}),I(r,(e,t)=>{e||delete n[t]}),I(n,e=>{Y.configure(this,e,e.options),Y.addBox(this,e)})}_updateMetasets(){let e=this._metasets,t=this.data.datasets.length,n=e.length;if(e.sort((e,t)=>e.index-t.index),n>t){for(let e=t;et.length&&delete this._stacks,e.forEach((e,n)=>{t.filter(t=>t===e._dataset).length===0&&this._destroyDatasetMeta(n)})}buildOrUpdateControllers(){let e=[],t=this.data.datasets,n,r;for(this._removeUnreferencedMetasets(),n=0,r=t.length;n{this.getDatasetMeta(t).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins(`reset`)}update(e){let t=this.config;t.update();let n=this._options=t.createResolver(t.chartOptionScopes(),this.getContext()),r=this._animationsDisabled=!n.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins(`beforeUpdate`,{mode:e,cancelable:!0})===!1)return;let i=this.buildOrUpdateControllers();this.notifyPlugins(`beforeElementsUpdate`);let a=0;for(let e=0,t=this.data.datasets.length;e{e.reset()}),this._updateDatasets(e),this.notifyPlugins(`afterUpdate`,{mode:e}),this._layers.sort(Fo(`z`,`_idx`));let{_active:o,_lastEvent:s}=this;s?this._eventHandler(s,!0):o.length&&this._updateHoverStyles(o,o,!0),this.render()}_updateScales(){I(this.scales,e=>{Y.removeBox(this,e)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){let e=this.options;(!Xe(new Set(Object.keys(this._listeners)),new Set(e.events))||!!this._responsiveListeners!==e.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){let{_hiddenIndices:e}=this,t=this._getUniformDataChanges()||[];for(let{method:n,start:r,count:i}of t)Vo(e,r,n===`_removeElements`?-i:i)}_getUniformDataChanges(){let e=this._dataChanges;if(!e||!e.length)return;this._dataChanges=[];let t=this.data.datasets.length,n=t=>new Set(e.filter(e=>e[0]===t).map((e,t)=>t+`,`+e.splice(1).join(`,`))),r=n(0);for(let e=1;ee.split(`,`)).map(e=>({method:e[1],start:+e[2],count:+e[3]}))}_updateLayout(e){if(this.notifyPlugins(`beforeLayout`,{cancelable:!0})===!1)return;Y.update(this,this.width,this.height,e);let t=this.chartArea,n=t.width<=0||t.height<=0;this._layers=[],I(this.boxes,e=>{n&&e.position===`chartArea`||(e.configure&&e.configure(),this._layers.push(...e._layers()))},this),this._layers.forEach((e,t)=>{e._idx=t}),this.notifyPlugins(`afterLayout`)}_updateDatasets(e){if(this.notifyPlugins(`beforeDatasetsUpdate`,{mode:e,cancelable:!0})!==!1){for(let e=0,t=this.data.datasets.length;e=0;--t)this._drawDataset(e[t]);this.notifyPlugins(`afterDatasetsDraw`)}_drawDataset(e){let t=this.ctx,n={meta:e,index:e.index,cancelable:!0},r=Ur(this,e);this.notifyPlugins(`beforeDatasetDraw`,n)!==!1&&(r&&un(t,r),e.controller.draw(),r&&dn(t),n.cancelable=!1,this.notifyPlugins(`afterDatasetDraw`,n))}isPointInArea(e){return ln(e,this.chartArea,this._minPadding)}getElementsAtEventForMode(e,t,n,r){let i=Yi.modes[t];return typeof i==`function`?i(this,e,n,r):[]}getDatasetMeta(e){let t=this.data.datasets[e],n=this._metasets,r=n.filter(e=>e&&e._dataset===t).pop();return r||(r={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:t&&t.order||0,index:e,_dataset:t,_parsed:[],_sorted:!1},n.push(r)),r}getContext(){return this.$context||=On(null,{chart:this,type:`chart`})}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(e){let t=this.data.datasets[e];if(!t)return!1;let n=this.getDatasetMeta(e);return typeof n.hidden==`boolean`?!n.hidden:!t.hidden}setDatasetVisibility(e,t){let n=this.getDatasetMeta(e);n.hidden=!t}toggleDataVisibility(e){this._hiddenIndices[e]=!this._hiddenIndices[e]}getDataVisibility(e){return!this._hiddenIndices[e]}_updateVisibility(e,t,n){let r=n?`show`:`hide`,i=this.getDatasetMeta(e),a=i.controller._resolveAnimations(void 0,r);Je(t)?(i.data[t].hidden=!n,this.update()):(this.setDatasetVisibility(e,n),a.update(i,{visible:n}),this.update(t=>t.datasetIndex===e?r:void 0))}hide(e,t){this._updateVisibility(e,t,!1)}show(e,t){this._updateVisibility(e,t,!0)}_destroyDatasetMeta(e){let t=this._metasets[e];t&&t.controller&&t.controller._destroy(),delete this._metasets[e]}_stop(){let e,t;for(this.stop(),Wr.remove(this),e=0,t=this.data.datasets.length;e{t.addEventListener(this,n,r),e[n]=r},r=(e,t,n)=>{e.offsetX=t,e.offsetY=n,this._eventHandler(e)};I(this.options.events,e=>n(e,r))}bindResponsiveEvents(){this._responsiveListeners||={};let e=this._responsiveListeners,t=this.platform,n=(n,r)=>{t.addEventListener(this,n,r),e[n]=r},r=(n,r)=>{e[n]&&(t.removeEventListener(this,n,r),delete e[n])},i=(e,t)=>{this.canvas&&this.resize(e,t)},a,o=()=>{r(`attach`,o),this.attached=!0,this.resize(),n(`resize`,i),n(`detach`,a)};a=()=>{this.attached=!1,r(`resize`,i),this._stop(),this._resize(0,0),n(`attach`,o)},t.isAttached(this.canvas)?o():a()}unbindEvents(){I(this._listeners,(e,t)=>{this.platform.removeEventListener(this,t,e)}),this._listeners={},I(this._responsiveListeners,(e,t)=>{this.platform.removeEventListener(this,t,e)}),this._responsiveListeners=void 0}updateHoverStyle(e,t,n){let r=n?`set`:`remove`,i,a,o,s;for(t===`dataset`&&(i=this.getDatasetMeta(e[0].datasetIndex),i.controller[`_`+r+`DatasetHoverStyle`]()),o=0,s=e.length;o{let n=this.getDatasetMeta(e);if(!n)throw Error(`No dataset found at index `+e);return{datasetIndex:e,element:n.data[t],index:t}});Ie(n,t)||(this._active=n,this._lastEvent=null,this._updateHoverStyles(n,t))}notifyPlugins(e,t,n){return this._plugins.notify(this,e,t,n)}isPluginEnabled(e){return this._plugins._cache.filter(t=>t.plugin.id===e).length===1}_updateHoverStyles(e,t,n){let r=this.options.hover,i=(e,t)=>e.filter(e=>!t.some(t=>e.datasetIndex===t.datasetIndex&&e.index===t.index)),a=i(t,e),o=n?e:i(e,t);a.length&&this.updateHoverStyle(a,r.mode,!1),o.length&&r.mode&&this.updateHoverStyle(o,r.mode,!0)}_eventHandler(e,t){let n={event:e,replay:t,cancelable:!0,inChartArea:this.isPointInArea(e)},r=t=>(t.options.events||this.options.events).includes(e.native.type);if(this.notifyPlugins(`beforeEvent`,n,r)===!1)return;let i=this._handleEvent(e,t,n.inChartArea);return n.cancelable=!1,this.notifyPlugins(`afterEvent`,n,r),(i||n.changed)&&this.render(),this}_handleEvent(e,t,n){let{_active:r=[],options:i}=this,a=t,o=this._getActiveElements(e,r,n,a),s=Ze(e),c=Ho(e,this._lastEvent,n,s);n&&(this._lastEvent=null,F(i.onHover,[e,o,this],this),s&&F(i.onClick,[e,o,this],this));let l=!Ie(o,r);return(l||t)&&(this._active=o,this._updateHoverStyles(o,r,t)),this._lastEvent=c,l}_getActiveElements(e,t,n,r){if(e.type===`mouseout`)return[];if(!n)return t;let i=this.options.hover;return this.getElementsAtEventForMode(e,i.mode,i,r)}};function Wo(){return I(Uo.instances,e=>e._plugins.invalidate())}function Go(e,t,n){let{startAngle:r,x:i,y:a,outerRadius:o,innerRadius:s,options:c}=t,{borderWidth:l,borderJoinStyle:u}=c,d=Math.min(l/o,H(r-n));if(e.beginPath(),e.arc(i,a,o-l/2,r+d/2,n-d/2),s>0){let t=Math.min(l/s,H(r-n));e.arc(i,a,s+l/2,n-t/2,r+t/2,!0)}else{let t=Math.min(l/2,o*H(r-n));if(u===`round`)e.arc(i,a,t,n-L/2,r+L/2,!0);else if(u===`bevel`){let o=2*t*t,s=-o*Math.cos(n+L/2)+i,c=-o*Math.sin(n+L/2)+a,l=o*Math.cos(r+L/2)+i,u=o*Math.sin(r+L/2)+a;e.lineTo(s,c),e.lineTo(l,u)}}e.closePath(),e.moveTo(0,0),e.rect(0,0,e.canvas.width,e.canvas.height),e.clip(`evenodd`)}function Ko(e,t,n){let{startAngle:r,pixelMargin:i,x:a,y:o,outerRadius:s,innerRadius:c}=t,l=i/s;e.beginPath(),e.arc(a,o,s,r-l,n+l),c>i?(l=i/c,e.arc(a,o,c,n+l,r-l,!0)):e.arc(a,o,i,n+z,r-z),e.closePath(),e.clip()}function qo(e){return Cn(e,[`outerStart`,`outerEnd`,`innerStart`,`innerEnd`])}function Jo(e,t,n,r){let i=qo(e.options.borderRadius),a=(n-t)/2,o=Math.min(a,r*t/2),s=e=>{let t=(n-Math.min(a,e))*r/2;return U(e,0,Math.min(a,t))};return{outerStart:s(i.outerStart),outerEnd:s(i.outerEnd),innerStart:U(i.innerStart,0,o),innerEnd:U(i.innerEnd,0,o)}}function Yo(e,t,n,r){return{x:n+e*Math.cos(t),y:r+e*Math.sin(t)}}function Xo(e,t,n,r,i,a){let{x:o,y:s,startAngle:c,pixelMargin:l,innerRadius:u}=t,d=Math.max(t.outerRadius+r+n-l,0),f=u>0?u+r+n+l:0,p=0,m=i-c;if(r){let e=((u>0?u-r:0)+(d>0?d-r:0))/2;p=(m-(e===0?m:m*e/(e+r)))/2}let h=(m-Math.max(.001,m*d-n/L)/d)/2,g=c+h+p,_=i-h-p,{outerStart:v,outerEnd:y,innerStart:b,innerEnd:x}=Jo(t,f,d,_-g),S=d-v,C=d-y,w=g+v/S,T=_-y/C,E=f+b,D=f+x,ee=g+b/E,O=_-x/D;if(e.beginPath(),a){let t=(w+T)/2;if(e.arc(o,s,d,w,t),e.arc(o,s,d,t,T),y>0){let t=Yo(C,T,o,s);e.arc(t.x,t.y,y,T,_+z)}let n=Yo(D,_,o,s);if(e.lineTo(n.x,n.y),x>0){let t=Yo(D,O,o,s);e.arc(t.x,t.y,x,_+z,O+Math.PI)}let r=(_-x/f+(g+b/f))/2;if(e.arc(o,s,f,_-x/f,r,!0),e.arc(o,s,f,r,g+b/f,!0),b>0){let t=Yo(E,ee,o,s);e.arc(t.x,t.y,b,ee+Math.PI,g-z)}let i=Yo(S,g,o,s);if(e.lineTo(i.x,i.y),v>0){let t=Yo(S,w,o,s);e.arc(t.x,t.y,v,g-z,w)}}else{e.moveTo(o,s);let t=Math.cos(w)*d+o,n=Math.sin(w)*d+s;e.lineTo(t,n);let r=Math.cos(T)*d+o,i=Math.sin(T)*d+s;e.lineTo(r,i)}e.closePath()}function Zo(e,t,n,r,i){let{fullCircles:a,startAngle:o,circumference:s}=t,c=t.endAngle;if(a){Xo(e,t,n,r,c,i);for(let t=0;t=L&&p===0&&u!==`miter`&&Go(e,t,h),a||(Xo(e,t,n,r,h,i),e.stroke())}var $o=class extends Fa{static id=`arc`;static defaults={borderAlign:`center`,borderColor:`#fff`,borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0,selfJoin:!1};static defaultRoutes={backgroundColor:`backgroundColor`};static descriptors={_scriptable:!0,_indexable:e=>e!==`borderDash`};circumference;endAngle;fullCircles;innerRadius;outerRadius;pixelMargin;startAngle;constructor(e){super(),this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,e&&Object.assign(this,e)}inRange(e,t,n){let{angle:r,distance:i}=pt(this.getProps([`x`,`y`],n),{x:e,y:t}),{startAngle:a,endAngle:o,innerRadius:s,outerRadius:c,circumference:l}=this.getProps([`startAngle`,`endAngle`,`innerRadius`,`outerRadius`,`circumference`],n),u=(this.options.spacing+this.options.borderWidth)/2,d=P(l,o-a),f=gt(r,a,o)&&a!==o,p=d>=R||f,m=W(i,s+u,c+u);return p&&m}getCenterPoint(e){let{x:t,y:n,startAngle:r,endAngle:i,innerRadius:a,outerRadius:o}=this.getProps([`x`,`y`,`startAngle`,`endAngle`,`innerRadius`,`outerRadius`],e),{offset:s,spacing:c}=this.options,l=(r+i)/2,u=(a+o+c+s)/2;return{x:t+Math.cos(l)*u,y:n+Math.sin(l)*u}}tooltipPosition(e){return this.getCenterPoint(e)}draw(e){let{options:t,circumference:n}=this,r=(t.offset||0)/4,i=(t.spacing||0)/2,a=t.circular;if(this.pixelMargin=t.borderAlign===`inner`?.33:0,this.fullCircles=n>R?Math.floor(n/R):0,n===0||this.innerRadius<0||this.outerRadius<0)return;e.save();let o=(this.startAngle+this.endAngle)/2;e.translate(Math.cos(o)*r,Math.sin(o)*r);let s=r*(1-Math.sin(Math.min(L,n||0)));e.fillStyle=t.backgroundColor,e.strokeStyle=t.borderColor,Zo(e,this,s,i,a),Qo(e,this,s,i,a),e.restore()}};function es(e,t,n=t){e.lineCap=P(n.borderCapStyle,t.borderCapStyle),e.setLineDash(P(n.borderDash,t.borderDash)),e.lineDashOffset=P(n.borderDashOffset,t.borderDashOffset),e.lineJoin=P(n.borderJoinStyle,t.borderJoinStyle),e.lineWidth=P(n.borderWidth,t.borderWidth),e.strokeStyle=P(n.borderColor,t.borderColor)}function ts(e,t,n){e.lineTo(n.x,n.y)}function ns(e){return e.stepped?fn:e.tension||e.cubicInterpolationMode===`monotone`?pn:ts}function rs(e,t,n={}){let r=e.length,{start:i=0,end:a=r-1}=n,{start:o,end:s}=t,c=Math.max(i,o),l=Math.min(a,s),u=is&&a>s;return{count:r,start:c,loop:t.loop,ilen:l(o+(l?s-e:e))%a,y=()=>{h!==g&&(e.lineTo(u,g),e.lineTo(u,h),e.lineTo(u,_))};for(c&&(p=i[v(0)],e.moveTo(p.x,p.y)),f=0;f<=s;++f){if(p=i[v(f)],p.skip)continue;let t=p.x,n=p.y,r=t|0;r===m?(ng&&(g=n),u=(d*u+t)/++d):(y(),e.lineTo(t,n),m=r,d=0,h=g=n),_=n}y()}function os(e){let t=e.options,n=t.borderDash&&t.borderDash.length;return!e._decimated&&!e._loop&&!t.tension&&t.cubicInterpolationMode!==`monotone`&&!t.stepped&&!n?as:is}function ss(e){return e.stepped?Sr:e.tension||e.cubicInterpolationMode===`monotone`?Cr:xr}function cs(e,t,n,r){let i=t._path;i||(i=t._path=new Path2D,t.path(i,n,r)&&i.closePath()),es(e,t.options),e.stroke(i)}function ls(e,t,n,r){let{segments:i,options:a}=t,o=os(t);for(let s of i)es(e,a,s.style),e.beginPath(),o(e,t,s,{start:n,end:n+r-1})&&e.closePath(),e.stroke()}var us=typeof Path2D==`function`;function ds(e,t,n,r){us&&!t.options.segment?cs(e,t,n,r):ls(e,t,n,r)}var fs=class extends Fa{static id=`line`;static defaults={borderCapStyle:`butt`,borderDash:[],borderDashOffset:0,borderJoinStyle:`miter`,borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:`default`,fill:!1,spanGaps:!1,stepped:!1,tension:0};static defaultRoutes={backgroundColor:`backgroundColor`,borderColor:`borderColor`};static descriptors={_scriptable:!0,_indexable:e=>e!==`borderDash`&&e!==`fill`};constructor(e){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,e&&Object.assign(this,e)}updateControlPoints(e,t){let n=this.options;if((n.tension||n.cubicInterpolationMode===`monotone`)&&!n.stepped&&!this._pointsUpdated){let r=n.spanGaps?this._loop:this._fullLoop;ir(this._points,n,e,r,t),this._pointsUpdated=!0}}set points(e){this._points=e,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||=Ir(this,this.options.segment)}first(){let e=this.segments,t=this.points;return e.length&&t[e[0].start]}last(){let e=this.segments,t=this.points,n=e.length;return n&&t[e[n-1].end]}interpolate(e,t){let n=this.options,r=e[t],i=this.points,a=Nr(this,{property:t,start:r,end:r});if(!a.length)return;let o=[],s=ss(n),c,l;for(c=0,l=a.length;ce.replace(`rgb(`,`rgba(`).replace(`)`,`, 0.5)`));function Ds(e){return Ts[e%Ts.length]}function Os(e){return Es[e%Es.length]}function ks(e,t){return e.borderColor=Ds(t),e.backgroundColor=Os(t),++t}function As(e,t){return e.backgroundColor=e.data.map(()=>Ds(t++)),t}function js(e,t){return e.backgroundColor=e.data.map(()=>Os(t++)),t}function Ms(e){let t=0;return(n,r)=>{let i=e.getDatasetMeta(r).controller;i instanceof Fi?t=As(n,t):i instanceof Li?t=js(n,t):i&&(t=ks(n,t))}}function Ns(e){let t;for(t in e)if(e[t].borderColor||e[t].backgroundColor)return!0;return!1}function Ps(e){return e&&(e.borderColor||e.backgroundColor)}function Fs(){return K.borderColor!==`rgba(0,0,0,0.1)`||K.backgroundColor!==`rgba(0,0,0,0.1)`}var Is={id:`colors`,defaults:{enabled:!0,forceOverride:!1},beforeLayout(e,t,n){if(!n.enabled)return;let{data:{datasets:r},options:i}=e.config,{elements:a}=i,o=Ns(r)||Ps(i)||a&&Ns(a)||Fs();if(!n.forceOverride&&o)return;let s=Ms(e);r.forEach(s)}};function Ls(e,t,n,r,i){let a=i.samples||r;if(a>=n)return e.slice(t,t+n);let o=[],s=(n-2)/(a-2),c=0,l=t+n-1,u=t,d,f,p,m,h;for(o[c++]=e[u],d=0;dp&&(p=m,f=e[a],h=a);o[c++]=f,u=h}return o[c++]=e[l],o}function Rs(e,t,n,r){let i=0,a=0,o,s,c,l,u,d,f,p,m,h,g=[],_=t+n-1,v=e[t].x,y=e[_].x-v;for(o=t;oh&&(h=l,f=o),i=(a*i+s.x)/++a;else{let n=o-1;if(!k(d)&&!k(f)){let t=Math.min(d,f),r=Math.max(d,f);t!==p&&t!==n&&g.push({...e[t],x:i}),r!==p&&r!==n&&g.push({...e[r],x:i})}o>0&&n!==p&&g.push(e[n]),g.push(s),u=t,a=0,m=h=l,d=f=p=o}}return g}function zs(e){if(e._decimated){let t=e._data;delete e._decimated,delete e._data,Object.defineProperty(e,"data",{configurable:!0,enumerable:!0,writable:!0,value:t})}}function Bs(e){e.data.datasets.forEach(e=>{zs(e)})}function Vs(e,t){let n=t.length,r=0,i,{iScale:a}=e,{min:o,max:s,minDefined:c,maxDefined:l}=a.getUserBounds();return c&&(r=U(yt(t,a.axis,o).lo,0,n-1)),i=l?U(yt(t,a.axis,s).hi+1,r,n)-r:n-r,{start:r,count:i}}var Hs={id:`decimation`,defaults:{algorithm:`min-max`,enabled:!1},beforeElementsUpdate:(e,t,n)=>{if(!n.enabled){Bs(e);return}let r=e.width;e.data.datasets.forEach((t,i)=>{let{_data:a,indexAxis:o}=t,s=e.getDatasetMeta(i),c=a||t.data;if(En([o,e.options.indexAxis])===`y`||!s.controller.supportsDecimation)return;let l=e.scales[s.xAxisID];if(l.type!==`linear`&&l.type!==`time`||e.options.parsing)return;let{start:u,count:d}=Vs(s,c);if(d<=(n.threshold||4*r)){zs(t);return}k(a)&&(t._data=c,delete t.data,Object.defineProperty(t,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(e){this._data=e}}));let f;switch(n.algorithm){case`lttb`:f=Ls(c,u,d,r,n);break;case`min-max`:f=Rs(c,u,d,r);break;default:throw Error(`Unsupported decimation algorithm '${n.algorithm}'`)}t._decimated=f})},destroy(e){Bs(e)}};function Us(e,t,n){let r=e.segments,i=e.points,a=t.points,o=[];for(let e of r){let{start:r,end:s}=e;s=Ks(r,s,i);let c=Ws(n,i[r],i[s],e.loop);if(!t.segments){o.push({source:e,target:c,start:i[r],end:i[s]});continue}let l=Nr(t,c);for(let t of l){let r=Ws(n,a[t.start],a[t.end],t.loop),s=Mr(e,i,r);for(let e of s)o.push({source:e,target:t,start:{[n]:qs(c,r,`start`,Math.max)},end:{[n]:qs(c,r,`end`,Math.min)}})}}return o}function Ws(e,t,n,r){if(r)return;let i=t[e],a=n[e];return e===`angle`&&(i=H(i),a=H(a)),{property:e,start:i,end:a}}function Gs(e,t){let{x:n=null,y:r=null}=e||{},i=t.points,a=[];return t.segments.forEach(({start:e,end:t})=>{t=Ks(e,t,i);let o=i[e],s=i[t];r===null?n!==null&&(a.push({x:n,y:o.y}),a.push({x:n,y:s.y})):(a.push({x:o.x,y:r}),a.push({x:s.x,y:r}))}),a}function Ks(e,t,n){for(;t>e;t--){let e=n[t];if(!isNaN(e.x)&&!isNaN(e.y))break}return t}function qs(e,t,n,r){return e&&t?r(e[n],t[n]):e?e[n]:t?t[n]:0}function Js(e,t){let n=[],r=!1;return A(e)?(r=!0,n=e):n=Gs(e,t),n.length?new fs({points:n,options:{tension:0},_loop:r,_fullLoop:r}):null}function Ys(e){return e&&e.fill!==!1}function Xs(e,t,n){let r=e[t].fill,i=[t],a;if(!n)return r;for(;r!==!1&&i.indexOf(r)===-1;){if(!M(r))return r;if(a=e[r],!a)return!1;if(a.visible)return r;i.push(r),r=a.fill}return!1}function Zs(e,t,n){let r=tc(e);if(j(r))return isNaN(r.value)?!1:r;let i=parseFloat(r);return M(i)&&Math.floor(i)===i?Qs(r[0],t,i,n):[`origin`,`start`,`end`,`stack`,`shape`].indexOf(r)>=0&&r}function Qs(e,t,n,r){return(e===`-`||e===`+`)&&(n=t+n),n===t||n<0||n>=r?!1:n}function $s(e,t){let n=null;return e===`start`?n=t.bottom:e===`end`?n=t.top:j(e)?n=t.getPixelForValue(e.value):t.getBasePixel&&(n=t.getBasePixel()),n}function ec(e,t,n){let r;return r=e===`start`?n:e===`end`?t.options.reverse?t.min:t.max:j(e)?e.value:t.getBaseValue(),r}function tc(e){let t=e.options,n=t.fill,r=P(n&&n.target,n);return r===void 0&&(r=!!t.backgroundColor),r===!1||r===null?!1:r===!0?`origin`:r}function nc(e){let{scale:t,index:n,line:r}=e,i=[],a=r.segments,o=r.points,s=rc(t,n);s.push(Js({x:null,y:t.bottom},r));for(let e=0;e=0;--t){let n=i[t].$filler;n&&(n.line.updateControlPoints(a,n.axis),r&&n.fill&&fc(e.ctx,n,a))}},beforeDatasetsDraw(e,t,n){if(n.drawTime!==`beforeDatasetsDraw`)return;let r=e.getSortedVisibleDatasetMetas();for(let t=r.length-1;t>=0;--t){let n=r[t].$filler;Ys(n)&&fc(e.ctx,n,e.chartArea)}},beforeDatasetDraw(e,t,n){let r=t.meta.$filler;!Ys(r)||n.drawTime!==`beforeDatasetDraw`||fc(e.ctx,r,e.chartArea)},defaults:{propagate:!0,drawTime:`beforeDatasetDraw`}},bc=(e,t)=>{let{boxHeight:n=t,boxWidth:r=t}=e;return e.usePointStyle&&(n=Math.min(n,t),r=e.pointStyleWidth||Math.min(r,t)),{boxWidth:r,boxHeight:n,itemHeight:Math.max(t,n)}},xc=(e,t)=>e!==null&&t!==null&&e.datasetIndex===t.datasetIndex&&e.index===t.index,Sc=class extends Fa{constructor(e){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=e.chart,this.options=e.options,this.ctx=e.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(e,t,n){this.maxWidth=e,this.maxHeight=t,this._margins=n,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){let e=this.options.labels||{},t=F(e.generateLabels,[this.chart],this)||[];e.filter&&(t=t.filter(t=>e.filter(t,this.chart.data))),e.sort&&(t=t.sort((t,n)=>e.sort(t,n,this.chart.data))),this.options.reverse&&t.reverse(),this.legendItems=t}fit(){let{options:e,ctx:t}=this;if(!e.display){this.width=this.height=0;return}let n=e.labels,r=J(n.font),i=r.size,a=this._computeTitleHeight(),{boxWidth:o,itemHeight:s}=bc(n,i),c,l;t.font=r.string,this.isHorizontal()?(c=this.maxWidth,l=this._fitRows(a,i,o,s)+10):(l=this.maxHeight,c=this._fitCols(a,r,o,s)+10),this.width=Math.min(c,e.maxWidth||this.maxWidth),this.height=Math.min(l,e.maxHeight||this.maxHeight)}_fitRows(e,t,n,r){let{ctx:i,maxWidth:a,options:{labels:{padding:o}}}=this,s=this.legendHitBoxes=[],c=this.lineWidths=[0],l=r+o,u=e;i.textAlign=`left`,i.textBaseline=`middle`;let d=-1,f=-l;return this.legendItems.forEach((e,p)=>{let m=n+t/2+i.measureText(e.text).width;(p===0||c[c.length-1]+m+2*o>a)&&(u+=l,c[c.length-(p>0?0:1)]=0,f+=l,d++),s[p]={left:0,top:f,row:d,width:m,height:r},c[c.length-1]+=m+o}),u}_fitCols(e,t,n,r){let{ctx:i,maxHeight:a,options:{labels:{padding:o}}}=this,s=this.legendHitBoxes=[],c=this.columnSizes=[],l=a-e,u=o,d=0,f=0,p=0,m=0;return this.legendItems.forEach((e,a)=>{let{itemWidth:h,itemHeight:g}=Cc(n,t,i,e,r);a>0&&f+g+2*o>l&&(u+=d+o,c.push({width:d,height:f}),p+=d+o,m++,d=f=0),s[a]={left:p,top:f,col:m,width:h,height:g},d=Math.max(d,h),f+=g+o}),u+=d,c.push({width:d,height:f}),u}adjustHitBoxes(){if(!this.options.display)return;let e=this._computeTitleHeight(),{legendHitBoxes:t,options:{align:n,labels:{padding:r},rtl:i}}=this,a=Er(i,this.left,this.width);if(this.isHorizontal()){let i=0,o=G(n,this.left+r,this.right-this.lineWidths[i]);for(let s of t)i!==s.row&&(i=s.row,o=G(n,this.left+r,this.right-this.lineWidths[i])),s.top+=this.top+e+r,s.left=a.leftForLtr(a.x(o),s.width),o+=s.width+r}else{let i=0,o=G(n,this.top+e+r,this.bottom-this.columnSizes[i].height);for(let s of t)s.col!==i&&(i=s.col,o=G(n,this.top+e+r,this.bottom-this.columnSizes[i].height)),s.top=o,s.left+=this.left+r,s.left=a.leftForLtr(a.x(s.left),s.width),o+=s.height+r}}isHorizontal(){return this.options.position===`top`||this.options.position===`bottom`}draw(){if(this.options.display){let e=this.ctx;un(e,this),this._draw(),dn(e)}}_draw(){let{options:e,columnSizes:t,lineWidths:n,ctx:r}=this,{align:i,labels:a}=e,o=K.color,s=Er(e.rtl,this.left,this.width),c=J(a.font),{padding:l}=a,u=c.size,d=u/2,f;this.drawTitle(),r.textAlign=s.textAlign(`left`),r.textBaseline=`middle`,r.lineWidth=.5,r.font=c.string;let{boxWidth:p,boxHeight:m,itemHeight:h}=bc(a,u),g=function(e,t,n){if(isNaN(p)||p<=0||isNaN(m)||m<0)return;r.save();let i=P(n.lineWidth,1);if(r.fillStyle=P(n.fillStyle,o),r.lineCap=P(n.lineCap,`butt`),r.lineDashOffset=P(n.lineDashOffset,0),r.lineJoin=P(n.lineJoin,`miter`),r.lineWidth=i,r.strokeStyle=P(n.strokeStyle,o),r.setLineDash(P(n.lineDash,[])),a.usePointStyle)cn(r,{radius:m*Math.SQRT2/2,pointStyle:n.pointStyle,rotation:n.rotation,borderWidth:i},s.xPlus(e,p/2),t+d,a.pointStyleWidth&&p);else{let a=t+Math.max((u-m)/2,0),o=s.leftForLtr(e,p),c=Tn(n.borderRadius);r.beginPath(),Object.values(c).some(e=>e!==0)?vn(r,{x:o,y:a,w:p,h:m,radius:c}):r.rect(o,a,p,m),r.fill(),i!==0&&r.stroke()}r.restore()},_=function(e,t,n){_n(r,n.text,e,t+h/2,c,{strikethrough:n.hidden,textAlign:s.textAlign(n.textAlign)})},v=this.isHorizontal(),y=this._computeTitleHeight();f=v?{x:G(i,this.left+l,this.right-n[0]),y:this.top+l+y,line:0}:{x:this.left+l,y:G(i,this.top+y+l,this.bottom-t[0].height),line:0},Dr(this.ctx,e.textDirection);let b=h+l;this.legendItems.forEach((o,u)=>{r.strokeStyle=o.fontColor,r.fillStyle=o.fontColor;let m=r.measureText(o.text).width,h=s.textAlign(o.textAlign||=a.textAlign),x=p+d+m,S=f.x,C=f.y;if(s.setWidth(this.width),v?u>0&&S+x+l>this.right&&(C=f.y+=b,f.line++,S=f.x=G(i,this.left+l,this.right-n[f.line])):u>0&&C+b>this.bottom&&(S=f.x=S+t[f.line].width+l,f.line++,C=f.y=G(i,this.top+y+l,this.bottom-t[f.line].height)),g(s.x(S),C,o),S=At(h,S+p+d,v?S+x:this.right,e.rtl),_(s.x(S),C,o),v)f.x+=x+l;else if(typeof o.text!=`string`){let e=c.lineHeight;f.y+=Ec(o,e)+l}else f.y+=b}),Or(this.ctx,e.textDirection)}drawTitle(){let e=this.options,t=e.title,n=J(t.font),r=q(t.padding);if(!t.display)return;let i=Er(e.rtl,this.left,this.width),a=this.ctx,o=t.position,s=n.size/2,c=r.top+s,l,u=this.left,d=this.width;if(this.isHorizontal())d=Math.max(...this.lineWidths),l=this.top+c,u=G(e.align,u,this.right-d);else{let t=this.columnSizes.reduce((e,t)=>Math.max(e,t.height),0);l=c+G(e.align,this.top,this.bottom-t-e.labels.padding-this._computeTitleHeight())}let f=G(o,u,u+d);a.textAlign=i.textAlign(kt(o)),a.textBaseline=`middle`,a.strokeStyle=t.color,a.fillStyle=t.color,a.font=n.string,_n(a,t.text,f,l,n)}_computeTitleHeight(){let e=this.options.title,t=J(e.font),n=q(e.padding);return e.display?t.lineHeight+n.height:0}_getLegendItemAt(e,t){let n,r,i;if(W(e,this.left,this.right)&&W(t,this.top,this.bottom)){for(i=this.legendHitBoxes,n=0;ne.length>t.length?e:t)),t+n.size/2+r.measureText(i).width}function Tc(e,t,n){let r=e;return typeof t.text!=`string`&&(r=Ec(t,n)),r}function Ec(e,t){return t*(e.text?e.text.length:0)}function Dc(e,t){return!!((e===`mousemove`||e===`mouseout`)&&(t.onHover||t.onLeave)||t.onClick&&(e===`click`||e===`mouseup`))}var Oc={id:`legend`,_element:Sc,start(e,t,n){let r=e.legend=new Sc({ctx:e.ctx,options:n,chart:e});Y.configure(e,r,n),Y.addBox(e,r)},stop(e){Y.removeBox(e,e.legend),delete e.legend},beforeUpdate(e,t,n){let r=e.legend;Y.configure(e,r,n),r.options=n},afterUpdate(e){let t=e.legend;t.buildLabels(),t.adjustHitBoxes()},afterEvent(e,t){t.replay||e.legend.handleEvent(t.event)},defaults:{display:!0,position:`top`,align:`center`,fullSize:!0,reverse:!1,weight:1e3,onClick(e,t,n){let r=t.datasetIndex,i=n.chart;i.isDatasetVisible(r)?(i.hide(r),t.hidden=!0):(i.show(r),t.hidden=!1)},onHover:null,onLeave:null,labels:{color:e=>e.chart.options.color,boxWidth:40,padding:10,generateLabels(e){let t=e.data.datasets,{labels:{usePointStyle:n,pointStyle:r,textAlign:i,color:a,useBorderRadius:o,borderRadius:s}}=e.legend.options;return e._getSortedDatasetMetas().map(e=>{let c=e.controller.getStyle(n?0:void 0),l=q(c.borderWidth);return{text:t[e.index].label,fillStyle:c.backgroundColor,fontColor:a,hidden:!e.visible,lineCap:c.borderCapStyle,lineDash:c.borderDash,lineDashOffset:c.borderDashOffset,lineJoin:c.borderJoinStyle,lineWidth:(l.width+l.height)/4,strokeStyle:c.borderColor,pointStyle:r||c.pointStyle,rotation:c.rotation,textAlign:i||c.textAlign,borderRadius:o&&(s||c.borderRadius),datasetIndex:e.index}},this)}},title:{color:e=>e.chart.options.color,display:!1,position:`center`,text:``}},descriptors:{_scriptable:e=>!e.startsWith(`on`),labels:{_scriptable:e=>![`generateLabels`,`filter`,`sort`].includes(e)}}},kc=class extends Fa{constructor(e){super(),this.chart=e.chart,this.options=e.options,this.ctx=e.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(e,t){let n=this.options;if(this.left=0,this.top=0,!n.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=e,this.height=this.bottom=t;let r=A(n.text)?n.text.length:1;this._padding=q(n.padding);let i=r*J(n.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=i:this.width=i}isHorizontal(){let e=this.options.position;return e===`top`||e===`bottom`}_drawArgs(e){let{top:t,left:n,bottom:r,right:i,options:a}=this,o=a.align,s=0,c,l,u;return this.isHorizontal()?(l=G(o,n,i),u=t+e,c=i-n):(a.position===`left`?(l=n+e,u=G(o,r,t),s=L*-.5):(l=i-e,u=G(o,t,r),s=L*.5),c=r-t),{titleX:l,titleY:u,maxWidth:c,rotation:s}}draw(){let e=this.ctx,t=this.options;if(!t.display)return;let n=J(t.font),r=n.lineHeight/2+this._padding.top,{titleX:i,titleY:a,maxWidth:o,rotation:s}=this._drawArgs(r);_n(e,t.text,0,0,n,{color:t.color,maxWidth:o,rotation:s,textAlign:kt(t.align),textBaseline:`middle`,translation:[i,a]})}};function Ac(e,t){let n=new kc({ctx:e.ctx,options:t,chart:e});Y.configure(e,n,t),Y.addBox(e,n),e.titleBlock=n}var jc={id:`title`,_element:kc,start(e,t,n){Ac(e,n)},stop(e){let t=e.titleBlock;Y.removeBox(e,t),delete e.titleBlock},beforeUpdate(e,t,n){let r=e.titleBlock;Y.configure(e,r,n),r.options=n},defaults:{align:`center`,display:!1,font:{weight:`bold`},fullSize:!0,padding:10,position:`top`,text:``,weight:2e3},defaultRoutes:{color:`color`},descriptors:{_scriptable:!0,_indexable:!1}},Mc=new WeakMap,Nc={id:`subtitle`,start(e,t,n){let r=new kc({ctx:e.ctx,options:n,chart:e});Y.configure(e,r,n),Y.addBox(e,r),Mc.set(e,r)},stop(e){Y.removeBox(e,Mc.get(e)),Mc.delete(e)},beforeUpdate(e,t,n){let r=Mc.get(e);Y.configure(e,r,n),r.options=n},defaults:{align:`center`,display:!1,font:{weight:`normal`},fullSize:!0,padding:0,position:`top`,text:``,weight:1500},defaultRoutes:{color:`color`},descriptors:{_scriptable:!0,_indexable:!1}},Pc={average(e){if(!e.length)return!1;let t,n,r=new Set,i=0,a=0;for(t=0,n=e.length;te+t)/r.size,y:i/a}},nearest(e,t){if(!e.length)return!1;let n=t.x,r=t.y,i=1/0,a,o,s;for(a=0,o=e.length;a-1?e.split(` `):e}function Ic(e,t){let{element:n,datasetIndex:r,index:i}=t,a=e.getDatasetMeta(r).controller,{label:o,value:s}=a.getLabelAndValue(i);return{chart:e,label:o,parsed:a.getParsed(i),raw:e.data.datasets[r].data[i],formattedValue:s,dataset:a.getDataset(),dataIndex:i,datasetIndex:r,element:n}}function Lc(e,t){let n=e.chart.ctx,{body:r,footer:i,title:a}=e,{boxWidth:o,boxHeight:s}=t,c=J(t.bodyFont),l=J(t.titleFont),u=J(t.footerFont),d=a.length,f=i.length,p=r.length,m=q(t.padding),h=m.height,g=0,_=r.reduce((e,t)=>e+t.before.length+t.lines.length+t.after.length,0);if(_+=e.beforeBody.length+e.afterBody.length,d&&(h+=d*l.lineHeight+(d-1)*t.titleSpacing+t.titleMarginBottom),_){let e=t.displayColors?Math.max(s,c.lineHeight):c.lineHeight;h+=p*e+(_-p)*c.lineHeight+(_-1)*t.bodySpacing}f&&(h+=t.footerMarginTop+f*u.lineHeight+(f-1)*t.footerSpacing);let v=0,y=function(e){g=Math.max(g,n.measureText(e).width+v)};return n.save(),n.font=l.string,I(e.title,y),n.font=c.string,I(e.beforeBody.concat(e.afterBody),y),v=t.displayColors?o+2+t.boxPadding:0,I(r,e=>{I(e.before,y),I(e.lines,y),I(e.after,y)}),v=0,n.font=u.string,I(e.footer,y),n.restore(),g+=m.width,{width:g,height:h}}function Rc(e,t){let{y:n,height:r}=t;return ne.height-r/2?`bottom`:`center`}function zc(e,t,n,r){let{x:i,width:a}=r,o=n.caretSize+n.caretPadding;if(e===`left`&&i+a+o>t.width||e===`right`&&i-a-o<0)return!0}function Bc(e,t,n,r){let{x:i,width:a}=n,{width:o,chartArea:{left:s,right:c}}=e,l=`center`;return r===`center`?l=i<=(s+c)/2?`left`:`right`:i<=a/2?l=`left`:i>=o-a/2&&(l=`right`),zc(l,e,t,n)&&(l=`center`),l}function Vc(e,t,n){let r=n.yAlign||t.yAlign||Rc(e,n);return{xAlign:n.xAlign||t.xAlign||Bc(e,t,n,r),yAlign:r}}function Hc(e,t){let{x:n,width:r}=e;return t===`right`?n-=r:t===`center`&&(n-=r/2),n}function Uc(e,t,n){let{y:r,height:i}=e;return t===`top`?r+=n:t===`bottom`?r-=i+n:r-=i/2,r}function Wc(e,t,n,r){let{caretSize:i,caretPadding:a,cornerRadius:o}=e,{xAlign:s,yAlign:c}=n,l=i+a,{topLeft:u,topRight:d,bottomLeft:f,bottomRight:p}=Tn(o),m=Hc(t,s),h=Uc(t,c,l);return c===`center`?s===`left`?m+=l:s===`right`&&(m-=l):s===`left`?m-=Math.max(u,f)+i:s===`right`&&(m+=Math.max(d,p)+i),{x:U(m,0,r.width-t.width),y:U(h,0,r.height-t.height)}}function Gc(e,t,n){let r=q(n.padding);return t===`center`?e.x+e.width/2:t===`right`?e.x+e.width-r.right:e.x+r.left}function Kc(e){return Z([],Fc(e))}function qc(e,t,n){return On(e,{tooltip:t,tooltipItems:n,type:`tooltip`})}function Jc(e,t){let n=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return n?e.override(n):e}var Yc={beforeTitle:Me,title(e){if(e.length>0){let t=e[0],n=t.chart.data.labels,r=n?n.length:0;if(this&&this.options&&this.options.mode===`dataset`)return t.dataset.label||``;if(t.label)return t.label;if(r>0&&t.dataIndex{let t={before:[],lines:[],after:[]},i=Jc(n,e);Z(t.before,Fc(Q(i,`beforeLabel`,this,e))),Z(t.lines,Q(i,`label`,this,e)),Z(t.after,Fc(Q(i,`afterLabel`,this,e))),r.push(t)}),r}getAfterBody(e,t){return Kc(Q(t.callbacks,`afterBody`,this,e))}getFooter(e,t){let{callbacks:n}=t,r=Q(n,`beforeFooter`,this,e),i=Q(n,`footer`,this,e),a=Q(n,`afterFooter`,this,e),o=[];return o=Z(o,Fc(r)),o=Z(o,Fc(i)),o=Z(o,Fc(a)),o}_createItems(e){let t=this._active,n=this.chart.data,r=[],i=[],a=[],o=[],s,c;for(s=0,c=t.length;se.filter(t,r,i,n))),e.itemSort&&(o=o.sort((t,r)=>e.itemSort(t,r,n))),I(o,t=>{let n=Jc(e.callbacks,t);r.push(Q(n,`labelColor`,this,t)),i.push(Q(n,`labelPointStyle`,this,t)),a.push(Q(n,`labelTextColor`,this,t))}),this.labelColors=r,this.labelPointStyles=i,this.labelTextColors=a,this.dataPoints=o,o}update(e,t){let n=this.options.setContext(this.getContext()),r=this._active,i,a=[];if(!r.length)this.opacity!==0&&(i={opacity:0});else{let e=Pc[n.position].call(this,r,this._eventPosition);a=this._createItems(n),this.title=this.getTitle(a,n),this.beforeBody=this.getBeforeBody(a,n),this.body=this.getBody(a,n),this.afterBody=this.getAfterBody(a,n),this.footer=this.getFooter(a,n);let t=this._size=Lc(this,n),o=Object.assign({},e,t),s=Vc(this.chart,n,o),c=Wc(n,o,s,this.chart);this.xAlign=s.xAlign,this.yAlign=s.yAlign,i={opacity:1,x:c.x,y:c.y,width:t.width,height:t.height,caretX:e.x,caretY:e.y}}this._tooltipItems=a,this.$context=void 0,i&&this._resolveAnimations().update(this,i),e&&n.external&&n.external.call(this,{chart:this.chart,tooltip:this,replay:t})}drawCaret(e,t,n,r){let i=this.getCaretPosition(e,n,r);t.lineTo(i.x1,i.y1),t.lineTo(i.x2,i.y2),t.lineTo(i.x3,i.y3)}getCaretPosition(e,t,n){let{xAlign:r,yAlign:i}=this,{caretSize:a,cornerRadius:o}=n,{topLeft:s,topRight:c,bottomLeft:l,bottomRight:u}=Tn(o),{x:d,y:f}=e,{width:p,height:m}=t,h,g,_,v,y,b;return i===`center`?(y=f+m/2,r===`left`?(h=d,g=h-a,v=y+a,b=y-a):(h=d+p,g=h+a,v=y-a,b=y+a),_=h):(g=r===`left`?d+Math.max(s,l)+a:r===`right`?d+p-Math.max(c,u)-a:this.caretX,i===`top`?(v=f,y=v-a,h=g-a,_=g+a):(v=f+m,y=v+a,h=g+a,_=g-a),b=v),{x1:h,x2:g,x3:_,y1:v,y2:y,y3:b}}drawTitle(e,t,n){let r=this.title,i=r.length,a,o,s;if(i){let c=Er(n.rtl,this.x,this.width);for(e.x=Gc(this,n.titleAlign,n),t.textAlign=c.textAlign(n.titleAlign),t.textBaseline=`middle`,a=J(n.titleFont),o=n.titleSpacing,t.fillStyle=n.titleColor,t.font=a.string,s=0;se!==0)?(e.beginPath(),e.fillStyle=i.multiKeyBackground,vn(e,{x:t,y:p,w:c,h:s,radius:o}),e.fill(),e.stroke(),e.fillStyle=a.backgroundColor,e.beginPath(),vn(e,{x:n,y:p+1,w:c-2,h:s-2,radius:o}),e.fill()):(e.fillStyle=i.multiKeyBackground,e.fillRect(t,p,c,s),e.strokeRect(t,p,c,s),e.fillStyle=a.backgroundColor,e.fillRect(n,p+1,c-2,s-2))}e.fillStyle=this.labelTextColors[n]}drawBody(e,t,n){let{body:r}=this,{bodySpacing:i,bodyAlign:a,displayColors:o,boxHeight:s,boxWidth:c,boxPadding:l}=n,u=J(n.bodyFont),d=u.lineHeight,f=0,p=Er(n.rtl,this.x,this.width),m=function(n){t.fillText(n,p.x(e.x+f),e.y+d/2),e.y+=d+i},h=p.textAlign(a),g,_,v,y,b,x,S;for(t.textAlign=a,t.textBaseline=`middle`,t.font=u.string,e.x=Gc(this,h,n),t.fillStyle=n.bodyColor,I(this.beforeBody,m),f=o&&h!==`right`?a===`center`?c/2+l:c+2+l:0,y=0,x=r.length;y0&&t.stroke()}_updateAnimationTarget(e){let t=this.chart,n=this.$animations,r=n&&n.x,i=n&&n.y;if(r||i){let n=Pc[e.position].call(this,this._active,this._eventPosition);if(!n)return;let a=this._size=Lc(this,e),o=Object.assign({},n,this._size),s=Vc(t,e,o),c=Wc(e,o,s,t);(r._to!==c.x||i._to!==c.y)&&(this.xAlign=s.xAlign,this.yAlign=s.yAlign,this.width=a.width,this.height=a.height,this.caretX=n.x,this.caretY=n.y,this._resolveAnimations().update(this,c))}}_willRender(){return!!this.opacity}draw(e){let t=this.options.setContext(this.getContext()),n=this.opacity;if(!n)return;this._updateAnimationTarget(t);let r={width:this.width,height:this.height},i={x:this.x,y:this.y};n=Math.abs(n)<.001?0:n;let a=q(t.padding),o=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;t.enabled&&o&&(e.save(),e.globalAlpha=n,this.drawBackground(i,e,r,t),Dr(e,t.textDirection),i.y+=a.top,this.drawTitle(i,e,t),this.drawBody(i,e,t),this.drawFooter(i,e,t),Or(e,t.textDirection),e.restore())}getActiveElements(){return this._active||[]}setActiveElements(e,t){let n=this._active,r=e.map(({datasetIndex:e,index:t})=>{let n=this.chart.getDatasetMeta(e);if(!n)throw Error(`Cannot find a dataset at index `+e);return{datasetIndex:e,element:n.data[t],index:t}}),i=!Ie(n,r),a=this._positionChanged(r,t);(i||a)&&(this._active=r,this._eventPosition=t,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(e,t,n=!0){if(t&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;let r=this.options,i=this._active||[],a=this._getActiveElements(e,i,t,n),o=this._positionChanged(a,e),s=t||!Ie(a,i)||o;return s&&(this._active=a,(r.enabled||r.external)&&(this._eventPosition={x:e.x,y:e.y},this.update(!0,t))),s}_getActiveElements(e,t,n,r){let i=this.options;if(e.type===`mouseout`)return[];if(!r)return t.filter(e=>this.chart.data.datasets[e.datasetIndex]&&this.chart.getDatasetMeta(e.datasetIndex).controller.getParsed(e.index)!==void 0);let a=this.chart.getElementsAtEventForMode(e,i.mode,i,n);return i.reverse&&a.reverse(),a}_positionChanged(e,t){let{caretX:n,caretY:r,options:i}=this,a=Pc[i.position].call(this,e,t);return a!==!1&&(n!==a.x||r!==a.y)}},Zc=Object.freeze({__proto__:null,Colors:Is,Decimation:Hs,Filler:yc,Legend:Oc,SubTitle:Nc,Title:jc,Tooltip:{id:`tooltip`,_element:Xc,positioners:Pc,afterInit(e,t,n){n&&(e.tooltip=new Xc({chart:e,options:n}))},beforeUpdate(e,t,n){e.tooltip&&e.tooltip.initialize(n)},reset(e,t,n){e.tooltip&&e.tooltip.initialize(n)},afterDraw(e){let t=e.tooltip;if(t&&t._willRender()){let n={tooltip:t};if(e.notifyPlugins(`beforeTooltipDraw`,{...n,cancelable:!0})===!1)return;t.draw(e.ctx),e.notifyPlugins(`afterTooltipDraw`,n)}},afterEvent(e,t){if(e.tooltip){let n=t.replay;e.tooltip.handleEvent(t.event,n,t.inChartArea)&&(t.changed=!0)}},defaults:{enabled:!0,external:null,position:`average`,backgroundColor:`rgba(0,0,0,0.8)`,titleColor:`#fff`,titleFont:{weight:`bold`},titleSpacing:2,titleMarginBottom:6,titleAlign:`left`,bodyColor:`#fff`,bodySpacing:2,bodyFont:{},bodyAlign:`left`,footerColor:`#fff`,footerSpacing:2,footerMarginTop:6,footerFont:{weight:`bold`},footerAlign:`left`,padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(e,t)=>t.bodyFont.size,boxWidth:(e,t)=>t.bodyFont.size,multiKeyBackground:`#fff`,displayColors:!0,boxPadding:0,borderColor:`rgba(0,0,0,0)`,borderWidth:0,animation:{duration:400,easing:`easeOutQuart`},animations:{numbers:{type:`number`,properties:[`x`,`y`,`width`,`height`,`caretX`,`caretY`]},opacity:{easing:`linear`,duration:200}},callbacks:Yc},defaultRoutes:{bodyFont:`font`,footerFont:`font`,titleFont:`font`},descriptors:{_scriptable:e=>e!==`filter`&&e!==`itemSort`&&e!==`external`,_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:`animation`}},additionalOptionScopes:[`interaction`]}}),Qc=(e,t,n,r)=>(typeof t==`string`?(n=e.push(t)-1,r.unshift({index:n,label:t})):isNaN(t)&&(n=null),n);function $c(e,t,n,r){let i=e.indexOf(t);return i===-1?Qc(e,t,n,r):i===e.lastIndexOf(t)?i:n}var el=(e,t)=>e===null?null:U(Math.round(e),0,t);function tl(e){let t=this.getLabels();return e>=0&&et.length-1?null:this.getPixelForValue(t[e].value)}getValueForPixel(e){return Math.round(this._startValue+this.getDecimalForPixel(e)*this._valueRange)}getBasePixel(){return this.bottom}};function rl(e,t){let n=[],{bounds:r,step:i,min:a,max:o,precision:s,count:c,maxTicks:l,maxDigits:u,includeBounds:d}=e,f=i||1,p=l-1,{min:m,max:h}=t,g=!k(a),_=!k(o),v=!k(c),y=(h-m)/(u+1),b=at((h-m)/p/f)*f,x,S,C,w;if(b<1e-14&&!g&&!_)return[{value:m},{value:h}];w=Math.ceil(h/b)-Math.floor(m/b),w>p&&(b=at(w*b/p/f)*f),k(s)||(x=10**s,b=Math.ceil(b*x)/x),r===`ticks`?(S=Math.floor(m/b)*b,C=Math.ceil(h/b)*b):(S=m,C=h),g&&_&&i&<((o-a)/i,b/1e3)?(w=Math.round(Math.min((o-a)/b,l)),b=(o-a)/w,S=a,C=o):v?(S=g?a:S,C=_?o:C,w=c-1,b=(C-S)/w):(w=(C-S)/b,w=it(w,Math.round(w),b/1e3)?Math.round(w):Math.ceil(w));let T=Math.max(ft(b),ft(S));x=10**(k(s)?T:s),S=Math.round(S*x)/x,C=Math.round(C*x)/x;let E=0;for(g&&(d&&S!==a?(n.push({value:a}),So)break;n.push({value:e})}return _&&d&&C!==o?n.length&&it(n[n.length-1].value,o,il(o,y,e))?n[n.length-1].value=o:n.push({value:o}):(!_||C===o)&&n.push({value:C}),n}function il(e,t,{horizontal:n,minRotation:r}){let i=V(r),a=(n?Math.sin(i):Math.cos(i))||.001,o=.75*t*(``+e).length;return Math.min(t/a,o)}var al=class extends to{constructor(e){super(e),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(e,t){return k(e)||(typeof e==`number`||e instanceof Number)&&!isFinite(+e)?null:+e}handleTickRangeOptions(){let{beginAtZero:e}=this.options,{minDefined:t,maxDefined:n}=this.getUserBounds(),{min:r,max:i}=this,a=e=>r=t?r:e,o=e=>i=n?i:e;if(e){let e=B(r),t=B(i);e<0&&t<0?o(0):e>0&&t>0&&a(0)}if(r===i){let t=i===0?1:Math.abs(i*.05);o(i+t),e||a(r-t)}this.min=r,this.max=i}getTickLimit(){let{maxTicksLimit:e,stepSize:t}=this.options.ticks,n;return t?(n=Math.ceil(this.max/t)-Math.floor(this.min/t)+1,n>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${t} would result generating up to ${n} ticks. Limiting to 1000.`),n=1e3)):(n=this.computeTickLimit(),e||=11),e&&(n=Math.min(e,n)),n}computeTickLimit(){return 1/0}buildTicks(){let e=this.options,t=e.ticks,n=this.getTickLimit();n=Math.max(2,n);let r=rl({maxTicks:n,bounds:e.bounds,min:e.min,max:e.max,precision:t.precision,step:t.stepSize,count:t.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:t.minRotation||0,includeBounds:t.includeBounds!==!1},this._range||this);return e.bounds===`ticks`&&ut(r,this,`value`),e.reverse?(r.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),r}configure(){let e=this.ticks,t=this.min,n=this.max;if(super.configure(),this.options.offset&&e.length){let r=(n-t)/Math.max(e.length-1,1)/2;t-=r,n+=r}this._startValue=t,this._endValue=n,this._valueRange=n-t}getLabelForValue(e){return Kt(e,this.chart.options.locale,this.options.ticks.format)}},ol=class extends al{static id=`linear`;static defaults={ticks:{callback:Yt.formatters.numeric}};determineDataLimits(){let{min:e,max:t}=this.getMinMax(!0);this.min=M(e)?e:0,this.max=M(t)?t:1,this.handleTickRangeOptions()}computeTickLimit(){let e=this.isHorizontal(),t=e?this.width:this.height,n=V(this.options.ticks.minRotation),r=(e?Math.sin(n):Math.cos(n))||.001,i=this._resolveTickFontOptions(0);return Math.ceil(t/Math.min(40,i.lineHeight/r))}getPixelForValue(e){return e===null?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getValueForPixel(e){return this._startValue+this.getDecimalForPixel(e)*this._valueRange}},sl=e=>Math.floor(rt(e)),cl=(e,t)=>10**(sl(e)+t);function ll(e){return e/10**sl(e)==1}function ul(e,t,n){let r=10**n,i=Math.floor(e/r);return Math.ceil(t/r)-i}function dl(e,t){let n=sl(t-e);for(;ul(e,t,n)>10;)n++;for(;ul(e,t,n)<10;)n--;return Math.min(n,sl(e))}function fl(e,{min:t,max:n}){t=N(e.min,t);let r=[],i=sl(t),a=dl(t,n),o=a<0?10**Math.abs(a):1,s=10**a,c=i>a?10**i:0,l=Math.round((t-c)*o)/o,u=Math.floor((t-c)/s/10)*s*10,d=Math.floor((l-u)/10**a),f=N(e.min,Math.round((c+u+d*10**a)*o)/o);for(;f=10?d=d<15?15:20:d++,d>=20&&(a++,d=2,o=a>=0?1:o),f=Math.round((c+u+d*10**a)*o)/o;let p=N(e.max,f);return r.push({value:p,major:ll(p),significand:d}),r}var pl=class extends to{static id=`logarithmic`;static defaults={ticks:{callback:Yt.formatters.logarithmic,major:{enabled:!0}}};constructor(e){super(e),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(e,t){let n=al.prototype.parse.apply(this,[e,t]);if(n===0){this._zero=!0;return}return M(n)&&n>0?n:null}determineDataLimits(){let{min:e,max:t}=this.getMinMax(!0);this.min=M(e)?Math.max(0,e):null,this.max=M(t)?Math.max(0,t):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!M(this._userMin)&&(this.min=e===cl(this.min,0)?cl(this.min,-1):cl(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){let{minDefined:e,maxDefined:t}=this.getUserBounds(),n=this.min,r=this.max,i=t=>n=e?n:t,a=e=>r=t?r:e;n===r&&(n<=0?(i(1),a(10)):(i(cl(n,-1)),a(cl(r,1)))),n<=0&&i(cl(r,-1)),r<=0&&a(cl(n,1)),this.min=n,this.max=r}buildTicks(){let e=this.options,t=fl({min:this._userMin,max:this._userMax},this);return e.bounds===`ticks`&&ut(t,this,`value`),e.reverse?(t.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),t}getLabelForValue(e){return e===void 0?`0`:Kt(e,this.chart.options.locale,this.options.ticks.format)}configure(){let e=this.min;super.configure(),this._startValue=rt(e),this._valueRange=rt(this.max)-rt(e)}getPixelForValue(e){return(e===void 0||e===0)&&(e=this.min),e===null||isNaN(e)?NaN:this.getPixelForDecimal(e===this.min?0:(rt(e)-this._startValue)/this._valueRange)}getValueForPixel(e){let t=this.getDecimalForPixel(e);return 10**(this._startValue+t*this._valueRange)}};function ml(e){let t=e.ticks;if(t.display&&e.display){let e=q(t.backdropPadding);return P(t.font&&t.font.size,K.font.size)+e.height}return 0}function hl(e,t,n){return n=A(n)?n:[n],{w:rn(e,t.string,n),h:n.length*t.lineHeight}}function gl(e,t,n,r,i){return e===r||e===i?{start:t-n/2,end:t+n/2}:ei?{start:t-n,end:t}:{start:t,end:t+n}}function _l(e){let t={l:e.left+e._padding.left,r:e.right-e._padding.right,t:e.top+e._padding.top,b:e.bottom-e._padding.bottom},n=Object.assign({},t),r=[],i=[],a=e._pointLabels.length,o=e.options.pointLabels,s=o.centerPointLabels?L/a:0;for(let c=0;ct.r&&(s=(r.end-t.r)/a,e.r=Math.max(e.r,t.r+s)),i.startt.b&&(c=(i.end-t.b)/o,e.b=Math.max(e.b,t.b+c))}function yl(e,t,n){let r=e.drawingArea,{extra:i,additionalAngle:a,padding:o,size:s}=n,c=e.getPointPosition(t,r+i+o,a),l=Math.round(dt(H(c.angle+z))),u=wl(c.y,s.h,l),d=Sl(l),f=Cl(c.x,s.w,d);return{visible:!0,x:c.x,y:u,textAlign:d,left:f,top:u,right:f+s.w,bottom:u+s.h}}function bl(e,t){if(!t)return!0;let{left:n,top:r,right:i,bottom:a}=e;return!(ln({x:n,y:r},t)||ln({x:n,y:a},t)||ln({x:i,y:r},t)||ln({x:i,y:a},t))}function xl(e,t,n){let r=[],i=e._pointLabels.length,a=e.options,{centerPointLabels:o,display:s}=a.pointLabels,c={extra:ml(a)/2,additionalAngle:o?L/i:0},l;for(let a=0;a270||n<90)&&(e-=t),e}function Tl(e,t,n){let{left:r,top:i,right:a,bottom:o}=n,{backdropColor:s}=t;if(!k(s)){let n=Tn(t.borderRadius),c=q(t.backdropPadding);e.fillStyle=s;let l=r-c.left,u=i-c.top,d=a-r+c.width,f=o-i+c.height;Object.values(n).some(e=>e!==0)?(e.beginPath(),vn(e,{x:l,y:u,w:d,h:f,radius:n}),e.fill()):e.fillRect(l,u,d,f)}}function El(e,t){let{ctx:n,options:{pointLabels:r}}=e;for(let i=t-1;i>=0;i--){let t=e._pointLabelItems[i];if(!t.visible)continue;let a=r.setContext(e.getPointLabelContext(i));Tl(n,a,t);let o=J(a.font),{x:s,y:c,textAlign:l}=t;_n(n,e._pointLabels[i],s,c+o.lineHeight/2,o,{color:a.color,textAlign:l,textBaseline:`middle`})}}function Dl(e,t,n,r){let{ctx:i}=e;if(n)i.arc(e.xCenter,e.yCenter,t,0,R);else{let n=e.getPointPosition(0,t);i.moveTo(n.x,n.y);for(let a=1;a{let n=F(this.options.pointLabels.callback,[e,t],this);return n||n===0?n:``}).filter((e,t)=>this.chart.getDataVisibility(t))}fit(){let e=this.options;e.display&&e.pointLabels.display?_l(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(e,t,n,r){this.xCenter+=Math.floor((e-t)/2),this.yCenter+=Math.floor((n-r)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(e,t,n,r))}getIndexAngle(e){let t=R/(this._pointLabels.length||1),n=this.options.startAngle||0;return H(e*t+V(n))}getDistanceFromCenterForValue(e){if(k(e))return NaN;let t=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-e)*t:(e-this.min)*t}getValueForDistanceFromCenter(e){if(k(e))return NaN;let t=e/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-t:this.min+t}getPointLabelContext(e){let t=this._pointLabels||[];if(e>=0&&e{if(t!==0||t===0&&this.min<0){s=this.getDistanceFromCenterForValue(e.value);let n=this.getContext(t),o=r.setContext(n),c=i.setContext(n);Ol(this,o,s,a,c)}}),n.display){for(e.save(),o=a-1;o>=0;o--){let r=n.setContext(this.getPointLabelContext(o)),{color:i,lineWidth:a}=r;!a||!i||(e.lineWidth=a,e.strokeStyle=i,e.setLineDash(r.borderDash),e.lineDashOffset=r.borderDashOffset,s=this.getDistanceFromCenterForValue(t.reverse?this.min:this.max),c=this.getPointPosition(o,s),e.beginPath(),e.moveTo(this.xCenter,this.yCenter),e.lineTo(c.x,c.y),e.stroke())}e.restore()}}drawBorder(){}drawLabels(){let e=this.ctx,t=this.options,n=t.ticks;if(!n.display)return;let r=this.getIndexAngle(0),i,a;e.save(),e.translate(this.xCenter,this.yCenter),e.rotate(r),e.textAlign=`center`,e.textBaseline=`middle`,this.ticks.forEach((r,o)=>{if(o===0&&this.min>=0&&!t.reverse)return;let s=n.setContext(this.getContext(o)),c=J(s.font);if(i=this.getDistanceFromCenterForValue(this.ticks[o].value),s.showLabelBackdrop){e.font=c.string,a=e.measureText(r.label).width,e.fillStyle=s.backdropColor;let t=q(s.backdropPadding);e.fillRect(-a/2-t.left,-i-c.size/2-t.top,a+t.width,c.size+t.height)}_n(e,r.label,0,-i,c,{color:s.color,strokeColor:s.textStrokeColor,strokeWidth:s.textStrokeWidth})}),e.restore()}drawTitle(){}},jl={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},$=Object.keys(jl);function Ml(e,t){return e-t}function Nl(e,t){if(k(t))return null;let n=e._adapter,{parser:r,round:i,isoWeekday:a}=e._parseOpts,o=t;return typeof r==`function`&&(o=r(o)),M(o)||(o=typeof r==`string`?n.parse(o,r):n.parse(o)),o===null?null:(i&&(o=i===`week`&&(ct(a)||a===!0)?n.startOf(o,`isoWeek`,a):n.startOf(o,i)),+o)}function Pl(e,t,n,r){let i=$.length;for(let a=$.indexOf(e);a=$.indexOf(n);a--){let n=$[a];if(jl[n].common&&e._adapter.diff(i,r,n)>=t-1)return n}return $[n?$.indexOf(n):0]}function Il(e){for(let t=$.indexOf(e)+1,n=$.length;t=t?n[r]:n[i];e[a]=!0}}function Rl(e,t,n,r){let i=e._adapter,a=+i.startOf(t[0].value,r),o=t[t.length-1].value,s,c;for(s=a;s<=o;s=+i.add(s,1,r))c=n[s],c>=0&&(t[c].major=!0);return t}function zl(e,t,n){let r=[],i={},a=t.length,o,s;for(o=0;o+e.value))}initOffsets(e=[]){let t=0,n=0,r,i;this.options.offset&&e.length&&(r=this.getDecimalForValue(e[0]),t=e.length===1?1-r:(this.getDecimalForValue(e[1])-r)/2,i=this.getDecimalForValue(e[e.length-1]),n=e.length===1?i:(i-this.getDecimalForValue(e[e.length-2]))/2);let a=e.length<3?.5:.25;t=U(t,0,a),n=U(n,0,a),this._offsets={start:t,end:n,factor:1/(t+1+n)}}_generate(){let e=this._adapter,t=this.min,n=this.max,r=this.options,i=r.time,a=i.unit||Pl(i.minUnit,t,n,this._getLabelCapacity(t)),o=P(r.ticks.stepSize,1),s=a===`week`?i.isoWeekday:!1,c=ct(s)||s===!0,l={},u=t,d,f;if(c&&(u=+e.startOf(u,`isoWeek`,s)),u=+e.startOf(u,c?`day`:a),e.diff(n,t,a)>1e5*o)throw Error(t+` and `+n+` are too far apart with stepSize of `+o+` `+a);let p=r.ticks.source===`data`&&this.getDataTimestamps();for(d=u,f=0;d+e)}getLabelForValue(e){let t=this._adapter,n=this.options.time;return n.tooltipFormat?t.format(e,n.tooltipFormat):t.format(e,n.displayFormats.datetime)}format(e,t){let n=this.options.time.displayFormats,r=this._unit,i=t||n[r];return this._adapter.format(e,i)}_tickFormatFunction(e,t,n,r){let i=this.options,a=i.ticks.callback;if(a)return F(a,[e,t,n],this);let o=i.time.displayFormats,s=this._unit,c=this._majorUnit,l=s&&o[s],u=c&&o[c],d=n[t],f=c&&u&&d&&d.major;return this._adapter.format(e,r||(f?u:l))}generateTickLabels(e){let t,n,r;for(t=0,n=e.length;t0?o:1}getDataTimestamps(){let e=this._cache.data||[],t,n;if(e.length)return e;let r=this.getMatchingVisibleMetas();if(this._normalized&&r.length)return this._cache.data=r[0].controller.getAllParsedValues(this);for(t=0,n=r.length;t=e[r].pos&&t<=e[i].pos&&({lo:r,hi:i}=yt(e,`pos`,t)),{pos:a,time:s}=e[r],{pos:o,time:c}=e[i]):(t>=e[r].time&&t<=e[i].time&&({lo:r,hi:i}=yt(e,`time`,t)),{time:a,pos:s}=e[r],{time:o,pos:c}=e[i]);let l=o-a;return l?s+(c-s)*(t-a)/l:s}var Hl=class extends Bl{static id=`timeseries`;static defaults=Bl.defaults;constructor(e){super(e),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){let e=this._getTimestampsForTable(),t=this._table=this.buildLookupTable(e);this._minPos=Vl(t,this.min),this._tableRange=Vl(t,this.max)-this._minPos,super.initOffsets(e)}buildLookupTable(e){let{min:t,max:n}=this,r=[],i=[],a,o,s,c,l;for(a=0,o=e.length;a=t&&c<=n&&r.push(c);if(r.length<2)return[{time:t,pos:0},{time:n,pos:1}];for(a=0,o=r.length;ae-t)}_getTimestampsForTable(){let e=this._cache.all||[];if(e.length)return e;let t=this.getDataTimestamps(),n=this.getLabelTimestamps();return e=t.length&&n.length?this.normalize(t.concat(n)):t.length?t:n,e=this._cache.all=e,e}getDecimalForValue(e){return(Vl(this._table,e)-this._minPos)/this._tableRange}getValueForPixel(e){let t=this._offsets,n=this.getDecimalForPixel(e)/t.factor-t.end;return Vl(this._table,n*this._tableRange+this._minPos,!0)}},Ul=[Ri,ws,Zc,Object.freeze({__proto__:null,CategoryScale:nl,LinearScale:ol,LogarithmicScale:pl,RadialLinearScale:Al,TimeScale:Bl,TimeSeriesScale:Hl})],Wl={key:0,class:`aluminum-section`},Gl={class:`card aluminum-price-card`},Kl={class:`card-header`},ql={class:`aluminum-source`},Jl={class:`aluminum-content`},Yl={class:`aluminum-price-row`},Xl={class:`aluminum-current`},Zl={class:`aluminum-price-value`},Ql={class:`change-arrow`},$l={class:`aluminum-detail-row`},eu={class:`aluminum-detail-item`},tu={class:`detail-value`},nu={class:`aluminum-detail-item`},ru={class:`detail-value`},iu={class:`aluminum-detail-item`},au={class:`detail-value`},ou={class:`aluminum-detail-item`},su={class:`detail-value`},cu={class:`aluminum-detail-item`},lu={class:`detail-value`},uu={key:0,class:`aluminum-chart-wrapper`},du={class:`aluminum-chart-container`},fu={class:`features-grid`},pu=l(e({__name:`HomeView`,setup(e){let l=d(),g=a(null),_=null,v=i({price:null,unit:``,date:``,change:0,change_percent:0,open:0,high:0,low:0,prev_close:0,week_ago_price:0,history:[]}),y=e=>e==null?`--`:Math.round(e).toLocaleString(`zh-CN`),b=async()=>{try{let e=await u(`/api/aluminum-price/current`);v.price=e.price,v.unit=e.unit,v.date=e.date,v.change=e.change,v.change_percent=e.change_percent,v.open=e.open,v.high=e.high,v.low=e.low,v.prev_close=e.prev_close,v.week_ago_price=e.week_ago_price}catch(e){console.error(`加载铝价失败:`,e)}try{v.history=await u(`/api/aluminum-price/history?days=30`),await p(),x()}catch(e){console.error(`加载铝价历史失败:`,e)}},x=()=>{if(!g.value||v.history.length===0)return;_&&_.destroy();let e=v.change>=0,t=e?`#dc2626`:`#16a34a`,n=e?`rgba(220, 38, 38, 0.08)`:`rgba(22, 163, 74, 0.08)`;_=new Uo(g.value,{type:`line`,data:{labels:v.history.map(e=>e.date.slice(5)),datasets:[{label:`收盘价 (元/吨)`,data:v.history.map(e=>e.close),borderColor:t,backgroundColor:n,fill:!0,tension:.3,pointRadius:0,borderWidth:2}]},options:{responsive:!0,maintainAspectRatio:!1,plugins:{legend:{display:!1},tooltip:{callbacks:{label:e=>`${Math.round(e.parsed.y??0).toLocaleString(`zh-CN`)} 元/吨`}}},scales:{x:{grid:{display:!1},ticks:{maxTicksLimit:10,font:{size:10},color:`var(--text-tertiary)`}},y:{grid:{color:`var(--border-light)`},ticks:{font:{size:10},color:`var(--text-tertiary)`,callback:e=>e.toLocaleString(`zh-CN`)}}}}})};return s(()=>{Uo.register(...Ul),b()}),(e,i)=>(t(),h(`div`,null,[i[13]||=c(`div`,{class:`hero-section`},[c(`h1`,{class:`hero-title`},`Gemold 模具制造管理系统`),c(`p`,{class:`hero-subtitle`},`智能模具设计与制造一体化平台,从零件分析到模具生成,全流程数字化解决方案`)],-1),v.price?(t(),h(`div`,Wl,[c(`div`,Gl,[c(`div`,Kl,[i[2]||=c(`div`,{class:`card-title`},[c(`span`,{class:`aluminum-icon`},`🪙`),m(` 铝金属价格 (SHFE) `)],-1),c(`span`,ql,`数据来源: 上海期货交易所 | 更新于 `+o(v.date),1)]),c(`div`,Jl,[c(`div`,Yl,[c(`div`,Xl,[c(`span`,Zl,o(y(v.price)),1),i[3]||=c(`span`,{class:`aluminum-price-unit`},`元/吨`,-1)]),c(`div`,{class:r([`aluminum-change`,v.change>=0?`price-up`:`price-down`])},[c(`span`,Ql,o(v.change>=0?`▲`:`▼`),1),c(`span`,null,o(y(Math.abs(v.change))),1),c(`span`,null,`(`+o(v.change_percent>=0?`+`:``)+o(v.change_percent)+`%)`,1)],2)]),c(`div`,$l,[c(`div`,eu,[i[4]||=c(`span`,{class:`detail-label`},`开盘价`,-1),c(`span`,tu,o(y(v.open)),1)]),c(`div`,nu,[i[5]||=c(`span`,{class:`detail-label`},`最高价`,-1),c(`span`,ru,o(y(v.high)),1)]),c(`div`,iu,[i[6]||=c(`span`,{class:`detail-label`},`最低价`,-1),c(`span`,au,o(y(v.low)),1)]),c(`div`,ou,[i[7]||=c(`span`,{class:`detail-label`},`昨收价`,-1),c(`span`,su,o(y(v.prev_close)),1)]),c(`div`,cu,[i[8]||=c(`span`,{class:`detail-label`},`7日前`,-1),c(`span`,lu,o(y(v.week_ago_price)),1)])]),v.history.length>0?(t(),h(`div`,uu,[i[9]||=c(`div`,{class:`aluminum-chart-title`},`近30日价格走势`,-1),c(`div`,du,[c(`canvas`,{ref_key:`chartCanvas`,ref:g},null,512)])])):f(``,!0)])])])):f(``,!0),c(`div`,fu,[c(`div`,{class:`feature-card`,onClick:i[0]||=e=>n(l).push(`/moldinsight`),style:{cursor:`pointer`}},[...i[10]||=[c(`div`,{class:`feature-icon`},`◈`,-1),c(`h3`,{class:`feature-title`},`MoldInsight`,-1),c(`p`,{class:`feature-desc`},`智能模具分析引擎,支持 STP/STEP 文件解析、分模设计、CAM 刀路规划`,-1)]]),c(`div`,{class:`feature-card`,onClick:i[1]||=e=>n(l).push(`/inventory`),style:{cursor:`pointer`}},[...i[11]||=[c(`div`,{class:`feature-icon`},`⊞`,-1),c(`h3`,{class:`feature-title`},`进销存管理`,-1),c(`p`,{class:`feature-desc`},`产品管理、采购销售、库存管理、财务管理,一站式 ERP 解决方案`,-1)]]),i[12]||=c(`div`,{class:`feature-card`},[c(`div`,{class:`feature-icon`},`⚙`),c(`h3`,{class:`feature-title`},`AI 驱动`),c(`p`,{class:`feature-desc`},`AI 分型面检测、模具方案评分、智能设计建议,提升设计效率`)],-1)])]))}}),[[`__scopeId`,`data-v-dc82ceb2`]]);export{pu as default}; \ No newline at end of file diff --git a/static/assets/InventoryTab-CfDnJ7Xa.js b/static/assets/InventoryTab-CFTHIGoz.js similarity index 97% rename from static/assets/InventoryTab-CfDnJ7Xa.js rename to static/assets/InventoryTab-CFTHIGoz.js index 40d6690..e0ccbe2 100644 --- a/static/assets/InventoryTab-CfDnJ7Xa.js +++ b/static/assets/InventoryTab-CFTHIGoz.js @@ -1 +1 @@ -import{C as e,D as t,F as n,N as r,O as i,P as a,S as o,T as s,_ as c,g as l,i as u,j as d,k as f,m as p,n as m,r as h,s as g,x as _,y as v}from"./index-BoystVy-.js";import{t as y}from"./useInventory-C7Zfw7oO.js";var b={class:`inventory-tab`},x={class:`table-header`},S=m(e({__name:`InventoryTab`,setup(e){let{state:m,loadInventory:S,ensureStockBaseData:C}=y(),w=a(!1),T=a(null),E=a(!1),D=r({product_id:null,warehouse_id:null,quantity:0,locked_quantity:0,batch_no:``,location:``});function O(){C(),T.value=null,D.product_id=null,D.warehouse_id=null,D.quantity=0,D.locked_quantity=0,D.batch_no=``,D.location=``,w.value=!0}function k(e){C(),T.value=e,D.product_id=e.product_id??null,D.warehouse_id=e.warehouse_id??null,D.quantity=e.quantity??0,D.locked_quantity=e.locked_quantity??0,D.batch_no=e.batch_no??``,D.location=e.location??``,w.value=!0}async function A(){if(!E.value){if(!D.product_id){h(`请选择物料`,`warning`);return}if(!D.warehouse_id){h(`请选择仓库`,`warning`);return}if(D.quantity<0){h(`数量不能为负数`,`warning`);return}if(D.locked_quantity>D.quantity){h(`锁定数量不能大于库存数量`,`warning`);return}E.value=!0;try{let e={product_id:D.product_id,warehouse_id:D.warehouse_id,quantity:D.quantity,locked_quantity:D.locked_quantity,batch_no:D.batch_no||null,location:D.location||null};T.value?(await g(`/api/inventory/${T.value.id}`,{method:`PUT`,body:JSON.stringify(e)}),h(`物料库存更新成功`,`success`)):(await g(`/api/inventory`,{method:`POST`,body:JSON.stringify(e)}),h(`物料库存已创建`,`success`)),w.value=!1,S()}catch(e){u(e,`保存物料库存`)}finally{E.value=!1}}}async function j(e){if(confirm(`确定要删除这个物料库存记录吗?`))try{await g(`/api/inventory/${e}`,{method:`DELETE`}),h(`物料库存已删除`,`success`),S()}catch(e){u(e,`删除物料库存`)}}return s(()=>{S()}),(e,r)=>{let a=f(`t-button`),s=f(`t-table-column`),u=f(`t-table`),h=f(`t-option`),g=f(`t-select`),y=f(`t-form-item`),S=f(`t-input-number`),C=f(`t-input`),M=f(`t-form`),N=f(`t-dialog`);return t(),v(`div`,b,[l(`div`,x,[o(a,{type:`primary`,onClick:O},{default:d(()=>[...r[8]||=[_(`+ 新增物料库存`,-1)]]),_:1})]),o(u,{data:n(m).inventory,style:{width:`100%`},loading:n(m).loading,"empty-text":`暂无库存数据`},{default:d(()=>[o(s,{prop:`product_sku`,label:`SKU`}),o(s,{prop:`product_name`,label:`物料`}),o(s,{prop:`warehouse_name`,label:`仓库`}),o(s,{prop:`quantity`,label:`数量`}),o(s,{prop:`available_quantity`,label:`可用`}),o(s,{label:`操作`,width:`180`},{default:d(({row:e})=>[o(a,{size:`small`,onClick:t=>k(e)},{default:d(()=>[...r[9]||=[_(`编辑`,-1)]]),_:1},8,[`onClick`]),o(a,{size:`small`,type:`danger`,onClick:t=>j(e.id)},{default:d(()=>[...r[10]||=[_(`删除`,-1)]]),_:1},8,[`onClick`])]),_:1})]),_:1},8,[`data`,`loading`]),o(N,{modelValue:w.value,"onUpdate:modelValue":r[7]||=e=>w.value=e,title:T.value?`编辑物料库存`:`新增物料库存`,width:`520px`,"close-on-click-modal":!1},{footer:d(()=>[o(a,{onClick:r[6]||=e=>w.value=!1,disabled:E.value},{default:d(()=>[...r[11]||=[_(`取消`,-1)]]),_:1},8,[`disabled`]),o(a,{type:`primary`,loading:E.value,disabled:E.value,onClick:A},{default:d(()=>[...r[12]||=[_(`保存`,-1)]]),_:1},8,[`loading`,`disabled`])]),default:d(()=>[o(M,{model:D,"label-width":`80px`},{default:d(()=>[o(y,{label:`物料`,required:``},{default:d(()=>[o(g,{modelValue:D.product_id,"onUpdate:modelValue":r[0]||=e=>D.product_id=e,placeholder:`请选择物料`,style:{width:`100%`}},{default:d(()=>[(t(!0),v(p,null,i(n(m).materials,e=>(t(),c(h,{key:e.id,label:e.name+(e.sku?` (`+e.sku+`)`:``),value:e.id},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`])]),_:1}),o(y,{label:`仓库`,required:``},{default:d(()=>[o(g,{modelValue:D.warehouse_id,"onUpdate:modelValue":r[1]||=e=>D.warehouse_id=e,placeholder:`请选择仓库`,style:{width:`100%`}},{default:d(()=>[(t(!0),v(p,null,i(n(m).warehouses,e=>(t(),c(h,{key:e.id,label:e.name,value:e.id},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`])]),_:1}),o(y,{label:`数量`,required:``},{default:d(()=>[o(S,{modelValue:D.quantity,"onUpdate:modelValue":r[2]||=e=>D.quantity=e,min:0,style:{width:`100%`}},null,8,[`modelValue`])]),_:1}),o(y,{label:`锁定数量`},{default:d(()=>[o(S,{modelValue:D.locked_quantity,"onUpdate:modelValue":r[3]||=e=>D.locked_quantity=e,min:0,style:{width:`100%`}},null,8,[`modelValue`])]),_:1}),o(y,{label:`批次号`},{default:d(()=>[o(C,{modelValue:D.batch_no,"onUpdate:modelValue":r[4]||=e=>D.batch_no=e,placeholder:`请输入批次号`},null,8,[`modelValue`])]),_:1}),o(y,{label:`库位`},{default:d(()=>[o(C,{modelValue:D.location,"onUpdate:modelValue":r[5]||=e=>D.location=e,placeholder:`请输入库位`},null,8,[`modelValue`])]),_:1})]),_:1},8,[`model`])]),_:1},8,[`modelValue`,`title`])])}}}),[[`__scopeId`,`data-v-37ecfc85`]]);export{S as default}; \ No newline at end of file +import{C as e,D as t,F as n,N as r,O as i,P as a,S as o,T as s,_ as c,g as l,i as u,j as d,k as f,m as p,n as m,r as h,s as g,x as _,y as v}from"./index-Dngmm__P.js";import{t as y}from"./useInventory-CrXJ8kdd.js";var b={class:`inventory-tab`},x={class:`table-header`},S=m(e({__name:`InventoryTab`,setup(e){let{state:m,loadInventory:S,ensureStockBaseData:C}=y(),w=a(!1),T=a(null),E=a(!1),D=r({product_id:null,warehouse_id:null,quantity:0,locked_quantity:0,batch_no:``,location:``});function O(){C(),T.value=null,D.product_id=null,D.warehouse_id=null,D.quantity=0,D.locked_quantity=0,D.batch_no=``,D.location=``,w.value=!0}function k(e){C(),T.value=e,D.product_id=e.product_id??null,D.warehouse_id=e.warehouse_id??null,D.quantity=e.quantity??0,D.locked_quantity=e.locked_quantity??0,D.batch_no=e.batch_no??``,D.location=e.location??``,w.value=!0}async function A(){if(!E.value){if(!D.product_id){h(`请选择物料`,`warning`);return}if(!D.warehouse_id){h(`请选择仓库`,`warning`);return}if(D.quantity<0){h(`数量不能为负数`,`warning`);return}if(D.locked_quantity>D.quantity){h(`锁定数量不能大于库存数量`,`warning`);return}E.value=!0;try{let e={product_id:D.product_id,warehouse_id:D.warehouse_id,quantity:D.quantity,locked_quantity:D.locked_quantity,batch_no:D.batch_no||null,location:D.location||null};T.value?(await g(`/api/inventory/${T.value.id}`,{method:`PUT`,body:JSON.stringify(e)}),h(`物料库存更新成功`,`success`)):(await g(`/api/inventory`,{method:`POST`,body:JSON.stringify(e)}),h(`物料库存已创建`,`success`)),w.value=!1,S()}catch(e){u(e,`保存物料库存`)}finally{E.value=!1}}}async function j(e){if(confirm(`确定要删除这个物料库存记录吗?`))try{await g(`/api/inventory/${e}`,{method:`DELETE`}),h(`物料库存已删除`,`success`),S()}catch(e){u(e,`删除物料库存`)}}return s(()=>{S()}),(e,r)=>{let a=f(`t-button`),s=f(`t-table-column`),u=f(`t-table`),h=f(`t-option`),g=f(`t-select`),y=f(`t-form-item`),S=f(`t-input-number`),C=f(`t-input`),M=f(`t-form`),N=f(`t-dialog`);return t(),v(`div`,b,[l(`div`,x,[o(a,{type:`primary`,onClick:O},{default:d(()=>[...r[8]||=[_(`+ 新增物料库存`,-1)]]),_:1})]),o(u,{data:n(m).inventory,style:{width:`100%`},loading:n(m).loading,"empty-text":`暂无库存数据`},{default:d(()=>[o(s,{prop:`product_sku`,label:`SKU`}),o(s,{prop:`product_name`,label:`物料`}),o(s,{prop:`warehouse_name`,label:`仓库`}),o(s,{prop:`quantity`,label:`数量`}),o(s,{prop:`available_quantity`,label:`可用`}),o(s,{label:`操作`,width:`180`},{default:d(({row:e})=>[o(a,{size:`small`,onClick:t=>k(e)},{default:d(()=>[...r[9]||=[_(`编辑`,-1)]]),_:1},8,[`onClick`]),o(a,{size:`small`,type:`danger`,onClick:t=>j(e.id)},{default:d(()=>[...r[10]||=[_(`删除`,-1)]]),_:1},8,[`onClick`])]),_:1})]),_:1},8,[`data`,`loading`]),o(N,{modelValue:w.value,"onUpdate:modelValue":r[7]||=e=>w.value=e,title:T.value?`编辑物料库存`:`新增物料库存`,width:`520px`,"close-on-click-modal":!1},{footer:d(()=>[o(a,{onClick:r[6]||=e=>w.value=!1,disabled:E.value},{default:d(()=>[...r[11]||=[_(`取消`,-1)]]),_:1},8,[`disabled`]),o(a,{type:`primary`,loading:E.value,disabled:E.value,onClick:A},{default:d(()=>[...r[12]||=[_(`保存`,-1)]]),_:1},8,[`loading`,`disabled`])]),default:d(()=>[o(M,{model:D,"label-width":`80px`},{default:d(()=>[o(y,{label:`物料`,required:``},{default:d(()=>[o(g,{modelValue:D.product_id,"onUpdate:modelValue":r[0]||=e=>D.product_id=e,placeholder:`请选择物料`,style:{width:`100%`}},{default:d(()=>[(t(!0),v(p,null,i(n(m).materials,e=>(t(),c(h,{key:e.id,label:e.name+(e.sku?` (`+e.sku+`)`:``),value:e.id},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`])]),_:1}),o(y,{label:`仓库`,required:``},{default:d(()=>[o(g,{modelValue:D.warehouse_id,"onUpdate:modelValue":r[1]||=e=>D.warehouse_id=e,placeholder:`请选择仓库`,style:{width:`100%`}},{default:d(()=>[(t(!0),v(p,null,i(n(m).warehouses,e=>(t(),c(h,{key:e.id,label:e.name,value:e.id},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`])]),_:1}),o(y,{label:`数量`,required:``},{default:d(()=>[o(S,{modelValue:D.quantity,"onUpdate:modelValue":r[2]||=e=>D.quantity=e,min:0,style:{width:`100%`}},null,8,[`modelValue`])]),_:1}),o(y,{label:`锁定数量`},{default:d(()=>[o(S,{modelValue:D.locked_quantity,"onUpdate:modelValue":r[3]||=e=>D.locked_quantity=e,min:0,style:{width:`100%`}},null,8,[`modelValue`])]),_:1}),o(y,{label:`批次号`},{default:d(()=>[o(C,{modelValue:D.batch_no,"onUpdate:modelValue":r[4]||=e=>D.batch_no=e,placeholder:`请输入批次号`},null,8,[`modelValue`])]),_:1}),o(y,{label:`库位`},{default:d(()=>[o(C,{modelValue:D.location,"onUpdate:modelValue":r[5]||=e=>D.location=e,placeholder:`请输入库位`},null,8,[`modelValue`])]),_:1})]),_:1},8,[`model`])]),_:1},8,[`modelValue`,`title`])])}}}),[[`__scopeId`,`data-v-37ecfc85`]]);export{S as default}; \ No newline at end of file diff --git a/static/assets/InventoryView-Lc0Z1KQy.js b/static/assets/InventoryView-DOGSgQZy.js similarity index 94% rename from static/assets/InventoryView-Lc0Z1KQy.js rename to static/assets/InventoryView-DOGSgQZy.js index 5b8160d..48b92d8 100644 --- a/static/assets/InventoryView-Lc0Z1KQy.js +++ b/static/assets/InventoryView-DOGSgQZy.js @@ -1 +1 @@ -import{A as e,C as t,D as n,E as r,F as i,I as a,O as o,R as s,S as c,T as l,_ as u,c as d,g as f,j as p,k as m,l as h,m as g,n as _,r as v,u as y,v as b,y as x}from"./index-BoystVy-.js";import{t as S}from"./inventory-BVZTHSHW.js";var C={class:`sidebar-nav`},w=[`onClick`],T={class:`group-arrow`},E=[`onClick`],D=_(t({__name:`InventorySidebar`,setup(e){let t=y(),r=S(),{menuGroups:c,openGroups:l,toggleGroup:u}=r,d=e=>{r.activeTab=e,t.push(`/inventory/${e}`)};return(e,t)=>(n(),x(`nav`,C,[(n(!0),x(g,null,o(i(c),e=>(n(),x(`div`,{key:e.key,class:`sidebar-group`},[f(`div`,{class:`sidebar-group-title`,onClick:t=>i(u)(e.key)},[f(`span`,null,s(e.title),1),f(`span`,T,s(i(l)[e.key]?`▾`:`▸`),1)],8,w),i(l)[e.key]?(n(!0),x(g,{key:0},o(e.items,e=>(n(),x(`div`,{key:e.key,class:a([`sidebar-item`,{active:i(r).activeTab===e.key}]),onClick:t=>d(e.key)},s(e.label),11,E))),128)):b(``,!0)]))),128))]))}}),[[`__scopeId`,`data-v-80d71466`]]),O={class:`page-container`},k={class:`inventory-layout`},A={class:`inventory-sidebar-wrapper`},j={class:`inventory-content`},M={class:`inventory-content-header`},N={class:`inventory-breadcrumb`},P={class:`current`},F=_(t({__name:`InventoryView`,setup(t){let a=S(),o=d(),g=y(),_=h(),C=()=>{let e=_.path.split(`/`);return e[e.length-1]||`dashboard`};return e(()=>_.path,()=>{a.activeTab=C()},{immediate:!0}),l(()=>{if(!o.user){g.push(`/login`);return}a.activeTab=C(),a.checkBackendHealth().then(()=>{if(!a.backendDbReady){v(a.backendDbMessage||`业务服务不可用`,`warning`);return}a.loadDashboard()})}),r(()=>{a.destroyPickers()}),(e,t)=>{let r=m(`t-alert`),o=m(`router-view`),l=m(`t-loading`);return n(),x(`div`,O,[t[1]||=f(`div`,{class:`page-header`},[f(`h1`,null,`进销存管理`),f(`p`,null,`库存、采购、销售管理`)],-1),f(`div`,k,[f(`aside`,A,[c(D)]),f(`section`,j,[f(`div`,M,[f(`div`,N,[f(`span`,null,s(i(a).activeMenu?.group?.title||`进销存`),1),t[0]||=f(`span`,{class:`sep`},`/`,-1),f(`span`,P,s(i(a).activeMenu?.item?.label||``),1)])]),i(a).backendDbReady?b(``,!0):(n(),u(r,{key:0,title:i(a).backendDbMessage,theme:`warning`,"show-icon":``,closable:!1,style:{"margin-bottom":`16px`}},null,8,[`title`])),c(l,{loading:i(a).loading},{default:p(()=>[c(o)]),_:1},8,[`loading`])])])])}}}),[[`__scopeId`,`data-v-c950e09f`]]);export{F as default}; \ No newline at end of file +import{A as e,C as t,D as n,E as r,F as i,I as a,O as o,R as s,S as c,T as l,_ as u,c as d,g as f,j as p,k as m,l as h,m as g,n as _,r as v,u as y,v as b,y as x}from"./index-Dngmm__P.js";import{t as S}from"./inventory-BFlQBLDI.js";var C={class:`sidebar-nav`},w=[`onClick`],T={class:`group-arrow`},E=[`onClick`],D=_(t({__name:`InventorySidebar`,setup(e){let t=y(),r=S(),{menuGroups:c,openGroups:l,toggleGroup:u}=r,d=e=>{r.activeTab=e,t.push(`/inventory/${e}`)};return(e,t)=>(n(),x(`nav`,C,[(n(!0),x(g,null,o(i(c),e=>(n(),x(`div`,{key:e.key,class:`sidebar-group`},[f(`div`,{class:`sidebar-group-title`,onClick:t=>i(u)(e.key)},[f(`span`,null,s(e.title),1),f(`span`,T,s(i(l)[e.key]?`▾`:`▸`),1)],8,w),i(l)[e.key]?(n(!0),x(g,{key:0},o(e.items,e=>(n(),x(`div`,{key:e.key,class:a([`sidebar-item`,{active:i(r).activeTab===e.key}]),onClick:t=>d(e.key)},s(e.label),11,E))),128)):b(``,!0)]))),128))]))}}),[[`__scopeId`,`data-v-80d71466`]]),O={class:`page-container`},k={class:`inventory-layout`},A={class:`inventory-sidebar-wrapper`},j={class:`inventory-content`},M={class:`inventory-content-header`},N={class:`inventory-breadcrumb`},P={class:`current`},F=_(t({__name:`InventoryView`,setup(t){let a=S(),o=d(),g=y(),_=h(),C=()=>{let e=_.path.split(`/`);return e[e.length-1]||`dashboard`};return e(()=>_.path,()=>{a.activeTab=C()},{immediate:!0}),l(()=>{if(!o.user){g.push(`/login`);return}a.activeTab=C(),a.checkBackendHealth().then(()=>{if(!a.backendDbReady){v(a.backendDbMessage||`业务服务不可用`,`warning`);return}a.loadDashboard()})}),r(()=>{a.destroyPickers()}),(e,t)=>{let r=m(`t-alert`),o=m(`router-view`),l=m(`t-loading`);return n(),x(`div`,O,[t[1]||=f(`div`,{class:`page-header`},[f(`h1`,null,`进销存管理`),f(`p`,null,`库存、采购、销售管理`)],-1),f(`div`,k,[f(`aside`,A,[c(D)]),f(`section`,j,[f(`div`,M,[f(`div`,N,[f(`span`,null,s(i(a).activeMenu?.group?.title||`进销存`),1),t[0]||=f(`span`,{class:`sep`},`/`,-1),f(`span`,P,s(i(a).activeMenu?.item?.label||``),1)])]),i(a).backendDbReady?b(``,!0):(n(),u(r,{key:0,title:i(a).backendDbMessage,theme:`warning`,"show-icon":``,closable:!1,style:{"margin-bottom":`16px`}},null,8,[`title`])),c(l,{loading:i(a).loading},{default:p(()=>[c(o)]),_:1},8,[`loading`])])])])}}}),[[`__scopeId`,`data-v-c950e09f`]]);export{F as default}; \ No newline at end of file diff --git a/static/assets/LoginView-CStpuW_n.js b/static/assets/LoginView-C7Q64TDl.js similarity index 96% rename from static/assets/LoginView-CStpuW_n.js rename to static/assets/LoginView-C7Q64TDl.js index 46cf986..dea2fad 100644 --- a/static/assets/LoginView-CStpuW_n.js +++ b/static/assets/LoginView-C7Q64TDl.js @@ -1 +1 @@ -import{C as e,D as t,N as n,R as r,S as i,_ as a,g as o,j as s,k as c,n as l,o as u,r as d,s as f,u as p,v as m,x as h,y as g}from"./index-BoystVy-.js";var _={class:`login-container`},v={class:`login-card`},y=l(e({__name:`LoginView`,setup(e){let l=p(),y=n({username:``,password:``,error:``,loading:!1}),b=async()=>{y.error=``,y.loading=!0;try{let e=await f(`/api/auth/login/json`,{method:`POST`,body:JSON.stringify({username:y.username,password:y.password})});u(e.access_token,e.user),d(`登录成功`,`success`),l.push(`/`)}catch(e){y.error=e.message||`登录失败`}finally{y.loading=!1}};return(e,n)=>{let l=c(`t-input`),u=c(`t-form-item`),d=c(`t-alert`),f=c(`t-button`),p=c(`t-form`);return t(),g(`div`,_,[o(`div`,v,[n[2]||=o(`div`,{class:`login-header`},[o(`div`,{class:`login-logo`},`G`),o(`h1`,{class:`login-title`},`Gemold`),o(`p`,{class:`login-subtitle`},`模具制造管理系统`)],-1),i(p,{onSubmit:b},{default:s(()=>[i(u,{label:`用户名`},{default:s(()=>[i(l,{modelValue:y.username,"onUpdate:modelValue":n[0]||=e=>y.username=e,placeholder:`请输入用户名`,clearable:``},null,8,[`modelValue`])]),_:1}),i(u,{label:`密码`},{default:s(()=>[i(l,{modelValue:y.password,"onUpdate:modelValue":n[1]||=e=>y.password=e,type:`password`,placeholder:`请输入密码`,clearable:``},null,8,[`modelValue`])]),_:1}),y.error?(t(),a(d,{key:0,theme:`error`,message:y.error,style:{"margin-bottom":`16px`}},null,8,[`message`])):m(``,!0),i(f,{theme:`primary`,block:``,type:`submit`,loading:y.loading},{default:s(()=>[h(r(y.loading?`登录中...`:`登录`),1)]),_:1},8,[`loading`])]),_:1})])])}}}),[[`__scopeId`,`data-v-c91bfbf2`]]);export{y as default}; \ No newline at end of file +import{C as e,D as t,N as n,R as r,S as i,_ as a,g as o,j as s,k as c,n as l,o as u,r as d,s as f,u as p,v as m,x as h,y as g}from"./index-Dngmm__P.js";var _={class:`login-container`},v={class:`login-card`},y=l(e({__name:`LoginView`,setup(e){let l=p(),y=n({username:``,password:``,error:``,loading:!1}),b=async()=>{y.error=``,y.loading=!0;try{let e=await f(`/api/auth/login/json`,{method:`POST`,body:JSON.stringify({username:y.username,password:y.password})});u(e.access_token,e.user),d(`登录成功`,`success`),l.push(`/`)}catch(e){y.error=e.message||`登录失败`}finally{y.loading=!1}};return(e,n)=>{let l=c(`t-input`),u=c(`t-form-item`),d=c(`t-alert`),f=c(`t-button`),p=c(`t-form`);return t(),g(`div`,_,[o(`div`,v,[n[2]||=o(`div`,{class:`login-header`},[o(`div`,{class:`login-logo`},`G`),o(`h1`,{class:`login-title`},`Gemold`),o(`p`,{class:`login-subtitle`},`模具制造管理系统`)],-1),i(p,{onSubmit:b},{default:s(()=>[i(u,{label:`用户名`},{default:s(()=>[i(l,{modelValue:y.username,"onUpdate:modelValue":n[0]||=e=>y.username=e,placeholder:`请输入用户名`,clearable:``},null,8,[`modelValue`])]),_:1}),i(u,{label:`密码`},{default:s(()=>[i(l,{modelValue:y.password,"onUpdate:modelValue":n[1]||=e=>y.password=e,type:`password`,placeholder:`请输入密码`,clearable:``},null,8,[`modelValue`])]),_:1}),y.error?(t(),a(d,{key:0,theme:`error`,message:y.error,style:{"margin-bottom":`16px`}},null,8,[`message`])):m(``,!0),i(f,{theme:`primary`,block:``,type:`submit`,loading:y.loading},{default:s(()=>[h(r(y.loading?`登录中...`:`登录`),1)]),_:1},8,[`loading`])]),_:1})])])}}}),[[`__scopeId`,`data-v-c91bfbf2`]]);export{y as default}; \ No newline at end of file diff --git a/static/assets/MaterialsTab-CUuSZrNR.js b/static/assets/MaterialsTab-Cq_FP1X7.js similarity index 98% rename from static/assets/MaterialsTab-CUuSZrNR.js rename to static/assets/MaterialsTab-Cq_FP1X7.js index d91d090..237a9ce 100644 --- a/static/assets/MaterialsTab-CUuSZrNR.js +++ b/static/assets/MaterialsTab-Cq_FP1X7.js @@ -1 +1 @@ -import{C as e,D as t,F as n,O as r,P as i,R as a,S as o,T as s,_ as c,g as l,h as u,i as d,j as f,k as p,m,r as h,s as g,v as _,x as v,y}from"./index-BoystVy-.js";import{t as b}from"./useInventory-C7Zfw7oO.js";var x={style:{"margin-bottom":`12px`,display:`flex`,gap:`8px`}},S={style:{display:`flex`,"justify-content":`space-between`,"align-items":`center`,"margin-bottom":`12px`}},C={style:{"text-align":`right`,"margin-top":`8px`,"font-weight":`600`}},w=e({__name:`MaterialsTab`,setup(e){let{state:w,formatCurrency:T,loadMaterials:E,loadSuppliers:D,loadPurchaseOrders:O}=b(),k=i(!1),A=i(null),j=i(!1),M=i({}),N=i(!1),P=i([]),F=i(null),I=i(!1);function L(){A.value=null,M.value={item_type:`material`,unit:`kg`,min_stock:0,max_stock:1e3,cost_price:0,sale_price:0,sku:``,name:``,category:``},k.value=!0}async function R(e){A.value=e,M.value={...e},k.value=!0}async function z(){if(!j.value){if(!M.value.sku){h(`请输入SKU`,`warning`);return}if(!M.value.name){h(`请输入名称`,`warning`);return}j.value=!0;try{A.value?(await g(`/api/products/${A.value.id}`,{method:`PUT`,body:JSON.stringify(M.value)}),h(`物料更新成功`,`success`)):(await g(`/api/products`,{method:`POST`,body:JSON.stringify(M.value)}),h(`物料创建成功`,`success`)),k.value=!1,A.value=null,M.value={},E()}catch(e){d(e,`保存物料`)}finally{j.value=!1}}}async function B(e){if(confirm(`确定要删除这个物料吗?`))try{await g(`/api/products/${e}`,{method:`DELETE`}),h(`物料已删除`,`success`),E()}catch(e){d(e,`删除物料`)}}async function V(){await E(),await D(),P.value=[],N.value=!0}function H(){P.value.push({material_id:w.materials[0]?.id||null,quantity:1,unit_price:0,remark:``})}function U(e){P.value.splice(e,1)}let W=u(()=>P.value.reduce((e,t)=>e+(t.unit_price||0)*(t.quantity||0),0));async function G(){if(!I.value){if(!F.value){h(`请选择供应商`,`warning`);return}if(!P.value||P.value.length===0){h(`请至少添加一个补货物料`,`warning`);return}for(let[e,t]of P.value.entries()){let n=e+1;if(!t.material_id){h(`第 ${n} 行:请选择物料`,`warning`);return}if(!Number.isFinite(t.quantity)||t.quantity<=0){h(`第 ${n} 行:数量必须大于 0`,`warning`);return}if(!Number.isFinite(t.unit_price)||t.unit_price<0){h(`第 ${n} 行:单价必须大于等于 0`,`warning`);return}}I.value=!0;try{let e={supplier_id:F.value,expected_date:new Date().toISOString().split(`T`)[0],remark:`物料补货`,items:P.value.map(e=>({product_id:e.material_id,quantity:e.quantity,unit_price:e.unit_price,remark:e.remark}))};await g(`/api/purchase-orders`,{method:`POST`,body:JSON.stringify(e)}),h(`采购订单创建成功`,`success`),N.value=!1,P.value=[],F.value=null,O()}catch(e){d(e,`保存补货订单`)}finally{I.value=!1}}}function K(){k.value=!1,A.value=null,M.value={}}function q(){N.value=!1,P.value=[]}return s(()=>{E()}),(e,i)=>{let s=p(`t-button`),u=p(`t-table-column`),d=p(`t-table`),h=p(`t-empty`),g=p(`t-input`),b=p(`t-form-item`),E=p(`t-input-number`),D=p(`t-form`),O=p(`t-dialog`),J=p(`t-option`),Y=p(`t-select`);return t(),y(`div`,null,[l(`div`,x,[o(s,{type:`primary`,onClick:L},{default:f(()=>[...i[12]||=[v(`新增物料`,-1)]]),_:1}),o(s,{type:`success`,onClick:V},{default:f(()=>[...i[13]||=[v(`物料补货`,-1)]]),_:1})]),o(d,{data:n(w).materials,loading:n(w).loading,stripe:``},{default:f(()=>[o(u,{prop:`sku`,label:`SKU`}),o(u,{prop:`name`,label:`名称`}),o(u,{prop:`category`,label:`分类`},{default:f(({row:e})=>[v(a(e.category||`-`),1)]),_:1}),o(u,{prop:`unit`,label:`单位`}),o(u,{label:`成本价`},{default:f(({row:e})=>[v(a(n(T)(e.cost_price)),1)]),_:1}),o(u,{prop:`min_stock`,label:`最低库存`},{default:f(({row:e})=>[v(a(e.min_stock??`-`),1)]),_:1}),o(u,{label:`操作`,width:`180`},{default:f(({row:e})=>[o(s,{type:`primary`,size:`small`,onClick:t=>R(e)},{default:f(()=>[...i[14]||=[v(`编辑`,-1)]]),_:1},8,[`onClick`]),o(s,{type:`danger`,size:`small`,onClick:t=>B(e.id)},{default:f(()=>[...i[15]||=[v(`删除`,-1)]]),_:1},8,[`onClick`])]),_:1})]),_:1},8,[`data`,`loading`]),!n(w).loading&&n(w).materials.length===0?(t(),c(h,{key:0,description:`暂无物料数据`})):_(``,!0),o(O,{visible:k.value,"onUpdate:visible":i[8]||=e=>k.value=e,title:(A.value?`编辑`:`新增`)+`物料`,width:`560px`,onClosed:K},{footer:f(()=>[o(s,{onClick:i[7]||=e=>k.value=!1,disabled:j.value},{default:f(()=>[...i[16]||=[v(`取消`,-1)]]),_:1},8,[`disabled`]),o(s,{type:`primary`,loading:j.value,disabled:j.value,onClick:z},{default:f(()=>[...i[17]||=[v(`保存`,-1)]]),_:1},8,[`loading`,`disabled`])]),default:f(()=>[o(D,{"label-width":`100px`},{default:f(()=>[o(b,{label:`类型`},{default:f(()=>[o(g,{"model-value":`物料(纳入库存)`,disabled:``})]),_:1}),o(b,{label:`SKU`,required:``},{default:f(()=>[o(g,{modelValue:M.value.sku,"onUpdate:modelValue":i[0]||=e=>M.value.sku=e,placeholder:`产品编码`},null,8,[`modelValue`])]),_:1}),o(b,{label:`名称`,required:``},{default:f(()=>[o(g,{modelValue:M.value.name,"onUpdate:modelValue":i[1]||=e=>M.value.name=e,placeholder:`产品名称`},null,8,[`modelValue`])]),_:1}),o(b,{label:`分类`},{default:f(()=>[o(g,{modelValue:M.value.category,"onUpdate:modelValue":i[2]||=e=>M.value.category=e,placeholder:`产品分类`},null,8,[`modelValue`])]),_:1}),o(b,{label:`单位`},{default:f(()=>[o(g,{modelValue:M.value.unit,"onUpdate:modelValue":i[3]||=e=>M.value.unit=e,placeholder:`kg`},null,8,[`modelValue`])]),_:1}),o(b,{label:`成本价`},{default:f(()=>[o(E,{modelValue:M.value.cost_price,"onUpdate:modelValue":i[4]||=e=>M.value.cost_price=e,precision:2,min:0,step:.01,style:{width:`100%`}},null,8,[`modelValue`])]),_:1}),o(b,{label:`最低库存`},{default:f(()=>[o(E,{modelValue:M.value.min_stock,"onUpdate:modelValue":i[5]||=e=>M.value.min_stock=e,min:0,style:{width:`100%`}},null,8,[`modelValue`])]),_:1}),o(b,{label:`最高库存`},{default:f(()=>[o(E,{modelValue:M.value.max_stock,"onUpdate:modelValue":i[6]||=e=>M.value.max_stock=e,min:0,style:{width:`100%`}},null,8,[`modelValue`])]),_:1})]),_:1})]),_:1},8,[`visible`,`title`]),o(O,{visible:N.value,"onUpdate:visible":i[11]||=e=>N.value=e,title:`物料补货`,width:`900px`,onClosed:q},{footer:f(()=>[o(s,{onClick:i[10]||=e=>N.value=!1,disabled:I.value},{default:f(()=>[...i[21]||=[v(`取消`,-1)]]),_:1},8,[`disabled`]),o(s,{type:`primary`,loading:I.value,disabled:I.value,onClick:G},{default:f(()=>[...i[22]||=[v(`创建采购订单`,-1)]]),_:1},8,[`loading`,`disabled`])]),default:f(()=>[o(D,{"label-width":`100px`,style:{"margin-bottom":`16px`}},{default:f(()=>[o(b,{label:`供应商`,required:``},{default:f(()=>[o(Y,{modelValue:F.value,"onUpdate:modelValue":i[9]||=e=>F.value=e,placeholder:`请选择供应商`,style:{width:`100%`}},{default:f(()=>[(t(!0),y(m,null,r(n(w).suppliers,e=>(t(),c(J,{key:e.id,label:e.name,value:e.id},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`])]),_:1})]),_:1}),l(`div`,S,[i[19]||=l(`span`,{style:{"font-weight":`600`}},`补货物料明细`,-1),o(s,{type:`primary`,size:`small`,onClick:H},{default:f(()=>[...i[18]||=[v(`+ 添加物料`,-1)]]),_:1})]),o(d,{data:P.value,border:``,size:`small`},{default:f(()=>[o(u,{label:`物料`,"min-width":`200`},{default:f(({row:e})=>[o(Y,{modelValue:e.material_id,"onUpdate:modelValue":t=>e.material_id=t,placeholder:`请选择物料`,style:{width:`100%`}},{default:f(()=>[(t(!0),y(m,null,r(n(w).materials,e=>(t(),c(J,{key:e.id,label:`${e.sku} - ${e.name}`,value:e.id},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`,`onUpdate:modelValue`])]),_:1}),o(u,{label:`数量`,width:`120`},{default:f(({row:e})=>[o(E,{modelValue:e.quantity,"onUpdate:modelValue":t=>e.quantity=t,min:1,size:`small`,style:{width:`100%`}},null,8,[`modelValue`,`onUpdate:modelValue`])]),_:1}),o(u,{label:`单价`,width:`120`},{default:f(({row:e})=>[o(E,{modelValue:e.unit_price,"onUpdate:modelValue":t=>e.unit_price=t,min:0,precision:2,step:.01,size:`small`,style:{width:`100%`}},null,8,[`modelValue`,`onUpdate:modelValue`])]),_:1}),o(u,{label:`总价`,width:`120`},{default:f(({row:e})=>[v(a(n(T)((e.unit_price||0)*(e.quantity||0))),1)]),_:1}),o(u,{label:`备注`,width:`150`},{default:f(({row:e})=>[o(g,{modelValue:e.remark,"onUpdate:modelValue":t=>e.remark=t,size:`small`,placeholder:`备注`},null,8,[`modelValue`,`onUpdate:modelValue`])]),_:1}),o(u,{label:`操作`,width:`80`},{default:f(({$index:e})=>[o(s,{type:`danger`,size:`small`,onClick:t=>U(e)},{default:f(()=>[...i[20]||=[v(`删除`,-1)]]),_:1},8,[`onClick`])]),_:1})]),_:1},8,[`data`]),l(`div`,C,` 补货总金额:`+a(n(T)(W.value)),1)]),_:1},8,[`visible`])])}}});export{w as default}; \ No newline at end of file +import{C as e,D as t,F as n,O as r,P as i,R as a,S as o,T as s,_ as c,g as l,h as u,i as d,j as f,k as p,m,r as h,s as g,v as _,x as v,y}from"./index-Dngmm__P.js";import{t as b}from"./useInventory-CrXJ8kdd.js";var x={style:{"margin-bottom":`12px`,display:`flex`,gap:`8px`}},S={style:{display:`flex`,"justify-content":`space-between`,"align-items":`center`,"margin-bottom":`12px`}},C={style:{"text-align":`right`,"margin-top":`8px`,"font-weight":`600`}},w=e({__name:`MaterialsTab`,setup(e){let{state:w,formatCurrency:T,loadMaterials:E,loadSuppliers:D,loadPurchaseOrders:O}=b(),k=i(!1),A=i(null),j=i(!1),M=i({}),N=i(!1),P=i([]),F=i(null),I=i(!1);function L(){A.value=null,M.value={item_type:`material`,unit:`kg`,min_stock:0,max_stock:1e3,cost_price:0,sale_price:0,sku:``,name:``,category:``},k.value=!0}async function R(e){A.value=e,M.value={...e},k.value=!0}async function z(){if(!j.value){if(!M.value.sku){h(`请输入SKU`,`warning`);return}if(!M.value.name){h(`请输入名称`,`warning`);return}j.value=!0;try{A.value?(await g(`/api/products/${A.value.id}`,{method:`PUT`,body:JSON.stringify(M.value)}),h(`物料更新成功`,`success`)):(await g(`/api/products`,{method:`POST`,body:JSON.stringify(M.value)}),h(`物料创建成功`,`success`)),k.value=!1,A.value=null,M.value={},E()}catch(e){d(e,`保存物料`)}finally{j.value=!1}}}async function B(e){if(confirm(`确定要删除这个物料吗?`))try{await g(`/api/products/${e}`,{method:`DELETE`}),h(`物料已删除`,`success`),E()}catch(e){d(e,`删除物料`)}}async function V(){await E(),await D(),P.value=[],N.value=!0}function H(){P.value.push({material_id:w.materials[0]?.id||null,quantity:1,unit_price:0,remark:``})}function U(e){P.value.splice(e,1)}let W=u(()=>P.value.reduce((e,t)=>e+(t.unit_price||0)*(t.quantity||0),0));async function G(){if(!I.value){if(!F.value){h(`请选择供应商`,`warning`);return}if(!P.value||P.value.length===0){h(`请至少添加一个补货物料`,`warning`);return}for(let[e,t]of P.value.entries()){let n=e+1;if(!t.material_id){h(`第 ${n} 行:请选择物料`,`warning`);return}if(!Number.isFinite(t.quantity)||t.quantity<=0){h(`第 ${n} 行:数量必须大于 0`,`warning`);return}if(!Number.isFinite(t.unit_price)||t.unit_price<0){h(`第 ${n} 行:单价必须大于等于 0`,`warning`);return}}I.value=!0;try{let e={supplier_id:F.value,expected_date:new Date().toISOString().split(`T`)[0],remark:`物料补货`,items:P.value.map(e=>({product_id:e.material_id,quantity:e.quantity,unit_price:e.unit_price,remark:e.remark}))};await g(`/api/purchase-orders`,{method:`POST`,body:JSON.stringify(e)}),h(`采购订单创建成功`,`success`),N.value=!1,P.value=[],F.value=null,O()}catch(e){d(e,`保存补货订单`)}finally{I.value=!1}}}function K(){k.value=!1,A.value=null,M.value={}}function q(){N.value=!1,P.value=[]}return s(()=>{E()}),(e,i)=>{let s=p(`t-button`),u=p(`t-table-column`),d=p(`t-table`),h=p(`t-empty`),g=p(`t-input`),b=p(`t-form-item`),E=p(`t-input-number`),D=p(`t-form`),O=p(`t-dialog`),J=p(`t-option`),Y=p(`t-select`);return t(),y(`div`,null,[l(`div`,x,[o(s,{type:`primary`,onClick:L},{default:f(()=>[...i[12]||=[v(`新增物料`,-1)]]),_:1}),o(s,{type:`success`,onClick:V},{default:f(()=>[...i[13]||=[v(`物料补货`,-1)]]),_:1})]),o(d,{data:n(w).materials,loading:n(w).loading,stripe:``},{default:f(()=>[o(u,{prop:`sku`,label:`SKU`}),o(u,{prop:`name`,label:`名称`}),o(u,{prop:`category`,label:`分类`},{default:f(({row:e})=>[v(a(e.category||`-`),1)]),_:1}),o(u,{prop:`unit`,label:`单位`}),o(u,{label:`成本价`},{default:f(({row:e})=>[v(a(n(T)(e.cost_price)),1)]),_:1}),o(u,{prop:`min_stock`,label:`最低库存`},{default:f(({row:e})=>[v(a(e.min_stock??`-`),1)]),_:1}),o(u,{label:`操作`,width:`180`},{default:f(({row:e})=>[o(s,{type:`primary`,size:`small`,onClick:t=>R(e)},{default:f(()=>[...i[14]||=[v(`编辑`,-1)]]),_:1},8,[`onClick`]),o(s,{type:`danger`,size:`small`,onClick:t=>B(e.id)},{default:f(()=>[...i[15]||=[v(`删除`,-1)]]),_:1},8,[`onClick`])]),_:1})]),_:1},8,[`data`,`loading`]),!n(w).loading&&n(w).materials.length===0?(t(),c(h,{key:0,description:`暂无物料数据`})):_(``,!0),o(O,{visible:k.value,"onUpdate:visible":i[8]||=e=>k.value=e,title:(A.value?`编辑`:`新增`)+`物料`,width:`560px`,onClosed:K},{footer:f(()=>[o(s,{onClick:i[7]||=e=>k.value=!1,disabled:j.value},{default:f(()=>[...i[16]||=[v(`取消`,-1)]]),_:1},8,[`disabled`]),o(s,{type:`primary`,loading:j.value,disabled:j.value,onClick:z},{default:f(()=>[...i[17]||=[v(`保存`,-1)]]),_:1},8,[`loading`,`disabled`])]),default:f(()=>[o(D,{"label-width":`100px`},{default:f(()=>[o(b,{label:`类型`},{default:f(()=>[o(g,{"model-value":`物料(纳入库存)`,disabled:``})]),_:1}),o(b,{label:`SKU`,required:``},{default:f(()=>[o(g,{modelValue:M.value.sku,"onUpdate:modelValue":i[0]||=e=>M.value.sku=e,placeholder:`产品编码`},null,8,[`modelValue`])]),_:1}),o(b,{label:`名称`,required:``},{default:f(()=>[o(g,{modelValue:M.value.name,"onUpdate:modelValue":i[1]||=e=>M.value.name=e,placeholder:`产品名称`},null,8,[`modelValue`])]),_:1}),o(b,{label:`分类`},{default:f(()=>[o(g,{modelValue:M.value.category,"onUpdate:modelValue":i[2]||=e=>M.value.category=e,placeholder:`产品分类`},null,8,[`modelValue`])]),_:1}),o(b,{label:`单位`},{default:f(()=>[o(g,{modelValue:M.value.unit,"onUpdate:modelValue":i[3]||=e=>M.value.unit=e,placeholder:`kg`},null,8,[`modelValue`])]),_:1}),o(b,{label:`成本价`},{default:f(()=>[o(E,{modelValue:M.value.cost_price,"onUpdate:modelValue":i[4]||=e=>M.value.cost_price=e,precision:2,min:0,step:.01,style:{width:`100%`}},null,8,[`modelValue`])]),_:1}),o(b,{label:`最低库存`},{default:f(()=>[o(E,{modelValue:M.value.min_stock,"onUpdate:modelValue":i[5]||=e=>M.value.min_stock=e,min:0,style:{width:`100%`}},null,8,[`modelValue`])]),_:1}),o(b,{label:`最高库存`},{default:f(()=>[o(E,{modelValue:M.value.max_stock,"onUpdate:modelValue":i[6]||=e=>M.value.max_stock=e,min:0,style:{width:`100%`}},null,8,[`modelValue`])]),_:1})]),_:1})]),_:1},8,[`visible`,`title`]),o(O,{visible:N.value,"onUpdate:visible":i[11]||=e=>N.value=e,title:`物料补货`,width:`900px`,onClosed:q},{footer:f(()=>[o(s,{onClick:i[10]||=e=>N.value=!1,disabled:I.value},{default:f(()=>[...i[21]||=[v(`取消`,-1)]]),_:1},8,[`disabled`]),o(s,{type:`primary`,loading:I.value,disabled:I.value,onClick:G},{default:f(()=>[...i[22]||=[v(`创建采购订单`,-1)]]),_:1},8,[`loading`,`disabled`])]),default:f(()=>[o(D,{"label-width":`100px`,style:{"margin-bottom":`16px`}},{default:f(()=>[o(b,{label:`供应商`,required:``},{default:f(()=>[o(Y,{modelValue:F.value,"onUpdate:modelValue":i[9]||=e=>F.value=e,placeholder:`请选择供应商`,style:{width:`100%`}},{default:f(()=>[(t(!0),y(m,null,r(n(w).suppliers,e=>(t(),c(J,{key:e.id,label:e.name,value:e.id},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`])]),_:1})]),_:1}),l(`div`,S,[i[19]||=l(`span`,{style:{"font-weight":`600`}},`补货物料明细`,-1),o(s,{type:`primary`,size:`small`,onClick:H},{default:f(()=>[...i[18]||=[v(`+ 添加物料`,-1)]]),_:1})]),o(d,{data:P.value,border:``,size:`small`},{default:f(()=>[o(u,{label:`物料`,"min-width":`200`},{default:f(({row:e})=>[o(Y,{modelValue:e.material_id,"onUpdate:modelValue":t=>e.material_id=t,placeholder:`请选择物料`,style:{width:`100%`}},{default:f(()=>[(t(!0),y(m,null,r(n(w).materials,e=>(t(),c(J,{key:e.id,label:`${e.sku} - ${e.name}`,value:e.id},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`,`onUpdate:modelValue`])]),_:1}),o(u,{label:`数量`,width:`120`},{default:f(({row:e})=>[o(E,{modelValue:e.quantity,"onUpdate:modelValue":t=>e.quantity=t,min:1,size:`small`,style:{width:`100%`}},null,8,[`modelValue`,`onUpdate:modelValue`])]),_:1}),o(u,{label:`单价`,width:`120`},{default:f(({row:e})=>[o(E,{modelValue:e.unit_price,"onUpdate:modelValue":t=>e.unit_price=t,min:0,precision:2,step:.01,size:`small`,style:{width:`100%`}},null,8,[`modelValue`,`onUpdate:modelValue`])]),_:1}),o(u,{label:`总价`,width:`120`},{default:f(({row:e})=>[v(a(n(T)((e.unit_price||0)*(e.quantity||0))),1)]),_:1}),o(u,{label:`备注`,width:`150`},{default:f(({row:e})=>[o(g,{modelValue:e.remark,"onUpdate:modelValue":t=>e.remark=t,size:`small`,placeholder:`备注`},null,8,[`modelValue`,`onUpdate:modelValue`])]),_:1}),o(u,{label:`操作`,width:`80`},{default:f(({$index:e})=>[o(s,{type:`danger`,size:`small`,onClick:t=>U(e)},{default:f(()=>[...i[20]||=[v(`删除`,-1)]]),_:1},8,[`onClick`])]),_:1})]),_:1},8,[`data`]),l(`div`,C,` 补货总金额:`+a(n(T)(W.value)),1)]),_:1},8,[`visible`])])}}});export{w as default}; \ No newline at end of file diff --git a/static/assets/MoldInsightView-CVpP8ugh.js b/static/assets/MoldInsightView-DkAbjiJg.js similarity index 99% rename from static/assets/MoldInsightView-CVpP8ugh.js rename to static/assets/MoldInsightView-DkAbjiJg.js index a53b7ab..c1b9b06 100644 --- a/static/assets/MoldInsightView-CVpP8ugh.js +++ b/static/assets/MoldInsightView-DkAbjiJg.js @@ -1 +1 @@ -import{C as e,D as t,F as n,I as r,L as ee,N as i,O as te,P as a,R as o,S as s,T as c,_ as l,a as u,b as d,c as f,g as p,h as m,i as h,j as g,k as _,m as ne,p as v,r as y,s as b,u as re,v as x,x as S,y as C}from"./index-BoystVy-.js";import{a as w,i as T,r as E}from"./utils-COFIQvWo.js";var ie={class:`page-container`},ae={class:`page-header`},oe={class:`upload-layout`},se={class:`upload-main-card`},ce={key:0,class:`file-info`},D={class:`file-name`},O={class:`file-size`},k={key:1,class:`error-message`},A={key:2,class:`progress-bar`},j={class:`upload-side-card`},M={class:`material-panel compact-panel`},N={class:`advanced-params`},P={class:`advanced-params-body`},F={class:`advanced-param-grid`},I={class:`param-meta-row`},L={class:`range-value`},R={class:`range-value`},z={class:`param-hint`},B={key:1,class:`inline-note`},V={key:0,class:`history-collapsible section`},le={class:`history-summary`},H={class:`table-container`},U={class:`action-buttons`},W={class:`history-dropdown`},ue={key:1,class:`inline-note`},G=e({__name:`MoldInsightView`,setup(e){let G=re(),K=f(),q=a(null),J=i({selectedFile:null,selectedMaterial:`ABS`,moldParams:{draftAngle:2,shrinkageRate:.5,partingPrecision:.1,cavityMatch:95},uploading:!1,error:``,currentTask:null,task:null,polling:!1,dragOver:!1,progress:0,history:null,expandedFiles:{}}),Y=m(()=>Object.keys(J.expandedFiles).filter(e=>J.expandedFiles[e]!==null)),X=e=>e===`completed`?`success`:e===`failed`?`danger`:`warning`,de=async e=>{},Z=async()=>{try{J.history=await b(`/api/history`)}catch(e){console.error(`加载历史记录失败:`,e)}},fe=async e=>{if(J.expandedFiles[e])J.expandedFiles[e]=null;else try{let t=await b(`/api/history/${encodeURIComponent(e)}`);J.expandedFiles[e]=t}catch(e){h(e,`加载文件历史`)}},Q=e=>{G.push(`/moldinsight/result/${e.task_id}`)},pe=e=>{let t=e.target.files?.[0];t&&$(t)},$=e=>{let t=e.name.toLowerCase();if(!t.endsWith(`.stp`)&&!t.endsWith(`.step`)){J.error=`请选择 STP 或 STEP 格式文件`,J.selectedFile=null;return}if(e.size>100*1024*1024){J.error=`文件大小不能超过 100MB`,J.selectedFile=null;return}J.error=``,J.selectedFile=e,y(`已选择文件: ${e.name}`,`success`)},me=e=>{e.preventDefault(),J.dragOver=!1;let t=e.dataTransfer?.files;t&&t.length>0&&$(t[0])},he=async()=>{if(!J.selectedFile)return;if(!K.token){J.error=`请先登录后再上传文件`,y(`请先登录`,`warning`),G.push(`/login`);return}if(K.token===`demo`){J.error=`演示模式不支持文件上传,请使用完整账户登录`,y(`演示模式不支持上传`,`warning`);return}J.uploading=!0,J.error=``,J.progress=0;let e=new FormData;e.append(`file`,J.selectedFile),e.append(`material`,J.selectedMaterial),e.append(`draft_angle`,String(J.moldParams.draftAngle)),e.append(`shrinkage_rate`,String(J.moldParams.shrinkageRate)),e.append(`parting_precision`,String(J.moldParams.partingPrecision)),e.append(`cavity_match`,String(J.moldParams.cavityMatch));try{let t=await fetch(`/api/upload`,{method:`POST`,headers:{Authorization:`Bearer ${K.token}`},body:e});if(t.status===401){u(),J.error=`登录已过期,请重新登录`,y(`登录已过期,请重新登录`,`warning`),G.push(`/login`);return}if(!t.ok)throw Error(`上传失败: ${t.status}`);let n=await t.json();J.currentTask={task_id:n.task_id,status:`processing`,filename:n.file_info?.filename},y(`文件上传成功,开始分析...`,`success`),ge(n.task_id)}catch(e){J.error=h(e,`文件上传`)}finally{J.uploading=!1}},ge=async e=>{J.polling=!0,J.progress=10;let t=0,n=async()=>{try{t++,J.progress=Math.min(90,10+t*.5);let r=await b(`/api/status/${e}`,{method:`POST`});if(J.currentTask=r,J.task=r,r.status===`completed`){J.polling=!1,J.progress=100,y(`分析完成`,`success`),Z(),G.push(`/moldinsight/result/${e}`);return}if(r.status===`failed`){J.polling=!1,J.error=r.error||`分析失败`,y(`分析失败`,`error`);return}t<300&&setTimeout(n,2e3)}catch(e){J.polling=!1,J.error=h(e,`轮询状态`)}};n()},_e=[{key:`draftAngle`,label:`拔模角`,unit:`°`,min:1,max:10,step:.5,defaultValue:2,hint:`常规注塑件建议从 1.5° 到 3° 起步`},{key:`shrinkageRate`,label:`收缩率`,unit:`%`,min:.5,max:3,step:.1,defaultValue:.5,hint:`按材料牌号校核,默认值用于首轮方案评估`},{key:`partingPrecision`,label:`分型精度`,unit:`mm`,min:.01,max:1,step:.01,defaultValue:.1,hint:`用于控制分型面拟合与边界容差`},{key:`cavityMatch`,label:`型腔匹配度`,unit:`%`,min:80,max:100,step:1,defaultValue:95,hint:`数值越高越偏向紧配合与严格封合`}];return c(()=>{if(!K.user){G.push(`/login`);return}Z()}),(e,i)=>{let a=_(`t-button`),c=_(`t-option`),u=_(`t-select`),f=_(`t-form-item`),m=_(`t-input-number`),h=_(`t-table-column`),y=_(`t-tag`),b=_(`t-table`);return t(),C(`div`,ie,[p(`div`,ae,[i[7]||=p(`h1`,null,`注塑模 STP 分析`,-1),i[8]||=p(`p`,null,`上传 STEP/STP 产品件,完成自动分模、工程建议与导出`,-1),s(a,{variant:`outline`,size:`small`,onClick:i[0]||=e=>n(G).push(`/moldinsight/batch`),style:{"margin-top":`var(--space-2)`}},{default:g(()=>[...i[6]||=[S(` 📦 批量分析 `,-1)]]),_:1})]),i[17]||=d(`
输入
STEP/STP 产品件,面向注塑模主流程
输出
分模方案、DFM 风险、注塑模系统摘要与 CAD 导出
目标
先确认推荐方案,再进入导出与 CAM 准备
`,1),p(`div`,oe,[p(`div`,se,[i[11]||=p(`h2`,{class:`section-title`},`1. 上传产品件`,-1),p(`div`,{class:r([`upload-zone`,{"drag-over":J.dragOver}]),onDragover:i[1]||=v(e=>J.dragOver=!0,[`prevent`]),onDragleave:i[2]||=v(e=>J.dragOver=!1,[`prevent`]),onDrop:me,onClick:i[3]||=e=>q.value?.click()},[p(`input`,{ref_key:`fileInput`,ref:q,type:`file`,accept:`.stp,.step`,onChange:pe,hidden:``},null,544),i[9]||=p(`div`,{class:`upload-icon`},`📁`,-1),i[10]||=p(`div`,{class:`upload-text`},[p(`span`,{class:`upload-title`},`点击选择或拖拽 STP/STEP 文件`),p(`span`,{class:`upload-hint`},`支持注塑模产品件分析,最大 100MB`)],-1)],34),J.selectedFile?(t(),C(`div`,ce,[p(`span`,D,o(J.selectedFile.name),1),p(`span`,O,o(n(T)(J.selectedFile.size)),1),p(`button`,{class:`btn-clear`,onClick:i[4]||=e=>J.selectedFile=null,title:`清除文件`},`×`)])):x(``,!0),J.error?(t(),C(`div`,k,o(J.error),1)):x(``,!0),J.polling?(t(),C(`div`,A,[p(`div`,{class:`progress-fill`,style:ee({width:J.progress+`%`})},null,4)])):x(``,!0)]),p(`div`,j,[i[14]||=p(`h2`,{class:`section-title`},`2. 注塑模参数`,-1),p(`div`,M,[s(f,{label:`产品材料`},{default:g(()=>[s(u,{modelValue:J.selectedMaterial,"onUpdate:modelValue":i[5]||=e=>J.selectedMaterial=e},{default:g(()=>[s(c,{value:`ABS`,label:`ABS (1.05 g/cm³)`}),s(c,{value:`PP`,label:`PP (0.90 g/cm³)`}),s(c,{value:`PE`,label:`PE (0.95 g/cm³)`}),s(c,{value:`PC`,label:`PC (1.20 g/cm³)`}),s(c,{value:`PA`,label:`PA (1.14 g/cm³)`}),s(c,{value:`POM`,label:`POM (1.41 g/cm³)`}),s(c,{value:`PMMA`,label:`PMMA (1.18 g/cm³)`}),s(c,{value:`PBT`,label:`PBT (1.31 g/cm³)`})]),_:1},8,[`modelValue`])]),_:1}),p(`details`,N,[i[13]||=p(`summary`,null,`高级工艺参数`,-1),p(`div`,P,[i[12]||=p(`div`,{class:`inline-note`},`默认值适用于多数注塑件;仅在已知工艺约束时再调整。`,-1),p(`div`,F,[(t(),C(ne,null,te(_e,e=>p(`div`,{class:`param-input-card`,key:e.key},[s(f,{label:e.label},{default:g(()=>[s(m,{modelValue:J.moldParams[e.key],"onUpdate:modelValue":t=>J.moldParams[e.key]=t,modelModifiers:{number:!0},min:e.min,max:e.max,step:e.step,suffix:e.unit},null,8,[`modelValue`,`onUpdate:modelValue`,`min`,`max`,`step`,`suffix`]),p(`div`,I,[p(`span`,L,`默认 `+o(e.defaultValue)+o(e.unit),1),p(`span`,R,`范围 `+o(e.min)+` - `+o(e.max)+o(e.unit),1)]),p(`div`,z,o(e.hint),1)]),_:2},1032,[`label`])])),64))])])])]),J.selectedFile?(t(),l(a,{key:0,theme:`primary`,class:`upload-submit-btn`,onClick:he,disabled:J.uploading||J.polling},{default:g(()=>[S(o(J.uploading?`上传中...`:J.polling?`分析中...`:`3. 开始注塑模分析`),1)]),_:1},8,[`disabled`])):(t(),C(`div`,B,`先选择 STP 文件,再填写材料并开始分析。`))])]),J.history?.files?.length?(t(),C(`details`,V,[p(`summary`,le,`分析历史(`+o(J.history.files.length)+` 个文件)`,1),p(`div`,H,[s(b,{"row-key":`filename`,data:J.history.files,"expanded-row-keys":Y.value,onExpandChange:de},{expandedRow:g(({row:e})=>[p(`div`,W,[J.expandedFiles[e.filename]?(t(),l(b,{key:0,"row-key":`id`,data:J.expandedFiles[e.filename]},{default:g(()=>[s(h,{key:`upload_time`,title:`上传时间`},{cell:g(({row:e})=>[S(o(n(E)(e.upload_time)),1)]),_:1}),s(h,{key:`file_size`,title:`文件大小`},{cell:g(({row:e})=>[S(o(n(T)(e.file_size)),1)]),_:1}),s(h,{key:`status`,title:`状态`},{cell:g(({row:e})=>[s(y,{theme:X(e.status),variant:`light`},{default:g(()=>[S(o(e.status),1)]),_:2},1032,[`theme`])]),_:1}),s(h,{key:`volume`,title:`体积 (mm³)`},{cell:g(({row:e})=>[S(o(e.volume?n(w)(e.volume):`-`),1)]),_:1}),s(h,{key:`surface_area`,title:`表面积 (mm²)`},{cell:g(({row:e})=>[S(o(e.surface_area?n(w)(e.surface_area):`-`),1)]),_:1}),s(h,{key:`product_weight`,title:`重量 (g)`},{cell:g(({row:e})=>[S(o(e.product_weight?e.product_weight.toFixed(2):`-`),1)]),_:1}),s(h,{key:`detail_actions`,title:`操作`},{cell:g(({row:e})=>[e.has_analysis?(t(),l(a,{key:0,theme:`primary`,size:`small`,onClick:t=>Q(e)},{default:g(()=>[...i[16]||=[S(` 查看详情 `,-1)]]),_:1},8,[`onClick`])):x(``,!0)]),_:1})]),_:1},8,[`data`])):(t(),C(`div`,ue,`加载中...`))])]),default:g(()=>[s(h,{key:`filename`,title:`文件名`},{cell:g(({row:e})=>[S(o(e.filename),1)]),_:1}),s(h,{key:`upload_count`,title:`上传次数`},{cell:g(({row:e})=>[s(y,{theme:`primary`,variant:`light`},{default:g(()=>[S(o(e.upload_count)+` 次`,1)]),_:2},1024)]),_:1}),s(h,{key:`file_size`,title:`文件大小`},{cell:g(({row:e})=>[S(o(n(T)(e.file_size)),1)]),_:1}),s(h,{key:`latest_status`,title:`最新状态`},{cell:g(({row:e})=>[s(y,{theme:X(e.latest_status),variant:`light`},{default:g(()=>[S(o(e.latest_status),1)]),_:2},1032,[`theme`])]),_:1}),s(h,{key:`latest_upload_time`,title:`最新分析时间`},{cell:g(({row:e})=>[S(o(n(E)(e.latest_upload_time)),1)]),_:1}),s(h,{key:`actions`,title:`操作`},{cell:g(({row:e})=>[p(`div`,U,[e.latest_status===`completed`?(t(),l(a,{key:0,theme:`primary`,size:`small`,onClick:t=>Q({task_id:e.latest_task_id})},{default:g(()=>[...i[15]||=[S(` 查看最新 `,-1)]]),_:1},8,[`onClick`])):x(``,!0),s(a,{variant:`text`,size:`small`,onClick:t=>fe(e.filename),title:J.expandedFiles[e.filename]?`收起`:`展开历史记录`},{icon:g(()=>[p(`span`,{class:r([`dropdown-icon`,{expanded:J.expandedFiles[e.filename]}])},`▼`,2)]),_:2},1032,[`onClick`,`title`])])]),_:1})]),_:1},8,[`data`,`expanded-row-keys`])])])):x(``,!0)])}}});export{G as default}; \ No newline at end of file +import{C as e,D as t,F as n,I as r,L as ee,N as i,O as te,P as a,R as o,S as s,T as c,_ as l,a as u,b as d,c as f,g as p,h as m,i as h,j as g,k as _,m as ne,p as v,r as y,s as b,u as re,v as x,x as S,y as C}from"./index-Dngmm__P.js";import{a as w,i as T,r as E}from"./utils-COFIQvWo.js";var ie={class:`page-container`},ae={class:`page-header`},oe={class:`upload-layout`},se={class:`upload-main-card`},ce={key:0,class:`file-info`},D={class:`file-name`},O={class:`file-size`},k={key:1,class:`error-message`},A={key:2,class:`progress-bar`},j={class:`upload-side-card`},M={class:`material-panel compact-panel`},N={class:`advanced-params`},P={class:`advanced-params-body`},F={class:`advanced-param-grid`},I={class:`param-meta-row`},L={class:`range-value`},R={class:`range-value`},z={class:`param-hint`},B={key:1,class:`inline-note`},V={key:0,class:`history-collapsible section`},le={class:`history-summary`},H={class:`table-container`},U={class:`action-buttons`},W={class:`history-dropdown`},ue={key:1,class:`inline-note`},G=e({__name:`MoldInsightView`,setup(e){let G=re(),K=f(),q=a(null),J=i({selectedFile:null,selectedMaterial:`ABS`,moldParams:{draftAngle:2,shrinkageRate:.5,partingPrecision:.1,cavityMatch:95},uploading:!1,error:``,currentTask:null,task:null,polling:!1,dragOver:!1,progress:0,history:null,expandedFiles:{}}),Y=m(()=>Object.keys(J.expandedFiles).filter(e=>J.expandedFiles[e]!==null)),X=e=>e===`completed`?`success`:e===`failed`?`danger`:`warning`,de=async e=>{},Z=async()=>{try{J.history=await b(`/api/history`)}catch(e){console.error(`加载历史记录失败:`,e)}},fe=async e=>{if(J.expandedFiles[e])J.expandedFiles[e]=null;else try{let t=await b(`/api/history/${encodeURIComponent(e)}`);J.expandedFiles[e]=t}catch(e){h(e,`加载文件历史`)}},Q=e=>{G.push(`/moldinsight/result/${e.task_id}`)},pe=e=>{let t=e.target.files?.[0];t&&$(t)},$=e=>{let t=e.name.toLowerCase();if(!t.endsWith(`.stp`)&&!t.endsWith(`.step`)){J.error=`请选择 STP 或 STEP 格式文件`,J.selectedFile=null;return}if(e.size>100*1024*1024){J.error=`文件大小不能超过 100MB`,J.selectedFile=null;return}J.error=``,J.selectedFile=e,y(`已选择文件: ${e.name}`,`success`)},me=e=>{e.preventDefault(),J.dragOver=!1;let t=e.dataTransfer?.files;t&&t.length>0&&$(t[0])},he=async()=>{if(!J.selectedFile)return;if(!K.token){J.error=`请先登录后再上传文件`,y(`请先登录`,`warning`),G.push(`/login`);return}if(K.token===`demo`){J.error=`演示模式不支持文件上传,请使用完整账户登录`,y(`演示模式不支持上传`,`warning`);return}J.uploading=!0,J.error=``,J.progress=0;let e=new FormData;e.append(`file`,J.selectedFile),e.append(`material`,J.selectedMaterial),e.append(`draft_angle`,String(J.moldParams.draftAngle)),e.append(`shrinkage_rate`,String(J.moldParams.shrinkageRate)),e.append(`parting_precision`,String(J.moldParams.partingPrecision)),e.append(`cavity_match`,String(J.moldParams.cavityMatch));try{let t=await fetch(`/api/upload`,{method:`POST`,headers:{Authorization:`Bearer ${K.token}`},body:e});if(t.status===401){u(),J.error=`登录已过期,请重新登录`,y(`登录已过期,请重新登录`,`warning`),G.push(`/login`);return}if(!t.ok)throw Error(`上传失败: ${t.status}`);let n=await t.json();J.currentTask={task_id:n.task_id,status:`processing`,filename:n.file_info?.filename},y(`文件上传成功,开始分析...`,`success`),ge(n.task_id)}catch(e){J.error=h(e,`文件上传`)}finally{J.uploading=!1}},ge=async e=>{J.polling=!0,J.progress=10;let t=0,n=async()=>{try{t++,J.progress=Math.min(90,10+t*.5);let r=await b(`/api/status/${e}`,{method:`POST`});if(J.currentTask=r,J.task=r,r.status===`completed`){J.polling=!1,J.progress=100,y(`分析完成`,`success`),Z(),G.push(`/moldinsight/result/${e}`);return}if(r.status===`failed`){J.polling=!1,J.error=r.error||`分析失败`,y(`分析失败`,`error`);return}t<300&&setTimeout(n,2e3)}catch(e){J.polling=!1,J.error=h(e,`轮询状态`)}};n()},_e=[{key:`draftAngle`,label:`拔模角`,unit:`°`,min:1,max:10,step:.5,defaultValue:2,hint:`常规注塑件建议从 1.5° 到 3° 起步`},{key:`shrinkageRate`,label:`收缩率`,unit:`%`,min:.5,max:3,step:.1,defaultValue:.5,hint:`按材料牌号校核,默认值用于首轮方案评估`},{key:`partingPrecision`,label:`分型精度`,unit:`mm`,min:.01,max:1,step:.01,defaultValue:.1,hint:`用于控制分型面拟合与边界容差`},{key:`cavityMatch`,label:`型腔匹配度`,unit:`%`,min:80,max:100,step:1,defaultValue:95,hint:`数值越高越偏向紧配合与严格封合`}];return c(()=>{if(!K.user){G.push(`/login`);return}Z()}),(e,i)=>{let a=_(`t-button`),c=_(`t-option`),u=_(`t-select`),f=_(`t-form-item`),m=_(`t-input-number`),h=_(`t-table-column`),y=_(`t-tag`),b=_(`t-table`);return t(),C(`div`,ie,[p(`div`,ae,[i[7]||=p(`h1`,null,`注塑模 STP 分析`,-1),i[8]||=p(`p`,null,`上传 STEP/STP 产品件,完成自动分模、工程建议与导出`,-1),s(a,{variant:`outline`,size:`small`,onClick:i[0]||=e=>n(G).push(`/moldinsight/batch`),style:{"margin-top":`var(--space-2)`}},{default:g(()=>[...i[6]||=[S(` 📦 批量分析 `,-1)]]),_:1})]),i[17]||=d(`
输入
STEP/STP 产品件,面向注塑模主流程
输出
分模方案、DFM 风险、注塑模系统摘要与 CAD 导出
目标
先确认推荐方案,再进入导出与 CAM 准备
`,1),p(`div`,oe,[p(`div`,se,[i[11]||=p(`h2`,{class:`section-title`},`1. 上传产品件`,-1),p(`div`,{class:r([`upload-zone`,{"drag-over":J.dragOver}]),onDragover:i[1]||=v(e=>J.dragOver=!0,[`prevent`]),onDragleave:i[2]||=v(e=>J.dragOver=!1,[`prevent`]),onDrop:me,onClick:i[3]||=e=>q.value?.click()},[p(`input`,{ref_key:`fileInput`,ref:q,type:`file`,accept:`.stp,.step`,onChange:pe,hidden:``},null,544),i[9]||=p(`div`,{class:`upload-icon`},`📁`,-1),i[10]||=p(`div`,{class:`upload-text`},[p(`span`,{class:`upload-title`},`点击选择或拖拽 STP/STEP 文件`),p(`span`,{class:`upload-hint`},`支持注塑模产品件分析,最大 100MB`)],-1)],34),J.selectedFile?(t(),C(`div`,ce,[p(`span`,D,o(J.selectedFile.name),1),p(`span`,O,o(n(T)(J.selectedFile.size)),1),p(`button`,{class:`btn-clear`,onClick:i[4]||=e=>J.selectedFile=null,title:`清除文件`},`×`)])):x(``,!0),J.error?(t(),C(`div`,k,o(J.error),1)):x(``,!0),J.polling?(t(),C(`div`,A,[p(`div`,{class:`progress-fill`,style:ee({width:J.progress+`%`})},null,4)])):x(``,!0)]),p(`div`,j,[i[14]||=p(`h2`,{class:`section-title`},`2. 注塑模参数`,-1),p(`div`,M,[s(f,{label:`产品材料`},{default:g(()=>[s(u,{modelValue:J.selectedMaterial,"onUpdate:modelValue":i[5]||=e=>J.selectedMaterial=e},{default:g(()=>[s(c,{value:`ABS`,label:`ABS (1.05 g/cm³)`}),s(c,{value:`PP`,label:`PP (0.90 g/cm³)`}),s(c,{value:`PE`,label:`PE (0.95 g/cm³)`}),s(c,{value:`PC`,label:`PC (1.20 g/cm³)`}),s(c,{value:`PA`,label:`PA (1.14 g/cm³)`}),s(c,{value:`POM`,label:`POM (1.41 g/cm³)`}),s(c,{value:`PMMA`,label:`PMMA (1.18 g/cm³)`}),s(c,{value:`PBT`,label:`PBT (1.31 g/cm³)`})]),_:1},8,[`modelValue`])]),_:1}),p(`details`,N,[i[13]||=p(`summary`,null,`高级工艺参数`,-1),p(`div`,P,[i[12]||=p(`div`,{class:`inline-note`},`默认值适用于多数注塑件;仅在已知工艺约束时再调整。`,-1),p(`div`,F,[(t(),C(ne,null,te(_e,e=>p(`div`,{class:`param-input-card`,key:e.key},[s(f,{label:e.label},{default:g(()=>[s(m,{modelValue:J.moldParams[e.key],"onUpdate:modelValue":t=>J.moldParams[e.key]=t,modelModifiers:{number:!0},min:e.min,max:e.max,step:e.step,suffix:e.unit},null,8,[`modelValue`,`onUpdate:modelValue`,`min`,`max`,`step`,`suffix`]),p(`div`,I,[p(`span`,L,`默认 `+o(e.defaultValue)+o(e.unit),1),p(`span`,R,`范围 `+o(e.min)+` - `+o(e.max)+o(e.unit),1)]),p(`div`,z,o(e.hint),1)]),_:2},1032,[`label`])])),64))])])])]),J.selectedFile?(t(),l(a,{key:0,theme:`primary`,class:`upload-submit-btn`,onClick:he,disabled:J.uploading||J.polling},{default:g(()=>[S(o(J.uploading?`上传中...`:J.polling?`分析中...`:`3. 开始注塑模分析`),1)]),_:1},8,[`disabled`])):(t(),C(`div`,B,`先选择 STP 文件,再填写材料并开始分析。`))])]),J.history?.files?.length?(t(),C(`details`,V,[p(`summary`,le,`分析历史(`+o(J.history.files.length)+` 个文件)`,1),p(`div`,H,[s(b,{"row-key":`filename`,data:J.history.files,"expanded-row-keys":Y.value,onExpandChange:de},{expandedRow:g(({row:e})=>[p(`div`,W,[J.expandedFiles[e.filename]?(t(),l(b,{key:0,"row-key":`id`,data:J.expandedFiles[e.filename]},{default:g(()=>[s(h,{key:`upload_time`,title:`上传时间`},{cell:g(({row:e})=>[S(o(n(E)(e.upload_time)),1)]),_:1}),s(h,{key:`file_size`,title:`文件大小`},{cell:g(({row:e})=>[S(o(n(T)(e.file_size)),1)]),_:1}),s(h,{key:`status`,title:`状态`},{cell:g(({row:e})=>[s(y,{theme:X(e.status),variant:`light`},{default:g(()=>[S(o(e.status),1)]),_:2},1032,[`theme`])]),_:1}),s(h,{key:`volume`,title:`体积 (mm³)`},{cell:g(({row:e})=>[S(o(e.volume?n(w)(e.volume):`-`),1)]),_:1}),s(h,{key:`surface_area`,title:`表面积 (mm²)`},{cell:g(({row:e})=>[S(o(e.surface_area?n(w)(e.surface_area):`-`),1)]),_:1}),s(h,{key:`product_weight`,title:`重量 (g)`},{cell:g(({row:e})=>[S(o(e.product_weight?e.product_weight.toFixed(2):`-`),1)]),_:1}),s(h,{key:`detail_actions`,title:`操作`},{cell:g(({row:e})=>[e.has_analysis?(t(),l(a,{key:0,theme:`primary`,size:`small`,onClick:t=>Q(e)},{default:g(()=>[...i[16]||=[S(` 查看详情 `,-1)]]),_:1},8,[`onClick`])):x(``,!0)]),_:1})]),_:1},8,[`data`])):(t(),C(`div`,ue,`加载中...`))])]),default:g(()=>[s(h,{key:`filename`,title:`文件名`},{cell:g(({row:e})=>[S(o(e.filename),1)]),_:1}),s(h,{key:`upload_count`,title:`上传次数`},{cell:g(({row:e})=>[s(y,{theme:`primary`,variant:`light`},{default:g(()=>[S(o(e.upload_count)+` 次`,1)]),_:2},1024)]),_:1}),s(h,{key:`file_size`,title:`文件大小`},{cell:g(({row:e})=>[S(o(n(T)(e.file_size)),1)]),_:1}),s(h,{key:`latest_status`,title:`最新状态`},{cell:g(({row:e})=>[s(y,{theme:X(e.latest_status),variant:`light`},{default:g(()=>[S(o(e.latest_status),1)]),_:2},1032,[`theme`])]),_:1}),s(h,{key:`latest_upload_time`,title:`最新分析时间`},{cell:g(({row:e})=>[S(o(n(E)(e.latest_upload_time)),1)]),_:1}),s(h,{key:`actions`,title:`操作`},{cell:g(({row:e})=>[p(`div`,U,[e.latest_status===`completed`?(t(),l(a,{key:0,theme:`primary`,size:`small`,onClick:t=>Q({task_id:e.latest_task_id})},{default:g(()=>[...i[15]||=[S(` 查看最新 `,-1)]]),_:1},8,[`onClick`])):x(``,!0),s(a,{variant:`text`,size:`small`,onClick:t=>fe(e.filename),title:J.expandedFiles[e.filename]?`收起`:`展开历史记录`},{icon:g(()=>[p(`span`,{class:r([`dropdown-icon`,{expanded:J.expandedFiles[e.filename]}])},`▼`,2)]),_:2},1032,[`onClick`,`title`])])]),_:1})]),_:1},8,[`data`,`expanded-row-keys`])])])):x(``,!0)])}}});export{G as default}; \ No newline at end of file diff --git a/static/assets/MovementsTab-DD15FX3n.js b/static/assets/MovementsTab-DXIrYz_g.js similarity index 90% rename from static/assets/MovementsTab-DD15FX3n.js rename to static/assets/MovementsTab-DXIrYz_g.js index 5110084..4715173 100644 --- a/static/assets/MovementsTab-DD15FX3n.js +++ b/static/assets/MovementsTab-DXIrYz_g.js @@ -1 +1 @@ -import{C as e,D as t,F as n,R as r,S as i,T as a,j as o,k as s,n as c,x as l,y as u}from"./index-BoystVy-.js";import{t as d}from"./useInventory-C7Zfw7oO.js";var f={class:`movements-tab`},p=c(e({__name:`MovementsTab`,setup(e){let{state:c,loadMovements:p,getMovementTypeLabel:m,getMovementBadgeClass:h,formatDateTime:g}=d(),_=e=>{let t=h(e);return t===`badge-success`?`success`:t===`badge-error`?`danger`:t===`badge-warning`?`warning`:`info`};return a(()=>{p()}),(e,a)=>{let d=s(`t-table-column`),p=s(`t-tag`),h=s(`t-table`);return t(),u(`div`,f,[i(h,{data:n(c).movements,style:{width:`100%`},loading:n(c).loading,"empty-text":`暂无库存变动记录`},{default:o(()=>[i(d,{label:`物料`},{default:o(({row:e})=>[l(r(e.product_name)+r(e.product_sku?` (`+e.product_sku+`)`:``),1)]),_:1}),i(d,{label:`类型`,width:`140`},{default:o(({row:e})=>[i(p,{type:_(e.movement_type),size:`small`},{default:o(()=>[l(r(n(m)(e.movement_type)),1)]),_:2},1032,[`type`])]),_:1}),i(d,{prop:`quantity`,label:`数量`,width:`80`}),i(d,{prop:`before_quantity`,label:`变动前`,width:`80`}),i(d,{prop:`after_quantity`,label:`变动后`,width:`80`}),i(d,{label:`时间`,width:`180`},{default:o(({row:e})=>[l(r(n(g)(e.created_at)),1)]),_:1})]),_:1},8,[`data`,`loading`])])}}}),[[`__scopeId`,`data-v-79f8d5e3`]]);export{p as default}; \ No newline at end of file +import{C as e,D as t,F as n,R as r,S as i,T as a,j as o,k as s,n as c,x as l,y as u}from"./index-Dngmm__P.js";import{t as d}from"./useInventory-CrXJ8kdd.js";var f={class:`movements-tab`},p=c(e({__name:`MovementsTab`,setup(e){let{state:c,loadMovements:p,getMovementTypeLabel:m,getMovementBadgeClass:h,formatDateTime:g}=d(),_=e=>{let t=h(e);return t===`badge-success`?`success`:t===`badge-error`?`danger`:t===`badge-warning`?`warning`:`info`};return a(()=>{p()}),(e,a)=>{let d=s(`t-table-column`),p=s(`t-tag`),h=s(`t-table`);return t(),u(`div`,f,[i(h,{data:n(c).movements,style:{width:`100%`},loading:n(c).loading,"empty-text":`暂无库存变动记录`},{default:o(()=>[i(d,{label:`物料`},{default:o(({row:e})=>[l(r(e.product_name)+r(e.product_sku?` (`+e.product_sku+`)`:``),1)]),_:1}),i(d,{label:`类型`,width:`140`},{default:o(({row:e})=>[i(p,{type:_(e.movement_type),size:`small`},{default:o(()=>[l(r(n(m)(e.movement_type)),1)]),_:2},1032,[`type`])]),_:1}),i(d,{prop:`quantity`,label:`数量`,width:`80`}),i(d,{prop:`before_quantity`,label:`变动前`,width:`80`}),i(d,{prop:`after_quantity`,label:`变动后`,width:`80`}),i(d,{label:`时间`,width:`180`},{default:o(({row:e})=>[l(r(n(g)(e.created_at)),1)]),_:1})]),_:1},8,[`data`,`loading`])])}}}),[[`__scopeId`,`data-v-79f8d5e3`]]);export{p as default}; \ No newline at end of file diff --git a/static/assets/ProductsTab-ON3NQtwy.js b/static/assets/ProductsTab-BXmeCZOh.js similarity index 97% rename from static/assets/ProductsTab-ON3NQtwy.js rename to static/assets/ProductsTab-BXmeCZOh.js index 0e3436a..3a16e35 100644 --- a/static/assets/ProductsTab-ON3NQtwy.js +++ b/static/assets/ProductsTab-BXmeCZOh.js @@ -1 +1 @@ -import{C as e,D as t,F as n,O as r,P as i,R as a,S as o,T as s,_ as c,g as l,i as u,j as d,k as f,m as p,r as m,s as h,v as g,x as _,y as v}from"./index-BoystVy-.js";import{t as y}from"./useInventory-C7Zfw7oO.js";var b={style:{"margin-bottom":`12px`}},x={style:{padding:`0 12px 12px 12px`}},S=e({__name:`ProductsTab`,setup(e){let{state:S,formatCurrency:C,loadFinishedProducts:w,loadMaterials:T}=y(),E=i(!1),D=i(null),O=i(!1),k=i({}),A=i([]);function j(){D.value=null,k.value={item_type:`finished`,unit:`件`,min_stock:0,max_stock:1e3,cost_price:0,sale_price:0,sku:``,name:``,category:``},A.value=[],E.value=!0}async function M(e){D.value=e,k.value={...e},await T();try{A.value=((await h(`/api/products/${e.id}/materials`)).items||[]).map(e=>({material_id:e.material_id,quantity:e.quantity}))}catch(e){u(e,`加载BOM`)}E.value=!0}function N(){A.value.push({material_id:S.materials[0]?.id||null,quantity:1})}function P(e){A.value.splice(e,1)}async function F(){if(!O.value){if(!k.value.sku){m(`请输入SKU`,`warning`);return}if(!k.value.name){m(`请输入名称`,`warning`);return}O.value=!0;try{D.value?(await h(`/api/products/${D.value.id}`,{method:`PUT`,body:JSON.stringify(k.value)}),k.value.item_type===`finished`&&A.value.length>0&&await h(`/api/products/${D.value.id}/materials`,{method:`PUT`,body:JSON.stringify({items:A.value})}),m(`成品更新成功`,`success`)):(await h(`/api/products`,{method:`POST`,body:JSON.stringify(k.value)}),m(`成品创建成功`,`success`)),E.value=!1,D.value=null,k.value={},A.value=[],w(),T()}catch(e){u(e,`保存成品`)}finally{O.value=!1}}}async function I(e){if(confirm(`确定要删除这个成品吗?`))try{await h(`/api/products/${e}`,{method:`DELETE`}),m(`成品已删除`,`success`),w(),T()}catch(e){u(e,`删除成品`)}}function L(){E.value=!1,D.value=null,k.value={},A.value=[]}return s(()=>{w()}),(e,i)=>{let s=f(`t-button`),u=f(`t-table-column`),m=f(`t-table`),h=f(`t-empty`),y=f(`t-input`),w=f(`t-form-item`),T=f(`t-input-number`),R=f(`t-divider`),z=f(`t-option`),B=f(`t-select`),V=f(`t-form`),H=f(`t-dialog`);return t(),v(`div`,null,[l(`div`,b,[o(s,{type:`primary`,onClick:j},{default:d(()=>[...i[8]||=[_(`新增成品`,-1)]]),_:1})]),o(m,{data:n(S).finishedProducts,loading:n(S).loading,stripe:``},{default:d(()=>[o(u,{prop:`sku`,label:`SKU`}),o(u,{prop:`name`,label:`名称`}),o(u,{prop:`category`,label:`分类`},{default:d(({row:e})=>[_(a(e.category||`-`),1)]),_:1}),o(u,{prop:`unit`,label:`单位`}),o(u,{label:`成本价`},{default:d(({row:e})=>[_(a(n(C)(e.cost_price)),1)]),_:1}),o(u,{label:`销售价`},{default:d(({row:e})=>[_(a(n(C)(e.sale_price)),1)]),_:1}),o(u,{label:`基础物料成本`},{default:d(({row:e})=>[_(a(n(C)(e.material_cost||0)),1)]),_:1}),o(u,{label:`操作`,width:`180`},{default:d(({row:e})=>[o(s,{type:`primary`,size:`small`,onClick:t=>M(e)},{default:d(()=>[...i[9]||=[_(`编辑`,-1)]]),_:1},8,[`onClick`]),o(s,{type:`danger`,size:`small`,onClick:t=>I(e.id)},{default:d(()=>[...i[10]||=[_(`删除`,-1)]]),_:1},8,[`onClick`])]),_:1})]),_:1},8,[`data`,`loading`]),!n(S).loading&&n(S).finishedProducts.length===0?(t(),c(h,{key:0,description:`暂无成品数据`})):g(``,!0),o(H,{visible:E.value,"onUpdate:visible":i[7]||=e=>E.value=e,title:(D.value?`编辑`:`新增`)+`成品`,width:`560px`,onClosed:L},{footer:d(()=>[o(s,{onClick:i[6]||=e=>E.value=!1,disabled:O.value},{default:d(()=>[...i[14]||=[_(`取消`,-1)]]),_:1},8,[`disabled`]),o(s,{type:`primary`,loading:O.value,disabled:O.value,onClick:F},{default:d(()=>[...i[15]||=[_(`保存`,-1)]]),_:1},8,[`loading`,`disabled`])]),default:d(()=>[o(V,{"label-width":`100px`},{default:d(()=>[o(w,{label:`类型`},{default:d(()=>[o(y,{"model-value":`成品(按单生产,不做库存)`,disabled:``})]),_:1}),o(w,{label:`SKU`,required:``},{default:d(()=>[o(y,{modelValue:k.value.sku,"onUpdate:modelValue":i[0]||=e=>k.value.sku=e,placeholder:`产品编码`},null,8,[`modelValue`])]),_:1}),o(w,{label:`名称`,required:``},{default:d(()=>[o(y,{modelValue:k.value.name,"onUpdate:modelValue":i[1]||=e=>k.value.name=e,placeholder:`产品名称`},null,8,[`modelValue`])]),_:1}),o(w,{label:`分类`},{default:d(()=>[o(y,{modelValue:k.value.category,"onUpdate:modelValue":i[2]||=e=>k.value.category=e,placeholder:`产品分类`},null,8,[`modelValue`])]),_:1}),o(w,{label:`单位`},{default:d(()=>[o(y,{modelValue:k.value.unit,"onUpdate:modelValue":i[3]||=e=>k.value.unit=e,placeholder:`件`},null,8,[`modelValue`])]),_:1}),o(w,{label:`成本价`},{default:d(()=>[o(T,{modelValue:k.value.cost_price,"onUpdate:modelValue":i[4]||=e=>k.value.cost_price=e,precision:2,min:0,step:.01,style:{width:`100%`}},null,8,[`modelValue`])]),_:1}),o(w,{label:`销售价`},{default:d(()=>[o(T,{modelValue:k.value.sale_price,"onUpdate:modelValue":i[5]||=e=>k.value.sale_price=e,precision:2,min:0,step:.01,style:{width:`100%`}},null,8,[`modelValue`])]),_:1}),o(w,{label:`说明`},{default:d(()=>[o(y,{"model-value":`成品不做库存,成本由下方BOM定义物料构成后自动计算`,disabled:``})]),_:1}),D.value?(t(),v(p,{key:0},[o(R,{"content-position":`left`},{default:d(()=>[...i[11]||=[_(`BOM物料配置`,-1)]]),_:1}),l(`div`,x,[o(s,{type:`primary`,size:`small`,onClick:N,style:{"margin-bottom":`8px`}},{default:d(()=>[...i[12]||=[_(`+ 添加物料`,-1)]]),_:1}),o(m,{data:A.value,size:`small`,border:``},{default:d(()=>[o(u,{label:`物料`},{default:d(({row:e})=>[o(B,{modelValue:e.material_id,"onUpdate:modelValue":t=>e.material_id=t,placeholder:`选择物料`,style:{width:`100%`}},{default:d(()=>[(t(!0),v(p,null,r(n(S).materials,e=>(t(),c(z,{key:e.id,label:`${e.sku} - ${e.name}`,value:e.id},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`,`onUpdate:modelValue`])]),_:1}),o(u,{label:`数量`,width:`120`},{default:d(({row:e})=>[o(T,{modelValue:e.quantity,"onUpdate:modelValue":t=>e.quantity=t,min:1e-4,step:1e-4,size:`small`,style:{width:`100%`}},null,8,[`modelValue`,`onUpdate:modelValue`])]),_:1}),o(u,{label:`操作`,width:`80`},{default:d(({$index:e})=>[o(s,{type:`danger`,size:`small`,onClick:t=>P(e)},{default:d(()=>[...i[13]||=[_(`删除`,-1)]]),_:1},8,[`onClick`])]),_:1})]),_:1},8,[`data`])])],64)):g(``,!0)]),_:1})]),_:1},8,[`visible`,`title`])])}}});export{S as default}; \ No newline at end of file +import{C as e,D as t,F as n,O as r,P as i,R as a,S as o,T as s,_ as c,g as l,i as u,j as d,k as f,m as p,r as m,s as h,v as g,x as _,y as v}from"./index-Dngmm__P.js";import{t as y}from"./useInventory-CrXJ8kdd.js";var b={style:{"margin-bottom":`12px`}},x={style:{padding:`0 12px 12px 12px`}},S=e({__name:`ProductsTab`,setup(e){let{state:S,formatCurrency:C,loadFinishedProducts:w,loadMaterials:T}=y(),E=i(!1),D=i(null),O=i(!1),k=i({}),A=i([]);function j(){D.value=null,k.value={item_type:`finished`,unit:`件`,min_stock:0,max_stock:1e3,cost_price:0,sale_price:0,sku:``,name:``,category:``},A.value=[],E.value=!0}async function M(e){D.value=e,k.value={...e},await T();try{A.value=((await h(`/api/products/${e.id}/materials`)).items||[]).map(e=>({material_id:e.material_id,quantity:e.quantity}))}catch(e){u(e,`加载BOM`)}E.value=!0}function N(){A.value.push({material_id:S.materials[0]?.id||null,quantity:1})}function P(e){A.value.splice(e,1)}async function F(){if(!O.value){if(!k.value.sku){m(`请输入SKU`,`warning`);return}if(!k.value.name){m(`请输入名称`,`warning`);return}O.value=!0;try{D.value?(await h(`/api/products/${D.value.id}`,{method:`PUT`,body:JSON.stringify(k.value)}),k.value.item_type===`finished`&&A.value.length>0&&await h(`/api/products/${D.value.id}/materials`,{method:`PUT`,body:JSON.stringify({items:A.value})}),m(`成品更新成功`,`success`)):(await h(`/api/products`,{method:`POST`,body:JSON.stringify(k.value)}),m(`成品创建成功`,`success`)),E.value=!1,D.value=null,k.value={},A.value=[],w(),T()}catch(e){u(e,`保存成品`)}finally{O.value=!1}}}async function I(e){if(confirm(`确定要删除这个成品吗?`))try{await h(`/api/products/${e}`,{method:`DELETE`}),m(`成品已删除`,`success`),w(),T()}catch(e){u(e,`删除成品`)}}function L(){E.value=!1,D.value=null,k.value={},A.value=[]}return s(()=>{w()}),(e,i)=>{let s=f(`t-button`),u=f(`t-table-column`),m=f(`t-table`),h=f(`t-empty`),y=f(`t-input`),w=f(`t-form-item`),T=f(`t-input-number`),R=f(`t-divider`),z=f(`t-option`),B=f(`t-select`),V=f(`t-form`),H=f(`t-dialog`);return t(),v(`div`,null,[l(`div`,b,[o(s,{type:`primary`,onClick:j},{default:d(()=>[...i[8]||=[_(`新增成品`,-1)]]),_:1})]),o(m,{data:n(S).finishedProducts,loading:n(S).loading,stripe:``},{default:d(()=>[o(u,{prop:`sku`,label:`SKU`}),o(u,{prop:`name`,label:`名称`}),o(u,{prop:`category`,label:`分类`},{default:d(({row:e})=>[_(a(e.category||`-`),1)]),_:1}),o(u,{prop:`unit`,label:`单位`}),o(u,{label:`成本价`},{default:d(({row:e})=>[_(a(n(C)(e.cost_price)),1)]),_:1}),o(u,{label:`销售价`},{default:d(({row:e})=>[_(a(n(C)(e.sale_price)),1)]),_:1}),o(u,{label:`基础物料成本`},{default:d(({row:e})=>[_(a(n(C)(e.material_cost||0)),1)]),_:1}),o(u,{label:`操作`,width:`180`},{default:d(({row:e})=>[o(s,{type:`primary`,size:`small`,onClick:t=>M(e)},{default:d(()=>[...i[9]||=[_(`编辑`,-1)]]),_:1},8,[`onClick`]),o(s,{type:`danger`,size:`small`,onClick:t=>I(e.id)},{default:d(()=>[...i[10]||=[_(`删除`,-1)]]),_:1},8,[`onClick`])]),_:1})]),_:1},8,[`data`,`loading`]),!n(S).loading&&n(S).finishedProducts.length===0?(t(),c(h,{key:0,description:`暂无成品数据`})):g(``,!0),o(H,{visible:E.value,"onUpdate:visible":i[7]||=e=>E.value=e,title:(D.value?`编辑`:`新增`)+`成品`,width:`560px`,onClosed:L},{footer:d(()=>[o(s,{onClick:i[6]||=e=>E.value=!1,disabled:O.value},{default:d(()=>[...i[14]||=[_(`取消`,-1)]]),_:1},8,[`disabled`]),o(s,{type:`primary`,loading:O.value,disabled:O.value,onClick:F},{default:d(()=>[...i[15]||=[_(`保存`,-1)]]),_:1},8,[`loading`,`disabled`])]),default:d(()=>[o(V,{"label-width":`100px`},{default:d(()=>[o(w,{label:`类型`},{default:d(()=>[o(y,{"model-value":`成品(按单生产,不做库存)`,disabled:``})]),_:1}),o(w,{label:`SKU`,required:``},{default:d(()=>[o(y,{modelValue:k.value.sku,"onUpdate:modelValue":i[0]||=e=>k.value.sku=e,placeholder:`产品编码`},null,8,[`modelValue`])]),_:1}),o(w,{label:`名称`,required:``},{default:d(()=>[o(y,{modelValue:k.value.name,"onUpdate:modelValue":i[1]||=e=>k.value.name=e,placeholder:`产品名称`},null,8,[`modelValue`])]),_:1}),o(w,{label:`分类`},{default:d(()=>[o(y,{modelValue:k.value.category,"onUpdate:modelValue":i[2]||=e=>k.value.category=e,placeholder:`产品分类`},null,8,[`modelValue`])]),_:1}),o(w,{label:`单位`},{default:d(()=>[o(y,{modelValue:k.value.unit,"onUpdate:modelValue":i[3]||=e=>k.value.unit=e,placeholder:`件`},null,8,[`modelValue`])]),_:1}),o(w,{label:`成本价`},{default:d(()=>[o(T,{modelValue:k.value.cost_price,"onUpdate:modelValue":i[4]||=e=>k.value.cost_price=e,precision:2,min:0,step:.01,style:{width:`100%`}},null,8,[`modelValue`])]),_:1}),o(w,{label:`销售价`},{default:d(()=>[o(T,{modelValue:k.value.sale_price,"onUpdate:modelValue":i[5]||=e=>k.value.sale_price=e,precision:2,min:0,step:.01,style:{width:`100%`}},null,8,[`modelValue`])]),_:1}),o(w,{label:`说明`},{default:d(()=>[o(y,{"model-value":`成品不做库存,成本由下方BOM定义物料构成后自动计算`,disabled:``})]),_:1}),D.value?(t(),v(p,{key:0},[o(R,{"content-position":`left`},{default:d(()=>[...i[11]||=[_(`BOM物料配置`,-1)]]),_:1}),l(`div`,x,[o(s,{type:`primary`,size:`small`,onClick:N,style:{"margin-bottom":`8px`}},{default:d(()=>[...i[12]||=[_(`+ 添加物料`,-1)]]),_:1}),o(m,{data:A.value,size:`small`,border:``},{default:d(()=>[o(u,{label:`物料`},{default:d(({row:e})=>[o(B,{modelValue:e.material_id,"onUpdate:modelValue":t=>e.material_id=t,placeholder:`选择物料`,style:{width:`100%`}},{default:d(()=>[(t(!0),v(p,null,r(n(S).materials,e=>(t(),c(z,{key:e.id,label:`${e.sku} - ${e.name}`,value:e.id},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`,`onUpdate:modelValue`])]),_:1}),o(u,{label:`数量`,width:`120`},{default:d(({row:e})=>[o(T,{modelValue:e.quantity,"onUpdate:modelValue":t=>e.quantity=t,min:1e-4,step:1e-4,size:`small`,style:{width:`100%`}},null,8,[`modelValue`,`onUpdate:modelValue`])]),_:1}),o(u,{label:`操作`,width:`80`},{default:d(({$index:e})=>[o(s,{type:`danger`,size:`small`,onClick:t=>P(e)},{default:d(()=>[...i[13]||=[_(`删除`,-1)]]),_:1},8,[`onClick`])]),_:1})]),_:1},8,[`data`])])],64)):g(``,!0)]),_:1})]),_:1},8,[`visible`,`title`])])}}});export{S as default}; \ No newline at end of file diff --git a/static/assets/PurchaseOrdersTab-B-omccCC.js b/static/assets/PurchaseOrdersTab-B-omccCC.js deleted file mode 100644 index 92b0b69..0000000 --- a/static/assets/PurchaseOrdersTab-B-omccCC.js +++ /dev/null @@ -1 +0,0 @@ -import{C as e,D as t,F as n,O as r,P as i,R as a,S as o,T as s,_ as c,g as l,h as u,i as d,j as f,k as p,m,r as h,s as g,t as _,v,x as y,y as b}from"./index-BoystVy-.js";import{t as x}from"./useInventory-C7Zfw7oO.js";var S={dashboard(){return g(`/api/dashboard`)},listProducts(e){let t=new URLSearchParams;e?.item_type&&t.set(`item_type`,e.item_type),e?.limit&&t.set(`limit`,String(e.limit));let n=t.toString();return g(`/api/products${n?`?${n}`:``}`)},createProduct(e){return g(`/api/products`,{method:`POST`,body:JSON.stringify(e)})},updateProduct(e,t){return g(`/api/products/${e}`,{method:`PUT`,body:JSON.stringify(t)})},deleteProduct(e){return g(`/api/products/${e}`,{method:`DELETE`})},getProductMaterials(e){return g(`/api/products/${e}/materials`)},createProductFromTask(e){return g(`/api/products/from-task/${e}`,{method:`POST`})},listWarehouses(){return g(`/api/warehouses`)},createWarehouse(e){return g(`/api/warehouses`,{method:`POST`,body:JSON.stringify(e)})},listInventory(){return g(`/api/inventory`)},listStockMovements(e){return g(`/api/stock-movements${e?.limit?`?limit=${e.limit}`:``}`)},listSuppliers(){return g(`/api/suppliers`)},createSupplier(e){return g(`/api/suppliers`,{method:`POST`,body:JSON.stringify(e)})},updateSupplier(e,t){return g(`/api/suppliers/${e}`,{method:`PUT`,body:JSON.stringify(t)})},deleteSupplier(e){return g(`/api/suppliers/${e}`,{method:`DELETE`})},listCustomers(){return g(`/api/customers`)},createCustomer(e){return g(`/api/customers`,{method:`POST`,body:JSON.stringify(e)})},updateCustomer(e,t){return g(`/api/customers/${e}`,{method:`PUT`,body:JSON.stringify(t)})},deleteCustomer(e){return g(`/api/customers/${e}`,{method:`DELETE`})},listPurchaseOrders(e){return g(`/api/purchase-orders${e?.limit?`?limit=${e.limit}`:``}`)},createPurchaseOrder(e){return g(`/api/purchase-orders`,{method:`POST`,body:JSON.stringify(e)})},updatePurchaseOrder(e,t){return g(`/api/purchase-orders/${e}`,{method:`PUT`,body:JSON.stringify(t)})},receivePurchaseOrder(e,t){return g(`/api/purchase-orders/${e}/receive`,{method:`POST`,body:JSON.stringify(t)})},updatePurchaseOrderStatus(e,t){return g(`/api/purchase-orders/${e}/status`,{method:`PUT`,body:JSON.stringify({status:t})})},listSalesOrders(e){return g(`/api/sales-orders${e?.limit?`?limit=${e.limit}`:``}`)},getSalesOrder(e){return g(`/api/sales-orders/${e}`)},createSalesOrder(e){return g(`/api/sales-orders`,{method:`POST`,body:JSON.stringify(e)})},updateSalesOrder(e,t){return g(`/api/sales-orders/${e}`,{method:`PUT`,body:JSON.stringify(t)})},deleteSalesOrder(e){return g(`/api/sales-orders/${e}`,{method:`DELETE`})},calculatePurchaseDemands(e){return g(`/api/purchase-demands/calculate`,{method:`POST`,body:JSON.stringify({sales_order_ids:e})})},financeSummary(e){let t=new URLSearchParams;return e?.year&&t.set(`year`,String(e.year)),e?.quarter&&t.set(`quarter`,String(e.quarter)),g(`/api/finance/summary?${t}`)},financeTransactions(e){let t=new URLSearchParams;return e?.status&&t.set(`status`,e.status),e?.limit&&t.set(`limit`,String(e.limit)),e?.year&&t.set(`year`,String(e.year)),e?.quarter&&t.set(`quarter`,String(e.quarter)),g(`/api/finance/transactions?${t}`)},financeReceivables(e){let t=new URLSearchParams;return e?.limit&&t.set(`limit`,String(e.limit)),e?.year&&t.set(`year`,String(e.year)),e?.quarter&&t.set(`quarter`,String(e.quarter)),g(`/api/finance/receivables?${t}`)},financePayables(e){let t=new URLSearchParams;return e?.limit&&t.set(`limit`,String(e.limit)),e?.year&&t.set(`year`,String(e.year)),e?.quarter&&t.set(`quarter`,String(e.quarter)),g(`/api/finance/payables?${t}`)},financePartnerStatement(e,t){let n=new URLSearchParams;return t?.year&&n.set(`year`,String(t.year)),t?.quarter&&n.set(`quarter`,String(t.quarter)),g(`/api/finance/partner-statement/${e}?${n}`)},financePartnerProductStatement(e,t){let n=new URLSearchParams;return t?.year&&n.set(`year`,String(t.year)),t?.quarter&&n.set(`quarter`,String(t.quarter)),g(`/api/finance/partner-product-statement/${e}?${n}`)}},ee={style:{"margin-bottom":`12px`,display:`flex`,gap:`12px`,"align-items":`center`}},te={style:{display:`flex`,gap:`4px`}},ne={style:{display:`flex`,"justify-content":`space-between`,"align-items":`center`,"margin-bottom":`12px`}},re={style:{"text-align":`right`,"margin-top":`8px`,"font-weight":`600`}},ie={style:{"margin-bottom":`16px`}},C={style:{display:`flex`,gap:`12px`,"align-items":`center`}},w={style:{display:`flex`,gap:`24px`,"margin-bottom":`12px`,"font-weight":`600`}},T=e({__name:`PurchaseOrdersTab`,setup(e){function T(e,t,n,r,i){return new Promise(a=>{let o=_.confirm({header:e,body:t,theme:n,confirmBtn:r,cancelBtn:i,onConfirm:()=>{o.hide(),a(!0)},onCancel:()=>{o.hide(),a(!1)},onClose:()=>{a(!1)}})})}let{state:E,formatCurrency:D,formatDateTime:O,formatDate:ae,getPurchaseOrderStatusLabel:k,getReceiptStatusLabel:oe,getPaymentStatusLabel:se,isPurchaseOrderLocked:A,loadPurchaseOrders:j,loadSuppliers:M,loadMaterials:N,loadInventory:P,loadMovements:F}=x(),I=i(!1),L=i(null),R=i({}),z=i([]),B=i(null),V=i(!1),H=i(!1),U=i(null),W=i([]),G=i(null),K=i(``),q=i(!1),J=i(!1),Y=i(!1),X=i([]),Z=i([]),Q=i(null);async function ce(){J.value=!0,Q.value=null,Z.value=[];try{let e=await S.listSalesOrders({limit:100});X.value=e?.items||e||[]}catch(e){d(e,`加载销售订单`)}}async function le(){if(!Z.value.length){h(`请选择至少一个销售订单`,`warning`);return}Y.value=!0;try{Q.value=await S.calculatePurchaseDemands(Z.value)}catch(e){d(e,`计算采购需求`)}finally{Y.value=!1}}function ue(){J.value=!1,Q.value=null,Z.value=[]}function de(){L.value=null,R.value={supplier_id:null,expected_date:``,remark:``},z.value=[],I.value=!0}function fe(){z.value.push({product_id:E.materials[0]?.id||null,quantity:1,remark:``})}function pe(e){z.value.splice(e,1)}let me=u(()=>z.value.reduce((e,t)=>e+(E.materials.find(e=>e.id===t.product_id)?.cost_price||0)*(t.quantity||0),0));async function he(e){await N(),await M(),L.value=e,R.value={supplier_id:e.supplier_id||null,expected_date:e.expected_date||``,remark:e.remark||``};try{z.value=((await g(`/api/purchase-orders/${e.id}`)).items||[]).map(e=>({product_id:e.product_id,quantity:e.quantity,remark:e.remark||``}))}catch(e){d(e,`加载采购订单详情`)}I.value=!0}async function ge(){if(!V.value){if(!R.value.supplier_id){h(`请选择供应商`,`warning`);return}if(!z.value||z.value.length===0){h(`请至少添加一个物料`,`warning`);return}for(let[e,t]of z.value.entries()){if(!t.product_id){h(`第 ${e+1} 行:请选择物料`,`warning`);return}if(!t.quantity||t.quantity<=0){h(`第 ${e+1} 行:数量必须大于 0`,`warning`);return}}V.value=!0;try{let e={supplier_id:R.value.supplier_id,expected_date:R.value.expected_date||null,remark:R.value.remark||``,items:z.value.map(e=>({product_id:e.product_id,quantity:e.quantity,remark:e.remark}))};L.value?(await g(`/api/purchase-orders/${L.value.id}`,{method:`PUT`,body:JSON.stringify(e)}),h(`采购订单更新成功`,`success`)):(await g(`/api/purchase-orders`,{method:`POST`,body:JSON.stringify(e)}),h(`采购订单创建成功`,`success`)),I.value=!1,L.value=null,R.value={},z.value=[],j()}catch(e){d(e,`保存采购订单`)}finally{V.value=!1}}}async function _e(e){if(await T(`删除确认`,`确定要删除这个采购订单吗?`,`warning`,`删除`,`取消`))try{await g(`/api/purchase-orders/${e}`,{method:`DELETE`}),h(`采购订单已删除`,`success`),j()}catch(e){d(e,`删除采购订单`)}}async function ve(e){try{let t=await g(`/api/purchase-orders/${e.id}`);U.value=e,W.value=(t.items||[]).map(e=>({id:e.id,material_label:e.product_name||e.product_sku||``,quantity:e.quantity||0,received_quantity:e.received_quantity||0,remaining:(e.quantity||0)-(e.received_quantity||0),receive_quantity:0})),G.value=B.value||E.warehouses[0]?.id||null,K.value=``,H.value=!0}catch(e){d(e,`加载采购订单详情`)}}async function ye(){if(q.value)return;if(!G.value){h(`请选择入库仓库`,`warning`);return}let e=W.value.filter(e=>e.receive_quantity>0).map(e=>({item_id:e.id,receive_quantity:e.receive_quantity}));if(e.length===0){h(`请输入本次入库数量`,`warning`);return}q.value=!0;try{await g(`/api/purchase-orders/${U.value.id}/receive`,{method:`POST`,body:JSON.stringify({warehouse_id:G.value,remark:K.value,items:e})}),h(`入库完成`,`success`),H.value=!1,U.value=null,W.value=[],j(),P(),F()}catch(e){d(e,`采购入库`)}finally{q.value=!1}}async function be(e,t){if(t!==`received`){if(!await T(`非标准流程提醒`,`该订单尚未全部收货,确定要提前付款吗?建议先完成收货后再付款。`,`warning`,`仍要付款`,`取消`))return}else if(!await T(`付款确认`,`确认已向供应商支付该订单款项?`,`success`,`确认付款`,`取消`))return;await $(e,`paid`,`已付款`)}async function xe(e){await T(`作废确认`,`确定要作废该订单吗?此操作不可撤销。`,`error`,`确认作废`,`取消`)&&await $(e,`cancelled`,`已作废`)}async function $(e,t,n){try{await g(`/api/purchase-orders/${e}/status`,{method:`PATCH`,body:JSON.stringify({status:t})}),h(`订单已${n}`,`success`),j(),F(),P()}catch(e){d(e,`更新状态`)}}function Se(){I.value=!1,L.value=null,R.value={},z.value=[]}function Ce(){H.value=!1,U.value=null,W.value=[]}async function we(){await N(),await M(),await j()}return s(()=>{we()}),(e,i)=>{let s=p(`t-option`),u=p(`t-select`),d=p(`t-button`),h=p(`t-table-column`),g=p(`t-tag`),_=p(`t-table`),x=p(`t-empty`),S=p(`t-form-item`),T=p(`t-date-picker`),k=p(`t-input`),M=p(`t-form`),N=p(`t-input-number`),P=p(`t-dialog`);return t(),b(`div`,null,[l(`div`,ee,[o(u,{modelValue:B.value,"onUpdate:modelValue":i[0]||=e=>B.value=e,placeholder:`选择仓库`,style:{width:`200px`},clearable:``},{default:f(()=>[(t(!0),b(m,null,r(n(E).warehouses,e=>(t(),c(s,{key:e.id,label:e.name,value:e.id},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`]),o(d,{onClick:n(j)},{default:f(()=>[...i[13]||=[y(`刷新`,-1)]]),_:1},8,[`onClick`]),o(d,{type:`primary`,onClick:de},{default:f(()=>[...i[14]||=[y(`新增采购订单`,-1)]]),_:1}),o(d,{theme:`success`,variant:`outline`,onClick:ce},{default:f(()=>[...i[15]||=[y(`采购建议`,-1)]]),_:1})]),o(_,{data:n(E).purchaseOrders,loading:n(E).loading,stripe:``},{default:f(()=>[o(h,{prop:`order_no`,label:`采购单`}),o(h,{prop:`supplier_name`,label:`供应商`}),o(h,{label:`状态`},{default:f(({row:e})=>[l(`div`,te,[o(g,{type:e.receipt_status===`received`?`success`:e.receipt_status===`partial_received`?`warning`:e.receipt_status===`cancelled`?`danger`:`info`,size:`small`},{default:f(()=>[y(a(n(oe)(e.receipt_status)),1)]),_:2},1032,[`type`]),o(g,{type:e.payment_status===`paid`?`success`:`info`,size:`small`},{default:f(()=>[y(a(n(se)(e.payment_status)),1)]),_:2},1032,[`type`])])]),_:1}),o(h,{label:`订单创建`},{default:f(({row:e})=>[y(a(n(O)(e.created_at)),1)]),_:1}),o(h,{label:`预计到货`},{default:f(({row:e})=>[y(a(n(ae)(e.expected_date)),1)]),_:1}),o(h,{label:`实际到货`},{default:f(({row:e})=>[y(a(e.received_date?n(O)(e.received_date):`-`),1)]),_:1}),o(h,{label:`实际付款`},{default:f(({row:e})=>[y(a(e.paid_date?n(O)(e.paid_date):`-`),1)]),_:1}),o(h,{label:`总金额`},{default:f(({row:e})=>[y(a(n(D)(e.total_amount)),1)]),_:1}),o(h,{label:`已付款`},{default:f(({row:e})=>[y(a(n(D)(e.paid_amount||0)),1)]),_:1}),o(h,{label:`操作`,width:`280`},{default:f(({row:e})=>[o(d,{type:`primary`,size:`small`,disabled:n(A)(e.status),onClick:t=>he(e)},{default:f(()=>[...i[16]||=[y(` 编辑 `,-1)]]),_:1},8,[`disabled`,`onClick`]),o(d,{type:`danger`,size:`small`,disabled:n(A)(e.status),onClick:t=>_e(e.id)},{default:f(()=>[...i[17]||=[y(` 删除 `,-1)]]),_:1},8,[`disabled`,`onClick`]),e.receipt_status===`pending`||e.receipt_status===`partial_received`?(t(),c(d,{key:0,type:`success`,size:`small`,onClick:t=>ve(e)},{default:f(()=>[...i[18]||=[y(` 到货入库 `,-1)]]),_:1},8,[`onClick`])):v(``,!0),e.payment_status!==`paid`&&e.receipt_status!==`cancelled`?(t(),c(d,{key:1,type:`warning`,size:`small`,onClick:t=>be(e.id,e.receipt_status)},{default:f(()=>[...i[19]||=[y(` 标记已付款 `,-1)]]),_:1},8,[`onClick`])):v(``,!0),e.payment_status!==`paid`&&e.receipt_status!==`cancelled`?(t(),c(d,{key:2,type:`info`,size:`small`,onClick:t=>xe(e.id)},{default:f(()=>[...i[20]||=[y(` 作废 `,-1)]]),_:1},8,[`onClick`])):v(``,!0)]),_:1})]),_:1},8,[`data`,`loading`]),!n(E).loading&&n(E).purchaseOrders.length===0?(t(),c(x,{key:0,description:`暂无采购订单`})):v(``,!0),o(P,{visible:I.value,"onUpdate:visible":i[5]||=e=>I.value=e,title:(L.value?`编辑`:`新增`)+`采购订单`,width:`800px`,onClosed:Se},{footer:f(()=>[o(d,{onClick:i[4]||=e=>I.value=!1,disabled:V.value},{default:f(()=>[...i[24]||=[y(`取消`,-1)]]),_:1},8,[`disabled`]),o(d,{type:`primary`,loading:V.value,disabled:V.value,onClick:ge},{default:f(()=>[...i[25]||=[y(`保存`,-1)]]),_:1},8,[`loading`,`disabled`])]),default:f(()=>[o(M,{"label-width":`100px`},{default:f(()=>[o(S,{label:`供应商`,required:``},{default:f(()=>[o(u,{modelValue:R.value.supplier_id,"onUpdate:modelValue":i[1]||=e=>R.value.supplier_id=e,placeholder:`请选择供应商`,style:{width:`100%`}},{default:f(()=>[(t(!0),b(m,null,r(n(E).suppliers,e=>(t(),c(s,{key:e.id,label:e.name,value:e.id},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`])]),_:1}),o(S,{label:`预计到货`},{default:f(()=>[o(T,{modelValue:R.value.expected_date,"onUpdate:modelValue":i[2]||=e=>R.value.expected_date=e,type:`date`,placeholder:`选择日期`,style:{width:`100%`},"value-format":`YYYY-MM-DD`},null,8,[`modelValue`])]),_:1}),o(S,{label:`备注`},{default:f(()=>[o(k,{modelValue:R.value.remark,"onUpdate:modelValue":i[3]||=e=>R.value.remark=e,placeholder:`备注信息`},null,8,[`modelValue`])]),_:1})]),_:1}),l(`div`,ne,[i[22]||=l(`span`,{style:{"font-weight":`600`}},`物料明细`,-1),o(d,{type:`primary`,size:`small`,onClick:fe},{default:f(()=>[...i[21]||=[y(`+ 添加物料`,-1)]]),_:1})]),o(_,{data:z.value,border:``,size:`small`},{default:f(()=>[o(h,{label:`物料`,"min-width":`200`},{default:f(({row:e})=>[o(u,{modelValue:e.product_id,"onUpdate:modelValue":t=>e.product_id=t,placeholder:`请选择物料`,style:{width:`100%`}},{default:f(()=>[(t(!0),b(m,null,r(n(E).materials,e=>(t(),c(s,{key:e.id,label:`${e.sku} - ${e.name}`,value:e.id},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`,`onUpdate:modelValue`])]),_:1}),o(h,{label:`数量`,width:`120`},{default:f(({row:e})=>[o(N,{modelValue:e.quantity,"onUpdate:modelValue":t=>e.quantity=t,min:1e-4,step:1e-4,size:`small`,style:{width:`100%`}},null,8,[`modelValue`,`onUpdate:modelValue`])]),_:1}),o(h,{label:`单价`,width:`120`},{default:f(({row:e})=>[o(N,{"model-value":n(E).materials.find(t=>t.id===e.product_id)?.cost_price||0,disabled:``,size:`small`,style:{width:`100%`}},null,8,[`model-value`])]),_:1}),o(h,{label:`总价`,width:`120`},{default:f(({row:e})=>[y(a(n(D)((n(E).materials.find(t=>t.id===e.product_id)?.cost_price||0)*(e.quantity||0))),1)]),_:1}),o(h,{label:`备注`,width:`150`},{default:f(({row:e})=>[o(k,{modelValue:e.remark,"onUpdate:modelValue":t=>e.remark=t,size:`small`,placeholder:`备注`},null,8,[`modelValue`,`onUpdate:modelValue`])]),_:1}),o(h,{label:`操作`,width:`80`},{default:f(({$index:e})=>[o(d,{type:`danger`,size:`small`,onClick:t=>pe(e)},{default:f(()=>[...i[23]||=[y(`删除`,-1)]]),_:1},8,[`onClick`])]),_:1})]),_:1},8,[`data`]),l(`div`,re,` 订单总金额:`+a(n(D)(me.value)),1)]),_:1},8,[`visible`,`title`]),o(P,{visible:H.value,"onUpdate:visible":i[9]||=e=>H.value=e,title:`采购到货入库`,width:`700px`,onClosed:Ce},{footer:f(()=>[o(d,{onClick:i[8]||=e=>H.value=!1,disabled:q.value},{default:f(()=>[...i[26]||=[y(`取消`,-1)]]),_:1},8,[`disabled`]),o(d,{type:`primary`,loading:q.value,disabled:q.value,onClick:ye},{default:f(()=>[...i[27]||=[y(`确认入库`,-1)]]),_:1},8,[`loading`,`disabled`])]),default:f(()=>[o(M,{"label-width":`100px`},{default:f(()=>[o(S,{label:`入库仓库`,required:``},{default:f(()=>[o(u,{modelValue:G.value,"onUpdate:modelValue":i[6]||=e=>G.value=e,placeholder:`请选择仓库`,style:{width:`100%`}},{default:f(()=>[(t(!0),b(m,null,r(n(E).warehouses,e=>(t(),c(s,{key:e.id,label:e.name,value:e.id},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`])]),_:1}),o(S,{label:`备注`},{default:f(()=>[o(k,{modelValue:K.value,"onUpdate:modelValue":i[7]||=e=>K.value=e,placeholder:`入库备注`},null,8,[`modelValue`])]),_:1})]),_:1}),o(_,{data:W.value,border:``,size:`small`},{default:f(()=>[o(h,{prop:`material_label`,label:`物料`}),o(h,{prop:`id`,label:`明细ID`,width:`80`}),o(h,{label:`剩余待入库`,width:`100`},{default:f(({row:e})=>[y(a(e.remaining),1)]),_:1}),o(h,{label:`本次入库`,width:`140`},{default:f(({row:e})=>[o(N,{modelValue:e.receive_quantity,"onUpdate:modelValue":t=>e.receive_quantity=t,min:0,max:e.remaining,size:`small`,style:{width:`100%`}},null,8,[`modelValue`,`onUpdate:modelValue`,`max`])]),_:1})]),_:1},8,[`data`])]),_:1},8,[`visible`]),o(P,{visible:J.value,"onUpdate:visible":i[12]||=e=>J.value=e,title:`采购需求推导`,width:`1000px`,onClosed:ue},{footer:f(()=>[o(d,{onClick:i[11]||=e=>J.value=!1},{default:f(()=>[...i[31]||=[y(`关闭`,-1)]]),_:1})]),default:f(()=>[l(`div`,ie,[i[29]||=l(`p`,{style:{"margin-bottom":`8px`,color:`var(--td-text-color-secondary)`}},` 选择销售订单,系统将自动按 BOM 展开物料需求、对比库存、推荐供应商。 `,-1),l(`div`,C,[o(u,{modelValue:Z.value,"onUpdate:modelValue":i[10]||=e=>Z.value=e,multiple:``,placeholder:`请选择销售订单`,style:{flex:`1`},loading:X.value.length===0},{default:f(()=>[(t(!0),b(m,null,r(X.value,e=>(t(),c(s,{key:e.id,label:`${e.order_no} - ${e.customer_name||``}`,value:e.id},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`,`loading`]),o(d,{type:`primary`,loading:Y.value,disabled:!Z.value.length,onClick:le},{default:f(()=>[...i[28]||=[y(` 计算 `,-1)]]),_:1},8,[`loading`,`disabled`])])]),Q.value?(t(),b(m,{key:0},[l(`div`,w,[l(`span`,null,`来源订单:`+a(Q.value.source_order_nos?.join(`, `)||`-`),1),l(`span`,null,[i[30]||=y(`缺货物料:`,-1),o(g,{type:Q.value.shortage_count>0?`danger`:`success`,size:`small`},{default:f(()=>[y(a(Q.value.shortage_count),1)]),_:1},8,[`type`])]),l(`span`,null,`预计采购总额:`+a(n(D)(Number(Q.value.total_estimated_cost||0))),1)]),o(_,{data:Q.value.items||[],stripe:``,border:``,size:`small`,"max-height":`400`},{default:f(()=>[o(h,{prop:`material_sku`,label:`物料SKU`,width:`120`}),o(h,{prop:`material_name`,label:`物料名称`,"min-width":`140`}),o(h,{label:`需求量`,width:`90`},{default:f(({row:e})=>[y(a(e.required_quantity),1)]),_:1}),o(h,{label:`库存量`,width:`90`},{default:f(({row:e})=>[y(a(e.available_quantity),1)]),_:1}),o(h,{label:`缺口`,width:`90`},{default:f(({row:e})=>[o(g,{type:e.shortage_quantity>0?`danger`:`success`,size:`small`},{default:f(()=>[y(a(e.shortage_quantity),1)]),_:2},1032,[`type`])]),_:1}),o(h,{label:`单价`,width:`90`},{default:f(({row:e})=>[y(a(n(D)(Number(e.unit_cost||0))),1)]),_:1}),o(h,{label:`预计金额`,width:`110`},{default:f(({row:e})=>[y(a(n(D)(Number(e.estimated_cost||0))),1)]),_:1}),o(h,{prop:`suggested_supplier_name`,label:`建议供应商`,"min-width":`120`},{default:f(({row:e})=>[y(a(e.suggested_supplier_name||`-`),1)]),_:1}),o(h,{label:`交期(天)`,width:`80`},{default:f(({row:e})=>[y(a(e.supplier_lead_time??`-`),1)]),_:1})]),_:1},8,[`data`]),(Q.value.items||[]).length===0?(t(),c(x,{key:0,description:`无物料需求(BOM 为空或订单无明细)`})):v(``,!0)],64)):v(``,!0)]),_:1},8,[`visible`])])}}});export{T as default}; \ No newline at end of file diff --git a/static/assets/PurchaseOrdersTab-DA-z0FT1.js b/static/assets/PurchaseOrdersTab-DA-z0FT1.js new file mode 100644 index 0000000..c4bf82b --- /dev/null +++ b/static/assets/PurchaseOrdersTab-DA-z0FT1.js @@ -0,0 +1 @@ +import{C as e,D as t,F as n,O as r,P as i,R as a,S as o,T as s,_ as c,g as l,h as u,i as d,j as f,k as p,m,r as h,s as g,t as _,v,x as y,y as b}from"./index-Dngmm__P.js";import{t as x}from"./useInventory-CrXJ8kdd.js";var S={dashboard(){return g(`/api/dashboard`)},listProducts(e){let t=new URLSearchParams;e?.item_type&&t.set(`item_type`,e.item_type),e?.limit&&t.set(`limit`,String(e.limit));let n=t.toString();return g(`/api/products${n?`?${n}`:``}`)},createProduct(e){return g(`/api/products`,{method:`POST`,body:JSON.stringify(e)})},updateProduct(e,t){return g(`/api/products/${e}`,{method:`PUT`,body:JSON.stringify(t)})},deleteProduct(e){return g(`/api/products/${e}`,{method:`DELETE`})},getProductMaterials(e){return g(`/api/products/${e}/materials`)},createProductFromTask(e){return g(`/api/products/from-task/${e}`,{method:`POST`})},listWarehouses(){return g(`/api/warehouses`)},createWarehouse(e){return g(`/api/warehouses`,{method:`POST`,body:JSON.stringify(e)})},listInventory(){return g(`/api/inventory`)},listStockMovements(e){return g(`/api/stock-movements${e?.limit?`?limit=${e.limit}`:``}`)},listSuppliers(){return g(`/api/suppliers`)},createSupplier(e){return g(`/api/suppliers`,{method:`POST`,body:JSON.stringify(e)})},updateSupplier(e,t){return g(`/api/suppliers/${e}`,{method:`PUT`,body:JSON.stringify(t)})},deleteSupplier(e){return g(`/api/suppliers/${e}`,{method:`DELETE`})},listCustomers(){return g(`/api/customers`)},createCustomer(e){return g(`/api/customers`,{method:`POST`,body:JSON.stringify(e)})},updateCustomer(e,t){return g(`/api/customers/${e}`,{method:`PUT`,body:JSON.stringify(t)})},deleteCustomer(e){return g(`/api/customers/${e}`,{method:`DELETE`})},listPurchaseOrders(e){return g(`/api/purchase-orders${e?.limit?`?limit=${e.limit}`:``}`)},createPurchaseOrder(e){return g(`/api/purchase-orders`,{method:`POST`,body:JSON.stringify(e)})},updatePurchaseOrder(e,t){return g(`/api/purchase-orders/${e}`,{method:`PUT`,body:JSON.stringify(t)})},receivePurchaseOrder(e,t){return g(`/api/purchase-orders/${e}/receive`,{method:`POST`,body:JSON.stringify(t)})},updatePurchaseOrderStatus(e,t){return g(`/api/purchase-orders/${e}/status`,{method:`PUT`,body:JSON.stringify({status:t})})},listSalesOrders(e){return g(`/api/sales-orders${e?.limit?`?limit=${e.limit}`:``}`)},getSalesOrder(e){return g(`/api/sales-orders/${e}`)},createSalesOrder(e){return g(`/api/sales-orders`,{method:`POST`,body:JSON.stringify(e)})},updateSalesOrder(e,t){return g(`/api/sales-orders/${e}`,{method:`PUT`,body:JSON.stringify(t)})},deleteSalesOrder(e){return g(`/api/sales-orders/${e}`,{method:`DELETE`})},calculatePurchaseDemands(e){return g(`/api/purchase-demands/calculate`,{method:`POST`,body:JSON.stringify({sales_order_ids:e})})},financeSummary(e){let t=new URLSearchParams;return e?.year&&t.set(`year`,String(e.year)),e?.quarter&&t.set(`quarter`,String(e.quarter)),g(`/api/finance/summary?${t}`)},financeTransactions(e){let t=new URLSearchParams;return e?.status&&t.set(`status`,e.status),e?.limit&&t.set(`limit`,String(e.limit)),e?.year&&t.set(`year`,String(e.year)),e?.quarter&&t.set(`quarter`,String(e.quarter)),g(`/api/finance/transactions?${t}`)},financeReceivables(e){let t=new URLSearchParams;return e?.limit&&t.set(`limit`,String(e.limit)),e?.year&&t.set(`year`,String(e.year)),e?.quarter&&t.set(`quarter`,String(e.quarter)),g(`/api/finance/receivables?${t}`)},financePayables(e){let t=new URLSearchParams;return e?.limit&&t.set(`limit`,String(e.limit)),e?.year&&t.set(`year`,String(e.year)),e?.quarter&&t.set(`quarter`,String(e.quarter)),g(`/api/finance/payables?${t}`)},financePartnerStatement(e,t){let n=new URLSearchParams;return t?.year&&n.set(`year`,String(t.year)),t?.quarter&&n.set(`quarter`,String(t.quarter)),g(`/api/finance/partner-statement/${e}?${n}`)},financePartnerProductStatement(e,t){let n=new URLSearchParams;return t?.year&&n.set(`year`,String(t.year)),t?.quarter&&n.set(`quarter`,String(t.quarter)),g(`/api/finance/partner-product-statement/${e}?${n}`)}},ee={style:{"margin-bottom":`12px`,display:`flex`,gap:`12px`,"align-items":`center`}},te={style:{display:`flex`,gap:`4px`}},ne={style:{display:`flex`,"justify-content":`space-between`,"align-items":`center`,"margin-bottom":`12px`}},re={style:{"text-align":`right`,"margin-top":`8px`,"font-weight":`600`}},ie={style:{"margin-bottom":`16px`}},C={style:{display:`flex`,gap:`12px`,"align-items":`center`}},w={style:{display:`flex`,gap:`24px`,"margin-bottom":`12px`,"font-weight":`600`}},T=e({__name:`PurchaseOrdersTab`,setup(e){function T(e,t,n,r,i){return new Promise(a=>{let o=_.confirm({header:e,body:t,theme:n,confirmBtn:r,cancelBtn:i,onConfirm:()=>{o.hide(),a(!0)},onCancel:()=>{o.hide(),a(!1)},onClose:()=>{a(!1)}})})}let{state:E,formatCurrency:D,formatDateTime:O,formatDate:ae,getPurchaseOrderStatusLabel:k,getReceiptStatusLabel:oe,getPaymentStatusLabel:se,isPurchaseOrderLocked:A,loadPurchaseOrders:j,loadSuppliers:M,loadMaterials:N,loadInventory:P,loadMovements:F}=x(),I=i(!1),L=i(null),R=i({}),z=i([]),B=i(null),V=i(!1),H=i(!1),U=i(null),W=i([]),G=i(null),K=i(``),q=i(!1),J=i(!1),Y=i(!1),X=i([]),Z=i([]),Q=i(null);async function ce(){J.value=!0,Q.value=null,Z.value=[];try{let e=await S.listSalesOrders({limit:100});X.value=e?.items||e||[]}catch(e){d(e,`加载销售订单`)}}async function le(){if(!Z.value.length){h(`请选择至少一个销售订单`,`warning`);return}Y.value=!0;try{Q.value=await S.calculatePurchaseDemands(Z.value)}catch(e){d(e,`计算采购需求`)}finally{Y.value=!1}}function ue(){J.value=!1,Q.value=null,Z.value=[]}function de(){L.value=null,R.value={supplier_id:null,expected_date:``,remark:``},z.value=[],I.value=!0}function fe(){z.value.push({product_id:E.materials[0]?.id||null,quantity:1,remark:``})}function pe(e){z.value.splice(e,1)}let me=u(()=>z.value.reduce((e,t)=>{let n=E.materials.find(e=>e.id===t.product_id);return e+Number(n?.cost_price||0)*Number(t.quantity||0)},0));async function he(e){await N(),await M(),L.value=e,R.value={supplier_id:e.supplier_id||null,expected_date:e.expected_date||``,remark:e.remark||``};try{z.value=((await g(`/api/purchase-orders/${e.id}`)).items||[]).map(e=>({product_id:e.product_id,quantity:e.quantity,remark:e.remark||``}))}catch(e){d(e,`加载采购订单详情`)}I.value=!0}async function ge(){if(!V.value){if(!R.value.supplier_id){h(`请选择供应商`,`warning`);return}if(!z.value||z.value.length===0){h(`请至少添加一个物料`,`warning`);return}for(let[e,t]of z.value.entries()){if(!t.product_id){h(`第 ${e+1} 行:请选择物料`,`warning`);return}if(!t.quantity||t.quantity<=0){h(`第 ${e+1} 行:数量必须大于 0`,`warning`);return}}V.value=!0;try{let e={supplier_id:R.value.supplier_id,expected_date:R.value.expected_date||null,remark:R.value.remark||``,items:z.value.map(e=>({product_id:e.product_id,quantity:e.quantity,remark:e.remark}))};L.value?(await g(`/api/purchase-orders/${L.value.id}`,{method:`PUT`,body:JSON.stringify(e)}),h(`采购订单更新成功`,`success`)):(await g(`/api/purchase-orders`,{method:`POST`,body:JSON.stringify(e)}),h(`采购订单创建成功`,`success`)),I.value=!1,L.value=null,R.value={},z.value=[],j()}catch(e){d(e,`保存采购订单`)}finally{V.value=!1}}}async function _e(e){if(await T(`删除确认`,`确定要删除这个采购订单吗?`,`warning`,`删除`,`取消`))try{await g(`/api/purchase-orders/${e}`,{method:`DELETE`}),h(`采购订单已删除`,`success`),j()}catch(e){d(e,`删除采购订单`)}}async function ve(e){try{let t=await g(`/api/purchase-orders/${e.id}`);U.value=e,W.value=(t.items||[]).map(e=>({id:e.id,material_label:e.product_name||e.product_sku||``,quantity:e.quantity||0,received_quantity:e.received_quantity||0,remaining:(e.quantity||0)-(e.received_quantity||0),receive_quantity:0})),G.value=B.value||E.warehouses[0]?.id||null,K.value=``,H.value=!0}catch(e){d(e,`加载采购订单详情`)}}async function ye(){if(q.value)return;if(!G.value){h(`请选择入库仓库`,`warning`);return}let e=W.value.filter(e=>e.receive_quantity>0).map(e=>({item_id:e.id,receive_quantity:e.receive_quantity}));if(e.length===0){h(`请输入本次入库数量`,`warning`);return}q.value=!0;try{await g(`/api/purchase-orders/${U.value.id}/receive`,{method:`POST`,body:JSON.stringify({warehouse_id:G.value,remark:K.value,items:e})}),h(`入库完成`,`success`),H.value=!1,U.value=null,W.value=[],j(),P(),F()}catch(e){d(e,`采购入库`)}finally{q.value=!1}}async function be(e,t){if(t!==`received`){if(!await T(`非标准流程提醒`,`该订单尚未全部收货,确定要提前付款吗?建议先完成收货后再付款。`,`warning`,`仍要付款`,`取消`))return}else if(!await T(`付款确认`,`确认已向供应商支付该订单款项?`,`success`,`确认付款`,`取消`))return;await $(e,`paid`,`已付款`)}async function xe(e){await T(`作废确认`,`确定要作废该订单吗?此操作不可撤销。`,`error`,`确认作废`,`取消`)&&await $(e,`cancelled`,`已作废`)}async function $(e,t,n){try{await g(`/api/purchase-orders/${e}/status`,{method:`PATCH`,body:JSON.stringify({status:t})}),h(`订单已${n}`,`success`),j(),F(),P()}catch(e){d(e,`更新状态`)}}function Se(){I.value=!1,L.value=null,R.value={},z.value=[]}function Ce(){H.value=!1,U.value=null,W.value=[]}async function we(){await N(),await M(),await j()}return s(()=>{we()}),(e,i)=>{let s=p(`t-option`),u=p(`t-select`),d=p(`t-button`),h=p(`t-table-column`),g=p(`t-tag`),_=p(`t-table`),x=p(`t-empty`),S=p(`t-form-item`),T=p(`t-date-picker`),k=p(`t-input`),M=p(`t-form`),N=p(`t-input-number`),P=p(`t-dialog`);return t(),b(`div`,null,[l(`div`,ee,[o(u,{modelValue:B.value,"onUpdate:modelValue":i[0]||=e=>B.value=e,placeholder:`选择仓库`,style:{width:`200px`},clearable:``},{default:f(()=>[(t(!0),b(m,null,r(n(E).warehouses,e=>(t(),c(s,{key:e.id,label:e.name,value:e.id},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`]),o(d,{onClick:n(j)},{default:f(()=>[...i[13]||=[y(`刷新`,-1)]]),_:1},8,[`onClick`]),o(d,{type:`primary`,onClick:de},{default:f(()=>[...i[14]||=[y(`新增采购订单`,-1)]]),_:1}),o(d,{theme:`success`,variant:`outline`,onClick:ce},{default:f(()=>[...i[15]||=[y(`采购建议`,-1)]]),_:1})]),o(_,{data:n(E).purchaseOrders,loading:n(E).loading,stripe:``},{default:f(()=>[o(h,{prop:`order_no`,label:`采购单`}),o(h,{prop:`supplier_name`,label:`供应商`}),o(h,{label:`状态`},{default:f(({row:e})=>[l(`div`,te,[o(g,{type:e.receipt_status===`received`?`success`:e.receipt_status===`partial_received`?`warning`:e.receipt_status===`cancelled`?`danger`:`info`,size:`small`},{default:f(()=>[y(a(n(oe)(e.receipt_status)),1)]),_:2},1032,[`type`]),o(g,{type:e.payment_status===`paid`?`success`:`info`,size:`small`},{default:f(()=>[y(a(n(se)(e.payment_status)),1)]),_:2},1032,[`type`])])]),_:1}),o(h,{label:`订单创建`},{default:f(({row:e})=>[y(a(n(O)(e.created_at)),1)]),_:1}),o(h,{label:`预计到货`},{default:f(({row:e})=>[y(a(n(ae)(e.expected_date)),1)]),_:1}),o(h,{label:`实际到货`},{default:f(({row:e})=>[y(a(e.received_date?n(O)(e.received_date):`-`),1)]),_:1}),o(h,{label:`实际付款`},{default:f(({row:e})=>[y(a(e.paid_date?n(O)(e.paid_date):`-`),1)]),_:1}),o(h,{label:`总金额`},{default:f(({row:e})=>[y(a(n(D)(e.total_amount)),1)]),_:1}),o(h,{label:`已付款`},{default:f(({row:e})=>[y(a(n(D)(e.paid_amount||0)),1)]),_:1}),o(h,{label:`操作`,width:`280`},{default:f(({row:e})=>[o(d,{type:`primary`,size:`small`,disabled:n(A)(e.status),onClick:t=>he(e)},{default:f(()=>[...i[16]||=[y(` 编辑 `,-1)]]),_:1},8,[`disabled`,`onClick`]),o(d,{type:`danger`,size:`small`,disabled:n(A)(e.status),onClick:t=>_e(e.id)},{default:f(()=>[...i[17]||=[y(` 删除 `,-1)]]),_:1},8,[`disabled`,`onClick`]),e.receipt_status===`pending`||e.receipt_status===`partial_received`?(t(),c(d,{key:0,type:`success`,size:`small`,onClick:t=>ve(e)},{default:f(()=>[...i[18]||=[y(` 到货入库 `,-1)]]),_:1},8,[`onClick`])):v(``,!0),e.payment_status!==`paid`&&e.receipt_status!==`cancelled`?(t(),c(d,{key:1,type:`warning`,size:`small`,onClick:t=>be(e.id,e.receipt_status)},{default:f(()=>[...i[19]||=[y(` 标记已付款 `,-1)]]),_:1},8,[`onClick`])):v(``,!0),e.payment_status!==`paid`&&e.receipt_status!==`cancelled`?(t(),c(d,{key:2,type:`info`,size:`small`,onClick:t=>xe(e.id)},{default:f(()=>[...i[20]||=[y(` 作废 `,-1)]]),_:1},8,[`onClick`])):v(``,!0)]),_:1})]),_:1},8,[`data`,`loading`]),!n(E).loading&&n(E).purchaseOrders.length===0?(t(),c(x,{key:0,description:`暂无采购订单`})):v(``,!0),o(P,{visible:I.value,"onUpdate:visible":i[5]||=e=>I.value=e,title:(L.value?`编辑`:`新增`)+`采购订单`,width:`800px`,onClosed:Se},{footer:f(()=>[o(d,{onClick:i[4]||=e=>I.value=!1,disabled:V.value},{default:f(()=>[...i[24]||=[y(`取消`,-1)]]),_:1},8,[`disabled`]),o(d,{type:`primary`,loading:V.value,disabled:V.value,onClick:ge},{default:f(()=>[...i[25]||=[y(`保存`,-1)]]),_:1},8,[`loading`,`disabled`])]),default:f(()=>[o(M,{"label-width":`100px`},{default:f(()=>[o(S,{label:`供应商`,required:``},{default:f(()=>[o(u,{modelValue:R.value.supplier_id,"onUpdate:modelValue":i[1]||=e=>R.value.supplier_id=e,placeholder:`请选择供应商`,style:{width:`100%`}},{default:f(()=>[(t(!0),b(m,null,r(n(E).suppliers,e=>(t(),c(s,{key:e.id,label:e.name,value:e.id},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`])]),_:1}),o(S,{label:`预计到货`},{default:f(()=>[o(T,{modelValue:R.value.expected_date,"onUpdate:modelValue":i[2]||=e=>R.value.expected_date=e,type:`date`,placeholder:`选择日期`,style:{width:`100%`},"value-format":`YYYY-MM-DD`},null,8,[`modelValue`])]),_:1}),o(S,{label:`备注`},{default:f(()=>[o(k,{modelValue:R.value.remark,"onUpdate:modelValue":i[3]||=e=>R.value.remark=e,placeholder:`备注信息`},null,8,[`modelValue`])]),_:1})]),_:1}),l(`div`,ne,[i[22]||=l(`span`,{style:{"font-weight":`600`}},`物料明细`,-1),o(d,{type:`primary`,size:`small`,onClick:fe},{default:f(()=>[...i[21]||=[y(`+ 添加物料`,-1)]]),_:1})]),o(_,{data:z.value,border:``,size:`small`},{default:f(()=>[o(h,{label:`物料`,"min-width":`200`},{default:f(({row:e})=>[o(u,{modelValue:e.product_id,"onUpdate:modelValue":t=>e.product_id=t,placeholder:`请选择物料`,style:{width:`100%`}},{default:f(()=>[(t(!0),b(m,null,r(n(E).materials,e=>(t(),c(s,{key:e.id,label:`${e.sku} - ${e.name}`,value:e.id},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`,`onUpdate:modelValue`])]),_:1}),o(h,{label:`数量`,width:`120`},{default:f(({row:e})=>[o(N,{modelValue:e.quantity,"onUpdate:modelValue":t=>e.quantity=t,min:1e-4,step:1e-4,size:`small`,style:{width:`100%`}},null,8,[`modelValue`,`onUpdate:modelValue`])]),_:1}),o(h,{label:`单价`,width:`120`},{default:f(({row:e})=>[o(N,{"model-value":n(E).materials.find(t=>t.id===e.product_id)?.cost_price||0,disabled:``,size:`small`,style:{width:`100%`}},null,8,[`model-value`])]),_:1}),o(h,{label:`总价`,width:`120`},{default:f(({row:e})=>[y(a(n(D)(Number(n(E).materials.find(t=>t.id===e.product_id)?.cost_price||0)*Number(e.quantity||0))),1)]),_:1}),o(h,{label:`备注`,width:`150`},{default:f(({row:e})=>[o(k,{modelValue:e.remark,"onUpdate:modelValue":t=>e.remark=t,size:`small`,placeholder:`备注`},null,8,[`modelValue`,`onUpdate:modelValue`])]),_:1}),o(h,{label:`操作`,width:`80`},{default:f(({$index:e})=>[o(d,{type:`danger`,size:`small`,onClick:t=>pe(e)},{default:f(()=>[...i[23]||=[y(`删除`,-1)]]),_:1},8,[`onClick`])]),_:1})]),_:1},8,[`data`]),l(`div`,re,` 订单总金额:`+a(n(D)(me.value)),1)]),_:1},8,[`visible`,`title`]),o(P,{visible:H.value,"onUpdate:visible":i[9]||=e=>H.value=e,title:`采购到货入库`,width:`700px`,onClosed:Ce},{footer:f(()=>[o(d,{onClick:i[8]||=e=>H.value=!1,disabled:q.value},{default:f(()=>[...i[26]||=[y(`取消`,-1)]]),_:1},8,[`disabled`]),o(d,{type:`primary`,loading:q.value,disabled:q.value,onClick:ye},{default:f(()=>[...i[27]||=[y(`确认入库`,-1)]]),_:1},8,[`loading`,`disabled`])]),default:f(()=>[o(M,{"label-width":`100px`},{default:f(()=>[o(S,{label:`入库仓库`,required:``},{default:f(()=>[o(u,{modelValue:G.value,"onUpdate:modelValue":i[6]||=e=>G.value=e,placeholder:`请选择仓库`,style:{width:`100%`}},{default:f(()=>[(t(!0),b(m,null,r(n(E).warehouses,e=>(t(),c(s,{key:e.id,label:e.name,value:e.id},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`])]),_:1}),o(S,{label:`备注`},{default:f(()=>[o(k,{modelValue:K.value,"onUpdate:modelValue":i[7]||=e=>K.value=e,placeholder:`入库备注`},null,8,[`modelValue`])]),_:1})]),_:1}),o(_,{data:W.value,border:``,size:`small`},{default:f(()=>[o(h,{prop:`material_label`,label:`物料`}),o(h,{prop:`id`,label:`明细ID`,width:`80`}),o(h,{label:`剩余待入库`,width:`100`},{default:f(({row:e})=>[y(a(e.remaining),1)]),_:1}),o(h,{label:`本次入库`,width:`140`},{default:f(({row:e})=>[o(N,{modelValue:e.receive_quantity,"onUpdate:modelValue":t=>e.receive_quantity=t,min:0,max:e.remaining,size:`small`,style:{width:`100%`}},null,8,[`modelValue`,`onUpdate:modelValue`,`max`])]),_:1})]),_:1},8,[`data`])]),_:1},8,[`visible`]),o(P,{visible:J.value,"onUpdate:visible":i[12]||=e=>J.value=e,title:`采购需求推导`,width:`1000px`,onClosed:ue},{footer:f(()=>[o(d,{onClick:i[11]||=e=>J.value=!1},{default:f(()=>[...i[31]||=[y(`关闭`,-1)]]),_:1})]),default:f(()=>[l(`div`,ie,[i[29]||=l(`p`,{style:{"margin-bottom":`8px`,color:`var(--td-text-color-secondary)`}},` 选择销售订单,系统将自动按 BOM 展开物料需求、对比库存、推荐供应商。 `,-1),l(`div`,C,[o(u,{modelValue:Z.value,"onUpdate:modelValue":i[10]||=e=>Z.value=e,multiple:``,placeholder:`请选择销售订单`,style:{flex:`1`},loading:X.value.length===0},{default:f(()=>[(t(!0),b(m,null,r(X.value,e=>(t(),c(s,{key:e.id,label:`${e.order_no} - ${e.customer_name||``}`,value:e.id},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`,`loading`]),o(d,{type:`primary`,loading:Y.value,disabled:!Z.value.length,onClick:le},{default:f(()=>[...i[28]||=[y(` 计算 `,-1)]]),_:1},8,[`loading`,`disabled`])])]),Q.value?(t(),b(m,{key:0},[l(`div`,w,[l(`span`,null,`来源订单:`+a(Q.value.source_order_nos?.join(`, `)||`-`),1),l(`span`,null,[i[30]||=y(`缺货物料:`,-1),o(g,{type:Q.value.shortage_count>0?`danger`:`success`,size:`small`},{default:f(()=>[y(a(Q.value.shortage_count),1)]),_:1},8,[`type`])]),l(`span`,null,`预计采购总额:`+a(n(D)(Number(Q.value.total_estimated_cost||0))),1)]),o(_,{data:Q.value.items||[],stripe:``,border:``,size:`small`,"max-height":`400`},{default:f(()=>[o(h,{prop:`material_sku`,label:`物料SKU`,width:`120`}),o(h,{prop:`material_name`,label:`物料名称`,"min-width":`140`}),o(h,{label:`需求量`,width:`90`},{default:f(({row:e})=>[y(a(e.required_quantity),1)]),_:1}),o(h,{label:`库存量`,width:`90`},{default:f(({row:e})=>[y(a(e.available_quantity),1)]),_:1}),o(h,{label:`缺口`,width:`90`},{default:f(({row:e})=>[o(g,{type:e.shortage_quantity>0?`danger`:`success`,size:`small`},{default:f(()=>[y(a(e.shortage_quantity),1)]),_:2},1032,[`type`])]),_:1}),o(h,{label:`单价`,width:`90`},{default:f(({row:e})=>[y(a(n(D)(Number(e.unit_cost||0))),1)]),_:1}),o(h,{label:`预计金额`,width:`110`},{default:f(({row:e})=>[y(a(n(D)(Number(e.estimated_cost||0))),1)]),_:1}),o(h,{prop:`suggested_supplier_name`,label:`建议供应商`,"min-width":`120`},{default:f(({row:e})=>[y(a(e.suggested_supplier_name||`-`),1)]),_:1}),o(h,{label:`交期(天)`,width:`80`},{default:f(({row:e})=>[y(a(e.supplier_lead_time??`-`),1)]),_:1})]),_:1},8,[`data`]),(Q.value.items||[]).length===0?(t(),c(x,{key:0,description:`无物料需求(BOM 为空或订单无明细)`})):v(``,!0)],64)):v(``,!0)]),_:1},8,[`visible`])])}}});export{T as default}; \ No newline at end of file diff --git a/static/assets/ReleaseView-BKKFXROr.js b/static/assets/ReleaseView-BaSk1AJB.js similarity index 78% rename from static/assets/ReleaseView-BKKFXROr.js rename to static/assets/ReleaseView-BaSk1AJB.js index 14ddbe3..e688551 100644 --- a/static/assets/ReleaseView-BKKFXROr.js +++ b/static/assets/ReleaseView-BaSk1AJB.js @@ -1 +1 @@ -import{D as e,g as t,n,y as r}from"./index-BoystVy-.js";var i={};function a(n,i){return e(),r(`div`,null,[...i[0]||=[t(`div`,{class:`page-header`},[t(`h1`,{class:`page-title`},`灰度发布与回滚`),t(`p`,{class:`page-subtitle`},`迁移中...`)],-1)]])}var o=n(i,[[`render`,a]]);export{o as default}; \ No newline at end of file +import{D as e,g as t,n,y as r}from"./index-Dngmm__P.js";var i={};function a(n,i){return e(),r(`div`,null,[...i[0]||=[t(`div`,{class:`page-header`},[t(`h1`,{class:`page-title`},`灰度发布与回滚`),t(`p`,{class:`page-subtitle`},`迁移中...`)],-1)]])}var o=n(i,[[`render`,a]]);export{o as default}; \ No newline at end of file diff --git a/static/assets/ResultView-NkqMWJoG.js b/static/assets/ResultView-CtyEJhC8.js similarity index 99% rename from static/assets/ResultView-NkqMWJoG.js rename to static/assets/ResultView-CtyEJhC8.js index 46349d2..a5d4cbf 100644 --- a/static/assets/ResultView-NkqMWJoG.js +++ b/static/assets/ResultView-CtyEJhC8.js @@ -1 +1 @@ -import{C as e,D as t,F as n,I as r,L as i,M as a,N as o,O as s,R as c,S as l,T as u,_ as d,c as f,f as ee,g as p,h as m,i as h,j as g,k as _,l as v,m as y,r as b,s as x,u as S,v as C,x as w,y as T}from"./index-BoystVy-.js";import{a as E}from"./utils-COFIQvWo.js";var te={class:`page-container`},ne={class:`page-header`},re={key:1,class:`result-container`},ie={class:`result-header`},ae={class:`result-anchor-nav`},oe=[`href`],se={class:`result-grid result-priority-grid`},ce={class:`summary-header`},le={class:`info-list`},ue={class:`info-item`},de={class:`info-value`,style:{"font-weight":`600`,"font-size":`1.05rem`,color:`var(--text-primary)`}},fe={class:`info-item`},pe={class:`info-value`},me={class:`info-item`},he={class:`info-value`},ge={class:`info-item`},_e={class:`info-value`},ve={class:`info-item`},ye={class:`info-value`},D={class:`info-item`},O={class:`info-value`},k={class:`summary-header`},A={class:`info-list`},j={class:`info-item`},M={class:`info-value`},N={class:`info-item`},P={class:`info-value`},be={class:`info-item`},xe={class:`info-value`},Se={class:`info-item`},Ce={class:`info-value`},we={class:`info-item`},Te={class:`info-value`},Ee={key:1,class:`result-card result-card-highlight`},De={class:`summary-header`},Oe={class:`info-list`},ke={class:`info-item`},Ae={class:`info-value`,style:{"font-weight":`500`}},je={key:0,class:`export-buttons-bar`,style:{display:`flex`,gap:`var(--space-2)`,"flex-wrap":`wrap`,"justify-content":`center`,padding:`var(--space-3) 0`}},Me={key:1,id:`preview-3d`,class:`viewer-section viewer-section-hero`},Ne={class:`summary-header`},Pe=[`src`],Fe={key:2,id:`preview-3d-placeholder`,class:`viewer-section viewer-section-hero`},Ie={class:`summary-header`},Le={key:3,id:`candidate-schemes`,class:`viewer-section diagnostic-panel`,style:{"margin-top":`var(--space-3)`}},Re={class:`result-card full-width diagnostic-panel-body`},ze={key:0,style:{color:`var(--primary-color)`,"font-weight":`600`}},Be={key:1,style:{color:`var(--warning-color)`,"font-weight":`600`}},Ve={id:`ai-side-action`,class:`viewer-section`},He={class:`summary-header`},Ue={key:0,class:`result-grid`},We={class:`result-card`},Ge={class:`info-list`},Ke={class:`info-item`},qe={class:`info-value`},Je={class:`info-item`},Ye={class:`info-value`},Xe={class:`info-item`},Ze={class:`info-value`},Qe={class:`info-item`},$e={class:`info-value`},et={class:`result-card result-card-highlight`},tt={class:`info-list`},nt={class:`info-item`},rt={class:`info-value`},it={class:`info-item`},at={class:`info-value`},ot={key:0,class:`info-item`},st={class:`info-value`},ct={class:`info-item`},lt={class:`info-value`},ut={class:`inline-note`,style:{"margin-top":`var(--space-2)`,"font-weight":`600`,"font-size":`1rem`,color:`var(--text-primary)`}},dt={class:`result-card`},ft={key:0},pt={class:`recommendations-list`},mt={class:`recommendation-text`},ht={key:1,style:{"margin-top":`var(--space-3)`}},gt={class:`recommendations-list`},_t={class:`recommendation-text`},vt={key:2,style:{"margin-top":`var(--space-3)`}},yt={class:`recommendations-list`},bt={class:`recommendation-text`},xt={id:`export-cam`,class:`viewer-section`},St={class:`summary-header`},Ct={class:`result-card`,style:{"margin-bottom":`var(--space-4)`}},wt={class:`info-list`},Tt={class:`info-item`},Et={class:`info-item`},Dt={class:`info-item`},Ot={class:`info-item`},kt={class:`checkbox-group`},At={class:`result-grid`},jt={class:`result-card`},Mt={class:`info-list`},Nt={class:`info-item`},Pt={class:`info-value`},Ft={class:`info-item`},It={class:`info-value`},Lt={class:`info-item`},Rt={class:`info-value`},zt={class:`info-item`},Bt={class:`info-value`},Vt={class:`result-card`},Ht={class:`info-list`},Ut={class:`info-item`},Wt={class:`info-value`},Gt={class:`info-item`},Kt={class:`info-value`},qt={class:`result-card full-width`},Jt={class:`result-card full-width`},Yt={class:`recommendations-list`},Xt={class:`recommendation-text`},Zt={id:`cost-estimate`,class:`viewer-section`},Qt={class:`summary-header`},$t={class:`result-card`,style:{"margin-bottom":`var(--space-3)`}},en={class:`result-grid`},tn={class:`result-card result-card-highlight`},nn={class:`info-list`},rn={class:`info-item`},an={class:`info-value`,style:{"font-size":`1.2rem`,"font-weight":`700`,color:`var(--primary-color)`}},on={class:`info-item`},sn={class:`info-value`},cn={class:`info-item`},ln={class:`info-value`},un={class:`info-item`},dn={class:`info-value`},fn={class:`result-card`},pn={class:`info-list`},mn={class:`info-item`},hn={class:`info-value`,style:{"font-size":`1.1rem`,"font-weight":`600`,color:`var(--warning-color)`}},gn={class:`info-item`},_n={class:`info-value`},vn={class:`info-item`},yn={class:`info-value`},bn={class:`info-item`},xn={class:`info-value`},Sn={key:0,class:`result-card full-width`,style:{"margin-top":`var(--space-3)`}},Cn={class:`recommendations-list`},wn={class:`recommendation-text`},Tn={key:4,id:`llm-report`,class:`viewer-section`},En={class:`summary-header`},Dn={key:0,class:`inline-note`,style:{"margin-bottom":`var(--space-4)`,"font-size":`0.95rem`,color:`var(--text-primary)`}},On={class:`result-grid`},kn={key:0,class:`recommendations-list`},An={class:`recommendation-text`},jn={key:2,class:`recommendations-list`},Mn={class:`recommendation-text`},Nn={key:3,class:`inline-note`},F=e({__name:`ResultView`,setup(e){let F=v(),I=S(),L=f(),R=o({task:null,loading:!0,error:``,selectedSchemeId:null,previewStatus:`idle`,camLoading:!1,camError:``,camPlan:null,camForm:{mold_steel:`P20`,surface_quality:`standard`,controller:`fanuc`,include_gcode:!1},creatingProduct:!1,costLoading:!1,costError:``,costResult:null}),Pn=[{value:`P20`,label:`P20`},{value:`718H`,label:`718H`},{value:`NAK80`,label:`NAK80`},{value:`S136`,label:`S136`},{value:`H13`,label:`H13`}],Fn=[{value:`standard`,label:`标准`},{value:`fine`,label:`精细`},{value:`mirror`,label:`镜面`}],In=[{value:`fanuc`,label:`Fanuc`},{value:`siemens`,label:`Siemens`}],Ln=async()=>{try{R.task=await x(`/api/status/${F.params.taskId}`,{method:`POST`}),R.task?.best_scheme_id?R.selectedSchemeId=R.task.best_scheme_id:R.task?.candidate_schemes?.length&&(R.selectedSchemeId=R.task.candidate_schemes[0].scheme_id);let e=R.task?.cam_preferences||{};R.camForm.mold_steel=e.mold_steel||`P20`,R.camForm.surface_quality=e.surface_quality||`standard`,R.camForm.controller=e.controller||`fanuc`,R.camForm.include_gcode=!!e.include_gcode,R.previewStatus=`loading`}catch(e){R.error=h(e,`加载任务详情`)}finally{R.loading=!1}},Rn=async()=>{let e=F.params.taskId;try{R.creatingProduct=!0;let t=await x(`/api/products/from-task/${e}`,{method:`POST`});b(`已创建成品:${t.name}(SKU: ${t.sku})`,`success`)}catch(e){h(e,`创建成品`)}finally{R.creatingProduct=!1}};u(()=>{if(!L.user){I.push(`/login`);return}Ln()});let z=m(()=>R.task?.candidate_schemes||[]);m(()=>z.value.length===1);let B=m(()=>z.value.length?z.value.find(e=>e.scheme_id===R.selectedSchemeId)||z.value[0]:null),V=m(()=>B.value?.cavity_data||R.task?.cavity_data||null),zn=m(()=>B.value?.key_info||R.task?.key_info||null),H=m(()=>B.value?.html_file||R.task?.html_file||``),U=m(()=>B.value?.dfm_violations||[]),Bn=m(()=>V.value?.injection_system||R.task?.plan_result?.injection_system||null),Vn=m(()=>B.value?.side_actions||V.value?.side_actions||R.task?.side_actions||null),Hn=e=>{let t=String(e||``).match(/\s*([\s\S]*?)\s*/);if(!t)return null;try{return JSON.parse(t[1])}catch(e){return console.warn(`AI 倒扣分析解析失败:`,e),null}},W=e=>{let t=String(e||``).match(/\s*([\s\S]*?)\s*/);if(!t)return null;try{return JSON.parse(t[1])}catch(e){return console.warn(`LLM 设计报告解析失败:`,e),null}},G=(e,t=`ai`)=>{if(!e||typeof e!=`object`)return null;let n=[`required`,`not_required`,`manual_review`].includes(e.status)?e.status:`manual_review`,r=[`slider`,`lifter`,`mixed`,`none`,`manual_review`].includes(e.mechanism_recommendation)?e.mechanism_recommendation:`manual_review`,i=Number(e.confidence),a={required:`需要倒扣/抽芯`,not_required:`无需倒扣/抽芯`,manual_review:`需人工确认`};return{source:t,status:n,statusLabel:a[n],mechanismRecommendation:r,mechanismLabel:{slider:`优先滑块`,lifter:`优先斜顶`,mixed:`滑块 + 斜顶`,none:`无需侧向机构`,manual_review:`人工评审`}[r],confidence:Number.isFinite(i)?Math.max(0,Math.min(i,1)):null,conclusion:e.conclusion||a[n],summary:e.summary||``,reasons:Array.isArray(e.reasons)?e.reasons.filter(Boolean).slice(0,5):[],standardAdvice:Array.isArray(e.standard_advice)?e.standard_advice.filter(Boolean).slice(0,5):[],manualReviewItems:Array.isArray(e.manual_review_items)?e.manual_review_items.filter(Boolean).slice(0,4):[]}},Un=m(()=>{let e=Vn.value;if(!e||typeof e!=`object`)return null;let t=e.summary||{},n=(e.slider_mechanisms||[]).length,r=(e.lifter_mechanisms||[]).length,i=n+r,a=n&&r?`mixed`:n?`slider`:r?`lifter`:`none`,o=i>0?`required`:t.total_undercut_faces===0?`not_required`:`manual_review`;return G({status:o,confidence:.55,conclusion:o===`required`?`规则分析判断当前产品需要倒扣/抽芯机构`:o===`not_required`?`规则分析未发现必须采用倒扣/抽芯机构的特征`:`当前规则结果不足以完成稳定判断,建议人工复核`,mechanism_recommendation:a===`none`?`none`:a,summary:o===`required`?`检测到 ${n} 个滑块需求、${r} 个斜顶需求,建议先按标准机构路线做结构评审。`:o===`not_required`?`当前方案未发现明显倒扣特征,可优先按常规模具结构推进。`:`现有数据可用于初筛,但不足以替代工程师对复杂倒扣的最终确认。`,reasons:[i>0?`规则分析识别出 ${i} 处侧向机构需求`:`规则分析未识别出明确侧向机构需求`,t.complexity?`当前复杂度判定为 ${t.complexity}`:`当前复杂度信息不足`,`当前倒扣方案若存在大行程滑块,优先按气动抽芯条件评估`].filter(Boolean),standard_advice:(e.recommendations||[]).slice(0,4),manual_review_items:[`结合 3D 预览复核倒扣是否可通过改产品取消`,`确认侧向机构与顶出、冷却、分型面是否存在干涉`]},`rules`)});m(()=>{let e={critical:0,high:0,medium:0,low:0};return(U.value||[]).forEach(t=>{let n=String(t.level||`medium`).toLowerCase();e[n]===void 0?e.medium+=1:e[n]+=1}),e});let K=m(()=>G(Hn(R.task?.llm_report||``),`ai`)||Un.value),q=m(()=>{let e=B.value?.side_actions?.summary||{};return{total_slider_count:e.total_slider_count??0,total_lifter_count:e.total_lifter_count??0,total_mechanism_count:e.total_mechanism_count??0,complexity:e.complexity||`未知`}}),J=m(()=>W(R.task?.llm_report||``)),Wn=m(()=>J.value&&(J.value.sections&&J.value.sections.length>0||!!J.value.overview)),Gn=m(()=>(J.value?.sections||[]).filter(e=>e.type===`issues`?e.items?.length>0:e.type===`params_table`?e.rows?.length>0:e.type===`recommendations`?e.items?.length>0:!0));m(()=>{let e=R.task?.stage_timings||{};return Object.entries(e).filter(([,e])=>typeof e==`number`).sort((e,t)=>t[1]-e[1])});let Kn=m(()=>{let e={critical:0,high:1,medium:2,low:3};return[...R.task?.analysis_result?.design_recommendations||[]].sort((t,n)=>(e[t.priority]??99)-(e[n.priority]??99))});m(()=>Kn.value[0]||null);let Y=m(()=>U.value?.length||0),qn=m(()=>{let e=V.value?.mold_cavities?.cavity_count;if(typeof e==`number`)return e;let t=V.value?.mold_cavities||zn.value?.mold_cavities||{};return t.cavity_count||Object.keys(t).filter(e=>e.startsWith(`cavity_`)).length||1});m(()=>Y.value?Y.value>=4?`高风险`:Y.value>=2?`中风险`:`低风险`:`低风险`);let Jn=[{id:`candidate-schemes`,label:`方案`},{id:`preview-3d`,label:`预览`},{id:`ai-side-action`,label:`AI倒扣分析`},{id:`export-cam`,label:`CAM/CNC`},{id:`cost-estimate`,label:`成本估算`},{id:`llm-report`,label:`设计报告`}],Yn=e=>e.map((e,t)=>{let n={_rowId:t};return e.forEach((e,t)=>{n[`col_`+t]=e}),n}),X=e=>{e&&(R.selectedSchemeId=e),R.previewStatus=`loading`,R.camPlan=null,R.camError=``},Xn=()=>{R.previewStatus=`loaded`},Zn=()=>{R.previewStatus=`error`},Z=e=>{if(!e)return`N/A`;if(e.parting?.axis)return`${e.parting.axis} 轴`;let t=e.parting?.direction;return Array.isArray(t)?`[${t.map(e=>Number(e).toFixed(2)).join(`, `)}]`:`N/A`};m(()=>R.task?.analysis_result?.detected_features||[]);let Qn=async(e,t)=>{let n={};L.token&&(n.Authorization=`Bearer ${L.token}`);let r=await fetch(e,{headers:n});if(!r.ok)throw Error(`下载失败 (${r.status}): 无法下载,需要授权`);let i=await r.blob(),a=URL.createObjectURL(i),o=document.createElement(`a`);o.href=a,o.download=t,document.body.appendChild(o),o.click(),document.body.removeChild(o),URL.revokeObjectURL(a)},Q=async e=>{try{let t=F.params.taskId,n=await x(`/api/export-mold`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({task_id:t,scheme_id:B.value?.scheme_id||R.selectedSchemeId,formats:[e],components:[`cavity`,`core`,`parting_surface`]})});if(n.status===`success`&&n.data.files){for(let e of n.data.files){let n=e.relative_path||(e.filepath?e.filepath.replace(/\\/g,`/`).split(`/`).slice(-2).join(`/`):``);await Qn(e.download_path||`/api/export-download/${encodeURI(n)}?task_id=${encodeURIComponent(t)}`,e.filename)}b(`已导出 ${n.data.files.length} 个 ${e.toUpperCase()} 文件`,`success`)}else n.data.errors&&n.data.errors.length>0&&b(`导出失败: ${n.data.errors[0]}`,`error`)}catch(e){b(`导出失败: ${e.message}`,`error`)}},$n=async()=>{try{R.camLoading=!0,R.camError=``;let e={task_id:F.params.taskId,scheme_id:B.value?.scheme_id,mold_steel:R.camForm.mold_steel,surface_quality:R.camForm.surface_quality,controller:R.camForm.controller,include_gcode:R.camForm.include_gcode},t=await x(`/api/cam/plan`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});R.camPlan=t?.data||null,t?.cam_preferences&&(R.camForm.mold_steel=t.cam_preferences.mold_steel||R.camForm.mold_steel,R.camForm.surface_quality=t.cam_preferences.surface_quality||R.camForm.surface_quality,R.camForm.controller=t.cam_preferences.controller||R.camForm.controller,R.camForm.include_gcode=!!t.cam_preferences.include_gcode),b(`CAM 计划生成完成`,`success`)}catch(e){R.camPlan=null,R.camError=e.message||`CAM 计划生成失败`,b(`CAM 计划生成失败: ${R.camError}`,`error`)}finally{R.camLoading=!1}},$=async()=>{try{R.costLoading=!0,R.costError=``;let e=F.params.taskId,t=await x(`/api/cost-estimate`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({task_id:e})});R.costResult=t?.data||null,b(t?.data?.source===`ai`?`AI 成本估算完成`:`规则成本估算完成`,`success`)}catch(e){R.costResult=null,R.costError=e.message||`成本估算失败`,b(`成本估算失败: ${R.costError}`,`error`)}finally{R.costLoading=!1}};return(e,o)=>{let u=_(`t-button`),f=_(`t-alert`),m=_(`t-tag`),h=_(`t-table-column`),v=_(`t-table`),b=_(`t-option`),x=_(`t-select`),S=_(`t-loading`);return t(),T(`div`,te,[p(`div`,ne,[l(u,{variant:`text`,onClick:o[0]||=e=>n(I).back()},{default:g(()=>[...o[14]||=[p(`svg`,{width:`16`,height:`16`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2.2`,"stroke-linecap":`round`,"stroke-linejoin":`round`},[p(`path`,{d:`M19 12H5M12 19l-7-7 7-7`})],-1),w(` 返回 `,-1)]]),_:1}),o[15]||=p(`h1`,null,`分析结果`,-1)]),l(S,{loading:R.loading,text:`加载中...`},{default:g(()=>[R.error?(t(),d(f,{key:0,theme:`error`,message:R.error},null,8,[`message`])):R.task?(t(),T(`div`,re,[p(`div`,ie,[p(`h2`,null,c(R.task.filename),1),l(m,{type:R.task.status===`completed`?`success`:`danger`},{default:g(()=>[w(c(R.task.status),1)]),_:1},8,[`type`])]),p(`div`,ae,[(t(),T(y,null,s(Jn,e=>p(`a`,{key:e.id,class:`anchor-pill`,href:`#`+e.id},c(e.label),9,oe)),64))]),p(`div`,se,[p(`div`,{class:`result-card result-card-highlight`,style:{cursor:`pointer`},onClick:o[1]||=e=>X(B.value?.scheme_id)},[p(`div`,ce,[o[16]||=p(`h3`,null,`推荐方案`,-1),l(m,{theme:`primary`},{default:g(()=>[w(c(B.value?.title||B.value?.scheme_id||`方案待定`),1)]),_:1})]),p(`div`,le,[p(`div`,ue,[o[17]||=p(`span`,{class:`info-label`},`方案说明`,-1),p(`span`,de,c(B.value?.summary||B.value?.reason||`基于当前几何与制造约束自动推荐`),1)]),p(`div`,fe,[o[18]||=p(`span`,{class:`info-label`},`分型方向`,-1),p(`span`,pe,c(Z(B.value)),1)]),p(`div`,me,[o[19]||=p(`span`,{class:`info-label`},`模具结构`,-1),p(`span`,he,c(B.value?.mold_structure_type===`two_half_cavity`?`两板半腔(无独立模芯)`:`型腔 + 模芯`),1)]),p(`div`,ge,[o[20]||=p(`span`,{class:`info-label`},`分型面位置`,-1),p(`span`,_e,c(B.value?.offset_label||`中面`),1)]),p(`div`,ve,[o[21]||=p(`span`,{class:`info-label`},`型腔数`,-1),p(`span`,ye,c(qn.value)+` 腔`,1)]),p(`div`,D,[o[22]||=p(`span`,{class:`info-label`},`预计成型周期`,-1),p(`span`,O,c(Bn.value?.overall_assessment?.estimated_cycle_time||`N/A`)+` s`,1)])])]),z.value.length>1?(t(),T(`div`,{key:0,class:`result-card result-card-highlight`,style:{cursor:`pointer`},onClick:o[2]||=e=>X(z.value[1]?.scheme_id)},[p(`div`,k,[o[24]||=p(`h3`,null,`备选方案`,-1),l(m,{theme:`warning`},{default:g(()=>[...o[23]||=[w(`1 个备选`,-1)]]),_:1})]),p(`div`,A,[(t(!0),T(y,null,s(z.value.slice(1,2),e=>(t(),T(y,{key:`alt-`+e.scheme_id},[p(`div`,j,[o[25]||=p(`span`,{class:`info-label`},`方案说明`,-1),p(`span`,M,c(e.summary||e.reason||`暂无说明`),1)]),p(`div`,N,[o[26]||=p(`span`,{class:`info-label`},`分型方向`,-1),p(`span`,P,c(Z(e)),1)]),p(`div`,be,[o[27]||=p(`span`,{class:`info-label`},`模具结构`,-1),p(`span`,xe,c(e.mold_structure_type===`two_half_cavity`?`两板半腔(无独立模芯)`:`型腔 + 模芯`),1)]),p(`div`,Se,[o[28]||=p(`span`,{class:`info-label`},`分型面位置`,-1),p(`span`,Ce,c(e.offset_label||`中面`),1)]),p(`div`,we,[o[29]||=p(`span`,{class:`info-label`},`方案总分`,-1),p(`span`,Te,c(n(E)(e.score)),1)])],64))),128))])])):(t(),T(`div`,Ee,[p(`div`,De,[o[31]||=p(`h3`,null,`方案概览`,-1),l(m,{theme:`success`},{default:g(()=>[...o[30]||=[w(`单一方案`,-1)]]),_:1})]),p(`div`,Oe,[p(`div`,ke,[o[32]||=p(`span`,{class:`info-label`},`详细方案说明`,-1),p(`span`,Ae,c(B.value?.summary||B.value?.reason||`当前仅生成 1 套可用分模方案,已在推荐方案区域展示核心参数。`),1)])])]))]),R.task.status===`completed`?(t(),T(`div`,je,[l(u,{type:`primary`,size:`small`,onClick:o[3]||=e=>Q(`step`),title:`导出装配体STEP格式(UG/FreeCAD/SolidWorks通用)`},{default:g(()=>[...o[33]||=[w(` 📦 导出 STEP `,-1)]]),_:1}),l(u,{type:`default`,size:`small`,onClick:o[4]||=e=>Q(`iges`),title:`导出IGES格式(兼容旧系统)`},{default:g(()=>[...o[34]||=[w(` 导出 IGES `,-1)]]),_:1}),l(u,{type:`default`,size:`small`,onClick:o[5]||=e=>Q(`stl`),title:`导出STL网格格式(3D打印预览)`},{default:g(()=>[...o[35]||=[w(` 导出 STL `,-1)]]),_:1}),l(u,{type:`default`,size:`small`,onClick:o[6]||=e=>Q(`brep`),title:`导出BRep格式(FreeCAD原生)`},{default:g(()=>[...o[36]||=[w(` 导出 BRep `,-1)]]),_:1}),l(u,{type:`default`,size:`small`,onClick:Rn,loading:R.creatingProduct,title:`将本次模具分析创建为进销存成品,可在进销存模块继续配置 BOM / 销售`},{default:g(()=>[...o[37]||=[w(` 📋 创建为成品 `,-1)]]),_:1},8,[`loading`]),l(u,{type:`default`,size:`small`,onClick:$,loading:R.costLoading,title:`估算模具造价与单件成本`},{default:g(()=>[...o[38]||=[w(` 💰 成本估算 `,-1)]]),_:1},8,[`loading`])])):C(``,!0),H.value?(t(),T(`div`,Me,[p(`div`,Ne,[o[40]||=p(`h3`,null,`3D 预览`,-1),l(m,{theme:`primary`},{default:g(()=>[...o[39]||=[w(`重点区域`,-1)]]),_:1})]),R.previewStatus===`error`?(t(),d(f,{key:0,theme:`warning`,title:`预览加载失败`,message:`HTML 已生成但加载异常,请检查该链接是否可访问:`+H.value,style:{"margin-bottom":`var(--space-3)`}},null,8,[`message`])):C(``,!0),(t(),T(`iframe`,{key:H.value,src:H.value,class:`viewer-frame viewer-frame-hero`,onLoad:Xn,onError:Zn},null,40,Pe))])):(t(),T(`div`,Fe,[p(`div`,Ie,[o[42]||=p(`h3`,null,`3D 预览`,-1),l(m,{theme:`warning`},{default:g(()=>[...o[41]||=[w(`未生成`,-1)]]),_:1})]),l(f,{theme:`warning`,title:`预览未生成`,message:`当前任务没有返回 HTML 预览链接,属于未生成状态。`})])),z.value.length>1?(t(),T(`div`,Le,[o[43]||=p(`summary`,null,`📊 方案对比`,-1),p(`div`,Re,[l(v,{data:z.value.slice(0,2),"row-key":`scheme_id`,stripe:``,hover:``,onRowClick:o[7]||=e=>X(e.row.scheme_id)},{default:g(()=>[l(h,{title:`方案`},{default:g(({rowIndex:e})=>[e===0?(t(),T(`span`,ze,`★ 推荐方案`)):(t(),T(`span`,Be,`备选方案`))]),_:1}),l(h,{title:`方向`},{default:g(({row:e})=>[w(c(Z(e)),1)]),_:1}),l(h,{title:`位置`},{default:g(({row:e})=>[w(c(e.offset_label||`中面`),1)]),_:1}),l(h,{title:`总分`},{default:g(({row:e})=>[w(c(n(E)(e.score)),1)]),_:1}),l(h,{title:`可制造性`},{default:g(({row:e})=>[w(c(n(E)(e.score_breakdown?.manufacturability||0)),1)]),_:1}),l(h,{title:`分型质量`},{default:g(({row:e})=>[w(c(n(E)(e.score_breakdown?.parting_quality||0)),1)]),_:1}),l(h,{title:`倒扣数`},{default:g(({row:e})=>[w(c(e.key_info?.quality_considerations?.undercut_count||0),1)]),_:1}),l(h,{title:`锁模力`},{default:g(({row:e})=>[w(c(e.cavity_data?.manufacturing_info?.estimated_clamping_force||`N/A`),1)]),_:1})]),_:1},8,[`data`])])])):C(``,!0),p(`div`,Ve,[p(`div`,He,[o[45]||=p(`h3`,null,`AI 倒扣与抽芯分析`,-1),K.value?(t(),d(m,{key:0,type:K.value.status===`required`?`danger`:K.value.status===`not_required`?`success`:`warning`},{default:g(()=>[w(c(K.value.statusLabel),1)]),_:1},8,[`type`])):(t(),d(m,{key:1,theme:`warning`},{default:g(()=>[...o[44]||=[w(`未生成`,-1)]]),_:1}))]),K.value?(t(),T(`div`,Ue,[p(`div`,We,[o[50]||=p(`h4`,null,`规则检测摘要`,-1),p(`div`,Ge,[p(`div`,Ke,[o[46]||=p(`span`,{class:`info-label`},`检测状态`,-1),p(`span`,qe,c(q.value.total_mechanism_count>0?`检测到倒扣`:`未检测到倒扣`),1)]),p(`div`,Je,[o[47]||=p(`span`,{class:`info-label`},`滑块数量`,-1),p(`span`,Ye,c(q.value.total_slider_count||0),1)]),p(`div`,Xe,[o[48]||=p(`span`,{class:`info-label`},`斜顶数量`,-1),p(`span`,Ze,c(q.value.total_lifter_count||0),1)]),p(`div`,Qe,[o[49]||=p(`span`,{class:`info-label`},`复杂度`,-1),p(`span`,$e,c(q.value.complexity||`未知`),1)])])]),p(`div`,et,[o[55]||=p(`h4`,null,`AI 结论`,-1),p(`div`,tt,[p(`div`,nt,[o[51]||=p(`span`,{class:`info-label`},`判断结果`,-1),p(`span`,rt,c(K.value.conclusion),1)]),p(`div`,it,[o[52]||=p(`span`,{class:`info-label`},`推荐方案`,-1),p(`span`,at,c(K.value.mechanismLabel),1)]),K.value.confidence==null?C(``,!0):(t(),T(`div`,ot,[o[53]||=p(`span`,{class:`info-label`},`置信度`,-1),p(`span`,st,c(Math.round(K.value.confidence*100))+`%`,1)])),p(`div`,ct,[o[54]||=p(`span`,{class:`info-label`},`分析来源`,-1),p(`span`,lt,c(K.value.source===`ai`?`AI 模型`:`规则回退`),1)])]),p(`div`,ut,c(K.value.summary||`当前任务未返回更多摘要。`),1)]),p(`div`,dt,[K.value.reasons.length?(t(),T(`div`,ft,[o[56]||=p(`h4`,null,`判断依据`,-1),p(`div`,pt,[(t(!0),T(y,null,s(K.value.reasons,(e,n)=>(t(),T(`div`,{class:`recommendation-item medium`,key:`ai-reason-`+n},[p(`div`,mt,c(e),1)]))),128))])])):C(``,!0),K.value.standardAdvice.length?(t(),T(`div`,ht,[o[57]||=p(`h4`,null,`标准化建议`,-1),p(`div`,gt,[(t(!0),T(y,null,s(K.value.standardAdvice,(e,n)=>(t(),T(`div`,{class:`recommendation-item low`,key:`ai-advice-`+n},[p(`div`,_t,c(e),1)]))),128))])])):C(``,!0),K.value.manualReviewItems.length?(t(),T(`div`,vt,[o[58]||=p(`h4`,null,`人工复核项`,-1),p(`div`,yt,[(t(!0),T(y,null,s(K.value.manualReviewItems,(e,n)=>(t(),T(`div`,{class:`recommendation-item medium`,key:`ai-review-`+n},[p(`div`,bt,c(e),1)]))),128))])])):C(``,!0)])])):(t(),d(f,{key:1,theme:`warning`,title:`AI 结论未生成`,message:`当前任务未生成倒扣与抽芯 AI 分析,请检查模型配置或重新运行分析。`}))]),p(`div`,xt,[p(`div`,St,[o[60]||=p(`h3`,null,`CAM 与 CNC 加工`,-1),l(m,{theme:`primary`},{default:g(()=>[...o[59]||=[w(`工艺规划`,-1)]]),_:1})]),p(`div`,Ct,[o[66]||=p(`h4`,null,`CAM 参数`,-1),p(`div`,wt,[p(`div`,Tt,[o[61]||=p(`span`,{class:`info-label`},`模具钢`,-1),l(x,{modelValue:R.camForm.mold_steel,"onUpdate:modelValue":o[8]||=e=>R.camForm.mold_steel=e,style:{width:`200px`}},{default:g(()=>[(t(),T(y,null,s(Pn,e=>l(b,{key:`steel-`+e.value,value:e.value,label:e.label},null,8,[`value`,`label`])),64))]),_:1},8,[`modelValue`])]),p(`div`,Et,[o[62]||=p(`span`,{class:`info-label`},`表面质量`,-1),l(x,{modelValue:R.camForm.surface_quality,"onUpdate:modelValue":o[9]||=e=>R.camForm.surface_quality=e,style:{width:`200px`}},{default:g(()=>[(t(),T(y,null,s(Fn,e=>l(b,{key:`surf-`+e.value,value:e.value,label:e.label},null,8,[`value`,`label`])),64))]),_:1},8,[`modelValue`])]),p(`div`,Dt,[o[63]||=p(`span`,{class:`info-label`},`控制器`,-1),l(x,{modelValue:R.camForm.controller,"onUpdate:modelValue":o[10]||=e=>R.camForm.controller=e,style:{width:`200px`}},{default:g(()=>[(t(),T(y,null,s(In,e=>l(b,{key:`ctrl-`+e.value,value:e.value,label:e.label},null,8,[`value`,`label`])),64))]),_:1},8,[`modelValue`])]),p(`div`,Ot,[o[65]||=p(`span`,{class:`info-label`},`包含G代码`,-1),p(`label`,kt,[a(p(`input`,{type:`checkbox`,class:`checkbox-input`,"onUpdate:modelValue":o[11]||=e=>R.camForm.include_gcode=e},null,512),[[ee,R.camForm.include_gcode]]),o[64]||=p(`span`,{class:`checkbox-label`},`返回G代码文本`,-1)])])]),l(u,{type:`primary`,size:`small`,disabled:R.camLoading,onClick:o[12]||=e=>$n(),style:{"margin-top":`var(--space-2)`},title:`基于当前选中方案生成CAM工艺计划`},{default:g(()=>[w(c(R.camLoading?`⏳ 生成中...`:`🔧 生成 CAM 计划`),1)]),_:1},8,[`disabled`])]),R.camError?(t(),d(f,{key:0,theme:`warning`,title:`CAM 计划生成失败`,message:R.camError},null,8,[`message`])):R.camPlan?(t(),T(y,{key:2},[p(`div`,At,[p(`div`,jt,[o[71]||=p(`h4`,null,`计划摘要`,-1),p(`div`,Mt,[p(`div`,Nt,[o[67]||=p(`span`,{class:`info-label`},`方案ID`,-1),p(`span`,Pt,c(R.camPlan.scheme_id||`N/A`),1)]),p(`div`,Ft,[o[68]||=p(`span`,{class:`info-label`},`总工序数`,-1),p(`span`,It,c(R.camPlan.summary?.total_operations||0),1)]),p(`div`,Lt,[o[69]||=p(`span`,{class:`info-label`},`预计总时长`,-1),p(`span`,Rt,c(n(E)(R.camPlan.summary?.total_estimated_time_min||0))+` min`,1)]),p(`div`,zt,[o[70]||=p(`span`,{class:`info-label`},`方案可信度`,-1),p(`span`,Bt,c(n(E)(R.camPlan.confidence?.score||0)),1)])])]),p(`div`,Vt,[o[74]||=p(`h4`,null,`刀具建议`,-1),p(`div`,Ht,[p(`div`,Ut,[o[72]||=p(`span`,{class:`info-label`},`粗加工刀具`,-1),p(`span`,Wt,c(R.camPlan.tooling_suggestion?.roughing_tool?.tool_id||`N/A`),1)]),p(`div`,Gt,[o[73]||=p(`span`,{class:`info-label`},`精加工刀具`,-1),p(`span`,Kt,c(R.camPlan.tooling_suggestion?.finishing_tool?.tool_id||`N/A`),1)])])])]),p(`div`,qt,[o[75]||=p(`h4`,null,`工序计划`,-1),l(v,{data:R.camPlan.process_plan||[],"row-key":`seq`,stripe:``},{default:g(()=>[l(h,{colKey:`seq`,title:`序号`}),l(h,{colKey:`operation`,title:`工序`}),l(h,{title:`刀具`},{default:g(({row:e})=>[w(c(e.tool_id||`N/A`),1)]),_:1}),l(h,{title:`主轴转速`},{default:g(({row:e})=>[w(c(n(E)(e.spindle_speed_rpm||0)),1)]),_:1}),l(h,{title:`进给率`},{default:g(({row:e})=>[w(c(n(E)(e.feed_rate_mm_min||0)),1)]),_:1}),l(h,{title:`预计时长(min)`},{default:g(({row:e})=>[w(c(n(E)(e.estimated_time_min||0)),1)]),_:1})]),_:1},8,[`data`])]),p(`div`,Jt,[o[76]||=p(`h4`,null,`制造风险提示`,-1),p(`div`,Yt,[(t(!0),T(y,null,s(R.camPlan.manufacturing_warnings||[],(e,n)=>(t(),T(`div`,{class:`recommendation-item medium`,key:`cam-warn-`+n},[p(`div`,Xt,c(e),1)]))),128))])])],64)):(t(),d(f,{key:1,theme:`warning`,title:`尚未生成 CAM 计划`,message:`点击上方"生成 CAM 计划"后,将返回工序计划、刀具建议与制造风险提示。`}))]),p(`div`,Zt,[p(`div`,Qt,[o[78]||=p(`h3`,null,`成本估算`,-1),R.costResult?(t(),d(m,{key:0,type:R.costResult.source===`ai`?`success`:`warning`},{default:g(()=>[w(c(R.costResult.source===`ai`?`AI 估算`:`规则估算`),1)]),_:1},8,[`type`])):(t(),d(m,{key:1,theme:`primary`},{default:g(()=>[...o[77]||=[w(`待生成`,-1)]]),_:1}))]),p(`div`,$t,[l(u,{type:`primary`,size:`small`,disabled:R.costLoading,onClick:o[13]||=e=>$(),title:`基于当前方案估算模具造价与单件成本`},{default:g(()=>[w(c(R.costLoading?`⏳ 估算中...`:`💰 生成成本估算`),1)]),_:1},8,[`disabled`])]),R.costError?(t(),d(f,{key:0,theme:`warning`,title:`成本估算失败`,message:R.costError},null,8,[`message`])):C(``,!0),R.costResult?(t(),T(y,{key:1},[p(`div`,en,[p(`div`,tn,[o[83]||=p(`h4`,null,`模具造价`,-1),p(`div`,nn,[p(`div`,rn,[o[79]||=p(`span`,{class:`info-label`},`总造价`,-1),p(`span`,an,c(R.costResult.total_mold_cost),1)]),p(`div`,on,[o[80]||=p(`span`,{class:`info-label`},`材料费`,-1),p(`span`,sn,c(R.costResult.mold_cost.material),1)]),p(`div`,cn,[o[81]||=p(`span`,{class:`info-label`},`加工费`,-1),p(`span`,ln,c(R.costResult.mold_cost.machining),1)]),p(`div`,un,[o[82]||=p(`span`,{class:`info-label`},`复杂度系数`,-1),p(`span`,dn,c(R.costResult.mold_cost.complexity_factor),1)])])]),p(`div`,fn,[o[88]||=p(`h4`,null,`单件成本`,-1),p(`div`,pn,[p(`div`,mn,[o[84]||=p(`span`,{class:`info-label`},`单件费用`,-1),p(`span`,hn,c(R.costResult.cost_per_part),1)]),p(`div`,gn,[o[85]||=p(`span`,{class:`info-label`},`材料用量`,-1),p(`span`,_n,c(R.costResult.part_cost.material),1)]),p(`div`,vn,[o[86]||=p(`span`,{class:`info-label`},`成型周期`,-1),p(`span`,yn,c(R.costResult.part_cost.cycle_time),1)]),p(`div`,bn,[o[87]||=p(`span`,{class:`info-label`},`置信度`,-1),p(`span`,xn,c(Math.round((R.costResult.confidence||0)*100))+`%`,1)])])])]),R.costResult.assumptions?.length?(t(),T(`div`,Sn,[o[89]||=p(`h4`,null,`估算假设`,-1),p(`div`,Cn,[(t(!0),T(y,null,s(R.costResult.assumptions,(e,n)=>(t(),T(`div`,{key:`cost-assumption-`+n,class:`recommendation-item low`},[p(`div`,wn,`ℹ️ `+c(e),1)]))),128))])])):C(``,!0)],64)):R.costError?C(``,!0):(t(),d(f,{key:2,theme:`info`,title:`尚未生成`,message:`点击“生成成本估算”后,将基于当前方案估算模具造价与单件成本。`}))]),Wn.value?(t(),T(`div`,Tn,[p(`div`,En,[o[90]||=p(`h3`,null,`LLM 设计报告`,-1),l(m,{type:(J.value?.overall_score||0)>=7?`success`:(J.value?.overall_score||0)>=5?`warning`:`danger`},{default:g(()=>[w(` 评分 `+c(J.value?.overall_score||`N/A`)+` / 10 `,1)]),_:1},8,[`type`])]),J.value?.overview?(t(),T(`div`,Dn,c(J.value?.overview),1)):C(``,!0),p(`div`,On,[(t(!0),T(y,null,s(Gn.value,(e,n)=>(t(),T(`div`,{key:`dr-sec-`+n,class:r([`result-card`,e.type===`issues`?`result-card-highlight`:``])},[p(`h4`,{style:i(e.type===`issues`?`color: var(--danger-color);`:``)},c(e.heading),5),e.type===`issues`?(t(),T(`div`,kn,[(t(!0),T(y,null,s(e.items,(e,n)=>(t(),T(`div`,{key:`dr-issue-`+n,class:r([`recommendation-item`,e.level===`high`?`high`:e.level===`medium`?`medium`:`low`])},[p(`span`,{class:r([`priority-badge`,e.level||`medium`]),style:{"margin-right":`var(--space-1)`}},c(e.level===`high`?`🔴`:e.level===`medium`?`🟡`:`🟢`),3),p(`div`,An,c(e.content),1)],2))),128))])):e.type===`params_table`?(t(),d(v,{key:1,columns:e.headers.map((e,t)=>({colKey:`col_`+t,title:e})),data:Yn(e.rows),"row-key":`_rowId`,stripe:``,bordered:``},null,8,[`columns`,`data`])):e.type===`recommendations`?(t(),T(`div`,jn,[(t(!0),T(y,null,s(e.items,(e,n)=>(t(),T(`div`,{class:`recommendation-item low`,key:`dr-rec-`+n},[p(`div`,Mn,`💡 `+c(e),1)]))),128))])):(t(),T(`div`,Nn,c(JSON.stringify(e)),1))],2))),128))])])):C(``,!0)])):C(``,!0)]),_:1},8,[`loading`])])}}});export{F as default}; \ No newline at end of file +import{C as e,D as t,F as n,I as r,L as i,M as a,N as o,O as s,R as c,S as l,T as u,_ as d,c as f,f as ee,g as p,h as m,i as h,j as g,k as _,l as v,m as y,r as b,s as x,u as S,v as C,x as w,y as T}from"./index-Dngmm__P.js";import{a as E}from"./utils-COFIQvWo.js";var te={class:`page-container`},ne={class:`page-header`},re={key:1,class:`result-container`},ie={class:`result-header`},ae={class:`result-anchor-nav`},oe=[`href`],se={class:`result-grid result-priority-grid`},ce={class:`summary-header`},le={class:`info-list`},ue={class:`info-item`},de={class:`info-value`,style:{"font-weight":`600`,"font-size":`1.05rem`,color:`var(--text-primary)`}},fe={class:`info-item`},pe={class:`info-value`},me={class:`info-item`},he={class:`info-value`},ge={class:`info-item`},_e={class:`info-value`},ve={class:`info-item`},ye={class:`info-value`},D={class:`info-item`},O={class:`info-value`},k={class:`summary-header`},A={class:`info-list`},j={class:`info-item`},M={class:`info-value`},N={class:`info-item`},P={class:`info-value`},be={class:`info-item`},xe={class:`info-value`},Se={class:`info-item`},Ce={class:`info-value`},we={class:`info-item`},Te={class:`info-value`},Ee={key:1,class:`result-card result-card-highlight`},De={class:`summary-header`},Oe={class:`info-list`},ke={class:`info-item`},Ae={class:`info-value`,style:{"font-weight":`500`}},je={key:0,class:`export-buttons-bar`,style:{display:`flex`,gap:`var(--space-2)`,"flex-wrap":`wrap`,"justify-content":`center`,padding:`var(--space-3) 0`}},Me={key:1,id:`preview-3d`,class:`viewer-section viewer-section-hero`},Ne={class:`summary-header`},Pe=[`src`],Fe={key:2,id:`preview-3d-placeholder`,class:`viewer-section viewer-section-hero`},Ie={class:`summary-header`},Le={key:3,id:`candidate-schemes`,class:`viewer-section diagnostic-panel`,style:{"margin-top":`var(--space-3)`}},Re={class:`result-card full-width diagnostic-panel-body`},ze={key:0,style:{color:`var(--primary-color)`,"font-weight":`600`}},Be={key:1,style:{color:`var(--warning-color)`,"font-weight":`600`}},Ve={id:`ai-side-action`,class:`viewer-section`},He={class:`summary-header`},Ue={key:0,class:`result-grid`},We={class:`result-card`},Ge={class:`info-list`},Ke={class:`info-item`},qe={class:`info-value`},Je={class:`info-item`},Ye={class:`info-value`},Xe={class:`info-item`},Ze={class:`info-value`},Qe={class:`info-item`},$e={class:`info-value`},et={class:`result-card result-card-highlight`},tt={class:`info-list`},nt={class:`info-item`},rt={class:`info-value`},it={class:`info-item`},at={class:`info-value`},ot={key:0,class:`info-item`},st={class:`info-value`},ct={class:`info-item`},lt={class:`info-value`},ut={class:`inline-note`,style:{"margin-top":`var(--space-2)`,"font-weight":`600`,"font-size":`1rem`,color:`var(--text-primary)`}},dt={class:`result-card`},ft={key:0},pt={class:`recommendations-list`},mt={class:`recommendation-text`},ht={key:1,style:{"margin-top":`var(--space-3)`}},gt={class:`recommendations-list`},_t={class:`recommendation-text`},vt={key:2,style:{"margin-top":`var(--space-3)`}},yt={class:`recommendations-list`},bt={class:`recommendation-text`},xt={id:`export-cam`,class:`viewer-section`},St={class:`summary-header`},Ct={class:`result-card`,style:{"margin-bottom":`var(--space-4)`}},wt={class:`info-list`},Tt={class:`info-item`},Et={class:`info-item`},Dt={class:`info-item`},Ot={class:`info-item`},kt={class:`checkbox-group`},At={class:`result-grid`},jt={class:`result-card`},Mt={class:`info-list`},Nt={class:`info-item`},Pt={class:`info-value`},Ft={class:`info-item`},It={class:`info-value`},Lt={class:`info-item`},Rt={class:`info-value`},zt={class:`info-item`},Bt={class:`info-value`},Vt={class:`result-card`},Ht={class:`info-list`},Ut={class:`info-item`},Wt={class:`info-value`},Gt={class:`info-item`},Kt={class:`info-value`},qt={class:`result-card full-width`},Jt={class:`result-card full-width`},Yt={class:`recommendations-list`},Xt={class:`recommendation-text`},Zt={id:`cost-estimate`,class:`viewer-section`},Qt={class:`summary-header`},$t={class:`result-card`,style:{"margin-bottom":`var(--space-3)`}},en={class:`result-grid`},tn={class:`result-card result-card-highlight`},nn={class:`info-list`},rn={class:`info-item`},an={class:`info-value`,style:{"font-size":`1.2rem`,"font-weight":`700`,color:`var(--primary-color)`}},on={class:`info-item`},sn={class:`info-value`},cn={class:`info-item`},ln={class:`info-value`},un={class:`info-item`},dn={class:`info-value`},fn={class:`result-card`},pn={class:`info-list`},mn={class:`info-item`},hn={class:`info-value`,style:{"font-size":`1.1rem`,"font-weight":`600`,color:`var(--warning-color)`}},gn={class:`info-item`},_n={class:`info-value`},vn={class:`info-item`},yn={class:`info-value`},bn={class:`info-item`},xn={class:`info-value`},Sn={key:0,class:`result-card full-width`,style:{"margin-top":`var(--space-3)`}},Cn={class:`recommendations-list`},wn={class:`recommendation-text`},Tn={key:4,id:`llm-report`,class:`viewer-section`},En={class:`summary-header`},Dn={key:0,class:`inline-note`,style:{"margin-bottom":`var(--space-4)`,"font-size":`0.95rem`,color:`var(--text-primary)`}},On={class:`result-grid`},kn={key:0,class:`recommendations-list`},An={class:`recommendation-text`},jn={key:2,class:`recommendations-list`},Mn={class:`recommendation-text`},Nn={key:3,class:`inline-note`},F=e({__name:`ResultView`,setup(e){let F=v(),I=S(),L=f(),R=o({task:null,loading:!0,error:``,selectedSchemeId:null,previewStatus:`idle`,camLoading:!1,camError:``,camPlan:null,camForm:{mold_steel:`P20`,surface_quality:`standard`,controller:`fanuc`,include_gcode:!1},creatingProduct:!1,costLoading:!1,costError:``,costResult:null}),Pn=[{value:`P20`,label:`P20`},{value:`718H`,label:`718H`},{value:`NAK80`,label:`NAK80`},{value:`S136`,label:`S136`},{value:`H13`,label:`H13`}],Fn=[{value:`standard`,label:`标准`},{value:`fine`,label:`精细`},{value:`mirror`,label:`镜面`}],In=[{value:`fanuc`,label:`Fanuc`},{value:`siemens`,label:`Siemens`}],Ln=async()=>{try{R.task=await x(`/api/status/${F.params.taskId}`,{method:`POST`}),R.task?.best_scheme_id?R.selectedSchemeId=R.task.best_scheme_id:R.task?.candidate_schemes?.length&&(R.selectedSchemeId=R.task.candidate_schemes[0].scheme_id);let e=R.task?.cam_preferences||{};R.camForm.mold_steel=e.mold_steel||`P20`,R.camForm.surface_quality=e.surface_quality||`standard`,R.camForm.controller=e.controller||`fanuc`,R.camForm.include_gcode=!!e.include_gcode,R.previewStatus=`loading`}catch(e){R.error=h(e,`加载任务详情`)}finally{R.loading=!1}},Rn=async()=>{let e=F.params.taskId;try{R.creatingProduct=!0;let t=await x(`/api/products/from-task/${e}`,{method:`POST`});b(`已创建成品:${t.name}(SKU: ${t.sku})`,`success`)}catch(e){h(e,`创建成品`)}finally{R.creatingProduct=!1}};u(()=>{if(!L.user){I.push(`/login`);return}Ln()});let z=m(()=>R.task?.candidate_schemes||[]);m(()=>z.value.length===1);let B=m(()=>z.value.length?z.value.find(e=>e.scheme_id===R.selectedSchemeId)||z.value[0]:null),V=m(()=>B.value?.cavity_data||R.task?.cavity_data||null),zn=m(()=>B.value?.key_info||R.task?.key_info||null),H=m(()=>B.value?.html_file||R.task?.html_file||``),U=m(()=>B.value?.dfm_violations||[]),Bn=m(()=>V.value?.injection_system||R.task?.plan_result?.injection_system||null),Vn=m(()=>B.value?.side_actions||V.value?.side_actions||R.task?.side_actions||null),Hn=e=>{let t=String(e||``).match(/\s*([\s\S]*?)\s*/);if(!t)return null;try{return JSON.parse(t[1])}catch(e){return console.warn(`AI 倒扣分析解析失败:`,e),null}},W=e=>{let t=String(e||``).match(/\s*([\s\S]*?)\s*/);if(!t)return null;try{return JSON.parse(t[1])}catch(e){return console.warn(`LLM 设计报告解析失败:`,e),null}},G=(e,t=`ai`)=>{if(!e||typeof e!=`object`)return null;let n=[`required`,`not_required`,`manual_review`].includes(e.status)?e.status:`manual_review`,r=[`slider`,`lifter`,`mixed`,`none`,`manual_review`].includes(e.mechanism_recommendation)?e.mechanism_recommendation:`manual_review`,i=Number(e.confidence),a={required:`需要倒扣/抽芯`,not_required:`无需倒扣/抽芯`,manual_review:`需人工确认`};return{source:t,status:n,statusLabel:a[n],mechanismRecommendation:r,mechanismLabel:{slider:`优先滑块`,lifter:`优先斜顶`,mixed:`滑块 + 斜顶`,none:`无需侧向机构`,manual_review:`人工评审`}[r],confidence:Number.isFinite(i)?Math.max(0,Math.min(i,1)):null,conclusion:e.conclusion||a[n],summary:e.summary||``,reasons:Array.isArray(e.reasons)?e.reasons.filter(Boolean).slice(0,5):[],standardAdvice:Array.isArray(e.standard_advice)?e.standard_advice.filter(Boolean).slice(0,5):[],manualReviewItems:Array.isArray(e.manual_review_items)?e.manual_review_items.filter(Boolean).slice(0,4):[]}},Un=m(()=>{let e=Vn.value;if(!e||typeof e!=`object`)return null;let t=e.summary||{},n=(e.slider_mechanisms||[]).length,r=(e.lifter_mechanisms||[]).length,i=n+r,a=n&&r?`mixed`:n?`slider`:r?`lifter`:`none`,o=i>0?`required`:t.total_undercut_faces===0?`not_required`:`manual_review`;return G({status:o,confidence:.55,conclusion:o===`required`?`规则分析判断当前产品需要倒扣/抽芯机构`:o===`not_required`?`规则分析未发现必须采用倒扣/抽芯机构的特征`:`当前规则结果不足以完成稳定判断,建议人工复核`,mechanism_recommendation:a===`none`?`none`:a,summary:o===`required`?`检测到 ${n} 个滑块需求、${r} 个斜顶需求,建议先按标准机构路线做结构评审。`:o===`not_required`?`当前方案未发现明显倒扣特征,可优先按常规模具结构推进。`:`现有数据可用于初筛,但不足以替代工程师对复杂倒扣的最终确认。`,reasons:[i>0?`规则分析识别出 ${i} 处侧向机构需求`:`规则分析未识别出明确侧向机构需求`,t.complexity?`当前复杂度判定为 ${t.complexity}`:`当前复杂度信息不足`,`当前倒扣方案若存在大行程滑块,优先按气动抽芯条件评估`].filter(Boolean),standard_advice:(e.recommendations||[]).slice(0,4),manual_review_items:[`结合 3D 预览复核倒扣是否可通过改产品取消`,`确认侧向机构与顶出、冷却、分型面是否存在干涉`]},`rules`)});m(()=>{let e={critical:0,high:0,medium:0,low:0};return(U.value||[]).forEach(t=>{let n=String(t.level||`medium`).toLowerCase();e[n]===void 0?e.medium+=1:e[n]+=1}),e});let K=m(()=>G(Hn(R.task?.llm_report||``),`ai`)||Un.value),q=m(()=>{let e=B.value?.side_actions?.summary||{};return{total_slider_count:e.total_slider_count??0,total_lifter_count:e.total_lifter_count??0,total_mechanism_count:e.total_mechanism_count??0,complexity:e.complexity||`未知`}}),J=m(()=>W(R.task?.llm_report||``)),Wn=m(()=>J.value&&(J.value.sections&&J.value.sections.length>0||!!J.value.overview)),Gn=m(()=>(J.value?.sections||[]).filter(e=>e.type===`issues`?e.items?.length>0:e.type===`params_table`?e.rows?.length>0:e.type===`recommendations`?e.items?.length>0:!0));m(()=>{let e=R.task?.stage_timings||{};return Object.entries(e).filter(([,e])=>typeof e==`number`).sort((e,t)=>t[1]-e[1])});let Kn=m(()=>{let e={critical:0,high:1,medium:2,low:3};return[...R.task?.analysis_result?.design_recommendations||[]].sort((t,n)=>(e[t.priority]??99)-(e[n.priority]??99))});m(()=>Kn.value[0]||null);let Y=m(()=>U.value?.length||0),qn=m(()=>{let e=V.value?.mold_cavities?.cavity_count;if(typeof e==`number`)return e;let t=V.value?.mold_cavities||zn.value?.mold_cavities||{};return t.cavity_count||Object.keys(t).filter(e=>e.startsWith(`cavity_`)).length||1});m(()=>Y.value?Y.value>=4?`高风险`:Y.value>=2?`中风险`:`低风险`:`低风险`);let Jn=[{id:`candidate-schemes`,label:`方案`},{id:`preview-3d`,label:`预览`},{id:`ai-side-action`,label:`AI倒扣分析`},{id:`export-cam`,label:`CAM/CNC`},{id:`cost-estimate`,label:`成本估算`},{id:`llm-report`,label:`设计报告`}],Yn=e=>e.map((e,t)=>{let n={_rowId:t};return e.forEach((e,t)=>{n[`col_`+t]=e}),n}),X=e=>{e&&(R.selectedSchemeId=e),R.previewStatus=`loading`,R.camPlan=null,R.camError=``},Xn=()=>{R.previewStatus=`loaded`},Zn=()=>{R.previewStatus=`error`},Z=e=>{if(!e)return`N/A`;if(e.parting?.axis)return`${e.parting.axis} 轴`;let t=e.parting?.direction;return Array.isArray(t)?`[${t.map(e=>Number(e).toFixed(2)).join(`, `)}]`:`N/A`};m(()=>R.task?.analysis_result?.detected_features||[]);let Qn=async(e,t)=>{let n={};L.token&&(n.Authorization=`Bearer ${L.token}`);let r=await fetch(e,{headers:n});if(!r.ok)throw Error(`下载失败 (${r.status}): 无法下载,需要授权`);let i=await r.blob(),a=URL.createObjectURL(i),o=document.createElement(`a`);o.href=a,o.download=t,document.body.appendChild(o),o.click(),document.body.removeChild(o),URL.revokeObjectURL(a)},Q=async e=>{try{let t=F.params.taskId,n=await x(`/api/export-mold`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({task_id:t,scheme_id:B.value?.scheme_id||R.selectedSchemeId,formats:[e],components:[`cavity`,`core`,`parting_surface`]})});if(n.status===`success`&&n.data.files){for(let e of n.data.files){let n=e.relative_path||(e.filepath?e.filepath.replace(/\\/g,`/`).split(`/`).slice(-2).join(`/`):``);await Qn(e.download_path||`/api/export-download/${encodeURI(n)}?task_id=${encodeURIComponent(t)}`,e.filename)}b(`已导出 ${n.data.files.length} 个 ${e.toUpperCase()} 文件`,`success`)}else n.data.errors&&n.data.errors.length>0&&b(`导出失败: ${n.data.errors[0]}`,`error`)}catch(e){b(`导出失败: ${e.message}`,`error`)}},$n=async()=>{try{R.camLoading=!0,R.camError=``;let e={task_id:F.params.taskId,scheme_id:B.value?.scheme_id,mold_steel:R.camForm.mold_steel,surface_quality:R.camForm.surface_quality,controller:R.camForm.controller,include_gcode:R.camForm.include_gcode},t=await x(`/api/cam/plan`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});R.camPlan=t?.data||null,t?.cam_preferences&&(R.camForm.mold_steel=t.cam_preferences.mold_steel||R.camForm.mold_steel,R.camForm.surface_quality=t.cam_preferences.surface_quality||R.camForm.surface_quality,R.camForm.controller=t.cam_preferences.controller||R.camForm.controller,R.camForm.include_gcode=!!t.cam_preferences.include_gcode),b(`CAM 计划生成完成`,`success`)}catch(e){R.camPlan=null,R.camError=e.message||`CAM 计划生成失败`,b(`CAM 计划生成失败: ${R.camError}`,`error`)}finally{R.camLoading=!1}},$=async()=>{try{R.costLoading=!0,R.costError=``;let e=F.params.taskId,t=await x(`/api/cost-estimate`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({task_id:e})});R.costResult=t?.data||null,b(t?.data?.source===`ai`?`AI 成本估算完成`:`规则成本估算完成`,`success`)}catch(e){R.costResult=null,R.costError=e.message||`成本估算失败`,b(`成本估算失败: ${R.costError}`,`error`)}finally{R.costLoading=!1}};return(e,o)=>{let u=_(`t-button`),f=_(`t-alert`),m=_(`t-tag`),h=_(`t-table-column`),v=_(`t-table`),b=_(`t-option`),x=_(`t-select`),S=_(`t-loading`);return t(),T(`div`,te,[p(`div`,ne,[l(u,{variant:`text`,onClick:o[0]||=e=>n(I).back()},{default:g(()=>[...o[14]||=[p(`svg`,{width:`16`,height:`16`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2.2`,"stroke-linecap":`round`,"stroke-linejoin":`round`},[p(`path`,{d:`M19 12H5M12 19l-7-7 7-7`})],-1),w(` 返回 `,-1)]]),_:1}),o[15]||=p(`h1`,null,`分析结果`,-1)]),l(S,{loading:R.loading,text:`加载中...`},{default:g(()=>[R.error?(t(),d(f,{key:0,theme:`error`,message:R.error},null,8,[`message`])):R.task?(t(),T(`div`,re,[p(`div`,ie,[p(`h2`,null,c(R.task.filename),1),l(m,{type:R.task.status===`completed`?`success`:`danger`},{default:g(()=>[w(c(R.task.status),1)]),_:1},8,[`type`])]),p(`div`,ae,[(t(),T(y,null,s(Jn,e=>p(`a`,{key:e.id,class:`anchor-pill`,href:`#`+e.id},c(e.label),9,oe)),64))]),p(`div`,se,[p(`div`,{class:`result-card result-card-highlight`,style:{cursor:`pointer`},onClick:o[1]||=e=>X(B.value?.scheme_id)},[p(`div`,ce,[o[16]||=p(`h3`,null,`推荐方案`,-1),l(m,{theme:`primary`},{default:g(()=>[w(c(B.value?.title||B.value?.scheme_id||`方案待定`),1)]),_:1})]),p(`div`,le,[p(`div`,ue,[o[17]||=p(`span`,{class:`info-label`},`方案说明`,-1),p(`span`,de,c(B.value?.summary||B.value?.reason||`基于当前几何与制造约束自动推荐`),1)]),p(`div`,fe,[o[18]||=p(`span`,{class:`info-label`},`分型方向`,-1),p(`span`,pe,c(Z(B.value)),1)]),p(`div`,me,[o[19]||=p(`span`,{class:`info-label`},`模具结构`,-1),p(`span`,he,c(B.value?.mold_structure_type===`two_half_cavity`?`两板半腔(无独立模芯)`:`型腔 + 模芯`),1)]),p(`div`,ge,[o[20]||=p(`span`,{class:`info-label`},`分型面位置`,-1),p(`span`,_e,c(B.value?.offset_label||`中面`),1)]),p(`div`,ve,[o[21]||=p(`span`,{class:`info-label`},`型腔数`,-1),p(`span`,ye,c(qn.value)+` 腔`,1)]),p(`div`,D,[o[22]||=p(`span`,{class:`info-label`},`预计成型周期`,-1),p(`span`,O,c(Bn.value?.overall_assessment?.estimated_cycle_time||`N/A`)+` s`,1)])])]),z.value.length>1?(t(),T(`div`,{key:0,class:`result-card result-card-highlight`,style:{cursor:`pointer`},onClick:o[2]||=e=>X(z.value[1]?.scheme_id)},[p(`div`,k,[o[24]||=p(`h3`,null,`备选方案`,-1),l(m,{theme:`warning`},{default:g(()=>[...o[23]||=[w(`1 个备选`,-1)]]),_:1})]),p(`div`,A,[(t(!0),T(y,null,s(z.value.slice(1,2),e=>(t(),T(y,{key:`alt-`+e.scheme_id},[p(`div`,j,[o[25]||=p(`span`,{class:`info-label`},`方案说明`,-1),p(`span`,M,c(e.summary||e.reason||`暂无说明`),1)]),p(`div`,N,[o[26]||=p(`span`,{class:`info-label`},`分型方向`,-1),p(`span`,P,c(Z(e)),1)]),p(`div`,be,[o[27]||=p(`span`,{class:`info-label`},`模具结构`,-1),p(`span`,xe,c(e.mold_structure_type===`two_half_cavity`?`两板半腔(无独立模芯)`:`型腔 + 模芯`),1)]),p(`div`,Se,[o[28]||=p(`span`,{class:`info-label`},`分型面位置`,-1),p(`span`,Ce,c(e.offset_label||`中面`),1)]),p(`div`,we,[o[29]||=p(`span`,{class:`info-label`},`方案总分`,-1),p(`span`,Te,c(n(E)(e.score)),1)])],64))),128))])])):(t(),T(`div`,Ee,[p(`div`,De,[o[31]||=p(`h3`,null,`方案概览`,-1),l(m,{theme:`success`},{default:g(()=>[...o[30]||=[w(`单一方案`,-1)]]),_:1})]),p(`div`,Oe,[p(`div`,ke,[o[32]||=p(`span`,{class:`info-label`},`详细方案说明`,-1),p(`span`,Ae,c(B.value?.summary||B.value?.reason||`当前仅生成 1 套可用分模方案,已在推荐方案区域展示核心参数。`),1)])])]))]),R.task.status===`completed`?(t(),T(`div`,je,[l(u,{type:`primary`,size:`small`,onClick:o[3]||=e=>Q(`step`),title:`导出装配体STEP格式(UG/FreeCAD/SolidWorks通用)`},{default:g(()=>[...o[33]||=[w(` 📦 导出 STEP `,-1)]]),_:1}),l(u,{type:`default`,size:`small`,onClick:o[4]||=e=>Q(`iges`),title:`导出IGES格式(兼容旧系统)`},{default:g(()=>[...o[34]||=[w(` 导出 IGES `,-1)]]),_:1}),l(u,{type:`default`,size:`small`,onClick:o[5]||=e=>Q(`stl`),title:`导出STL网格格式(3D打印预览)`},{default:g(()=>[...o[35]||=[w(` 导出 STL `,-1)]]),_:1}),l(u,{type:`default`,size:`small`,onClick:o[6]||=e=>Q(`brep`),title:`导出BRep格式(FreeCAD原生)`},{default:g(()=>[...o[36]||=[w(` 导出 BRep `,-1)]]),_:1}),l(u,{type:`default`,size:`small`,onClick:Rn,loading:R.creatingProduct,title:`将本次模具分析创建为进销存成品,可在进销存模块继续配置 BOM / 销售`},{default:g(()=>[...o[37]||=[w(` 📋 创建为成品 `,-1)]]),_:1},8,[`loading`]),l(u,{type:`default`,size:`small`,onClick:$,loading:R.costLoading,title:`估算模具造价与单件成本`},{default:g(()=>[...o[38]||=[w(` 💰 成本估算 `,-1)]]),_:1},8,[`loading`])])):C(``,!0),H.value?(t(),T(`div`,Me,[p(`div`,Ne,[o[40]||=p(`h3`,null,`3D 预览`,-1),l(m,{theme:`primary`},{default:g(()=>[...o[39]||=[w(`重点区域`,-1)]]),_:1})]),R.previewStatus===`error`?(t(),d(f,{key:0,theme:`warning`,title:`预览加载失败`,message:`HTML 已生成但加载异常,请检查该链接是否可访问:`+H.value,style:{"margin-bottom":`var(--space-3)`}},null,8,[`message`])):C(``,!0),(t(),T(`iframe`,{key:H.value,src:H.value,class:`viewer-frame viewer-frame-hero`,onLoad:Xn,onError:Zn},null,40,Pe))])):(t(),T(`div`,Fe,[p(`div`,Ie,[o[42]||=p(`h3`,null,`3D 预览`,-1),l(m,{theme:`warning`},{default:g(()=>[...o[41]||=[w(`未生成`,-1)]]),_:1})]),l(f,{theme:`warning`,title:`预览未生成`,message:`当前任务没有返回 HTML 预览链接,属于未生成状态。`})])),z.value.length>1?(t(),T(`div`,Le,[o[43]||=p(`summary`,null,`📊 方案对比`,-1),p(`div`,Re,[l(v,{data:z.value.slice(0,2),"row-key":`scheme_id`,stripe:``,hover:``,onRowClick:o[7]||=e=>X(e.row.scheme_id)},{default:g(()=>[l(h,{title:`方案`},{default:g(({rowIndex:e})=>[e===0?(t(),T(`span`,ze,`★ 推荐方案`)):(t(),T(`span`,Be,`备选方案`))]),_:1}),l(h,{title:`方向`},{default:g(({row:e})=>[w(c(Z(e)),1)]),_:1}),l(h,{title:`位置`},{default:g(({row:e})=>[w(c(e.offset_label||`中面`),1)]),_:1}),l(h,{title:`总分`},{default:g(({row:e})=>[w(c(n(E)(e.score)),1)]),_:1}),l(h,{title:`可制造性`},{default:g(({row:e})=>[w(c(n(E)(e.score_breakdown?.manufacturability||0)),1)]),_:1}),l(h,{title:`分型质量`},{default:g(({row:e})=>[w(c(n(E)(e.score_breakdown?.parting_quality||0)),1)]),_:1}),l(h,{title:`倒扣数`},{default:g(({row:e})=>[w(c(e.key_info?.quality_considerations?.undercut_count||0),1)]),_:1}),l(h,{title:`锁模力`},{default:g(({row:e})=>[w(c(e.cavity_data?.manufacturing_info?.estimated_clamping_force||`N/A`),1)]),_:1})]),_:1},8,[`data`])])])):C(``,!0),p(`div`,Ve,[p(`div`,He,[o[45]||=p(`h3`,null,`AI 倒扣与抽芯分析`,-1),K.value?(t(),d(m,{key:0,type:K.value.status===`required`?`danger`:K.value.status===`not_required`?`success`:`warning`},{default:g(()=>[w(c(K.value.statusLabel),1)]),_:1},8,[`type`])):(t(),d(m,{key:1,theme:`warning`},{default:g(()=>[...o[44]||=[w(`未生成`,-1)]]),_:1}))]),K.value?(t(),T(`div`,Ue,[p(`div`,We,[o[50]||=p(`h4`,null,`规则检测摘要`,-1),p(`div`,Ge,[p(`div`,Ke,[o[46]||=p(`span`,{class:`info-label`},`检测状态`,-1),p(`span`,qe,c(q.value.total_mechanism_count>0?`检测到倒扣`:`未检测到倒扣`),1)]),p(`div`,Je,[o[47]||=p(`span`,{class:`info-label`},`滑块数量`,-1),p(`span`,Ye,c(q.value.total_slider_count||0),1)]),p(`div`,Xe,[o[48]||=p(`span`,{class:`info-label`},`斜顶数量`,-1),p(`span`,Ze,c(q.value.total_lifter_count||0),1)]),p(`div`,Qe,[o[49]||=p(`span`,{class:`info-label`},`复杂度`,-1),p(`span`,$e,c(q.value.complexity||`未知`),1)])])]),p(`div`,et,[o[55]||=p(`h4`,null,`AI 结论`,-1),p(`div`,tt,[p(`div`,nt,[o[51]||=p(`span`,{class:`info-label`},`判断结果`,-1),p(`span`,rt,c(K.value.conclusion),1)]),p(`div`,it,[o[52]||=p(`span`,{class:`info-label`},`推荐方案`,-1),p(`span`,at,c(K.value.mechanismLabel),1)]),K.value.confidence==null?C(``,!0):(t(),T(`div`,ot,[o[53]||=p(`span`,{class:`info-label`},`置信度`,-1),p(`span`,st,c(Math.round(K.value.confidence*100))+`%`,1)])),p(`div`,ct,[o[54]||=p(`span`,{class:`info-label`},`分析来源`,-1),p(`span`,lt,c(K.value.source===`ai`?`AI 模型`:`规则回退`),1)])]),p(`div`,ut,c(K.value.summary||`当前任务未返回更多摘要。`),1)]),p(`div`,dt,[K.value.reasons.length?(t(),T(`div`,ft,[o[56]||=p(`h4`,null,`判断依据`,-1),p(`div`,pt,[(t(!0),T(y,null,s(K.value.reasons,(e,n)=>(t(),T(`div`,{class:`recommendation-item medium`,key:`ai-reason-`+n},[p(`div`,mt,c(e),1)]))),128))])])):C(``,!0),K.value.standardAdvice.length?(t(),T(`div`,ht,[o[57]||=p(`h4`,null,`标准化建议`,-1),p(`div`,gt,[(t(!0),T(y,null,s(K.value.standardAdvice,(e,n)=>(t(),T(`div`,{class:`recommendation-item low`,key:`ai-advice-`+n},[p(`div`,_t,c(e),1)]))),128))])])):C(``,!0),K.value.manualReviewItems.length?(t(),T(`div`,vt,[o[58]||=p(`h4`,null,`人工复核项`,-1),p(`div`,yt,[(t(!0),T(y,null,s(K.value.manualReviewItems,(e,n)=>(t(),T(`div`,{class:`recommendation-item medium`,key:`ai-review-`+n},[p(`div`,bt,c(e),1)]))),128))])])):C(``,!0)])])):(t(),d(f,{key:1,theme:`warning`,title:`AI 结论未生成`,message:`当前任务未生成倒扣与抽芯 AI 分析,请检查模型配置或重新运行分析。`}))]),p(`div`,xt,[p(`div`,St,[o[60]||=p(`h3`,null,`CAM 与 CNC 加工`,-1),l(m,{theme:`primary`},{default:g(()=>[...o[59]||=[w(`工艺规划`,-1)]]),_:1})]),p(`div`,Ct,[o[66]||=p(`h4`,null,`CAM 参数`,-1),p(`div`,wt,[p(`div`,Tt,[o[61]||=p(`span`,{class:`info-label`},`模具钢`,-1),l(x,{modelValue:R.camForm.mold_steel,"onUpdate:modelValue":o[8]||=e=>R.camForm.mold_steel=e,style:{width:`200px`}},{default:g(()=>[(t(),T(y,null,s(Pn,e=>l(b,{key:`steel-`+e.value,value:e.value,label:e.label},null,8,[`value`,`label`])),64))]),_:1},8,[`modelValue`])]),p(`div`,Et,[o[62]||=p(`span`,{class:`info-label`},`表面质量`,-1),l(x,{modelValue:R.camForm.surface_quality,"onUpdate:modelValue":o[9]||=e=>R.camForm.surface_quality=e,style:{width:`200px`}},{default:g(()=>[(t(),T(y,null,s(Fn,e=>l(b,{key:`surf-`+e.value,value:e.value,label:e.label},null,8,[`value`,`label`])),64))]),_:1},8,[`modelValue`])]),p(`div`,Dt,[o[63]||=p(`span`,{class:`info-label`},`控制器`,-1),l(x,{modelValue:R.camForm.controller,"onUpdate:modelValue":o[10]||=e=>R.camForm.controller=e,style:{width:`200px`}},{default:g(()=>[(t(),T(y,null,s(In,e=>l(b,{key:`ctrl-`+e.value,value:e.value,label:e.label},null,8,[`value`,`label`])),64))]),_:1},8,[`modelValue`])]),p(`div`,Ot,[o[65]||=p(`span`,{class:`info-label`},`包含G代码`,-1),p(`label`,kt,[a(p(`input`,{type:`checkbox`,class:`checkbox-input`,"onUpdate:modelValue":o[11]||=e=>R.camForm.include_gcode=e},null,512),[[ee,R.camForm.include_gcode]]),o[64]||=p(`span`,{class:`checkbox-label`},`返回G代码文本`,-1)])])]),l(u,{type:`primary`,size:`small`,disabled:R.camLoading,onClick:o[12]||=e=>$n(),style:{"margin-top":`var(--space-2)`},title:`基于当前选中方案生成CAM工艺计划`},{default:g(()=>[w(c(R.camLoading?`⏳ 生成中...`:`🔧 生成 CAM 计划`),1)]),_:1},8,[`disabled`])]),R.camError?(t(),d(f,{key:0,theme:`warning`,title:`CAM 计划生成失败`,message:R.camError},null,8,[`message`])):R.camPlan?(t(),T(y,{key:2},[p(`div`,At,[p(`div`,jt,[o[71]||=p(`h4`,null,`计划摘要`,-1),p(`div`,Mt,[p(`div`,Nt,[o[67]||=p(`span`,{class:`info-label`},`方案ID`,-1),p(`span`,Pt,c(R.camPlan.scheme_id||`N/A`),1)]),p(`div`,Ft,[o[68]||=p(`span`,{class:`info-label`},`总工序数`,-1),p(`span`,It,c(R.camPlan.summary?.total_operations||0),1)]),p(`div`,Lt,[o[69]||=p(`span`,{class:`info-label`},`预计总时长`,-1),p(`span`,Rt,c(n(E)(R.camPlan.summary?.total_estimated_time_min||0))+` min`,1)]),p(`div`,zt,[o[70]||=p(`span`,{class:`info-label`},`方案可信度`,-1),p(`span`,Bt,c(n(E)(R.camPlan.confidence?.score||0)),1)])])]),p(`div`,Vt,[o[74]||=p(`h4`,null,`刀具建议`,-1),p(`div`,Ht,[p(`div`,Ut,[o[72]||=p(`span`,{class:`info-label`},`粗加工刀具`,-1),p(`span`,Wt,c(R.camPlan.tooling_suggestion?.roughing_tool?.tool_id||`N/A`),1)]),p(`div`,Gt,[o[73]||=p(`span`,{class:`info-label`},`精加工刀具`,-1),p(`span`,Kt,c(R.camPlan.tooling_suggestion?.finishing_tool?.tool_id||`N/A`),1)])])])]),p(`div`,qt,[o[75]||=p(`h4`,null,`工序计划`,-1),l(v,{data:R.camPlan.process_plan||[],"row-key":`seq`,stripe:``},{default:g(()=>[l(h,{colKey:`seq`,title:`序号`}),l(h,{colKey:`operation`,title:`工序`}),l(h,{title:`刀具`},{default:g(({row:e})=>[w(c(e.tool_id||`N/A`),1)]),_:1}),l(h,{title:`主轴转速`},{default:g(({row:e})=>[w(c(n(E)(e.spindle_speed_rpm||0)),1)]),_:1}),l(h,{title:`进给率`},{default:g(({row:e})=>[w(c(n(E)(e.feed_rate_mm_min||0)),1)]),_:1}),l(h,{title:`预计时长(min)`},{default:g(({row:e})=>[w(c(n(E)(e.estimated_time_min||0)),1)]),_:1})]),_:1},8,[`data`])]),p(`div`,Jt,[o[76]||=p(`h4`,null,`制造风险提示`,-1),p(`div`,Yt,[(t(!0),T(y,null,s(R.camPlan.manufacturing_warnings||[],(e,n)=>(t(),T(`div`,{class:`recommendation-item medium`,key:`cam-warn-`+n},[p(`div`,Xt,c(e),1)]))),128))])])],64)):(t(),d(f,{key:1,theme:`warning`,title:`尚未生成 CAM 计划`,message:`点击上方"生成 CAM 计划"后,将返回工序计划、刀具建议与制造风险提示。`}))]),p(`div`,Zt,[p(`div`,Qt,[o[78]||=p(`h3`,null,`成本估算`,-1),R.costResult?(t(),d(m,{key:0,type:R.costResult.source===`ai`?`success`:`warning`},{default:g(()=>[w(c(R.costResult.source===`ai`?`AI 估算`:`规则估算`),1)]),_:1},8,[`type`])):(t(),d(m,{key:1,theme:`primary`},{default:g(()=>[...o[77]||=[w(`待生成`,-1)]]),_:1}))]),p(`div`,$t,[l(u,{type:`primary`,size:`small`,disabled:R.costLoading,onClick:o[13]||=e=>$(),title:`基于当前方案估算模具造价与单件成本`},{default:g(()=>[w(c(R.costLoading?`⏳ 估算中...`:`💰 生成成本估算`),1)]),_:1},8,[`disabled`])]),R.costError?(t(),d(f,{key:0,theme:`warning`,title:`成本估算失败`,message:R.costError},null,8,[`message`])):C(``,!0),R.costResult?(t(),T(y,{key:1},[p(`div`,en,[p(`div`,tn,[o[83]||=p(`h4`,null,`模具造价`,-1),p(`div`,nn,[p(`div`,rn,[o[79]||=p(`span`,{class:`info-label`},`总造价`,-1),p(`span`,an,c(R.costResult.total_mold_cost),1)]),p(`div`,on,[o[80]||=p(`span`,{class:`info-label`},`材料费`,-1),p(`span`,sn,c(R.costResult.mold_cost.material),1)]),p(`div`,cn,[o[81]||=p(`span`,{class:`info-label`},`加工费`,-1),p(`span`,ln,c(R.costResult.mold_cost.machining),1)]),p(`div`,un,[o[82]||=p(`span`,{class:`info-label`},`复杂度系数`,-1),p(`span`,dn,c(R.costResult.mold_cost.complexity_factor),1)])])]),p(`div`,fn,[o[88]||=p(`h4`,null,`单件成本`,-1),p(`div`,pn,[p(`div`,mn,[o[84]||=p(`span`,{class:`info-label`},`单件费用`,-1),p(`span`,hn,c(R.costResult.cost_per_part),1)]),p(`div`,gn,[o[85]||=p(`span`,{class:`info-label`},`材料用量`,-1),p(`span`,_n,c(R.costResult.part_cost.material),1)]),p(`div`,vn,[o[86]||=p(`span`,{class:`info-label`},`成型周期`,-1),p(`span`,yn,c(R.costResult.part_cost.cycle_time),1)]),p(`div`,bn,[o[87]||=p(`span`,{class:`info-label`},`置信度`,-1),p(`span`,xn,c(Math.round((R.costResult.confidence||0)*100))+`%`,1)])])])]),R.costResult.assumptions?.length?(t(),T(`div`,Sn,[o[89]||=p(`h4`,null,`估算假设`,-1),p(`div`,Cn,[(t(!0),T(y,null,s(R.costResult.assumptions,(e,n)=>(t(),T(`div`,{key:`cost-assumption-`+n,class:`recommendation-item low`},[p(`div`,wn,`ℹ️ `+c(e),1)]))),128))])])):C(``,!0)],64)):R.costError?C(``,!0):(t(),d(f,{key:2,theme:`info`,title:`尚未生成`,message:`点击“生成成本估算”后,将基于当前方案估算模具造价与单件成本。`}))]),Wn.value?(t(),T(`div`,Tn,[p(`div`,En,[o[90]||=p(`h3`,null,`LLM 设计报告`,-1),l(m,{type:(J.value?.overall_score||0)>=7?`success`:(J.value?.overall_score||0)>=5?`warning`:`danger`},{default:g(()=>[w(` 评分 `+c(J.value?.overall_score||`N/A`)+` / 10 `,1)]),_:1},8,[`type`])]),J.value?.overview?(t(),T(`div`,Dn,c(J.value?.overview),1)):C(``,!0),p(`div`,On,[(t(!0),T(y,null,s(Gn.value,(e,n)=>(t(),T(`div`,{key:`dr-sec-`+n,class:r([`result-card`,e.type===`issues`?`result-card-highlight`:``])},[p(`h4`,{style:i(e.type===`issues`?`color: var(--danger-color);`:``)},c(e.heading),5),e.type===`issues`?(t(),T(`div`,kn,[(t(!0),T(y,null,s(e.items,(e,n)=>(t(),T(`div`,{key:`dr-issue-`+n,class:r([`recommendation-item`,e.level===`high`?`high`:e.level===`medium`?`medium`:`low`])},[p(`span`,{class:r([`priority-badge`,e.level||`medium`]),style:{"margin-right":`var(--space-1)`}},c(e.level===`high`?`🔴`:e.level===`medium`?`🟡`:`🟢`),3),p(`div`,An,c(e.content),1)],2))),128))])):e.type===`params_table`?(t(),d(v,{key:1,columns:e.headers.map((e,t)=>({colKey:`col_`+t,title:e})),data:Yn(e.rows),"row-key":`_rowId`,stripe:``,bordered:``},null,8,[`columns`,`data`])):e.type===`recommendations`?(t(),T(`div`,jn,[(t(!0),T(y,null,s(e.items,(e,n)=>(t(),T(`div`,{class:`recommendation-item low`,key:`dr-rec-`+n},[p(`div`,Mn,`💡 `+c(e),1)]))),128))])):(t(),T(`div`,Nn,c(JSON.stringify(e)),1))],2))),128))])])):C(``,!0)])):C(``,!0)]),_:1},8,[`loading`])])}}});export{F as default}; \ No newline at end of file diff --git a/static/assets/SalesOrdersTab-3Xt3luKm.js b/static/assets/SalesOrdersTab-3Xt3luKm.js deleted file mode 100644 index 633e454..0000000 --- a/static/assets/SalesOrdersTab-3Xt3luKm.js +++ /dev/null @@ -1 +0,0 @@ -import{C as e,D as t,F as n,O as r,P as i,R as a,S as o,T as s,_ as c,g as l,h as u,i as d,j as f,k as p,m,r as h,s as g,t as _,v,x as y,y as b}from"./index-BoystVy-.js";import{t as x}from"./useInventory-C7Zfw7oO.js";var ee={style:{"margin-bottom":`12px`,display:`flex`,gap:`12px`,"align-items":`center`}},S={style:{display:`flex`,gap:`4px`}},C={style:{display:`flex`,"justify-content":`space-between`,"align-items":`center`,"margin-bottom":`12px`}},te={style:{display:`flex`,gap:`8px`}},w={key:1,style:{"padding-left":`8px`}},ne={style:{"text-align":`right`,"margin-top":`8px`,"font-weight":`600`}},T={style:{display:`flex`,"justify-content":`space-between`,"align-items":`center`,"margin-bottom":`12px`}},E={style:{"text-align":`right`,"margin-top":`8px`,"font-weight":`600`}},D=e({__name:`SalesOrdersTab`,setup(e){function D(e,t,n,r,i){return new Promise(a=>{let o=_.confirm({header:e,body:t,theme:n,confirmBtn:r,cancelBtn:i,onConfirm:()=>{o.hide(),a(!0)},onCancel:()=>{o.hide(),a(!1)},onClose:()=>{a(!1)}})})}let{state:O,formatCurrency:k,formatDateTime:A,formatDate:j,getSalesOrderStatusLabel:M,getDeliveryStatusLabel:N,getPaymentStatusLabel:P,loadProductionOrders:F,loadFinishedProducts:I,loadCustomers:L,loadMaterials:R,loadInventory:z,loadMovements:B}=x(),V=i(!1),H=i(null),U=i({}),W=i([]),G=i(null),K=i(!1),q=i(!1),J=i([]),Y=i([]),X=i(!1);function Z(e){return e.payment_status===`paid`||e.delivery_status===`delivered`||e.delivery_status===`cancelled`||Number(e.received_amount||0)>0}function Q(){H.value=null,U.value={customer_id:null,delivery_date:``,remark:``},W.value=[],Y.value=[],V.value=!0}function re(){W.value.push({mold_mode:`new`,mold_sku:``,mold_name:``,mold_id:null,quantity:1,unit_price:0,remark:``})}function ie(e){W.value.splice(e,1)}let ae=u(()=>W.value.reduce((e,t)=>e+(t.unit_price||0)*(t.quantity||0),0));async function oe(e){await L(),await I(),await R();try{let t=await g(`/api/sales-orders/${e.id}`);H.value=e,U.value={customer_id:t.customer_id||e.customer_id||null,delivery_date:t.delivery_date||e.delivery_date||``,remark:t.remark||e.remark||``},W.value=(t.items||[]).map(e=>({mold_mode:e.mold_id?`existing`:`new`,mold_sku:e.sku||``,mold_name:e.name||``,mold_id:e.mold_id||null,quantity:e.quantity||1,unit_price:e.unit_price||0,remark:e.remark||``}));try{Y.value=((await g(`/api/sales-orders/${e.id}/consume-materials`)).items||[]).map(e=>({material_id:e.material_id,material_name:e.material_name||e.material_sku||``,quantity:e.quantity,unit_price:e.unit_price||0,remark:e.remark||``}))}catch{Y.value=[]}}catch(e){d(e,`加载销售订单详情`)}V.value=!0}async function se(){if(!K.value){if(!U.value.customer_id){h(`请选择客户`,`warning`);return}if(!W.value||W.value.length===0){h(`请至少添加一个模具`,`warning`);return}for(let[e,t]of W.value.entries()){let n=e+1;if(t.mold_mode===`new`){if(!t.mold_sku||!String(t.mold_sku).trim()){h(`第 ${n} 行:新模请填写模具SKU`,`warning`);return}if(!t.mold_name||!String(t.mold_name).trim()){h(`第 ${n} 行:新模请填写模具名称`,`warning`);return}}else if(!t.mold_id){h(`第 ${n} 行:改模请选择已有模具`,`warning`);return}if(!t.quantity||t.quantity<=0){h(`第 ${n} 行:数量必须大于 0`,`warning`);return}if(!t.unit_price||t.unit_price<0){h(`第 ${n} 行:单价不能为负`,`warning`);return}}K.value=!0;try{let e={customer_id:U.value.customer_id,delivery_date:U.value.delivery_date||null,remark:U.value.remark||``,items:W.value.map(e=>({mold_mode:e.mold_mode,mold_sku:e.mold_sku||``,mold_name:e.mold_name||``,mold_id:e.mold_id||null,quantity:e.quantity,unit_price:e.unit_price||0,remark:e.remark||``}))};H.value?(await g(`/api/sales-orders/${H.value.id}`,{method:`PUT`,body:JSON.stringify(e)}),h(`销售订单更新成功`,`success`)):(await g(`/api/sales-orders`,{method:`POST`,body:JSON.stringify(e)}),h(`销售订单创建成功`,`success`)),V.value=!1,H.value=null,U.value={},W.value=[],Y.value=[],F(),I(),z(),B()}catch(e){d(e,`保存销售订单`)}finally{K.value=!1}}}async function ce(e){if(Z(e)){h(`已收款/已交付/已作废或有收款记录的订单不可删除,请先作废相关收款单`,`warning`);return}if(await D(`删除确认`,`确定要删除这个销售订单吗?删除将自动回补已扣减的物料。`,`warning`,`删除`,`取消`))try{await g(`/api/sales-orders/${e.id}`,{method:`DELETE`}),h(`销售订单已删除`,`success`),F(),z(),B()}catch(e){d(e,`删除销售订单`)}}async function le(e){await D(`交付确认`,`确认该订单已交付?`,`success`,`确认交付`,`取消`)&&await $(e,`delivered`,`已交付`)}async function ue(e,t){if(t!==`delivered`){if(!await D(`非标准流程提醒`,`当前订单尚未交付,确定要提前收款吗?建议先确认交付后再收款。`,`warning`,`仍要收款`,`取消`))return}else if(!await D(`收款确认`,`确认已收到该订单款项?`,`success`,`确认收款`,`取消`))return;await $(e,`paid`,`已收款`)}async function de(e){await D(`作废确认`,`确定要作废该订单吗?此操作不可撤销。`,`error`,`确认作废`,`取消`)&&await $(e,`cancelled`,`已作废`)}async function $(e,t,n){try{await g(`/api/sales-orders/${e}/status`,{method:`PATCH`,body:JSON.stringify({status:t})}),h(`订单已${n}`,`success`),F(),B()}catch(e){d(e,`更新状态`)}}function fe(){J.value=[],q.value=!0}function pe(){J.value.push({material_id:O.materials[0]?.id||null,quantity:1,remark:``})}function me(e){J.value.splice(e,1)}let he=u(()=>J.value.reduce((e,t)=>e+(O.materials.find(e=>e.id===t.material_id)?.cost_price||0)*(t.quantity||0),0));async function ge(){if(!X.value&&H.value){if(!J.value||J.value.length===0){h(`请至少添加一个消耗物料`,`warning`);return}for(let[e,t]of J.value.entries()){let n=e+1;if(!t.material_id){h(`第 ${n} 行:请选择物料`,`warning`);return}if(!t.quantity||t.quantity<=0){h(`第 ${n} 行:数量必须大于 0`,`warning`);return}}X.value=!0;try{let e={items:J.value.map(e=>({material_id:e.material_id,quantity:e.quantity,unit_price:O.materials.find(t=>t.id===e.material_id)?.cost_price||0,remark:e.remark||``}))};await g(`/api/sales-orders/${H.value.id}/consume-materials`,{method:`POST`,body:JSON.stringify(e)}),h(`物料消耗记录保存成功`,`success`),q.value=!1;try{Y.value=((await g(`/api/sales-orders/${H.value.id}/consume-materials`)).items||[]).map(e=>({material_id:e.material_id,material_name:e.material_name||e.material_sku||``,quantity:e.quantity,unit_price:e.unit_price||0,remark:e.remark||``}))}catch{Y.value=[]}z(),B()}catch(e){d(e,`保存物料消耗`)}finally{X.value=!1}}}function _e(){V.value=!1,H.value=null,U.value={},W.value=[],Y.value=[]}function ve(){q.value=!1,J.value=[]}async function ye(){await L(),await R(),await I(),await F()}return s(()=>{ye()}),(e,i)=>{let s=p(`t-option`),u=p(`t-select`),d=p(`t-button`),h=p(`t-table-column`),g=p(`t-tag`),_=p(`t-table`),x=p(`t-empty`),D=p(`t-form-item`),M=p(`t-date-picker`),I=p(`t-input`),L=p(`t-form`),R=p(`t-input-number`),z=p(`t-divider`),B=p(`t-dialog`);return t(),b(`div`,null,[l(`div`,ee,[o(u,{modelValue:G.value,"onUpdate:modelValue":i[0]||=e=>G.value=e,placeholder:`选择仓库`,style:{width:`200px`},clearable:``},{default:f(()=>[(t(!0),b(m,null,r(n(O).warehouses,e=>(t(),c(s,{key:e.id,label:e.name,value:e.id},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`]),o(d,{onClick:n(F)},{default:f(()=>[...i[8]||=[y(`刷新`,-1)]]),_:1},8,[`onClick`]),o(d,{type:`primary`,onClick:Q},{default:f(()=>[...i[9]||=[y(`新增销售订单`,-1)]]),_:1})]),o(_,{data:n(O).productionOrders,loading:n(O).loading,stripe:``},{default:f(()=>[o(h,{prop:`order_no`,label:`销售单`}),o(h,{prop:`customer_name`,label:`客户`}),o(h,{label:`订单金额`},{default:f(({row:e})=>[y(a(n(k)(e.total_amount)),1)]),_:1}),o(h,{label:`交付日期`},{default:f(({row:e})=>[y(a(n(j)(e.delivery_date)),1)]),_:1}),o(h,{label:`订单创建`},{default:f(({row:e})=>[y(a(n(A)(e.created_at)),1)]),_:1}),o(h,{label:`实际交付`},{default:f(({row:e})=>[y(a(e.delivered_at?n(A)(e.delivered_at):`-`),1)]),_:1}),o(h,{label:`实际收款`},{default:f(({row:e})=>[y(a(e.paid_at?n(A)(e.paid_at):`-`),1)]),_:1}),o(h,{label:`订单状态`,width:`160`},{default:f(({row:e})=>[l(`div`,S,[o(g,{type:e.delivery_status===`delivered`?`warning`:e.delivery_status===`cancelled`?`danger`:`info`,size:`small`},{default:f(()=>[y(a(n(N)(e.delivery_status)),1)]),_:2},1032,[`type`]),o(g,{type:e.payment_status===`paid`?`success`:`info`,size:`small`},{default:f(()=>[y(a(n(P)(e.payment_status)),1)]),_:2},1032,[`type`])])]),_:1}),o(h,{label:`操作`,width:`280`},{default:f(({row:e})=>[e.delivery_status===`manufacturing`?(t(),c(d,{key:0,type:`success`,size:`small`,onClick:t=>le(e.id)},{default:f(()=>[...i[10]||=[y(`已交付`,-1)]]),_:1},8,[`onClick`])):v(``,!0),e.payment_status!==`paid`&&e.delivery_status!==`cancelled`?(t(),c(d,{key:1,type:`warning`,size:`small`,onClick:t=>ue(e.id,e.delivery_status)},{default:f(()=>[...i[11]||=[y(`已收款`,-1)]]),_:1},8,[`onClick`])):v(``,!0),o(d,{type:`primary`,size:`small`,disabled:e.payment_status===`paid`||e.delivery_status===`cancelled`,onClick:t=>oe(e)},{default:f(()=>[...i[12]||=[y(`编辑`,-1)]]),_:1},8,[`disabled`,`onClick`]),o(d,{type:`danger`,size:`small`,disabled:Z(e),onClick:t=>ce(e)},{default:f(()=>[...i[13]||=[y(`删除`,-1)]]),_:1},8,[`disabled`,`onClick`]),e.payment_status!==`paid`&&e.delivery_status!==`cancelled`?(t(),c(d,{key:2,type:`info`,size:`small`,onClick:t=>de(e.id)},{default:f(()=>[...i[14]||=[y(`作废`,-1)]]),_:1},8,[`onClick`])):v(``,!0)]),_:1})]),_:1},8,[`data`,`loading`]),!n(O).loading&&n(O).productionOrders.length===0?(t(),c(x,{key:0,description:`暂无销售订单`})):v(``,!0),o(B,{visible:V.value,"onUpdate:visible":i[5]||=e=>V.value=e,title:(H.value?`编辑`:`新增`)+`销售订单`,width:`900px`,onClosed:_e},{footer:f(()=>[o(d,{onClick:i[4]||=e=>V.value=!1,disabled:K.value},{default:f(()=>[...i[20]||=[y(`取消`,-1)]]),_:1},8,[`disabled`]),o(d,{type:`primary`,loading:K.value,disabled:K.value,onClick:se},{default:f(()=>[...i[21]||=[y(`保存`,-1)]]),_:1},8,[`loading`,`disabled`])]),default:f(()=>[o(L,{"label-width":`100px`},{default:f(()=>[o(D,{label:`客户`,required:``},{default:f(()=>[o(u,{modelValue:U.value.customer_id,"onUpdate:modelValue":i[1]||=e=>U.value.customer_id=e,placeholder:`请选择客户`,style:{width:`100%`}},{default:f(()=>[(t(!0),b(m,null,r(n(O).customers,e=>(t(),c(s,{key:e.id,label:e.name,value:e.id},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`])]),_:1}),o(D,{label:`交付日期`},{default:f(()=>[o(M,{modelValue:U.value.delivery_date,"onUpdate:modelValue":i[2]||=e=>U.value.delivery_date=e,type:`date`,placeholder:`选择日期`,style:{width:`100%`},"value-format":`YYYY-MM-DD`},null,8,[`modelValue`])]),_:1}),o(D,{label:`备注`},{default:f(()=>[o(I,{modelValue:U.value.remark,"onUpdate:modelValue":i[3]||=e=>U.value.remark=e,placeholder:`备注信息`},null,8,[`modelValue`])]),_:1})]),_:1}),l(`div`,C,[i[17]||=l(`span`,{style:{"font-weight":`600`}},`模具明细`,-1),l(`div`,te,[H.value?(t(),c(d,{key:0,type:`warning`,size:`small`,onClick:fe},{default:f(()=>[...i[15]||=[y(`+ 消耗物料`,-1)]]),_:1})):v(``,!0),o(d,{type:`primary`,size:`small`,onClick:re},{default:f(()=>[...i[16]||=[y(`+ 添加模具`,-1)]]),_:1})])]),o(_,{data:W.value,border:``,size:`small`},{default:f(()=>[o(h,{label:`模式`,width:`80`},{default:f(({row:e})=>[o(u,{modelValue:e.mold_mode,"onUpdate:modelValue":t=>e.mold_mode=t,size:`small`,style:{width:`100%`}},{default:f(()=>[o(s,{label:`新模`,value:`new`}),o(s,{label:`改模`,value:`existing`})]),_:1},8,[`modelValue`,`onUpdate:modelValue`])]),_:1}),o(h,{label:`模具SKU`,"min-width":`120`},{default:f(({row:e})=>[e.mold_mode===`new`?(t(),c(I,{key:0,modelValue:e.mold_sku,"onUpdate:modelValue":t=>e.mold_sku=t,size:`small`,placeholder:`模具SKU`},null,8,[`modelValue`,`onUpdate:modelValue`])):(t(),c(u,{key:1,modelValue:e.mold_id,"onUpdate:modelValue":t=>e.mold_id=t,placeholder:`选择模具`,size:`small`,style:{width:`100%`}},{default:f(()=>[(t(!0),b(m,null,r(n(O).finishedProducts,e=>(t(),c(s,{key:e.id,label:`${e.sku} - ${e.name}`,value:e.id},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`,`onUpdate:modelValue`]))]),_:1}),o(h,{label:`模具名称`,"min-width":`120`},{default:f(({row:e})=>[e.mold_mode===`new`?(t(),c(I,{key:0,modelValue:e.mold_name,"onUpdate:modelValue":t=>e.mold_name=t,size:`small`,placeholder:`模具名称`},null,8,[`modelValue`,`onUpdate:modelValue`])):(t(),b(`span`,w,a(n(O).finishedProducts.find(t=>t.id===e.mold_id)?.name||`-`),1))]),_:1}),o(h,{label:`数量`,width:`100`},{default:f(({row:e})=>[o(R,{modelValue:e.quantity,"onUpdate:modelValue":t=>e.quantity=t,min:1,size:`small`,style:{width:`100%`}},null,8,[`modelValue`,`onUpdate:modelValue`])]),_:1}),o(h,{label:`单价`,width:`120`},{default:f(({row:e})=>[o(R,{modelValue:e.unit_price,"onUpdate:modelValue":t=>e.unit_price=t,min:0,precision:2,step:.01,size:`small`,style:{width:`100%`}},null,8,[`modelValue`,`onUpdate:modelValue`])]),_:1}),o(h,{label:`备注`,width:`120`},{default:f(({row:e})=>[o(I,{modelValue:e.remark,"onUpdate:modelValue":t=>e.remark=t,size:`small`,placeholder:`备注`},null,8,[`modelValue`,`onUpdate:modelValue`])]),_:1}),o(h,{label:`操作`,width:`80`},{default:f(({$index:e})=>[o(d,{type:`danger`,size:`small`,onClick:t=>ie(e)},{default:f(()=>[...i[18]||=[y(`删除`,-1)]]),_:1},8,[`onClick`])]),_:1})]),_:1},8,[`data`]),l(`div`,ne,` 订单总金额:`+a(n(k)(ae.value)),1),H.value&&Y.value.length>0?(t(),b(m,{key:0},[o(z,{"content-position":`left`},{default:f(()=>[...i[19]||=[y(`已消耗物料`,-1)]]),_:1}),o(_,{data:Y.value,border:``,size:`small`},{default:f(()=>[o(h,{label:`物料`},{default:f(({row:e})=>[y(a(e.material_name),1)]),_:1}),o(h,{label:`数量`},{default:f(({row:e})=>[y(a(e.quantity),1)]),_:1}),o(h,{label:`单价`},{default:f(({row:e})=>[y(a(n(k)(e.unit_price)),1)]),_:1}),o(h,{label:`备注`},{default:f(({row:e})=>[y(a(e.remark||`-`),1)]),_:1})]),_:1},8,[`data`])],64)):v(``,!0)]),_:1},8,[`visible`,`title`]),o(B,{visible:q.value,"onUpdate:visible":i[7]||=e=>q.value=e,title:`物料消耗`,width:`800px`,onClosed:ve},{footer:f(()=>[o(d,{onClick:i[6]||=e=>q.value=!1,disabled:X.value},{default:f(()=>[...i[25]||=[y(`取消`,-1)]]),_:1},8,[`disabled`]),o(d,{type:`primary`,loading:X.value,disabled:X.value,onClick:ge},{default:f(()=>[...i[26]||=[y(`保存消耗`,-1)]]),_:1},8,[`loading`,`disabled`])]),default:f(()=>[l(`div`,T,[i[23]||=l(`span`,{style:{"font-weight":`600`}},`消耗物料明细`,-1),o(d,{type:`primary`,size:`small`,onClick:pe},{default:f(()=>[...i[22]||=[y(`+ 添加物料`,-1)]]),_:1})]),o(_,{data:J.value,border:``,size:`small`},{default:f(()=>[o(h,{label:`物料`,"min-width":`200`},{default:f(({row:e})=>[o(u,{modelValue:e.material_id,"onUpdate:modelValue":t=>e.material_id=t,placeholder:`请选择物料`,style:{width:`100%`}},{default:f(()=>[(t(!0),b(m,null,r(n(O).materials,e=>(t(),c(s,{key:e.id,label:`${e.sku} - ${e.name}`,value:e.id},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`,`onUpdate:modelValue`])]),_:1}),o(h,{label:`数量`,width:`120`},{default:f(({row:e})=>[o(R,{modelValue:e.quantity,"onUpdate:modelValue":t=>e.quantity=t,min:1e-4,step:1e-4,size:`small`,style:{width:`100%`}},null,8,[`modelValue`,`onUpdate:modelValue`])]),_:1}),o(h,{label:`单价`,width:`120`},{default:f(({row:e})=>[o(R,{"model-value":n(O).materials.find(t=>t.id===e.material_id)?.cost_price||0,disabled:``,size:`small`,style:{width:`100%`}},null,8,[`model-value`])]),_:1}),o(h,{label:`总价`,width:`120`},{default:f(({row:e})=>[y(a(n(k)((n(O).materials.find(t=>t.id===e.material_id)?.cost_price||0)*(e.quantity||0))),1)]),_:1}),o(h,{label:`备注`,width:`150`},{default:f(({row:e})=>[o(I,{modelValue:e.remark,"onUpdate:modelValue":t=>e.remark=t,size:`small`,placeholder:`备注`},null,8,[`modelValue`,`onUpdate:modelValue`])]),_:1}),o(h,{label:`操作`,width:`80`},{default:f(({$index:e})=>[o(d,{type:`danger`,size:`small`,onClick:t=>me(e)},{default:f(()=>[...i[24]||=[y(`删除`,-1)]]),_:1},8,[`onClick`])]),_:1})]),_:1},8,[`data`]),l(`div`,E,` 消耗总金额:`+a(n(k)(he.value)),1)]),_:1},8,[`visible`])])}}});export{D as default}; \ No newline at end of file diff --git a/static/assets/SalesOrdersTab-Dn49N9j5.js b/static/assets/SalesOrdersTab-Dn49N9j5.js new file mode 100644 index 0000000..3e30938 --- /dev/null +++ b/static/assets/SalesOrdersTab-Dn49N9j5.js @@ -0,0 +1 @@ +import{C as e,D as t,F as n,O as r,P as i,R as a,S as o,T as s,_ as c,g as l,h as u,i as d,j as f,k as p,m,r as h,s as g,t as _,v,x as y,y as b}from"./index-Dngmm__P.js";import{t as x}from"./useInventory-CrXJ8kdd.js";var ee={style:{"margin-bottom":`12px`,display:`flex`,gap:`12px`,"align-items":`center`}},S={style:{display:`flex`,gap:`4px`}},C={style:{display:`flex`,"justify-content":`space-between`,"align-items":`center`,"margin-bottom":`12px`}},te={style:{display:`flex`,gap:`8px`}},w={key:1,style:{"padding-left":`8px`}},ne={style:{"text-align":`right`,"margin-top":`8px`,"font-weight":`600`}},T={style:{display:`flex`,"justify-content":`space-between`,"align-items":`center`,"margin-bottom":`12px`}},E={style:{"text-align":`right`,"margin-top":`8px`,"font-weight":`600`}},D=e({__name:`SalesOrdersTab`,setup(e){function D(e,t,n,r,i){return new Promise(a=>{let o=_.confirm({header:e,body:t,theme:n,confirmBtn:r,cancelBtn:i,onConfirm:()=>{o.hide(),a(!0)},onCancel:()=>{o.hide(),a(!1)},onClose:()=>{a(!1)}})})}let{state:O,formatCurrency:k,formatDateTime:A,formatDate:j,getSalesOrderStatusLabel:M,getDeliveryStatusLabel:N,getPaymentStatusLabel:P,loadProductionOrders:F,loadFinishedProducts:I,loadCustomers:L,loadMaterials:R,loadInventory:z,loadMovements:B}=x(),V=i(!1),H=i(null),U=i({}),W=i([]),G=i(null),K=i(!1),q=i(!1),J=i([]),Y=i([]),X=i(!1);function Z(e){return e.payment_status===`paid`||e.delivery_status===`delivered`||e.delivery_status===`cancelled`||Number(e.received_amount||0)>0}function Q(){H.value=null,U.value={customer_id:null,delivery_date:``,remark:``},W.value=[],Y.value=[],V.value=!0}function re(){W.value.push({mold_mode:`new`,mold_sku:``,mold_name:``,mold_id:null,quantity:1,unit_price:0,remark:``})}function ie(e){W.value.splice(e,1)}let ae=u(()=>W.value.reduce((e,t)=>e+(t.unit_price||0)*(t.quantity||0),0));async function oe(e){await L(),await I(),await R();try{let t=await g(`/api/sales-orders/${e.id}`);H.value=e,U.value={customer_id:t.customer_id||e.customer_id||null,delivery_date:t.delivery_date||e.delivery_date||``,remark:t.remark||e.remark||``},W.value=(t.items||[]).map(e=>({mold_mode:e.mold_id?`existing`:`new`,mold_sku:e.sku||``,mold_name:e.name||``,mold_id:e.mold_id||null,quantity:e.quantity||1,unit_price:e.unit_price||0,remark:e.remark||``}));try{Y.value=((await g(`/api/sales-orders/${e.id}/consume-materials`)).items||[]).map(e=>({material_id:e.material_id,material_name:e.material_name||e.material_sku||``,quantity:e.quantity,unit_price:e.unit_price||0,remark:e.remark||``}))}catch{Y.value=[]}}catch(e){d(e,`加载销售订单详情`)}V.value=!0}async function se(){if(!K.value){if(!U.value.customer_id){h(`请选择客户`,`warning`);return}if(!W.value||W.value.length===0){h(`请至少添加一个模具`,`warning`);return}for(let[e,t]of W.value.entries()){let n=e+1;if(t.mold_mode===`new`){if(!t.mold_sku||!String(t.mold_sku).trim()){h(`第 ${n} 行:新模请填写模具SKU`,`warning`);return}if(!t.mold_name||!String(t.mold_name).trim()){h(`第 ${n} 行:新模请填写模具名称`,`warning`);return}}else if(!t.mold_id){h(`第 ${n} 行:改模请选择已有模具`,`warning`);return}if(!t.quantity||t.quantity<=0){h(`第 ${n} 行:数量必须大于 0`,`warning`);return}if(!t.unit_price||t.unit_price<0){h(`第 ${n} 行:单价不能为负`,`warning`);return}}K.value=!0;try{let e={customer_id:U.value.customer_id,delivery_date:U.value.delivery_date||null,remark:U.value.remark||``,items:W.value.map(e=>({mold_mode:e.mold_mode,mold_sku:e.mold_sku||``,mold_name:e.mold_name||``,mold_id:e.mold_id||null,quantity:e.quantity,unit_price:e.unit_price||0,remark:e.remark||``}))};H.value?(await g(`/api/sales-orders/${H.value.id}`,{method:`PUT`,body:JSON.stringify(e)}),h(`销售订单更新成功`,`success`)):(await g(`/api/sales-orders`,{method:`POST`,body:JSON.stringify(e)}),h(`销售订单创建成功`,`success`)),V.value=!1,H.value=null,U.value={},W.value=[],Y.value=[],F(),I(),z(),B()}catch(e){d(e,`保存销售订单`)}finally{K.value=!1}}}async function ce(e){if(Z(e)){h(`已收款/已交付/已作废或有收款记录的订单不可删除,请先作废相关收款单`,`warning`);return}if(await D(`删除确认`,`确定要删除这个销售订单吗?删除将自动回补已扣减的物料。`,`warning`,`删除`,`取消`))try{await g(`/api/sales-orders/${e.id}`,{method:`DELETE`}),h(`销售订单已删除`,`success`),F(),z(),B()}catch(e){d(e,`删除销售订单`)}}async function le(e){await D(`交付确认`,`确认该订单已交付?`,`success`,`确认交付`,`取消`)&&await $(e,`delivered`,`已交付`)}async function ue(e,t){if(t!==`delivered`){if(!await D(`非标准流程提醒`,`当前订单尚未交付,确定要提前收款吗?建议先确认交付后再收款。`,`warning`,`仍要收款`,`取消`))return}else if(!await D(`收款确认`,`确认已收到该订单款项?`,`success`,`确认收款`,`取消`))return;await $(e,`paid`,`已收款`)}async function de(e){await D(`作废确认`,`确定要作废该订单吗?此操作不可撤销。`,`error`,`确认作废`,`取消`)&&await $(e,`cancelled`,`已作废`)}async function $(e,t,n){try{await g(`/api/sales-orders/${e}/status`,{method:`PATCH`,body:JSON.stringify({status:t})}),h(`订单已${n}`,`success`),F(),B()}catch(e){d(e,`更新状态`)}}function fe(){J.value=[],q.value=!0}function pe(){J.value.push({material_id:O.materials[0]?.id||null,quantity:1,remark:``})}function me(e){J.value.splice(e,1)}let he=u(()=>J.value.reduce((e,t)=>{let n=O.materials.find(e=>e.id===t.material_id);return e+Number(n?.cost_price||0)*Number(t.quantity||0)},0));async function ge(){if(!X.value&&H.value){if(!J.value||J.value.length===0){h(`请至少添加一个消耗物料`,`warning`);return}for(let[e,t]of J.value.entries()){let n=e+1;if(!t.material_id){h(`第 ${n} 行:请选择物料`,`warning`);return}if(!t.quantity||t.quantity<=0){h(`第 ${n} 行:数量必须大于 0`,`warning`);return}}X.value=!0;try{let e={items:J.value.map(e=>({material_id:e.material_id,quantity:e.quantity,unit_price:O.materials.find(t=>t.id===e.material_id)?.cost_price||0,remark:e.remark||``}))};await g(`/api/sales-orders/${H.value.id}/consume-materials`,{method:`POST`,body:JSON.stringify(e)}),h(`物料消耗记录保存成功`,`success`),q.value=!1;try{Y.value=((await g(`/api/sales-orders/${H.value.id}/consume-materials`)).items||[]).map(e=>({material_id:e.material_id,material_name:e.material_name||e.material_sku||``,quantity:e.quantity,unit_price:e.unit_price||0,remark:e.remark||``}))}catch{Y.value=[]}z(),B()}catch(e){d(e,`保存物料消耗`)}finally{X.value=!1}}}function _e(){V.value=!1,H.value=null,U.value={},W.value=[],Y.value=[]}function ve(){q.value=!1,J.value=[]}async function ye(){await L(),await R(),await I(),await F()}return s(()=>{ye()}),(e,i)=>{let s=p(`t-option`),u=p(`t-select`),d=p(`t-button`),h=p(`t-table-column`),g=p(`t-tag`),_=p(`t-table`),x=p(`t-empty`),D=p(`t-form-item`),M=p(`t-date-picker`),I=p(`t-input`),L=p(`t-form`),R=p(`t-input-number`),z=p(`t-divider`),B=p(`t-dialog`);return t(),b(`div`,null,[l(`div`,ee,[o(u,{modelValue:G.value,"onUpdate:modelValue":i[0]||=e=>G.value=e,placeholder:`选择仓库`,style:{width:`200px`},clearable:``},{default:f(()=>[(t(!0),b(m,null,r(n(O).warehouses,e=>(t(),c(s,{key:e.id,label:e.name,value:e.id},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`]),o(d,{onClick:n(F)},{default:f(()=>[...i[8]||=[y(`刷新`,-1)]]),_:1},8,[`onClick`]),o(d,{type:`primary`,onClick:Q},{default:f(()=>[...i[9]||=[y(`新增销售订单`,-1)]]),_:1})]),o(_,{data:n(O).productionOrders,loading:n(O).loading,stripe:``},{default:f(()=>[o(h,{prop:`order_no`,label:`销售单`}),o(h,{prop:`customer_name`,label:`客户`}),o(h,{label:`订单金额`},{default:f(({row:e})=>[y(a(n(k)(e.total_amount)),1)]),_:1}),o(h,{label:`交付日期`},{default:f(({row:e})=>[y(a(n(j)(e.delivery_date)),1)]),_:1}),o(h,{label:`订单创建`},{default:f(({row:e})=>[y(a(n(A)(e.created_at)),1)]),_:1}),o(h,{label:`实际交付`},{default:f(({row:e})=>[y(a(e.delivered_at?n(A)(e.delivered_at):`-`),1)]),_:1}),o(h,{label:`实际收款`},{default:f(({row:e})=>[y(a(e.paid_at?n(A)(e.paid_at):`-`),1)]),_:1}),o(h,{label:`订单状态`,width:`160`},{default:f(({row:e})=>[l(`div`,S,[o(g,{type:e.delivery_status===`delivered`?`warning`:e.delivery_status===`cancelled`?`danger`:`info`,size:`small`},{default:f(()=>[y(a(n(N)(e.delivery_status)),1)]),_:2},1032,[`type`]),o(g,{type:e.payment_status===`paid`?`success`:`info`,size:`small`},{default:f(()=>[y(a(n(P)(e.payment_status)),1)]),_:2},1032,[`type`])])]),_:1}),o(h,{label:`操作`,width:`280`},{default:f(({row:e})=>[e.delivery_status===`manufacturing`?(t(),c(d,{key:0,type:`success`,size:`small`,onClick:t=>le(e.id)},{default:f(()=>[...i[10]||=[y(`已交付`,-1)]]),_:1},8,[`onClick`])):v(``,!0),e.payment_status!==`paid`&&e.delivery_status!==`cancelled`?(t(),c(d,{key:1,type:`warning`,size:`small`,onClick:t=>ue(e.id,e.delivery_status)},{default:f(()=>[...i[11]||=[y(`已收款`,-1)]]),_:1},8,[`onClick`])):v(``,!0),o(d,{type:`primary`,size:`small`,disabled:e.payment_status===`paid`||e.delivery_status===`cancelled`,onClick:t=>oe(e)},{default:f(()=>[...i[12]||=[y(`编辑`,-1)]]),_:1},8,[`disabled`,`onClick`]),o(d,{type:`danger`,size:`small`,disabled:Z(e),onClick:t=>ce(e)},{default:f(()=>[...i[13]||=[y(`删除`,-1)]]),_:1},8,[`disabled`,`onClick`]),e.payment_status!==`paid`&&e.delivery_status!==`cancelled`?(t(),c(d,{key:2,type:`info`,size:`small`,onClick:t=>de(e.id)},{default:f(()=>[...i[14]||=[y(`作废`,-1)]]),_:1},8,[`onClick`])):v(``,!0)]),_:1})]),_:1},8,[`data`,`loading`]),!n(O).loading&&n(O).productionOrders.length===0?(t(),c(x,{key:0,description:`暂无销售订单`})):v(``,!0),o(B,{visible:V.value,"onUpdate:visible":i[5]||=e=>V.value=e,title:(H.value?`编辑`:`新增`)+`销售订单`,width:`900px`,onClosed:_e},{footer:f(()=>[o(d,{onClick:i[4]||=e=>V.value=!1,disabled:K.value},{default:f(()=>[...i[20]||=[y(`取消`,-1)]]),_:1},8,[`disabled`]),o(d,{type:`primary`,loading:K.value,disabled:K.value,onClick:se},{default:f(()=>[...i[21]||=[y(`保存`,-1)]]),_:1},8,[`loading`,`disabled`])]),default:f(()=>[o(L,{"label-width":`100px`},{default:f(()=>[o(D,{label:`客户`,required:``},{default:f(()=>[o(u,{modelValue:U.value.customer_id,"onUpdate:modelValue":i[1]||=e=>U.value.customer_id=e,placeholder:`请选择客户`,style:{width:`100%`}},{default:f(()=>[(t(!0),b(m,null,r(n(O).customers,e=>(t(),c(s,{key:e.id,label:e.name,value:e.id},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`])]),_:1}),o(D,{label:`交付日期`},{default:f(()=>[o(M,{modelValue:U.value.delivery_date,"onUpdate:modelValue":i[2]||=e=>U.value.delivery_date=e,type:`date`,placeholder:`选择日期`,style:{width:`100%`},"value-format":`YYYY-MM-DD`},null,8,[`modelValue`])]),_:1}),o(D,{label:`备注`},{default:f(()=>[o(I,{modelValue:U.value.remark,"onUpdate:modelValue":i[3]||=e=>U.value.remark=e,placeholder:`备注信息`},null,8,[`modelValue`])]),_:1})]),_:1}),l(`div`,C,[i[17]||=l(`span`,{style:{"font-weight":`600`}},`模具明细`,-1),l(`div`,te,[H.value?(t(),c(d,{key:0,type:`warning`,size:`small`,onClick:fe},{default:f(()=>[...i[15]||=[y(`+ 消耗物料`,-1)]]),_:1})):v(``,!0),o(d,{type:`primary`,size:`small`,onClick:re},{default:f(()=>[...i[16]||=[y(`+ 添加模具`,-1)]]),_:1})])]),o(_,{data:W.value,border:``,size:`small`},{default:f(()=>[o(h,{label:`模式`,width:`80`},{default:f(({row:e})=>[o(u,{modelValue:e.mold_mode,"onUpdate:modelValue":t=>e.mold_mode=t,size:`small`,style:{width:`100%`}},{default:f(()=>[o(s,{label:`新模`,value:`new`}),o(s,{label:`改模`,value:`existing`})]),_:1},8,[`modelValue`,`onUpdate:modelValue`])]),_:1}),o(h,{label:`模具SKU`,"min-width":`120`},{default:f(({row:e})=>[e.mold_mode===`new`?(t(),c(I,{key:0,modelValue:e.mold_sku,"onUpdate:modelValue":t=>e.mold_sku=t,size:`small`,placeholder:`模具SKU`},null,8,[`modelValue`,`onUpdate:modelValue`])):(t(),c(u,{key:1,modelValue:e.mold_id,"onUpdate:modelValue":t=>e.mold_id=t,placeholder:`选择模具`,size:`small`,style:{width:`100%`}},{default:f(()=>[(t(!0),b(m,null,r(n(O).finishedProducts,e=>(t(),c(s,{key:e.id,label:`${e.sku} - ${e.name}`,value:e.id},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`,`onUpdate:modelValue`]))]),_:1}),o(h,{label:`模具名称`,"min-width":`120`},{default:f(({row:e})=>[e.mold_mode===`new`?(t(),c(I,{key:0,modelValue:e.mold_name,"onUpdate:modelValue":t=>e.mold_name=t,size:`small`,placeholder:`模具名称`},null,8,[`modelValue`,`onUpdate:modelValue`])):(t(),b(`span`,w,a(n(O).finishedProducts.find(t=>t.id===e.mold_id)?.name||`-`),1))]),_:1}),o(h,{label:`数量`,width:`100`},{default:f(({row:e})=>[o(R,{modelValue:e.quantity,"onUpdate:modelValue":t=>e.quantity=t,min:1,size:`small`,style:{width:`100%`}},null,8,[`modelValue`,`onUpdate:modelValue`])]),_:1}),o(h,{label:`单价`,width:`120`},{default:f(({row:e})=>[o(R,{modelValue:e.unit_price,"onUpdate:modelValue":t=>e.unit_price=t,min:0,precision:2,step:.01,size:`small`,style:{width:`100%`}},null,8,[`modelValue`,`onUpdate:modelValue`])]),_:1}),o(h,{label:`备注`,width:`120`},{default:f(({row:e})=>[o(I,{modelValue:e.remark,"onUpdate:modelValue":t=>e.remark=t,size:`small`,placeholder:`备注`},null,8,[`modelValue`,`onUpdate:modelValue`])]),_:1}),o(h,{label:`操作`,width:`80`},{default:f(({$index:e})=>[o(d,{type:`danger`,size:`small`,onClick:t=>ie(e)},{default:f(()=>[...i[18]||=[y(`删除`,-1)]]),_:1},8,[`onClick`])]),_:1})]),_:1},8,[`data`]),l(`div`,ne,` 订单总金额:`+a(n(k)(ae.value)),1),H.value&&Y.value.length>0?(t(),b(m,{key:0},[o(z,{"content-position":`left`},{default:f(()=>[...i[19]||=[y(`已消耗物料`,-1)]]),_:1}),o(_,{data:Y.value,border:``,size:`small`},{default:f(()=>[o(h,{label:`物料`},{default:f(({row:e})=>[y(a(e.material_name),1)]),_:1}),o(h,{label:`数量`},{default:f(({row:e})=>[y(a(e.quantity),1)]),_:1}),o(h,{label:`单价`},{default:f(({row:e})=>[y(a(n(k)(e.unit_price)),1)]),_:1}),o(h,{label:`备注`},{default:f(({row:e})=>[y(a(e.remark||`-`),1)]),_:1})]),_:1},8,[`data`])],64)):v(``,!0)]),_:1},8,[`visible`,`title`]),o(B,{visible:q.value,"onUpdate:visible":i[7]||=e=>q.value=e,title:`物料消耗`,width:`800px`,onClosed:ve},{footer:f(()=>[o(d,{onClick:i[6]||=e=>q.value=!1,disabled:X.value},{default:f(()=>[...i[25]||=[y(`取消`,-1)]]),_:1},8,[`disabled`]),o(d,{type:`primary`,loading:X.value,disabled:X.value,onClick:ge},{default:f(()=>[...i[26]||=[y(`保存消耗`,-1)]]),_:1},8,[`loading`,`disabled`])]),default:f(()=>[l(`div`,T,[i[23]||=l(`span`,{style:{"font-weight":`600`}},`消耗物料明细`,-1),o(d,{type:`primary`,size:`small`,onClick:pe},{default:f(()=>[...i[22]||=[y(`+ 添加物料`,-1)]]),_:1})]),o(_,{data:J.value,border:``,size:`small`},{default:f(()=>[o(h,{label:`物料`,"min-width":`200`},{default:f(({row:e})=>[o(u,{modelValue:e.material_id,"onUpdate:modelValue":t=>e.material_id=t,placeholder:`请选择物料`,style:{width:`100%`}},{default:f(()=>[(t(!0),b(m,null,r(n(O).materials,e=>(t(),c(s,{key:e.id,label:`${e.sku} - ${e.name}`,value:e.id},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`,`onUpdate:modelValue`])]),_:1}),o(h,{label:`数量`,width:`120`},{default:f(({row:e})=>[o(R,{modelValue:e.quantity,"onUpdate:modelValue":t=>e.quantity=t,min:1e-4,step:1e-4,size:`small`,style:{width:`100%`}},null,8,[`modelValue`,`onUpdate:modelValue`])]),_:1}),o(h,{label:`单价`,width:`120`},{default:f(({row:e})=>[o(R,{"model-value":n(O).materials.find(t=>t.id===e.material_id)?.cost_price||0,disabled:``,size:`small`,style:{width:`100%`}},null,8,[`model-value`])]),_:1}),o(h,{label:`总价`,width:`120`},{default:f(({row:e})=>[y(a(n(k)(Number(n(O).materials.find(t=>t.id===e.material_id)?.cost_price||0)*Number(e.quantity||0))),1)]),_:1}),o(h,{label:`备注`,width:`150`},{default:f(({row:e})=>[o(I,{modelValue:e.remark,"onUpdate:modelValue":t=>e.remark=t,size:`small`,placeholder:`备注`},null,8,[`modelValue`,`onUpdate:modelValue`])]),_:1}),o(h,{label:`操作`,width:`80`},{default:f(({$index:e})=>[o(d,{type:`danger`,size:`small`,onClick:t=>me(e)},{default:f(()=>[...i[24]||=[y(`删除`,-1)]]),_:1},8,[`onClick`])]),_:1})]),_:1},8,[`data`]),l(`div`,E,` 消耗总金额:`+a(n(k)(he.value)),1)]),_:1},8,[`visible`])])}}});export{D as default}; \ No newline at end of file diff --git a/static/assets/SuppliersTab-DoyluwJj.js b/static/assets/SuppliersTab-Dr_fyxwE.js similarity index 96% rename from static/assets/SuppliersTab-DoyluwJj.js rename to static/assets/SuppliersTab-Dr_fyxwE.js index b280d08..040aebc 100644 --- a/static/assets/SuppliersTab-DoyluwJj.js +++ b/static/assets/SuppliersTab-Dr_fyxwE.js @@ -1 +1 @@ -import{C as e,D as t,F as n,N as r,P as i,R as a,S as o,T as s,g as c,i as l,j as u,k as d,n as f,r as p,s as m,x as h,y as g}from"./index-BoystVy-.js";import{t as _}from"./useInventory-C7Zfw7oO.js";var v={class:`suppliers-tab`},y={class:`table-header`},b=f(e({__name:`SuppliersTab`,setup(e){let{state:f,loadSuppliers:b}=_(),x=i(!1),S=i(null),C=i(!1),w=r({name:``,contact_person:``,phone:``,email:``,address:``});function T(){S.value=null,w.name=``,w.contact_person=``,w.phone=``,w.email=``,w.address=``,x.value=!0}function E(e){S.value=e,w.name=e.name??``,w.contact_person=e.contact_person??``,w.phone=e.phone??``,w.email=e.email??``,w.address=e.address??``,x.value=!0}async function D(){if(!C.value){if(!w.name||!w.name.trim()){p(`请输入供应商名称`,`warning`);return}C.value=!0;try{let e={name:w.name,contact_person:w.contact_person||null,phone:w.phone||null,email:w.email||null,address:w.address||null};S.value?(await m(`/api/suppliers/${S.value.id}`,{method:`PUT`,body:JSON.stringify(e)}),p(`供应商更新成功`,`success`)):(await m(`/api/suppliers`,{method:`POST`,body:JSON.stringify(e)}),p(`供应商已创建`,`success`)),x.value=!1,b()}catch(e){l(e,`保存供应商`)}finally{C.value=!1}}}async function O(e){if(confirm(`确定要删除这个供应商吗?`))try{await m(`/api/suppliers/${e}`,{method:`DELETE`}),p(`供应商已删除`,`success`),b()}catch(e){l(e,`删除供应商`)}}return s(()=>{b()}),(e,r)=>{let i=d(`t-button`),s=d(`t-table-column`),l=d(`t-table`),p=d(`t-input`),m=d(`t-form-item`),_=d(`t-form`),b=d(`t-dialog`);return t(),g(`div`,v,[c(`div`,y,[o(i,{type:`primary`,onClick:T},{default:u(()=>[...r[7]||=[h(`+ 新增供应商`,-1)]]),_:1})]),o(l,{data:n(f).suppliers,style:{width:`100%`},loading:n(f).loading,"empty-text":`暂无供应商数据`},{default:u(()=>[o(s,{prop:`code`,label:`编码`}),o(s,{prop:`name`,label:`名称`}),o(s,{prop:`contact_person`,label:`联系人`},{default:u(({row:e})=>[h(a(e.contact_person||`-`),1)]),_:1}),o(s,{prop:`phone`,label:`电话`},{default:u(({row:e})=>[h(a(e.phone||`-`),1)]),_:1}),o(s,{prop:`email`,label:`邮箱`},{default:u(({row:e})=>[h(a(e.email||`-`),1)]),_:1}),o(s,{label:`操作`,width:`180`},{default:u(({row:e})=>[o(i,{size:`small`,onClick:t=>E(e)},{default:u(()=>[...r[8]||=[h(`编辑`,-1)]]),_:1},8,[`onClick`]),o(i,{size:`small`,type:`danger`,onClick:t=>O(e.id)},{default:u(()=>[...r[9]||=[h(`删除`,-1)]]),_:1},8,[`onClick`])]),_:1})]),_:1},8,[`data`,`loading`]),o(b,{modelValue:x.value,"onUpdate:modelValue":r[6]||=e=>x.value=e,title:S.value?`编辑供应商`:`新增供应商`,width:`520px`,"close-on-click-modal":!1},{footer:u(()=>[o(i,{onClick:r[5]||=e=>x.value=!1,disabled:C.value},{default:u(()=>[...r[10]||=[h(`取消`,-1)]]),_:1},8,[`disabled`]),o(i,{type:`primary`,loading:C.value,disabled:C.value,onClick:D},{default:u(()=>[...r[11]||=[h(`保存`,-1)]]),_:1},8,[`loading`,`disabled`])]),default:u(()=>[o(_,{model:w,"label-width":`80px`},{default:u(()=>[o(m,{label:`名称`,required:``},{default:u(()=>[o(p,{modelValue:w.name,"onUpdate:modelValue":r[0]||=e=>w.name=e,placeholder:`请输入供应商名称`},null,8,[`modelValue`])]),_:1}),o(m,{label:`联系人`},{default:u(()=>[o(p,{modelValue:w.contact_person,"onUpdate:modelValue":r[1]||=e=>w.contact_person=e,placeholder:`请输入联系人`},null,8,[`modelValue`])]),_:1}),o(m,{label:`电话`},{default:u(()=>[o(p,{modelValue:w.phone,"onUpdate:modelValue":r[2]||=e=>w.phone=e,placeholder:`请输入电话`},null,8,[`modelValue`])]),_:1}),o(m,{label:`邮箱`},{default:u(()=>[o(p,{modelValue:w.email,"onUpdate:modelValue":r[3]||=e=>w.email=e,type:`email`,placeholder:`请输入邮箱`},null,8,[`modelValue`])]),_:1}),o(m,{label:`地址`},{default:u(()=>[o(p,{modelValue:w.address,"onUpdate:modelValue":r[4]||=e=>w.address=e,placeholder:`请输入地址`},null,8,[`modelValue`])]),_:1})]),_:1},8,[`model`])]),_:1},8,[`modelValue`,`title`])])}}}),[[`__scopeId`,`data-v-e8c22e24`]]);export{b as default}; \ No newline at end of file +import{C as e,D as t,F as n,N as r,P as i,R as a,S as o,T as s,g as c,i as l,j as u,k as d,n as f,r as p,s as m,x as h,y as g}from"./index-Dngmm__P.js";import{t as _}from"./useInventory-CrXJ8kdd.js";var v={class:`suppliers-tab`},y={class:`table-header`},b=f(e({__name:`SuppliersTab`,setup(e){let{state:f,loadSuppliers:b}=_(),x=i(!1),S=i(null),C=i(!1),w=r({name:``,contact_person:``,phone:``,email:``,address:``});function T(){S.value=null,w.name=``,w.contact_person=``,w.phone=``,w.email=``,w.address=``,x.value=!0}function E(e){S.value=e,w.name=e.name??``,w.contact_person=e.contact_person??``,w.phone=e.phone??``,w.email=e.email??``,w.address=e.address??``,x.value=!0}async function D(){if(!C.value){if(!w.name||!w.name.trim()){p(`请输入供应商名称`,`warning`);return}C.value=!0;try{let e={name:w.name,contact_person:w.contact_person||null,phone:w.phone||null,email:w.email||null,address:w.address||null};S.value?(await m(`/api/suppliers/${S.value.id}`,{method:`PUT`,body:JSON.stringify(e)}),p(`供应商更新成功`,`success`)):(await m(`/api/suppliers`,{method:`POST`,body:JSON.stringify(e)}),p(`供应商已创建`,`success`)),x.value=!1,b()}catch(e){l(e,`保存供应商`)}finally{C.value=!1}}}async function O(e){if(confirm(`确定要删除这个供应商吗?`))try{await m(`/api/suppliers/${e}`,{method:`DELETE`}),p(`供应商已删除`,`success`),b()}catch(e){l(e,`删除供应商`)}}return s(()=>{b()}),(e,r)=>{let i=d(`t-button`),s=d(`t-table-column`),l=d(`t-table`),p=d(`t-input`),m=d(`t-form-item`),_=d(`t-form`),b=d(`t-dialog`);return t(),g(`div`,v,[c(`div`,y,[o(i,{type:`primary`,onClick:T},{default:u(()=>[...r[7]||=[h(`+ 新增供应商`,-1)]]),_:1})]),o(l,{data:n(f).suppliers,style:{width:`100%`},loading:n(f).loading,"empty-text":`暂无供应商数据`},{default:u(()=>[o(s,{prop:`code`,label:`编码`}),o(s,{prop:`name`,label:`名称`}),o(s,{prop:`contact_person`,label:`联系人`},{default:u(({row:e})=>[h(a(e.contact_person||`-`),1)]),_:1}),o(s,{prop:`phone`,label:`电话`},{default:u(({row:e})=>[h(a(e.phone||`-`),1)]),_:1}),o(s,{prop:`email`,label:`邮箱`},{default:u(({row:e})=>[h(a(e.email||`-`),1)]),_:1}),o(s,{label:`操作`,width:`180`},{default:u(({row:e})=>[o(i,{size:`small`,onClick:t=>E(e)},{default:u(()=>[...r[8]||=[h(`编辑`,-1)]]),_:1},8,[`onClick`]),o(i,{size:`small`,type:`danger`,onClick:t=>O(e.id)},{default:u(()=>[...r[9]||=[h(`删除`,-1)]]),_:1},8,[`onClick`])]),_:1})]),_:1},8,[`data`,`loading`]),o(b,{modelValue:x.value,"onUpdate:modelValue":r[6]||=e=>x.value=e,title:S.value?`编辑供应商`:`新增供应商`,width:`520px`,"close-on-click-modal":!1},{footer:u(()=>[o(i,{onClick:r[5]||=e=>x.value=!1,disabled:C.value},{default:u(()=>[...r[10]||=[h(`取消`,-1)]]),_:1},8,[`disabled`]),o(i,{type:`primary`,loading:C.value,disabled:C.value,onClick:D},{default:u(()=>[...r[11]||=[h(`保存`,-1)]]),_:1},8,[`loading`,`disabled`])]),default:u(()=>[o(_,{model:w,"label-width":`80px`},{default:u(()=>[o(m,{label:`名称`,required:``},{default:u(()=>[o(p,{modelValue:w.name,"onUpdate:modelValue":r[0]||=e=>w.name=e,placeholder:`请输入供应商名称`},null,8,[`modelValue`])]),_:1}),o(m,{label:`联系人`},{default:u(()=>[o(p,{modelValue:w.contact_person,"onUpdate:modelValue":r[1]||=e=>w.contact_person=e,placeholder:`请输入联系人`},null,8,[`modelValue`])]),_:1}),o(m,{label:`电话`},{default:u(()=>[o(p,{modelValue:w.phone,"onUpdate:modelValue":r[2]||=e=>w.phone=e,placeholder:`请输入电话`},null,8,[`modelValue`])]),_:1}),o(m,{label:`邮箱`},{default:u(()=>[o(p,{modelValue:w.email,"onUpdate:modelValue":r[3]||=e=>w.email=e,type:`email`,placeholder:`请输入邮箱`},null,8,[`modelValue`])]),_:1}),o(m,{label:`地址`},{default:u(()=>[o(p,{modelValue:w.address,"onUpdate:modelValue":r[4]||=e=>w.address=e,placeholder:`请输入地址`},null,8,[`modelValue`])]),_:1})]),_:1},8,[`model`])]),_:1},8,[`modelValue`,`title`])])}}}),[[`__scopeId`,`data-v-e8c22e24`]]);export{b as default}; \ No newline at end of file diff --git a/static/assets/UsersView-BXSY02BK.js b/static/assets/UsersView-x2MT0yp7.js similarity index 98% rename from static/assets/UsersView-BXSY02BK.js rename to static/assets/UsersView-x2MT0yp7.js index 217f724..b82d5b9 100644 --- a/static/assets/UsersView-BXSY02BK.js +++ b/static/assets/UsersView-x2MT0yp7.js @@ -1 +1 @@ -import{C as e,D as t,F as n,M as r,N as i,O as a,R as o,S as s,T as c,_ as l,c as u,f as d,g as f,j as p,k as m,m as h,r as g,s as _,t as v,u as y,v as b,x,y as S}from"./index-BoystVy-.js";import{r as C}from"./utils-COFIQvWo.js";var w={class:`page-container`},T={class:`page-header`},E={style:{display:`flex`,"flex-direction":`column`,gap:`8px`}},D=[`value`],O=e({__name:`UsersView`,setup(e){let O=y(),k=u(),A=k.user,j=i({users:[],roles:[],loading:!0,showUserModal:!1,editingUser:null,userForm:{username:``,email:``,password:``,full_name:``,role_ids:[]}});function M(e,t,n,r,i){return new Promise(a=>{let o=v.confirm({header:e,body:t,theme:n,confirmBtn:r,cancelBtn:i,onConfirm:()=>{o.hide(),a(!0)},onCancel:()=>{o.hide(),a(!1)},onClose:()=>{a(!1)}})})}let N=async()=>{try{j.users=await _(`/api/auth/users`)}catch(e){g(e.message||`加载用户列表失败`,`error`)}finally{j.loading=!1}},P=async()=>{try{j.roles=await _(`/api/auth/roles`)}catch(e){g(e.message||`加载角色列表失败`,`error`)}},F=(e=null)=>{j.editingUser=e,e?j.userForm={username:e.username,email:e.email,password:``,full_name:e.full_name||``,role_ids:e.roles.map(e=>{let t=j.roles.find(t=>t.code===e);return t?t.id:null}).filter(e=>e!==null)}:j.userForm={username:``,email:``,password:``,full_name:``,role_ids:[]},j.showUserModal=!0},I=async()=>{if(!j.userForm.username||!j.userForm.email){g(`请填写用户名和邮箱`,`error`);return}if(!j.editingUser&&!j.userForm.password){g(`请填写密码`,`error`);return}try{j.editingUser?(await _(`/api/auth/users/${j.editingUser.id}`,{method:`PUT`,body:JSON.stringify({email:j.userForm.email,full_name:j.userForm.full_name||null,role_ids:j.userForm.role_ids})}),g(`用户更新成功`,`success`)):(await _(`/api/auth/users`,{method:`POST`,body:JSON.stringify(j.userForm)}),g(`用户创建成功`,`success`)),j.showUserModal=!1,N()}catch(e){g(e.message||`保存用户失败`,`error`)}},L=async e=>{if(await M(`删除确认`,`确定要删除用户 ${e.username} 吗?`,`warning`,`删除`,`取消`))try{await _(`/api/auth/users/${e.id}`,{method:`DELETE`}),g(`用户已删除`,`success`),N()}catch(e){g(e.message||`删除用户失败`,`error`)}},R=async e=>{let t=prompt(`请输入 ${e.username} 的新密码:`);if(!t||t.length<6){g(`密码长度至少6位`,`error`);return}try{await _(`/api/auth/users/${e.id}/reset-password`,{method:`PUT`,body:JSON.stringify(t)}),g(`密码已重置`,`success`)}catch(e){g(e.message||`重置密码失败`,`error`)}};return c(async()=>{if(!k.user?.is_superuser){O.push(`/`);return}await P(),N()}),(e,i)=>{let c=m(`t-button`),u=m(`t-table-column`),g=m(`t-tag`),_=m(`t-space`),v=m(`t-table`),y=m(`t-empty`),O=m(`t-loading`),k=m(`t-input`),M=m(`t-form-item`),N=m(`t-form`),P=m(`t-dialog`);return t(),S(`div`,w,[f(`div`,T,[i[9]||=f(`div`,null,[f(`h1`,null,`用户管理`),f(`p`,null,`管理系统用户和权限`)],-1),s(c,{theme:`primary`,onClick:i[0]||=e=>F()},{default:p(()=>[...i[8]||=[x(`+ 添加用户`,-1)]]),_:1})]),s(O,{loading:j.loading,size:`large`},{default:p(()=>[s(v,{data:j.users,"row-key":`id`,stripe:``},{default:p(()=>[s(u,{colKey:`username`,title:`用户名`}),s(u,{colKey:`email`,title:`邮箱`}),s(u,{colKey:`full_name`,title:`姓名`},{cell:p(({row:e})=>[x(o(e.full_name||`-`),1)]),_:1}),s(u,{colKey:`is_active`,title:`状态`},{cell:p(({row:e})=>[s(g,{theme:e.is_active?`success`:`danger`},{default:p(()=>[x(o(e.is_active?`正常`:`禁用`),1)]),_:2},1032,[`theme`])]),_:1}),s(u,{colKey:`roles`,title:`角色`},{cell:p(({row:e})=>[(t(!0),S(h,null,a(e.roles,e=>(t(),l(g,{key:e,theme:`primary`,variant:`light`,style:{"margin-right":`4px`}},{default:p(()=>[x(o(e),1)]),_:2},1024))),128))]),_:1}),s(u,{colKey:`created_at`,title:`注册时间`},{cell:p(({row:e})=>[x(o(n(C)(e.created_at)),1)]),_:1}),s(u,{colKey:`actions`,title:`操作`},{cell:p(({row:e})=>[s(_,{size:4},{default:p(()=>[s(c,{theme:`primary`,size:`small`,onClick:t=>F(e)},{default:p(()=>[...i[10]||=[x(`编辑`,-1)]]),_:1},8,[`onClick`]),s(c,{theme:`warning`,size:`small`,onClick:t=>R(e)},{default:p(()=>[...i[11]||=[x(`重置密码`,-1)]]),_:1},8,[`onClick`]),e.id===n(A)?.id?b(``,!0):(t(),l(c,{key:0,theme:`danger`,size:`small`,onClick:t=>L(e)},{default:p(()=>[...i[12]||=[x(`删除`,-1)]]),_:1},8,[`onClick`]))]),_:2},1024)]),_:1})]),_:1},8,[`data`]),!j.loading&&j.users.length===0?(t(),l(y,{key:0,description:`暂无用户数据`})):b(``,!0)]),_:1},8,[`loading`]),s(P,{visible:j.showUserModal,"onUpdate:visible":i[7]||=e=>j.showUserModal=e,header:j.editingUser?`编辑用户`:`添加用户`,"close-on-overlay-click":!0,width:`520px`},{footer:p(()=>[s(c,{theme:`default`,onClick:i[6]||=e=>j.showUserModal=!1},{default:p(()=>[...i[13]||=[x(`取消`,-1)]]),_:1}),s(c,{theme:`primary`,onClick:I},{default:p(()=>[...i[14]||=[x(`保存`,-1)]]),_:1})]),default:p(()=>[s(N,{"label-width":`80px`},{default:p(()=>[s(M,{label:`用户名`},{default:p(()=>[s(k,{modelValue:j.userForm.username,"onUpdate:modelValue":i[1]||=e=>j.userForm.username=e,disabled:!!j.editingUser},null,8,[`modelValue`,`disabled`])]),_:1}),s(M,{label:`邮箱`},{default:p(()=>[s(k,{modelValue:j.userForm.email,"onUpdate:modelValue":i[2]||=e=>j.userForm.email=e,type:`email`},null,8,[`modelValue`])]),_:1}),j.editingUser?b(``,!0):(t(),l(M,{key:0,label:`密码`},{default:p(()=>[s(k,{modelValue:j.userForm.password,"onUpdate:modelValue":i[3]||=e=>j.userForm.password=e,type:`password`},null,8,[`modelValue`])]),_:1})),s(M,{label:`姓名`},{default:p(()=>[s(k,{modelValue:j.userForm.full_name,"onUpdate:modelValue":i[4]||=e=>j.userForm.full_name=e},null,8,[`modelValue`])]),_:1}),s(M,{label:`角色`},{default:p(()=>[f(`div`,E,[(t(!0),S(h,null,a(j.roles,e=>(t(),S(`label`,{key:e.id,style:{display:`flex`,"align-items":`center`,gap:`6px`,cursor:`pointer`}},[r(f(`input`,{type:`checkbox`,value:e.id,"onUpdate:modelValue":i[5]||=e=>j.userForm.role_ids=e},null,8,D),[[d,j.userForm.role_ids]]),x(` `+o(e.name),1)]))),128))])]),_:1})]),_:1})]),_:1},8,[`visible`,`header`])])}}});export{O as default}; \ No newline at end of file +import{C as e,D as t,F as n,M as r,N as i,O as a,R as o,S as s,T as c,_ as l,c as u,f as d,g as f,j as p,k as m,m as h,r as g,s as _,t as v,u as y,v as b,x,y as S}from"./index-Dngmm__P.js";import{r as C}from"./utils-COFIQvWo.js";var w={class:`page-container`},T={class:`page-header`},E={style:{display:`flex`,"flex-direction":`column`,gap:`8px`}},D=[`value`],O=e({__name:`UsersView`,setup(e){let O=y(),k=u(),A=k.user,j=i({users:[],roles:[],loading:!0,showUserModal:!1,editingUser:null,userForm:{username:``,email:``,password:``,full_name:``,role_ids:[]}});function M(e,t,n,r,i){return new Promise(a=>{let o=v.confirm({header:e,body:t,theme:n,confirmBtn:r,cancelBtn:i,onConfirm:()=>{o.hide(),a(!0)},onCancel:()=>{o.hide(),a(!1)},onClose:()=>{a(!1)}})})}let N=async()=>{try{j.users=await _(`/api/auth/users`)}catch(e){g(e.message||`加载用户列表失败`,`error`)}finally{j.loading=!1}},P=async()=>{try{j.roles=await _(`/api/auth/roles`)}catch(e){g(e.message||`加载角色列表失败`,`error`)}},F=(e=null)=>{j.editingUser=e,e?j.userForm={username:e.username,email:e.email,password:``,full_name:e.full_name||``,role_ids:e.roles.map(e=>{let t=j.roles.find(t=>t.code===e);return t?t.id:null}).filter(e=>e!==null)}:j.userForm={username:``,email:``,password:``,full_name:``,role_ids:[]},j.showUserModal=!0},I=async()=>{if(!j.userForm.username||!j.userForm.email){g(`请填写用户名和邮箱`,`error`);return}if(!j.editingUser&&!j.userForm.password){g(`请填写密码`,`error`);return}try{j.editingUser?(await _(`/api/auth/users/${j.editingUser.id}`,{method:`PUT`,body:JSON.stringify({email:j.userForm.email,full_name:j.userForm.full_name||null,role_ids:j.userForm.role_ids})}),g(`用户更新成功`,`success`)):(await _(`/api/auth/users`,{method:`POST`,body:JSON.stringify(j.userForm)}),g(`用户创建成功`,`success`)),j.showUserModal=!1,N()}catch(e){g(e.message||`保存用户失败`,`error`)}},L=async e=>{if(await M(`删除确认`,`确定要删除用户 ${e.username} 吗?`,`warning`,`删除`,`取消`))try{await _(`/api/auth/users/${e.id}`,{method:`DELETE`}),g(`用户已删除`,`success`),N()}catch(e){g(e.message||`删除用户失败`,`error`)}},R=async e=>{let t=prompt(`请输入 ${e.username} 的新密码:`);if(!t||t.length<6){g(`密码长度至少6位`,`error`);return}try{await _(`/api/auth/users/${e.id}/reset-password`,{method:`PUT`,body:JSON.stringify(t)}),g(`密码已重置`,`success`)}catch(e){g(e.message||`重置密码失败`,`error`)}};return c(async()=>{if(!k.user?.is_superuser){O.push(`/`);return}await P(),N()}),(e,i)=>{let c=m(`t-button`),u=m(`t-table-column`),g=m(`t-tag`),_=m(`t-space`),v=m(`t-table`),y=m(`t-empty`),O=m(`t-loading`),k=m(`t-input`),M=m(`t-form-item`),N=m(`t-form`),P=m(`t-dialog`);return t(),S(`div`,w,[f(`div`,T,[i[9]||=f(`div`,null,[f(`h1`,null,`用户管理`),f(`p`,null,`管理系统用户和权限`)],-1),s(c,{theme:`primary`,onClick:i[0]||=e=>F()},{default:p(()=>[...i[8]||=[x(`+ 添加用户`,-1)]]),_:1})]),s(O,{loading:j.loading,size:`large`},{default:p(()=>[s(v,{data:j.users,"row-key":`id`,stripe:``},{default:p(()=>[s(u,{colKey:`username`,title:`用户名`}),s(u,{colKey:`email`,title:`邮箱`}),s(u,{colKey:`full_name`,title:`姓名`},{cell:p(({row:e})=>[x(o(e.full_name||`-`),1)]),_:1}),s(u,{colKey:`is_active`,title:`状态`},{cell:p(({row:e})=>[s(g,{theme:e.is_active?`success`:`danger`},{default:p(()=>[x(o(e.is_active?`正常`:`禁用`),1)]),_:2},1032,[`theme`])]),_:1}),s(u,{colKey:`roles`,title:`角色`},{cell:p(({row:e})=>[(t(!0),S(h,null,a(e.roles,e=>(t(),l(g,{key:e,theme:`primary`,variant:`light`,style:{"margin-right":`4px`}},{default:p(()=>[x(o(e),1)]),_:2},1024))),128))]),_:1}),s(u,{colKey:`created_at`,title:`注册时间`},{cell:p(({row:e})=>[x(o(n(C)(e.created_at)),1)]),_:1}),s(u,{colKey:`actions`,title:`操作`},{cell:p(({row:e})=>[s(_,{size:4},{default:p(()=>[s(c,{theme:`primary`,size:`small`,onClick:t=>F(e)},{default:p(()=>[...i[10]||=[x(`编辑`,-1)]]),_:1},8,[`onClick`]),s(c,{theme:`warning`,size:`small`,onClick:t=>R(e)},{default:p(()=>[...i[11]||=[x(`重置密码`,-1)]]),_:1},8,[`onClick`]),e.id===n(A)?.id?b(``,!0):(t(),l(c,{key:0,theme:`danger`,size:`small`,onClick:t=>L(e)},{default:p(()=>[...i[12]||=[x(`删除`,-1)]]),_:1},8,[`onClick`]))]),_:2},1024)]),_:1})]),_:1},8,[`data`]),!j.loading&&j.users.length===0?(t(),l(y,{key:0,description:`暂无用户数据`})):b(``,!0)]),_:1},8,[`loading`]),s(P,{visible:j.showUserModal,"onUpdate:visible":i[7]||=e=>j.showUserModal=e,header:j.editingUser?`编辑用户`:`添加用户`,"close-on-overlay-click":!0,width:`520px`},{footer:p(()=>[s(c,{theme:`default`,onClick:i[6]||=e=>j.showUserModal=!1},{default:p(()=>[...i[13]||=[x(`取消`,-1)]]),_:1}),s(c,{theme:`primary`,onClick:I},{default:p(()=>[...i[14]||=[x(`保存`,-1)]]),_:1})]),default:p(()=>[s(N,{"label-width":`80px`},{default:p(()=>[s(M,{label:`用户名`},{default:p(()=>[s(k,{modelValue:j.userForm.username,"onUpdate:modelValue":i[1]||=e=>j.userForm.username=e,disabled:!!j.editingUser},null,8,[`modelValue`,`disabled`])]),_:1}),s(M,{label:`邮箱`},{default:p(()=>[s(k,{modelValue:j.userForm.email,"onUpdate:modelValue":i[2]||=e=>j.userForm.email=e,type:`email`},null,8,[`modelValue`])]),_:1}),j.editingUser?b(``,!0):(t(),l(M,{key:0,label:`密码`},{default:p(()=>[s(k,{modelValue:j.userForm.password,"onUpdate:modelValue":i[3]||=e=>j.userForm.password=e,type:`password`},null,8,[`modelValue`])]),_:1})),s(M,{label:`姓名`},{default:p(()=>[s(k,{modelValue:j.userForm.full_name,"onUpdate:modelValue":i[4]||=e=>j.userForm.full_name=e},null,8,[`modelValue`])]),_:1}),s(M,{label:`角色`},{default:p(()=>[f(`div`,E,[(t(!0),S(h,null,a(j.roles,e=>(t(),S(`label`,{key:e.id,style:{display:`flex`,"align-items":`center`,gap:`6px`,cursor:`pointer`}},[r(f(`input`,{type:`checkbox`,value:e.id,"onUpdate:modelValue":i[5]||=e=>j.userForm.role_ids=e},null,8,D),[[d,j.userForm.role_ids]]),x(` `+o(e.name),1)]))),128))])]),_:1})]),_:1})]),_:1},8,[`visible`,`header`])])}}});export{O as default}; \ No newline at end of file diff --git a/static/assets/index-BoystVy-.js b/static/assets/index-Dngmm__P.js similarity index 99% rename from static/assets/index-BoystVy-.js rename to static/assets/index-Dngmm__P.js index 3760d82..a6e5ffe 100644 --- a/static/assets/index-BoystVy-.js +++ b/static/assets/index-Dngmm__P.js @@ -1,5 +1,5 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/HomeView-BRi2I_ia.js","assets/HomeView-wPEC1q8T.css","assets/LoginView-CStpuW_n.js","assets/LoginView-BRS9TQuR.css","assets/UsersView-BXSY02BK.js","assets/utils-COFIQvWo.js","assets/MoldInsightView-CVpP8ugh.js","assets/BatchView-Bpd1N3Uo.js","assets/BatchView-ChYdh3sZ.css","assets/ResultView-NkqMWJoG.js","assets/InventoryView-Lc0Z1KQy.js","assets/inventory-BVZTHSHW.js","assets/InventoryView-Bu4m4R0x.css","assets/DashboardTab-6_GGPgSj.js","assets/useInventory-C7Zfw7oO.js","assets/ProductsTab-ON3NQtwy.js","assets/MaterialsTab-CUuSZrNR.js","assets/InventoryTab-CfDnJ7Xa.js","assets/InventoryTab-C5CVNu_L.css","assets/PurchaseOrdersTab-B-omccCC.js","assets/SalesOrdersTab-3Xt3luKm.js","assets/SuppliersTab-DoyluwJj.js","assets/SuppliersTab-D2JArG3U.css","assets/CustomersTab-DRzCY2Tl.js","assets/CustomersTab-CjI1d8Lk.css","assets/FinanceTab-Bm0yAhLw.js","assets/MovementsTab-DD15FX3n.js","assets/MovementsTab-BUGroM5U.css"])))=>i.map(i=>d[i]); -(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();function e(e){let t=Object.create(null);for(let n of e.split(`,`))t[n]=1;return e=>e in t}var t={},n=[],r=()=>{},i=()=>!1,a=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),o=e=>e.startsWith(`onUpdate:`),s=Object.assign,c=(e,t)=>{let n=e.indexOf(t);n>-1&&e.splice(n,1)},l=Object.prototype.hasOwnProperty,u=(e,t)=>l.call(e,t),d=Array.isArray,f=e=>x(e)===`[object Map]`,p=e=>x(e)===`[object Set]`,m=e=>x(e)===`[object Date]`,h=e=>typeof e==`function`,g=e=>typeof e==`string`,_=e=>typeof e==`symbol`,v=e=>typeof e==`object`&&!!e,y=e=>(v(e)||h(e))&&h(e.then)&&h(e.catch),b=Object.prototype.toString,x=e=>b.call(e),S=e=>x(e).slice(8,-1),C=e=>x(e)===`[object Object]`,w=e=>g(e)&&e!==`NaN`&&e[0]!==`-`&&``+parseInt(e,10)===e,T=e(`,key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted`),E=e=>{let t=Object.create(null);return(n=>t[n]||(t[n]=e(n)))},D=/-\w/g,O=E(e=>e.replace(D,e=>e.slice(1).toUpperCase())),k=/\B([A-Z])/g,A=E(e=>e.replace(k,`-$1`).toLowerCase()),j=E(e=>e.charAt(0).toUpperCase()+e.slice(1)),M=E(e=>e?`on${j(e)}`:``),N=(e,t)=>!Object.is(e,t),P=(e,...t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:r,value:n})},ee=e=>{let t=parseFloat(e);return isNaN(t)?e:t},te=e=>{let t=g(e)?Number(e):NaN;return isNaN(t)?e:t},ne,re=()=>ne||=typeof globalThis<`u`?globalThis:typeof self<`u`?self:typeof window<`u`?window:typeof global<`u`?global:{};function ie(e){if(d(e)){let t={};for(let n=0;n{if(e){let n=e.split(oe);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}function le(e){let t=``;if(g(e))t=e;else if(d(e))for(let n=0;nme(e,t))}var ge=e=>!!(e&&e.__v_isRef===!0),_e=e=>g(e)?e:e==null?``:d(e)||v(e)&&(e.toString===b||!h(e.toString))?ge(e)?_e(e.value):JSON.stringify(e,ve,2):String(e),ve=(e,t)=>ge(t)?ve(e,t.value):f(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((e,[t,n],r)=>(e[ye(t,r)+` =>`]=n,e),{})}:p(t)?{[`Set(${t.size})`]:[...t.values()].map(e=>ye(e))}:_(t)?ye(t):v(t)&&!d(t)&&!C(t)?String(t):t,ye=(e,t=``)=>_(e)?`Symbol(${e.description??t})`:e,be,xe=class{constructor(e=!1){this.detached=e,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this._warnOnRun=!0,this.__v_skip=!0,!e&&be&&(be.active?(this.parent=be,this.index=(be.scopes||=[]).push(this)-1):(this._active=!1,this._warnOnRun=!1))}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let e,t;if(this.scopes)for(e=0,t=this.scopes.length;e0&&--this._on===0){if(be===this)be=this.prevScope;else{let e=be;for(;e;){if(e.prevScope===this){e.prevScope=this.prevScope;break}e=e.prevScope}}this.prevScope=void 0}}stop(e){if(this._active){this._active=!1;let t,n;for(t=0,n=this.effects.length;t0)return;if(Ae){let e=Ae;for(Ae=void 0;e;){let t=e.next;e.next=void 0,e.flags&=-9,e=t}}let e;for(;ke;){let t=ke;for(ke=void 0;t;){let n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(t){e||=t}t=n}}if(e)throw e}function Pe(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Fe(e){let t,n=e.depsTail,r=n;for(;r;){let e=r.prevDep;r.version===-1?(r===n&&(n=e),Re(r),ze(r)):t=r,r.dep.activeLink=r.prevActiveLink,r.prevActiveLink=void 0,r=e}e.deps=t,e.depsTail=n}function Ie(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Le(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function Le(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===Ge)||(e.globalVersion=Ge,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!Ie(e))))return;e.flags|=2;let t=e.dep,n=Te,r=Be;Te=e,Be=!0;try{Pe(e);let n=e.fn(e._value);(t.version===0||N(n,e._value))&&(e.flags|=128,e._value=n,t.version++)}catch(e){throw t.version++,e}finally{Te=n,Be=r,Fe(e),e.flags&=-3}}function Re(e,t=!1){let{dep:n,prevSub:r,nextSub:i}=e;if(r&&(r.nextSub=i,e.prevSub=void 0),i&&(i.prevSub=r,e.nextSub=void 0),n.subs===e&&(n.subs=r,!r&&n.computed)){n.computed.flags&=-5;for(let e=n.computed.deps;e;e=e.nextDep)Re(e,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function ze(e){let{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}var Be=!0,Ve=[];function He(){Ve.push(Be),Be=!1}function Ue(){let e=Ve.pop();Be=e===void 0?!0:e}function We(e){let{cleanup:t}=e;if(e.cleanup=void 0,t){let e=Te;Te=void 0;try{t()}finally{Te=e}}}var Ge=0,Ke=class{constructor(e,t){this.sub=e,this.dep=t,this.version=t.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}},qe=class{constructor(e){this.computed=e,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(e){if(!Te||!Be||Te===this.computed)return;let t=this.activeLink;if(t===void 0||t.sub!==Te)t=this.activeLink=new Ke(Te,this),Te.deps?(t.prevDep=Te.depsTail,Te.depsTail.nextDep=t,Te.depsTail=t):Te.deps=Te.depsTail=t,Je(t);else if(t.version===-1&&(t.version=this.version,t.nextDep)){let e=t.nextDep;e.prevDep=t.prevDep,t.prevDep&&(t.prevDep.nextDep=e),t.prevDep=Te.depsTail,t.nextDep=void 0,Te.depsTail.nextDep=t,Te.depsTail=t,Te.deps===t&&(Te.deps=e)}return t}trigger(e){this.version++,Ge++,this.notify(e)}notify(e){Me();try{for(let e=this.subs;e;e=e.prevSub)e.sub.notify()&&e.sub.dep.notify()}finally{Ne()}}};function Je(e){if(e.dep.sc++,e.sub.flags&4){let t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let e=t.deps;e;e=e.nextDep)Je(e)}let n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}var Ye=new WeakMap,Xe=Symbol(``),Ze=Symbol(``),Qe=Symbol(``);function $e(e,t,n){if(Be&&Te){let t=Ye.get(e);t||Ye.set(e,t=new Map);let r=t.get(n);r||(t.set(n,r=new qe),r.map=t,r.key=n),r.track()}}function et(e,t,n,r,i,a){let o=Ye.get(e);if(!o){Ge++;return}let s=e=>{e&&e.trigger()};if(Me(),t===`clear`)o.forEach(s);else{let i=d(e),a=i&&w(n);if(i&&n===`length`){let e=Number(r);o.forEach((t,n)=>{(n===`length`||n===Qe||!_(n)&&n>=e)&&s(t)})}else switch((n!==void 0||o.has(void 0))&&s(o.get(n)),a&&s(o.get(Qe)),t){case`add`:i?a&&s(o.get(`length`)):(s(o.get(Xe)),f(e)&&s(o.get(Ze)));break;case`delete`:i||(s(o.get(Xe)),f(e)&&s(o.get(Ze)));break;case`set`:f(e)&&s(o.get(Xe));break}}Ne()}function tt(e,t){let n=Ye.get(e);return n&&n.get(t)}function nt(e){let t=Ut(e);return t===e?t:($e(t,`iterate`,Qe),Vt(e)?t:t.map(Gt))}function rt(e){return $e(e=Ut(e),`iterate`,Qe),e}function it(e,t){return Bt(e)?Kt(zt(e)?Gt(t):t):Gt(t)}var at={__proto__:null,[Symbol.iterator](){return ot(this,Symbol.iterator,e=>it(this,e))},concat(...e){return nt(this).concat(...e.map(e=>d(e)?nt(e):e))},entries(){return ot(this,`entries`,e=>(e[1]=it(this,e[1]),e))},every(e,t){return ct(this,`every`,e,t,void 0,arguments)},filter(e,t){return ct(this,`filter`,e,t,e=>e.map(e=>it(this,e)),arguments)},find(e,t){return ct(this,`find`,e,t,e=>it(this,e),arguments)},findIndex(e,t){return ct(this,`findIndex`,e,t,void 0,arguments)},findLast(e,t){return ct(this,`findLast`,e,t,e=>it(this,e),arguments)},findLastIndex(e,t){return ct(this,`findLastIndex`,e,t,void 0,arguments)},forEach(e,t){return ct(this,`forEach`,e,t,void 0,arguments)},includes(...e){return ut(this,`includes`,e)},indexOf(...e){return ut(this,`indexOf`,e)},join(e){return nt(this).join(e)},lastIndexOf(...e){return ut(this,`lastIndexOf`,e)},map(e,t){return ct(this,`map`,e,t,void 0,arguments)},pop(){return dt(this,`pop`)},push(...e){return dt(this,`push`,e)},reduce(e,...t){return lt(this,`reduce`,e,t)},reduceRight(e,...t){return lt(this,`reduceRight`,e,t)},shift(){return dt(this,`shift`)},some(e,t){return ct(this,`some`,e,t,void 0,arguments)},splice(...e){return dt(this,`splice`,e)},toReversed(){return nt(this).toReversed()},toSorted(e){return nt(this).toSorted(e)},toSpliced(...e){return nt(this).toSpliced(...e)},unshift(...e){return dt(this,`unshift`,e)},values(){return ot(this,`values`,e=>it(this,e))}};function ot(e,t,n){let r=rt(e),i=r[t]();return r!==e&&!Vt(e)&&(i._next=i.next,i.next=()=>{let e=i._next();return e.done||(e.value=n(e.value)),e}),i}var st=Array.prototype;function ct(e,t,n,r,i,a){let o=rt(e),s=o!==e&&!Vt(e),c=o[t];if(c!==st[t]){let t=c.apply(e,a);return s?Gt(t):t}let l=n;o!==e&&(s?l=function(t,r){return n.call(this,it(e,t),r,e)}:n.length>2&&(l=function(t,r){return n.call(this,t,r,e)}));let u=c.call(o,l,r);return s&&i?i(u):u}function lt(e,t,n,r){let i=rt(e),a=i!==e&&!Vt(e),o=n,s=!1;i!==e&&(a?(s=r.length===0,o=function(t,r,i){return s&&(s=!1,t=it(e,t)),n.call(this,t,it(e,r),i,e)}):n.length>3&&(o=function(t,r,i){return n.call(this,t,r,i,e)}));let c=i[t](o,...r);return s?it(e,c):c}function ut(e,t,n){let r=Ut(e);$e(r,`iterate`,Qe);let i=r[t](...n);return(i===-1||i===!1)&&Ht(n[0])?(n[0]=Ut(n[0]),r[t](...n)):i}function dt(e,t,n=[]){He(),Me();let r=Ut(e)[t].apply(e,n);return Ne(),Ue(),r}var ft=e(`__proto__,__v_isRef,__isVue`),pt=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!==`arguments`&&e!==`caller`).map(e=>Symbol[e]).filter(_));function mt(e){_(e)||(e=String(e));let t=Ut(this);return $e(t,`has`,e),t.hasOwnProperty(e)}var ht=class{constructor(e=!1,t=!1){this._isReadonly=e,this._isShallow=t}get(e,t,n){if(t===`__v_skip`)return e.__v_skip;let r=this._isReadonly,i=this._isShallow;if(t===`__v_isReactive`)return!r;if(t===`__v_isReadonly`)return r;if(t===`__v_isShallow`)return i;if(t===`__v_raw`)return n===(r?i?Nt:Mt:i?jt:At).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(n)?e:void 0;let a=d(e);if(!r){let e;if(a&&(e=at[t]))return e;if(t===`hasOwnProperty`)return mt}let o=Reflect.get(e,t,qt(e)?e:n);if((_(t)?pt.has(t):ft(t))||(r||$e(e,`get`,t),i))return o;if(qt(o)){let e=a&&w(t)?o:o.value;return r&&v(e)?Lt(e):e}return v(o)?r?Lt(o):Ft(o):o}},gt=class extends ht{constructor(e=!1){super(!1,e)}set(e,t,n,r){let i=e[t],a=d(e)&&w(t);if(!this._isShallow){let e=Bt(i);if(!Vt(n)&&!Bt(n)&&(i=Ut(i),n=Ut(n)),!a&&qt(i)&&!qt(n))return e||(i.value=n),!0}let o=a?Number(t)e,St=e=>Reflect.getPrototypeOf(e);function Ct(e,t,n){return function(...r){let i=this.__v_raw,a=Ut(i),o=f(a),c=e===`entries`||e===Symbol.iterator&&o,l=e===`keys`&&o,u=i[e](...r),d=n?xt:t?Kt:Gt;return!t&&$e(a,`iterate`,l?Ze:Xe),s(Object.create(u),{next(){let{value:e,done:t}=u.next();return t?{value:e,done:t}:{value:c?[d(e[0]),d(e[1])]:d(e),done:t}}})}}function wt(e){return function(...t){return e===`delete`?!1:e===`clear`?void 0:this}}function Tt(e,t){let n={get(n){let r=this.__v_raw,i=Ut(r),a=Ut(n);e||(N(n,a)&&$e(i,`get`,n),$e(i,`get`,a));let{has:o}=St(i),s=t?xt:e?Kt:Gt;if(o.call(i,n))return s(r.get(n));if(o.call(i,a))return s(r.get(a));r!==i&&r.get(n)},get size(){let t=this.__v_raw;return!e&&$e(Ut(t),`iterate`,Xe),t.size},has(t){let n=this.__v_raw,r=Ut(n),i=Ut(t);return e||(N(t,i)&&$e(r,`has`,t),$e(r,`has`,i)),t===i?n.has(t):n.has(t)||n.has(i)},forEach(n,r){let i=this,a=i.__v_raw,o=Ut(a),s=t?xt:e?Kt:Gt;return!e&&$e(o,`iterate`,Xe),a.forEach((e,t)=>n.call(r,s(e),s(t),i))}};return s(n,e?{add:wt(`add`),set:wt(`set`),delete:wt(`delete`),clear:wt(`clear`)}:{add(e){let n=Ut(this),r=St(n),i=Ut(e),a=!t&&!Vt(e)&&!Bt(e)?i:e;return r.has.call(n,a)||N(e,a)&&r.has.call(n,e)||N(i,a)&&r.has.call(n,i)||(n.add(a),et(n,`add`,a,a)),this},set(e,n){!t&&!Vt(n)&&!Bt(n)&&(n=Ut(n));let r=Ut(this),{has:i,get:a}=St(r),o=i.call(r,e);o||=(e=Ut(e),i.call(r,e));let s=a.call(r,e);return r.set(e,n),o?N(n,s)&&et(r,`set`,e,n,s):et(r,`add`,e,n),this},delete(e){let t=Ut(this),{has:n,get:r}=St(t),i=n.call(t,e);i||=(e=Ut(e),n.call(t,e));let a=r?r.call(t,e):void 0,o=t.delete(e);return i&&et(t,`delete`,e,void 0,a),o},clear(){let e=Ut(this),t=e.size!==0,n=e.clear();return t&&et(e,`clear`,void 0,void 0,void 0),n}}),[`keys`,`values`,`entries`,Symbol.iterator].forEach(r=>{n[r]=Ct(r,e,t)}),n}function Et(e,t){let n=Tt(e,t);return(t,r,i)=>r===`__v_isReactive`?!e:r===`__v_isReadonly`?e:r===`__v_raw`?t:Reflect.get(u(n,r)&&r in t?n:t,r,i)}var Dt={get:Et(!1,!1)},Ot={get:Et(!1,!0)},kt={get:Et(!0,!1)},At=new WeakMap,jt=new WeakMap,Mt=new WeakMap,Nt=new WeakMap;function Pt(e){switch(e){case`Object`:case`Array`:return 1;case`Map`:case`Set`:case`WeakMap`:case`WeakSet`:return 2;default:return 0}}function Ft(e){return Bt(e)?e:Rt(e,!1,vt,Dt,At)}function It(e){return Rt(e,!1,bt,Ot,jt)}function Lt(e){return Rt(e,!0,yt,kt,Mt)}function Rt(e,t,n,r,i){if(!v(e)||e.__v_raw&&!(t&&e.__v_isReactive)||e.__v_skip||!Object.isExtensible(e))return e;let a=i.get(e);if(a)return a;let o=Pt(S(e));if(o===0)return e;let s=new Proxy(e,o===2?r:n);return i.set(e,s),s}function zt(e){return Bt(e)?zt(e.__v_raw):!!(e&&e.__v_isReactive)}function Bt(e){return!!(e&&e.__v_isReadonly)}function Vt(e){return!!(e&&e.__v_isShallow)}function Ht(e){return e?!!e.__v_raw:!1}function Ut(e){let t=e&&e.__v_raw;return t?Ut(t):e}function Wt(e){return!u(e,`__v_skip`)&&Object.isExtensible(e)&&F(e,`__v_skip`,!0),e}var Gt=e=>v(e)?Ft(e):e,Kt=e=>v(e)?Lt(e):e;function qt(e){return e?e.__v_isRef===!0:!1}function I(e){return Yt(e,!1)}function Jt(e){return Yt(e,!0)}function Yt(e,t){return qt(e)?e:new Xt(e,t)}var Xt=class{constructor(e,t){this.dep=new qe,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=t?e:Ut(e),this._value=t?e:Gt(e),this.__v_isShallow=t}get value(){return this.dep.track(),this._value}set value(e){let t=this._rawValue,n=this.__v_isShallow||Vt(e)||Bt(e);e=n?e:Ut(e),N(e,t)&&(this._rawValue=e,this._value=n?e:Gt(e),this.dep.trigger())}};function Zt(e){return qt(e)?e.value:e}var Qt={get:(e,t,n)=>t===`__v_raw`?e:Zt(Reflect.get(e,t,n)),set:(e,t,n,r)=>{let i=e[t];return qt(i)&&!qt(n)?(i.value=n,!0):Reflect.set(e,t,n,r)}};function $t(e){return zt(e)?e:new Proxy(e,Qt)}function L(e){let t=d(e)?Array(e.length):{};for(let n in e)t[n]=tn(e,n);return t}var en=class{constructor(e,t,n){this._object=e,this._defaultValue=n,this.__v_isRef=!0,this._value=void 0,this._key=_(t)?t:String(t),this._raw=Ut(e);let r=!0,i=e;if(!d(e)||_(this._key)||!w(this._key))do r=!Ht(i)||Vt(i);while(r&&(i=i.__v_raw));this._shallow=r}get value(){let e=this._object[this._key];return this._shallow&&(e=Zt(e)),this._value=e===void 0?this._defaultValue:e}set value(e){if(this._shallow&&qt(this._raw[this._key])){let t=this._object[this._key];if(qt(t)){t.value=e;return}}this._object[this._key]=e}get dep(){return tt(this._raw,this._key)}};function tn(e,t,n){return new en(e,t,n)}var nn=class{constructor(e,t,n){this.fn=e,this.setter=t,this._value=void 0,this.dep=new qe(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Ge-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!t,this.isSSR=n}notify(){if(this.flags|=16,!(this.flags&8)&&Te!==this)return je(this,!0),!0}get value(){let e=this.dep.track();return Le(this),e&&(e.version=this.dep.version),this._value}set value(e){this.setter&&this.setter(e)}};function rn(e,t,n=!1){let r,i;return h(e)?r=e:(r=e.get,i=e.set),new nn(r,i,n)}var an={},on=new WeakMap,sn=void 0;function cn(e,t=!1,n=sn){if(n){let t=on.get(n);t||on.set(n,t=[]),t.push(e)}}function ln(e,n,i=t){let{immediate:a,deep:o,once:s,scheduler:l,augmentJob:u,call:f}=i,p=e=>o?e:Vt(e)||o===!1||o===0?un(e,1):un(e),m,g,_,v,y=!1,b=!1;if(qt(e)?(g=()=>e.value,y=Vt(e)):zt(e)?(g=()=>p(e),y=!0):d(e)?(b=!0,y=e.some(e=>zt(e)||Vt(e)),g=()=>e.map(e=>{if(qt(e))return e.value;if(zt(e))return p(e);if(h(e))return f?f(e,2):e()})):g=h(e)?n?f?()=>f(e,2):e:()=>{if(_){He();try{_()}finally{Ue()}}let t=sn;sn=m;try{return f?f(e,3,[v]):e(v)}finally{sn=t}}:r,n&&o){let e=g,t=o===!0?1/0:o;g=()=>un(e(),t)}let x=Ce(),S=()=>{m.stop(),x&&x.active&&c(x.effects,m)};if(s&&n){let e=n;n=(...t)=>{e(...t),S()}}let C=b?Array(e.length).fill(an):an,w=e=>{if(!(!(m.flags&1)||!m.dirty&&!e))if(n){let e=m.run();if(o||y||(b?e.some((e,t)=>N(e,C[t])):N(e,C))){_&&_();let t=sn;sn=m;try{let t=[e,C===an?void 0:b&&C[0]===an?[]:C,v];C=e,f?f(n,3,t):n(...t)}finally{sn=t}}}else m.run()};return u&&u(w),m=new De(g),m.scheduler=l?()=>l(w,!1):w,v=e=>cn(e,!1,m),_=m.onStop=()=>{let e=on.get(m);if(e){if(f)f(e,4);else for(let t of e)t();on.delete(m)}},n?a?w(!0):C=m.run():l?l(w.bind(null,!0),!0):m.run(),S.pause=m.pause.bind(m),S.resume=m.resume.bind(m),S.stop=S,S}function un(e,t=1/0,n){if(t<=0||!v(e)||e.__v_skip||(n||=new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,qt(e))un(e.value,t,n);else if(d(e))for(let r=0;r{un(e,t,n)});else if(C(e)){for(let r in e)un(e[r],t,n);for(let r of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,r)&&un(e[r],t,n)}return e}function dn(e,t,n,r){try{return r?e(...r):e()}catch(e){pn(e,t,n)}}function fn(e,t,n,r){if(h(e)){let i=dn(e,t,n,r);return i&&y(i)&&i.catch(e=>{pn(e,t,n)}),i}if(d(e)){let i=[];for(let a=0;a>>1,i=hn[r],a=kn(i);a=kn(n)?hn.push(e):hn.splice(Cn(t),0,e),e.flags|=1,Tn()}}function Tn(){xn||=bn.then(An)}function En(e){d(e)?_n.push(...e):vn&&e.id===-1?vn.splice(yn+1,0,e):e.flags&1||(_n.push(e),e.flags|=1),Tn()}function Dn(e,t,n=gn+1){for(;nkn(e)-kn(t));if(_n.length=0,vn){vn.push(...e);return}for(vn=e,yn=0;yne.id==null?e.flags&2?-1:1/0:e.id;function An(e){try{for(gn=0;gn{r._d&&xa(-1);let i=Nn(t),a;try{a=e(...n)}finally{Nn(i),r._d&&xa(1)}return a};return r._n=!0,r._c=!0,r._d=!0,r}function Fn(e,n){if(jn===null)return e;let r=ao(jn),i=e.dirs||=[];for(let e=0;e1)return n&&h(t)?t.call(r&&r.proxy):t}}function zn(){return!!(Wa()||Si)}var Bn=Symbol.for(`v-scx`),Vn=()=>Rn(Bn);function Hn(e,t){return Un(e,null,t)}function R(e,t,n){return Un(e,t,n)}function Un(e,n,i=t){let{immediate:a,deep:o,flush:c,once:l}=i,u=s({},i),d=n&&a||!n&&c!==`post`,f;if(Xa){if(c===`sync`){let e=Vn();f=e.__watcherHandles||=[]}else if(!d){let e=()=>{};return e.stop=r,e.resume=r,e.pause=r,e}}let p=Ua;u.call=(e,t,n)=>fn(e,p,t,n);let m=!1;c===`post`?u.scheduler=e=>{$i(e,p&&p.suspense)}:c!==`sync`&&(m=!0,u.scheduler=(e,t)=>{t?e():wn(e)}),u.augmentJob=e=>{n&&(e.flags|=4),m&&(e.flags|=2,p&&(e.id=p.uid,e.i=p))};let h=ln(e,n,u);return Xa&&(f?f.push(h):d&&h()),h}function Wn(e,t,n){let r=this.proxy,i=g(e)?e.includes(`.`)?Gn(r,e):()=>r[e]:e.bind(r,r),a;h(t)?a=t:(a=t.handler,n=t);let o=qa(this),s=Un(i,a.bind(r),n);return o(),s}function Gn(e,t){let n=t.split(`.`);return()=>{let t=e;for(let e=0;ee.__isTeleport,Yn=e=>e&&(e.disabled||e.disabled===``),Xn=e=>e&&(e.defer||e.defer===``),Zn=e=>typeof SVGElement<`u`&&e instanceof SVGElement,Qn=e=>typeof MathMLElement==`function`&&e instanceof MathMLElement,$n=(e,t)=>{let n=e&&e.to;return g(n)?t?t(n):null:n},er={name:`Teleport`,__isTeleport:!0,process(e,t,n,r,i,a,o,s,c,l){let{mc:u,pc:d,pbc:f,o:{insert:p,querySelector:m,createText:h,createComment:g,parentNode:_}}=l,v=Yn(t.props),{dynamicChildren:y}=t,b=(e,t,n)=>{e.shapeFlag&16&&u(e.children,t,n,i,a,o,s,c)},x=(e=t)=>{let n=Yn(e.props),r=e.target=$n(e.props,m),a=ar(r,e,h,p);r&&(o!==`svg`&&Zn(r)?o=`svg`:o!==`mathml`&&Qn(r)&&(o=`mathml`),i&&i.isCE&&(i.ce._teleportTargets||(i.ce._teleportTargets=new Set)).add(r),n||(b(e,r,a),ir(e,!1)))},S=e=>{let t=()=>{Kn.get(e)===t&&(Kn.delete(e),Yn(e.props)&&(b(e,_(e.el)||n,e.anchor),ir(e,!0)),x(e))};Kn.set(e,t),$i(t,a)};if(e==null){let e=t.el=h(``),i=t.anchor=h(``);if(p(e,n,r),p(i,n,r),Xn(t.props)||a&&a.pendingBranch){S(t);return}v&&(b(t,n,i),ir(t,!0)),x()}else{t.el=e.el;let r=t.anchor=e.anchor,u=Kn.get(e);if(u){u.flags|=8,Kn.delete(e),S(t);return}t.targetStart=e.targetStart;let p=t.target=e.target,h=t.targetAnchor=e.targetAnchor,g=Yn(e.props),_=g?n:p,b=g?r:h;if(o===`svg`||Zn(p)?o=`svg`:(o===`mathml`||Qn(p))&&(o=`mathml`),y?(f(e.dynamicChildren,y,_,i,a,o,s),aa(e,t,!0)):c||d(e,t,_,b,i,a,o,s,!1),v)g?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):tr(t,n,r,l,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){let e=t.target=$n(t.props,m);e&&tr(t,e,null,l,0)}else g&&tr(t,p,h,l,1);ir(t,v)}},remove(e,t,n,{um:r,o:{remove:i}},a){let{shapeFlag:o,children:s,anchor:c,targetStart:l,targetAnchor:u,target:d,props:f}=e,p=a||!Yn(f),m=Kn.get(e);if(m&&(m.flags|=8,Kn.delete(e)),d&&(i(l),i(u)),a&&i(c),!m&&o&16)for(let e=0;e{e.isMounted=!0}),Rr(()=>{e.isUnmounting=!0}),e}var lr=[Function,Array],ur={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:lr,onEnter:lr,onAfterEnter:lr,onEnterCancelled:lr,onBeforeLeave:lr,onLeave:lr,onAfterLeave:lr,onLeaveCancelled:lr,onBeforeAppear:lr,onAppear:lr,onAfterAppear:lr,onAppearCancelled:lr},dr=e=>{let t=e.subTree;return t.component?dr(t.component):t},fr={name:`BaseTransition`,props:ur,setup(e,{slots:t}){let n=Wa(),r=cr();return()=>{let i=t.default&&br(t.default(),!0),a=i&&i.length?pr(i):n.subTree?Fa():void 0;if(!a)return;let o=Ut(e),{mode:s}=o;if(r.isLeaving)return _r(a);let c=vr(a);if(!c)return _r(a);let l=gr(c,o,r,n,e=>l=e);c.type!==ma&&yr(c,l);let u=n.subTree&&vr(n.subTree);if(u&&u.type!==ma&&!Ea(u,c)&&dr(n).type!==ma){let e=gr(u,o,r,n);if(yr(u,e),s===`out-in`&&c.type!==ma)return r.isLeaving=!0,e.afterLeave=()=>{r.isLeaving=!1,n.job.flags&8||n.update(),delete e.afterLeave,u=void 0},_r(a);s===`in-out`&&c.type!==ma?e.delayLeave=(e,t,n)=>{let i=hr(r,u);i[String(u.key)]=u,e[or]=()=>{t(),e[or]=void 0,delete l.delayedLeave,u=void 0},l.delayedLeave=()=>{n(),delete l.delayedLeave,u=void 0}}:u=void 0}else u&&=void 0;return a}}};function pr(e){let t=e[0];if(e.length>1){for(let n of e)if(n.type!==ma){t=n;break}}return t}var mr=fr;function hr(e,t){let{leavingVNodes:n}=e,r=n.get(t.type);return r||(r=Object.create(null),n.set(t.type,r)),r}function gr(e,t,n,r,i){let{appear:a,mode:o,persisted:s=!1,onBeforeEnter:c,onEnter:l,onAfterEnter:u,onEnterCancelled:f,onBeforeLeave:p,onLeave:m,onAfterLeave:h,onLeaveCancelled:g,onBeforeAppear:_,onAppear:v,onAfterAppear:y,onAppearCancelled:b}=t,x=String(e.key),S=hr(n,e),C=(e,t)=>{e&&fn(e,r,9,t)},w=(e,t)=>{let n=t[1];C(e,t),d(e)?e.every(e=>e.length<=1)&&n():e.length<=1&&n()},T={mode:o,persisted:s,beforeEnter(t){let r=c;if(!n.isMounted)if(a)r=_||c;else return;t[or]&&t[or](!0);let i=S[x];i&&Ea(e,i)&&i.el[or]&&i.el[or](),C(r,[t])},enter(t){if(S[x]===e)return;let r=l,i=u,o=f;if(!n.isMounted)if(a)r=v||l,i=y||u,o=b||f;else return;let s=!1;t[sr]=e=>{s||(s=!0,C(e?o:i,[t]),T.delayedLeave&&T.delayedLeave(),t[sr]=void 0)};let c=t[sr].bind(null,!1);r?w(r,[t,c]):c()},leave(t,r){let i=String(e.key);if(t[sr]&&t[sr](!0),n.isUnmounting)return r();C(p,[t]);let a=!1;t[or]=n=>{a||(a=!0,r(),C(n?g:h,[t]),t[or]=void 0,S[i]===e&&delete S[i])};let o=t[or].bind(null,!1);S[i]=e,m?w(m,[t,o]):o()},clone(e){let a=gr(e,t,n,r,i);return i&&i(a),a}};return T}function _r(e){if(Dr(e))return e=Ma(e),e.children=null,e}function vr(e){if(!Dr(e))return Jn(e.type)&&e.children?pr(e.children):e;if(e.component)return e.component.subTree;let{shapeFlag:t,children:n}=e;if(n){if(t&16)return n[0];if(t&32&&h(n.default))return n.default()}}function yr(e,t){e.shapeFlag&6&&e.component?(e.transition=t,yr(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function br(e,t=!1,n){let r=[],i=0;for(let a=0;a1)for(let e=0;ewr(e,n&&(d(n)?n[t]:n),r,a,o));return}if(Er(a)&&!o){a.shapeFlag&512&&a.type.__asyncResolved&&a.component.subTree.component&&wr(e,n,r,a.component.subTree);return}let s=a.shapeFlag&4?ao(a.component):a.el,l=o?null:s,{i:f,r:p}=e,m=n&&n.r,_=f.refs===t?f.refs={}:f.refs,v=f.setupState,y=Ut(v),b=v===t?i:e=>Sr(_,e)?!1:u(y,e),x=(e,t)=>!(t&&Sr(_,t));if(m!=null&&m!==p){if(Tr(n),g(m))_[m]=null,b(m)&&(v[m]=null);else if(qt(m)){let e=n;x(m,e.k)&&(m.value=null),e.k&&(_[e.k]=null)}}if(h(p))dn(p,f,12,[l,_]);else{let t=g(p),n=qt(p);if(t||n){let i=()=>{if(e.f){let n=t?b(p)?v[p]:_[p]:x(p)||!e.k?p.value:_[e.k];if(o)d(n)&&c(n,s);else if(d(n))n.includes(s)||n.push(s);else if(t)_[p]=[s],b(p)&&(v[p]=_[p]);else{let t=[s];x(p,e.k)&&(p.value=t),e.k&&(_[e.k]=t)}}else t?(_[p]=l,b(p)&&(v[p]=l)):n&&(x(p,e.k)&&(p.value=l),e.k&&(_[e.k]=l))};if(l){let t=()=>{i(),Cr.delete(e)};t.id=-1,Cr.set(e,t),$i(t,r)}else Tr(e),i()}}}function Tr(e){let t=Cr.get(e);t&&(t.flags|=8,Cr.delete(e))}re().requestIdleCallback,re().cancelIdleCallback;var Er=e=>!!e.type.__asyncLoader,Dr=e=>e.type.__isKeepAlive;function Or(e,t){Ar(e,`a`,t)}function kr(e,t){Ar(e,`da`,t)}function Ar(e,t,n=Ua){let r=e.__wdc||=()=>{let t=n;for(;t;){if(t.isDeactivated)return;t=t.parent}return e()};if(Mr(t,r,n),n){let e=n.parent;for(;e&&e.parent;)Dr(e.parent.vnode)&&jr(r,t,n,e),e=e.parent}}function jr(e,t,n,r){let i=Mr(t,e,r,!0);zr(()=>{c(r[t],i)},n)}function Mr(e,t,n=Ua,r=!1){if(n){let i=n[e]||(n[e]=[]),a=t.__weh||=(...r)=>{He();let i=qa(n),a=fn(t,n,e,r);return i(),Ue(),a};return r?i.unshift(a):i.push(a),a}}var Nr=e=>(t,n=Ua)=>{(!Xa||e===`sp`)&&Mr(e,(...e)=>t(...e),n)},Pr=Nr(`bm`),Fr=Nr(`m`),Ir=Nr(`bu`),Lr=Nr(`u`),Rr=Nr(`bum`),zr=Nr(`um`),Br=Nr(`sp`),Vr=Nr(`rtg`),Hr=Nr(`rtc`);function Ur(e,t=Ua){Mr(`ec`,e,t)}var Wr=`components`,Gr=`directives`;function Kr(e,t){return Xr(Wr,e,!0,t)||e}var qr=Symbol.for(`v-ndc`);function Jr(e){return g(e)?Xr(Wr,e,!1)||e:e||qr}function Yr(e){return Xr(Gr,e)}function Xr(e,t,n=!0,r=!1){let i=jn||Ua;if(i){let n=i.type;if(e===Wr){let e=oo(n,!1);if(e&&(e===t||e===O(t)||e===j(O(t))))return n}let a=Zr(i[e]||n[e],t)||Zr(i.appContext[e],t);return!a&&r?n:a}}function Zr(e,t){return e&&(e[t]||e[O(t)]||e[j(O(t))])}function Qr(e,t,n,r){let i,a=n&&n[r],o=d(e);if(o||g(e)){let n=o&&zt(e),r=!1,s=!1;n&&(r=!Vt(e),s=Bt(e),e=rt(e)),i=Array(e.length);for(let n=0,o=e.length;nt(e,n,void 0,a&&a[n]));else{let n=Object.keys(e);i=Array(n.length);for(let r=0,o=n.length;re?Ya(e)?ao(e):$r(e.parent):null,ei=s(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>$r(e.parent),$root:e=>$r(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>li(e),$forceUpdate:e=>e.f||=()=>{wn(e.update)},$nextTick:e=>e.n||=Sn.bind(e.proxy),$watch:e=>Wn.bind(e)}),ti=(e,n)=>e!==t&&!e.__isScriptSetup&&u(e,n),ni={get({_:e},n){if(n===`__v_skip`)return!0;let{ctx:r,setupState:i,data:a,props:o,accessCache:s,type:c,appContext:l}=e;if(n[0]!==`$`){let e=s[n];if(e!==void 0)switch(e){case 1:return i[n];case 2:return a[n];case 4:return r[n];case 3:return o[n]}else if(ti(i,n))return s[n]=1,i[n];else if(a!==t&&u(a,n))return s[n]=2,a[n];else if(u(o,n))return s[n]=3,o[n];else if(r!==t&&u(r,n))return s[n]=4,r[n];else ii&&(s[n]=0)}let d=ei[n],f,p;if(d)return n===`$attrs`&&$e(e.attrs,`get`,``),d(e);if((f=c.__cssModules)&&(f=f[n]))return f;if(r!==t&&u(r,n))return s[n]=4,r[n];if(p=l.config.globalProperties,u(p,n))return p[n]},set({_:e},n,r){let{data:i,setupState:a,ctx:o}=e;return ti(a,n)?(a[n]=r,!0):i!==t&&u(i,n)?(i[n]=r,!0):u(e.props,n)||n[0]===`$`&&n.slice(1)in e?!1:(o[n]=r,!0)},has({_:{data:e,setupState:n,accessCache:r,ctx:i,appContext:a,props:o,type:s}},c){let l;return!!(r[c]||e!==t&&c[0]!==`$`&&u(e,c)||ti(n,c)||u(o,c)||u(i,c)||u(ei,c)||u(a.config.globalProperties,c)||(l=s.__cssModules)&&l[c])},defineProperty(e,t,n){return n.get==null?u(n,`value`)&&this.set(e,t,n.value,null):e._.accessCache[t]=0,Reflect.defineProperty(e,t,n)}};function ri(e){return d(e)?e.reduce((e,t)=>(e[t]=null,e),{}):e}var ii=!0;function ai(e){let t=li(e),n=e.proxy,i=e.ctx;ii=!1,t.beforeCreate&&si(t.beforeCreate,e,`bc`);let{data:a,computed:o,methods:s,watch:c,provide:l,inject:u,created:f,beforeMount:p,mounted:m,beforeUpdate:g,updated:_,activated:y,deactivated:b,beforeDestroy:x,beforeUnmount:S,destroyed:C,unmounted:w,render:T,renderTracked:E,renderTriggered:D,errorCaptured:O,serverPrefetch:k,expose:A,inheritAttrs:j,components:M,directives:N,filters:P}=t;if(u&&oi(u,i,null),s)for(let e in s){let t=s[e];h(t)&&(i[e]=t.bind(n))}if(a){let t=a.call(n,n);v(t)&&(e.data=Ft(t))}if(ii=!0,o)for(let e in o){let t=o[e],a=H({get:h(t)?t.bind(n,n):h(t.get)?t.get.bind(n,n):r,set:!h(t)&&h(t.set)?t.set.bind(n):r});Object.defineProperty(i,e,{enumerable:!0,configurable:!0,get:()=>a.value,set:e=>a.value=e})}if(c)for(let e in c)ci(c[e],i,n,e);if(l){let e=h(l)?l.call(n):l;Reflect.ownKeys(e).forEach(t=>{Ln(t,e[t])})}f&&si(f,e,`c`);function F(e,t){d(t)?t.forEach(t=>e(t.bind(n))):t&&e(t.bind(n))}if(F(Pr,p),F(Fr,m),F(Ir,g),F(Lr,_),F(Or,y),F(kr,b),F(Ur,O),F(Hr,E),F(Vr,D),F(Rr,S),F(zr,w),F(Br,k),d(A))if(A.length){let t=e.exposed||={};A.forEach(e=>{Object.defineProperty(t,e,{get:()=>n[e],set:t=>n[e]=t,enumerable:!0})})}else e.exposed||={};T&&e.render===r&&(e.render=T),j!=null&&(e.inheritAttrs=j),M&&(e.components=M),N&&(e.directives=N),k&&xr(e)}function oi(e,t,n=r){d(e)&&(e=mi(e));for(let n in e){let r=e[n],i;i=v(r)?`default`in r?Rn(r.from||n,r.default,!0):Rn(r.from||n):Rn(r),qt(i)?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>i.value,set:e=>i.value=e}):t[n]=i}}function si(e,t,n){fn(d(e)?e.map(e=>e.bind(t.proxy)):e.bind(t.proxy),t,n)}function ci(e,t,n,r){let i=r.includes(`.`)?Gn(n,r):()=>n[r];if(g(e)){let n=t[e];h(n)&&R(i,n)}else if(h(e))R(i,e.bind(n));else if(v(e))if(d(e))e.forEach(e=>ci(e,t,n,r));else{let r=h(e.handler)?e.handler.bind(n):t[e.handler];h(r)&&R(i,r,e)}}function li(e){let t=e.type,{mixins:n,extends:r}=t,{mixins:i,optionsCache:a,config:{optionMergeStrategies:o}}=e.appContext,s=a.get(t),c;return s?c=s:!i.length&&!n&&!r?c=t:(c={},i.length&&i.forEach(e=>ui(c,e,o,!0)),ui(c,t,o)),v(t)&&a.set(t,c),c}function ui(e,t,n,r=!1){let{mixins:i,extends:a}=t;a&&ui(e,a,n,!0),i&&i.forEach(t=>ui(e,t,n,!0));for(let i in t)if(!(r&&i===`expose`)){let r=di[i]||n&&n[i];e[i]=r?r(e[i],t[i]):t[i]}return e}var di={data:fi,props:_i,emits:_i,methods:gi,computed:gi,beforeCreate:hi,created:hi,beforeMount:hi,mounted:hi,beforeUpdate:hi,updated:hi,beforeDestroy:hi,beforeUnmount:hi,destroyed:hi,unmounted:hi,activated:hi,deactivated:hi,errorCaptured:hi,serverPrefetch:hi,components:gi,directives:gi,watch:vi,provide:fi,inject:pi};function fi(e,t){return t?e?function(){return s(h(e)?e.call(this,this):e,h(t)?t.call(this,this):t)}:t:e}function pi(e,t){return gi(mi(e),mi(t))}function mi(e){if(d(e)){let t={};for(let n=0;nt===`modelValue`||t===`model-value`?e.modelModifiers:e[`${t}Modifiers`]||e[`${O(t)}Modifiers`]||e[`${A(t)}Modifiers`];function wi(e,n,...r){if(e.isUnmounted)return;let i=e.vnode.props||t,a=r,o=n.startsWith(`update:`),s=o&&Ci(i,n.slice(7));s&&(s.trim&&(a=r.map(e=>g(e)?e.trim():e)),s.number&&(a=r.map(ee)));let c,l=i[c=M(n)]||i[c=M(O(n))];!l&&o&&(l=i[c=M(A(n))]),l&&fn(l,e,6,a);let u=i[c+`Once`];if(u){if(!e.emitted)e.emitted={};else if(e.emitted[c])return;e.emitted[c]=!0,fn(u,e,6,a)}}var Ti=new WeakMap;function Ei(e,t,n=!1){let r=n?Ti:t.emitsCache,i=r.get(e);if(i!==void 0)return i;let a=e.emits,o={},c=!1;if(!h(e)){let r=e=>{let n=Ei(e,t,!0);n&&(c=!0,s(o,n))};!n&&t.mixins.length&&t.mixins.forEach(r),e.extends&&r(e.extends),e.mixins&&e.mixins.forEach(r)}return!a&&!c?(v(e)&&r.set(e,null),null):(d(a)?a.forEach(e=>o[e]=null):s(o,a),v(e)&&r.set(e,o),o)}function Di(e,t){return!e||!a(t)?!1:(t=t.slice(2).replace(/Once$/,``),u(e,t[0].toLowerCase()+t.slice(1))||u(e,A(t))||u(e,t))}function Oi(e){let{type:t,vnode:n,proxy:r,withProxy:i,propsOptions:[a],slots:s,attrs:c,emit:l,render:u,renderCache:d,props:f,data:p,setupState:m,ctx:h,inheritAttrs:g}=e,_=Nn(e),v,y;try{if(n.shapeFlag&4){let e=i||r,t=e;v=Ia(u.call(t,e,d,f,m,p,h)),y=c}else{let e=t;v=Ia(e.length>1?e(f,{attrs:c,slots:s,emit:l}):e(f,null)),y=t.props?c:ki(c)}}catch(t){ga.length=0,pn(t,e,1),v=B(ma)}let b=v;if(y&&g!==!1){let e=Object.keys(y),{shapeFlag:t}=b;e.length&&t&7&&(a&&e.some(o)&&(y=Ai(y,a)),b=Ma(b,y,!1,!0))}return n.dirs&&(b=Ma(b,null,!1,!0),b.dirs=b.dirs?b.dirs.concat(n.dirs):n.dirs),n.transition&&yr(b,n.transition),v=b,Nn(_),v}var ki=e=>{let t;for(let n in e)(n===`class`||n===`style`||a(n))&&((t||={})[n]=e[n]);return t},Ai=(e,t)=>{let n={};for(let r in e)(!o(r)||!(r.slice(9)in t))&&(n[r]=e[r]);return n};function ji(e,t,n){let{props:r,children:i,component:a}=e,{props:o,children:s,patchFlag:c}=t,l=a.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&c>=0){if(c&1024)return!0;if(c&16)return r?Mi(r,o,l):!!o;if(c&8){let e=t.dynamicProps;for(let t=0;tObject.create(Fi),Li=e=>Object.getPrototypeOf(e)===Fi;function Ri(e,t,n,r=!1){let i={},a=Ii();e.propsDefaults=Object.create(null),Bi(e,t,i,a);for(let t in e.propsOptions[0])t in i||(i[t]=void 0);n?e.props=r?i:It(i):e.type.props?e.props=i:e.props=a,e.attrs=a}function zi(e,t,n,r){let{props:i,attrs:a,vnode:{patchFlag:o}}=e,s=Ut(i),[c]=e.propsOptions,l=!1;if((r||o>0)&&!(o&16)){if(o&8){let n=e.vnode.dynamicProps;for(let r=0;r{p=!0;let[t,n]=Ui(e,r,!0);s(l,t),n&&f.push(...n)};!i&&r.mixins.length&&r.mixins.forEach(t),e.extends&&t(e.extends),e.mixins&&e.mixins.forEach(t)}if(!c&&!p)return v(e)&&a.set(e,n),n;if(d(c))for(let e=0;ee===`_`||e===`_ctx`||e===`$stable`,Ki=e=>d(e)?e.map(Ia):[Ia(e)],qi=(e,t,n)=>{if(t._n)return t;let r=Pn((...e)=>Ki(t(...e)),n);return r._c=!1,r},Ji=(e,t,n)=>{let r=e._ctx;for(let n in e){if(Gi(n))continue;let i=e[n];if(h(i))t[n]=qi(n,i,r);else if(i!=null){let e=Ki(i);t[n]=()=>e}}},Yi=(e,t)=>{let n=Ki(t);e.slots.default=()=>n},Xi=(e,t,n)=>{for(let r in t)(n||!Gi(r))&&(e[r]=t[r])},Zi=(e,t,n)=>{let r=e.slots=Ii();if(e.vnode.shapeFlag&32){let e=t._;e?(Xi(r,t,n),n&&F(r,`_`,e,!0)):Ji(t,r)}else t&&Yi(e,t)},Qi=(e,n,r)=>{let{vnode:i,slots:a}=e,o=!0,s=t;if(i.shapeFlag&32){let e=n._;e?r&&e===1?o=!1:Xi(a,n,r):(o=!n.$stable,Ji(n,a)),s=n}else n&&(Yi(e,n),s={default:1});if(o)for(let e in a)!Gi(e)&&s[e]==null&&delete a[e]},$i=da;function ea(e){return ta(e)}function ta(e,i){let a=re();a.__VUE__=!0;let{insert:o,remove:s,patchProp:c,createElement:l,createText:u,createComment:d,setText:f,setElementText:p,parentNode:m,nextSibling:h,setScopeId:g=r,insertStaticContent:_}=e,v=(e,t,n,r=null,i=null,a=null,o=void 0,s=null,c=!!t.dynamicChildren)=>{if(e===t)return;e&&!Ea(e,t)&&(r=pe(e),ce(e,i,a,!0),e=null),t.patchFlag===-2&&(c=!1,t.dynamicChildren=null);let{type:l,ref:u,shapeFlag:d}=t;switch(l){case pa:y(e,t,n,r);break;case ma:b(e,t,n,r);break;case ha:e??x(t,n,r,o);break;case fa:M(e,t,n,r,i,a,o,s,c);break;default:d&1?w(e,t,n,r,i,a,o,s,c):d&6?N(e,t,n,r,i,a,o,s,c):(d&64||d&128)&&l.process(e,t,n,r,i,a,o,s,c,ge)}u!=null&&i?wr(u,e&&e.ref,a,t||e,!t):u==null&&e&&e.ref!=null&&wr(e.ref,null,a,e,!0)},y=(e,t,n,r)=>{if(e==null)o(t.el=u(t.children),n,r);else{let n=t.el=e.el;t.children!==e.children&&f(n,t.children)}},b=(e,t,n,r)=>{e==null?o(t.el=d(t.children||``),n,r):t.el=e.el},x=(e,t,n,r)=>{[e.el,e.anchor]=_(e.children,t,n,r,e.el,e.anchor)},S=({el:e,anchor:t},n,r)=>{let i;for(;e&&e!==t;)i=h(e),o(e,n,r),e=i;o(t,n,r)},C=({el:e,anchor:t})=>{let n;for(;e&&e!==t;)n=h(e),s(e),e=n;s(t)},w=(e,t,n,r,i,a,o,s,c)=>{if(t.type===`svg`?o=`svg`:t.type===`math`&&(o=`mathml`),e==null)E(t,n,r,i,a,o,s,c);else{let n=e.el&&e.el._isVueCE?e.el:null;try{n&&n._beginPatch(),k(e,t,i,a,o,s,c)}finally{n&&n._endPatch()}}},E=(e,t,n,r,i,a,s,u)=>{let d,f,{props:m,shapeFlag:h,transition:g,dirs:_}=e;if(d=e.el=l(e.type,a,m&&m.is,m),h&8?p(d,e.children):h&16&&O(e.children,d,null,r,i,na(e,a),s,u),_&&In(e,null,r,`created`),D(d,e,e.scopeId,s,r),m){for(let e in m)e!==`value`&&!T(e)&&c(d,e,null,m[e],a,r);`value`in m&&c(d,`value`,null,m.value,a),(f=m.onVnodeBeforeMount)&&za(f,r,e)}_&&In(e,null,r,`beforeMount`);let v=ia(i,g);v&&g.beforeEnter(d),o(d,t,n),((f=m&&m.onVnodeMounted)||v||_)&&$i(()=>{try{f&&za(f,r,e),v&&g.enter(d),_&&In(e,null,r,`mounted`)}finally{}},i)},D=(e,t,n,r,i)=>{if(n&&g(e,n),r)for(let t=0;t{for(let l=c;l{let l=n.el=e.el,{patchFlag:u,dynamicChildren:d,dirs:f}=n;u|=e.patchFlag&16;let m=e.props||t,h=n.props||t,g;if(r&&ra(r,!1),(g=h.onVnodeBeforeUpdate)&&za(g,r,n,e),f&&In(n,e,r,`beforeUpdate`),r&&ra(r,!0),(m.innerHTML&&h.innerHTML==null||m.textContent&&h.textContent==null)&&p(l,``),d?A(e.dynamicChildren,d,l,r,i,na(n,a),o):s||ie(e,n,l,null,r,i,na(n,a),o,!1),u>0){if(u&16)j(l,m,h,r,a);else if(u&2&&m.class!==h.class&&c(l,`class`,null,h.class,a),u&4&&c(l,`style`,m.style,h.style,a),u&8){let e=n.dynamicProps;for(let t=0;t{g&&za(g,r,n,e),f&&In(n,e,r,`updated`)},i)},A=(e,t,n,r,i,a,o)=>{for(let s=0;s{if(n!==r){if(n!==t)for(let t in n)!T(t)&&!(t in r)&&c(e,t,n[t],null,a,i);for(let t in r){if(T(t))continue;let o=r[t],s=n[t];o!==s&&t!==`value`&&c(e,t,s,o,a,i)}`value`in r&&c(e,`value`,n.value,r.value,a)}},M=(e,t,n,r,i,a,s,c,l)=>{let d=t.el=e?e.el:u(``),f=t.anchor=e?e.anchor:u(``),{patchFlag:p,dynamicChildren:m,slotScopeIds:h}=t;h&&(c=c?c.concat(h):h),e==null?(o(d,n,r),o(f,n,r),O(t.children||[],n,f,i,a,s,c,l)):p>0&&p&64&&m&&e.dynamicChildren&&e.dynamicChildren.length===m.length?(A(e.dynamicChildren,m,n,i,a,s,c),(t.key!=null||i&&t===i.subTree)&&aa(e,t,!0)):ie(e,t,n,f,i,a,s,c,l)},N=(e,t,n,r,i,a,o,s,c)=>{t.slotScopeIds=s,e==null?t.shapeFlag&512?i.ctx.activate(t,n,r,o,c):F(t,n,r,i,a,o,c):ee(e,t,c)},F=(e,t,n,r,i,a,o)=>{let s=e.component=Ha(e,r,i);if(Dr(e)&&(s.ctx.renderer=ge),Za(s,!1,o),s.asyncDep){if(i&&i.registerDep(s,te,o),!e.el){let r=s.subTree=B(ma);b(null,r,t,n),e.placeholder=r.el}}else te(s,e,t,n,i,a,o)},ee=(e,t,n)=>{let r=t.component=e.component;if(ji(e,t,n))if(r.asyncDep&&!r.asyncResolved){ne(r,t,n);return}else r.next=t,r.update();else t.el=e.el,r.vnode=t},te=(e,t,n,r,i,a,o)=>{let s=()=>{if(e.isMounted){let{next:t,bu:n,u:r,parent:s,vnode:c}=e;{let n=sa(e);if(n){t&&(t.el=c.el,ne(e,t,o)),n.asyncDep.then(()=>{$i(()=>{e.isUnmounted||l()},i)});return}}let u=t,d;ra(e,!1),t?(t.el=c.el,ne(e,t,o)):t=c,n&&P(n),(d=t.props&&t.props.onVnodeBeforeUpdate)&&za(d,s,t,c),ra(e,!0);let f=Oi(e),p=e.subTree;e.subTree=f,v(p,f,m(p.el),pe(p),e,i,a),t.el=f.el,u===null&&Pi(e,f.el),r&&$i(r,i),(d=t.props&&t.props.onVnodeUpdated)&&$i(()=>za(d,s,t,c),i)}else{let o,{el:s,props:c}=t,{bm:l,m:u,parent:d,root:f,type:p}=e,m=Er(t);if(ra(e,!1),l&&P(l),!m&&(o=c&&c.onVnodeBeforeMount)&&za(o,d,t),ra(e,!0),s&&ve){let t=()=>{e.subTree=Oi(e),ve(s,e.subTree,e,i,null)};m&&p.__asyncHydrate?p.__asyncHydrate(s,e,t):t()}else{f.ce&&f.ce._hasShadowRoot()&&f.ce._injectChildStyle(p,e.parent?e.parent.type:void 0);let o=e.subTree=Oi(e);v(null,o,n,r,e,i,a),t.el=o.el}if(u&&$i(u,i),!m&&(o=c&&c.onVnodeMounted)){let e=t;$i(()=>za(o,d,e),i)}(t.shapeFlag&256||d&&Er(d.vnode)&&d.vnode.shapeFlag&256)&&e.a&&$i(e.a,i),e.isMounted=!0,t=n=r=null}};e.scope.on();let c=e.effect=new De(s);e.scope.off();let l=e.update=c.run.bind(c),u=e.job=c.runIfDirty.bind(c);u.i=e,u.id=e.uid,c.scheduler=()=>wn(u),ra(e,!0),l()},ne=(e,t,n)=>{t.component=e;let r=e.vnode.props;e.vnode=t,e.next=null,zi(e,t.props,r,n),Qi(e,t.children,n),He(),Dn(e),Ue()},ie=(e,t,n,r,i,a,o,s,c=!1)=>{let l=e&&e.children,u=e?e.shapeFlag:0,d=t.children,{patchFlag:f,shapeFlag:m}=t;if(f>0){if(f&128){oe(l,d,n,r,i,a,o,s,c);return}else if(f&256){ae(l,d,n,r,i,a,o,s,c);return}}m&8?(u&16&&fe(l,i,a),d!==l&&p(n,d)):u&16?m&16?oe(l,d,n,r,i,a,o,s,c):fe(l,i,a,!0):(u&8&&p(n,``),m&16&&O(d,n,r,i,a,o,s,c))},ae=(e,t,r,i,a,o,s,c,l)=>{e||=n,t||=n;let u=e.length,d=t.length,f=Math.min(u,d),p;for(p=0;pd?fe(e,a,o,!0,!1,f):O(t,r,i,a,o,s,c,l,f)},oe=(e,t,r,i,a,o,s,c,l)=>{let u=0,d=t.length,f=e.length-1,p=d-1;for(;u<=f&&u<=p;){let n=e[u],i=t[u]=l?La(t[u]):Ia(t[u]);if(Ea(n,i))v(n,i,r,null,a,o,s,c,l);else break;u++}for(;u<=f&&u<=p;){let n=e[f],i=t[p]=l?La(t[p]):Ia(t[p]);if(Ea(n,i))v(n,i,r,null,a,o,s,c,l);else break;f--,p--}if(u>f){if(u<=p){let e=p+1,n=ep)for(;u<=f;)ce(e[u],a,o,!0),u++;else{let m=u,h=u,g=new Map;for(u=h;u<=p;u++){let e=t[u]=l?La(t[u]):Ia(t[u]);e.key!=null&&g.set(e.key,u)}let _,y=0,b=p-h+1,x=!1,S=0,C=Array(b);for(u=0;u=b){ce(n,a,o,!0);continue}let i;if(n.key!=null)i=g.get(n.key);else for(_=h;_<=p;_++)if(C[_-h]===0&&Ea(n,t[_])){i=_;break}i===void 0?ce(n,a,o,!0):(C[i-h]=u+1,i>=S?S=i:x=!0,v(n,t[i],r,null,a,o,s,c,l),y++)}let w=x?oa(C):n;for(_=w.length-1,u=b-1;u>=0;u--){let e=h+u,n=t[e],f=t[e+1],p=e+1{let{el:a,type:c,transition:l,children:u,shapeFlag:d}=e;if(d&6){se(e.component.subTree,t,n,r);return}if(d&128){e.suspense.move(t,n,r);return}if(d&64){c.move(e,t,n,ge);return}if(c===fa){o(a,t,n);for(let e=0;el.enter(a),i));else{let{leave:r,delayLeave:i,afterLeave:c}=l,u=()=>{e.ctx.isUnmounted?s(a):o(a,t,n)},d=()=>{let e=a._isLeaving||!!a[or];a._isLeaving&&a[or](!0),l.persisted&&!e?u():r(a,()=>{u(),c&&c()})};i?i(a,u,d):d()}else o(a,t,n)},ce=(e,t,n,r=!1,i=!1)=>{let{type:a,props:o,ref:s,children:c,dynamicChildren:l,shapeFlag:u,patchFlag:d,dirs:f,cacheIndex:p,memo:m}=e;if(d===-2&&(i=!1),s!=null&&(He(),wr(s,null,n,e,!0),Ue()),p!=null&&(t.renderCache[p]=void 0),u&256){t.ctx.deactivate(e);return}let h=u&1&&f,g=!Er(e),_;if(g&&(_=o&&o.onVnodeBeforeUnmount)&&za(_,t,e),u&6)de(e.component,n,r);else{if(u&128){e.suspense.unmount(n,r);return}h&&In(e,null,t,`beforeUnmount`),u&64?e.type.remove(e,t,n,ge,r):l&&!l.hasOnce&&(a!==fa||d>0&&d&64)?fe(l,t,n,!1,!0):(a===fa&&d&384||!i&&u&16)&&fe(c,t,n),r&&le(e)}let v=m!=null&&p==null;(g&&(_=o&&o.onVnodeUnmounted)||h||v)&&$i(()=>{_&&za(_,t,e),h&&In(e,null,t,`unmounted`),v&&(e.el=null)},n)},le=e=>{let{type:t,el:n,anchor:r,transition:i}=e;if(t===fa){ue(n,r);return}if(t===ha){C(e);return}let a=()=>{s(n),i&&!i.persisted&&i.afterLeave&&i.afterLeave()};if(e.shapeFlag&1&&i&&!i.persisted){let{leave:t,delayLeave:r}=i,o=()=>t(n,a);r?r(e.el,a,o):o()}else a()},ue=(e,t)=>{let n;for(;e!==t;)n=h(e),s(e),e=n;s(t)},de=(e,t,n)=>{let{bum:r,scope:i,job:a,subTree:o,um:s,m:c,a:l}=e;ca(c),ca(l),r&&P(r),i.stop(),a&&(a.flags|=8,ce(o,e,t,n)),s&&$i(s,t),$i(()=>{e.isUnmounted=!0},t)},fe=(e,t,n,r=!1,i=!1,a=0)=>{for(let o=a;o{if(e.shapeFlag&6)return pe(e.component.subTree);if(e.shapeFlag&128)return e.suspense.next();let t=h(e.anchor||e.el),n=t&&t[qn];return n?h(n):t},me=!1,he=(e,t,n)=>{let r;e==null?t._vnode&&(ce(t._vnode,null,null,!0),r=t._vnode.component):v(t._vnode||null,e,t,null,null,null,n),t._vnode=e,me||=(me=!0,Dn(r),On(),!1)},ge={p:v,um:ce,m:se,r:le,mt:F,mc:O,pc:ie,pbc:A,n:pe,o:e},_e,ve;return i&&([_e,ve]=i(ge)),{render:he,hydrate:_e,createApp:xi(he,_e)}}function na({type:e,props:t},n){return n===`svg`&&e===`foreignObject`||n===`mathml`&&e===`annotation-xml`&&t&&t.encoding&&t.encoding.includes(`html`)?void 0:n}function ra({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function ia(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function aa(e,t,n=!1){let r=e.children,i=t.children;if(d(r)&&d(i))for(let e=0;e>1,e[n[s]]0&&(t[r]=n[a-1]),n[a]=r)}}for(a=n.length,o=n[a-1];a-- >0;)n[a]=o,o=t[o];return n}function sa(e){let t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:sa(t)}function ca(e){if(e)for(let t=0;te.__isSuspense;function da(e,t){t&&t.pendingBranch?d(e)?t.effects.push(...e):t.effects.push(e):En(e)}var fa=Symbol.for(`v-fgt`),pa=Symbol.for(`v-txt`),ma=Symbol.for(`v-cmt`),ha=Symbol.for(`v-stc`),ga=[],_a=null;function va(e=!1){ga.push(_a=e?null:[])}function ya(){ga.pop(),_a=ga[ga.length-1]||null}var ba=1;function xa(e,t=!1){ba+=e,e<0&&_a&&t&&(_a.hasOnce=!0)}function Sa(e){return e.dynamicChildren=ba>0?_a||n:null,ya(),ba>0&&_a&&_a.push(e),e}function Ca(e,t,n,r,i,a){return Sa(ka(e,t,n,r,i,a,!0))}function wa(e,t,n,r,i){return Sa(B(e,t,n,r,i,!0))}function Ta(e){return e?e.__v_isVNode===!0:!1}function Ea(e,t){return e.type===t.type&&e.key===t.key}var Da=({key:e})=>e??null,Oa=({ref:e,ref_key:t,ref_for:n})=>(typeof e==`number`&&(e=``+e),e==null?null:g(e)||qt(e)||h(e)?{i:jn,r:e,k:t,f:!!n}:e);function ka(e,t=null,n=null,r=0,i=null,a=e===fa?0:1,o=!1,s=!1){let c={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Da(t),ref:t&&Oa(t),scopeId:Mn,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:a,patchFlag:r,dynamicProps:i,dynamicChildren:null,appContext:null,ctx:jn};return s?(Ra(c,n),a&128&&e.normalize(c)):n&&(c.shapeFlag|=g(n)?8:16),ba>0&&!o&&_a&&(c.patchFlag>0||a&6)&&c.patchFlag!==32&&_a.push(c),c}var B=Aa;function Aa(e,t=null,n=null,r=0,i=null,a=!1){if((!e||e===qr)&&(e=ma),Ta(e)){let r=Ma(e,t,!0);return n&&Ra(r,n),ba>0&&!a&&_a&&(r.shapeFlag&6?_a[_a.indexOf(e)]=r:_a.push(r)),r.patchFlag=-2,r}if(so(e)&&(e=e.__vccOpts),t){t=ja(t);let{class:e,style:n}=t;e&&!g(e)&&(t.class=le(e)),v(n)&&(Ht(n)&&!d(n)&&(n=s({},n)),t.style=ie(n))}let o=g(e)?1:ua(e)?128:Jn(e)?64:v(e)?4:h(e)?2:0;return ka(e,t,n,r,i,o,a,!0)}function ja(e){return e?Ht(e)||Li(e)?s({},e):e:null}function Ma(e,t,n=!1,r=!1){let{props:i,ref:a,patchFlag:o,children:s,transition:c}=e,l=t?V(i||{},t):i,u={__v_isVNode:!0,__v_skip:!0,type:e.type,props:l,key:l&&Da(l),ref:t&&t.ref?n&&a?d(a)?a.concat(Oa(t)):[a,Oa(t)]:Oa(t):a,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:s,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==fa?o===-1?16:o|16:o,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:c,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Ma(e.ssContent),ssFallback:e.ssFallback&&Ma(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return c&&r&&yr(u,c.clone(u)),u}function Na(e=` `,t=0){return B(pa,null,e,t)}function Pa(e,t){let n=B(ha,null,e);return n.staticCount=t,n}function Fa(e=``,t=!1){return t?(va(),wa(ma,null,e)):B(ma,null,e)}function Ia(e){return e==null||typeof e==`boolean`?B(ma):d(e)?B(fa,null,e.slice()):Ta(e)?La(e):B(pa,null,String(e))}function La(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Ma(e)}function Ra(e,t){let n=0,{shapeFlag:r}=e;if(t==null)t=null;else if(d(t))n=16;else if(typeof t==`object`)if(r&65){let n=t.default;n&&(n._c&&(n._d=!1),Ra(e,n()),n._c&&(n._d=!0));return}else{n=32;let r=t._;!r&&!Li(t)?t._ctx=jn:r===3&&jn&&(jn.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else h(t)?(t={default:t,_ctx:jn},n=32):(t=String(t),r&64?(n=16,t=[Na(t)]):n=8);e.children=t,e.shapeFlag|=n}function V(...e){let t={};for(let n=0;nUa||jn,Ga,Ka;{let e=re(),t=(t,n)=>{let r;return(r=e[t])||(r=e[t]=[]),r.push(n),e=>{r.length>1?r.forEach(t=>t(e)):r[0](e)}};Ga=t(`__VUE_INSTANCE_SETTERS__`,e=>Ua=e),Ka=t(`__VUE_SSR_SETTERS__`,e=>Xa=e)}var qa=e=>{let t=Ua;return Ga(e),e.scope.on(),()=>{e.scope.off(),Ga(t)}},Ja=()=>{Ua&&Ua.scope.off(),Ga(null)};function Ya(e){return e.vnode.shapeFlag&4}var Xa=!1;function Za(e,t=!1,n=!1){t&&Ka(t);let{props:r,children:i}=e.vnode,a=Ya(e);Ri(e,r,a,t),Zi(e,i,n||t);let o=a?Qa(e,t):void 0;return t&&Ka(!1),o}function Qa(e,t){let n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,ni);let{setup:r}=n;if(r){He();let n=e.setupContext=r.length>1?io(e):null,i=qa(e),a=dn(r,e,0,[e.props,n]),o=y(a);if(Ue(),i(),(o||e.sp)&&!Er(e)&&xr(e),o){if(a.then(Ja,Ja),t)return a.then(n=>{$a(e,n,t)}).catch(t=>{pn(t,e,0)});e.asyncDep=a}else $a(e,a,t)}else no(e,t)}function $a(e,t,n){h(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:v(t)&&(e.setupState=$t(t)),no(e,n)}var eo,to;function no(e,t,n){let i=e.type;if(!e.render){if(!t&&eo&&!i.render){let t=i.template||li(e).template;if(t){let{isCustomElement:n,compilerOptions:r}=e.appContext.config,{delimiters:a,compilerOptions:o}=i;i.render=eo(t,s(s({isCustomElement:n,delimiters:a},r),o))}}e.render=i.render||r,to&&to(e)}{let t=qa(e);He();try{ai(e)}finally{Ue(),t()}}}var ro={get(e,t){return $e(e,`get`,``),e[t]}};function io(e){return{attrs:new Proxy(e.attrs,ro),slots:e.slots,emit:e.emit,expose:t=>{e.exposed=t||{}}}}function ao(e){return e.exposed?e.exposeProxy||=new Proxy($t(Wt(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in ei)return ei[n](e)},has(e,t){return t in e||t in ei}}):e.proxy}function oo(e,t=!0){return h(e)?e.displayName||e.name:e.name||t&&e.__name}function so(e){return h(e)&&`__vccOpts`in e}var H=(e,t)=>rn(e,t,Xa);function co(e,t,n){try{xa(-1);let r=arguments.length;return r===2?v(t)&&!d(t)?Ta(t)?B(e,null,[t]):B(e,t):B(e,null,t):(r>3?n=Array.prototype.slice.call(arguments,2):r===3&&Ta(n)&&(n=[n]),B(e,t,n))}finally{xa(1)}}var lo=`3.5.35`,uo=void 0,fo=typeof window<`u`&&window.trustedTypes;if(fo)try{uo=fo.createPolicy(`vue`,{createHTML:e=>e})}catch{}var po=uo?e=>uo.createHTML(e):e=>e,mo=`http://www.w3.org/2000/svg`,ho=`http://www.w3.org/1998/Math/MathML`,go=typeof document<`u`?document:null,_o=go&&go.createElement(`template`),vo={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{let t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,r)=>{let i=t===`svg`?go.createElementNS(mo,e):t===`mathml`?go.createElementNS(ho,e):n?go.createElement(e,{is:n}):go.createElement(e);return e===`select`&&r&&r.multiple!=null&&i.setAttribute(`multiple`,r.multiple),i},createText:e=>go.createTextNode(e),createComment:e=>go.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>go.querySelector(e),setScopeId(e,t){e.setAttribute(t,``)},insertStaticContent(e,t,n,r,i,a){let o=n?n.previousSibling:t.lastChild;if(i&&(i===a||i.nextSibling))for(;t.insertBefore(i.cloneNode(!0),n),!(i===a||!(i=i.nextSibling)););else{_o.innerHTML=po(r===`svg`?`${e}`:r===`mathml`?`${e}`:e);let i=_o.content;if(r===`svg`||r===`mathml`){let e=i.firstChild;for(;e.firstChild;)i.appendChild(e.firstChild);i.removeChild(e)}t.insertBefore(i,n)}return[o?o.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},yo=`transition`,bo=`animation`,xo=Symbol(`_vtc`),So={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},Co=s({},ur,So),wo=(e=>(e.displayName=`Transition`,e.props=Co,e))((e,{slots:t})=>co(mr,Do(e),t)),To=(e,t=[])=>{d(e)?e.forEach(e=>e(...t)):e&&e(...t)},Eo=e=>e?d(e)?e.some(e=>e.length>1):e.length>1:!1;function Do(e){let t={};for(let n in e)n in So||(t[n]=e[n]);if(e.css===!1)return t;let{name:n=`v`,type:r,duration:i,enterFromClass:a=`${n}-enter-from`,enterActiveClass:o=`${n}-enter-active`,enterToClass:c=`${n}-enter-to`,appearFromClass:l=a,appearActiveClass:u=o,appearToClass:d=c,leaveFromClass:f=`${n}-leave-from`,leaveActiveClass:p=`${n}-leave-active`,leaveToClass:m=`${n}-leave-to`}=e,h=Oo(i),g=h&&h[0],_=h&&h[1],{onBeforeEnter:v,onEnter:y,onEnterCancelled:b,onLeave:x,onLeaveCancelled:S,onBeforeAppear:C=v,onAppear:w=y,onAppearCancelled:T=b}=t,E=(e,t,n,r)=>{e._enterCancelled=r,jo(e,t?d:c),jo(e,t?u:o),n&&n()},D=(e,t)=>{e._isLeaving=!1,jo(e,f),jo(e,m),jo(e,p),t&&t()},O=e=>(t,n)=>{let i=e?w:y,o=()=>E(t,e,n);To(i,[t,o]),Mo(()=>{jo(t,e?l:a),Ao(t,e?d:c),Eo(i)||Po(t,r,g,o)})};return s(t,{onBeforeEnter(e){To(v,[e]),Ao(e,a),Ao(e,o)},onBeforeAppear(e){To(C,[e]),Ao(e,l),Ao(e,u)},onEnter:O(!1),onAppear:O(!0),onLeave(e,t){e._isLeaving=!0;let n=()=>D(e,t);Ao(e,f),e._enterCancelled?(Ao(e,p),Ro(e)):(Ro(e),Ao(e,p)),Mo(()=>{e._isLeaving&&(jo(e,f),Ao(e,m),Eo(x)||Po(e,r,_,n))}),To(x,[e,n])},onEnterCancelled(e){E(e,!1,void 0,!0),To(b,[e])},onAppearCancelled(e){E(e,!0,void 0,!0),To(T,[e])},onLeaveCancelled(e){D(e),To(S,[e])}})}function Oo(e){if(e==null)return null;if(v(e))return[ko(e.enter),ko(e.leave)];{let t=ko(e);return[t,t]}}function ko(e){return te(e)}function Ao(e,t){t.split(/\s+/).forEach(t=>t&&e.classList.add(t)),(e[xo]||(e[xo]=new Set)).add(t)}function jo(e,t){t.split(/\s+/).forEach(t=>t&&e.classList.remove(t));let n=e[xo];n&&(n.delete(t),n.size||(e[xo]=void 0))}function Mo(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}var No=0;function Po(e,t,n,r){let i=e._endId=++No,a=()=>{i===e._endId&&r()};if(n!=null)return setTimeout(a,n);let{type:o,timeout:s,propCount:c}=Fo(e,t);if(!o)return r();let l=o+`end`,u=0,d=()=>{e.removeEventListener(l,f),a()},f=t=>{t.target===e&&++u>=c&&d()};setTimeout(()=>{u(n[e]||``).split(`, `),i=r(`${yo}Delay`),a=r(`${yo}Duration`),o=Io(i,a),s=r(`${bo}Delay`),c=r(`${bo}Duration`),l=Io(s,c),u=null,d=0,f=0;t===yo?o>0&&(u=yo,d=o,f=a.length):t===bo?l>0&&(u=bo,d=l,f=c.length):(d=Math.max(o,l),u=d>0?o>l?yo:bo:null,f=u?u===yo?a.length:c.length:0);let p=u===yo&&/\b(?:transform|all)(?:,|$)/.test(r(`${yo}Property`).toString());return{type:u,timeout:d,propCount:f,hasTransform:p}}function Io(e,t){for(;e.lengthLo(t)+Lo(e[n])))}function Lo(e){return e===`auto`?0:Number(e.slice(0,-1).replace(`,`,`.`))*1e3}function Ro(e){return(e?e.ownerDocument:document).body.offsetHeight}function zo(e,t,n){let r=e[xo];r&&(t=(t?[t,...r]:[...r]).join(` `)),t==null?e.removeAttribute(`class`):n?e.setAttribute(`class`,t):e.className=t}var Bo=Symbol(`_vod`),Vo=Symbol(`_vsh`),Ho={name:`show`,beforeMount(e,{value:t},{transition:n}){e[Bo]=e.style.display===`none`?``:e.style.display,n&&t?n.beforeEnter(e):Uo(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:r}){!t!=!n&&(r?t?(r.beforeEnter(e),Uo(e,!0),r.enter(e)):r.leave(e,()=>{Uo(e,!1)}):Uo(e,t))},beforeUnmount(e,{value:t}){Uo(e,t)}};function Uo(e,t){e.style.display=t?e[Bo]:`none`,e[Vo]=!t}var Wo=Symbol(``),Go=/(?:^|;)\s*display\s*:/;function Ko(e,t,n){let r=e.style,i=g(n),a=!1;if(n&&!i){if(t)if(g(t))for(let e of t.split(`;`)){let t=e.slice(0,e.indexOf(`:`)).trim();n[t]??Jo(r,t,``)}else for(let e in t)n[e]??Jo(r,e,``);for(let i in n){i===`display`&&(a=!0);let o=n[i];o==null?Jo(r,i,``):Qo(e,i,!g(t)&&t?t[i]:void 0,o)||Jo(r,i,o)}}else if(i){if(t!==n){let e=r[Wo];e&&(n+=`;`+e),r.cssText=n,a=Go.test(n)}}else t&&e.removeAttribute(`style`);Bo in e&&(e[Bo]=a?r.display:``,e[Vo]&&(r.display=`none`))}var qo=/\s*!important$/;function Jo(e,t,n){if(d(n))n.forEach(n=>Jo(e,t,n));else if(n??=``,t.startsWith(`--`))e.setProperty(t,n);else{let r=Zo(e,t);qo.test(n)?e.setProperty(A(r),n.replace(qo,``),`important`):e[r]=n}}var Yo=[`Webkit`,`Moz`,`ms`],Xo={};function Zo(e,t){let n=Xo[t];if(n)return n;let r=O(t);if(r!==`filter`&&r in e)return Xo[t]=r;r=j(r);for(let n=0;ncs||=(ls.then(()=>cs=0),Date.now());function ds(e,t){let n=e=>{if(!e._vts)e._vts=Date.now();else if(e._vts<=n.attached)return;let r=n.value;if(d(r)){let n=e.stopImmediatePropagation;e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0};let i=r.slice(),a=[e];for(let n=0;ne.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,ps=(e,t,n,r,i,s)=>{let c=i===`svg`;t===`class`?zo(e,r,c):t===`style`?Ko(e,n,r):a(t)?o(t)||as(e,t,n,r,s):(t[0]===`.`?(t=t.slice(1),!0):t[0]===`^`?(t=t.slice(1),!1):ms(e,t,r,c))?(ts(e,t,r),!e.tagName.includes(`-`)&&(t===`value`||t===`checked`||t===`selected`)&&es(e,t,r,c,s,t!==`value`)):e._isVueCE&&(hs(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!g(r)))?ts(e,O(t),r,s,t):(t===`true-value`?e._trueValue=r:t===`false-value`&&(e._falseValue=r),es(e,t,r,c))};function ms(e,t,n,r){if(r)return!!(t===`innerHTML`||t===`textContent`||t in e&&fs(t)&&h(n));if(t===`spellcheck`||t===`draggable`||t===`translate`||t===`autocorrect`||t===`sandbox`&&e.tagName===`IFRAME`||t===`form`||t===`list`&&e.tagName===`INPUT`||t===`type`&&e.tagName===`TEXTAREA`)return!1;if(t===`width`||t===`height`){let t=e.tagName;if(t===`IMG`||t===`VIDEO`||t===`CANVAS`||t===`SOURCE`)return!1}return fs(t)&&g(n)?!1:t in e}function hs(e,t){let n=e._def.props;if(!n)return!1;let r=O(t);return Array.isArray(n)?n.some(e=>O(e)===r):Object.keys(n).some(e=>O(e)===r)}var gs=new WeakMap,_s=new WeakMap,vs=Symbol(`_moveCb`),ys=Symbol(`_enterCb`),bs=(e=>(delete e.props.mode,e))({name:`TransitionGroup`,props:s({},Co,{tag:String,moveClass:String}),setup(e,{slots:t}){let n=Wa(),r=cr(),i,a;return Lr(()=>{if(!i.length)return;let t=e.moveClass||`${e.name||`v`}-move`;if(!Ts(i[0].el,n.vnode.el,t)){i=[];return}i.forEach(xs),i.forEach(Ss);let r=i.filter(Cs);Ro(n.vnode.el),r.forEach(e=>{let n=e.el,r=n.style;Ao(n,t),r.transform=r.webkitTransform=r.transitionDuration=``;let i=n[vs]=e=>{e&&e.target!==n||(!e||e.propertyName.endsWith(`transform`))&&(n.removeEventListener(`transitionend`,i),n[vs]=null,jo(n,t))};n.addEventListener(`transitionend`,i)}),i=[]}),()=>{let o=Ut(e),s=Do(o),c=o.tag||fa;if(i=[],a)for(let e=0;e{e.split(/\s+/).forEach(e=>e&&r.classList.remove(e))}),n.split(/\s+/).forEach(e=>e&&r.classList.add(e)),r.style.display=`none`;let a=t.nodeType===1?t:t.parentNode;a.appendChild(r);let{hasTransform:o}=Fo(r);return a.removeChild(r),o}var Es=e=>{let t=e.props[`onUpdate:modelValue`]||!1;return d(t)?e=>P(t,e):t},Ds=Symbol(`_assign`),Os={deep:!0,created(e,t,n){e[Ds]=Es(n),ns(e,`change`,()=>{let t=e._modelValue,n=As(e),r=e.checked,i=e[Ds];if(d(t)){let e=he(t,n),a=e!==-1;if(r&&!a)i(t.concat(n));else if(!r&&a){let n=[...t];n.splice(e,1),i(n)}}else if(p(t)){let e=new Set(t);r?e.add(n):e.delete(n),i(e)}else i(js(e,r))})},mounted:ks,beforeUpdate(e,t,n){e[Ds]=Es(n),ks(e,t,n)}};function ks(e,{value:t,oldValue:n},r){e._modelValue=t;let i;if(d(t))i=he(t,r.props.value)>-1;else if(p(t))i=t.has(r.props.value);else{if(t===n)return;i=me(t,js(e,!0))}e.checked!==i&&(e.checked=i)}function As(e){return`_value`in e?e._value:e.value}function js(e,t){let n=t?`_trueValue`:`_falseValue`;return n in e?e[n]:t}var Ms=[`ctrl`,`shift`,`alt`,`meta`],Ns={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>`button`in e&&e.button!==0,middle:e=>`button`in e&&e.button!==1,right:e=>`button`in e&&e.button!==2,exact:(e,t)=>Ms.some(n=>e[`${n}Key`]&&!t.includes(n))},Ps=(e,t)=>{if(!e)return e;let n=e._withMods||={},r=t.join(`.`);return n[r]||(n[r]=((n,...r)=>{for(let e=0;e{Ls().render(...e)}),zs=((...e)=>{let t=Ls().createApp(...e),{mount:n}=t;return t.mount=e=>{let r=Vs(e);if(!r)return;let i=t._component;!h(i)&&!i.render&&!i.template&&(i.template=r.innerHTML),r.nodeType===1&&(r.textContent=``);let a=n(r,!1,Bs(r));return r instanceof Element&&(r.removeAttribute(`v-cloak`),r.setAttribute(`data-v-app`,``)),a},t});function Bs(e){if(e instanceof SVGElement)return`svg`;if(typeof MathMLElement==`function`&&e instanceof MathMLElement)return`mathml`}function Vs(e){return g(e)?document.querySelector(e):e}var Hs=typeof window<`u`,Us,Ws=e=>Us=e,Gs=Symbol();function Ks(e){return e&&typeof e==`object`&&Object.prototype.toString.call(e)===`[object Object]`&&typeof e.toJSON!=`function`}var qs;(function(e){e.direct=`direct`,e.patchObject=`patch object`,e.patchFunction=`patch function`})(qs||={});var Js=typeof window==`object`&&window.window===window?window:typeof self==`object`&&self.self===self?self:typeof global==`object`&&global.global===global?global:typeof globalThis==`object`?globalThis:{HTMLElement:null};function Ys(e,{autoBom:t=!1}={}){return t&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob([``,e],{type:e.type}):e}function Xs(e,t,n){let r=new XMLHttpRequest;r.open(`GET`,e),r.responseType=`blob`,r.onload=function(){tc(r.response,t,n)},r.onerror=function(){console.error(`could not download file`)},r.send()}function Zs(e){let t=new XMLHttpRequest;t.open(`HEAD`,e,!1);try{t.send()}catch{}return t.status>=200&&t.status<=299}function Qs(e){try{e.dispatchEvent(new MouseEvent(`click`))}catch{let t=new MouseEvent(`click`,{bubbles:!0,cancelable:!0,view:window,detail:0,screenX:80,screenY:20,clientX:80,clientY:20,ctrlKey:!1,altKey:!1,shiftKey:!1,metaKey:!1,button:0,relatedTarget:null});e.dispatchEvent(t)}}var $s=typeof navigator==`object`?navigator:{userAgent:``},ec=/Macintosh/.test($s.userAgent)&&/AppleWebKit/.test($s.userAgent)&&!/Safari/.test($s.userAgent),tc=Hs?typeof HTMLAnchorElement<`u`&&`download`in HTMLAnchorElement.prototype&&!ec?nc:`msSaveOrOpenBlob`in $s?rc:ic:()=>{};function nc(e,t=`download`,n){let r=document.createElement(`a`);r.download=t,r.rel=`noopener`,typeof e==`string`?(r.href=e,r.origin===location.origin?Qs(r):Zs(r.href)?Xs(e,t,n):(r.target=`_blank`,Qs(r))):(r.href=URL.createObjectURL(e),setTimeout(function(){URL.revokeObjectURL(r.href)},4e4),setTimeout(function(){Qs(r)},0))}function rc(e,t=`download`,n){if(typeof e==`string`)if(Zs(e))Xs(e,t,n);else{let t=document.createElement(`a`);t.href=e,t.target=`_blank`,setTimeout(function(){Qs(t)})}else navigator.msSaveOrOpenBlob(Ys(e,n),t)}function ic(e,t,n,r){if(r||=open(``,`_blank`),r&&(r.document.title=r.document.body.innerText=`downloading...`),typeof e==`string`)return Xs(e,t,n);let i=e.type===`application/octet-stream`,a=/constructor/i.test(String(Js.HTMLElement))||`safari`in Js,o=/CriOS\/[\d]+/.test(navigator.userAgent);if((o||i&&a||ec)&&typeof FileReader<`u`){let t=new FileReader;t.onloadend=function(){let e=t.result;if(typeof e!=`string`)throw r=null,Error(`Wrong reader.result type`);e=o?e:e.replace(/^data:[^;]*;/,`data:attachment/file;`),r?r.location.href=e:location.assign(e),r=null},t.readAsDataURL(e)}else{let t=URL.createObjectURL(e);r?r.location.assign(t):location.href=t,r=null,setTimeout(function(){URL.revokeObjectURL(t)},4e4)}}var{assign:ac}=Object;function oc(){let e=Se(!0),t=e.run(()=>I({})),n=[],r=[],i=Wt({install(e){Ws(i),i._a=e,e.provide(Gs,i),e.config.globalProperties.$pinia=i,r.forEach(e=>n.push(e)),r=[]},use(e){return this._a?n.push(e):r.push(e),this},_p:n,_a:null,_e:e,_s:new Map,state:t});return i}var sc=()=>{};function cc(e,t,n,r=sc){e.add(t);let i=()=>{e.delete(t)&&r()};return!n&&Ce()&&we(i),i}function lc(e,...t){e.forEach(e=>{e(...t)})}var uc=e=>e(),dc=Symbol(),fc=Symbol();function pc(e,t){e instanceof Map&&t instanceof Map?t.forEach((t,n)=>e.set(n,t)):e instanceof Set&&t instanceof Set&&t.forEach(e.add,e);for(let n in t){if(!t.hasOwnProperty(n))continue;let r=t[n],i=e[n];Ks(i)&&Ks(r)&&e.hasOwnProperty(n)&&!qt(r)&&!zt(r)?e[n]=pc(i,r):e[n]=r}return e}var mc=Symbol();function hc(e){return!Ks(e)||!Object.prototype.hasOwnProperty.call(e,mc)}var{assign:gc}=Object;function _c(e){return!!(qt(e)&&e.effect)}function vc(e,t,n,r){let{state:i,actions:a,getters:o}=t,s=n.state.value[e],c;function l(){return s||(n.state.value[e]=i?i():{}),gc(L(n.state.value[e]),a,Object.keys(o||{}).reduce((t,r)=>(t[r]=Wt(H(()=>{Ws(n);let t=n._s.get(e);return o[r].call(t,t)})),t),{}))}return c=yc(e,l,t,n,r,!0),c}function yc(e,t,n={},r,i,a){let o,s=gc({actions:{}},n),c={deep:!0},l,u,d=new Set,f=new Set,p=r.state.value[e];!a&&!p&&(r.state.value[e]={});let m;function h(t){let n;l=u=!1,typeof t==`function`?(t(r.state.value[e]),n={type:qs.patchFunction,storeId:e,events:void 0}):(pc(r.state.value[e],t),n={type:qs.patchObject,payload:t,storeId:e,events:void 0});let i=m=Symbol();Sn().then(()=>{m===i&&(l=!0)}),u=!0,lc(d,n,r.state.value[e])}let g=a?function(){let{state:e}=n,t=e?e():{};this.$patch(e=>{gc(e,t)})}:sc;function _(){o.stop(),d.clear(),f.clear(),r._s.delete(e)}let v=(t,n=``)=>{if(dc in t)return t[fc]=n,t;let i=function(){Ws(r);let n=Array.from(arguments),a=new Set,o=new Set;function s(e){a.add(e)}function c(e){o.add(e)}lc(f,{args:n,name:i[fc],store:y,after:s,onError:c});let l;try{l=t.apply(this&&this.$id===e?this:y,n)}catch(e){throw lc(o,e),e}return l instanceof Promise?l.then(e=>(lc(a,e),e)).catch(e=>(lc(o,e),Promise.reject(e))):(lc(a,l),l)};return i[dc]=!0,i[fc]=n,i},y=Ft({_p:r,$id:e,$onAction:cc.bind(null,f),$patch:h,$reset:g,$subscribe(t,n={}){let i=cc(d,t,n.detached,()=>a()),a=o.run(()=>R(()=>r.state.value[e],r=>{(n.flush===`sync`?u:l)&&t({storeId:e,type:qs.direct,events:void 0},r)},gc({},c,n)));return i},$dispose:_});r._s.set(e,y);let b=(r._a&&r._a.runWithContext||uc)(()=>r._e.run(()=>(o=Se()).run(()=>t({action:v}))));for(let t in b){let n=b[t];qt(n)&&!_c(n)||zt(n)?a||(p&&hc(n)&&(qt(n)?n.value=p[t]:pc(n,p[t])),r.state.value[e][t]=n):typeof n==`function`&&(b[t]=v(n,t),s.actions[t]=n)}return gc(y,b),gc(Ut(y),b),Object.defineProperty(y,"$state",{get:()=>r.state.value[e],set:e=>{h(t=>{gc(t,e)})}}),r._p.forEach(e=>{gc(y,o.run(()=>e({store:y,app:r._a,pinia:r,options:s})))}),p&&a&&n.hydrate&&n.hydrate(y.$state,p),l=!0,u=!0,y}function bc(e,t,n){let r,i=typeof t==`function`;r=i?n:t;function a(n,a){let o=zn();return n||=o?Rn(Gs,null):null,n&&Ws(n),n=Us,n._s.has(e)||(i?yc(e,t,r,n):vc(e,r,n)),n._s.get(e)}return a.$id=e,a}var xc=typeof document<`u`;function Sc(e){return typeof e==`object`||`displayName`in e||`props`in e||`__vccOpts`in e}function Cc(e){return e.__esModule||e[Symbol.toStringTag]===`Module`||e.default&&Sc(e.default)}var wc=Object.assign;function Tc(e,t){let n={};for(let r in t){let i=t[r];n[r]=Dc(i)?i.map(e):e(i)}return n}var Ec=()=>{},Dc=Array.isArray;function Oc(e,t){let n={};for(let r in e)n[r]=r in t?t[r]:e[r];return n}var kc=/#/g,Ac=/&/g,jc=/\//g,Mc=/=/g,Nc=/\?/g,Pc=/\+/g,Fc=/%5B/g,Ic=/%5D/g,Lc=/%5E/g,Rc=/%60/g,zc=/%7B/g,Bc=/%7C/g,Vc=/%7D/g,Hc=/%20/g;function Uc(e){return e==null?``:encodeURI(``+e).replace(Bc,`|`).replace(Fc,`[`).replace(Ic,`]`)}function Wc(e){return Uc(e).replace(zc,`{`).replace(Vc,`}`).replace(Lc,`^`)}function Gc(e){return Uc(e).replace(Pc,`%2B`).replace(Hc,`+`).replace(kc,`%23`).replace(Ac,`%26`).replace(Rc,"`").replace(zc,`{`).replace(Vc,`}`).replace(Lc,`^`)}function Kc(e){return Gc(e).replace(Mc,`%3D`)}function qc(e){return Uc(e).replace(kc,`%23`).replace(Nc,`%3F`)}function Jc(e){return qc(e).replace(jc,`%2F`)}function Yc(e){if(e==null)return null;try{return decodeURIComponent(``+e)}catch{}return``+e}var Xc=/\/$/,Zc=e=>e.replace(Xc,``);function Qc(e,t,n=`/`){let r,i={},a=``,o=``,s=t.indexOf(`#`),c=t.indexOf(`?`);return c=s>=0&&c>s?-1:c,c>=0&&(r=t.slice(0,c),a=t.slice(c,s>0?s:t.length),i=e(a.slice(1))),s>=0&&(r||=t.slice(0,s),o=t.slice(s,t.length)),r=ol(r??t,n),{fullPath:r+a+o,path:r,query:i,hash:Yc(o)}}function $c(e,t){let n=t.query?e(t.query):``;return t.path+(n&&`?`)+n+(t.hash||``)}function el(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||`/`}function tl(e,t,n){let r=t.matched.length-1,i=n.matched.length-1;return r>-1&&r===i&&nl(t.matched[r],n.matched[i])&&rl(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function nl(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function rl(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var n in e)if(!il(e[n],t[n]))return!1;return!0}function il(e,t){return Dc(e)?al(e,t):Dc(t)?al(t,e):e?.valueOf()===t?.valueOf()}function al(e,t){return Dc(t)?e.length===t.length&&e.every((e,n)=>e===t[n]):e.length===1&&e[0]===t}function ol(e,t){if(e.startsWith(`/`))return e;if(!e)return t;let n=t.split(`/`),r=e.split(`/`),i=r[r.length-1];(i===`..`||i===`.`)&&r.push(``);let a=n.length-1,o,s;for(o=0;o1&&a--;else break;return n.slice(0,a).join(`/`)+`/`+r.slice(o).join(`/`)}var sl={path:`/`,name:void 0,params:{},query:{},hash:``,fullPath:`/`,matched:[],meta:{},redirectedFrom:void 0},cl=function(e){return e.pop=`pop`,e.push=`push`,e}({}),ll=function(e){return e.back=`back`,e.forward=`forward`,e.unknown=``,e}({});function ul(e){if(!e)if(xc){let t=document.querySelector(`base`);e=t&&t.getAttribute(`href`)||`/`,e=e.replace(/^\w+:\/\/[^\/]+/,``)}else e=`/`;return e[0]!==`/`&&e[0]!==`#`&&(e=`/`+e),Zc(e)}var dl=/^[^#]+#/;function fl(e,t){return e.replace(dl,`#`)+t}function pl(e,t){let n=document.documentElement.getBoundingClientRect(),r=e.getBoundingClientRect();return{behavior:t.behavior,left:r.left-n.left-(t.left||0),top:r.top-n.top-(t.top||0)}}var ml=()=>({left:window.scrollX,top:window.scrollY});function hl(e){let t;if(`el`in e){let n=e.el,r=typeof n==`string`&&n.startsWith(`#`),i=typeof n==`string`?r?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!i)return;t=pl(i,e)}else t=e;`scrollBehavior`in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left==null?window.scrollX:t.left,t.top==null?window.scrollY:t.top)}function gl(e,t){return(history.state?history.state.position-t:-1)+e}var _l=new Map;function vl(e,t){_l.set(e,t)}function yl(e){let t=_l.get(e);return _l.delete(e),t}function bl(e){return typeof e==`string`||e&&typeof e==`object`}function xl(e){return typeof e==`string`||typeof e==`symbol`}var Sl=function(e){return e[e.MATCHER_NOT_FOUND=1]=`MATCHER_NOT_FOUND`,e[e.NAVIGATION_GUARD_REDIRECT=2]=`NAVIGATION_GUARD_REDIRECT`,e[e.NAVIGATION_ABORTED=4]=`NAVIGATION_ABORTED`,e[e.NAVIGATION_CANCELLED=8]=`NAVIGATION_CANCELLED`,e[e.NAVIGATION_DUPLICATED=16]=`NAVIGATION_DUPLICATED`,e}({}),Cl=Symbol(``);Sl.MATCHER_NOT_FOUND,Sl.NAVIGATION_GUARD_REDIRECT,Sl.NAVIGATION_ABORTED,Sl.NAVIGATION_CANCELLED,Sl.NAVIGATION_DUPLICATED;function wl(e,t){return wc(Error(),{type:e,[Cl]:!0},t)}function Tl(e,t){return e instanceof Error&&Cl in e&&(t==null||!!(e.type&t))}function El(e){let t={};if(e===``||e===`?`)return t;let n=(e[0]===`?`?e.slice(1):e).split(`&`);for(let e=0;ee&&Gc(e)):[r&&Gc(r)]).forEach(e=>{e!==void 0&&(t+=(t.length?`&`:``)+n,e!=null&&(t+=`=`+e))})}return t}function Ol(e){let t={};for(let n in e){let r=e[n];r!==void 0&&(t[n]=Dc(r)?r.map(e=>e==null?null:``+e):r==null?r:``+r)}return t}var kl=Symbol(``),Al=Symbol(``),jl=Symbol(``),Ml=Symbol(``),Nl=Symbol(``);function Pl(){let e=[];function t(t){return e.push(t),()=>{let n=e.indexOf(t);n>-1&&e.splice(n,1)}}function n(){e=[]}return{add:t,list:()=>e.slice(),reset:n}}function Fl(e,t,n,r,i,a=e=>e()){let o=r&&(r.enterCallbacks[i]=r.enterCallbacks[i]||[]);return()=>new Promise((s,c)=>{let l=e=>{e===!1?c(wl(Sl.NAVIGATION_ABORTED,{from:n,to:t})):e instanceof Error?c(e):bl(e)?c(wl(Sl.NAVIGATION_GUARD_REDIRECT,{from:t,to:e})):(o&&r.enterCallbacks[i]===o&&typeof e==`function`&&o.push(e),s())},u=a(()=>e.call(r&&r.instances[i],t,n,l)),d=Promise.resolve(u);e.length<3&&(d=d.then(l)),d.catch(e=>c(e))})}function Il(e,t,n,r,i=e=>e()){let a=[];for(let o of e)for(let e in o.components){let s=o.components[e];if(!(t!==`beforeRouteEnter`&&!o.instances[e]))if(Sc(s)){let c=(s.__vccOpts||s)[t];c&&a.push(Fl(c,n,r,o,e,i))}else{let c=s();a.push(()=>c.then(a=>{if(!a)throw Error(`Couldn't resolve component "${e}" at "${o.path}"`);let s=Cc(a)?a.default:a;o.mods[e]=a,o.components[e]=s;let c=(s.__vccOpts||s)[t];return c&&Fl(c,n,r,o,e,i)()}))}}return a}function Ll(e,t){let n=[],r=[],i=[],a=Math.max(t.matched.length,e.matched.length);for(let o=0;onl(e,a))?r.push(a):n.push(a));let s=e.matched[o];s&&(t.matched.find(e=>nl(e,s))||i.push(s))}return[n,r,i]}var Rl=()=>location.protocol+`//`+location.host;function zl(e,t){let{pathname:n,search:r,hash:i}=t,a=e.indexOf(`#`);if(a>-1){let t=i.includes(e.slice(a))?e.slice(a).length:1,n=i.slice(t);return n[0]!==`/`&&(n=`/`+n),el(n,``)}return el(n,e)+r+i}function Bl(e,t,n,r){let i=[],a=[],o=null,s=({state:a})=>{let s=zl(e,location),c=n.value,l=t.value,u=0;if(a){if(n.value=s,t.value=a,o&&o===c){o=null;return}u=l?a.position-l.position:0}else r(s);i.forEach(e=>{e(n.value,c,{delta:u,type:cl.pop,direction:u?u>0?ll.forward:ll.back:ll.unknown})})};function c(){o=n.value}function l(e){i.push(e);let t=()=>{let t=i.indexOf(e);t>-1&&i.splice(t,1)};return a.push(t),t}function u(){if(document.visibilityState===`hidden`){let{history:e}=window;if(!e.state)return;e.replaceState(wc({},e.state,{scroll:ml()}),``)}}function d(){for(let e of a)e();a=[],window.removeEventListener(`popstate`,s),window.removeEventListener(`pagehide`,u),document.removeEventListener(`visibilitychange`,u)}return window.addEventListener(`popstate`,s),window.addEventListener(`pagehide`,u),document.addEventListener(`visibilitychange`,u),{pauseListeners:c,listen:l,destroy:d}}function Vl(e,t,n,r=!1,i=!1){return{back:e,current:t,forward:n,replaced:r,position:window.history.length,scroll:i?ml():null}}function Hl(e){let{history:t,location:n}=window,r={value:zl(e,n)},i={value:t.state};i.value||a(r.value,{back:null,current:r.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function a(r,a,o){let s=e.indexOf(`#`),c=s>-1?(n.host&&document.querySelector(`base`)?e:e.slice(s))+r:Rl()+e+r;try{t[o?`replaceState`:`pushState`](a,``,c),i.value=a}catch(e){console.error(e),n[o?`replace`:`assign`](c)}}function o(e,n){a(e,wc({},t.state,Vl(i.value.back,e,i.value.forward,!0),n,{position:i.value.position}),!0),r.value=e}function s(e,n){let o=wc({},i.value,t.state,{forward:e,scroll:ml()});a(o.current,o,!0),a(e,wc({},Vl(r.value,e,null),{position:o.position+1},n),!1),r.value=e}return{location:r,state:i,push:s,replace:o}}function Ul(e){e=ul(e);let t=Hl(e),n=Bl(e,t.state,t.location,t.replace);function r(e,t=!0){t||n.pauseListeners(),history.go(e)}let i=wc({location:``,base:e,go:r,createHref:fl.bind(null,e)},t,n);return Object.defineProperty(i,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(i,"state",{enumerable:!0,get:()=>t.state.value}),i}var Wl=function(e){return e[e.Static=0]=`Static`,e[e.Param=1]=`Param`,e[e.Group=2]=`Group`,e}({}),Gl=function(e){return e[e.Static=0]=`Static`,e[e.Param=1]=`Param`,e[e.ParamRegExp=2]=`ParamRegExp`,e[e.ParamRegExpEnd=3]=`ParamRegExpEnd`,e[e.EscapeNext=4]=`EscapeNext`,e}(Gl||{}),Kl={type:Wl.Static,value:``},ql=/[a-zA-Z0-9_]/;function Jl(e){if(!e)return[[]];if(e===`/`)return[[Kl]];if(!e.startsWith(`/`))throw Error(`Invalid path "${e}"`);function t(e){throw Error(`ERR (${n})/"${l}": ${e}`)}let n=Gl.Static,r=n,i=[],a;function o(){a&&i.push(a),a=[]}let s=0,c,l=``,u=``;function d(){l&&=(n===Gl.Static?a.push({type:Wl.Static,value:l}):n===Gl.Param||n===Gl.ParamRegExp||n===Gl.ParamRegExpEnd?(a.length>1&&(c===`*`||c===`+`)&&t(`A repeatable param (${l}) must be alone in its segment. eg: '/:ids+.`),a.push({type:Wl.Param,value:l,regexp:u,repeatable:c===`*`||c===`+`,optional:c===`*`||c===`?`})):t(`Invalid state to consume buffer`),``)}function f(){l+=c}for(;st.length?t.length===1&&t[0]===Zl.Static+Zl.Segment?1:-1:0}function tu(e,t){let n=0,r=e.score,i=t.score;for(;n0&&t[t.length-1]<0}var ru={strict:!1,end:!0,sensitive:!1};function iu(e,t,n){let r=wc($l(Jl(e.path),n),{record:e,parent:t,children:[],alias:[]});return t&&!r.record.aliasOf==!t.record.aliasOf&&t.children.push(r),r}function au(e,t){let n=[],r=new Map;t=Oc(ru,t);function i(e){return r.get(e)}function a(e,n,r){let i=!r,s=su(e);s.aliasOf=r&&r.record;let l=Oc(t,e),u=[s];if(`alias`in e){let t=typeof e.alias==`string`?[e.alias]:e.alias;for(let e of t)u.push(su(wc({},s,{components:r?r.record.components:s.components,path:e,aliasOf:r?r.record:s})))}let d,f;for(let t of u){let{path:u}=t;if(n&&u[0]!==`/`){let e=n.record.path,r=e[e.length-1]===`/`?``:`/`;t.path=n.record.path+(u&&r+u)}if(d=iu(t,n,l),r?r.alias.push(d):(f||=d,f!==d&&f.alias.push(d),i&&e.name&&!lu(d)&&o(e.name)),pu(d)&&c(d),s.children){let e=s.children;for(let t=0;t{o(f)}:Ec}function o(e){if(xl(e)){let t=r.get(e);t&&(r.delete(e),n.splice(n.indexOf(t),1),t.children.forEach(o),t.alias.forEach(o))}else{let t=n.indexOf(e);t>-1&&(n.splice(t,1),e.record.name&&r.delete(e.record.name),e.children.forEach(o),e.alias.forEach(o))}}function s(){return n}function c(e){let t=du(e,n);n.splice(t,0,e),e.record.name&&!lu(e)&&r.set(e.record.name,e)}function l(e,t){let i,a={},o,s;if(`name`in e&&e.name){if(i=r.get(e.name),!i)throw wl(Sl.MATCHER_NOT_FOUND,{location:e});s=i.record.name,a=wc(ou(t.params,i.keys.filter(e=>!e.optional).concat(i.parent?i.parent.keys.filter(e=>e.optional):[]).map(e=>e.name)),e.params&&ou(e.params,i.keys.map(e=>e.name))),o=i.stringify(a)}else if(e.path!=null)o=e.path,i=n.find(e=>e.re.test(o)),i&&(a=i.parse(o),s=i.record.name);else{if(i=t.name?r.get(t.name):n.find(e=>e.re.test(t.path)),!i)throw wl(Sl.MATCHER_NOT_FOUND,{location:e,currentLocation:t});s=i.record.name,a=wc({},t.params,e.params),o=i.stringify(a)}let c=[],l=i;for(;l;)c.unshift(l.record),l=l.parent;return{name:s,path:o,params:a,matched:c,meta:uu(c)}}e.forEach(e=>a(e));function u(){n.length=0,r.clear()}return{addRoute:a,resolve:l,removeRoute:o,clearRoutes:u,getRoutes:s,getRecordMatcher:i}}function ou(e,t){let n={};for(let r of t)r in e&&(n[r]=e[r]);return n}function su(e){let t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:cu(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:`components`in e?e.components||null:e.component&&{default:e.component}};return Object.defineProperty(t,"mods",{value:{}}),t}function cu(e){let t={},n=e.props||!1;if(`component`in e)t.default=n;else for(let r in e.components)t[r]=typeof n==`object`?n[r]:n;return t}function lu(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function uu(e){return e.reduce((e,t)=>wc(e,t.meta),{})}function du(e,t){let n=0,r=t.length;for(;n!==r;){let i=n+r>>1;tu(e,t[i])<0?r=i:n=i+1}let i=fu(e);return i&&(r=t.lastIndexOf(i,r-1)),r}function fu(e){let t=e;for(;t=t.parent;)if(pu(t)&&tu(e,t)===0)return t}function pu({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function mu(e){let t=Rn(jl),n=Rn(Ml),r=H(()=>{let n=Zt(e.to);return t.resolve(n)}),i=H(()=>{let{matched:e}=r.value,{length:t}=e,i=e[t-1],a=n.matched;if(!i||!a.length)return-1;let o=a.findIndex(nl.bind(null,i));if(o>-1)return o;let s=yu(e[t-2]);return t>1&&yu(i)===s&&a[a.length-1].path!==s?a.findIndex(nl.bind(null,e[t-2])):o}),a=H(()=>i.value>-1&&vu(n.params,r.value.params)),o=H(()=>i.value>-1&&i.value===n.matched.length-1&&rl(n.params,r.value.params));function s(n={}){if(_u(n)){let n=t[Zt(e.replace)?`replace`:`push`](Zt(e.to)).catch(Ec);return e.viewTransition&&typeof document<`u`&&`startViewTransition`in document&&document.startViewTransition(()=>n),n}return Promise.resolve()}return{route:r,href:H(()=>r.value.href),isActive:a,isExactActive:o,navigate:s}}function hu(e){return e.length===1?e[0]:e}var gu=z({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`},viewTransition:Boolean},useLink:mu,setup(e,{slots:t}){let n=Ft(mu(e)),{options:r}=Rn(jl),i=H(()=>({[bu(e.activeClass,r.linkActiveClass,`router-link-active`)]:n.isActive,[bu(e.exactActiveClass,r.linkExactActiveClass,`router-link-exact-active`)]:n.isExactActive}));return()=>{let r=t.default&&hu(t.default(n));return e.custom?r:co(`a`,{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:i.value},r)}}});function _u(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){let t=e.currentTarget.getAttribute(`target`);if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function vu(e,t){for(let n in t){let r=t[n],i=e[n];if(typeof r==`string`){if(r!==i)return!1}else if(!Dc(i)||i.length!==r.length||r.some((e,t)=>e.valueOf()!==i[t].valueOf()))return!1}return!0}function yu(e){return e?e.aliasOf?e.aliasOf.path:e.path:``}var bu=(e,t,n)=>e??t??n,xu=z({name:`RouterView`,inheritAttrs:!1,props:{name:{type:String,default:`default`},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){let r=Rn(Nl),i=H(()=>e.route||r.value),a=Rn(Al,0),o=H(()=>{let e=Zt(a),{matched:t}=i.value,n;for(;(n=t[e])&&!n.components;)e++;return e}),s=H(()=>i.value.matched[o.value]);Ln(Al,H(()=>o.value+1)),Ln(kl,s),Ln(Nl,i);let c=I();return R(()=>[c.value,s.value,e.name],([e,t,n],[r,i,a])=>{t&&(t.instances[n]=e,i&&i!==t&&e&&e===r&&(t.leaveGuards.size||(t.leaveGuards=i.leaveGuards),t.updateGuards.size||(t.updateGuards=i.updateGuards))),e&&t&&(!i||!nl(t,i)||!r)&&(t.enterCallbacks[n]||[]).forEach(t=>t(e))},{flush:`post`}),()=>{let r=i.value,a=e.name,o=s.value,l=o&&o.components[a];if(!l)return Su(n.default,{Component:l,route:r});let u=o.props[a],d=co(l,wc({},u?u===!0?r.params:typeof u==`function`?u(r):u:null,t,{onVnodeUnmounted:e=>{e.component.isUnmounted&&(o.instances[a]=null)},ref:c}));return Su(n.default,{Component:d,route:r})||d}}});function Su(e,t){if(!e)return null;let n=e(t);return n.length===1?n[0]:n}var Cu=xu;function wu(e){let t=au(e.routes,e),n=e.parseQuery||El,r=e.stringifyQuery||Dl,i=e.history,a=Pl(),o=Pl(),s=Pl(),c=Jt(sl),l=sl;xc&&e.scrollBehavior&&`scrollRestoration`in history&&(history.scrollRestoration=`manual`);let u=Tc.bind(null,e=>``+e),d=Tc.bind(null,Jc),f=Tc.bind(null,Yc);function p(e,n){let r,i;return xl(e)?(r=t.getRecordMatcher(e),i=n):i=e,t.addRoute(i,r)}function m(e){let n=t.getRecordMatcher(e);n&&t.removeRoute(n)}function h(){return t.getRoutes().map(e=>e.record)}function g(e){return!!t.getRecordMatcher(e)}function _(e,a){if(a=wc({},a||c.value),typeof e==`string`){let r=Qc(n,e,a.path),o=t.resolve({path:r.path},a),s=i.createHref(r.fullPath);return wc(r,o,{params:f(o.params),hash:Yc(r.hash),redirectedFrom:void 0,href:s})}let o;if(e.path!=null)o=wc({},e,{path:Qc(n,e.path,a.path).path});else{let t=wc({},e.params);for(let e in t)t[e]??delete t[e];o=wc({},e,{params:d(t)}),a.params=d(a.params)}let s=t.resolve(o,a),l=e.hash||``;s.params=u(f(s.params));let p=$c(r,wc({},e,{hash:Wc(l),path:s.path})),m=i.createHref(p);return wc({fullPath:p,hash:l,query:r===Dl?Ol(e.query):e.query||{}},s,{redirectedFrom:void 0,href:m})}function v(e){return typeof e==`string`?Qc(n,e,c.value.path):wc({},e)}function y(e,t){if(l!==e)return wl(Sl.NAVIGATION_CANCELLED,{from:t,to:e})}function b(e){return C(e)}function x(e){return b(wc(v(e),{replace:!0}))}function S(e,t){let n=e.matched[e.matched.length-1];if(n&&n.redirect){let{redirect:r}=n,i=typeof r==`function`?r(e,t):r;return typeof i==`string`&&(i=i.includes(`?`)||i.includes(`#`)?i=v(i):{path:i},i.params={}),wc({query:e.query,hash:e.hash,params:i.path==null?e.params:{}},i)}}function C(e,t){let n=l=_(e),i=c.value,a=e.state,o=e.force,s=e.replace===!0,u=S(n,i);if(u)return C(wc(v(u),{state:typeof u==`object`?wc({},a,u.state):a,force:o,replace:s}),t||n);let d=n;d.redirectedFrom=t;let f;return!o&&tl(r,i,n)&&(f=wl(Sl.NAVIGATION_DUPLICATED,{to:d,from:i}),te(i,i,!0,!1)),(f?Promise.resolve(f):E(d,i)).catch(e=>Tl(e)?Tl(e,Sl.NAVIGATION_GUARD_REDIRECT)?e:ee(e):P(e,d,i)).then(e=>{if(e){if(Tl(e,Sl.NAVIGATION_GUARD_REDIRECT))return C(wc({replace:s},v(e.to),{state:typeof e.to==`object`?wc({},a,e.to.state):a,force:o}),t||d)}else e=O(d,i,!0,s,a);return D(d,i,e),e})}function w(e,t){let n=y(e,t);return n?Promise.reject(n):Promise.resolve()}function T(e){let t=ie.values().next().value;return t&&typeof t.runWithContext==`function`?t.runWithContext(e):e()}function E(e,t){let n,[r,i,s]=Ll(e,t);n=Il(r.reverse(),`beforeRouteLeave`,e,t);for(let i of r)i.leaveGuards.forEach(r=>{n.push(Fl(r,e,t))});let c=w.bind(null,e,t);return n.push(c),oe(n).then(()=>{n=[];for(let r of a.list())n.push(Fl(r,e,t));return n.push(c),oe(n)}).then(()=>{n=Il(i,`beforeRouteUpdate`,e,t);for(let r of i)r.updateGuards.forEach(r=>{n.push(Fl(r,e,t))});return n.push(c),oe(n)}).then(()=>{n=[];for(let r of s)if(r.beforeEnter)if(Dc(r.beforeEnter))for(let i of r.beforeEnter)n.push(Fl(i,e,t));else n.push(Fl(r.beforeEnter,e,t));return n.push(c),oe(n)}).then(()=>(e.matched.forEach(e=>e.enterCallbacks={}),n=Il(s,`beforeRouteEnter`,e,t,T),n.push(c),oe(n))).then(()=>{n=[];for(let r of o.list())n.push(Fl(r,e,t));return n.push(c),oe(n)}).catch(e=>Tl(e,Sl.NAVIGATION_CANCELLED)?e:Promise.reject(e))}function D(e,t,n){s.list().forEach(r=>T(()=>r(e,t,n)))}function O(e,t,n,r,a){let o=y(e,t);if(o)return o;let s=t===sl,l=xc?history.state:{};n&&(r||s?i.replace(e.fullPath,wc({scroll:s&&l&&l.scroll},a)):i.push(e.fullPath,a)),c.value=e,te(e,t,n,s),ee()}let k;function A(){k||=i.listen((e,t,n)=>{if(!ae.listening)return;let r=_(e),a=S(r,ae.currentRoute.value);if(a){C(wc(a,{replace:!0,force:!0}),r).catch(Ec);return}l=r;let o=c.value;xc&&vl(gl(o.fullPath,n.delta),ml()),E(r,o).catch(e=>Tl(e,Sl.NAVIGATION_ABORTED|Sl.NAVIGATION_CANCELLED)?e:Tl(e,Sl.NAVIGATION_GUARD_REDIRECT)?(C(wc(v(e.to),{force:!0}),r).then(e=>{Tl(e,Sl.NAVIGATION_ABORTED|Sl.NAVIGATION_DUPLICATED)&&!n.delta&&n.type===cl.pop&&i.go(-1,!1)}).catch(Ec),Promise.reject()):(n.delta&&i.go(-n.delta,!1),P(e,r,o))).then(e=>{e||=O(r,o,!1),e&&(n.delta&&!Tl(e,Sl.NAVIGATION_CANCELLED)?i.go(-n.delta,!1):n.type===cl.pop&&Tl(e,Sl.NAVIGATION_ABORTED|Sl.NAVIGATION_DUPLICATED)&&i.go(-1,!1)),D(r,o,e)}).catch(Ec)})}let j=Pl(),M=Pl(),N;function P(e,t,n){ee(e);let r=M.list();return r.length?r.forEach(r=>r(e,t,n)):console.error(e),Promise.reject(e)}function F(){return N&&c.value!==sl?Promise.resolve():new Promise((e,t)=>{j.add([e,t])})}function ee(e){return N||(N=!e,A(),j.list().forEach(([t,n])=>e?n(e):t()),j.reset()),e}function te(t,n,r,i){let{scrollBehavior:a}=e;if(!xc||!a)return Promise.resolve();let o=!r&&yl(gl(t.fullPath,0))||(i||!r)&&history.state&&history.state.scroll||null;return Sn().then(()=>a(t,n,o)).then(e=>e&&hl(e)).catch(e=>P(e,t,n))}let ne=e=>i.go(e),re,ie=new Set,ae={currentRoute:c,listening:!0,addRoute:p,removeRoute:m,clearRoutes:t.clearRoutes,hasRoute:g,getRoutes:h,resolve:_,options:e,push:b,replace:x,go:ne,back:()=>ne(-1),forward:()=>ne(1),beforeEach:a.add,beforeResolve:o.add,afterEach:s.add,onError:M.add,isReady:F,install(e){e.component(`RouterLink`,gu),e.component(`RouterView`,Cu),e.config.globalProperties.$router=ae,Object.defineProperty(e.config.globalProperties,"$route",{enumerable:!0,get:()=>Zt(c)}),xc&&!re&&c.value===sl&&(re=!0,b(i.location).catch(e=>{}));let t={};for(let e in sl)Object.defineProperty(t,e,{get:()=>c.value[e],enumerable:!0});e.provide(jl,ae),e.provide(Ml,It(t)),e.provide(Nl,c);let n=e.unmount;ie.add(e),e.unmount=function(){ie.delete(e),ie.size<1&&(l=sl,k&&k(),k=null,c.value=sl,re=!1,N=!1),n()}}};function oe(e){return e.reduce((e,t)=>e.then(()=>T(t)),Promise.resolve())}return ae}function Tu(){return Rn(jl)}function Eu(e){return Rn(Ml)}var Du=bc(`app`,()=>{let e=I(null),t=I(null),n=I(!1),r=I([]),i=I(!1);function a(e){let t=r.value.findIndex(t=>t.id===e);t>-1&&r.value.splice(t,1)}return{user:e,token:t,loading:n,notifications:r,initialized:i,dismissNotification:a}}),Ou=`modulepreload`,ku=function(e){return`/static/`+e},Au={},ju=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}r=o(t.map(t=>{if(t=ku(t,n),t in Au)return;Au[t]=!0;let r=t.endsWith(`.css`),i=r?`[rel="stylesheet"]`:``;if(n)for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}else if(document.querySelector(`link[href="${t}"]${i}`))return;let o=document.createElement(`link`);if(o.rel=r?`stylesheet`:Ou,r||(o.as=`script`),o.crossOrigin=``,o.href=t,a&&o.setAttribute(`nonce`,a),document.head.appendChild(o),r)return new Promise((e,n)=>{o.addEventListener(`load`,e),o.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},Mu=wu({history:Ul(),routes:[{path:`/`,component:()=>ju(()=>import(`./HomeView-BRi2I_ia.js`),__vite__mapDeps([0,1]))},{path:`/login`,component:()=>ju(()=>import(`./LoginView-CStpuW_n.js`),__vite__mapDeps([2,3]))},{path:`/users`,component:()=>ju(()=>import(`./UsersView-BXSY02BK.js`),__vite__mapDeps([4,5]))},{path:`/moldinsight`,component:()=>ju(()=>import(`./MoldInsightView-CVpP8ugh.js`),__vite__mapDeps([6,5]))},{path:`/moldinsight/batch`,component:()=>ju(()=>import(`./BatchView-Bpd1N3Uo.js`),__vite__mapDeps([7,5,8]))},{path:`/moldinsight/result/:taskId`,component:()=>ju(()=>import(`./ResultView-NkqMWJoG.js`),__vite__mapDeps([9,5]))},{path:`/inventory`,component:()=>ju(()=>import(`./InventoryView-Lc0Z1KQy.js`),__vite__mapDeps([10,11,5,12])),redirect:`/inventory/dashboard`,children:[{path:`dashboard`,component:()=>ju(()=>import(`./DashboardTab-6_GGPgSj.js`),__vite__mapDeps([13,14,11,5]))},{path:`products`,component:()=>ju(()=>import(`./ProductsTab-ON3NQtwy.js`),__vite__mapDeps([15,14,11,5]))},{path:`materials`,component:()=>ju(()=>import(`./MaterialsTab-CUuSZrNR.js`),__vite__mapDeps([16,14,11,5]))},{path:`inventory`,component:()=>ju(()=>import(`./InventoryTab-CfDnJ7Xa.js`),__vite__mapDeps([17,14,11,5,18]))},{path:`purchases`,component:()=>ju(()=>import(`./PurchaseOrdersTab-B-omccCC.js`),__vite__mapDeps([19,14,11,5]))},{path:`sales_orders`,component:()=>ju(()=>import(`./SalesOrdersTab-3Xt3luKm.js`),__vite__mapDeps([20,14,11,5]))},{path:`suppliers`,component:()=>ju(()=>import(`./SuppliersTab-DoyluwJj.js`),__vite__mapDeps([21,14,11,5,22]))},{path:`customers`,component:()=>ju(()=>import(`./CustomersTab-DRzCY2Tl.js`),__vite__mapDeps([23,14,11,5,24]))},{path:`finance`,component:()=>ju(()=>import(`./FinanceTab-Bm0yAhLw.js`),__vite__mapDeps([25,14,11,5]))},{path:`movements`,component:()=>ju(()=>import(`./MovementsTab-DD15FX3n.js`),__vite__mapDeps([26,14,11,5,27]))}]},{path:`/_design-system`,component:()=>ju(()=>import(`./DesignSystemView-Cz2MAUqc.js`),[])},{path:`/_release`,component:()=>ju(()=>import(`./ReleaseView-BKKFXROr.js`),[])}]});Mu.beforeEach((e,t,n)=>{let r=![`/login`,`/_design-system`,`/_release`].includes(e.path),i=Du();if(r&&!i.user)return n(`/login`);if(e.path===`/login`&&i.user)return n(`/`);n()});async function Nu(e){try{if((e.headers.get(`content-type`)||``).includes(`application/json`)){let t=await e.json().catch(()=>null);if(t?.detail){if(Array.isArray(t.detail)){let e=t.detail.map(e=>{let t=Array.isArray(e?.loc)?e.loc.join(`.`):``,n=e?.msg?String(e.msg):`校验失败`;return t?`${t}: ${n}`:n}).filter(Boolean);return e.length?e.join(` +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/HomeView-C8A0ix5M.js","assets/HomeView-wPEC1q8T.css","assets/LoginView-C7Q64TDl.js","assets/LoginView-BRS9TQuR.css","assets/UsersView-x2MT0yp7.js","assets/utils-COFIQvWo.js","assets/MoldInsightView-DkAbjiJg.js","assets/BatchView-BMEYkwnK.js","assets/BatchView-ChYdh3sZ.css","assets/ResultView-CtyEJhC8.js","assets/InventoryView-DOGSgQZy.js","assets/inventory-BFlQBLDI.js","assets/InventoryView-Bu4m4R0x.css","assets/DashboardTab-DlAvFlmh.js","assets/useInventory-CrXJ8kdd.js","assets/ProductsTab-BXmeCZOh.js","assets/MaterialsTab-Cq_FP1X7.js","assets/InventoryTab-CFTHIGoz.js","assets/InventoryTab-C5CVNu_L.css","assets/PurchaseOrdersTab-DA-z0FT1.js","assets/SalesOrdersTab-Dn49N9j5.js","assets/SuppliersTab-Dr_fyxwE.js","assets/SuppliersTab-D2JArG3U.css","assets/CustomersTab-DftpbrJH.js","assets/CustomersTab-CjI1d8Lk.css","assets/FinanceTab-C1ObNRfG.js","assets/MovementsTab-DXIrYz_g.js","assets/MovementsTab-BUGroM5U.css"])))=>i.map(i=>d[i]); +(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();function e(e){let t=Object.create(null);for(let n of e.split(`,`))t[n]=1;return e=>e in t}var t={},n=[],r=()=>{},i=()=>!1,a=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),o=e=>e.startsWith(`onUpdate:`),s=Object.assign,c=(e,t)=>{let n=e.indexOf(t);n>-1&&e.splice(n,1)},l=Object.prototype.hasOwnProperty,u=(e,t)=>l.call(e,t),d=Array.isArray,f=e=>x(e)===`[object Map]`,p=e=>x(e)===`[object Set]`,m=e=>x(e)===`[object Date]`,h=e=>typeof e==`function`,g=e=>typeof e==`string`,_=e=>typeof e==`symbol`,v=e=>typeof e==`object`&&!!e,y=e=>(v(e)||h(e))&&h(e.then)&&h(e.catch),b=Object.prototype.toString,x=e=>b.call(e),S=e=>x(e).slice(8,-1),C=e=>x(e)===`[object Object]`,w=e=>g(e)&&e!==`NaN`&&e[0]!==`-`&&``+parseInt(e,10)===e,T=e(`,key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted`),E=e=>{let t=Object.create(null);return(n=>t[n]||(t[n]=e(n)))},D=/-\w/g,O=E(e=>e.replace(D,e=>e.slice(1).toUpperCase())),k=/\B([A-Z])/g,A=E(e=>e.replace(k,`-$1`).toLowerCase()),j=E(e=>e.charAt(0).toUpperCase()+e.slice(1)),M=E(e=>e?`on${j(e)}`:``),N=(e,t)=>!Object.is(e,t),P=(e,...t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:r,value:n})},ee=e=>{let t=parseFloat(e);return isNaN(t)?e:t},te=e=>{let t=g(e)?Number(e):NaN;return isNaN(t)?e:t},ne,re=()=>ne||=typeof globalThis<`u`?globalThis:typeof self<`u`?self:typeof window<`u`?window:typeof global<`u`?global:{};function ie(e){if(d(e)){let t={};for(let n=0;n{if(e){let n=e.split(oe);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}function le(e){let t=``;if(g(e))t=e;else if(d(e))for(let n=0;nme(e,t))}var ge=e=>!!(e&&e.__v_isRef===!0),_e=e=>g(e)?e:e==null?``:d(e)||v(e)&&(e.toString===b||!h(e.toString))?ge(e)?_e(e.value):JSON.stringify(e,ve,2):String(e),ve=(e,t)=>ge(t)?ve(e,t.value):f(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((e,[t,n],r)=>(e[ye(t,r)+` =>`]=n,e),{})}:p(t)?{[`Set(${t.size})`]:[...t.values()].map(e=>ye(e))}:_(t)?ye(t):v(t)&&!d(t)&&!C(t)?String(t):t,ye=(e,t=``)=>_(e)?`Symbol(${e.description??t})`:e,be,xe=class{constructor(e=!1){this.detached=e,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this._warnOnRun=!0,this.__v_skip=!0,!e&&be&&(be.active?(this.parent=be,this.index=(be.scopes||=[]).push(this)-1):(this._active=!1,this._warnOnRun=!1))}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let e,t;if(this.scopes)for(e=0,t=this.scopes.length;e0&&--this._on===0){if(be===this)be=this.prevScope;else{let e=be;for(;e;){if(e.prevScope===this){e.prevScope=this.prevScope;break}e=e.prevScope}}this.prevScope=void 0}}stop(e){if(this._active){this._active=!1;let t,n;for(t=0,n=this.effects.length;t0)return;if(Ae){let e=Ae;for(Ae=void 0;e;){let t=e.next;e.next=void 0,e.flags&=-9,e=t}}let e;for(;ke;){let t=ke;for(ke=void 0;t;){let n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(t){e||=t}t=n}}if(e)throw e}function Pe(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Fe(e){let t,n=e.depsTail,r=n;for(;r;){let e=r.prevDep;r.version===-1?(r===n&&(n=e),Re(r),ze(r)):t=r,r.dep.activeLink=r.prevActiveLink,r.prevActiveLink=void 0,r=e}e.deps=t,e.depsTail=n}function Ie(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Le(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function Le(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===Ge)||(e.globalVersion=Ge,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!Ie(e))))return;e.flags|=2;let t=e.dep,n=Te,r=Be;Te=e,Be=!0;try{Pe(e);let n=e.fn(e._value);(t.version===0||N(n,e._value))&&(e.flags|=128,e._value=n,t.version++)}catch(e){throw t.version++,e}finally{Te=n,Be=r,Fe(e),e.flags&=-3}}function Re(e,t=!1){let{dep:n,prevSub:r,nextSub:i}=e;if(r&&(r.nextSub=i,e.prevSub=void 0),i&&(i.prevSub=r,e.nextSub=void 0),n.subs===e&&(n.subs=r,!r&&n.computed)){n.computed.flags&=-5;for(let e=n.computed.deps;e;e=e.nextDep)Re(e,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function ze(e){let{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}var Be=!0,Ve=[];function He(){Ve.push(Be),Be=!1}function Ue(){let e=Ve.pop();Be=e===void 0?!0:e}function We(e){let{cleanup:t}=e;if(e.cleanup=void 0,t){let e=Te;Te=void 0;try{t()}finally{Te=e}}}var Ge=0,Ke=class{constructor(e,t){this.sub=e,this.dep=t,this.version=t.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}},qe=class{constructor(e){this.computed=e,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(e){if(!Te||!Be||Te===this.computed)return;let t=this.activeLink;if(t===void 0||t.sub!==Te)t=this.activeLink=new Ke(Te,this),Te.deps?(t.prevDep=Te.depsTail,Te.depsTail.nextDep=t,Te.depsTail=t):Te.deps=Te.depsTail=t,Je(t);else if(t.version===-1&&(t.version=this.version,t.nextDep)){let e=t.nextDep;e.prevDep=t.prevDep,t.prevDep&&(t.prevDep.nextDep=e),t.prevDep=Te.depsTail,t.nextDep=void 0,Te.depsTail.nextDep=t,Te.depsTail=t,Te.deps===t&&(Te.deps=e)}return t}trigger(e){this.version++,Ge++,this.notify(e)}notify(e){Me();try{for(let e=this.subs;e;e=e.prevSub)e.sub.notify()&&e.sub.dep.notify()}finally{Ne()}}};function Je(e){if(e.dep.sc++,e.sub.flags&4){let t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let e=t.deps;e;e=e.nextDep)Je(e)}let n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}var Ye=new WeakMap,Xe=Symbol(``),Ze=Symbol(``),Qe=Symbol(``);function $e(e,t,n){if(Be&&Te){let t=Ye.get(e);t||Ye.set(e,t=new Map);let r=t.get(n);r||(t.set(n,r=new qe),r.map=t,r.key=n),r.track()}}function et(e,t,n,r,i,a){let o=Ye.get(e);if(!o){Ge++;return}let s=e=>{e&&e.trigger()};if(Me(),t===`clear`)o.forEach(s);else{let i=d(e),a=i&&w(n);if(i&&n===`length`){let e=Number(r);o.forEach((t,n)=>{(n===`length`||n===Qe||!_(n)&&n>=e)&&s(t)})}else switch((n!==void 0||o.has(void 0))&&s(o.get(n)),a&&s(o.get(Qe)),t){case`add`:i?a&&s(o.get(`length`)):(s(o.get(Xe)),f(e)&&s(o.get(Ze)));break;case`delete`:i||(s(o.get(Xe)),f(e)&&s(o.get(Ze)));break;case`set`:f(e)&&s(o.get(Xe));break}}Ne()}function tt(e,t){let n=Ye.get(e);return n&&n.get(t)}function nt(e){let t=Ut(e);return t===e?t:($e(t,`iterate`,Qe),Vt(e)?t:t.map(Gt))}function rt(e){return $e(e=Ut(e),`iterate`,Qe),e}function it(e,t){return Bt(e)?Kt(zt(e)?Gt(t):t):Gt(t)}var at={__proto__:null,[Symbol.iterator](){return ot(this,Symbol.iterator,e=>it(this,e))},concat(...e){return nt(this).concat(...e.map(e=>d(e)?nt(e):e))},entries(){return ot(this,`entries`,e=>(e[1]=it(this,e[1]),e))},every(e,t){return ct(this,`every`,e,t,void 0,arguments)},filter(e,t){return ct(this,`filter`,e,t,e=>e.map(e=>it(this,e)),arguments)},find(e,t){return ct(this,`find`,e,t,e=>it(this,e),arguments)},findIndex(e,t){return ct(this,`findIndex`,e,t,void 0,arguments)},findLast(e,t){return ct(this,`findLast`,e,t,e=>it(this,e),arguments)},findLastIndex(e,t){return ct(this,`findLastIndex`,e,t,void 0,arguments)},forEach(e,t){return ct(this,`forEach`,e,t,void 0,arguments)},includes(...e){return ut(this,`includes`,e)},indexOf(...e){return ut(this,`indexOf`,e)},join(e){return nt(this).join(e)},lastIndexOf(...e){return ut(this,`lastIndexOf`,e)},map(e,t){return ct(this,`map`,e,t,void 0,arguments)},pop(){return dt(this,`pop`)},push(...e){return dt(this,`push`,e)},reduce(e,...t){return lt(this,`reduce`,e,t)},reduceRight(e,...t){return lt(this,`reduceRight`,e,t)},shift(){return dt(this,`shift`)},some(e,t){return ct(this,`some`,e,t,void 0,arguments)},splice(...e){return dt(this,`splice`,e)},toReversed(){return nt(this).toReversed()},toSorted(e){return nt(this).toSorted(e)},toSpliced(...e){return nt(this).toSpliced(...e)},unshift(...e){return dt(this,`unshift`,e)},values(){return ot(this,`values`,e=>it(this,e))}};function ot(e,t,n){let r=rt(e),i=r[t]();return r!==e&&!Vt(e)&&(i._next=i.next,i.next=()=>{let e=i._next();return e.done||(e.value=n(e.value)),e}),i}var st=Array.prototype;function ct(e,t,n,r,i,a){let o=rt(e),s=o!==e&&!Vt(e),c=o[t];if(c!==st[t]){let t=c.apply(e,a);return s?Gt(t):t}let l=n;o!==e&&(s?l=function(t,r){return n.call(this,it(e,t),r,e)}:n.length>2&&(l=function(t,r){return n.call(this,t,r,e)}));let u=c.call(o,l,r);return s&&i?i(u):u}function lt(e,t,n,r){let i=rt(e),a=i!==e&&!Vt(e),o=n,s=!1;i!==e&&(a?(s=r.length===0,o=function(t,r,i){return s&&(s=!1,t=it(e,t)),n.call(this,t,it(e,r),i,e)}):n.length>3&&(o=function(t,r,i){return n.call(this,t,r,i,e)}));let c=i[t](o,...r);return s?it(e,c):c}function ut(e,t,n){let r=Ut(e);$e(r,`iterate`,Qe);let i=r[t](...n);return(i===-1||i===!1)&&Ht(n[0])?(n[0]=Ut(n[0]),r[t](...n)):i}function dt(e,t,n=[]){He(),Me();let r=Ut(e)[t].apply(e,n);return Ne(),Ue(),r}var ft=e(`__proto__,__v_isRef,__isVue`),pt=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!==`arguments`&&e!==`caller`).map(e=>Symbol[e]).filter(_));function mt(e){_(e)||(e=String(e));let t=Ut(this);return $e(t,`has`,e),t.hasOwnProperty(e)}var ht=class{constructor(e=!1,t=!1){this._isReadonly=e,this._isShallow=t}get(e,t,n){if(t===`__v_skip`)return e.__v_skip;let r=this._isReadonly,i=this._isShallow;if(t===`__v_isReactive`)return!r;if(t===`__v_isReadonly`)return r;if(t===`__v_isShallow`)return i;if(t===`__v_raw`)return n===(r?i?Nt:Mt:i?jt:At).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(n)?e:void 0;let a=d(e);if(!r){let e;if(a&&(e=at[t]))return e;if(t===`hasOwnProperty`)return mt}let o=Reflect.get(e,t,qt(e)?e:n);if((_(t)?pt.has(t):ft(t))||(r||$e(e,`get`,t),i))return o;if(qt(o)){let e=a&&w(t)?o:o.value;return r&&v(e)?Lt(e):e}return v(o)?r?Lt(o):Ft(o):o}},gt=class extends ht{constructor(e=!1){super(!1,e)}set(e,t,n,r){let i=e[t],a=d(e)&&w(t);if(!this._isShallow){let e=Bt(i);if(!Vt(n)&&!Bt(n)&&(i=Ut(i),n=Ut(n)),!a&&qt(i)&&!qt(n))return e||(i.value=n),!0}let o=a?Number(t)e,St=e=>Reflect.getPrototypeOf(e);function Ct(e,t,n){return function(...r){let i=this.__v_raw,a=Ut(i),o=f(a),c=e===`entries`||e===Symbol.iterator&&o,l=e===`keys`&&o,u=i[e](...r),d=n?xt:t?Kt:Gt;return!t&&$e(a,`iterate`,l?Ze:Xe),s(Object.create(u),{next(){let{value:e,done:t}=u.next();return t?{value:e,done:t}:{value:c?[d(e[0]),d(e[1])]:d(e),done:t}}})}}function wt(e){return function(...t){return e===`delete`?!1:e===`clear`?void 0:this}}function Tt(e,t){let n={get(n){let r=this.__v_raw,i=Ut(r),a=Ut(n);e||(N(n,a)&&$e(i,`get`,n),$e(i,`get`,a));let{has:o}=St(i),s=t?xt:e?Kt:Gt;if(o.call(i,n))return s(r.get(n));if(o.call(i,a))return s(r.get(a));r!==i&&r.get(n)},get size(){let t=this.__v_raw;return!e&&$e(Ut(t),`iterate`,Xe),t.size},has(t){let n=this.__v_raw,r=Ut(n),i=Ut(t);return e||(N(t,i)&&$e(r,`has`,t),$e(r,`has`,i)),t===i?n.has(t):n.has(t)||n.has(i)},forEach(n,r){let i=this,a=i.__v_raw,o=Ut(a),s=t?xt:e?Kt:Gt;return!e&&$e(o,`iterate`,Xe),a.forEach((e,t)=>n.call(r,s(e),s(t),i))}};return s(n,e?{add:wt(`add`),set:wt(`set`),delete:wt(`delete`),clear:wt(`clear`)}:{add(e){let n=Ut(this),r=St(n),i=Ut(e),a=!t&&!Vt(e)&&!Bt(e)?i:e;return r.has.call(n,a)||N(e,a)&&r.has.call(n,e)||N(i,a)&&r.has.call(n,i)||(n.add(a),et(n,`add`,a,a)),this},set(e,n){!t&&!Vt(n)&&!Bt(n)&&(n=Ut(n));let r=Ut(this),{has:i,get:a}=St(r),o=i.call(r,e);o||=(e=Ut(e),i.call(r,e));let s=a.call(r,e);return r.set(e,n),o?N(n,s)&&et(r,`set`,e,n,s):et(r,`add`,e,n),this},delete(e){let t=Ut(this),{has:n,get:r}=St(t),i=n.call(t,e);i||=(e=Ut(e),n.call(t,e));let a=r?r.call(t,e):void 0,o=t.delete(e);return i&&et(t,`delete`,e,void 0,a),o},clear(){let e=Ut(this),t=e.size!==0,n=e.clear();return t&&et(e,`clear`,void 0,void 0,void 0),n}}),[`keys`,`values`,`entries`,Symbol.iterator].forEach(r=>{n[r]=Ct(r,e,t)}),n}function Et(e,t){let n=Tt(e,t);return(t,r,i)=>r===`__v_isReactive`?!e:r===`__v_isReadonly`?e:r===`__v_raw`?t:Reflect.get(u(n,r)&&r in t?n:t,r,i)}var Dt={get:Et(!1,!1)},Ot={get:Et(!1,!0)},kt={get:Et(!0,!1)},At=new WeakMap,jt=new WeakMap,Mt=new WeakMap,Nt=new WeakMap;function Pt(e){switch(e){case`Object`:case`Array`:return 1;case`Map`:case`Set`:case`WeakMap`:case`WeakSet`:return 2;default:return 0}}function Ft(e){return Bt(e)?e:Rt(e,!1,vt,Dt,At)}function It(e){return Rt(e,!1,bt,Ot,jt)}function Lt(e){return Rt(e,!0,yt,kt,Mt)}function Rt(e,t,n,r,i){if(!v(e)||e.__v_raw&&!(t&&e.__v_isReactive)||e.__v_skip||!Object.isExtensible(e))return e;let a=i.get(e);if(a)return a;let o=Pt(S(e));if(o===0)return e;let s=new Proxy(e,o===2?r:n);return i.set(e,s),s}function zt(e){return Bt(e)?zt(e.__v_raw):!!(e&&e.__v_isReactive)}function Bt(e){return!!(e&&e.__v_isReadonly)}function Vt(e){return!!(e&&e.__v_isShallow)}function Ht(e){return e?!!e.__v_raw:!1}function Ut(e){let t=e&&e.__v_raw;return t?Ut(t):e}function Wt(e){return!u(e,`__v_skip`)&&Object.isExtensible(e)&&F(e,`__v_skip`,!0),e}var Gt=e=>v(e)?Ft(e):e,Kt=e=>v(e)?Lt(e):e;function qt(e){return e?e.__v_isRef===!0:!1}function I(e){return Yt(e,!1)}function Jt(e){return Yt(e,!0)}function Yt(e,t){return qt(e)?e:new Xt(e,t)}var Xt=class{constructor(e,t){this.dep=new qe,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=t?e:Ut(e),this._value=t?e:Gt(e),this.__v_isShallow=t}get value(){return this.dep.track(),this._value}set value(e){let t=this._rawValue,n=this.__v_isShallow||Vt(e)||Bt(e);e=n?e:Ut(e),N(e,t)&&(this._rawValue=e,this._value=n?e:Gt(e),this.dep.trigger())}};function Zt(e){return qt(e)?e.value:e}var Qt={get:(e,t,n)=>t===`__v_raw`?e:Zt(Reflect.get(e,t,n)),set:(e,t,n,r)=>{let i=e[t];return qt(i)&&!qt(n)?(i.value=n,!0):Reflect.set(e,t,n,r)}};function $t(e){return zt(e)?e:new Proxy(e,Qt)}function L(e){let t=d(e)?Array(e.length):{};for(let n in e)t[n]=tn(e,n);return t}var en=class{constructor(e,t,n){this._object=e,this._defaultValue=n,this.__v_isRef=!0,this._value=void 0,this._key=_(t)?t:String(t),this._raw=Ut(e);let r=!0,i=e;if(!d(e)||_(this._key)||!w(this._key))do r=!Ht(i)||Vt(i);while(r&&(i=i.__v_raw));this._shallow=r}get value(){let e=this._object[this._key];return this._shallow&&(e=Zt(e)),this._value=e===void 0?this._defaultValue:e}set value(e){if(this._shallow&&qt(this._raw[this._key])){let t=this._object[this._key];if(qt(t)){t.value=e;return}}this._object[this._key]=e}get dep(){return tt(this._raw,this._key)}};function tn(e,t,n){return new en(e,t,n)}var nn=class{constructor(e,t,n){this.fn=e,this.setter=t,this._value=void 0,this.dep=new qe(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Ge-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!t,this.isSSR=n}notify(){if(this.flags|=16,!(this.flags&8)&&Te!==this)return je(this,!0),!0}get value(){let e=this.dep.track();return Le(this),e&&(e.version=this.dep.version),this._value}set value(e){this.setter&&this.setter(e)}};function rn(e,t,n=!1){let r,i;return h(e)?r=e:(r=e.get,i=e.set),new nn(r,i,n)}var an={},on=new WeakMap,sn=void 0;function cn(e,t=!1,n=sn){if(n){let t=on.get(n);t||on.set(n,t=[]),t.push(e)}}function ln(e,n,i=t){let{immediate:a,deep:o,once:s,scheduler:l,augmentJob:u,call:f}=i,p=e=>o?e:Vt(e)||o===!1||o===0?un(e,1):un(e),m,g,_,v,y=!1,b=!1;if(qt(e)?(g=()=>e.value,y=Vt(e)):zt(e)?(g=()=>p(e),y=!0):d(e)?(b=!0,y=e.some(e=>zt(e)||Vt(e)),g=()=>e.map(e=>{if(qt(e))return e.value;if(zt(e))return p(e);if(h(e))return f?f(e,2):e()})):g=h(e)?n?f?()=>f(e,2):e:()=>{if(_){He();try{_()}finally{Ue()}}let t=sn;sn=m;try{return f?f(e,3,[v]):e(v)}finally{sn=t}}:r,n&&o){let e=g,t=o===!0?1/0:o;g=()=>un(e(),t)}let x=Ce(),S=()=>{m.stop(),x&&x.active&&c(x.effects,m)};if(s&&n){let e=n;n=(...t)=>{e(...t),S()}}let C=b?Array(e.length).fill(an):an,w=e=>{if(!(!(m.flags&1)||!m.dirty&&!e))if(n){let e=m.run();if(o||y||(b?e.some((e,t)=>N(e,C[t])):N(e,C))){_&&_();let t=sn;sn=m;try{let t=[e,C===an?void 0:b&&C[0]===an?[]:C,v];C=e,f?f(n,3,t):n(...t)}finally{sn=t}}}else m.run()};return u&&u(w),m=new De(g),m.scheduler=l?()=>l(w,!1):w,v=e=>cn(e,!1,m),_=m.onStop=()=>{let e=on.get(m);if(e){if(f)f(e,4);else for(let t of e)t();on.delete(m)}},n?a?w(!0):C=m.run():l?l(w.bind(null,!0),!0):m.run(),S.pause=m.pause.bind(m),S.resume=m.resume.bind(m),S.stop=S,S}function un(e,t=1/0,n){if(t<=0||!v(e)||e.__v_skip||(n||=new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,qt(e))un(e.value,t,n);else if(d(e))for(let r=0;r{un(e,t,n)});else if(C(e)){for(let r in e)un(e[r],t,n);for(let r of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,r)&&un(e[r],t,n)}return e}function dn(e,t,n,r){try{return r?e(...r):e()}catch(e){pn(e,t,n)}}function fn(e,t,n,r){if(h(e)){let i=dn(e,t,n,r);return i&&y(i)&&i.catch(e=>{pn(e,t,n)}),i}if(d(e)){let i=[];for(let a=0;a>>1,i=hn[r],a=kn(i);a=kn(n)?hn.push(e):hn.splice(Cn(t),0,e),e.flags|=1,Tn()}}function Tn(){xn||=bn.then(An)}function En(e){d(e)?_n.push(...e):vn&&e.id===-1?vn.splice(yn+1,0,e):e.flags&1||(_n.push(e),e.flags|=1),Tn()}function Dn(e,t,n=gn+1){for(;nkn(e)-kn(t));if(_n.length=0,vn){vn.push(...e);return}for(vn=e,yn=0;yne.id==null?e.flags&2?-1:1/0:e.id;function An(e){try{for(gn=0;gn{r._d&&xa(-1);let i=Nn(t),a;try{a=e(...n)}finally{Nn(i),r._d&&xa(1)}return a};return r._n=!0,r._c=!0,r._d=!0,r}function Fn(e,n){if(jn===null)return e;let r=ao(jn),i=e.dirs||=[];for(let e=0;e1)return n&&h(t)?t.call(r&&r.proxy):t}}function zn(){return!!(Wa()||Si)}var Bn=Symbol.for(`v-scx`),Vn=()=>Rn(Bn);function Hn(e,t){return Un(e,null,t)}function R(e,t,n){return Un(e,t,n)}function Un(e,n,i=t){let{immediate:a,deep:o,flush:c,once:l}=i,u=s({},i),d=n&&a||!n&&c!==`post`,f;if(Xa){if(c===`sync`){let e=Vn();f=e.__watcherHandles||=[]}else if(!d){let e=()=>{};return e.stop=r,e.resume=r,e.pause=r,e}}let p=Ua;u.call=(e,t,n)=>fn(e,p,t,n);let m=!1;c===`post`?u.scheduler=e=>{$i(e,p&&p.suspense)}:c!==`sync`&&(m=!0,u.scheduler=(e,t)=>{t?e():wn(e)}),u.augmentJob=e=>{n&&(e.flags|=4),m&&(e.flags|=2,p&&(e.id=p.uid,e.i=p))};let h=ln(e,n,u);return Xa&&(f?f.push(h):d&&h()),h}function Wn(e,t,n){let r=this.proxy,i=g(e)?e.includes(`.`)?Gn(r,e):()=>r[e]:e.bind(r,r),a;h(t)?a=t:(a=t.handler,n=t);let o=qa(this),s=Un(i,a.bind(r),n);return o(),s}function Gn(e,t){let n=t.split(`.`);return()=>{let t=e;for(let e=0;ee.__isTeleport,Yn=e=>e&&(e.disabled||e.disabled===``),Xn=e=>e&&(e.defer||e.defer===``),Zn=e=>typeof SVGElement<`u`&&e instanceof SVGElement,Qn=e=>typeof MathMLElement==`function`&&e instanceof MathMLElement,$n=(e,t)=>{let n=e&&e.to;return g(n)?t?t(n):null:n},er={name:`Teleport`,__isTeleport:!0,process(e,t,n,r,i,a,o,s,c,l){let{mc:u,pc:d,pbc:f,o:{insert:p,querySelector:m,createText:h,createComment:g,parentNode:_}}=l,v=Yn(t.props),{dynamicChildren:y}=t,b=(e,t,n)=>{e.shapeFlag&16&&u(e.children,t,n,i,a,o,s,c)},x=(e=t)=>{let n=Yn(e.props),r=e.target=$n(e.props,m),a=ar(r,e,h,p);r&&(o!==`svg`&&Zn(r)?o=`svg`:o!==`mathml`&&Qn(r)&&(o=`mathml`),i&&i.isCE&&(i.ce._teleportTargets||(i.ce._teleportTargets=new Set)).add(r),n||(b(e,r,a),ir(e,!1)))},S=e=>{let t=()=>{Kn.get(e)===t&&(Kn.delete(e),Yn(e.props)&&(b(e,_(e.el)||n,e.anchor),ir(e,!0)),x(e))};Kn.set(e,t),$i(t,a)};if(e==null){let e=t.el=h(``),i=t.anchor=h(``);if(p(e,n,r),p(i,n,r),Xn(t.props)||a&&a.pendingBranch){S(t);return}v&&(b(t,n,i),ir(t,!0)),x()}else{t.el=e.el;let r=t.anchor=e.anchor,u=Kn.get(e);if(u){u.flags|=8,Kn.delete(e),S(t);return}t.targetStart=e.targetStart;let p=t.target=e.target,h=t.targetAnchor=e.targetAnchor,g=Yn(e.props),_=g?n:p,b=g?r:h;if(o===`svg`||Zn(p)?o=`svg`:(o===`mathml`||Qn(p))&&(o=`mathml`),y?(f(e.dynamicChildren,y,_,i,a,o,s),aa(e,t,!0)):c||d(e,t,_,b,i,a,o,s,!1),v)g?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):tr(t,n,r,l,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){let e=t.target=$n(t.props,m);e&&tr(t,e,null,l,0)}else g&&tr(t,p,h,l,1);ir(t,v)}},remove(e,t,n,{um:r,o:{remove:i}},a){let{shapeFlag:o,children:s,anchor:c,targetStart:l,targetAnchor:u,target:d,props:f}=e,p=a||!Yn(f),m=Kn.get(e);if(m&&(m.flags|=8,Kn.delete(e)),d&&(i(l),i(u)),a&&i(c),!m&&o&16)for(let e=0;e{e.isMounted=!0}),Rr(()=>{e.isUnmounting=!0}),e}var lr=[Function,Array],ur={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:lr,onEnter:lr,onAfterEnter:lr,onEnterCancelled:lr,onBeforeLeave:lr,onLeave:lr,onAfterLeave:lr,onLeaveCancelled:lr,onBeforeAppear:lr,onAppear:lr,onAfterAppear:lr,onAppearCancelled:lr},dr=e=>{let t=e.subTree;return t.component?dr(t.component):t},fr={name:`BaseTransition`,props:ur,setup(e,{slots:t}){let n=Wa(),r=cr();return()=>{let i=t.default&&br(t.default(),!0),a=i&&i.length?pr(i):n.subTree?Fa():void 0;if(!a)return;let o=Ut(e),{mode:s}=o;if(r.isLeaving)return _r(a);let c=vr(a);if(!c)return _r(a);let l=gr(c,o,r,n,e=>l=e);c.type!==ma&&yr(c,l);let u=n.subTree&&vr(n.subTree);if(u&&u.type!==ma&&!Ea(u,c)&&dr(n).type!==ma){let e=gr(u,o,r,n);if(yr(u,e),s===`out-in`&&c.type!==ma)return r.isLeaving=!0,e.afterLeave=()=>{r.isLeaving=!1,n.job.flags&8||n.update(),delete e.afterLeave,u=void 0},_r(a);s===`in-out`&&c.type!==ma?e.delayLeave=(e,t,n)=>{let i=hr(r,u);i[String(u.key)]=u,e[or]=()=>{t(),e[or]=void 0,delete l.delayedLeave,u=void 0},l.delayedLeave=()=>{n(),delete l.delayedLeave,u=void 0}}:u=void 0}else u&&=void 0;return a}}};function pr(e){let t=e[0];if(e.length>1){for(let n of e)if(n.type!==ma){t=n;break}}return t}var mr=fr;function hr(e,t){let{leavingVNodes:n}=e,r=n.get(t.type);return r||(r=Object.create(null),n.set(t.type,r)),r}function gr(e,t,n,r,i){let{appear:a,mode:o,persisted:s=!1,onBeforeEnter:c,onEnter:l,onAfterEnter:u,onEnterCancelled:f,onBeforeLeave:p,onLeave:m,onAfterLeave:h,onLeaveCancelled:g,onBeforeAppear:_,onAppear:v,onAfterAppear:y,onAppearCancelled:b}=t,x=String(e.key),S=hr(n,e),C=(e,t)=>{e&&fn(e,r,9,t)},w=(e,t)=>{let n=t[1];C(e,t),d(e)?e.every(e=>e.length<=1)&&n():e.length<=1&&n()},T={mode:o,persisted:s,beforeEnter(t){let r=c;if(!n.isMounted)if(a)r=_||c;else return;t[or]&&t[or](!0);let i=S[x];i&&Ea(e,i)&&i.el[or]&&i.el[or](),C(r,[t])},enter(t){if(S[x]===e)return;let r=l,i=u,o=f;if(!n.isMounted)if(a)r=v||l,i=y||u,o=b||f;else return;let s=!1;t[sr]=e=>{s||(s=!0,C(e?o:i,[t]),T.delayedLeave&&T.delayedLeave(),t[sr]=void 0)};let c=t[sr].bind(null,!1);r?w(r,[t,c]):c()},leave(t,r){let i=String(e.key);if(t[sr]&&t[sr](!0),n.isUnmounting)return r();C(p,[t]);let a=!1;t[or]=n=>{a||(a=!0,r(),C(n?g:h,[t]),t[or]=void 0,S[i]===e&&delete S[i])};let o=t[or].bind(null,!1);S[i]=e,m?w(m,[t,o]):o()},clone(e){let a=gr(e,t,n,r,i);return i&&i(a),a}};return T}function _r(e){if(Dr(e))return e=Ma(e),e.children=null,e}function vr(e){if(!Dr(e))return Jn(e.type)&&e.children?pr(e.children):e;if(e.component)return e.component.subTree;let{shapeFlag:t,children:n}=e;if(n){if(t&16)return n[0];if(t&32&&h(n.default))return n.default()}}function yr(e,t){e.shapeFlag&6&&e.component?(e.transition=t,yr(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function br(e,t=!1,n){let r=[],i=0;for(let a=0;a1)for(let e=0;ewr(e,n&&(d(n)?n[t]:n),r,a,o));return}if(Er(a)&&!o){a.shapeFlag&512&&a.type.__asyncResolved&&a.component.subTree.component&&wr(e,n,r,a.component.subTree);return}let s=a.shapeFlag&4?ao(a.component):a.el,l=o?null:s,{i:f,r:p}=e,m=n&&n.r,_=f.refs===t?f.refs={}:f.refs,v=f.setupState,y=Ut(v),b=v===t?i:e=>Sr(_,e)?!1:u(y,e),x=(e,t)=>!(t&&Sr(_,t));if(m!=null&&m!==p){if(Tr(n),g(m))_[m]=null,b(m)&&(v[m]=null);else if(qt(m)){let e=n;x(m,e.k)&&(m.value=null),e.k&&(_[e.k]=null)}}if(h(p))dn(p,f,12,[l,_]);else{let t=g(p),n=qt(p);if(t||n){let i=()=>{if(e.f){let n=t?b(p)?v[p]:_[p]:x(p)||!e.k?p.value:_[e.k];if(o)d(n)&&c(n,s);else if(d(n))n.includes(s)||n.push(s);else if(t)_[p]=[s],b(p)&&(v[p]=_[p]);else{let t=[s];x(p,e.k)&&(p.value=t),e.k&&(_[e.k]=t)}}else t?(_[p]=l,b(p)&&(v[p]=l)):n&&(x(p,e.k)&&(p.value=l),e.k&&(_[e.k]=l))};if(l){let t=()=>{i(),Cr.delete(e)};t.id=-1,Cr.set(e,t),$i(t,r)}else Tr(e),i()}}}function Tr(e){let t=Cr.get(e);t&&(t.flags|=8,Cr.delete(e))}re().requestIdleCallback,re().cancelIdleCallback;var Er=e=>!!e.type.__asyncLoader,Dr=e=>e.type.__isKeepAlive;function Or(e,t){Ar(e,`a`,t)}function kr(e,t){Ar(e,`da`,t)}function Ar(e,t,n=Ua){let r=e.__wdc||=()=>{let t=n;for(;t;){if(t.isDeactivated)return;t=t.parent}return e()};if(Mr(t,r,n),n){let e=n.parent;for(;e&&e.parent;)Dr(e.parent.vnode)&&jr(r,t,n,e),e=e.parent}}function jr(e,t,n,r){let i=Mr(t,e,r,!0);zr(()=>{c(r[t],i)},n)}function Mr(e,t,n=Ua,r=!1){if(n){let i=n[e]||(n[e]=[]),a=t.__weh||=(...r)=>{He();let i=qa(n),a=fn(t,n,e,r);return i(),Ue(),a};return r?i.unshift(a):i.push(a),a}}var Nr=e=>(t,n=Ua)=>{(!Xa||e===`sp`)&&Mr(e,(...e)=>t(...e),n)},Pr=Nr(`bm`),Fr=Nr(`m`),Ir=Nr(`bu`),Lr=Nr(`u`),Rr=Nr(`bum`),zr=Nr(`um`),Br=Nr(`sp`),Vr=Nr(`rtg`),Hr=Nr(`rtc`);function Ur(e,t=Ua){Mr(`ec`,e,t)}var Wr=`components`,Gr=`directives`;function Kr(e,t){return Xr(Wr,e,!0,t)||e}var qr=Symbol.for(`v-ndc`);function Jr(e){return g(e)?Xr(Wr,e,!1)||e:e||qr}function Yr(e){return Xr(Gr,e)}function Xr(e,t,n=!0,r=!1){let i=jn||Ua;if(i){let n=i.type;if(e===Wr){let e=oo(n,!1);if(e&&(e===t||e===O(t)||e===j(O(t))))return n}let a=Zr(i[e]||n[e],t)||Zr(i.appContext[e],t);return!a&&r?n:a}}function Zr(e,t){return e&&(e[t]||e[O(t)]||e[j(O(t))])}function Qr(e,t,n,r){let i,a=n&&n[r],o=d(e);if(o||g(e)){let n=o&&zt(e),r=!1,s=!1;n&&(r=!Vt(e),s=Bt(e),e=rt(e)),i=Array(e.length);for(let n=0,o=e.length;nt(e,n,void 0,a&&a[n]));else{let n=Object.keys(e);i=Array(n.length);for(let r=0,o=n.length;re?Ya(e)?ao(e):$r(e.parent):null,ei=s(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>$r(e.parent),$root:e=>$r(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>li(e),$forceUpdate:e=>e.f||=()=>{wn(e.update)},$nextTick:e=>e.n||=Sn.bind(e.proxy),$watch:e=>Wn.bind(e)}),ti=(e,n)=>e!==t&&!e.__isScriptSetup&&u(e,n),ni={get({_:e},n){if(n===`__v_skip`)return!0;let{ctx:r,setupState:i,data:a,props:o,accessCache:s,type:c,appContext:l}=e;if(n[0]!==`$`){let e=s[n];if(e!==void 0)switch(e){case 1:return i[n];case 2:return a[n];case 4:return r[n];case 3:return o[n]}else if(ti(i,n))return s[n]=1,i[n];else if(a!==t&&u(a,n))return s[n]=2,a[n];else if(u(o,n))return s[n]=3,o[n];else if(r!==t&&u(r,n))return s[n]=4,r[n];else ii&&(s[n]=0)}let d=ei[n],f,p;if(d)return n===`$attrs`&&$e(e.attrs,`get`,``),d(e);if((f=c.__cssModules)&&(f=f[n]))return f;if(r!==t&&u(r,n))return s[n]=4,r[n];if(p=l.config.globalProperties,u(p,n))return p[n]},set({_:e},n,r){let{data:i,setupState:a,ctx:o}=e;return ti(a,n)?(a[n]=r,!0):i!==t&&u(i,n)?(i[n]=r,!0):u(e.props,n)||n[0]===`$`&&n.slice(1)in e?!1:(o[n]=r,!0)},has({_:{data:e,setupState:n,accessCache:r,ctx:i,appContext:a,props:o,type:s}},c){let l;return!!(r[c]||e!==t&&c[0]!==`$`&&u(e,c)||ti(n,c)||u(o,c)||u(i,c)||u(ei,c)||u(a.config.globalProperties,c)||(l=s.__cssModules)&&l[c])},defineProperty(e,t,n){return n.get==null?u(n,`value`)&&this.set(e,t,n.value,null):e._.accessCache[t]=0,Reflect.defineProperty(e,t,n)}};function ri(e){return d(e)?e.reduce((e,t)=>(e[t]=null,e),{}):e}var ii=!0;function ai(e){let t=li(e),n=e.proxy,i=e.ctx;ii=!1,t.beforeCreate&&si(t.beforeCreate,e,`bc`);let{data:a,computed:o,methods:s,watch:c,provide:l,inject:u,created:f,beforeMount:p,mounted:m,beforeUpdate:g,updated:_,activated:y,deactivated:b,beforeDestroy:x,beforeUnmount:S,destroyed:C,unmounted:w,render:T,renderTracked:E,renderTriggered:D,errorCaptured:O,serverPrefetch:k,expose:A,inheritAttrs:j,components:M,directives:N,filters:P}=t;if(u&&oi(u,i,null),s)for(let e in s){let t=s[e];h(t)&&(i[e]=t.bind(n))}if(a){let t=a.call(n,n);v(t)&&(e.data=Ft(t))}if(ii=!0,o)for(let e in o){let t=o[e],a=H({get:h(t)?t.bind(n,n):h(t.get)?t.get.bind(n,n):r,set:!h(t)&&h(t.set)?t.set.bind(n):r});Object.defineProperty(i,e,{enumerable:!0,configurable:!0,get:()=>a.value,set:e=>a.value=e})}if(c)for(let e in c)ci(c[e],i,n,e);if(l){let e=h(l)?l.call(n):l;Reflect.ownKeys(e).forEach(t=>{Ln(t,e[t])})}f&&si(f,e,`c`);function F(e,t){d(t)?t.forEach(t=>e(t.bind(n))):t&&e(t.bind(n))}if(F(Pr,p),F(Fr,m),F(Ir,g),F(Lr,_),F(Or,y),F(kr,b),F(Ur,O),F(Hr,E),F(Vr,D),F(Rr,S),F(zr,w),F(Br,k),d(A))if(A.length){let t=e.exposed||={};A.forEach(e=>{Object.defineProperty(t,e,{get:()=>n[e],set:t=>n[e]=t,enumerable:!0})})}else e.exposed||={};T&&e.render===r&&(e.render=T),j!=null&&(e.inheritAttrs=j),M&&(e.components=M),N&&(e.directives=N),k&&xr(e)}function oi(e,t,n=r){d(e)&&(e=mi(e));for(let n in e){let r=e[n],i;i=v(r)?`default`in r?Rn(r.from||n,r.default,!0):Rn(r.from||n):Rn(r),qt(i)?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>i.value,set:e=>i.value=e}):t[n]=i}}function si(e,t,n){fn(d(e)?e.map(e=>e.bind(t.proxy)):e.bind(t.proxy),t,n)}function ci(e,t,n,r){let i=r.includes(`.`)?Gn(n,r):()=>n[r];if(g(e)){let n=t[e];h(n)&&R(i,n)}else if(h(e))R(i,e.bind(n));else if(v(e))if(d(e))e.forEach(e=>ci(e,t,n,r));else{let r=h(e.handler)?e.handler.bind(n):t[e.handler];h(r)&&R(i,r,e)}}function li(e){let t=e.type,{mixins:n,extends:r}=t,{mixins:i,optionsCache:a,config:{optionMergeStrategies:o}}=e.appContext,s=a.get(t),c;return s?c=s:!i.length&&!n&&!r?c=t:(c={},i.length&&i.forEach(e=>ui(c,e,o,!0)),ui(c,t,o)),v(t)&&a.set(t,c),c}function ui(e,t,n,r=!1){let{mixins:i,extends:a}=t;a&&ui(e,a,n,!0),i&&i.forEach(t=>ui(e,t,n,!0));for(let i in t)if(!(r&&i===`expose`)){let r=di[i]||n&&n[i];e[i]=r?r(e[i],t[i]):t[i]}return e}var di={data:fi,props:_i,emits:_i,methods:gi,computed:gi,beforeCreate:hi,created:hi,beforeMount:hi,mounted:hi,beforeUpdate:hi,updated:hi,beforeDestroy:hi,beforeUnmount:hi,destroyed:hi,unmounted:hi,activated:hi,deactivated:hi,errorCaptured:hi,serverPrefetch:hi,components:gi,directives:gi,watch:vi,provide:fi,inject:pi};function fi(e,t){return t?e?function(){return s(h(e)?e.call(this,this):e,h(t)?t.call(this,this):t)}:t:e}function pi(e,t){return gi(mi(e),mi(t))}function mi(e){if(d(e)){let t={};for(let n=0;nt===`modelValue`||t===`model-value`?e.modelModifiers:e[`${t}Modifiers`]||e[`${O(t)}Modifiers`]||e[`${A(t)}Modifiers`];function wi(e,n,...r){if(e.isUnmounted)return;let i=e.vnode.props||t,a=r,o=n.startsWith(`update:`),s=o&&Ci(i,n.slice(7));s&&(s.trim&&(a=r.map(e=>g(e)?e.trim():e)),s.number&&(a=r.map(ee)));let c,l=i[c=M(n)]||i[c=M(O(n))];!l&&o&&(l=i[c=M(A(n))]),l&&fn(l,e,6,a);let u=i[c+`Once`];if(u){if(!e.emitted)e.emitted={};else if(e.emitted[c])return;e.emitted[c]=!0,fn(u,e,6,a)}}var Ti=new WeakMap;function Ei(e,t,n=!1){let r=n?Ti:t.emitsCache,i=r.get(e);if(i!==void 0)return i;let a=e.emits,o={},c=!1;if(!h(e)){let r=e=>{let n=Ei(e,t,!0);n&&(c=!0,s(o,n))};!n&&t.mixins.length&&t.mixins.forEach(r),e.extends&&r(e.extends),e.mixins&&e.mixins.forEach(r)}return!a&&!c?(v(e)&&r.set(e,null),null):(d(a)?a.forEach(e=>o[e]=null):s(o,a),v(e)&&r.set(e,o),o)}function Di(e,t){return!e||!a(t)?!1:(t=t.slice(2).replace(/Once$/,``),u(e,t[0].toLowerCase()+t.slice(1))||u(e,A(t))||u(e,t))}function Oi(e){let{type:t,vnode:n,proxy:r,withProxy:i,propsOptions:[a],slots:s,attrs:c,emit:l,render:u,renderCache:d,props:f,data:p,setupState:m,ctx:h,inheritAttrs:g}=e,_=Nn(e),v,y;try{if(n.shapeFlag&4){let e=i||r,t=e;v=Ia(u.call(t,e,d,f,m,p,h)),y=c}else{let e=t;v=Ia(e.length>1?e(f,{attrs:c,slots:s,emit:l}):e(f,null)),y=t.props?c:ki(c)}}catch(t){ga.length=0,pn(t,e,1),v=B(ma)}let b=v;if(y&&g!==!1){let e=Object.keys(y),{shapeFlag:t}=b;e.length&&t&7&&(a&&e.some(o)&&(y=Ai(y,a)),b=Ma(b,y,!1,!0))}return n.dirs&&(b=Ma(b,null,!1,!0),b.dirs=b.dirs?b.dirs.concat(n.dirs):n.dirs),n.transition&&yr(b,n.transition),v=b,Nn(_),v}var ki=e=>{let t;for(let n in e)(n===`class`||n===`style`||a(n))&&((t||={})[n]=e[n]);return t},Ai=(e,t)=>{let n={};for(let r in e)(!o(r)||!(r.slice(9)in t))&&(n[r]=e[r]);return n};function ji(e,t,n){let{props:r,children:i,component:a}=e,{props:o,children:s,patchFlag:c}=t,l=a.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&c>=0){if(c&1024)return!0;if(c&16)return r?Mi(r,o,l):!!o;if(c&8){let e=t.dynamicProps;for(let t=0;tObject.create(Fi),Li=e=>Object.getPrototypeOf(e)===Fi;function Ri(e,t,n,r=!1){let i={},a=Ii();e.propsDefaults=Object.create(null),Bi(e,t,i,a);for(let t in e.propsOptions[0])t in i||(i[t]=void 0);n?e.props=r?i:It(i):e.type.props?e.props=i:e.props=a,e.attrs=a}function zi(e,t,n,r){let{props:i,attrs:a,vnode:{patchFlag:o}}=e,s=Ut(i),[c]=e.propsOptions,l=!1;if((r||o>0)&&!(o&16)){if(o&8){let n=e.vnode.dynamicProps;for(let r=0;r{p=!0;let[t,n]=Ui(e,r,!0);s(l,t),n&&f.push(...n)};!i&&r.mixins.length&&r.mixins.forEach(t),e.extends&&t(e.extends),e.mixins&&e.mixins.forEach(t)}if(!c&&!p)return v(e)&&a.set(e,n),n;if(d(c))for(let e=0;ee===`_`||e===`_ctx`||e===`$stable`,Ki=e=>d(e)?e.map(Ia):[Ia(e)],qi=(e,t,n)=>{if(t._n)return t;let r=Pn((...e)=>Ki(t(...e)),n);return r._c=!1,r},Ji=(e,t,n)=>{let r=e._ctx;for(let n in e){if(Gi(n))continue;let i=e[n];if(h(i))t[n]=qi(n,i,r);else if(i!=null){let e=Ki(i);t[n]=()=>e}}},Yi=(e,t)=>{let n=Ki(t);e.slots.default=()=>n},Xi=(e,t,n)=>{for(let r in t)(n||!Gi(r))&&(e[r]=t[r])},Zi=(e,t,n)=>{let r=e.slots=Ii();if(e.vnode.shapeFlag&32){let e=t._;e?(Xi(r,t,n),n&&F(r,`_`,e,!0)):Ji(t,r)}else t&&Yi(e,t)},Qi=(e,n,r)=>{let{vnode:i,slots:a}=e,o=!0,s=t;if(i.shapeFlag&32){let e=n._;e?r&&e===1?o=!1:Xi(a,n,r):(o=!n.$stable,Ji(n,a)),s=n}else n&&(Yi(e,n),s={default:1});if(o)for(let e in a)!Gi(e)&&s[e]==null&&delete a[e]},$i=da;function ea(e){return ta(e)}function ta(e,i){let a=re();a.__VUE__=!0;let{insert:o,remove:s,patchProp:c,createElement:l,createText:u,createComment:d,setText:f,setElementText:p,parentNode:m,nextSibling:h,setScopeId:g=r,insertStaticContent:_}=e,v=(e,t,n,r=null,i=null,a=null,o=void 0,s=null,c=!!t.dynamicChildren)=>{if(e===t)return;e&&!Ea(e,t)&&(r=pe(e),ce(e,i,a,!0),e=null),t.patchFlag===-2&&(c=!1,t.dynamicChildren=null);let{type:l,ref:u,shapeFlag:d}=t;switch(l){case pa:y(e,t,n,r);break;case ma:b(e,t,n,r);break;case ha:e??x(t,n,r,o);break;case fa:M(e,t,n,r,i,a,o,s,c);break;default:d&1?w(e,t,n,r,i,a,o,s,c):d&6?N(e,t,n,r,i,a,o,s,c):(d&64||d&128)&&l.process(e,t,n,r,i,a,o,s,c,ge)}u!=null&&i?wr(u,e&&e.ref,a,t||e,!t):u==null&&e&&e.ref!=null&&wr(e.ref,null,a,e,!0)},y=(e,t,n,r)=>{if(e==null)o(t.el=u(t.children),n,r);else{let n=t.el=e.el;t.children!==e.children&&f(n,t.children)}},b=(e,t,n,r)=>{e==null?o(t.el=d(t.children||``),n,r):t.el=e.el},x=(e,t,n,r)=>{[e.el,e.anchor]=_(e.children,t,n,r,e.el,e.anchor)},S=({el:e,anchor:t},n,r)=>{let i;for(;e&&e!==t;)i=h(e),o(e,n,r),e=i;o(t,n,r)},C=({el:e,anchor:t})=>{let n;for(;e&&e!==t;)n=h(e),s(e),e=n;s(t)},w=(e,t,n,r,i,a,o,s,c)=>{if(t.type===`svg`?o=`svg`:t.type===`math`&&(o=`mathml`),e==null)E(t,n,r,i,a,o,s,c);else{let n=e.el&&e.el._isVueCE?e.el:null;try{n&&n._beginPatch(),k(e,t,i,a,o,s,c)}finally{n&&n._endPatch()}}},E=(e,t,n,r,i,a,s,u)=>{let d,f,{props:m,shapeFlag:h,transition:g,dirs:_}=e;if(d=e.el=l(e.type,a,m&&m.is,m),h&8?p(d,e.children):h&16&&O(e.children,d,null,r,i,na(e,a),s,u),_&&In(e,null,r,`created`),D(d,e,e.scopeId,s,r),m){for(let e in m)e!==`value`&&!T(e)&&c(d,e,null,m[e],a,r);`value`in m&&c(d,`value`,null,m.value,a),(f=m.onVnodeBeforeMount)&&za(f,r,e)}_&&In(e,null,r,`beforeMount`);let v=ia(i,g);v&&g.beforeEnter(d),o(d,t,n),((f=m&&m.onVnodeMounted)||v||_)&&$i(()=>{try{f&&za(f,r,e),v&&g.enter(d),_&&In(e,null,r,`mounted`)}finally{}},i)},D=(e,t,n,r,i)=>{if(n&&g(e,n),r)for(let t=0;t{for(let l=c;l{let l=n.el=e.el,{patchFlag:u,dynamicChildren:d,dirs:f}=n;u|=e.patchFlag&16;let m=e.props||t,h=n.props||t,g;if(r&&ra(r,!1),(g=h.onVnodeBeforeUpdate)&&za(g,r,n,e),f&&In(n,e,r,`beforeUpdate`),r&&ra(r,!0),(m.innerHTML&&h.innerHTML==null||m.textContent&&h.textContent==null)&&p(l,``),d?A(e.dynamicChildren,d,l,r,i,na(n,a),o):s||ie(e,n,l,null,r,i,na(n,a),o,!1),u>0){if(u&16)j(l,m,h,r,a);else if(u&2&&m.class!==h.class&&c(l,`class`,null,h.class,a),u&4&&c(l,`style`,m.style,h.style,a),u&8){let e=n.dynamicProps;for(let t=0;t{g&&za(g,r,n,e),f&&In(n,e,r,`updated`)},i)},A=(e,t,n,r,i,a,o)=>{for(let s=0;s{if(n!==r){if(n!==t)for(let t in n)!T(t)&&!(t in r)&&c(e,t,n[t],null,a,i);for(let t in r){if(T(t))continue;let o=r[t],s=n[t];o!==s&&t!==`value`&&c(e,t,s,o,a,i)}`value`in r&&c(e,`value`,n.value,r.value,a)}},M=(e,t,n,r,i,a,s,c,l)=>{let d=t.el=e?e.el:u(``),f=t.anchor=e?e.anchor:u(``),{patchFlag:p,dynamicChildren:m,slotScopeIds:h}=t;h&&(c=c?c.concat(h):h),e==null?(o(d,n,r),o(f,n,r),O(t.children||[],n,f,i,a,s,c,l)):p>0&&p&64&&m&&e.dynamicChildren&&e.dynamicChildren.length===m.length?(A(e.dynamicChildren,m,n,i,a,s,c),(t.key!=null||i&&t===i.subTree)&&aa(e,t,!0)):ie(e,t,n,f,i,a,s,c,l)},N=(e,t,n,r,i,a,o,s,c)=>{t.slotScopeIds=s,e==null?t.shapeFlag&512?i.ctx.activate(t,n,r,o,c):F(t,n,r,i,a,o,c):ee(e,t,c)},F=(e,t,n,r,i,a,o)=>{let s=e.component=Ha(e,r,i);if(Dr(e)&&(s.ctx.renderer=ge),Za(s,!1,o),s.asyncDep){if(i&&i.registerDep(s,te,o),!e.el){let r=s.subTree=B(ma);b(null,r,t,n),e.placeholder=r.el}}else te(s,e,t,n,i,a,o)},ee=(e,t,n)=>{let r=t.component=e.component;if(ji(e,t,n))if(r.asyncDep&&!r.asyncResolved){ne(r,t,n);return}else r.next=t,r.update();else t.el=e.el,r.vnode=t},te=(e,t,n,r,i,a,o)=>{let s=()=>{if(e.isMounted){let{next:t,bu:n,u:r,parent:s,vnode:c}=e;{let n=sa(e);if(n){t&&(t.el=c.el,ne(e,t,o)),n.asyncDep.then(()=>{$i(()=>{e.isUnmounted||l()},i)});return}}let u=t,d;ra(e,!1),t?(t.el=c.el,ne(e,t,o)):t=c,n&&P(n),(d=t.props&&t.props.onVnodeBeforeUpdate)&&za(d,s,t,c),ra(e,!0);let f=Oi(e),p=e.subTree;e.subTree=f,v(p,f,m(p.el),pe(p),e,i,a),t.el=f.el,u===null&&Pi(e,f.el),r&&$i(r,i),(d=t.props&&t.props.onVnodeUpdated)&&$i(()=>za(d,s,t,c),i)}else{let o,{el:s,props:c}=t,{bm:l,m:u,parent:d,root:f,type:p}=e,m=Er(t);if(ra(e,!1),l&&P(l),!m&&(o=c&&c.onVnodeBeforeMount)&&za(o,d,t),ra(e,!0),s&&ve){let t=()=>{e.subTree=Oi(e),ve(s,e.subTree,e,i,null)};m&&p.__asyncHydrate?p.__asyncHydrate(s,e,t):t()}else{f.ce&&f.ce._hasShadowRoot()&&f.ce._injectChildStyle(p,e.parent?e.parent.type:void 0);let o=e.subTree=Oi(e);v(null,o,n,r,e,i,a),t.el=o.el}if(u&&$i(u,i),!m&&(o=c&&c.onVnodeMounted)){let e=t;$i(()=>za(o,d,e),i)}(t.shapeFlag&256||d&&Er(d.vnode)&&d.vnode.shapeFlag&256)&&e.a&&$i(e.a,i),e.isMounted=!0,t=n=r=null}};e.scope.on();let c=e.effect=new De(s);e.scope.off();let l=e.update=c.run.bind(c),u=e.job=c.runIfDirty.bind(c);u.i=e,u.id=e.uid,c.scheduler=()=>wn(u),ra(e,!0),l()},ne=(e,t,n)=>{t.component=e;let r=e.vnode.props;e.vnode=t,e.next=null,zi(e,t.props,r,n),Qi(e,t.children,n),He(),Dn(e),Ue()},ie=(e,t,n,r,i,a,o,s,c=!1)=>{let l=e&&e.children,u=e?e.shapeFlag:0,d=t.children,{patchFlag:f,shapeFlag:m}=t;if(f>0){if(f&128){oe(l,d,n,r,i,a,o,s,c);return}else if(f&256){ae(l,d,n,r,i,a,o,s,c);return}}m&8?(u&16&&fe(l,i,a),d!==l&&p(n,d)):u&16?m&16?oe(l,d,n,r,i,a,o,s,c):fe(l,i,a,!0):(u&8&&p(n,``),m&16&&O(d,n,r,i,a,o,s,c))},ae=(e,t,r,i,a,o,s,c,l)=>{e||=n,t||=n;let u=e.length,d=t.length,f=Math.min(u,d),p;for(p=0;pd?fe(e,a,o,!0,!1,f):O(t,r,i,a,o,s,c,l,f)},oe=(e,t,r,i,a,o,s,c,l)=>{let u=0,d=t.length,f=e.length-1,p=d-1;for(;u<=f&&u<=p;){let n=e[u],i=t[u]=l?La(t[u]):Ia(t[u]);if(Ea(n,i))v(n,i,r,null,a,o,s,c,l);else break;u++}for(;u<=f&&u<=p;){let n=e[f],i=t[p]=l?La(t[p]):Ia(t[p]);if(Ea(n,i))v(n,i,r,null,a,o,s,c,l);else break;f--,p--}if(u>f){if(u<=p){let e=p+1,n=ep)for(;u<=f;)ce(e[u],a,o,!0),u++;else{let m=u,h=u,g=new Map;for(u=h;u<=p;u++){let e=t[u]=l?La(t[u]):Ia(t[u]);e.key!=null&&g.set(e.key,u)}let _,y=0,b=p-h+1,x=!1,S=0,C=Array(b);for(u=0;u=b){ce(n,a,o,!0);continue}let i;if(n.key!=null)i=g.get(n.key);else for(_=h;_<=p;_++)if(C[_-h]===0&&Ea(n,t[_])){i=_;break}i===void 0?ce(n,a,o,!0):(C[i-h]=u+1,i>=S?S=i:x=!0,v(n,t[i],r,null,a,o,s,c,l),y++)}let w=x?oa(C):n;for(_=w.length-1,u=b-1;u>=0;u--){let e=h+u,n=t[e],f=t[e+1],p=e+1{let{el:a,type:c,transition:l,children:u,shapeFlag:d}=e;if(d&6){se(e.component.subTree,t,n,r);return}if(d&128){e.suspense.move(t,n,r);return}if(d&64){c.move(e,t,n,ge);return}if(c===fa){o(a,t,n);for(let e=0;el.enter(a),i));else{let{leave:r,delayLeave:i,afterLeave:c}=l,u=()=>{e.ctx.isUnmounted?s(a):o(a,t,n)},d=()=>{let e=a._isLeaving||!!a[or];a._isLeaving&&a[or](!0),l.persisted&&!e?u():r(a,()=>{u(),c&&c()})};i?i(a,u,d):d()}else o(a,t,n)},ce=(e,t,n,r=!1,i=!1)=>{let{type:a,props:o,ref:s,children:c,dynamicChildren:l,shapeFlag:u,patchFlag:d,dirs:f,cacheIndex:p,memo:m}=e;if(d===-2&&(i=!1),s!=null&&(He(),wr(s,null,n,e,!0),Ue()),p!=null&&(t.renderCache[p]=void 0),u&256){t.ctx.deactivate(e);return}let h=u&1&&f,g=!Er(e),_;if(g&&(_=o&&o.onVnodeBeforeUnmount)&&za(_,t,e),u&6)de(e.component,n,r);else{if(u&128){e.suspense.unmount(n,r);return}h&&In(e,null,t,`beforeUnmount`),u&64?e.type.remove(e,t,n,ge,r):l&&!l.hasOnce&&(a!==fa||d>0&&d&64)?fe(l,t,n,!1,!0):(a===fa&&d&384||!i&&u&16)&&fe(c,t,n),r&&le(e)}let v=m!=null&&p==null;(g&&(_=o&&o.onVnodeUnmounted)||h||v)&&$i(()=>{_&&za(_,t,e),h&&In(e,null,t,`unmounted`),v&&(e.el=null)},n)},le=e=>{let{type:t,el:n,anchor:r,transition:i}=e;if(t===fa){ue(n,r);return}if(t===ha){C(e);return}let a=()=>{s(n),i&&!i.persisted&&i.afterLeave&&i.afterLeave()};if(e.shapeFlag&1&&i&&!i.persisted){let{leave:t,delayLeave:r}=i,o=()=>t(n,a);r?r(e.el,a,o):o()}else a()},ue=(e,t)=>{let n;for(;e!==t;)n=h(e),s(e),e=n;s(t)},de=(e,t,n)=>{let{bum:r,scope:i,job:a,subTree:o,um:s,m:c,a:l}=e;ca(c),ca(l),r&&P(r),i.stop(),a&&(a.flags|=8,ce(o,e,t,n)),s&&$i(s,t),$i(()=>{e.isUnmounted=!0},t)},fe=(e,t,n,r=!1,i=!1,a=0)=>{for(let o=a;o{if(e.shapeFlag&6)return pe(e.component.subTree);if(e.shapeFlag&128)return e.suspense.next();let t=h(e.anchor||e.el),n=t&&t[qn];return n?h(n):t},me=!1,he=(e,t,n)=>{let r;e==null?t._vnode&&(ce(t._vnode,null,null,!0),r=t._vnode.component):v(t._vnode||null,e,t,null,null,null,n),t._vnode=e,me||=(me=!0,Dn(r),On(),!1)},ge={p:v,um:ce,m:se,r:le,mt:F,mc:O,pc:ie,pbc:A,n:pe,o:e},_e,ve;return i&&([_e,ve]=i(ge)),{render:he,hydrate:_e,createApp:xi(he,_e)}}function na({type:e,props:t},n){return n===`svg`&&e===`foreignObject`||n===`mathml`&&e===`annotation-xml`&&t&&t.encoding&&t.encoding.includes(`html`)?void 0:n}function ra({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function ia(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function aa(e,t,n=!1){let r=e.children,i=t.children;if(d(r)&&d(i))for(let e=0;e>1,e[n[s]]0&&(t[r]=n[a-1]),n[a]=r)}}for(a=n.length,o=n[a-1];a-- >0;)n[a]=o,o=t[o];return n}function sa(e){let t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:sa(t)}function ca(e){if(e)for(let t=0;te.__isSuspense;function da(e,t){t&&t.pendingBranch?d(e)?t.effects.push(...e):t.effects.push(e):En(e)}var fa=Symbol.for(`v-fgt`),pa=Symbol.for(`v-txt`),ma=Symbol.for(`v-cmt`),ha=Symbol.for(`v-stc`),ga=[],_a=null;function va(e=!1){ga.push(_a=e?null:[])}function ya(){ga.pop(),_a=ga[ga.length-1]||null}var ba=1;function xa(e,t=!1){ba+=e,e<0&&_a&&t&&(_a.hasOnce=!0)}function Sa(e){return e.dynamicChildren=ba>0?_a||n:null,ya(),ba>0&&_a&&_a.push(e),e}function Ca(e,t,n,r,i,a){return Sa(ka(e,t,n,r,i,a,!0))}function wa(e,t,n,r,i){return Sa(B(e,t,n,r,i,!0))}function Ta(e){return e?e.__v_isVNode===!0:!1}function Ea(e,t){return e.type===t.type&&e.key===t.key}var Da=({key:e})=>e??null,Oa=({ref:e,ref_key:t,ref_for:n})=>(typeof e==`number`&&(e=``+e),e==null?null:g(e)||qt(e)||h(e)?{i:jn,r:e,k:t,f:!!n}:e);function ka(e,t=null,n=null,r=0,i=null,a=e===fa?0:1,o=!1,s=!1){let c={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Da(t),ref:t&&Oa(t),scopeId:Mn,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:a,patchFlag:r,dynamicProps:i,dynamicChildren:null,appContext:null,ctx:jn};return s?(Ra(c,n),a&128&&e.normalize(c)):n&&(c.shapeFlag|=g(n)?8:16),ba>0&&!o&&_a&&(c.patchFlag>0||a&6)&&c.patchFlag!==32&&_a.push(c),c}var B=Aa;function Aa(e,t=null,n=null,r=0,i=null,a=!1){if((!e||e===qr)&&(e=ma),Ta(e)){let r=Ma(e,t,!0);return n&&Ra(r,n),ba>0&&!a&&_a&&(r.shapeFlag&6?_a[_a.indexOf(e)]=r:_a.push(r)),r.patchFlag=-2,r}if(so(e)&&(e=e.__vccOpts),t){t=ja(t);let{class:e,style:n}=t;e&&!g(e)&&(t.class=le(e)),v(n)&&(Ht(n)&&!d(n)&&(n=s({},n)),t.style=ie(n))}let o=g(e)?1:ua(e)?128:Jn(e)?64:v(e)?4:h(e)?2:0;return ka(e,t,n,r,i,o,a,!0)}function ja(e){return e?Ht(e)||Li(e)?s({},e):e:null}function Ma(e,t,n=!1,r=!1){let{props:i,ref:a,patchFlag:o,children:s,transition:c}=e,l=t?V(i||{},t):i,u={__v_isVNode:!0,__v_skip:!0,type:e.type,props:l,key:l&&Da(l),ref:t&&t.ref?n&&a?d(a)?a.concat(Oa(t)):[a,Oa(t)]:Oa(t):a,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:s,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==fa?o===-1?16:o|16:o,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:c,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Ma(e.ssContent),ssFallback:e.ssFallback&&Ma(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return c&&r&&yr(u,c.clone(u)),u}function Na(e=` `,t=0){return B(pa,null,e,t)}function Pa(e,t){let n=B(ha,null,e);return n.staticCount=t,n}function Fa(e=``,t=!1){return t?(va(),wa(ma,null,e)):B(ma,null,e)}function Ia(e){return e==null||typeof e==`boolean`?B(ma):d(e)?B(fa,null,e.slice()):Ta(e)?La(e):B(pa,null,String(e))}function La(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Ma(e)}function Ra(e,t){let n=0,{shapeFlag:r}=e;if(t==null)t=null;else if(d(t))n=16;else if(typeof t==`object`)if(r&65){let n=t.default;n&&(n._c&&(n._d=!1),Ra(e,n()),n._c&&(n._d=!0));return}else{n=32;let r=t._;!r&&!Li(t)?t._ctx=jn:r===3&&jn&&(jn.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else h(t)?(t={default:t,_ctx:jn},n=32):(t=String(t),r&64?(n=16,t=[Na(t)]):n=8);e.children=t,e.shapeFlag|=n}function V(...e){let t={};for(let n=0;nUa||jn,Ga,Ka;{let e=re(),t=(t,n)=>{let r;return(r=e[t])||(r=e[t]=[]),r.push(n),e=>{r.length>1?r.forEach(t=>t(e)):r[0](e)}};Ga=t(`__VUE_INSTANCE_SETTERS__`,e=>Ua=e),Ka=t(`__VUE_SSR_SETTERS__`,e=>Xa=e)}var qa=e=>{let t=Ua;return Ga(e),e.scope.on(),()=>{e.scope.off(),Ga(t)}},Ja=()=>{Ua&&Ua.scope.off(),Ga(null)};function Ya(e){return e.vnode.shapeFlag&4}var Xa=!1;function Za(e,t=!1,n=!1){t&&Ka(t);let{props:r,children:i}=e.vnode,a=Ya(e);Ri(e,r,a,t),Zi(e,i,n||t);let o=a?Qa(e,t):void 0;return t&&Ka(!1),o}function Qa(e,t){let n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,ni);let{setup:r}=n;if(r){He();let n=e.setupContext=r.length>1?io(e):null,i=qa(e),a=dn(r,e,0,[e.props,n]),o=y(a);if(Ue(),i(),(o||e.sp)&&!Er(e)&&xr(e),o){if(a.then(Ja,Ja),t)return a.then(n=>{$a(e,n,t)}).catch(t=>{pn(t,e,0)});e.asyncDep=a}else $a(e,a,t)}else no(e,t)}function $a(e,t,n){h(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:v(t)&&(e.setupState=$t(t)),no(e,n)}var eo,to;function no(e,t,n){let i=e.type;if(!e.render){if(!t&&eo&&!i.render){let t=i.template||li(e).template;if(t){let{isCustomElement:n,compilerOptions:r}=e.appContext.config,{delimiters:a,compilerOptions:o}=i;i.render=eo(t,s(s({isCustomElement:n,delimiters:a},r),o))}}e.render=i.render||r,to&&to(e)}{let t=qa(e);He();try{ai(e)}finally{Ue(),t()}}}var ro={get(e,t){return $e(e,`get`,``),e[t]}};function io(e){return{attrs:new Proxy(e.attrs,ro),slots:e.slots,emit:e.emit,expose:t=>{e.exposed=t||{}}}}function ao(e){return e.exposed?e.exposeProxy||=new Proxy($t(Wt(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in ei)return ei[n](e)},has(e,t){return t in e||t in ei}}):e.proxy}function oo(e,t=!0){return h(e)?e.displayName||e.name:e.name||t&&e.__name}function so(e){return h(e)&&`__vccOpts`in e}var H=(e,t)=>rn(e,t,Xa);function co(e,t,n){try{xa(-1);let r=arguments.length;return r===2?v(t)&&!d(t)?Ta(t)?B(e,null,[t]):B(e,t):B(e,null,t):(r>3?n=Array.prototype.slice.call(arguments,2):r===3&&Ta(n)&&(n=[n]),B(e,t,n))}finally{xa(1)}}var lo=`3.5.35`,uo=void 0,fo=typeof window<`u`&&window.trustedTypes;if(fo)try{uo=fo.createPolicy(`vue`,{createHTML:e=>e})}catch{}var po=uo?e=>uo.createHTML(e):e=>e,mo=`http://www.w3.org/2000/svg`,ho=`http://www.w3.org/1998/Math/MathML`,go=typeof document<`u`?document:null,_o=go&&go.createElement(`template`),vo={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{let t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,r)=>{let i=t===`svg`?go.createElementNS(mo,e):t===`mathml`?go.createElementNS(ho,e):n?go.createElement(e,{is:n}):go.createElement(e);return e===`select`&&r&&r.multiple!=null&&i.setAttribute(`multiple`,r.multiple),i},createText:e=>go.createTextNode(e),createComment:e=>go.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>go.querySelector(e),setScopeId(e,t){e.setAttribute(t,``)},insertStaticContent(e,t,n,r,i,a){let o=n?n.previousSibling:t.lastChild;if(i&&(i===a||i.nextSibling))for(;t.insertBefore(i.cloneNode(!0),n),!(i===a||!(i=i.nextSibling)););else{_o.innerHTML=po(r===`svg`?`${e}`:r===`mathml`?`${e}`:e);let i=_o.content;if(r===`svg`||r===`mathml`){let e=i.firstChild;for(;e.firstChild;)i.appendChild(e.firstChild);i.removeChild(e)}t.insertBefore(i,n)}return[o?o.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},yo=`transition`,bo=`animation`,xo=Symbol(`_vtc`),So={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},Co=s({},ur,So),wo=(e=>(e.displayName=`Transition`,e.props=Co,e))((e,{slots:t})=>co(mr,Do(e),t)),To=(e,t=[])=>{d(e)?e.forEach(e=>e(...t)):e&&e(...t)},Eo=e=>e?d(e)?e.some(e=>e.length>1):e.length>1:!1;function Do(e){let t={};for(let n in e)n in So||(t[n]=e[n]);if(e.css===!1)return t;let{name:n=`v`,type:r,duration:i,enterFromClass:a=`${n}-enter-from`,enterActiveClass:o=`${n}-enter-active`,enterToClass:c=`${n}-enter-to`,appearFromClass:l=a,appearActiveClass:u=o,appearToClass:d=c,leaveFromClass:f=`${n}-leave-from`,leaveActiveClass:p=`${n}-leave-active`,leaveToClass:m=`${n}-leave-to`}=e,h=Oo(i),g=h&&h[0],_=h&&h[1],{onBeforeEnter:v,onEnter:y,onEnterCancelled:b,onLeave:x,onLeaveCancelled:S,onBeforeAppear:C=v,onAppear:w=y,onAppearCancelled:T=b}=t,E=(e,t,n,r)=>{e._enterCancelled=r,jo(e,t?d:c),jo(e,t?u:o),n&&n()},D=(e,t)=>{e._isLeaving=!1,jo(e,f),jo(e,m),jo(e,p),t&&t()},O=e=>(t,n)=>{let i=e?w:y,o=()=>E(t,e,n);To(i,[t,o]),Mo(()=>{jo(t,e?l:a),Ao(t,e?d:c),Eo(i)||Po(t,r,g,o)})};return s(t,{onBeforeEnter(e){To(v,[e]),Ao(e,a),Ao(e,o)},onBeforeAppear(e){To(C,[e]),Ao(e,l),Ao(e,u)},onEnter:O(!1),onAppear:O(!0),onLeave(e,t){e._isLeaving=!0;let n=()=>D(e,t);Ao(e,f),e._enterCancelled?(Ao(e,p),Ro(e)):(Ro(e),Ao(e,p)),Mo(()=>{e._isLeaving&&(jo(e,f),Ao(e,m),Eo(x)||Po(e,r,_,n))}),To(x,[e,n])},onEnterCancelled(e){E(e,!1,void 0,!0),To(b,[e])},onAppearCancelled(e){E(e,!0,void 0,!0),To(T,[e])},onLeaveCancelled(e){D(e),To(S,[e])}})}function Oo(e){if(e==null)return null;if(v(e))return[ko(e.enter),ko(e.leave)];{let t=ko(e);return[t,t]}}function ko(e){return te(e)}function Ao(e,t){t.split(/\s+/).forEach(t=>t&&e.classList.add(t)),(e[xo]||(e[xo]=new Set)).add(t)}function jo(e,t){t.split(/\s+/).forEach(t=>t&&e.classList.remove(t));let n=e[xo];n&&(n.delete(t),n.size||(e[xo]=void 0))}function Mo(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}var No=0;function Po(e,t,n,r){let i=e._endId=++No,a=()=>{i===e._endId&&r()};if(n!=null)return setTimeout(a,n);let{type:o,timeout:s,propCount:c}=Fo(e,t);if(!o)return r();let l=o+`end`,u=0,d=()=>{e.removeEventListener(l,f),a()},f=t=>{t.target===e&&++u>=c&&d()};setTimeout(()=>{u(n[e]||``).split(`, `),i=r(`${yo}Delay`),a=r(`${yo}Duration`),o=Io(i,a),s=r(`${bo}Delay`),c=r(`${bo}Duration`),l=Io(s,c),u=null,d=0,f=0;t===yo?o>0&&(u=yo,d=o,f=a.length):t===bo?l>0&&(u=bo,d=l,f=c.length):(d=Math.max(o,l),u=d>0?o>l?yo:bo:null,f=u?u===yo?a.length:c.length:0);let p=u===yo&&/\b(?:transform|all)(?:,|$)/.test(r(`${yo}Property`).toString());return{type:u,timeout:d,propCount:f,hasTransform:p}}function Io(e,t){for(;e.lengthLo(t)+Lo(e[n])))}function Lo(e){return e===`auto`?0:Number(e.slice(0,-1).replace(`,`,`.`))*1e3}function Ro(e){return(e?e.ownerDocument:document).body.offsetHeight}function zo(e,t,n){let r=e[xo];r&&(t=(t?[t,...r]:[...r]).join(` `)),t==null?e.removeAttribute(`class`):n?e.setAttribute(`class`,t):e.className=t}var Bo=Symbol(`_vod`),Vo=Symbol(`_vsh`),Ho={name:`show`,beforeMount(e,{value:t},{transition:n}){e[Bo]=e.style.display===`none`?``:e.style.display,n&&t?n.beforeEnter(e):Uo(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:r}){!t!=!n&&(r?t?(r.beforeEnter(e),Uo(e,!0),r.enter(e)):r.leave(e,()=>{Uo(e,!1)}):Uo(e,t))},beforeUnmount(e,{value:t}){Uo(e,t)}};function Uo(e,t){e.style.display=t?e[Bo]:`none`,e[Vo]=!t}var Wo=Symbol(``),Go=/(?:^|;)\s*display\s*:/;function Ko(e,t,n){let r=e.style,i=g(n),a=!1;if(n&&!i){if(t)if(g(t))for(let e of t.split(`;`)){let t=e.slice(0,e.indexOf(`:`)).trim();n[t]??Jo(r,t,``)}else for(let e in t)n[e]??Jo(r,e,``);for(let i in n){i===`display`&&(a=!0);let o=n[i];o==null?Jo(r,i,``):Qo(e,i,!g(t)&&t?t[i]:void 0,o)||Jo(r,i,o)}}else if(i){if(t!==n){let e=r[Wo];e&&(n+=`;`+e),r.cssText=n,a=Go.test(n)}}else t&&e.removeAttribute(`style`);Bo in e&&(e[Bo]=a?r.display:``,e[Vo]&&(r.display=`none`))}var qo=/\s*!important$/;function Jo(e,t,n){if(d(n))n.forEach(n=>Jo(e,t,n));else if(n??=``,t.startsWith(`--`))e.setProperty(t,n);else{let r=Zo(e,t);qo.test(n)?e.setProperty(A(r),n.replace(qo,``),`important`):e[r]=n}}var Yo=[`Webkit`,`Moz`,`ms`],Xo={};function Zo(e,t){let n=Xo[t];if(n)return n;let r=O(t);if(r!==`filter`&&r in e)return Xo[t]=r;r=j(r);for(let n=0;ncs||=(ls.then(()=>cs=0),Date.now());function ds(e,t){let n=e=>{if(!e._vts)e._vts=Date.now();else if(e._vts<=n.attached)return;let r=n.value;if(d(r)){let n=e.stopImmediatePropagation;e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0};let i=r.slice(),a=[e];for(let n=0;ne.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,ps=(e,t,n,r,i,s)=>{let c=i===`svg`;t===`class`?zo(e,r,c):t===`style`?Ko(e,n,r):a(t)?o(t)||as(e,t,n,r,s):(t[0]===`.`?(t=t.slice(1),!0):t[0]===`^`?(t=t.slice(1),!1):ms(e,t,r,c))?(ts(e,t,r),!e.tagName.includes(`-`)&&(t===`value`||t===`checked`||t===`selected`)&&es(e,t,r,c,s,t!==`value`)):e._isVueCE&&(hs(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!g(r)))?ts(e,O(t),r,s,t):(t===`true-value`?e._trueValue=r:t===`false-value`&&(e._falseValue=r),es(e,t,r,c))};function ms(e,t,n,r){if(r)return!!(t===`innerHTML`||t===`textContent`||t in e&&fs(t)&&h(n));if(t===`spellcheck`||t===`draggable`||t===`translate`||t===`autocorrect`||t===`sandbox`&&e.tagName===`IFRAME`||t===`form`||t===`list`&&e.tagName===`INPUT`||t===`type`&&e.tagName===`TEXTAREA`)return!1;if(t===`width`||t===`height`){let t=e.tagName;if(t===`IMG`||t===`VIDEO`||t===`CANVAS`||t===`SOURCE`)return!1}return fs(t)&&g(n)?!1:t in e}function hs(e,t){let n=e._def.props;if(!n)return!1;let r=O(t);return Array.isArray(n)?n.some(e=>O(e)===r):Object.keys(n).some(e=>O(e)===r)}var gs=new WeakMap,_s=new WeakMap,vs=Symbol(`_moveCb`),ys=Symbol(`_enterCb`),bs=(e=>(delete e.props.mode,e))({name:`TransitionGroup`,props:s({},Co,{tag:String,moveClass:String}),setup(e,{slots:t}){let n=Wa(),r=cr(),i,a;return Lr(()=>{if(!i.length)return;let t=e.moveClass||`${e.name||`v`}-move`;if(!Ts(i[0].el,n.vnode.el,t)){i=[];return}i.forEach(xs),i.forEach(Ss);let r=i.filter(Cs);Ro(n.vnode.el),r.forEach(e=>{let n=e.el,r=n.style;Ao(n,t),r.transform=r.webkitTransform=r.transitionDuration=``;let i=n[vs]=e=>{e&&e.target!==n||(!e||e.propertyName.endsWith(`transform`))&&(n.removeEventListener(`transitionend`,i),n[vs]=null,jo(n,t))};n.addEventListener(`transitionend`,i)}),i=[]}),()=>{let o=Ut(e),s=Do(o),c=o.tag||fa;if(i=[],a)for(let e=0;e{e.split(/\s+/).forEach(e=>e&&r.classList.remove(e))}),n.split(/\s+/).forEach(e=>e&&r.classList.add(e)),r.style.display=`none`;let a=t.nodeType===1?t:t.parentNode;a.appendChild(r);let{hasTransform:o}=Fo(r);return a.removeChild(r),o}var Es=e=>{let t=e.props[`onUpdate:modelValue`]||!1;return d(t)?e=>P(t,e):t},Ds=Symbol(`_assign`),Os={deep:!0,created(e,t,n){e[Ds]=Es(n),ns(e,`change`,()=>{let t=e._modelValue,n=As(e),r=e.checked,i=e[Ds];if(d(t)){let e=he(t,n),a=e!==-1;if(r&&!a)i(t.concat(n));else if(!r&&a){let n=[...t];n.splice(e,1),i(n)}}else if(p(t)){let e=new Set(t);r?e.add(n):e.delete(n),i(e)}else i(js(e,r))})},mounted:ks,beforeUpdate(e,t,n){e[Ds]=Es(n),ks(e,t,n)}};function ks(e,{value:t,oldValue:n},r){e._modelValue=t;let i;if(d(t))i=he(t,r.props.value)>-1;else if(p(t))i=t.has(r.props.value);else{if(t===n)return;i=me(t,js(e,!0))}e.checked!==i&&(e.checked=i)}function As(e){return`_value`in e?e._value:e.value}function js(e,t){let n=t?`_trueValue`:`_falseValue`;return n in e?e[n]:t}var Ms=[`ctrl`,`shift`,`alt`,`meta`],Ns={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>`button`in e&&e.button!==0,middle:e=>`button`in e&&e.button!==1,right:e=>`button`in e&&e.button!==2,exact:(e,t)=>Ms.some(n=>e[`${n}Key`]&&!t.includes(n))},Ps=(e,t)=>{if(!e)return e;let n=e._withMods||={},r=t.join(`.`);return n[r]||(n[r]=((n,...r)=>{for(let e=0;e{Ls().render(...e)}),zs=((...e)=>{let t=Ls().createApp(...e),{mount:n}=t;return t.mount=e=>{let r=Vs(e);if(!r)return;let i=t._component;!h(i)&&!i.render&&!i.template&&(i.template=r.innerHTML),r.nodeType===1&&(r.textContent=``);let a=n(r,!1,Bs(r));return r instanceof Element&&(r.removeAttribute(`v-cloak`),r.setAttribute(`data-v-app`,``)),a},t});function Bs(e){if(e instanceof SVGElement)return`svg`;if(typeof MathMLElement==`function`&&e instanceof MathMLElement)return`mathml`}function Vs(e){return g(e)?document.querySelector(e):e}var Hs=typeof window<`u`,Us,Ws=e=>Us=e,Gs=Symbol();function Ks(e){return e&&typeof e==`object`&&Object.prototype.toString.call(e)===`[object Object]`&&typeof e.toJSON!=`function`}var qs;(function(e){e.direct=`direct`,e.patchObject=`patch object`,e.patchFunction=`patch function`})(qs||={});var Js=typeof window==`object`&&window.window===window?window:typeof self==`object`&&self.self===self?self:typeof global==`object`&&global.global===global?global:typeof globalThis==`object`?globalThis:{HTMLElement:null};function Ys(e,{autoBom:t=!1}={}){return t&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob([``,e],{type:e.type}):e}function Xs(e,t,n){let r=new XMLHttpRequest;r.open(`GET`,e),r.responseType=`blob`,r.onload=function(){tc(r.response,t,n)},r.onerror=function(){console.error(`could not download file`)},r.send()}function Zs(e){let t=new XMLHttpRequest;t.open(`HEAD`,e,!1);try{t.send()}catch{}return t.status>=200&&t.status<=299}function Qs(e){try{e.dispatchEvent(new MouseEvent(`click`))}catch{let t=new MouseEvent(`click`,{bubbles:!0,cancelable:!0,view:window,detail:0,screenX:80,screenY:20,clientX:80,clientY:20,ctrlKey:!1,altKey:!1,shiftKey:!1,metaKey:!1,button:0,relatedTarget:null});e.dispatchEvent(t)}}var $s=typeof navigator==`object`?navigator:{userAgent:``},ec=/Macintosh/.test($s.userAgent)&&/AppleWebKit/.test($s.userAgent)&&!/Safari/.test($s.userAgent),tc=Hs?typeof HTMLAnchorElement<`u`&&`download`in HTMLAnchorElement.prototype&&!ec?nc:`msSaveOrOpenBlob`in $s?rc:ic:()=>{};function nc(e,t=`download`,n){let r=document.createElement(`a`);r.download=t,r.rel=`noopener`,typeof e==`string`?(r.href=e,r.origin===location.origin?Qs(r):Zs(r.href)?Xs(e,t,n):(r.target=`_blank`,Qs(r))):(r.href=URL.createObjectURL(e),setTimeout(function(){URL.revokeObjectURL(r.href)},4e4),setTimeout(function(){Qs(r)},0))}function rc(e,t=`download`,n){if(typeof e==`string`)if(Zs(e))Xs(e,t,n);else{let t=document.createElement(`a`);t.href=e,t.target=`_blank`,setTimeout(function(){Qs(t)})}else navigator.msSaveOrOpenBlob(Ys(e,n),t)}function ic(e,t,n,r){if(r||=open(``,`_blank`),r&&(r.document.title=r.document.body.innerText=`downloading...`),typeof e==`string`)return Xs(e,t,n);let i=e.type===`application/octet-stream`,a=/constructor/i.test(String(Js.HTMLElement))||`safari`in Js,o=/CriOS\/[\d]+/.test(navigator.userAgent);if((o||i&&a||ec)&&typeof FileReader<`u`){let t=new FileReader;t.onloadend=function(){let e=t.result;if(typeof e!=`string`)throw r=null,Error(`Wrong reader.result type`);e=o?e:e.replace(/^data:[^;]*;/,`data:attachment/file;`),r?r.location.href=e:location.assign(e),r=null},t.readAsDataURL(e)}else{let t=URL.createObjectURL(e);r?r.location.assign(t):location.href=t,r=null,setTimeout(function(){URL.revokeObjectURL(t)},4e4)}}var{assign:ac}=Object;function oc(){let e=Se(!0),t=e.run(()=>I({})),n=[],r=[],i=Wt({install(e){Ws(i),i._a=e,e.provide(Gs,i),e.config.globalProperties.$pinia=i,r.forEach(e=>n.push(e)),r=[]},use(e){return this._a?n.push(e):r.push(e),this},_p:n,_a:null,_e:e,_s:new Map,state:t});return i}var sc=()=>{};function cc(e,t,n,r=sc){e.add(t);let i=()=>{e.delete(t)&&r()};return!n&&Ce()&&we(i),i}function lc(e,...t){e.forEach(e=>{e(...t)})}var uc=e=>e(),dc=Symbol(),fc=Symbol();function pc(e,t){e instanceof Map&&t instanceof Map?t.forEach((t,n)=>e.set(n,t)):e instanceof Set&&t instanceof Set&&t.forEach(e.add,e);for(let n in t){if(!t.hasOwnProperty(n))continue;let r=t[n],i=e[n];Ks(i)&&Ks(r)&&e.hasOwnProperty(n)&&!qt(r)&&!zt(r)?e[n]=pc(i,r):e[n]=r}return e}var mc=Symbol();function hc(e){return!Ks(e)||!Object.prototype.hasOwnProperty.call(e,mc)}var{assign:gc}=Object;function _c(e){return!!(qt(e)&&e.effect)}function vc(e,t,n,r){let{state:i,actions:a,getters:o}=t,s=n.state.value[e],c;function l(){return s||(n.state.value[e]=i?i():{}),gc(L(n.state.value[e]),a,Object.keys(o||{}).reduce((t,r)=>(t[r]=Wt(H(()=>{Ws(n);let t=n._s.get(e);return o[r].call(t,t)})),t),{}))}return c=yc(e,l,t,n,r,!0),c}function yc(e,t,n={},r,i,a){let o,s=gc({actions:{}},n),c={deep:!0},l,u,d=new Set,f=new Set,p=r.state.value[e];!a&&!p&&(r.state.value[e]={});let m;function h(t){let n;l=u=!1,typeof t==`function`?(t(r.state.value[e]),n={type:qs.patchFunction,storeId:e,events:void 0}):(pc(r.state.value[e],t),n={type:qs.patchObject,payload:t,storeId:e,events:void 0});let i=m=Symbol();Sn().then(()=>{m===i&&(l=!0)}),u=!0,lc(d,n,r.state.value[e])}let g=a?function(){let{state:e}=n,t=e?e():{};this.$patch(e=>{gc(e,t)})}:sc;function _(){o.stop(),d.clear(),f.clear(),r._s.delete(e)}let v=(t,n=``)=>{if(dc in t)return t[fc]=n,t;let i=function(){Ws(r);let n=Array.from(arguments),a=new Set,o=new Set;function s(e){a.add(e)}function c(e){o.add(e)}lc(f,{args:n,name:i[fc],store:y,after:s,onError:c});let l;try{l=t.apply(this&&this.$id===e?this:y,n)}catch(e){throw lc(o,e),e}return l instanceof Promise?l.then(e=>(lc(a,e),e)).catch(e=>(lc(o,e),Promise.reject(e))):(lc(a,l),l)};return i[dc]=!0,i[fc]=n,i},y=Ft({_p:r,$id:e,$onAction:cc.bind(null,f),$patch:h,$reset:g,$subscribe(t,n={}){let i=cc(d,t,n.detached,()=>a()),a=o.run(()=>R(()=>r.state.value[e],r=>{(n.flush===`sync`?u:l)&&t({storeId:e,type:qs.direct,events:void 0},r)},gc({},c,n)));return i},$dispose:_});r._s.set(e,y);let b=(r._a&&r._a.runWithContext||uc)(()=>r._e.run(()=>(o=Se()).run(()=>t({action:v}))));for(let t in b){let n=b[t];qt(n)&&!_c(n)||zt(n)?a||(p&&hc(n)&&(qt(n)?n.value=p[t]:pc(n,p[t])),r.state.value[e][t]=n):typeof n==`function`&&(b[t]=v(n,t),s.actions[t]=n)}return gc(y,b),gc(Ut(y),b),Object.defineProperty(y,"$state",{get:()=>r.state.value[e],set:e=>{h(t=>{gc(t,e)})}}),r._p.forEach(e=>{gc(y,o.run(()=>e({store:y,app:r._a,pinia:r,options:s})))}),p&&a&&n.hydrate&&n.hydrate(y.$state,p),l=!0,u=!0,y}function bc(e,t,n){let r,i=typeof t==`function`;r=i?n:t;function a(n,a){let o=zn();return n||=o?Rn(Gs,null):null,n&&Ws(n),n=Us,n._s.has(e)||(i?yc(e,t,r,n):vc(e,r,n)),n._s.get(e)}return a.$id=e,a}var xc=typeof document<`u`;function Sc(e){return typeof e==`object`||`displayName`in e||`props`in e||`__vccOpts`in e}function Cc(e){return e.__esModule||e[Symbol.toStringTag]===`Module`||e.default&&Sc(e.default)}var wc=Object.assign;function Tc(e,t){let n={};for(let r in t){let i=t[r];n[r]=Dc(i)?i.map(e):e(i)}return n}var Ec=()=>{},Dc=Array.isArray;function Oc(e,t){let n={};for(let r in e)n[r]=r in t?t[r]:e[r];return n}var kc=/#/g,Ac=/&/g,jc=/\//g,Mc=/=/g,Nc=/\?/g,Pc=/\+/g,Fc=/%5B/g,Ic=/%5D/g,Lc=/%5E/g,Rc=/%60/g,zc=/%7B/g,Bc=/%7C/g,Vc=/%7D/g,Hc=/%20/g;function Uc(e){return e==null?``:encodeURI(``+e).replace(Bc,`|`).replace(Fc,`[`).replace(Ic,`]`)}function Wc(e){return Uc(e).replace(zc,`{`).replace(Vc,`}`).replace(Lc,`^`)}function Gc(e){return Uc(e).replace(Pc,`%2B`).replace(Hc,`+`).replace(kc,`%23`).replace(Ac,`%26`).replace(Rc,"`").replace(zc,`{`).replace(Vc,`}`).replace(Lc,`^`)}function Kc(e){return Gc(e).replace(Mc,`%3D`)}function qc(e){return Uc(e).replace(kc,`%23`).replace(Nc,`%3F`)}function Jc(e){return qc(e).replace(jc,`%2F`)}function Yc(e){if(e==null)return null;try{return decodeURIComponent(``+e)}catch{}return``+e}var Xc=/\/$/,Zc=e=>e.replace(Xc,``);function Qc(e,t,n=`/`){let r,i={},a=``,o=``,s=t.indexOf(`#`),c=t.indexOf(`?`);return c=s>=0&&c>s?-1:c,c>=0&&(r=t.slice(0,c),a=t.slice(c,s>0?s:t.length),i=e(a.slice(1))),s>=0&&(r||=t.slice(0,s),o=t.slice(s,t.length)),r=ol(r??t,n),{fullPath:r+a+o,path:r,query:i,hash:Yc(o)}}function $c(e,t){let n=t.query?e(t.query):``;return t.path+(n&&`?`)+n+(t.hash||``)}function el(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||`/`}function tl(e,t,n){let r=t.matched.length-1,i=n.matched.length-1;return r>-1&&r===i&&nl(t.matched[r],n.matched[i])&&rl(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function nl(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function rl(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var n in e)if(!il(e[n],t[n]))return!1;return!0}function il(e,t){return Dc(e)?al(e,t):Dc(t)?al(t,e):e?.valueOf()===t?.valueOf()}function al(e,t){return Dc(t)?e.length===t.length&&e.every((e,n)=>e===t[n]):e.length===1&&e[0]===t}function ol(e,t){if(e.startsWith(`/`))return e;if(!e)return t;let n=t.split(`/`),r=e.split(`/`),i=r[r.length-1];(i===`..`||i===`.`)&&r.push(``);let a=n.length-1,o,s;for(o=0;o1&&a--;else break;return n.slice(0,a).join(`/`)+`/`+r.slice(o).join(`/`)}var sl={path:`/`,name:void 0,params:{},query:{},hash:``,fullPath:`/`,matched:[],meta:{},redirectedFrom:void 0},cl=function(e){return e.pop=`pop`,e.push=`push`,e}({}),ll=function(e){return e.back=`back`,e.forward=`forward`,e.unknown=``,e}({});function ul(e){if(!e)if(xc){let t=document.querySelector(`base`);e=t&&t.getAttribute(`href`)||`/`,e=e.replace(/^\w+:\/\/[^\/]+/,``)}else e=`/`;return e[0]!==`/`&&e[0]!==`#`&&(e=`/`+e),Zc(e)}var dl=/^[^#]+#/;function fl(e,t){return e.replace(dl,`#`)+t}function pl(e,t){let n=document.documentElement.getBoundingClientRect(),r=e.getBoundingClientRect();return{behavior:t.behavior,left:r.left-n.left-(t.left||0),top:r.top-n.top-(t.top||0)}}var ml=()=>({left:window.scrollX,top:window.scrollY});function hl(e){let t;if(`el`in e){let n=e.el,r=typeof n==`string`&&n.startsWith(`#`),i=typeof n==`string`?r?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!i)return;t=pl(i,e)}else t=e;`scrollBehavior`in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left==null?window.scrollX:t.left,t.top==null?window.scrollY:t.top)}function gl(e,t){return(history.state?history.state.position-t:-1)+e}var _l=new Map;function vl(e,t){_l.set(e,t)}function yl(e){let t=_l.get(e);return _l.delete(e),t}function bl(e){return typeof e==`string`||e&&typeof e==`object`}function xl(e){return typeof e==`string`||typeof e==`symbol`}var Sl=function(e){return e[e.MATCHER_NOT_FOUND=1]=`MATCHER_NOT_FOUND`,e[e.NAVIGATION_GUARD_REDIRECT=2]=`NAVIGATION_GUARD_REDIRECT`,e[e.NAVIGATION_ABORTED=4]=`NAVIGATION_ABORTED`,e[e.NAVIGATION_CANCELLED=8]=`NAVIGATION_CANCELLED`,e[e.NAVIGATION_DUPLICATED=16]=`NAVIGATION_DUPLICATED`,e}({}),Cl=Symbol(``);Sl.MATCHER_NOT_FOUND,Sl.NAVIGATION_GUARD_REDIRECT,Sl.NAVIGATION_ABORTED,Sl.NAVIGATION_CANCELLED,Sl.NAVIGATION_DUPLICATED;function wl(e,t){return wc(Error(),{type:e,[Cl]:!0},t)}function Tl(e,t){return e instanceof Error&&Cl in e&&(t==null||!!(e.type&t))}function El(e){let t={};if(e===``||e===`?`)return t;let n=(e[0]===`?`?e.slice(1):e).split(`&`);for(let e=0;ee&&Gc(e)):[r&&Gc(r)]).forEach(e=>{e!==void 0&&(t+=(t.length?`&`:``)+n,e!=null&&(t+=`=`+e))})}return t}function Ol(e){let t={};for(let n in e){let r=e[n];r!==void 0&&(t[n]=Dc(r)?r.map(e=>e==null?null:``+e):r==null?r:``+r)}return t}var kl=Symbol(``),Al=Symbol(``),jl=Symbol(``),Ml=Symbol(``),Nl=Symbol(``);function Pl(){let e=[];function t(t){return e.push(t),()=>{let n=e.indexOf(t);n>-1&&e.splice(n,1)}}function n(){e=[]}return{add:t,list:()=>e.slice(),reset:n}}function Fl(e,t,n,r,i,a=e=>e()){let o=r&&(r.enterCallbacks[i]=r.enterCallbacks[i]||[]);return()=>new Promise((s,c)=>{let l=e=>{e===!1?c(wl(Sl.NAVIGATION_ABORTED,{from:n,to:t})):e instanceof Error?c(e):bl(e)?c(wl(Sl.NAVIGATION_GUARD_REDIRECT,{from:t,to:e})):(o&&r.enterCallbacks[i]===o&&typeof e==`function`&&o.push(e),s())},u=a(()=>e.call(r&&r.instances[i],t,n,l)),d=Promise.resolve(u);e.length<3&&(d=d.then(l)),d.catch(e=>c(e))})}function Il(e,t,n,r,i=e=>e()){let a=[];for(let o of e)for(let e in o.components){let s=o.components[e];if(!(t!==`beforeRouteEnter`&&!o.instances[e]))if(Sc(s)){let c=(s.__vccOpts||s)[t];c&&a.push(Fl(c,n,r,o,e,i))}else{let c=s();a.push(()=>c.then(a=>{if(!a)throw Error(`Couldn't resolve component "${e}" at "${o.path}"`);let s=Cc(a)?a.default:a;o.mods[e]=a,o.components[e]=s;let c=(s.__vccOpts||s)[t];return c&&Fl(c,n,r,o,e,i)()}))}}return a}function Ll(e,t){let n=[],r=[],i=[],a=Math.max(t.matched.length,e.matched.length);for(let o=0;onl(e,a))?r.push(a):n.push(a));let s=e.matched[o];s&&(t.matched.find(e=>nl(e,s))||i.push(s))}return[n,r,i]}var Rl=()=>location.protocol+`//`+location.host;function zl(e,t){let{pathname:n,search:r,hash:i}=t,a=e.indexOf(`#`);if(a>-1){let t=i.includes(e.slice(a))?e.slice(a).length:1,n=i.slice(t);return n[0]!==`/`&&(n=`/`+n),el(n,``)}return el(n,e)+r+i}function Bl(e,t,n,r){let i=[],a=[],o=null,s=({state:a})=>{let s=zl(e,location),c=n.value,l=t.value,u=0;if(a){if(n.value=s,t.value=a,o&&o===c){o=null;return}u=l?a.position-l.position:0}else r(s);i.forEach(e=>{e(n.value,c,{delta:u,type:cl.pop,direction:u?u>0?ll.forward:ll.back:ll.unknown})})};function c(){o=n.value}function l(e){i.push(e);let t=()=>{let t=i.indexOf(e);t>-1&&i.splice(t,1)};return a.push(t),t}function u(){if(document.visibilityState===`hidden`){let{history:e}=window;if(!e.state)return;e.replaceState(wc({},e.state,{scroll:ml()}),``)}}function d(){for(let e of a)e();a=[],window.removeEventListener(`popstate`,s),window.removeEventListener(`pagehide`,u),document.removeEventListener(`visibilitychange`,u)}return window.addEventListener(`popstate`,s),window.addEventListener(`pagehide`,u),document.addEventListener(`visibilitychange`,u),{pauseListeners:c,listen:l,destroy:d}}function Vl(e,t,n,r=!1,i=!1){return{back:e,current:t,forward:n,replaced:r,position:window.history.length,scroll:i?ml():null}}function Hl(e){let{history:t,location:n}=window,r={value:zl(e,n)},i={value:t.state};i.value||a(r.value,{back:null,current:r.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function a(r,a,o){let s=e.indexOf(`#`),c=s>-1?(n.host&&document.querySelector(`base`)?e:e.slice(s))+r:Rl()+e+r;try{t[o?`replaceState`:`pushState`](a,``,c),i.value=a}catch(e){console.error(e),n[o?`replace`:`assign`](c)}}function o(e,n){a(e,wc({},t.state,Vl(i.value.back,e,i.value.forward,!0),n,{position:i.value.position}),!0),r.value=e}function s(e,n){let o=wc({},i.value,t.state,{forward:e,scroll:ml()});a(o.current,o,!0),a(e,wc({},Vl(r.value,e,null),{position:o.position+1},n),!1),r.value=e}return{location:r,state:i,push:s,replace:o}}function Ul(e){e=ul(e);let t=Hl(e),n=Bl(e,t.state,t.location,t.replace);function r(e,t=!0){t||n.pauseListeners(),history.go(e)}let i=wc({location:``,base:e,go:r,createHref:fl.bind(null,e)},t,n);return Object.defineProperty(i,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(i,"state",{enumerable:!0,get:()=>t.state.value}),i}var Wl=function(e){return e[e.Static=0]=`Static`,e[e.Param=1]=`Param`,e[e.Group=2]=`Group`,e}({}),Gl=function(e){return e[e.Static=0]=`Static`,e[e.Param=1]=`Param`,e[e.ParamRegExp=2]=`ParamRegExp`,e[e.ParamRegExpEnd=3]=`ParamRegExpEnd`,e[e.EscapeNext=4]=`EscapeNext`,e}(Gl||{}),Kl={type:Wl.Static,value:``},ql=/[a-zA-Z0-9_]/;function Jl(e){if(!e)return[[]];if(e===`/`)return[[Kl]];if(!e.startsWith(`/`))throw Error(`Invalid path "${e}"`);function t(e){throw Error(`ERR (${n})/"${l}": ${e}`)}let n=Gl.Static,r=n,i=[],a;function o(){a&&i.push(a),a=[]}let s=0,c,l=``,u=``;function d(){l&&=(n===Gl.Static?a.push({type:Wl.Static,value:l}):n===Gl.Param||n===Gl.ParamRegExp||n===Gl.ParamRegExpEnd?(a.length>1&&(c===`*`||c===`+`)&&t(`A repeatable param (${l}) must be alone in its segment. eg: '/:ids+.`),a.push({type:Wl.Param,value:l,regexp:u,repeatable:c===`*`||c===`+`,optional:c===`*`||c===`?`})):t(`Invalid state to consume buffer`),``)}function f(){l+=c}for(;st.length?t.length===1&&t[0]===Zl.Static+Zl.Segment?1:-1:0}function tu(e,t){let n=0,r=e.score,i=t.score;for(;n0&&t[t.length-1]<0}var ru={strict:!1,end:!0,sensitive:!1};function iu(e,t,n){let r=wc($l(Jl(e.path),n),{record:e,parent:t,children:[],alias:[]});return t&&!r.record.aliasOf==!t.record.aliasOf&&t.children.push(r),r}function au(e,t){let n=[],r=new Map;t=Oc(ru,t);function i(e){return r.get(e)}function a(e,n,r){let i=!r,s=su(e);s.aliasOf=r&&r.record;let l=Oc(t,e),u=[s];if(`alias`in e){let t=typeof e.alias==`string`?[e.alias]:e.alias;for(let e of t)u.push(su(wc({},s,{components:r?r.record.components:s.components,path:e,aliasOf:r?r.record:s})))}let d,f;for(let t of u){let{path:u}=t;if(n&&u[0]!==`/`){let e=n.record.path,r=e[e.length-1]===`/`?``:`/`;t.path=n.record.path+(u&&r+u)}if(d=iu(t,n,l),r?r.alias.push(d):(f||=d,f!==d&&f.alias.push(d),i&&e.name&&!lu(d)&&o(e.name)),pu(d)&&c(d),s.children){let e=s.children;for(let t=0;t{o(f)}:Ec}function o(e){if(xl(e)){let t=r.get(e);t&&(r.delete(e),n.splice(n.indexOf(t),1),t.children.forEach(o),t.alias.forEach(o))}else{let t=n.indexOf(e);t>-1&&(n.splice(t,1),e.record.name&&r.delete(e.record.name),e.children.forEach(o),e.alias.forEach(o))}}function s(){return n}function c(e){let t=du(e,n);n.splice(t,0,e),e.record.name&&!lu(e)&&r.set(e.record.name,e)}function l(e,t){let i,a={},o,s;if(`name`in e&&e.name){if(i=r.get(e.name),!i)throw wl(Sl.MATCHER_NOT_FOUND,{location:e});s=i.record.name,a=wc(ou(t.params,i.keys.filter(e=>!e.optional).concat(i.parent?i.parent.keys.filter(e=>e.optional):[]).map(e=>e.name)),e.params&&ou(e.params,i.keys.map(e=>e.name))),o=i.stringify(a)}else if(e.path!=null)o=e.path,i=n.find(e=>e.re.test(o)),i&&(a=i.parse(o),s=i.record.name);else{if(i=t.name?r.get(t.name):n.find(e=>e.re.test(t.path)),!i)throw wl(Sl.MATCHER_NOT_FOUND,{location:e,currentLocation:t});s=i.record.name,a=wc({},t.params,e.params),o=i.stringify(a)}let c=[],l=i;for(;l;)c.unshift(l.record),l=l.parent;return{name:s,path:o,params:a,matched:c,meta:uu(c)}}e.forEach(e=>a(e));function u(){n.length=0,r.clear()}return{addRoute:a,resolve:l,removeRoute:o,clearRoutes:u,getRoutes:s,getRecordMatcher:i}}function ou(e,t){let n={};for(let r of t)r in e&&(n[r]=e[r]);return n}function su(e){let t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:cu(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:`components`in e?e.components||null:e.component&&{default:e.component}};return Object.defineProperty(t,"mods",{value:{}}),t}function cu(e){let t={},n=e.props||!1;if(`component`in e)t.default=n;else for(let r in e.components)t[r]=typeof n==`object`?n[r]:n;return t}function lu(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function uu(e){return e.reduce((e,t)=>wc(e,t.meta),{})}function du(e,t){let n=0,r=t.length;for(;n!==r;){let i=n+r>>1;tu(e,t[i])<0?r=i:n=i+1}let i=fu(e);return i&&(r=t.lastIndexOf(i,r-1)),r}function fu(e){let t=e;for(;t=t.parent;)if(pu(t)&&tu(e,t)===0)return t}function pu({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function mu(e){let t=Rn(jl),n=Rn(Ml),r=H(()=>{let n=Zt(e.to);return t.resolve(n)}),i=H(()=>{let{matched:e}=r.value,{length:t}=e,i=e[t-1],a=n.matched;if(!i||!a.length)return-1;let o=a.findIndex(nl.bind(null,i));if(o>-1)return o;let s=yu(e[t-2]);return t>1&&yu(i)===s&&a[a.length-1].path!==s?a.findIndex(nl.bind(null,e[t-2])):o}),a=H(()=>i.value>-1&&vu(n.params,r.value.params)),o=H(()=>i.value>-1&&i.value===n.matched.length-1&&rl(n.params,r.value.params));function s(n={}){if(_u(n)){let n=t[Zt(e.replace)?`replace`:`push`](Zt(e.to)).catch(Ec);return e.viewTransition&&typeof document<`u`&&`startViewTransition`in document&&document.startViewTransition(()=>n),n}return Promise.resolve()}return{route:r,href:H(()=>r.value.href),isActive:a,isExactActive:o,navigate:s}}function hu(e){return e.length===1?e[0]:e}var gu=z({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`},viewTransition:Boolean},useLink:mu,setup(e,{slots:t}){let n=Ft(mu(e)),{options:r}=Rn(jl),i=H(()=>({[bu(e.activeClass,r.linkActiveClass,`router-link-active`)]:n.isActive,[bu(e.exactActiveClass,r.linkExactActiveClass,`router-link-exact-active`)]:n.isExactActive}));return()=>{let r=t.default&&hu(t.default(n));return e.custom?r:co(`a`,{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:i.value},r)}}});function _u(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){let t=e.currentTarget.getAttribute(`target`);if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function vu(e,t){for(let n in t){let r=t[n],i=e[n];if(typeof r==`string`){if(r!==i)return!1}else if(!Dc(i)||i.length!==r.length||r.some((e,t)=>e.valueOf()!==i[t].valueOf()))return!1}return!0}function yu(e){return e?e.aliasOf?e.aliasOf.path:e.path:``}var bu=(e,t,n)=>e??t??n,xu=z({name:`RouterView`,inheritAttrs:!1,props:{name:{type:String,default:`default`},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){let r=Rn(Nl),i=H(()=>e.route||r.value),a=Rn(Al,0),o=H(()=>{let e=Zt(a),{matched:t}=i.value,n;for(;(n=t[e])&&!n.components;)e++;return e}),s=H(()=>i.value.matched[o.value]);Ln(Al,H(()=>o.value+1)),Ln(kl,s),Ln(Nl,i);let c=I();return R(()=>[c.value,s.value,e.name],([e,t,n],[r,i,a])=>{t&&(t.instances[n]=e,i&&i!==t&&e&&e===r&&(t.leaveGuards.size||(t.leaveGuards=i.leaveGuards),t.updateGuards.size||(t.updateGuards=i.updateGuards))),e&&t&&(!i||!nl(t,i)||!r)&&(t.enterCallbacks[n]||[]).forEach(t=>t(e))},{flush:`post`}),()=>{let r=i.value,a=e.name,o=s.value,l=o&&o.components[a];if(!l)return Su(n.default,{Component:l,route:r});let u=o.props[a],d=co(l,wc({},u?u===!0?r.params:typeof u==`function`?u(r):u:null,t,{onVnodeUnmounted:e=>{e.component.isUnmounted&&(o.instances[a]=null)},ref:c}));return Su(n.default,{Component:d,route:r})||d}}});function Su(e,t){if(!e)return null;let n=e(t);return n.length===1?n[0]:n}var Cu=xu;function wu(e){let t=au(e.routes,e),n=e.parseQuery||El,r=e.stringifyQuery||Dl,i=e.history,a=Pl(),o=Pl(),s=Pl(),c=Jt(sl),l=sl;xc&&e.scrollBehavior&&`scrollRestoration`in history&&(history.scrollRestoration=`manual`);let u=Tc.bind(null,e=>``+e),d=Tc.bind(null,Jc),f=Tc.bind(null,Yc);function p(e,n){let r,i;return xl(e)?(r=t.getRecordMatcher(e),i=n):i=e,t.addRoute(i,r)}function m(e){let n=t.getRecordMatcher(e);n&&t.removeRoute(n)}function h(){return t.getRoutes().map(e=>e.record)}function g(e){return!!t.getRecordMatcher(e)}function _(e,a){if(a=wc({},a||c.value),typeof e==`string`){let r=Qc(n,e,a.path),o=t.resolve({path:r.path},a),s=i.createHref(r.fullPath);return wc(r,o,{params:f(o.params),hash:Yc(r.hash),redirectedFrom:void 0,href:s})}let o;if(e.path!=null)o=wc({},e,{path:Qc(n,e.path,a.path).path});else{let t=wc({},e.params);for(let e in t)t[e]??delete t[e];o=wc({},e,{params:d(t)}),a.params=d(a.params)}let s=t.resolve(o,a),l=e.hash||``;s.params=u(f(s.params));let p=$c(r,wc({},e,{hash:Wc(l),path:s.path})),m=i.createHref(p);return wc({fullPath:p,hash:l,query:r===Dl?Ol(e.query):e.query||{}},s,{redirectedFrom:void 0,href:m})}function v(e){return typeof e==`string`?Qc(n,e,c.value.path):wc({},e)}function y(e,t){if(l!==e)return wl(Sl.NAVIGATION_CANCELLED,{from:t,to:e})}function b(e){return C(e)}function x(e){return b(wc(v(e),{replace:!0}))}function S(e,t){let n=e.matched[e.matched.length-1];if(n&&n.redirect){let{redirect:r}=n,i=typeof r==`function`?r(e,t):r;return typeof i==`string`&&(i=i.includes(`?`)||i.includes(`#`)?i=v(i):{path:i},i.params={}),wc({query:e.query,hash:e.hash,params:i.path==null?e.params:{}},i)}}function C(e,t){let n=l=_(e),i=c.value,a=e.state,o=e.force,s=e.replace===!0,u=S(n,i);if(u)return C(wc(v(u),{state:typeof u==`object`?wc({},a,u.state):a,force:o,replace:s}),t||n);let d=n;d.redirectedFrom=t;let f;return!o&&tl(r,i,n)&&(f=wl(Sl.NAVIGATION_DUPLICATED,{to:d,from:i}),te(i,i,!0,!1)),(f?Promise.resolve(f):E(d,i)).catch(e=>Tl(e)?Tl(e,Sl.NAVIGATION_GUARD_REDIRECT)?e:ee(e):P(e,d,i)).then(e=>{if(e){if(Tl(e,Sl.NAVIGATION_GUARD_REDIRECT))return C(wc({replace:s},v(e.to),{state:typeof e.to==`object`?wc({},a,e.to.state):a,force:o}),t||d)}else e=O(d,i,!0,s,a);return D(d,i,e),e})}function w(e,t){let n=y(e,t);return n?Promise.reject(n):Promise.resolve()}function T(e){let t=ie.values().next().value;return t&&typeof t.runWithContext==`function`?t.runWithContext(e):e()}function E(e,t){let n,[r,i,s]=Ll(e,t);n=Il(r.reverse(),`beforeRouteLeave`,e,t);for(let i of r)i.leaveGuards.forEach(r=>{n.push(Fl(r,e,t))});let c=w.bind(null,e,t);return n.push(c),oe(n).then(()=>{n=[];for(let r of a.list())n.push(Fl(r,e,t));return n.push(c),oe(n)}).then(()=>{n=Il(i,`beforeRouteUpdate`,e,t);for(let r of i)r.updateGuards.forEach(r=>{n.push(Fl(r,e,t))});return n.push(c),oe(n)}).then(()=>{n=[];for(let r of s)if(r.beforeEnter)if(Dc(r.beforeEnter))for(let i of r.beforeEnter)n.push(Fl(i,e,t));else n.push(Fl(r.beforeEnter,e,t));return n.push(c),oe(n)}).then(()=>(e.matched.forEach(e=>e.enterCallbacks={}),n=Il(s,`beforeRouteEnter`,e,t,T),n.push(c),oe(n))).then(()=>{n=[];for(let r of o.list())n.push(Fl(r,e,t));return n.push(c),oe(n)}).catch(e=>Tl(e,Sl.NAVIGATION_CANCELLED)?e:Promise.reject(e))}function D(e,t,n){s.list().forEach(r=>T(()=>r(e,t,n)))}function O(e,t,n,r,a){let o=y(e,t);if(o)return o;let s=t===sl,l=xc?history.state:{};n&&(r||s?i.replace(e.fullPath,wc({scroll:s&&l&&l.scroll},a)):i.push(e.fullPath,a)),c.value=e,te(e,t,n,s),ee()}let k;function A(){k||=i.listen((e,t,n)=>{if(!ae.listening)return;let r=_(e),a=S(r,ae.currentRoute.value);if(a){C(wc(a,{replace:!0,force:!0}),r).catch(Ec);return}l=r;let o=c.value;xc&&vl(gl(o.fullPath,n.delta),ml()),E(r,o).catch(e=>Tl(e,Sl.NAVIGATION_ABORTED|Sl.NAVIGATION_CANCELLED)?e:Tl(e,Sl.NAVIGATION_GUARD_REDIRECT)?(C(wc(v(e.to),{force:!0}),r).then(e=>{Tl(e,Sl.NAVIGATION_ABORTED|Sl.NAVIGATION_DUPLICATED)&&!n.delta&&n.type===cl.pop&&i.go(-1,!1)}).catch(Ec),Promise.reject()):(n.delta&&i.go(-n.delta,!1),P(e,r,o))).then(e=>{e||=O(r,o,!1),e&&(n.delta&&!Tl(e,Sl.NAVIGATION_CANCELLED)?i.go(-n.delta,!1):n.type===cl.pop&&Tl(e,Sl.NAVIGATION_ABORTED|Sl.NAVIGATION_DUPLICATED)&&i.go(-1,!1)),D(r,o,e)}).catch(Ec)})}let j=Pl(),M=Pl(),N;function P(e,t,n){ee(e);let r=M.list();return r.length?r.forEach(r=>r(e,t,n)):console.error(e),Promise.reject(e)}function F(){return N&&c.value!==sl?Promise.resolve():new Promise((e,t)=>{j.add([e,t])})}function ee(e){return N||(N=!e,A(),j.list().forEach(([t,n])=>e?n(e):t()),j.reset()),e}function te(t,n,r,i){let{scrollBehavior:a}=e;if(!xc||!a)return Promise.resolve();let o=!r&&yl(gl(t.fullPath,0))||(i||!r)&&history.state&&history.state.scroll||null;return Sn().then(()=>a(t,n,o)).then(e=>e&&hl(e)).catch(e=>P(e,t,n))}let ne=e=>i.go(e),re,ie=new Set,ae={currentRoute:c,listening:!0,addRoute:p,removeRoute:m,clearRoutes:t.clearRoutes,hasRoute:g,getRoutes:h,resolve:_,options:e,push:b,replace:x,go:ne,back:()=>ne(-1),forward:()=>ne(1),beforeEach:a.add,beforeResolve:o.add,afterEach:s.add,onError:M.add,isReady:F,install(e){e.component(`RouterLink`,gu),e.component(`RouterView`,Cu),e.config.globalProperties.$router=ae,Object.defineProperty(e.config.globalProperties,"$route",{enumerable:!0,get:()=>Zt(c)}),xc&&!re&&c.value===sl&&(re=!0,b(i.location).catch(e=>{}));let t={};for(let e in sl)Object.defineProperty(t,e,{get:()=>c.value[e],enumerable:!0});e.provide(jl,ae),e.provide(Ml,It(t)),e.provide(Nl,c);let n=e.unmount;ie.add(e),e.unmount=function(){ie.delete(e),ie.size<1&&(l=sl,k&&k(),k=null,c.value=sl,re=!1,N=!1),n()}}};function oe(e){return e.reduce((e,t)=>e.then(()=>T(t)),Promise.resolve())}return ae}function Tu(){return Rn(jl)}function Eu(e){return Rn(Ml)}var Du=bc(`app`,()=>{let e=I(null),t=I(null),n=I(!1),r=I([]),i=I(!1);function a(e){let t=r.value.findIndex(t=>t.id===e);t>-1&&r.value.splice(t,1)}return{user:e,token:t,loading:n,notifications:r,initialized:i,dismissNotification:a}}),Ou=`modulepreload`,ku=function(e){return`/static/`+e},Au={},ju=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}r=o(t.map(t=>{if(t=ku(t,n),t in Au)return;Au[t]=!0;let r=t.endsWith(`.css`),i=r?`[rel="stylesheet"]`:``;if(n)for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}else if(document.querySelector(`link[href="${t}"]${i}`))return;let o=document.createElement(`link`);if(o.rel=r?`stylesheet`:Ou,r||(o.as=`script`),o.crossOrigin=``,o.href=t,a&&o.setAttribute(`nonce`,a),document.head.appendChild(o),r)return new Promise((e,n)=>{o.addEventListener(`load`,e),o.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},Mu=wu({history:Ul(),routes:[{path:`/`,component:()=>ju(()=>import(`./HomeView-C8A0ix5M.js`),__vite__mapDeps([0,1]))},{path:`/login`,component:()=>ju(()=>import(`./LoginView-C7Q64TDl.js`),__vite__mapDeps([2,3]))},{path:`/users`,component:()=>ju(()=>import(`./UsersView-x2MT0yp7.js`),__vite__mapDeps([4,5]))},{path:`/moldinsight`,component:()=>ju(()=>import(`./MoldInsightView-DkAbjiJg.js`),__vite__mapDeps([6,5]))},{path:`/moldinsight/batch`,component:()=>ju(()=>import(`./BatchView-BMEYkwnK.js`),__vite__mapDeps([7,5,8]))},{path:`/moldinsight/result/:taskId`,component:()=>ju(()=>import(`./ResultView-CtyEJhC8.js`),__vite__mapDeps([9,5]))},{path:`/inventory`,component:()=>ju(()=>import(`./InventoryView-DOGSgQZy.js`),__vite__mapDeps([10,11,5,12])),redirect:`/inventory/dashboard`,children:[{path:`dashboard`,component:()=>ju(()=>import(`./DashboardTab-DlAvFlmh.js`),__vite__mapDeps([13,14,11,5]))},{path:`products`,component:()=>ju(()=>import(`./ProductsTab-BXmeCZOh.js`),__vite__mapDeps([15,14,11,5]))},{path:`materials`,component:()=>ju(()=>import(`./MaterialsTab-Cq_FP1X7.js`),__vite__mapDeps([16,14,11,5]))},{path:`inventory`,component:()=>ju(()=>import(`./InventoryTab-CFTHIGoz.js`),__vite__mapDeps([17,14,11,5,18]))},{path:`purchases`,component:()=>ju(()=>import(`./PurchaseOrdersTab-DA-z0FT1.js`),__vite__mapDeps([19,14,11,5]))},{path:`sales_orders`,component:()=>ju(()=>import(`./SalesOrdersTab-Dn49N9j5.js`),__vite__mapDeps([20,14,11,5]))},{path:`suppliers`,component:()=>ju(()=>import(`./SuppliersTab-Dr_fyxwE.js`),__vite__mapDeps([21,14,11,5,22]))},{path:`customers`,component:()=>ju(()=>import(`./CustomersTab-DftpbrJH.js`),__vite__mapDeps([23,14,11,5,24]))},{path:`finance`,component:()=>ju(()=>import(`./FinanceTab-C1ObNRfG.js`),__vite__mapDeps([25,14,11,5]))},{path:`movements`,component:()=>ju(()=>import(`./MovementsTab-DXIrYz_g.js`),__vite__mapDeps([26,14,11,5,27]))}]},{path:`/_design-system`,component:()=>ju(()=>import(`./DesignSystemView-ClD2CUze.js`),[])},{path:`/_release`,component:()=>ju(()=>import(`./ReleaseView-BaSk1AJB.js`),[])}]});Mu.beforeEach((e,t,n)=>{let r=![`/login`,`/_design-system`,`/_release`].includes(e.path),i=Du();if(r&&!i.user)return n(`/login`);if(e.path===`/login`&&i.user)return n(`/`);n()});async function Nu(e){try{if((e.headers.get(`content-type`)||``).includes(`application/json`)){let t=await e.json().catch(()=>null);if(t?.detail){if(Array.isArray(t.detail)){let e=t.detail.map(e=>{let t=Array.isArray(e?.loc)?e.loc.join(`.`):``,n=e?.msg?String(e.msg):`校验失败`;return t?`${t}: ${n}`:n}).filter(Boolean);return e.length?e.join(` `):`请求校验失败`}return typeof t.detail==`object`?JSON.stringify(t.detail):String(t.detail)}return t?.message?String(t.message):`请求失败`}let t=(await e.text().catch(()=>``)||``).trim();return t?t.length>200?t.slice(0,200)+`...`:t:`请求失败`}catch{return`请求失败`}}async function Pu(e,t={}){let n=Du(),r={"Content-Type":`application/json`,...t.headers||{}};n.token&&(r.Authorization=`Bearer ${n.token}`);let i=await fetch(e,{...t,headers:r});if(i.status===401){let t=e.includes(`/api/auth/login`);t||(n.user=null,n.token=null,localStorage.removeItem(`token`),localStorage.removeItem(`user`));let r=await Nu(i);throw Error(t?r:`登录已过期,请重新登录`)}if(!i.ok){let e=await Nu(i);throw Error(e)}return i.json()}function Fu(e,t){let n=Du();n.token=e,n.user=t,localStorage.setItem(`token`,e),localStorage.setItem(`user`,JSON.stringify(t))}function Iu(){let e=Du();e.token=null,e.user=null,localStorage.removeItem(`token`),localStorage.removeItem(`user`)}function Lu(){let e=Du(),t=localStorage.getItem(`token`),n=localStorage.getItem(`user`);if(t&&n)try{e.token=t,e.user=JSON.parse(n)}catch{Iu()}e.initialized=!0}var Ru=0,zu=new Map;function Bu(e,t=`info`){let n=`${t}:${e}`,r=Date.now();if(r-(zu.get(n)||0)<2500)return;zu.set(n,r);let i=Du(),a=++Ru,o={id:a,message:e,type:t,timestamp:new Date,visible:!0};i.notifications.push(o),setTimeout(()=>{let e=i.notifications.find(e=>e.id===a);e&&(e.visible=!1,setTimeout(()=>{i.dismissNotification(a)},300))},5e3)}function Vu(e,t=``){console.error(`API错误 [${t}]:`,e);let n=e instanceof Error?e.message:`请求失败,请稍后重试`;return Bu(n,`error`),n}var Hu={class:`app-container`},Uu={key:0,class:`notification-container`},Wu={class:`notification-icon`},Gu={class:`notification-content`},Ku={class:`notification-message`},qu=[`onClick`],Ju={class:`app-header`},Yu={class:`header-content`},Xu={key:0,class:`nav-menu`},Zu={class:`user-section`},Qu={class:`user-info`},$u={class:`user-avatar`},ed={class:`user-name`},td={class:`main-content`},nd=z({__name:`App`,setup(e){let t=Eu(),n=Tu(),r=Du(),i=H(()=>{let e=[{path:`/`,label:`首页`,icon:`⌂`},{path:`/inventory`,label:`进销存`,icon:`⊞`},{path:`/moldinsight`,label:`MoldInsight`,icon:`◈`}];return r.user?.is_superuser&&e.push({path:`/users`,label:`用户管理`,icon:`👤`}),e}),a=e=>e===`/`?t.path===`/`:t.path.startsWith(e),o=async()=>{try{await Pu(`/api/auth/logout`,{method:`POST`})}catch{}Iu(),Bu(`已退出登录`,`success`),n.push(`/login`)},s=e=>{let t=r.notifications.find(t=>t.id===e);t&&(t.visible=!1,setTimeout(()=>{r.dismissNotification(e)},300))};return Fr(()=>{Lu()}),(e,t)=>{let c=Kr(`router-link`),l=Kr(`t-button`),u=Kr(`router-view`);return va(),Ca(`div`,Hu,[Zt(r).notifications.length>0?(va(),Ca(`div`,Uu,[B(bs,{name:`notification`},{default:Pn(()=>[(va(!0),Ca(fa,null,Qr(Zt(r).notifications,e=>(va(),Ca(`div`,{key:e.id,class:le([`notification`,`notification-`+e.type])},[ka(`div`,Wu,_e(e.type===`success`?`✓`:e.type===`error`?`✕`:e.type===`warning`?`!`:`i`),1),ka(`div`,Gu,[ka(`div`,Ku,_e(e.message),1)]),ka(`button`,{class:`notification-close`,onClick:t=>s(e.id)},`×`,8,qu)],2))),128))]),_:1})])):Fa(``,!0),ka(`header`,Ju,[ka(`div`,Yu,[ka(`div`,{class:`logo`,onClick:t[0]||=e=>Zt(n).push(`/`)},[...t[1]||=[ka(`div`,{class:`logo-icon`},`G`,-1),ka(`div`,null,[ka(`div`,{class:`logo-text`},`Gemold`),ka(`div`,{class:`logo-subtitle`},`模具制造管理系统`)],-1)]]),Zt(r).user?(va(),Ca(`nav`,Xu,[(va(!0),Ca(fa,null,Qr(i.value,e=>(va(),wa(c,{key:e.path,to:e.path,class:le([`nav-item`,{active:a(e.path)}])},{default:Pn(()=>[Na(_e(e.label),1)]),_:2},1032,[`to`,`class`]))),128))])):Fa(``,!0),ka(`div`,Zu,[Zt(r).user?(va(),Ca(fa,{key:0},[ka(`div`,Qu,[ka(`div`,$u,_e((Zt(r).user.full_name||Zt(r).user.username).charAt(0).toUpperCase()),1),ka(`span`,ed,_e(Zt(r).user.full_name||Zt(r).user.username),1)]),B(l,{theme:`default`,variant:`outline`,size:`small`,onClick:o},{default:Pn(()=>[...t[2]||=[Na(`退出`,-1)]]),_:1})],64)):(va(),wa(c,{key:1,to:`/login`,class:`btn btn-primary`},{default:Pn(()=>[...t[3]||=[Na(`登录`,-1)]]),_:1}))])])]),ka(`main`,td,[B(u,null,{default:Pn(({Component:e})=>[B(wo,{name:`fade`,mode:`out-in`},{default:Pn(()=>[(va(),wa(Jr(e)))]),_:2},1024)]),_:1})]),t[4]||=ka(`footer`,{class:`app-footer`},[ka(`div`,{class:`footer-content`},[ka(`a`,{href:`https://beian.miit.gov.cn/`,target:`_blank`,class:`beian-link`},`粤ICP备2025386132号-1`)])],-1)])}}}),rd=(e,t)=>{let n=e.__vccOpts||e;for(let[e,r]of t)n[e]=r;return n},id=rd(nd,[[`__scopeId`,`data-v-42becfab`]]);function ad(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n0){if(++t>=wf)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function Of(e){return function(){return e}}var kf=function(){try{var e=_f(Object,`defineProperty`);return e({},``,{}),e}catch{}}(),Af=Df(kf?function(e,t){return kf(e,`toString`,{configurable:!0,enumerable:!1,value:Of(t),writable:!0})}:Zd);function jf(e,t){for(var n=-1,r=e==null?0:e.length;++n-1}var Lf=9007199254740991,Rf=/^(?:0|[1-9]\d*)$/;function zf(e,t){var n=typeof e;return t??=Lf,!!t&&(n==`number`||n!=`symbol`&&Rf.test(e))&&e>-1&&e%1==0&&e-1&&e%1==0&&e<=Jf}function Xf(e){return e!=null&&Yf(e.length)&&!K(e)}function Zf(e,t,n){if(!Bd(n))return!1;var r=typeof t;return(r==`number`?Xf(n)&&zf(t,n.length):r==`string`&&t in n)?Vf(n[t],e):!1}function Qf(e){return qf(function(t,n){var r=-1,i=n.length,a=i>1?n[i-1]:void 0,o=i>2?n[2]:void 0;for(a=e.length>3&&typeof a==`function`?(i--,a):void 0,o&&Zf(n[0],n[1],o)&&(a=i<3?void 0:a,i=1),t=Object(t);++r-1}function Cm(e,t){var n=this.__data__,r=vm(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function wm(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t0&&n(s)?t>1?Ym(s,t-1,n,r,i):Km(i,s):r||(i[i.length]=s)}return i}function Xm(e){return e!=null&&e.length?Ym(e,1):[]}function Zm(e){return Af(Kf(e,void 0,Xm),e+``)}var Qm=Jp(Object.getPrototypeOf,Object),$m=`[object Object]`,eh=Function.prototype,th=Object.prototype,nh=eh.toString,rh=th.hasOwnProperty,ih=nh.call(Object);function ah(e){if(!Od(e)||Dd(e)!=$m)return!1;var t=Qm(e);if(t===null)return!0;var n=rh.call(t,`constructor`)&&t.constructor;return typeof n==`function`&&n instanceof n&&nh.call(n)==ih}function oh(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),n=n>i?i:n,n<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var a=Array(i);++r=r?e:oh(e,t,n)}var ch=RegExp(`[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]`);function lh(e){return ch.test(e)}function uh(e){return e.split(``)}var dh=`\\ud800-\\udfff`,fh=`\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff`,ph=`\\ufe0e\\ufe0f`,mh=`[`+dh+`]`,hh=`[`+fh+`]`,gh=`\\ud83c[\\udffb-\\udfff]`,_h=`(?:`+hh+`|`+gh+`)`,vh=`[^`+dh+`]`,yh=`(?:\\ud83c[\\udde6-\\uddff]){2}`,bh=`[\\ud800-\\udbff][\\udc00-\\udfff]`,xh=`\\u200d`,Sh=_h+`?`,Ch=`[`+ph+`]?`,wh=`(?:`+xh+`(?:`+[vh,yh,bh].join(`|`)+`)`+Ch+Sh+`)*`,Th=Ch+Sh+wh,Eh=`(?:`+[vh+hh+`?`,hh,yh,bh,mh].join(`|`)+`)`,Dh=RegExp(gh+`(?=`+gh+`)|`+Eh+Th,`g`);function Oh(e){return e.match(Dh)||[]}function kh(e){return lh(e)?Oh(e):uh(e)}function Ah(e){return function(t){t=Vm(t);var n=lh(t)?kh(t):void 0,r=n?n[0]:t.charAt(0),i=n?sh(n,1).join(``):t.slice(1);return r[e]()+i}}var jh=Ah(`toUpperCase`);function Mh(e){return jh(Vm(e).toLowerCase())}function Nh(e,t,n,r){var i=-1,a=e==null?0:e.length;for(r&&a&&(n=e[++i]);++is))return!1;var l=a.get(e),u=a.get(t);if(l&&u)return l==t&&u==e;var d=-1,f=!0,p=n&qv?new Uv:void 0;for(a.set(e,t),a.set(t,e);++d=t||n<0||d&&r>=a}function _(){var e=Gy();if(g(e))return v(e);s=setTimeout(_,h(e))}function v(e){return s=void 0,f&&r?p(e):(r=i=void 0,o)}function y(){s!==void 0&&clearTimeout(s),l=0,r=c=i=s=void 0}function b(){return s===void 0?o:v(Gy())}function x(){var e=Gy(),n=g(e);if(r=arguments,i=this,c=e,n){if(s===void 0)return m(c);if(d)return clearTimeout(s),s=setTimeout(_,t),p(c)}return s===void 0&&(s=setTimeout(_,t)),o}return x.cancel=y,x.flush=b,x}function Xy(e,t,n){(n!==void 0&&!Vf(e[t],n)||n===void 0&&!(t in e))&&Bf(e,t,n)}function Zy(e){return Od(e)&&Xf(e)}function Qy(e,t){if(!(t===`constructor`&&typeof e[t]==`function`)&&t!=`__proto__`)return e[t]}function $y(e){return Wf(e,nm(e))}function eb(e,t,n,r,i,a,o){var s=Qy(e,n),c=Qy(t,n),l=o.get(c);if(l){Xy(e,n,l);return}var u=a?a(s,c,n+``,e,t,o):void 0,d=u===void 0;if(d){var f=G(c),p=!f&&fp(c),m=!f&&!p&&Gp(c);u=c,f||p||m?G(s)?u=s:Zy(s)?u=Cf(s):p?(d=!1,u=Kg(c,!0)):m?(d=!1,u=A_(c,!0)):u=[]:ah(c)||sp(c)?(u=s,sp(s)?u=$y(s):(!Bd(s)||K(s))&&(u=Z_(c))):d=!1}d&&(o.set(c,u),i(u,c,r,a,o),o.delete(c)),Xy(e,n,u)}function tb(e,t,n,r,i){e!==t&&Vy(t,function(a,o){if(i||=new zg,Bd(a))eb(e,t,o,n,tb,r,i);else{var s=r?r(Qy(e,o),a,o+``,e,t,i):void 0;s===void 0&&(s=a),Xy(e,o,s)}},nm)}var nb=Qf(function(e,t,n,r){tb(e,t,n,r)});function rb(e,t,n){for(var r=-1,i=e==null?0:e.length;++r=ib&&(a=Gv,o=!1,t=new Uv(t));outer:for(;++it}var mb=Math.max,hb=Math.min;function gb(e,t,n){return e>=hb(t,n)&&e=120&&u.length>=120)?new Uv(o&&u):void 0}u=e[0];var d=-1,f=s[0];outer:for(;++d1,t}),Wf(e,r_(e),n),r&&(n=Iv(n,$b|ex|tx,Qb));for(var i=t.length;i--;)Zb(n,t[i]);return n});function rx(e,t,n,r){if(!Bd(e))return e;t=Hm(t,e);for(var i=-1,a=t.length,o=a-1,s=e;s!=null&&++iox)return n;do t%2&&(n+=e),t=sx(t/2),t&&(e+=e);while(t);return n}var lx=Iy(`length`),ux=`\\ud800-\\udfff`,dx=`\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff`,fx=`\\ufe0e\\ufe0f`,px=`[`+ux+`]`,mx=`[`+dx+`]`,hx=`\\ud83c[\\udffb-\\udfff]`,gx=`(?:`+mx+`|`+hx+`)`,_x=`[^`+ux+`]`,vx=`(?:\\ud83c[\\udde6-\\uddff]){2}`,yx=`[\\ud800-\\udbff][\\udc00-\\udfff]`,bx=`\\u200d`,xx=gx+`?`,Sx=`[`+fx+`]?`,Cx=`(?:`+bx+`(?:`+[_x,vx,yx].join(`|`)+`)`+Sx+xx+`)*`,wx=Sx+xx+Cx,Tx=`(?:`+[_x+mx+`?`,mx,vx,yx,px].join(`|`)+`)`,Ex=RegExp(hx+`(?=`+hx+`)|`+Tx+wx,`g`);function Dx(e){for(var t=Ex.lastIndex=0;Ex.test(e);)++t;return t}function Ox(e){return lh(e)?Dx(e):lx(e)}var kx=Math.ceil;function Ax(e,t){t=t===void 0?` `:Fd(t);var n=t.length;if(n<2)return n?cx(t,e):t;var r=cx(t,kx(e/Ox(t)));return lh(t)?sh(kh(r),0,e).join(``):r.slice(0,e)}function jx(e,t,n){e=Vm(e),t=Xd(t);var r=t?Ox(e):0;return t&&r=qx){var l=t?null:Kx(e);if(l)return Xv(l);o=!1,i=Gv,c=new Uv}else c=t?[]:s;outer:for(;++r`u`?rS:window,uS=[`moz`,`webkit`],dS=`AnimationFrame`,fS=lS[`request`+dS],pS=lS[`cancel`+dS]||lS[`cancelRequest`+dS],mS=0;!fS&&mS`u`,CS=function(e){return(e||``).replace(/^[\s\uFEFF]+|[\s\uFEFF]+$/g,``)},wS=function(){return!SS&&document.addEventListener?function(e,t,n,r){e&&t&&n&&e.addEventListener(t,n,r)}:function(e,t,n){e&&t&&n&&e.attachEvent(`on${t}`,n)}}(),TS=function(){return!SS&&document.removeEventListener?function(e,t,n,r){e&&t&&e.removeEventListener(t,n,r)}:function(e,t,n){e&&t&&e.detachEvent(`on${t}`,n)}}();function ES(e,t,n,r){var i=K(n)?n:n.handleEvent,a=function(n){i(n),TS(e,t,a,r)};wS(e,t,a,r)}function DS(e,t){if(!e||!t)return!1;if(t.indexOf(` `)!==-1)throw Error(`className should not contain space.`);return e.classList?e.classList.contains(t):` ${e.className} `.indexOf(` ${t} `)>-1}function OS(e,t){if(e){for(var n=e.className,r=(t||``).split(` `),i=0,a=r.length;i0&&arguments[0]!==void 0?arguments[0]:`body`;return yb(e)?document.querySelector(e):K(e)?e():e};function MS(e){return e&&e===e.window}function NS(e,t){if(SS||!e)return 0;var n=t?`scrollLeft`:`scrollTop`,r=0;return MS(e)?r=e[t?`pageXOffset`:`pageYOffset`]:e instanceof Document?r=e.documentElement[n]:e&&(r=e[n]),r}function PS(e,t){var n=t.container,r=n===void 0?window:n,i=t.duration,a=i===void 0?450:i,o=t.easing,s=o===void 0?xS:o,c=NS(r),l=Date.now();return new Promise(function(t){var n=function(){var i=Date.now()-l,o=s(Math.min(i,a),c,e,a);MS(r)?r.scrollTo(window.pageXOffset,o):r instanceof Document||r.constructor.name===`HTMLDocument`?r.documentElement.scrollTop=o:r.scrollTop=o,bS(in},IS=function(e){if(!(e instanceof HTMLFormElement))throw Error(`target must be HTMLFormElement`);var t=document.createElement(`input`);t.type=`submit`,t.hidden=!0,e.appendChild(t),t.click(),e.removeChild(t)};function LS(e,t){var n=e.getBoundingClientRect();if(t){var r=t.getBoundingClientRect();return n.top>=r.top&&n.left>=r.left&&n.bottom<=r.bottom&&n.right<=r.right}return n.top>=0&&n.left>=0&&n.bottom+80<=window.innerHeight&&n.right<=window.innerWidth}function RS(e,t){var n=``;return document.defaultView&&document.defaultView.getComputedStyle&&(n=document.defaultView.getComputedStyle(e,null).getPropertyValue(t)),n&&n.toLowerCase?n.toLowerCase():n}function zS(e){var t=e.parentNode;return!t||t.nodeName===`HTML`?!1:RS(e,`position`)===`fixed`?!0:zS(t)}function BS(){var e=document.body,t=document.documentElement;return{scrollTop:window.pageYOffset||t.scrollTop||e.scrollTop,scrollLeft:window.pageXOffset||t.scrollLeft||e.scrollLeft}}function VS(){if(window.innerWidth!==void 0)return{width:window.innerWidth,height:window.innerHeight};var e=document.documentElement;return{width:e.clientWidth,height:e.clientHeight}}var HS=function(e){return Ta(e)&&e.type===ma};function Y(e,t,n){var r=e;return r.install=function(i,a){i.component(t||a||r.name,e),n&&i.directive(n.name,n.comp)},r}function US(e){var t;return Bd(e)&&`defaultNode`in e?t=e.defaultNode:(Ta(e)||yb(e))&&(t=e),t}function WS(e){var t=[],n=function(e){if(G(e))return e.forEach(function(e){if(e.children&&G(e.children)){if(e.type!==fa)return;n(e.children)}else t.push(e)}),t};return n(e)}function GS(e){return Bd(e)&&`params`in e?e.params:{}}function KS(e){return Bd(e)&&`slotFirst`in e?e.slotFirst:!1}function qS(e){var t=Wa(),n=t.vnode,r=t.slots,i=n.props||{};return!!(Object.prototype.hasOwnProperty.call(i,e)||r&&Object.prototype.hasOwnProperty.call(r,e))}var JS=`Copy to clipboard: #{key}, Enter`,YS=function(e){var t=(/mac os x/i.test(navigator.userAgent)?`⌘`:`Ctrl`)+`+C`;return e.replace(/#{\s*key\s*}/g,t)},XS=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,n=[],r=0;r`u`||typeof XMLSerializer>`u`)return``;var t;try{t=new DOMParser().parseFromString(e,`image/svg+xml`)}catch{return``}if(t.querySelector(`parsererror`))return``;var n=t.documentElement;if(!n||n.localName?.toLowerCase()!==`svg`)return``;oC(n),sC(n);try{return new XMLSerializer().serializeToString(n)}catch{return``}},lC={exports:{}};lC.exports,(function(e,t){(function(t,n){e.exports=n()})(rS,function(){var e=1e3,t=6e4,n=36e5,r=`millisecond`,i=`second`,a=`minute`,o=`hour`,s=`day`,c=`week`,l=`month`,u=`quarter`,d=`year`,f=`date`,p=`Invalid Date`,m=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,h=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,g={name:`en`,weekdays:`Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday`.split(`_`),months:`January_February_March_April_May_June_July_August_September_October_November_December`.split(`_`),ordinal:function(e){var t=[`th`,`st`,`nd`,`rd`],n=e%100;return`[`+e+(t[(n-20)%10]||t[n]||t[0])+`]`}},_=function(e,t,n){var r=String(e);return!r||r.length>=t?e:``+Array(t+1-r.length).join(n)+e},v={s:_,z:function(e){var t=-e.utcOffset(),n=Math.abs(t),r=Math.floor(n/60),i=n%60;return(t<=0?`+`:`-`)+_(r,2,`0`)+`:`+_(i,2,`0`)},m:function e(t,n){if(t.date()1)return e(o[0])}else{var s=t.name;b[s]=t,i=s}return!r&&i&&(y=i),i||!r&&y},w=function(e,t){if(S(e))return e.clone();var n=ud(t)==`object`?t:{};return n.date=e,n.args=arguments,new E(n)},T=v;T.l=C,T.i=S,T.w=function(e,t){return w(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var E=function(){function g(e){this.$L=C(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[x]=!0}var _=g.prototype;return _.parse=function(e){this.$d=function(e){var t=e.date,n=e.utc;if(t===null)return new Date(NaN);if(T.u(t))return new Date;if(t instanceof Date)return new Date(t);if(typeof t==`string`&&!/Z$/i.test(t)){var r=t.match(m);if(r){var i=r[2]-1||0,a=(r[7]||`0`).substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)}}return new Date(t)}(e),this.init()},_.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},_.$utils=function(){return T},_.isValid=function(){return this.$d.toString()!==p},_.isSame=function(e,t){var n=w(e);return this.startOf(t)<=n&&n<=this.endOf(t)},_.isAfter=function(e,t){return w(e)0){var a=i[0],o=i[1];typeof a==`number`?(n=a,o&&ud(o)===`object`?r=o:r.count=n):ud(a)===`object`&&a!==null&&(r=a)}if(t.includes(`|`)){var s=t.split(`|`).map(function(e){return e.trim()});if(typeof n==`number`){var c=vC(n);t=c0&&(t=t.replace(/\{\s*([\w-]+)\s*\}/g,function(e,t){return Object.prototype.hasOwnProperty.call(r,t)?String(r[t]):e})),t}return``}var bC=I();function xC(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:void 0,t=arguments.length>1?arguments[1]:void 0,n=null;Wa()?(n=Rn(gC,null),n||=bC):n=bC;var r=H(function(){return n?.value||hC}),i=H(function(){return Object.assign({},r.value[e],t)});return{t:function(e){var t=[...arguments].slice(1);return K(e)?t.length?e.apply(void 0,t):e(co):yC.apply(void 0,[e].concat(t))},global:i,globalConfig:i,classPrefix:H(function(){return r.value.classPrefix})}}var SC=function(e){var t=zv(hC),n=H(function(){return Object.assign({},_C(t,e.globalConfig))});return Ln(gC,n),bC.value||=n.value,n};function CC(e,t,n,r){if(typeof window>`u`)return null;if(!window||!window.IntersectionObserver)return n(),null;var i=null;try{i=new window.IntersectionObserver(function(t){t[0].isIntersecting&&(n(),i.unobserve(e))},{rootMargin:`0px 0px ${r}px 0px`,root:t}),i.observe(e)}catch(e){console.error(e),n()}return i}var wC=new Set,TC={warn:function(e,t){console.warn(`TDesign ${e} Warn: ${t}`)},warnOnce:function(e,t){var n=`TDesign ${e} Warn: ${t}`;wC.has(n)||(wC.add(n),console.warn(n))},error:function(e,t){console.error(`TDesign ${e} Error: ${t}`)},errorOnce:function(e,t){var n=`TDesign ${e} Error: ${t}`;wC.has(n)||(wC.add(n),console.error(n))},info:function(e,t){console.info(`TDesign ${e} Info: ${t}`)}},EC=/(.png|.jpg|.jpeg|.jpe|.webp|.avif|.heic|.heif|.svg|.gif|.bmp)/i,DC=/(.png|.jpg|.jpeg|.jpe|.webp|.avif|.heic|.heif|.svg|.gif|.bmp|.dwg|.dxf|.svf|.tif|.tiff|.arw)/i,OC=/(.pdf)/i,kC=/(.xlsx|.xls|.csv|.xlc|.xlm|.xlt|.xlw)/i,AC=/(.dox|docx|.document|.wps|.wdb|.msword)/i,jC=/(.ppt|.pptx|.key)/i,MC=/(.avi|.mp4|.wmv|.mpg|.mpeg|.mov|.rm|.ram|.swf|.flv|.rmvb|.flash|.mid|.3gp)/i,NC={"audio/*":/(.mp2|.mp3|.mp4|.ogg|.3gpp|.ac3|.au)/i,"video/*":MC,"image/*":DC,".jpg":/image\/jpeg|\.jpg$/i,".heic":/image\/heic|image\/heic-sequence|\.heic$/i,".heif":/image\/heif|image\/heif-sequence|\.heif$/i,".ico":/image\/vnd.microsoft.icon/i,".doc":/application\/msword/i,".docx":/application\/vnd.openxmlformats-officedocument.wordprocessingml.document/i,".xls":/application\/vnd.ms-excel/i,".xlsx":/application\/vnd.openxmlformats-officedocument.spreadsheetml.sheet/i,".ppt":/application\/vnd.ms-powerpoint/i,".pptx":/application\/vnd.openxmlformats-officedocument.presentationml.presentation/i,".vsd":/application\/vnd.visio/i,".txt":/text\/plain/i,".abw":/application\/x-abiword/i,".avi":/video\/x-msvideo/i,".azw":/application\/vnd.amazon.ebook/i,".bin":/application\/octet-stream/i,".cda":/application\/x-cdf/i,".mpkg":/application\/vnd.apple.installer+xml/i,".odp":/application\/vnd.oasis.opendocument.presentation/i,".ods":/application\/vnd.oasis.opendocument.spreadsheet/i,".odt":/application\/vnd.oasis.opendocument.text/i,".oga":/audio\/ogg/i,".ogv":/video\/ogg/i,".ogx":/application\/ogg/i,".ai":/application\/postscript/i,".eps":/application\/postscript/i,".ps":/application\/postscript/i},PC={B:1,KB:1024,MB:1048576,GB:1073741824};function FC(e){return e=PC.KB&&e=PC.MB&&e=PC.GB?`${(e/PC.GB).toFixed(1)} GB`:``}function IC(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,t=new Date,n=t.getMonth()+1;n=n<10?`0${n}`:n;var r=`${t.getFullYear()}-${n}-${t.getDate()}`,i=`${t.getHours()}:${t.getMinutes()}:${t.getSeconds()}`;return e?[r,i].join(` `):r}function LC(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:5,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:7,r=e,i=0,a=0;if(!r)return``;for(var o=0;oo-n&&a=1024&&e<1048576?`${(e/1024).toFixed(1)} KB`:e>=1048576?`${(e/1048576).toFixed(1)} MB`:``}function zC(e,t,n){var r=[`B`,`KB`,`MB`,`GB`],i=1,a=r.indexOf(n);return a===-1&&(TC.warn(`Upload`,`\`sizeLimit.unit\` can only be one of ${r.join()}`),a=i),e>t*PC[n]}function BC(e){return new Promise(function(t){if(!e){t(``);return}var n=new FileReader;n.readAsDataURL(e),n.onload=function(e){t(e.target?.result)}})}function VC(e,t,n){var r=t||n;if(!e)return!0;if(!r)return!1;for(var i=e.split(`,`).map(function(e){return e.trim()}),a=0,o=i.length;a1&&arguments[1]!==void 0?arguments[1]:``,n=[],r=0;r1&&c.includes(Boolean)&&c.includes(Function)&&s===``&&!o?i:s===!1||s===null?void 0:s===!0?uw(e,t,r)||i:K(s)?s(co,r):[void 0,``].includes(s)&&o?uw(e,t,r):s}if(o)return uw(e,t,r);var l=e.props[kg(t)]||e.props[Hb(t)];return l===!1||l===null?void 0:l===!0?i:K(l)?l(co,r):l}},pw=function(){var e=Z();return function(t,n){var r=US(n);return e(t,n)||r}},mw=function(){var e=Z();return function(t,n,r){var i=GS(r),a=US(r),o=i?{params:i}:void 0,s=e(t,o),c=e(n,o),l=dw(s)?c:s;return dw(l)?a:l}},hw=function(e){return e.filter(function(e){return!HS(e)})};function gw(e){return e?yb(e)?e:Array.isArray(e)?hw(e).map(function(e){return gw(e)}).filter(Boolean).join(` `):HS(e)?``:yb(e.children)?e.children:Array.isArray(e.children)?hw(e.children).map(function(e){return gw(e)}).filter(Boolean).join(` `):e.children&&Bd(e.children)?Object.values(e.children).map(function(e){return!e||K(e)?``:gw(e)}).filter(Boolean).join(` `):``:``}function _w(){return{beforeEnter:function(e){e.dataset.oldPaddingTop=e.style.paddingTop,e.dataset.oldPaddingBottom=e.style.paddingBottom,e.style.height=`0`,e.style.paddingTop=`0`,e.style.paddingBottom=`0`},enter:function(e){e.dataset.oldOverflow=e.style.overflow,e.style.height=`${e.scrollHeight}px`,e.style.paddingTop=e.dataset.oldPaddingTop,e.style.paddingBottom=e.dataset.oldPaddingBottom,e.style.overflow=`hidden`},afterEnter:function(e){e.style.height=``,e.style.overflow=e.dataset.oldOverflow},beforeLeave:function(e){e.dataset.oldPaddingTop=e.style.paddingTop,e.dataset.oldPaddingBottom=e.style.paddingBottom,e.dataset.oldOverflow=e.style.overflow,e.style.height=`${e.scrollHeight}px`,e.style.overflow=`hidden`},leave:function(e){e.scrollHeight!==0&&(e.style.height=`0`,e.style.paddingTop=`0`,e.style.paddingBottom=`0`)},afterLeave:function(e){e.style.height=``,e.style.overflow=e.dataset.oldOverflow,e.style.paddingTop=e.dataset.oldPaddingTop,e.style.paddingBottom=e.dataset.oldPaddingBottom}}}function Q(e){var t=xC(`classPrefix`).classPrefix;return H(function(){return e?`${t.value}-${e}`:t.value})}function vw(){var e=xC(`classPrefix`).classPrefix;return{classPrefix:e,SIZE:H(function(){return{small:`${e.value}-size-s`,medium:`${e.value}-size-m`,large:`${e.value}-size-l`,default:``,xs:`${e.value}-size-xs`,xl:`${e.value}-size-xl`,block:`${e.value}-size-full-width`}}),STATUS:H(function(){return{loading:`${e.value}-is-loading`,loadMore:`${e.value}-is-load-more`,disabled:`${e.value}-is-disabled`,focused:`${e.value}-is-focused`,success:`${e.value}-is-success`,error:`${e.value}-is-error`,warning:`${e.value}-is-warning`,selected:`${e.value}-is-selected`,active:`${e.value}-is-active`,checked:`${e.value}-is-checked`,current:`${e.value}-is-current`,hidden:`${e.value}-is-hidden`,visible:`${e.value}-is-visible`,expanded:`${e.value}-is-expanded`,indeterminate:`${e.value}-is-indeterminate`}})}}function yw(e,t,n,r){var i=Wa(),a=i.emit,o=i.vnode,s=I(),c=o.props||{};return Object.prototype.hasOwnProperty.call(c,r)||Object.prototype.hasOwnProperty.call(c,Hb(r))?[e,function(e){a(`update:${r}`,e);var t=[...arguments].slice(1);n?.apply(void 0,[e].concat(t))}]:(s.value=t,[s,function(e){s.value=e;var t=[...arguments].slice(1);n?.apply(void 0,[e].concat(t))}])}var bw=`t-display-none-element-refresh`;function xw(){var e=I(0);Ln(bw,e),Lr(function(){e.value+=1})}function Sw(e){var t=Wa(),n=H(function(){return t.props.disabled}),r=Rn(`formDisabled`,Object.create(null));return H(function(){var t,i;return G(n.value)&&n.value.length===2?n.value:Eb(e==null||(t=e.beforeDisabled)==null?void 0:t.value)?e.beforeDisabled.value:Eb(n.value)?n.value:Eb(e==null||(i=e.afterDisabled)==null?void 0:i.value)?e.afterDisabled.value:Eb(r.disabled?.value)?r.disabled.value:!1})}var Cw=function(e,t){Array.from(e).filter(function(e){return e instanceof HTMLDivElement&&!!e.getAttribute(`draggable`)}).forEach(t)},ww=function(e,t){var n;return Cw(t,function(t){e instanceof Node&&t.contains(e)&&(n=t)}),n};function Tw(e){var t=null,n,r=[],i=function(e){var t=e.target;n=t,t.style.opacity=`0.5`;var r=e.dataTransfer;if(r){r.effectAllowed=`copy`;try{r.setData(`text/plain`,``)}catch{}}},a=function(e){e.target.style.opacity=``},o=function(e){if(t){var n=ww(e.target,t.children),r=e.dataTransfer;r&&(r.dropEffect=n!=null&&n.draggable?`copy`:`none`),n!=null&&n.draggable&&e.preventDefault()}},s=function(e){var i=ww(e.target,t.children);if(i&&i!==n&&i.draggable){var a=i.firstChild;a instanceof HTMLElement&&Object.assign(a.style,{outline:`1px dashed #0052d9`}),r.includes(i)||r.push(i)}},c=function(e){for(var t=e.target,n=0,i=r;no&&(i=t.children[s+1]);var c=e.theme===`card`?o:o-1,l=e.theme===`card`?s:s-1;(a=e.onDragSort)==null||a.call(e,{currentIndex:c,current:e.panels[c].value,targetIndex:l,target:e.panels[l].value})}};function u(e){t=e,t.addEventListener(`dragstart`,i,!1),t.addEventListener(`dragend`,a,!1),t.addEventListener(`dragover`,o,!1),t.addEventListener(`dragenter`,s,!1),document.addEventListener(`dragleave`,c,!1),document.addEventListener(`mousemove`,c,!1),t.addEventListener(`drop`,l,!1)}return zr(function(){t&&(t.removeEventListener(`dragstart`,i),t.removeEventListener(`dragend`,a),t.removeEventListener(`dragover`,o),t.removeEventListener(`dragenter`,s),document.removeEventListener(`dragleave`,c),document.removeEventListener(`mousemove`,c),t.removeEventListener(`drop`,l))}),{setNavsWrap:u}}function Ew(e,t){var n=I(),r=I(!0),i=function(){!t.value||!e.value||n.value||(r.value=!1,n.value=CC(e.value,null,function(){r.value=!0},10))};return Fr(i),t.value&&R([t,e],i),Rr(function(){var r,i;t.value&&((r=n.value)==null||(i=r.unobserve)==null||i.call(r,e.value))}),{showElement:r}}function Dw(e){var t=xC(`icon`).globalConfig,n={};return Object.keys(e).forEach(function(r){n[r]=t.value?.[r]||e[r]}),n}function Ow(e){var t=I(``);return R([e],function(e,n){var r=J(e,1)[0];if(J(n,1)[0]!==r){if(typeof r==`string`){t.value=r;return}BC(r).then(function(e){t.value=e})}},{immediate:!0}),{previewUrl:t}}var kw=mC.expand,Aw=mC.ripple,jw=mC.fade;function Mw(){var e=xC(`animation`).globalConfig,t=function(t){var n,r=e.value;return r&&!((n=r.exclude)!=null&&n.includes(t))&&r.include?.includes(t)};return{keepExpand:t(kw),keepRipple:t(Aw),keepFade:t(jw)}}function Nw(e,t,n){var r=H(function(){return Math.max(n.rowHeight||48,48)}),i=I(!1),a=H(function(){return n?.type===`lazy`&&!i.value}),o=!SS&&window.requestAnimationFrame||function(e){return setTimeout(e,16.6)},s=function(){i.value||o(function(){i.value=!0})};return Fr(function(){n?.type===`lazy`&&Sn(function(){var i=Math.max(10,n.bufferSize||10),a=r.value*i;CC(t.value,e.value,s,a)})}),{hasLazyLoadHolder:a,tRowHeight:r}}function Pw(e,t){Fr(function(){window.addEventListener(e,t)}),Rr(function(){window.removeEventListener(e,t)})}function Fw(e,t){Pw(`resize`,e);var n=null;Fr(function(){!window.ResizeObserver||!t||(n=new window.ResizeObserver(e),n.observe(t))}),Rr(function(){var e;(e=n)==null||e.disconnect()})}var Iw=[`dialog`,`drawer`],Lw=1e3,Rw=5e3,zw=1,Bw=new(WC(function e(){var t=this;GC(this,e),W(this,`popupStack`,{popup:new Set,dialog:new Set,message:new Set,drawer:new Set}),W(this,`zIndexStack`,[]),W(this,`getNextZIndex`,function(e){return(e===`message`?Array.from(t.popupStack.message).pop()||Rw:Array.from(t.popupStack.popup).pop()||Lw)+zw}),W(this,`add`,function(e){var n=t.getNextZIndex(e);return t.popupStack[e].add(n),Iw.includes(e)&&t.popupStack.popup.add(n),t.zIndexStack.push(n),n}),W(this,`delete`,function(e,n){t.popupStack[n].delete(e),Iw.includes(n)&&t.popupStack.popup.delete(e);var r=t.zIndexStack.indexOf(e);r!==-1&&t.zIndexStack.splice(r,1)}),W(this,`isTopInteractivePopup`,function(e,n){return Iw.includes(e)?n===t.zIndexStack[t.zIndexStack.length-1]:t.popupStack[e]?.size>1?n===Array.from(t.popupStack[e]).pop():!0}),W(this,`getLastZIndex`,function(){return t.zIndexStack[t.zIndexStack.length-1]})}));function Vw(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.visible,r=t.runOnMounted,i=I(0),a=function(){i.value=Bw.add(e)},o=function(){Bw.delete(i.value,e)};return R(function(){return n?.value},function(e){e?a():o()},{immediate:!0}),r&&(Fr(function(){a()}),Rr(function(){o()})),{zIndex:Lt(i),open:a,close:o,isTopInteractivePopup:function(){return Iw.includes(e)?Bw.isTopInteractivePopup(e,i.value):!1}}}function Hw(e){var t=Wa(),n=H(function(){return t.props.readonly}),r=Rn(`formReadonly`,Object.create(null));return H(function(){var t,i;return Eb(e==null||(t=e.beforeReadonly)==null?void 0:t.value)?e.beforeReadonly.value:Eb(n?.value)?n.value:Eb(e==null||(i=e.afterReadonly)==null?void 0:i.value)?e.afterReadonly.value:Eb(r.readonly?.value)?r.readonly.value:!1})}function Uw(e,t){if(!(typeof window>`u`)&&window&&window.ResizeObserver){var n=null,r=function(){!n||!e.value||(n.unobserve(e.value),n.disconnect(),n=null)},i=function(e){n=new ResizeObserver(t),n.observe(e)};e&&R(e,function(e){r(),e&&i(e)},{immediate:!0,flush:`post`}),Rr(function(){r()})}}function Ww(e,t){e&&Object.keys(t).forEach(function(n){e.style[n]=t[n]})}var Gw=200,Kw=`rgba(0, 0, 0, 0)`,qw=`rgba(0, 0, 0, 0.35)`,Jw=function(e,t){var n;if(t)return t;if(e!=null&&(n=e.dataset)!=null&&n.ripple)return e.dataset.ripple;if(e instanceof Element){var r=getComputedStyle(e).getPropertyValue(`--ripple-color`);if(r)return r}return qw};function Yw(e,t){var n=I(null),r=Q(),i=Mw().keepRipple,a=function(a){var o=e.value;if(!(!o||!(o instanceof Element))){var s=Jw(o,t?.value);if(!(a.button!==0||!e||!i)&&!(o.classList.contains(`${r.value}-is-active`)||o.classList.contains(`${r.value}-is-disabled`)||o.classList.contains(`${r.value}-is-checked`)||o.classList.contains(`${r.value}-is-loading`))&&o instanceof Element){var c=getComputedStyle(o),l=parseInt(c.borderWidth,10),u=l>0?l:0,d=o.offsetWidth,f=o.offsetHeight;n.value.parentNode===null&&(Ww(n.value,{position:`absolute`,left:`${0-u}px`,top:`${0-u}px`,width:`${d}px`,height:`${f}px`,borderRadius:c.borderRadius,pointerEvents:`none`,overflow:`hidden`}),o.appendChild(n.value));var p=document.createElement(`div`);Ww(p,{marginTop:`0`,marginLeft:`0`,right:`${d}px`,width:`${d+20}px`,height:`100%`,transition:`transform ${Gw}ms cubic-bezier(.38, 0, .24, 1), background ${Gw*2}ms linear`,transform:`skewX(-8deg)`,pointerEvents:`none`,position:`absolute`,zIndex:0,backgroundColor:s,opacity:`0.9`});for(var m=new WeakMap,h=o.children.length,g=0;g4&&arguments[4]!==void 0?arguments[4]:`value`,a=Wa(),o=a.emit,s=a.vnode,c=I(),l=s.props||{},u=Object.prototype.hasOwnProperty.call(l,`modelValue`)||Object.prototype.hasOwnProperty.call(l,`model-value`),d=Object.prototype.hasOwnProperty.call(l,i)||Object.prototype.hasOwnProperty.call(l,Hb(i));return u?[t,function(e){o(`update:modelValue`,e);var t=[...arguments].slice(1);r?.apply(void 0,[e].concat(t))}]:d?[e,function(e){o(`update:${i}`,e);var t=[...arguments].slice(1);r?.apply(void 0,[e].concat(t))}]:(c.value=n,[c,function(e){c.value=e;var t=[...arguments].slice(1);r?.apply(void 0,[e].concat(t))}])}function Qw(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function $w(e){for(var t=1;tu}),p=I(0),m=new Map,h=0,g=0,_=0,v=0,y=0,b=0,x=function(){t.value.forEach(function(e,t){e.$index=t,i&&(d.cachedScrollY[t]=t*o)}),i||(d.cachedScrollY[t.value.length-1]=void 0)};x();var S=H(function(){var e=d.cachedHeight;if(e.length){var n=e.reduce(function(e,t){return e+t||o},0);if(e.length===t.value.length)return n;var r=n/e.length;return n+(t.value.length-e.length)*r}return f.value?t.value.length*o:0}),C=H(function(){var e=d.visibleData,t=e[0];return t?e.length===1?0:d.cachedScrollY[t.$index]:0}),w=function(){b=Math.min(y+h+c*2,t.value.length),d.visibleData=t.value.slice(y,b)},T=function(){var e,r=m.get(_);if(r){var i=r==null||(e=r.getBoundingClientRect())==null?void 0:e.height;d.cachedScrollY[_]=n.value.scrollTop-v,d.cachedHeight[_]=i;for(var a=_+1;a<=(o=d.visibleData[d.visibleData.length-1])?.$index;a++){var o,s=(m.get(a)?.getBoundingClientRect()||{}).height;d.cachedHeight[a]=s;var c=d.cachedScrollY[a-1]+d.cachedHeight[a-1];d.cachedScrollY.splice(a,1,c)}for(var l=_-1;l>=(u=d.visibleData[0])?.$index;l--){var u,f=(m.get(l)?.getBoundingClientRect()||{}).height;d.cachedHeight[l]=f;var p=d.cachedScrollY[l+1]-d.cachedHeight[l];d.cachedScrollY.splice(l,1,p)}if(d.cachedScrollY[0]>0){for(var h=d.cachedScrollY[0],x=Math.min(b,t.value.length),S=0;S=y;i--)i===b-1?d.cachedScrollY.splice(i,1,r.value-d.cachedHeight[i]):d.cachedScrollY.splice(i,1,d.cachedScrollY[i+1]-d.cachedHeight[i])})}},E=function(){if(f.value){var e=n.value.scrollTop,r=e-g;g=e,r+=v;var i=_;if(r){if(r>=0){for(;i(d.cachedHeight[i]||o);)d.cachedHeight[i]||(d.cachedHeight[i]=o),r-=d.cachedHeight[i],i++;i>=t.value.length?(_=t.value.length-1,v=0):(_=i,v=r);var a=n.value,s=a.clientHeight,l=a.scrollHeight;e+s===l&&(_=t.value.length-h+1),y<=_-c&&(y=Math.min(t.value.length-h,_-c),y<0&&(y=0))}else{for(;r<0;)i--,d.cachedHeight[i]||(d.cachedHeight[i]=o),r+=d.cachedHeight[i];i<0?(_=0,v=0):(_=i,v=r),T(),y>_-c&&(y=Math.max(0,_-c))}w()}}};!i&&R(p,T,{flush:`post`});var D=function(){f.value&&p.value++};R(t,function(){x(),d.visibleData=[],d.cachedScrollY=[],d.cachedHeight=[],g=0,_=0,v=0,y=0,m.clear(),t.value.length<=u?d.visibleData=t.value:w(),n.value&&(n.value.scrollTop=0)});var O=!1,k=function(){O&&(h=Math.ceil(n.value.offsetHeight/o),w())};return Fr(function(){if(!(!window||!window.IntersectionObserver)){var e=new window.IntersectionObserver(function(t){var r=t[0];(r.isIntersecting||r.intersectionRatio)&&(O=!0,f.value&&k(),e.unobserve(n.value))});n.value&&e.observe(n.value)}}),$w($w({trs:m,scrollHeight:S},L(d)),{},{translateY:C,handleScroll:E,handleRowMounted:D,refreshContainer:k,fixedHeight:i,calculateScrollY:T})}function tT(e,t){var n=I([]),r=I((t.value.data?.length||0)*(t.value.scroll?.rowHeight||50)),i=I(0),a=[],o=I(0),s=I(0),c=I([0,15]),l=H(function(){var e=t.value.scroll;return e?{bufferSize:e.bufferSize||10,isFixedRowHeight:e.isFixedRowHeight??!1,rowHeight:e.rowHeight||47,threshold:e.threshold||100,type:e.type,fixedRows:e.fixedRows??[0,0]}:{}}),u=H(function(){var e=t.value.data;return l.value.type===`virtual`&&l.value.thresholdn&&c===-1&&(c=f,c-l.value.bufferSize>0&&(s=d-m-Ux(i))),c===-1&&(i.push(m),i.length>l.value.bufferSize&&i.shift()),u===-1&&(d>o.value+n||f===t.value.data.length-1)&&(u=f),c!==-1&&u!==-1)break}var h=Kb([c-l.value.bufferSize,0]),g=Yb([u+l.value.bufferSize,t.value.data.length]),_=Ux(a.slice(0,Math.min(h,r)));return{startIndex:h,endIndex:g,translateY:s-_}}var f=Gx(function(){var e=d(),i=e.startIndex,a=e.endIndex,o=e.translateY,s=l.value.fixedRows,u=J(s,2),f=u[0],p=u[1],m=f?t.value.data.slice(0,f):[];f&&i0&&(h=h.slice(g)),c.value.join()!==[i,a].join()&&i>=0&&(r.value=o,n.value=m.concat(t.value.data.slice(i,a),h),c.value=[i,a])},100),p=function(t){if(!(!u.value||!t||l.value.isFixedRowHeight||!e.value)){var n=t.ref.value?.getBoundingClientRect().height||l.value.rowHeight,r=t.data.VIRTUAL_SCROLL_INDEX;if(a[r]!==n){var o=n-a[r];a[r]=n,i.value+=o}}},m=function(){u.value&&f()},h=function(n){var i=J(n,1)[0].contentRect;t.value.preventResizeRefresh||(Math.abs(i.width-s.value)>16&&e.value&&(e.value.scrollTop=0,r.value=0),s.value=i.width,o.value=i.height)},g=function(e){e.forEach(function(e,t){e.VIRTUAL_SCROLL_INDEX=t})},_=function(t){var n=t.index,r=t.top,i=r===void 0?0:r,o=t.behavior,s=Ux(a.slice(0,n+1))-i;e.value.scrollTo({top:s,behavior:o||`auto`})};return Uw(H(function(){return u.value?e.value:void 0}),h),R(function(){return[U(t.value.data),l.value,u.value,e.value]},function(){if(!(!u.value||!e.value)){var n=t.value.data;if(g(n),o.value=e.value.getBoundingClientRect().height,a.length!==t.value.data.length){var r=Array.from(a);r.length=t.value.data.length,r.fill(l.value.rowHeight||47),a=r}i.value=Ux(a),c.value=[0,0],f()}},{immediate:!0}),R(function(){return o.value},function(){f()}),{visibleData:n,translateY:r,scrollHeight:i,isVirtualScroll:u,handleScroll:m,handleRowMounted:p,scrollToElement:function(e){if(_(e),!l.value.isFixedRowHeight)var t,n=e.time??60,r=setTimeout(function(){_(e),clearTimeout(r)},n)}}}function nT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function rT(e){for(var t=1;t2&&arguments[2]!==void 0?arguments[2]:iT,r=I(rT(rT({},iT),n)),i=null,a=function(){var n;if(e){var a=r.value,o=a.debounceTime,s=o===void 0?0:o,c=a.config,l=c===void 0?iT.config:c,u=function(){var e=[...arguments];t?.apply(void 0,e)};(n=i)==null||n.disconnect(),i=new MutationObserver(s>0?Yy(u,s):u),i.observe(e,l)}};R(function(){return n},function(e){Fb(e,r.value)||(r.value=rT(rT({},iT),e),a())},{deep:!0}),Fr(a),Rr(function(){return i?.disconnect()})}var oT=function(e){if(typeof window>`u`)return``;var t=document?.documentElement;return getComputedStyle(t).getPropertyValue(e).trim()??``};function sT(e){var t={};return Object.entries(e).forEach(function(e){var n=J(e,1)[0];t[n]=I(``)}),Sn(function(){Object.entries(e).forEach(function(e){var n=J(e,2),r=n[0],i=n[1];t[r].value=oT(i)})}),aT(document?.documentElement,function(n){n.some(function(n){return n.type===`attributes`&&n.attributeName===`theme-mode`?(Object.entries(e).forEach(function(e){var n=J(e,2),r=n[0],i=n[1];t[r].value=oT(i)}),!0):!1})}),t}function cT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function lT(e){for(var t=1;t`u`||!navigator)return 2**53-1;var e=navigator.userAgent,t=e.indexOf(`compatible`)>-1&&e.indexOf(`MSIE`)>-1,n=e.indexOf(`Trident`)>-1&&e.indexOf(`rv:11.0`)>-1;if(t){var r=e.match(/MSIE (\d+\.\d+);/);if(!r)return-1;var i=parseFloat(r[1]);return i<7?6:i}return n?11:2**53-1}function _T(){var e,t,n;if(typeof navigator>`u`||!navigator)return!1;var r=navigator.userAgent,i=r.match(/AppleWebKit.+Chrome\/(.+) Safari\/.+/i);if(Number(i==null||(e=i[1])==null?void 0:e.split(`.`)[0])<100)return!0;var a=r.match(/AppleWebKit.+Version\/(.+) Safari\/.+/i);if(Number(a==null||(t=a[1])==null?void 0:t.split(`.`)[0])<12||gT()<=11)return!0;var o=r.match(/Firefox\/(.+)/i);return Number(o==null||(n=o[1])==null?void 0:n.split(`.`)[0])<100}function vT(e,t){var n=Lb(t);if(!e||e.length===0)return n?{length:0,characters:e}:0;for(var r=0,i=0;i127?2:1,n&&r+a>t)return{length:r,characters:e.slice(0,i)};r+=a}return n?{length:r,characters:e}:r}function yT(e){return U(e??``).length}function bT(e,t,n){return U(n??``).slice().length===t?n||``:U(e??``).slice(0,t).join(``)}function xT(e){return Lb(e)?`${e}px`:e}var ST=[`padding-top`,`padding-bottom`,`padding-left`,`padding-right`,`font-family`,`font-weight`,`font-size`,`font-variant`,`text-rendering`,`text-transform`,`width`,`text-indent`,`border-width`,`box-sizing`,`line-height`,`letter-spacing`];function CT(e){if(typeof window>`u`)return{paddingSize:0,borderSize:0,boxSizing:0,sizingStyle:``};var t=window.getComputedStyle(e),n=t.getPropertyValue(`box-sizing`)||t.getPropertyValue(`-moz-box-sizing`)||t.getPropertyValue(`-webkit-box-sizing`);return{paddingSize:parseFloat(t.getPropertyValue(`padding-bottom`))+parseFloat(t.getPropertyValue(`padding-top`)),borderSize:parseFloat(t.getPropertyValue(`border-bottom-width`))+parseFloat(t.getPropertyValue(`border-top-width`)),boxSizing:n,sizingStyle:ST.map(function(e){return`${e}:${t.getPropertyValue(e)}`}).join(`;`)}}function wT(){var e;if(typeof window>`u`)return!1;var t=(e=window)==null||(e=e.navigator)==null?void 0:e.userAgent;return/Safari/.test(t)&&!/Chrome/.test(t)}function TT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function ET(e){for(var t=1;t`u`)){var i=(t=window).getComputedStyle?.call(t,e),a=i?.color||``,o=i?.fontSize||`12px`,s=(n=window)==null||(n=n.navigator)==null?void 0:n.userAgent,c=/Safari/.test(s)&&!/Chrome/.test(s),l=/(?=.*iPhone)[?=.*MicroMessenger]/.test(s)&&!/Chrome/.test(s),u=/(?=.*iPad)[?=.*MicroMessenger]/.test(s)&&!/Chrome/.test(s);if((c||l||u)&&(r={transformOrigin:`0px 0px`,transform:`scale(${parseInt(o,10)/12})`}),a&&gT()>11){var d=a.match(/[\d.]+/g),f=d?`rgba(${d[0]}, ${d[1]}, ${d[2]}, 0)`:``;Ww(e,ET(ET({},r),{},{background:`conic-gradient(from 90deg at 50% 50%,${f} 0deg, ${a} 360deg)`}))}else Ww(e,ET(ET({},r),{},{background:``}))}}var OT=z({name:`TLoadingGradient`,setup:function(){var e=Q(),t=I();return Fr(function(){Sn(function(){DT(t.value)})}),function(){var n=`${e.value}-loading__gradient`;return B(`svg`,{class:[n,`${e.value}-icon-loading`],viewBox:`0 0 12 12`,version:`1.1`,width:`1em`,height:`1em`,xmlns:`http://www.w3.org/2000/svg`},[B(`foreignObject`,{x:`0`,y:`0`,width:`12`,height:`12`},[B(`div`,{class:`${n}-conic`,ref:t},null)])])}}}),kT={attach:{type:[String,Function],default:``},content:{type:[String,Function]},default:{type:[String,Function]},delay:{type:Number,default:0},fullscreen:Boolean,indicator:{type:[Boolean,Function],default:!0},inheritColor:Boolean,loading:{type:Boolean,default:!0},preventScrollThrough:{type:Boolean,default:!0},showOverlay:{type:Boolean,default:!0},size:{type:String,default:`medium`},text:{type:[String,Function]},zIndex:{type:Number}},AT=function(){return{name:Q(`loading`),centerClass:Q(`loading--center`),fullscreenClass:Q(`loading__fullscreen`),lockClass:Q(`loading--lock`),overlayClass:Q(`loading__overlay`),relativeClass:Q(`loading__parent`),fullClass:Q(`loading--full`),inheritColorClass:Q(`loading--inherit-color`)}},jT=z({name:`TLoading`,inheritAttrs:!1,props:kT,setup:function(e,t){var n=t.slots,r=t.attrs,i=I(!1),a=AT(),o=a.name,s=a.centerClass,c=a.fullscreenClass,l=a.lockClass,u=a.overlayClass,d=a.relativeClass,f=a.fullClass,p=a.inheritColorClass,m=Q(),h=Z(),g=mw(),_=vw().SIZE,v=function(){i.value=!1;var t=setTimeout(function(){i.value=!0,clearTimeout(t)},e.delay)},y=Xw(function(){return e.attach}),b=H(function(){return!!(!e.delay||e.delay&&i.value)}),x=H(function(){var t={};return e.zIndex!==void 0&&(t.zIndex=e.zIndex),[`small`,`medium`,`large`].includes(e.size)||(t[`font-size`]=e.size),t}),S=H(function(){return!!(e.default||n.default||e.content||n.content)}),C=H(function(){return e.preventScrollThrough&&e.fullscreen}),w=H(function(){return!!(e.text||n.text)}),T=H(function(){return S.value&&e.loading&&b.value}),E=H(function(){return e.fullscreen&&e.loading&&b.value}),D=H(function(){return e.attach&&e.loading&&b.value}),O=H(function(){var t=[s.value,lw(_.value,e.size),W({},p.value,e.inheritColor)],n=[o.value,c.value,s.value,u.value];return{baseClasses:t,attachClasses:t.concat([o.value,f.value,W({},u.value,e.showOverlay)]),withContentClasses:t.concat([o.value,f.value,W({},u.value,e.showOverlay)]),fullScreenClasses:n,normalClasses:t.concat([o.value])}}),k=L(e).loading;return R([k],function(e){J(e,1)[0]?(v(),C.value&&OS(document.body,l.value)):C.value&&kS(document.body,l.value)}),Fr(function(){e.delay&&v()}),function(){var t=O.value,n=t.fullScreenClasses,i=t.baseClasses,a=t.withContentClasses,o=t.attachClasses,s=t.normalClasses,c=B(OT,null,null),l=k.value&&h(`indicator`,c),u=w.value&&B(`div`,{class:`${m.value}-loading__text`},[h(`text`)]);return e.fullscreen?!E.value||!e.loading?null:B(rr,{disabled:!e.attach||!y.value,to:y.value},{default:function(){return[B(`div`,V({class:n,style:x.value},r),[B(`div`,{class:i},[l,u])])]}}):S.value?B(`div`,V({class:d.value},r),[g(`default`,`content`),T.value&&B(`div`,{class:a,style:x.value},[l,u])]):e.attach?!D.value||!k.value?null:B(rr,{disabled:!e.attach||!y.value,to:y.value},{default:function(){return[B(`div`,V({class:o,style:x.value},r),[l,u])]}}):k.value?B(`div`,V({class:s,style:x.value},r),[l,u]):null}}}),MT=null;function NT(e){return Jb({fullscreen:!1,attach:`body`,loading:!0,preventScrollThrough:!0},e)}function PT(e,t){var n=NT(e);if(n.fullscreen&&MT)return MT;var r=I(``),i=I(``),a=z({setup:function(){var e=Ft(n);return r.value=Q(`loading__parent--relative`).value,i.value=Q(`loading--lock`).value,function(){return co(jT,e)}}}),o=AS(n.fullscreen?`body`:n.attach),s=B(a);(t??IT._context)&&(s.appContext=t??IT._context);var c=document.createElement(`div`);return Rs(s,c),n.preventScrollThrough&&n.fullscreen&&OS(document.body,i.value),o?OS(o,r.value):console.error(`attach is not exist`),{hide:function(){kS(o,r.value),kS(document.body,i.value),Rs(null,c),c.remove()}}}function FT(e,t){if(e===!0)return MT=PT({fullscreen:!0,loading:!0,attach:`body`,preventScrollThrough:!0},t),MT;if(e===!1){var n;(n=MT)==null||n.hide(),MT=null;return}return PT(e)}var IT=FT;IT.install=function(e){e.config.globalProperties.$loading=FT,IT._context=e._context};var LT=Symbol(`TdLoading`),RT=function(e,t){var n=t.modifiers,r=n.fullscreen,i=n.inheritColor,a={attach:function(){return e},fullscreen:r??!1,inheritColor:i??!1,loading:t.value};Bd(t.value)&&Wb(t.value,function(e,t){a[t]=e}),e[LT]={options:a,instance:IT(a)}},zT={mounted:function(e,t){t.value&&RT(e,t)},updated:function(e,t){var n=e[LT],r=t.value,i=t.oldValue;Fb(r,i)||(r?.loading??r?RT(e,t):n?.instance.hide())},unmounted:function(e){var t;(t=e[LT])==null||t.instance.hide()}},BT=Y(jT,jT.name,{name:`loading`,comp:zT}),VT={block:Boolean,content:{type:[String,Function]},default:{type:[String,Function]},disabled:{type:Boolean,default:void 0},form:{type:String,default:void 0},ghost:Boolean,href:{type:String,default:``},icon:{type:Function},loading:Boolean,loadingProps:{type:Object},shape:{type:String,default:`rectangle`,validator:function(e){return e?[`rectangle`,`square`,`round`,`circle`].includes(e):!0}},size:{type:String,default:`medium`,validator:function(e){return e?[`extra-small`,`small`,`medium`,`large`].includes(e):!0}},suffix:{type:Function},tag:{type:String,validator:function(e){return e?[`button`,`a`,`div`].includes(e):!0}},theme:{type:String,validator:function(e){return e?[`default`,`primary`,`danger`,`warning`,`success`].includes(e):!0}},type:{type:String,default:`button`,validator:function(e){return e?[`submit`,`reset`,`button`].includes(e):!0}},variant:{type:String,default:`base`,validator:function(e){return e?[`base`,`outline`,`dashed`,`text`].includes(e):!0}},onClick:Function};function HT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function UT(e){for(var t=1;t[`strokeLinecap`,`fillRule`,`clipRule`,`strokeWidth`].includes(e)?e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g,`$1-$2`).toLowerCase():e,ZT=(e,t)=>{var n={};if(e.attrs)for(var[r,i]of Object.entries(e.attrs))if(typeof i==`string`&&i.startsWith(`props.`)){var a=i.split(`.`)[1];n[XT(r)]=t[a]}else n[XT(r)]=i;e.tag===`svg`&&(n.class=t.class,n.style=t.style,n.onClick=t.onClick);var o=e.children?e.children.map(e=>ZT(e,t)):[];return co(e.tag,n,o)},QT={classPrefix:`t`,locale:`zh-CN`};function $T(){var{classPrefix:e}=QT;return{SIZE:{default:``,xs:`${e}-size-xs`,small:`${e}-size-s`,medium:`${e}-size-m`,large:`${e}-size-l`,xl:`${e}-size-xl`,block:`${e}-size-full-width`},STATUS:{loading:`${e}-is-loading`,disabled:`${e}-is-disabled`,focused:`${e}-is-focused`,success:`${e}-is-success`,error:`${e}-is-error`,warning:`${e}-is-warning`,selected:`${e}-is-selected`,active:`${e}-is-active`,checked:`${e}-is-checked`,current:`${e}-is-current`,hidden:`${e}-is-hidden`,visible:`${e}-is-visible`,expanded:`${e}-is-expanded`,indeterminate:`${e}-is-indeterminate`}}}function eE(e){var t=$T().SIZE,n=H(()=>e.value in t?t[e.value]:``);return{style:H(()=>e.value===void 0||e.value in t?{}:{fontSize:e.value}),className:n}}function tE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function nE(e){for(var t=1;te.size),i=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[0]:e.strokeColor:`currentColor`),a=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[1]??e.strokeColor[0]:e.strokeColor:`currentColor`),o=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`transparent`),s=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[1]??e.fillColor[0]:e.fillColor:`transparent`),c=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`currentColor`),{className:l,style:u}=eE(r),d=H(()=>[`t-icon`,`t-icon-add-rectangle`,l.value]),f=H(()=>nE(nE({fill:`none`},u.value),n.style)),p=H(()=>({class:d.value,style:f.value,onClick:t=>e.onClick?.call(e,{e:t}),strokeColor1:i.value,strokeColor2:a.value,fillColor1:o.value,fillColor2:s.value,strokeWidth:e.strokeWidth||2,filledColor:c.value}));return()=>ZT(rE,p.value)}});function aE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function oE(e){for(var t=1;te.size),i=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[0]:e.strokeColor:`currentColor`),a=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[1]??e.strokeColor[0]:e.strokeColor:`currentColor`),o=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`transparent`),s=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[1]??e.fillColor[0]:e.fillColor:`transparent`),c=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`currentColor`),{className:l,style:u}=eE(r),d=H(()=>[`t-icon`,`t-icon-add`,l.value]),f=H(()=>oE(oE({fill:`none`},u.value),n.style)),p=H(()=>({class:d.value,style:f.value,onClick:t=>e.onClick?.call(e,{e:t}),strokeColor1:i.value,strokeColor2:a.value,fillColor1:o.value,fillColor2:s.value,strokeWidth:e.strokeWidth||2,filledColor:c.value}));return()=>ZT(sE,p.value)}});function lE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function uE(e){for(var t=1;te.size),i=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[0]:e.strokeColor:`currentColor`),a=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[1]??e.strokeColor[0]:e.strokeColor:`currentColor`),o=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`transparent`),s=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[1]??e.fillColor[0]:e.fillColor:`transparent`),c=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`currentColor`),{className:l,style:u}=eE(r),d=H(()=>[`t-icon`,`t-icon-arrow-triangle-down-filled`,l.value]),f=H(()=>uE(uE({fill:`none`},u.value),n.style)),p=H(()=>({class:d.value,style:f.value,onClick:t=>e.onClick?.call(e,{e:t}),strokeColor1:i.value,strokeColor2:a.value,fillColor1:o.value,fillColor2:s.value,strokeWidth:e.strokeWidth||2,filledColor:c.value}));return()=>ZT(dE,p.value)}});function pE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function mE(e){for(var t=1;te.size),i=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[0]:e.strokeColor:`currentColor`),a=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[1]??e.strokeColor[0]:e.strokeColor:`currentColor`),o=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`transparent`),s=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[1]??e.fillColor[0]:e.fillColor:`transparent`),c=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`currentColor`),{className:l,style:u}=eE(r),d=H(()=>[`t-icon`,`t-icon-arrow-triangle-up-filled`,l.value]),f=H(()=>mE(mE({fill:`none`},u.value),n.style)),p=H(()=>({class:d.value,style:f.value,onClick:t=>e.onClick?.call(e,{e:t}),strokeColor1:i.value,strokeColor2:a.value,fillColor1:o.value,fillColor2:s.value,strokeWidth:e.strokeWidth||2,filledColor:c.value}));return()=>ZT(hE,p.value)}});function _E(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function vE(e){for(var t=1;te.size),i=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[0]:e.strokeColor:`currentColor`),a=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[1]??e.strokeColor[0]:e.strokeColor:`currentColor`),o=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`transparent`),s=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[1]??e.fillColor[0]:e.fillColor:`transparent`),c=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`currentColor`),{className:l,style:u}=eE(r),d=H(()=>[`t-icon`,`t-icon-backtop`,l.value]),f=H(()=>vE(vE({fill:`none`},u.value),n.style)),p=H(()=>({class:d.value,style:f.value,onClick:t=>e.onClick?.call(e,{e:t}),strokeColor1:i.value,strokeColor2:a.value,fillColor1:o.value,fillColor2:s.value,strokeWidth:e.strokeWidth||2,filledColor:c.value}));return()=>ZT(yE,p.value)}});function xE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function SE(e){for(var t=1;te.size),i=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[0]:e.strokeColor:`currentColor`),a=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[1]??e.strokeColor[0]:e.strokeColor:`currentColor`),o=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`transparent`),s=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[1]??e.fillColor[0]:e.fillColor:`transparent`),c=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`currentColor`),{className:l,style:u}=eE(r),d=H(()=>[`t-icon`,`t-icon-browse-off`,l.value]),f=H(()=>SE(SE({fill:`none`},u.value),n.style)),p=H(()=>({class:d.value,style:f.value,onClick:t=>e.onClick?.call(e,{e:t}),strokeColor1:i.value,strokeColor2:a.value,fillColor1:o.value,fillColor2:s.value,strokeWidth:e.strokeWidth||2,filledColor:c.value}));return()=>ZT(CE,p.value)}});function TE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function EE(e){for(var t=1;te.size),i=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[0]:e.strokeColor:`currentColor`),a=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[1]??e.strokeColor[0]:e.strokeColor:`currentColor`),o=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`transparent`),s=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[1]??e.fillColor[0]:e.fillColor:`transparent`),c=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`currentColor`),{className:l,style:u}=eE(r),d=H(()=>[`t-icon`,`t-icon-browse`,l.value]),f=H(()=>EE(EE({fill:`none`},u.value),n.style)),p=H(()=>({class:d.value,style:f.value,onClick:t=>e.onClick?.call(e,{e:t}),strokeColor1:i.value,strokeColor2:a.value,fillColor1:o.value,fillColor2:s.value,strokeWidth:e.strokeWidth||2,filledColor:c.value}));return()=>ZT(DE,p.value)}});function kE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function AE(e){for(var t=1;te.size),i=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[0]:e.strokeColor:`currentColor`),a=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[1]??e.strokeColor[0]:e.strokeColor:`currentColor`),o=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`transparent`),s=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[1]??e.fillColor[0]:e.fillColor:`transparent`),c=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`currentColor`),{className:l,style:u}=eE(r),d=H(()=>[`t-icon`,`t-icon-calendar`,l.value]),f=H(()=>AE(AE({fill:`none`},u.value),n.style)),p=H(()=>({class:d.value,style:f.value,onClick:t=>e.onClick?.call(e,{e:t}),strokeColor1:i.value,strokeColor2:a.value,fillColor1:o.value,fillColor2:s.value,strokeWidth:e.strokeWidth||2,filledColor:c.value}));return()=>ZT(jE,p.value)}});function NE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function PE(e){for(var t=1;te.size),i=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[0]:e.strokeColor:`currentColor`),a=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[1]??e.strokeColor[0]:e.strokeColor:`currentColor`),o=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`transparent`),s=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[1]??e.fillColor[0]:e.fillColor:`transparent`),c=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`currentColor`),{className:l,style:u}=eE(r),d=H(()=>[`t-icon`,`t-icon-caret-right-small`,l.value]),f=H(()=>PE(PE({fill:`none`},u.value),n.style)),p=H(()=>({class:d.value,style:f.value,onClick:t=>e.onClick?.call(e,{e:t}),strokeColor1:i.value,strokeColor2:a.value,fillColor1:o.value,fillColor2:s.value,strokeWidth:e.strokeWidth||2,filledColor:c.value}));return()=>ZT(FE,p.value)}});function LE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function RE(e){for(var t=1;te.size),i=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[0]:e.strokeColor:`currentColor`),a=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[1]??e.strokeColor[0]:e.strokeColor:`currentColor`),o=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`transparent`),s=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[1]??e.fillColor[0]:e.fillColor:`transparent`),c=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`currentColor`),{className:l,style:u}=eE(r),d=H(()=>[`t-icon`,`t-icon-check-circle-filled`,l.value]),f=H(()=>RE(RE({fill:`none`},u.value),n.style)),p=H(()=>({class:d.value,style:f.value,onClick:t=>e.onClick?.call(e,{e:t}),strokeColor1:i.value,strokeColor2:a.value,fillColor1:o.value,fillColor2:s.value,strokeWidth:e.strokeWidth||2,filledColor:c.value}));return()=>ZT(zE,p.value)}});function VE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function HE(e){for(var t=1;te.size),i=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[0]:e.strokeColor:`currentColor`),a=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[1]??e.strokeColor[0]:e.strokeColor:`currentColor`),o=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`transparent`),s=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[1]??e.fillColor[0]:e.fillColor:`transparent`),c=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`currentColor`),{className:l,style:u}=eE(r),d=H(()=>[`t-icon`,`t-icon-check`,l.value]),f=H(()=>HE(HE({fill:`none`},u.value),n.style)),p=H(()=>({class:d.value,style:f.value,onClick:t=>e.onClick?.call(e,{e:t}),strokeColor1:i.value,strokeColor2:a.value,fillColor1:o.value,fillColor2:s.value,strokeWidth:e.strokeWidth||2,filledColor:c.value}));return()=>ZT(UE,p.value)}});function GE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function KE(e){for(var t=1;te.size),i=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[0]:e.strokeColor:`currentColor`),a=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[1]??e.strokeColor[0]:e.strokeColor:`currentColor`),o=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`transparent`),s=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[1]??e.fillColor[0]:e.fillColor:`transparent`),c=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`currentColor`),{className:l,style:u}=eE(r),d=H(()=>[`t-icon`,`t-icon-chevron-down`,l.value]),f=H(()=>KE(KE({fill:`none`},u.value),n.style)),p=H(()=>({class:d.value,style:f.value,onClick:t=>e.onClick?.call(e,{e:t}),strokeColor1:i.value,strokeColor2:a.value,fillColor1:o.value,fillColor2:s.value,strokeWidth:e.strokeWidth||2,filledColor:c.value}));return()=>ZT(qE,p.value)}});function YE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function XE(e){for(var t=1;te.size),i=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[0]:e.strokeColor:`currentColor`),a=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[1]??e.strokeColor[0]:e.strokeColor:`currentColor`),o=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`transparent`),s=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[1]??e.fillColor[0]:e.fillColor:`transparent`),c=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`currentColor`),{className:l,style:u}=eE(r),d=H(()=>[`t-icon`,`t-icon-chevron-left-double`,l.value]),f=H(()=>XE(XE({fill:`none`},u.value),n.style)),p=H(()=>({class:d.value,style:f.value,onClick:t=>e.onClick?.call(e,{e:t}),strokeColor1:i.value,strokeColor2:a.value,fillColor1:o.value,fillColor2:s.value,strokeWidth:e.strokeWidth||2,filledColor:c.value}));return()=>ZT(ZE,p.value)}});function $E(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function eD(e){for(var t=1;te.size),i=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[0]:e.strokeColor:`currentColor`),a=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[1]??e.strokeColor[0]:e.strokeColor:`currentColor`),o=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`transparent`),s=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[1]??e.fillColor[0]:e.fillColor:`transparent`),c=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`currentColor`),{className:l,style:u}=eE(r),d=H(()=>[`t-icon`,`t-icon-chevron-left`,l.value]),f=H(()=>eD(eD({fill:`none`},u.value),n.style)),p=H(()=>({class:d.value,style:f.value,onClick:t=>e.onClick?.call(e,{e:t}),strokeColor1:i.value,strokeColor2:a.value,fillColor1:o.value,fillColor2:s.value,strokeWidth:e.strokeWidth||2,filledColor:c.value}));return()=>ZT(tD,p.value)}});function rD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function iD(e){for(var t=1;te.size),i=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[0]:e.strokeColor:`currentColor`),a=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[1]??e.strokeColor[0]:e.strokeColor:`currentColor`),o=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`transparent`),s=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[1]??e.fillColor[0]:e.fillColor:`transparent`),c=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`currentColor`),{className:l,style:u}=eE(r),d=H(()=>[`t-icon`,`t-icon-chevron-right-circle`,l.value]),f=H(()=>iD(iD({fill:`none`},u.value),n.style)),p=H(()=>({class:d.value,style:f.value,onClick:t=>e.onClick?.call(e,{e:t}),strokeColor1:i.value,strokeColor2:a.value,fillColor1:o.value,fillColor2:s.value,strokeWidth:e.strokeWidth||2,filledColor:c.value}));return()=>ZT(aD,p.value)}});function sD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function cD(e){for(var t=1;te.size),i=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[0]:e.strokeColor:`currentColor`),a=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[1]??e.strokeColor[0]:e.strokeColor:`currentColor`),o=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`transparent`),s=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[1]??e.fillColor[0]:e.fillColor:`transparent`),c=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`currentColor`),{className:l,style:u}=eE(r),d=H(()=>[`t-icon`,`t-icon-chevron-right-double`,l.value]),f=H(()=>cD(cD({fill:`none`},u.value),n.style)),p=H(()=>({class:d.value,style:f.value,onClick:t=>e.onClick?.call(e,{e:t}),strokeColor1:i.value,strokeColor2:a.value,fillColor1:o.value,fillColor2:s.value,strokeWidth:e.strokeWidth||2,filledColor:c.value}));return()=>ZT(lD,p.value)}});function dD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function fD(e){for(var t=1;te.size),i=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[0]:e.strokeColor:`currentColor`),a=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[1]??e.strokeColor[0]:e.strokeColor:`currentColor`),o=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`transparent`),s=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[1]??e.fillColor[0]:e.fillColor:`transparent`),c=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`currentColor`),{className:l,style:u}=eE(r),d=H(()=>[`t-icon`,`t-icon-chevron-right`,l.value]),f=H(()=>fD(fD({fill:`none`},u.value),n.style)),p=H(()=>({class:d.value,style:f.value,onClick:t=>e.onClick?.call(e,{e:t}),strokeColor1:i.value,strokeColor2:a.value,fillColor1:o.value,fillColor2:s.value,strokeWidth:e.strokeWidth||2,filledColor:c.value}));return()=>ZT(pD,p.value)}});function hD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function gD(e){for(var t=1;te.size),i=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[0]:e.strokeColor:`currentColor`),a=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[1]??e.strokeColor[0]:e.strokeColor:`currentColor`),o=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`transparent`),s=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[1]??e.fillColor[0]:e.fillColor:`transparent`),c=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`currentColor`),{className:l,style:u}=eE(r),d=H(()=>[`t-icon`,`t-icon-chevron-up`,l.value]),f=H(()=>gD(gD({fill:`none`},u.value),n.style)),p=H(()=>({class:d.value,style:f.value,onClick:t=>e.onClick?.call(e,{e:t}),strokeColor1:i.value,strokeColor2:a.value,fillColor1:o.value,fillColor2:s.value,strokeWidth:e.strokeWidth||2,filledColor:c.value}));return()=>ZT(_D,p.value)}});function yD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function bD(e){for(var t=1;te.size),i=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[0]:e.strokeColor:`currentColor`),a=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[1]??e.strokeColor[0]:e.strokeColor:`currentColor`),o=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`transparent`),s=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[1]??e.fillColor[0]:e.fillColor:`transparent`),c=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`currentColor`),{className:l,style:u}=eE(r),d=H(()=>[`t-icon`,`t-icon-close-circle-filled`,l.value]),f=H(()=>bD(bD({fill:`none`},u.value),n.style)),p=H(()=>({class:d.value,style:f.value,onClick:t=>e.onClick?.call(e,{e:t}),strokeColor1:i.value,strokeColor2:a.value,fillColor1:o.value,fillColor2:s.value,strokeWidth:e.strokeWidth||2,filledColor:c.value}));return()=>ZT(xD,p.value)}});function CD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function wD(e){for(var t=1;te.size),i=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[0]:e.strokeColor:`currentColor`),a=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[1]??e.strokeColor[0]:e.strokeColor:`currentColor`),o=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`transparent`),s=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[1]??e.fillColor[0]:e.fillColor:`transparent`),c=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`currentColor`),{className:l,style:u}=eE(r),d=H(()=>[`t-icon`,`t-icon-close`,l.value]),f=H(()=>wD(wD({fill:`none`},u.value),n.style)),p=H(()=>({class:d.value,style:f.value,onClick:t=>e.onClick?.call(e,{e:t}),strokeColor1:i.value,strokeColor2:a.value,fillColor1:o.value,fillColor2:s.value,strokeWidth:e.strokeWidth||2,filledColor:c.value}));return()=>ZT(TD,p.value)}});function DD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function OD(e){for(var t=1;te.size),i=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[0]:e.strokeColor:`currentColor`),a=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[1]??e.strokeColor[0]:e.strokeColor:`currentColor`),o=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`transparent`),s=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[1]??e.fillColor[0]:e.fillColor:`transparent`),c=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`currentColor`),{className:l,style:u}=eE(r),d=H(()=>[`t-icon`,`t-icon-copy`,l.value]),f=H(()=>OD(OD({fill:`none`},u.value),n.style)),p=H(()=>({class:d.value,style:f.value,onClick:t=>e.onClick?.call(e,{e:t}),strokeColor1:i.value,strokeColor2:a.value,fillColor1:o.value,fillColor2:s.value,strokeWidth:e.strokeWidth||2,filledColor:c.value}));return()=>ZT(kD,p.value)}});function jD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function MD(e){for(var t=1;te.size),i=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[0]:e.strokeColor:`currentColor`),a=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[1]??e.strokeColor[0]:e.strokeColor:`currentColor`),o=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`transparent`),s=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[1]??e.fillColor[0]:e.fillColor:`transparent`),c=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`currentColor`),{className:l,style:u}=eE(r),d=H(()=>[`t-icon`,`t-icon-delete`,l.value]),f=H(()=>MD(MD({fill:`none`},u.value),n.style)),p=H(()=>({class:d.value,style:f.value,onClick:t=>e.onClick?.call(e,{e:t}),strokeColor1:i.value,strokeColor2:a.value,fillColor1:o.value,fillColor2:s.value,strokeWidth:e.strokeWidth||2,filledColor:c.value}));return()=>ZT(ND,p.value)}});function FD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function ID(e){for(var t=1;te.size),i=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[0]:e.strokeColor:`currentColor`),a=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[1]??e.strokeColor[0]:e.strokeColor:`currentColor`),o=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`transparent`),s=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[1]??e.fillColor[0]:e.fillColor:`transparent`),c=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`currentColor`),{className:l,style:u}=eE(r),d=H(()=>[`t-icon`,`t-icon-download`,l.value]),f=H(()=>ID(ID({fill:`none`},u.value),n.style)),p=H(()=>({class:d.value,style:f.value,onClick:t=>e.onClick?.call(e,{e:t}),strokeColor1:i.value,strokeColor2:a.value,fillColor1:o.value,fillColor2:s.value,strokeWidth:e.strokeWidth||2,filledColor:c.value}));return()=>ZT(LD,p.value)}});function zD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function BD(e){for(var t=1;te.size),i=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[0]:e.strokeColor:`currentColor`),a=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[1]??e.strokeColor[0]:e.strokeColor:`currentColor`),o=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`transparent`),s=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[1]??e.fillColor[0]:e.fillColor:`transparent`),c=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`currentColor`),{className:l,style:u}=eE(r),d=H(()=>[`t-icon`,`t-icon-edit-1`,l.value]),f=H(()=>BD(BD({fill:`none`},u.value),n.style)),p=H(()=>({class:d.value,style:f.value,onClick:t=>e.onClick?.call(e,{e:t}),strokeColor1:i.value,strokeColor2:a.value,fillColor1:o.value,fillColor2:s.value,strokeWidth:e.strokeWidth||2,filledColor:c.value}));return()=>ZT(VD,p.value)}});function UD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function WD(e){for(var t=1;te.size),i=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[0]:e.strokeColor:`currentColor`),a=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[1]??e.strokeColor[0]:e.strokeColor:`currentColor`),o=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`transparent`),s=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[1]??e.fillColor[0]:e.fillColor:`transparent`),c=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`currentColor`),{className:l,style:u}=eE(r),d=H(()=>[`t-icon`,`t-icon-ellipsis`,l.value]),f=H(()=>WD(WD({fill:`none`},u.value),n.style)),p=H(()=>({class:d.value,style:f.value,onClick:t=>e.onClick?.call(e,{e:t}),strokeColor1:i.value,strokeColor2:a.value,fillColor1:o.value,fillColor2:s.value,strokeWidth:e.strokeWidth||2,filledColor:c.value}));return()=>ZT(GD,p.value)}});function qD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function JD(e){for(var t=1;te.size),i=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[0]:e.strokeColor:`currentColor`),a=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[1]??e.strokeColor[0]:e.strokeColor:`currentColor`),o=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`transparent`),s=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[1]??e.fillColor[0]:e.fillColor:`transparent`),c=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`currentColor`),{className:l,style:u}=eE(r),d=H(()=>[`t-icon`,`t-icon-error-circle-filled`,l.value]),f=H(()=>JD(JD({fill:`none`},u.value),n.style)),p=H(()=>({class:d.value,style:f.value,onClick:t=>e.onClick?.call(e,{e:t}),strokeColor1:i.value,strokeColor2:a.value,fillColor1:o.value,fillColor2:s.value,strokeWidth:e.strokeWidth||2,filledColor:c.value}));return()=>ZT(YD,p.value)}});function ZD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function QD(e){for(var t=1;te.size),i=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[0]:e.strokeColor:`currentColor`),a=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[1]??e.strokeColor[0]:e.strokeColor:`currentColor`),o=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`transparent`),s=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[1]??e.fillColor[0]:e.fillColor:`transparent`),c=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`currentColor`),{className:l,style:u}=eE(r),d=H(()=>[`t-icon`,`t-icon-error`,l.value]),f=H(()=>QD(QD({fill:`none`},u.value),n.style)),p=H(()=>({class:d.value,style:f.value,onClick:t=>e.onClick?.call(e,{e:t}),strokeColor1:i.value,strokeColor2:a.value,fillColor1:o.value,fillColor2:s.value,strokeWidth:e.strokeWidth||2,filledColor:c.value}));return()=>ZT($D,p.value)}});function tO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function nO(e){for(var t=1;te.size),i=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[0]:e.strokeColor:`currentColor`),a=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[1]??e.strokeColor[0]:e.strokeColor:`currentColor`),o=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`transparent`),s=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[1]??e.fillColor[0]:e.fillColor:`transparent`),c=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`currentColor`),{className:l,style:u}=eE(r),d=H(()=>[`t-icon`,`t-icon-file-copy`,l.value]),f=H(()=>nO(nO({fill:`none`},u.value),n.style)),p=H(()=>({class:d.value,style:f.value,onClick:t=>e.onClick?.call(e,{e:t}),strokeColor1:i.value,strokeColor2:a.value,fillColor1:o.value,fillColor2:s.value,strokeWidth:e.strokeWidth||2,filledColor:c.value}));return()=>ZT(rO,p.value)}});function aO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function oO(e){for(var t=1;te.size),i=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[0]:e.strokeColor:`currentColor`),a=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[1]??e.strokeColor[0]:e.strokeColor:`currentColor`),o=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`transparent`),s=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[1]??e.fillColor[0]:e.fillColor:`transparent`),c=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`currentColor`),{className:l,style:u}=eE(r),d=H(()=>[`t-icon`,`t-icon-file-excel`,l.value]),f=H(()=>oO(oO({fill:`none`},u.value),n.style)),p=H(()=>({class:d.value,style:f.value,onClick:t=>e.onClick?.call(e,{e:t}),strokeColor1:i.value,strokeColor2:a.value,fillColor1:o.value,fillColor2:s.value,strokeWidth:e.strokeWidth||2,filledColor:c.value}));return()=>ZT(sO,p.value)}});function lO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function uO(e){for(var t=1;te.size),i=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[0]:e.strokeColor:`currentColor`),a=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[1]??e.strokeColor[0]:e.strokeColor:`currentColor`),o=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`transparent`),s=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[1]??e.fillColor[0]:e.fillColor:`transparent`),c=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`currentColor`),{className:l,style:u}=eE(r),d=H(()=>[`t-icon`,`t-icon-file-pdf`,l.value]),f=H(()=>uO(uO({fill:`none`},u.value),n.style)),p=H(()=>({class:d.value,style:f.value,onClick:t=>e.onClick?.call(e,{e:t}),strokeColor1:i.value,strokeColor2:a.value,fillColor1:o.value,fillColor2:s.value,strokeWidth:e.strokeWidth||2,filledColor:c.value}));return()=>ZT(dO,p.value)}});function pO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function mO(e){for(var t=1;te.size),i=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[0]:e.strokeColor:`currentColor`),a=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[1]??e.strokeColor[0]:e.strokeColor:`currentColor`),o=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`transparent`),s=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[1]??e.fillColor[0]:e.fillColor:`transparent`),c=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`currentColor`),{className:l,style:u}=eE(r),d=H(()=>[`t-icon`,`t-icon-file-powerpoint`,l.value]),f=H(()=>mO(mO({fill:`none`},u.value),n.style)),p=H(()=>({class:d.value,style:f.value,onClick:t=>e.onClick?.call(e,{e:t}),strokeColor1:i.value,strokeColor2:a.value,fillColor1:o.value,fillColor2:s.value,strokeWidth:e.strokeWidth||2,filledColor:c.value}));return()=>ZT(hO,p.value)}});function _O(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function vO(e){for(var t=1;te.size),i=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[0]:e.strokeColor:`currentColor`),a=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[1]??e.strokeColor[0]:e.strokeColor:`currentColor`),o=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`transparent`),s=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[1]??e.fillColor[0]:e.fillColor:`transparent`),c=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`currentColor`),{className:l,style:u}=eE(r),d=H(()=>[`t-icon`,`t-icon-file-word`,l.value]),f=H(()=>vO(vO({fill:`none`},u.value),n.style)),p=H(()=>({class:d.value,style:f.value,onClick:t=>e.onClick?.call(e,{e:t}),strokeColor1:i.value,strokeColor2:a.value,fillColor1:o.value,fillColor2:s.value,strokeWidth:e.strokeWidth||2,filledColor:c.value}));return()=>ZT(yO,p.value)}});function xO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function SO(e){for(var t=1;te.size),i=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[0]:e.strokeColor:`currentColor`),a=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[1]??e.strokeColor[0]:e.strokeColor:`currentColor`),o=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`transparent`),s=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[1]??e.fillColor[0]:e.fillColor:`transparent`),c=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`currentColor`),{className:l,style:u}=eE(r),d=H(()=>[`t-icon`,`t-icon-file`,l.value]),f=H(()=>SO(SO({fill:`none`},u.value),n.style)),p=H(()=>({class:d.value,style:f.value,onClick:t=>e.onClick?.call(e,{e:t}),strokeColor1:i.value,strokeColor2:a.value,fillColor1:o.value,fillColor2:s.value,strokeWidth:e.strokeWidth||2,filledColor:c.value}));return()=>ZT(CO,p.value)}});function TO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function EO(e){for(var t=1;te.size),i=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[0]:e.strokeColor:`currentColor`),a=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[1]??e.strokeColor[0]:e.strokeColor:`currentColor`),o=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`transparent`),s=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[1]??e.fillColor[0]:e.fillColor:`transparent`),c=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`currentColor`),{className:l,style:u}=eE(r),d=H(()=>[`t-icon`,`t-icon-filter`,l.value]),f=H(()=>EO(EO({fill:`none`},u.value),n.style)),p=H(()=>({class:d.value,style:f.value,onClick:t=>e.onClick?.call(e,{e:t}),strokeColor1:i.value,strokeColor2:a.value,fillColor1:o.value,fillColor2:s.value,strokeWidth:e.strokeWidth||2,filledColor:c.value}));return()=>ZT(DO,p.value)}});function kO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function AO(e){for(var t=1;te.size),i=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[0]:e.strokeColor:`currentColor`),a=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[1]??e.strokeColor[0]:e.strokeColor:`currentColor`),o=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`transparent`),s=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[1]??e.fillColor[0]:e.fillColor:`transparent`),c=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`currentColor`),{className:l,style:u}=eE(r),d=H(()=>[`t-icon`,`t-icon-help-circle-filled`,l.value]),f=H(()=>AO(AO({fill:`none`},u.value),n.style)),p=H(()=>({class:d.value,style:f.value,onClick:t=>e.onClick?.call(e,{e:t}),strokeColor1:i.value,strokeColor2:a.value,fillColor1:o.value,fillColor2:s.value,strokeWidth:e.strokeWidth||2,filledColor:c.value}));return()=>ZT(jO,p.value)}});function NO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function PO(e){for(var t=1;te.size),i=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[0]:e.strokeColor:`currentColor`),a=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[1]??e.strokeColor[0]:e.strokeColor:`currentColor`),o=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`transparent`),s=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[1]??e.fillColor[0]:e.fillColor:`transparent`),c=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`currentColor`),{className:l,style:u}=eE(r),d=H(()=>[`t-icon`,`t-icon-image-error`,l.value]),f=H(()=>PO(PO({fill:`none`},u.value),n.style)),p=H(()=>({class:d.value,style:f.value,onClick:t=>e.onClick?.call(e,{e:t}),strokeColor1:i.value,strokeColor2:a.value,fillColor1:o.value,fillColor2:s.value,strokeWidth:e.strokeWidth||2,filledColor:c.value}));return()=>ZT(FO,p.value)}});function LO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function RO(e){for(var t=1;te.size),i=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[0]:e.strokeColor:`currentColor`),a=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[1]??e.strokeColor[0]:e.strokeColor:`currentColor`),o=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`transparent`),s=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[1]??e.fillColor[0]:e.fillColor:`transparent`),c=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`currentColor`),{className:l,style:u}=eE(r),d=H(()=>[`t-icon`,`t-icon-image`,l.value]),f=H(()=>RO(RO({fill:`none`},u.value),n.style)),p=H(()=>({class:d.value,style:f.value,onClick:t=>e.onClick?.call(e,{e:t}),strokeColor1:i.value,strokeColor2:a.value,fillColor1:o.value,fillColor2:s.value,strokeWidth:e.strokeWidth||2,filledColor:c.value}));return()=>ZT(zO,p.value)}});function VO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function HO(e){for(var t=1;te.size),i=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[0]:e.strokeColor:`currentColor`),a=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[1]??e.strokeColor[0]:e.strokeColor:`currentColor`),o=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`transparent`),s=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[1]??e.fillColor[0]:e.fillColor:`transparent`),c=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`currentColor`),{className:l,style:u}=eE(r),d=H(()=>[`t-icon`,`t-icon-info-circle-filled`,l.value]),f=H(()=>HO(HO({fill:`none`},u.value),n.style)),p=H(()=>({class:d.value,style:f.value,onClick:t=>e.onClick?.call(e,{e:t}),strokeColor1:i.value,strokeColor2:a.value,fillColor1:o.value,fillColor2:s.value,strokeWidth:e.strokeWidth||2,filledColor:c.value}));return()=>ZT(UO,p.value)}});function GO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function KO(e){for(var t=1;te.size),i=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[0]:e.strokeColor:`currentColor`),a=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[1]??e.strokeColor[0]:e.strokeColor:`currentColor`),o=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`transparent`),s=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[1]??e.fillColor[0]:e.fillColor:`transparent`),c=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`currentColor`),{className:l,style:u}=eE(r),d=H(()=>[`t-icon`,`t-icon-minus-rectangle`,l.value]),f=H(()=>KO(KO({fill:`none`},u.value),n.style)),p=H(()=>({class:d.value,style:f.value,onClick:t=>e.onClick?.call(e,{e:t}),strokeColor1:i.value,strokeColor2:a.value,fillColor1:o.value,fillColor2:s.value,strokeWidth:e.strokeWidth||2,filledColor:c.value}));return()=>ZT(qO,p.value)}});function YO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function XO(e){for(var t=1;te.size),i=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[0]:e.strokeColor:`currentColor`),a=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[1]??e.strokeColor[0]:e.strokeColor:`currentColor`),o=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`transparent`),s=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[1]??e.fillColor[0]:e.fillColor:`transparent`),c=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`currentColor`),{className:l,style:u}=eE(r),d=H(()=>[`t-icon`,`t-icon-mirror`,l.value]),f=H(()=>XO(XO({fill:`none`},u.value),n.style)),p=H(()=>({class:d.value,style:f.value,onClick:t=>e.onClick?.call(e,{e:t}),strokeColor1:i.value,strokeColor2:a.value,fillColor1:o.value,fillColor2:s.value,strokeWidth:e.strokeWidth||2,filledColor:c.value}));return()=>ZT(ZO,p.value)}});function $O(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function ek(e){for(var t=1;te.size),i=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[0]:e.strokeColor:`currentColor`),a=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[1]??e.strokeColor[0]:e.strokeColor:`currentColor`),o=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`transparent`),s=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[1]??e.fillColor[0]:e.fillColor:`transparent`),c=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`currentColor`),{className:l,style:u}=eE(r),d=H(()=>[`t-icon`,`t-icon-page-first`,l.value]),f=H(()=>ek(ek({fill:`none`},u.value),n.style)),p=H(()=>({class:d.value,style:f.value,onClick:t=>e.onClick?.call(e,{e:t}),strokeColor1:i.value,strokeColor2:a.value,fillColor1:o.value,fillColor2:s.value,strokeWidth:e.strokeWidth||2,filledColor:c.value}));return()=>ZT(tk,p.value)}});function rk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function ik(e){for(var t=1;te.size),i=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[0]:e.strokeColor:`currentColor`),a=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[1]??e.strokeColor[0]:e.strokeColor:`currentColor`),o=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`transparent`),s=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[1]??e.fillColor[0]:e.fillColor:`transparent`),c=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`currentColor`),{className:l,style:u}=eE(r),d=H(()=>[`t-icon`,`t-icon-page-last`,l.value]),f=H(()=>ik(ik({fill:`none`},u.value),n.style)),p=H(()=>({class:d.value,style:f.value,onClick:t=>e.onClick?.call(e,{e:t}),strokeColor1:i.value,strokeColor2:a.value,fillColor1:o.value,fillColor2:s.value,strokeWidth:e.strokeWidth||2,filledColor:c.value}));return()=>ZT(ak,p.value)}});function sk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function ck(e){for(var t=1;te.size),i=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[0]:e.strokeColor:`currentColor`),a=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[1]??e.strokeColor[0]:e.strokeColor:`currentColor`),o=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`transparent`),s=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[1]??e.fillColor[0]:e.fillColor:`transparent`),c=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`currentColor`),{className:l,style:u}=eE(r),d=H(()=>[`t-icon`,`t-icon-refresh`,l.value]),f=H(()=>ck(ck({fill:`none`},u.value),n.style)),p=H(()=>({class:d.value,style:f.value,onClick:t=>e.onClick?.call(e,{e:t}),strokeColor1:i.value,strokeColor2:a.value,fillColor1:o.value,fillColor2:s.value,strokeWidth:e.strokeWidth||2,filledColor:c.value}));return()=>ZT(lk,p.value)}});function dk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function fk(e){for(var t=1;te.size),i=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[0]:e.strokeColor:`currentColor`),a=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[1]??e.strokeColor[0]:e.strokeColor:`currentColor`),o=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`transparent`),s=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[1]??e.fillColor[0]:e.fillColor:`transparent`),c=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`currentColor`),{className:l,style:u}=eE(r),d=H(()=>[`t-icon`,`t-icon-remove`,l.value]),f=H(()=>fk(fk({fill:`none`},u.value),n.style)),p=H(()=>({class:d.value,style:f.value,onClick:t=>e.onClick?.call(e,{e:t}),strokeColor1:i.value,strokeColor2:a.value,fillColor1:o.value,fillColor2:s.value,strokeWidth:e.strokeWidth||2,filledColor:c.value}));return()=>ZT(pk,p.value)}});function hk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function gk(e){for(var t=1;te.size),i=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[0]:e.strokeColor:`currentColor`),a=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[1]??e.strokeColor[0]:e.strokeColor:`currentColor`),o=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`transparent`),s=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[1]??e.fillColor[0]:e.fillColor:`transparent`),c=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`currentColor`),{className:l,style:u}=eE(r),d=H(()=>[`t-icon`,`t-icon-rotation`,l.value]),f=H(()=>gk(gk({fill:`none`},u.value),n.style)),p=H(()=>({class:d.value,style:f.value,onClick:t=>e.onClick?.call(e,{e:t}),strokeColor1:i.value,strokeColor2:a.value,fillColor1:o.value,fillColor2:s.value,strokeWidth:e.strokeWidth||2,filledColor:c.value}));return()=>ZT(_k,p.value)}});function yk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function bk(e){for(var t=1;te.size),i=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[0]:e.strokeColor:`currentColor`),a=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[1]??e.strokeColor[0]:e.strokeColor:`currentColor`),o=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`transparent`),s=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[1]??e.fillColor[0]:e.fillColor:`transparent`),c=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`currentColor`),{className:l,style:u}=eE(r),d=H(()=>[`t-icon`,`t-icon-round`,l.value]),f=H(()=>bk(bk({fill:`none`},u.value),n.style)),p=H(()=>({class:d.value,style:f.value,onClick:t=>e.onClick?.call(e,{e:t}),strokeColor1:i.value,strokeColor2:a.value,fillColor1:o.value,fillColor2:s.value,strokeWidth:e.strokeWidth||2,filledColor:c.value}));return()=>ZT(xk,p.value)}});function Ck(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function wk(e){for(var t=1;te.size),i=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[0]:e.strokeColor:`currentColor`),a=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[1]??e.strokeColor[0]:e.strokeColor:`currentColor`),o=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`transparent`),s=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[1]??e.fillColor[0]:e.fillColor:`transparent`),c=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`currentColor`),{className:l,style:u}=eE(r),d=H(()=>[`t-icon`,`t-icon-search`,l.value]),f=H(()=>wk(wk({fill:`none`},u.value),n.style)),p=H(()=>({class:d.value,style:f.value,onClick:t=>e.onClick?.call(e,{e:t}),strokeColor1:i.value,strokeColor2:a.value,fillColor1:o.value,fillColor2:s.value,strokeWidth:e.strokeWidth||2,filledColor:c.value}));return()=>ZT(Tk,p.value)}});function Dk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Ok(e){for(var t=1;te.size),i=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[0]:e.strokeColor:`currentColor`),a=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[1]??e.strokeColor[0]:e.strokeColor:`currentColor`),o=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`transparent`),s=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[1]??e.fillColor[0]:e.fillColor:`transparent`),c=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`currentColor`),{className:l,style:u}=eE(r),d=H(()=>[`t-icon`,`t-icon-setting`,l.value]),f=H(()=>Ok(Ok({fill:`none`},u.value),n.style)),p=H(()=>({class:d.value,style:f.value,onClick:t=>e.onClick?.call(e,{e:t}),strokeColor1:i.value,strokeColor2:a.value,fillColor1:o.value,fillColor2:s.value,strokeWidth:e.strokeWidth||2,filledColor:c.value}));return()=>ZT(kk,p.value)}});function jk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Mk(e){for(var t=1;te.size),i=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[0]:e.strokeColor:`currentColor`),a=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[1]??e.strokeColor[0]:e.strokeColor:`currentColor`),o=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`transparent`),s=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[1]??e.fillColor[0]:e.fillColor:`transparent`),c=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`currentColor`),{className:l,style:u}=eE(r),d=H(()=>[`t-icon`,`t-icon-star-filled`,l.value]),f=H(()=>Mk(Mk({fill:`none`},u.value),n.style)),p=H(()=>({class:d.value,style:f.value,onClick:t=>e.onClick?.call(e,{e:t}),strokeColor1:i.value,strokeColor2:a.value,fillColor1:o.value,fillColor2:s.value,strokeWidth:e.strokeWidth||2,filledColor:c.value}));return()=>ZT(Nk,p.value)}});function Fk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Ik(e){for(var t=1;te.size),i=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[0]:e.strokeColor:`currentColor`),a=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[1]??e.strokeColor[0]:e.strokeColor:`currentColor`),o=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`transparent`),s=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[1]??e.fillColor[0]:e.fillColor:`transparent`),c=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`currentColor`),{className:l,style:u}=eE(r),d=H(()=>[`t-icon`,`t-icon-time-filled`,l.value]),f=H(()=>Ik(Ik({fill:`none`},u.value),n.style)),p=H(()=>({class:d.value,style:f.value,onClick:t=>e.onClick?.call(e,{e:t}),strokeColor1:i.value,strokeColor2:a.value,fillColor1:o.value,fillColor2:s.value,strokeWidth:e.strokeWidth||2,filledColor:c.value}));return()=>ZT(Lk,p.value)}});function zk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Bk(e){for(var t=1;te.size),i=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[0]:e.strokeColor:`currentColor`),a=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[1]??e.strokeColor[0]:e.strokeColor:`currentColor`),o=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`transparent`),s=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[1]??e.fillColor[0]:e.fillColor:`transparent`),c=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`currentColor`),{className:l,style:u}=eE(r),d=H(()=>[`t-icon`,`t-icon-time`,l.value]),f=H(()=>Bk(Bk({fill:`none`},u.value),n.style)),p=H(()=>({class:d.value,style:f.value,onClick:t=>e.onClick?.call(e,{e:t}),strokeColor1:i.value,strokeColor2:a.value,fillColor1:o.value,fillColor2:s.value,strokeWidth:e.strokeWidth||2,filledColor:c.value}));return()=>ZT(Vk,p.value)}});function Uk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Wk(e){for(var t=1;te.size),i=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[0]:e.strokeColor:`currentColor`),a=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[1]??e.strokeColor[0]:e.strokeColor:`currentColor`),o=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`transparent`),s=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[1]??e.fillColor[0]:e.fillColor:`transparent`),c=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`currentColor`),{className:l,style:u}=eE(r),d=H(()=>[`t-icon`,`t-icon-upload`,l.value]),f=H(()=>Wk(Wk({fill:`none`},u.value),n.style)),p=H(()=>({class:d.value,style:f.value,onClick:t=>e.onClick?.call(e,{e:t}),strokeColor1:i.value,strokeColor2:a.value,fillColor1:o.value,fillColor2:s.value,strokeWidth:e.strokeWidth||2,filledColor:c.value}));return()=>ZT(Gk,p.value)}});function qk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Jk(e){for(var t=1;te.size),i=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[0]:e.strokeColor:`currentColor`),a=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[1]??e.strokeColor[0]:e.strokeColor:`currentColor`),o=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`transparent`),s=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[1]??e.fillColor[0]:e.fillColor:`transparent`),c=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`currentColor`),{className:l,style:u}=eE(r),d=H(()=>[`t-icon`,`t-icon-video`,l.value]),f=H(()=>Jk(Jk({fill:`none`},u.value),n.style)),p=H(()=>({class:d.value,style:f.value,onClick:t=>e.onClick?.call(e,{e:t}),strokeColor1:i.value,strokeColor2:a.value,fillColor1:o.value,fillColor2:s.value,strokeWidth:e.strokeWidth||2,filledColor:c.value}));return()=>ZT(Yk,p.value)}});function Zk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Qk(e){for(var t=1;te.size),i=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[0]:e.strokeColor:`currentColor`),a=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[1]??e.strokeColor[0]:e.strokeColor:`currentColor`),o=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`transparent`),s=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[1]??e.fillColor[0]:e.fillColor:`transparent`),c=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`currentColor`),{className:l,style:u}=eE(r),d=H(()=>[`t-icon`,`t-icon-zoom-in`,l.value]),f=H(()=>Qk(Qk({fill:`none`},u.value),n.style)),p=H(()=>({class:d.value,style:f.value,onClick:t=>e.onClick?.call(e,{e:t}),strokeColor1:i.value,strokeColor2:a.value,fillColor1:o.value,fillColor2:s.value,strokeWidth:e.strokeWidth||2,filledColor:c.value}));return()=>ZT($k,p.value)}});function tA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function nA(e){for(var t=1;te.size),i=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[0]:e.strokeColor:`currentColor`),a=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[1]??e.strokeColor[0]:e.strokeColor:`currentColor`),o=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`transparent`),s=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[1]??e.fillColor[0]:e.fillColor:`transparent`),c=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`currentColor`),{className:l,style:u}=eE(r),d=H(()=>[`t-icon`,`t-icon-zoom-out`,l.value]),f=H(()=>nA(nA({fill:`none`},u.value),n.style)),p=H(()=>({class:d.value,style:f.value,onClick:t=>e.onClick?.call(e,{e:t}),strokeColor1:i.value,strokeColor2:a.value,fillColor1:o.value,fillColor2:s.value,strokeWidth:e.strokeWidth||2,filledColor:c.value}));return()=>ZT(rA,p.value)}}),aA=typeof window>`u`;function oA(e,t){if(!aA&&!(!document||!e||typeof e!=`string`)&&!(document.querySelectorAll(`.${t}[src="${e}"]`).length>0)){var n=document.createElement(`script`);n.setAttribute(`class`,t),n.setAttribute(`src`,e),document.body.appendChild(n)}}var sA={name:{type:String,default:``},size:{type:String,default:void 0},url:{type:[String,Array],default:void 0},loadDefaultIcons:{type:Boolean,default:!0},onClick:Function};function cA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function lA(e){for(var t=1;te.size),i=H(()=>e.name||``),{className:a,style:o}=eE(r),s=H(()=>{var t=[];return t=e.url instanceof Array?e.url.concat():[e.url],e.loadDefaultIcons&&t.push(dA),t}),c=H(()=>[`${uA}-icon`,`${uA}-icon-${i.value}`,a.value]),l=H(()=>lA(lA({},o.value),n.style));Fr(()=>{Array.from(new Set(s.value)).forEach(e=>{oA(e,`${uA}-svg-js-stylesheet--unique-class`)})});var u=H(()=>({class:c.value,style:l.value,onClick:t=>e.onClick?.call(e,{e:t})}));return()=>co(`svg`,u.value,co(`use`,{href:e.url?`#${i.value}`:`#t-icon-${i.value}`}))}}),`TIcon`),pA=Y(z({name:`TLink`,props:{content:{type:[String,Function]},default:{type:[String,Function]},disabled:{type:Boolean,default:void 0},download:{type:[String,Boolean]},hover:{type:String,default:`underline`,validator:function(e){return e?[`color`,`underline`].includes(e):!0}},href:{type:String,default:``},prefixIcon:{type:Function},size:{type:String,default:`medium`,validator:function(e){return e?[`small`,`medium`,`large`].includes(e):!0}},suffixIcon:{type:Function},target:{type:String,default:``},theme:{type:String,default:`default`,validator:function(e){return e?[`default`,`primary`,`danger`,`warning`,`success`].includes(e):!0}},underline:Boolean,onClick:Function},emits:[`click`],setup:function(e,t){var n=t.emit,r=mw(),i=Z(),a=Q(`link`),o=vw(),s=o.STATUS,c=o.SIZE,l=xC(`classPrefix`).classPrefix,u=Sw(),d=H(function(){return[`${a.value}`,`${a.value}--theme-${e.theme}`,W(W(W(W({},c.value[e.size],e.size!==`medium`),s.value.disabled,u.value),`${l.value}-is-underline`,e.underline),`${a.value}--hover-${e.hover}`,!u.value)]}),f=function(e){u.value||n(`click`,e)};return function(){var t=r(`default`,`content`),n=i(`prefixIcon`),o=i(`suffixIcon`);return B(`a`,{class:U(d.value),href:u.value||!e.href?void 0:e.href,target:e.target?e.target:void 0,download:e.download?e.download:void 0,onClick:f},[n?B(`span`,{class:`${a.value}__prefix-icon`},[n]):null,t,o?B(`span`,{class:`${a.value}__suffix-icon`},[o]):null])}}})),mA={align:{type:String,default:`top`,validator:function(e){return e?[`start`,`end`,`center`,`stretch`,`baseline`,`top`,`middle`,`bottom`].includes(e):!0}},gutter:{type:[Number,Object,Array],default:0},justify:{type:String,default:`start`,validator:function(e){return e?[`start`,`end`,`center`,`space-around`,`space-between`].includes(e):!0}},tag:{type:String,default:`div`}},hA=function(e){var t=`xs`;return t=e<768?`xs`:e>=768&&e<992?`sm`:e>=992&&e<1200?`md`:e>=1200&&e<1400?`lg`:e>=1400&&e<1880?`xl`:`xxl`,t};function gA(){var e=I(hA(SS?0:window.innerWidth));return Pw(`resize`,function(){e.value=hA(SS?0:window.innerWidth)}),e}function _A(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function vA(e){for(var t=1;t=0),`${e}-${r}-offset-${a.offset}`,parseInt(a.offset,10)>=0),`${e}-${r}-push-${a.push}`,parseInt(a.push,10)>=0),`${e}-${r}-pull-${a.pull}`,parseInt(a.pull,10)>=0))},{});return vA(W(W(W(W(W(W({},`${e}`,!0),`${e}-${n}`,!Vb(n)),`${e}-order-${r}`,r),`${e}-offset-${i}`,i),`${e}-push-${a}`,a),`${e}-pull-${o}`,o),s)}var wA=z({name:`TRow`,props:mA,setup:function(e){var t=L(e).gutter,n=Z();Ln(`rowContext`,Ft({gutter:t}));var r=gA(),i=Q(`row`),a=H(function(){return yA(i.value,e)}),o=H(function(){return bA(e.gutter,r.value)});return function(){var t=e.tag;return co(t,{class:a.value,style:o.value},[n(`default`)])}}}),TA=z({name:`TCol`,inject:[`rowContext`],props:{flex:{type:[String,Number]},lg:{type:[Number,Object]},md:{type:[Number,Object]},offset:{type:Number,default:0},order:{type:Number,default:0},pull:{type:Number,default:0},push:{type:Number,default:0},sm:{type:[Number,Object]},span:{type:Number},tag:{type:String,default:`div`},xl:{type:[Number,Object]},xs:{type:[Number,Object]},xxl:{type:[Number,Object]}},setup:function(e){var t=Q(`col`),n=Z(),r=Rn(`rowContext`,Object.create(null)),i=gA(),a=H(function(){return CA(t.value,e)}),o=H(function(){var t={},n=e.flex;if(n&&(t.flex=xA(n)),r){var a=r.gutter;Object.assign(t,SA(a,i.value))}return t});return function(){var t=e.tag;return co(t,{class:a.value,style:o.value},[n(`default`)])}}}),EA=Y(wA),DA=Y(TA),OA=z({name:`TLayout`,setup:function(){var e=I(!1),t=Z(),n=Q(`layout`),r=H(function(){return[n.value,W({},`${n.value}--with-sider`,e.value)]});return Ln(`layout`,{hasSide:e}),function(){return B(`section`,{class:r.value},[t(`default`)])}}}),kA=z({name:`THeader`,props:{height:{type:String,default:``}},setup:function(e){var t=Q(`layout__header`),n=Z();return function(){return B(`header`,{class:t.value,style:e.height?{height:e.height}:{}},[n(`default`)])}}}),AA=z({name:`TFooter`,props:{height:{type:String,default:``}},setup:function(e){var t=Q(`layout__footer`),n=Z();return function(){return B(`footer`,{class:t.value,style:e.height?{height:e.height}:{}},[n(`default`)])}}}),jA=z({name:`TAside`,props:{width:{type:String,default:``}},setup:function(e){var t=Rn(`layout`,Object.create(null)).hasSide,n=Q(`layout__sider`),r=Z();if(t)return Fr(function(){t.value=!0}),zr(function(){t.value=!1}),function(){var t=e.width?{width:e.width}:{};return B(`aside`,{class:n.value,style:t},[r(`default`)])}}}),MA=z({name:`TContent`,props:{content:{type:[String,Function]},default:{type:[String,Function]}},setup:function(){var e=Q(`layout__content`),t=mw();return function(){return B(`main`,{class:e.value},[t(`default`,`content`)])}}}),NA=Y(jA),PA=Y(OA),FA=Y(kA),IA=Y(AA),LA=Y(MA),RA=Y(z({name:`TDivider`,props:{align:{type:String,default:`center`,validator:function(e){return e?[`left`,`right`,`center`].includes(e):!0}},content:{type:[String,Function]},dashed:Boolean,default:{type:[String,Function]},layout:{type:String,default:`horizontal`,validator:function(e){return e?[`horizontal`,`vertical`].includes(e):!0}},size:{type:[String,Number]}},setup:function(e){var t=Q(`divider`),n=mw();return function(){var r=n(`default`,`content`),i=H(function(){return e.layout!==`vertical`}),a=H(function(){return i.value&&!!r});return B(`div`,{class:[`${t.value}`,[`${t.value}--${e.layout}`],W(W(W({},`${t.value}--dashed`,!!e.dashed),`${t.value}--with-text`,!!a.value),`${t.value}--with-text-${e.align}`,!!a.value)],style:H(function(){return e.size?{margin:i.value?`${xT(e.size)} 0`:`0 ${xT(e.size)}`}:null}).value},[a.value&&B(`span`,{class:`${t.value}__inner-text`},[r])])}}})),zA={align:{type:String,validator:function(e){return e?[`start`,`end`,`center`,`baseline`].includes(e):!0}},breakLine:Boolean,direction:{type:String,default:`horizontal`,validator:function(e){return e?[`vertical`,`horizontal`].includes(e):!0}},separator:{type:[String,Function]},size:{type:[String,Number,Array],default:`medium`}};function BA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function VA(e){for(var t=1;t1&&arguments[1]!==void 0?arguments[1]:{};return yb(e)?e:K(e)?e(co,t):K(e?.render)?e.render(co,t):e}function YA(e,t,n){var r=e.props?.[t];if(r)return r;var i=e.children,a=i?.[t]||i?.[n];return a?a?.():null}function XA(e,t){return e===qA.props}var ZA=z({name:`TDescriptionsRow`,props:{row:Array,itemType:String},setup:function(e){var t=Rn(KA),n=Q(`descriptions`),r=xC(`descriptions`).globalConfig,i=H(function(){return t.layout===`horizontal`}),a=H(function(){return t.itemLayout===`horizontal`}),o=function(o){var s=[`${n.value}__label`],c=null,l=null;return XA(e.itemType,o)?(c=o.label,l=o.span):(c=YA(o,`label`),l=o.props.span),B(`td`,V({colspan:i.value?a.value?1:l:1,class:s},{style:t.labelStyle}),[c,t.colon&&r.value.colonText])},s=function(r){var o=[`${n.value}__content`],s=null,c=null;return XA(e.itemType,r)?(s=r.content,c=r.span):(s=YA(r,`content`,`default`),c=r.props.span),B(`td`,V({colspan:i.value?c>1&&a.value?c*2-1:c:1,class:o},{style:t.contentStyle}),[s])},c=function(){return B(`tr`,null,[e.row.map(function(e){return B(fa,null,[o(e),s(e)])})])},l=function(){return B(fa,null,[B(`tr`,null,[e.row.map(function(e){return o(e)})]),B(`tr`,null,[e.row.map(function(e){return s(e)})])])},u=function(){return B(fa,null,[e.row.map(function(e){return B(`tr`,null,[o(e),s(e)])})])},d=function(){return B(fa,null,[e.row.map(function(e){return B(fa,null,[B(`tr`,null,[o(e)]),B(`tr`,null,[s(e)])])})])};return function(){return B(fa,null,[i.value?a.value?c():l():a.value?u():d()])}}}),QA=z({name:`TDescriptions`,props:GA,setup:function(e){var t=Q(`descriptions`),n=vw().SIZE,r=iw(),i=Z(),a=I(qA.props),o=function(){var t=e.column,n=e.layout,i=[];if(G(e.items))i=e.items.map(function(e){return{label:JA(e.label),content:JA(e.content),span:e.span||1}}),a.value=qA.props;else{var o=r(`TDescriptionsItem`);o.length!==0&&(i=o,a.value=qA.slots)}if(n===`vertical`)return[i];var s=[],c=t,l=[];return i.forEach(function(e,n){var r=1;XA(a.value,e)?(r=zb(e.span)?r:e.span,r=r>t?t:r):(e.props=e.props||{},r=zb(e.props?.span)?r:e.props.span,r=r>t?t:r,e.props.span=r),c>=r?(s.push(e),c-=r):(l.push(s),s=[e],c=t-r),n===i.length-1&&(XA(a.value,e)?e.span+=c:e.props.span+=c,l.push(s))}),l};Ln(KA,e);var s=function(){return B(`table`,{class:[`${t.value}__body`,n.value[e.size],W({},`${t.value}__body--fixed`,e.tableLayout===`fixed`),W({},`${t.value}__body--border`,e.bordered)]},[B(`tbody`,null,[o().map(function(e){return B(ZA,{"item-type":a.value,row:e},null)})])])},c=function(){var e=i(`title`);return e?B(`div`,{class:`${t.value}__header`},[e]):``};return function(){return B(`div`,{class:t.value},[c(),s()])}}}),$A=z({name:`TDescriptionsItem`,props:{content:{type:[String,Function]},default:{type:[String,Function]},label:{type:[String,Function]},span:{type:Number,default:1}}}),ej=Y(QA),tj=Y($A);function nj(e,t,n,r,i,a,o){try{var s=e[a](o),c=s.value}catch(e){n(e);return}s.done?t(c):Promise.resolve(c).then(r,i)}function rj(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var a=e.apply(t,n);function o(e){nj(a,r,i,o,s,`next`,e)}function s(e){nj(a,r,i,o,s,`throw`,e)}o(void 0)})}}var ij={exports:{}},aj={exports:{}};aj.exports,(function(e){function t(e,t){this.v=e,this.k=t}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(aj);var oj=aj.exports,sj={exports:{}},cj={exports:{}};cj.exports,(function(e){function t(n,r,i,a){var o=Object.defineProperty;try{o({},``,{})}catch{o=0}e.exports=t=function(e,n,r,i){if(n)o?o(e,n,{value:r,enumerable:!i,configurable:!i,writable:!i}):e[n]=r;else{var a=function(n,r){t(e,n,function(e){return this._invoke(n,r,e)})};a(`next`,0),a(`throw`,1),a(`return`,2)}},e.exports.__esModule=!0,e.exports.default=e.exports,t(n,r,i,a)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(cj);var lj=cj.exports;sj.exports,(function(e){var t=lj;function n(){var r,i,a=typeof Symbol==`function`?Symbol:{},o=a.iterator||`@@iterator`,s=a.toStringTag||`@@toStringTag`;function c(e,n,a,o){var s=n&&n.prototype instanceof u?n:u,c=Object.create(s.prototype);return t(c,`_invoke`,function(e,t,n){var a,o,s,c=0,u=n||[],d=!1,f={p:0,n:0,v:r,a:p,f:p.bind(r,4),d:function(e,t){return a=e,o=0,s=r,f.n=t,l}};function p(e,t){for(o=e,s=t,i=0;!d&&c&&!n&&i3?(n=m===t)&&(s=a[(o=a[4])?5:(o=3,3)],a[4]=a[5]=r):a[0]<=p&&((n=e<2&&pt||t>m)&&(a[4]=e,a[5]=t,f.n=m,o=0))}if(n||e>1)return l;throw d=!0,t}return function(n,u,m){if(c>1)throw TypeError(`Generator is already running`);for(d&&u===1&&p(u,m),o=u,s=m;(i=o<2?r:s)||!d;){a||(o?o<3?(o>1&&(f.n=-1),p(o,s)):f.n=s:f.v=s);try{if(c=2,a){if(o||(n=`next`),i=a[n]){if(!(i=i.call(a,s)))throw TypeError(`iterator result is not an object`);if(!i.done)return i;s=i.value,o<2&&(o=0)}else o===1&&(i=a.return)&&i.call(a),o<2&&(s=TypeError(`The iterator does not provide a '`+n+`' method`),o=1);a=r}else if((i=(d=f.n<0)?s:e.call(t,f))!==l)break}catch(e){a=r,o=1,s=e}finally{c=1}}return{value:i,done:d}}}(e,a,o),!0),c}var l={};function u(){}function d(){}function f(){}i=Object.getPrototypeOf;var p=[][o]?i(i([][o]())):(t(i={},o,function(){return this}),i),m=f.prototype=u.prototype=Object.create(p);function h(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,t(e,s,`GeneratorFunction`)),e.prototype=Object.create(m),e}return d.prototype=f,t(m,`constructor`,f),t(f,`constructor`,d),d.displayName=`GeneratorFunction`,t(f,s,`GeneratorFunction`),t(m),t(m,s,`Generator`),t(m,o,function(){return this}),t(m,`toString`,function(){return`[object Generator]`}),(e.exports=n=function(){return{w:c,m:h}},e.exports.__esModule=!0,e.exports.default=e.exports)()}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports})(sj);var uj=sj.exports,dj={exports:{}},fj={exports:{}},pj={exports:{}};pj.exports,(function(e){var t=oj,n=lj;function r(e,i){function a(n,r,o,s){try{var c=e[n](r),l=c.value;return l instanceof t?i.resolve(l.v).then(function(e){a(`next`,e,o,s)},function(e){a(`throw`,e,o,s)}):i.resolve(l).then(function(e){c.value=e,o(c)},function(e){return a(`throw`,e,o,s)})}catch(e){s(e)}}var o;this.next||(n(r.prototype),n(r.prototype,typeof Symbol==`function`&&Symbol.asyncIterator||`@asyncIterator`,function(){return this})),n(this,`_invoke`,function(e,t,n){function r(){return new i(function(t,r){a(e,n,t,r)})}return o=o?o.then(r,r):r()},!0)}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports})(pj);var mj=pj.exports;fj.exports,(function(e){var t=uj,n=mj;function r(e,r,i,a,o){return new n(t().w(e,r,i,a),o||Promise)}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports})(fj);var hj=fj.exports;dj.exports,(function(e){var t=hj;function n(e,n,r,i,a){var o=t(e,n,r,i,a);return o.next().then(function(e){return e.done?e.value:o.next()})}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports})(dj);var gj=dj.exports,_j={exports:{}};_j.exports,(function(e){function t(e){var t=Object(e),n=[];for(var r in t)n.unshift(r);return function e(){for(;n.length;)if((r=n.pop())in t)return e.value=r,e.done=!1,e;return e.done=!0,e}}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(_j);var vj=_j.exports,yj={exports:{}},bj={exports:{}};bj.exports,(function(e){function t(n){"@babel/helpers - typeof";return e.exports=t=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(bj);var xj=bj.exports;yj.exports,(function(e){var t=xj.default;function n(e){if(e!=null){var n=e[typeof Symbol==`function`&&Symbol.iterator||`@@iterator`],r=0;if(n)return n.call(e);if(typeof e.next==`function`)return e;if(!isNaN(e.length))return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}}}throw TypeError(t(e)+` is not iterable`)}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports})(yj);var Sj=yj.exports;ij.exports,(function(e){var t=oj,n=uj,r=gj,i=hj,a=mj,o=vj,s=Sj;function c(){var l=n(),u=l.m(c),d=(Object.getPrototypeOf?Object.getPrototypeOf(u):u.__proto__).constructor;function f(e){var t=typeof e==`function`&&e.constructor;return!!t&&(t===d||(t.displayName||t.name)===`GeneratorFunction`)}var p={throw:1,return:2,break:3,continue:3};function m(e){var t,n;return function(r){t||(t={stop:function(){return n(r.a,2)},catch:function(){return r.v},abrupt:function(e,t){return n(r.a,p[e],t)},delegateYield:function(e,i,a){return t.resultName=i,n(r.d,s(e),a)},finish:function(e){return n(r.f,e)}},n=function(e,n,i){r.p=t.prev,r.n=t.next;try{return e(n,i)}finally{t.next=r.n}}),t.resultName&&(t[t.resultName]=r.v,t.resultName=void 0),t.sent=r.v,t.next=r.n;try{return e.call(this,t)}finally{r.p=t.prev,r.n=t.next}}}return(e.exports=c=function(){return{wrap:function(e,t,n,r){return l.w(m(e),t,n,r&&r.reverse())},isGeneratorFunction:f,mark:l.m,awrap:function(e,n){return new t(e,n)},AsyncIterator:a,async:function(e,t,n,a,o){return(f(t)?i:r)(m(e),t,n,a,o)},keys:o,values:s}},e.exports.__esModule=!0,e.exports.default=e.exports)()}e.exports=c,e.exports.__esModule=!0,e.exports.default=e.exports})(ij);var Cj=ij.exports,wj=Cj(),Tj=wj;try{regeneratorRuntime=wj}catch{(typeof globalThis>`u`?`undefined`:ud(globalThis))===`object`?globalThis.regeneratorRuntime=wj:Function(`r`,`regeneratorRuntime = r`)(wj)}var Ej=iS(Tj),Dj=Y(z({name:`TAffix`,props:{container:{type:[String,Function],default:function(){return function(){return window}}},content:{type:[String,Function]},default:{type:[String,Function]},offsetBottom:{type:Number,default:0},offsetTop:{type:Number,default:0},zIndex:{type:Number},onFixedChange:Function},emits:[`fixedChange`],setup:function(e,t){var n=Q(`affix`),r=mw(),i=I(null),a=I(null),o=I(document?.createElement(`div`)),s=I(!1),c=I(!1),l=I(),u=I(),d=0,f=function(){s.value||=(d=window.requestAnimationFrame(function(){d=0;var r=i.value?.getBoundingClientRect()??{top:0,width:0,height:0},c=r.top,f=r.width,p=r.height,m=0;l.value instanceof HTMLElement&&(m=l.value.getBoundingClientRect().top);var h,g=c-m,_=l.value[l.value instanceof Window?`innerHeight`:`clientHeight`]-p,v=m+_-e.offsetBottom;if(h=!Vb(e.offsetTop)&&g<=e.offsetTop?m+e.offsetTop:!Vb(e.offsetBottom)&&c>=v?v:!1,a.value){var y=h!==!1,b=i.value.contains(o.value);y?(a.value.className=n.value,u.value={top:`${h}px`,width:`${f}px`,height:`${p}px`,zIndex:e.zIndex},b||(o.value.style.width=`${f}px`,o.value.style.height=`${p}px`,i.value.appendChild(o.value))):(a.value.removeAttribute(`class`),u.value=void 0,b&&o.value.remove()),t.emit(`fixedChange`,y,{top:Number(h)}),K(e.onFixedChange)&&e.onFixedChange(y,{top:Number(h)})}s.value=!1}),!0)},p=function(){var t=rj(Ej.mark(function t(){return Ej.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=1,Sn();case 1:if(!c.value){t.next=2;break}return t.abrupt(`return`);case 2:l.value=jS(e.container),wS(l.value,`scroll`,f),wS(window,`resize`,f),c.value=!0;case 3:case`end`:return t.stop()}},t)}));return function(){return t.apply(this,arguments)}}(),m=function(){!l.value||!c.value||(TS(l.value,`scroll`,f),TS(window,`resize`,f),d&&window.cancelAnimationFrame(d),c.value=!1)};return R(function(){return e.offsetTop},function(){f()}),R(function(){return e.offsetBottom},function(){f()}),R(function(){return e.zIndex},function(){f()}),Fr(p),Or(p),kr(m),Rr(m),t.expose({scrollContainer:l,affixWrapRef:i,handleScroll:f}),function(){return B(`div`,{ref:i},[B(`div`,{ref:a,style:u.value},[r(`default`,`content`)])])}}})),Oj={exports:{}};Oj.exports,(function(e,t){(function(t,n){e.exports=n()})(rS,function(){return function(){var e={686:(function(e,t,n){n.d(t,{default:function(){return O}});var r=n(279),i=n.n(r),a=n(370),o=n.n(a),s=n(817),c=n.n(s);function l(e){try{return document.execCommand(e)}catch{return!1}}var u=function(e){var t=c()(e);return l(`cut`),t};function d(e){var t=document.documentElement.getAttribute(`dir`)===`rtl`,n=document.createElement(`textarea`);n.style.fontSize=`12pt`,n.style.border=`0`,n.style.padding=`0`,n.style.margin=`0`,n.style.position=`absolute`,n.style[t?`right`:`left`]=`-9999px`;var r=window.pageYOffset||document.documentElement.scrollTop;return n.style.top=`${r}px`,n.setAttribute(`readonly`,``),n.value=e,n}var f=function(e,t){var n=d(e);t.container.appendChild(n);var r=c()(n);return l(`copy`),n.remove(),r},p=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{container:document.body},n=``;return typeof e==`string`?n=f(e,t):e instanceof HTMLInputElement&&![`text`,`search`,`url`,`tel`,`password`].includes(e?.type)?n=f(e.value,t):(n=c()(e),l(`copy`)),n};function m(e){"@babel/helpers - typeof";return m=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},m(e)}var h=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.action,n=t===void 0?`copy`:t,r=e.container,i=e.target,a=e.text;if(n!==`copy`&&n!==`cut`)throw Error(`Invalid "action" value, use either "copy" or "cut"`);if(i!==void 0)if(i&&m(i)===`object`&&i.nodeType===1){if(n===`copy`&&i.hasAttribute(`disabled`))throw Error(`Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute`);if(n===`cut`&&(i.hasAttribute(`readonly`)||i.hasAttribute(`disabled`)))throw Error(`Invalid "target" attribute. You can't cut text from elements with "readonly" or "disabled" attributes`)}else throw Error(`Invalid "target" value, use a valid Element`);if(a)return p(a,{container:r});if(i)return n===`cut`?u(i):p(i,{container:r})};function g(e){"@babel/helpers - typeof";return g=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},g(e)}function _(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function v(e,t){for(var n=0;n`u`||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy==`function`)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function E(e){return E=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},E(e)}function D(e,t){var n=`data-clipboard-${e}`;if(t.hasAttribute(n))return t.getAttribute(n)}var O=function(e){b(n,e);var t=S(n);function n(e,r){var i;return _(this,n),i=t.call(this),i.resolveOptions(r),i.listenClick(e),i}return y(n,[{key:`resolveOptions`,value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.action=typeof e.action==`function`?e.action:this.defaultAction,this.target=typeof e.target==`function`?e.target:this.defaultTarget,this.text=typeof e.text==`function`?e.text:this.defaultText,this.container=g(e.container)===`object`?e.container:document.body}},{key:`listenClick`,value:function(e){var t=this;this.listener=o()(e,`click`,function(e){return t.onClick(e)})}},{key:`onClick`,value:function(e){var t=e.delegateTarget||e.currentTarget,n=this.action(t)||`copy`,r=h({action:n,container:this.container,target:this.target(t),text:this.text(t)});this.emit(r?`success`:`error`,{action:n,text:r,trigger:t,clearSelection:function(){t&&t.focus(),window.getSelection().removeAllRanges()}})}},{key:`defaultAction`,value:function(e){return D(`action`,e)}},{key:`defaultTarget`,value:function(e){var t=D(`target`,e);if(t)return document.querySelector(t)}},{key:`defaultText`,value:function(e){return D(`text`,e)}},{key:`destroy`,value:function(){this.listener.destroy()}}],[{key:`copy`,value:function(e){return p(e,arguments.length>1&&arguments[1]!==void 0?arguments[1]:{container:document.body})}},{key:`cut`,value:function(e){return u(e)}},{key:`isSupported`,value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[`copy`,`cut`],t=typeof e==`string`?[e]:e,n=!!document.queryCommandSupported;return t.forEach(function(e){n&&=!!document.queryCommandSupported(e)}),n}}]),n}(i())}),828:(function(e){var t=9;if(typeof Element<`u`&&!Element.prototype.matches){var n=Element.prototype;n.matches=n.matchesSelector||n.mozMatchesSelector||n.msMatchesSelector||n.oMatchesSelector||n.webkitMatchesSelector}function r(e,n){for(;e&&e.nodeType!==t;){if(typeof e.matches==`function`&&e.matches(n))return e;e=e.parentNode}}e.exports=r}),438:(function(e,t,n){var r=n(828);function i(e,t,n,r,i){var a=o.apply(this,arguments);return e.addEventListener(n,a,i),{destroy:function(){e.removeEventListener(n,a,i)}}}function a(e,t,n,r,a){return typeof e.addEventListener==`function`?i.apply(null,arguments):typeof n==`function`?i.bind(null,document).apply(null,arguments):(typeof e==`string`&&(e=document.querySelectorAll(e)),Array.prototype.map.call(e,function(e){return i(e,t,n,r,a)}))}function o(e,t,n,i){return function(n){n.delegateTarget=r(n.target,t),n.delegateTarget&&i.call(e,n)}}e.exports=a}),879:(function(e,t){t.node=function(e){return e!==void 0&&e instanceof HTMLElement&&e.nodeType===1},t.nodeList=function(e){var n=Object.prototype.toString.call(e);return e!==void 0&&(n===`[object NodeList]`||n===`[object HTMLCollection]`)&&`length`in e&&(e.length===0||t.node(e[0]))},t.string=function(e){return typeof e==`string`||e instanceof String},t.fn=function(e){return Object.prototype.toString.call(e)===`[object Function]`}}),370:(function(e,t,n){var r=n(879),i=n(438);function a(e,t,n){if(!e&&!t&&!n)throw Error(`Missing required arguments`);if(!r.string(t))throw TypeError(`Second argument must be a String`);if(!r.fn(n))throw TypeError(`Third argument must be a Function`);if(r.node(e))return o(e,t,n);if(r.nodeList(e))return s(e,t,n);if(r.string(e))return c(e,t,n);throw TypeError(`First argument must be a String, HTMLElement, HTMLCollection, or NodeList`)}function o(e,t,n){return e.addEventListener(t,n),{destroy:function(){e.removeEventListener(t,n)}}}function s(e,t,n){return Array.prototype.forEach.call(e,function(e){e.addEventListener(t,n)}),{destroy:function(){Array.prototype.forEach.call(e,function(e){e.removeEventListener(t,n)})}}}function c(e,t,n){return i(document.body,e,t,n)}e.exports=a}),817:(function(e){function t(e){var t;if(e.nodeName===`SELECT`)e.focus(),t=e.value;else if(e.nodeName===`INPUT`||e.nodeName===`TEXTAREA`){var n=e.hasAttribute(`readonly`);n||e.setAttribute(`readonly`,``),e.select(),e.setSelectionRange(0,e.value.length),n||e.removeAttribute(`readonly`),t=e.value}else{e.hasAttribute(`contenteditable`)&&e.focus();var r=window.getSelection(),i=document.createRange();i.selectNodeContents(e),r.removeAllRanges(),r.addRange(i),t=r.toString()}return t}e.exports=t}),279:(function(e){function t(){}t.prototype={on:function(e,t,n){var r=this.e||={};return(r[e]||(r[e]=[])).push({fn:t,ctx:n}),this},once:function(e,t,n){var r=this;function i(){r.off(e,i),t.apply(n,arguments)}return i._=t,this.on(e,i,n)},emit:function(e){for(var t=[].slice.call(arguments,1),n=((this.e||={})[e]||[]).slice(),r=0,i=n.length;rt.top?e:t}).link),l&&i.value.length&&i.value.indexOf(a.value)>i.value.indexOf(c)){var u=v(a.value);if(u){var d=Mj(u,o.value);if(o.value instanceof HTMLElement){var f=o.value.clientHeight;d+u.offsetHeight>0&&da`);if(!e){Object.assign(c,{});return}var t=e.offsetTop,n=e.offsetHeight;Object.assign(c,{top:`${t}px`,height:`${n}px`,opacity:1})},C=function(t){var n;(n=e.onClick)==null||n.call(e,t)},w=function(){var t=rj(Ej.mark(function t(n){var r,i,a,c,l;return Ej.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(r=v(n),x(n),r){t.next=1;break}return t.abrupt(`return`);case 1:return s.value=!0,i=e.targetOffset,a=NS(o.value),c=Mj(r,o.value),l=a+c-i,t.next=2,PS(l,{container:o.value});case 2:s.value=!1;case 3:case`end`:return t.stop()}},t)}));return function(e){return t.apply(this,arguments)}}(),T=function(){return h(`cursor`)||B(`div`,{class:d.value},null)};return Fr(rj(Ej.mark(function e(){return Ej.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(g(),!a.value){e.next=2;break}return e.next=1,Sn();case 1:w(a.value);case 2:case`end`:return e.stop()}},e)}))),zr(function(){o.value&&TS(o.value,`scroll`,_)}),Hn(function(){o.value&&TS(o.value,`scroll`,_),g()}),Ln(Fj,Ft({registerLink:y,unregisterLink:b,handleScrollTo:w,handleLinkClick:C,active:a})),function(){var t=e.size,i=e.affixProps,a=B(`div`,V({ref:r,class:[l.value,m.value[t]]},n),[B(`div`,{class:u.value},[B(`div`,{class:`${d.value}-wrapper`,style:c},[T()])]),h(`default`)]);return i?B(Dj,i,Ij(a)?a:{default:function(){return[a]}}):a}}}),Rj={href:{type:String,default:``,required:!0},target:{type:String,default:`_self`,validator:function(e){return[`_self`,`_blank`,`_parent`,`_top`].includes(e)}},title:{type:[String,Function],default:``},customScroll:{type:Boolean,default:!1}};function zj(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Bj(e){for(var t=1;t`u`?!1:e instanceof jM(e).ShadowRoot||e instanceof ShadowRoot}function FM(e){var t=e.state;Object.keys(t.elements).forEach(function(e){var n=t.styles[e]||{},r=t.attributes[e]||{},i=t.elements[e];!NM(i)||!AM(i)||(Object.assign(i.style,n),Object.keys(r).forEach(function(e){var t=r[e];t===!1?i.removeAttribute(e):i.setAttribute(e,t===!0?``:t)}))})}function IM(e){var t=e.state,n={popper:{position:t.options.strategy,left:`0`,top:`0`,margin:`0`},arrow:{position:`absolute`},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(e){var r=t.elements[e],i=t.attributes[e]||{},a=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce(function(e,t){return e[t]=``,e},{});!NM(r)||!AM(r)||(Object.assign(r.style,a),Object.keys(i).forEach(function(e){r.removeAttribute(e)}))})}}var LM={name:`applyStyles`,enabled:!0,phase:`write`,fn:FM,effect:IM,requires:[`computeStyles`]};function RM(e){return e.split(`-`)[0]}var zM=Math.max,BM=Math.min,VM=Math.round;function HM(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(e){return e.brand+`/`+e.version}).join(` `):navigator.userAgent}function UM(){return!/^((?!chrome|android).)*safari/i.test(HM())}function WM(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),i=1,a=1;t&&NM(e)&&(i=e.offsetWidth>0&&VM(r.width)/e.offsetWidth||1,a=e.offsetHeight>0&&VM(r.height)/e.offsetHeight||1);var o=(MM(e)?jM(e):window).visualViewport,s=!UM()&&n,c=(r.left+(s&&o?o.offsetLeft:0))/i,l=(r.top+(s&&o?o.offsetTop:0))/a,u=r.width/i,d=r.height/a;return{width:u,height:d,top:l,right:c+u,bottom:l+d,left:c,x:c,y:l}}function GM(e){var t=WM(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function KM(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&PM(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function qM(e){return jM(e).getComputedStyle(e)}function JM(e){return[`table`,`td`,`th`].indexOf(AM(e))>=0}function YM(e){return((MM(e)?e.ownerDocument:e.document)||window.document).documentElement}function XM(e){return AM(e)===`html`?e:e.assignedSlot||e.parentNode||(PM(e)?e.host:null)||YM(e)}function ZM(e){return!NM(e)||qM(e).position===`fixed`?null:e.offsetParent}function QM(e){var t=/firefox/i.test(HM());if(/Trident/i.test(HM())&&NM(e)&&qM(e).position===`fixed`)return null;var n=XM(e);for(PM(n)&&(n=n.host);NM(n)&&[`html`,`body`].indexOf(AM(n))<0;){var r=qM(n);if(r.transform!==`none`||r.perspective!==`none`||r.contain===`paint`||[`transform`,`perspective`].indexOf(r.willChange)!==-1||t&&r.willChange===`filter`||t&&r.filter&&r.filter!==`none`)return n;n=n.parentNode}return null}function $M(e){for(var t=jM(e),n=ZM(e);n&&JM(n)&&qM(n).position===`static`;)n=ZM(n);return n&&(AM(n)===`html`||AM(n)===`body`&&qM(n).position===`static`)?t:n||QM(e)||t}function eN(e){return[`top`,`bottom`].indexOf(e)>=0?`x`:`y`}function tN(e,t,n){return zM(e,BM(t,n))}function nN(e,t,n){var r=tN(e,t,n);return r>n?n:r}function rN(){return{top:0,right:0,bottom:0,left:0}}function iN(e){return Object.assign({},rN(),e)}function aN(e,t){return t.reduce(function(t,n){return t[n]=e,t},{})}var oN=function(e,t){return e=typeof e==`function`?e(Object.assign({},t.rects,{placement:t.placement})):e,iN(typeof e==`number`?aN(e,xM):e)};function sN(e){var t,n=e.state,r=e.name,i=e.options,a=n.elements.arrow,o=n.modifiersData.popperOffsets,s=RM(n.placement),c=eN(s),l=[`left`,`right`].indexOf(s)>=0?`height`:`width`;if(!(!a||!o)){var u=oN(i.padding,n),d=GM(a),f=c===`y`?`top`:yM,p=c===`y`?_M:vM,m=n.rects.reference[l]+n.rects.reference[c]-o[c]-n.rects.popper[l],h=o[c]-n.rects.reference[c],g=$M(a),_=g?c===`y`?g.clientHeight||0:g.clientWidth||0:0,v=m/2-h/2,y=u[f],b=_-d[l]-u[p],x=_/2-d[l]/2+v,S=tN(y,x,b),C=c;n.modifiersData[r]=(t={},t[C]=S,t.centerOffset=S-x,t)}}function cN(e){var t=e.state,n=e.options.element,r=n===void 0?`[data-popper-arrow]`:n;r!=null&&(typeof r==`string`&&(r=t.elements.popper.querySelector(r),!r)||KM(t.elements.popper,r)&&(t.elements.arrow=r))}var lN={name:`arrow`,enabled:!0,phase:`main`,fn:sN,effect:cN,requires:[`popperOffsets`],requiresIfExists:[`preventOverflow`]};function uN(e){return e.split(`-`)[1]}var dN={top:`auto`,right:`auto`,bottom:`auto`,left:`auto`};function fN(e,t){var n=e.x,r=e.y,i=t.devicePixelRatio||1;return{x:VM(n*i)/i||0,y:VM(r*i)/i||0}}function pN(e){var t,n=e.popper,r=e.popperRect,i=e.placement,a=e.variation,o=e.offsets,s=e.position,c=e.gpuAcceleration,l=e.adaptive,u=e.roundOffsets,d=e.isFixed,f=o.x,p=f===void 0?0:f,m=o.y,h=m===void 0?0:m,g=typeof u==`function`?u({x:p,y:h}):{x:p,y:h};p=g.x,h=g.y;var _=o.hasOwnProperty(`x`),v=o.hasOwnProperty(`y`),y=yM,b=`top`,x=window;if(l){var S=$M(n),C=`clientHeight`,w=`clientWidth`;if(S===jM(n)&&(S=YM(n),qM(S).position!==`static`&&s===`absolute`&&(C=`scrollHeight`,w=`scrollWidth`)),S=S,i===`top`||(i===`left`||i===`right`)&&a===`end`){b=_M;var T=d&&S===x&&x.visualViewport?x.visualViewport.height:S[C];h-=T-r.height,h*=c?1:-1}if(i===`left`||(i===`top`||i===`bottom`)&&a===`end`){y=vM;var E=d&&S===x&&x.visualViewport?x.visualViewport.width:S[w];p-=E-r.width,p*=c?1:-1}}var D=Object.assign({position:s},l&&dN),O=u===!0?fN({x:p,y:h},jM(n)):{x:p,y:h};if(p=O.x,h=O.y,c){var k;return Object.assign({},D,(k={},k[b]=v?`0`:``,k[y]=_?`0`:``,k.transform=(x.devicePixelRatio||1)<=1?`translate(`+p+`px, `+h+`px)`:`translate3d(`+p+`px, `+h+`px, 0)`,k))}return Object.assign({},D,(t={},t[b]=v?h+`px`:``,t[y]=_?p+`px`:``,t.transform=``,t))}function mN(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=r===void 0?!0:r,a=n.adaptive,o=a===void 0?!0:a,s=n.roundOffsets,c=s===void 0?!0:s,l={placement:RM(t.placement),variation:uN(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:t.options.strategy===`fixed`};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,pN(Object.assign({},l,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:o,roundOffsets:c})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,pN(Object.assign({},l,{offsets:t.modifiersData.arrow,position:`absolute`,adaptive:!1,roundOffsets:c})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}var hN={name:`computeStyles`,enabled:!0,phase:`beforeWrite`,fn:mN,data:{}},gN={passive:!0};function _N(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,a=i===void 0?!0:i,o=r.resize,s=o===void 0?!0:o,c=jM(t.elements.popper),l=[].concat(t.scrollParents.reference,t.scrollParents.popper);return a&&l.forEach(function(e){e.addEventListener(`scroll`,n.update,gN)}),s&&c.addEventListener(`resize`,n.update,gN),function(){a&&l.forEach(function(e){e.removeEventListener(`scroll`,n.update,gN)}),s&&c.removeEventListener(`resize`,n.update,gN)}}var vN={name:`eventListeners`,enabled:!0,phase:`write`,fn:function(){},effect:_N,data:{}},yN={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function bN(e){return e.replace(/left|right|bottom|top/g,function(e){return yN[e]})}var xN={start:`end`,end:`start`};function SN(e){return e.replace(/start|end/g,function(e){return xN[e]})}function CN(e){var t=jM(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function wN(e){return WM(YM(e)).left+CN(e).scrollLeft}function TN(e,t){var n=jM(e),r=YM(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;var l=UM();(l||!l&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}return{width:a,height:o,x:s+wN(e),y:c}}function EN(e){var t=YM(e),n=CN(e),r=e.ownerDocument?.body,i=zM(t.scrollWidth,t.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),a=zM(t.scrollHeight,t.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),o=-n.scrollLeft+wN(e),s=-n.scrollTop;return qM(r||t).direction===`rtl`&&(o+=zM(t.clientWidth,r?r.clientWidth:0)-i),{width:i,height:a,x:o,y:s}}function DN(e){var t=qM(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function ON(e){return[`html`,`body`,`#document`].indexOf(AM(e))>=0?e.ownerDocument.body:NM(e)&&DN(e)?e:ON(XM(e))}function kN(e,t){t===void 0&&(t=[]);var n=ON(e),r=n===e.ownerDocument?.body,i=jM(n),a=r?[i].concat(i.visualViewport||[],DN(n)?n:[]):n,o=t.concat(a);return r?o:o.concat(kN(XM(a)))}function AN(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function jN(e,t){var n=WM(e,!1,t===`fixed`);return n.top+=e.clientTop,n.left+=e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function MN(e,t,n){return t===`viewport`?AN(TN(e,n)):MM(t)?jN(t,n):AN(EN(YM(e)))}function NN(e){var t=kN(XM(e)),n=[`absolute`,`fixed`].indexOf(qM(e).position)>=0&&NM(e)?$M(e):e;return MM(n)?t.filter(function(e){return MM(e)&&KM(e,n)&&AM(e)!==`body`}):[]}function PN(e,t,n,r){var i=t===`clippingParents`?NN(e):[].concat(t),a=[].concat(i,[n]),o=a[0],s=a.reduce(function(t,n){var i=MN(e,n,r);return t.top=zM(i.top,t.top),t.right=BM(i.right,t.right),t.bottom=BM(i.bottom,t.bottom),t.left=zM(i.left,t.left),t},MN(e,o,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function FN(e){var t=e.reference,n=e.element,r=e.placement,i=r?RM(r):null,a=r?uN(r):null,o=t.x+t.width/2-n.width/2,s=t.y+t.height/2-n.height/2,c;switch(i){case`top`:c={x:o,y:t.y-n.height};break;case _M:c={x:o,y:t.y+t.height};break;case vM:c={x:t.x+t.width,y:s};break;case yM:c={x:t.x-n.width,y:s};break;default:c={x:t.x,y:t.y}}var l=i?eN(i):null;if(l!=null){var u=l===`y`?`height`:`width`;switch(a){case SM:c[l]=c[l]-(t[u]/2-n[u]/2);break;case`end`:c[l]=c[l]+(t[u]/2-n[u]/2);break}}return c}function IN(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=r===void 0?e.placement:r,a=n.strategy,o=a===void 0?e.strategy:a,s=n.boundary,c=s===void 0?CM:s,l=n.rootBoundary,u=l===void 0?wM:l,d=n.elementContext,f=d===void 0?TM:d,p=n.altBoundary,m=p===void 0?!1:p,h=n.padding,g=h===void 0?0:h,_=iN(typeof g==`number`?aN(g,xM):g),v=f===`popper`?EM:TM,y=e.rects.popper,b=e.elements[m?v:f],x=PN(MM(b)?b:b.contextElement||YM(e.elements.popper),c,u,o),S=WM(e.elements.reference),C=FN({reference:S,element:y,placement:i}),w=AN(Object.assign({},y,C)),T=f===`popper`?w:S,E={top:x.top-T.top+_.top,bottom:T.bottom-x.bottom+_.bottom,left:x.left-T.left+_.left,right:T.right-x.right+_.right},D=e.modifiersData.offset;if(f===`popper`&&D){var O=D[i];Object.keys(E).forEach(function(e){var t=[`right`,`bottom`].indexOf(e)>=0?1:-1,n=[`top`,`bottom`].indexOf(e)>=0?`y`:`x`;E[e]+=O[n]*t})}return E}function LN(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=n.boundary,a=n.rootBoundary,o=n.padding,s=n.flipVariations,c=n.allowedAutoPlacements,l=c===void 0?OM:c,u=uN(r),d=u?s?DM:DM.filter(function(e){return uN(e)===u}):xM,f=d.filter(function(e){return l.indexOf(e)>=0});f.length===0&&(f=d);var p=f.reduce(function(t,n){return t[n]=IN(e,{placement:n,boundary:i,rootBoundary:a,padding:o})[RM(n)],t},{});return Object.keys(p).sort(function(e,t){return p[e]-p[t]})}function RN(e){if(RM(e)===`auto`)return[];var t=bN(e);return[SN(e),t,SN(t)]}function zN(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,a=i===void 0?!0:i,o=n.altAxis,s=o===void 0?!0:o,c=n.fallbackPlacements,l=n.padding,u=n.boundary,d=n.rootBoundary,f=n.altBoundary,p=n.flipVariations,m=p===void 0?!0:p,h=n.allowedAutoPlacements,g=t.options.placement,_=RM(g)===g,v=c||(_||!m?[bN(g)]:RN(g)),y=[g].concat(v).reduce(function(e,n){return e.concat(RM(n)===`auto`?LN(t,{placement:n,boundary:u,rootBoundary:d,padding:l,flipVariations:m,allowedAutoPlacements:h}):n)},[]),b=t.rects.reference,x=t.rects.popper,S=new Map,C=!0,w=y[0],T=0;T=0,A=k?`width`:`height`,j=IN(t,{placement:E,boundary:u,rootBoundary:d,altBoundary:f,padding:l}),M=k?O?vM:yM:O?_M:`top`;b[A]>x[A]&&(M=bN(M));var N=bN(M),P=[];if(a&&P.push(j[D]<=0),s&&P.push(j[M]<=0,j[N]<=0),P.every(function(e){return e})){w=E,C=!1;break}S.set(E,P)}if(C)for(var F=m?3:1,ee=function(e){var t=y.find(function(t){var n=S.get(t);if(n)return n.slice(0,e).every(function(e){return e})});if(t)return w=t,`break`},te=F;te>0&&ee(te)!==`break`;te--);t.placement!==w&&(t.modifiersData[r]._skip=!0,t.placement=w,t.reset=!0)}}var BN={name:`flip`,enabled:!0,phase:`main`,fn:zN,requiresIfExists:[`offset`],data:{_skip:!1}};function VN(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function HN(e){return[`top`,vM,_M,yM].some(function(t){return e[t]>=0})}function UN(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,a=t.modifiersData.preventOverflow,o=IN(t,{elementContext:`reference`}),s=IN(t,{altBoundary:!0}),c=VN(o,r),l=VN(s,i,a),u=HN(c),d=HN(l);t.modifiersData[n]={referenceClippingOffsets:c,popperEscapeOffsets:l,isReferenceHidden:u,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":d})}var WN={name:`hide`,enabled:!0,phase:`main`,requiresIfExists:[`preventOverflow`],fn:UN};function GN(e,t,n){var r=RM(e),i=[`left`,`top`].indexOf(r)>=0?-1:1,a=typeof n==`function`?n(Object.assign({},t,{placement:e})):n,o=a[0],s=a[1];return o||=0,s=(s||0)*i,[`left`,`right`].indexOf(r)>=0?{x:s,y:o}:{x:o,y:s}}function KN(e){var t=e.state,n=e.options,r=e.name,i=n.offset,a=i===void 0?[0,0]:i,o=OM.reduce(function(e,n){return e[n]=GN(n,t.rects,a),e},{}),s=o[t.placement],c=s.x,l=s.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=c,t.modifiersData.popperOffsets.y+=l),t.modifiersData[r]=o}var qN={name:`offset`,enabled:!0,phase:`main`,requires:[`popperOffsets`],fn:KN};function JN(e){var t=e.state,n=e.name;t.modifiersData[n]=FN({reference:t.rects.reference,element:t.rects.popper,placement:t.placement})}var YN={name:`popperOffsets`,enabled:!0,phase:`read`,fn:JN,data:{}};function XN(e){return e===`x`?`y`:`x`}function ZN(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,a=i===void 0?!0:i,o=n.altAxis,s=o===void 0?!1:o,c=n.boundary,l=n.rootBoundary,u=n.altBoundary,d=n.padding,f=n.tether,p=f===void 0?!0:f,m=n.tetherOffset,h=m===void 0?0:m,g=IN(t,{boundary:c,rootBoundary:l,padding:d,altBoundary:u}),_=RM(t.placement),v=uN(t.placement),y=!v,b=eN(_),x=XN(b),S=t.modifiersData.popperOffsets,C=t.rects.reference,w=t.rects.popper,T=typeof h==`function`?h(Object.assign({},t.rects,{placement:t.placement})):h,E=typeof T==`number`?{mainAxis:T,altAxis:T}:Object.assign({mainAxis:0,altAxis:0},T),D=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,O={x:0,y:0};if(S){if(a){var k=b===`y`?`top`:yM,A=b===`y`?_M:vM,j=b===`y`?`height`:`width`,M=S[b],N=M+g[k],P=M-g[A],F=p?-w[j]/2:0,ee=v===`start`?C[j]:w[j],te=v===`start`?-w[j]:-C[j],ne=t.elements.arrow,re=p&&ne?GM(ne):{width:0,height:0},ie=t.modifiersData[`arrow#persistent`]?t.modifiersData[`arrow#persistent`].padding:rN(),ae=ie[k],oe=ie[A],se=tN(0,C[j],re[j]),ce=y?C[j]/2-F-se-ae-E.mainAxis:ee-se-ae-E.mainAxis,le=y?-C[j]/2+F+se+oe+E.mainAxis:te+se+oe+E.mainAxis,ue=t.elements.arrow&&$M(t.elements.arrow),de=ue?b===`y`?ue.clientTop||0:ue.clientLeft||0:0,fe=D?.[b]??0,pe=M+ce-fe-de,me=M+le-fe,he=tN(p?BM(N,pe):N,M,p?zM(P,me):P);S[b]=he,O[b]=he-M}if(s){var ge=b===`x`?`top`:yM,_e=b===`x`?_M:vM,ve=S[x],ye=x===`y`?`height`:`width`,be=ve+g[ge],xe=ve-g[_e],Se=[`top`,yM].indexOf(_)!==-1,Ce=D?.[x]??0,we=Se?be:ve-C[ye]-w[ye]-Ce+E.altAxis,Te=Se?ve+C[ye]+w[ye]-Ce-E.altAxis:xe,Ee=p&&Se?nN(we,ve,Te):tN(p?we:be,ve,p?Te:xe);S[x]=Ee,O[x]=Ee-ve}t.modifiersData[r]=O}}var QN={name:`preventOverflow`,enabled:!0,phase:`main`,fn:ZN,requiresIfExists:[`offset`]};function $N(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function eP(e){return e===jM(e)||!NM(e)?CN(e):$N(e)}function tP(e){var t=e.getBoundingClientRect(),n=VM(t.width)/e.offsetWidth||1,r=VM(t.height)/e.offsetHeight||1;return n!==1||r!==1}function nP(e,t,n){n===void 0&&(n=!1);var r=NM(t),i=NM(t)&&tP(t),a=YM(t),o=WM(e,i,n),s={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(r||!r&&!n)&&((AM(t)!==`body`||DN(a))&&(s=eP(t)),NM(t)?(c=WM(t,!0),c.x+=t.clientLeft,c.y+=t.clientTop):a&&(c.x=wN(a))),{x:o.left+s.scrollLeft-c.x,y:o.top+s.scrollTop-c.y,width:o.width,height:o.height}}function rP(e){var t=new Map,n=new Set,r=[];e.forEach(function(e){t.set(e.name,e)});function i(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach(function(e){if(!n.has(e)){var r=t.get(e);r&&i(r)}}),r.push(e)}return e.forEach(function(e){n.has(e.name)||i(e)}),r}function iP(e){var t=rP(e);return kM.reduce(function(e,n){return e.concat(t.filter(function(e){return e.phase===n}))},[])}function aP(e){var t;return function(){return t||=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})}),t}}function oP(e){var t=e.reduce(function(e,t){var n=e[t.name];return e[t.name]=n?Object.assign({},n,t,{options:Object.assign({},n.options,t.options),data:Object.assign({},n.data,t.data)}):t,e},{});return Object.keys(t).map(function(e){return t[e]})}var sP={placement:`bottom`,modifiers:[],strategy:`absolute`};function cP(){return![...arguments].some(function(e){return!(e&&typeof e.getBoundingClientRect==`function`)})}function lP(e){e===void 0&&(e={});var t=e,n=t.defaultModifiers,r=n===void 0?[]:n,i=t.defaultOptions,a=i===void 0?sP:i;return function(e,t,n){n===void 0&&(n=a);var i={placement:`bottom`,orderedModifiers:[],options:Object.assign({},sP,a),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},o=[],s=!1,c={state:i,setOptions:function(n){var o=typeof n==`function`?n(i.options):n;u(),i.options=Object.assign({},a,i.options,o),i.scrollParents={reference:MM(e)?kN(e):e.contextElement?kN(e.contextElement):[],popper:kN(t)};var s=iP(oP([].concat(r,i.options.modifiers)));return i.orderedModifiers=s.filter(function(e){return e.enabled}),l(),c.update()},forceUpdate:function(){if(!s){var e=i.elements,t=e.reference,n=e.popper;if(cP(t,n)){i.rects={reference:nP(t,$M(n),i.options.strategy===`fixed`),popper:GM(n)},i.reset=!1,i.placement=i.options.placement,i.orderedModifiers.forEach(function(e){return i.modifiersData[e.name]=Object.assign({},e.data)});for(var r=0;r0&&arguments[0]!==void 0?arguments[0]:[],t=[];return e.forEach(function(e){G(e)?t.push.apply(t,U(e)):e.type===fa?t.push.apply(t,U(pP(e.children))):t.push(e)}),t.filter(function(e){return!(e&&(e.type===ma||e.type===fa&&e.children.length===0||e.type===pa&&e.children.trim()===``))})}function mP(e,t){return!e&&!t?!1:!!(!e||!t||[`width`,`height`,`x`,`y`].some(function(n){return e[n]!==t[n]}))}function hP(e){var t=Wa(),n=I();return Fr(function(){n.value=e(t)}),Lr(function(){var r=e(t);n.value!==r&&(n.value=r)}),n}var gP=z({name:`TPopupTrigger`,props:{forwardRef:Function},emits:[`resize`],setup:function(e,t){var n=t.emit,r=t.slots,i=hP(function(e){return e.parent.vnode.el.nextElementSibling}),a=I();return R(i,function(){var t;(t=e.forwardRef)==null||t.call(e,i.value)}),Uw(i,function(e){a.value=J(e,1)[0].contentRect}),R(a,function(e,t){mP(e,t)&&n(`resize`)}),function(){var e=pP(r.default?.call(r));return e.length>1||e[0]?.type===pa?B(`span`,null,[e]):e[0]}}}),_P=z({name:`TPopupContent`,emits:[`resize`],setup:function(e,t){var n=t.emit,r=t.slots;return Uw(hP(function(e){return e.vnode.el.children[0]}),function(){n(`resize`)}),function(){return B(`div`,{style:`position: absolute; top: 0px; left: 0px; width: 100%`},[r.default()])}}}),vP=z({name:`TPopupContainer`,inheritAttrs:!1,props:{parent:Object,visible:Boolean,attach:dP.attach,forwardRef:Function},emits:[`resize`,`contentMounted`],setup:function(e,t){var n=t.emit,r=t.attrs,i=t.slots,a=t.expose,o=I(),s=I(!1);function c(){n(`resize`)}return Fr(function(){requestAnimationFrame(function(){s.value=e.visible})}),R(function(){return e.visible},function(t){t&&(s.value=e.visible)}),a({unmountContent:function(){s.value=!1}}),function(){var t,a=function(){return AS(e.attach,o.value)};return B(fa,null,[B(gP,{class:r.class,forwardRef:function(t){e.forwardRef(t),o.value=t},onResize:c},fP(t=i.default())?t:{default:function(){return[t]}}),s.value&&B(rr,{disabled:!a(),to:a()},{default:function(){return[B(_P,{onResize:c,onVnodeMounted:function(){return n(`contentMounted`)}},{default:function(){return[i.content&&i.content()]}})]}})])}}});function yP(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function bP(e){for(var t=1;tn.x&&t.xn.y&&t.y0&&(qP(a.value)||qP(o.value))?(TC.error(`Breadcrumb`,`需要设置 itemsBeforeCollapse 和 itemsAfterCollapse 属性来控制省略号前后的显示项数。`),!1):!(n<=0||r<=n||s>=r)});return{getDisplayItems:H(function(){var e=t.value;if(!s.value)return e;var r=e.length,i=e.slice(0,a.value),c=e.slice(r-o.value,r);return[].concat(U(i),[{content:n,disabled:!0,isEllipsisItem:!0}],U(c))}),getEllipsisItems:H(function(){var e=t.value;if(!s.value)return[];var n=e.slice(a.value,e.length-o.value);return n.map(function(e,t){return KP(KP({},e),{},{isLast:t===n.length-1})})})}};function YP(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function XP(e){for(var t=1;t=e.maxHeight&&(l.value=!0);var t=document.querySelector(`.${n.value}__item`);t&&(a.value=t.scrollHeight+2),s.value&&(c.value=s.value.offsetHeight)});var p=function(e){return K(e)?e(co):e},m=function(t,r){var o,s=[],l;return(o=t.forEach)==null||o.call(t,function(t,o){var h=oF({},t),g=i[r]||0,_=o*a.value+(r===0?c.value:0)-g;h.children?(h.children=m(h.children,r+1),l=B(`div`,{key:o},[B(rF,{style:h.style,class:[`${n.value}__item`,`${n.value}__item--suffix`,h.class],value:h.value,theme:h.theme,active:h.active,prefixIcon:h.prefixIcon,disabled:h.disabled,minColumnWidth:e.minColumnWidth,maxColumnWidth:e.maxColumnWidth,isSubmenu:!0},{default:function(){return[B(`div`,{class:`${n.value}__item-content`},[B(`span`,{class:`${n.value}__item-text`},[p(h.content)]),B(u,{class:`${n.value}__item-direction`,size:`16`},null)]),B(`div`,{class:[`${n.value}__submenu-wrapper`,W({},`${n.value}__submenu-wrapper--${e.direction}`,e.direction)],style:{position:`absolute`,top:`${_}px`}},[B(`div`,{class:[`${n.value}__submenu`,W({},`${n.value}__submenu--disabled`,h.disabled)],style:{position:`static`,maxHeight:`${e.maxHeight}px`},onScroll:function(e){return f(e,r+1)}},[B(`ul`,null,[h.children])])])]}}),h.divider?B(RA,null,null):null])):l=B(`div`,{key:o},[B(rF,{style:h.style,class:[`${n.value}__item`,h.class],value:h.value,theme:h.theme,active:h.active,prefixIcon:h.prefixIcon,disabled:h.disabled,minColumnWidth:e.minColumnWidth,maxColumnWidth:e.maxColumnWidth,onClick:h.disabled||h.children?function(){return null}:function(e,t){return d({data:h,context:t})}},{default:function(){return[B(`span`,{class:`${n.value}__item-text`},[p(h.content)])]}}),h.divider?B(RA,null,null):null]),s.push(l)}),s};return function(){var i=t(`panelTopContent`),a=t(`panelBottomContent`);return B(`div`,{class:[r.value,`${r.value}--${e.direction}`,W({},`${r.value}--overflow`,l.value)],style:{maxHeight:`${e.maxHeight}px`},ref:o,onScroll:function(e){return f(e,0)}},[i?B(`div`,{class:`${n.value}__top-content`,ref:s},[i]):null,m(e.options,0),a?B(`div`,{class:`${n.value}__bottom-content`},[a]):null])}}});function cF(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function lF(e){for(var t=1;t0?uF(h):null})}).filter(function(e){return!!e.content})):G(e)&&G(e[0]?.children)?uF(e[0]?.children):[]};function dF(e){var t,n,r,i,a=iw(),o=Wa(),s=((t=a(`DropdownMenu`))==null||(t=t[0])==null||(t=t.children)==null||(n=t.default)==null?void 0:n.call(t))||((r=o.slots)==null||(i=r.dropdown)==null?void 0:i.call(r));return H(function(){return e.options&&e.options.length>0?e.options:uF(s)})}function fF(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function pF(e){for(var t=1;t0)for(var n=0,r=e.children.length;n0){var a=SF(this.data,n);a&&!a.children.some(function(e){return e.value===i.value})?a.children.push(i):this.cache.add(i)}else this.cache.add(i)}},{key:`select`,value:function(e){var t=bF(this.data,e,[])||[];return t.push(e),t.filter(function(e){return e!=null})}},{key:`expand`,value:function(e){var t=this;if(this.expandValues.has(e))return this.expandValues.delete(e),U(this.expandValues);if(this.expandValues.add(e),!this.isMutex.value)return U(this.expandValues);var n=xF(this.data,e)||[],r=new Set(n.filter(function(t){return t.children?.length>0&&t.value!==e}).map(function(e){return e.value}));return this.expandValues.forEach(function(e){r.has(e)&&t.expandValues.delete(e)}),U(this.expandValues)}},{key:`getChild`,value:function(e){var t=SF(this.data,e);return t?t.children:[]}}])}();function wF(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function TF(e){for(var t=1;tt+c-u)return l+s-c+u}else if(n===`start`)return l-d;else if(n===`center`)return l+(s-c)/2;else if(n===`end`)return l+s-c+u;return t}function IF(e,t,n){var r=e.navsContainer,i=e.activeTab,a=NF(r),o=NF(i),s=Math.abs(a-o);return n===`next`?t+s:t-s}function LF(e){var t=e.navsWrap,n=e.navsContainer,r=e.rightOperations,i=e.toRightBtn,a=NF(t),o=NF(n),s=NF(r),c=NF(i);return a-o+s-c}function RF(e,t){return Math.max(0,Math.min(e,t))}function zF(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function BF(e){for(var t=1;t1}),b=H(function(){return c.valueMath.abs(n)?c.value+t:c.value+n)}},N=function(){setTimeout(function(){A(FF(_(),c.value,e.scrollPosition))},0)},P=function(){Sn(function(){h.value=LF(_()),h.value-c.value<=0&&A(h.value)})};R([function(){return e.placement},function(){return e.panels}],P),R([function(){return e.scrollPosition}],N),Fw(Yy(P),l.value);var F=function(t){var n;(n=e.onAdd)==null||n.call(e,{e:t})},ee=function(t,n){var r=n.value;if(n.disabled||e.value===r)return!1;e.onChange(r)},te=function(t){var n=t.e,r=t.value,i=t.index;e.onRemove({e:n,value:r,index:i})},ne=function(t){t!=null&&t.$el&&t?.value===e.value&&m.value!==t.$el&&(m.value=t.$el,N())},re=Tw(e).setNavsWrap;Fr(function(){re(u.value),P(),N()});var ie=function(){return e.panels.map(function(t,n){var r,i=t!=null&&(r=t.children)!=null&&r.label?t.children.label():K(t.label)?t.label(co):t.label||`选项卡${n+1}`,a=e.dragSort;return a&&t.draggable===!1&&(a=t.draggable),B(jF,{ref:ne,draggable:a,key:t.value,index:n,theme:e.theme,size:e.size,placement:e.placement,label:i,active:t.value===e.value,disabled:e.disabled||t.disabled,removable:t.removable,value:t.value,onClick:function(e){return ee(e,t)},onTabRemove:te,onTabPanelRemove:t.onRemove},null)})},ae=function(){return[B(`div`,{ref:d,class:[`${t.value}__operations`,`${t.value}__operations--left`]},[B(wo,{name:`fade`,mode:`out-in`,appear:!0},{default:function(){return[y.value?B(`div`,{class:w.value,onClick:function(){return j(`prev`)}},[B(r,null,null)]):null]}})]),B(`div`,{ref:f,class:[`${t.value}__operations`,`${t.value}__operations--right`]},[B(wo,{name:`fade`,mode:`out-in`,appear:!0},{default:function(){return[b.value?B(`div`,{ref:p,class:T.value,onClick:function(){return j(`next`)}},[B(i,null,null)]):null]}}),e.addable?B(`div`,{class:E.value,onClick:F},[B(a,null,null)]):null,g.value&&e.action])]},oe=function(){var t=ie();return B(`div`,{class:D.value},[B(`div`,{class:O.value,onWheel:M},[B(`div`,{ref:u,class:k.value,style:x.value},[e.theme!==`card`&&B(MF,{placement:e.placement,value:e.value,navs:t},null),t])])])};return function(){return B(`div`,{ref:l,class:[`${t.value}__nav`],style:S.value},[ae(),oe()])}}}),HF=Y(z({name:`TTabs`,props:AF,setup:function(e){var t=Q(`tabs`),n=Q(),r=Z(),i=L(e),a=i.value,o=i.modelValue,s=J(Zw(a,o,e.defaultValue||``,e.onChange),2),c=s[0],l=s[1];Ln(`tabs`,{value:c});var u=function(t){var n;(n=e.onAdd)==null||n.call(e,{e:t.e})},d=function(e){l(e)},f=function(t){var n,r=t.e,i=t.value,a=t.index;(n=e.onRemove)==null||n.call(e,{value:i,index:a,e:r})},p=function(){var e=r(`default`);if(!e)return[];var t=function(e){return e.map(function(e){return e.children&&G(e.children)?t(e.children):e}).flat().filter(function(e){return e.type.name===`TTabPanel`})};return t(e)},m=function(){var t,i=((t=e.list)!=null&&t.length?e.list:p())||[],a=r(`action`),o=i.map(function(e){var t=e;return e.props&&Object.keys(e.props).forEach(function(n){t[n]=e.props[n]}),t}),s={theme:e.theme,value:c.value,size:e.size,disabled:e.disabled,placement:e.placement,scrollPosition:e.scrollPosition,addable:e.addable,panels:o,dragSort:e.dragSort,action:a};return B(`div`,{class:W(W({},`${n.value}-tabs__header`,!0),`${n.value}-is-${e.placement}`,!0)},[B(VF,V(s,{onDragSort:e.onDragSort,onChange:d,onAdd:u,onRemove:f}),null)])},h=function(){var t,r=p();if((t=e.list)!=null&&t.length)return e.list.map(function(e){return B(kF,V(e,{onRemove:f}),null)});if(r&&r.length)return B(`div`,{class:[`${n.value}-tabs__content`]},[r])};return function(){return B(`div`,{class:[t.value]},[e.placement===`bottom`?[h(),m()]:[m(),h()]])}}})),UF=Y(kF),WF={content:{type:[String,Function]},default:{type:[String,Function]},disabled:Boolean,icon:{type:Function},popupProps:{type:Object},title:{type:[String,Function]},value:{type:[String,Number]}},GF=z({name:`TFakeArrow`,props:{isActive:{type:Boolean},overlayClassName:{type:[String,Object,Array]},overlayStyle:{type:[Object,String]}},setup:function(e){var t=Q(`fake-arrow`),n=H(function(){return[t.value,W(W({},`${t.value}--transform`,wT()),`${t.value}--active`,e.isActive),e.overlayClassName]});return function(){return B(`svg`,{class:n.value,width:`16`,height:`16`,viewBox:`0 0 16 16`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,style:e.overlayStyle},[B(`path`,{d:`M3.75 5.7998L7.99274 10.0425L12.2361 5.79921`,stroke:`black`,"stroke-opacity":`0.9`,"stroke-width":`1.3`},null)])}}});function KF(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function qF(e){for(var t=1;t-1}),x=I(!1),S=I(!1),C=H(function(){return l.value===`light`?`#E7E7E7`:`#383838`}),w=H(function(){return v.value===`popup`?x.value:d?d.value?.includes(e.value):!1}),T=I(!1),E=I(),D=I(),O=I(),k=Q(`slide-down`);Yw(O,C);var A=I(null),j=I(null),M=function(){A.value!==null&&(clearTimeout(A.value),A.value=null),j.value!==null&&(clearTimeout(j.value),j.value=null)},N=function(e){var t=e.placement,n=E.value;if(n){var i=`${r.value}-menu__spacer`,a=t.startsWith(`bottom`),o=t.startsWith(`top`);n.classList.toggle(`${i}--bottom`,a),n.classList.toggle(`${i}--top`,o)}},P=H(function(){return[`${r.value}-submenu`,W(W({},`${r.value}-is-disabled`,e.disabled),`${r.value}-is-opened`,w.value)]}),F=H(function(){return[`${r.value}-menu__popup`,`${r.value}-is-${f?`horizontal`:`vertical`}`,W({},`${r.value}-is-opened`,x.value),e.popupProps?.overlayInnerClassName]}),ee=H(function(){return[`${r.value}-menu--${l.value}`,f&&`${r.value}-is-head-menu`,W({},`${r.value}-menu-is-nested`,T.value),e.popupProps?.overlayClassName]}),te=H(function(){return[`${r.value}-menu__item`,W(W(W({},`${r.value}-is-disabled`,e.disabled),`${r.value}-is-opened`,w.value),`${r.value}-is-active`,b.value)]}),ne=H(function(){return[`${r.value}-menu__sub`,W({},`${r.value}-is-opened`,w.value)]}),re=H(function(){return[W({},`${r.value}-fake-arrow--active`,w.value)]});Ln(`TdSubmenu`,Ft({value:c,addMenuItem:function(e){y.value.push(e),m&&m.addMenuItem(e)},setSubPopup:function(e){D.value=e},closeParentPopup:function(e){M(),j.value=setTimeout(function(){x.value=!1,j.value=null},100),K(g)&&g(e)},cancelHideTimer:function(){j.value!==null&&(clearTimeout(j.value),j.value=null),K(_)&&_()}}));var ie=function(e){K(h)&&h(e)},ae=function(){e.disabled||(M(),K(_)&&_(),A.value=setTimeout(function(){x.value||(p(e.value),Sn().then(function(){ie(E.value)})),x.value=!0,A.value=null},0))},oe=function(e){return e?.classList.contains(`${r.value}-menu__popup`)},se=function(e){M(),j.value=setTimeout(function(){var t=oe(e.relatedTarget);S.value||t||(x.value=!1,j.value=null)},100)},ce=function(e){var t=e.toElement,n=e.relatedTarget,r=t||n;if(r!==D.value){for(var i=function(e){return e===O.value};r!==null&&r!==document&&!i(r);)r=r.parentNode;S.value=!1,i(r)||(M(),j.value=setTimeout(function(){x.value=!1,j.value=null},100),g?.(e))}},le=function(){S.value=!0,j.value!==null&&(clearTimeout(j.value),j.value=null),K(_)&&_()},ue=function(){e.disabled||p(e.value)},de=function(t){var n,i=`right-top`;!T.value&&f&&(i=`bottom-left`);var o=B(`div`,{ref:E,class:[`${r.value}-menu__spacer`,W({},`${r.value}-menu__spacer--left`,T.value||!f)],onMouseenter:le,onMouseleave:ce},[B(`ul`,{class:`${r.value}-menu__popup-wrapper`},[a(`default`,`content`)])]),s={content:function(){return o}},c=((n=e.popupProps)==null||(n=n.popperOptions)==null?void 0:n.modifiers)||[],l=qF(qF({},e.popupProps?.popperOptions),{},{modifiers:[{name:`onPlacementChange`,enabled:!0,phase:`main`,fn:function(e){var t=e.state;N({placement:t.placement})}}].concat(U(c))});return B(OP,V(e.popupProps??{},{overlayInnerClassName:U(F.value),overlayClassName:U(ee.value),visible:x.value,placement:i,popperOptions:l}),qF({default:function(){return[B(`div`,{ref:O,class:te.value},[t])]}},s))},fe=function(){var e=i(`icon`),t=[B(`div`,{ref:O,class:te.value,onClick:ue},[e,B(`span`,{class:[`${r.value}-menu__content`]},[i(`title`,{silent:!0})])]),B(`ul`,{style:`opacity: 0; width: 0; height: 0; overflow: hidden`},[a(`default`,`content`)])],n=v.value===`popup`&&T.value,s=[e,B(`span`,{class:[`${r.value}-menu__content`]},[i(`title`,{silent:!0})]),B(GF,{overlayClassName:/menu/i.test(o?.parent.proxy.$options.name)?re.value:null,overlayStyle:{transform:`rotate(${n?-90:0}deg)`}},null)];return v.value===`normal`?t:de(s)},pe=function(){for(var e=n.content||n.default,t=i(`icon`),s=a(`default`,`content`),c=o.parent,l=44;c&&c.type.name!==`TMenu`;)c.type.name===`TSubmenu`&&(l+=16),c=c.parent;var u=_w(),d=u.beforeEnter,f=u.enter,p=u.afterEnter,m=u.beforeLeave,h=u.leave,g=u.afterLeave,_=v.value===`popup`&&T.value,y=[B(`div`,{ref:O,class:te.value,onClick:ue},[t,B(`span`,{class:[`${r.value}-menu__content`]},[i(`title`,{silent:!0})]),e&&B(GF,{overlayClassName:re.value,overlayStyle:{transform:`rotate(${_?-90:0}deg)`}},null)]),B(wo,{name:k.value,onBeforeEnter:d,onEnter:f,onAfterEnter:p,onBeforeLeave:m,onLeave:h,onAfterLeave:g},{default:function(){return[Fn(B(`ul`,{class:ne.value,style:{"--padding-left":`${l}px`}},[s]),[[Ho,w.value]])]}})],b=[t,B(`span`,{class:[`${r.value}-menu__content`]},[i(`title`,{silent:!0})]),B(GF,{overlayClassName:/menu/i.test(c.proxy.$options.name)?re.value:null,overlayStyle:{transform:`rotate(${_?-90:0}deg)`,"margin-left":`auto`}},null)];return v.value===`normal`?y:de(b)};return R(x,function(t){s.open(e.value,t?`add`:`remove`)}),R(E,function(){ie(E.value)}),Fr(function(){var t;s==null||(t=s.vMenu)==null||t.add({value:e.value,parent:m?.value,vnode:n.default});for(var r=o.parent;r&&!/^t(head)?menu/i.test((i=r)?.type.name);){var i;if(/submenu/i.test(r?.type.name)){T.value=!0;break}r=r?.parent}}),Rr(function(){M()}),function(){var e=null,t={},r;return v.value===`popup`&&(t={onMouseenter:ae,onMouseleave:se},u.value.length<2&&(r=B(`div`,{style:`display:none`},[a(`default`,`content`)]))),Object.keys(n).length>0&&(e=f?fe():pe()),B(`li`,V({class:P.value},t),[e,r])}}}),YF=z({name:`PopupOverflowContent`,props:{foldIndex:{type:Number,required:!0}},setup:function(e,t){var n=Q(),r=I(),i=function(){if(r.value){var t=`${n.value}-menu__item`,i=`${n.value}-submenu`,a=[],o=function(e,n){n>3||Array.from(e.children).forEach(function(e){e instanceof HTMLElement&&(e.classList.contains(t)||e.classList.contains(i)?a.push(e):o(e,n+1))})};o(r.value,0),a.forEach(function(t,n){t.style.display=n=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw TypeError(`Invalid attempt to iterate non-iterable instance. diff --git a/static/assets/inventory-BVZTHSHW.js b/static/assets/inventory-BFlQBLDI.js similarity index 99% rename from static/assets/inventory-BVZTHSHW.js rename to static/assets/inventory-BFlQBLDI.js index e9d8be5..01ecec6 100644 --- a/static/assets/inventory-BVZTHSHW.js +++ b/static/assets/inventory-BFlQBLDI.js @@ -1 +1 @@ -import{N as e,P as t,d as n,h as r,i,r as a,s as o}from"./index-BoystVy-.js";import{a as ee,n as te,r as ne,t as re}from"./utils-COFIQvWo.js";var s=n(`inventory`,()=>{let n=t(`dashboard`),s=t(!0),c=t(``),l=t(`finished`),u=t(null),d=t(null),f=e({year:new Date().getFullYear(),quarter:``}),p=t([]),m=t([]),h=t([]),g=t([]),_=t([]),v=t([]),y=t([]),b=t([]),x=t([]),S=t([]),C=t([]),w=t(null),T=t([]),E=t([]),D=t(null),O=t(null),k=t([]),A=t([]),j=t([]),M=t([]),N=t([]),P=t(!1),F=t(!1),I=t(``),L=t(null),R=t([]),z=t([]),B=t(!1),V=t([]),H=t([]),U=t(!1),W=t({}),G=null,K=null,q=t(null),J=t(null),ie=t(null),ae=t(null),oe=e({get activeTab(){return n.value},set activeTab(e){n.value=e},get backendDbReady(){return s.value},set backendDbReady(e){s.value=e},get backendDbMessage(){return c.value},set backendDbMessage(e){c.value=e},get productCategory(){return l.value},set productCategory(e){l.value=e},get dashboard(){return u.value},set dashboard(e){u.value=e},get financeSummary(){return d.value},set financeSummary(e){d.value=e},financePeriod:f,get financeTransactions(){return p.value},set financeTransactions(e){p.value=e},get receivables(){return m.value},set receivables(e){m.value=e},get payables(){return h.value},set payables(e){h.value=e},get customerFinanceStatement(){return g.value},set customerFinanceStatement(e){g.value=e},get supplierFinanceStatement(){return _.value},set supplierFinanceStatement(e){_.value=e},get customerProductStatement(){return v.value},set customerProductStatement(e){v.value=e},get supplierProductStatement(){return y.value},set supplierProductStatement(e){y.value=e},get products(){return b.value},set products(e){b.value=e},get materials(){return x.value},set materials(e){x.value=e},get finishedProducts(){return S.value},set finishedProducts(e){S.value=e},get purchaseOrders(){return C.value},set purchaseOrders(e){C.value=e},get purchaseWarehouseId(){return w.value},set purchaseWarehouseId(e){w.value=e},get purchaseReceiveItems(){return T.value},set purchaseReceiveItems(e){T.value=e},get productionOrders(){return E.value},set productionOrders(e){E.value=e},get productionPlan(){return D.value},set productionPlan(e){D.value=e},get productionWarehouseId(){return O.value},set productionWarehouseId(e){O.value=e},get suppliers(){return k.value},set suppliers(e){k.value=e},get customers(){return A.value},set customers(e){A.value=e},get warehouses(){return j.value},set warehouses(e){j.value=e},get inventory(){return M.value},set inventory(e){M.value=e},get movements(){return N.value},set movements(e){N.value=e},get loading(){return P.value},set loading(e){P.value=e},get showModal(){return F.value},set showModal(e){F.value=e},get modalType(){return I.value},set modalType(e){I.value=e},get editingItem(){return L.value},set editingItem(e){L.value=e},get productBomItems(){return R.value},set productBomItems(e){R.value=e},get materialConsumptionItems(){return z.value},set materialConsumptionItems(e){z.value=e},get showMaterialConsumptionModal(){return B.value},set showMaterialConsumptionModal(e){B.value=e},get consumedMaterials(){return V.value},set consumedMaterials(e){V.value=e},get restockItems(){return H.value},set restockItems(e){H.value=e},get showRestockModal(){return U.value},set showRestockModal(e){U.value=e},get form(){return W.value},set form(e){W.value=e}}),Y=e=>{if(!e)return null;let t=String(e).trim().replace(`T`,` `).slice(0,16).match(/^(\d{4})-(\d{2})-(\d{2})\s(\d{2}):(\d{2})$/);if(!t)return null;let n=Number(t[1]),r=Number(t[2]),i=Number(t[3]),a=Number(t[4]),o=Number(t[5]);return Number.isFinite(n+r+i+a+o)?new Date(n,r-1,i,a,o,0):null},se=e=>{if(!e)return``;let t=String(e).trim();if(/^\d{4}-\d{2}-\d{2}\s\d{2}:\d{2}/.test(t))return t.slice(0,16);if(t.includes(`T`))return t.replace(`T`,` `).slice(0,16);let n=new Date(t);if(!Number.isFinite(n.getTime()))return``;let r=e=>String(e).padStart(2,`0`);return`${n.getFullYear()}-${r(n.getMonth()+1)}-${r(n.getDate())} ${r(n.getHours())}:${r(n.getMinutes())}`},ce=e=>{if(!e)return null;let t=String(e).trim();return t.includes(`T`)?t.split(`T`)[0]:t.includes(` `)?t.split(` `)[0]:t.length===10?t:e instanceof Date?`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,`0`)}-${String(e.getDate()).padStart(2,`0`)}`:t},X=e=>{if(!e)return``;let t=String(e).trim();if(t.length===10&&!t.includes(`T`)&&!t.includes(` `))return t;let n=t.replace(` `,`T`);return n.length>=16?n.slice(0,16):n},le=e=>{if(!e)return``;let t=String(e).trim();return t.length===10&&!t.includes(`T`)&&!t.includes(` `)?t:t.replace(`T`,` `).slice(0,16)},Z=()=>{G&&=(G.destroy(),null),K&&=(K.destroy(),null)},ue=()=>{if(Z(),typeof AirDatepicker==`function`){if(I.value===`salesOrder`&&q.value){G=new AirDatepicker(q.value,{timepicker:!1,autoClose:!0,zIndex:2005,dateFormat:`yyyy-MM-dd`,onSelect:({formattedDate:e})=>{W.value.delivery_date=e||``,W.value.delivery_date_native=X(e||``)}});let e=Y(W.value.delivery_date);e&&G.selectDate(e,{silent:!0})}if(I.value===`purchaseOrder`&&J.value){K=new AirDatepicker(J.value,{timepicker:!1,autoClose:!0,zIndex:2005,dateFormat:`yyyy-MM-dd`,onSelect:({formattedDate:e})=>{W.value.expected_date=e||``,W.value.expected_date_native=X(e||``)}});let e=Y(W.value.expected_date);e&&K.selectDate(e,{silent:!0})}}},de=e=>{if(e===`delivery`&&G){G.show();return}if(e===`expected`&&K){K.show();return}let t=e===`delivery`?ie.value:ae.value;if(t){if(typeof t.showPicker==`function`){t.showPicker();return}t.focus(),t.click()}},fe=e=>({in:`其他入库`,out:`其他出库`,adjust:`库存调整`,purchase_in:`采购入库`,return_from_production:`生产退料入库`,outsource_return:`外协回库`,finish_in:`完工入库`,issue_to_production:`生产领料出库`,outsource_send:`外协发料出库`,shipment_out:`销售出库`,scrap_out:`报废出库`})[e]||e,pe=e=>[`purchase_in`,`return_from_production`,`outsource_return`,`finish_in`,`in`].includes(e)?`badge-success`:[`issue_to_production`,`outsource_send`,`shipment_out`,`scrap_out`,`out`].includes(e)?`badge-error`:`badge-warning`,me=e=>({draft:`已下单`,pending:`已下单`,partial_received:`部分收货`,received:`已收货`,paid:`已付款`,cancelled:`已作废`})[e]||e,he=e=>[`received`,`paid`,`cancelled`].includes(e),ge=e=>({manufacturing:`制造中`,delivered:`已交付`,paid:`已收款`,cancelled:`已作废`})[e]||e,_e=e=>({manufacturing:`制造中`,delivered:`已交付`,cancelled:`已作废`})[e]||e,ve=e=>({unpaid:`未收款`,paid:`已收款`})[e]||e,ye=e=>({pending:`已下单`,partial_received:`部分收货`,received:`已收货`,cancelled:`已作废`})[e]||e,be=async()=>{try{let e=await fetch(`/health`,{method:`GET`});if(!e.ok){s.value=!1,c.value=`后端服务异常,暂无法加载业务数据`;return}let t=await e.json().catch(()=>null);if(t&&t.database_connected===!1){s.value=!1,c.value=`数据库未连接,当前仅可浏览界面,业务数据暂不可用`;return}s.value=!0,c.value=``}catch{s.value=!1,c.value=`无法连接后端服务`}},xe=async()=>{P.value=!0;try{u.value=await o(`/api/dashboard`)}catch(e){i(e,`加载仪表盘`)}finally{P.value=!1}},Se=async()=>{P.value=!0;try{S.value=await o(`/api/products?item_type=finished&limit=100`)}catch(e){i(e,`加载成品`)}finally{P.value=!1}},Ce=async()=>{await Se()},we=async()=>{P.value=!0;try{x.value=await o(`/api/products?item_type=material&limit=100`)}catch(e){i(e,`加载物料`)}finally{P.value=!1}},Q=async()=>{P.value=!0;try{j.value=await o(`/api/warehouses`)}catch(e){i(e,`加载仓库`)}finally{P.value=!1}},Te=async()=>{if(x.value.length||await we(),j.value.length||await Q(),!j.value.length)try{await o(`/api/warehouses`,{method:`POST`,body:JSON.stringify({name:`默认仓库`})}),await Q(),a(`已自动创建默认仓库`,`success`)}catch(e){i(e,`自动创建默认仓库`)}},Ee=async()=>{P.value=!0;try{k.value=await o(`/api/suppliers`)}catch(e){i(e,`加载供应商`)}finally{P.value=!1}},De=async()=>{P.value=!0;try{let[e,t]=await Promise.all([o(`/api/sales-orders?limit=100`),o(`/api/warehouses`)]);E.value=e?.items||[],j.value=t||[],O.value||=j.value.find(e=>e.is_default)?.id||j.value[0]?.id||null}catch(e){i(e,`加载按单生产数据`)}finally{P.value=!1}},Oe=async()=>{P.value=!0;try{let[e,t]=await Promise.all([o(`/api/purchase-orders?limit=100`),o(`/api/warehouses`)]);C.value=e?.items||[],j.value=t||[],w.value||=j.value.find(e=>e.is_default)?.id||j.value[0]?.id||null}catch(e){i(e,`加载采购订单`)}finally{P.value=!1}},ke=async()=>{P.value=!0;try{A.value=await o(`/api/customers`)}catch(e){i(e,`加载客户`)}finally{P.value=!1}},Ae=async()=>{P.value=!0;try{M.value=(await o(`/api/inventory`))?.items||[]}catch(e){i(e,`加载库存`)}finally{P.value=!1}},je=async()=>{P.value=!0;try{N.value=(await o(`/api/stock-movements`))?.items||[]}catch(e){i(e,`加载变动记录`)}finally{P.value=!1}},Me=async()=>{P.value=!0;try{let e=Number(f.year)||new Date().getFullYear(),t=f.quarter?Number(f.quarter):null,n=t?`year=${e}&quarter=${t}`:`year=${e}`,[r,i,a,ee,te,ne,re,s]=await Promise.all([o(`/api/finance/summary?${n}`),o(`/api/finance/transactions?status=confirmed&limit=20&${n}`),o(`/api/finance/receivables?limit=20&${n}`),o(`/api/finance/payables?limit=20&${n}`),o(`/api/finance/partner-statement/customer?${n}`),o(`/api/finance/partner-statement/supplier?${n}`),o(`/api/finance/partner-product-statement/customer?${n}`),o(`/api/finance/partner-product-statement/supplier?${n}`)]);d.value=r,p.value=i?.items||[],m.value=a,h.value=ee,g.value=te.items||[],_.value=ne.items||[],v.value=re.items||[],y.value=s.items||[]}catch(e){i(e,`加载财务数据`)}finally{P.value=!1}},Ne=()=>{n.value===`finance`&&Me()},Pe=e=>{n.value=e},Fe=()=>{F.value=!1,I.value=``,L.value=null,R.value=[],T.value=[],W.value={},Z()},Ie=r(()=>(L.value?`编辑`:`新增`)+({product:W.value.item_type===`finished`?`成品`:`物料`,inventoryItem:`物料库存`,salesOrder:`销售订单`,purchaseOrder:`采购订单`,purchaseReceive:`采购到货入库`,supplier:`供应商`,customer:`客户`}[I.value]||``)),$=[{key:`overview`,title:`概览`,items:[{key:`dashboard`,label:`仪表盘`}]},{key:`sales`,title:`销售`,items:[{key:`sales_orders`,label:`销售订单管理`}]},{key:`purchase`,title:`采购`,items:[{key:`purchases`,label:`采购订单管理`}]},{key:`product`,title:`产品`,items:[{key:`products`,label:`成品管理`},{key:`materials`,label:`物料管理`}]},{key:`partner`,title:`往来单位`,items:[{key:`customers`,label:`客户管理`},{key:`suppliers`,label:`供应商管理`}]},{key:`warehouse`,title:`仓库`,items:[{key:`inventory`,label:`库存管理`},{key:`movements`,label:`库存变动记录`}]},{key:`finance`,title:`财务`,items:[{key:`finance`,label:`财务概览`}]}],Le=e(Object.fromEntries($.map(e=>[e.key,!0])));return{activeTab:n,backendDbReady:s,backendDbMessage:c,productCategory:l,dashboard:u,financeSummary:d,financePeriod:f,financeTransactions:p,receivables:m,payables:h,customerFinanceStatement:g,supplierFinanceStatement:_,customerProductStatement:v,supplierProductStatement:y,products:b,materials:x,finishedProducts:S,purchaseOrders:C,purchaseWarehouseId:w,purchaseReceiveItems:T,productionOrders:E,productionPlan:D,productionWarehouseId:O,suppliers:k,customers:A,warehouses:j,inventory:M,movements:N,loading:P,showModal:F,modalType:I,editingItem:L,productBomItems:R,materialConsumptionItems:z,showMaterialConsumptionModal:B,consumedMaterials:V,restockItems:H,showRestockModal:U,form:W,state:oe,deliveryDateInput:q,expectedDateInput:J,deliveryDateNativeInput:ie,expectedDateNativeInput:ae,menuGroups:$,openGroups:Le,activeMenu:r(()=>{for(let e of $){let t=e.items.find(e=>e.key===n.value);if(t)return{group:e,item:t}}return null}),modalTitle:Ie,parseDateTimeLocal:Y,toPickerValue:se,toApiDateTime:ce,toNativeValue:X,fromNativeValue:le,destroyPickers:Z,initPickers:ue,openDateTimePicker:de,getMovementTypeLabel:fe,getMovementBadgeClass:pe,getPurchaseOrderStatusLabel:me,isPurchaseOrderLocked:he,getSalesOrderStatusLabel:ge,getDeliveryStatusLabel:_e,getPaymentStatusLabel:ve,getReceiptStatusLabel:ye,checkBackendHealth:be,loadDashboard:xe,loadFinishedProducts:Se,loadProducts:Ce,loadMaterials:we,loadWarehouses:Q,ensureStockBaseData:Te,loadSuppliers:Ee,loadProductionOrders:De,loadPurchaseOrders:Oe,loadCustomers:ke,loadInventory:Ae,loadMovements:je,loadFinance:Me,refreshFinanceByPeriod:Ne,switchTab:Pe,closeModal:Fe,toggleGroup:e=>{Le[e]=!Le[e]},handleMenuClick:e=>{Pe(e)},switchProductCategory:e=>{l.value=e},formatCurrency:re,formatNumber:ee,formatDateTime:ne,formatDate:te}});export{s as t}; \ No newline at end of file +import{N as e,P as t,d as n,h as r,i,r as a,s as o}from"./index-Dngmm__P.js";import{a as ee,n as te,r as ne,t as re}from"./utils-COFIQvWo.js";var s=n(`inventory`,()=>{let n=t(`dashboard`),s=t(!0),c=t(``),l=t(`finished`),u=t(null),d=t(null),f=e({year:new Date().getFullYear(),quarter:``}),p=t([]),m=t([]),h=t([]),g=t([]),_=t([]),v=t([]),y=t([]),b=t([]),x=t([]),S=t([]),C=t([]),w=t(null),T=t([]),E=t([]),D=t(null),O=t(null),k=t([]),A=t([]),j=t([]),M=t([]),N=t([]),P=t(!1),F=t(!1),I=t(``),L=t(null),R=t([]),z=t([]),B=t(!1),V=t([]),H=t([]),U=t(!1),W=t({}),G=null,K=null,q=t(null),J=t(null),ie=t(null),ae=t(null),oe=e({get activeTab(){return n.value},set activeTab(e){n.value=e},get backendDbReady(){return s.value},set backendDbReady(e){s.value=e},get backendDbMessage(){return c.value},set backendDbMessage(e){c.value=e},get productCategory(){return l.value},set productCategory(e){l.value=e},get dashboard(){return u.value},set dashboard(e){u.value=e},get financeSummary(){return d.value},set financeSummary(e){d.value=e},financePeriod:f,get financeTransactions(){return p.value},set financeTransactions(e){p.value=e},get receivables(){return m.value},set receivables(e){m.value=e},get payables(){return h.value},set payables(e){h.value=e},get customerFinanceStatement(){return g.value},set customerFinanceStatement(e){g.value=e},get supplierFinanceStatement(){return _.value},set supplierFinanceStatement(e){_.value=e},get customerProductStatement(){return v.value},set customerProductStatement(e){v.value=e},get supplierProductStatement(){return y.value},set supplierProductStatement(e){y.value=e},get products(){return b.value},set products(e){b.value=e},get materials(){return x.value},set materials(e){x.value=e},get finishedProducts(){return S.value},set finishedProducts(e){S.value=e},get purchaseOrders(){return C.value},set purchaseOrders(e){C.value=e},get purchaseWarehouseId(){return w.value},set purchaseWarehouseId(e){w.value=e},get purchaseReceiveItems(){return T.value},set purchaseReceiveItems(e){T.value=e},get productionOrders(){return E.value},set productionOrders(e){E.value=e},get productionPlan(){return D.value},set productionPlan(e){D.value=e},get productionWarehouseId(){return O.value},set productionWarehouseId(e){O.value=e},get suppliers(){return k.value},set suppliers(e){k.value=e},get customers(){return A.value},set customers(e){A.value=e},get warehouses(){return j.value},set warehouses(e){j.value=e},get inventory(){return M.value},set inventory(e){M.value=e},get movements(){return N.value},set movements(e){N.value=e},get loading(){return P.value},set loading(e){P.value=e},get showModal(){return F.value},set showModal(e){F.value=e},get modalType(){return I.value},set modalType(e){I.value=e},get editingItem(){return L.value},set editingItem(e){L.value=e},get productBomItems(){return R.value},set productBomItems(e){R.value=e},get materialConsumptionItems(){return z.value},set materialConsumptionItems(e){z.value=e},get showMaterialConsumptionModal(){return B.value},set showMaterialConsumptionModal(e){B.value=e},get consumedMaterials(){return V.value},set consumedMaterials(e){V.value=e},get restockItems(){return H.value},set restockItems(e){H.value=e},get showRestockModal(){return U.value},set showRestockModal(e){U.value=e},get form(){return W.value},set form(e){W.value=e}}),Y=e=>{if(!e)return null;let t=String(e).trim().replace(`T`,` `).slice(0,16).match(/^(\d{4})-(\d{2})-(\d{2})\s(\d{2}):(\d{2})$/);if(!t)return null;let n=Number(t[1]),r=Number(t[2]),i=Number(t[3]),a=Number(t[4]),o=Number(t[5]);return Number.isFinite(n+r+i+a+o)?new Date(n,r-1,i,a,o,0):null},se=e=>{if(!e)return``;let t=String(e).trim();if(/^\d{4}-\d{2}-\d{2}\s\d{2}:\d{2}/.test(t))return t.slice(0,16);if(t.includes(`T`))return t.replace(`T`,` `).slice(0,16);let n=new Date(t);if(!Number.isFinite(n.getTime()))return``;let r=e=>String(e).padStart(2,`0`);return`${n.getFullYear()}-${r(n.getMonth()+1)}-${r(n.getDate())} ${r(n.getHours())}:${r(n.getMinutes())}`},ce=e=>{if(!e)return null;let t=String(e).trim();return t.includes(`T`)?t.split(`T`)[0]:t.includes(` `)?t.split(` `)[0]:t.length===10?t:e instanceof Date?`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,`0`)}-${String(e.getDate()).padStart(2,`0`)}`:t},X=e=>{if(!e)return``;let t=String(e).trim();if(t.length===10&&!t.includes(`T`)&&!t.includes(` `))return t;let n=t.replace(` `,`T`);return n.length>=16?n.slice(0,16):n},le=e=>{if(!e)return``;let t=String(e).trim();return t.length===10&&!t.includes(`T`)&&!t.includes(` `)?t:t.replace(`T`,` `).slice(0,16)},Z=()=>{G&&=(G.destroy(),null),K&&=(K.destroy(),null)},ue=()=>{if(Z(),typeof AirDatepicker==`function`){if(I.value===`salesOrder`&&q.value){G=new AirDatepicker(q.value,{timepicker:!1,autoClose:!0,zIndex:2005,dateFormat:`yyyy-MM-dd`,onSelect:({formattedDate:e})=>{W.value.delivery_date=e||``,W.value.delivery_date_native=X(e||``)}});let e=Y(W.value.delivery_date);e&&G.selectDate(e,{silent:!0})}if(I.value===`purchaseOrder`&&J.value){K=new AirDatepicker(J.value,{timepicker:!1,autoClose:!0,zIndex:2005,dateFormat:`yyyy-MM-dd`,onSelect:({formattedDate:e})=>{W.value.expected_date=e||``,W.value.expected_date_native=X(e||``)}});let e=Y(W.value.expected_date);e&&K.selectDate(e,{silent:!0})}}},de=e=>{if(e===`delivery`&&G){G.show();return}if(e===`expected`&&K){K.show();return}let t=e===`delivery`?ie.value:ae.value;if(t){if(typeof t.showPicker==`function`){t.showPicker();return}t.focus(),t.click()}},fe=e=>({in:`其他入库`,out:`其他出库`,adjust:`库存调整`,purchase_in:`采购入库`,return_from_production:`生产退料入库`,outsource_return:`外协回库`,finish_in:`完工入库`,issue_to_production:`生产领料出库`,outsource_send:`外协发料出库`,shipment_out:`销售出库`,scrap_out:`报废出库`})[e]||e,pe=e=>[`purchase_in`,`return_from_production`,`outsource_return`,`finish_in`,`in`].includes(e)?`badge-success`:[`issue_to_production`,`outsource_send`,`shipment_out`,`scrap_out`,`out`].includes(e)?`badge-error`:`badge-warning`,me=e=>({draft:`已下单`,pending:`已下单`,partial_received:`部分收货`,received:`已收货`,paid:`已付款`,cancelled:`已作废`})[e]||e,he=e=>[`received`,`paid`,`cancelled`].includes(e),ge=e=>({manufacturing:`制造中`,delivered:`已交付`,paid:`已收款`,cancelled:`已作废`})[e]||e,_e=e=>({manufacturing:`制造中`,delivered:`已交付`,cancelled:`已作废`})[e]||e,ve=e=>({unpaid:`未收款`,paid:`已收款`})[e]||e,ye=e=>({pending:`已下单`,partial_received:`部分收货`,received:`已收货`,cancelled:`已作废`})[e]||e,be=async()=>{try{let e=await fetch(`/health`,{method:`GET`});if(!e.ok){s.value=!1,c.value=`后端服务异常,暂无法加载业务数据`;return}let t=await e.json().catch(()=>null);if(t&&t.database_connected===!1){s.value=!1,c.value=`数据库未连接,当前仅可浏览界面,业务数据暂不可用`;return}s.value=!0,c.value=``}catch{s.value=!1,c.value=`无法连接后端服务`}},xe=async()=>{P.value=!0;try{u.value=await o(`/api/dashboard`)}catch(e){i(e,`加载仪表盘`)}finally{P.value=!1}},Se=async()=>{P.value=!0;try{S.value=await o(`/api/products?item_type=finished&limit=100`)}catch(e){i(e,`加载成品`)}finally{P.value=!1}},Ce=async()=>{await Se()},we=async()=>{P.value=!0;try{x.value=await o(`/api/products?item_type=material&limit=100`)}catch(e){i(e,`加载物料`)}finally{P.value=!1}},Q=async()=>{P.value=!0;try{j.value=await o(`/api/warehouses`)}catch(e){i(e,`加载仓库`)}finally{P.value=!1}},Te=async()=>{if(x.value.length||await we(),j.value.length||await Q(),!j.value.length)try{await o(`/api/warehouses`,{method:`POST`,body:JSON.stringify({name:`默认仓库`})}),await Q(),a(`已自动创建默认仓库`,`success`)}catch(e){i(e,`自动创建默认仓库`)}},Ee=async()=>{P.value=!0;try{k.value=await o(`/api/suppliers`)}catch(e){i(e,`加载供应商`)}finally{P.value=!1}},De=async()=>{P.value=!0;try{let[e,t]=await Promise.all([o(`/api/sales-orders?limit=100`),o(`/api/warehouses`)]);E.value=e?.items||[],j.value=t||[],O.value||=j.value.find(e=>e.is_default)?.id||j.value[0]?.id||null}catch(e){i(e,`加载按单生产数据`)}finally{P.value=!1}},Oe=async()=>{P.value=!0;try{let[e,t]=await Promise.all([o(`/api/purchase-orders?limit=100`),o(`/api/warehouses`)]);C.value=e?.items||[],j.value=t||[],w.value||=j.value.find(e=>e.is_default)?.id||j.value[0]?.id||null}catch(e){i(e,`加载采购订单`)}finally{P.value=!1}},ke=async()=>{P.value=!0;try{A.value=await o(`/api/customers`)}catch(e){i(e,`加载客户`)}finally{P.value=!1}},Ae=async()=>{P.value=!0;try{M.value=(await o(`/api/inventory`))?.items||[]}catch(e){i(e,`加载库存`)}finally{P.value=!1}},je=async()=>{P.value=!0;try{N.value=(await o(`/api/stock-movements`))?.items||[]}catch(e){i(e,`加载变动记录`)}finally{P.value=!1}},Me=async()=>{P.value=!0;try{let e=Number(f.year)||new Date().getFullYear(),t=f.quarter?Number(f.quarter):null,n=t?`year=${e}&quarter=${t}`:`year=${e}`,[r,i,a,ee,te,ne,re,s]=await Promise.all([o(`/api/finance/summary?${n}`),o(`/api/finance/transactions?status=confirmed&limit=20&${n}`),o(`/api/finance/receivables?limit=20&${n}`),o(`/api/finance/payables?limit=20&${n}`),o(`/api/finance/partner-statement/customer?${n}`),o(`/api/finance/partner-statement/supplier?${n}`),o(`/api/finance/partner-product-statement/customer?${n}`),o(`/api/finance/partner-product-statement/supplier?${n}`)]);d.value=r,p.value=i?.items||[],m.value=a,h.value=ee,g.value=te.items||[],_.value=ne.items||[],v.value=re.items||[],y.value=s.items||[]}catch(e){i(e,`加载财务数据`)}finally{P.value=!1}},Ne=()=>{n.value===`finance`&&Me()},Pe=e=>{n.value=e},Fe=()=>{F.value=!1,I.value=``,L.value=null,R.value=[],T.value=[],W.value={},Z()},Ie=r(()=>(L.value?`编辑`:`新增`)+({product:W.value.item_type===`finished`?`成品`:`物料`,inventoryItem:`物料库存`,salesOrder:`销售订单`,purchaseOrder:`采购订单`,purchaseReceive:`采购到货入库`,supplier:`供应商`,customer:`客户`}[I.value]||``)),$=[{key:`overview`,title:`概览`,items:[{key:`dashboard`,label:`仪表盘`}]},{key:`sales`,title:`销售`,items:[{key:`sales_orders`,label:`销售订单管理`}]},{key:`purchase`,title:`采购`,items:[{key:`purchases`,label:`采购订单管理`}]},{key:`product`,title:`产品`,items:[{key:`products`,label:`成品管理`},{key:`materials`,label:`物料管理`}]},{key:`partner`,title:`往来单位`,items:[{key:`customers`,label:`客户管理`},{key:`suppliers`,label:`供应商管理`}]},{key:`warehouse`,title:`仓库`,items:[{key:`inventory`,label:`库存管理`},{key:`movements`,label:`库存变动记录`}]},{key:`finance`,title:`财务`,items:[{key:`finance`,label:`财务概览`}]}],Le=e(Object.fromEntries($.map(e=>[e.key,!0])));return{activeTab:n,backendDbReady:s,backendDbMessage:c,productCategory:l,dashboard:u,financeSummary:d,financePeriod:f,financeTransactions:p,receivables:m,payables:h,customerFinanceStatement:g,supplierFinanceStatement:_,customerProductStatement:v,supplierProductStatement:y,products:b,materials:x,finishedProducts:S,purchaseOrders:C,purchaseWarehouseId:w,purchaseReceiveItems:T,productionOrders:E,productionPlan:D,productionWarehouseId:O,suppliers:k,customers:A,warehouses:j,inventory:M,movements:N,loading:P,showModal:F,modalType:I,editingItem:L,productBomItems:R,materialConsumptionItems:z,showMaterialConsumptionModal:B,consumedMaterials:V,restockItems:H,showRestockModal:U,form:W,state:oe,deliveryDateInput:q,expectedDateInput:J,deliveryDateNativeInput:ie,expectedDateNativeInput:ae,menuGroups:$,openGroups:Le,activeMenu:r(()=>{for(let e of $){let t=e.items.find(e=>e.key===n.value);if(t)return{group:e,item:t}}return null}),modalTitle:Ie,parseDateTimeLocal:Y,toPickerValue:se,toApiDateTime:ce,toNativeValue:X,fromNativeValue:le,destroyPickers:Z,initPickers:ue,openDateTimePicker:de,getMovementTypeLabel:fe,getMovementBadgeClass:pe,getPurchaseOrderStatusLabel:me,isPurchaseOrderLocked:he,getSalesOrderStatusLabel:ge,getDeliveryStatusLabel:_e,getPaymentStatusLabel:ve,getReceiptStatusLabel:ye,checkBackendHealth:be,loadDashboard:xe,loadFinishedProducts:Se,loadProducts:Ce,loadMaterials:we,loadWarehouses:Q,ensureStockBaseData:Te,loadSuppliers:Ee,loadProductionOrders:De,loadPurchaseOrders:Oe,loadCustomers:ke,loadInventory:Ae,loadMovements:je,loadFinance:Me,refreshFinanceByPeriod:Ne,switchTab:Pe,closeModal:Fe,toggleGroup:e=>{Le[e]=!Le[e]},handleMenuClick:e=>{Pe(e)},switchProductCategory:e=>{l.value=e},formatCurrency:re,formatNumber:ee,formatDateTime:ne,formatDate:te}});export{s as t}; \ No newline at end of file diff --git a/static/assets/useInventory-C7Zfw7oO.js b/static/assets/useInventory-C7Zfw7oO.js deleted file mode 100644 index 4667591..0000000 --- a/static/assets/useInventory-C7Zfw7oO.js +++ /dev/null @@ -1 +0,0 @@ -import{t as e}from"./inventory-BVZTHSHW.js";function t(){return e()}export{t}; \ No newline at end of file diff --git a/static/assets/useInventory-CrXJ8kdd.js b/static/assets/useInventory-CrXJ8kdd.js new file mode 100644 index 0000000..33b1648 --- /dev/null +++ b/static/assets/useInventory-CrXJ8kdd.js @@ -0,0 +1 @@ +import{t as e}from"./inventory-BFlQBLDI.js";function t(){return e()}export{t}; \ No newline at end of file diff --git a/static/index.html b/static/index.html index 56d8a42..7a6a4e0 100644 --- a/static/index.html +++ b/static/index.html @@ -61,7 +61,7 @@ } catch (e) {} })(); - +