@stlite/desktop 0.21.2 → 0.22.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 (96) hide show
  1. package/README.md +11 -2
  2. package/build/asset-manifest.json +93 -93
  3. package/build/electron/main.js +60 -10
  4. package/build/index.html +1 -1
  5. package/build/static/css/{6.03f87ee7.chunk.css → 6.69790b96.chunk.css} +1 -1
  6. package/build/static/css/{main.b6e9910c.chunk.css → main.7bc75681.chunk.css} +1 -1
  7. package/build/static/js/{0.db2b8db1.chunk.js → 0.14aa4233.chunk.js} +1 -1
  8. package/build/static/js/{1.d8a95919.chunk.js → 1.176aded5.chunk.js} +1 -1
  9. package/build/static/js/{10.dae52f04.chunk.js → 10.e5ea6d64.chunk.js} +1 -1
  10. package/build/static/js/{11.9fe45850.chunk.js → 11.5e15526e.chunk.js} +2 -2
  11. package/build/static/js/{11.9fe45850.chunk.js.LICENSE.txt → 11.5e15526e.chunk.js.LICENSE.txt} +0 -0
  12. package/build/static/js/{12.209a1965.chunk.js → 12.8105987b.chunk.js} +2 -2
  13. package/build/static/js/{12.209a1965.chunk.js.LICENSE.txt → 12.8105987b.chunk.js.LICENSE.txt} +0 -0
  14. package/build/static/js/{13.a3dda2ea.chunk.js → 13.6f270c1f.chunk.js} +2 -2
  15. package/build/static/js/{13.a3dda2ea.chunk.js.LICENSE.txt → 13.6f270c1f.chunk.js.LICENSE.txt} +0 -0
  16. package/build/static/js/{14.86cd17bd.chunk.js → 14.3da5e7a9.chunk.js} +1 -1
  17. package/build/static/js/{15.1bdac30d.chunk.js → 15.91a85aa0.chunk.js} +2 -2
  18. package/build/static/js/{15.1bdac30d.chunk.js.LICENSE.txt → 15.91a85aa0.chunk.js.LICENSE.txt} +0 -0
  19. package/build/static/js/{16.be849095.chunk.js → 16.650490ee.chunk.js} +2 -2
  20. package/build/static/js/{16.be849095.chunk.js.LICENSE.txt → 16.650490ee.chunk.js.LICENSE.txt} +0 -0
  21. package/build/static/js/{17.cc750fa1.chunk.js → 17.4c6481b3.chunk.js} +1 -1
  22. package/build/static/js/{18.5007c118.chunk.js → 18.e3d4364d.chunk.js} +2 -2
  23. package/build/static/js/{18.5007c118.chunk.js.LICENSE.txt → 18.e3d4364d.chunk.js.LICENSE.txt} +0 -0
  24. package/build/static/js/{19.1d97adb1.chunk.js → 19.9004a138.chunk.js} +3 -3
  25. package/build/static/js/{19.1d97adb1.chunk.js.LICENSE.txt → 19.9004a138.chunk.js.LICENSE.txt} +0 -0
  26. package/build/static/js/{2.42f468c9.chunk.js → 2.26deed5e.chunk.js} +2 -2
  27. package/build/static/js/{2.42f468c9.chunk.js.LICENSE.txt → 2.26deed5e.chunk.js.LICENSE.txt} +0 -0
  28. package/build/static/js/{20.d86738b4.chunk.js → 20.1e287e6d.chunk.js} +1 -1
  29. package/build/static/js/{21.8fca1019.chunk.js → 21.cc58bd99.chunk.js} +1 -1
  30. package/build/static/js/{22.d22eb326.chunk.js → 22.fe58abe1.chunk.js} +2 -2
  31. package/build/static/js/{22.d22eb326.chunk.js.LICENSE.txt → 22.fe58abe1.chunk.js.LICENSE.txt} +0 -0
  32. package/build/static/js/{23.703a0005.chunk.js → 23.ee721415.chunk.js} +3 -3
  33. package/build/static/js/{23.703a0005.chunk.js.LICENSE.txt → 23.ee721415.chunk.js.LICENSE.txt} +0 -0
  34. package/build/static/js/{24.bbdd8ad5.chunk.js → 24.36b10d26.chunk.js} +2 -2
  35. package/build/static/js/{24.bbdd8ad5.chunk.js.LICENSE.txt → 24.36b10d26.chunk.js.LICENSE.txt} +0 -0
  36. package/build/static/js/{25.7a13965c.chunk.js → 25.edf85627.chunk.js} +2 -2
  37. package/build/static/js/{25.7a13965c.chunk.js.LICENSE.txt → 25.edf85627.chunk.js.LICENSE.txt} +0 -0
  38. package/build/static/js/{26.5d02767c.chunk.js → 26.99f3cc19.chunk.js} +2 -2
  39. package/build/static/js/{26.5d02767c.chunk.js.LICENSE.txt → 26.99f3cc19.chunk.js.LICENSE.txt} +0 -0
  40. package/build/static/js/{27.a1975825.chunk.js → 27.d7aacc94.chunk.js} +2 -2
  41. package/build/static/js/{27.a1975825.chunk.js.LICENSE.txt → 27.d7aacc94.chunk.js.LICENSE.txt} +0 -0
  42. package/build/static/js/{28.8fe6cf95.chunk.js → 28.d24eb9cf.chunk.js} +3 -3
  43. package/build/static/js/{28.8fe6cf95.chunk.js.LICENSE.txt → 28.d24eb9cf.chunk.js.LICENSE.txt} +0 -0
  44. package/build/static/js/{29.2a3ece9e.chunk.js → 29.fbb528d8.chunk.js} +2 -2
  45. package/build/static/js/{29.2a3ece9e.chunk.js.LICENSE.txt → 29.fbb528d8.chunk.js.LICENSE.txt} +0 -0
  46. package/build/static/js/{3.82223a8f.chunk.js → 3.f4fb8871.chunk.js} +1 -1
  47. package/build/static/js/{30.99b51097.chunk.js → 30.32ab2cb4.chunk.js} +2 -2
  48. package/build/static/js/{30.99b51097.chunk.js.LICENSE.txt → 30.32ab2cb4.chunk.js.LICENSE.txt} +0 -0
  49. package/build/static/js/{31.ff33aa2d.chunk.js → 31.9c06312e.chunk.js} +2 -2
  50. package/build/static/js/{31.ff33aa2d.chunk.js.LICENSE.txt → 31.9c06312e.chunk.js.LICENSE.txt} +0 -0
  51. package/build/static/js/{32.a0448bd6.chunk.js → 32.a1f2009d.chunk.js} +2 -2
  52. package/build/static/js/{32.a0448bd6.chunk.js.LICENSE.txt → 32.a1f2009d.chunk.js.LICENSE.txt} +0 -0
  53. package/build/static/js/{33.4e785a88.chunk.js → 33.1d5fce1c.chunk.js} +2 -2
  54. package/build/static/js/{33.4e785a88.chunk.js.LICENSE.txt → 33.1d5fce1c.chunk.js.LICENSE.txt} +0 -0
  55. package/build/static/js/{34.a91bbe12.chunk.js → 34.edb9c338.chunk.js} +2 -2
  56. package/build/static/js/{34.a91bbe12.chunk.js.LICENSE.txt → 34.edb9c338.chunk.js.LICENSE.txt} +0 -0
  57. package/build/static/js/{35.d2720d0c.chunk.js → 35.6bd7c1ed.chunk.js} +2 -2
  58. package/build/static/js/{35.d2720d0c.chunk.js.LICENSE.txt → 35.6bd7c1ed.chunk.js.LICENSE.txt} +0 -0
  59. package/build/static/js/{36.19b6ded6.chunk.js → 36.be12d12e.chunk.js} +2 -2
  60. package/build/static/js/{36.19b6ded6.chunk.js.LICENSE.txt → 36.be12d12e.chunk.js.LICENSE.txt} +0 -0
  61. package/build/static/js/{37.c8ade714.chunk.js → 37.b845d4ba.chunk.js} +2 -2
  62. package/build/static/js/{37.c8ade714.chunk.js.LICENSE.txt → 37.b845d4ba.chunk.js.LICENSE.txt} +0 -0
  63. package/build/static/js/{38.a8e76ebd.chunk.js → 38.0e8cfb78.chunk.js} +2 -2
  64. package/build/static/js/{38.a8e76ebd.chunk.js.LICENSE.txt → 38.0e8cfb78.chunk.js.LICENSE.txt} +0 -0
  65. package/build/static/js/{39.815183b5.chunk.js → 39.73c851be.chunk.js} +2 -2
  66. package/build/static/js/{39.815183b5.chunk.js.LICENSE.txt → 39.73c851be.chunk.js.LICENSE.txt} +0 -0
  67. package/build/static/js/{40.5e639584.chunk.js → 40.1fc38a50.chunk.js} +2 -2
  68. package/build/static/js/{40.5e639584.chunk.js.LICENSE.txt → 40.1fc38a50.chunk.js.LICENSE.txt} +0 -0
  69. package/build/static/js/{41.1811bda2.chunk.js → 41.4ddf36bc.chunk.js} +2 -2
  70. package/build/static/js/{41.1811bda2.chunk.js.LICENSE.txt → 41.4ddf36bc.chunk.js.LICENSE.txt} +0 -0
  71. package/build/static/js/{42.ccc87d41.chunk.js → 42.e5620440.chunk.js} +2 -2
  72. package/build/static/js/{42.ccc87d41.chunk.js.LICENSE.txt → 42.e5620440.chunk.js.LICENSE.txt} +0 -0
  73. package/build/static/js/{43.dd888752.chunk.js → 43.44eb58de.chunk.js} +2 -2
  74. package/build/static/js/{43.dd888752.chunk.js.LICENSE.txt → 43.44eb58de.chunk.js.LICENSE.txt} +0 -0
  75. package/build/static/js/{44.14f2e50d.chunk.js → 44.35b43369.chunk.js} +2 -2
  76. package/build/static/js/{44.14f2e50d.chunk.js.LICENSE.txt → 44.35b43369.chunk.js.LICENSE.txt} +0 -0
  77. package/build/static/js/{45.61ea1afe.chunk.js → 45.91664b3c.chunk.js} +2 -2
  78. package/build/static/js/{45.61ea1afe.chunk.js.LICENSE.txt → 45.91664b3c.chunk.js.LICENSE.txt} +0 -0
  79. package/build/static/js/{46.3201e0ba.chunk.js → 46.e9639103.chunk.js} +2 -2
  80. package/build/static/js/{46.3201e0ba.chunk.js.LICENSE.txt → 46.e9639103.chunk.js.LICENSE.txt} +0 -0
  81. package/build/static/js/{47.f6442eb9.chunk.js → 47.77b33a34.chunk.js} +2 -2
  82. package/build/static/js/{47.f6442eb9.chunk.js.LICENSE.txt → 47.77b33a34.chunk.js.LICENSE.txt} +0 -0
  83. package/build/static/js/6.8496e815.chunk.js +2 -0
  84. package/build/static/js/{6.cfeb0558.chunk.js.LICENSE.txt → 6.8496e815.chunk.js.LICENSE.txt} +0 -0
  85. package/build/static/js/{7.e179a232.chunk.js → 7.54bbd037.chunk.js} +2 -2
  86. package/build/static/js/{7.e179a232.chunk.js.LICENSE.txt → 7.54bbd037.chunk.js.LICENSE.txt} +0 -0
  87. package/build/static/js/{8.89ddb52f.chunk.js → 8.934b1bbd.chunk.js} +2 -2
  88. package/build/static/js/{8.89ddb52f.chunk.js.LICENSE.txt → 8.934b1bbd.chunk.js.LICENSE.txt} +0 -0
  89. package/build/static/js/{9.ea63c205.chunk.js → 9.8ff376a2.chunk.js} +1 -1
  90. package/build/static/js/main.118127a6.chunk.js +28 -0
  91. package/build/static/js/{main.984ac8f5.chunk.js.LICENSE.txt → main.118127a6.chunk.js.LICENSE.txt} +0 -0
  92. package/build/static/js/runtime-main.fe933feb.js +1 -0
  93. package/package.json +7 -5
  94. package/build/static/js/6.cfeb0558.chunk.js +0 -2
  95. package/build/static/js/main.984ac8f5.chunk.js +0 -28
  96. package/build/static/js/runtime-main.bae92e60.js +0 -1
@@ -1 +1 @@
1
- (this["webpackJsonp@stlite/desktop"]=this["webpackJsonp@stlite/desktop"]||[]).push([[10],{1213:function(e,t,n){var r=n(1250)();e.exports=r},1214:function(e,t,n){var r=n(1253),i=n(98),o=n(240),l=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,s=/^0o[0-7]+$/i,u=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(o(e))return NaN;if(i(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=i(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=r(e);var n=a.test(e);return n||s.test(e)?u(e.slice(2),n?2:8):l.test(e)?NaN:+e}},1250:function(e,t,n){var r=n(1251),i=n(470),o=n(1252);e.exports=function(e){return function(t,n,l){return l&&"number"!=typeof l&&i(t,n,l)&&(n=l=void 0),t=o(t),void 0===n?(n=t,t=0):n=o(n),l=void 0===l?t<n?1:-1:o(l),r(t,n,l,e)}}},1251:function(e,t){var n=Math.ceil,r=Math.max;e.exports=function(e,t,i,o){for(var l=-1,a=r(n((t-e)/(i||1)),0),s=Array(a);a--;)s[o?a:++l]=e,e+=i;return s}},1252:function(e,t,n){var r=n(1214),i=1/0;e.exports=function(e){return e?(e=r(e))===i||e===-1/0?17976931348623157e292*(e<0?-1:1):e===e?e:0:0===e?e:0}},1253:function(e,t,n){var r=n(1254),i=/^\s+/;e.exports=function(e){return e?e.slice(0,r(e)+1).replace(i,""):e}},1254:function(e,t){var n=/\s/;e.exports=function(e){for(var t=e.length;t--&&n.test(e.charAt(t)););return t}},1255:function(e,t,n){var r=n(1511),i=n(1214);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)}},1323:function(e,t,n){var r=n(1324);e.exports=function(e,t){return!!(null==e?0:e.length)&&r(e,t,0)>-1}},1324:function(e,t,n){var r=n(1325),i=n(1326),o=n(1327);e.exports=function(e,t,n){return t===t?o(e,t,n):r(e,i,n)}},1325:function(e,t){e.exports=function(e,t,n,r){for(var i=e.length,o=n+(r?1:-1);r?o--:++o<i;)if(t(e[o],o,e))return o;return-1}},1326:function(e,t){e.exports=function(e){return e!==e}},1327:function(e,t){e.exports=function(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}},1328:function(e,t){e.exports=function(e,t,n){for(var r=-1,i=null==e?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}},1329:function(e,t,n){var r=n(98),i=n(1519),o=n(1214),l=Math.max,a=Math.min;e.exports=function(e,t,n){var s,u,c,d,h,f,p=0,g=!1,v=!1,m=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function y(t){var n=s,r=u;return s=u=void 0,p=t,d=e.apply(r,n)}function w(e){return p=e,h=setTimeout(D,t),g?y(e):d}function b(e){var n=e-f;return void 0===f||n>=t||n<0||v&&e-p>=c}function D(){var e=i();if(b(e))return x(e);h=setTimeout(D,function(e){var n=t-(e-f);return v?a(n,c-(e-p)):n}(e))}function x(e){return h=void 0,m&&s?y(e):(s=u=void 0,d)}function C(){var e=i(),n=b(e);if(s=arguments,u=this,f=e,n){if(void 0===h)return w(f);if(v)return clearTimeout(h),h=setTimeout(D,t),y(f)}return void 0===h&&(h=setTimeout(D,t)),d}return t=o(t)||0,r(n)&&(g=!!n.leading,c=(v="maxWait"in n)?l(o(n.maxWait)||0,t):c,m="trailing"in n?!!n.trailing:m),C.cancel=function(){void 0!==h&&clearTimeout(h),p=0,s=f=u=h=void 0},C.flush=function(){return void 0===h?d:x(i())},C}},1330:function(e,t,n){"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(",")+")")}},1378:function(e,t,n){"use strict";n.d(t,"a",(function(){return Ge})),n.d(t,"b",(function(){return Dr})),n.d(t,"c",(function(){return Se}));var r=n(0),i=n.n(r);function o(){}function l(e){return!!(e||"").match(/\d/)}function a(e){return null===e||void 0===e}function s(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}function u(e,t){void 0===t&&(t=!0);var n="-"===e[0],r=n&&t,i=(e=e.replace("-","")).split(".");return{beforeDecimal:i[0],afterDecimal:i[1]||"",hasNagation:n,addNegation:r}}function c(e,t,n){for(var r="",i=n?"0":"",o=0;o<=t-1;o++)r+=e[o]||i;return r}function d(e,t){return Array(t+1).join(e)}function h(e,t){if(e.value=e.value,null!==e){if(e.createTextRange){var n=e.createTextRange();return n.move("character",t),n.select(),!0}return e.selectionStart||0===e.selectionStart?(e.focus(),e.setSelectionRange(t,t),!0):(e.focus(),!1)}}function f(e,t,n){return Math.min(Math.max(e,t),n)}function p(e){return Math.max(e.selectionStart,e.selectionEnd)}var g={displayType:"input",decimalSeparator:".",thousandsGroupStyle:"thousand",fixedDecimalScale:!1,prefix:"",suffix:"",allowNegative:!0,allowEmptyFormatting:!1,allowLeadingZeros:!1,isNumericString:!1,type:"text",onValueChange:o,onChange:o,onKeyDown:o,onMouseUp:o,onFocus:o,onBlur:o,isAllowed:function(){return!0}},v=function(e){function t(t){e.call(this,t);var n=t.defaultValue;this.validateProps();var r=this.formatValueProp(n);this.state={value:r,numAsString:this.removeFormatting(r),mounted:!1},this.selectionBeforeInput={selectionStart:0,selectionEnd:0},this.onChange=this.onChange.bind(this),this.onKeyDown=this.onKeyDown.bind(this),this.onMouseUp=this.onMouseUp.bind(this),this.onFocus=this.onFocus.bind(this),this.onBlur=this.onBlur.bind(this)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.componentDidMount=function(){this.setState({mounted:!0})},t.prototype.componentDidUpdate=function(e){this.updateValueIfRequired(e)},t.prototype.componentWillUnmount=function(){clearTimeout(this.focusTimeout),clearTimeout(this.caretPositionTimeout)},t.prototype.updateValueIfRequired=function(e){var t=this,n=t.props,r=t.state,i=t.focusedElm,o=r.value,l=r.numAsString;if(void 0===l&&(l=""),e!==n){this.validateProps();var s=this.formatNumString(l),u=a(n.value)?s:this.formatValueProp(),c=this.removeFormatting(u),d=parseFloat(c),h=parseFloat(l);(isNaN(d)&&isNaN(h)||d===h)&&s===o&&(null!==i||u===o)||this.updateValue({formattedValue:u,numAsString:c,input:i,source:"prop",event:null})}},t.prototype.getFloatString=function(e){void 0===e&&(e="");var t=this.props.decimalScale,n=this.getSeparators().decimalSeparator,r=this.getNumberRegex(!0),i="-"===e[0];i&&(e=e.replace("-","")),n&&0===t&&(e=e.split(n)[0]);var o=(e=(e.match(r)||[]).join("").replace(n,".")).indexOf(".");return-1!==o&&(e=e.substring(0,o)+"."+e.substring(o+1,e.length).replace(new RegExp(s(n),"g"),"")),i&&(e="-"+e),e},t.prototype.getNumberRegex=function(e,t){var n=this.props,r=n.format,i=n.decimalScale,o=n.customNumerals,l=this.getSeparators().decimalSeparator;return new RegExp("[0-9"+(o?o.join(""):"")+"]"+(!l||0===i||t||r?"":"|"+s(l)),e?"g":void 0)},t.prototype.getSeparators=function(){var e=this.props.decimalSeparator,t=this.props,n=t.thousandSeparator,r=t.allowedDecimalSeparators;return!0===n&&(n=","),r||(r=[e,"."]),{decimalSeparator:e,thousandSeparator:n,allowedDecimalSeparators:r}},t.prototype.getMaskAtIndex=function(e){var t=this.props.mask;return void 0===t&&(t=" "),"string"===typeof t?t:t[e]||" "},t.prototype.getValueObject=function(e,t){var n=parseFloat(t);return{formattedValue:e,value:t,floatValue:isNaN(n)?void 0:n}},t.prototype.validateProps=function(){var e=this.props.mask,t=this.getSeparators(),n=t.decimalSeparator,r=t.thousandSeparator;if(n===r)throw new Error("\n Decimal separator can't be same as thousand separator.\n thousandSeparator: "+r+' (thousandSeparator = {true} is same as thousandSeparator = ",")\n decimalSeparator: '+n+" (default value for decimalSeparator is .)\n ");if(e&&("string"===e?e:e.toString()).match(/\d/g))throw new Error("\n Mask "+e+" should not contain numeric character;\n ")},t.prototype.setPatchedCaretPosition=function(e,t,n){h(e,t),this.caretPositionTimeout=setTimeout((function(){e.value===n&&h(e,t)}),0)},t.prototype.correctCaretPosition=function(e,t,n){var r=this.props,i=r.prefix,o=r.suffix,a=r.format;if(""===e)return 0;if(t=f(t,0,e.length),!a){var s="-"===e[0];return f(t,i.length+(s?1:0),e.length-o.length)}if("function"===typeof a)return t;if("#"===a[t]&&l(e[t]))return t;if("#"===a[t-1]&&l(e[t-1]))return t;var u=a.indexOf("#");t=f(t,u,a.lastIndexOf("#")+1);for(var c=a.substring(t,a.length).indexOf("#"),d=t,h=t+(-1===c?0:c);d>u&&("#"!==a[d]||!l(e[d]));)d-=1;return!l(e[h])||"left"===n&&t!==u||t-d<h-t?l(e[d])?d+1:d:h},t.prototype.getCaretPosition=function(e,t,n){var r,i,o=this.props.format,l=this.state.value,a=this.getNumberRegex(!0),s=(e.match(a)||[]).join(""),u=(t.match(a)||[]).join("");for(r=0,i=0;i<n;i++){var c=e[i]||"",d=t[r]||"";if((c.match(a)||c===d)&&("0"!==c||!d.match(a)||"0"===d||s.length===u.length)){for(;c!==t[r]&&r<t.length;)r++;r++}}return"string"!==typeof o||l||(r=t.length),r=this.correctCaretPosition(t,r)},t.prototype.removePrefixAndSuffix=function(e){var t=this.props,n=t.format,r=t.prefix,i=t.suffix;if(!n&&e){var o="-"===e[0];o&&(e=e.substring(1,e.length));var l=(e=r&&0===e.indexOf(r)?e.substring(r.length,e.length):e).lastIndexOf(i);e=i&&-1!==l&&l===e.length-i.length?e.substring(0,l):e,o&&(e="-"+e)}return e},t.prototype.removePatternFormatting=function(e){for(var t=this.props.format.split("#").filter((function(e){return""!==e})),n=0,r="",i=0,o=t.length;i<=o;i++){var l=t[i]||"",a=i===o?e.length:e.indexOf(l,n);if(-1===a){r=e;break}r+=e.substring(n,a),n=a+l.length}return(r.match(this.getNumberRegex(!0))||[]).join("")},t.prototype.removeFormatting=function(e){var t=this.props,n=t.format,r=t.removeFormatting;return e?(n?e="string"===typeof n?this.removePatternFormatting(e):"function"===typeof r?r(e):(e.match(this.getNumberRegex(!0))||[]).join(""):(e=this.removePrefixAndSuffix(e),e=this.getFloatString(e)),e):e},t.prototype.formatWithPattern=function(e){for(var t=this.props.format,n=0,r=t.split(""),i=0,o=t.length;i<o;i++)"#"===t[i]&&(r[i]=e[n]||this.getMaskAtIndex(n),n+=1);return r.join("")},t.prototype.formatAsNumber=function(e){var t=this.props,n=t.decimalScale,r=t.fixedDecimalScale,i=t.prefix,o=t.suffix,l=t.allowNegative,a=t.thousandsGroupStyle,s=this.getSeparators(),d=s.thousandSeparator,h=s.decimalSeparator,f=-1!==e.indexOf(".")||n&&r,p=u(e,l),g=p.beforeDecimal,v=p.afterDecimal,m=p.addNegation;return void 0!==n&&(v=c(v,n,r)),d&&(g=function(e,t,n){var r=function(e){switch(e){case"lakh":return/(\d+?)(?=(\d\d)+(\d)(?!\d))(\.\d+)?/g;case"wan":return/(\d)(?=(\d{4})+(?!\d))/g;case"thousand":default:return/(\d)(?=(\d{3})+(?!\d))/g}}(n),i=e.search(/[1-9]/);return i=-1===i?e.length:i,e.substring(0,i)+e.substring(i,e.length).replace(r,"$1"+t)}(g,d,a)),i&&(g=i+g),o&&(v+=o),m&&(g="-"+g),e=g+(f&&h||"")+v},t.prototype.formatNumString=function(e){void 0===e&&(e="");var t=this.props,n=t.format,r=t.allowEmptyFormatting,i=t.customNumerals,o=e;if(i&&10===i.length){var l=new RegExp("["+i.join("")+"]","g");o=e.replace(l,(function(e){return i.indexOf(e).toString()}))}return o=""!==e||r?"-"!==e||n?"string"===typeof n?this.formatWithPattern(o):"function"===typeof n?n(o):this.formatAsNumber(o):"-":""},t.prototype.formatValueProp=function(e){var t=this.props,n=t.format,r=t.decimalScale,i=t.fixedDecimalScale,o=t.allowEmptyFormatting,l=this.props,s=l.value,h=l.isNumericString,f=!(s=a(s)?e:s)&&0!==s;return f&&o&&(s=""),f&&!o?"":("number"===typeof s&&(s=function(e){var t="-"===(e+="")[0]?"-":"";t&&(e=e.substring(1));var n=e.split(/[eE]/g),r=n[0],i=n[1];if(!(i=Number(i)))return t+r;var o=1+i,l=(r=r.replace(".","")).length;return o<0?r="0."+d("0",Math.abs(o))+r:o>=l?r+=d("0",o-l):r=(r.substring(0,o)||"0")+"."+r.substring(o),t+r}(s),h=!0),"Infinity"===s&&h&&(s=""),h&&!n&&"number"===typeof r&&(s=function(e,t,n){if(-1!==["","-"].indexOf(e))return e;var r=-1!==e.indexOf(".")&&t,i=u(e),o=i.beforeDecimal,l=i.afterDecimal,a=i.hasNagation,s=parseFloat("0."+(l||"0")),d=(l.length<=t?"0."+l:s.toFixed(t)).split(".");return(a?"-":"")+o.split("").reverse().reduce((function(e,t,n){return e.length>n?(Number(e[0])+Number(t)).toString()+e.substring(1,e.length):t+e}),d[0])+(r?".":"")+c(d[1]||"",Math.min(t,l.length),n)}(s,r,i)),h?this.formatNumString(s):this.formatInput(s))},t.prototype.formatNegation=function(e){void 0===e&&(e="");var t=this.props.allowNegative,n=new RegExp("(-)"),r=new RegExp("(-)(.)*(-)"),i=n.test(e),o=r.test(e);return e=e.replace(/-/g,""),i&&!o&&t&&(e="-"+e),e},t.prototype.formatInput=function(e){return void 0===e&&(e=""),this.props.format||(e=this.removePrefixAndSuffix(e),e=this.formatNegation(e)),e=this.removeFormatting(e),this.formatNumString(e)},t.prototype.isCharacterAFormat=function(e,t){var n=this.props,r=n.format,i=n.prefix,o=n.suffix,l=n.decimalScale,a=n.fixedDecimalScale,s=this.getSeparators().decimalSeparator;return"string"===typeof r&&"#"!==r[e]||!(r||!(e<i.length||e>=t.length-o.length||l&&a&&t[e]===s))},t.prototype.correctInputValue=function(e,t,n){var r=this,i=this.props,o=i.format,l=i.allowNegative,a=i.prefix,s=i.suffix,c=i.decimalScale,d=this.getSeparators(),h=d.allowedDecimalSeparators,f=d.decimalSeparator,p=this.state.numAsString||"",g=this.selectionBeforeInput,v=g.selectionStart,m=g.selectionEnd,y=function(e,t){for(var n=0,r=0,i=e.length,o=t.length;e[n]===t[n]&&n<i;)n++;for(;e[i-1-r]===t[o-1-r]&&o-r>n&&i-r>n;)r++;return{start:n,end:i-r}}(t,n),w=y.start,b=y.end;if(!o&&w===b&&-1!==h.indexOf(n[v])){var D=0===c?"":f;return n.substr(0,v)+D+n.substr(v+1,n.length)}var x=o?0:a.length,C=t.length-(o?0:s.length);if(n.length>t.length||!n.length||w===b||0===v&&m===t.length||0===w&&b===t.length||v===x&&m===C)return n;var k=t.substr(w,b-w);if(!![].concat(k).find((function(e,n){return r.isCharacterAFormat(n+w,t)}))){var E=t.substr(w),S={},F=[];[].concat(E).forEach((function(e,n){r.isCharacterAFormat(n+w,t)?S[n]=e:n>k.length-1&&F.push(e)})),Object.keys(S).forEach((function(e){F.length>e?F.splice(e,0,S[e]):F.push(S[e])})),n=t.substr(0,w)+F.join("")}if(!o){var A=this.removeFormatting(n),M=u(A,l),R=M.beforeDecimal,T=M.afterDecimal,I=M.addNegation,B=e<n.indexOf(f)+1;if(A.length<p.length&&B&&""===R&&!parseFloat(T))return I?"-":""}return n},t.prototype.updateValue=function(e){var t=e.formattedValue,n=e.input,r=e.setCaretPosition;void 0===r&&(r=!0);var i=e.source,o=e.event,l=e.numAsString,a=e.caretPos,s=this.props.onValueChange,u=this.state.value;if(n){if(void 0===a&&r){var c=e.inputValue||n.value,d=p(n);n.value=t,a=this.getCaretPosition(c,t,d)}n.value=t,r&&this.setPatchedCaretPosition(n,a,t)}void 0===l&&(l=this.removeFormatting(t)),t!==u&&(this.setState({value:t,numAsString:l}),s(this.getValueObject(t,l),{event:o,source:i}))},t.prototype.onChange=function(e){var t=e.target,n=t.value,r=this.state,i=this.props,o=i.isAllowed,l=r.value||"",a=p(t);n=this.correctInputValue(a,l,n);var s=this.formatInput(n)||"",u=this.removeFormatting(s),c=o(this.getValueObject(s,u));c||(s=l),this.updateValue({formattedValue:s,numAsString:u,inputValue:n,input:t,event:e,source:"event"}),c&&i.onChange(e)},t.prototype.onBlur=function(e){var t=this.props,n=this.state,r=t.format,i=t.onBlur,o=t.allowLeadingZeros,l=n.numAsString,a=n.value;if(this.focusedElm=null,clearTimeout(this.focusTimeout),clearTimeout(this.caretPositionTimeout),!r){isNaN(parseFloat(l))&&(l=""),o||(l=function(e){if(!e)return e;var t="-"===e[0];t&&(e=e.substring(1,e.length));var n=e.split("."),r=n[0].replace(/^0+/,"")||"0",i=n[1]||"";return(t?"-":"")+r+(i?"."+i:"")}(l));var s=this.formatNumString(l);if(s!==a)return this.updateValue({formattedValue:s,numAsString:l,input:e.target,setCaretPosition:!1,event:e,source:"event"}),void i(e)}i(e)},t.prototype.onKeyDown=function(e){var t,n=e.target,r=e.key,i=n.selectionStart,o=n.selectionEnd,l=n.value;void 0===l&&(l="");var a=this.props,s=a.decimalScale,u=a.fixedDecimalScale,c=a.prefix,d=a.suffix,h=a.format,f=a.onKeyDown,p=void 0!==s&&u,g=this.getNumberRegex(!1,p),v=new RegExp("-"),m="string"===typeof h;if(this.selectionBeforeInput={selectionStart:i,selectionEnd:o},"ArrowLeft"===r||"Backspace"===r?t=i-1:"ArrowRight"===r?t=i+1:"Delete"===r&&(t=i),void 0!==t&&i===o){var y=t,w=m?h.indexOf("#"):c.length,b=m?h.lastIndexOf("#")+1:l.length-d.length;if("ArrowLeft"===r||"ArrowRight"===r){var D="ArrowLeft"===r?"left":"right";y=this.correctCaretPosition(l,t,D)}else if("Delete"!==r||g.test(l[t])||v.test(l[t])){if("Backspace"===r&&!g.test(l[t]))if(i<=w+1&&"-"===l[0]&&"undefined"===typeof h){var x=l.substring(1);this.updateValue({formattedValue:x,caretPos:y,input:n,event:e,source:"event"})}else if(!v.test(l[t])){for(;!g.test(l[y-1])&&y>w;)y--;y=this.correctCaretPosition(l,y,"left")}}else for(;!g.test(l[y])&&y<b;)y++;(y!==t||t<w||t>b)&&(e.preventDefault(),this.setPatchedCaretPosition(n,y,l)),e.isUnitTestRun&&this.setPatchedCaretPosition(n,y,l),f(e)}else f(e)},t.prototype.onMouseUp=function(e){var t=e.target,n=t.selectionStart,r=t.selectionEnd,i=t.value;if(void 0===i&&(i=""),n===r){var o=this.correctCaretPosition(i,n);o!==n&&this.setPatchedCaretPosition(t,o,i)}this.props.onMouseUp(e)},t.prototype.onFocus=function(e){var t=this;e.persist(),this.focusedElm=e.target,this.focusTimeout=setTimeout((function(){var n=e.target,r=n.selectionStart,i=n.selectionEnd,o=n.value;void 0===o&&(o="");var l=t.correctCaretPosition(o,r);l===r||0===r&&i===o.length||t.setPatchedCaretPosition(n,l,o),t.props.onFocus(e)}),0)},t.prototype.render=function(){var e=this.props,t=e.type,n=e.displayType,r=e.customInput,o=e.renderText,l=e.getInputRef,a=e.format,s=(e.thousandSeparator,e.decimalSeparator,e.allowedDecimalSeparators,e.thousandsGroupStyle,e.decimalScale,e.fixedDecimalScale,e.prefix,e.suffix,e.removeFormatting,e.mask,e.defaultValue,e.isNumericString,e.allowNegative,e.allowEmptyFormatting,e.allowLeadingZeros,e.onValueChange,e.isAllowed,e.customNumerals,e.onChange,e.onKeyDown,e.onMouseUp,e.onFocus,e.onBlur,e.value,function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&-1===t.indexOf(r)&&(n[r]=e[r]);return n}(e,["type","displayType","customInput","renderText","getInputRef","format","thousandSeparator","decimalSeparator","allowedDecimalSeparators","thousandsGroupStyle","decimalScale","fixedDecimalScale","prefix","suffix","removeFormatting","mask","defaultValue","isNumericString","allowNegative","allowEmptyFormatting","allowLeadingZeros","onValueChange","isAllowed","customNumerals","onChange","onKeyDown","onMouseUp","onFocus","onBlur","value"])),u=this.state,c=u.value,d=u.mounted&&function(e){return e||"undefined"!==typeof navigator&&!(navigator.platform&&/iPhone|iPod/.test(navigator.platform))}(a)?"numeric":void 0,h=Object.assign({inputMode:d},s,{type:t,value:c,onChange:this.onChange,onKeyDown:this.onKeyDown,onMouseUp:this.onMouseUp,onFocus:this.onFocus,onBlur:this.onBlur});if("text"===n)return o?o(c,s)||null:i.a.createElement("span",Object.assign({},s,{ref:l}),c);if(r){var f=r;return i.a.createElement(f,Object.assign({},h,{ref:l}))}return i.a.createElement("input",Object.assign({},h,{ref:l}))},t}(i.a.Component);v.defaultProps=g;var m=v,y=n(1255),w=n.n(y),b=n(1512),D=n.n(b),x=n(1516),C=n.n(x),k=n(1213),E=n.n(k),S=n(1329),F=n.n(S),A=n(55),M=n(1520),R=n.n(M),T=new Map,I=new Map,B=new Map;function O(e,t,n,r){var i,o;let l=I.get(n);if(r&&void 0!==l&&l.count>2e4){let r=B.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),B.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,u={};for(let d of e)s+=null!=(o=n.get(d))?o:i,u[d]=(null!=(l=u[d])?l:0)+1;let c=t-s;for(let d of Object.keys(u)){let e=u[d],t=null!=(a=n.get(d))?a:i,o=t+c*(t*e/s)*r/e;n.set(d,o)}}(t,o.width,r,Math.max(.05,1-l.count/2e5),l.size),I.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)I.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;I.set(n,{count:l.count+t.length,size:i})}return a.width}function P(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),u=O(e,t.substring(0,s),r,l),c=null==a?void 0:a(t);if(u!==n)if(u<n){for(;u<n;)s++,u=O(e,t.substring(0,s),r,l);s--}else for(;u>n;){let n=void 0!==c?0:t.lastIndexOf(" ",s-1);n>0?s=n:s--,u=O(e,t.substring(0,s),r,l)}if(" "!==t[s]){let e=0;if(void 0===c)e=t.lastIndexOf(" ",s);else{console.log(t,c);for(let t of c){if(t>s)break;e=t}}e>0&&(s=e)}return s}var H,z=n(1522),_=n(1532),L=n(1533),$=n.n(L),N=n(1534),j=n.n(N),W=Object.defineProperty,K=Object.getOwnPropertyNames,U=(e,t)=>function(){return e&&(t=(0,e[K(e)[0]])(e=0)),t};function V(e){var t={};return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}var X,Y,G,q,Z,Q,J,ee,te,ne=U({"../../node_modules/@emotion/memoize/dist/memoize.browser.esm.js"(){H=V}}),re=U({"../../node_modules/@emotion/is-prop-valid/dist/is-prop-valid.browser.esm.js"(){ne(),X=/^((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)-.*))$/,Y=H((function(e){return X.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91})),G=Y}}),ie=U({"../../node_modules/@linaria/core/esm/cx.js"(){q=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(" ")}}}),oe=U({"../../node_modules/@linaria/core/esm/index.js"(){ie()}});function le(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,r)=>{const{as:o=e,class:l}=n,a=function(e,t,n){const r=J(t,n);return"string"!==typeof e||-1!==e.indexOf("-")||Z(e[0])||Object.keys(r).forEach((e=>{G(e)||delete r[e]})),r}(o,n,["as","class"]);a.ref=r,a.className=t.atomic?q(t.class,a.className||l):q(a.className||l,t.class);const{vars:s}=t;if(s){const e={};for(const o in s){const r=s[o],i=r[0],l=r[1]||"",a="function"===typeof i?i(n):i;ee(a,t.name),e[`--${o}`]=`${a}${l}`}const r=a.style||{},i=Object.keys(r);i.length>0&&i.forEach((t=>{e[t]=r[t]})),a.style=e}return e.__linaria&&e!==o?(a.as=o,i.a.createElement(e,a)):i.a.createElement(o,a)},r=i.a.forwardRef?i.a.forwardRef(n):e=>{const t=J(e,["innerRef"]);return n(t,e.innerRef)};return r.displayName=t.name,r.__linaria={className:t.class,extends:e},r}}var ae,se,ue=U({"../../node_modules/@linaria/react/esm/styled.js"(){re(),oe(),Z=e=>e.toUpperCase()===e,Q=e=>t=>-1===e.indexOf(t),J=(e,t)=>{const n={};return Object.keys(e).filter(Q(t)).forEach((t=>{n[t]=e[t]})),n},ee=(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.`)}},te=new Proxy(le,{get:(e,t)=>e(t)})}}),ce=U({"../../node_modules/@linaria/react/esm/index.js"(){ue()}}),de=U({"linaria:number-overlay-editor-style_1i1z3n.linaria.css"(){}}),he=U({"src/data-grid-overlay-editor/private/number-overlay-editor-style.tsx"(){de(),ce(),ae=te("div")({name:"NumberOverlayEditorStyle",class:"n1czszh3"})}}),fe={};function pe(){var e,t,n;const r=null==(n=null==(t=null==(e=Intl.NumberFormat())?void 0:e.formatToParts(1.1))?void 0:t.find((e=>"decimal"===e.type)))?void 0:n.value;return null!=r?r:"."}((e,t)=>{for(var n in t)W(e,n,{get:t[n],enumerable:!0})})(fe,{default:()=>se});var ge=U({"src/data-grid-overlay-editor/private/number-overlay-editor.tsx"(){he(),se=e=>{const{value:t,onChange:n,onKeyDown:i,disabled:o,highlight:l,validatedSelection:a}=e,s=r.useRef();return r.useLayoutEffect((()=>{var e;if(void 0!==a){const t="number"===typeof a?[a,null]:a;null==(e=s.current)||e.setSelectionRange(t[0],t[1])}}),[a]),r.createElement(ae,null,r.createElement(m,{autoFocus:!0,getInputRef:s,className:"gdg-input",onFocus:e=>e.target.setSelectionRange(l?0:e.target.value.length,e.target.value.length),disabled:!0===o,thousandSeparator:"."===pe()?",":".",decimalSeparator:pe(),value:Object.is(t,-0)?"-":null!=t?t:"",onValueChange:n,onKeyDown:i}))}}});function ve(e="This should not happen"){throw new Error(e)}function me(e,t="Assertion failed"){if(!e)return ve(t)}function ye(e){return ve("Hell froze over")}function we(e,t){try{return e()}catch(n){return t}}var be=Object.prototype.hasOwnProperty;function De(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--&&De(e[r],t[r]););return-1===r}if(!n||"object"===typeof e){for(n in r=0,e){if(be.call(e,n)&&++r&&!be.call(t,n))return!1;if(!(n in t)||!De(e[n],t[n]))return!1}return Object.keys(t).length===r}}return e!==e&&t!==t}var xe=class extends r.PureComponent{constructor(){super(...arguments),this.wrapperRef=r.createRef(),this.clickOutside=e=>{if(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("mousedown",this.clickOutside,!0),document.addEventListener("contextmenu",this.clickOutside,!0)}componentWillUnmount(){document.removeEventListener("mousedown",this.clickOutside),document.removeEventListener("contextmenu",this.clickOutside)}render(){const{onClickOutside:e,...t}=this.props;return r.createElement("div",{...t,ref:this.wrapperRef},this.props.children)}};function Ce(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-font-family":e.fontFamily,"--gdg-editor-font-size":e.editorFontSize}}var ke={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,headerFontStyle:"600 13px",baseFontStyle:"13px",fontFamily:"Inter, Roboto, -apple-system, BlinkMacSystemFont, avenir next, avenir, segoe ui, helvetica neue, helvetica, Ubuntu, noto, arial, sans-serif",editorFontSize:"13px",lineHeight:1.4};var Ee=i.a.createContext(ke);var Se,Fe,Ae,Me,Re=null,Te=void 0,Ie="header",Be="group-header",Oe="out-of-bounds";(Fe=Se||(Se={})).Uri="uri",Fe.Text="text",Fe.Image="image",Fe.RowID="row-id",Fe.Number="number",Fe.Bubble="bubble",Fe.Boolean="boolean",Fe.Loading="loading",Fe.Markdown="markdown",Fe.Drilldown="drilldown",Fe.Protected="protected",Fe.Custom="custom",(Me=Ae||(Ae={})).HeaderRowID="headerRowID",Me.HeaderCode="headerCode",Me.HeaderNumber="headerNumber",Me.HeaderString="headerString",Me.HeaderBoolean="headerBoolean",Me.HeaderAudioUri="headerAudioUri",Me.HeaderVideoUri="headerVideoUri",Me.HeaderEmoji="headerEmoji",Me.HeaderImage="headerImage",Me.HeaderUri="headerUri",Me.HeaderPhone="headerPhone",Me.HeaderMarkdown="headerMarkdown",Me.HeaderDate="headerDate",Me.HeaderTime="headerTime",Me.HeaderEmail="headerEmail",Me.HeaderReference="headerReference",Me.HeaderIfThenElse="headerIfThenElse",Me.HeaderSingleValue="headerSingleValue",Me.HeaderLookup="headerLookup",Me.HeaderTextTemplate="headerTextTemplate",Me.HeaderMath="headerMath",Me.HeaderRollup="headerRollup",Me.HeaderJoinStrings="headerJoinStrings",Me.HeaderSplitString="headerSplitString",Me.HeaderGeoDistance="headerGeoDistance",Me.HeaderArray="headerArray",Me.RowOwnerOverlay="rowOwnerOverlay",Me.ProtectedColumnOverlay="protectedColumnOverlay";var Pe,He,ze,_e="___gdg_header_cell_",Le="___gdg_header_cell_checked",$e="___gdg_header_cell_unchecked";function Ne(e){return"width"in e&&"number"===typeof e.width}async function je(e){return"object"===typeof e?e:await e()}function We(e){return e.kind!==Se.Loading&&e.kind!==Se.Bubble&&e.kind!==Se.RowID&&e.kind!==Se.Protected&&e.kind!==Se.Drilldown}function Ke(e){return e.kind===Pe.Marker||e.kind===Pe.NewRow}function Ue(e){return!(!We(e)||e.kind===Se.Image)&&(e.kind===Se.Text||e.kind===Se.Number||e.kind===Se.Markdown||e.kind===Se.Uri||e.kind===Se.Custom||e.kind===Se.Boolean?!0!==e.readonly:void ye())}function Ve(e){return R()(e,"editor")}function Xe(e){var t;return!(null!=(t=e.readonly)&&t)}(He=Pe||(Pe={})).NewRow="new-row",He.Marker="marker";var Ye=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 Ye(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 Ye(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 Ye(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}},Ge=Ye;function qe(e,t,n,i,o=!1){const l=r.useRef();l.current=t,r.useEffect((()=>{if(null===n||void 0===n.addEventListener)return;const t=n,r=e=>{var n;null==(n=l.current)||n.call(t,e)};return t.addEventListener(e,r,{passive:i,capture:o}),()=>{t.removeEventListener(e,r,{capture:o})}}),[e,n,i,o])}function Ze(e,t){return void 0===e?void 0:t}Ge.empty=()=>null!=ze?ze:ze=new Ye([]),Ge.fromSingleSelection=e=>Ye.empty().add(e);var Qe=Math.PI;function Je(e){return e*Qe/180}var et=e=>{var t;const n=null!=(t=e.fgColor)?t:"currentColor";return r.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r.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"}),r.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"}))},tt=e=>{var t;const n=null!=(t=e.fgColor)?t:"currentColor";return r.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r.createElement("path",{d:"M19 6L10.3802 17L5.34071 11.8758",vectorEffect:"non-scaling-stroke",stroke:n,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}))};var nt="A-Za-z\xc0-\xd6\xd8-\xf6\xf8-\u02b8\u0300-\u0590\u0800-\u1fff\u200e\u2c00-\ufb1c\ufe00-\ufe6f\ufefd-\uffff",rt=new RegExp("^[^"+nt+"]*["+"\u0591-\u07ff\ufb1d-\ufdfd\ufe70-\ufefc]"),it=new RegExp("^[^\u0591-\u07ff\ufb1d-\ufdfd\ufe70-\ufefc]*["+nt+"]");var ot=void 0;function lt(e,t){return(null!=e?e:"")===(null!=t?t:"")}function at(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[u,c]=t.span;return u>=r&&u<=i||c>=r&&u<=i||u<r&&c>i}function st(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 ut(e,t){let n=0;const r=st(e,t);for(let i=0;i<r.length;i++){const e=r[i];if(!e.sticky)break;n+=e.width}return n}function ct(e,t,n,r,i){const o=st(e,r),l=[];for(const u of o){if(!u.sticky)break;l.push(u)}if(l.length>0)for(const u of l)n-=u.width;let a=t,s=null!=i?i:0;for(;s<=n&&a<o.length;)s+=o[a].width,a++;for(let u=t;u<a;u++){const e=o[u];e.sticky||l.push(e)}return l}var dt=0,ht={},ft="undefined"===typeof window;function pt(e,t,n){const r=function(e,t,n,r){return`${e}_${null!=r?r:t.font}_${n}`}(e,t,"middle",n);let i=ht[r];return void 0===i&&(i=t.measureText(e),ht[r]=i,dt++),dt>1e4&&(ht={},dt=0),i}function gt(e,t){return"string"!==typeof t&&(t=`${t.baseFontStyle} ${t.fontFamily}`),function(e,t){for(const i of mt)if(i.key===t)return i.val;const n=vt(e,"alphabetic"),r=-(vt(e,"middle").actualBoundingBoxDescent-n.actualBoundingBoxDescent)+n.actualBoundingBoxAscent/2;return mt.push({key:t,val:r}),r}(e,t)}function vt(e,t){e.save(),e.textBaseline=t;const n=e.measureText("ABCDEFGHIJKLMNOPQRSTUVWXYZ");return e.restore(),n}!async function(){var e;ft||void 0===(null==(e=null==document?void 0:document.fonts)?void 0:e.ready)||(await document.fonts.ready,dt=0,ht={},T.clear(),B.clear(),I.clear())}();var mt=[];function yt(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 wt(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 bt(e,t,n,r,i){const{ctx:o,x:l,y:a,w:s,h:u,theme:c}=e;if(!(r=null!=r&&r)){t.includes("\n")&&(t=t.split(/\r?\n/)[0]);const e=s/4;t.length>e&&(t=t.slice(0,e))}const d=gt(o,c),h="rtl"===(f=t,rt.test(f)?"rtl":it.test(f)?"ltr":"neutral");var f;if(void 0===n&&h&&(n="right"),h&&(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=`${c.fontFamily} ${c.baseFontStyle}`,r=function(e,t,n,r,i,o){let l=`${t}_${n}_${r}px`,a=T.get(l);if(void 0!==a)return a;if(r<=0)return[];let s=[],u=t.split("\n"),c=I.get(n),d=void 0===c?t.length:r/c.size*1.5,h=i&&void 0!==c&&c.count>2e4;for(let f of u){let t=O(e,f.substring(0,d),n,h),i=Math.min(f.length,d);if(t<=r)s.push(f);else{for(;t>r;){let l=P(e,f,r,n,t,i,h,o),a=f.substring(0,l);f=f.substring(a.length),s.push(a),t=O(e,f.substring(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())),T.set(l,s),T.size>500&&T.delete(T.keys().next().value),s}(o,t,e,s-2*c.cellHorizontalPadding,null!=i&&i),h=pt("ABCi09jgqpy",o,e),f=h.actualBoundingBoxAscent+h.actualBoundingBoxDescent,p=c.lineHeight*f,g=f+p*(r.length-1),v=g+c.cellVerticalPadding>u;v&&(o.save(),o.rect(l,a,s,u),o.clip());const m=a+u/2-g/2;let y=Math.max(a+c.cellVerticalPadding,m);for(const t of r)if(wt(o,t,l,y,s,f,d,c,n),y+=p,y>a+u)break;v&&o.restore()}else wt(o,t,l,a,s,u,d,c,n);e&&(o.textAlign="start"),h&&(o.direction="inherit")}}function Dt(e,t,n,r,i,o,l,a,s=-20,u=-20){const c=r+o/2,d=i+l/2,h=Math.abs(s-o/2)<10&&Math.abs(u-l/2)<10;switch(n){case!0:e.beginPath(),xt(e,c-9,d-9,18,18,4),e.fillStyle=a?t.accentColor:t.textMedium,e.fill(),e.beginPath(),e.moveTo(c-8+3.65005,d-8+7.84995),e.lineTo(c-8+6.37587,d-8+10.7304),e.lineTo(c-8+11.9999,d-8+4.74995),e.strokeStyle=t.bgCell,e.lineJoin="round",e.lineCap="round",e.lineWidth=1.9,e.stroke();break;case Re:case!1:e.beginPath(),xt(e,c-8.5,d-8.5,17,17,4),e.lineWidth=1,e.strokeStyle=h?t.textDark:t.textMedium,e.stroke();break;case Te:e.beginPath(),xt(e,c-8.5,d-8.5,17,17,4),e.fillStyle=h?t.textMedium:t.textLight,e.fill(),e.beginPath(),e.moveTo(c-4,d),e.lineTo(c+4,d),e.strokeStyle=t.bgCell,e.lineCap="round",e.lineWidth=1.9,e.stroke();break;default:ye()}}function xt(e,t,n,r,i,o){"number"===typeof o&&(o={tl:o,tr:o,br:o,bl:o}),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 Ct={};function kt(e,t){const{x:n,y:r,w:i,h:o,theme:l,ctx:a,imageLoader:s,col:u,row:c}=e;let d=n+l.cellHorizontalPadding;const h=function(e,t){const n=Math.ceil(window.devicePixelRatio),r=34*n,i=r+4*n,o=r/2,l=`${e},${t},${n}`;if(void 0!==Ct[l])return{el:Ct[l],height:r,width:i,middleWidth:4*n,sideWidth:o};const a=document.createElement("canvas"),s=a.getContext("2d");return null===s?null:(a.width=i,a.height=r,s.scale(n,n),Ct[l]=a,s.beginPath(),xt(s,5,5,28,24,6),s.shadowColor="rgba(24, 25, 34, 0.4)",s.shadowBlur=1,s.fillStyle=e,s.fill(),s.shadowColor="rgba(24, 25, 34, 0.3)",s.shadowOffsetY=1,s.shadowBlur=5,s.fillStyle=e,s.fill(),s.shadowOffsetY=0,s.shadowBlur=0,s.shadowBlur=0,s.beginPath(),xt(s,5.5,5.5,28,24,6),s.strokeStyle=t,s.lineWidth=1,s.stroke(),{el:a,height:r,width:i,sideWidth:o,middleWidth:4*n})}(l.bgCell,l.drilldownBorder),f=[];for(const p of t){if(d>n+i)break;const e=pt(p.text,a,`${l.baseFontStyle} ${l.fontFamily}`).width;let t=0;if(void 0!==p.img){void 0!==s.loadOrGetImage(p.img,u,c)&&(t=20)}const r=e+t+16;f.push({x:d,width:r}),d+=r+4}if(null!==h){const{el:e,height:t,middleWidth:n,sideWidth:i,width:l}=h;for(const s of f){const u=Math.floor(s.x),c=Math.floor(s.width);a.imageSmoothingEnabled=!1;const d=Math.min(17,c/2+5);a.drawImage(e,0,0,i,t,u-5,r+o/2-17,d,34),s.width>24&&a.drawImage(e,i,0,n,t,u+12,r+o/2-17,c-24,34),a.drawImage(e,l-i,0,i,t,u+c-(d-5),r+o/2-17,d,34),a.imageSmoothingEnabled=!0}}a.beginPath();for(const[p,g]of f.entries()){const e=t[p];let n=g.x+8;if(void 0!==e.img){const t=s.loadOrGetImage(e.img,u,c);if(void 0!==t){const e=16;let i=0,l=0,s=t.width,u=t.height;s>u?(i+=(s-u)/2,s=u):u>s&&(l+=(u-s)/2,u=s),a.beginPath(),xt(a,n,r+o/2-e/2,e,e,3),a.save(),a.clip(),a.drawImage(t,i,l,s,u,n,r+o/2-e/2,e,e),a.restore(),n+=e+4}}a.beginPath(),a.fillStyle=l.textBubble,a.fillText(e.text,n,r+o/2+gt(a,l))}}function Et(e,t,n,r,i,o,l,a,s,u,c,d,h,f,p){const g={x:0,y:o+u,width:0,height:0},v=o-i;if(e>=d){const t=l>e?-1:1,n=ut(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 m=0;m<e;m++)g.x+=f[m].width;if(g.width=f[e].width+1,-1===t)g.y=i,g.height=v;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&&lt(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&&lt(f[l+1].group,r)&&f[l+1].sticky===o;){const e=f[l+1];g.width+=e.width,l++}if(!o){const e=ut(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===c-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}function St(e){return!0!==e}var Ft={getAccessibilityString:e=>{var t,n;return null!=(n=null==(t=e.data)?void 0:t.toString())?n:"false"},kind:Se.Boolean,needsHover:!0,useLabel:!1,needsHoverPosition:!0,measure:()=>50,render:e=>function(e,t,n){if(!n&&t===Re)return;const{ctx:r,hoverAmount:i,theme:o,x:l,y:a,w:s,h:u,highlighted:c,hoverX:d,hoverY:h}=e;let f=n?.65+.35*i:.4;t===Re&&(f*=i),0!==f&&(r.globalAlpha=f,Dt(r,o,t,l,a,s,u,c,d,h),r.globalAlpha=1)}(e,e.cell.data,Xe(e.cell)),onDelete:e=>({...e,data:!1}),onClick:(e,t,n,r)=>{if(Xe(e)&&Math.abs(t-r.width/2)<=10&&Math.abs(n-r.height/2)<=10)return{...e,data:St(e.data)}}};ce();var At=te("div")({name:"BubblesOverlayEditorStyle",class:"b1bqsp5z"}),Mt=e=>{const{bubbles:t,onKeyDown:n}=e;return r.createElement(At,null,t.map(((e,t)=>r.createElement("div",{key:t,className:"boe-bubble"},e))),r.createElement("textarea",{className:"gdg-input",autoFocus:!0,onKeyDown:n}))},Rt={getAccessibilityString:e=>{var t,n;return null!=(n=null==(t=e.data)?void 0:t.toString())?n:""},kind:Se.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,render:e=>function(e,t){const{x:n,y:r,w:i,h:o,theme:l,ctx:a,highlighted:s}=e;let u=n+l.cellHorizontalPadding;const c=[];for(const d of t){if(u>n+i)break;const e=pt(d,a,`${l.baseFontStyle} ${l.fontFamily}`).width;c.push({x:u,width:e}),u+=e+16+4}a.beginPath();for(const d of c)xt(a,d.x,r+(o-20)/2,d.width+16,20,10);a.fillStyle=s?l.bgBubbleSelected:l.bgBubble,a.fill();for(const[d,h]of c.entries())a.beginPath(),a.fillStyle=l.textBubble,a.fillText(t[d],h.x+8,r+o/2+gt(a,l))}(e,e.cell.data),getEditor:()=>e=>{const{onKeyDown:t,value:n}=e;return r.createElement(Mt,{bubbles:n.data,onKeyDown:t})}};ce();var Tt=te("div")({name:"DrilldownOverlayEditorStyle",class:"df2kt4a"}),It=e=>{const{drilldowns:t,onKeyDown:n}=e;return r.createElement(Tt,null,t.map(((e,t)=>r.createElement("div",{key:t,className:"doe-bubble"},void 0!==e.img&&r.createElement("img",{src:e.img}),r.createElement("div",null,e.text)))),r.createElement("textarea",{className:"gdg-input",autoFocus:!0,onKeyDown:n}))},Bt={getAccessibilityString:e=>e.data.map((e=>e.text)).join(", "),kind:Se.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,render:e=>kt(e,e.cell.data),getEditor:()=>e=>{const{onKeyDown:t,value:n}=e;return r.createElement(It,{drilldowns:n.data,onKeyDown:t})}};ce();var Ot=te("div")({name:"ImageOverlayEditorStyle",class:"i1eozt10"}),Pt=e=>{const{urls:t,canWrite:n,onKeyDown:i,onEditClick:o,renderImage:l}=e,a=t.filter((e=>""!==e));if(0===a.length)return null;const s=a.length>1;return r.createElement(Ot,{onKeyDown:i,"data-testid":"GDG-default-image-overlay-editor"},r.createElement(z.Carousel,{showArrows:s,showThumbs:!1,swipeable:s,emulateTouch:s,infiniteLoop:s},a.map((e=>{var t;const n=null!=(t=null==l?void 0:l(e))?t:r.createElement("img",{draggable:!1,src:e});return r.createElement("div",{className:"centering-container",key:e},n)}))),n&&o&&r.createElement("button",{className:"edit-icon",onClick:o},r.createElement(et,null)),r.createElement("textarea",{className:"gdg-input",autoFocus:!0,onKeyDown:i}))},Ht={getAccessibilityString:e=>e.data.join(", "),kind:Se.Image,needsHover:!1,useLabel:!1,needsHoverPosition:!1,render:e=>{var t;return function(e,t){const{x:n,y:r,h:i,col:o,row:l,theme:a,ctx:s,imageLoader:u}=e;let c=n+a.cellHorizontalPadding;for(const d of t){if(0===d.length)continue;const e=u.loadOrGetImage(d,o,l);if(void 0!==e){const t=i-2*a.cellVerticalPadding,n=e.width*(t/e.height);xt(s,c,r+a.cellVerticalPadding,n,t,4),s.save(),s.clip(),s.drawImage(e,c,r+a.cellVerticalPadding,n,t),s.restore(),c+=n+4}}}(e,null!=(t=e.cell.displayData)?t:e.cell.data)},measure:(e,t)=>50*t.data.length,onDelete:e=>({...e,data:[]}),getEditor:()=>e=>{const{onKeyDown:t,value:n,onFinishedEditing:i,imageEditorOverride:o}=e,l=null!=o?o:Pt;return r.createElement(l,{urls:n.data,canWrite:n.allowAdd,onCancel:i,onChange:e=>{i({...n,data:[e]})},onKeyDown:t})}},zt={getAccessibilityString:()=>"",kind:Se.Loading,needsHover:!1,useLabel:!1,needsHoverPosition:!1,measure:()=>120,render:()=>{}};ce();var _t=te("div")({name:"MarkdownContainer",class:"mlbeo71"}),Lt=class extends i.a.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=Object(_.marked)(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.a.createElement(_t,{ref:this.containerRefHook})}};ce();var $t=te("textarea")({name:"InputBox",class:"ijuk0po"}),Nt=te("div")({name:"ShadowBox",class:"saq3p5l"}),jt=te("div")({name:"GrowingEntryStyle",class:"gf8vzix"}),Wt=e=>{const{placeholder:t,value:n,onKeyDown:i,highlight:o,altNewline:l,validatedSelection:a,...s}=e,{onChange:u,className:c}=s,d=r.useRef(null),h=null!=n?n:"";me(void 0!==u,"GrowingEntry must be a controlled input area"),r.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)}),[]),r.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 f=r.useCallback((e=>{"Enter"===e.key&&e.shiftKey&&!0===l||null==i||i(e)}),[l,i]);return r.createElement(jt,{className:"gdg-growing-entry"},r.createElement(Nt,{className:c},h+"\n"),r.createElement($t,{...s,className:(null!=c?c:"")+" gdg-input",ref:d,onKeyDown:f,value:h,placeholder:t,dir:"auto"}))};ce();var Kt=te("div")({name:"MarkdownOverlayEditorStyle",class:"mdwzdl1",vars:{"mdwzdl1-0":[e=>e.targetWidth,"px"]}}),Ut=e=>{const{markdown:t,onChange:n,onKeyDown:i,forceEditMode:o,createNode:l,targetRect:a,readonly:s,onFinish:u,validatedSelection:c}=e,[d,h]=r.useState(""===t||o),f=r.useCallback((()=>{h((e=>!e))}),[]),p=t?"ml-6":"";return d?r.createElement(Kt,{targetWidth:a.width},r.createElement(Wt,{autoFocus:!0,highlight:!1,validatedSelection:c,onKeyDown:e=>{"Enter"!==e.key&&i(e)},value:t,onChange:n}),r.createElement("div",{className:`edit-icon checkmark-hover ${p}`,onClick:()=>u()},r.createElement(tt,null))):r.createElement(Kt,{targetWidth:a.width},r.createElement(Lt,{contents:t,createNode:l}),!s&&r.createElement(r.Fragment,null,r.createElement("div",{className:"spacer"}),r.createElement("div",{className:`edit-icon edit-hover ${p}`,onClick:f},r.createElement(et,null))),r.createElement("textarea",{className:"md-edit-textarea gdg-input",autoFocus:!0,onKeyDown:i}))},Vt={getAccessibilityString:e=>{var t,n;return null!=(n=null==(t=e.data)?void 0:t.toString())?n:""},kind:Se.Markdown,needsHover:!1,needsHoverPosition:!1,renderPrep:yt,measure:(e,t,n)=>{const r=t.data.split("\n")[0];return e.measureText(r).width+2*n.cellHorizontalPadding},render:e=>bt(e,e.cell.data,e.cell.contentAlign),onDelete:e=>({...e,data:""}),getEditor:()=>e=>{const{onChange:t,onKeyDown:n,value:i,target:o,onFinishedEditing:l,markdownDivCreateNode:a,forceEditMode:s,validatedSelection:u}=e;return r.createElement(Ut,{onFinish:l,targetRect:o,readonly:!0===i.readonly,markdown:i.data,validatedSelection:u,onKeyDown:n,onChange:e=>t({...i,data:e.target.value}),forceEditMode:s,createNode:a})}},Xt={getAccessibilityString:e=>e.row.toString(),kind:Pe.Marker,needsHover:!0,needsHoverPosition:!1,renderPrep: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),n.textAlign="center",o},renderDeprep:function(e){const{ctx:t}=e;t.textAlign="start"},measure:()=>44,render:e=>function(e,t,n,r,i){const{ctx:o,x:l,y:a,w:s,h:u,hoverAmount:c,theme:d}=e,h=n?1:c;if("number"!==r&&h>0){o.globalAlpha=h;const e=7*(n?c:1);if(Dt(o,d,n,i?l+e:l,a,i?s-e:s,u,!0),i){o.globalAlpha=c,o.beginPath();for(const e of[3,6])for(const t of[-5,-1,3])o.rect(l+e,a+u/2+t,2,2);o.fillStyle=d.textLight,o.fill(),o.beginPath()}o.globalAlpha=1}if("number"===r||"both"===r&&!n){const e=t.toString(),n=l+s/2;"both"===r&&0!==c&&(o.globalAlpha=1-c),o.fillStyle=d.textLight,o.fillText(e,n,a+u/2+gt(o,`9px ${d.fontFamily}`)),0!==c&&(o.globalAlpha=1)}}(e,e.cell.row,e.cell.checked,e.cell.markerKind,e.cell.drawHandle),onClick:(e,t,n,r)=>{const{width:i,height:o}=r,l=e.drawHandle?7+(i-7)/2:i/2,a=o/2;if(Math.abs(t-l)<=10&&Math.abs(n-a)<=10)return{...e,checked:!e.checked}}},Yt={getAccessibilityString:()=>"",kind:Pe.NewRow,needsHover:!0,needsHoverPosition:!1,measure:()=>200,render:e=>function(e,t,n){const{ctx:r,x:i,y:o,w:l,h:a,hoverAmount:s,theme:u,spriteManager:c}=e;r.beginPath(),r.globalAlpha=s,r.rect(i,o,l,a),r.fillStyle=u.bgHeaderHovered,r.fill(),r.globalAlpha=1,r.beginPath();const d=""!==t;let h=0;if(void 0!==n){const e=8,t=a-e,l=i+e/2,f=o+e/2;c.drawSprite(n,"normal",r,l,f,t,u,d?1:s),h=t}else{h=24;const e=12,t=d?e:s*e,n=d?0:(1-s)*e*.5,l=u.cellHorizontalPadding+4;t>0&&(r.moveTo(i+l+n,o+a/2),r.lineTo(i+l+n+t,o+a/2),r.moveTo(i+l+n+.5*t,o+a/2-.5*t),r.lineTo(i+l+n+.5*t,o+a/2+.5*t),r.lineWidth=2,r.strokeStyle=u.bgIconHeader,r.lineCap="round",r.stroke())}r.fillStyle=u.textMedium,r.fillText(t,h+i+u.cellHorizontalPadding+.5,o+a/2+gt(r,u)),r.beginPath()}(e,e.cell.hint,e.cell.icon)},Gt=r.lazy((async()=>await Promise.resolve().then((()=>(ge(),fe))))),qt={getAccessibilityString:e=>{var t,n;return null!=(n=null==(t=e.data)?void 0:t.toString())?n:""},kind:Se.Number,needsHover:!1,needsHoverPosition:!1,useLabel:!0,renderPrep:yt,render:e=>bt(e,e.cell.displayData,e.cell.contentAlign),measure:(e,t)=>e.measureText(t.displayData).width+16,onDelete:e=>({...e,data:void 0}),getEditor:()=>e=>{const{isHighlighted:t,onChange:n,onKeyDown:i,value:o,validatedSelection:l}=e;return r.createElement(r.Suspense,{fallback:null},r.createElement(Gt,{highlight:t,disabled:!0===o.readonly,value:o.data,onKeyDown:i,validatedSelection:l,onChange:e=>n({...o,data:e.floatValue})}))}},Zt={getAccessibilityString:()=>"",measure:()=>108,kind:Se.Protected,needsHover:!1,needsHoverPosition:!1,render:function(e){const{ctx:t,theme:n,x:r,y:i,h:o}=e;t.beginPath();const l=2.5;let a=r+n.cellHorizontalPadding+l;const s=i+o/2,u=Math.cos(Je(30))*l,c=Math.sin(Je(30))*l;for(let d=0;d<12;d++)t.moveTo(a,s-l),t.lineTo(a,s+l),t.moveTo(a+u,s-c),t.lineTo(a-u,s+c),t.moveTo(a-u,s-c),t.lineTo(a+u,s+c),a+=8;t.lineWidth=1.1,t.lineCap="square",t.strokeStyle=n.textLight,t.stroke()}},Qt={getAccessibilityString:e=>{var t,n;return null!=(n=null==(t=e.data)?void 0:t.toString())?n:""},kind:Se.RowID,needsHover:!1,needsHoverPosition:!1,renderPrep:(e,t)=>yt(e,t,e.theme.textLight),render:e=>bt(e,e.cell.data,e.cell.contentAlign),measure:(e,t)=>e.measureText(t.data).width+16,getEditor:()=>e=>{const{isHighlighted:t,onChange:n,onKeyDown:r,value:o,validatedSelection:l}=e;return i.a.createElement(Wt,{highlight:t,autoFocus:!0!==o.readonly,disabled:!1!==o.readonly,onKeyDown:r,value:o.data,validatedSelection:l,onChange:e=>n({...o,data:e.target.value})})}},Jt={getAccessibilityString:e=>{var t,n;return null!=(n=null==(t=e.data)?void 0:t.toString())?n:""},kind:Se.Text,needsHover:!1,needsHoverPosition:!1,renderPrep:yt,useLabel:!0,render:e=>bt(e,e.cell.displayData,e.cell.contentAlign,e.cell.allowWrapping,e.hyperWrapping),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:""}),getEditor:()=>e=>{const{isHighlighted:t,onChange:n,onKeyDown:i,value:o,validatedSelection:l}=e;return r.createElement(Wt,{highlight:t,autoFocus:!0!==o.readonly,disabled:!0===o.readonly,onKeyDown:i,altNewline:!0,value:o.data,validatedSelection:l,onChange:e=>n({...o,data:e.target.value})})}};ce();var en=te("div")({name:"UriOverlayEditorStyle",class:"uf0sjo8"}),tn=e=>{const{uri:t,onChange:n,onKeyDown:i,forceEditMode:o,readonly:l,validatedSelection:a}=e,[s,u]=r.useState(""===t||o),c=r.useCallback((()=>{u(!0)}),[]);return s?r.createElement(Wt,{validatedSelection:a,highlight:!0,autoFocus:!0,onKeyDown:i,value:t,onChange:n}):r.createElement(en,null,r.createElement("a",{className:"link-area",href:t,target:"_blank",rel:"noopener noreferrer"},t),!l&&r.createElement("div",{className:"edit-icon",onClick:c},r.createElement(et,null)),r.createElement("textarea",{className:"gdg-input",autoFocus:!0,onKeyDown:i}))},nn={getAccessibilityString:e=>{var t,n;return null!=(n=null==(t=e.data)?void 0:t.toString())?n:""},kind:Se.Uri,needsHover:!1,needsHoverPosition:!1,useLabel:!0,renderPrep:yt,render:e=>bt(e,e.cell.data,e.cell.contentAlign),measure:(e,t)=>e.measureText(t.data).width+16,onDelete:e=>({...e,data:""}),getEditor:()=>e=>{const{onChange:t,onKeyDown:n,value:i,forceEditMode:o,validatedSelection:l}=e;return r.createElement(tn,{forceEditMode:o,uri:i.data,validatedSelection:l,readonly:!0===i.readonly,onKeyDown:n,onChange:e=>t({...i,data:e.target.value})})}},rn={[Pe.Marker]:Xt,[Pe.NewRow]:Yt,[Se.Boolean]:Ft,[Se.Bubble]:Rt,[Se.Drilldown]:Bt,[Se.Image]:Ht,[Se.Loading]:zt,[Se.Markdown]:Vt,[Se.Number]:qt,[Se.Protected]:Zt,[Se.RowID]:Qt,[Se.Text]:Jt,[Se.Uri]:nn};ce();var on=te("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 ln(){const[e,t]=function(){const[e,t]=r.useState();return[null!=e?e:void 0,t]}(),[n,i]=r.useState(0),[o,l]=r.useState(!0);r.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]),r.useEffect((()=>{if(o||void 0===e)return;let t;const n=()=>{const{right:r}=e.getBoundingClientRect();i((e=>Math.min(e+window.innerWidth-r-10,0))),t=requestAnimationFrame(n)};return t=requestAnimationFrame(n),()=>{void 0!==t&&cancelAnimationFrame(t)}}),[e,o]);return{ref:t,style:r.useMemo((()=>({transform:`translateX(${n}px)`})),[n])}}var an=e=>{const{target:t,content:n,onFinishEditing:i,forceEditMode:o,initialValue:l,imageEditorOverride:a,markdownDivCreateNode:s,highlight:u,className:c,theme:d,id:h,cell:f,validateCell:p,provideEditor:g}=e,[v,m]=r.useState(o?n:void 0),y=r.useRef(null!=v?v:n);y.current=null!=v?v:n;const[w,b]=r.useState((()=>void 0===p||!(We(n)&&!1===(null==p?void 0:p(f,n,y.current))))),D=r.useCallback(((e,t)=>{i(w?e:void 0,t)}),[w,i]),x=r.useCallback((e=>{if(void 0!==p&&void 0!==e&&We(e)){const t=p(f,e,y.current);!1===t?b(!1):"object"===typeof t?(e=t,b(!0)):b(!0)}m(e)}),[f,p]),C=r.useRef(!1),k=r.useRef(void 0),E=r.useCallback((()=>{D(v,[0,0]),C.current=!0}),[v,D]),S=r.useCallback((e=>{var t;D(e,null!=(t=k.current)?t:[0,0]),C.current=!0}),[D]),F=r.useCallback((async e=>{let t=!1;"Escape"===e.key?(e.stopPropagation(),e.preventDefault(),k.current=[0,0]):"Enter"!==e.key||e.shiftKey?"Tab"===e.key&&(e.stopPropagation(),e.preventDefault(),k.current=[e.shiftKey?-1:1,0],t=!0):(e.stopPropagation(),e.preventDefault(),k.current=[0,1],t=!0),await new Promise((e=>window.setTimeout(e,0))),C.current||void 0===k.current||(D(t?v:void 0,k.current),C.current=!0)}),[D,v]),M=r.useCallback((e=>{"Escape"===e.key?(D(void 0,[0,0]),e.stopPropagation(),e.preventDefault()):"Enter"!==e.key||e.ctrlKey?"Tab"===e.key&&(D(v,[e.shiftKey?-1:1,0]),e.stopPropagation(),e.preventDefault()):(D(v,[0,e.shiftKey?-1:1]),e.stopPropagation(),e.preventDefault())}),[D,v]),R=null!=v?v:n,T=r.useMemo((()=>null==g?void 0:g(n)),[n,g]),[I,B]=r.useMemo((()=>{var e;if(n.kind===Se.Custom)return[];const t=rn[n.kind];return[null==(e=t.getEditor)?void 0:e.call(t,n),t.useLabel]}),[n]),{ref:O,style:P}=ln();let H,z,_=!0,L=!0;if(void 0!==T){_=!0!==T.disablePadding,L=!0!==T.disableStyling;const e=Ve(T);e&&(z=T.styleOverride);const t=e?T.editor:T;H=r.createElement(t,{isHighlighted:u,onChange:x,value:R,initialValue:l,onFinishedEditing:S,validatedSelection:We(R)?R.selectionRange:void 0})}else void 0!==I&&(H=r.createElement(I,{forceEditMode:o,isHighlighted:u,onChange:x,value:R,onFinishedEditing:e=>D(null!=e?e:v,[0,0]),onKeyDown:M,target:t,imageEditorOverride:a,markdownDivCreateNode:s,isValid:w,validatedSelection:We(R)?R.selectionRange:void 0}));z={...z,...P};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=L?"gdg-style":"gdg-unstyle";return w||(N+=" invalid"),_&&(N+=" pad"),Object(A.createPortal)(r.createElement(Ee.Provider,{value:d},r.createElement(xe,{style:Ce(d),className:c,onClickOutside:E},r.createElement(on,{ref:O,id:h,className:N,style:z,as:!0===B?"label":void 0,targetX:t.x,targetY:t.y,targetWidth:t.width,targetHeight:t.height},r.createElement("div",{className:"clip-region",onKeyDown:void 0===T?void 0:F},H)))),$)};ce();var sn=65536,un=[];function cn(e,t){return t*sn+e}function dn(e){return e%sn}function hn(e,t){return(e-t)/sn}function fn(e){const t=dn(e);return[t,hn(e,t)]}var pn=class{constructor(){this.imageLoaded=()=>{},this.loadedLocations=[],this.visibleWindow={x:0,y:0,width:0,height:0},this.freezeCols=0,this.isInWindow=e=>{const t=dn(e),n=hn(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=$()((()=>{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=un.pop())?i:new Image;let a=!1;const s={img:void 0,cells:[cn(t,n)],url:e,cancel:()=>{a||(a=!0,un.length<12?un.unshift(l):o||(l.src=""))}},u=new Promise((e=>l.addEventListener("load",(()=>e(null)))));requestAnimationFrame((async()=>{try{l.src=e,await u,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(fn(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=cn(t,n);return i.cells.includes(e)||i.cells.push(e),i.img}this.loadImage(e,t,n,r)}},gn='<svg width="20" height="20" fill="none" xmlns="http://www.w3.org/2000/svg">',vn=e=>{const t=e.fgColor,n=e.bgColor;return`${gn}\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 `},mn={headerRowID:e=>{const t=e.fgColor,n=e.bgColor;return`\n ${gn}<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`${gn}\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 ${gn}<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`${gn}\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`${gn}\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:vn,headerVideoUri:e=>{const t=e.fgColor,n=e.bgColor;return`${gn}\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 ${gn}\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`${gn}\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:vn,headerPhone:e=>{const t=e.fgColor,n=e.bgColor;return`\n ${gn}\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 ${gn}\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`${gn}\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 ${gn}\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`${gn}\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 ${gn}\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`${gn}\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 ${gn}\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 ${gn}\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`${gn}\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`${gn}\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 ${gn}\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`${gn}\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 ${gn}\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`${gn}\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`${gn}\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`${gn}\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 yn={},wn=null;function bn(e){const t=e.toLowerCase().trim();if(void 0!==yn[t])return yn[t];(wn=wn||function(){const e=document.createElement("div");return e.classList.add("color2k-parser"),e.style.opacity="0",e.style.pointerEvents="none",e.style.position="fixed",document.body.append(e),e}()).style.color="#000",wn.style.color=t;const n=getComputedStyle(wn).color;wn.style.color="#fff",wn.style.color=t;const r=getComputedStyle(wn).color;if(r!==n)throw new Error("Could not parse color");const i=r.replace(/[^\d.,]/g,"").split(",").map(Number.parseFloat);return i.length<4&&i.push(1),yn[t]=i,i}function Dn(e,t){const[n,r,i]=bn(e);return`rgba(${n}, ${r}, ${i}, ${t})`}function xn(e,t){if(void 0===t)return e;const[n,r,i,o]=bn(e);if(1===o)return e;const[l,a,s,u]=bn(t),c=o+u*(1-o);return`rgba(${(o*n+u*l*(1-o))/c}, ${(o*r+u*a*(1-o))/c}, ${(o*i+u*s*(1-o))/c}, ${c})`}var Cn={kind:Se.Loading,allowOverlay:!1};function kn(e,t,n,r,i,o,l,a,s,u,c,d,h,f,p,g,v,m,y){let w,b,D;void 0!==p&&p[0][0]===r&&p[0][1]===t&&(w=p[1][0],b=p[1][1]);const x={ctx:e,theme:u,col:r,row:t,cell:n,x:i,y:o,w:l,h:a,highlighted:s,hoverAmount:f,hoverX:w,hoverY:b,imageLoader:d,spriteManager:h,hyperWrapping:g};let C=!1;return(function(e,t,n,r,i){const{ctx:o,x:l,y:a,w:s,h:u,theme:c}=e;let d=Number.MAX_SAFE_INTEGER;if(void 0!==t&&(d=n-t,d<500)){const e=1-d/500;o.globalAlpha=e,o.fillStyle=c.bgSearchResult,o.fillRect(l,a,s,u),o.globalAlpha=1,void 0!==r&&(r.fillStyle=c.bgSearchResult)}return i(),d<500}(x,n.lastUpdated,v,m,(()=>{var h,p;if(!(!Ke(n)&&!0===(null==c?void 0:c({ctx:e,cell:n,theme:u,rect:{x:i,y:o,width:l,height:a},col:r,row:t,hoverAmount:f,hoverX:w,hoverY:b,highlighted:s,imageLoader:d,requestAnimationFrame:()=>{C=!0}})))&&n.kind!==Se.Custom){const e=rn[n.kind];(null==m?void 0:m.renderer)!==e&&(null==(h=null==m?void 0:m.deprep)||h.call(m,x),m=void 0);const t=null==(p=e.renderPrep)?void 0:p.call(e,x,m);e.render(x),D={deprep:null==t?void 0:t.deprep,fillStyle:null==t?void 0:t.fillStyle,font:null==t?void 0:t.font,renderer:e}}}))||C)&&(null==y||y([r,t])),D}function En(e,t,n,r,i,o,l,a,s,u,c,d,h,f,p,g,v,m=!1){var y,w,b;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 D=null!=(y=v.horizontalBorderColor)?y:v.borderColor,x=v.borderColor;let C=0,k=o,E=0,S=l;if(void 0!==a&&a.length>0){C=Number.MAX_SAFE_INTEGER,E=Number.MAX_SAFE_INTEGER,k=Number.MIN_SAFE_INTEGER,S=Number.MIN_SAFE_INTEGER;for(const e of a)C=Math.min(C,e.x-1),k=Math.max(k,e.x+e.width+1),E=Math.min(E,e.y-1),S=Math.max(S,e.y+e.height+1)}const F=[];e.beginPath(),e.moveTo(C,c+.5),e.lineTo(k,c+.5),e.strokeStyle=v.bgHeader,e.lineWidth=1,e.stroke(),e.beginPath();let A=.5;for(let B=0;B<t.length;B++){const e=t[B];if(0===e.width)continue;A+=e.width;const n=e.sticky?A:A+r;n>=C&&n<=k-1&&(B===t.length-1||f(B+1))&&F.push({x1:n,y1:Math.max(u,E),x2:n,y2:Math.min(l,S),color:x})}const M=d(g-1),R=l-M+.5,T="sticky"===p;if(T&&F.push({x1:C,y1:R,x2:k,y2:R,color:D}),!0!==m){let e=c+.5,t=n,r=!0;const o=T?l-M:l;for(;e+i<=o;){const n=r?e:e+i;if(n>=E&&n<=S-1&&(!T||t!==g-1||Math.abs(n-R)>1)){const e=r||null==h?void 0:h(t);F.push({x1:C,y1:n,x2:k,y2:n,color:null!=(b=null!=(w=null==e?void 0:e.horizontalBorderColor)?w:null==e?void 0:e.borderColor)?b:D})}e+=d(t),r=!1,t++}}const I=j()(F,(e=>e.color));for(const B of Object.keys(I)){e.strokeStyle=B;for(const t of I[B])e.moveTo(t.x1,t.y1),e.lineTo(t.x2,t.y2);e.stroke(),e.beginPath()}void 0!==s&&e.restore()}function Sn(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 Fn(e,t,n){return t>=e.x&&t<=e.x+e.width&&n>=e.y&&n<=e.y+e.height}function An(e,t,n,r){return{x:e+n-30,y:Math.max(t,t+r/2-15),width:30,height:Math.min(30,r)}}function Mn(e,t,n,r,i,o,l,a,s,u,c,d,h,f){const p=o.title.startsWith(_e),g=An(t,n,r,i);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:c,isHovered:s,hasSelectedCell:u,spriteManager:d,menuBounds:g}))return}if(p){let l;return o.title===Le&&(l=!0),o.title===$e&&(l=!1),!0!==l&&(e.globalAlpha=c),Dt(e,a,l,t,n,r,i,!1,void 0,void 0),void(!0!==l&&(e.globalAlpha=1))}const v=l?a.textHeaderSelected:a.textHeader,m=!0===o.hasMenu&&(s||f&&l);let y=t+8;if(void 0!==o.icon){let t=l?"selected":"normal";"highlight"===o.style&&(t=l?"selected":"special"),d.drawSprite(o.icon,t,e,y,n+(i-20)/2,20,a),void 0!==o.overlayIcon&&d.drawSprite(o.overlayIcon,l?"selected":"special",e,y+9,n+((i-18)/2+6),18,a),y+=26}if(m&&!0===o.hasMenu&&r>35){const n=35,i=(r-n)/r,o=(r-.7*n)/r,l=e.createLinearGradient(t,0,t+r,0),a=Dn(v,0);l.addColorStop(0,v),l.addColorStop(i,v),l.addColorStop(o,a),l.addColorStop(1,a),e.fillStyle=l}else e.fillStyle=v;if(e.fillText(o.title,y,n+i/2+gt(e,`${a.headerFontStyle} ${a.fontFamily}`)),m&&!0===o.hasMenu){e.beginPath();const t=g.x+g.width/2-5.5,n=g.y+g.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 u=t[(a+1)%o],c=r(s,l),d=r(s,u),h=c.nx*d.ny-c.ny*d.nx,f=c.nx*d.nx-c.ny*-d.ny;let p=Math.asin(h<-1?-1:h>1?1:h),g=1,v=!1;f<0?p<0?p=Math.PI+p:(p=Math.PI-p,g=-1,v=!0):p>0&&(g=-1,v=!0),i=void 0!==s.radius?s.radius:n;const m=p/2;let y,w=Math.abs(Math.cos(m)*i/Math.sin(m));w>Math.min(c.len/2,d.len/2)?(w=Math.min(c.len/2,d.len/2),y=Math.abs(w*Math.sin(m)/Math.cos(m))):y=i;let b=s.x+d.nx*w,D=s.y+d.ny*w;b+=-d.ny*y*g,D+=d.nx*y*g,e.arc(b,D,y,c.ang+Math.PI/2*g,d.ang-Math.PI/2*g,v),l=s,s=u}e.closePath()}(e,[{x:t,y:n},{x:t+11,y:n},{x:t+5.5,y:n+6}],1),e.fillStyle=v,e.fill()}}function Rn(e,t,n,r,i,o,l,a,s,u,c,d,h,f,p,g,v,m,y){var w;const b=l+a;if(b<=0)return;e.fillStyle=d.bgHeader,e.fillRect(0,0,i,b);const[D,x]=null!=(w=null==r?void 0:r[0])?w:[],C=`${d.headerFontStyle} ${d.fontFamily}`;e.font=C,_n(t,0,o,0,b,((t,r,i,o)=>{var p,w,b;if(void 0!==v&&!v.some((e=>-1===e[1]&&e[0]===t.sourceIndex)))return;const k=Math.max(0,o-r);e.save(),e.beginPath(),e.rect(r+k,a,t.width-k,l),e.clip();const E=g(null!=(p=t.group)?p:"").overrideTheme,S=void 0===t.themeOverride&&void 0===E?d:{...d,...E,...t.themeOverride};S.bgHeader!==d.bgHeader&&(e.fillStyle=S.bgHeader,e.fill());const F=`${S.headerFontStyle} ${S.fontFamily}`;C!==F&&(e.font=F);const A=c.columns.hasIndex(t.sourceIndex),M=void 0!==s||u,R=!M&&-1===x&&D===t.sourceIndex,T=M?0:null!=(b=null==(w=f.find((e=>e.item[0]===t.sourceIndex&&-1===e.item[1])))?void 0:w.hoverAmount)?b:0,I=void 0!==(null==c?void 0:c.current)&&c.current.cell[0]===t.sourceIndex,B=A?S.accentColor:I?S.bgHeaderHasFocus:S.bgHeader,O=n?a:0,P=0===t.sourceIndex?0:1;A?(e.fillStyle=B,e.fillRect(r+P,O,t.width-P,l)):(I||T>0)&&(e.beginPath(),e.rect(r+P,O,t.width-P,l),I&&(e.fillStyle=S.bgHeaderHasFocus,e.fill()),T>0&&(e.globalAlpha=T,e.fillStyle=S.bgHeaderHovered,e.fill(),e.globalAlpha=1)),Mn(e,r,O,t.width,l,t,A,S,R,I,T,h,m,y),e.restore()})),n&&function(e,t,n,r,i,o,l,a,s,u,c,d){var h;const[f,p]=null!=(h=null==o?void 0:o[0])?h:[];let g=0;Ln(t,n,r,i,((t,n,r,s,h,v)=>{var m,y;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,v),e.clip();const w=c(n),b=void 0===(null==w?void 0:w.overrideTheme)?l:{...l,...w.overrideTheme},D=-2===p&&void 0!==f&&f>=t[0]&&f<=t[1],x=D?b.bgHeaderHovered:b.bgHeader;if(x!==l.bgHeader&&(e.fillStyle=x,e.fill()),e.fillStyle=null!=(m=b.textGroupHeader)?m:b.textHeader,void 0!==w){let t=r;if(void 0!==w.icon&&(a.drawSprite(w.icon,"normal",e,t+8,(i-20)/2,20,b),t+=26),e.fillText(w.name,t+8,i/2+gt(e,`${l.headerFontStyle} ${l.fontFamily}`)),void 0!==w.actions&&D){const t=Sn({x:r,y:s,width:h,height:v},w.actions);e.beginPath();const n=t[0].x-10,l=r+h-n;e.rect(n,0,l,i);const u=e.createLinearGradient(n,0,n+l,0),c=Dn(x,0);u.addColorStop(0,c),u.addColorStop(10/l,x),u.addColorStop(1,x),e.fillStyle=u,e.fill(),e.globalAlpha=.6;const[d,f]=null!=(y=null==o?void 0:o[1])?y:[-1,-1];for(let i=0;i<w.actions.length;i++){const n=w.actions[i],o=t[i],l=Fn(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,b),l&&(e.globalAlpha=.6)}e.globalAlpha=1}}u(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,v)}function Tn(e,t,n,r,i,o,l,a){return e<=i+l&&i<=e+n&&t<=o+a&&o<=t+r}function In(e,t,n,r,i,o,l,a,s,u,c,d,h,f){if(void 0===h||0===h.length)return;const p="sticky"===d?c(u-1):0;e.beginPath(),Ln(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}}})),_n(t,s,l,a,o,((t,n,l,a,s)=>{const g=Math.max(0,a-n),v=n+g+1,m=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(v,i,m,o-i);break}}f&&zn(s,l,r,u,c,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(v,t,m,i)}}))})),e.clip()}function Bn(e,t,n,r,i,o,l){var a,s;const[u,c]=e;let d,h;const f=null!=(s=null==(a=l.find((e=>!e.sticky)))?void 0:a.sourceIndex)?s:0;if(c>f){const e=Math.max(u,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<=c;t++)s+=l[t].width;h={x:a,y:n,width:s,height:i}}if(f>u){const e=Math.min(c,f-1);let a=t,s=r;for(let t=o.sourceIndex-1;t>=u;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,u,c,d,h,f,p,g,v,m,y,w,b,D,x,C,k,E,S,F,A){var M;let R=null!=(M=null==m?void 0:m.length)?M:Number.MAX_SAFE_INTEGER;const T=performance.now();let I,B=`${F.baseFontStyle} ${F.fontFamily}`;e.font=B;const O=new Set;return _n(t,a,o,l,i,((t,o,l,a,M)=>{var P;const H=Math.max(0,a-o),z=o+H,_=i+1,L=t.width-H,$=r-i-1;if(v.length>0){let e=!1;for(let t=0;t<v.length;t++){const n=v[t];if(Tn(z,_,L,$,n.x,n.y,n.width,n.height)){e=!0;break}}if(!e)return}const N=()=>{e.save(),e.beginPath(),e.rect(z,_,L,$),e.clip()},j=y.columns.hasIndex(t.sourceIndex),W=d(null!=(P=t.group)?P:"").overrideTheme,K=void 0===t.themeOverride&&void 0===W?F:{...F,...W,...t.themeOverride},U=`${K.baseFontStyle} ${K.fontFamily}`;let V;return U!==B&&(B=U,e.font=U),N(),zn(M,l,r,s,u,g,((r,i,l,u,d)=>{var g,M,P,H;if(void 0!==m){let e=!1;for(let n=0;n<m.length;n++){const r=m[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 z=y.rows.hasIndex(i),_=f.hasIndex(i),L=i<s?c([t.sourceIndex,i]):Cn;let $=o,W=t.width,X=!1,Y=!1;if(void 0!==L.span){const[s,u]=L.span,c=`${i},${s},${u},${t.sticky}`;if(O.has(c))return void R--;{const i=Bn(L.span,o,r,t.width,l,t,n),s=t.sticky?i[0]:i[1];if(t.sticky||void 0===i[0]||(Y=!0),void 0!==s){$=s.x,W=s.width,O.add(c),e.restore(),V=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===I&&(I=[]),I.push({x:s.x+t,y:r,width:s.width-t,height:l}),e.clip(),X=!0}}}const G=null==h?void 0:h(i),q=d&&void 0!==(null==(g=t.trailingRowOptions)?void 0:g.themeOverride)?null==(M=t.trailingRowOptions)?void 0:M.themeOverride:void 0,Z=void 0===L.themeOverride&&void 0===G&&void 0===q?K:{...K,...G,...q,...L.themeOverride};e.beginPath();const Q=[t.sourceIndex,i],J=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])}(Q,L,y);let ee=function(e,t,n){let r=0;if(void 0===n.current)return r;at(e,t,n.current.range)&&r++;for(const i of n.current.rangeStack)at(e,t,i)&&r++;return r}(Q,L,y);const te=void 0!==L.span&&y.columns.some((e=>void 0!==L.span&&e>=L.span[0]&&e<=L.span[1]));J&&!p?ee=0:J&&(ee=Math.max(ee,1)),te&&ee++,J||(z&&ee++,j&&!u&&ee++);const ne=L.kind===Se.Protected?Z.bgCellMedium:Z.bgCell;let re;if((u||ne!==F.bgCell)&&(re=xn(ne,re)),ee>0||_){_&&(re=xn(Z.bgHeader,re));for(let e=0;e<ee;e++)re=xn(Z.accentLight,re)}else!0===(null==w?void 0:w.some((e=>e[0]===t.sourceIndex&&e[1]===i)))&&(re=xn(Z.bgSearchResult,re));if(void 0!==b)for(const e of b){const n=e.range;n.x<=t.sourceIndex&&t.sourceIndex<n.x+n.width&&n.y<=i&&i<n.y+n.height&&(re=xn(e.color,re))}void 0!==re&&(e.fillStyle=re,void 0!==V&&(V.fillStyle=re),e.fillRect($,r,W,l)),"faded"===L.style&&(e.globalAlpha=.6);const ie=k.find((e=>e.item[0]===t.sourceIndex&&e.item[1]===i));if(W>10&&!Y){const n=`${Z.baseFontStyle} ${Z.fontFamily}`;n!==B&&(e.font=n,B=n),V=kn(e,i,L,t.sourceIndex,$,r,W,l,ee>0,Z,D,x,C,null!=(P=null==ie?void 0:ie.hoverAmount)?P:0,E,S,T,V,A)}return"faded"===L.style&&(e.globalAlpha=1),R--,X&&(e.restore(),null==(H=null==V?void 0:V.deprep)||H.call(V,{ctx:e}),V=void 0,N(),B=U,e.font=U),R<=0})),e.restore(),R<=0})),I}function Pn(e,t,n,r,i,o,l,a,s,u,c,d,h,f,p,g){var v;if(void 0===c.current||!l.some((e=>{var t;return e.sourceIndex===(null==(t=c.current)?void 0:t.cell[0])})))return;const[m,y]=c.current.cell,w=h(c.current.cell),b=null!=(v=w.span)?v:[m,m],D="sticky"!==f||"sticky"===f&&y===g-1?0:d(g-1)-1;let x;if(_n(l,r,i,o,u,((r,i,o,l,u)=>{if(!(r.sticky&&m>r.sourceIndex)&&!(r.sourceIndex<b[0]||r.sourceIndex>b[1]))return zn(u,o,n,g,d,f,((o,u,c)=>{if(u!==y)return;let d=i,h=r.width;if(void 0!==w.span){const e=Bn(w.span,i,o,r.width,c,r,a),t=r.sticky?e[0]:e[1];void 0!==t&&(d=t.x,h=t.width)}return x=()=>{var i,a,u,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,c),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+c-4,4,4),e.fillStyle=null!=(f=null==(u=r.themeOverride)?void 0:u.accentColor)?f:s.accentColor,e.fill())},!0})),!0})),void 0===x)return;const C=()=>{e.save(),e.beginPath(),e.rect(0,u,t,n-u-D),e.clip(),null==x||x(),e.restore()};return C(),C}function Hn(e,t){var n;const{canvas:r,headerCanvas:i,width:o,height:l,cellXOffset:a,cellYOffset:s,translateX:u,translateY:c,mappedColumns:d,enableGroups:h,freezeColumns:f,dragAndDropState:p,theme:g,headerHeight:v,groupHeaderHeight:m,disabledRows:y,rowHeight:w,verticalBorder:b,isResizing:D,selection:x,fillHandle:C,lastRowSticky:k,rows:E,getCellContent:S,getGroupDetails:F,getRowThemeOverride:A,isFocused:M,drawCustomCell:R,drawHeaderCallback:T,prelightCells:I,highlightRegions:B,imageLoader:O,lastBlitData:P,hoverValues:H,hyperWrapping:z,hoverInfo:_,spriteManager:L,scrolling:$,touchMode:N,enqueue:j}=e;let{damage:W}=e;if(0===o||0===l)return;const K=$?1:Math.ceil(null!=(n=window.devicePixelRatio)?n:1),U=function(e,t){if(e.width!==(null==t?void 0: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(De(i,o))continue;if(void 0!==n)return!1;if(i.width===o.width)return!1;const{width:l,...a}=i,{width:s,...u}=o;if(!De(a,u))return!1;n=r}return void 0===n||n}return!0}(e,t);r.width===o*K&&r.height===l*K||(r.width=o*K,r.height=l*K,r.style.width=o+"px",r.style.height=l+"px");const V=i,X=h?m+v:v;V.width===o*K&&V.height===X*K||(V.width=o*K,V.height=X*K,V.style.width=o+"px",V.style.height=X+"px");const Y=P.current;if(!0===U&&a===Y.cellXOffset&&s===Y.cellYOffset&&u===Y.translateX&&c===Y.translateY)return;const G=r.getContext("2d",{alpha:!1}),q=V.getContext("2d",{alpha:!1});if(null===q||null===G)return;const Z=e=>"number"===typeof w?w:w(e);q.save(),q.beginPath(),G.save(),G.beginPath(),q.textBaseline="middle",G.textBaseline="middle",1!==K&&(q.scale(K,K),G.scale(K,K));const Q=ct(d,a,o,p,u);let J=[];const ee=()=>{Rn(q,Q,h,_,o,u,v,m,p,D,x,g,L,H,b,F,W,T,N),En(q,Q,s,u,c,o,l,void 0,void 0,m,X,Z,A,b,k,E,g,!0)};if(void 0!==W){let e=!1;return W=W.filter((t=>(e=e||t[1]<0,t[1]<0||Tn(a,s,Q.length,300,t[0],t[1],1,1)||Tn(0,s,f,300,t[0],t[1],1,1)||k&&Tn(a,E-1,Q.length,1,t[0],t[1],1,1)))),W.length>0&&(In(G,Q,o,l,m,X,u,c,s,E,Z,k,W,!0),G.fillStyle=g.bgCell,G.fillRect(0,X+1,o,l-X-1),On(G,Q,d,l,X,u,c,s,E,Z,S,F,A,y,M,k,J,W,x,I,B,R,O,L,H,_,z,g,j),C&&void 0!==x.current&&W.some((e=>{var t,n;return e[0]===(null==(t=x.current)?void 0:t.cell[0])&&e[1]===(null==(n=x.current)?void 0:n.cell[1])}))&&Pn(G,o,l,s,u,c,Q,d,g,X,x,Z,S,k,C,E)),e&&(In(q,Q,o,X,m,X,u,c,s,E,Z,k,W,!1),ee()),G.restore(),void q.restore()}if(!0===U&&a===Y.cellXOffset&&u===Y.translateX||ee(),!0===U){const{regions:e}=function(e,t,n,r,i,o,l,a,s,u,c,d,h,f,p,g){const v=[];let m=!1;e.imageSmoothingEnabled=!1;const y=Math.min(n.cellYOffset,i),w=Math.max(n.cellYOffset,i);let b=0;if("number"===typeof g)b+=(w-y)*g;else for(let A=y;A<w;A++)b+=g(A);i>n.cellYOffset&&(b=-b),b+=l-n.translateY;const D=Math.min(n.cellXOffset,r),x=Math.max(n.cellXOffset,r);let C=0;for(let A=D;A<x;A++)C+=f[A].width;r>n.cellXOffset&&(C=-C),C+=o-n.translateX;let k=ut(p);if(k>0&&k++,0!==C&&0!==b)return{regions:[],yOnly:!1};const E=a?"number"===typeof g?g:g(c-1):0,S=s-k-Math.abs(C),F=u-d-E-Math.abs(b)-1;if(S>150&&F>150){m=0===C;const n={sx:0,sy:0,sw:s*h,sh:u*h,dx:0,dy:0,dw:s*h,dh:u*h};b>0?(n.sy=(d+1)*h,n.sh=F*h,n.dy=(b+d+1)*h,n.dh=F*h,v.push({x:0,y:d,width:s,height:b+1})):b<0&&(n.sy=(-b+d+1)*h,n.sh=F*h,n.dy=(d+1)*h,n.dh=F*h,v.push({x:0,y:u+b-E,width:s,height:-b+E})),C>0?(n.sx=k*h,n.sw=S*h,n.dx=(C+k)*h,n.dw=S*h,v.push({x:k-1,y:0,width:C+2,height:u})):C<0&&(n.sx=(k-C)*h,n.sw=S*h,n.dx=k*h,n.dw=S*h,v.push({x:s+C,y:0,width:-C,height:u})),e.setTransform(1,0,0,1,0,0),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:m}}(G,r,Y,a,s,u,c,"sticky"===k,o,l,E,X,K,d,Q,w);J=e}else if(!1!==U){J=function(e,t,n,r,i,o,l,a,s,u){const c=[];return t!==e.cellXOffset||n!==e.cellYOffset||r!==e.translateX||i!==e.translateY||_n(s,n,r,i,a,((e,t,n,r)=>{if(e.sourceIndex===u){const e=Math.max(t,r)+1;return c.push({x:e,y:0,width:o-e,height:l}),!0}})),c}(Y,a,s,u,c,o,l,X,Q,U)}!function(e,t,n,r,i,o,l,a,s,u){let c=!1;for(const f of t)if(!f.sticky){c=a(f.sourceIndex);break}const d=c?ut(t):0;e.beginPath(),e.moveTo(0,i+.5),e.lineTo(n,i+.5),e.strokeStyle=u.bgHeader,e.stroke(),e.beginPath();let h=!1;if(0!==d&&(e.moveTo(d+.5,0),e.lineTo(d+.5,r),h=!0),o){const t=s(l-1);e.moveTo(0,r-t+.5),e.lineTo(n,r-t+.5),h=!0}h&&(e.strokeStyle=u.bgCell,e.stroke()),e.moveTo(0,i+.5),e.lineTo(n,i+.5),e.strokeStyle=u.borderColor,e.stroke()}(G,Q,o,l,X,"sticky"===k,E,b,Z,g);const te=Pn(G,o,l,s,u,c,Q,d,g,X,x,Z,S,k,C,E),ne=function(e,t,n,r,i,o,l,a,s,u,c,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 v=g.map((e=>{var p,g,v,m,y;const w=e.range,b=Et(w.x,w.y,t,n,c,u+c,r,i,o,l,f,s,h,a,d);if(1===w.width&&1===w.height)return w.x<s?[{color:e.color,style:null!=(p=e.style)?p:"dashed",rect:b},void 0]:[void 0,{color:e.color,style:null!=(g=e.style)?g:"dashed",rect:b}];const D=Et(w.x+w.width-1,w.y+w.height-1,t,n,c,u+c,r,i,o,l,f,s,h,a,d);if(w.x<s&&w.x+w.width>=s){const p=Et(s-1,w.y+w.height-1,t,n,c,u+c,r,i,o,l,f,s,h,a,d),g=Et(s,w.y+w.height-1,t,n,c,u+c,r,i,o,l,f,s,h,a,d);return[{color:e.color,style:null!=(v=e.style)?v:"dashed",rect:{x:b.x,y:b.y,width:p.x+p.width-b.x,height:p.y+p.height-b.y}},{color:e.color,style:null!=(m=e.style)?m:"dashed",rect:{x:g.x,y:g.y,width:D.x+D.width-g.x,height:D.y+D.height-g.y}}]}return[void 0,{color:e.color,style:null!=(y=e.style)?y:"dashed",rect:{x:b.x,y:b.y,width:D.x+D.width-b.x,height:D.y+D.height-b.y}}]})),m=ut(a),y=()=>{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 v){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=Dn(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 v){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<m&&(e.rect(m,0,t,n),e.clip(),o=!0),e.strokeStyle=Dn(r.color,1),e.strokeRect(r.rect.x+1,r.rect.y+1,r.rect.width-2,r.rect.height-2))}e.restore()};return y(),y}(G,o,l,a,s,u,c,d,f,v,m,w,"sticky"===k,E,B);if(G.fillStyle=g.bgCell,J.length>0){G.beginPath();for(const e of J)G.rect(e.x,e.y,e.width,e.height);G.clip(),G.fill(),G.beginPath()}else G.fillRect(0,0,o,l);const re=On(G,Q,d,l,X,u,c,s,E,Z,S,F,A,y,M,k,J,W,x,I,B,R,O,L,H,_,z,g,j);!function(e,t,n,r,i,o,l,a,s,u,c,d,h,f,p,g,v,m){void 0===v&&t[t.length-1]===n[t.length-1]&&_n(t,s,l,a,o,((n,l,a,s,v)=>{if(n!==t[t.length-1])return;l+=n.width;const y=Math.max(l,s);y>r||(e.save(),e.beginPath(),e.rect(y,o+1,1e4,i-o-1),e.clip(),zn(v,a,i,u,c,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),u=void 0===s?m:{...m,...s};u.bgCell!==m.bgCell&&(e.fillStyle=u.bgCell,e.fillRect(l,t,1e4,r)),a&&(e.fillStyle=u.bgHeader,e.fillRect(l,t,1e4,r)),o&&(e.fillStyle=u.accentLight,e.fillRect(l,t,1e4,r))})),e.restore())}))}(G,Q,d,o,l,X,u,c,s,E,Z,A,x.rows,y,k,J,W,g),En(G,Q,s,u,c,o,l,J,re,m,X,Z,A,b,k,E,g),null==te||te(),null==ne||ne();const ie=function(e,t,n,r,i,o,l,a,s){let u=0;return _n(e,o,r,i,n,((e,n,r,i,o)=>(zn(o,r,t,l,a,s,((e,t,n,r)=>{r||(u=Math.max(t,u))})),!0))),u}(Q,l,X,u,c,s,E,Z,k);null==O||O.setWindow({x:a,y:s,width:Q.length,height:ie-s},f),P.current={cellXOffset:a,cellYOffset:s,translateX:u,translateY:c},G.restore(),q.restore()}function zn(e,t,n,r,i,o,l){let a=t,s=e,u="sticky"===o;for(;a<n||u;){const e=u&&a>=n;e&&(u=!1,s=r-1);const t=i(s);e&&(a=n-t);if(!(u&&s===r-1)&&!0===l(a,s,t,e,"none"!==o&&s===r-1))break;if(e)break;a+=t,s++}}function _n(e,t,n,r,i,o){let l=0,a=0;const s=i+r;for(const u of e){if(!0===o(u,u.sticky?a:l+n,s,a,t))break;l+=u.width,a+=u.sticky?u.width:0}}function Ln(e,t,n,r,i){var o;let l=0,a=0;for(let s=0;s<e.length;s++){const u=e[s];let c=s+1,d=u.width;for(u.sticky&&(a+=d);c<e.length&&lt(e[c].group,u.group)&&e[c].sticky===e[s].sticky;){const t=e[c];d+=t.width,c++,s++,t.sticky&&(a+=t.width)}const h=l+(u.sticky?0:n),f=u.sticky?0:Math.max(0,a-h),p=Math.min(d-f,t-(h+f));i([u.sourceIndex,e[c-1].sourceIndex],null!=(o=u.group)?o:"",h+f,0,p,r),l+=d}}function $n(e){const t=e-1;return t*t*t+1}function Nn(e){return new class{constructor(e){this.fn=e}get value(){var e;return null!=(e=this.val)?e:this.val=this.fn()}}(e)}var jn=Nn((()=>window.navigator.userAgent.includes("Firefox"))),Wn=Nn((()=>window.navigator.userAgent.includes("Mac OS")&&window.navigator.userAgent.includes("Safari")&&!window.navigator.userAgent.includes("Chrome"))),Kn=Nn((()=>window.navigator.platform.toLowerCase().startsWith("mac")));var Un=r.memo(r.forwardRef(((e,t)=>{var n,o,l,a,s,u,c,d;const{width:h,height:f,accessibilityHeight:p,className:g,columns:v,cellXOffset:m,cellYOffset:y,headerHeight:b,fillHandle:D=!1,groupHeaderHeight:x,rowHeight:C,rows:k,getCellContent:S,getRowThemeOverride:A,onHeaderMenuClick:M,enableGroups:R,isFilling:T,onCanvasFocused:I,onCanvasBlur:B,isFocused:O,selection:P,freezeColumns:H,onContextMenu:z,trailingRowType:_,fixedShadowX:L=!0,fixedShadowY:$=!0,onMouseDown:N,onMouseUp:j,onMouseMoveRaw:W,onMouseMove:K,onItemHovered:U,dragAndDropState:V,firstColAccessible:X,onKeyDown:Y,onKeyUp:G,highlightRegions:q,canvasRef:Z,onDragStart:Q,onDragEnd:J,eventTargetRef:ee,isResizing:te,isDragging:ne,isDraggable:re=!1,allowResize:ie,disabledRows:oe,getGroupDetails:le,theme:ae,prelightCells:se,headerIcons:ue,verticalBorder:ce,drawHeader:de,drawCustomCell:he,onCellFocused:fe,onDragOverCell:pe,onDrop:ge,onDragLeave:ve,smoothScrollX:ye=!1,smoothScrollY:we=!1,experimental:be}=e,De=null!=(n=e.translateX)?n:0,xe=null!=(o=e.translateY)?o:0,Ce=Math.max(H,Math.min(v.length-1,m)),ke=r.useRef(null),Ee=r.useMemo((()=>new pn),[]),Fe=r.useRef(),[Ae,Me]=r.useState(!1),Re=r.useRef([]),Te=r.useRef({cellXOffset:Ce,cellYOffset:y,translateX:De,translateY:xe}),[He,ze]=r.useState(),[_e,Le]=r.useState(),$e=r.useRef(null),[Ne,je]=r.useState(!1),We=r.useRef(Ne);We.current=Ne;const Ve=r.useMemo((()=>new class{constructor(e,t){this.onSettled=t,this.spriteMap=new Map,this.inFlight=0,this.headerIcons={...mn,...e}}drawSprite(e,t,n,r,i,o,l,a=1){const[s,u]=function(e,t){return"normal"===e?[t.bgIconHeader,t.fgIconHeader]:"selected"===e?["white",t.accentColor]:[t.accentColor,t.bgHeader]}(t,l),c=o*Math.ceil(window.devicePixelRatio),d=`${s}_${u}_${c}_${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:u,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,c,c)})).finally((()=>{this.inFlight--,0===this.inFlight&&this.onSettled()}))}else a<1&&(n.globalAlpha=a),n.drawImage(h,0,0,c,c,r,i,o,o),a<1&&(n.globalAlpha=1)}}(ue,(()=>{ot.current=void 0,at.current()}))),[ue]),Ye=R?x+b:b,Ze=r.useRef(-1),Qe=!0!==(null==be?void 0:be.enableFirefoxRescaling);r.useLayoutEffect((()=>{jn.value&&1!==window.devicePixelRatio&&!Qe&&(-1!==Ze.current&&Me(!0),window.clearTimeout(Ze.current),Ze.current=window.setTimeout((()=>{Me(!1),Ze.current=-1}),200))}),[y,Ce,De,xe,Qe]);const Je=function(e,t){return i.a.useMemo((()=>e.map(((e,n)=>({...e,sourceIndex:n,sticky:n<t})))),[e,t])}(v,H),et=r.useCallback(((e,t,n)=>{const r=e.getBoundingClientRect();if(t>=Je.length||n>=k)return;const i=Et(t,n,h,f,x,Ye,Ce,y,De,xe,k,H,"sticky"===_,Je,C);return i.x+=r.x,i.y+=r.y,i}),[h,f,x,Ye,Ce,y,De,xe,k,H,_,Je,C]),tt=r.useCallback(((e,t,n,r)=>{var i,o;const l=e.getBoundingClientRect(),a=t-l.left,s=n-l.top,u=ct(Je,Ce,h,void 0,De);let c=0;r instanceof MouseEvent&&(c=r.button);const d=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}(a,u,De),p=function(e,t,n,r,i,o,l,a,s,u){const c=r+i;if(n&&e<=i)return-2;if(e<=c)return-1;const d="number"===typeof l?l:l(o-1);if(u&&e>t-d)return o-1;const h=o-(u?1:0),f=e-(null!=s?s:0);if("number"===typeof l){const e=Math.floor((f-c)/l)+a;if(e>=h)return;return e}{let e=c;for(let t=a;t<h;t++){const n=l(t);if(f<=e+n)return t;e+=n}return}}(s,f,R,b,x,k,C,y,xe,"sticky"===_),g=!0===(null==r?void 0:r.shiftKey),v=!0===(null==r?void 0:r.ctrlKey),m=!0===(null==r?void 0:r.metaKey),w=void 0!==r&&!(r instanceof MouseEvent),E=[Math.abs(a)<20?-1:Math.abs(l.width-a)<20?1:0,Math.abs(s)<20?-1:Math.abs(l.height-s)<20?1:0];let S;if(-1===d||s<0||a<0||void 0===p||a>h||s>f){const n=a>h?-1:a<0?1:0,r=s>f?1:s<0?-1:0;let i=!1;if(-1===d&&-1===p){const n=et(e,Je.length-1,-1);me(void 0!==n),i=t<n.x+n.width+5}S={kind:Oe,location:[-1!==d?d:a<0?0:Je.length-1,null!=p?p:k-1],direction:[n,r],shiftKey:g,ctrlKey:v,metaKey:m,isEdge:i,isTouch:w,button:c,scrollEdge:E}}else if(p<=-1){let r=et(e,d,p);me(void 0!==r);let l=void 0!==r&&r.x+r.width-t<=5;const a=d-1;t-r.x<=5&&a>=0?(l=!0,r=et(e,a,p),me(void 0!==r),S={kind:R&&-2===p?Be:Ie,location:[a,p],bounds:r,group:null!=(i=Je[a].group)?i:"",isEdge:l,shiftKey:g,ctrlKey:v,metaKey:m,isTouch:w,localEventX:t-r.x,localEventY:n-r.y,button:c,scrollEdge:E}):S={kind:R&&-2===p?Be:Ie,group:null!=(o=Je[d].group)?o:"",location:[d,p],bounds:r,isEdge:l,shiftKey:g,ctrlKey:v,metaKey:m,isTouch:w,localEventX:t-r.x,localEventY:n-r.y,button:c,scrollEdge:E}}else{const r=et(e,d,p);me(void 0!==r);S={kind:"cell",location:[d,p],bounds:r,isEdge:void 0!==r&&r.x+r.width-t<5,shiftKey:g,ctrlKey:v,isFillHandle:D&&void 0!==r&&r.x+r.width-t<6&&r.y+r.height-n<6,metaKey:m,isTouch:w,localEventX:t-r.x,localEventY:n-r.y,button:c,scrollEdge:E}}return S}),[Je,Ce,h,De,f,R,b,x,k,C,y,xe,_,et,D]);const[nt]=null!=He?He:[],rt=r.useRef((e=>{})),it=r.useRef(He);it.current=He;const ot=r.useRef(),lt=r.useCallback((()=>{var e;const t=ke.current,n=$e.current;if(null===t||null===n)return;const r=ot.current,i={canvas:t,headerCanvas:n,width:h,height:f,cellXOffset:Ce,cellYOffset:y,translateX:Math.round(De),translateY:Math.round(xe),mappedColumns:Je,enableGroups:R,freezeColumns:H,dragAndDropState:V,theme:ae,headerHeight:b,groupHeaderHeight:x,disabledRows:null!=oe?oe:Ge.empty(),rowHeight:C,verticalBorder:ce,isResizing:te,isFocused:O,selection:P,fillHandle:D,lastRowSticky:_,rows:k,getCellContent:S,getGroupDetails:null!=le?le:e=>({name:e}),getRowThemeOverride:A,drawCustomCell:he,drawHeaderCallback:de,prelightCells:se,highlightRegions:q,imageLoader:Ee,lastBlitData:Te,damage:Fe.current,hoverValues:Re.current,hoverInfo:it.current,spriteManager:Ve,scrolling:Ae,hyperWrapping:null!=(e=null==be?void 0:be.hyperWrapping)&&e,touchMode:Ne,enqueue:rt.current};void 0===i.damage?(ot.current=i,Hn(i,r)):Hn(i,void 0)}),[h,f,Ce,y,De,xe,Je,R,H,V,ae,b,x,oe,C,ce,te,O,P,D,_,k,S,le,A,he,de,se,q,Ee,Ve,Ae,null==be?void 0:be.hyperWrapping,Ne]),at=r.useRef(lt);r.useLayoutEffect((()=>{lt(),at.current=lt}),[lt]),r.useLayoutEffect((()=>{(async()=>{var e;void 0!==(null==(e=null==document?void 0:document.fonts)?void 0:e.ready)&&(await document.fonts.ready,ot.current=void 0,at.current())})()}),[]);const st=r.useCallback((e=>{Fe.current=e,at.current(),Fe.current=void 0}),[]),dt=function(e){const t=r.useRef([]),n=r.useRef(0),i=r.useRef(e);i.current=e;const o=r.useCallback((()=>{const e=()=>{const e=t.current;t.current=[],i.current(e),t.current.length>0?n.current++:n.current=0};window.requestAnimationFrame(n.current>600?()=>window.requestAnimationFrame(e):e)}),[]);return r.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])}(st);rt.current=dt;const ht=r.useCallback((e=>{st(e.map((e=>e.cell)))}),[st]);Ee.setCallback(st);const[ft,pt]=r.useState(!1),[gt,vt]=null!=nt?nt:[],mt=void 0!==gt&&-1===vt,yt=void 0!==gt&&-2===vt;let wt,bt=!1,Dt=!1;if(void 0!==gt&&void 0!==vt&&vt>-1){const e=S([gt,vt]);bt=e.kind===Pe.NewRow||e.kind===Pe.Marker&&"number"!==e.markerKind,Dt=e.kind===Se.Boolean&&Xe(e),wt=e.cursor}const xt=ne?"grabbing":null!=_e&&_e||te?"col-resize":ft||T?"crosshair":void 0!==wt?wt:mt||bt||Dt||yt?"pointer":"default",Ct=r.useMemo((()=>({contain:"strict",display:"block",cursor:xt})),[xt]),kt=null==ee?void 0:ee.current;null!==kt&&void 0!==kt&&(kt.style.cursor=Ct.cursor);const St=r.useCallback(((e,t,n,r)=>{if(void 0===le)return;const i=le(e);if(void 0!==i.actions){const e=Sn(t,i.actions);for(const[o,l]of e.entries())if(Fn(l,n+t.x,r+l.y))return i.actions[o]}}),[le]),Ft=r.useCallback(((e,t,n,r)=>{const i=v[t];if(!ne&&!te&&!0===i.hasMenu&&(null==_e||!_e)){const i=et(e,t,-1);me(void 0!==i);const o=An(i.x,i.y,i.width,i.height);if(n>o.x&&n<o.x+o.width&&r>o.y&&r<o.y+o.height)return i}}),[v,et,_e,ne,te]),At=r.useRef(0),Mt=r.useRef(),Rt=r.useCallback((e=>{const t=ke.current,n=null==ee?void 0:ee.current;if(null===t||e.target!==t&&e.target!==n)return;let r,i;if(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.left+n.clientWidth)return;if(i>e.top+n.clientHeight)return}const o=tt(t,r,i,e);if(Mt.current=o.location,o.isTouch&&(At.current=Date.now()),We.current!==o.isTouch&&je(o.isTouch),o.kind!==Ie||void 0===Ft(t,o.location[0],r,i)){if(o.kind===Be){if(void 0!==St(o.group,o.bounds,o.localEventX,o.localEventY))return}null==N||N(o),o.isTouch||!0===re||re===o.kind||e.preventDefault()}}),[ee,re,tt,St,Ft,N]);qe("touchstart",Rt,window,!1),qe("mousedown",Rt,window,!1);const Tt=r.useCallback((e=>{var t,n;const r=ke.current;if(void 0===j||null===r)return;const i=null==ee?void 0:ee.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);let s=tt(r,l,a,e);if(s.isTouch&&0!==At.current&&Date.now()-At.current>500&&(s={...s,isLongTouch:!0}),We.current!==s.isTouch&&je(s.isTouch),!o&&e.cancelable&&e.preventDefault(),s.kind===Ie&&Ft(r,s.location[0],l,a)){const[e]=s.location,i=Ft(r,e,l,a);if(void 0!==i)return void(0===s.button&&(null==(t=Mt.current)?void 0:t[0])===e&&-1===(null==(n=Mt.current)?void 0:n[1])?null==M||M(e,i):j(s,!0))}else if(s.kind===Be){const e=St(s.group,s.bounds,s.localEventX,s.localEventY);if(void 0!==e)return void(0===s.button&&e.onClick(s))}j(s,o)}),[j,ee,tt,Ft,M,St]);qe("mouseup",Tt,window,!1),qe("touchend",Tt,window,!1);qe("contextmenu",r.useCallback((e=>{const t=ke.current;if(null===t||void 0===z)return;const n=tt(t,e.clientX,e.clientY,e);z(n,(()=>{e.cancelable&&e.preventDefault()}))}),[tt,z]),null!=(l=null==ee?void 0:ee.current)?l:null,!1);const It=r.useCallback((e=>{Fe.current=e.map((e=>e.item)),Re.current=e,at.current(),Fe.current=void 0}),[]),Bt=r.useMemo((()=>new 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:$n(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=w()(e.hoverAmount-t,0,1);void 0!==this.currentHoveredItem&&(this.currentHoveredItem.hoverAmount=w()(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)}}}}(It)),[It]),Ot=r.useRef(Bt);Ot.current=Bt,r.useLayoutEffect((()=>{const e=Ot.current;if(void 0===nt||nt[1]<0)return void e.setHovered(nt);const t=S(nt);e.setHovered(t.kind===Se.Custom||rn[t.kind].needsHover?nt:void 0)}),[S,nt]);const Pt=r.useRef();qe("mousemove",r.useCallback((e=>{const t=ke.current;if(null===t)return;const n=tt(t,e.clientX,e.clientY,e);if(r=n,i=Pt.current,r===i||(null==r?void 0:r.kind)===(null==i?void 0:i.kind)&&(null==r?void 0:r.location[0])===(null==i?void 0:i.location[0])&&(null==r?void 0:r.location[1])===(null==i?void 0:i.location[1])){if("cell"===n.kind||n.kind===Ie||n.kind===Be){const e=[n.location,[n.localEventX,n.localEventY]];if(ze(e),it.current=e,"cell"===n.kind){const e=S(n.location);(e.kind===Se.Custom||rn[e.kind].needsHoverPosition)&&st([n.location])}else n.kind===Be&&st([n.location])}}else null==U||U(n),ze(n.kind===Oe?void 0:[n.location,[n.localEventX,n.localEventY]]),Pt.current=n;var r,i;if(Le(n.kind===Ie&&n.isEdge&&!0===ie),D&&void 0!==P.current){const[n,r]=P.current.cell,i=et(t,n,r),o=e.clientX,l=e.clientY;me(void 0!==i),pt(o>=i.x+i.width-6&&o<=i.x+i.width&&l>=i.y+i.height-6&&l<=i.y+i.height)}else pt(!1);null==W||W(e),K(n)}),[tt,ie,D,P,W,K,U,S,st,et]),window,!0);const Ht=r.useCallback((e=>{const t=ke.current;if(null===t)return;let n;void 0!==P.current&&(n=et(t,P.current.cell[0],P.current.cell[1])),null==Y||Y({bounds:n,cancel:()=>{e.stopPropagation(),e.preventDefault()},ctrlKey:e.ctrlKey,metaKey:e.metaKey,shiftKey:e.shiftKey,altKey:e.altKey,key:e.key,keyCode:e.keyCode})}),[Y,P,et]),zt=r.useCallback((e=>{const t=ke.current;if(null===t)return;let n;void 0!==P.current&&(n=et(t,P.current.cell[0],P.current.cell[1])),null==G||G({bounds:n,cancel:()=>{e.stopPropagation(),e.preventDefault()},ctrlKey:e.ctrlKey,metaKey:e.metaKey,shiftKey:e.shiftKey,altKey:e.altKey,key:e.key,keyCode:e.keyCode})}),[G,P,et]),_t=r.useCallback((e=>{ke.current=e,void 0!==Z&&(Z.current=e)}),[Z]);qe("dragstart",r.useCallback((e=>{const t=ke.current;if(null===t||!1===re||te)return void e.preventDefault();let n,r;const i=tt(t,e.clientX,e.clientY);if(!0!==re&&i.kind!==re)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=et(t,n,r);me(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),Mn(l,0,0,o.width,o.height,Je[n],!1,ae,!1,!1,0,Ve,de,!1)):(l.font=`${ae.baseFontStyle} ${ae.fontFamily}`,l.fillStyle=ae.bgCell,l.fillRect(0,0,i.width,i.height),kn(l,r,S([n,r]),0,0,0,o.width,o.height,!1,ae,he,Ee,Ve,1,void 0,!1,0))),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)}}}),[re,te,tt,Q,et,ae,Je,Ve,de,S,he,Ee]),null!=(a=null==ee?void 0:ee.current)?a:null,!1,!1);const Lt=r.useRef();qe("dragover",r.useCallback((e=>{var t;const n=ke.current;if(void 0!==ge&&e.preventDefault(),null===n||void 0===pe)return;const r=tt(n,e.clientX,e.clientY),[i,o]=r.location,l=i-(X?0:1),[a,s]=null!=(t=Lt.current)?t:[];a===l&&s===o||(Lt.current=[l,o],pe([l,o],e.dataTransfer))}),[X,tt,pe,ge]),null!=(s=null==ee?void 0:ee.current)?s:null,!1,!1);qe("dragend",r.useCallback((()=>{Lt.current=void 0,null==J||J()}),[J]),null!=(u=null==ee?void 0:ee.current)?u:null,!1,!1);qe("drop",r.useCallback((e=>{const t=ke.current;if(null===t||void 0===ge)return;e.preventDefault();const n=tt(t,e.clientX,e.clientY),[r,i]=n.location;ge([r-(X?0:1),i],e.dataTransfer)}),[X,tt,ge]),null!=(c=null==ee?void 0:ee.current)?c:null,!1,!1);qe("dragleave",r.useCallback((()=>{null==ve||ve()}),[ve]),null!=(d=null==ee?void 0:ee.current)?d:null,!1,!1);const $t=r.useRef(P);$t.current=P;const Nt=r.useRef(null),jt=r.useCallback((e=>{var t;null!==ke.current&&ke.current.contains(document.activeElement)&&(null===e&&void 0!==$t.current.current?null==(t=null==Z?void 0:Z.current)||t.focus({preventScroll:!0}):null!==e&&e.focus({preventScroll:!0}),Nt.current=e)}),[Z]);r.useImperativeHandle(t,(()=>({focus:()=>{var e;const t=Nt.current;null!==t&&document.contains(t)?t.focus({preventScroll:!0}):null==(e=null==Z?void 0:Z.current)||e.focus({preventScroll:!0})},getBounds:(e,t)=>{if(void 0!==Z&&null!==Z.current)return et(Z.current,e,null!=t?t:-1)},damage:ht})),[Z,ht,et]);const Wt=r.useRef(),Kt=function(e,t,n){const[i,o]=r.useState(e),l=r.useRef(!0);r.useEffect((()=>()=>{l.current=!1}),[]);const a=r.useRef(F()((e=>{l.current&&o(e)}),n));return r.useLayoutEffect((()=>{l.current&&a.current((()=>e()))}),t),i}((()=>{var e,t,n,i;if(h<50)return null;let o=ct(Je,Ce,h,V,De);const l=X?0:-1;X||0!==(null==(e=o[0])?void 0:e.sourceIndex)||(o=o.slice(1));const[a,s]=null!=(n=null==(t=P.current)?void 0:t.cell)?n:[],u=null==(i=P.current)?void 0:i.range,c=o.map((e=>e.sourceIndex)),d=E()(y,Math.min(k,y+p));return void 0===a||void 0===s||c.includes(a)&&d.includes(s)||jt(null),r.createElement("table",{key:"access-tree",role:"grid","aria-rowcount":k+1,"aria-multiselectable":"true","aria-colcount":Je.length+l},r.createElement("thead",{role:"rowgroup"},r.createElement("tr",{role:"row","aria-rowindex":1},o.map((e=>r.createElement("th",{role:"columnheader","aria-selected":P.columns.hasIndex(e.sourceIndex),"aria-colindex":e.sourceIndex+1+l,tabIndex:-1,onFocus:t=>{if(t.target!==Nt.current)return null==fe?void 0:fe([e.sourceIndex,-1])},key:e.sourceIndex},e.title))))),r.createElement("tbody",{role:"rowgroup"},d.map((e=>r.createElement("tr",{role:"row","aria-selected":P.rows.hasIndex(e),key:e,"aria-rowindex":e+2},o.map((t=>{const n=t.sourceIndex,i=`${n},${e}`,o=a===n&&s===e,c=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=S([n,e]);return r.createElement("td",{key:i,role:"gridcell","aria-colindex":n+1+l,"aria-selected":c,"aria-readonly":Ke(h)||!Ue(h),id:d,"data-testid":d,onClick:()=>{const t=null==Z?void 0:Z.current;if(null!==t&&void 0!==t)return null==Y?void 0:Y({bounds:et(t,n,e),cancel:()=>{},ctrlKey:!1,key:"Enter",keyCode:13,metaKey:!1,shiftKey:!1,altKey:!1})},onFocusCapture:t=>{var r,i;if(t.target!==Nt.current&&((null==(r=Wt.current)?void 0:r[0])!==n||(null==(i=Wt.current)?void 0:i[1])!==e))return Wt.current=[n,e],null==fe?void 0:fe([n,e])},ref:o?jt:void 0,tabIndex:-1},(f=h).kind===Se.Custom?f.copyData:rn[f.kind].getAccessibilityString(f));var f})))))))}),[h,Je,Ce,V,De,k,y,p,P,jt,S,Z,Y,et,fe],200),Ut=L?ut(Je,V):0,Vt=0!==H&&L?Ce>H?1:w()(-De/100,0,1):0,Xt=32*-y+xe,Yt=$?w()(-Xt/100,0,1):0,Gt=r.useMemo((()=>{if(!Vt&&!Yt)return null;const e={position:"absolute",top:0,left:Ut,width:h-Ut,height:f,opacity:Vt,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:Ye,left:0,width:h,height:f,opacity:Yt,pointerEvents:"none",transition:we?void 0:"opacity 0.2s",boxShadow:"inset 0 13px 10px -13px rgba(0, 0, 0, 0.2)"};return r.createElement(r.Fragment,null,Vt>0&&r.createElement("div",{id:"shadow-x",style:e}),Yt>0&&r.createElement("div",{id:"shadow-y",style:t}))}),[Vt,Yt,Ut,h,ye,Ye,f,we]),qt=r.useMemo((()=>({position:"absolute",top:0,left:0})),[]);return r.createElement(r.Fragment,null,r.createElement("canvas",{"data-testid":"data-grid-canvas",tabIndex:0,onKeyDown:Ht,onKeyUp:zt,onFocus:I,onBlur:B,className:g,ref:_t,style:Ct},Kt),r.createElement("canvas",{ref:$e,style:qt}),Gt)})));function Vn(e,t,n,r){var i;return w()(Math.round(t-(null!=(i=e.growOffset)?i:0)),Math.ceil(n),Math.floor(r))}var Xn=e=>{var t;const[n,i]=r.useState(),[o,l]=r.useState(),[a,s]=r.useState(),[u,c]=r.useState(),[d,h]=r.useState(!1),[f,p]=r.useState(),[g,v]=r.useState(),[m,y]=r.useState(),[w,b]=r.useState(!1),[D,x]=r.useState(),{onColumnMoved:C,onColumnResize:k,onColumnResizeStart:E,onColumnResizeEnd:S,gridRef:F,maxColumnWidth:A,minColumnWidth:M,onHeaderMenuClick:R,onRowMoved:T,lockColumns:I,getCellContent:B}=e,O=void 0!==(null!=(t=null!=k?k:S)?t:E),{onMouseDown:P,onMouseUp:H,onItemHovered:z,columns:_,selection:L}=e,$=L.columns,N=r.useCallback((e=>{const[t,n]=e.location;void 0!==a&&u!==t&&t>=I?(h(!0),c(t)):void 0!==g&&void 0!==n?(b(!0),y(Math.max(0,n))):null==z||z(e)}),[a,g,u,z,I]),j=void 0!==C,W=r.useCallback((e=>{var t;if(0===e.button){const[n,r]=e.location;if("out-of-bounds"===e.kind&&e.isEdge&&O){const e=null==(t=null==F?void 0:F.current)?void 0:t.getBounds(_.length-1,-1);void 0!==e&&(i(e.x),l(_.length-1))}else"header"===e.kind&&n>=I?e.isEdge&&O?(i(e.bounds.x),l(n),null==E||E(_[n],e.bounds.width,n)):"header"===e.kind&&j&&(p(e.bounds.x),s(n)):"cell"===e.kind&&I>0&&0===n&&void 0!==r&&void 0!==T&&(x(e.bounds.y),v(r))}null==P||P(e)}),[P,O,I,T,F,_,j,E]),K=r.useCallback(((e,t)=>{d||w||null==R||R(e,t)}),[d,w,R]),U=r.useRef(-1),V=r.useCallback((()=>{U.current=-1,v(void 0),y(void 0),x(void 0),b(!1),s(void 0),c(void 0),p(void 0),h(!1),l(void 0),i(void 0)}),[]),X=r.useCallback(((e,t)=>{if(0===e.button){if(void 0!==o){if(!0===(null==$?void 0:$.hasIndex(o)))for(const e of $){if(e===o)continue;const t=_[e];null==k||k(t,Vn(t,U.current,M,A),e)}null==S||S(_[o],Vn(_[o],U.current,M,A),o);for(const e of $){if(e===o)continue;const t=_[e];null==S||S(t,Vn(t,U.current,M,A),e)}}V(),void 0!==a&&void 0!==u&&(null==C||C(a,u)),void 0!==g&&void 0!==m&&(null==T||T(g,m))}null==H||H(e,t)}),[H,o,a,u,g,m,$,S,_,M,A,k,C,T,V]),Y=r.useMemo((()=>{if(void 0!==a&&void 0!==u&&a!==u)return{src:a,dest:u}}),[a,u]),G=r.useCallback((e=>{if(void 0!==a&&void 0!==f){Math.abs(e.clientX-f)>20&&h(!0)}else if(void 0!==g&&void 0!==D){Math.abs(e.clientY-D)>20&&b(!0)}else if(void 0!==o&&void 0!==n){const t=_[o],r=e.clientX-n;if(null==k||k(t,Vn(t,r,M,A),o),U.current=r,(null==$?void 0:$.first())===o)for(const e of $){if(e===o)continue;const t=_[e];null==k||k(t,Vn(t,U.current,M,A),e)}}}),[a,f,g,D,o,n,_,M,A,k,$]),q=r.useCallback((e=>{if(void 0===g||void 0===m)return B(e);let[t,n]=e;return n===m?n=g:(n>m&&(n-=1),n>=g&&(n+=1)),B([t,n])}),[g,m,B]),Z=e.onDragStart,Q=r.useCallback((e=>{null==Z||Z(e),e.defaultPrevented()||V()}),[V,Z]);return r.createElement(Un,{accessibilityHeight:e.accessibilityHeight,cellXOffset:e.cellXOffset,cellYOffset:e.cellYOffset,columns:e.columns,enableGroups:e.enableGroups,freezeColumns:e.freezeColumns,onCanvasFocused:e.onCanvasFocused,onCanvasBlur:e.onCanvasBlur,isFocused:e.isFocused,onMouseMove:e.onMouseMove,groupHeaderHeight:e.groupHeaderHeight,fillHandle:e.fillHandle,headerHeight:e.headerHeight,height:e.height,trailingRowType:e.trailingRowType,rowHeight:e.rowHeight,rows:e.rows,highlightRegions:e.highlightRegions,verticalBorder:e.verticalBorder,width:e.width,canvasRef:e.canvasRef,onContextMenu:e.onContextMenu,className:e.className,theme:e.theme,disabledRows:e.disabledRows,isFilling:e.isFilling,firstColAccessible:e.firstColAccessible,drawCustomCell:e.drawCustomCell,drawHeader:e.drawHeader,eventTargetRef:e.eventTargetRef,experimental:e.experimental,getGroupDetails:e.getGroupDetails,getRowThemeOverride:e.getRowThemeOverride,headerIcons:e.headerIcons,isDraggable:e.isDraggable,onDragEnd:e.onDragEnd,onCellFocused:e.onCellFocused,onDragStart:Q,onDragOverCell:e.onDragOverCell,onDragLeave:e.onDragLeave,onDrop:e.onDrop,onKeyDown:e.onKeyDown,onKeyUp:e.onKeyUp,prelightCells:e.prelightCells,selection:e.selection,translateX:e.translateX,translateY:e.translateY,smoothScrollX:e.smoothScrollX,smoothScrollY:e.smoothScrollY,getCellContent:q,isResizing:void 0!==o,onHeaderMenuClick:K,isDragging:d,onItemHovered:N,onMouseDown:W,allowResize:void 0!==k,onMouseUp:X,dragAndDropState:Y,onMouseMoveRaw:G,ref:F})};ce();var Yn=te("div")({name:"ScrollRegionStyle",class:"s1jz82f8",vars:{"s1jz82f8-0":[e=>e.isSafari?"scroll":"auto"]}}),Gn=e=>{var t,n,i,o;const{children:l,clientHeight:a,scrollHeight:s,scrollWidth:u,update:c,draggable:d,className:h,preventDiagonalScrolling:f=!1,paddingBottom:p=0,paddingRight:g=0,rightElement:v,rightElementProps:m,scrollRef:y,scrollToEnd:w,minimap:b,style:D}=e,x=[],C=null!=(t=null==m?void 0:m.sticky)&&t,k=null!=(n=null==m?void 0:m.fill)&&n,E=r.useRef(0),S=r.useRef(0),F=r.useRef(null),A=window.devicePixelRatio;r.useEffect((()=>{const e=F.current;null!==e&&!0===w&&(e.scrollLeft=e.scrollWidth-e.clientWidth)}),[w]);const M=r.useRef({scrollLeft:0,scrollTop:0,lockDirection:void 0}),R=r.useRef(0),T=r.useRef(null),I=r.useCallback((()=>{var e,t,n,r;const i=F.current;if(null===i)return;let o=i.scrollTop,l=i.scrollLeft;const a=M.current.scrollTop,u=M.current.scrollLeft,d=l-u,h=o-a;0!==d&&0!==h&&f&&void 0===M.current.lockDirection&&(M.current.lockDirection=Math.abs(d)>Math.abs(h)?[u,void 0]:[void 0,a]);const v=M.current.lockDirection;l=null!=(e=null==v?void 0:v[0])?e:l,o=null!=(t=null==v?void 0:v[1])?t:o,M.current.scrollLeft=l,M.current.scrollTop=o;const m=Math.max(0,o),y=S.current-m,w=i.scrollHeight-i.clientHeight,b=Math.max(0,s-i.clientHeight);if(S.current=m,w>0&&(Math.abs(y)>2e3||0===m||m===w)&&s>i.scrollHeight+5){const e=m/w,t=(s-i.clientHeight)*e;E.current=t-m}R.current>0&&window.clearTimeout(R.current),void 0!==v&&(R.current=window.setTimeout((()=>{var e;const[t,n]=null!=(e=M.current.lockDirection)?e:[];void 0!==t?i.scrollLeft=t:void 0!==n&&(i.scrollTop=n),M.current.lockDirection=void 0,R.current=0}),200)),c({x:Math.max(0,l),y:Math.min(b,m+E.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,c,f]),B=r.useRef(I);B.current=I;const O=r.useRef(),P=r.useCallback((e=>{e.stopPropagation()}),[]);r.useEffect((()=>{I()}),[I,p,g]);const H=r.useCallback((e=>{F.current=e,void 0!==y&&(y.current=e)}),[y]);let z=0,_=0;for(x.push(r.createElement("div",{key:z++,style:{width:u,height:0}}));_<s;){const e=Math.min(5e6,s-_);x.push(r.createElement("div",{key:z++,style:{width:0,height:e}})),_+=e}const{ref:L,width:$,height:N}=function(){const e=Object(r.useRef)(null),[t,n]=Object(r.useState)({width:void 0,height:void 0});return Object(r.useLayoutEffect)((()=>{const t=(e=>({width:t,height:n})=>{e((e=>e.width===t&&e.height===n?e:{width:t,height:n}))})(n),r=new window.ResizeObserver((e=>{for(const n of e){const{width:e,height:r}=n&&n.contentRect||{};t({width:e,height:r})}}));return e.current&&r.observe(e.current,void 0),()=>{r.disconnect()}}),[e.current]),{ref:e,...t}}();return(null==(i=O.current)?void 0:i.height)===N&&(null==(o=O.current)?void 0:o.width)===$||(window.setTimeout((()=>B.current()),0),O.current={width:$,height:N}),0===(null!=$?$:0)||0===(null!=N?N:0)?r.createElement("div",{style:D,ref:L}):r.createElement("div",{style:D,ref:L},r.createElement(Yn,{isSafari:Wn.value},b,r.createElement("div",{className:"dvn-underlay"},l),r.createElement("div",{ref:H,style:O.current,draggable:d,onDragStart:e=>{d||(e.stopPropagation(),e.preventDefault())},className:"dvn-scroller "+(null!=h?h:""),onScroll:I},r.createElement("div",{className:"dvn-scroll-inner"+(void 0===v?" hidden":"")},r.createElement("div",{className:"dvn-stack"},x),void 0!==v&&r.createElement(r.Fragment,null,!k&&r.createElement("div",{className:"dvn-spacer"}),r.createElement("div",{ref:T,onMouseDown:P,onMouseUp:P,onMouseMove:P,style:{height:N,maxHeight:a-Math.ceil(A%1),position:"sticky",top:0,paddingLeft:1,marginBottom:-40,marginRight:g,flexGrow:k?1:void 0,right:C?null!=g?g:0:void 0,pointerEvents:"auto"}},v))))))},qn=te("div")({name:"MinimapStyle",class:"m15w2ly5"}),Zn=e=>{var t,n,i;const{columns:o,rows:l,rowHeight:a,headerHeight:s,groupHeaderHeight:u,enableGroups:c,freezeColumns:d,experimental:h,clientSize:f}=e,{paddingRight:p,paddingBottom:g}=null!=h?h:{},{className:v,onVisibleRegionChanged:m,scrollToEnd:y,scrollRef:b,preventDiagonalScrolling:D,rightElement:x,rightElementProps:C,overscrollX:k,overscrollY:E,showMinimap:S=!1,...F}=e,{smoothScrollX:A=!1,smoothScrollY:M=!1}=e,[R,T]=f,I=r.useRef(),B=r.useRef(),O=r.useRef(),P=r.useRef(),H=r.useMemo((()=>{let e=Math.max(0,null!=k?k:0);for(const t of o)e+=t.width;return e}),[o,k]);let z=c?s+u:s;if("number"===typeof a)z+=l*a;else for(let r=0;r<l;r++)z+=a(r);void 0!==E&&(z+=E);const _=r.useRef(),L=r.useCallback((()=>{var e,t,n;const r=_.current;if(void 0===r)return;let i=0,s=0,u=0,c=0,h=0;for(let l=0;l<d;l++)h+=o[l].width;for(const l of o){const e=i-h;if(r.x>=e+l.width)i+=l.width,c++,u++;else if(r.x>e)i+=l.width,A?s+=e-r.x:c++,u++;else{if(!(r.x+r.width>e))break;i+=l.width,u++}}let f=0,p=0,g=0;if("number"===typeof a)M?(p=Math.floor(r.y/a),f=p*a-r.y):p=Math.ceil(r.y/a),g=Math.ceil(r.height/a)+p,f<0&&g++;else{let e=0;for(let t=0;t<l;t++){const n=a(t),i=e+(M?0:n/2);if(r.y>=e+n)e+=n,p++,g++;else if(r.y>i)e+=n,M?f+=i-r.y:p++,g++;else{if(!(r.y+r.height>n/2+e))break;e+=n,g++}}}const v={x:c,y:p,width:u-c,height:g-p},y=I.current;void 0!==y&&y.y===v.y&&y.x===v.x&&y.height===v.height&&y.width===v.width&&B.current===s&&O.current===f&&r.width===(null==(e=P.current)?void 0:e[0])&&r.height===(null==(t=P.current)?void 0:t[1])||(null==m||m({x:c,y:p,width:u-c,height:g-p},r.width,r.height,null!=(n=r.paddingRight)?n:0,s,f),I.current=v,B.current=s,O.current=f,P.current=[r.width,r.height])}),[o,a,l,m,d,A,M]),$=r.useCallback((e=>{_.current=e,L()}),[L]);r.useEffect((()=>{L()}),[L]);const N=null!=(t=null==b?void 0:b.current)?t:void 0,j=w()(H/z,2/3,1.5),W=200,K=j>1?W:Math.ceil(W*j),U=j>1?Math.ceil(W/j):W,V=K/H,X=U/z,Y=Math.min(R*Math.max(V,.01),K),G=Math.min(T*Math.max(X,.01),U),q=(null!=(n=null==N?void 0:N.scrollLeft)?n:0)/(H-R)*(K-Y),Z=(null!=(i=null==N?void 0:N.scrollTop)?i:0)/(z-T)*(U-G),Q=r.useMemo((()=>{if(!S||0===Y||0===G)return;const e=e=>{if(void 0===N)return;const t=e.currentTarget.getBoundingClientRect(),n=e.clientX-t.x-Y/2,r=e.clientY-t.y-G/2,i=(H-N.clientWidth)*(n/(K-Y)),o=(z-N.clientHeight)*(r/(U-G));N.scrollTo({left:i,top:o,behavior:"mousemove"===e.type?"auto":"smooth"})};return r.createElement(qn,{style:{width:K,height:U},"data-testid":"minimap-container",onMouseMove:t=>{1===t.buttons&&e(t)},onClick:e},r.createElement("div",{className:"header"}),r.createElement("div",{className:"locationMarker",onDragStart:e=>e.preventDefault(),style:{left:q,top:Z,width:Y,height:G,borderRadius:Math.min(Y,.2*G,9)}}))}),[U,z,q,N,S,Z,G,Y,K,H]);return r.createElement(Gn,{scrollRef:b,minimap:Q,className:v,preventDiagonalScrolling:D,draggable:!0===F.isDraggable||"string"===typeof F.isDraggable,scrollWidth:H+(null!=p?p:0),scrollHeight:z+(null!=g?g:0),clientHeight:T,rightElement:x,paddingBottom:g,paddingRight:p,rightElementProps:C,update:$,scrollToEnd:y},r.createElement(Xn,{eventTargetRef:b,width:R,height:T,...F}))};ce();var Qn=te("div")({name:"SearchWrapper",class:"sxep88s",vars:{"sxep88s-0":[e=>e.showSearch?0:400,"px"]}}),Jn=r.createElement("svg",{className:"button-icon",viewBox:"0 0 512 512"},r.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"48",d:"M112 244l144-144 144 144M256 120v292"})),er=r.createElement("svg",{className:"button-icon",viewBox:"0 0 512 512"},r.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"48",d:"M112 268l144 144 144-144M256 392V100"})),tr=r.createElement("svg",{className:"button-icon",viewBox:"0 0 512 512"},r.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"M368 368L144 144M368 144L144 368"})),nr=e=>{const{getCellsForSelection:t,onSearchResultsChanged:n,showSearch:i=!1,onSearchClose:o,canvasRef:l,cellYOffset:a,rows:s,columns:u}=e,[c]=r.useState((()=>"search-box-"+Math.round(1e3*Math.random()))),[d,h]=r.useState(""),[f,p]=r.useState(),g=r.useRef(f);g.current=f;const v=r.useRef(new AbortController),m=r.useRef(null),y=r.useRef(),[w,b]=r.useState([]),D=r.useCallback((()=>{void 0!==y.current&&(window.cancelAnimationFrame(y.current),y.current=void 0,v.current.abort())}),[]),x=r.useRef(a);x.current=a;const C=r.useCallback((e=>{const r=new RegExp(e.replace(/([$()*+.?[\\\]^{|}-])/g,"\\$1"),"i");let i=x.current,o=Math.min(10,s),l=0;p(void 0),b([]);const a=[],c=async()=>{var e,d;if(void 0===t)return;const h=performance.now(),f=s-l;let m=t({x:0,y:i,width:u.length,height:Math.min(o,f,s-i)},v.current.signal);"function"===typeof m&&(m=await m());let w=!1;for(const[t,n]of m.entries())for(const[e,o]of n.entries()){let n;switch(o.kind){case Se.Text:case Se.Number:n=o.displayData;break;case Se.Uri:case Se.Markdown:n=o.data;break;case Se.Boolean:n="boolean"===typeof o.data?o.data.toString():void 0;break;case Se.Image:case Se.Bubble:n=o.data.join("\ud83d\udc33");break;case Se.Custom:n=o.copyData}void 0!==n&&r.test(n)&&(a.push([e,t+i]),w=!0)}const D=performance.now();w&&b([...a]),l+=m.length,me(l<=s);const x=null!=(d=null==(e=g.current)?void 0:e.selectedIndex)?d:-1;p({results:a.length,rowsSearched:l,selectedIndex:x}),null==n||n(a,x),i+o>=s?i=0:i+=o;const C=D-h,k=10/Math.max(C,1);o=Math.ceil(o*k),l<s&&a.length<1e3&&(y.current=window.requestAnimationFrame(c))};D(),y.current=window.requestAnimationFrame(c)}),[D,u.length,t,n,s]),k=r.useCallback((()=>{var e;null==o||o(),p(void 0),b([]),null==n||n([],-1),D(),null==(e=null==l?void 0:l.current)||e.focus()}),[D,l,o,n]),E=r.useCallback((e=>{h(e.target.value),""===e.target.value?(p(void 0),b([]),D()):C(e.target.value)}),[C,D]);r.useEffect((()=>{i&&null!==m.current&&(h(""),m.current.focus({preventScroll:!0}))}),[i]);const S=r.useCallback((e=>{var t;if(null==(t=null==e?void 0:e.stopPropagation)||t.call(e),void 0===f)return;const r=(f.selectedIndex+1)%f.results;p({...f,selectedIndex:r}),null==n||n(w,r)}),[f,n,w]),F=r.useCallback((e=>{var t;if(null==(t=null==e?void 0:e.stopPropagation)||t.call(e),void 0===f)return;let r=(f.selectedIndex-1)%f.results;r<0&&(r+=f.results),p({...f,selectedIndex:r}),null==n||n(w,r)}),[n,w,f]),A=r.useCallback((e=>{(e.ctrlKey||e.metaKey)&&"KeyF"===e.nativeEvent.code||"Escape"===e.key?(k(),e.stopPropagation(),e.preventDefault()):"Enter"===e.key&&(e.shiftKey?F():S())}),[k,S,F]);r.useEffect((()=>()=>{D()}),[D]);const M=r.useMemo((()=>{var e,t,n;let l;void 0!==f&&(l=f.results>=1e3?"over 1000":`${f.results} result${1!==f.results?"s":""}`,f.selectedIndex>=0&&(l=`${f.selectedIndex+1} of ${l}`));const a=e=>{e.stopPropagation()},u={width:`${Math.floor((null!=(e=null==f?void 0:f.rowsSearched)?e:0)/s*100)}%`};return r.createElement(Qn,{showSearch:i,onMouseDown:a,onMouseMove:a,onMouseUp:a,onClick:a},r.createElement("div",{className:"search-bar-inner"},r.createElement("input",{id:c,"aria-hidden":!i,"data-testid":"search-input",ref:m,onChange:E,value:d,tabIndex:i?void 0:-1,onKeyDownCapture:A}),r.createElement("button",{"aria-label":"Previous Result","aria-hidden":!i,tabIndex:i?void 0:-1,onClick:F,disabled:0===(null!=(t=null==f?void 0:f.results)?t:0)},Jn),r.createElement("button",{"aria-label":"Next Result","aria-hidden":!i,tabIndex:i?void 0:-1,onClick:S,disabled:0===(null!=(n=null==f?void 0:f.results)?n:0)},er),void 0!==o&&r.createElement("button",{"aria-label":"Close Search","aria-hidden":!i,"data-testid":"search-close-button",tabIndex:i?void 0:-1,onClick:k},tr)),void 0!==f?r.createElement(r.Fragment,null,r.createElement("div",{className:"search-status"},r.createElement("div",{"data-testid":"search-result-area"},l)),r.createElement("div",{className:"search-progress",style:u})):r.createElement("div",{className:"search-status"},r.createElement("label",{htmlFor:c},"Type to search")))}),[k,S,F,E,o,A,s,f,d,i,c]);return r.createElement(r.Fragment,null,r.createElement(Zn,{accessibilityHeight:e.accessibilityHeight,cellXOffset:e.cellXOffset,cellYOffset:e.cellYOffset,columns:e.columns,enableGroups:e.enableGroups,freezeColumns:e.freezeColumns,preventDiagonalScrolling:e.preventDiagonalScrolling,getCellContent:e.getCellContent,groupHeaderHeight:e.groupHeaderHeight,onCanvasFocused:e.onCanvasFocused,onCanvasBlur:e.onCanvasBlur,isFocused:e.isFocused,clientSize:e.clientSize,headerHeight:e.headerHeight,onContextMenu:e.onContextMenu,isFilling:e.isFilling,fillHandle:e.fillHandle,trailingRowType:e.trailingRowType,firstColAccessible:e.firstColAccessible,lockColumns:e.lockColumns,rowHeight:e.rowHeight,onMouseMove:e.onMouseMove,rows:e.rows,highlightRegions:e.highlightRegions,verticalBorder:e.verticalBorder,canvasRef:e.canvasRef,className:e.className,theme:e.theme,disabledRows:e.disabledRows,drawCustomCell:e.drawCustomCell,drawHeader:e.drawHeader,experimental:e.experimental,getGroupDetails:e.getGroupDetails,getRowThemeOverride:e.getRowThemeOverride,gridRef:e.gridRef,headerIcons:e.headerIcons,isDraggable:e.isDraggable,onDragEnd:e.onDragEnd,minColumnWidth:e.minColumnWidth,maxColumnWidth:e.maxColumnWidth,onCellFocused:e.onCellFocused,onColumnMoved:e.onColumnMoved,onColumnResize:e.onColumnResize,onColumnResizeStart:e.onColumnResizeStart,onColumnResizeEnd:e.onColumnResizeEnd,onDragStart:e.onDragStart,onDragOverCell:e.onDragOverCell,onDragLeave:e.onDragLeave,onDrop:e.onDrop,onHeaderMenuClick:e.onHeaderMenuClick,onItemHovered:e.onItemHovered,onKeyUp:e.onKeyUp,onMouseDown:e.onMouseDown,onMouseUp:e.onMouseUp,onRowMoved:e.onRowMoved,onVisibleRegionChanged:e.onVisibleRegionChanged,overscrollX:e.overscrollX,overscrollY:e.overscrollY,rightElement:e.rightElement,rightElementProps:e.rightElementProps,scrollRef:e.scrollRef,scrollToEnd:e.scrollToEnd,selection:e.selection,showMinimap:e.showMinimap,smoothScrollX:e.smoothScrollX,smoothScrollY:e.smoothScrollY,translateX:e.translateX,translateY:e.translateY,onKeyDown:e.onKeyDown,prelightCells:w}),M)};ce();var rr=te("input")({name:"RenameInput",class:"r1kzy40b",vars:{"r1kzy40b-0":[e=>Math.max(16,e.targetHeight-10),"px"]}}),ir=e=>{const{bounds:t,group:n,onClose:r,canvasBounds:o,onFinish:l}=e,[a,s]=i.a.useState(n);return i.a.createElement(xe,{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.a.createElement(rr,{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}))},or=150;function lr(e,t,n,r,i,o,l,a){let s=[];if(void 0!==i&&s.push(...i.map((e=>e[r])).map((n=>function(e,t,n){var r;if(t.kind===Se.Custom)return or;const i=rn[t.kind];return null!=(r=null==i?void 0:i.measure(e,t,n))?r:or}(e,n,t)))),s.length>5&&a){const e=s.reduce(((e,t)=>e+t))/s.length;s=s.filter((t=>t<2*e))}s.push(e.measureText(n.title).width+16+(void 0===n.icon?0:28));const u=Math.max(...s),c=Math.max(Math.ceil(o),Math.min(Math.floor(l),Math.ceil(u)));return{...n,width:c}}function ar(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":Kn.value?o=!0:n=!0}return t.altKey===i&&t.ctrlKey===n&&t.shiftKey===r&&t.metaKey===o}function sr(e){return e.startsWith('"')&&e.endsWith('"')&&(e=e.slice(1,-1).replace(/""/g,'"')),e}function ur(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.trim().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(sr(e.slice(o,a))),o=a+1,"\n"===s&&(r.push(i),i=[]),l=0):l=0}a++}return o<e.length&&i.push(sr(e.slice(o,e.length))),r.push(i),r}function cr(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 dr(e){return/[\t\n"]/.test(e)&&(e=`"${e.replace(/"/g,'""')}"`),e}function hr(e,t,n){var r,i,o,l;const a=(e,n,r)=>{var i,o;const l=t[n];if(void 0!==e.span&&e.span[0]!==l)return"";switch(e.kind){case Se.Text:case Se.Number:return dr(r?null!=(o=null==(i=e.data)?void 0:i.toString())?o:"":e.displayData);case Se.Markdown:case Se.RowID:case Se.Uri:return dr(e.data);case Se.Image:case Se.Bubble:return e.data.reduce(((e,t)=>`${dr(e)},${dr(t)}`));case Se.Boolean:return(e=>{switch(e){case!0:return"TRUE";case!1:return"FALSE";case Te:return"INDETERMINATE";case Re:return"";default:ye()}})(e.data);case Se.Loading:return r?"":"#LOADING";case Se.Protected:return r?"":"************";case Se.Drilldown:return e.data.map((e=>e.text)).reduce(((e,t)=>`${dr(e)},${dr(t)}`));case Se.Custom:return dr(e.copyData);default:ye()}},s=e.map((e=>e.map(((e,t)=>a(e,t,!1))).join("\t"))).join("\n");if(void 0!==(null==(r=window.navigator.clipboard)?void 0:r.write)||void 0!==n){const t=document.createElement("tbody");for(const n of e){const e=document.createElement("tr");for(const[t,r]of n.entries()){const n=document.createElement("td");if(r.kind===Se.Uri){const e=document.createElement("a");e.href=r.data,e.innerText=r.data,n.append(e)}else n.innerText=a(r,t,!0);e.append(n)}t.append(e)}if(void 0!==(null==(i=window.navigator.clipboard)?void 0:i.write))window.navigator.clipboard.write([new ClipboardItem({"text/plain":new Blob([s],{type:"text/plain"}),"text/html":new Blob([`<table>${t.outerHTML}</table>`],{type:"text/html"})})]);else if(void 0!==n&&null!==(null==n?void 0:n.clipboardData))try{n.clipboardData.setData("text/plain",s),n.clipboardData.setData("text/html",`<table>${t.outerHTML}</table>`)}catch(u){null==(o=window.navigator.clipboard)||o.writeText(s)}}else null==(l=window.navigator.clipboard)||l.writeText(s);null==n||n.preventDefault()}function fr(e){return"string"===typeof e?e:`${e}px`}ce();var pr=te("div")({name:"Wrapper",class:"wzg2m5k",vars:{"wzg2m5k-0":[e=>e.innerWidth],"wzg2m5k-1":[e=>e.innerHeight]}}),gr=e=>{const{inWidth:t,inHeight:n,children:i,...o}=e;return r.createElement(pr,{innerHeight:fr(n),innerWidth:fr(t),...o},i)};var vr=0;function mr(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 yr={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},wr={kind:Se.Loading,allowOverlay:!1},br={columns:Ge.empty(),rows:Ge.empty(),current:void 0},Dr=r.forwardRef(((e,t)=>{var n,o,l,a,s,u;const[c,d]=r.useState(br),[h,f]=r.useState(),p=r.useRef(null),[g,v]=r.useState(),m=r.useRef(null),y=r.useRef(),{rowMarkers:b="none",rowHeight:x=34,headerHeight:k=36,rowMarkerWidth:S,imageEditorOverride:A,getRowThemeOverride:M,markdownDivCreateNode:R}=e,{width:T,height:I,columns:B,rows:O,getCellContent:P,onCellClicked:H,onCellActivated:z,onFinishedEditing:_,coercePasteValue:L,drawHeader:$,onHeaderClicked:N,spanRangeBehavior:j="default",onGroupHeaderClicked:W,onCellContextMenu:K,className:U,theme:V,onHeaderContextMenu:X,getCellsForSelection:Y,onGroupHeaderContextMenu:G,onGroupHeaderRenamed:q,onCellEdited:Z,onCellsEdited:Q,keybindings:J,onRowAppended:ee,onColumnMoved:te,validateCell:ne,highlightRegions:re,drawCell:ie,rangeSelect:oe="rect",columnSelect:le="multi",rowSelect:ae="multi",rangeSelectionBlending:se="exclusive",columnSelectionBlending:ue="exclusive",rowSelectionBlending:ce="exclusive",onDelete:de,onDragStart:he,onMouseMove:fe,onPaste:pe,groupHeaderHeight:ge=k,freezeColumns:ve=0,rowSelectionMode:me="auto",rowMarkerStartIndex:be=1,onHeaderMenuClick:De,getGroupDetails:xe,onSearchClose:Fe,onItemHovered:Ae,onSelectionCleared:Me,showSearch:Ie,onVisibleRegionChanged:He,gridSelection:ze,onGridSelectionChange:_e,minColumnWidth:Xe=50,maxColumnWidth:Ye=500,provideEditor:Qe,trailingRowOptions:Je,verticalBorder:et,onDragOverCell:tt,onDrop:nt,onColumnResize:rt,onColumnResizeEnd:it,onColumnResizeStart:at,...st}=e,ut=Math.max(Xe,20),ct=Math.max(Ye,ut),dt=r.useMemo((()=>void 0===J?yr:{...yr,...J}),[J]),ht=null!=S?S:O>1e4?48:O>1e3?44:O>100?36:32,ft="none"!==b,pt=ft?1:0,gt=void 0!==ee,vt=!0===(null==Je?void 0:Je.sticky),[mt,yt]=r.useState(!1),wt=null!=Ie?Ie:mt,bt=r.useCallback((()=>{void 0!==Fe?Fe():yt(!1)}),[Fe]),Dt=r.useMemo((()=>void 0===ze?void 0:mr(ze,pt)),[ze,pt]),xt=null!=Dt?Dt:c,Ct=r.useRef(new AbortController);r.useEffect((()=>()=>{null==Ct||Ct.current.abort()}),[]);const[kt,Et]=function(e,t,n,i){const o=r.useCallback((n=>{var r;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?i.push({kind:Se.Loading,allowOverlay:!1}):i.push(t([e,r]));e.push(i)}return e}return null!=(r=null==e?void 0:e(n,i.signal))?r:[]}),[i.signal,t,e]),l=void 0!==e?o:void 0,a=r.useCallback((e=>{if(void 0===l)return[];const t={...e,x:e.x-n};if(t.x<0){t.x=0,t.width--;const e=l(t,i.signal);return"function"===typeof e?async()=>(await e()).map((e=>[{kind:Se.Loading,allowOverlay:!1},...e])):e.map((e=>[{kind:Se.Loading,allowOverlay:!1},...e]))}return l(t,i.signal)}),[i.signal,l,n]);return[void 0!==e?a:void 0,l]}(Y,P,pt,Ct.current),Ft=r.useCallback(((e,t,n)=>{if(void 0===ne)return!0;const r=[e[0]-pt,e[1]];return null==ne?void 0:ne(r,t,n)}),[pt,ne]),At=r.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,u=[];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;u.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;u.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;u.push(...e)}let c=s.x-n,d=s.x+s.width-1-n;for(const e of u)for(const t of e)void 0!==t.span&&(c=Math.min(t.span[0],c),d=Math.max(t.span[1],d));c===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:c+n,y:s.y,width:d-c+1,height:s.height},rangeStack:e.current.rangeStack},columns:e.columns,rows:e.rows}}while(!r)}return e}(e,kt,pt,j,Ct.current)),void 0!==_e?_e(mr(e,-pt)):d(e)}),[_e,kt,pt,j]),Mt=Ze(rt,r.useCallback(((e,t,n)=>{null==rt||rt(B[n-pt],t,n-pt)}),[rt,pt,B])),Rt=Ze(it,r.useCallback(((e,t,n)=>{null==it||it(B[n-pt],t,n-pt)}),[it,pt,B])),Tt=Ze(at,r.useCallback(((e,t,n)=>{null==at||at(B[n-pt],t,n-pt)}),[at,pt,B])),It=Ze($,r.useCallback((e=>{var t;return null!=(t=null==$?void 0:$({...e,columnIndex:e.columnIndex-pt}))&&t}),[$,pt])),Bt=r.useCallback((e=>{if(void 0!==de){const t=de(mr(e,-pt));return"boolean"===typeof t?t:mr(t,pt)}return!0}),[de,pt]),[Ot,Pt,Ht]=function(e,t,n,r,o,l){return[i.a.useCallback(((i,a,s,u)=>{var c,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"===u),f="mixed"===r&&h,p="mixed"===o&&h;let g={current:void 0===i?void 0:{...i,rangeStack:"drag"===u&&null!=(d=null==(c=e.current)?void 0:c.rangeStack)?d:[]},columns:f?e.columns:Ge.empty(),rows:p?e.rows:Ge.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.a.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:Ge.empty(),rows:i};else{const t=a&&"mixed"===r;s={current:a&&"mixed"===n?e.current:void 0,columns:t?e.columns:Ge.empty(),rows:i}}t(s,!1)}),[r,e,n,o,t]),i.a.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:Ge.empty(),columns:i};else{const t=a&&"mixed"===o;s={current:a&&"mixed"===n?e.current:void 0,rows:t?e.rows:Ge.empty(),columns:i}}t(s,!1)}),[r,e,n,o,t])]}(xt,At,se,ue,ce,oe),zt=r.useMemo((()=>({...ke,...V})),[V]),[_t,Lt]=r.useState([10,10,0]),$t=function(e,t,n,i,o,l,a,s){const u=r.useRef(t),c=r.useRef(n),d=r.useRef(a);u.current=t,c.current=n,d.current=a;const[h]=r.useState((()=>document.createElement("canvas").getContext("2d",{alpha:!1}))),f=r.useRef({}),p=r.useRef(),[g,v]=r.useState();return r.useLayoutEffect((()=>{const t=c.current;if(void 0===t||e.every(Ne))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,s.signal),l=r>0?t(o,s.signal):void 0;let a;a="object"===typeof n?n:await je(n),void 0!==l&&(a="object"===typeof l?[...a,...l]:[...a,...await je(l)]),p.current=e,v(a)})()}),[s.signal,e]),r.useMemo((()=>{var t;let n=e.every(Ne)?e:null===h?e.map((e=>Ne(e)?e:{...e,width:or})):(h.font=`${d.current.baseFontStyle} ${d.current.fontFamily}`,e.map(((t,n)=>{if(Ne(t))return t;if(void 0!==f.current[t.id])return{...t,width:f.current[t.id]};if(void 0===g||p.current!==e||void 0===t.id)return{...t,width:or};const r=lr(h,a,t,n,g,o,l,!0);return f.current[t.id]=r.width,r}))),r=0,s=0;const u=[];for(const[e,i]of n.entries())r+=i.width,void 0!==i.grow&&i.grow>0&&(s+=i.grow,u.push(e));if(r<i&&u.length>0){const e=[...n],o=i-r;let l=o;for(let r=0;r<u.length;r++){const i=u[r],a=(null!=(t=n[i].grow)?t:0)/s,c=r===u.length-1?l:Math.min(l,Math.floor(o*a));e[i]={...n[i],growOffset:c,width:n[i].width+c},l-=c}n=e}return n}),[i,e,h,g,a,o,l])}(B,O,Et,_t[0]-(0===pt?0:ht)-_t[2],ut,ct,zt,Ct.current),Nt=r.useMemo((()=>$t.some((e=>void 0!==e.group))),[$t]),jt=Nt?k+ge:k,[Wt,Kt]=r.useState({x:0,y:0,width:1,height:1}),Ut=Wt.x+pt,Vt=Wt.y,Xt=r.useRef(null),Yt=r.useCallback((e=>{var t;!0===e?null==(t=Xt.current)||t.focus():window.requestAnimationFrame((()=>{var e;null==(e=Xt.current)||e.focus()}))}),[]),Gt=gt?O+1:O,qt=r.useCallback((e=>{const t=0===pt?e:e.map((e=>({...e,location:[e.location[0]-pt,e.location[1]]}))),n=null==Q?void 0:Q(t);if(!0!==n)for(const r of t)null==Z||Z(r.location,r.value);return n}),[Z,Q,pt]),Zt=xt.rows.length,Qt="none"===b?"":0===Zt?$e:Zt===O?Le:"___gdg_header_cell_indeterminate",Jt=r.useMemo((()=>"none"===b?$t:[{title:Qt,width:ht,icon:void 0,hasMenu:!1,style:"normal"},...$t]),[$t,ht,b,Qt]),en=r.useMemo((()=>{if(void 0!==re)return 0===pt?re:re.map((e=>{const t=Jt.length-e.range.x-pt;if(!(t<=0))return{color:e.color,range:{...e.range,x:e.range.x+pt,width:Math.min(t,e.range.width)},style:e.style}})).filter((e=>void 0!==e))}),[re,Jt.length,pt]),tn=r.useRef(Wt),nn=r.useRef(Jt);nn.current=Jt;const on=r.useCallback((([t,n])=>{var r,i,o,l,a,s,u,c,d,h,f;const p=gt&&n===Gt-1;if(0===t&&ft)return p?wr:{kind:Pe.Marker,allowOverlay:!1,checked:!0===(null==xt?void 0:xt.rows.hasIndex(n)),markerKind:"clickable-number"===b?"number":b,row:be+n,drawHandle:void 0!==e.onRowMoved};if(p){const e=t===pt&&null!=(r=null==Je?void 0:Je.hint)?r:"",n=nn.current[t];if(!0===(null==(i=null==n?void 0:n.trailingRowOptions)?void 0:i.disabled))return wr;{const t=null!=(l=null==(o=null==n?void 0:n.trailingRowOptions)?void 0:o.hint)?l:e,r=null!=(s=null==(a=null==n?void 0:n.trailingRowOptions)?void 0:a.addIcon)?s:null==Je?void 0:Je.addIcon;return{kind:Pe.NewRow,hint:t,allowOverlay:!1,icon:r}}}{const r=t-pt;if(!0===(null==(u=e.experimental)?void 0:u.strict)){const e=tn.current,t=e.x>r||r>e.x+e.width||e.y>n||n>e.y+e.height,i=r===(null==(d=null==(c=e.extras)?void 0:c.selected)?void 0:d[0])&&n===(null==(h=e.extras)?void 0:h.selected[1]),o=void 0===(null==(f=e.extras)?void 0:f.freezeRegion)||e.extras.freezeRegion.x>r||r>e.extras.freezeRegion.x+e.extras.freezeRegion.width||e.extras.freezeRegion.y>n||n>e.extras.freezeRegion.y+e.extras.freezeRegion.height;if(t&&!i&&o)return{kind:Se.Loading,allowOverlay:!1}}let i=P([r,n]);return 0!==pt&&void 0!==i.span&&(i={...i,span:[i.span[0]+pt,i.span[1]+pt]}),i}}),[gt,Gt,ft,null==xt?void 0:xt.rows,e.onRowMoved,b,pt,null==Je?void 0:Je.hint,null==Je?void 0:Je.addIcon,null==(n=e.experimental)?void 0:n.strict,P,be]),ln=r.useCallback((e=>{var t,n;let r=null!=(t=null==xe?void 0:xe(e))?t:{name:e};return void 0!==q&&""!==e&&(r={icon:r.icon,name:r.name,overrideTheme:r.overrideTheme,actions:[...null!=(n=r.actions)?n:[],{title:"Rename",icon:"renameIcon",onClick:e=>En({group:r.name,bounds:e.bounds})}]}),r}),[xe,q]),sn=r.useCallback((e=>{var t;const[n,r]=e.cell,i=Jt[n],o=void 0!==(null==i?void 0:i.group)?null==(t=ln(i.group))?void 0:t.overrideTheme:void 0,l=null==i?void 0:i.themeOverride,a=null==M?void 0:M(r);f({...e,theme:{...zt,...o,...l,...a,...e.content.themeOverride}})}),[M,Jt,ln,zt]),un=r.useCallback(((e,t,n)=>{var r;if(void 0===xt.current)return;const[i,o]=xt.current.cell,l=on([i,o]);if(l.kind!==Se.Boolean&&l.allowOverlay){let t=l;if(void 0!==n)switch(t.kind){case Se.Number:t={...t,data:we((()=>"-"===n?-0:Number.parseFloat(n)),0)};break;case Se.Text:case Se.Markdown:case Se.Uri:t={...t,data:n}}sn({target:e,content:t,initialValue:n,cell:[i,o],highlight:void 0===n,forceEditMode:void 0!==n})}else l.kind===Se.Boolean&&t&&(qt([{location:xt.current.cell,value:{...l,data:St(l.data)}}]),null==(r=Xt.current)||r.damage([{cell:xt.current.cell}]))}),[on,xt,qt,sn]),cn=r.useCallback(((e,t)=>{var n;const r=null==(n=Xt.current)?void 0:n.getBounds(e,t);if(void 0===r||null===m.current)return;const i=on([e,t]);i.allowOverlay&&sn({target:r,content:i,initialValue:void 0,highlight:!0,cell:[e,t],forceEditMode:!0})}),[on,sn]),dn=r.useCallback(((e,t,n="both",r=0,i=0)=>{if(null!==m.current){const o=Xt.current,l=p.current;if(null!==o&&null!==l){const a=o.getBounds(e+pt,t),s=l.getBoundingClientRect();if(void 0!==a){const t={x:a.x-r,y:a.y-i,width:a.width+2*r,height:a.height+2*i};let o=0,l=0,u=0;for(let e=0;e<ve;e++)u+=$t[e].width;const c=u+s.left+pt*ht,d=s.right,h=s.top+jt;let f=0;vt&&(f="number"===typeof x?x:x(O));const p=s.bottom-f;c>t.x?o=t.x-c:d<t.x+t.width&&(o=t.x+t.width-d),h>t.y?l=t.y-h:p<t.y+t.height&&(l=t.y+t.height-p),"vertical"===n||e<ve?o=0:"horizontal"===n&&(l=0),0===o&&0===l||m.current.scrollTo(o+m.current.scrollLeft,l+m.current.scrollTop)}}}}),[pt,ht,jt,vt,ve,$t,x,O]),hn=r.useRef(cn),fn=r.useRef(P),pn=r.useRef(O);hn.current=cn,fn.current=P,pn.current=O;const gn=r.useCallback((async e=>{var t;const n=Jt[e];if(!0===(null==(t=null==n?void 0:n.trailingRowOptions)?void 0:t.disabled))return;const r=null==ee?void 0:ee();let i,o=!0;void 0!==r&&(i=await r,"top"===i&&(o=!1),"number"===typeof i&&(o=!1));let l=0;const a=()=>{if(pn.current<=O)return l<500&&window.setTimeout(a,l),void(l=50+2*l);const t="number"===typeof i?i:o?O:0;dn(e-pt,t),Ot({cell:[e,t],range:{x:e,y:t,width:1,height:1}},!1,!1,"edit");const n=fn.current([e-pt,t]);n.allowOverlay&&Ue(n)&&!0!==n.readonly&&window.setTimeout((()=>{hn.current(e,t)}),0)};a()}),[Jt,ee,pt,O,dn,Ot]),vn=r.useCallback((e=>{var t,n,r;const i=null!=(r=null==(n=null==(t=$t[e])?void 0:t.trailingRowOptions)?void 0:n.targetColumn)?r:null==Je?void 0:Je.targetColumn;if("number"===typeof i){return i+(ft?1:0)}if("object"===typeof i){const e=B.indexOf(i);if(e>=0){return e+(ft?1:0)}}}),[$t,B,ft,null==Je?void 0:Je.targetColumn]),mn=r.useRef(),yn=r.useRef(),wn=r.useCallback((t=>{var n,r,i,o;const l=Kn.value?t.metaKey:t.ctrlKey,a=l&&"multi"===ae,s=l&&"multi"===le,[u,c]=t.location,d=xt.columns,h=xt.rows,[p,g]=null!=(r=null==(n=xt.current)?void 0:n.cell)?r:[];if("cell"===t.kind){if(yn.current=void 0,bn.current=[u,c],0===u&&ft){if(!0===gt&&c===O||"number"===b||"none"===ae)return;const n=on(t.location);if(n.kind!==Pe.Marker)return;if(void 0!==e.onRowMoved){const e=rn[n.kind],r=null==(i=e.onClick)?void 0:i.call(e,n,t.localEventX,t.localEventY,t.bounds);if(void 0===r||r.checked===n.checked)return}f(void 0),Yt();const r=h.hasIndex(c),o=mn.current;if("multi"===ae&&(t.shiftKey||!0===t.isLongTouch)&&void 0!==o&&h.hasIndex(o)){const e=[Math.min(o,c),Math.max(o,c)+1];a||"multi"===me?Pt(void 0,e,!0):Pt(Ge.fromSingleSelection(e),void 0,a)}else a||t.isTouch||"multi"===me?r?Pt(h.remove(c),void 0,!0):(Pt(void 0,c,!0),mn.current=c):r&&1===h.length?Pt(Ge.empty(),void 0,l):(Pt(Ge.fromSingleSelection(c),void 0,l),mn.current=c)}else if(u>=pt&&gt&&c===O){const e=vn(u);gn(null!=e?e:u)}else if(p!==u||g!==c){const e=vt&&c===O,n=vt&&void 0!==xt&&(null==(o=xt.current)?void 0:o.cell[1])===O;if(!t.shiftKey&&!0!==t.isLongTouch||void 0===p||void 0===g||void 0===xt.current||n)Ot({cell:[u,c],range:{x:u,y:c,width:1,height:1}},!0,l,"click"),mn.current=void 0,f(void 0),Yt();else{if(e)return;const t=Math.min(u,p),n=Math.max(u,p),r=Math.min(c,g),i=Math.max(c,g);Ot({...xt.current,range:{x:t,y:r,width:n-t+1,height:i-r+1}},!0,l,"click"),mn.current=void 0,Yt()}}}else if("header"===t.kind)if(bn.current=[u,c],f(void 0),ft&&0===u)mn.current=void 0,yn.current=void 0,"multi"===ae&&(h.length!==O?Pt(Ge.fromSingleSelection([0,O]),void 0,l):Pt(Ge.empty(),void 0,l),Yt());else{const e=yn.current;if("multi"===le&&(t.shiftKey||!0===t.isLongTouch)&&void 0!==e&&d.hasIndex(e)){const t=[Math.min(e,u),Math.max(e,u)+1];s?Ht(void 0,t,l):Ht(Ge.fromSingleSelection(t),void 0,l)}else s?(d.hasIndex(u)?Ht(d.remove(u),void 0,l):Ht(void 0,u,l),yn.current=u):"none"!==le&&(Ht(Ge.fromSingleSelection(u),void 0,l),yn.current=u);mn.current=void 0,Yt()}else t.kind===Be?bn.current=[u,c]:t.kind===Oe&&(At(br,!1),f(void 0),Yt(),null==Me||Me(),mn.current=void 0,yn.current=void 0)}),[gn,le,Yt,vn,on,xt,ft,vt,Me,e.onRowMoved,pt,b,ae,me,O,Ot,At,Ht,Pt,gt]),bn=r.useRef(),Dn=r.useRef(Wt),xn=r.useRef(),Cn=r.useCallback((e=>{var t,n;if(An.current=!1,Dn.current=tn.current,0!==e.button)return void(xn.current=void 0);const r=performance.now(),i=r-(null!=(n=null==(t=xn.current)?void 0:t.time)?n:-1e3)<250;xn.current={wasDoubleClick:i,time:r,location:e.location};const o="cell"===e.kind&&e.isFillHandle;!o&&"cell"!==e.kind&&e.isEdge||(v({previousSelection:xt,fillHandle:o}),bn.current=void 0,e.isTouch||wn(e))}),[xt,wn]),[kn,En]=r.useState(),Sn=r.useCallback((e=>{if(e.kind!==Be||"multi"!==le)return;const t=Kn.value?e.metaKey:e.ctrlKey,[n]=e.location,r=xt.columns;if(n<pt)return;const i=Jt[n];let o=n,l=n;for(let a=n-1;a>=pt&&lt(i.group,Jt[a].group);a--)o--;for(let a=n+1;a<Jt.length&&lt(i.group,Jt[a].group);a++)l++;if(Yt(),t)if(r.hasAll([o,l+1])){let e=r;for(let t=o;t<=l;t++)e=e.remove(t);Ht(e,void 0,t)}else Ht(void 0,[o,l+1],t);else Ht(Ge.fromSingleSelection([o,l+1]),void 0,t)}),[le,Yt,xt.columns,Jt,pt,Ht]),Fn=r.useCallback((e=>{var t;if(void 0===xt.current)return;const n=[],r=xt.current.range;for(let i=0;i<r.width;i++){const t=i+r.x,o=on([t,e?r.y+r.height-1:r.y]);if(!Ke(o)&&Ue(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}})}}qt(n),null==(t=Xt.current)||t.damage(n.map((e=>({cell:e.location}))))}),[on,xt,qt]),An=r.useRef(!1),Mn=r.useCallback(((e,t)=>{const n=e.location[0]-pt;if("header"===e.kind&&(null==X||X(n,{...e,preventDefault:t})),e.kind===Be){if(n<0)return;null==G||G(n,{...e,preventDefault:t})}"cell"===e.kind&&(null==K||K([n,e.location[1]],{...e,preventDefault:t}))}),[K,G,X,pt]),Rn=r.useCallback((async e=>{var t;if(!0===(null==(t=xn.current)?void 0:t.wasDoubleClick)&&void 0!==kt&&void 0!==Mt){const t=tn.current.y,n=tn.current.height;let r=kt({x:e,y:t,width:1,height:Math.min(n,O-t)},Ct.current.signal);"object"!==typeof r&&(r=await r());const i=$t[e-pt],o=document.createElement("canvas").getContext("2d",{alpha:!1});if(null!==o){o.font=`${zt.baseFontStyle} ${zt.fontFamily}`;const t=lr(o,zt,i,0,r,ut,ct,!1);null==Mt||Mt(i,t.width,e)}}}),[$t,kt,ct,zt,ut,Mt,pt,O]),[Tn,In]=r.useState(),Bn=r.useCallback(((e,t)=>{var n,r,i;const o=g;if(v(void 0),In(void 0),t)return;const[l,a]=e.location,[s,u]=null!=(n=bn.current)?n:[],c=()=>{An.current=!0},d=e=>{var t,n,r;if(s===l&&u===a&&(null==H||H([l-pt,a],{...e,preventDefault:c})),void 0!==xt.current)if(!0===(null==o?void 0:o.fillHandle))Fn(xt.current.cell[1]!==xt.current.range.y);else if(void 0!==xt.current&&void 0!==(null==(n=null==(t=null==o?void 0:o.previousSelection)?void 0:t.current)?void 0:n.cell)&&!An.current){const[t,n]=xt.current.cell,[i,s]=o.previousSelection.current.cell,u=on([l,a]),c=u.kind===Se.Custom?void 0:rn[u.kind];if(void 0!==c&&void 0!==c.onClick){const t=c.onClick(u,e.localEventX,e.localEventY,e.bounds);void 0!==t&&!Ke(t)&&We(t)&&(qt([{location:e.location,value:t}]),null==(r=Xt.current)||r.damage([{cell:e.location}]))}if(l===t&&l===i&&a===n&&a===s)return null==z||z([l-pt,a]),un(e.bounds,!1),!0}return!1},h=e.location[0]-pt;if(e.isTouch){const t=tn.current,n=Dn.current;if(t.x!==n.x||t.y!==n.y)return;if(!0===e.isLongTouch){if("cell"===e.kind&&(null==(r=null==xt?void 0:xt.current)?void 0:r.cell[0])===l&&(null==(i=null==xt?void 0:xt.current)?void 0:i.cell[1])===a)return void(null==K||K([h,e.location[1]],{...e,preventDefault:c}));if("header"===e.kind&&xt.columns.hasIndex(l))return void(null==X||X(h,{...e,preventDefault:c}));if(e.kind===Be){if(h<0)return;return void(null==G||G(h,{...e,preventDefault:c}))}}"cell"===e.kind?d(e)||wn(e):e.kind===Be?null==W||W(h,{...e,preventDefault:c}):wn(e)}else{if("header"===e.kind){if(h<0)return;e.isEdge?Rn(l):0===e.button&&l===s&&a===u&&(null==N||N(h,{...e,preventDefault:c}))}if(e.kind===Be){if(h<0)return;0===e.button&&l===s&&a===u&&(null==W||W(h,{...e,preventDefault:c}),An.current||Sn(e))}"cell"===e.kind&&0===e.button&&d(e),bn.current=void 0}}),[g,xt,H,pt,Fn,on,qt,z,un,K,X,G,wn,Rn,N,W,Sn]),On=r.useCallback((e=>{const t={...e,location:[e.location[0]-pt,e.location[1]]};null==fe||fe(t),In((t=>{var n,r;return e.scrollEdge[0]===(null==t?void 0:t[0])&&e.scrollEdge[1]===t[1]?t:void 0===g||(null!=(r=null==(n=xn.current)?void 0:n.location[0])?r:0)<pt?void 0:e.scrollEdge}))}),[g,fe,pt]);!function(e,t){const n=i.a.useRef(0),[r,o]=null!=e?e:[0,0];i.a.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])}(Tn,m);const Pn=r.useCallback(((e,t)=>{null==De||De(e-pt,t)}),[De,pt]),Hn=null==(o=null==xt?void 0:xt.current)?void 0:o.cell,zn=r.useCallback(((e,t,n,r,i,o)=>{let l=Hn;void 0!==l&&(l=[l[0]-pt,l[1]]);const a={...e,x:e.x-pt,height:gt&&e.y+e.height>=O?e.height-1:e.height,tx:i,ty:o,extras:{selected:l,freezeRegion:0===ve?void 0:{x:0,y:e.y,width:ve,height:e.height}}};Lt([t,n,r]),Kt(a),tn.current=a,null==He||He(a,a.tx,a.ty,a.extras)}),[ve,Hn,He,pt,O,gt]),_n=Ze(te,r.useCallback(((e,t)=>{null==te||te(e-pt,t-pt),"none"!==le&&Ht(Ge.fromSingleSelection(t),void 0,!0)}),[le,te,pt,Ht])),Ln=r.useRef(!1),$n=r.useCallback((e=>{0===e.location[0]&&pt>0?e.preventDefault():(null==he||he({...e,location:[e.location[0]-pt,e.location[1]]}),e.defaultPrevented()||(Ln.current=!0),v(void 0))}),[he,pt]),Nn=r.useCallback((()=>{Ln.current=!1}),[]),jn=r.useCallback((e=>{if(void 0!==g&&void 0!==xt.current&&!Ln.current&&("rect"===oe||"multi-rect"===oe)){const[t,n]=xt.current.cell;let[r,i]=e.location;i<0&&(i=tn.current.y);const o=vt&&n===O;if(vt&&i===O||o)return;r=Math.max(r,pt);const l=r-t,a=i-n,s={x:l>=0?t:r,y:a>=0?n:i,width:Math.abs(l)+1,height:Math.abs(a)+1};Ot({...xt.current,range:s},!0,!1,"drag")}null==Ae||Ae({...e,location:[e.location[0]-pt,e.location[1]]})}),[g,xt,oe,Ae,pt,vt,O,Ot]),Wn=r.useCallback((e=>{if(void 0===xt.current)return;const[t,n]=e,[r,i]=xt.current.cell,o=xt.current.range;let l=o.x,a=o.x+o.width,s=o.y,u=o.y+o.height;if(0!==n)switch(n){case 2:u=O,s=i,dn(0,u,"vertical");break;case-2:s=0,u=i+1,dn(0,s,"vertical");break;case 1:s<i?(s++,dn(0,s,"vertical")):(u=Math.min(O,u+1),dn(0,u,"vertical"));break;case-1:u>i+1?(u--,dn(0,u,"vertical")):(s=Math.max(0,s-1),dn(0,s,"vertical"));break;default:ye()}if(0!==t)if(2===t)a=Jt.length,l=r,dn(a-1-pt,0,"horizontal");else if(-2===t)l=pt,a=r+1,dn(l-pt,0,"horizontal");else{let e=[];if(void 0!==kt){const t=kt({x:l,y:s,width:a-l-pt,height:u-s},Ct.current.signal);"object"===typeof t&&(e=function(e){return D()(C()(C()(e).filter((e=>void 0!==e.span)).map((e=>{var t,n,r,i;return E()((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(l<r){if(e.length>0){const n=E()(l+1,r+1).find((t=>!e.includes(t-pt)));void 0!==n&&(l=n,t=!0)}else l++,t=!0;t&&dn(l,0,"horizontal")}t||(a=Math.min(Jt.length,a+1),dn(a-1-pt,0,"horizontal"))}else if(-1===t){let t=!1;if(a>r+1){if(e.length>0){const n=E()(a-1,r,-1).find((t=>!e.includes(t-pt)));void 0!==n&&(a=n,t=!0)}else a--,t=!0;t&&dn(a-pt,0,"horizontal")}t||(l=Math.max(pt,l-1),dn(l-pt,0,"horizontal"))}else ye()}Ot({cell:xt.current.cell,range:{x:l,y:s,width:a-l,height:u-s}},!0,!1,"keyboard-select")}),[kt,xt,Jt.length,pt,O,dn,Ot]),Un=r.useCallback(((e,t,n,r)=>{const i=Gt-(n?0:1);if(e=w()(e,pt,$t.length-1+pt),t=w()(t,0,i),e===(null==Hn?void 0:Hn[0])&&t===(null==Hn?void 0:Hn[1]))return!1;if(r&&void 0!==xt.current){const n=[...xt.current.rangeStack];(xt.current.range.width>1||xt.current.range.height>1)&&n.push(xt.current.range),At({...xt,current:{cell:[e,t],range:{x:e,y:t,width:1,height:1},rangeStack:n}},!0)}else Ot({cell:[e,t],range:{x:e,y:t,width:1,height:1}},!0,!1,"keyboard-nav");return void 0!==y.current&&y.current[0]===e&&y.current[1]===t&&(y.current=void 0),dn(e-pt,t),!0}),[Gt,pt,$t.length,Hn,xt,dn,At,Ot]),Vn=r.useCallback(((e,t)=>{void 0!==(null==h?void 0:h.cell)&&void 0!==e&&We(e)&&(qt([{location:h.cell,value:e}]),window.requestAnimationFrame((()=>{var e;null==(e=Xt.current)||e.damage([{cell:h.cell}])}))),Yt(!0),f(void 0);const[n,r]=t;if(void 0!==xt.current&&(0!==n||0!==r)){const t=xt.current.cell[1]===Gt-1&&void 0!==e;Un(w()(xt.current.cell[0]+n,0,Jt.length-1),w()(xt.current.cell[1]+r,0,Gt-1),t,!1)}null==_||_(e,t)}),[null==h?void 0:h.cell,Yt,xt,_,qt,Gt,Un,Jt.length]),Xn=r.useMemo((()=>"gdg-overlay-"+vr++),[]),Yn=r.useCallback((e=>{(async()=>{var t,n,r,i;const o=void 0!==h,{altKey:l,shiftKey:a,metaKey:s,ctrlKey:u,key:c,bounds:d}=e,p=Kn.value,g=p?s:u,v="Delete"===c||p&&"Backspace"===c,m=tn.current,y=xt.columns,w=xt.rows;if("Escape"===c)return void(o?f(void 0):dt.clear&&(At(br,!1),null==Me||Me()));if(ar("primary+a",e)&&dt.selectAll){if(o){const e=document.getElementById(Xn);if(null!==e){const t=window.getSelection(),n=document.createRange();n.selectNodeContents(e),null==t||t.removeAllRanges(),null==t||t.addRange(n)}}else At({columns:Ge.empty(),rows:Ge.empty(),current:{cell:null!=(n=null==(t=xt.current)?void 0:t.cell)?n:[pt,0],range:{x:pt,y:0,width:B.length,height:O},rangeStack:[]}},!1);return void e.cancel()}function b(e){var t,n,r;Yt();const i=[];for(let o=e.x;o<e.x+e.width;o++)for(let r=e.y;r<e.y+e.height;r++){const e=P([o-pt,r]);let l;if(e.kind===Se.Custom){const n=null==Qe?void 0:Qe(e);Ve(n)&&(l=null==(t=null==n?void 0:n.deletedValue)?void 0:t.call(n,e))}else if(We(e)&&e.allowOverlay||e.kind===Se.Boolean){const t=rn[e.kind];l=null==(n=t.onDelete)?void 0:n.call(t,e)}void 0!==l&&!Ke(l)&&We(l)&&i.push({location:[o,r],value:l})}qt(i),null==(r=Xt.current)||r.damage(i.map((e=>({cell:e.location}))))}if(ar("primary+f",e)&&dt.search&&(e.cancel(),yt(!0)),v){const t=null==(r=null==Bt?void 0:Bt(xt))||r;if(e.cancel(),!1!==t){const e=!0===t?xt:t;if(void 0!==e.current){b(e.current.range);for(const t of e.current.rangeStack)b(t)}for(const t of e.rows)b({x:pt,y:t,width:Jt.length-pt,height:1});for(const t of e.columns)b({x:t,y:0,width:1,height:O})}return}if(void 0===xt.current)return;let[D,x]=xt.current.cell,C=!1;if(dt.selectColumn&&ar("ctrl+ ",e)&&"none"!==le)y.hasIndex(D)?Ht(y.remove(D),void 0,!0):"single"===le?Ht(Ge.fromSingleSelection(D),void 0,!0):Ht(void 0,D,!0);else if(dt.selectRow&&ar("shift+ ",e)&&"none"!==ae)w.hasIndex(x)?Pt(w.remove(x),void 0,!0):"single"===ae?Pt(Ge.fromSingleSelection(x),void 0,!0):Pt(void 0,x,!0);else if((ar("Enter",e)||ar(" ",e)||ar("shift+Enter",e))&&void 0!==d)o?(f(void 0),ar("Enter",e)?x++:ar("shift+Enter",e)&&x--):x===O&&gt?window.setTimeout((()=>{const e=vn(D);gn(null!=e?e:D)}),0):(null==z||z([D-pt,x]),un(d,!0),e.cancel());else if(dt.downFill&&ar("primary+_68",e)&&xt.current.range.height>1)Fn(!1),e.cancel();else if(dt.rightFill&&ar("primary+_82",e)&&xt.current.range.width>1){const t=[],n=xt.current.range;for(let e=0;e<n.height;e++){const r=e+n.y,i=on([n.x,r]);if(!Ke(i)&&Ue(i))for(let e=1;e<n.width;e++){const o=[e+n.x,r];t.push({location:o,value:{...i}})}}qt(t),null==(i=Xt.current)||i.damage(t.map((e=>({cell:e.location})))),e.cancel()}else if(dt.pageDown&&ar("PageDown",e))x+=Math.max(1,tn.current.height-4),e.cancel();else if(dt.pageUp&&ar("PageUp",e))x-=Math.max(1,tn.current.height-4),e.cancel();else if(dt.first&&ar("primary+Home",e))f(void 0),x=0,D=0;else if(dt.last&&ar("primary+End",e))f(void 0),x=Number.MAX_SAFE_INTEGER,D=Number.MAX_SAFE_INTEGER;else if(dt.first&&ar("primary+shift+Home",e))f(void 0),Wn([-2,-2]);else if(dt.last&&ar("primary+shift+End",e))f(void 0),Wn([2,2]);else if("ArrowDown"===c){if(u&&l)return;f(void 0),!a||"rect"!==oe&&"multi-rect"!==oe?(l&&!g&&(C=!0),g&&!l?x=O-1:x+=1):Wn([0,g&&!l?2:1])}else if("ArrowUp"===c||"Home"===c){const e="Home"===c||g;f(void 0),!a||"rect"!==oe&&"multi-rect"!==oe?(l&&!e&&(C=!0),x+=e&&!l?Number.MIN_SAFE_INTEGER:-1):Wn([0,e&&!l?-2:-1])}else if("ArrowRight"===c||"End"===c){const e="End"===c||g;f(void 0),!a||"rect"!==oe&&"multi-rect"!==oe?(l&&!e&&(C=!0),D+=e&&!l?Number.MAX_SAFE_INTEGER:1):Wn([e&&!l?2:1,0])}else if("ArrowLeft"===c)f(void 0),!a||"rect"!==oe&&"multi-rect"!==oe?(l&&!g&&(C=!0),D+=g&&!l?Number.MIN_SAFE_INTEGER:-1):Wn([g&&!l?-2:-1,0]);else if("Tab"===c)f(void 0),a?D--:D++;else if(!s&&!u&&void 0!==xt.current&&1===c.length&&/[ -~]/g.test(c)&&void 0!==d&&Ue(P([D-pt,Math.max(0,x-1)]))){if((!vt||x!==O)&&(m.y>x||x>m.y+m.height||m.x>D||D>m.x+m.width))return;un(d,!0,c),e.cancel()}Un(D,x,!1,C)&&e.cancel()})()}),[h,xt,dt.selectAll,dt.search,dt.selectColumn,dt.selectRow,dt.downFill,dt.rightFill,dt.pageDown,dt.pageUp,dt.first,dt.last,dt.clear,le,ae,P,pt,Un,At,Me,B.length,O,Xn,Yt,qt,Qe,Bt,Jt.length,Ht,Pt,gt,vn,gn,z,un,Fn,on,Wn,oe,vt]),Gn=r.useCallback((async e=>{var t,n,r,i,o,l,a;if(!dt.paste)return;function s(e,t,n){if(!Ke(e)&&Ue(e)&&!0!==e.readonly){const r=null==L?void 0:L(n,e);if(void 0!==r&&We(r))return r.kind!==e.kind&&console.warn("Coercion should not change cell kind."),{location:t,value:r};switch(e.kind){case Se.Text:case Se.Markdown:case Se.Uri:return{location:t,value:{...e,data:n}};case Se.Number:{const r=Number.parseFloat(n);return Number.isNaN(r)?void 0:{location:t,value:{...e,data:r}}}case Se.Custom:return{location:t,value:{...e,copyData:n}};case Se.Boolean:{let r=Re;return"true"===n.toLowerCase()?r=!0:"false"===n.toLowerCase()?r=!1:"indeterminate"===n.toLowerCase()&&(r=Te),{location:t,value:{...e,data:r}}}default:ye()}}}const u=xt.columns,c=xt.rows,d=!0===(null==(t=m.current)?void 0:t.contains(document.activeElement))||!0===(null==(n=p.current)?void 0:n.contains(document.activeElement));let h=null==(r=xt.current)?void 0:r.cell;if(void 0===h&&1===u.length&&(h=[null!=(i=u.first())?i:0,0]),void 0===h&&1===c.length&&(h=[pt,null!=(o=c.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=cr(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=cr(o))}void 0===t&&e.clipboardData.types.includes(r)&&(n=e.clipboardData.getData(r))}const[o,u]=h,c=[];do{if(void 0===pe){const e=s(on(h),h,null!=(l=null!=n?n:null==t?void 0:t.map((e=>e.join("\t"))).join("\t"))?l:"");void 0!==e&&c.push(e);break}if(void 0===t){if(void 0===n)return;t=ur(n)}if(!1===pe||"function"===typeof pe&&!0!==(null==pe?void 0:pe([h[0]-pt,h[1]],t)))return;for(const[e,n]of t.entries()){if(e+u>=O)break;for(const[t,r]of n.entries()){const n=[t+o,e+u],i=s(on(n),n,r);void 0!==i&&c.push(i)}}}while(0);qt(c),null==(a=Xt.current)||a.damage(c.map((e=>({cell:e.location}))))}}),[L,on,xt,dt.paste,qt,pe,pt,O]);qe("paste",Gn,window,!1,!0);const qn=r.useCallback((async(e,t)=>{var n,r;if(!dt.copy)return;const i=!0===t||!0===(null==(n=m.current)?void 0:n.contains(document.activeElement))||!0===(null==(r=p.current)?void 0:r.contains(document.activeElement)),o=xt.columns,l=xt.rows;if(i&&void 0!==kt)if(void 0!==xt.current){let t=kt(xt.current.range,Ct.current.signal);"object"!==typeof t&&(t=await t()),hr(t,E()(xt.current.range.x-pt,xt.current.range.x+xt.current.range.width-pt),e)}else if(void 0!==l&&l.length>0){const t=[...l].map((e=>{const t=kt({x:pt,y:e,width:B.length-pt,height:1},Ct.current.signal);return"object"===typeof t?t[0]:t().then((e=>e[0]))}));if(t.some((e=>e instanceof Promise))){hr(await Promise.all(t),E()(B.length),e)}else hr(t,E()(B.length),e)}else if(o.length>0){const t=[],n=[];for(const e of o){let r=kt({x:e,y:0,width:1,height:O},Ct.current.signal);"object"!==typeof r&&(r=await r()),t.push(r),n.push(e-pt)}if(1===t.length)hr(t[0],n,e);else{hr(t.reduce(((e,t)=>e.map(((e,n)=>[...e,...t[n]])))),n,e)}}}),[B.length,kt,xt,dt.copy,pt,O]);qe("copy",qn,window,!1,!1);const Zn=r.useCallback(((e,t)=>{if(0===e.length||-1===t)return;const[n,r]=e[t];void 0!==y.current&&y.current[0]===n&&y.current[1]===r||(y.current=[n,r],Un(n,r,!1,!1))}),[Un]),[Qn,Jn]=null!=(a=null==(l=null==ze?void 0:ze.current)?void 0:l.cell)?a:[],er=r.useRef(dn);er.current=dn,r.useEffect((()=>{void 0!==Qn&&void 0!==Jn&&er.current(Qn,Jn)}),[Qn,Jn]);const tr=r.useMemo((()=>!0===gt&&!0===(null==Je?void 0:Je.tint)?Ge.fromSingleSelection(Gt-1):Ge.empty()),[Gt,gt,null==Je?void 0:Je.tint]),rr=r.useCallback((e=>{var t;return"boolean"===typeof et?et:null==(t=null==et?void 0:et(e-pt))||t}),[pt,et]),sr=r.useMemo((()=>{if(void 0===kn||null===p.current)return null;const{bounds:e,group:t}=kn,n=p.current.getBoundingClientRect();return r.createElement(ir,{bounds:e,group:t,canvasBounds:n,onClose:()=>En(void 0),onFinish:e=>{En(void 0),null==q||q(t,e)}})}),[q,kn]),dr=Math.min(Jt.length,ve+(ft?1:0));r.useImperativeHandle(t,(()=>({appendRow:e=>gn(e+pt),updateCells:e=>{var t;return 0!==pt&&(e=e.map((e=>({cell:[e.cell[0]+pt,e.cell[1]]})))),null==(t=Xt.current)?void 0:t.damage(e)},getBounds:(e,t)=>{var n;return null==(n=Xt.current)?void 0:n.getBounds(e+pt,t)},focus:()=>{var e;return null==(e=Xt.current)?void 0:e.focus()},emit:async e=>{switch(e){case"delete":Yn({bounds:void 0,cancel:()=>{},ctrlKey:!1,key:"Delete",keyCode:46,metaKey:!1,shiftKey:!1,altKey:!1});break;case"fill-right":Yn({bounds:void 0,cancel:()=>{},ctrlKey:!0,key:"r",keyCode:82,metaKey:!1,shiftKey:!1,altKey:!1});break;case"fill-down":Yn({bounds:void 0,cancel:()=>{},ctrlKey:!0,key:"d",keyCode:68,metaKey:!1,shiftKey:!1,altKey:!1});break;case"copy":await qn(void 0,!0);break;case"paste":await Gn()}},scrollTo:dn})),[gn,qn,Yn,Gn,pt,dn]);const[fr,pr]=null!=Hn?Hn:[],Dr=r.useCallback((e=>{const[t,n]=e;-1!==n?fr===t&&pr===n||(Ot({cell:e,range:{x:t,y:n,width:1,height:1}},!0,!1,"keyboard-nav"),dn(t,n)):"none"!==le&&(Ht(Ge.fromSingleSelection(t),void 0,!1),Yt())}),[le,Yt,dn,fr,pr,Ot,Ht]),[xr,Cr]=r.useState(!1),kr=r.useRef(F()((e=>{Cr(e)}),5)),Er=r.useCallback((()=>{kr.current(!0),void 0===xt.current&&0===xt.columns.length&&0===xt.rows.length&&void 0===g&&Ot({cell:[pt,Vt],range:{x:pt,y:Vt,width:1,height:1}},!0,!1,"keyboard-select")}),[Vt,xt,g,pt,Ot]),Sr=r.useCallback((()=>{kr.current(!1)}),[]),[Fr,Ar]=r.useMemo((()=>{var t,n;let r;const i=null!=(n=null==(t=e.experimental)?void 0:t.scrollbarWidthOverride)?n:function(){if(void 0!==ot)return ot;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(),ot=n-r}(),o=O+(gt?1:0);if("number"===typeof x)r=jt+o*x;else{let e=0;const t=Math.min(o,10);for(let n=0;n<t;n++)e+=x(n);e=Math.floor(e/t),r=jt+o*e}r+=i;const l=Jt.reduce(((e,t)=>t.width+e),0)+i;return[`${Math.min(1e5,l)}px`,`${Math.min(1e5,r)}px`]}),[Jt,null==(s=e.experimental)?void 0:s.scrollbarWidthOverride,x,O,gt,jt]);return r.createElement(Ee.Provider,{value:zt},r.createElement(gr,{style:Ce(zt),className:U,inWidth:null!=T?T:Fr,inHeight:null!=I?I:Ar},r.createElement(nr,{...st,enableGroups:Nt,onCanvasFocused:Er,onCanvasBlur:Sr,canvasRef:p,onContextMenu:Mn,theme:zt,cellXOffset:Ut,cellYOffset:Vt,accessibilityHeight:Wt.height,onDragEnd:Nn,columns:Jt,drawCustomCell:ie,drawHeader:It,disabledRows:tr,freezeColumns:dr,lockColumns:pt,firstColAccessible:0===pt,getCellContent:on,minColumnWidth:ut,maxColumnWidth:ct,showSearch:wt,onSearchClose:bt,highlightRegions:en,getCellsForSelection:kt,getGroupDetails:ln,headerHeight:k,isFocused:xr,groupHeaderHeight:Nt?ge:0,trailingRowType:gt?!0===(null==Je?void 0:Je.sticky)?"sticky":"appended":"none",onColumnResize:Mt,onColumnResizeEnd:Rt,onColumnResizeStart:Tt,onCellFocused:Dr,onColumnMoved:_n,onDragStart:$n,onHeaderMenuClick:Pn,onItemHovered:jn,isFilling:!0===(null==g?void 0:g.fillHandle),onMouseMove:On,onKeyDown:Yn,onMouseDown:Cn,onMouseUp:Bn,onDragOverCell:tt,onDrop:nt,onSearchResultsChanged:Zn,onVisibleRegionChanged:zn,clientSize:[_t[0],_t[1]],rowHeight:x,rows:Gt,scrollRef:m,selection:xt,translateX:Wt.tx,translateY:Wt.ty,verticalBorder:rr,gridRef:Xt}),sr,void 0!==h&&r.createElement(an,{...h,validateCell:Ft,id:Xn,className:!0===(null==(u=e.experimental)?void 0:u.isSubGrid)?"click-outside-ignore":void 0,provideEditor:Qe,imageEditorOverride:A,onFinishEditing:Vn,markdownDivCreateNode:R})))}))},1391:function(e,t,n){var r,i,o;i=[t,n(1524)],void 0===(o="function"===typeof(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})?r.apply(t,i):r)||(e.exports=o)},1392:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,i=(r=n(194))&&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},1393:function(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=c();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(0)),i=u(n(1392)),o=n(1528),l=u(n(1330)),a=u(n(1391)),s=u(n(1394));function u(e){return e&&e.__esModule?e:{default:e}}function c(){if("function"!==typeof WeakMap)return null;var e=new WeakMap;return c=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})(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}).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})(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=y(e);if(t){var i=y(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return v(this,n)}}function v(e,t){return!t||"object"!==d(t)&&"function"!==typeof t?m(e):t}function m(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function y(e){return(y=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function w(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var b=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,u,c=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),w(m(t=c.call(this,e)),"itemsWrapperRef",void 0),w(m(t),"itemsListRef",void 0),w(m(t),"thumbsRef",void 0),w(m(t),"setItemsWrapperRef",(function(e){t.itemsWrapperRef=e})),w(m(t),"setItemsListRef",(function(e){t.itemsListRef=e})),w(m(t),"setThumbsRef",(function(e,n){t.thumbsRef||(t.thumbsRef=[]),t.thumbsRef[n]=e})),w(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}}))}})),w(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)}})),w(m(t),"onSwipeStart",(function(){t.setState({swiping:!0})})),w(m(t),"onSwipeEnd",(function(){t.setState({swiping:!1})})),w(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})),w(m(t),"slideRight",(function(e){t.moveTo(t.state.firstItem-("number"===typeof e?e:1))})),w(m(t),"slideLeft",(function(e){t.moveTo(t.state.firstItem+("number"===typeof e?e:1))})),w(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,u=-this.state.firstItem*(this.state.itemSize||0),c=(0,l.default)(u,"px",this.props.axis),d=this.props.transitionTime+"ms";return t={WebkitTransform:c,MozTransform:c,MsTransform:c,OTransform:c,transform:c,msTransform:c,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),u&&f(t,u),d}(r.Component);t.default=b,w(b,"displayName","Thumbs"),w(b,"defaultProps",{axis:"horizontal",labels:{leftArrow:"previous slide / item",rightArrow:"next slide / item",item:"slide item"},selectedItem:0,thumbWidth:80,transitionTime:350})},1394:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default=function(){return window}},1395:function(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(0),o=(r=n(1330))&&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}},1511:function(e,t){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}},1512:function(e,t,n){var r=n(1513);e.exports=function(e){return e&&e.length?r(e):[]}},1513:function(e,t,n){var r=n(471),i=n(1323),o=n(1328),l=n(472),a=n(1514),s=n(473);e.exports=function(e,t,n){var u=-1,c=i,d=e.length,h=!0,f=[],p=f;if(n)h=!1,c=o;else if(d>=200){var g=t?null:a(e);if(g)return s(g);h=!1,c=l,p=new r}else p=t?[]:f;e:for(;++u<d;){var v=e[u],m=t?t(v):v;if(v=n||0!==v?v:0,h&&m===m){for(var y=p.length;y--;)if(p[y]===m)continue e;t&&p.push(m),f.push(v)}else c(p,m,n)||(p!==f&&p.push(m),f.push(v))}return f}},1514:function(e,t,n){var r=n(475),i=n(1515),o=n(473),l=r&&1/o(new r([,-0]))[1]==1/0?function(e){return new r(e)}:i;e.exports=l},1515:function(e,t){e.exports=function(){}},1516:function(e,t,n){var r=n(1517);e.exports=function(e){return(null==e?0:e.length)?r(e,1):[]}},1517:function(e,t,n){var r=n(312),i=n(1518);e.exports=function e(t,n,o,l,a){var s=-1,u=t.length;for(o||(o=i),a||(a=[]);++s<u;){var c=t[s];n>0&&o(c)?n>1?e(c,n-1,o,l,a):r(a,c):l||(a[a.length]=c)}return a}},1518:function(e,t,n){var r=n(164),i=n(242),o=n(72),l=r?r.isConcatSpreadable:void 0;e.exports=function(e){return o(e)||i(e)||!!(l&&e&&e[l])}},1519:function(e,t,n){var r=n(81);e.exports=function(){return r.Date.now()}},1520:function(e,t,n){var r=n(1521),i=n(478);e.exports=function(e,t){return null!=e&&i(e,t,r)}},1521:function(e,t){var n=Object.prototype.hasOwnProperty;e.exports=function(e,t){return null!=e&&n.call(e,t)}},1522:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"Carousel",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(t,"CarouselProps",{enumerable:!0,get:function(){return i.CarouselProps}}),Object.defineProperty(t,"Thumbs",{enumerable:!0,get:function(){return o.default}});var r=l(n(1523)),i=n(1531),o=l(n(1393));function l(e){return e&&e.__esModule?e:{default:e}}},1523:function(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(0)),i=d(n(1391)),o=d(n(1392)),l=d(n(1393)),a=d(n(1529)),s=d(n(1394)),u=n(1395),c=n(1530);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})(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}).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 v(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){C(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 m(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 y(e,t){return(y=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function w(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 b(this,n)}}function b(e,t){return!t||"object"!==f(t)&&"function"!==typeof t?D(e):t}function D(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)})(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}var k=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&&y(e,t)}(f,e);var t,n,d,h=w(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),C(D(t=h.call(this,e)),"thumbsRef",void 0),C(D(t),"carouselWrapperRef",void 0),C(D(t),"listRef",void 0),C(D(t),"itemsRef",void 0),C(D(t),"timer",void 0),C(D(t),"animationHandler",void 0),C(D(t),"setThumbsRef",(function(e){t.thumbsRef=e})),C(D(t),"setCarouselWrapperRef",(function(e){t.carouselWrapperRef=e})),C(D(t),"setListRef",(function(e){t.listRef=e})),C(D(t),"setItemsRef",(function(e,n){t.itemsRef||(t.itemsRef=[]),t.itemsRef[n]=e})),C(D(t),"autoPlay",(function(){r.Children.count(t.props.children)<=1||(t.clearAutoPlay(),t.props.autoPlay&&(t.timer=setTimeout((function(){t.increment()}),t.props.interval)))})),C(D(t),"clearAutoPlay",(function(){t.timer&&clearTimeout(t.timer)})),C(D(t),"resetAutoPlay",(function(){t.clearAutoPlay(),t.autoPlay()})),C(D(t),"stopOnHover",(function(){t.setState({isMouseEntered:!0},t.clearAutoPlay)})),C(D(t),"startOnLeave",(function(){t.setState({isMouseEntered:!1},t.autoPlay)})),C(D(t),"isFocusWithinTheCarousel",(function(){return!!t.carouselWrapperRef&&!((0,a.default)().activeElement!==t.carouselWrapperRef&&!t.carouselWrapperRef.contains((0,a.default)().activeElement))})),C(D(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()}})),C(D(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()}}})),C(D(t),"setMountState",(function(){t.setState({hasMount:!0}),t.updateSizes()})),C(D(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})))})),C(D(t),"handleOnChange",(function(e,n){r.Children.count(t.props.children)<=1||t.props.onChange(e,n)})),C(D(t),"handleClickThumb",(function(e,n){t.props.onClickThumb(e,n),t.moveTo(e)})),C(D(t),"onSwipeStart",(function(e){t.setState({swiping:!0}),t.props.onSwipeStart(e)})),C(D(t),"onSwipeEnd",(function(e){t.setState({swiping:!1,cancelClick:!1,swipeMovementStarted:!1}),t.props.onSwipeEnd(e),t.clearAutoPlay(),t.state.autoPlay&&t.autoPlay()})),C(D(t),"onSwipeMove",(function(e,n){t.props.onSwipeMove(n);var r=t.props.swipeAnimationHandler(e,t.props,t.state,t.setState.bind(D(t)));return t.setState(v({},r)),!!Object.keys(r).length})),C(D(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))})),C(D(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))})),C(D(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()}})),C(D(t),"onClickNext",(function(){t.increment(1)})),C(D(t),"onClickPrev",(function(){t.decrement(1)})),C(D(t),"onSwipeForward",(function(){t.increment(1),t.props.emulateTouch&&t.setState({cancelClick:!0})})),C(D(t),"onSwipeBackwards",(function(){t.decrement(1),t.props.emulateTouch&&t.setState({cancelClick:!0})})),C(D(t),"changeItem",(function(e){return function(n){(0,u.isKeyboardEvent)(n)&&"Enter"!==n.key||t.moveTo(e)}})),C(D(t),"selectItem",(function(e){t.setState(v({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])})),C(D(t),"getInitialImage",(function(){var e=t.props.selectedItem,n=t.itemsRef&&t.itemsRef[e];return(n&&n.getElementsByTagName("img")||[])[0]})),C(D(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&&c.fadeAnimationHandler||c.slideAnimationHandler,t.state=v(v({},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(v({},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=v(v({},s),{},{minWidth:t.props.centerSlidePercentage+"%"})),t.state.swiping&&t.state.swipeMovementStarted&&(s=v(v({},s),{},{pointerEvents:"none"}));var u={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",u,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,u=this.renderItems(!0),c=u.shift(),d=u.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=v(v({},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&&c):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&&c)),this.props.renderArrowNext(this.onClickNext,s,this.props.labels.rightArrow),this.renderStatus()),this.renderThumbs())}}])&&m(t.prototype,n),d&&m(t,d),f}(r.default.Component);t.default=k,C(k,"displayName","Carousel"),C(k,"defaultProps",{ariaLabel:void 0,axis:"horizontal",centerSlidePercentage:80,interval:3e3,labels:{leftArrow:"previous slide / item",rightArrow:"next slide / item",item:"slide item"},onClickItem:u.noop,onClickThumb:u.noop,onChange:u.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:u.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:c.slideSwipeAnimationHandler,stopSwipingHandler:c.slideStopSwipingHandler})},1524:function(e,t,n){var r,i,o;i=[t,n(0),n(1525)],void 0===(o="function"===typeof(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 u=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 c(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(m){}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 v=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=c(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),u(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);v.displayName="ReactSwipe",v.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},v.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=v})?r.apply(t,i):r)||(e.exports=o)},1525:function(e,t,n){e.exports=n(1526)()},1526:function(e,t,n){"use strict";var r=n(1527);function i(){}function o(){}o.resetWarningCache=i,e.exports=function(){function e(e,t,n,i,o,l){if(l!==r){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:o,resetWarningCache:i};return n.PropTypes=n,n}},1527:function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},1528:function(e,t,n){"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)}},1529:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default=function(){return document}},1530:function(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(0),o=(r=n(1330))&&r.__esModule?r:{default:r},l=n(1395);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){u(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 u(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,u=i.Children.count(e.children)-1;if(e.infiniteLoop&&(r<0||r>u))return a<0?e.centerMode&&e.centerSlidePercentage&&"horizontal"===e.axis?n.itemListStyle=(0,l.setPosition)(-(u+2)*e.centerSlidePercentage-(100-e.centerSlidePercentage)/2,e.axis):n.itemListStyle=(0,l.setPosition)(100*-(u+2),e.axis):a>u&&(n.itemListStyle=(0,l.setPosition)(0,e.axis)),n;var c=(0,l.getPosition)(r,e),d=(0,o.default)(c,"%",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),u=(0,l.getPosition)(n.selectedItem,t),c=t.infiniteLoop?(0,l.getPosition)(s-1,t)-100:(0,l.getPosition)(s-1,t),d=a?e.x:e.y,h=d;0===u&&d>0&&(h=0),u===c&&d<0&&(h=0);var f=u+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)}}},1531:function(e,t,n){},1532:function(e,t,n){!function(e){"use strict";function t(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 n(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function r(e,t){if(e){if("string"===typeof e)return i(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?i(e,t):void 0}}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function o(e,t){var n="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=r(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var i=0;return function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function l(){return{baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}function a(t){e.defaults=t}e.defaults=l();var s=/[&<>"']/,u=/[&<>"']/g,c=/[<>"']|&(?!#?\w+;)/,d=/[<>"']|&(?!#?\w+;)/g,h={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},f=function(e){return h[e]};function p(e,t){if(t){if(s.test(e))return e.replace(u,f)}else if(c.test(e))return e.replace(d,f);return e}var g=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function v(e){return e.replace(g,(function(e,t){return"colon"===(t=t.toLowerCase())?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""}))}var m=/(^|[^\[])\^/g;function y(e,t){e="string"===typeof e?e:e.source,t=t||"";var n={replace:function(t,r){return r=(r=r.source||r).replace(m,"$1"),e=e.replace(t,r),n},getRegex:function(){return new RegExp(e,t)}};return n}var w=/[^\w:]/g,b=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function D(e,t,n){if(e){var r;try{r=decodeURIComponent(v(n)).replace(w,"").toLowerCase()}catch(i){return null}if(0===r.indexOf("javascript:")||0===r.indexOf("vbscript:")||0===r.indexOf("data:"))return null}t&&!b.test(n)&&(n=S(t,n));try{n=encodeURI(n).replace(/%25/g,"%")}catch(i){return null}return n}var x={},C=/^[^:]+:\/*[^/]*$/,k=/^([^:]+:)[\s\S]*$/,E=/^([^:]+:\/*[^/]*)[\s\S]*$/;function S(e,t){x[" "+e]||(C.test(e)?x[" "+e]=e+"/":x[" "+e]=R(e,"/",!0));var n=-1===(e=x[" "+e]).indexOf(":");return"//"===t.substring(0,2)?n?t:e.replace(k,"$1")+t:"/"===t.charAt(0)?n?t:e.replace(E,"$1")+t:e+t}var F={exec:function(){}};function A(e){for(var t,n,r=1;r<arguments.length;r++)for(n in t=arguments[r])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}function M(e,t){var n=e.replace(/\|/g,(function(e,t,n){for(var r=!1,i=t;--i>=0&&"\\"===n[i];)r=!r;return r?"|":" |"})).split(/ \|/),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 R(e,t,n){var r=e.length;if(0===r)return"";for(var i=0;i<r;){var 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 T(e,t){if(-1===e.indexOf(t[1]))return-1;for(var n=e.length,r=0,i=0;i<n;i++)if("\\"===e[i])i++;else if(e[i]===t[0])r++;else if(e[i]===t[1]&&--r<0)return i;return-1}function I(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")}function B(e,t){if(t<1)return"";for(var n="";t>1;)1&t&&(n+=e),t>>=1,e+=e;return n+e}function O(e,t,n,r){var i=t.href,o=t.title?p(t.title):null,l=e[1].replace(/\\([\[\]])/g,"$1");if("!"!==e[0].charAt(0)){r.state.inLink=!0;var a={type:"link",raw:n,href:i,title:o,text:l,tokens:r.inlineTokens(l,[])};return r.state.inLink=!1,a}return{type:"image",raw:n,href:i,title:o,text:p(l)}}function P(e,t){var n=e.match(/^(\s+)(?:```)/);if(null===n)return t;var r=n[1];return t.split("\n").map((function(e){var t=e.match(/^\s+/);return null===t?e:t[0].length>=r.length?e.slice(r.length):e})).join("\n")}var H=function(){function t(t){this.options=t||e.defaults}var n=t.prototype;return n.space=function(e){var t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}},n.code=function(e){var t=this.rules.block.code.exec(e);if(t){var n=t[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?n:R(n,"\n")}}},n.fences=function(e){var t=this.rules.block.fences.exec(e);if(t){var n=t[0],r=P(n,t[3]||"");return{type:"code",raw:n,lang:t[2]?t[2].trim():t[2],text:r}}},n.heading=function(e){var t=this.rules.block.heading.exec(e);if(t){var n=t[2].trim();if(/#$/.test(n)){var r=R(n,"#");this.options.pedantic?n=r.trim():r&&!/ $/.test(r)||(n=r.trim())}var i={type:"heading",raw:t[0],depth:t[1].length,text:n,tokens:[]};return this.lexer.inline(i.text,i.tokens),i}},n.hr=function(e){var t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:t[0]}},n.blockquote=function(e){var t=this.rules.block.blockquote.exec(e);if(t){var n=t[0].replace(/^ *>[ \t]?/gm,"");return{type:"blockquote",raw:t[0],tokens:this.lexer.blockTokens(n,[]),text:n}}},n.list=function(e){var t=this.rules.block.list.exec(e);if(t){var n,r,i,l,a,s,u,c,d,h,f,p,g=t[1].trim(),v=g.length>1,m={type:"list",raw:"",ordered:v,start:v?+g.slice(0,-1):"",loose:!1,items:[]};g=v?"\\d{1,9}\\"+g.slice(-1):"\\"+g,this.options.pedantic&&(g=v?g:"[*+-]");for(var y=new RegExp("^( {0,3}"+g+")((?:[\t ][^\\n]*)?(?:\\n|$))");e&&(p=!1,t=y.exec(e))&&!this.rules.block.hr.test(e);){if(n=t[0],e=e.substring(n.length),c=t[2].split("\n",1)[0],d=e.split("\n",1)[0],this.options.pedantic?(l=2,f=c.trimLeft()):(l=(l=t[2].search(/[^ ]/))>4?1:l,f=c.slice(l),l+=t[1].length),s=!1,!c&&/^ *$/.test(d)&&(n+=d+"\n",e=e.substring(d.length+1),p=!0),!p)for(var w=new RegExp("^ {0,"+Math.min(3,l-1)+"}(?:[*+-]|\\d{1,9}[.)])((?: [^\\n]*)?(?:\\n|$))"),b=new RegExp("^ {0,"+Math.min(3,l-1)+"}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)");e&&(c=h=e.split("\n",1)[0],this.options.pedantic&&(c=c.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),!w.test(c))&&!b.test(e);){if(c.search(/[^ ]/)>=l||!c.trim())f+="\n"+c.slice(l);else{if(s)break;f+="\n"+c}s||c.trim()||(s=!0),n+=h+"\n",e=e.substring(h.length+1)}m.loose||(u?m.loose=!0:/\n *\n *$/.test(n)&&(u=!0)),this.options.gfm&&(r=/^\[[ xX]\] /.exec(f))&&(i="[ ] "!==r[0],f=f.replace(/^\[[ xX]\] +/,"")),m.items.push({type:"list_item",raw:n,task:!!r,checked:i,loose:!1,text:f}),m.raw+=n}m.items[m.items.length-1].raw=n.trimRight(),m.items[m.items.length-1].text=f.trimRight(),m.raw=m.raw.trimRight();var D=m.items.length;for(a=0;a<D;a++){this.lexer.state.top=!1,m.items[a].tokens=this.lexer.blockTokens(m.items[a].text,[]);var x=m.items[a].tokens.filter((function(e){return"space"===e.type})),C=x.every((function(e){for(var t,n=0,r=o(e.raw.split(""));!(t=r()).done;)if("\n"===t.value&&(n+=1),n>1)return!0;return!1}));!m.loose&&x.length&&C&&(m.loose=!0,m.items[a].loose=!0)}return m}},n.html=function(e){var t=this.rules.block.html.exec(e);if(t){var n={type:"html",raw:t[0],pre:!this.options.sanitizer&&("pre"===t[1]||"script"===t[1]||"style"===t[1]),text:t[0]};return this.options.sanitize&&(n.type="paragraph",n.text=this.options.sanitizer?this.options.sanitizer(t[0]):p(t[0]),n.tokens=[],this.lexer.inline(n.text,n.tokens)),n}},n.def=function(e){var t=this.rules.block.def.exec(e);if(t)return t[3]&&(t[3]=t[3].substring(1,t[3].length-1)),{type:"def",tag:t[1].toLowerCase().replace(/\s+/g," "),raw:t[0],href:t[2],title:t[3]}},n.table=function(e){var t=this.rules.block.table.exec(e);if(t){var n={type:"table",header:M(t[1]).map((function(e){return{text:e}})),align:t[2].replace(/^ *|\| *$/g,"").split(/ *\| */),rows:t[3]&&t[3].trim()?t[3].replace(/\n[ \t]*$/,"").split("\n"):[]};if(n.header.length===n.align.length){n.raw=t[0];var r,i,o,l,a=n.align.length;for(r=0;r<a;r++)/^ *-+: *$/.test(n.align[r])?n.align[r]="right":/^ *:-+: *$/.test(n.align[r])?n.align[r]="center":/^ *:-+ *$/.test(n.align[r])?n.align[r]="left":n.align[r]=null;for(a=n.rows.length,r=0;r<a;r++)n.rows[r]=M(n.rows[r],n.header.length).map((function(e){return{text:e}}));for(a=n.header.length,i=0;i<a;i++)n.header[i].tokens=[],this.lexer.inline(n.header[i].text,n.header[i].tokens);for(a=n.rows.length,i=0;i<a;i++)for(l=n.rows[i],o=0;o<l.length;o++)l[o].tokens=[],this.lexer.inline(l[o].text,l[o].tokens);return n}}},n.lheading=function(e){var t=this.rules.block.lheading.exec(e);if(t){var n={type:"heading",raw:t[0],depth:"="===t[2].charAt(0)?1:2,text:t[1],tokens:[]};return this.lexer.inline(n.text,n.tokens),n}},n.paragraph=function(e){var t=this.rules.block.paragraph.exec(e);if(t){var n={type:"paragraph",raw:t[0],text:"\n"===t[1].charAt(t[1].length-1)?t[1].slice(0,-1):t[1],tokens:[]};return this.lexer.inline(n.text,n.tokens),n}},n.text=function(e){var t=this.rules.block.text.exec(e);if(t){var n={type:"text",raw:t[0],text:t[0],tokens:[]};return this.lexer.inline(n.text,n.tokens),n}},n.escape=function(e){var t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:p(t[1])}},n.tag=function(e){var 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]):p(t[0]):t[0]}},n.link=function(e){var t=this.rules.inline.link.exec(e);if(t){var n=t[2].trim();if(!this.options.pedantic&&/^</.test(n)){if(!/>$/.test(n))return;var r=R(n.slice(0,-1),"\\");if((n.length-r.length)%2===0)return}else{var i=T(t[2],"()");if(i>-1){var o=(0===t[0].indexOf("!")?5:4)+t[1].length+i;t[2]=t[2].substring(0,i),t[0]=t[0].substring(0,o).trim(),t[3]=""}}var l=t[2],a="";if(this.options.pedantic){var s=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(l);s&&(l=s[1],a=s[3])}else a=t[3]?t[3].slice(1,-1):"";return l=l.trim(),/^</.test(l)&&(l=this.options.pedantic&&!/>$/.test(n)?l.slice(1):l.slice(1,-1)),O(t,{href:l?l.replace(this.rules.inline._escapes,"$1"):l,title:a?a.replace(this.rules.inline._escapes,"$1"):a},t[0],this.lexer)}},n.reflink=function(e,t){var n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){var r=(n[2]||n[1]).replace(/\s+/g," ");if(!(r=t[r.toLowerCase()])||!r.href){var i=n[0].charAt(0);return{type:"text",raw:i,text:i}}return O(n,r,n[0],this.lexer)}},n.emStrong=function(e,t,n){void 0===n&&(n="");var r=this.rules.inline.emStrong.lDelim.exec(e);if(r&&(!r[3]||!n.match(/(?:[0-9A-Za-z\xAA\xB2\xB3\xB5\xB9\xBA\xBC-\xBE\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u0660-\u0669\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07C0-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0966-\u096F\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09E6-\u09F1\u09F4-\u09F9\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A66-\u0A6F\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AE6-\u0AEF\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B66-\u0B6F\u0B71-\u0B77\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0BE6-\u0BF2\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C66-\u0C6F\u0C78-\u0C7E\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CE6-\u0CEF\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D58-\u0D61\u0D66-\u0D78\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DE6-\u0DEF\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F20-\u0F33\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F-\u1049\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u1090-\u1099\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1369-\u137C\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u17E0-\u17E9\u17F0-\u17F9\u1810-\u1819\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A16\u1A20-\u1A54\u1A80-\u1A89\u1A90-\u1A99\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B50-\u1B59\u1B83-\u1BA0\u1BAE-\u1BE5\u1C00-\u1C23\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2070\u2071\u2074-\u2079\u207F-\u2089\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2150-\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2CFD\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u3192-\u3195\u31A0-\u31BF\u31F0-\u31FF\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA830-\uA835\uA840-\uA873\uA882-\uA8B3\uA8D0-\uA8D9\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA900-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF-\uA9D9\uA9E0-\uA9E4\uA9E6-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA50-\uAA59\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD07-\uDD33\uDD40-\uDD78\uDD8A\uDD8B\uDE80-\uDE9C\uDEA0-\uDED0\uDEE1-\uDEFB\uDF00-\uDF23\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC58-\uDC76\uDC79-\uDC9E\uDCA7-\uDCAF\uDCE0-\uDCF2\uDCF4\uDCF5\uDCFB-\uDD1B\uDD20-\uDD39\uDD80-\uDDB7\uDDBC-\uDDCF\uDDD2-\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE40-\uDE48\uDE60-\uDE7E\uDE80-\uDE9F\uDEC0-\uDEC7\uDEC9-\uDEE4\uDEEB-\uDEEF\uDF00-\uDF35\uDF40-\uDF55\uDF58-\uDF72\uDF78-\uDF91\uDFA9-\uDFAF]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDCFA-\uDD23\uDD30-\uDD39\uDE60-\uDE7E\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF27\uDF30-\uDF45\uDF51-\uDF54\uDF70-\uDF81\uDFB0-\uDFCB\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC52-\uDC6F\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD03-\uDD26\uDD36-\uDD3F\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDD0-\uDDDA\uDDDC\uDDE1-\uDDF4\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDEF0-\uDEF9\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC50-\uDC59\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE50-\uDE59\uDE80-\uDEAA\uDEB8\uDEC0-\uDEC9\uDF00-\uDF1A\uDF30-\uDF3B\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCF2\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDD50-\uDD59\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC50-\uDC6C\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD50-\uDD59\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDDA0-\uDDA9\uDEE0-\uDEF2\uDFB0\uDFC0-\uDFD4]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDE70-\uDEBE\uDEC0-\uDEC9\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF50-\uDF59\uDF5B-\uDF61\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE96\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD50-\uDD52\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD834[\uDEE0-\uDEF3\uDF60-\uDF78]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD837[\uDF00-\uDF1E]|\uD838[\uDD00-\uDD2C\uDD37-\uDD3D\uDD40-\uDD49\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB\uDEF0-\uDEF9]|\uD839[\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDCC7-\uDCCF\uDD00-\uDD43\uDD4B\uDD50-\uDD59]|\uD83B[\uDC71-\uDCAB\uDCAD-\uDCAF\uDCB1-\uDCB4\uDD01-\uDD2D\uDD2F-\uDD3D\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD83C[\uDD00-\uDD0C]|\uD83E[\uDFF0-\uDFF9]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF38\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A])/))){var i=r[1]||r[2]||"";if(!i||i&&(""===n||this.rules.inline.punctuation.exec(n))){var o,l,a=r[0].length-1,s=a,u=0,c="*"===r[0][0]?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(c.lastIndex=0,t=t.slice(-1*e.length+a);null!=(r=c.exec(t));)if(o=r[1]||r[2]||r[3]||r[4]||r[5]||r[6])if(l=o.length,r[3]||r[4])s+=l;else if(!((r[5]||r[6])&&a%3)||(a+l)%3){if(!((s-=l)>0)){if(l=Math.min(l,l+s+u),Math.min(a,l)%2){var d=e.slice(1,a+r.index+l);return{type:"em",raw:e.slice(0,a+r.index+l+1),text:d,tokens:this.lexer.inlineTokens(d,[])}}var h=e.slice(2,a+r.index+l-1);return{type:"strong",raw:e.slice(0,a+r.index+l+1),text:h,tokens:this.lexer.inlineTokens(h,[])}}}else u+=l}}},n.codespan=function(e){var t=this.rules.inline.code.exec(e);if(t){var n=t[2].replace(/\n/g," "),r=/[^ ]/.test(n),i=/^ /.test(n)&&/ $/.test(n);return r&&i&&(n=n.substring(1,n.length-1)),n=p(n,!0),{type:"codespan",raw:t[0],text:n}}},n.br=function(e){var t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}},n.del=function(e){var t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2],[])}},n.autolink=function(e,t){var n,r,i=this.rules.inline.autolink.exec(e);if(i)return r="@"===i[2]?"mailto:"+(n=p(this.options.mangle?t(i[1]):i[1])):n=p(i[1]),{type:"link",raw:i[0],text:n,href:r,tokens:[{type:"text",raw:n,text:n}]}},n.url=function(e,t){var n;if(n=this.rules.inline.url.exec(e)){var r,i;if("@"===n[2])i="mailto:"+(r=p(this.options.mangle?t(n[0]):n[0]));else{var o;do{o=n[0],n[0]=this.rules.inline._backpedal.exec(n[0])[0]}while(o!==n[0]);r=p(n[0]),i="www."===n[1]?"http://"+r:r}return{type:"link",raw:n[0],text:r,href:i,tokens:[{type:"text",raw:r,text:r}]}}},n.inlineText=function(e,t){var n,r=this.rules.inline.text.exec(e);if(r)return n=this.lexer.state.inRawBlock?this.options.sanitize?this.options.sanitizer?this.options.sanitizer(r[0]):p(r[0]):r[0]:p(this.options.smartypants?t(r[0]):r[0]),{type:"text",raw:r[0],text:n}},t}(),z={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>]+)>?(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/,table:F,lheading:/^([^\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?'|\([^()]*\))/};z.def=y(z.def).replace("label",z._label).replace("title",z._title).getRegex(),z.bullet=/(?:[*+-]|\d{1,9}[.)])/,z.listItemStart=y(/^( *)(bull) */).replace("bull",z.bullet).getRegex(),z.list=y(z.list).replace(/bull/g,z.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+z.def.source+")").getRegex(),z._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",z._comment=/<!--(?!-?>)[\s\S]*?(?:-->|$)/,z.html=y(z.html,"i").replace("comment",z._comment).replace("tag",z._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),z.paragraph=y(z._paragraph).replace("hr",z.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",z._tag).getRegex(),z.blockquote=y(z.blockquote).replace("paragraph",z.paragraph).getRegex(),z.normal=A({},z),z.gfm=A({},z.normal,{table:"^ *([^\\n ].*\\|.*)\\n {0,3}(?:\\| *)?(:?-+:? *(?:\\| *:?-+:? *)*)(?:\\| *)?(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"}),z.gfm.table=y(z.gfm.table).replace("hr",z.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",z._tag).getRegex(),z.gfm.paragraph=y(z._paragraph).replace("hr",z.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("table",z.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",z._tag).getRegex(),z.pedantic=A({},z.normal,{html:y("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",z._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:F,paragraph:y(z.normal._paragraph).replace("hr",z.hr).replace("heading"," *#{1,6} *[^\n]").replace("lheading",z.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var _={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:F,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:F,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,punctuation:/^([\spunctuation])/};function L(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 $(e){var t,n,r="",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}_._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",_.punctuation=y(_.punctuation).replace(/punctuation/g,_._punctuation).getRegex(),_.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g,_.escapedEmSt=/\\\*|\\_/g,_._comment=y(z._comment).replace("(?:--\x3e|$)","--\x3e").getRegex(),_.emStrong.lDelim=y(_.emStrong.lDelim).replace(/punct/g,_._punctuation).getRegex(),_.emStrong.rDelimAst=y(_.emStrong.rDelimAst,"g").replace(/punct/g,_._punctuation).getRegex(),_.emStrong.rDelimUnd=y(_.emStrong.rDelimUnd,"g").replace(/punct/g,_._punctuation).getRegex(),_._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,_._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,_._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])?)+(?![-_])/,_.autolink=y(_.autolink).replace("scheme",_._scheme).replace("email",_._email).getRegex(),_._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,_.tag=y(_.tag).replace("comment",_._comment).replace("attribute",_._attribute).getRegex(),_._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,_._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/,_._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,_.link=y(_.link).replace("label",_._label).replace("href",_._href).replace("title",_._title).getRegex(),_.reflink=y(_.reflink).replace("label",_._label).replace("ref",z._label).getRegex(),_.nolink=y(_.nolink).replace("ref",z._label).getRegex(),_.reflinkSearch=y(_.reflinkSearch,"g").replace("reflink",_.reflink).replace("nolink",_.nolink).getRegex(),_.normal=A({},_),_.pedantic=A({},_.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:y(/^!?\[(label)\]\((.*?)\)/).replace("label",_._label).getRegex(),reflink:y(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",_._label).getRegex()}),_.gfm=A({},_.normal,{escape:y(_.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.!#$%&'*+\/=?_`{\|}~-]+@)))/}),_.gfm.url=y(_.gfm.url,"i").replace("email",_.gfm._extended_email).getRegex(),_.breaks=A({},_.gfm,{br:y(_.br).replace("{2,}","*").getRegex(),text:y(_.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});var N=function(){function t(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||e.defaults,this.options.tokenizer=this.options.tokenizer||new H,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};var n={block:z.normal,inline:_.normal};this.options.pedantic?(n.block=z.pedantic,n.inline=_.pedantic):this.options.gfm&&(n.block=z.gfm,this.options.breaks?n.inline=_.breaks:n.inline=_.gfm),this.tokenizer.rules=n}t.lex=function(e,n){return new t(n).lex(e)},t.lexInline=function(e,n){return new t(n).inlineTokens(e)};var r=t.prototype;return r.lex=function(e){var 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},r.blockTokens=function(e,t){var n,r,i,o,l=this;for(void 0===t&&(t=[]),e=this.options.pedantic?e.replace(/\t/g," ").replace(/^ +$/gm,""):e.replace(/^( *)(\t+)/gm,(function(e,t,n){return t+" ".repeat(n.length)}));e;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some((function(r){return!!(n=r.call({lexer:l},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])||"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])||"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&&function(){var t=1/0,n=e.slice(1),r=void 0;l.options.extensions.startBlock.forEach((function(e){"number"===typeof(r=e.call({lexer:this},n))&&r>=0&&(t=Math.min(t,r))})),t<1/0&&t>=0&&(i=e.substring(0,t+1))}(),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])&&"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){var a="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(a);break}throw new Error(a)}return this.state.top=!0,t},r.inline=function(e,t){this.inlineQueue.push({src:e,tokens:t})},r.inlineTokens=function(e,t){var n,r,i,o=this;void 0===t&&(t=[]);var l,a,s,u=e;if(this.tokens.links){var c=Object.keys(this.tokens.links);if(c.length>0)for(;null!=(l=this.tokenizer.rules.inline.reflinkSearch.exec(u));)c.includes(l[0].slice(l[0].lastIndexOf("[")+1,-1))&&(u=u.slice(0,l.index)+"["+B("a",l[0].length-2)+"]"+u.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(l=this.tokenizer.rules.inline.blockSkip.exec(u));)u=u.slice(0,l.index)+"["+B("a",l[0].length-2)+"]"+u.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;null!=(l=this.tokenizer.rules.inline.escapedEmSt.exec(u));)u=u.slice(0,l.index)+"++"+u.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex);for(;e;)if(a||(s=""),a=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some((function(r){return!!(n=r.call({lexer:o},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])&&"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])&&"text"===n.type&&"text"===r.type?(r.raw+=n.raw,r.text+=n.text):t.push(n);else if(n=this.tokenizer.emStrong(e,u,s))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,$))e=e.substring(n.raw.length),t.push(n);else if(this.state.inLink||!(n=this.tokenizer.url(e,$))){if(i=e,this.options.extensions&&this.options.extensions.startInline&&function(){var t=1/0,n=e.slice(1),r=void 0;o.options.extensions.startInline.forEach((function(e){"number"===typeof(r=e.call({lexer:this},n))&&r>=0&&(t=Math.min(t,r))})),t<1/0&&t>=0&&(i=e.substring(0,t+1))}(),n=this.tokenizer.inlineText(i,L))e=e.substring(n.raw.length),"_"!==n.raw.slice(-1)&&(s=n.raw.slice(-1)),a=!0,(r=t[t.length-1])&&"text"===r.type?(r.raw+=n.raw,r.text+=n.text):t.push(n);else if(e){var d="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(d);break}throw new Error(d)}}else e=e.substring(n.raw.length),t.push(n);return t},n(t,null,[{key:"rules",get:function(){return{block:z,inline:_}}}]),t}(),j=function(){function t(t){this.options=t||e.defaults}var n=t.prototype;return n.code=function(e,t,n){var r=(t||"").match(/\S*/)[0];if(this.options.highlight){var i=this.options.highlight(e,r);null!=i&&i!==e&&(n=!0,e=i)}return e=e.replace(/\n$/,"")+"\n",r?'<pre><code class="'+this.options.langPrefix+p(r,!0)+'">'+(n?e:p(e,!0))+"</code></pre>\n":"<pre><code>"+(n?e:p(e,!0))+"</code></pre>\n"},n.blockquote=function(e){return"<blockquote>\n"+e+"</blockquote>\n"},n.html=function(e){return e},n.heading=function(e,t,n,r){return this.options.headerIds?"<h"+t+' id="'+(this.options.headerPrefix+r.slug(n))+'">'+e+"</h"+t+">\n":"<h"+t+">"+e+"</h"+t+">\n"},n.hr=function(){return this.options.xhtml?"<hr/>\n":"<hr>\n"},n.list=function(e,t,n){var r=t?"ol":"ul";return"<"+r+(t&&1!==n?' start="'+n+'"':"")+">\n"+e+"</"+r+">\n"},n.listitem=function(e){return"<li>"+e+"</li>\n"},n.checkbox=function(e){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "},n.paragraph=function(e){return"<p>"+e+"</p>\n"},n.table=function(e,t){return t&&(t="<tbody>"+t+"</tbody>"),"<table>\n<thead>\n"+e+"</thead>\n"+t+"</table>\n"},n.tablerow=function(e){return"<tr>\n"+e+"</tr>\n"},n.tablecell=function(e,t){var n=t.header?"th":"td";return(t.align?"<"+n+' align="'+t.align+'">':"<"+n+">")+e+"</"+n+">\n"},n.strong=function(e){return"<strong>"+e+"</strong>"},n.em=function(e){return"<em>"+e+"</em>"},n.codespan=function(e){return"<code>"+e+"</code>"},n.br=function(){return this.options.xhtml?"<br/>":"<br>"},n.del=function(e){return"<del>"+e+"</del>"},n.link=function(e,t,n){if(null===(e=D(this.options.sanitize,this.options.baseUrl,e)))return n;var r='<a href="'+p(e)+'"';return t&&(r+=' title="'+t+'"'),r+=">"+n+"</a>"},n.image=function(e,t,n){if(null===(e=D(this.options.sanitize,this.options.baseUrl,e)))return n;var r='<img src="'+e+'" alt="'+n+'"';return t&&(r+=' title="'+t+'"'),r+=this.options.xhtml?"/>":">"},n.text=function(e){return e},t}(),W=function(){function e(){}var t=e.prototype;return t.strong=function(e){return e},t.em=function(e){return e},t.codespan=function(e){return e},t.del=function(e){return e},t.html=function(e){return e},t.text=function(e){return e},t.link=function(e,t,n){return""+n},t.image=function(e,t,n){return""+n},t.br=function(){return""},e}(),K=function(){function e(){this.seen={}}var t=e.prototype;return t.serialize=function(e){return e.toLowerCase().trim().replace(/<[!\/a-z].*?>/gi,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")},t.getNextSafeSlug=function(e,t){var n=e,r=0;if(this.seen.hasOwnProperty(n)){r=this.seen[e];do{n=e+"-"+ ++r}while(this.seen.hasOwnProperty(n))}return t||(this.seen[e]=r,this.seen[n]=0),n},t.slug=function(e,t){void 0===t&&(t={});var n=this.serialize(e);return this.getNextSafeSlug(n,t.dryrun)},e}(),U=function(){function t(t){this.options=t||e.defaults,this.options.renderer=this.options.renderer||new j,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new W,this.slugger=new K}t.parse=function(e,n){return new t(n).parse(e)},t.parseInline=function(e,n){return new t(n).parseInline(e)};var n=t.prototype;return n.parse=function(e,t){void 0===t&&(t=!0);var n,r,i,o,l,a,s,u,c,d,h,f,p,g,m,y,w,b,D,x="",C=e.length;for(n=0;n<C;n++)if(d=e[n],!(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[d.type])||!1===(D=this.options.extensions.renderers[d.type].call({parser:this},d))&&["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(d.type))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,v(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(u="",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(u+=this.renderer.tablerow(s),c="",o=d.rows.length,r=0;r<o;r++){for(s="",l=(a=d.rows[r]).length,i=0;i<l;i++)s+=this.renderer.tablecell(this.parseInline(a[i].tokens),{header:!1,align:d.align[i]});c+=this.renderer.tablerow(s)}x+=this.renderer.table(u,c);continue;case"blockquote":c=this.parse(d.tokens),x+=this.renderer.blockquote(c);continue;case"list":for(h=d.ordered,f=d.start,p=d.loose,o=d.items.length,c="",r=0;r<o;r++)y=(m=d.items[r]).checked,w=m.task,g="",m.task&&(b=this.renderer.checkbox(y),p?m.tokens.length>0&&"paragraph"===m.tokens[0].type?(m.tokens[0].text=b+" "+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=b+" "+m.tokens[0].tokens[0].text)):m.tokens.unshift({type:"text",text:b}):g+=b),g+=this.parse(m.tokens,p),c+=this.renderer.listitem(g,w,y);x+=this.renderer.list(c,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(c=d.tokens?this.parseInline(d.tokens):d.text;n+1<C&&"text"===e[n+1].type;)c+="\n"+((d=e[++n]).tokens?this.parseInline(d.tokens):d.text);x+=t?this.renderer.paragraph(c):c;continue;default:var k='Token with "'+d.type+'" type was not found.';if(this.options.silent)return void console.error(k);throw new Error(k)}else x+=D||"";return x},n.parseInline=function(e,t){t=t||this.renderer;var n,r,i,o="",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])||!1===(i=this.options.extensions.renderers[r.type].call({parser:this},r))&&["escape","html","link","image","strong","em","codespan","br","del","text"].includes(r.type))switch(r.type){case"escape":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;case"text":o+=t.text(r.text);break;default:var a='Token with "'+r.type+'" type was not found.';if(this.options.silent)return void console.error(a);throw new Error(a)}else o+=i||"";return o},t}();function V(e,t,n){if("undefined"===typeof e||null===e)throw new Error("marked(): input parameter is undefined or null");if("string"!==typeof e)throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected");if("function"===typeof t&&(n=t,t=null),I(t=A({},V.defaults,t||{})),n){var r,i=t.highlight;try{r=N.lex(e,t)}catch(s){return n(s)}var o=function(e){var o;if(!e)try{t.walkTokens&&V.walkTokens(r,t.walkTokens),o=U.parse(r,t)}catch(s){e=s}return t.highlight=i,e?n(e):n(null,o)};if(!i||i.length<3)return o();if(delete t.highlight,!r.length)return o();var l=0;return V.walkTokens(r,(function(e){"code"===e.type&&(l++,setTimeout((function(){i(e.text,e.lang,(function(t,n){if(t)return o(t);null!=n&&n!==e.text&&(e.text=n,e.escaped=!0),0===--l&&o()}))}),0))})),void(0===l&&o())}try{var a=N.lex(e,t);return t.walkTokens&&V.walkTokens(a,t.walkTokens),U.parse(a,t)}catch(s){if(s.message+="\nPlease report this to https://github.com/markedjs/marked.",t.silent)return"<p>An error occurred:</p><pre>"+p(s.message+"",!0)+"</pre>";throw s}}V.options=V.setOptions=function(e){return A(V.defaults,e),a(V.defaults),V},V.getDefaults=l,V.defaults=e.defaults,V.use=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r,i=A.apply(void 0,[{}].concat(t)),o=V.defaults.extensions||{renderers:{},childTokens:{}};t.forEach((function(e){if(e.extensions&&(r=!0,e.extensions.forEach((function(e){if(!e.name)throw new Error("extension name required");if(e.renderer){var t=o.renderers?o.renderers[e.name]:null;o.renderers[e.name]=t?function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];var o=e.renderer.apply(this,r);return!1===o&&(o=t.apply(this,r)),o}:e.renderer}if(e.tokenizer){if(!e.level||"block"!==e.level&&"inline"!==e.level)throw new Error("extension level must be 'block' or 'inline'");o[e.level]?o[e.level].unshift(e.tokenizer):o[e.level]=[e.tokenizer],e.start&&("block"===e.level?o.startBlock?o.startBlock.push(e.start):o.startBlock=[e.start]:"inline"===e.level&&(o.startInline?o.startInline.push(e.start):o.startInline=[e.start]))}e.childTokens&&(o.childTokens[e.name]=e.childTokens)}))),e.renderer&&function(){var t=V.defaults.renderer||new j,n=function(n){var r=t[n];t[n]=function(){for(var i=arguments.length,o=new Array(i),l=0;l<i;l++)o[l]=arguments[l];var a=e.renderer[n].apply(t,o);return!1===a&&(a=r.apply(t,o)),a}};for(var r in e.renderer)n(r);i.renderer=t}(),e.tokenizer&&function(){var t=V.defaults.tokenizer||new H,n=function(n){var r=t[n];t[n]=function(){for(var i=arguments.length,o=new Array(i),l=0;l<i;l++)o[l]=arguments[l];var a=e.tokenizer[n].apply(t,o);return!1===a&&(a=r.apply(t,o)),a}};for(var r in e.tokenizer)n(r);i.tokenizer=t}(),e.walkTokens){var t=V.defaults.walkTokens;i.walkTokens=function(n){e.walkTokens.call(this,n),t&&t.call(this,n)}}r&&(i.extensions=o),V.setOptions(i)}))},V.walkTokens=function(e,t){for(var n,r=function(){var e=n.value;switch(t.call(V,e),e.type){case"table":for(var r,i=o(e.header);!(r=i()).done;){var l=r.value;V.walkTokens(l.tokens,t)}for(var a,s=o(e.rows);!(a=s()).done;)for(var u,c=o(a.value);!(u=c()).done;){var d=u.value;V.walkTokens(d.tokens,t)}break;case"list":V.walkTokens(e.items,t);break;default:V.defaults.extensions&&V.defaults.extensions.childTokens&&V.defaults.extensions.childTokens[e.type]?V.defaults.extensions.childTokens[e.type].forEach((function(n){V.walkTokens(e[n],t)})):e.tokens&&V.walkTokens(e.tokens,t)}},i=o(e);!(n=i()).done;)r()},V.parseInline=function(e,t){if("undefined"===typeof e||null===e)throw new Error("marked.parseInline(): input parameter is undefined or null");if("string"!==typeof e)throw new Error("marked.parseInline(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected");I(t=A({},V.defaults,t||{}));try{var n=N.lexInline(e,t);return t.walkTokens&&V.walkTokens(n,t.walkTokens),U.parseInline(n,t)}catch(r){if(r.message+="\nPlease report this to https://github.com/markedjs/marked.",t.silent)return"<p>An error occurred:</p><pre>"+p(r.message+"",!0)+"</pre>";throw r}},V.Parser=U,V.parser=U.parse,V.Renderer=j,V.TextRenderer=W,V.Lexer=N,V.lexer=N.lex,V.Tokenizer=H,V.Slugger=K,V.parse=V;var X=V.options,Y=V.setOptions,G=V.use,q=V.walkTokens,Z=V.parseInline,Q=V,J=U.parse,ee=N.lex;e.Lexer=N,e.Parser=U,e.Renderer=j,e.Slugger=K,e.TextRenderer=W,e.Tokenizer=H,e.getDefaults=l,e.lexer=ee,e.marked=V,e.options=X,e.parse=Q,e.parseInline=Z,e.parser=J,e.setOptions=Y,e.use=G,e.walkTokens=q,Object.defineProperty(e,"__esModule",{value:!0})}(t)},1533:function(e,t,n){var r=n(1329),i=n(98);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})}},1534:function(e,t,n){var r=n(193),i=n(1535),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},1535:function(e,t,n){var r=n(1536),i=n(1537),o=n(314),l=n(72);e.exports=function(e,t){return function(n,a){var s=l(n)?r:i,u=t?t():{};return s(n,e,o(a,2),u)}}},1536:function(e,t){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}},1537:function(e,t,n){var r=n(479);e.exports=function(e,t,n,i){return r(e,(function(e,r,o){t(i,e,n(e),o)})),i}},1538:function(e,t,n){},1739:function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(1378),i=n(1213),o=n.n(i),l=n(0);function a(e){var t,n,i,o,l;switch(e.kind){case r.c.Number:return null!==(t=null===(n=e.data)||void 0===n?void 0:n.toString())&&void 0!==t?t:"";case r.c.Boolean:return null!==(i=null===(o=e.data)||void 0===o?void 0:o.toString())&&void 0!==i?i:"";case r.c.Markdown:case r.c.RowID:case r.c.Text:case r.c.Uri:return null!==(l=e.data)&&void 0!==l?l:"";case r.c.Bubble:case r.c.Image:return e.data.join("");case r.c.Drilldown:return e.data.map((e=>e.text)).join("");case r.c.Protected:case r.c.Loading:return"";case r.c.Custom:return e.copyData}}function s(e){if("number"===typeof e)return e;if(e.length>0){const t=parseFloat(e);isNaN(t)||(e=t)}return e}function u(e){var t;const{sort:n,rows:r,getCellContent:i}=e;let u=void 0===n?void 0:e.columns.findIndex((e=>n.column===e||void 0!==e.id&&n.column.id===e.id));-1===u&&(u=void 0);const c=null!==(t=null===n||void 0===n?void 0:n.direction)&&void 0!==t?t:"asc",d=l.useMemo((()=>{if(void 0===u)return;const e=new Array(r),t=[u,0];for(let n=0;n<r;n++)t[1]=n,e[n]=a(i(t));let l;return l="raw"===(null===n||void 0===n?void 0:n.mode)?o()(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)?o()(r).sort(((t,n)=>function(e,t){return e=s(e),t=s(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]))):o()(r).sort(((t,n)=>e[t].localeCompare(e[n]))),"desc"===c&&l.reverse(),l}),[i,r,null===n||void 0===n?void 0:n.mode,c,u]),h=l.useCallback((e=>void 0===d?e:d[e]),[d]),f=l.useCallback((e=>{let[t,n]=e;return void 0===d||(n=d[n]),i([t,n])}),[i,d]);return void 0===d?{getCellContent:e.getCellContent,getOriginalIndex:h}:{getOriginalIndex:h,getCellContent:f}}}}]);
1
+ (this["webpackJsonp@stlite/desktop"]=this["webpackJsonp@stlite/desktop"]||[]).push([[10],{1218:function(e,t,n){var r=n(1255)();e.exports=r},1219:function(e,t,n){var r=n(1258),i=n(99),o=n(245),l=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,s=/^0o[0-7]+$/i,u=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(o(e))return NaN;if(i(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=i(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=r(e);var n=a.test(e);return n||s.test(e)?u(e.slice(2),n?2:8):l.test(e)?NaN:+e}},1255:function(e,t,n){var r=n(1256),i=n(473),o=n(1257);e.exports=function(e){return function(t,n,l){return l&&"number"!=typeof l&&i(t,n,l)&&(n=l=void 0),t=o(t),void 0===n?(n=t,t=0):n=o(n),l=void 0===l?t<n?1:-1:o(l),r(t,n,l,e)}}},1256:function(e,t){var n=Math.ceil,r=Math.max;e.exports=function(e,t,i,o){for(var l=-1,a=r(n((t-e)/(i||1)),0),s=Array(a);a--;)s[o?a:++l]=e,e+=i;return s}},1257:function(e,t,n){var r=n(1219),i=1/0;e.exports=function(e){return e?(e=r(e))===i||e===-1/0?17976931348623157e292*(e<0?-1:1):e===e?e:0:0===e?e:0}},1258:function(e,t,n){var r=n(1259),i=/^\s+/;e.exports=function(e){return e?e.slice(0,r(e)+1).replace(i,""):e}},1259:function(e,t){var n=/\s/;e.exports=function(e){for(var t=e.length;t--&&n.test(e.charAt(t)););return t}},1260:function(e,t,n){var r=n(1516),i=n(1219);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)}},1328:function(e,t,n){var r=n(1329);e.exports=function(e,t){return!!(null==e?0:e.length)&&r(e,t,0)>-1}},1329:function(e,t,n){var r=n(1330),i=n(1331),o=n(1332);e.exports=function(e,t,n){return t===t?o(e,t,n):r(e,i,n)}},1330:function(e,t){e.exports=function(e,t,n,r){for(var i=e.length,o=n+(r?1:-1);r?o--:++o<i;)if(t(e[o],o,e))return o;return-1}},1331:function(e,t){e.exports=function(e){return e!==e}},1332:function(e,t){e.exports=function(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}},1333:function(e,t){e.exports=function(e,t,n){for(var r=-1,i=null==e?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}},1334:function(e,t,n){var r=n(99),i=n(1524),o=n(1219),l=Math.max,a=Math.min;e.exports=function(e,t,n){var s,u,c,d,h,f,p=0,g=!1,v=!1,m=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function y(t){var n=s,r=u;return s=u=void 0,p=t,d=e.apply(r,n)}function w(e){return p=e,h=setTimeout(D,t),g?y(e):d}function b(e){var n=e-f;return void 0===f||n>=t||n<0||v&&e-p>=c}function D(){var e=i();if(b(e))return x(e);h=setTimeout(D,function(e){var n=t-(e-f);return v?a(n,c-(e-p)):n}(e))}function x(e){return h=void 0,m&&s?y(e):(s=u=void 0,d)}function C(){var e=i(),n=b(e);if(s=arguments,u=this,f=e,n){if(void 0===h)return w(f);if(v)return clearTimeout(h),h=setTimeout(D,t),y(f)}return void 0===h&&(h=setTimeout(D,t)),d}return t=o(t)||0,r(n)&&(g=!!n.leading,c=(v="maxWait"in n)?l(o(n.maxWait)||0,t):c,m="trailing"in n?!!n.trailing:m),C.cancel=function(){void 0!==h&&clearTimeout(h),p=0,s=f=u=h=void 0},C.flush=function(){return void 0===h?d:x(i())},C}},1335:function(e,t,n){"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(",")+")")}},1383:function(e,t,n){"use strict";n.d(t,"a",(function(){return Ge})),n.d(t,"b",(function(){return Dr})),n.d(t,"c",(function(){return Se}));var r=n(0),i=n.n(r);function o(){}function l(e){return!!(e||"").match(/\d/)}function a(e){return null===e||void 0===e}function s(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}function u(e,t){void 0===t&&(t=!0);var n="-"===e[0],r=n&&t,i=(e=e.replace("-","")).split(".");return{beforeDecimal:i[0],afterDecimal:i[1]||"",hasNagation:n,addNegation:r}}function c(e,t,n){for(var r="",i=n?"0":"",o=0;o<=t-1;o++)r+=e[o]||i;return r}function d(e,t){return Array(t+1).join(e)}function h(e,t){if(e.value=e.value,null!==e){if(e.createTextRange){var n=e.createTextRange();return n.move("character",t),n.select(),!0}return e.selectionStart||0===e.selectionStart?(e.focus(),e.setSelectionRange(t,t),!0):(e.focus(),!1)}}function f(e,t,n){return Math.min(Math.max(e,t),n)}function p(e){return Math.max(e.selectionStart,e.selectionEnd)}var g={displayType:"input",decimalSeparator:".",thousandsGroupStyle:"thousand",fixedDecimalScale:!1,prefix:"",suffix:"",allowNegative:!0,allowEmptyFormatting:!1,allowLeadingZeros:!1,isNumericString:!1,type:"text",onValueChange:o,onChange:o,onKeyDown:o,onMouseUp:o,onFocus:o,onBlur:o,isAllowed:function(){return!0}},v=function(e){function t(t){e.call(this,t);var n=t.defaultValue;this.validateProps();var r=this.formatValueProp(n);this.state={value:r,numAsString:this.removeFormatting(r),mounted:!1},this.selectionBeforeInput={selectionStart:0,selectionEnd:0},this.onChange=this.onChange.bind(this),this.onKeyDown=this.onKeyDown.bind(this),this.onMouseUp=this.onMouseUp.bind(this),this.onFocus=this.onFocus.bind(this),this.onBlur=this.onBlur.bind(this)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.componentDidMount=function(){this.setState({mounted:!0})},t.prototype.componentDidUpdate=function(e){this.updateValueIfRequired(e)},t.prototype.componentWillUnmount=function(){clearTimeout(this.focusTimeout),clearTimeout(this.caretPositionTimeout)},t.prototype.updateValueIfRequired=function(e){var t=this,n=t.props,r=t.state,i=t.focusedElm,o=r.value,l=r.numAsString;if(void 0===l&&(l=""),e!==n){this.validateProps();var s=this.formatNumString(l),u=a(n.value)?s:this.formatValueProp(),c=this.removeFormatting(u),d=parseFloat(c),h=parseFloat(l);(isNaN(d)&&isNaN(h)||d===h)&&s===o&&(null!==i||u===o)||this.updateValue({formattedValue:u,numAsString:c,input:i,source:"prop",event:null})}},t.prototype.getFloatString=function(e){void 0===e&&(e="");var t=this.props.decimalScale,n=this.getSeparators().decimalSeparator,r=this.getNumberRegex(!0),i="-"===e[0];i&&(e=e.replace("-","")),n&&0===t&&(e=e.split(n)[0]);var o=(e=(e.match(r)||[]).join("").replace(n,".")).indexOf(".");return-1!==o&&(e=e.substring(0,o)+"."+e.substring(o+1,e.length).replace(new RegExp(s(n),"g"),"")),i&&(e="-"+e),e},t.prototype.getNumberRegex=function(e,t){var n=this.props,r=n.format,i=n.decimalScale,o=n.customNumerals,l=this.getSeparators().decimalSeparator;return new RegExp("[0-9"+(o?o.join(""):"")+"]"+(!l||0===i||t||r?"":"|"+s(l)),e?"g":void 0)},t.prototype.getSeparators=function(){var e=this.props.decimalSeparator,t=this.props,n=t.thousandSeparator,r=t.allowedDecimalSeparators;return!0===n&&(n=","),r||(r=[e,"."]),{decimalSeparator:e,thousandSeparator:n,allowedDecimalSeparators:r}},t.prototype.getMaskAtIndex=function(e){var t=this.props.mask;return void 0===t&&(t=" "),"string"===typeof t?t:t[e]||" "},t.prototype.getValueObject=function(e,t){var n=parseFloat(t);return{formattedValue:e,value:t,floatValue:isNaN(n)?void 0:n}},t.prototype.validateProps=function(){var e=this.props.mask,t=this.getSeparators(),n=t.decimalSeparator,r=t.thousandSeparator;if(n===r)throw new Error("\n Decimal separator can't be same as thousand separator.\n thousandSeparator: "+r+' (thousandSeparator = {true} is same as thousandSeparator = ",")\n decimalSeparator: '+n+" (default value for decimalSeparator is .)\n ");if(e&&("string"===e?e:e.toString()).match(/\d/g))throw new Error("\n Mask "+e+" should not contain numeric character;\n ")},t.prototype.setPatchedCaretPosition=function(e,t,n){h(e,t),this.caretPositionTimeout=setTimeout((function(){e.value===n&&h(e,t)}),0)},t.prototype.correctCaretPosition=function(e,t,n){var r=this.props,i=r.prefix,o=r.suffix,a=r.format;if(""===e)return 0;if(t=f(t,0,e.length),!a){var s="-"===e[0];return f(t,i.length+(s?1:0),e.length-o.length)}if("function"===typeof a)return t;if("#"===a[t]&&l(e[t]))return t;if("#"===a[t-1]&&l(e[t-1]))return t;var u=a.indexOf("#");t=f(t,u,a.lastIndexOf("#")+1);for(var c=a.substring(t,a.length).indexOf("#"),d=t,h=t+(-1===c?0:c);d>u&&("#"!==a[d]||!l(e[d]));)d-=1;return!l(e[h])||"left"===n&&t!==u||t-d<h-t?l(e[d])?d+1:d:h},t.prototype.getCaretPosition=function(e,t,n){var r,i,o=this.props.format,l=this.state.value,a=this.getNumberRegex(!0),s=(e.match(a)||[]).join(""),u=(t.match(a)||[]).join("");for(r=0,i=0;i<n;i++){var c=e[i]||"",d=t[r]||"";if((c.match(a)||c===d)&&("0"!==c||!d.match(a)||"0"===d||s.length===u.length)){for(;c!==t[r]&&r<t.length;)r++;r++}}return"string"!==typeof o||l||(r=t.length),r=this.correctCaretPosition(t,r)},t.prototype.removePrefixAndSuffix=function(e){var t=this.props,n=t.format,r=t.prefix,i=t.suffix;if(!n&&e){var o="-"===e[0];o&&(e=e.substring(1,e.length));var l=(e=r&&0===e.indexOf(r)?e.substring(r.length,e.length):e).lastIndexOf(i);e=i&&-1!==l&&l===e.length-i.length?e.substring(0,l):e,o&&(e="-"+e)}return e},t.prototype.removePatternFormatting=function(e){for(var t=this.props.format.split("#").filter((function(e){return""!==e})),n=0,r="",i=0,o=t.length;i<=o;i++){var l=t[i]||"",a=i===o?e.length:e.indexOf(l,n);if(-1===a){r=e;break}r+=e.substring(n,a),n=a+l.length}return(r.match(this.getNumberRegex(!0))||[]).join("")},t.prototype.removeFormatting=function(e){var t=this.props,n=t.format,r=t.removeFormatting;return e?(n?e="string"===typeof n?this.removePatternFormatting(e):"function"===typeof r?r(e):(e.match(this.getNumberRegex(!0))||[]).join(""):(e=this.removePrefixAndSuffix(e),e=this.getFloatString(e)),e):e},t.prototype.formatWithPattern=function(e){for(var t=this.props.format,n=0,r=t.split(""),i=0,o=t.length;i<o;i++)"#"===t[i]&&(r[i]=e[n]||this.getMaskAtIndex(n),n+=1);return r.join("")},t.prototype.formatAsNumber=function(e){var t=this.props,n=t.decimalScale,r=t.fixedDecimalScale,i=t.prefix,o=t.suffix,l=t.allowNegative,a=t.thousandsGroupStyle,s=this.getSeparators(),d=s.thousandSeparator,h=s.decimalSeparator,f=-1!==e.indexOf(".")||n&&r,p=u(e,l),g=p.beforeDecimal,v=p.afterDecimal,m=p.addNegation;return void 0!==n&&(v=c(v,n,r)),d&&(g=function(e,t,n){var r=function(e){switch(e){case"lakh":return/(\d+?)(?=(\d\d)+(\d)(?!\d))(\.\d+)?/g;case"wan":return/(\d)(?=(\d{4})+(?!\d))/g;case"thousand":default:return/(\d)(?=(\d{3})+(?!\d))/g}}(n),i=e.search(/[1-9]/);return i=-1===i?e.length:i,e.substring(0,i)+e.substring(i,e.length).replace(r,"$1"+t)}(g,d,a)),i&&(g=i+g),o&&(v+=o),m&&(g="-"+g),e=g+(f&&h||"")+v},t.prototype.formatNumString=function(e){void 0===e&&(e="");var t=this.props,n=t.format,r=t.allowEmptyFormatting,i=t.customNumerals,o=e;if(i&&10===i.length){var l=new RegExp("["+i.join("")+"]","g");o=e.replace(l,(function(e){return i.indexOf(e).toString()}))}return o=""!==e||r?"-"!==e||n?"string"===typeof n?this.formatWithPattern(o):"function"===typeof n?n(o):this.formatAsNumber(o):"-":""},t.prototype.formatValueProp=function(e){var t=this.props,n=t.format,r=t.decimalScale,i=t.fixedDecimalScale,o=t.allowEmptyFormatting,l=this.props,s=l.value,h=l.isNumericString,f=!(s=a(s)?e:s)&&0!==s;return f&&o&&(s=""),f&&!o?"":("number"===typeof s&&(s=function(e){var t="-"===(e+="")[0]?"-":"";t&&(e=e.substring(1));var n=e.split(/[eE]/g),r=n[0],i=n[1];if(!(i=Number(i)))return t+r;var o=1+i,l=(r=r.replace(".","")).length;return o<0?r="0."+d("0",Math.abs(o))+r:o>=l?r+=d("0",o-l):r=(r.substring(0,o)||"0")+"."+r.substring(o),t+r}(s),h=!0),"Infinity"===s&&h&&(s=""),h&&!n&&"number"===typeof r&&(s=function(e,t,n){if(-1!==["","-"].indexOf(e))return e;var r=-1!==e.indexOf(".")&&t,i=u(e),o=i.beforeDecimal,l=i.afterDecimal,a=i.hasNagation,s=parseFloat("0."+(l||"0")),d=(l.length<=t?"0."+l:s.toFixed(t)).split(".");return(a?"-":"")+o.split("").reverse().reduce((function(e,t,n){return e.length>n?(Number(e[0])+Number(t)).toString()+e.substring(1,e.length):t+e}),d[0])+(r?".":"")+c(d[1]||"",Math.min(t,l.length),n)}(s,r,i)),h?this.formatNumString(s):this.formatInput(s))},t.prototype.formatNegation=function(e){void 0===e&&(e="");var t=this.props.allowNegative,n=new RegExp("(-)"),r=new RegExp("(-)(.)*(-)"),i=n.test(e),o=r.test(e);return e=e.replace(/-/g,""),i&&!o&&t&&(e="-"+e),e},t.prototype.formatInput=function(e){return void 0===e&&(e=""),this.props.format||(e=this.removePrefixAndSuffix(e),e=this.formatNegation(e)),e=this.removeFormatting(e),this.formatNumString(e)},t.prototype.isCharacterAFormat=function(e,t){var n=this.props,r=n.format,i=n.prefix,o=n.suffix,l=n.decimalScale,a=n.fixedDecimalScale,s=this.getSeparators().decimalSeparator;return"string"===typeof r&&"#"!==r[e]||!(r||!(e<i.length||e>=t.length-o.length||l&&a&&t[e]===s))},t.prototype.correctInputValue=function(e,t,n){var r=this,i=this.props,o=i.format,l=i.allowNegative,a=i.prefix,s=i.suffix,c=i.decimalScale,d=this.getSeparators(),h=d.allowedDecimalSeparators,f=d.decimalSeparator,p=this.state.numAsString||"",g=this.selectionBeforeInput,v=g.selectionStart,m=g.selectionEnd,y=function(e,t){for(var n=0,r=0,i=e.length,o=t.length;e[n]===t[n]&&n<i;)n++;for(;e[i-1-r]===t[o-1-r]&&o-r>n&&i-r>n;)r++;return{start:n,end:i-r}}(t,n),w=y.start,b=y.end;if(!o&&w===b&&-1!==h.indexOf(n[v])){var D=0===c?"":f;return n.substr(0,v)+D+n.substr(v+1,n.length)}var x=o?0:a.length,C=t.length-(o?0:s.length);if(n.length>t.length||!n.length||w===b||0===v&&m===t.length||0===w&&b===t.length||v===x&&m===C)return n;var k=t.substr(w,b-w);if(!![].concat(k).find((function(e,n){return r.isCharacterAFormat(n+w,t)}))){var E=t.substr(w),S={},F=[];[].concat(E).forEach((function(e,n){r.isCharacterAFormat(n+w,t)?S[n]=e:n>k.length-1&&F.push(e)})),Object.keys(S).forEach((function(e){F.length>e?F.splice(e,0,S[e]):F.push(S[e])})),n=t.substr(0,w)+F.join("")}if(!o){var A=this.removeFormatting(n),M=u(A,l),R=M.beforeDecimal,T=M.afterDecimal,I=M.addNegation,B=e<n.indexOf(f)+1;if(A.length<p.length&&B&&""===R&&!parseFloat(T))return I?"-":""}return n},t.prototype.updateValue=function(e){var t=e.formattedValue,n=e.input,r=e.setCaretPosition;void 0===r&&(r=!0);var i=e.source,o=e.event,l=e.numAsString,a=e.caretPos,s=this.props.onValueChange,u=this.state.value;if(n){if(void 0===a&&r){var c=e.inputValue||n.value,d=p(n);n.value=t,a=this.getCaretPosition(c,t,d)}n.value=t,r&&this.setPatchedCaretPosition(n,a,t)}void 0===l&&(l=this.removeFormatting(t)),t!==u&&(this.setState({value:t,numAsString:l}),s(this.getValueObject(t,l),{event:o,source:i}))},t.prototype.onChange=function(e){var t=e.target,n=t.value,r=this.state,i=this.props,o=i.isAllowed,l=r.value||"",a=p(t);n=this.correctInputValue(a,l,n);var s=this.formatInput(n)||"",u=this.removeFormatting(s),c=o(this.getValueObject(s,u));c||(s=l),this.updateValue({formattedValue:s,numAsString:u,inputValue:n,input:t,event:e,source:"event"}),c&&i.onChange(e)},t.prototype.onBlur=function(e){var t=this.props,n=this.state,r=t.format,i=t.onBlur,o=t.allowLeadingZeros,l=n.numAsString,a=n.value;if(this.focusedElm=null,clearTimeout(this.focusTimeout),clearTimeout(this.caretPositionTimeout),!r){isNaN(parseFloat(l))&&(l=""),o||(l=function(e){if(!e)return e;var t="-"===e[0];t&&(e=e.substring(1,e.length));var n=e.split("."),r=n[0].replace(/^0+/,"")||"0",i=n[1]||"";return(t?"-":"")+r+(i?"."+i:"")}(l));var s=this.formatNumString(l);if(s!==a)return this.updateValue({formattedValue:s,numAsString:l,input:e.target,setCaretPosition:!1,event:e,source:"event"}),void i(e)}i(e)},t.prototype.onKeyDown=function(e){var t,n=e.target,r=e.key,i=n.selectionStart,o=n.selectionEnd,l=n.value;void 0===l&&(l="");var a=this.props,s=a.decimalScale,u=a.fixedDecimalScale,c=a.prefix,d=a.suffix,h=a.format,f=a.onKeyDown,p=void 0!==s&&u,g=this.getNumberRegex(!1,p),v=new RegExp("-"),m="string"===typeof h;if(this.selectionBeforeInput={selectionStart:i,selectionEnd:o},"ArrowLeft"===r||"Backspace"===r?t=i-1:"ArrowRight"===r?t=i+1:"Delete"===r&&(t=i),void 0!==t&&i===o){var y=t,w=m?h.indexOf("#"):c.length,b=m?h.lastIndexOf("#")+1:l.length-d.length;if("ArrowLeft"===r||"ArrowRight"===r){var D="ArrowLeft"===r?"left":"right";y=this.correctCaretPosition(l,t,D)}else if("Delete"!==r||g.test(l[t])||v.test(l[t])){if("Backspace"===r&&!g.test(l[t]))if(i<=w+1&&"-"===l[0]&&"undefined"===typeof h){var x=l.substring(1);this.updateValue({formattedValue:x,caretPos:y,input:n,event:e,source:"event"})}else if(!v.test(l[t])){for(;!g.test(l[y-1])&&y>w;)y--;y=this.correctCaretPosition(l,y,"left")}}else for(;!g.test(l[y])&&y<b;)y++;(y!==t||t<w||t>b)&&(e.preventDefault(),this.setPatchedCaretPosition(n,y,l)),e.isUnitTestRun&&this.setPatchedCaretPosition(n,y,l),f(e)}else f(e)},t.prototype.onMouseUp=function(e){var t=e.target,n=t.selectionStart,r=t.selectionEnd,i=t.value;if(void 0===i&&(i=""),n===r){var o=this.correctCaretPosition(i,n);o!==n&&this.setPatchedCaretPosition(t,o,i)}this.props.onMouseUp(e)},t.prototype.onFocus=function(e){var t=this;e.persist(),this.focusedElm=e.target,this.focusTimeout=setTimeout((function(){var n=e.target,r=n.selectionStart,i=n.selectionEnd,o=n.value;void 0===o&&(o="");var l=t.correctCaretPosition(o,r);l===r||0===r&&i===o.length||t.setPatchedCaretPosition(n,l,o),t.props.onFocus(e)}),0)},t.prototype.render=function(){var e=this.props,t=e.type,n=e.displayType,r=e.customInput,o=e.renderText,l=e.getInputRef,a=e.format,s=(e.thousandSeparator,e.decimalSeparator,e.allowedDecimalSeparators,e.thousandsGroupStyle,e.decimalScale,e.fixedDecimalScale,e.prefix,e.suffix,e.removeFormatting,e.mask,e.defaultValue,e.isNumericString,e.allowNegative,e.allowEmptyFormatting,e.allowLeadingZeros,e.onValueChange,e.isAllowed,e.customNumerals,e.onChange,e.onKeyDown,e.onMouseUp,e.onFocus,e.onBlur,e.value,function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&-1===t.indexOf(r)&&(n[r]=e[r]);return n}(e,["type","displayType","customInput","renderText","getInputRef","format","thousandSeparator","decimalSeparator","allowedDecimalSeparators","thousandsGroupStyle","decimalScale","fixedDecimalScale","prefix","suffix","removeFormatting","mask","defaultValue","isNumericString","allowNegative","allowEmptyFormatting","allowLeadingZeros","onValueChange","isAllowed","customNumerals","onChange","onKeyDown","onMouseUp","onFocus","onBlur","value"])),u=this.state,c=u.value,d=u.mounted&&function(e){return e||"undefined"!==typeof navigator&&!(navigator.platform&&/iPhone|iPod/.test(navigator.platform))}(a)?"numeric":void 0,h=Object.assign({inputMode:d},s,{type:t,value:c,onChange:this.onChange,onKeyDown:this.onKeyDown,onMouseUp:this.onMouseUp,onFocus:this.onFocus,onBlur:this.onBlur});if("text"===n)return o?o(c,s)||null:i.a.createElement("span",Object.assign({},s,{ref:l}),c);if(r){var f=r;return i.a.createElement(f,Object.assign({},h,{ref:l}))}return i.a.createElement("input",Object.assign({},h,{ref:l}))},t}(i.a.Component);v.defaultProps=g;var m=v,y=n(1260),w=n.n(y),b=n(1517),D=n.n(b),x=n(1521),C=n.n(x),k=n(1218),E=n.n(k),S=n(1334),F=n.n(S),A=n(55),M=n(1525),R=n.n(M),T=new Map,I=new Map,B=new Map;function O(e,t,n,r){var i,o;let l=I.get(n);if(r&&void 0!==l&&l.count>2e4){let r=B.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),B.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,u={};for(let d of e)s+=null!=(o=n.get(d))?o:i,u[d]=(null!=(l=u[d])?l:0)+1;let c=t-s;for(let d of Object.keys(u)){let e=u[d],t=null!=(a=n.get(d))?a:i,o=t+c*(t*e/s)*r/e;n.set(d,o)}}(t,o.width,r,Math.max(.05,1-l.count/2e5),l.size),I.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)I.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;I.set(n,{count:l.count+t.length,size:i})}return a.width}function P(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),u=O(e,t.substring(0,s),r,l),c=null==a?void 0:a(t);if(u!==n)if(u<n){for(;u<n;)s++,u=O(e,t.substring(0,s),r,l);s--}else for(;u>n;){let n=void 0!==c?0:t.lastIndexOf(" ",s-1);n>0?s=n:s--,u=O(e,t.substring(0,s),r,l)}if(" "!==t[s]){let e=0;if(void 0===c)e=t.lastIndexOf(" ",s);else{console.log(t,c);for(let t of c){if(t>s)break;e=t}}e>0&&(s=e)}return s}var H,z=n(1527),_=n(1537),L=n(1538),$=n.n(L),N=n(1539),j=n.n(N),W=Object.defineProperty,K=Object.getOwnPropertyNames,U=(e,t)=>function(){return e&&(t=(0,e[K(e)[0]])(e=0)),t};function V(e){var t={};return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}var X,Y,G,q,Z,Q,J,ee,te,ne=U({"../../node_modules/@emotion/memoize/dist/memoize.browser.esm.js"(){H=V}}),re=U({"../../node_modules/@emotion/is-prop-valid/dist/is-prop-valid.browser.esm.js"(){ne(),X=/^((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)-.*))$/,Y=H((function(e){return X.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91})),G=Y}}),ie=U({"../../node_modules/@linaria/core/esm/cx.js"(){q=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(" ")}}}),oe=U({"../../node_modules/@linaria/core/esm/index.js"(){ie()}});function le(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,r)=>{const{as:o=e,class:l}=n,a=function(e,t,n){const r=J(t,n);return"string"!==typeof e||-1!==e.indexOf("-")||Z(e[0])||Object.keys(r).forEach((e=>{G(e)||delete r[e]})),r}(o,n,["as","class"]);a.ref=r,a.className=t.atomic?q(t.class,a.className||l):q(a.className||l,t.class);const{vars:s}=t;if(s){const e={};for(const o in s){const r=s[o],i=r[0],l=r[1]||"",a="function"===typeof i?i(n):i;ee(a,t.name),e[`--${o}`]=`${a}${l}`}const r=a.style||{},i=Object.keys(r);i.length>0&&i.forEach((t=>{e[t]=r[t]})),a.style=e}return e.__linaria&&e!==o?(a.as=o,i.a.createElement(e,a)):i.a.createElement(o,a)},r=i.a.forwardRef?i.a.forwardRef(n):e=>{const t=J(e,["innerRef"]);return n(t,e.innerRef)};return r.displayName=t.name,r.__linaria={className:t.class,extends:e},r}}var ae,se,ue=U({"../../node_modules/@linaria/react/esm/styled.js"(){re(),oe(),Z=e=>e.toUpperCase()===e,Q=e=>t=>-1===e.indexOf(t),J=(e,t)=>{const n={};return Object.keys(e).filter(Q(t)).forEach((t=>{n[t]=e[t]})),n},ee=(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.`)}},te=new Proxy(le,{get:(e,t)=>e(t)})}}),ce=U({"../../node_modules/@linaria/react/esm/index.js"(){ue()}}),de=U({"linaria:number-overlay-editor-style_1i1z3n.linaria.css"(){}}),he=U({"src/data-grid-overlay-editor/private/number-overlay-editor-style.tsx"(){de(),ce(),ae=te("div")({name:"NumberOverlayEditorStyle",class:"n1czszh3"})}}),fe={};function pe(){var e,t,n;const r=null==(n=null==(t=null==(e=Intl.NumberFormat())?void 0:e.formatToParts(1.1))?void 0:t.find((e=>"decimal"===e.type)))?void 0:n.value;return null!=r?r:"."}((e,t)=>{for(var n in t)W(e,n,{get:t[n],enumerable:!0})})(fe,{default:()=>se});var ge=U({"src/data-grid-overlay-editor/private/number-overlay-editor.tsx"(){he(),se=e=>{const{value:t,onChange:n,onKeyDown:i,disabled:o,highlight:l,validatedSelection:a}=e,s=r.useRef();return r.useLayoutEffect((()=>{var e;if(void 0!==a){const t="number"===typeof a?[a,null]:a;null==(e=s.current)||e.setSelectionRange(t[0],t[1])}}),[a]),r.createElement(ae,null,r.createElement(m,{autoFocus:!0,getInputRef:s,className:"gdg-input",onFocus:e=>e.target.setSelectionRange(l?0:e.target.value.length,e.target.value.length),disabled:!0===o,thousandSeparator:"."===pe()?",":".",decimalSeparator:pe(),value:Object.is(t,-0)?"-":null!=t?t:"",onValueChange:n,onKeyDown:i}))}}});function ve(e="This should not happen"){throw new Error(e)}function me(e,t="Assertion failed"){if(!e)return ve(t)}function ye(e){return ve("Hell froze over")}function we(e,t){try{return e()}catch(n){return t}}var be=Object.prototype.hasOwnProperty;function De(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--&&De(e[r],t[r]););return-1===r}if(!n||"object"===typeof e){for(n in r=0,e){if(be.call(e,n)&&++r&&!be.call(t,n))return!1;if(!(n in t)||!De(e[n],t[n]))return!1}return Object.keys(t).length===r}}return e!==e&&t!==t}var xe=class extends r.PureComponent{constructor(){super(...arguments),this.wrapperRef=r.createRef(),this.clickOutside=e=>{if(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("mousedown",this.clickOutside,!0),document.addEventListener("contextmenu",this.clickOutside,!0)}componentWillUnmount(){document.removeEventListener("mousedown",this.clickOutside),document.removeEventListener("contextmenu",this.clickOutside)}render(){const{onClickOutside:e,...t}=this.props;return r.createElement("div",{...t,ref:this.wrapperRef},this.props.children)}};function Ce(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-font-family":e.fontFamily,"--gdg-editor-font-size":e.editorFontSize}}var ke={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,headerFontStyle:"600 13px",baseFontStyle:"13px",fontFamily:"Inter, Roboto, -apple-system, BlinkMacSystemFont, avenir next, avenir, segoe ui, helvetica neue, helvetica, Ubuntu, noto, arial, sans-serif",editorFontSize:"13px",lineHeight:1.4};var Ee=i.a.createContext(ke);var Se,Fe,Ae,Me,Re=null,Te=void 0,Ie="header",Be="group-header",Oe="out-of-bounds";(Fe=Se||(Se={})).Uri="uri",Fe.Text="text",Fe.Image="image",Fe.RowID="row-id",Fe.Number="number",Fe.Bubble="bubble",Fe.Boolean="boolean",Fe.Loading="loading",Fe.Markdown="markdown",Fe.Drilldown="drilldown",Fe.Protected="protected",Fe.Custom="custom",(Me=Ae||(Ae={})).HeaderRowID="headerRowID",Me.HeaderCode="headerCode",Me.HeaderNumber="headerNumber",Me.HeaderString="headerString",Me.HeaderBoolean="headerBoolean",Me.HeaderAudioUri="headerAudioUri",Me.HeaderVideoUri="headerVideoUri",Me.HeaderEmoji="headerEmoji",Me.HeaderImage="headerImage",Me.HeaderUri="headerUri",Me.HeaderPhone="headerPhone",Me.HeaderMarkdown="headerMarkdown",Me.HeaderDate="headerDate",Me.HeaderTime="headerTime",Me.HeaderEmail="headerEmail",Me.HeaderReference="headerReference",Me.HeaderIfThenElse="headerIfThenElse",Me.HeaderSingleValue="headerSingleValue",Me.HeaderLookup="headerLookup",Me.HeaderTextTemplate="headerTextTemplate",Me.HeaderMath="headerMath",Me.HeaderRollup="headerRollup",Me.HeaderJoinStrings="headerJoinStrings",Me.HeaderSplitString="headerSplitString",Me.HeaderGeoDistance="headerGeoDistance",Me.HeaderArray="headerArray",Me.RowOwnerOverlay="rowOwnerOverlay",Me.ProtectedColumnOverlay="protectedColumnOverlay";var Pe,He,ze,_e="___gdg_header_cell_",Le="___gdg_header_cell_checked",$e="___gdg_header_cell_unchecked";function Ne(e){return"width"in e&&"number"===typeof e.width}async function je(e){return"object"===typeof e?e:await e()}function We(e){return e.kind!==Se.Loading&&e.kind!==Se.Bubble&&e.kind!==Se.RowID&&e.kind!==Se.Protected&&e.kind!==Se.Drilldown}function Ke(e){return e.kind===Pe.Marker||e.kind===Pe.NewRow}function Ue(e){return!(!We(e)||e.kind===Se.Image)&&(e.kind===Se.Text||e.kind===Se.Number||e.kind===Se.Markdown||e.kind===Se.Uri||e.kind===Se.Custom||e.kind===Se.Boolean?!0!==e.readonly:void ye())}function Ve(e){return R()(e,"editor")}function Xe(e){var t;return!(null!=(t=e.readonly)&&t)}(He=Pe||(Pe={})).NewRow="new-row",He.Marker="marker";var Ye=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 Ye(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 Ye(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 Ye(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}},Ge=Ye;function qe(e,t,n,i,o=!1){const l=r.useRef();l.current=t,r.useEffect((()=>{if(null===n||void 0===n.addEventListener)return;const t=n,r=e=>{var n;null==(n=l.current)||n.call(t,e)};return t.addEventListener(e,r,{passive:i,capture:o}),()=>{t.removeEventListener(e,r,{capture:o})}}),[e,n,i,o])}function Ze(e,t){return void 0===e?void 0:t}Ge.empty=()=>null!=ze?ze:ze=new Ye([]),Ge.fromSingleSelection=e=>Ye.empty().add(e);var Qe=Math.PI;function Je(e){return e*Qe/180}var et=e=>{var t;const n=null!=(t=e.fgColor)?t:"currentColor";return r.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r.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"}),r.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"}))},tt=e=>{var t;const n=null!=(t=e.fgColor)?t:"currentColor";return r.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r.createElement("path",{d:"M19 6L10.3802 17L5.34071 11.8758",vectorEffect:"non-scaling-stroke",stroke:n,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}))};var nt="A-Za-z\xc0-\xd6\xd8-\xf6\xf8-\u02b8\u0300-\u0590\u0800-\u1fff\u200e\u2c00-\ufb1c\ufe00-\ufe6f\ufefd-\uffff",rt=new RegExp("^[^"+nt+"]*["+"\u0591-\u07ff\ufb1d-\ufdfd\ufe70-\ufefc]"),it=new RegExp("^[^\u0591-\u07ff\ufb1d-\ufdfd\ufe70-\ufefc]*["+nt+"]");var ot=void 0;function lt(e,t){return(null!=e?e:"")===(null!=t?t:"")}function at(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[u,c]=t.span;return u>=r&&u<=i||c>=r&&u<=i||u<r&&c>i}function st(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 ut(e,t){let n=0;const r=st(e,t);for(let i=0;i<r.length;i++){const e=r[i];if(!e.sticky)break;n+=e.width}return n}function ct(e,t,n,r,i){const o=st(e,r),l=[];for(const u of o){if(!u.sticky)break;l.push(u)}if(l.length>0)for(const u of l)n-=u.width;let a=t,s=null!=i?i:0;for(;s<=n&&a<o.length;)s+=o[a].width,a++;for(let u=t;u<a;u++){const e=o[u];e.sticky||l.push(e)}return l}var dt=0,ht={},ft="undefined"===typeof window;function pt(e,t,n){const r=function(e,t,n,r){return`${e}_${null!=r?r:t.font}_${n}`}(e,t,"middle",n);let i=ht[r];return void 0===i&&(i=t.measureText(e),ht[r]=i,dt++),dt>1e4&&(ht={},dt=0),i}function gt(e,t){return"string"!==typeof t&&(t=`${t.baseFontStyle} ${t.fontFamily}`),function(e,t){for(const i of mt)if(i.key===t)return i.val;const n=vt(e,"alphabetic"),r=-(vt(e,"middle").actualBoundingBoxDescent-n.actualBoundingBoxDescent)+n.actualBoundingBoxAscent/2;return mt.push({key:t,val:r}),r}(e,t)}function vt(e,t){e.save(),e.textBaseline=t;const n=e.measureText("ABCDEFGHIJKLMNOPQRSTUVWXYZ");return e.restore(),n}!async function(){var e;ft||void 0===(null==(e=null==document?void 0:document.fonts)?void 0:e.ready)||(await document.fonts.ready,dt=0,ht={},T.clear(),B.clear(),I.clear())}();var mt=[];function yt(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 wt(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 bt(e,t,n,r,i){const{ctx:o,x:l,y:a,w:s,h:u,theme:c}=e;if(!(r=null!=r&&r)){t.includes("\n")&&(t=t.split(/\r?\n/)[0]);const e=s/4;t.length>e&&(t=t.slice(0,e))}const d=gt(o,c),h="rtl"===(f=t,rt.test(f)?"rtl":it.test(f)?"ltr":"neutral");var f;if(void 0===n&&h&&(n="right"),h&&(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=`${c.fontFamily} ${c.baseFontStyle}`,r=function(e,t,n,r,i,o){let l=`${t}_${n}_${r}px`,a=T.get(l);if(void 0!==a)return a;if(r<=0)return[];let s=[],u=t.split("\n"),c=I.get(n),d=void 0===c?t.length:r/c.size*1.5,h=i&&void 0!==c&&c.count>2e4;for(let f of u){let t=O(e,f.substring(0,d),n,h),i=Math.min(f.length,d);if(t<=r)s.push(f);else{for(;t>r;){let l=P(e,f,r,n,t,i,h,o),a=f.substring(0,l);f=f.substring(a.length),s.push(a),t=O(e,f.substring(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())),T.set(l,s),T.size>500&&T.delete(T.keys().next().value),s}(o,t,e,s-2*c.cellHorizontalPadding,null!=i&&i),h=pt("ABCi09jgqpy",o,e),f=h.actualBoundingBoxAscent+h.actualBoundingBoxDescent,p=c.lineHeight*f,g=f+p*(r.length-1),v=g+c.cellVerticalPadding>u;v&&(o.save(),o.rect(l,a,s,u),o.clip());const m=a+u/2-g/2;let y=Math.max(a+c.cellVerticalPadding,m);for(const t of r)if(wt(o,t,l,y,s,f,d,c,n),y+=p,y>a+u)break;v&&o.restore()}else wt(o,t,l,a,s,u,d,c,n);e&&(o.textAlign="start"),h&&(o.direction="inherit")}}function Dt(e,t,n,r,i,o,l,a,s=-20,u=-20){const c=r+o/2,d=i+l/2,h=Math.abs(s-o/2)<10&&Math.abs(u-l/2)<10;switch(n){case!0:e.beginPath(),xt(e,c-9,d-9,18,18,4),e.fillStyle=a?t.accentColor:t.textMedium,e.fill(),e.beginPath(),e.moveTo(c-8+3.65005,d-8+7.84995),e.lineTo(c-8+6.37587,d-8+10.7304),e.lineTo(c-8+11.9999,d-8+4.74995),e.strokeStyle=t.bgCell,e.lineJoin="round",e.lineCap="round",e.lineWidth=1.9,e.stroke();break;case Re:case!1:e.beginPath(),xt(e,c-8.5,d-8.5,17,17,4),e.lineWidth=1,e.strokeStyle=h?t.textDark:t.textMedium,e.stroke();break;case Te:e.beginPath(),xt(e,c-8.5,d-8.5,17,17,4),e.fillStyle=h?t.textMedium:t.textLight,e.fill(),e.beginPath(),e.moveTo(c-4,d),e.lineTo(c+4,d),e.strokeStyle=t.bgCell,e.lineCap="round",e.lineWidth=1.9,e.stroke();break;default:ye()}}function xt(e,t,n,r,i,o){"number"===typeof o&&(o={tl:o,tr:o,br:o,bl:o}),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 Ct={};function kt(e,t){const{x:n,y:r,w:i,h:o,theme:l,ctx:a,imageLoader:s,col:u,row:c}=e;let d=n+l.cellHorizontalPadding;const h=function(e,t){const n=Math.ceil(window.devicePixelRatio),r=34*n,i=r+4*n,o=r/2,l=`${e},${t},${n}`;if(void 0!==Ct[l])return{el:Ct[l],height:r,width:i,middleWidth:4*n,sideWidth:o};const a=document.createElement("canvas"),s=a.getContext("2d");return null===s?null:(a.width=i,a.height=r,s.scale(n,n),Ct[l]=a,s.beginPath(),xt(s,5,5,28,24,6),s.shadowColor="rgba(24, 25, 34, 0.4)",s.shadowBlur=1,s.fillStyle=e,s.fill(),s.shadowColor="rgba(24, 25, 34, 0.3)",s.shadowOffsetY=1,s.shadowBlur=5,s.fillStyle=e,s.fill(),s.shadowOffsetY=0,s.shadowBlur=0,s.shadowBlur=0,s.beginPath(),xt(s,5.5,5.5,28,24,6),s.strokeStyle=t,s.lineWidth=1,s.stroke(),{el:a,height:r,width:i,sideWidth:o,middleWidth:4*n})}(l.bgCell,l.drilldownBorder),f=[];for(const p of t){if(d>n+i)break;const e=pt(p.text,a,`${l.baseFontStyle} ${l.fontFamily}`).width;let t=0;if(void 0!==p.img){void 0!==s.loadOrGetImage(p.img,u,c)&&(t=20)}const r=e+t+16;f.push({x:d,width:r}),d+=r+4}if(null!==h){const{el:e,height:t,middleWidth:n,sideWidth:i,width:l}=h;for(const s of f){const u=Math.floor(s.x),c=Math.floor(s.width);a.imageSmoothingEnabled=!1;const d=Math.min(17,c/2+5);a.drawImage(e,0,0,i,t,u-5,r+o/2-17,d,34),s.width>24&&a.drawImage(e,i,0,n,t,u+12,r+o/2-17,c-24,34),a.drawImage(e,l-i,0,i,t,u+c-(d-5),r+o/2-17,d,34),a.imageSmoothingEnabled=!0}}a.beginPath();for(const[p,g]of f.entries()){const e=t[p];let n=g.x+8;if(void 0!==e.img){const t=s.loadOrGetImage(e.img,u,c);if(void 0!==t){const e=16;let i=0,l=0,s=t.width,u=t.height;s>u?(i+=(s-u)/2,s=u):u>s&&(l+=(u-s)/2,u=s),a.beginPath(),xt(a,n,r+o/2-e/2,e,e,3),a.save(),a.clip(),a.drawImage(t,i,l,s,u,n,r+o/2-e/2,e,e),a.restore(),n+=e+4}}a.beginPath(),a.fillStyle=l.textBubble,a.fillText(e.text,n,r+o/2+gt(a,l))}}function Et(e,t,n,r,i,o,l,a,s,u,c,d,h,f,p){const g={x:0,y:o+u,width:0,height:0},v=o-i;if(e>=d){const t=l>e?-1:1,n=ut(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 m=0;m<e;m++)g.x+=f[m].width;if(g.width=f[e].width+1,-1===t)g.y=i,g.height=v;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&&lt(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&&lt(f[l+1].group,r)&&f[l+1].sticky===o;){const e=f[l+1];g.width+=e.width,l++}if(!o){const e=ut(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===c-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}function St(e){return!0!==e}var Ft={getAccessibilityString:e=>{var t,n;return null!=(n=null==(t=e.data)?void 0:t.toString())?n:"false"},kind:Se.Boolean,needsHover:!0,useLabel:!1,needsHoverPosition:!0,measure:()=>50,render:e=>function(e,t,n){if(!n&&t===Re)return;const{ctx:r,hoverAmount:i,theme:o,x:l,y:a,w:s,h:u,highlighted:c,hoverX:d,hoverY:h}=e;let f=n?.65+.35*i:.4;t===Re&&(f*=i),0!==f&&(r.globalAlpha=f,Dt(r,o,t,l,a,s,u,c,d,h),r.globalAlpha=1)}(e,e.cell.data,Xe(e.cell)),onDelete:e=>({...e,data:!1}),onClick:(e,t,n,r)=>{if(Xe(e)&&Math.abs(t-r.width/2)<=10&&Math.abs(n-r.height/2)<=10)return{...e,data:St(e.data)}}};ce();var At=te("div")({name:"BubblesOverlayEditorStyle",class:"b1bqsp5z"}),Mt=e=>{const{bubbles:t,onKeyDown:n}=e;return r.createElement(At,null,t.map(((e,t)=>r.createElement("div",{key:t,className:"boe-bubble"},e))),r.createElement("textarea",{className:"gdg-input",autoFocus:!0,onKeyDown:n}))},Rt={getAccessibilityString:e=>{var t,n;return null!=(n=null==(t=e.data)?void 0:t.toString())?n:""},kind:Se.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,render:e=>function(e,t){const{x:n,y:r,w:i,h:o,theme:l,ctx:a,highlighted:s}=e;let u=n+l.cellHorizontalPadding;const c=[];for(const d of t){if(u>n+i)break;const e=pt(d,a,`${l.baseFontStyle} ${l.fontFamily}`).width;c.push({x:u,width:e}),u+=e+16+4}a.beginPath();for(const d of c)xt(a,d.x,r+(o-20)/2,d.width+16,20,10);a.fillStyle=s?l.bgBubbleSelected:l.bgBubble,a.fill();for(const[d,h]of c.entries())a.beginPath(),a.fillStyle=l.textBubble,a.fillText(t[d],h.x+8,r+o/2+gt(a,l))}(e,e.cell.data),getEditor:()=>e=>{const{onKeyDown:t,value:n}=e;return r.createElement(Mt,{bubbles:n.data,onKeyDown:t})}};ce();var Tt=te("div")({name:"DrilldownOverlayEditorStyle",class:"df2kt4a"}),It=e=>{const{drilldowns:t,onKeyDown:n}=e;return r.createElement(Tt,null,t.map(((e,t)=>r.createElement("div",{key:t,className:"doe-bubble"},void 0!==e.img&&r.createElement("img",{src:e.img}),r.createElement("div",null,e.text)))),r.createElement("textarea",{className:"gdg-input",autoFocus:!0,onKeyDown:n}))},Bt={getAccessibilityString:e=>e.data.map((e=>e.text)).join(", "),kind:Se.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,render:e=>kt(e,e.cell.data),getEditor:()=>e=>{const{onKeyDown:t,value:n}=e;return r.createElement(It,{drilldowns:n.data,onKeyDown:t})}};ce();var Ot=te("div")({name:"ImageOverlayEditorStyle",class:"i1eozt10"}),Pt=e=>{const{urls:t,canWrite:n,onKeyDown:i,onEditClick:o,renderImage:l}=e,a=t.filter((e=>""!==e));if(0===a.length)return null;const s=a.length>1;return r.createElement(Ot,{onKeyDown:i,"data-testid":"GDG-default-image-overlay-editor"},r.createElement(z.Carousel,{showArrows:s,showThumbs:!1,swipeable:s,emulateTouch:s,infiniteLoop:s},a.map((e=>{var t;const n=null!=(t=null==l?void 0:l(e))?t:r.createElement("img",{draggable:!1,src:e});return r.createElement("div",{className:"centering-container",key:e},n)}))),n&&o&&r.createElement("button",{className:"edit-icon",onClick:o},r.createElement(et,null)),r.createElement("textarea",{className:"gdg-input",autoFocus:!0,onKeyDown:i}))},Ht={getAccessibilityString:e=>e.data.join(", "),kind:Se.Image,needsHover:!1,useLabel:!1,needsHoverPosition:!1,render:e=>{var t;return function(e,t){const{x:n,y:r,h:i,col:o,row:l,theme:a,ctx:s,imageLoader:u}=e;let c=n+a.cellHorizontalPadding;for(const d of t){if(0===d.length)continue;const e=u.loadOrGetImage(d,o,l);if(void 0!==e){const t=i-2*a.cellVerticalPadding,n=e.width*(t/e.height);xt(s,c,r+a.cellVerticalPadding,n,t,4),s.save(),s.clip(),s.drawImage(e,c,r+a.cellVerticalPadding,n,t),s.restore(),c+=n+4}}}(e,null!=(t=e.cell.displayData)?t:e.cell.data)},measure:(e,t)=>50*t.data.length,onDelete:e=>({...e,data:[]}),getEditor:()=>e=>{const{onKeyDown:t,value:n,onFinishedEditing:i,imageEditorOverride:o}=e,l=null!=o?o:Pt;return r.createElement(l,{urls:n.data,canWrite:n.allowAdd,onCancel:i,onChange:e=>{i({...n,data:[e]})},onKeyDown:t})}},zt={getAccessibilityString:()=>"",kind:Se.Loading,needsHover:!1,useLabel:!1,needsHoverPosition:!1,measure:()=>120,render:()=>{}};ce();var _t=te("div")({name:"MarkdownContainer",class:"mlbeo71"}),Lt=class extends i.a.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=Object(_.marked)(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.a.createElement(_t,{ref:this.containerRefHook})}};ce();var $t=te("textarea")({name:"InputBox",class:"ijuk0po"}),Nt=te("div")({name:"ShadowBox",class:"saq3p5l"}),jt=te("div")({name:"GrowingEntryStyle",class:"gf8vzix"}),Wt=e=>{const{placeholder:t,value:n,onKeyDown:i,highlight:o,altNewline:l,validatedSelection:a,...s}=e,{onChange:u,className:c}=s,d=r.useRef(null),h=null!=n?n:"";me(void 0!==u,"GrowingEntry must be a controlled input area"),r.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)}),[]),r.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 f=r.useCallback((e=>{"Enter"===e.key&&e.shiftKey&&!0===l||null==i||i(e)}),[l,i]);return r.createElement(jt,{className:"gdg-growing-entry"},r.createElement(Nt,{className:c},h+"\n"),r.createElement($t,{...s,className:(null!=c?c:"")+" gdg-input",ref:d,onKeyDown:f,value:h,placeholder:t,dir:"auto"}))};ce();var Kt=te("div")({name:"MarkdownOverlayEditorStyle",class:"mdwzdl1",vars:{"mdwzdl1-0":[e=>e.targetWidth,"px"]}}),Ut=e=>{const{markdown:t,onChange:n,onKeyDown:i,forceEditMode:o,createNode:l,targetRect:a,readonly:s,onFinish:u,validatedSelection:c}=e,[d,h]=r.useState(""===t||o),f=r.useCallback((()=>{h((e=>!e))}),[]),p=t?"ml-6":"";return d?r.createElement(Kt,{targetWidth:a.width},r.createElement(Wt,{autoFocus:!0,highlight:!1,validatedSelection:c,onKeyDown:e=>{"Enter"!==e.key&&i(e)},value:t,onChange:n}),r.createElement("div",{className:`edit-icon checkmark-hover ${p}`,onClick:()=>u()},r.createElement(tt,null))):r.createElement(Kt,{targetWidth:a.width},r.createElement(Lt,{contents:t,createNode:l}),!s&&r.createElement(r.Fragment,null,r.createElement("div",{className:"spacer"}),r.createElement("div",{className:`edit-icon edit-hover ${p}`,onClick:f},r.createElement(et,null))),r.createElement("textarea",{className:"md-edit-textarea gdg-input",autoFocus:!0,onKeyDown:i}))},Vt={getAccessibilityString:e=>{var t,n;return null!=(n=null==(t=e.data)?void 0:t.toString())?n:""},kind:Se.Markdown,needsHover:!1,needsHoverPosition:!1,renderPrep:yt,measure:(e,t,n)=>{const r=t.data.split("\n")[0];return e.measureText(r).width+2*n.cellHorizontalPadding},render:e=>bt(e,e.cell.data,e.cell.contentAlign),onDelete:e=>({...e,data:""}),getEditor:()=>e=>{const{onChange:t,onKeyDown:n,value:i,target:o,onFinishedEditing:l,markdownDivCreateNode:a,forceEditMode:s,validatedSelection:u}=e;return r.createElement(Ut,{onFinish:l,targetRect:o,readonly:!0===i.readonly,markdown:i.data,validatedSelection:u,onKeyDown:n,onChange:e=>t({...i,data:e.target.value}),forceEditMode:s,createNode:a})}},Xt={getAccessibilityString:e=>e.row.toString(),kind:Pe.Marker,needsHover:!0,needsHoverPosition:!1,renderPrep: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),n.textAlign="center",o},renderDeprep:function(e){const{ctx:t}=e;t.textAlign="start"},measure:()=>44,render:e=>function(e,t,n,r,i){const{ctx:o,x:l,y:a,w:s,h:u,hoverAmount:c,theme:d}=e,h=n?1:c;if("number"!==r&&h>0){o.globalAlpha=h;const e=7*(n?c:1);if(Dt(o,d,n,i?l+e:l,a,i?s-e:s,u,!0),i){o.globalAlpha=c,o.beginPath();for(const e of[3,6])for(const t of[-5,-1,3])o.rect(l+e,a+u/2+t,2,2);o.fillStyle=d.textLight,o.fill(),o.beginPath()}o.globalAlpha=1}if("number"===r||"both"===r&&!n){const e=t.toString(),n=l+s/2;"both"===r&&0!==c&&(o.globalAlpha=1-c),o.fillStyle=d.textLight,o.fillText(e,n,a+u/2+gt(o,`9px ${d.fontFamily}`)),0!==c&&(o.globalAlpha=1)}}(e,e.cell.row,e.cell.checked,e.cell.markerKind,e.cell.drawHandle),onClick:(e,t,n,r)=>{const{width:i,height:o}=r,l=e.drawHandle?7+(i-7)/2:i/2,a=o/2;if(Math.abs(t-l)<=10&&Math.abs(n-a)<=10)return{...e,checked:!e.checked}}},Yt={getAccessibilityString:()=>"",kind:Pe.NewRow,needsHover:!0,needsHoverPosition:!1,measure:()=>200,render:e=>function(e,t,n){const{ctx:r,x:i,y:o,w:l,h:a,hoverAmount:s,theme:u,spriteManager:c}=e;r.beginPath(),r.globalAlpha=s,r.rect(i,o,l,a),r.fillStyle=u.bgHeaderHovered,r.fill(),r.globalAlpha=1,r.beginPath();const d=""!==t;let h=0;if(void 0!==n){const e=8,t=a-e,l=i+e/2,f=o+e/2;c.drawSprite(n,"normal",r,l,f,t,u,d?1:s),h=t}else{h=24;const e=12,t=d?e:s*e,n=d?0:(1-s)*e*.5,l=u.cellHorizontalPadding+4;t>0&&(r.moveTo(i+l+n,o+a/2),r.lineTo(i+l+n+t,o+a/2),r.moveTo(i+l+n+.5*t,o+a/2-.5*t),r.lineTo(i+l+n+.5*t,o+a/2+.5*t),r.lineWidth=2,r.strokeStyle=u.bgIconHeader,r.lineCap="round",r.stroke())}r.fillStyle=u.textMedium,r.fillText(t,h+i+u.cellHorizontalPadding+.5,o+a/2+gt(r,u)),r.beginPath()}(e,e.cell.hint,e.cell.icon)},Gt=r.lazy((async()=>await Promise.resolve().then((()=>(ge(),fe))))),qt={getAccessibilityString:e=>{var t,n;return null!=(n=null==(t=e.data)?void 0:t.toString())?n:""},kind:Se.Number,needsHover:!1,needsHoverPosition:!1,useLabel:!0,renderPrep:yt,render:e=>bt(e,e.cell.displayData,e.cell.contentAlign),measure:(e,t)=>e.measureText(t.displayData).width+16,onDelete:e=>({...e,data:void 0}),getEditor:()=>e=>{const{isHighlighted:t,onChange:n,onKeyDown:i,value:o,validatedSelection:l}=e;return r.createElement(r.Suspense,{fallback:null},r.createElement(Gt,{highlight:t,disabled:!0===o.readonly,value:o.data,onKeyDown:i,validatedSelection:l,onChange:e=>n({...o,data:e.floatValue})}))}},Zt={getAccessibilityString:()=>"",measure:()=>108,kind:Se.Protected,needsHover:!1,needsHoverPosition:!1,render:function(e){const{ctx:t,theme:n,x:r,y:i,h:o}=e;t.beginPath();const l=2.5;let a=r+n.cellHorizontalPadding+l;const s=i+o/2,u=Math.cos(Je(30))*l,c=Math.sin(Je(30))*l;for(let d=0;d<12;d++)t.moveTo(a,s-l),t.lineTo(a,s+l),t.moveTo(a+u,s-c),t.lineTo(a-u,s+c),t.moveTo(a-u,s-c),t.lineTo(a+u,s+c),a+=8;t.lineWidth=1.1,t.lineCap="square",t.strokeStyle=n.textLight,t.stroke()}},Qt={getAccessibilityString:e=>{var t,n;return null!=(n=null==(t=e.data)?void 0:t.toString())?n:""},kind:Se.RowID,needsHover:!1,needsHoverPosition:!1,renderPrep:(e,t)=>yt(e,t,e.theme.textLight),render:e=>bt(e,e.cell.data,e.cell.contentAlign),measure:(e,t)=>e.measureText(t.data).width+16,getEditor:()=>e=>{const{isHighlighted:t,onChange:n,onKeyDown:r,value:o,validatedSelection:l}=e;return i.a.createElement(Wt,{highlight:t,autoFocus:!0!==o.readonly,disabled:!1!==o.readonly,onKeyDown:r,value:o.data,validatedSelection:l,onChange:e=>n({...o,data:e.target.value})})}},Jt={getAccessibilityString:e=>{var t,n;return null!=(n=null==(t=e.data)?void 0:t.toString())?n:""},kind:Se.Text,needsHover:!1,needsHoverPosition:!1,renderPrep:yt,useLabel:!0,render:e=>bt(e,e.cell.displayData,e.cell.contentAlign,e.cell.allowWrapping,e.hyperWrapping),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:""}),getEditor:()=>e=>{const{isHighlighted:t,onChange:n,onKeyDown:i,value:o,validatedSelection:l}=e;return r.createElement(Wt,{highlight:t,autoFocus:!0!==o.readonly,disabled:!0===o.readonly,onKeyDown:i,altNewline:!0,value:o.data,validatedSelection:l,onChange:e=>n({...o,data:e.target.value})})}};ce();var en=te("div")({name:"UriOverlayEditorStyle",class:"uf0sjo8"}),tn=e=>{const{uri:t,onChange:n,onKeyDown:i,forceEditMode:o,readonly:l,validatedSelection:a}=e,[s,u]=r.useState(""===t||o),c=r.useCallback((()=>{u(!0)}),[]);return s?r.createElement(Wt,{validatedSelection:a,highlight:!0,autoFocus:!0,onKeyDown:i,value:t,onChange:n}):r.createElement(en,null,r.createElement("a",{className:"link-area",href:t,target:"_blank",rel:"noopener noreferrer"},t),!l&&r.createElement("div",{className:"edit-icon",onClick:c},r.createElement(et,null)),r.createElement("textarea",{className:"gdg-input",autoFocus:!0,onKeyDown:i}))},nn={getAccessibilityString:e=>{var t,n;return null!=(n=null==(t=e.data)?void 0:t.toString())?n:""},kind:Se.Uri,needsHover:!1,needsHoverPosition:!1,useLabel:!0,renderPrep:yt,render:e=>bt(e,e.cell.data,e.cell.contentAlign),measure:(e,t)=>e.measureText(t.data).width+16,onDelete:e=>({...e,data:""}),getEditor:()=>e=>{const{onChange:t,onKeyDown:n,value:i,forceEditMode:o,validatedSelection:l}=e;return r.createElement(tn,{forceEditMode:o,uri:i.data,validatedSelection:l,readonly:!0===i.readonly,onKeyDown:n,onChange:e=>t({...i,data:e.target.value})})}},rn={[Pe.Marker]:Xt,[Pe.NewRow]:Yt,[Se.Boolean]:Ft,[Se.Bubble]:Rt,[Se.Drilldown]:Bt,[Se.Image]:Ht,[Se.Loading]:zt,[Se.Markdown]:Vt,[Se.Number]:qt,[Se.Protected]:Zt,[Se.RowID]:Qt,[Se.Text]:Jt,[Se.Uri]:nn};ce();var on=te("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 ln(){const[e,t]=function(){const[e,t]=r.useState();return[null!=e?e:void 0,t]}(),[n,i]=r.useState(0),[o,l]=r.useState(!0);r.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]),r.useEffect((()=>{if(o||void 0===e)return;let t;const n=()=>{const{right:r}=e.getBoundingClientRect();i((e=>Math.min(e+window.innerWidth-r-10,0))),t=requestAnimationFrame(n)};return t=requestAnimationFrame(n),()=>{void 0!==t&&cancelAnimationFrame(t)}}),[e,o]);return{ref:t,style:r.useMemo((()=>({transform:`translateX(${n}px)`})),[n])}}var an=e=>{const{target:t,content:n,onFinishEditing:i,forceEditMode:o,initialValue:l,imageEditorOverride:a,markdownDivCreateNode:s,highlight:u,className:c,theme:d,id:h,cell:f,validateCell:p,provideEditor:g}=e,[v,m]=r.useState(o?n:void 0),y=r.useRef(null!=v?v:n);y.current=null!=v?v:n;const[w,b]=r.useState((()=>void 0===p||!(We(n)&&!1===(null==p?void 0:p(f,n,y.current))))),D=r.useCallback(((e,t)=>{i(w?e:void 0,t)}),[w,i]),x=r.useCallback((e=>{if(void 0!==p&&void 0!==e&&We(e)){const t=p(f,e,y.current);!1===t?b(!1):"object"===typeof t?(e=t,b(!0)):b(!0)}m(e)}),[f,p]),C=r.useRef(!1),k=r.useRef(void 0),E=r.useCallback((()=>{D(v,[0,0]),C.current=!0}),[v,D]),S=r.useCallback((e=>{var t;D(e,null!=(t=k.current)?t:[0,0]),C.current=!0}),[D]),F=r.useCallback((async e=>{let t=!1;"Escape"===e.key?(e.stopPropagation(),e.preventDefault(),k.current=[0,0]):"Enter"!==e.key||e.shiftKey?"Tab"===e.key&&(e.stopPropagation(),e.preventDefault(),k.current=[e.shiftKey?-1:1,0],t=!0):(e.stopPropagation(),e.preventDefault(),k.current=[0,1],t=!0),await new Promise((e=>window.setTimeout(e,0))),C.current||void 0===k.current||(D(t?v:void 0,k.current),C.current=!0)}),[D,v]),M=r.useCallback((e=>{"Escape"===e.key?(D(void 0,[0,0]),e.stopPropagation(),e.preventDefault()):"Enter"!==e.key||e.ctrlKey?"Tab"===e.key&&(D(v,[e.shiftKey?-1:1,0]),e.stopPropagation(),e.preventDefault()):(D(v,[0,e.shiftKey?-1:1]),e.stopPropagation(),e.preventDefault())}),[D,v]),R=null!=v?v:n,T=r.useMemo((()=>null==g?void 0:g(n)),[n,g]),[I,B]=r.useMemo((()=>{var e;if(n.kind===Se.Custom)return[];const t=rn[n.kind];return[null==(e=t.getEditor)?void 0:e.call(t,n),t.useLabel]}),[n]),{ref:O,style:P}=ln();let H,z,_=!0,L=!0;if(void 0!==T){_=!0!==T.disablePadding,L=!0!==T.disableStyling;const e=Ve(T);e&&(z=T.styleOverride);const t=e?T.editor:T;H=r.createElement(t,{isHighlighted:u,onChange:x,value:R,initialValue:l,onFinishedEditing:S,validatedSelection:We(R)?R.selectionRange:void 0})}else void 0!==I&&(H=r.createElement(I,{forceEditMode:o,isHighlighted:u,onChange:x,value:R,onFinishedEditing:e=>D(null!=e?e:v,[0,0]),onKeyDown:M,target:t,imageEditorOverride:a,markdownDivCreateNode:s,isValid:w,validatedSelection:We(R)?R.selectionRange:void 0}));z={...z,...P};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=L?"gdg-style":"gdg-unstyle";return w||(N+=" invalid"),_&&(N+=" pad"),Object(A.createPortal)(r.createElement(Ee.Provider,{value:d},r.createElement(xe,{style:Ce(d),className:c,onClickOutside:E},r.createElement(on,{ref:O,id:h,className:N,style:z,as:!0===B?"label":void 0,targetX:t.x,targetY:t.y,targetWidth:t.width,targetHeight:t.height},r.createElement("div",{className:"clip-region",onKeyDown:void 0===T?void 0:F},H)))),$)};ce();var sn=65536,un=[];function cn(e,t){return t*sn+e}function dn(e){return e%sn}function hn(e,t){return(e-t)/sn}function fn(e){const t=dn(e);return[t,hn(e,t)]}var pn=class{constructor(){this.imageLoaded=()=>{},this.loadedLocations=[],this.visibleWindow={x:0,y:0,width:0,height:0},this.freezeCols=0,this.isInWindow=e=>{const t=dn(e),n=hn(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=$()((()=>{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=un.pop())?i:new Image;let a=!1;const s={img:void 0,cells:[cn(t,n)],url:e,cancel:()=>{a||(a=!0,un.length<12?un.unshift(l):o||(l.src=""))}},u=new Promise((e=>l.addEventListener("load",(()=>e(null)))));requestAnimationFrame((async()=>{try{l.src=e,await u,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(fn(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=cn(t,n);return i.cells.includes(e)||i.cells.push(e),i.img}this.loadImage(e,t,n,r)}},gn='<svg width="20" height="20" fill="none" xmlns="http://www.w3.org/2000/svg">',vn=e=>{const t=e.fgColor,n=e.bgColor;return`${gn}\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 `},mn={headerRowID:e=>{const t=e.fgColor,n=e.bgColor;return`\n ${gn}<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`${gn}\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 ${gn}<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`${gn}\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`${gn}\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:vn,headerVideoUri:e=>{const t=e.fgColor,n=e.bgColor;return`${gn}\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 ${gn}\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`${gn}\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:vn,headerPhone:e=>{const t=e.fgColor,n=e.bgColor;return`\n ${gn}\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 ${gn}\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`${gn}\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 ${gn}\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`${gn}\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 ${gn}\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`${gn}\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 ${gn}\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 ${gn}\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`${gn}\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`${gn}\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 ${gn}\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`${gn}\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 ${gn}\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`${gn}\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`${gn}\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`${gn}\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 yn={},wn=null;function bn(e){const t=e.toLowerCase().trim();if(void 0!==yn[t])return yn[t];(wn=wn||function(){const e=document.createElement("div");return e.classList.add("color2k-parser"),e.style.opacity="0",e.style.pointerEvents="none",e.style.position="fixed",document.body.append(e),e}()).style.color="#000",wn.style.color=t;const n=getComputedStyle(wn).color;wn.style.color="#fff",wn.style.color=t;const r=getComputedStyle(wn).color;if(r!==n)throw new Error("Could not parse color");const i=r.replace(/[^\d.,]/g,"").split(",").map(Number.parseFloat);return i.length<4&&i.push(1),yn[t]=i,i}function Dn(e,t){const[n,r,i]=bn(e);return`rgba(${n}, ${r}, ${i}, ${t})`}function xn(e,t){if(void 0===t)return e;const[n,r,i,o]=bn(e);if(1===o)return e;const[l,a,s,u]=bn(t),c=o+u*(1-o);return`rgba(${(o*n+u*l*(1-o))/c}, ${(o*r+u*a*(1-o))/c}, ${(o*i+u*s*(1-o))/c}, ${c})`}var Cn={kind:Se.Loading,allowOverlay:!1};function kn(e,t,n,r,i,o,l,a,s,u,c,d,h,f,p,g,v,m,y){let w,b,D;void 0!==p&&p[0][0]===r&&p[0][1]===t&&(w=p[1][0],b=p[1][1]);const x={ctx:e,theme:u,col:r,row:t,cell:n,x:i,y:o,w:l,h:a,highlighted:s,hoverAmount:f,hoverX:w,hoverY:b,imageLoader:d,spriteManager:h,hyperWrapping:g};let C=!1;return(function(e,t,n,r,i){const{ctx:o,x:l,y:a,w:s,h:u,theme:c}=e;let d=Number.MAX_SAFE_INTEGER;if(void 0!==t&&(d=n-t,d<500)){const e=1-d/500;o.globalAlpha=e,o.fillStyle=c.bgSearchResult,o.fillRect(l,a,s,u),o.globalAlpha=1,void 0!==r&&(r.fillStyle=c.bgSearchResult)}return i(),d<500}(x,n.lastUpdated,v,m,(()=>{var h,p;if(!(!Ke(n)&&!0===(null==c?void 0:c({ctx:e,cell:n,theme:u,rect:{x:i,y:o,width:l,height:a},col:r,row:t,hoverAmount:f,hoverX:w,hoverY:b,highlighted:s,imageLoader:d,requestAnimationFrame:()=>{C=!0}})))&&n.kind!==Se.Custom){const e=rn[n.kind];(null==m?void 0:m.renderer)!==e&&(null==(h=null==m?void 0:m.deprep)||h.call(m,x),m=void 0);const t=null==(p=e.renderPrep)?void 0:p.call(e,x,m);e.render(x),D={deprep:null==t?void 0:t.deprep,fillStyle:null==t?void 0:t.fillStyle,font:null==t?void 0:t.font,renderer:e}}}))||C)&&(null==y||y([r,t])),D}function En(e,t,n,r,i,o,l,a,s,u,c,d,h,f,p,g,v,m=!1){var y,w,b;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 D=null!=(y=v.horizontalBorderColor)?y:v.borderColor,x=v.borderColor;let C=0,k=o,E=0,S=l;if(void 0!==a&&a.length>0){C=Number.MAX_SAFE_INTEGER,E=Number.MAX_SAFE_INTEGER,k=Number.MIN_SAFE_INTEGER,S=Number.MIN_SAFE_INTEGER;for(const e of a)C=Math.min(C,e.x-1),k=Math.max(k,e.x+e.width+1),E=Math.min(E,e.y-1),S=Math.max(S,e.y+e.height+1)}const F=[];e.beginPath(),e.moveTo(C,c+.5),e.lineTo(k,c+.5),e.strokeStyle=v.bgHeader,e.lineWidth=1,e.stroke(),e.beginPath();let A=.5;for(let B=0;B<t.length;B++){const e=t[B];if(0===e.width)continue;A+=e.width;const n=e.sticky?A:A+r;n>=C&&n<=k-1&&(B===t.length-1||f(B+1))&&F.push({x1:n,y1:Math.max(u,E),x2:n,y2:Math.min(l,S),color:x})}const M=d(g-1),R=l-M+.5,T="sticky"===p;if(T&&F.push({x1:C,y1:R,x2:k,y2:R,color:D}),!0!==m){let e=c+.5,t=n,r=!0;const o=T?l-M:l;for(;e+i<=o;){const n=r?e:e+i;if(n>=E&&n<=S-1&&(!T||t!==g-1||Math.abs(n-R)>1)){const e=r||null==h?void 0:h(t);F.push({x1:C,y1:n,x2:k,y2:n,color:null!=(b=null!=(w=null==e?void 0:e.horizontalBorderColor)?w:null==e?void 0:e.borderColor)?b:D})}e+=d(t),r=!1,t++}}const I=j()(F,(e=>e.color));for(const B of Object.keys(I)){e.strokeStyle=B;for(const t of I[B])e.moveTo(t.x1,t.y1),e.lineTo(t.x2,t.y2);e.stroke(),e.beginPath()}void 0!==s&&e.restore()}function Sn(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 Fn(e,t,n){return t>=e.x&&t<=e.x+e.width&&n>=e.y&&n<=e.y+e.height}function An(e,t,n,r){return{x:e+n-30,y:Math.max(t,t+r/2-15),width:30,height:Math.min(30,r)}}function Mn(e,t,n,r,i,o,l,a,s,u,c,d,h,f){const p=o.title.startsWith(_e),g=An(t,n,r,i);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:c,isHovered:s,hasSelectedCell:u,spriteManager:d,menuBounds:g}))return}if(p){let l;return o.title===Le&&(l=!0),o.title===$e&&(l=!1),!0!==l&&(e.globalAlpha=c),Dt(e,a,l,t,n,r,i,!1,void 0,void 0),void(!0!==l&&(e.globalAlpha=1))}const v=l?a.textHeaderSelected:a.textHeader,m=!0===o.hasMenu&&(s||f&&l);let y=t+8;if(void 0!==o.icon){let t=l?"selected":"normal";"highlight"===o.style&&(t=l?"selected":"special"),d.drawSprite(o.icon,t,e,y,n+(i-20)/2,20,a),void 0!==o.overlayIcon&&d.drawSprite(o.overlayIcon,l?"selected":"special",e,y+9,n+((i-18)/2+6),18,a),y+=26}if(m&&!0===o.hasMenu&&r>35){const n=35,i=(r-n)/r,o=(r-.7*n)/r,l=e.createLinearGradient(t,0,t+r,0),a=Dn(v,0);l.addColorStop(0,v),l.addColorStop(i,v),l.addColorStop(o,a),l.addColorStop(1,a),e.fillStyle=l}else e.fillStyle=v;if(e.fillText(o.title,y,n+i/2+gt(e,`${a.headerFontStyle} ${a.fontFamily}`)),m&&!0===o.hasMenu){e.beginPath();const t=g.x+g.width/2-5.5,n=g.y+g.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 u=t[(a+1)%o],c=r(s,l),d=r(s,u),h=c.nx*d.ny-c.ny*d.nx,f=c.nx*d.nx-c.ny*-d.ny;let p=Math.asin(h<-1?-1:h>1?1:h),g=1,v=!1;f<0?p<0?p=Math.PI+p:(p=Math.PI-p,g=-1,v=!0):p>0&&(g=-1,v=!0),i=void 0!==s.radius?s.radius:n;const m=p/2;let y,w=Math.abs(Math.cos(m)*i/Math.sin(m));w>Math.min(c.len/2,d.len/2)?(w=Math.min(c.len/2,d.len/2),y=Math.abs(w*Math.sin(m)/Math.cos(m))):y=i;let b=s.x+d.nx*w,D=s.y+d.ny*w;b+=-d.ny*y*g,D+=d.nx*y*g,e.arc(b,D,y,c.ang+Math.PI/2*g,d.ang-Math.PI/2*g,v),l=s,s=u}e.closePath()}(e,[{x:t,y:n},{x:t+11,y:n},{x:t+5.5,y:n+6}],1),e.fillStyle=v,e.fill()}}function Rn(e,t,n,r,i,o,l,a,s,u,c,d,h,f,p,g,v,m,y){var w;const b=l+a;if(b<=0)return;e.fillStyle=d.bgHeader,e.fillRect(0,0,i,b);const[D,x]=null!=(w=null==r?void 0:r[0])?w:[],C=`${d.headerFontStyle} ${d.fontFamily}`;e.font=C,_n(t,0,o,0,b,((t,r,i,o)=>{var p,w,b;if(void 0!==v&&!v.some((e=>-1===e[1]&&e[0]===t.sourceIndex)))return;const k=Math.max(0,o-r);e.save(),e.beginPath(),e.rect(r+k,a,t.width-k,l),e.clip();const E=g(null!=(p=t.group)?p:"").overrideTheme,S=void 0===t.themeOverride&&void 0===E?d:{...d,...E,...t.themeOverride};S.bgHeader!==d.bgHeader&&(e.fillStyle=S.bgHeader,e.fill());const F=`${S.headerFontStyle} ${S.fontFamily}`;C!==F&&(e.font=F);const A=c.columns.hasIndex(t.sourceIndex),M=void 0!==s||u,R=!M&&-1===x&&D===t.sourceIndex,T=M?0:null!=(b=null==(w=f.find((e=>e.item[0]===t.sourceIndex&&-1===e.item[1])))?void 0:w.hoverAmount)?b:0,I=void 0!==(null==c?void 0:c.current)&&c.current.cell[0]===t.sourceIndex,B=A?S.accentColor:I?S.bgHeaderHasFocus:S.bgHeader,O=n?a:0,P=0===t.sourceIndex?0:1;A?(e.fillStyle=B,e.fillRect(r+P,O,t.width-P,l)):(I||T>0)&&(e.beginPath(),e.rect(r+P,O,t.width-P,l),I&&(e.fillStyle=S.bgHeaderHasFocus,e.fill()),T>0&&(e.globalAlpha=T,e.fillStyle=S.bgHeaderHovered,e.fill(),e.globalAlpha=1)),Mn(e,r,O,t.width,l,t,A,S,R,I,T,h,m,y),e.restore()})),n&&function(e,t,n,r,i,o,l,a,s,u,c,d){var h;const[f,p]=null!=(h=null==o?void 0:o[0])?h:[];let g=0;Ln(t,n,r,i,((t,n,r,s,h,v)=>{var m,y;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,v),e.clip();const w=c(n),b=void 0===(null==w?void 0:w.overrideTheme)?l:{...l,...w.overrideTheme},D=-2===p&&void 0!==f&&f>=t[0]&&f<=t[1],x=D?b.bgHeaderHovered:b.bgHeader;if(x!==l.bgHeader&&(e.fillStyle=x,e.fill()),e.fillStyle=null!=(m=b.textGroupHeader)?m:b.textHeader,void 0!==w){let t=r;if(void 0!==w.icon&&(a.drawSprite(w.icon,"normal",e,t+8,(i-20)/2,20,b),t+=26),e.fillText(w.name,t+8,i/2+gt(e,`${l.headerFontStyle} ${l.fontFamily}`)),void 0!==w.actions&&D){const t=Sn({x:r,y:s,width:h,height:v},w.actions);e.beginPath();const n=t[0].x-10,l=r+h-n;e.rect(n,0,l,i);const u=e.createLinearGradient(n,0,n+l,0),c=Dn(x,0);u.addColorStop(0,c),u.addColorStop(10/l,x),u.addColorStop(1,x),e.fillStyle=u,e.fill(),e.globalAlpha=.6;const[d,f]=null!=(y=null==o?void 0:o[1])?y:[-1,-1];for(let i=0;i<w.actions.length;i++){const n=w.actions[i],o=t[i],l=Fn(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,b),l&&(e.globalAlpha=.6)}e.globalAlpha=1}}u(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,v)}function Tn(e,t,n,r,i,o,l,a){return e<=i+l&&i<=e+n&&t<=o+a&&o<=t+r}function In(e,t,n,r,i,o,l,a,s,u,c,d,h,f){if(void 0===h||0===h.length)return;const p="sticky"===d?c(u-1):0;e.beginPath(),Ln(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}}})),_n(t,s,l,a,o,((t,n,l,a,s)=>{const g=Math.max(0,a-n),v=n+g+1,m=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(v,i,m,o-i);break}}f&&zn(s,l,r,u,c,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(v,t,m,i)}}))})),e.clip()}function Bn(e,t,n,r,i,o,l){var a,s;const[u,c]=e;let d,h;const f=null!=(s=null==(a=l.find((e=>!e.sticky)))?void 0:a.sourceIndex)?s:0;if(c>f){const e=Math.max(u,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<=c;t++)s+=l[t].width;h={x:a,y:n,width:s,height:i}}if(f>u){const e=Math.min(c,f-1);let a=t,s=r;for(let t=o.sourceIndex-1;t>=u;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,u,c,d,h,f,p,g,v,m,y,w,b,D,x,C,k,E,S,F,A){var M;let R=null!=(M=null==m?void 0:m.length)?M:Number.MAX_SAFE_INTEGER;const T=performance.now();let I,B=`${F.baseFontStyle} ${F.fontFamily}`;e.font=B;const O=new Set;return _n(t,a,o,l,i,((t,o,l,a,M)=>{var P;const H=Math.max(0,a-o),z=o+H,_=i+1,L=t.width-H,$=r-i-1;if(v.length>0){let e=!1;for(let t=0;t<v.length;t++){const n=v[t];if(Tn(z,_,L,$,n.x,n.y,n.width,n.height)){e=!0;break}}if(!e)return}const N=()=>{e.save(),e.beginPath(),e.rect(z,_,L,$),e.clip()},j=y.columns.hasIndex(t.sourceIndex),W=d(null!=(P=t.group)?P:"").overrideTheme,K=void 0===t.themeOverride&&void 0===W?F:{...F,...W,...t.themeOverride},U=`${K.baseFontStyle} ${K.fontFamily}`;let V;return U!==B&&(B=U,e.font=U),N(),zn(M,l,r,s,u,g,((r,i,l,u,d)=>{var g,M,P,H;if(void 0!==m){let e=!1;for(let n=0;n<m.length;n++){const r=m[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 z=y.rows.hasIndex(i),_=f.hasIndex(i),L=i<s?c([t.sourceIndex,i]):Cn;let $=o,W=t.width,X=!1,Y=!1;if(void 0!==L.span){const[s,u]=L.span,c=`${i},${s},${u},${t.sticky}`;if(O.has(c))return void R--;{const i=Bn(L.span,o,r,t.width,l,t,n),s=t.sticky?i[0]:i[1];if(t.sticky||void 0===i[0]||(Y=!0),void 0!==s){$=s.x,W=s.width,O.add(c),e.restore(),V=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===I&&(I=[]),I.push({x:s.x+t,y:r,width:s.width-t,height:l}),e.clip(),X=!0}}}const G=null==h?void 0:h(i),q=d&&void 0!==(null==(g=t.trailingRowOptions)?void 0:g.themeOverride)?null==(M=t.trailingRowOptions)?void 0:M.themeOverride:void 0,Z=void 0===L.themeOverride&&void 0===G&&void 0===q?K:{...K,...G,...q,...L.themeOverride};e.beginPath();const Q=[t.sourceIndex,i],J=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])}(Q,L,y);let ee=function(e,t,n){let r=0;if(void 0===n.current)return r;at(e,t,n.current.range)&&r++;for(const i of n.current.rangeStack)at(e,t,i)&&r++;return r}(Q,L,y);const te=void 0!==L.span&&y.columns.some((e=>void 0!==L.span&&e>=L.span[0]&&e<=L.span[1]));J&&!p?ee=0:J&&(ee=Math.max(ee,1)),te&&ee++,J||(z&&ee++,j&&!u&&ee++);const ne=L.kind===Se.Protected?Z.bgCellMedium:Z.bgCell;let re;if((u||ne!==F.bgCell)&&(re=xn(ne,re)),ee>0||_){_&&(re=xn(Z.bgHeader,re));for(let e=0;e<ee;e++)re=xn(Z.accentLight,re)}else!0===(null==w?void 0:w.some((e=>e[0]===t.sourceIndex&&e[1]===i)))&&(re=xn(Z.bgSearchResult,re));if(void 0!==b)for(const e of b){const n=e.range;n.x<=t.sourceIndex&&t.sourceIndex<n.x+n.width&&n.y<=i&&i<n.y+n.height&&(re=xn(e.color,re))}void 0!==re&&(e.fillStyle=re,void 0!==V&&(V.fillStyle=re),e.fillRect($,r,W,l)),"faded"===L.style&&(e.globalAlpha=.6);const ie=k.find((e=>e.item[0]===t.sourceIndex&&e.item[1]===i));if(W>10&&!Y){const n=`${Z.baseFontStyle} ${Z.fontFamily}`;n!==B&&(e.font=n,B=n),V=kn(e,i,L,t.sourceIndex,$,r,W,l,ee>0,Z,D,x,C,null!=(P=null==ie?void 0:ie.hoverAmount)?P:0,E,S,T,V,A)}return"faded"===L.style&&(e.globalAlpha=1),R--,X&&(e.restore(),null==(H=null==V?void 0:V.deprep)||H.call(V,{ctx:e}),V=void 0,N(),B=U,e.font=U),R<=0})),e.restore(),R<=0})),I}function Pn(e,t,n,r,i,o,l,a,s,u,c,d,h,f,p,g){var v;if(void 0===c.current||!l.some((e=>{var t;return e.sourceIndex===(null==(t=c.current)?void 0:t.cell[0])})))return;const[m,y]=c.current.cell,w=h(c.current.cell),b=null!=(v=w.span)?v:[m,m],D="sticky"!==f||"sticky"===f&&y===g-1?0:d(g-1)-1;let x;if(_n(l,r,i,o,u,((r,i,o,l,u)=>{if(!(r.sticky&&m>r.sourceIndex)&&!(r.sourceIndex<b[0]||r.sourceIndex>b[1]))return zn(u,o,n,g,d,f,((o,u,c)=>{if(u!==y)return;let d=i,h=r.width;if(void 0!==w.span){const e=Bn(w.span,i,o,r.width,c,r,a),t=r.sticky?e[0]:e[1];void 0!==t&&(d=t.x,h=t.width)}return x=()=>{var i,a,u,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,c),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+c-4,4,4),e.fillStyle=null!=(f=null==(u=r.themeOverride)?void 0:u.accentColor)?f:s.accentColor,e.fill())},!0})),!0})),void 0===x)return;const C=()=>{e.save(),e.beginPath(),e.rect(0,u,t,n-u-D),e.clip(),null==x||x(),e.restore()};return C(),C}function Hn(e,t){var n;const{canvas:r,headerCanvas:i,width:o,height:l,cellXOffset:a,cellYOffset:s,translateX:u,translateY:c,mappedColumns:d,enableGroups:h,freezeColumns:f,dragAndDropState:p,theme:g,headerHeight:v,groupHeaderHeight:m,disabledRows:y,rowHeight:w,verticalBorder:b,isResizing:D,selection:x,fillHandle:C,lastRowSticky:k,rows:E,getCellContent:S,getGroupDetails:F,getRowThemeOverride:A,isFocused:M,drawCustomCell:R,drawHeaderCallback:T,prelightCells:I,highlightRegions:B,imageLoader:O,lastBlitData:P,hoverValues:H,hyperWrapping:z,hoverInfo:_,spriteManager:L,scrolling:$,touchMode:N,enqueue:j}=e;let{damage:W}=e;if(0===o||0===l)return;const K=$?1:Math.ceil(null!=(n=window.devicePixelRatio)?n:1),U=function(e,t){if(e.width!==(null==t?void 0: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(De(i,o))continue;if(void 0!==n)return!1;if(i.width===o.width)return!1;const{width:l,...a}=i,{width:s,...u}=o;if(!De(a,u))return!1;n=r}return void 0===n||n}return!0}(e,t);r.width===o*K&&r.height===l*K||(r.width=o*K,r.height=l*K,r.style.width=o+"px",r.style.height=l+"px");const V=i,X=h?m+v:v;V.width===o*K&&V.height===X*K||(V.width=o*K,V.height=X*K,V.style.width=o+"px",V.style.height=X+"px");const Y=P.current;if(!0===U&&a===Y.cellXOffset&&s===Y.cellYOffset&&u===Y.translateX&&c===Y.translateY)return;const G=r.getContext("2d",{alpha:!1}),q=V.getContext("2d",{alpha:!1});if(null===q||null===G)return;const Z=e=>"number"===typeof w?w:w(e);q.save(),q.beginPath(),G.save(),G.beginPath(),q.textBaseline="middle",G.textBaseline="middle",1!==K&&(q.scale(K,K),G.scale(K,K));const Q=ct(d,a,o,p,u);let J=[];const ee=()=>{Rn(q,Q,h,_,o,u,v,m,p,D,x,g,L,H,b,F,W,T,N),En(q,Q,s,u,c,o,l,void 0,void 0,m,X,Z,A,b,k,E,g,!0)};if(void 0!==W){let e=!1;return W=W.filter((t=>(e=e||t[1]<0,t[1]<0||Tn(a,s,Q.length,300,t[0],t[1],1,1)||Tn(0,s,f,300,t[0],t[1],1,1)||k&&Tn(a,E-1,Q.length,1,t[0],t[1],1,1)))),W.length>0&&(In(G,Q,o,l,m,X,u,c,s,E,Z,k,W,!0),G.fillStyle=g.bgCell,G.fillRect(0,X+1,o,l-X-1),On(G,Q,d,l,X,u,c,s,E,Z,S,F,A,y,M,k,J,W,x,I,B,R,O,L,H,_,z,g,j),C&&void 0!==x.current&&W.some((e=>{var t,n;return e[0]===(null==(t=x.current)?void 0:t.cell[0])&&e[1]===(null==(n=x.current)?void 0:n.cell[1])}))&&Pn(G,o,l,s,u,c,Q,d,g,X,x,Z,S,k,C,E)),e&&(In(q,Q,o,X,m,X,u,c,s,E,Z,k,W,!1),ee()),G.restore(),void q.restore()}if(!0===U&&a===Y.cellXOffset&&u===Y.translateX||ee(),!0===U){const{regions:e}=function(e,t,n,r,i,o,l,a,s,u,c,d,h,f,p,g){const v=[];let m=!1;e.imageSmoothingEnabled=!1;const y=Math.min(n.cellYOffset,i),w=Math.max(n.cellYOffset,i);let b=0;if("number"===typeof g)b+=(w-y)*g;else for(let A=y;A<w;A++)b+=g(A);i>n.cellYOffset&&(b=-b),b+=l-n.translateY;const D=Math.min(n.cellXOffset,r),x=Math.max(n.cellXOffset,r);let C=0;for(let A=D;A<x;A++)C+=f[A].width;r>n.cellXOffset&&(C=-C),C+=o-n.translateX;let k=ut(p);if(k>0&&k++,0!==C&&0!==b)return{regions:[],yOnly:!1};const E=a?"number"===typeof g?g:g(c-1):0,S=s-k-Math.abs(C),F=u-d-E-Math.abs(b)-1;if(S>150&&F>150){m=0===C;const n={sx:0,sy:0,sw:s*h,sh:u*h,dx:0,dy:0,dw:s*h,dh:u*h};b>0?(n.sy=(d+1)*h,n.sh=F*h,n.dy=(b+d+1)*h,n.dh=F*h,v.push({x:0,y:d,width:s,height:b+1})):b<0&&(n.sy=(-b+d+1)*h,n.sh=F*h,n.dy=(d+1)*h,n.dh=F*h,v.push({x:0,y:u+b-E,width:s,height:-b+E})),C>0?(n.sx=k*h,n.sw=S*h,n.dx=(C+k)*h,n.dw=S*h,v.push({x:k-1,y:0,width:C+2,height:u})):C<0&&(n.sx=(k-C)*h,n.sw=S*h,n.dx=k*h,n.dw=S*h,v.push({x:s+C,y:0,width:-C,height:u})),e.setTransform(1,0,0,1,0,0),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:m}}(G,r,Y,a,s,u,c,"sticky"===k,o,l,E,X,K,d,Q,w);J=e}else if(!1!==U){J=function(e,t,n,r,i,o,l,a,s,u){const c=[];return t!==e.cellXOffset||n!==e.cellYOffset||r!==e.translateX||i!==e.translateY||_n(s,n,r,i,a,((e,t,n,r)=>{if(e.sourceIndex===u){const e=Math.max(t,r)+1;return c.push({x:e,y:0,width:o-e,height:l}),!0}})),c}(Y,a,s,u,c,o,l,X,Q,U)}!function(e,t,n,r,i,o,l,a,s,u){let c=!1;for(const f of t)if(!f.sticky){c=a(f.sourceIndex);break}const d=c?ut(t):0;e.beginPath(),e.moveTo(0,i+.5),e.lineTo(n,i+.5),e.strokeStyle=u.bgHeader,e.stroke(),e.beginPath();let h=!1;if(0!==d&&(e.moveTo(d+.5,0),e.lineTo(d+.5,r),h=!0),o){const t=s(l-1);e.moveTo(0,r-t+.5),e.lineTo(n,r-t+.5),h=!0}h&&(e.strokeStyle=u.bgCell,e.stroke()),e.moveTo(0,i+.5),e.lineTo(n,i+.5),e.strokeStyle=u.borderColor,e.stroke()}(G,Q,o,l,X,"sticky"===k,E,b,Z,g);const te=Pn(G,o,l,s,u,c,Q,d,g,X,x,Z,S,k,C,E),ne=function(e,t,n,r,i,o,l,a,s,u,c,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 v=g.map((e=>{var p,g,v,m,y;const w=e.range,b=Et(w.x,w.y,t,n,c,u+c,r,i,o,l,f,s,h,a,d);if(1===w.width&&1===w.height)return w.x<s?[{color:e.color,style:null!=(p=e.style)?p:"dashed",rect:b},void 0]:[void 0,{color:e.color,style:null!=(g=e.style)?g:"dashed",rect:b}];const D=Et(w.x+w.width-1,w.y+w.height-1,t,n,c,u+c,r,i,o,l,f,s,h,a,d);if(w.x<s&&w.x+w.width>=s){const p=Et(s-1,w.y+w.height-1,t,n,c,u+c,r,i,o,l,f,s,h,a,d),g=Et(s,w.y+w.height-1,t,n,c,u+c,r,i,o,l,f,s,h,a,d);return[{color:e.color,style:null!=(v=e.style)?v:"dashed",rect:{x:b.x,y:b.y,width:p.x+p.width-b.x,height:p.y+p.height-b.y}},{color:e.color,style:null!=(m=e.style)?m:"dashed",rect:{x:g.x,y:g.y,width:D.x+D.width-g.x,height:D.y+D.height-g.y}}]}return[void 0,{color:e.color,style:null!=(y=e.style)?y:"dashed",rect:{x:b.x,y:b.y,width:D.x+D.width-b.x,height:D.y+D.height-b.y}}]})),m=ut(a),y=()=>{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 v){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=Dn(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 v){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<m&&(e.rect(m,0,t,n),e.clip(),o=!0),e.strokeStyle=Dn(r.color,1),e.strokeRect(r.rect.x+1,r.rect.y+1,r.rect.width-2,r.rect.height-2))}e.restore()};return y(),y}(G,o,l,a,s,u,c,d,f,v,m,w,"sticky"===k,E,B);if(G.fillStyle=g.bgCell,J.length>0){G.beginPath();for(const e of J)G.rect(e.x,e.y,e.width,e.height);G.clip(),G.fill(),G.beginPath()}else G.fillRect(0,0,o,l);const re=On(G,Q,d,l,X,u,c,s,E,Z,S,F,A,y,M,k,J,W,x,I,B,R,O,L,H,_,z,g,j);!function(e,t,n,r,i,o,l,a,s,u,c,d,h,f,p,g,v,m){void 0===v&&t[t.length-1]===n[t.length-1]&&_n(t,s,l,a,o,((n,l,a,s,v)=>{if(n!==t[t.length-1])return;l+=n.width;const y=Math.max(l,s);y>r||(e.save(),e.beginPath(),e.rect(y,o+1,1e4,i-o-1),e.clip(),zn(v,a,i,u,c,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),u=void 0===s?m:{...m,...s};u.bgCell!==m.bgCell&&(e.fillStyle=u.bgCell,e.fillRect(l,t,1e4,r)),a&&(e.fillStyle=u.bgHeader,e.fillRect(l,t,1e4,r)),o&&(e.fillStyle=u.accentLight,e.fillRect(l,t,1e4,r))})),e.restore())}))}(G,Q,d,o,l,X,u,c,s,E,Z,A,x.rows,y,k,J,W,g),En(G,Q,s,u,c,o,l,J,re,m,X,Z,A,b,k,E,g),null==te||te(),null==ne||ne();const ie=function(e,t,n,r,i,o,l,a,s){let u=0;return _n(e,o,r,i,n,((e,n,r,i,o)=>(zn(o,r,t,l,a,s,((e,t,n,r)=>{r||(u=Math.max(t,u))})),!0))),u}(Q,l,X,u,c,s,E,Z,k);null==O||O.setWindow({x:a,y:s,width:Q.length,height:ie-s},f),P.current={cellXOffset:a,cellYOffset:s,translateX:u,translateY:c},G.restore(),q.restore()}function zn(e,t,n,r,i,o,l){let a=t,s=e,u="sticky"===o;for(;a<n||u;){const e=u&&a>=n;e&&(u=!1,s=r-1);const t=i(s);e&&(a=n-t);if(!(u&&s===r-1)&&!0===l(a,s,t,e,"none"!==o&&s===r-1))break;if(e)break;a+=t,s++}}function _n(e,t,n,r,i,o){let l=0,a=0;const s=i+r;for(const u of e){if(!0===o(u,u.sticky?a:l+n,s,a,t))break;l+=u.width,a+=u.sticky?u.width:0}}function Ln(e,t,n,r,i){var o;let l=0,a=0;for(let s=0;s<e.length;s++){const u=e[s];let c=s+1,d=u.width;for(u.sticky&&(a+=d);c<e.length&&lt(e[c].group,u.group)&&e[c].sticky===e[s].sticky;){const t=e[c];d+=t.width,c++,s++,t.sticky&&(a+=t.width)}const h=l+(u.sticky?0:n),f=u.sticky?0:Math.max(0,a-h),p=Math.min(d-f,t-(h+f));i([u.sourceIndex,e[c-1].sourceIndex],null!=(o=u.group)?o:"",h+f,0,p,r),l+=d}}function $n(e){const t=e-1;return t*t*t+1}function Nn(e){return new class{constructor(e){this.fn=e}get value(){var e;return null!=(e=this.val)?e:this.val=this.fn()}}(e)}var jn=Nn((()=>window.navigator.userAgent.includes("Firefox"))),Wn=Nn((()=>window.navigator.userAgent.includes("Mac OS")&&window.navigator.userAgent.includes("Safari")&&!window.navigator.userAgent.includes("Chrome"))),Kn=Nn((()=>window.navigator.platform.toLowerCase().startsWith("mac")));var Un=r.memo(r.forwardRef(((e,t)=>{var n,o,l,a,s,u,c,d;const{width:h,height:f,accessibilityHeight:p,className:g,columns:v,cellXOffset:m,cellYOffset:y,headerHeight:b,fillHandle:D=!1,groupHeaderHeight:x,rowHeight:C,rows:k,getCellContent:S,getRowThemeOverride:A,onHeaderMenuClick:M,enableGroups:R,isFilling:T,onCanvasFocused:I,onCanvasBlur:B,isFocused:O,selection:P,freezeColumns:H,onContextMenu:z,trailingRowType:_,fixedShadowX:L=!0,fixedShadowY:$=!0,onMouseDown:N,onMouseUp:j,onMouseMoveRaw:W,onMouseMove:K,onItemHovered:U,dragAndDropState:V,firstColAccessible:X,onKeyDown:Y,onKeyUp:G,highlightRegions:q,canvasRef:Z,onDragStart:Q,onDragEnd:J,eventTargetRef:ee,isResizing:te,isDragging:ne,isDraggable:re=!1,allowResize:ie,disabledRows:oe,getGroupDetails:le,theme:ae,prelightCells:se,headerIcons:ue,verticalBorder:ce,drawHeader:de,drawCustomCell:he,onCellFocused:fe,onDragOverCell:pe,onDrop:ge,onDragLeave:ve,smoothScrollX:ye=!1,smoothScrollY:we=!1,experimental:be}=e,De=null!=(n=e.translateX)?n:0,xe=null!=(o=e.translateY)?o:0,Ce=Math.max(H,Math.min(v.length-1,m)),ke=r.useRef(null),Ee=r.useMemo((()=>new pn),[]),Fe=r.useRef(),[Ae,Me]=r.useState(!1),Re=r.useRef([]),Te=r.useRef({cellXOffset:Ce,cellYOffset:y,translateX:De,translateY:xe}),[He,ze]=r.useState(),[_e,Le]=r.useState(),$e=r.useRef(null),[Ne,je]=r.useState(!1),We=r.useRef(Ne);We.current=Ne;const Ve=r.useMemo((()=>new class{constructor(e,t){this.onSettled=t,this.spriteMap=new Map,this.inFlight=0,this.headerIcons={...mn,...e}}drawSprite(e,t,n,r,i,o,l,a=1){const[s,u]=function(e,t){return"normal"===e?[t.bgIconHeader,t.fgIconHeader]:"selected"===e?["white",t.accentColor]:[t.accentColor,t.bgHeader]}(t,l),c=o*Math.ceil(window.devicePixelRatio),d=`${s}_${u}_${c}_${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:u,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,c,c)})).finally((()=>{this.inFlight--,0===this.inFlight&&this.onSettled()}))}else a<1&&(n.globalAlpha=a),n.drawImage(h,0,0,c,c,r,i,o,o),a<1&&(n.globalAlpha=1)}}(ue,(()=>{ot.current=void 0,at.current()}))),[ue]),Ye=R?x+b:b,Ze=r.useRef(-1),Qe=!0!==(null==be?void 0:be.enableFirefoxRescaling);r.useLayoutEffect((()=>{jn.value&&1!==window.devicePixelRatio&&!Qe&&(-1!==Ze.current&&Me(!0),window.clearTimeout(Ze.current),Ze.current=window.setTimeout((()=>{Me(!1),Ze.current=-1}),200))}),[y,Ce,De,xe,Qe]);const Je=function(e,t){return i.a.useMemo((()=>e.map(((e,n)=>({...e,sourceIndex:n,sticky:n<t})))),[e,t])}(v,H),et=r.useCallback(((e,t,n)=>{const r=e.getBoundingClientRect();if(t>=Je.length||n>=k)return;const i=Et(t,n,h,f,x,Ye,Ce,y,De,xe,k,H,"sticky"===_,Je,C);return i.x+=r.x,i.y+=r.y,i}),[h,f,x,Ye,Ce,y,De,xe,k,H,_,Je,C]),tt=r.useCallback(((e,t,n,r)=>{var i,o;const l=e.getBoundingClientRect(),a=t-l.left,s=n-l.top,u=ct(Je,Ce,h,void 0,De);let c=0;r instanceof MouseEvent&&(c=r.button);const d=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}(a,u,De),p=function(e,t,n,r,i,o,l,a,s,u){const c=r+i;if(n&&e<=i)return-2;if(e<=c)return-1;const d="number"===typeof l?l:l(o-1);if(u&&e>t-d)return o-1;const h=o-(u?1:0),f=e-(null!=s?s:0);if("number"===typeof l){const e=Math.floor((f-c)/l)+a;if(e>=h)return;return e}{let e=c;for(let t=a;t<h;t++){const n=l(t);if(f<=e+n)return t;e+=n}return}}(s,f,R,b,x,k,C,y,xe,"sticky"===_),g=!0===(null==r?void 0:r.shiftKey),v=!0===(null==r?void 0:r.ctrlKey),m=!0===(null==r?void 0:r.metaKey),w=void 0!==r&&!(r instanceof MouseEvent),E=[Math.abs(a)<20?-1:Math.abs(l.width-a)<20?1:0,Math.abs(s)<20?-1:Math.abs(l.height-s)<20?1:0];let S;if(-1===d||s<0||a<0||void 0===p||a>h||s>f){const n=a>h?-1:a<0?1:0,r=s>f?1:s<0?-1:0;let i=!1;if(-1===d&&-1===p){const n=et(e,Je.length-1,-1);me(void 0!==n),i=t<n.x+n.width+5}S={kind:Oe,location:[-1!==d?d:a<0?0:Je.length-1,null!=p?p:k-1],direction:[n,r],shiftKey:g,ctrlKey:v,metaKey:m,isEdge:i,isTouch:w,button:c,scrollEdge:E}}else if(p<=-1){let r=et(e,d,p);me(void 0!==r);let l=void 0!==r&&r.x+r.width-t<=5;const a=d-1;t-r.x<=5&&a>=0?(l=!0,r=et(e,a,p),me(void 0!==r),S={kind:R&&-2===p?Be:Ie,location:[a,p],bounds:r,group:null!=(i=Je[a].group)?i:"",isEdge:l,shiftKey:g,ctrlKey:v,metaKey:m,isTouch:w,localEventX:t-r.x,localEventY:n-r.y,button:c,scrollEdge:E}):S={kind:R&&-2===p?Be:Ie,group:null!=(o=Je[d].group)?o:"",location:[d,p],bounds:r,isEdge:l,shiftKey:g,ctrlKey:v,metaKey:m,isTouch:w,localEventX:t-r.x,localEventY:n-r.y,button:c,scrollEdge:E}}else{const r=et(e,d,p);me(void 0!==r);S={kind:"cell",location:[d,p],bounds:r,isEdge:void 0!==r&&r.x+r.width-t<5,shiftKey:g,ctrlKey:v,isFillHandle:D&&void 0!==r&&r.x+r.width-t<6&&r.y+r.height-n<6,metaKey:m,isTouch:w,localEventX:t-r.x,localEventY:n-r.y,button:c,scrollEdge:E}}return S}),[Je,Ce,h,De,f,R,b,x,k,C,y,xe,_,et,D]);const[nt]=null!=He?He:[],rt=r.useRef((e=>{})),it=r.useRef(He);it.current=He;const ot=r.useRef(),lt=r.useCallback((()=>{var e;const t=ke.current,n=$e.current;if(null===t||null===n)return;const r=ot.current,i={canvas:t,headerCanvas:n,width:h,height:f,cellXOffset:Ce,cellYOffset:y,translateX:Math.round(De),translateY:Math.round(xe),mappedColumns:Je,enableGroups:R,freezeColumns:H,dragAndDropState:V,theme:ae,headerHeight:b,groupHeaderHeight:x,disabledRows:null!=oe?oe:Ge.empty(),rowHeight:C,verticalBorder:ce,isResizing:te,isFocused:O,selection:P,fillHandle:D,lastRowSticky:_,rows:k,getCellContent:S,getGroupDetails:null!=le?le:e=>({name:e}),getRowThemeOverride:A,drawCustomCell:he,drawHeaderCallback:de,prelightCells:se,highlightRegions:q,imageLoader:Ee,lastBlitData:Te,damage:Fe.current,hoverValues:Re.current,hoverInfo:it.current,spriteManager:Ve,scrolling:Ae,hyperWrapping:null!=(e=null==be?void 0:be.hyperWrapping)&&e,touchMode:Ne,enqueue:rt.current};void 0===i.damage?(ot.current=i,Hn(i,r)):Hn(i,void 0)}),[h,f,Ce,y,De,xe,Je,R,H,V,ae,b,x,oe,C,ce,te,O,P,D,_,k,S,le,A,he,de,se,q,Ee,Ve,Ae,null==be?void 0:be.hyperWrapping,Ne]),at=r.useRef(lt);r.useLayoutEffect((()=>{lt(),at.current=lt}),[lt]),r.useLayoutEffect((()=>{(async()=>{var e;void 0!==(null==(e=null==document?void 0:document.fonts)?void 0:e.ready)&&(await document.fonts.ready,ot.current=void 0,at.current())})()}),[]);const st=r.useCallback((e=>{Fe.current=e,at.current(),Fe.current=void 0}),[]),dt=function(e){const t=r.useRef([]),n=r.useRef(0),i=r.useRef(e);i.current=e;const o=r.useCallback((()=>{const e=()=>{const e=t.current;t.current=[],i.current(e),t.current.length>0?n.current++:n.current=0};window.requestAnimationFrame(n.current>600?()=>window.requestAnimationFrame(e):e)}),[]);return r.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])}(st);rt.current=dt;const ht=r.useCallback((e=>{st(e.map((e=>e.cell)))}),[st]);Ee.setCallback(st);const[ft,pt]=r.useState(!1),[gt,vt]=null!=nt?nt:[],mt=void 0!==gt&&-1===vt,yt=void 0!==gt&&-2===vt;let wt,bt=!1,Dt=!1;if(void 0!==gt&&void 0!==vt&&vt>-1){const e=S([gt,vt]);bt=e.kind===Pe.NewRow||e.kind===Pe.Marker&&"number"!==e.markerKind,Dt=e.kind===Se.Boolean&&Xe(e),wt=e.cursor}const xt=ne?"grabbing":null!=_e&&_e||te?"col-resize":ft||T?"crosshair":void 0!==wt?wt:mt||bt||Dt||yt?"pointer":"default",Ct=r.useMemo((()=>({contain:"strict",display:"block",cursor:xt})),[xt]),kt=null==ee?void 0:ee.current;null!==kt&&void 0!==kt&&(kt.style.cursor=Ct.cursor);const St=r.useCallback(((e,t,n,r)=>{if(void 0===le)return;const i=le(e);if(void 0!==i.actions){const e=Sn(t,i.actions);for(const[o,l]of e.entries())if(Fn(l,n+t.x,r+l.y))return i.actions[o]}}),[le]),Ft=r.useCallback(((e,t,n,r)=>{const i=v[t];if(!ne&&!te&&!0===i.hasMenu&&(null==_e||!_e)){const i=et(e,t,-1);me(void 0!==i);const o=An(i.x,i.y,i.width,i.height);if(n>o.x&&n<o.x+o.width&&r>o.y&&r<o.y+o.height)return i}}),[v,et,_e,ne,te]),At=r.useRef(0),Mt=r.useRef(),Rt=r.useCallback((e=>{const t=ke.current,n=null==ee?void 0:ee.current;if(null===t||e.target!==t&&e.target!==n)return;let r,i;if(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.left+n.clientWidth)return;if(i>e.top+n.clientHeight)return}const o=tt(t,r,i,e);if(Mt.current=o.location,o.isTouch&&(At.current=Date.now()),We.current!==o.isTouch&&je(o.isTouch),o.kind!==Ie||void 0===Ft(t,o.location[0],r,i)){if(o.kind===Be){if(void 0!==St(o.group,o.bounds,o.localEventX,o.localEventY))return}null==N||N(o),o.isTouch||!0===re||re===o.kind||e.preventDefault()}}),[ee,re,tt,St,Ft,N]);qe("touchstart",Rt,window,!1),qe("mousedown",Rt,window,!1);const Tt=r.useCallback((e=>{var t,n;const r=ke.current;if(void 0===j||null===r)return;const i=null==ee?void 0:ee.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);let s=tt(r,l,a,e);if(s.isTouch&&0!==At.current&&Date.now()-At.current>500&&(s={...s,isLongTouch:!0}),We.current!==s.isTouch&&je(s.isTouch),!o&&e.cancelable&&e.preventDefault(),s.kind===Ie&&Ft(r,s.location[0],l,a)){const[e]=s.location,i=Ft(r,e,l,a);if(void 0!==i)return void(0===s.button&&(null==(t=Mt.current)?void 0:t[0])===e&&-1===(null==(n=Mt.current)?void 0:n[1])?null==M||M(e,i):j(s,!0))}else if(s.kind===Be){const e=St(s.group,s.bounds,s.localEventX,s.localEventY);if(void 0!==e)return void(0===s.button&&e.onClick(s))}j(s,o)}),[j,ee,tt,Ft,M,St]);qe("mouseup",Tt,window,!1),qe("touchend",Tt,window,!1);qe("contextmenu",r.useCallback((e=>{const t=ke.current;if(null===t||void 0===z)return;const n=tt(t,e.clientX,e.clientY,e);z(n,(()=>{e.cancelable&&e.preventDefault()}))}),[tt,z]),null!=(l=null==ee?void 0:ee.current)?l:null,!1);const It=r.useCallback((e=>{Fe.current=e.map((e=>e.item)),Re.current=e,at.current(),Fe.current=void 0}),[]),Bt=r.useMemo((()=>new 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:$n(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=w()(e.hoverAmount-t,0,1);void 0!==this.currentHoveredItem&&(this.currentHoveredItem.hoverAmount=w()(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)}}}}(It)),[It]),Ot=r.useRef(Bt);Ot.current=Bt,r.useLayoutEffect((()=>{const e=Ot.current;if(void 0===nt||nt[1]<0)return void e.setHovered(nt);const t=S(nt);e.setHovered(t.kind===Se.Custom||rn[t.kind].needsHover?nt:void 0)}),[S,nt]);const Pt=r.useRef();qe("mousemove",r.useCallback((e=>{const t=ke.current;if(null===t)return;const n=tt(t,e.clientX,e.clientY,e);if(r=n,i=Pt.current,r===i||(null==r?void 0:r.kind)===(null==i?void 0:i.kind)&&(null==r?void 0:r.location[0])===(null==i?void 0:i.location[0])&&(null==r?void 0:r.location[1])===(null==i?void 0:i.location[1])){if("cell"===n.kind||n.kind===Ie||n.kind===Be){const e=[n.location,[n.localEventX,n.localEventY]];if(ze(e),it.current=e,"cell"===n.kind){const e=S(n.location);(e.kind===Se.Custom||rn[e.kind].needsHoverPosition)&&st([n.location])}else n.kind===Be&&st([n.location])}}else null==U||U(n),ze(n.kind===Oe?void 0:[n.location,[n.localEventX,n.localEventY]]),Pt.current=n;var r,i;if(Le(n.kind===Ie&&n.isEdge&&!0===ie),D&&void 0!==P.current){const[n,r]=P.current.cell,i=et(t,n,r),o=e.clientX,l=e.clientY;me(void 0!==i),pt(o>=i.x+i.width-6&&o<=i.x+i.width&&l>=i.y+i.height-6&&l<=i.y+i.height)}else pt(!1);null==W||W(e),K(n)}),[tt,ie,D,P,W,K,U,S,st,et]),window,!0);const Ht=r.useCallback((e=>{const t=ke.current;if(null===t)return;let n;void 0!==P.current&&(n=et(t,P.current.cell[0],P.current.cell[1])),null==Y||Y({bounds:n,cancel:()=>{e.stopPropagation(),e.preventDefault()},ctrlKey:e.ctrlKey,metaKey:e.metaKey,shiftKey:e.shiftKey,altKey:e.altKey,key:e.key,keyCode:e.keyCode})}),[Y,P,et]),zt=r.useCallback((e=>{const t=ke.current;if(null===t)return;let n;void 0!==P.current&&(n=et(t,P.current.cell[0],P.current.cell[1])),null==G||G({bounds:n,cancel:()=>{e.stopPropagation(),e.preventDefault()},ctrlKey:e.ctrlKey,metaKey:e.metaKey,shiftKey:e.shiftKey,altKey:e.altKey,key:e.key,keyCode:e.keyCode})}),[G,P,et]),_t=r.useCallback((e=>{ke.current=e,void 0!==Z&&(Z.current=e)}),[Z]);qe("dragstart",r.useCallback((e=>{const t=ke.current;if(null===t||!1===re||te)return void e.preventDefault();let n,r;const i=tt(t,e.clientX,e.clientY);if(!0!==re&&i.kind!==re)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=et(t,n,r);me(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),Mn(l,0,0,o.width,o.height,Je[n],!1,ae,!1,!1,0,Ve,de,!1)):(l.font=`${ae.baseFontStyle} ${ae.fontFamily}`,l.fillStyle=ae.bgCell,l.fillRect(0,0,i.width,i.height),kn(l,r,S([n,r]),0,0,0,o.width,o.height,!1,ae,he,Ee,Ve,1,void 0,!1,0))),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)}}}),[re,te,tt,Q,et,ae,Je,Ve,de,S,he,Ee]),null!=(a=null==ee?void 0:ee.current)?a:null,!1,!1);const Lt=r.useRef();qe("dragover",r.useCallback((e=>{var t;const n=ke.current;if(void 0!==ge&&e.preventDefault(),null===n||void 0===pe)return;const r=tt(n,e.clientX,e.clientY),[i,o]=r.location,l=i-(X?0:1),[a,s]=null!=(t=Lt.current)?t:[];a===l&&s===o||(Lt.current=[l,o],pe([l,o],e.dataTransfer))}),[X,tt,pe,ge]),null!=(s=null==ee?void 0:ee.current)?s:null,!1,!1);qe("dragend",r.useCallback((()=>{Lt.current=void 0,null==J||J()}),[J]),null!=(u=null==ee?void 0:ee.current)?u:null,!1,!1);qe("drop",r.useCallback((e=>{const t=ke.current;if(null===t||void 0===ge)return;e.preventDefault();const n=tt(t,e.clientX,e.clientY),[r,i]=n.location;ge([r-(X?0:1),i],e.dataTransfer)}),[X,tt,ge]),null!=(c=null==ee?void 0:ee.current)?c:null,!1,!1);qe("dragleave",r.useCallback((()=>{null==ve||ve()}),[ve]),null!=(d=null==ee?void 0:ee.current)?d:null,!1,!1);const $t=r.useRef(P);$t.current=P;const Nt=r.useRef(null),jt=r.useCallback((e=>{var t;null!==ke.current&&ke.current.contains(document.activeElement)&&(null===e&&void 0!==$t.current.current?null==(t=null==Z?void 0:Z.current)||t.focus({preventScroll:!0}):null!==e&&e.focus({preventScroll:!0}),Nt.current=e)}),[Z]);r.useImperativeHandle(t,(()=>({focus:()=>{var e;const t=Nt.current;null!==t&&document.contains(t)?t.focus({preventScroll:!0}):null==(e=null==Z?void 0:Z.current)||e.focus({preventScroll:!0})},getBounds:(e,t)=>{if(void 0!==Z&&null!==Z.current)return et(Z.current,e,null!=t?t:-1)},damage:ht})),[Z,ht,et]);const Wt=r.useRef(),Kt=function(e,t,n){const[i,o]=r.useState(e),l=r.useRef(!0);r.useEffect((()=>()=>{l.current=!1}),[]);const a=r.useRef(F()((e=>{l.current&&o(e)}),n));return r.useLayoutEffect((()=>{l.current&&a.current((()=>e()))}),t),i}((()=>{var e,t,n,i;if(h<50)return null;let o=ct(Je,Ce,h,V,De);const l=X?0:-1;X||0!==(null==(e=o[0])?void 0:e.sourceIndex)||(o=o.slice(1));const[a,s]=null!=(n=null==(t=P.current)?void 0:t.cell)?n:[],u=null==(i=P.current)?void 0:i.range,c=o.map((e=>e.sourceIndex)),d=E()(y,Math.min(k,y+p));return void 0===a||void 0===s||c.includes(a)&&d.includes(s)||jt(null),r.createElement("table",{key:"access-tree",role:"grid","aria-rowcount":k+1,"aria-multiselectable":"true","aria-colcount":Je.length+l},r.createElement("thead",{role:"rowgroup"},r.createElement("tr",{role:"row","aria-rowindex":1},o.map((e=>r.createElement("th",{role:"columnheader","aria-selected":P.columns.hasIndex(e.sourceIndex),"aria-colindex":e.sourceIndex+1+l,tabIndex:-1,onFocus:t=>{if(t.target!==Nt.current)return null==fe?void 0:fe([e.sourceIndex,-1])},key:e.sourceIndex},e.title))))),r.createElement("tbody",{role:"rowgroup"},d.map((e=>r.createElement("tr",{role:"row","aria-selected":P.rows.hasIndex(e),key:e,"aria-rowindex":e+2},o.map((t=>{const n=t.sourceIndex,i=`${n},${e}`,o=a===n&&s===e,c=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=S([n,e]);return r.createElement("td",{key:i,role:"gridcell","aria-colindex":n+1+l,"aria-selected":c,"aria-readonly":Ke(h)||!Ue(h),id:d,"data-testid":d,onClick:()=>{const t=null==Z?void 0:Z.current;if(null!==t&&void 0!==t)return null==Y?void 0:Y({bounds:et(t,n,e),cancel:()=>{},ctrlKey:!1,key:"Enter",keyCode:13,metaKey:!1,shiftKey:!1,altKey:!1})},onFocusCapture:t=>{var r,i;if(t.target!==Nt.current&&((null==(r=Wt.current)?void 0:r[0])!==n||(null==(i=Wt.current)?void 0:i[1])!==e))return Wt.current=[n,e],null==fe?void 0:fe([n,e])},ref:o?jt:void 0,tabIndex:-1},(f=h).kind===Se.Custom?f.copyData:rn[f.kind].getAccessibilityString(f));var f})))))))}),[h,Je,Ce,V,De,k,y,p,P,jt,S,Z,Y,et,fe],200),Ut=L?ut(Je,V):0,Vt=0!==H&&L?Ce>H?1:w()(-De/100,0,1):0,Xt=32*-y+xe,Yt=$?w()(-Xt/100,0,1):0,Gt=r.useMemo((()=>{if(!Vt&&!Yt)return null;const e={position:"absolute",top:0,left:Ut,width:h-Ut,height:f,opacity:Vt,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:Ye,left:0,width:h,height:f,opacity:Yt,pointerEvents:"none",transition:we?void 0:"opacity 0.2s",boxShadow:"inset 0 13px 10px -13px rgba(0, 0, 0, 0.2)"};return r.createElement(r.Fragment,null,Vt>0&&r.createElement("div",{id:"shadow-x",style:e}),Yt>0&&r.createElement("div",{id:"shadow-y",style:t}))}),[Vt,Yt,Ut,h,ye,Ye,f,we]),qt=r.useMemo((()=>({position:"absolute",top:0,left:0})),[]);return r.createElement(r.Fragment,null,r.createElement("canvas",{"data-testid":"data-grid-canvas",tabIndex:0,onKeyDown:Ht,onKeyUp:zt,onFocus:I,onBlur:B,className:g,ref:_t,style:Ct},Kt),r.createElement("canvas",{ref:$e,style:qt}),Gt)})));function Vn(e,t,n,r){var i;return w()(Math.round(t-(null!=(i=e.growOffset)?i:0)),Math.ceil(n),Math.floor(r))}var Xn=e=>{var t;const[n,i]=r.useState(),[o,l]=r.useState(),[a,s]=r.useState(),[u,c]=r.useState(),[d,h]=r.useState(!1),[f,p]=r.useState(),[g,v]=r.useState(),[m,y]=r.useState(),[w,b]=r.useState(!1),[D,x]=r.useState(),{onColumnMoved:C,onColumnResize:k,onColumnResizeStart:E,onColumnResizeEnd:S,gridRef:F,maxColumnWidth:A,minColumnWidth:M,onHeaderMenuClick:R,onRowMoved:T,lockColumns:I,getCellContent:B}=e,O=void 0!==(null!=(t=null!=k?k:S)?t:E),{onMouseDown:P,onMouseUp:H,onItemHovered:z,columns:_,selection:L}=e,$=L.columns,N=r.useCallback((e=>{const[t,n]=e.location;void 0!==a&&u!==t&&t>=I?(h(!0),c(t)):void 0!==g&&void 0!==n?(b(!0),y(Math.max(0,n))):null==z||z(e)}),[a,g,u,z,I]),j=void 0!==C,W=r.useCallback((e=>{var t;if(0===e.button){const[n,r]=e.location;if("out-of-bounds"===e.kind&&e.isEdge&&O){const e=null==(t=null==F?void 0:F.current)?void 0:t.getBounds(_.length-1,-1);void 0!==e&&(i(e.x),l(_.length-1))}else"header"===e.kind&&n>=I?e.isEdge&&O?(i(e.bounds.x),l(n),null==E||E(_[n],e.bounds.width,n)):"header"===e.kind&&j&&(p(e.bounds.x),s(n)):"cell"===e.kind&&I>0&&0===n&&void 0!==r&&void 0!==T&&(x(e.bounds.y),v(r))}null==P||P(e)}),[P,O,I,T,F,_,j,E]),K=r.useCallback(((e,t)=>{d||w||null==R||R(e,t)}),[d,w,R]),U=r.useRef(-1),V=r.useCallback((()=>{U.current=-1,v(void 0),y(void 0),x(void 0),b(!1),s(void 0),c(void 0),p(void 0),h(!1),l(void 0),i(void 0)}),[]),X=r.useCallback(((e,t)=>{if(0===e.button){if(void 0!==o){if(!0===(null==$?void 0:$.hasIndex(o)))for(const e of $){if(e===o)continue;const t=_[e];null==k||k(t,Vn(t,U.current,M,A),e)}null==S||S(_[o],Vn(_[o],U.current,M,A),o);for(const e of $){if(e===o)continue;const t=_[e];null==S||S(t,Vn(t,U.current,M,A),e)}}V(),void 0!==a&&void 0!==u&&(null==C||C(a,u)),void 0!==g&&void 0!==m&&(null==T||T(g,m))}null==H||H(e,t)}),[H,o,a,u,g,m,$,S,_,M,A,k,C,T,V]),Y=r.useMemo((()=>{if(void 0!==a&&void 0!==u&&a!==u)return{src:a,dest:u}}),[a,u]),G=r.useCallback((e=>{if(void 0!==a&&void 0!==f){Math.abs(e.clientX-f)>20&&h(!0)}else if(void 0!==g&&void 0!==D){Math.abs(e.clientY-D)>20&&b(!0)}else if(void 0!==o&&void 0!==n){const t=_[o],r=e.clientX-n;if(null==k||k(t,Vn(t,r,M,A),o),U.current=r,(null==$?void 0:$.first())===o)for(const e of $){if(e===o)continue;const t=_[e];null==k||k(t,Vn(t,U.current,M,A),e)}}}),[a,f,g,D,o,n,_,M,A,k,$]),q=r.useCallback((e=>{if(void 0===g||void 0===m)return B(e);let[t,n]=e;return n===m?n=g:(n>m&&(n-=1),n>=g&&(n+=1)),B([t,n])}),[g,m,B]),Z=e.onDragStart,Q=r.useCallback((e=>{null==Z||Z(e),e.defaultPrevented()||V()}),[V,Z]);return r.createElement(Un,{accessibilityHeight:e.accessibilityHeight,cellXOffset:e.cellXOffset,cellYOffset:e.cellYOffset,columns:e.columns,enableGroups:e.enableGroups,freezeColumns:e.freezeColumns,onCanvasFocused:e.onCanvasFocused,onCanvasBlur:e.onCanvasBlur,isFocused:e.isFocused,onMouseMove:e.onMouseMove,groupHeaderHeight:e.groupHeaderHeight,fillHandle:e.fillHandle,headerHeight:e.headerHeight,height:e.height,trailingRowType:e.trailingRowType,rowHeight:e.rowHeight,rows:e.rows,highlightRegions:e.highlightRegions,verticalBorder:e.verticalBorder,width:e.width,canvasRef:e.canvasRef,onContextMenu:e.onContextMenu,className:e.className,theme:e.theme,disabledRows:e.disabledRows,isFilling:e.isFilling,firstColAccessible:e.firstColAccessible,drawCustomCell:e.drawCustomCell,drawHeader:e.drawHeader,eventTargetRef:e.eventTargetRef,experimental:e.experimental,getGroupDetails:e.getGroupDetails,getRowThemeOverride:e.getRowThemeOverride,headerIcons:e.headerIcons,isDraggable:e.isDraggable,onDragEnd:e.onDragEnd,onCellFocused:e.onCellFocused,onDragStart:Q,onDragOverCell:e.onDragOverCell,onDragLeave:e.onDragLeave,onDrop:e.onDrop,onKeyDown:e.onKeyDown,onKeyUp:e.onKeyUp,prelightCells:e.prelightCells,selection:e.selection,translateX:e.translateX,translateY:e.translateY,smoothScrollX:e.smoothScrollX,smoothScrollY:e.smoothScrollY,getCellContent:q,isResizing:void 0!==o,onHeaderMenuClick:K,isDragging:d,onItemHovered:N,onMouseDown:W,allowResize:void 0!==k,onMouseUp:X,dragAndDropState:Y,onMouseMoveRaw:G,ref:F})};ce();var Yn=te("div")({name:"ScrollRegionStyle",class:"s1jz82f8",vars:{"s1jz82f8-0":[e=>e.isSafari?"scroll":"auto"]}}),Gn=e=>{var t,n,i,o;const{children:l,clientHeight:a,scrollHeight:s,scrollWidth:u,update:c,draggable:d,className:h,preventDiagonalScrolling:f=!1,paddingBottom:p=0,paddingRight:g=0,rightElement:v,rightElementProps:m,scrollRef:y,scrollToEnd:w,minimap:b,style:D}=e,x=[],C=null!=(t=null==m?void 0:m.sticky)&&t,k=null!=(n=null==m?void 0:m.fill)&&n,E=r.useRef(0),S=r.useRef(0),F=r.useRef(null),A=window.devicePixelRatio;r.useEffect((()=>{const e=F.current;null!==e&&!0===w&&(e.scrollLeft=e.scrollWidth-e.clientWidth)}),[w]);const M=r.useRef({scrollLeft:0,scrollTop:0,lockDirection:void 0}),R=r.useRef(0),T=r.useRef(null),I=r.useCallback((()=>{var e,t,n,r;const i=F.current;if(null===i)return;let o=i.scrollTop,l=i.scrollLeft;const a=M.current.scrollTop,u=M.current.scrollLeft,d=l-u,h=o-a;0!==d&&0!==h&&f&&void 0===M.current.lockDirection&&(M.current.lockDirection=Math.abs(d)>Math.abs(h)?[u,void 0]:[void 0,a]);const v=M.current.lockDirection;l=null!=(e=null==v?void 0:v[0])?e:l,o=null!=(t=null==v?void 0:v[1])?t:o,M.current.scrollLeft=l,M.current.scrollTop=o;const m=Math.max(0,o),y=S.current-m,w=i.scrollHeight-i.clientHeight,b=Math.max(0,s-i.clientHeight);if(S.current=m,w>0&&(Math.abs(y)>2e3||0===m||m===w)&&s>i.scrollHeight+5){const e=m/w,t=(s-i.clientHeight)*e;E.current=t-m}R.current>0&&window.clearTimeout(R.current),void 0!==v&&(R.current=window.setTimeout((()=>{var e;const[t,n]=null!=(e=M.current.lockDirection)?e:[];void 0!==t?i.scrollLeft=t:void 0!==n&&(i.scrollTop=n),M.current.lockDirection=void 0,R.current=0}),200)),c({x:Math.max(0,l),y:Math.min(b,m+E.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,c,f]),B=r.useRef(I);B.current=I;const O=r.useRef(),P=r.useCallback((e=>{e.stopPropagation()}),[]);r.useEffect((()=>{I()}),[I,p,g]);const H=r.useCallback((e=>{F.current=e,void 0!==y&&(y.current=e)}),[y]);let z=0,_=0;for(x.push(r.createElement("div",{key:z++,style:{width:u,height:0}}));_<s;){const e=Math.min(5e6,s-_);x.push(r.createElement("div",{key:z++,style:{width:0,height:e}})),_+=e}const{ref:L,width:$,height:N}=function(){const e=Object(r.useRef)(null),[t,n]=Object(r.useState)({width:void 0,height:void 0});return Object(r.useLayoutEffect)((()=>{const t=(e=>({width:t,height:n})=>{e((e=>e.width===t&&e.height===n?e:{width:t,height:n}))})(n),r=new window.ResizeObserver((e=>{for(const n of e){const{width:e,height:r}=n&&n.contentRect||{};t({width:e,height:r})}}));return e.current&&r.observe(e.current,void 0),()=>{r.disconnect()}}),[e.current]),{ref:e,...t}}();return(null==(i=O.current)?void 0:i.height)===N&&(null==(o=O.current)?void 0:o.width)===$||(window.setTimeout((()=>B.current()),0),O.current={width:$,height:N}),0===(null!=$?$:0)||0===(null!=N?N:0)?r.createElement("div",{style:D,ref:L}):r.createElement("div",{style:D,ref:L},r.createElement(Yn,{isSafari:Wn.value},b,r.createElement("div",{className:"dvn-underlay"},l),r.createElement("div",{ref:H,style:O.current,draggable:d,onDragStart:e=>{d||(e.stopPropagation(),e.preventDefault())},className:"dvn-scroller "+(null!=h?h:""),onScroll:I},r.createElement("div",{className:"dvn-scroll-inner"+(void 0===v?" hidden":"")},r.createElement("div",{className:"dvn-stack"},x),void 0!==v&&r.createElement(r.Fragment,null,!k&&r.createElement("div",{className:"dvn-spacer"}),r.createElement("div",{ref:T,onMouseDown:P,onMouseUp:P,onMouseMove:P,style:{height:N,maxHeight:a-Math.ceil(A%1),position:"sticky",top:0,paddingLeft:1,marginBottom:-40,marginRight:g,flexGrow:k?1:void 0,right:C?null!=g?g:0:void 0,pointerEvents:"auto"}},v))))))},qn=te("div")({name:"MinimapStyle",class:"m15w2ly5"}),Zn=e=>{var t,n,i;const{columns:o,rows:l,rowHeight:a,headerHeight:s,groupHeaderHeight:u,enableGroups:c,freezeColumns:d,experimental:h,clientSize:f}=e,{paddingRight:p,paddingBottom:g}=null!=h?h:{},{className:v,onVisibleRegionChanged:m,scrollToEnd:y,scrollRef:b,preventDiagonalScrolling:D,rightElement:x,rightElementProps:C,overscrollX:k,overscrollY:E,showMinimap:S=!1,...F}=e,{smoothScrollX:A=!1,smoothScrollY:M=!1}=e,[R,T]=f,I=r.useRef(),B=r.useRef(),O=r.useRef(),P=r.useRef(),H=r.useMemo((()=>{let e=Math.max(0,null!=k?k:0);for(const t of o)e+=t.width;return e}),[o,k]);let z=c?s+u:s;if("number"===typeof a)z+=l*a;else for(let r=0;r<l;r++)z+=a(r);void 0!==E&&(z+=E);const _=r.useRef(),L=r.useCallback((()=>{var e,t,n;const r=_.current;if(void 0===r)return;let i=0,s=0,u=0,c=0,h=0;for(let l=0;l<d;l++)h+=o[l].width;for(const l of o){const e=i-h;if(r.x>=e+l.width)i+=l.width,c++,u++;else if(r.x>e)i+=l.width,A?s+=e-r.x:c++,u++;else{if(!(r.x+r.width>e))break;i+=l.width,u++}}let f=0,p=0,g=0;if("number"===typeof a)M?(p=Math.floor(r.y/a),f=p*a-r.y):p=Math.ceil(r.y/a),g=Math.ceil(r.height/a)+p,f<0&&g++;else{let e=0;for(let t=0;t<l;t++){const n=a(t),i=e+(M?0:n/2);if(r.y>=e+n)e+=n,p++,g++;else if(r.y>i)e+=n,M?f+=i-r.y:p++,g++;else{if(!(r.y+r.height>n/2+e))break;e+=n,g++}}}const v={x:c,y:p,width:u-c,height:g-p},y=I.current;void 0!==y&&y.y===v.y&&y.x===v.x&&y.height===v.height&&y.width===v.width&&B.current===s&&O.current===f&&r.width===(null==(e=P.current)?void 0:e[0])&&r.height===(null==(t=P.current)?void 0:t[1])||(null==m||m({x:c,y:p,width:u-c,height:g-p},r.width,r.height,null!=(n=r.paddingRight)?n:0,s,f),I.current=v,B.current=s,O.current=f,P.current=[r.width,r.height])}),[o,a,l,m,d,A,M]),$=r.useCallback((e=>{_.current=e,L()}),[L]);r.useEffect((()=>{L()}),[L]);const N=null!=(t=null==b?void 0:b.current)?t:void 0,j=w()(H/z,2/3,1.5),W=200,K=j>1?W:Math.ceil(W*j),U=j>1?Math.ceil(W/j):W,V=K/H,X=U/z,Y=Math.min(R*Math.max(V,.01),K),G=Math.min(T*Math.max(X,.01),U),q=(null!=(n=null==N?void 0:N.scrollLeft)?n:0)/(H-R)*(K-Y),Z=(null!=(i=null==N?void 0:N.scrollTop)?i:0)/(z-T)*(U-G),Q=r.useMemo((()=>{if(!S||0===Y||0===G)return;const e=e=>{if(void 0===N)return;const t=e.currentTarget.getBoundingClientRect(),n=e.clientX-t.x-Y/2,r=e.clientY-t.y-G/2,i=(H-N.clientWidth)*(n/(K-Y)),o=(z-N.clientHeight)*(r/(U-G));N.scrollTo({left:i,top:o,behavior:"mousemove"===e.type?"auto":"smooth"})};return r.createElement(qn,{style:{width:K,height:U},"data-testid":"minimap-container",onMouseMove:t=>{1===t.buttons&&e(t)},onClick:e},r.createElement("div",{className:"header"}),r.createElement("div",{className:"locationMarker",onDragStart:e=>e.preventDefault(),style:{left:q,top:Z,width:Y,height:G,borderRadius:Math.min(Y,.2*G,9)}}))}),[U,z,q,N,S,Z,G,Y,K,H]);return r.createElement(Gn,{scrollRef:b,minimap:Q,className:v,preventDiagonalScrolling:D,draggable:!0===F.isDraggable||"string"===typeof F.isDraggable,scrollWidth:H+(null!=p?p:0),scrollHeight:z+(null!=g?g:0),clientHeight:T,rightElement:x,paddingBottom:g,paddingRight:p,rightElementProps:C,update:$,scrollToEnd:y},r.createElement(Xn,{eventTargetRef:b,width:R,height:T,...F}))};ce();var Qn=te("div")({name:"SearchWrapper",class:"sxep88s",vars:{"sxep88s-0":[e=>e.showSearch?0:400,"px"]}}),Jn=r.createElement("svg",{className:"button-icon",viewBox:"0 0 512 512"},r.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"48",d:"M112 244l144-144 144 144M256 120v292"})),er=r.createElement("svg",{className:"button-icon",viewBox:"0 0 512 512"},r.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"48",d:"M112 268l144 144 144-144M256 392V100"})),tr=r.createElement("svg",{className:"button-icon",viewBox:"0 0 512 512"},r.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"M368 368L144 144M368 144L144 368"})),nr=e=>{const{getCellsForSelection:t,onSearchResultsChanged:n,showSearch:i=!1,onSearchClose:o,canvasRef:l,cellYOffset:a,rows:s,columns:u}=e,[c]=r.useState((()=>"search-box-"+Math.round(1e3*Math.random()))),[d,h]=r.useState(""),[f,p]=r.useState(),g=r.useRef(f);g.current=f;const v=r.useRef(new AbortController),m=r.useRef(null),y=r.useRef(),[w,b]=r.useState([]),D=r.useCallback((()=>{void 0!==y.current&&(window.cancelAnimationFrame(y.current),y.current=void 0,v.current.abort())}),[]),x=r.useRef(a);x.current=a;const C=r.useCallback((e=>{const r=new RegExp(e.replace(/([$()*+.?[\\\]^{|}-])/g,"\\$1"),"i");let i=x.current,o=Math.min(10,s),l=0;p(void 0),b([]);const a=[],c=async()=>{var e,d;if(void 0===t)return;const h=performance.now(),f=s-l;let m=t({x:0,y:i,width:u.length,height:Math.min(o,f,s-i)},v.current.signal);"function"===typeof m&&(m=await m());let w=!1;for(const[t,n]of m.entries())for(const[e,o]of n.entries()){let n;switch(o.kind){case Se.Text:case Se.Number:n=o.displayData;break;case Se.Uri:case Se.Markdown:n=o.data;break;case Se.Boolean:n="boolean"===typeof o.data?o.data.toString():void 0;break;case Se.Image:case Se.Bubble:n=o.data.join("\ud83d\udc33");break;case Se.Custom:n=o.copyData}void 0!==n&&r.test(n)&&(a.push([e,t+i]),w=!0)}const D=performance.now();w&&b([...a]),l+=m.length,me(l<=s);const x=null!=(d=null==(e=g.current)?void 0:e.selectedIndex)?d:-1;p({results:a.length,rowsSearched:l,selectedIndex:x}),null==n||n(a,x),i+o>=s?i=0:i+=o;const C=D-h,k=10/Math.max(C,1);o=Math.ceil(o*k),l<s&&a.length<1e3&&(y.current=window.requestAnimationFrame(c))};D(),y.current=window.requestAnimationFrame(c)}),[D,u.length,t,n,s]),k=r.useCallback((()=>{var e;null==o||o(),p(void 0),b([]),null==n||n([],-1),D(),null==(e=null==l?void 0:l.current)||e.focus()}),[D,l,o,n]),E=r.useCallback((e=>{h(e.target.value),""===e.target.value?(p(void 0),b([]),D()):C(e.target.value)}),[C,D]);r.useEffect((()=>{i&&null!==m.current&&(h(""),m.current.focus({preventScroll:!0}))}),[i]);const S=r.useCallback((e=>{var t;if(null==(t=null==e?void 0:e.stopPropagation)||t.call(e),void 0===f)return;const r=(f.selectedIndex+1)%f.results;p({...f,selectedIndex:r}),null==n||n(w,r)}),[f,n,w]),F=r.useCallback((e=>{var t;if(null==(t=null==e?void 0:e.stopPropagation)||t.call(e),void 0===f)return;let r=(f.selectedIndex-1)%f.results;r<0&&(r+=f.results),p({...f,selectedIndex:r}),null==n||n(w,r)}),[n,w,f]),A=r.useCallback((e=>{(e.ctrlKey||e.metaKey)&&"KeyF"===e.nativeEvent.code||"Escape"===e.key?(k(),e.stopPropagation(),e.preventDefault()):"Enter"===e.key&&(e.shiftKey?F():S())}),[k,S,F]);r.useEffect((()=>()=>{D()}),[D]);const M=r.useMemo((()=>{var e,t,n;let l;void 0!==f&&(l=f.results>=1e3?"over 1000":`${f.results} result${1!==f.results?"s":""}`,f.selectedIndex>=0&&(l=`${f.selectedIndex+1} of ${l}`));const a=e=>{e.stopPropagation()},u={width:`${Math.floor((null!=(e=null==f?void 0:f.rowsSearched)?e:0)/s*100)}%`};return r.createElement(Qn,{showSearch:i,onMouseDown:a,onMouseMove:a,onMouseUp:a,onClick:a},r.createElement("div",{className:"search-bar-inner"},r.createElement("input",{id:c,"aria-hidden":!i,"data-testid":"search-input",ref:m,onChange:E,value:d,tabIndex:i?void 0:-1,onKeyDownCapture:A}),r.createElement("button",{"aria-label":"Previous Result","aria-hidden":!i,tabIndex:i?void 0:-1,onClick:F,disabled:0===(null!=(t=null==f?void 0:f.results)?t:0)},Jn),r.createElement("button",{"aria-label":"Next Result","aria-hidden":!i,tabIndex:i?void 0:-1,onClick:S,disabled:0===(null!=(n=null==f?void 0:f.results)?n:0)},er),void 0!==o&&r.createElement("button",{"aria-label":"Close Search","aria-hidden":!i,"data-testid":"search-close-button",tabIndex:i?void 0:-1,onClick:k},tr)),void 0!==f?r.createElement(r.Fragment,null,r.createElement("div",{className:"search-status"},r.createElement("div",{"data-testid":"search-result-area"},l)),r.createElement("div",{className:"search-progress",style:u})):r.createElement("div",{className:"search-status"},r.createElement("label",{htmlFor:c},"Type to search")))}),[k,S,F,E,o,A,s,f,d,i,c]);return r.createElement(r.Fragment,null,r.createElement(Zn,{accessibilityHeight:e.accessibilityHeight,cellXOffset:e.cellXOffset,cellYOffset:e.cellYOffset,columns:e.columns,enableGroups:e.enableGroups,freezeColumns:e.freezeColumns,preventDiagonalScrolling:e.preventDiagonalScrolling,getCellContent:e.getCellContent,groupHeaderHeight:e.groupHeaderHeight,onCanvasFocused:e.onCanvasFocused,onCanvasBlur:e.onCanvasBlur,isFocused:e.isFocused,clientSize:e.clientSize,headerHeight:e.headerHeight,onContextMenu:e.onContextMenu,isFilling:e.isFilling,fillHandle:e.fillHandle,trailingRowType:e.trailingRowType,firstColAccessible:e.firstColAccessible,lockColumns:e.lockColumns,rowHeight:e.rowHeight,onMouseMove:e.onMouseMove,rows:e.rows,highlightRegions:e.highlightRegions,verticalBorder:e.verticalBorder,canvasRef:e.canvasRef,className:e.className,theme:e.theme,disabledRows:e.disabledRows,drawCustomCell:e.drawCustomCell,drawHeader:e.drawHeader,experimental:e.experimental,getGroupDetails:e.getGroupDetails,getRowThemeOverride:e.getRowThemeOverride,gridRef:e.gridRef,headerIcons:e.headerIcons,isDraggable:e.isDraggable,onDragEnd:e.onDragEnd,minColumnWidth:e.minColumnWidth,maxColumnWidth:e.maxColumnWidth,onCellFocused:e.onCellFocused,onColumnMoved:e.onColumnMoved,onColumnResize:e.onColumnResize,onColumnResizeStart:e.onColumnResizeStart,onColumnResizeEnd:e.onColumnResizeEnd,onDragStart:e.onDragStart,onDragOverCell:e.onDragOverCell,onDragLeave:e.onDragLeave,onDrop:e.onDrop,onHeaderMenuClick:e.onHeaderMenuClick,onItemHovered:e.onItemHovered,onKeyUp:e.onKeyUp,onMouseDown:e.onMouseDown,onMouseUp:e.onMouseUp,onRowMoved:e.onRowMoved,onVisibleRegionChanged:e.onVisibleRegionChanged,overscrollX:e.overscrollX,overscrollY:e.overscrollY,rightElement:e.rightElement,rightElementProps:e.rightElementProps,scrollRef:e.scrollRef,scrollToEnd:e.scrollToEnd,selection:e.selection,showMinimap:e.showMinimap,smoothScrollX:e.smoothScrollX,smoothScrollY:e.smoothScrollY,translateX:e.translateX,translateY:e.translateY,onKeyDown:e.onKeyDown,prelightCells:w}),M)};ce();var rr=te("input")({name:"RenameInput",class:"r1kzy40b",vars:{"r1kzy40b-0":[e=>Math.max(16,e.targetHeight-10),"px"]}}),ir=e=>{const{bounds:t,group:n,onClose:r,canvasBounds:o,onFinish:l}=e,[a,s]=i.a.useState(n);return i.a.createElement(xe,{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.a.createElement(rr,{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}))},or=150;function lr(e,t,n,r,i,o,l,a){let s=[];if(void 0!==i&&s.push(...i.map((e=>e[r])).map((n=>function(e,t,n){var r;if(t.kind===Se.Custom)return or;const i=rn[t.kind];return null!=(r=null==i?void 0:i.measure(e,t,n))?r:or}(e,n,t)))),s.length>5&&a){const e=s.reduce(((e,t)=>e+t))/s.length;s=s.filter((t=>t<2*e))}s.push(e.measureText(n.title).width+16+(void 0===n.icon?0:28));const u=Math.max(...s),c=Math.max(Math.ceil(o),Math.min(Math.floor(l),Math.ceil(u)));return{...n,width:c}}function ar(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":Kn.value?o=!0:n=!0}return t.altKey===i&&t.ctrlKey===n&&t.shiftKey===r&&t.metaKey===o}function sr(e){return e.startsWith('"')&&e.endsWith('"')&&(e=e.slice(1,-1).replace(/""/g,'"')),e}function ur(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.trim().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(sr(e.slice(o,a))),o=a+1,"\n"===s&&(r.push(i),i=[]),l=0):l=0}a++}return o<e.length&&i.push(sr(e.slice(o,e.length))),r.push(i),r}function cr(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 dr(e){return/[\t\n"]/.test(e)&&(e=`"${e.replace(/"/g,'""')}"`),e}function hr(e,t,n){var r,i,o,l;const a=(e,n,r)=>{var i,o;const l=t[n];if(void 0!==e.span&&e.span[0]!==l)return"";switch(e.kind){case Se.Text:case Se.Number:return dr(r?null!=(o=null==(i=e.data)?void 0:i.toString())?o:"":e.displayData);case Se.Markdown:case Se.RowID:case Se.Uri:return dr(e.data);case Se.Image:case Se.Bubble:return e.data.reduce(((e,t)=>`${dr(e)},${dr(t)}`));case Se.Boolean:return(e=>{switch(e){case!0:return"TRUE";case!1:return"FALSE";case Te:return"INDETERMINATE";case Re:return"";default:ye()}})(e.data);case Se.Loading:return r?"":"#LOADING";case Se.Protected:return r?"":"************";case Se.Drilldown:return e.data.map((e=>e.text)).reduce(((e,t)=>`${dr(e)},${dr(t)}`));case Se.Custom:return dr(e.copyData);default:ye()}},s=e.map((e=>e.map(((e,t)=>a(e,t,!1))).join("\t"))).join("\n");if(void 0!==(null==(r=window.navigator.clipboard)?void 0:r.write)||void 0!==n){const t=document.createElement("tbody");for(const n of e){const e=document.createElement("tr");for(const[t,r]of n.entries()){const n=document.createElement("td");if(r.kind===Se.Uri){const e=document.createElement("a");e.href=r.data,e.innerText=r.data,n.append(e)}else n.innerText=a(r,t,!0);e.append(n)}t.append(e)}if(void 0!==(null==(i=window.navigator.clipboard)?void 0:i.write))window.navigator.clipboard.write([new ClipboardItem({"text/plain":new Blob([s],{type:"text/plain"}),"text/html":new Blob([`<table>${t.outerHTML}</table>`],{type:"text/html"})})]);else if(void 0!==n&&null!==(null==n?void 0:n.clipboardData))try{n.clipboardData.setData("text/plain",s),n.clipboardData.setData("text/html",`<table>${t.outerHTML}</table>`)}catch(u){null==(o=window.navigator.clipboard)||o.writeText(s)}}else null==(l=window.navigator.clipboard)||l.writeText(s);null==n||n.preventDefault()}function fr(e){return"string"===typeof e?e:`${e}px`}ce();var pr=te("div")({name:"Wrapper",class:"wzg2m5k",vars:{"wzg2m5k-0":[e=>e.innerWidth],"wzg2m5k-1":[e=>e.innerHeight]}}),gr=e=>{const{inWidth:t,inHeight:n,children:i,...o}=e;return r.createElement(pr,{innerHeight:fr(n),innerWidth:fr(t),...o},i)};var vr=0;function mr(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 yr={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},wr={kind:Se.Loading,allowOverlay:!1},br={columns:Ge.empty(),rows:Ge.empty(),current:void 0},Dr=r.forwardRef(((e,t)=>{var n,o,l,a,s,u;const[c,d]=r.useState(br),[h,f]=r.useState(),p=r.useRef(null),[g,v]=r.useState(),m=r.useRef(null),y=r.useRef(),{rowMarkers:b="none",rowHeight:x=34,headerHeight:k=36,rowMarkerWidth:S,imageEditorOverride:A,getRowThemeOverride:M,markdownDivCreateNode:R}=e,{width:T,height:I,columns:B,rows:O,getCellContent:P,onCellClicked:H,onCellActivated:z,onFinishedEditing:_,coercePasteValue:L,drawHeader:$,onHeaderClicked:N,spanRangeBehavior:j="default",onGroupHeaderClicked:W,onCellContextMenu:K,className:U,theme:V,onHeaderContextMenu:X,getCellsForSelection:Y,onGroupHeaderContextMenu:G,onGroupHeaderRenamed:q,onCellEdited:Z,onCellsEdited:Q,keybindings:J,onRowAppended:ee,onColumnMoved:te,validateCell:ne,highlightRegions:re,drawCell:ie,rangeSelect:oe="rect",columnSelect:le="multi",rowSelect:ae="multi",rangeSelectionBlending:se="exclusive",columnSelectionBlending:ue="exclusive",rowSelectionBlending:ce="exclusive",onDelete:de,onDragStart:he,onMouseMove:fe,onPaste:pe,groupHeaderHeight:ge=k,freezeColumns:ve=0,rowSelectionMode:me="auto",rowMarkerStartIndex:be=1,onHeaderMenuClick:De,getGroupDetails:xe,onSearchClose:Fe,onItemHovered:Ae,onSelectionCleared:Me,showSearch:Ie,onVisibleRegionChanged:He,gridSelection:ze,onGridSelectionChange:_e,minColumnWidth:Xe=50,maxColumnWidth:Ye=500,provideEditor:Qe,trailingRowOptions:Je,verticalBorder:et,onDragOverCell:tt,onDrop:nt,onColumnResize:rt,onColumnResizeEnd:it,onColumnResizeStart:at,...st}=e,ut=Math.max(Xe,20),ct=Math.max(Ye,ut),dt=r.useMemo((()=>void 0===J?yr:{...yr,...J}),[J]),ht=null!=S?S:O>1e4?48:O>1e3?44:O>100?36:32,ft="none"!==b,pt=ft?1:0,gt=void 0!==ee,vt=!0===(null==Je?void 0:Je.sticky),[mt,yt]=r.useState(!1),wt=null!=Ie?Ie:mt,bt=r.useCallback((()=>{void 0!==Fe?Fe():yt(!1)}),[Fe]),Dt=r.useMemo((()=>void 0===ze?void 0:mr(ze,pt)),[ze,pt]),xt=null!=Dt?Dt:c,Ct=r.useRef(new AbortController);r.useEffect((()=>()=>{null==Ct||Ct.current.abort()}),[]);const[kt,Et]=function(e,t,n,i){const o=r.useCallback((n=>{var r;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?i.push({kind:Se.Loading,allowOverlay:!1}):i.push(t([e,r]));e.push(i)}return e}return null!=(r=null==e?void 0:e(n,i.signal))?r:[]}),[i.signal,t,e]),l=void 0!==e?o:void 0,a=r.useCallback((e=>{if(void 0===l)return[];const t={...e,x:e.x-n};if(t.x<0){t.x=0,t.width--;const e=l(t,i.signal);return"function"===typeof e?async()=>(await e()).map((e=>[{kind:Se.Loading,allowOverlay:!1},...e])):e.map((e=>[{kind:Se.Loading,allowOverlay:!1},...e]))}return l(t,i.signal)}),[i.signal,l,n]);return[void 0!==e?a:void 0,l]}(Y,P,pt,Ct.current),Ft=r.useCallback(((e,t,n)=>{if(void 0===ne)return!0;const r=[e[0]-pt,e[1]];return null==ne?void 0:ne(r,t,n)}),[pt,ne]),At=r.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,u=[];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;u.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;u.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;u.push(...e)}let c=s.x-n,d=s.x+s.width-1-n;for(const e of u)for(const t of e)void 0!==t.span&&(c=Math.min(t.span[0],c),d=Math.max(t.span[1],d));c===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:c+n,y:s.y,width:d-c+1,height:s.height},rangeStack:e.current.rangeStack},columns:e.columns,rows:e.rows}}while(!r)}return e}(e,kt,pt,j,Ct.current)),void 0!==_e?_e(mr(e,-pt)):d(e)}),[_e,kt,pt,j]),Mt=Ze(rt,r.useCallback(((e,t,n)=>{null==rt||rt(B[n-pt],t,n-pt)}),[rt,pt,B])),Rt=Ze(it,r.useCallback(((e,t,n)=>{null==it||it(B[n-pt],t,n-pt)}),[it,pt,B])),Tt=Ze(at,r.useCallback(((e,t,n)=>{null==at||at(B[n-pt],t,n-pt)}),[at,pt,B])),It=Ze($,r.useCallback((e=>{var t;return null!=(t=null==$?void 0:$({...e,columnIndex:e.columnIndex-pt}))&&t}),[$,pt])),Bt=r.useCallback((e=>{if(void 0!==de){const t=de(mr(e,-pt));return"boolean"===typeof t?t:mr(t,pt)}return!0}),[de,pt]),[Ot,Pt,Ht]=function(e,t,n,r,o,l){return[i.a.useCallback(((i,a,s,u)=>{var c,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"===u),f="mixed"===r&&h,p="mixed"===o&&h;let g={current:void 0===i?void 0:{...i,rangeStack:"drag"===u&&null!=(d=null==(c=e.current)?void 0:c.rangeStack)?d:[]},columns:f?e.columns:Ge.empty(),rows:p?e.rows:Ge.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.a.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:Ge.empty(),rows:i};else{const t=a&&"mixed"===r;s={current:a&&"mixed"===n?e.current:void 0,columns:t?e.columns:Ge.empty(),rows:i}}t(s,!1)}),[r,e,n,o,t]),i.a.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:Ge.empty(),columns:i};else{const t=a&&"mixed"===o;s={current:a&&"mixed"===n?e.current:void 0,rows:t?e.rows:Ge.empty(),columns:i}}t(s,!1)}),[r,e,n,o,t])]}(xt,At,se,ue,ce,oe),zt=r.useMemo((()=>({...ke,...V})),[V]),[_t,Lt]=r.useState([10,10,0]),$t=function(e,t,n,i,o,l,a,s){const u=r.useRef(t),c=r.useRef(n),d=r.useRef(a);u.current=t,c.current=n,d.current=a;const[h]=r.useState((()=>document.createElement("canvas").getContext("2d",{alpha:!1}))),f=r.useRef({}),p=r.useRef(),[g,v]=r.useState();return r.useLayoutEffect((()=>{const t=c.current;if(void 0===t||e.every(Ne))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,s.signal),l=r>0?t(o,s.signal):void 0;let a;a="object"===typeof n?n:await je(n),void 0!==l&&(a="object"===typeof l?[...a,...l]:[...a,...await je(l)]),p.current=e,v(a)})()}),[s.signal,e]),r.useMemo((()=>{var t;let n=e.every(Ne)?e:null===h?e.map((e=>Ne(e)?e:{...e,width:or})):(h.font=`${d.current.baseFontStyle} ${d.current.fontFamily}`,e.map(((t,n)=>{if(Ne(t))return t;if(void 0!==f.current[t.id])return{...t,width:f.current[t.id]};if(void 0===g||p.current!==e||void 0===t.id)return{...t,width:or};const r=lr(h,a,t,n,g,o,l,!0);return f.current[t.id]=r.width,r}))),r=0,s=0;const u=[];for(const[e,i]of n.entries())r+=i.width,void 0!==i.grow&&i.grow>0&&(s+=i.grow,u.push(e));if(r<i&&u.length>0){const e=[...n],o=i-r;let l=o;for(let r=0;r<u.length;r++){const i=u[r],a=(null!=(t=n[i].grow)?t:0)/s,c=r===u.length-1?l:Math.min(l,Math.floor(o*a));e[i]={...n[i],growOffset:c,width:n[i].width+c},l-=c}n=e}return n}),[i,e,h,g,a,o,l])}(B,O,Et,_t[0]-(0===pt?0:ht)-_t[2],ut,ct,zt,Ct.current),Nt=r.useMemo((()=>$t.some((e=>void 0!==e.group))),[$t]),jt=Nt?k+ge:k,[Wt,Kt]=r.useState({x:0,y:0,width:1,height:1}),Ut=Wt.x+pt,Vt=Wt.y,Xt=r.useRef(null),Yt=r.useCallback((e=>{var t;!0===e?null==(t=Xt.current)||t.focus():window.requestAnimationFrame((()=>{var e;null==(e=Xt.current)||e.focus()}))}),[]),Gt=gt?O+1:O,qt=r.useCallback((e=>{const t=0===pt?e:e.map((e=>({...e,location:[e.location[0]-pt,e.location[1]]}))),n=null==Q?void 0:Q(t);if(!0!==n)for(const r of t)null==Z||Z(r.location,r.value);return n}),[Z,Q,pt]),Zt=xt.rows.length,Qt="none"===b?"":0===Zt?$e:Zt===O?Le:"___gdg_header_cell_indeterminate",Jt=r.useMemo((()=>"none"===b?$t:[{title:Qt,width:ht,icon:void 0,hasMenu:!1,style:"normal"},...$t]),[$t,ht,b,Qt]),en=r.useMemo((()=>{if(void 0!==re)return 0===pt?re:re.map((e=>{const t=Jt.length-e.range.x-pt;if(!(t<=0))return{color:e.color,range:{...e.range,x:e.range.x+pt,width:Math.min(t,e.range.width)},style:e.style}})).filter((e=>void 0!==e))}),[re,Jt.length,pt]),tn=r.useRef(Wt),nn=r.useRef(Jt);nn.current=Jt;const on=r.useCallback((([t,n])=>{var r,i,o,l,a,s,u,c,d,h,f;const p=gt&&n===Gt-1;if(0===t&&ft)return p?wr:{kind:Pe.Marker,allowOverlay:!1,checked:!0===(null==xt?void 0:xt.rows.hasIndex(n)),markerKind:"clickable-number"===b?"number":b,row:be+n,drawHandle:void 0!==e.onRowMoved};if(p){const e=t===pt&&null!=(r=null==Je?void 0:Je.hint)?r:"",n=nn.current[t];if(!0===(null==(i=null==n?void 0:n.trailingRowOptions)?void 0:i.disabled))return wr;{const t=null!=(l=null==(o=null==n?void 0:n.trailingRowOptions)?void 0:o.hint)?l:e,r=null!=(s=null==(a=null==n?void 0:n.trailingRowOptions)?void 0:a.addIcon)?s:null==Je?void 0:Je.addIcon;return{kind:Pe.NewRow,hint:t,allowOverlay:!1,icon:r}}}{const r=t-pt;if(!0===(null==(u=e.experimental)?void 0:u.strict)){const e=tn.current,t=e.x>r||r>e.x+e.width||e.y>n||n>e.y+e.height,i=r===(null==(d=null==(c=e.extras)?void 0:c.selected)?void 0:d[0])&&n===(null==(h=e.extras)?void 0:h.selected[1]),o=void 0===(null==(f=e.extras)?void 0:f.freezeRegion)||e.extras.freezeRegion.x>r||r>e.extras.freezeRegion.x+e.extras.freezeRegion.width||e.extras.freezeRegion.y>n||n>e.extras.freezeRegion.y+e.extras.freezeRegion.height;if(t&&!i&&o)return{kind:Se.Loading,allowOverlay:!1}}let i=P([r,n]);return 0!==pt&&void 0!==i.span&&(i={...i,span:[i.span[0]+pt,i.span[1]+pt]}),i}}),[gt,Gt,ft,null==xt?void 0:xt.rows,e.onRowMoved,b,pt,null==Je?void 0:Je.hint,null==Je?void 0:Je.addIcon,null==(n=e.experimental)?void 0:n.strict,P,be]),ln=r.useCallback((e=>{var t,n;let r=null!=(t=null==xe?void 0:xe(e))?t:{name:e};return void 0!==q&&""!==e&&(r={icon:r.icon,name:r.name,overrideTheme:r.overrideTheme,actions:[...null!=(n=r.actions)?n:[],{title:"Rename",icon:"renameIcon",onClick:e=>En({group:r.name,bounds:e.bounds})}]}),r}),[xe,q]),sn=r.useCallback((e=>{var t;const[n,r]=e.cell,i=Jt[n],o=void 0!==(null==i?void 0:i.group)?null==(t=ln(i.group))?void 0:t.overrideTheme:void 0,l=null==i?void 0:i.themeOverride,a=null==M?void 0:M(r);f({...e,theme:{...zt,...o,...l,...a,...e.content.themeOverride}})}),[M,Jt,ln,zt]),un=r.useCallback(((e,t,n)=>{var r;if(void 0===xt.current)return;const[i,o]=xt.current.cell,l=on([i,o]);if(l.kind!==Se.Boolean&&l.allowOverlay){let t=l;if(void 0!==n)switch(t.kind){case Se.Number:t={...t,data:we((()=>"-"===n?-0:Number.parseFloat(n)),0)};break;case Se.Text:case Se.Markdown:case Se.Uri:t={...t,data:n}}sn({target:e,content:t,initialValue:n,cell:[i,o],highlight:void 0===n,forceEditMode:void 0!==n})}else l.kind===Se.Boolean&&t&&(qt([{location:xt.current.cell,value:{...l,data:St(l.data)}}]),null==(r=Xt.current)||r.damage([{cell:xt.current.cell}]))}),[on,xt,qt,sn]),cn=r.useCallback(((e,t)=>{var n;const r=null==(n=Xt.current)?void 0:n.getBounds(e,t);if(void 0===r||null===m.current)return;const i=on([e,t]);i.allowOverlay&&sn({target:r,content:i,initialValue:void 0,highlight:!0,cell:[e,t],forceEditMode:!0})}),[on,sn]),dn=r.useCallback(((e,t,n="both",r=0,i=0)=>{if(null!==m.current){const o=Xt.current,l=p.current;if(null!==o&&null!==l){const a=o.getBounds(e+pt,t),s=l.getBoundingClientRect();if(void 0!==a){const t={x:a.x-r,y:a.y-i,width:a.width+2*r,height:a.height+2*i};let o=0,l=0,u=0;for(let e=0;e<ve;e++)u+=$t[e].width;const c=u+s.left+pt*ht,d=s.right,h=s.top+jt;let f=0;vt&&(f="number"===typeof x?x:x(O));const p=s.bottom-f;c>t.x?o=t.x-c:d<t.x+t.width&&(o=t.x+t.width-d),h>t.y?l=t.y-h:p<t.y+t.height&&(l=t.y+t.height-p),"vertical"===n||e<ve?o=0:"horizontal"===n&&(l=0),0===o&&0===l||m.current.scrollTo(o+m.current.scrollLeft,l+m.current.scrollTop)}}}}),[pt,ht,jt,vt,ve,$t,x,O]),hn=r.useRef(cn),fn=r.useRef(P),pn=r.useRef(O);hn.current=cn,fn.current=P,pn.current=O;const gn=r.useCallback((async e=>{var t;const n=Jt[e];if(!0===(null==(t=null==n?void 0:n.trailingRowOptions)?void 0:t.disabled))return;const r=null==ee?void 0:ee();let i,o=!0;void 0!==r&&(i=await r,"top"===i&&(o=!1),"number"===typeof i&&(o=!1));let l=0;const a=()=>{if(pn.current<=O)return l<500&&window.setTimeout(a,l),void(l=50+2*l);const t="number"===typeof i?i:o?O:0;dn(e-pt,t),Ot({cell:[e,t],range:{x:e,y:t,width:1,height:1}},!1,!1,"edit");const n=fn.current([e-pt,t]);n.allowOverlay&&Ue(n)&&!0!==n.readonly&&window.setTimeout((()=>{hn.current(e,t)}),0)};a()}),[Jt,ee,pt,O,dn,Ot]),vn=r.useCallback((e=>{var t,n,r;const i=null!=(r=null==(n=null==(t=$t[e])?void 0:t.trailingRowOptions)?void 0:n.targetColumn)?r:null==Je?void 0:Je.targetColumn;if("number"===typeof i){return i+(ft?1:0)}if("object"===typeof i){const e=B.indexOf(i);if(e>=0){return e+(ft?1:0)}}}),[$t,B,ft,null==Je?void 0:Je.targetColumn]),mn=r.useRef(),yn=r.useRef(),wn=r.useCallback((t=>{var n,r,i,o;const l=Kn.value?t.metaKey:t.ctrlKey,a=l&&"multi"===ae,s=l&&"multi"===le,[u,c]=t.location,d=xt.columns,h=xt.rows,[p,g]=null!=(r=null==(n=xt.current)?void 0:n.cell)?r:[];if("cell"===t.kind){if(yn.current=void 0,bn.current=[u,c],0===u&&ft){if(!0===gt&&c===O||"number"===b||"none"===ae)return;const n=on(t.location);if(n.kind!==Pe.Marker)return;if(void 0!==e.onRowMoved){const e=rn[n.kind],r=null==(i=e.onClick)?void 0:i.call(e,n,t.localEventX,t.localEventY,t.bounds);if(void 0===r||r.checked===n.checked)return}f(void 0),Yt();const r=h.hasIndex(c),o=mn.current;if("multi"===ae&&(t.shiftKey||!0===t.isLongTouch)&&void 0!==o&&h.hasIndex(o)){const e=[Math.min(o,c),Math.max(o,c)+1];a||"multi"===me?Pt(void 0,e,!0):Pt(Ge.fromSingleSelection(e),void 0,a)}else a||t.isTouch||"multi"===me?r?Pt(h.remove(c),void 0,!0):(Pt(void 0,c,!0),mn.current=c):r&&1===h.length?Pt(Ge.empty(),void 0,l):(Pt(Ge.fromSingleSelection(c),void 0,l),mn.current=c)}else if(u>=pt&&gt&&c===O){const e=vn(u);gn(null!=e?e:u)}else if(p!==u||g!==c){const e=vt&&c===O,n=vt&&void 0!==xt&&(null==(o=xt.current)?void 0:o.cell[1])===O;if(!t.shiftKey&&!0!==t.isLongTouch||void 0===p||void 0===g||void 0===xt.current||n)Ot({cell:[u,c],range:{x:u,y:c,width:1,height:1}},!0,l,"click"),mn.current=void 0,f(void 0),Yt();else{if(e)return;const t=Math.min(u,p),n=Math.max(u,p),r=Math.min(c,g),i=Math.max(c,g);Ot({...xt.current,range:{x:t,y:r,width:n-t+1,height:i-r+1}},!0,l,"click"),mn.current=void 0,Yt()}}}else if("header"===t.kind)if(bn.current=[u,c],f(void 0),ft&&0===u)mn.current=void 0,yn.current=void 0,"multi"===ae&&(h.length!==O?Pt(Ge.fromSingleSelection([0,O]),void 0,l):Pt(Ge.empty(),void 0,l),Yt());else{const e=yn.current;if("multi"===le&&(t.shiftKey||!0===t.isLongTouch)&&void 0!==e&&d.hasIndex(e)){const t=[Math.min(e,u),Math.max(e,u)+1];s?Ht(void 0,t,l):Ht(Ge.fromSingleSelection(t),void 0,l)}else s?(d.hasIndex(u)?Ht(d.remove(u),void 0,l):Ht(void 0,u,l),yn.current=u):"none"!==le&&(Ht(Ge.fromSingleSelection(u),void 0,l),yn.current=u);mn.current=void 0,Yt()}else t.kind===Be?bn.current=[u,c]:t.kind===Oe&&(At(br,!1),f(void 0),Yt(),null==Me||Me(),mn.current=void 0,yn.current=void 0)}),[gn,le,Yt,vn,on,xt,ft,vt,Me,e.onRowMoved,pt,b,ae,me,O,Ot,At,Ht,Pt,gt]),bn=r.useRef(),Dn=r.useRef(Wt),xn=r.useRef(),Cn=r.useCallback((e=>{var t,n;if(An.current=!1,Dn.current=tn.current,0!==e.button)return void(xn.current=void 0);const r=performance.now(),i=r-(null!=(n=null==(t=xn.current)?void 0:t.time)?n:-1e3)<250;xn.current={wasDoubleClick:i,time:r,location:e.location};const o="cell"===e.kind&&e.isFillHandle;!o&&"cell"!==e.kind&&e.isEdge||(v({previousSelection:xt,fillHandle:o}),bn.current=void 0,e.isTouch||wn(e))}),[xt,wn]),[kn,En]=r.useState(),Sn=r.useCallback((e=>{if(e.kind!==Be||"multi"!==le)return;const t=Kn.value?e.metaKey:e.ctrlKey,[n]=e.location,r=xt.columns;if(n<pt)return;const i=Jt[n];let o=n,l=n;for(let a=n-1;a>=pt&&lt(i.group,Jt[a].group);a--)o--;for(let a=n+1;a<Jt.length&&lt(i.group,Jt[a].group);a++)l++;if(Yt(),t)if(r.hasAll([o,l+1])){let e=r;for(let t=o;t<=l;t++)e=e.remove(t);Ht(e,void 0,t)}else Ht(void 0,[o,l+1],t);else Ht(Ge.fromSingleSelection([o,l+1]),void 0,t)}),[le,Yt,xt.columns,Jt,pt,Ht]),Fn=r.useCallback((e=>{var t;if(void 0===xt.current)return;const n=[],r=xt.current.range;for(let i=0;i<r.width;i++){const t=i+r.x,o=on([t,e?r.y+r.height-1:r.y]);if(!Ke(o)&&Ue(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}})}}qt(n),null==(t=Xt.current)||t.damage(n.map((e=>({cell:e.location}))))}),[on,xt,qt]),An=r.useRef(!1),Mn=r.useCallback(((e,t)=>{const n=e.location[0]-pt;if("header"===e.kind&&(null==X||X(n,{...e,preventDefault:t})),e.kind===Be){if(n<0)return;null==G||G(n,{...e,preventDefault:t})}"cell"===e.kind&&(null==K||K([n,e.location[1]],{...e,preventDefault:t}))}),[K,G,X,pt]),Rn=r.useCallback((async e=>{var t;if(!0===(null==(t=xn.current)?void 0:t.wasDoubleClick)&&void 0!==kt&&void 0!==Mt){const t=tn.current.y,n=tn.current.height;let r=kt({x:e,y:t,width:1,height:Math.min(n,O-t)},Ct.current.signal);"object"!==typeof r&&(r=await r());const i=$t[e-pt],o=document.createElement("canvas").getContext("2d",{alpha:!1});if(null!==o){o.font=`${zt.baseFontStyle} ${zt.fontFamily}`;const t=lr(o,zt,i,0,r,ut,ct,!1);null==Mt||Mt(i,t.width,e)}}}),[$t,kt,ct,zt,ut,Mt,pt,O]),[Tn,In]=r.useState(),Bn=r.useCallback(((e,t)=>{var n,r,i;const o=g;if(v(void 0),In(void 0),t)return;const[l,a]=e.location,[s,u]=null!=(n=bn.current)?n:[],c=()=>{An.current=!0},d=e=>{var t,n,r;if(s===l&&u===a&&(null==H||H([l-pt,a],{...e,preventDefault:c})),void 0!==xt.current)if(!0===(null==o?void 0:o.fillHandle))Fn(xt.current.cell[1]!==xt.current.range.y);else if(void 0!==xt.current&&void 0!==(null==(n=null==(t=null==o?void 0:o.previousSelection)?void 0:t.current)?void 0:n.cell)&&!An.current){const[t,n]=xt.current.cell,[i,s]=o.previousSelection.current.cell,u=on([l,a]),c=u.kind===Se.Custom?void 0:rn[u.kind];if(void 0!==c&&void 0!==c.onClick){const t=c.onClick(u,e.localEventX,e.localEventY,e.bounds);void 0!==t&&!Ke(t)&&We(t)&&(qt([{location:e.location,value:t}]),null==(r=Xt.current)||r.damage([{cell:e.location}]))}if(l===t&&l===i&&a===n&&a===s)return null==z||z([l-pt,a]),un(e.bounds,!1),!0}return!1},h=e.location[0]-pt;if(e.isTouch){const t=tn.current,n=Dn.current;if(t.x!==n.x||t.y!==n.y)return;if(!0===e.isLongTouch){if("cell"===e.kind&&(null==(r=null==xt?void 0:xt.current)?void 0:r.cell[0])===l&&(null==(i=null==xt?void 0:xt.current)?void 0:i.cell[1])===a)return void(null==K||K([h,e.location[1]],{...e,preventDefault:c}));if("header"===e.kind&&xt.columns.hasIndex(l))return void(null==X||X(h,{...e,preventDefault:c}));if(e.kind===Be){if(h<0)return;return void(null==G||G(h,{...e,preventDefault:c}))}}"cell"===e.kind?d(e)||wn(e):e.kind===Be?null==W||W(h,{...e,preventDefault:c}):wn(e)}else{if("header"===e.kind){if(h<0)return;e.isEdge?Rn(l):0===e.button&&l===s&&a===u&&(null==N||N(h,{...e,preventDefault:c}))}if(e.kind===Be){if(h<0)return;0===e.button&&l===s&&a===u&&(null==W||W(h,{...e,preventDefault:c}),An.current||Sn(e))}"cell"===e.kind&&0===e.button&&d(e),bn.current=void 0}}),[g,xt,H,pt,Fn,on,qt,z,un,K,X,G,wn,Rn,N,W,Sn]),On=r.useCallback((e=>{const t={...e,location:[e.location[0]-pt,e.location[1]]};null==fe||fe(t),In((t=>{var n,r;return e.scrollEdge[0]===(null==t?void 0:t[0])&&e.scrollEdge[1]===t[1]?t:void 0===g||(null!=(r=null==(n=xn.current)?void 0:n.location[0])?r:0)<pt?void 0:e.scrollEdge}))}),[g,fe,pt]);!function(e,t){const n=i.a.useRef(0),[r,o]=null!=e?e:[0,0];i.a.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])}(Tn,m);const Pn=r.useCallback(((e,t)=>{null==De||De(e-pt,t)}),[De,pt]),Hn=null==(o=null==xt?void 0:xt.current)?void 0:o.cell,zn=r.useCallback(((e,t,n,r,i,o)=>{let l=Hn;void 0!==l&&(l=[l[0]-pt,l[1]]);const a={...e,x:e.x-pt,height:gt&&e.y+e.height>=O?e.height-1:e.height,tx:i,ty:o,extras:{selected:l,freezeRegion:0===ve?void 0:{x:0,y:e.y,width:ve,height:e.height}}};Lt([t,n,r]),Kt(a),tn.current=a,null==He||He(a,a.tx,a.ty,a.extras)}),[ve,Hn,He,pt,O,gt]),_n=Ze(te,r.useCallback(((e,t)=>{null==te||te(e-pt,t-pt),"none"!==le&&Ht(Ge.fromSingleSelection(t),void 0,!0)}),[le,te,pt,Ht])),Ln=r.useRef(!1),$n=r.useCallback((e=>{0===e.location[0]&&pt>0?e.preventDefault():(null==he||he({...e,location:[e.location[0]-pt,e.location[1]]}),e.defaultPrevented()||(Ln.current=!0),v(void 0))}),[he,pt]),Nn=r.useCallback((()=>{Ln.current=!1}),[]),jn=r.useCallback((e=>{if(void 0!==g&&void 0!==xt.current&&!Ln.current&&("rect"===oe||"multi-rect"===oe)){const[t,n]=xt.current.cell;let[r,i]=e.location;i<0&&(i=tn.current.y);const o=vt&&n===O;if(vt&&i===O||o)return;r=Math.max(r,pt);const l=r-t,a=i-n,s={x:l>=0?t:r,y:a>=0?n:i,width:Math.abs(l)+1,height:Math.abs(a)+1};Ot({...xt.current,range:s},!0,!1,"drag")}null==Ae||Ae({...e,location:[e.location[0]-pt,e.location[1]]})}),[g,xt,oe,Ae,pt,vt,O,Ot]),Wn=r.useCallback((e=>{if(void 0===xt.current)return;const[t,n]=e,[r,i]=xt.current.cell,o=xt.current.range;let l=o.x,a=o.x+o.width,s=o.y,u=o.y+o.height;if(0!==n)switch(n){case 2:u=O,s=i,dn(0,u,"vertical");break;case-2:s=0,u=i+1,dn(0,s,"vertical");break;case 1:s<i?(s++,dn(0,s,"vertical")):(u=Math.min(O,u+1),dn(0,u,"vertical"));break;case-1:u>i+1?(u--,dn(0,u,"vertical")):(s=Math.max(0,s-1),dn(0,s,"vertical"));break;default:ye()}if(0!==t)if(2===t)a=Jt.length,l=r,dn(a-1-pt,0,"horizontal");else if(-2===t)l=pt,a=r+1,dn(l-pt,0,"horizontal");else{let e=[];if(void 0!==kt){const t=kt({x:l,y:s,width:a-l-pt,height:u-s},Ct.current.signal);"object"===typeof t&&(e=function(e){return D()(C()(C()(e).filter((e=>void 0!==e.span)).map((e=>{var t,n,r,i;return E()((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(l<r){if(e.length>0){const n=E()(l+1,r+1).find((t=>!e.includes(t-pt)));void 0!==n&&(l=n,t=!0)}else l++,t=!0;t&&dn(l,0,"horizontal")}t||(a=Math.min(Jt.length,a+1),dn(a-1-pt,0,"horizontal"))}else if(-1===t){let t=!1;if(a>r+1){if(e.length>0){const n=E()(a-1,r,-1).find((t=>!e.includes(t-pt)));void 0!==n&&(a=n,t=!0)}else a--,t=!0;t&&dn(a-pt,0,"horizontal")}t||(l=Math.max(pt,l-1),dn(l-pt,0,"horizontal"))}else ye()}Ot({cell:xt.current.cell,range:{x:l,y:s,width:a-l,height:u-s}},!0,!1,"keyboard-select")}),[kt,xt,Jt.length,pt,O,dn,Ot]),Un=r.useCallback(((e,t,n,r)=>{const i=Gt-(n?0:1);if(e=w()(e,pt,$t.length-1+pt),t=w()(t,0,i),e===(null==Hn?void 0:Hn[0])&&t===(null==Hn?void 0:Hn[1]))return!1;if(r&&void 0!==xt.current){const n=[...xt.current.rangeStack];(xt.current.range.width>1||xt.current.range.height>1)&&n.push(xt.current.range),At({...xt,current:{cell:[e,t],range:{x:e,y:t,width:1,height:1},rangeStack:n}},!0)}else Ot({cell:[e,t],range:{x:e,y:t,width:1,height:1}},!0,!1,"keyboard-nav");return void 0!==y.current&&y.current[0]===e&&y.current[1]===t&&(y.current=void 0),dn(e-pt,t),!0}),[Gt,pt,$t.length,Hn,xt,dn,At,Ot]),Vn=r.useCallback(((e,t)=>{void 0!==(null==h?void 0:h.cell)&&void 0!==e&&We(e)&&(qt([{location:h.cell,value:e}]),window.requestAnimationFrame((()=>{var e;null==(e=Xt.current)||e.damage([{cell:h.cell}])}))),Yt(!0),f(void 0);const[n,r]=t;if(void 0!==xt.current&&(0!==n||0!==r)){const t=xt.current.cell[1]===Gt-1&&void 0!==e;Un(w()(xt.current.cell[0]+n,0,Jt.length-1),w()(xt.current.cell[1]+r,0,Gt-1),t,!1)}null==_||_(e,t)}),[null==h?void 0:h.cell,Yt,xt,_,qt,Gt,Un,Jt.length]),Xn=r.useMemo((()=>"gdg-overlay-"+vr++),[]),Yn=r.useCallback((e=>{(async()=>{var t,n,r,i;const o=void 0!==h,{altKey:l,shiftKey:a,metaKey:s,ctrlKey:u,key:c,bounds:d}=e,p=Kn.value,g=p?s:u,v="Delete"===c||p&&"Backspace"===c,m=tn.current,y=xt.columns,w=xt.rows;if("Escape"===c)return void(o?f(void 0):dt.clear&&(At(br,!1),null==Me||Me()));if(ar("primary+a",e)&&dt.selectAll){if(o){const e=document.getElementById(Xn);if(null!==e){const t=window.getSelection(),n=document.createRange();n.selectNodeContents(e),null==t||t.removeAllRanges(),null==t||t.addRange(n)}}else At({columns:Ge.empty(),rows:Ge.empty(),current:{cell:null!=(n=null==(t=xt.current)?void 0:t.cell)?n:[pt,0],range:{x:pt,y:0,width:B.length,height:O},rangeStack:[]}},!1);return void e.cancel()}function b(e){var t,n,r;Yt();const i=[];for(let o=e.x;o<e.x+e.width;o++)for(let r=e.y;r<e.y+e.height;r++){const e=P([o-pt,r]);let l;if(e.kind===Se.Custom){const n=null==Qe?void 0:Qe(e);Ve(n)&&(l=null==(t=null==n?void 0:n.deletedValue)?void 0:t.call(n,e))}else if(We(e)&&e.allowOverlay||e.kind===Se.Boolean){const t=rn[e.kind];l=null==(n=t.onDelete)?void 0:n.call(t,e)}void 0!==l&&!Ke(l)&&We(l)&&i.push({location:[o,r],value:l})}qt(i),null==(r=Xt.current)||r.damage(i.map((e=>({cell:e.location}))))}if(ar("primary+f",e)&&dt.search&&(e.cancel(),yt(!0)),v){const t=null==(r=null==Bt?void 0:Bt(xt))||r;if(e.cancel(),!1!==t){const e=!0===t?xt:t;if(void 0!==e.current){b(e.current.range);for(const t of e.current.rangeStack)b(t)}for(const t of e.rows)b({x:pt,y:t,width:Jt.length-pt,height:1});for(const t of e.columns)b({x:t,y:0,width:1,height:O})}return}if(void 0===xt.current)return;let[D,x]=xt.current.cell,C=!1;if(dt.selectColumn&&ar("ctrl+ ",e)&&"none"!==le)y.hasIndex(D)?Ht(y.remove(D),void 0,!0):"single"===le?Ht(Ge.fromSingleSelection(D),void 0,!0):Ht(void 0,D,!0);else if(dt.selectRow&&ar("shift+ ",e)&&"none"!==ae)w.hasIndex(x)?Pt(w.remove(x),void 0,!0):"single"===ae?Pt(Ge.fromSingleSelection(x),void 0,!0):Pt(void 0,x,!0);else if((ar("Enter",e)||ar(" ",e)||ar("shift+Enter",e))&&void 0!==d)o?(f(void 0),ar("Enter",e)?x++:ar("shift+Enter",e)&&x--):x===O&&gt?window.setTimeout((()=>{const e=vn(D);gn(null!=e?e:D)}),0):(null==z||z([D-pt,x]),un(d,!0),e.cancel());else if(dt.downFill&&ar("primary+_68",e)&&xt.current.range.height>1)Fn(!1),e.cancel();else if(dt.rightFill&&ar("primary+_82",e)&&xt.current.range.width>1){const t=[],n=xt.current.range;for(let e=0;e<n.height;e++){const r=e+n.y,i=on([n.x,r]);if(!Ke(i)&&Ue(i))for(let e=1;e<n.width;e++){const o=[e+n.x,r];t.push({location:o,value:{...i}})}}qt(t),null==(i=Xt.current)||i.damage(t.map((e=>({cell:e.location})))),e.cancel()}else if(dt.pageDown&&ar("PageDown",e))x+=Math.max(1,tn.current.height-4),e.cancel();else if(dt.pageUp&&ar("PageUp",e))x-=Math.max(1,tn.current.height-4),e.cancel();else if(dt.first&&ar("primary+Home",e))f(void 0),x=0,D=0;else if(dt.last&&ar("primary+End",e))f(void 0),x=Number.MAX_SAFE_INTEGER,D=Number.MAX_SAFE_INTEGER;else if(dt.first&&ar("primary+shift+Home",e))f(void 0),Wn([-2,-2]);else if(dt.last&&ar("primary+shift+End",e))f(void 0),Wn([2,2]);else if("ArrowDown"===c){if(u&&l)return;f(void 0),!a||"rect"!==oe&&"multi-rect"!==oe?(l&&!g&&(C=!0),g&&!l?x=O-1:x+=1):Wn([0,g&&!l?2:1])}else if("ArrowUp"===c||"Home"===c){const e="Home"===c||g;f(void 0),!a||"rect"!==oe&&"multi-rect"!==oe?(l&&!e&&(C=!0),x+=e&&!l?Number.MIN_SAFE_INTEGER:-1):Wn([0,e&&!l?-2:-1])}else if("ArrowRight"===c||"End"===c){const e="End"===c||g;f(void 0),!a||"rect"!==oe&&"multi-rect"!==oe?(l&&!e&&(C=!0),D+=e&&!l?Number.MAX_SAFE_INTEGER:1):Wn([e&&!l?2:1,0])}else if("ArrowLeft"===c)f(void 0),!a||"rect"!==oe&&"multi-rect"!==oe?(l&&!g&&(C=!0),D+=g&&!l?Number.MIN_SAFE_INTEGER:-1):Wn([g&&!l?-2:-1,0]);else if("Tab"===c)f(void 0),a?D--:D++;else if(!s&&!u&&void 0!==xt.current&&1===c.length&&/[ -~]/g.test(c)&&void 0!==d&&Ue(P([D-pt,Math.max(0,x-1)]))){if((!vt||x!==O)&&(m.y>x||x>m.y+m.height||m.x>D||D>m.x+m.width))return;un(d,!0,c),e.cancel()}Un(D,x,!1,C)&&e.cancel()})()}),[h,xt,dt.selectAll,dt.search,dt.selectColumn,dt.selectRow,dt.downFill,dt.rightFill,dt.pageDown,dt.pageUp,dt.first,dt.last,dt.clear,le,ae,P,pt,Un,At,Me,B.length,O,Xn,Yt,qt,Qe,Bt,Jt.length,Ht,Pt,gt,vn,gn,z,un,Fn,on,Wn,oe,vt]),Gn=r.useCallback((async e=>{var t,n,r,i,o,l,a;if(!dt.paste)return;function s(e,t,n){if(!Ke(e)&&Ue(e)&&!0!==e.readonly){const r=null==L?void 0:L(n,e);if(void 0!==r&&We(r))return r.kind!==e.kind&&console.warn("Coercion should not change cell kind."),{location:t,value:r};switch(e.kind){case Se.Text:case Se.Markdown:case Se.Uri:return{location:t,value:{...e,data:n}};case Se.Number:{const r=Number.parseFloat(n);return Number.isNaN(r)?void 0:{location:t,value:{...e,data:r}}}case Se.Custom:return{location:t,value:{...e,copyData:n}};case Se.Boolean:{let r=Re;return"true"===n.toLowerCase()?r=!0:"false"===n.toLowerCase()?r=!1:"indeterminate"===n.toLowerCase()&&(r=Te),{location:t,value:{...e,data:r}}}default:ye()}}}const u=xt.columns,c=xt.rows,d=!0===(null==(t=m.current)?void 0:t.contains(document.activeElement))||!0===(null==(n=p.current)?void 0:n.contains(document.activeElement));let h=null==(r=xt.current)?void 0:r.cell;if(void 0===h&&1===u.length&&(h=[null!=(i=u.first())?i:0,0]),void 0===h&&1===c.length&&(h=[pt,null!=(o=c.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=cr(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=cr(o))}void 0===t&&e.clipboardData.types.includes(r)&&(n=e.clipboardData.getData(r))}const[o,u]=h,c=[];do{if(void 0===pe){const e=s(on(h),h,null!=(l=null!=n?n:null==t?void 0:t.map((e=>e.join("\t"))).join("\t"))?l:"");void 0!==e&&c.push(e);break}if(void 0===t){if(void 0===n)return;t=ur(n)}if(!1===pe||"function"===typeof pe&&!0!==(null==pe?void 0:pe([h[0]-pt,h[1]],t)))return;for(const[e,n]of t.entries()){if(e+u>=O)break;for(const[t,r]of n.entries()){const n=[t+o,e+u],i=s(on(n),n,r);void 0!==i&&c.push(i)}}}while(0);qt(c),null==(a=Xt.current)||a.damage(c.map((e=>({cell:e.location}))))}}),[L,on,xt,dt.paste,qt,pe,pt,O]);qe("paste",Gn,window,!1,!0);const qn=r.useCallback((async(e,t)=>{var n,r;if(!dt.copy)return;const i=!0===t||!0===(null==(n=m.current)?void 0:n.contains(document.activeElement))||!0===(null==(r=p.current)?void 0:r.contains(document.activeElement)),o=xt.columns,l=xt.rows;if(i&&void 0!==kt)if(void 0!==xt.current){let t=kt(xt.current.range,Ct.current.signal);"object"!==typeof t&&(t=await t()),hr(t,E()(xt.current.range.x-pt,xt.current.range.x+xt.current.range.width-pt),e)}else if(void 0!==l&&l.length>0){const t=[...l].map((e=>{const t=kt({x:pt,y:e,width:B.length-pt,height:1},Ct.current.signal);return"object"===typeof t?t[0]:t().then((e=>e[0]))}));if(t.some((e=>e instanceof Promise))){hr(await Promise.all(t),E()(B.length),e)}else hr(t,E()(B.length),e)}else if(o.length>0){const t=[],n=[];for(const e of o){let r=kt({x:e,y:0,width:1,height:O},Ct.current.signal);"object"!==typeof r&&(r=await r()),t.push(r),n.push(e-pt)}if(1===t.length)hr(t[0],n,e);else{hr(t.reduce(((e,t)=>e.map(((e,n)=>[...e,...t[n]])))),n,e)}}}),[B.length,kt,xt,dt.copy,pt,O]);qe("copy",qn,window,!1,!1);const Zn=r.useCallback(((e,t)=>{if(0===e.length||-1===t)return;const[n,r]=e[t];void 0!==y.current&&y.current[0]===n&&y.current[1]===r||(y.current=[n,r],Un(n,r,!1,!1))}),[Un]),[Qn,Jn]=null!=(a=null==(l=null==ze?void 0:ze.current)?void 0:l.cell)?a:[],er=r.useRef(dn);er.current=dn,r.useEffect((()=>{void 0!==Qn&&void 0!==Jn&&er.current(Qn,Jn)}),[Qn,Jn]);const tr=r.useMemo((()=>!0===gt&&!0===(null==Je?void 0:Je.tint)?Ge.fromSingleSelection(Gt-1):Ge.empty()),[Gt,gt,null==Je?void 0:Je.tint]),rr=r.useCallback((e=>{var t;return"boolean"===typeof et?et:null==(t=null==et?void 0:et(e-pt))||t}),[pt,et]),sr=r.useMemo((()=>{if(void 0===kn||null===p.current)return null;const{bounds:e,group:t}=kn,n=p.current.getBoundingClientRect();return r.createElement(ir,{bounds:e,group:t,canvasBounds:n,onClose:()=>En(void 0),onFinish:e=>{En(void 0),null==q||q(t,e)}})}),[q,kn]),dr=Math.min(Jt.length,ve+(ft?1:0));r.useImperativeHandle(t,(()=>({appendRow:e=>gn(e+pt),updateCells:e=>{var t;return 0!==pt&&(e=e.map((e=>({cell:[e.cell[0]+pt,e.cell[1]]})))),null==(t=Xt.current)?void 0:t.damage(e)},getBounds:(e,t)=>{var n;return null==(n=Xt.current)?void 0:n.getBounds(e+pt,t)},focus:()=>{var e;return null==(e=Xt.current)?void 0:e.focus()},emit:async e=>{switch(e){case"delete":Yn({bounds:void 0,cancel:()=>{},ctrlKey:!1,key:"Delete",keyCode:46,metaKey:!1,shiftKey:!1,altKey:!1});break;case"fill-right":Yn({bounds:void 0,cancel:()=>{},ctrlKey:!0,key:"r",keyCode:82,metaKey:!1,shiftKey:!1,altKey:!1});break;case"fill-down":Yn({bounds:void 0,cancel:()=>{},ctrlKey:!0,key:"d",keyCode:68,metaKey:!1,shiftKey:!1,altKey:!1});break;case"copy":await qn(void 0,!0);break;case"paste":await Gn()}},scrollTo:dn})),[gn,qn,Yn,Gn,pt,dn]);const[fr,pr]=null!=Hn?Hn:[],Dr=r.useCallback((e=>{const[t,n]=e;-1!==n?fr===t&&pr===n||(Ot({cell:e,range:{x:t,y:n,width:1,height:1}},!0,!1,"keyboard-nav"),dn(t,n)):"none"!==le&&(Ht(Ge.fromSingleSelection(t),void 0,!1),Yt())}),[le,Yt,dn,fr,pr,Ot,Ht]),[xr,Cr]=r.useState(!1),kr=r.useRef(F()((e=>{Cr(e)}),5)),Er=r.useCallback((()=>{kr.current(!0),void 0===xt.current&&0===xt.columns.length&&0===xt.rows.length&&void 0===g&&Ot({cell:[pt,Vt],range:{x:pt,y:Vt,width:1,height:1}},!0,!1,"keyboard-select")}),[Vt,xt,g,pt,Ot]),Sr=r.useCallback((()=>{kr.current(!1)}),[]),[Fr,Ar]=r.useMemo((()=>{var t,n;let r;const i=null!=(n=null==(t=e.experimental)?void 0:t.scrollbarWidthOverride)?n:function(){if(void 0!==ot)return ot;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(),ot=n-r}(),o=O+(gt?1:0);if("number"===typeof x)r=jt+o*x;else{let e=0;const t=Math.min(o,10);for(let n=0;n<t;n++)e+=x(n);e=Math.floor(e/t),r=jt+o*e}r+=i;const l=Jt.reduce(((e,t)=>t.width+e),0)+i;return[`${Math.min(1e5,l)}px`,`${Math.min(1e5,r)}px`]}),[Jt,null==(s=e.experimental)?void 0:s.scrollbarWidthOverride,x,O,gt,jt]);return r.createElement(Ee.Provider,{value:zt},r.createElement(gr,{style:Ce(zt),className:U,inWidth:null!=T?T:Fr,inHeight:null!=I?I:Ar},r.createElement(nr,{...st,enableGroups:Nt,onCanvasFocused:Er,onCanvasBlur:Sr,canvasRef:p,onContextMenu:Mn,theme:zt,cellXOffset:Ut,cellYOffset:Vt,accessibilityHeight:Wt.height,onDragEnd:Nn,columns:Jt,drawCustomCell:ie,drawHeader:It,disabledRows:tr,freezeColumns:dr,lockColumns:pt,firstColAccessible:0===pt,getCellContent:on,minColumnWidth:ut,maxColumnWidth:ct,showSearch:wt,onSearchClose:bt,highlightRegions:en,getCellsForSelection:kt,getGroupDetails:ln,headerHeight:k,isFocused:xr,groupHeaderHeight:Nt?ge:0,trailingRowType:gt?!0===(null==Je?void 0:Je.sticky)?"sticky":"appended":"none",onColumnResize:Mt,onColumnResizeEnd:Rt,onColumnResizeStart:Tt,onCellFocused:Dr,onColumnMoved:_n,onDragStart:$n,onHeaderMenuClick:Pn,onItemHovered:jn,isFilling:!0===(null==g?void 0:g.fillHandle),onMouseMove:On,onKeyDown:Yn,onMouseDown:Cn,onMouseUp:Bn,onDragOverCell:tt,onDrop:nt,onSearchResultsChanged:Zn,onVisibleRegionChanged:zn,clientSize:[_t[0],_t[1]],rowHeight:x,rows:Gt,scrollRef:m,selection:xt,translateX:Wt.tx,translateY:Wt.ty,verticalBorder:rr,gridRef:Xt}),sr,void 0!==h&&r.createElement(an,{...h,validateCell:Ft,id:Xn,className:!0===(null==(u=e.experimental)?void 0:u.isSubGrid)?"click-outside-ignore":void 0,provideEditor:Qe,imageEditorOverride:A,onFinishEditing:Vn,markdownDivCreateNode:R})))}))},1396:function(e,t,n){var r,i,o;i=[t,n(1529)],void 0===(o="function"===typeof(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})?r.apply(t,i):r)||(e.exports=o)},1397:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,i=(r=n(197))&&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},1398:function(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=c();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(0)),i=u(n(1397)),o=n(1533),l=u(n(1335)),a=u(n(1396)),s=u(n(1399));function u(e){return e&&e.__esModule?e:{default:e}}function c(){if("function"!==typeof WeakMap)return null;var e=new WeakMap;return c=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})(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}).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})(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=y(e);if(t){var i=y(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return v(this,n)}}function v(e,t){return!t||"object"!==d(t)&&"function"!==typeof t?m(e):t}function m(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function y(e){return(y=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function w(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var b=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,u,c=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),w(m(t=c.call(this,e)),"itemsWrapperRef",void 0),w(m(t),"itemsListRef",void 0),w(m(t),"thumbsRef",void 0),w(m(t),"setItemsWrapperRef",(function(e){t.itemsWrapperRef=e})),w(m(t),"setItemsListRef",(function(e){t.itemsListRef=e})),w(m(t),"setThumbsRef",(function(e,n){t.thumbsRef||(t.thumbsRef=[]),t.thumbsRef[n]=e})),w(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}}))}})),w(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)}})),w(m(t),"onSwipeStart",(function(){t.setState({swiping:!0})})),w(m(t),"onSwipeEnd",(function(){t.setState({swiping:!1})})),w(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})),w(m(t),"slideRight",(function(e){t.moveTo(t.state.firstItem-("number"===typeof e?e:1))})),w(m(t),"slideLeft",(function(e){t.moveTo(t.state.firstItem+("number"===typeof e?e:1))})),w(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,u=-this.state.firstItem*(this.state.itemSize||0),c=(0,l.default)(u,"px",this.props.axis),d=this.props.transitionTime+"ms";return t={WebkitTransform:c,MozTransform:c,MsTransform:c,OTransform:c,transform:c,msTransform:c,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),u&&f(t,u),d}(r.Component);t.default=b,w(b,"displayName","Thumbs"),w(b,"defaultProps",{axis:"horizontal",labels:{leftArrow:"previous slide / item",rightArrow:"next slide / item",item:"slide item"},selectedItem:0,thumbWidth:80,transitionTime:350})},1399:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default=function(){return window}},1400:function(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(0),o=(r=n(1335))&&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}},1516:function(e,t){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}},1517:function(e,t,n){var r=n(1518);e.exports=function(e){return e&&e.length?r(e):[]}},1518:function(e,t,n){var r=n(474),i=n(1328),o=n(1333),l=n(475),a=n(1519),s=n(476);e.exports=function(e,t,n){var u=-1,c=i,d=e.length,h=!0,f=[],p=f;if(n)h=!1,c=o;else if(d>=200){var g=t?null:a(e);if(g)return s(g);h=!1,c=l,p=new r}else p=t?[]:f;e:for(;++u<d;){var v=e[u],m=t?t(v):v;if(v=n||0!==v?v:0,h&&m===m){for(var y=p.length;y--;)if(p[y]===m)continue e;t&&p.push(m),f.push(v)}else c(p,m,n)||(p!==f&&p.push(m),f.push(v))}return f}},1519:function(e,t,n){var r=n(478),i=n(1520),o=n(476),l=r&&1/o(new r([,-0]))[1]==1/0?function(e){return new r(e)}:i;e.exports=l},1520:function(e,t){e.exports=function(){}},1521:function(e,t,n){var r=n(1522);e.exports=function(e){return(null==e?0:e.length)?r(e,1):[]}},1522:function(e,t,n){var r=n(316),i=n(1523);e.exports=function e(t,n,o,l,a){var s=-1,u=t.length;for(o||(o=i),a||(a=[]);++s<u;){var c=t[s];n>0&&o(c)?n>1?e(c,n-1,o,l,a):r(a,c):l||(a[a.length]=c)}return a}},1523:function(e,t,n){var r=n(167),i=n(247),o=n(72),l=r?r.isConcatSpreadable:void 0;e.exports=function(e){return o(e)||i(e)||!!(l&&e&&e[l])}},1524:function(e,t,n){var r=n(81);e.exports=function(){return r.Date.now()}},1525:function(e,t,n){var r=n(1526),i=n(481);e.exports=function(e,t){return null!=e&&i(e,t,r)}},1526:function(e,t){var n=Object.prototype.hasOwnProperty;e.exports=function(e,t){return null!=e&&n.call(e,t)}},1527:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"Carousel",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(t,"CarouselProps",{enumerable:!0,get:function(){return i.CarouselProps}}),Object.defineProperty(t,"Thumbs",{enumerable:!0,get:function(){return o.default}});var r=l(n(1528)),i=n(1536),o=l(n(1398));function l(e){return e&&e.__esModule?e:{default:e}}},1528:function(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(0)),i=d(n(1396)),o=d(n(1397)),l=d(n(1398)),a=d(n(1534)),s=d(n(1399)),u=n(1400),c=n(1535);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})(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}).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 v(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){C(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 m(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 y(e,t){return(y=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function w(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 b(this,n)}}function b(e,t){return!t||"object"!==f(t)&&"function"!==typeof t?D(e):t}function D(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)})(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}var k=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&&y(e,t)}(f,e);var t,n,d,h=w(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),C(D(t=h.call(this,e)),"thumbsRef",void 0),C(D(t),"carouselWrapperRef",void 0),C(D(t),"listRef",void 0),C(D(t),"itemsRef",void 0),C(D(t),"timer",void 0),C(D(t),"animationHandler",void 0),C(D(t),"setThumbsRef",(function(e){t.thumbsRef=e})),C(D(t),"setCarouselWrapperRef",(function(e){t.carouselWrapperRef=e})),C(D(t),"setListRef",(function(e){t.listRef=e})),C(D(t),"setItemsRef",(function(e,n){t.itemsRef||(t.itemsRef=[]),t.itemsRef[n]=e})),C(D(t),"autoPlay",(function(){r.Children.count(t.props.children)<=1||(t.clearAutoPlay(),t.props.autoPlay&&(t.timer=setTimeout((function(){t.increment()}),t.props.interval)))})),C(D(t),"clearAutoPlay",(function(){t.timer&&clearTimeout(t.timer)})),C(D(t),"resetAutoPlay",(function(){t.clearAutoPlay(),t.autoPlay()})),C(D(t),"stopOnHover",(function(){t.setState({isMouseEntered:!0},t.clearAutoPlay)})),C(D(t),"startOnLeave",(function(){t.setState({isMouseEntered:!1},t.autoPlay)})),C(D(t),"isFocusWithinTheCarousel",(function(){return!!t.carouselWrapperRef&&!((0,a.default)().activeElement!==t.carouselWrapperRef&&!t.carouselWrapperRef.contains((0,a.default)().activeElement))})),C(D(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()}})),C(D(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()}}})),C(D(t),"setMountState",(function(){t.setState({hasMount:!0}),t.updateSizes()})),C(D(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})))})),C(D(t),"handleOnChange",(function(e,n){r.Children.count(t.props.children)<=1||t.props.onChange(e,n)})),C(D(t),"handleClickThumb",(function(e,n){t.props.onClickThumb(e,n),t.moveTo(e)})),C(D(t),"onSwipeStart",(function(e){t.setState({swiping:!0}),t.props.onSwipeStart(e)})),C(D(t),"onSwipeEnd",(function(e){t.setState({swiping:!1,cancelClick:!1,swipeMovementStarted:!1}),t.props.onSwipeEnd(e),t.clearAutoPlay(),t.state.autoPlay&&t.autoPlay()})),C(D(t),"onSwipeMove",(function(e,n){t.props.onSwipeMove(n);var r=t.props.swipeAnimationHandler(e,t.props,t.state,t.setState.bind(D(t)));return t.setState(v({},r)),!!Object.keys(r).length})),C(D(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))})),C(D(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))})),C(D(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()}})),C(D(t),"onClickNext",(function(){t.increment(1)})),C(D(t),"onClickPrev",(function(){t.decrement(1)})),C(D(t),"onSwipeForward",(function(){t.increment(1),t.props.emulateTouch&&t.setState({cancelClick:!0})})),C(D(t),"onSwipeBackwards",(function(){t.decrement(1),t.props.emulateTouch&&t.setState({cancelClick:!0})})),C(D(t),"changeItem",(function(e){return function(n){(0,u.isKeyboardEvent)(n)&&"Enter"!==n.key||t.moveTo(e)}})),C(D(t),"selectItem",(function(e){t.setState(v({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])})),C(D(t),"getInitialImage",(function(){var e=t.props.selectedItem,n=t.itemsRef&&t.itemsRef[e];return(n&&n.getElementsByTagName("img")||[])[0]})),C(D(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&&c.fadeAnimationHandler||c.slideAnimationHandler,t.state=v(v({},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(v({},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=v(v({},s),{},{minWidth:t.props.centerSlidePercentage+"%"})),t.state.swiping&&t.state.swipeMovementStarted&&(s=v(v({},s),{},{pointerEvents:"none"}));var u={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",u,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,u=this.renderItems(!0),c=u.shift(),d=u.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=v(v({},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&&c):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&&c)),this.props.renderArrowNext(this.onClickNext,s,this.props.labels.rightArrow),this.renderStatus()),this.renderThumbs())}}])&&m(t.prototype,n),d&&m(t,d),f}(r.default.Component);t.default=k,C(k,"displayName","Carousel"),C(k,"defaultProps",{ariaLabel:void 0,axis:"horizontal",centerSlidePercentage:80,interval:3e3,labels:{leftArrow:"previous slide / item",rightArrow:"next slide / item",item:"slide item"},onClickItem:u.noop,onClickThumb:u.noop,onChange:u.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:u.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:c.slideSwipeAnimationHandler,stopSwipingHandler:c.slideStopSwipingHandler})},1529:function(e,t,n){var r,i,o;i=[t,n(0),n(1530)],void 0===(o="function"===typeof(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 u=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 c(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(m){}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 v=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=c(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),u(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);v.displayName="ReactSwipe",v.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},v.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=v})?r.apply(t,i):r)||(e.exports=o)},1530:function(e,t,n){e.exports=n(1531)()},1531:function(e,t,n){"use strict";var r=n(1532);function i(){}function o(){}o.resetWarningCache=i,e.exports=function(){function e(e,t,n,i,o,l){if(l!==r){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:o,resetWarningCache:i};return n.PropTypes=n,n}},1532:function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},1533:function(e,t,n){"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)}},1534:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default=function(){return document}},1535:function(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(0),o=(r=n(1335))&&r.__esModule?r:{default:r},l=n(1400);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){u(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 u(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,u=i.Children.count(e.children)-1;if(e.infiniteLoop&&(r<0||r>u))return a<0?e.centerMode&&e.centerSlidePercentage&&"horizontal"===e.axis?n.itemListStyle=(0,l.setPosition)(-(u+2)*e.centerSlidePercentage-(100-e.centerSlidePercentage)/2,e.axis):n.itemListStyle=(0,l.setPosition)(100*-(u+2),e.axis):a>u&&(n.itemListStyle=(0,l.setPosition)(0,e.axis)),n;var c=(0,l.getPosition)(r,e),d=(0,o.default)(c,"%",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),u=(0,l.getPosition)(n.selectedItem,t),c=t.infiniteLoop?(0,l.getPosition)(s-1,t)-100:(0,l.getPosition)(s-1,t),d=a?e.x:e.y,h=d;0===u&&d>0&&(h=0),u===c&&d<0&&(h=0);var f=u+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)}}},1536:function(e,t,n){},1537:function(e,t,n){!function(e){"use strict";function t(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 n(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function r(e,t){if(e){if("string"===typeof e)return i(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?i(e,t):void 0}}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function o(e,t){var n="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=r(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var i=0;return function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function l(){return{baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}function a(t){e.defaults=t}e.defaults=l();var s=/[&<>"']/,u=/[&<>"']/g,c=/[<>"']|&(?!#?\w+;)/,d=/[<>"']|&(?!#?\w+;)/g,h={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},f=function(e){return h[e]};function p(e,t){if(t){if(s.test(e))return e.replace(u,f)}else if(c.test(e))return e.replace(d,f);return e}var g=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function v(e){return e.replace(g,(function(e,t){return"colon"===(t=t.toLowerCase())?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""}))}var m=/(^|[^\[])\^/g;function y(e,t){e="string"===typeof e?e:e.source,t=t||"";var n={replace:function(t,r){return r=(r=r.source||r).replace(m,"$1"),e=e.replace(t,r),n},getRegex:function(){return new RegExp(e,t)}};return n}var w=/[^\w:]/g,b=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function D(e,t,n){if(e){var r;try{r=decodeURIComponent(v(n)).replace(w,"").toLowerCase()}catch(i){return null}if(0===r.indexOf("javascript:")||0===r.indexOf("vbscript:")||0===r.indexOf("data:"))return null}t&&!b.test(n)&&(n=S(t,n));try{n=encodeURI(n).replace(/%25/g,"%")}catch(i){return null}return n}var x={},C=/^[^:]+:\/*[^/]*$/,k=/^([^:]+:)[\s\S]*$/,E=/^([^:]+:\/*[^/]*)[\s\S]*$/;function S(e,t){x[" "+e]||(C.test(e)?x[" "+e]=e+"/":x[" "+e]=R(e,"/",!0));var n=-1===(e=x[" "+e]).indexOf(":");return"//"===t.substring(0,2)?n?t:e.replace(k,"$1")+t:"/"===t.charAt(0)?n?t:e.replace(E,"$1")+t:e+t}var F={exec:function(){}};function A(e){for(var t,n,r=1;r<arguments.length;r++)for(n in t=arguments[r])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}function M(e,t){var n=e.replace(/\|/g,(function(e,t,n){for(var r=!1,i=t;--i>=0&&"\\"===n[i];)r=!r;return r?"|":" |"})).split(/ \|/),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 R(e,t,n){var r=e.length;if(0===r)return"";for(var i=0;i<r;){var 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 T(e,t){if(-1===e.indexOf(t[1]))return-1;for(var n=e.length,r=0,i=0;i<n;i++)if("\\"===e[i])i++;else if(e[i]===t[0])r++;else if(e[i]===t[1]&&--r<0)return i;return-1}function I(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")}function B(e,t){if(t<1)return"";for(var n="";t>1;)1&t&&(n+=e),t>>=1,e+=e;return n+e}function O(e,t,n,r){var i=t.href,o=t.title?p(t.title):null,l=e[1].replace(/\\([\[\]])/g,"$1");if("!"!==e[0].charAt(0)){r.state.inLink=!0;var a={type:"link",raw:n,href:i,title:o,text:l,tokens:r.inlineTokens(l,[])};return r.state.inLink=!1,a}return{type:"image",raw:n,href:i,title:o,text:p(l)}}function P(e,t){var n=e.match(/^(\s+)(?:```)/);if(null===n)return t;var r=n[1];return t.split("\n").map((function(e){var t=e.match(/^\s+/);return null===t?e:t[0].length>=r.length?e.slice(r.length):e})).join("\n")}var H=function(){function t(t){this.options=t||e.defaults}var n=t.prototype;return n.space=function(e){var t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}},n.code=function(e){var t=this.rules.block.code.exec(e);if(t){var n=t[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?n:R(n,"\n")}}},n.fences=function(e){var t=this.rules.block.fences.exec(e);if(t){var n=t[0],r=P(n,t[3]||"");return{type:"code",raw:n,lang:t[2]?t[2].trim():t[2],text:r}}},n.heading=function(e){var t=this.rules.block.heading.exec(e);if(t){var n=t[2].trim();if(/#$/.test(n)){var r=R(n,"#");this.options.pedantic?n=r.trim():r&&!/ $/.test(r)||(n=r.trim())}var i={type:"heading",raw:t[0],depth:t[1].length,text:n,tokens:[]};return this.lexer.inline(i.text,i.tokens),i}},n.hr=function(e){var t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:t[0]}},n.blockquote=function(e){var t=this.rules.block.blockquote.exec(e);if(t){var n=t[0].replace(/^ *>[ \t]?/gm,"");return{type:"blockquote",raw:t[0],tokens:this.lexer.blockTokens(n,[]),text:n}}},n.list=function(e){var t=this.rules.block.list.exec(e);if(t){var n,r,i,l,a,s,u,c,d,h,f,p,g=t[1].trim(),v=g.length>1,m={type:"list",raw:"",ordered:v,start:v?+g.slice(0,-1):"",loose:!1,items:[]};g=v?"\\d{1,9}\\"+g.slice(-1):"\\"+g,this.options.pedantic&&(g=v?g:"[*+-]");for(var y=new RegExp("^( {0,3}"+g+")((?:[\t ][^\\n]*)?(?:\\n|$))");e&&(p=!1,t=y.exec(e))&&!this.rules.block.hr.test(e);){if(n=t[0],e=e.substring(n.length),c=t[2].split("\n",1)[0],d=e.split("\n",1)[0],this.options.pedantic?(l=2,f=c.trimLeft()):(l=(l=t[2].search(/[^ ]/))>4?1:l,f=c.slice(l),l+=t[1].length),s=!1,!c&&/^ *$/.test(d)&&(n+=d+"\n",e=e.substring(d.length+1),p=!0),!p)for(var w=new RegExp("^ {0,"+Math.min(3,l-1)+"}(?:[*+-]|\\d{1,9}[.)])((?: [^\\n]*)?(?:\\n|$))"),b=new RegExp("^ {0,"+Math.min(3,l-1)+"}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)");e&&(c=h=e.split("\n",1)[0],this.options.pedantic&&(c=c.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),!w.test(c))&&!b.test(e);){if(c.search(/[^ ]/)>=l||!c.trim())f+="\n"+c.slice(l);else{if(s)break;f+="\n"+c}s||c.trim()||(s=!0),n+=h+"\n",e=e.substring(h.length+1)}m.loose||(u?m.loose=!0:/\n *\n *$/.test(n)&&(u=!0)),this.options.gfm&&(r=/^\[[ xX]\] /.exec(f))&&(i="[ ] "!==r[0],f=f.replace(/^\[[ xX]\] +/,"")),m.items.push({type:"list_item",raw:n,task:!!r,checked:i,loose:!1,text:f}),m.raw+=n}m.items[m.items.length-1].raw=n.trimRight(),m.items[m.items.length-1].text=f.trimRight(),m.raw=m.raw.trimRight();var D=m.items.length;for(a=0;a<D;a++){this.lexer.state.top=!1,m.items[a].tokens=this.lexer.blockTokens(m.items[a].text,[]);var x=m.items[a].tokens.filter((function(e){return"space"===e.type})),C=x.every((function(e){for(var t,n=0,r=o(e.raw.split(""));!(t=r()).done;)if("\n"===t.value&&(n+=1),n>1)return!0;return!1}));!m.loose&&x.length&&C&&(m.loose=!0,m.items[a].loose=!0)}return m}},n.html=function(e){var t=this.rules.block.html.exec(e);if(t){var n={type:"html",raw:t[0],pre:!this.options.sanitizer&&("pre"===t[1]||"script"===t[1]||"style"===t[1]),text:t[0]};return this.options.sanitize&&(n.type="paragraph",n.text=this.options.sanitizer?this.options.sanitizer(t[0]):p(t[0]),n.tokens=[],this.lexer.inline(n.text,n.tokens)),n}},n.def=function(e){var t=this.rules.block.def.exec(e);if(t)return t[3]&&(t[3]=t[3].substring(1,t[3].length-1)),{type:"def",tag:t[1].toLowerCase().replace(/\s+/g," "),raw:t[0],href:t[2],title:t[3]}},n.table=function(e){var t=this.rules.block.table.exec(e);if(t){var n={type:"table",header:M(t[1]).map((function(e){return{text:e}})),align:t[2].replace(/^ *|\| *$/g,"").split(/ *\| */),rows:t[3]&&t[3].trim()?t[3].replace(/\n[ \t]*$/,"").split("\n"):[]};if(n.header.length===n.align.length){n.raw=t[0];var r,i,o,l,a=n.align.length;for(r=0;r<a;r++)/^ *-+: *$/.test(n.align[r])?n.align[r]="right":/^ *:-+: *$/.test(n.align[r])?n.align[r]="center":/^ *:-+ *$/.test(n.align[r])?n.align[r]="left":n.align[r]=null;for(a=n.rows.length,r=0;r<a;r++)n.rows[r]=M(n.rows[r],n.header.length).map((function(e){return{text:e}}));for(a=n.header.length,i=0;i<a;i++)n.header[i].tokens=[],this.lexer.inline(n.header[i].text,n.header[i].tokens);for(a=n.rows.length,i=0;i<a;i++)for(l=n.rows[i],o=0;o<l.length;o++)l[o].tokens=[],this.lexer.inline(l[o].text,l[o].tokens);return n}}},n.lheading=function(e){var t=this.rules.block.lheading.exec(e);if(t){var n={type:"heading",raw:t[0],depth:"="===t[2].charAt(0)?1:2,text:t[1],tokens:[]};return this.lexer.inline(n.text,n.tokens),n}},n.paragraph=function(e){var t=this.rules.block.paragraph.exec(e);if(t){var n={type:"paragraph",raw:t[0],text:"\n"===t[1].charAt(t[1].length-1)?t[1].slice(0,-1):t[1],tokens:[]};return this.lexer.inline(n.text,n.tokens),n}},n.text=function(e){var t=this.rules.block.text.exec(e);if(t){var n={type:"text",raw:t[0],text:t[0],tokens:[]};return this.lexer.inline(n.text,n.tokens),n}},n.escape=function(e){var t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:p(t[1])}},n.tag=function(e){var 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]):p(t[0]):t[0]}},n.link=function(e){var t=this.rules.inline.link.exec(e);if(t){var n=t[2].trim();if(!this.options.pedantic&&/^</.test(n)){if(!/>$/.test(n))return;var r=R(n.slice(0,-1),"\\");if((n.length-r.length)%2===0)return}else{var i=T(t[2],"()");if(i>-1){var o=(0===t[0].indexOf("!")?5:4)+t[1].length+i;t[2]=t[2].substring(0,i),t[0]=t[0].substring(0,o).trim(),t[3]=""}}var l=t[2],a="";if(this.options.pedantic){var s=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(l);s&&(l=s[1],a=s[3])}else a=t[3]?t[3].slice(1,-1):"";return l=l.trim(),/^</.test(l)&&(l=this.options.pedantic&&!/>$/.test(n)?l.slice(1):l.slice(1,-1)),O(t,{href:l?l.replace(this.rules.inline._escapes,"$1"):l,title:a?a.replace(this.rules.inline._escapes,"$1"):a},t[0],this.lexer)}},n.reflink=function(e,t){var n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){var r=(n[2]||n[1]).replace(/\s+/g," ");if(!(r=t[r.toLowerCase()])||!r.href){var i=n[0].charAt(0);return{type:"text",raw:i,text:i}}return O(n,r,n[0],this.lexer)}},n.emStrong=function(e,t,n){void 0===n&&(n="");var r=this.rules.inline.emStrong.lDelim.exec(e);if(r&&(!r[3]||!n.match(/(?:[0-9A-Za-z\xAA\xB2\xB3\xB5\xB9\xBA\xBC-\xBE\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u0660-\u0669\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07C0-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0966-\u096F\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09E6-\u09F1\u09F4-\u09F9\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A66-\u0A6F\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AE6-\u0AEF\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B66-\u0B6F\u0B71-\u0B77\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0BE6-\u0BF2\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C66-\u0C6F\u0C78-\u0C7E\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CE6-\u0CEF\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D58-\u0D61\u0D66-\u0D78\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DE6-\u0DEF\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F20-\u0F33\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F-\u1049\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u1090-\u1099\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1369-\u137C\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u17E0-\u17E9\u17F0-\u17F9\u1810-\u1819\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A16\u1A20-\u1A54\u1A80-\u1A89\u1A90-\u1A99\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B50-\u1B59\u1B83-\u1BA0\u1BAE-\u1BE5\u1C00-\u1C23\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2070\u2071\u2074-\u2079\u207F-\u2089\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2150-\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2CFD\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u3192-\u3195\u31A0-\u31BF\u31F0-\u31FF\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA830-\uA835\uA840-\uA873\uA882-\uA8B3\uA8D0-\uA8D9\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA900-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF-\uA9D9\uA9E0-\uA9E4\uA9E6-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA50-\uAA59\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD07-\uDD33\uDD40-\uDD78\uDD8A\uDD8B\uDE80-\uDE9C\uDEA0-\uDED0\uDEE1-\uDEFB\uDF00-\uDF23\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC58-\uDC76\uDC79-\uDC9E\uDCA7-\uDCAF\uDCE0-\uDCF2\uDCF4\uDCF5\uDCFB-\uDD1B\uDD20-\uDD39\uDD80-\uDDB7\uDDBC-\uDDCF\uDDD2-\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE40-\uDE48\uDE60-\uDE7E\uDE80-\uDE9F\uDEC0-\uDEC7\uDEC9-\uDEE4\uDEEB-\uDEEF\uDF00-\uDF35\uDF40-\uDF55\uDF58-\uDF72\uDF78-\uDF91\uDFA9-\uDFAF]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDCFA-\uDD23\uDD30-\uDD39\uDE60-\uDE7E\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF27\uDF30-\uDF45\uDF51-\uDF54\uDF70-\uDF81\uDFB0-\uDFCB\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC52-\uDC6F\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD03-\uDD26\uDD36-\uDD3F\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDD0-\uDDDA\uDDDC\uDDE1-\uDDF4\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDEF0-\uDEF9\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC50-\uDC59\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE50-\uDE59\uDE80-\uDEAA\uDEB8\uDEC0-\uDEC9\uDF00-\uDF1A\uDF30-\uDF3B\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCF2\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDD50-\uDD59\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC50-\uDC6C\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD50-\uDD59\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDDA0-\uDDA9\uDEE0-\uDEF2\uDFB0\uDFC0-\uDFD4]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDE70-\uDEBE\uDEC0-\uDEC9\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF50-\uDF59\uDF5B-\uDF61\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE96\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD50-\uDD52\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD834[\uDEE0-\uDEF3\uDF60-\uDF78]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD837[\uDF00-\uDF1E]|\uD838[\uDD00-\uDD2C\uDD37-\uDD3D\uDD40-\uDD49\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB\uDEF0-\uDEF9]|\uD839[\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDCC7-\uDCCF\uDD00-\uDD43\uDD4B\uDD50-\uDD59]|\uD83B[\uDC71-\uDCAB\uDCAD-\uDCAF\uDCB1-\uDCB4\uDD01-\uDD2D\uDD2F-\uDD3D\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD83C[\uDD00-\uDD0C]|\uD83E[\uDFF0-\uDFF9]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF38\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A])/))){var i=r[1]||r[2]||"";if(!i||i&&(""===n||this.rules.inline.punctuation.exec(n))){var o,l,a=r[0].length-1,s=a,u=0,c="*"===r[0][0]?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(c.lastIndex=0,t=t.slice(-1*e.length+a);null!=(r=c.exec(t));)if(o=r[1]||r[2]||r[3]||r[4]||r[5]||r[6])if(l=o.length,r[3]||r[4])s+=l;else if(!((r[5]||r[6])&&a%3)||(a+l)%3){if(!((s-=l)>0)){if(l=Math.min(l,l+s+u),Math.min(a,l)%2){var d=e.slice(1,a+r.index+l);return{type:"em",raw:e.slice(0,a+r.index+l+1),text:d,tokens:this.lexer.inlineTokens(d,[])}}var h=e.slice(2,a+r.index+l-1);return{type:"strong",raw:e.slice(0,a+r.index+l+1),text:h,tokens:this.lexer.inlineTokens(h,[])}}}else u+=l}}},n.codespan=function(e){var t=this.rules.inline.code.exec(e);if(t){var n=t[2].replace(/\n/g," "),r=/[^ ]/.test(n),i=/^ /.test(n)&&/ $/.test(n);return r&&i&&(n=n.substring(1,n.length-1)),n=p(n,!0),{type:"codespan",raw:t[0],text:n}}},n.br=function(e){var t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}},n.del=function(e){var t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2],[])}},n.autolink=function(e,t){var n,r,i=this.rules.inline.autolink.exec(e);if(i)return r="@"===i[2]?"mailto:"+(n=p(this.options.mangle?t(i[1]):i[1])):n=p(i[1]),{type:"link",raw:i[0],text:n,href:r,tokens:[{type:"text",raw:n,text:n}]}},n.url=function(e,t){var n;if(n=this.rules.inline.url.exec(e)){var r,i;if("@"===n[2])i="mailto:"+(r=p(this.options.mangle?t(n[0]):n[0]));else{var o;do{o=n[0],n[0]=this.rules.inline._backpedal.exec(n[0])[0]}while(o!==n[0]);r=p(n[0]),i="www."===n[1]?"http://"+r:r}return{type:"link",raw:n[0],text:r,href:i,tokens:[{type:"text",raw:r,text:r}]}}},n.inlineText=function(e,t){var n,r=this.rules.inline.text.exec(e);if(r)return n=this.lexer.state.inRawBlock?this.options.sanitize?this.options.sanitizer?this.options.sanitizer(r[0]):p(r[0]):r[0]:p(this.options.smartypants?t(r[0]):r[0]),{type:"text",raw:r[0],text:n}},t}(),z={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>]+)>?(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/,table:F,lheading:/^([^\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?'|\([^()]*\))/};z.def=y(z.def).replace("label",z._label).replace("title",z._title).getRegex(),z.bullet=/(?:[*+-]|\d{1,9}[.)])/,z.listItemStart=y(/^( *)(bull) */).replace("bull",z.bullet).getRegex(),z.list=y(z.list).replace(/bull/g,z.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+z.def.source+")").getRegex(),z._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",z._comment=/<!--(?!-?>)[\s\S]*?(?:-->|$)/,z.html=y(z.html,"i").replace("comment",z._comment).replace("tag",z._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),z.paragraph=y(z._paragraph).replace("hr",z.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",z._tag).getRegex(),z.blockquote=y(z.blockquote).replace("paragraph",z.paragraph).getRegex(),z.normal=A({},z),z.gfm=A({},z.normal,{table:"^ *([^\\n ].*\\|.*)\\n {0,3}(?:\\| *)?(:?-+:? *(?:\\| *:?-+:? *)*)(?:\\| *)?(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"}),z.gfm.table=y(z.gfm.table).replace("hr",z.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",z._tag).getRegex(),z.gfm.paragraph=y(z._paragraph).replace("hr",z.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("table",z.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",z._tag).getRegex(),z.pedantic=A({},z.normal,{html:y("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",z._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:F,paragraph:y(z.normal._paragraph).replace("hr",z.hr).replace("heading"," *#{1,6} *[^\n]").replace("lheading",z.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var _={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:F,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:F,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,punctuation:/^([\spunctuation])/};function L(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 $(e){var t,n,r="",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}_._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",_.punctuation=y(_.punctuation).replace(/punctuation/g,_._punctuation).getRegex(),_.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g,_.escapedEmSt=/\\\*|\\_/g,_._comment=y(z._comment).replace("(?:--\x3e|$)","--\x3e").getRegex(),_.emStrong.lDelim=y(_.emStrong.lDelim).replace(/punct/g,_._punctuation).getRegex(),_.emStrong.rDelimAst=y(_.emStrong.rDelimAst,"g").replace(/punct/g,_._punctuation).getRegex(),_.emStrong.rDelimUnd=y(_.emStrong.rDelimUnd,"g").replace(/punct/g,_._punctuation).getRegex(),_._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,_._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,_._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])?)+(?![-_])/,_.autolink=y(_.autolink).replace("scheme",_._scheme).replace("email",_._email).getRegex(),_._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,_.tag=y(_.tag).replace("comment",_._comment).replace("attribute",_._attribute).getRegex(),_._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,_._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/,_._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,_.link=y(_.link).replace("label",_._label).replace("href",_._href).replace("title",_._title).getRegex(),_.reflink=y(_.reflink).replace("label",_._label).replace("ref",z._label).getRegex(),_.nolink=y(_.nolink).replace("ref",z._label).getRegex(),_.reflinkSearch=y(_.reflinkSearch,"g").replace("reflink",_.reflink).replace("nolink",_.nolink).getRegex(),_.normal=A({},_),_.pedantic=A({},_.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:y(/^!?\[(label)\]\((.*?)\)/).replace("label",_._label).getRegex(),reflink:y(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",_._label).getRegex()}),_.gfm=A({},_.normal,{escape:y(_.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.!#$%&'*+\/=?_`{\|}~-]+@)))/}),_.gfm.url=y(_.gfm.url,"i").replace("email",_.gfm._extended_email).getRegex(),_.breaks=A({},_.gfm,{br:y(_.br).replace("{2,}","*").getRegex(),text:y(_.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});var N=function(){function t(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||e.defaults,this.options.tokenizer=this.options.tokenizer||new H,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};var n={block:z.normal,inline:_.normal};this.options.pedantic?(n.block=z.pedantic,n.inline=_.pedantic):this.options.gfm&&(n.block=z.gfm,this.options.breaks?n.inline=_.breaks:n.inline=_.gfm),this.tokenizer.rules=n}t.lex=function(e,n){return new t(n).lex(e)},t.lexInline=function(e,n){return new t(n).inlineTokens(e)};var r=t.prototype;return r.lex=function(e){var 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},r.blockTokens=function(e,t){var n,r,i,o,l=this;for(void 0===t&&(t=[]),e=this.options.pedantic?e.replace(/\t/g," ").replace(/^ +$/gm,""):e.replace(/^( *)(\t+)/gm,(function(e,t,n){return t+" ".repeat(n.length)}));e;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some((function(r){return!!(n=r.call({lexer:l},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])||"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])||"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&&function(){var t=1/0,n=e.slice(1),r=void 0;l.options.extensions.startBlock.forEach((function(e){"number"===typeof(r=e.call({lexer:this},n))&&r>=0&&(t=Math.min(t,r))})),t<1/0&&t>=0&&(i=e.substring(0,t+1))}(),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])&&"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){var a="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(a);break}throw new Error(a)}return this.state.top=!0,t},r.inline=function(e,t){this.inlineQueue.push({src:e,tokens:t})},r.inlineTokens=function(e,t){var n,r,i,o=this;void 0===t&&(t=[]);var l,a,s,u=e;if(this.tokens.links){var c=Object.keys(this.tokens.links);if(c.length>0)for(;null!=(l=this.tokenizer.rules.inline.reflinkSearch.exec(u));)c.includes(l[0].slice(l[0].lastIndexOf("[")+1,-1))&&(u=u.slice(0,l.index)+"["+B("a",l[0].length-2)+"]"+u.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(l=this.tokenizer.rules.inline.blockSkip.exec(u));)u=u.slice(0,l.index)+"["+B("a",l[0].length-2)+"]"+u.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;null!=(l=this.tokenizer.rules.inline.escapedEmSt.exec(u));)u=u.slice(0,l.index)+"++"+u.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex);for(;e;)if(a||(s=""),a=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some((function(r){return!!(n=r.call({lexer:o},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])&&"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])&&"text"===n.type&&"text"===r.type?(r.raw+=n.raw,r.text+=n.text):t.push(n);else if(n=this.tokenizer.emStrong(e,u,s))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,$))e=e.substring(n.raw.length),t.push(n);else if(this.state.inLink||!(n=this.tokenizer.url(e,$))){if(i=e,this.options.extensions&&this.options.extensions.startInline&&function(){var t=1/0,n=e.slice(1),r=void 0;o.options.extensions.startInline.forEach((function(e){"number"===typeof(r=e.call({lexer:this},n))&&r>=0&&(t=Math.min(t,r))})),t<1/0&&t>=0&&(i=e.substring(0,t+1))}(),n=this.tokenizer.inlineText(i,L))e=e.substring(n.raw.length),"_"!==n.raw.slice(-1)&&(s=n.raw.slice(-1)),a=!0,(r=t[t.length-1])&&"text"===r.type?(r.raw+=n.raw,r.text+=n.text):t.push(n);else if(e){var d="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(d);break}throw new Error(d)}}else e=e.substring(n.raw.length),t.push(n);return t},n(t,null,[{key:"rules",get:function(){return{block:z,inline:_}}}]),t}(),j=function(){function t(t){this.options=t||e.defaults}var n=t.prototype;return n.code=function(e,t,n){var r=(t||"").match(/\S*/)[0];if(this.options.highlight){var i=this.options.highlight(e,r);null!=i&&i!==e&&(n=!0,e=i)}return e=e.replace(/\n$/,"")+"\n",r?'<pre><code class="'+this.options.langPrefix+p(r,!0)+'">'+(n?e:p(e,!0))+"</code></pre>\n":"<pre><code>"+(n?e:p(e,!0))+"</code></pre>\n"},n.blockquote=function(e){return"<blockquote>\n"+e+"</blockquote>\n"},n.html=function(e){return e},n.heading=function(e,t,n,r){return this.options.headerIds?"<h"+t+' id="'+(this.options.headerPrefix+r.slug(n))+'">'+e+"</h"+t+">\n":"<h"+t+">"+e+"</h"+t+">\n"},n.hr=function(){return this.options.xhtml?"<hr/>\n":"<hr>\n"},n.list=function(e,t,n){var r=t?"ol":"ul";return"<"+r+(t&&1!==n?' start="'+n+'"':"")+">\n"+e+"</"+r+">\n"},n.listitem=function(e){return"<li>"+e+"</li>\n"},n.checkbox=function(e){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "},n.paragraph=function(e){return"<p>"+e+"</p>\n"},n.table=function(e,t){return t&&(t="<tbody>"+t+"</tbody>"),"<table>\n<thead>\n"+e+"</thead>\n"+t+"</table>\n"},n.tablerow=function(e){return"<tr>\n"+e+"</tr>\n"},n.tablecell=function(e,t){var n=t.header?"th":"td";return(t.align?"<"+n+' align="'+t.align+'">':"<"+n+">")+e+"</"+n+">\n"},n.strong=function(e){return"<strong>"+e+"</strong>"},n.em=function(e){return"<em>"+e+"</em>"},n.codespan=function(e){return"<code>"+e+"</code>"},n.br=function(){return this.options.xhtml?"<br/>":"<br>"},n.del=function(e){return"<del>"+e+"</del>"},n.link=function(e,t,n){if(null===(e=D(this.options.sanitize,this.options.baseUrl,e)))return n;var r='<a href="'+p(e)+'"';return t&&(r+=' title="'+t+'"'),r+=">"+n+"</a>"},n.image=function(e,t,n){if(null===(e=D(this.options.sanitize,this.options.baseUrl,e)))return n;var r='<img src="'+e+'" alt="'+n+'"';return t&&(r+=' title="'+t+'"'),r+=this.options.xhtml?"/>":">"},n.text=function(e){return e},t}(),W=function(){function e(){}var t=e.prototype;return t.strong=function(e){return e},t.em=function(e){return e},t.codespan=function(e){return e},t.del=function(e){return e},t.html=function(e){return e},t.text=function(e){return e},t.link=function(e,t,n){return""+n},t.image=function(e,t,n){return""+n},t.br=function(){return""},e}(),K=function(){function e(){this.seen={}}var t=e.prototype;return t.serialize=function(e){return e.toLowerCase().trim().replace(/<[!\/a-z].*?>/gi,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")},t.getNextSafeSlug=function(e,t){var n=e,r=0;if(this.seen.hasOwnProperty(n)){r=this.seen[e];do{n=e+"-"+ ++r}while(this.seen.hasOwnProperty(n))}return t||(this.seen[e]=r,this.seen[n]=0),n},t.slug=function(e,t){void 0===t&&(t={});var n=this.serialize(e);return this.getNextSafeSlug(n,t.dryrun)},e}(),U=function(){function t(t){this.options=t||e.defaults,this.options.renderer=this.options.renderer||new j,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new W,this.slugger=new K}t.parse=function(e,n){return new t(n).parse(e)},t.parseInline=function(e,n){return new t(n).parseInline(e)};var n=t.prototype;return n.parse=function(e,t){void 0===t&&(t=!0);var n,r,i,o,l,a,s,u,c,d,h,f,p,g,m,y,w,b,D,x="",C=e.length;for(n=0;n<C;n++)if(d=e[n],!(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[d.type])||!1===(D=this.options.extensions.renderers[d.type].call({parser:this},d))&&["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(d.type))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,v(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(u="",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(u+=this.renderer.tablerow(s),c="",o=d.rows.length,r=0;r<o;r++){for(s="",l=(a=d.rows[r]).length,i=0;i<l;i++)s+=this.renderer.tablecell(this.parseInline(a[i].tokens),{header:!1,align:d.align[i]});c+=this.renderer.tablerow(s)}x+=this.renderer.table(u,c);continue;case"blockquote":c=this.parse(d.tokens),x+=this.renderer.blockquote(c);continue;case"list":for(h=d.ordered,f=d.start,p=d.loose,o=d.items.length,c="",r=0;r<o;r++)y=(m=d.items[r]).checked,w=m.task,g="",m.task&&(b=this.renderer.checkbox(y),p?m.tokens.length>0&&"paragraph"===m.tokens[0].type?(m.tokens[0].text=b+" "+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=b+" "+m.tokens[0].tokens[0].text)):m.tokens.unshift({type:"text",text:b}):g+=b),g+=this.parse(m.tokens,p),c+=this.renderer.listitem(g,w,y);x+=this.renderer.list(c,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(c=d.tokens?this.parseInline(d.tokens):d.text;n+1<C&&"text"===e[n+1].type;)c+="\n"+((d=e[++n]).tokens?this.parseInline(d.tokens):d.text);x+=t?this.renderer.paragraph(c):c;continue;default:var k='Token with "'+d.type+'" type was not found.';if(this.options.silent)return void console.error(k);throw new Error(k)}else x+=D||"";return x},n.parseInline=function(e,t){t=t||this.renderer;var n,r,i,o="",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])||!1===(i=this.options.extensions.renderers[r.type].call({parser:this},r))&&["escape","html","link","image","strong","em","codespan","br","del","text"].includes(r.type))switch(r.type){case"escape":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;case"text":o+=t.text(r.text);break;default:var a='Token with "'+r.type+'" type was not found.';if(this.options.silent)return void console.error(a);throw new Error(a)}else o+=i||"";return o},t}();function V(e,t,n){if("undefined"===typeof e||null===e)throw new Error("marked(): input parameter is undefined or null");if("string"!==typeof e)throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected");if("function"===typeof t&&(n=t,t=null),I(t=A({},V.defaults,t||{})),n){var r,i=t.highlight;try{r=N.lex(e,t)}catch(s){return n(s)}var o=function(e){var o;if(!e)try{t.walkTokens&&V.walkTokens(r,t.walkTokens),o=U.parse(r,t)}catch(s){e=s}return t.highlight=i,e?n(e):n(null,o)};if(!i||i.length<3)return o();if(delete t.highlight,!r.length)return o();var l=0;return V.walkTokens(r,(function(e){"code"===e.type&&(l++,setTimeout((function(){i(e.text,e.lang,(function(t,n){if(t)return o(t);null!=n&&n!==e.text&&(e.text=n,e.escaped=!0),0===--l&&o()}))}),0))})),void(0===l&&o())}try{var a=N.lex(e,t);return t.walkTokens&&V.walkTokens(a,t.walkTokens),U.parse(a,t)}catch(s){if(s.message+="\nPlease report this to https://github.com/markedjs/marked.",t.silent)return"<p>An error occurred:</p><pre>"+p(s.message+"",!0)+"</pre>";throw s}}V.options=V.setOptions=function(e){return A(V.defaults,e),a(V.defaults),V},V.getDefaults=l,V.defaults=e.defaults,V.use=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r,i=A.apply(void 0,[{}].concat(t)),o=V.defaults.extensions||{renderers:{},childTokens:{}};t.forEach((function(e){if(e.extensions&&(r=!0,e.extensions.forEach((function(e){if(!e.name)throw new Error("extension name required");if(e.renderer){var t=o.renderers?o.renderers[e.name]:null;o.renderers[e.name]=t?function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];var o=e.renderer.apply(this,r);return!1===o&&(o=t.apply(this,r)),o}:e.renderer}if(e.tokenizer){if(!e.level||"block"!==e.level&&"inline"!==e.level)throw new Error("extension level must be 'block' or 'inline'");o[e.level]?o[e.level].unshift(e.tokenizer):o[e.level]=[e.tokenizer],e.start&&("block"===e.level?o.startBlock?o.startBlock.push(e.start):o.startBlock=[e.start]:"inline"===e.level&&(o.startInline?o.startInline.push(e.start):o.startInline=[e.start]))}e.childTokens&&(o.childTokens[e.name]=e.childTokens)}))),e.renderer&&function(){var t=V.defaults.renderer||new j,n=function(n){var r=t[n];t[n]=function(){for(var i=arguments.length,o=new Array(i),l=0;l<i;l++)o[l]=arguments[l];var a=e.renderer[n].apply(t,o);return!1===a&&(a=r.apply(t,o)),a}};for(var r in e.renderer)n(r);i.renderer=t}(),e.tokenizer&&function(){var t=V.defaults.tokenizer||new H,n=function(n){var r=t[n];t[n]=function(){for(var i=arguments.length,o=new Array(i),l=0;l<i;l++)o[l]=arguments[l];var a=e.tokenizer[n].apply(t,o);return!1===a&&(a=r.apply(t,o)),a}};for(var r in e.tokenizer)n(r);i.tokenizer=t}(),e.walkTokens){var t=V.defaults.walkTokens;i.walkTokens=function(n){e.walkTokens.call(this,n),t&&t.call(this,n)}}r&&(i.extensions=o),V.setOptions(i)}))},V.walkTokens=function(e,t){for(var n,r=function(){var e=n.value;switch(t.call(V,e),e.type){case"table":for(var r,i=o(e.header);!(r=i()).done;){var l=r.value;V.walkTokens(l.tokens,t)}for(var a,s=o(e.rows);!(a=s()).done;)for(var u,c=o(a.value);!(u=c()).done;){var d=u.value;V.walkTokens(d.tokens,t)}break;case"list":V.walkTokens(e.items,t);break;default:V.defaults.extensions&&V.defaults.extensions.childTokens&&V.defaults.extensions.childTokens[e.type]?V.defaults.extensions.childTokens[e.type].forEach((function(n){V.walkTokens(e[n],t)})):e.tokens&&V.walkTokens(e.tokens,t)}},i=o(e);!(n=i()).done;)r()},V.parseInline=function(e,t){if("undefined"===typeof e||null===e)throw new Error("marked.parseInline(): input parameter is undefined or null");if("string"!==typeof e)throw new Error("marked.parseInline(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected");I(t=A({},V.defaults,t||{}));try{var n=N.lexInline(e,t);return t.walkTokens&&V.walkTokens(n,t.walkTokens),U.parseInline(n,t)}catch(r){if(r.message+="\nPlease report this to https://github.com/markedjs/marked.",t.silent)return"<p>An error occurred:</p><pre>"+p(r.message+"",!0)+"</pre>";throw r}},V.Parser=U,V.parser=U.parse,V.Renderer=j,V.TextRenderer=W,V.Lexer=N,V.lexer=N.lex,V.Tokenizer=H,V.Slugger=K,V.parse=V;var X=V.options,Y=V.setOptions,G=V.use,q=V.walkTokens,Z=V.parseInline,Q=V,J=U.parse,ee=N.lex;e.Lexer=N,e.Parser=U,e.Renderer=j,e.Slugger=K,e.TextRenderer=W,e.Tokenizer=H,e.getDefaults=l,e.lexer=ee,e.marked=V,e.options=X,e.parse=Q,e.parseInline=Z,e.parser=J,e.setOptions=Y,e.use=G,e.walkTokens=q,Object.defineProperty(e,"__esModule",{value:!0})}(t)},1538:function(e,t,n){var r=n(1334),i=n(99);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})}},1539:function(e,t,n){var r=n(196),i=n(1540),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},1540:function(e,t,n){var r=n(1541),i=n(1542),o=n(318),l=n(72);e.exports=function(e,t){return function(n,a){var s=l(n)?r:i,u=t?t():{};return s(n,e,o(a,2),u)}}},1541:function(e,t){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}},1542:function(e,t,n){var r=n(482);e.exports=function(e,t,n,i){return r(e,(function(e,r,o){t(i,e,n(e),o)})),i}},1543:function(e,t,n){},1744:function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(1383),i=n(1218),o=n.n(i),l=n(0);function a(e){var t,n,i,o,l;switch(e.kind){case r.c.Number:return null!==(t=null===(n=e.data)||void 0===n?void 0:n.toString())&&void 0!==t?t:"";case r.c.Boolean:return null!==(i=null===(o=e.data)||void 0===o?void 0:o.toString())&&void 0!==i?i:"";case r.c.Markdown:case r.c.RowID:case r.c.Text:case r.c.Uri:return null!==(l=e.data)&&void 0!==l?l:"";case r.c.Bubble:case r.c.Image:return e.data.join("");case r.c.Drilldown:return e.data.map((e=>e.text)).join("");case r.c.Protected:case r.c.Loading:return"";case r.c.Custom:return e.copyData}}function s(e){if("number"===typeof e)return e;if(e.length>0){const t=parseFloat(e);isNaN(t)||(e=t)}return e}function u(e){var t;const{sort:n,rows:r,getCellContent:i}=e;let u=void 0===n?void 0:e.columns.findIndex((e=>n.column===e||void 0!==e.id&&n.column.id===e.id));-1===u&&(u=void 0);const c=null!==(t=null===n||void 0===n?void 0:n.direction)&&void 0!==t?t:"asc",d=l.useMemo((()=>{if(void 0===u)return;const e=new Array(r),t=[u,0];for(let n=0;n<r;n++)t[1]=n,e[n]=a(i(t));let l;return l="raw"===(null===n||void 0===n?void 0:n.mode)?o()(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)?o()(r).sort(((t,n)=>function(e,t){return e=s(e),t=s(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]))):o()(r).sort(((t,n)=>e[t].localeCompare(e[n]))),"desc"===c&&l.reverse(),l}),[i,r,null===n||void 0===n?void 0:n.mode,c,u]),h=l.useCallback((e=>void 0===d?e:d[e]),[d]),f=l.useCallback((e=>{let[t,n]=e;return void 0===d||(n=d[n]),i([t,n])}),[i,d]);return void 0===d?{getCellContent:e.getCellContent,getOriginalIndex:h}:{getOriginalIndex:h,getCellContent:f}}}}]);