NeahNew/.next/server/app/api/parse-email/route.js
2025-05-06 23:01:34 +02:00

1 line
25 KiB
JavaScript

(()=>{var e={};e.id=3080,e.ids=[3080],e.modules={3295:e=>{"use strict";e.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},4573:e=>{"use strict";e.exports=require("node:buffer")},10846:e=>{"use strict";e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},27910:e=>{"use strict";e.exports=require("stream")},29294:e=>{"use strict";e.exports=require("next/dist/server/app-render/work-async-storage.external.js")},32325:e=>{"use strict";e.exports=require("jsdom")},33581:(e,t,r)=>{"use strict";r.r(t),r.d(t,{patchFetch:()=>E,routeModule:()=>h,serverHooks:()=>T,workAsyncStorage:()=>g,workUnitAsyncStorage:()=>y});var n={};r.r(n),r.d(n,{POST:()=>f});var o=r(96559),i=r(48088),a=r(37719),l=r(32190),s=r(44415),c=r.n(s);function u(e){if(!e)return"";try{return c().sanitize(e,{ADD_ATTR:["style","class","id","align","valign","colspan","rowspan","cellspacing","cellpadding","bgcolor"]}).replace(/<!--\[if\s+gte\s+mso/g,"\x3c!--[if gte mso").replace(/(src|background)="(?!http|data|https|cid)/gi,'$1="https://')}catch(t){return console.error("Error sanitizing HTML:",t),e.replace(/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,"").replace(/on\w+="[^"]*"/g,"").replace(/(javascript|jscript|vbscript|mocha):/gi,"removed:")}}c().removeAllHooks(),c().setConfig({ADD_TAGS:["html","head","body","style","link","meta","title","table","caption","col","colgroup","thead","tbody","tfoot","tr","td","th","div","span","img","br","hr","section","article","header","footer","h1","h2","h3","h4","h5","h6","p","blockquote","pre","code","ul","ol","li","dl","dt","dd","a","b","i","u","em","strong","del","ins","mark","small","sub","sup","q","abbr","font"],ADD_ATTR:["style","class","id","name","href","src","alt","title","width","height","border","cellspacing","cellpadding","bgcolor","background","color","align","valign","dir","lang","target","rel","charset","media","colspan","rowspan","scope","span","size","face","hspace","vspace","data-*","start","type","value","cite","datetime","wrap","summary"],KEEP_CONTENT:!0,WHOLE_DOCUMENT:!1,ALLOW_DATA_ATTR:!0,ALLOW_UNKNOWN_PROTOCOLS:!0,FORBID_TAGS:["script","iframe","object","embed","form","input","button","select","textarea"],FORBID_ATTR:["onerror","onload","onclick","onmouseover","onmouseout"],FORCE_BODY:!1,USE_PROFILES:{html:!0}});var p=r(29908);function m(e){if(!e)return null;try{if(Array.isArray(e))return e.map(e=>e.address||"").join(", ");if("object"==typeof e)return e.address||null;return null}catch(e){return console.error("Error formatting addresses:",e),null}}async function d(e){try{let t=await (0,p.simpleParser)(e);return{subject:t.subject||null,from:m(t.from),to:m(t.to),cc:m(t.cc),bcc:m(t.bcc),date:t.date||null,html:t.html?u(t.html):null,text:t.text||null,attachments:t.attachments||[],headers:Object.fromEntries(t.headers)}}catch(e){throw console.error("Error parsing email:",e),e}}async function f(e){try{let t=await e.json();if(!t.email)return l.NextResponse.json({error:"Missing email content"},{status:400});let r=await d(t.email);return r.html&&(r.html=u(r.html)),l.NextResponse.json(r)}catch(e){return console.error("Error parsing email:",e),l.NextResponse.json({error:"Failed to parse email",details:e instanceof Error?e.message:String(e)},{status:500})}}let h=new o.AppRouteRouteModule({definition:{kind:i.RouteKind.APP_ROUTE,page:"/api/parse-email/route",pathname:"/api/parse-email",filename:"route",bundlePath:"app/api/parse-email/route"},resolvedPagePath:"/Users/alma/Documents/NeahNew/app/api/parse-email/route.ts",nextConfigOutput:"",userland:n}),{workAsyncStorage:g,workUnitAsyncStorage:y,serverHooks:T}=h;function E(){return(0,a.patchFetch)({workAsyncStorage:g,workUnitAsyncStorage:y})}},33873:e=>{"use strict";e.exports=require("path")},41204:e=>{"use strict";e.exports=require("string_decoder")},44415:(e,t,r)=>{function n(e){return e&&e.default||e}e.exports=global.DOMPurify=global.DOMPurify||("undefined"!=typeof window?n(r(57129)):function(){let e=n(r(57129)),{JSDOM:t}=n(r(32325)),{window:o}=new t("<!DOCTYPE html>");return e(o)}())},44870:e=>{"use strict";e.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},55511:e=>{"use strict";e.exports=require("crypto")},57075:e=>{"use strict";e.exports=require("node:stream")},57129:e=>{"use strict";let{entries:t,setPrototypeOf:r,isFrozen:n,getPrototypeOf:o,getOwnPropertyDescriptor:i}=Object,{freeze:a,seal:l,create:s}=Object,{apply:c,construct:u}="undefined"!=typeof Reflect&&Reflect;a||(a=function(e){return e}),l||(l=function(e){return e}),c||(c=function(e,t,r){return e.apply(t,r)}),u||(u=function(e,t){return new e(...t)});let p=x(Array.prototype.forEach),m=x(Array.prototype.lastIndexOf),d=x(Array.prototype.pop),f=x(Array.prototype.push),h=x(Array.prototype.splice),g=x(String.prototype.toLowerCase),y=x(String.prototype.toString),T=x(String.prototype.match),E=x(String.prototype.replace),b=x(String.prototype.indexOf),A=x(String.prototype.trim),_=x(Object.prototype.hasOwnProperty),N=x(RegExp.prototype.test),S=($=TypeError,function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return u($,t)});function x(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var r=arguments.length,n=Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];return c(e,t,n)}}function w(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:g;r&&r(e,null);let i=t.length;for(;i--;){let r=t[i];if("string"==typeof r){let e=o(r);e!==r&&(n(t)||(t[i]=e),r=e)}e[r]=!0}return e}function v(e){let r=s(null);for(let[n,o]of t(e))_(e,n)&&(Array.isArray(o)?r[n]=function(e){for(let t=0;t<e.length;t++)_(e,t)||(e[t]=null);return e}(o):o&&"object"==typeof o&&o.constructor===Object?r[n]=v(o):r[n]=o);return r}function O(e,t){for(;null!==e;){let r=i(e,t);if(r){if(r.get)return x(r.get);if("function"==typeof r.value)return x(r.value)}e=o(e)}return function(){return null}}let R=a(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),D=a(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),k=a(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),L=a(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),C=a(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),I=a(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),M=a(["#text"]),U=a(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),P=a(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),z=a(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),F=a(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),H=l(/\{\{[\w\W]*|[\w\W]*\}\}/gm),j=l(/<%[\w\W]*|[\w\W]*%>/gm),W=l(/\$\{[\w\W]*/gm),G=l(/^data-[\-\w.\u00B7-\uFFFF]+$/),B=l(/^aria-[\-\w]+$/),q=l(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Y=l(/^(?:\w+script|data):/i),K=l(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),X=l(/^html$/i);var $,V=Object.freeze({__proto__:null,ARIA_ATTR:B,ATTR_WHITESPACE:K,CUSTOM_ELEMENT:l(/^[a-z][.\w]*(-[.\w]+)+$/i),DATA_ATTR:G,DOCTYPE_NAME:X,ERB_EXPR:j,IS_ALLOWED_URI:q,IS_SCRIPT_OR_DATA:Y,MUSTACHE_EXPR:H,TMPLIT_EXPR:W});let Z={element:1,text:3,progressingInstruction:7,comment:8,document:9},J=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let r=null,n="data-tt-policy-suffix";t&&t.hasAttribute(n)&&(r=t.getAttribute(n));let o="dompurify"+(r?"#"+r:"");try{return e.createPolicy(o,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+o+" could not be created."),null}},Q=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};e.exports=function e(){let r,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"undefined"==typeof window?null:window,o=t=>e(t);if(o.version="3.2.5",o.removed=[],!n||!n.document||n.document.nodeType!==Z.document||!n.Element)return o.isSupported=!1,o;let{document:i}=n,l=i,c=l.currentScript,{DocumentFragment:u,HTMLTemplateElement:x,Node:H,Element:j,NodeFilter:W,NamedNodeMap:G=n.NamedNodeMap||n.MozNamedAttrMap,HTMLFormElement:B,DOMParser:Y,trustedTypes:K}=n,$=j.prototype,ee=O($,"cloneNode"),et=O($,"remove"),er=O($,"nextSibling"),en=O($,"childNodes"),eo=O($,"parentNode");if("function"==typeof x){let e=i.createElement("template");e.content&&e.content.ownerDocument&&(i=e.content.ownerDocument)}let ei="",{implementation:ea,createNodeIterator:el,createDocumentFragment:es,getElementsByTagName:ec}=i,{importNode:eu}=l,ep=Q();o.isSupported="function"==typeof t&&"function"==typeof eo&&ea&&void 0!==ea.createHTMLDocument;let{MUSTACHE_EXPR:em,ERB_EXPR:ed,TMPLIT_EXPR:ef,DATA_ATTR:eh,ARIA_ATTR:eg,IS_SCRIPT_OR_DATA:ey,ATTR_WHITESPACE:eT,CUSTOM_ELEMENT:eE}=V,{IS_ALLOWED_URI:eb}=V,eA=null,e_=w({},[...R,...D,...k,...C,...M]),eN=null,eS=w({},[...U,...P,...z,...F]),ex=Object.seal(s(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),ew=null,ev=null,eO=!0,eR=!0,eD=!1,ek=!0,eL=!1,eC=!0,eI=!1,eM=!1,eU=!1,eP=!1,ez=!1,eF=!1,eH=!0,ej=!1,eW=!0,eG=!1,eB={},eq=null,eY=w({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),eK=null,eX=w({},["audio","video","img","source","image","track"]),e$=null,eV=w({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),eZ="http://www.w3.org/1998/Math/MathML",eJ="http://www.w3.org/2000/svg",eQ="http://www.w3.org/1999/xhtml",e0=eQ,e1=!1,e2=null,e3=w({},[eZ,eJ,eQ],y),e9=w({},["mi","mo","mn","ms","mtext"]),e5=w({},["annotation-xml"]),e4=w({},["title","style","font","a","script"]),e8=null,e7=["application/xhtml+xml","text/html"],e6=null,te=null,tt=i.createElement("form"),tr=function(e){return e instanceof RegExp||e instanceof Function},tn=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!te||te!==e){if(e&&"object"==typeof e||(e={}),e=v(e),e6="application/xhtml+xml"===(e8=-1===e7.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE)?y:g,eA=_(e,"ALLOWED_TAGS")?w({},e.ALLOWED_TAGS,e6):e_,eN=_(e,"ALLOWED_ATTR")?w({},e.ALLOWED_ATTR,e6):eS,e2=_(e,"ALLOWED_NAMESPACES")?w({},e.ALLOWED_NAMESPACES,y):e3,e$=_(e,"ADD_URI_SAFE_ATTR")?w(v(eV),e.ADD_URI_SAFE_ATTR,e6):eV,eK=_(e,"ADD_DATA_URI_TAGS")?w(v(eX),e.ADD_DATA_URI_TAGS,e6):eX,eq=_(e,"FORBID_CONTENTS")?w({},e.FORBID_CONTENTS,e6):eY,ew=_(e,"FORBID_TAGS")?w({},e.FORBID_TAGS,e6):{},ev=_(e,"FORBID_ATTR")?w({},e.FORBID_ATTR,e6):{},eB=!!_(e,"USE_PROFILES")&&e.USE_PROFILES,eO=!1!==e.ALLOW_ARIA_ATTR,eR=!1!==e.ALLOW_DATA_ATTR,eD=e.ALLOW_UNKNOWN_PROTOCOLS||!1,ek=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,eL=e.SAFE_FOR_TEMPLATES||!1,eC=!1!==e.SAFE_FOR_XML,eI=e.WHOLE_DOCUMENT||!1,eP=e.RETURN_DOM||!1,ez=e.RETURN_DOM_FRAGMENT||!1,eF=e.RETURN_TRUSTED_TYPE||!1,eU=e.FORCE_BODY||!1,eH=!1!==e.SANITIZE_DOM,ej=e.SANITIZE_NAMED_PROPS||!1,eW=!1!==e.KEEP_CONTENT,eG=e.IN_PLACE||!1,eb=e.ALLOWED_URI_REGEXP||q,e0=e.NAMESPACE||eQ,e9=e.MATHML_TEXT_INTEGRATION_POINTS||e9,e5=e.HTML_INTEGRATION_POINTS||e5,ex=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&tr(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(ex.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&tr(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(ex.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(ex.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),eL&&(eR=!1),ez&&(eP=!0),eB&&(eA=w({},M),eN=[],!0===eB.html&&(w(eA,R),w(eN,U)),!0===eB.svg&&(w(eA,D),w(eN,P),w(eN,F)),!0===eB.svgFilters&&(w(eA,k),w(eN,P),w(eN,F)),!0===eB.mathMl&&(w(eA,C),w(eN,z),w(eN,F))),e.ADD_TAGS&&(eA===e_&&(eA=v(eA)),w(eA,e.ADD_TAGS,e6)),e.ADD_ATTR&&(eN===eS&&(eN=v(eN)),w(eN,e.ADD_ATTR,e6)),e.ADD_URI_SAFE_ATTR&&w(e$,e.ADD_URI_SAFE_ATTR,e6),e.FORBID_CONTENTS&&(eq===eY&&(eq=v(eq)),w(eq,e.FORBID_CONTENTS,e6)),eW&&(eA["#text"]=!0),eI&&w(eA,["html","head","body"]),eA.table&&(w(eA,["tbody"]),delete ew.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw S('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw S('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');ei=(r=e.TRUSTED_TYPES_POLICY).createHTML("")}else void 0===r&&(r=J(K,c)),null!==r&&"string"==typeof ei&&(ei=r.createHTML(""));a&&a(e),te=e}},to=w({},[...D,...k,...L]),ti=w({},[...C,...I]),ta=function(e){let t=eo(e);t&&t.tagName||(t={namespaceURI:e0,tagName:"template"});let r=g(e.tagName),n=g(t.tagName);return!!e2[e.namespaceURI]&&(e.namespaceURI===eJ?t.namespaceURI===eQ?"svg"===r:t.namespaceURI===eZ?"svg"===r&&("annotation-xml"===n||e9[n]):!!to[r]:e.namespaceURI===eZ?t.namespaceURI===eQ?"math"===r:t.namespaceURI===eJ?"math"===r&&e5[n]:!!ti[r]:e.namespaceURI===eQ?(t.namespaceURI!==eJ||!!e5[n])&&(t.namespaceURI!==eZ||!!e9[n])&&!ti[r]&&(e4[r]||!to[r]):"application/xhtml+xml"===e8&&!!e2[e.namespaceURI])},tl=function(e){f(o.removed,{element:e});try{eo(e).removeChild(e)}catch(t){et(e)}},ts=function(e,t){try{f(o.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){f(o.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e)if(eP||ez)try{tl(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},tc=function(e){let t=null,n=null;if(eU)e="<remove></remove>"+e;else{let t=T(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===e8&&e0===eQ&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");let o=r?r.createHTML(e):e;if(e0===eQ)try{t=new Y().parseFromString(o,e8)}catch(e){}if(!t||!t.documentElement){t=ea.createDocument(e0,"template",null);try{t.documentElement.innerHTML=e1?ei:o}catch(e){}}let a=t.body||t.documentElement;return(e&&n&&a.insertBefore(i.createTextNode(n),a.childNodes[0]||null),e0===eQ)?ec.call(t,eI?"html":"body")[0]:eI?t.documentElement:a},tu=function(e){return el.call(e.ownerDocument||e,e,W.SHOW_ELEMENT|W.SHOW_COMMENT|W.SHOW_TEXT|W.SHOW_PROCESSING_INSTRUCTION|W.SHOW_CDATA_SECTION,null)},tp=function(e){return e instanceof B&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof G)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},tm=function(e){return"function"==typeof H&&e instanceof H};function td(e,t,r){p(e,e=>{e.call(o,t,r,te)})}let tf=function(e){let t=null;if(td(ep.beforeSanitizeElements,e,null),tp(e))return tl(e),!0;let r=e6(e.nodeName);if(td(ep.uponSanitizeElement,e,{tagName:r,allowedTags:eA}),e.hasChildNodes()&&!tm(e.firstElementChild)&&N(/<[/\w!]/g,e.innerHTML)&&N(/<[/\w!]/g,e.textContent)||e.nodeType===Z.progressingInstruction||eC&&e.nodeType===Z.comment&&N(/<[/\w]/g,e.data))return tl(e),!0;if(!eA[r]||ew[r]){if(!ew[r]&&tg(r)&&(ex.tagNameCheck instanceof RegExp&&N(ex.tagNameCheck,r)||ex.tagNameCheck instanceof Function&&ex.tagNameCheck(r)))return!1;if(eW&&!eq[r]){let t=eo(e)||e.parentNode,r=en(e)||e.childNodes;if(r&&t){let n=r.length;for(let o=n-1;o>=0;--o){let n=ee(r[o],!0);n.__removalCount=(e.__removalCount||0)+1,t.insertBefore(n,er(e))}}}return tl(e),!0}return e instanceof j&&!ta(e)||("noscript"===r||"noembed"===r||"noframes"===r)&&N(/<\/no(script|embed|frames)/i,e.innerHTML)?(tl(e),!0):(eL&&e.nodeType===Z.text&&(t=e.textContent,p([em,ed,ef],e=>{t=E(t,e," ")}),e.textContent!==t&&(f(o.removed,{element:e.cloneNode()}),e.textContent=t)),td(ep.afterSanitizeElements,e,null),!1)},th=function(e,t,r){if(eH&&("id"===t||"name"===t)&&(r in i||r in tt))return!1;if(eR&&!ev[t]&&N(eh,t));else if(eO&&N(eg,t));else if(!eN[t]||ev[t]){if(!(tg(e)&&(ex.tagNameCheck instanceof RegExp&&N(ex.tagNameCheck,e)||ex.tagNameCheck instanceof Function&&ex.tagNameCheck(e))&&(ex.attributeNameCheck instanceof RegExp&&N(ex.attributeNameCheck,t)||ex.attributeNameCheck instanceof Function&&ex.attributeNameCheck(t))||"is"===t&&ex.allowCustomizedBuiltInElements&&(ex.tagNameCheck instanceof RegExp&&N(ex.tagNameCheck,r)||ex.tagNameCheck instanceof Function&&ex.tagNameCheck(r))))return!1}else if(e$[t]);else if(N(eb,E(r,eT,"")));else if(("src"===t||"xlink:href"===t||"href"===t)&&"script"!==e&&0===b(r,"data:")&&eK[e]);else if(eD&&!N(ey,E(r,eT,"")));else if(r)return!1;return!0},tg=function(e){return"annotation-xml"!==e&&T(e,eE)},ty=function(e){td(ep.beforeSanitizeAttributes,e,null);let{attributes:t}=e;if(!t||tp(e))return;let n={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:eN,forceKeepAttr:void 0},i=t.length;for(;i--;){let{name:a,namespaceURI:l,value:s}=t[i],c=e6(a),u="value"===a?s:A(s);if(n.attrName=c,n.attrValue=u,n.keepAttr=!0,n.forceKeepAttr=void 0,td(ep.uponSanitizeAttribute,e,n),u=n.attrValue,ej&&("id"===c||"name"===c)&&(ts(a,e),u="user-content-"+u),eC&&N(/((--!?|])>)|<\/(style|title)/i,u)){ts(a,e);continue}if(n.forceKeepAttr||(ts(a,e),!n.keepAttr))continue;if(!ek&&N(/\/>/i,u)){ts(a,e);continue}eL&&p([em,ed,ef],e=>{u=E(u,e," ")});let m=e6(e.nodeName);if(th(m,c,u)){if(r&&"object"==typeof K&&"function"==typeof K.getAttributeType)if(l);else switch(K.getAttributeType(m,c)){case"TrustedHTML":u=r.createHTML(u);break;case"TrustedScriptURL":u=r.createScriptURL(u)}try{l?e.setAttributeNS(l,a,u):e.setAttribute(a,u),tp(e)?tl(e):d(o.removed)}catch(e){}}}td(ep.afterSanitizeAttributes,e,null)},tT=function e(t){let r=null,n=tu(t);for(td(ep.beforeSanitizeShadowDOM,t,null);r=n.nextNode();)td(ep.uponSanitizeShadowNode,r,null),tf(r),ty(r),r.content instanceof u&&e(r.content);td(ep.afterSanitizeShadowDOM,t,null)};return o.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=null,i=null,a=null,s=null;if((e1=!e)&&(e="\x3c!--\x3e"),"string"!=typeof e&&!tm(e))if("function"==typeof e.toString){if("string"!=typeof(e=e.toString()))throw S("dirty is not a string, aborting")}else throw S("toString is not a function");if(!o.isSupported)return e;if(eM||tn(t),o.removed=[],"string"==typeof e&&(eG=!1),eG){if(e.nodeName){let t=e6(e.nodeName);if(!eA[t]||ew[t])throw S("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof H)(i=(n=tc("\x3c!----\x3e")).ownerDocument.importNode(e,!0)).nodeType===Z.element&&"BODY"===i.nodeName||"HTML"===i.nodeName?n=i:n.appendChild(i);else{if(!eP&&!eL&&!eI&&-1===e.indexOf("<"))return r&&eF?r.createHTML(e):e;if(!(n=tc(e)))return eP?null:eF?ei:""}n&&eU&&tl(n.firstChild);let c=tu(eG?e:n);for(;a=c.nextNode();)tf(a),ty(a),a.content instanceof u&&tT(a.content);if(eG)return e;if(eP){if(ez)for(s=es.call(n.ownerDocument);n.firstChild;)s.appendChild(n.firstChild);else s=n;return(eN.shadowroot||eN.shadowrootmode)&&(s=eu.call(l,s,!0)),s}let m=eI?n.outerHTML:n.innerHTML;return eI&&eA["!doctype"]&&n.ownerDocument&&n.ownerDocument.doctype&&n.ownerDocument.doctype.name&&N(X,n.ownerDocument.doctype.name)&&(m="<!DOCTYPE "+n.ownerDocument.doctype.name+">\n"+m),eL&&p([em,ed,ef],e=>{m=E(m,e," ")}),r&&eF?r.createHTML(m):m},o.setConfig=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};tn(e),eM=!0},o.clearConfig=function(){te=null,eM=!1},o.isValidAttribute=function(e,t,r){return te||tn({}),th(e6(e),e6(t),r)},o.addHook=function(e,t){"function"==typeof t&&f(ep[e],t)},o.removeHook=function(e,t){if(void 0!==t){let r=m(ep[e],t);return -1===r?void 0:h(ep[e],r,1)[0]}return d(ep[e])},o.removeHooks=function(e){ep[e]=[]},o.removeAllHooks=function(){ep=Q()},o}()},63033:e=>{"use strict";e.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},78335:()=>{},79428:e=>{"use strict";e.exports=require("buffer")},96487:()=>{}};var t=require("../../../webpack-runtime.js");t.C(e);var r=e=>t(t.s=e),n=t.X(0,[4243,580,8376,9908],()=>r(33581));module.exports=n})();