(globalThis["TURBOPACK_remote_chunk_loading_global_wx-next-web"]||(globalThis["TURBOPACK_remote_chunk_loading_global_wx-next-web"]=[])).push(["object"==typeof document?document.currentScript:void 0,582796,e=>{"use strict";var t=e.i(902875),n=e.i(247865),r=e.i(64412),o=e.i(181462),i=e.i(725287),a=e.i(498076),l=e.i(695881),c=e.i(381477),s=e.i(581014);function u(e,t){this.v=e,this.k=t}function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);ntypeof Reflect&&Reflect,S=A.apply,x=A.construct;b||(b=function(e){return e}),v||(v=function(e){return e}),S||(S=function(e,t){for(var n=arguments.length,r=Array(n>2?n-2:0),o=2;o1?t-1:0),r=1;r1?n-1:0),o=1;o2&&void 0!==arguments[2]?arguments[2]:R;if(d&&d(e,null),!D(t))return e;let r=t.length;for(;r--;){let o=t[r];if("string"==typeof o){let e=n(o);e!==o&&(h(t)||(t[r]=e),o=e)}e[o]=!0}return e}function V(e){let t=T(null);for(let r of p(e)){var n=function(e){if(Array.isArray(e))return e}(r)||function(e){var t=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var n,r,o,i,a=[],l=!0,c=!1;try{o=(t=t.call(e)).next,!1;for(;!(l=(n=o.call(t)).done)&&(a.push(n.value),2!==a.length);l=!0);}catch(e){c=!0,r=e}finally{try{if(!l&&null!=t.return&&(i=t.return(),Object(i)!==i))return}finally{if(c)throw r}}return a}}(r)||function(e){if(e){if("string"==typeof e)return f(e,2);var t=({}).toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?f(e,2):void 0}}(r)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}();let o=n[0],i=n[1];Y(e,o)&&(D(i)?t[o]=function(e){for(let t=0;t/g),em=v(/\${[\w\W]*/g),ep=v(/^data-[\-\w.\u00B7-\uFFFF]+$/),ed=v(/^aria-[\-\w]+$/),eh=v(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),ey=v(/^(?:\w+script|data):/i),eg=v(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),eb=v(/^html$/i),ev=v(/^[a-z][.\w]*(-[.\w]+)+$/i),eT=v(//i),ew=b(X({},["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"])),eN=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null,r="data-tt-policy-suffix";t&&t.hasAttribute(r)&&(n=t.getAttribute(r));let o="dompurify"+(n?"#"+n:"");try{return e.createPolicy(o,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+o+" could not be created."),null}},e_=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},eE=function(e,t,n,r){return Y(e,t)&&D(e[t])?X(r.base?V(r.base):{},e[t],r.transform):n},eO=function(e,t,n){let r=Y(e,t)?e[t]:void 0;return r&&"object"==typeof r?V(r):n()};var ek=function e(){let t,n,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"u"e(t);if(o.version="3.4.17",o.removed=[],!r||!r.document||9!==r.document.nodeType||!r.Element)return o.isSupported=!1,o;let i=r.document,a=i,l=a.currentScript;r.DocumentFragment;let c=r.HTMLTemplateElement,s=r.Node,u=r.Element,f=r.NodeFilter;void 0===r.NamedNodeMap&&(r.NamedNodeMap||r.MozNamedAttrMap),r.HTMLFormElement;let m=r.DOMParser,d=r.trustedTypes,h=u.prototype,A=J(h,"cloneNode"),S=J(h,"remove"),x=J(h,"removeAttributeNode"),$=J(h,"nextSibling"),ek=J(h,"childNodes"),eD=J(h,"parentNode"),eC=J(h,"shadowRoot"),eL=J(h,"attributes"),eI=s&&s.prototype?J(s.prototype,"nodeType"):null,eR=s&&s.prototype?J(s.prototype,"nodeName"):null,eM=s&&s.prototype?J(s.prototype,"ownerDocument"):null,ej=function(e){return eI?eI(e):e.nodeType},eP=function(e){return eR?eR(e):e.nodeName},ez=function(e,t){for(;null!==e;){let n=g(e,t);if(n)return n.get?Z(n.get):null;e=y(e)}return null}(h,"namespaceURI"),eU=function(e){return ez?ez(e):e.namespaceURI};if("function"==typeof c){let e=i.createElement("template");e.content&&e.content.ownerDocument&&(i=e.content.ownerDocument)}let eF="",eH=!1,eB=0,eW=function(){if(eB>0)throw q('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},eY=function(e){eW(),eB++;try{return t.createHTML(e)}finally{eB--}},eK=function(e){eW(),eB++;try{return t.createScriptURL(e)}finally{eB--}},eG=i,eq=eG.implementation,eZ=eG.createNodeIterator,e$=eG.createDocumentFragment,eX=eG.getElementsByTagName,eV=a.importNode,eJ=e_();o.isSupported="function"==typeof p&&"function"==typeof eD&&eq&&void 0!==eq.createHTMLDocument;let eQ=eh,e0=null,e1=X({},[...Q,...ee,...et,...er,...ei]),e2=null,e8=X({},[...ea,...el,...ec,...es]),e4=Object.seal(T(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}})),e7=null,e6=null,e3=Object.seal(T(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),e9=!0,e5=!0,te=!1,tt=!0,tn=!1,tr=!0,to=!1,ti=!1,ta=null,tl=null,tc=!1,ts=!1,tu=!1,tf=!1,tm=!0,tp=!1,td="user-content-",th=!0,ty=!1,tg=null,tb={},tv=null,tT=X({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]),tA=null,tS=X({},["audio","video","img","source","image","track"]),tx=null,tw=X({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),tN="http://www.w3.org/1998/Math/MathML",t_="http://www.w3.org/2000/svg",tE="http://www.w3.org/1999/xhtml",tO=tE,tk=!1,tD=null,tC=X({},[tN,t_,tE],M),tL=b(["mi","mo","mn","ms","mtext"]),tI=X({},tL),tR=b(["annotation-xml"]),tM=X({},tR),tj=X({},["title","style","font","a","script"]),tP=null,tz=["application/xhtml+xml","text/html"],tU=null,tF=null,tH=i.createElement("form"),tB=function(e){return e instanceof RegExp||e instanceof Function},tW=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(tF&&tF===e)return;e&&"object"==typeof e||(e={}),e=V(e),tU="application/xhtml+xml"===(tP=-1===tz.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE)?M:R,e0=eE(e,"ALLOWED_TAGS",e1,{transform:tU}),e2=eE(e,"ALLOWED_ATTR",e8,{transform:tU}),tD=eE(e,"ALLOWED_NAMESPACES",tC,{transform:M}),tx=eE(e,"ADD_URI_SAFE_ATTR",tw,{transform:tU,base:tw}),tA=eE(e,"ADD_DATA_URI_TAGS",tS,{transform:tU,base:tS}),tv=eE(e,"FORBID_CONTENTS",tT,{transform:tU}),e7=eE(e,"FORBID_TAGS",V({}),{transform:tU}),e6=eE(e,"FORBID_ATTR",V({}),{transform:tU}),tb=!!Y(e,"USE_PROFILES")&&(e.USE_PROFILES&&"object"==typeof e.USE_PROFILES?V(e.USE_PROFILES):e.USE_PROFILES),e9=!1!==e.ALLOW_ARIA_ATTR,e5=!1!==e.ALLOW_DATA_ATTR,te=e.ALLOW_UNKNOWN_PROTOCOLS||!1,tt=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,tn=e.SAFE_FOR_TEMPLATES||!1,tr=!1!==e.SAFE_FOR_XML,to=e.WHOLE_DOCUMENT||!1,ts=e.RETURN_DOM||!1,tu=e.RETURN_DOM_FRAGMENT||!1,tf=e.RETURN_TRUSTED_TYPE||!1,tc=e.FORCE_BODY||!1,tm=!1!==e.SANITIZE_DOM,tp=e.SANITIZE_NAMED_PROPS||!1,th=!1!==e.KEEP_CONTENT,ty=e.IN_PLACE||!1,eQ=!function(e){try{return G(e,""),!0}catch(e){return!1}}(e.ALLOWED_URI_REGEXP)?eh:e.ALLOWED_URI_REGEXP,tO="string"==typeof e.NAMESPACE?e.NAMESPACE:tE,tI=eO(e,"MATHML_TEXT_INTEGRATION_POINTS",()=>X({},tL)),tM=eO(e,"HTML_INTEGRATION_POINTS",()=>X({},tR));let r=eO(e,"CUSTOM_ELEMENT_HANDLING",()=>T(null));if(e4=T(null),Y(r,"tagNameCheck")&&tB(r.tagNameCheck)&&(e4.tagNameCheck=r.tagNameCheck),Y(r,"attributeNameCheck")&&tB(r.attributeNameCheck)&&(e4.attributeNameCheck=r.attributeNameCheck),Y(r,"allowCustomizedBuiltInElements")&&"boolean"==typeof r.allowCustomizedBuiltInElements&&(e4.allowCustomizedBuiltInElements=r.allowCustomizedBuiltInElements),v(e4),tn&&(e5=!1),tu&&(ts=!0),tb&&(e0=X({},ei),e2=T(null),!0===tb.html&&(X(e0,Q),X(e2,ea)),!0===tb.svg&&(X(e0,ee),X(e2,el),X(e2,es)),!0===tb.svgFilters&&(X(e0,et),X(e2,el),X(e2,es)),!0===tb.mathMl&&(X(e0,er),X(e2,ec),X(e2,es))),e3.tagCheck=null,e3.attributeCheck=null,Y(e,"ADD_TAGS")&&("function"==typeof e.ADD_TAGS?e3.tagCheck=e.ADD_TAGS:D(e.ADD_TAGS)&&(e0===e1&&(e0=V(e0)),X(e0,e.ADD_TAGS,tU))),Y(e,"ADD_ATTR")&&("function"==typeof e.ADD_ATTR?e3.attributeCheck=e.ADD_ATTR:D(e.ADD_ATTR)&&(e2===e8&&(e2=V(e2)),X(e2,e.ADD_ATTR,tU))),Y(e,"ADD_FORBID_CONTENTS")&&D(e.ADD_FORBID_CONTENTS)&&(tv===tT&&(tv=V(tv)),X(tv,e.ADD_FORBID_CONTENTS,tU)),th&&(e0["#text"]=!0),to&&X(e0,["html","head","body"]),e0.table&&(X(e0,["tbody"]),delete e7.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw q('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw q('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');let n=t;t=e.TRUSTED_TYPES_POLICY;try{eF=eY("")}catch(e){throw t=n,e}}else null===e.TRUSTED_TYPES_POLICY?(t=void 0,eF=""):(void 0===t&&(eH||(n=eN(d,l),eH=!0),t=n),t&&"string"==typeof eF&&(eF=eY("")));b&&b(e),tF=e},tY=X({},[...ee,...et,...en]),tK=X({},[...er,...eo]),tG=function(e){var t,n,r,o,i,a;let l,c,s=eU(e),u=R(eP(e)),f=eD(e);return f&&1===ej(f)?(l={namespaceURI:eU(f)},c=R(eP(f))):(l={namespaceURI:tO},c="template"),!!tD[s]&&(s===t_?(t=l,n=c,t.namespaceURI===tE?"svg"===u:t.namespaceURI===tN?"svg"===u&&("annotation-xml"===n||tI[n]):!!tY[u]):s===tN?(r=l,o=c,r.namespaceURI===tE?"math"===u:r.namespaceURI===t_?"math"===u&&tM[o]:!!tK[u]):s===tE?(i=l,a=c,(i.namespaceURI!==t_||!!tM[a])&&(i.namespaceURI!==tN||!!tI[a])&&!tK[u]&&(tj[u]||!tY[u])):"application/xhtml+xml"===tP&&!!tD[s])},tq=function(e){E(o.removed,{element:e});try{eD(e).removeChild(e)}catch(t){if(S(e),!eD(e))throw q("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},tZ=function(e,t,n){try{x(e,t)}catch(t){try{e.removeAttribute(n)}catch(e){}}},t$=function(e){tQ(e);let t=ek(e);t&&w(O(t),e=>{try{S(e)}catch(e){}});let n=1===ej(e)?eL(e):null;if(n)for(let t=n.length-1;t>=0;--t){let r=n[t],o=r&&r.name;"string"==typeof o&&tZ(e,r,o)}},tX=function(e,t,n){if(!n)try{n=t.getAttributeNode(e)}catch(e){n=null}E(o.removed,{attribute:n||null,from:t});try{n?x(t,n):t.removeAttribute(e)}catch(n){try{t.removeAttribute(e)}catch(e){}}if("is"===e)if(ts||tu)try{tq(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},tV=function(e){let t=eL(e);if(t)for(let n=t.length-1;n>=0;--n){let r=t[n],o=r&&r.name;"string"!=typeof o||e2[tU(o)]||tZ(e,r,o)}},tJ=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=[e];for(;r.length>0;){let e=r.pop();if(!1===t(e))continue;if(n&&1===ej(e)){let t=eC(e);no(t)&&r.push(t)}let o=ek(e);if(o)for(let e=o.length-1;e>=0;--e)r.push(o[e])}},tQ=function(e){tJ(e,e=>{1===ej(e)&&tV(e)})},t0=function(e){let t=[];return tJ(e,e=>{t.push(e)},!0),t},t1=function(e,t){let n=C();w(t0(e),e=>{1===ej(e)&&L(n,e)}),w(t,e=>{1!==ej(e)||I(n,e)||tV(e)})},t2=function(e,t){let n=!1;return w(o.removed,t=>{t.element&&(n=n||t.element===e,tQ(t.element))}),t1(e,t),n},t8=function(e,t){let n=tg,r=null,o=()=>(r||(r=C(),w(t,e=>{L(r,e)})),r);for(let t=0;;t++){let r=t0(e),i=[e],a=!1;if(w(r,e=>{11===ej(e)?E(i,e):a||I(n,e)||(a=I(o(),e))}),!a)return;if(t>=8)throw q("the tree kept changing during in-place sanitization; refusing to return it");w(i,(t,n)=>{t4(t,n>0,e,o())})}},t4=function(e,t,n,r){let o,i=t5(e);for(;o=i.nextNode();)!(!I(r,o)||I(tg,o))&&(t&&na(eJ.uponSanitizeShadowNode,o,null),nf(o,n),nb(o,n),no(o.content)&&nv(o.content))},t7=function(e){tg&&L(tg,e)},t6=function(e,t){return!!tr&&("patchsrc"===e||"for"===e&&"label"!==t&&"output"!==t)},t3=function(e){tr&&tJ(e,e=>{let t=ej(e);if(7===t||8===t&&G(eA,e.data)){try{S(e)}catch(e){}return!1}if(1===t){let t=tU(eP(e));try{e.hasAttribute&&e.hasAttribute("patchsrc")&&e.removeAttribute("patchsrc"),e.hasAttribute&&e.hasAttribute("for")&&t6("for",t)&&e.removeAttribute("for")}catch(e){}}return!0})},t9=function(e){let n=null,r=null;if(tc)e=""+e;else{let t=j(e,/^[\r\n\t ]+/);r=t&&t[0]}"application/xhtml+xml"===tP&&tO===tE&&(e=''+e+"");let o=t?eY(e):e;if(tO===tE)try{n=new m().parseFromString(o,tP)}catch(e){}if(!n||!n.documentElement){n=eq.createDocument(tO,"template",null);try{n.documentElement.innerHTML=tk?eF:o}catch(e){}}let a=n.body||n.documentElement;return(e&&r&&a.insertBefore(i.createTextNode(r),a.childNodes[0]||null),tO===tE)?eX.call(n,to?"html":"body")[0]:to?n.documentElement:a},t5=function(e){let t=eM?eM(e):e.ownerDocument;return eZ.call(t||e,e,f.SHOW_ELEMENT|f.SHOW_COMMENT|f.SHOW_TEXT|f.SHOW_PROCESSING_INSTRUCTION|f.SHOW_CDATA_SECTION,null)},ne=function(e){return e=P(e,eu," "),e=P(e,ef," "),e=P(e,em," ")},nt=function(e){var t;nn(e);let n=null==(t=e.querySelectorAll)?void 0:t.call(e,"template");n&&w(n,e=>{no(e.content)&&nt(e.content)})},nn=function(e){e.normalize();let t=eM?eM(e):e.ownerDocument,n=eZ.call(t||e,e,f.SHOW_TEXT|f.SHOW_COMMENT|f.SHOW_CDATA_SECTION|f.SHOW_PROCESSING_INSTRUCTION,null),r=n.nextNode();for(;r;)r.data=ne(r.data),r=n.nextNode()},nr=function(e){let t=eR?eR(e):null;return"string"==typeof t&&"form"===tU(t)&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||e.attributes!==eL(e)||"function"!=typeof e.removeAttribute||"function"!=typeof e.removeAttributeNode||"function"!=typeof e.getAttributeNode||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes||e.nodeType!==eI(e)||e.childNodes!==ek(e))},no=function(e){if(!eI||"object"!=typeof e||null===e)return!1;try{return 11===eI(e)}catch(e){return!1}},ni=function(e){if(!eI||"object"!=typeof e||null===e)return!1;try{return"number"==typeof eI(e)}catch(e){return!1}};function na(e,t,n){0!==e.length&&w(e,e=>{e.call(o,t,n,tF)})}let nl=function(e,t){if(e instanceof RegExp)return G(e,t);if(e instanceof Function){for(var n=arguments.length,r=Array(n>2?n-2:0),o=2;o=0;--i){let o=e===n?A(r[i],!0):r[i];t.insertBefore(o,$(e))}}}return tq(e),!0},ns=function(e,t,n,r){return 0===e.length?t:t===n||t===r?V(t):t},nu=function(e,t){return e!==t&&null===eD(e)&&(ty&&tQ(e),!0)},nf=function(e,t){if(t7(e),na(eJ.beforeSanitizeElements,e,null),nu(e,t))return!0;if(nr(e))return tq(e),!0;let n=tU(eP(e));if(e0=ns(eJ.uponSanitizeElement,e0,e1,ta),na(eJ.uponSanitizeElement,e,{tagName:n,allowedTags:e0}),nu(e,t))return!0;if(tr&&e.hasChildNodes()&&!ni(e.firstElementChild)&&G(eT,e.textContent)&&G(eT,e.innerHTML)||tr&&ew[n]&&1===ej(e)&&eU(e)===tE&&(ni(e.firstElementChild)||"string"==typeof e.textContent&&G(eT,e.textContent))||7===e.nodeType||tr&&8===e.nodeType&&G(eA,e.data))return tq(e),!0;if(e7[n]||!(e3.tagCheck instanceof Function&&e3.tagCheck(n))&&!e0[n]){let r=nc(e,n,t);return!!(!1===r&&(na(eJ.afterSanitizeElements,e,null),nu(e,t)))||r}if(1===ej(e)&&!tG(e)||("noscript"===n||"noembed"===n||"noframes"===n)&&G(eS,e.innerHTML))return tq(e),!0;if(tn&&3===e.nodeType){let t=ne(e.textContent);e.textContent!==t&&(E(o.removed,{element:e.cloneNode()}),e.textContent=t)}return na(eJ.afterSanitizeElements,e,null),nu(e,t)},nm=function(e,t,n){if(e6[t]||t6(t,e)||tm&&("id"===t||"name"===t)&&(n in i||n in tH))return!1;let r=e2[t]||e3.attributeCheck instanceof Function&&e3.attributeCheck(t,e);return!!(e5&&G(ep,t)||e9&&G(ed,t))||(r?!(!(tx[t]||G(eQ,P(n,eg,"")))&&("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==z(n,"data:")||!tA[e])&&(!te||G(ey,P(n,eg,""))))||!n:nd(e)&&nl(e4.tagNameCheck,e)&&nl(e4.attributeNameCheck,t,e)||"is"===t&&e4.allowCustomizedBuiltInElements&&nl(e4.tagNameCheck,n))},np=X({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),nd=function(e){return!np[R(e)]&&G(ev,e)},nh=function(e,n,r,o){if(t&&"object"==typeof d&&"function"==typeof d.getAttributeType&&!r)switch(d.getAttributeType(e,n)){case"TrustedHTML":return eY(o);case"TrustedScriptURL":return eK(o)}return o},ny=function(e,t,n,r){try{if(n?e.setAttributeNS(n,t,r):e.setAttribute(t,r),nr(e))return tq(e),!1;return!0}catch(n){return tX(t,e),!1}},ng=function(e,t){return!!(tr&&G(/((--!?|])>)|0;){let e=t.pop();if(e.shadow){nv(e.shadow);continue}let n=e.node,r=1===ej(n),o=ek(n);if(o)for(let e=o.length-1;e>=0;--e)t.push({node:o[e],shadow:null});if(r){let e=eR?eR(n):null;if("string"==typeof e&&"template"===tU(e)){let e=n.content;no(e)&&t.push({node:e,shadow:null})}}if(r){let e=eC(n);no(e)&&t.push({node:null,shadow:e},{node:e,shadow:null})}}};return o.sanitize=function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=null,i=null,l=null,c=null;if((tk=!e)&&(e=""),"string"!=typeof e&&!ni(e)&&"string"!=typeof(e=function(e){switch(typeof e){case"string":return e;case"number":return F(e);case"boolean":return H(e);case"bigint":return B?B(e):"0";case"symbol":return W?W(e):"Symbol()";case"undefined":default:return K(e);case"function":case"object":{if(null===e)return K(e);let t=J(e,"toString");if("function"==typeof t){let n=t(e);return"string"==typeof n?n:K(n)}return K(e)}}}(e)))throw q("dirty is not a string, aborting");if(!o.isSupported)return e;ti?(e0=ta,e2=tl):tW(n),(eJ.uponSanitizeElement.length>0||eJ.uponSanitizeAttribute.length>0)&&(e0=V(e0)),eJ.uponSanitizeAttribute.length>0&&(e2=V(e2)),o.removed=[];let s=ty&&"string"!=typeof e&&ni(e),u=[],f=tg;if(s){t3(e);let t=eP(e);if("string"==typeof t){let n=tU(t);if(!e0[n]||e7[n])throw t$(e),q("root node is forbidden and cannot be sanitized in-place")}if(nr(e))throw t$(e),q("root node is clobbered and cannot be sanitized in-place");u=t0(e),tg=C()}else if(ni(e))1===(i=(r=t9("")).ownerDocument.importNode(e,!0)).nodeType&&"BODY"===i.nodeName||"HTML"===i.nodeName?r=i:r.appendChild(i),nT(r);else{if(!ts&&!tn&&!to&&-1===e.indexOf("\n"+p),tn&&(p=ne(p)),t&&tf?eY(p):p},o.setConfig=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};tW(e),ti=!0,ta=e0,tl=e2},o.clearConfig=function(){tF=null,ti=!1,ta=null,tl=null,t=n,eF=""},o.isValidAttribute=function(e,t,n){tF||tW({});let r=tU(e),o=tU(t);return!("string"==typeof n&&(ng(t,n)||!tt&&G(ex,n)))&&nm(r,o,n)},o.addHook=function(e,t){"function"!=typeof t||Y(eJ,e)&&E(eJ[e],t)},o.removeHook=function(e,t){if(Y(eJ,e)){if(void 0!==t){let n=N(eJ[e],t);return -1===n?void 0:k(eJ[e],n,1)[0]}return _(eJ[e])}},o.removeHooks=function(e){Y(eJ,e)&&(eJ[e]=[])},o.removeAllHooks=function(){eJ=e_()},o}(),eD=e.i(691307),eC=e.i(120843),eL=e.i(247688),eI=e.i(916087),eR=e.i(742740);let eM=e=>e?.length?e.replace("&&","").trim().replace(/\*\s/g,"").replace(/\n+/g,e=>1===e.length?" ":e):null;var ej=e.i(368847),eP=e.i(665488),ez=e.i(341669);let eU=({presentationName:e,promote:n=!0,className:r})=>e?(0,t.jsx)(ej.default,{elementType:n?"h2":"p",variant:"Body.S",color:"secondary",className:r,children:e}):null;var eF=e.i(402625),eH=e.i(632137),eB=e.i(928410),eW=e.i(877957),eY=e.i(708170);let eK=({alert:e,ix:r,totalCount:o,truncate:i})=>{let a=(0,s.useTranslations)("AlertDetails"),l=(0,eB.isAlertSevere)(e.primaryAlert),c=(0,eY.getAlertStyles)(e.primaryAlert),[u,f]=(0,n.useState)(!1),m=i&&!u;return(0,t.jsxs)(eP.AccordionItem,{value:e.detailKey,className:(0,eH.cn)("overflow-hidden rounded-2xl ring-1",l?"ring-alert-severe":"ring-gray-900"),children:[(0,t.jsx)(eP.AccordionTrigger,{className:(0,eH.cn)("flex w-full items-center justify-between gap-3 p-4 text-left",c.containerClasses),iconClassName:"text-white",children:(0,t.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,t.jsx)(eF.AlertIcon,{productIdentifier:e.primaryAlert.productIdentifier,phenomena:e.primaryAlert.phenomena,significance:e.primaryAlert.significance,className:"h-5 w-5 shrink-0","aria-hidden":"true"}),(0,t.jsxs)("div",{className:"min-w-0",children:[(0,t.jsx)(ej.default,{variant:"Body.M.Bold",className:(0,eH.cn)("truncate",c.textClasses),children:e.eventDescription}),e.subheadlineText&&(0,t.jsx)(ej.default,{variant:"Body.S",className:(0,eH.cn)("mt-0.5 line-clamp-2 opacity-80",c.textClasses),children:e.subheadlineText})]})]})}),(0,t.jsx)(eP.AccordionContent,{children:(0,t.jsxs)("div",{className:"p-4",children:[o>1&&(0,t.jsx)("div",{className:"text-right",children:(0,t.jsx)(ej.default,{variant:"Body.S",className:"text-gray-800",children:a("indexOfTotal",{index:r+1,total:o})})}),(0,t.jsxs)("div",{className:(0,eH.cn)("relative overflow-hidden",{"h-64":m}),children:[(0,t.jsx)("div",{className:"space-y-3",children:e.details.map(e=>e.value&&(0,t.jsxs)("div",{children:[(0,t.jsx)(ej.default,{variant:"Body.M.Bold",children:e.label}),(0,t.jsx)(ej.default,{className:"break-words whitespace-pre-wrap",dangerouslySetInnerHTML:{__html:e.value}})]},e.label))}),m&&(0,t.jsx)("div",{className:"pointer-events-none absolute inset-x-0 bottom-0 h-[30%] bg-gradient-to-t from-white to-transparent"})]}),m&&(0,t.jsx)(eW.Button,{onClick:()=>f(!0),className:"bg-gray-900",children:a("truncatedAlertBtnText")})]})})]})},eG=()=>(0,t.jsx)("div",{role:"status","aria-label":"Loading alerts",className:"space-y-2",children:[1,2,3].map(e=>(0,t.jsx)(ez.default,{skeletonClassName:"block h-18 rounded-2xl"},e))}),eq=({alerts:e,presentationName:r,displayName:o,locationHeading:i,isLoading:a,detailKey:l,isMobile:c})=>{let u=(0,s.useTranslations)("AlertDetails"),f=o&&u.has("locationDisplayName")?u("locationDisplayName",{displayName:o}):u("weatherAlerts"),m=(0,n.useMemo)(()=>{let t=l?e.find(e=>e.detailKey===l):null,n=t?.detailKey||e[0]?.detailKey;return n?[n]:[]},[e,l]);return(0,t.jsxs)("section",{"aria-label":f,children:[(0,t.jsxs)("div",{className:"mb-4",children:[(0,t.jsx)(ej.default,{variant:"Title.S",elementType:i?.level??"h2",children:f}),(0,t.jsx)(eU,{presentationName:i?.presentationName||r,promote:i?.ownsHeading??!1,className:"mt-0.5"})]}),a?(0,t.jsx)(eG,{}):e.length>0?(0,t.jsx)(eP.Accordion,{type:"multiple",defaultValue:m,className:"space-y-2",children:e.map((n,r)=>(0,t.jsx)(eK,{alert:n,ix:r,totalCount:e.length,truncate:c&&n.detailKey===m[0]},n.detailKey))},m[0]):(0,t.jsx)(ej.default,{variant:"Body.M",color:"secondary",className:"mb-4",children:u("noAlerts")})]})},eZ=(0,l.createLogger)("AlertDetails"),e$=({location:e,serverLocationDisplayName:r,locationHeading:o,initializing:l=!1,initialError:u})=>{let{alerts:f,isLoading:m,error:p}=(e=>{let t=(0,i.useParams)(),r=t?.locale??"en-US",o=(0,s.useTranslations)("AlertDetails"),a=(0,s.useTranslations)("AlertHeadlines"),{data:l,error:u,isLoading:f}=(0,c.default)(e?.geocode?["alerts",e.geocode,r]:null,([e,t,n])=>(0,eD.getWeatherAlertHeadlines)({geocode:t,language:n}),{revalidateOnFocus:!1,dedupingInterval:6e4}),m=(0,n.useMemo)(()=>l?.alerts?.map(e=>e.detailKey)??[],[l]),{data:p=[],isLoading:d,error:h}=(0,c.default)(m.length>0?["alert-details",m,r]:null,async([e,t,n])=>(await Promise.allSettled(t.map(e=>(0,eC.getWeatherAlertDetail)({detailKey:e,language:n})))).map(e=>"fulfilled"===e.status?e.value:null).filter(e=>!!e),{revalidateOnFocus:!1,dedupingInterval:6e4});return{alerts:(0,n.useMemo)(()=>p.map(e=>{let t=(0,eL.getSubheadlineTranslationKey)({effectiveTimeLocal:e.effectiveTimeLocal,endTimeLocal:e.endTimeLocal}),n=t?a(t,{...e.effectiveTimeLocal&&{startTime:(0,eR.formatHourlyDate)({date:e.effectiveTimeLocal,weekday:"short",locale:r,timeZone:e.ianaTimeZone,minutes:!0})},...e.endTimeLocal&&{endTime:(0,eI.getFormattedEndTimeLocal)({effectiveTimeLocal:e.effectiveTimeLocal||"",endTimeLocal:e.endTimeLocal,locale:r,ianaTimeZone:e.ianaTimeZone})},timeZone:e.effectiveTimeLocalTimeZone||e.endTimeLocalTimeZone||""}):"",i=(({officeName:e,officeAdminDistrictCode:t,officeCountryCode:n,source:r,areaName:o,disclaimer:i,responseTypes:a,texts:l,supplement:c},s,u)=>{var f;let m,p=l?.findIndex(e=>e.languageCode===s),d=l?.[null!=p&&p>-1?p:0],h=eM(d?.description),y=eM(d?.overview),g=d?.languageCode,b=a?.[0]?.responseType??null;return[{label:u("actionRecommended"),value:b&&u(b)},{label:u("issuedBy"),value:(({officeName:e,officeAdminDistrictCode:t,officeCountryCode:n,source:r})=>[(e=e||"")+(""!==t&&null!==t?` - ${t}`:""),n,r].filter(Boolean).join(", "))({officeName:e,officeAdminDistrictCode:t,officeCountryCode:n,source:r})},{label:u("affectedArea"),value:(f=g||null,(h&&"en-US"===f&&(h.indexOf("WHERE...")>=0?m="WHERE...":h.indexOf("LOCATION...")>=0?m="LOCATION...":h.indexOf("LOCATIONS...")>=0&&(m="LOCATIONS..."),h&&m)?h?.split(m).pop().split("\n")[0].trim().replace(/\.$/,""):null)||o)},{label:u("disclaimer"),value:i},{label:u("description"),value:h},{label:u("moreInfo"),value:y},{label:u("specialAlert"),value:c?.specialAlert||null},{label:u("preliminarySpecialAlert"),value:c?.preliminarySpecialAlert||null}]})(e,r,o).map(e=>{let t;return{...e,value:e.value&&(t=e.value,ek.sanitize(t))}});return{detailKey:e.detailKey,headlineText:e.headlineText,eventDescription:e.eventDescription,subheadlineText:n,primaryAlert:{productIdentifier:e.productIdentifier,phenomena:e.phenomena,significance:e.significance},details:i,severityCode:e.severityCode,eventTrackingNumber:e.eventTrackingNumber}}),[p,o,a,r]),isLoading:f||m.length>0&&d,error:u||h}})(e),d=(0,a.useIsMobile)(),h=(0,i.useSearchParams)().get("detailKey"),y=o?.presentationName||e?.presentationName||e?.displayName||"",g=e?.displayName||e?.name||e?.city||e?.presentationName||r||"";return(u||p)&&eZ.error("AlertDetails failed to render",u||p),(0,t.jsx)(eq,{alerts:f,presentationName:y,displayName:g,locationHeading:o,isLoading:l||m,detailKey:h||void 0,isMobile:d})},eX=({globalPageProps:e,headingLevel:i})=>{let{location:a,isLoading:l,error:c}=(0,r.useLocation)(),s=(0,o.getServerLocationDisplayName)(e),u=(0,o.resolveLocationHeadingContext)(e,i);return(0,t.jsx)(n.Suspense,{fallback:null,children:(0,t.jsx)(e$,{location:a,serverLocationDisplayName:s,locationHeading:u,initializing:l,initialError:c})})};e.s(["AlertDetailsBlockClient",0,eX,"default",0,eX],582796)},240535,function(e){e.n(e.i(582796))}]);