@stlite/desktop 0.43.1 → 0.44.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (74) hide show
  1. package/bin/dump_artifacts.js +1 -1
  2. package/build/asset-manifest.json +40 -38
  3. package/build/index.html +1 -1
  4. package/build/static/js/1122.422f58fc.chunk.js +1 -0
  5. package/build/static/js/{144.2477d27a.chunk.js → 144.046792d9.chunk.js} +1 -1
  6. package/build/static/js/{1729.528431ca.chunk.js → 1729.d59ed152.chunk.js} +1 -1
  7. package/build/static/js/{1740.32a0c10e.chunk.js → 1740.2c71a97a.chunk.js} +1 -1
  8. package/build/static/js/{1839.a1fce0e6.chunk.js → 1839.0d0dcac8.chunk.js} +1 -1
  9. package/build/static/js/2372.844b5190.chunk.js +2 -0
  10. package/build/static/js/2372.844b5190.chunk.js.LICENSE.txt +10 -0
  11. package/build/static/js/2753.c27b6faa.chunk.js +1 -0
  12. package/build/static/js/2873.f5c04f3b.chunk.js +1 -0
  13. package/build/static/js/3208.55e0b2fa.chunk.js +1 -0
  14. package/build/static/js/{4021.16f5498a.chunk.js → 4021.ec2e87b0.chunk.js} +1 -1
  15. package/build/static/js/4482.a9238ad0.chunk.js +1 -0
  16. package/build/static/js/4494.6bb6fb20.chunk.js +1 -0
  17. package/build/static/js/4694.aa16aaee.chunk.js +1 -0
  18. package/build/static/js/4721.2185bda3.chunk.js +1 -0
  19. package/build/static/js/{4724.366489f9.chunk.js → 4724.374578aa.chunk.js} +1 -1
  20. package/build/static/js/4785.76a05d79.chunk.js +1 -0
  21. package/build/static/js/4831.391fe620.chunk.js +1 -0
  22. package/build/static/js/5299.beb80829.chunk.js +1 -0
  23. package/build/static/js/6093.209cd165.chunk.js +1 -0
  24. package/build/static/js/6134.b9e5b2db.chunk.js +1 -0
  25. package/build/static/js/6802.df955c77.chunk.js +1 -0
  26. package/build/static/js/698.116a166b.chunk.js +1 -0
  27. package/build/static/js/7125.afecc159.chunk.js +1 -0
  28. package/build/static/js/7579.ea965a43.chunk.js +1 -0
  29. package/build/static/js/7696.c9589682.chunk.js +1 -0
  30. package/build/static/js/8050.029f3dc8.chunk.js +1 -0
  31. package/build/static/js/8097.4837946f.chunk.js +2 -0
  32. package/build/static/js/8186.2f2e42e5.chunk.js +2 -0
  33. package/build/static/js/8186.2f2e42e5.chunk.js.LICENSE.txt +135 -0
  34. package/build/static/js/8850.6abc7336.chunk.js +1 -0
  35. package/build/static/js/{9166.d35e76c1.chunk.js → 9166.f234f6b4.chunk.js} +2 -2
  36. package/build/static/js/9311.7c7348b0.chunk.js +1 -0
  37. package/build/static/js/{5703.a68ecfdc.chunk.js → 9449.a2c361bb.chunk.js} +2 -2
  38. package/build/static/js/9699.df050cd6.chunk.js +1 -0
  39. package/build/static/js/9813.1821ef79.chunk.js +1 -0
  40. package/build/static/js/main.ca9c9d66.js +28 -0
  41. package/build/static/js/{main.94addb49.js.LICENSE.txt → main.ca9c9d66.js.LICENSE.txt} +0 -20
  42. package/package.json +5 -5
  43. package/build/static/css/7895.c24b25fa.chunk.css +0 -1
  44. package/build/static/js/1619.c039c65c.chunk.js +0 -1
  45. package/build/static/js/1687.a144d952.chunk.js +0 -1
  46. package/build/static/js/2873.cf145dcb.chunk.js +0 -1
  47. package/build/static/js/3185.d317b162.chunk.js +0 -1
  48. package/build/static/js/4232.b0bbe2e6.chunk.js +0 -2
  49. package/build/static/js/4232.b0bbe2e6.chunk.js.LICENSE.txt +0 -52
  50. package/build/static/js/4482.2f210b65.chunk.js +0 -1
  51. package/build/static/js/4494.c6ab91c6.chunk.js +0 -1
  52. package/build/static/js/4694.7e63f0ef.chunk.js +0 -1
  53. package/build/static/js/4785.3ac653c2.chunk.js +0 -1
  54. package/build/static/js/4831.3170175f.chunk.js +0 -1
  55. package/build/static/js/5037.03a99abb.chunk.js +0 -1
  56. package/build/static/js/5299.ad735cb8.chunk.js +0 -1
  57. package/build/static/js/5361.bc476229.chunk.js +0 -2
  58. package/build/static/js/6134.5e3e3f58.chunk.js +0 -1
  59. package/build/static/js/6802.ffb6887c.chunk.js +0 -1
  60. package/build/static/js/698.7dce549b.chunk.js +0 -1
  61. package/build/static/js/7125.21833215.chunk.js +0 -1
  62. package/build/static/js/7579.7b9cc9ee.chunk.js +0 -1
  63. package/build/static/js/7652.f436cbbf.chunk.js +0 -1
  64. package/build/static/js/7696.406d4ef7.chunk.js +0 -1
  65. package/build/static/js/7895.198c568c.chunk.js +0 -1
  66. package/build/static/js/9311.f444417e.chunk.js +0 -1
  67. package/build/static/js/9813.c894655a.chunk.js +0 -1
  68. package/build/static/js/main.94addb49.js +0 -28
  69. /package/build/static/css/{7652.c24b25fa.chunk.css → 8050.c24b25fa.chunk.css} +0 -0
  70. /package/build/static/css/{5703.1edfa457.chunk.css → 9449.1edfa457.chunk.css} +0 -0
  71. /package/build/static/css/{1619.7ce51b75.chunk.css → 9699.7ce51b75.chunk.css} +0 -0
  72. /package/build/static/js/{5361.bc476229.chunk.js.LICENSE.txt → 8097.4837946f.chunk.js.LICENSE.txt} +0 -0
  73. /package/build/static/js/{9166.d35e76c1.chunk.js.LICENSE.txt → 9166.f234f6b4.chunk.js.LICENSE.txt} +0 -0
  74. /package/build/static/js/{5703.a68ecfdc.chunk.js.LICENSE.txt → 9449.a2c361bb.chunk.js.LICENSE.txt} +0 -0
@@ -0,0 +1,2 @@
1
+ /*! For license information please see 2372.844b5190.chunk.js.LICENSE.txt */
2
+ (globalThis.webpackChunk_stlite_desktop=globalThis.webpackChunk_stlite_desktop||[]).push([[2372],{30383:(e,t,n)=>{"use strict";n.d(t,{m:()=>l});var r=n(7896),i=n(5057),o=n(63947),l=i.forwardRef((function(e,t){return i.createElement(o.D,(0,r.Z)({iconAttrs:{fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"},iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:t}),i.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),i.createElement("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"}))}));l.displayName="Add"},23046:(e,t,n)=>{"use strict";n.d(t,{H:()=>l});var r=n(7896),i=n(5057),o=n(63947),l=i.forwardRef((function(e,t){return i.createElement(o.D,(0,r.Z)({iconAttrs:{fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"},iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:t}),i.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),i.createElement("path",{d:"M16 9v10H8V9h8m-1.5-6h-5l-1 1H5v2h14V4h-3.5l-1-1zM18 7H6v12c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7z"}))}));l.displayName="Delete"},61078:(e,t,n)=>{"use strict";n.d(t,{k:()=>l});var r=n(7896),i=n(5057),o=n(63947),l=i.forwardRef((function(e,t){return i.createElement(o.D,(0,r.Z)({iconAttrs:{fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"},iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:t}),i.createElement("rect",{width:24,height:24,fill:"none"}),i.createElement("path",{d:"M18 15v3H6v-3H4v3c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2v-3h-2zm-1-4l-1.41-1.41L13 12.17V4h-2v8.17L8.41 9.59 7 11l5 5 5-5z"}))}));l.displayName="FileDownload"},18932:(e,t,n)=>{"use strict";n.d(t,{i:()=>l});var r=n(7896),i=n(5057),o=n(63947),l=i.forwardRef((function(e,t){return i.createElement(o.D,(0,r.Z)({iconAttrs:{fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"},iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:t}),i.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),i.createElement("path",{d:"M7 14H5v5h5v-2H7v-3zm-2-4h2V7h3V5H5v5zm12 7h-3v2h5v-5h-2v3zM14 5v2h3v3h2V5h-5z"}))}));l.displayName="Fullscreen"},93576:(e,t,n)=>{"use strict";n.d(t,{m:()=>l});var r=n(7896),i=n(5057),o=n(63947),l=i.forwardRef((function(e,t){return i.createElement(o.D,(0,r.Z)({iconAttrs:{fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"},iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:t}),i.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),i.createElement("path",{d:"M5 16h3v3h2v-5H5v2zm3-8H5v2h5V5H8v3zm6 11h2v-3h3v-2h-5v5zm2-11V5h-2v5h5V8h-3z"}))}));l.displayName="FullscreenExit"},83221:(e,t,n)=>{"use strict";n.d(t,{o:()=>l});var r=n(7896),i=n(5057),o=n(63947),l=i.forwardRef((function(e,t){return i.createElement(o.D,(0,r.Z)({iconAttrs:{fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"},iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:t}),i.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),i.createElement("path",{d:"M15.5 14h-.79l-.28-.27A6.471 6.471 0 0016 9.5 6.5 6.5 0 109.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"}))}));l.displayName="Search"},34690:e=>{e.exports=function(e,t,n,r){for(var i=-1,o=null==e?0:e.length;++i<o;){var l=e[i];t(r,l,n(l),e)}return r}},74023:(e,t,n)=>{var r=n(50377);e.exports=function(e,t,n,i){return r(e,(function(e,r,o){t(i,e,n(e),o)})),i}},14061:e=>{e.exports=function(e,t,n){return e===e&&(void 0!==n&&(e=e<=n?e:n),void 0!==t&&(e=e>=t?e:t)),e}},44949:e=>{var t=Object.prototype.hasOwnProperty;e.exports=function(e,n){return null!=e&&t.call(e,n)}},43676:(e,t,n)=>{var r=n(98323),i=n(97247),o=n(89479),l=n(51565),a=n(87382),s=n(18766);e.exports=function(e,t,n){var c=-1,u=i,d=e.length,h=!0,f=[],p=f;if(n)h=!1,u=o;else if(d>=200){var g=t?null:a(e);if(g)return s(g);h=!1,u=l,p=new r}else p=t?[]:f;e:for(;++c<d;){var m=e[c],v=t?t(m):m;if(m=n||0!==m?m:0,h&&v===v){for(var b=p.length;b--;)if(p[b]===v)continue e;t&&p.push(v),f.push(m)}else u(p,v,n)||(p!==f&&p.push(v),f.push(m))}return f}},60022:(e,t,n)=>{var r=n(34690),i=n(74023),o=n(31104),l=n(44028);e.exports=function(e,t){return function(n,a){var s=l(n)?r:i,c=t?t():{};return s(n,e,o(a,2),c)}}},87382:(e,t,n)=>{var r=n(33242),i=n(92706),o=n(18766),l=r&&1/o(new r([,-0]))[1]==1/0?function(e){return new r(e)}:i;e.exports=l},88341:(e,t,n)=>{var r=n(14061),i=n(81692);e.exports=function(e,t,n){return void 0===n&&(n=t,t=void 0),void 0!==n&&(n=(n=i(n))===n?n:0),void 0!==t&&(t=(t=i(t))===t?t:0),r(i(e),t,n)}},67047:(e,t,n)=>{var r=n(26271),i=n(72685),o=n(81692),l=Math.max,a=Math.min;e.exports=function(e,t,n){var s,c,u,d,h,f,p=0,g=!1,m=!1,v=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function b(t){var n=s,r=c;return s=c=void 0,p=t,d=e.apply(r,n)}function y(e){var n=e-f;return void 0===f||n>=t||n<0||m&&e-p>=u}function w(){var e=i();if(y(e))return x(e);h=setTimeout(w,function(e){var n=t-(e-f);return m?a(n,u-(e-p)):n}(e))}function x(e){return h=void 0,v&&s?b(e):(s=c=void 0,d)}function k(){var e=i(),n=y(e);if(s=arguments,c=this,f=e,n){if(void 0===h)return function(e){return p=e,h=setTimeout(w,t),g?b(e):d}(f);if(m)return clearTimeout(h),h=setTimeout(w,t),b(f)}return void 0===h&&(h=setTimeout(w,t)),d}return t=o(t)||0,r(n)&&(g=!!n.leading,u=(m="maxWait"in n)?l(o(n.maxWait)||0,t):u,v="trailing"in n?!!n.trailing:v),k.cancel=function(){void 0!==h&&clearTimeout(h),p=0,s=f=c=h=void 0},k.flush=function(){return void 0===h?d:x(i())},k}},88417:(e,t,n)=>{var r=n(23447),i=n(60022),o=Object.prototype.hasOwnProperty,l=i((function(e,t,n){o.call(e,n)?e[n].push(t):r(e,n,[t])}));e.exports=l},79530:(e,t,n)=>{var r=n(44949),i=n(55462);e.exports=function(e,t){return null!=e&&i(e,t,r)}},72685:(e,t,n)=>{var r=n(56164);e.exports=function(){return r.Date.now()}},8406:(e,t,n)=>{var r=n(67047),i=n(26271);e.exports=function(e,t,n){var o=!0,l=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return i(n)&&(o="leading"in n?!!n.leading:o,l="trailing"in n?!!n.trailing:l),r(e,t,{leading:o,maxWait:t,trailing:l})}},87384:(e,t,n)=>{var r=n(43676);e.exports=function(e){return e&&e.length?r(e):[]}},56719:function(e,t,n){var r,i,o,l,a;l=this,a=function(e){var t=!1,n=!1,r=!1,i=!1,o="escape years months weeks days hours minutes seconds milliseconds general".split(" "),l=[{type:"seconds",targets:[{type:"minutes",value:60},{type:"hours",value:3600},{type:"days",value:86400},{type:"weeks",value:604800},{type:"months",value:2678400},{type:"years",value:31536e3}]},{type:"minutes",targets:[{type:"hours",value:60},{type:"days",value:1440},{type:"weeks",value:10080},{type:"months",value:44640},{type:"years",value:525600}]},{type:"hours",targets:[{type:"days",value:24},{type:"weeks",value:168},{type:"months",value:744},{type:"years",value:8760}]},{type:"days",targets:[{type:"weeks",value:7},{type:"months",value:31},{type:"years",value:365}]},{type:"months",targets:[{type:"years",value:12}]}];function a(e,t){return!(t.length>e.length)&&-1!==e.indexOf(t)}function s(e){for(var t="";e;)t+="0",e-=1;return t}function c(e,t){var n=e+"+"+v(C(t).sort(),(function(e){return e+":"+t[e]})).join(",");return c.cache[n]||(c.cache[n]=Intl.NumberFormat(e,t)),c.cache[n]}function u(e,t,o){var l,a,d,h=t.useToLocaleString,f=t.useGrouping,p=f&&t.grouping.slice(),g=t.maximumSignificantDigits,m=t.minimumIntegerDigits||1,v=t.fractionDigits||0,b=t.groupingSeparator,y=t.decimalSeparator;if(h&&o){var w,x={minimumIntegerDigits:m,useGrouping:f};return v&&(x.maximumFractionDigits=v,x.minimumFractionDigits=v),g&&e>0&&(x.maximumSignificantDigits=g),r?(i||((w=S({},t)).useGrouping=!1,w.decimalSeparator=".",e=parseFloat(u(e,w),10)),c(o,x).format(e)):(n||((w=S({},t)).useGrouping=!1,w.decimalSeparator=".",e=parseFloat(u(e,w),10)),e.toLocaleString(o,x))}var k=(g?e.toPrecision(g+1):e.toFixed(v+1)).split("e");d=k[1]||"",a=(k=k[0].split("."))[1]||"";var C=(l=k[0]||"").length,M=a.length,E=C+M,R=l+a;(g&&E===g+1||!g&&M===v+1)&&((R=function(e){for(var t=e.split("").reverse(),n=0,r=!0;r&&n<t.length;)n?"9"===t[n]?t[n]="0":(t[n]=(parseInt(t[n],10)+1).toString(),r=!1):(parseInt(t[n],10)<5&&(r=!1),t[n]="0"),n+=1;return r&&t.push("1"),t.reverse().join("")}(R)).length===E+1&&(C+=1),M&&(R=R.slice(0,-1)),l=R.slice(0,C),a=R.slice(C)),g&&(a=a.replace(/0*$/,""));var O=parseInt(d,10);O>0?a.length<=O?(l+=a+=s(O-a.length),a=""):(l+=a.slice(0,O),a=a.slice(O)):O<0&&(a=s(Math.abs(O)-l.length)+l+a,l="0"),g||((a=a.slice(0,v)).length<v&&(a+=s(v-a.length)),l.length<m&&(l=s(m-l.length)+l));var I,T="";if(f)for(k=l;k.length;)p.length&&(I=p.shift()),T&&(T=b+T),T=k.slice(-I)+T,k=k.slice(0,-I);else T=l;return a&&(T=T+y+a),T}function d(e,t){return e.label.length>t.label.length?-1:e.label.length<t.label.length?1:0}c.cache={};var h={durationLabelsStandard:{S:"millisecond",SS:"milliseconds",s:"second",ss:"seconds",m:"minute",mm:"minutes",h:"hour",hh:"hours",d:"day",dd:"days",w:"week",ww:"weeks",M:"month",MM:"months",y:"year",yy:"years"},durationLabelsShort:{S:"msec",SS:"msecs",s:"sec",ss:"secs",m:"min",mm:"mins",h:"hr",hh:"hrs",d:"dy",dd:"dys",w:"wk",ww:"wks",M:"mo",MM:"mos",y:"yr",yy:"yrs"},durationTimeTemplates:{HMS:"h:mm:ss",HM:"h:mm",MS:"m:ss"},durationLabelTypes:[{type:"standard",string:"__"},{type:"short",string:"_"}],durationPluralKey:function(e,t,n){return 1===t&&null===n?e:e+e}};function f(e){return"[object Array]"===Object.prototype.toString.call(e)}function p(e){return"[object Object]"===Object.prototype.toString.call(e)}function g(e,t){var n,r=0,i=e&&e.length||0;for("function"!==typeof t&&(n=t,t=function(e){return e===n});r<i;){if(t(e[r]))return e[r];r+=1}}function m(e,t){var n=0,r=e.length;if(e&&r)for(;n<r;){if(!1===t(e[n],n))return;n+=1}}function v(e,t){var n=0,r=e.length,i=[];if(!e||!r)return i;for(;n<r;)i[n]=t(e[n],n),n+=1;return i}function b(e,t){return v(e,(function(e){return e[t]}))}function y(e){var t=[];return m(e,(function(e){e&&t.push(e)})),t}function w(e){var t=[];return m(e,(function(e){g(t,e)||t.push(e)})),t}function x(e,t){var n=[];return m(e,(function(e){m(t,(function(t){e===t&&n.push(e)}))})),w(n)}function k(e,t){var n=[];return m(e,(function(r,i){if(!t(r))return n=e.slice(i),!1})),n}function S(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}function C(e){var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(n);return t}function M(e,t){var n=0,r=e.length;if(!e||!r)return!1;for(;n<r;){if(!0===t(e[n],n))return!0;n+=1}return!1}function E(e){return"3.6"===e(3.55,"en",{useGrouping:!1,minimumIntegerDigits:1,minimumFractionDigits:1,maximumFractionDigits:1})}function R(e){var t=!0;return!!(t=(t=(t=t&&"1"===e(1,"en",{minimumIntegerDigits:1}))&&"01"===e(1,"en",{minimumIntegerDigits:2}))&&"001"===e(1,"en",{minimumIntegerDigits:3}))&&!!(t=(t=(t=(t=t&&"100"===e(99.99,"en",{maximumFractionDigits:0,minimumFractionDigits:0}))&&"100.0"===e(99.99,"en",{maximumFractionDigits:1,minimumFractionDigits:1}))&&"99.99"===e(99.99,"en",{maximumFractionDigits:2,minimumFractionDigits:2}))&&"99.990"===e(99.99,"en",{maximumFractionDigits:3,minimumFractionDigits:3}))&&!!(t=(t=(t=(t=(t=t&&"100"===e(99.99,"en",{maximumSignificantDigits:1}))&&"100"===e(99.99,"en",{maximumSignificantDigits:2}))&&"100"===e(99.99,"en",{maximumSignificantDigits:3}))&&"99.99"===e(99.99,"en",{maximumSignificantDigits:4}))&&"99.99"===e(99.99,"en",{maximumSignificantDigits:5}))&&!!(t=(t=t&&"1,000"===e(1e3,"en",{useGrouping:!0}))&&"1000"===e(1e3,"en",{useGrouping:!1}))}function O(){var e,t=[].slice.call(arguments),n={};if(m(t,(function(t,r){if(!r){if(!f(t))throw"Expected array as the first argument to durationsFormat.";e=t}"string"!==typeof t&&"function"!==typeof t?"number"!==typeof t?p(t)&&S(n,t):n.precision=t:n.template=t})),!e||!e.length)return[];n.returnMomentTypes=!0;var r=v(e,(function(e){return e.format(n)})),i=x(o,w(b(function(e){var t=[];return m(e,(function(e){t=t.concat(e)})),t}(r),"type"))),l=n.largest;return l&&(i=i.slice(0,l)),n.returnMomentTypes=!1,n.outputTypes=i,v(e,(function(e){return e.format(n)}))}function I(){var n=[].slice.call(arguments),i=S({},this.format.defaults),s=this.asMilliseconds(),c=this.asMonths();"function"===typeof this.isValid&&!1===this.isValid()&&(s=0,c=0);var E=s<0,R=e.duration(Math.abs(s),"milliseconds"),O=e.duration(Math.abs(c),"months");m(n,(function(e){"string"!==typeof e&&"function"!==typeof e?"number"!==typeof e?p(e)&&S(i,e):i.precision=e:i.template=e}));var I={years:"y",months:"M",weeks:"w",days:"d",hours:"h",minutes:"m",seconds:"s",milliseconds:"S"},T={escape:/\[(.+?)\]/,years:/\*?[Yy]+/,months:/\*?M+/,weeks:/\*?[Ww]+/,days:/\*?[Dd]+/,hours:/\*?[Hh]+/,minutes:/\*?m+/,seconds:/\*?s+/,milliseconds:/\*?S+/,general:/.+?/};i.types=o;var P=function(e){return g(o,(function(t){return T[t].test(e)}))},D=new RegExp(v(o,(function(e){return T[e].source})).join("|"),"g");i.duration=this;var H="function"===typeof i.template?i.template.apply(i):i.template,L=i.outputTypes,F=i.returnMomentTypes,z=i.largest,A=[];L||(f(i.stopTrim)&&(i.stopTrim=i.stopTrim.join("")),i.stopTrim&&m(i.stopTrim.match(D),(function(e){var t=P(e);"escape"!==t&&"general"!==t&&A.push(t)})));var _=e.localeData();_||(_={}),m(C(h),(function(e){"function"!==typeof h[e]?_["_"+e]||(_["_"+e]=h[e]):_[e]||(_[e]=h[e])})),m(C(_._durationTimeTemplates),(function(e){H=H.replace("_"+e+"_",_._durationTimeTemplates[e])}));var V=i.userLocale||e.locale(),$=i.useLeftUnits,N=i.usePlural,B=i.precision,W=i.forceLength,j=i.useGrouping,Z=i.trunc,U=i.useSignificantDigits&&B>0,X=U?i.precision:0,Y=X,K=i.minValue,G=!1,q=i.maxValue,Q=!1,J=i.useToLocaleString,ee=i.groupingSeparator,te=i.decimalSeparator,ne=i.grouping;J=J&&(t||r);var re=i.trim;f(re)&&(re=re.join(" ")),null===re&&(z||q||U)&&(re="all"),null!==re&&!0!==re&&"left"!==re&&"right"!==re||(re="large"),!1===re&&(re="");var ie=function(e){return e.test(re)},oe=/both/,le=/^all|[^sm]all/,ae=z>0||M([/large/,oe,le],ie),se=M([/small/,oe,le],ie),ce=M([/mid/,le],ie),ue=M([/final/,le],ie),de=v(H.match(D),(function(e,t){var n=P(e);return"*"===e.slice(0,1)&&(e=e.slice(1),"escape"!==n&&"general"!==n&&A.push(n)),{index:t,length:e.length,text:"",token:"escape"===n?e.replace(T.escape,"$1"):e,type:"escape"===n||"general"===n?null:n}})),he={index:0,length:0,token:"",text:"",type:null},fe=[];$&&de.reverse(),m(de,(function(e){if(e.type)return(he.type||he.text)&&fe.push(he),void(he=e);$?he.text=e.token+he.text:he.text+=e.token})),(he.type||he.text)&&fe.push(he),$&&fe.reverse();var pe=x(o,w(y(b(fe,"type"))));if(!pe.length)return b(fe,"text").join("");pe=v(pe,(function(e,t){var n,r=t+1===pe.length,o=!t;n="years"===e||"months"===e?O.as(e):R.as(e);var l=Math.floor(n),a=n-l,s=g(fe,(function(t){return e===t.type}));return o&&q&&n>q&&(Q=!0),r&&K&&Math.abs(i.duration.as(e))<K&&(G=!0),o&&null===W&&s.length>1&&(W=!0),R.subtract(l,e),O.subtract(l,e),{rawValue:n,wholeValue:l,decimalValue:r?a:0,isSmallest:r,isLargest:o,type:e,tokenLength:s.length}}));var ge,me=Z?Math.floor:Math.round,ve=function(e,t){var n=Math.pow(10,t);return me(e*n)/n},be=!1,ye=!1,we=function(e,t){var n={useGrouping:j,groupingSeparator:ee,decimalSeparator:te,grouping:ne,useToLocaleString:J};return U&&(X<=0?(e.rawValue=0,e.wholeValue=0,e.decimalValue=0):(n.maximumSignificantDigits=X,e.significantDigits=X)),Q&&!ye&&(e.isLargest?(e.wholeValue=q,e.decimalValue=0):(e.wholeValue=0,e.decimalValue=0)),G&&!ye&&(e.isSmallest?(e.wholeValue=K,e.decimalValue=0):(e.wholeValue=0,e.decimalValue=0)),e.isSmallest||e.significantDigits&&e.significantDigits-e.wholeValue.toString().length<=0?B<0?e.value=ve(e.wholeValue,B):0===B?e.value=me(e.wholeValue+e.decimalValue):U?(e.value=Z?ve(e.rawValue,X-e.wholeValue.toString().length):e.rawValue,e.wholeValue&&(X-=e.wholeValue.toString().length)):(n.fractionDigits=B,e.value=Z?e.wholeValue+ve(e.decimalValue,B):e.wholeValue+e.decimalValue):U&&e.wholeValue?(e.value=Math.round(ve(e.wholeValue,e.significantDigits-e.wholeValue.toString().length)),X-=e.wholeValue.toString().length):e.value=e.wholeValue,e.tokenLength>1&&(W||be)&&(n.minimumIntegerDigits=e.tokenLength,ye&&n.maximumSignificantDigits<e.tokenLength&&delete n.maximumSignificantDigits),!be&&(e.value>0||""===re||g(A,e.type)||g(L,e.type))&&(be=!0),e.formattedValue=u(e.value,n,V),n.useGrouping=!1,n.decimalSeparator=".",e.formattedValueEn=u(e.value,n,"en"),2===e.tokenLength&&"milliseconds"===e.type&&(e.formattedValueMS=u(e.value,{minimumIntegerDigits:3,useGrouping:!1},"en").slice(0,2)),e};if((pe=y(pe=v(pe,we))).length>1){var xe=function(e){return g(pe,(function(t){return t.type===e}))};m(l,(function(e){var t=xe(e.type);t&&m(e.targets,(function(e){var n=xe(e.type);n&&parseInt(t.formattedValueEn,10)===e.value&&(t.rawValue=0,t.wholeValue=0,t.decimalValue=0,n.rawValue+=1,n.wholeValue+=1,n.decimalValue=0,n.formattedValueEn=n.wholeValue.toString(),ye=!0)}))}))}return ye&&(be=!1,X=Y,pe=y(pe=v(pe,we))),!L||Q&&!i.trim?(ae&&(pe=k(pe,(function(e){return!e.isSmallest&&!e.wholeValue&&!g(A,e.type)}))),z&&pe.length&&(pe=pe.slice(0,z)),se&&pe.length>1&&(ge=function(e){return!e.wholeValue&&!g(A,e.type)&&!e.isLargest},pe=k(pe.slice().reverse(),ge).reverse()),ce&&(pe=y(pe=v(pe,(function(e,t){return t>0&&t<pe.length-1&&!e.wholeValue?null:e})))),!ue||1!==pe.length||pe[0].wholeValue||!Z&&pe[0].isSmallest&&pe[0].rawValue<K||(pe=[])):pe=y(pe=v(pe,(function(e){return g(L,(function(t){return e.type===t}))?e:null}))),F?pe:(m(fe,(function(e){var t=I[e.type],n=g(pe,(function(t){return t.type===e.type}));if(t&&n){var r=n.formattedValueEn.split(".");r[0]=parseInt(r[0],10),r[1]?r[1]=parseFloat("0."+r[1],10):r[1]=null;var i=_.durationPluralKey(t,r[0],r[1]),o=function(e,t){var n=[];return m(C(t),(function(r){if("_durationLabels"===r.slice(0,15)){var i=r.slice(15).toLowerCase();m(C(t[r]),(function(o){o.slice(0,1)===e&&n.push({type:i,key:o,label:t[r][o]})}))}})),n}(t,_),l=!1,s={};m(_._durationLabelTypes,(function(t){var n=g(o,(function(e){return e.type===t.type&&e.key===i}));n&&(s[n.type]=n.label,a(e.text,t.string)&&(e.text=e.text.replace(t.string,n.label),l=!0))})),N&&!l&&(o.sort(d),m(o,(function(t){return s[t.type]===t.label?!a(e.text,t.label)&&void 0:a(e.text,t.label)?(e.text=e.text.replace(t.label,s[t.type]),!1):void 0})))}})),(fe=v(fe,(function(e){if(!e.type)return e.text;var t=g(pe,(function(t){return t.type===e.type}));if(!t)return"";var n="";return $&&(n+=e.text),(E&&Q||!E&&G)&&(n+="< ",Q=!1,G=!1),(E&&G||!E&&Q)&&(n+="> ",Q=!1,G=!1),E&&(t.value>0||""===re||g(A,t.type)||g(L,t.type))&&(n+="-",E=!1),"milliseconds"===e.type&&t.formattedValueMS?n+=t.formattedValueMS:n+=t.formattedValue,$||(n+=e.text),n}))).join("").replace(/(,| |:|\.)*$/,"").replace(/^(,| |:|\.)*/,""))}function T(){var e=this.duration,t=function(t){return e._data[t]},n=g(this.types,t),r=function(e,t){for(var n=e.length;n-=1;)if(t(e[n]))return e[n]}(this.types,t);switch(n){case"milliseconds":return"S __";case"seconds":case"minutes":return"*_MS_";case"hours":return"_HMS_";case"days":if(n===r)return"d __";case"weeks":return n===r?"w __":(null===this.trim&&(this.trim="both"),"w __, d __, h __");case"months":if(n===r)return"M __";case"years":return n===r?"y __":(null===this.trim&&(this.trim="both"),"y __, M __, d __");default:return null===this.trim&&(this.trim="both"),"y __, d __, h __, m __, s __"}}function P(e){if(!e)throw"Moment Duration Format init cannot find moment instance.";e.duration.format=O,e.duration.fn.format=I,e.duration.fn.format.defaults={trim:null,stopTrim:null,largest:null,maxValue:null,minValue:null,precision:0,trunc:!1,forceLength:null,userLocale:null,usePlural:!0,useLeftUnits:!1,useGrouping:!0,useSignificantDigits:!1,template:T,useToLocaleString:!0,groupingSeparator:",",decimalSeparator:".",grouping:[3]},e.updateLocale("en",h)}var D=function(e,t,n){return e.toLocaleString(t,n)};t=function(){try{(0).toLocaleString("i")}catch(e){return"RangeError"===e.name}return!1}()&&R(D),n=t&&E(D);var H=function(e,t,n){if("undefined"!==typeof window&&window&&window.Intl&&window.Intl.NumberFormat)return window.Intl.NumberFormat(t,n).format(e)};return r=R(H),i=r&&E(H),P(e),P},i=[n(88084)],void 0===(o="function"===typeof(r=a)?r.apply(t,i):r)||(e.exports=o),l&&(l.momentDurationFormatSetup=l.moment?a(l.moment):a)},42608:function(e,t,n){var r,i,o;i=[t,n(2871)],r=function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(t);function r(e){return e&&e.__esModule?e:{default:e}}e.default=n.default},void 0===(o="function"===typeof r?r.apply(t,i):r)||(e.exports=o)},2871:function(e,t,n){var r,i,o;i=[t,n(5057),n(55898)],r=function(e,t,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.setHasSupportToCaptureOption=f;var r=o(t),i=o(n);function o(e){return e&&e.__esModule?e:{default:e}}var l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};function a(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var c=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function u(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function d(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var h=!1;function f(e){h=e}try{addEventListener("test",null,Object.defineProperty({},"capture",{get:function(){f(!0)}}))}catch(v){}function p(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{capture:!0};return h?e:e.capture}function g(e){if("touches"in e){var t=e.touches[0];return{x:t.pageX,y:t.pageY}}return{x:e.screenX,y:e.screenY}}var m=function(e){function t(){var e;s(this,t);for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];var o=u(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(r)));return o._handleSwipeStart=o._handleSwipeStart.bind(o),o._handleSwipeMove=o._handleSwipeMove.bind(o),o._handleSwipeEnd=o._handleSwipeEnd.bind(o),o._onMouseDown=o._onMouseDown.bind(o),o._onMouseMove=o._onMouseMove.bind(o),o._onMouseUp=o._onMouseUp.bind(o),o._setSwiperRef=o._setSwiperRef.bind(o),o}return d(t,e),c(t,[{key:"componentDidMount",value:function(){this.swiper&&this.swiper.addEventListener("touchmove",this._handleSwipeMove,p({capture:!0,passive:!1}))}},{key:"componentWillUnmount",value:function(){this.swiper&&this.swiper.removeEventListener("touchmove",this._handleSwipeMove,p({capture:!0,passive:!1}))}},{key:"_onMouseDown",value:function(e){this.props.allowMouseEvents&&(this.mouseDown=!0,document.addEventListener("mouseup",this._onMouseUp),document.addEventListener("mousemove",this._onMouseMove),this._handleSwipeStart(e))}},{key:"_onMouseMove",value:function(e){this.mouseDown&&this._handleSwipeMove(e)}},{key:"_onMouseUp",value:function(e){this.mouseDown=!1,document.removeEventListener("mouseup",this._onMouseUp),document.removeEventListener("mousemove",this._onMouseMove),this._handleSwipeEnd(e)}},{key:"_handleSwipeStart",value:function(e){var t=g(e),n=t.x,r=t.y;this.moveStart={x:n,y:r},this.props.onSwipeStart(e)}},{key:"_handleSwipeMove",value:function(e){if(this.moveStart){var t=g(e),n=t.x,r=t.y,i=n-this.moveStart.x,o=r-this.moveStart.y;this.moving=!0,this.props.onSwipeMove({x:i,y:o},e)&&e.cancelable&&e.preventDefault(),this.movePosition={deltaX:i,deltaY:o}}}},{key:"_handleSwipeEnd",value:function(e){this.props.onSwipeEnd(e);var t=this.props.tolerance;this.moving&&this.movePosition&&(this.movePosition.deltaX<-t?this.props.onSwipeLeft(1,e):this.movePosition.deltaX>t&&this.props.onSwipeRight(1,e),this.movePosition.deltaY<-t?this.props.onSwipeUp(1,e):this.movePosition.deltaY>t&&this.props.onSwipeDown(1,e)),this.moveStart=null,this.moving=!1,this.movePosition=null}},{key:"_setSwiperRef",value:function(e){this.swiper=e,this.props.innerRef(e)}},{key:"render",value:function(){var e=this.props,t=(e.tagName,e.className),n=e.style,i=e.children,o=(e.allowMouseEvents,e.onSwipeUp,e.onSwipeDown,e.onSwipeLeft,e.onSwipeRight,e.onSwipeStart,e.onSwipeMove,e.onSwipeEnd,e.innerRef,e.tolerance,a(e,["tagName","className","style","children","allowMouseEvents","onSwipeUp","onSwipeDown","onSwipeLeft","onSwipeRight","onSwipeStart","onSwipeMove","onSwipeEnd","innerRef","tolerance"]));return r.default.createElement(this.props.tagName,l({ref:this._setSwiperRef,onMouseDown:this._onMouseDown,onTouchStart:this._handleSwipeStart,onTouchEnd:this._handleSwipeEnd,className:t,style:n},o),i)}}]),t}(t.Component);m.displayName="ReactSwipe",m.propTypes={tagName:i.default.string,className:i.default.string,style:i.default.object,children:i.default.node,allowMouseEvents:i.default.bool,onSwipeUp:i.default.func,onSwipeDown:i.default.func,onSwipeLeft:i.default.func,onSwipeRight:i.default.func,onSwipeStart:i.default.func,onSwipeMove:i.default.func,onSwipeEnd:i.default.func,innerRef:i.default.func,tolerance:i.default.number.isRequired},m.defaultProps={tagName:"div",allowMouseEvents:!1,onSwipeUp:function(){},onSwipeDown:function(){},onSwipeLeft:function(){},onSwipeRight:function(){},onSwipeStart:function(){},onSwipeMove:function(){},onSwipeEnd:function(){},innerRef:function(){},tolerance:0},e.default=m},void 0===(o="function"===typeof r?r.apply(t,i):r)||(e.exports=o)},69265:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default=function(e,t,n){var r=0===e?e:e+t;return"translate3d"+("("+("horizontal"===n?[r,0,0]:[0,r,0]).join(",")+")")}},10083:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.fadeAnimationHandler=t.slideStopSwipingHandler=t.slideSwipeAnimationHandler=t.slideAnimationHandler=void 0;var r,i=n(5057),o=(r=n(69265))&&r.__esModule?r:{default:r},l=n(76126);function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach((function(t){c(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function c(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}t.slideAnimationHandler=function(e,t){var n={},r=t.selectedItem,a=r,c=i.Children.count(e.children)-1;if(e.infiniteLoop&&(r<0||r>c))return a<0?e.centerMode&&e.centerSlidePercentage&&"horizontal"===e.axis?n.itemListStyle=(0,l.setPosition)(-(c+2)*e.centerSlidePercentage-(100-e.centerSlidePercentage)/2,e.axis):n.itemListStyle=(0,l.setPosition)(100*-(c+2),e.axis):a>c&&(n.itemListStyle=(0,l.setPosition)(0,e.axis)),n;var u=(0,l.getPosition)(r,e),d=(0,o.default)(u,"%",e.axis),h=e.transitionTime+"ms";return n.itemListStyle={WebkitTransform:d,msTransform:d,OTransform:d,transform:d},t.swiping||(n.itemListStyle=s(s({},n.itemListStyle),{},{WebkitTransitionDuration:h,MozTransitionDuration:h,OTransitionDuration:h,transitionDuration:h,msTransitionDuration:h})),n};t.slideSwipeAnimationHandler=function(e,t,n,r){var o={},a="horizontal"===t.axis,s=i.Children.count(t.children),c=(0,l.getPosition)(n.selectedItem,t),u=t.infiniteLoop?(0,l.getPosition)(s-1,t)-100:(0,l.getPosition)(s-1,t),d=a?e.x:e.y,h=d;0===c&&d>0&&(h=0),c===u&&d<0&&(h=0);var f=c+100/(n.itemSize/h),p=Math.abs(d)>t.swipeScrollTolerance;return t.infiniteLoop&&p&&(0===n.selectedItem&&f>-100?f-=100*s:n.selectedItem===s-1&&f<100*-s&&(f+=100*s)),(!t.preventMovementUntilSwipeScrollTolerance||p||n.swipeMovementStarted)&&(n.swipeMovementStarted||r({swipeMovementStarted:!0}),o.itemListStyle=(0,l.setPosition)(f,t.axis)),p&&!n.cancelClick&&r({cancelClick:!0}),o};t.slideStopSwipingHandler=function(e,t){var n=(0,l.getPosition)(t.selectedItem,e);return{itemListStyle:(0,l.setPosition)(n,e.axis)}};t.fadeAnimationHandler=function(e,t){var n=e.transitionTime+"ms",r="ease-in-out",i={position:"absolute",display:"block",zIndex:-2,minHeight:"100%",opacity:0,top:0,right:0,left:0,bottom:0,transitionTimingFunction:r,msTransitionTimingFunction:r,MozTransitionTimingFunction:r,WebkitTransitionTimingFunction:r,OTransitionTimingFunction:r};return t.swiping||(i=s(s({},i),{},{WebkitTransitionDuration:n,MozTransitionDuration:n,OTransitionDuration:n,transitionDuration:n,msTransitionDuration:n})),{slideStyle:i,selectedStyle:s(s({},i),{},{opacity:1,position:"relative"}),prevStyle:s({},i)}}},64810:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==f(e)&&"function"!==typeof e)return{default:e};var t=h();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var o=r?Object.getOwnPropertyDescriptor(e,i):null;o&&(o.get||o.set)?Object.defineProperty(n,i,o):n[i]=e[i]}n.default=e,t&&t.set(e,n);return n}(n(5057)),i=d(n(42608)),o=d(n(3786)),l=d(n(72867)),a=d(n(9197)),s=d(n(37980)),c=n(76126),u=n(10083);function d(e){return e&&e.__esModule?e:{default:e}}function h(){if("function"!==typeof WeakMap)return null;var e=new WeakMap;return h=function(){return e},e}function f(e){return f="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},f(e)}function p(){return p=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},p.apply(this,arguments)}function g(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function m(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?g(Object(n),!0).forEach((function(t){k(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):g(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function v(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function b(e,t){return b=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},b(e,t)}function y(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=x(e);if(t){var i=x(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===f(t)||"function"===typeof t))return t;return w(e)}(this,n)}}function w(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function x(e){return x=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},x(e)}function k(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var S=function(e){!function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&b(e,t)}(f,e);var t,n,d,h=y(f);function f(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,f),k(w(t=h.call(this,e)),"thumbsRef",void 0),k(w(t),"carouselWrapperRef",void 0),k(w(t),"listRef",void 0),k(w(t),"itemsRef",void 0),k(w(t),"timer",void 0),k(w(t),"animationHandler",void 0),k(w(t),"setThumbsRef",(function(e){t.thumbsRef=e})),k(w(t),"setCarouselWrapperRef",(function(e){t.carouselWrapperRef=e})),k(w(t),"setListRef",(function(e){t.listRef=e})),k(w(t),"setItemsRef",(function(e,n){t.itemsRef||(t.itemsRef=[]),t.itemsRef[n]=e})),k(w(t),"autoPlay",(function(){r.Children.count(t.props.children)<=1||(t.clearAutoPlay(),t.props.autoPlay&&(t.timer=setTimeout((function(){t.increment()}),t.props.interval)))})),k(w(t),"clearAutoPlay",(function(){t.timer&&clearTimeout(t.timer)})),k(w(t),"resetAutoPlay",(function(){t.clearAutoPlay(),t.autoPlay()})),k(w(t),"stopOnHover",(function(){t.setState({isMouseEntered:!0},t.clearAutoPlay)})),k(w(t),"startOnLeave",(function(){t.setState({isMouseEntered:!1},t.autoPlay)})),k(w(t),"isFocusWithinTheCarousel",(function(){return!!t.carouselWrapperRef&&!((0,a.default)().activeElement!==t.carouselWrapperRef&&!t.carouselWrapperRef.contains((0,a.default)().activeElement))})),k(w(t),"navigateWithKeyboard",(function(e){if(t.isFocusWithinTheCarousel()){var n="horizontal"===t.props.axis,r=n?37:38;(n?39:40)===e.keyCode?t.increment():r===e.keyCode&&t.decrement()}})),k(w(t),"updateSizes",(function(){if(t.state.initialized&&t.itemsRef&&0!==t.itemsRef.length){var e="horizontal"===t.props.axis,n=t.itemsRef[0];if(n){var r=e?n.clientWidth:n.clientHeight;t.setState({itemSize:r}),t.thumbsRef&&t.thumbsRef.updateSizes()}}})),k(w(t),"setMountState",(function(){t.setState({hasMount:!0}),t.updateSizes()})),k(w(t),"handleClickItem",(function(e,n){0!==r.Children.count(t.props.children)&&(t.state.cancelClick?t.setState({cancelClick:!1}):(t.props.onClickItem(e,n),e!==t.state.selectedItem&&t.setState({selectedItem:e})))})),k(w(t),"handleOnChange",(function(e,n){r.Children.count(t.props.children)<=1||t.props.onChange(e,n)})),k(w(t),"handleClickThumb",(function(e,n){t.props.onClickThumb(e,n),t.moveTo(e)})),k(w(t),"onSwipeStart",(function(e){t.setState({swiping:!0}),t.props.onSwipeStart(e)})),k(w(t),"onSwipeEnd",(function(e){t.setState({swiping:!1,cancelClick:!1,swipeMovementStarted:!1}),t.props.onSwipeEnd(e),t.clearAutoPlay(),t.state.autoPlay&&t.autoPlay()})),k(w(t),"onSwipeMove",(function(e,n){t.props.onSwipeMove(n);var r=t.props.swipeAnimationHandler(e,t.props,t.state,t.setState.bind(w(t)));return t.setState(m({},r)),!!Object.keys(r).length})),k(w(t),"decrement",(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;t.moveTo(t.state.selectedItem-("number"===typeof e?e:1))})),k(w(t),"increment",(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;t.moveTo(t.state.selectedItem+("number"===typeof e?e:1))})),k(w(t),"moveTo",(function(e){if("number"===typeof e){var n=r.Children.count(t.props.children)-1;e<0&&(e=t.props.infiniteLoop?n:0),e>n&&(e=t.props.infiniteLoop?0:n),t.selectItem({selectedItem:e}),t.state.autoPlay&&!1===t.state.isMouseEntered&&t.resetAutoPlay()}})),k(w(t),"onClickNext",(function(){t.increment(1)})),k(w(t),"onClickPrev",(function(){t.decrement(1)})),k(w(t),"onSwipeForward",(function(){t.increment(1),t.props.emulateTouch&&t.setState({cancelClick:!0})})),k(w(t),"onSwipeBackwards",(function(){t.decrement(1),t.props.emulateTouch&&t.setState({cancelClick:!0})})),k(w(t),"changeItem",(function(e){return function(n){(0,c.isKeyboardEvent)(n)&&"Enter"!==n.key||t.moveTo(e)}})),k(w(t),"selectItem",(function(e){t.setState(m({previousItem:t.state.selectedItem},e),(function(){t.setState(t.animationHandler(t.props,t.state))})),t.handleOnChange(e.selectedItem,r.Children.toArray(t.props.children)[e.selectedItem])})),k(w(t),"getInitialImage",(function(){var e=t.props.selectedItem,n=t.itemsRef&&t.itemsRef[e];return(n&&n.getElementsByTagName("img")||[])[0]})),k(w(t),"getVariableItemHeight",(function(e){var n=t.itemsRef&&t.itemsRef[e];if(t.state.hasMount&&n&&n.children.length){var r=n.children[0].getElementsByTagName("img")||[];if(r.length>0){var i=r[0];if(!i.complete){i.addEventListener("load",(function e(){t.forceUpdate(),i.removeEventListener("load",e)}))}}var o=(r[0]||n.children[0]).clientHeight;return o>0?o:null}return null}));var n={initialized:!1,previousItem:e.selectedItem,selectedItem:e.selectedItem,hasMount:!1,isMouseEntered:!1,autoPlay:e.autoPlay,swiping:!1,swipeMovementStarted:!1,cancelClick:!1,itemSize:1,itemListStyle:{},slideStyle:{},selectedStyle:{},prevStyle:{}};return t.animationHandler="function"===typeof e.animationHandler&&e.animationHandler||"fade"===e.animationHandler&&u.fadeAnimationHandler||u.slideAnimationHandler,t.state=m(m({},n),t.animationHandler(e,n)),t}return t=f,(n=[{key:"componentDidMount",value:function(){this.props.children&&this.setupCarousel()}},{key:"componentDidUpdate",value:function(e,t){e.children||!this.props.children||this.state.initialized||this.setupCarousel(),!e.autoFocus&&this.props.autoFocus&&this.forceFocus(),t.swiping&&!this.state.swiping&&this.setState(m({},this.props.stopSwipingHandler(this.props,this.state))),e.selectedItem===this.props.selectedItem&&e.centerMode===this.props.centerMode||(this.updateSizes(),this.moveTo(this.props.selectedItem)),e.autoPlay!==this.props.autoPlay&&(this.props.autoPlay?this.setupAutoPlay():this.destroyAutoPlay(),this.setState({autoPlay:this.props.autoPlay}))}},{key:"componentWillUnmount",value:function(){this.destroyCarousel()}},{key:"setupCarousel",value:function(){var e=this;this.bindEvents(),this.state.autoPlay&&r.Children.count(this.props.children)>1&&this.setupAutoPlay(),this.props.autoFocus&&this.forceFocus(),this.setState({initialized:!0},(function(){var t=e.getInitialImage();t&&!t.complete?t.addEventListener("load",e.setMountState):e.setMountState()}))}},{key:"destroyCarousel",value:function(){this.state.initialized&&(this.unbindEvents(),this.destroyAutoPlay())}},{key:"setupAutoPlay",value:function(){this.autoPlay();var e=this.carouselWrapperRef;this.props.stopOnHover&&e&&(e.addEventListener("mouseenter",this.stopOnHover),e.addEventListener("mouseleave",this.startOnLeave))}},{key:"destroyAutoPlay",value:function(){this.clearAutoPlay();var e=this.carouselWrapperRef;this.props.stopOnHover&&e&&(e.removeEventListener("mouseenter",this.stopOnHover),e.removeEventListener("mouseleave",this.startOnLeave))}},{key:"bindEvents",value:function(){(0,s.default)().addEventListener("resize",this.updateSizes),(0,s.default)().addEventListener("DOMContentLoaded",this.updateSizes),this.props.useKeyboardArrows&&(0,a.default)().addEventListener("keydown",this.navigateWithKeyboard)}},{key:"unbindEvents",value:function(){(0,s.default)().removeEventListener("resize",this.updateSizes),(0,s.default)().removeEventListener("DOMContentLoaded",this.updateSizes);var e=this.getInitialImage();e&&e.removeEventListener("load",this.setMountState),this.props.useKeyboardArrows&&(0,a.default)().removeEventListener("keydown",this.navigateWithKeyboard)}},{key:"forceFocus",value:function(){var e;null===(e=this.carouselWrapperRef)||void 0===e||e.focus()}},{key:"renderItems",value:function(e){var t=this;return this.props.children?r.Children.map(this.props.children,(function(n,i){var l=i===t.state.selectedItem,a=i===t.state.previousItem,s=l&&t.state.selectedStyle||a&&t.state.prevStyle||t.state.slideStyle||{};t.props.centerMode&&"horizontal"===t.props.axis&&(s=m(m({},s),{},{minWidth:t.props.centerSlidePercentage+"%"})),t.state.swiping&&t.state.swipeMovementStarted&&(s=m(m({},s),{},{pointerEvents:"none"}));var c={ref:function(e){return t.setItemsRef(e,i)},key:"itemKey"+i+(e?"clone":""),className:o.default.ITEM(!0,i===t.state.selectedItem,i===t.state.previousItem),onClick:t.handleClickItem.bind(t,i,n),style:s};return r.default.createElement("li",c,t.props.renderItem(n,{isSelected:i===t.state.selectedItem,isPrevious:i===t.state.previousItem}))})):[]}},{key:"renderControls",value:function(){var e=this,t=this.props,n=t.showIndicators,i=t.labels,o=t.renderIndicator,l=t.children;return n?r.default.createElement("ul",{className:"control-dots"},r.Children.map(l,(function(t,n){return o&&o(e.changeItem(n),n===e.state.selectedItem,n,i.item)}))):null}},{key:"renderStatus",value:function(){return this.props.showStatus?r.default.createElement("p",{className:"carousel-status"},this.props.statusFormatter(this.state.selectedItem+1,r.Children.count(this.props.children))):null}},{key:"renderThumbs",value:function(){return this.props.showThumbs&&this.props.children&&0!==r.Children.count(this.props.children)?r.default.createElement(l.default,{ref:this.setThumbsRef,onSelectItem:this.handleClickThumb,selectedItem:this.state.selectedItem,transitionTime:this.props.transitionTime,thumbWidth:this.props.thumbWidth,labels:this.props.labels,emulateTouch:this.props.emulateTouch},this.props.renderThumbs(this.props.children)):null}},{key:"render",value:function(){var e=this;if(!this.props.children||0===r.Children.count(this.props.children))return null;var t=this.props.swipeable&&r.Children.count(this.props.children)>1,n="horizontal"===this.props.axis,l=this.props.showArrows&&r.Children.count(this.props.children)>1,a=l&&(this.state.selectedItem>0||this.props.infiniteLoop)||!1,s=l&&(this.state.selectedItem<r.Children.count(this.props.children)-1||this.props.infiniteLoop)||!1,c=this.renderItems(!0),u=c.shift(),d=c.pop(),h={className:o.default.SLIDER(!0,this.state.swiping),onSwipeMove:this.onSwipeMove,onSwipeStart:this.onSwipeStart,onSwipeEnd:this.onSwipeEnd,style:this.state.itemListStyle,tolerance:this.props.swipeScrollTolerance},f={};if(n){if(h.onSwipeLeft=this.onSwipeForward,h.onSwipeRight=this.onSwipeBackwards,this.props.dynamicHeight){var g=this.getVariableItemHeight(this.state.selectedItem);f.height=g||"auto"}}else h.onSwipeUp="natural"===this.props.verticalSwipe?this.onSwipeBackwards:this.onSwipeForward,h.onSwipeDown="natural"===this.props.verticalSwipe?this.onSwipeForward:this.onSwipeBackwards,h.style=m(m({},h.style),{},{height:this.state.itemSize}),f.height=this.state.itemSize;return r.default.createElement("div",{"aria-label":this.props.ariaLabel,className:o.default.ROOT(this.props.className),ref:this.setCarouselWrapperRef,tabIndex:this.props.useKeyboardArrows?0:void 0},r.default.createElement("div",{className:o.default.CAROUSEL(!0),style:{width:this.props.width}},this.renderControls(),this.props.renderArrowPrev(this.onClickPrev,a,this.props.labels.leftArrow),r.default.createElement("div",{className:o.default.WRAPPER(!0,this.props.axis),style:f},t?r.default.createElement(i.default,p({tagName:"ul",innerRef:this.setListRef},h,{allowMouseEvents:this.props.emulateTouch}),this.props.infiniteLoop&&d,this.renderItems(),this.props.infiniteLoop&&u):r.default.createElement("ul",{className:o.default.SLIDER(!0,this.state.swiping),ref:function(t){return e.setListRef(t)},style:this.state.itemListStyle||{}},this.props.infiniteLoop&&d,this.renderItems(),this.props.infiniteLoop&&u)),this.props.renderArrowNext(this.onClickNext,s,this.props.labels.rightArrow),this.renderStatus()),this.renderThumbs())}}])&&v(t.prototype,n),d&&v(t,d),f}(r.default.Component);t.default=S,k(S,"displayName","Carousel"),k(S,"defaultProps",{ariaLabel:void 0,axis:"horizontal",centerSlidePercentage:80,interval:3e3,labels:{leftArrow:"previous slide / item",rightArrow:"next slide / item",item:"slide item"},onClickItem:c.noop,onClickThumb:c.noop,onChange:c.noop,onSwipeStart:function(){},onSwipeEnd:function(){},onSwipeMove:function(){return!1},preventMovementUntilSwipeScrollTolerance:!1,renderArrowPrev:function(e,t,n){return r.default.createElement("button",{type:"button","aria-label":n,className:o.default.ARROW_PREV(!t),onClick:e})},renderArrowNext:function(e,t,n){return r.default.createElement("button",{type:"button","aria-label":n,className:o.default.ARROW_NEXT(!t),onClick:e})},renderIndicator:function(e,t,n,i){return r.default.createElement("li",{className:o.default.DOT(t),onClick:e,onKeyDown:e,value:n,key:n,role:"button",tabIndex:0,"aria-label":"".concat(i," ").concat(n+1)})},renderItem:function(e){return e},renderThumbs:function(e){var t=r.Children.map(e,(function(e){var t=e;if("img"!==e.type&&(t=r.Children.toArray(e.props.children).find((function(e){return"img"===e.type}))),t)return t}));return 0===t.filter((function(e){return e})).length?(console.warn("No images found! Can't build the thumb list without images. If you don't need thumbs, set showThumbs={false} in the Carousel. Note that it's not possible to get images rendered inside custom components. More info at https://github.com/leandrowd/react-responsive-carousel/blob/master/TROUBLESHOOTING.md"),[]):t},statusFormatter:c.defaultStatusFormatter,selectedItem:0,showArrows:!0,showIndicators:!0,showStatus:!0,showThumbs:!0,stopOnHover:!0,swipeScrollTolerance:5,swipeable:!0,transitionTime:350,verticalSwipe:"standard",width:"100%",animationHandler:"slide",swipeAnimationHandler:u.slideSwipeAnimationHandler,stopSwipingHandler:u.slideStopSwipingHandler})},57834:()=>{},76126:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setPosition=t.getPosition=t.isKeyboardEvent=t.defaultStatusFormatter=t.noop=void 0;var r,i=n(5057),o=(r=n(69265))&&r.__esModule?r:{default:r};t.noop=function(){};t.defaultStatusFormatter=function(e,t){return"".concat(e," of ").concat(t)};t.isKeyboardEvent=function(e){return!!e&&e.hasOwnProperty("key")};t.getPosition=function(e,t){if(t.infiniteLoop&&++e,0===e)return 0;var n=i.Children.count(t.children);if(t.centerMode&&"horizontal"===t.axis){var r=-e*t.centerSlidePercentage,o=n-1;return e&&(e!==o||t.infiniteLoop)?r+=(100-t.centerSlidePercentage)/2:e===o&&(r+=100-t.centerSlidePercentage),r}return 100*-e};t.setPosition=function(e,t){var n={};return["WebkitTransform","MozTransform","MsTransform","OTransform","transform","msTransform"].forEach((function(r){n[r]=(0,o.default)(e,"%",t)})),n}},72867:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==d(e)&&"function"!==typeof e)return{default:e};var t=u();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var o=r?Object.getOwnPropertyDescriptor(e,i):null;o&&(o.get||o.set)?Object.defineProperty(n,i,o):n[i]=e[i]}n.default=e,t&&t.set(e,n);return n}(n(5057)),i=c(n(3786)),o=n(79979),l=c(n(69265)),a=c(n(42608)),s=c(n(37980));function c(e){return e&&e.__esModule?e:{default:e}}function u(){if("function"!==typeof WeakMap)return null;var e=new WeakMap;return u=function(){return e},e}function d(e){return d="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},d(e)}function h(){return h=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},h.apply(this,arguments)}function f(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function p(e,t){return p=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},p(e,t)}function g(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=v(e);if(t){var i=v(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===d(t)||"function"===typeof t))return t;return m(e)}(this,n)}}function m(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function v(e){return v=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},v(e)}function b(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var y=function(e){!function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&p(e,t)}(d,e);var t,n,c,u=g(d);function d(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,d),b(m(t=u.call(this,e)),"itemsWrapperRef",void 0),b(m(t),"itemsListRef",void 0),b(m(t),"thumbsRef",void 0),b(m(t),"setItemsWrapperRef",(function(e){t.itemsWrapperRef=e})),b(m(t),"setItemsListRef",(function(e){t.itemsListRef=e})),b(m(t),"setThumbsRef",(function(e,n){t.thumbsRef||(t.thumbsRef=[]),t.thumbsRef[n]=e})),b(m(t),"updateSizes",(function(){if(t.props.children&&t.itemsWrapperRef&&t.thumbsRef){var e=r.Children.count(t.props.children),n=t.itemsWrapperRef.clientWidth,i=t.props.thumbWidth?t.props.thumbWidth:(0,o.outerWidth)(t.thumbsRef[0]),l=Math.floor(n/i),a=l<e,s=a?e-l:0;t.setState((function(e,n){return{itemSize:i,visibleItems:l,firstItem:a?t.getFirstItem(n.selectedItem):0,lastPosition:s,showArrows:a}}))}})),b(m(t),"handleClickItem",(function(e,n,r){if(!function(e){return e.hasOwnProperty("key")}(r)||"Enter"===r.key){var i=t.props.onSelectItem;"function"===typeof i&&i(e,n)}})),b(m(t),"onSwipeStart",(function(){t.setState({swiping:!0})})),b(m(t),"onSwipeEnd",(function(){t.setState({swiping:!1})})),b(m(t),"onSwipeMove",(function(e){var n=e.x;if(!t.state.itemSize||!t.itemsWrapperRef||!t.state.visibleItems)return!1;var i=r.Children.count(t.props.children),o=-100*t.state.firstItem/t.state.visibleItems;0===o&&n>0&&(n=0),o===100*-Math.max(i-t.state.visibleItems,0)/t.state.visibleItems&&n<0&&(n=0);var a=o+100/(t.itemsWrapperRef.clientWidth/n);return t.itemsListRef&&["WebkitTransform","MozTransform","MsTransform","OTransform","transform","msTransform"].forEach((function(e){t.itemsListRef.style[e]=(0,l.default)(a,"%",t.props.axis)})),!0})),b(m(t),"slideRight",(function(e){t.moveTo(t.state.firstItem-("number"===typeof e?e:1))})),b(m(t),"slideLeft",(function(e){t.moveTo(t.state.firstItem+("number"===typeof e?e:1))})),b(m(t),"moveTo",(function(e){e=(e=e<0?0:e)>=t.state.lastPosition?t.state.lastPosition:e,t.setState({firstItem:e})})),t.state={selectedItem:e.selectedItem,swiping:!1,showArrows:!1,firstItem:0,visibleItems:0,lastPosition:0},t}return t=d,(n=[{key:"componentDidMount",value:function(){this.setupThumbs()}},{key:"componentDidUpdate",value:function(e){this.props.selectedItem!==this.state.selectedItem&&this.setState({selectedItem:this.props.selectedItem,firstItem:this.getFirstItem(this.props.selectedItem)}),this.props.children!==e.children&&this.updateSizes()}},{key:"componentWillUnmount",value:function(){this.destroyThumbs()}},{key:"setupThumbs",value:function(){(0,s.default)().addEventListener("resize",this.updateSizes),(0,s.default)().addEventListener("DOMContentLoaded",this.updateSizes),this.updateSizes()}},{key:"destroyThumbs",value:function(){(0,s.default)().removeEventListener("resize",this.updateSizes),(0,s.default)().removeEventListener("DOMContentLoaded",this.updateSizes)}},{key:"getFirstItem",value:function(e){var t=e;return e>=this.state.lastPosition&&(t=this.state.lastPosition),e<this.state.firstItem+this.state.visibleItems&&(t=this.state.firstItem),e<this.state.firstItem&&(t=e),t}},{key:"renderItems",value:function(){var e=this;return this.props.children.map((function(t,n){var o=i.default.ITEM(!1,n===e.state.selectedItem),l={key:n,ref:function(t){return e.setThumbsRef(t,n)},className:o,onClick:e.handleClickItem.bind(e,n,e.props.children[n]),onKeyDown:e.handleClickItem.bind(e,n,e.props.children[n]),"aria-label":"".concat(e.props.labels.item," ").concat(n+1),style:{width:e.props.thumbWidth}};return r.default.createElement("li",h({},l,{role:"button",tabIndex:0}),t)}))}},{key:"render",value:function(){var e=this;if(!this.props.children)return null;var t,n=r.Children.count(this.props.children)>1,o=this.state.showArrows&&this.state.firstItem>0,s=this.state.showArrows&&this.state.firstItem<this.state.lastPosition,c=-this.state.firstItem*(this.state.itemSize||0),u=(0,l.default)(c,"px",this.props.axis),d=this.props.transitionTime+"ms";return t={WebkitTransform:u,MozTransform:u,MsTransform:u,OTransform:u,transform:u,msTransform:u,WebkitTransitionDuration:d,MozTransitionDuration:d,MsTransitionDuration:d,OTransitionDuration:d,transitionDuration:d,msTransitionDuration:d},r.default.createElement("div",{className:i.default.CAROUSEL(!1)},r.default.createElement("div",{className:i.default.WRAPPER(!1),ref:this.setItemsWrapperRef},r.default.createElement("button",{type:"button",className:i.default.ARROW_PREV(!o),onClick:function(){return e.slideRight()},"aria-label":this.props.labels.leftArrow}),n?r.default.createElement(a.default,{tagName:"ul",className:i.default.SLIDER(!1,this.state.swiping),onSwipeLeft:this.slideLeft,onSwipeRight:this.slideRight,onSwipeMove:this.onSwipeMove,onSwipeStart:this.onSwipeStart,onSwipeEnd:this.onSwipeEnd,style:t,innerRef:this.setItemsListRef,allowMouseEvents:this.props.emulateTouch},this.renderItems()):r.default.createElement("ul",{className:i.default.SLIDER(!1,this.state.swiping),ref:function(t){return e.setItemsListRef(t)},style:t},this.renderItems()),r.default.createElement("button",{type:"button",className:i.default.ARROW_NEXT(!s),onClick:function(){return e.slideLeft()},"aria-label":this.props.labels.rightArrow})))}}])&&f(t.prototype,n),c&&f(t,c),d}(r.Component);t.default=y,b(y,"displayName","Thumbs"),b(y,"defaultProps",{axis:"horizontal",labels:{leftArrow:"previous slide / item",rightArrow:"next slide / item",item:"slide item"},selectedItem:0,thumbWidth:80,transitionTime:350})},3786:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,i=(r=n(7742))&&r.__esModule?r:{default:r};var o={ROOT:function(e){return(0,i.default)(function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}({"carousel-root":!0},e||"",!!e))},CAROUSEL:function(e){return(0,i.default)({carousel:!0,"carousel-slider":e})},WRAPPER:function(e,t){return(0,i.default)({"thumbs-wrapper":!e,"slider-wrapper":e,"axis-horizontal":"horizontal"===t,"axis-vertical":"horizontal"!==t})},SLIDER:function(e,t){return(0,i.default)({thumbs:!e,slider:e,animated:!t})},ITEM:function(e,t,n){return(0,i.default)({thumb:!e,slide:e,selected:t,previous:n})},ARROW_PREV:function(e){return(0,i.default)({"control-arrow control-prev":!0,"control-disabled":e})},ARROW_NEXT:function(e){return(0,i.default)({"control-arrow control-next":!0,"control-disabled":e})},DOT:function(e){return(0,i.default)({dot:!0,selected:e})}};t.default=o},79979:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.outerWidth=void 0;t.outerWidth=function(e){var t=e.offsetWidth,n=getComputedStyle(e);return t+=parseInt(n.marginLeft)+parseInt(n.marginRight)}},27261:(e,t,n)=>{"use strict";Object.defineProperty(t,"lr",{enumerable:!0,get:function(){return r.default}});var r=l(n(64810)),i=n(57834),o=l(n(72867));function l(e){return e&&e.__esModule?e:{default:e}}},9197:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default=function(){return document}},37980:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default=function(){return window}},59500:(e,t,n)=>{var r;!function(){"use strict";var i={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function o(e){return function(e,t){var n,r,l,a,s,c,u,d,h,f=1,p=e.length,g="";for(r=0;r<p;r++)if("string"===typeof e[r])g+=e[r];else if("object"===typeof e[r]){if((a=e[r]).keys)for(n=t[f],l=0;l<a.keys.length;l++){if(void 0==n)throw new Error(o('[sprintf] Cannot access property "%s" of undefined value "%s"',a.keys[l],a.keys[l-1]));n=n[a.keys[l]]}else n=a.param_no?t[a.param_no]:t[f++];if(i.not_type.test(a.type)&&i.not_primitive.test(a.type)&&n instanceof Function&&(n=n()),i.numeric_arg.test(a.type)&&"number"!==typeof n&&isNaN(n))throw new TypeError(o("[sprintf] expecting number but found %T",n));switch(i.number.test(a.type)&&(d=n>=0),a.type){case"b":n=parseInt(n,10).toString(2);break;case"c":n=String.fromCharCode(parseInt(n,10));break;case"d":case"i":n=parseInt(n,10);break;case"j":n=JSON.stringify(n,null,a.width?parseInt(a.width):0);break;case"e":n=a.precision?parseFloat(n).toExponential(a.precision):parseFloat(n).toExponential();break;case"f":n=a.precision?parseFloat(n).toFixed(a.precision):parseFloat(n);break;case"g":n=a.precision?String(Number(n.toPrecision(a.precision))):parseFloat(n);break;case"o":n=(parseInt(n,10)>>>0).toString(8);break;case"s":n=String(n),n=a.precision?n.substring(0,a.precision):n;break;case"t":n=String(!!n),n=a.precision?n.substring(0,a.precision):n;break;case"T":n=Object.prototype.toString.call(n).slice(8,-1).toLowerCase(),n=a.precision?n.substring(0,a.precision):n;break;case"u":n=parseInt(n,10)>>>0;break;case"v":n=n.valueOf(),n=a.precision?n.substring(0,a.precision):n;break;case"x":n=(parseInt(n,10)>>>0).toString(16);break;case"X":n=(parseInt(n,10)>>>0).toString(16).toUpperCase()}i.json.test(a.type)?g+=n:(!i.number.test(a.type)||d&&!a.sign?h="":(h=d?"+":"-",n=n.toString().replace(i.sign,"")),c=a.pad_char?"0"===a.pad_char?"0":a.pad_char.charAt(1):" ",u=a.width-(h+n).length,s=a.width&&u>0?c.repeat(u):"",g+=a.align?h+n+s:"0"===c?h+s+n:s+h+n)}return g}(function(e){if(a[e])return a[e];var t,n=e,r=[],o=0;for(;n;){if(null!==(t=i.text.exec(n)))r.push(t[0]);else if(null!==(t=i.modulo.exec(n)))r.push("%");else{if(null===(t=i.placeholder.exec(n)))throw new SyntaxError("[sprintf] unexpected placeholder");if(t[2]){o|=1;var l=[],s=t[2],c=[];if(null===(c=i.key.exec(s)))throw new SyntaxError("[sprintf] failed to parse named argument key");for(l.push(c[1]);""!==(s=s.substring(c[0].length));)if(null!==(c=i.key_access.exec(s)))l.push(c[1]);else{if(null===(c=i.index_access.exec(s)))throw new SyntaxError("[sprintf] failed to parse named argument key");l.push(c[1])}t[2]=l}else o|=2;if(3===o)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");r.push({placeholder:t[0],param_no:t[1],keys:t[2],sign:t[3],pad_char:t[4],align:t[5],width:t[6],precision:t[7],type:t[8]})}n=n.substring(t[0].length)}return a[e]=r}(e),arguments)}function l(e,t){return o.apply(null,[e].concat(t||[]))}var a=Object.create(null);t.sprintf=o,t.vsprintf=l,"undefined"!==typeof window&&(window.sprintf=o,window.vsprintf=l,void 0===(r=function(){return{sprintf:o,vsprintf:l}}.call(t,n,t,e))||(e.exports=r))}()},33091:()=>{},27235:()=>{},9249:(e,t,n)=>{"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}n.d(t,{Z:()=>r})},87371:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(45850);function i(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,(0,r.Z)(i.key),i)}}function o(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}},75181:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(95058);var i=n(11987);function o(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=(0,r.Z)(e);if(t){var l=(0,r.Z)(this).constructor;n=Reflect.construct(o,arguments,l)}else n=o.apply(this,arguments);return(0,i.Z)(this,n)}}},95058:(e,t,n)=>{"use strict";function r(e){return r=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},r(e)}n.d(t,{Z:()=>r})},45754:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(88960);function i(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&(0,r.Z)(e,t)}},11987:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(86522),i=n(80753);function o(e,t){if(t&&("object"===(0,r.Z)(t)||"function"===typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return(0,i.Z)(e)}},2867:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(59147);function i(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,i,o,l,a=[],s=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=o.call(n)).done)&&(a.push(r.value),a.length!==t);s=!0);}catch(e){c=!0,i=e}finally{try{if(!s&&null!=n.return&&(l=n.return(),Object(l)!==l))return}finally{if(c)throw i}}return a}}(e,t)||(0,r.Z)(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.")}()}},49270:(e,t,n)=>{"use strict";n.d(t,{d:()=>u});var r=n(5057);var i=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|inert|itemProp|itemScope|itemType|itemID|itemRef|on|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,o=function(e){var t={};return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}((function(e){return i.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91})),l=function(){const e=Array.prototype.slice.call(arguments).filter(Boolean),t={},n=[];e.forEach((e=>{(e?e.split(" "):[]).forEach((e=>{if(e.startsWith("atm_")){const[,n]=e.split("_");t[n]=e}else n.push(e)}))}));const r=[];for(const i in t)Object.prototype.hasOwnProperty.call(t,i)&&r.push(t[i]);return r.push(...n),r.join(" ")},a=e=>e.toUpperCase()===e,s=(e,t)=>{const n={};return Object.keys(e).filter((e=>t=>-1===e.indexOf(t))(t)).forEach((t=>{n[t]=e[t]})),n};var c=(e,t)=>{{if("string"===typeof e||"number"===typeof e&&isFinite(e))return;const n="object"===typeof e?JSON.stringify(e):String(e);console.warn(`An interpolation evaluated to '${n}' in the component '${t}', which is probably a mistake. You should explicitly cast or transform the value to a string.`)}};var u=new Proxy((function(e){return t=>{if(Array.isArray(t))throw new Error('Using the "styled" tag in runtime is not supported. Make sure you have set up the Babel plugin correctly. See https://github.com/callstack/linaria#setup');const n=(n,i)=>{const{as:u=e,class:d}=n,h=function(e,t,n){const r=s(t,n);return"string"!==typeof e||-1!==e.indexOf("-")||a(e[0])||Object.keys(r).forEach((e=>{o(e)||delete r[e]})),r}(u,n,["as","class"]);h.ref=i,h.className=t.atomic?l(t.class,h.className||d):l(h.className||d,t.class);const{vars:f}=t;if(f){const e={};for(const o in f){const r=f[o],i=r[0],l=r[1]||"",a="function"===typeof i?i(n):i;c(a,t.name),e[`--${o}`]=`${a}${l}`}const r=h.style||{},i=Object.keys(r);i.length>0&&i.forEach((t=>{e[t]=r[t]})),h.style=e}return e.__linaria&&e!==u?(h.as=u,r.createElement(e,h)):r.createElement(u,h)},i=r.forwardRef?r.forwardRef(n):e=>{const t=s(e,["innerRef"]);return n(t,e.innerRef)};return i.displayName=t.name,i.__linaria={className:t.class,extends:e},i}}),{get:(e,t)=>e(t)})},8751:(e,t,n)=>{"use strict";n.d(t,{Bn:()=>An});var r=n(49270),i=n(66751),o=n(5057),l=n(56666);function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach((function(t){(0,l.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var c=n(7896),u=n(21371),d=n(2867),h=n(59740),f=n(86522);var p=n(53627);const g=Math.min,m=Math.max,v=Math.round,b=Math.floor,y=e=>({x:e,y:e});function w(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function x(e){return C(e)?(e.nodeName||"").toLowerCase():"#document"}function k(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function S(e){var t;return null==(t=(C(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function C(e){return e instanceof Node||e instanceof k(e).Node}function M(e){return e instanceof Element||e instanceof k(e).Element}function E(e){return e instanceof HTMLElement||e instanceof k(e).HTMLElement}function R(e){return"undefined"!==typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof k(e).ShadowRoot)}function O(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=P(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(i)}function I(){return!("undefined"===typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function T(e){return["html","body","#document"].includes(x(e))}function P(e){return k(e).getComputedStyle(e)}function D(e){if("html"===x(e))return e;const t=e.assignedSlot||e.parentNode||R(e)&&e.host||S(e);return R(t)?t.host:t}function H(e){const t=D(e);return T(t)?e.ownerDocument?e.ownerDocument.body:e.body:E(t)&&O(t)?t:H(t)}function L(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const i=H(e),o=i===(null==(r=e.ownerDocument)?void 0:r.body),l=k(i);return o?t.concat(l,l.visualViewport||[],O(i)?i:[],l.frameElement&&n?L(l.frameElement):[]):t.concat(i,L(i,[],n))}function F(e){const t=P(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=E(e),o=i?e.offsetWidth:n,l=i?e.offsetHeight:r,a=v(n)!==o||v(r)!==l;return a&&(n=o,r=l),{width:n,height:r,$:a}}function z(e){return M(e)?e:e.contextElement}function A(e){const t=z(e);if(!E(t))return y(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:o}=F(t);let l=(o?v(n.width):n.width)/r,a=(o?v(n.height):n.height)/i;return l&&Number.isFinite(l)||(l=1),a&&Number.isFinite(a)||(a=1),{x:l,y:a}}const _=y(0);function V(e){const t=k(e);return I()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:_}function $(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const i=e.getBoundingClientRect(),o=z(e);let l=y(1);t&&(r?M(r)&&(l=A(r)):l=A(e));const a=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==k(e))&&t}(o,n,r)?V(o):y(0);let s=(i.left+a.x)/l.x,c=(i.top+a.y)/l.y,u=i.width/l.x,d=i.height/l.y;if(o){const e=k(o),t=r&&M(r)?k(r):r;let n=e.frameElement;for(;n&&r&&t!==e;){const e=A(n),t=n.getBoundingClientRect(),r=P(n),i=t.left+(n.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(n.clientTop+parseFloat(r.paddingTop))*e.y;s*=e.x,c*=e.y,u*=e.x,d*=e.y,s+=i,c+=o,n=k(n).frameElement}}return w({width:u,height:d,x:s,y:c})}function N(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:l="function"===typeof ResizeObserver,layoutShift:a="function"===typeof IntersectionObserver,animationFrame:s=!1}=r,c=z(e),u=i||o?[...c?L(c):[],...L(t)]:[];u.forEach((e=>{i&&e.addEventListener("scroll",n,{passive:!0}),o&&e.addEventListener("resize",n)}));const d=c&&a?function(e,t){let n,r=null;const i=S(e);function o(){clearTimeout(n),r&&r.disconnect(),r=null}return function l(a,s){void 0===a&&(a=!1),void 0===s&&(s=1),o();const{left:c,top:u,width:d,height:h}=e.getBoundingClientRect();if(a||t(),!d||!h)return;const f={rootMargin:-b(u)+"px "+-b(i.clientWidth-(c+d))+"px "+-b(i.clientHeight-(u+h))+"px "+-b(c)+"px",threshold:m(0,g(1,s))||1};let p=!0;function v(e){const t=e[0].intersectionRatio;if(t!==s){if(!p)return l();t?l(!1,t):n=setTimeout((()=>{l(!1,1e-7)}),100)}p=!1}try{r=new IntersectionObserver(v,{...f,root:i.ownerDocument})}catch(y){r=new IntersectionObserver(v,f)}r.observe(e)}(!0),o}(c,n):null;let h,f=-1,p=null;l&&(p=new ResizeObserver((e=>{let[r]=e;r&&r.target===c&&p&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame((()=>{p&&p.observe(t)}))),n()})),c&&!s&&p.observe(c),p.observe(t));let v=s?$(e):null;return s&&function t(){const r=$(e);!v||r.x===v.x&&r.y===v.y&&r.width===v.width&&r.height===v.height||n();v=r,h=requestAnimationFrame(t)}(),n(),()=>{u.forEach((e=>{i&&e.removeEventListener("scroll",n),o&&e.removeEventListener("resize",n)})),d&&d(),p&&p.disconnect(),p=null,s&&cancelAnimationFrame(h)}}const B=o.useLayoutEffect;var W=["className","clearValue","cx","getStyles","getClassNames","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"],j=function(){};function Z(e,t){return t?"-"===t[0]?e+t:e+"__"+t:e}function U(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];var o=[].concat(r);if(t&&e)for(var l in t)t.hasOwnProperty(l)&&t[l]&&o.push("".concat(Z(e,l)));return o.filter((function(e){return e})).map((function(e){return String(e).trim()})).join(" ")}var X=function(e){return t=e,Array.isArray(t)?e.filter(Boolean):"object"===(0,f.Z)(e)&&null!==e?[e]:[];var t},Y=function(e){return e.className,e.clearValue,e.cx,e.getStyles,e.getClassNames,e.getValue,e.hasValue,e.isMulti,e.isRtl,e.options,e.selectOption,e.selectProps,e.setValue,e.theme,s({},(0,h.Z)(e,W))},K=function(e,t,n){var r=e.cx,i=e.getStyles,o=e.getClassNames,l=e.className;return{css:i(t,e),className:r(null!==n&&void 0!==n?n:{},o(t,e),l)}};function G(e){return[document.documentElement,document.body,window].indexOf(e)>-1}function q(e){return G(e)?window.pageYOffset:e.scrollTop}function Q(e,t){G(e)?window.scrollTo(0,t):e.scrollTop=t}function J(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:200,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:j,i=q(e),o=t-i,l=0;!function t(){var a,s=o*((a=(a=l+=10)/n-1)*a*a+1)+i;Q(e,s),l<n?window.requestAnimationFrame(t):r(e)}()}function ee(e,t){var n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),i=t.offsetHeight/3;r.bottom+i>n.bottom?Q(e,Math.min(t.offsetTop+t.clientHeight-e.offsetHeight+i,e.scrollHeight)):r.top-i<n.top&&Q(e,Math.max(t.offsetTop-i,0))}function te(){try{return document.createEvent("TouchEvent"),!0}catch(e){return!1}}var ne=!1,re={get passive(){return ne=!0}},ie="undefined"!==typeof window?window:{};ie.addEventListener&&ie.removeEventListener&&(ie.addEventListener("p",j,re),ie.removeEventListener("p",j,!1));var oe=ne;function le(e){return null!=e}function ae(e,t,n){return e?t:n}var se=["children","innerProps"],ce=["children","innerProps"];function ue(e){var t=e.maxHeight,n=e.menuEl,r=e.minHeight,i=e.placement,o=e.shouldScroll,l=e.isFixedPosition,a=e.controlHeight,s=function(e){var t=getComputedStyle(e),n="absolute"===t.position,r=/(auto|scroll)/;if("fixed"===t.position)return document.documentElement;for(var i=e;i=i.parentElement;)if(t=getComputedStyle(i),(!n||"static"!==t.position)&&r.test(t.overflow+t.overflowY+t.overflowX))return i;return document.documentElement}(n),c={placement:"bottom",maxHeight:t};if(!n||!n.offsetParent)return c;var u,d=s.getBoundingClientRect().height,h=n.getBoundingClientRect(),f=h.bottom,p=h.height,g=h.top,m=n.offsetParent.getBoundingClientRect().top,v=l?window.innerHeight:G(u=s)?window.innerHeight:u.clientHeight,b=q(s),y=parseInt(getComputedStyle(n).marginBottom,10),w=parseInt(getComputedStyle(n).marginTop,10),x=m-w,k=v-g,S=x+b,C=d-b-g,M=f-v+b+y,E=b+g-w,R=160;switch(i){case"auto":case"bottom":if(k>=p)return{placement:"bottom",maxHeight:t};if(C>=p&&!l)return o&&J(s,M,R),{placement:"bottom",maxHeight:t};if(!l&&C>=r||l&&k>=r)return o&&J(s,M,R),{placement:"bottom",maxHeight:l?k-y:C-y};if("auto"===i||l){var O=t,I=l?x:S;return I>=r&&(O=Math.min(I-y-a,t)),{placement:"top",maxHeight:O}}if("bottom"===i)return o&&Q(s,M),{placement:"bottom",maxHeight:t};break;case"top":if(x>=p)return{placement:"top",maxHeight:t};if(S>=p&&!l)return o&&J(s,E,R),{placement:"top",maxHeight:t};if(!l&&S>=r||l&&x>=r){var T=t;return(!l&&S>=r||l&&x>=r)&&(T=l?x-w:S-w),o&&J(s,E,R),{placement:"top",maxHeight:T}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'.concat(i,'".'))}return c}var de,he=function(e){return"auto"===e?"bottom":e},fe=(0,o.createContext)(null),pe=function(e){var t=e.children,n=e.minMenuHeight,r=e.maxMenuHeight,i=e.menuPlacement,l=e.menuPosition,a=e.menuShouldScrollIntoView,c=e.theme,u=((0,o.useContext)(fe)||{}).setPortalPlacement,h=(0,o.useRef)(null),f=(0,o.useState)(r),p=(0,d.Z)(f,2),g=p[0],m=p[1],v=(0,o.useState)(null),b=(0,d.Z)(v,2),y=b[0],w=b[1],x=c.spacing.controlHeight;return B((function(){var e=h.current;if(e){var t="fixed"===l,o=ue({maxHeight:r,menuEl:e,minHeight:n,placement:i,shouldScroll:a&&!t,isFixedPosition:t,controlHeight:x});m(o.maxHeight),w(o.placement),null===u||void 0===u||u(o.placement)}}),[r,i,l,a,n,u,x]),t({ref:h,placerProps:s(s({},e),{},{placement:y||he(i),maxHeight:g})})},ge=function(e){var t=e.children,n=e.innerRef,r=e.innerProps;return(0,u.tZ)("div",(0,c.Z)({},K(e,"menu",{menu:!0}),{ref:n},r),t)},me=function(e,t){var n=e.theme,r=n.spacing.baseUnit,i=n.colors;return s({textAlign:"center"},t?{}:{color:i.neutral40,padding:"".concat(2*r,"px ").concat(3*r,"px")})},ve=me,be=me,ye=["size"],we=["innerProps","isRtl","size"];var xe,ke,Se={name:"8mmkcg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0"},Ce=function(e){var t=e.size,n=(0,h.Z)(e,ye);return(0,u.tZ)("svg",(0,c.Z)({height:t,width:t,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:Se},n))},Me=function(e){return(0,u.tZ)(Ce,(0,c.Z)({size:20},e),(0,u.tZ)("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},Ee=function(e){return(0,u.tZ)(Ce,(0,c.Z)({size:20},e),(0,u.tZ)("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))},Re=function(e,t){var n=e.isFocused,r=e.theme,i=r.spacing.baseUnit,o=r.colors;return s({label:"indicatorContainer",display:"flex",transition:"color 150ms"},t?{}:{color:n?o.neutral60:o.neutral20,padding:2*i,":hover":{color:n?o.neutral80:o.neutral40}})},Oe=Re,Ie=Re,Te=(0,u.F4)(de||(xe=["\n 0%, 80%, 100% { opacity: 0; }\n 40% { opacity: 1; }\n"],ke||(ke=xe.slice(0)),de=Object.freeze(Object.defineProperties(xe,{raw:{value:Object.freeze(ke)}})))),Pe=function(e){var t=e.delay,n=e.offset;return(0,u.tZ)("span",{css:(0,u.iv)({animation:"".concat(Te," 1s ease-in-out ").concat(t,"ms infinite;"),backgroundColor:"currentColor",borderRadius:"1em",display:"inline-block",marginLeft:n?"1em":void 0,height:"1em",verticalAlign:"top",width:"1em"},"","","","")})},De=function(e){var t=e.children,n=e.isDisabled,r=e.isFocused,i=e.innerRef,o=e.innerProps,l=e.menuIsOpen;return(0,u.tZ)("div",(0,c.Z)({ref:i},K(e,"control",{control:!0,"control--is-disabled":n,"control--is-focused":r,"control--menu-is-open":l}),o,{"aria-disabled":n||void 0}),t)},He=["data"],Le=function(e){var t=e.children,n=e.cx,r=e.getStyles,i=e.getClassNames,o=e.Heading,l=e.headingProps,a=e.innerProps,s=e.label,d=e.theme,h=e.selectProps;return(0,u.tZ)("div",(0,c.Z)({},K(e,"group",{group:!0}),a),(0,u.tZ)(o,(0,c.Z)({},l,{selectProps:h,theme:d,getStyles:r,getClassNames:i,cx:n}),s),(0,u.tZ)("div",null,t))},Fe=["innerRef","isDisabled","isHidden","inputClassName"],ze={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},Ae={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content","&:after":s({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},ze)},_e=function(e){return s({label:"input",color:"inherit",background:0,opacity:e?0:1,width:"100%"},ze)},Ve=function(e){var t=e.children,n=e.innerProps;return(0,u.tZ)("div",n,t)};var $e=function(e){var t=e.children,n=e.components,r=e.data,i=e.innerProps,o=e.isDisabled,l=e.removeProps,a=e.selectProps,c=n.Container,d=n.Label,h=n.Remove;return(0,u.tZ)(c,{data:r,innerProps:s(s({},K(e,"multiValue",{"multi-value":!0,"multi-value--is-disabled":o})),i),selectProps:a},(0,u.tZ)(d,{data:r,innerProps:s({},K(e,"multiValueLabel",{"multi-value__label":!0})),selectProps:a},t),(0,u.tZ)(h,{data:r,innerProps:s(s({},K(e,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(t||"option")},l),selectProps:a}))},Ne={ClearIndicator:function(e){var t=e.children,n=e.innerProps;return(0,u.tZ)("div",(0,c.Z)({},K(e,"clearIndicator",{indicator:!0,"clear-indicator":!0}),n),t||(0,u.tZ)(Me,null))},Control:De,DropdownIndicator:function(e){var t=e.children,n=e.innerProps;return(0,u.tZ)("div",(0,c.Z)({},K(e,"dropdownIndicator",{indicator:!0,"dropdown-indicator":!0}),n),t||(0,u.tZ)(Ee,null))},DownChevron:Ee,CrossIcon:Me,Group:Le,GroupHeading:function(e){var t=Y(e);t.data;var n=(0,h.Z)(t,He);return(0,u.tZ)("div",(0,c.Z)({},K(e,"groupHeading",{"group-heading":!0}),n))},IndicatorsContainer:function(e){var t=e.children,n=e.innerProps;return(0,u.tZ)("div",(0,c.Z)({},K(e,"indicatorsContainer",{indicators:!0}),n),t)},IndicatorSeparator:function(e){var t=e.innerProps;return(0,u.tZ)("span",(0,c.Z)({},t,K(e,"indicatorSeparator",{"indicator-separator":!0})))},Input:function(e){var t=e.cx,n=e.value,r=Y(e),i=r.innerRef,o=r.isDisabled,l=r.isHidden,a=r.inputClassName,s=(0,h.Z)(r,Fe);return(0,u.tZ)("div",(0,c.Z)({},K(e,"input",{"input-container":!0}),{"data-value":n||""}),(0,u.tZ)("input",(0,c.Z)({className:t({input:!0},a),ref:i,style:_e(l),disabled:o},s)))},LoadingIndicator:function(e){var t=e.innerProps,n=e.isRtl,r=e.size,i=void 0===r?4:r,o=(0,h.Z)(e,we);return(0,u.tZ)("div",(0,c.Z)({},K(s(s({},o),{},{innerProps:t,isRtl:n,size:i}),"loadingIndicator",{indicator:!0,"loading-indicator":!0}),t),(0,u.tZ)(Pe,{delay:0,offset:n}),(0,u.tZ)(Pe,{delay:160,offset:!0}),(0,u.tZ)(Pe,{delay:320,offset:!n}))},Menu:ge,MenuList:function(e){var t=e.children,n=e.innerProps,r=e.innerRef,i=e.isMulti;return(0,u.tZ)("div",(0,c.Z)({},K(e,"menuList",{"menu-list":!0,"menu-list--is-multi":i}),{ref:r},n),t)},MenuPortal:function(e){var t=e.appendTo,n=e.children,r=e.controlElement,i=e.innerProps,l=e.menuPlacement,a=e.menuPosition,h=(0,o.useRef)(null),f=(0,o.useRef)(null),g=(0,o.useState)(he(l)),m=(0,d.Z)(g,2),v=m[0],b=m[1],y=(0,o.useMemo)((function(){return{setPortalPlacement:b}}),[]),w=(0,o.useState)(null),x=(0,d.Z)(w,2),k=x[0],S=x[1],C=(0,o.useCallback)((function(){if(r){var e=function(e){var t=e.getBoundingClientRect();return{bottom:t.bottom,height:t.height,left:t.left,right:t.right,top:t.top,width:t.width}}(r),t="fixed"===a?0:window.pageYOffset,n=e[v]+t;n===(null===k||void 0===k?void 0:k.offset)&&e.left===(null===k||void 0===k?void 0:k.rect.left)&&e.width===(null===k||void 0===k?void 0:k.rect.width)||S({offset:n,rect:e})}}),[r,a,v,null===k||void 0===k?void 0:k.offset,null===k||void 0===k?void 0:k.rect.left,null===k||void 0===k?void 0:k.rect.width]);B((function(){C()}),[C]);var M=(0,o.useCallback)((function(){"function"===typeof f.current&&(f.current(),f.current=null),r&&h.current&&(f.current=N(r,h.current,C,{elementResize:"ResizeObserver"in window}))}),[r,C]);B((function(){M()}),[M]);var E=(0,o.useCallback)((function(e){h.current=e,M()}),[M]);if(!t&&"fixed"!==a||!k)return null;var R=(0,u.tZ)("div",(0,c.Z)({ref:E},K(s(s({},e),{},{offset:k.offset,position:a,rect:k.rect}),"menuPortal",{"menu-portal":!0}),i),n);return(0,u.tZ)(fe.Provider,{value:y},t?(0,p.createPortal)(R,t):R)},LoadingMessage:function(e){var t=e.children,n=void 0===t?"Loading...":t,r=e.innerProps,i=(0,h.Z)(e,ce);return(0,u.tZ)("div",(0,c.Z)({},K(s(s({},i),{},{children:n,innerProps:r}),"loadingMessage",{"menu-notice":!0,"menu-notice--loading":!0}),r),n)},NoOptionsMessage:function(e){var t=e.children,n=void 0===t?"No options":t,r=e.innerProps,i=(0,h.Z)(e,se);return(0,u.tZ)("div",(0,c.Z)({},K(s(s({},i),{},{children:n,innerProps:r}),"noOptionsMessage",{"menu-notice":!0,"menu-notice--no-options":!0}),r),n)},MultiValue:$e,MultiValueContainer:Ve,MultiValueLabel:Ve,MultiValueRemove:function(e){var t=e.children,n=e.innerProps;return(0,u.tZ)("div",(0,c.Z)({role:"button"},n),t||(0,u.tZ)(Me,{size:14}))},Option:function(e){var t=e.children,n=e.isDisabled,r=e.isFocused,i=e.isSelected,o=e.innerRef,l=e.innerProps;return(0,u.tZ)("div",(0,c.Z)({},K(e,"option",{option:!0,"option--is-disabled":n,"option--is-focused":r,"option--is-selected":i}),{ref:o,"aria-disabled":n},l),t)},Placeholder:function(e){var t=e.children,n=e.innerProps;return(0,u.tZ)("div",(0,c.Z)({},K(e,"placeholder",{placeholder:!0}),n),t)},SelectContainer:function(e){var t=e.children,n=e.innerProps,r=e.isDisabled,i=e.isRtl;return(0,u.tZ)("div",(0,c.Z)({},K(e,"container",{"--is-disabled":r,"--is-rtl":i}),n),t)},SingleValue:function(e){var t=e.children,n=e.isDisabled,r=e.innerProps;return(0,u.tZ)("div",(0,c.Z)({},K(e,"singleValue",{"single-value":!0,"single-value--is-disabled":n}),r),t)},ValueContainer:function(e){var t=e.children,n=e.innerProps,r=e.isMulti,i=e.hasValue;return(0,u.tZ)("div",(0,c.Z)({},K(e,"valueContainer",{"value-container":!0,"value-container--is-multi":r,"value-container--has-value":i}),n),t)}},Be=["defaultInputValue","defaultMenuIsOpen","defaultValue","inputValue","menuIsOpen","onChange","onInputChange","onMenuClose","onMenuOpen","value"];var We=n(9249),je=n(87371),Ze=n(45754),Ue=n(75181),Xe=n(38777),Ye=Number.isNaN||function(e){return"number"===typeof e&&e!==e};function Ke(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(r=e[n],i=t[n],!(r===i||Ye(r)&&Ye(i)))return!1;var r,i;return!0}for(var Ge={name:"7pg0cj-a11yText",styles:"label:a11yText;z-index:9999;border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;width:1px;position:absolute;overflow:hidden;padding:0;white-space:nowrap"},qe=function(e){return(0,u.tZ)("span",(0,c.Z)({css:Ge},e))},Qe={guidance:function(e){var t=e.isSearchable,n=e.isMulti,r=e.tabSelectsValue,i=e.context,o=e.isInitialFocus;switch(i){case"menu":return"Use Up and Down to choose options, press Enter to select the currently focused option, press Escape to exit the menu".concat(r?", press Tab to select the option and exit the menu":"",".");case"input":return o?"".concat(e["aria-label"]||"Select"," is focused ").concat(t?",type to refine list":"",", press Down to open the menu, ").concat(n?" press left to focus selected values":""):"";case"value":return"Use left and right to toggle between focused values, press Backspace to remove the currently focused value";default:return""}},onChange:function(e){var t=e.action,n=e.label,r=void 0===n?"":n,i=e.labels,o=e.isDisabled;switch(t){case"deselect-option":case"pop-value":case"remove-value":return"option ".concat(r,", deselected.");case"clear":return"All selected options have been cleared.";case"initial-input-focus":return"option".concat(i.length>1?"s":""," ").concat(i.join(","),", selected.");case"select-option":return"option ".concat(r,o?" is disabled. Select another option.":", selected.");default:return""}},onFocus:function(e){var t=e.context,n=e.focused,r=e.options,i=e.label,o=void 0===i?"":i,l=e.selectValue,a=e.isDisabled,s=e.isSelected,c=e.isAppleDevice,u=function(e,t){return e&&e.length?"".concat(e.indexOf(t)+1," of ").concat(e.length):""};if("value"===t&&l)return"value ".concat(o," focused, ").concat(u(l,n),".");if("menu"===t&&c){var d=a?" disabled":"",h="".concat(s?" selected":"").concat(d);return"".concat(o).concat(h,", ").concat(u(r,n),".")}return""},onFilter:function(e){var t=e.inputValue,n=e.resultsMessage;return"".concat(n).concat(t?" for search term "+t:"",".")}},Je=function(e){var t=e.ariaSelection,n=e.focusedOption,r=e.focusedValue,i=e.focusableOptions,l=e.isFocused,a=e.selectValue,c=e.selectProps,d=e.id,h=e.isAppleDevice,f=c.ariaLiveMessages,p=c.getOptionLabel,g=c.inputValue,m=c.isMulti,v=c.isOptionDisabled,b=c.isSearchable,y=c.menuIsOpen,w=c.options,x=c.screenReaderStatus,k=c.tabSelectsValue,S=c.isLoading,C=c["aria-label"],M=c["aria-live"],E=(0,o.useMemo)((function(){return s(s({},Qe),f||{})}),[f]),R=(0,o.useMemo)((function(){var e,n="";if(t&&E.onChange){var r=t.option,i=t.options,o=t.removedValue,l=t.removedValues,c=t.value,u=o||r||(e=c,Array.isArray(e)?null:e),d=u?p(u):"",h=i||l||void 0,f=h?h.map(p):[],g=s({isDisabled:u&&v(u,a),label:d,labels:f},t);n=E.onChange(g)}return n}),[t,E,v,a,p]),O=(0,o.useMemo)((function(){var e="",t=n||r,o=!!(n&&a&&a.includes(n));if(t&&E.onFocus){var l={focused:t,label:p(t),isDisabled:v(t,a),isSelected:o,options:i,context:t===n?"menu":"value",selectValue:a,isAppleDevice:h};e=E.onFocus(l)}return e}),[n,r,p,v,E,i,a,h]),I=(0,o.useMemo)((function(){var e="";if(y&&w.length&&!S&&E.onFilter){var t=x({count:i.length});e=E.onFilter({inputValue:g,resultsMessage:t})}return e}),[i,g,y,E,w,x,S]),T="initial-input-focus"===(null===t||void 0===t?void 0:t.action),P=(0,o.useMemo)((function(){var e="";if(E.guidance){var t=r?"value":y?"menu":"input";e=E.guidance({"aria-label":C,context:t,isDisabled:n&&v(n,a),isMulti:m,isSearchable:b,tabSelectsValue:k,isInitialFocus:T})}return e}),[C,n,r,m,v,b,y,E,a,k,T]),D=(0,u.tZ)(o.Fragment,null,(0,u.tZ)("span",{id:"aria-selection"},R),(0,u.tZ)("span",{id:"aria-focused"},O),(0,u.tZ)("span",{id:"aria-results"},I),(0,u.tZ)("span",{id:"aria-guidance"},P));return(0,u.tZ)(o.Fragment,null,(0,u.tZ)(qe,{id:d},T&&D),(0,u.tZ)(qe,{"aria-live":M,"aria-atomic":"false","aria-relevant":"additions text",role:"log"},l&&!T&&D))},et=[{base:"A",letters:"A\u24b6\uff21\xc0\xc1\xc2\u1ea6\u1ea4\u1eaa\u1ea8\xc3\u0100\u0102\u1eb0\u1eae\u1eb4\u1eb2\u0226\u01e0\xc4\u01de\u1ea2\xc5\u01fa\u01cd\u0200\u0202\u1ea0\u1eac\u1eb6\u1e00\u0104\u023a\u2c6f"},{base:"AA",letters:"\ua732"},{base:"AE",letters:"\xc6\u01fc\u01e2"},{base:"AO",letters:"\ua734"},{base:"AU",letters:"\ua736"},{base:"AV",letters:"\ua738\ua73a"},{base:"AY",letters:"\ua73c"},{base:"B",letters:"B\u24b7\uff22\u1e02\u1e04\u1e06\u0243\u0182\u0181"},{base:"C",letters:"C\u24b8\uff23\u0106\u0108\u010a\u010c\xc7\u1e08\u0187\u023b\ua73e"},{base:"D",letters:"D\u24b9\uff24\u1e0a\u010e\u1e0c\u1e10\u1e12\u1e0e\u0110\u018b\u018a\u0189\ua779"},{base:"DZ",letters:"\u01f1\u01c4"},{base:"Dz",letters:"\u01f2\u01c5"},{base:"E",letters:"E\u24ba\uff25\xc8\xc9\xca\u1ec0\u1ebe\u1ec4\u1ec2\u1ebc\u0112\u1e14\u1e16\u0114\u0116\xcb\u1eba\u011a\u0204\u0206\u1eb8\u1ec6\u0228\u1e1c\u0118\u1e18\u1e1a\u0190\u018e"},{base:"F",letters:"F\u24bb\uff26\u1e1e\u0191\ua77b"},{base:"G",letters:"G\u24bc\uff27\u01f4\u011c\u1e20\u011e\u0120\u01e6\u0122\u01e4\u0193\ua7a0\ua77d\ua77e"},{base:"H",letters:"H\u24bd\uff28\u0124\u1e22\u1e26\u021e\u1e24\u1e28\u1e2a\u0126\u2c67\u2c75\ua78d"},{base:"I",letters:"I\u24be\uff29\xcc\xcd\xce\u0128\u012a\u012c\u0130\xcf\u1e2e\u1ec8\u01cf\u0208\u020a\u1eca\u012e\u1e2c\u0197"},{base:"J",letters:"J\u24bf\uff2a\u0134\u0248"},{base:"K",letters:"K\u24c0\uff2b\u1e30\u01e8\u1e32\u0136\u1e34\u0198\u2c69\ua740\ua742\ua744\ua7a2"},{base:"L",letters:"L\u24c1\uff2c\u013f\u0139\u013d\u1e36\u1e38\u013b\u1e3c\u1e3a\u0141\u023d\u2c62\u2c60\ua748\ua746\ua780"},{base:"LJ",letters:"\u01c7"},{base:"Lj",letters:"\u01c8"},{base:"M",letters:"M\u24c2\uff2d\u1e3e\u1e40\u1e42\u2c6e\u019c"},{base:"N",letters:"N\u24c3\uff2e\u01f8\u0143\xd1\u1e44\u0147\u1e46\u0145\u1e4a\u1e48\u0220\u019d\ua790\ua7a4"},{base:"NJ",letters:"\u01ca"},{base:"Nj",letters:"\u01cb"},{base:"O",letters:"O\u24c4\uff2f\xd2\xd3\xd4\u1ed2\u1ed0\u1ed6\u1ed4\xd5\u1e4c\u022c\u1e4e\u014c\u1e50\u1e52\u014e\u022e\u0230\xd6\u022a\u1ece\u0150\u01d1\u020c\u020e\u01a0\u1edc\u1eda\u1ee0\u1ede\u1ee2\u1ecc\u1ed8\u01ea\u01ec\xd8\u01fe\u0186\u019f\ua74a\ua74c"},{base:"OI",letters:"\u01a2"},{base:"OO",letters:"\ua74e"},{base:"OU",letters:"\u0222"},{base:"P",letters:"P\u24c5\uff30\u1e54\u1e56\u01a4\u2c63\ua750\ua752\ua754"},{base:"Q",letters:"Q\u24c6\uff31\ua756\ua758\u024a"},{base:"R",letters:"R\u24c7\uff32\u0154\u1e58\u0158\u0210\u0212\u1e5a\u1e5c\u0156\u1e5e\u024c\u2c64\ua75a\ua7a6\ua782"},{base:"S",letters:"S\u24c8\uff33\u1e9e\u015a\u1e64\u015c\u1e60\u0160\u1e66\u1e62\u1e68\u0218\u015e\u2c7e\ua7a8\ua784"},{base:"T",letters:"T\u24c9\uff34\u1e6a\u0164\u1e6c\u021a\u0162\u1e70\u1e6e\u0166\u01ac\u01ae\u023e\ua786"},{base:"TZ",letters:"\ua728"},{base:"U",letters:"U\u24ca\uff35\xd9\xda\xdb\u0168\u1e78\u016a\u1e7a\u016c\xdc\u01db\u01d7\u01d5\u01d9\u1ee6\u016e\u0170\u01d3\u0214\u0216\u01af\u1eea\u1ee8\u1eee\u1eec\u1ef0\u1ee4\u1e72\u0172\u1e76\u1e74\u0244"},{base:"V",letters:"V\u24cb\uff36\u1e7c\u1e7e\u01b2\ua75e\u0245"},{base:"VY",letters:"\ua760"},{base:"W",letters:"W\u24cc\uff37\u1e80\u1e82\u0174\u1e86\u1e84\u1e88\u2c72"},{base:"X",letters:"X\u24cd\uff38\u1e8a\u1e8c"},{base:"Y",letters:"Y\u24ce\uff39\u1ef2\xdd\u0176\u1ef8\u0232\u1e8e\u0178\u1ef6\u1ef4\u01b3\u024e\u1efe"},{base:"Z",letters:"Z\u24cf\uff3a\u0179\u1e90\u017b\u017d\u1e92\u1e94\u01b5\u0224\u2c7f\u2c6b\ua762"},{base:"a",letters:"a\u24d0\uff41\u1e9a\xe0\xe1\xe2\u1ea7\u1ea5\u1eab\u1ea9\xe3\u0101\u0103\u1eb1\u1eaf\u1eb5\u1eb3\u0227\u01e1\xe4\u01df\u1ea3\xe5\u01fb\u01ce\u0201\u0203\u1ea1\u1ead\u1eb7\u1e01\u0105\u2c65\u0250"},{base:"aa",letters:"\ua733"},{base:"ae",letters:"\xe6\u01fd\u01e3"},{base:"ao",letters:"\ua735"},{base:"au",letters:"\ua737"},{base:"av",letters:"\ua739\ua73b"},{base:"ay",letters:"\ua73d"},{base:"b",letters:"b\u24d1\uff42\u1e03\u1e05\u1e07\u0180\u0183\u0253"},{base:"c",letters:"c\u24d2\uff43\u0107\u0109\u010b\u010d\xe7\u1e09\u0188\u023c\ua73f\u2184"},{base:"d",letters:"d\u24d3\uff44\u1e0b\u010f\u1e0d\u1e11\u1e13\u1e0f\u0111\u018c\u0256\u0257\ua77a"},{base:"dz",letters:"\u01f3\u01c6"},{base:"e",letters:"e\u24d4\uff45\xe8\xe9\xea\u1ec1\u1ebf\u1ec5\u1ec3\u1ebd\u0113\u1e15\u1e17\u0115\u0117\xeb\u1ebb\u011b\u0205\u0207\u1eb9\u1ec7\u0229\u1e1d\u0119\u1e19\u1e1b\u0247\u025b\u01dd"},{base:"f",letters:"f\u24d5\uff46\u1e1f\u0192\ua77c"},{base:"g",letters:"g\u24d6\uff47\u01f5\u011d\u1e21\u011f\u0121\u01e7\u0123\u01e5\u0260\ua7a1\u1d79\ua77f"},{base:"h",letters:"h\u24d7\uff48\u0125\u1e23\u1e27\u021f\u1e25\u1e29\u1e2b\u1e96\u0127\u2c68\u2c76\u0265"},{base:"hv",letters:"\u0195"},{base:"i",letters:"i\u24d8\uff49\xec\xed\xee\u0129\u012b\u012d\xef\u1e2f\u1ec9\u01d0\u0209\u020b\u1ecb\u012f\u1e2d\u0268\u0131"},{base:"j",letters:"j\u24d9\uff4a\u0135\u01f0\u0249"},{base:"k",letters:"k\u24da\uff4b\u1e31\u01e9\u1e33\u0137\u1e35\u0199\u2c6a\ua741\ua743\ua745\ua7a3"},{base:"l",letters:"l\u24db\uff4c\u0140\u013a\u013e\u1e37\u1e39\u013c\u1e3d\u1e3b\u017f\u0142\u019a\u026b\u2c61\ua749\ua781\ua747"},{base:"lj",letters:"\u01c9"},{base:"m",letters:"m\u24dc\uff4d\u1e3f\u1e41\u1e43\u0271\u026f"},{base:"n",letters:"n\u24dd\uff4e\u01f9\u0144\xf1\u1e45\u0148\u1e47\u0146\u1e4b\u1e49\u019e\u0272\u0149\ua791\ua7a5"},{base:"nj",letters:"\u01cc"},{base:"o",letters:"o\u24de\uff4f\xf2\xf3\xf4\u1ed3\u1ed1\u1ed7\u1ed5\xf5\u1e4d\u022d\u1e4f\u014d\u1e51\u1e53\u014f\u022f\u0231\xf6\u022b\u1ecf\u0151\u01d2\u020d\u020f\u01a1\u1edd\u1edb\u1ee1\u1edf\u1ee3\u1ecd\u1ed9\u01eb\u01ed\xf8\u01ff\u0254\ua74b\ua74d\u0275"},{base:"oi",letters:"\u01a3"},{base:"ou",letters:"\u0223"},{base:"oo",letters:"\ua74f"},{base:"p",letters:"p\u24df\uff50\u1e55\u1e57\u01a5\u1d7d\ua751\ua753\ua755"},{base:"q",letters:"q\u24e0\uff51\u024b\ua757\ua759"},{base:"r",letters:"r\u24e1\uff52\u0155\u1e59\u0159\u0211\u0213\u1e5b\u1e5d\u0157\u1e5f\u024d\u027d\ua75b\ua7a7\ua783"},{base:"s",letters:"s\u24e2\uff53\xdf\u015b\u1e65\u015d\u1e61\u0161\u1e67\u1e63\u1e69\u0219\u015f\u023f\ua7a9\ua785\u1e9b"},{base:"t",letters:"t\u24e3\uff54\u1e6b\u1e97\u0165\u1e6d\u021b\u0163\u1e71\u1e6f\u0167\u01ad\u0288\u2c66\ua787"},{base:"tz",letters:"\ua729"},{base:"u",letters:"u\u24e4\uff55\xf9\xfa\xfb\u0169\u1e79\u016b\u1e7b\u016d\xfc\u01dc\u01d8\u01d6\u01da\u1ee7\u016f\u0171\u01d4\u0215\u0217\u01b0\u1eeb\u1ee9\u1eef\u1eed\u1ef1\u1ee5\u1e73\u0173\u1e77\u1e75\u0289"},{base:"v",letters:"v\u24e5\uff56\u1e7d\u1e7f\u028b\ua75f\u028c"},{base:"vy",letters:"\ua761"},{base:"w",letters:"w\u24e6\uff57\u1e81\u1e83\u0175\u1e87\u1e85\u1e98\u1e89\u2c73"},{base:"x",letters:"x\u24e7\uff58\u1e8b\u1e8d"},{base:"y",letters:"y\u24e8\uff59\u1ef3\xfd\u0177\u1ef9\u0233\u1e8f\xff\u1ef7\u1e99\u1ef5\u01b4\u024f\u1eff"},{base:"z",letters:"z\u24e9\uff5a\u017a\u1e91\u017c\u017e\u1e93\u1e95\u01b6\u0225\u0240\u2c6c\ua763"}],tt=new RegExp("["+et.map((function(e){return e.letters})).join("")+"]","g"),nt={},rt=0;rt<et.length;rt++)for(var it=et[rt],ot=0;ot<it.letters.length;ot++)nt[it.letters[ot]]=it.base;var lt=function(e){return e.replace(tt,(function(e){return nt[e]}))},at=function(e,t){void 0===t&&(t=Ke);var n=null;function r(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];if(n&&n.lastThis===this&&t(r,n.lastArgs))return n.lastResult;var o=e.apply(this,r);return n={lastResult:o,lastArgs:r,lastThis:this},o}return r.clear=function(){n=null},r}(lt),st=function(e){return e.replace(/^\s+|\s+$/g,"")},ct=function(e){return"".concat(e.label," ").concat(e.value)},ut=["innerRef"];function dt(e){var t=e.innerRef,n=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];var i=Object.entries(e).filter((function(e){var t=(0,d.Z)(e,1)[0];return!n.includes(t)}));return i.reduce((function(e,t){var n=(0,d.Z)(t,2),r=n[0],i=n[1];return e[r]=i,e}),{})}((0,h.Z)(e,ut),"onExited","in","enter","exit","appear");return(0,u.tZ)("input",(0,c.Z)({ref:t},n,{css:(0,u.iv)({label:"dummyInput",background:0,border:0,caretColor:"transparent",fontSize:"inherit",gridArea:"1 / 1 / 2 / 3",outline:0,padding:0,width:1,color:"transparent",left:-100,opacity:0,position:"relative",transform:"scale(.01)"},"","","","")}))}var ht=function(e){e.cancelable&&e.preventDefault(),e.stopPropagation()};var ft=["boxSizing","height","overflow","paddingRight","position"],pt={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function gt(e){e.preventDefault()}function mt(e){e.stopPropagation()}function vt(){var e=this.scrollTop,t=this.scrollHeight,n=e+this.offsetHeight;0===e?this.scrollTop=1:n===t&&(this.scrollTop=e-1)}function bt(){return"ontouchstart"in window||navigator.maxTouchPoints}var yt=!("undefined"===typeof window||!window.document||!window.document.createElement),wt=0,xt={capture:!1,passive:!1};var kt=function(e){var t=e.target;return t.ownerDocument.activeElement&&t.ownerDocument.activeElement.blur()},St={name:"1kfdb0e",styles:"position:fixed;left:0;bottom:0;right:0;top:0"};function Ct(e){var t=e.children,n=e.lockEnabled,r=e.captureEnabled,i=function(e){var t=e.isEnabled,n=e.onBottomArrive,r=e.onBottomLeave,i=e.onTopArrive,l=e.onTopLeave,a=(0,o.useRef)(!1),s=(0,o.useRef)(!1),c=(0,o.useRef)(0),u=(0,o.useRef)(null),d=(0,o.useCallback)((function(e,t){if(null!==u.current){var o=u.current,c=o.scrollTop,d=o.scrollHeight,h=o.clientHeight,f=u.current,p=t>0,g=d-h-c,m=!1;g>t&&a.current&&(r&&r(e),a.current=!1),p&&s.current&&(l&&l(e),s.current=!1),p&&t>g?(n&&!a.current&&n(e),f.scrollTop=d,m=!0,a.current=!0):!p&&-t>c&&(i&&!s.current&&i(e),f.scrollTop=0,m=!0,s.current=!0),m&&ht(e)}}),[n,r,i,l]),h=(0,o.useCallback)((function(e){d(e,e.deltaY)}),[d]),f=(0,o.useCallback)((function(e){c.current=e.changedTouches[0].clientY}),[]),p=(0,o.useCallback)((function(e){var t=c.current-e.changedTouches[0].clientY;d(e,t)}),[d]),g=(0,o.useCallback)((function(e){if(e){var t=!!oe&&{passive:!1};e.addEventListener("wheel",h,t),e.addEventListener("touchstart",f,t),e.addEventListener("touchmove",p,t)}}),[p,f,h]),m=(0,o.useCallback)((function(e){e&&(e.removeEventListener("wheel",h,!1),e.removeEventListener("touchstart",f,!1),e.removeEventListener("touchmove",p,!1))}),[p,f,h]);return(0,o.useEffect)((function(){if(t){var e=u.current;return g(e),function(){m(e)}}}),[t,g,m]),function(e){u.current=e}}({isEnabled:void 0===r||r,onBottomArrive:e.onBottomArrive,onBottomLeave:e.onBottomLeave,onTopArrive:e.onTopArrive,onTopLeave:e.onTopLeave}),l=function(e){var t=e.isEnabled,n=e.accountForScrollbars,r=void 0===n||n,i=(0,o.useRef)({}),l=(0,o.useRef)(null),a=(0,o.useCallback)((function(e){if(yt){var t=document.body,n=t&&t.style;if(r&&ft.forEach((function(e){var t=n&&n[e];i.current[e]=t})),r&&wt<1){var o=parseInt(i.current.paddingRight,10)||0,l=document.body?document.body.clientWidth:0,a=window.innerWidth-l+o||0;Object.keys(pt).forEach((function(e){var t=pt[e];n&&(n[e]=t)})),n&&(n.paddingRight="".concat(a,"px"))}t&&bt()&&(t.addEventListener("touchmove",gt,xt),e&&(e.addEventListener("touchstart",vt,xt),e.addEventListener("touchmove",mt,xt))),wt+=1}}),[r]),s=(0,o.useCallback)((function(e){if(yt){var t=document.body,n=t&&t.style;wt=Math.max(wt-1,0),r&&wt<1&&ft.forEach((function(e){var t=i.current[e];n&&(n[e]=t)})),t&&bt()&&(t.removeEventListener("touchmove",gt,xt),e&&(e.removeEventListener("touchstart",vt,xt),e.removeEventListener("touchmove",mt,xt)))}}),[r]);return(0,o.useEffect)((function(){if(t){var e=l.current;return a(e),function(){s(e)}}}),[t,a,s]),function(e){l.current=e}}({isEnabled:n});return(0,u.tZ)(o.Fragment,null,n&&(0,u.tZ)("div",{onClick:kt,css:St}),t((function(e){i(e),l(e)})))}var Mt={name:"1a0ro4n-requiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%"},Et=function(e){var t=e.name,n=e.onFocus;return(0,u.tZ)("input",{required:!0,name:t,tabIndex:-1,"aria-hidden":"true",onFocus:n,css:Mt,value:"",onChange:function(){}})};function Rt(e){var t;return"undefined"!==typeof window&&null!=window.navigator&&e.test((null===(t=window.navigator.userAgentData)||void 0===t?void 0:t.platform)||window.navigator.platform)}function Ot(){return Rt(/^Mac/i)}function It(){return Rt(/^iPhone/i)||Rt(/^iPad/i)||Ot()&&navigator.maxTouchPoints>1}var Tt={clearIndicator:Ie,container:function(e){var t=e.isDisabled;return{label:"container",direction:e.isRtl?"rtl":void 0,pointerEvents:t?"none":void 0,position:"relative"}},control:function(e,t){var n=e.isDisabled,r=e.isFocused,i=e.theme,o=i.colors,l=i.borderRadius;return s({label:"control",alignItems:"center",cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:i.spacing.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms"},t?{}:{backgroundColor:n?o.neutral5:o.neutral0,borderColor:n?o.neutral10:r?o.primary:o.neutral20,borderRadius:l,borderStyle:"solid",borderWidth:1,boxShadow:r?"0 0 0 1px ".concat(o.primary):void 0,"&:hover":{borderColor:r?o.primary:o.neutral30}})},dropdownIndicator:Oe,group:function(e,t){var n=e.theme.spacing;return t?{}:{paddingBottom:2*n.baseUnit,paddingTop:2*n.baseUnit}},groupHeading:function(e,t){var n=e.theme,r=n.colors,i=n.spacing;return s({label:"group",cursor:"default",display:"block"},t?{}:{color:r.neutral40,fontSize:"75%",fontWeight:500,marginBottom:"0.25em",paddingLeft:3*i.baseUnit,paddingRight:3*i.baseUnit,textTransform:"uppercase"})},indicatorsContainer:function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},indicatorSeparator:function(e,t){var n=e.isDisabled,r=e.theme,i=r.spacing.baseUnit,o=r.colors;return s({label:"indicatorSeparator",alignSelf:"stretch",width:1},t?{}:{backgroundColor:n?o.neutral10:o.neutral20,marginBottom:2*i,marginTop:2*i})},input:function(e,t){var n=e.isDisabled,r=e.value,i=e.theme,o=i.spacing,l=i.colors;return s(s({visibility:n?"hidden":"visible",transform:r?"translateZ(0)":""},Ae),t?{}:{margin:o.baseUnit/2,paddingBottom:o.baseUnit/2,paddingTop:o.baseUnit/2,color:l.neutral80})},loadingIndicator:function(e,t){var n=e.isFocused,r=e.size,i=e.theme,o=i.colors,l=i.spacing.baseUnit;return s({label:"loadingIndicator",display:"flex",transition:"color 150ms",alignSelf:"center",fontSize:r,lineHeight:1,marginRight:r,textAlign:"center",verticalAlign:"middle"},t?{}:{color:n?o.neutral60:o.neutral20,padding:2*l})},loadingMessage:be,menu:function(e,t){var n,r=e.placement,i=e.theme,o=i.borderRadius,a=i.spacing,c=i.colors;return s((n={label:"menu"},(0,l.Z)(n,function(e){return e?{bottom:"top",top:"bottom"}[e]:"bottom"}(r),"100%"),(0,l.Z)(n,"position","absolute"),(0,l.Z)(n,"width","100%"),(0,l.Z)(n,"zIndex",1),n),t?{}:{backgroundColor:c.neutral0,borderRadius:o,boxShadow:"0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)",marginBottom:a.menuGutter,marginTop:a.menuGutter})},menuList:function(e,t){var n=e.maxHeight,r=e.theme.spacing.baseUnit;return s({maxHeight:n,overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},t?{}:{paddingBottom:r,paddingTop:r})},menuPortal:function(e){var t=e.rect,n=e.offset,r=e.position;return{left:t.left,position:r,top:n,width:t.width,zIndex:1}},multiValue:function(e,t){var n=e.theme,r=n.spacing,i=n.borderRadius,o=n.colors;return s({label:"multiValue",display:"flex",minWidth:0},t?{}:{backgroundColor:o.neutral10,borderRadius:i/2,margin:r.baseUnit/2})},multiValueLabel:function(e,t){var n=e.theme,r=n.borderRadius,i=n.colors,o=e.cropWithEllipsis;return s({overflow:"hidden",textOverflow:o||void 0===o?"ellipsis":void 0,whiteSpace:"nowrap"},t?{}:{borderRadius:r/2,color:i.neutral80,fontSize:"85%",padding:3,paddingLeft:6})},multiValueRemove:function(e,t){var n=e.theme,r=n.spacing,i=n.borderRadius,o=n.colors,l=e.isFocused;return s({alignItems:"center",display:"flex"},t?{}:{borderRadius:i/2,backgroundColor:l?o.dangerLight:void 0,paddingLeft:r.baseUnit,paddingRight:r.baseUnit,":hover":{backgroundColor:o.dangerLight,color:o.danger}})},noOptionsMessage:ve,option:function(e,t){var n=e.isDisabled,r=e.isFocused,i=e.isSelected,o=e.theme,l=o.spacing,a=o.colors;return s({label:"option",cursor:"default",display:"block",fontSize:"inherit",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)"},t?{}:{backgroundColor:i?a.primary:r?a.primary25:"transparent",color:n?a.neutral20:i?a.neutral0:"inherit",padding:"".concat(2*l.baseUnit,"px ").concat(3*l.baseUnit,"px"),":active":{backgroundColor:n?void 0:i?a.primary:a.primary50}})},placeholder:function(e,t){var n=e.theme,r=n.spacing,i=n.colors;return s({label:"placeholder",gridArea:"1 / 1 / 2 / 3"},t?{}:{color:i.neutral50,marginLeft:r.baseUnit/2,marginRight:r.baseUnit/2})},singleValue:function(e,t){var n=e.isDisabled,r=e.theme,i=r.spacing,o=r.colors;return s({label:"singleValue",gridArea:"1 / 1 / 2 / 3",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},t?{}:{color:n?o.neutral40:o.neutral80,marginLeft:i.baseUnit/2,marginRight:i.baseUnit/2})},valueContainer:function(e,t){var n=e.theme.spacing,r=e.isMulti,i=e.hasValue,o=e.selectProps.controlShouldRenderValue;return s({alignItems:"center",display:r&&i&&o?"flex":"grid",flex:1,flexWrap:"wrap",WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"},t?{}:{padding:"".concat(n.baseUnit/2,"px ").concat(2*n.baseUnit,"px")})}};var Pt,Dt={borderRadius:4,colors:{primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},spacing:{baseUnit:4,controlHeight:38,menuGutter:8}},Ht={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:te(),captureMenuScroll:!te(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:function(e,t){if(e.data.__isNew__)return!0;var n=s({ignoreCase:!0,ignoreAccents:!0,stringify:ct,trim:!0,matchFrom:"any"},Pt),r=n.ignoreCase,i=n.ignoreAccents,o=n.stringify,l=n.trim,a=n.matchFrom,c=l?st(t):t,u=l?st(o(e)):o(e);return r&&(c=c.toLowerCase(),u=u.toLowerCase()),i&&(c=at(c),u=lt(u)),"start"===a?u.substr(0,c.length)===c:u.indexOf(c)>-1},formatGroupLabel:function(e){return e.label},getOptionLabel:function(e){return e.label},getOptionValue:function(e){return e.value},isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:function(e){return!!e.isDisabled},loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!function(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch(e){return!1}}(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(e){var t=e.count;return"".concat(t," result").concat(1!==t?"s":""," available")},styles:{},tabIndex:0,tabSelectsValue:!0,unstyled:!1};function Lt(e,t,n,r){return{type:"option",data:t,isDisabled:Bt(e,t,n),isSelected:Wt(e,t,n),label:$t(e,t),value:Nt(e,t),index:r}}function Ft(e,t){return e.options.map((function(n,r){if("options"in n){var i=n.options.map((function(n,r){return Lt(e,n,t,r)})).filter((function(t){return _t(e,t)}));return i.length>0?{type:"group",data:n,options:i,index:r}:void 0}var o=Lt(e,n,t,r);return _t(e,o)?o:void 0})).filter(le)}function zt(e){return e.reduce((function(e,t){return"group"===t.type?e.push.apply(e,(0,Xe.Z)(t.options.map((function(e){return e.data})))):e.push(t.data),e}),[])}function At(e,t){return e.reduce((function(e,n){return"group"===n.type?e.push.apply(e,(0,Xe.Z)(n.options.map((function(e){return{data:e.data,id:"".concat(t,"-").concat(n.index,"-").concat(e.index)}})))):e.push({data:n.data,id:"".concat(t,"-").concat(n.index)}),e}),[])}function _t(e,t){var n=e.inputValue,r=void 0===n?"":n,i=t.data,o=t.isSelected,l=t.label,a=t.value;return(!Zt(e)||!o)&&jt(e,{label:l,value:a,data:i},r)}var Vt=function(e,t){var n;return(null===(n=e.find((function(e){return e.data===t})))||void 0===n?void 0:n.id)||null},$t=function(e,t){return e.getOptionLabel(t)},Nt=function(e,t){return e.getOptionValue(t)};function Bt(e,t,n){return"function"===typeof e.isOptionDisabled&&e.isOptionDisabled(t,n)}function Wt(e,t,n){if(n.indexOf(t)>-1)return!0;if("function"===typeof e.isOptionSelected)return e.isOptionSelected(t,n);var r=Nt(e,t);return n.some((function(t){return Nt(e,t)===r}))}function jt(e,t,n){return!e.filterOption||e.filterOption(t,n)}var Zt=function(e){var t=e.hideSelectedOptions,n=e.isMulti;return void 0===t?n:t},Ut=1,Xt=function(e){(0,Ze.Z)(n,e);var t=(0,Ue.Z)(n);function n(e){var r;if((0,We.Z)(this,n),(r=t.call(this,e)).state={ariaSelection:null,focusedOption:null,focusedOptionId:null,focusableOptionsWithIds:[],focusedValue:null,inputIsHidden:!1,isFocused:!1,selectValue:[],clearFocusValueOnUpdate:!1,prevWasFocused:!1,inputIsHiddenAfterUpdate:void 0,prevProps:void 0,instancePrefix:""},r.blockOptionHover=!1,r.isComposing=!1,r.commonProps=void 0,r.initialTouchX=0,r.initialTouchY=0,r.openAfterFocus=!1,r.scrollToFocusedOptionOnUpdate=!1,r.userIsDragging=void 0,r.isAppleDevice=Ot()||It(),r.controlRef=null,r.getControlRef=function(e){r.controlRef=e},r.focusedOptionRef=null,r.getFocusedOptionRef=function(e){r.focusedOptionRef=e},r.menuListRef=null,r.getMenuListRef=function(e){r.menuListRef=e},r.inputRef=null,r.getInputRef=function(e){r.inputRef=e},r.focus=r.focusInput,r.blur=r.blurInput,r.onChange=function(e,t){var n=r.props,i=n.onChange,o=n.name;t.name=o,r.ariaOnChange(e,t),i(e,t)},r.setValue=function(e,t,n){var i=r.props,o=i.closeMenuOnSelect,l=i.isMulti,a=i.inputValue;r.onInputChange("",{action:"set-value",prevInputValue:a}),o&&(r.setState({inputIsHiddenAfterUpdate:!l}),r.onMenuClose()),r.setState({clearFocusValueOnUpdate:!0}),r.onChange(e,{action:t,option:n})},r.selectOption=function(e){var t=r.props,n=t.blurInputOnSelect,i=t.isMulti,o=t.name,l=r.state.selectValue,a=i&&r.isOptionSelected(e,l),s=r.isOptionDisabled(e,l);if(a){var c=r.getOptionValue(e);r.setValue(l.filter((function(e){return r.getOptionValue(e)!==c})),"deselect-option",e)}else{if(s)return void r.ariaOnChange(e,{action:"select-option",option:e,name:o});i?r.setValue([].concat((0,Xe.Z)(l),[e]),"select-option",e):r.setValue(e,"select-option")}n&&r.blurInput()},r.removeValue=function(e){var t=r.props.isMulti,n=r.state.selectValue,i=r.getOptionValue(e),o=n.filter((function(e){return r.getOptionValue(e)!==i})),l=ae(t,o,o[0]||null);r.onChange(l,{action:"remove-value",removedValue:e}),r.focusInput()},r.clearValue=function(){var e=r.state.selectValue;r.onChange(ae(r.props.isMulti,[],null),{action:"clear",removedValues:e})},r.popValue=function(){var e=r.props.isMulti,t=r.state.selectValue,n=t[t.length-1],i=t.slice(0,t.length-1),o=ae(e,i,i[0]||null);r.onChange(o,{action:"pop-value",removedValue:n})},r.getFocusedOptionId=function(e){return Vt(r.state.focusableOptionsWithIds,e)},r.getFocusableOptionsWithIds=function(){return At(Ft(r.props,r.state.selectValue),r.getElementId("option"))},r.getValue=function(){return r.state.selectValue},r.cx=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return U.apply(void 0,[r.props.classNamePrefix].concat(t))},r.getOptionLabel=function(e){return $t(r.props,e)},r.getOptionValue=function(e){return Nt(r.props,e)},r.getStyles=function(e,t){var n=r.props.unstyled,i=Tt[e](t,n);i.boxSizing="border-box";var o=r.props.styles[e];return o?o(i,t):i},r.getClassNames=function(e,t){var n,i;return null===(n=(i=r.props.classNames)[e])||void 0===n?void 0:n.call(i,t)},r.getElementId=function(e){return"".concat(r.state.instancePrefix,"-").concat(e)},r.getComponents=function(){return e=r.props,s(s({},Ne),e.components);var e},r.buildCategorizedOptions=function(){return Ft(r.props,r.state.selectValue)},r.getCategorizedOptions=function(){return r.props.menuIsOpen?r.buildCategorizedOptions():[]},r.buildFocusableOptions=function(){return zt(r.buildCategorizedOptions())},r.getFocusableOptions=function(){return r.props.menuIsOpen?r.buildFocusableOptions():[]},r.ariaOnChange=function(e,t){r.setState({ariaSelection:s({value:e},t)})},r.onMenuMouseDown=function(e){0===e.button&&(e.stopPropagation(),e.preventDefault(),r.focusInput())},r.onMenuMouseMove=function(e){r.blockOptionHover=!1},r.onControlMouseDown=function(e){if(!e.defaultPrevented){var t=r.props.openMenuOnClick;r.state.isFocused?r.props.menuIsOpen?"INPUT"!==e.target.tagName&&"TEXTAREA"!==e.target.tagName&&r.onMenuClose():t&&r.openMenu("first"):(t&&(r.openAfterFocus=!0),r.focusInput()),"INPUT"!==e.target.tagName&&"TEXTAREA"!==e.target.tagName&&e.preventDefault()}},r.onDropdownIndicatorMouseDown=function(e){if((!e||"mousedown"!==e.type||0===e.button)&&!r.props.isDisabled){var t=r.props,n=t.isMulti,i=t.menuIsOpen;r.focusInput(),i?(r.setState({inputIsHiddenAfterUpdate:!n}),r.onMenuClose()):r.openMenu("first"),e.preventDefault()}},r.onClearIndicatorMouseDown=function(e){e&&"mousedown"===e.type&&0!==e.button||(r.clearValue(),e.preventDefault(),r.openAfterFocus=!1,"touchend"===e.type?r.focusInput():setTimeout((function(){return r.focusInput()})))},r.onScroll=function(e){"boolean"===typeof r.props.closeMenuOnScroll?e.target instanceof HTMLElement&&G(e.target)&&r.props.onMenuClose():"function"===typeof r.props.closeMenuOnScroll&&r.props.closeMenuOnScroll(e)&&r.props.onMenuClose()},r.onCompositionStart=function(){r.isComposing=!0},r.onCompositionEnd=function(){r.isComposing=!1},r.onTouchStart=function(e){var t=e.touches,n=t&&t.item(0);n&&(r.initialTouchX=n.clientX,r.initialTouchY=n.clientY,r.userIsDragging=!1)},r.onTouchMove=function(e){var t=e.touches,n=t&&t.item(0);if(n){var i=Math.abs(n.clientX-r.initialTouchX),o=Math.abs(n.clientY-r.initialTouchY);r.userIsDragging=i>5||o>5}},r.onTouchEnd=function(e){r.userIsDragging||(r.controlRef&&!r.controlRef.contains(e.target)&&r.menuListRef&&!r.menuListRef.contains(e.target)&&r.blurInput(),r.initialTouchX=0,r.initialTouchY=0)},r.onControlTouchEnd=function(e){r.userIsDragging||r.onControlMouseDown(e)},r.onClearIndicatorTouchEnd=function(e){r.userIsDragging||r.onClearIndicatorMouseDown(e)},r.onDropdownIndicatorTouchEnd=function(e){r.userIsDragging||r.onDropdownIndicatorMouseDown(e)},r.handleInputChange=function(e){var t=r.props.inputValue,n=e.currentTarget.value;r.setState({inputIsHiddenAfterUpdate:!1}),r.onInputChange(n,{action:"input-change",prevInputValue:t}),r.props.menuIsOpen||r.onMenuOpen()},r.onInputFocus=function(e){r.props.onFocus&&r.props.onFocus(e),r.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(r.openAfterFocus||r.props.openMenuOnFocus)&&r.openMenu("first"),r.openAfterFocus=!1},r.onInputBlur=function(e){var t=r.props.inputValue;r.menuListRef&&r.menuListRef.contains(document.activeElement)?r.inputRef.focus():(r.props.onBlur&&r.props.onBlur(e),r.onInputChange("",{action:"input-blur",prevInputValue:t}),r.onMenuClose(),r.setState({focusedValue:null,isFocused:!1}))},r.onOptionHover=function(e){if(!r.blockOptionHover&&r.state.focusedOption!==e){var t=r.getFocusableOptions().indexOf(e);r.setState({focusedOption:e,focusedOptionId:t>-1?r.getFocusedOptionId(e):null})}},r.shouldHideSelectedOptions=function(){return Zt(r.props)},r.onValueInputFocus=function(e){e.preventDefault(),e.stopPropagation(),r.focus()},r.onKeyDown=function(e){var t=r.props,n=t.isMulti,i=t.backspaceRemovesValue,o=t.escapeClearsValue,l=t.inputValue,a=t.isClearable,s=t.isDisabled,c=t.menuIsOpen,u=t.onKeyDown,d=t.tabSelectsValue,h=t.openMenuOnFocus,f=r.state,p=f.focusedOption,g=f.focusedValue,m=f.selectValue;if(!s&&("function"!==typeof u||(u(e),!e.defaultPrevented))){switch(r.blockOptionHover=!0,e.key){case"ArrowLeft":if(!n||l)return;r.focusValue("previous");break;case"ArrowRight":if(!n||l)return;r.focusValue("next");break;case"Delete":case"Backspace":if(l)return;if(g)r.removeValue(g);else{if(!i)return;n?r.popValue():a&&r.clearValue()}break;case"Tab":if(r.isComposing)return;if(e.shiftKey||!c||!d||!p||h&&r.isOptionSelected(p,m))return;r.selectOption(p);break;case"Enter":if(229===e.keyCode)break;if(c){if(!p)return;if(r.isComposing)return;r.selectOption(p);break}return;case"Escape":c?(r.setState({inputIsHiddenAfterUpdate:!1}),r.onInputChange("",{action:"menu-close",prevInputValue:l}),r.onMenuClose()):a&&o&&r.clearValue();break;case" ":if(l)return;if(!c){r.openMenu("first");break}if(!p)return;r.selectOption(p);break;case"ArrowUp":c?r.focusOption("up"):r.openMenu("last");break;case"ArrowDown":c?r.focusOption("down"):r.openMenu("first");break;case"PageUp":if(!c)return;r.focusOption("pageup");break;case"PageDown":if(!c)return;r.focusOption("pagedown");break;case"Home":if(!c)return;r.focusOption("first");break;case"End":if(!c)return;r.focusOption("last");break;default:return}e.preventDefault()}},r.state.instancePrefix="react-select-"+(r.props.instanceId||++Ut),r.state.selectValue=X(e.value),e.menuIsOpen&&r.state.selectValue.length){var i=r.getFocusableOptionsWithIds(),o=r.buildFocusableOptions(),l=o.indexOf(r.state.selectValue[0]);r.state.focusableOptionsWithIds=i,r.state.focusedOption=o[l],r.state.focusedOptionId=Vt(i,o[l])}return r}return(0,je.Z)(n,[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput(),this.props.menuIsOpen&&this.state.focusedOption&&this.menuListRef&&this.focusedOptionRef&&ee(this.menuListRef,this.focusedOptionRef)}},{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.isDisabled,r=t.menuIsOpen,i=this.state.isFocused;(i&&!n&&e.isDisabled||i&&r&&!e.menuIsOpen)&&this.focusInput(),i&&n&&!e.isDisabled?this.setState({isFocused:!1},this.onMenuClose):i||n||!e.isDisabled||this.inputRef!==document.activeElement||this.setState({isFocused:!0}),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(ee(this.menuListRef,this.focusedOptionRef),this.scrollToFocusedOptionOnUpdate=!1)}},{key:"componentWillUnmount",value:function(){this.stopListeningComposition(),this.stopListeningToTouch(),document.removeEventListener("scroll",this.onScroll,!0)}},{key:"onMenuOpen",value:function(){this.props.onMenuOpen()}},{key:"onMenuClose",value:function(){this.onInputChange("",{action:"menu-close",prevInputValue:this.props.inputValue}),this.props.onMenuClose()}},{key:"onInputChange",value:function(e,t){this.props.onInputChange(e,t)}},{key:"focusInput",value:function(){this.inputRef&&this.inputRef.focus()}},{key:"blurInput",value:function(){this.inputRef&&this.inputRef.blur()}},{key:"openMenu",value:function(e){var t=this,n=this.state,r=n.selectValue,i=n.isFocused,o=this.buildFocusableOptions(),l="first"===e?0:o.length-1;if(!this.props.isMulti){var a=o.indexOf(r[0]);a>-1&&(l=a)}this.scrollToFocusedOptionOnUpdate=!(i&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:o[l],focusedOptionId:this.getFocusedOptionId(o[l])},(function(){return t.onMenuOpen()}))}},{key:"focusValue",value:function(e){var t=this.state,n=t.selectValue,r=t.focusedValue;if(this.props.isMulti){this.setState({focusedOption:null});var i=n.indexOf(r);r||(i=-1);var o=n.length-1,l=-1;if(n.length){switch(e){case"previous":l=0===i?0:-1===i?o:i-1;break;case"next":i>-1&&i<o&&(l=i+1)}this.setState({inputIsHidden:-1!==l,focusedValue:n[l]})}}}},{key:"focusOption",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"first",t=this.props.pageSize,n=this.state.focusedOption,r=this.getFocusableOptions();if(r.length){var i=0,o=r.indexOf(n);n||(o=-1),"up"===e?i=o>0?o-1:r.length-1:"down"===e?i=(o+1)%r.length:"pageup"===e?(i=o-t)<0&&(i=0):"pagedown"===e?(i=o+t)>r.length-1&&(i=r.length-1):"last"===e&&(i=r.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:r[i],focusedValue:null,focusedOptionId:this.getFocusedOptionId(r[i])})}}},{key:"getTheme",value:function(){return this.props.theme?"function"===typeof this.props.theme?this.props.theme(Dt):s(s({},Dt),this.props.theme):Dt}},{key:"getCommonProps",value:function(){var e=this.clearValue,t=this.cx,n=this.getStyles,r=this.getClassNames,i=this.getValue,o=this.selectOption,l=this.setValue,a=this.props,s=a.isMulti,c=a.isRtl,u=a.options;return{clearValue:e,cx:t,getStyles:n,getClassNames:r,getValue:i,hasValue:this.hasValue(),isMulti:s,isRtl:c,options:u,selectOption:o,selectProps:a,setValue:l,theme:this.getTheme()}}},{key:"hasValue",value:function(){return this.state.selectValue.length>0}},{key:"hasOptions",value:function(){return!!this.getFocusableOptions().length}},{key:"isClearable",value:function(){var e=this.props,t=e.isClearable,n=e.isMulti;return void 0===t?n:t}},{key:"isOptionDisabled",value:function(e,t){return Bt(this.props,e,t)}},{key:"isOptionSelected",value:function(e,t){return Wt(this.props,e,t)}},{key:"filterOption",value:function(e,t){return jt(this.props,e,t)}},{key:"formatOptionLabel",value:function(e,t){if("function"===typeof this.props.formatOptionLabel){var n=this.props.inputValue,r=this.state.selectValue;return this.props.formatOptionLabel(e,{context:t,inputValue:n,selectValue:r})}return this.getOptionLabel(e)}},{key:"formatGroupLabel",value:function(e){return this.props.formatGroupLabel(e)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"renderInput",value:function(){var e=this.props,t=e.isDisabled,n=e.isSearchable,r=e.inputId,i=e.inputValue,l=e.tabIndex,a=e.form,u=e.menuIsOpen,d=e.required,h=this.getComponents().Input,f=this.state,p=f.inputIsHidden,g=f.ariaSelection,m=this.commonProps,v=r||this.getElementId("input"),b=s(s(s({"aria-autocomplete":"list","aria-expanded":u,"aria-haspopup":!0,"aria-errormessage":this.props["aria-errormessage"],"aria-invalid":this.props["aria-invalid"],"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],"aria-required":d,role:"combobox","aria-activedescendant":this.isAppleDevice?void 0:this.state.focusedOptionId||""},u&&{"aria-controls":this.getElementId("listbox")}),!n&&{"aria-readonly":!0}),this.hasValue()?"initial-input-focus"===(null===g||void 0===g?void 0:g.action)&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return n?o.createElement(h,(0,c.Z)({},m,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:v,innerRef:this.getInputRef,isDisabled:t,isHidden:p,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:l,form:a,type:"text",value:i},b)):o.createElement(dt,(0,c.Z)({id:v,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:j,onFocus:this.onInputFocus,disabled:t,tabIndex:l,inputMode:"none",form:a,value:""},b))}},{key:"renderPlaceholderOrValue",value:function(){var e=this,t=this.getComponents(),n=t.MultiValue,r=t.MultiValueContainer,i=t.MultiValueLabel,l=t.MultiValueRemove,a=t.SingleValue,s=t.Placeholder,u=this.commonProps,d=this.props,h=d.controlShouldRenderValue,f=d.isDisabled,p=d.isMulti,g=d.inputValue,m=d.placeholder,v=this.state,b=v.selectValue,y=v.focusedValue,w=v.isFocused;if(!this.hasValue()||!h)return g?null:o.createElement(s,(0,c.Z)({},u,{key:"placeholder",isDisabled:f,isFocused:w,innerProps:{id:this.getElementId("placeholder")}}),m);if(p)return b.map((function(t,a){var s=t===y,d="".concat(e.getOptionLabel(t),"-").concat(e.getOptionValue(t));return o.createElement(n,(0,c.Z)({},u,{components:{Container:r,Label:i,Remove:l},isFocused:s,isDisabled:f,key:d,index:a,removeProps:{onClick:function(){return e.removeValue(t)},onTouchEnd:function(){return e.removeValue(t)},onMouseDown:function(e){e.preventDefault()}},data:t}),e.formatOptionLabel(t,"value"))}));if(g)return null;var x=b[0];return o.createElement(a,(0,c.Z)({},u,{data:x,isDisabled:f}),this.formatOptionLabel(x,"value"))}},{key:"renderClearIndicator",value:function(){var e=this.getComponents().ClearIndicator,t=this.commonProps,n=this.props,r=n.isDisabled,i=n.isLoading,l=this.state.isFocused;if(!this.isClearable()||!e||r||!this.hasValue()||i)return null;var a={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return o.createElement(e,(0,c.Z)({},t,{innerProps:a,isFocused:l}))}},{key:"renderLoadingIndicator",value:function(){var e=this.getComponents().LoadingIndicator,t=this.commonProps,n=this.props,r=n.isDisabled,i=n.isLoading,l=this.state.isFocused;if(!e||!i)return null;return o.createElement(e,(0,c.Z)({},t,{innerProps:{"aria-hidden":"true"},isDisabled:r,isFocused:l}))}},{key:"renderIndicatorSeparator",value:function(){var e=this.getComponents(),t=e.DropdownIndicator,n=e.IndicatorSeparator;if(!t||!n)return null;var r=this.commonProps,i=this.props.isDisabled,l=this.state.isFocused;return o.createElement(n,(0,c.Z)({},r,{isDisabled:i,isFocused:l}))}},{key:"renderDropdownIndicator",value:function(){var e=this.getComponents().DropdownIndicator;if(!e)return null;var t=this.commonProps,n=this.props.isDisabled,r=this.state.isFocused,i={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return o.createElement(e,(0,c.Z)({},t,{innerProps:i,isDisabled:n,isFocused:r}))}},{key:"renderMenu",value:function(){var e=this,t=this.getComponents(),n=t.Group,r=t.GroupHeading,i=t.Menu,l=t.MenuList,a=t.MenuPortal,s=t.LoadingMessage,u=t.NoOptionsMessage,d=t.Option,h=this.commonProps,f=this.state.focusedOption,p=this.props,g=p.captureMenuScroll,m=p.inputValue,v=p.isLoading,b=p.loadingMessage,y=p.minMenuHeight,w=p.maxMenuHeight,x=p.menuIsOpen,k=p.menuPlacement,S=p.menuPosition,C=p.menuPortalTarget,M=p.menuShouldBlockScroll,E=p.menuShouldScrollIntoView,R=p.noOptionsMessage,O=p.onMenuScrollToTop,I=p.onMenuScrollToBottom;if(!x)return null;var T,P=function(t,n){var r=t.type,i=t.data,l=t.isDisabled,a=t.isSelected,s=t.label,u=t.value,p=f===i,g=l?void 0:function(){return e.onOptionHover(i)},m=l?void 0:function(){return e.selectOption(i)},v="".concat(e.getElementId("option"),"-").concat(n),b={id:v,onClick:m,onMouseMove:g,onMouseOver:g,tabIndex:-1,role:"option","aria-selected":e.isAppleDevice?void 0:a};return o.createElement(d,(0,c.Z)({},h,{innerProps:b,data:i,isDisabled:l,isSelected:a,key:v,label:s,type:r,value:u,isFocused:p,innerRef:p?e.getFocusedOptionRef:void 0}),e.formatOptionLabel(t.data,"menu"))};if(this.hasOptions())T=this.getCategorizedOptions().map((function(t){if("group"===t.type){var i=t.data,l=t.options,a=t.index,s="".concat(e.getElementId("group"),"-").concat(a),u="".concat(s,"-heading");return o.createElement(n,(0,c.Z)({},h,{key:s,data:i,options:l,Heading:r,headingProps:{id:u,data:t.data},label:e.formatGroupLabel(t.data)}),t.options.map((function(e){return P(e,"".concat(a,"-").concat(e.index))})))}if("option"===t.type)return P(t,"".concat(t.index))}));else if(v){var D=b({inputValue:m});if(null===D)return null;T=o.createElement(s,h,D)}else{var H=R({inputValue:m});if(null===H)return null;T=o.createElement(u,h,H)}var L={minMenuHeight:y,maxMenuHeight:w,menuPlacement:k,menuPosition:S,menuShouldScrollIntoView:E},F=o.createElement(pe,(0,c.Z)({},h,L),(function(t){var n=t.ref,r=t.placerProps,a=r.placement,s=r.maxHeight;return o.createElement(i,(0,c.Z)({},h,L,{innerRef:n,innerProps:{onMouseDown:e.onMenuMouseDown,onMouseMove:e.onMenuMouseMove},isLoading:v,placement:a}),o.createElement(Ct,{captureEnabled:g,onTopArrive:O,onBottomArrive:I,lockEnabled:M},(function(t){return o.createElement(l,(0,c.Z)({},h,{innerRef:function(n){e.getMenuListRef(n),t(n)},innerProps:{role:"listbox","aria-multiselectable":h.isMulti,id:e.getElementId("listbox")},isLoading:v,maxHeight:s,focusedOption:f}),T)})))}));return C||"fixed"===S?o.createElement(a,(0,c.Z)({},h,{appendTo:C,controlElement:this.controlRef,menuPlacement:k,menuPosition:S}),F):F}},{key:"renderFormField",value:function(){var e=this,t=this.props,n=t.delimiter,r=t.isDisabled,i=t.isMulti,l=t.name,a=t.required,s=this.state.selectValue;if(a&&!this.hasValue()&&!r)return o.createElement(Et,{name:l,onFocus:this.onValueInputFocus});if(l&&!r){if(i){if(n){var c=s.map((function(t){return e.getOptionValue(t)})).join(n);return o.createElement("input",{name:l,type:"hidden",value:c})}var u=s.length>0?s.map((function(t,n){return o.createElement("input",{key:"i-".concat(n),name:l,type:"hidden",value:e.getOptionValue(t)})})):o.createElement("input",{name:l,type:"hidden",value:""});return o.createElement("div",null,u)}var d=s[0]?this.getOptionValue(s[0]):"";return o.createElement("input",{name:l,type:"hidden",value:d})}}},{key:"renderLiveRegion",value:function(){var e=this.commonProps,t=this.state,n=t.ariaSelection,r=t.focusedOption,i=t.focusedValue,l=t.isFocused,a=t.selectValue,s=this.getFocusableOptions();return o.createElement(Je,(0,c.Z)({},e,{id:this.getElementId("live-region"),ariaSelection:n,focusedOption:r,focusedValue:i,isFocused:l,selectValue:a,focusableOptions:s,isAppleDevice:this.isAppleDevice}))}},{key:"render",value:function(){var e=this.getComponents(),t=e.Control,n=e.IndicatorsContainer,r=e.SelectContainer,i=e.ValueContainer,l=this.props,a=l.className,s=l.id,u=l.isDisabled,d=l.menuIsOpen,h=this.state.isFocused,f=this.commonProps=this.getCommonProps();return o.createElement(r,(0,c.Z)({},f,{className:a,innerProps:{id:s,onKeyDown:this.onKeyDown},isDisabled:u,isFocused:h}),this.renderLiveRegion(),o.createElement(t,(0,c.Z)({},f,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:u,isFocused:h,menuIsOpen:d}),o.createElement(i,(0,c.Z)({},f,{isDisabled:u}),this.renderPlaceholderOrValue(),this.renderInput()),o.createElement(n,(0,c.Z)({},f,{isDisabled:u}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n=t.prevProps,r=t.clearFocusValueOnUpdate,i=t.inputIsHiddenAfterUpdate,o=t.ariaSelection,l=t.isFocused,a=t.prevWasFocused,c=t.instancePrefix,u=e.options,d=e.value,h=e.menuIsOpen,f=e.inputValue,p=e.isMulti,g=X(d),m={};if(n&&(d!==n.value||u!==n.options||h!==n.menuIsOpen||f!==n.inputValue)){var v=h?function(e,t){return zt(Ft(e,t))}(e,g):[],b=h?At(Ft(e,g),"".concat(c,"-option")):[],y=r?function(e,t){var n=e.focusedValue,r=e.selectValue.indexOf(n);if(r>-1){if(t.indexOf(n)>-1)return n;if(r<t.length)return t[r]}return null}(t,g):null,w=function(e,t){var n=e.focusedOption;return n&&t.indexOf(n)>-1?n:t[0]}(t,v);m={selectValue:g,focusedOption:w,focusedOptionId:Vt(b,w),focusableOptionsWithIds:b,focusedValue:y,clearFocusValueOnUpdate:!1}}var x=null!=i&&e!==n?{inputIsHidden:i,inputIsHiddenAfterUpdate:void 0}:{},k=o,S=l&&a;return l&&!S&&(k={value:ae(p,g,g[0]||null),options:g,action:"initial-input-focus"},S=!a),"initial-input-focus"===(null===o||void 0===o?void 0:o.action)&&(k=null),s(s(s({},m),x),{},{prevProps:e,ariaSelection:k,prevWasFocused:S})}}]),n}(o.Component);Xt.defaultProps=Ht;n(49792);var Yt=(0,o.forwardRef)((function(e,t){var n=function(e){var t=e.defaultInputValue,n=void 0===t?"":t,r=e.defaultMenuIsOpen,i=void 0!==r&&r,l=e.defaultValue,a=void 0===l?null:l,c=e.inputValue,u=e.menuIsOpen,f=e.onChange,p=e.onInputChange,g=e.onMenuClose,m=e.onMenuOpen,v=e.value,b=(0,h.Z)(e,Be),y=(0,o.useState)(void 0!==c?c:n),w=(0,d.Z)(y,2),x=w[0],k=w[1],S=(0,o.useState)(void 0!==u?u:i),C=(0,d.Z)(S,2),M=C[0],E=C[1],R=(0,o.useState)(void 0!==v?v:a),O=(0,d.Z)(R,2),I=O[0],T=O[1],P=(0,o.useCallback)((function(e,t){"function"===typeof f&&f(e,t),T(e)}),[f]),D=(0,o.useCallback)((function(e,t){var n;"function"===typeof p&&(n=p(e,t)),k(void 0!==n?n:e)}),[p]),H=(0,o.useCallback)((function(){"function"===typeof m&&m(),E(!0)}),[m]),L=(0,o.useCallback)((function(){"function"===typeof g&&g(),E(!1)}),[g]),F=void 0!==c?c:x,z=void 0!==u?u:M,A=void 0!==v?v:I;return s(s({},b),{},{inputValue:F,menuIsOpen:z,onChange:P,onInputChange:D,onMenuClose:L,onMenuOpen:H,value:A})}(e);return o.createElement(Xt,(0,c.Z)({ref:t},n))})),Kt=Yt,Gt=[[50,5],[61.23,39.55],[97.55,39.55],[68.16,60.9],[79.39,95.45],[50,74.1],[20.61,95.45],[31.84,60.9],[2.45,39.55],[38.77,39.55]];function qt(e,t,n){let r=!1;for(const i of Gt){const o=(i[0]-50)*(n/100)+t[0],l=(i[1]-50)*(n/100)+t[1];r?e.lineTo(o,l):(e.moveTo(o,l),r=!0)}e.closePath()}var Qt=()=>(0,o.createElement)("svg",{width:"100",height:"100",viewBox:"0 0 100 100",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,o.createElement)("path",{d:"M47.1468 13.7811C48.0449 11.0172 51.9551 11.0172 52.8532 13.7812L60.5522 37.4762C60.9538 38.7123 62.1056 39.5491 63.4053 39.5491H88.3198C91.226 39.5491 92.4343 43.268 90.0831 44.9762L69.9269 59.6205C68.8755 60.3845 68.4355 61.7386 68.8371 62.9746L76.5361 86.6697C77.4342 89.4336 74.2707 91.732 71.9196 90.0238L51.7634 75.3794C50.7119 74.6155 49.2881 74.6155 48.2366 75.3795L28.0804 90.0238C25.7293 91.732 22.5659 89.4336 23.4639 86.6697L31.1629 62.9746C31.5645 61.7386 31.1245 60.3845 30.0731 59.6205L9.91686 44.9762C7.56572 43.268 8.77405 39.5491 11.6802 39.5491H36.5947C37.8944 39.5491 39.0462 38.7123 39.4478 37.4762L47.1468 13.7811Z",fill:"currentColor"})),Jt=(0,r.d)("div")({name:"EditorWrap",class:"e17a8fyf"}),en={kind:i.p6.Custom,isMatch:e=>"star-cell"===e.data.kind,needsHover:!0,draw:(e,t)=>{const{ctx:n,theme:r,rect:i,hoverAmount:o}=e,{rating:l}=t.data,a=r.cellHorizontalPadding;let s=i.x+a;const c=Math.min(5,Math.ceil(l));s+=8,n.beginPath();for(let u=0;u<c;u++)qt(n,[s,i.y+i.height/2],16),s+=18;return n.fillStyle=r.textDark,n.globalAlpha=.6+.4*o,n.fill(),n.globalAlpha=1,!0},provideEditor:()=>e=>(0,o.createElement)(Jt,null,[0,1,2,3,4].map((t=>(0,o.createElement)("div",{key:t,className:e.value.data.rating<t+1?"inactive":"active",onClick:()=>{e.onChange({...e.value,data:{...e.value.data,rating:t+1}})}},(0,o.createElement)(Qt,null))))),onPaste:(e,t)=>{const n=Number.parseInt(e);return{...t,rating:Number.isNaN(n)?0:n}}},tn=en,nn={kind:i.p6.Custom,isMatch:e=>"sparkline-cell"===e.data.kind,needsHover:!0,needsHoverPosition:!0,draw:(e,t)=>{var n;const{ctx:r,theme:o,rect:l,hoverAmount:a,hoverX:s}=e;let{values:c,yAxis:u,color:d,graphKind:h="line",displayValues:f}=t.data;const[p,g]=u;if(0===c.length)return!0;c=c.map((e=>Math.min(1,Math.max(0,(e-p)/(g-p)))));const m=o.cellHorizontalPadding,v=m+l.x,b=l.y+3,y=l.height-6,w=l.width-2*m,x=g<=0?b:p>=0?b+y:b+y*(g/(g-p));if(p<=0&&g>=0&&(r.beginPath(),r.moveTo(v,x),r.lineTo(v+w,x),r.globalAlpha=.4,r.lineWidth=1,r.strokeStyle=o.textLight,r.stroke(),r.globalAlpha=1),"bar"===h){r.beginPath();const e=2,i=(w-(c.length-1)*e)/c.length;let l=v;for(const t of c){const n=b+y-t*y;r.moveTo(l,x),r.lineTo(l+i,x),r.lineTo(l+i,n),r.lineTo(l,n),l+=i+e}r.fillStyle=null!=(n=t.data.color)?n:o.accentColor,r.fill()}else{1===c.length&&(c=[c[0],c[0]]),r.beginPath();const e=(l.width-16)/(c.length-1),t=c.map(((t,n)=>({x:v+e*n,y:b+y-t*y})));let n;for(r.moveTo(t[0].x,t[0].y),n=1;n<t.length-2;n++){const e=(t[n].x+t[n+1].x)/2,i=(t[n].y+t[n+1].y)/2;r.quadraticCurveTo(t[n].x,t[n].y,e,i)}r.quadraticCurveTo(t[n].x,t[n].y,t[n+1].x,t[n+1].y),r.strokeStyle=null!=d?d:o.accentColor,r.lineWidth=1+.5*a,r.stroke(),r.lineTo(l.x+l.width-m,x),r.lineTo(l.x+m,x),r.closePath(),r.globalAlpha=.2+.2*a;const u=r.createLinearGradient(0,b,0,b+1.4*y);u.addColorStop(0,null!=d?d:o.accentColor);const[p,g,w]=(0,i.dF)(null!=d?d:o.accentColor);if(u.addColorStop(1,`rgba(${p}, ${g}, ${w}, 0)`),r.fillStyle=u,r.fill(),r.globalAlpha=1,void 0!==s&&"line"===h&&void 0!==f){r.beginPath();const t=Math.min(c.length-1,Math.max(0,Math.round((s-m)/e)));r.moveTo(v+t*e,l.y),r.lineTo(v+t*e,l.y+l.height),r.lineWidth=1,r.strokeStyle=o.textLight,r.stroke(),r.save(),r.font=`8px ${o.fontFamily}`,r.fillStyle=o.textMedium,r.textBaseline="top",r.fillText(f[t],v,l.y+o.cellVerticalPadding),r.restore()}}return!0},provideEditor:()=>{},onPaste:(e,t)=>t},rn=nn;function on(e,t,n,r,i,o){0!==o?("number"===typeof o&&(o={tl:o,tr:o,br:o,bl:o}),o={tl:Math.min(o.tl,i/2,r/2),tr:Math.min(o.tr,i/2,r/2),bl:Math.min(o.bl,i/2,r/2),br:Math.min(o.br,i/2,r/2)},e.moveTo(t+o.tl,n),e.arcTo(t+r,n,t+r,n+o.tr,o.tr),e.arcTo(t+r,n+i,t+r-o.br,n+i,o.br),e.arcTo(t,n+i,t,n+i-o.bl,o.bl),e.arcTo(t,n,t+o.tl,n,o.tl)):e.rect(t,n,r,i)}var ln=20,an=(0,r.d)("div")({name:"EditorWrap",class:"e43amum",vars:{"e43amum-0":[e=>e.tagHeight/2,"px"],"e43amum-1":[e=>e.tagHeight,"px"],"e43amum-2":[e=>e.innerPad,"px"]}}),sn={kind:i.p6.Custom,isMatch:e=>"tags-cell"===e.data.kind,draw:(e,t)=>{var n,r;const{ctx:o,theme:l,rect:a}=e,{possibleTags:s,tags:c}=t.data,u={x:a.x+l.cellHorizontalPadding,y:a.y+l.cellVerticalPadding,width:a.width-2*l.cellHorizontalPadding,height:a.height-2*l.cellVerticalPadding},d=Math.max(1,Math.floor(u.height/26));let h=u.x,f=1,p=u.y+(u.height-d*ln-6*(d-1))/2;for(const g of c){const e=null!=(r=null==(n=s.find((e=>e.tag===g)))?void 0:n.color)?r:l.bgBubble;o.font=`12px ${l.fontFamily}`;const t=(0,i.P7)(g,o).width+12,a=10;if(h!==u.x&&h+t>u.x+u.width&&f<d&&(f++,p+=26,h=u.x),o.fillStyle=e,o.beginPath(),on(o,h,p,t,ln,10),o.fill(),o.fillStyle=l.textDark,o.fillText(g,h+6,p+a+(0,i.aX)(o,`12px ${l.fontFamily}`)),h+=t+8,h>u.x+u.width&&f>=d)break}return!0},provideEditor:()=>e=>{const{onChange:t,value:n}=e,{possibleTags:r,tags:i,readonly:l=!1}=n.data;return(0,o.createElement)(an,{tagHeight:ln,innerPad:6,className:l?"readonly":""},r.map((r=>{const a=-1!==i.indexOf(r.tag);return(0,o.createElement)("label",{key:r.tag},!l&&(0,o.createElement)("input",{className:"gdg-input",type:"checkbox",checked:a,onChange:()=>{const o=a?i.filter((e=>e!==r.tag)):[...i,r.tag];t({...e.value,data:{...n.data,tags:o}})}}),(0,o.createElement)("div",{className:"pill "+(a?"selected":"unselected"),style:{backgroundColor:a?r.color:void 0}},r.tag))})))},onPaste:(e,t)=>({...t,tags:t.possibleTags.map((e=>e.tag)).filter((t=>e.split(",").map((e=>e.trim())).includes(t)))})},cn={kind:i.p6.Custom,isMatch:e=>"user-profile-cell"===e.data.kind,draw:(e,t)=>{const{ctx:n,rect:r,theme:o,imageLoader:l,col:a,row:s}=e,{image:c,name:u,initial:d,tint:h}=t.data,f=o.cellHorizontalPadding,p=Math.min(12,r.height/2-o.cellVerticalPadding),g=r.x+f,m=l.loadOrGetImage(c,a,s);n.save(),n.beginPath(),n.arc(g+p,r.y+r.height/2,p,0,2*Math.PI),n.globalAlpha=.2,n.fillStyle=h,n.fill(),n.globalAlpha=1,n.font=`600 16px ${o.fontFamily}`;const v=(0,i.P7)(d[0],n);return n.fillText(d[0],g+p-v.width/2,r.y+r.height/2+(0,i.aX)(n,`600 16px ${o.fontFamily}`)),void 0!==m&&(n.save(),n.beginPath(),n.arc(g+p,r.y+r.height/2,p,0,2*Math.PI),n.clip(),n.drawImage(m,g,r.y+r.height/2-p,2*p,2*p),n.restore()),void 0!==u&&(n.font=`${o.baseFontStyle} ${o.fontFamily}`,n.fillStyle=o.textDark,n.fillText(u,g+2*p+f,r.y+r.height/2+(0,i.aX)(n,o))),n.restore(),!0},provideEditor:()=>e=>{var t;const{isHighlighted:n,onChange:r,value:l}=e;return(0,o.createElement)(i.t5,{highlight:n,autoFocus:!0,value:null!=(t=l.data.name)?t:"",onChange:e=>r({...l,data:{...l.data,name:e.target.value}})})},onPaste:(e,t)=>({...t,name:e})},un=e=>{const{Menu:t}=Ne,{children:n,...r}=e;return(0,o.createElement)(t,{...r},n)},dn=(0,r.d)("div")({name:"Wrap",class:"w13j932a"}),hn=(0,r.d)("div")({name:"PortalWrap",class:"p19663q2"}),fn=(0,r.d)("div")({name:"ReadOnlyWrap",class:"r1jyvvws"}),pn=e=>{const{value:t,onFinishedEditing:n,initialValue:r}=e,{allowedValues:l,value:a}=t.data,[s,c]=(0,o.useState)(a),[u,d]=(0,o.useState)(null!=r?r:""),h=(0,i.Fg)(),f=(0,o.useMemo)((()=>l.map((e=>({value:e,label:e})))),[l]);return t.readonly?(0,o.createElement)(fn,null,(0,o.createElement)(i.t5,{highlight:!0,autoFocus:!1,disabled:!0,value:null!=s?s:"",onChange:()=>{}})):(0,o.createElement)(dn,null,(0,o.createElement)(Kt,{className:"glide-select",inputValue:u,onInputChange:d,menuPlacement:"auto",value:f.find((e=>e.value===s)),styles:{control:e=>({...e,border:0,boxShadow:"none"}),option:e=>({...e,fontSize:h.editorFontSize,fontFamily:h.fontFamily,":empty::after":{content:'"&nbsp;"',visibility:"hidden"}})},theme:e=>({...e,colors:{...e.colors,neutral0:h.bgCell,neutral5:h.bgCell,neutral10:h.bgCell,neutral20:h.bgCellMedium,neutral30:h.bgCellMedium,neutral40:h.bgCellMedium,neutral50:h.textLight,neutral60:h.textMedium,neutral70:h.textMedium,neutral80:h.textDark,neutral90:h.textDark,neutral100:h.textDark,primary:h.accentColor,primary75:h.accentColor,primary50:h.accentColor,primary25:h.accentLight}}),menuPortalTarget:document.getElementById("portal"),autoFocus:!0,openMenuOnFocus:!0,components:{DropdownIndicator:()=>null,IndicatorSeparator:()=>null,Menu:e=>(0,o.createElement)(hn,null,(0,o.createElement)(un,{className:"click-outside-ignore",...e}))},options:f,onChange:async e=>{null!==e&&(c(e.value),await new Promise((e=>window.requestAnimationFrame(e))),n({...t,data:{...t.data,value:e.value}}))}}))},gn={kind:i.p6.Custom,isMatch:e=>"dropdown-cell"===e.data.kind,draw:(e,t)=>{const{ctx:n,theme:r,rect:o}=e,{value:l}=t.data;return l&&(n.fillStyle=r.textDark,n.fillText(l,o.x+r.cellHorizontalPadding,o.y+o.height/2+(0,i.aX)(n,r))),!0},measure:(e,t)=>{const{value:n}=t.data;return n?e.measureText(n).width+16:16},provideEditor:()=>({editor:pn,disablePadding:!0,deletedValue:e=>({...e,copyData:"",data:{...e.data,value:""}})}),onPaste:(e,t)=>({...t,value:t.allowedValues.includes(e)?e:t.value})},mn=(0,o.lazy)((async()=>await n.e(4949).then(n.bind(n,54949)))),vn={kind:i.p6.Custom,isMatch:e=>"article-cell"===e.data.kind,draw:(e,t)=>{const{ctx:n,theme:r,rect:o}=e,{markdown:l}=t.data;let a=l;a.includes("\n")&&(a=a.split(/\r?\n/)[0]);const s=o.width/4;return a.length>s&&(a=a.slice(0,s)),n.fillStyle=r.textDark,n.fillText(a,o.x+r.cellHorizontalPadding,o.y+o.height/2+(0,i.aX)(n,r)),!0},provideEditor:()=>({editor:e=>(0,o.createElement)(o.Suspense,{fallback:null},(0,o.createElement)(mn,{...e})),styleOverride:{position:"fixed",left:"12.5vw",top:"12.5vh",width:"75vw",borderRadius:"9px",maxWidth:"unset",maxHeight:"unset"},disablePadding:!0}),onPaste:(e,t)=>({...t,markdown:e})},bn=vn,yn={marginRight:8},wn={display:"flex",alignItems:"center",flexGrow:1},xn={kind:i.p6.Custom,isMatch:e=>"range-cell"===e.data.kind,draw:(e,t)=>{const{ctx:n,theme:r,rect:o}=e,{min:l,max:a,value:s,label:c,measureLabel:u}=t.data,d=o.x+r.cellHorizontalPadding,h=o.y+o.height/2,f=(s-l)/(a-l);n.save();let p=0;void 0!==c&&(n.font=`12px ${r.fontFamily}`,p=(0,i.P7)(null!=u?u:c,n,`12px ${r.fontFamily}`).width+r.cellHorizontalPadding);const g=o.width-2*r.cellHorizontalPadding-p;if(g>=6){const e=n.createLinearGradient(d,h,d+g,h);e.addColorStop(0,r.accentColor),e.addColorStop(f,r.accentColor),e.addColorStop(f,r.bgBubble),e.addColorStop(1,r.bgBubble),n.beginPath(),n.fillStyle=e,on(n,d,h-3,g,6,3),n.fill(),n.beginPath(),on(n,d+.5,h-3+.5,g-1,5,2.5),n.strokeStyle=r.accentLight,n.lineWidth=1,n.stroke()}return void 0!==c&&(n.textAlign="right",n.fillStyle=r.textDark,n.fillText(c,o.x+o.width-r.cellHorizontalPadding,h+(0,i.aX)(n,`12px ${r.fontFamily}`))),n.restore(),!0},provideEditor:()=>e=>{const{data:t}=e.value,n=t.value.toString(),r=t.min.toString(),i=t.max.toString(),l=t.step.toString();return(0,o.createElement)("label",{style:wn},(0,o.createElement)("input",{style:yn,type:"range",value:n,min:r,max:i,step:l,onChange:n=>{e.onChange({...e.value,data:{...t,value:Number(n.target.value)}})}}),n)},onPaste:(e,t)=>{let n=Number.parseFloat(e);return n=Number.isNaN(n)?t.value:Math.max(t.min,Math.min(t.max,n)),{...t,value:n}}},kn=xn,Sn={kind:i.p6.Custom,isMatch:e=>"spinner-cell"===e.data.kind,draw:e=>{const{ctx:t,theme:n,rect:r,requestAnimationFrame:i}=e,o=window.performance.now()%1e3/1e3,l=r.x+r.width/2,a=r.y+r.height/2;return t.arc(l,a,Math.min(12,r.height/6),2*Math.PI*o,2*Math.PI*o+1.5*Math.PI),t.strokeStyle=n.textMedium,t.lineWidth=1.5,t.stroke(),t.lineWidth=1,i(),!0},provideEditor:()=>{}},Cn=(0,r.d)("input")({name:"StyledInputBox",class:"s1sdc9r3"}),Mn=(e,t)=>{if(void 0===t||null===t)return"";const n=t.toISOString();switch(e){case"date":return n.split("T")[0];case"datetime-local":return n.replace("Z","");case"time":return n.split("T")[1].replace("Z","");default:throw new Error(`Unknown date kind ${e}`)}},En=e=>{const t=e.value.data,{format:n,displayDate:r}=t,l=void 0===t.step||Number.isNaN(Number(t.step))?void 0:Number(t.step),a=t.min instanceof Date?Mn(n,t.min):t.min,s=t.max instanceof Date?Mn(n,t.max):t.max;let c=t.date;const u=t.timezoneOffset?60*t.timezoneOffset*1e3:0;u&&c&&(c=new Date(c.getTime()+u));const d=Mn(n,c);return e.value.readonly?o.createElement(i.t5,{highlight:!0,autoFocus:!1,disabled:!0,value:null!=r?r:"",onChange:()=>{}}):o.createElement(Cn,{"data-testid":"date-picker-cell",required:!0,type:n,defaultValue:d,min:a,max:s,step:l,autoFocus:!0,onChange:t=>{isNaN(t.target.valueAsNumber)?e.onChange({...e.value,data:{...e.value.data,date:void 0}}):e.onChange({...e.value,data:{...e.value.data,date:new Date(t.target.valueAsNumber-u)}})}})},Rn={kind:i.p6.Custom,isMatch:e=>"date-picker-cell"===e.data.kind,draw:(e,t)=>{const{displayDate:n}=t.data;return(0,i.uN)(e,n,t.contentAlign),!0},measure:(e,t)=>{const{displayDate:n}=t.data;return e.measureText(n).width+16},provideEditor:()=>({editor:En}),onPaste:(e,t)=>{let n=NaN;return e&&(n=Number(e).valueOf(),Number.isNaN(n)&&(n=Date.parse(e),"time"===t.format&&Number.isNaN(n)&&(n=Date.parse(`1970-01-01T${e}Z`)))),{...t,date:Number.isNaN(n)?void 0:new Date(n)}}};function On(e){if("click"!==e.cell.data.navigateOn!==e.ctrlKey)return;const t=document.createElement("canvas").getContext("2d",{alpha:!1});if(null===t)return;const{posX:n,bounds:r,cell:o,theme:l}=e,a=`${l.baseFontStyle} ${l.fontFamily}`;t.font=a;const{links:s}=o.data,c=l.cellHorizontalPadding;let u=r.x+c;const d=r.x+n;for(const[h,f]of s.entries()){const e=h<s.length-1,n=(0,i.P7)(f.title,t),r=e?(0,i.P7)(f.title+",",t,a):n;if(d>u&&d<u+n.width)return f;u+=r.width+4}}var In={kind:i.p6.Custom,needsHover:!0,needsHoverPosition:!0,isMatch:e=>"links-cell"===e.data.kind,onSelect:e=>{void 0!==On(e)&&e.preventDefault()},onClick:e=>{var t;const n=On(e);void 0!==n&&(null==(t=n.onClick)||t.call(n),e.preventDefault())},draw:(e,t)=>{const{ctx:n,rect:r,theme:o,hoverX:l=-100,highlighted:a}=e,{links:s,underlineOffset:c=5}=t.data,u=o.cellHorizontalPadding;let d=r.x+u;const h=r.x+l,f=`${o.baseFontStyle} ${o.fontFamily}`,p=(0,i.aX)(n,f),g=r.y+r.height/2+p;for(const[m,v]of s.entries()){const e=m<s.length-1,t=(0,i.P7)(v.title,n,f),r=e?(0,i.P7)(v.title+",",n,f):t;h>d&&h<d+t.width&&(n.moveTo(d,Math.floor(g+c)+.5),n.lineTo(d+t.width,Math.floor(g+c)+.5),n.strokeStyle=o.textDark,n.stroke(),n.fillStyle=a?(0,i.NH)(o.accentLight,o.bgCell):o.bgCell,n.fillText(e?v.title+",":v.title,d-1,g),n.fillText(e?v.title+",":v.title,d+1,g),n.fillText(e?v.title+",":v.title,d-2,g),n.fillText(e?v.title+",":v.title,d+2,g)),n.fillStyle=o.textDark,n.fillText(e?v.title+",":v.title,d,g),d+=r.width+4}return!0},provideEditor:()=>e=>{const{value:t,onChange:n}=e,{links:r,maxLinks:i=Number.MAX_SAFE_INTEGER}=t.data;return(0,o.createElement)(Tn,{onKeyDown:Pn},r.map(((e,i)=>{var l;return(0,o.createElement)(Dn,{key:i,link:null!=(l=e.href)?l:"",title:e.title,focus:0===i,onDelete:r.length>1?()=>{const e=[...r];e.splice(i,1),n({...t,data:{...t.data,links:e}})}:void 0,onChange:(e,o)=>{const l=[...r];l[i]={href:e,title:o},n({...t,data:{...t.data,links:l}})}})})),(0,o.createElement)("button",{disabled:r.length>=i,className:"add-link",onClick:()=>{const e=[...r,{title:""}];n({...t,data:{...t.data,links:e}})}},"Add link"))},onPaste:(e,t)=>{const n=e.split(",");if(!t.links.some(((e,t)=>n[t]!==e.title)))return{...t,links:n.map((e=>({title:e})))}}},Tn=(0,r.d)("div")({name:"LinksCellEditorStyle",class:"lneeve5"});function Pn(e){"Tab"===e.key&&e.stopPropagation()}var Dn=e=>{const{link:t,onChange:n,title:r,onDelete:i,focus:l}=e;return(0,o.createElement)("div",{className:"gdg-link-title-editor"},(0,o.createElement)("input",{className:"gdg-title-input",value:r,placeholder:"Title",autoFocus:l,onChange:e=>{n(t,e.target.value)}}),(0,o.createElement)("input",{className:"gdg-link-input",value:t,placeholder:"URL",onChange:e=>{n(e.target.value,r)}}),void 0!==i&&(0,o.createElement)("button",{onClick:i},(0,o.createElement)("svg",{width:16,height:16,viewBox:"0 0 24 24",fill:"none",id:"icon-import",xmlns:"http://www.w3.org/2000/svg"},(0,o.createElement)("path",{d:"M3 6L5 6L21 6",stroke:"currentColor",strokeWidth:"1px",strokeLinecap:"round",strokeLinejoin:"round"}),(0,o.createElement)("path",{d:"M17.9019 6C18.491 6 18.9525 6.50676 18.8975 7.09334L17.67 20.1867C17.5736 21.2144 16.711 22 15.6787 22H8.32127C7.28902 22 6.42635 21.2144 6.33 20.1867L5.1025 7.09334C5.04751 6.50676 5.50898 6 6.09813 6H17.9019Z",stroke:"currentColor",strokeWidth:"1px",strokeLinecap:"round",strokeLinejoin:"round"}),(0,o.createElement)("path",{d:"M14.4499 10.211L13.9949 17",stroke:"currentColor",strokeWidth:"1px",strokeLinecap:"round",strokeLinejoin:"round"}),(0,o.createElement)("path",{d:"M9.55499 10.211L10.0049 17",stroke:"currentColor",strokeWidth:"1px",strokeLinecap:"round",strokeLinejoin:"round"}),(0,o.createElement)("path",{d:"M7.5 2.25H16.5",stroke:"currentColor",strokeWidth:"1px",strokeLinecap:"round",strokeLinejoin:"round"}))))},Hn=In;function Ln(e,t,n){if("string"===typeof e)return void 0!==t[e]?t[e]:e;let[r,o]=e;return void 0!==t[r]&&(r=t[r]),void 0!==t[o]&&(o=t[o]),(0,i.Nz)(r,o,n)}var Fn={kind:i.p6.Custom,isMatch:e=>"button-cell"===e.data.kind,needsHover:!0,onSelect:e=>e.preventDefault(),onClick:e=>{var t,n;null==(n=(t=e.cell.data).onClick)||n.call(t)},drawPrep:e=>{const{ctx:t}=e;return t.textAlign="center",{deprep:e=>{e.ctx.textAlign="start"}}},draw:(e,t)=>{const{ctx:n,theme:r,rect:o,hoverAmount:l}=e,{title:a,backgroundColor:s,color:c,borderColor:u,borderRadius:d}=t.data,h=Math.floor(o.x+r.cellHorizontalPadding+1),f=Math.floor(o.y+r.cellVerticalPadding+1),p=Math.ceil(o.width-2*r.cellHorizontalPadding-1),g=Math.ceil(o.height-2*r.cellVerticalPadding-1);return void 0!==s&&(n.beginPath(),on(n,h,f,p,g,null!=d?d:0),n.fillStyle=Ln(s,r,l),n.fill()),void 0!==u&&(n.beginPath(),on(n,h+.5,f+.5,p-1,g-1,null!=d?d:0),n.strokeStyle=Ln(u,r,l),n.lineWidth=1,n.stroke()),n.fillStyle=Ln(null!=c?c:r.accentColor,r,l),n.fillText(a,h+p/2,f+g/2+(0,i.aX)(n,`${r.baseFontStyle} ${r.fontFamily}`)),!0},provideEditor:void 0},zn=[tn,rn,sn,cn,gn,bn,Sn,kn,Rn,Hn,Fn];function An(){return(0,i.R$)(zn)}},33256:(e,t,n)=>{"use strict";n.d(t,{fF:()=>s});var r=n(66751),i=n(66904),o=n(5057);function l(e){var t,n,i,o,l;switch(e.kind){case r.p6.Number:return null!==(t=null===(n=e.data)||void 0===n?void 0:n.toString())&&void 0!==t?t:"";case r.p6.Boolean:return null!==(i=null===(o=e.data)||void 0===o?void 0:o.toString())&&void 0!==i?i:"";case r.p6.Markdown:case r.p6.RowID:case r.p6.Text:case r.p6.Uri:return null!==(l=e.data)&&void 0!==l?l:"";case r.p6.Bubble:case r.p6.Image:return e.data.join("");case r.p6.Drilldown:return e.data.map((e=>e.text)).join("");case r.p6.Protected:case r.p6.Loading:return"";case r.p6.Custom:return e.copyData}}function a(e){if("number"===typeof e)return e;if(e.length>0){const t=Number(e);isNaN(t)||(e=t)}return e}function s(e){var t;const{sort:n,rows:r,getCellContent:s}=e;let c=void 0===n?void 0:e.columns.findIndex((e=>n.column===e||void 0!==e.id&&n.column.id===e.id));-1===c&&(c=void 0);const u=null!==(t=null===n||void 0===n?void 0:n.direction)&&void 0!==t?t:"asc",d=o.useMemo((()=>{if(void 0===c)return;const e=new Array(r),t=[c,0];for(let n=0;n<r;n++)t[1]=n,e[n]=l(s(t));let o;return o="raw"===(null===n||void 0===n?void 0:n.mode)?i(r).sort(((t,n)=>function(e,t){return e>t?1:e===t?0:-1}(e[t],e[n]))):"smart"===(null===n||void 0===n?void 0:n.mode)?i(r).sort(((t,n)=>function(e,t){return e=a(e),t=a(t),"string"===typeof e&&"string"===typeof t?e.localeCompare(t):"number"===typeof e&&"number"===typeof t?e===t?0:e>t?1:-1:e==t?0:e>t?1:-1}(e[t],e[n]))):i(r).sort(((t,n)=>e[t].localeCompare(e[n]))),"desc"===u&&o.reverse(),o}),[s,r,null===n||void 0===n?void 0:n.mode,u,c]),h=o.useCallback((e=>void 0===d?e:d[e]),[d]),f=o.useCallback((e=>{let[t,n]=e;return void 0===d||(n=d[n]),s([t,n])}),[s,d]);return void 0===d?{getCellContent:e.getCellContent,getOriginalIndex:h}:{getOriginalIndex:h,getCellContent:f}}},65850:(e,t,n)=>{"use strict";n.d(t,{d:()=>u});var r=n(5057);var i=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|inert|itemProp|itemScope|itemType|itemID|itemRef|on|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,o=function(e){var t={};return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}((function(e){return i.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91})),l=function(){const e=Array.prototype.slice.call(arguments).filter(Boolean),t={},n=[];e.forEach((e=>{(e?e.split(" "):[]).forEach((e=>{if(e.startsWith("atm_")){const[,n]=e.split("_");t[n]=e}else n.push(e)}))}));const r=[];for(const i in t)Object.prototype.hasOwnProperty.call(t,i)&&r.push(t[i]);return r.push(...n),r.join(" ")},a=e=>e.toUpperCase()===e,s=(e,t)=>{const n={};return Object.keys(e).filter((e=>t=>-1===e.indexOf(t))(t)).forEach((t=>{n[t]=e[t]})),n};var c=(e,t)=>{{if("string"===typeof e||"number"===typeof e&&isFinite(e))return;const n="object"===typeof e?JSON.stringify(e):String(e);console.warn(`An interpolation evaluated to '${n}' in the component '${t}', which is probably a mistake. You should explicitly cast or transform the value to a string.`)}};var u=new Proxy((function(e){return t=>{if(Array.isArray(t))throw new Error('Using the "styled" tag in runtime is not supported. Make sure you have set up the Babel plugin correctly. See https://github.com/callstack/linaria#setup');const n=(n,i)=>{const{as:u=e,class:d}=n,h=function(e,t,n){const r=s(t,n);return"string"!==typeof e||-1!==e.indexOf("-")||a(e[0])||Object.keys(r).forEach((e=>{o(e)||delete r[e]})),r}(u,n,["as","class"]);h.ref=i,h.className=t.atomic?l(t.class,h.className||d):l(h.className||d,t.class);const{vars:f}=t;if(f){const e={};for(const o in f){const r=f[o],i=r[0],l=r[1]||"",a="function"===typeof i?i(n):i;c(a,t.name),e[`--${o}`]=`${a}${l}`}const r=h.style||{},i=Object.keys(r);i.length>0&&i.forEach((t=>{e[t]=r[t]})),h.style=e}return e.__linaria&&e!==u?(h.as=u,r.createElement(e,h)):r.createElement(u,h)},i=r.forwardRef?r.forwardRef(n):e=>{const t=s(e,["innerRef"]);return n(t,e.innerRef)};return i.displayName=t.name,i.__linaria={className:t.class,extends:e},i}}),{get:(e,t)=>e(t)})},66751:(e,t,n)=>{"use strict";n.d(t,{EV:()=>Ve,Nd:()=>Tr,p6:()=>ge,t5:()=>ur,NH:()=>jt,uN:()=>Et,aX:()=>kt,Nz:()=>Zt,P7:()=>xt,dF:()=>Bt,R$:()=>Dr,Fg:()=>pe});var r=n(65850),i=n(5057),o=n(88341),l=n(87384),a=n(79077),s=n(66904),c=n(67047),u=n(53627),d=n(79530),h=n(8406),f=new Map,p=new Map,g=new Map;function m(e,t,n,r){var i,o;let l=p.get(n);if(r&&void 0!==l&&l.count>2e4){let r=g.get(n);if(void 0===r&&(r=function(e,t){var n;let r=new Map,i=0;for(let s of"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890,.-+=?"){let t=e.measureText(s).width;r.set(s,t),i+=t}let o=i/r.size,l=(t/o+3)/4,a=r.keys();for(let s of a)r.set(s,(null!=(n=r.get(s))?n:o)*l);return r}(e,l.size),g.set(n,r)),l.count>5e5){let e=0;for(let n of t)e+=null!=(i=r.get(n))?i:l.size;return 1.01*e}let o=e.measureText(t);return function(e,t,n,r,i){var o,l,a;let s=0,c={};for(let d of e)s+=null!=(o=n.get(d))?o:i,c[d]=(null!=(l=c[d])?l:0)+1;let u=t-s;for(let d of Object.keys(c)){let e=c[d],t=null!=(a=n.get(d))?a:i,o=t+u*(t*e/s)*r/e;n.set(d,o)}}(t,o.width,r,Math.max(.05,1-l.count/2e5),l.size),p.set(n,{count:l.count+t.length,size:l.size}),o.width}let a=e.measureText(t),s=a.width/t.length;if((null!=(o=null==l?void 0:l.count)?o:0)>2e4)return a.width;if(void 0===l)p.set(n,{count:t.length,size:s});else{let e=s-l.size,r=t.length/(l.count+t.length),i=l.size+e*r;p.set(n,{count:l.count+t.length,size:i})}return a.width}function v(e,t,n,r,i,o,l,a){if(t.length<=1)return t.length;if(i<n)return-1;let s=Math.floor(n/i*o),c=m(e,t.slice(0,Math.max(0,s)),r,l),u=null==a?void 0:a(t);if(c!==n)if(c<n){for(;c<n;)s++,c=m(e,t.slice(0,Math.max(0,s)),r,l);s--}else for(;c>n;){let n=void 0!==u?0:t.lastIndexOf(" ",s-1);n>0?s=n:s--,c=m(e,t.slice(0,Math.max(0,s)),r,l)}if(" "!==t[s]){let e=0;if(void 0===u)e=t.lastIndexOf(" ",s);else for(let t of u){if(t>s)break;e=t}e>0&&(s=e)}return s}var b=n(88417),y=n(27261);function w(){return{async:!1,baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,hooks:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}let x={async:!1,baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,hooks:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1};const k=/[&<>"']/,S=new RegExp(k.source,"g"),C=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,M=new RegExp(C.source,"g"),E={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},R=e=>E[e];function O(e,t){if(t){if(k.test(e))return e.replace(S,R)}else if(C.test(e))return e.replace(M,R);return e}const I=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function T(e){return e.replace(I,((e,t)=>"colon"===(t=t.toLowerCase())?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""))}const P=/(^|[^\[])\^/g;function D(e,t){e="string"===typeof e?e:e.source,t=t||"";const n={replace:(t,r)=>(r=(r=r.source||r).replace(P,"$1"),e=e.replace(t,r),n),getRegex:()=>new RegExp(e,t)};return n}const H=/[^\w:]/g,L=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function F(e,t,n){if(e){let e;try{e=decodeURIComponent(T(n)).replace(H,"").toLowerCase()}catch(r){return null}if(0===e.indexOf("javascript:")||0===e.indexOf("vbscript:")||0===e.indexOf("data:"))return null}t&&!L.test(n)&&(n=function(e,t){z[" "+e]||(A.test(e)?z[" "+e]=e+"/":z[" "+e]=B(e,"/",!0));e=z[" "+e];const n=-1===e.indexOf(":");return"//"===t.substring(0,2)?n?t:e.replace(_,"$1")+t:"/"===t.charAt(0)?n?t:e.replace(V,"$1")+t:e+t}(t,n));try{n=encodeURI(n).replace(/%25/g,"%")}catch(r){return null}return n}const z={},A=/^[^:]+:\/*[^/]*$/,_=/^([^:]+:)[\s\S]*$/,V=/^([^:]+:\/*[^/]*)[\s\S]*$/;const $={exec:function(){}};function N(e,t){const n=e.replace(/\|/g,((e,t,n)=>{let r=!1,i=t;for(;--i>=0&&"\\"===n[i];)r=!r;return r?"|":" |"})).split(/ \|/);let r=0;if(n[0].trim()||n.shift(),n.length>0&&!n[n.length-1].trim()&&n.pop(),n.length>t)n.splice(t);else for(;n.length<t;)n.push("");for(;r<n.length;r++)n[r]=n[r].trim().replace(/\\\|/g,"|");return n}function B(e,t,n){const r=e.length;if(0===r)return"";let i=0;for(;i<r;){const o=e.charAt(r-i-1);if(o!==t||n){if(o===t||!n)break;i++}else i++}return e.slice(0,r-i)}function W(e,t){if(t<1)return"";let n="";for(;t>1;)1&t&&(n+=e),t>>=1,e+=e;return n+e}function j(e,t,n,r){const i=t.href,o=t.title?O(t.title):null,l=e[1].replace(/\\([\[\]])/g,"$1");if("!"!==e[0].charAt(0)){r.state.inLink=!0;const e={type:"link",raw:n,href:i,title:o,text:l,tokens:r.inlineTokens(l)};return r.state.inLink=!1,e}return{type:"image",raw:n,href:i,title:o,text:O(l)}}class Z{constructor(e){this.options=e||x}space(e){const t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){const t=this.rules.block.code.exec(e);if(t){const e=t[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?e:B(e,"\n")}}}fences(e){const t=this.rules.block.fences.exec(e);if(t){const e=t[0],n=function(e,t){const n=e.match(/^(\s+)(?:```)/);if(null===n)return t;const r=n[1];return t.split("\n").map((e=>{const t=e.match(/^\s+/);if(null===t)return e;const[n]=t;return n.length>=r.length?e.slice(r.length):e})).join("\n")}(e,t[3]||"");return{type:"code",raw:e,lang:t[2]?t[2].trim().replace(this.rules.inline._escapes,"$1"):t[2],text:n}}}heading(e){const t=this.rules.block.heading.exec(e);if(t){let e=t[2].trim();if(/#$/.test(e)){const t=B(e,"#");this.options.pedantic?e=t.trim():t&&!/ $/.test(t)||(e=t.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(e){const t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:t[0]}}blockquote(e){const t=this.rules.block.blockquote.exec(e);if(t){const e=t[0].replace(/^ *>[ \t]?/gm,""),n=this.lexer.state.top;this.lexer.state.top=!0;const r=this.lexer.blockTokens(e);return this.lexer.state.top=n,{type:"blockquote",raw:t[0],tokens:r,text:e}}}list(e){let t=this.rules.block.list.exec(e);if(t){let n,r,i,o,l,a,s,c,u,d,h,f,p=t[1].trim();const g=p.length>1,m={type:"list",raw:"",ordered:g,start:g?+p.slice(0,-1):"",loose:!1,items:[]};p=g?`\\d{1,9}\\${p.slice(-1)}`:`\\${p}`,this.options.pedantic&&(p=g?p:"[*+-]");const v=new RegExp(`^( {0,3}${p})((?:[\t ][^\\n]*)?(?:\\n|$))`);for(;e&&(f=!1,t=v.exec(e))&&!this.rules.block.hr.test(e);){if(n=t[0],e=e.substring(n.length),c=t[2].split("\n",1)[0].replace(/^\t+/,(e=>" ".repeat(3*e.length))),u=e.split("\n",1)[0],this.options.pedantic?(o=2,h=c.trimLeft()):(o=t[2].search(/[^ ]/),o=o>4?1:o,h=c.slice(o),o+=t[1].length),a=!1,!c&&/^ *$/.test(u)&&(n+=u+"\n",e=e.substring(u.length+1),f=!0),!f){const t=new RegExp(`^ {0,${Math.min(3,o-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ \t][^\\n]*)?(?:\\n|$))`),r=new RegExp(`^ {0,${Math.min(3,o-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),i=new RegExp(`^ {0,${Math.min(3,o-1)}}(?:\`\`\`|~~~)`),l=new RegExp(`^ {0,${Math.min(3,o-1)}}#`);for(;e&&(d=e.split("\n",1)[0],u=d,this.options.pedantic&&(u=u.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),!i.test(u))&&!l.test(u)&&!t.test(u)&&!r.test(e);){if(u.search(/[^ ]/)>=o||!u.trim())h+="\n"+u.slice(o);else{if(a)break;if(c.search(/[^ ]/)>=4)break;if(i.test(c))break;if(l.test(c))break;if(r.test(c))break;h+="\n"+u}a||u.trim()||(a=!0),n+=d+"\n",e=e.substring(d.length+1),c=u.slice(o)}}m.loose||(s?m.loose=!0:/\n *\n *$/.test(n)&&(s=!0)),this.options.gfm&&(r=/^\[[ xX]\] /.exec(h),r&&(i="[ ] "!==r[0],h=h.replace(/^\[[ xX]\] +/,""))),m.items.push({type:"list_item",raw:n,task:!!r,checked:i,loose:!1,text:h}),m.raw+=n}m.items[m.items.length-1].raw=n.trimRight(),m.items[m.items.length-1].text=h.trimRight(),m.raw=m.raw.trimRight();const b=m.items.length;for(l=0;l<b;l++)if(this.lexer.state.top=!1,m.items[l].tokens=this.lexer.blockTokens(m.items[l].text,[]),!m.loose){const e=m.items[l].tokens.filter((e=>"space"===e.type)),t=e.length>0&&e.some((e=>/\n.*\n/.test(e.raw)));m.loose=t}if(m.loose)for(l=0;l<b;l++)m.items[l].loose=!0;return m}}html(e){const t=this.rules.block.html.exec(e);if(t){const e={type:"html",raw:t[0],pre:!this.options.sanitizer&&("pre"===t[1]||"script"===t[1]||"style"===t[1]),text:t[0]};if(this.options.sanitize){const n=this.options.sanitizer?this.options.sanitizer(t[0]):O(t[0]);e.type="paragraph",e.text=n,e.tokens=this.lexer.inline(n)}return e}}def(e){const t=this.rules.block.def.exec(e);if(t){const e=t[1].toLowerCase().replace(/\s+/g," "),n=t[2]?t[2].replace(/^<(.*)>$/,"$1").replace(this.rules.inline._escapes,"$1"):"",r=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline._escapes,"$1"):t[3];return{type:"def",tag:e,raw:t[0],href:n,title:r}}}table(e){const t=this.rules.block.table.exec(e);if(t){const e={type:"table",header:N(t[1]).map((e=>({text:e}))),align:t[2].replace(/^ *|\| *$/g,"").split(/ *\| */),rows:t[3]&&t[3].trim()?t[3].replace(/\n[ \t]*$/,"").split("\n"):[]};if(e.header.length===e.align.length){e.raw=t[0];let n,r,i,o,l=e.align.length;for(n=0;n<l;n++)/^ *-+: *$/.test(e.align[n])?e.align[n]="right":/^ *:-+: *$/.test(e.align[n])?e.align[n]="center":/^ *:-+ *$/.test(e.align[n])?e.align[n]="left":e.align[n]=null;for(l=e.rows.length,n=0;n<l;n++)e.rows[n]=N(e.rows[n],e.header.length).map((e=>({text:e})));for(l=e.header.length,r=0;r<l;r++)e.header[r].tokens=this.lexer.inline(e.header[r].text);for(l=e.rows.length,r=0;r<l;r++)for(o=e.rows[r],i=0;i<o.length;i++)o[i].tokens=this.lexer.inline(o[i].text);return e}}}lheading(e){const t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:"="===t[2].charAt(0)?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){const t=this.rules.block.paragraph.exec(e);if(t){const e="\n"===t[1].charAt(t[1].length-1)?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:e,tokens:this.lexer.inline(e)}}}text(e){const t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){const t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:O(t[1])}}tag(e){const t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&/^<a /i.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&/^<\/a>/i.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:this.options.sanitize?"text":"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(t[0]):O(t[0]):t[0]}}link(e){const t=this.rules.inline.link.exec(e);if(t){const e=t[2].trim();if(!this.options.pedantic&&/^</.test(e)){if(!/>$/.test(e))return;const t=B(e.slice(0,-1),"\\");if((e.length-t.length)%2===0)return}else{const e=function(e,t){if(-1===e.indexOf(t[1]))return-1;const n=e.length;let r=0,i=0;for(;i<n;i++)if("\\"===e[i])i++;else if(e[i]===t[0])r++;else if(e[i]===t[1]&&(r--,r<0))return i;return-1}(t[2],"()");if(e>-1){const n=(0===t[0].indexOf("!")?5:4)+t[1].length+e;t[2]=t[2].substring(0,e),t[0]=t[0].substring(0,n).trim(),t[3]=""}}let n=t[2],r="";if(this.options.pedantic){const e=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(n);e&&(n=e[1],r=e[3])}else r=t[3]?t[3].slice(1,-1):"";return n=n.trim(),/^</.test(n)&&(n=this.options.pedantic&&!/>$/.test(e)?n.slice(1):n.slice(1,-1)),j(t,{href:n?n.replace(this.rules.inline._escapes,"$1"):n,title:r?r.replace(this.rules.inline._escapes,"$1"):r},t[0],this.lexer)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){let e=(n[2]||n[1]).replace(/\s+/g," ");if(e=t[e.toLowerCase()],!e){const e=n[0].charAt(0);return{type:"text",raw:e,text:e}}return j(n,e,n[0],this.lexer)}}emStrong(e,t,n=""){let r=this.rules.inline.emStrong.lDelim.exec(e);if(!r)return;if(r[3]&&n.match(/[\p{L}\p{N}]/u))return;const i=r[1]||r[2]||"";if(!i||i&&(""===n||this.rules.inline.punctuation.exec(n))){const n=r[0].length-1;let i,o,l=n,a=0;const s="*"===r[0][0]?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(s.lastIndex=0,t=t.slice(-1*e.length+n);null!=(r=s.exec(t));){if(i=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!i)continue;if(o=i.length,r[3]||r[4]){l+=o;continue}if((r[5]||r[6])&&n%3&&!((n+o)%3)){a+=o;continue}if(l-=o,l>0)continue;o=Math.min(o,o+l+a);const t=e.slice(0,n+r.index+(r[0].length-i.length)+o);if(Math.min(n,o)%2){const e=t.slice(1,-1);return{type:"em",raw:t,text:e,tokens:this.lexer.inlineTokens(e)}}const s=t.slice(2,-2);return{type:"strong",raw:t,text:s,tokens:this.lexer.inlineTokens(s)}}}}codespan(e){const t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(/\n/g," ");const n=/[^ ]/.test(e),r=/^ /.test(e)&&/ $/.test(e);return n&&r&&(e=e.substring(1,e.length-1)),e=O(e,!0),{type:"codespan",raw:t[0],text:e}}}br(e){const t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){const t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e,t){const n=this.rules.inline.autolink.exec(e);if(n){let e,r;return"@"===n[2]?(e=O(this.options.mangle?t(n[1]):n[1]),r="mailto:"+e):(e=O(n[1]),r=e),{type:"link",raw:n[0],text:e,href:r,tokens:[{type:"text",raw:e,text:e}]}}}url(e,t){let n;if(n=this.rules.inline.url.exec(e)){let e,r;if("@"===n[2])e=O(this.options.mangle?t(n[0]):n[0]),r="mailto:"+e;else{let t;do{t=n[0],n[0]=this.rules.inline._backpedal.exec(n[0])[0]}while(t!==n[0]);e=O(n[0]),r="www."===n[1]?"http://"+n[0]:n[0]}return{type:"link",raw:n[0],text:e,href:r,tokens:[{type:"text",raw:e,text:e}]}}}inlineText(e,t){const n=this.rules.inline.text.exec(e);if(n){let e;return e=this.lexer.state.inRawBlock?this.options.sanitize?this.options.sanitizer?this.options.sanitizer(n[0]):O(n[0]):n[0]:O(this.options.smartypants?t(n[0]):n[0]),{type:"text",raw:n[0],text:e}}}}const U={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,hr:/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/,html:"^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))",def:/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/,table:$,lheading:/^((?:.|\n(?!\n))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,text:/^[^\n]+/,_label:/(?!\s*\])(?:\\.|[^\[\]\\])+/,_title:/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/};U.def=D(U.def).replace("label",U._label).replace("title",U._title).getRegex(),U.bullet=/(?:[*+-]|\d{1,9}[.)])/,U.listItemStart=D(/^( *)(bull) */).replace("bull",U.bullet).getRegex(),U.list=D(U.list).replace(/bull/g,U.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+U.def.source+")").getRegex(),U._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",U._comment=/<!--(?!-?>)[\s\S]*?(?:-->|$)/,U.html=D(U.html,"i").replace("comment",U._comment).replace("tag",U._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),U.paragraph=D(U._paragraph).replace("hr",U.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",U._tag).getRegex(),U.blockquote=D(U.blockquote).replace("paragraph",U.paragraph).getRegex(),U.normal={...U},U.gfm={...U.normal,table:"^ *([^\\n ].*\\|.*)\\n {0,3}(?:\\| *)?(:?-+:? *(?:\\| *:?-+:? *)*)(?:\\| *)?(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"},U.gfm.table=D(U.gfm.table).replace("hr",U.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",U._tag).getRegex(),U.gfm.paragraph=D(U._paragraph).replace("hr",U.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("table",U.gfm.table).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",U._tag).getRegex(),U.pedantic={...U.normal,html:D("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",U._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:$,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:D(U.normal._paragraph).replace("hr",U.hr).replace("heading"," *#{1,6} *[^\n]").replace("lheading",U.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()};const X={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:$,tag:"^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(ref)\]/,nolink:/^!?\[(ref)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",emStrong:{lDelim:/^(?:\*+(?:([punct_])|[^\s*]))|^_+(?:([punct*])|([^\s_]))/,rDelimAst:/^(?:[^_*\\]|\\.)*?\_\_(?:[^_*\\]|\\.)*?\*(?:[^_*\\]|\\.)*?(?=\_\_)|(?:[^*\\]|\\.)+(?=[^*])|[punct_](\*+)(?=[\s]|$)|(?:[^punct*_\s\\]|\\.)(\*+)(?=[punct_\s]|$)|[punct_\s](\*+)(?=[^punct*_\s])|[\s](\*+)(?=[punct_])|[punct_](\*+)(?=[punct_])|(?:[^punct*_\s\\]|\\.)(\*+)(?=[^punct*_\s])/,rDelimUnd:/^(?:[^_*\\]|\\.)*?\*\*(?:[^_*\\]|\\.)*?\_(?:[^_*\\]|\\.)*?(?=\*\*)|(?:[^_\\]|\\.)+(?=[^_])|[punct*](\_+)(?=[\s]|$)|(?:[^punct*_\s\\]|\\.)(\_+)(?=[punct*\s]|$)|[punct*\s](\_+)(?=[^punct*_\s])|[\s](\_+)(?=[punct*])|[punct*](\_+)(?=[punct*])/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:$,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,punctuation:/^([\spunctuation])/};function Y(e){return e.replace(/---/g,"\u2014").replace(/--/g,"\u2013").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1\u2018").replace(/'/g,"\u2019").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1\u201c").replace(/"/g,"\u201d").replace(/\.{3}/g,"\u2026")}function K(e){let t,n,r="";const i=e.length;for(t=0;t<i;t++)n=e.charCodeAt(t),Math.random()>.5&&(n="x"+n.toString(16)),r+="&#"+n+";";return r}X._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",X.punctuation=D(X.punctuation).replace(/punctuation/g,X._punctuation).getRegex(),X.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g,X.escapedEmSt=/(?:^|[^\\])(?:\\\\)*\\[*_]/g,X._comment=D(U._comment).replace("(?:--\x3e|$)","--\x3e").getRegex(),X.emStrong.lDelim=D(X.emStrong.lDelim).replace(/punct/g,X._punctuation).getRegex(),X.emStrong.rDelimAst=D(X.emStrong.rDelimAst,"g").replace(/punct/g,X._punctuation).getRegex(),X.emStrong.rDelimUnd=D(X.emStrong.rDelimUnd,"g").replace(/punct/g,X._punctuation).getRegex(),X._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,X._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,X._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,X.autolink=D(X.autolink).replace("scheme",X._scheme).replace("email",X._email).getRegex(),X._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,X.tag=D(X.tag).replace("comment",X._comment).replace("attribute",X._attribute).getRegex(),X._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,X._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/,X._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,X.link=D(X.link).replace("label",X._label).replace("href",X._href).replace("title",X._title).getRegex(),X.reflink=D(X.reflink).replace("label",X._label).replace("ref",U._label).getRegex(),X.nolink=D(X.nolink).replace("ref",U._label).getRegex(),X.reflinkSearch=D(X.reflinkSearch,"g").replace("reflink",X.reflink).replace("nolink",X.nolink).getRegex(),X.normal={...X},X.pedantic={...X.normal,strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:D(/^!?\[(label)\]\((.*?)\)/).replace("label",X._label).getRegex(),reflink:D(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",X._label).getRegex()},X.gfm={...X.normal,escape:D(X.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},X.gfm.url=D(X.gfm.url,"i").replace("email",X.gfm._extended_email).getRegex(),X.breaks={...X.gfm,br:D(X.br).replace("{2,}","*").getRegex(),text:D(X.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()};class G{constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||x,this.options.tokenizer=this.options.tokenizer||new Z,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const t={block:U.normal,inline:X.normal};this.options.pedantic?(t.block=U.pedantic,t.inline=X.pedantic):this.options.gfm&&(t.block=U.gfm,this.options.breaks?t.inline=X.breaks:t.inline=X.gfm),this.tokenizer.rules=t}static get rules(){return{block:U,inline:X}}static lex(e,t){return new G(t).lex(e)}static lexInline(e,t){return new G(t).inlineTokens(e)}lex(e){let t;for(e=e.replace(/\r\n|\r/g,"\n"),this.blockTokens(e,this.tokens);t=this.inlineQueue.shift();)this.inlineTokens(t.src,t.tokens);return this.tokens}blockTokens(e,t=[]){let n,r,i,o;for(e=this.options.pedantic?e.replace(/\t/g," ").replace(/^ +$/gm,""):e.replace(/^( *)(\t+)/gm,((e,t,n)=>t+" ".repeat(n.length)));e;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some((r=>!!(n=r.call({lexer:this},e,t))&&(e=e.substring(n.raw.length),t.push(n),!0)))))if(n=this.tokenizer.space(e))e=e.substring(n.raw.length),1===n.raw.length&&t.length>0?t[t.length-1].raw+="\n":t.push(n);else if(n=this.tokenizer.code(e))e=e.substring(n.raw.length),r=t[t.length-1],!r||"paragraph"!==r.type&&"text"!==r.type?t.push(n):(r.raw+="\n"+n.raw,r.text+="\n"+n.text,this.inlineQueue[this.inlineQueue.length-1].src=r.text);else if(n=this.tokenizer.fences(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.heading(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.hr(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.blockquote(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.list(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.html(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.def(e))e=e.substring(n.raw.length),r=t[t.length-1],!r||"paragraph"!==r.type&&"text"!==r.type?this.tokens.links[n.tag]||(this.tokens.links[n.tag]={href:n.href,title:n.title}):(r.raw+="\n"+n.raw,r.text+="\n"+n.raw,this.inlineQueue[this.inlineQueue.length-1].src=r.text);else if(n=this.tokenizer.table(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.lheading(e))e=e.substring(n.raw.length),t.push(n);else{if(i=e,this.options.extensions&&this.options.extensions.startBlock){let t=1/0;const n=e.slice(1);let r;this.options.extensions.startBlock.forEach((function(e){r=e.call({lexer:this},n),"number"===typeof r&&r>=0&&(t=Math.min(t,r))})),t<1/0&&t>=0&&(i=e.substring(0,t+1))}if(this.state.top&&(n=this.tokenizer.paragraph(i)))r=t[t.length-1],o&&"paragraph"===r.type?(r.raw+="\n"+n.raw,r.text+="\n"+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=r.text):t.push(n),o=i.length!==e.length,e=e.substring(n.raw.length);else if(n=this.tokenizer.text(e))e=e.substring(n.raw.length),r=t[t.length-1],r&&"text"===r.type?(r.raw+="\n"+n.raw,r.text+="\n"+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=r.text):t.push(n);else if(e){const t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){let n,r,i,o,l,a,s=e;if(this.tokens.links){const e=Object.keys(this.tokens.links);if(e.length>0)for(;null!=(o=this.tokenizer.rules.inline.reflinkSearch.exec(s));)e.includes(o[0].slice(o[0].lastIndexOf("[")+1,-1))&&(s=s.slice(0,o.index)+"["+W("a",o[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(o=this.tokenizer.rules.inline.blockSkip.exec(s));)s=s.slice(0,o.index)+"["+W("a",o[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;null!=(o=this.tokenizer.rules.inline.escapedEmSt.exec(s));)s=s.slice(0,o.index+o[0].length-2)+"++"+s.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex),this.tokenizer.rules.inline.escapedEmSt.lastIndex--;for(;e;)if(l||(a=""),l=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some((r=>!!(n=r.call({lexer:this},e,t))&&(e=e.substring(n.raw.length),t.push(n),!0)))))if(n=this.tokenizer.escape(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.tag(e))e=e.substring(n.raw.length),r=t[t.length-1],r&&"text"===n.type&&"text"===r.type?(r.raw+=n.raw,r.text+=n.text):t.push(n);else if(n=this.tokenizer.link(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.reflink(e,this.tokens.links))e=e.substring(n.raw.length),r=t[t.length-1],r&&"text"===n.type&&"text"===r.type?(r.raw+=n.raw,r.text+=n.text):t.push(n);else if(n=this.tokenizer.emStrong(e,s,a))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.codespan(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.br(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.del(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.autolink(e,K))e=e.substring(n.raw.length),t.push(n);else if(this.state.inLink||!(n=this.tokenizer.url(e,K))){if(i=e,this.options.extensions&&this.options.extensions.startInline){let t=1/0;const n=e.slice(1);let r;this.options.extensions.startInline.forEach((function(e){r=e.call({lexer:this},n),"number"===typeof r&&r>=0&&(t=Math.min(t,r))})),t<1/0&&t>=0&&(i=e.substring(0,t+1))}if(n=this.tokenizer.inlineText(i,Y))e=e.substring(n.raw.length),"_"!==n.raw.slice(-1)&&(a=n.raw.slice(-1)),l=!0,r=t[t.length-1],r&&"text"===r.type?(r.raw+=n.raw,r.text+=n.text):t.push(n);else if(e){const t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}else e=e.substring(n.raw.length),t.push(n);return t}}class q{constructor(e){this.options=e||x}code(e,t,n){const r=(t||"").match(/\S*/)[0];if(this.options.highlight){const t=this.options.highlight(e,r);null!=t&&t!==e&&(n=!0,e=t)}return e=e.replace(/\n$/,"")+"\n",r?'<pre><code class="'+this.options.langPrefix+O(r)+'">'+(n?e:O(e,!0))+"</code></pre>\n":"<pre><code>"+(n?e:O(e,!0))+"</code></pre>\n"}blockquote(e){return`<blockquote>\n${e}</blockquote>\n`}html(e){return e}heading(e,t,n,r){if(this.options.headerIds){return`<h${t} id="${this.options.headerPrefix+r.slug(n)}">${e}</h${t}>\n`}return`<h${t}>${e}</h${t}>\n`}hr(){return this.options.xhtml?"<hr/>\n":"<hr>\n"}list(e,t,n){const r=t?"ol":"ul";return"<"+r+(t&&1!==n?' start="'+n+'"':"")+">\n"+e+"</"+r+">\n"}listitem(e){return`<li>${e}</li>\n`}checkbox(e){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "}paragraph(e){return`<p>${e}</p>\n`}table(e,t){return t&&(t=`<tbody>${t}</tbody>`),"<table>\n<thead>\n"+e+"</thead>\n"+t+"</table>\n"}tablerow(e){return`<tr>\n${e}</tr>\n`}tablecell(e,t){const n=t.header?"th":"td";return(t.align?`<${n} align="${t.align}">`:`<${n}>`)+e+`</${n}>\n`}strong(e){return`<strong>${e}</strong>`}em(e){return`<em>${e}</em>`}codespan(e){return`<code>${e}</code>`}br(){return this.options.xhtml?"<br/>":"<br>"}del(e){return`<del>${e}</del>`}link(e,t,n){if(null===(e=F(this.options.sanitize,this.options.baseUrl,e)))return n;let r='<a href="'+e+'"';return t&&(r+=' title="'+t+'"'),r+=">"+n+"</a>",r}image(e,t,n){if(null===(e=F(this.options.sanitize,this.options.baseUrl,e)))return n;let r=`<img src="${e}" alt="${n}"`;return t&&(r+=` title="${t}"`),r+=this.options.xhtml?"/>":">",r}text(e){return e}}class Q{strong(e){return e}em(e){return e}codespan(e){return e}del(e){return e}html(e){return e}text(e){return e}link(e,t,n){return""+n}image(e,t,n){return""+n}br(){return""}}class J{constructor(){this.seen={}}serialize(e){return e.toLowerCase().trim().replace(/<[!\/a-z].*?>/gi,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")}getNextSafeSlug(e,t){let n=e,r=0;if(this.seen.hasOwnProperty(n)){r=this.seen[e];do{r++,n=e+"-"+r}while(this.seen.hasOwnProperty(n))}return t||(this.seen[e]=r,this.seen[n]=0),n}slug(e,t={}){const n=this.serialize(e);return this.getNextSafeSlug(n,t.dryrun)}}class ee{constructor(e){this.options=e||x,this.options.renderer=this.options.renderer||new q,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new Q,this.slugger=new J}static parse(e,t){return new ee(t).parse(e)}static parseInline(e,t){return new ee(t).parseInline(e)}parse(e,t=!0){let n,r,i,o,l,a,s,c,u,d,h,f,p,g,m,v,b,y,w,x="";const k=e.length;for(n=0;n<k;n++)if(d=e[n],this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[d.type]&&(w=this.options.extensions.renderers[d.type].call({parser:this},d),!1!==w||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(d.type)))x+=w||"";else switch(d.type){case"space":continue;case"hr":x+=this.renderer.hr();continue;case"heading":x+=this.renderer.heading(this.parseInline(d.tokens),d.depth,T(this.parseInline(d.tokens,this.textRenderer)),this.slugger);continue;case"code":x+=this.renderer.code(d.text,d.lang,d.escaped);continue;case"table":for(c="",s="",o=d.header.length,r=0;r<o;r++)s+=this.renderer.tablecell(this.parseInline(d.header[r].tokens),{header:!0,align:d.align[r]});for(c+=this.renderer.tablerow(s),u="",o=d.rows.length,r=0;r<o;r++){for(a=d.rows[r],s="",l=a.length,i=0;i<l;i++)s+=this.renderer.tablecell(this.parseInline(a[i].tokens),{header:!1,align:d.align[i]});u+=this.renderer.tablerow(s)}x+=this.renderer.table(c,u);continue;case"blockquote":u=this.parse(d.tokens),x+=this.renderer.blockquote(u);continue;case"list":for(h=d.ordered,f=d.start,p=d.loose,o=d.items.length,u="",r=0;r<o;r++)m=d.items[r],v=m.checked,b=m.task,g="",m.task&&(y=this.renderer.checkbox(v),p?m.tokens.length>0&&"paragraph"===m.tokens[0].type?(m.tokens[0].text=y+" "+m.tokens[0].text,m.tokens[0].tokens&&m.tokens[0].tokens.length>0&&"text"===m.tokens[0].tokens[0].type&&(m.tokens[0].tokens[0].text=y+" "+m.tokens[0].tokens[0].text)):m.tokens.unshift({type:"text",text:y}):g+=y),g+=this.parse(m.tokens,p),u+=this.renderer.listitem(g,b,v);x+=this.renderer.list(u,h,f);continue;case"html":x+=this.renderer.html(d.text);continue;case"paragraph":x+=this.renderer.paragraph(this.parseInline(d.tokens));continue;case"text":for(u=d.tokens?this.parseInline(d.tokens):d.text;n+1<k&&"text"===e[n+1].type;)d=e[++n],u+="\n"+(d.tokens?this.parseInline(d.tokens):d.text);x+=t?this.renderer.paragraph(u):u;continue;default:{const e='Token with "'+d.type+'" type was not found.';if(this.options.silent)return void console.error(e);throw new Error(e)}}return x}parseInline(e,t){t=t||this.renderer;let n,r,i,o="";const l=e.length;for(n=0;n<l;n++)if(r=e[n],this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[r.type]&&(i=this.options.extensions.renderers[r.type].call({parser:this},r),!1!==i||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(r.type)))o+=i||"";else switch(r.type){case"escape":case"text":o+=t.text(r.text);break;case"html":o+=t.html(r.text);break;case"link":o+=t.link(r.href,r.title,this.parseInline(r.tokens,t));break;case"image":o+=t.image(r.href,r.title,r.text);break;case"strong":o+=t.strong(this.parseInline(r.tokens,t));break;case"em":o+=t.em(this.parseInline(r.tokens,t));break;case"codespan":o+=t.codespan(r.text);break;case"br":o+=t.br();break;case"del":o+=t.del(this.parseInline(r.tokens,t));break;default:{const e='Token with "'+r.type+'" type was not found.';if(this.options.silent)return void console.error(e);throw new Error(e)}}return o}}class te{constructor(e){this.options=e||x}static passThroughHooks=new Set(["preprocess","postprocess"]);preprocess(e){return e}postprocess(e){return e}}function ne(e,t){return(n,r,i)=>{"function"===typeof r&&(i=r,r=null);const o={...r},l=function(e,t,n){return r=>{if(r.message+="\nPlease report this to https://github.com/markedjs/marked.",e){const e="<p>An error occurred:</p><pre>"+O(r.message+"",!0)+"</pre>";return t?Promise.resolve(e):n?void n(null,e):e}if(t)return Promise.reject(r);if(!n)throw r;n(r)}}((r={...re.defaults,...o}).silent,r.async,i);if("undefined"===typeof n||null===n)return l(new Error("marked(): input parameter is undefined or null"));if("string"!==typeof n)return l(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(n)+", string expected"));if(function(e){e&&e.sanitize&&!e.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")}(r),r.hooks&&(r.hooks.options=r),i){const o=r.highlight;let s;try{r.hooks&&(n=r.hooks.preprocess(n)),s=e(n,r)}catch(a){return l(a)}const c=function(e){let n;if(!e)try{r.walkTokens&&re.walkTokens(s,r.walkTokens),n=t(s,r),r.hooks&&(n=r.hooks.postprocess(n))}catch(a){e=a}return r.highlight=o,e?l(e):i(null,n)};if(!o||o.length<3)return c();if(delete r.highlight,!s.length)return c();let u=0;return re.walkTokens(s,(function(e){"code"===e.type&&(u++,setTimeout((()=>{o(e.text,e.lang,(function(t,n){if(t)return c(t);null!=n&&n!==e.text&&(e.text=n,e.escaped=!0),u--,0===u&&c()}))}),0))})),void(0===u&&c())}if(r.async)return Promise.resolve(r.hooks?r.hooks.preprocess(n):n).then((t=>e(t,r))).then((e=>r.walkTokens?Promise.all(re.walkTokens(e,r.walkTokens)).then((()=>e)):e)).then((e=>t(e,r))).then((e=>r.hooks?r.hooks.postprocess(e):e)).catch(l);try{r.hooks&&(n=r.hooks.preprocess(n));const i=e(n,r);r.walkTokens&&re.walkTokens(i,r.walkTokens);let o=t(i,r);return r.hooks&&(o=r.hooks.postprocess(o)),o}catch(a){return l(a)}}}function re(e,t,n){return ne(G.lex,ee.parse)(e,t,n)}re.options=re.setOptions=function(e){var t;return re.defaults={...re.defaults,...e},t=re.defaults,x=t,re},re.getDefaults=w,re.defaults=x,re.use=function(...e){const t=re.defaults.extensions||{renderers:{},childTokens:{}};e.forEach((e=>{const n={...e};if(n.async=re.defaults.async||n.async||!1,e.extensions&&(e.extensions.forEach((e=>{if(!e.name)throw new Error("extension name required");if(e.renderer){const n=t.renderers[e.name];t.renderers[e.name]=n?function(...t){let r=e.renderer.apply(this,t);return!1===r&&(r=n.apply(this,t)),r}:e.renderer}if(e.tokenizer){if(!e.level||"block"!==e.level&&"inline"!==e.level)throw new Error("extension level must be 'block' or 'inline'");t[e.level]?t[e.level].unshift(e.tokenizer):t[e.level]=[e.tokenizer],e.start&&("block"===e.level?t.startBlock?t.startBlock.push(e.start):t.startBlock=[e.start]:"inline"===e.level&&(t.startInline?t.startInline.push(e.start):t.startInline=[e.start]))}e.childTokens&&(t.childTokens[e.name]=e.childTokens)})),n.extensions=t),e.renderer){const t=re.defaults.renderer||new q;for(const n in e.renderer){const r=t[n];t[n]=(...i)=>{let o=e.renderer[n].apply(t,i);return!1===o&&(o=r.apply(t,i)),o}}n.renderer=t}if(e.tokenizer){const t=re.defaults.tokenizer||new Z;for(const n in e.tokenizer){const r=t[n];t[n]=(...i)=>{let o=e.tokenizer[n].apply(t,i);return!1===o&&(o=r.apply(t,i)),o}}n.tokenizer=t}if(e.hooks){const t=re.defaults.hooks||new te;for(const n in e.hooks){const r=t[n];te.passThroughHooks.has(n)?t[n]=i=>{if(re.defaults.async)return Promise.resolve(e.hooks[n].call(t,i)).then((e=>r.call(t,e)));const o=e.hooks[n].call(t,i);return r.call(t,o)}:t[n]=(...i)=>{let o=e.hooks[n].apply(t,i);return!1===o&&(o=r.apply(t,i)),o}}n.hooks=t}if(e.walkTokens){const t=re.defaults.walkTokens;n.walkTokens=function(n){let r=[];return r.push(e.walkTokens.call(this,n)),t&&(r=r.concat(t.call(this,n))),r}}re.setOptions(n)}))},re.walkTokens=function(e,t){let n=[];for(const r of e)switch(n=n.concat(t.call(re,r)),r.type){case"table":for(const e of r.header)n=n.concat(re.walkTokens(e.tokens,t));for(const e of r.rows)for(const r of e)n=n.concat(re.walkTokens(r.tokens,t));break;case"list":n=n.concat(re.walkTokens(r.items,t));break;default:re.defaults.extensions&&re.defaults.extensions.childTokens&&re.defaults.extensions.childTokens[r.type]?re.defaults.extensions.childTokens[r.type].forEach((function(e){n=n.concat(re.walkTokens(r[e],t))})):r.tokens&&(n=n.concat(re.walkTokens(r.tokens,t)))}return n},re.parseInline=ne(G.lexInline,ee.parseInline),re.Parser=ee,re.parser=ee.parse,re.Renderer=q,re.TextRenderer=Q,re.Lexer=G,re.lexer=G.lex,re.Tokenizer=Z,re.Slugger=J,re.Hooks=te,re.parse=re;re.options,re.setOptions,re.use,re.walkTokens,re.parseInline,ee.parse,G.lex;function ie(e="This should not happen"){throw new Error(e)}function oe(e,t="Assertion failed"){if(!e)return ie(t)}function le(e,t){return ie(null!=t?t:"Hell froze over")}var ae=Object.prototype.hasOwnProperty;function se(e,t){let n,r;if(e===t)return!0;if(e&&t&&(n=e.constructor)===t.constructor){if(n===Date)return e.getTime()===t.getTime();if(n===RegExp)return e.toString()===t.toString();if(n===Array){if((r=e.length)===t.length)for(;r--&&se(e[r],t[r]););return-1===r}if(!n||"object"===typeof e){for(n in r=0,e){if(ae.call(e,n)&&++r&&!ae.call(t,n))return!1;if(!(n in t)||!se(e[n],t[n]))return!1}return Object.keys(t).length===r}}return e!==e&&t!==t}var ce=class extends i.PureComponent{constructor(){super(...arguments),this.wrapperRef=i.createRef(),this.clickOutside=e=>{if((!this.props.isOutsideClick||this.props.isOutsideClick(e))&&null!==this.wrapperRef.current&&!this.wrapperRef.current.contains(e.target)){let t=e.target;for(;null!==t;){if(t.classList.contains("click-outside-ignore"))return;t=t.parentElement}this.props.onClickOutside()}}}componentDidMount(){document.addEventListener("touchend",this.clickOutside,!0),document.addEventListener("mousedown",this.clickOutside,!0),document.addEventListener("contextmenu",this.clickOutside,!0)}componentWillUnmount(){document.removeEventListener("touchend",this.clickOutside,!0),document.removeEventListener("mousedown",this.clickOutside,!0),document.removeEventListener("contextmenu",this.clickOutside,!0)}render(){const{onClickOutside:e,isOutsideClick:t,...n}=this.props;return i.createElement("div",{...n,ref:this.wrapperRef},this.props.children)}};function ue(e){var t,n;return{"--gdg-accent-color":e.accentColor,"--gdg-accent-fg":e.accentFg,"--gdg-accent-light":e.accentLight,"--gdg-text-dark":e.textDark,"--gdg-text-medium":e.textMedium,"--gdg-text-light":e.textLight,"--gdg-text-bubble":e.textBubble,"--gdg-bg-icon-header":e.bgIconHeader,"--gdg-fg-icon-header":e.fgIconHeader,"--gdg-text-header":e.textHeader,"--gdg-text-group-header":null!=(t=e.textGroupHeader)?t:e.textHeader,"--gdg-text-header-selected":e.textHeaderSelected,"--gdg-bg-cell":e.bgCell,"--gdg-bg-cell-medium":e.bgCellMedium,"--gdg-bg-header":e.bgHeader,"--gdg-bg-header-has-focus":e.bgHeaderHasFocus,"--gdg-bg-header-hovered":e.bgHeaderHovered,"--gdg-bg-bubble":e.bgBubble,"--gdg-bg-bubble-selected":e.bgBubbleSelected,"--gdg-bg-search-result":e.bgSearchResult,"--gdg-border-color":e.borderColor,"--gdg-horizontal-border-color":null!=(n=e.horizontalBorderColor)?n:e.borderColor,"--gdg-drilldown-border":e.drilldownBorder,"--gdg-link-color":e.linkColor,"--gdg-cell-horizontal-padding":`${e.cellHorizontalPadding}px`,"--gdg-cell-vertical-padding":`${e.cellVerticalPadding}px`,"--gdg-header-font-style":e.headerFontStyle,"--gdg-base-font-style":e.baseFontStyle,"--gdg-marker-font-style":e.markerFontStyle,"--gdg-font-family":e.fontFamily,"--gdg-editor-font-size":e.editorFontSize}}var de={accentColor:"#4F5DFF",accentFg:"#FFFFFF",accentLight:"rgba(62, 116, 253, 0.1)",textDark:"#313139",textMedium:"#737383",textLight:"#B2B2C0",textBubble:"#313139",bgIconHeader:"#737383",fgIconHeader:"#FFFFFF",textHeader:"#313139",textGroupHeader:"#313139BB",textHeaderSelected:"#FFFFFF",bgCell:"#FFFFFF",bgCellMedium:"#FAFAFB",bgHeader:"#F7F7F8",bgHeaderHasFocus:"#E9E9EB",bgHeaderHovered:"#EFEFF1",bgBubble:"#EDEDF3",bgBubbleSelected:"#FFFFFF",bgSearchResult:"#fff9e3",borderColor:"rgba(115, 116, 131, 0.16)",drilldownBorder:"rgba(0, 0, 0, 0)",linkColor:"#4F5DFF",cellHorizontalPadding:8,cellVerticalPadding:3,headerIconSize:18,headerFontStyle:"600 13px",baseFontStyle:"13px",markerFontStyle:"9px",fontFamily:"Inter, Roboto, -apple-system, BlinkMacSystemFont, avenir next, avenir, segoe ui, helvetica neue, helvetica, Ubuntu, noto, arial, sans-serif",editorFontSize:"13px",lineHeight:1.4};function he(){return de}var fe=i.createContext(de);function pe(){return i.useContext(fe)}var ge,me,ve,be,ye=null,we=void 0,xe="header",ke="group-header",Se="out-of-bounds";(me=ge||(ge={})).Uri="uri",me.Text="text",me.Image="image",me.RowID="row-id",me.Number="number",me.Bubble="bubble",me.Boolean="boolean",me.Loading="loading",me.Markdown="markdown",me.Drilldown="drilldown",me.Protected="protected",me.Custom="custom",(be=ve||(ve={})).HeaderRowID="headerRowID",be.HeaderCode="headerCode",be.HeaderNumber="headerNumber",be.HeaderString="headerString",be.HeaderBoolean="headerBoolean",be.HeaderAudioUri="headerAudioUri",be.HeaderVideoUri="headerVideoUri",be.HeaderEmoji="headerEmoji",be.HeaderImage="headerImage",be.HeaderUri="headerUri",be.HeaderPhone="headerPhone",be.HeaderMarkdown="headerMarkdown",be.HeaderDate="headerDate",be.HeaderTime="headerTime",be.HeaderEmail="headerEmail",be.HeaderReference="headerReference",be.HeaderIfThenElse="headerIfThenElse",be.HeaderSingleValue="headerSingleValue",be.HeaderLookup="headerLookup",be.HeaderTextTemplate="headerTextTemplate",be.HeaderMath="headerMath",be.HeaderRollup="headerRollup",be.HeaderJoinStrings="headerJoinStrings",be.HeaderSplitString="headerSplitString",be.HeaderGeoDistance="headerGeoDistance",be.HeaderArray="headerArray",be.RowOwnerOverlay="rowOwnerOverlay",be.ProtectedColumnOverlay="protectedColumnOverlay";var Ce,Me,Ee,Re="___gdg_header_cell_",Oe=Re+"checked",Ie=Re+"unchecked",Te=Re+"indeterminate";function Pe(e){return"width"in e&&"number"===typeof e.width}async function De(e){return"object"===typeof e?e:await e()}function He(e){return e.kind!==ge.Loading&&e.kind!==ge.Bubble&&e.kind!==ge.RowID&&e.kind!==ge.Protected&&e.kind!==ge.Drilldown}function Le(e){return e.kind===Ce.Marker||e.kind===Ce.NewRow}function Fe(e){return!(!He(e)||e.kind===ge.Image)&&(e.kind===ge.Text||e.kind===ge.Number||e.kind===ge.Markdown||e.kind===ge.Uri||e.kind===ge.Custom||e.kind===ge.Boolean?!0!==e.readonly:void le(0,"A cell was passed with an invalid kind"))}function ze(e){return d(e,"editor")}function Ae(e){var t;return!(null!=(t=e.readonly)&&t)}(Me=Ce||(Ce={})).NewRow="new-row",Me.Marker="marker";var _e=class{constructor(e){this.items=e,this.offset=e=>{if(0===e)return this;const t=this.items.map((t=>[t[0]+e,t[1]+e]));return new _e(t)},this.add=e=>{const t="number"===typeof e?[e,e+1]:e,n=function(e){if(0===e.length)return[];const t=[...e],n=[];t.sort((function(e,t){return e[0]-t[0]})),n.push([...t[0]]);for(const r of t.slice(1)){const e=n[n.length-1];e[1]<r[0]?n.push([...r]):e[1]<r[1]&&(e[1]=r[1])}return n}([...this.items,t]);return new _e(n)},this.remove=e=>{const t=[...this.items],n="number"===typeof e?e:e[0],r="number"===typeof e?e+1:e[1];for(const[i,o]of t.entries()){const[e,l]=o;if(e<=r&&n<=l){const o=[];e<n&&o.push([e,n]),r<l&&o.push([r,l]),t.splice(i,1,...o)}}return new _e(t)},this.first=()=>{if(0!==this.items.length)return this.items[0][0]},this.last=()=>{if(0!==this.items.length)return this.items.slice(-1)[0][1]-1},this.hasIndex=e=>{for(let t=0;t<this.items.length;t++){const[n,r]=this.items[t];if(e>=n&&e<r)return!0}return!1},this.hasAll=e=>{for(let t=e[0];t<e[1];t++)if(!this.hasIndex(t))return!1;return!0},this.some=e=>{for(const t of this)if(e(t))return!0;return!1},this.equals=e=>{if(e===this)return!0;if(e.items.length!==this.items.length)return!1;for(let t=0;t<this.items.length;t++){const n=e.items[t],r=this.items[t];if(n[0]!==r[0]||n[1]!==r[1])return!1}return!0},this.toArray=()=>{const e=[];for(const[t,n]of this.items)for(let r=t;r<n;r++)e.push(r);return e}}get length(){let e=0;for(const[t,n]of this.items)e+=n-t;return e}*[Symbol.iterator](){for(const[e,t]of this.items)for(let n=e;n<t;n++)yield n}},Ve=_e;Ve.empty=()=>null!=Ee?Ee:Ee=new _e([]),Ve.fromSingleSelection=e=>_e.empty().add(e);var $e=(0,r.d)("div")({name:"DataGridOverlayEditorStyle",class:"d1t1th9s",vars:{"d1t1th9s-0":[e=>e.targetY,"px"],"d1t1th9s-1":[e=>e.targetX-1,"px"],"d1t1th9s-2":[e=>e.targetY-1,"px"],"d1t1th9s-3":[e=>e.targetWidth+2,"px"],"d1t1th9s-4":[e=>e.targetHeight+2,"px"],"d1t1th9s-5":[e=>e.targetY+10,"px"],"d1t1th9s-6":[e=>Math.max(0,(e.targetHeight-28)/2),"px"]}});function Ne(){const[e,t]=function(){const[e,t]=i.useState();return[null!=e?e:void 0,t]}(),[n,r]=i.useState(0),[o,l]=i.useState(!0);i.useLayoutEffect((()=>{if(void 0===e)return;if(!("IntersectionObserver"in window))return;const t=new IntersectionObserver((e=>{0!==e.length&&l(e[0].isIntersecting)}),{threshold:1});return t.observe(e),()=>t.disconnect()}),[e]),i.useEffect((()=>{if(o||void 0===e)return;let t;const n=()=>{const{right:i}=e.getBoundingClientRect();r((e=>Math.min(e+window.innerWidth-i-10,0))),t=requestAnimationFrame(n)};return t=requestAnimationFrame(n),()=>{void 0!==t&&cancelAnimationFrame(t)}}),[e,o]);return{ref:t,style:i.useMemo((()=>({transform:`translateX(${n}px)`})),[n])}}var Be=e=>{const{target:t,content:n,onFinishEditing:r,forceEditMode:o,initialValue:l,imageEditorOverride:a,markdownDivCreateNode:s,highlight:c,className:d,theme:h,id:f,cell:p,validateCell:g,getCellRenderer:m,provideEditor:v,isOutsideClick:b}=e,[y,w]=i.useState(o?n:void 0),x=i.useRef(null!=y?y:n);x.current=null!=y?y:n;const[k,S]=i.useState((()=>void 0===g||!(He(n)&&!1===(null==g?void 0:g(p,n,x.current))))),C=i.useCallback(((e,t)=>{r(k?e:void 0,t)}),[k,r]),M=i.useCallback((e=>{if(void 0!==g&&void 0!==e&&He(e)){const t=g(p,e,x.current);!1===t?S(!1):"object"===typeof t?(e=t,S(!0)):S(!0)}w(e)}),[p,g]),E=i.useRef(!1),R=i.useRef(void 0),O=i.useCallback((()=>{C(y,[0,0]),E.current=!0}),[y,C]),I=i.useCallback(((e,t)=>{var n;C(e,null!=(n=null!=t?t:R.current)?n:[0,0]),E.current=!0}),[C]),T=i.useCallback((async e=>{let t=!1;"Escape"===e.key?(e.stopPropagation(),e.preventDefault(),R.current=[0,0]):"Enter"!==e.key||e.shiftKey?"Tab"===e.key&&(e.stopPropagation(),e.preventDefault(),R.current=[e.shiftKey?-1:1,0],t=!0):(e.stopPropagation(),e.preventDefault(),R.current=[0,1],t=!0),window.setTimeout((()=>{E.current||void 0===R.current||(C(t?y:void 0,R.current),E.current=!0)}),0)}),[C,y]),P=null!=y?y:n,[D,H]=i.useMemo((()=>{var e,t;if(Le(n))return[];const r=null==v?void 0:v(n);return void 0!==r?[r,!1]:[null==(t=null==(e=m(n))?void 0:e.provideEditor)?void 0:t.call(e,n),!1]}),[n,m,v]),{ref:L,style:F}=Ne();let z,A,_=!0,V=!0;if(void 0!==D){_=!0!==D.disablePadding,V=!0!==D.disableStyling;const e=ze(D);e&&(A=D.styleOverride);const n=e?D.editor:D;z=i.createElement(n,{isHighlighted:c,onChange:M,value:P,initialValue:l,onFinishedEditing:I,validatedSelection:He(P)?P.selectionRange:void 0,forceEditMode:o,target:t,imageEditorOverride:a,markdownDivCreateNode:s,isValid:k})}A={...A,...F};const $=document.getElementById("portal");if(null===$)return console.error('Cannot open Data Grid overlay editor, because portal not found. Please add `<div id="portal" />` as the last child of your `<body>`.'),null;let N=V?"gdg-style":"gdg-unstyle";return k||(N+=" invalid"),_&&(N+=" pad"),(0,u.createPortal)(i.createElement(fe.Provider,{value:h},i.createElement(ce,{style:ue(h),className:d,onClickOutside:O,isOutsideClick:b},i.createElement($e,{ref:L,id:f,className:N,style:A,as:!0===H?"label":void 0,targetX:t.x,targetY:t.y,targetWidth:t.width,targetHeight:t.height},i.createElement("div",{className:"clip-region",onKeyDown:T},z)))),$)},We=65536,je=[];function Ze(e,t){return t*We+e}function Ue(e){return e%We}function Xe(e,t){return(e-t)/We}function Ye(e){const t=Ue(e);return[t,Xe(e,t)]}var Ke=class{constructor(){this.imageLoaded=()=>{},this.loadedLocations=[],this.visibleWindow={x:0,y:0,width:0,height:0},this.freezeCols=0,this.isInWindow=e=>{const t=Ue(e),n=Xe(e,t),r=this.visibleWindow;return t<this.freezeCols&&n>=r.y&&n<=r.y+r.height||t>=r.x&&t<=r.x+r.width&&n>=r.y&&n<=r.y+r.height},this.cache={},this.sendLoaded=h((()=>{this.imageLoaded(this.loadedLocations),this.loadedLocations=[]}),20),this.clearOutOfWindow=()=>{const e=Object.keys(this.cache);for(const t of e){const e=this.cache[t];let n=!1;for(let t=0;t<e.cells.length;t++){const r=e.cells[t];if(this.isInWindow(r)){n=!0;break}}n?e.cells=e.cells.filter(this.isInWindow):(e.cancel(),delete this.cache[t])}}}setCallback(e){this.imageLoaded=e}setWindow(e,t){this.visibleWindow.x===e.x&&this.visibleWindow.y===e.y&&this.visibleWindow.width===e.width&&this.visibleWindow.height===e.height&&this.freezeCols===t||(this.visibleWindow=e,this.freezeCols=t,this.clearOutOfWindow())}loadImage(e,t,n,r){var i;let o=!1;const l=null!=(i=je.pop())?i:new Image;let a=!1;const s={img:void 0,cells:[Ze(t,n)],url:e,cancel:()=>{a||(a=!0,je.length<12?je.unshift(l):o||(l.src=""))}},c=new Promise((e=>l.addEventListener("load",(()=>e(null)))));requestAnimationFrame((async()=>{try{l.src=e,await c,await l.decode();const t=this.cache[r];if(void 0!==t&&!a){t.img=l;for(const e of t.cells)this.loadedLocations.push(Ye(e));o=!0,this.sendLoaded()}}catch(t){s.cancel()}})),this.cache[r]=s}loadOrGetImage(e,t,n){const r=e,i=this.cache[r];if(void 0!==i){const e=Ze(t,n);return i.cells.includes(e)||i.cells.push(e),i.img}this.loadImage(e,t,n,r)}};function Ge(e,t,n,r,o=!1){const l=i.useRef();l.current=t,i.useEffect((()=>{if(null===n||void 0===n.addEventListener)return;const t=n,i=e=>{var n;null==(n=l.current)||n.call(t,e)};return t.addEventListener(e,i,{passive:r,capture:o}),()=>{t.removeEventListener(e,i,{capture:o})}}),[e,n,r,o])}function qe(e,t){return void 0===e?void 0:t}var Qe=Math.PI;function Je(e){return e*Qe/180}var et=(e,t,n)=>({x1:e-n/2,y1:t-n/2,x2:e+n/2,y2:t+n/2}),tt=(e,t,n,r,i)=>{switch(e){case"left":return Math.floor(t)+r+i/2;case"center":return Math.floor(t+n/2);case"right":return Math.floor(t+n)-r-i/2}},nt=(e,t,n)=>Math.min(e,t-2*n),rt=(e,t,n)=>n.x1<=e&&e<=n.x2&&n.y1<=t&&t<=n.y2,it=e=>{var t;const n=null!=(t=e.fgColor)?t:"currentColor";return i.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i.createElement("path",{d:"M12.7073 7.05029C7.87391 11.8837 10.4544 9.30322 6.03024 13.7273C5.77392 13.9836 5.58981 14.3071 5.50189 14.6587L4.52521 18.5655C4.38789 19.1148 4.88543 19.6123 5.43472 19.475L9.34146 18.4983C9.69313 18.4104 10.0143 18.2286 10.2706 17.9722L16.9499 11.2929",stroke:n,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",fill:"none",vectorEffect:"non-scaling-stroke"}),i.createElement("path",{d:"M20.4854 4.92901L19.0712 3.5148C18.2901 2.73375 17.0238 2.73375 16.2428 3.5148L14.475 5.28257C15.5326 7.71912 16.4736 8.6278 18.7176 9.52521L20.4854 7.75744C21.2665 6.97639 21.2665 5.71006 20.4854 4.92901Z",stroke:n,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",fill:"none",vectorEffect:"non-scaling-stroke"}))},ot=e=>{var t;const n=null!=(t=e.fgColor)?t:"currentColor";return i.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i.createElement("path",{d:"M19 6L10.3802 17L5.34071 11.8758",vectorEffect:"non-scaling-stroke",stroke:n,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}))};var lt="\u0591-\u07ff\ufb1d-\ufdfd\ufe70-\ufefc",at="A-Za-z\xc0-\xd6\xd8-\xf6\xf8-\u02b8\u0300-\u0590\u0800-\u1fff\u200e\u2c00-\ufb1c\ufe00-\ufe6f\ufefd-\uffff",st=new RegExp("^[^"+at+"]*["+lt+"]"),ct=new RegExp("^[^"+lt+"]*["+at+"]");function ut(e){return st.test(e)?"rtl":ct.test(e)?"ltr":"neutral"}var dt=void 0;var ht=Symbol();function ft(e,t){return(null!=e?e:"")===(null!=t?t:"")}function pt(e,t,n){const r=n.x,i=n.x+n.width-1,o=n.y,l=n.y+n.height-1,[a,s]=e;if(s<o||s>l)return!1;if(void 0===t.span)return a>=r&&a<=i;const[c,u]=t.span;return c>=r&&c<=i||u>=r&&c<=i||c<r&&u>i}function gt(e,t){let n=e;if(void 0!==t){let r=[...e];const i=n[t.src];t.src>t.dest?(r.splice(t.src,1),r.splice(t.dest,0,i)):(r.splice(t.dest+1,0,i),r.splice(t.src,1)),r=r.map(((t,n)=>({...t,sticky:e[n].sticky}))),n=r}return n}function mt(e,t){let n=0;const r=gt(e,t);for(let i=0;i<r.length;i++){const e=r[i];if(!e.sticky)break;n+=e.width}return n}function vt(e,t,n,r,i){const o=gt(e,r),l=[];for(const c of o){if(!c.sticky)break;l.push(c)}if(l.length>0)for(const c of l)n-=c.width;let a=t,s=null!=i?i:0;for(;s<=n&&a<o.length;)s+=o[a].width,a++;for(let c=t;c<a;c++){const e=o[c];e.sticky||l.push(e)}return l}var bt=0,yt={},wt="undefined"===typeof window;function xt(e,t,n){const r=function(e,t,n,r){return`${e}_${null!=r?r:t.font}_${n}`}(e,t,"middle",n);let i=yt[r];return void 0===i&&(i=t.measureText(e),yt[r]=i,bt++),bt>1e4&&(yt={},bt=0),i}function kt(e,t){return"string"!==typeof t&&(t=`${t.baseFontStyle} ${t.fontFamily}`),function(e,t){for(const o of Ct)if(o.key===t)return o.val;const n=St(e,"alphabetic"),r=St(e,"middle"),i=-(r.actualBoundingBoxDescent-n.actualBoundingBoxDescent)+n.actualBoundingBoxAscent/2;return Ct.push({key:t,val:i}),i}(e,t)}function St(e,t){e.save(),e.textBaseline=t;const n=e.measureText("ABCDEFGHIJKLMNOPQRSTUVWXYZ");return e.restore(),n}!async function(){var e;wt||void 0===(null==(e=null==document?void 0:document.fonts)?void 0:e.ready)||(await document.fonts.ready,bt=0,yt={},f.clear(),g.clear(),p.clear())}();var Ct=[];function Mt(e,t,n){const{ctx:r,theme:i}=e,o=null!=t?t:{},l=null!=n?n:i.textDark;return l!==o.fillStyle&&(r.fillStyle=l,o.fillStyle=l),o}function Et(e,t,n){const{rect:r,ctx:i,theme:o}=e;i.fillStyle=o.textDark,It({ctx:i,rect:r,theme:o},t,n)}function Rt(e,t,n,r,i,o,l,a,s){"right"===s?e.fillText(t,n+i-(a.cellHorizontalPadding+.5),r+o/2+l):"center"===s?e.fillText(t,n+i/2,r+o/2+l):e.fillText(t,n+a.cellHorizontalPadding+.5,r+o/2+l)}function Ot(e,t){const n=xt("ABCi09jgqpy",e,t);return n.actualBoundingBoxAscent+n.actualBoundingBoxDescent}function It(e,t,n,r,i){const{ctx:o,rect:l,theme:a}=e,{x:s,y:c,width:u,height:d}=l;if(!(r=null!=r&&r)){t.includes("\n")&&(t=t.split(/\r?\n/)[0]);const e=u/4;t.length>e&&(t=t.slice(0,e))}const h=kt(o,a),g="rtl"===ut(t);if(void 0===n&&g&&(n="right"),g&&(o.direction="rtl"),t.length>0){let e=!1;if("right"===n?(o.textAlign="right",e=!0):void 0!==n&&"left"!==n&&(o.textAlign=n,e=!0),r){const e=`${a.fontFamily} ${a.baseFontStyle}`,r=function(e,t,n,r,i,o){let l=`${t}_${n}_${r}px`,a=f.get(l);if(void 0!==a)return a;if(r<=0)return[];let s=[],c=t.split("\n"),u=p.get(n),d=void 0===u?t.length:r/u.size*1.5,h=i&&void 0!==u&&u.count>2e4;for(let f of c){let t=m(e,f.slice(0,Math.max(0,d)),n,h),i=Math.min(f.length,d);if(t<=r)s.push(f);else{for(;t>r;){let l=v(e,f,r,n,t,i,h,o),a=f.slice(0,Math.max(0,l));f=f.slice(a.length),s.push(a),t=m(e,f.slice(0,Math.max(0,d)),n,h),i=Math.min(f.length,d)}t>0&&s.push(f)}}return s=s.map(((e,t)=>0===t?e.trimEnd():e.trim())),f.set(l,s),f.size>500&&f.delete(f.keys().next().value),s}(o,t,e,u-2*a.cellHorizontalPadding,null!=i&&i),l=Ot(o,e),g=a.lineHeight*l,b=l+g*(r.length-1),y=b+a.cellVerticalPadding>d;y&&(o.save(),o.rect(s,c,u,d),o.clip());const w=c+d/2-b/2;let x=Math.max(c+a.cellVerticalPadding,w);for(const t of r)if(Rt(o,t,s,x,u,l,h,a,n),x+=g,x>c+d)break;y&&o.restore()}else Rt(o,t,s,c,u,d,h,a,n);e&&(o.textAlign="start"),g&&(o.direction="inherit")}}function Tt(e,t,n,r,i,o,l,a,s=-20,c=-20,u=32,d="center"){const h=Math.floor(i+l/2),f=nt(u,l,t.cellVerticalPadding),p=f/2,g=tt(d,r,o,t.cellHorizontalPadding,f),m=et(g,h,f),v=rt(r+s,i+c,m);switch(n){case!0:e.beginPath(),Dt(e,g-f/2,h-f/2,f,f,4),e.fillStyle=a?t.accentColor:t.textMedium,e.fill(),e.beginPath(),e.moveTo(g-p+f/4.23,h-p+f/1.97),e.lineTo(g-p+f/2.42,h-p+f/1.44),e.lineTo(g-p+f/1.29,h-p+f/3.25),e.strokeStyle=t.bgCell,e.lineJoin="round",e.lineCap="round",e.lineWidth=1.9,e.stroke();break;case ye:case!1:e.beginPath(),Dt(e,g-f/2+.5,h-f/2+.5,f-1,f-1,4),e.lineWidth=1,e.strokeStyle=v?t.textDark:t.textMedium,e.stroke();break;case we:e.beginPath(),Dt(e,g-f/2,h-f/2,f,f,4),e.fillStyle=v?t.textMedium:t.textLight,e.fill(),e.beginPath(),e.moveTo(g-f/3,h),e.lineTo(g+f/3,h),e.strokeStyle=t.bgCell,e.lineCap="round",e.lineWidth=1.9,e.stroke();break;default:le()}}function Pt(e){const{ctx:t}=e;t.textAlign="start"}function Dt(e,t,n,r,i,o){"number"===typeof o&&(o={tl:o,tr:o,br:o,bl:o}),o={tl:Math.min(o.tl,i/2,r/2),tr:Math.min(o.tr,i/2,r/2),bl:Math.min(o.bl,i/2,r/2),br:Math.min(o.br,i/2,r/2)},e.moveTo(t+o.tl,n),e.arcTo(t+r,n,t+r,n+o.tr,o.tr),e.arcTo(t+r,n+i,t+r-o.br,n+i,o.br),e.arcTo(t,n+i,t,n+i-o.bl,o.bl),e.arcTo(t,n,t+o.tl,n,o.tl)}var Ht={};function Lt(e,t){const{rect:n,theme:r,ctx:i,imageLoader:o,col:l,row:a}=e,{x:s,width:c}=n,u=`${r.baseFontStyle} ${r.fontFamily}`,d=Ot(i,u),h=Math.min(n.height,Math.max(16,2*Math.ceil(d*r.lineHeight))),f=Math.floor(n.y+(n.height-h)/2),p=h-10;let g=s+r.cellHorizontalPadding;const m=function(e,t,n){const r=Math.ceil(window.devicePixelRatio),i=n-10,o=n*r,l=28*r,a=`${e},${t},${r},${n}`;if(void 0!==Ht[a])return{el:Ht[a],height:o,width:l,middleWidth:4*r,sideWidth:11*r,padding:5*r,dpr:r};const s=document.createElement("canvas"),c=s.getContext("2d");if(null===c)return null;s.width=l,s.height=o,c.scale(r,r),Ht[a]=s;const u=Math.min(6,9,i/2);return c.beginPath(),Dt(c,5,5,18,i,u),c.shadowColor="rgba(24, 25, 34, 0.4)",c.shadowBlur=1,c.fillStyle=e,c.fill(),c.shadowColor="rgba(24, 25, 34, 0.3)",c.shadowOffsetY=1,c.shadowBlur=5,c.fillStyle=e,c.fill(),c.shadowOffsetY=0,c.shadowBlur=0,c.shadowBlur=0,c.beginPath(),Dt(c,5.5,5.5,18,i,u),c.strokeStyle=t,c.lineWidth=1,c.stroke(),{el:s,height:o,width:l,sideWidth:11*r,middleWidth:6*r,padding:5*r,dpr:r}}(r.bgCell,r.drilldownBorder,h),v=[];for(const b of t){if(g>s+c)break;const e=xt(b.text,i,u).width;let t=0;if(void 0!==b.img){void 0!==o.loadOrGetImage(b.img,l,a)&&(t=p-8+4)}const n=e+t+16;v.push({x:g,width:n}),g+=n+4}if(null!==m){const{el:e,height:t,middleWidth:n,sideWidth:r,width:o,dpr:l,padding:a}=m,s=r/l,c=a/l;for(const u of v){const l=Math.floor(u.x),a=Math.floor(u.width),d=a-2*(s-c);i.imageSmoothingEnabled=!1,i.drawImage(e,0,0,r,t,l-c,f,s,h),d>0&&i.drawImage(e,r,0,n,t,l+(s-c),f,d,h),i.drawImage(e,o-r,0,r,t,l+a-(s-c),f,s,h),i.imageSmoothingEnabled=!0}}i.beginPath();for(const[b,y]of v.entries()){const e=t[b];let n=y.x+8;if(void 0!==e.img){const t=o.loadOrGetImage(e.img,l,a);if(void 0!==t){const e=p-8;let r=0,o=0,l=t.width,a=t.height;l>a?(r+=(l-a)/2,l=a):a>l&&(o+=(a-l)/2,a=l),i.beginPath(),Dt(i,n,f+h/2-e/2,e,e,3),i.save(),i.clip(),i.drawImage(t,r,o,l,a,n,f+h/2-e/2,e,e),i.restore(),n+=e+4}}i.beginPath(),i.fillStyle=r.textBubble,i.fillText(e.text,n,f+h/2+kt(i,r))}}function Ft(e,t,n,r,i,o,l,a,s,c,u,d,h,f,p){const g={x:0,y:o+c,width:0,height:0},m=o-i;if(e>=d){const t=l>e?-1:1,n=mt(f);g.x+=n+s;for(let r=l;r!==e;r+=t)g.x+=f[1===t?r:r-1].width*t}else for(let v=0;v<e;v++)g.x+=f[v].width;if(g.width=f[e].width+1,-1===t)g.y=i,g.height=m;else if(-2===t){g.y=0,g.height=i;let t=e;const r=f[e].group,o=f[e].sticky;for(;t>0&&ft(f[t-1].group,r)&&f[t-1].sticky===o;){const e=f[t-1];g.x-=e.width,g.width+=e.width,t--}let l=e;for(;l+1<f.length&&ft(f[l+1].group,r)&&f[l+1].sticky===o;){const e=f[l+1];g.width+=e.width,l++}if(!o){const e=mt(f),t=g.x-e;t<0&&(g.x-=t,g.width+=t),g.x+g.width>n&&(g.width=n-g.x)}}else if(h&&t===u-1){const e="number"===typeof p?p:p(t);g.y=r-e,g.height=e}else{const e=a>t?-1:1;if("number"===typeof p){const e=t-a;g.y+=e*p}else for(let n=a;n!==t;n+=e)g.y+=p(n)*e;g.height=("number"===typeof p?p:p(t))+1}return g}var zt='<svg width="20" height="20" fill="none" xmlns="http://www.w3.org/2000/svg">',At=e=>{const t=e.fgColor,n=e.bgColor;return`${zt}\n<path d="M16.222 2H3.778C2.8 2 2 2.8 2 3.778v12.444C2 17.2 2.8 18 3.778 18h12.444c.978 0 1.77-.8 1.77-1.778L18 3.778C18 2.8 17.2 2 16.222 2z" fill="${n}"/>\n<path fill-rule="evenodd" clip-rule="evenodd" d="M10.29 4.947a3.368 3.368 0 014.723.04 3.375 3.375 0 01.041 4.729l-.009.009-1.596 1.597a3.367 3.367 0 01-5.081-.364.71.71 0 011.136-.85 1.95 1.95 0 002.942.21l1.591-1.593a1.954 1.954 0 00-.027-2.733 1.95 1.95 0 00-2.732-.027l-.91.907a.709.709 0 11-1.001-1.007l.915-.911.007-.007z" fill="${t}"/>\n<path fill-rule="evenodd" clip-rule="evenodd" d="M6.55 8.678a3.368 3.368 0 015.082.364.71.71 0 01-1.136.85 1.95 1.95 0 00-2.942-.21l-1.591 1.593a1.954 1.954 0 00.027 2.733 1.95 1.95 0 002.73.028l.906-.906a.709.709 0 111.003 1.004l-.91.91-.008.01a3.368 3.368 0 01-4.724-.042 3.375 3.375 0 01-.041-4.728l.009-.009L6.55 8.678z" fill="${t}"/>\n</svg>\n `},_t={headerRowID:e=>{const t=e.fgColor,n=e.bgColor;return`\n ${zt}<rect x="2" y="2" width="16" height="16" rx="2" fill="${n}"/><path d="M15.75 4h-1.5a.25.25 0 0 0-.177.074L9.308 8.838a3.75 3.75 0 1 0 1.854 1.854l1.155-1.157.967.322a.5.5 0 0 0 .65-.55l-.18-1.208.363-.363.727.331a.5.5 0 0 0 .69-.59l-.254-.904.647-.647A.25.25 0 0 0 16 5.75v-1.5a.25.25 0 0 0-.25-.25zM7.5 13.25a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0z" fill="${t}"/></svg>`},headerNumber:e=>{const t=e.fgColor,n=e.bgColor;return`${zt}\n <path d="M16.22 2H3.78C2.8 2 2 2.8 2 3.78v12.44C2 17.2 2.8 18 3.78 18h12.44c.98 0 1.77-.8 1.77-1.78L18 3.78C18 2.8 17.2 2 16.22 2z" fill="${n}"/>\n <path d="M6.52 12.78H5.51V8.74l-1.33.47v-.87l2.29-.83h.05v5.27zm5.2 0H8.15v-.69l1.7-1.83a6.38 6.38 0 0 0 .34-.4c.09-.11.16-.22.22-.32s.1-.19.12-.27a.9.9 0 0 0 0-.56.63.63 0 0 0-.15-.23.58.58 0 0 0-.22-.15.75.75 0 0 0-.29-.05c-.27 0-.48.08-.62.23a.95.95 0 0 0-.2.65H8.03c0-.24.04-.46.13-.67a1.67 1.67 0 0 1 .97-.91c.23-.1.49-.14.77-.14.26 0 .5.04.7.11.21.08.38.18.52.32.14.13.25.3.32.48a1.74 1.74 0 0 1 .03 1.13 2.05 2.05 0 0 1-.24.47 4.16 4.16 0 0 1-.35.47l-.47.5-1 1.05h2.32v.8zm1.8-3.08h.55c.28 0 .48-.06.61-.2a.76.76 0 0 0 .2-.55.8.8 0 0 0-.05-.28.56.56 0 0 0-.13-.22.6.6 0 0 0-.23-.15.93.93 0 0 0-.32-.05.92.92 0 0 0-.29.05.72.72 0 0 0-.23.12.57.57 0 0 0-.21.46H12.4a1.3 1.3 0 0 1 .5-1.04c.15-.13.33-.23.54-.3a2.48 2.48 0 0 1 1.4 0c.2.06.4.15.55.28.15.13.27.28.36.47.08.19.13.4.13.65a1.15 1.15 0 0 1-.2.65 1.36 1.36 0 0 1-.58.49c.15.05.28.12.38.2a1.14 1.14 0 0 1 .43.62c.03.13.05.26.05.4 0 .25-.05.47-.14.66a1.42 1.42 0 0 1-.4.49c-.16.13-.35.23-.58.3a2.51 2.51 0 0 1-.73.1c-.22 0-.44-.03-.65-.09a1.8 1.8 0 0 1-.57-.28 1.43 1.43 0 0 1-.4-.47 1.41 1.41 0 0 1-.15-.66h1a.66.66 0 0 0 .22.5.87.87 0 0 0 .58.2c.25 0 .45-.07.6-.2a.71.71 0 0 0 .21-.56.97.97 0 0 0-.06-.36.61.61 0 0 0-.18-.25.74.74 0 0 0-.28-.15 1.33 1.33 0 0 0-.37-.04h-.55V9.7z" fill="${t}"/>\n </svg>`},headerCode:e=>{const t=e.fgColor,n=e.bgColor;return`\n ${zt}<rect x="2" y="2" width="16" height="16" rx="4" fill="${n}"/><path d="m12.223 13.314 3.052-2.826a.65.65 0 0 0 0-.984l-3.052-2.822c-.27-.25-.634-.242-.865.022-.232.263-.206.636.056.882l2.601 2.41-2.601 2.41c-.262.245-.288.619-.056.882.231.263.595.277.865.026Zm-4.444.005c.266.25.634.241.866-.027.231-.263.206-.636-.06-.882L5.983 10l2.602-2.405c.266-.25.291-.62.06-.887-.232-.263-.596-.272-.866-.022L4.723 9.51a.653.653 0 0 0 0 .983l3.056 2.827Z" fill="${t}"/></svg>`},headerString:e=>{const t=e.fgColor,n=e.bgColor;return`${zt}\n <path d="M16.222 2H3.778C2.8 2 2 2.8 2 3.778v12.444C2 17.2 2.8 18 3.778 18h12.444c.978 0 1.77-.8 1.77-1.778L18 3.778C18 2.8 17.2 2 16.222 2z" fill="${n}"/>\n <path d="M8.182 12.4h3.636l.655 1.6H14l-3.454-8H9.455L6 14h1.527l.655-1.6zM10 7.44l1.36 3.651H8.64L10 7.441z" fill="${t}"/>\n</svg>`},headerBoolean:e=>{const t=e.fgColor,n=e.bgColor;return`${zt}\n <path\n d="M16.2222 2H3.77778C2.8 2 2 2.8 2 3.77778V16.2222C2 17.2 2.8 18 3.77778 18H16.2222C17.2 18 17.9911 17.2 17.9911 16.2222L18 3.77778C18 2.8 17.2 2 16.2222 2Z"\n fill="${n}"\n />\n <path\n fill-rule="evenodd"\n clip-rule="evenodd"\n d="M7.66667 6.66669C5.73368 6.66669 4.16667 8.15907 4.16667 10C4.16667 11.841 5.73368 13.3334 7.66667 13.3334H12.3333C14.2663 13.3334 15.8333 11.841 15.8333 10C15.8333 8.15907 14.2663 6.66669 12.3333 6.66669H7.66667ZM12.5 12.5C13.8807 12.5 15 11.3807 15 10C15 8.61931 13.8807 7.50002 12.5 7.50002C11.1193 7.50002 10 8.61931 10 10C10 11.3807 11.1193 12.5 12.5 12.5Z"\n fill="${t}"\n />\n</svg>`},headerAudioUri:At,headerVideoUri:e=>{const t=e.fgColor,n=e.bgColor;return`${zt}\n <path d="M16.222 2H3.778C2.8 2 2 2.8 2 3.778v12.444C2 17.2 2.8 18 3.778 18h12.444c.978 0 1.77-.8 1.77-1.778L18 3.778C18 2.8 17.2 2 16.222 2z" fill="${n}"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M7 13.138a.5.5 0 00.748.434l5.492-3.138a.5.5 0 000-.868L7.748 6.427A.5.5 0 007 6.862v6.276z" fill="${t}"/>\n</svg>`},headerEmoji:e=>{const t=e.fgColor,n=e.bgColor;return`\n ${zt}\n <path d="M10 5a5 5 0 1 0 0 10 5 5 0 0 0 0-10zm0 9.17A4.17 4.17 0 0 1 5.83 10 4.17 4.17 0 0 1 10 5.83 4.17 4.17 0 0 1 14.17 10 4.17 4.17 0 0 1 10 14.17z" fill="${t}"/>\n <path d="M8.33 8.21a.83.83 0 1 0-.03 1.67.83.83 0 0 0 .03-1.67zm3.34 0a.83.83 0 1 0-.04 1.67.83.83 0 0 0 .04-1.67z" fill="${t}"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M14.53 13.9a2.82 2.82 0 0 1-5.06 0l.77-.38a1.97 1.97 0 0 0 3.52 0l.77.39z" fill="${t}"/>\n <path d="M16.22 2H3.78C2.8 2 2 2.8 2 3.78v12.44C2 17.2 2.8 18 3.78 18h12.44c.98 0 1.77-.8 1.77-1.78L18 3.78C18 2.8 17.2 2 16.22 2z" fill="${n}"/>\n <path d="M10 4a6 6 0 1 0 0 12 6 6 0 0 0 0-12zm0 11a5 5 0 1 1 .01-10.01A5 5 0 0 1 10 15z" fill="${t}"/>\n <path d="M8 7.86a1 1 0 1 0-.04 2 1 1 0 0 0 .04-2zm4 0a1 1 0 1 0-.04 2 1 1 0 0 0 .04-2z" fill="${t}"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M12.53 11.9a2.82 2.82 0 0 1-5.06 0l.77-.38a1.97 1.97 0 0 0 3.52 0l.77.39z" fill="${t}"/>\n </svg>`},headerImage:e=>{const t=e.fgColor,n=e.bgColor;return`${zt}\n <path d="M16.222 2H3.778C2.8 2 2 2.8 2 3.778v12.444C2 17.2 2.8 18 3.778 18h12.444c.978 0 1.77-.8 1.77-1.778L18 3.778C18 2.8 17.2 2 16.222 2z" fill="${n}"/>\n <path opacity=".5" fill-rule="evenodd" clip-rule="evenodd" d="M12.499 10.801a.5.5 0 01.835 0l2.698 4.098a.5.5 0 01-.418.775H10.22a.5.5 0 01-.417-.775l2.697-4.098z" fill="${t}"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M8.07 8.934a.5.5 0 01.824 0l4.08 5.958a.5.5 0 01-.412.782h-8.16a.5.5 0 01-.413-.782l4.08-5.958zM13.75 8.333a2.083 2.083 0 100-4.166 2.083 2.083 0 000 4.166z" fill="${t}"/>\n</svg>`},headerUri:At,headerPhone:e=>{const t=e.fgColor,n=e.bgColor;return`\n ${zt}\n <path fill="${t}" d="M3 3h14v14H3z"/>\n <path d="M16.22 2H3.78C2.8 2 2 2.8 2 3.78v12.44C2 17.2 2.8 18 3.78 18h12.44c.98 0 1.77-.8 1.77-1.78L18 3.78C18 2.8 17.2 2 16.22 2zm-7.24 9.78h1.23c.15 0 .27.06.36.18l.98 1.28a.43.43 0 0 1-.05.58l-1.2 1.21a.45.45 0 0 1-.6.04A6.72 6.72 0 0 1 7.33 10c0-.61.1-1.2.25-1.78a6.68 6.68 0 0 1 2.12-3.3.44.44 0 0 1 .6.04l1.2 1.2c.16.17.18.42.05.59l-.98 1.29a.43.43 0 0 1-.36.17H8.98A5.38 5.38 0 0 0 8.67 10c0 .62.11 1.23.3 1.79z" fill="${n}"/>\n </svg>`},headerMarkdown:e=>{const t=e.fgColor,n=e.bgColor;return`\n ${zt}\n <path d="M16.22 2H3.78C2.8 2 2 2.8 2 3.78v12.44C2 17.2 2.8 18 3.78 18h12.44c.98 0 1.77-.8 1.77-1.78L18 3.78C18 2.8 17.2 2 16.22 2z" fill="${n}"/>\n <path d="m13.49 13.15-2.32-3.27h1.4V7h1.86v2.88h1.4l-2.34 3.27zM11 13H9v-3l-1.5 1.92L6 10v3H4V7h2l1.5 2L9 7h2v6z" fill="${t}"/>\n </svg>`},headerDate:e=>{const t=e.fgColor,n=e.bgColor;return`${zt}\n <path d="M16.222 2H3.778C2.8 2 2 2.8 2 3.778v12.444C2 17.2 2.8 18 3.778 18h12.444c.978 0 1.77-.8 1.77-1.778L18 3.778C18 2.8 17.2 2 16.222 2z" fill="${n}"/>\n <path d="M14.8 4.182h-.6V3H13v1.182H7V3H5.8v1.182h-.6c-.66 0-1.2.532-1.2 1.182v9.454C4 15.468 4.54 16 5.2 16h9.6c.66 0 1.2-.532 1.2-1.182V5.364c0-.65-.54-1.182-1.2-1.182zm0 10.636H5.2V7.136h9.6v7.682z" fill="${t}"/>\n</svg>`},headerTime:e=>{const t=e.fgColor,n=e.bgColor;return`\n ${zt}\n <path d="M16.22 2H3.78C2.8 2 2 2.8 2 3.78v12.44C2 17.2 2.8 18 3.78 18h12.44c.98 0 1.77-.8 1.77-1.78L18 3.78C18 2.8 17.2 2 16.22 2z" fill="${n}"/>\n <path d="M10 4a6 6 0 0 0-6 6 6 6 0 0 0 6 6 6 6 0 0 0 6-6 6 6 0 0 0-6-6zm0 10.8A4.8 4.8 0 0 1 5.2 10a4.8 4.8 0 1 1 4.8 4.8z" fill="${t}"/>\n <path d="M10 7H9v3.93L12.5 13l.5-.8-3-1.76V7z" fill="${t}"/>\n </svg>`},headerEmail:e=>{const t=e.fgColor,n=e.bgColor;return`${zt}\n <rect x="2" y="2" width="16" height="16" rx="2" fill="${n}"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M10 8.643a1.357 1.357 0 100 2.714 1.357 1.357 0 000-2.714zM7.357 10a2.643 2.643 0 115.286 0 2.643 2.643 0 01-5.286 0z" fill="${t}"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M7.589 4.898A5.643 5.643 0 0115.643 10v.5a2.143 2.143 0 01-4.286 0V8a.643.643 0 011.286 0v2.5a.857.857 0 001.714 0V10a4.357 4.357 0 10-1.708 3.46.643.643 0 01.782 1.02 5.643 5.643 0 11-5.842-9.582z" fill="${t}"/>\n</svg>`},headerReference:e=>{const t=e.fgColor,n=e.bgColor;return`\n ${zt}\n <rect x="2" y="8" width="10" height="8" rx="2" fill="${n}"/>\n <rect x="8" y="4" width="10" height="8" rx="2" fill="${n}"/>\n <path d="M10.68 7.73V6l2.97 3.02-2.97 3.02v-1.77c-2.13 0-3.62.7-4.68 2.2.43-2.15 1.7-4.31 4.68-4.74z" fill="${t}"/>\n </svg>`},headerIfThenElse:e=>{const t=e.fgColor,n=e.bgColor;return`${zt}\n <path fill="${t}" d="M4 3h12v14H4z"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M3.6 2A1.6 1.6 0 002 3.6v12.8A1.6 1.6 0 003.6 18h12.8a1.6 1.6 0 001.6-1.6V3.6A1.6 1.6 0 0016.4 2H3.6zm11.3 10.8a.7.7 0 01.7.7v1.4a.7.7 0 01-.7.7h-1.4a.7.7 0 01-.7-.7v-1.4a.7.7 0 01.6-.693.117.117 0 00.1-.115V10.35a.117.117 0 00-.117-.116h-2.8a.117.117 0 00-.117.116v2.333c0 .064.053.117.117.117h.117a.7.7 0 01.7.7v1.4a.7.7 0 01-.7.7H9.3a.7.7 0 01-.7-.7v-1.4a.7.7 0 01.7-.7h.117a.117.117 0 00.117-.117V10.35a.117.117 0 00-.117-.117h-2.8a.117.117 0 00-.117.117v2.342c0 .058.042.106.1.115a.7.7 0 01.6.693v1.4a.7.7 0 01-.7.7H5.1a.7.7 0 01-.7-.7v-1.4a.7.7 0 01.7-.7h.35a.116.116 0 00.116-.117v-2.45c0-.515.418-.933.934-.933h2.917a.117.117 0 00.117-.117V6.85a.117.117 0 00-.117-.116h-2.45a.7.7 0 01-.7-.7V5.1a.7.7 0 01.7-.7h6.067a.7.7 0 01.7.7v.934a.7.7 0 01-.7.7h-2.45a.117.117 0 00-.118.116v2.333c0 .064.053.117.117.117H13.5c.516 0 .934.418.934.934v2.45c0 .063.052.116.116.116h.35z" fill="${n}"/>\n</svg>`},headerSingleValue:e=>{const t=e.fgColor,n=e.bgColor;return`\n ${zt}\n <rect x="2" y="2" width="16" height="16" rx="2" fill="${n}"/>\n <path d="M9.98 13.33c.45 0 .74-.3.73-.75l-.01-.1-.16-1.67 1.45 1.05a.81.81 0 0 0 .5.18c.37 0 .72-.32.72-.76 0-.3-.17-.54-.49-.68l-1.63-.77 1.63-.77c.32-.14.49-.37.49-.67 0-.45-.34-.76-.71-.76a.81.81 0 0 0-.5.18l-1.47 1.03.16-1.74.01-.08c.01-.46-.27-.76-.72-.76-.46 0-.76.32-.75.76l.01.08.16 1.74-1.47-1.03a.77.77 0 0 0-.5-.18.74.74 0 0 0-.72.76c0 .3.17.53.49.67l1.63.77-1.62.77c-.32.14-.5.37-.5.68 0 .44.35.75.72.75a.78.78 0 0 0 .5-.17L9.4 10.8l-.16 1.68v.09c-.02.44.28.75.74.75z" fill="${t}"/>\n </svg>`},headerLookup:e=>{const t=e.fgColor,n=e.bgColor;return`\n ${zt}\n <rect x="2" y="2" width="16" height="16" rx="2" fill="${n}"/>\n <path d="M8 5.83H5.83a.83.83 0 0 0 0 1.67h1.69A4.55 4.55 0 0 1 8 5.83zm-.33 3.34H5.83a.83.83 0 0 0 0 1.66h2.72a4.57 4.57 0 0 1-.88-1.66zM5.83 12.5a.83.83 0 0 0 0 1.67h7.5a.83.83 0 1 0 0-1.67h-7.5zm8.8-2.9a3.02 3.02 0 0 0 .46-1.6c0-1.66-1.32-3-2.94-3C10.52 5 9.2 6.34 9.2 8s1.31 3 2.93 3c.58 0 1.11-.17 1.56-.47l2.04 2.08.93-.94-2.04-2.08zm-2.48.07c-.9 0-1.63-.75-1.63-1.67s.73-1.67 1.63-1.67c.9 0 1.63.75 1.63 1.67s-.73 1.67-1.63 1.67z" fill="${t}"/>\n </svg>`},headerTextTemplate:e=>{const t=e.fgColor,n=e.bgColor;return`${zt}\n <rect x="2" y="2" width="16" height="16" rx="2" fill="${n}"/>\n <path d="M7.676 4.726V3l2.976 3.021-2.976 3.022v-1.77c-2.125 0-3.613.69-4.676 2.201.425-2.158 1.7-4.316 4.676-4.748zM10.182 14.4h3.636l.655 1.6H16l-3.454-8h-1.091L8 16h1.527l.655-1.6zM12 9.44l1.36 3.65h-2.72L12 9.44z" fill="${t}"/>\n</svg>`},headerMath:e=>{const t=e.fgColor,n=e.bgColor;return`${zt}\n <rect x="2" y="2" width="16" height="16" rx="2" fill="${n}"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M4.167 5.417a.833.833 0 100 1.666h4.166a.833.833 0 100-1.666H4.167z" fill="${t}"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M7.083 4.167a.833.833 0 10-1.666 0v4.166a.833.833 0 101.666 0V4.167zM11.667 5.417a.833.833 0 100 1.666h4.166a.833.833 0 100-1.666h-4.166zM5.367 11.688a.833.833 0 00-1.179 1.179l2.947 2.946a.833.833 0 001.178-1.178l-2.946-2.947z" fill="${t}"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M8.313 12.867a.833.833 0 10-1.178-1.179l-2.947 2.947a.833.833 0 101.179 1.178l2.946-2.946z" fill="${t}"/>\n <path d="M10.833 12.5c0-.46.373-.833.834-.833h4.166a.833.833 0 110 1.666h-4.166a.833.833 0 01-.834-.833zM10.833 15c0-.46.373-.833.834-.833h4.166a.833.833 0 110 1.666h-4.166a.833.833 0 01-.834-.833z" fill="${t}"/>\n</svg>`},headerRollup:e=>{const t=e.fgColor,n=e.bgColor;return`\n ${zt}\n <path d="M16.22 2H3.78C2.8 2 2 2.8 2 3.78v12.44C2 17.2 2.8 18 3.78 18h12.44c.98 0 1.77-.8 1.77-1.78L18 3.78C18 2.8 17.2 2 16.22 2z" fill="${n}"/>\n <path d="M10 8.84a1.16 1.16 0 1 0 0 2.32 1.16 1.16 0 0 0 0-2.32zm3.02 3.61a3.92 3.92 0 0 0 .78-3.28.49.49 0 1 0-.95.2c.19.87-.02 1.78-.58 2.47a2.92 2.92 0 1 1-4.13-4.08 2.94 2.94 0 0 1 2.43-.62.49.49 0 1 0 .17-.96 3.89 3.89 0 1 0 2.28 6.27zM10 4.17a5.84 5.84 0 0 0-5.44 7.93.49.49 0 1 0 .9-.35 4.86 4.86 0 1 1 2.5 2.67.49.49 0 1 0-.4.88c.76.35 1.6.54 2.44.53a5.83 5.83 0 0 0 0-11.66zm3.02 3.5a.7.7 0 1 0-1.4 0 .7.7 0 0 0 1.4 0zm-6.97 5.35a.7.7 0 1 1 0 1.4.7.7 0 0 1 0-1.4z" fill="${t}"/>\n </svg>`},headerJoinStrings:e=>{const t=e.fgColor,n=e.bgColor;return`${zt}\n <rect x="2" y="2" width="16" height="16" rx="2" fill="${n}"/>\n <path d="M12.4 13.565c1.865-.545 3.645-2.083 3.645-4.396 0-1.514-.787-2.604-2.071-2.604C12.69 6.565 12 7.63 12 8.939c1.114.072 1.865.726 1.865 1.683 0 .933-.8 1.647-1.84 2.023l.375.92zM4 5h6v2H4zM4 9h5v2H4zM4 13h4v2H4z" fill="${t}"/>\n</svg>`},headerSplitString:e=>{const t=e.fgColor,n=e.bgColor;return`\n ${zt}\n <rect x="2" y="2" width="16" height="16" rx="2" fill="${n}"/>\n <path d="M12.4 13.56c1.86-.54 3.65-2.08 3.65-4.4 0-1.5-.8-2.6-2.08-2.6S12 7.64 12 8.95c1.11.07 1.86.73 1.86 1.68 0 .94-.8 1.65-1.83 2.03l.37.91zM4 5h6v2H4zm0 4h5v2H4zm0 4h4v2H4z" fill="${t}"/>\n </svg>`},headerGeoDistance:e=>{const t=e.fgColor,n=e.bgColor;return`${zt}\n <path d="M16.222 2H3.778C2.8 2 2 2.8 2 3.778v12.444C2 17.2 2.8 18 3.778 18h12.444c.978 0 1.77-.8 1.77-1.778L18 3.778C18 2.8 17.2 2 16.222 2z" fill="${n}"/>\n <path d="M10 7a1 1 0 100-2v2zm0 6a1 1 0 100 2v-2zm0-8H7v2h3V5zm-3 6h5V9H7v2zm5 2h-2v2h2v-2zm1-1a1 1 0 01-1 1v2a3 3 0 003-3h-2zm-1-1a1 1 0 011 1h2a3 3 0 00-3-3v2zM4 8a3 3 0 003 3V9a1 1 0 01-1-1H4zm3-3a3 3 0 00-3 3h2a1 1 0 011-1V5z" fill="${t}"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M4.856 12.014a.5.5 0 00-.712.702L5.409 14l-1.265 1.284a.5.5 0 00.712.702l1.255-1.274 1.255 1.274a.5.5 0 00.712-.702L6.813 14l1.265-1.284a.5.5 0 00-.712-.702L6.11 13.288l-1.255-1.274zM12.856 4.014a.5.5 0 00-.712.702L13.409 6l-1.265 1.284a.5.5 0 10.712.702l1.255-1.274 1.255 1.274a.5.5 0 10.712-.702L14.813 6l1.265-1.284a.5.5 0 00-.712-.702L14.11 5.288l-1.255-1.274z" fill="${t}"/>\n</svg>`},headerArray:e=>{const t=e.fgColor,n=e.bgColor;return`${zt}\n <rect x="2" y="2" width="16" height="16" rx="2" fill="${n}"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M14.25 7.25a.75.75 0 000-1.5h-6.5a.75.75 0 100 1.5h6.5zM15 10a.75.75 0 01-.75.75h-6.5a.75.75 0 010-1.5h6.5A.75.75 0 0115 10zm-.75 4.25a.75.75 0 000-1.5h-6.5a.75.75 0 000 1.5h6.5zm-8.987-7a.75.75 0 100-1.5.75.75 0 000 1.5zm.75 2.75a.75.75 0 11-1.5 0 .75.75 0 011.5 0zm-.75 4.25a.75.75 0 100-1.5.75.75 0 000 1.5z" fill="${t}"/>\n</svg>`},rowOwnerOverlay:e=>{const t=e.fgColor;return`\n <svg width="18" height="18" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M2 15v1h14v-2.5c0-.87-.44-1.55-.98-2.04a6.19 6.19 0 0 0-1.9-1.14 12.1 12.1 0 0 0-2.48-.67A4 4 0 1 0 5 6a4 4 0 0 0 2.36 3.65c-.82.13-1.7.36-2.48.67-.69.28-1.37.65-1.9 1.13A2.8 2.8 0 0 0 2 13.5V15z" fill="${e.bgColor}" stroke="${t}" stroke-width="2"/>\n </svg>`},protectedColumnOverlay:e=>{const t=e.fgColor;return`\n <svg width="18" height="18" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M12.43 6.04v-.18a3.86 3.86 0 0 0-7.72 0v.18A2.15 2.15 0 0 0 3 8.14v5.72C3 15.04 3.96 16 5.14 16H12c1.18 0 2.14-.96 2.14-2.14V8.14c0-1.03-.73-1.9-1.71-2.1zM7.86 6v-.14a.71.71 0 1 1 1.43 0V6H7.86z" fill="${e.bgColor}" stroke="${t}" stroke-width="2"/>\n </svg>\n`},renameIcon:e=>{const t=e.bgColor;return`${zt}\n <path stroke="${t}" stroke-width="2" d="M12 3v14"/>\n <path stroke="${t}" stroke-width="2" stroke-linecap="round" d="M10 4h4m-4 12h4"/>\n <path d="M11 14h4a3 3 0 0 0 3-3V9a3 3 0 0 0-3-3h-4v2h4a1 1 0 0 1 1 1v2a1 1 0 0 1-1 1h-4v2ZM9.5 8H5a1 1 0 0 0-1 1v2a1 1 0 0 0 1 1h4.5v2H5a3 3 0 0 1-3-3V9a3 3 0 0 1 3-3h4.5v2Z" fill="${t}"/>\n </svg>\n`}};var Vt=class{constructor(e,t){this.onSettled=t,this.spriteMap=new Map,this.inFlight=0,this.headerIcons={..._t,...e}}drawSprite(e,t,n,r,i,o,l,a=1){const[s,c]=function(e,t){return"normal"===e?[t.bgIconHeader,t.fgIconHeader]:"selected"===e?["white",t.accentColor]:[t.accentColor,t.bgHeader]}(t,l),u=o*Math.ceil(window.devicePixelRatio),d=`${s}_${c}_${u}_${e}`;let h=this.spriteMap.get(d);if(void 0===h){const t=this.headerIcons[e];if(void 0===t)return;h=document.createElement("canvas");const n=h.getContext("2d");if(null===n)return;const r=new Image;r.src=`data:image/svg+xml;charset=utf-8,${encodeURIComponent(t({fgColor:c,bgColor:s}))}`,this.spriteMap.set(d,h);const i=r.decode();if(void 0===i)return;this.inFlight++,i.then((()=>{n.drawImage(r,0,0,u,u)})).finally((()=>{this.inFlight--,0===this.inFlight&&this.onSettled()}))}else a<1&&(n.globalAlpha=a),n.drawImage(h,0,0,u,u,r,i,o,o),a<1&&(n.globalAlpha=1)}},$t={},Nt=null;function Bt(e){const t=e.toLowerCase().trim();if(void 0!==$t[t])return $t[t];Nt=Nt||function(){const e=document.createElement("div");return e.style.opacity="0",e.style.pointerEvents="none",e.style.position="fixed",document.body.append(e),e}(),Nt.style.color="#000",Nt.style.color=t;const n=getComputedStyle(Nt).color;Nt.style.color="#fff",Nt.style.color=t;const r=getComputedStyle(Nt).color;if(r!==n)return[0,0,0,1];let i=r.replace(/[^\d.,]/g,"").split(",").map(Number.parseFloat);return i.length<4&&i.push(1),i=i.map((t=>{const n=Number.isNaN(t);return n&&console.warn("Could not parse color",e),n?0:t})),$t[t]=i,i}function Wt(e,t){const[n,r,i]=Bt(e);return`rgba(${n}, ${r}, ${i}, ${t})`}function jt(e,t){if(void 0===t)return e;const[n,r,i,o]=Bt(e);if(1===o)return e;const[l,a,s,c]=Bt(t),u=o+c*(1-o);return`rgba(${(o*n+c*l*(1-o))/u}, ${(o*r+c*a*(1-o))/u}, ${(o*i+c*s*(1-o))/u}, ${u})`}function Zt(e,t,n){if(n<=0)return e;if(n>=1)return t;const r=[...Bt(e)];r[0]=r[0]*r[3],r[1]=r[1]*r[3],r[2]=r[2]*r[3];const i=[...Bt(t)];i[0]=i[0]*i[3],i[1]=i[1]*i[3],i[2]=i[2]*i[3];const o=n,l=1-n,a=r[3]*l+i[3]*o;return`rgba(${Math.floor((r[0]*l+i[0]*o)/a)}, ${Math.floor((r[1]*l+i[1]*o)/a)}, ${Math.floor((r[2]*l+i[2]*o)/a)}, ${a})`}var Ut={kind:ge.Loading,allowOverlay:!1};function Xt(e,t,n,r,i,o,l,a,s,c,u,d,h,f,p,g,m,v,b,y){let w,x,k;void 0!==p&&p[0][0]===r&&p[0][1]===t&&(w=p[1][0],x=p[1][1]);const S={ctx:e,theme:c,col:r,row:t,cell:n,rect:{x:i,y:o,width:l,height:a},highlighted:s,hoverAmount:f,hoverX:w,hoverY:x,imageLoader:d,spriteManager:h,hyperWrapping:g,requestAnimationFrame:()=>{C=!0}};let C=!1;const M=function(e,t,n,r,i){const{ctx:o,rect:l,theme:a}=e;let s=Number.MAX_SAFE_INTEGER;if(void 0!==t&&(s=n-t,s<500)){const e=1-s/500;o.globalAlpha=e,o.fillStyle=a.bgSearchResult,o.fillRect(l.x,l.y,l.width,l.height),o.globalAlpha=1,void 0!==r&&(r.fillStyle=a.bgSearchResult)}return i(),s<500}(S,n.lastUpdated,m,v,(()=>{var e,t;if(!(!Le(n)&&!0===(null==u?void 0:u(S)))){const r=y(n);if(void 0!==r){(null==v?void 0:v.renderer)!==r&&(null==(e=null==v?void 0:v.deprep)||e.call(v,S),v=void 0);const i=null==(t=r.drawPrep)?void 0:t.call(r,S,v);r.draw(S,n),k={deprep:null==i?void 0:i.deprep,fillStyle:null==i?void 0:i.fillStyle,font:null==i?void 0:i.font,renderer:r}}}}));return(M||C)&&(null==b||b([r,t])),k}function Yt(e,t,n,r,i,o,l,a,s,c,u,d,h,f,p,g,m,v=!1){var y,w,x;if(void 0!==s){e.beginPath(),e.save(),e.rect(0,0,o,l);for(const t of s)e.rect(t.x+1,t.y+1,t.width-1,t.height-1);e.clip("evenodd")}const k=null!=(y=m.horizontalBorderColor)?y:m.borderColor,S=m.borderColor;let C=0,M=o,E=0,R=l;if(void 0!==a&&a.length>0){C=Number.MAX_SAFE_INTEGER,E=Number.MAX_SAFE_INTEGER,M=Number.MIN_SAFE_INTEGER,R=Number.MIN_SAFE_INTEGER;for(const e of a)C=Math.min(C,e.x-1),M=Math.max(M,e.x+e.width+1),E=Math.min(E,e.y-1),R=Math.max(R,e.y+e.height+1)}const O=[];e.beginPath();let I=.5;for(let b=0;b<t.length;b++){const e=t[b];if(0===e.width)continue;I+=e.width;const n=e.sticky?I:I+r;n>=C&&n<=M&&f(b+1)&&O.push({x1:n,y1:Math.max(c,E),x2:n,y2:Math.min(l,R),color:S})}const T=d(g-1),P=l-T+.5,D="sticky"===p;if(D&&O.push({x1:C,y1:P,x2:M,y2:P,color:k}),!0!==v){let e=u+.5,t=n;const r=D?l-T:l;for(;e+i<=r;){const n=e+i;if(n>=E&&n<=R-1&&(!D||t!==g-1||Math.abs(n-P)>1)){const e=null==h?void 0:h(t);O.push({x1:C,y1:n,x2:M,y2:n,color:null!=(x=null!=(w=null==e?void 0:e.horizontalBorderColor)?w:null==e?void 0:e.borderColor)?x:k})}e+=d(t),t++}}const H=b(O,(e=>e.color));for(const b of Object.keys(H)){e.strokeStyle=b;for(const t of H[b])e.moveTo(t.x1,t.y1),e.lineTo(t.x2,t.y2);e.stroke(),e.beginPath()}void 0!==s&&e.restore()}function Kt(e,t){const n=[];let r=e.x+e.width-26*t.length;const i=e.y+e.height/2-13;for(let o=0;o<t.length;o++)n.push({x:r,y:i,width:26,height:26}),r+=26;return n}function Gt(e,t,n){return t>=e.x&&t<=e.x+e.width&&n>=e.y&&n<=e.y+e.height}var qt=30;function Qt(e,t,n,r,i){return i?{x:e,y:t,width:qt,height:Math.min(qt,r)}:{x:e+n-qt,y:Math.max(t,t+r/2-qt/2),width:qt,height:Math.min(qt,r)}}function Jt(e,t,n,r,i,o,l,a,s,c,u,d,h,f){const p=o.title.startsWith(Re),g="rtl"===ut(o.title),m=Qt(t,n,r,i,g);if(void 0!==h){let f=o;if(p&&(f={...o,title:""}),h({ctx:e,theme:a,rect:{x:t,y:n,width:r,height:i},column:f,columnIndex:f.sourceIndex,isSelected:l,hoverAmount:u,isHovered:s,hasSelectedCell:c,spriteManager:d,menuBounds:m}))return}if(p){let l;return o.title===Oe&&(l=!0),o.title===Ie&&(l=!1),!0!==l&&(e.globalAlpha=u),Tt(e,a,l,t,n,r,i,!1,void 0,void 0,18),void(!0!==l&&(e.globalAlpha=1))}const v=a.cellHorizontalPadding,b=l?a.textHeaderSelected:a.textHeader,y=!0===o.hasMenu&&(s||f&&l),w=g?-1:1;let x=g?t+r-v:t+v;if(void 0!==o.icon){let t=l?"selected":"normal";"highlight"===o.style&&(t=l?"selected":"special");const r=a.headerIconSize;d.drawSprite(o.icon,t,e,g?x-r:x,n+(i-r)/2,r,a),void 0!==o.overlayIcon&&d.drawSprite(o.overlayIcon,l?"selected":"special",e,g?x-r+9:x+9,n+((i-18)/2+6),18,a),x+=Math.ceil(1.3*r)*w}if(y&&!0===o.hasMenu&&r>35){const n=35,i=(g?n:r-n)/r,o=(g?.7*n:r-.7*n)/r,l=e.createLinearGradient(t,0,t+r,0),a=Wt(b,0);l.addColorStop(g?1:0,b),l.addColorStop(i,b),l.addColorStop(o,a),l.addColorStop(g?0:1,a),e.fillStyle=l}else e.fillStyle=b;if(g&&(e.textAlign="right"),e.fillText(o.title,x,n+i/2+kt(e,`${a.headerFontStyle} ${a.fontFamily}`)),g&&(e.textAlign="left"),y&&!0===o.hasMenu){e.beginPath();const t=m.x+m.width/2-5.5,n=m.y+m.height/2-3;!function(e,t,n){const r=function(e,t){const n=t.x-e.x,r=t.y-e.y,i=Math.sqrt(n*n+r*r),o=n/i,l=r/i;return{x:n,y:t.y-e.y,len:i,nx:o,ny:l,ang:Math.atan2(l,o)}};let i;const o=t.length;let l=t[o-1];for(let a=0;a<o;a++){let s=t[a%o];const c=t[(a+1)%o],u=r(s,l),d=r(s,c),h=u.nx*d.ny-u.ny*d.nx,f=u.nx*d.nx-u.ny*-d.ny;let p=Math.asin(h<-1?-1:h>1?1:h),g=1,m=!1;f<0?p<0?p=Math.PI+p:(p=Math.PI-p,g=-1,m=!0):p>0&&(g=-1,m=!0),i=void 0!==s.radius?s.radius:n;const v=p/2;let b,y=Math.abs(Math.cos(v)*i/Math.sin(v));y>Math.min(u.len/2,d.len/2)?(y=Math.min(u.len/2,d.len/2),b=Math.abs(y*Math.sin(v)/Math.cos(v))):b=i;let w=s.x+d.nx*y,x=s.y+d.ny*y;w+=-d.ny*b*g,x+=d.nx*b*g,e.arc(w,x,b,u.ang+Math.PI/2*g,d.ang-Math.PI/2*g,m),l=s,s=c}e.closePath()}(e,[{x:t,y:n},{x:t+11,y:n},{x:t+5.5,y:n+6}],1),e.fillStyle=b,e.fill()}}function en(e,t,n,r,i,o,l,a,s,c,u,d,h,f,p,g,m,v,b){var y;const w=l+a;if(w<=0)return;e.fillStyle=d.bgHeader,e.fillRect(0,0,i,w);const[x,k]=null!=(y=null==r?void 0:r[0])?y:[],S=`${d.headerFontStyle} ${d.fontFamily}`;e.font=S,cn(t,0,o,0,w,((t,r,i,o)=>{var p,y,w;if(void 0!==m&&!m.some((e=>-1===e[1]&&e[0]===t.sourceIndex)))return;const C=Math.max(0,o-r);e.save(),e.beginPath(),e.rect(r+C,a,t.width-C,l),e.clip();const M=g(null!=(p=t.group)?p:"").overrideTheme,E=void 0===t.themeOverride&&void 0===M?d:{...d,...M,...t.themeOverride};E.bgHeader!==d.bgHeader&&(e.fillStyle=E.bgHeader,e.fill());const R=`${E.headerFontStyle} ${E.fontFamily}`;S!==R&&(e.font=R);const O=u.columns.hasIndex(t.sourceIndex),I=void 0!==s||c,T=!I&&-1===k&&x===t.sourceIndex,P=I?0:null!=(w=null==(y=f.find((e=>e.item[0]===t.sourceIndex&&-1===e.item[1])))?void 0:y.hoverAmount)?w:0,D=void 0!==(null==u?void 0:u.current)&&u.current.cell[0]===t.sourceIndex,H=O?E.accentColor:D?E.bgHeaderHasFocus:E.bgHeader,L=n?a:0,F=0===t.sourceIndex?0:1;O?(e.fillStyle=H,e.fillRect(r+F,L,t.width-F,l)):(D||P>0)&&(e.beginPath(),e.rect(r+F,L,t.width-F,l),D&&(e.fillStyle=E.bgHeaderHasFocus,e.fill()),P>0&&(e.globalAlpha=P,e.fillStyle=E.bgHeaderHovered,e.fill(),e.globalAlpha=1)),Jt(e,r,L,t.width,l,t,O,E,T,D,P,h,v,b),e.restore()})),n&&function(e,t,n,r,i,o,l,a,s,c,u,d){var h;const[f,p]=null!=(h=null==o?void 0:o[0])?h:[];let g=0;un(t,n,r,i,((t,n,r,s,h,m)=>{var v,b;if(void 0!==d&&!d.some((e=>-2===e[1]&&e[0]>=t[0]&&e[0]<=t[1])))return;e.save(),e.beginPath(),e.rect(r,s,h,m),e.clip();const y=u(n),w=void 0===(null==y?void 0:y.overrideTheme)?l:{...l,...y.overrideTheme},x=-2===p&&void 0!==f&&f>=t[0]&&f<=t[1],k=x?w.bgHeaderHovered:w.bgHeader;if(k!==l.bgHeader&&(e.fillStyle=k,e.fill()),e.fillStyle=null!=(v=w.textGroupHeader)?v:w.textHeader,void 0!==y){let t=r;if(void 0!==y.icon&&(a.drawSprite(y.icon,"normal",e,t+8,(i-20)/2,20,w),t+=26),e.fillText(y.name,t+8,i/2+kt(e,`${l.headerFontStyle} ${l.fontFamily}`)),void 0!==y.actions&&x){const t=Kt({x:r,y:s,width:h,height:m},y.actions);e.beginPath();const n=t[0].x-10,l=r+h-n;e.rect(n,0,l,i);const c=e.createLinearGradient(n,0,n+l,0),u=Wt(k,0);c.addColorStop(0,u),c.addColorStop(10/l,k),c.addColorStop(1,k),e.fillStyle=c,e.fill(),e.globalAlpha=.6;const[d,f]=null!=(b=null==o?void 0:o[1])?b:[-1,-1];for(let i=0;i<y.actions.length;i++){const n=y.actions[i],o=t[i],l=Gt(o,d+r,f);l&&(e.globalAlpha=1),a.drawSprite(n.icon,"normal",e,o.x+o.width/2-10,o.y+o.height/2-10,20,w),l&&(e.globalAlpha=.6)}e.globalAlpha=1}}0!==r&&c(t[0])&&(e.beginPath(),e.moveTo(r+.5,0),e.lineTo(r+.5,i),e.strokeStyle=l.borderColor,e.lineWidth=1,e.stroke()),e.restore(),g=r+h})),e.beginPath(),e.moveTo(g+.5,0),e.lineTo(g+.5,i),e.moveTo(0,i+.5),e.lineTo(n,i+.5),e.strokeStyle=l.borderColor,e.lineWidth=1,e.stroke()}(e,t,i,o,a,r,d,h,0,p,g,m)}function tn(e,t,n,r,i,o,l,a){return e<=i+l&&i<=e+n&&t<=o+a&&o<=t+r}function nn(e,t,n,r,i,o,l,a,s,c,u,d,h,f){if(void 0===h||0===h.length)return;const p="sticky"===d?u(c-1):0;e.beginPath(),un(t,n,l,i,((t,n,r,i,o,l)=>{for(let a=0;a<h.length;a++){const n=h[a];if(-2===n[1]&&n[0]>=t[0]&&n[0]<=t[1]){e.rect(r,i,o,l);break}}})),cn(t,s,l,a,o,((t,n,l,a,s)=>{const g=Math.max(0,a-n),m=n+g+1,v=t.width-g-1;for(let r=0;r<h.length;r++){const n=h[r];if(n[0]===t.sourceIndex&&(-1===n[1]||void 0===n[1])){e.rect(m,i,v,o-i);break}}f&&sn(s,l,r,c,u,d,((n,i,o,l)=>{let a=!1;for(let e=0;e<h.length;e++){const n=h[e];if(n[0]===t.sourceIndex&&n[1]===i){a=!0;break}}if(a){const t=n+1,i=(l?t+o-1:Math.min(t+o-1,r-p))-t;i>0&&e.rect(m,t,v,i)}}))})),e.clip()}function rn(e,t,n,r,i,o,l){var a,s;const[c,u]=e;let d,h;const f=null!=(s=null==(a=l.find((e=>!e.sticky)))?void 0:a.sourceIndex)?s:0;if(u>f){const e=Math.max(c,f);let a=t,s=r;for(let t=o.sourceIndex-1;t>=e;t--)a-=l[t].width,s+=l[t].width;for(let t=o.sourceIndex+1;t<=u;t++)s+=l[t].width;h={x:a,y:n,width:s,height:i}}if(f>c){const e=Math.min(u,f-1);let a=t,s=r;for(let t=o.sourceIndex-1;t>=c;t--)a-=l[t].width,s+=l[t].width;for(let t=o.sourceIndex+1;t<=e;t++)s+=l[t].width;d={x:a,y:n,width:s,height:i}}return[d,h]}function on(e,t,n,r,i,o,l,a,s,c,u,d,h,f,p,g,m,v,b,y,w,x,k,S,C,M,E,R,O,I,T){var P;let D=null!=(P=null==b?void 0:b.length)?P:Number.MAX_SAFE_INTEGER;const H=performance.now();let L,F=`${O.baseFontStyle} ${O.fontFamily}`;e.font=F;const z=new Set;return cn(t,a,o,l,i,((t,o,l,a,P)=>{var A;const _=Math.max(0,a-o),V=o+_,$=i+1,N=t.width-_,B=r-i-1;if(v.length>0){let e=!1;for(let t=0;t<v.length;t++){const n=v[t];if(tn(V,$,N,B,n.x,n.y,n.width,n.height)){e=!0;break}}if(!e)return}const W=()=>{e.save(),e.beginPath(),e.rect(V,$,N,B),e.clip()},j=y.columns.hasIndex(t.sourceIndex),Z=d(null!=(A=t.group)?A:"").overrideTheme,U=void 0===t.themeOverride&&void 0===Z?O:{...O,...Z,...t.themeOverride},X=`${U.baseFontStyle} ${U.fontFamily}`;let Y;return X!==F&&(F=X,e.font=X),W(),sn(P,l,r,s,c,m,((r,i,l,c,d)=>{var m,P,A,_;if(i<0)return;if(void 0!==b){let e=!1;for(let n=0;n<b.length;n++){const r=b[n];if(r[0]===t.sourceIndex&&r[1]===i){e=!0;break}}if(!e)return}if(v.length>0){let e=!1;for(let n=0;n<v.length;n++){const i=v[n];if(tn(o,r,t.width,l,i.x,i.y,i.width,i.height)){e=!0;break}}if(!e)return}const V=y.rows.hasIndex(i),$=f.hasIndex(i),N=i<s?u([t.sourceIndex,i]):Ut;let B=o,Z=t.width,K=!1,G=!1;if(void 0!==N.span){const[s,c]=N.span,u=`${i},${s},${c},${t.sticky}`;if(z.has(u))return void D--;{const i=rn(N.span,o,r,t.width,l,t,n),s=t.sticky?i[0]:i[1];if(t.sticky||void 0===i[0]||(G=!0),void 0!==s){B=s.x,Z=s.width,z.add(u),e.restore(),Y=void 0,e.save(),e.beginPath();const t=Math.max(0,a-s.x);e.rect(s.x+t,r,s.width-t,l),void 0===L&&(L=[]),L.push({x:s.x+t,y:r,width:s.width-t,height:l}),e.clip(),K=!0}}}const q=null==h?void 0:h(i),Q=d&&void 0!==(null==(m=t.trailingRowOptions)?void 0:m.themeOverride)?null==(P=t.trailingRowOptions)?void 0:P.themeOverride:void 0,J=void 0===N.themeOverride&&void 0===q&&void 0===Q?U:{...U,...q,...Q,...N.themeOverride};e.beginPath();const ee=[t.sourceIndex,i],te=function(e,t,n){if(void 0===(null==n?void 0:n.current))return!1;const[r,i]=n.current.cell,[o,l]=e;return l===i&&(void 0===t.span?r===o:r>=t.span[0]&&r<=t.span[1])}(ee,N,y);let ne=function(e,t,n){let r=0;if(void 0===n.current)return r;pt(e,t,n.current.range)&&r++;for(const i of n.current.rangeStack)pt(e,t,i)&&r++;return r}(ee,N,y);const re=void 0!==N.span&&y.columns.some((e=>void 0!==N.span&&e>=N.span[0]&&e<=N.span[1]));te&&!p&&g?ne=0:te&&(ne=Math.max(ne,1)),re&&ne++,te||(V&&ne++,j&&!c&&ne++);const ie=N.kind===ge.Protected?J.bgCellMedium:J.bgCell;let oe;if((c||ie!==O.bgCell)&&(oe=jt(ie,oe)),ne>0||$){$&&(oe=jt(J.bgHeader,oe));for(let e=0;e<ne;e++)oe=jt(J.accentLight,oe)}else!0===(null==w?void 0:w.some((e=>e[0]===t.sourceIndex&&e[1]===i)))&&(oe=jt(J.bgSearchResult,oe));if(void 0!==x)for(const e of x){const n=e.range;n.x<=t.sourceIndex&&t.sourceIndex<n.x+n.width&&n.y<=i&&i<n.y+n.height&&(oe=jt(e.color,oe))}void 0!==oe&&(e.fillStyle=oe,void 0!==Y&&(Y.fillStyle=oe),e.fillRect(B,r,Z,l)),"faded"===N.style&&(e.globalAlpha=.6);const le=M.find((e=>e.item[0]===t.sourceIndex&&e.item[1]===i));if(Z>10&&!G){const n=`${J.baseFontStyle} ${J.fontFamily}`;n!==F&&(e.font=n,F=n),Y=Xt(e,i,N,t.sourceIndex,B,r,Z,l,ne>0,J,k,S,C,null!=(A=null==le?void 0:le.hoverAmount)?A:0,E,R,H,Y,I,T)}return"faded"===N.style&&(e.globalAlpha=1),D--,K&&(e.restore(),null==(_=null==Y?void 0:Y.deprep)||_.call(Y,{ctx:e}),Y=void 0,W(),F=X,e.font=X),D<=0})),e.restore(),D<=0})),L}function ln(e,t,n,r,i,o,l,a,s,c,u,d,h,f,p,g){var m;if(void 0===u.current||!l.some((e=>{var t;return e.sourceIndex===(null==(t=u.current)?void 0:t.cell[0])})))return;const[v,b]=u.current.cell,y=h(u.current.cell),w=null!=(m=y.span)?m:[v,v],x="sticky"!==f||"sticky"===f&&b===g-1?0:d(g-1)-1;let k;if(cn(l,r,i,o,c,((r,i,o,l,c)=>{if(!(r.sticky&&v>r.sourceIndex)&&!(r.sourceIndex<w[0]||r.sourceIndex>w[1]))return sn(c,o,n,g,d,f,((o,c,u)=>{if(c!==b)return;let d=i,h=r.width;if(void 0!==y.span){const e=rn(y.span,i,o,r.width,u,r,a),t=r.sticky?e[0]:e[1];void 0!==t&&(d=t.x,h=t.width)}return k=()=>{var i,a,c,f;l>d&&!r.sticky&&(e.beginPath(),e.rect(l,0,t-l,n),e.clip()),e.beginPath(),e.rect(d+.5,o+.5,h,u),e.strokeStyle=null!=(a=null==(i=r.themeOverride)?void 0:i.accentColor)?a:s.accentColor,e.lineWidth=1,e.stroke(),p&&(e.beginPath(),e.rect(d+h-4,o+u-4,4,4),e.fillStyle=null!=(f=null==(c=r.themeOverride)?void 0:c.accentColor)?f:s.accentColor,e.fill())},!0})),!0})),void 0===k)return;const S=()=>{e.save(),e.beginPath(),e.rect(0,c,t,n-c-x),e.clip(),null==k||k(),e.restore()};return S(),S}function an(e,t){var n,r;const{canvas:i,headerCanvas:o,width:l,height:a,cellXOffset:s,cellYOffset:c,translateX:u,translateY:d,mappedColumns:h,enableGroups:f,freezeColumns:p,dragAndDropState:g,theme:m,drawFocus:v,headerHeight:b,groupHeaderHeight:y,disabledRows:w,rowHeight:x,verticalBorder:k,isResizing:S,selection:C,fillHandle:M,lastRowSticky:E,rows:R,getCellContent:O,getGroupDetails:I,getRowThemeOverride:T,isFocused:P,drawCustomCell:D,drawHeaderCallback:H,prelightCells:L,highlightRegions:F,imageLoader:z,lastBlitData:A,hoverValues:_,hyperWrapping:V,hoverInfo:$,spriteManager:N,scrolling:B,touchMode:W,enqueue:j,getCellRenderer:Z,renderStrategy:U,bufferA:X,bufferB:Y}=e;let{damage:K}=e;if(0===l||0===a)return;const G="double-buffer"===U,q=B?1:Math.ceil(null!=(n=window.devicePixelRatio)?n:1),Q="direct"!==U&&function(e,t){if(void 0===t)return!1;if(e.width!==t.width||e.height!==t.height||e.theme!==t.theme||e.headerHeight!==t.headerHeight||e.rowHeight!==t.rowHeight||e.rows!==t.rows||e.getRowThemeOverride!==t.getRowThemeOverride||e.isFocused!==t.isFocused||e.isResizing!==t.isResizing||e.verticalBorder!==t.verticalBorder||e.getCellContent!==t.getCellContent||e.highlightRegions!==t.highlightRegions||e.selection!==t.selection||e.dragAndDropState!==t.dragAndDropState||e.prelightCells!==t.prelightCells||e.touchMode!==t.touchMode||e.scrolling!==t.scrolling)return!1;if(e.mappedColumns!==t.mappedColumns){if(e.mappedColumns.length>100||e.mappedColumns.length!==t.mappedColumns.length)return!1;let n;for(let r=0;r<e.mappedColumns.length;r++){const i=e.mappedColumns[r],o=t.mappedColumns[r];if(se(i,o))continue;if(void 0!==n)return!1;if(i.width===o.width)return!1;const{width:l,...a}=i,{width:s,...c}=o;if(!se(a,c))return!1;n=r}return void 0===n||n}return!0}(e,t);i.width===l*q&&i.height===a*q||(i.width=l*q,i.height=a*q,i.style.width=l+"px",i.style.height=a+"px");const J=o,ee=f?y+b:b,te=ee+1;J.width===l*q&&J.height===te*q||(J.width=l*q,J.height=te*q,J.style.width=l+"px",J.style.height=te+"px"),!G||X.width===l*q&&X.height===a*q||(X.width=l*q,X.height=a*q),!G||Y.width===l*q&&Y.height===a*q||(Y.width=l*q,Y.height=a*q);const ne=A.current;if(!0===Q&&s===(null==ne?void 0:ne.cellXOffset)&&c===(null==ne?void 0:ne.cellYOffset)&&u===(null==ne?void 0:ne.translateX)&&d===(null==ne?void 0:ne.translateY))return;let re=null;G&&(re=i.getContext("2d",{alpha:!1}));const ie=J.getContext("2d",{alpha:!1});let le;le=G?void 0!==K?"b"===(null==ne?void 0:ne.lastBuffer)?Y:X:"b"===(null==ne?void 0:ne.lastBuffer)?X:Y:i;const ae=le.getContext("2d",{alpha:!1}),ce=G?le===X?Y:X:i;if(null===ie||null===ae)return;const ue="number"===typeof x?()=>x:x;ie.save(),ie.beginPath(),ae.save(),ae.beginPath(),ie.textBaseline="middle",ae.textBaseline="middle",1!==q&&(ie.scale(q,q),ae.scale(q,q));const de=vt(h,s,l,g,u);let he=[];const fe=v&&(null==(r=C.current)?void 0:r.cell[1])===c&&0===d,pe=()=>{var e,t;en(ie,de,f,$,l,u,b,y,g,S,C,m,N,_,k,I,K,H,W),Yt(ie,de,c,u,d,l,a,void 0,void 0,y,ee,ue,T,k,E,R,m,!0),ie.beginPath(),ie.moveTo(0,te-.5),ie.lineTo(l,te-.5),ie.strokeStyle=jt(null!=(t=null!=(e=m.headerBottomBorderColor)?e:m.horizontalBorderColor)?t:m.borderColor,m.bgHeader),ie.stroke(),fe&&ln(ie,l,a,c,u,d,de,h,m,ee,C,ue,O,E,M,R)};if(void 0!==K){let e=!1;return K=K.filter((t=>(e=e||t[1]<0,t[1]<0||tn(s,c,de.length,300,t[0],t[1],1,1)||tn(0,c,p,300,t[0],t[1],1,1)||E&&tn(s,R-1,de.length,1,t[0],t[1],1,1)))),K.length>0&&(nn(ae,de,l,a,y,ee,u,d,c,R,ue,E,K,!0),ae.fillStyle=m.bgCell,ae.fillRect(0,ee+1,l,a-ee-1),on(ae,de,h,a,ee,u,d,c,R,ue,O,I,T,w,P,v,E,he,K,C,L,F,D,z,N,_,$,V,m,j,Z),M&&v&&void 0!==C.current&&K.some((e=>{var t,n;return e[0]===(null==(t=C.current)?void 0:t.cell[0])&&e[1]===(null==(n=C.current)?void 0:n.cell[1])}))&&ln(ae,l,a,c,u,d,de,h,m,ee,C,ue,O,E,M,R)),e&&(nn(ie,de,l,ee,y,ee,u,d,c,R,ue,E,K,!1),pe()),ae.restore(),ie.restore(),void(null!==re&&(re.fillStyle=m.bgCell,re.fillRect(0,0,l,a),re.drawImage(ae.canvas,0,0)))}if(!0===Q&&s===(null==ne?void 0:ne.cellXOffset)&&u===(null==ne?void 0:ne.translateX)&&fe===(null==ne?void 0:ne.mustDrawFocusOnHeader)||pe(),!0===Q){oe(void 0!==ce&&void 0!==ne);const{regions:e}=function(e,t,n,r,i,o,l,a,s,c,u,d,h,f,p,g,m){const v=[];let b=!1;e.imageSmoothingEnabled=!1;const y=Math.min(n.cellYOffset,i),w=Math.max(n.cellYOffset,i);let x=0;if("number"===typeof g)x+=(w-y)*g;else for(let I=y;I<w;I++)x+=g(I);i>n.cellYOffset&&(x=-x),x+=l-n.translateY;const k=Math.min(n.cellXOffset,r),S=Math.max(n.cellXOffset,r);let C=0;for(let I=k;I<S;I++)C+=f[I].width;r>n.cellXOffset&&(C=-C),C+=o-n.translateX;let M=mt(p);if(M>0&&M++,0!==C&&0!==x)return{regions:[],yOnly:!1};const E=a?"number"===typeof g?g:g(u-1):0,R=s-M-Math.abs(C),O=c-d-E-Math.abs(x)-1;if(R>150&&O>150){b=0===C;const n={sx:0,sy:0,sw:s*h,sh:c*h,dx:0,dy:0,dw:s*h,dh:c*h};x>0?(n.sy=(d+1)*h,n.sh=O*h,n.dy=(x+d+1)*h,n.dh=O*h,v.push({x:0,y:d,width:s,height:x+1})):x<0&&(n.sy=(-x+d+1)*h,n.sh=O*h,n.dy=(d+1)*h,n.dh=O*h,v.push({x:0,y:c+x-E,width:s,height:-x+E})),C>0?(n.sx=M*h,n.sw=R*h,n.dx=(C+M)*h,n.dw=R*h,v.push({x:M-1,y:0,width:C+2,height:c})):C<0&&(n.sx=(M-C)*h,n.sw=R*h,n.dx=M*h,n.dw=R*h,v.push({x:s+C,y:0,width:-C,height:c})),e.setTransform(1,0,0,1,0,0),M>0&&0!==C&&0===x&&m&&e.drawImage(t,0,0,M*h,c*h,0,0,M*h,c*h),e.drawImage(t,n.sx,n.sy,n.sw,n.sh,n.dx,n.dy,n.dw,n.dh),e.scale(h,h)}return e.imageSmoothingEnabled=!0,{regions:v,yOnly:b}}(ae,ce,ne,s,c,u,d,"sticky"===E,l,a,R,ee,q,h,de,x,G);he=e}else if(!1!==Q){oe(void 0!==ne);he=function(e,t,n,r,i,o,l,a,s,c){const u=[];return t!==e.cellXOffset||n!==e.cellYOffset||r!==e.translateX||i!==e.translateY||cn(s,n,r,i,a,((e,t,n,r)=>{if(e.sourceIndex===c){const e=Math.max(t,r)+1;return u.push({x:e,y:0,width:o-e,height:l}),!0}})),u}(ne,s,c,u,d,l,a,ee,de,Q)}!function(e,t,n,r,i,o,l,a,s){var c;let u=!1;for(const p of t)if(!p.sticky){u=l(p.sourceIndex);break}const d=null!=(c=s.horizontalBorderColor)?c:s.borderColor,h=s.borderColor,f=u?mt(t):0;if(0!==f&&(e.beginPath(),e.moveTo(f+.5,0),e.lineTo(f+.5,r),e.strokeStyle=jt(h,s.bgCell),e.stroke()),i){const t=a(o-1);e.beginPath(),e.moveTo(0,r-t+.5),e.lineTo(n,r-t+.5),e.strokeStyle=jt(d,s.bgCell),e.stroke()}}(ae,de,l,a,"sticky"===E,R,k,ue,m);const ge=v?ln(ae,l,a,c,u,d,de,h,m,ee,C,ue,O,E,M,R):void 0,me=function(e,t,n,r,i,o,l,a,s,c,u,d,h,f,p){const g=null==p?void 0:p.filter((e=>"no-outline"!==e.style));if(void 0===g||0===g.length)return;const m=g.map((e=>{var p,g,m,v,b;const y=e.range,w=Ft(y.x,y.y,t,n,u,c+u,r,i,o,l,f,s,h,a,d);if(1===y.width&&1===y.height)return y.x<s?[{color:e.color,style:null!=(p=e.style)?p:"dashed",rect:w},void 0]:[void 0,{color:e.color,style:null!=(g=e.style)?g:"dashed",rect:w}];const x=Ft(y.x+y.width-1,y.y+y.height-1,t,n,u,c+u,r,i,o,l,f,s,h,a,d);if(y.x<s&&y.x+y.width>=s){const p=Ft(s-1,y.y+y.height-1,t,n,u,c+u,r,i,o,l,f,s,h,a,d),g=Ft(s,y.y+y.height-1,t,n,u,c+u,r,i,o,l,f,s,h,a,d);return[{color:e.color,style:null!=(m=e.style)?m:"dashed",rect:{x:w.x,y:w.y,width:p.x+p.width-w.x,height:p.y+p.height-w.y}},{color:e.color,style:null!=(v=e.style)?v:"dashed",rect:{x:g.x,y:g.y,width:x.x+x.width-g.x,height:x.y+x.height-g.y}}]}return[void 0,{color:e.color,style:null!=(b=e.style)?b:"dashed",rect:{x:w.x,y:w.y,width:x.x+x.width-w.x,height:x.y+x.height-w.y}}]})),v=mt(a),b=()=>{e.beginPath(),e.save();let r=!1;const i=t=>{r!==t&&(e.setLineDash(t?[5,3]:[]),r=t)};e.lineWidth=1;for(const l of m){const[r]=l;void 0!==r&&tn(0,0,t,n,r.rect.x,r.rect.y,r.rect.width,r.rect.height)&&(i("dashed"===r.style),e.strokeStyle=Wt(r.color,1),e.strokeRect(r.rect.x+1,r.rect.y+1,r.rect.width-2,r.rect.height-2))}let o=!1;for(const l of m){const[,r]=l;void 0!==r&&tn(0,0,t,n,r.rect.x,r.rect.y,r.rect.width,r.rect.height)&&(i("dashed"===r.style),!o&&r.rect.x<v&&(e.rect(v,0,t,n),e.clip(),o=!0),e.strokeStyle=Wt(r.color,1),e.strokeRect(r.rect.x+1,r.rect.y+1,r.rect.width-2,r.rect.height-2))}e.restore()};return b(),b}(ae,l,a,s,c,u,d,h,p,b,y,x,"sticky"===E,R,F);if(ae.fillStyle=m.bgCell,he.length>0){ae.beginPath();for(const e of he)ae.rect(e.x,e.y,e.width,e.height);ae.clip(),ae.fill(),ae.beginPath()}else ae.fillRect(0,0,l,a);const ve=on(ae,de,h,a,ee,u,d,c,R,ue,O,I,T,w,P,v,E,he,K,C,L,F,D,z,N,_,$,V,m,j,Z);!function(e,t,n,r,i,o,l,a,s,c,u,d,h,f,p,g,m,v){void 0===m&&t[t.length-1]===n[t.length-1]&&cn(t,s,l,a,o,((n,l,a,s,m)=>{if(n!==t[t.length-1])return;l+=n.width;const b=Math.max(l,s);b>r||(e.save(),e.beginPath(),e.rect(b,o+1,1e4,i-o-1),e.clip(),sn(m,a,i,c,u,p,((t,n,r,i)=>{if(!i&&g.length>0&&!g.some((e=>tn(l,t,1e4,r,e.x,e.y,e.width,e.height))))return;const o=h.hasIndex(n),a=f.hasIndex(n);e.beginPath();const s=null==d?void 0:d(n),c=void 0===s?v:{...v,...s};c.bgCell!==v.bgCell&&(e.fillStyle=c.bgCell,e.fillRect(l,t,1e4,r)),a&&(e.fillStyle=c.bgHeader,e.fillRect(l,t,1e4,r)),o&&(e.fillStyle=c.accentLight,e.fillRect(l,t,1e4,r))})),e.restore())}))}(ae,de,h,l,a,ee,u,d,c,R,ue,T,C.rows,w,E,he,K,m),Yt(ae,de,c,u,d,l,a,he,ve,y,ee,ue,T,k,E,R,m),null==ge||ge(),null==me||me(),null!==re&&(re.fillStyle=m.bgCell,re.fillRect(0,0,l,a),re.drawImage(ae.canvas,0,0));const be=function(e,t,n,r,i,o,l,a,s){let c=0;return cn(e,o,r,i,n,((e,n,r,i,o)=>(sn(o,r,t,l,a,s,((e,t,n,r)=>{r||(c=Math.max(t,c))})),!0))),c}(de,a,ee,u,d,c,R,ue,E);null==z||z.setWindow({x:s,y:c,width:de.length,height:be-c},p),A.current={cellXOffset:s,cellYOffset:c,translateX:u,translateY:d,mustDrawFocusOnHeader:fe,lastBuffer:G?le===X?"a":"b":void 0},ae.restore(),ie.restore()}function sn(e,t,n,r,i,o,l){let a=t,s=e,c="sticky"===o;for(;a<n||c;){const e=c&&a>=n;e&&(c=!1,s=r-1);const t=i(s);e&&(a=n-t);if(!(c&&s===r-1)&&!0===l(a,s,t,e,"none"!==o&&s===r-1))break;if(e)break;a+=t,s++}}function cn(e,t,n,r,i,o){let l=0,a=0;const s=i+r;for(const c of e){if(!0===o(c,c.sticky?a:l+n,s,a,t))break;l+=c.width,a+=c.sticky?c.width:0}}function un(e,t,n,r,i){var o;let l=0,a=0;for(let s=0;s<e.length;s++){const c=e[s];let u=s+1,d=c.width;for(c.sticky&&(a+=d);u<e.length&&ft(e[u].group,c.group)&&e[u].sticky===e[s].sticky;){const t=e[u];d+=t.width,u++,s++,t.sticky&&(a+=t.width)}const h=l+(c.sticky?0:n),f=c.sticky?0:Math.max(0,a-h),p=Math.min(d-f,t-(h+f));i([c.sourceIndex,e[u-1].sourceIndex],null!=(o=c.group)?o:"",h+f,0,p,r),l+=d}}function dn(e){const t=e-1;return t*t*t+1}var hn=class{constructor(e){this.callback=e,this.currentHoveredItem=void 0,this.leavingItems=[],this.areSameItems=(e,t)=>(null==e?void 0:e[0])===(null==t?void 0:t[0])&&(null==e?void 0:e[1])===(null==t?void 0:t[1]),this.addToLeavingItems=e=>{this.leavingItems.some((t=>this.areSameItems(t.item,e.item)))||this.leavingItems.push(e)},this.removeFromLeavingItems=e=>{var t;const n=this.leavingItems.find((t=>this.areSameItems(t.item,e)));return this.leavingItems=this.leavingItems.filter((e=>e!==n)),null!=(t=null==n?void 0:n.hoverAmount)?t:0},this.cleanUpLeavingElements=()=>{this.leavingItems=this.leavingItems.filter((e=>e.hoverAmount>0))},this.shouldStep=()=>{const e=this.leavingItems.length>0,t=void 0!==this.currentHoveredItem&&this.currentHoveredItem.hoverAmount<1;return e||t},this.getAnimatingItems=()=>void 0!==this.currentHoveredItem?[...this.leavingItems,this.currentHoveredItem]:this.leavingItems.map((e=>({...e,hoverAmount:dn(e.hoverAmount)}))),this.step=e=>{if(void 0===this.lastAnimationTime)this.lastAnimationTime=e;else{const t=(e-this.lastAnimationTime)/80;for(const e of this.leavingItems)e.hoverAmount=o(e.hoverAmount-t,0,1);void 0!==this.currentHoveredItem&&(this.currentHoveredItem.hoverAmount=o(this.currentHoveredItem.hoverAmount+t,0,1));const n=this.getAnimatingItems();this.callback(n),this.cleanUpLeavingElements()}this.shouldStep()?(this.lastAnimationTime=e,window.requestAnimationFrame(this.step)):this.lastAnimationTime=void 0},this.setHovered=e=>{var t;if(!this.areSameItems(null==(t=this.currentHoveredItem)?void 0:t.item,e)){if(void 0!==this.currentHoveredItem&&this.addToLeavingItems(this.currentHoveredItem),void 0!==e){const t=this.removeFromLeavingItems(e);this.currentHoveredItem={item:e,hoverAmount:t}}else this.currentHoveredItem=void 0;void 0===this.lastAnimationTime&&window.requestAnimationFrame(this.step)}}}},fn=class{constructor(e){this.fn=e}get value(){var e;return null!=(e=this.val)?e:this.val=this.fn()}};function pn(e){return new fn(e)}var gn=pn((()=>window.navigator.userAgent.includes("Firefox"))),mn=pn((()=>window.navigator.userAgent.includes("Mac OS")&&window.navigator.userAgent.includes("Safari")&&!window.navigator.userAgent.includes("Chrome"))),vn=pn((()=>window.navigator.platform.toLowerCase().startsWith("mac")));var bn=i.memo(i.forwardRef(((e,t)=>{var n,r,l,a,u,d,h,f;const{width:p,height:g,accessibilityHeight:m,columns:v,cellXOffset:b,cellYOffset:y,headerHeight:w,fillHandle:x=!1,groupHeaderHeight:k,rowHeight:S,rows:C,getCellContent:M,getRowThemeOverride:E,onHeaderMenuClick:R,enableGroups:O,isFilling:I,onCanvasFocused:T,onCanvasBlur:P,isFocused:D,selection:H,freezeColumns:L,onContextMenu:F,trailingRowType:z,fixedShadowX:A=!0,fixedShadowY:_=!0,drawFocusRing:V=!0,onMouseDown:$,onMouseUp:N,onMouseMoveRaw:B,onMouseMove:W,onItemHovered:j,dragAndDropState:Z,firstColAccessible:U,onKeyDown:X,onKeyUp:Y,highlightRegions:K,canvasRef:G,onDragStart:q,onDragEnd:Q,eventTargetRef:J,isResizing:ee,isDragging:te,isDraggable:ne=!1,allowResize:re,disabledRows:ie,getGroupDetails:le,theme:ae,prelightCells:se,headerIcons:ce,verticalBorder:ue,drawHeader:de,drawCustomCell:he,onCellFocused:fe,onDragOverCell:pe,onDrop:me,onDragLeave:ve,imageWindowLoader:be,smoothScrollX:ye=!1,smoothScrollY:we=!1,experimental:Me,getCellRenderer:Ee}=e,Re=null!=(n=e.translateX)?n:0,Oe=null!=(r=e.translateY)?r:0,Ie=Math.max(L,Math.min(v.length-1,b)),Te=i.useRef(null),Pe=i.useMemo((()=>new Ke),[]),De=null!=be?be:Pe,He=i.useRef(),[ze,_e]=i.useState(!1),$e=i.useRef([]),Ne=i.useRef(),[Be,We]=i.useState(),[je,Ze]=i.useState(),Ue=i.useRef(null),[Xe,Ye]=i.useState(!1),qe=i.useRef(Xe);qe.current=Xe;const Qe=i.useMemo((()=>new Vt(ce,(()=>{dt.current=void 0,ft.current()}))),[ce]),Je=O?k+w:w,et=i.useRef(-1),tt=!0!==(null==Me?void 0:Me.enableFirefoxRescaling);i.useLayoutEffect((()=>{gn.value&&1!==window.devicePixelRatio&&!tt&&(-1!==et.current&&_e(!0),window.clearTimeout(et.current),et.current=window.setTimeout((()=>{_e(!1),et.current=-1}),200))}),[y,Ie,Re,Oe,tt]);const nt=function(e,t){return i.useMemo((()=>e.map(((e,n)=>({...e,sourceIndex:n,sticky:n<t})))),[e,t])}(v,L),rt=i.useCallback(((e,t,n)=>{const r=e.getBoundingClientRect();if(t>=nt.length||n>=C)return;const i=r.width/p,o=Ft(t,n,p,g,k,Je,Ie,y,Re,Oe,C,L,"sticky"===z,nt,S);return 1!==i&&(o.x*=i,o.y*=i,o.width*=i,o.height*=i),o.x+=r.x,o.y+=r.y,o}),[p,g,k,Je,Ie,y,Re,Oe,C,L,z,nt,S]),it=i.useCallback(((e,t,n,r)=>{var i,o;const l=e.getBoundingClientRect(),a=l.width/p,s=(t-l.left)/a,c=(n-l.top)/a,u=vt(nt,Ie,p,void 0,Re);let d=0;r instanceof MouseEvent&&(d=r.button);const h=function(e,t,n){let r=0;for(const i of t){if(e<=(i.sticky?r:r+(null!=n?n:0))+i.width)return i.sourceIndex;r+=i.width}return-1}(s,u,Re),f=function(e,t,n,r,i,o,l,a,s,c){const u=r+i;if(n&&e<=i)return-2;if(e<=u)return-1;const d="number"===typeof l?l:l(o-1);if(c&&e>t-d)return o-1;const h=o-(c?1:0),f=e-(null!=s?s:0);if("number"===typeof l){const e=Math.floor((f-u)/l)+a;if(e>=h)return;return e}{let e=u;for(let t=a;t<h;t++){const n=l(t);if(f<=e+n)return t;e+=n}return}}(c,g,O,w,k,C,S,y,Oe,"sticky"===z),m=!0===(null==r?void 0:r.shiftKey),v=!0===(null==r?void 0:r.ctrlKey),b=!0===(null==r?void 0:r.metaKey),M=void 0!==r&&!(r instanceof MouseEvent)||"touch"===(null==r?void 0:r.pointerType),E=[Math.abs(s)<20?-1:Math.abs(l.width-s)<20?1:0,Math.abs(c)<20?-1:Math.abs(l.height-c)<20?1:0];let R;if(-1===h||c<0||s<0||void 0===f||s>p||c>g){const n=s>p?-1:s<0?1:0,r=c>g?1:c<0?-1:0;let i=!1;if(-1===h&&-1===f){const n=rt(e,nt.length-1,-1);oe(void 0!==n),i=t<n.x+n.width+5}R={kind:Se,location:[-1!==h?h:s<0?0:nt.length-1,null!=f?f:C-1],direction:[n,r],shiftKey:m,ctrlKey:v,metaKey:b,isEdge:i,isTouch:M,button:d,scrollEdge:E}}else if(f<=-1){let r=rt(e,h,f);oe(void 0!==r);let l=void 0!==r&&r.x+r.width-t<=5;const a=h-1;t-r.x<=5&&a>=0?(l=!0,r=rt(e,a,f),oe(void 0!==r),R={kind:O&&-2===f?ke:xe,location:[a,f],bounds:r,group:null!=(i=nt[a].group)?i:"",isEdge:l,shiftKey:m,ctrlKey:v,metaKey:b,isTouch:M,localEventX:t-r.x,localEventY:n-r.y,button:d,scrollEdge:E}):R={kind:O&&-2===f?ke:xe,group:null!=(o=nt[h].group)?o:"",location:[h,f],bounds:r,isEdge:l,shiftKey:m,ctrlKey:v,metaKey:b,isTouch:M,localEventX:t-r.x,localEventY:n-r.y,button:d,scrollEdge:E}}else{const r=rt(e,h,f);oe(void 0!==r);R={kind:"cell",location:[h,f],bounds:r,isEdge:void 0!==r&&r.x+r.width-t<5,shiftKey:m,ctrlKey:v,isFillHandle:x&&void 0!==r&&r.x+r.width-t<6&&r.y+r.height-n<6,metaKey:b,isTouch:M,localEventX:t-r.x,localEventY:n-r.y,button:d,scrollEdge:E}}return R}),[nt,Ie,p,Re,g,O,w,k,C,S,y,Oe,z,rt,x]);const[ot]=null!=Be?Be:[],lt=i.useRef((e=>{})),at=i.useRef(Be);at.current=Be;const[st,ct]=i.useMemo((()=>{const e=document.createElement("canvas"),t=document.createElement("canvas");return e.style.display="none",e.style.opacity="0",e.style.position="fixed",t.style.display="none",t.style.opacity="0",t.style.position="fixed",[e,t]}),[]);i.useLayoutEffect((()=>(document.documentElement.append(st),document.documentElement.append(ct),()=>{st.remove(),ct.remove()})),[st,ct]);const dt=i.useRef(),ht=i.useCallback((()=>{var e,t;const n=Te.current,r=Ue.current;if(null===n||null===r)return;const i=dt.current,o={canvas:n,bufferA:st,bufferB:ct,headerCanvas:r,width:p,height:g,cellXOffset:Ie,cellYOffset:y,translateX:Math.round(Re),translateY:Math.round(Oe),mappedColumns:nt,enableGroups:O,freezeColumns:L,dragAndDropState:Z,theme:ae,headerHeight:w,groupHeaderHeight:k,disabledRows:null!=ie?ie:Ve.empty(),rowHeight:S,verticalBorder:ue,isResizing:ee,isFocused:D,selection:H,fillHandle:x,lastRowSticky:z,rows:C,drawFocus:V,getCellContent:M,getGroupDetails:null!=le?le:e=>({name:e}),getRowThemeOverride:E,drawCustomCell:he,drawHeaderCallback:de,prelightCells:se,highlightRegions:K,imageLoader:De,lastBlitData:Ne,damage:He.current,hoverValues:$e.current,hoverInfo:at.current,spriteManager:Qe,scrolling:ze,hyperWrapping:null!=(e=null==Me?void 0:Me.hyperWrapping)&&e,touchMode:Xe,enqueue:lt.current,renderStrategy:null!=(t=null==Me?void 0:Me.renderStrategy)?t:mn.value?"double-buffer":"single-buffer",getCellRenderer:Ee};void 0===o.damage?(dt.current=o,an(o,i)):an(o,void 0)}),[st,ct,p,g,Ie,y,Re,Oe,nt,O,L,Z,ae,w,k,ie,S,ue,ee,D,H,x,z,C,V,M,le,E,he,de,se,K,De,Qe,ze,null==Me?void 0:Me.hyperWrapping,null==Me?void 0:Me.renderStrategy,Xe,Ee]),ft=i.useRef(ht);i.useLayoutEffect((()=>{ht(),ft.current=ht}),[ht]),i.useLayoutEffect((()=>{(async()=>{var e;void 0!==(null==(e=null==document?void 0:document.fonts)?void 0:e.ready)&&(await document.fonts.ready,dt.current=void 0,ft.current())})()}),[]);const pt=i.useCallback((e=>{He.current=e,ft.current(),He.current=void 0}),[]),gt=function(e){const t=i.useRef([]),n=i.useRef(0),r=i.useRef(e);r.current=e;const o=i.useCallback((()=>{const e=()=>{const e=t.current;t.current=[],r.current(e),t.current.length>0?n.current++:n.current=0};window.requestAnimationFrame(n.current>600?()=>window.requestAnimationFrame(e):e)}),[]);return i.useCallback((e=>{(function(e,t){for(const n of e)if(n[0]===t[0]&&n[1]===t[1])return!0;return!1})(t.current,e)||(0===t.current.length&&o(),t.current.push(e))}),[o])}(pt);lt.current=gt;const bt=i.useCallback((e=>{pt(e.map((e=>e.cell)))}),[pt]);De.setCallback(pt);const[yt,wt]=i.useState(!1),[xt,kt]=null!=ot?ot:[],St=void 0!==xt&&-1===kt,Ct=void 0!==xt&&-2===kt;let Mt,Et=!1,Rt=!1;if(void 0!==xt&&void 0!==kt&&kt>-1){const e=M([xt,kt],!0);Et=e.kind===Ce.NewRow||e.kind===Ce.Marker&&"number"!==e.markerKind,Rt=e.kind===ge.Boolean&&Ae(e),Mt=e.cursor}const Ot=te?"grabbing":null!=je&&je||ee?"col-resize":yt||I?"crosshair":void 0!==Mt?Mt:St||Et||Rt||Ct?"pointer":"default",It=i.useMemo((()=>({contain:"strict",display:"block",cursor:Ot})),[Ot]),Tt=i.useRef("default"),Pt=null==J?void 0:J.current;null!==Pt&&void 0!==Pt&&Tt.current!==It.cursor&&(Pt.style.cursor=Tt.current=It.cursor);const Dt=i.useCallback(((e,t,n,r)=>{if(void 0===le)return;const i=le(e);if(void 0!==i.actions){const e=Kt(t,i.actions);for(const[o,l]of e.entries())if(Gt(l,n+t.x,r+l.y))return i.actions[o]}}),[le]),Ht=i.useCallback(((e,t,n,r)=>{const i=v[t];if(!te&&!ee&&!0===i.hasMenu&&(null==je||!je)){const o=rt(e,t,-1);oe(void 0!==o);const l=Qt(o.x,o.y,o.width,o.height,"rtl"===ut(i.title));if(n>l.x&&n<l.x+l.width&&r>l.y&&r<l.y+l.height)return o}}),[v,rt,je,te,ee]),Lt=i.useRef(0),zt=i.useRef(),At=i.useRef(!1),_t=i.useCallback((e=>{const t=Te.current,n=null==J?void 0:J.current;if(null===t||e.target!==t&&e.target!==n)return;let r,i;if(At.current=!0,e instanceof MouseEvent?(r=e.clientX,i=e.clientY):(r=e.touches[0].clientX,i=e.touches[0].clientY),e.target===n&&null!==n){const e=n.getBoundingClientRect();if(r>e.right||i>e.bottom)return}const o=it(t,r,i,e);if(zt.current=o.location,o.isTouch&&(Lt.current=Date.now()),qe.current!==o.isTouch&&Ye(o.isTouch),o.kind!==xe||void 0===Ht(t,o.location[0],r,i)){if(o.kind===ke){if(void 0!==Dt(o.group,o.bounds,o.localEventX,o.localEventY))return}null==$||$(o),o.isTouch||!0===ne||ne===o.kind||e.preventDefault()}}),[J,ne,it,Dt,Ht,$]);Ge("touchstart",_t,window,!1),Ge("mousedown",_t,window,!1);const $t=i.useCallback((e=>{var t,n;const r=Te.current;if(At.current=!1,void 0===N||null===r)return;const i=null==J?void 0:J.current,o=e.target!==r&&e.target!==i;let l,a;if(e instanceof MouseEvent){if(l=e.clientX,a=e.clientY,"touch"===e.pointerType)return}else l=e.changedTouches[0].clientX,a=e.changedTouches[0].clientY;let s=it(r,l,a,e);s.isTouch&&0!==Lt.current&&Date.now()-Lt.current>500&&(s={...s,isLongTouch:!0}),qe.current!==s.isTouch&&Ye(s.isTouch),!o&&e.cancelable&&e.preventDefault();const[c]=s.location,u=Ht(r,c,l,a);if(s.kind!==xe||void 0===u){if(s.kind===ke){const e=Dt(s.group,s.bounds,s.localEventX,s.localEventY);if(void 0!==e)return void(0===s.button&&e.onClick(s))}N(s,o)}else 0===s.button&&(null==(t=zt.current)?void 0:t[0])===c&&-1===(null==(n=zt.current)?void 0:n[1])||N(s,!0)}),[N,J,it,Ht,Dt]);Ge("mouseup",$t,window,!1),Ge("touchend",$t,window,!1);Ge("click",i.useCallback((e=>{var t,n;const r=Te.current;if(null===r)return;const i=null==J?void 0:J.current,o=e.target!==r&&e.target!==i;let l,a;e instanceof MouseEvent?(l=e.clientX,a=e.clientY):(l=e.changedTouches[0].clientX,a=e.changedTouches[0].clientY);const s=it(r,l,a,e);qe.current!==s.isTouch&&Ye(s.isTouch),!o&&e.cancelable&&e.preventDefault();const[c]=s.location,u=Ht(r,c,l,a);if(s.kind===xe&&void 0!==u)0===s.button&&(null==(t=zt.current)?void 0:t[0])===c&&-1===(null==(n=zt.current)?void 0:n[1])&&(null==R||R(c,u));else if(s.kind===ke){const e=Dt(s.group,s.bounds,s.localEventX,s.localEventY);void 0!==e&&0===s.button&&e.onClick(s)}}),[J,it,Ht,R,Dt]),window,!1);Ge("contextmenu",i.useCallback((e=>{const t=Te.current;if(null===t||void 0===F)return;const n=it(t,e.clientX,e.clientY,e);F(n,(()=>{e.cancelable&&e.preventDefault()}))}),[it,F]),null!=(l=null==J?void 0:J.current)?l:null,!1);const Nt=i.useCallback((e=>{He.current=e.map((e=>e.item)),$e.current=e,ft.current(),He.current=void 0}),[]),Bt=i.useMemo((()=>new hn(Nt)),[Nt]),Wt=i.useRef(Bt);Wt.current=Bt,i.useLayoutEffect((()=>{const e=Wt.current;if(void 0===ot||ot[1]<0)return void e.setHovered(ot);const t=M(ot),n=Ee(t);e.setHovered(void 0===n&&t.kind===ge.Custom||!0===(null==n?void 0:n.needsHover)?ot:void 0)}),[M,Ee,ot]);const jt=i.useRef();Ge("mousemove",i.useCallback((e=>{var t;const n=Te.current;if(null===n)return;const r=null==J?void 0:J.current,i=e.target!==n&&e.target!==r,o=it(n,e.clientX,e.clientY,e);if("out-of-bounds"!==o.kind&&i&&!At.current&&!o.isTouch)return;if(l=o,a=jt.current,l===a||(null==l?void 0:l.kind)===(null==a?void 0:a.kind)&&(null==l?void 0:l.location[0])===(null==a?void 0:a.location[0])&&(null==l?void 0:l.location[1])===(null==a?void 0:a.location[1])){if("cell"===o.kind||o.kind===xe||o.kind===ke){const e=[o.location,[o.localEventX,o.localEventY]];if(We(e),at.current=e,"cell"===o.kind){const e=M(o.location);e.kind!==ge.Custom&&!0!==(null==(t=Ee(e))?void 0:t.needsHoverPosition)||pt([o.location])}else o.kind===ke&&pt([o.location])}}else null==j||j(o),We(o.kind===Se?void 0:[o.location,[o.localEventX,o.localEventY]]),jt.current=o;var l,a;const s=o.location[0]>=(U?0:1);if(Ze(o.kind===xe&&o.isEdge&&s&&!0===re),x&&void 0!==H.current){const[t,r]=H.current.cell,i=rt(n,t,r),o=e.clientX,l=e.clientY;oe(void 0!==i),wt(o>=i.x+i.width-6&&o<=i.x+i.width&&l>=i.y+i.height-6&&l<=i.y+i.height)}else wt(!1);null==B||B(e),W(o)}),[J,it,U,re,x,H,B,W,j,M,Ee,pt,rt]),window,!0);const Zt=i.useCallback((e=>{const t=Te.current;if(null===t)return;let n,r;void 0!==H.current&&(n=rt(t,H.current.cell[0],H.current.cell[1]),r=H.current.cell),null==X||X({bounds:n,stopPropagation:()=>e.stopPropagation(),preventDefault:()=>e.preventDefault(),cancel:()=>{},ctrlKey:e.ctrlKey,metaKey:e.metaKey,shiftKey:e.shiftKey,altKey:e.altKey,key:e.key,keyCode:e.keyCode,rawEvent:e,location:r})}),[X,H,rt]),Ut=i.useCallback((e=>{const t=Te.current;if(null===t)return;let n,r;void 0!==H.current&&(n=rt(t,H.current.cell[0],H.current.cell[1]),r=H.current.cell),null==Y||Y({bounds:n,stopPropagation:()=>e.stopPropagation(),preventDefault:()=>e.preventDefault(),cancel:()=>{},ctrlKey:e.ctrlKey,metaKey:e.metaKey,shiftKey:e.shiftKey,altKey:e.altKey,key:e.key,keyCode:e.keyCode,rawEvent:e,location:r})}),[Y,H,rt]),Yt=i.useCallback((e=>{Te.current=e,void 0!==G&&(G.current=e)}),[G]);Ge("dragstart",i.useCallback((e=>{const t=Te.current;if(null===t||!1===ne||ee)return void e.preventDefault();let n,r;const i=it(t,e.clientX,e.clientY);if(!0!==ne&&i.kind!==ne)return void e.preventDefault();let o,l,a;let s=!1;if(null==q||q({...i,setData:(e,t)=>{n=e,r=t},setDragImage:(e,t,n)=>{o=e,l=t,a=n},preventDefault:()=>s=!0,defaultPrevented:()=>s}),s||void 0===n||void 0===r||null===e.dataTransfer)e.preventDefault();else if(e.dataTransfer.setData(n,r),e.dataTransfer.effectAllowed="copyLink",void 0!==o&&void 0!==l&&void 0!==a)e.dataTransfer.setDragImage(o,l,a);else{const[n,r]=i.location;if(void 0!==r){const i=document.createElement("canvas"),o=rt(t,n,r);oe(void 0!==o),i.width=o.width,i.height=o.height;const l=i.getContext("2d");null!==l&&(l.textBaseline="middle",-1===r?(l.font=`${ae.headerFontStyle} ${ae.fontFamily}`,l.fillStyle=ae.bgHeader,l.fillRect(0,0,i.width,i.height),Jt(l,0,0,o.width,o.height,nt[n],!1,ae,!1,!1,0,Qe,de,!1)):(l.font=`${ae.baseFontStyle} ${ae.fontFamily}`,l.fillStyle=ae.bgCell,l.fillRect(0,0,i.width,i.height),Xt(l,r,M([n,r]),0,0,0,o.width,o.height,!1,ae,he,De,Qe,1,void 0,!1,0,void 0,void 0,Ee))),i.style.left="-100%",i.style.position="absolute",document.body.append(i),e.dataTransfer.setDragImage(i,o.width/2,o.height/2),window.setTimeout((()=>{i.remove()}),0)}}}),[ne,ee,it,q,rt,ae,nt,Qe,de,M,he,De,Ee]),null!=(a=null==J?void 0:J.current)?a:null,!1,!1);const qt=i.useRef();Ge("dragover",i.useCallback((e=>{var t;const n=Te.current;if(void 0!==me&&e.preventDefault(),null===n||void 0===pe)return;const r=it(n,e.clientX,e.clientY),[i,o]=r.location,l=i-(U?0:1),[a,s]=null!=(t=qt.current)?t:[];a===l&&s===o||(qt.current=[l,o],pe([l,o],e.dataTransfer))}),[U,it,pe,me]),null!=(u=null==J?void 0:J.current)?u:null,!1,!1);Ge("dragend",i.useCallback((()=>{qt.current=void 0,null==Q||Q()}),[Q]),null!=(d=null==J?void 0:J.current)?d:null,!1,!1);Ge("drop",i.useCallback((e=>{const t=Te.current;if(null===t||void 0===me)return;e.preventDefault();const n=it(t,e.clientX,e.clientY),[r,i]=n.location;me([r-(U?0:1),i],e.dataTransfer)}),[U,it,me]),null!=(h=null==J?void 0:J.current)?h:null,!1,!1);Ge("dragleave",i.useCallback((()=>{null==ve||ve()}),[ve]),null!=(f=null==J?void 0:J.current)?f:null,!1,!1);const en=i.useRef(H);en.current=H;const tn=i.useRef(null),nn=i.useCallback((e=>{var t;null!==Te.current&&Te.current.contains(document.activeElement)&&(null===e&&void 0!==en.current.current?null==(t=null==G?void 0:G.current)||t.focus({preventScroll:!0}):null!==e&&e.focus({preventScroll:!0}),tn.current=e)}),[G]);i.useImperativeHandle(t,(()=>({focus:()=>{var e;const t=tn.current;null!==t&&document.contains(t)?t.focus({preventScroll:!0}):null==(e=null==G?void 0:G.current)||e.focus({preventScroll:!0})},getBounds:(e,t)=>{if(void 0!==G&&null!==G.current)return rt(G.current,e,null!=t?t:-1)},damage:bt})),[G,bt,rt]);const rn=i.useRef(),on=function(e,t,n){const[r,o]=i.useState(e),l=i.useRef(!0);i.useEffect((()=>()=>{l.current=!1}),[]);const a=i.useRef(c((e=>{l.current&&o(e)}),n));return i.useLayoutEffect((()=>{l.current&&a.current((()=>e()))}),t),r}((()=>{var e,t,n,r;if(p<50)return null;let o=vt(nt,Ie,p,Z,Re);const l=U?0:-1;U||0!==(null==(e=o[0])?void 0:e.sourceIndex)||(o=o.slice(1));const[a,c]=null!=(n=null==(t=H.current)?void 0:t.cell)?n:[],u=null==(r=H.current)?void 0:r.range,d=o.map((e=>e.sourceIndex)),h=s(y,Math.min(C,y+m));return void 0===a||void 0===c||d.includes(a)&&h.includes(c)||nn(null),i.createElement("table",{key:"access-tree",role:"grid","aria-rowcount":C+1,"aria-multiselectable":"true","aria-colcount":nt.length+l},i.createElement("thead",{role:"rowgroup"},i.createElement("tr",{role:"row","aria-rowindex":1},o.map((e=>i.createElement("th",{role:"columnheader","aria-selected":H.columns.hasIndex(e.sourceIndex),"aria-colindex":e.sourceIndex+1+l,tabIndex:-1,onFocus:t=>{if(t.target!==tn.current)return null==fe?void 0:fe([e.sourceIndex,-1])},key:e.sourceIndex},e.title))))),i.createElement("tbody",{role:"rowgroup"},h.map((e=>i.createElement("tr",{role:"row","aria-selected":H.rows.hasIndex(e),key:e,"aria-rowindex":e+2},o.map((t=>{const n=t.sourceIndex,r=`${n},${e}`,o=a===n&&c===e,s=void 0!==u&&n>=u.x&&n<u.x+u.width&&e>=u.y&&e<u.y+u.height,d=`glide-cell-${n}-${e}`,h=[n,e],f=M(h,!0);return i.createElement("td",{key:r,role:"gridcell","aria-colindex":n+1+l,"aria-selected":s,"aria-readonly":Le(f)||!Fe(f),id:d,"data-testid":d,onClick:()=>{const t=null==G?void 0:G.current;if(null!==t&&void 0!==t)return null==X?void 0:X({bounds:rt(t,n,e),cancel:()=>{},preventDefault:()=>{},stopPropagation:()=>{},ctrlKey:!1,key:"Enter",keyCode:13,metaKey:!1,shiftKey:!1,altKey:!1,rawEvent:void 0,location:h})},onFocusCapture:t=>{var r,i;if(t.target!==tn.current&&((null==(r=rn.current)?void 0:r[0])!==n||(null==(i=rn.current)?void 0:i[1])!==e))return rn.current=h,null==fe?void 0:fe(h)},ref:o?nn:void 0,tabIndex:-1},((e,t)=>{var n;if(e.kind===ge.Custom)return e.copyData;const r=null==t?void 0:t(e);return null!=(n=null==r?void 0:r.getAccessibilityString(e))?n:""})(f,Ee))})))))))}),[p,nt,Ie,Z,Re,C,y,m,H,nn,M,G,X,rt,fe],200),ln=A?mt(nt,Z):0,sn=0!==L&&A?Ie>L?1:o(-Re/100,0,1):0,cn=_?o(-(32*-y+Oe)/100,0,1):0,un=i.useMemo((()=>{if(!sn&&!cn)return null;const e={position:"absolute",top:0,left:ln,width:p-ln,height:g,opacity:sn,pointerEvents:"none",transition:ye?void 0:"opacity 0.2s",boxShadow:"inset 13px 0 10px -13px rgba(0, 0, 0, 0.2)"},t={position:"absolute",top:Je,left:0,width:p,height:g,opacity:cn,pointerEvents:"none",transition:we?void 0:"opacity 0.2s",boxShadow:"inset 0 13px 10px -13px rgba(0, 0, 0, 0.2)"};return i.createElement(i.Fragment,null,sn>0&&i.createElement("div",{id:"shadow-x",style:e}),cn>0&&i.createElement("div",{id:"shadow-y",style:t}))}),[sn,cn,ln,p,ye,Je,g,we]),dn=i.useMemo((()=>({position:"absolute",top:0,left:0})),[]);return i.createElement(i.Fragment,null,i.createElement("canvas",{"data-testid":"data-grid-canvas",tabIndex:0,onKeyDown:Zt,onKeyUp:Ut,onFocus:T,onBlur:P,ref:Yt,style:It},on),i.createElement("canvas",{ref:Ue,style:dn}),un)})));function yn(e,t,n,r){var i;return o(Math.round(t-(null!=(i=e.growOffset)?i:0)),Math.ceil(n),Math.floor(r))}var wn=e=>{var t;const[n,r]=i.useState(),[o,l]=i.useState(),[a,s]=i.useState(),[c,u]=i.useState(),[d,h]=i.useState(!1),[f,p]=i.useState(),[g,m]=i.useState(),[v,b]=i.useState(),[y,w]=i.useState(!1),[x,k]=i.useState(),{onHeaderMenuClick:S,getCellContent:C,onColumnMoved:M,onColumnResize:E,onColumnResizeStart:R,onColumnResizeEnd:O,gridRef:I,maxColumnWidth:T,minColumnWidth:P,onRowMoved:D,lockColumns:H,onMouseDown:L,onMouseUp:F,onItemHovered:z,onDragStart:A,canvasRef:_}=e,V=void 0!==(null!=(t=null!=E?E:O)?t:R),{columns:$,selection:N}=e,B=N.columns,W=i.useCallback((e=>{const[t,n]=e.location;void 0!==a&&c!==t&&t>=H?(h(!0),u(t)):void 0!==g&&void 0!==n?(w(!0),b(Math.max(0,n))):null==z||z(e)}),[a,g,c,z,H]),j=void 0!==M,Z=i.useCallback((e=>{var t,n;if(0===e.button){const[i,o]=e.location;if("out-of-bounds"===e.kind&&e.isEdge&&V){const e=null==(t=null==I?void 0:I.current)?void 0:t.getBounds($.length-1,-1);void 0!==e&&(r(e.x),l($.length-1))}else if("header"===e.kind&&i>=H){const t=null==_?void 0:_.current;if(e.isEdge&&V&&t){r(e.bounds.x),l(i);const o=t.getBoundingClientRect().width/t.offsetWidth,a=e.bounds.width/o;null==R||R($[i],a,i,a+(null!=(n=$[i].growOffset)?n:0))}else"header"===e.kind&&j&&(p(e.bounds.x),s(i))}else"cell"===e.kind&&H>0&&0===i&&void 0!==o&&void 0!==D&&(k(e.bounds.y),m(o))}null==L||L(e)}),[L,V,H,D,I,$,j,R,_]),U=i.useCallback(((e,t)=>{d||y||null==S||S(e,t)}),[d,y,S]),X=i.useRef(-1),Y=i.useCallback((()=>{X.current=-1,m(void 0),b(void 0),k(void 0),w(!1),s(void 0),u(void 0),p(void 0),h(!1),l(void 0),r(void 0)}),[]),K=i.useCallback(((e,t)=>{var n,r,i;if(0===e.button){if(void 0!==o){if(!0===(null==B?void 0:B.hasIndex(o)))for(const t of B){if(t===o)continue;const e=$[t],r=yn(e,X.current,P,T);null==E||E(e,r,t,r+(null!=(n=e.growOffset)?n:0))}const e=yn($[o],X.current,P,T);if(null==O||O($[o],e,o,e+(null!=(r=$[o].growOffset)?r:0)),B.hasIndex(o))for(const t of B){if(t===o)continue;const e=$[t],n=yn(e,X.current,P,T);null==O||O(e,n,t,n+(null!=(i=e.growOffset)?i:0))}}Y(),void 0!==a&&void 0!==c&&(null==M||M(a,c)),void 0!==g&&void 0!==v&&(null==D||D(g,v))}null==F||F(e,t)}),[F,o,a,c,g,v,B,O,$,P,T,E,M,D,Y]),G=i.useMemo((()=>{if(void 0!==a&&void 0!==c&&a!==c)return{src:a,dest:c}}),[a,c]),q=i.useCallback((e=>{var t,r;const i=null==_?void 0:_.current;if(void 0!==a&&void 0!==f){Math.abs(e.clientX-f)>20&&h(!0)}else if(void 0!==g&&void 0!==x){Math.abs(e.clientY-x)>20&&w(!0)}else if(void 0!==o&&void 0!==n&&i){const l=i.getBoundingClientRect().width/i.offsetWidth,a=(e.clientX-n)/l,s=$[o],c=yn(s,a,P,T);if(null==E||E(s,c,o,c+(null!=(t=s.growOffset)?t:0)),X.current=a,(null==B?void 0:B.first())===o)for(const e of B){if(e===o)continue;const t=$[e],n=yn(t,X.current,P,T);null==E||E(t,n,e,n+(null!=(r=t.growOffset)?r:0))}}}),[a,f,g,x,o,n,$,P,T,E,B,_]),Q=i.useCallback(((e,t)=>{if(void 0===g||void 0===v)return C(e,t);let[n,r]=e;return r===v?r=g:(r>v&&(r-=1),r>=g&&(r+=1)),C([n,r],t)}),[g,v,C]),J=i.useCallback((e=>{null==A||A(e),e.defaultPrevented()||Y()}),[Y,A]);return i.createElement(bn,{accessibilityHeight:e.accessibilityHeight,canvasRef:e.canvasRef,cellXOffset:e.cellXOffset,cellYOffset:e.cellYOffset,columns:e.columns,disabledRows:e.disabledRows,drawCustomCell:e.drawCustomCell,drawFocusRing:e.drawFocusRing,drawHeader:e.drawHeader,enableGroups:e.enableGroups,eventTargetRef:e.eventTargetRef,experimental:e.experimental,fillHandle:e.fillHandle,firstColAccessible:e.firstColAccessible,fixedShadowX:e.fixedShadowX,fixedShadowY:e.fixedShadowY,freezeColumns:e.freezeColumns,getCellRenderer:e.getCellRenderer,getGroupDetails:e.getGroupDetails,getRowThemeOverride:e.getRowThemeOverride,groupHeaderHeight:e.groupHeaderHeight,headerHeight:e.headerHeight,headerIcons:e.headerIcons,height:e.height,highlightRegions:e.highlightRegions,imageWindowLoader:e.imageWindowLoader,isDraggable:e.isDraggable,isFilling:e.isFilling,isFocused:e.isFocused,onCanvasBlur:e.onCanvasBlur,onCanvasFocused:e.onCanvasFocused,onCellFocused:e.onCellFocused,onContextMenu:e.onContextMenu,onDragEnd:e.onDragEnd,onDragLeave:e.onDragLeave,onDragOverCell:e.onDragOverCell,onDrop:e.onDrop,onKeyDown:e.onKeyDown,onKeyUp:e.onKeyUp,onMouseMove:e.onMouseMove,prelightCells:e.prelightCells,rowHeight:e.rowHeight,rows:e.rows,selection:e.selection,smoothScrollX:e.smoothScrollX,smoothScrollY:e.smoothScrollY,theme:e.theme,trailingRowType:e.trailingRowType,translateX:e.translateX,translateY:e.translateY,verticalBorder:e.verticalBorder,width:e.width,getCellContent:Q,isResizing:void 0!==o,onHeaderMenuClick:U,isDragging:d,onItemHovered:W,onDragStart:J,onMouseDown:Z,allowResize:V,onMouseUp:K,dragAndDropState:G,onMouseMoveRaw:q,ref:I})};var xn=(0,r.d)("div")({name:"ScrollRegionStyle",class:"s1jz82f8",vars:{"s1jz82f8-0":[e=>e.isSafari?"scroll":"auto"]}});function kn(e){e.stopPropagation()}var Sn=e=>{var t,n,r,o;const{children:l,clientHeight:a,scrollHeight:s,scrollWidth:c,update:u,draggable:d,className:h,preventDiagonalScrolling:f=!1,paddingBottom:p=0,paddingRight:g=0,rightElement:m,rightElementProps:v,scrollRef:b,scrollToEnd:y,initialSize:w,minimap:x}=e,k=[],S=null!=(t=null==v?void 0:v.sticky)&&t,C=null!=(n=null==v?void 0:v.fill)&&n,M=i.useRef(0),E=i.useRef(0),R=i.useRef(null),O=window.devicePixelRatio;i.useEffect((()=>{const e=R.current;null!==e&&!0===y&&(e.scrollLeft=e.scrollWidth-e.clientWidth)}),[y]);const I=i.useRef({scrollLeft:0,scrollTop:0,lockDirection:void 0}),T=i.useRef(null),P=function(e){const[t,n]=i.useState(!1),r=i.useRef(0);return Ge("touchstart",i.useCallback((()=>{window.clearTimeout(r.current),n(!0)}),[]),window,!0,!1),Ge("touchend",i.useCallback((t=>{0===t.touches.length&&(r.current=window.setTimeout((()=>n(!1)),e))}),[e]),window,!0,!1),t}(200),[D,H]=i.useState(!0),L=i.useRef(0);i.useEffect((()=>{if(!D||P||void 0===I.current.lockDirection)return;const e=R.current;if(null===e)return;const[t,n]=I.current.lockDirection;void 0!==t?e.scrollLeft=t:void 0!==n&&(e.scrollTop=n),I.current.lockDirection=void 0}),[P,D]);const F=i.useCallback((()=>{var e,t,n,r;const i=R.current;if(null===i)return;let o=i.scrollTop,l=i.scrollLeft;const a=I.current.scrollTop,c=I.current.scrollLeft,d=l-c,h=o-a;P&&0!==d&&0!==h&&(Math.abs(d)>3||Math.abs(h)>3)&&f&&void 0===I.current.lockDirection&&(I.current.lockDirection=Math.abs(d)<Math.abs(h)?[c,void 0]:[void 0,a]);const m=I.current.lockDirection;l=null!=(e=null==m?void 0:m[0])?e:l,o=null!=(t=null==m?void 0:m[1])?t:o,I.current.scrollLeft=l,I.current.scrollTop=o;const v=o,b=E.current-v,y=i.scrollHeight-i.clientHeight;if(E.current=v,y>0&&(Math.abs(b)>2e3||0===v||v===y)&&s>i.scrollHeight+5){const e=v/y,t=(s-i.clientHeight)*e;M.current=t-v}void 0!==m&&(window.clearTimeout(L.current),H(!1),L.current=window.setTimeout((()=>H(!0)),200)),u({x:l,y:v+M.current,width:i.clientWidth-g,height:i.clientHeight-p,paddingRight:null!=(r=null==(n=T.current)?void 0:n.clientWidth)?r:0})}),[p,g,s,u,f,P]),z=i.useRef(F);z.current=F;const A=i.useRef(),_=i.useRef(!1);i.useEffect((()=>{_.current?F():_.current=!0}),[F,p,g]);const V=i.useCallback((e=>{R.current=e,void 0!==b&&(b.current=e)}),[b]);let $=0,N=0;for(k.push(i.createElement("div",{key:$++,style:{width:c,height:0}}));N<s;){const e=Math.min(5e6,s-N);k.push(i.createElement("div",{key:$++,style:{width:0,height:e}})),N+=e}const{ref:B,width:W,height:j}=function(e){const t=(0,i.useRef)(null),[n,r]=(0,i.useState)({width:null==e?void 0:e[0],height:null==e?void 0:e[1]});return(0,i.useLayoutEffect)((()=>{const e=new window.ResizeObserver((e=>{for(const t of e){const{width:e,height:n}=t&&t.contentRect||{};r((t=>t.width===e&&t.height===n?t:{width:e,height:n}))}}));return t.current&&e.observe(t.current,void 0),()=>{e.disconnect()}}),[t.current]),{ref:t,...n}}(w);return(null==(r=A.current)?void 0:r.height)===j&&(null==(o=A.current)?void 0:o.width)===W||(window.setTimeout((()=>z.current()),0),A.current={width:W,height:j}),0===(null!=W?W:0)||0===(null!=j?j:0)?i.createElement("div",{ref:B}):i.createElement("div",{ref:B},i.createElement(xn,{isSafari:mn.value},x,i.createElement("div",{className:"dvn-underlay"},l),i.createElement("div",{ref:V,style:A.current,draggable:d,onDragStart:e=>{d||(e.stopPropagation(),e.preventDefault())},className:"dvn-scroller "+(null!=h?h:""),onScroll:F},i.createElement("div",{className:"dvn-scroll-inner"+(void 0===m?" hidden":"")},i.createElement("div",{className:"dvn-stack"},k),void 0!==m&&i.createElement(i.Fragment,null,!C&&i.createElement("div",{className:"dvn-spacer"}),i.createElement("div",{ref:T,onMouseDown:kn,onMouseUp:kn,onMouseMove:kn,style:{height:j,maxHeight:a-Math.ceil(O%1),position:"sticky",top:0,paddingLeft:1,marginBottom:-40,marginRight:g,flexGrow:C?1:void 0,right:S?null!=g?g:0:void 0,pointerEvents:"auto"}},m))))))},Cn=(0,r.d)("div")({name:"MinimapStyle",class:"m15w2ly5"}),Mn=e=>{var t,n,r;const{columns:l,rows:a,rowHeight:s,headerHeight:c,groupHeaderHeight:u,enableGroups:d,freezeColumns:h,experimental:f,clientSize:p,className:g,onVisibleRegionChanged:m,scrollToEnd:v,scrollRef:b,preventDiagonalScrolling:y,rightElement:w,rightElementProps:x,overscrollX:k,overscrollY:S,showMinimap:C=!1,initialSize:M,smoothScrollX:E=!1,smoothScrollY:R=!1,isDraggable:O}=e,{paddingRight:I,paddingBottom:T}=null!=f?f:{},[P,D]=p,H=i.useRef(),L=i.useRef(),F=i.useRef(),z=i.useRef(),A=i.useMemo((()=>{let e=Math.max(0,null!=k?k:0);for(const t of l)e+=t.width;return e}),[l,k]);let _=d?c+u:c;if("number"===typeof s)_+=a*s;else for(let i=0;i<a;i++)_+=s(i);void 0!==S&&(_+=S);const V=i.useRef(),$=i.useCallback((()=>{var e,t,n;if(void 0===V.current)return;const r={...V.current};let i=0,o=r.x<0?-r.x:0,c=0,u=0;r.x=r.x<0?0:r.x;let d=0;for(let a=0;a<h;a++)d+=l[a].width;for(const a of l){const e=i-d;if(r.x>=e+a.width)i+=a.width,u++,c++;else if(r.x>e)i+=a.width,E?o+=e-r.x:u++,c++;else{if(!(r.x+r.width>e))break;i+=a.width,c++}}let f=0,p=0,g=0;if("number"===typeof s)R?(p=Math.floor(r.y/s),f=p*s-r.y):p=Math.ceil(r.y/s),g=Math.ceil(r.height/s)+p,f<0&&g++;else{let e=0;for(let t=0;t<a;t++){const n=s(t),i=e+(R?0:n/2);if(r.y>=e+n)e+=n,p++,g++;else if(r.y>i)e+=n,R?f+=i-r.y:p++,g++;else{if(!(r.y+r.height>n/2+e))break;e+=n,g++}}}const v={x:u,y:p,width:c-u,height:g-p},b=H.current;void 0!==b&&b.y===v.y&&b.x===v.x&&b.height===v.height&&b.width===v.width&&L.current===o&&F.current===f&&r.width===(null==(e=z.current)?void 0:e[0])&&r.height===(null==(t=z.current)?void 0:t[1])||(null==m||m({x:u,y:p,width:c-u,height:g-p},r.width,r.height,null!=(n=r.paddingRight)?n:0,o,f),H.current=v,L.current=o,F.current=f,z.current=[r.width,r.height])}),[l,s,a,m,h,E,R]),N=i.useCallback((e=>{V.current=e,$()}),[$]);i.useEffect((()=>{$()}),[$]);const B=null!=(t=null==b?void 0:b.current)?t:void 0,W=o(A/_,2/3,1.5),j=200,Z=W>1?j:Math.ceil(j*W),U=W>1?Math.ceil(j/W):j,X=Z/A,Y=U/_,K=Math.min(P*Math.max(X,.01),Z),G=Math.min(D*Math.max(Y,.01),U),q=(null!=(n=null==B?void 0:B.scrollLeft)?n:0)/(A-P)*(Z-K),Q=(null!=(r=null==B?void 0:B.scrollTop)?r:0)/(_-D)*(U-G),J=i.useMemo((()=>{if(!C||0===K||0===G)return;const e=e=>{if(void 0===B)return;const t=e.currentTarget.getBoundingClientRect(),n=e.clientX-t.x-K/2,r=e.clientY-t.y-G/2,i=(A-B.clientWidth)*(n/(Z-K)),o=(_-B.clientHeight)*(r/(U-G));B.scrollTo({left:i,top:o,behavior:"mousemove"===e.type?"auto":"smooth"})};return i.createElement(Cn,{style:{width:Z,height:U},"data-testid":"minimap-container",onMouseMove:t=>{1===t.buttons&&e(t)},onClick:e},i.createElement("div",{className:"header"}),i.createElement("div",{className:"locationMarker",onDragStart:e=>e.preventDefault(),style:{left:q,top:Q,width:K,height:G,borderRadius:Math.min(K,.2*G,9)}}))}),[U,_,q,B,C,Q,G,K,Z,A]);return i.createElement(Sn,{scrollRef:b,minimap:J,className:g,preventDiagonalScrolling:y,draggable:!0===O||"string"===typeof O,scrollWidth:A+(null!=I?I:0),scrollHeight:_+(null!=T?T:0),clientHeight:D,rightElement:w,paddingBottom:T,paddingRight:I,rightElementProps:x,update:N,initialSize:M,scrollToEnd:v},i.createElement(wn,{eventTargetRef:b,width:P,height:D,accessibilityHeight:e.accessibilityHeight,canvasRef:e.canvasRef,cellXOffset:e.cellXOffset,cellYOffset:e.cellYOffset,columns:e.columns,disabledRows:e.disabledRows,enableGroups:e.enableGroups,fillHandle:e.fillHandle,firstColAccessible:e.firstColAccessible,fixedShadowX:e.fixedShadowX,fixedShadowY:e.fixedShadowY,freezeColumns:e.freezeColumns,getCellContent:e.getCellContent,getCellRenderer:e.getCellRenderer,getGroupDetails:e.getGroupDetails,getRowThemeOverride:e.getRowThemeOverride,groupHeaderHeight:e.groupHeaderHeight,headerHeight:e.headerHeight,highlightRegions:e.highlightRegions,imageWindowLoader:e.imageWindowLoader,isFilling:e.isFilling,isFocused:e.isFocused,lockColumns:e.lockColumns,maxColumnWidth:e.maxColumnWidth,minColumnWidth:e.minColumnWidth,onHeaderMenuClick:e.onHeaderMenuClick,onMouseMove:e.onMouseMove,prelightCells:e.prelightCells,rowHeight:e.rowHeight,rows:e.rows,selection:e.selection,theme:e.theme,trailingRowType:e.trailingRowType,translateX:e.translateX,translateY:e.translateY,verticalBorder:e.verticalBorder,drawCustomCell:e.drawCustomCell,drawFocusRing:e.drawFocusRing,drawHeader:e.drawHeader,experimental:e.experimental,gridRef:e.gridRef,headerIcons:e.headerIcons,isDraggable:e.isDraggable,onCanvasBlur:e.onCanvasBlur,onCanvasFocused:e.onCanvasFocused,onCellFocused:e.onCellFocused,onColumnMoved:e.onColumnMoved,onColumnResize:e.onColumnResize,onColumnResizeEnd:e.onColumnResizeEnd,onColumnResizeStart:e.onColumnResizeStart,onContextMenu:e.onContextMenu,onDragEnd:e.onDragEnd,onDragLeave:e.onDragLeave,onDragOverCell:e.onDragOverCell,onDragStart:e.onDragStart,onDrop:e.onDrop,onItemHovered:e.onItemHovered,onKeyDown:e.onKeyDown,onKeyUp:e.onKeyUp,onMouseDown:e.onMouseDown,onMouseUp:e.onMouseUp,onRowMoved:e.onRowMoved,smoothScrollX:e.smoothScrollX,smoothScrollY:e.smoothScrollY}))},En=(0,r.d)("div")({name:"SearchWrapper",class:"sxep88s",vars:{"sxep88s-0":[e=>e.showSearch?0:400,"px"]}}),Rn=i.createElement("svg",{className:"button-icon",viewBox:"0 0 512 512"},i.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"48",d:"M112 244l144-144 144 144M256 120v292"})),On=i.createElement("svg",{className:"button-icon",viewBox:"0 0 512 512"},i.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"48",d:"M112 268l144 144 144-144M256 392V100"})),In=i.createElement("svg",{className:"button-icon",viewBox:"0 0 512 512"},i.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"M368 368L144 144M368 144L144 368"})),Tn=e=>{const{canvasRef:t,cellYOffset:n,rows:r,columns:o,searchInputRef:l,searchValue:a,searchResults:s,onSearchValueChange:c,getCellsForSelection:u,onSearchResultsChanged:d,showSearch:h=!1,onSearchClose:f}=e,[p]=i.useState((()=>"search-box-"+Math.round(1e3*Math.random()))),[g,m]=i.useState(""),v=null!=a?a:g,b=i.useCallback((e=>{m(e),null==c||c(e)}),[c]),[y,w]=i.useState(),x=i.useRef(y);x.current=y,i.useEffect((()=>{void 0!==s&&(s.length>0?w((e=>{var t;return{rowsSearched:r,results:s.length,selectedIndex:null!=(t=null==e?void 0:e.selectedIndex)?t:-1}})):w(void 0))}),[r,s]);const k=i.useRef(new AbortController),S=i.useRef(),[C,M]=i.useState([]),E=null!=s?s:C,R=i.useCallback((()=>{void 0!==S.current&&(window.cancelAnimationFrame(S.current),S.current=void 0,k.current.abort())}),[]),O=i.useRef(n);O.current=n;const I=i.useCallback((e=>{const t=new RegExp(e.replace(/([$()*+.?[\\\]^{|}-])/g,"\\$1"),"i");let n=O.current,i=Math.min(10,r),l=0;w(void 0),M([]);const a=[],s=async()=>{var e,c;if(void 0===u)return;const h=performance.now(),f=r-l;let p=u({x:0,y:n,width:o.length,height:Math.min(i,f,r-n)},k.current.signal);"function"===typeof p&&(p=await p());let g=!1;for(const[r,i]of p.entries())for(const[e,o]of i.entries()){let i;switch(o.kind){case ge.Text:case ge.Number:i=o.displayData;break;case ge.Uri:case ge.Markdown:i=o.data;break;case ge.Boolean:i="boolean"===typeof o.data?o.data.toString():void 0;break;case ge.Image:case ge.Bubble:i=o.data.join("\ud83d\udc33");break;case ge.Custom:i=o.copyData}void 0!==i&&t.test(i)&&(a.push([e,r+n]),g=!0)}const m=performance.now();g&&M([...a]),l+=p.length,oe(l<=r);const v=null!=(c=null==(e=x.current)?void 0:e.selectedIndex)?c:-1;w({results:a.length,rowsSearched:l,selectedIndex:v}),null==d||d(a,v),n+i>=r?n=0:n+=i;const b=m-h,y=10/Math.max(b,1);i=Math.ceil(i*y),l<r&&a.length<1e3&&(S.current=window.requestAnimationFrame(s))};R(),S.current=window.requestAnimationFrame(s)}),[R,o.length,u,d,r]),T=i.useCallback((()=>{var e;null==f||f(),w(void 0),M([]),null==d||d([],-1),R(),null==(e=null==t?void 0:t.current)||e.focus()}),[R,t,f,d]),P=i.useCallback((e=>{b(e.target.value),void 0===s&&(""===e.target.value?(w(void 0),M([]),R()):I(e.target.value))}),[I,R,b,s]);i.useEffect((()=>{h&&null!==l.current&&(b(""),l.current.focus({preventScroll:!0}))}),[h,l,b]);const D=i.useCallback((e=>{var t;if(null==(t=null==e?void 0:e.stopPropagation)||t.call(e),void 0===y)return;const n=(y.selectedIndex+1)%y.results;w({...y,selectedIndex:n}),null==d||d(E,n)}),[y,d,E]),H=i.useCallback((e=>{var t;if(null==(t=null==e?void 0:e.stopPropagation)||t.call(e),void 0===y)return;let n=(y.selectedIndex-1)%y.results;n<0&&(n+=y.results),w({...y,selectedIndex:n}),null==d||d(E,n)}),[d,E,y]),L=i.useCallback((e=>{(e.ctrlKey||e.metaKey)&&"KeyF"===e.nativeEvent.code||"Escape"===e.key?(T(),e.stopPropagation(),e.preventDefault()):"Enter"===e.key&&(e.shiftKey?H():D())}),[T,D,H]);i.useEffect((()=>()=>{R()}),[R]);const F=i.useMemo((()=>{var e,t,n;let o;void 0!==y&&(o=y.results>=1e3?"over 1000":`${y.results} result${1!==y.results?"s":""}`,y.selectedIndex>=0&&(o=`${y.selectedIndex+1} of ${o}`));const a=e=>{e.stopPropagation()},s={width:`${Math.floor((null!=(e=null==y?void 0:y.rowsSearched)?e:0)/r*100)}%`};return i.createElement(En,{showSearch:h,onMouseDown:a,onMouseMove:a,onMouseUp:a,onClick:a},i.createElement("div",{className:"search-bar-inner"},i.createElement("input",{id:p,"aria-hidden":!h,"data-testid":"search-input",ref:l,onChange:P,value:v,tabIndex:h?void 0:-1,onKeyDownCapture:L}),i.createElement("button",{"aria-label":"Previous Result","aria-hidden":!h,tabIndex:h?void 0:-1,onClick:H,disabled:0===(null!=(t=null==y?void 0:y.results)?t:0)},Rn),i.createElement("button",{"aria-label":"Next Result","aria-hidden":!h,tabIndex:h?void 0:-1,onClick:D,disabled:0===(null!=(n=null==y?void 0:y.results)?n:0)},On),void 0!==f&&i.createElement("button",{"aria-label":"Close Search","aria-hidden":!h,"data-testid":"search-close-button",tabIndex:h?void 0:-1,onClick:T},In)),void 0!==y?i.createElement(i.Fragment,null,i.createElement("div",{className:"search-status"},i.createElement("div",{"data-testid":"search-result-area"},o)),i.createElement("div",{className:"search-progress",style:s})):i.createElement("div",{className:"search-status"},i.createElement("label",{htmlFor:p},"Type to search")))}),[T,D,H,P,f,L,r,y,v,h,p,l]);return i.createElement(i.Fragment,null,i.createElement(Mn,{prelightCells:E,accessibilityHeight:e.accessibilityHeight,canvasRef:e.canvasRef,cellXOffset:e.cellXOffset,cellYOffset:e.cellYOffset,className:e.className,clientSize:e.clientSize,columns:e.columns,disabledRows:e.disabledRows,enableGroups:e.enableGroups,fillHandle:e.fillHandle,firstColAccessible:e.firstColAccessible,fixedShadowX:e.fixedShadowX,fixedShadowY:e.fixedShadowY,freezeColumns:e.freezeColumns,getCellContent:e.getCellContent,getCellRenderer:e.getCellRenderer,getGroupDetails:e.getGroupDetails,getRowThemeOverride:e.getRowThemeOverride,groupHeaderHeight:e.groupHeaderHeight,headerHeight:e.headerHeight,highlightRegions:e.highlightRegions,imageWindowLoader:e.imageWindowLoader,initialSize:e.initialSize,isFilling:e.isFilling,isFocused:e.isFocused,lockColumns:e.lockColumns,maxColumnWidth:e.maxColumnWidth,minColumnWidth:e.minColumnWidth,onHeaderMenuClick:e.onHeaderMenuClick,onMouseMove:e.onMouseMove,onVisibleRegionChanged:e.onVisibleRegionChanged,overscrollX:e.overscrollX,overscrollY:e.overscrollY,preventDiagonalScrolling:e.preventDiagonalScrolling,rightElement:e.rightElement,rightElementProps:e.rightElementProps,rowHeight:e.rowHeight,rows:e.rows,scrollRef:e.scrollRef,selection:e.selection,showMinimap:e.showMinimap,theme:e.theme,trailingRowType:e.trailingRowType,translateX:e.translateX,translateY:e.translateY,verticalBorder:e.verticalBorder,drawCustomCell:e.drawCustomCell,drawFocusRing:e.drawFocusRing,drawHeader:e.drawHeader,experimental:e.experimental,gridRef:e.gridRef,headerIcons:e.headerIcons,isDraggable:e.isDraggable,onCanvasBlur:e.onCanvasBlur,onCanvasFocused:e.onCanvasFocused,onCellFocused:e.onCellFocused,onColumnMoved:e.onColumnMoved,onColumnResize:e.onColumnResize,onColumnResizeEnd:e.onColumnResizeEnd,onColumnResizeStart:e.onColumnResizeStart,onContextMenu:e.onContextMenu,onDragEnd:e.onDragEnd,onDragLeave:e.onDragLeave,onDragOverCell:e.onDragOverCell,onDragStart:e.onDragStart,onDrop:e.onDrop,onItemHovered:e.onItemHovered,onKeyDown:e.onKeyDown,onKeyUp:e.onKeyUp,onMouseDown:e.onMouseDown,onMouseUp:e.onMouseUp,onRowMoved:e.onRowMoved,smoothScrollX:e.smoothScrollX,smoothScrollY:e.smoothScrollY,scrollToEnd:e.scrollToEnd}),F)},Pn=(0,r.d)("input")({name:"RenameInput",class:"r1kzy40b",vars:{"r1kzy40b-0":[e=>Math.max(16,e.targetHeight-10),"px"]}}),Dn=e=>{const{bounds:t,group:n,onClose:r,canvasBounds:o,onFinish:l}=e,[a,s]=i.useState(n);return i.createElement(ce,{style:{position:"absolute",left:t.x-o.left+1,top:t.y-o.top,width:t.width-2,height:t.height},className:"c1sqdbw3",onClickOutside:r},i.createElement(Pn,{targetHeight:t.height,"data-testid":"group-rename-input",value:a,onBlur:r,onFocus:e=>e.target.setSelectionRange(0,a.length),onChange:e=>s(e.target.value),onKeyDown:e=>{"Enter"===e.key?l(a):"Escape"===e.key&&r()},autoFocus:!0}))},Hn=150;function Ln(e,t,n,r,i,o,l,a,s){let c=[];if(void 0!==i&&c.push(...i.map((e=>e[r])).map((n=>function(e,t,n,r){var i,o;const l=r(t);return null!=(o=null==(i=null==l?void 0:l.measure)?void 0:i.call(l,e,t,n))?o:Hn}(e,n,t,s)))),c.length>5&&a){const e=c.reduce(((e,t)=>e+t))/c.length;c=c.filter((t=>t<2*e))}c.push(e.measureText(n.title).width+16+(void 0===n.icon?0:28));const u=Math.max(...c),d=Math.max(Math.ceil(o),Math.min(Math.floor(l),Math.ceil(u)));return{...n,width:d}}function Fn(e,t){if(0===e.length)return!1;let n=!1,r=!1,i=!1,o=!1;const l=e.split("+");if(!function(e,t){if(void 0===e)return!1;if(e.length>1&&e.startsWith("_")){if(Number.parseInt(e.slice(1))!==t.keyCode)return!1}else if(e!==t.key)return!1;return!0}(l.pop(),t))return!1;for(const a of l)switch(a){case"ctrl":n=!0;break;case"shift":r=!0;break;case"alt":i=!0;break;case"meta":o=!0;break;case"primary":vn.value?o=!0:n=!0}return t.altKey===i&&t.ctrlKey===n&&t.shiftKey===r&&t.metaKey===o}function zn(e){return e.startsWith('"')&&e.endsWith('"')&&(e=e.slice(1,-1).replace(/""/g,'"')),e}function An(e){var t,n;(n=t||(t={}))[n.None=0]="None",n[n.inString=1]="inString",n[n.inStringPostQuote=2]="inStringPostQuote";const r=[];let i=[],o=0,l=0;e=e.replace(/\r\n/g,"\n");let a=0;for(const s of e){switch(l){case 0:"\t"===s||"\n"===s?(i.push(e.slice(o,a)),o=a+1,"\n"===s&&(r.push(i),i=[])):'"'===s&&(l=1);break;case 1:'"'===s&&(l=2);break;case 2:'"'===s?l=1:"\t"===s||"\n"===s?(i.push(zn(e.slice(o,a))),o=a+1,"\n"===s&&(r.push(i),i=[]),l=0):l=0}a++}return o<e.length&&i.push(zn(e.slice(o,e.length))),r.push(i),r}function _n(e){var t,n;const r=[e],i=[];let o;for(;r.length>0;){const e=r.pop();if(void 0===e)break;e instanceof HTMLTableElement||"TBODY"===e.nodeName?r.push(...[...e.children].reverse()):e instanceof HTMLTableRowElement?(void 0!==o&&i.push(o),o=[],r.push(...[...e.children].reverse())):e instanceof HTMLTableCellElement&&(null==o||o.push(null!=(n=null!=(t=e.innerText)?t:e.textContent)?n:""))}return void 0!==o&&i.push(o),i}function Vn(e){return/[\t\n",]/.test(e)&&(e=`"${e.replace(/"/g,'""')}"`),e}var $n=e=>{switch(e){case!0:return"TRUE";case!1:return"FALSE";case we:return"INDETERMINATE";case ye:return"";default:le(0,"A boolean was formated with invalid type: "+typeof e)}};function Nn(e,t,n,r){var i,o;const l=r[t];if(void 0!==e.span&&e.span[0]!==l)return"";if(void 0!==e.copyData)return Vn(e.copyData);switch(e.kind){case ge.Text:case ge.Number:return Vn(n?null!=(o=null==(i=e.data)?void 0:i.toString())?o:"":e.displayData);case ge.Markdown:case ge.RowID:case ge.Uri:return Vn(e.data);case ge.Image:case ge.Bubble:return 0===e.data.length?"":e.data.reduce(((e,t)=>`${Vn(e)},${Vn(t)}`));case ge.Boolean:return $n(e.data);case ge.Loading:return n?"":"#LOADING";case ge.Protected:return n?"":"************";case ge.Drilldown:return 0===e.data.length?"":e.data.map((e=>e.text)).reduce(((e,t)=>`${Vn(e)},${Vn(t)}`));case ge.Custom:return Vn(e.copyData);default:le(0,`A cell was passed with an invalid kind: ${e.kind}`)}}function Bn(e,t,n){var r,i,o,l;const a=function(e,t){return e.map((e=>e.map(((e,n)=>Nn(e,n,!1,t))).join("\t"))).join("\n")}(e,t);if(void 0!==(null==(r=window.navigator.clipboard)?void 0:r.write)||void 0!==n){const r=document.createElement("tbody");for(const n of e){const e=document.createElement("tr");for(const[r,i]of n.entries()){const n=document.createElement("td");if(i.kind===ge.Uri){const e=document.createElement("a");e.href=i.data,e.innerText=i.data,n.append(e)}else n.innerText=Nn(i,r,!0,t);e.append(n)}r.append(e)}if(void 0!==(null==(i=window.navigator.clipboard)?void 0:i.write))window.navigator.clipboard.write([new ClipboardItem({"text/plain":new Blob([a],{type:"text/plain"}),"text/html":new Blob([`<table>${r.outerHTML}</table>`],{type:"text/html"})})]);else if(void 0!==n&&null!==(null==n?void 0:n.clipboardData))try{n.clipboardData.setData("text/plain",a),n.clipboardData.setData("text/html",`<table>${r.outerHTML}</table>`)}catch(s){null==(o=window.navigator.clipboard)||o.writeText(a)}}else null==(l=window.navigator.clipboard)||l.writeText(a);null==n||n.preventDefault()}function Wn(e){return"string"===typeof e?e:`${e}px`}var jn=(0,r.d)("div")({name:"Wrapper",class:"wzg2m5k",vars:{"wzg2m5k-0":[e=>e.innerWidth],"wzg2m5k-1":[e=>e.innerHeight]}}),Zn=e=>{const{inWidth:t,inHeight:n,children:r,...o}=e;return i.createElement(jn,{innerHeight:Wn(n),innerWidth:Wn(t),...o},r)};function Un(e){return!0!==e}var Xn={getAccessibilityString:e=>{var t,n;return null!=(n=null==(t=e.data)?void 0:t.toString())?n:"false"},kind:ge.Boolean,needsHover:!0,useLabel:!1,needsHoverPosition:!0,measure:()=>50,draw:e=>{var t;return function(e,t,n,r){if(!n&&t===ye)return;const{ctx:i,hoverAmount:o,theme:l,rect:a,highlighted:s,hoverX:c,hoverY:u,cell:{contentAlign:d}}=e,{x:h,y:f,width:p,height:g}=a;let m=n?.65+.35*o:.4;t===ye&&(m*=o),0!==m&&(i.globalAlpha=m,Tt(i,l,t,h,f,p,g,s,c,u,r,d),i.globalAlpha=1)}(e,e.cell.data,Ae(e.cell),null!=(t=e.cell.maxSize)?t:20)},onDelete:e=>({...e,data:!1}),onClick:e=>{var t,n;const{cell:r,posX:i,posY:o,bounds:l,theme:a}=e,{width:s,height:c,x:u,y:d}=l,h=null!=(t=r.maxSize)?t:20,f=Math.floor(l.y+c/2),p=nt(h,c,a.cellVerticalPadding),g=tt(null!=(n=r.contentAlign)?n:"center",u,s,a.cellHorizontalPadding,p),m=et(g,f,p),v=rt(u+i,d+o,m);if(Ae(r)&&v)return{...r,data:Un(r.data)}},onPaste:(e,t)=>{let n=ye;return"true"===e.toLowerCase()?n=!0:"false"===e.toLowerCase()?n=!1:"indeterminate"===e.toLowerCase()&&(n=we),n===t.data?void 0:{...t,data:n}}};var Yn=(0,r.d)("div")({name:"BubblesOverlayEditorStyle",class:"b1bqsp5z"}),Kn=e=>{const{bubbles:t}=e;return i.createElement(Yn,null,t.map(((e,t)=>i.createElement("div",{key:t,className:"boe-bubble"},e))),i.createElement("textarea",{className:"gdg-input",autoFocus:!0}))},Gn={getAccessibilityString:e=>{var t,n;return null!=(n=null==(t=e.data)?void 0:t.toString())?n:""},kind:ge.Bubble,needsHover:!1,useLabel:!1,needsHoverPosition:!1,measure:(e,t,n)=>t.data.reduce(((t,n)=>e.measureText(n).width+t+20),0)+2*n.cellHorizontalPadding-4,draw:e=>function(e,t){const{rect:n,theme:r,ctx:i,highlighted:o}=e,{x:l,y:a,width:s,height:c}=n;let u=l+r.cellHorizontalPadding;const d=[];for(const h of t){if(u>l+s)break;const e=xt(h,i,`${r.baseFontStyle} ${r.fontFamily}`).width;d.push({x:u,width:e}),u+=e+16+4}i.beginPath();for(const h of d)Dt(i,h.x,a+(c-20)/2,h.width+16,20,10);i.fillStyle=o?r.bgBubbleSelected:r.bgBubble,i.fill();for(const[h,f]of d.entries())i.beginPath(),i.fillStyle=r.textBubble,i.fillText(t[h],f.x+8,a+c/2+kt(i,r))}(e,e.cell.data),provideEditor:()=>e=>{const{value:t}=e;return i.createElement(Kn,{bubbles:t.data})},onPaste:()=>{}},qn=(0,r.d)("div")({name:"DrilldownOverlayEditorStyle",class:"df2kt4a"}),Qn=e=>{const{drilldowns:t}=e;return i.createElement(qn,null,t.map(((e,t)=>i.createElement("div",{key:t,className:"doe-bubble"},void 0!==e.img&&i.createElement("img",{src:e.img}),i.createElement("div",null,e.text)))))},Jn={getAccessibilityString:e=>e.data.map((e=>e.text)).join(", "),kind:ge.Drilldown,needsHover:!1,useLabel:!1,needsHoverPosition:!1,measure:(e,t,n)=>t.data.reduce(((t,n)=>e.measureText(n.text).width+t+20+(void 0!==n.img?18:0)),0)+2*n.cellHorizontalPadding-4,draw:e=>Lt(e,e.cell.data),provideEditor:()=>e=>{const{value:t}=e;return i.createElement(Qn,{drilldowns:t.data})},onPaste:()=>{}},er=(0,r.d)("div")({name:"ImageOverlayEditorStyle",class:"i1eozt10"}),tr=e=>{const{urls:t,canWrite:n,onEditClick:r,renderImage:o}=e,l=t.filter((e=>""!==e));if(0===l.length)return null;const a=l.length>1;return i.createElement(er,{"data-testid":"GDG-default-image-overlay-editor"},i.createElement(y.lr,{showArrows:a,showThumbs:!1,swipeable:a,emulateTouch:a,infiniteLoop:a},l.map((e=>{var t;const n=null!=(t=null==o?void 0:o(e))?t:i.createElement("img",{draggable:!1,src:e});return i.createElement("div",{className:"centering-container",key:e},n)}))),n&&r&&i.createElement("button",{className:"edit-icon",onClick:r},i.createElement(it,null)))},nr={getAccessibilityString:e=>e.data.join(", "),kind:ge.Image,needsHover:!1,useLabel:!1,needsHoverPosition:!1,draw:e=>{var t;return function(e,t,n=4,r){const{rect:i,col:o,row:l,theme:a,ctx:s,imageLoader:c}=e,{x:u,y:d,height:h,width:f}=i,p=h-2*a.cellVerticalPadding,g=[];let m=0;for(let b=0;b<t.length;b++){const e=t[b];if(0===e.length)continue;const n=c.loadOrGetImage(e,o,l);void 0!==n&&(g[b]=n,m+=n.width*(p/n.height)+4)}if(0===m)return;m-=4;let v=u+a.cellHorizontalPadding;"right"===r?v=Math.floor(u+f-a.cellHorizontalPadding-m):"center"===r&&(v=Math.floor(u+f/2-m/2));for(const b of g){if(void 0===b)continue;const e=b.width*(p/b.height);n>0&&(Dt(s,v,d+a.cellVerticalPadding,e,p,n),s.save(),s.clip()),s.drawImage(b,v,d+a.cellVerticalPadding,e,p),n>0&&s.restore(),v+=e+4}}(e,null!=(t=e.cell.displayData)?t:e.cell.data,e.cell.rounding,e.cell.contentAlign)},measure:(e,t)=>50*t.data.length,onDelete:e=>({...e,data:[]}),provideEditor:()=>e=>{const{value:t,onFinishedEditing:n,imageEditorOverride:r}=e,o=null!=r?r:tr;return i.createElement(o,{urls:t.data,canWrite:t.allowAdd,onCancel:n,onChange:e=>{n({...t,data:[e]})}})},onPaste:(e,t)=>{const n=(e=e.trim()).split(",").map((e=>{try{return new URL(e),e}catch(t){return}})).filter((e=>void 0!==e));if(n.length!==t.data.length||!n.every(((e,n)=>e===t.data[n])))return{...t,data:n}}},rr={getAccessibilityString:()=>"",kind:ge.Loading,needsHover:!1,useLabel:!1,needsHoverPosition:!1,measure:()=>120,draw:()=>{},onPaste:()=>{}},ir=(0,r.d)("div")({name:"MarkdownContainer",class:"mlbeo71"}),or=class extends i.PureComponent{constructor(){super(...arguments),this.targetElement=null,this.containerRefHook=e=>{this.targetElement=e,this.renderMarkdownIntoDiv()}}renderMarkdownIntoDiv(){const{targetElement:e,props:t}=this;if(null===e)return;const{contents:n,createNode:r}=t,i=re(n),o=document.createRange();o.selectNodeContents(e),o.deleteContents();let l=null==r?void 0:r(i);if(void 0===l){const e=document.createElement("template");e.innerHTML=i,l=e.content}e.append(l);const a=e.getElementsByTagName("a");for(const s of a)s.target="_blank",s.rel="noreferrer noopener"}render(){return this.renderMarkdownIntoDiv(),i.createElement(ir,{ref:this.containerRefHook})}},lr=(0,r.d)("textarea")({name:"InputBox",class:"ijuk0po"}),ar=(0,r.d)("div")({name:"ShadowBox",class:"saq3p5l"}),sr=(0,r.d)("div")({name:"GrowingEntryStyle",class:"gf8vzix"}),cr=0,ur=e=>{const{placeholder:t,value:n,onKeyDown:r,highlight:o,altNewline:l,validatedSelection:a,...s}=e,{onChange:c,className:u}=s,d=i.useRef(null),h=null!=n?n:"";oe(void 0!==c,"GrowingEntry must be a controlled input area");const[f]=i.useState((()=>"input-box-"+(cr=(cr+1)%1e7)));i.useEffect((()=>{const e=d.current;if(null===e)return;if(e.disabled)return;const t=h.toString().length;e.focus(),e.setSelectionRange(o?0:t,t)}),[]),i.useLayoutEffect((()=>{var e;if(void 0!==a){const t="number"===typeof a?[a,null]:a;null==(e=d.current)||e.setSelectionRange(t[0],t[1])}}),[a]);const p=i.useCallback((e=>{"Enter"===e.key&&e.shiftKey&&!0===l||null==r||r(e)}),[l,r]);return i.createElement(sr,{className:"gdg-growing-entry"},i.createElement(ar,{className:u},h+"\n"),i.createElement(lr,{...s,className:(null!=u?u:"")+" gdg-input",id:f,ref:d,onKeyDown:p,value:h,placeholder:t,dir:"auto"}))},dr=(0,r.d)("div")({name:"MarkdownOverlayEditorStyle",class:"mdwzdl1",vars:{"mdwzdl1-0":[e=>e.targetWidth,"px"]}}),hr=e=>{const{value:t,onChange:n,forceEditMode:r,createNode:o,targetRect:l,onFinish:a,validatedSelection:s}=e,c=t.data,u=!0===t.readonly,[d,h]=i.useState(""===c||r),f=i.useCallback((()=>{h((e=>!e))}),[]),p=c?"ml-6":"";return d?i.createElement(dr,{targetWidth:l.width-20},i.createElement(ur,{autoFocus:!0,highlight:!1,validatedSelection:s,value:c,onKeyDown:e=>{"Enter"===e.key&&e.stopPropagation()},onChange:n}),i.createElement("div",{className:`edit-icon checkmark-hover ${p}`,onClick:()=>a(t)},i.createElement(ot,null))):i.createElement(dr,{targetWidth:l.width},i.createElement(or,{contents:c,createNode:o}),!u&&i.createElement(i.Fragment,null,i.createElement("div",{className:"spacer"}),i.createElement("div",{className:`edit-icon edit-hover ${p}`,onClick:f},i.createElement(it,null))),i.createElement("textarea",{className:"md-edit-textarea gdg-input",autoFocus:!0}))},fr={getAccessibilityString:e=>{var t,n;return null!=(n=null==(t=e.data)?void 0:t.toString())?n:""},kind:ge.Markdown,needsHover:!1,needsHoverPosition:!1,drawPrep:Mt,measure:(e,t,n)=>{const r=t.data.split("\n")[0];return e.measureText(r).width+2*n.cellHorizontalPadding},draw:e=>It(e,e.cell.data,e.cell.contentAlign),onDelete:e=>({...e,data:""}),provideEditor:()=>e=>{const{onChange:t,value:n,target:r,onFinishedEditing:o,markdownDivCreateNode:l,forceEditMode:a,validatedSelection:s}=e;return i.createElement(hr,{onFinish:o,targetRect:r,value:n,validatedSelection:s,onChange:e=>t({...n,data:e.target.value}),forceEditMode:a,createNode:l})},onPaste:(e,t)=>e===t.data?void 0:{...t,data:e}},pr={getAccessibilityString:e=>e.row.toString(),kind:Ce.Marker,needsHover:!0,needsHoverPosition:!1,drawPrep:function(e,t){const{ctx:n,theme:r}=e,i=`9px ${r.fontFamily}`,o=null!=t?t:{};return(null==o?void 0:o.font)!==i&&(n.font=i,o.font=i),o.deprep=Pt,n.textAlign="center",o},measure:()=>44,draw:e=>function(e,t,n,r,i){const{ctx:o,rect:l,hoverAmount:a,theme:s}=e,{x:c,y:u,width:d,height:h}=l,f=n?1:"checkbox-visible"===r?.6+.4*a:a;if("number"!==r&&f>0){o.globalAlpha=f;const e=7*(n?a:1);if(Tt(o,s,n,i?c+e:c,u,i?d-e:d,h,!0,void 0,void 0,18),i){o.globalAlpha=a,o.beginPath();for(const e of[3,6])for(const t of[-5,-1,3])o.rect(c+e,u+h/2+t,2,2);o.fillStyle=s.textLight,o.fill(),o.beginPath()}o.globalAlpha=1}if("number"===r||"both"===r&&!n){const e=t.toString(),n=`${s.markerFontStyle} ${s.fontFamily}`,i=c+d/2;"both"===r&&0!==a&&(o.globalAlpha=1-a),o.fillStyle=s.textLight,o.font=n,o.fillText(e,i,u+h/2+kt(o,n)),0!==a&&(o.globalAlpha=1)}}(e,e.cell.row,e.cell.checked,e.cell.markerKind,e.cell.drawHandle),onClick:e=>{const{bounds:t,cell:n,posX:r,posY:i}=e,{width:o,height:l}=t,a=n.drawHandle?7+(o-7)/2:o/2,s=l/2;if(Math.abs(r-a)<=10&&Math.abs(i-s)<=10)return{...n,checked:!n.checked}},onPaste:()=>{}},gr={getAccessibilityString:()=>"",kind:Ce.NewRow,needsHover:!0,needsHoverPosition:!1,measure:()=>200,draw:e=>function(e,t,n){const{ctx:r,rect:i,hoverAmount:o,theme:l,spriteManager:a}=e,{x:s,y:c,width:u,height:d}=i;r.beginPath(),r.globalAlpha=o,r.rect(s,c,u,d),r.fillStyle=l.bgHeaderHovered,r.fill(),r.globalAlpha=1,r.beginPath();const h=""!==t;let f=0;if(void 0!==n){const e=8,t=d-e,i=s+e/2,u=c+e/2;a.drawSprite(n,"normal",r,i,u,t,l,h?1:o),f=t}else{f=24;const e=12,t=h?e:o*e,n=h?0:(1-o)*e*.5,i=l.cellHorizontalPadding+4;t>0&&(r.moveTo(s+i+n,c+d/2),r.lineTo(s+i+n+t,c+d/2),r.moveTo(s+i+n+.5*t,c+d/2-.5*t),r.lineTo(s+i+n+.5*t,c+d/2+.5*t),r.lineWidth=2,r.strokeStyle=l.bgIconHeader,r.lineCap="round",r.stroke())}r.fillStyle=l.textMedium,r.fillText(t,f+s+l.cellHorizontalPadding+.5,c+d/2+kt(r,l)),r.beginPath()}(e,e.cell.hint,e.cell.icon),onPaste:()=>{}},mr=i.lazy((async()=>await n.e(790).then(n.bind(n,70790)))),vr={getAccessibilityString:e=>{var t,n;return null!=(n=null==(t=e.data)?void 0:t.toString())?n:""},kind:ge.Number,needsHover:!1,needsHoverPosition:!1,useLabel:!0,drawPrep:Mt,draw:e=>It(e,e.cell.displayData,e.cell.contentAlign),measure:(e,t)=>e.measureText(t.displayData).width+16,onDelete:e=>({...e,data:void 0}),provideEditor:()=>e=>{const{isHighlighted:t,onChange:n,value:r,validatedSelection:o}=e;return i.createElement(i.Suspense,{fallback:null},i.createElement(mr,{highlight:t,disabled:!0===r.readonly,value:r.data,fixedDecimals:r.fixedDecimals,allowNegative:r.allowNegative,thousandSeparator:r.thousandSeparator,decimalSeparator:r.decimalSeparator,validatedSelection:o,onChange:e=>{var t;return n({...r,data:Number.isNaN(null!=(t=e.floatValue)?t:0)?0:e.floatValue})}}))},onPaste:(e,t)=>{const n=Number.parseFloat(e);if(!Number.isNaN(n)&&t.data!==n)return{...t,data:n}}},br={getAccessibilityString:()=>"",measure:()=>108,kind:ge.Protected,needsHover:!1,needsHoverPosition:!1,draw:function(e){const{ctx:t,theme:n,rect:r}=e,{x:i,y:o,height:l}=r;t.beginPath();const a=2.5;let s=i+n.cellHorizontalPadding+a;const c=o+l/2,u=Math.cos(Je(30))*a,d=Math.sin(Je(30))*a;for(let h=0;h<12;h++)t.moveTo(s,c-a),t.lineTo(s,c+a),t.moveTo(s+u,c-d),t.lineTo(s-u,c+d),t.moveTo(s-u,c-d),t.lineTo(s+u,c+d),s+=8;t.lineWidth=1.1,t.lineCap="square",t.strokeStyle=n.textLight,t.stroke()},onPaste:()=>{}},yr={getAccessibilityString:e=>{var t,n;return null!=(n=null==(t=e.data)?void 0:t.toString())?n:""},kind:ge.RowID,needsHover:!1,needsHoverPosition:!1,drawPrep:(e,t)=>Mt(e,t,e.theme.textLight),draw:e=>It(e,e.cell.data,e.cell.contentAlign),measure:(e,t)=>e.measureText(t.data).width+16,provideEditor:()=>e=>{const{isHighlighted:t,onChange:n,value:r,validatedSelection:o}=e;return i.createElement(ur,{highlight:t,autoFocus:!0!==r.readonly,disabled:!1!==r.readonly,value:r.data,validatedSelection:o,onChange:e=>n({...r,data:e.target.value})})},onPaste:()=>{}},wr={getAccessibilityString:e=>{var t,n;return null!=(n=null==(t=e.data)?void 0:t.toString())?n:""},kind:ge.Text,needsHover:!1,needsHoverPosition:!1,drawPrep:Mt,useLabel:!0,draw:e=>(It(e,e.cell.displayData,e.cell.contentAlign,e.cell.allowWrapping,e.hyperWrapping),!0),measure:(e,t,n)=>{const r=t.displayData.split("\n").slice(0,!0===t.allowWrapping?void 0:1);return Math.max(...r.map((t=>e.measureText(t).width+2*n.cellHorizontalPadding)))},onDelete:e=>({...e,data:""}),provideEditor:e=>({disablePadding:!0===e.allowWrapping,editor:t=>{const{isHighlighted:n,onChange:r,value:o,validatedSelection:l}=t;return i.createElement(ur,{style:!0===e.allowWrapping?{padding:"3px 8.5px"}:void 0,highlight:n,autoFocus:!0!==o.readonly,disabled:!0===o.readonly,altNewline:!0,value:o.data,validatedSelection:l,onChange:e=>r({...o,data:e.target.value})})}}),onPaste:(e,t)=>e===t.data?void 0:{...t,data:e}},xr=(0,r.d)("div")({name:"UriOverlayEditorStyle",class:"uf0sjo8"}),kr=e=>{const{uri:t,onChange:n,forceEditMode:r,readonly:o,validatedSelection:l,preview:a}=e,[s,c]=i.useState(""===t||r),u=i.useCallback((()=>{c(!0)}),[]);return s?i.createElement(ur,{validatedSelection:l,highlight:!0,autoFocus:!0,value:t,onChange:n}):i.createElement(xr,null,i.createElement("a",{className:"link-area",href:t,target:"_blank",rel:"noopener noreferrer"},a),!o&&i.createElement("div",{className:"edit-icon",onClick:u},i.createElement(it,null)),i.createElement("textarea",{className:"gdg-input",autoFocus:!0}))},Sr={getAccessibilityString:e=>{var t,n;return null!=(n=null==(t=e.data)?void 0:t.toString())?n:""},kind:ge.Uri,needsHover:!1,needsHoverPosition:!1,useLabel:!0,drawPrep:Mt,draw:e=>It(e,e.cell.data,e.cell.contentAlign),measure:(e,t,n)=>e.measureText(t.data).width+2*n.cellHorizontalPadding,onDelete:e=>({...e,data:""}),provideEditor:()=>e=>{var t;const{onChange:n,value:r,forceEditMode:o,validatedSelection:l}=e;return i.createElement(kr,{forceEditMode:o,uri:r.data,preview:null!=(t=r.displayData)?t:r.data,validatedSelection:l,readonly:!0===r.readonly,onChange:e=>n({...r,data:e.target.value})})},onPaste:(e,t)=>e===t.data?void 0:{...t,data:e}},Cr={[Ce.Marker]:pr,[Ce.NewRow]:gr,[ge.Boolean]:Xn,[ge.Bubble]:Gn,[ge.Drilldown]:Jn,[ge.Image]:nr,[ge.Loading]:rr,[ge.Markdown]:fr,[ge.Number]:vr,[ge.Protected]:br,[ge.RowID]:yr,[ge.Text]:wr,[ge.Uri]:Sr},Mr=0;function Er(e,t){return void 0===e||0===t||0===e.columns.length&&void 0===e.current?e:{current:void 0===e.current?void 0:{cell:[e.current.cell[0]+t,e.current.cell[1]],range:{...e.current.range,x:e.current.range.x+t},rangeStack:e.current.rangeStack.map((e=>({...e,x:e.x+t})))},rows:e.rows,columns:e.columns.offset(t)}}var Rr={selectAll:!0,selectRow:!0,selectColumn:!0,downFill:!1,rightFill:!1,pageUp:!1,pageDown:!1,clear:!0,copy:!0,paste:!0,search:!1,first:!0,last:!0},Or={kind:ge.Loading,allowOverlay:!1},Ir={columns:Ve.empty(),rows:Ve.empty(),current:void 0},Tr=i.forwardRef(((e,t)=>{var n,r,u,d,h;const[f,p]=i.useState(Ir),[g,m]=i.useState(),v=i.useRef(null),b=i.useRef(null),[y,w]=i.useState(),x=i.useRef(null),k=i.useRef(),{rowMarkers:S="none",rowMarkerWidth:C,imageEditorOverride:M,getRowThemeOverride:E,markdownDivCreateNode:R,width:O,height:I,columns:T,rows:P,getCellContent:D,onCellClicked:H,onCellActivated:L,onFinishedEditing:F,coercePasteValue:z,drawHeader:A,onHeaderClicked:_,spanRangeBehavior:V="default",onGroupHeaderClicked:$,onCellContextMenu:N,className:B,onHeaderContextMenu:W,getCellsForSelection:j,onGroupHeaderContextMenu:Z,onGroupHeaderRenamed:U,onCellEdited:X,onCellsEdited:Y,onSearchResultsChanged:K,searchResults:G,onSearchValueChange:q,searchValue:Q,onKeyDown:J,onKeyUp:ee,keybindings:te,onRowAppended:ne,onColumnMoved:re,validateCell:ie,highlightRegions:ae,drawCell:se,rangeSelect:ce="rect",columnSelect:de="multi",rowSelect:pe="multi",rangeSelectionBlending:me="exclusive",columnSelectionBlending:ve="exclusive",rowSelectionBlending:be="exclusive",onDelete:ye,onDragStart:we,onMouseMove:Me,onPaste:Ee,copyHeaders:Re=!1,freezeColumns:Ae=0,rowSelectionMode:_e="auto",rowMarkerStartIndex:$e=1,rowMarkerTheme:Ne,onHeaderMenuClick:We,getGroupDetails:je,onSearchClose:Ze,onItemHovered:Ue,onSelectionCleared:Xe,showSearch:Ye,onVisibleRegionChanged:Ke,gridSelection:Qe,onGridSelectionChange:Je,minColumnWidth:et=50,maxColumnWidth:tt=500,maxColumnAutoWidth:nt,provideEditor:rt,trailingRowOptions:it,scrollOffsetX:ot,scrollOffsetY:lt,verticalBorder:at,onDragOverCell:st,onDrop:ct,onColumnResize:ut,onColumnResizeEnd:pt,onColumnResizeStart:gt,customRenderers:mt,fillHandle:vt,drawFocusRing:bt,experimental:yt,fixedShadowX:wt,fixedShadowY:xt,headerIcons:kt,imageWindowLoader:St,initialSize:Ct,isDraggable:Mt,onDragLeave:Et,onRowMoved:Rt,overscrollX:Ot,overscrollY:It,preventDiagonalScrolling:Tt,rightElement:Pt,rightElementProps:Dt,showMinimap:Ht,smoothScrollX:Lt,smoothScrollY:Ft,scrollToEnd:zt,scaleToRem:At=!1,rowHeight:_t=34,headerHeight:Vt=36,groupHeaderHeight:$t=Vt,theme:Nt,isOutsideClick:Bt}=e,Wt=Math.max(et,20),jt=Math.max(tt,Wt),Zt=Math.max(null!=nt?nt:jt,Wt),Ut=i.useMemo((()=>"undefined"===typeof window?{fontSize:"16px"}:window.getComputedStyle(document.documentElement)),[]).fontSize,Xt=i.useMemo((()=>Number.parseFloat(Ut)),[Ut]),[Yt,Kt,Gt,qt,Qt,Jt]=i.useMemo((()=>{var e,t,n;if(!At||16===Xt)return[_t,Vt,$t,Nt,Ot,It];const r=Xt/16,i=_t,o=he();return["number"===typeof i?i*r:e=>Math.ceil(i(e)*r),Math.ceil(Vt*r),Math.ceil($t*r),{...Nt,headerIconSize:(null!=(e=null==Nt?void 0:Nt.headerIconSize)?e:o.headerIconSize)*r,cellHorizontalPadding:(null!=(t=null==Nt?void 0:Nt.cellHorizontalPadding)?t:o.cellHorizontalPadding)*r,cellVerticalPadding:(null!=(n=null==Nt?void 0:Nt.cellVerticalPadding)?n:o.cellVerticalPadding)*r},Math.ceil((null!=Ot?Ot:0)*r),Math.ceil((null!=It?It:0)*r)]}),[$t,Vt,Ot,It,Xt,_t,At,Nt]),en=i.useMemo((()=>void 0===te?Rr:{...Rr,...te}),[te]),tn=null!=C?C:P>1e4?48:P>1e3?44:P>100?36:32,nn="none"!==S,rn=nn?1:0,on=void 0!==ne,ln=!0===(null==it?void 0:it.sticky),[an,sn]=i.useState(!1),cn=null!=Ye?Ye:an,un=i.useCallback((()=>{void 0!==Ze?Ze():sn(!1)}),[Ze]),dn=i.useMemo((()=>void 0===Qe?void 0:Er(Qe,rn)),[Qe,rn]),hn=null!=dn?dn:f,fn=i.useRef(new AbortController);i.useEffect((()=>()=>{null==fn||fn.current.abort()}),[]);const[pn,gn]=function(e,t,n,r,o){const l=i.useCallback((n=>{var i;if(!0===e){const e=[];for(let r=n.y;r<n.y+n.height;r++){const i=[];for(let e=n.x;e<n.x+n.width;e++)e<0||r>=o?i.push({kind:ge.Loading,allowOverlay:!1}):i.push(t([e,r]));e.push(i)}return e}return null!=(i=null==e?void 0:e(n,r.signal))?i:[]}),[r.signal,t,e,o]),a=void 0!==e?l:void 0,s=i.useCallback((e=>{if(void 0===a)return[];const t={...e,x:e.x-n};if(t.x<0){t.x=0,t.width--;const e=a(t,r.signal);return"function"===typeof e?async()=>(await e()).map((e=>[{kind:ge.Loading,allowOverlay:!1},...e])):e.map((e=>[{kind:ge.Loading,allowOverlay:!1},...e]))}return a(t,r.signal)}),[r.signal,a,n]);return[void 0!==e?s:void 0,a]}(j,D,rn,fn.current,P),mn=i.useCallback(((e,t,n)=>{if(void 0===ie)return!0;const r=[e[0]-rn,e[1]];return null==ie?void 0:ie(r,t,n)}),[rn,ie]),bn=i.useRef(Qe),yn=i.useCallback(((e,t)=>{t&&(e=function(e,t,n,r,i){var o,l;const a=e;if("allowPartial"===r||void 0===e.current)return e;if(void 0!==t){let r=!1;do{if(void 0===(null==e?void 0:e.current))break;const s=null==(o=e.current)?void 0:o.range,c=[];if(s.width>2){const e=t({x:s.x,y:s.y,width:1,height:s.height},i.signal);if("function"===typeof e)return a;c.push(...e);const n=t({x:s.x+s.width-1,y:s.y,width:1,height:s.height},i.signal);if("function"===typeof n)return a;c.push(...n)}else{const e=t({x:s.x,y:s.y,width:s.width,height:s.height},i.signal);if("function"===typeof e)return a;c.push(...e)}let u=s.x-n,d=s.x+s.width-1-n;for(const e of c)for(const t of e)void 0!==t.span&&(u=Math.min(t.span[0],u),d=Math.max(t.span[1],d));u===s.x-n&&d===s.x+s.width-1-n?r=!0:e={current:{cell:null!=(l=e.current.cell)?l:[0,0],range:{x:u+n,y:s.y,width:d-u+1,height:s.height},rangeStack:e.current.rangeStack},columns:e.columns,rows:e.rows}}while(!r)}return e}(e,pn,rn,V,fn.current)),void 0!==Je?(bn.current=Er(e,-rn),Je(bn.current)):p(e)}),[Je,pn,rn,V]),wn=qe(ut,i.useCallback(((e,t,n,r)=>{null==ut||ut(T[n-rn],t,n-rn,r)}),[ut,rn,T])),xn=qe(pt,i.useCallback(((e,t,n,r)=>{null==pt||pt(T[n-rn],t,n-rn,r)}),[pt,rn,T])),kn=qe(gt,i.useCallback(((e,t,n,r)=>{null==gt||gt(T[n-rn],t,n-rn,r)}),[gt,rn,T])),Sn=qe(A,i.useCallback((e=>{var t;return null!=(t=null==A?void 0:A({...e,columnIndex:e.columnIndex-rn}))&&t}),[A,rn])),Cn=i.useCallback((e=>{if(void 0!==ye){const t=ye(Er(e,-rn));return"boolean"===typeof t?t:Er(t,rn)}return!0}),[ye,rn]),[Mn,En,Rn]=function(e,t,n,r,o,l){return[i.useCallback(((i,a,s,c)=>{var u,d;"cell"!==l&&"multi-cell"!==l||void 0===i||(i={...i,range:{x:i.cell[0],y:i.cell[1],width:1,height:1}});const h="mixed"===n&&(s||"drag"===c),f="mixed"===r&&h,p="mixed"===o&&h;let g={current:void 0===i?void 0:{...i,rangeStack:"drag"===c&&null!=(d=null==(u=e.current)?void 0:u.rangeStack)?d:[]},columns:f?e.columns:Ve.empty(),rows:p?e.rows:Ve.empty()};s&&("multi-rect"===l||"multi-cell"===l)&&void 0!==g.current&&void 0!==e.current&&(g={...g,current:{...g.current,rangeStack:[...e.current.rangeStack,e.current.range]}}),t(g,a)}),[r,e,n,l,o,t]),i.useCallback(((i,l,a)=>{let s;if(i=null!=i?i:e.rows,void 0!==l&&(i=i.add(l)),"exclusive"===o&&i.length>0)s={current:void 0,columns:Ve.empty(),rows:i};else{const t=a&&"mixed"===r;s={current:a&&"mixed"===n?e.current:void 0,columns:t?e.columns:Ve.empty(),rows:i}}t(s,!1)}),[r,e,n,o,t]),i.useCallback(((i,l,a)=>{let s;if(i=null!=i?i:e.columns,void 0!==l&&(i=i.add(l)),"exclusive"===r&&i.length>0)s={current:void 0,rows:Ve.empty(),columns:i};else{const t=a&&"mixed"===o;s={current:a&&"mixed"===n?e.current:void 0,rows:t?e.rows:Ve.empty(),columns:i}}t(s,!1)}),[r,e,n,o,t])]}(hn,yn,me,ve,be,ce),On=i.useMemo((()=>({...he(),...qt})),[qt]),[In,Pn]=i.useState([10,10,0]),zn=i.useCallback((e=>e.kind!==ge.Custom?Cr[e.kind]:null==mt?void 0:mt.find((t=>t.isMatch(e)))),[mt]),Vn=function(e,t,n,r,o,l,a,s,c){const u=i.useRef(t),d=i.useRef(n),h=i.useRef(a);u.current=t,d.current=n,h.current=a;const[f,p]=i.useMemo((()=>{if("undefined"===typeof window)return[null,null];const e=document.createElement("canvas");return e.style.display="none",e.style.opacity="0",e.style.position="fixed",[e,e.getContext("2d",{alpha:!1})]}),[]);i.useLayoutEffect((()=>(f&&document.documentElement.append(f),()=>{null==f||f.remove()})),[f]);const g=i.useRef({}),m=i.useRef(),[v,b]=i.useState();return i.useLayoutEffect((()=>{const t=d.current;if(void 0===t||e.every(Pe))return;let n=Math.max(1,10-Math.floor(e.length/1e4)),r=0;n<u.current&&n>1&&(n--,r=1);const i={x:0,y:0,width:e.length,height:Math.min(u.current,n)},o={x:0,y:u.current-1,width:e.length,height:1};(async()=>{const n=t(i,c.signal),l=r>0?t(o,c.signal):void 0;let a;a="object"===typeof n?n:await De(n),void 0!==l&&(a="object"===typeof l?[...a,...l]:[...a,...await De(l)]),m.current=e,b(a)})()}),[c.signal,e]),i.useMemo((()=>{var t;let n=e.every(Pe)?e:null===p?e.map((e=>Pe(e)?e:{...e,width:Hn})):(p.font=`${h.current.baseFontStyle} ${h.current.fontFamily}`,e.map(((t,n)=>{if(Pe(t))return t;if(void 0!==g.current[t.id])return{...t,width:g.current[t.id]};if(void 0===v||m.current!==e||void 0===t.id)return{...t,width:Hn};const r=Ln(p,a,t,n,v,o,l,!0,s);return g.current[t.id]=r.width,r}))),i=0,c=0;const u=[];for(const[e,r]of n.entries())i+=r.width,void 0!==r.grow&&r.grow>0&&(c+=r.grow,u.push(e));if(i<r&&u.length>0){const e=[...n],o=r-i;let l=o;for(let r=0;r<u.length;r++){const i=u[r],a=(null!=(t=n[i].grow)?t:0)/c,s=r===u.length-1?l:Math.min(l,Math.floor(o*a));e[i]={...n[i],growOffset:s,width:n[i].width+s},l-=s}n=e}return n}),[r,e,p,v,a,o,l,s])}(T,P,gn,In[0]-(0===rn?0:tn)-In[2],Wt,Zt,On,zn,fn.current),$n=i.useMemo((()=>Vn.some((e=>void 0!==e.group))),[Vn]),Nn=$n?Kt+Gt:Kt,Wn=hn.rows.length,jn="none"===S?"":0===Wn?Ie:Wn===P?Oe:Te,Xn=i.useMemo((()=>"none"===S?Vn:[{title:jn,width:tn,icon:void 0,hasMenu:!1,style:"normal",themeOverride:Ne},...Vn]),[Vn,tn,S,jn,Ne]),[Yn,Kn]=i.useMemo((()=>[void 0!==lt&&"number"===typeof Yt?Math.floor(lt/Yt):0,void 0!==lt&&"number"===typeof Yt?-lt%Yt:0]),[lt,Yt]),Gn=i.useRef({height:1,width:1,x:0,y:0}),qn=i.useMemo((()=>{var e,t;return{x:Gn.current.x,y:Yn,width:null!=(e=Gn.current.width)?e:1,height:null!=(t=Gn.current.height)?t:1,ty:Kn}}),[Kn,Yn]),Qn=i.useRef(!1),[Jn,er,tr]=function(e){const t=i.useRef([ht,e]);t.current[1]!==e&&(t.current[0]=e),t.current[1]=e;const[n,r]=i.useState(e),[,o]=i.useState(),l=i.useCallback((e=>{const n=t.current[0];n!==ht&&(e="function"===typeof e?e(n):e)===n||(n!==ht&&o({}),r((t=>"function"===typeof e?e(n===ht?t:n):e)),t.current[0]=ht)}),[]),a=i.useCallback((()=>{t.current[0]=ht,o({})}),[]);return[t.current[0]===ht?n:t.current[0],l,a]}(qn),nr=(null!=(n=Jn.height)?n:1)>1;i.useLayoutEffect((()=>{if(void 0!==lt&&null!==x.current&&nr){if(x.current.scrollTop===lt)return;x.current.scrollTop=lt,x.current.scrollTop!==lt&&tr(),Qn.current=!0}}),[lt,nr,tr]);const rr=(null!=(r=Jn.width)?r:1)>1;i.useLayoutEffect((()=>{if(void 0!==ot&&null!==x.current&&rr){if(x.current.scrollLeft===ot)return;x.current.scrollLeft=ot,x.current.scrollLeft!==ot&&tr(),Qn.current=!0}}),[ot,rr,tr]);const ir=Jn.x+rn,or=Jn.y,lr=i.useRef(null),ar=i.useCallback((e=>{var t;!0===e?null==(t=lr.current)||t.focus():window.requestAnimationFrame((()=>{var e;null==(e=lr.current)||e.focus()}))}),[]),sr=on?P+1:P,cr=i.useCallback((e=>{const t=0===rn?e:e.map((e=>({...e,location:[e.location[0]-rn,e.location[1]]}))),n=null==Y?void 0:Y(t);if(!0!==n)for(const r of t)null==X||X(r.location,r.value);return n}),[X,Y,rn]),ur=i.useMemo((()=>{if(void 0!==ae)return 0===rn?ae:ae.map((e=>{const t=Xn.length-e.range.x-rn;if(!(t<=0))return{color:e.color,range:{...e.range,x:e.range.x+rn,width:Math.min(t,e.range.width)},style:e.style}})).filter((e=>void 0!==e))}),[ae,Xn.length,rn]),dr=i.useRef(Xn);dr.current=Xn;const hr=i.useCallback((([e,t],n=!1)=>{var r,i,o,l,a,s,c,u,d,h;const f=on&&t===sr-1;if(0===e&&nn)return f?Or:{kind:Ce.Marker,allowOverlay:!1,checked:!0===(null==hn?void 0:hn.rows.hasIndex(t)),markerKind:"clickable-number"===S?"number":S,row:$e+t,drawHandle:void 0!==Rt,cursor:"clickable-number"===S?"pointer":void 0};if(f){const t=e===rn&&null!=(r=null==it?void 0:it.hint)?r:"",n=dr.current[e];if(!0===(null==(i=null==n?void 0:n.trailingRowOptions)?void 0:i.disabled))return Or;{const e=null!=(l=null==(o=null==n?void 0:n.trailingRowOptions)?void 0:o.hint)?l:t,r=null!=(s=null==(a=null==n?void 0:n.trailingRowOptions)?void 0:a.addIcon)?s:null==it?void 0:it.addIcon;return{kind:Ce.NewRow,hint:e,allowOverlay:!1,icon:r}}}{const r=e-rn;if(n||!0===(null==yt?void 0:yt.strict)){const e=Gn.current,n=e.x>r||r>e.x+e.width||e.y>t||t>e.y+e.height,i=r===(null==(u=null==(c=e.extras)?void 0:c.selected)?void 0:u[0])&&t===(null==(d=e.extras)?void 0:d.selected[1]),o=void 0===(null==(h=e.extras)?void 0:h.freezeRegion)||e.extras.freezeRegion.x>r||r>e.extras.freezeRegion.x+e.extras.freezeRegion.width||e.extras.freezeRegion.y>t||t>e.extras.freezeRegion.y+e.extras.freezeRegion.height;if(n&&!i&&o)return{kind:ge.Loading,allowOverlay:!1}}let i=D([r,t]);return 0!==rn&&void 0!==i.span&&(i={...i,span:[i.span[0]+rn,i.span[1]+rn]}),i}}),[on,sr,nn,null==hn?void 0:hn.rows,Rt,S,rn,null==it?void 0:it.hint,null==it?void 0:it.addIcon,null==yt?void 0:yt.strict,D,$e]),fr=i.useCallback((e=>{var t,n;let r=null!=(t=null==je?void 0:je(e))?t:{name:e};return void 0!==U&&""!==e&&(r={icon:r.icon,name:r.name,overrideTheme:r.overrideTheme,actions:[...null!=(n=r.actions)?n:[],{title:"Rename",icon:"renameIcon",onClick:e=>Vr({group:r.name,bounds:e.bounds})}]}),r}),[je,U]),pr=i.useCallback((e=>{var t;const[n,r]=e.cell,i=Xn[n],o=void 0!==(null==i?void 0:i.group)?null==(t=fr(i.group))?void 0:t.overrideTheme:void 0,l=null==i?void 0:i.themeOverride,a=null==E?void 0:E(r);m({...e,theme:{...On,...o,...l,...a,...e.content.themeOverride}})}),[E,Xn,fr,On]),gr=i.useCallback(((e,t,n)=>{var r;if(void 0===hn.current)return;const[i,o]=hn.current.cell,l=hr([i,o]);if(l.kind!==ge.Boolean&&l.allowOverlay){let t=l;if(void 0!==n)switch(t.kind){case ge.Number:{const e=function(e,t){try{return e()}catch(n){return t}}((()=>"-"===n?-0:Number.parseFloat(n)),0);t={...t,data:Number.isNaN(e)?0:e};break}case ge.Text:case ge.Markdown:case ge.Uri:t={...t,data:n}}pr({target:e,content:t,initialValue:n,cell:[i,o],highlight:void 0===n,forceEditMode:void 0!==n})}else l.kind===ge.Boolean&&t&&!0!==l.readonly&&(cr([{location:hn.current.cell,value:{...l,data:Un(l.data)}}]),null==(r=lr.current)||r.damage([{cell:hn.current.cell}]))}),[hr,hn,cr,pr]),mr=i.useCallback(((e,t)=>{var n;const r=null==(n=lr.current)?void 0:n.getBounds(e,t);if(void 0===r||null===x.current)return;const i=hr([e,t]);i.allowOverlay&&pr({target:r,content:i,initialValue:void 0,highlight:!0,cell:[e,t],forceEditMode:!0})}),[hr,pr]),vr=i.useCallback(((e,t,n="both",r=0,i=0,o=void 0)=>{var l;if(null!==x.current){const a=lr.current,s=b.current,c="number"!==typeof e?"cell"===e.unit?e.amount:void 0:e,u="number"!==typeof t?"cell"===t.unit?t.amount:void 0:t,d="number"!==typeof e&&"px"===e.unit?e.amount:void 0,h="number"!==typeof t&&"px"===t.unit?t.amount:void 0;if(null!==a&&null!==s){let t={x:0,y:0,width:0,height:0},f=0,p=0;if((void 0!==c||void 0!==u)&&(t=null!=(l=a.getBounds((null!=c?c:0)+rn,null!=u?u:0))?l:t,0===t.width||0===t.height))return;const g=s.getBoundingClientRect(),m=g.width/s.offsetWidth;if(void 0!==d&&(t={...t,x:d-g.left-x.current.scrollLeft,width:1}),void 0!==h&&(t={...t,y:h+g.top-x.current.scrollTop,height:1}),void 0!==t){const l={x:t.x-r,y:t.y-i,width:t.width+2*r,height:t.height+2*i};let a=0;for(let e=0;e<Ae;e++)a+=Vn[e].width;let s=0;ln&&(s="number"===typeof Yt?Yt:Yt(P));let c=a*m+g.left+rn*tn*m,u=g.right,d=g.top+Nn*m,h=g.bottom-s*m;const v=t.width+2*r;switch(null==o?void 0:o.hAlign){case"start":u=c+v;break;case"end":c=u-v;break;case"center":c=Math.floor((c+u)/2)-v/2,u=c+v}const b=t.height+2*i;switch(null==o?void 0:o.vAlign){case"start":h=d+b;break;case"end":d=h-b;break;case"center":d=Math.floor((d+h)/2)-b/2,h=d+b}c>l.x?f=l.x-c:u<l.x+l.width&&(f=l.x+l.width-u),d>l.y?p=l.y-d:h<l.y+l.height&&(p=l.y+l.height-h),"vertical"===n||"number"===typeof e&&e<Ae?f=0:"horizontal"===n&&(p=0),0===f&&0===p||(1!==m&&(f/=m,p/=m),x.current.scrollTo(f+x.current.scrollLeft,p+x.current.scrollTop))}}}}),[rn,tn,Nn,ln,Ae,Vn,Yt,P]),br=i.useRef(mr),yr=i.useRef(D),wr=i.useRef(P);br.current=mr,yr.current=D,wr.current=P;const xr=i.useCallback((async(e,t=!0)=>{var n;const r=Xn[e];if(!0===(null==(n=null==r?void 0:r.trailingRowOptions)?void 0:n.disabled))return;const i=null==ne?void 0:ne();let o,l=!0;void 0!==i&&(o=await i,"top"===o&&(l=!1),"number"===typeof o&&(l=!1));let a=0;const s=()=>{if(wr.current<=P)return a<500&&window.setTimeout(s,a),void(a=50+2*a);const n="number"===typeof o?o:l?P:0;vr(e-rn,n),Mn({cell:[e,n],range:{x:e,y:n,width:1,height:1}},!1,!1,"edit");const r=yr.current([e-rn,n]);r.allowOverlay&&Fe(r)&&!0!==r.readonly&&t&&window.setTimeout((()=>{br.current(e,n)}),0)};s()}),[Xn,ne,rn,P,vr,Mn]),kr=i.useCallback((e=>{var t,n,r;const i=null!=(r=null==(n=null==(t=Vn[e])?void 0:t.trailingRowOptions)?void 0:n.targetColumn)?r:null==it?void 0:it.targetColumn;if("number"===typeof i){return i+(nn?1:0)}if("object"===typeof i){const e=T.indexOf(i);if(e>=0){return e+(nn?1:0)}}}),[Vn,T,nn,null==it?void 0:it.targetColumn]),Sr=i.useRef(),Tr=i.useRef(),Pr=i.useCallback(((e,t)=>{var n;const[r,i]=t;return{...On,...null==(n=Xn[r])?void 0:n.themeOverride,...null==E?void 0:E(i),...e.themeOverride}}),[E,Xn,On]),Dr=i.useCallback((e=>{var t,n,r,i;const o=vn.value?e.metaKey:e.ctrlKey,l=o&&"multi"===pe,a=o&&"multi"===de,[s,c]=e.location,u=hn.columns,d=hn.rows,[h,f]=null!=(n=null==(t=hn.current)?void 0:t.cell)?n:[];if("cell"===e.kind){if(Tr.current=void 0,Lr.current=[s,c],0===s&&nn){if(!0===on&&c===P||"number"===S||"none"===pe)return;const t=hr(e.location);if(t.kind!==Ce.Marker)return;if(void 0!==Rt){const n=zn(t);oe((null==n?void 0:n.kind)===Ce.Marker);const i=null==(r=null==n?void 0:n.onClick)?void 0:r.call(n,{...e,cell:t,posX:e.localEventX,posY:e.localEventY,bounds:e.bounds,theme:Pr(t,e.location),preventDefault:()=>{}});if(void 0===i||i.checked===t.checked)return}m(void 0),ar();const n=d.hasIndex(c),i=Sr.current;if("multi"===pe&&(e.shiftKey||!0===e.isLongTouch)&&void 0!==i&&d.hasIndex(i)){const e=[Math.min(i,c),Math.max(i,c)+1];l||"multi"===_e?En(void 0,e,!0):En(Ve.fromSingleSelection(e),void 0,l)}else l||e.isTouch||"multi"===_e?n?En(d.remove(c),void 0,!0):(En(void 0,c,!0),Sr.current=c):n&&1===d.length?En(Ve.empty(),void 0,o):(En(Ve.fromSingleSelection(c),void 0,o),Sr.current=c)}else if(s>=rn&&on&&c===P){const e=kr(s);xr(null!=e?e:s)}else if(h!==s||f!==c){const t=hr(e.location),n=zn(t);if(void 0!==(null==n?void 0:n.onSelect)){let r=!1;if(n.onSelect({...e,cell:t,posX:e.localEventX,posY:e.localEventY,bounds:e.bounds,preventDefault:()=>r=!0,theme:Pr(t,e.location)}),r)return}const r=ln&&c===P,l=ln&&void 0!==hn&&(null==(i=hn.current)?void 0:i.cell[1])===P;if(!e.shiftKey&&!0!==e.isLongTouch||void 0===h||void 0===f||void 0===hn.current||l)Mn({cell:[s,c],range:{x:s,y:c,width:1,height:1}},!0,o,"click"),Sr.current=void 0,m(void 0),ar();else{if(r)return;const e=Math.min(s,h),t=Math.max(s,h),n=Math.min(c,f),i=Math.max(c,f);Mn({...hn.current,range:{x:e,y:n,width:t-e+1,height:i-n+1}},!0,o,"click"),Sr.current=void 0,ar()}}}else if("header"===e.kind)if(Lr.current=[s,c],m(void 0),nn&&0===s)Sr.current=void 0,Tr.current=void 0,"multi"===pe&&(d.length!==P?En(Ve.fromSingleSelection([0,P]),void 0,o):En(Ve.empty(),void 0,o),ar());else{const t=Tr.current;if("multi"===de&&(e.shiftKey||!0===e.isLongTouch)&&void 0!==t&&u.hasIndex(t)){const e=[Math.min(t,s),Math.max(t,s)+1];a?Rn(void 0,e,o):Rn(Ve.fromSingleSelection(e),void 0,o)}else a?(u.hasIndex(s)?Rn(u.remove(s),void 0,o):Rn(void 0,s,o),Tr.current=s):"none"!==de&&(Rn(Ve.fromSingleSelection(s),void 0,o),Tr.current=s);Sr.current=void 0,ar()}else e.kind===ke?Lr.current=[s,c]:e.kind===Se&&(yn(Ir,!1),m(void 0),ar(),null==Xe||Xe(),Sr.current=void 0,Tr.current=void 0)}),[xr,de,ar,zn,kr,hr,hn,nn,ln,Xe,Rt,rn,S,pe,_e,P,Mn,yn,Rn,En,on,Pr]),Hr=i.useRef(!1),Lr=i.useRef(),Fr=i.useRef(Jn),zr=i.useRef(),Ar=i.useCallback((e=>{var t,n;if(Br.current=!1,Fr.current=Gn.current,0!==e.button&&1!==e.button)return void(zr.current=void 0);const r=performance.now(),i=r-(null!=(n=null==(t=zr.current)?void 0:t.time)?n:-1e3)<250;zr.current={wasDoubleClick:i,button:e.button,time:r,location:e.location},"header"===(null==e?void 0:e.kind)&&(Hr.current=!0);const o="cell"===e.kind&&e.isFillHandle;!o&&"cell"!==e.kind&&e.isEdge||(w({previousSelection:hn,fillHandle:o}),Lr.current=void 0,e.isTouch||0!==e.button?e.isTouch||1!==e.button||(Lr.current=e.location):Dr(e))}),[hn,Dr]),[_r,Vr]=i.useState(),$r=i.useCallback((e=>{if(e.kind!==ke||"multi"!==de)return;const t=vn.value?e.metaKey:e.ctrlKey,[n]=e.location,r=hn.columns;if(n<rn)return;const i=Xn[n];let o=n,l=n;for(let a=n-1;a>=rn&&ft(i.group,Xn[a].group);a--)o--;for(let a=n+1;a<Xn.length&&ft(i.group,Xn[a].group);a++)l++;if(ar(),t)if(r.hasAll([o,l+1])){let e=r;for(let t=o;t<=l;t++)e=e.remove(t);Rn(e,void 0,t)}else Rn(void 0,[o,l+1],t);else Rn(Ve.fromSingleSelection([o,l+1]),void 0,t)}),[de,ar,hn.columns,Xn,rn,Rn]),Nr=i.useCallback((e=>{var t;if(void 0===hn.current)return;const n=[],r=hn.current.range;for(let i=0;i<r.width;i++){const t=i+r.x,o=hr([t,e?r.y+r.height-1:r.y]);if(!Le(o)&&Fe(o))for(let i=1;i<r.height;i++){const l=[t,e?r.y+r.height-(i+1):i+r.y];n.push({location:l,value:{...o}})}}cr(n),null==(t=lr.current)||t.damage(n.map((e=>({cell:e.location}))))}),[hr,hn,cr]),Br=i.useRef(!1),Wr=i.useCallback((async(e,t=!1)=>{var n;if((!0===(null==(n=zr.current)?void 0:n.wasDoubleClick)||t)&&void 0!==pn&&void 0!==wn){const t=Gn.current.y,n=Gn.current.height;let r=pn({x:e,y:t,width:1,height:Math.min(n,P-t)},fn.current.signal);"object"!==typeof r&&(r=await r());const i=Vn[e-rn],o=document.createElement("canvas").getContext("2d",{alpha:!1});if(null!==o){o.font=`${On.baseFontStyle} ${On.fontFamily}`;const t=Ln(o,On,i,0,r,Wt,jt,!1,zn);null==wn||wn(i,t.width,e,t.width)}}}),[Vn,pn,jt,On,Wt,wn,rn,P,zn]),[jr,Zr]=i.useState(),Ur=i.useCallback(((e,t)=>{var n,r,i;const o=y;if(w(void 0),Zr(void 0),Hr.current=!1,t)return;if(!0===(null==o?void 0:o.fillHandle)&&void 0!==hn.current)return void Nr(hn.current.cell[1]!==hn.current.range.y);const[l,a]=e.location,[s,c]=null!=(n=Lr.current)?n:[],u=()=>{Br.current=!0},d=t=>{var n,r,i;if((t.isTouch||s===l&&c===a)&&(null==H||H([l-rn,a],{...t,preventDefault:u})),1===t.button)return!Br.current;if(!Br.current){const s=hr(e.location),c=zn(s);if(void 0!==c&&void 0!==c.onClick){const r=c.onClick({...t,cell:s,posX:t.localEventX,posY:t.localEventY,bounds:t.bounds,theme:Pr(s,e.location),preventDefault:u});void 0!==r&&!Le(r)&&He(r)&&(cr([{location:t.location,value:r}]),null==(n=lr.current)||n.damage([{cell:t.location}]))}if(!Br.current&&void 0!==(null==(i=null==(r=null==o?void 0:o.previousSelection)?void 0:r.current)?void 0:i.cell)&&void 0!==hn.current){const[e,n]=hn.current.cell,[r,i]=o.previousSelection.current.cell;if(l===e&&l===r&&a===n&&a===i)return null==L||L([l-rn,a]),gr(t.bounds,!1),!0}}return!1},h=e.location[0]-rn;if(e.isTouch){const t=Gn.current,n=Fr.current;if(t.x!==n.x||t.y!==n.y)return;if(!0===e.isLongTouch){if("cell"===e.kind&&(null==(r=null==hn?void 0:hn.current)?void 0:r.cell[0])===l&&(null==(i=null==hn?void 0:hn.current)?void 0:i.cell[1])===a)return void(null==N||N([h,e.location[1]],{...e,preventDefault:u}));if("header"===e.kind&&hn.columns.hasIndex(l))return void(null==W||W(h,{...e,preventDefault:u}));if(e.kind===ke){if(h<0)return;return void(null==Z||Z(h,{...e,preventDefault:u}))}}"cell"===e.kind?d(e)||Dr(e):e.kind===ke?null==$||$(h,{...e,preventDefault:u}):(e.kind===xe&&(null==_||_(h,{...e,preventDefault:u})),Dr(e))}else{if("header"===e.kind){if(h<0)return;e.isEdge?Wr(l):0===e.button&&l===s&&a===c&&(null==_||_(h,{...e,preventDefault:u}))}if(e.kind===ke){if(h<0)return;0===e.button&&l===s&&a===c&&(null==$||$(h,{...e,preventDefault:u}),Br.current||$r(e))}"cell"!==e.kind||0!==e.button&&1!==e.button||d(e),Lr.current=void 0}}),[y,rn,hn,H,Nr,hr,zn,Pr,cr,L,gr,N,W,Z,Dr,$,Wr,_,$r]),Xr=i.useCallback((e=>{const t={...e,location:[e.location[0]-rn,e.location[1]]};null==Me||Me(t),Zr((t=>{var n,r;return Hr.current?[e.scrollEdge[0],0]:e.scrollEdge[0]===(null==t?void 0:t[0])&&e.scrollEdge[1]===t[1]?t:void 0===y||(null!=(r=null==(n=zr.current)?void 0:n.location[0])?r:0)<rn?void 0:e.scrollEdge}))}),[y,Me,rn]);!function(e,t){const n=i.useRef(0),[r,o]=null!=e?e:[0,0];i.useEffect((()=>{if(0===r&&0===o)return void(n.current=0);let e=0;const i=a=>{var s;if(0===e)e=a;else{const i=a-e;n.current=Math.min(1,n.current+i/1300);const l=n.current**1.618*i*2;null==(s=t.current)||s.scrollBy(r*l,o*l),e=a}l=window.requestAnimationFrame(i)};let l=window.requestAnimationFrame(i);return()=>window.cancelAnimationFrame(l)}),[t,r,o])}(jr,x);const Yr=i.useCallback(((e,t)=>{null==We||We(e-rn,t)}),[We,rn]),Kr=null==(u=null==hn?void 0:hn.current)?void 0:u.cell,Gr=i.useCallback(((e,t,n,r,i,o)=>{Qn.current=!1;let l=Kr;void 0!==l&&(l=[l[0]-rn,l[1]]);const a={x:e.x-rn,y:e.y,width:e.width,height:on&&e.y+e.height>=P?e.height-1:e.height,tx:i,ty:o,extras:{selected:l,freezeRegion:0===Ae?void 0:{x:0,y:e.y,width:Ae,height:e.height}}};Gn.current=a,er(a),Pn([t,n,r]),null==Ke||Ke(a,a.tx,a.ty,a.extras)}),[Kr,rn,on,P,Ae,er,Ke]),qr=qe(re,i.useCallback(((e,t)=>{null==re||re(e-rn,t-rn),"none"!==de&&Rn(Ve.fromSingleSelection(t),void 0,!0)}),[de,re,rn,Rn])),Qr=i.useRef(!1),Jr=i.useCallback((e=>{0===e.location[0]&&rn>0?e.preventDefault():(null==we||we({...e,location:[e.location[0]-rn,e.location[1]]}),e.defaultPrevented()||(Qr.current=!0),w(void 0))}),[we,rn]),ei=i.useCallback((()=>{Qr.current=!1}),[]),ti=i.useCallback((e=>{var t,n;if(!(void 0!==(null==(t=null==zr?void 0:zr.current)?void 0:t.button)&&zr.current.button>=1)){if(void 0!==y&&0===(null==(n=zr.current)?void 0:n.location[0])&&0===e.location[0]&&1===rn&&"multi"===pe&&y.previousSelection&&!y.previousSelection.rows.hasIndex(zr.current.location[1])&&hn.rows.hasIndex(zr.current.location[1])){const t=Math.min(zr.current.location[1],e.location[1]),n=Math.max(zr.current.location[1],e.location[1])+1;En(Ve.fromSingleSelection([t,n]),void 0,!1)}if(void 0!==y&&void 0!==hn.current&&!Qr.current&&("rect"===ce||"multi-rect"===ce)){const[t,n]=hn.current.cell;let[r,i]=e.location;i<0&&(i=Gn.current.y);if(ln&&n===P)return;if(ln&&i===P){if(e.kind!==Se)return;i--}r=Math.max(r,rn);const o=r-t,l=i-n,a={x:o>=0?t:r,y:l>=0?n:i,width:Math.abs(o)+1,height:Math.abs(l)+1};Mn({...hn.current,range:a},!0,!1,"drag")}null==Ue||Ue({...e,location:[e.location[0]-rn,e.location[1]]})}}),[y,rn,pe,hn,ce,Ue,En,ln,P,Mn]),ni=i.useCallback((e=>{if(void 0===hn.current)return;const[t,n]=e,[r,i]=hn.current.cell,o=hn.current.range;let c=o.x,u=o.x+o.width,d=o.y,h=o.y+o.height;if(0!==n)switch(n){case 2:h=P,d=i,vr(0,h,"vertical");break;case-2:d=0,h=i+1,vr(0,d,"vertical");break;case 1:d<i?(d++,vr(0,d,"vertical")):(h=Math.min(P,h+1),vr(0,h,"vertical"));break;case-1:h>i+1?(h--,vr(0,h,"vertical")):(d=Math.max(0,d-1),vr(0,d,"vertical"));break;default:le()}if(0!==t)if(2===t)u=Xn.length,c=r,vr(u-1-rn,0,"horizontal");else if(-2===t)c=rn,u=r+1,vr(c-rn,0,"horizontal");else{let e=[];if(void 0!==pn){const t=pn({x:c,y:d,width:u-c-rn,height:h-d},fn.current.signal);"object"===typeof t&&(e=function(e){return l(a(a(e).filter((e=>void 0!==e.span)).map((e=>{var t,n,r,i;return s((null!=(n=null==(t=e.span)?void 0:t[0])?n:0)+1,(null!=(i=null==(r=e.span)?void 0:r[1])?i:0)+1)}))))}(t))}if(1===t){let t=!1;if(c<r){if(e.length>0){const n=s(c+1,r+1).find((t=>!e.includes(t-rn)));void 0!==n&&(c=n,t=!0)}else c++,t=!0;t&&vr(c,0,"horizontal")}t||(u=Math.min(Xn.length,u+1),vr(u-1-rn,0,"horizontal"))}else if(-1===t){let t=!1;if(u>r+1){if(e.length>0){const n=s(u-1,r,-1).find((t=>!e.includes(t-rn)));void 0!==n&&(u=n,t=!0)}else u--,t=!0;t&&vr(u-rn,0,"horizontal")}t||(c=Math.max(rn,c-1),vr(c-rn,0,"horizontal"))}else le()}Mn({cell:hn.current.cell,range:{x:c,y:d,width:u-c,height:h-d}},!0,!1,"keyboard-select")}),[pn,hn,Xn.length,rn,P,vr,Mn]),ri=i.useCallback(((e,t,n,r)=>{const i=sr-(n?0:1);if(e=o(e,rn,Vn.length-1+rn),t=o(t,0,i),e===(null==Kr?void 0:Kr[0])&&t===(null==Kr?void 0:Kr[1]))return!1;if(r&&void 0!==hn.current){const n=[...hn.current.rangeStack];(hn.current.range.width>1||hn.current.range.height>1)&&n.push(hn.current.range),yn({...hn,current:{cell:[e,t],range:{x:e,y:t,width:1,height:1},rangeStack:n}},!0)}else Mn({cell:[e,t],range:{x:e,y:t,width:1,height:1}},!0,!1,"keyboard-nav");return void 0!==k.current&&k.current[0]===e&&k.current[1]===t&&(k.current=void 0),vr(e-rn,t),!0}),[sr,rn,Vn.length,Kr,hn,vr,yn,Mn]),ii=i.useCallback(((e,t)=>{void 0!==(null==g?void 0:g.cell)&&void 0!==e&&He(e)&&(cr([{location:g.cell,value:e}]),window.requestAnimationFrame((()=>{var e;null==(e=lr.current)||e.damage([{cell:g.cell}])}))),ar(!0),m(void 0);const[n,r]=t;if(void 0!==hn.current&&(0!==n||0!==r)){const t=hn.current.cell[1]===sr-1&&void 0!==e;ri(o(hn.current.cell[0]+n,0,Xn.length-1),o(hn.current.cell[1]+r,0,sr-1),t,!1)}null==F||F(e,t)}),[null==g?void 0:g.cell,ar,hn,F,cr,sr,ri,Xn.length]),oi=i.useMemo((()=>"gdg-overlay-"+Mr++),[]),li=i.useCallback((e=>{(async()=>{var t,n,r,i,o;let l=!1;if(void 0!==J&&J({...e,cancel:()=>{l=!0}}),l)return;const a=()=>{e.stopPropagation(),e.preventDefault()},s=void 0!==g,{altKey:c,shiftKey:u,metaKey:d,ctrlKey:h,key:f,bounds:p}=e,b=vn.value,y=b?d:h,w="Delete"===f||b&&"Backspace"===f,x=Gn.current,k=hn.columns,S=hn.rows;if("Escape"===f)return void(s?m(void 0):en.clear&&(yn(Ir,!1),null==Xe||Xe()));if(Fn("primary+a",e)&&en.selectAll){if(s){const e=document.getElementById(oi);if(null!==e){const t=window.getSelection(),n=document.createRange();n.selectNodeContents(e),null==t||t.removeAllRanges(),null==t||t.addRange(n)}}else yn({columns:Ve.empty(),rows:Ve.empty(),current:{cell:null!=(n=null==(t=hn.current)?void 0:t.cell)?n:[rn,0],range:{x:rn,y:0,width:T.length,height:P},rangeStack:[]}},!1);return void a()}function C(e){var t,n,r,i;ar();const o=[];for(let l=e.x;l<e.x+e.width;l++)for(let i=e.y;i<e.y+e.height;i++){const e=D([l-rn,i]);if(!e.allowOverlay&&e.kind!==ge.Boolean)continue;let a;if(e.kind===ge.Custom){const r=zn(e),i=null==(t=null==r?void 0:r.provideEditor)?void 0:t.call(r,e);void 0!==(null==r?void 0:r.onDelete)?a=r.onDelete(e):ze(i)&&(a=null==(n=null==i?void 0:i.deletedValue)?void 0:n.call(i,e))}else if(He(e)&&e.allowOverlay||e.kind===ge.Boolean){const t=zn(e);a=null==(r=null==t?void 0:t.onDelete)?void 0:r.call(t,e)}void 0!==a&&!Le(a)&&He(a)&&o.push({location:[l,i],value:a})}cr(o),null==(i=lr.current)||i.damage(o.map((e=>({cell:e.location}))))}if(Fn("primary+f",e)&&en.search&&(a(),null==(r=null==v?void 0:v.current)||r.focus({preventScroll:!0}),sn(!0)),w){const e=null==(i=null==Cn?void 0:Cn(hn))||i;if(a(),!1!==e){const t=!0===e?hn:e;if(void 0!==t.current){C(t.current.range);for(const e of t.current.rangeStack)C(e)}for(const e of t.rows)C({x:rn,y:e,width:Xn.length-rn,height:1});for(const e of t.columns)C({x:e,y:0,width:1,height:P})}return}if(void 0===hn.current)return;let[M,E]=hn.current.cell,R=!1;if(en.selectColumn&&Fn("ctrl+ ",e)&&"none"!==de)k.hasIndex(M)?Rn(k.remove(M),void 0,!0):"single"===de?Rn(Ve.fromSingleSelection(M),void 0,!0):Rn(void 0,M,!0);else if(en.selectRow&&Fn("shift+ ",e)&&"none"!==pe)S.hasIndex(E)?En(S.remove(E),void 0,!0):"single"===pe?En(Ve.fromSingleSelection(E),void 0,!0):En(void 0,E,!0);else if((Fn("Enter",e)||Fn(" ",e)||Fn("shift+Enter",e))&&void 0!==p)s?(m(void 0),Fn("Enter",e)?E++:Fn("shift+Enter",e)&&E--):E===P&&on?window.setTimeout((()=>{const e=kr(M);xr(null!=e?e:M)}),0):(null==L||L([M-rn,E]),gr(p,!0),a());else if(en.downFill&&Fn("primary+_68",e)&&hn.current.range.height>1)Nr(!1),a();else if(en.rightFill&&Fn("primary+_82",e)&&hn.current.range.width>1){const e=[],t=hn.current.range;for(let n=0;n<t.height;n++){const r=n+t.y,i=hr([t.x,r]);if(!Le(i)&&Fe(i))for(let n=1;n<t.width;n++){const o=[n+t.x,r];e.push({location:o,value:{...i}})}}cr(e),null==(o=lr.current)||o.damage(e.map((e=>({cell:e.location})))),a()}else if(en.pageDown&&Fn("PageDown",e))E+=Math.max(1,Gn.current.height-4),a();else if(en.pageUp&&Fn("PageUp",e))E-=Math.max(1,Gn.current.height-4),a();else if(en.first&&Fn("primary+Home",e))m(void 0),E=0,M=0;else if(en.last&&Fn("primary+End",e))m(void 0),E=Number.MAX_SAFE_INTEGER,M=Number.MAX_SAFE_INTEGER;else if(en.first&&Fn("primary+shift+Home",e))m(void 0),ni([-2,-2]);else if(en.last&&Fn("primary+shift+End",e))m(void 0),ni([2,2]);else if("ArrowDown"===f){if(h&&c)return;m(void 0),!u||"rect"!==ce&&"multi-rect"!==ce?(c&&!y&&(R=!0),y&&!c?E=P-1:E+=1):ni([0,y&&!c?2:1])}else if("ArrowUp"===f||"Home"===f){const e="Home"===f||y;m(void 0),!u||"rect"!==ce&&"multi-rect"!==ce?(c&&!e&&(R=!0),E+=e&&!c?Number.MIN_SAFE_INTEGER:-1):ni([0,e&&!c?-2:-1])}else if("ArrowRight"===f||"End"===f){const e="End"===f||y;m(void 0),!u||"rect"!==ce&&"multi-rect"!==ce?(c&&!e&&(R=!0),M+=e&&!c?Number.MAX_SAFE_INTEGER:1):ni([e&&!c?2:1,0])}else if("ArrowLeft"===f)m(void 0),!u||"rect"!==ce&&"multi-rect"!==ce?(c&&!y&&(R=!0),M+=y&&!c?Number.MIN_SAFE_INTEGER:-1):ni([y&&!c?-2:-1,0]);else if("Tab"===f)m(void 0),u?M--:M++;else if(!d&&!h&&void 0!==hn.current&&1===f.length&&/[ -~]/g.test(f)&&void 0!==p&&Fe(D([M-rn,Math.max(0,E-1)]))){if((!ln||E!==P)&&(x.y>E||E>x.y+x.height||x.x>M||M>x.x+x.width))return;gr(p,!0,f),a()}ri(M,E,!1,R)&&a()})()}),[J,g,hn,en.selectAll,en.search,en.selectColumn,en.selectRow,en.downFill,en.rightFill,en.pageDown,en.pageUp,en.first,en.last,en.clear,de,pe,D,rn,ri,yn,Xe,T.length,P,oi,ar,cr,zn,Cn,Xn.length,Rn,En,on,kr,xr,L,gr,Nr,hr,ni,ce,ln]),ai=i.useCallback(((e,t)=>{const n=e.location[0]-rn;if("header"===e.kind&&(null==W||W(n,{...e,preventDefault:t})),e.kind===ke){if(n<0)return;null==Z||Z(n,{...e,preventDefault:t})}if("cell"===e.kind){const[r,i]=e.location;null==N||N([n,i],{...e,preventDefault:t}),function(e,t){const[n,r]=t;if(e.columns.hasIndex(n)||e.rows.hasIndex(r))return!0;if(void 0!==e.current){if(e.current.cell[0]===n&&e.current.cell[1]===r)return!0;const t=[e.current.range,...e.current.rangeStack];for(const e of t)if(n>=e.x&&n<e.x+e.width&&r>=e.y&&r<e.y+e.height)return!0}return!1}(hn,e.location)||ri(r,i,!1,!1)}}),[hn,N,Z,W,rn,ri]),si=i.useCallback((async e=>{var t,n,r,i,o,l,a;if(!en.paste)return;function s(e,t,n){var r,i;if(!Le(e)&&Fe(e)&&!0!==e.readonly){const o=null==z?void 0:z(n,e);if(void 0!==o&&He(o))return o.kind!==e.kind&&console.warn("Coercion should not change cell kind."),{location:t,value:o};const l=zn(e);if(void 0===l)return;if(l.kind===ge.Custom){oe(e.kind===ge.Custom);const i=null==(r=l.onPaste)?void 0:r.call(l,n,e.data);if(void 0===i)return;return{location:t,value:{...e,data:i}}}{const r=null==(i=l.onPaste)?void 0:i.call(l,n,e);if(void 0===r)return;return oe(r.kind===e.kind),{location:t,value:r}}}}const c=hn.columns,u=hn.rows,d=!0===(null==(t=x.current)?void 0:t.contains(document.activeElement))||!0===(null==(n=b.current)?void 0:n.contains(document.activeElement));let h=null==(r=hn.current)?void 0:r.cell;if(void 0===h&&1===c.length&&(h=[null!=(i=c.first())?i:0,0]),void 0===h&&1===u.length&&(h=[rn,null!=(o=u.first())?o:0]),d&&void 0!==h){let t,n;const r="text/plain",i="text/html";if(void 0!==navigator.clipboard.read){const e=await navigator.clipboard.read();for(const o of e){if(o.types.includes(i)){const e=await o.getType(i),n=await e.text(),r=document.createElement("html");r.innerHTML=n;const l=r.querySelector("table");if(null!==l){t=_n(l);break}}o.types.includes(r)&&(n=await(await o.getType(r)).text())}}else if(void 0!==navigator.clipboard.readText)n=await navigator.clipboard.readText();else{if(void 0===e||null===(null==e?void 0:e.clipboardData))return;if(e.clipboardData.types.includes(i)){const n=e.clipboardData.getData(i),r=document.createElement("html");r.innerHTML=n;const o=r.querySelector("table");null!==o&&(t=_n(o))}void 0===t&&e.clipboardData.types.includes(r)&&(n=e.clipboardData.getData(r))}const[o,c]=h,u=[];do{if(void 0===Ee){const e=s(hr(h),h,null!=(l=null!=n?n:null==t?void 0:t.map((e=>e.join("\t"))).join("\t"))?l:"");void 0!==e&&u.push(e);break}if(void 0===t){if(void 0===n)return;t=An(n)}if(!1===Ee||"function"===typeof Ee&&!0!==(null==Ee?void 0:Ee([h[0]-rn,h[1]],t)))return;for(const[e,n]of t.entries()){if(e+c>=P)break;for(const[t,r]of n.entries()){const n=[t+o,e+c],i=s(hr(n),n,r);void 0!==i&&u.push(i)}}}while(0);cr(u),null==(a=lr.current)||a.damage(u.map((e=>({cell:e.location}))))}}),[z,zn,hr,hn,en.paste,cr,Ee,rn,P]);Ge("paste",si,window,!1,!0);const ci=i.useCallback((async(e,t)=>{var n,r;if(!en.copy)return;const i=!0===t||!0===(null==(n=x.current)?void 0:n.contains(document.activeElement))||!0===(null==(r=b.current)?void 0:r.contains(document.activeElement)),o=hn.columns,l=hn.rows,a=(t,n)=>{if(Re){Bn([n.map((e=>({kind:ge.Text,data:T[e].title,displayData:T[e].title,allowOverlay:!1}))),...t],n,e)}else Bn(t,n,e)};if(i&&void 0!==pn)if(void 0!==hn.current){let e=pn(hn.current.range,fn.current.signal);"object"!==typeof e&&(e=await e()),a(e,s(hn.current.range.x-rn,hn.current.range.x+hn.current.range.width-rn))}else if(void 0!==l&&l.length>0){const e=[...l].map((e=>{const t=pn({x:rn,y:e,width:T.length,height:1},fn.current.signal);return"object"===typeof t?t[0]:t().then((e=>e[0]))}));if(e.some((e=>e instanceof Promise))){a(await Promise.all(e),s(T.length))}else a(e,s(T.length))}else if(o.length>0){const e=[],t=[];for(const n of o){let r=pn({x:n,y:0,width:1,height:P},fn.current.signal);"object"!==typeof r&&(r=await r()),e.push(r),t.push(n-rn)}if(1===e.length)a(e[0],t);else{a(e.reduce(((e,t)=>e.map(((e,n)=>[...e,...t[n]])))),t)}}}),[T,pn,hn,en.copy,rn,P,Re]);Ge("copy",ci,window,!1,!1);const ui=i.useCallback(((e,t)=>{if(void 0!==K)return 0!==rn&&(e=e.map((e=>[e[0]-rn,e[1]]))),void K(e,t);if(0===e.length||-1===t)return;const[n,r]=e[t];void 0!==k.current&&k.current[0]===n&&k.current[1]===r||(k.current=[n,r],ri(n,r,!1,!1))}),[K,rn,ri]),[di,hi]=null!=(h=null==(d=null==Qe?void 0:Qe.current)?void 0:d.cell)?h:[],fi=i.useRef(vr);fi.current=vr,i.useLayoutEffect((()=>{var e,t,n,r;Qn.current||void 0===di||void 0===hi||di===(null==(t=null==(e=bn.current)?void 0:e.current)?void 0:t.cell[0])&&hi===(null==(r=null==(n=bn.current)?void 0:n.current)?void 0:r.cell[1])||fi.current(di,hi),Qn.current=!1}),[di,hi]);const pi=void 0!==hn.current&&(hn.current.cell[0]>=Xn.length||hn.current.cell[1]>=sr);i.useLayoutEffect((()=>{pi&&yn(Ir,!1)}),[pi,yn]);const gi=i.useMemo((()=>!0===on&&!0===(null==it?void 0:it.tint)?Ve.fromSingleSelection(sr-1):Ve.empty()),[sr,on,null==it?void 0:it.tint]),mi=i.useCallback((e=>{var t;return"boolean"===typeof at?at:null==(t=null==at?void 0:at(e-rn))||t}),[rn,at]),vi=i.useMemo((()=>{if(void 0===_r||null===b.current)return null;const{bounds:e,group:t}=_r,n=b.current.getBoundingClientRect();return i.createElement(Dn,{bounds:e,group:t,canvasBounds:n,onClose:()=>Vr(void 0),onFinish:e=>{Vr(void 0),null==U||U(t,e)}})}),[U,_r]),bi=Math.min(Xn.length,Ae+(nn?1:0));i.useImperativeHandle(t,(()=>({appendRow:(e,t)=>xr(e+rn,t),updateCells:e=>{var t;return 0!==rn&&(e=e.map((e=>({cell:[e.cell[0]+rn,e.cell[1]]})))),null==(t=lr.current)?void 0:t.damage(e)},getBounds:(e,t)=>{var n;return null==(n=lr.current)?void 0:n.getBounds(e+rn,t)},focus:()=>{var e;return null==(e=lr.current)?void 0:e.focus()},emit:async e=>{switch(e){case"delete":li({bounds:void 0,cancel:()=>{},stopPropagation:()=>{},preventDefault:()=>{},ctrlKey:!1,key:"Delete",keyCode:46,metaKey:!1,shiftKey:!1,altKey:!1,rawEvent:void 0,location:void 0});break;case"fill-right":li({bounds:void 0,cancel:()=>{},stopPropagation:()=>{},preventDefault:()=>{},ctrlKey:!0,key:"r",keyCode:82,metaKey:!1,shiftKey:!1,altKey:!1,rawEvent:void 0,location:void 0});break;case"fill-down":li({bounds:void 0,cancel:()=>{},stopPropagation:()=>{},preventDefault:()=>{},ctrlKey:!0,key:"d",keyCode:68,metaKey:!1,shiftKey:!1,altKey:!1,rawEvent:void 0,location:void 0});break;case"copy":await ci(void 0,!0);break;case"paste":await si()}},scrollTo:vr,remeasureColumns:e=>{for(const t of e)Wr(t+rn,!0)}})),[xr,Wr,ci,li,si,rn,vr]);const[yi,wi]=null!=Kr?Kr:[],xi=i.useCallback((e=>{const[t,n]=e;-1!==n?yi===t&&wi===n||(Mn({cell:e,range:{x:t,y:n,width:1,height:1}},!0,!1,"keyboard-nav"),vr(t,n)):"none"!==de&&(Rn(Ve.fromSingleSelection(t),void 0,!1),ar())}),[de,ar,vr,yi,wi,Mn,Rn]),[ki,Si]=i.useState(!1),Ci=i.useRef(c((e=>{Si(e)}),5)),Mi=i.useCallback((()=>{Ci.current(!0),void 0===hn.current&&0===hn.columns.length&&0===hn.rows.length&&void 0===y&&Mn({cell:[rn,or],range:{x:rn,y:or,width:1,height:1}},!0,!1,"keyboard-select")}),[or,hn,y,rn,Mn]),Ei=i.useCallback((()=>{Ci.current(!1)}),[]),[Ri,Oi]=i.useMemo((()=>{var e;let t;const n=null!=(e=null==yt?void 0:yt.scrollbarWidthOverride)?e:function(){if(void 0!==dt)return dt;const e=document.createElement("p");e.style.width="100%",e.style.height="200px";const t=document.createElement("div");t.id="testScrollbar",t.style.position="absolute",t.style.top="0px",t.style.left="0px",t.style.visibility="hidden",t.style.width="200px",t.style.height="150px",t.style.overflow="hidden",t.append(e),document.body.append(t);const n=e.offsetWidth;t.style.overflow="scroll";let r=e.offsetWidth;return n===r&&(r=t.clientWidth),t.remove(),dt=n-r}(),r=P+(on?1:0);if("number"===typeof Yt)t=Nn+r*Yt;else{let e=0;const n=Math.min(r,10);for(let t=0;t<n;t++)e+=Yt(t);e=Math.floor(e/n),t=Nn+r*e}t+=n;const i=Xn.reduce(((e,t)=>t.width+e),0)+n;return[`${Math.min(1e5,i)}px`,`${Math.min(1e5,t)}px`]}),[Xn,null==yt?void 0:yt.scrollbarWidthOverride,Yt,P,on,Nn]);return i.createElement(fe.Provider,{value:On},i.createElement(Zn,{style:ue(On),className:B,inWidth:null!=O?O:Ri,inHeight:null!=I?I:Oi},i.createElement(Tn,{fillHandle:vt,drawFocusRing:bt,experimental:yt,fixedShadowX:wt,fixedShadowY:xt,getRowThemeOverride:E,headerIcons:kt,imageWindowLoader:St,initialSize:Ct,isDraggable:Mt,onDragLeave:Et,onRowMoved:Rt,overscrollX:Qt,overscrollY:Jt,preventDiagonalScrolling:Tt,rightElement:Pt,rightElementProps:Dt,showMinimap:Ht,smoothScrollX:Lt,smoothScrollY:Ft,className:B,enableGroups:$n,onCanvasFocused:Mi,onCanvasBlur:Ei,canvasRef:b,onContextMenu:ai,theme:On,cellXOffset:ir,cellYOffset:or,accessibilityHeight:Jn.height,onDragEnd:ei,columns:Xn,drawCustomCell:se,drawHeader:Sn,disabledRows:gi,freezeColumns:bi,lockColumns:rn,firstColAccessible:0===rn,getCellContent:hr,minColumnWidth:Wt,maxColumnWidth:jt,searchInputRef:v,showSearch:cn,onSearchClose:un,highlightRegions:ur,getCellsForSelection:pn,getGroupDetails:fr,headerHeight:Kt,isFocused:ki,groupHeaderHeight:$n?Gt:0,trailingRowType:on?!0===(null==it?void 0:it.sticky)?"sticky":"appended":"none",onColumnResize:wn,onColumnResizeEnd:xn,onColumnResizeStart:kn,onCellFocused:xi,onColumnMoved:qr,onDragStart:Jr,onHeaderMenuClick:Yr,onItemHovered:ti,isFilling:!0===(null==y?void 0:y.fillHandle),onMouseMove:Xr,onKeyDown:li,onKeyUp:ee,onMouseDown:Ar,onMouseUp:Ur,onDragOverCell:st,onDrop:ct,onSearchResultsChanged:ui,onVisibleRegionChanged:Gr,clientSize:[In[0],In[1]],rowHeight:Yt,searchResults:G,searchValue:Q,onSearchValueChange:q,rows:sr,scrollRef:x,selection:hn,translateX:Jn.tx,translateY:Jn.ty,verticalBorder:mi,gridRef:lr,getCellRenderer:zn,scrollToEnd:zt}),vi,void 0!==g&&i.createElement(Be,{...g,validateCell:mn,id:oi,getCellRenderer:zn,className:!0===(null==yt?void 0:yt.isSubGrid)?"click-outside-ignore":void 0,provideEditor:rt,imageEditorOverride:M,onFinishEditing:ii,markdownDivCreateNode:R,isOutsideClick:Bt})))}));function Pr(e){return{...e,kind:ge.Custom}}function Dr(e){return{customRenderers:i.useMemo((()=>e.map(Pr)),[e])}}},15532:(e,t,n)=>{"use strict";n.r(t),n.d(t,{FileSystemDirectoryHandle:()=>o,default:()=>l});var r=n(80954);const i=Symbol("adapter");class o extends r.Z{[i];constructor(e){super(e),this[i]=e}async getDirectoryHandle(e,t={}){if(""===e)throw new TypeError("Name can't be an empty string.");if("."===e||".."===e||e.includes("/"))throw new TypeError("Name contains invalid characters.");t.create=!!t.create;const n=await this[i].getDirectoryHandle(e,t);return new o(n)}async*entries(){const{FileSystemFileHandle:e}=await Promise.resolve().then(n.bind(n,11445));for await(const[t,n]of this[i].entries())yield[n.name,"file"===n.kind?new e(n):new o(n)]}async*getEntries(){const{FileSystemFileHandle:e}=await Promise.resolve().then(n.bind(n,11445));console.warn("deprecated, use .entries() instead");for await(let t of this[i].entries())yield"file"===t.kind?new e(t):new o(t)}async getFileHandle(e,t={}){const{FileSystemFileHandle:r}=await Promise.resolve().then(n.bind(n,11445));if(""===e)throw new TypeError("Name can't be an empty string.");if("."===e||".."===e||e.includes("/"))throw new TypeError("Name contains invalid characters.");t.create=!!t.create;return new r(await this[i].getFileHandle(e,t))}async removeEntry(e,t={}){if(""===e)throw new TypeError("Name can't be an empty string.");if("."===e||".."===e||e.includes("/"))throw new TypeError("Name contains invalid characters.");return t.recursive=!!t.recursive,this[i].removeEntry(e,t)}async resolve(e){if(await e.isSameEntry(this))return[];const t=[{handle:this,path:[]}];for(;t.length;){let{handle:n,path:r}=t.pop();for await(const i of n.values()){if(await i.isSameEntry(e))return[...r,i.name];"directory"===i.kind&&t.push({handle:i,path:[...r,i.name]})}}return null}async*keys(){for await(const[e]of this[i].entries())yield e}async*values(){for await(const[e,t]of this)yield t}[Symbol.asyncIterator](){return this.entries()}}Object.defineProperty(o.prototype,Symbol.toStringTag,{value:"FileSystemDirectoryHandle",writable:!1,enumerable:!1,configurable:!0}),Object.defineProperties(o.prototype,{getDirectoryHandle:{enumerable:!0},entries:{enumerable:!0},getFileHandle:{enumerable:!0},removeEntry:{enumerable:!0}});const l=o},11445:(e,t,n)=>{"use strict";n.r(t),n.d(t,{FileSystemFileHandle:()=>l,default:()=>a});var r=n(80954),i=n(93160);const o=Symbol("adapter");class l extends r.Z{[o];constructor(e){super(e),this[o]=e}async createWritable(e={}){return new i.Z(await this[o].createWritable(e))}async getFile(){return this[o].getFile()}}Object.defineProperty(l.prototype,Symbol.toStringTag,{value:"FileSystemFileHandle",writable:!1,enumerable:!1,configurable:!0}),Object.defineProperties(l.prototype,{createWritable:{enumerable:!0},getFile:{enumerable:!0}});const a=l},80954:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});const r=Symbol("adapter");class i{[r];name;kind;constructor(e){this.kind=e.kind,this.name=e.name,this[r]=e}async queryPermission({mode:e="read"}={}){const t=this[r];if(t.queryPermission)return t.queryPermission({mode:e});if("read"===e)return"granted";if("readwrite"===e)return t.writable?"granted":"denied";throw new TypeError(`Mode ${e} must be 'read' or 'readwrite'`)}async requestPermission({mode:e="read"}={}){const t=this[r];if(t.requestPermission)return t.requestPermission({mode:e});if("read"===e)return"granted";if("readwrite"===e)return t.writable?"granted":"denied";throw new TypeError(`Mode ${e} must be 'read' or 'readwrite'`)}async remove(e={}){await this[r].remove(e)}async isSameEntry(e){return this===e||!(!e||"object"!==typeof e||this.kind!==e.kind||!e[r])&&this[r].isSameEntry(e[r])}}Object.defineProperty(i.prototype,Symbol.toStringTag,{value:"FileSystemHandle",writable:!1,enumerable:!1,configurable:!0});const o=i},93160:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(51059);const{WritableStream:i}=r.Z;class o extends i{constructor(...e){super(...e),Object.setPrototypeOf(this,o.prototype),this._closed=!1}close(){this._closed=!0;const e=this.getWriter(),t=e.close();return e.releaseLock(),t}seek(e){return this.write({type:"seek",position:e})}truncate(e){return this.write({type:"truncate",size:e})}write(e){if(this._closed)return Promise.reject(new TypeError("Cannot write to a CLOSED writable stream"));const t=this.getWriter(),n=t.write(e);return t.releaseLock(),n}}Object.defineProperty(o.prototype,Symbol.toStringTag,{value:"FileSystemWritableFileStream",writable:!1,enumerable:!1,configurable:!0}),Object.defineProperties(o.prototype,{close:{enumerable:!0},seek:{enumerable:!0},truncate:{enumerable:!0},write:{enumerable:!0}});const l=o},51059:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r={ReadableStream:globalThis.ReadableStream,WritableStream:globalThis.WritableStream,TransformStream:globalThis.TransformStream,DOMException:globalThis.DOMException,Blob:globalThis.Blob,File:globalThis.File}},95599:(e,t,n)=>{"use strict";n.d(t,{Kr:()=>i});globalThis.showDirectoryPicker;globalThis.showOpenFilePicker;const r=globalThis.showSaveFilePicker;const i=async function(e={}){if(r&&!e._preferPolyfill)return r(e);e._name&&(console.warn("deprecated _name, spec now have `suggestedName`"),e.suggestedName=e._name);const{FileSystemFileHandle:t}=await Promise.resolve().then(n.bind(n,11445)),{FileHandle:i}=await n.e(8850).then(n.bind(n,98850));return new t(new i(e.suggestedName))};globalThis.DataTransferItem&&!DataTransferItem.prototype.getAsFileSystemHandle&&(DataTransferItem.prototype.getAsFileSystemHandle=async function(){const e=this.webkitGetAsEntry(),[{FileHandle:t,FolderHandle:r},{FileSystemDirectoryHandle:i},{FileSystemFileHandle:o}]=await Promise.all([n.e(3208).then(n.bind(n,96093)),Promise.resolve().then(n.bind(n,15532)),Promise.resolve().then(n.bind(n,11445))]);return e.isFile?new o(new t(e,!1)):new i(new r(e,!1))});n(15532),n(11445),n(80954),n(93160)}}]);