From 9ecc8c94abe280c07444d832ce01a0c4de66dfe6 Mon Sep 17 00:00:00 2001 From: Rai san Date: Sat, 6 Apr 2024 20:55:43 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=E3=83=97=E3=83=AC=E3=83=9F=E3=82=A2?= =?UTF-8?q?=E3=83=A0=E3=83=97=E3=83=A9=E3=82=B9=E3=81=AE=E5=95=8F=E9=A1=8C?= =?UTF-8?q?=E4=BF=AE=E6=AD=A3(2)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dist/js/chat-app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dist/js/chat-app.js b/dist/js/chat-app.js index e0b2c669..7c6c024d 100644 --- a/dist/js/chat-app.js +++ b/dist/js/chat-app.js @@ -5147,4 +5147,4 @@ var js; * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */c(e.MF),(0,e.om)(new t.uA("database",((e,{instanceIdentifier:t})=>Vs(e.getProvider("app").getImmediate(),e.getProvider("auth-internal"),e.getProvider("app-check-internal"),t)),"PUBLIC").setMultipleInstances(!0)),(0,e.KO)(r,o,js),(0,e.KO)(r,o,"esm2017");var Bs=n(4026),zs=n(5908);function Hs(e){return"true"===e.toLowerCase()}var $s,Ks,Ws=n(6582),Gs=function(e,t,n,i){return new(n||(n=Promise))((function(s,r){function o(e){try{c(i.next(e))}catch(e){r(e)}}function a(e){try{c(i.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?s(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,a)}c((i=i.apply(e,t||[])).next())}))},Qs=function(e,t){var n,i,s,r,o={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return r={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function a(a){return function(c){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;r&&(r=0,a[0]&&(o=0)),o;)try{if(n=1,i&&(s=2&a[0]?i.return:a[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,a[1])).done)return s;switch(i=0,s&&(a=[2&a[0],s.value]),a[0]){case 0:case 1:s=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,i=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(s=o.trys,(s=s.length>0&&s[s.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!s||a[1]>s[0]&&a[1]100?(tr.classList.remove("is-hidden"),tr.textContent="メッセージは100文字以内で入力してください",[2]):mr.some((function(t){return e.includes(t)}))||mr.some((function(e){var t;return null===(t=n.displayName)||void 0===t?void 0:t.includes(e)}))||"Rai Chat System"===n.displayName?(er.classList.remove("is-hidden"),er.textContent="NGワードが含まれているか、使用できない名前が含まれています。","owner"==ir?[3,3]:(s=Date.now(),Ns(ks(cr,"messages/"+s+"-"+n.uid),{username:n.displayName,paid:hr?"free":rr?"student":ir,verified:!1,uid:n.uid,id:s+"-"+n.uid,isSystemMessage:!0,time:(new Date).toLocaleString(),edited:!1,message:"このメッセージの内容は、Rai Chatの利用規約に違反しています。",favorite:0}).then((function(){sr++})),[4,(0,Bs.BN)((0,Bs.H9)(Ws.k,"raichat-user-status",null==n?void 0:n.uid),{banned:!0})])):[3,5];case 2:return a.sent(),window.location.reload(),[3,4];case 3:er.textContent="NGワードが含まれていますが、オーナー権限がアクティブなためBANされません。",a.label=4;case 4:return[2];case 5:return sr>=3?(er.classList.remove("is-hidden"),er.textContent="連続でメッセージを送信または編集することはできません",[2]):[4,(0,Bs.x7)((0,Bs.H9)(Ws.k,"raichat-user-status",n.uid))];case 6:return r=a.sent(),[4,Rs(ks(cr,"messages/"+t))];case 7:return o=a.sent().val(),Ns(ks(cr,"messages/"+o.id),{username:n.displayName,paid:hr?"free":rr?"student":ir,verified:!!r.exists()&&r.data().verified,uid:n.uid,id:o.id,edited:!0,time:o.time,message:e,favorite:o.favorite}).then((function(){sr++})),[2]}}))}))})(s.value||"",t||"",or).then((function(){window.location.reload()}))}))}else e.target.classList.contains("editInfo")&&_r("メッセージ",'このメッセージは編集されています。
プレミアムプラス
');return e.target instanceof HTMLElement?e.target.classList.contains("remove")?(o=null===(w=null===(y=null===(v=null===(_=e.target.parentElement)||void 0===_?void 0:_.parentElement)||void 0===v?void 0:v.parentElement)||void 0===y?void 0:y.parentElement)||void 0===w?void 0:w.getAttribute("data-messageId"),a=null===(T=null===(I=null===(b=null===(E=e.target.parentElement)||void 0===E?void 0:E.parentElement)||void 0===b?void 0:b.parentElement)||void 0===I?void 0:I.parentElement)||void 0===T?void 0:T.getAttribute("data-userId"),o&&a==ar||"owner"==ir?[4,vr("メッセージ","このメッセージを削除しますか?").then((function(t){var n,i,s,r;t&&(Ns(ks(cr,"messages/"+o),null),e.target instanceof HTMLElement&&(null===(r=null===(s=null===(i=null===(n=e.target.parentElement)||void 0===n?void 0:n.parentElement)||void 0===i?void 0:i.parentElement)||void 0===s?void 0:s.parentElement)||void 0===r||r.remove()))}))]:[3,6]):[3,7]:[3,9];case 5:K.sent(),K.label=6;case 6:return[3,9];case 7:return e.target.classList.contains("report")&&(c=null===(A=null===(k=null===(S=null===(C=e.target.parentElement)||void 0===C?void 0:C.parentElement)||void 0===S?void 0:S.parentElement)||void 0===k?void 0:k.parentElement)||void 0===A?void 0:A.getAttribute("data-messageId"))?[4,yr().then((function(e){return Gs($,void 0,void 0,(function(){return Qs(this,(function(t){switch(t.label){case 0:return"false"==e?[3,2]:[4,(0,Bs.BN)((0,Bs.H9)(Ws.k,"raichat-report",c,"user",ar||"abc"),{type:JSON.parse(e).type,message:JSON.parse(e).message}).then((function(){_r("メッセージを報告","このメッセージの報告が完了しました。
Rai Chatを貢献してくださり、ありがとうございます。

注意事項

")}))];case 1:return t.sent(),[3,3];case 2:console.log(e),t.label=3;case 3:return[2]}}))}))}))]:[3,9];case 8:K.sent(),K.label=9;case 9:return"owner"!=ir?[3,14]:e.target instanceof HTMLElement?e.target.classList.contains("ban")?(l=null===(D=null===(P=null===(R=null===(N=e.target.parentElement)||void 0===N?void 0:N.parentElement)||void 0===R?void 0:R.parentElement)||void 0===P?void 0:P.parentElement)||void 0===D?void 0:D.getAttribute("data-userId"))?[4,vr("アカウント","このアカウントをBANしますか?").then((function(e){e&&(0,Bs.x7)((0,Bs.H9)(Ws.k,"raichat-user-status",l)).then((function(e){return Gs($,void 0,void 0,(function(){return Qs(this,(function(t){return e.exists()&&(0,Bs.BN)((0,Bs.H9)(Ws.k,"raichat-user-status",l),{username:e.data().username,checkmarkState:Hs(e.data().checkmarkState),paid:e.data().paid,banned:!0}),[2]}))}))}))}))]:[3,11]:[3,12]:[3,14];case 10:K.sent(),K.label=11;case 11:return[3,14];case 12:return e.target.classList.contains("remove-manually")&&(h=null===(M=null===(L=null===(O=null===(x=e.target.parentElement)||void 0===x?void 0:x.parentElement)||void 0===O?void 0:O.parentElement)||void 0===L?void 0:L.parentElement)||void 0===M?void 0:M.getAttribute("data-messageId"))?[4,vr("メッセージ","このメッセージを利用規約違反として削除しますか?").then((function(t){t?Rs(As(ks(cr),"messages/"+h)).then((function(t){return Gs($,void 0,void 0,(function(){var n,i,s,r;return Qs(this,(function(o){return Ns(ks(cr,"messages/"+h),{username:"Rai Chat System",paid:"free",uid:"system",id:t.val().id,time:t.val().time,isSystemMessage:!0,message:"このメッセージはRai Chatの利用規約に違反しているか、法的要請・著作権を侵害している可能性のあるメッセージのため、削除されました。",favorite:0}),e.target instanceof HTMLElement&&(null===(r=null===(s=null===(i=null===(n=e.target.parentElement)||void 0===n?void 0:n.parentElement)||void 0===i?void 0:i.parentElement)||void 0===s?void 0:s.parentElement)||void 0===r||r.remove()),[2]}))}))})):console.log(t)}))]:[3,14];case 13:K.sent(),K.label=14;case 14:return e.target instanceof HTMLElement&&(e.target.classList.contains("favorite")&&(u=null===(q=null===(V=null===(U=null===(F=e.target.parentElement)||void 0===F?void 0:F.parentElement)||void 0===U?void 0:U.parentElement)||void 0===V?void 0:V.parentElement)||void 0===q?void 0:q.getAttribute("data-messageId")))?(d=ks(cr),(null===(H=null===(z=null===(B=null===(j=e.target.parentElement)||void 0===j?void 0:j.parentElement)||void 0===B?void 0:B.parentElement)||void 0===z?void 0:z.parentElement)||void 0===H?void 0:H.querySelector(".system"))?(_r("メッセージ",'このメッセージはシステムメッセージのため、いいねできません。'),[2]):[4,(0,Bs.x7)((0,Bs.H9)(Ws.k,"raichat-message-status",u,ar||"null","data")).then((function(t){return Gs($,void 0,void 0,(function(){var n=this;return Qs(this,(function(i){if(t.exists()){if(t.data().isFavorited)return Rs(As(d,"messages/"+u)).then((function(t){return Gs(n,void 0,void 0,(function(){var n,i,s,r,o;return Qs(this,(function(a){switch(a.label){case 0:return Ns(ks(cr,"messages/"+u),{username:t.val().username,paid:t.val().paid,uid:t.val().uid,id:t.val().id,time:t.val().time,message:t.val().message,favorite:t.val().favorite?t.val().favorite-1:0}),e.target instanceof HTMLElement&&(n=null===(o=null===(r=null===(s=null===(i=e.target.parentElement)||void 0===i?void 0:i.parentElement)||void 0===s?void 0:s.parentElement)||void 0===r?void 0:r.parentElement)||void 0===o?void 0:o.querySelector(".favoriteText"))&&(n.textContent=String(t.val().favorite?t.val().favorite-1:0)),[4,(0,Bs.kd)((0,Bs.H9)(Ws.k,"raichat-message-status",u,ar||"null","data"))];case 1:return a.sent(),[2]}}))}))})),[2]}else Rs(As(d,"messages/"+u)).then((function(t){return Gs(n,void 0,void 0,(function(){var n,i,s,r,o;return Qs(this,(function(a){switch(a.label){case 0:return Ns(ks(cr,"messages/"+u),{username:t.val().username,paid:t.val().paid,uid:t.val().uid,id:t.val().id,time:t.val().time,message:t.val().message,edited:!!t.val().edited&&t.val().edited,favorite:t.val().favorite?t.val().favorite+1:1}),e.target instanceof HTMLElement&&(n=null===(o=null===(r=null===(s=null===(i=e.target.parentElement)||void 0===i?void 0:i.parentElement)||void 0===s?void 0:s.parentElement)||void 0===r?void 0:r.parentElement)||void 0===o?void 0:o.querySelector(".favoriteText"))&&(n.textContent=t.val().favorite?t.val().favorite+1:1),[4,(0,Bs.BN)((0,Bs.H9)(Ws.k,"raichat-message-status",u,ar||"null","data"),{isFavorited:!0})];case 1:return a.sent(),[2]}}))}))}));return[2]}))}))}))]):[3,16];case 15:K.sent(),K.label=16;case 16:return e.target instanceof HTMLElement&&(e.target.classList.contains("verified")?_r("認証されたアカウント",'このアカウントはStandard以上のプランを購入していて、本人であることが確認されているため認証されています。詳細はこちら。'):e.target.classList.contains("owner")?_r("認証されたアカウント",'このアカウントはUpLauncherの管理者であるため、認証されています。詳細はこちら。'):e.target.classList.contains("student")?_r("認証されたアカウント",'このアカウントは雷の学生プログラムへ参加しているため、認証されています。詳細はこちら。'):e.target.classList.contains("system")?_r("認証されたアカウント",'このメッセージはRai Chatのシステムからのメッセージです。詳細はこちら。'):e.target.classList.contains("gov")&&_r("認証されたアカウント",'このアカウントは、政府関係者または多国間機関のアカウントであるため認証されています。詳細はこちら。'),e.target.classList.contains("highlight")&&_r("メッセージ",'このユーザーはプレミアムプラスのメッセージ強調表示機能を使用しています。')),[2]}}))}))})),(0,zs.hg)(Ws.j,(function(e){return Gs(void 0,void 0,void 0,(function(){var t,n,s,r,o,a,c;return Qs(this,(function(l){switch(l.label){case 0:return null===e?(window.location.href="/auth/signin.html",[2]):null===Zs?(console.log("[NullCheck]: #timeline is null"),[2]):(or=e,ar=e.uid,[4,(0,Bs.x7)((0,Bs.H9)(Ws.k,"patreonlinkstatus",e.uid))]);case 1:return(t=l.sent()).exists()&&(n=t.data(),ir=n.plan,rr=n.isStudent),[4,(0,Bs.x7)((0,Bs.H9)(Ws.k,"raichat-user-status",e.uid))];case 2:return!1!==(s=l.sent()).exists()?[3,4]:[4,(0,Bs.BN)((0,Bs.H9)(Ws.k,"raichat-user-status",null==e?void 0:e.uid),{username:e.displayName,checkmarkState:Hs(hr||"false"),verified:!1,paid:ir||"free",isStudent:rr||!1,highlightActive:!1,isGov:!1,banned:!1})];case 3:return l.sent(),[3,6];case 4:return"premiumplus"!=(r=s.data()).paid&&(dr=!1,fr=!1),[4,(0,Bs.BN)((0,Bs.H9)(Ws.k,"raichat-user-status",null==e?void 0:e.uid),{username:e.displayName,checkmarkState:Hs(hr||"false"),verified:!!r.verified&&r.verified,paid:ir,isStudent:rr||!1,isGov:!!r.isGov&&r.isGov,highlightActive:dr||!1,banned:r.banned})];case 5:l.sent(),1==s.data().banned&&(window.location.href="/chat/app/banned.html"),l.label=6;case 6:return o=function(e,...t){let n=(0,i.Ku)(e);for(const e of t)n=e._apply(n);return n}(ks(cr,"messages/"),function(e){if("$key"===e)throw new Error('orderByChild: "$key" is invalid. Use orderByKey() instead.');if("$priority"===e)throw new Error('orderByChild: "$priority" is invalid. Use orderByPriority() instead.');if("$value"===e)throw new Error('orderByChild: "$value" is invalid. Use orderByValue() instead.');return Mi("orderByChild","path",e,!1),new Ls(e)}("id")),Xs.addEventListener("click",(function(){!function(e,t){Gs(this,void 0,void 0,(function(){var n,i,s,r;return Qs(this,(function(o){switch(o.label){case 0:return null===t||null===er?[2]:""===e?(er.classList.remove("is-hidden"),er.textContent="メッセージを入力してください",[2]):[4,(0,Bs.x7)((0,Bs.H9)(Ws.k,"raichat-user-status",t.uid))];case 1:return(n=o.sent()).exists()&&1==n.data().banned&&(window.location.href="/chat/app/banned.html"),e.length>100?(er.classList.remove("is-hidden"),er.textContent="メッセージは100文字以内で入力してください",[2]):mr.some((function(t){return e.includes(t)}))||mr.some((function(e){var n;return null===(n=t.displayName)||void 0===n?void 0:n.includes(e)}))||"Rai Chat System"===t.displayName?(er.classList.remove("is-hidden"),er.textContent="NGワードが含まれているか、使用できない名前が含まれています。","owner"==ir?[3,3]:(i=Date.now(),Ns(ks(cr,"messages/"+i+"-"+t.uid),{username:t.displayName,paid:hr?"free":rr?"student":ir,verified:!1,uid:t.uid,id:i+"-"+t.uid,isSystemMessage:!0,time:(new Date).toLocaleString(),edited:!1,message:"このメッセージの内容は、Rai Chatの利用規約に違反しています。",favorite:0}).then((function(){sr++})),[4,(0,Bs.BN)((0,Bs.H9)(Ws.k,"raichat-user-status",null==t?void 0:t.uid),{banned:!0})])):[3,5];case 2:return o.sent(),window.location.reload(),[3,4];case 3:er.textContent="NGワードが含まれていますが、オーナー権限がアクティブなためBANされません。",o.label=4;case 4:return[2];case 5:return sr>=3?(er.classList.remove("is-hidden"),er.textContent="連続でメッセージを送信することはできません",[2]):(s=Date.now(),[4,(0,Bs.x7)((0,Bs.H9)(Ws.k,"raichat-user-status",t.uid))]);case 6:return r=o.sent(),Ns(ks(cr,"messages/"+s),{username:t.displayName,paid:hr?"free":rr?"student":ir,verified:!!r.exists()&&r.data().verified,uid:t.uid,id:s,edited:!1,time:(new Date).toLocaleString(),message:e,favorite:0}).then((function(){sr++})),[2]}}))}))}(document.getElementById("app-message").value,e)})),a=!1,!1,c=0,function(e,t,n,i){xs(e,"child_added",t,n,i)}(o,(function(t){return Gs(void 0,void 0,void 0,(function(){var n,i;return Qs(this,(function(s){return n=t.val(),i=setInterval((function(){return Gs(void 0,void 0,void 0,(function(){return Qs(this,(function(t){switch(t.label){case 0:return a&&ur?[2]:(clearInterval(i),a=!0,c++,[4,(0,Bs.x7)((0,Bs.H9)(Ws.k,"raichat-user-status",n.uid)).then((function(t){var i=document.createElement("li");i.setAttribute("data-messageId",n.id||"undefined"),i.setAttribute("data-userId",n.uid||"undefined"),i.classList.add((null==e?void 0:e.displayName)===n.username?"sent":"receive");var s=document.createElement("span"),r=n.message;r=(r=(r=(r=(r=(r=r.replace(/&/g,"&")).replace(/"/g,""")).replace(/'/g,"'")).replace(//g,">")).replace(/\n/g,"
"),"true"===lr&&(r=function(e){var t=/(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/gi;return e.includes("[url]")||e.includes("img")?e:e.replace(t,"$1")}(r=(r=(r=(r=(r=(r=(r=(r=(r=(r=r.replace(/\[b\]/g,"")).replace(/\[\/b\]/g,"")).replace(/\[i\]/g,"")).replace(/\[\/i\]/g,"")).replace(/\[u\]/g,"")).replace(/\[\/u\]/g,"")).replace(/\[s\]/g,"")).replace(/\[\/s\]/g,"")).replace(/\[icon\]/g,'')),r=(r=r.replace(/\[url\]/g,'URL'));var o=t.data();1==o.banned?s.innerHTML='Rai Chat System '.concat(n.time,")").concat("owner"==ir?'  ':"",': アクセスが禁止されているアカウントからのメッセージです。利用規約。'):("free"!=o.paid&&(r=(r=(r=(r=r.replace(/\[img\]/g,'
')).replace(/\[color=#([0-9a-fA-F]{6})\]/g,'')).replace(/\[\/color\]/g,"")),i.classList.add(gr(o)?"owner"==o.paid?"owner":o.isStudent?"student":"verified":"free"),i.classList.add("free"!=o.paid&&o.highlightActive?"highlighted":"not_highlighted"),s.innerHTML='
'.concat(o.username," ").concat(gr(o)?"owner"==o.paid?'':o.isGov?'':o.isStudent?'':'':"").concat(n.isSystemMessage?'':"","(").concat(n.time,")").concat("owner"==ir?'  ':""," ").concat(o.highlightActive?'':""," ").concat(fr&&n.uid==e.uid?'':n.edited?'':""," ").concat(n.uid==e.uid?'':"",' ').concat(n.favorite,": ").concat(r,"
")),console.log(s),i.appendChild(s),Zs.insertBefore(i,Zs.firstChild),10!=c&&ur||(Ys.style.display="",Js.classList.add("is-hidden"),clearInterval(pr)),a=!1}))]);case 1:return t.sent(),[2]}}))}))}),1),[2]}))}))})),[2]}}))}))})),null===(Ks=document.getElementById("searchInput"))||void 0===Ks||Ks.addEventListener("keyup",(function(){var e,t,n,i=this.value.toLowerCase(),s=null===(e=document.getElementById("app-timeline"))||void 0===e?void 0:e.getElementsByTagName("li");if(null!=s){var r=i.includes(" [premium]"),o=i.includes(" [student]");r&&(i=i.replace(" [premium]","")),o&&(i=i.replace(" [student]",""));for(var a=0;a-1?r?s[a].classList.contains("verified")||s[a].classList.contains("owner")?s[a].style.display="":s[a].style.display="none":o?s[a].classList.contains("student")?s[a].style.display="":s[a].style.display="none":(s[a].style.display="",null==nr||nr.classList.add("is-hidden")):(s[a].style.display="none",null==nr||nr.classList.remove("is-hidden"))}}}));var mr=["死ね","殺す","殺害","アホ","バカ","カス","ころす","しね","あほ","アダルト","エロ","うんこ","まんこ","ちんこ","セックス","sex","fuck","マン凸","チン凸","pornhub.com","xvideos.com"];function _r(e,t){var n=document.getElementById("app-message-dialog"),i=document.getElementById("app-message-dialog-content"),s=document.getElementById("app-message-dialog-title"),r=document.getElementById("app-message-dialog-description"),o=document.getElementById("app-message-dialog-button"),a=document.getElementById("app-message-dialog-close");null!==n&&null!==i&&null!==s&&null!==r&&null!==o&&null!==a&&(i.classList.add("is-active"),s.innerHTML=e,r.innerHTML=t,o.classList.add("is-hidden"),a.textContent="閉じる",n.showModal())}var vr=function(e,t){return new Promise((function(n){var i=document.getElementById("app-message-dialog"),s=document.getElementById("app-message-dialog-content"),r=document.getElementById("app-message-dialog-title"),o=document.getElementById("app-message-dialog-description"),a=document.getElementById("app-message-dialog-button"),c=document.getElementById("app-message-dialog-close");if(null===i||null===s||null===r||null===o||null===a||null===c)return console.log("Error: Element is null"),console.log("messageAlertDialog:",i),console.log("dialogContent:",s),console.log("dialogTitle:",r),console.log("dialogDescription:",o),console.log("confirmButton:",a),console.log("cancelButton:",c),void n(!1);s.classList.add("is-active"),r.innerHTML=e,o.innerHTML=t,a.classList.remove("is-hidden"),c.textContent="キャンセル",i.showModal(),a.addEventListener("click",(function(){i.close(),n(!0)})),c.addEventListener("click",(function(){i.close(),n(!1)}))}))},yr=function(){return new Promise((function(e){var t=document.getElementById("app-report-dialog"),n=document.getElementById("app-report-dialog-content"),i=document.getElementById("app-report-dialog-title"),s=document.getElementById("app-report-dialog-description"),r=document.getElementById("app-report-dialog-button"),o=document.getElementById("app-report-dialog-close"),a=document.getElementById("app-report-dialog-message"),c=document.getElementById("app-report-dialog-type");if(null===t||null===n||null===i||null===s||null===r||null===o||null===a||null===c)return console.log("Error: Element is null"),void e("false");n.classList.add("is-active"),r.classList.remove("is-hidden"),o.textContent="キャンセル",t.showModal(),r.addEventListener("click",(function(){t.close();var n=document.querySelector("input[name=report-type]:checked"),i=n?n.value:"",s=a.value;e(JSON.stringify({result:!0,type:i,message:s}))})),o.addEventListener("click",(function(){t.close(),e("false")}))}))}})()})(); \ No newline at end of file + */c(e.MF),(0,e.om)(new t.uA("database",((e,{instanceIdentifier:t})=>Vs(e.getProvider("app").getImmediate(),e.getProvider("auth-internal"),e.getProvider("app-check-internal"),t)),"PUBLIC").setMultipleInstances(!0)),(0,e.KO)(r,o,js),(0,e.KO)(r,o,"esm2017");var Bs=n(4026),zs=n(5908);function Hs(e){return"true"===e.toLowerCase()}var $s,Ks,Ws=n(6582),Gs=function(e,t,n,i){return new(n||(n=Promise))((function(s,r){function o(e){try{c(i.next(e))}catch(e){r(e)}}function a(e){try{c(i.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?s(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,a)}c((i=i.apply(e,t||[])).next())}))},Qs=function(e,t){var n,i,s,r,o={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return r={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function a(a){return function(c){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;r&&(r=0,a[0]&&(o=0)),o;)try{if(n=1,i&&(s=2&a[0]?i.return:a[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,a[1])).done)return s;switch(i=0,s&&(a=[2&a[0],s.value]),a[0]){case 0:case 1:s=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,i=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(s=o.trys,(s=s.length>0&&s[s.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!s||a[1]>s[0]&&a[1]100?(tr.classList.remove("is-hidden"),tr.textContent="メッセージは100文字以内で入力してください",[2]):mr.some((function(t){return e.includes(t)}))||mr.some((function(e){var t;return null===(t=n.displayName)||void 0===t?void 0:t.includes(e)}))||"Rai Chat System"===n.displayName?(er.classList.remove("is-hidden"),er.textContent="NGワードが含まれているか、使用できない名前が含まれています。","owner"==ir?[3,3]:(s=Date.now(),Ns(ks(cr,"messages/"+s+"-"+n.uid),{username:n.displayName,paid:hr?"free":rr?"student":ir,verified:!1,uid:n.uid,id:s+"-"+n.uid,isSystemMessage:!0,time:(new Date).toLocaleString(),edited:!1,message:"このメッセージの内容は、Rai Chatの利用規約に違反しています。",favorite:0}).then((function(){sr++})),[4,(0,Bs.BN)((0,Bs.H9)(Ws.k,"raichat-user-status",null==n?void 0:n.uid),{banned:!0})])):[3,5];case 2:return a.sent(),window.location.reload(),[3,4];case 3:er.textContent="NGワードが含まれていますが、オーナー権限がアクティブなためBANされません。",a.label=4;case 4:return[2];case 5:return sr>=3?(er.classList.remove("is-hidden"),er.textContent="連続でメッセージを送信または編集することはできません",[2]):[4,(0,Bs.x7)((0,Bs.H9)(Ws.k,"raichat-user-status",n.uid))];case 6:return r=a.sent(),[4,Rs(ks(cr,"messages/"+t))];case 7:return o=a.sent().val(),Ns(ks(cr,"messages/"+o.id),{username:n.displayName,paid:hr?"free":rr?"student":ir,verified:!!r.exists()&&r.data().verified,uid:n.uid,id:o.id,edited:!0,time:o.time,message:e,favorite:o.favorite}).then((function(){sr++})),[2]}}))}))})(s.value||"",t||"",or).then((function(){window.location.reload()}))}))}else e.target.classList.contains("editInfo")&&_r("メッセージ",'このメッセージは編集されています。
プレミアムプラス
');return e.target instanceof HTMLElement?e.target.classList.contains("remove")?(o=null===(w=null===(y=null===(v=null===(_=e.target.parentElement)||void 0===_?void 0:_.parentElement)||void 0===v?void 0:v.parentElement)||void 0===y?void 0:y.parentElement)||void 0===w?void 0:w.getAttribute("data-messageId"),a=null===(T=null===(I=null===(b=null===(E=e.target.parentElement)||void 0===E?void 0:E.parentElement)||void 0===b?void 0:b.parentElement)||void 0===I?void 0:I.parentElement)||void 0===T?void 0:T.getAttribute("data-userId"),o&&a==ar||"owner"==ir?[4,vr("メッセージ","このメッセージを削除しますか?").then((function(t){var n,i,s,r;t&&(Ns(ks(cr,"messages/"+o),null),e.target instanceof HTMLElement&&(null===(r=null===(s=null===(i=null===(n=e.target.parentElement)||void 0===n?void 0:n.parentElement)||void 0===i?void 0:i.parentElement)||void 0===s?void 0:s.parentElement)||void 0===r||r.remove()))}))]:[3,6]):[3,7]:[3,9];case 5:K.sent(),K.label=6;case 6:return[3,9];case 7:return e.target.classList.contains("report")&&(c=null===(A=null===(k=null===(S=null===(C=e.target.parentElement)||void 0===C?void 0:C.parentElement)||void 0===S?void 0:S.parentElement)||void 0===k?void 0:k.parentElement)||void 0===A?void 0:A.getAttribute("data-messageId"))?[4,yr().then((function(e){return Gs($,void 0,void 0,(function(){return Qs(this,(function(t){switch(t.label){case 0:return"false"==e?[3,2]:[4,(0,Bs.BN)((0,Bs.H9)(Ws.k,"raichat-report",c,"user",ar||"abc"),{type:JSON.parse(e).type,message:JSON.parse(e).message}).then((function(){_r("メッセージを報告","このメッセージの報告が完了しました。
Rai Chatを貢献してくださり、ありがとうございます。

注意事項

  • ・メッセージは1回しか報告できません。
  • ・BANされるまでに時間がかかります。
  • ・BANされてもされなくてもお知らせはされません。
")}))];case 1:return t.sent(),[3,3];case 2:console.log(e),t.label=3;case 3:return[2]}}))}))}))]:[3,9];case 8:K.sent(),K.label=9;case 9:return"owner"!=ir?[3,14]:e.target instanceof HTMLElement?e.target.classList.contains("ban")?(l=null===(D=null===(P=null===(R=null===(N=e.target.parentElement)||void 0===N?void 0:N.parentElement)||void 0===R?void 0:R.parentElement)||void 0===P?void 0:P.parentElement)||void 0===D?void 0:D.getAttribute("data-userId"))?[4,vr("アカウント","このアカウントをBANしますか?").then((function(e){e&&(0,Bs.x7)((0,Bs.H9)(Ws.k,"raichat-user-status",l)).then((function(e){return Gs($,void 0,void 0,(function(){return Qs(this,(function(t){return e.exists()&&(0,Bs.BN)((0,Bs.H9)(Ws.k,"raichat-user-status",l),{username:e.data().username,checkmarkState:Hs(e.data().checkmarkState),paid:e.data().paid,banned:!0}),[2]}))}))}))}))]:[3,11]:[3,12]:[3,14];case 10:K.sent(),K.label=11;case 11:return[3,14];case 12:return e.target.classList.contains("remove-manually")&&(h=null===(M=null===(L=null===(O=null===(x=e.target.parentElement)||void 0===x?void 0:x.parentElement)||void 0===O?void 0:O.parentElement)||void 0===L?void 0:L.parentElement)||void 0===M?void 0:M.getAttribute("data-messageId"))?[4,vr("メッセージ","このメッセージを利用規約違反として削除しますか?").then((function(t){t?Rs(As(ks(cr),"messages/"+h)).then((function(t){return Gs($,void 0,void 0,(function(){var n,i,s,r;return Qs(this,(function(o){return Ns(ks(cr,"messages/"+h),{username:"Rai Chat System",paid:"free",uid:"system",id:t.val().id,time:t.val().time,isSystemMessage:!0,message:"このメッセージはRai Chatの利用規約に違反しているか、法的要請・著作権を侵害している可能性のあるメッセージのため、削除されました。",favorite:0}),e.target instanceof HTMLElement&&(null===(r=null===(s=null===(i=null===(n=e.target.parentElement)||void 0===n?void 0:n.parentElement)||void 0===i?void 0:i.parentElement)||void 0===s?void 0:s.parentElement)||void 0===r||r.remove()),[2]}))}))})):console.log(t)}))]:[3,14];case 13:K.sent(),K.label=14;case 14:return e.target instanceof HTMLElement&&(e.target.classList.contains("favorite")&&(u=null===(q=null===(V=null===(U=null===(F=e.target.parentElement)||void 0===F?void 0:F.parentElement)||void 0===U?void 0:U.parentElement)||void 0===V?void 0:V.parentElement)||void 0===q?void 0:q.getAttribute("data-messageId")))?(d=ks(cr),(null===(H=null===(z=null===(B=null===(j=e.target.parentElement)||void 0===j?void 0:j.parentElement)||void 0===B?void 0:B.parentElement)||void 0===z?void 0:z.parentElement)||void 0===H?void 0:H.querySelector(".system"))?(_r("メッセージ",'このメッセージはシステムメッセージのため、いいねできません。'),[2]):[4,(0,Bs.x7)((0,Bs.H9)(Ws.k,"raichat-message-status",u,ar||"null","data")).then((function(t){return Gs($,void 0,void 0,(function(){var n=this;return Qs(this,(function(i){if(t.exists()){if(t.data().isFavorited)return Rs(As(d,"messages/"+u)).then((function(t){return Gs(n,void 0,void 0,(function(){var n,i,s,r,o;return Qs(this,(function(a){switch(a.label){case 0:return Ns(ks(cr,"messages/"+u),{username:t.val().username,paid:t.val().paid,uid:t.val().uid,id:t.val().id,time:t.val().time,message:t.val().message,favorite:t.val().favorite?t.val().favorite-1:0}),e.target instanceof HTMLElement&&(n=null===(o=null===(r=null===(s=null===(i=e.target.parentElement)||void 0===i?void 0:i.parentElement)||void 0===s?void 0:s.parentElement)||void 0===r?void 0:r.parentElement)||void 0===o?void 0:o.querySelector(".favoriteText"))&&(n.textContent=String(t.val().favorite?t.val().favorite-1:0)),[4,(0,Bs.kd)((0,Bs.H9)(Ws.k,"raichat-message-status",u,ar||"null","data"))];case 1:return a.sent(),[2]}}))}))})),[2]}else Rs(As(d,"messages/"+u)).then((function(t){return Gs(n,void 0,void 0,(function(){var n,i,s,r,o;return Qs(this,(function(a){switch(a.label){case 0:return Ns(ks(cr,"messages/"+u),{username:t.val().username,paid:t.val().paid,uid:t.val().uid,id:t.val().id,time:t.val().time,message:t.val().message,edited:!!t.val().edited&&t.val().edited,favorite:t.val().favorite?t.val().favorite+1:1}),e.target instanceof HTMLElement&&(n=null===(o=null===(r=null===(s=null===(i=e.target.parentElement)||void 0===i?void 0:i.parentElement)||void 0===s?void 0:s.parentElement)||void 0===r?void 0:r.parentElement)||void 0===o?void 0:o.querySelector(".favoriteText"))&&(n.textContent=t.val().favorite?t.val().favorite+1:1),[4,(0,Bs.BN)((0,Bs.H9)(Ws.k,"raichat-message-status",u,ar||"null","data"),{isFavorited:!0})];case 1:return a.sent(),[2]}}))}))}));return[2]}))}))}))]):[3,16];case 15:K.sent(),K.label=16;case 16:return e.target instanceof HTMLElement&&(e.target.classList.contains("verified")?_r("認証されたアカウント",'このアカウントはStandard以上のプランを購入していて、本人であることが確認されているため認証されています。詳細はこちら。'):e.target.classList.contains("owner")?_r("認証されたアカウント",'このアカウントはUpLauncherの管理者であるため、認証されています。詳細はこちら。'):e.target.classList.contains("student")?_r("認証されたアカウント",'このアカウントは雷の学生プログラムへ参加しているため、認証されています。詳細はこちら。'):e.target.classList.contains("system")?_r("認証されたアカウント",'このメッセージはRai Chatのシステムからのメッセージです。詳細はこちら。'):e.target.classList.contains("gov")&&_r("認証されたアカウント",'このアカウントは、政府関係者または多国間機関のアカウントであるため認証されています。詳細はこちら。'),e.target.classList.contains("highlight")&&_r("メッセージ",'このユーザーはプレミアムプラスのメッセージ強調表示機能を使用しています。')),[2]}}))}))})),(0,zs.hg)(Ws.j,(function(e){return Gs(void 0,void 0,void 0,(function(){var t,n,s,r,o,a,c;return Qs(this,(function(l){switch(l.label){case 0:return null===e?(window.location.href="/auth/signin.html",[2]):null===Zs?(console.log("[NullCheck]: #timeline is null"),[2]):(or=e,ar=e.uid,[4,(0,Bs.x7)((0,Bs.H9)(Ws.k,"patreonlinkstatus",e.uid))]);case 1:return(t=l.sent()).exists()&&(n=t.data(),ir=n.plan,rr=n.isStudent),[4,(0,Bs.x7)((0,Bs.H9)(Ws.k,"raichat-user-status",e.uid))];case 2:return!1!==(s=l.sent()).exists()?[3,4]:[4,(0,Bs.BN)((0,Bs.H9)(Ws.k,"raichat-user-status",null==e?void 0:e.uid),{username:e.displayName,checkmarkState:Hs(hr||"false"),verified:!1,paid:ir||"free",isStudent:rr||!1,highlightActive:!1,isGov:!1,banned:!1})];case 3:return l.sent(),[3,6];case 4:return"premiumplus"!=(r=s.data()).paid&&(dr=!1,fr=!1),[4,(0,Bs.BN)((0,Bs.H9)(Ws.k,"raichat-user-status",null==e?void 0:e.uid),{username:e.displayName,checkmarkState:Hs(hr||"false"),verified:!!r.verified&&r.verified,paid:ir,isStudent:rr||!1,isGov:!!r.isGov&&r.isGov,highlightActive:dr||!1,banned:r.banned})];case 5:l.sent(),1==s.data().banned&&(window.location.href="/chat/app/banned.html"),l.label=6;case 6:return o=function(e,...t){let n=(0,i.Ku)(e);for(const e of t)n=e._apply(n);return n}(ks(cr,"messages/"),function(e){if("$key"===e)throw new Error('orderByChild: "$key" is invalid. Use orderByKey() instead.');if("$priority"===e)throw new Error('orderByChild: "$priority" is invalid. Use orderByPriority() instead.');if("$value"===e)throw new Error('orderByChild: "$value" is invalid. Use orderByValue() instead.');return Mi("orderByChild","path",e,!1),new Ls(e)}("id")),Xs.addEventListener("click",(function(){!function(e,t){Gs(this,void 0,void 0,(function(){var n,i,s,r;return Qs(this,(function(o){switch(o.label){case 0:return null===t||null===er?[2]:""===e?(er.classList.remove("is-hidden"),er.textContent="メッセージを入力してください",[2]):[4,(0,Bs.x7)((0,Bs.H9)(Ws.k,"raichat-user-status",t.uid))];case 1:return(n=o.sent()).exists()&&1==n.data().banned&&(window.location.href="/chat/app/banned.html"),e.length>100?(er.classList.remove("is-hidden"),er.textContent="メッセージは100文字以内で入力してください",[2]):mr.some((function(t){return e.includes(t)}))||mr.some((function(e){var n;return null===(n=t.displayName)||void 0===n?void 0:n.includes(e)}))||"Rai Chat System"===t.displayName?(er.classList.remove("is-hidden"),er.textContent="NGワードが含まれているか、使用できない名前が含まれています。","owner"==ir?[3,3]:(i=Date.now(),Ns(ks(cr,"messages/"+i+"-"+t.uid),{username:t.displayName,paid:hr?"free":rr?"student":ir,verified:!1,uid:t.uid,id:i+"-"+t.uid,isSystemMessage:!0,time:(new Date).toLocaleString(),edited:!1,message:"このメッセージの内容は、Rai Chatの利用規約に違反しています。",favorite:0}).then((function(){sr++})),[4,(0,Bs.BN)((0,Bs.H9)(Ws.k,"raichat-user-status",null==t?void 0:t.uid),{banned:!0})])):[3,5];case 2:return o.sent(),window.location.reload(),[3,4];case 3:er.textContent="NGワードが含まれていますが、オーナー権限がアクティブなためBANされません。",o.label=4;case 4:return[2];case 5:return sr>=3?(er.classList.remove("is-hidden"),er.textContent="連続でメッセージを送信することはできません",[2]):(s=Date.now(),[4,(0,Bs.x7)((0,Bs.H9)(Ws.k,"raichat-user-status",t.uid))]);case 6:return r=o.sent(),Ns(ks(cr,"messages/"+s),{username:t.displayName,paid:hr?"free":rr?"student":ir,verified:!!r.exists()&&r.data().verified,uid:t.uid,id:s,edited:!1,time:(new Date).toLocaleString(),message:e,favorite:0}).then((function(){sr++})),[2]}}))}))}(document.getElementById("app-message").value,e)})),a=!1,!1,c=0,function(e,t,n,i){xs(e,"child_added",t,n,i)}(o,(function(t){return Gs(void 0,void 0,void 0,(function(){var n,i;return Qs(this,(function(s){return n=t.val(),i=setInterval((function(){return Gs(void 0,void 0,void 0,(function(){return Qs(this,(function(t){switch(t.label){case 0:return a&&ur?[2]:(clearInterval(i),a=!0,c++,[4,(0,Bs.x7)((0,Bs.H9)(Ws.k,"raichat-user-status",n.uid)).then((function(t){var i=document.createElement("li");i.setAttribute("data-messageId",n.id||"undefined"),i.setAttribute("data-userId",n.uid||"undefined"),i.classList.add((null==e?void 0:e.displayName)===n.username?"sent":"receive");var s=document.createElement("span"),r=n.message;r=(r=(r=(r=(r=(r=r.replace(/&/g,"&")).replace(/"/g,""")).replace(/'/g,"'")).replace(//g,">")).replace(/\n/g,"
"),"true"===lr&&(r=function(e){var t=/(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/gi;return e.includes("[url]")||e.includes("img")?e:e.replace(t,"$1")}(r=(r=(r=(r=(r=(r=(r=(r=(r=(r=r.replace(/\[b\]/g,"")).replace(/\[\/b\]/g,"")).replace(/\[i\]/g,"")).replace(/\[\/i\]/g,"")).replace(/\[u\]/g,"")).replace(/\[\/u\]/g,"")).replace(/\[s\]/g,"")).replace(/\[\/s\]/g,"")).replace(/\[icon\]/g,'')),r=(r=r.replace(/\[url\]/g,'URL'));var o=t.data();1==o.banned?s.innerHTML='Rai Chat System '.concat(n.time,")").concat("owner"==ir?'  ':"",': アクセスが禁止されているアカウントからのメッセージです。利用規約。'):("free"!=o.paid&&(r=(r=(r=(r=r.replace(/\[img\]/g,'
')).replace(/\[color=#([0-9a-fA-F]{6})\]/g,'')).replace(/\[\/color\]/g,"")),i.classList.add(gr(o)?"owner"==o.paid?"owner":o.isStudent?"student":"verified":"free"),i.classList.add("free"!=o.paid&&o.highlightActive?"highlighted":"not_highlighted"),s.innerHTML='
'.concat(o.username," ").concat(gr(o)?"owner"==o.paid?'':o.isGov?'':o.isStudent?'':'':"").concat(n.isSystemMessage?'':"","(").concat(n.time,")").concat("owner"==ir?'  ':""," ").concat(o.highlightActive?'':""," ").concat(fr&&n.uid==e.uid?'':n.edited?'':""," ").concat(n.uid==e.uid?'':"",' ').concat(n.favorite,": ").concat(r,"
")),console.log(s),i.appendChild(s),Zs.insertBefore(i,Zs.firstChild),10!=c&&ur||(Ys.style.display="",Js.classList.add("is-hidden"),clearInterval(pr)),a=!1}))]);case 1:return t.sent(),[2]}}))}))}),1),[2]}))}))})),[2]}}))}))})),null===(Ks=document.getElementById("searchInput"))||void 0===Ks||Ks.addEventListener("keyup",(function(){var e,t,n,i=this.value.toLowerCase(),s=null===(e=document.getElementById("app-timeline"))||void 0===e?void 0:e.getElementsByTagName("li");if(null!=s){var r=i.includes(" [premium]"),o=i.includes(" [student]");r&&(i=i.replace(" [premium]","")),o&&(i=i.replace(" [student]",""));for(var a=0;a-1?r?s[a].classList.contains("verified")||s[a].classList.contains("owner")?s[a].style.display="":s[a].style.display="none":o?s[a].classList.contains("student")?s[a].style.display="":s[a].style.display="none":(s[a].style.display="",null==nr||nr.classList.add("is-hidden")):(s[a].style.display="none",null==nr||nr.classList.remove("is-hidden"))}}}));var mr=["死ね","殺す","殺害","アホ","バカ","カス","ころす","しね","あほ","アダルト","エロ","うんこ","まんこ","ちんこ","セックス","sex","fuck","マン凸","チン凸","pornhub.com","xvideos.com"];function _r(e,t){var n=document.getElementById("app-message-dialog"),i=document.getElementById("app-message-dialog-content"),s=document.getElementById("app-message-dialog-title"),r=document.getElementById("app-message-dialog-description"),o=document.getElementById("app-message-dialog-button"),a=document.getElementById("app-message-dialog-close");null!==n&&null!==i&&null!==s&&null!==r&&null!==o&&null!==a&&(i.classList.add("is-active"),s.innerHTML=e,r.innerHTML=t,o.classList.add("is-hidden"),a.textContent="閉じる",n.showModal())}var vr=function(e,t){return new Promise((function(n){var i=document.getElementById("app-message-dialog"),s=document.getElementById("app-message-dialog-content"),r=document.getElementById("app-message-dialog-title"),o=document.getElementById("app-message-dialog-description"),a=document.getElementById("app-message-dialog-button"),c=document.getElementById("app-message-dialog-close");if(null===i||null===s||null===r||null===o||null===a||null===c)return console.log("Error: Element is null"),console.log("messageAlertDialog:",i),console.log("dialogContent:",s),console.log("dialogTitle:",r),console.log("dialogDescription:",o),console.log("confirmButton:",a),console.log("cancelButton:",c),void n(!1);s.classList.add("is-active"),r.innerHTML=e,o.innerHTML=t,a.classList.remove("is-hidden"),c.textContent="キャンセル",i.showModal(),a.addEventListener("click",(function(){i.close(),n(!0)})),c.addEventListener("click",(function(){i.close(),n(!1)}))}))},yr=function(){return new Promise((function(e){var t=document.getElementById("app-report-dialog"),n=document.getElementById("app-report-dialog-content"),i=document.getElementById("app-report-dialog-title"),s=document.getElementById("app-report-dialog-description"),r=document.getElementById("app-report-dialog-button"),o=document.getElementById("app-report-dialog-close"),a=document.getElementById("app-report-dialog-message"),c=document.getElementById("app-report-dialog-type");if(null===t||null===n||null===i||null===s||null===r||null===o||null===a||null===c)return console.log("Error: Element is null"),void e("false");n.classList.add("is-active"),r.classList.remove("is-hidden"),o.textContent="キャンセル",t.showModal(),r.addEventListener("click",(function(){t.close();var n=document.querySelector("input[name=report-type]:checked"),i=n?n.value:"",s=a.value;e(JSON.stringify({result:!0,type:i,message:s}))})),o.addEventListener("click",(function(){t.close(),e("false")}))}))}})()})(); \ No newline at end of file