PageSourceSearch

https://app.buddyup3000.com/assets/send-DJyEPiRj.js

js buddyup3000.com collected 2026-10-07 03:22:00 UTC 14,163 bytes, 1 lines download raw bytes

1import{w,t as v,J as t,a as D,aY as y,av as C,gg as z,gk as O,bJ as k,H as c,p as n,o as g,cs as d,c as H}from"./index-Db445JXE.js";import{c as N}from"./ManualNotificationDumper-Bd3ZhcDK.js";import"./bu-button2-DlO6dG56.js";import"./bu-pagination-BiAvncj5.js";import"./bu-textarea-Bpp8yoZK.js";import"./bu-toggle-button-group-COAtVC5H.js";import{C as I}from"./routeChild-qDiCNs8N.js";import{t as M,n as B,o as L,p as m,q as U}from"./ManualNotificationUtilLegacy-Cns4xFUU.js";import"./nav-DHKENl7l.js";import"./chevron-right-C37eGgN3.js";import"./iron-icon-uWzU_ETe.js";import"./iron-flex-layout-gopRBjDy.js";import"./Task-B5wCzWLC.js";import"./mustache-lDDT9aR0.js";import"./ProjectUtil-CSeMD1Hs.js";import"./TaskRequest-DPnGNDts.js";var A=Object.defineProperty,F=Object.getOwnPropertyDescriptor,a=(e,l,o,r)=>{for(var s=r>1?void 0:r?F(l,o):l,u=e.length-1,p;u>=0;u--)(p=e[u])&&(s=(r?p(l,o,s):p(s))||s);return r&&s&&A(l,o,s),s};const E={pageTitle:"Create mail body",headingLoad:"Load notification draft",buttonImport:"Import",labelNotImported:"Not imoprted yet",buttonLoad:"Load",labelNotLoaded:"Not loaded yet",headingBody:"Create mail body",labelTemplateSubject:"Subject template",labelTemplateText:"Text template",labelTemplateHtml:"HTML template",loadSampleText:"Load sample text template",loadSampleHtml:"Load sample HTML template",labelTemplateData:"Template data",targetProfileSummary:"Selecting {selected} of {total}",selectAll:"Select all in page",selectNone:"Select none in page",buttonPreview:"Preview",labelOutputSubject:"Subject",labelOutputText:"Text body",labelOutputHtml:"HTML body",uploadBodies:"Upload mail bodies of selected profiles",uploadBodiesPreconditionError:"Either of subject template, text template, or html template is empty.",uploadBodiesConfirm:"Are you sure to upload mail bodies of {profilesLength} profile(s)?",sendUsingFunction:"Send mails using uploaded bodies",sendUsingFunctionConfirm:"Are you sure to send mail bodies created at {created}?",checkResult:"Check result of sent emails"},V={pageTitle:"メール本文の作成",headingLoad:"通知草案の読み込み",buttonImport:"インポート",labelNotImported:"まだインポートしていません",buttonLoad:"読み込み",labelNotLoaded:"まだ読み込まれていません",headingBody:"メール本文の作成",labelTemplateSubject:"題名テンプレート",labelTemplateText:"テキストテンプレート",labelTemplateHtml:"HTMLテンプレート",loadSampleText:"テキストテンプレート例を読み込む",loadSampleHtml:"HTMLテンプレート例を読み込む",labelTemplateData:"テンプレートに適用するデータ",targetProfileSummary:"全{total}中、{selected}個を選択",selectAll:"ページ内をすべて選択",selectNone:"ページ内をすべて選択解除",buttonPreview:"プレビュー",labelOutputSubject:"題名",labelOutputText:"テキスト本文",labelOutputHtml:"HTML本文",uploadBodies:"選択したプロファイルのメール本文をアップロード",uploadBodiesPreconditionError:"題名テンプレート、テキストテンプレート、HTMLテンプレートのいずれかが入力されていません。",uploadBodiesConfirm:"選択した {profilesLength} プロファイルのメールを送る本文をアップロードしますか?",sendUsingFunction:"アップロードしたメール本文を送ä
1¿¡",sendUsingFunctionConfirm:"{created} に作成されたメール本文を送りますか?",checkResult:"送信したメールの状況を確認する"};let i=class extends w()(I){constructor(){super(),this.loadingDisplay="none",this.targetProfiles=[],this.targetProfileSummary="",this.targetProfileSizePerPage="25",this.targetProfilesCurrentPage=0,this.mailTemplateSubject="Buddyup! 「{{community.name}}」コミュニティレポート {{dateYear}}å¹´{{dateMonth}}月{{dateDate}}日",this.mailTemplateText="",this.mailTemplateHtml="",this.previewTargetSummary="",this.templateData="",this.mailOutputSubject="",this.mailOutputText="",this.mailOutputHtml="",this.createdVerification="",this.profileChecked=e=>{const o=e.currentTarget.dataset.checkbox;if(!o)return;const r=parseInt(o),s=this.targetProfilesInPage?.[r];s&&(s.enabled=!s.enabled,this.notifyPath(`targetProfilesInPage.${r}.enabled`),this.updateTargetProfileSummary())},this.uploadBodiesClicked=async()=>{const e=this.targetProfiles.filter(l=>l.enabled).map(l=>l.profile);e.length!==0&&window.confirm(this.localize2("uploadBodiesConfirm","profilesLength",e.length))&&await this.doUploadBodies(e)},this.sendUsingFunctionClicked=async()=>{this.createdVerification&&window.confirm(this.localize2("sendUsingFunctionConfirm","created",this.createdVerification))&&(await this.doSendUsingFunction(this.createdVerification),this.createdVerification="")},this.language=window.MyAppGlobals.language,this.resources={en:E,ja:V},this.importClicked=this.importClicked.bind(this),this.loadClicked=this.loadClicked.bind(this)}static get template(){return v(t.jsx(t.jsxs,null,t.jsx("style",{include:"shared-styles"},D({"article.inner2":{padding:"16px 0"}})),t.jsx("article",{class:"inner inner2"},t.jsx("community-manual-notification-nav",{communityid:"[[communityid]]"}),t.jsx("h2",null,'[[localize("headingLoad")]]'),t.jsx("input",{type:"file",id:"import"}),t.jsx("bu-button2",{"on-click2":"[[importClicked]]",appearance:"accent"},'[[localize("buttonImport")]]'),t.jsx("div",null,"[[importedDumpSummary]]"),t.jsx("bu-button2",{"on-click2":"[[loadClicked]]",appearance:"accent"},'[[localize("buttonLoad")]]'),t.jsx("div",null,"[[loadedDraftsSummary]]"),t.jsx("h2",null,'[[localize("headingBody")]]'),t.jsx("bu-input",{value:"{{mailTemplateSubject}}",label:"[[localize('labelTemplateSubject')]]"}),t.jsx("button",{"on-click":"loadSampleText"},'[[localize("loadSampleText")]]'),t.jsx("bu-textarea",{value:"{{mailTemplateText}}",label:"[[localize('labelTemplateText')]]"}),t.jsx("button",{"on-click":"loadSampleHtml"},'[[localize("loadSampleHtml")]]'),t.jsx("bu-textarea",{value:"{{mailTemplateHtml}}",label:"[[localize('labelTemplateHtml')]]"}),t.jsx("div",null,t.jsx("bu-toggle-button-group",{"selected-value":"{{targetProfileSizePerPage}}"},t.jsx("bu-toggle-button",{slot:"tb",value:"10",text:"10/p"}),t.jsx("bu-toggle-button",{slot:"tb",value:"25",text:"25/p"}),t.jsx("bu-toggle-button",{slot:"tb",value:"50",text:"50/p"}),t.jsx("bu-toggle-button",{slot:"tb",value:"100",text:"100/p"}),t.jsx("bu-toggle-button",{slot:"tb",value:"1000000",text:"1,000,000/p"})),t.jsx("bu-pagination",{"current-page":"{{targetProfilesCurrentPage}}","max-pages":"[[targetProfilesMaxPages]]"}),"[[targetProfileSummary]]",t.jsx("button",{"on-click":"selectAllProfiles"},'[[localize("selectAll")]]'),t.jsx("button",{"on-click":"unselectAllProfiles"},'[[localize("selectNone")]]')),t.jsx("div",{class:"targetProfileTable"},t.jsx("table",null,t.jsx("thead",null,t.jsx("tr",null,t.jsx("th",null,"Name"),t.jsx("th",null,"UID"),t.jsx("th",null))),t.jsx("tbody",null,t.jsx("template",{is:"dom-repeat",items:"[[targetProfilesInPage]]"},t.jsx("tr",null,t.jsx("td",null,t.jsx("bu2-checkbox",{checked:"[[item.enabled]]","target-data":"[[num2str(index)]]","on-change2":"[[profileChecked]]"},t.jsx("bu-avatar",{"target-profile":"[[item.profile]]",size:"16px","no-alt-text":!0}),"[[item.profile.displayName]]")),t.jsx("td",null,"[[item.profile.uid]]"),t.jsx("td",null,t.jsx("button",{"data-index$":"[[index]]","on-click":"previewClicked"},'[[localize("buttonPreview")]]')))))),t.jsx("bu-button2",{"on-click2":"[[uploadBodiesClicked]]",appearance:"accent"},'[[localize("uploadBodies")]]'),t.jsx("bu-button2",{"on-click2":"[[sendUsingFunctionClicked]]",appearance:"accent",disabled:"[[sendDisbaled]]"},'[[localize("sendUsingFunction")]]'),t.jsx("a",{href:"/community/setting/notification/sent?community=[[communityid]]"},'[[localize("checkResult")]]')),t.jsx("bu-textarea",{value:"[[templateData]]",label:"[[localize('labelTemplateData')]] ([[previewTargetSummary]])",disabled:!0}),t.jsx("bu-input",{value:"[[mailOutputSubject]]",label:"[[localize('labelOutputSubject')]] ([[previewTargetSummary]])",disabled:!0}),t.jsx("bu-textarea",{value:"[[mailOutputText]]",label:"[[localize('labelOutputText')]] ([[previewTargetSummary]])",disabled:!0}),t.jsx("bu-textarea",{value:"[[mailOutputHtml]]",label:"[[localize('labelOutputHtml')]] ([[previewTargetSummary]])",disabled:!0})),t.jsx("bu-loading",{display:"{{loadingDisplay}}"})))}num2str(e){return String(e)}get importedDumpSummary(){return!this.mounted||!this.importedDump?this.localize2("labelNotImported"):M(this.importedDump)}get loadedDraftsSummary(){return!this.mounted||!this.loadedDrafts?this.localize2("labelNotLoaded"):`length: ${this.loadedDrafts.length}`}get targetProfilesMaxPages(){const e=parseInt(this.targetProfileSizePerPage);return Math.ceil(this.targetProfiles.length/e)}get targetProfilesInPage(){const e=parseInt(this.targetProfileSizePerPage);return this.targetProfiles.slice(this.targetProfilesCurrentPage*e,(this.targetProfilesCurrentPage+1)*e)}get sendDisbaled(){return!this.createdVerification}observeMounted(){this.mounted&&(this.pageTitle=this.localize2("pageTitle"))}setTargetProfiles(){if(!this.loadedDrafts||!this.importedDump){this.targetProfiles=[],this.updateTargetProfileSummary();return}const e=this.importedDump,l=y(this.loadedDrafts.map(o=>Object.values(e.profiles).find(r=>r.uid===o.uid)));this.targetProfiles=l.map(o=>({enabled:!1,profile:o})),this.updateTargetProfileSummary(),this.targetProfilesCurrentPage=0}resetTargetProfilesCurrentPage(){this.targetProfilesCurrentPage=0}updateTargetProfileSummary(){const e=this.targetProfiles.length,l=this.targetProfiles.filter(o=>o.enabled).length;this.targetProfileSummary=this.localize2("targetProfileSummary","total",e,"selected",l)}async importClicked(){if(!this.communityid)return;const e=this.$.import;if(!e.files?.length)return;const l=e.files.item(0);if(!l)return;const o=await l.text(),r=JSON.parse(o);N(r,this.communityid),this.importedDump=r}async loadClicked(){this.communityid&&(this.loadedDrafts=await B(this.communityid))}getDraftOf(e){return e?this.loadedDrafts?.find(o=>o.uid===e):void 0}async loadSampleText(){const e=await fetch("/static/manualNotificationText.mustache");this.mailTemplateText=await e.text()}async loadSampleHtml(){const e=await fetch("/static/manualNotificationHtml.mustache");this.mailTemplateHtml=await e.text()}selectAllProfilesInternal(e){this.targetProfilesInPage.forEach((l,o)=>{l.enabled!==e&&(l.enabled=e,this.notifyPath(`targetProfilesInPage.${o}.enabled`))}),this.notifySplices("targetProfilesInPage",null),this.updateTargetProfileSummary()}selectAllProfiles(){this.selectAllProfilesInternal(!0)}unselectAllProfiles(){this.selectAllProfilesInternal(!1)}previewClicked(e){const l=e.currentTarget.dataset.index;if(!l)return;const o=parseInt(l),r=this.targetProfiles?.[o]?.profile;if(!r||(this.previewTargetSummary=`${r.displayName} ${r.uid}`,!this.communityid))return;
1const s=this.getDraftOf(r.uid);if(!s)return;const u=this.importedDump;if(!u)return;this.templateData=JSON.stringify(L(s,u,this.communityid,window.location.origin),null,2);const p=window.location.origin;this.mailOutputSubject=m(s,u,this.communityid,p,this.mailTemplateSubject),this.mailOutputText=m(s,u,this.communityid,p,this.mailTemplateText),this.mailOutputHtml=m(s,u,this.communityid,p,this.mailTemplateHtml),(!this.htmlPreviewWin||this.htmlPreviewWin.closed)&&(this.htmlPreviewWin=window.open("about:blank","manual-notification-send-html-preview","popup,width=800,height=1000")),this.htmlPreviewWin?.document.open(),this.htmlPreviewWin?.document.write(this.mailOutputHtml),this.htmlPreviewWin?.document.close()}async doUploadBodies(e){const{communityid:l,importedDump:o,mailTemplateSubject:r,mailTemplateText:s,mailTemplateHtml:u}=this;if(!l||!o)return;if(!r||!s||!u){window.MyAppGlobals.myAppRouterMethods?.addToast(this.localize2("uploadBodiesPreconditionError"),{position:"top-center",color:"notice"});return}const p=window.location.origin,h=C().toISOString(),P=y(e.map(b=>{const f=this.getDraftOf(b.uid);if(!f)return;const S=m(f,o,l,p,r),T=m(f,o,l,p,s),j=m(f,o,l,p,u);return{uid:b.uid,created:h,subject:S,htmlBody:j,textBody:T}})),x=await U(l,P);await z(x),this.createdVerification=h}async doSendUsingFunction(e){this.communityid&&await Promise.race([O(this.communityid,e,`ManualNotification ${e}`,"Mail body may differ among recipients"),k(15*1e3)])}};a([n({type:String})],i.prototype,"loadingDisplay",2);a([n({type:Object})],i.prototype,"importedDump",2);a([c("mounted","importedDump")],i.prototype,"importedDumpSummary",1);a([n({type:Array})],i.prototype,"loadedDrafts",2);a([c("mounted","loadedDrafts")],i.prototype,"loadedDraftsSummary",1);a([n({type:Array})],i.prototype,"targetProfiles",2);a([n({type:String})],i.prototype,"targetProfileSummary",2);a([n({type:String})],i.prototype,"targetProfileSizePerPage",2);a([n({type:Number})],i.prototype,"targetProfilesCurrentPage",2);a([c("targetProfiles","targetProfileSizePerPage")],i.prototype,"targetProfilesMaxPages",1);a([c("targetProfiles","targetProfileSizePerPage","targetProfilesCurrentPage")],i.prototype,"targetProfilesInPage",1);a([n({type:String})],i.prototype,"mailTemplateSubject",2);a([n({type:String})],i.prototype,"mailTemplateText",2);a([n({type:String})],i.prototype,"mailTemplateHtml",2);a([n({type:String})],i.prototype,"previewTargetSummary",2);a([n({type:String})],i.prototype,"templateData",2);a([n({type:String})],i.prototype,"mailOutputSubject",2);a([n({type:String})],i.prototype,"mailOutputText",2);a([n({type:String})],i.prototype,"mailOutputHtml",2);a([n({type:String})],i.prototype,"createdVerification",2);a([c("createdVerification")],i.prototype,"sendDisbaled",1);a([g("mounted")],i.prototype,"observeMounted",1);a([g("loadedDrafts","importedDump")],i.prototype,"setTargetProfiles",1);a([g("targetProfileSizePerPage")],i.prototype,"resetTargetProfilesCurrentPage",1);a([d],i.prototype,"importClicked",1);a([d],i.prototype,"loadClicked",1);a([d],i.prototype,"loadSampleText",1);a([d],i.prototype,"loadSampleHtml",1);a([d],i.prototype,"doUploadBodies",1);a([d],i.prototype,"doSendUsingFunction",1);i=a([H("community-manual-notification-send")],i);

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.