@react-email/preview-server 1.0.0-canary.0 → 4.1.0-canary.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.next/BUILD_ID +1 -1
- package/.next/app-build-manifest.json +32 -32
- package/.next/build-manifest.json +14 -14
- package/.next/diagnostics/framework.json +1 -1
- package/.next/next-minimal-server.js.nft.json +1 -1
- package/.next/next-server.js.nft.json +1 -1
- package/.next/prerender-manifest.json +3 -3
- package/.next/required-server-files.json +5 -5
- package/.next/server/app/_not-found/page.js +1 -1
- package/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/server/app/favicon.ico/route.js +1 -1
- package/.next/server/app/favicon.ico/route.js.nft.json +1 -1
- package/.next/server/app/page.js +1 -1
- package/.next/server/app/page.js.nft.json +1 -1
- package/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/server/app/preview/[...slug]/page.js +152 -152
- package/.next/server/app/preview/[...slug]/page.js.nft.json +1 -1
- package/.next/server/app/preview/[...slug]/page_client-reference-manifest.js +1 -1
- package/.next/server/chunks/200.js +1 -0
- package/.next/server/chunks/3.js +15 -0
- package/.next/server/chunks/784.js +6 -0
- package/.next/server/chunks/823.js +1 -0
- package/.next/server/chunks/{428.js → 879.js} +7 -7
- package/.next/server/chunks/915.js +20 -0
- package/.next/server/middleware-build-manifest.js +1 -1
- package/.next/server/next-font-manifest.js +1 -1
- package/.next/server/next-font-manifest.json +1 -1
- package/.next/server/pages/500.html +1 -1
- package/.next/server/pages/_app.js +1 -1
- package/.next/server/pages/_app.js.nft.json +1 -1
- package/.next/server/pages/_document.js +1 -1
- package/.next/server/pages/_document.js.nft.json +1 -1
- package/.next/server/pages/_error.js +1 -1
- package/.next/server/pages/_error.js.nft.json +1 -1
- package/.next/server/server-reference-manifest.js +1 -1
- package/.next/server/server-reference-manifest.json +1 -1
- package/.next/static/chunks/{3bd82e28-cda2c00a924937c5.js → 04c799b8-f2be86d6e75dbf29.js} +1 -1
- package/.next/static/chunks/188-e278e5f1e9c4067e.js +1 -0
- package/.next/static/chunks/336-0767fdc0ff1ceaa1.js +1 -0
- package/.next/static/chunks/551-d9ce0a77591e6bf7.js +1 -0
- package/.next/static/chunks/651-337b0388fdb8c85c.js +1 -0
- package/.next/static/chunks/713-6c7607cb54b8278e.js +1 -0
- package/.next/static/chunks/834-e77d5196a2631efe.js +1 -0
- package/.next/static/chunks/app/_not-found/page-aee2c5619f94a965.js +1 -0
- package/.next/static/chunks/app/layout-4403d8068fbec772.js +1 -0
- package/.next/static/chunks/app/page-ddc5b5b5b8d2de0e.js +1 -0
- package/.next/static/chunks/app/preview/[...slug]/page-873416b81678fe6b.js +1 -0
- package/.next/static/chunks/{f33a14d2-ec7c5f0b91818561.js → f33a14d2-188715a58266ac15.js} +1 -1
- package/.next/static/chunks/{framework-b887e9fc751a9906.js → framework-f71c687711cb40cc.js} +1 -1
- package/.next/static/chunks/main-697e2f65b52ad05c.js +1 -0
- package/.next/static/chunks/main-app-deb9839bdc2bcbd4.js +1 -0
- package/.next/static/chunks/pages/_app-2e335329c12ac3e7.js +1 -0
- package/.next/static/chunks/pages/_error-73094c2ebe868f44.js +1 -0
- package/.next/static/chunks/{webpack-31c45daa2bd82a7b.js → webpack-c09dcf4c47767be8.js} +1 -1
- package/.next/static/css/{35e8811589f0962b.css → 692fd92effde156a.css} +1 -1
- package/.next/static/media/8e9860b6e62d6359-s.woff2 +0 -0
- package/.next/static/media/e4af272ccee01ff0-s.p.woff2 +0 -0
- package/.next/static/{VkyJa9K30jCrKBesOgrQT → pT9c18D6E8gNsHAfpxTUA}/_buildManifest.js +1 -1
- package/.next/trace +27 -27
- package/.next/types/app/layout.ts +1 -1
- package/.next/types/app/page.ts +1 -1
- package/.next/types/app/preview/[...slug]/page.ts +1 -1
- package/CHANGELOG.md +13 -0
- package/index.mjs +17 -0
- package/package.json +4 -4
- package/src/actions/email-validation/check-compatibility.ts +2 -2
- package/src/actions/email-validation/check-images.ts +3 -3
- package/src/actions/email-validation/check-links.ts +3 -3
- package/src/actions/email-validation/quick-fetch.ts +1 -1
- package/src/app/preview/[...slug]/page.tsx +3 -4
- package/src/components/send.tsx +1 -1
- package/src/components/toolbar/code-preview-line-link.tsx +0 -1
- package/src/components/toolbar/results.tsx +1 -0
- package/src/components/toolbar/use-cached-state.ts +2 -2
- package/src/utils/caniemail/ast/get-object-variables.ts +1 -1
- package/src/utils/caniemail/get-element-names.ts +9 -3
- package/src/utils/caniemail/tailwind/generate-tailwind-rules.ts +1 -1
- package/src/utils/caniemail/tailwind/get-tailwind-config.ts +1 -10
- package/src/utils/result.ts +2 -2
- package/src/utils/testing/js-email-test.js +1 -1
- package/src/utils/testing/request-response-email.tsx +2 -2
- package/.next/server/chunks/134.js +0 -6
- package/.next/server/chunks/235.js +0 -15
- package/.next/server/chunks/278.js +0 -1
- package/.next/server/chunks/343.js +0 -20
- package/.next/server/chunks/963.js +0 -1
- package/.next/server/chunks/999.js +0 -1
- package/.next/static/chunks/107-3043079e7cb8bcae.js +0 -1
- package/.next/static/chunks/293-67391ef0e44ffa4f.js +0 -1
- package/.next/static/chunks/45-1021fac82f766268.js +0 -1
- package/.next/static/chunks/484-1969fe871b27074e.js +0 -1
- package/.next/static/chunks/484-e02de792ff5f9ea5.js +0 -1
- package/.next/static/chunks/589-817d8691661d370e.js +0 -1
- package/.next/static/chunks/902-c34acb56733e0ce1.js +0 -1
- package/.next/static/chunks/app/_not-found/page-4cbc7dce3ad33336.js +0 -1
- package/.next/static/chunks/app/layout-74628781c0b7e7bf.js +0 -1
- package/.next/static/chunks/app/layout-daeba68330ab58bb.js +0 -1
- package/.next/static/chunks/app/page-55cf199b7ca71958.js +0 -1
- package/.next/static/chunks/app/preview/[...slug]/page-07dd9a701d0b3e56.js +0 -1
- package/.next/static/chunks/app/preview/[...slug]/page-61b0ea70a8d72916.js +0 -1
- package/.next/static/chunks/main-9a03e7ba8acb1900.js +0 -1
- package/.next/static/chunks/main-app-5bc2d814f500db60.js +0 -1
- package/.next/static/chunks/pages/_app-542a93a5a214e1c0.js +0 -1
- package/.next/static/chunks/pages/_error-d5fe1b1612642f76.js +0 -1
- package/.next/static/j4oDiQwPKPQgK5jAoiUTk/_buildManifest.js +0 -1
- package/.next/static/j4oDiQwPKPQgK5jAoiUTk/_ssgManifest.js +0 -1
- package/.next/static/media/6d93bde91c0c2823-s.woff2 +0 -0
- package/.next/static/media/a34f9d1faa5f3315-s.p.woff2 +0 -0
- package/_index.js +0 -4
- /package/.next/static/{VkyJa9K30jCrKBesOgrQT → pT9c18D6E8gNsHAfpxTUA}/_ssgManifest.js +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[719],{626:(e,t,a)=>{"use strict";a.d(t,{default:()=>Q});var r=a(8593),s=a(4631),l=a(2421),n=a(1400),i=a(1530),o=a(6286),c=a(170),d=a(8474);a(1598),a(3989),a(4345);var u=a(9579),h=a(7258);let m=l.forwardRef((e,t)=>{let{as:a="span",size:s="2",color:l="gray",transform:n,weight:i="normal",className:o,children:c,...d}=e;return(0,r.jsx)(u.DX,{className:(0,h.cn)(o,n,x(s),p(l),f(i)),ref:t,...d,children:(0,r.jsx)(a,{children:c})})}),x=e=>{switch(e){case"1":return"text-xs";case void 0:case"2":return"text-sm";case"3":return"text-base";case"4":return"text-lg";case"5":return["text-17px","md:text-xl tracking-[-0.16px]"];case"6":return"text-2xl tracking-[-0.288px]";case"7":return"text-[28px] leading-[34px] tracking-[-0.416px]";case"8":return"text-[35px] leading-[42px] tracking-[-0.64px]";case"9":return"text-6xl leading-[73px] tracking-[-0.896px]";default:return(0,h.HB)(e)}},p=e=>{switch(e){case"white":return"text-slate-12";case void 0:case"gray":return"text-slate-11";default:return(0,h.HB)(e)}},f=e=>{switch(e){case void 0:case"normal":return"font-normal";case"medium":return"font-medium";default:return(0,h.HB)(e)}};m.displayName="Text";var g=a(1735),j=a(526),b=a(9711);let v={type:"spring",stiffness:2e3,damping:80,mass:1};var w=a(1166);let y=l.forwardRef((e,t)=>{let{children:a,className:s,...l}=e;return(0,r.jsx)("button",{type:"button",...l,className:(0,h.cn)("focus:ring-gray-8 rounded text-slate-11 transition duration-200 ease-in-out hover:text-slate-12 focus:text-slate-12 focus:outline-none focus:ring-2",s),ref:t,children:a})});y.displayName="IconButton";var C=a(6445),k=a(2180);let N=l.forwardRef((e,t)=>{let{...a}=e;return(0,r.jsxs)(k.z,{ref:t,...a,children:[(0,r.jsx)("path",{d:"M9 6.75H7.75C6.64543 6.75 5.75 7.64543 5.75 8.75V17.25C5.75 18.3546 6.64543 19.25 7.75 19.25H16.25C17.3546 19.25 18.25 18.3546 18.25 17.25V8.75C18.25 7.64543 17.3546 6.75 16.25 6.75H15",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5"}),(0,r.jsx)("path",{d:"M14 8.25H10C9.44772 8.25 9 7.80228 9 7.25V5.75C9 5.19772 9.44772 4.75 10 4.75H14C14.5523 4.75 15 5.19772 15 5.75V7.25C15 7.80228 14.5523 8.25 14 8.25Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5"}),(0,r.jsx)("path",{d:"M9.75 12.25H14.25",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5"}),(0,r.jsx)("path",{d:"M9.75 15.25H14.25",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5"})]})});N.displayName="IconClipboard";let S=l.forwardRef((e,t)=>{let{...a}=e;return(0,r.jsx)(k.z,{ref:t,...a,children:(0,r.jsx)("path",{d:"M4.75 14.75v1.5a3 3 0 0 0 3 3h8.5a3 3 0 0 0 3-3v-1.5M12 14.25v-9.5M8.75 10.75l3.25 3.5 3.25-3.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5})})});S.displayName="IconDownload";var L=a(34);let R=e=>{let{markups:t,activeLang:a,setActiveLang:s}=e,l=t.find(e=>{let{language:t}=e;return a===t});if(!l)throw Error("No markup found for the active language!",{cause:{activeLang:a,markups:t}});return(0,r.jsxs)("div",{className:"relative max-h-[650px] w-full h-full whitespace-pre rounded-md border border-slate-6 text-sm",style:{lineHeight:"130%",background:"linear-gradient(145.37deg, rgba(255, 255, 255, 0.09) -8.75%, rgba(255, 255, 255, 0.027) 83.95%)",boxShadow:"rgb(0 0 0 / 10%) 0px 5px 30px -5px"},children:[(0,r.jsxs)("div",{className:"h-9 border-b border-slate-6",children:[(0,r.jsx)("div",{className:"flex",children:(0,r.jsx)(j.o,{id:"code",children:t.map(e=>{let{language:t}=e,l=a===t;return(0,r.jsxs)(b.P.button,{className:"relative px-4 py-[8px] font-sans text-sm font-medium transition duration-200 ease-in-out hover:text-slate-12 ".concat(a!==t?"text-slate-11":"text-slate-12"),onClick:()=>{s(t)},children:[l?(0,r.jsx)(b.P.span,{animate:{opacity:1},className:"absolute bottom-0 left-0 right-0 top-0 bg-slate-4",exit:{opacity:0},initial:{opacity:0},layoutId:"code",transition:v}):null,w.A[t]]},t)})})}),(0,r.jsx)(M,{content:l.content}),(0,r.jsx)(T,{content:l.content,filename:"email.".concat(l.language)})]}),(0,r.jsx)("div",{className:"h-[calc(100%-2.25rem)]",children:(0,r.jsx)(d.Code,{language:a,children:l.content})})]})},M=e=>{let{content:t}=e,[a,s]=l.useState(!1),n=l.useRef(void 0);return l.useEffect(()=>{s(!1),clearTimeout(n.current),n.current=void 0},[t]),(0,r.jsxs)(L.m,{children:[(0,r.jsx)(L.m.Trigger,{asChild:!0,className:"absolute right-2 top-2 hidden md:block",children:(0,r.jsx)(y,{onClick:async()=>{s(!0),await (0,h.eM)(t),n.current=setTimeout(()=>{s(!1)},3e3)},children:a?(0,r.jsx)(C.i,{}):(0,r.jsx)(N,{})})}),(0,r.jsx)(L.m.Content,{children:"Copy to Clipboard"})]})},T=e=>{let{content:t,filename:a}=e,s=l.useMemo(()=>{let e=new File([t],a);return URL.createObjectURL(e)},[t,a]),n=l.useSyncExternalStore(()=>()=>{},()=>s,()=>void 0);return(0,r.jsxs)(L.m,{children:[(0,r.jsx)(L.m.Trigger,{asChild:!0,className:"text-gray-11 absolute right-8 top-2 hidden md:block",children:(0,r.jsx)("a",{className:"text-slate-11 transition duration-200 ease-in-out hover:text-slate-12",download:a,href:n,children:(0,r.jsx)(S,{})})}),(0,r.jsx)(L.m.Content,{children:"Download"})]})},H=e=>{var t,a;let r=t=>{let a=e.getBoundingClientRect();document.dispatchEvent(new MouseEvent("mousemove",{...t,clientX:t.clientX+a.x,clientY:t.clientY+a.y}))},s=e=>{document.dispatchEvent(new MouseEvent("mouseup",e))};return null==(t=e.contentDocument)||t.addEventListener("mousemove",r),null==(a=e.contentDocument)||a.addEventListener("mouseup",s),()=>{var t,a;null==(t=e.contentDocument)||t.removeEventListener("mousemove",r),null==(a=e.contentDocument)||a.removeEventListener("mouseup",s)}},P=e=>{let{width:t,height:a,onResize:s,onResizeEnd:n,children:i,maxHeight:o,maxWidth:c,minHeight:d,minWidth:m,...x}=e,p=(0,l.useRef)(null),f=(0,l.useRef)(null),g=(0,l.useCallback)(()=>{f.current&&document.removeEventListener("mousemove",f.current),document.removeEventListener("mouseup",g),null==n||n()},[]),j=e=>{f.current=t=>{if(0===t.button&&p.current){let a="east"===e||"west"===e,r=a?t.clientX:t.clientY,l=p.current.getBoundingClientRect();s(2*Math.abs(r-(a?l.x+l.width/2:l.y+l.height/2)),e)}else g()},document.addEventListener("mouseup",g),document.addEventListener("mousemove",f.current)};return(0,l.useEffect)(()=>{if(window.document)return()=>{g()}},[]),(0,r.jsxs)("div",{...x,className:(0,h.cn)("relative mx-auto my-auto box-content",x.className),children:[(0,r.jsx)("div",{"aria-label":"resize-west","aria-valuenow":t,"aria-valuemin":m,"aria-valuemax":c,className:"-translate-x-1/2 -translate-y-1/2 absolute top-1/2 left-2 cursor-w-resize p-2 [user-drag:none]",onDragStart:e=>e.preventDefault(),draggable:"false",onMouseDown:()=>{j("west")},role:"slider",tabIndex:0,children:(0,r.jsx)("div",{className:"h-8 w-1 rounded-md bg-black/30"})}),(0,r.jsx)("div",{"aria-label":"resize-east","aria-valuenow":t,"aria-valuemin":m,"aria-valuemax":c,onDragStart:e=>e.preventDefault(),className:"-translate-x-full -translate-y-1/2 absolute top-1/2 left-full cursor-e-resize p-2 [user-drag:none]",draggable:"false",onMouseDown:()=>{j("east")},role:"slider",tabIndex:0,children:(0,r.jsx)("div",{className:"h-8 w-1 rounded-md bg-black/30"})}),(0,r.jsx)("div",{"aria-label":"resize-north","aria-valuenow":a,"aria-valuemin":d,"aria-valuemax":o,onDragStart:e=>e.preventDefault(),className:"-translate-x-1/2 -translate-y-1/2 absolute top-0 left-1/2 cursor-n-resize p-2 [user-drag:none]",draggable:"false",onMouseDown:()=>{j("north")},role:"slider",tabIndex:0,children:(0,r.jsx)("div",{className:"h-1 w-8 rounded-md bg-black/30"})}),(0,r.jsx)("div",{"aria-label":"resize-south","aria-valuenow":a,"aria-valuemin":d,"aria-valuemax":o,onDragStart:e=>e.preventDefault(),className:"-translate-x-1/2 -translate-y-1/2 absolute top-full left-1/2 cursor-s-resize p-2 [user-drag:none]",draggable:"false",onMouseDown:()=>{j("south")},role:"slider",tabIndex:0,children:(0,r.jsx)("div",{className:"h-1 w-8 rounded-md bg-black/30"})}),(0,r.jsx)(u.DX,{ref:p,children:i})]})};var I=a(1975);let E=e=>{let{markup:t}=e,[a,s]=l.useState(""),[n,o]=l.useState("Testing React Email"),[d,u]=l.useState(!1),[h,x]=l.useState(!1),p=async e=>{try{e.preventDefault(),u(!0);let r=await fetch("https://react.email/api/send/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({to:a,subject:n,html:t})});if(429===r.status){let{error:e}=await r.json();i.oR.error(e)}i.oR.success("Email sent! Check your inbox.")}catch(e){i.oR.error("Something went wrong. Please try again.")}finally{u(!1)}};return(0,r.jsxs)(I.bL,{onOpenChange:()=>{h?(document.body.classList.remove("popup-open"),x(!1)):(document.body.classList.add("popup-open"),x(!0))},open:h,children:[(0,r.jsx)(I.l9,{asChild:!0,children:(0,r.jsx)("button",{className:"box-border flex h-5 w-20 items-center justify-center self-center rounded-lg border border-slate-6 bg-slate-2 px-4 py-4 text-center font-sans text-sm text-slate-11 outline-none transition duration-300 ease-in-out hover:border-slate-10 hover:text-slate-12",type:"submit",children:"Send"})}),(0,r.jsx)(I.Mz,{}),(0,r.jsx)(I.ZL,{children:(0,r.jsx)(I.UC,{align:"end",className:"-mt-10 w-80 rounded-lg border border-slate-6 bg-black/70 p-3 font-sans text-slate-11 shadow-md backdrop-blur-lg font-sans",sideOffset:48,children:(0,r.jsxs)("form",{className:"mt-1",onSubmit:e=>void p(e),children:[(0,r.jsx)("label",{className:"mb-2 block text-xs uppercase text-slate-10",htmlFor:"to",children:"Recipient"}),(0,r.jsx)("input",{autoFocus:!0,className:"mb-3 w-full appearance-none rounded-lg border border-slate-6 bg-slate-3 px-2 py-1 text-sm text-slate-12 placeholder-slate-10 outline-none transition duration-300 ease-in-out focus:ring-1 focus:ring-slate-10",defaultValue:a,id:"to",onChange:e=>{s(e.target.value)},placeholder:"you@example.com",required:!0,type:"email"}),(0,r.jsx)("label",{className:"mb-2 mt-1 block text-xs uppercase text-slate-10",htmlFor:"subject",children:"Subject"}),(0,r.jsx)("input",{className:"mb-3 w-full appearance-none rounded-lg border border-slate-6 bg-slate-3 px-2 py-1 text-sm text-slate-12 placeholder-slate-10 outline-none transition duration-300 ease-in-out focus:ring-1 focus:ring-slate-10",defaultValue:n,id:"subject",onChange:e=>{o(e.target.value)},placeholder:"My Email",required:!0,type:"text"}),(0,r.jsx)("input",{className:"appearance-none checked:bg-blue-500",type:"checkbox"}),(0,r.jsxs)("div",{className:"mt-3 flex items-center justify-between",children:[(0,r.jsxs)(m,{className:"inline-block",size:"1",children:["Powered by"," ",(0,r.jsx)("a",{className:"text-white/85 transition duration-300 ease-in-out hover:text-slate-12",href:"https://resend.com",rel:"noreferrer",target:"_blank",children:"Resend"})]}),(0,r.jsx)(c.Button,{className:"disabled:border-transparent disabled:bg-slate-11",disabled:0===n.length||0===a.length||d,type:"submit",children:"Send"})]})]})})})]})};var z=a(8353),D=a(1619);let V=l.forwardRef((e,t)=>{let{...a}=e;return(0,r.jsx)(k.z,{ref:t,...a,children:(0,r.jsx)("path",{d:"M9.75 15.25H17.25C18.3546 15.25 19.25 14.3546 19.25 13.25V6.75C19.25 5.64543 18.3546 4.75 17.25 4.75H6.75C5.64543 4.75 4.75 5.64543 4.75 6.75V13.25C4.75 14.3546 5.64543 15.25 6.75 15.25H9.75ZM9.75 15.25C9.75 15.25 10 18.25 8 19.25H16C14 18.25 14.25 15.25 14.25 15.25",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5"})})});V.displayName="IconMonitor";let _=l.forwardRef((e,t)=>{let{...a}=e;return(0,r.jsx)(k.z,{ref:t,...a,children:(0,r.jsx)("path",{d:"M17.4 15L21 11.5L17.4 8M6.6 8L3 11.5L6.6 15M14.25 4.5L9.75 18.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5"})})});_.displayName="IconSource";let O=e=>{let{activeView:t,setActiveView:a}=e;return(0,r.jsxs)(D.bL,{"aria-label":"View mode",className:"inline-block items-center bg-slate-2 border border-slate-6 rounded-md overflow-hidden h-[36px]",onValueChange:e=>{e&&a(e)},type:"single",value:t,children:[(0,r.jsx)(D.q7,{value:"preview",children:(0,r.jsxs)(L.m,{children:[(0,r.jsx)(L.m.Trigger,{asChild:!0,children:(0,r.jsxs)("div",{className:(0,h.cn)("px-3 py-2 transition ease-in-out duration-200 relative hover:text-slate-12",{"text-slate-11":"desktop"!==t,"text-slate-12":"desktop"===t}),children:["preview"===t&&(0,r.jsx)(b.P.span,{animate:{opacity:1},className:"absolute left-0 right-0 top-0 bottom-0 bg-slate-4",exit:{opacity:0},initial:{opacity:0},layoutId:"topbar-tabs",transition:v}),(0,r.jsx)(V,{})]})}),(0,r.jsx)(L.m.Content,{children:"Preview"})]})}),(0,r.jsx)(D.q7,{value:"source",children:(0,r.jsxs)(L.m,{children:[(0,r.jsx)(L.m.Trigger,{asChild:!0,children:(0,r.jsxs)("div",{className:(0,h.cn)("px-3 py-2 transition ease-in-out duration-200 relative hover:text-slate-12",{"text-slate-11":"source"!==t,"text-slate-12":"source"===t}),children:["source"===t&&(0,r.jsx)(b.P.span,{animate:{opacity:1},className:"absolute left-0 right-0 top-0 bottom-0 bg-slate-4",exit:{opacity:0},initial:{opacity:0},layoutId:"topbar-tabs",transition:v}),(0,r.jsx)(_,{})]})}),(0,r.jsx)(L.m.Content,{children:"Code"})]})})]})};var F=a(619),U=a(7799);let B=[{name:"Desktop",dimensions:{width:600,height:1024}},{name:"Mobile",dimensions:{width:375,height:812}}],W={active:{width:"3.5rem",padding:"0 0 0 0.5rem"},inactive:{width:"0"}},A=e=>{let{icon:t,isActive:a,label:s,onBlur:n,onChange:i,setIsActive:o,value:c,hasBorder:d}=e,u=l.useRef(null);return l.useEffect(()=>{a&&u.current&&u.current.focus()},[a]),(0,r.jsx)(L.m.Provider,{children:(0,r.jsxs)(L.m,{children:[(0,r.jsx)(L.m.Trigger,{asChild:!0,children:(0,r.jsxs)(b.P.button,{onClick:()=>{a?o(!1):o(!0)},className:(0,h.cn)("relative flex items-center justify-center p-2",{"border-slate-6 border-r":d}),children:[t,(0,r.jsx)(b.P.input,{ref:u,initial:!1,animate:a?"active":"inactive",className:"arrow-hide relative flex h-8 items-center justify-center bg-black text-sm outline-none",onChange:e=>i(Number.parseInt(e.currentTarget.value)),onBlur:n,type:"number",value:c,variants:W})]})}),(0,r.jsxs)(L.m.Content,{children:[(0,r.jsxs)("span",{children:[s,": "]}),(0,r.jsxs)("span",{className:"font-mono",children:[c,"px"]})]})]})})},Z=e=>{let{name:t,dimensions:a,onSelect:s}=e;return(0,r.jsxs)(F.q7,{className:"group flex w-full cursor-pointer select-none items-center justify-between rounded-md py-1.5 pr-1 pl-2 text-sm outline-none transition-colors data-[highlighted]:bg-slate-5",onClick:()=>s(a),children:[t,(0,r.jsxs)("span",{className:"flex h-fit items-center rounded-full bg-slate-6 px-2 py-1 font-medium text-slate-11 text-xs",children:[a.width,"x",a.height]})]})},Y=e=>{let{viewWidth:t,viewHeight:a,setViewWidth:s,setViewHeight:n}=e,[i,o]=l.useState(!1),[c,d]=l.useState(null),u=e=>{s(e.width),n(e.height)},m=()=>{d(null)};return(0,r.jsxs)("div",{className:"relative flex h-9 w-fit overflow-hidden rounded-lg border border-slate-6 text-sm transition-colors duration-300 ease-in-out focus-within:border-slate-8 hover:border-slate-8",children:[(0,r.jsx)(A,{icon:(0,r.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,r.jsx)("path",{d:"M21 8V5a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v3"}),(0,r.jsx)("path",{d:"M21 16v3a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-3"}),(0,r.jsx)("path",{d:"M4 12H2"}),(0,r.jsx)("path",{d:"M10 12H8"}),(0,r.jsx)("path",{d:"M16 12h-2"}),(0,r.jsx)("path",{d:"M22 12h-2"})]}),value:t,onChange:s,isActive:"width"===c,setIsActive:e=>d(e?"width":null),onBlur:m,label:"Width",hasBorder:!0}),(0,r.jsx)(A,{icon:(0,r.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,r.jsx)("path",{d:"M8 3H5a2 2 0 0 0-2 2v14c0 1.1.9 2 2 2h3"}),(0,r.jsx)("path",{d:"M16 3h3a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-3"}),(0,r.jsx)("path",{d:"M12 20v2"}),(0,r.jsx)("path",{d:"M12 14v2"}),(0,r.jsx)("path",{d:"M12 8v2"}),(0,r.jsx)("path",{d:"M12 2v2"})]}),value:a,onChange:n,isActive:"height"===c,setIsActive:e=>d(e?"height":null),onBlur:m,label:"Height"}),(0,r.jsxs)(F.bL,{open:i,onOpenChange:o,children:[(0,r.jsx)(F.l9,{asChild:!0,children:(0,r.jsxs)("button",{type:"button",className:"relative flex items-center justify-center overflow-hidden bg-slate-5 p-2 text-slate-11 text-sm leading-none outline-none transition-colors ease-linear focus-within:text-slate-12 hover:text-slate-12 focus:text-slate-12",children:[(0,r.jsx)("span",{className:"sr-only",children:"View presets"}),(0,r.jsx)(U.R,{className:(0,h.cn)("transform transition-transform duration-200 ease-[cubic-bezier(.36,.66,.6,1)]",{"-rotate-180":i})})]})}),(0,r.jsx)(F.ZL,{children:(0,r.jsx)(F.UC,{align:"end",className:"flex min-w-[12rem] flex-col gap-2 rounded-md border border-slate-8 border-solid bg-black px-2 py-2 text-white",sideOffset:5,children:B.map(e=>(0,r.jsx)(Z,{name:e.name,dimensions:e.dimensions,onSelect:u},e.name))})})]})]})};var J=a(1140);let X=(e,t,a)=>Math.min(Math.max(e,t),a),q=(e,t,a)=>{let[r,s]=(0,l.useState)(e);return[X(r,t,a),e=>{"function"==typeof e?s(r=>{let s=X(r,t,a);return X(e(s),t,a)}):s(X(e,t,a))}]},G=e=>(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:"absolute inset-0 z-50 bg-black/80"}),(0,r.jsx)("div",{className:"absolute left-[50%] top-[50%] z-50 grid min-h-[50vh] w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 rounded-t-sm border border-t-4 bg-white p-6 text-black shadow-lg duration-200 sm:rounded-lg md:max-w-[568px] lg:max-w-[968px]",children:(0,r.jsxs)("div",{className:"flex min-w-0 max-w-full flex-col space-y-1.5",children:[(0,r.jsxs)("h2",{className:"flex flex-shrink items-center gap-4 pb-2 text-lg font-semibold leading-none tracking-tight",children:[(0,r.jsxs)("svg",{className:"h-6 w-6 font-extrabold text-red-600",fill:"none",height:"24",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",viewBox:"0 0 24 24",width:"24",xmlns:"http://www.w3.org/2000/svg",children:[(0,r.jsx)("path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z"}),(0,r.jsx)("path",{d:"M12 9v4"}),(0,r.jsx)("path",{d:"M12 17h.01"})]}),e.error.name,": ",e.error.message]}),e.error.stack?(0,r.jsx)("div",{className:"flex-grow scroll-px-4 overflow-x-auto rounded-lg bg-red-500 p-2 text-sm text-gray-100",children:(0,r.jsx)("pre",{className:"w-full min-w-0 font-mono leading-7",children:e.error.stack})}):void 0]})})]}),Q=e=>{var t,a;let{emailTitle:c,className:d,...u}=e,{renderingResult:m,renderedEmailMetadata:x}=(0,l.use)(J.o),p=(0,s.useRouter)(),f=(0,s.usePathname)(),j=(0,s.useSearchParams)(),b=null!=(t=j.get("view"))?t:"preview",v=null!=(a=j.get("lang"))?a:"jsx",w=void 0!==x,y="error"in m,[C,k]=(0,l.useState)(Number.POSITIVE_INFINITY),[N,S]=(0,l.useState)(Number.POSITIVE_INFINITY),M=j.get("width"),T=j.get("height"),[I,D]=q(M?Number.parseInt(M):600,100,C),[V,_]=q(T?Number.parseInt(T):1024,100,N),F=(0,o.YQ)(()=>{let e=new URLSearchParams(j);e.set("width",I.toString()),e.set("height",V.toString()),p.push("".concat(f,"?").concat(e.toString()).concat(location.hash))},300),{toggled:U}=(0,z.S)();return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(g.Topbar,{emailTitle:c,children:[(0,r.jsx)(Y,{setViewHeight:e=>{_(e),(0,n.flushSync)(()=>{F()})},setViewWidth:e=>{D(e),(0,n.flushSync)(()=>{F()})},viewHeight:V,viewWidth:I}),(0,r.jsx)(O,{activeView:b,setActiveView:e=>{let t=new URLSearchParams(j);t.set("view",e),p.push("".concat(f,"?").concat(t.toString()).concat(location.hash))}}),w?(0,r.jsx)("div",{className:"flex justify-end",children:(0,r.jsx)(E,{markup:x.markup})}):null]}),(0,r.jsxs)("div",{...u,className:(0,h.cn)("h-[calc(100%-3.5rem-2.375rem)] will-change-[height] flex p-4 transition-[height] duration-300","preview"===b&&"bg-gray-200",U&&"h-[calc(100%-3.5rem-13rem)]",d),ref:e=>{let t=new ResizeObserver(e=>{let[t]=e;t&&(k(t.contentRect.width),S(t.contentRect.height))});return e&&t.observe(e),()=>{t.disconnect()}},children:[y?(0,r.jsx)(G,{error:m.error}):null,w?(0,r.jsxs)(r.Fragment,{children:["preview"===b&&(0,r.jsx)(P,{minHeight:100,minWidth:100,maxHeight:N,maxWidth:C,height:V,onResizeEnd:()=>{F()},onResize:(e,t)=>{"east"===t||"west"===t?D(Math.round(e)):_(Math.round(e))},width:I,children:(0,r.jsx)("iframe",{className:"solid max-h-full rounded-lg bg-white",ref:e=>{if(e)return H(e)},srcDoc:x.markup,style:{width:"".concat(I,"px"),height:"".concat(V,"px")},title:c})}),"source"===b&&(0,r.jsx)("div",{className:"h-full w-full",children:(0,r.jsx)("div",{className:"m-auto h-full flex max-w-3xl p-6",children:(0,r.jsx)(L.m.Provider,{children:(0,r.jsx)(R,{activeLang:v,markups:[{language:"jsx",content:x.reactMarkup},{language:"markup",content:x.markup},{language:"markdown",content:x.plainText}],setActiveLang:e=>{let t=new URLSearchParams(j);t.set("view","source"),t.set("lang",e);let a=j.get("lang")===e;p.push("".concat(f,"?").concat(t.toString()).concat(a?location.hash:""))}})})})})]}):null,(0,r.jsx)(i.l$,{})]})]})}},1140:(e,t,a)=>{"use strict";a.d(t,{o:()=>g,PreviewProvider:()=>j});var r=a(8593),s=a(4631),l=a(2421),n=a(1704),i=a(997);let o=(0,i.createServerReference)("7f3e9d8026bc5444f690c0434895e300deeb92c7c5",i.callServer,void 0,i.findSourceMapURL,"getEmailPathFromSlug"),c=(0,i.createServerReference)("7f9c8cb2b5174c6423f06d11071fb81e0034af1928",i.callServer,void 0,i.findSourceMapURL,"renderEmailByPath");var d=a(3158);let u=e=>{let t=e.split(".");return t.length>1?t.slice(0,-1).join("."):e},h=(e,t)=>{let a=e.replace(t.relativePath,"").split("/").filter(Boolean);if(1===a.length){let e=u(a[0]);return t.emailFilenames.includes(e)}let r=t.subDirectories.find(e=>e.directoryName===a[0]);return void 0!==r&&h(e,r)};var m=a(7353);let x=(e,t)=>{let[a,r]=(0,l.useState)(t),{emailsDirectoryMetadata:s}=(0,d.J)();return n.Hf||(0,m.a)(async t=>{for await(let a of t){let t=a.filename;if(!h(t,s))continue;let l=await o(t),n=await c(l,!0);l===e&&r(n)}}),a},p={},f=(e,t,a)=>((0,l.useEffect)(()=>{"markup"in t?p[e]=t:void 0!==a&&"markup"in a&&void 0===p[e]&&(p[e]=a)},[t,e,a]),"error"in t?p[e]:t),g=(0,l.createContext)(void 0),j=e=>{let{emailSlug:t,emailPath:a,serverRenderingResult:l,children:i}=e,o=(0,s.useRouter)(),c=x(a,l),d=f(a,c,l);return n.Hf||(0,m.a)(e=>{let a=e.find(e=>e.filename.includes(t));void 0!==a&&"unlink"===a.event&&o.push("/")}),(0,r.jsx)(g.Provider,{value:{emailPath:a,emailSlug:t,renderedEmailMetadata:d,renderingResult:c},children:i})}},6445:(e,t,a)=>{"use strict";a.d(t,{i:()=>n});var r=a(8593),s=a(2421),l=a(2180);let n=s.forwardRef((e,t)=>{let{...a}=e;return(0,r.jsx)(l.z,{ref:t,...a,children:(0,r.jsx)("path",{d:"M16.25 8.75L10.406 15.25L7.75 12.75",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5"})})});n.displayName="IconCheck"},7471:(e,t,a)=>{Promise.resolve().then(a.bind(a,626)),Promise.resolve().then(a.bind(a,7662)),Promise.resolve().then(a.bind(a,8353)),Promise.resolve().then(a.bind(a,1140))},8353:(e,t,a)=>{"use strict";a.d(t,{Toolbar:()=>X,S:()=>U});var r=a(8593),s=a(5327),l=a(526),n=a(4631),i=a(2421),o=a(1704),c=a(1140),d=a(7258),u=a(7799),h=a(6445),m=a(2180);let x=i.forwardRef((e,t)=>{let{...a}=e;return(0,r.jsx)(m.z,{ref:t,...a,children:(0,r.jsx)("path",{d:"M12 4C7.58173 4 4 7.58172 4 12C4 16.4182 7.58173 20 12 20C16.4183 20 20 16.4182 20 12C20 7.58172 16.4183 4 12 4ZM5.14754 12C5.14754 8.21549 8.21551 5.14754 12 5.14754C15.7845 5.14754 18.8525 8.21549 18.8525 12C18.8525 15.7844 15.7845 18.8525 12 18.8525C8.21551 18.8525 5.14754 15.7844 5.14754 12ZM12.906 8.37648C12.906 8.87682 12.5004 9.28243 12 9.28243C11.4997 9.28243 11.0941 8.87682 11.0941 8.37648C11.0941 7.87613 11.4997 7.47053 12 7.47053C12.5004 7.47053 12.906 7.87613 12.906 8.37648ZM10.1883 10.1884H10.7922H12.0002C12.3337 10.1884 12.6041 10.4588 12.6041 10.7924V15.0201H13.2081H13.8121V16.2281H13.2081H12.0002H10.7922H10.1883V15.0201H10.7922H11.3962V11.3963H10.7922H10.1883V10.1884Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})});x.displayName="IconInfo";let p=i.forwardRef((e,t)=>{let{...a}=e;return(0,r.jsx)(m.z,{ref:t,...a,children:(0,r.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M17.9354 12C17.9354 9.01537 15.5828 6.05264 11.9202 6.05264C8.96229 6.05264 7.50033 8.21724 6.87735 9.36841H8.72625C9.02024 9.36841 9.25858 9.60406 9.25858 9.89473C9.25858 10.1854 9.02024 10.421 8.72625 10.421H5.53232C5.23833 10.421 5 10.1854 5 9.89473V6.73684C5 6.44617 5.23833 6.21052 5.53232 6.21052C5.82631 6.21052 6.06465 6.44617 6.06465 6.73684V8.64548C6.81471 7.33819 8.54959 5 11.9202 5C16.2456 5 19 8.51094 19 12C19 15.4891 16.2456 19 11.9202 19C9.8507 19 8.12769 18.1904 6.9009 16.9562C6.24405 16.2954 5.73107 15.5148 5.38132 14.6744C5.26942 14.4057 5.39911 14.0981 5.67098 13.9875C5.94285 13.8768 6.25395 14.0051 6.36583 14.2738C6.66482 14.9921 7.10262 15.6574 7.66023 16.2183C8.69486 17.2593 10.1475 17.9474 11.9202 17.9474C15.5828 17.9474 17.9354 14.9846 17.9354 12Z",fill:"currentColor"})})});p.displayName="IconReload";var f=a(1530);let g={family:{gmail:"Gmail",outlook:"Outlook",yahoo:"Yahoo! Mail","apple-mail":"Apple Mail",aol:"AOL",thunderbird:"Mozilla Thunderbird",microsoft:"Microsoft","samsung-email":"Samsung Email",sfr:"SFR",orange:"Orange",protonmail:"ProtonMail",hey:"HEY","mail-ru":"Mail.ru",fastmail:"Fastmail",laposte:"LaPoste.net","t-online-de":"T-online.de","free-fr":"Free.fr",gmx:"GMX","web-de":"WEB.DE","ionos-1and1":"1&1",rainloop:"RainLoop","wp-pl":"WP.pl"}};var j=a(997);let b=(0,j.createServerReference)("7f2a2653029a00693d419ff50cd0f2e79e39201092",j.callServer,void 0,j.findSourceMapURL,"checkCompatibility");async function*v(e){let t=e.getReader();try{for(;;){let{value:e,done:a}=await t.read();if(a)break;yield e}}finally{t.releaseLock()}}let w=e=>(0,r.jsxs)("svg",{width:"13",height:"12",viewBox:"0 0 13 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[(0,r.jsx)("path",{d:"M10.8777 8.99999L6.87766 1.99999C6.79044 1.84609 6.66396 1.71808 6.51112 1.62902C6.35828 1.53997 6.18455 1.49304 6.00766 1.49304C5.83077 1.49304 5.65704 1.53997 5.5042 1.62902C5.35136 1.71808 5.22488 1.84609 5.13766 1.99999L1.13766 8.99999C1.0495 9.15267 1.00327 9.32594 1.00366 9.50224C1.00405 9.67855 1.05105 9.85161 1.13988 10.0039C1.22872 10.1562 1.35623 10.2823 1.50951 10.3694C1.66278 10.4565 1.83636 10.5016 2.01266 10.5H10.0127C10.1881 10.4998 10.3604 10.4535 10.5123 10.3656C10.6642 10.2778 10.7903 10.1515 10.8779 9.99955C10.9656 9.84756 11.0117 9.67518 11.0116 9.49973C11.0116 9.32428 10.9654 9.15193 10.8777 8.99999Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),(0,r.jsx)("path",{d:"M6.0127 4.5V6.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),(0,r.jsx)("path",{d:"M6.0127 8.5H6.01853",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})]});w.displayName="IconCircleWarning";var y=a(3397),C=a.n(y);let k=e=>{let{line:t,type:a}=e,s=new URLSearchParams((0,n.useSearchParams)());s.set("view","source"),"html"===a?s.set("lang","markup"):"react"===a&&s.set("lang","jsx");let l="#L".concat(t);return(0,r.jsxs)(C(),{href:{search:s.toString(),hash:l},scroll:!1,className:"appearance-none underline mx-2",children:["L",t.toString().padStart(2,"0")]})},N=e=>{let{children:t,className:a,...s}=e;return(0,r.jsx)("table",{...s,className:(0,d.cn)("group relative w-full border-collapse text-left text-slate-10 text-sm",a),children:(0,r.jsx)("tbody",{children:t})})};N.Row=e=>{let{children:t,className:a,...s}=e;return(0,r.jsx)("tr",{className:(0,d.cn)("border-collapse align-bottom border-slate-6 border-b last:border-b-0",a),...s,children:t})},N.Column=e=>{let{children:t,className:a,...s}=e;return(0,r.jsx)("td",{className:(0,d.cn)("py-1.5 align-bottom font-regular",a),...s,children:t})};let S=e=>{let{reactMarkup:t,emailPath:a,initialResults:r}=e,[s,l]=(0,i.useState)(r),[n,o]=(0,i.useState)(!1),c=(0,i.useRef)(!1);return[s,{loading:n,load:async()=>{if(c.current)return;c.current=!0,o(!0),l([]);let e=[];try{let r=await b(t,a);for await(let t of v(r))"error"===t.status&&l(a=>a?e=[...a,t]:[t])}catch(e){console.error(e),f.oR.error(JSON.stringify(e))}finally{o(!1),c.current=!1}return e}}]},L=e=>{let{results:t}=e;return(0,r.jsx)(N,{children:null==t?void 0:t.map((e,t)=>{let a=Object.entries(e.statsPerEmailClient).filter(e=>{let[,t]=e;return"error"===t.status}),s=a.map(e=>{let[t]=e;return g.family[t]}).join(", ");return(0,r.jsxs)(N.Row,{children:[(0,r.jsx)(N.Column,{children:(0,r.jsxs)("span",{className:"flex text-red-400 uppercase gap-2 items-center",children:[(0,r.jsx)(w,{}),(0,d.aj)(e.entry.title)]})}),(0,r.jsxs)(N.Column,{children:[a.length>0?"Not supported in ".concat(s):null,(0,r.jsx)("a",{href:e.entry.url,className:"underline ml-2 decoration-slate-9 decoration-1 hover:decoration-slate-11 transition-colors hover:text-slate-12",rel:"noreferrer",target:"_blank",children:"More ↗"})]}),(0,r.jsx)(N.Column,{className:"font-mono text-slate-11 text-right",children:(0,r.jsx)(k,{line:e.location.start.line,column:e.location.start.column,type:"react"})})]},t)})})};var R=a(375);let M=(0,j.createServerReference)("7f9bdc93ecc7e7f69dad48ca6a708b785b7d9a3a16",j.callServer,void 0,j.findSourceMapURL,"checkImages"),T=(0,j.createServerReference)("7f02656599dc4a9b24cf1b0e83c8d06d57938c4df1",j.callServer,void 0,j.findSourceMapURL,"checkLinks");async function*H(e){for await(let t of e)for await(let e of v(await t.getStream())){let a=t.mapValue(e);a&&(yield a)}}let P=e=>{let{markup:t,initialRows:r}=e,[s,l]=(0,i.useState)(r),n=function(e,t){return[{getStream:()=>M(e,t),mapValue(e){if(e&&"success"!==e.status)return{result:e,source:"image"}}},{getStream:()=>T(e),mapValue(e){if(e&&"success"!==e.status)return{result:e,source:"link"}}}]}(t,"location"in a.g?"".concat(a.g.location.protocol,"//").concat(a.g.location.host):""),[o,c]=(0,i.useState)(!1),d=(0,i.useRef)(!1);return[s,{loading:o,load:async()=>{if(!d.current){d.current=!0,c(!0),l([]);try{let e=[];for await(let t of H(n))l(a=>{if(!a)return[t];let r=[...a,t];return r.sort((e,t)=>"error"===e.result.status&&"warning"===t.result.status?-1:+("warning"===e.result.status&&"error"===t.result.status)),e=r,r});return e}finally{c(!1),d.current=!1}}}}]},I=e=>{let{rows:t}=e;return void 0===t?null:(0,r.jsx)(N,{children:t.map((e,t)=>{if("link"===e.source){let a=e.result.checks.find(e=>!1===e.passed),s=[];for(let t of e.result.checks)"fetch_attempt"===t.type&&t.metadata.fetchStatusCode&&s.push((0,r.jsxs)(r.Fragment,{children:["HTTP ",t.metadata.fetchStatusCode]}));return s.push((0,r.jsx)(k,{line:e.result.codeLocation.line,column:e.result.codeLocation.column,type:"html"})),(0,r.jsxs)(E,{status:e.result.status,children:[(0,r.jsx)(E.Name,{children:(0,d.aj)(a.type)}),(0,r.jsxs)(E.Description,{children:["security"===a.type?"Insecure URL, use HTTPS instead of HTTP":null,"fetch_attempt"===a.type&&a.metadata.fetchStatusCode&&a.metadata.fetchStatusCode>=300&&a.metadata.fetchStatusCode<400?"There was a redirect, the content may have been moved":null,"fetch_attempt"===a.type&&a.metadata.fetchStatusCode&&a.metadata.fetchStatusCode>=400?"The link is broken":null,"fetch_attempt"===a.type&&void 0===a.metadata.fetchStatusCode?"The link could not be reached":null,"syntax"===a.type?"The link is broken due to invalid syntax":null,(0,r.jsx)("span",{className:"ml-2 text-ellipsis overflow-hidden text-nowrap max-w-[30ch]",children:e.result.link})]}),(0,r.jsx)(E.Metadata,{children:s})]},t)}if("image"===e.source){let a=e.result.checks.find(e=>!1===e.passed),s=[];for(let t of e.result.checks)"image_size"===t.type&&t.metadata.byteCount&&s.push((0,R.A)(t.metadata.byteCount)),"fetch_attempt"===t.type&&t.metadata.fetchStatusCode&&s.push((0,r.jsxs)(r.Fragment,{children:["HTTP ",t.metadata.fetchStatusCode]}));return s.push((0,r.jsx)(k,{line:e.result.codeLocation.line,column:e.result.codeLocation.column,type:"html"})),(0,r.jsxs)(E,{status:e.result.status,children:[(0,r.jsx)(E.Name,{children:(0,d.aj)(a.type)}),(0,r.jsxs)(E.Description,{children:["security"===a.type?"Insecure URL, use HTTPS instead of HTTP":null,"fetch_attempt"===a.type&&a.metadata.fetchStatusCode&&a.metadata.fetchStatusCode>=300&&a.metadata.fetchStatusCode<400?"There was a redirect, the image may have been moved":null,"fetch_attempt"===a.type&&a.metadata.fetchStatusCode&&a.metadata.fetchStatusCode>=400?"The image is broken":null,"fetch_attempt"===a.type&&void 0===a.metadata.fetchStatusCode?"The image could not be reached":null,"syntax"===a.type?"The image is broken due to an invalid source":null,"accessibility"===a.type?"Missing alt text":null,"image_size"===a.type&&a.metadata.byteCount?"This image is too large, keep it under 1mb":null,(0,r.jsx)("span",{className:"ml-2 text-ellipsis overflow-hidden text-nowrap max-w-[30ch]",children:e.result.source})]}),(0,r.jsx)(E.Metadata,{children:s})]},t)}})})},E=e=>{let{children:t,className:a,status:s,...l}=e;return(0,r.jsx)(N.Row,{"data-status":s,...l,className:(0,d.cn)("group/result",a),children:t})};E.Name=e=>{let{children:t,...a}=e;return(0,r.jsx)(N.Column,{...a,children:(0,r.jsxs)("span",{className:"flex uppercase gap-2 items-center group-data-[status=error]/result:text-red-400 group-data-[status=warning]/result:text-orange-300",children:[(0,r.jsx)(w,{}),"string"==typeof t?(0,d.aj)(t):t]})})},E.Description=e=>{let{children:t,className:a,...s}=e;return(0,r.jsx)(N.Column,{...s,children:t})},E.Metadata=e=>{let{children:t,className:a,...s}=e;return(0,r.jsx)(N.Column,{align:"right",...s,className:(0,d.cn)("font-mono text-slate-11",a),children:i.Children.map(t,(e,t)=>(0,r.jsxs)(r.Fragment,{children:[t>0?" \xb7 ":null,e]}))})};let z=e=>{let{markup:t,plainText:a,initialResult:r}=e,[s,l]=(0,i.useState)(r),[n,o]=(0,i.useState)(!1),c=(0,i.useRef)(!1);return[s,{loading:n,load:async()=>{if(!c.current){c.current=!0,o(!0);try{let e=await fetch("https://react.email/api/check-spam",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({html:t,plainText:a})}),r=await e.json();if(!("error"in r))return l(r),r;f.oR.error(r.error)}catch(e){console.error(e),f.oR.error(JSON.stringify(e))}finally{o(!1),c.current=!1}}}}]},D=e=>{let{result:t}=e;return(0,r.jsx)(r.Fragment,{children:t?(0,r.jsxs)(N,{children:[(0,r.jsxs)(N.Row,{className:"sticky border-b top-0",children:[(0,r.jsx)(N.Column,{className:"uppercase",children:(0,r.jsxs)("span",{className:"flex gap-2 items-center",children:[(0,r.jsx)(w,{className:(0,d.cn)(0===t.points?"text-green-400":null,(t.points>0&&t.points,null),t.points>1.5?"text-yellow-100":null,t.points>3?"text-orange-400":null,t.points>=5?"text-red-400":null)}),"Score"]})}),(0,r.jsx)(N.Column,{children:0===t.points?"Congratulations! Your email is clean of abuse indicators.":"Higher scores are better"}),(0,r.jsxs)(N.Column,{className:"text-right tracking-tighter font-bold",children:[(0,r.jsx)("span",{className:(0,d.cn)("text-3xl",0===t.points?"text-green-400":null,(t.points>0&&t.points,null),t.points>1.5?"text-yellow-200":null,t.points>3?"text-orange-400":null,t.points>=5?"text-red-400":null),children:(10-t.points).toFixed(1)})," ",(0,r.jsx)("span",{className:"text-lg",children:"/ 10"})]})]}),(function(e,t){let a=[...e];return a.sort(t),a})(t.checks,(e,t)=>t.points-e.points).map(e=>(0,r.jsxs)(N.Row,{children:[(0,r.jsx)(N.Column,{className:"uppercase",children:(0,r.jsxs)("span",{className:"flex gap-2 items-center",children:[(0,r.jsx)(w,{className:(0,d.cn)(e.points>1?"text-yellow-200":null,e.points>2?"text-orange-400":null,e.points>3?"text-red-400":null)}),(0,d.aj)(e.name)]})}),(0,r.jsx)(N.Column,{children:e.description}),(0,r.jsxs)(N.Column,{className:(0,d.cn)("text-right font-mono tracking-tighter",e.points>1?"text-yellow-200":null,e.points>2?"text-orange-400":null,e.points>3?"text-red-400":null),children:["-",e.points.toFixed(1)]})]},e.name))]}):null})};var V=a(9711),_=a(34);let O=e=>{let{children:t,className:a,active:s,tooltip:l,delayDuration:n=500,...i}=e;return(0,r.jsx)(_.m.Provider,{children:(0,r.jsxs)(_.m,{delayDuration:n,children:[(0,r.jsx)(_.m.Trigger,{asChild:!0,children:(0,r.jsxs)("button",{type:"button",...i,className:(0,d.cn)("h-full w-fit font-regular flex text-sm text-slate-10 items-center align-middle justify-center px-1 gap-2 relative","hover:text-slate-12 transition-colors",s&&"data-[state=active]:text-cyan-11",a),children:[t,s?(0,r.jsx)(V.P.span,{className:"-bottom-px absolute rounded-sm left-0 w-full bg-cyan-11 h-px",layoutId:"active-toolbar-button",transition:{type:"spring",bounce:.2,duration:.6}}):null]})}),l?(0,r.jsx)(_.m.Content,{children:l}):null]})})},F=e=>{let t;if("localStorage"in a.g){let r=a.g.localStorage.getItem(e);if(null!==r&&"undefined"!==r)try{t=JSON.parse(r)}catch(t){console.warn("Failed to load stored value for",e,"with value",r)}}return[(0,i.useSyncExternalStore)(()=>()=>{},()=>t,()=>void 0),function(t){"localStorage"in a.g&&a.g.localStorage.setItem(e,JSON.stringify(t))}]},U=()=>{var e;let t=null!=(e=(0,n.useSearchParams)().get("toolbar-panel"))?e:void 0;return{activeTab:t,toggled:void 0!==t}},B=e=>{let{serverLintingRows:t,serverSpamCheckingResult:a,serverCompatibilityResults:c,markup:h,reactMarkup:m,plainText:f,emailPath:g,emailSlug:j}=e,b=(0,n.usePathname)(),v=(0,n.useSearchParams)(),w=(0,n.useRouter)(),{activeTab:y,toggled:C}=U(),k=e=>{let t=new URLSearchParams(v);void 0===e?t.delete("toolbar-panel"):t.set("toolbar-panel",e),w.push("".concat(b,"?").concat(t.toString()).concat(location.hash))},[N,R]=F("spam-assassin-".concat(j.replaceAll("/","-"))),[M,{load:T,loading:H}]=z({markup:h,plainText:f,initialResult:null!=a?a:N}),[E,V]=F("linter-".concat(j.replaceAll("/","-"))),[_,{load:B,loading:X}]=P({markup:h,initialRows:null!=t?t:E}),[q,G]=F("compatibility-".concat(j.replaceAll("/","-"))),[Q,{load:$,loading:K}]=S({emailPath:g,reactMarkup:m,initialResults:null!=c?c:q});return o.Hf||(0,i.useEffect)(()=>{(async()=>{V(await B()),R(await T()),G(await $())})()},[]),(0,r.jsx)("div",{"data-toggled":C,className:(0,d.cn)("absolute bottom-0 left-0 right-0","border-t border-slate-6 group/toolbar text-xs text-slate-11 h-52 transition-transform","data-[toggled=false]:translate-y-[10.625rem]"),children:(0,r.jsx)(s.bL,{value:null!=y?y:"",onValueChange:e=>{k(e)},asChild:!0,children:(0,r.jsxs)("div",{className:"flex flex-col h-full",children:[(0,r.jsxs)(s.B8,{className:"flex gap-4 px-4 border-b border-solid border-slate-6 h-10 w-full flex-shrink-0",children:[(0,r.jsxs)(l.o,{id:"toolbar",children:[(0,r.jsx)(s.l9,{asChild:!0,value:"linter",children:(0,r.jsx)(O,{active:"linter"===y,children:"Linter"})}),(0,r.jsx)(s.l9,{asChild:!0,value:"compatibility",children:(0,r.jsx)(O,{active:"compatibility"===y,children:"Compatibility"})}),(0,r.jsx)(s.l9,{asChild:!0,value:"spam-assassin",children:(0,r.jsx)(O,{active:"spam-assassin"===y,children:"Spam"})})]}),(0,r.jsxs)("div",{className:"flex gap-0.5 ml-auto",children:[(0,r.jsx)(O,{delayDuration:0,tooltip:"linter"===y&&"The Linter tab checks all the images and links for common issues like missing alt text, broken URLs, insecure HTTP methods, and more."||"spam-assassin"===y&&"The Spam tab will look at the content and use a robust scoring framework to determine if the email is likely to be spam. Powered by SpamAssassin."||"compatibility"===y&&"The Compatibility tab shows how well the HTML/CSS is supported across mail clients like Outlook, Gmail, etc. Powered by Can I Email."||"Info",children:(0,r.jsx)(x,{size:24})}),o.Hf?null:(0,r.jsx)(O,{tooltip:"Reload",disabled:X||H,onClick:async()=>{void 0===y&&k("linter"),"spam-assassin"===y?await T():"linter"===y?await B():"compatibility"===y&&await $()},children:(0,r.jsx)(p,{size:24,className:(0,d.cn)({"animate-spin opacity-60 animate-spin-fast":X||H})})}),(0,r.jsx)(O,{tooltip:"Toggle toolbar",onClick:()=>{void 0===y?k("linter"):k(void 0)},children:(0,r.jsx)(u.R,{size:24,className:"transition-transform group-data-[toggled=false]/toolbar:rotate-180"})})]})]}),(0,r.jsxs)("div",{className:"flex-grow transition-opacity opacity-100 group-data-[toggled=false]/toolbar:opacity-0 overflow-y-auto pr-3 pl-4 pt-3",children:[(0,r.jsx)(s.UC,{value:"linter",children:X?(0,r.jsx)(W,{message:"Analyzing your code for linting issues..."}):(null==_?void 0:_.length)===0?(0,r.jsxs)(A,{children:[(0,r.jsx)(Z,{}),(0,r.jsx)(Y,{children:"All good"}),(0,r.jsx)(J,{children:"No linting issues found."})]}):(0,r.jsx)(I,{rows:null!=_?_:[]})}),(0,r.jsx)(s.UC,{value:"compatibility",children:K?(0,r.jsx)(W,{message:"Checking email compatibility..."}):(null==Q?void 0:Q.length)===0?(0,r.jsxs)(A,{children:[(0,r.jsx)(Z,{}),(0,r.jsx)(Y,{children:"Great compatibility"}),(0,r.jsx)(J,{children:"Template should render properly everywhere."})]}):(0,r.jsx)(L,{results:null!=Q?Q:[]})}),(0,r.jsx)(s.UC,{value:"spam-assassin",children:H?(0,r.jsx)(W,{message:"Evaluating your email for spam indicators..."}):(null==M?void 0:M.isSpam)===!1?(0,r.jsxs)(A,{children:[(0,r.jsx)(Z,{}),(0,r.jsx)(Y,{children:"10/10"}),(0,r.jsx)(J,{children:"Your email is clean of abuse indicators."})]}):(0,r.jsx)(D,{result:M})})]})]})})})},W=e=>{let{message:t}=e;return(0,r.jsxs)("div",{className:"flex flex-col items-center justify-center pt-8",children:[(0,r.jsxs)("div",{className:"relative mb-8 flex items-center justify-center",children:[(0,r.jsx)("div",{className:"h-12 w-12 rounded-full bg-gradient-to-br from-cyan-400/80 to-cyan-600/80 opacity-10 blur-xl absolute m-auto left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 animate-pulse"}),(0,r.jsx)("div",{className:"h-12 w-12 rounded-full border border-slate-4 absolute m-auto left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2"}),(0,r.jsx)("div",{className:"h-10 w-10 rounded-full flex items-center justify-center absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2",children:(0,r.jsx)("div",{className:"h-5 w-5 rounded-full border-2 border-white/50 border-t-transparent animate-spin-fast"})})]}),(0,r.jsx)("h3",{className:"text-slate-12 font-medium text-base mb-1",children:"Processing"}),(0,r.jsx)("p",{className:"text-slate-11 text-sm text-center max-w-[320px]",children:t})]})},A=e=>{let{children:t}=e;return(0,r.jsx)("div",{className:"flex flex-col items-center justify-center pt-8",children:t})},Z=()=>(0,r.jsxs)("div",{className:"relative mb-8 flex items-center justify-center",children:[(0,r.jsx)("div",{className:"h-16 w-16 rounded-full bg-gradient-to-br from-green-300/20 opacity-80 to-emerald-500/30 blur-md absolute m-auto left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2"}),(0,r.jsx)("div",{className:"h-12 w-12 rounded-full bg-gradient-to-br from-green-400/80 opacity-10 to-emerald-600/80 absolute m-auto left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 shadow-lg"}),(0,r.jsx)("div",{className:"h-10 w-10 rounded-full bg-gradient-to-br from-green-400 to-emerald-600 flex items-center justify-center absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 shadow-[inset_0_1px_1px_rgba(255,255,255,0.4)]",children:(0,r.jsx)(h.i,{size:24,className:"text-white drop-shadow-sm"})})]}),Y=e=>{let{children:t}=e;return(0,r.jsx)("h3",{className:"text-slate-12 font-medium text-base mb-1",children:t})},J=e=>{let{children:t}=e;return(0,r.jsx)("p",{className:"text-slate-11 text-sm text-center max-w-[320px]",children:t})},X=e=>{let{serverLintingRows:t,serverSpamCheckingResult:a,serverCompatibilityResults:s}=e,{emailPath:l,emailSlug:n,renderedEmailMetadata:o}=(0,i.use)(c.o);if(void 0===o)return null;let{markup:d,plainText:u,reactMarkup:h}=o;return(0,r.jsx)(B,{emailPath:l,emailSlug:n,markup:d,reactMarkup:h,plainText:u,serverLintingRows:t,serverSpamCheckingResult:a,serverCompatibilityResults:s})}}},e=>{var t=t=>e(e.s=t);e.O(0,[979,336,713,188,651,941,834,358],()=>t(7471)),_N_E=e.O()}]);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[979],{1444:(t,e,n)=>{n.d(e,{GL:()=>q});var i=n(216),r=n(3604),a=Object.defineProperty,o=Object.defineProperties,s=Object.getOwnPropertyDescriptors,l=Object.getOwnPropertySymbols,h=Object.prototype.hasOwnProperty,d=Object.prototype.propertyIsEnumerable,u=(t,e,n)=>e in t?a(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,c=(t,e)=>{for(var n in e||(e={}))h.call(e,n)&&u(t,n,e[n]);if(l)for(var n of l(e))d.call(e,n)&&u(t,n,e[n]);return t},f=(t,e)=>o(t,s(e)),v=(t,e)=>{var n={};for(var i in t)h.call(t,i)&&0>e.indexOf(i)&&(n[i]=t[i]);if(null!=t&&l)for(var i of l(t))0>e.indexOf(i)&&d.call(t,i)&&(n[i]=t[i]);return n},_=(t,e,n)=>u(t,"symbol"!=typeof e?e+"":e,n),m=(t,e,n)=>new Promise((i,r)=>{var a=t=>{try{s(n.next(t))}catch(t){r(t)}},o=t=>{try{s(n.throw(t))}catch(t){r(t)}},s=t=>t.done?i(t.value):Promise.resolve(t.value).then(a,o);s((n=n.apply(t,e)).next())}),p=class{requestAnimationFrame(t){return requestAnimationFrame(t)}cancelAnimationFrame(t){cancelAnimationFrame(t)}},g=class{constructor(){_(this,"_lastHandleId",0),_(this,"_lastImmediate",null)}requestAnimationFrame(t){return this._lastHandleId>=Number.MAX_SAFE_INTEGER&&(this._lastHandleId=0),this._lastHandleId+=1,this._lastImmediate=setImmediate(()=>{t(Date.now())}),this._lastHandleId}cancelAnimationFrame(t){this._lastImmediate&&clearImmediate(this._lastImmediate)}},y=class{constructor(){_(this,"_strategy"),this._strategy="function"==typeof requestAnimationFrame?new p:new g}requestAnimationFrame(t){return this._strategy.requestAnimationFrame(t)}cancelAnimationFrame(t){this._strategy.cancelAnimationFrame(t)}},w="u">typeof window&&"u">typeof window.document,L=new Uint8Array([80,75,3,4]),C=["v","ip","op","layers","fr","w","h"],M="0.42.0",b="@lottiefiles/dotlottie-web",I=(()=>{var t,e="u">typeof document?null==(t=document.currentScript)?void 0:t.src:void 0;return function(t={}){var n,i,r,a,o,s,l,h=new Promise((t,e)=>{o=t,s=e}),d=Object.assign({},t),u="./this.program",c="";"u">typeof document&&document.currentScript&&(c=document.currentScript.src),e&&(c=e),c=c.startsWith("blob:")?"":c.substr(0,c.replace(/[?#].*/,"").lastIndexOf("/")+1),l=t=>fetch(t,{credentials:"same-origin"}).then(t=>t.ok?t.arrayBuffer():Promise.reject(Error(t.status+" : "+t.url)));var f=t.print||console.log.bind(console),v=t.printErr||console.error.bind(console);Object.assign(t,d),d=null,t.thisProgram&&(u=t.thisProgram);var m,p,g,y,w,L,C,M,b,I,E=t.wasmBinary,S=!1;function F(){var e=m.buffer;t.HEAP8=g=new Int8Array(e),t.HEAP16=w=new Int16Array(e),t.HEAPU8=y=new Uint8Array(e),t.HEAPU16=L=new Uint16Array(e),t.HEAP32=C=new Int32Array(e),t.HEAPU32=M=new Uint32Array(e),t.HEAPF32=b=new Float32Array(e),t.HEAPF64=I=new Float64Array(e)}var P=[],D=[],k=[],A=0,T=null;function O(e){var n;throw null==(n=t.onAbort)||n.call(t,e),v(e="Aborted("+e+")"),S=!0,e=new WebAssembly.RuntimeError(e+". Build with -sASSERTIONS for more info."),s(e),e}var x,R=t=>t.startsWith("data:application/octet-stream;base64,");function $(t){if(t==x&&E)return new Uint8Array(E);throw"both async and sync fetching of the wasm failed"}function W(t,e,n){return(E?Promise.resolve().then(()=>$(t)):l(t).then(t=>new Uint8Array(t),()=>$(t))).then(t=>WebAssembly.instantiate(t,e)).then(n,t=>{v(`failed to asynchronously prepare wasm: ${t}`),O(t)})}class j{constructor(t){_(this,"name","ExitStatus"),this.message=`Program terminated with exit(${t})`,this.status=t}}var z=e=>{for(;0<e.length;)e.shift()(t)},U=t.noExitRuntime||!0,H="u">typeof TextDecoder?new TextDecoder:void 0,B=(t,e=0,n=NaN)=>{var i=e+n;for(n=e;t[n]&&!(n>=i);)++n;if(16<n-e&&t.buffer&&H)return H.decode(t.subarray(e,n));for(i="";e<n;){var r=t[e++];if(128&r){var a=63&t[e++];if((224&r)==192)i+=String.fromCharCode((31&r)<<6|a);else{var o=63&t[e++];65536>(r=(240&r)==224?(15&r)<<12|a<<6|o:(7&r)<<18|a<<12|o<<6|63&t[e++])?i+=String.fromCharCode(r):(r-=65536,i+=String.fromCharCode(55296|r>>10,56320|1023&r))}}else i+=String.fromCharCode(r)}return i},N=0;class V{constructor(t){this.Ea=t-24}}var G=()=>{var t=N;if(!t)return em(0),0;var e=new V(t);M[e.Ea+16>>2]=t;var n=M[e.Ea+4>>2];if(!n)return em(0),t;for(var i of[]){if(0===i||i===n)break;if(ey(i,n,e.Ea+16))return em(i),t}return em(n),t},J=(t,e,n)=>{var i=y;if(0<n){n=e+n-1;for(var r=0;r<t.length;++r){var a=t.charCodeAt(r);if(55296<=a&&57343>=a&&(a=65536+((1023&a)<<10)|1023&t.charCodeAt(++r)),127>=a){if(e>=n)break;i[e++]=a}else{if(2047>=a){if(e+1>=n)break;i[e++]=192|a>>6}else{if(65535>=a){if(e+2>=n)break;i[e++]=224|a>>12}else{if(e+3>=n)break;i[e++]=240|a>>18,i[e++]=128|a>>12&63}i[e++]=128|a>>6&63}i[e++]=128|63&a}}i[e]=0}},q={},K=t=>{for(;t.length;){var e=t.pop();t.pop()(e)}};function X(t){return this.fromWireType(M[t>>2])}var Q,Y,Z,tt={},te={},tn={},ti=(t,e,n)=>{function i(e){if((e=n(e)).length!==t.length)throw new Q("Mismatched type converter count");for(var i=0;i<t.length;++i)ta(t[i],e[i])}t.forEach(t=>tn[t]=e);var r=Array(e.length),a=[],o=0;e.forEach((t,e)=>{te.hasOwnProperty(t)?r[e]=te[t]:(a.push(t),tt.hasOwnProperty(t)||(tt[t]=[]),tt[t].push(()=>{r[e]=te[t],++o===a.length&&i(r)}))}),0===a.length&&i(r)},tr=t=>{for(var e="";y[t];)e+=Y[y[t++]];return e};function ta(t,e,n={}){return function(t,e,n={}){var i=e.name;if(!t)throw new Z(`type "${i}" must have a positive integer typeid pointer`);if(te.hasOwnProperty(t)){if(n.kb)return;throw new Z(`Cannot register type '${i}' twice`)}te[t]=e,delete tn[t],tt.hasOwnProperty(t)&&(e=tt[t],delete tt[t],e.forEach(t=>t()))}(t,e,n)}var to=t=>{throw new Z(t.Da.Ga.Fa.name+" instance already deleted")},ts=!1,tl=()=>{},th=(t,e,n)=>e===n?t:void 0===n.Ja||null===(t=th(t,e,n.Ja))?null:n.cb(t),td={},tu={},tc=(t,e)=>{if(void 0===e)throw new Z("ptr should not be undefined");for(;t.Ja;)e=t.Ta(e),t=t.Ja;return tu[e]},tf=(t,e)=>{if(!e.Ga||!e.Ea)throw new Q("makeClassHandle requires ptr and ptrType");if(!!e.Ka!=!!e.Ia)throw new Q("Both smartPtrType and smartPtr must be specified");return e.count={value:1},tv(Object.create(t,{Da:{value:e,writable:!0}}))},tv=t=>typeof FinalizationRegistry>"u"?(tv=t=>t,t):(ts=new FinalizationRegistry(t=>{t=t.Da,--t.count.value,0===t.count.value&&(t.Ia?t.Ka.Na(t.Ia):t.Ga.Fa.Na(t.Ea))}),tv=t=>{var e=t.Da;return e.Ia&&ts.register(t,{Da:e},t),t},tl=t=>{ts.unregister(t)},tv(t));function t_(){}var tm=(t,e)=>Object.defineProperty(e,"name",{value:t}),tp=(t,e,n)=>{if(void 0===t[e].Ha){var i=t[e];t[e]=function(...i){if(!t[e].Ha.hasOwnProperty(i.length))throw new Z(`Function '${n}' called with an invalid number of arguments (${i.length}) - expects one of (${t[e].Ha})!`);return t[e].Ha[i.length].apply(this,i)},t[e].Ha=[],t[e].Ha[i.Qa]=i}},tg=(e,n,i)=>{if(t.hasOwnProperty(e)){if(void 0===i||void 0!==t[e].Ha&&void 0!==t[e].Ha[i])throw new Z(`Cannot register public name '${e}' twice`);if(tp(t,e,e),t[e].Ha.hasOwnProperty(i))throw new Z(`Cannot register multiple overloads of a function with the same number of arguments (${i})!`);t[e].Ha[i]=n}else t[e]=n,t[e].Qa=i},ty=t=>{var e=(t=t.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return 48<=e&&57>=e?`_${t}`:t};function tw(t,e,n,i,r,a,o,s){this.name=t,this.constructor=e,this.Pa=n,this.Na=i,this.Ja=r,this.fb=a,this.Ta=o,this.cb=s,this.mb=[]}var tL=(t,e,n)=>{for(;e!==n;){if(!e.Ta)throw new Z(`Expected null or instance of ${n.name}, got an instance of ${e.name}`);t=e.Ta(t),e=e.Ja}return t};function tC(t,e){if(null===e){if(this.Wa)throw new Z(`null is not a valid ${this.name}`);return 0}if(!e.Da)throw new Z(`Cannot pass "${tG(e)}" as a ${this.name}`);if(!e.Da.Ea)throw new Z(`Cannot pass deleted object as a pointer of type ${this.name}`);return tL(e.Da.Ea,e.Da.Ga.Fa,this.Fa)}function tM(t,e){if(null===e){if(this.Wa)throw new Z(`null is not a valid ${this.name}`);if(this.Va){var n=this.Xa();return null!==t&&t.push(this.Na,n),n}return 0}if(!e||!e.Da)throw new Z(`Cannot pass "${tG(e)}" as a ${this.name}`);if(!e.Da.Ea)throw new Z(`Cannot pass deleted object as a pointer of type ${this.name}`);if(!this.Ua&&e.Da.Ga.Ua)throw new Z(`Cannot convert argument of type ${e.Da.Ka?e.Da.Ka.name:e.Da.Ga.name} to parameter type ${this.name}`);if(n=tL(e.Da.Ea,e.Da.Ga.Fa,this.Fa),this.Va){if(void 0===e.Da.Ia)throw new Z("Passing raw pointer to smart pointer is illegal");switch(this.rb){case 0:if(e.Da.Ka===this)n=e.Da.Ia;else throw new Z(`Cannot convert argument of type ${e.Da.Ka?e.Da.Ka.name:e.Da.Ga.name} to parameter type ${this.name}`);break;case 1:n=e.Da.Ia;break;case 2:if(e.Da.Ka===this)n=e.Da.Ia;else{var i=e.clone();n=this.nb(n,tH(()=>i.delete())),null!==t&&t.push(this.Na,n)}break;default:throw new Z("Unsupporting sharing policy")}}return n}function tb(t,e){if(null===e){if(this.Wa)throw new Z(`null is not a valid ${this.name}`);return 0}if(!e.Da)throw new Z(`Cannot pass "${tG(e)}" as a ${this.name}`);if(!e.Da.Ea)throw new Z(`Cannot pass deleted object as a pointer of type ${this.name}`);if(e.Da.Ga.Ua)throw new Z(`Cannot convert argument of type ${e.Da.Ga.name} to parameter type ${this.name}`);return tL(e.Da.Ea,e.Da.Ga.Fa,this.Fa)}function tI(t,e,n,i,r,a,o,s,l,h,d){this.name=t,this.Fa=e,this.Wa=n,this.Ua=i,this.Va=r,this.lb=a,this.rb=o,this.ab=s,this.Xa=l,this.nb=h,this.Na=d,r||void 0!==e.Ja?this.toWireType=tM:(this.toWireType=i?tC:tb,this.Ma=null)}var tE,tS,tF=(e,n,i)=>{if(!t.hasOwnProperty(e))throw new Q("Replacing nonexistent public symbol");void 0!==t[e].Ha&&void 0!==i?t[e].Ha[i]=n:(t[e]=n,t[e].Qa=i)},tP=(e,n,i=[])=>n=e.includes("j")?(0,t["dynCall_"+(e=e.replace(/p/g,"i"))])(n,...i):tE.get(n)(...i),tD=(t,e)=>(...n)=>tP(t,e,n),tk=(t,e)=>{var n=(t=tr(t)).includes("j")?tD(t,e):tE.get(e);if("function"!=typeof n)throw new Z(`unknown function pointer with signature ${t}: ${e}`);return n},tA=t=>{var e=tr(t=ec(t));return ef(t),e},tT=(t,e)=>{var n=[],i={};throw e.forEach(function t(e){i[e]||te[e]||(tn[e]?tn[e].forEach(t):(n.push(e),i[e]=!0))}),new tS(`${t}: `+n.map(tA).join([", "]))},tO=(t,e)=>{for(var n=[],i=0;i<t;i++)n.push(M[e+4*i>>2]);return n};function tx(t,e,n,i,r){var a=e.length;if(2>a)throw new Z("argTypes array size mismatch! Must at least get return value and 'this' types!");var o=null!==e[1]&&null!==n,s=function(t){for(var e=1;e<t.length;++e)if(null!==t[e]&&void 0===t[e].Ma)return!0;return!1}(e),l="void"!==e[0].name,h=a-2,d=Array(h),u=[],c=[];return tm(t,function(...t){if(c.length=0,u.length=o?2:1,u[0]=r,o){var n=e[1].toWireType(c,this);u[1]=n}for(var a=0;a<h;++a)d[a]=e[a+2].toWireType(c,t[a]),u.push(d[a]);if(t=i(...u),s)K(c);else for(a=o?1:2;a<e.length;a++){var f=1===a?n:d[a-2];null!==e[a].Ma&&e[a].Ma(f)}return l?e[0].fromWireType(t):void 0})}var tR,t$=t=>{let e=(t=t.trim()).indexOf("(");return -1!==e?t.substr(0,e):t},tW=[],tj=[],tz=t=>{9<t&&0==--tj[t+1]&&(tj[t]=void 0,tW.push(t))},tU=t=>{if(!t)throw new Z("Cannot use deleted val. handle = "+t);return tj[t]},tH=t=>{switch(t){case void 0:return 2;case null:return 4;case!0:return 6;case!1:return 8;default:let e=tW.pop()||tj.length;return tj[e]=t,tj[e+1]=1,e}},tB={name:"emscripten::val",fromWireType:t=>{var e=tU(t);return tz(t),e},toWireType:(t,e)=>tH(e),La:8,readValueFromPointer:X,Ma:null},tN=(t,e,n)=>{switch(e){case 1:return n?function(t){return this.fromWireType(g[t])}:function(t){return this.fromWireType(y[t])};case 2:return n?function(t){return this.fromWireType(w[t>>1])}:function(t){return this.fromWireType(L[t>>1])};case 4:return n?function(t){return this.fromWireType(C[t>>2])}:function(t){return this.fromWireType(M[t>>2])};default:throw TypeError(`invalid integer width (${e}): ${t}`)}},tV=(t,e)=>{var n=te[t];if(void 0===n)throw t=`${e} has unknown type ${tA(t)}`,new Z(t);return n},tG=t=>{if(null===t)return"null";var e=typeof t;return"object"===e||"array"===e||"function"===e?t.toString():""+t},tJ=(t,e)=>{switch(e){case 4:return function(t){return this.fromWireType(b[t>>2])};case 8:return function(t){return this.fromWireType(I[t>>3])};default:throw TypeError(`invalid float width (${e}): ${t}`)}},tq=(t,e,n)=>{switch(e){case 1:return n?t=>g[t]:t=>y[t];case 2:return n?t=>w[t>>1]:t=>L[t>>1];case 4:return n?t=>C[t>>2]:t=>M[t>>2];default:throw TypeError(`invalid integer width (${e}): ${t}`)}},tK=Object.assign({optional:!0},tB),tX="u">typeof TextDecoder?new TextDecoder("utf-16le"):void 0,tQ=(t,e)=>{for(var n=t>>1,i=n+e/2;!(n>=i)&&L[n];)++n;if(32<(n<<=1)-t&&tX)return tX.decode(y.subarray(t,n));for(n="",i=0;!(i>=e/2);++i){var r=w[t+2*i>>1];if(0==r)break;n+=String.fromCharCode(r)}return n},tY=(t,e,n)=>{if(null!=n||(n=0x7fffffff),2>n)return 0;n-=2;var i=e;n=n<2*t.length?n/2:t.length;for(var r=0;r<n;++r)w[e>>1]=t.charCodeAt(r),e+=2;return w[e>>1]=0,e-i},tZ=t=>2*t.length,t1=(t,e)=>{for(var n=0,i="";!(n>=e/4);){var r=C[t+4*n>>2];if(0==r)break;++n,65536<=r?(r-=65536,i+=String.fromCharCode(55296|r>>10,56320|1023&r)):i+=String.fromCharCode(r)}return i},t2=(t,e,n)=>{if(null!=n||(n=0x7fffffff),4>n)return 0;var i=e;n=i+n-4;for(var r=0;r<t.length;++r){var a=t.charCodeAt(r);if(55296<=a&&57343>=a&&(a=65536+((1023&a)<<10)|1023&t.charCodeAt(++r)),C[e>>2]=a,(e+=4)+4>n)break}return C[e>>2]=0,e-i},t3=t=>{for(var e=0,n=0;n<t.length;++n){var i=t.charCodeAt(n);55296<=i&&57343>=i&&++n,e+=4}return e},t0=0,t4=[],t9=t=>{var e=t4.length;return t4.push(t),e},t6=(t,e)=>{for(var n=Array(t),i=0;i<t;++i)n[i]=tV(M[e+4*i>>2],"parameter "+i);return n},t5=Reflect.construct,t7={},t8=t=>{if(!(t instanceof j||"unwind"==t))throw t},et=e=>{var n;throw p=e,U||0<t0||(null==(n=t.onExit)||n.call(t,e),S=!0),new j(e)},ee=t=>{if(!S)try{if(t(),!(U||0<t0))try{p=t=p,et(t)}catch(t){t8(t)}}catch(t){t8(t)}},en={},ei=()=>{if(!tR){var t,e={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:u||"./this.program"};for(t in en)void 0===en[t]?delete e[t]:e[t]=en[t];var n=[];for(t in e)n.push(`${t}=${e[t]}`);tR=n}return tR},er=[null,[],[]],ea=()=>{if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues)return t=>crypto.getRandomValues(t);O("initRandomDevice")},eo=t=>(eo=ea())(t);Q=t.InternalError=class extends Error{constructor(t){super(t),this.name="InternalError"}};for(var es=Array(256),el=0;256>el;++el)es[el]=String.fromCharCode(el);Y=es,Z=t.BindingError=class extends Error{constructor(t){super(t),this.name="BindingError"}},Object.assign(t_.prototype,{isAliasOf:function(t){if(!(this instanceof t_&&t instanceof t_))return!1;var e=this.Da.Ga.Fa,n=this.Da.Ea;t.Da=t.Da;var i=t.Da.Ga.Fa;for(t=t.Da.Ea;e.Ja;)n=e.Ta(n),e=e.Ja;for(;i.Ja;)t=i.Ta(t),i=i.Ja;return e===i&&n===t},clone:function(){if(this.Da.Ea||to(this),this.Da.Sa)return this.Da.count.value+=1,this;var t=tv,e=Object,n=e.create,i=Object.getPrototypeOf(this),r=this.Da;return t=t(n.call(e,i,{Da:{value:{count:r.count,Ra:r.Ra,Sa:r.Sa,Ea:r.Ea,Ga:r.Ga,Ia:r.Ia,Ka:r.Ka}}})),t.Da.count.value+=1,t.Da.Ra=!1,t},delete(){if(this.Da.Ea||to(this),this.Da.Ra&&!this.Da.Sa)throw new Z("Object already scheduled for deletion");tl(this);var t=this.Da;--t.count.value,0===t.count.value&&(t.Ia?t.Ka.Na(t.Ia):t.Ga.Fa.Na(t.Ea)),this.Da.Sa||(this.Da.Ia=void 0,this.Da.Ea=void 0)},isDeleted:function(){return!this.Da.Ea},deleteLater:function(){if(this.Da.Ea||to(this),this.Da.Ra&&!this.Da.Sa)throw new Z("Object already scheduled for deletion");return this.Da.Ra=!0,this}}),Object.assign(tI.prototype,{gb(t){return this.ab&&(t=this.ab(t)),t},Za(t){var e;null==(e=this.Na)||e.call(this,t)},La:8,readValueFromPointer:X,fromWireType:function(t){function e(){return this.Va?tf(this.Fa.Pa,{Ga:this.lb,Ea:n,Ka:this,Ia:t}):tf(this.Fa.Pa,{Ga:this,Ea:t})}var n=this.gb(t);if(!n)return this.Za(t),null;var i=tc(this.Fa,n);if(void 0!==i)return 0===i.Da.count.value?(i.Da.Ea=n,i.Da.Ia=t,i.clone()):(i=i.clone(),this.Za(t),i);if(!(i=td[i=this.Fa.fb(n)]))return e.call(this);i=this.Ua?i.bb:i.pointerType;var r=th(n,this.Fa,i.Fa);return null===r?e.call(this):this.Va?tf(i.Fa.Pa,{Ga:i,Ea:r,Ka:this,Ia:t}):tf(i.Fa.Pa,{Ga:i,Ea:r})}}),n=Error,(r=tm(i="UnboundTypeError",function(t){this.name=i,this.message=t,void 0!==(t=Error(t).stack)&&(this.stack=this.toString()+`
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[979],{5996:(t,e,n)=>{n.d(e,{GL:()=>q});var i=n(2421),r=n(8593),a=Object.defineProperty,o=Object.defineProperties,s=Object.getOwnPropertyDescriptors,l=Object.getOwnPropertySymbols,h=Object.prototype.hasOwnProperty,d=Object.prototype.propertyIsEnumerable,u=(t,e,n)=>e in t?a(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,c=(t,e)=>{for(var n in e||(e={}))h.call(e,n)&&u(t,n,e[n]);if(l)for(var n of l(e))d.call(e,n)&&u(t,n,e[n]);return t},f=(t,e)=>o(t,s(e)),v=(t,e)=>{var n={};for(var i in t)h.call(t,i)&&0>e.indexOf(i)&&(n[i]=t[i]);if(null!=t&&l)for(var i of l(t))0>e.indexOf(i)&&d.call(t,i)&&(n[i]=t[i]);return n},_=(t,e,n)=>u(t,"symbol"!=typeof e?e+"":e,n),m=(t,e,n)=>new Promise((i,r)=>{var a=t=>{try{s(n.next(t))}catch(t){r(t)}},o=t=>{try{s(n.throw(t))}catch(t){r(t)}},s=t=>t.done?i(t.value):Promise.resolve(t.value).then(a,o);s((n=n.apply(t,e)).next())}),p=class{requestAnimationFrame(t){return requestAnimationFrame(t)}cancelAnimationFrame(t){cancelAnimationFrame(t)}},g=class{constructor(){_(this,"_lastHandleId",0),_(this,"_lastImmediate",null)}requestAnimationFrame(t){return this._lastHandleId>=Number.MAX_SAFE_INTEGER&&(this._lastHandleId=0),this._lastHandleId+=1,this._lastImmediate=setImmediate(()=>{t(Date.now())}),this._lastHandleId}cancelAnimationFrame(t){this._lastImmediate&&clearImmediate(this._lastImmediate)}},y=class{constructor(){_(this,"_strategy"),this._strategy="function"==typeof requestAnimationFrame?new p:new g}requestAnimationFrame(t){return this._strategy.requestAnimationFrame(t)}cancelAnimationFrame(t){this._strategy.cancelAnimationFrame(t)}},w="u">typeof window&&"u">typeof window.document,L=new Uint8Array([80,75,3,4]),C=["v","ip","op","layers","fr","w","h"],M="0.42.0",b="@lottiefiles/dotlottie-web",I=(()=>{var t,e="u">typeof document?null==(t=document.currentScript)?void 0:t.src:void 0;return function(t={}){var n,i,r,a,o,s,l,h=new Promise((t,e)=>{o=t,s=e}),d=Object.assign({},t),u="./this.program",c="";"u">typeof document&&document.currentScript&&(c=document.currentScript.src),e&&(c=e),c=c.startsWith("blob:")?"":c.substr(0,c.replace(/[?#].*/,"").lastIndexOf("/")+1),l=t=>fetch(t,{credentials:"same-origin"}).then(t=>t.ok?t.arrayBuffer():Promise.reject(Error(t.status+" : "+t.url)));var f=t.print||console.log.bind(console),v=t.printErr||console.error.bind(console);Object.assign(t,d),d=null,t.thisProgram&&(u=t.thisProgram);var m,p,g,y,w,L,C,M,b,I,E=t.wasmBinary,S=!1;function F(){var e=m.buffer;t.HEAP8=g=new Int8Array(e),t.HEAP16=w=new Int16Array(e),t.HEAPU8=y=new Uint8Array(e),t.HEAPU16=L=new Uint16Array(e),t.HEAP32=C=new Int32Array(e),t.HEAPU32=M=new Uint32Array(e),t.HEAPF32=b=new Float32Array(e),t.HEAPF64=I=new Float64Array(e)}var P=[],D=[],k=[],A=0,T=null;function O(e){var n;throw null==(n=t.onAbort)||n.call(t,e),v(e="Aborted("+e+")"),S=!0,e=new WebAssembly.RuntimeError(e+". Build with -sASSERTIONS for more info."),s(e),e}var x,R=t=>t.startsWith("data:application/octet-stream;base64,");function $(t){if(t==x&&E)return new Uint8Array(E);throw"both async and sync fetching of the wasm failed"}function W(t,e,n){return(E?Promise.resolve().then(()=>$(t)):l(t).then(t=>new Uint8Array(t),()=>$(t))).then(t=>WebAssembly.instantiate(t,e)).then(n,t=>{v(`failed to asynchronously prepare wasm: ${t}`),O(t)})}class j{constructor(t){_(this,"name","ExitStatus"),this.message=`Program terminated with exit(${t})`,this.status=t}}var z=e=>{for(;0<e.length;)e.shift()(t)},U=t.noExitRuntime||!0,H="u">typeof TextDecoder?new TextDecoder:void 0,B=(t,e=0,n=NaN)=>{var i=e+n;for(n=e;t[n]&&!(n>=i);)++n;if(16<n-e&&t.buffer&&H)return H.decode(t.subarray(e,n));for(i="";e<n;){var r=t[e++];if(128&r){var a=63&t[e++];if((224&r)==192)i+=String.fromCharCode((31&r)<<6|a);else{var o=63&t[e++];65536>(r=(240&r)==224?(15&r)<<12|a<<6|o:(7&r)<<18|a<<12|o<<6|63&t[e++])?i+=String.fromCharCode(r):(r-=65536,i+=String.fromCharCode(55296|r>>10,56320|1023&r))}}else i+=String.fromCharCode(r)}return i},N=0;class V{constructor(t){this.Ea=t-24}}var G=()=>{var t=N;if(!t)return em(0),0;var e=new V(t);M[e.Ea+16>>2]=t;var n=M[e.Ea+4>>2];if(!n)return em(0),t;for(var i of[]){if(0===i||i===n)break;if(ey(i,n,e.Ea+16))return em(i),t}return em(n),t},J=(t,e,n)=>{var i=y;if(0<n){n=e+n-1;for(var r=0;r<t.length;++r){var a=t.charCodeAt(r);if(55296<=a&&57343>=a&&(a=65536+((1023&a)<<10)|1023&t.charCodeAt(++r)),127>=a){if(e>=n)break;i[e++]=a}else{if(2047>=a){if(e+1>=n)break;i[e++]=192|a>>6}else{if(65535>=a){if(e+2>=n)break;i[e++]=224|a>>12}else{if(e+3>=n)break;i[e++]=240|a>>18,i[e++]=128|a>>12&63}i[e++]=128|a>>6&63}i[e++]=128|63&a}}i[e]=0}},q={},K=t=>{for(;t.length;){var e=t.pop();t.pop()(e)}};function X(t){return this.fromWireType(M[t>>2])}var Q,Y,Z,tt={},te={},tn={},ti=(t,e,n)=>{function i(e){if((e=n(e)).length!==t.length)throw new Q("Mismatched type converter count");for(var i=0;i<t.length;++i)ta(t[i],e[i])}t.forEach(t=>tn[t]=e);var r=Array(e.length),a=[],o=0;e.forEach((t,e)=>{te.hasOwnProperty(t)?r[e]=te[t]:(a.push(t),tt.hasOwnProperty(t)||(tt[t]=[]),tt[t].push(()=>{r[e]=te[t],++o===a.length&&i(r)}))}),0===a.length&&i(r)},tr=t=>{for(var e="";y[t];)e+=Y[y[t++]];return e};function ta(t,e,n={}){return function(t,e,n={}){var i=e.name;if(!t)throw new Z(`type "${i}" must have a positive integer typeid pointer`);if(te.hasOwnProperty(t)){if(n.kb)return;throw new Z(`Cannot register type '${i}' twice`)}te[t]=e,delete tn[t],tt.hasOwnProperty(t)&&(e=tt[t],delete tt[t],e.forEach(t=>t()))}(t,e,n)}var to=t=>{throw new Z(t.Da.Ga.Fa.name+" instance already deleted")},ts=!1,tl=()=>{},th=(t,e,n)=>e===n?t:void 0===n.Ja||null===(t=th(t,e,n.Ja))?null:n.cb(t),td={},tu={},tc=(t,e)=>{if(void 0===e)throw new Z("ptr should not be undefined");for(;t.Ja;)e=t.Ta(e),t=t.Ja;return tu[e]},tf=(t,e)=>{if(!e.Ga||!e.Ea)throw new Q("makeClassHandle requires ptr and ptrType");if(!!e.Ka!=!!e.Ia)throw new Q("Both smartPtrType and smartPtr must be specified");return e.count={value:1},tv(Object.create(t,{Da:{value:e,writable:!0}}))},tv=t=>typeof FinalizationRegistry>"u"?(tv=t=>t,t):(ts=new FinalizationRegistry(t=>{t=t.Da,--t.count.value,0===t.count.value&&(t.Ia?t.Ka.Na(t.Ia):t.Ga.Fa.Na(t.Ea))}),tv=t=>{var e=t.Da;return e.Ia&&ts.register(t,{Da:e},t),t},tl=t=>{ts.unregister(t)},tv(t));function t_(){}var tm=(t,e)=>Object.defineProperty(e,"name",{value:t}),tp=(t,e,n)=>{if(void 0===t[e].Ha){var i=t[e];t[e]=function(...i){if(!t[e].Ha.hasOwnProperty(i.length))throw new Z(`Function '${n}' called with an invalid number of arguments (${i.length}) - expects one of (${t[e].Ha})!`);return t[e].Ha[i.length].apply(this,i)},t[e].Ha=[],t[e].Ha[i.Qa]=i}},tg=(e,n,i)=>{if(t.hasOwnProperty(e)){if(void 0===i||void 0!==t[e].Ha&&void 0!==t[e].Ha[i])throw new Z(`Cannot register public name '${e}' twice`);if(tp(t,e,e),t[e].Ha.hasOwnProperty(i))throw new Z(`Cannot register multiple overloads of a function with the same number of arguments (${i})!`);t[e].Ha[i]=n}else t[e]=n,t[e].Qa=i},ty=t=>{var e=(t=t.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return 48<=e&&57>=e?`_${t}`:t};function tw(t,e,n,i,r,a,o,s){this.name=t,this.constructor=e,this.Pa=n,this.Na=i,this.Ja=r,this.fb=a,this.Ta=o,this.cb=s,this.mb=[]}var tL=(t,e,n)=>{for(;e!==n;){if(!e.Ta)throw new Z(`Expected null or instance of ${n.name}, got an instance of ${e.name}`);t=e.Ta(t),e=e.Ja}return t};function tC(t,e){if(null===e){if(this.Wa)throw new Z(`null is not a valid ${this.name}`);return 0}if(!e.Da)throw new Z(`Cannot pass "${tG(e)}" as a ${this.name}`);if(!e.Da.Ea)throw new Z(`Cannot pass deleted object as a pointer of type ${this.name}`);return tL(e.Da.Ea,e.Da.Ga.Fa,this.Fa)}function tM(t,e){if(null===e){if(this.Wa)throw new Z(`null is not a valid ${this.name}`);if(this.Va){var n=this.Xa();return null!==t&&t.push(this.Na,n),n}return 0}if(!e||!e.Da)throw new Z(`Cannot pass "${tG(e)}" as a ${this.name}`);if(!e.Da.Ea)throw new Z(`Cannot pass deleted object as a pointer of type ${this.name}`);if(!this.Ua&&e.Da.Ga.Ua)throw new Z(`Cannot convert argument of type ${e.Da.Ka?e.Da.Ka.name:e.Da.Ga.name} to parameter type ${this.name}`);if(n=tL(e.Da.Ea,e.Da.Ga.Fa,this.Fa),this.Va){if(void 0===e.Da.Ia)throw new Z("Passing raw pointer to smart pointer is illegal");switch(this.rb){case 0:if(e.Da.Ka===this)n=e.Da.Ia;else throw new Z(`Cannot convert argument of type ${e.Da.Ka?e.Da.Ka.name:e.Da.Ga.name} to parameter type ${this.name}`);break;case 1:n=e.Da.Ia;break;case 2:if(e.Da.Ka===this)n=e.Da.Ia;else{var i=e.clone();n=this.nb(n,tH(()=>i.delete())),null!==t&&t.push(this.Na,n)}break;default:throw new Z("Unsupporting sharing policy")}}return n}function tb(t,e){if(null===e){if(this.Wa)throw new Z(`null is not a valid ${this.name}`);return 0}if(!e.Da)throw new Z(`Cannot pass "${tG(e)}" as a ${this.name}`);if(!e.Da.Ea)throw new Z(`Cannot pass deleted object as a pointer of type ${this.name}`);if(e.Da.Ga.Ua)throw new Z(`Cannot convert argument of type ${e.Da.Ga.name} to parameter type ${this.name}`);return tL(e.Da.Ea,e.Da.Ga.Fa,this.Fa)}function tI(t,e,n,i,r,a,o,s,l,h,d){this.name=t,this.Fa=e,this.Wa=n,this.Ua=i,this.Va=r,this.lb=a,this.rb=o,this.ab=s,this.Xa=l,this.nb=h,this.Na=d,r||void 0!==e.Ja?this.toWireType=tM:(this.toWireType=i?tC:tb,this.Ma=null)}var tE,tS,tF=(e,n,i)=>{if(!t.hasOwnProperty(e))throw new Q("Replacing nonexistent public symbol");void 0!==t[e].Ha&&void 0!==i?t[e].Ha[i]=n:(t[e]=n,t[e].Qa=i)},tP=(e,n,i=[])=>n=e.includes("j")?(0,t["dynCall_"+(e=e.replace(/p/g,"i"))])(n,...i):tE.get(n)(...i),tD=(t,e)=>(...n)=>tP(t,e,n),tk=(t,e)=>{var n=(t=tr(t)).includes("j")?tD(t,e):tE.get(e);if("function"!=typeof n)throw new Z(`unknown function pointer with signature ${t}: ${e}`);return n},tA=t=>{var e=tr(t=ec(t));return ef(t),e},tT=(t,e)=>{var n=[],i={};throw e.forEach(function t(e){i[e]||te[e]||(tn[e]?tn[e].forEach(t):(n.push(e),i[e]=!0))}),new tS(`${t}: `+n.map(tA).join([", "]))},tO=(t,e)=>{for(var n=[],i=0;i<t;i++)n.push(M[e+4*i>>2]);return n};function tx(t,e,n,i,r){var a=e.length;if(2>a)throw new Z("argTypes array size mismatch! Must at least get return value and 'this' types!");var o=null!==e[1]&&null!==n,s=function(t){for(var e=1;e<t.length;++e)if(null!==t[e]&&void 0===t[e].Ma)return!0;return!1}(e),l="void"!==e[0].name,h=a-2,d=Array(h),u=[],c=[];return tm(t,function(...t){if(c.length=0,u.length=o?2:1,u[0]=r,o){var n=e[1].toWireType(c,this);u[1]=n}for(var a=0;a<h;++a)d[a]=e[a+2].toWireType(c,t[a]),u.push(d[a]);if(t=i(...u),s)K(c);else for(a=o?1:2;a<e.length;a++){var f=1===a?n:d[a-2];null!==e[a].Ma&&e[a].Ma(f)}return l?e[0].fromWireType(t):void 0})}var tR,t$=t=>{let e=(t=t.trim()).indexOf("(");return -1!==e?t.substr(0,e):t},tW=[],tj=[],tz=t=>{9<t&&0==--tj[t+1]&&(tj[t]=void 0,tW.push(t))},tU=t=>{if(!t)throw new Z("Cannot use deleted val. handle = "+t);return tj[t]},tH=t=>{switch(t){case void 0:return 2;case null:return 4;case!0:return 6;case!1:return 8;default:let e=tW.pop()||tj.length;return tj[e]=t,tj[e+1]=1,e}},tB={name:"emscripten::val",fromWireType:t=>{var e=tU(t);return tz(t),e},toWireType:(t,e)=>tH(e),La:8,readValueFromPointer:X,Ma:null},tN=(t,e,n)=>{switch(e){case 1:return n?function(t){return this.fromWireType(g[t])}:function(t){return this.fromWireType(y[t])};case 2:return n?function(t){return this.fromWireType(w[t>>1])}:function(t){return this.fromWireType(L[t>>1])};case 4:return n?function(t){return this.fromWireType(C[t>>2])}:function(t){return this.fromWireType(M[t>>2])};default:throw TypeError(`invalid integer width (${e}): ${t}`)}},tV=(t,e)=>{var n=te[t];if(void 0===n)throw t=`${e} has unknown type ${tA(t)}`,new Z(t);return n},tG=t=>{if(null===t)return"null";var e=typeof t;return"object"===e||"array"===e||"function"===e?t.toString():""+t},tJ=(t,e)=>{switch(e){case 4:return function(t){return this.fromWireType(b[t>>2])};case 8:return function(t){return this.fromWireType(I[t>>3])};default:throw TypeError(`invalid float width (${e}): ${t}`)}},tq=(t,e,n)=>{switch(e){case 1:return n?t=>g[t]:t=>y[t];case 2:return n?t=>w[t>>1]:t=>L[t>>1];case 4:return n?t=>C[t>>2]:t=>M[t>>2];default:throw TypeError(`invalid integer width (${e}): ${t}`)}},tK=Object.assign({optional:!0},tB),tX="u">typeof TextDecoder?new TextDecoder("utf-16le"):void 0,tQ=(t,e)=>{for(var n=t>>1,i=n+e/2;!(n>=i)&&L[n];)++n;if(32<(n<<=1)-t&&tX)return tX.decode(y.subarray(t,n));for(n="",i=0;!(i>=e/2);++i){var r=w[t+2*i>>1];if(0==r)break;n+=String.fromCharCode(r)}return n},tY=(t,e,n)=>{if(null!=n||(n=0x7fffffff),2>n)return 0;n-=2;var i=e;n=n<2*t.length?n/2:t.length;for(var r=0;r<n;++r)w[e>>1]=t.charCodeAt(r),e+=2;return w[e>>1]=0,e-i},tZ=t=>2*t.length,t1=(t,e)=>{for(var n=0,i="";!(n>=e/4);){var r=C[t+4*n>>2];if(0==r)break;++n,65536<=r?(r-=65536,i+=String.fromCharCode(55296|r>>10,56320|1023&r)):i+=String.fromCharCode(r)}return i},t2=(t,e,n)=>{if(null!=n||(n=0x7fffffff),4>n)return 0;var i=e;n=i+n-4;for(var r=0;r<t.length;++r){var a=t.charCodeAt(r);if(55296<=a&&57343>=a&&(a=65536+((1023&a)<<10)|1023&t.charCodeAt(++r)),C[e>>2]=a,(e+=4)+4>n)break}return C[e>>2]=0,e-i},t3=t=>{for(var e=0,n=0;n<t.length;++n){var i=t.charCodeAt(n);55296<=i&&57343>=i&&++n,e+=4}return e},t0=0,t4=[],t9=t=>{var e=t4.length;return t4.push(t),e},t6=(t,e)=>{for(var n=Array(t),i=0;i<t;++i)n[i]=tV(M[e+4*i>>2],"parameter "+i);return n},t5=Reflect.construct,t7={},t8=t=>{if(!(t instanceof j||"unwind"==t))throw t},et=e=>{var n;throw p=e,U||0<t0||(null==(n=t.onExit)||n.call(t,e),S=!0),new j(e)},ee=t=>{if(!S)try{if(t(),!(U||0<t0))try{p=t=p,et(t)}catch(t){t8(t)}}catch(t){t8(t)}},en={},ei=()=>{if(!tR){var t,e={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:u||"./this.program"};for(t in en)void 0===en[t]?delete e[t]:e[t]=en[t];var n=[];for(t in e)n.push(`${t}=${e[t]}`);tR=n}return tR},er=[null,[],[]],ea=()=>{if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues)return t=>crypto.getRandomValues(t);O("initRandomDevice")},eo=t=>(eo=ea())(t);Q=t.InternalError=class extends Error{constructor(t){super(t),this.name="InternalError"}};for(var es=Array(256),el=0;256>el;++el)es[el]=String.fromCharCode(el);Y=es,Z=t.BindingError=class extends Error{constructor(t){super(t),this.name="BindingError"}},Object.assign(t_.prototype,{isAliasOf:function(t){if(!(this instanceof t_&&t instanceof t_))return!1;var e=this.Da.Ga.Fa,n=this.Da.Ea;t.Da=t.Da;var i=t.Da.Ga.Fa;for(t=t.Da.Ea;e.Ja;)n=e.Ta(n),e=e.Ja;for(;i.Ja;)t=i.Ta(t),i=i.Ja;return e===i&&n===t},clone:function(){if(this.Da.Ea||to(this),this.Da.Sa)return this.Da.count.value+=1,this;var t=tv,e=Object,n=e.create,i=Object.getPrototypeOf(this),r=this.Da;return t=t(n.call(e,i,{Da:{value:{count:r.count,Ra:r.Ra,Sa:r.Sa,Ea:r.Ea,Ga:r.Ga,Ia:r.Ia,Ka:r.Ka}}})),t.Da.count.value+=1,t.Da.Ra=!1,t},delete(){if(this.Da.Ea||to(this),this.Da.Ra&&!this.Da.Sa)throw new Z("Object already scheduled for deletion");tl(this);var t=this.Da;--t.count.value,0===t.count.value&&(t.Ia?t.Ka.Na(t.Ia):t.Ga.Fa.Na(t.Ea)),this.Da.Sa||(this.Da.Ia=void 0,this.Da.Ea=void 0)},isDeleted:function(){return!this.Da.Ea},deleteLater:function(){if(this.Da.Ea||to(this),this.Da.Ra&&!this.Da.Sa)throw new Z("Object already scheduled for deletion");return this.Da.Ra=!0,this}}),Object.assign(tI.prototype,{gb(t){return this.ab&&(t=this.ab(t)),t},Za(t){var e;null==(e=this.Na)||e.call(this,t)},La:8,readValueFromPointer:X,fromWireType:function(t){function e(){return this.Va?tf(this.Fa.Pa,{Ga:this.lb,Ea:n,Ka:this,Ia:t}):tf(this.Fa.Pa,{Ga:this,Ea:t})}var n=this.gb(t);if(!n)return this.Za(t),null;var i=tc(this.Fa,n);if(void 0!==i)return 0===i.Da.count.value?(i.Da.Ea=n,i.Da.Ia=t,i.clone()):(i=i.clone(),this.Za(t),i);if(!(i=td[i=this.Fa.fb(n)]))return e.call(this);i=this.Ua?i.bb:i.pointerType;var r=th(n,this.Fa,i.Fa);return null===r?e.call(this):this.Va?tf(i.Fa.Pa,{Ga:i,Ea:r,Ka:this,Ia:t}):tf(i.Fa.Pa,{Ga:i,Ea:r})}}),n=Error,(r=tm(i="UnboundTypeError",function(t){this.name=i,this.message=t,void 0!==(t=Error(t).stack)&&(this.stack=this.toString()+`
|
|
2
2
|
`+t.replace(/^Error(:[^\n]*)?\n/,""))})).prototype=Object.create(n.prototype),r.prototype.constructor=r,r.prototype.toString=function(){return void 0===this.message?this.name:`${this.name}: ${this.message}`},tS=t.UnboundTypeError=r,tj.push(0,1,void 0,1,null,1,!0,1,!1,1),t.count_emval_handles=()=>tj.length/2-5-tW.length;var eh={c:(t,e,n,i)=>O(`Assertion failed: ${t?B(y,t):""}, at: `+[e?e?B(y,e):"":"unknown filename",n,i?i?B(y,i):"":"unknown function"]),d:()=>G(),p:(t,e,n)=>{var i=new V(t);throw M[i.Ea+16>>2]=0,M[i.Ea+4>>2]=e,M[i.Ea+8>>2]=n,N=t},g:t=>{throw N||(N=t),N},R:()=>{},O:()=>{},P:()=>{},U:function(){},Q:()=>{},W:()=>O(""),z:t=>{var e=q[t];delete q[t];var n=e.Xa,i=e.Na,r=e.$a;ti([t],r.map(t=>t.jb).concat(r.map(t=>t.pb)),t=>{var a={};return r.forEach((e,n)=>{var i=t[n],o=e.hb,s=e.ib,l=t[n+r.length],h=e.ob,d=e.qb;a[e.eb]={read:t=>i.fromWireType(o(s,t)),write:(t,e)=>{var n=[];h(d,t,l.toWireType(n,e)),K(n)}}}),[{name:e.name,fromWireType:t=>{var e,n={};for(e in a)n[e]=a[e].read(t);return i(t),n},toWireType:(t,e)=>{for(var r in a)if(!(r in e))throw TypeError(`Missing field: "${r}"`);var o=n();for(r in a)a[r].write(o,e[r]);return null!==t&&t.push(i,o),o},La:8,readValueFromPointer:X,Ma:i}]})},H:()=>{},aa:(t,e,n,i)=>{ta(t,{name:e=tr(e),fromWireType:function(t){return!!t},toWireType:function(t,e){return e?n:i},La:8,readValueFromPointer:function(t){return this.fromWireType(y[t])},Ma:null})},v:(t,e,n,i,r,a,o,s,l,h,d,u,c)=>{d=tr(d),a=tk(r,a),s&&(s=tk(o,s)),h&&(h=tk(l,h)),c=tk(u,c);var f=ty(d);tg(f,function(){tT(`Cannot construct ${d} due to unbound types`,[i])}),ti([t,e,n],i?[i]:[],e=>{if(e=e[0],i)var n,r=e.Fa,o=r.Pa;else o=t_.prototype;var l=Object.create(o,{constructor:{value:e=tm(d,function(...t){if(Object.getPrototypeOf(this)!==l)throw new Z("Use 'new' to construct "+d);if(void 0===u.Oa)throw new Z(d+" has no accessible constructor");var e=u.Oa[t.length];if(void 0===e)throw new Z(`Tried to invoke ctor of ${d} with invalid number of parameters (${t.length}) - expected (${Object.keys(u.Oa).toString()}) parameters instead!`);return e.apply(this,t)})}});e.prototype=l;var u=new tw(d,e,l,c,r,a,s,h);return u.Ja&&(null!=(n=u.Ja).Ya||(n.Ya=[]),u.Ja.Ya.push(u)),r=new tI(d,u,!0,!1,!1),n=new tI(d+"*",u,!1,!1,!1),o=new tI(d+" const*",u,!1,!0,!1),td[t]={pointerType:n,bb:o},tF(f,e),[r,n,o]})},t:(t,e,n,i,r,a)=>{var o=tO(e,n);r=tk(i,r),ti([],[t],t=>{t=t[0];var n=`constructor ${t.name}`;if(void 0===t.Fa.Oa&&(t.Fa.Oa=[]),void 0!==t.Fa.Oa[e-1])throw new Z(`Cannot register multiple constructors with identical number of parameters (${e-1}) for class '${t.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);return t.Fa.Oa[e-1]=()=>{tT(`Cannot construct ${t.name} due to unbound types`,o)},ti([],o,i=>(i.splice(1,0,null),t.Fa.Oa[e-1]=tx(n,i,null,r,a),[])),[]})},h:(t,e,n,i,r,a,o,s)=>{var l=tO(n,i);e=t$(e=tr(e)),a=tk(r,a),ti([],[t],t=>{function i(){tT(`Cannot call ${r} due to unbound types`,l)}t=t[0];var r=`${t.name}.${e}`;e.startsWith("@@")&&(e=Symbol[e.substring(2)]),s&&t.Fa.mb.push(e);var h=t.Fa.Pa,d=h[e];return void 0===d||void 0===d.Ha&&d.className!==t.name&&d.Qa===n-2?(i.Qa=n-2,i.className=t.name,h[e]=i):(tp(h,e,r),h[e].Ha[n-2]=i),ti([],l,i=>(i=tx(r,i,t,a,o),void 0===h[e].Ha?(i.Qa=n-2,h[e]=i):h[e].Ha[n-2]=i,[])),[]})},$:t=>ta(t,tB),B:(t,e,n,i)=>{function r(){}e=tr(e),r.values={},ta(t,{name:e,constructor:r,fromWireType:function(t){return this.constructor.values[t]},toWireType:(t,e)=>e.value,La:8,readValueFromPointer:tN(e,n,i),Ma:null}),tg(e,r)},n:(t,e,n)=>{var i=tV(t,"enum");e=tr(e),t=i.constructor,i=Object.create(i.constructor.prototype,{value:{value:n},constructor:{value:tm(`${i.name}_${e}`,function(){})}}),t.values[n]=i,t[e]=i},D:(t,e,n)=>{ta(t,{name:e=tr(e),fromWireType:t=>t,toWireType:(t,e)=>e,La:8,readValueFromPointer:tJ(e,n),Ma:null})},y:(t,e,n,i,r,a)=>{var o=tO(e,n);t=t$(t=tr(t)),r=tk(i,r),tg(t,function(){tT(`Cannot call ${t} due to unbound types`,o)},e-1),ti([],o,n=>(tF(t,tx(t,[n[0],null].concat(n.slice(1)),null,r,a),e-1),[]))},o:(t,e,n,i,r)=>{if(e=tr(e),-1===r&&(r=0xffffffff),r=t=>t,0===i){var a=32-8*n;r=t=>t<<a>>>a}var o=e.includes("unsigned")?function(t,e){return e>>>0}:function(t,e){return e};ta(t,{name:e,fromWireType:r,toWireType:o,La:8,readValueFromPointer:tq(e,n,0!==i),Ma:null})},k:(t,e,n)=>{function i(t){return new r(g.buffer,M[t+4>>2],M[t>>2])}var r=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][e];ta(t,{name:n=tr(n),fromWireType:i,La:8,readValueFromPointer:i},{kb:!0})},x:t=>{ta(t,tK)},ga:(t,e,n,i,r,a,o,s,l,h,d,u)=>{n=tr(n),a=tk(r,a),s=tk(o,s),h=tk(l,h),u=tk(d,u),ti([t],[e],t=>(t=t[0],[new tI(n,t.Fa,!1,!1,!0,t,i,a,s,h,u)]))},E:(t,e)=>{var n="std::string"===(e=tr(e));ta(t,{name:e,fromWireType:function(t){var e=M[t>>2],i=t+4;if(n)for(var r=i,a=0;a<=e;++a){var o=i+a;if(a==e||0==y[o]){if(r=r?B(y,r,o-r):"",void 0===s)var s=r;else s+="\0",s+=r;r=o+1}}else{for(s=Array(e),a=0;a<e;++a)s[a]=String.fromCharCode(y[i+a]);s=s.join("")}return ef(t),s},toWireType:function(t,e){e instanceof ArrayBuffer&&(e=new Uint8Array(e));var i,r="string"==typeof e;if(!(r||e instanceof Uint8Array||e instanceof Uint8ClampedArray||e instanceof Int8Array))throw new Z("Cannot pass non-string to std::string");if(n&&r)for(var a=i=0;a<e.length;++a){var o=e.charCodeAt(a);127>=o?i++:2047>=o?i+=2:55296<=o&&57343>=o?(i+=4,++a):i+=3}else i=e.length;if(o=(a=eu(4+i+1))+4,M[a>>2]=i,n&&r)J(e,o,i+1);else if(r)for(r=0;r<i;++r){var s=e.charCodeAt(r);if(255<s)throw ef(o),new Z("String has UTF-16 code units that do not fit in 8 bits");y[o+r]=s}else for(r=0;r<i;++r)y[o+r]=e[r];return null!==t&&t.push(ef,a),a},La:8,readValueFromPointer:X,Ma(t){ef(t)}})},w:(t,e,n)=>{if(n=tr(n),2===e)var i=tQ,r=tY,a=tZ,o=t=>L[t>>1];else 4===e&&(i=t1,r=t2,a=t3,o=t=>M[t>>2]);ta(t,{name:n,fromWireType:t=>{for(var n,r=M[t>>2],a=t+4,s=0;s<=r;++s){var l=t+4+s*e;(s==r||0==o(l))&&(a=i(a,l-a),void 0===n?n=a:(n+="\0",n+=a),a=l+e)}return ef(t),n},toWireType:(t,i)=>{if("string"!=typeof i)throw new Z(`Cannot pass non-string to C++ string type ${n}`);var o=a(i),s=eu(4+o+e);return M[s>>2]=o/e,r(i,s+4,o+e),null!==t&&t.push(ef,s),s},La:8,readValueFromPointer:X,Ma(t){ef(t)}})},A:(t,e,n,i,r,a)=>{q[t]={name:tr(e),Xa:tk(n,i),Na:tk(r,a),$a:[]}},m:(t,e,n,i,r,a,o,s,l,h)=>{q[t].$a.push({eb:tr(e),jb:n,hb:tk(i,r),ib:a,pb:o,ob:tk(s,l),qb:h})},ba:(t,e)=>{ta(t,{sb:!0,name:e=tr(e),La:0,fromWireType:()=>{},toWireType:()=>{}})},M:()=>{U=!1,t0=0},I:()=>{throw 1/0},ea:(t,e,n,i)=>(t=t4[t])(null,e=tU(e),n,i),F:tz,da:(t,e,n)=>{var i=t6(t,e),r=i.shift(),a=Array(--t);return t9(tm(e=`methodCaller<(${i.map(t=>t.name).join(", ")}) => ${r.name}>`,(e,o,s,l)=>{for(var h=0,d=0;d<t;++d)a[d]=i[d].readValueFromPointer(l+h),h+=i[d].La;return o=1===n?t5(o,a):o.apply(e,a),e=[],o=r.toWireType(e,o),e.length&&(M[s>>2]=tH(e)),o}))},fa:t=>{9<t&&(tj[t+1]+=1)},ca:t=>{K(tU(t)),tz(t)},r:(t,e)=>tH(t=(t=tV(t,"_emval_take_value")).readValueFromPointer(e)),J:(t,e)=>{if(t7[t]&&(clearTimeout(t7[t].id),delete t7[t]),!e)return 0;var n=setTimeout(()=>{delete t7[t],ee(()=>ev(t,performance.now()))},e);return t7[t]={id:n,tb:e},0},K:(t,e,n,i)=>{var r=new Date().getFullYear(),a=new Date(r,0,1).getTimezoneOffset();r=new Date(r,6,1).getTimezoneOffset(),M[t>>2]=60*Math.max(a,r),C[e>>2]=+(a!=r),t=(e=t=>{var e=Math.abs(t);return`UTC${0<=t?"-":"+"}${String(Math.floor(e/60)).padStart(2,"0")}${String(e%60).padStart(2,"0")}`})(a),e=e(r),r<a?(J(t,n,17),J(e,i,17)):(J(t,i,17),J(e,n,17))},ha:()=>performance.now(),L:t=>{var e=y.length;if(0x80000000<(t>>>=0))return!1;for(var n=1;4>=n;n*=2){var i=e*(1+.2/n);i=Math.min(i,t+0x6000000);t:{i=(Math.min(0x80000000,65536*Math.ceil(Math.max(t,i)/65536))-m.buffer.byteLength+65535)/65536|0;try{m.grow(i),F();var r=1;break t}catch{}r=void 0}if(r)return!0}return!1},Y:(t,e)=>{var n=0;return ei().forEach((i,r)=>{var a=e+n;for(r=M[t+4*r>>2]=a,a=0;a<i.length;++a)g[r++]=i.charCodeAt(a);g[r]=0,n+=i.length+1}),0},Z:(t,e)=>{var n=ei();M[t>>2]=n.length;var i=0;return n.forEach(t=>i+=t.length+1),M[e>>2]=i,0},V:()=>52,T:()=>52,S:(t,e,n,i)=>{for(var r=0,a=0;a<n;a++){var o=M[e>>2],s=M[e+4>>2];e+=8;for(var l=0;l<s;l++){var h=y[o+l],d=er[t];0===h||10===h?((1===t?f:v)(B(d)),d.length=0):d.push(h)}r+=s}return M[i>>2]=r,0},j:function(t,e){var n=eg();try{return tE.get(t)(e)}catch(t){if(ep(n),t!==t+0)throw t;e_(1,0)}},f:function(t,e,n){var i=eg();try{return tE.get(t)(e,n)}catch(t){if(ep(i),t!==t+0)throw t;e_(1,0)}},e:function(t,e,n,i){var r=eg();try{return tE.get(t)(e,n,i)}catch(t){if(ep(r),t!==t+0)throw t;e_(1,0)}},_:function(t,e,n,i,r){var a=eg();try{return tE.get(t)(e,n,i,r)}catch(t){if(ep(a),t!==t+0)throw t;e_(1,0)}},s:function(t,e,n,i,r,a){var o=eg();try{return tE.get(t)(e,n,i,r,a)}catch(t){if(ep(o),t!==t+0)throw t;e_(1,0)}},C:function(t,e,n,i,r,a,o,s){var l=eg();try{return tE.get(t)(e,n,i,r,a,o,s)}catch(t){if(ep(l),t!==t+0)throw t;e_(1,0)}},u:function(t){var e=eg();try{tE.get(t)()}catch(t){if(ep(e),t!==t+0)throw t;e_(1,0)}},b:function(t,e){var n=eg();try{tE.get(t)(e)}catch(t){if(ep(n),t!==t+0)throw t;e_(1,0)}},a:function(t,e,n){var i=eg();try{tE.get(t)(e,n)}catch(t){if(ep(i),t!==t+0)throw t;e_(1,0)}},i:function(t,e,n,i){var r=eg();try{tE.get(t)(e,n,i)}catch(t){if(ep(r),t!==t+0)throw t;e_(1,0)}},l:function(t,e,n,i,r){var a=eg();try{tE.get(t)(e,n,i,r)}catch(t){if(ep(a),t!==t+0)throw t;e_(1,0)}},q:function(t,e,n,i,r,a){var o=eg();try{tE.get(t)(e,n,i,r,a)}catch(t){if(ep(o),t!==t+0)throw t;e_(1,0)}},G:function(t,e,n,i,r,a,o,s,l,h){var d=eg();try{ew(t,e,n,i,r,a,o,s,l,h)}catch(t){if(ep(d),t!==t+0)throw t;e_(1,0)}},X:et,N:(t,e)=>(eo(y.subarray(t,t+e)),0)},ed=function(){function e(e){var n;return m=(ed=e.exports).ia,F(),tE=ed.na,D.unshift(ed.ja),A--,null==(n=t.monitorRunDependencies)||n.call(t,A),0==A&&T&&(e=T,T=null,e()),ed}A++,null==(r=t.monitorRunDependencies)||r.call(t,A);var n,i,r,a={a:eh};if(t.instantiateWasm)try{return t.instantiateWasm(a,e)}catch(t){v(`Module.instantiateWasm callback failed with error: ${t}`),s(t)}return null!=x||(x=R("DotLottiePlayer.wasm")?"DotLottiePlayer.wasm":t.locateFile?t.locateFile("DotLottiePlayer.wasm",c):c+"DotLottiePlayer.wasm"),(n=function(t){e(t.instance)},i=x,E||"function"!=typeof WebAssembly.instantiateStreaming||R(i)||"function"!=typeof fetch?W(i,a,n):fetch(i,{credentials:"same-origin"}).then(t=>WebAssembly.instantiateStreaming(t,a).then(n,function(t){return v(`wasm streaming compile failed: ${t}`),v("falling back to ArrayBuffer instantiation"),W(i,a,n)}))).catch(s),{}}(),eu=t=>(eu=ed.ka)(t),ec=t=>(ec=ed.la)(t),ef=t=>(ef=ed.ma)(t),ev=(t,e)=>(ev=ed.oa)(t,e),e_=(t,e)=>(e_=ed.pa)(t,e),em=t=>(em=ed.qa)(t),ep=t=>(ep=ed.ra)(t),eg=()=>(eg=ed.sa)(),ey=(t,e,n)=>(ey=ed.ta)(t,e,n);t.dynCall_iijj=(e,n,i,r,a,o)=>(t.dynCall_iijj=ed.ua)(e,n,i,r,a,o),t.dynCall_vijj=(e,n,i,r,a,o)=>(t.dynCall_vijj=ed.va)(e,n,i,r,a,o),t.dynCall_jiii=(e,n,i,r)=>(t.dynCall_jiii=ed.wa)(e,n,i,r);var ew=t.dynCall_vijjjj=(e,n,i,r,a,o,s,l,h,d)=>(ew=t.dynCall_vijjjj=ed.xa)(e,n,i,r,a,o,s,l,h,d);function eL(){function e(){var e;if(!a&&(a=!0,t.calledRun=!0,!S)){if(z(D),o(t),null==(e=t.onRuntimeInitialized)||e.call(t),t.postRun)for("function"==typeof t.postRun&&(t.postRun=[t.postRun]);t.postRun.length;){var n=t.postRun.shift();k.unshift(n)}z(k)}}if(!(0<A)){if(t.preRun)for("function"==typeof t.preRun&&(t.preRun=[t.preRun]);t.preRun.length;)!function(){var e=t.preRun.shift();P.unshift(e)}();z(P),0<A||(t.setStatus?(t.setStatus("Running..."),setTimeout(()=>{setTimeout(()=>t.setStatus(""),1),e()},1)):e())}}if(t.dynCall_jii=(e,n,i)=>(t.dynCall_jii=ed.ya)(e,n,i),t.dynCall_viijii=(e,n,i,r,a,o,s)=>(t.dynCall_viijii=ed.za)(e,n,i,r,a,o,s),t.dynCall_iiiiij=(e,n,i,r,a,o,s)=>(t.dynCall_iiiiij=ed.Aa)(e,n,i,r,a,o,s),t.dynCall_iiiiijj=(e,n,i,r,a,o,s,l,h)=>(t.dynCall_iiiiijj=ed.Ba)(e,n,i,r,a,o,s,l,h),t.dynCall_iiiiiijj=(e,n,i,r,a,o,s,l,h,d)=>(t.dynCall_iiiiiijj=ed.Ca)(e,n,i,r,a,o,s,l,h,d),T=function t(){a||eL(),a||(T=t)},t.preInit)for("function"==typeof t.preInit&&(t.preInit=[t.preInit]);0<t.preInit.length;)t.preInit.pop()();return eL(),h}})(),E=class{constructor(){throw Error("RendererLoader is a static class and cannot be instantiated.")}static _tryLoad(t){return m(this,null,function*(){return yield I({locateFile:()=>t})})}static _loadWithBackup(){return m(this,null,function*(){return this._ModulePromise||(this._ModulePromise=this._tryLoad(this._wasmURL).catch(t=>m(this,null,function*(){let e=`https://unpkg.com/${b}@${M}/dist/dotlottie-player.wasm`;console.warn(`Primary WASM load failed from ${this._wasmURL}. Error: ${t.message}`),console.warn(`Attempting to load WASM from backup URL: ${e}`);try{return yield this._tryLoad(e)}catch(e){throw console.error(`Primary WASM URL failed: ${t.message}`),console.error(`Backup WASM URL failed: ${e.message}`),Error("WASM loading failed from all sources.")}}))),this._ModulePromise})}static load(){return m(this,null,function*(){return this._loadWithBackup()})}static setWasmUrl(t){t!==this._wasmURL&&(this._wasmURL=t,this._ModulePromise=null)}};_(E,"_ModulePromise",null),_(E,"_wasmURL",`https://cdn.jsdelivr.net/npm/${b}@${M}/dist/dotlottie-player.wasm`);var S=class{constructor(){_(this,"_eventListeners",new Map)}addEventListener(t,e){let n=this._eventListeners.get(t);n||(n=new Set,this._eventListeners.set(t,n)),n.add(e)}removeEventListener(t,e){let n=this._eventListeners.get(t);n&&(e?(n.delete(e),0===n.size&&this._eventListeners.delete(t)):this._eventListeners.delete(t))}dispatch(t){let e=this._eventListeners.get(t.type);e?.forEach(e=>e(t))}removeAllEventListeners(){this._eventListeners.clear()}},F=class{static _initializeObserver(){this._observer||(this._observer=new IntersectionObserver(t=>{t.forEach(t=>{let e=this._observedCanvases.get(t.target);e&&(t.isIntersecting?e.unfreeze():e.freeze())})},{threshold:0}))}static observe(t,e){var n;this._initializeObserver(),this._observedCanvases.has(t)||(this._observedCanvases.set(t,e),null==(n=this._observer)||n.observe(t))}static unobserve(t){var e,n;null==(e=this._observer)||e.unobserve(t),this._observedCanvases.delete(t),0===this._observedCanvases.size&&(null==(n=this._observer)||n.disconnect(),this._observer=null)}};_(F,"_observer",null),_(F,"_observedCanvases",new Map);var P=class{static _initializeObserver(){this._observer||(this._observer=new ResizeObserver(t=>{t.forEach(t=>{let e=this._observedCanvases.get(t.target);if(!e)return;let[n,i]=e;clearTimeout(i);let r=setTimeout(()=>{n.resize()},100);this._observedCanvases.set(t.target,[n,r])})}))}static observe(t,e){var n;this._initializeObserver(),this._observedCanvases.has(t)||(this._observedCanvases.set(t,[e,0]),null==(n=this._observer)||n.observe(t))}static unobserve(t){var e,n;null==(e=this._observer)||e.unobserve(t),this._observedCanvases.delete(t),0===this._observedCanvases.size&&(null==(n=this._observer)||n.disconnect(),this._observer=null)}};function D(t){if(t.byteLength<4)return!1;let e=new Uint8Array(t.slice(0,L.byteLength));for(let t=0;t<L.length;t+=1)if(L[t]!==e[t])return!1;return!0}function k(t){return C.every(e=>Object.prototype.hasOwnProperty.call(t,e))}function A(t){if("string"!=typeof t)return k(t);try{return k(JSON.parse(t))}catch{return!1}}function T(){return 1+((w?window.devicePixelRatio:1)-1)*.75}function O(t){let e=t.getBoundingClientRect();return e.top>=0&&e.left>=0&&e.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&e.right<=(window.innerWidth||document.documentElement.clientWidth)}_(P,"_observer",null),_(P,"_observedCanvases",new Map);var x=(t,e)=>"reverse"===t?e.Mode.Reverse:"bounce"===t?e.Mode.Bounce:"reverse-bounce"===t?e.Mode.ReverseBounce:e.Mode.Forward,R=(t,e)=>"contain"===t?e.Fit.Contain:"cover"===t?e.Fit.Cover:"fill"===t?e.Fit.Fill:"fit-height"===t?e.Fit.FitHeight:"fit-width"===t?e.Fit.FitWidth:e.Fit.None,$=(t,e)=>{let n=new e.VectorFloat;return n.push_back(t[0]),n.push_back(t[1]),n},W=(t,e)=>{let n=new e.VectorFloat;return 2!==t.length||(n.push_back(t[0]),n.push_back(t[1])),n},j=(t,e)=>{var n,i;return t?{align:$(null!=(n=t.align)?n:[.5,.5],e),fit:R(null!=(i=t.fit)?i:"contain",e)}:e.createDefaultLayout()},z=class t{constructor(e){var n,i,r;_(this,"_canvas"),_(this,"_context",null),_(this,"_eventManager"),_(this,"_animationFrameId",null),_(this,"_frameManager"),_(this,"_dotLottieCore",null),_(this,"_renderConfig",{}),_(this,"_isFrozen",!1),_(this,"_backgroundColor",null),_(this,"_pointerUpMethod"),_(this,"_pointerDownMethod"),_(this,"_pointerMoveMethod"),_(this,"_pointerEnterMethod"),_(this,"_pointerExitMethod"),this._canvas=e.canvas,this._context=this._canvas.getContext("2d"),this._eventManager=new S,this._frameManager=new y,this._renderConfig=f(c({},e.renderConfig),{devicePixelRatio:(null==(n=e.renderConfig)?void 0:n.devicePixelRatio)||T(),freezeOnOffscreen:null==(r=null==(i=e.renderConfig)?void 0:i.freezeOnOffscreen)||r}),E.load().then(n=>{var i,r,a,o,s,l,h,d;t._wasmModule=n,this._dotLottieCore=new n.DotLottiePlayer({themeId:null!=(i=e.themeId)?i:"",autoplay:null!=(r=e.autoplay)&&r,backgroundColor:0,loopAnimation:null!=(a=e.loop)&&a,mode:x(null!=(o=e.mode)?o:"forward",n),segment:W(null!=(s=e.segment)?s:[],n),speed:null!=(l=e.speed)?l:1,useFrameInterpolation:null==(h=e.useFrameInterpolation)||h,marker:null!=(d=e.marker)?d:"",layout:j(e.layout,n)}),this._eventManager.dispatch({type:"ready"}),e.data?this._loadFromData(e.data):e.src&&this._loadFromSrc(e.src),e.backgroundColor&&this.setBackgroundColor(e.backgroundColor)}).catch(t=>{this._eventManager.dispatch({type:"loadError",error:Error(`Failed to load wasm module: ${t}`)})}),this._pointerUpMethod=this._onPointerUp.bind(this),this._pointerDownMethod=this._onPointerDown.bind(this),this._pointerMoveMethod=this._onPointerMove.bind(this),this._pointerEnterMethod=this._onPointerEnter.bind(this),this._pointerExitMethod=this._onPointerLeave.bind(this)}_dispatchError(t){console.error(t),this._eventManager.dispatch({type:"loadError",error:Error(t)})}_fetchData(t){return m(this,null,function*(){let e=yield fetch(t);if(!e.ok)throw Error(`Failed to fetch animation data from URL: ${t}. ${e.status}: ${e.statusText}`);let n=yield e.arrayBuffer();return D(n)?n:new TextDecoder().decode(n)})}_loadFromData(t){if(null===this._dotLottieCore)return;let e=this._canvas.width,n=this._canvas.height,i=!1;if("string"==typeof t){if(!A(t))return void this._dispatchError("Invalid Lottie JSON string: The provided string does not conform to the Lottie JSON format.");i=this._dotLottieCore.loadAnimationData(t,e,n)}else if(t instanceof ArrayBuffer){if(!D(t))return void this._dispatchError("Invalid dotLottie ArrayBuffer: The provided ArrayBuffer does not conform to the dotLottie format.");i=this._dotLottieCore.loadDotLottieData(t,e,n)}else{if("object"!=typeof t)return void this._dispatchError(`Unsupported data type for animation data. Expected:
|
|
3
3
|
- string (Lottie JSON),
|
|
4
4
|
- ArrayBuffer (dotLottie),
|