(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3459],{27005:(e,n,t)=>{"use strict";t.d(n,{I:()=>s});var r=t(11141);let o=/[\u0000-\u001F\u007F]/g,i=/[\u0000-\u0008\u000B\u000C\u000E-\u001F\u007F]/g;function l(e){return e.replace(o,"")}function c(e){return(0,r.hf)(l(e))}function u(e,n){let t=[],r=n.toLowerCase();for(let{key:n,value:o}of e)n.toLowerCase()===r&&t.push(o);return t.join(",")}function a(e){try{return decodeURIComponent(e)}catch{return null}}function s(e){if(!e.toLowerCase().startsWith("mailto:"))return null;let n=e.slice(7),t=n.indexOf("?"),r=t>=0?n.slice(0,t):n,o=t>=0?n.slice(t+1):"",s=function(e){try{return decodeURIComponent(e||"")}catch{return null}}(r);if(null===s)return null;let f=function(e){if(!e)return[];let n=[];for(let t of e.split("&")){if(!t)continue;let e=t.indexOf("="),r=e>=0?t.slice(0,e):t,o=e>=0?t.slice(e+1):"",i=a(r),l=a(o);if(null===i||null===l)return null;n.push({key:i,value:l})}return n}(o);if(null===f)return null;let d=[...c(s),...c(u(f,"to"))].slice(0,200),w=Math.max(0,200-d.length),h=c(u(f,"cc")).slice(0,w),p=Math.max(0,200-d.length-h.length);return{to:d,cc:h,bcc:c(u(f,"bcc")).slice(0,p),subject:l(u(f,"subject")).slice(0,998),body:u(f,"body").replace(/\r\n?/g,"\n").replace(i,"").slice(0,65536)}}},35617:(e,n,t)=>{Promise.resolve().then(t.bind(t,35693))},35693:(e,n,t)=>{"use strict";t.d(n,{MailtoProtocolClient:()=>w});var r=t(95155),o=t(12115),i=t(27005),l=t(73525),c=t(88230);function u(){let e=window.location.pathname.indexOf("/protocol/mailto");return e>0?window.location.pathname.slice(0,e):""}function a(){window.close(),window.setTimeout(()=>{window.history.length>1&&window.history.back()},150)}function s(e){let n=`${u()}/protocol/mailto?url=${encodeURIComponent(e)}&fallback=1`,t=window.open(n,"_blank");return!!t&&(t.opener=null,!0)}function f(){return!(window.matchMedia?.("(display-mode: standalone)").matches||!0===navigator.standalone)&&window.history.length>1}async function d(){if("serviceWorker"in navigator)try{let e=await navigator.serviceWorker.ready,n=navigator.serviceWorker.controller??e.active;n?.postMessage({type:"focus-existing-mailto-client"})}catch{}}function w({openingText:e}){return(0,o.useEffect)(()=>{let e=!1;return async function(){let n=new URLSearchParams(window.location.search),t=n.get("url"),r="1"===n.get("fallback"),o=c.C$.getState().protocolOpenMode,w=t?(0,i.I)(t):null;if(w){if(r||"new-tab"!==o){if(!r){let n=await (0,l.RS)(w);if(e)return;if(n){d(),a();return}if(t&&f()&&s(t))return a()}}else if(t&&f()&&s(t))return a();(0,l.B2)(w)}window.location.replace(`${u()}/`)}(),()=>{e=!0}},[]),(0,r.jsx)("main",{className:"flex min-h-screen items-center justify-center",children:(0,r.jsx)("p",{children:e})})}}},e=>{e.O(0,[4396,1992,8824,8230,7969,8441,3794,7358],()=>e(e.s=35617)),_N_E=e.O()}]);