"use strict";(globalThis.webpackChunkinfinity_hitab_client=globalThis.webpackChunkinfinity_hitab_client||[]).push([[4275],{4275:(e,o,a)=>{a.r(o),a.d(o,{useCalculatorStore:()=>h});var t=a(74003),n=a(94119),i=a(84522),c=a(24581),l=a(10435);const s=[{id:"calculator",name:"计算器",icon:"icon-jisuanqi",path:"/calc-counter/counter-panel.vue"},{id:"homeloan",name:"住房贷款",icon:"icon-fangdai",zhOnly:!0,path:"/calc-homeloan/homeloan-panel.vue"},{id:"tax",name:"个人所得税",icon:"icon-geshui",zhOnly:!0,path:"/calc-tax/tax-panel.vue"},{id:"length",name:"长度单位",icon:"icon-changdu",path:"/calc-length/length-panel.vue"},{id:"weight",name:"重量单位",icon:"icon-zhongliang",path:"/calc-weight/weight-panel.vue"},{id:"area",name:"面积单位",icon:"icon-mianji",path:"/calc-area/area-panel.vue"},{id:"volume",name:"体积单位",icon:"icon-tiji",path:"/calc-volume/volume-panel.vue"},{id:"temperature",name:"温度单位",icon:"icon-wendu",path:"/calc-temperature/temperature-panel.vue"},{id:"speed",name:"速度单位",icon:"icon-sudu",path:"/calc-speed/speed-panel.vue"},{id:"binary",name:"进制转换",icon:"icon-jinzhi",path:"/calc-binary/binary-panel.vue"},{id:"thermal",name:"热能",icon:"icon-reli",path:"/calc-thermal/thermal-panel.vue"},{id:"pressure",name:"压强",icon:"icon-yaqiang",path:"/calc-pressure/pressure-panel.vue"},{id:"power",name:"功率",icon:"icon-gongshuai",path:"/calc-power/power-panel.vue"},{id:"force",name:"力转换",icon:"icon-lizhuanhuan",path:"/calc-force/force-panel.vue"}],h=(0,l.Q_)(i.BU.calculator,{syncStorage:{watch:["topTools"]},syncCloud:{watch:["topTools"]},state:()=>({modalShow:!1,activeTool:s[0].name,toolsList:s,homeIconList:[],topTools:[]}),getters:{allList(){const e=t.sM?[...this.toolsList]:this.toolsList.filter((e=>!e.zhOnly));if(0===this.topTools.length)return e;const o=[];for(let a=0;a<this.topTools.length;a++){const t=this.topTools[a],n=e.findIndex((e=>e.id===t));o.push(e[n]),e.splice(n,1)}return[...o,...e]}},actions:{setModal(e){n.G.setStatus(c.R.calculator,e),this.modalShow=e},setHomeIconList(e){this.homeIconList=e},setActive(e){this.activeTool=e},setItemTop(e){this.topTools.includes(e)||(this.topTools=[e,...this.topTools])},cancelItemTop(e){const o=this.topTools.findIndex((o=>o===e)),a=[...this.topTools];a.splice(o,1),this.topTools=a}}})}}]);