PageSourceSearch

https://firewolf.netlify.app/_nuxt/h5-bx75Z.js

js firewolf.netlify.app collected 2026-10-03 10:44:17 UTC 128,381 bytes, 20 lines download raw bytes

1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./BmVl7Ipy.js","./CZw8qzHT.js","./DCWHEqtW.js","./NBAthv48.js","./CAFIxbXv.js","./Cqga2mdz.js","./Bh4YzkF1.js","./entry.BxPskZXL.css","./35TM4mrt.js","./CdasQrlT.js","./SayMessage._CuDTw3H.css","./DJwvPUyS.js","./DwH2E4Yy.js","./MessageCard.EfkyRxLL.css","./DIpSCz-v.js","./C1omvcmS.js","./CoP9UDNJ.js","./ByjTMUYX.js","./rkqKn9aX.js","./LoadingSpinner.-4yM-_gl.css","./D-WKdy0Y.js","./D_yAoySS.js","./BI8w7J0G.js","./DuiFmdnP.js","./ModalFilter.DENJu_0H.css","./DDHuitDn.js","./BkwhaGL2.js","./-COHRjvS.js","./xeB_6zfI.js","./dA3lD8Om.js","./BNTai1az.js","./8ZXZy_13.js","./CLlCExkg.js","./DcOTX8PF.js","./B7m_592B.js","./g7ETbS_r.js","./JunZpej0.js","./ByefOP1F.js","./CYNoHK43.js"])))=>i.map(i=>d[i]);
2import{d as He,b as pe,s as Jt,I as he,g as xe,e as Qt,_ as $t,f as Xt,c as ea}from"#entry";import{U as z}from"./DJwvPUyS.js";import{u as ee,M as Vt}from"./DCWHEqtW.js";import{A as Me,a as ce,M as ne}from"./CZw8qzHT.js";import{u as Ne}from"./CdasQrlT.js";import{r as $,c as o,b as Y,w as ye,af as Ke,A as J,aa as C,ab as y,ai as v,u as e,ag as h,as as j,o as Le,a9 as U,ah as M,aj as i,ac as H,am as I,G as ke,H as de,ae as Ce,T as Et,ax as Pt,au as Fe,ay as Tt,n as Ue,av as $e,az as ta,aA as at,aw as Ee,i as X,an as aa,ao as sa,a as We,d as At,aB as la,v as na,aC as ra}from"./Cqga2mdz.js";import{u as st,s as bt,c as oa,d as Pe,e as ia}from"./NBAthv48.js";import{V as ve}from"./C1omvcmS.js";import{u as ua}from"./CoP9UDNJ.js";import{_ as ca}from"./DwH2E4Yy.js";import{V as Oe}from"./35TM4mrt.js";import{F as Re}from"./ByjTMUYX.js";import{_ as da,L as ma}from"./rkqKn9aX.js";import{A as Be}from"./D-WKdy0Y.js";import{F as be}from"./D_yAoySS.js";import{F as Ze}from"./BI8w7J0G.js";import{M as ze}from"./DIpSCz-v.js";import{u as ga}from"./DuiFmdnP.js";const pa=new Map([[ce.SYSTEM,["PUBLIC_SYSTEM","PARTICIPANTS"]],[ce.PRIVATE_SYSTEM,["PRIVATE_SYSTEM","PRIVATE_SEER","PRIVATE_WISE","PRIVATE_PSYCHIC","PRIVATE_GURU","PRIVATE_CORONER","PRIVATE_WEREWOLF","PRIVATE_MASON","PRIVATE_SYMPATHIZER","PRIVATE_LOVERS","PRIVATE_ABILITY"]],[ce.NORMAL_SAY,["NORMAL_SAY"]],[ce.WEREWOLF_SAY,["WEREWOLF_SAY"]],[ce.SYMPATHIZE_SAY,["SYMPATHIZE_SAY"]],[ce.LOVERS_SAY,["LOVERS_SAY"]],[ce.MONOLOGUE_SAY,["MONOLOGUE_SAY"]],[ce.GRAVE_SAY,["GRAVE_SAY","SPECTATE_SAY"]],[ce.ACTION,["ACTION"]],[ce.SECRET_SAY,["SECRET_SAY"]],[ce.CREATOR_SAY,["CREATOR_SAY"]]]),va=He("village-message-filter",()=>{const n=$([...Me]),c=$(null),t=$(null),l=$(null),u=o(()=>{const a=[];return n.value.forEach(s=>{const r=pa.get(s);r&&a.push(...r)}),a}),f=a=>{a.messageTypeGroups!==void 0&&(n.value=a.messageTypeGroups??[...Me]),a.participantIdList!==void 0&&(c.value=a.participantIdList),a.toParticipantIdList!==void 0&&(t.value=a.toParticipantIdList),a.keyword!==void 0&&(l.value=a.keyword)},m=()=>{n.value=[...Me],c.value=null,t.value=null,l.value=null};return{messageTypeGroups:Y(n),participantIdFilter:Y(c),toParticipantIdFilter:Y(t),keywordFilter:Y(l),messageTypeFilter:u,setMessageFilter:f,resetMessageFilter:m}}),je=()=>{const{village:n,allParticipantIds:c}=ee(),t=va(),l=(s,r,d,b)=>{t.setMessageFilter({messageTypeGroups:s,participantIdList:r,toParticipantIdList:d,keyword:b})},u=()=>{t.resetMessageFilter(),t.setMessageFilter({participantIdList:[...c.value],toParticipantIdList:[...c.value]})},f=s=>{t.resetMessageFilter(),t.setMessageFilter({participantIdList:[s]})},m=(s,r)=>{if(s.length<=r.length)return;const d=s.filter(_=>!r.includes(_)),b=t.participantIdFilter;b!==null&&b.length===r.length&&r.every(x=>b.includes(x))&&t.setMessageFilter({participantIdList:[...b,...d]});const g=t.toParticipantIdFilter;g!==null&&g.length===r.length&&r.every(x=>g.includes(x))&&t.setMessageFilter({toParticipantIdList:[...g,...d]})};ye(c,(s,r)=>{r&&r.length>0&&m(s,r)});const a=o(()=>{if(!n)return!1;const s=c.value.length,r=t.messageTypeGroups,d=t.participantIdFilter,b=t.toParticipantIdFilter,g=t.keywordFilter;return r.length!==0&&r.length!==Me.length||d&&d.length>0&&d.length!==s||b&&b.length>0&&b.length!==s||!!g});return{messageTypeGroups:o(()=>t.messageTypeGroups),participantIds:o(()=>t.participantIdFilter),toParticipantIds:o(()=>t.toParticipantIdFilter),keyword:o(()=>t.keywordFilter),messageTypes:o(()=>t.messageTypeFilter),isFiltering:a,applyFilter:l,resetFilter:u,filterByParticipant:f}},fa=He("village-message",()=>{const n=$(null),c=$(!1),t=$(null),l=$(1),u=$(!0),f=()=>{n.value=null,c.value=!1,t.value=null,l.value=1,u.value=!0},m=b=>{n.value=b},a=b=>{c.value=b},s=b=>{t.value=b},r=b=>{l.value=b},d=b=>{u.value=b};return{messages:Y(n),loading:Y(c),error:Y(t),currentPageNum:Y(l),isDispLatest:Y(u),init:f,saveMessages:m,setLoading:a,setError:s,setCurrentPageNum:r,setIsDispLatest:d}}),Ae=()=>{const n=fa(),{villageId:c,currentVillageDay:t,village:l}=ee(),{paging:u}=Ne(),{messageTypeGroups:f,messageTypes:m,participantIds:a,toParticipantIds:s,keyword:r}=je(),{apiCall:d}=pe(),b=async()=>
2{if(!(!c.value||!t.value)){n.setLoading(!0),n.setError(null);try{const T=u.value,E={};m.value&&m.value.length>0&&f.value.length<Me.length&&(E.message_type_list=[...m.value]);const A=l.value?l.value.participant.member_list.length+l.value.spectator.member_list.length:0;a.value&&a.value.length>0&&a.value.length<A&&(E.participant_id_list=[...a.value]),s.value&&s.value.length>0&&s.value.length<A&&(E.to_participant_id_list=[...s.value]),r.value&&(E.keyword=r.value),T.isPaging&&T.messagePerPage&&(E.page_size=T.messagePerPage,E.page_num=n.isDispLatest?1e4:n.currentPageNum,E.is_disp_latest=n.isDispLatest);const N=t.value,V=`/village/${c.value}/day/${N.day}/time/${N.noonnight}/message-list`,O=new URLSearchParams;Object.entries(E).forEach(([Z,D])=>{Array.isArray(D)?D.forEach(S=>O.append(Z,String(S))):O.append(Z,String(D))});const P=O.toString()?`${V}?${O.toString()}`:V,G=await d(P);n.saveMessages(G),G.current_page_num!=null&&n.setCurrentPageNum(G.current_page_num)}catch(T){n.setError(T instanceof Error?T:new Error(`発言の取得に失敗しました (村ID: ${c.value})`)),console.error(`発言の取得に失敗しました (村ID: ${c.value}):`,T)}finally{n.setLoading(!1)}}},g=T=>{const{applyFilter:E}=je();E(T.messageTypeGroups??null,T.participantIdList??null,T.toParticipantIdList??null,T.keyword??null)},_=()=>{const{resetFilter:T}=je();T()},x=T=>{n.setCurrentPageNum(T),n.setIsDispLatest(!1),b()},p=T=>{n.setIsDispLatest(T),b()},k=(T=!1)=>{n.setCurrentPageNum(1),n.setIsDispLatest(T),b()},w=o(()=>n.isDispLatest||n.messages?.current_page_num===n.messages?.all_page_count);return{messages:o(()=>n.messages),loading:o(()=>n.loading),error:o(()=>n.error),currentPageNum:o(()=>n.currentPageNum),isDispLatest:o(()=>n.isDispLatest),isViewingLatestMessages:w,loadMessages:b,setFilter:g,resetFilter:_,setPageNum:x,setDispLatest:p,resetPaging:k}},Se=()=>{const n=st(),c=$(!1),t=$(null),{apiCall:l}=pe(),u=async()=>{c.value=!0,t.value=null;const f=n.villageId;try{const m=await l(`/village/${f}/situation`);n.saveSituation(m)}catch(m){t.value=m instanceof Error?m:new Error(`参加状況の取得に失敗しました (村ID: ${f})`),console.error(`参加状況の取得に失敗しました (村ID: ${f}):`,m)}finally{c.value=!1}};return{situation:o(()=>n.situation),loading:Y(c),error:Y(t),loadSituation:u}},ya=He("village-say-status",()=>{const n=$(!1),c=$(!1),t=$(!1),l=o(()=>n.value||c.value||t.value),u=s=>{n.value=s},f=s=>{c.value=s},m=s=>{t.value=s},a=()=>{n.value=!1,c.value=!1,t.value=!1};return{hasInputText:Y(n),isConfirmModalOpen:Y(c),isSubmitting:Y(t),isInputting:l,setHasInputText:u,setConfirmModalOpen:f,setSubmitting:m,reset:a}}),It=()=>{const n=ya();return{isInputting:o(()=>n.isInputting),setHasInputText:n.setHasInputText,setConfirmModalOpen:n.setConfirmModalOpen,setSubmitting:n.setSubmitting,reset:n.reset}},tt=$(new Set),Ie=()=>({onReset:t=>{tt.value.add(t),Ke(()=>tt.value.delete(t))},triggerReset:()=>{tt.value.forEach(t=>t())}}),Ge=()=>{const n=st(),{village:c,loadVillage:t,villageId:l,latestDay:u,isCurrentVillageDayLatest:f,changeCurrentVillageDay:m}=ee(),{loadMessages:a,isDispLatest:s,isViewingLatestMessages:r,setDispLatest:d}=Ae(),{loadSituation:b}=Se(),{isFiltering:g}=je(),{isInputting:_}=It(),{triggerReset:x}=Ie(),{apiCall:p}=pe(),k=async()=>{if(!l)return;const V=u.value,O=s.value;await t(),u.value&&m(u.value),d(!0),O&&V===u.value&&a(),b(),A(),n.saveExistsNewMessages(!1),x()},w=async()=>{c.value?.status.code===ve.PROLOGUE&&await t(),E.value&&(await a(),n.saveExistsNewMessages(!1),bt("最新発言を読み込みました"))},T=async()=>{E.value&&(await k(),bt("日付が変わりました"))},E=o(()=>!(!f.value||!r.value||_.value||g.value)),A=async()=>{const V=await N();n.saveVillageLatest(V)},N=async()=>{const O=n.villageLatest?.unix_time_milli??0,P=`/village/${n.villageId}/latest?from=${O}`;return await p(P)};return{refresh:k,handleDayChange:T,handleNewMessage:w,loadVillageLatest:N,updateVillageLatest:A}},Mt=globalThis.setInterval,Lt=()=>{const n=st(),{handleDayChange:c,handleNewMessage:t}=Ge(),l=$(null),{apiCall:u}=pe();Ke(()=>{m()});const f=()=>{m(),l.value=Mt(async()=>{await a()},30*1e3)},m=()=>{l.value&&(clearInterval(l.value),l.value=null)},a=async()=>{try{const r=n.villageLatest,d=await s();if(!r){n.saveVillageLatest(d);return}if(d.village_day_id!==r.village_day_id){n.saveExistsNewMessages(!0),c(),n.saveVillageLatest(d);return}d.unix_time_milli>r.unix_time_milli&&(n.saveExistsNewMessages(!0),t(),n.saveVillageLatest(d))}
2catch(r){console.error("最新情報の取得に失敗しました:",r)}},s=async()=>{const d=n.villageLatest?.unix_time_milli??0,b=`/village/${n.villageId}/latest?from=${d}`;return await u(b)};return{villageLatest:o(()=>n.villageLatest),existsNewMessages:o(()=>n.existsNewMessages),startPolling:f,stopPolling:m,checkLatest:a}},ba=He("village-slider",()=>{const n=$(!1),c=()=>{n.value=!n.value},t=()=>{n.value=!0},l=()=>{n.value=!1},u=()=>{n.value=!1};return{isOpen:Y(n),toggle:c,open:t,close:l,reset:u}}),lt=()=>{const n=ba(),{isOpen:c}=Jt(n);return{isOpen:c,toggle:n.toggle,open:n.open,close:n.close,reset:n.reset}},nt=()=>{const{width:n,height:c}=ua(),t=o(()=>n.value<768),l=o(()=>n.value>=1024);return{width:Y(n),height:Y(c),isMobile:Y(t),isDesktop:Y(l)}},qe=()=>{const c=(m,a,s)=>{const r=m.scrollTop,d=a-r,b=performance.now(),g=x=>x*(2-x),_=x=>{const p=x-b,k=Math.min(p/s,1),w=g(k);m.scrollTop=r+d*w,k<1&&requestAnimationFrame(_)};requestAnimationFrame(_)},t=(m,a)=>{const s=m.getBoundingClientRect(),r=a.getBoundingClientRect(),d=m.scrollTop+(r.top-s.top);c(m,d,200)};return{scrollToTop:(m="#village-article-wrapper")=>{const a=document.querySelector(m);a&&c(a,0,200)},scrollToBottom:(m="#village-article-wrapper")=>{const a=document.querySelector(m);if(!a)return;const s=document.getElementById("message-bottom");if(!s){c(a,a.scrollHeight,200);return}const r=a.getBoundingClientRect(),d=s.getBoundingClientRect(),b=a.scrollTop+(d.bottom-r.bottom);c(a,b,200)},scrollToElement:(m,a=".village-article-wrapper")=>{const s=document.querySelector(a);if(!s)return;const r=document.getElementById(m);r&&t(s,r)}}},_a={class:"z-10 flex h-8 w-full"},ha=J({__name:"VillageHeader",setup(n){const{existPrevDay:c,existNextDay:t,toPrevDay:l,toNextDay:u,nextDayId:f,latestDay:m}=ee(),{resetPaging:a}=Ae(),{scrollToTop:s}=qe(),r=()=>{l(),a(!1),s()},d=()=>{const g=f.value===m.value?.id;u(),a(g),s()},b=()=>{s()};return(g,_)=>(y(),C("div",_a,[v(z,{color:"secondary",variant:"solid",icon:"i-heroicons-chevron-left-20-solid",disabled:!e(c),class:"flex h-full cursor-pointer items-center justify-center rounded-none border-0 bg-[#363636] text-xs","aria-label":"前日へ移動",onClick:r},{default:h(()=>[..._[0]||(_[0]=[j(" 前日 ",-1)])]),_:1},8,["disabled"]),v(z,{color:"secondary",variant:"solid",icon:"i-heroicons-arrow-up-20-solid",class:"flex h-full flex-1 cursor-pointer items-center justify-center rounded-none border-0 bg-[#363636]","aria-label":"最上部にスクロール",onClick:b}),v(z,{color:"secondary",variant:"solid",icon:"i-heroicons-chevron-right-20-solid",trailing:"",disabled:!e(t),class:"flex h-full cursor-pointer items-center justify-center rounded-none border-0 bg-[#363636] text-xs","aria-label":"翌日へ移動",onClick:d},{default:h(()=>[..._[1]||(_[1]=[j(" 翌日 ",-1)])]),_:1},8,["disabled"])]))}}),xa=Object.assign(ha,{__name:"PagesVillageHeader"}),ka=()=>{const n=$(""),c=$(null),{village:t}=ee();Ke(()=>{u()});const l=()=>{u(),m();const s=t.value?.status.code;s===ve.COMPLETED||s===ve.CANCEL||(c.value=Mt(()=>{m()},1e3))},u=()=>{c.value&&(clearInterval(c.value),c.value=null)},f=s=>String(s).padStart(2,"0"),m=()=>{if(!t.value){n.value="";return}const s=t.value.status.code;if(s===ve.COMPLETED){n.value="終了",u();return}else if(s===ve.CANCEL){n.value="廃村",u();return}const r=a();if(!r){n.value="";return}const d=r.getTime()-new Date().getTime(),b=Math.floor(d/36e5),g=Math.floor((d-36e5*b)/6e4),_=Math.floor(d%6e4/1e3);d<0?n.value="残00:00:00":b>99?n.value="残99:59:59":n.value=`残${f(b)}:${f(g)}:${f(_)}`},a=()=>{if(!t.value)return null;const s=t.value.day.day_list;if(!s||s.length===0)return null;const r=s[s.length-1];if(!r)return null;const d=r.day_change_datetime;return d?new Date(parseInt(d.substring(0,4)),parseInt(d.substring(5,7))-1,parseInt(d.substring(8,10)),parseInt(d.substring(11,13)),parseInt(d.substring(14,16)),parseInt(d.substring(17,19))):null};return{timerText:Y(n),startTimer:l,stopTimer:u,updateTimer:m}},Ca={class:"z-10 flex h-full w-full"},Sa={class:"flex h-full w-20 cursor-default items-center justify-center border-l border-gray-700 bg-[#363636] text-white"},wa={class:"text-xs leading-10"},$a=J({__name:"VillageFooter",setup(n){const c=ke(()=>xe(()=>import("./BmVl7Ipy.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24]),import.meta.url)),{scrollToBottom:t}=qe(),{isFiltering:l}=je(),{existsNewMessages:u}=Lt(),{toggle:f}=lt(),{refresh:m}=Ge(),{timerText:a,startTimer:s}=ka(),{isMobile:r,isDesktop:d}=nt(),{loadMessages:b}=Ae(),g=$(!1),_=async()=>{await m(),await b(),t()},x=()=>{t()},p=()=>{g.value=!0},k=()=>{g.value=!1};return Le(()=>{s()}),(w,T)=>(y(),C("div",Ca,[e(r)?(y(),U(z,{key:0,color:"secondary",variant:"solid",icon:"i-heroicons-bars-3-20-solid",class:"flex h-full min-w-[60px] cursor-pointer items-center justify-center rounded-none border-0 border-r border-gray-700 bg-[#363636]","aria-label":"サイドバーを開く",onClick:e(f)},null,8,["onClick"])):M("",!0),v(z,{color:"secondary",variant:"solid",class:H(["flex h-full min-w-[60px] cursor-pointer items-center justify-center rounded-none border-0 border-r border-gray-700 bg-[#363636]",{"w-[120px]":!e(r)}]),"aria-label":"発言を更新",onClick:_},{default:h(()=>[v(he,{name:"i-heroicons-arrow-path-20-solid",class:H(`h-5 w-5 ${e(u)?"animate-spin text-blue-400":"text-white"}`)},null,8,["class"])]),_:1},8,["class"]),v(z,{color:"secondary",variant:"solid",class:"flex h-full flex-1 cursor-pointer items-center justify-center rounded-none border-0 bg-[#363636]","aria-label":"最下部にスクロール",onClick:x},{default:h(()=>[v(he,{name:"i-heroicons-arrow-down-20-solid",class:"h-5 w-5 border-b border-white text-white"})]),_:1}),e(d)?M("",!0):(y(),U(z,{key:1,color:"secondary",variant:"solid",class:H(["flex h-full min-w-[60px] cursor-pointer items-center justify-center rounded-none border-0 border-l border-gray-700 bg-[#363636]",{"w-[120px]":!e(r)}]),"aria-label":"発言を抽出",onClick:p},{default:h(()=>[v(he,{name:"i-heroicons-funnel",class:H(`h-5 w-5 ${e(l)?"text-blue-400":"text-white"}`)},null,8,["class"])]),_:1},8,["class"])),i("div",Sa,[i("p",wa,I(e(a)),1)]),v(e(c),{"is-open":e(g),onClose:k},null,8,["is-open"])]))}}),Va=Object.assign($a,{__name:"PagesVillageFooter"}),Ea=["aria-expanded","aria-controls","onClick"],Pa={class:"flex items-center"},Ta={class:"ml-2"},Aa=["id"],Ia={class:"pb-2"},Ma=J({__name:"Accordion",props:{items:{}},setup(n){const c=n,t=$([]);Le(()=>{t.value=c.items.map(a=>a.defaultOpen??!1)}),ye(()=>c.items,a=>{t.value=a.map((s,r)=>t.value[r]??s.defaultOpen??!1)},{deep:!0});const l=a=>{t.value[a]=!t.value[a]},u=a=>{const s=a;s.style.transition="height 0.2s ease",s.style.overflow="hidden",s.style.height="0",s.offsetHeight,s.style.height=s.scrollHeight+"px"},f=a=>{const s=a;s.style.height="",s.style.transition="",s.style.overflow=""},m=a=>{const s=a;s.style.transition="height 0.2s ease",s.style.overflow="hidden",s.style.height=s.scrollHeight+"px",s.offsetHeight,s.style.height="0"};return(a,s)=>(y(),C("div",null,[(y(!0),C(de,null,Ce(n.items,(r,d)=>(y(),C("div",{key:r.slot||d,class:"border-b border-white/10 last:border-b-0"},[i("button",{type:"button",class:"flex w-full cursor-pointer items-center justify-between border-none bg-transparent py-2.5 text-sm text-white transition-colors duration-200 hover:text-blue-400","aria-expanded":e(t)[d],"aria-controls":`accordion-content-${d}`,onClick:b=>l(d)},[i("div",Pa,[r.icon?(y(),U(he,{key:0,name:r.icon,class:"h-4 w-4 shrink-0"},null,8,["name"])):M("",!0),i("span",Ta,I(r.label),1)]),v(he,{name:"i-heroicons-chevron-right-20-solid",class:H(`h-4 w-4 shrink-0 transition-transform duration-200 ${e(t)[d]?"rotate-90":""}`)},null,8,["class"])],8,Ea),v(Et,{onEnter:u,onAfterEnter:f,onLeave:m},{default:h(()=>[Pt(i("div",{id:`accordion-content-${d}`,class:"overflow-hidden"},[i("div",Ia,[Fe(a.$slots,r.slot)])],8,Aa),[[Tt,e(t)[d]]])]),_:2},1024)]))),128))]))}}),La=Object.assign(Ma,{__name:"UiAccordion"}
2),Oa={key:0,class:"mt-4"},Ra=J({__name:"GoogleAdsSidebar",setup(n){const c=o(()=>!0);return Le(()=>{c.value&&Ue(()=>{try{(window.adsbygoogle=window.adsbygoogle||[]).push({})}catch(t){console.error("Adsense error:",t)}})}),(t,l)=>e(c)?(y(),C("div",Oa,[...l[0]||(l[0]=[i("ins",{class:"adsbygoogle",style:{display:"inline-block",width:"260px",height:"90px"},"data-ad-client":"ca-pub-0917187897820609","data-ad-slot":"2365194990"},null,-1)])])):M("",!0)}}),Da=Object.assign(Ra,{__name:"LayoutGoogleAdsSidebar"}),Na={class:"mb-4"},ja={key:0,class:"border-t border-gray-600 pt-1 pb-1"},Fa={class:"mr-2 shrink-0"},Ua={class:"flex flex-1 flex-col text-xs"},qa={class:"mb-1 flex"},za={key:0,class:"ml-1 rounded border border-gray-400 px-1 py-0.5 text-xs"},Ga={class:"flex-1 text-right"},Ya=["onClick"],Ba={class:"mb-0 flex text-gray-400"},Ha={class:"flex-1 text-right"},Ka={key:1},Wa={class:"border-t border-gray-600 pt-1 pb-1"},Za={class:"mr-2 shrink-0"},Ja={class:"flex flex-1 flex-col text-xs"},Qa={class:"mb-1 flex"},Xa={key:0,class:"ml-1 rounded border border-gray-400 px-1 py-0.5 text-xs"},es={class:"flex-1 text-right"},ts=["onClick"],as={class:"mb-0 flex text-gray-400"},ss={class:"flex-1 text-right"},ls={key:2},ns={class:"border-t border-gray-600 pt-1 pb-1"},rs={class:"mr-2 shrink-0"},os={class:"flex flex-1 flex-col text-xs"},is={class:"mb-1 flex"},us={class:"flex-1 text-right"},cs=["onClick"],ds={class:"mb-0 flex text-gray-400"},_t=20,ms=J({__name:"ParticipantList",emits:["chara-filter"],setup(n,{emit:c}){const t=Qt(),l=c,{village:u,villageId:f}=ee(),{messages:m}=Ae(),{operation:a}=Ne(),s=o(()=>{const V=u.value?.status.code;return V!==ve.PROLOGUE&&V!==ve.CANCEL}),r=o(()=>u.value?.participant.member_list??[]),d=o(()=>r.value.filter(V=>!V.dead)),b=o(()=>r.value.filter(V=>!!V.dead).slice().sort((V,O)=>_(V,O))),g=o(()=>u.value?.spectator.member_list??[]),_=(V,O)=>{const P=!!V.dead,G=!!O.dead;if(P&&!G)return 1;if(!P&&G)return-1;if(!P&&!G)return 0;const Z=V.dead.village_day.day,D=O.dead.village_day.day;if(Z!==D)return Z-D;const S=V.dead.reason,L=O.dead.reason;return x(L)-x(S)},x=V=>V==="突然"?2:V==="処刑"?1:0,p=V=>{const O=V.name;return O.length<_t?O:O.substring(0,_t)+"..."},k=V=>{const O=V.comming_outs.list;return O.length===0?null:O.map(P=>P.skill.short_name).join(",")+"CO"},w=V=>{if(!V.dead)return"";const O=V.dead.village_day.day,P=V.dead.reason;return`${O}d${P}`},T=V=>{if(!V.dead)return"";const O=V.dead.reason;return O==="突然"||O==="処刑"?"text-blue-400":"text-red-400"},E=V=>`${A(V.id)}回発言`,A=V=>m.value?m.value.today_message_count_map[V]??0:0,N=V=>{if(a.value.isOpenFilterNewtab){const P=t.resolve({path:"/village",query:{id:f.value?.toString(),filterId:V.toString()}});window.open(P.href,"_blank")}else{const{filterByParticipant:P}=je(),{loadMessages:G}=Ae();P(V),G()}l("chara-filter",V)};return(V,O)=>(y(),C("div",Na,[e(s)?(y(),C("div",ja," 生存("+I(e(d).length)+"人) ",1)):M("",!0),(y(!0),C(de,null,Ce(e(d),P=>(y(),C("div",{key:P.id,class:"flex border-t border-gray-600 pt-1 pb-1"},[i("div",Fa,[v(Oe,{chara:P.chara,"is-small":!0},null,8,["chara"])]),i("div",Ua,[i("div",qa,[i("p",null,I(p(P)),1),k(P)?(y(),C("p",za,I(k(P)),1)):M("",!0),i("p",Ga,[i("button",{type:"button",class:"text-blue-400 hover:font-bold hover:text-blue-300",onClick:G=>N(P.id)}," 抽出 ",8,Ya)])]),i("div",Ba,[i("p",{class:H(T(P))},I(w(P)),3),i("p",Ha,I(E(P)),1)])])]))),128)),e(s)&&e(b).length>0?(y(),C("div",Ka,[i("div",Wa," 死亡("+I(e(b).length)+"人) ",1),(y(!0),C(de,null,Ce(e(b),P=>(y(),C("div",{key:P.id,class:"flex border-t border-gray-600 pt-1 pb-1"},[i("div",Za,[v(Oe,{chara:P.chara,"is-small":!0},null,8,["chara"])]),i("div",Ja,[i("div",Qa,[i("p",null,I(p(P)),1),k(P)?(y(),C("p",Xa,I(k(P)),1)):M("",!0),i("p",es,[i("button",{type:"button",class:"text-blue-400 hover:font-bold hover:text-blue-300",onClick:G=>N(P.id)}," 抽出 ",8,ts)])]),i("div",as,[i("p",{class:H(T(P))},I(w(P)),3),i("p",ss,I(E(P)),1)])])]))),128))])):M("",!0),e(g).length>0?(y(),C("div",ls,[i("div",ns," 見学("+I(e(g).length)+"人) ",1),(y(!0),C(de,null,Ce(e(g),P=>(y(),C("div",{key:P.id,class:"flex border-t border-gray-600 pt-1 pb-1"},[i("div",rs,[v(Oe,{chara:P.chara,"is-small":!0},null,8,["chara"])]),i("div",os,[i("div",is,[i("p",null,I(p(P)),1),i("p",us,[i("button",{type:"button",class:"text-blue-400 hover:font-bold hover:text-blue-300",onClick:G=>N(P.id)}," 抽出 ",8,cs)])]),i("div",ds,[i("p",{class:H(T(P))},I(w(P)),3)])])]))),128))])):M("",!0)]))}}),gs=Object.assign(ms,{__name:"PagesVillageSidebarParticipantList"}),ps={class:"mb-4 text-left text-base font-bold text-white"},vs={class:"text-left"},fs=["href"],ys={key:0,class:"absolute top-1 right-1"},bs=J({__name:"VillageSidebar",setup(n){const c=ke(()=>xe(()=>import("./DDHuitDn.js"),__vite__mapDeps([25,15,2,1,3,4,5,6,7,8,9,10,11,12,13,14]),import.meta.url)),t=ke(()=>xe(()=>import("./BkwhaGL2.js"),__vite__mapDeps([26,14,5,11,12,4,6,7,9,27,21,17,2,1,3,8,10,13,15,16,18,19,20,22,23]),import.meta.url)),l=ke(()=>xe(()=>import("./xeB_6zfI.js"),__vite__mapDeps([28,14,5,11,12,4,6,7,9,22,15,2,1,3,8,10,13,16]),import.meta.url)),{village:u}=ee(),{isOpen:f,close:m}=lt(),{isMobile:a}=nt(),s=$(!1),r=$(!1),d=$(!1),b=o(()=>
2{if(!u.value)return"0";const A=u.value.participant.count,N=u.value.spectator.count;return N>0?`${A}+${N}`:`${A}`}),g=o(()=>{const A=u.value?.name||"",N=window.location.href,V=encodeURIComponent(`${A}
3${N}`),O=encodeURIComponent("炎狼国,人狼_FIREWOLF");return`https://twitter.com/share?text=${V}&hashtags=${O}`}),_=()=>{s.value=!0},x=()=>{s.value=!1},p=()=>{r.value=!0},k=()=>{r.value=!1},w=()=>{d.value=!0},T=()=>{d.value=!1},E=()=>{a.value&&m()};return(A,N)=>{const V=ca;return y(),C("div",null,[i("div",{class:H(["fixed top-0 left-0 z-20 h-[calc(100dvh-2rem-env(safe-area-inset-bottom))] overflow-x-hidden overflow-y-auto bg-[#363636] text-white transition-all duration-200 md:static md:h-dvh md:w-[280px] md:p-2.5",{"w-[280px] p-2.5":e(f),"w-0":!e(f)}])},[i("h1",ps,I(e(u)?.name??""),1),i("div",vs,[i("button",{class:"flex w-full cursor-pointer items-center py-2.5 text-sm text-white no-underline hover:text-blue-400",onClick:_,onKeydown:$e(_,["enter"])},[v(he,{name:"i-heroicons-information-circle",class:"h-4 w-4"}),N[1]||(N[1]=i("span",{class:"ml-2"},"村の設定",-1))],32),v(La,{items:[{label:`参加者(${e(b)}人)`,slot:"participants",defaultOpen:!1,icon:"i-heroicons-users"}]},{participants:h(()=>[v(gs,{onCharaFilter:E})]),_:1},8,["items"]),i("button",{class:"flex w-full cursor-pointer items-center py-2.5 text-sm text-white no-underline hover:text-blue-400",onClick:w,onKeydown:$e(w,["enter"])},[v(he,{name:"i-heroicons-document-text",class:"h-4 w-4"}),N[2]||(N[2]=i("span",{class:"ml-2"},"メモ",-1))],32),i("button",{class:"flex w-full cursor-pointer items-center py-2.5 text-sm text-white no-underline hover:text-blue-400",onClick:p,onKeydown:$e(p,["enter"])},[v(he,{name:"i-heroicons-cog-6-tooth",class:"h-4 w-4"}),N[3]||(N[3]=i("span",{class:"ml-2"},"ユーザ設定",-1))],32),i("a",{href:e(g),target:"_blank",rel:"noopener noreferrer",class:"flex w-full cursor-pointer items-center py-2.5 text-sm text-white no-underline hover:text-blue-400"},[v(he,{name:"twitter",class:"h-4 w-4"}),N[4]||(N[4]=i("span",{class:"ml-2"},"ツイート",-1))],8,fs),v(V,{to:{path:"/scrap",query:{id:e(u)?.id}},target:"_blank",class:"flex w-full cursor-pointer items-center py-2.5 text-sm text-white no-underline hover:text-blue-400"},{default:h(()=>[v(he,{name:"i-heroicons-scissors",class:"h-4 w-4"}),N[5]||(N[5]=i("span",{class:"ml-2"},"切り抜き",-1))]),_:1},8,["to"]),v(V,{to:{path:"/"},class:"flex w-full cursor-pointer items-center py-2.5 text-sm text-white no-underline hover:text-blue-400"},{default:h(()=>[v(he,{name:"i-heroicons-home",class:"h-4 w-4"}),N[6]||(N[6]=i("span",{class:"ml-2"},"トップページ",-1))]),_:1}),v(Da)]),e(a)?(y(),C("div",ys,[v(z,{color:"secondary",variant:"solid",icon:"i-heroicons-x-mark-20-solid",onClick:e(m)},null,8,["onClick"])])):M("",!0)],2),e(a)?(y(),C("div",{key:0,class:H(["fixed top-0 right-0 z-20 h-dvh w-[calc(100%-280px)] bg-gray-900/40",{block:e(f),hidden:!e(f)}]),onClick:N[0]||(N[0]=(...O)=>e(m)&&e(m)(...O))},null,2)):M("",!0),v(e(c),{"is-open":e(s),onClose:x},null,8,["is-open"]),v(e(t),{"is-open":e(r),onClose:k},null,8,["is-open"]),v(e(l),{"is-open":e(d),onClose:T},null,8,["is-open"])])}}}),ht=Object.assign(bs,{__name:"PagesVillageSidebar"}),_s={class:"inline-flex items-center"},hs=["id","tabindex","aria-checked","aria-labelledby","aria-describedby","onKeydown"],xs={key:0,class:"h-3 w-3 text-white",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"3","stroke-linecap":"round","stroke-linejoin":"round"},ks={key:0,class:"text-left"},Cs=["id"],Ss=["id"],ws=J({__name:"FormCheckbox",props:{modelValue:{type:Boolean},label:{default:void 0},description:{default:void 0},disabled:{type:Boolean,default:!1},error:{type:Boolean,default:!1},id:{default:void 0}},emits:["update:modelValue"],setup(n,{emit:c}){const t=n,l=c,u=ta(),f=at(),m=o(()=>t.id??f),a=o(()=>`${m.value}-label`),s=o(()=>`${m.value}-description`),r=o(()=>!!t.label||!!u.default),d=()=>{t.disabled||l("update:modelValue",!t.modelValue)},b=o(()=>{const g="flex h-5 w-5 shrink-0 items-center justify-center rounded border transition-colors duration-200 ease-in-out focus:outline-none focus:ring-2 focus:ring-[var(--ui-primary)] focus:ring-offset-2 dark:focus:ring-offset-gray-800",_=t.modelValue?"bg-[var(--ui-primary)] border-[var(--ui-primary)]":t.error?"bg-white border-red-500 dark:bg-gray-700 dark:border-red-500":"bg-white border-gray-300 dark:bg-gray-700 dark:border-gray-500",x=t.disabled?"opacity-50 cursor-not-allowed":"cursor-pointer";return[g,_,x].join(" ")});return(g,_)=>(y(),C("label",{class:H(["inline-flex cursor-pointer gap-2",{"cursor-not-allowed":n.disabled}]),onClick:Ee(d,["prevent"])},[i("span",_s,[i("span",{id:e(m),role:"checkbox",tabindex:n.disabled?-1:0,"aria-checked":n.modelValue,"aria-labelledby":e(r)?e(a):void 0,"aria-describedby":n.description?e(s):void 0,class:H(e(b)),onKeydown:[$e(Ee(d,["prevent"]),["space"]),$e(Ee(d,["prevent"]),["enter"])]},[n.modelValue?(y(),C("svg",xs,[..._[0]||(_[0]=[i("polyline",{points:"20 6 9 17 4 12"},null,-1)])])):M("",!0)],42,hs)]),e(r)||n.description||g.$slots.default?(y(),C("span",ks,[e(r)||g.$slots.default?(y(),C("span",{key:0,id:e(a),class:H(["text-sm leading-5 text-gray-700 dark:text-gray-300",{"opacity-50":n.disabled}])},[Fe(g.$slots,"default",{},()=>[j(I(n.label),1)])],10,Cs)):M("",!0),n.description?(y(),C("span",{key:1,id:e(s),class:"mt-1 block text-xs text-gray-500 dark:text-gray-400"},I(n.description),9,Ss)):M("",!0)])):M("",!0)],2))}}),xt=Object.assign(ws,{__name:"UiFormCheckbox"}),$s=["aria-labelledby"],Vs=["id","tabindex","aria-checked","disabled","onClick","onKeydown"],Es=J({__name:"FormCheckGroup",props:{modelValue:{},options:{},disabled:{type:Boolean,default:!1},name:{default:void 0},id:{default:void 0},ariaLabelledby:{default:void 0}},emits:["update:modelValue"],setup(n,{emit:c}){const t=n,l=c,u=at(),f=o(()=>t.id??u),m=g=>t.modelValue.includes(g),a=g=>{if(t.disabled)return;const _=m(g)?t.modelValue.filter(x=>x!==g):[...t.modelValue,g];l("update:modelValue",_)},s=g=>{if(t.disabled||t.options.length===0)return;const _=t.options.findIndex(k=>k.value===g),x=_===-1?0:(_+1)%t.options.length,p=t.options[x];p&&document.getElementById(`${f.value}-${p.value}`)?.focus()},r=g=>{if(t.disabled||t.options.length===0)return;const _=t.options.findIndex(k=>k.value===g),x=_<=0?t.options.length-1:_-1,p=t.options[x];p&&document.getElementById(`${f.value}-${p.value}`)?.focus()},d=g=>t.disabled?-1:t.modelValue.length>0&&m(g)||t.modelValue.length===0&&t.options[0]?.value===g?0:-1,b=(g,_)=>{const x=_===0,p=_===t.options.length-1,k=m(g),w="flex-1 px-3 py-1.5 text-xs font-medium border transition-colors duration-200 ease-in-out focus:outline-none focus:ring-2 focus:ring-[var(--ui-primary)] focus:z-10",T=x?"rounded-l":p?"rounded-r":"",E=x?"border":"-ml-px border",A=k?"bg-[var(--ui-primary)] border-[var(--ui-primary)] text-white":"bg-white border-gray-300 text-gray-700 hover:bg-gray-50 dark:bg-gray-800 dark:border-gray-600 dark:text-gray-300 dark:hover:bg-gray-700",N=t.disabled?"opacity-50 cursor-not-allowed":"cursor-pointer";return[w,T,E,A,N].join(" ")};return(g,_)=>(y(),C("div",{role:"group","aria-labelledby":n.ariaLabelledby,class:"flex"}
3,[(y(!0),C(de,null,Ce(n.options,(x,p)=>(y(),C("button",{id:`${e(f)}-${x.value}`,key:x.value,type:"button",role:"checkbox",tabindex:d(x.value),"aria-checked":m(x.value),disabled:n.disabled,class:H(b(x.value,p)),onClick:k=>a(x.value),onKeydown:[$e(Ee(k=>a(x.value),["prevent"]),["space"]),$e(Ee(k=>s(x.value),["prevent"]),["arrow-down"]),$e(Ee(k=>s(x.value),["prevent"]),["arrow-right"]),$e(Ee(k=>r(x.value),["prevent"]),["arrow-up"]),$e(Ee(k=>r(x.value),["prevent"]),["arrow-left"])]},I(x.label),43,Vs))),128))],8,$s))}}),Ye=Object.assign(Es,{__name:"UiFormCheckGroup"}),Ps={class:"space-y-6 text-left"},Ts={class:"mb-2 flex gap-2 text-sm"},As={class:"space-y-2"},Is={class:"mb-2 flex gap-2 text-sm"},Ms={class:"flex items-center gap-2"},Ls={class:"text-xs"},Os={class:"mb-2 flex gap-1 text-sm"},Rs={class:"flex items-center gap-2"},Ds={class:"text-xs"},Ns=J({__name:"FilterContent",props:{selectedMessageTypeGroups:{},selectedParticipantIds:{},selectedToParticipantIds:{},keyword:{},participantColumns:{default:2}},emits:["update:selectedMessageTypeGroups","update:selectedParticipantIds","update:selectedToParticipantIds","update:keyword"],setup(n,{emit:c}){const t=n,l=c,{allParticipants:u,allParticipantIds:f}=ee(),{situation:m}=Se(),a=o(()=>m.value?.participate.myself??null),s=o(()=>u.value),r=[{value:ce.NORMAL_SAY,label:"通常"},{value:ce.MONOLOGUE_SAY,label:"独り言"},{value:ce.SECRET_SAY,label:"秘話"}],d=[{value:ce.CREATOR_SAY,label:"村建て"},{value:ce.WEREWOLF_SAY,label:"囁き"},{value:ce.SYMPATHIZE_SAY,label:"共鳴"}],b=[{value:ce.LOVERS_SAY,label:"恋人"},{value:ce.GRAVE_SAY,label:"墓下見学"},{value:ce.ACTION,label:"アクション"}],g=[{value:ce.SYSTEM,label:"公開システム"},{value:ce.PRIVATE_SYSTEM,label:"非公開システム"}],_=()=>{l("update:selectedMessageTypeGroups",[...Me])},x=()=>{l("update:selectedMessageTypeGroups",[])},p=()=>{l("update:selectedMessageTypeGroups",Me.filter(D=>!t.selectedMessageTypeGroups.includes(D)))},k=D=>t.selectedParticipantIds.includes(D),w=(D,S)=>{(typeof S=="boolean"?S:S==="true")?t.selectedParticipantIds.includes(D)||l("update:selectedParticipantIds",[...t.selectedParticipantIds,D]):l("update:selectedParticipantIds",t.selectedParticipantIds.filter(R=>R!==D))},T=()=>{l("update:selectedParticipantIds",[...f.value])},E=()=>{l("update:selectedParticipantIds",[])},A=()=>{l("update:selectedParticipantIds",f.value.filter(D=>!t.selectedParticipantIds.includes(D)))},N=D=>t.selectedToParticipantIds.includes(D),V=(D,S)=>{(typeof S=="boolean"?S:S==="true")?t.selectedToParticipantIds.includes(D)||l("update:selectedToParticipantIds",[...t.selectedToParticipantIds,D]):l("update:selectedToParticipantIds",t.selectedToParticipantIds.filter(R=>R!==D))},O=()=>{l("update:selectedToParticipantIds",[...f.value])},P=()=>{l("update:selectedToParticipantIds",[])},G=()=>{l("update:selectedToParticipantIds",f.value.filter(D=>!t.selectedToParticipantIds.includes(D)))},Z=()=>{a.value&&l("update:selectedToParticipantIds",[a.value.id])};return(D,S)=>(y(),C("div",Ps,[i("section",null,[S[10]||(S[10]=i("p",{class:"mb-2 font-bold"},"発言種別",-1)),i("div",Ts,[v(z,{size:"xs",variant:"link",class:"p-0",onClick:_},{default:h(()=>[...S[5]||(S[5]=[j(" 全てON ",-1)])]),_:1}),S[8]||(S[8]=i("span",null,"/",-1)),v(z,{size:"xs",variant:"link",class:"p-0",onClick:x},{default:h(()=>[...S[6]||(S[6]=[j(" 全てOFF ",-1)])]),_:1}),S[9]||(S[9]=i("span",null,"/",-1)),v(z,{size:"xs",variant:"link",class:"p-0",onClick:p},{default:h(()=>[...S[7]||(S[7]=[j(" 反転 ",-1)])]),_:1})]),i("div",As,[v(Ye,{"model-value":n.selectedMessageTypeGroups,options:r,"onUpdate:modelValue":S[0]||(S[0]=L=>D.$emit("update:selectedMessageTypeGroups",L))},null,8,["model-value"]),v(Ye,{"model-value":n.selectedMessageTypeGroups,options:d,"onUpdate:modelValue":S[1]||(S[1]=L=>D.$emit("update:selectedMessageTypeGroups",L))},null,8,["model-value"]),v(Ye,{"model-value":n.selectedMessageTypeGroups,options:b,"onUpdate:modelValue":S[2]||(S[2]=L=>D.$emit("update:selectedMessageTypeGroups",L))},null,8,["model-value"]),v(Ye,{"model-value":n.selectedMessageTypeGroups,options:g,"onUpdate:modelValue":S[3]||(S[3]=L=>D.$emit("update:selectedMessageTypeGroups",L))},null,8,["model-value"])])]),i("section",null,[S[16]||(S[16]=i("p",{class:"mb-2 font-bold"},"発言者",-1)),i("div",Is,[v(z,{size:"xs",variant:"link",class:"p-0",onClick:T},{default:h(()=>[...S[11]||(S[11]=[j(" 全てON ",-1)])]),_:1}),S[14]||(S[14]=i("span",null,"/",-1)),v(z,{size:"xs",variant:"link",class:"p-0",onClick:E},{default:h(()=>[...S[12]||(S[12]=[j(" 全てOFF ",-1)])]),_:1}),S[15]||(S[15]=i("span",null,"/",-1)),v(z,{size:"xs",variant:"link",class:"p-0",onClick:A},{default:h(()=>[...S[13]||(S[13]=[j(" 反転 ",-1)])]),_:1})]),i("div",{class:H(["grid gap-0",t.participantColumns===1?"grid-cols-1":"grid-cols-2"])},[(y(!0),C(de,null,Ce(e(s),L=>(y(),C("div",{key:L.id,class:"border-t border-gray-300 py-1 dark:border-gray-600"},[v(xt,{"model-value":k(L.id),"onUpdate:modelValue":R=>w(L.id,R)},{default:h(()=>[i("div",Ms,[v(Oe,{chara:L.chara,"is-small":!0},null,8,["chara"]),i("span",Ls,I(L.name),1)])]),_:2},1032,["model-value","onUpdate:modelValue"])]))),128))],2)]),i("section",null,[S[17]||(S[17]=i("p",{class:"mb-2 font-bold"},"キーワード",-1)),v(Re,{"model-value":n.keyword??"",size:"sm",placeholder:"スペース区切り",class:"w-full","onUpdate:modelValue":S[4]||(S[4]=L=>
3D.$emit("update:keyword",L||null))},null,8,["model-value"])]),i("section",null,[S[25]||(S[25]=i("p",{class:"mb-2 font-bold"},"宛先",-1)),i("div",Os,[v(z,{size:"xs",variant:"link",class:"p-0",onClick:O},{default:h(()=>[...S[18]||(S[18]=[j(" 全てON ",-1)])]),_:1}),S[23]||(S[23]=i("span",null,"/",-1)),v(z,{size:"xs",variant:"link",class:"p-0",onClick:P},{default:h(()=>[...S[19]||(S[19]=[j(" 全てOFF ",-1)])]),_:1}),S[24]||(S[24]=i("span",null,"/",-1)),v(z,{size:"xs",variant:"link",class:"p-0",onClick:G},{default:h(()=>[...S[20]||(S[20]=[j(" 反転 ",-1)])]),_:1}),e(a)?(y(),C(de,{key:0},[S[22]||(S[22]=i("span",null,"/",-1)),v(z,{size:"xs",variant:"link",class:"p-0",onClick:Z},{default:h(()=>[...S[21]||(S[21]=[j(" 自分宛 ",-1)])]),_:1})],64)):M("",!0)]),i("div",{class:H(["grid gap-0",t.participantColumns===1?"grid-cols-1":"grid-cols-2"])},[(y(!0),C(de,null,Ce(e(s),L=>(y(),C("div",{key:L.id,class:"border-t border-gray-300 py-1 dark:border-gray-600"},[v(xt,{"model-value":N(L.id),"onUpdate:modelValue":R=>V(L.id,R)},{default:h(()=>[i("div",Rs,[v(Oe,{chara:L.chara,"is-small":!0},null,8,["chara"]),i("span",Ds,I(L.name),1)])]),_:2},1032,["model-value","onUpdate:modelValue"])]))),128))],2)])]))}}),js=Object.assign(Ns,{__name:"PagesVillageFilterContent"}),Fs={class:"dark flex h-dvh w-[280px] flex-col overflow-hidden bg-[#363636] text-white"},Us={class:"flex-1 overflow-y-auto p-2.5"},qs={class:"flex shrink-0 justify-end gap-2 border-t border-gray-600 p-2.5 pb-[calc(0.625rem+env(safe-area-inset-bottom))]"},zs=J({__name:"VillageFilterSidebar",setup(n){const{applyFilter:c,resetFilter:t,messageTypeGroups:l,participantIds:u,toParticipantIds:f,keyword:m}=je(),{village:a,allParticipantIds:s}=ee(),{loadMessages:r}=Ae(),d=$([...Me]),b=$([]),g=$([]),_=$(null),x=o(()=>d.value.length>0&&b.value.length>0),p=()=>{d.value=l.value?[...l.value]:[...Me],b.value=u.value?[...u.value]:[...s.value],g.value=f.value?[...f.value]:[...s.value],_.value=m.value??null};Le(()=>{p()}),ye(s,()=>{p()}),ye([l,u,f,m],()=>{p()});const k=()=>{const T=d.value.length===Me.length?null:d.value,E=b.value.length===s.value.length?null:b.value,A=g.value.length===s.value.length?null:g.value;c(T,E,A,_.value),r()},w=()=>{t(),p(),r()};return(T,E)=>(y(),C("div",Fs,[E[6]||(E[6]=i("div",{class:"shrink-0 border-b border-gray-600 p-2.5"},[i("h2",{class:"text-base font-bold"},"発言抽出")],-1)),i("div",Us,[e(a)?(y(),U(js,{key:0,"selected-message-type-groups":e(d),"onUpdate:selectedMessageTypeGroups":E[0]||(E[0]=A=>X(d)?d.value=A:null),"selected-participant-ids":e(b),"onUpdate:selectedParticipantIds":E[1]||(E[1]=A=>X(b)?b.value=A:null),"selected-to-participant-ids":e(g),"onUpdate:selectedToParticipantIds":E[2]||(E[2]=A=>X(g)?g.value=A:null),keyword:e(_),"onUpdate:keyword":E[3]||(E[3]=A=>X(_)?_.value=A:null),"participant-columns":1},null,8,["selected-message-type-groups","selected-participant-ids","selected-to-participant-ids","keyword"])):M("",!0)]),i("div",qs,[v(z,{color:"secondary",variant:"solid",size:"sm",onClick:w},{default:h(()=>[...E[4]||(E[4]=[j(" リセット ",-1)])]),_:1}),v(z,{color:"primary",size:"sm",disabled:!e(x),onClick:k},{default:h(()=>[...E[5]||(E[5]=[j(" 抽出する ",-1)])]),_:1},8,["disabled"])])]))}}),Gs=Object.assign(zs,{__name:"PagesVillageFilterSidebar"}),Ys={class:"mx-auto my-4 flex max-w-[640px] flex-wrap gap-1 px-1.5 text-left text-xs"},Bs={key:0,class:"text-gray-400"},Hs=["onClick"],Ks={key:2},Ws=J({__name:"VillageDayList",setup(n){const{village:c,latestDay:t,currentVillageDay:l,changeCurrentVillageDay:u,isCurrentVillageDayLatest:f}=ee(),{resetPaging:m}=Ae(),{scrollToTop:a}=qe(),s=o(()=>c.value?.day.day_list??[]),r=o(()=>l.value?.id??null),d=g=>{const _=c.value?.status.code;if(_===ve.COMPLETED){if(t.value?.id===g.id)return"終了";if(s.value.slice(-2)[0]?.id===g.id)return"エピローグ"}return _===ve.EPILOGUE&&t.value?.id===g.id?"エピローグ":g.day===0?"プロローグ":`${g.day}日目`},b=g=>{u(g),m(f.value),a()};return(g,_)=>(y(),C("ul",Ys,[(y(!0),C(de,null,Ce(e(s),(x,p)=>(y(),C("li",{key:x.id,class:"inline"},[p!==0?(y(),C("span",Bs," > ")):M("",!0),x.id!==e(r)?(y(),C("a",{key:1,href:"javascript:void(0);",class:"text-blue-600 hover:underline dark:text-(--ui-primary)",onClick:k=>
3b(x)},I(d(x)),9,Hs)):(y(),C("span",Ks,I(d(x)),1))]))),128))]))}}),kt=Object.assign(Ws,{__name:"PagesVillageDayList"}),Zs={key:0,class:"mx-1.5 my-2.5 flex items-center gap-2"},Js={class:"flex flex-1 items-center justify-end gap-1","aria-label":"ページ"},Qs=["disabled"],Xs=["disabled"],el=["aria-current","onClick"],tl=["disabled"],al=["disabled"],ge="flex h-6 min-w-6 items-center justify-center rounded border px-2 text-xs transition-colors",sl=J({__name:"MessagePagination",props:{messages:{},isLatestActive:{type:Boolean,default:!1}},emits:["change-page","disp-latest"],setup(n,{emit:c}){const t=n,{theme:l}=Ne(),u=o(()=>l.value.isDark),f=c,m=o(()=>t.isLatestActive||t.messages?.exist_pre_page),a=o(()=>t.isLatestActive&&t.messages?.all_page_count?t.messages.all_page_count:t.messages?.current_page_num??1),s=o(()=>m.value?u.value?`${ge} border-gray-600 bg-transparent text-gray-300 hover:bg-gray-700`:`${ge} border-gray-300 bg-white text-gray-700 hover:bg-gray-100`:u.value?`${ge} cursor-not-allowed border-gray-700 bg-gray-800 text-gray-600`:`${ge} cursor-not-allowed border-gray-200 bg-gray-100 text-gray-400`),r=o(()=>!t.isLatestActive&&!t.messages?.exist_next_page?u.value?`${ge} cursor-not-allowed border-gray-700 bg-gray-800 text-gray-600`:`${ge} cursor-not-allowed border-gray-200 bg-gray-100 text-gray-400`:u.value?`${ge} border-gray-600 bg-transparent text-gray-300 hover:bg-gray-700`:`${ge} border-gray-300 bg-white text-gray-700 hover:bg-gray-100`),d=o(()=>!t.isLatestActive&&a.value===1?u.value?`${ge} cursor-not-allowed border-gray-700 bg-gray-800 text-gray-600`:`${ge} cursor-not-allowed border-gray-200 bg-gray-100 text-gray-400`:u.value?`${ge} border-gray-600 bg-transparent text-gray-300 hover:bg-gray-700`:`${ge} border-gray-300 bg-white text-gray-700 hover:bg-gray-100`),b=o(()=>!t.messages?.all_page_count||!t.isLatestActive&&a.value===t.messages.all_page_count?u.value?`${ge} cursor-not-allowed border-gray-700 bg-gray-800 text-gray-600`:`${ge} cursor-not-allowed border-gray-200 bg-gray-100 text-gray-400`:u.value?`${ge} border-gray-600 bg-transparent text-gray-300 hover:bg-gray-700`:`${ge} border-gray-300 bg-white text-gray-700 hover:bg-gray-100`),g=A=>!t.isLatestActive&&A===a.value?`${ge} border-blue-500 bg-blue-500 text-white`:u.value?`${ge} border-gray-600 bg-transparent text-gray-300 hover:bg-gray-700`:`${ge} border-gray-300 bg-white text-gray-700 hover:bg-gray-100`,_=o(()=>{const A="rounded border px-3 py-1 text-xs transition-colors";return t.isLatestActive?`${A} border-blue-500 bg-blue-500 text-white`:u.value?`${A} border-gray-600 bg-transparent text-blue-400 hover:bg-gray-700`:`${A} border-gray-300 bg-white text-blue-600 hover:bg-gray-100`}),x=o(()=>{if(!t.messages||!t.messages.all_page_count)return[];const A=t.messages.all_page_count,N=a.value,V=5;if(A<=V)return Array.from({length:A},(P,G)=>G+1);const O=[];if(N<=3)for(let P=1;P<=V;P++)O.push(P);else if(N>=A-2)for(let P=A-4;P<=A;P++)O.push(P);else for(let P=N-2;P<=N+2;P++)O.push(P);return O}),p=A=>{f("change-page",A)},k=()=>{if(t.isLatestActive&&t.messages?.all_page_count){f("change-page",t.messages.all_page_count);return}t.messages?.current_page_num&&t.messages.current_page_num>1&&f("change-page",t.messages.current_page_num-1)},w=()=>{if(t.isLatestActive&&t.messages?.all_page_count){f("change-page",t.messages.all_page_count);return}t.messages?.current_page_num&&t.messages?.all_page_count&&t.messages.current_page_num<t.messages.all_page_count&&f("change-page",t.messages.current_page_num+1)},T=()=>{f("change-page",1)},E=()=>{t.messages?.all_page_count&&f("change-page",t.messages.all_page_count)};return(A,N)=>n.messages&&n.messages.all_page_count&&n.messages.all_page_count>1?(y(),C("div",Zs,[i("nav",Js,[i("button",{type:"button",disabled:!n.isLatestActive&&e(a)===1,class:H(e(d)),"aria-label":"最初のページ",onClick:T}," << ",10,Qs),i("button",{type:"button",disabled:!e(m),class:H(e(s)),"aria-label":"前のページ",onClick:k},[v(he,{name:"i-heroicons-chevron-left-20-solid",class:"h-3.5 w-3.5"})],10,Xs),(y(!0),C(de,null,Ce(e(x),V=>(y(),C("button",{key:V,type:"button",class:H(g(V)),"aria-current":!n.isLatestActive&&V===e(a)?"page":void 0,onClick:O=>p(V)},I(V),11,el))),128)),i("button",{type:"button",disabled:!n.isLatestActive&&!n.messages?.exist_next_page,class:H(e(r)),"aria-label":"次のページ",onClick:w},[v(he,{name:"i-heroicons-chevron-right-20-solid",class:"h-3.5 w-3.5"})],10,tl),i("button",{type:"button",disabled:!n.messages?.all_page_count||!n.isLatestActive&&e(a)===n.messages.all_page_count,class:H(e(b)),"aria-label":"最後のページ",onClick:E}," >> ",10,al)]),i("button",{type:"button",class:H(e(_)),onClick:N[0]||(N[0]=V=>A.$emit("disp-latest"))}," 最新 ",2)])):M("",!0)}}),Ct=Object.assign(sl,{__name:"PagesVillageMessagePagination"}),ll={key:0,class:"text-xs leading-4.5"},nl=["innerHTML"],rl=["innerHTML"],ol=["innerHTML"],il=J({__name:"VillageSituationMessage",setup(n){const{village:c,latestDay:t,isCurrentVillageDayLatest:l}=ee(),{messages:u}=Ae(),{messageDisplay:f}=Ne(),m=o(()=>
3{if(!c.value)return"";switch(c.value.status.code){case ve.PROLOGUE:return s.value;case ve.IN_PROGRESS:return r.value;case ve.EPILOGUE:return b.value;case ve.COMPLETED:return g.value;case ve.CANCEL:return _.value;default:return""}}),a=o(()=>m.value.replace(/\n/g,"<br />")),s=o(()=>{if(!c.value)return"";const L=c.value.setting.capacity.min,R=c.value.participant.count,te=c.value.setting.time.start_datetime;return R<L?`${te}時点で${L}人集まれば村が開始されます。`:`${te}に村が開始されます。`}),r=o(()=>{if(!c.value)return"";const L=c.value.day.day_list;if(L.length===0)return"";const R=L.at(-1);return R?R.day===1?`${x.value}に日付が更新されます。
4能力者は対象を選択してセットしてください。${d.value}`:`${x.value}に日付が更新されます。
5処刑したい人に投票してください。
6能力者は対象を選択してセットしてください。${d.value}`:""}),d=o(()=>c.value&&c.value.setting.rules.available_commit?`
7全員が時短希望すると、すぐに日付が更新されます。`:""),b=o(()=>c.value?.win_camp?`${c.value.win_camp.name}の勝利です。
8全てのログとユーザー名を公開します。
9今回の感想などを話し合いましょう。
10
11${x.value}に村が終了します。`:""),g=o(()=>"この村は終了しました。"),_=o(()=>"この村は廃村になりました。"),x=o(()=>{if(!c.value)return"";const R=c.value.day.day_list.at(-1);return R?R.day_change_datetime:""}),p=o(()=>k.value&&w.value&&N.value&&!T.value),k=o(()=>c.value?c.value.status.code===ve.IN_PROGRESS:!1),w=o(()=>c.value?c.value.setting.rules.available_suddenly_death:!1),T=o(()=>c.value?c.value.silent_time:!1),E=o(()=>`日付更新までに通常発言がない人は突然死します。
12現在まで発言していない人
13${V.value.map(R=>R.name).join(`
14`)}`),A=o(()=>E.value.replace(/\n/g,"<br />")),N=o(()=>V.value.length>0),V=o(()=>{if(!c.value||!u.value)return[];const L=c.value.setting.charachip.dummy_chara_id;return c.value.participant.member_list.filter(R=>!R.dead).filter(R=>R.chara.id!==L).filter(R=>O(R.id)===0)}),O=L=>u.value?u.value.today_message_count_map[L]??0:0,P=o(()=>`通常発言ができない時間です。
15${Z.value}から発言できます。`),G=o(()=>P.value.replace(/\n/g,"<br />")),Z=o(()=>t.value?.sayable_start_time?t.value.sayable_start_time.substring(0,5):""),D=o(()=>S.value?"text-sm leading-5.5":"text-xs leading-4.5"),S=o(()=>f.value.isCharLarge);return(L,R)=>{const te=Be;return e(l)?(y(),C("div",ll,[v(te,{class:H([e(D),"mb-1.5"]),type:"default"},{default:h(()=>[i("span",{class:H(e(D)),innerHTML:e(a)},null,10,nl)]),_:1},8,["class"]),e(p)?(y(),U(te,{key:0,class:H([e(D),"mb-1.5"]),type:"warning"},{default:h(()=>[i("span",{class:H(e(D)),innerHTML:e(A)},null,10,rl)]),_:1},8,["class"])):M("",!0),e(T)?(y(),U(te,{key:1,class:H([e(D),"mb-1.5"]),type:"warning"},{default:h(()=>[i("span",{class:H(e(D)),innerHTML:e(G)},null,10,ol)]),_:1},8,["class"])):M("",!0)])):M("",!0)}}}),ul=Object.assign(il,{__name:"PagesVillageMessageVillageSituationMessage"}),cl={key:0,class:"my-4"},dl={key:1,class:"my-4"},ml=J({__name:"GoogleAdsMessageList",setup(n){const c=o(()=>!0);return Le(()=>{c.value&&Ue(()=>{try{(window.adsbygoogle=window.adsbygoogle||[]).push({})}catch(t){console.error("Adsense error:",t)}})}),(t,l)=>e(c)?(y(),C("div",cl,[...l[0]||(l[0]=[i("ins",{class:"adsbygoogle",style:{display:"block"},"data-ad-format":"fluid","data-ad-layout-key":"-hm-c+2i-1u-38","data-ad-client":"ca-pub-0917187897820609","data-ad-slot":"5122687444"},null,-1)])])):(y(),C("div",dl,[...l[1]||(l[1]=[i("a",{href:"https://www.google.com",class:"block w-full rounded border border-gray-300 bg-gray-100 py-6 text-center text-sm text-gray-500 hover:bg-gray-200"}," [ダミー広告] Google に移動 ",-1)])]))}}),gl=Object.assign(ml,{__name:"LayoutGoogleAdsMessageList"}),pl={class:"relative mx-auto max-w-[640px]"},vl={key:2},fl=J({__name:"MessageList",setup(n){const{messages:c,loading:t,error:l,isDispLatest:u,setPageNum:f,setDispLatest:m}=Ae(),{village:a,isCurrentVillageDayLatest:s,latestDay:r,changeCurrentVillageDay:d}=ee(),{theme:b,messageDisplay:g}=Ne(),{scrollToTop:_}=qe(),x=o(()=>a.value?.status.is_prologue===!0||a.value?.status.is_progress===!0),p=o(()=>b.value.isDark),k=o(()=>c.value&&c.value.all_page_count!=null&&c.value.all_page_count>1),w=o(()=>s.value&&u.value),T=A=>{f(A),_()},E=()=>{!s.value&&r.value&&d(r.value),m(!0)};return(A,N)=>(y(),C("div",pl,[e(l)?(y(),C("div",{key:0,class:H(["mx-2 my-4 roun
15ded border border-red-200 bg-red-50 p-4 text-center text-sm text-red-600",{"border-red-700 bg-red-900/20 text-red-400":e(p)}])}," 発言の取得に失敗しました ",2)):(y(),C(de,{key:1},[e(t)?(y(),C("div",{key:0,class:H(["absolute inset-0 z-10 flex items-center justify-center",e(p)?"bg-gray-900/60":"bg-white/60"])},[...N[0]||(N[0]=[i("img",{src:da,alt:"読み込み中",class:"h-16 w-16"},null,-1)])],2)):M("",!0),e(k)?(y(),U(Ct,{key:1,messages:e(c),"is-latest-active":e(w),onChangePage:T,onDispLatest:E},null,8,["messages","is-latest-active"])):M("",!0),e(c)&&e(c).list.length>0?(y(),C("div",vl,[(y(!0),C(de,null,Ce(e(c).list,V=>(y(),U(Vt,{key:V.time.unix_time_milli,message:V,"is-progress":e(x),"is-img-large":e(g).isImgLarge,"is-disp-date":e(g).isDispDate,"is-large-text":e(g).isCharLarge,class:"my-3"},null,8,["message","is-progress","is-img-large","is-disp-date","is-large-text"]))),128))])):M("",!0),v(ul),v(gl),e(k)?(y(),U(Ct,{key:3,messages:e(c),"is-latest-active":e(w),onChangePage:T,onDispLatest:E},null,8,["messages","is-latest-active"])):M("",!0)],64))]))}}),yl=Object.assign(fl,{__name:"PagesVillageMessageList"}),bl=["aria-expanded"],_l={class:"text-sm font-semibold text-gray-700 dark:text-gray-300"},hl={class:"flex items-center gap-2"},xl={class:"overflow-hidden"},kl={class:"space-y-4 p-4 text-left"},Cl=J({__name:"ActionPanel",props:{title:{},panelKey:{},defaultOpen:{type:Boolean,default:!0}},setup(n,{expose:c}){const t=n,{fixedPanelKey:l,getActionPanelOpen:u,setActionPanelOpen:f,setFixedPanelKey:m}=Ne(),a=$(u(t.panelKey,t.defaultOpen)),s=o(()=>l.value===t.panelKey);ye(a,_=>{f(t.panelKey,_)});const r=()=>{s.value?m(null):m(t.panelKey)},d=_=>{const x=_;x.style.transition="height 0.2s ease",x.style.overflow="hidden",x.style.height="0",x.offsetHeight,x.style.height=x.scrollHeight+"px"},b=_=>{const x=_;x.style.height="",x.style.transition="",x.style.overflow=""},g=_=>{const x=_;x.style.transition="height 0.2s ease",x.style.overflow="hidden",x.style.height=x.scrollHeight+"px",x.offsetHeight,x.style.height="0"};return c({isOpen:a,isFixed:s,open:()=>{a.value=!0},close:()=>{a.value=!1},toggle:()=>{a.value=!a.value}}),(_,x)=>(y(),C("div",{class:H(["rounded-lg border border-gray-300 bg-white dark:border-gray-700 dark:bg-gray-800",{"action-panel-fixed":e(s)}])},[i("button",{type:"button",class:"flex w-full cursor-pointer items-center justify-between rounded-t-lg bg-gray-100 p-4 text-left dark:bg-gray-700","aria-expanded":e(a),onClick:x[0]||(x[0]=p=>a.value=!e(a))},[i("h3",_l,I(n.title),1),i("div",hl,[i("button",{type:"button",class:"text-xs text-(--ui-primary) hover:underline",onClick:Ee(r,["stop"])},I(e(s)?"固定解除":"固定表示"),1),v(he,{name:"i-heroicons-chevron-right-20-solid",size:"sm",class:H("shrink-0 text-gray-500 transition-transform duration-200 dark:text-gray-400"+(e(a)?" rotate-90":""))},null,8,["class"])])],8,bl),v(Et,{onEnter:d,onAfterEnter:b,onLeave:g},{default:h(()=>[Pt(i("div",xl,[i("div",kl,[Fe(_.$slots,"default",{},void 0,!0)])],512),[[Tt,e(a)]])]),_:3})],2))}}),we=Object.assign($t(Cl,[["__scopeId","data-v-da59c171"]]),{__name:"PagesVillageActionPanel"}),Sl={key:0,class:"mb-1 block text-sm font-medium text-gray-700 dark:text-gray-300"},wl={key:0,class:"ml-0.5 text-red-500"},$l={key:1,class:"mt-1 text-sm text-gray-500 dark:text-gray-400"},Vl={key:2,class:"mt-1 text-sm text-red-500 dark:text-red-400"},El=J({inheritAttrs:!1,__name:"FormGroup",props:{label:{default:void 0},required:{type:Boolean,default:!1}},setup(n){return(c,t)=>(y(),C("div",aa(sa(c.$attrs)),[n.label?(y(),C("label",Sl,[j(I(n.label)+" ",1),n.required?(y(),C("span",wl,"*")):M("",!0)])):M("",!0),i("div",null,[Fe(c.$slots,"default")]),c.$slots.help?(y(),C("div",$l,[Fe(c.$slots,"help")])):M("",!0),c.$slots.error?(y(),C("div",Vl,[Fe(c.$slots,"error")])):M("",!0)],16))}}),oe=Object.assign(El,{__name:"UiFormGroup"}),Pl=()=>{const{apiCall:n}=pe(),{villageId:c}=ee(),t=$(!1),l=$(null),u=async(a,s,r)=>{t.value=!0,l.value=null;try{return await n(`/village/${c.value}/ability`,{method:"POST",body:{ability_type:a,target_id:s??void 0,myself_id:r??void 0}}),!0}catch(d){return f(d),!1}finally{t.value=!1}},f=a=>{if(a instanceof Error){const s=a;s.statusCode===499||s.data?.status===499?l.value=s.data?.message??"エラーが発生しました":l.value=a.message}else l.value="エラーが発生しました";console.error("Ability API error:",a)},m=()=>{l.value=null};return{submitting:Y(t),error:Y(l),setAbility:u,clearError:m}},Tl={class:"text-sm text-gray-700 dark:text-gray-300"},Al={class:"text-sm text-gray-700 dark:text-gray-300"},Il={key:1,class:"rounded-md bg-red-50 p-3 text-sm text-red-700 dark:bg-red-900/20 dark:text-red-400"},Ml={class:"flex justify-end"},Ll=J({__name:"Ability",props:{ability:{}},emits:["complete"],setup(n,{emit:c}){const t=n,l=c,{submitting:u,error:f,setAbility:m,clearError:a}=Pl(),{onReset:s}=Ie(),r=o(()=>`ability-${t.ability.type.code}`),d=o(()=>t.ability.attacker?t.ability.attacker.name:"なし"),b=o(()=>t.ability.target?t.ability.target.name:"なし"),g=o(()=>t.ability.attacker_list.map(E=>({label:E.name,value:E.id}))),_=o(()=>{const E=[];return t.ability.available_no_target&&E.push({label:"なし",value:"none"}),t.ability.target_list.forEach(A=>{E.push({label:A.name,value:A.id})}),E}),x=$(t.ability.attacker?.id??null),p=$(t.ability.target?.id??(t.ability.available_no_target?"none":null));ye(()=>t.ability.target?.id,E=>{p.value=E??(t.ability.available_no_target?"none":null)}),ye(()=>t.ability.attacker?.id,E=>{x.value=E??null});const k=o(()=>t.ability.usable?t.ability.target_list.length>0:!1),w=o(()=>u.value||!t.ability.usable||t.ability.target_list.length===0?!1:t.ability.available_no_target?!0:p.value!=null&&p.value!=="none"),T=async()=>
15{if(!w.value)return;a();const E=p.value==="none"?null:p.value,A=t.ability.attacker_list.length>0?x.value:null;await m(t.ability.type.code,E,A)&&l("complete",t.ability.type.name)};return s(()=>{a(),p.value=t.ability.target?.id??(t.ability.available_no_target?"none":null),x.value=t.ability.attacker?.id??null}),(E,A)=>(y(),U(we,{title:n.ability.type.name,"panel-key":e(r)},{default:h(()=>[n.ability.attacker_list.length>0?(y(),C(de,{key:0},[i("p",Tl," 現在の襲撃担当者: "+I(e(d)),1),v(oe,{label:"襲撃担当者"},{help:h(()=>[...A[2]||(A[2]=[i("p",{class:"text-xs text-gray-500 dark:text-gray-400"}," 猫又を襲撃した場合、襲撃担当者が道連れとなります。 ",-1)])]),default:h(()=>[v(be,{modelValue:e(x),"onUpdate:modelValue":A[0]||(A[0]=N=>X(x)?x.value=N:null),options:e(g),disabled:!n.ability.usable,size:"sm"},null,8,["modelValue","options","disabled"])]),_:1}),A[3]||(A[3]=i("hr",{class:"border-gray-300 dark:border-gray-600"},null,-1))],64)):M("",!0),i("p",Al," 現在の"+I(n.ability.type.name)+"先: "+I(e(b)),1),e(f)?(y(),C("div",Il,I(e(f)),1)):M("",!0),v(oe,{label:"対象"},{default:h(()=>[v(be,{modelValue:e(p),"onUpdate:modelValue":A[1]||(A[1]=N=>X(p)?p.value=N:null),options:e(_),disabled:!e(k),placeholder:"選択してください",size:"sm"},null,8,["modelValue","options","disabled"])]),_:1}),i("div",Ml,[v(z,{disabled:!e(w),loading:e(u),onClick:T},{default:h(()=>[j(I(n.ability.type.name)+"セットする ",1)]),_:1},8,["disabled","loading"])])]),_:1},8,["title","panel-key"]))}}),Ol=Object.assign(Ll,{__name:"PagesVillageActionAbility"}),Rl=()=>{const{apiCall:n}=pe(),{villageId:c}=ee(),t=$(!1),l=$(null),u=async s=>{t.value=!0,l.value=null;try{return await n(`/village/${c.value}/action`,{method:"POST",body:s}),!0}catch(r){return m(r),!1}finally{t.value=!1}},f=async s=>{t.value=!0,l.value=null;try{return await n(`/village/${c.value}/action-confirm`,{method:"POST",body:s})}catch(r){return m(r),null}finally{t.value=!1}},m=s=>{if(s instanceof Error){const r=s;r.statusCode===499||r.data?.status===499?l.value=r.data?.message??"エラーが発生しました":l.value=s.message}else l.value="エラーが発生しました";console.error("ActionSay API error:",s)},a=()=>{l.value=null};return{submitting:Y(t),error:Y(l),actionSay:u,actionSayConfirm:f,clearError:a}},Dl={key:0,class:"mb-4 rounded-md bg-yellow-50 p-3 text-sm text-yellow-700 dark:bg-yellow-900/20 dark:text-yellow-400"},Nl={key:1,class:"mb-4 rounded-md bg-red-50 p-3 text-sm text-red-700 dark:bg-red-900/20 dark:text-red-400"},jl={class:"mb-4 text-sm"},Fl={class:"text-right text-sm"},Ul=J({__name:"ActionTypeSay",emits:["complete"],setup(n,{emit:c}){const t=ke(()=>xe(()=>
15import("./dA3lD8Om.js"),__vite__mapDeps([29,14,5,11,12,4,6,7,9,2,1,3,8,10,13,15,16,17,18,19,20,21,22,23]),import.meta.url)),l=c,{submitting:u,error:f,actionSay:m,actionSayConfirm:a,clearError:s}=Rl(),{situation:r}=Se(),{village:d,allParticipants:b}=ee(),g=$(""),_=$(""),x=$(!1),p=$(null),k=o(()=>r.value?.participate.myself),w=o(()=>k.value?`${k.value.name}は、`:""),T=o(()=>k.value?.dead==null),E=o(()=>{const se=d.value?.status;return se?se.is_epilogue:!1}),A=o(()=>{const se=[{value:"",label:"選択しない"},{value:"全員",label:"全員"}];return b.value.filter(q=>q.id!==k.value?.id).forEach(q=>{se.push({value:q.name,label:q.name})}),se}),N=o(()=>r.value?.say.selectable_message_type_list??[]),V=o(()=>N.value.map(se=>({value:se.message_type.code,label:se.message_type.name}))),O=o(()=>N.value.find(B=>B.message_type.code===ne.ACTION)?.restrict??null),P=o(()=>O.value?.max_count??null),G=o(()=>O.value?.remaining_count??null),Z=o(()=>O.value?.max_length??200),D=o(()=>_.value.length),S=o(()=>G.value!=null&&G.value<=0),L=o(()=>D.value>Z.value),R=o(()=>!(!_.value.trim()||u.value||L.value||S.value)),te=()=>({myself:`${k.value?.name??""}は、`,target:g.value!==""?g.value:void 0,message:_.value}),me=async()=>{if(!R.value)return;const se=await a(te());se&&(p.value=se,x.value=!0)},fe=async()=>{if(!R.value)return;await m(te())&&(ue(),x.value=!1,p.value=null,l("complete"))},ue=()=>{g.value="",_.value="",s()};return(se,B)=>(y(),U(we,{title:"アクション","panel-key":"action-say"},{default:h(()=>[e(T)?M("",!0):(y(),C("div",Dl," アクションは生存者も参照できるため、推理発言しないよう注意ください。 ")),e(f)?(y(),C("div",Nl,I(e(f)),1)):M("",!0),i("div",jl,I(e(w)),1),v(oe,{label:"対象",class:"mb-4"},{default:h(()=>[v(be,{modelValue:e(g),"onUpdate:modelValue":B[0]||(B[0]=q=>X(g)?g.value=q:null),options:e(A)},null,8,["modelValue","options"])]),_:1}),v(oe,{class:"mb-4"},{help:h(()=>[i("div",Fl,[e(P)!=null?(y(),C("span",{key:0,class:H({"text-red-600 dark:text-red-400":e(S)})},"残り回数: "+I(e(G))+"/"+I(e(P))+", ",3)):M("",!0),i("span",{class:H({"text-red-600 dark:text-red-400":e(L)})},"文字数: "+I(e(D))+"/"+I(e(Z)),3)])]),default:h(()=>[v(Re,{modelValue:e(_),"onUpdate:modelValue":B[1]||(B[1]=q=>X(_)?_.value=q:null)},null,8,["modelValue"])]),_:1}),v(z,{disabled:!e(R),loading:e(u),color:"primary",block:"",onClick:me},{default:h(()=>[...B[3]||(B[3]=[j(" アクション発言する ",-1)])]),_:1},8,["disabled","loading"]),v(e(t),{modelValue:e(x),"onUpdate:modelValue":B[2]||(B[2]=q=>X(x)?x.value=q:null),"preview-message":e(p),submitting:e(u),"message-type-options":e(V),"skip-confirmation":e(E),onConfirm:fe},null,8,["modelValue","preview-message","submitting","message-type-options","skip-confirmation"])]),_:1}))}}),ql=Object.assign(Ul,{__name:"PagesVillageActionTypeSay"}),zl={key:0,class:"text-center text-gray-500 dark:text-gray-400"},Gl={key:1,class:"overflow-x-auto"},Yl={class:"w-full text-sm"},Bl={class:"px-4 py-2"},Hl={class:"px-4 py-2"},Kl=["href"],Wl={key:1},Zl={class:"px-4 py-2"},Jl=J({__name:"Admin",setup(n){const{situation:c}=Se(),t=o(()=>c.value?.admin.participant_list??[]);return(l,u)=>(y(),U(we,{title:"管理メニュー","panel-key":"admin"},{default:h(()=>[e(t).length?(y(),C("div",Gl,[i("table",Yl,[u[0]||(u[0]=i("thead",{class:"bg-gray-100 dark:bg-gray-700"},[i("tr",null,[i("th",{class:"px-4 py-2 text-left text-gray-700 dark:text-gray-300"}," キャラ名 "),i("th",{class:"px-4 py-2 text-left text-gray-700 dark:text-gray-300"}," Twitter "),i("th",{class:"px-4 py-2 text-left text-gray-700 dark:text-gray-300"}," 役職 ")])],-1)),i("tbody",null,[(y(!0),C(de,null,Ce(e(t),f=>(y(),C("tr",{key:f.name,class:"border-t border-gray-200 dark:border-gray-600"},[i("td",Bl,I(f.name),1),i("td",Hl,[f.twitter_user_name?(y(),C("a",{key:0,href:`https://twitter.com/${f.twitter_user_name}`,target:"_blank",rel:"noopener noreferrer",class:"text-blue-600 hover:underline dark:text-(--ui-primary)"},I(f.nickname)+"@"+I(f.twitter_user_name),9,Kl)):(y(),C("span",Wl,I(f.nickname),1))]),i("td",Zl,I(f.skill_name),1)]))),128))])])])):(y(),C("p",zl," 参加者がいません "))]),_:1}))}}),Ql=Object.assign(Jl,{__name:"PagesVillageActionAdmin"}),Xl=()=>{const{apiCall:n}=pe(),{villageId:c}=ee(),t=$(!1),l=$(null),u=async a=>{t.value=!0,l.value=null;try{const s={skill_code:a.length>0?a:void 0};return await n(`/village/${c.value}/comingout`,{method:"POST",body:s}),!0}catch(s){return f(s),!1}finally{t.value=!1}},f=a=>{if(a instanceof Error){const s=a;s.statusCode===499||s.data?.status===499?l.value=s.data?.message??"エラーが発生しました":l.value=a.message}else l.value="エラーが発生しました";console.error("Comingout API error:",a)},m=()=>{l.value=null};return{submitting:Y(t),error:Y(l),comingout:u,clearError:m}},en={class:"text-sm text-gray-700 dark:text-gray-300"},tn={key:0,class:"rounded-md bg-red-50 p-3 text-sm text-red-700 dark:bg-red-900/20 dark:text-red-400"},an={class:"flex items-center gap-2"},sn={class:"flex items-center gap-2"},ln={class:"flex justify-end"},nn=J({__name:"Comingout",emits:["complete"],setup(n,{emit:c}){const t=ke(()=>xe(()=>import("./BNTai1az.js"),__vite__mapDeps([30,14,5,11,12,4,6,7,9]),import.meta.url)),l=c,{submitting:u,error:f,comingout:m,clearError:a}=Xl(),{onReset:s}=Ie(),{situation:r}=Se(),d=o(()=>r.value?.coming_out??null),b=o(()=>d.value?.available_coming_out??!1),g=o(()=>{const D=d.value?.current_coming_outs.list??[];return D.length===0?"なし":D.map(S=>
15S.skill.name).join("と")}),_=o(()=>d.value?.selectable_skill_list??[]),x=o(()=>_.value.map(D=>({label:D.name,value:D.code}))),p=o(()=>{const D=_.value;return D?D.filter(S=>S.code!==k.value).map(S=>({label:S.name,value:S.code})):[]}),k=$(null),w=$(null),T=()=>{const D=d.value?.current_coming_outs.list??[];k.value=D[0]?.skill.code??null,w.value=D[1]?.skill.code??null};ye(()=>d.value?.current_coming_outs.list,()=>{T()},{immediate:!0});const E=()=>{k.value=w.value,w.value=null},A=()=>{w.value=null},N=o(()=>{const D=d.value?.current_coming_outs.list??[],S=[];return k.value&&S.push(k.value),w.value&&w.value!==k.value&&S.push(w.value),S.length!==D.length?!1:!S.some(L=>!D.some(R=>R.skill.code===L))}),V=o(()=>!(u.value||!b.value||N.value)),O=o(()=>!k.value),P=$(!1),G=()=>{a(),P.value=!0},Z=async()=>{const D=[];k.value&&(D.push(k.value),w.value&&w.value!==k.value&&D.push(w.value)),await m(D)&&(P.value=!1,l("complete",O.value))};return s(()=>{a(),T()}),(D,S)=>(y(),C(de,null,[v(we,{title:"カミングアウト","panel-key":"comingout"},{default:h(()=>[i("p",en," 現在のカミングアウト: "+I(e(g)),1),e(f)?(y(),C("div",tn,I(e(f)),1)):M("",!0),S[6]||(S[6]=i("p",{class:"text-sm font-bold text-gray-700 dark:text-gray-300"}," CO対象(2つまで) ",-1)),i("div",an,[v(be,{modelValue:e(k),"onUpdate:modelValue":S[0]||(S[0]=L=>X(k)?k.value=L:null),options:e(x),disabled:!e(b),placeholder:"COを取り消す",size:"sm",class:"flex-1"},null,8,["modelValue","options","disabled"]),v(z,{size:"sm",color:"secondary",variant:"outline",disabled:!e(b)||!e(k),onClick:E},{default:h(()=>[...S[3]||(S[3]=[j(" 消す ",-1)])]),_:1},8,["disabled"])]),i("div",sn,[v(be,{modelValue:e(w),"onUpdate:modelValue":S[1]||(S[1]=L=>X(w)?w.value=L:null),options:e(p),disabled:!e(b)||!e(k),placeholder:"選択してください",size:"sm",class:"flex-1"},null,8,["modelValue","options","disabled"]),v(z,{size:"sm",color:"secondary",variant:"outline",disabled:!e(b)||!e(w),onClick:A},{default:h(()=>[...S[4]||(S[4]=[j(" 消す ",-1)])]),_:1},8,["disabled"])]),i("div",ln,[v(z,{disabled:!e(V),loading:e(u),onClick:G},{default:h(()=>[...S[5]||(S[5]=[j(" カミングアウトする ",-1)])]),_:1},8,["disabled","loading"])])]),_:1}),v(e(t),{modelValue:e(P),"onUpdate:modelValue":S[2]||(S[2]=L=>X(P)?P.value=L:null),submitting:e(u),"is-cancel":e(O),onConfirm:Z},null,8,["modelValue","submitting","is-cancel"])],64))}}),rn=Object.assign(nn,{__name:"PagesVillageActionComingout"}),on=()=>{const{apiCall:n}=pe(),{villageId:c}=ee(),t=$(!1),l=$(null),u=async a=>{t.value=!0,l.value=null;try{return await n(`/village/${c.value}/commit`,{method:"POST",body:{commit:a}}),!0}catch(s){return f(s),!1}finally{t.value=!1}},f=a=>{if(a instanceof Error){const s=a;s.statusCode===499||s.data?.status===499?l.value=s.data?.message??"エラーが発生しました":l.value=a.message}else l.value="エラーが発生しました";console.error("Commit API error:",a)},m=()=>{l.value=null};return{submitting:Y(t),error:Y(l),commitRequest:u,clearError:m}},un={class:"text-sm text-gray-700 dark:text-gray-300"},cn={key:0,class:"rounded-md bg-red-50 p-3 text-sm text-red-700 dark:bg-red-900/20 dark:text-red-400"},dn={class:"flex justify-end"},mn=J({__name:"Commit",emits:["complete"],setup(n,{emit:c}){const t=c,{submitting:l,error:u,commitRequest:f,clearError:m}=on(),{onReset:a}=Ie(),{situation:s}=Se(),r=o(()=>s.value?.commit??null),d=o(()=>r.value?.committing??!1),b=async()=>{m();const g=!d.value;await f(g)&&t("complete",g)};return a(()=>{m()}),(g,_)=>(y(),U(we,{title:"コミット","panel-key":"commit"},{default:h(()=>[i("p",un,I(e(d)?"あなたは時短希望しています。":"あなたは時短希望していません。"),1),e(u)?(y(),C("div",cn,I(e(u)),1)):M("",!0),i("div",dn,[v(z,{disabled:e(l),loading:e(l),onClick:b},{default:h(()=>[j(I(e(d)?"時短希望を取り消す":"時短希望する"),1)]),_:1},8,["disabled","loading"])])]),_:1}))}}),gn=Object.assign(mn,{__name:"PagesVillageActionCommit"}),pn=()=>{const{apiCall:n}=pe(),{villageId:c}=ee(),t=$(!1),l=$(null),u=async()=>{try{return await n(`/admin/village/${c.value}`)}catch(g){return d(g),null}},f=async g=>{t.value=!0,l.value=null;try{return await n(`/admin/village/${c.value}/participate`,{method:"POST",body:{participate_count:g}}),!0}catch(_){return d(_),!1}finally{t.value=!1}},m=async g=>{t.value=!0,l.value=null;try{return await n(`/admin/village/${c.value}/dummy-login`,{method:"POST",body:{target_id:g}}),!0}catch(_){return d(_),!1}finally{t.value=!1}},a=async()=>{t.value=!0,l.value=null;try{return await n(`/admin/village/${c.value}/no-suddenly-death`,{method:"POST"}),!0}catch(g){return d(g),!1}finally{t.value=!1}},s=async()=>{t.value=!0,l.value=null;try{return await n(`/admin/village/${c.value}/change-day`,{method:"POST"}),!0}catch(g){return d(g),!1}finally{t.value=!1}},r=async()=>{t.value=!0,l.value=null;try{return await n(`/admin/village/${c.value}/multiple-say`,{method:"POST"}),!0}catch(g){return d(g),!1}finally{t.value=!1}},d=g=>{if(g instanceof Error){const _=g;_.statusCode===499||_.data?.status===499?l.value=_.data?.message??"エラーが発生しました":l.value=g.message}else l.value="エラーが発生しました";console.error("Debug API error:",g)},b=()=>{l.value=null};return{submitting:Y(t),error:Y(l),fetchDebugVillage:u,debugParticipate:f,dummyLogin:m,setNoSuddenlyDeath:a,changeDay:s,multipleSay:r,clearError:b}},vn={key:0,class:"mb-3 rounded-md bg-red-50 p-3 text-sm text-red-700 dark:bg-red-900/20 dark:text-red-400"},fn={class:"mb-4"},yn={class:"flex gap-2"},bn={class:"mb-4"},_n={class:"flex gap-2"},hn={class:"mb-4"},xn={class:"flex justify-end"},kn={class:"mb-4"},Cn={class:"flex justify-end"},Sn={class:"flex justify-end"},wn=J({__name:"Debug",emits:["complete"],setup(n,{emit:c}){const t=c,{village:l}=ee(),{refresh:u}=Ge(),{onReset:f}=Ie(),{submitting:m,error:a,fetchDebugVillage:s,debugParticipate:r,dummyLogin:d,setNoSuddenlyDeath:b,changeDay:g,multipleSay:_,clearError:x}=pn(),p=$(null),k=$(1),w=$(1),T=o(()=>l.value?.status.code===ve.PROLOGUE),E=o(()=>
15{if(!p.value)return[];const L=p.value.setting.capacity.min-1,R=p.value.setting.capacity.max-1,te=[];for(let me=L;me<=R;me++)te.push(me);return te}),A=o(()=>E.value.map(L=>({label:`${L}人`,value:L}))),N=o(()=>{if(!p.value)return[];const L=[];for(let R=1;R<=18;R++){const te=p.value.participant.member_list.find(fe=>fe.player?.id===R);if(te){L.push({label:V(te),value:R});continue}const me=p.value.spectator.member_list.find(fe=>fe.player?.id===R);if(me){L.push({label:`(見学)${V(me)}`,value:R});continue}L.push({label:`未参加: player_id: ${R}`,value:R})}return L}),V=L=>L.skill?`${L.name}: ${L.skill.name}`:L.name,O=async()=>{p.value=await s();const L=E.value[0];L!==void 0&&(k.value=L);const R=N.value[0];R!==void 0&&(w.value=R.value)};Le(()=>{O()});const P=async()=>{await r(k.value)&&(await u(),await O(),t("complete"))},G=async()=>{await d(w.value)&&(await u(),t("complete"))},Z=async()=>{await b()&&(await u(),t("complete"))},D=async()=>{await g()&&(await u(),await O(),t("complete"))},S=async()=>{await _()&&(await u(),t("complete"))};return f(()=>{x()}),(L,R)=>(y(),U(we,{title:"デバッグメニュー","panel-key":"debug"},{default:h(()=>[e(a)?(y(),C("div",vn,I(e(a)),1)):M("",!0),i("div",fn,[R[3]||(R[3]=i("p",{class:"mb-2 text-sm font-bold text-gray-700 dark:text-gray-300"}," 参加させる ",-1)),i("div",yn,[v(be,{modelValue:e(k),"onUpdate:modelValue":R[0]||(R[0]=te=>X(k)?k.value=te:null),options:e(A),disabled:!e(T),size:"sm",class:"flex-1"},null,8,["modelValue","options","disabled"]),v(z,{disabled:!e(T)||e(m),loading:e(m),color:"primary",size:"sm",onClick:P},{default:h(()=>[...R[2]||(R[2]=[j(" 参加させる ",-1)])]),_:1},8,["disabled","loading"])])]),i("div",bn,[R[5]||(R[5]=i("p",{class:"mb-2 text-sm font-bold text-gray-700 dark:text-gray-300"}," ダミーログイン ",-1)),i("div",_n,[v(be,{modelValue:e(w),"onUpdate:modelValue":R[1]||(R[1]=te=>X(w)?w.value=te:null),options:e(N),size:"sm",class:"flex-1"},null,8,["modelValue","options"]),v(z,{disabled:e(m),loading:e(m),color:"primary",size:"sm",onClick:G},{default:h(()=>[...R[4]||(R[4]=[j(" でログインする ",-1)])]),_:1},8,["disabled","loading"])])]),i("div",hn,[R[7]||(R[7]=i("p",{class:"mb-2 text-sm font-bold text-gray-700 dark:text-gray-300"}," 突然死なしにする ",-1)),i("div",xn,[v(z,{disabled:e(m),loading:e(m),color:"primary",size:"sm",onClick:Z},{default:h(()=>[...R[6]||(R[6]=[j(" 突然死なしにする ",-1)])]),_:1},8,["disabled","loading"])])]),i("div",kn,[R[9]||(R[9]=i("p",{class:"mb-2 text-sm font-bold text-gray-700 dark:text-gray-300"}," 日付を進める ",-1)),i("div",Cn,[v(z,{disabled:e(m),loading:e(m),color:"primary",size:"sm",onClick:D},{default:h(()=>[...R[8]||(R[8]=[j(" 日付を進める ",-1)])]),_:1},8,["disabled","loading"])])]),i("div",null,[R[11]||(R[11]=i("p",{class:"mb-2 text-sm font-bold text-gray-700 dark:text-gray-300"}," 100回発言する ",-1)),i("div",Sn,[v(z,{disabled:e(m),loading:e(m),color:"primary",size:"sm",onClick:S},{default:h(()=>[...R[10]||(R[10]=[j(" 100回発言する ",-1)])]),_:1},8,["disabled","loading"])])])]),_:1}))}}),$n=Object.assign(wn,{__name:"PagesVillageActionAdminDebug"}),Vn=()=>{const{apiCall:n}=pe(),{villageId:c}=ee(),t=$(!1),l=$(null),u=async(a,s)=>{t.value=!0,l.value=null;try{return await n(`/village/${c.value}/change-name`,{method:"POST",body:{name:a,short_name:s}}),!0}catch(r){return f(r),!1}finally{t.value=!1}},f=a=>{if(a instanceof Error){const s=a;s.statusCode===499||s.data?.status===499?l.value=s.data?.message??"エラーが発生しました":l.value=a.message}else l.value="エラーが発生しました";console.error("Change name API error:",a)},m=()=>{l.value=null};return{submitting:Y(t),error:Y(l),changeName:u,clearError:m}},En={class:"mb-3 text-sm"},Pn={key:0,class:"mb-3 rounded-md bg-red-50 p-3 text-sm text-red-700 dark:bg-red-900/20 dark:text-red-400"},Tn={class:"text-right"},An={class:"text-xs text-gray-500"},In={class:"flex justify-end"},Mn=J({__name:"ChangeName",emits:["complete"],setup(n,{emit:c}){const t=ke(()=>xe(()=>import("./8ZXZy_13.js"),__vite__mapDeps([31,14,5,11,12,4,6,7,9]),import.meta.url)),l=c,{situation:u}=Se(),{onReset:f}=Ie(),{submitting:m,error:a,changeName:s,clearError:r}=Vn(),d=We({name:"",shortName:""}),b=$(!1);At(()=>{if(b.value)return;const T=u.value?.participate?.myself;T&&(d.name=T.chara_name.name,d.shortName=T.chara_name.short_name,b.value=!0)});const g=o(()=>{const T=u.value?.participate?.myself;return T?`[${T.chara_name.short_name}] ${T.chara_name.name}`:"-"}),_=o(()=>{const T=u.value?.participate?.myself;
15return T?d.name===T.chara_name.name&&d.shortName===T.chara_name.short_name:!0}),x=o(()=>d.name.length>0&&d.name.length<=40&&d.shortName.length===1&&!_.value),p=$(!1),k=()=>{r(),p.value=!0},w=async()=>{await s(d.name,d.shortName)&&(p.value=!1,l("complete"))};return f(()=>{r()}),(T,E)=>(y(),C(de,null,[v(we,{title:"名前変更","panel-key":"change-name"},{default:h(()=>[i("p",En,"現在の名前: "+I(e(g)),1),e(a)?(y(),C("div",Pn,I(e(a)),1)):M("",!0),v(oe,{label:"キャラ名",class:"mb-3"},{help:h(()=>[i("div",Tn,[i("span",An,I(e(d).name.length)+"/40",1)])]),default:h(()=>[v(Re,{modelValue:e(d).name,"onUpdate:modelValue":E[0]||(E[0]=A=>e(d).name=A),maxlength:40,placeholder:"名前を入力してください",size:"sm"},null,8,["modelValue"])]),_:1}),v(oe,{label:"キャラ名1文字略称",class:"mb-3"},{default:h(()=>[v(Re,{modelValue:e(d).shortName,"onUpdate:modelValue":E[1]||(E[1]=A=>e(d).shortName=A),maxlength:1,placeholder:"1文字",size:"sm"},null,8,["modelValue"])]),_:1}),i("div",In,[v(z,{disabled:!e(x),loading:e(m),color:"primary",block:"",onClick:k},{default:h(()=>[...E[3]||(E[3]=[j(" 名前変更する ",-1)])]),_:1},8,["disabled","loading"])])]),_:1}),v(e(t),{modelValue:e(p),"onUpdate:modelValue":E[2]||(E[2]=A=>X(p)?p.value=A:null),submitting:e(m),"new-name":e(d).name,"new-short-name":e(d).shortName,onConfirm:w},null,8,["modelValue","submitting","new-name","new-short-name"])],64))}}),Ln=Object.assign(Mn,{__name:"PagesVillageActionChangeName"}),On=J({__name:"DecorateButton",emits:["click"],setup(n,{emit:c}){const t=c;return(l,u)=>(y(),C("button",{type:"button",class:"inline-flex h-7 min-w-7 items-center justify-center rounded border border-gray-300 bg-white px-1.5 text-xs transition-colors hover:border-[var(--ui-primary)] hover:bg-gray-50 focus:ring-2 focus:ring-[var(--ui-primary)]/20 focus:outline-none dark:border-gray-600 dark:bg-gray-700 dark:hover:bg-gray-600",onClick:u[0]||(u[0]=f=>t("click"))},[Fe(l.$slots,"default")]))}}),Ve=Object.assign(On,{__name:"PagesVillageActionDecoratorDecorateButton"}),Rn={class:"mb-2 flex flex-wrap gap-1"},Dn=J({__name:"MessageDecorators",props:{textareaRef:{},modelValue:{}},emits:["update:modelValue"],setup(n,{emit:c}){const t=n,l=c,u=(m,a=m)=>{const s=t.textareaRef;if(!s)return;const r=t.modelValue,d=s.selectionStart,b=s.selectionEnd,g=r.slice(0,d)+`[[${m}]]`+r.slice(d,b)+`[[/${a}]]`+r.slice(b);l("update:modelValue",g),Ue(()=>{const _=d+`[[${m}]]`.length+(b-d);s.focus(),s.setSelectionRange(_,_)})},f=()=>{const m=t.textareaRef;if(!m)return;const a=t.modelValue,s=m.selectionStart,r=m.selectionEnd,d=a.slice(0,s)+`[[ruby]]${a.slice(s,r)}[[rt]][[/rt]][[/ruby]]`+a.slice(r);l("update:modelValue",d),Ue(()=>{const b=a.slice(s,r),g=s+`[[ruby]]${b}[[rt]]`.length;m.focus(),m.setSelectionRange(g,g)})};return(m,a)=>(y(),C("div",Rn,[v(Ve,{onClick:a[0]||(a[0]=s=>u("b"))},{default:h(()=>[...a[12]||(a[12]=[i("strong",null,"B",-1)])]),_:1}),v(Ve,{onClick:a[1]||(a[1]=s=>u("large"))},{default:h(()=>[...a[13]||(a[13]=[j(" 大 ",-1)])]),_:1}),v(Ve,{onClick:a[2]||(a[2]=s=>u("small"))},{default:h(()=>[...a[14]||(a[14]=[i("small",null,"小",-1)])]),_:1}),v(Ve,{onClick:a[3]||(a[3]=s=>u("s"))},{default:h(()=>[...a[15]||(a[15]=[i("s",null,"あ",-1)])]),_:1}),v(Ve,{onClick:f},{default:h(()=>[...a[16]||(a[16]=[j(" rb ",-1)])]),_:1}),v(Ve,{onClick:a[4]||(a[4]=s=>u("cw"))},{default:h(()=>[...a[17]||(a[17]=[j(" 隠 ",-1)])]),_:1}),v(Ve,{onClick:a[5]||(a[5]=s=>u("#ff0000","#"))},{default:h(()=>[...a[18]||(a[18]=[i("span",{class:"text-[#ff0000]"},"■",-1)])]),_:1}),v(Ve,{onClick:a[6]||(a[6]=s=>u("#ff8800","#"))},{default:h(()=>[...a[19]||(a[19]=[i("span",{class:"text-[#ff8800]"},"■",-1)])]),_:1}),v(Ve,{onClick:a[7]||(a[7]=s=>u("#ffff00","#"))},{default:h(()=>[...a[20]||(a[20]=[i("span",{class:"text-[#ffff00]"},"■",-1)])]),_:1}),v(Ve,{onClick:a[8]||(a[8]=s=>u("#00ff00","#"))},{default:h(()=>[...a[21]||(a[21]=[i("span",{class:"text-[#00ff00]"},"■",-1)])]),_:1}),v(Ve,{onClick:a[9]||(a[9]=s=>u("#00ffff","#"))},{default:h(()=>[...a[22]||(a[22]=[i("span",{class:"text-[#00ffff]"},"■",-1)])]),_:1}),v(Ve,{onClick:a[10]||(a[10]=s=>u("#0000ff","#"))},{default:h(()=>[...a[23]||(a[23]=[i("span",{class:"text-[#0000ff]"},"■",-1)])]),_:1}),v(Ve,{onClick:a[11]||(a[11]=s=>u("#ff00ff","#"))},{default:h(()=>[...a[24]||(a[24]=[i("span",{class:"text-[#ff00ff]"},"■",-1)])]),_:1})]))}}),Je=Object.assign(Dn,{__name:"PagesVillageActionDecoratorMessageDecorators"}),Nn=()=>{const{apiCall:n}=pe(),{villageId:c}=ee(),t=$(!1),l=$(null),u=async s=>{t.value=!0,l.value=null;try{return await n(`/creator/village/${c.value}/say`,{method:"POST",body:s}),!0}catch(r){return m(r),!1}finally{t.value=!1}},f=async s=>{t.value=!0,l.value=null;try{return await n(`/creator/village/${c.value}/say-confirm`,{method:"POST",body:s})}catch(r){return m(r),null}finally{t.value=!1}},m=s=>{if(s instanceof Error){const r=s;r.statusCode===499||r.data?.status===499?l.value=r.data?.message??"エラーが発生しました":l.value=s.message}else l.value="エラーが発生しました";console.error("Creator Say API error:",s)},a=()=>{l.value=null};return{submitting:Y(t),error:Y(l),say:u,sayConfirm:f,clearError:a}},jn={key:0,class:"mb-4 rounded-md bg-red-50 p-3 text-sm text-red-700 dark:bg-red-900/20 dark:text-red-400"},Fn={class:"mb-4"},Un={class:"text-right text-sm"},qn={class:"mt-4 flex flex-col gap-2 sm:flex-row"},St=400,wt=40,zn=J({__name:"CreatorSay",emits:["complete"],setup(n,{emit:c}){const t=ke(()=>xe(()=>import("./CLlCExkg.js"),__vite__mapDeps([32,14,5,11,12,4,6,7,9,3,8,1,10,2,13,15,16,17,18,19,20,21,22,23]),import.meta.url)),l=c,{submitting:u,error:f,say:m,sayConfirm:a}=Nn(),{messageDisplay:s}=Ne(),r=$(""),d=$(!1),b=$(null),g=$(null),_=o(()=>g.value?.textareaElement??null),x=o(()=>r.value?r.value.split(`
16`).length:1),p=o(()=>r.value.length),k=o(()=>x.value>wt),w=o(()=>p.value>St),T=o(()=>[{value:ne.CREATOR_SAY,label:"村建て発言"}]),E=o(()=>!(!r.value.trim()||u.value||k.value||w.value)),A=o(()=>u.value?"送信中...":"発言確認へ"),N=()=>({message:r.value}),V=async()=>
16{if(!E.value)return;const P=await a(N());P&&(b.value=P,d.value=!0)},O=async()=>{if(!E.value)return;await m(N())&&(r.value="",d.value=!1,b.value=null,l("complete"))};return(P,G)=>(y(),U(we,{title:"村建て発言","panel-key":"creator-say"},{default:h(()=>[e(f)?(y(),C("div",jn,I(e(f)),1)):M("",!0),v(Je,{modelValue:e(r),"onUpdate:modelValue":G[0]||(G[0]=Z=>X(r)?r.value=Z:null),"textarea-ref":e(_)},null,8,["modelValue","textarea-ref"]),i("div",Fn,[v(oe,null,{help:h(()=>[i("div",Un,[i("span",{class:H({"text-red-600 dark:text-red-400":e(k)})},"行数: "+I(e(x))+"/"+I(wt),3),G[3]||(G[3]=j(", ",-1)),i("span",{class:H({"text-red-600 dark:text-red-400":e(w)})},"文字数: "+I(e(p))+"/"+I(St),3)])]),default:h(()=>[v(Ze,{ref_key:"formTextareaRef",ref:g,modelValue:e(r),"onUpdate:modelValue":G[1]||(G[1]=Z=>X(r)?r.value=Z:null),rows:10,size:e(s).isCharLarge?"md":"sm",placeholder:"村建て発言を入力してください",class:"bg-[#fef]! dark:bg-[#403340]!"},null,8,["modelValue","size"])]),_:1})]),i("div",qn,[v(z,{disabled:!e(E),loading:e(u),color:"primary",block:"",onClick:V},{default:h(()=>[j(I(e(A)),1)]),_:1},8,["disabled","loading"])]),v(e(t),{modelValue:e(d),"onUpdate:modelValue":G[2]||(G[2]=Z=>X(d)?d.value=Z:null),"preview-message":e(b),submitting:e(u),"selected-message-type":e(ne).CREATOR_SAY,"message-type-options":e(T),onConfirm:O},null,8,["modelValue","preview-message","submitting","selected-message-type","message-type-options"])]),_:1}))}}),Gn=Object.assign(zn,{__name:"PagesVillageActionCreatorSay"}),Yn=()=>{const{apiCall:n}=pe(),{villageId:c}=ee(),t=$(!1),l=$(null),u=async a=>{t.value=!0,l.value=null;try{const s={target_id:a};return await n(`/creator/village/${c.value}/kick`,{method:"POST",body:s}),!0}catch(s){return f(s),!1}finally{t.value=!1}},f=a=>{if(a instanceof Error){const s=a;s.statusCode===499||s.data?.status===499?l.value=s.data?.message??"エラーが発生しました":l.value=a.message}else l.value="エラーが発生しました";console.error("Kick API error:",a)},m=()=>{l.value=null};return{submitting:Y(t),error:Y(l),kick:u,clearError:m}},Bn={key:0,class:"mb-4 rounded-md bg-red-50 p-3 text-sm text-red-700 dark:bg-red-900/20 dark:text-red-400"},Hn={key:1,class:"mb-4 rounded-md bg-yellow-50 p-3 text-sm text-yellow-700 dark:bg-yellow-900/20 dark:text-yellow-400"},Kn={key:2,class:"flex flex-col gap-2 sm:flex-row sm:items-end sm:gap-1"},Wn={class:"flex justify-end sm:justify-start"},Zn={class:"text-sm text-gray-700 dark:text-gray-300"},Jn=J({__name:"KickOut",emits:["complete"],setup(n,{emit:c}){const t=c,{submitting:l,error:u,kick:f,clearError:m}=Yn(),{onReset:a}=Ie(),{allParticipants:s}=ee(),r=$(null),d=$(!1),b=o(()=>s.value.map(k=>({label:k.name,value:k.id}))),g=o(()=>r.value===null?"":s.value.find(w=>w.id===r.value)?.name??""),_=o(()=>!(l.value||r.value===null));ye(b,k=>{k.length>0&&r.value===null&&k[0]&&(r.value=k[0].value)},{immediate:!0});const x=()=>{_.value&&(m(),d.value=!0)},p=async()=>{if(!_.value||r.value===null)return;await f(r.value)&&(d.value=!1,t("complete"))};return a(()=>{m(),d.value=!1,b.value.length>0&&b.value[0]?r.value=b.value[0].value:r.value=null}),(k,w)=>(y(),C("div",null,[w[6]||(w[6]=i("h3",{class:"mb-3 text-sm font-bold text-gray-900 dark:text-gray-100"}," 強制退村 ",-1)),e(u)?(y(),C("div",Bn,I(e(u)),1)):M("",!0),e(b).length===0?(y(),C("div",Hn," 退村させる参加者がいません ")):M("",!0),e(b).length>0?(y(),C("div",Kn,[v(oe,{label:"退村させる参加者",class:"flex-1"},{default:h(()=>[v(be,{modelValue:e(r),"onUpdate:modelValue":w[0]||(w[0]=T=>X(r)?r.value=T:null),options:e(b),placeholder:"選択してください",size:"sm"},null,8,["modelValue","options"])]),_:1}),i("div",Wn,[v(z,{disabled:!e(_),loading:e(l),size:"sm",color:"error",onClick:x},{default:h(()=>[...w[3]||(w[3]=[j(" 強制退村確認 ",-1)])]),_:1},8,["disabled","loading"])])])):M("",!0),v(ze,{modelValue:e(d),"onUpdate:modelValue":w[2]||(w[2]=T=>X(d)?d.value=T:null),title:"強制退村確認"},{footer:h(()=>[v(z,{color:"secondary",variant:"outline",onClick:w[1]||(w[1]=T=>d.value=!1)},{default:h(()=>[...w[4]||(w[4]=[j(" キャンセル ",-1)])]),_:1}),v(z,{loading:e(l),disabled:e(l),color:"error",onClick:p},{default:h(()=>[...w[5]||(w[5]=[j(" 退村させる ",-1)])]),_:1},8,["loading","disabled"])]),default:h(()=>[i("p",Zn," 本当に"+I(e(g))+"を強制退村させますか? ",1)]),_:1},8,["modelValue"])]))}}),Qn=Object.assign(Jn,{__name:"PagesVillageActionCreatorKickOut"}),Xn=()=>{const{apiCall:n}=pe(),{villageId:c}=ee(),t=$(!1),l=$(null),u=async()=>{t.value=!0,l.value=null;try{return await n(`/creator/village/${c.value}/extend-epilogue`,{method:"POST"}),!0}catch(a){return f(a),!1}finally{t.value=!1}},f=a=>{if(a instanceof Error){const s=a;s.statusCode===499||s.data?.status===499?l.value=s.data?.message??"エラーが発生しました":l.value=a.message}else l.value="エラーが発生しました";console.error("Extend Epilogue API error:",a)},m=()=>{l.value=null};return{submitting:Y(t),error:Y(l),extendEpilogue:u,clearError:m}},er={key:0,class:"mb-4 rounded-md bg-red-50 p-3 text-sm text-red-700 dark:bg-red-900/20 dark:text-red-400"},tr={class:"flex justify-end"},ar=J({__name:"ExtendEpilogue",emits:["complete"],setup(n,{emit:c}){const t=c,{submitting:l,error:u,extendEpilogue:f,clearError:m}=Xn(),{onReset:a}=Ie(),s=$(!1),r=()=>{l.value||(m(),s.value=!0)},d=async()=>
16{if(l.value)return;await f()&&(s.value=!1,t("complete"))};return a(()=>{m(),s.value=!1}),(b,g)=>(y(),C("div",null,[g[6]||(g[6]=i("h3",{class:"mb-3 text-sm font-bold text-gray-900 dark:text-gray-100"}," エピローグ延長 ",-1)),e(u)?(y(),C("div",er,I(e(u)),1)):M("",!0),i("div",tr,[v(z,{disabled:e(l),loading:e(l),size:"sm",color:"primary",onClick:r},{default:h(()=>[...g[2]||(g[2]=[j(" エピローグ延長 ",-1)])]),_:1},8,["disabled","loading"])]),v(ze,{modelValue:e(s),"onUpdate:modelValue":g[1]||(g[1]=_=>X(s)?s.value=_:null),title:"エピローグ延長確認"},{footer:h(()=>[v(z,{color:"secondary",variant:"outline",onClick:g[0]||(g[0]=_=>s.value=!1)},{default:h(()=>[...g[3]||(g[3]=[j(" キャンセル ",-1)])]),_:1}),v(z,{loading:e(l),disabled:e(l),color:"primary",onClick:d},{default:h(()=>[...g[4]||(g[4]=[j(" 延長する ",-1)])]),_:1},8,["loading","disabled"])]),default:h(()=>[g[5]||(g[5]=i("p",{class:"text-sm text-gray-700 dark:text-gray-300"},"1日延長しますか?",-1))]),_:1},8,["modelValue"])]))}}),sr=Object.assign(ar,{__name:"PagesVillageActionCreatorExtendEpilogue"}),lr=()=>{const{apiCall:n}=pe(),{villageId:c}=ee(),t=$(!1),l=$(null),u=async()=>{t.value=!0,l.value=null;try{return await n(`/creator/village/${c.value}/cancel`,{method:"POST"}),!0}catch(a){return f(a),!1}finally{t.value=!1}},f=a=>{if(a instanceof Error){const s=a;s.statusCode===499||s.data?.status===499?l.value=s.data?.message??"エラーが発生しました":l.value=a.message}else l.value="エラーが発生しました";console.error("Cancel Village API error:",a)},m=()=>{l.value=null};return{submitting:Y(t),error:Y(l),cancelVillage:u,clearError:m}},nr={key:0,class:"mb-4 rounded-md bg-red-50 p-3 text-sm text-red-700 dark:bg-red-900/20 dark:text-red-400"},rr={class:"flex justify-end"},or=J({__name:"Cancel",emits:["complete"],setup(n,{emit:c}){const t=c,{submitting:l,error:u,cancelVillage:f,clearError:m}=lr(),{onReset:a}=Ie(),s=$(!1),r=()=>{l.value||(m(),s.value=!0)},d=async()=>{if(l.value)return;await f()&&(s.value=!1,t("complete"))};return a(()=>{m(),s.value=!1}),(b,g)=>(y(),C("div",null,[g[6]||(g[6]=i("h3",{class:"mb-3 text-sm font-bold text-gray-900 dark:text-gray-100"}," 廃村 ",-1)),e(u)?(y(),C("div",nr,I(e(u)),1)):M("",!0),i("div",rr,[v(z,{disabled:e(l),loading:e(l),size:"sm",color:"error",onClick:r},{default:h(()=>[...g[2]||(g[2]=[j(" 廃村確認 ",-1)])]),_:1},8,["disabled","loading"])]),v(ze,{modelValue:e(s),"onUpdate:modelValue":g[1]||(g[1]=_=>X(s)?s.value=_:null),title:"廃村確認"},{footer:h(()=>[v(z,{color:"secondary",variant:"outline",onClick:g[0]||(g[0]=_=>s.value=!1)},{default:h(()=>[...g[3]||(g[3]=[j(" キャンセル ",-1)])]),_:1}),v(z,{loading:e(l),disabled:e(l),color:"error",onClick:d},{default:h(()=>[...g[4]||(g[4]=[j(" 廃村にする ",-1)])]),_:1},8,["loading","disabled"])]),default:h(()=>[g[5]||(g[5]=i("p",{class:"text-sm text-gray-700 dark:text-gray-300"}," 本当に廃村にしますか? ",-1))]),_:1},8,["modelValue"])]))}}),ir=Object.assign(or,{__name:"PagesVillageActionCreatorCancel"}),ur={key:3,class:"mt-6"},cr={class:"flex justify-end"},dr=J({__name:"CreatorMenu",emits:["complete"],setup(n,{emit:c}){const t=c,{situation:l}=Se(),{village:u}=ee(),f=o(()=>u.value?.id??0),m=o(()=>l.value?.creator.available_kick??!1),a=o(()=>l.value?.creator.available_extend_epilogue??!1),s=o(()=>l.value?.creator.available_cancel_village??!1),r=o(()=>l.value?.creator.available_modify_setting??!1),d=()=>{t("complete")};return(b,g)=>(y(),U(we,{title:"村建てメニュー","panel-key":"creator-menu"},{default:h(()=>[e(m)?(y(),U(Qn,{key:0,onComplete:d})):M("",!0),e(a)?(y(),U(sr,{key:1,class:"mt-6",onComplete:d})):M("",!0),e(s)?(y(),U(ir,{key:2,class:"mt-6",onComplete:d})):M("",!0),e(r)?(y(),C("div",ur,[g[1]||(g[1]=i("h3",{class:"mb-3 text-sm font-bold text-gray-900 dark:text-gray-100"}," 設定変更 ",-1)),i("div",cr,[v(z,{to:{path:"/setting",query:{id:e(f)}},color:"primary",size:"sm"},{default:h(()=>[...g[0]||(g[0]=[j(" 村の設定を変更する ",-1)])]),_:1},8,["to"])])])):M("",!0)]),_:1}))}}),mr=Object.assign(dr,{__name:"PagesVillageActionCreatorMenu"}),gr=()=>{const{apiCall:n}=pe(),{villageId:c}=ee(),t=$(!1),l=$(null),u=async()=>{t.value=!0,l.value=null;try{return await n(`/village/${c.value}/leave`,{method:"POST"}),!0}catch(a){return f(a),!1}finally{t.value=!1}},f=a=>{if(a instanceof Error){const s=a;s.statusCode===499||s.data?.status===499?l.value=s.data?.message??"エラーが発生しました":l.value=a.message}else l.value="エラーが発生しました";console.error("Leave API error:",a)},m=()=>{l.value=null};return{submitting:Y(t),error:Y(l),leave:u,clearError:m}},pr={key:0,class:"rounded-md bg-red-50 p-3 text-sm text-red-700 dark:bg-red-900/20 dark:text-red-400"},vr={class:"flex justify-end"},fr=J({__name:"Leave",emits:["complete"],setup(n,{emit:c}){const t=ke(()=>xe(()=>
16import("./DcOTX8PF.js"),__vite__mapDeps([33,14,5,11,12,4,6,7,9]),import.meta.url)),l=c,{submitting:u,error:f,leave:m}=gr(),a=$(!1),s=()=>{a.value=!0},r=async()=>{await m()&&(a.value=!1,l("complete"))};return(d,b)=>(y(),U(we,{title:"退村","panel-key":"leave"},{default:h(()=>[e(f)?(y(),C("div",pr,I(e(f)),1)):M("",!0),i("div",vr,[v(z,{color:"error",onClick:s},{default:h(()=>[...b[1]||(b[1]=[j(" 退村する ",-1)])]),_:1})]),v(e(t),{modelValue:e(a),"onUpdate:modelValue":b[0]||(b[0]=g=>X(a)?a.value=g:null),submitting:e(u),onLeave:r},null,8,["modelValue","submitting"])]),_:1}))}}),yr=Object.assign(fr,{__name:"PagesVillageActionLeave"}),Ot=()=>{const{apiCall:n}=pe(),{villageId:c}=ee(),t=$(!1),l=$(!1),u=$(null),f=d=>({chara_id:d.charaId,chara_name:d.charaName,chara_short_name:d.charaShortName,first_request_skill:d.firstRequestSkill,second_request_skill:d.secondRequestSkill,join_message:d.joinMessage,join_password:d.joinPassword||void 0,spectator:d.spectator}),m=async d=>{t.value=!0,u.value=null;try{return await n(`/village/${c.value}/participate-confirm`,{method:"POST",body:f(d)})}catch(b){return s(b),null}finally{t.value=!1}},a=async d=>{l.value=!0,u.value=null;try{return await n(`/village/${c.value}/participate`,{method:"POST",body:f(d)}),!0}catch(b){return s(b),!1}finally{l.value=!1}},s=d=>{if(d instanceof Error){const b=d;b.statusCode===499||b.data?.status===499?u.value=b.data?.message??"エラーが発生しました":u.value=d.message}else u.value="エラーが発生しました";console.error("Participate API error:",d)},r=()=>{u.value=null};return{confirming:Y(t),submitting:Y(l),error:Y(u),confirmParticipate:m,participate:a,clearError:r}},br={class:"flex gap-2"},_r={class:"flex flex-col items-start gap-2 sm:flex-row"},hr={class:"shrink-0"},xr={key:1,class:"flex h-20 w-16 items-center justify-center rounded-md bg-gray-200 text-xs text-gray-500 dark:bg-gray-600 dark:text-gray-400"},kr={class:"w-full flex-1"},Cr={class:"mt-1 text-right text-xs text-gray-500 dark:text-gray-400"},Sr={key:2,class:"rounded-md bg-red-50 p-3 text-sm text-red-700 dark:bg-red-900/20 dark:text-red-400"},wr={class:"flex justify-end"},$r=J({__name:"Participate",emits:["complete"],setup(n,{emit:c}){const t=ke(()=>xe(()=>import("./B7m_592B.js"),__vite__mapDeps([34,4,5,6,7,14,11,12,9]),import.meta.url)),l=ke(()=>xe(()=>import("./g7ETbS_r.js"),__vite__mapDeps([35,12,4,5,6,7,14,11,9,2,1,3,8,10,13,36,15,16,17,18,19,20,21,22,23]),import.meta.url)),u=c,{situation:f}=Se(),{village:m,charachips:a}
16=ee(),{confirming:s,submitting:r,error:d,confirmParticipate:b,participate:g}=Ot(),_=$(null),x=o(()=>_.value?.textareaElement??null),p=We({charaId:null,charaName:"",charaShortName:"",firstRequestSkill:"LEFTOVER",secondRequestSkill:"LEFTOVER",joinMessage:"",joinPassword:""}),k=$(!1),w=$(!1),T=$(null),E=o(()=>f.value?.participate.selectable_chara_list??[]),A=o(()=>p.charaId?E.value.find(le=>le.id===p.charaId)??null:null),N=o(()=>(m.value?.setting.rules.message_restrict?.restrict_list??[]).find(Q=>Q.type.code===ne.NORMAL_SAY)??null),V=o(()=>N.value?.length??400),O=o(()=>N.value?.line??20),P=o(()=>p.joinMessage.replace(/\n/g,"").length),G=o(()=>p.joinMessage?p.joinMessage.split(`
17`).length:0),Z=o(()=>G.value>O.value),D=o(()=>P.value>V.value),S=o(()=>E.value.map(le=>({label:le.chara_name.name,value:le.id}))),L=o(()=>f.value?.skill_request.selectable_skill_list??[]),R=o(()=>L.value.map(le=>({label:le.name,value:le.code}))),te=o(()=>f.value?.skill_request.available_skill_request??!1),me=o(()=>m.value?.setting.password.join_password_required??!1),fe=o(()=>{if(!p.charaId)return!1;const le=E.value.find(re=>re.id===p.charaId);return le?a.value?.find(re=>re.id===le.charachip_id)?.is_available_change_name??!1:!1}),ue=o(()=>!(p.charaId===null||p.charaName.length<1||p.charaName.length>40||p.charaShortName.length!==1||!p.firstRequestSkill||!p.secondRequestSkill||!p.joinMessage||p.joinMessage.length<1||Z.value||D.value||me.value&&!p.joinPassword)),se=()=>{k.value=!0},B=le=>{p.charaId=le.id,p.charaName=le.chara_name.name,p.charaShortName=le.chara_name.short_name,k.value=!1},q=()=>{const le=E.value.find(Q=>Q.id===p.charaId);le&&(p.charaName=le.chara_name.name,p.charaShortName=le.chara_name.short_name)},W=async()=>{if(!ue.value||p.charaId===null)return;const le={charaId:p.charaId,charaName:p.charaName,charaShortName:p.charaShortName,firstRequestSkill:p.firstRequestSkill,secondRequestSkill:p.secondRequestSkill,joinMessage:p.joinMessage,joinPassword:p.joinPassword,spectator:!1},Q=await b(le);Q&&(T.value=Q,w.value=!0)},ie=async()=>{if(p.charaId===null)return;const le={charaId:p.charaId,charaName:p.charaName,charaShortName:p.charaShortName,firstRequestSkill:p.firstRequestSkill,secondRequestSkill:p.secondRequestSkill,joinMessage:p.joinMessage,joinPassword:p.joinPassword,spectator:!1};await g(le)&&(w.value=!1,u("complete"))};return(le,Q)=>(y(),U(we,{title:"入村","panel-key":"participate"},{default:h(()=>[v(oe,{label:"キャラ",required:""},{default:h(()=>[i("div",br,[v(be,{modelValue:e(p).charaId,"onUpdate:modelValue":Q[0]||(Q[0]=re=>e(p).charaId=re),options:e(S),class:"flex-1",size:"sm",placeholder:"選択してください",onChange:q},null,8,["modelValue","options"]),v(z,{size:"sm",onClick:se},{default:h(()=>[...Q[10]||(Q[10]=[j(" 画像で選択 ",-1)])]),_:1})])]),_:1}),v(oe,{label:"キャラ名",required:""},{default:h(()=>[v(Re,{modelValue:e(p).charaName,"onUpdate:modelValue":Q[1]||(Q[1]=re=>e(p).charaName=re),maxlength:40,disabled:!e(fe),size:"sm"},null,8,["modelValue","disabled"])]),_:1}),v(oe,{label:"キャラ名1文字略称",required:""},{default:h(()=>[v(Re,{modelValue:e(p).charaShortName,"onUpdate:modelValue":Q[2]||(Q[2]=re=>e(p).charaShortName=re),maxlength:1,disabled:!e(fe),size:"sm"},null,8,["modelValue","disabled"])]),_:1}),e(te)?(y(),C(de,{key:0},[v(oe,{label:"役職第1希望",required:""},{default:h(()=>[v(be,{modelValue:e(p).firstRequestSkill,"onUpdate:modelValue":Q[3]||(Q[3]=re=>e(p).firstRequestSkill=re),options:e(R),size:"sm"},null,8,["modelValue","options"])]),_:1}),v(oe,{label:"役職第2希望",required:""},{default:h(()=>[v(be,{modelValue:e(p).secondRequestSkill,"onUpdate:modelValue":Q[4]||(Q[4]=re=>e(p).secondRequestSkill=re),options:e(R),size:"sm"},null,8,["modelValue","options"])]),_:1})],64)):M("",!0),v(oe,{label:"入村発言",required:""},{default:h(()=>[v(Je,{modelValue:e(p).joinMessage,"onUpdate:modelValue":Q[5]||(Q[5]=re=>e(p).joinMessage=re),"textarea-ref":e(x),class:"mb-2"},null,8,["modelValue","textarea-ref"]),i("div",_r,[i("div",hr,[e(A)?(y(),U(Oe,{key:0,chara:e(A),"face-type":"NORMAL","is-small":!1},null,8,["chara"])):(y(),C("div",xr," 未選択 "))]),i("div",kr,[v(Ze,{ref_key:"formTextareaRef",ref:_,modelValue:e(p).joinMessage,"onUpdate:modelValue":Q[
176]||(Q[6]=re=>e(p).joinMessage=re),size:"sm",rows:4,class:"w-full"},null,8,["modelValue"]),i("div",Cr,[i("span",{class:H({"text-red-600 dark:text-red-400":e(Z)})},"行数: "+I(e(G))+"/"+I(e(O)),3),Q[11]||(Q[11]=j(", ",-1)),i("span",{class:H({"text-red-600 dark:text-red-400":e(D)})},"文字数: "+I(e(P))+"/"+I(e(V)),3)])])])]),_:1}),e(me)?(y(),U(oe,{key:1,label:"入村パスワード",required:""},{default:h(()=>[v(Re,{modelValue:e(p).joinPassword,"onUpdate:modelValue":Q[7]||(Q[7]=re=>e(p).joinPassword=re),type:"text",size:"sm"},null,8,["modelValue"])]),_:1})):M("",!0),e(d)?(y(),C("div",Sr,I(e(d)),1)):M("",!0),i("div",wr,[v(z,{disabled:!e(ue)||e(s),loading:e(s),onClick:W},{default:h(()=>[...Q[12]||(Q[12]=[j(" 入村確認 ",-1)])]),_:1},8,["disabled","loading"])]),v(e(t),{"is-open":e(k),charas:e(E),onSelect:B,onClose:Q[8]||(Q[8]=re=>k.value=!1)},null,8,["is-open","charas"]),v(e(l),{modelValue:e(w),"onUpdate:modelValue":Q[9]||(Q[9]=re=>X(w)?w.value=re:null),"confirm-message":e(T),submitting:e(r),onParticipate:ie},null,8,["modelValue","confirm-message","submitting"])]),_:1}))}}),Vr=Object.assign($r,{__name:"PagesVillageActionParticipate"}),Er={class:"flex flex-wrap justify-center gap-3"},Pr=["onClick"],Tr={class:"mt-1 text-center text-xs"},Ar=J({__name:"SecretTargetSelectModal",props:{modelValue:{type:Boolean},participantList:{}},emits:["update:modelValue","select"],setup(n,{emit:c}){const t=n,l=c,u=o({get:()=>t.modelValue,set:a=>l("update:modelValue",a)}),f=a=>{l("select",a),u.value=!1},m=()=>{u.value=!1};return(a,s)=>(y(),U(ze,{modelValue:e(u),"onUpdate:modelValue":s[0]||(s[0]=r=>X(u)?u.value=r:null),title:"画像から選択"},{footer:h(()=>[v(z,{variant:"outline",color:"secondary",onClick:m},{default:h(()=>[...s[1]||(s[1]=[j(" キャンセル ",-1)])]),_:1})]),default:h(()=>[i("div",Er,[(y(!0),C(de,null,Ce(n.participantList,r=>(y(),C("button",{key:r.id,type:"button",class:"hover:border-primary-500 dark:hover:border-primary-400 flex w-36 cursor-pointer flex-col items-center rounded-2xl border border-gray-300 p-2 hover:font-bold dark:border-gray-600",onClick:d=>f(r.id)},[v(Oe,{chara:r.chara},null,8,["chara"]),i("p",Tr,I(r.name),1)],8,Pr))),128))])]),_:1},8,["modelValue"]))}}),Ir=Object.assign(Ar,{__name:"PagesVillageActionSaySecretTargetSelectModal"}),Mr=["aria-labelledby"],Lr=["id","tabindex","aria-checked","disabled","onClick","onKeydown"],Or=J({__name:"FormRadioGroup",props:{modelValue:{},options:{},disabled:{type:Boolean,default:!1},name:{default:void 0},id:{default:void 0},ariaLabelledby:{default:void 0}},emits:["update:modelValue"],setup(n,{emit:c}){const t=n,l=c,u=at(),f=o(()=>t.id??u),m=b=>{t.disabled||l("update:modelValue",b)},a=()=>{if(t.disabled||t.options.length===0)return;const b=t.options.findIndex(x=>x.value===t.modelValue),g=b===-1?0:(b+1)%t.options.length,_=t.options[g];_&&l("update:modelValue",_.value)},s=()=>{if(t.disabled||t.options.length===0)return;const b=t.options.findIndex(x=>x.value===t.modelValue),g=b<=0?t.options.length-1:b-1,_=t.options[g];_&&l("update:modelValue",_.value)},r=b=>t.disabled?-1:t.modelValue===b||!t.options.some(_=>_.value===t.modelValue)&&t.options[0]?.value===b?0:-1,d=(b,g)=>{const _=g===0,x=g===t.options.length-1,p=t.modelValue===b,k="px-3 py-1.5 text-xs font-medium border transition-colors duration-200 ease-in-out focus:outline-none focus:ring-2 focus:ring-[var(--ui-primary)] focus:z-10",w=_?"rounded-l":x?"rounded-r":"",T=_?"border":"-ml-px border",E=p?"bg-[var(--ui-primary)] border-[var(--ui-primary)] text-white":"bg-white border-gray-300 text-gray-700 hover:bg-gray-50 dark:bg-gray-800 dark:border-gray-600 dark:text-gray-300 dark:hover:bg-gray-700",A=t.disabled?"opacity-50 cursor-not-allowed":"cursor-pointer";return[k,w,T,E,A].join(" ")};return(b,g)=>(y(),C("div",{role:"radiogroup","aria-labelledby":n.ariaLabelledby,class:"inline-flex"},[(y(!0),C(de,null,Ce(n.options,(_,x)=>(y(),C("button",{id:`${e(f)}-${_.value}`,key:_.value,type:"button",role:"radio",tabindex:r(_.value),"aria-checked":n.modelValue===_.value,disabled:n.disabled,class:H(d(_.value,x)),onClick:p=>m(_.value),onKeydown:[$e(Ee(a,["prevent"]),["arrow-down"]),$e(Ee(a,["prevent"]),["arrow-right"]),$e(Ee(s,["prevent"]),["arrow-up"]),$e(Ee(s,["prevent"]),["arrow-left"])]},I(_.label),43,Lr))),128))],8,Mr))}}),Rr=Object.assign(Or,{__name:"UiFormRadioGroup"}),Dr=()=>{const{apiCall:n}=pe(),{villageId:c}=ee(),t=$(!1),l=$(null),u=async s=>{t.value=!0,l.value=null;try{return await n(`/village/${c.value}/say`,{method:"POST",body:s}),!0}catch(r){return m(r),!1}finally{t.value=!1}},f=async s=>{t.value=!0,l.value=null;try{return await n(`/village/${c.value}/say-confirm`,{method:"POST",body:s})}catch(r){return m(r),null}finally{t.value=!1}},m=s=>{if(s instanceof Error){const r=s;r.statusCode===499||r.data?.status===499?l.value=r.data?.message??"エラーが発生しました":l.value=s.message}else l.value="エラーが発生しました";console.error("Say API error:",s)},a=()=>{l.value=null};return{submitting:Y(t),error:Y(l),say:u,sayConfirm:f,clearError:a}},Nr=1440*60*1e3,jr=()=>{const n=u=>`say-draft-${u}`;return{loadDraft:u=>{const f=n(u),m=localStorage.getItem(f);if(!m)return null;try{const a=JSON.parse(m);return Date.now()-a.savedAt>Nr||!a.messageText.trim()?(localStorage.removeItem(f),null):a}catch{return localStorage.removeItem(f),null}},saveDraft:(u,f,m,a)=>{const s=n(u);if(!f.trim()){localStorage.removeItem(s);return}const r={messageText:f,messageType:m,faceType:a,savedAt:Date.now()};localStorage.setItem(s,JSON.stringify(r))},clearDraft:u=>{const f=n(u);localStorage.removeItem(f)}}},Fr={key:0,class:"mb-4 text-sm"},Ur={class:"font-bold"},qr={key:3,class:"text-gray-600 dark:text-gray-400"},zr={key:1,class:"mb-4 rounded-md bg-red-50 p-3 text-sm text-red-700 dark:bg-red-900/20 dark:text-red-400"},Gr={key:2,class:"mb-4"},Yr={key:3,class:"mb-4"},Br={class:"flex items-center gap-1"},Hr={class:"mb-4 flex items-start gap-2"},Kr={class:"shrink-0"},Wr=["aria-label"],Zr={class:"min-w-0 flex-1"},Jr={class:"text-right text-sm"},Qr={class:"mt-4 flex flex-col gap-2 sm:flex-row"},Xr={key:4,class:"mt-4"},eo={class:"rounded-lg border-2 border-blue-500 p-3"},to={class:"mb-2 flex items-center justify-between"},ao={class:"grid grid-cols-2 gap-4 sm:grid-cols-3"},so=["onClick"],lo={class:"mt-1 text-center text-xs"},no={class:"flex justify-end gap-2"},ro=J({__name:"Say",emits:["complete"],setup(n,{emit:c}){const t=new Map([[ne.NORMAL_SAY,"NORMAL"],[ne.WEREWOLF_SAY,"WEREWOLF"],[ne.LOVERS_SAY,"LOVER"],[ne.SPECTATE_SAY,"NORMAL"],[ne.SECRET_SAY,"SECRET"],[ne.MONOLOGUE_SAY,"MONOLOGUE"],[ne.GRAVE_SAY,"GRAVE"],[ne.SYMPATHIZE_SAY,"NORMAL"]
17]),l=ke(()=>xe(()=>import("./CLlCExkg.js"),__vite__mapDeps([32,14,5,11,12,4,6,7,9,3,8,1,10,2,13,15,16,17,18,19,20,21,22,23]),import.meta.url)),u=c,{submitting:f,error:m,say:a,sayConfirm:s}=Dr(),{situation:r}=Se(),{messageDisplay:d}=Ne(),{village:b,villageId:g}=ee(),{loadDraft:_,saveDraft:x,clearDraft:p}=jr(),{setHasInputText:k,setConfirmModalOpen:w,setSubmitting:T,reset:E}=It(),{scrollToElement:A}=qe(),N=oa(),V=$(""),O=$(""),P=$("NORMAL"),G=$(""),Z=$(!1),D=$(!1),S=$(!1),L=$(null),R=$(null),te=$(null),me=o(()=>te.value?.textareaElement??null),fe=o(()=>b.value?.status.is_prologue===!0||b.value?.status.is_progress===!0),ue=o(()=>(r.value?.say.selectable_message_type_list??[]).filter(K=>K.message_type.code!==ne.ACTION)),se=o(()=>ue.value.find(K=>K.message_type.code===ne.SECRET_SAY)?.target_list??[]),B=o(()=>ue.value.find(K=>K.message_type.code===V.value)?.restrict??null),q=o(()=>B.value?.max_count??null),W=o(()=>B.value?.remaining_count??null),ie=o(()=>B.value?.max_length??200),le=o(()=>B.value?.max_line??20),Q=o(()=>O.value?O.value.split(`
18`).length:1),re=o(()=>O.value.replace(/\n/g,"").length),rt=o(()=>W.value!=null&&W.value<=0),ot=o(()=>Q.value>le.value),it=o(()=>re.value>ie.value),Te=o(()=>r.value?.participate.myself),ut=o(()=>{const F=Te.value?.status.lover_id_list??[];return F.length===0?null:`あなたは${(b.value?.participant.member_list??[]).filter(_e=>F.includes(_e.id)).map(_e=>_e.name).join("、")}に恋しています。`}),Rt=o(()=>Te.value?.skill?Te.value.skill.description.replaceAll("。",`。
19`):null),De=o(()=>Te.value?.chara),ct=o(()=>ue.value.map(F=>({value:F.message_type.code,label:F.message_type.name}))),Dt=o(()=>se.value.map(F=>({value:F.id.toString(),label:F.name}))),Qe=o(()=>V.value===ne.SECRET_SAY),Nt=o(()=>{const F=b.value?.status;return F?F.is_epilogue:!1}),jt=o(()=>{switch(V.value){case ne.WEREWOLF_SAY:return"!bg-[#f2cece] dark:!bg-[#f2aeae] !text-[#0a0a0a]";case ne.SYMPATHIZE_SAY:return"!bg-[#cef2ce] dark:!bg-[#aef2ae] !text-[#0a0a0a]";case ne.LOVERS_SAY:return"!bg-[#f2dede] dark:!bg-[#edcece] !text-[#cc2222]";case ne.MONOLOGUE_SAY:return"!bg-[#dddddd] dark:!bg-[#aaaaaa] !text-[#0a0a0a]";case ne.GRAVE_SAY:return"!bg-[#ceedf2] dark:!bg-[#a9edf7] !text-[#0a0a0a]";case ne.SPECTATE_SAY:return"!bg-[#f2f2ce] dark:!bg-[#f2f2ae] !text-[#0a0a0a]";
19case ne.SECRET_SAY:return"!bg-[#cecef2] dark:!bg-[#aeaef2] !text-[#0a0a0a]";default:return"!bg-white dark:!bg-white !text-[#0a0a0a]"}}),Xe=o(()=>!(!O.value.trim()||Qe.value&&!G.value||f.value||rt.value||ot.value||it.value)),Ft=o(()=>f.value?"送信中...":"発言確認へ"),dt=F=>{const K=t.get(F);return K&&De.value?.face_list?.some(_e=>_e.type===K)?K:"NORMAL"},Ut=()=>{De.value?.face_list?.length&&(Z.value=!0)},qt=F=>{P.value=F,Z.value=!1},zt=()=>{S.value=!0},Gt=F=>{G.value=F.toString()},mt=()=>({message_type:V.value,message:O.value,face_type:P.value,target_id:Qe.value?parseInt(G.value):void 0}),Yt=async()=>{if(!Xe.value)return;const F=await s(mt());F&&(L.value=F,D.value=!0)},Bt=async()=>{if(!Xe.value)return;await a(mt())&&(O.value="",D.value=!1,L.value=null,R.value=null,g.value&&p(g.value),u("complete"))},Ht=()=>{R.value=null},Kt=F=>{const K=me.value;if(!K){O.value+=F;return}const ae=O.value,_e=K.selectionStart,Zt=K.selectionEnd;O.value=ae.slice(0,_e)+F+ae.slice(Zt),Ue(()=>{const yt=_e+F.length;K.focus({preventScroll:!0}),K.setSelectionRange(yt,yt)})},Wt=F=>{!ue.value.some(_e=>_e.message_type.code===ne.SECRET_SAY)||!se.value.some(_e=>_e.id===F)||(V.value=ne.SECRET_SAY,G.value=F.toString(),gt())},gt=()=>{A("say-panel","#village-article-wrapper")},pt=()=>{if(ue.value.length>0){const F=ue.value[0];F&&(V.value=F.message_type.code,P.value=dt(F.message_type.code))}};Le(()=>{pt()});const vt=$(!1),ft=()=>{if(vt.value||ue.value.length===0||!g.value)return;vt.value=!0;const F=_(g.value);if(!F)return;O.value=F.messageText,ue.value.some(ae=>ae.message_type.code===F.messageType)&&(V.value=F.messageType),Ue(()=>{De.value?.face_list?.some(_e=>_e.type===F.faceType)&&(P.value=F.faceType)})};Le(()=>{ft()}),ye(()=>[ue.value,De.value],()=>{(!V.value||!ue.value.some(F=>F.message_type.code===V.value))&&pt(),ft()},{deep:!0}),Le(()=>{N&&N.registerHandlers({insertAnchor:Kt,switchToSecret:Wt,setReplyTarget:F=>{R.value=F,F&&gt()}})}),ye(V,F=>{F&&(P.value=dt(F))}),ye(O,F=>{k(F.length>0)});let et=null;return ye([O,V,P],()=>{g.value&&(et&&clearTimeout(et),et=setTimeout(()=>{x(g.value,O.value,V.value,P.value)},1e3))}),ye(D,F=>{w(F)}),ye(f,F=>{T(F)}),Ke(()=>{N&&N.unregisterHandlers(),E()}),(F,K)=>(y(),U(we,{id:"say-panel",title:"発言","panel-key":"say"},{default:h(()=>[e(Te)?(y(),C("div",Fr,[e(Te).dead?(y(),U(Be,{key:0,type:"info",class:"mb-2"},{default:h(()=>[...K[8]||(K[8]=[j(" あなたは死亡しました。 ",-1)])]),_:1})):M("",!0),e(ut)?(y(),U(Be,{key:1,type:"warning",class:"mb-2"},{default:h(()=>[j(I(e(ut)),1)]),_:1})):M("",!0),e(Te).skill?(y(),U(Be,{key:2,type:"default",class:"mb-2 whitespace-pre-line"},{default:h(()=>[j(I(e(Rt)),1)]),_:1})):M("",!0),i("span",Ur,"["+I(e(Te).chara_name.short_name)+"] "+I(e(Te).chara_name.name),1),e(Te).skill?(y(),C("span",qr," ("+I(e(Te).skill.name)+") ",1)):M("",!0)])):M("",!0),e(m)?(y(),C("div",zr,I(e(m)),1)):M("",!0),e(ue).length>1?(y(),C("div",Gr,[v(Rr,{modelValue:e(V),"onUpdate:modelValue":K[0]||(K[0]=ae=>X(V)?V.value=ae:null),options:e(ct)},null,8,["modelValue","options"])])):M("",!0),e(Qe)?(y(),C("div",Yr,[v(oe,{label:"秘話相手"},{default:h(()=>[i("div",Br,[v(be,{modelValue:e(G),"onUpdate:modelValue":K[1]||(K[1]=ae=>X(G)?G.value=ae:null),options:e(Dt),placeholder:"秘話相手を選択してください",class:"flex-1"},null,8,["modelValue","options"]),v(z,{variant:"solid",color:"primary",onClick:zt},{default:h(()=>[...K[9]||(K[9]=[j(" 画像で選択 ",-1)])]),_:1})])]),_:1})])):M("",!0),v(Je,{modelValue:e(O),"onUpdate:modelValue":K[2]||(K[2]=ae=>X(O)?O.value=ae:null),"textarea-ref":e(me)},null,8,["modelValue","textarea-ref"]),i("div",Hr,[i("div",Kr,[i("button",{type:"button",class:"focus:ring-primary-500 cursor-pointer rounded focus:ring-2 focus:outline-none","aria-label":`現在の表情: ${e(P)}。クリックして表情を変更`,onClick:Ut},[e(De)?(y(),U(Oe,{key:0,chara:e(De),"face-type":e(P),"is-large":!1,"is-small":!1},null,8,["chara","face-type"])):M("",!0)],8,Wr)]),i("div",Zr,[v(oe,null,{help:h(()=>[i("div",Jr,[e(q)!=null?(y(),C("span",{key:0,class:H({"text-red-600 dark:text-red-400":e(rt)})},"残り回数: "+I(e(W))+"/"+I(e(q))+", ",3)):M("",!0),i("span",{class:H({"text-red-600 dark:text-red-400":e(ot)})},"行数: "+I(e(Q))+"/"+I(e(le)),3),K[10]||(K[10]=j(", ",-1)),i("span",{class:H({"text-red-600 dark:text-red-400":e(it)})},"文字数: "+I(e(re))+"/"+I(e(ie)),3)])]),default:h(()=>[v(Ze,{ref_key:"formTextareaRef",ref:te,modelValue:e(O),"onUpdate:modelValue":K[3]||(K[3]=ae=>X(O)?O.value=ae:null),rows:10,size:e(d).isCharLarge?"md":"sm",class:H(e(jt))},null,8,["modelValue","size","class"])]),_:1})])]),i("div",Qr,[v(z,{disabled:!e(Xe),loading:e(f),color:"primary",block:"",onClick:Yt},{default:h(()=>[j(I(e(Ft)),1)]),_:1},8,["disabled","loading"])]),e(R)?(y(),C("div",Xr,[i("div",eo,[i("div",to,[K[11]||(K[11]=i("span",{class:"text-xs font-bold text-blue-600 dar
19k:text-(--ui-primary)"},"返信対象",-1)),i("button",{type:"button",class:"cursor-pointer text-gray-400 hover:text-gray-600 dark:hover:text-gray-300",onClick:Ht},[v(e(la),{class:"h-4 w-4"})])]),v(Vt,{message:e(R),"is-progress":e(fe),"is-img-large":!1,"is-large-text":!1,"can-reply":!1,"can-secret":!1},null,8,["message","is-progress"])])])):M("",!0),v(e(l),{modelValue:e(D),"onUpdate:modelValue":K[4]||(K[4]=ae=>X(D)?D.value=ae:null),"preview-message":e(L),submitting:e(f),"selected-message-type":e(V),"message-type-options":e(ct),"skip-confirmation":e(Nt),onConfirm:Bt},null,8,["modelValue","preview-message","submitting","selected-message-type","message-type-options","skip-confirmation"]),v(ze,{modelValue:e(Z),"onUpdate:modelValue":K[6]||(K[6]=ae=>X(Z)?Z.value=ae:null),title:"表情を選択"},{footer:h(()=>[i("div",no,[v(z,{variant:"outline",color:"secondary",onClick:K[5]||(K[5]=ae=>Z.value=!1)},{default:h(()=>[...K[12]||(K[12]=[j("キャンセル",-1)])]),_:1})])]),default:h(()=>[i("div",ao,[(y(!0),C(de,null,Ce(e(De)?.face_list||[],ae=>(y(),C("button",{key:ae.type,type:"button",class:H(["flex cursor-pointer flex-col items-center rounded border p-2 hover:bg-gray-100 dark:hover:bg-gray-800",{"ring-primary-500 ring-2":e(P)===ae.type}]),onClick:_e=>qt(ae.type)},[e(De)?(y(),U(Oe,{key:0,chara:e(De),"face-type":ae.type},null,8,["chara","face-type"])):M("",!0),i("p",lo,I(ae.name),1)],10,so))),128))])]),_:1},8,["modelValue"]),v(Ir,{modelValue:e(S),"onUpdate:modelValue":K[7]||(K[7]=ae=>X(S)?S.value=ae:null),"participant-list":e(se),onSelect:Gt},null,8,["modelValue","participant-list"])]),_:1}))}}),oo=Object.assign(ro,{__name:"PagesVillageActionSay"}),io=()=>{const{apiCall:n}=pe(),{villageId:c}=ee(),t=$(!1),l=$(null),u=async(a,s)=>{t.value=!0,l.value=null;try{return await n(`/village/${c.value}/change-skill`,{method:"POST",body:{first_request_skill:a,second_request_skill:s}}),!0}catch(r){return f(r),!1}finally{t.value=!1}},f=a=>{if(a instanceof Error){const s=a;s.statusCode===499||s.data?.status===499?l.value=s.data?.message??"エラーが発生しました":l.value=a.message}else l.value="エラーが発生しました";console.error("Skill request API error:",a)},m=()=>{l.value=null};return{submitting:Y(t),error:Y(l),requestSkill:u,clearError:m}},uo={class:"mb-3 text-sm"},co={key:0,class:"mb-3 rounded-md bg-red-50 p-3 text-sm text-red-700 dark:bg-red-900/20 dark:text-red-400"},mo={class:"flex justify-end"},go=J({__name:"SkillRequest",emits:["complete"],setup(n,{emit:c}){const t=c,{situation:l}=Se(),{onReset:u}=Ie(),{submitting:f,error:m,requestSkill:a,clearError:s}=io(),r=We({firstRequestSkillCode:"",secondRequestSkillCode:""}),d=$(!1);At(()=>{if(d.value)return;const k=l.value?.skill_request?.skill_request;k&&(r.firstRequestSkillCode=k.first.code,r.secondRequestSkillCode=k.second.code,d.value=!0)});const b=o(()=>l.value?.skill_request?.selectable_skill_list??[]),g=o(()=>b.value.map(k=>({label:k.name,value:k.code}))),_=o(()=>{const k=l.value?.skill_request?.skill_request;return k?`${k.first.name} / ${k.second.name}`:"-"}),x=o(()=>r.firstRequestSkillCode!==""&&r.secondRequestSkillCode!==""),p=async()=>{await a(String(r.firstRequestSkillCode),String(r.secondRequestSkillCode))&&t("complete")};return u(()=>{s()}),(k,w)=>(y(),U(we,{title:"役職希望","panel-key":"skill-request"},{default:h(()=>[i("p",uo,"現在の希望: "+I(e(_)),1),e(m)?(y(),C("div",co,I(e(m)),1)):M("",!0),v(oe,{label:"役職第1希望",class:"mb-3"},{default:h(()=>[v(be,{modelValue:e(r).firstRequestSkillCode,"onUpdate:modelValue":w[0]||(w[0]=T=>e(r).firstRequestSkillCode=T),options:e(g),placeholder:"選択してください",size:"sm"},null,8,["modelValue","options"])]),_:1}),v(oe,{label:"役職第2希望",class:"mb-3"},{default:h(()=>[v(be,{modelValue:e(r).secondRequestSkillCode,"onUpdate:modelValue":w[1]||(w[1]=T=>e(r).secondRequestSkillCode=T),options:e(g),placeholder:"選択してください",size:"sm"},null,8,["modelValue","options"])]),_:1}),i("div",mo,[v(z,{disabled:!e(x),loading:e(f),color:"primary",block:"",onClick:p},{default:h(()=>[...w[2]||(w[2]=[j(" 役職希望変更する ",-1)])]),_:1},8,["disabled","loading"])])]),_:1}))}}),po=Object.assign(go,{__name:"PagesVillageActionSkillRequest"}),vo={class:"flex gap-2"},fo={class:"flex flex-col items-start gap-2 sm:flex-row"},yo={class:"shrink-0"},bo={key:1,class:"flex h-20 w-16 items-center justify-center rounded-md bg-gray-200 text-xs text-gray-500 dark:bg-gray-600 dark:text-gray-400"},_o={class:"w-full flex-1"},ho={class:"mt-1 text-right text-xs text-gray-500 dark:text-gray-400"},xo={key:1,class:"rounded-md bg-red-50 p-3 text-sm text-red-700 dark:bg-red-900/20 dark:text-red-400"},ko={class:"flex justify-end"},Co=J({__name:"Spectate",emits:["complete"],setup(n,{emit:c}){const t=ke(()=>xe(()=>import("./B7m_592B.js"),__vite__mapDeps([34,4,5,6,7,14,11,12,9]),import.meta.url)),l=ke(()=>xe(()=>import("./ByefOP1F.js"),__vite__mapDeps([37,12,4,5,6,7,14,11,9,2,1,3,8,10,13,36,15,16,17,18,19,20,21,22,23]),import.meta.url)),u=c,{situation:f}=Se(),{village:m,charachips:a}
19=ee(),{confirming:s,submitting:r,error:d,confirmParticipate:b,participate:g}=Ot(),_=$(null),x=o(()=>_.value?.textareaElement??null),p=We({charaId:null,charaName:"",charaShortName:"",joinMessage:"",joinPassword:""}),k=$(!1),w=$(!1),T=$(null),E=o(()=>f.value?.participate.selectable_chara_list??[]),A=o(()=>p.charaId?E.value.find(q=>q.id===p.charaId)??null:null),N=o(()=>(m.value?.setting.rules.message_restrict?.restrict_list??[]).find(W=>W.type.code===ne.SPECTATE_SAY)??null),V=o(()=>N.value?.length??200),O=o(()=>N.value?.line??20),P=o(()=>p.joinMessage.replace(/\n/g,"").length),G=o(()=>p.joinMessage?p.joinMessage.split(`
20`).length:0),Z=o(()=>G.value>O.value),D=o(()=>P.value>V.value),S=o(()=>E.value.map(q=>({label:q.chara_name.name,value:q.id}))),L=o(()=>m.value?.setting.password.join_password_required??!1),R=o(()=>{if(!p.charaId)return!1;const q=E.value.find(ie=>ie.id===p.charaId);return q?a.value?.find(ie=>ie.id===q.charachip_id)?.is_available_change_name??!1:!1}),te=o(()=>!(p.charaId===null||p.charaName.length<1||p.charaName.length>40||p.charaShortName.length!==1||!p.joinMessage||p.joinMessage.length<1||Z.value||D.value||L.value&&!p.joinPassword)),me=()=>{k.value=!0},fe=q=>{p.charaId=q.id,p.charaName=q.chara_name.name,p.charaShortName=q.chara_name.short_name,k.value=!1},ue=()=>{const q=E.value.find(W=>W.id===p.charaId);q&&(p.charaName=q.chara_name.name,p.charaShortName=q.chara_name.short_name)},se=async()=>{if(!te.value||p.charaId===null)return;const q={charaId:p.charaId,charaName:p.charaName,charaShortName:p.charaShortName,firstRequestSkill:"LEFTOVER",secondRequestSkill:"LEFTOVER",joinMessage:p.joinMessage,joinPassword:p.joinPassword,spectator:!0},W=await b(q);W&&(T.value=W,w.value=!0)},B=async()=>{if(p.charaId===null)return;const q={charaId:p.charaId,charaName:p.charaName,charaShortName:p.charaShortName,firstRequestSkill:"LEFTOVER",secondRequestSkill:"LEFTOVER",joinMessage:p.joinMessage,joinPassword:p.joinPassword,spectator:!0};await g(q)&&(w.value=!1,u("complete"))};return(q,W)=>(y(),U(we,{title:"見学","panel-key":"spectate"},{default:h(()=>[v(oe,{label:"キャラ",required:""},{default:h(()=>[i("div",vo,[v(be,{modelValue:e(p).charaId,"onUpdate:modelValue":W[0]||(W[0]=ie=>e(p).charaId=ie),options:e(S),class:"flex-1",size:"sm",placeholder:"選択してください",onChange:ue},null,8,["modelValue","options"]),v(z,{size:"sm",onClick:me},{default:h(()=>[...W[8]||(W[8]=[j(" 画像で選択 ",-1)])]),_:1})])]),_:1}),v(oe,{label:"キャラ名",required:""},{default:h(()=>[v(Re,{modelValue:e(p).charaName,"onUpdate:modelValue":W[1]||(W[1]=ie=>e(p).charaName=ie),maxlength:40,disabled:!e(R),size:"sm"},null,8,["modelValue","disabled"])]),_:1}),v(oe,{label:"キャラ名1文字略称",required:""},{default:h(()=>[v(Re,{modelValue:e(p).charaShortName,"onUpdate:modelValue":W[2]||(W[2]=ie=>e(p).charaShortName=ie),maxlength:1,disabled:!e(R),size:"sm"},null,8,["modelValue","disabled"])]),_:1}),v(oe,{label:"入村発言",required:""},{default:h(()=>[v(Je,{modelValue:e(p).joinMessage,"onUpdate:modelValue":W[3]||(W[3]=ie=>e(p).joinMessage=ie),"textarea-ref":e(x),class:"mb-2"},null,8,["modelValue","textarea-ref"]),i("div",fo,[i("div",yo,[e(A)?(y(),U(Oe,{key:0,chara:e(A),"face-type":"NORMAL","is-small":!1},null,8,["chara"])):(y(),C("div",bo," 未選択 "))]),i("div",_o,[v(Ze,{ref_key:"formTextareaRef",ref:_,modelValue:e(p).joinMessage,"onUpdate:modelValue":W[4]||(W[4]=ie=>e(p).joinMessage=ie),size:"sm",rows:4,class:"w-full"},null,8,["modelValue"]),i("div",ho,[i("span",{class:H({"text-red-600 dark:text-red-400":e(Z)})},"行数: "+I(e(G))+"/"+I(e(O)),3),W[9]||(W[9]=j(", ",-1)),i("span",{class:H({"text-red-600 dark:text-red-400":e(D)})},"文字数: "+I(e(P))+"/"+I(e(V)),3)])])])]),_:1}),e(L)?(y(),U(oe,{key:0,label:"入村パスワード",required:""},{default:h(()=>[v(Re,{modelValue:e(p).joinPassword,"onUpdate:modelValue":W[5]||(W[5]=ie=>e(p).joinPassword=ie),type:"text",size:"sm"},null,8,["modelValue"])]),_:1})):M("",!0),e(d)?(y(),C("div",xo,I(e(d)),1)):M("",!0),i("div",ko,[v(z,{disabled:!e(te)||e(s),loading:e(s),onClick:se},{default:h(()=>[...W[10]||(W[10]=[j(" 見学確認 ",-1)])]),_:1},8,["disabled","loading"])]),v(e(t),{"is-open":e(k),charas:e(E),onSelect:fe,onClose:W[6]||(W[6]=ie=>k.value=!1)},null,8,["is-open","charas"]),v(e(l),{modelValue:e(w),"onUpdate:modelValue":W[7]||(W[7]=ie=>X(w)?w.value=ie:null),"confirm-message":e(T),submitting:e(r),onSpectate:B},null,8,["modelValue","confirm-message","submitting"])]),_:1}))}}),So=Object.assign(Co,{__name:"PagesVillageActionSpectate"}),wo=()=>{const{apiCall:n}=pe(),{villageId:c}=ee(),t=$(!1),l=$(null),u=async a=>{t.value=!0,l.value=null;try{return await n(`/village/${c.value}/vote`,{method:"POST",body:{target_id:a}}),!0}catch(s){return f(s),!1}finally{t.value=!1}},f=a=>{if(a instanceof Error){const s=a;s.statusCode===499||s.data?.status===499?l.value=s.data?.message??"エラーが発生しました":l.value=a.message}else l.value="エラーが発生しました";console.error("Vote API error:",a)},m=()=>{l.value=null};return{submitting:Y(t),error:Y(l),vote:u,clearError:m}},$o={class:"text-sm text-gray-700 dark:text-gray-300"},Vo={key:0,class:"rounded-md bg-red-50 p-3 text-sm text-red-700 dark:bg-red-900/20 dark:text-red-400"},Eo={class:"flex justify-end"},Po=J({__name:"Vote",emits:["complete"],setup(n,{emit:c}){const t=c,{submitting:l,error:u,vote:f,clearError:m}=wo(),{onReset:a}=Ie(),{situation:s}=Se(),r=o(()=>s.value?.vote??null),d=o(()=>r.value?.available_vote??!1),b=o(()=>r.value?.target?r.value.target.name:"なし"),g=o(()=>r.value?.target_list?r.value.target_list.map(k=>({label:k.name,value:k.id})):[]),_=$(r.value?.target?.id??null);ye(()=>r.value?.target?.id,k=>{_.value=k??null});const x=o(()=>!(l.value||!d.value||_.value==null)),p=async()=>
20{if(!x.value||_.value==null)return;m(),await f(_.value)&&t("complete")};return a(()=>{m(),_.value=r.value?.target?.id??null}),(k,w)=>(y(),U(we,{title:"投票","panel-key":"vote"},{default:h(()=>[i("p",$o," 現在のセット先: "+I(e(b)),1),e(u)?(y(),C("div",Vo,I(e(u)),1)):M("",!0),v(oe,{label:"対象"},{default:h(()=>[v(be,{modelValue:e(_),"onUpdate:modelValue":w[0]||(w[0]=T=>X(_)?_.value=T:null),options:e(g),disabled:!e(d),placeholder:"選択してください",size:"sm"},null,8,["modelValue","options","disabled"])]),_:1}),i("div",Eo,[v(z,{disabled:!e(x),loading:e(l),onClick:p},{default:h(()=>[...w[1]||(w[1]=[j(" 投票する ",-1)])]),_:1},8,["disabled","loading"])])]),_:1}))}}),To=Object.assign(Po,{__name:"PagesVillageActionVote"}),Ao={key:0,class:"action-container mx-auto flex max-w-[640px] flex-col gap-4 py-4"},Io=J({__name:"ActionContainer",setup(n,{expose:c}){const{situation:t}=Se(),{loadMessages:l}=Ae(),{scrollToBottom:u}=qe(),{refresh:f}=Ge(),m=o(()=>t.value?.say.available_say??!1),a=o(()=>t.value?.participate.available_participate??!1),s=o(()=>t.value?.participate.available_spectate??!1),r=o(()=>(t.value?.participate.participating??!1)&&(t.value?.skill_request.available_skill_request??!1)),d=o(()=>t.value?.participate.available_leave??!1),b=o(()=>t.value?.vote.available_vote??!1),g=o(()=>t.value?.coming_out.available_coming_out??!1),_=o(()=>t.value?.commit.available_commit??!1),x=o(()=>(t.value?.say.selectable_message_type_list??[]).some(q=>q.message_type.code===ne.ACTION)),p=o(()=>(t.value?.participate.participating??!1)&&(t.value?.rp.is_available_change_name??!1)),k=o(()=>t.value?.creator.available_creator_say??!1),w=o(()=>(t.value?.creator.available_kick||t.value?.creator.available_extend_epilogue||t.value?.creator.available_cancel_village||t.value?.creator.available_modify_setting)??!1),T=o(()=>t.value?.admin.admin??!1),E=o(()=>!1),A=o(()=>t.value?.ability.list.filter(B=>B.usable)??[]),N=o(()=>m.value||a.value||s.value||r.value||d.value||b.value||g.value||_.value||x.value||p.value||k.value||w.value||T.value||E.value||A.value.length>0),V=async()=>{await f()},O=async()=>{await f(),await l(),u()},P=async()=>{await f(),Pe("入村しました")},G=async()=>{await f(),Pe("見学入村しました")},Z=async()=>{await f(),Pe("役職希望を変更しました")},D=async()=>{await f(),Pe("退村しました")},S=async B=>{await f(),Pe(`${B}セットしました`)},L=async()=>{await f(),Pe("投票セットしました")},R=async B=>{await f(),B?Pe("カミングアウトを取り消しました"):Pe("カミングアウトしました")},te=async B=>{await f(),B?Pe("時短希望しました"):Pe("時短希望を取り消しました")},me=async()=>{await f(),await l(),u()},fe=async()=>{await f(),Pe("名前を変更しました")},ue=async()=>{await f(),await l(),u()},se=async()=>{await f(),Pe("操作が完了しました")};return c({handleActionComplete:V}),(B,q)=>e(N)?(y(),C("div",Ao,[e(m)?(y(),U(oo,{key:0,onComplete:O})):M("",!0),e(a)?(y(),U(Vr,{key:1,onComplete:P})):M("",!0),e(s)?(y(),U(So,{key:2,onComplete:G})):M("",!0),e(r)?(y(),U(po,{key:3,onComplete:Z})):M("",!0),e(d)?(y(),U(yr,{key:4,onComplete:D})):M("",!0),(y(!0),C(de,null,Ce(e(A),W=>(y(),U(Ol,{key:W.type.code,ability:W,onComplete:S},null,8,["ability"]))),128)),e(b)?(y(),U(To,{key:5,onComplete:L})):M("",!0),e(g)?(y(),U(rn,{key:6,onComplete:R})):M("",!0),e(_)?(y(),U(gn,{key:7,onComplete:te})):M("",!0),e(x)?(y(),U(ql,{key:8,onComplete:me})):M("",!0),e(p)?(y(),U(Ln,{key:9,onComplete:fe})):M("",!0),e(k)?(y(),U(Gn,{key:10,onComplete:ue})):M("",!0),e(w)?(y(),U(mr,{key:11,onComplete:se})):M("",!0),e(T)?(y(),U(Ql,{key:12})):M("",!0),e(E)?(y(),U($n,{key:13,onComplete:V})):M("",!0)])):M("",!0)}}),Mo=Object.assign(Io,{__name:"PagesVillageActionContainer"}),Lo={class:"village-layout"},Oo={key:1,class:"flex h-dvh w-full items-center justify-center bg-gray-100"},Ro={class:"flex flex-col items-center justify-center text-center"},Do={key:0,class:"h-full bg-[#363636]"},No={class:"village-main-area"},jo={class:"mx-1.5 my-2.5 text-left text-xs"},Fo={key:1,class:"h-full shrink-0"},Uo=J({__name:"village",setup(n){const c=ke(()=>xe(()=>import("./CYNoHK43.js"),__vite__mapDeps([38,11,12,4,5,6,7,14,9,2,1,3,8,10,13]),import.meta.url)),t=Xt(),l=o(()=>{const B=t.query.id;return B?Number(B):0}),u=o(()=>{const B=t.query.filterId;return B?Number(B):null}),{waitForAuth:f}=ea(),{village:m,currentVillageDay:a,initVillage:s,loading:r,error:d}=ee(),{loadMessages:b,error:g}=Ae(),{loadSituation:_,error:x}=Se(),{startPolling:p}=Lt(),{updateVillageLatest:k}=Ge(),{theme:w,hasFixedPanel:T,isFixedPanelOpen:E,loadFromCookie:A,ageLimit:N}=Ne(),{filterByParticipant:V}=je(),{reset:O}=lt(),{isMobile:P,isDesktop:G}=nt();ia();const Z=$(!1),D=$(!1),S=o(()=>w.value.isDark),L=o(()=>!Z.value||r.value),R=o(()=>!!d.value||!!g.value||!!x.value),te=o(()=>
20{if(!m.value)return"";const B=m.value.status;if(!a.value||B.code!==ve.IN_PROGRESS)return`${m.value.name} - ${B.name}`;const q=a.value.day;return`${m.value.name} - ${B.name} - ${q}日目`}),me=o(()=>{let B="100vw";if(P.value||(B=G.value?"calc(100vw - 560px)":"calc(100vw - 280px)"),!T.value)return`max-width: ${B};`;const q=E.value?"30vh":"48px";return`max-width: ${B}; padding-bottom: ${q};`}),fe=async()=>{await se()},ue=()=>{if(!m.value||!m.value.setting?.tags?.list?.some(W=>W.startsWith("R")))return;const q=l.value.toString();N.value.confirmVillageIds.includes(q)||(D.value=!0)},se=async()=>{if(!l.value){console.error("村IDが指定されていません");return}try{await f(),A(),await s(l.value),u.value&&V(u.value),await Promise.all([b(),_()]),await k(),m&&p(),ue(),Z.value=!0}catch(B){console.error("初期化に失敗しました:",B)}};return Le(async()=>{await se()}),na(()=>{O()}),ga({title:o(()=>m.value?m.value.name:"")}),(B,q)=>(y(),C("div",Lo,[e(L)?(y(),U(ma,{key:0,message:"村情報を読み込み中...",fixed:""})):e(R)?(y(),C("div",Oo,[i("div",Ro,[v(he,{name:"i-heroicons-exclamation-circle",class:"h-12 w-12 text-red-500"}),q[2]||(q[2]=i("p",{class:"mt-2"},"村情報の読み込みに失敗しました",-1)),v(z,{class:"mt-4",onClick:fe},{default:h(()=>[...q[1]||(q[1]=[j("再読み込み",-1)])]),_:1})])])):(y(),C("div",{key:2,class:H(["flex h-full w-full",{"dark-theme":e(S)}])},[e(P)?M("",!0):(y(),C("div",Do,[v(ht)])),i("div",No,[v(xa),i("div",{id:"village-article-wrapper",class:H(["overflow-x-hidden overflow-y-auto bg-white p-2.5",e(S)?"dark dark-theme":""]),style:ra(e(me))},[i("h1",jo,I(e(te)),1),e(m)&&e(a)?(y(),U(kt,{key:0})):M("",!0),e(Z)?(y(),U(yl,{key:1})):M("",!0),e(m)&&e(a)?(y(),U(kt,{key:2})):M("",!0),q[3]||(q[3]=i("div",{id:"message-bottom"},null,-1)),e(Z)?(y(),U(Mo,{key:3})):M("",!0)],6),v(Va),e(P)?(y(),U(ht,{key:0})):M("",!0)]),e(G)?(y(),C("div",Fo,[v(Gs)])):M("",!0),v(e(c),{modelValue:e(D),"onUpdate:modelValue":q[0]||(q[0]=W=>X(D)?D.value=W:null)},null,8,["modelValue"])],2))]))}}),qo=$t(Uo,[["__scopeId","data-v-8f1133c3"]]),oi=Object.freeze(Object.defineProperty({__proto__:null,default:qo},Symbol.toStringTag,{value:"Module"}));export{js as F,Ae as a,Se as b,oe as c,Rr as d,xt as e,je as u,oi as v};

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.