PageSourceSearch

https://p-bandai.com/assets/SeriesFavorite.vue_vue_type_script_setup_true_lang-B0cxpCeM.js

js p-bandai.com collected 2026-09-24 22:01:22 UTC 1,579 bytes, 1 lines download raw bytes

1var f=Object.defineProperty;var w=(s,e,i)=>e in s?f(s,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):s[e]=i;var l=(s,e,i)=>w(s,typeof e!="symbol"?e+"":e,i);import{_ as g}from"./Favorite.vue_vue_type_script_setup_true_lang-DwKcgk_p.js";/* empty css                                                 */import{A as d,G as r,d as _,aD as y,U as W,H as L,i as x,p as S,o as z}from"./FooterGlobal-CMwk0n_C.js";class I{constructor(){l(this,"wishList",d([]));l(this,"initialized",!1)}async add(e){await r.post(`/api/my/series/wish/${e}`,e),this.wishList.value.push(e)}async delete(e){await r.delete(`/api/my/series/wish/${e}`),this.wishList.value=this.wishList.value.filter(i=>i!==e)}async initializing(){this.initialized||(this.initialized=!0,this.wishList.value=(await r.get("/api/my/series/wish")).data)}checkWished(e){return this.wishList.value.includes(e)}}const n=new I,R=_({__name:"SeriesFavorite",props:{seriesCode:{}},emits:["deleteWish"],setup(s,{emit:e}){const i=s,p=e,c=y.isLoggedIn,h=W(()=>n.checkWished(i.seriesCode)),u=d(!1),a=d(!1),m=async()=>{var o;if(a.value)a.value=!1;else if(c)if(h.value)await n.delete(i.seriesCode),p("deleteWish",i.seriesCode);else try{await n.add(i.seriesCode)}catch(t){S.isAxiosError(t)&&((o=t.response)==null?void 0:o.data.error)==="WISH_SERIES_ERR_001"&&(u.value=!0,a.value=!0)}else a.value=!a.value};return L(async()=>{c&&await n.initializing()}),(o,t)=>(z(),x(g,{"is-wished":h.value,"is-max":u.value,"is-open":a.value,"onUpdate:isOpen":t[0]||(t[0]=v=>a.value=v),onToggle:m},null,8,["is-wished","is-max","is-open"]))}});export{R as _};

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.