PageSourceSearch

https://sarak.yes24.com/_nuxt/listCategoryStore.f163f550.js

js yes24.com collected 2026-09-24 08:37:55 UTC 4,465 bytes, 1 lines download raw bytes

1import{Q as h,b as n,c as a}from"./entry.3578af79.js";import{u}from"./blogMainStore.4682eab7.js";const S=h("listCategory",{state:()=>({listCategoryList:[],listGroupList:[],currentSortOption:"recent",sortListCategoryItem:[],listGroupSeqList:[],sortingGroupSeqNos:[],sortingListSeqNos:[],sortingSorts:[],modal:{catTitle:"",sufficient:!1,sortForm:!1,sortAlert:!1,lastCategoryGroup:!1,updateGroupPrivate:!1,deleteAlert:!1},blogMain:{categoryTitle:"",categorySeq:0,contentCount:0},sortFormModify:!1,noneDeleteListGrpSeqNo:0}),getters:{ListCategoryListCount:t=>t.listCategoryList.length},actions:{async selectListCategoryList(t){const r=n().loginUser.id,e=r?`/blog/${t}/list?myMemberId=${r}`:`/blog/${t}/list`;try{const s=await a(e);this.listCategoryList=s,s==="NO_CONTENT"&&(this.listCategoryList=this.listCategoryList.filter(o=>o.uid!==t)),this.listCategoryList.length>0&&(this.blogMain.categorySeq=this.listCategoryList[0].listSeqNo,this.blogMain.categoryTitle=this.listCategoryList[0].listTitle,this.blogMain.contentCount=t===r?this.listCategoryList.length:this.listCategoryList.filter(o=>o.listPermission==="Y").length)}catch(s){console.error(s)}},async selectListGroupList(t){const r=n().loginUser.id;try{const e=await a(`/blog/${t}/group/list`);this.listGroupList=e,e==="NO_CONTENT"&&(this.listGroupList=this.listGroupList.filter(o=>o.uid!==t));let s=0;this.listGroupList!=null&&this.listGroupList.length>0&&(s=this.listGroupList.filter(i=>(r===t||i.lstrssGrpShow=="Y")&&!!i.listCnt).map(i=>i.listCnt).reduce((i,l)=>i+l,0)),this.blogMain.contentCount=s}catch(e){console.error(e)}},async insertGroup(t,r,e,s){if(!n().authenticated)return!1;try{const i=await a("/blog/list/group",{method:"post",headers:{"Content-Type":"application/json"},body:JSON.stringify({mbrId:t,lstrssGrpName:r,lstrssGrpShow:e,foldYn:s})});if(i){console.log(i);let p={categoryItem:{lstrssGrpName:r,lstrssGrpShow:e==="Y",recentYn:!0,lstrssGrpSeqNo:i.lstrssGrpSeqNo,seqNo:i.lstrssGrpSeqNo,groupYn:!0,foldYn:s},subCategoryItem:[]};this.sortListCategoryItem.push(p)}}catch(i){console.error(i)}},async updateGroup(t,r,e,s,o){if(!n().authenticated)return!1;try{const l=await a("/blog/list/group",{method:"put",headers:{"Content-Type":"application/json"},body:JSON.stringify({mbrId:t,lstrssGrpName:r,lstrssGrpSeqNo:e,lstrssGrpShow:s,foldYn:o})});let p=this.sortListCategoryItem;for(let c of p)if(c.categoryItem.lstrssGrpSeqNo===e&&(c.categoryItem.lstrssGrpName=r,c.categoryItem.foldYn=o,c.categoryItem.lstrssGrpShow=s==="Y",s==="N"))for(let g of c.subCategoryItem)g.categoryItem.lstrssGrpShow=!1}catch(l){console.error(l)}},async deleteCategoryGroup(t,r){if(!n().authenticated)return!1;if(this.checkLastCategoryGroup())return this.modal.lastCategoryGroup=!0,!1;try{if(await a("/blog/list/group",{method:"delete",headers:{"Content-Type":"application/json"},body:JSON.stringify({mbrId:t,lstrssGrpSeqNo:r})})){let o=this.sortListCategoryItem;o.forEach((i,l)=>{i.categoryItem.lstrssGrpSeqNo===r&&o.splice(l,1)})}}catch(s){console.error(s)}},async selectListCateSortedList(t){var e;n().loginUser.id;const r=`/blog/${t}/group/list`;try{const s=await a(r);this.noneDeleteListGrpSeqNo=s?(e=s.find(o=>o.lstrssSortOrder==="32767"))==null?void 0:e.lstrssGrpSeqNo:0,s.forEach(o=>{this.listGroupSeqList.push(o.lstrssGrpSeqNo)}),s!=="NO_CONTENT"&&(this.sortListCategoryItem=this.selectSortedItem(s))}catch(s){console.error(s)}},selectSortedItem(t){let r=[];return t.forEach(e=>{let s=[],o=e.lstrssGrpSeqNo,i=!1,p={categoryItem:{lstrssGrpName:e.lstrssGrpName,lstrssGrpShow:e.lstrssGrpShow==="Y",recentYn:i,lstrssGrpSeqNo:o,seqNo:o,groupYn:!0,foldYn:e.foldYn,sortNo:e.lstrssSortOrder},subCategoryItem:s};r.push(p)}),r},setSortingListGrp(t){this.sortingGroupSeqNos=t,this.sortFormModify=!0},async updateListGroupSort(){let t=Array.from(this.sortingGroupSeqNos),r=t.findIndex(e=>e==this.noneDeleteListGrpSeqNo);if(r>0&&t.splice(r,1),t&&t.length<1)return!1;try{const e=await a("/blog/list/group/sort/update",{method:"PUT",body:JSON.stringify({listGroupSeqNos:t})});this.sortFormModify=!1}catch(e){console.error(e)}},setCategoryBlogMain(){u().blogMainItem.list.group.seq=-1,u().blogMainItem.list.group.title="전체";let t=0;this.listGroupList,u().blogMainItem.list.group.contentCount=t},initCateSortModal(){this.sortFormModify=!1},foldToggle(t,r){let e=this.listGroupList;for(let s of e)if(s.lstrssGrpSeqNo===t){s.foldYn=!r;break}}
1,checkLastCategoryGroup(){return this.sortListCategoryItem.length<2}}});export{S as u};

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.