1"use strict";(globalThis.webpackChunkinfinity_hitab_client=globalThis.webpackChunkinfinity_hitab_client||[]).push([[2861],{52861:(i,e,t)=>{t.r(e),t.d(e,{useTodoStore:()=>T});var s=t(94119),o=t(84522),d=t(98327),n=t(24581),h=t(10435),r=t(74003),a=t(80661),u=t.n(a);const l=[{id:"todogroup-1",updateTime:0,name:"æ¥å¸¸è®¡å",iconClass:"",children:[{id:"todo1-1",content:"ð¶ ä»å¤©ä¸å4:00å»å¹¼å¿åæ¥å°å¿åï¼åä¸å«è¿å°",expire:u()().hour(16).minute(0).second(0).millisecond(0).valueOf(),finished:!1,updateTime:0},{id:"todo1-2",content:"ð æ¥å®ä¸ä¸åï¼å»éå¸ä¹°å¹²è¾£æ¤åæ´è¡£æ¶²",finished:!1,updateTime:0},{id:"todo1-3",content:"ð æä¸ç»ç¸å¦æçµè¯å¨ç½ä¸ä¹°ç¹ä¸è¥¿",finished:!1,updateTime:0},{id:"todo1-4",content:"âï¸ é¢å®ä¸å¨å»åäº¬çæºç¥¨",finished:!1,updateTime:0},{id:"todo1-5",content:"ð ç»èå©ä¹°çæ¥ç¤¼ç©",finished:!0,updateTime:0}]},{id:"todogroup-2",updateTime:0,name:"å·¥ä½è®¡å",iconClass:"",children:[{id:"todo2-1",content:"å¨ä¸ä¸å10:30项ç®å¼ä¼ï¼è®¨è®ºæ°äº§ååç»è°æ´è®¡å",expire:u()().startOf("week").hour(10).minute(30).second(0).millisecond(0).valueOf(),repeat:"week",finished:!1,updateTime:0},{id:"todo2-2",content:"ä¸å4:30é对ä¸åä¼è®®è¿è¡ç®è¦æ±æ¥",finished:!1,updateTime:0}]}],p=[{id:"todogroup-1",updateTime:0,name:"æ¥å¸¸è®¡å",iconClass:"",children:[{id:"todo1-1",content:"Go to the bank at 2pm.",expire:u()().hour(14).minute(0).second(0).millisecond(0).valueOf(),finished:!1,updateTime:0},{id:"todo1-2",content:"Date Henry at 7pm, don't be late.",finished:!1,updateTime:0},{id:"todo1-3",content:"Go to the hospital to visit my aunt at 10am.",finished:!1,updateTime:0},{id:"todo1-4",content:"Book flight to Manchester next week.",finished:!1,updateTime:0},{id:"todo1-5",content:"Prepare Christmas gifts for kids.",finished:!0,updateTime:0}]},{id:"todogroup-2",updateTime:0,name:"å·¥ä½è®¡å",iconClass:"",children:[{id:"todo2-1",content:"Go to the factory for inspection every Friday at 3 pm.",expire:u()().startOf("week").add(5,"day").hour(15).minute(0).second(0).millisecond(0).valueOf(),repeat:"week",finished:!1,updateTime:0},{id:"todo2-2",content:"Have a meeting with Kelly at 10am to discuss the plan, remember to bring materials.",finished:!1,updateTime:0}]}],c=r.sM?l:p;var f=t(73844);const m=["rgba(255, 201, 104, 1)","rgba(152, 216, 93, 1)","rgba(255, 151, 101, 1)","rgba(133, 83, 255, 1)","rgba(146, 165, 255, 1)","rgba(212, 212, 212, 1)"],T=(0,h.Q_)(o.BU.todo,{syncStorage:{watch:["todos"]},syncCloud:{watch:["todos"]},state:()=>({todos:c,modalShow:!1,finishedShow:!1,activeGroupIndex:0,searchValue:"",activeSearch:!1,needTransition:!1,groupFlipping:!1,groupFlipingTimer:null,todoFlipping:!1,todoFlipingTimer:null,dragGroupId:"",dragTodoId:"",trigger:0}),getters:{allList(){return this.todos.reduce(((i,e)=>(e.children.forEach((e=>{i.push(e)})),i)),[])},finishedAllList(){return this.allList.filter((i=>i.finished))},unfinishedAllList(){return this.allList.filter((i=>!i.finished))},homeList(){let i=[...this.unfinishedTaskList];return i.length<m.length&&(i=i.concat(this.unfinishedAllList.filter((i=>!i.expire)))),i.length>m.length&&(i.length=m.length),i.map(((i,e)=>({...i,color:m[e]})))},homeUndoNum(){const i=this.timelineList.overdue.length+this.timelineList.today.length;return i>99?"99+":i},finishedTaskList(){return this.finishedAllList.filter((i=>i.expire)).sort(((i,e)=>i.expire-e.expire))},unfinishedTaskList(){return this.unfinishedAllList.filter((i=>i.expire)).sort(((i,e)=>i.expire-e.expire))},timelineList(){this.trigger;const i=[0,u()()],e=[i[1],u()().endOf("date")],t=[e[1],u()().add(1,"day").endOf("day")],s=[t[1],u()().endOf("week")],o=[s[1],u()().add(1,"week").endOf("week")],d=[o[1],u()().endOf("month")],n=[d[1],u()().add(1,"month").endOf("month")],h={overdue:[],today:[],tomorrow:[],week:[],nextweek:[],month:[],nextmonth:[],later:[]};return this.unfinishedTaskList.forEach((r=>{const a=u()(r.expire);a.isBefore(i[1])?h.overdue.push(r):a.isBefore(e[1])?h.today.push(r):a.isBefore(t[1])?h.tomorrow.push(r):a.isBefore(s[1])?h.week.push(r):a.isBefore(o[1])?h.nextweek.push(r):a.isBefore(d[1])?h.month.push(r):a.isBefore(n[1])?h.nextmonth.push(r):h.later.push(r)})),h},finishedTodayList(){const i=u()().endOf("date"),e=u()().startOf("date");return this.finishedTaskList.filter((t=>u()(t.expire).isBefore(i)&&u()(t.expire).isAfter(e)))},unfinishedTodayList(){const i=u()().endOf("date"),e=u()().startOf("date");return this.unfinishedTaskList.filter((t=>u()(t.expire).isBefore(i)&&u()(t.expire).isAfter(e)))},finishedGroupList(){return 0===this.todos.length||"number"!=typeof this.activeGroupIndex?[]:this.todos[this.activeGroupIndex].children.filter((i=>i.finished))},unfinishedGroupList(){return 0===this.todos.length?[]:"task"===this.activeGroupIndex?this.unfinishedTaskList:"today"===this.activeGroupIndex?this.unfinishedTodayList:this.todos[this.activeGroupIndex].children.filter((i=>!i.finished))},finishedList(){return this.activeSearch?this.finishedAllList.filter((i=>i.content.toLowerCase().includes(this.searchValue.toLowerCase()))):"number"==typeof this.activeGroupIndex?this.finishedGroupList:"task"===this.activeGroupIndex?this.finishedTaskList:"today"===this.activeGroupIndex?this.finishedTodayList:[]},unfinishedList(){return this.activeSearch?this.unfinishedAllList.filter((i=>i.content.toLowerCase().includes(this.searchValue.toLowerCase()))):this.unfinishedGroupList},currentTodoList(){return this.trigger,this.finishedShow?this.unfinishedList.concat(this.finishedList):this.unfinishedList}},actions:{refreshView(){this.trigger=Date.now()},setNeedTransition(i){this.needTransition=i},setSearchValue(i){i?(this.setNeedTransition(!1),this.activeSearch=!0):this.activeSearch=!1,this.searchValue=i},setModal(i){s.G.setStatus(n.R.todo,i),this.modalShow=i},setFinishedShow(i){this.finishedShow=i},clearCompleted(){this.finishedList.forEach((i=>{this.deleteTodo(i.id,!1)})),this.todos=[...this.todos]},saveGroup(i){let{id:e,name:t,iconClass:s}=i;e?this.todos.some((i=>{if(i.id===e)return i.name=t,i.iconClass=s,i.updateTime=Date.now(),!0})):this.todos.push({id:(0,d.kb)("todogroup-"),iconClass:s,name:t,updateTime:
1Date.now(),children:[]}),this.todos=[...this.todos]},deleteGroup(i){this.setNeedTransition(!1);const e=this.todos.findIndex((e=>e.id===i));e>-1&&(this.todos.splice(e,1),"number"==typeof this.activeGroupIndex&&this.activeGroupIndex>this.todos.length-1&&(this.activeGroupIndex=this.todos.length-1),0===this.todos.length?(this.saveGroup({name:"æ°å»ºå表",iconClass:""}),this.selectGroup(0)):this.todos=[...this.todos])},selectGroup(i){this.setNeedTransition(!1),this.activeGroupIndex=i,this.activeSearch=!1},selectGroupId(i){const e=this.todos.findIndex((e=>e.id===i));e>-1?this.selectGroup(e):this.selectGroup(i)},findTodoIndexes(i){let e,t;return this.todos.some(((s,o)=>s.children.some(((s,d)=>s.id===i&&(e=o,t=d,!0))))),"number"==typeof t?[e,t]:null},saveTodo(i,e){this.setNeedTransition(!0);const t=Date.now();if(i.id){const e=this.findTodoIndexes(i.id);if(e){const[s,o]=e;Object.assign(this.todos[s].children[o],{...i,updateTime:t}),this.todos[s].updateTime=t}}else if("number"==typeof this.activeGroupIndex)this.todos[this.activeGroupIndex].children.push({...i,id:(0,d.kb)("todo-"),updateTime:t}),this.todos[this.activeGroupIndex].updateTime=t;else if(e){const s=this.findTodoIndexes(e);if(s){const[e]=s;this.todos[e].children.push({...i,id:(0,d.kb)("todo-"),updateTime:t}),this.todos[e].updateTime=t}}this.todos=[...this.todos]},deleteTodo(i){let e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];this.setNeedTransition(!0);const t=this.findTodoIndexes(i);if(t){const[i,s]=t;this.todos[i].children.splice(s,1),this.todos[i].updateTime=Date.now(),!0===e&&(this.todos=[...this.todos])}},dragSortGroup(i,e){if(i===e)return;const t=this.todos.findIndex((i=>e===i.id)),s=this.todos.findIndex((e=>i===e.id));-1!==t&&-1!==s&&(t>s?(this.todos.splice(t+1,0,this.todos[s]),this.todos.splice(s,1)):(this.todos.splice(t,0,this.todos[s]),this.todos.splice(s+1,1)),this.selectGroupId(i),this.todos=[...this.todos],this.setGroupFlipping(!0))},setGroupFlipping(i){window.clearTimeout(this.groupFlipingTimer),i&&(this.groupFlipping=i,this.groupFlipingTimer=window.setTimeout((()=>{this.groupFlipping=!1}),200))},setDragGroupId(i){this.dragGroupId=i},dragSortTodo(i,e){var t;if(i===e)return;const s=null===(t=this.todos[this.activeGroupIndex])||void 0===t?void 0:t.children;if(!s)return;const o=s.findIndex((i=>e===i.id)),d=s.findIndex((e=>i===e.id));-1!==o&&-1!==d&&(o>d?(s.splice(o+1,0,s[d]),s.splice(d,1)):(s.splice(o,0,s[d]),s.splice(d+1,1)),this.todos=[...this.todos],this.setTodoFlipping(!0))},setTodoFlipping(i){window.clearTimeout(this.todoFlipingTimer),i&&(this.todoFlipping=i,this.todoFlipingTimer=window.setTimeout((()=>{this.todoFlipping=!1}),200))},setDragTodoId(i){this.dragTodoId=i}}});f.i.subscribe("EVERY_DAY",T().refreshView)}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.