"use strict";exports.id=1735,exports.ids=[1735],exports.modules={81735:(a,b,c)=>{c.d(b,{buildMdnMessage:()=>i});let d=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],e=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function f(a){let b=new TextEncoder().encode(a),c="";for(let a=0;a<b.length;a++)c+=String.fromCharCode(b[a]);return btoa(c)}function g(a){return/[^\x00-\x7F]/.test(a)?`=?UTF-8?B?${f(a)}?=`:a}function h(){let a=Math.random().toString(36).slice(2);return`${Date.now().toString(36)}.${a}`}function i(a){let b=a.originalRecipient||a.fromEmail,c=(a.fromEmail.split("@")[1]||"localhost").trim(),i=`<mdn.${h()}@${c}>`,j=`----=_MDN_${h()}`,k=function(a){let b=Array.isArray(a)?a[0]:a;if("string"!=typeof b)return"";let c=b.trim();return c?c.startsWith("<")?c:`<${c}>`:""}(a.originalMessageId),l=a.fromName?`${g(a.fromName)} <${a.fromEmail}>`:a.fromEmail,m=g(a.subject??`Read: ${a.originalSubject||""}`.trim()),n=a.automatic?"automatic-action/MDN-sent-automatically; displayed":"manual-action/MDN-sent-manually; displayed",o=a.reportingUa||`${c}; Bulwark Webmail`,p=a.humanText??`This is a return receipt for the message you sent to ${b}.\r
\r
Note: This receipt only acknowledges that the message was displayed on the\r
recipient's computer. There is no guarantee that the recipient has read or\r
understood the message contents.`,q=[`Reporting-UA: ${o}`,`Final-Recipient: rfc822;${b}`,...a.originalRecipient?[`Original-Recipient: rfc822;${a.originalRecipient}`]:[],...k?[`Original-Message-ID: ${k}`]:[],`Disposition: ${n}`].join("\r\n");return[`Date: ${function(a=new Date){let b=a=>String(a).padStart(2,"0");return`${d[a.getUTCDay()]}, ${b(a.getUTCDate())} ${e[a.getUTCMonth()]} ${a.getUTCFullYear()} ${b(a.getUTCHours())}:${b(a.getUTCMinutes())}:${b(a.getUTCSeconds())} +0000`}()}`,`From: ${l}`,`To: ${a.to}`,`Subject: ${m}`,`Message-ID: ${i}`,...k?[`In-Reply-To: ${k}`]:[],"MIME-Version: 1.0","Content-Type: multipart/report; report-type=disposition-notification;",`	boundary="${j}"`,"",`--${j}`,"Content-Type: text/plain; charset=utf-8","Content-Transfer-Encoding: base64","",(f(p).match(/.{1,76}/g)||[]).join("\r\n"),"",`--${j}`,"Content-Type: message/disposition-notification","Content-Transfer-Encoding: 7bit","",q,"",`--${j}--`,""].join("\r\n")}}};