@undrr/undrr-mangrove 1.7.0 → 1.8.1

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 (93) hide show
  1. package/README.md +29 -5
  2. package/components/BookCard.js +2 -2
  3. package/components/BookCard.js.LICENSE.txt +1 -1
  4. package/components/Breadcrumbs.js +2 -2
  5. package/components/Checkbox.js +1 -1
  6. package/components/Chips.js +1 -1
  7. package/components/CtaButton.js +1 -1
  8. package/components/EmbedContainer.js +1 -1
  9. package/components/Footer.js +1 -1
  10. package/components/FormErrorSummary.js +1 -1
  11. package/components/FormGroup.js +1 -1
  12. package/components/FullWidth.js +1 -1
  13. package/components/Gallery.js +2 -2
  14. package/components/Hero.js +1 -1
  15. package/components/HighlightBox.js +1 -1
  16. package/components/HorizontalBookCard.js +2 -2
  17. package/components/HorizontalBookCard.js.LICENSE.txt +1 -1
  18. package/components/HorizontalCard.js +2 -2
  19. package/components/HorizontalCard.js.LICENSE.txt +1 -1
  20. package/components/IconCard.js +2 -2
  21. package/components/IconCard.js.LICENSE.txt +1 -1
  22. package/components/Loader.js +1 -1
  23. package/components/MegaMenu.js +2 -2
  24. package/components/PageHeader.js +2 -2
  25. package/components/Pager.js +2 -2
  26. package/components/QuoteHighlight.js +1 -1
  27. package/components/Radio.js +1 -1
  28. package/components/ScrollContainer.js +2 -2
  29. package/components/Select.js +1 -1
  30. package/components/ShareButtons.js +2 -2
  31. package/components/ShowMore.js +1 -1
  32. package/components/StatsCard.js +2 -2
  33. package/components/StatsCard.js.LICENSE.txt +2 -0
  34. package/components/SyndicationSearchWidget.js +2 -2
  35. package/components/Tab.js +2 -2
  36. package/components/TextCta.js +2 -2
  37. package/components/TextCta.js.LICENSE.txt +1 -1
  38. package/components/TextInput.js +1 -1
  39. package/components/Textarea.js +1 -1
  40. package/components/VerticalCard.js +2 -2
  41. package/components/VerticalCard.js.LICENSE.txt +1 -1
  42. package/components/hydrate.js +2 -2
  43. package/css/style-delta.css +12 -10
  44. package/css/style-delta.css.map +1 -1
  45. package/css/style-irp-legacy.css +12 -10
  46. package/css/style-irp-legacy.css.map +1 -1
  47. package/css/style-irp.css +12 -10
  48. package/css/style-irp.css.map +1 -1
  49. package/css/style-legacy.css +12 -10
  50. package/css/style-legacy.css.map +1 -1
  51. package/css/style-mcr-legacy.css +12 -10
  52. package/css/style-mcr-legacy.css.map +1 -1
  53. package/css/style-mcr.css +12 -10
  54. package/css/style-mcr.css.map +1 -1
  55. package/css/style-preventionweb-legacy.css +12 -10
  56. package/css/style-preventionweb-legacy.css.map +1 -1
  57. package/css/style-preventionweb.css +12 -10
  58. package/css/style-preventionweb.css.map +1 -1
  59. package/css/style.css +12 -10
  60. package/css/style.css.map +1 -1
  61. package/error-pages/401.html +1 -1
  62. package/error-pages/403.html +1 -1
  63. package/error-pages/404.html +1 -1
  64. package/error-pages/429.html +1 -1
  65. package/error-pages/500.html +1 -1
  66. package/error-pages/502.html +1 -1
  67. package/error-pages/503.html +1 -1
  68. package/error-pages/504.html +1 -1
  69. package/error-pages/5xx.html +1 -1
  70. package/error-pages/challenge.html +1 -1
  71. package/error-pages/managed-challenge.html +1 -1
  72. package/package.json +1 -1
  73. package/scss/Atom/BaseTypography/Code/code.scss +172 -5
  74. package/scss/Atom/Icons/_icon-definitions.scss +1 -1
  75. package/scss/Atom/ReachElement/Details/details.scss +52 -18
  76. package/scss/Components/Breadcrumbs/breadcrumbs.scss +6 -1
  77. package/scss/Components/SyndicationSearchWidget/SyndicationSearchWidget.scss +1 -1
  78. package/scss/Components/SyndicationSearchWidget/syndication-search-widget.scss +35 -37
  79. package/scss/assets/scss/_foundational.scss +8 -1
  80. package/components/64859daad6c1e719d2b3.png +0 -1
  81. package/components/871deead6fbe28d9b668.png +0 -1
  82. package/components/BarChart.js +0 -6
  83. package/components/BarChart.js.LICENSE.txt +0 -9
  84. package/components/Fetcher.js +0 -6
  85. package/components/Fetcher.js.LICENSE.txt +0 -9
  86. package/components/MapComponent.js +0 -6
  87. package/components/MapComponent.js.LICENSE.txt +0 -14
  88. package/components/assets/2b3e1faf89f94a4835397e7a43b4f77d.png +0 -0
  89. package/components/assets/416d91365b44e4b4f4777663e6f009f3.png +0 -0
  90. package/components/assets/680f69f3c2e6b90c1812a813edf67fd7.png +0 -0
  91. package/components/assets/8f2c4d11474275fbc1614b9098334eae.png +0 -0
  92. package/components/assets/a0c6cc1401c107b501efee6477816891.png +0 -0
  93. package/components/cab155b6ee25ecd4541b.png +0 -1
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * This is a UNDRR Mangrove component: https://github.com/unisdr/undrr-mangrove?tab=readme-ov-file
3
- * Compiled on: 2026-05-11T09:13:25.318Z
3
+ * Compiled on: 2026-07-06T14:31:03.210Z
4
4
  */
5
5
  /*! For license information please see ShareButtons.js.LICENSE.txt */
6
- import{useEffect as t,useRef as e,useState as n}from"react";var r={6320(t){var e={single_source_shortest_paths:function(t,n,r){var o={},i={};i[n]=0;var a,s,c,l,u,d,h,g=e.PriorityQueue.make();for(g.push(n,0);!g.empty();)for(c in s=(a=g.pop()).value,l=a.cost,u=t[s]||{})u.hasOwnProperty(c)&&(d=l+u[c],h=i[c],(void 0===i[c]||h>d)&&(i[c]=d,g.push(c,d),o[c]=s));if(void 0!==r&&void 0===i[r]){var f=["Could not find a path from ",n," to ",r,"."].join("");throw new Error(f)}return o},extract_shortest_path_from_predecessor_list:function(t,e){for(var n=[],r=e;r;)n.push(r),t[r],r=t[r];return n.reverse(),n},find_path:function(t,n,r){var o=e.single_source_shortest_paths(t,n,r);return e.extract_shortest_path_from_predecessor_list(o,r)},PriorityQueue:{make:function(t){var n,r=e.PriorityQueue,o={};for(n in t=t||{},r)r.hasOwnProperty(n)&&(o[n]=r[n]);return o.queue=[],o.sorter=t.sorter||r.default_sorter,o},default_sorter:function(t,e){return t.cost-e.cost},push:function(t,e){var n={value:t,cost:e};this.queue.push(n),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return 0===this.queue.length}}};t.exports=e},7583(t,e,n){const r=n(1333),o=n(157),i=n(7899),a=n(6756);function s(t,e,n,i,a){const s=[].slice.call(arguments,1),c=s.length,l="function"==typeof s[c-1];if(!l&&!r())throw new Error("Callback required as last argument");if(!l){if(c<1)throw new Error("Too few arguments provided");return 1===c?(n=e,e=i=void 0):2!==c||e.getContext||(i=n,n=e,e=void 0),new Promise(function(r,a){try{const a=o.create(n,i);r(t(a,e,i))}catch(t){a(t)}})}if(c<2)throw new Error("Too few arguments provided");2===c?(a=n,n=e,e=i=void 0):3===c&&(e.getContext&&void 0===a?(a=i,i=void 0):(a=i,i=n,n=e,e=void 0));try{const r=o.create(n,i);a(null,t(r,e,i))}catch(t){a(t)}}e.create=o.create,e.toCanvas=s.bind(null,i.render),e.toDataURL=s.bind(null,i.renderToDataURL),e.toString=s.bind(null,function(t,e,n){return a.render(t,n)})},1333(t){t.exports=function(){return"function"==typeof Promise&&Promise.prototype&&Promise.prototype.then}},6421(t,e,n){const r=n(6886).getSymbolSize;e.getRowColCoords=function(t){if(1===t)return[];const e=Math.floor(t/7)+2,n=r(t),o=145===n?26:2*Math.ceil((n-13)/(2*e-2)),i=[n-7];for(let t=1;t<e-1;t++)i[t]=i[t-1]-o;return i.push(6),i.reverse()},e.getPositions=function(t){const n=[],r=e.getRowColCoords(t),o=r.length;for(let t=0;t<o;t++)for(let e=0;e<o;e++)0===t&&0===e||0===t&&e===o-1||t===o-1&&0===e||n.push([r[t],r[e]]);return n}},1433(t,e,n){const r=n(208),o=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function i(t){this.mode=r.ALPHANUMERIC,this.data=t}i.getBitsLength=function(t){return 11*Math.floor(t/2)+t%2*6},i.prototype.getLength=function(){return this.data.length},i.prototype.getBitsLength=function(){return i.getBitsLength(this.data.length)},i.prototype.write=function(t){let e;for(e=0;e+2<=this.data.length;e+=2){let n=45*o.indexOf(this.data[e]);n+=o.indexOf(this.data[e+1]),t.put(n,11)}this.data.length%2&&t.put(o.indexOf(this.data[e]),6)},t.exports=i},9899(t){function e(){this.buffer=[],this.length=0}e.prototype={get:function(t){const e=Math.floor(t/8);return 1==(this.buffer[e]>>>7-t%8&1)},put:function(t,e){for(let n=0;n<e;n++)this.putBit(1==(t>>>e-n-1&1))},getLengthInBits:function(){return this.length},putBit:function(t){const e=Math.floor(this.length/8);this.buffer.length<=e&&this.buffer.push(0),t&&(this.buffer[e]|=128>>>this.length%8),this.length++}},t.exports=e},8820(t){function e(t){if(!t||t<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=t,this.data=new Uint8Array(t*t),this.reservedBit=new Uint8Array(t*t)}e.prototype.set=function(t,e,n,r){const o=t*this.size+e;this.data[o]=n,r&&(this.reservedBit[o]=!0)},e.prototype.get=function(t,e){return this.data[t*this.size+e]},e.prototype.xor=function(t,e,n){this.data[t*this.size+e]^=n},e.prototype.isReserved=function(t,e){return this.reservedBit[t*this.size+e]},t.exports=e},5822(t,e,n){const r=n(208);function o(t){this.mode=r.BYTE,this.data="string"==typeof t?(new TextEncoder).encode(t):new Uint8Array(t)}o.getBitsLength=function(t){return 8*t},o.prototype.getLength=function(){return this.data.length},o.prototype.getBitsLength=function(){return o.getBitsLength(this.data.length)},o.prototype.write=function(t){for(let e=0,n=this.data.length;e<n;e++)t.put(this.data[e],8)},t.exports=o},7518(t,e,n){const r=n(9953),o=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],i=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];e.getBlocksCount=function(t,e){switch(e){case r.L:return o[4*(t-1)+0];case r.M:return o[4*(t-1)+1];case r.Q:return o[4*(t-1)+2];case r.H:return o[4*(t-1)+3];default:return}},e.getTotalCodewordsCount=function(t,e){switch(e){case r.L:return i[4*(t-1)+0];case r.M:return i[4*(t-1)+1];case r.Q:return i[4*(t-1)+2];case r.H:return i[4*(t-1)+3];default:return}}},9953(t,e){e.L={bit:1},e.M={bit:0},e.Q={bit:3},e.H={bit:2},e.isValid=function(t){return t&&void 0!==t.bit&&t.bit>=0&&t.bit<4},e.from=function(t,n){if(e.isValid(t))return t;try{return function(t){if("string"!=typeof t)throw new Error("Param is not a string");switch(t.toLowerCase()){case"l":case"low":return e.L;case"m":case"medium":return e.M;case"q":case"quartile":return e.Q;case"h":case"high":return e.H;default:throw new Error("Unknown EC Level: "+t)}}(t)}catch(t){return n}}},7756(t,e,n){const r=n(6886).getSymbolSize;e.getPositions=function(t){const e=r(t);return[[0,0],[e-7,0],[0,e-7]]}},4565(t,e,n){const r=n(6886),o=r.getBCHDigit(1335);e.getEncodedBits=function(t,e){const n=t.bit<<3|e;let i=n<<10;for(;r.getBCHDigit(i)-o>=0;)i^=1335<<r.getBCHDigit(i)-o;return 21522^(n<<10|i)}},2731(t,e){const n=new Uint8Array(512),r=new Uint8Array(256);!function(){let t=1;for(let e=0;e<255;e++)n[e]=t,r[t]=e,t<<=1,256&t&&(t^=285);for(let t=255;t<512;t++)n[t]=n[t-255]}(),e.log=function(t){if(t<1)throw new Error("log("+t+")");return r[t]},e.exp=function(t){return n[t]},e.mul=function(t,e){return 0===t||0===e?0:n[r[t]+r[e]]}},4861(t,e,n){const r=n(208),o=n(6886);function i(t){this.mode=r.KANJI,this.data=t}i.getBitsLength=function(t){return 13*t},i.prototype.getLength=function(){return this.data.length},i.prototype.getBitsLength=function(){return i.getBitsLength(this.data.length)},i.prototype.write=function(t){let e;for(e=0;e<this.data.length;e++){let n=o.toSJIS(this.data[e]);if(n>=33088&&n<=40956)n-=33088;else{if(!(n>=57408&&n<=60351))throw new Error("Invalid SJIS character: "+this.data[e]+"\nMake sure your charset is UTF-8");n-=49472}n=192*(n>>>8&255)+(255&n),t.put(n,13)}},t.exports=i},1332(t,e){e.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};function n(t,n,r){switch(t){case e.Patterns.PATTERN000:return(n+r)%2==0;case e.Patterns.PATTERN001:return n%2==0;case e.Patterns.PATTERN010:return r%3==0;case e.Patterns.PATTERN011:return(n+r)%3==0;case e.Patterns.PATTERN100:return(Math.floor(n/2)+Math.floor(r/3))%2==0;case e.Patterns.PATTERN101:return n*r%2+n*r%3==0;case e.Patterns.PATTERN110:return(n*r%2+n*r%3)%2==0;case e.Patterns.PATTERN111:return(n*r%3+(n+r)%2)%2==0;default:throw new Error("bad maskPattern:"+t)}}e.isValid=function(t){return null!=t&&""!==t&&!isNaN(t)&&t>=0&&t<=7},e.from=function(t){return e.isValid(t)?parseInt(t,10):void 0},e.getPenaltyN1=function(t){const e=t.size;let n=0,r=0,o=0,i=null,a=null;for(let s=0;s<e;s++){r=o=0,i=a=null;for(let c=0;c<e;c++){let e=t.get(s,c);e===i?r++:(r>=5&&(n+=r-5+3),i=e,r=1),e=t.get(c,s),e===a?o++:(o>=5&&(n+=o-5+3),a=e,o=1)}r>=5&&(n+=r-5+3),o>=5&&(n+=o-5+3)}return n},e.getPenaltyN2=function(t){const e=t.size;let n=0;for(let r=0;r<e-1;r++)for(let o=0;o<e-1;o++){const e=t.get(r,o)+t.get(r,o+1)+t.get(r+1,o)+t.get(r+1,o+1);4!==e&&0!==e||n++}return 3*n},e.getPenaltyN3=function(t){const e=t.size;let n=0,r=0,o=0;for(let i=0;i<e;i++){r=o=0;for(let a=0;a<e;a++)r=r<<1&2047|t.get(i,a),a>=10&&(1488===r||93===r)&&n++,o=o<<1&2047|t.get(a,i),a>=10&&(1488===o||93===o)&&n++}return 40*n},e.getPenaltyN4=function(t){let e=0;const n=t.data.length;for(let r=0;r<n;r++)e+=t.data[r];return 10*Math.abs(Math.ceil(100*e/n/5)-10)},e.applyMask=function(t,e){const r=e.size;for(let o=0;o<r;o++)for(let i=0;i<r;i++)e.isReserved(i,o)||e.xor(i,o,n(t,i,o))},e.getBestMask=function(t,n){const r=Object.keys(e.Patterns).length;let o=0,i=1/0;for(let a=0;a<r;a++){n(a),e.applyMask(a,t);const r=e.getPenaltyN1(t)+e.getPenaltyN2(t)+e.getPenaltyN3(t)+e.getPenaltyN4(t);e.applyMask(a,t),r<i&&(i=r,o=a)}return o}},208(t,e,n){const r=n(1878),o=n(7044);e.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},e.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},e.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},e.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},e.MIXED={bit:-1},e.getCharCountIndicator=function(t,e){if(!t.ccBits)throw new Error("Invalid mode: "+t);if(!r.isValid(e))throw new Error("Invalid version: "+e);return e>=1&&e<10?t.ccBits[0]:e<27?t.ccBits[1]:t.ccBits[2]},e.getBestModeForData=function(t){return o.testNumeric(t)?e.NUMERIC:o.testAlphanumeric(t)?e.ALPHANUMERIC:o.testKanji(t)?e.KANJI:e.BYTE},e.toString=function(t){if(t&&t.id)return t.id;throw new Error("Invalid mode")},e.isValid=function(t){return t&&t.bit&&t.ccBits},e.from=function(t,n){if(e.isValid(t))return t;try{return function(t){if("string"!=typeof t)throw new Error("Param is not a string");switch(t.toLowerCase()){case"numeric":return e.NUMERIC;case"alphanumeric":return e.ALPHANUMERIC;case"kanji":return e.KANJI;case"byte":return e.BYTE;default:throw new Error("Unknown mode: "+t)}}(t)}catch(t){return n}}},4357(t,e,n){const r=n(208);function o(t){this.mode=r.NUMERIC,this.data=t.toString()}o.getBitsLength=function(t){return 10*Math.floor(t/3)+(t%3?t%3*3+1:0)},o.prototype.getLength=function(){return this.data.length},o.prototype.getBitsLength=function(){return o.getBitsLength(this.data.length)},o.prototype.write=function(t){let e,n,r;for(e=0;e+3<=this.data.length;e+=3)n=this.data.substr(e,3),r=parseInt(n,10),t.put(r,10);const o=this.data.length-e;o>0&&(n=this.data.substr(e),r=parseInt(n,10),t.put(r,3*o+1))},t.exports=o},4713(t,e,n){const r=n(2731);e.mul=function(t,e){const n=new Uint8Array(t.length+e.length-1);for(let o=0;o<t.length;o++)for(let i=0;i<e.length;i++)n[o+i]^=r.mul(t[o],e[i]);return n},e.mod=function(t,e){let n=new Uint8Array(t);for(;n.length-e.length>=0;){const t=n[0];for(let o=0;o<e.length;o++)n[o]^=r.mul(e[o],t);let o=0;for(;o<n.length&&0===n[o];)o++;n=n.slice(o)}return n},e.generateECPolynomial=function(t){let n=new Uint8Array([1]);for(let o=0;o<t;o++)n=e.mul(n,new Uint8Array([1,r.exp(o)]));return n}},157(t,e,n){const r=n(6886),o=n(9953),i=n(9899),a=n(8820),s=n(6421),c=n(7756),l=n(1332),u=n(7518),d=n(4764),h=n(1427),g=n(4565),f=n(208),p=n(9801);function m(t,e,n){const r=t.size,o=g.getEncodedBits(e,n);let i,a;for(i=0;i<15;i++)a=1==(o>>i&1),i<6?t.set(i,8,a,!0):i<8?t.set(i+1,8,a,!0):t.set(r-15+i,8,a,!0),i<8?t.set(8,r-i-1,a,!0):i<9?t.set(8,15-i-1+1,a,!0):t.set(8,15-i-1,a,!0);t.set(r-8,8,1,!0)}function w(t,e,n,o){let g;if(Array.isArray(t))g=p.fromArray(t);else{if("string"!=typeof t)throw new Error("Invalid data");{let r=e;if(!r){const e=p.rawSplit(t);r=h.getBestVersionForData(e,n)}g=p.fromString(t,r||40)}}const w=h.getBestVersionForData(g,n);if(!w)throw new Error("The amount of data is too big to be stored in a QR Code");if(e){if(e<w)throw new Error("\nThe chosen QR Code version cannot contain this amount of data.\nMinimum version required to store current data is: "+w+".\n")}else e=w;const y=function(t,e,n){const o=new i;n.forEach(function(e){o.put(e.mode.bit,4),o.put(e.getLength(),f.getCharCountIndicator(e.mode,t)),e.write(o)});const a=8*(r.getSymbolTotalCodewords(t)-u.getTotalCodewordsCount(t,e));for(o.getLengthInBits()+4<=a&&o.put(0,4);o.getLengthInBits()%8!=0;)o.putBit(0);const s=(a-o.getLengthInBits())/8;for(let t=0;t<s;t++)o.put(t%2?17:236,8);return function(t,e,n){const o=r.getSymbolTotalCodewords(e),i=o-u.getTotalCodewordsCount(e,n),a=u.getBlocksCount(e,n),s=a-o%a,c=Math.floor(o/a),l=Math.floor(i/a),h=l+1,g=c-l,f=new d(g);let p=0;const m=new Array(a),w=new Array(a);let y=0;const b=new Uint8Array(t.buffer);for(let t=0;t<a;t++){const e=t<s?l:h;m[t]=b.slice(p,p+e),w[t]=f.encode(m[t]),p+=e,y=Math.max(y,e)}const x=new Uint8Array(o);let E,v,C=0;for(E=0;E<y;E++)for(v=0;v<a;v++)E<m[v].length&&(x[C++]=m[v][E]);for(E=0;E<g;E++)for(v=0;v<a;v++)x[C++]=w[v][E];return x}(o,t,e)}(e,n,g),b=r.getSymbolSize(e),x=new a(b);return function(t,e){const n=t.size,r=c.getPositions(e);for(let e=0;e<r.length;e++){const o=r[e][0],i=r[e][1];for(let e=-1;e<=7;e++)if(!(o+e<=-1||n<=o+e))for(let r=-1;r<=7;r++)i+r<=-1||n<=i+r||(e>=0&&e<=6&&(0===r||6===r)||r>=0&&r<=6&&(0===e||6===e)||e>=2&&e<=4&&r>=2&&r<=4?t.set(o+e,i+r,!0,!0):t.set(o+e,i+r,!1,!0))}}(x,e),function(t){const e=t.size;for(let n=8;n<e-8;n++){const e=n%2==0;t.set(n,6,e,!0),t.set(6,n,e,!0)}}(x),function(t,e){const n=s.getPositions(e);for(let e=0;e<n.length;e++){const r=n[e][0],o=n[e][1];for(let e=-2;e<=2;e++)for(let n=-2;n<=2;n++)-2===e||2===e||-2===n||2===n||0===e&&0===n?t.set(r+e,o+n,!0,!0):t.set(r+e,o+n,!1,!0)}}(x,e),m(x,n,0),e>=7&&function(t,e){const n=t.size,r=h.getEncodedBits(e);let o,i,a;for(let e=0;e<18;e++)o=Math.floor(e/3),i=e%3+n-8-3,a=1==(r>>e&1),t.set(o,i,a,!0),t.set(i,o,a,!0)}(x,e),function(t,e){const n=t.size;let r=-1,o=n-1,i=7,a=0;for(let s=n-1;s>0;s-=2)for(6===s&&s--;;){for(let n=0;n<2;n++)if(!t.isReserved(o,s-n)){let r=!1;a<e.length&&(r=1==(e[a]>>>i&1)),t.set(o,s-n,r),i--,-1===i&&(a++,i=7)}if(o+=r,o<0||n<=o){o-=r,r=-r;break}}}(x,y),isNaN(o)&&(o=l.getBestMask(x,m.bind(null,x,n))),l.applyMask(o,x),m(x,n,o),{modules:x,version:e,errorCorrectionLevel:n,maskPattern:o,segments:g}}e.create=function(t,e){if(void 0===t||""===t)throw new Error("No input text");let n,i,a=o.M;return void 0!==e&&(a=o.from(e.errorCorrectionLevel,o.M),n=h.from(e.version),i=l.from(e.maskPattern),e.toSJISFunc&&r.setToSJISFunction(e.toSJISFunc)),w(t,n,a,i)}},4764(t,e,n){const r=n(4713);function o(t){this.genPoly=void 0,this.degree=t,this.degree&&this.initialize(this.degree)}o.prototype.initialize=function(t){this.degree=t,this.genPoly=r.generateECPolynomial(this.degree)},o.prototype.encode=function(t){if(!this.genPoly)throw new Error("Encoder not initialized");const e=new Uint8Array(t.length+this.degree);e.set(t);const n=r.mod(e,this.genPoly),o=this.degree-n.length;if(o>0){const t=new Uint8Array(this.degree);return t.set(n,o),t}return n},t.exports=o},7044(t,e){const n="[0-9]+";let r="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";r=r.replace(/u/g,"\\u");const o="(?:(?![A-Z0-9 $%*+\\-./:]|"+r+")(?:.|[\r\n]))+";e.KANJI=new RegExp(r,"g"),e.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),e.BYTE=new RegExp(o,"g"),e.NUMERIC=new RegExp(n,"g"),e.ALPHANUMERIC=new RegExp("[A-Z $%*+\\-./:]+","g");const i=new RegExp("^"+r+"$"),a=new RegExp("^"+n+"$"),s=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");e.testKanji=function(t){return i.test(t)},e.testNumeric=function(t){return a.test(t)},e.testAlphanumeric=function(t){return s.test(t)}},9801(t,e,n){const r=n(208),o=n(4357),i=n(1433),a=n(5822),s=n(4861),c=n(7044),l=n(6886),u=n(6320);function d(t){return unescape(encodeURIComponent(t)).length}function h(t,e,n){const r=[];let o;for(;null!==(o=t.exec(n));)r.push({data:o[0],index:o.index,mode:e,length:o[0].length});return r}function g(t){const e=h(c.NUMERIC,r.NUMERIC,t),n=h(c.ALPHANUMERIC,r.ALPHANUMERIC,t);let o,i;return l.isKanjiModeEnabled()?(o=h(c.BYTE,r.BYTE,t),i=h(c.KANJI,r.KANJI,t)):(o=h(c.BYTE_KANJI,r.BYTE,t),i=[]),e.concat(n,o,i).sort(function(t,e){return t.index-e.index}).map(function(t){return{data:t.data,mode:t.mode,length:t.length}})}function f(t,e){switch(e){case r.NUMERIC:return o.getBitsLength(t);case r.ALPHANUMERIC:return i.getBitsLength(t);case r.KANJI:return s.getBitsLength(t);case r.BYTE:return a.getBitsLength(t)}}function p(t,e){let n;const c=r.getBestModeForData(t);if(n=r.from(e,c),n!==r.BYTE&&n.bit<c.bit)throw new Error('"'+t+'" cannot be encoded with mode '+r.toString(n)+".\n Suggested mode is: "+r.toString(c));switch(n!==r.KANJI||l.isKanjiModeEnabled()||(n=r.BYTE),n){case r.NUMERIC:return new o(t);case r.ALPHANUMERIC:return new i(t);case r.KANJI:return new s(t);case r.BYTE:return new a(t)}}e.fromArray=function(t){return t.reduce(function(t,e){return"string"==typeof e?t.push(p(e,null)):e.data&&t.push(p(e.data,e.mode)),t},[])},e.fromString=function(t,n){const o=function(t){const e=[];for(let n=0;n<t.length;n++){const o=t[n];switch(o.mode){case r.NUMERIC:e.push([o,{data:o.data,mode:r.ALPHANUMERIC,length:o.length},{data:o.data,mode:r.BYTE,length:o.length}]);break;case r.ALPHANUMERIC:e.push([o,{data:o.data,mode:r.BYTE,length:o.length}]);break;case r.KANJI:e.push([o,{data:o.data,mode:r.BYTE,length:d(o.data)}]);break;case r.BYTE:e.push([{data:o.data,mode:r.BYTE,length:d(o.data)}])}}return e}(g(t,l.isKanjiModeEnabled())),i=function(t,e){const n={},o={start:{}};let i=["start"];for(let a=0;a<t.length;a++){const s=t[a],c=[];for(let t=0;t<s.length;t++){const l=s[t],u=""+a+t;c.push(u),n[u]={node:l,lastCount:0},o[u]={};for(let t=0;t<i.length;t++){const a=i[t];n[a]&&n[a].node.mode===l.mode?(o[a][u]=f(n[a].lastCount+l.length,l.mode)-f(n[a].lastCount,l.mode),n[a].lastCount+=l.length):(n[a]&&(n[a].lastCount=l.length),o[a][u]=f(l.length,l.mode)+4+r.getCharCountIndicator(l.mode,e))}}i=c}for(let t=0;t<i.length;t++)o[i[t]].end=0;return{map:o,table:n}}(o,n),a=u.find_path(i.map,"start","end"),s=[];for(let t=1;t<a.length-1;t++)s.push(i.table[a[t]].node);return e.fromArray(s.reduce(function(t,e){const n=t.length-1>=0?t[t.length-1]:null;return n&&n.mode===e.mode?(t[t.length-1].data+=e.data,t):(t.push(e),t)},[]))},e.rawSplit=function(t){return e.fromArray(g(t,l.isKanjiModeEnabled()))}},6886(t,e){let n;const r=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];e.getSymbolSize=function(t){if(!t)throw new Error('"version" cannot be null or undefined');if(t<1||t>40)throw new Error('"version" should be in range from 1 to 40');return 4*t+17},e.getSymbolTotalCodewords=function(t){return r[t]},e.getBCHDigit=function(t){let e=0;for(;0!==t;)e++,t>>>=1;return e},e.setToSJISFunction=function(t){if("function"!=typeof t)throw new Error('"toSJISFunc" is not a valid function.');n=t},e.isKanjiModeEnabled=function(){return void 0!==n},e.toSJIS=function(t){return n(t)}},1878(t,e){e.isValid=function(t){return!isNaN(t)&&t>=1&&t<=40}},1427(t,e,n){const r=n(6886),o=n(7518),i=n(9953),a=n(208),s=n(1878),c=r.getBCHDigit(7973);function l(t,e){return a.getCharCountIndicator(t,e)+4}function u(t,e){let n=0;return t.forEach(function(t){const r=l(t.mode,e);n+=r+t.getBitsLength()}),n}e.from=function(t,e){return s.isValid(t)?parseInt(t,10):e},e.getCapacity=function(t,e,n){if(!s.isValid(t))throw new Error("Invalid QR Code version");void 0===n&&(n=a.BYTE);const i=8*(r.getSymbolTotalCodewords(t)-o.getTotalCodewordsCount(t,e));if(n===a.MIXED)return i;const c=i-l(n,t);switch(n){case a.NUMERIC:return Math.floor(c/10*3);case a.ALPHANUMERIC:return Math.floor(c/11*2);case a.KANJI:return Math.floor(c/13);case a.BYTE:default:return Math.floor(c/8)}},e.getBestVersionForData=function(t,n){let r;const o=i.from(n,i.M);if(Array.isArray(t)){if(t.length>1)return function(t,n){for(let r=1;r<=40;r++)if(u(t,r)<=e.getCapacity(r,n,a.MIXED))return r}(t,o);if(0===t.length)return 1;r=t[0]}else r=t;return function(t,n,r){for(let o=1;o<=40;o++)if(n<=e.getCapacity(o,r,t))return o}(r.mode,r.getLength(),o)},e.getEncodedBits=function(t){if(!s.isValid(t)||t<7)throw new Error("Invalid QR Code version");let e=t<<12;for(;r.getBCHDigit(e)-c>=0;)e^=7973<<r.getBCHDigit(e)-c;return t<<12|e}},7899(t,e,n){const r=n(2726);e.render=function(t,e,n){let o=n,i=e;void 0!==o||e&&e.getContext||(o=e,e=void 0),e||(i=function(){try{return document.createElement("canvas")}catch(t){throw new Error("You need to specify a canvas element")}}()),o=r.getOptions(o);const a=r.getImageWidth(t.modules.size,o),s=i.getContext("2d"),c=s.createImageData(a,a);return r.qrToImageData(c.data,t,o),function(t,e,n){t.clearRect(0,0,e.width,e.height),e.style||(e.style={}),e.height=n,e.width=n,e.style.height=n+"px",e.style.width=n+"px"}(s,i,a),s.putImageData(c,0,0),i},e.renderToDataURL=function(t,n,r){let o=r;void 0!==o||n&&n.getContext||(o=n,n=void 0),o||(o={});const i=e.render(t,n,o),a=o.type||"image/png",s=o.rendererOpts||{};return i.toDataURL(a,s.quality)}},6756(t,e,n){const r=n(2726);function o(t,e){const n=t.a/255,r=e+'="'+t.hex+'"';return n<1?r+" "+e+'-opacity="'+n.toFixed(2).slice(1)+'"':r}function i(t,e,n){let r=t+e;return void 0!==n&&(r+=" "+n),r}e.render=function(t,e,n){const a=r.getOptions(e),s=t.modules.size,c=t.modules.data,l=s+2*a.margin,u=a.color.light.a?"<path "+o(a.color.light,"fill")+' d="M0 0h'+l+"v"+l+'H0z"/>':"",d="<path "+o(a.color.dark,"stroke")+' d="'+function(t,e,n){let r="",o=0,a=!1,s=0;for(let c=0;c<t.length;c++){const l=Math.floor(c%e),u=Math.floor(c/e);l||a||(a=!0),t[c]?(s++,c>0&&l>0&&t[c-1]||(r+=a?i("M",l+n,.5+u+n):i("m",o,0),o=0,a=!1),l+1<e&&t[c+1]||(r+=i("h",s),s=0)):o++}return r}(c,s,a.margin)+'"/>',h='viewBox="0 0 '+l+" "+l+'"',g='<svg xmlns="http://www.w3.org/2000/svg" '+(a.width?'width="'+a.width+'" height="'+a.width+'" ':"")+h+' shape-rendering="crispEdges">'+u+d+"</svg>\n";return"function"==typeof n&&n(null,g),g}},2726(t,e){function n(t){if("number"==typeof t&&(t=t.toString()),"string"!=typeof t)throw new Error("Color should be defined as hex string");let e=t.slice().replace("#","").split("");if(e.length<3||5===e.length||e.length>8)throw new Error("Invalid hex color: "+t);3!==e.length&&4!==e.length||(e=Array.prototype.concat.apply([],e.map(function(t){return[t,t]}))),6===e.length&&e.push("F","F");const n=parseInt(e.join(""),16);return{r:n>>24&255,g:n>>16&255,b:n>>8&255,a:255&n,hex:"#"+e.slice(0,6).join("")}}e.getOptions=function(t){t||(t={}),t.color||(t.color={});const e=void 0===t.margin||null===t.margin||t.margin<0?4:t.margin,r=t.width&&t.width>=21?t.width:void 0,o=t.scale||4;return{width:r,scale:r?4:o,margin:e,color:{dark:n(t.color.dark||"#000000ff"),light:n(t.color.light||"#ffffffff")},type:t.type,rendererOpts:t.rendererOpts||{}}},e.getScale=function(t,e){return e.width&&e.width>=t+2*e.margin?e.width/(t+2*e.margin):e.scale},e.getImageWidth=function(t,n){const r=e.getScale(t,n);return Math.floor((t+2*n.margin)*r)},e.qrToImageData=function(t,n,r){const o=n.modules.size,i=n.modules.data,a=e.getScale(o,r),s=Math.floor((o+2*r.margin)*a),c=r.margin*a,l=[r.color.light,r.color.dark];for(let e=0;e<s;e++)for(let n=0;n<s;n++){let u=4*(e*s+n),d=r.color.light;e>=c&&n>=c&&e<s-c&&n<s-c&&(d=l[i[Math.floor((e-c)/a)*o+Math.floor((n-c)/a)]?1:0]),t[u++]=d.r,t[u++]=d.g,t[u++]=d.b,t[u]=d.a}}},9698(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},4848(t,e,n){t.exports=n(9698)}},o={};function i(t){var e=o[t];if(void 0!==e)return e.exports;var n=o[t]={exports:{}};return r[t](n,n.exports,i),n.exports}i.d=(t,e)=>{for(var n in e)i.o(e,n)&&!i.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},i.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var a=i(7583);const s=JSON.parse('{"Mail":"mailto:?subject=[SHARING_TEXT_SUBJECT]&body=[SHARING_TEXT_BODY]","Facebook":"https://facebook.com/sharer/sharer.php?u=[SHARING_TEXT_BODY]","LinkedIn":"https://www.linkedin.com/sharing/share-offsite/?url=[SHARING_TEXT_BODY]","Twitter":"https://twitter.com/intent/tweet?text=[SHARING_TEXT_BODY]"}');var c=i(4848);const l="Check out this link: ",u="Sharing Link",d=({isOpen:r,onClose:o,qrCodeDataUrl:i,onCopy:a,onDownload:s,sharedLink:l,copiedLabel:u="Image copied"})=>{const d=e(null),[h,g]=n(!1),f=e(r);return r!==f.current&&(f.current=r,r&&g(!1)),t(()=>{const t=t=>{"Escape"===t.key&&o()},e=t=>{d.current&&!d.current.contains(t.target)&&o()};return r&&(document.addEventListener("keydown",t),document.addEventListener("mousedown",e),document.body.style.overflow="hidden"),()=>{document.removeEventListener("keydown",t),document.removeEventListener("mousedown",e),document.body.style.overflow="unset"}},[r,o]),r?(0,c.jsx)("div",{"data-vf-google-analytics-region":"share-qr-code",className:"mg-modal-overlay",style:{position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(0, 0, 0, 0.5)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:1e3},children:(0,c.jsxs)("div",{ref:d,className:"mg-modal",style:{backgroundColor:"white",borderRadius:"8px",padding:"24px",maxWidth:"500px",width:"90%",maxHeight:"90vh",boxShadow:"0 4px 20px rgba(0, 0, 0, 0.15)",display:"flex",flexDirection:"column",overflow:"hidden"},children:[(0,c.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",marginBottom:"16px",flexShrink:0},children:[(0,c.jsx)("h3",{children:"QR code"}),(0,c.jsx)("button",{onClick:o,style:{background:"none",border:"none",fontSize:"24px",cursor:"pointer",padding:"4px",borderRadius:"4px",color:"#666"},"aria-label":"Close modal",children:"×"})]}),(0,c.jsx)("p",{children:"This QR code contains the link below. You can copy the image or add it to your printed or display materials."}),(0,c.jsx)("div",{style:{flex:1,overflowY:"auto",paddingRight:"8px"},children:i&&(0,c.jsxs)("div",{style:{marginBottom:"16px"},children:[(0,c.jsx)("img",{src:i,alt:"QR Code",style:{maxWidth:"100%",maxHeight:"220px",height:"auto"}}),(0,c.jsx)("div",{style:{textAlign:"left"},children:(0,c.jsx)("code",{className:"mg-code--block",children:(()=>{const t=new URL(l);return t.searchParams.set("utm_source","qr"),t.searchParams.set("utm_medium","web"),t.searchParams.set("utm_campaign","share_box"),t.toString()})()})})]})}),(0,c.jsx)("div",{"aria-live":"polite","aria-atomic":"true",style:{position:"absolute",left:"-10000px",width:"1px",height:"1px",overflow:"hidden"},children:h?`${u}`:""}),(0,c.jsxs)("div",{style:{marginTop:"16px",flexShrink:0,display:"flex",gap:"8px",flexWrap:"wrap",justifyContent:"space-between",alignItems:"flex-end"},children:[(0,c.jsxs)("div",{style:{display:"flex",gap:"8px",flexWrap:"wrap"},children:[(0,c.jsx)("button",{onClick:async()=>{try{await a(),g(!0),setTimeout(()=>{g(!1)},2e3)}catch(t){console.error("Copy failed:",t)}},className:"mg-button mg-button-primary",disabled:h,children:h?u:"Copy image"}),(0,c.jsx)("button",{onClick:s,className:"mg-button mg-button-secondary",children:"Download image"})]}),(0,c.jsx)("button",{onClick:o,className:"mg-button mg-button-secondary",style:{marginLeft:"auto"},children:"Close message"})]})]})}):null};function h({copiedLabel:t,sharedLink:e,className:r}){const[o,i]=n(!1);let a=e;return e.startsWith("https://")?a=e.replace("https://",""):e.startsWith("http://")&&(a=e.replace("http://","")),(0,c.jsxs)("button",{"data-vf-analytics-label":"Quick link copy","aria-label":"Copy to Clipboard",title:"Copy to Clipboard",className:r,onClick:()=>(navigator.clipboard.writeText(e),void i(!0)),children:[(0,c.jsx)("div",{className:"mg-share__clip-icon",children:(0,c.jsx)("span",{className:"mg-icon mg-icon-link","aria-hidden":"true"})}),(0,c.jsx)("div",{className:"mg-share__copy-text",children:o?t:a}),(0,c.jsx)("div",{className:"mg-share__stack-icon",children:(0,c.jsx)("span",{className:"mg-icon mg-icon-clone","aria-hidden":"true"})})]})}const g=({labels:t,SharingSubject:e,SharingTextBody:r,...o})=>{const[i,g]=n(!1),[f,p]=n(null),m=(()=>{const t=document.querySelector('link[rel="shortlink"]');return t?t.href:window.location.href})(),w=t=>{if("QRCode"===t)y();else if("WebShare"===t&&navigator.share)navigator.share({title:e??u,text:r??l,url:m}).catch(t=>console.error("Error sharing",t));else{var n=(t=>{let n=s[t];const o=encodeURIComponent(e??u),i=encodeURIComponent(r??l)+encodeURIComponent(m);return n.replace("[SHARING_TEXT_SUBJECT]",o).replace("[SHARING_TEXT_BODY]",i)})(t);"Mail"===t?window.location.href=n:window.open(n,"_blank","width=600,height=300")}},y=async()=>{try{const t=new URL(m);t.searchParams.set("utm_source","qr"),t.searchParams.set("utm_medium","web"),t.searchParams.set("utm_campaign","share_box");const e=t.toString(),n=await a.toDataURL(e,{width:1024,margin:2,color:{dark:"#000000",light:"#FFFFFF"}});p(n),g(!0)}catch(t){console.error("Error generating QR code:",t),alert("Failed to generate QR code. Please try again.")}};return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsxs)("section",{"data-vf-google-analytics-region":"share-this",className:"mg-share",...o,children:[(0,c.jsx)("header",{className:"mg-share__header",children:t.mainLabel}),(0,c.jsxs)("div",{className:"mg-share__buttons",children:[navigator.share&&(0,c.jsx)("button",{"data-vf-analytics-label":"Social share: Web Share API",onClick:()=>w("WebShare"),"aria-label":"Share using your device",title:"Share using your device",className:"mg-share__button",children:(0,c.jsx)("span",{className:"mg-icon mg-icon-share","aria-hidden":"true"})}),(0,c.jsx)("button",{"data-vf-analytics-label":"Social share: LinkedIn",onClick:()=>w("LinkedIn"),"aria-label":"Share on LinkedIn",className:"mg-share__button",title:"Share on LinkedIn",children:(0,c.jsx)("span",{className:"mg-icon mg-icon-linkedin","aria-hidden":"true"})}),(0,c.jsx)("button",{"data-vf-analytics-label":"Social share: Facebook",onClick:()=>w("Facebook"),"aria-label":"Share on Facebook",title:"Share on Facebook",className:"mg-share__button",children:(0,c.jsx)("span",{className:"mg-icon mg-icon-facebook","aria-hidden":"true"})}),(0,c.jsx)("button",{"data-vf-analytics-label":"Social share: X",onClick:()=>w("Twitter"),"aria-label":"Share on X",className:"mg-share__button",title:"Share on X",children:(0,c.jsx)("span",{className:"mg-icon mg-icon-x-social","aria-hidden":"true"})}),(0,c.jsx)("button",{"data-vf-analytics-label":"Social share: Mail",onClick:()=>w("Mail"),"aria-label":"Share via Email",className:"mg-share__button",title:"Share via Email",children:(0,c.jsx)("span",{className:"mg-icon mg-icon-envelope","aria-hidden":"true"})}),(0,c.jsx)("button",{"data-vf-analytics-label":"Social share: QR Code",onClick:()=>w("QRCode"),"aria-label":"Generate QR Code",className:"mg-share__button",title:"Generate QR Code",children:(0,c.jsx)("span",{className:"mg-icon mg-icon-qrcode","aria-hidden":"true"})})]}),(0,c.jsx)(h,{className:"mg-share__copy-button",copiedLabel:t.onCopy,sharedLink:m})]}),(0,c.jsx)(d,{isOpen:i,onClose:()=>{g(!1),f&&(URL.revokeObjectURL(f),p(null))},qrCodeDataUrl:f,onCopy:async()=>{try{if(f){const t=await fetch(f),e=await t.blob(),n=new ClipboardItem({"image/png":e});await navigator.clipboard.write([n])}}catch(t){console.error("Error copying QR code to clipboard:",t),alert("Failed to copy QR code to clipboard. Please check browser permissions.")}},onDownload:async()=>{try{if(f){const t=await fetch(f),e=await t.blob(),n=new URL(m);let r="qr-code";if(n.hostname&&(r+=`-${n.hostname.replace(/^www\./,"").replace(/\./g,"-")}`),n.pathname&&"/"!==n.pathname){const t=n.pathname.replace(/^\//,"").replace(/\/$/,"").replace(/[^a-zA-Z0-9-_]/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,"");t&&(r+=`-${t}`)}r=r.substring(0,100)+".png";const o=URL.createObjectURL(e),i=document.createElement("a");i.href=o,i.download=r,document.body.appendChild(i),i.click(),document.body.removeChild(i),URL.revokeObjectURL(o)}}catch(t){console.error("Error downloading QR code:",t),alert("Failed to download QR code. Please try again.")}},sharedLink:m,copiedLabel:t.onCopy})]})};function f(t){const{dataset:e}=t;return{labels:{mainLabel:e.mainLabel||"Share this",onCopy:e.onCopyLabel||"Link copied"},SharingSubject:e.sharingSubject||"Sharing Link",SharingTextBody:e.sharingBody||""}}export{h as CopyButton,g as default,f as fromElement};
6
+ import{useEffect as e,useRef as t,useState as n}from"react";var r={6320(e){var t={single_source_shortest_paths:function(e,n,r){var o={},a={};a[n]=0;var i,s,l,c,u,d,h,g=t.PriorityQueue.make();for(g.push(n,0);!g.empty();)for(l in s=(i=g.pop()).value,c=i.cost,u=e[s]||{})u.hasOwnProperty(l)&&(d=c+u[l],h=a[l],(void 0===a[l]||h>d)&&(a[l]=d,g.push(l,d),o[l]=s));if(void 0!==r&&void 0===a[r]){var f=["Could not find a path from ",n," to ",r,"."].join("");throw new Error(f)}return o},extract_shortest_path_from_predecessor_list:function(e,t){for(var n=[],r=t;r;)n.push(r),e[r],r=e[r];return n.reverse(),n},find_path:function(e,n,r){var o=t.single_source_shortest_paths(e,n,r);return t.extract_shortest_path_from_predecessor_list(o,r)},PriorityQueue:{make:function(e){var n,r=t.PriorityQueue,o={};for(n in e=e||{},r)r.hasOwnProperty(n)&&(o[n]=r[n]);return o.queue=[],o.sorter=e.sorter||r.default_sorter,o},default_sorter:function(e,t){return e.cost-t.cost},push:function(e,t){var n={value:e,cost:t};this.queue.push(n),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return 0===this.queue.length}}};e.exports=t},2694(e,t,n){var r=n(6925);function o(){}function a(){}a.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,a,i){if(i!==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 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: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"},7583(e,t,n){const r=n(1333),o=n(157),a=n(7899),i=n(6756);function s(e,t,n,a,i){const s=[].slice.call(arguments,1),l=s.length,c="function"==typeof s[l-1];if(!c&&!r())throw new Error("Callback required as last argument");if(!c){if(l<1)throw new Error("Too few arguments provided");return 1===l?(n=t,t=a=void 0):2!==l||t.getContext||(a=n,n=t,t=void 0),new Promise(function(r,i){try{const i=o.create(n,a);r(e(i,t,a))}catch(e){i(e)}})}if(l<2)throw new Error("Too few arguments provided");2===l?(i=n,n=t,t=a=void 0):3===l&&(t.getContext&&void 0===i?(i=a,a=void 0):(i=a,a=n,n=t,t=void 0));try{const r=o.create(n,a);i(null,e(r,t,a))}catch(e){i(e)}}t.create=o.create,t.toCanvas=s.bind(null,a.render),t.toDataURL=s.bind(null,a.renderToDataURL),t.toString=s.bind(null,function(e,t,n){return i.render(e,n)})},1333(e){e.exports=function(){return"function"==typeof Promise&&Promise.prototype&&Promise.prototype.then}},6421(e,t,n){const r=n(6886).getSymbolSize;t.getRowColCoords=function(e){if(1===e)return[];const t=Math.floor(e/7)+2,n=r(e),o=145===n?26:2*Math.ceil((n-13)/(2*t-2)),a=[n-7];for(let e=1;e<t-1;e++)a[e]=a[e-1]-o;return a.push(6),a.reverse()},t.getPositions=function(e){const n=[],r=t.getRowColCoords(e),o=r.length;for(let e=0;e<o;e++)for(let t=0;t<o;t++)0===e&&0===t||0===e&&t===o-1||e===o-1&&0===t||n.push([r[e],r[t]]);return n}},1433(e,t,n){const r=n(208),o=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function a(e){this.mode=r.ALPHANUMERIC,this.data=e}a.getBitsLength=function(e){return 11*Math.floor(e/2)+e%2*6},a.prototype.getLength=function(){return this.data.length},a.prototype.getBitsLength=function(){return a.getBitsLength(this.data.length)},a.prototype.write=function(e){let t;for(t=0;t+2<=this.data.length;t+=2){let n=45*o.indexOf(this.data[t]);n+=o.indexOf(this.data[t+1]),e.put(n,11)}this.data.length%2&&e.put(o.indexOf(this.data[t]),6)},e.exports=a},9899(e){function t(){this.buffer=[],this.length=0}t.prototype={get:function(e){const t=Math.floor(e/8);return 1==(this.buffer[t]>>>7-e%8&1)},put:function(e,t){for(let n=0;n<t;n++)this.putBit(1==(e>>>t-n-1&1))},getLengthInBits:function(){return this.length},putBit:function(e){const t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}},e.exports=t},8820(e){function t(e){if(!e||e<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=e,this.data=new Uint8Array(e*e),this.reservedBit=new Uint8Array(e*e)}t.prototype.set=function(e,t,n,r){const o=e*this.size+t;this.data[o]=n,r&&(this.reservedBit[o]=!0)},t.prototype.get=function(e,t){return this.data[e*this.size+t]},t.prototype.xor=function(e,t,n){this.data[e*this.size+t]^=n},t.prototype.isReserved=function(e,t){return this.reservedBit[e*this.size+t]},e.exports=t},5822(e,t,n){const r=n(208);function o(e){this.mode=r.BYTE,this.data="string"==typeof e?(new TextEncoder).encode(e):new Uint8Array(e)}o.getBitsLength=function(e){return 8*e},o.prototype.getLength=function(){return this.data.length},o.prototype.getBitsLength=function(){return o.getBitsLength(this.data.length)},o.prototype.write=function(e){for(let t=0,n=this.data.length;t<n;t++)e.put(this.data[t],8)},e.exports=o},7518(e,t,n){const r=n(9953),o=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],a=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];t.getBlocksCount=function(e,t){switch(t){case r.L:return o[4*(e-1)+0];case r.M:return o[4*(e-1)+1];case r.Q:return o[4*(e-1)+2];case r.H:return o[4*(e-1)+3];default:return}},t.getTotalCodewordsCount=function(e,t){switch(t){case r.L:return a[4*(e-1)+0];case r.M:return a[4*(e-1)+1];case r.Q:return a[4*(e-1)+2];case r.H:return a[4*(e-1)+3];default:return}}},9953(e,t){t.L={bit:1},t.M={bit:0},t.Q={bit:3},t.H={bit:2},t.isValid=function(e){return e&&void 0!==e.bit&&e.bit>=0&&e.bit<4},t.from=function(e,n){if(t.isValid(e))return e;try{return function(e){if("string"!=typeof e)throw new Error("Param is not a string");switch(e.toLowerCase()){case"l":case"low":return t.L;case"m":case"medium":return t.M;case"q":case"quartile":return t.Q;case"h":case"high":return t.H;default:throw new Error("Unknown EC Level: "+e)}}(e)}catch(e){return n}}},7756(e,t,n){const r=n(6886).getSymbolSize;t.getPositions=function(e){const t=r(e);return[[0,0],[t-7,0],[0,t-7]]}},4565(e,t,n){const r=n(6886),o=r.getBCHDigit(1335);t.getEncodedBits=function(e,t){const n=e.bit<<3|t;let a=n<<10;for(;r.getBCHDigit(a)-o>=0;)a^=1335<<r.getBCHDigit(a)-o;return 21522^(n<<10|a)}},2731(e,t){const n=new Uint8Array(512),r=new Uint8Array(256);!function(){let e=1;for(let t=0;t<255;t++)n[t]=e,r[e]=t,e<<=1,256&e&&(e^=285);for(let e=255;e<512;e++)n[e]=n[e-255]}(),t.exp=function(e){return n[e]},t.mul=function(e,t){return 0===e||0===t?0:n[r[e]+r[t]]}},4861(e,t,n){const r=n(208),o=n(6886);function a(e){this.mode=r.KANJI,this.data=e}a.getBitsLength=function(e){return 13*e},a.prototype.getLength=function(){return this.data.length},a.prototype.getBitsLength=function(){return a.getBitsLength(this.data.length)},a.prototype.write=function(e){let t;for(t=0;t<this.data.length;t++){let n=o.toSJIS(this.data[t]);if(n>=33088&&n<=40956)n-=33088;else{if(!(n>=57408&&n<=60351))throw new Error("Invalid SJIS character: "+this.data[t]+"\nMake sure your charset is UTF-8");n-=49472}n=192*(n>>>8&255)+(255&n),e.put(n,13)}},e.exports=a},1332(e,t){t.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};function n(e,n,r){switch(e){case t.Patterns.PATTERN000:return(n+r)%2==0;case t.Patterns.PATTERN001:return n%2==0;case t.Patterns.PATTERN010:return r%3==0;case t.Patterns.PATTERN011:return(n+r)%3==0;case t.Patterns.PATTERN100:return(Math.floor(n/2)+Math.floor(r/3))%2==0;case t.Patterns.PATTERN101:return n*r%2+n*r%3==0;case t.Patterns.PATTERN110:return(n*r%2+n*r%3)%2==0;case t.Patterns.PATTERN111:return(n*r%3+(n+r)%2)%2==0;default:throw new Error("bad maskPattern:"+e)}}t.isValid=function(e){return null!=e&&""!==e&&!isNaN(e)&&e>=0&&e<=7},t.from=function(e){return t.isValid(e)?parseInt(e,10):void 0},t.getPenaltyN1=function(e){const t=e.size;let n=0,r=0,o=0,a=null,i=null;for(let s=0;s<t;s++){r=o=0,a=i=null;for(let l=0;l<t;l++){let t=e.get(s,l);t===a?r++:(r>=5&&(n+=r-5+3),a=t,r=1),t=e.get(l,s),t===i?o++:(o>=5&&(n+=o-5+3),i=t,o=1)}r>=5&&(n+=r-5+3),o>=5&&(n+=o-5+3)}return n},t.getPenaltyN2=function(e){const t=e.size;let n=0;for(let r=0;r<t-1;r++)for(let o=0;o<t-1;o++){const t=e.get(r,o)+e.get(r,o+1)+e.get(r+1,o)+e.get(r+1,o+1);4!==t&&0!==t||n++}return 3*n},t.getPenaltyN3=function(e){const t=e.size;let n=0,r=0,o=0;for(let a=0;a<t;a++){r=o=0;for(let i=0;i<t;i++)r=r<<1&2047|e.get(a,i),i>=10&&(1488===r||93===r)&&n++,o=o<<1&2047|e.get(i,a),i>=10&&(1488===o||93===o)&&n++}return 40*n},t.getPenaltyN4=function(e){let t=0;const n=e.data.length;for(let r=0;r<n;r++)t+=e.data[r];return 10*Math.abs(Math.ceil(100*t/n/5)-10)},t.applyMask=function(e,t){const r=t.size;for(let o=0;o<r;o++)for(let a=0;a<r;a++)t.isReserved(a,o)||t.xor(a,o,n(e,a,o))},t.getBestMask=function(e,n){const r=Object.keys(t.Patterns).length;let o=0,a=1/0;for(let i=0;i<r;i++){n(i),t.applyMask(i,e);const r=t.getPenaltyN1(e)+t.getPenaltyN2(e)+t.getPenaltyN3(e)+t.getPenaltyN4(e);t.applyMask(i,e),r<a&&(a=r,o=i)}return o}},208(e,t,n){const r=n(1878),o=n(7044);t.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},t.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},t.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},t.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},t.MIXED={bit:-1},t.getCharCountIndicator=function(e,t){if(!e.ccBits)throw new Error("Invalid mode: "+e);if(!r.isValid(t))throw new Error("Invalid version: "+t);return t>=1&&t<10?e.ccBits[0]:t<27?e.ccBits[1]:e.ccBits[2]},t.getBestModeForData=function(e){return o.testNumeric(e)?t.NUMERIC:o.testAlphanumeric(e)?t.ALPHANUMERIC:o.testKanji(e)?t.KANJI:t.BYTE},t.toString=function(e){if(e&&e.id)return e.id;throw new Error("Invalid mode")},t.isValid=function(e){return e&&e.bit&&e.ccBits},t.from=function(e,n){if(t.isValid(e))return e;try{return function(e){if("string"!=typeof e)throw new Error("Param is not a string");switch(e.toLowerCase()){case"numeric":return t.NUMERIC;case"alphanumeric":return t.ALPHANUMERIC;case"kanji":return t.KANJI;case"byte":return t.BYTE;default:throw new Error("Unknown mode: "+e)}}(e)}catch(e){return n}}},4357(e,t,n){const r=n(208);function o(e){this.mode=r.NUMERIC,this.data=e.toString()}o.getBitsLength=function(e){return 10*Math.floor(e/3)+(e%3?e%3*3+1:0)},o.prototype.getLength=function(){return this.data.length},o.prototype.getBitsLength=function(){return o.getBitsLength(this.data.length)},o.prototype.write=function(e){let t,n,r;for(t=0;t+3<=this.data.length;t+=3)n=this.data.substr(t,3),r=parseInt(n,10),e.put(r,10);const o=this.data.length-t;o>0&&(n=this.data.substr(t),r=parseInt(n,10),e.put(r,3*o+1))},e.exports=o},4713(e,t,n){const r=n(2731);t.mul=function(e,t){const n=new Uint8Array(e.length+t.length-1);for(let o=0;o<e.length;o++)for(let a=0;a<t.length;a++)n[o+a]^=r.mul(e[o],t[a]);return n},t.mod=function(e,t){let n=new Uint8Array(e);for(;n.length-t.length>=0;){const e=n[0];for(let o=0;o<t.length;o++)n[o]^=r.mul(t[o],e);let o=0;for(;o<n.length&&0===n[o];)o++;n=n.slice(o)}return n},t.generateECPolynomial=function(e){let n=new Uint8Array([1]);for(let o=0;o<e;o++)n=t.mul(n,new Uint8Array([1,r.exp(o)]));return n}},157(e,t,n){const r=n(6886),o=n(9953),a=n(9899),i=n(8820),s=n(6421),l=n(7756),c=n(1332),u=n(7518),d=n(4764),h=n(1427),g=n(4565),f=n(208),p=n(9801);function m(e,t,n){const r=e.size,o=g.getEncodedBits(t,n);let a,i;for(a=0;a<15;a++)i=1==(o>>a&1),a<6?e.set(a,8,i,!0):a<8?e.set(a+1,8,i,!0):e.set(r-15+a,8,i,!0),a<8?e.set(8,r-a-1,i,!0):a<9?e.set(8,15-a-1+1,i,!0):e.set(8,15-a-1,i,!0);e.set(r-8,8,1,!0)}function y(e,t,n,o){let g;if(Array.isArray(e))g=p.fromArray(e);else{if("string"!=typeof e)throw new Error("Invalid data");{let r=t;if(!r){const t=p.rawSplit(e);r=h.getBestVersionForData(t,n)}g=p.fromString(e,r||40)}}const y=h.getBestVersionForData(g,n);if(!y)throw new Error("The amount of data is too big to be stored in a QR Code");if(t){if(t<y)throw new Error("\nThe chosen QR Code version cannot contain this amount of data.\nMinimum version required to store current data is: "+y+".\n")}else t=y;const b=function(e,t,n){const o=new a;n.forEach(function(t){o.put(t.mode.bit,4),o.put(t.getLength(),f.getCharCountIndicator(t.mode,e)),t.write(o)});const i=8*(r.getSymbolTotalCodewords(e)-u.getTotalCodewordsCount(e,t));for(o.getLengthInBits()+4<=i&&o.put(0,4);o.getLengthInBits()%8!=0;)o.putBit(0);const s=(i-o.getLengthInBits())/8;for(let e=0;e<s;e++)o.put(e%2?17:236,8);return function(e,t,n){const o=r.getSymbolTotalCodewords(t),a=o-u.getTotalCodewordsCount(t,n),i=u.getBlocksCount(t,n),s=i-o%i,l=Math.floor(o/i),c=Math.floor(a/i),h=c+1,g=l-c,f=new d(g);let p=0;const m=new Array(i),y=new Array(i);let b=0;const w=new Uint8Array(e.buffer);for(let e=0;e<i;e++){const t=e<s?c:h;m[e]=w.slice(p,p+t),y[e]=f.encode(m[e]),p+=t,b=Math.max(b,t)}const C=new Uint8Array(o);let E,x,v=0;for(E=0;E<b;E++)for(x=0;x<i;x++)E<m[x].length&&(C[v++]=m[x][E]);for(E=0;E<g;E++)for(x=0;x<i;x++)C[v++]=y[x][E];return C}(o,e,t)}(t,n,g),w=r.getSymbolSize(t),C=new i(w);return function(e,t){const n=e.size,r=l.getPositions(t);for(let t=0;t<r.length;t++){const o=r[t][0],a=r[t][1];for(let t=-1;t<=7;t++)if(!(o+t<=-1||n<=o+t))for(let r=-1;r<=7;r++)a+r<=-1||n<=a+r||(t>=0&&t<=6&&(0===r||6===r)||r>=0&&r<=6&&(0===t||6===t)||t>=2&&t<=4&&r>=2&&r<=4?e.set(o+t,a+r,!0,!0):e.set(o+t,a+r,!1,!0))}}(C,t),function(e){const t=e.size;for(let n=8;n<t-8;n++){const t=n%2==0;e.set(n,6,t,!0),e.set(6,n,t,!0)}}(C),function(e,t){const n=s.getPositions(t);for(let t=0;t<n.length;t++){const r=n[t][0],o=n[t][1];for(let t=-2;t<=2;t++)for(let n=-2;n<=2;n++)-2===t||2===t||-2===n||2===n||0===t&&0===n?e.set(r+t,o+n,!0,!0):e.set(r+t,o+n,!1,!0)}}(C,t),m(C,n,0),t>=7&&function(e,t){const n=e.size,r=h.getEncodedBits(t);let o,a,i;for(let t=0;t<18;t++)o=Math.floor(t/3),a=t%3+n-8-3,i=1==(r>>t&1),e.set(o,a,i,!0),e.set(a,o,i,!0)}(C,t),function(e,t){const n=e.size;let r=-1,o=n-1,a=7,i=0;for(let s=n-1;s>0;s-=2)for(6===s&&s--;;){for(let n=0;n<2;n++)if(!e.isReserved(o,s-n)){let r=!1;i<t.length&&(r=1==(t[i]>>>a&1)),e.set(o,s-n,r),a--,-1===a&&(i++,a=7)}if(o+=r,o<0||n<=o){o-=r,r=-r;break}}}(C,b),isNaN(o)&&(o=c.getBestMask(C,m.bind(null,C,n))),c.applyMask(o,C),m(C,n,o),{modules:C,version:t,errorCorrectionLevel:n,maskPattern:o,segments:g}}t.create=function(e,t){if(void 0===e||""===e)throw new Error("No input text");let n,a,i=o.M;return void 0!==t&&(i=o.from(t.errorCorrectionLevel,o.M),n=h.from(t.version),a=c.from(t.maskPattern),t.toSJISFunc&&r.setToSJISFunction(t.toSJISFunc)),y(e,n,i,a)}},4764(e,t,n){const r=n(4713);function o(e){this.genPoly=void 0,this.degree=e,this.degree&&this.initialize(this.degree)}o.prototype.initialize=function(e){this.degree=e,this.genPoly=r.generateECPolynomial(this.degree)},o.prototype.encode=function(e){if(!this.genPoly)throw new Error("Encoder not initialized");const t=new Uint8Array(e.length+this.degree);t.set(e);const n=r.mod(t,this.genPoly),o=this.degree-n.length;if(o>0){const e=new Uint8Array(this.degree);return e.set(n,o),e}return n},e.exports=o},7044(e,t){const n="[0-9]+";let r="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";r=r.replace(/u/g,"\\u");const o="(?:(?![A-Z0-9 $%*+\\-./:]|"+r+")(?:.|[\r\n]))+";t.KANJI=new RegExp(r,"g"),t.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),t.BYTE=new RegExp(o,"g"),t.NUMERIC=new RegExp(n,"g"),t.ALPHANUMERIC=new RegExp("[A-Z $%*+\\-./:]+","g");const a=new RegExp("^"+r+"$"),i=new RegExp("^"+n+"$"),s=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");t.testKanji=function(e){return a.test(e)},t.testNumeric=function(e){return i.test(e)},t.testAlphanumeric=function(e){return s.test(e)}},9801(e,t,n){const r=n(208),o=n(4357),a=n(1433),i=n(5822),s=n(4861),l=n(7044),c=n(6886),u=n(6320);function d(e){return unescape(encodeURIComponent(e)).length}function h(e,t,n){const r=[];let o;for(;null!==(o=e.exec(n));)r.push({data:o[0],index:o.index,mode:t,length:o[0].length});return r}function g(e){const t=h(l.NUMERIC,r.NUMERIC,e),n=h(l.ALPHANUMERIC,r.ALPHANUMERIC,e);let o,a;return c.isKanjiModeEnabled()?(o=h(l.BYTE,r.BYTE,e),a=h(l.KANJI,r.KANJI,e)):(o=h(l.BYTE_KANJI,r.BYTE,e),a=[]),t.concat(n,o,a).sort(function(e,t){return e.index-t.index}).map(function(e){return{data:e.data,mode:e.mode,length:e.length}})}function f(e,t){switch(t){case r.NUMERIC:return o.getBitsLength(e);case r.ALPHANUMERIC:return a.getBitsLength(e);case r.KANJI:return s.getBitsLength(e);case r.BYTE:return i.getBitsLength(e)}}function p(e,t){let n;const l=r.getBestModeForData(e);if(n=r.from(t,l),n!==r.BYTE&&n.bit<l.bit)throw new Error('"'+e+'" cannot be encoded with mode '+r.toString(n)+".\n Suggested mode is: "+r.toString(l));switch(n!==r.KANJI||c.isKanjiModeEnabled()||(n=r.BYTE),n){case r.NUMERIC:return new o(e);case r.ALPHANUMERIC:return new a(e);case r.KANJI:return new s(e);case r.BYTE:return new i(e)}}t.fromArray=function(e){return e.reduce(function(e,t){return"string"==typeof t?e.push(p(t,null)):t.data&&e.push(p(t.data,t.mode)),e},[])},t.fromString=function(e,n){const o=function(e){const t=[];for(let n=0;n<e.length;n++){const o=e[n];switch(o.mode){case r.NUMERIC:t.push([o,{data:o.data,mode:r.ALPHANUMERIC,length:o.length},{data:o.data,mode:r.BYTE,length:o.length}]);break;case r.ALPHANUMERIC:t.push([o,{data:o.data,mode:r.BYTE,length:o.length}]);break;case r.KANJI:t.push([o,{data:o.data,mode:r.BYTE,length:d(o.data)}]);break;case r.BYTE:t.push([{data:o.data,mode:r.BYTE,length:d(o.data)}])}}return t}(g(e,c.isKanjiModeEnabled())),a=function(e,t){const n={},o={start:{}};let a=["start"];for(let i=0;i<e.length;i++){const s=e[i],l=[];for(let e=0;e<s.length;e++){const c=s[e],u=""+i+e;l.push(u),n[u]={node:c,lastCount:0},o[u]={};for(let e=0;e<a.length;e++){const i=a[e];n[i]&&n[i].node.mode===c.mode?(o[i][u]=f(n[i].lastCount+c.length,c.mode)-f(n[i].lastCount,c.mode),n[i].lastCount+=c.length):(n[i]&&(n[i].lastCount=c.length),o[i][u]=f(c.length,c.mode)+4+r.getCharCountIndicator(c.mode,t))}}a=l}for(let e=0;e<a.length;e++)o[a[e]].end=0;return{map:o,table:n}}(o,n),i=u.find_path(a.map,"start","end"),s=[];for(let e=1;e<i.length-1;e++)s.push(a.table[i[e]].node);return t.fromArray(s.reduce(function(e,t){const n=e.length-1>=0?e[e.length-1]:null;return n&&n.mode===t.mode?(e[e.length-1].data+=t.data,e):(e.push(t),e)},[]))},t.rawSplit=function(e){return t.fromArray(g(e,c.isKanjiModeEnabled()))}},6886(e,t){let n;const r=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];t.getSymbolSize=function(e){if(!e)throw new Error('"version" cannot be null or undefined');if(e<1||e>40)throw new Error('"version" should be in range from 1 to 40');return 4*e+17},t.getSymbolTotalCodewords=function(e){return r[e]},t.getBCHDigit=function(e){let t=0;for(;0!==e;)t++,e>>>=1;return t},t.setToSJISFunction=function(e){if("function"!=typeof e)throw new Error('"toSJISFunc" is not a valid function.');n=e},t.isKanjiModeEnabled=function(){return void 0!==n},t.toSJIS=function(e){return n(e)}},1878(e,t){t.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40}},1427(e,t,n){const r=n(6886),o=n(7518),a=n(9953),i=n(208),s=n(1878),l=r.getBCHDigit(7973);function c(e,t){return i.getCharCountIndicator(e,t)+4}function u(e,t){let n=0;return e.forEach(function(e){const r=c(e.mode,t);n+=r+e.getBitsLength()}),n}t.from=function(e,t){return s.isValid(e)?parseInt(e,10):t},t.getCapacity=function(e,t,n){if(!s.isValid(e))throw new Error("Invalid QR Code version");void 0===n&&(n=i.BYTE);const a=8*(r.getSymbolTotalCodewords(e)-o.getTotalCodewordsCount(e,t));if(n===i.MIXED)return a;const l=a-c(n,e);switch(n){case i.NUMERIC:return Math.floor(l/10*3);case i.ALPHANUMERIC:return Math.floor(l/11*2);case i.KANJI:return Math.floor(l/13);case i.BYTE:default:return Math.floor(l/8)}},t.getBestVersionForData=function(e,n){let r;const o=a.from(n,a.M);if(Array.isArray(e)){if(e.length>1)return function(e,n){for(let r=1;r<=40;r++)if(u(e,r)<=t.getCapacity(r,n,i.MIXED))return r}(e,o);if(0===e.length)return 1;r=e[0]}else r=e;return function(e,n,r){for(let o=1;o<=40;o++)if(n<=t.getCapacity(o,r,e))return o}(r.mode,r.getLength(),o)},t.getEncodedBits=function(e){if(!s.isValid(e)||e<7)throw new Error("Invalid QR Code version");let t=e<<12;for(;r.getBCHDigit(t)-l>=0;)t^=7973<<r.getBCHDigit(t)-l;return e<<12|t}},7899(e,t,n){const r=n(2726);t.render=function(e,t,n){let o=n,a=t;void 0!==o||t&&t.getContext||(o=t,t=void 0),t||(a=function(){try{return document.createElement("canvas")}catch(e){throw new Error("You need to specify a canvas element")}}()),o=r.getOptions(o);const i=r.getImageWidth(e.modules.size,o),s=a.getContext("2d"),l=s.createImageData(i,i);return r.qrToImageData(l.data,e,o),function(e,t,n){e.clearRect(0,0,t.width,t.height),t.style||(t.style={}),t.height=n,t.width=n,t.style.height=n+"px",t.style.width=n+"px"}(s,a,i),s.putImageData(l,0,0),a},t.renderToDataURL=function(e,n,r){let o=r;void 0!==o||n&&n.getContext||(o=n,n=void 0),o||(o={});const a=t.render(e,n,o),i=o.type||"image/png",s=o.rendererOpts||{};return a.toDataURL(i,s.quality)}},6756(e,t,n){const r=n(2726);function o(e,t){const n=e.a/255,r=t+'="'+e.hex+'"';return n<1?r+" "+t+'-opacity="'+n.toFixed(2).slice(1)+'"':r}function a(e,t,n){let r=e+t;return void 0!==n&&(r+=" "+n),r}t.render=function(e,t,n){const i=r.getOptions(t),s=e.modules.size,l=e.modules.data,c=s+2*i.margin,u=i.color.light.a?"<path "+o(i.color.light,"fill")+' d="M0 0h'+c+"v"+c+'H0z"/>':"",d="<path "+o(i.color.dark,"stroke")+' d="'+function(e,t,n){let r="",o=0,i=!1,s=0;for(let l=0;l<e.length;l++){const c=Math.floor(l%t),u=Math.floor(l/t);c||i||(i=!0),e[l]?(s++,l>0&&c>0&&e[l-1]||(r+=i?a("M",c+n,.5+u+n):a("m",o,0),o=0,i=!1),c+1<t&&e[l+1]||(r+=a("h",s),s=0)):o++}return r}(l,s,i.margin)+'"/>',h='viewBox="0 0 '+c+" "+c+'"',g='<svg xmlns="http://www.w3.org/2000/svg" '+(i.width?'width="'+i.width+'" height="'+i.width+'" ':"")+h+' shape-rendering="crispEdges">'+u+d+"</svg>\n";return"function"==typeof n&&n(null,g),g}},2726(e,t){function n(e){if("number"==typeof e&&(e=e.toString()),"string"!=typeof e)throw new Error("Color should be defined as hex string");let t=e.slice().replace("#","").split("");if(t.length<3||5===t.length||t.length>8)throw new Error("Invalid hex color: "+e);3!==t.length&&4!==t.length||(t=Array.prototype.concat.apply([],t.map(function(e){return[e,e]}))),6===t.length&&t.push("F","F");const n=parseInt(t.join(""),16);return{r:n>>24&255,g:n>>16&255,b:n>>8&255,a:255&n,hex:"#"+t.slice(0,6).join("")}}t.getOptions=function(e){e||(e={}),e.color||(e.color={});const t=void 0===e.margin||null===e.margin||e.margin<0?4:e.margin,r=e.width&&e.width>=21?e.width:void 0,o=e.scale||4;return{width:r,scale:r?4:o,margin:t,color:{dark:n(e.color.dark||"#000000ff"),light:n(e.color.light||"#ffffffff")},type:e.type,rendererOpts:e.rendererOpts||{}}},t.getScale=function(e,t){return t.width&&t.width>=e+2*t.margin?t.width/(e+2*t.margin):t.scale},t.getImageWidth=function(e,n){const r=t.getScale(e,n);return Math.floor((e+2*n.margin)*r)},t.qrToImageData=function(e,n,r){const o=n.modules.size,a=n.modules.data,i=t.getScale(o,r),s=Math.floor((o+2*r.margin)*i),l=r.margin*i,c=[r.color.light,r.color.dark];for(let t=0;t<s;t++)for(let n=0;n<s;n++){let u=4*(t*s+n),d=r.color.light;t>=l&&n>=l&&t<s-l&&n<s-l&&(d=c[a[Math.floor((t-l)/i)*o+Math.floor((n-l)/i)]?1:0]),e[u++]=d.r,e[u++]=d.g,e[u++]=d.b,e[u]=d.a}}},9698(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 a in r={},t)"key"!==a&&(r[a]=t[a]);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},4848(e,t,n){e.exports=n(9698)}},o={};function a(e){var t=o[e];if(void 0!==t)return t.exports;var n=o[e]={exports:{}};return r[e](n,n.exports,a),n.exports}a.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return a.d(t,{a:t}),t},a.d=(e,t)=>{for(var n in t)a.o(t,n)&&!a.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var i=a(5556),s=a.n(i),l=a(7583);const c=JSON.parse('{"Mail":"mailto:?subject=[SHARING_TEXT_SUBJECT]&body=[SHARING_TEXT_BODY]","Facebook":"https://facebook.com/sharer/sharer.php?u=[SHARING_TEXT_BODY]","LinkedIn":"https://www.linkedin.com/sharing/share-offsite/?url=[SHARING_TEXT_BODY]","Twitter":"https://twitter.com/intent/tweet?text=[SHARING_TEXT_BODY]"}');var u=a(4848);const d="Check out this link: ",h="Sharing Link",g={mainLabel:"Share this",onCopy:"Copied",qrCodeTitle:"QR code",qrCodeDescription:"This QR code contains the link below. You can copy the image or add it to your printed or display materials.",closeModal:"Close modal",copyImage:"Copy image",downloadImage:"Download image",closeMessage:"Close message",shareUsingDevice:"Share using your device",shareOnLinkedIn:"Share on LinkedIn",shareOnFacebook:"Share on Facebook",shareOnX:"Share on X",shareViaEmail:"Share via Email",generateQRCode:"Generate QR Code",copyToClipboard:"Copy to Clipboard"},f=({isOpen:r,onClose:o,qrCodeDataUrl:a,onCopy:i,onDownload:s,sharedLink:l,copiedLabel:c="Image copied",titleLabel:d="QR code",descriptionLabel:h="This QR code contains the link below. You can copy the image or add it to your printed or display materials.",closeModalLabel:g="Close modal",copyImageLabel:f="Copy image",downloadImageLabel:p="Download image",closeMessageLabel:m="Close message"})=>{const y=t(null),[b,w]=n(!1),C=t(r);return r!==C.current&&(C.current=r,r&&w(!1)),e(()=>{const e=e=>{"Escape"===e.key&&o()},t=e=>{y.current&&!y.current.contains(e.target)&&o()};return r&&(document.addEventListener("keydown",e),document.addEventListener("mousedown",t),document.body.style.overflow="hidden"),()=>{document.removeEventListener("keydown",e),document.removeEventListener("mousedown",t),document.body.style.overflow="unset"}},[r,o]),r?(0,u.jsx)("div",{"data-vf-google-analytics-region":"share-qr-code",className:"mg-modal-overlay",style:{position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(0, 0, 0, 0.5)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:1e3},children:(0,u.jsxs)("div",{ref:y,className:"mg-modal",style:{backgroundColor:"white",borderRadius:"8px",padding:"24px",maxWidth:"500px",width:"90%",maxHeight:"90vh",boxShadow:"0 4px 20px rgba(0, 0, 0, 0.15)",display:"flex",flexDirection:"column",overflow:"hidden"},children:[(0,u.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",marginBottom:"16px",flexShrink:0},children:[(0,u.jsx)("h3",{children:d}),(0,u.jsx)("button",{onClick:o,style:{background:"none",border:"none",fontSize:"24px",cursor:"pointer",padding:"4px",borderRadius:"4px",color:"#666"},"aria-label":g,children:"×"})]}),(0,u.jsx)("p",{children:h}),(0,u.jsx)("div",{style:{flex:1,overflowY:"auto",paddingRight:"8px"},children:a&&(0,u.jsxs)("div",{style:{marginBottom:"16px"},children:[(0,u.jsx)("img",{src:a,alt:"QR Code",style:{maxWidth:"100%",maxHeight:"220px",height:"auto"}}),(0,u.jsx)("div",{style:{textAlign:"left"},children:(0,u.jsx)("code",{className:"mg-code--block",children:(()=>{const e=new URL(l);return e.searchParams.set("utm_source","qr"),e.searchParams.set("utm_medium","web"),e.searchParams.set("utm_campaign","share_box"),e.toString()})()})})]})}),(0,u.jsx)("div",{"aria-live":"polite","aria-atomic":"true",style:{position:"absolute",left:"-10000px",width:"1px",height:"1px",overflow:"hidden"},children:b?`${c}`:""}),(0,u.jsxs)("div",{style:{marginTop:"16px",flexShrink:0,display:"flex",gap:"8px",flexWrap:"wrap",justifyContent:"space-between",alignItems:"flex-end"},children:[(0,u.jsxs)("div",{style:{display:"flex",gap:"8px",flexWrap:"wrap"},children:[(0,u.jsx)("button",{onClick:async()=>{try{await i(),w(!0),setTimeout(()=>{w(!1)},2e3)}catch(e){console.error("Copy failed:",e)}},className:"mg-button mg-button-primary",disabled:b,children:b?c:f}),(0,u.jsx)("button",{onClick:s,className:"mg-button mg-button-secondary",children:p})]}),(0,u.jsx)("button",{onClick:o,className:"mg-button mg-button-secondary",style:{marginLeft:"auto"},children:m})]})]})}):null},p=({labels:e={},SharingSubject:t,SharingTextBody:r,...o})=>{const a={...g,...e},[i,s]=n(!1),[p,y]=n(null),b=(()=>{const e=document.querySelector('link[rel="shortlink"]');return e?e.href:window.location.href})(),w=e=>{if("QRCode"===e)C();else if("WebShare"===e&&navigator.share)navigator.share({title:t??h,text:r??d,url:b}).catch(e=>console.error("Error sharing",e));else{var n=(e=>{let n=c[e];const o=encodeURIComponent(t??h),a=encodeURIComponent(r??d)+encodeURIComponent(b);return n.replace("[SHARING_TEXT_SUBJECT]",o).replace("[SHARING_TEXT_BODY]",a)})(e);"Mail"===e?window.location.href=n:window.open(n,"_blank","width=600,height=300")}},C=async()=>{try{const e=new URL(b);e.searchParams.set("utm_source","qr"),e.searchParams.set("utm_medium","web"),e.searchParams.set("utm_campaign","share_box");const t=e.toString(),n=await l.toDataURL(t,{width:1024,margin:2,color:{dark:"#000000",light:"#FFFFFF"}});y(n),s(!0)}catch(e){console.error("Error generating QR code:",e),alert("Failed to generate QR code. Please try again.")}};return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsxs)("section",{"data-vf-google-analytics-region":"share-this",className:"mg-share",...o,children:[(0,u.jsx)("header",{className:"mg-share__header",children:a.mainLabel}),(0,u.jsxs)("div",{className:"mg-share__buttons",children:[navigator.share&&(0,u.jsx)("button",{"data-vf-analytics-label":"Social share: Web Share API",onClick:()=>w("WebShare"),"aria-label":a.shareUsingDevice,title:a.shareUsingDevice,className:"mg-share__button",children:(0,u.jsx)("span",{className:"mg-icon mg-icon-share","aria-hidden":"true"})}),(0,u.jsx)("button",{"data-vf-analytics-label":"Social share: LinkedIn",onClick:()=>w("LinkedIn"),"aria-label":a.shareOnLinkedIn,className:"mg-share__button",title:a.shareOnLinkedIn,children:(0,u.jsx)("span",{className:"mg-icon mg-icon-linkedin","aria-hidden":"true"})}),(0,u.jsx)("button",{"data-vf-analytics-label":"Social share: Facebook",onClick:()=>w("Facebook"),"aria-label":a.shareOnFacebook,title:a.shareOnFacebook,className:"mg-share__button",children:(0,u.jsx)("span",{className:"mg-icon mg-icon-facebook","aria-hidden":"true"})}),(0,u.jsx)("button",{"data-vf-analytics-label":"Social share: X",onClick:()=>w("Twitter"),"aria-label":a.shareOnX,className:"mg-share__button",title:a.shareOnX,children:(0,u.jsx)("span",{className:"mg-icon mg-icon-x-social","aria-hidden":"true"})}),(0,u.jsx)("button",{"data-vf-analytics-label":"Social share: Mail",onClick:()=>w("Mail"),"aria-label":a.shareViaEmail,className:"mg-share__button",title:a.shareViaEmail,children:(0,u.jsx)("span",{className:"mg-icon mg-icon-envelope","aria-hidden":"true"})}),(0,u.jsx)("button",{"data-vf-analytics-label":"Social share: QR Code",onClick:()=>w("QRCode"),"aria-label":a.generateQRCode,className:"mg-share__button",title:a.generateQRCode,children:(0,u.jsx)("span",{className:"mg-icon mg-icon-qrcode","aria-hidden":"true"})})]}),(0,u.jsx)(m,{className:"mg-share__copy-button",copiedLabel:a.onCopy,copyToClipboardLabel:a.copyToClipboard,sharedLink:b})]}),(0,u.jsx)(f,{isOpen:i,onClose:()=>{s(!1),p&&(URL.revokeObjectURL(p),y(null))},qrCodeDataUrl:p,onCopy:async()=>{try{if(p){const e=await fetch(p),t=await e.blob(),n=new ClipboardItem({"image/png":t});await navigator.clipboard.write([n])}}catch(e){console.error("Error copying QR code to clipboard:",e),alert("Failed to copy QR code to clipboard. Please check browser permissions.")}},onDownload:async()=>{try{if(p){const e=await fetch(p),t=await e.blob(),n=new URL(b);let r="qr-code";if(n.hostname&&(r+=`-${n.hostname.replace(/^www\./,"").replace(/\./g,"-")}`),n.pathname&&"/"!==n.pathname){const e=n.pathname.replace(/^\//,"").replace(/\/$/,"").replace(/[^a-zA-Z0-9-_]/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,"");e&&(r+=`-${e}`)}r=r.substring(0,100)+".png";const o=URL.createObjectURL(t),a=document.createElement("a");a.href=o,a.download=r,document.body.appendChild(a),a.click(),document.body.removeChild(a),URL.revokeObjectURL(o)}}catch(e){console.error("Error downloading QR code:",e),alert("Failed to download QR code. Please try again.")}},sharedLink:b,copiedLabel:a.onCopy,titleLabel:a.qrCodeTitle,descriptionLabel:a.qrCodeDescription,closeModalLabel:a.closeModal,copyImageLabel:a.copyImage,downloadImageLabel:a.downloadImage,closeMessageLabel:a.closeMessage})]})};function m({copiedLabel:e,sharedLink:t,className:r,copyToClipboardLabel:o="Copy to Clipboard"}){const[a,i]=n(!1);let s=t;return t.startsWith("https://")?s=t.replace("https://",""):t.startsWith("http://")&&(s=t.replace("http://","")),(0,u.jsxs)("button",{"data-vf-analytics-label":"Quick link copy","aria-label":o,title:o,className:r,onClick:()=>(navigator.clipboard.writeText(t),void i(!0)),children:[(0,u.jsx)("div",{className:"mg-share__clip-icon",children:(0,u.jsx)("span",{className:"mg-icon mg-icon-link","aria-hidden":"true"})}),(0,u.jsx)("div",{className:"mg-share__copy-text",children:a?e:s}),(0,u.jsx)("div",{className:"mg-share__stack-icon",children:(0,u.jsx)("span",{className:"mg-icon mg-icon-clone","aria-hidden":"true"})})]})}f.propTypes={isOpen:s().bool.isRequired,onClose:s().func.isRequired,qrCodeDataUrl:s().string,onCopy:s().func.isRequired,onDownload:s().func.isRequired,sharedLink:s().string.isRequired,copiedLabel:s().string},p.propTypes={labels:s().shape({mainLabel:s().string,onCopy:s().string,qrCodeTitle:s().string,qrCodeDescription:s().string,closeModal:s().string,copyImage:s().string,downloadImage:s().string,closeMessage:s().string,shareUsingDevice:s().string,shareOnLinkedIn:s().string,shareOnFacebook:s().string,shareOnX:s().string,shareViaEmail:s().string,generateQRCode:s().string,copyToClipboard:s().string}),SharingSubject:s().string,SharingTextBody:s().string},m.propTypes={copiedLabel:s().string.isRequired,sharedLink:s().string.isRequired,className:s().string,copyToClipboardLabel:s().string};const y=p;function b(e){const{dataset:t}=e;return{labels:{mainLabel:t.mainLabel||"Share this",onCopy:t.onCopyLabel||"Link copied"},SharingSubject:t.sharingSubject||"Sharing Link",SharingTextBody:t.sharingBody||""}}export{m as CopyButton,y as default,b as fromElement};
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * This is a UNDRR Mangrove component: https://github.com/unisdr/undrr-mangrove?tab=readme-ov-file
3
- * Compiled on: 2026-05-11T09:13:25.318Z
3
+ * Compiled on: 2026-07-06T14:31:03.210Z
4
4
  */
5
5
  /*! For license information please see ShowMore.js.LICENSE.txt */
6
6
  import{default as e,useEffect as t}from"react";var o={2694(e,t,o){var a=o(6925);function r(){}function s(){}s.resetWarningCache=r,e.exports=function(){function e(e,t,o,r,s,n){if(n!==a){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 o={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:s,resetWarningCache:r};return o.PropTypes=o,o}},5556(e,t,o){e.exports=o(2694)()},6925(e){e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},9698(e,t){var o=Symbol.for("react.transitional.element");function a(e,t,a){var r=null;if(void 0!==a&&(r=""+a),void 0!==t.key&&(r=""+t.key),"key"in t)for(var s in a={},t)"key"!==s&&(a[s]=t[s]);else a=t;return t=a.ref,{$$typeof:o,type:e,key:r,ref:void 0!==t?t:null,props:a}}Symbol.for("react.fragment"),t.jsx=a,t.jsxs=a},4848(e,t,o){e.exports=o(9698)}},a={};function r(e){var t=a[e];if(void 0!==t)return t.exports;var s=a[e]={exports:{}};return o[e](s,s.exports,r),s.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var o in t)r.o(t,o)&&!r.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var s=r(5556),n=r.n(s);function l(e){(e?e instanceof HTMLElement?[e]:e:document.querySelectorAll("[data-mg-show-more]")).forEach(t=>{if(!e&&t.hasAttribute("data-mg-show-more-skip-auto-init"))return;if(t.dataset.mgShowMoreInitialized)return;t.dataset.mgShowMoreInitialized="true",t.dataset.dataVfGoogleAnalyticsLabel="Show more: "+t.dataset.mgShowMoreLabelCollapsed||0;const o=t.dataset.mgShowMoreTarget||".mg-show-more--container",a=document.querySelector(o);a?(t.addEventListener("click",e=>{e.preventDefault(),a.classList.toggle("mg-show-more--collapsed"),t.textContent=a.classList.contains("mg-show-more--collapsed")?t.dataset.mgShowMoreLabelCollapsed||"Show more":t.dataset.mgShowMoreLabelOpen||"Show less",a.classList.contains("mg-show-more--collapsed")?t.classList.remove("mg-show-more--button--open"):t.classList.add("mg-show-more--button--open")}),a.addEventListener("click",()=>{a.classList.contains("mg-show-more--collapsed")&&t.click()}),t.click()):console.warn(`[mg-show-more] Target not found: "${o}"`)})}"loading"===document.readyState?document.addEventListener("DOMContentLoaded",()=>l(),!1):l();var i=r(4848);const c=[];function p({data:o=c}){return t(()=>{l()},[]),(0,i.jsxs)(e.Fragment,{children:[" ",o.map((t,o)=>(0,i.jsxs)(e.Fragment,{children:[(0,i.jsx)("div",{className:t.collapsable_wrapper_class,children:t.collapsable_text}),(0,i.jsx)("a",{href:"#",className:"mg-button mg-button-primary mg-show-more--button","data-mg-show-more":"true","data-mg-show-more-target":`.${t.collapsable_wrapper_class}`,"data-mg-show-more-label-open":"Show less themes","data-mg-show-more-label-collapsed":"Show more themes",children:t.button_text})]},o))]})}p.propTypes={data:n().arrayOf(n().shape({button_text:n().string.isRequired,collapsable_wrapper_class:n().string.isRequired,collapsable_text:n().string.isRequired})).isRequired};const m=p;export{p as ShowMore,m as default};
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * This is a UNDRR Mangrove component: https://github.com/unisdr/undrr-mangrove?tab=readme-ov-file
3
- * Compiled on: 2026-05-11T09:13:25.318Z
3
+ * Compiled on: 2026-07-06T14:31:03.210Z
4
4
  */
5
5
  /*! For license information please see StatsCard.js.LICENSE.txt */
6
- import"react";var e={2694(e,t,n){var r=n(6925);function o(){}function a(){}a.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,a,i){if(i!==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: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"},9698(e,t){var n=Symbol.for("react.transitional.element");function r(e,t,r){var o=null;if(void 0!==r&&(o=""+r),void 0!==t.key&&(o=""+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:o,ref:void 0!==t?t:null,props:r}}Symbol.for("react.fragment"),t.jsx=r,t.jsxs=r},4848(e,t,n){e.exports=n(9698)}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var a=t[r]={exports:{}};return e[r](a,a.exports,n),a.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},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(5556),o=n.n(r),a=n(4848);const i=({type:e=2,children:t,className:n,tabIndex:r,...o})=>{const i=`h${Math.min(Math.max(parseInt(e,10)||2,1),6)}`;return(0,a.jsx)(i,{className:n,tabIndex:r,...o,children:t})},{entries:l,setPrototypeOf:s,isFrozen:c,getPrototypeOf:u,getOwnPropertyDescriptor:m}=Object;let{freeze:p,seal:f,create:d}=Object,{apply:h,construct:g}="undefined"!=typeof Reflect&&Reflect;p||(p=function(e){return e}),f||(f=function(e){return e}),h||(h=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)}),g||(g=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 T=z(Array.prototype.forEach),y=z(Array.prototype.lastIndexOf),_=z(Array.prototype.pop),b=z(Array.prototype.push),A=z(Array.prototype.splice),E=Array.isArray,S=z(String.prototype.toLowerCase),N=z(String.prototype.toString),R=z(String.prototype.match),O=z(String.prototype.replace),v=z(String.prototype.indexOf),x=z(String.prototype.trim),D=z(Number.prototype.toString),I=z(Boolean.prototype.toString),k="undefined"==typeof BigInt?null:z(BigInt.prototype.toString),w="undefined"==typeof Symbol?null:z(Symbol.prototype.toString),C=z(Object.prototype.hasOwnProperty),L=z(Object.prototype.toString),M=z(RegExp.prototype.test),P=(U=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return g(U,t)});var U;function z(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 h(e,t,r)}}function F(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:S;if(s&&s(e,null),!E(t))return e;let r=t.length;for(;r--;){let o=t[r];if("string"==typeof o){const e=n(o);e!==o&&(c(t)||(t[r]=e),o=e)}e[o]=!0}return e}function H(e){for(let t=0;t<e.length;t++)C(e,t)||(e[t]=null);return e}function j(e){const t=d(null);for(const[n,r]of l(e))C(e,n)&&(E(r)?t[n]=H(r):r&&"object"==typeof r&&r.constructor===Object?t[n]=j(r):t[n]=r);return t}function B(e,t){for(;null!==e;){const n=m(e,t);if(n){if(n.get)return z(n.get);if("function"==typeof n.value)return z(n.value)}e=u(e)}return function(){return null}}const W=p(["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"]),G=p(["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"]),Y=p(["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"]),$=p(["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"]),X=p(["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=p(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),K=p(["#text"]),V=p(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","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"]),Z=p(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),J=p(["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"]),Q=p(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),ee=f(/\{\{[\w\W]*|[\w\W]*\}\}/gm),te=f(/<%[\w\W]*|[\w\W]*%>/gm),ne=f(/\$\{[\w\W]*/gm),re=f(/^data-[\-\w.\u00B7-\uFFFF]+$/),oe=f(/^aria-[\-\w]+$/),ae=f(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),ie=f(/^(?:\w+script|data):/i),le=f(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),se=f(/^html$/i),ce=f(/^[a-z][.\w]*(-[.\w]+)+$/i);var ue=Object.freeze({__proto__:null,ARIA_ATTR:oe,ATTR_WHITESPACE:le,CUSTOM_ELEMENT:ce,DATA_ATTR:re,DOCTYPE_NAME:se,ERB_EXPR:te,IS_ALLOWED_URI:ae,IS_SCRIPT_OR_DATA:ie,MUSTACHE_EXPR:ee,TMPLIT_EXPR:ne});const me=function(){return"undefined"==typeof window?null:window};var pe=function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:me();const n=t=>e(t);if(n.version="3.4.2",n.removed=[],!t||!t.document||9!==t.document.nodeType||!t.Element)return n.isSupported=!1,n;let{document:r}=t;const o=r,a=o.currentScript,{DocumentFragment:i,HTMLTemplateElement:s,Node:c,Element:u,NodeFilter:m,NamedNodeMap:f=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:h,DOMParser:g,trustedTypes:U}=t,z=u.prototype,H=B(z,"cloneNode"),ee=B(z,"remove"),te=B(z,"nextSibling"),ne=B(z,"childNodes"),re=B(z,"parentNode");if("function"==typeof s){const e=r.createElement("template");e.content&&e.content.ownerDocument&&(r=e.content.ownerDocument)}let oe,ie="";const{implementation:le,createNodeIterator:ce,createDocumentFragment:pe,getElementsByTagName:fe}=r,{importNode:de}=o;let he={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};n.isSupported="function"==typeof l&&"function"==typeof re&&le&&void 0!==le.createHTMLDocument;const{MUSTACHE_EXPR:ge,ERB_EXPR:Te,TMPLIT_EXPR:ye,DATA_ATTR:_e,ARIA_ATTR:be,IS_SCRIPT_OR_DATA:Ae,ATTR_WHITESPACE:Ee,CUSTOM_ELEMENT:Se}=ue;let{IS_ALLOWED_URI:Ne}=ue,Re=null;const Oe=F({},[...W,...G,...Y,...X,...K]);let ve=null;const xe=F({},[...V,...Z,...J,...Q]);let De=Object.seal(d(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}})),Ie=null,ke=null;const we=Object.seal(d(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Ce=!0,Le=!0,Me=!1,Pe=!0,Ue=!1,ze=!0,Fe=!1,He=!1,je=!1,Be=!1,We=!1,Ge=!1,Ye=!0,$e=!1;const Xe="user-content-";let qe=!0,Ke=!1,Ve={},Ze=null;const Je=F({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Qe=null;const et=F({},["audio","video","img","source","image","track"]);let tt=null;const nt=F({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),rt="http://www.w3.org/1998/Math/MathML",ot="http://www.w3.org/2000/svg",at="http://www.w3.org/1999/xhtml";let it=at,lt=!1,st=null;const ct=F({},[rt,ot,at],N);let ut=F({},["mi","mo","mn","ms","mtext"]),mt=F({},["annotation-xml"]);const pt=F({},["title","style","font","a","script"]);let ft=null;const dt=["application/xhtml+xml","text/html"];let ht=null,gt=null;const Tt=r.createElement("form"),yt=function(e){return e instanceof RegExp||e instanceof Function},_t=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(gt&&gt===e)return;e&&"object"==typeof e||(e={}),e=j(e),ft=-1===dt.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,ht="application/xhtml+xml"===ft?N:S,Re=C(e,"ALLOWED_TAGS")&&E(e.ALLOWED_TAGS)?F({},e.ALLOWED_TAGS,ht):Oe,ve=C(e,"ALLOWED_ATTR")&&E(e.ALLOWED_ATTR)?F({},e.ALLOWED_ATTR,ht):xe,st=C(e,"ALLOWED_NAMESPACES")&&E(e.ALLOWED_NAMESPACES)?F({},e.ALLOWED_NAMESPACES,N):ct,tt=C(e,"ADD_URI_SAFE_ATTR")&&E(e.ADD_URI_SAFE_ATTR)?F(j(nt),e.ADD_URI_SAFE_ATTR,ht):nt,Qe=C(e,"ADD_DATA_URI_TAGS")&&E(e.ADD_DATA_URI_TAGS)?F(j(et),e.ADD_DATA_URI_TAGS,ht):et,Ze=C(e,"FORBID_CONTENTS")&&E(e.FORBID_CONTENTS)?F({},e.FORBID_CONTENTS,ht):Je,Ie=C(e,"FORBID_TAGS")&&E(e.FORBID_TAGS)?F({},e.FORBID_TAGS,ht):j({}),ke=C(e,"FORBID_ATTR")&&E(e.FORBID_ATTR)?F({},e.FORBID_ATTR,ht):j({}),Ve=!!C(e,"USE_PROFILES")&&(e.USE_PROFILES&&"object"==typeof e.USE_PROFILES?j(e.USE_PROFILES):e.USE_PROFILES),Ce=!1!==e.ALLOW_ARIA_ATTR,Le=!1!==e.ALLOW_DATA_ATTR,Me=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Pe=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,Ue=e.SAFE_FOR_TEMPLATES||!1,ze=!1!==e.SAFE_FOR_XML,Fe=e.WHOLE_DOCUMENT||!1,Be=e.RETURN_DOM||!1,We=e.RETURN_DOM_FRAGMENT||!1,Ge=e.RETURN_TRUSTED_TYPE||!1,je=e.FORCE_BODY||!1,Ye=!1!==e.SANITIZE_DOM,$e=e.SANITIZE_NAMED_PROPS||!1,qe=!1!==e.KEEP_CONTENT,Ke=e.IN_PLACE||!1,Ne=function(e){try{return M(e,""),!0}catch(e){return!1}}(e.ALLOWED_URI_REGEXP)?e.ALLOWED_URI_REGEXP:ae,it="string"==typeof e.NAMESPACE?e.NAMESPACE:at,ut=C(e,"MATHML_TEXT_INTEGRATION_POINTS")&&e.MATHML_TEXT_INTEGRATION_POINTS&&"object"==typeof e.MATHML_TEXT_INTEGRATION_POINTS?j(e.MATHML_TEXT_INTEGRATION_POINTS):F({},["mi","mo","mn","ms","mtext"]),mt=C(e,"HTML_INTEGRATION_POINTS")&&e.HTML_INTEGRATION_POINTS&&"object"==typeof e.HTML_INTEGRATION_POINTS?j(e.HTML_INTEGRATION_POINTS):F({},["annotation-xml"]);const t=C(e,"CUSTOM_ELEMENT_HANDLING")&&e.CUSTOM_ELEMENT_HANDLING&&"object"==typeof e.CUSTOM_ELEMENT_HANDLING?j(e.CUSTOM_ELEMENT_HANDLING):d(null);if(De=d(null),C(t,"tagNameCheck")&&yt(t.tagNameCheck)&&(De.tagNameCheck=t.tagNameCheck),C(t,"attributeNameCheck")&&yt(t.attributeNameCheck)&&(De.attributeNameCheck=t.attributeNameCheck),C(t,"allowCustomizedBuiltInElements")&&"boolean"==typeof t.allowCustomizedBuiltInElements&&(De.allowCustomizedBuiltInElements=t.allowCustomizedBuiltInElements),Ue&&(Le=!1),We&&(Be=!0),Ve&&(Re=F({},K),ve=d(null),!0===Ve.html&&(F(Re,W),F(ve,V)),!0===Ve.svg&&(F(Re,G),F(ve,Z),F(ve,Q)),!0===Ve.svgFilters&&(F(Re,Y),F(ve,Z),F(ve,Q)),!0===Ve.mathMl&&(F(Re,X),F(ve,J),F(ve,Q))),we.tagCheck=null,we.attributeCheck=null,C(e,"ADD_TAGS")&&("function"==typeof e.ADD_TAGS?we.tagCheck=e.ADD_TAGS:E(e.ADD_TAGS)&&(Re===Oe&&(Re=j(Re)),F(Re,e.ADD_TAGS,ht))),C(e,"ADD_ATTR")&&("function"==typeof e.ADD_ATTR?we.attributeCheck=e.ADD_ATTR:E(e.ADD_ATTR)&&(ve===xe&&(ve=j(ve)),F(ve,e.ADD_ATTR,ht))),C(e,"ADD_URI_SAFE_ATTR")&&E(e.ADD_URI_SAFE_ATTR)&&F(tt,e.ADD_URI_SAFE_ATTR,ht),C(e,"FORBID_CONTENTS")&&E(e.FORBID_CONTENTS)&&(Ze===Je&&(Ze=j(Ze)),F(Ze,e.FORBID_CONTENTS,ht)),C(e,"ADD_FORBID_CONTENTS")&&E(e.ADD_FORBID_CONTENTS)&&(Ze===Je&&(Ze=j(Ze)),F(Ze,e.ADD_FORBID_CONTENTS,ht)),qe&&(Re["#text"]=!0),Fe&&F(Re,["html","head","body"]),Re.table&&(F(Re,["tbody"]),delete Ie.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw P('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw P('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');oe=e.TRUSTED_TYPES_POLICY,ie=oe.createHTML("")}else void 0===oe&&(oe=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}}(U,a)),null!==oe&&"string"==typeof ie&&(ie=oe.createHTML(""));p&&p(e),gt=e},bt=F({},[...G,...Y,...$]),At=F({},[...X,...q]),Et=function(e){b(n.removed,{element:e});try{re(e).removeChild(e)}catch(t){ee(e)}},St=function(e,t){try{b(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){b(n.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e)if(Be||We)try{Et(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},Nt=function(e){let t=null,n=null;if(je)e="<remove></remove>"+e;else{const t=R(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===ft&&it===at&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const o=oe?oe.createHTML(e):e;if(it===at)try{t=(new g).parseFromString(o,ft)}catch(e){}if(!t||!t.documentElement){t=le.createDocument(it,"template",null);try{t.documentElement.innerHTML=lt?ie:o}catch(e){}}const a=t.body||t.documentElement;return e&&n&&a.insertBefore(r.createTextNode(n),a.childNodes[0]||null),it===at?fe.call(t,Fe?"html":"body")[0]:Fe?t.documentElement:a},Rt=function(e){return ce.call(e.ownerDocument||e,e,m.SHOW_ELEMENT|m.SHOW_COMMENT|m.SHOW_TEXT|m.SHOW_PROCESSING_INSTRUCTION|m.SHOW_CDATA_SECTION,null)},Ot=function(e){return e instanceof h&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof f)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},vt=function(e){return"function"==typeof c&&e instanceof c};function xt(e,t,r){T(e,e=>{e.call(n,t,r,gt)})}const Dt=function(e){let t=null;if(xt(he.beforeSanitizeElements,e,null),Ot(e))return Et(e),!0;const r=ht(e.nodeName);if(xt(he.uponSanitizeElement,e,{tagName:r,allowedTags:Re}),ze&&e.hasChildNodes()&&!vt(e.firstElementChild)&&M(/<[/\w!]/g,e.innerHTML)&&M(/<[/\w!]/g,e.textContent))return Et(e),!0;if(ze&&e.namespaceURI===at&&"style"===r&&vt(e.firstElementChild))return Et(e),!0;if(7===e.nodeType)return Et(e),!0;if(ze&&8===e.nodeType&&M(/<[/\w]/g,e.data))return Et(e),!0;if(Ie[r]||!(we.tagCheck instanceof Function&&we.tagCheck(r))&&!Re[r]){if(!Ie[r]&&wt(r)){if(De.tagNameCheck instanceof RegExp&&M(De.tagNameCheck,r))return!1;if(De.tagNameCheck instanceof Function&&De.tagNameCheck(r))return!1}if(qe&&!Ze[r]){const t=re(e)||e.parentNode,n=ne(e)||e.childNodes;if(n&&t)for(let r=n.length-1;r>=0;--r){const o=H(n[r],!0);t.insertBefore(o,te(e))}}return Et(e),!0}return e instanceof u&&!function(e){let t=re(e);t&&t.tagName||(t={namespaceURI:it,tagName:"template"});const n=S(e.tagName),r=S(t.tagName);return!!st[e.namespaceURI]&&(e.namespaceURI===ot?t.namespaceURI===at?"svg"===n:t.namespaceURI===rt?"svg"===n&&("annotation-xml"===r||ut[r]):Boolean(bt[n]):e.namespaceURI===rt?t.namespaceURI===at?"math"===n:t.namespaceURI===ot?"math"===n&&mt[r]:Boolean(At[n]):e.namespaceURI===at?!(t.namespaceURI===ot&&!mt[r])&&!(t.namespaceURI===rt&&!ut[r])&&!At[n]&&(pt[n]||!bt[n]):!("application/xhtml+xml"!==ft||!st[e.namespaceURI]))}(e)?(Et(e),!0):"noscript"!==r&&"noembed"!==r&&"noframes"!==r||!M(/<\/no(script|embed|frames)/i,e.innerHTML)?(Ue&&3===e.nodeType&&(t=e.textContent,T([ge,Te,ye],e=>{t=O(t,e," ")}),e.textContent!==t&&(b(n.removed,{element:e.cloneNode()}),e.textContent=t)),xt(he.afterSanitizeElements,e,null),!1):(Et(e),!0)},It=function(e,t,n){if(ke[t])return!1;if(Ye&&("id"===t||"name"===t)&&(n in r||n in Tt))return!1;const o=ve[t]||we.attributeCheck instanceof Function&&we.attributeCheck(t,e);if(Le&&!ke[t]&&M(_e,t));else if(Ce&&M(be,t));else if(!o||ke[t]){if(!(wt(e)&&(De.tagNameCheck instanceof RegExp&&M(De.tagNameCheck,e)||De.tagNameCheck instanceof Function&&De.tagNameCheck(e))&&(De.attributeNameCheck instanceof RegExp&&M(De.attributeNameCheck,t)||De.attributeNameCheck instanceof Function&&De.attributeNameCheck(t,e))||"is"===t&&De.allowCustomizedBuiltInElements&&(De.tagNameCheck instanceof RegExp&&M(De.tagNameCheck,n)||De.tagNameCheck instanceof Function&&De.tagNameCheck(n))))return!1}else if(tt[t]);else if(M(Ne,O(n,Ee,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==v(n,"data:")||!Qe[e])if(Me&&!M(Ae,O(n,Ee,"")));else if(n)return!1;return!0},kt=F({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),wt=function(e){return!kt[S(e)]&&M(Se,e)},Ct=function(e){xt(he.beforeSanitizeAttributes,e,null);const{attributes:t}=e;if(!t||Ot(e))return;const r={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:ve,forceKeepAttr:void 0};let o=t.length;for(;o--;){const a=t[o],{name:i,namespaceURI:l,value:s}=a,c=ht(i),u=s;let m="value"===i?u:x(u);if(r.attrName=c,r.attrValue=m,r.keepAttr=!0,r.forceKeepAttr=void 0,xt(he.uponSanitizeAttribute,e,r),m=r.attrValue,!$e||"id"!==c&&"name"!==c||0===v(m,Xe)||(St(i,e),m=Xe+m),ze&&M(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,m)){St(i,e);continue}if("attributename"===c&&R(m,"href")){St(i,e);continue}if(r.forceKeepAttr)continue;if(!r.keepAttr){St(i,e);continue}if(!Pe&&M(/\/>/i,m)){St(i,e);continue}Ue&&T([ge,Te,ye],e=>{m=O(m,e," ")});const p=ht(e.nodeName);if(It(p,c,m)){if(oe&&"object"==typeof U&&"function"==typeof U.getAttributeType)if(l);else switch(U.getAttributeType(p,c)){case"TrustedHTML":m=oe.createHTML(m);break;case"TrustedScriptURL":m=oe.createScriptURL(m)}if(m!==u)try{l?e.setAttributeNS(l,i,m):e.setAttribute(i,m),Ot(e)?Et(e):_(n.removed)}catch(t){St(i,e)}}else St(i,e)}xt(he.afterSanitizeAttributes,e,null)},Lt=function(e){let t=null;const n=Rt(e);for(xt(he.beforeSanitizeShadowDOM,e,null);t=n.nextNode();)xt(he.uponSanitizeShadowNode,t,null),Dt(t),Ct(t),t.content instanceof i&&Lt(t.content);xt(he.afterSanitizeShadowDOM,e,null)};return n.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=null,a=null,l=null,s=null;if(lt=!e,lt&&(e="\x3c!--\x3e"),"string"!=typeof e&&!vt(e)&&"string"!=typeof(e=function(e){switch(typeof e){case"string":return e;case"number":return D(e);case"boolean":return I(e);case"bigint":return k?k(e):"0";case"symbol":return w?w(e):"Symbol()";case"undefined":default:return L(e);case"function":case"object":{if(null===e)return L(e);const t=e,n=B(t,"toString");if("function"==typeof n){const e=n(t);return"string"==typeof e?e:L(e)}return L(e)}}}(e)))throw P("dirty is not a string, aborting");if(!n.isSupported)return e;if(He||_t(t),n.removed=[],"string"==typeof e&&(Ke=!1),Ke){const t=e.nodeName;if("string"==typeof t){const e=ht(t);if(!Re[e]||Ie[e])throw P("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof c)r=Nt("\x3c!----\x3e"),a=r.ownerDocument.importNode(e,!0),1===a.nodeType&&"BODY"===a.nodeName||"HTML"===a.nodeName?r=a:r.appendChild(a);else{if(!Be&&!Ue&&!Fe&&-1===e.indexOf("<"))return oe&&Ge?oe.createHTML(e):e;if(r=Nt(e),!r)return Be?null:Ge?ie:""}r&&je&&Et(r.firstChild);const u=Rt(Ke?e:r);for(;l=u.nextNode();)Dt(l),Ct(l),l.content instanceof i&&Lt(l.content);if(Ke)return e;if(Be){if(Ue){r.normalize();let e=r.innerHTML;T([ge,Te,ye],t=>{e=O(e,t," ")}),r.innerHTML=e}if(We)for(s=pe.call(r.ownerDocument);r.firstChild;)s.appendChild(r.firstChild);else s=r;return(ve.shadowroot||ve.shadowrootmode)&&(s=de.call(o,s,!0)),s}let m=Fe?r.outerHTML:r.innerHTML;return Fe&&Re["!doctype"]&&r.ownerDocument&&r.ownerDocument.doctype&&r.ownerDocument.doctype.name&&M(se,r.ownerDocument.doctype.name)&&(m="<!DOCTYPE "+r.ownerDocument.doctype.name+">\n"+m),Ue&&T([ge,Te,ye],e=>{m=O(m,e," ")}),oe&&Ge?oe.createHTML(m):m},n.setConfig=function(){_t(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),He=!0},n.clearConfig=function(){gt=null,He=!1},n.isValidAttribute=function(e,t,n){gt||_t({});const r=ht(e),o=ht(t);return It(r,o,n)},n.addHook=function(e,t){"function"==typeof t&&b(he[e],t)},n.removeHook=function(e,t){if(void 0!==t){const n=y(he[e],t);return-1===n?void 0:A(he[e],n,1)[0]}return _(he[e])},n.removeHooks=function(e){he[e]=[]},n.removeAllHooks=function(){he={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},n}();function fe({icon:e,label:t,value:n,bottomLabel:r,summaryText:o,link:i,className:l="",...s}){const c="mg-stats-card-item",u=["mg-card",c,i&&`${c}--linked`,l].filter(Boolean).join(" "),m=i?(0,a.jsx)("a",{href:i,className:`${c}__value`,children:n}):(0,a.jsx)("data",{className:`${c}__value`,value:n,children:n});return(0,a.jsxs)("article",{className:u,...s,children:[e&&(0,a.jsx)("span",{className:`${c}__icon`,"aria-hidden":"true",children:(0,a.jsx)("span",{className:e})}),t&&(0,a.jsx)("span",{className:`${c}__label`,children:t}),m,r&&(0,a.jsx)("strong",{className:`${c}__bottom-label`,children:r}),o&&(0,a.jsx)("p",{className:`${c}__summary`,dangerouslySetInnerHTML:{__html:pe.sanitize(o)}})]})}fe.propTypes={icon:o().string,label:o().string,value:o().oneOfType([o().string,o().number]).isRequired,bottomLabel:o().string,summaryText:o().string,link:o().string,className:o().string};const de=[];function he({title:e,stats:t=de,variant:n="default",className:r="",...o}){const l="mg-stats-card",s=t.length,c=s>0?`mg-grid mg-grid__col-${s}`:"mg-grid",u=[l,n&&`${l}--${n}`,r].filter(Boolean).join(" ");return(0,a.jsxs)("section",{className:u,"aria-label":e||"Statistics",...o,children:[e&&(0,a.jsx)(i,{type:"2",children:e}),(0,a.jsx)("div",{className:c,children:t.map((e,t)=>(0,a.jsx)(fe,{icon:e.icon,label:e.label,value:e.value,bottomLabel:e.bottomLabel,summaryText:e.summaryText,link:e.link},t))})]})}he.propTypes={title:o().string,stats:o().arrayOf(o().shape({icon:o().string,label:o().string,value:o().oneOfType([o().string,o().number]).isRequired,bottomLabel:o().string,summaryText:o().string,link:o().string})),variant:o().oneOf(["default","compact","highlighted","negative"]),className:o().string};const ge=he;function Te(e){const{dataset:t}=e,n={title:t.title||void 0,variant:t.variant||"default",className:t.className||""};try{n.stats=t.stats?JSON.parse(t.stats):[]}catch{n.stats=[]}return n}export{he as StatsCard,ge as default,Te as fromElement};
6
+ import"react";var e={2694(e,t,n){var r=n(6925);function o(){}function a(){}a.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,a,i){if(i!==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: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"},9698(e,t){var n=Symbol.for("react.transitional.element");function r(e,t,r){var o=null;if(void 0!==r&&(o=""+r),void 0!==t.key&&(o=""+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:o,ref:void 0!==t?t:null,props:r}}Symbol.for("react.fragment"),t.jsx=r,t.jsxs=r},4848(e,t,n){e.exports=n(9698)}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var a=t[r]={exports:{}};return e[r](a,a.exports,n),a.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},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(5556),o=n.n(r),a=n(4848);const i=({type:e=2,children:t,className:n,tabIndex:r,...o})=>{const i=`h${Math.min(Math.max(parseInt(e,10)||2,1),6)}`;return(0,a.jsx)(i,{className:n,tabIndex:r,...o,children:t})};function l(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,a,i,l=[],s=!0,c=!1;try{if(a=(n=n.call(e)).next,0===t);else for(;!(s=(r=a.call(n)).done)&&(l.push(r.value),l.length!==t);s=!0);}catch(e){c=!0,o=e}finally{try{if(!s&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(c)throw o}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return l(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)?l(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.")}()}const c=Object.entries,u=Object.setPrototypeOf,f=Object.isFrozen,m=Object.getPrototypeOf,p=Object.getOwnPropertyDescriptor;let d=Object.freeze,h=Object.seal,g=Object.create,y="undefined"!=typeof Reflect&&Reflect,b=y.apply,T=y.construct;d||(d=function(e){return e}),h||(h=function(e){return e}),b||(b=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)}),T||(T=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 S=H(Array.prototype.forEach),N=H(Array.prototype.lastIndexOf),E=H(Array.prototype.pop),_=H(Array.prototype.push),A=H(Array.prototype.splice),v=Array.isArray,O=H(String.prototype.toLowerCase),w=H(String.prototype.toString),x=H(String.prototype.match),k=H(String.prototype.replace),R=H(String.prototype.indexOf),I=H(String.prototype.trim),D=H(Number.prototype.toString),C=H(Boolean.prototype.toString),L="undefined"==typeof BigInt?null:H(BigInt.prototype.toString),M="undefined"==typeof Symbol?null:H(Symbol.prototype.toString),P=H(Object.prototype.hasOwnProperty),z=H(Object.prototype.toString),U=H(RegExp.prototype.test),j=(F=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return T(F,t)});var F;function H(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 b(e,t,r)}}function B(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:O;if(u&&u(e,null),!v(t))return e;let r=t.length;for(;r--;){let o=t[r];if("string"==typeof o){const e=n(o);e!==o&&(f(t)||(t[r]=e),o=e)}e[o]=!0}return e}function W(e){for(let t=0;t<e.length;t++)P(e,t)||(e[t]=null);return e}function G(e){const t=g(null);for(const r of c(e)){var n=s(r,2);const o=n[0],a=n[1];P(e,o)&&(v(a)?t[o]=W(a):a&&"object"==typeof a&&a.constructor===Object?t[o]=G(a):t[o]=a)}return t}function Y(e,t){for(;null!==e;){const n=p(e,t);if(n){if(n.get)return H(n.get);if("function"==typeof n.value)return H(n.value)}e=m(e)}return function(){return null}}const $=d(["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=d(["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"]),X=d(["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"]),K=d(["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"]),V=d(["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"]),Z=d(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),J=d(["#text"]),Q=d(["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"]),ee=d(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),te=d(["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"]),ne=d(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),re=h(/{{[\w\W]*|^[\w\W]*}}/g),oe=h(/<%[\w\W]*|^[\w\W]*%>/g),ae=h(/\${[\w\W]*/g),ie=h(/^data-[\-\w.\u00B7-\uFFFF]+$/),le=h(/^aria-[\-\w]+$/),se=h(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),ce=h(/^(?:\w+script|data):/i),ue=h(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),fe=h(/^html$/i),me=h(/^[a-z][.\w]*(-[.\w]+)+$/i),pe=h(/<[/\w!]/g),de=h(/<[/\w]/g),he=h(/<\/no(script|embed|frames)/i),ge=h(/\/>/i),ye=function(){return"undefined"==typeof window?null:window},be=function(e,t,n,r){return P(e,t)&&v(e[t])?B(r.base?G(r.base):{},e[t],r.transform):n};var Te=function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ye();const n=t=>e(t);if(n.version="3.4.11",n.removed=[],!t||!t.document||9!==t.document.nodeType||!t.Element)return n.isSupported=!1,n;let r=t.document;const o=r,a=o.currentScript;t.DocumentFragment;const i=t.HTMLTemplateElement,l=t.Node,s=t.Element,u=t.NodeFilter;void 0===t.NamedNodeMap&&(t.NamedNodeMap||t.MozNamedAttrMap),t.HTMLFormElement;const f=t.DOMParser,m=t.trustedTypes,p=s.prototype,y=Y(p,"cloneNode"),b=Y(p,"remove"),T=Y(p,"nextSibling"),F=Y(p,"childNodes"),H=Y(p,"parentNode"),W=Y(p,"shadowRoot"),Te=Y(p,"attributes"),Se=l&&l.prototype?Y(l.prototype,"nodeType"):null,Ne=l&&l.prototype?Y(l.prototype,"nodeName"):null;if("function"==typeof i){const e=r.createElement("template");e.content&&e.content.ownerDocument&&(r=e.content.ownerDocument)}let Ee,_e,Ae="",ve=!1,Oe=0;const we=function(){if(Oe>0)throw j('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.')},xe=function(e){we(),Oe++;try{return Ee.createHTML(e)}finally{Oe--}},ke=r,Re=ke.implementation,Ie=ke.createNodeIterator,De=ke.createDocumentFragment,Ce=ke.getElementsByTagName,Le=o.importNode;let Me={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};n.isSupported="function"==typeof c&&"function"==typeof H&&Re&&void 0!==Re.createHTMLDocument;const Pe=re,ze=oe,Ue=ae,je=ie,Fe=le,He=ce,Be=ue,We=me;let Ge=se,Ye=null;const $e=B({},[...$,...q,...X,...V,...J]);let qe=null;const Xe=B({},[...Q,...ee,...te,...ne]);let Ke=Object.seal(g(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}})),Ve=null,Ze=null;const Je=Object.seal(g(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Qe=!0,et=!0,tt=!1,nt=!0,rt=!1,ot=!0,at=!1,it=!1,lt=null,st=null,ct=!1,ut=!1,ft=!1,mt=!1,pt=!0,dt=!1;const ht="user-content-";let gt=!0,yt=!1,bt={},Tt=null;const St=B({},["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 Nt=null;const Et=B({},["audio","video","img","source","image","track"]);let _t=null;const At=B({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),vt="http://www.w3.org/1998/Math/MathML",Ot="http://www.w3.org/2000/svg",wt="http://www.w3.org/1999/xhtml";let xt=wt,kt=!1,Rt=null;const It=B({},[vt,Ot,wt],w),Dt=d(["mi","mo","mn","ms","mtext"]);let Ct=B({},Dt);const Lt=d(["annotation-xml"]);let Mt=B({},Lt);const Pt=B({},["title","style","font","a","script"]);let zt=null;const Ut=["application/xhtml+xml","text/html"];let jt=null,Ft=null;const Ht=r.createElement("form"),Bt=function(e){return e instanceof RegExp||e instanceof Function},Wt=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(Ft&&Ft===e)return;e&&"object"==typeof e||(e={}),e=G(e),zt=-1===Ut.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,jt="application/xhtml+xml"===zt?w:O,Ye=be(e,"ALLOWED_TAGS",$e,{transform:jt}),qe=be(e,"ALLOWED_ATTR",Xe,{transform:jt}),Rt=be(e,"ALLOWED_NAMESPACES",It,{transform:w}),_t=be(e,"ADD_URI_SAFE_ATTR",At,{transform:jt,base:At}),Nt=be(e,"ADD_DATA_URI_TAGS",Et,{transform:jt,base:Et}),Tt=be(e,"FORBID_CONTENTS",St,{transform:jt}),Ve=be(e,"FORBID_TAGS",G({}),{transform:jt}),Ze=be(e,"FORBID_ATTR",G({}),{transform:jt}),bt=!!P(e,"USE_PROFILES")&&(e.USE_PROFILES&&"object"==typeof e.USE_PROFILES?G(e.USE_PROFILES):e.USE_PROFILES),Qe=!1!==e.ALLOW_ARIA_ATTR,et=!1!==e.ALLOW_DATA_ATTR,tt=e.ALLOW_UNKNOWN_PROTOCOLS||!1,nt=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,rt=e.SAFE_FOR_TEMPLATES||!1,ot=!1!==e.SAFE_FOR_XML,at=e.WHOLE_DOCUMENT||!1,ut=e.RETURN_DOM||!1,ft=e.RETURN_DOM_FRAGMENT||!1,mt=e.RETURN_TRUSTED_TYPE||!1,ct=e.FORCE_BODY||!1,pt=!1!==e.SANITIZE_DOM,dt=e.SANITIZE_NAMED_PROPS||!1,gt=!1!==e.KEEP_CONTENT,yt=e.IN_PLACE||!1,Ge=function(e){try{return U(e,""),!0}catch(e){return!1}}(e.ALLOWED_URI_REGEXP)?e.ALLOWED_URI_REGEXP:se,xt="string"==typeof e.NAMESPACE?e.NAMESPACE:wt,Ct=P(e,"MATHML_TEXT_INTEGRATION_POINTS")&&e.MATHML_TEXT_INTEGRATION_POINTS&&"object"==typeof e.MATHML_TEXT_INTEGRATION_POINTS?G(e.MATHML_TEXT_INTEGRATION_POINTS):B({},Dt),Mt=P(e,"HTML_INTEGRATION_POINTS")&&e.HTML_INTEGRATION_POINTS&&"object"==typeof e.HTML_INTEGRATION_POINTS?G(e.HTML_INTEGRATION_POINTS):B({},Lt);const t=P(e,"CUSTOM_ELEMENT_HANDLING")&&e.CUSTOM_ELEMENT_HANDLING&&"object"==typeof e.CUSTOM_ELEMENT_HANDLING?G(e.CUSTOM_ELEMENT_HANDLING):g(null);if(Ke=g(null),P(t,"tagNameCheck")&&Bt(t.tagNameCheck)&&(Ke.tagNameCheck=t.tagNameCheck),P(t,"attributeNameCheck")&&Bt(t.attributeNameCheck)&&(Ke.attributeNameCheck=t.attributeNameCheck),P(t,"allowCustomizedBuiltInElements")&&"boolean"==typeof t.allowCustomizedBuiltInElements&&(Ke.allowCustomizedBuiltInElements=t.allowCustomizedBuiltInElements),h(Ke),rt&&(et=!1),ft&&(ut=!0),bt&&(Ye=B({},J),qe=g(null),!0===bt.html&&(B(Ye,$),B(qe,Q)),!0===bt.svg&&(B(Ye,q),B(qe,ee),B(qe,ne)),!0===bt.svgFilters&&(B(Ye,X),B(qe,ee),B(qe,ne)),!0===bt.mathMl&&(B(Ye,V),B(qe,te),B(qe,ne))),Je.tagCheck=null,Je.attributeCheck=null,P(e,"ADD_TAGS")&&("function"==typeof e.ADD_TAGS?Je.tagCheck=e.ADD_TAGS:v(e.ADD_TAGS)&&(Ye===$e&&(Ye=G(Ye)),B(Ye,e.ADD_TAGS,jt))),P(e,"ADD_ATTR")&&("function"==typeof e.ADD_ATTR?Je.attributeCheck=e.ADD_ATTR:v(e.ADD_ATTR)&&(qe===Xe&&(qe=G(qe)),B(qe,e.ADD_ATTR,jt))),P(e,"ADD_URI_SAFE_ATTR")&&v(e.ADD_URI_SAFE_ATTR)&&B(_t,e.ADD_URI_SAFE_ATTR,jt),P(e,"FORBID_CONTENTS")&&v(e.FORBID_CONTENTS)&&(Tt===St&&(Tt=G(Tt)),B(Tt,e.FORBID_CONTENTS,jt)),P(e,"ADD_FORBID_CONTENTS")&&v(e.ADD_FORBID_CONTENTS)&&(Tt===St&&(Tt=G(Tt)),B(Tt,e.ADD_FORBID_CONTENTS,jt)),gt&&(Ye["#text"]=!0),at&&B(Ye,["html","head","body"]),Ye.table&&(B(Ye,["tbody"]),delete Ve.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw j('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw j('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const t=Ee;Ee=e.TRUSTED_TYPES_POLICY;try{Ae=xe("")}catch(e){throw Ee=t,e}}else null===e.TRUSTED_TYPES_POLICY?(Ee=void 0,Ae=""):(void 0===Ee&&(ve||(_e=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,a),ve=!0),Ee=_e),Ee&&"string"==typeof Ae&&(Ae=xe("")));d&&d(e),Ft=e},Gt=B({},[...q,...X,...K]),Yt=B({},[...V,...Z]),$t=function(e){_(n.removed,{element:e});try{H(e).removeChild(e)}catch(t){if(b(e),!H(e))throw j("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},qt=function(e){const t=F(e);if(t){const e=[];S(t,t=>{_(e,t)}),S(e,e=>{try{b(e)}catch(e){}})}const n=Te(e);if(n)for(let t=n.length-1;t>=0;--t){const r=n[t],o=r&&r.name;if("string"==typeof o)try{e.removeAttribute(o)}catch(e){}}},Xt=function(e,t){try{_(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){_(n.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e)if(ut||ft)try{$t(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},Kt=function(e){const t=Te(e);if(t)for(let n=t.length-1;n>=0;--n){const r=t[n],o=r&&r.name;if("string"==typeof o&&!qe[jt(o)])try{e.removeAttribute(o)}catch(e){}}},Vt=function(e){let t=null,n=null;if(ct)e="<remove></remove>"+e;else{const t=x(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===zt&&xt===wt&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const o=Ee?xe(e):e;if(xt===wt)try{t=(new f).parseFromString(o,zt)}catch(e){}if(!t||!t.documentElement){t=Re.createDocument(xt,"template",null);try{t.documentElement.innerHTML=kt?Ae:o}catch(e){}}const a=t.body||t.documentElement;return e&&n&&a.insertBefore(r.createTextNode(n),a.childNodes[0]||null),xt===wt?Ce.call(t,at?"html":"body")[0]:at?t.documentElement:a},Zt=function(e){return Ie.call(e.ownerDocument||e,e,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT|u.SHOW_PROCESSING_INSTRUCTION|u.SHOW_CDATA_SECTION,null)},Jt=function(e){return e=k(e,Pe," "),e=k(e,ze," "),k(e,Ue," ")},Qt=function(e){var t;e.normalize();const n=Ie.call(e.ownerDocument||e,e,u.SHOW_TEXT|u.SHOW_COMMENT|u.SHOW_CDATA_SECTION|u.SHOW_PROCESSING_INSTRUCTION,null);let r=n.nextNode();for(;r;)r.data=Jt(r.data),r=n.nextNode();const o=null===(t=e.querySelectorAll)||void 0===t?void 0:t.call(e,"template");o&&S(o,e=>{tn(e.content)&&Qt(e.content)})},en=function(e){const t=Ne?Ne(e):null;return"string"==typeof t&&"form"===jt(t)&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||e.attributes!==Te(e)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes||e.nodeType!==Se(e)||e.childNodes!==F(e))},tn=function(e){if(!Se||"object"!=typeof e||null===e)return!1;try{return 11===Se(e)}catch(e){return!1}},nn=function(e){if(!Se||"object"!=typeof e||null===e)return!1;try{return"number"==typeof Se(e)}catch(e){return!1}};function rn(e,t,r){0!==e.length&&S(e,e=>{e.call(n,t,r,Ft)})}const on=function(e){if(rn(Me.beforeSanitizeElements,e,null),en(e))return $t(e),!0;const t=jt(Ne?Ne(e):e.nodeName);if(rn(Me.uponSanitizeElement,e,{tagName:t,allowedTags:Ye}),function(e,t){return!!(ot&&e.hasChildNodes()&&!nn(e.firstElementChild)&&U(pe,e.textContent)&&U(pe,e.innerHTML))||!(!ot||e.namespaceURI!==wt||"style"!==t||!nn(e.firstElementChild))||7===e.nodeType||!(!ot||8!==e.nodeType||!U(de,e.data))}(e,t))return $t(e),!0;if(Ve[t]||!(Je.tagCheck instanceof Function&&Je.tagCheck(t))&&!Ye[t])return function(e,t){if(!Ve[t]&&sn(t)){if(Ke.tagNameCheck instanceof RegExp&&U(Ke.tagNameCheck,t))return!1;if(Ke.tagNameCheck instanceof Function&&Ke.tagNameCheck(t))return!1}if(gt&&!Tt[t]){const t=H(e),n=F(e);if(n&&t)for(let r=n.length-1;r>=0;--r){const o=yt?n[r]:y(n[r],!0);t.insertBefore(o,T(e))}}return $t(e),!0}(e,t);if(1===(Se?Se(e):e.nodeType)&&!function(e){let t=H(e);t&&t.tagName||(t={namespaceURI:xt,tagName:"template"});const n=O(e.tagName),r=O(t.tagName);return!!Rt[e.namespaceURI]&&(e.namespaceURI===Ot?function(e,t,n){return t.namespaceURI===wt?"svg"===e:t.namespaceURI===vt?"svg"===e&&("annotation-xml"===n||Ct[n]):Boolean(Gt[e])}(n,t,r):e.namespaceURI===vt?function(e,t,n){return t.namespaceURI===wt?"math"===e:t.namespaceURI===Ot?"math"===e&&Mt[n]:Boolean(Yt[e])}(n,t,r):e.namespaceURI===wt?function(e,t,n){return!(t.namespaceURI===Ot&&!Mt[n])&&!(t.namespaceURI===vt&&!Ct[n])&&!Yt[e]&&(Pt[e]||!Gt[e])}(n,t,r):!("application/xhtml+xml"!==zt||!Rt[e.namespaceURI]))}(e))return $t(e),!0;if(("noscript"===t||"noembed"===t||"noframes"===t)&&U(he,e.innerHTML))return $t(e),!0;if(rt&&3===e.nodeType){const t=Jt(e.textContent);e.textContent!==t&&(_(n.removed,{element:e.cloneNode()}),e.textContent=t)}return rn(Me.afterSanitizeElements,e,null),!1},an=function(e,t,n){if(Ze[t])return!1;if(pt&&("id"===t||"name"===t)&&(n in r||n in Ht))return!1;const o=qe[t]||Je.attributeCheck instanceof Function&&Je.attributeCheck(t,e);if(et&&U(je,t));else if(Qe&&U(Fe,t));else if(o){if(_t[t]);else if(U(Ge,k(n,Be,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==R(n,"data:")||!Nt[e])if(tt&&!U(He,k(n,Be,"")));else if(n)return!1}else if(!(sn(e)&&(Ke.tagNameCheck instanceof RegExp&&U(Ke.tagNameCheck,e)||Ke.tagNameCheck instanceof Function&&Ke.tagNameCheck(e))&&(Ke.attributeNameCheck instanceof RegExp&&U(Ke.attributeNameCheck,t)||Ke.attributeNameCheck instanceof Function&&Ke.attributeNameCheck(t,e))||"is"===t&&Ke.allowCustomizedBuiltInElements&&(Ke.tagNameCheck instanceof RegExp&&U(Ke.tagNameCheck,n)||Ke.tagNameCheck instanceof Function&&Ke.tagNameCheck(n))))return!1;return!0},ln=B({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),sn=function(e){return!ln[O(e)]&&U(We,e)},cn=function(e,t,n,r){if(Ee&&"object"==typeof m&&"function"==typeof m.getAttributeType&&!n)switch(m.getAttributeType(e,t)){case"TrustedHTML":return xe(r);case"TrustedScriptURL":return function(e){we(),Oe++;try{return Ee.createScriptURL(e)}finally{Oe--}}(r)}return r},un=function(e,t,r,o){try{r?e.setAttributeNS(r,t,o):e.setAttribute(t,o),en(e)?$t(e):E(n.removed)}catch(n){Xt(t,e)}},fn=function(e){rn(Me.beforeSanitizeAttributes,e,null);const t=e.attributes;if(!t||en(e))return;const n={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:qe,forceKeepAttr:void 0};let r=t.length;const o=jt(e.nodeName);for(;r--;){const a=t[r],i=a.name,l=a.namespaceURI,s=a.value,c=jt(i),u=s;let f="value"===i?u:I(u);n.attrName=c,n.attrValue=f,n.keepAttr=!0,n.forceKeepAttr=void 0,rn(Me.uponSanitizeAttribute,e,n),f=n.attrValue,!dt||"id"!==c&&"name"!==c||0===R(f,ht)||(Xt(i,e),f=ht+f),ot&&U(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,f)||"attributename"===c&&x(f,"href")?Xt(i,e):n.forceKeepAttr||(!n.keepAttr||!nt&&U(ge,f)?Xt(i,e):(rt&&(f=Jt(f)),an(o,c,f)?(f=cn(o,c,l,f),f!==u&&un(e,i,l,f)):Xt(i,e)))}rn(Me.afterSanitizeAttributes,e,null)},mn=function(e){let t=null;const n=Zt(e);for(rn(Me.beforeSanitizeShadowDOM,e,null);t=n.nextNode();)if(rn(Me.uponSanitizeShadowNode,t,null),on(t),fn(t),tn(t.content)&&mn(t.content),1===(Se?Se(t):t.nodeType)){const e=W(t);tn(e)&&(pn(e),mn(e))}rn(Me.afterSanitizeShadowDOM,e,null)},pn=function(e){const t=[{node:e,shadow:null}];for(;t.length>0;){const e=t.pop();if(e.shadow){mn(e.shadow);continue}const n=e.node,r=1===(Se?Se(n):n.nodeType),o=F(n);if(o)for(let e=o.length-1;e>=0;--e)t.push({node:o[e],shadow:null});if(r){const e=Ne?Ne(n):null;if("string"==typeof e&&"template"===jt(e)){const e=n.content;tn(e)&&t.push({node:e,shadow:null})}}if(r){const e=W(n);tn(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,a=null,i=null,l=null;if(kt=!e,kt&&(e="\x3c!--\x3e"),"string"!=typeof e&&!nn(e)&&"string"!=typeof(e=function(e){switch(typeof e){case"string":return e;case"number":return D(e);case"boolean":return C(e);case"bigint":return L?L(e):"0";case"symbol":return M?M(e):"Symbol()";case"undefined":default:return z(e);case"function":case"object":{if(null===e)return z(e);const t=e,n=Y(t,"toString");if("function"==typeof n){const e=n(t);return"string"==typeof e?e:z(e)}return z(e)}}}(e)))throw j("dirty is not a string, aborting");if(!n.isSupported)return e;it?(Ye=lt,qe=st):Wt(t),(Me.uponSanitizeElement.length>0||Me.uponSanitizeAttribute.length>0)&&(Ye=G(Ye)),Me.uponSanitizeAttribute.length>0&&(qe=G(qe)),n.removed=[];const s=yt&&"string"!=typeof e&&nn(e);if(s){const t=Ne?Ne(e):e.nodeName;if("string"==typeof t){const e=jt(t);if(!Ye[e]||Ve[e])throw j("root node is forbidden and cannot be sanitized in-place")}if(en(e))throw j("root node is clobbered and cannot be sanitized in-place");try{pn(e)}catch(t){throw qt(e),t}}else if(nn(e))r=Vt("\x3c!----\x3e"),a=r.ownerDocument.importNode(e,!0),1===a.nodeType&&"BODY"===a.nodeName||"HTML"===a.nodeName?r=a:r.appendChild(a),pn(a);else{if(!ut&&!rt&&!at&&-1===e.indexOf("<"))return Ee&&mt?xe(e):e;if(r=Vt(e),!r)return ut?null:mt?Ae:""}r&&ct&&$t(r.firstChild);const c=Zt(s?e:r);try{for(;i=c.nextNode();)on(i),fn(i),tn(i.content)&&mn(i.content)}catch(t){throw s&&qt(e),t}if(s)return S(n.removed,e=>{e.element&&function(e){const t=[e];for(;t.length>0;){const e=t.pop();1===(Se?Se(e):e.nodeType)&&Kt(e);const n=F(e);if(n)for(let e=n.length-1;e>=0;--e)t.push(n[e])}}(e.element)}),rt&&Qt(e),e;if(ut){if(rt&&Qt(r),ft)for(l=De.call(r.ownerDocument);r.firstChild;)l.appendChild(r.firstChild);else l=r;return(qe.shadowroot||qe.shadowrootmode)&&(l=Le.call(o,l,!0)),l}let u=at?r.outerHTML:r.innerHTML;return at&&Ye["!doctype"]&&r.ownerDocument&&r.ownerDocument.doctype&&r.ownerDocument.doctype.name&&U(fe,r.ownerDocument.doctype.name)&&(u="<!DOCTYPE "+r.ownerDocument.doctype.name+">\n"+u),rt&&(u=Jt(u)),Ee&&mt?xe(u):u},n.setConfig=function(){Wt(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),it=!0,lt=Ye,st=qe},n.clearConfig=function(){Ft=null,it=!1,lt=null,st=null,Ee=_e,Ae=""},n.isValidAttribute=function(e,t,n){Ft||Wt({});const r=jt(e),o=jt(t);return an(r,o,n)},n.addHook=function(e,t){"function"==typeof t&&P(Me,e)&&_(Me[e],t)},n.removeHook=function(e,t){if(P(Me,e)){if(void 0!==t){const n=N(Me[e],t);return-1===n?void 0:A(Me[e],n,1)[0]}return E(Me[e])}},n.removeHooks=function(e){P(Me,e)&&(Me[e]=[])},n.removeAllHooks=function(){Me={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},n}();function Se({icon:e,label:t,value:n,bottomLabel:r,summaryText:o,link:i,className:l="",...s}){const c="mg-stats-card-item",u=["mg-card",c,i&&`${c}--linked`,l].filter(Boolean).join(" "),f=i?(0,a.jsx)("a",{href:i,className:`${c}__value`,children:n}):(0,a.jsx)("data",{className:`${c}__value`,value:n,children:n});return(0,a.jsxs)("article",{className:u,...s,children:[e&&(0,a.jsx)("span",{className:`${c}__icon`,"aria-hidden":"true",children:(0,a.jsx)("span",{className:e})}),t&&(0,a.jsx)("span",{className:`${c}__label`,children:t}),f,r&&(0,a.jsx)("strong",{className:`${c}__bottom-label`,children:r}),o&&(0,a.jsx)("p",{className:`${c}__summary`,dangerouslySetInnerHTML:{__html:Te.sanitize(o)}})]})}Se.propTypes={icon:o().string,label:o().string,value:o().oneOfType([o().string,o().number]).isRequired,bottomLabel:o().string,summaryText:o().string,link:o().string,className:o().string};const Ne=[];function Ee({title:e,stats:t=Ne,variant:n="default",className:r="",...o}){const l="mg-stats-card",s=t.length,c=s>0?`mg-grid mg-grid__col-${s}`:"mg-grid",u=[l,n&&`${l}--${n}`,r].filter(Boolean).join(" ");return(0,a.jsxs)("section",{className:u,"aria-label":e||"Statistics",...o,children:[e&&(0,a.jsx)(i,{type:"2",children:e}),(0,a.jsx)("div",{className:c,children:t.map((e,t)=>(0,a.jsx)(Se,{icon:e.icon,label:e.label,value:e.value,bottomLabel:e.bottomLabel,summaryText:e.summaryText,link:e.link},t))})]})}Ee.propTypes={title:o().string,stats:o().arrayOf(o().shape({icon:o().string,label:o().string,value:o().oneOfType([o().string,o().number]).isRequired,bottomLabel:o().string,summaryText:o().string,link:o().string})),variant:o().oneOf(["default","compact","highlighted","negative"]),className:o().string};const _e=Ee;function Ae(e){const{dataset:t}=e,n={title:t.title||void 0,variant:t.variant||"default",className:t.className||""};try{n.stats=t.stats?JSON.parse(t.stats):[]}catch{n.stats=[]}return n}export{Ee as StatsCard,_e as default,Ae as fromElement};
@@ -1,3 +1,5 @@
1
+ /*! @license DOMPurify 3.4.11 | (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.11/LICENSE */
2
+
1
3
  /**
2
4
  * @license React
3
5
  * react-jsx-runtime.production.js