@undrr/undrr-mangrove 2.2.0 → 2.3.0

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.
Files changed (86) hide show
  1. package/README.md +1 -1
  2. package/components/BookCard.js +1 -1
  3. package/components/Breadcrumbs.js +1 -1
  4. package/components/Checkbox.js +1 -1
  5. package/components/Chips.js +1 -1
  6. package/components/ContentCard.js +1 -1
  7. package/components/ContentTeaser.js +1 -1
  8. package/components/CopyButton.js +2 -2
  9. package/components/CtaButton.js +1 -1
  10. package/components/Drawer.js +2 -2
  11. package/components/Drawer.js.LICENSE.txt +1 -1
  12. package/components/DrupalContentPatterns.js +1 -1
  13. package/components/EmbedContainer.js +1 -1
  14. package/components/Footer.js +1 -1
  15. package/components/FormAction.js +1 -1
  16. package/components/FormErrorSummary.js +1 -1
  17. package/components/FormGroup.js +1 -1
  18. package/components/FullWidth.js +1 -1
  19. package/components/Gallery.js +2 -2
  20. package/components/Hero.js +1 -1
  21. package/components/HighlightBox.js +1 -1
  22. package/components/HorizontalBookCard.js +2 -2
  23. package/components/HorizontalBookCard.js.LICENSE.txt +1 -1
  24. package/components/HorizontalCard.js +2 -2
  25. package/components/HorizontalCard.js.LICENSE.txt +1 -1
  26. package/components/IconCard.js +2 -2
  27. package/components/IconCard.js.LICENSE.txt +1 -1
  28. package/components/Legend.js +1 -1
  29. package/components/Loader.js +1 -1
  30. package/components/MegaMenu.js +2 -2
  31. package/components/Notice.js +1 -1
  32. package/components/PageHeader.js +1 -1
  33. package/components/Pager.js +1 -1
  34. package/components/ProgressBar.js +1 -1
  35. package/components/QuoteHighlight.js +2 -2
  36. package/components/QuoteHighlight.js.LICENSE.txt +1 -1
  37. package/components/Radio.js +1 -1
  38. package/components/Range.js +1 -1
  39. package/components/ScrollContainer.js +2 -2
  40. package/components/SegmentedControl.js +1 -1
  41. package/components/Select.js +1 -1
  42. package/components/ServiceNotice.js +2 -2
  43. package/components/ShareButtons.js +2 -2
  44. package/components/ShowMore.js +1 -1
  45. package/components/SkipLink.js +1 -1
  46. package/components/StatsCard.js +2 -2
  47. package/components/StatsCard.js.LICENSE.txt +1 -1
  48. package/components/SyndicationSearchWidget.js +2 -2
  49. package/components/Tab.js +2 -2
  50. package/components/TextCta.js +2 -2
  51. package/components/TextCta.js.LICENSE.txt +1 -1
  52. package/components/TextInput.js +1 -1
  53. package/components/Textarea.js +1 -1
  54. package/components/Tree.js +1 -1
  55. package/components/UserFeedback.js +2 -2
  56. package/components/VerticalCard.js +2 -2
  57. package/components/VerticalCard.js.LICENSE.txt +1 -1
  58. package/components/hydrate.js +1 -1
  59. package/css/style-all.css +4 -4
  60. package/css/style-all.css.map +1 -1
  61. package/css/style-delta.css +4 -4
  62. package/css/style-delta.css.map +1 -1
  63. package/css/style-gutenberg.css +1 -1
  64. package/css/style-irp.css +4 -4
  65. package/css/style-irp.css.map +1 -1
  66. package/css/style-mcr.css +4 -4
  67. package/css/style-mcr.css.map +1 -1
  68. package/css/style-preventionweb.css +4 -4
  69. package/css/style-preventionweb.css.map +1 -1
  70. package/css/style.css +4 -4
  71. package/css/style.css.map +1 -1
  72. package/docs/EDITORIAL-MANUAL.md +1 -1
  73. package/error-pages/401.html +1 -1
  74. package/error-pages/403.html +1 -1
  75. package/error-pages/404.html +1 -1
  76. package/error-pages/429.html +1 -1
  77. package/error-pages/500.html +1 -1
  78. package/error-pages/502.html +1 -1
  79. package/error-pages/503.html +1 -1
  80. package/error-pages/504.html +1 -1
  81. package/error-pages/5xx.html +1 -1
  82. package/error-pages/challenge.html +1 -1
  83. package/error-pages/managed-challenge.html +1 -1
  84. package/package.json +1 -1
  85. package/scss/Components/MegaMenu/mega-menu.scss +57 -33
  86. package/scss/assets/scss/_variables.scss +1 -1
@@ -3,7 +3,7 @@
3
3
  * Storybook: https://mangrove.undrr.org/
4
4
  * LLMs context: https://mangrove.undrr.org/llms.txt
5
5
  * Repository: https://github.com/PreventionWeb/undrr-mangrove
6
- * Compiled on: 2026-10-17T14:23:48.871Z
6
+ * Compiled on: 2026-10-27T09:44:34.250Z
7
7
  */
8
8
  /*! For license information please see IconCard.js.LICENSE.txt */
9
- import"react";var e={2694(e,t,n){var r=n(6925);function o(){}function i(){}i.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,i,a){if(a!==r){var l=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw l.name="Invariant Violation",l}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:o};return n.PropTypes=n,n}},5556(e,t,n){e.exports=n(2694)()},6925(e){e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}};const t={};function n(r){const o=t[r];if(void 0!==o)return o.exports;const i=t[r]={exports:{}};return e[r](i,i.exports,n),i.exports}n.n=e=>{const t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.cw=e=>{var t;return()=>{if(e){var n=e;e=0,t={exports:{}},n.call(t.exports,t,t.exports)}return t.exports}},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var r=n.cw(function(e,t){var n=Symbol.for("react.transitional.element"),r=Symbol.for("react.fragment");function o(e,t,r){var o=null;if(void 0!==r&&(o=""+r),void 0!==t.key&&(o=""+t.key),"key"in t)for(var i in r={},t)"key"!==i&&(r[i]=t[i]);else r=t;return t=r.ref,{$$typeof:n,type:e,key:o,ref:void 0!==t?t:null,props:r}}t.Fragment=r,t.jsx=o,t.jsxs=o}),o=n.cw(function(e,t){e.exports=r()}),i=n(5556),a=n.n(i);function l(e,t){this.v=e,this.k=t}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function s(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,l=[],c=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(e){s=!0,o=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(s)throw o}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return c(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?c(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(e){var t,n;function r(t,n){try{var i=e[t](n),a=i.value,c=a instanceof l;Promise.resolve(c?a.v:a).then(function(n){if(c){var l="return"===t&&a.k?t:"next";if(!a.k||n.done)return r(l,n);n=e[l](n).value}o(!!i.done,n)},function(e){r("throw",e)})}catch(e){o(2,e)}}function o(e,o){2===e?t.reject(o):t.resolve({value:o,done:e}),(t=t.next)?r(t.key,t.arg):n=null}this._invoke=function(e,o){return new Promise(function(i,a){var l={key:e,arg:o,resolve:i,reject:a,next:null};n?n=n.next=l:(t=n=l,r(e,o))})},"function"!=typeof e.return&&(this.return=void 0)}u.prototype["function"==typeof Symbol&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},u.prototype.next=function(e){return this._invoke("next",e)},u.prototype.throw=function(e){return this._invoke("throw",e)},u.prototype.return=function(e){return this._invoke("return",e)};const f=Object.entries,m=Object.setPrototypeOf,p=Object.isFrozen,d=Object.getPrototypeOf,h=Object.getOwnPropertyDescriptor;let g=Object.freeze,y=Object.seal,b=Object.create,T="undefined"!=typeof Reflect&&Reflect,S=T.apply,v=T.construct;g||(g=function(e){return e}),y||(y=function(e){return e}),S||(S=function(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];return e.apply(t,r)}),v||(v=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return new e(...n)});const _=W(Array.prototype.forEach);Array.prototype.indexOf;const x=W(Array.prototype.lastIndexOf),w=W(Array.prototype.pop),A=W(Array.prototype.push);Array.prototype.slice;const E=W(Array.prototype.splice),k=Array.isArray,O=W(String.prototype.toLowerCase),C=W(String.prototype.toString),N=W(String.prototype.match),D=W(String.prototype.replace),R=W(String.prototype.indexOf),I=W(String.prototype.trim),L=W(Number.prototype.toString),z=W(Boolean.prototype.toString),P="undefined"==typeof BigInt?null:W(BigInt.prototype.toString),M="undefined"==typeof Symbol?null:W(Symbol.prototype.toString),j=W(Object.prototype.hasOwnProperty),U=W(Object.prototype.toString),F=W(RegExp.prototype.test),H=(B=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return v(B,t)});var B;function W(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return S(e,t,r)}}function Y(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:O;if(m&&m(e,null),!k(t))return e;let r=t.length;for(;r--;){let o=t[r];if("string"==typeof o){const e=n(o);e!==o&&(p(t)||(t[r]=e),o=e)}e[o]=!0}return e}function G(e){for(let t=0;t<e.length;t++)j(e,t)||(e[t]=null);return e}function q(e){const t=b(null);for(const r of f(e)){var n=s(r,2);const o=n[0],i=n[1];j(e,o)&&(k(i)?t[o]=G(i):i&&"object"==typeof i&&i.constructor===Object?t[o]=q(i):t[o]=i)}return t}function $(e,t){for(;null!==e;){const n=h(e,t);if(n){if(n.get)return W(n.get);if("function"==typeof n.value)return W(n.value)}e=d(e)}return function(){return null}}const V=g(["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","search","section","select","shadow","slot","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"]),X=g(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),K=g(["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"]),Z=g(["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"]),J=g(["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"]),Q=g(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),ee=g(["#text"]),te=g(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","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","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),ne=g(["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","dominant-baseline","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","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","pointer-events","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-orientation","text-rendering","textlength","type","u1","u2","unicode","values","vector-effect","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"]),re=g(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","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"]),oe=g(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),ie=y(/{{[\w\W]*|^[\w\W]*}}/g),ae=y(/<%[\w\W]*|^[\w\W]*%>/g),le=y(/\${[\w\W]*/g),ce=y(/^data-[\-\w.\u00B7-\uFFFF]+$/),se=y(/^aria-[\-\w]+$/),ue=y(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),fe=y(/^(?:\w+script|data):/i),me=y(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),pe=y(/^html$/i),de=y(/^[a-z][.\w]*(-[.\w]+)+$/i),he=y(/<[/\w!]/g),ge=y(/<[/\w]/g),ye=y(/<\/no(script|embed|frames)/i),be=y(/\/>/i),Te=["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"],Se=g(Y({},Te)),ve=function(){const e={};return _(Te,t=>{e[t]=y(new RegExp("</"+t+"(?=[\\t\\n\\f\\r />])","i"))}),g(e)}(),_e=function(){return"undefined"==typeof window?null:window},xe=function(e,t,n,r){return j(e,t)&&k(e[t])?Y(r.base?q(r.base):{},e[t],r.transform):n},we=function(e,t,n){const r=j(e,t)?e[t]:void 0;return r&&"object"==typeof r?q(r):n()};var Ae=function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:_e();const n=t=>e(t);if(n.version="3.4.16",n.removed=[],!t||!t.document||9!==t.document.nodeType||!t.Element)return n.isSupported=!1,n;let r=t.document;const o=r,i=o.currentScript;t.DocumentFragment;const a=t.HTMLTemplateElement,l=t.Node,c=t.Element,s=t.NodeFilter;void 0===t.NamedNodeMap&&(t.NamedNodeMap||t.MozNamedAttrMap),t.HTMLFormElement;const u=t.DOMParser,m=t.trustedTypes,p=c.prototype,d=$(p,"cloneNode"),h=$(p,"remove"),T=$(p,"removeAttributeNode"),S=$(p,"nextSibling"),v=$(p,"childNodes"),B=$(p,"parentNode"),W=$(p,"shadowRoot"),G=$(p,"attributes"),Te=l&&l.prototype?$(l.prototype,"nodeType"):null,Ae=l&&l.prototype?$(l.prototype,"nodeName"):null,Ee=l&&l.prototype?$(l.prototype,"ownerDocument"):null,ke=function(e){return Te?Te(e):e.nodeType},Oe=function(e){return Ae?Ae(e):e.nodeName};if("function"==typeof a){const e=r.createElement("template");e.content&&e.content.ownerDocument&&(r=e.content.ownerDocument)}let Ce,Ne,De="",Re=!1,Ie=0;const Le=function(){if(Ie>0)throw H('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.')},ze=function(e){Le(),Ie++;try{return Ce.createHTML(e)}finally{Ie--}},Pe=r,Me=Pe.implementation,je=Pe.createNodeIterator,Ue=Pe.createDocumentFragment,Fe=Pe.getElementsByTagName,He=o.importNode;let Be={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};n.isSupported="function"==typeof f&&"function"==typeof B&&Me&&void 0!==Me.createHTMLDocument;const We=ie,Ye=ae,Ge=le,qe=ce,$e=se,Ve=fe,Xe=me,Ke=de;let Ze=ue,Je=null;const Qe=Y({},[...V,...X,...K,...J,...ee]);let et=null;const tt=Y({},[...te,...ne,...re,...oe]);let nt=Object.seal(b(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}})),rt=null,ot=null;const it=Object.seal(b(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let at=!0,lt=!0,ct=!1,st=!0,ut=!1,ft=!0,mt=!1,pt=!1,dt=null,ht=null,gt=!1,yt=!1,bt=!1,Tt=!1,St=!0,vt=!1;const _t="user-content-";let xt=!0,wt=!1,At={},Et=null;const kt=Y({},["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"]);let Ot=null;const Ct=Y({},["audio","video","img","source","image","track"]);let Nt=null;const Dt=Y({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Rt="http://www.w3.org/1998/Math/MathML",It="http://www.w3.org/2000/svg",Lt="http://www.w3.org/1999/xhtml";let zt=Lt,Pt=!1,Mt=null;const jt=Y({},[Rt,It,Lt],C),Ut=g(["mi","mo","mn","ms","mtext"]);let Ft=Y({},Ut);const Ht=g(["annotation-xml"]);let Bt=Y({},Ht);const Wt=Y({},["title","style","font","a","script"]);let Yt=null;const Gt=["application/xhtml+xml","text/html"];let qt=null,$t=null;const Vt=r.createElement("form"),Xt=function(e){return e instanceof RegExp||e instanceof Function},Kt=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if($t&&$t===e)return;e&&"object"==typeof e||(e={}),e=q(e),Yt=-1===Gt.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,qt="application/xhtml+xml"===Yt?C:O,Je=xe(e,"ALLOWED_TAGS",Qe,{transform:qt}),et=xe(e,"ALLOWED_ATTR",tt,{transform:qt}),Mt=xe(e,"ALLOWED_NAMESPACES",jt,{transform:C}),Nt=xe(e,"ADD_URI_SAFE_ATTR",Dt,{transform:qt,base:Dt}),Ot=xe(e,"ADD_DATA_URI_TAGS",Ct,{transform:qt,base:Ct}),Et=xe(e,"FORBID_CONTENTS",kt,{transform:qt}),rt=xe(e,"FORBID_TAGS",q({}),{transform:qt}),ot=xe(e,"FORBID_ATTR",q({}),{transform:qt}),At=!!j(e,"USE_PROFILES")&&(e.USE_PROFILES&&"object"==typeof e.USE_PROFILES?q(e.USE_PROFILES):e.USE_PROFILES),at=!1!==e.ALLOW_ARIA_ATTR,lt=!1!==e.ALLOW_DATA_ATTR,ct=e.ALLOW_UNKNOWN_PROTOCOLS||!1,st=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,ut=e.SAFE_FOR_TEMPLATES||!1,ft=!1!==e.SAFE_FOR_XML,mt=e.WHOLE_DOCUMENT||!1,yt=e.RETURN_DOM||!1,bt=e.RETURN_DOM_FRAGMENT||!1,Tt=e.RETURN_TRUSTED_TYPE||!1,gt=e.FORCE_BODY||!1,St=!1!==e.SANITIZE_DOM,vt=e.SANITIZE_NAMED_PROPS||!1,xt=!1!==e.KEEP_CONTENT,wt=e.IN_PLACE||!1,Ze=function(e){try{return F(e,""),!0}catch(e){return!1}}(e.ALLOWED_URI_REGEXP)?e.ALLOWED_URI_REGEXP:ue,zt="string"==typeof e.NAMESPACE?e.NAMESPACE:Lt,Ft=we(e,"MATHML_TEXT_INTEGRATION_POINTS",()=>Y({},Ut)),Bt=we(e,"HTML_INTEGRATION_POINTS",()=>Y({},Ht));const t=we(e,"CUSTOM_ELEMENT_HANDLING",()=>b(null));if(nt=b(null),j(t,"tagNameCheck")&&Xt(t.tagNameCheck)&&(nt.tagNameCheck=t.tagNameCheck),j(t,"attributeNameCheck")&&Xt(t.attributeNameCheck)&&(nt.attributeNameCheck=t.attributeNameCheck),j(t,"allowCustomizedBuiltInElements")&&"boolean"==typeof t.allowCustomizedBuiltInElements&&(nt.allowCustomizedBuiltInElements=t.allowCustomizedBuiltInElements),y(nt),ut&&(lt=!1),bt&&(yt=!0),At&&(Je=Y({},ee),et=b(null),!0===At.html&&(Y(Je,V),Y(et,te)),!0===At.svg&&(Y(Je,X),Y(et,ne),Y(et,oe)),!0===At.svgFilters&&(Y(Je,K),Y(et,ne),Y(et,oe)),!0===At.mathMl&&(Y(Je,J),Y(et,re),Y(et,oe))),it.tagCheck=null,it.attributeCheck=null,j(e,"ADD_TAGS")&&("function"==typeof e.ADD_TAGS?it.tagCheck=e.ADD_TAGS:k(e.ADD_TAGS)&&(Je===Qe&&(Je=q(Je)),Y(Je,e.ADD_TAGS,qt))),j(e,"ADD_ATTR")&&("function"==typeof e.ADD_ATTR?it.attributeCheck=e.ADD_ATTR:k(e.ADD_ATTR)&&(et===tt&&(et=q(et)),Y(et,e.ADD_ATTR,qt))),j(e,"ADD_FORBID_CONTENTS")&&k(e.ADD_FORBID_CONTENTS)&&(Et===kt&&(Et=q(Et)),Y(Et,e.ADD_FORBID_CONTENTS,qt)),xt&&(Je["#text"]=!0),mt&&Y(Je,["html","head","body"]),Je.table&&(Y(Je,["tbody"]),delete rt.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw H('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw H('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const t=Ce;Ce=e.TRUSTED_TYPES_POLICY;try{De=ze("")}catch(e){throw Ce=t,e}}else null===e.TRUSTED_TYPES_POLICY?(Ce=void 0,De=""):(void 0===Ce&&(Re||(Ne=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null;const r="data-tt-policy-suffix";t&&t.hasAttribute(r)&&(n=t.getAttribute(r));const 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}}(m,i),Re=!0),Ce=Ne),Ce&&"string"==typeof De&&(De=ze("")));g&&g(e),$t=e},Zt=Y({},[...X,...K,...Z]),Jt=Y({},[...J,...Q]),Qt=function(e){A(n.removed,{element:e});try{B(e).removeChild(e)}catch(t){if(h(e),!B(e))throw H("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},en=function(e,t,n){try{T(e,t)}catch(t){try{e.removeAttribute(n)}catch(e){}}},tn=function(e){on(e);const t=v(e);if(t){const e=[];_(t,t=>{A(e,t)}),_(e,e=>{try{h(e)}catch(e){}})}const n=G(e);if(n)for(let t=n.length-1;t>=0;--t){const r=n[t],o=r&&r.name;"string"==typeof o&&en(e,r,o)}},nn=function(e,t,r){if(!r)try{r=t.getAttributeNode(e)}catch(e){r=null}A(n.removed,{attribute:r||null,from:t});try{r?T(t,r):t.removeAttribute(e)}catch(n){try{t.removeAttribute(e)}catch(e){}}if("is"===e)if(yt||bt)try{Qt(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},rn=function(e){const t=G(e);if(t)for(let n=t.length-1;n>=0;--n){const r=t[n],o=r&&r.name;"string"!=typeof o||et[qt(o)]||en(e,r,o)}},on=function(e){const t=[e];for(;t.length>0;){const e=t.pop();1===ke(e)&&rn(e);const n=v(e);if(n)for(let e=n.length-1;e>=0;--e)t.push(n[e])}},an=function(e,t){return!!ft&&("patchsrc"===e||"for"===e&&"label"!==t&&"output"!==t)},ln=function(e){let t=null,n=null;if(gt)e="<remove></remove>"+e;else{const t=N(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===Yt&&zt===Lt&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const o=Ce?ze(e):e;if(zt===Lt)try{t=(new u).parseFromString(o,Yt)}catch(e){}if(!t||!t.documentElement){t=Me.createDocument(zt,"template",null);try{t.documentElement.innerHTML=Pt?De:o}catch(e){}}const i=t.body||t.documentElement;return e&&n&&i.insertBefore(r.createTextNode(n),i.childNodes[0]||null),zt===Lt?Fe.call(t,mt?"html":"body")[0]:mt?t.documentElement:i},cn=function(e){const t=Ee?Ee(e):e.ownerDocument;return je.call(t||e,e,s.SHOW_ELEMENT|s.SHOW_COMMENT|s.SHOW_TEXT|s.SHOW_PROCESSING_INSTRUCTION|s.SHOW_CDATA_SECTION,null)},sn=function(e){return e=D(e,We," "),e=D(e,Ye," "),D(e,Ge," ")},un=function(e){var t;e.normalize();const n=Ee?Ee(e):e.ownerDocument,r=je.call(n||e,e,s.SHOW_TEXT|s.SHOW_COMMENT|s.SHOW_CDATA_SECTION|s.SHOW_PROCESSING_INSTRUCTION,null);let o=r.nextNode();for(;o;)o.data=sn(o.data),o=r.nextNode();const i=null===(t=e.querySelectorAll)||void 0===t?void 0:t.call(e,"template");i&&_(i,e=>{mn(e.content)&&un(e.content)})},fn=function(e){const t=Ae?Ae(e):null;return"string"==typeof t&&"form"===qt(t)&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||e.attributes!==G(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!==Te(e)||e.childNodes!==v(e))},mn=function(e){if(!Te||"object"!=typeof e||null===e)return!1;try{return 11===Te(e)}catch(e){return!1}},pn=function(e){if(!Te||"object"!=typeof e||null===e)return!1;try{return"number"==typeof Te(e)}catch(e){return!1}};function dn(e,t,r){0!==e.length&&_(e,e=>{e.call(n,t,r,$t)})}const hn=function(e,t){if(e instanceof RegExp)return F(e,t);if(e instanceof Function){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];return Boolean(e(t,...r))}return!1},gn=function(e,t,n,r){return 0===e.length?t:t===n||t===r?q(t):t},yn=function(e,t){return e!==t&&null===B(e)&&(wt&&on(e),!0)},bn=function(e,t){if(dn(Be.beforeSanitizeElements,e,null),yn(e,t))return!0;if(fn(e))return Qt(e),!0;const r=qt(Oe(e));if(Je=gn(Be.uponSanitizeElement,Je,Qe,dt),dn(Be.uponSanitizeElement,e,{tagName:r,allowedTags:Je}),yn(e,t))return!0;if(function(e,t){return!!(ft&&e.hasChildNodes()&&!pn(e.firstElementChild)&&F(he,e.textContent)&&F(he,e.innerHTML))||!!(ft&&e.namespaceURI===Lt&&Se[t]&&(pn(e.firstElementChild)||"string"==typeof e.textContent&&F(ve[t],e.textContent)))||7===e.nodeType||!(!ft||8!==e.nodeType||!F(ge,e.data))}(e,r))return Qt(e),!0;if(rt[r]||!(it.tagCheck instanceof Function&&it.tagCheck(r))&&!Je[r]){const n=function(e,t,n){if(!rt[t]&&vn(t)&&hn(nt.tagNameCheck,t))return!1;if(xt&&!Et[t]){const t=B(e),r=v(e);if(r&&t)for(let o=r.length-1;o>=0;--o){const i=e===n?d(r[o],!0):r[o];t.insertBefore(i,S(e))}}return Qt(e),!0}(e,r,t);return!(!1!==n||(dn(Be.afterSanitizeElements,e,null),!yn(e,t)))||n}if(1===ke(e)&&!function(e){let t=B(e);t&&t.tagName||(t={namespaceURI:zt,tagName:"template"});const n=O(e.tagName),r=O(t.tagName);return!!Mt[e.namespaceURI]&&(e.namespaceURI===It?function(e,t,n){return t.namespaceURI===Lt?"svg"===e:t.namespaceURI===Rt?"svg"===e&&("annotation-xml"===n||Ft[n]):Boolean(Zt[e])}(n,t,r):e.namespaceURI===Rt?function(e,t,n){return t.namespaceURI===Lt?"math"===e:t.namespaceURI===It?"math"===e&&Bt[n]:Boolean(Jt[e])}(n,t,r):e.namespaceURI===Lt?function(e,t,n){return!(t.namespaceURI===It&&!Bt[n])&&!(t.namespaceURI===Rt&&!Ft[n])&&!Jt[e]&&(Wt[e]||!Zt[e])}(n,t,r):!("application/xhtml+xml"!==Yt||!Mt[e.namespaceURI]))}(e))return Qt(e),!0;if(("noscript"===r||"noembed"===r||"noframes"===r)&&F(ye,e.innerHTML))return Qt(e),!0;if(ut&&3===e.nodeType){const t=sn(e.textContent);e.textContent!==t&&(A(n.removed,{element:e.cloneNode()}),e.textContent=t)}return dn(Be.afterSanitizeElements,e,null),yn(e,t)},Tn=function(e,t,n){if(ot[t])return!1;if(an(t,e))return!1;if(St&&("id"===t||"name"===t)&&(n in r||n in Vt))return!1;const o=et[t]||it.attributeCheck instanceof Function&&it.attributeCheck(t,e);return!(!lt||!F(qe,t))||!(!at||!F($e,t))||(o?!(!Nt[t]&&!F(Ze,D(n,Xe,""))&&("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==R(n,"data:")||!Ot[e])&&(!ct||F(Ve,D(n,Xe,"")))&&n):vn(e)&&hn(nt.tagNameCheck,e)&&hn(nt.attributeNameCheck,t,e)||"is"===t&&nt.allowCustomizedBuiltInElements&&hn(nt.tagNameCheck,n))},Sn=Y({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),vn=function(e){return!Sn[O(e)]&&F(Ke,e)},_n=function(e,t,n,r){if(Ce&&"object"==typeof m&&"function"==typeof m.getAttributeType&&!n)switch(m.getAttributeType(e,t)){case"TrustedHTML":return ze(r);case"TrustedScriptURL":return function(e){Le(),Ie++;try{return Ce.createScriptURL(e)}finally{Ie--}}(r)}return r},xn=function(e,t,n,r){try{return n?e.setAttributeNS(n,t,r):e.setAttribute(t,r),!fn(e)||(Qt(e),!1)}catch(n){return nn(t,e),!1}},wn=function(e,t){if(dn(Be.beforeSanitizeAttributes,e,null),yn(e,t))return;const r=e.attributes;if(!r||fn(e))return;et=gn(Be.uponSanitizeAttribute,et,tt,ht);const o={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:et,forceKeepAttr:void 0};let i=r.length;const a=qt(e.nodeName);for(;i--;){const t=r[i],l=t.name,c=t.namespaceURI,s=t.value,u=qt(l),f=s;let m="value"===l?f:I(f),p=!1;o.attrName=u,o.attrValue=m,o.keepAttr=!0,o.forceKeepAttr=void 0,dn(Be.uponSanitizeAttribute,e,o),m=o.attrValue,!vt||"id"!==u&&"name"!==u||0===R(m,_t)||(nn(l,e,t),m=_t+m,p=!0),ft&&F(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,m)||"attributename"===u&&N(m,"href")?nn(l,e,t):o.forceKeepAttr||(!o.keepAttr||!st&&F(be,m)?nn(l,e,t):(ut&&(m=sn(m)),Tn(a,u,m)?(m=_n(a,u,c,m),m!==f&&xn(e,l,c,m)&&p&&w(n.removed)):nn(l,e,t)))}dn(Be.afterSanitizeAttributes,e,null),yn(e,t)},An=function(e){let t=null;const n=cn(e);for(dn(Be.beforeSanitizeShadowDOM,e,null);t=n.nextNode();)if(dn(Be.uponSanitizeShadowNode,t,null),bn(t,e),wn(t,e),mn(t.content)&&An(t.content),1===ke(t)){const e=W(t);mn(e)&&(En(e),An(e))}dn(Be.afterSanitizeShadowDOM,e,null)},En=function(e){const t=[{node:e,shadow:null}];for(;t.length>0;){const e=t.pop();if(e.shadow){An(e.shadow);continue}const n=e.node,r=1===ke(n),o=v(n);if(o)for(let e=o.length-1;e>=0;--e)t.push({node:o[e],shadow:null});if(r){const e=Ae?Ae(n):null;if("string"==typeof e&&"template"===qt(e)){const e=n.content;mn(e)&&t.push({node:e,shadow:null})}}if(r){const e=W(n);mn(e)&&t.push({node:null,shadow:e},{node:e,shadow:null})}}};return n.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=null,i=null,a=null,l=null;if(Pt=!e,Pt&&(e="\x3c!--\x3e"),"string"!=typeof e&&!pn(e)&&"string"!=typeof(e=function(e){switch(typeof e){case"string":return e;case"number":return L(e);case"boolean":return z(e);case"bigint":return P?P(e):"0";case"symbol":return M?M(e):"Symbol()";case"undefined":default:return U(e);case"function":case"object":{if(null===e)return U(e);const t=e,n=$(t,"toString");if("function"==typeof n){const e=n(t);return"string"==typeof e?e:U(e)}return U(e)}}}(e)))throw H("dirty is not a string, aborting");if(!n.isSupported)return e;pt?(Je=dt,et=ht):Kt(t),(Be.uponSanitizeElement.length>0||Be.uponSanitizeAttribute.length>0)&&(Je=q(Je)),Be.uponSanitizeAttribute.length>0&&(et=q(et)),n.removed=[];const c=wt&&"string"!=typeof e&&pn(e);if(c){!function(e){if(!ft)return;const t=[e];for(;t.length>0;){const e=t.pop(),n=ke(e);if(7===n||8===n&&F(ge,e.data)){try{h(e)}catch(e){}continue}if(1===n){const t=e,n=qt(Oe(e));try{t.hasAttribute&&t.hasAttribute("patchsrc")&&t.removeAttribute("patchsrc"),t.hasAttribute&&t.hasAttribute("for")&&an("for",n)&&t.removeAttribute("for")}catch(e){}}const r=v(e);if(r)for(let e=r.length-1;e>=0;--e)t.push(r[e])}}(e);const t=Oe(e);if("string"==typeof t){const n=qt(t);if(!Je[n]||rt[n])throw tn(e),H("root node is forbidden and cannot be sanitized in-place")}if(fn(e))throw tn(e),H("root node is clobbered and cannot be sanitized in-place");try{En(e)}catch(t){throw tn(e),t}}else if(pn(e))r=ln("\x3c!----\x3e"),i=r.ownerDocument.importNode(e,!0),1===i.nodeType&&"BODY"===i.nodeName||"HTML"===i.nodeName?r=i:r.appendChild(i),En(r);else{if(!yt&&!ut&&!mt&&-1===e.indexOf("<"))return Ce&&Tt?ze(e):e;if(r=ln(e),!r)return yt?null:Tt?De:""}r&&gt&&Qt(r.firstChild);const s=c?e:r;try{const e=cn(s);for(;a=e.nextNode();)bn(a,s),wn(a,s),mn(a.content)&&An(a.content)}catch(t){throw c&&(tn(e),_(n.removed,e=>{e.element&&on(e.element)})),t}if(c){let t=!1;if(_(n.removed,n=>{n.element&&(n.element===e&&(t=!0),on(n.element))}),t)throw H("a node selected for removal could not be safely returned; refusing to sanitize in place");return ut&&un(e),e}if(yt){if(ut&&un(r),bt)for(l=Ue.call(r.ownerDocument);r.firstChild;)l.appendChild(r.firstChild);else l=r;return(et.shadowroot||et.shadowrootmode)&&(l=He.call(o,l,!0)),l}let u=mt?r.outerHTML:r.innerHTML;return mt&&Je["!doctype"]&&r.ownerDocument&&r.ownerDocument.doctype&&r.ownerDocument.doctype.name&&F(pe,r.ownerDocument.doctype.name)&&(u="<!DOCTYPE "+r.ownerDocument.doctype.name+">\n"+u),ut&&(u=sn(u)),Ce&&Tt?ze(u):u},n.setConfig=function(){Kt(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),pt=!0,dt=Je,ht=et},n.clearConfig=function(){$t=null,pt=!1,dt=null,ht=null,Ce=Ne,De=""},n.isValidAttribute=function(e,t,n){$t||Kt({});const r=qt(e),o=qt(t);return Tn(r,o,n)},n.addHook=function(e,t){"function"==typeof t&&j(Be,e)&&A(Be[e],t)},n.removeHook=function(e,t){if(j(Be,e)){if(void 0!==t){const n=x(Be[e],t);return-1===n?void 0:E(Be[e],n,1)[0]}return w(Be[e])}},n.removeHooks=function(e){j(Be,e)&&(Be[e]=[])},n.removeAllHooks=function(){Be={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},n}();function Ee({label:e,Type:t="Primary",Variant:n="Default",Outline:o=!1,State:i="Default",href:a="#",onClick:l,className:c,...s}){const u="Disabled"===i,f=["mg-button","CTA"===n&&"mg-button-cta","mg-button-"+("Secondary"===t?"secondary":"primary"),o&&"mg-button-outline",u&&"disabled",c].filter(Boolean).join(" ");return(0,r().jsx)("a",{className:f,...s,...u?{"aria-disabled":"true",tabIndex:-1}:{href:a,onClick:l},children:e})}o(),Ee.propTypes={label:a().string.isRequired,Type:a().oneOf(["Primary","Secondary"]),Variant:a().oneOf(["Default","CTA"]),Outline:a().bool,State:a().oneOf(["Default","Disabled"]),href:a().string,onClick:a().func,className:a().string};const ke=(...e)=>e.filter(Boolean).length>0?e.filter(Boolean).join(" "):null;function Oe({item:e}){return e.imgback?(0,r().jsx)("img",{src:e.imgback,alt:e.imgalt||"",className:ke("mg-card__image",e.imageScale&&`mg-card__image--${e.imageScale}`),...!e.imageScale&&{width:e.iconSize||72,height:e.iconSize||72}}):e.icon||e.iconColor?(0,r().jsx)("span",{className:ke("mg-card__icon-wrap",e.imageScale&&`mg-card__icon-wrap--${e.imageScale}`,e.iconColor&&"mg-card__icon-wrap--colored"),"aria-hidden":"true",...(e.iconColor||e.iconFgColor)&&{style:{...e.iconColor&&{"--mg-icon-bg":e.iconColor},...e.iconFgColor&&{"--mg-icon-fg":e.iconFgColor}}},children:e.icon&&(0,r().jsx)("span",{className:e.icon})}):null}function Ce({data:e,centered:t=!1,variant:n="default",orientation:o="vertical"}){return(0,r().jsx)(r().Fragment,{children:e.map((e,i)=>(0,r().jsxs)("article",{className:ke("mg-card","mg-card__icon",t&&"mg-card__icon--centered","horizontal"===o&&"mg-card__icon--horizontal",n&&"default"!==n&&`mg-card__icon--${n}`,e.borderColor&&"mg-card__icon--bordered"),...e.borderColor&&{style:{"--mg-card-border":e.borderColor}},children:[(e.icon||e.imgback||e.iconColor)&&(0,r().jsxs)("div",{className:"mg-card__visual",children:[e.visualLabel&&(0,r().jsx)("span",{className:"mg-card__visual-label",children:e.visualLabel}),e.srOnlyTitle&&(e.link||e.onClick)?(0,r().jsx)("a",{href:e.link||"#",onClick:e.onClick,className:"mg-card__visual-link",children:(0,r().jsx)(Oe,{item:e})}):(0,r().jsx)(Oe,{item:e})]}),(0,r().jsxs)("div",{className:"mg-card__content",children:[e.label&&(0,r().jsx)("div",{className:"mg-card__meta",children:(0,r().jsx)("span",{className:"mg-card__label",children:e.label})}),e.title&&(0,r().jsx)("header",{className:ke("mg-card__title",e.srOnlyTitle&&"mg-u-sr-only"),children:!e.link&&!e.onClick||e.button||e.srOnlyTitle?e.title?.trim():(0,r().jsx)("a",{href:e.link||"#",onClick:e.onClick,children:e.title?.trim()})}),e.summaryText&&(0,r().jsx)("p",{className:"mg-card__summary",dangerouslySetInnerHTML:{__html:Ae.sanitize(e.summaryText)}}),e.button&&(0,r().jsx)("div",{className:"mg-card__cta",children:(0,r().jsx)(Ee,{Type:e.buttonType||"Primary",Variant:"CTA",label:e.button,href:e.link||"#",onClick:e.onClick})}),e.linkText&&!e.button&&(0,r().jsx)("p",{className:"mg-card__link",children:(0,r().jsx)("a",{href:e.link||"#",onClick:e.onClick,children:e.linkText})})]})]},e.id||e.title||`icon-card-${i}`))})}function Ne(e){const{dataset:t}=e,n={centered:"true"===t.centered,variant:t.variant||"default"};try{n.data=t.items?JSON.parse(t.items):[]}catch{n.data=[]}return n}Ce.propTypes={data:a().arrayOf(a().shape({id:a().oneOfType([a().string,a().number]),icon:a().string,imgback:a().string,imgalt:a().string,iconSize:a().number,imageScale:a().oneOf(["small","medium","large","full"]),iconColor:a().string,iconFgColor:a().string,borderColor:a().string,label:a().string,visualLabel:a().string,title:a().string.isRequired,srOnlyTitle:a().bool,summaryText:a().string,link:a().string,linkText:a().string,onClick:a().func,button:a().string,buttonType:a().oneOf(["Primary","Secondary"])})).isRequired,centered:a().bool,variant:a().oneOf(["default","negative"]),orientation:a().oneOf(["vertical","horizontal"])};export{Ce as IconCard,Ce as default,Ne as fromElement};
9
+ import"react";var t={2694(t,e,n){var r=n(6925);function o(){}function i(){}i.resetWarningCache=o,t.exports=function(){function t(t,e,n,o,i,a){if(a!==r){var l=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw l.name="Invariant Violation",l}}function e(){return t}t.isRequired=t;var n={array:t,bigint:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,elementType:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:i,resetWarningCache:o};return n.PropTypes=n,n}},5556(t,e,n){t.exports=n(2694)()},6925(t){t.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}};const e={};function n(r){const o=e[r];if(void 0!==o)return o.exports;const i=e[r]={exports:{}};return t[r](i,i.exports,n),i.exports}n.n=t=>{const e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.cw=t=>{var e;return()=>{if(t){var n=t;t=0,e={exports:{}},n.call(e.exports,e,e.exports)}return e.exports}},n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var r=n.cw(function(t,e){var n=Symbol.for("react.transitional.element"),r=Symbol.for("react.fragment");function o(t,e,r){var o=null;if(void 0!==r&&(o=""+r),void 0!==e.key&&(o=""+e.key),"key"in e)for(var i in r={},e)"key"!==i&&(r[i]=e[i]);else r=e;return e=r.ref,{$$typeof:n,type:t,key:o,ref:void 0!==e?e:null,props:r}}e.Fragment=r,e.jsx=o,e.jsxs=o}),o=n.cw(function(t,e){t.exports=r()}),i=n(5556),a=n.n(i);function l(t,e){this.v=t,this.k=e}function c(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function s(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i,a,l=[],c=!0,s=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(l.push(r.value),l.length!==e);c=!0);}catch(t){s=!0,o=t}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(s)throw o}}return l}}(t,e)||function(t,e){if(t){if("string"==typeof t)return c(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?c(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(t){var e,n;function r(e,n){try{var i=t[e](n),a=i.value,c=a instanceof l;Promise.resolve(c?a.v:a).then(function(n){if(c){var l="return"===e&&a.k?e:"next";if(!a.k||n.done)return r(l,n);n=t[l](n).value}o(!!i.done,n)},function(t){r("throw",t)})}catch(t){o(2,t)}}function o(t,o){2===t?e.reject(o):e.resolve({value:o,done:t}),(e=e.next)?r(e.key,e.arg):n=null}this._invoke=function(t,o){return new Promise(function(i,a){var l={key:t,arg:o,resolve:i,reject:a,next:null};n?n=n.next=l:(e=n=l,r(t,o))})},"function"!=typeof t.return&&(this.return=void 0)}u.prototype["function"==typeof Symbol&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},u.prototype.next=function(t){return this._invoke("next",t)},u.prototype.throw=function(t){return this._invoke("throw",t)},u.prototype.return=function(t){return this._invoke("return",t)};const f=Object.entries,m=Object.setPrototypeOf,p=Object.isFrozen,d=Object.getPrototypeOf,h=Object.getOwnPropertyDescriptor;let g=Object.freeze,y=Object.seal,b=Object.create,S="undefined"!=typeof Reflect&&Reflect,T=S.apply,v=S.construct;g||(g=function(t){return t}),y||(y=function(t){return t}),T||(T=function(t,e){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];return t.apply(e,r)}),v||(v=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return new t(...n)});const _=q(Array.prototype.forEach);Array.prototype.indexOf;const x=q(Array.prototype.lastIndexOf),w=q(Array.prototype.pop),A=q(Array.prototype.push),E=q(Array.prototype.slice),k=q(Array.prototype.splice),O=Array.isArray,C=$(Set),N=q(Set.prototype.add),D=q(Set.prototype.has),R=q(String.prototype.toLowerCase),I=q(String.prototype.toString),L=q(String.prototype.match),z=q(String.prototype.replace),P=q(String.prototype.indexOf),M=q(String.prototype.trim),j=q(Number.prototype.toString),U=q(Boolean.prototype.toString),F="undefined"==typeof BigInt?null:q(BigInt.prototype.toString),H="undefined"==typeof Symbol?null:q(Symbol.prototype.toString),B=q(Object.prototype.hasOwnProperty),W=q(Object.prototype.toString),Y=q(RegExp.prototype.test),G=$(TypeError);function q(t){return function(e){e instanceof RegExp&&(e.lastIndex=0);for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return T(t,e,r)}}function $(t){return function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return v(t,n)}}function V(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:R;if(m&&m(t,null),!O(e))return t;let r=e.length;for(;r--;){let o=e[r];if("string"==typeof o){const t=n(o);t!==o&&(p(e)||(e[r]=t),o=t)}t[o]=!0}return t}function X(t){for(let e=0;e<t.length;e++)B(t,e)||(t[e]=null);return t}function K(t){const e=b(null);for(const r of f(t)){var n=s(r,2);const o=n[0],i=n[1];B(t,o)&&(O(i)?e[o]=X(i):i&&"object"==typeof i&&i.constructor===Object?e[o]=K(i):e[o]=i)}return e}function Z(t,e){for(;null!==t;){const n=h(t,e);if(n){if(n.get)return q(n.get);if("function"==typeof n.value)return q(n.value)}t=d(t)}return function(){return null}}const J=g(["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","search","section","select","shadow","slot","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"]),Q=g(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),tt=g(["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"]),et=g(["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"]),nt=g(["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"]),rt=g(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),ot=g(["#text"]),it=g(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","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","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),at=g(["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","dominant-baseline","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","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","pointer-events","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-orientation","text-rendering","textlength","type","u1","u2","unicode","values","vector-effect","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"]),lt=g(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","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"]),ct=g(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),st=y(/{{[\w\W]*|^[\w\W]*}}/g),ut=y(/<%[\w\W]*|^[\w\W]*%>/g),ft=y(/\${[\w\W]*/g),mt=y(/^data-[\-\w.\u00B7-\uFFFF]+$/),pt=y(/^aria-[\-\w]+$/),dt=y(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),ht=y(/^(?:\w+script|data):/i),gt=y(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),yt=y(/^html$/i),bt=y(/^[a-z][.\w]*(-[.\w]+)+$/i),St=y(/<[/\w!]/g),Tt=y(/<[/\w]/g),vt=y(/<\/no(script|embed|frames)/i),_t=y(/\/>/i),xt=g(V({},["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"])),wt=function(){return"undefined"==typeof window?null:window},At=function(t,e,n,r){return B(t,e)&&O(t[e])?V(r.base?K(r.base):{},t[e],r.transform):n},Et=function(t,e,n){const r=B(t,e)?t[e]:void 0;return r&&"object"==typeof r?K(r):n()};var kt=function t(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:wt();const n=e=>t(e);if(n.version="3.4.17",n.removed=[],!e||!e.document||9!==e.document.nodeType||!e.Element)return n.isSupported=!1,n;let r=e.document;const o=r,i=o.currentScript;e.DocumentFragment;const a=e.HTMLTemplateElement,l=e.Node,c=e.Element,s=e.NodeFilter;void 0===e.NamedNodeMap&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;const u=e.DOMParser,m=e.trustedTypes,p=c.prototype,S=Z(p,"cloneNode"),T=Z(p,"remove"),v=Z(p,"removeAttributeNode"),$=Z(p,"nextSibling"),X=Z(p,"childNodes"),kt=Z(p,"parentNode"),Ot=Z(p,"shadowRoot"),Ct=Z(p,"attributes"),Nt=l&&l.prototype?Z(l.prototype,"nodeType"):null,Dt=l&&l.prototype?Z(l.prototype,"nodeName"):null,Rt=l&&l.prototype?Z(l.prototype,"ownerDocument"):null,It=function(t){return Nt?Nt(t):t.nodeType},Lt=function(t){return Dt?Dt(t):t.nodeName},zt=function(t){for(;null!==t;){const e=h(t,"namespaceURI");if(e)return e.get?q(e.get):null;t=d(t)}return null}(p),Pt=function(t){return zt?zt(t):t.namespaceURI};if("function"==typeof a){const t=r.createElement("template");t.content&&t.content.ownerDocument&&(r=t.content.ownerDocument)}let Mt,jt,Ut="",Ft=!1,Ht=0;const Bt=function(){if(Ht>0)throw G('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.')},Wt=function(t){Bt(),Ht++;try{return Mt.createHTML(t)}finally{Ht--}},Yt=r,Gt=Yt.implementation,qt=Yt.createNodeIterator,$t=Yt.createDocumentFragment,Vt=Yt.getElementsByTagName,Xt=o.importNode;let Kt={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};n.isSupported="function"==typeof f&&"function"==typeof kt&&Gt&&void 0!==Gt.createHTMLDocument;const Zt=st,Jt=ut,Qt=ft,te=mt,ee=pt,ne=ht,re=gt,oe=bt;let ie=dt,ae=null;const le=V({},[...J,...Q,...tt,...nt,...ot]);let ce=null;const se=V({},[...it,...at,...lt,...ct]);let ue=Object.seal(b(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}})),fe=null,me=null;const pe=Object.seal(b(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let de=!0,he=!0,ge=!1,ye=!0,be=!1,Se=!0,Te=!1,ve=!1,_e=null,xe=null,we=!1,Ae=!1,Ee=!1,ke=!1,Oe=!0,Ce=!1;const Ne="user-content-";let De=!0,Re=!1,Ie=null,Le={},ze=null;const Pe=V({},["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"]);let Me=null;const je=V({},["audio","video","img","source","image","track"]);let Ue=null;const Fe=V({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),He="http://www.w3.org/1998/Math/MathML",Be="http://www.w3.org/2000/svg",We="http://www.w3.org/1999/xhtml";let Ye=We,Ge=!1,qe=null;const $e=V({},[He,Be,We],I),Ve=g(["mi","mo","mn","ms","mtext"]);let Xe=V({},Ve);const Ke=g(["annotation-xml"]);let Ze=V({},Ke);const Je=V({},["title","style","font","a","script"]);let Qe=null;const tn=["application/xhtml+xml","text/html"];let en=null,nn=null;const rn=r.createElement("form"),on=function(t){return t instanceof RegExp||t instanceof Function},an=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(nn&&nn===t)return;t&&"object"==typeof t||(t={}),t=K(t),Qe=-1===tn.indexOf(t.PARSER_MEDIA_TYPE)?"text/html":t.PARSER_MEDIA_TYPE,en="application/xhtml+xml"===Qe?I:R,ae=At(t,"ALLOWED_TAGS",le,{transform:en}),ce=At(t,"ALLOWED_ATTR",se,{transform:en}),qe=At(t,"ALLOWED_NAMESPACES",$e,{transform:I}),Ue=At(t,"ADD_URI_SAFE_ATTR",Fe,{transform:en,base:Fe}),Me=At(t,"ADD_DATA_URI_TAGS",je,{transform:en,base:je}),ze=At(t,"FORBID_CONTENTS",Pe,{transform:en}),fe=At(t,"FORBID_TAGS",K({}),{transform:en}),me=At(t,"FORBID_ATTR",K({}),{transform:en}),Le=!!B(t,"USE_PROFILES")&&(t.USE_PROFILES&&"object"==typeof t.USE_PROFILES?K(t.USE_PROFILES):t.USE_PROFILES),de=!1!==t.ALLOW_ARIA_ATTR,he=!1!==t.ALLOW_DATA_ATTR,ge=t.ALLOW_UNKNOWN_PROTOCOLS||!1,ye=!1!==t.ALLOW_SELF_CLOSE_IN_ATTR,be=t.SAFE_FOR_TEMPLATES||!1,Se=!1!==t.SAFE_FOR_XML,Te=t.WHOLE_DOCUMENT||!1,Ae=t.RETURN_DOM||!1,Ee=t.RETURN_DOM_FRAGMENT||!1,ke=t.RETURN_TRUSTED_TYPE||!1,we=t.FORCE_BODY||!1,Oe=!1!==t.SANITIZE_DOM,Ce=t.SANITIZE_NAMED_PROPS||!1,De=!1!==t.KEEP_CONTENT,Re=t.IN_PLACE||!1,ie=function(t){try{return Y(t,""),!0}catch(t){return!1}}(t.ALLOWED_URI_REGEXP)?t.ALLOWED_URI_REGEXP:dt,Ye="string"==typeof t.NAMESPACE?t.NAMESPACE:We,Xe=Et(t,"MATHML_TEXT_INTEGRATION_POINTS",()=>V({},Ve)),Ze=Et(t,"HTML_INTEGRATION_POINTS",()=>V({},Ke));const e=Et(t,"CUSTOM_ELEMENT_HANDLING",()=>b(null));if(ue=b(null),B(e,"tagNameCheck")&&on(e.tagNameCheck)&&(ue.tagNameCheck=e.tagNameCheck),B(e,"attributeNameCheck")&&on(e.attributeNameCheck)&&(ue.attributeNameCheck=e.attributeNameCheck),B(e,"allowCustomizedBuiltInElements")&&"boolean"==typeof e.allowCustomizedBuiltInElements&&(ue.allowCustomizedBuiltInElements=e.allowCustomizedBuiltInElements),y(ue),be&&(he=!1),Ee&&(Ae=!0),Le&&(ae=V({},ot),ce=b(null),!0===Le.html&&(V(ae,J),V(ce,it)),!0===Le.svg&&(V(ae,Q),V(ce,at),V(ce,ct)),!0===Le.svgFilters&&(V(ae,tt),V(ce,at),V(ce,ct)),!0===Le.mathMl&&(V(ae,nt),V(ce,lt),V(ce,ct))),pe.tagCheck=null,pe.attributeCheck=null,B(t,"ADD_TAGS")&&("function"==typeof t.ADD_TAGS?pe.tagCheck=t.ADD_TAGS:O(t.ADD_TAGS)&&(ae===le&&(ae=K(ae)),V(ae,t.ADD_TAGS,en))),B(t,"ADD_ATTR")&&("function"==typeof t.ADD_ATTR?pe.attributeCheck=t.ADD_ATTR:O(t.ADD_ATTR)&&(ce===se&&(ce=K(ce)),V(ce,t.ADD_ATTR,en))),B(t,"ADD_FORBID_CONTENTS")&&O(t.ADD_FORBID_CONTENTS)&&(ze===Pe&&(ze=K(ze)),V(ze,t.ADD_FORBID_CONTENTS,en)),De&&(ae["#text"]=!0),Te&&V(ae,["html","head","body"]),ae.table&&(V(ae,["tbody"]),delete fe.tbody),t.TRUSTED_TYPES_POLICY){if("function"!=typeof t.TRUSTED_TYPES_POLICY.createHTML)throw G('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof t.TRUSTED_TYPES_POLICY.createScriptURL)throw G('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const e=Mt;Mt=t.TRUSTED_TYPES_POLICY;try{Ut=Wt("")}catch(t){throw Mt=e,t}}else null===t.TRUSTED_TYPES_POLICY?(Mt=void 0,Ut=""):(void 0===Mt&&(Ft||(jt=function(t,e){if("object"!=typeof t||"function"!=typeof t.createPolicy)return null;let n=null;const r="data-tt-policy-suffix";e&&e.hasAttribute(r)&&(n=e.getAttribute(r));const o="dompurify"+(n?"#"+n:"");try{return t.createPolicy(o,{createHTML:t=>t,createScriptURL:t=>t})}catch(t){return console.warn("TrustedTypes policy "+o+" could not be created."),null}}(m,i),Ft=!0),Mt=jt),Mt&&"string"==typeof Ut&&(Ut=Wt("")));g&&g(t),nn=t},ln=V({},[...Q,...tt,...et]),cn=V({},[...nt,...rt]),sn=function(t){A(n.removed,{element:t});try{kt(t).removeChild(t)}catch(e){if(T(t),!kt(t))throw G("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},un=function(t,e,n){try{v(t,e)}catch(e){try{t.removeAttribute(n)}catch(t){}}},fn=function(t){hn(t);const e=X(t);e&&_(E(e),t=>{try{T(t)}catch(t){}});const n=1===It(t)?Ct(t):null;if(n)for(let e=n.length-1;e>=0;--e){const r=n[e],o=r&&r.name;"string"==typeof o&&un(t,r,o)}},mn=function(t,e,r){if(!r)try{r=e.getAttributeNode(t)}catch(t){r=null}A(n.removed,{attribute:r||null,from:e});try{r?v(e,r):e.removeAttribute(t)}catch(n){try{e.removeAttribute(t)}catch(t){}}if("is"===t)if(Ae||Ee)try{sn(e)}catch(t){}else try{e.setAttribute(t,"")}catch(t){}},pn=function(t){const e=Ct(t);if(e)for(let n=e.length-1;n>=0;--n){const r=e[n],o=r&&r.name;"string"!=typeof o||ce[en(o)]||un(t,r,o)}},dn=function(t,e){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const r=[t];for(;r.length>0;){const t=r.pop();if(!1===e(t))continue;if(n&&1===It(t)){const e=Ot(t);En(e)&&r.push(e)}const o=X(t);if(o)for(let t=o.length-1;t>=0;--t)r.push(o[t])}},hn=function(t){dn(t,t=>{1===It(t)&&pn(t)})},gn=function(t){const e=[];return dn(t,t=>{e.push(t)},!0),e},yn=function(t,e){let r=!1;return _(n.removed,e=>{e.element&&(r=r||e.element===t,hn(e.element))}),function(t,e){const n=C();_(gn(t),t=>{1===It(t)&&N(n,t)}),_(e,t=>{1!==It(t)||D(n,t)||pn(t)})}(t,e),r},bn=function(t,e,n,r){const o=vn(t);let i;for(;i=o.nextNode();)D(r,i)&&!D(Ie,i)&&(e&&On(Kt.uponSanitizeShadowNode,i,null),Rn(i,n),Un(i,n),En(i.content)&&Fn(i.content))},Sn=function(t,e){return!!Se&&("patchsrc"===t||"for"===t&&"label"!==e&&"output"!==e)},Tn=function(t){let e=null,n=null;if(we)t="<remove></remove>"+t;else{const e=L(t,/^[\r\n\t ]+/);n=e&&e[0]}"application/xhtml+xml"===Qe&&Ye===We&&(t='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+t+"</body></html>");const o=Mt?Wt(t):t;if(Ye===We)try{e=(new u).parseFromString(o,Qe)}catch(t){}if(!e||!e.documentElement){e=Gt.createDocument(Ye,"template",null);try{e.documentElement.innerHTML=Ge?Ut:o}catch(t){}}const i=e.body||e.documentElement;return t&&n&&i.insertBefore(r.createTextNode(n),i.childNodes[0]||null),Ye===We?Vt.call(e,Te?"html":"body")[0]:Te?e.documentElement:i},vn=function(t){const e=Rt?Rt(t):t.ownerDocument;return qt.call(e||t,t,s.SHOW_ELEMENT|s.SHOW_COMMENT|s.SHOW_TEXT|s.SHOW_PROCESSING_INSTRUCTION|s.SHOW_CDATA_SECTION,null)},_n=function(t){return t=z(t,Zt," "),t=z(t,Jt," "),z(t,Qt," ")},xn=function(t){var e;wn(t);const n=null===(e=t.querySelectorAll)||void 0===e?void 0:e.call(t,"template");n&&_(n,t=>{En(t.content)&&xn(t.content)})},wn=function(t){t.normalize();const e=Rt?Rt(t):t.ownerDocument,n=qt.call(e||t,t,s.SHOW_TEXT|s.SHOW_COMMENT|s.SHOW_CDATA_SECTION|s.SHOW_PROCESSING_INSTRUCTION,null);let r=n.nextNode();for(;r;)r.data=_n(r.data),r=n.nextNode()},An=function(t){const e=Dt?Dt(t):null;return"string"==typeof e&&"form"===en(e)&&("string"!=typeof t.nodeName||"string"!=typeof t.textContent||"function"!=typeof t.removeChild||t.attributes!==Ct(t)||"function"!=typeof t.removeAttribute||"function"!=typeof t.removeAttributeNode||"function"!=typeof t.getAttributeNode||"function"!=typeof t.setAttribute||"string"!=typeof t.namespaceURI||"function"!=typeof t.insertBefore||"function"!=typeof t.hasChildNodes||t.nodeType!==Nt(t)||t.childNodes!==X(t))},En=function(t){if(!Nt||"object"!=typeof t||null===t)return!1;try{return 11===Nt(t)}catch(t){return!1}},kn=function(t){if(!Nt||"object"!=typeof t||null===t)return!1;try{return"number"==typeof Nt(t)}catch(t){return!1}};function On(t,e,r){0!==t.length&&_(t,t=>{t.call(n,e,r,nn)})}const Cn=function(t,e){if(t instanceof RegExp)return Y(t,e);if(t instanceof Function){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];return Boolean(t(e,...r))}return!1},Nn=function(t,e,n,r){return 0===t.length?e:e===n||e===r?K(e):e},Dn=function(t,e){return t!==e&&null===kt(t)&&(Re&&hn(t),!0)},Rn=function(t,e){if(Ie&&N(Ie,t),On(Kt.beforeSanitizeElements,t,null),Dn(t,e))return!0;if(An(t))return sn(t),!0;const r=en(Lt(t));if(ae=Nn(Kt.uponSanitizeElement,ae,le,_e),On(Kt.uponSanitizeElement,t,{tagName:r,allowedTags:ae}),Dn(t,e))return!0;if(function(t,e){return!!(Se&&t.hasChildNodes()&&!kn(t.firstElementChild)&&Y(St,t.textContent)&&Y(St,t.innerHTML))||!!(Se&&xt[e]&&1===It(t)&&Pt(t)===We&&(kn(t.firstElementChild)||"string"==typeof t.textContent&&Y(St,t.textContent)))||7===t.nodeType||!(!Se||8!==t.nodeType||!Y(Tt,t.data))}(t,r))return sn(t),!0;if(fe[r]||!(pe.tagCheck instanceof Function&&pe.tagCheck(r))&&!ae[r]){const n=function(t,e,n){if(!fe[e]&&zn(e)&&Cn(ue.tagNameCheck,e))return!1;if(De&&!ze[e]&&!ze[R(e)]){const e=kt(t),r=X(t);if(r&&e)for(let o=r.length-1;o>=0;--o){const i=t===n?S(r[o],!0):r[o];e.insertBefore(i,$(t))}}return sn(t),!0}(t,r,e);return!(!1!==n||(On(Kt.afterSanitizeElements,t,null),!Dn(t,e)))||n}if(1===It(t)&&!function(t){const e=Pt(t),n=R(Lt(t)),r=kt(t);let o,i;return r&&1===It(r)?(o={namespaceURI:Pt(r)},i=R(Lt(r))):(o={namespaceURI:Ye},i="template"),!!qe[e]&&(e===Be?function(t,e,n){return e.namespaceURI===We?"svg"===t:e.namespaceURI===He?"svg"===t&&("annotation-xml"===n||Xe[n]):Boolean(ln[t])}(n,o,i):e===He?function(t,e,n){return e.namespaceURI===We?"math"===t:e.namespaceURI===Be?"math"===t&&Ze[n]:Boolean(cn[t])}(n,o,i):e===We?function(t,e,n){return!(e.namespaceURI===Be&&!Ze[n])&&!(e.namespaceURI===He&&!Xe[n])&&!cn[t]&&(Je[t]||!ln[t])}(n,o,i):!("application/xhtml+xml"!==Qe||!qe[e]))}(t))return sn(t),!0;if(("noscript"===r||"noembed"===r||"noframes"===r)&&Y(vt,t.innerHTML))return sn(t),!0;if(be&&3===t.nodeType){const e=_n(t.textContent);t.textContent!==e&&(A(n.removed,{element:t.cloneNode()}),t.textContent=e)}return On(Kt.afterSanitizeElements,t,null),Dn(t,e)},In=function(t,e,n){if(me[e])return!1;if(Sn(e,t))return!1;if(Oe&&("id"===e||"name"===e)&&(n in r||n in rn))return!1;const o=ce[e]||pe.attributeCheck instanceof Function&&pe.attributeCheck(e,t);return!(!he||!Y(te,e))||!(!de||!Y(ee,e))||(o?!(!Ue[e]&&!Y(ie,z(n,re,""))&&("src"!==e&&"xlink:href"!==e&&"href"!==e||"script"===t||0!==P(n,"data:")||!Me[t])&&(!ge||Y(ne,z(n,re,"")))&&n):zn(t)&&Cn(ue.tagNameCheck,t)&&Cn(ue.attributeNameCheck,e,t)||"is"===e&&ue.allowCustomizedBuiltInElements&&Cn(ue.tagNameCheck,n))},Ln=V({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),zn=function(t){return!Ln[R(t)]&&Y(oe,t)},Pn=function(t,e,n,r){if(Mt&&"object"==typeof m&&"function"==typeof m.getAttributeType&&!n)switch(m.getAttributeType(t,e)){case"TrustedHTML":return Wt(r);case"TrustedScriptURL":return function(t){Bt(),Ht++;try{return Mt.createScriptURL(t)}finally{Ht--}}(r)}return r},Mn=function(t,e,n,r){try{return n?t.setAttributeNS(n,e,r):t.setAttribute(e,r),!An(t)||(sn(t),!1)}catch(n){return mn(e,t),!1}},jn=function(t,e){return!(!Se||!Y(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,e))||"attributename"===R(t)&&null!==L(e,"href")},Un=function(t,e){if(On(Kt.beforeSanitizeAttributes,t,null),Dn(t,e))return;const r=t.attributes;if(!r||An(t))return;ce=Nn(Kt.uponSanitizeAttribute,ce,se,xe);const o={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:ce,forceKeepAttr:void 0};let i=r.length;const a=en(t.nodeName);for(;i--;){const e=r[i],l=e.name,c=e.namespaceURI,s=e.value,u=en(l),f=s;let m="value"===l?f:M(f),p=!1;o.attrName=u,o.attrValue=m,o.keepAttr=!0,o.forceKeepAttr=void 0,On(Kt.uponSanitizeAttribute,t,o),m=o.attrValue,!Ce||"id"!==u&&"name"!==u||0===P(m,Ne)||(mn(l,t,e),m=Ne+m,p=!0),jn(l,m)?mn(l,t,e):o.forceKeepAttr||(!o.keepAttr||!ye&&Y(_t,m)?mn(l,t,e):(be&&(m=_n(m)),In(a,u,m)?(m=Pn(a,u,c,m),m!==f&&Mn(t,l,c,m)&&p&&w(n.removed)):mn(l,t,e)))}On(Kt.afterSanitizeAttributes,t,null),Dn(t,e)},Fn=function(t){let e=null;const n=vn(t);for(On(Kt.beforeSanitizeShadowDOM,t,null);e=n.nextNode();)if(On(Kt.uponSanitizeShadowNode,e,null),Rn(e,t),Un(e,t),En(e.content)&&Fn(e.content),1===It(e)){const t=Ot(e);En(t)&&(Hn(t),Fn(t))}be&&wn(t),On(Kt.afterSanitizeShadowDOM,t,null)},Hn=function(t){const e=[{node:t,shadow:null}];for(;e.length>0;){const t=e.pop();if(t.shadow){Fn(t.shadow);continue}const n=t.node,r=1===It(n),o=X(n);if(o)for(let t=o.length-1;t>=0;--t)e.push({node:o[t],shadow:null});if(r){const t=Dt?Dt(n):null;if("string"==typeof t&&"template"===en(t)){const t=n.content;En(t)&&e.push({node:t,shadow:null})}}if(r){const t=Ot(n);En(t)&&e.push({node:null,shadow:t},{node:t,shadow:null})}}};return n.sanitize=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=null,i=null,a=null,l=null;if(Ge=!t,Ge&&(t="\x3c!--\x3e"),"string"!=typeof t&&!kn(t)&&"string"!=typeof(t=function(t){switch(typeof t){case"string":return t;case"number":return j(t);case"boolean":return U(t);case"bigint":return F?F(t):"0";case"symbol":return H?H(t):"Symbol()";case"undefined":default:return W(t);case"function":case"object":{if(null===t)return W(t);const e=t,n=Z(e,"toString");if("function"==typeof n){const t=n(e);return"string"==typeof t?t:W(t)}return W(t)}}}(t)))throw G("dirty is not a string, aborting");if(!n.isSupported)return t;ve?(ae=_e,ce=xe):an(e),(Kt.uponSanitizeElement.length>0||Kt.uponSanitizeAttribute.length>0)&&(ae=K(ae)),Kt.uponSanitizeAttribute.length>0&&(ce=K(ce)),n.removed=[];const c=Re&&"string"!=typeof t&&kn(t);let s=[];const u=Ie;if(c){Se&&dn(t,t=>{const e=It(t);if(7===e||8===e&&Y(Tt,t.data)){try{T(t)}catch(t){}return!1}if(1===e){const e=t,n=en(Lt(t));try{e.hasAttribute&&e.hasAttribute("patchsrc")&&e.removeAttribute("patchsrc"),e.hasAttribute&&e.hasAttribute("for")&&Sn("for",n)&&e.removeAttribute("for")}catch(t){}}return!0});const e=Lt(t);if("string"==typeof e){const n=en(e);if(!ae[n]||fe[n])throw fn(t),G("root node is forbidden and cannot be sanitized in-place")}if(An(t))throw fn(t),G("root node is clobbered and cannot be sanitized in-place");s=gn(t),Ie=C()}else if(kn(t))r=Tn("\x3c!----\x3e"),i=r.ownerDocument.importNode(t,!0),1===i.nodeType&&"BODY"===i.nodeName||"HTML"===i.nodeName?r=i:r.appendChild(i),Hn(r);else{if(!Ae&&!be&&!Te&&-1===t.indexOf("<"))return Mt&&ke?Wt(t):t;if(r=Tn(t),!r)return Ae?null:ke?Ut:""}r&&we&&sn(r.firstChild);const f=c?t:r;try{c&&Hn(t);const e=vn(f);for(;a=e.nextNode();)Rn(a,f),Un(a,f),En(a.content)&&Fn(a.content);c&&function(t,e){const n=Ie;let r=null;const o=()=>(r||(r=C(),_(e,t=>{N(r,t)})),r);for(let e=0;;e++){const r=gn(t),i=[t];let a=!1;if(_(r,t=>{11===It(t)?A(i,t):a||D(n,t)||(a=D(o(),t))}),!a)return;if(e>=8)throw G("the tree kept changing during in-place sanitization; refusing to return it");_(i,(e,n)=>{bn(e,n>0,t,o())})}}(t,s)}catch(e){throw c&&(fn(t),yn(t,s)),e}finally{Ie=u}if(c){if(yn(t,s))throw G("a node selected for removal could not be safely returned; refusing to sanitize in place");return be&&xn(t),t}if(Ae){if(be&&xn(r),Ee)for(l=$t.call(r.ownerDocument);r.firstChild;)l.appendChild(r.firstChild);else l=r;return(ce.shadowroot||ce.shadowrootmode)&&(l=Xt.call(o,l,!0)),l}let m=Te?r.outerHTML:r.innerHTML;return Te&&ae["!doctype"]&&r.ownerDocument&&r.ownerDocument.doctype&&r.ownerDocument.doctype.name&&Y(yt,r.ownerDocument.doctype.name)&&(m="<!DOCTYPE "+r.ownerDocument.doctype.name+">\n"+m),be&&(m=_n(m)),Mt&&ke?Wt(m):m},n.setConfig=function(){an(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),ve=!0,_e=ae,xe=ce},n.clearConfig=function(){nn=null,ve=!1,_e=null,xe=null,Mt=jt,Ut=""},n.isValidAttribute=function(t,e,n){nn||an({});const r=en(t),o=en(e);return("string"!=typeof n||!(jn(e,n)||!ye&&Y(_t,n)))&&In(r,o,n)},n.addHook=function(t,e){"function"==typeof e&&B(Kt,t)&&A(Kt[t],e)},n.removeHook=function(t,e){if(B(Kt,t)){if(void 0!==e){const n=x(Kt[t],e);return-1===n?void 0:k(Kt[t],n,1)[0]}return w(Kt[t])}},n.removeHooks=function(t){B(Kt,t)&&(Kt[t]=[])},n.removeAllHooks=function(){Kt={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},n}();function Ot({label:t,Type:e="Primary",Variant:n="Default",Outline:o=!1,State:i="Default",href:a="#",onClick:l,className:c,...s}){const u="Disabled"===i,f=["mg-button","CTA"===n&&"mg-button-cta","mg-button-"+("Secondary"===e?"secondary":"primary"),o&&"mg-button-outline",u&&"disabled",c].filter(Boolean).join(" ");return(0,r().jsx)("a",{className:f,...s,...u?{"aria-disabled":"true",tabIndex:-1}:{href:a,onClick:l},children:t})}o(),Ot.propTypes={label:a().string.isRequired,Type:a().oneOf(["Primary","Secondary"]),Variant:a().oneOf(["Default","CTA"]),Outline:a().bool,State:a().oneOf(["Default","Disabled"]),href:a().string,onClick:a().func,className:a().string};const Ct=(...t)=>t.filter(Boolean).length>0?t.filter(Boolean).join(" "):null;function Nt({item:t}){return t.imgback?(0,r().jsx)("img",{src:t.imgback,alt:t.imgalt||"",className:Ct("mg-card__image",t.imageScale&&`mg-card__image--${t.imageScale}`),...!t.imageScale&&{width:t.iconSize||72,height:t.iconSize||72}}):t.icon||t.iconColor?(0,r().jsx)("span",{className:Ct("mg-card__icon-wrap",t.imageScale&&`mg-card__icon-wrap--${t.imageScale}`,t.iconColor&&"mg-card__icon-wrap--colored"),"aria-hidden":"true",...(t.iconColor||t.iconFgColor)&&{style:{...t.iconColor&&{"--mg-icon-bg":t.iconColor},...t.iconFgColor&&{"--mg-icon-fg":t.iconFgColor}}},children:t.icon&&(0,r().jsx)("span",{className:t.icon})}):null}function Dt({data:t,centered:e=!1,variant:n="default",orientation:o="vertical"}){return(0,r().jsx)(r().Fragment,{children:t.map((t,i)=>(0,r().jsxs)("article",{className:Ct("mg-card","mg-card__icon",e&&"mg-card__icon--centered","horizontal"===o&&"mg-card__icon--horizontal",n&&"default"!==n&&`mg-card__icon--${n}`,t.borderColor&&"mg-card__icon--bordered"),...t.borderColor&&{style:{"--mg-card-border":t.borderColor}},children:[(t.icon||t.imgback||t.iconColor)&&(0,r().jsxs)("div",{className:"mg-card__visual",children:[t.visualLabel&&(0,r().jsx)("span",{className:"mg-card__visual-label",children:t.visualLabel}),t.srOnlyTitle&&(t.link||t.onClick)?(0,r().jsx)("a",{href:t.link||"#",onClick:t.onClick,className:"mg-card__visual-link",children:(0,r().jsx)(Nt,{item:t})}):(0,r().jsx)(Nt,{item:t})]}),(0,r().jsxs)("div",{className:"mg-card__content",children:[t.label&&(0,r().jsx)("div",{className:"mg-card__meta",children:(0,r().jsx)("span",{className:"mg-card__label",children:t.label})}),t.title&&(0,r().jsx)("header",{className:Ct("mg-card__title",t.srOnlyTitle&&"mg-u-sr-only"),children:!t.link&&!t.onClick||t.button||t.srOnlyTitle?t.title?.trim():(0,r().jsx)("a",{href:t.link||"#",onClick:t.onClick,children:t.title?.trim()})}),t.summaryText&&(0,r().jsx)("p",{className:"mg-card__summary",dangerouslySetInnerHTML:{__html:kt.sanitize(t.summaryText)}}),t.button&&(0,r().jsx)("div",{className:"mg-card__cta",children:(0,r().jsx)(Ot,{Type:t.buttonType||"Primary",Variant:"CTA",label:t.button,href:t.link||"#",onClick:t.onClick})}),t.linkText&&!t.button&&(0,r().jsx)("p",{className:"mg-card__link",children:(0,r().jsx)("a",{href:t.link||"#",onClick:t.onClick,children:t.linkText})})]})]},t.id||t.title||`icon-card-${i}`))})}function Rt(t){const{dataset:e}=t,n={centered:"true"===e.centered,variant:e.variant||"default"};try{n.data=e.items?JSON.parse(e.items):[]}catch{n.data=[]}return n}Dt.propTypes={data:a().arrayOf(a().shape({id:a().oneOfType([a().string,a().number]),icon:a().string,imgback:a().string,imgalt:a().string,iconSize:a().number,imageScale:a().oneOf(["small","medium","large","full"]),iconColor:a().string,iconFgColor:a().string,borderColor:a().string,label:a().string,visualLabel:a().string,title:a().string.isRequired,srOnlyTitle:a().bool,summaryText:a().string,link:a().string,linkText:a().string,onClick:a().func,button:a().string,buttonType:a().oneOf(["Primary","Secondary"])})).isRequired,centered:a().bool,variant:a().oneOf(["default","negative"]),orientation:a().oneOf(["vertical","horizontal"])};export{Dt as IconCard,Dt as default,Rt as fromElement};
@@ -1,4 +1,4 @@
1
- /*! @license DOMPurify 3.4.16 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.16/LICENSE */
1
+ /*! @license DOMPurify 3.4.17 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.17/LICENSE */
2
2
 
3
3
  /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */
4
4
 
@@ -3,7 +3,7 @@
3
3
  * Storybook: https://mangrove.undrr.org/
4
4
  * LLMs context: https://mangrove.undrr.org/llms.txt
5
5
  * Repository: https://github.com/PreventionWeb/undrr-mangrove
6
- * Compiled on: 2026-10-17T14:23:48.871Z
6
+ * Compiled on: 2026-10-27T09:44:34.250Z
7
7
  */
8
8
  /*! For license information please see Legend.js.LICENSE.txt */
9
9
  import{useId as e}from"react";var s={2694(e,s,a){var r=a(6925);function t(){}function n(){}n.resetWarningCache=t,e.exports=function(){function e(e,s,a,t,n,l){if(l!==r){var o=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw o.name="Invariant Violation",o}}function s(){return e}e.isRequired=e;var a={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:s,element:e,elementType:e,instanceOf:s,node:e,objectOf:s,oneOf:s,oneOfType:s,shape:s,exact:s,checkPropTypes:n,resetWarningCache:t};return a.PropTypes=a,a}},5556(e,s,a){e.exports=a(2694)()},6925(e){e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}};const a={};function r(e){const t=a[e];if(void 0!==t)return t.exports;const n=a[e]={exports:{}};return s[e](n,n.exports,r),n.exports}r.n=e=>{const s=e&&e.__esModule?()=>e.default:()=>e;return r.d(s,{a:s}),s},r.cw=e=>{var s;return()=>{if(e){var a=e;e=0,s={exports:{}},a.call(s.exports,s,s.exports)}return s.exports}},r.d=(e,s)=>{for(var a in s)r.o(s,a)&&!r.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:s[a]})},r.o=(e,s)=>Object.prototype.hasOwnProperty.call(e,s);var t=r.cw(function(e,s){var a=Symbol.for("react.transitional.element");function r(e,s,r){var t=null;if(void 0!==r&&(t=""+r),void 0!==s.key&&(t=""+s.key),"key"in s)for(var n in r={},s)"key"!==n&&(r[n]=s[n]);else r=s;return s=r.ref,{$$typeof:a,type:e,key:t,ref:void 0!==s?s:null,props:r}}Symbol.for("react.fragment"),s.jsx=r,s.jsxs=r}),n=r.cw(function(e,s){e.exports=t()}),l=r(5556),o=r.n(l);n();const i=(e,s,a)=>e.position||(a>1?s/(a-1)*100+"%":"0%"),c=({type:s="continuous",orientation:a="horizontal",layout:r="default",rampClass:n="",customRamp:l="",ticks:o=[],items:c=[],title:p="",className:d="",...u})=>{const m="mg-legend",_=e(),y=[m,`${m}--${s}`,"vertical"===a?`${m}--vertical`:"","default"!==r?`${m}--${r}`:"",d].filter(Boolean).join(" ");return(0,t().jsxs)("div",{className:y,role:"group","aria-labelledby":p?_:void 0,...u,children:[p&&(0,t().jsx)("p",{id:_,className:`${m}__title`,children:p}),"continuous"===s&&(0,t().jsxs)("div",{className:`${m}__bar-wrapper`,children:[(0,t().jsx)("div",{className:`${m}__bar ${n}`,style:l?{background:l}:{},"aria-hidden":"true"}),o.length>0&&(0,t().jsx)("div",{className:`${m}__ticks`,children:o.map((e,s)=>(0,t().jsx)("div",{className:`${m}__tick`,style:{"--mg-legend-tick-pos":i(e,s,o.length)},children:(0,t().jsx)("span",{className:`${m}__tick-label`,children:e.label})},s))})]}),"stepped"===s&&(0,t().jsxs)("div",{className:`${m}__bar-wrapper`,children:[(0,t().jsx)("div",{className:`${m}__bar ${m}__bar--stepped ${n}`,children:c.map((e,s)=>(0,t().jsx)("div",{className:`${m}__step`,style:e.color?{backgroundColor:e.color}:{},children:(0,t().jsx)("span",{className:"mg-u-sr-only",children:e.label})},s))}),o.length>0&&(0,t().jsx)("div",{className:`${m}__ticks`,children:o.map((e,s)=>(0,t().jsx)("div",{className:`${m}__tick`,style:{"--mg-legend-tick-pos":i(e,s,o.length)},children:(0,t().jsx)("span",{className:`${m}__tick-label`,children:e.label})},s))})]}),"categorical"===s&&(0,t().jsx)("ul",{className:`${m}__list`,children:c.map((e,s)=>(0,t().jsxs)("li",{className:`${m}__item`,children:[(0,t().jsx)("span",{className:`${m}__swatch`,style:e.color?{backgroundColor:e.color}:{}}),(0,t().jsx)("span",{className:`${m}__label`,children:e.label}),e.value&&(0,t().jsx)("span",{className:`${m}__value`,children:e.value})]},s))})]})};c.propTypes={type:o().oneOf(["continuous","categorical","stepped"]),orientation:o().oneOf(["horizontal","vertical"]),layout:o().oneOf(["default","inline","grid"]),rampClass:o().string,customRamp:o().string,ticks:o().arrayOf(o().shape({label:o().node.isRequired,position:o().string})),items:o().arrayOf(o().shape({color:o().string,label:o().node.isRequired,value:o().node})),title:o().node,className:o().string};export{c as Legend};
@@ -3,7 +3,7 @@
3
3
  * Storybook: https://mangrove.undrr.org/
4
4
  * LLMs context: https://mangrove.undrr.org/llms.txt
5
5
  * Repository: https://github.com/PreventionWeb/undrr-mangrove
6
- * Compiled on: 2026-10-17T14:23:48.871Z
6
+ * Compiled on: 2026-10-27T09:44:34.250Z
7
7
  */
8
8
  /*! For license information please see Loader.js.LICENSE.txt */
9
9
  import*as e from"react";var r={2694(e,r,t){var n=t(6925);function o(){}function a(){}a.resetWarningCache=o,e.exports=function(){function e(e,r,t,o,a,s){if(s!==n){var i=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw i.name="Invariant Violation",i}}function r(){return e}e.isRequired=e;var t={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:r,element:e,elementType:e,instanceOf:r,node:e,objectOf:r,oneOf:r,oneOfType:r,shape:r,exact:r,checkPropTypes:a,resetWarningCache:o};return t.PropTypes=t,t}},5556(e,r,t){e.exports=t(2694)()},6925(e){e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},9698(e,r){var t=Symbol.for("react.transitional.element");Symbol.for("react.fragment"),r.jsx=function(e,r,n){var o=null;if(void 0!==n&&(o=""+n),void 0!==r.key&&(o=""+r.key),"key"in r)for(var a in n={},r)"key"!==a&&(n[a]=r[a]);else n=r;return r=n.ref,{$$typeof:t,type:e,key:o,ref:void 0!==r?r:null,props:n}}},4848(e,r,t){e.exports=t(9698)},1649(r,t,n){r.exports=(e=>{const r={};return n.d(r,e),r})({useEffect:()=>e.useEffect,useState:()=>e.useState})}};const t={};function n(e){const o=t[e];if(void 0!==o)return o.exports;const a=t[e]={exports:{}};return r[e](a,a.exports,n),a.exports}n.n=e=>{const r=e&&e.__esModule?()=>e.default:()=>e;return n.d(r,{a:r}),r},n.d=(e,r)=>{if(Array.isArray(r))for(var t=0;t<r.length;){var o=r[t++],a=r[t++],s=0===a?{enumerable:!0,value:r[t++]}:{enumerable:!0,get:a};n.o(e,o)||Object.defineProperty(e,o,s)}else for(var o in r)n.o(r,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:r[o]})},n.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r);let o={};n.d(o,{aH:()=>p});var a=n(1649),s=n(5556),i=n.n(s),l=n(4848);const c=100;function p({label:e="Loading",size:r="default",decorative:t=!1,className:n=""}){const[o,s]=(0,a.useState)(!1);(0,a.useEffect)(()=>{if(t)return;const e=setTimeout(()=>s(!0),c);return()=>clearTimeout(e)},[t]);const i="inline"===r?"span":"div",p=["mg-loader","inline"===r&&"mg-loader--inline",n].filter(Boolean).join(" ");return t?(0,l.jsx)(i,{className:p,"aria-hidden":"true"}):(0,l.jsx)(i,{className:p,role:"status",children:o&&(0,l.jsx)("span",{className:"mg-u-sr-only",children:e})})}p.propTypes={label:i().string,size:i().oneOf(["default","inline"]),decorative:i().bool,className:i().string};const u=p;n.d(o,["Ay",0,u,"MD",0,c]);const f=o.Ay;export{c as LOADER_LABEL_DELAY_MS,p as Loader,f as default};
@@ -3,7 +3,7 @@
3
3
  * Storybook: https://mangrove.undrr.org/
4
4
  * LLMs context: https://mangrove.undrr.org/llms.txt
5
5
  * Repository: https://github.com/PreventionWeb/undrr-mangrove
6
- * Compiled on: 2026-10-17T14:23:48.871Z
6
+ * Compiled on: 2026-10-27T09:44:34.250Z
7
7
  */
8
8
  /*! For license information please see MegaMenu.js.LICENSE.txt */
9
- import{useEffect as e,useId as t,useLayoutEffect as n,useRef as r,useState as i}from"react";var a={2694(e,t,n){var r=n(6925);function i(){}function a(){}a.resetWarningCache=i,e.exports=function(){function e(e,t,n,i,a,o){if(o!==r){var l=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw l.name="Invariant Violation",l}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:a,resetWarningCache:i};return n.PropTypes=n,n}},5556(e,t,n){e.exports=n(2694)()},6925(e){e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}};const o={};function l(e){const t=o[e];if(void 0!==t)return t.exports;const n=o[e]={exports:{}};return a[e](n,n.exports,l),n.exports}l.n=e=>{const t=e&&e.__esModule?()=>e.default:()=>e;return l.d(t,{a:t}),t},l.cw=e=>{var t;return()=>{if(e){var n=e;e=0,t={exports:{}},n.call(t.exports,t,t.exports)}return t.exports}},l.d=(e,t)=>{for(var n in t)l.o(t,n)&&!l.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},l.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var s=l.cw(function(e,t){var n=Symbol.for("react.transitional.element"),r=Symbol.for("react.fragment");function i(e,t,r){var i=null;if(void 0!==r&&(i=""+r),void 0!==t.key&&(i=""+t.key),"key"in t)for(var a in r={},t)"key"!==a&&(r[a]=t[a]);else r=t;return t=r.ref,{$$typeof:n,type:e,key:i,ref:void 0!==t?t:null,props:r}}t.Fragment=r,t.jsx=i,t.jsxs=i}),c=l.cw(function(e,t){e.exports=s()}),m=l(5556),u=l.n(m);function d({section:t,isActive:n,index:a,sectionListRef:o,itemListRef:l}){const[c,m]=i(0),[u,d]=i(0),[g,b]=i([]),p=t?.title||"Menu section",h=r(null),f=r(null),v=e=>{if(["ArrowDown","ArrowUp","ArrowLeft","ArrowRight"].includes(e.key)&&(e.preventDefault(),e.stopPropagation()),"ArrowDown"!==e.key&&"Tab"!==e.key||(u<g?.length-1?d(e=>e+1):(d(0),l.current?.[a+1]?.focus())),("ArrowUp"===e.key||e.shiftKey&&"Tab"===e.key)&&(u>0?d(e=>e-1):(l.current?.[a]?.focus(),d(0))),h.current&&("ArrowLeft"===e.key&&d(0),"ArrowRight"===e.key)){const e=f.current,t=e?.querySelector("ul > li > a");if(t){e.setAttribute("tabindex","-1"),t.focus();const n=g.findIndex(e=>e===t);-1!==n&&d(n)}else{f.current?.focus();const e=g.filter(e=>e===f.current);e[0]&&d(g.indexOf(e[0]))}}};return e(()=>{const e=o?.current?.[a]?.querySelectorAll("audio, button, a, canvas, details, iframe, input, select, summary, textarea, video, [tabindex]");b(Array.from(e||[]))},[o,a,c]),e(()=>{g.length>0&&u>=0&&g[u]?.focus()},[u]),(0,s().jsxs)(s().Fragment,{children:[t&&t.items&&(0,s().jsxs)("article",{className:"mg-mega-content | mg-container-full-width","aria-label":p,"aria-live":"polite","aria-hidden":!n,inert:!n||void 0,tabIndex:0,ref:e=>{o.current[a]=e},onKeyDown:v,role:"region",children:[t.bannerHeading&&t.bannerDescription&&t.items&&(0,s().jsxs)("nav",{className:"mg-mega-content__left","aria-label":`${p} categories`,ref:h,tabIndex:0,children:[(0,s().jsxs)("section",{className:"mg-mega-content__banner",children:[(0,s().jsx)("header",{children:t.bannerHeading}),t.bannerDescription.includes("<")?(0,s().jsx)("div",{dangerouslySetInnerHTML:{__html:t.bannerDescription}}):(0,s().jsx)("p",{children:t.bannerDescription}),t.bannerButton?.label&&(0,s().jsx)("a",{href:t.bannerButton.url,className:"mg-button mg-button-primary",children:t.bannerButton.label})]}),t.items.length>0&&t.items[0].items&&t.items[0].items.length>0?(0,s().jsx)("ul",{className:"mg-mega-content__section-list",role:"menu","aria-label":"Categories",children:t.items.map((e,t)=>(0,s().jsx)("li",{className:"mg-mega-content__section-list-item",onMouseEnter:()=>m(t),role:"none",children:(0,s().jsx)("a",{className:"mg-mega-content__section-list-link "+(c===t?"mg-mega-content__section-list-link--active":""),href:e.url,"aria-current":c===t?"page":void 0,onFocus:()=>m(t),role:"menuitem","aria-haspopup":e.items&&e.items.length>0?"true":void 0,children:e.title})},t))}):null]}),t.items&&(0,s().jsxs)("nav",{className:"mg-mega-content__right","aria-label":`${p} submenu`,ref:f,tabIndex:0,children:[(0,s().jsx)("ul",{role:"menu","aria-label":"Submenu items",className:"mg-mega-content__menu--mobile",children:t.items.map((e,t)=>(0,s().jsxs)("li",{role:"none",children:[(0,s().jsx)("a",{href:e.url,role:"menuitem","aria-haspopup":e.items?"true":void 0,children:e.title}),e.items&&e.items.length>0&&(0,s().jsx)("ul",{role:"menu","aria-label":`${e.title} submenu`,children:e.items.map((e,t)=>(0,s().jsxs)("li",{role:"none",children:[(0,s().jsx)("a",{href:e.url,role:"menuitem","aria-haspopup":e.items?"true":void 0,children:e.title}),e.items&&(0,s().jsx)("ul",{role:"menu","aria-label":`${e.title} nested submenu`,children:e.items.map((e,t)=>(0,s().jsx)("li",{role:"none",children:(0,s().jsx)("a",{href:e.url,role:"menuitem",children:e.title})},t))})]},t))})]},t))}),(0,s().jsx)("ul",{role:"menu","aria-label":"Submenu items",className:"mg-mega-content__menu--desktop",children:t.items[c]?.items?t.items[c].items.map((e,t)=>(0,s().jsxs)("li",{role:"none",children:[(0,s().jsx)("a",{href:e.url,role:"menuitem","aria-haspopup":e.items?"true":void 0,children:e.title}),e.items&&(0,s().jsx)("ul",{role:"menu","aria-label":`${e.title} submenu`,children:e.items.map((e,t)=>(0,s().jsx)("li",{role:"none",children:(0,s().jsx)("a",{href:e.url,role:"menuitem",children:e.title})},t))})]},t)):t.items.map((e,t)=>(0,s().jsx)("li",{role:"none",children:(0,s().jsx)("a",{href:e.url,role:"menuitem",children:e.title})},t))})]})]}),t&&!t.items&&t.bannerDescription&&(0,s().jsx)("article",{className:"mg-mega-content | mg-container-full-width","aria-live":"polite","aria-hidden":!n,inert:!n||void 0,"aria-label":p,tabIndex:0,ref:e=>{o.current[a]=e},dangerouslySetInnerHTML:{__html:t.bannerDescription},onKeyDown:v})]})}function g({inert:e,title:t,icon:n,onMouseEnter:r,activeItem:i,link:a,bannerDescription:o,handleOnKeyDown:l,ref:c,section:m,sectionListRef:u,itemListRef:g,index:b}){const p=b===i,h=Boolean(m&&m.items),f=(0,s().jsxs)(s().Fragment,{children:[n&&(0,s().jsx)("span",{className:`mg-mega-topbar__item-icon ${n}`,"aria-hidden":"true"}),t]});return(0,s().jsxs)("li",{inert:!!e||void 0,"aria-hidden":!!e||void 0,className:"mg-mega-topbar__item "+(p?"mg-mega-topbar__item--active":""),onMouseEnter:m||o?r:void 0,onFocus:r,onKeyDown:l,children:[a&&a.url?(0,s().jsx)("a",{className:"mg-mega-topbar__item-link",href:a.url,ref:c,"aria-expanded":h?String(p):void 0,children:f}):(0,s().jsx)("button",{className:"mg-mega-topbar__item-link",ref:c,"aria-expanded":h?String(p):void 0,children:f}),(0,s().jsx)(d,{section:m,isActive:p,index:b,sectionListRef:u,itemListRef:g})]})}function b({onClick:e,isOpen:t,sidebarId:n,labels:r}){return(0,s().jsx)("button",{className:"mg-mega-topbar-mobile__icon-button",onClick:e,"aria-label":t?r.closeMobileNavLabel:r.toggleMobileNavLabel,"aria-expanded":t,"aria-controls":n,"aria-haspopup":"dialog",children:(0,s().jsx)("span",{className:"mg-icon "+(t?"mg-icon-angle-circled-left":"mg-icon-menu"),"aria-hidden":"true"})})}function p({isMobile:t,sidebarId:n,labels:i,handleItemHover:a,toggleShowSidebar:o,showSidebar:l,sections:c,activeItem:m,activateItem:u,sectionListRef:d,itemListRef:p,logoSrc:h,logoAlt:f="",logoHref:v="/",logoWidth:x,logoHeight:y}){const _=r(null);e(()=>{_.current===m&&(d.current?.[m]?.focus(),_.current=null)},[m,d]);const j=c.map((e,n)=>(0,s().jsx)(g,{inert:t,index:n,ref:e=>{p.current[n]=e},title:e.title,icon:e.icon,bannerDescription:e.bannerDescription,link:e.bannerButton,onMouseEnter:()=>a(n),activeItem:m,section:e,handleOnKeyDown:e=>{((e,t)=>{["ArrowDown","ArrowUp","ArrowLeft","ArrowRight"].includes(e.key)&&e.preventDefault();const n=p?.current;"ArrowLeft"===e.key&&t>=1&&n[t-1].focus(),"ArrowRight"===e.key&&t<n?.length-1&&n[t+1].focus(),"ArrowDown"===e.key&&d.current?.[t]&&(m===t?d.current[t].focus():(_.current=t,u(t)))})(e,n)},sectionListRef:d,itemListRef:p,children:e.sections},n));return h?(0,s().jsxs)("div",{className:"mg-mega-topbar mg-mega-topbar--branded | mg-container-full-width",children:[(0,s().jsx)("a",{className:"mg-mega-topbar__logo",href:v,"aria-label":f||"Home",children:(0,s().jsx)("img",{className:"mg-mega-topbar__logo-img",src:h,alt:f,...null!=x?{width:x}:{},...null!=y?{height:y}:{}})}),(0,s().jsx)(b,{sidebarId:n,labels:i,isOpen:l,onClick:()=>o()}),(0,s().jsx)("ul",{className:"mg-mega-topbar__nav",children:j})]}):(0,s().jsxs)("ul",{className:"mg-mega-topbar | mg-container-full-width",children:[(0,s().jsx)("li",{className:"mg-mega-topbar__mobile-trigger",children:(0,s().jsx)(b,{sidebarId:n,labels:i,isOpen:l,onClick:()=>o()})}),j]})}c();const h=[];function f({sections:e,open:a,present:o=a,onClose:l,labels:c,id:m}){const[u,d]=i(h),g=r(null),b=r(null),p=r(null),f=r(null),v=r([]),x=r(null),y=t();let _=null,j=e,w=!0;for(const e of u){if(_=j?.[e],!_){w=!1;break}j=_.items||[]}n(()=>{w||(v.current=[],x.current=null,d(h))},[w]),n(()=>{if(!a){const e=b.current?.closest(".mg-mega-wrapper"),t=window.matchMedia?.("(min-width: 900px)").matches,n=t?e?.querySelector(".mg-mega-topbar__item-link"):g.current;return g.current&&n?.focus(),void(g.current=null)}d(h),v.current=[],x.current=null;const e=b.current.closest(".mg-mega-wrapper")?.querySelector(".mg-mega-topbar-mobile__icon-button")||document.activeElement;g.current=e;const t=e=>{b.current?.contains(e.target)||p.current?.focus()};document.addEventListener("focusin",t);const n=document.body.style.overflow;return document.body.style.overflow="hidden",p.current?.focus(),()=>{document.removeEventListener("focusin",t),document.body.style.overflow=n,e?.isConnected&&e.focus()}},[a]),n(()=>{o||(d(h),v.current=[],x.current=null)},[o]),n(()=>{if(!a)return;const e=x.current;e?(f.current?.querySelectorAll("[data-mg-menu-entry]")[e.index]?.focus({preventScroll:!0}),b.current.scrollTop=e.scrollTop,x.current=null):(b.current.scrollTop=0,p.current?.focus())},[u,a]),n(()=>{a&&!b.current?.contains(document.activeElement)&&p.current?.focus()});const L=_?.url||_?.bannerButton?.url;return(0,s().jsxs)("div",{id:m,ref:b,className:"mg-mega-mobile-sidebar mg-mega-mobile-sidebar--progressive"+(a?" mg-mega-mobile-sidebar--open":""),role:"dialog","aria-modal":a?"true":void 0,"aria-labelledby":y,hidden:!o,"aria-hidden":!a,inert:!a||void 0,onKeyDown:e=>{if("Escape"===e.key&&(e.stopPropagation(),e.preventDefault(),l()),"Tab"===e.key){const t=Array.from(b.current.querySelectorAll('a[href], button, input, select, textarea, summary, iframe, [contenteditable="true"], [tabindex], audio[controls], video[controls]')).filter(e=>{if(e.tabIndex<0||e.matches(':disabled, input[type="hidden"]')||e.closest("[hidden], [inert]"))return!1;for(let t=e.parentElement?.closest("details:not([open])");t;t=t.parentElement?.closest("details:not([open])"))if(t.querySelector(":scope > summary")!==e)return!1;for(let t=e;t&&t!==b.current;t=t.parentElement){const e=window.getComputedStyle(t);if("none"===e.display||"hidden"===e.visibility)return!1}return!0}),n=t[0],r=t.at(-1);!e.shiftKey||document.activeElement!==n&&document.activeElement!==p.current?e.shiftKey||document.activeElement!==r||(e.preventDefault(),n?.focus()):(e.preventDefault(),r?.focus())}},children:[(0,s().jsx)("div",{className:"mg-mega-mobile-sidebar__header",children:(0,s().jsxs)("button",{className:"mg-mega-mobile-sidebar__close",onClick:l,"aria-label":c.closeMobileNavLabel,children:[c.closeLabel,(0,s().jsx)("span",{"aria-hidden":"true",children:"×"})]})}),(0,s().jsxs)("div",{className:"mg-mega-mobile-sidebar__page"+(u.length?" mg-mega-mobile-sidebar__page--section":""),children:[u.length>0&&(0,s().jsxs)("button",{className:"mg-mega-mobile-sidebar__back",onClick:()=>{x.current=v.current.pop(),d(e=>e.slice(0,-1))},children:[(0,s().jsx)("span",{className:"mg-mega-mobile-sidebar__arrow","aria-hidden":"true",children:"←"}),c.backLabel]}),(0,s().jsx)("h2",{id:y,ref:p,tabIndex:-1,className:"mg-mega-mobile-sidebar__title",children:L?(0,s().jsx)("a",{className:"mg-mega-mobile-sidebar__title-link",href:L,children:_.title}):_?.title||c.allSectionsLabel}),_?.url&&_.bannerButton?.url&&_.url!==_.bannerButton.url&&(0,s().jsx)("a",{className:"mg-mega-mobile-sidebar__overview",href:_.bannerButton.url,children:_.bannerButton.label||c.overviewLabel}),j?.length>0&&(0,s().jsx)("ul",{ref:f,className:"mg-mega-sidebar__list",children:(j||[]).map((e,t)=>(0,s().jsx)("li",{className:"mg-mega-sidebar-section",children:e.items?.length>0||e.bannerDescription?(0,s().jsxs)("button",{className:"mg-mega-sidebar-section__item","data-mg-menu-entry":!0,onClick:()=>(e=>{v.current.push({index:e,scrollTop:b.current.scrollTop}),d(t=>[...t,e])})(t),children:[e.title,(0,s().jsx)("svg",{className:"mg-mega-mobile-sidebar__chevron",width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",focusable:"false",children:(0,s().jsx)("path",{d:"m9 6 6 6-6 6"})})]}):(0,s().jsx)("a",{className:"mg-mega-sidebar-section__item","data-mg-menu-entry":!0,href:e.url||e.bannerButton?.url||"#",children:e.title})},t))}),_?.bannerDescription&&(0,s().jsxs)("div",{className:"mg-mega-mobile-sidebar__intro",children:[_.bannerHeading&&_.bannerHeading!==_.title&&(0,s().jsx)("h3",{children:_.bannerHeading}),(0,s().jsx)("div",{dangerouslySetInnerHTML:{__html:_.bannerDescription}})]})]},u.join("-"))]})}const v={navLabel:"Main Navigation",closeMobileNavLabel:"Close mobile navigation",menuLabel:"Menu",backLabel:"Back",allSectionsLabel:"All sections",closeLabel:"Close",overviewLabel:"Overview",toggleMobileNavLabel:"Open navigation menu"},x=({sections:n,delay:a=300,hoverDelay:o=180,logoSrc:l,logoAlt:c="",logoHref:m="/",logoWidth:u,logoHeight:d,labels:g=v})=>{const b={...v,...g},{navLabel:h,closeMobileNavLabel:x}=b,y=t(),_=r(null),[j,w]=i(!1),[L,k]=i(!1),N=j||L,[S,D]=i(null),[T,I]=i(!1),[A,E]=i(!1),H=r([]),M=r([]);e(()=>{if(j)return void k(!0);if(!L)return;const e=_.current?.querySelector(".mg-mega-mobile-sidebar"),t=e&&e.ownerDocument.defaultView.getComputedStyle(e),n=e=>(parseFloat(e)||0)*(e.trim().endsWith("ms")?1:1e3),r=(t?.transitionDuration||"0s").split(",").map(n),i=(t?.transitionDelay||"0s").split(",").map(n),a=(t?.transitionProperty||"all").split(","),o=Math.max(0,...a.map((e,t)=>"none"===e.trim()?0:r[t%r.length]+i[t%i.length])),l=setTimeout(()=>k(!1),o);return()=>clearTimeout(l)},[j,L]);const R=r(null),O=r(null);e(()=>{E(!0)},[]),e(()=>()=>{clearTimeout(R.current),clearTimeout(O.current)},[]);const C=()=>{const e=_.current?.ownerDocument.activeElement;_.current?.contains(e)&&e.closest(".mg-mega-content")&&(e.closest(".mg-mega-topbar__item")?.querySelector(".mg-mega-topbar__item-link")?.focus(),clearTimeout(O.current))};return e(()=>{const e=e=>{const t=_.current;t&&!t.contains(e.target)&&(C(),D(null))};if(null!==S)return document.addEventListener("click",e),()=>{document.removeEventListener("click",e)}},[S]),e(()=>{if(!window.matchMedia)return;const e=window.matchMedia("(min-width: 900px)"),t=()=>{I(!e.matches),e.matches&&w(!1)};return t(),e.addEventListener("change",t),()=>e.removeEventListener("change",t)},[]),(0,s().jsxs)("nav",{ref:_,className:`mg-mega-wrapper${A?" mg-mega-wrapper--js-active":""}${N?" mg-mega-wrapper--mobile-open":""}`,onMouseLeave:()=>{clearTimeout(O.current),R.current=setTimeout(()=>{C(),D(null)},a)},onKeyDown:e=>{if("Escape"===e.key){const t=e.target.closest(".mg-mega-content");t?.closest(".mg-mega-topbar__item")?.querySelector(".mg-mega-topbar__item-link")?.focus(),clearTimeout(O.current),D(null)}},"aria-label":h,children:[(0,s().jsx)(p,{isMobile:T,sidebarId:y,labels:b,sections:n,handleItemHover:e=>{clearTimeout(R.current),clearTimeout(O.current),O.current=setTimeout(()=>{const t=_.current?.ownerDocument.activeElement;_.current?.contains(t)&&t.closest(".mg-mega-content")&&t.closest(".mg-mega-topbar__item")!==H.current[e]?.closest(".mg-mega-topbar__item")&&(H.current[e]?.focus(),clearTimeout(O.current)),D(e)},o)},toggleShowSidebar:()=>w(e=>!e),showSidebar:j,activeItem:S,activateItem:D,itemListRef:H,sectionListRef:M,logoSrc:l,logoAlt:c,logoHref:m,logoWidth:u,logoHeight:d}),N&&(0,s().jsx)("button",{className:"mg-mega-mobile-sidebar-overlay"+(j?" mg-mega-mobile-sidebar-overlay--open":""),"aria-hidden":!j,"aria-label":x,tabIndex:-1,onClick:()=>w(!1)}),(0,s().jsx)(f,{id:y,labels:b,onClose:()=>w(!1),present:N,open:j,sections:n})]})};x.propTypes={sections:u().arrayOf(u().shape({title:u().string.isRequired,icon:u().string,bannerHeading:u().string,bannerDescription:u().string,bannerButton:u().shape({label:u().string,url:u().string}),items:u().arrayOf(u().shape({title:u().string.isRequired,url:u().string,items:u().array}))})).isRequired,delay:u().number,hoverDelay:u().number,logoSrc:u().string,logoAlt:u().string,logoHref:u().string,logoWidth:u().number,logoHeight:u().number,labels:u().shape({navLabel:u().string,closeMobileNavLabel:u().string,menuLabel:u().string,backLabel:u().string,allSectionsLabel:u().string,closeLabel:u().string,overviewLabel:u().string,toggleMobileNavLabel:u().string})};const y=x;function _(e){const{dataset:t}=e,n={delay:t.delay?parseInt(t.delay,10):300,hoverDelay:t.hoverDelay?parseInt(t.hoverDelay,10):180};if(t.logoSrc&&(n.logoSrc=t.logoSrc),t.logoAlt&&(n.logoAlt=t.logoAlt),t.logoHref&&(n.logoHref=t.logoHref),t.logoWidth&&(n.logoWidth=parseInt(t.logoWidth,10)),t.logoHeight&&(n.logoHeight=parseInt(t.logoHeight,10)),t.sections)try{n.sections=JSON.parse(t.sections)}catch{n.sections=[]}return n}export{y as default,_ as fromElement};
9
+ import{useEffect as e,useId as t,useLayoutEffect as r,useRef as n,useState as a}from"react";var l={2694(e,t,r){var n=r(6925);function a(){}function l(){}l.resetWarningCache=a,e.exports=function(){function e(e,t,r,a,l,o){if(o!==n){var i=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw i.name="Invariant Violation",i}}function t(){return e}e.isRequired=e;var r={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:l,resetWarningCache:a};return r.PropTypes=r,r}},5556(e,t,r){e.exports=r(2694)()},6925(e){e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}};const o={};function i(e){const t=o[e];if(void 0!==t)return t.exports;const r=o[e]={exports:{}};return l[e](r,r.exports,i),r.exports}i.n=e=>{const t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},i.cw=e=>{var t;return()=>{if(e){var r=e;e=0,t={exports:{}},r.call(t.exports,t,t.exports)}return t.exports}},i.d=(e,t)=>{for(var r in t)i.o(t,r)&&!i.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var s=i.cw(function(e,t){var r=Symbol.for("react.transitional.element"),n=Symbol.for("react.fragment");function a(e,t,n){var a=null;if(void 0!==n&&(a=""+n),void 0!==t.key&&(a=""+t.key),"key"in t)for(var l in n={},t)"key"!==l&&(n[l]=t[l]);else n=t;return t=n.ref,{$$typeof:r,type:e,key:a,ref:void 0!==t?t:null,props:n}}t.Fragment=n,t.jsx=a,t.jsxs=a}),c=i.cw(function(e,t){e.exports=s()});const u={en:"ltr",ar:"rtl",es:"ltr",fr:"ltr",ja:"ltr",ru:"ltr",zh:"ltr"};function m(e="en"){return String(e).trim().toLowerCase().split(/[-_]/)[0]}function d(e,t){const r=m(e),n=void 0!==e&&Object.hasOwn(u,r)?u[r]:void 0,a=void 0===t?n:t;return{...void 0===e?{}:{lang:e},...void 0===a?{}:{dir:a}}}function g(e){const t=e.dataset.lang??e.closest("[lang]")?.getAttribute("lang"),r=e.getAttribute("dir")?.toLowerCase();return{...null==t?{}:{lang:t},...["ltr","rtl","auto"].includes(r)?{dir:r}:{}}}const b=(p={navLabel:"Main Navigation",closeMobileNavLabel:"Close mobile navigation",menuLabel:"Menu",backLabel:"Back",allSectionsLabel:"All sections",closeLabel:"Close",overviewLabel:"Overview",toggleMobileNavLabel:"Open navigation menu"},h={ar:{backLabel:"رجوع",menuLabel:"القائمة",allSectionsLabel:"جميع الأقسام",closeLabel:"إغلاق",overviewLabel:"نظرة عامة",toggleMobileNavLabel:"فتح قائمة التنقل",navLabel:"التنقل الرئيسي",closeMobileNavLabel:"إغلاق قائمة التنقل للجوال"},es:{backLabel:"Atrás",menuLabel:"Menú",allSectionsLabel:"Todas las secciones",closeLabel:"Cerrar",overviewLabel:"Resumen",toggleMobileNavLabel:"Abrir navegación",navLabel:"Navegación principal",closeMobileNavLabel:"Cerrar navegación móvil"},fr:{backLabel:"Retour",menuLabel:"Menu",allSectionsLabel:"Toutes les rubriques",closeLabel:"Fermer",overviewLabel:"Présentation",toggleMobileNavLabel:"Ouvrir la navigation",navLabel:"Navigation principale",closeMobileNavLabel:"Fermer la navigation mobile"},ja:{backLabel:"戻る",menuLabel:"メニュー",allSectionsLabel:"すべてのセクション",closeLabel:"閉じる",overviewLabel:"概要",toggleMobileNavLabel:"ナビゲーションを開く",navLabel:"メインナビゲーション",closeMobileNavLabel:"モバイルナビゲーションを閉じる"},ru:{backLabel:"Назад",menuLabel:"Меню",allSectionsLabel:"Все разделы",closeLabel:"Закрыть",overviewLabel:"Обзор",toggleMobileNavLabel:"Открыть навигацию",navLabel:"Основная навигация",closeMobileNavLabel:"Закрыть мобильную навигацию"},zh:{backLabel:"返回",menuLabel:"菜单",allSectionsLabel:"所有栏目",closeLabel:"关闭",overviewLabel:"概览",toggleMobileNavLabel:"打开导航",navLabel:"主导航",closeMobileNavLabel:"关闭移动导航"}},(e,t)=>{const r=m(e),n=Object.hasOwn(h,r)?h[r]:void 0,a=Object.fromEntries(Object.entries(t??{}).filter(([,e])=>void 0!==e));return{...p,...n,...a}});var p,h,f=i(5556),v=i.n(f);function x({section:t,isActive:r,index:l,sectionListRef:o,itemListRef:i}){const[c,u]=a(0),[m,d]=a(0),[g,b]=a([]),p=t?.title||"Menu section",h=n(null),f=n(null),v=e=>{if(["ArrowDown","ArrowUp","ArrowLeft","ArrowRight"].includes(e.key)&&(e.preventDefault(),e.stopPropagation()),"ArrowDown"!==e.key&&"Tab"!==e.key||(m<g?.length-1?d(e=>e+1):(d(0),i.current?.[l+1]?.focus())),("ArrowUp"===e.key||e.shiftKey&&"Tab"===e.key)&&(m>0?d(e=>e-1):(i.current?.[l]?.focus(),d(0))),h.current&&("ArrowLeft"===e.key&&d(0),"ArrowRight"===e.key)){const e=f.current,t=e?.querySelector("ul > li > a");if(t){e.setAttribute("tabindex","-1"),t.focus();const r=g.findIndex(e=>e===t);-1!==r&&d(r)}else{f.current?.focus();const e=g.filter(e=>e===f.current);e[0]&&d(g.indexOf(e[0]))}}};return e(()=>{const e=o?.current?.[l]?.querySelectorAll("audio, button, a, canvas, details, iframe, input, select, summary, textarea, video, [tabindex]");b(Array.from(e||[]))},[o,l,c]),e(()=>{g.length>0&&m>=0&&g[m]?.focus()},[m]),(0,s().jsxs)(s().Fragment,{children:[t&&t.items&&(0,s().jsxs)("article",{className:"mg-mega-content | mg-container-full-width","aria-label":p,"aria-live":"polite","aria-hidden":!r,inert:!r||void 0,tabIndex:0,ref:e=>{o.current[l]=e},onKeyDown:v,role:"region",children:[t.bannerHeading&&t.bannerDescription&&t.items&&(0,s().jsxs)("nav",{className:"mg-mega-content__left","aria-label":`${p} categories`,ref:h,tabIndex:0,children:[(0,s().jsxs)("section",{className:"mg-mega-content__banner",children:[(0,s().jsx)("header",{children:t.bannerHeading}),t.bannerDescription.includes("<")?(0,s().jsx)("div",{dangerouslySetInnerHTML:{__html:t.bannerDescription}}):(0,s().jsx)("p",{children:t.bannerDescription}),t.bannerButton?.label&&(0,s().jsx)("a",{href:t.bannerButton.url,className:"mg-button mg-button-primary",children:t.bannerButton.label})]}),t.items.length>0&&t.items[0].items&&t.items[0].items.length>0?(0,s().jsx)("ul",{className:"mg-mega-content__section-list",role:"menu","aria-label":"Categories",children:t.items.map((e,t)=>(0,s().jsx)("li",{className:"mg-mega-content__section-list-item",onMouseEnter:()=>u(t),role:"none",children:(0,s().jsx)("a",{className:"mg-mega-content__section-list-link "+(c===t?"mg-mega-content__section-list-link--active":""),href:e.url,"aria-current":c===t?"page":void 0,onFocus:()=>u(t),role:"menuitem","aria-haspopup":e.items&&e.items.length>0?"true":void 0,children:e.title})},t))}):null]}),t.items&&(0,s().jsxs)("nav",{className:"mg-mega-content__right","aria-label":`${p} submenu`,ref:f,tabIndex:0,children:[(0,s().jsx)("ul",{role:"menu","aria-label":"Submenu items",className:"mg-mega-content__menu--mobile",children:t.items.map((e,t)=>(0,s().jsxs)("li",{role:"none",children:[(0,s().jsx)("a",{href:e.url,role:"menuitem","aria-haspopup":e.items?"true":void 0,children:e.title}),e.items&&e.items.length>0&&(0,s().jsx)("ul",{role:"menu","aria-label":`${e.title} submenu`,children:e.items.map((e,t)=>(0,s().jsxs)("li",{role:"none",children:[(0,s().jsx)("a",{href:e.url,role:"menuitem","aria-haspopup":e.items?"true":void 0,children:e.title}),e.items&&(0,s().jsx)("ul",{role:"menu","aria-label":`${e.title} nested submenu`,children:e.items.map((e,t)=>(0,s().jsx)("li",{role:"none",children:(0,s().jsx)("a",{href:e.url,role:"menuitem",children:e.title})},t))})]},t))})]},t))}),(0,s().jsx)("ul",{role:"menu","aria-label":"Submenu items",className:"mg-mega-content__menu--desktop",children:t.items[c]?.items?t.items[c].items.map((e,t)=>(0,s().jsxs)("li",{role:"none",children:[(0,s().jsx)("a",{href:e.url,role:"menuitem","aria-haspopup":e.items?"true":void 0,children:e.title}),e.items&&(0,s().jsx)("ul",{role:"menu","aria-label":`${e.title} submenu`,children:e.items.map((e,t)=>(0,s().jsx)("li",{role:"none",children:(0,s().jsx)("a",{href:e.url,role:"menuitem",children:e.title})},t))})]},t)):t.items.map((e,t)=>(0,s().jsx)("li",{role:"none",children:(0,s().jsx)("a",{href:e.url,role:"menuitem",children:e.title})},t))})]})]}),t&&!t.items&&t.bannerDescription&&(0,s().jsx)("article",{className:"mg-mega-content | mg-container-full-width","aria-live":"polite","aria-hidden":!r,inert:!r||void 0,"aria-label":p,tabIndex:0,ref:e=>{o.current[l]=e},dangerouslySetInnerHTML:{__html:t.bannerDescription},onKeyDown:v})]})}function y({isMobile:e,sidebarId:t,onMobileClick:r,title:n,icon:a,onMouseEnter:l,activeItem:o,link:i,bannerDescription:c,handleOnKeyDown:u,ref:m,section:d,sectionListRef:g,itemListRef:b,index:p}){const h=p===o,f=Boolean(d&&d.items),v=(0,s().jsxs)(s().Fragment,{children:[a&&(0,s().jsx)("span",{className:`mg-mega-topbar__item-icon ${a}`,"aria-hidden":"true"}),n]});return(0,s().jsxs)("li",{className:"mg-mega-topbar__item "+(h?"mg-mega-topbar__item--active":""),onMouseEnter:d||c?l:void 0,onFocus:e?void 0:l,onKeyDown:u,children:[e?(0,s().jsx)("button",{type:"button",className:"mg-mega-topbar__item-link",ref:m,onClick:r,"aria-haspopup":"dialog","aria-controls":t,children:v}):i&&i.url?(0,s().jsx)("a",{className:"mg-mega-topbar__item-link",href:i.url,ref:m,"aria-expanded":f?String(h):void 0,children:v}):(0,s().jsx)("button",{className:"mg-mega-topbar__item-link",ref:m,"aria-expanded":f?String(h):void 0,children:v}),(0,s().jsx)(x,{section:d,isActive:h,index:p,sectionListRef:g,itemListRef:b})]})}function L({onClick:e,isOpen:t,sidebarId:r,labels:n}){return(0,s().jsx)("button",{className:"mg-mega-topbar-mobile__icon-button",onClick:e,"aria-label":t?n.closeMobileNavLabel:n.toggleMobileNavLabel,"aria-expanded":t,"aria-controls":r,"aria-haspopup":"dialog",children:(0,s().jsx)("span",{className:"mg-icon "+(t?"mg-icon-angle-circled-left":"mg-icon-menu"),"aria-hidden":"true"})})}function _({isMobile:t,openMobileSection:r,sidebarId:a,labels:l,handleItemHover:o,toggleShowSidebar:i,showSidebar:c,sections:u,activeItem:m,activateItem:d,sectionListRef:g,itemListRef:b,logoSrc:p,logoAlt:h="",logoHref:f="/",logoWidth:v,logoHeight:x}){const _=function(e){const t=n(null),r=n(!1);return{onPointerDown(n){r.current=!1,e&&"mouse"===n.pointerType&&0===n.button&&(t.current={id:n.pointerId,startX:n.clientX,scrollLeft:n.currentTarget.scrollLeft,dragged:!1})},onPointerMove(n){const a=t.current;if(!e||!a||a.id!==n.pointerId)return;if(1!==n.buttons)return void(t.current=null);const l=n.clientX-a.startX;!a.dragged&&Math.abs(l)<8||(a.dragged||(a.dragged=!0,r.current=!0,n.currentTarget.setPointerCapture(n.pointerId)),n.preventDefault(),n.currentTarget.scrollLeft=a.scrollLeft-l)},onPointerLeave(){t.current?.dragged||(t.current=null)},onPointerUp(e){t.current=null,e.currentTarget.hasPointerCapture(e.pointerId)&&e.currentTarget.releasePointerCapture(e.pointerId)},onPointerCancel(){t.current=null},onLostPointerCapture(){t.current=null},onClickCapture(t){e&&r.current&&0!==t.detail&&(t.preventDefault(),t.stopPropagation())},onDragStart(t){e&&t.preventDefault()}}}(t),j=n(null);e(()=>{j.current===m&&(g.current?.[m]?.focus(),j.current=null)},[m,g]);const w=u.map((e,n)=>(0,s().jsx)(y,{isMobile:t,sidebarId:a,onMobileClick:e=>{e.currentTarget.focus({preventScroll:!0}),r(n)},index:n,ref:e=>{b.current[n]=e},title:e.title,icon:e.icon,bannerDescription:e.bannerDescription,link:e.bannerButton,onMouseEnter:()=>{t||o(n)},activeItem:m,section:e,handleOnKeyDown:e=>{t&&"ArrowDown"===e.key?(e.preventDefault(),e.currentTarget.querySelector("button")?.focus(),r(n)):((e,t)=>{["ArrowDown","ArrowUp","ArrowLeft","ArrowRight"].includes(e.key)&&e.preventDefault();const r=b?.current;if("ArrowLeft"===e.key||"ArrowRight"===e.key){const n="rtl"===window.getComputedStyle(e.currentTarget).direction,a=("ArrowRight"===e.key?1:-1)*(n?-1:1);r[t+a]?.focus()}"ArrowDown"===e.key&&g.current?.[t]&&(m===t?g.current[t].focus():(j.current=t,d(t)))})(e,n)},sectionListRef:g,itemListRef:b,children:e.sections},n));return p?(0,s().jsxs)("div",{className:"mg-mega-topbar mg-mega-topbar--branded | mg-container-full-width",children:[(0,s().jsx)("a",{className:"mg-mega-topbar__logo",href:f,"aria-label":h||"Home",children:(0,s().jsx)("img",{className:"mg-mega-topbar__logo-img",src:p,alt:h,...null!=v?{width:v}:{},...null!=x?{height:x}:{}})}),(0,s().jsx)(L,{sidebarId:a,labels:l,isOpen:c,onClick:()=>i()}),(0,s().jsx)("ul",{className:"mg-mega-topbar__nav",..._,children:w})]}):(0,s().jsxs)("div",{className:"mg-mega-topbar | mg-container-full-width",children:[(0,s().jsx)(L,{sidebarId:a,labels:l,isOpen:c,onClick:()=>i()}),(0,s().jsx)("ul",{className:"mg-mega-topbar__nav",..._,children:w})]})}c();const j=[];function w({sections:e,initialSection:l=null,open:o,present:i=o,onClose:c,labels:u,id:m}){const[d,g]=a(j),b=n(null),p=n(null),h=n(null),f=n(null),v=n([]),x=n(null),y=t();let L=null,_=e,w=!0;for(const e of d){if(L=_?.[e],!L){w=!1;break}_=L.items||[]}r(()=>{w||(v.current=[],x.current=null,g(j))},[w]),r(()=>{if(!o){const e=p.current?.closest(".mg-mega-wrapper"),t=window.matchMedia?.("(min-width: 900px)").matches,r=t?e?.querySelector(".mg-mega-topbar__item-link"):b.current;return b.current&&r?.focus(),void(b.current=null)}g(null===l?j:[l]),v.current=null===l?[]:[{index:l,scrollTop:0}],x.current=null;const e=document.activeElement,t=(e?.closest(".mg-mega-topbar")?e:null)||p.current.closest(".mg-mega-wrapper")?.querySelector(".mg-mega-topbar-mobile__icon-button")||document.activeElement;b.current=t;const r=e=>{p.current?.contains(e.target)||h.current?.focus()};document.addEventListener("focusin",r);const n=document.body.style.overflow;return document.body.style.overflow="hidden",h.current?.focus(),()=>{document.removeEventListener("focusin",r),document.body.style.overflow=n,t?.isConnected&&t.focus()}},[o,l]),r(()=>{i||(g(j),v.current=[],x.current=null)},[i]),r(()=>{if(!o)return;const e=x.current;e?(f.current?.querySelectorAll("[data-mg-menu-entry]")[e.index]?.focus({preventScroll:!0}),p.current.scrollTop=e.scrollTop,x.current=null):(p.current.scrollTop=0,h.current?.focus())},[d,o]),r(()=>{o&&!p.current?.contains(document.activeElement)&&h.current?.focus()});const k=L?.url||L?.bannerButton?.url;return(0,s().jsxs)("div",{id:m,ref:p,className:"mg-mega-mobile-sidebar mg-mega-mobile-sidebar--progressive"+(o?" mg-mega-mobile-sidebar--open":""),role:"dialog","aria-modal":o?"true":void 0,"aria-labelledby":y,hidden:!i,"aria-hidden":!o,inert:!o||void 0,onKeyDown:e=>{if("Escape"===e.key&&(e.stopPropagation(),e.preventDefault(),c()),"Tab"===e.key){const t=Array.from(p.current.querySelectorAll('a[href], button, input, select, textarea, summary, iframe, [contenteditable="true"], [tabindex], audio[controls], video[controls]')).filter(e=>{if(e.tabIndex<0||e.matches(':disabled, input[type="hidden"]')||e.closest("[hidden], [inert]"))return!1;for(let t=e.parentElement?.closest("details:not([open])");t;t=t.parentElement?.closest("details:not([open])"))if(t.querySelector(":scope > summary")!==e)return!1;for(let t=e;t&&t!==p.current;t=t.parentElement){const e=window.getComputedStyle(t);if("none"===e.display||"hidden"===e.visibility)return!1}return!0}),r=t[0],n=t.at(-1);!e.shiftKey||document.activeElement!==r&&document.activeElement!==h.current?e.shiftKey||document.activeElement!==n||(e.preventDefault(),r?.focus()):(e.preventDefault(),n?.focus())}},children:[(0,s().jsx)("div",{className:"mg-mega-mobile-sidebar__header",children:(0,s().jsxs)("button",{className:"mg-mega-mobile-sidebar__close",onClick:c,"aria-label":u.closeMobileNavLabel,children:[u.closeLabel,(0,s().jsx)("span",{"aria-hidden":"true",children:"×"})]})}),(0,s().jsxs)("div",{className:"mg-mega-mobile-sidebar__page"+(d.length?" mg-mega-mobile-sidebar__page--section":""),children:[d.length>0&&(0,s().jsxs)("button",{className:"mg-mega-mobile-sidebar__back",onClick:()=>{x.current=v.current.pop(),g(e=>e.slice(0,-1))},children:[(0,s().jsx)("span",{className:"mg-mega-mobile-sidebar__arrow","aria-hidden":"true",children:"←"}),u.backLabel]}),(0,s().jsx)("h2",{id:y,ref:h,tabIndex:-1,className:"mg-mega-mobile-sidebar__title",children:k?(0,s().jsx)("a",{className:"mg-mega-mobile-sidebar__title-link",href:k,children:L.title}):L?.title||u.allSectionsLabel}),L?.url&&L.bannerButton?.url&&L.url!==L.bannerButton.url&&(0,s().jsx)("a",{className:"mg-mega-mobile-sidebar__overview",href:L.bannerButton.url,children:L.bannerButton.label||u.overviewLabel}),_?.length>0&&(0,s().jsx)("ul",{ref:f,className:"mg-mega-sidebar__list",children:(_||[]).map((e,t)=>(0,s().jsx)("li",{className:"mg-mega-sidebar-section",children:e.items?.length>0||e.bannerDescription?(0,s().jsxs)("button",{className:"mg-mega-sidebar-section__item","data-mg-menu-entry":!0,onClick:()=>(e=>{v.current.push({index:e,scrollTop:p.current.scrollTop}),g(t=>[...t,e])})(t),children:[e.title,(0,s().jsx)("svg",{className:"mg-mega-mobile-sidebar__chevron",width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",focusable:"false",children:(0,s().jsx)("path",{d:"m9 6 6 6-6 6"})})]}):(0,s().jsx)("a",{className:"mg-mega-sidebar-section__item","data-mg-menu-entry":!0,href:e.url||e.bannerButton?.url||"#",children:e.title})},t))}),L?.bannerDescription&&(0,s().jsxs)("div",{className:"mg-mega-mobile-sidebar__intro",children:[L.bannerHeading&&L.bannerHeading!==L.title&&(0,s().jsx)("h3",{children:L.bannerHeading}),(0,s().jsx)("div",{dangerouslySetInnerHTML:{__html:L.bannerDescription}})]})]},d.join("-"))]})}const k=({sections:r,delay:l=300,hoverDelay:o=180,logoSrc:i,logoAlt:c="",logoHref:u="/",logoWidth:m,logoHeight:g,lang:p,dir:h,labels:f})=>{const v=b(p,f),{navLabel:x,closeMobileNavLabel:y}=v,L=t(),j=n(null),[k,N]=a(null),[S,D]=a(!1),[M,T]=a(!1),A=S||M,[I,C]=a(null),[E,O]=a(!1),[R,H]=a(!1),P=n([]),q=n([]);e(()=>{if(S)return void T(!0);if(!M)return;const e=j.current?.querySelector(".mg-mega-mobile-sidebar"),t=e&&e.ownerDocument.defaultView.getComputedStyle(e),r=e=>(parseFloat(e)||0)*(e.trim().endsWith("ms")?1:1e3),n=(t?.transitionDuration||"0s").split(",").map(r),a=(t?.transitionDelay||"0s").split(",").map(r),l=(t?.transitionProperty||"all").split(","),o=Math.max(0,...l.map((e,t)=>"none"===e.trim()?0:n[t%n.length]+a[t%a.length])),i=setTimeout(()=>T(!1),o);return()=>clearTimeout(i)},[S,M]);const B=n(null),W=n(null);e(()=>{H(!0)},[]),e(()=>()=>{clearTimeout(B.current),clearTimeout(W.current)},[]);const K=()=>{const e=j.current?.ownerDocument.activeElement;j.current?.contains(e)&&e.closest(".mg-mega-content")&&(e.closest(".mg-mega-topbar__item")?.querySelector(".mg-mega-topbar__item-link")?.focus(),clearTimeout(W.current))};return e(()=>{const e=e=>{const t=j.current;t&&!t.contains(e.target)&&(K(),C(null))};if(null!==I)return document.addEventListener("click",e),()=>{document.removeEventListener("click",e)}},[I]),e(()=>{if(!window.matchMedia)return;const e=window.matchMedia("(min-width: 900px)"),t=()=>{O(!e.matches),e.matches&&D(!1)};return t(),e.addEventListener("change",t),()=>e.removeEventListener("change",t)},[]),(0,s().jsxs)("nav",{...d(p,h),ref:j,className:`mg-mega-wrapper${R?" mg-mega-wrapper--js-active":""}${A?" mg-mega-wrapper--mobile-open":""}`,onMouseLeave:()=>{clearTimeout(W.current),B.current=setTimeout(()=>{K(),C(null)},l)},onKeyDown:e=>{if("Escape"===e.key){const t=e.target.closest(".mg-mega-content");t?.closest(".mg-mega-topbar__item")?.querySelector(".mg-mega-topbar__item-link")?.focus(),clearTimeout(W.current),C(null)}},"aria-label":x,children:[(0,s().jsx)(_,{isMobile:E,openMobileSection:e=>{N(e),D(!0)},sidebarId:L,labels:v,sections:r,handleItemHover:e=>{clearTimeout(B.current),clearTimeout(W.current),W.current=setTimeout(()=>{const t=j.current?.ownerDocument.activeElement;j.current?.contains(t)&&t.closest(".mg-mega-content")&&t.closest(".mg-mega-topbar__item")!==P.current[e]?.closest(".mg-mega-topbar__item")&&(P.current[e]?.focus(),clearTimeout(W.current)),C(e)},o)},toggleShowSidebar:()=>{N(null),D(e=>!e)},showSidebar:S,activeItem:I,activateItem:C,itemListRef:P,sectionListRef:q,logoSrc:i,logoAlt:c,logoHref:u,logoWidth:m,logoHeight:g}),A&&(0,s().jsx)("button",{className:"mg-mega-mobile-sidebar-overlay"+(S?" mg-mega-mobile-sidebar-overlay--open":""),"aria-hidden":!S,"aria-label":y,tabIndex:-1,onClick:()=>D(!1)}),(0,s().jsx)(w,{initialSection:k,id:L,labels:v,onClose:()=>D(!1),present:A,open:S,sections:r})]})};k.propTypes={sections:v().arrayOf(v().shape({title:v().string.isRequired,icon:v().string,bannerHeading:v().string,bannerDescription:v().string,bannerButton:v().shape({label:v().string,url:v().string}),items:v().arrayOf(v().shape({title:v().string.isRequired,url:v().string,items:v().array}))})).isRequired,delay:v().number,hoverDelay:v().number,logoSrc:v().string,logoAlt:v().string,logoHref:v().string,logoWidth:v().number,logoHeight:v().number,lang:v().string,dir:v().oneOf(["ltr","rtl","auto"]),labels:v().shape({navLabel:v().string,closeMobileNavLabel:v().string,menuLabel:v().string,backLabel:v().string,allSectionsLabel:v().string,closeLabel:v().string,overviewLabel:v().string,toggleMobileNavLabel:v().string})};const N=k;function S(e){const{dataset:t}=e,r=function(e){try{const t=JSON.parse(e.dataset.labels);return t&&"object"==typeof t&&!Array.isArray(t)?t:void 0}catch{return}}(e),n={...g(e),...r?{labels:r}:{},delay:t.delay?parseInt(t.delay,10):300,hoverDelay:t.hoverDelay?parseInt(t.hoverDelay,10):180};if(t.logoSrc&&(n.logoSrc=t.logoSrc),t.logoAlt&&(n.logoAlt=t.logoAlt),t.logoHref&&(n.logoHref=t.logoHref),t.logoWidth&&(n.logoWidth=parseInt(t.logoWidth,10)),t.logoHeight&&(n.logoHeight=parseInt(t.logoHeight,10)),t.sections)try{n.sections=JSON.parse(t.sections)}catch{n.sections=[]}return n}export{N as default,S as fromElement,b as getMegaMenuLabels};
@@ -3,7 +3,7 @@
3
3
  * Storybook: https://mangrove.undrr.org/
4
4
  * LLMs context: https://mangrove.undrr.org/llms.txt
5
5
  * Repository: https://github.com/PreventionWeb/undrr-mangrove
6
- * Compiled on: 2026-10-17T14:23:48.871Z
6
+ * Compiled on: 2026-10-27T09:44:34.250Z
7
7
  */
8
8
  /*! For license information please see Notice.js.LICENSE.txt */
9
9
  import{useEffect as e,useRef as t,useState as n}from"react";var i={2694(e,t,n){var i=n(6925);function o(){}function r(){}r.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,r,s){if(s!==i){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:r,resetWarningCache:o};return n.PropTypes=n,n}},5556(e,t,n){e.exports=n(2694)()},6925(e){e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},6942(e,t){var n;!function(){var i={}.hasOwnProperty;function o(){for(var e="",t=0;t<arguments.length;t++){var n=arguments[t];n&&(e=s(e,r(n)))}return e}function r(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return o.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var t="";for(var n in e)i.call(e,n)&&e[n]&&(t=s(t,n));return t}function s(e,t){return t?e?e+" "+t:e+t:e}e.exports?(o.default=o,e.exports=o):void 0===(n=function(){return o}.apply(t,[]))||(e.exports=n)}()}};const o={};function r(e){const t=o[e];if(void 0!==t)return t.exports;const n=o[e]={exports:{}};return i[e](n,n.exports,r),n.exports}r.n=e=>{const t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.cw=e=>{var t;return()=>{if(e){var n=e;e=0,t={exports:{}},n.call(t.exports,t,t.exports)}return t.exports}},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var s=r.cw(function(e,t){var n=Symbol.for("react.transitional.element");function i(e,t,i){var o=null;if(void 0!==i&&(o=""+i),void 0!==t.key&&(o=""+t.key),"key"in t)for(var r in i={},t)"key"!==r&&(i[r]=t[r]);else i=t;return t=i.ref,{$$typeof:n,type:e,key:o,ref:void 0!==t?t:null,props:i}}Symbol.for("react.fragment"),t.jsx=i,t.jsxs=i}),a=r.cw(function(e,t){e.exports=s()}),c=r(5556),l=r.n(c),u=r(6942),d=r.n(u);a();const m=["info","warning","negative","positive"],p=()=>(0,s().jsx)("svg",{viewBox:"0 0 24 24",focusable:"false","aria-hidden":"true",children:(0,s().jsx)("path",{d:"M16.59 7.58 10 14.17l-3.59-3.58L5 12l5 5 8-8zM12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"})}),f={info:"mg-icon-info-circle",warning:"mg-icon-exclamation-triangle",negative:"mg-icon-exclamation-triangle",positive:(0,s().jsx)(p,{})},v=["h2","h3","h4","h5","h6"],y=["a[href]","area[href]","button:not([disabled])",'input:not([disabled]):not([type="hidden"])',"select:not([disabled])","textarea:not([disabled])","iframe","summary","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])','[tabindex]:not([tabindex^="-"])'].join(",");function g(e){return!e.hidden&&!e.closest('[aria-hidden="true"], [inert]')&&("function"!=typeof e.checkVisibility||e.checkVisibility())}const b=({title:i,description:o,children:r,variant:a="info",icon:c=!0,headingLevel:l="h3",isCompact:u=!1,isProminent:p=!1,isOverlay:b=!1,isDismissible:h=!1,onDismiss:x,dismissLabel:_="Dismiss notification",actions:O,headerContent:j,role:N,className:C,...S})=>{const[P,E]=n(!1),T=t(null),k=t(null);if(e(()=>{k.current=document.activeElement},[]),P)return null;const D=m.includes(a)?a:"info",L=void 0===N?"negative"===D?"alert":"status":N||void 0,w=v.includes(l)?l:"h3",I=d()("mg-notice",`mg-notice--${D}`,{"mg-notice--compact":u,"mg-notice--prominent":p,"mg-notice--overlay":b},C);let R=null;!0===c?R=f[D]:c&&(R=c);const M=r||o;return(0,s().jsxs)("div",{ref:T,className:I,role:L,...S,children:[(i||R||h||j)&&(0,s().jsxs)("div",{className:"mg-notice__header",children:["string"==typeof R&&(0,s().jsx)("span",{className:d()("mg-icon mg-notice__icon",R),"aria-hidden":"true"}),R&&"string"!=typeof R&&(0,s().jsx)("span",{className:"mg-notice__icon","aria-hidden":"true",children:R}),i&&(0,s().jsx)(w,{className:"mg-notice__title",children:i}),j,h&&(0,s().jsx)("button",{type:"button",className:"mg-icon-button mg-icon-button--small mg-notice__dismiss",onClick:e=>{const t=T.current;if(t&&t.contains(document.activeElement)){const e=function(e,t){if(t&&t.isConnected&&t!==document.body&&!e.contains(t)&&"function"==typeof t.focus&&g(t))return t;let n=e.parentElement;for(;n;){let t=null,i=null;for(const o of n.querySelectorAll(y)){if(e.contains(o)||!g(o))continue;const n=e.compareDocumentPosition(o);n&Node.DOCUMENT_POSITION_PRECEDING?t=o:!i&&n&Node.DOCUMENT_POSITION_FOLLOWING&&(i=o)}if(t||i)return t||i;if(n===document.body)break;n=n.parentElement}return null}(t,k.current);e?e.focus():document.activeElement.blur()}k.current=null,E(!0),x&&x(e)},"aria-label":_,children:(0,s().jsx)("span",{className:"mg-icon mg-icon-close","aria-hidden":"true"})})]}),M&&(0,s().jsx)("div",{className:"mg-notice__description",children:"string"==typeof M?(0,s().jsx)("p",{children:M}):M}),O&&(0,s().jsx)("div",{className:"mg-notice__actions mg-buttons",children:O})]})};function h(e){const{dataset:t}=e;return{title:t.title||e.querySelector(".mg-notice__title")?.textContent?.trim()||null,description:t.description||e.querySelector(".mg-notice__description")?.textContent?.trim()||null,variant:t.variant||void 0,headingLevel:t.headingLevel||void 0,isCompact:"true"===t.isCompact,isProminent:"true"===t.isProminent,isOverlay:"true"===t.isOverlay,isDismissible:"true"===t.isDismissible,dismissLabel:t.dismissLabel||void 0}}b.propTypes={title:l().node,description:l().node,children:l().node,variant:l().oneOf(m),icon:l().oneOfType([l().bool,l().string,l().node]),headingLevel:l().oneOf(v),isCompact:l().bool,isProminent:l().bool,isOverlay:l().bool,isDismissible:l().bool,onDismiss:l().func,dismissLabel:l().string,actions:l().node,headerContent:l().node,role:l().string,className:l().string};export{b as Notice,b as default,h as fromElement};
@@ -3,7 +3,7 @@
3
3
  * Storybook: https://mangrove.undrr.org/
4
4
  * LLMs context: https://mangrove.undrr.org/llms.txt
5
5
  * Repository: https://github.com/PreventionWeb/undrr-mangrove
6
- * Compiled on: 2026-10-17T14:23:48.871Z
6
+ * Compiled on: 2026-10-27T09:44:34.250Z
7
7
  */
8
8
  /*! For license information please see PageHeader.js.LICENSE.txt */
9
9
  import{default as e,useRef as a}from"react";var o={2694(e,a,o){var r=o(6925);function t(){}function n(){}n.resetWarningCache=t,e.exports=function(){function e(e,a,o,t,n,l){if(l!==r){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function a(){return e}e.isRequired=e;var o={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:a,element:e,elementType:e,instanceOf:a,node:e,objectOf:a,oneOf:a,oneOfType:a,shape:a,exact:a,checkPropTypes:n,resetWarningCache:t};return o.PropTypes=o,o}},5556(e,a,o){e.exports=o(2694)()},6925(e){e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}};const r={};function t(e){const a=r[e];if(void 0!==a)return a.exports;const n=r[e]={exports:{}};return o[e](n,n.exports,t),n.exports}t.n=e=>{const a=e&&e.__esModule?()=>e.default:()=>e;return t.d(a,{a}),a},t.cw=e=>{var a;return()=>{if(e){var o=e;e=0,a={exports:{}},o.call(a.exports,a,a.exports)}return a.exports}},t.d=(e,a)=>{for(var o in a)t.o(a,o)&&!t.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:a[o]})},t.o=(e,a)=>Object.prototype.hasOwnProperty.call(e,a),(()=>{let e;if("string"==typeof import.meta.url&&(e=import.meta.url),!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/^blob:|[?#].*$/g,"").replace(/\/[^/]+$/,"/"),t.p=e})();var n=t.cw(function(e,a){var o=Symbol.for("react.transitional.element");function r(e,a,r){var t=null;if(void 0!==r&&(t=""+r),void 0!==a.key&&(t=""+a.key),"key"in a)for(var n in r={},a)"key"!==n&&(r[n]=a[n]);else r=a;return a=r.ref,{$$typeof:o,type:e,key:t,ref:void 0!==a?a:null,props:r}}Symbol.for("react.fragment"),a.jsx=r,a.jsxs=r}),l=t.cw(function(e,a){e.exports=n()}),s=t(5556),i=t.n(s);function g({name:e,className:a="",size:o,...r}){if(!e)return null;let t;return t=e.includes(" ")?e:e.startsWith("fa-")||e.startsWith("mg-icon-")?`mg-icon ${e}`:e.startsWith("mg-")?`mg-icon mg-icon-${e.slice(3)}`:`mg-icon mg-icon-${e}`,o&&(t+=` mg-icon--${o}`),a&&(t+=` ${a}`),(0,n().jsx)("span",{className:t,"aria-hidden":"true",...r})}l(),g.propTypes={name:i().string.isRequired,className:i().string,size:i().oneOf(["sm","lg","xl"])};const c=(...e)=>e.filter(Boolean).length>0?e.filter(Boolean).join(" "):null,d=({src:e,alt:a,title:o,width:r,height:t,lang:l,crop:s,className:i})=>(0,n().jsx)("img",{src:e,alt:a,title:o,width:r,height:t,lang:l,className:c("mg-logo",s&&`mg-logo--${s}`,i)});d.propTypes={src:i().string.isRequired,alt:i().string.isRequired,title:i().string,width:i().oneOfType([i().string,i().number]),height:i().oneOfType([i().string,i().number]),lang:i().string,crop:i().oneOf(["autocrop"]),className:i().string};const h=t.p+"assets/a4133008bd4d2c4a42e5ca0c6db8fe9b.svg",m=t.p+"assets/f1605b17c97ebdc56cfaa75033e7283d.svg",u={arabic:{code:"ar",colors:{black:{width:1318,height:490},blue:{width:1313,height:487},white:{width:1318,height:490}}},spanish:{code:"es",colors:{black:{width:971,height:388},blue:{width:971,height:388},white:{width:971,height:387}}},french:{code:"fr",colors:{black:{width:971,height:414},blue:{width:971,height:415},white:{width:971,height:414}}},russian:{code:"ru",colors:{black:{width:971,height:338},blue:{width:971,height:338},white:{width:971,height:338}}},chinese:{code:"zh",colors:{black:{width:971,height:339},white:{width:971,height:339}}}},p={blue:{src:h,lang:void 0,translated:!1},white:{src:m,lang:void 0,translated:!1}};function f({targetId:e="main-content",label:a="Skip to main content",className:o,onClick:r,...t}){const l=["mg-skip-link",o].filter(Boolean).join(" ");return(0,n().jsx)("a",{className:l,href:`#${e}`,onClick:a=>{const o="undefined"==typeof document?null:document.getElementById(e);o&&o.focus(),r&&r(a)},...t,children:a})}f.propTypes={targetId:i().string,label:i().string,className:i().string,onClick:i().func};const b=(...e)=>e.filter(Boolean).length>0?e.filter(Boolean).join(" "):null;function _({variant:o="default",className:r,idPrefix:t="",skipLinkTarget:l,skipLinkLabel:s="Skip to main content",logoUrl:i,logoAlt:c="UNDRR Logo",logoTitle:h="UNDRR Logo",logoWidth:m,logoHeight:_,logoLang:v,logoCrop:w,locale:x="english",homeUrl:y="/",showAccount:j=!0,showLanguage:k=!0,showLogo:N=!0,languageDisplay:T="dropdown",maxLanguageLinks:O=6,languages:L=[{value:"ar",label:"Arabic"},{value:"en",label:"English",selected:!0},{value:"es",label:"Spanish"}],...$}){const R=a(null),S=e=>t?`${t}-${e}`:e,C="links"===T&&L.length<=O,P=b("mg-page-header",o&&`mg-page-header--${o}`,r),E=i?null:function(e,a="blue"){const o=u[e],r=o?.colors[a];if(o&&r){const e="white"===a?"svg":"png";return{src:`https://assets.undrr.org/logos/undrr/undrr-logo-${o.code}-${a}.${e}`,lang:o.code,width:r.width,height:r.height,translated:!0}}return p[a]||p.blue}(x,"white"),U=E?.translated?E:null,q=i||U?.src||"https://assets.undrr.org/logos/undrr/undrr-logo-horizontal.svg",I=void 0!==v?v:U?.lang,W=_||"47",A=m||(U?String(Math.round(U.width/U.height*Number(W))):"324"),B=void 0!==w?w:U?null:"autocrop";return"decoration-only"===o?(0,n().jsxs)("div",{className:b("mg-page-header__decoration",r),...$,children:[(0,n().jsx)("div",{}),(0,n().jsx)("div",{}),(0,n().jsx)("div",{}),(0,n().jsx)("div",{})]}):(0,n().jsxs)(e.Fragment,{children:[l&&(0,n().jsx)(f,{targetId:l,label:s}),(0,n().jsxs)("header",{id:S("header"),className:P,...$,children:[(0,n().jsxs)("div",{className:"mg-page-header__decoration",children:[(0,n().jsx)("div",{}),(0,n().jsx)("div",{}),(0,n().jsx)("div",{}),(0,n().jsx)("div",{})]}),(0,n().jsx)("div",{className:"mg-page-header__toolbar-wrapper","data-vf-google-analytics-region":"undrr-black-bar",children:(0,n().jsx)("div",{className:"mg-page-header__container mg-container",children:(0,n().jsxs)("div",{className:"mg-page-header__region mg-page-header__region--toolbar",children:[N&&(0,n().jsx)("div",{id:S("block-undrrlogo"),className:"mg-page-header__block mg-page-header__block--logo",children:(0,n().jsx)("a",{href:y,children:(0,n().jsx)(d,{alt:c,src:q,width:A,height:W,title:h,lang:I,crop:B,className:"mg-page-header__logo-img"})})}),j&&(0,n().jsxs)("a",{title:"My account",href:"/user",children:[(0,n().jsx)(g,{name:"user",className:"mg-page-header__toolbar-icon"})," ",(0,n().jsx)("span",{className:"mg-u-sr-only",children:"My account"})]}),k&&C&&(0,n().jsx)("div",{className:"mg-page-header__block mg-page-header__block--language-links",children:(0,n().jsx)("div",{className:"mg-page-header__language-links",role:"group","aria-label":"Language",children:L.map((e,a)=>{const o=e.selected??(!L.some(e=>e.selected)&&0===a);return(0,n().jsx)("button",{type:"button",className:"mg-page-header__language-link","aria-current":o?"true":void 0,onClick:()=>{const a=R.current;a&&(a.value=e.value,a.dispatchEvent(new Event("change",{bubbles:!0})),a.form?.requestSubmit?a.form.requestSubmit():a.form?.submit())},children:e.label},e.value)})})}),k&&(0,n().jsxs)("div",{className:b("mg-page-header__block","mg-page-header__block--language",C&&"mg-page-header__block--language-fallback"),children:[(0,n().jsx)(g,{name:"languages",className:"mg-page-header__toolbar-icon mg-page-header__language-icon"}),(0,n().jsxs)("form",{className:"mg-page-header__lang-form lang-dropdown-form lang_dropdown_form",id:S("lang_dropdown_form_lang-dropdown-form"),action:"/",method:"post",acceptCharset:"UTF-8",noValidate:!0,children:[(0,n().jsxs)("div",{className:"mg-page-header__form-item form-item js-form-item form-type-select js-form-type-select form-item-lang-dropdown-select js-form-item-lang-dropdown-select form-no-label",children:[(0,n().jsx)("label",{htmlFor:S("edit-lang-dropdown-select"),className:"mg-u-sr-only",children:"Select your language"}),(0,n().jsx)("div",{className:"mg-page-header__select-wrapper",children:(0,n().jsx)("select",{ref:R,title:"Select your language",className:"mg-page-header__select lang-dropdown-select-element form-select form-control","data-lang-dropdown-id":"lang-dropdown-form",id:S("edit-lang-dropdown-select"),name:"lang_dropdown_select",defaultValue:L.find(e=>e.selected)?.value||L[0]?.value,children:L.map((e,a)=>(0,n().jsx)("option",{value:e.value,children:e.label},a))})})]}),(0,n().jsx)("noscript",{children:(0,n().jsx)("div",{children:(0,n().jsx)("button",{type:"submit",id:S("edit-submit"),name:"op",value:"Go",className:"button js-form-submit form-submit btn",children:"Go"})})})]})]})]})})})]})]})}_.propTypes={variant:i().oneOf(["default","decoration-only"]),className:i().string,idPrefix:i().string,skipLinkTarget:i().string,skipLinkLabel:i().string,logoUrl:i().string,logoAlt:i().string,logoTitle:i().string,logoWidth:i().oneOfType([i().string,i().number]),logoHeight:i().oneOfType([i().string,i().number]),logoLang:i().string,logoCrop:i().oneOf(["autocrop",null]),locale:i().string,homeUrl:i().string,showLogo:i().bool,showAccount:i().bool,showLanguage:i().bool,languageDisplay:i().oneOf(["dropdown","links"]),maxLanguageLinks:i().number,languages:i().arrayOf(i().shape({value:i().string.isRequired,label:i().string.isRequired,selected:i().bool}))};export{_ as PageHeader};
@@ -3,7 +3,7 @@
3
3
  * Storybook: https://mangrove.undrr.org/
4
4
  * LLMs context: https://mangrove.undrr.org/llms.txt
5
5
  * Repository: https://github.com/PreventionWeb/undrr-mangrove
6
- * Compiled on: 2026-10-17T14:23:48.871Z
6
+ * Compiled on: 2026-10-27T09:44:34.250Z
7
7
  */
8
8
  /*! For license information please see Pager.js.LICENSE.txt */
9
9
  import{useCallback as e,useMemo as a,useState as n}from"react";var r={2694(e,a,n){var r=n(6925);function t(){}function l(){}l.resetWarningCache=t,e.exports=function(){function e(e,a,n,t,l,o){if(o!==r){var i=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw i.name="Invariant Violation",i}}function a(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:a,element:e,elementType:e,instanceOf:a,node:e,objectOf:a,oneOf:a,oneOfType:a,shape:a,exact:a,checkPropTypes:l,resetWarningCache:t};return n.PropTypes=n,n}},5556(e,a,n){e.exports=n(2694)()},6925(e){e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}};const t={};function l(e){const a=t[e];if(void 0!==a)return a.exports;const n=t[e]={exports:{}};return r[e](n,n.exports,l),n.exports}l.n=e=>{const a=e&&e.__esModule?()=>e.default:()=>e;return l.d(a,{a}),a},l.cw=e=>{var a;return()=>{if(e){var n=e;e=0,a={exports:{}},n.call(a.exports,a,a.exports)}return a.exports}},l.d=(e,a)=>{for(var n in a)l.o(a,n)&&!l.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:a[n]})},l.o=(e,a)=>Object.prototype.hasOwnProperty.call(e,a);var o=l.cw(function(e,a){var n=Symbol.for("react.transitional.element"),r=Symbol.for("react.fragment");function t(e,a,r){var t=null;if(void 0!==r&&(t=""+r),void 0!==a.key&&(t=""+a.key),"key"in a)for(var l in r={},a)"key"!==l&&(r[l]=a[l]);else r=a;return a=r.ref,{$$typeof:n,type:e,key:t,ref:void 0!==a?a:null,props:r}}a.Fragment=r,a.jsx=t,a.jsxs=t}),i=l.cw(function(e,a){e.exports=o()}),s=l(5556),g=l.n(s);function p({page:n,totalPages:r,onPageChange:t,isLoading:l=!1,prevLabel:i="Previous",nextLabel:s="Next",goPrevLabel:g="Go to previous page",goNextLabel:p="Go to next page",pageLabel:u="Page {page}",currentPageLabel:c="Page {page}, current page"}){const m=a(()=>function(e,a){if(null==a)return[{type:"page",number:e}];if(a<=1)return[];const n=[],r=Math.floor(2.5);let t=Math.max(1,e-r);const l=Math.min(a,t+5-1);l-t<4&&(t=Math.max(1,l-5+1)),t>1&&(n.push({type:"page",number:1}),t>2&&n.push({type:"ellipsis",key:"start"}));for(let e=t;e<=l;e++)(1!==e&&e!==a||1===e&&1===t||e===a&&l===a)&&n.push({type:"page",number:e});return l<a&&(l<a-1&&n.push({type:"ellipsis",key:"end"}),n.push({type:"page",number:a})),n}(n,r),[n,r]),b=e(e=>{e<1||null!=r&&e>r||e!==n&&t(e)},[t,n,r]),d=e((e,a)=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),b(a))},[b]);if(null!=r&&r<=1)return null;const L=n>1,x=null==r||n<r;return(0,o().jsxs)("ul",{className:"mg-pager__list",children:[(0,o().jsx)("li",{className:"mg-pager__item mg-pager__item--prev",children:(0,o().jsxs)("button",{type:"button",className:"mg-pager__link mg-pager__link--prev "+(L?"":"mg-pager__link--disabled"),onClick:()=>b(n-1),onKeyDown:e=>d(e,n-1),disabled:!L||l,"aria-label":g,"aria-disabled":!L,children:[(0,o().jsx)("svg",{className:"mg-pager__icon",xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:(0,o().jsx)("polyline",{points:"15 18 9 12 15 6"})}),(0,o().jsx)("span",{className:"mg-pager__text",children:i})]})}),m.map(e=>{if("ellipsis"===e.type)return(0,o().jsx)("li",{className:"mg-pager__item mg-pager__item--ellipsis","aria-hidden":"true",children:(0,o().jsx)("span",{className:"mg-pager__ellipsis",children:"…"})},e.key);const a=e.number===n;return(0,o().jsx)("li",{className:"mg-pager__item",children:(0,o().jsx)("button",{type:"button",className:"mg-pager__link mg-pager__link--number "+(a?"mg-pager__link--current":""),onClick:()=>b(e.number),onKeyDown:a=>d(a,e.number),disabled:l,"aria-label":String(a?c:u).replace(/\{page\}/g,e.number),"aria-current":a?"page":void 0,children:e.number})},e.number)}),(0,o().jsx)("li",{className:"mg-pager__item mg-pager__item--next",children:(0,o().jsxs)("button",{type:"button",className:"mg-pager__link mg-pager__link--next "+(x?"":"mg-pager__link--disabled"),onClick:()=>b(n+1),onKeyDown:e=>d(e,n+1),disabled:!x||l,"aria-label":p,"aria-disabled":!x,children:[(0,o().jsx)("span",{className:"mg-pager__text",children:s}),(0,o().jsx)("svg",{className:"mg-pager__icon",xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:(0,o().jsx)("polyline",{points:"9 18 15 12 9 6"})})]})})]})}function u({range:e,rangeLabel:a="Showing {start}–{end}"}){if(!e)return null;const n=a.replace("{start}",e.start).replace("{end}",e.end);return(0,o().jsx)("p",{className:"mg-pager__range","aria-live":"polite",children:n})}function c({jumpToLabel:a="Go to page",jumpToAction:r="Go",onPageChange:t,totalPages:l,isLoading:i=!1}){const[s,g]=n(""),p=e(e=>{e.preventDefault();const a=parseInt(s,10);if(Number.isNaN(a)||a<1)return;let n=a;null!=l&&(n=Math.min(n,l)),n=Math.max(1,n),t(n),g("")},[s,t,l]),u="mg-pager-jump-input";return(0,o().jsxs)("form",{className:"mg-pager__jump",onSubmit:p,children:[(0,o().jsx)("label",{className:"mg-pager__jump-label",htmlFor:u,children:a}),(0,o().jsx)("input",{id:u,className:"mg-pager__jump-input",type:"number",min:1,max:null!=l?l:void 0,value:s,onChange:e=>g(e.target.value),disabled:i,"aria-label":a}),(0,o().jsx)("button",{type:"submit",className:"mg-pager__jump-btn",disabled:i||!s,children:r})]})}function m({page:e,totalPages:a=null,onPageChange:n,isLoading:r=!1,layout:t="centered",ariaLabel:l="Pagination",range:i,rangeLabel:s,showJumpTo:g=!1,jumpToLabel:m,jumpToAction:b,emptyState:d,emptyAction:L,prevLabel:x="Previous",nextLabel:h="Next",goPrevLabel:f="Go to previous page",goNextLabel:y="Go to next page",pageLabel:_="Page {page}",currentPageLabel:v="Page {page}, current page",pageOfLabel:j="Page {page} of {total}"}){return d?(0,o().jsx)("nav",{className:"mg-pager","aria-label":l,children:(0,o().jsxs)("p",{className:"mg-pager__notice",children:[d,L&&(0,o().jsxs)(o().Fragment,{children:[" ",(0,o().jsx)("button",{type:"button",className:"mg-pager__notice-action",onClick:L.onClick,children:L.label})]})]})}):"bar"===t?(0,o().jsxs)("nav",{className:"mg-pager","aria-label":l,children:[(0,o().jsxs)("div",{className:"mg-pager__bar",children:[i&&(0,o().jsx)(u,{range:i,rangeLabel:s}),(0,o().jsx)(p,{page:e,totalPages:a,onPageChange:n,isLoading:r,prevLabel:x,nextLabel:h,goPrevLabel:f,goNextLabel:y,pageLabel:_,currentPageLabel:v}),g&&(0,o().jsx)(c,{jumpToLabel:m,jumpToAction:b,onPageChange:n,totalPages:a,isLoading:r})]}),(0,o().jsx)("div",{className:"mg-u-sr-only","aria-live":"polite",children:"function"==typeof j?j({page:e,total:a??""}):String(j).replace(/\{page\}/g,e).replace(/\{total\}/g,a??"")})]}):(0,o().jsxs)("nav",{className:"mg-pager","aria-label":l,children:[(0,o().jsx)(p,{page:e,totalPages:a,onPageChange:n,isLoading:r,prevLabel:x,nextLabel:h,goPrevLabel:f,goNextLabel:y,pageLabel:_,currentPageLabel:v}),(0,o().jsx)("div",{className:"mg-u-sr-only","aria-live":"polite",children:String(j).replace(/\{page\}/g,e).replace(/\{total\}/g,a??"")})]})}i(),p.propTypes={page:g().number.isRequired,totalPages:g().number,onPageChange:g().func.isRequired,isLoading:g().bool,prevLabel:g().string,nextLabel:g().string,goPrevLabel:g().string,goNextLabel:g().string,pageLabel:g().string,currentPageLabel:g().string},u.propTypes={range:g().shape({start:g().number.isRequired,end:g().number.isRequired}),rangeLabel:g().string},c.propTypes={jumpToLabel:g().string,jumpToAction:g().string,onPageChange:g().func.isRequired,totalPages:g().number,isLoading:g().bool},m.propTypes={page:g().number.isRequired,totalPages:g().number,onPageChange:g().func.isRequired,isLoading:g().bool,layout:g().oneOf(["centered","bar"]),ariaLabel:g().string,range:g().shape({start:g().number.isRequired,end:g().number.isRequired}),rangeLabel:g().string,showJumpTo:g().bool,jumpToLabel:g().string,jumpToAction:g().string,emptyState:g().string,emptyAction:g().shape({label:g().string.isRequired,onClick:g().func.isRequired}),prevLabel:g().oneOfType([g().string,g().func]),nextLabel:g().oneOfType([g().string,g().func]),goPrevLabel:g().oneOfType([g().string,g().func]),goNextLabel:g().oneOfType([g().string,g().func]),pageLabel:g().oneOfType([g().string,g().func]),currentPageLabel:g().oneOfType([g().string,g().func]),pageOfLabel:g().oneOfType([g().string,g().func])};const b=m;function d(e){const{dataset:a}=e;return{page:a.page?parseInt(a.page,10):1,totalPages:a.totalPages?parseInt(a.totalPages,10):null,layout:a.layout||"centered",showJumpTo:"true"===a.showJumpTo,ariaLabel:a.ariaLabel||"Pagination",rangeLabel:a.rangeLabel||void 0,jumpToLabel:a.jumpToLabel||void 0,jumpToAction:a.jumpToAction||void 0,prevLabel:a.prevLabel||void 0,nextLabel:a.nextLabel||void 0,goPrevLabel:a.goPrevLabel||void 0,goNextLabel:a.goNextLabel||void 0,pageLabel:a.pageLabel||void 0,currentPageLabel:a.currentPageLabel||void 0,pageOfLabel:a.pageOfLabel||void 0}}export{m as Pager,b as default,d as fromElement};
@@ -3,7 +3,7 @@
3
3
  * Storybook: https://mangrove.undrr.org/
4
4
  * LLMs context: https://mangrove.undrr.org/llms.txt
5
5
  * Repository: https://github.com/PreventionWeb/undrr-mangrove
6
- * Compiled on: 2026-10-17T14:23:48.871Z
6
+ * Compiled on: 2026-10-27T09:44:34.250Z
7
7
  */
8
8
  /*! For license information please see ProgressBar.js.LICENSE.txt */
9
9
  import*as e from"react";var r={2694(e,r,a){var l=a(6925);function o(){}function n(){}n.resetWarningCache=o,e.exports=function(){function e(e,r,a,o,n,s){if(s!==l){var t=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw t.name="Invariant Violation",t}}function r(){return e}e.isRequired=e;var a={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:r,element:e,elementType:e,instanceOf:r,node:e,objectOf:r,oneOf:r,oneOfType:r,shape:r,exact:r,checkPropTypes:n,resetWarningCache:o};return a.PropTypes=a,a}},5556(e,r,a){e.exports=a(2694)()},6925(e){e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},9698(e,r){var a=Symbol.for("react.transitional.element");function l(e,r,l){var o=null;if(void 0!==l&&(o=""+l),void 0!==r.key&&(o=""+r.key),"key"in r)for(var n in l={},r)"key"!==n&&(l[n]=r[n]);else l=r;return r=l.ref,{$$typeof:a,type:e,key:o,ref:void 0!==r?r:null,props:l}}Symbol.for("react.fragment"),r.jsx=l,r.jsxs=l},4848(e,r,a){e.exports=a(9698)},1649(r,a,l){r.exports=(e=>{const r={};return l.d(r,e),r})({useId:()=>e.useId})}};const a={};function l(e){const o=a[e];if(void 0!==o)return o.exports;const n=a[e]={exports:{}};return r[e](n,n.exports,l),n.exports}l.n=e=>{const r=e&&e.__esModule?()=>e.default:()=>e;return l.d(r,{a:r}),r},l.d=(e,r)=>{if(Array.isArray(r))for(var a=0;a<r.length;){var o=r[a++],n=r[a++],s=0===n?{enumerable:!0,value:r[a++]}:{enumerable:!0,get:n};l.o(e,o)||Object.defineProperty(e,o,s)}else for(var o in r)l.o(r,o)&&!l.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:r[o]})},l.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r);let o={};l.d(o,{z:()=>p});var n=l(1649),s=l(5556),t=l.n(s),i=l(4848);function p({value:e,max:r=100,label:a,hideLabel:l=!1,helpText:o,showValue:s=!1,valueText:c,variant:u="default",className:d="",...b}){t().checkPropTypes(p.propTypes,{value:e,max:r,label:a,hideLabel:l,helpText:o,showValue:s,valueText:c,variant:u,className:d,...b},"prop","ProgressBar");const f=(0,n.useId)(),m=`${f}-label`,y=`${f}-help`,v="flush"===u,h="number"==typeof r&&r>0?r:100,x="number"==typeof e&&Number.isFinite(e),g=x?Math.min(Math.max(e,0),h):null,_=x?Math.round(g/h*100):null,T=c||`${_}%`,j=Boolean(a)&&!l&&!v,O=Boolean(o)&&!v,k={};b["aria-label"]||b["aria-labelledby"]||(j?k["aria-labelledby"]=m:a&&(k["aria-label"]=a));const N=[b["aria-describedby"],O&&y].filter(Boolean).join(" ");N&&(k["aria-describedby"]=N),x&&c&&(k["aria-valuetext"]=c);const P=["mg-progress-bar",v&&"mg-progress-bar--flush",d].filter(Boolean).join(" ");return(0,i.jsxs)("div",{className:P,children:[j&&(0,i.jsx)("div",{className:"mg-progress-bar__label",id:m,children:a}),(0,i.jsx)("div",{className:"mg-progress-bar__track",children:(0,i.jsx)("progress",{className:"mg-progress-bar__native",max:h,value:x?g:void 0,...b,...k,children:x?T:null})}),s&&x&&!v&&(0,i.jsx)("div",{className:"mg-progress-bar__value","aria-hidden":"true",children:T}),O&&(0,i.jsx)("div",{className:"mg-progress-bar__help",id:y,children:o})]})}p.propTypes={value:t().number,max:t().number,label:function(e,r,a){const l=e[r];return null!=l&&"string"!=typeof l?new Error(`Invalid prop \`${r}\` supplied to \`${a}\`: expected a string.`):l||e["aria-label"]||e["aria-labelledby"]?null:new Error(`\`${a}\` needs an accessible name: pass \`label\`, \`aria-label\` or \`aria-labelledby\`.`)},hideLabel:t().bool,helpText:t().string,showValue:t().bool,valueText:t().string,variant:t().oneOf(["default","flush"]),className:t().string};const c=p;l.d(o,["A",0,c]);const u=o.A;export{p as ProgressBar,u as default};