PageSourceSearch

https://salon-de-horizon.jp/assets/DiscordSettingScreen-CXQZy344.js

js salon-de-horizon.jp collected 2026-10-09 02:47:37 UTC 10,674 bytes, 1 lines download raw bytes

1import{r as a,j as t}from"./vendor-react-CYOoHjOf.js";import{i as L,h as F,b as $,a as k,ec as X,bX as q,q as G,o as V,fw as N,g7 as Q,fL as ee,g8 as te,g9 as ne,t as O,g as ie,au as se,M as U,C as re,ga as oe,gb as ae,j as J,ae as H,aa as ce,fO as de,fy as le,v as ue,E as pe}from"./index-D89KiHej.js";import{j as P}from"./vendor-redux-BXotTMQH.js";import{f as A,r as T}from"./mypage.helpers-CpZYO_bm.js";import{aH as c,aK as p,aV as m,b6 as ge,aI as h,bk as fe}from"./vendor-mui-YURDj8m0.js";import{v as be}from"./vendor-lodash-Cp5T_Ztg.js";import{R as he}from"./ReturnButton-Bf-Ptd7l.js";import"./vendor-axios-DccKEqp5.js";import"./vendor-auth-DXBuXNeD.js";import"./vendor-motion-CwbUqb9k.js";import"./form-validate-rlTO21D5.js";import"./mypage.types-BZip3ud9.js";const me=()=>{const e=L(),o=F(),d=ie(),{isSuperUser:l,fanclubMemberId:u}=$(),i=k(s=>s.app.fanclubSiteInfo?.fanclubSiteId),r=X.provisioningMode===q.SHTA,S=k(s=>s.mypage.discordClient),I=k(s=>s.mypage.fanclubMemberDiscordUser),f=k(s=>s.mypage.discordServers),g=k(s=>s.mypage.nfcJoinedPlans),[v,C]=a.useState(!0),[E,b]=a.useState(!1),[w,z]=a.useState([]),W=a.useMemo(()=>!r||!g?!1:g.fanclubSites.list.some(s=>s.fanclubMembership.fanclubBillingPlan?.id!=null&&!s.fanclubMembership.expireBufferingEndAt),[r,g]),Y=a.useMemo(()=>f.find(s=>s.contentProvider.fanclubSite.id===Number(i))?.discordInviteLink,[f,i]),{subscribedSites:Z,unsubscribedSites:K}=a.useMemo(()=>{if(r||!g)return{subscribedSites:[],unsubscribedSites:[]};const s=new Map(g.fanclubSites.list.map(n=>[n.id,n])),D=new Set(f.map(n=>n.contentProvider.fanclubSite.id)),M=f.filter(n=>{const j=s.get(n.contentProvider.fanclubSite.id);return j!=null&&j.fanclubMembership.fanclubBillingPlan?.id!=null&&!j.fanclubMembership.expireBufferingEndAt}).map(n=>{const j=s.get(n.contentProvider.fanclubSite.id);return{siteId:n.contentProvider.fanclubSite.id,siteName:n.contentProvider.fanclubSite.fanclubSiteName,appIconUrl:j?.currentFanclubDesign?.appIconUrl??"",discordInviteLink:n.discordInviteLink}}),x=new Set(M.map(n=>n.siteId)),y=w.filter(n=>D.has(n.id)&&!x.has(n.id)).map(n=>({siteId:n.id,siteName:n.fanclubSiteName,appIconUrl:n.fanclubDesign.appIconUrl}));return{subscribedSites:M,unsubscribedSites:y}},[r,f,g,w]);return a.useEffect(()=>{if(!u){C(!1);return}if(l){b(!0),C(!1);return}const s=G(),D=V();return e(N()),(async()=>{try{const x=await e(Q({fanclubGroupId:s,fanclubSiteId:D})).then(P);if(!x.data.discordClient){b(!0);return}if(r&&!x.data.hasDiscordBillingPlanRole){b(!0);return}if(await A(y=>e(ee({fanclubGroupId:s,fanclubMemberId:u.toString(),params:{page:y,fanclubSiteId:d?void 0:D}})).then(n=>P(n).fanclubSites)),!r){const y=await A(n=>e(te({fanclubGroupId:s,params:{page:n,sortType:ne.TYPE_8},notUpdateData:!0})).then(P));z(y.map(n=>({id:n.id,fanclubSiteName:n.fanclubSiteName,fanclubDesign:{appIconUrl:n.fanclubDesign.appIconUrl}})))}}catch(x){O({error:x,dispatch:e,history:o})}finally{C(!1)}})(),()=>{e(N())}},[e,u,o,d,r,l]),{isLoading:v,showNotFound:E,isSuperUser:l,discordClient:S,fanclubMemberDiscordUser:I,isSHTA:r,isJoinedPlan:W,discordInviteLink:Y,subscribedSites:Z,unsubscribedSites:K}},Se=e=>a.createElement("svg",{width:42,height:42,viewBox:"0 0 42 42",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},a.createElement("g",{clipPath:"url(#clip0_5819_9895)"},a.createElement("path",{d:"M35.578 7.39866C32.8593 6.12663 29.9523 5.20218 26.9131 4.67578C26.5398 5.3506 26.1038 6.25825 25.8031 6.98027C22.5724 6.49441 19.3713 6.49441 16.2 6.98027C15.8994 6.25825 15.4535 5.3506 15.0769 4.67578C12.0344 5.20218 9.12407 6.13003 6.40534 7.4054C0.921625 15.692 -0.56492 23.7728 0.178354 31.7388C3.81544 34.4549 7.34022 36.1049 10.8055 37.1845C11.6611 36.007 12.4242 34.7552 13.0816 33.436C11.8296 32.9603 10.6304 32.3732 9.49738 31.6916C9.79797 31.4689 10.092 31.2361 10.3761 30.9965C17.2868 34.2289 24.7956 34.2289 31.6238 30.9965C31.9112 31.2361 32.2052 31.4689 32.5025 31.6916C31.3661 32.3765 30.1637 32.9636 28.9117 33.4394C29.569 34.7552 30.3288 36.0104 31.1877 37.1879C34.6564 36.1082 38.1844 34.4583 41.8215 31.7388C42.6936 22.5042 40.3317 14.4976 35.578 7.39866ZM14.0231 26.8398C11.9485 26.8398 10.2472 24.9031 10.2472 22.5446C10.2472 20.1862 11.9122 18.2461 14.0231 18.2461C16.134 
118.2461 17.8352 20.1828 17.7989 22.5446C17.8022 24.9031 16.134 26.8398 14.0231 26.8398ZM27.9768 26.8398C25.9023 26.8398 24.201 24.9031 24.201 22.5446C24.201 20.1862 25.8659 18.2461 27.9768 18.2461C30.0877 18.2461 31.789 20.1828 31.7526 22.5446C31.7526 24.9031 30.0877 26.8398 27.9768 26.8398Z",fill:"#5865F2"})),a.createElement("defs",null,a.createElement("clipPath",{id:"clip0_5819_9895"},a.createElement("rect",{width:42,height:42,fill:"white"})))),xe=c(p)(({theme:e})=>({margin:e.spacing(2,0),padding:e.spacing(6),border:`1px solid ${e.palette.border}`,borderRadius:e.spacing(3),display:"flex",flexDirection:"column",alignItems:"center",gap:e.spacing(2)})),Ie=c(m)(({theme:e})=>({backgroundColor:e.palette.discord,color:e.palette.contrastText?.onDark,width:122,height:36,textTransform:"none"})),Ce=c(m)(({theme:e})=>({backgroundColor:e.palette.secondary.main,color:e.palette.text.primary,width:102,fontWeight:500})),ye=c(m)(({theme:e})=>({background:`linear-gradient(117.03deg, ${e.palette.gradient?.start} 0%, ${e.palette.gradient?.end} 100%)`,color:e.palette.contrastText?.onDark,width:"100%"})),je=c(p)(({theme:e})=>({display:"flex",alignItems:"center",gap:e.spacing(1),"& .MuiSvgIcon-root":{color:e.palette.discord,fontSize:20}})),ke=c(ge)(({theme:e})=>({width:"100%",marginTop:e.spacing(4),marginBottom:e.spacing(4)})),we=({isLinked:e,isJoinedPlan:o,discordInviteLink:d,onJoinPlan:l})=>o&&e&&d?t.jsx(m,{onClick:()=>window.open(d,"_blank","noopener"),fullWidth:!0,variant:"contained",sx:{backgroundColor:"discord"},children:"サーバーを開く"}):o?t.jsx(m,{disabled:!0,variant:"contained",fullWidth:!0,children:"入会済み"}):t.jsx(ye,{onClick:l,children:"入会して特典を受け取る"}),De=({discordOauth2ClientId:e,isLinked:o,isJoinedPlan:d,discordInviteLink:l,isSHTA:u})=>{const i=L(),r=F(),{fanclubMemberId:S}=$(),[I,f]=a.useState(!1),{discordHelpLink:g}=se(),v=()=>{const b=be.random(0,Number.MAX_SAFE_INTEGER).toString(36),w=new URLSearchParams({response_type:"token",client_id:e,redirect_uri:`${window.location.origin}${U.DISCORD_CALLBACK}`,scope:"identify",state:b});window.location.href=`${ae}?${w.toString()}`},C=()=>{r.push(`${J.SIGN_UP_PAYMENT}?contentType=${H.MY_PAGE}`)},E=()=>{S&&(f(!0),i(oe({fanclubGroupId:G(),fanclubMemberId:S})).then(P).catch(b=>{O({error:b,dispatch:i})}).finally(()=>{f(!1)}))};return t.jsxs(p,{children:[t.jsx(he,{text:"アカウント情報",path:U.ACCOUNT_INFORMATION,sx:{color:"primary.dark"}}),t.jsx(h,{variant:"h5",sx:{marginTop:2,marginBottom:6},children:"Discord連携"}),t.jsxs(xe,{children:[t.jsx(Se,{}),t.jsxs(h,{variant:"body2",align:"center",children:["会員プランに入会していると、",t.jsx("br",{}),"Discord上での特典を受け取れます。",g?.url&&t.jsxs(t.Fragment,{children:[t.jsx("br",{}),"詳しくは",t.jsx(re,{href:g.url,target:"_blank",withFixedColor:!0,children:"ヘルプ"}),"をご覧ください。"]})]}),o?t.jsxs(t.Fragment,{children:[t.jsxs(je,{children:[t.jsx(fe,{}),t.jsx("span",{children:"連携中"})]}),t.jsx(Ce,{onClick:E,disabled:I,variant:"contained",children:"連携を解除"})]}):t.jsx(Ie,{onClick:v,variant:"contained",children:"Discordと連携"}),u&&t.jsxs(t.Fragment,{children:[t.jsx(ke,{}),t.jsx(we,{isLinked:o,isJoinedPlan:d,discordInviteLink:l,onJoinPlan:C})]})]})]})},Pe=c(p)(({theme:e})=>({marginTop:e.spacing(10),borderRadius:e.shape.borderRadius})),_=c(p)(({theme:e})=>({display:"flex",alignItems:"center",padding:e.spacing(4,0),borderBottom:`1px solid ${e.palette.divider}`,cursor:"pointer"})),ve=c(p)(()=>({display:"flex",alignItems:"center",flex:1})),Ee=c(ce)(({theme:e})=>({width:40,height:40,borderRadius:"50%",objectFit:"cover",marginRight:e.spacing(3),flexShrink:0})),Me=c(p)(({theme:e})=>({display:"flex",alignItems:"center",gap:e.spacing(.5),marginBottom:e.spacing(.5)})),R=c(h)({fontSize:14,lineHeight:"20px",flex:1,fontWeight:500}),Ne=c(h)(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"center",width:"100%",height:56,borderRadius:12,backgroundColor:e.palette.background.secondary,color:e.palette.text.primary,fontSize:14})),Ue=c(m)(({theme:e})=>({background:`linear-gradient(117.03deg, ${e.palette.gradient?.start} 0%, ${e.palette.gradient?.end} 100%)`,color:e.palette.contrastText?.onDark,width:82,height:30,fontSize:12})),Ae=c(m)(({theme:e})=>({backgroundColor:e.palette.discord,color:e.palette.contrastText?.onDark,width:107,height:30,fontSize:12,whiteSpace:"nowrap",flexShrink:0})),B=({appIconUrl:e,siteName:o})=>{const d=le({siteImageUrl:e});return t.jsx(Ee,{src:d,alt:o})},Te=({subscribedSites:e,unsubscribedSites:o})=>{const d=i=>{T(i)},l=i=>{T(i,`${J.SIGN_UP_PAYMENT}?contentType=${H.MY_PAGE}`.replace(/^\//,""))},u=e.length===0&&o.length===0;return t.jsxs(Pe,{children:[t.jsx(h,{variant:"subtitle1",sx:{fontWeight:700,marginBottom:1,fontSize:18},children:"Discord特典提供中のサイト"}),t.jsx(h,{variant:"body2",sx:{color:"text.secondary",marginBottom:2},children:"会員プランに入会することで、特典を受け取ることができます"}),u?t.jsx(Ne,{children:"特典を提供しているサイトがありません"}):t.jsxs(t.Fragment,{children:[e.map(i=>t.jsxs(_,{onClick:()=>d(i.siteId),role:"button",children:[t.jsx(B,{appIconUrl:i.appIconUrl,
1siteName:i.siteName}),t.jsxs(p,{flex:1,children:[t.jsxs(Me,{children:[t.jsx(de,{id:`discord-subscribed-${i.siteId}`}),t.jsx(h,{variant:"caption",sx:{color:"gradient.start"},children:"入会中"})]}),t.jsx(R,{children:i.siteName})]}),i.discordInviteLink&&t.jsx(Ae,{onClick:r=>{r.stopPropagation(),window.open(i.discordInviteLink,"_blank","noopener")},variant:"contained",children:"サーバーを開く"})]},i.siteId)),o.map(i=>t.jsxs(_,{children:[t.jsxs(ve,{onClick:()=>d(i.siteId),children:[t.jsx(B,{appIconUrl:i.appIconUrl,siteName:i.siteName}),t.jsx(R,{children:i.siteName})]}),t.jsx(Ue,{onClick:r=>{r.stopPropagation(),l(i.siteId)},children:"入会"})]},i.siteId))]})]})},_e=()=>{const{isLoading:e,showNotFound:o,discordClient:d,fanclubMemberDiscordUser:l,isSHTA:u,isJoinedPlan:i,discordInviteLink:r,subscribedSites:S,unsubscribedSites:I}=me();return e?t.jsx(ue,{isFullScreen:!0}):o?t.jsx(pe,{notFound:!0}):t.jsx(p,{sx:{px:6},children:t.jsxs(p,{sx:{maxWidth:505,mx:"auto",mt:6,mb:32},children:[t.jsx(De,{discordOauth2ClientId:d?.discordOauth2ClientId??"",isLinked:!!l,isJoinedPlan:i,discordInviteLink:r,isSHTA:u}),!u&&t.jsx(Te,{subscribedSites:S,unsubscribedSites:I})]})})},Ze=a.memo(_e);export{Ze as default};

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.