@stlite/desktop 0.83.1 → 0.84.2

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 (73) hide show
  1. package/build/assets/{ErrorOutline.esm-Cdc3NAX8.js → ErrorOutline.esm-7fPCAua1.js} +1 -1
  2. package/build/assets/{FileDownload.esm-CbXaPbiH.js → FileDownload.esm-5XDRJbc8.js} +1 -1
  3. package/build/assets/{FileHelper-WDsMYNBw.js → FileHelper-BarQJiLz.js} +1 -1
  4. package/build/assets/{FormClearHelper-CT0Jwp4X.js → FormClearHelper-BZaxoxQN.js} +1 -1
  5. package/build/assets/{Hooks-BKPTn6xf.js → Hooks-BxizdPoJ.js} +1 -1
  6. package/build/assets/{InputInstructions-Cyg7opie.js → InputInstructions-Dmr8j4xE.js} +1 -1
  7. package/build/assets/{ProgressBar-CA-bplbU.js → ProgressBar-C_yUO6k-.js} +1 -1
  8. package/build/assets/{RenderInPortalIfExists-BozYGWdi.js → RenderInPortalIfExists-eTRglO06.js} +1 -1
  9. package/build/assets/{Toolbar-DlGOP7h4.js → Toolbar-bneC7vhq.js} +1 -1
  10. package/build/assets/{base-input-BnIlcFzX.js → base-input-DrVuxJmE.js} +1 -1
  11. package/build/assets/{checkbox-CGvNPQQ1.js → checkbox-Ce7VH5yR.js} +1 -1
  12. package/build/assets/{createSuper-B8yCxQGq.js → createSuper-Ce1x_8d5.js} +1 -1
  13. package/build/assets/{data-grid-overlay-editor-CltKX1-_.js → data-grid-overlay-editor-Bd6FIb0g.js} +1 -1
  14. package/build/assets/{downloader-Cof1FiXt.js → downloader-DTdoFA0u.js} +1 -1
  15. package/build/assets/{es6-Ca0BcWDW.js → es6-eSFIFIhE.js} +2 -2
  16. package/build/assets/{iframeResizer.contentWindow-3AhBUVoO.js → iframeResizer.contentWindow-BbhpUGmG.js} +1 -1
  17. package/build/assets/{index-BUOOlidY.js → index-2zFaDmrI.js} +1 -1
  18. package/build/assets/{index-XyUVDWZe.js → index-B6AypoKB.js} +1 -1
  19. package/build/assets/{index-BafYTuwa.js → index-BF3Fet0V.js} +1 -1
  20. package/build/assets/{index-Dw5G4t9P.js → index-BU5lMh9f.js} +1 -1
  21. package/build/assets/{index-TkDz3vqu.js → index-BU9sb5h3.js} +1 -1
  22. package/build/assets/{index-Zd66ep5J.js → index-BWKeW-zA.js} +1 -1
  23. package/build/assets/{index-Dx-GFi6o.js → index-BcIT8Wnk.js} +1 -1
  24. package/build/assets/{index-Do3iUH-x.js → index-Bf7iW3kb.js} +1 -1
  25. package/build/assets/{index-PRsYLT-9.js → index-Bj66FfmM.js} +1 -1
  26. package/build/assets/{index-bQj3l0zc.js → index-BlaLvghR.js} +1 -1
  27. package/build/assets/{index-Bc7AX3-A.js → index-BrFIUJra.js} +1 -1
  28. package/build/assets/{index-J-18FLnE.js → index-BwAJEr7A.js} +1 -1
  29. package/build/assets/{index-ChbiMLbp.js → index-BxnhSwtv.js} +1 -1
  30. package/build/assets/{index-DCoy2PDE.js → index-C-8qP7Ru.js} +1 -1
  31. package/build/assets/{index-DfeaHlsl.js → index-CGpWCLFI.js} +1 -1
  32. package/build/assets/{index-ocHxXLCt.js → index-CQr0CfvQ.js} +1 -1
  33. package/build/assets/{index-BMvzOjlv.js → index-CfZojTNf.js} +1 -1
  34. package/build/assets/{index-CVrdwKzt.js → index-D1bJoe6r.js} +1 -1
  35. package/build/assets/{index-wCYAC2ZH.js → index-DAb-Jtr2.js} +1 -1
  36. package/build/assets/{index-ax2rbmoZ.js → index-DBHyG99F.js} +1 -1
  37. package/build/assets/{index-CN5CjLsc.js → index-DFxMAoHY.js} +1 -1
  38. package/build/assets/{index-CS3tnJiL.js → index-DGjwMTQq.js} +1 -1
  39. package/build/assets/{index-COAtiAK0.js → index-DMAr4hNX.js} +1 -1
  40. package/build/assets/{index-Cbvbjd8C.js → index-DPBNUFWE.js} +4 -4
  41. package/build/assets/{index-bfhlF0Xi.js → index-DW2AfAPF.js} +1 -1
  42. package/build/assets/{index--NPqZQqZ.js → index-DcKJu6C9.js} +1 -1
  43. package/build/assets/{index-C_kIyk9w.js → index-Dk8gL3aI.js} +1 -1
  44. package/build/assets/{index-BBjBAKoV.js → index-DluRIgvs.js} +1 -1
  45. package/build/assets/{index-dalh9Y65.js → index-Dwbjahn_.js} +1 -1
  46. package/build/assets/{index-CLBVu_mK.js → index-DyGi5YBc.js} +1 -1
  47. package/build/assets/{index-DIBxvKdk.js → index-DzT-BaTB.js} +1 -1
  48. package/build/assets/{index-DSVyX96W.js → index-_GH5VSbG.js} +1 -1
  49. package/build/assets/{index-C8-4FAc1.js → index-_iQJZ8n8.js} +1 -1
  50. package/build/assets/{index-uxEQ8qdA.js → index-atxzdN1F.js} +1 -1
  51. package/build/assets/{index-Bcsdrj2S.js → index-c-NQS3qn.js} +5 -5
  52. package/build/assets/{index-2MeZae5n.js → index-rc6TuZ_x.js} +1 -1
  53. package/build/assets/{index-CWEVeVJ6.js → index-wWTCE5QI.js} +1 -1
  54. package/build/assets/{inherits-BaopKHev.js → inherits-83mK7fR9.js} +1 -1
  55. package/build/assets/{input-BH9uqfZf.js → input-CXi1-D16.js} +1 -1
  56. package/build/assets/{memory-DWTwf9Ch.js → memory-BtIreI5V.js} +1 -1
  57. package/build/assets/{mergeWith-Bt-C9xRx.js → mergeWith-DZ-wgSc6.js} +1 -1
  58. package/build/assets/{number-overlay-editor-Dm8-09pg.js → number-overlay-editor-BxuviOUl.js} +1 -1
  59. package/build/assets/{sandbox-DGYybjEz.js → sandbox-DHLnmH8d.js} +1 -1
  60. package/build/assets/{slicedToArray-CEuyIGI5.js → slicedToArray-Bj-RN7K3.js} +1 -1
  61. package/build/assets/{textarea-BKB-3cBX.js → textarea-BKD-emFb.js} +1 -1
  62. package/build/assets/{timepicker-B1BEcpbo.js → timepicker-CWkzEpyz.js} +1 -1
  63. package/build/assets/{uniqueId-BSuwhGjw.js → uniqueId-BGMRjdMp.js} +1 -1
  64. package/build/assets/{useBasicWidgetState-D3a9XYx3.js → useBasicWidgetState-uJo0naOA.js} +1 -1
  65. package/build/assets/{useOnInputChange-BlFu2GNS.js → useOnInputChange-DI3AnwSZ.js} +1 -1
  66. package/build/assets/{withFullScreenWrapper-D8NJOCKn.js → withFullScreenWrapper-DbD5_ijt.js} +1 -1
  67. package/build/assets/worker-DEam9hTF.js +105 -0
  68. package/build/electron/worker.js +9 -17
  69. package/build/index.html +1 -1
  70. package/package.json +5 -5
  71. package/wheels/stlite_lib-0.1.0-py3-none-any.whl +0 -0
  72. package/wheels/streamlit-1.45.1-cp312-none-any.whl +0 -0
  73. package/build/assets/worker-Cy9Gj5BL.js +0 -113
@@ -1,5 +1,5 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/data-grid-overlay-editor-CltKX1-_.js","assets/index-Cbvbjd8C.js","assets/index.Bqb_jNud.css","assets/FormClearHelper-CT0Jwp4X.js","assets/withFullScreenWrapper-D8NJOCKn.js","assets/Toolbar-DlGOP7h4.js","assets/checkbox-CGvNPQQ1.js","assets/mergeWith-Bt-C9xRx.js","assets/sprintf-D7DtBTRn.js","assets/createDownloadLinkElement-DZMwyjvU.js","assets/slicedToArray-CEuyIGI5.js","assets/inherits-BaopKHev.js","assets/createSuper-B8yCxQGq.js","assets/FileDownload.esm-CbXaPbiH.js","assets/number-overlay-editor-Dm8-09pg.js","assets/es6-Ca0BcWDW.js"])))=>i.map(i=>d[i]);
2
- import{r as p,E as gs,_ as Ke,d as Ay,g as vo,R as te,i as ms,e as pi,f as Fy,h as _y,m as Ny,n as Ph,o as Hh,p as By,q as Ah,s as Vy,t as $y,v as Wy,w as jy,x as Uy,y as Yy,a as so,z as vs,c as Sr,A as Jo,j as Oe,B as xl,C as Cl,T as Fh,D as kl,F as bo,G as Vn,H as _h,I as Sl,J as Xy,K as Gy,L as Ve,M as Nh,N as mt,O as gi,Q as Qo,S as bs,U as Ky,V as qy,W as Zy,X as Bh,Y as Jy,Z as Vh,$ as Qy,a0 as ex,a1 as ws,a2 as $h,a3 as Wh,a4 as tx,a5 as nx,a6 as ox,a7 as rx,a8 as ix,a9 as lx,aa as ax,ab as sx,ac as cx,ad as jh,ae as ux,af as dx,ag as hx,ah as fx,ai as px,aj as gx,ak as mx,al as vx,am as bx,an as wx,ao as yx,ap as xx,aq as Cx,ar as En,l as ys,as as mi,at as wo,au as kx,av as Sx,aw as Mx,ax as Rx,ay as Ex,az as Ix,aA as Ml,aB as vi,aC as Ut,aD as Tx,aE as Ox,aF as Dx,aG as zx,aH as er,aI as It,aJ as xn,aK as Uh,aL as Yh,aM as Rl,aN as Lx,aO as Xh,aP as Gh,aQ as Px,aR as xs,aS as Hx,aT as Ax,aU as Kh,aV as Fx,aW as qh,aX as _x,aY as Zh,aZ as Nx,a_ as Bx,a$ as Vx,b as Jh,b0 as Cs,b1 as $x,b2 as Wx,b3 as ks,b4 as jx,b5 as Ux,b6 as Yx,b7 as Xx,b8 as Gx,__tla as Kx}from"./index-Cbvbjd8C.js";import{u as qx}from"./FormClearHelper-CT0Jwp4X.js";import{w as Zx,E as Jx}from"./withFullScreenWrapper-D8NJOCKn.js";import{T as Qx,a as Mr}from"./Toolbar-DlGOP7h4.js";import{S as eC,L as tC,a as nC}from"./checkbox-CGvNPQQ1.js";import{m as oC}from"./mergeWith-Bt-C9xRx.js";import{s as rC}from"./sprintf-D7DtBTRn.js";import{c as iC}from"./createDownloadLinkElement-DZMwyjvU.js";import{_ as yo,C as lC}from"./slicedToArray-CEuyIGI5.js";import{_ as aC,a as sC,b as cC}from"./inherits-BaopKHev.js";import{_ as uC}from"./createSuper-B8yCxQGq.js";import{D as dC,F as hC}from"./FileDownload.esm-CbXaPbiH.js";let Ss,El,Po,Ms,Qh,Ho,Rs,cn,fC=Promise.all([(()=>{try{return Kx}catch{}})()]).then(async()=>{var ef=Object.defineProperty,tf=(e,t,n)=>t in e?ef(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ht=(e,t,n)=>tf(e,typeof t!="symbol"?t+"":t,n),Es=p.forwardRef(function(e,t){var n={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return p.createElement(gs,Ke({iconAttrs:n,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:t}),p.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),p.createElement("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"}))});Es.displayName="Add";var Is=p.forwardRef(function(e,t){var n={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return p.createElement(gs,Ke({iconAttrs:n,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:t}),p.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),p.createElement("path",{d:"M15.5 14h-.79l-.28-.27A6.471 6.471 0 0016 9.5 6.5 6.5 0 109.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"}))});Is.displayName="Search";var Ts=p.forwardRef(function(e,t){var n={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return p.createElement(gs,Ke({iconAttrs:n,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:t}),p.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),p.createElement("path",{d:"M12 6a9.77 9.77 0 018.82 5.5C19.17 14.87 15.79 17 12 17s-7.17-2.13-8.82-5.5A9.77 9.77 0 0112 6m0-2C7 4 2.73 7.11 1 11.5 2.73 15.89 7 19 12 19s9.27-3.11 11-7.5C21.27 7.11 17 4 12 4zm0 5a2.5 2.5 0 010 5 2.5 2.5 0 010-5m0-2c-2.48 0-4.5 2.02-4.5 4.5S9.52 16 12 16s4.5-2.02 4.5-4.5S14.48 7 12 7z"}))});Ts.displayName="Visibility";function Os(e="This should not happen"){throw new Error(e)}function zn(e,t="Assertion failed"){if(!e)return Os(t)}function Rr(e,t){return Os(t??"Hell froze over")}function nf(e,t){try{return e()}catch{return t}}const Ds=Object.prototype.hasOwnProperty;function tr(e,t){let n,o;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((o=e.length)===t.length)for(;o--&&tr(e[o],t[o]););return o===-1}if(!n||typeof e=="object"){o=0;for(n in e)if(Ds.call(e,n)&&++o&&!Ds.call(t,n)||!(n in t)||!tr(e[n],t[n]))return!1;return Object.keys(t).length===o}}return e!==e&&t!==t}var Tl,zs;function of(){if(zs)return Tl;zs=1;var e=Object.prototype,t=e.hasOwnProperty;function n(o,r){return o!=null&&t.call(o,r)}return Tl=n,Tl}var Ol,Ls;function rf(){if(Ls)return Ol;Ls=1;var e=of(),t=Ay();function n(o,r){return o!=null&&t(o,r,e)}return Ol=n,Ol}var lf=rf();const af=vo(lf),bi=null,Dl=void 0;var Z;(function(e){e.Uri="uri",e.Text="text",e.Image="image",e.RowID="row-id",e.Number="number",e.Bubble="bubble",e.Boolean="boolean",e.Loading="loading",e.Markdown="markdown",e.Drilldown="drilldown",e.Protected="protected",e.Custom="custom"})(Z||(Z={}));var Ps;(function(e){e.HeaderRowID="headerRowID",e.HeaderCode="headerCode",e.HeaderNumber="headerNumber",e.HeaderString="headerString",e.HeaderBoolean="headerBoolean",e.HeaderAudioUri="headerAudioUri",e.HeaderVideoUri="headerVideoUri",e.HeaderEmoji="headerEmoji",e.HeaderImage="headerImage",e.HeaderUri="headerUri",e.HeaderPhone="headerPhone",e.HeaderMarkdown="headerMarkdown",e.HeaderDate="headerDate",e.HeaderTime="headerTime",e.HeaderEmail="headerEmail",e.HeaderReference="headerReference",e.HeaderIfThenElse="headerIfThenElse",e.HeaderSingleValue="headerSingleValue",e.HeaderLookup="headerLookup",e.HeaderTextTemplate="headerTextTemplate",e.HeaderMath="headerMath",e.HeaderRollup="headerRollup",e.HeaderJoinStrings="headerJoinStrings",e.HeaderSplitString="headerSplitString",e.HeaderGeoDistance="headerGeoDistance",e.HeaderArray="headerArray",e.RowOwnerOverlay="rowOwnerOverlay",e.ProtectedColumnOverlay="protectedColumnOverlay"})(Ps||(Ps={}));var wi;(function(e){e.Triangle="triangle",e.Dots="dots"})(wi||(wi={}));function yi(e){return"width"in e&&typeof e.width=="number"}async function Hs(e){return typeof e=="object"?e:await e()}Ho=function(e){return!(e.kind===Z.Loading||e.kind===Z.Bubble||e.kind===Z.RowID||e.kind===Z.Protected||e.kind===Z.Drilldown)},Po=function(e){return e.kind===Fn.Marker||e.kind===Fn.NewRow};function Er(e){if(!Ho(e)||e.kind===Z.Image)return!1;if(e.kind===Z.Text||e.kind===Z.Number||e.kind===Z.Markdown||e.kind===Z.Uri||e.kind===Z.Custom||e.kind===Z.Boolean)return e.readonly!==!0;Rr(e,"A cell was passed with an invalid kind")}Ms=function(e){return af(e,"editor")};function zl(e){return!(e.readonly??!1)}var Fn;(function(e){e.NewRow="new-row",e.Marker="marker"})(Fn||(Fn={}));function sf(e){if(e.length===0)return[];const t=[...e],n=[];t.sort(function(o,r){return o[0]-r[0]}),n.push([...t[0]]);for(const o of t.slice(1)){const r=n[n.length-1];r[1]<o[0]?n.push([...o]):r[1]<o[1]&&(r[1]=o[1])}return n}let As;const Ir=class Il{constructor(t){ht(this,"items"),this.items=t}offset(t){if(t===0)return this;const n=this.items.map(o=>[o[0]+t,o[1]+t]);return new Il(n)}add(t){const n=typeof t=="number"?[t,t+1]:t,o=sf([...this.items,n]);return new Il(o)}remove(t){const n=[...this.items],o=typeof t=="number"?t:t[0],r=typeof t=="number"?t+1:t[1];for(const[i,l]of n.entries()){const[s,a]=l;if(s<=r&&o<=a){const c=[];s<o&&c.push([s,o]),r<a&&c.push([r,a]),n.splice(i,1,...c)}}return new Il(n)}first(){if(this.items.length!==0)return this.items[0][0]}last(){if(this.items.length!==0)return this.items.slice(-1)[0][1]-1}hasIndex(t){for(let n=0;n<this.items.length;n++){const[o,r]=this.items[n];if(t>=o&&t<r)return!0}return!1}hasAll(t){for(let n=t[0];n<t[1];n++)if(!this.hasIndex(n))return!1;return!0}some(t){for(const n of this)if(t(n))return!0;return!1}equals(t){if(t===this)return!0;if(t.items.length!==this.items.length)return!1;for(let n=0;n<this.items.length;n++){const o=t.items[n],r=this.items[n];if(o[0]!==r[0]||o[1]!==r[1])return!1}return!0}toArray(){const t=[];for(const[n,o]of this.items)for(let r=n;r<o;r++)t.push(r);return t}get length(){let t=0;for(const[n,o]of this.items)t+=o-n;return t}*[Symbol.iterator](){for(const[t,n]of this.items)for(let o=t;o<n;o++)yield o}};ht(Ir,"empty",()=>As??(As=new Ir([]))),ht(Ir,"fromSingleSelection",e=>Ir.empty().add(e));let vt=Ir;var cf=function(){const e=Array.prototype.slice.call(arguments).filter(Boolean),t={},n=[];e.forEach(r=>{(r?r.split(" "):[]).forEach(i=>{if(i.startsWith("atm_")){const[,l]=i.split("_");t[l]=i}else n.push(i)})});const o=[];for(const r in t)Object.prototype.hasOwnProperty.call(t,r)&&o.push(t[r]);return o.push(...n),o.join(" ")},Fs=cf,uf=e=>e.toUpperCase()===e,df=e=>t=>e.indexOf(t)===-1,_s=(e,t)=>{const n={};return Object.keys(e).filter(df(t)).forEach(o=>{n[o]=e[o]}),n};function hf(e,t,n){const o=_s(t,n);if(!e){const r=typeof ms=="function"?{default:ms}:ms;Object.keys(o).forEach(i=>{r.default(i)||delete o[i]})}return o}var ff=(e,t)=>{};function pf(e){let t="";return n=>{const o=(i,l)=>{const{as:s=e,class:a=t}=i,c=n.propsAsIs===void 0?!(typeof s=="string"&&s.indexOf("-")===-1&&!uf(s[0])):n.propsAsIs,u=hf(c,i,["as","class"]);u.ref=l,u.className=n.atomic?Fs(n.class,u.className||a):Fs(u.className||a,n.class);const{vars:d}=n;if(d){const f={};for(const m in d){const b=d[m],y=b[0],v=b[1]||"",I=typeof y=="function"?y(i):y;ff(I,n.name),f[`--${m}`]=`${I}${v}`}const h=u.style||{},g=Object.keys(h);g.length>0&&g.forEach(m=>{f[m]=h[m]}),u.style=f}return e.__linaria&&e!==s?(u.as=s,te.createElement(e,u)):te.createElement(s,u)},r=te.forwardRef?te.forwardRef(o):i=>{const l=_s(i,["innerRef"]);return o(l,i.innerRef)};return r.displayName=n.name,r.__linaria={className:n.class||t,extends:e},r}}cn=pf;const gf=cn("div")({name:"ImageOverlayEditorStyle",class:"gdg-i2iowwq",propsAsIs:!1});var Ns={},Tr={},Ll={},Pl={},Bs;function mf(){return Bs||(Bs=1,function(e){(function(t,n){n(e,pi(),Fy())})(Pl,function(t,n,o){Object.defineProperty(t,"__esModule",{value:!0}),t.setHasSupportToCaptureOption=g;var r=l(n),i=l(o);function l(v){return v&&v.__esModule?v:{default:v}}var s=Object.assign||function(v){for(var I=1;I<arguments.length;I++){var T=arguments[I];for(var k in T)Object.prototype.hasOwnProperty.call(T,k)&&(v[k]=T[k])}return v};function a(v,I){var T={};for(var k in v)I.indexOf(k)>=0||Object.prototype.hasOwnProperty.call(v,k)&&(T[k]=v[k]);return T}function c(v,I){if(!(v instanceof I))throw new TypeError("Cannot call a class as a function")}var u=function(){function v(I,T){for(var k=0;k<T.length;k++){var x=T[k];x.enumerable=x.enumerable||!1,x.configurable=!0,"value"in x&&(x.writable=!0),Object.defineProperty(I,x.key,x)}}return function(I,T,k){return T&&v(I.prototype,T),k&&v(I,k),I}}();function d(v,I){if(!v)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return I&&(typeof I=="object"||typeof I=="function")?I:v}function f(v,I){if(typeof I!="function"&&I!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof I);v.prototype=Object.create(I&&I.prototype,{constructor:{value:v,enumerable:!1,writable:!0,configurable:!0}}),I&&(Object.setPrototypeOf?Object.setPrototypeOf(v,I):v.__proto__=I)}var h=!1;function g(v){h=v}try{addEventListener("test",null,Object.defineProperty({},"capture",{get:function(){g(!0)}}))}catch{}function m(){var v=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{capture:!0};return h?v:v.capture}function b(v){if("touches"in v){var I=v.touches[0],T=I.pageX,k=I.pageY;return{x:T,y:k}}var x=v.screenX,L=v.screenY;return{x,y:L}}var y=function(v){f(I,v);function I(){var T;c(this,I);for(var k=arguments.length,x=Array(k),L=0;L<k;L++)x[L]=arguments[L];var O=d(this,(T=I.__proto__||Object.getPrototypeOf(I)).call.apply(T,[this].concat(x)));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 u(I,[{key:"componentDidMount",value:function(){this.swiper&&this.swiper.addEventListener("touchmove",this._handleSwipeMove,m({capture:!0,passive:!1}))}},{key:"componentWillUnmount",value:function(){this.swiper&&this.swiper.removeEventListener("touchmove",this._handleSwipeMove,m({capture:!0,passive:!1}))}},{key:"_onMouseDown",value:function(T){this.props.allowMouseEvents&&(this.mouseDown=!0,document.addEventListener("mouseup",this._onMouseUp),document.addEventListener("mousemove",this._onMouseMove),this._handleSwipeStart(T))}},{key:"_onMouseMove",value:function(T){this.mouseDown&&this._handleSwipeMove(T)}},{key:"_onMouseUp",value:function(T){this.mouseDown=!1,document.removeEventListener("mouseup",this._onMouseUp),document.removeEventListener("mousemove",this._onMouseMove),this._handleSwipeEnd(T)}},{key:"_handleSwipeStart",value:function(T){var k=b(T),x=k.x,L=k.y;this.moveStart={x,y:L},this.props.onSwipeStart(T)}},{key:"_handleSwipeMove",value:function(T){if(this.moveStart){var k=b(T),x=k.x,L=k.y,O=x-this.moveStart.x,R=L-this.moveStart.y;this.moving=!0;var P=this.props.onSwipeMove({x:O,y:R},T);P&&T.cancelable&&T.preventDefault(),this.movePosition={deltaX:O,deltaY:R}}}},{key:"_handleSwipeEnd",value:function(T){this.props.onSwipeEnd(T);var k=this.props.tolerance;this.moving&&this.movePosition&&(this.movePosition.deltaX<-k?this.props.onSwipeLeft(1,T):this.movePosition.deltaX>k&&this.props.onSwipeRight(1,T),this.movePosition.deltaY<-k?this.props.onSwipeUp(1,T):this.movePosition.deltaY>k&&this.props.onSwipeDown(1,T)),this.moveStart=null,this.moving=!1,this.movePosition=null}},{key:"_setSwiperRef",value:function(T){this.swiper=T,this.props.innerRef(T)}},{key:"render",value:function(){var T=this.props;T.tagName;var k=T.className,x=T.style,L=T.children;T.allowMouseEvents,T.onSwipeUp,T.onSwipeDown,T.onSwipeLeft,T.onSwipeRight,T.onSwipeStart,T.onSwipeMove,T.onSwipeEnd,T.innerRef,T.tolerance;var O=a(T,["tagName","className","style","children","allowMouseEvents","onSwipeUp","onSwipeDown","onSwipeLeft","onSwipeRight","onSwipeStart","onSwipeMove","onSwipeEnd","innerRef","tolerance"]);return r.default.createElement(this.props.tagName,s({ref:this._setSwiperRef,onMouseDown:this._onMouseDown,onTouchStart:this._handleSwipeStart,onTouchEnd:this._handleSwipeEnd,className:k,style:x},O),L)}}]),I}(n.Component);y.displayName="ReactSwipe",y.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},y.defaultProps={tagName:"div",allowMouseEvents:!1,onSwipeUp:function(){},onSwipeDown:function(){},onSwipeLeft:function(){},onSwipeRight:function(){},onSwipeStart:function(){},onSwipeMove:function(){},onSwipeEnd:function(){},innerRef:function(){},tolerance:0},t.default=y})}(Pl)),Pl}var Vs;function $s(){return Vs||(Vs=1,function(e){(function(t,n){n(e,mf())})(Ll,function(t,n){Object.defineProperty(t,"__esModule",{value:!0});var o=r(n);function r(i){return i&&i.__esModule?i:{default:i}}t.default=o.default})}(Ll)),Ll}var Or={},Ws;function js(){if(Ws)return Or;Ws=1,Object.defineProperty(Or,"__esModule",{value:!0}),Or.default=void 0;var e=t(_y());function t(r){return r&&r.__esModule?r:{default:r}}function n(r,i,l){return i in r?Object.defineProperty(r,i,{value:l,enumerable:!0,configurable:!0,writable:!0}):r[i]=l,r}var o={ROOT:function(r){return(0,e.default)(n({"carousel-root":!0},r||"",!!r))},CAROUSEL:function(r){return(0,e.default)({carousel:!0,"carousel-slider":r})},WRAPPER:function(r,i){return(0,e.default)({"thumbs-wrapper":!r,"slider-wrapper":r,"axis-horizontal":i==="horizontal","axis-vertical":i!=="horizontal"})},SLIDER:function(r,i){return(0,e.default)({thumbs:!r,slider:r,animated:!i})},ITEM:function(r,i,l){return(0,e.default)({thumb:!r,slide:r,selected:i,previous:l})},ARROW_PREV:function(r){return(0,e.default)({"control-arrow control-prev":!0,"control-disabled":r})},ARROW_NEXT:function(r){return(0,e.default)({"control-arrow control-next":!0,"control-disabled":r})},DOT:function(r){return(0,e.default)({dot:!0,selected:r})}};return Or.default=o,Or}var Dr={},zr={},Us;function vf(){if(Us)return zr;Us=1,Object.defineProperty(zr,"__esModule",{value:!0}),zr.outerWidth=void 0;var e=function(t){var n=t.offsetWidth,o=getComputedStyle(t);return n+=parseInt(o.marginLeft)+parseInt(o.marginRight),n};return zr.outerWidth=e,zr}var Lr={},Ys;function Hl(){if(Ys)return Lr;Ys=1,Object.defineProperty(Lr,"__esModule",{value:!0}),Lr.default=void 0;var e=function(t,n,o){var r=t===0?t:t+n,i=o==="horizontal"?[r,0,0]:[0,r,0],l="translate3d",s="("+i.join(",")+")";return l+s};return Lr.default=e,Lr}var Pr={},Xs;function Gs(){if(Xs)return Pr;Xs=1,Object.defineProperty(Pr,"__esModule",{value:!0}),Pr.default=void 0;var e=function(){return window};return Pr.default=e,Pr}var Ks;function qs(){if(Ks)return Dr;Ks=1,Object.defineProperty(Dr,"__esModule",{value:!0}),Dr.default=void 0;var e=a(pi()),t=l(js()),n=vf(),o=l(Hl()),r=l($s()),i=l(Gs());function l(O){return O&&O.__esModule?O:{default:O}}function s(){if(typeof WeakMap!="function")return null;var O=new WeakMap;return s=function(){return O},O}function a(O){if(O&&O.__esModule)return O;if(O===null||c(O)!=="object"&&typeof O!="function")return{default:O};var R=s();if(R&&R.has(O))return R.get(O);var P={},M=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var S in O)if(Object.prototype.hasOwnProperty.call(O,S)){var E=M?Object.getOwnPropertyDescriptor(O,S):null;E&&(E.get||E.set)?Object.defineProperty(P,S,E):P[S]=O[S]}return P.default=O,R&&R.set(O,P),P}function c(O){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?c=function(R){return typeof R}:c=function(R){return R&&typeof Symbol=="function"&&R.constructor===Symbol&&R!==Symbol.prototype?"symbol":typeof R},c(O)}function u(){return u=Object.assign||function(O){for(var R=1;R<arguments.length;R++){var P=arguments[R];for(var M in P)Object.prototype.hasOwnProperty.call(P,M)&&(O[M]=P[M])}return O},u.apply(this,arguments)}function d(O,R){if(!(O instanceof R))throw new TypeError("Cannot call a class as a function")}function f(O,R){for(var P=0;P<R.length;P++){var M=R[P];M.enumerable=M.enumerable||!1,M.configurable=!0,"value"in M&&(M.writable=!0),Object.defineProperty(O,M.key,M)}}function h(O,R,P){return R&&f(O.prototype,R),O}function g(O,R){if(typeof R!="function"&&R!==null)throw new TypeError("Super expression must either be null or a function");O.prototype=Object.create(R&&R.prototype,{constructor:{value:O,writable:!0,configurable:!0}}),R&&m(O,R)}function m(O,R){return m=Object.setPrototypeOf||function(P,M){return P.__proto__=M,P},m(O,R)}function b(O){var R=I();return function(){var P=T(O),M;if(R){var S=T(this).constructor;M=Reflect.construct(P,arguments,S)}else M=P.apply(this,arguments);return y(this,M)}}function y(O,R){return R&&(c(R)==="object"||typeof R=="function")?R:v(O)}function v(O){if(O===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return O}function I(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function T(O){return T=Object.setPrototypeOf?Object.getPrototypeOf:function(R){return R.__proto__||Object.getPrototypeOf(R)},T(O)}function k(O,R,P){return R in O?Object.defineProperty(O,R,{value:P,enumerable:!0,configurable:!0,writable:!0}):O[R]=P,O}var x=function(O){return O.hasOwnProperty("key")},L=function(O){g(P,O);var R=b(P);function P(M){var S;return d(this,P),S=R.call(this,M),k(v(S),"itemsWrapperRef",void 0),k(v(S),"itemsListRef",void 0),k(v(S),"thumbsRef",void 0),k(v(S),"setItemsWrapperRef",function(E){S.itemsWrapperRef=E}),k(v(S),"setItemsListRef",function(E){S.itemsListRef=E}),k(v(S),"setThumbsRef",function(E,D){S.thumbsRef||(S.thumbsRef=[]),S.thumbsRef[D]=E}),k(v(S),"updateSizes",function(){if(!(!S.props.children||!S.itemsWrapperRef||!S.thumbsRef)){var E=e.Children.count(S.props.children),D=S.itemsWrapperRef.clientWidth,C=S.props.thumbWidth?S.props.thumbWidth:(0,n.outerWidth)(S.thumbsRef[0]),X=Math.floor(D/C),B=X<E,J=B?E-X:0;S.setState(function(ae,ne){return{itemSize:C,visibleItems:X,firstItem:B?S.getFirstItem(ne.selectedItem):0,lastPosition:J,showArrows:B}})}}),k(v(S),"handleClickItem",function(E,D,C){if(!x(C)||C.key==="Enter"){var X=S.props.onSelectItem;typeof X=="function"&&X(E,D)}}),k(v(S),"onSwipeStart",function(){S.setState({swiping:!0})}),k(v(S),"onSwipeEnd",function(){S.setState({swiping:!1})}),k(v(S),"onSwipeMove",function(E){var D=E.x;if(!S.state.itemSize||!S.itemsWrapperRef||!S.state.visibleItems)return!1;var C=0,X=e.Children.count(S.props.children),B=-(S.state.firstItem*100)/S.state.visibleItems,J=Math.max(X-S.state.visibleItems,0),ae=-J*100/S.state.visibleItems;B===C&&D>0&&(D=0),B===ae&&D<0&&(D=0);var ne=S.itemsWrapperRef.clientWidth,U=B+100/(ne/D);return S.itemsListRef&&["WebkitTransform","MozTransform","MsTransform","OTransform","transform","msTransform"].forEach(function(re){S.itemsListRef.style[re]=(0,o.default)(U,"%",S.props.axis)}),!0}),k(v(S),"slideRight",function(E){S.moveTo(S.state.firstItem-(typeof E=="number"?E:1))}),k(v(S),"slideLeft",function(E){S.moveTo(S.state.firstItem+(typeof E=="number"?E:1))}),k(v(S),"moveTo",function(E){E=E<0?0:E,E=E>=S.state.lastPosition?S.state.lastPosition:E,S.setState({firstItem:E})}),S.state={selectedItem:M.selectedItem,swiping:!1,showArrows:!1,firstItem:0,visibleItems:0,lastPosition:0},S}return h(P,[{key:"componentDidMount",value:function(){this.setupThumbs()}},{key:"componentDidUpdate",value:function(M){this.props.selectedItem!==this.state.selectedItem&&this.setState({selectedItem:this.props.selectedItem,firstItem:this.getFirstItem(this.props.selectedItem)}),this.props.children!==M.children&&this.updateSizes()}},{key:"componentWillUnmount",value:function(){this.destroyThumbs()}},{key:"setupThumbs",value:function(){(0,i.default)().addEventListener("resize",this.updateSizes),(0,i.default)().addEventListener("DOMContentLoaded",this.updateSizes),this.updateSizes()}},{key:"destroyThumbs",value:function(){(0,i.default)().removeEventListener("resize",this.updateSizes),(0,i.default)().removeEventListener("DOMContentLoaded",this.updateSizes)}},{key:"getFirstItem",value:function(M){var S=M;return M>=this.state.lastPosition&&(S=this.state.lastPosition),M<this.state.firstItem+this.state.visibleItems&&(S=this.state.firstItem),M<this.state.firstItem&&(S=M),S}},{key:"renderItems",value:function(){var M=this;return this.props.children.map(function(S,E){var D=t.default.ITEM(!1,E===M.state.selectedItem),C={key:E,ref:function(X){return M.setThumbsRef(X,E)},className:D,onClick:M.handleClickItem.bind(M,E,M.props.children[E]),onKeyDown:M.handleClickItem.bind(M,E,M.props.children[E]),"aria-label":"".concat(M.props.labels.item," ").concat(E+1),style:{width:M.props.thumbWidth}};return e.default.createElement("li",u({},C,{role:"button",tabIndex:0}),S)})}},{key:"render",value:function(){var M=this;if(!this.props.children)return null;var S=e.Children.count(this.props.children)>1,E=this.state.showArrows&&this.state.firstItem>0,D=this.state.showArrows&&this.state.firstItem<this.state.lastPosition,C={},X=-this.state.firstItem*(this.state.itemSize||0),B=(0,o.default)(X,"px",this.props.axis),J=this.props.transitionTime+"ms";return C={WebkitTransform:B,MozTransform:B,MsTransform:B,OTransform:B,transform:B,msTransform:B,WebkitTransitionDuration:J,MozTransitionDuration:J,MsTransitionDuration:J,OTransitionDuration:J,transitionDuration:J,msTransitionDuration:J},e.default.createElement("div",{className:t.default.CAROUSEL(!1)},e.default.createElement("div",{className:t.default.WRAPPER(!1),ref:this.setItemsWrapperRef},e.default.createElement("button",{type:"button",className:t.default.ARROW_PREV(!E),onClick:function(){return M.slideRight()},"aria-label":this.props.labels.leftArrow}),S?e.default.createElement(r.default,{tagName:"ul",className:t.default.SLIDER(!1,this.state.swiping),onSwipeLeft:this.slideLeft,onSwipeRight:this.slideRight,onSwipeMove:this.onSwipeMove,onSwipeStart:this.onSwipeStart,onSwipeEnd:this.onSwipeEnd,style:C,innerRef:this.setItemsListRef,allowMouseEvents:this.props.emulateTouch},this.renderItems()):e.default.createElement("ul",{className:t.default.SLIDER(!1,this.state.swiping),ref:function(ae){return M.setItemsListRef(ae)},style:C},this.renderItems()),e.default.createElement("button",{type:"button",className:t.default.ARROW_NEXT(!D),onClick:function(){return M.slideLeft()},"aria-label":this.props.labels.rightArrow})))}}]),P}(e.Component);return Dr.default=L,k(L,"displayName","Thumbs"),k(L,"defaultProps",{axis:"horizontal",labels:{leftArrow:"previous slide / item",rightArrow:"next slide / item",item:"slide item"},selectedItem:0,thumbWidth:80,transitionTime:350}),Dr}var Hr={},Zs;function bf(){if(Zs)return Hr;Zs=1,Object.defineProperty(Hr,"__esModule",{value:!0}),Hr.default=void 0;var e=function(){return document};return Hr.default=e,Hr}var Ln={},Js;function Qs(){if(Js)return Ln;Js=1,Object.defineProperty(Ln,"__esModule",{value:!0}),Ln.setPosition=Ln.getPosition=Ln.isKeyboardEvent=Ln.defaultStatusFormatter=Ln.noop=void 0;var e=pi(),t=n(Hl());function n(a){return a&&a.__esModule?a:{default:a}}var o=function(){};Ln.noop=o;var r=function(a,c){return"".concat(a," of ").concat(c)};Ln.defaultStatusFormatter=r;var i=function(a){return a?a.hasOwnProperty("key"):!1};Ln.isKeyboardEvent=i;var l=function(a,c){if(c.infiniteLoop&&++a,a===0)return 0;var u=e.Children.count(c.children);if(c.centerMode&&c.axis==="horizontal"){var d=-a*c.centerSlidePercentage,f=u-1;return a&&(a!==f||c.infiniteLoop)?d+=(100-c.centerSlidePercentage)/2:a===f&&(d+=100-c.centerSlidePercentage),d}return-a*100};Ln.getPosition=l;var s=function(a,c){var u={};return["WebkitTransform","MozTransform","MsTransform","OTransform","transform","msTransform"].forEach(function(d){u[d]=(0,t.default)(a,"%",c)}),u};return Ln.setPosition=s,Ln}var $n={},ec;function wf(){if(ec)return $n;ec=1,Object.defineProperty($n,"__esModule",{value:!0}),$n.fadeAnimationHandler=$n.slideStopSwipingHandler=$n.slideSwipeAnimationHandler=$n.slideAnimationHandler=void 0;var e=pi(),t=o(Hl()),n=Qs();function o(d){return d&&d.__esModule?d:{default:d}}function r(d,f){var h=Object.keys(d);if(Object.getOwnPropertySymbols){var g=Object.getOwnPropertySymbols(d);f&&(g=g.filter(function(m){return Object.getOwnPropertyDescriptor(d,m).enumerable})),h.push.apply(h,g)}return h}function i(d){for(var f=1;f<arguments.length;f++){var h=arguments[f]!=null?arguments[f]:{};f%2?r(Object(h),!0).forEach(function(g){l(d,g,h[g])}):Object.getOwnPropertyDescriptors?Object.defineProperties(d,Object.getOwnPropertyDescriptors(h)):r(Object(h)).forEach(function(g){Object.defineProperty(d,g,Object.getOwnPropertyDescriptor(h,g))})}return d}function l(d,f,h){return f in d?Object.defineProperty(d,f,{value:h,enumerable:!0,configurable:!0,writable:!0}):d[f]=h,d}var s=function(d,f){var h={},g=f.selectedItem,m=g,b=e.Children.count(d.children)-1,y=d.infiniteLoop&&(g<0||g>b);if(y)return m<0?d.centerMode&&d.centerSlidePercentage&&d.axis==="horizontal"?h.itemListStyle=(0,n.setPosition)(-(b+2)*d.centerSlidePercentage-(100-d.centerSlidePercentage)/2,d.axis):h.itemListStyle=(0,n.setPosition)(-(b+2)*100,d.axis):m>b&&(h.itemListStyle=(0,n.setPosition)(0,d.axis)),h;var v=(0,n.getPosition)(g,d),I=(0,t.default)(v,"%",d.axis),T=d.transitionTime+"ms";return h.itemListStyle={WebkitTransform:I,msTransform:I,OTransform:I,transform:I},f.swiping||(h.itemListStyle=i(i({},h.itemListStyle),{},{WebkitTransitionDuration:T,MozTransitionDuration:T,OTransitionDuration:T,transitionDuration:T,msTransitionDuration:T})),h};$n.slideAnimationHandler=s;var a=function(d,f,h,g){var m={},b=f.axis==="horizontal",y=e.Children.count(f.children),v=0,I=(0,n.getPosition)(h.selectedItem,f),T=f.infiniteLoop?(0,n.getPosition)(y-1,f)-100:(0,n.getPosition)(y-1,f),k=b?d.x:d.y,x=k;I===v&&k>0&&(x=0),I===T&&k<0&&(x=0);var L=I+100/(h.itemSize/x),O=Math.abs(k)>f.swipeScrollTolerance;return f.infiniteLoop&&O&&(h.selectedItem===0&&L>-100?L-=y*100:h.selectedItem===y-1&&L<-y*100&&(L+=y*100)),(!f.preventMovementUntilSwipeScrollTolerance||O||h.swipeMovementStarted)&&(h.swipeMovementStarted||g({swipeMovementStarted:!0}),m.itemListStyle=(0,n.setPosition)(L,f.axis)),O&&!h.cancelClick&&g({cancelClick:!0}),m};$n.slideSwipeAnimationHandler=a;var c=function(d,f){var h=(0,n.getPosition)(f.selectedItem,d),g=(0,n.setPosition)(h,d.axis);return{itemListStyle:g}};$n.slideStopSwipingHandler=c;var u=function(d,f){var h=d.transitionTime+"ms",g="ease-in-out",m={position:"absolute",display:"block",zIndex:-2,minHeight:"100%",opacity:0,top:0,right:0,left:0,bottom:0,transitionTimingFunction:g,msTransitionTimingFunction:g,MozTransitionTimingFunction:g,WebkitTransitionTimingFunction:g,OTransitionTimingFunction:g};return f.swiping||(m=i(i({},m),{},{WebkitTransitionDuration:h,MozTransitionDuration:h,OTransitionDuration:h,transitionDuration:h,msTransitionDuration:h})),{slideStyle:m,selectedStyle:i(i({},m),{},{opacity:1,position:"relative"}),prevStyle:i({},m)}};return $n.fadeAnimationHandler=u,$n}var tc;function yf(){if(tc)return Tr;tc=1,Object.defineProperty(Tr,"__esModule",{value:!0}),Tr.default=void 0;var e=u(pi()),t=a($s()),n=a(js()),o=a(qs()),r=a(bf()),i=a(Gs()),l=Qs(),s=wf();function a(M){return M&&M.__esModule?M:{default:M}}function c(){if(typeof WeakMap!="function")return null;var M=new WeakMap;return c=function(){return M},M}function u(M){if(M&&M.__esModule)return M;if(M===null||d(M)!=="object"&&typeof M!="function")return{default:M};var S=c();if(S&&S.has(M))return S.get(M);var E={},D=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var C in M)if(Object.prototype.hasOwnProperty.call(M,C)){var X=D?Object.getOwnPropertyDescriptor(M,C):null;X&&(X.get||X.set)?Object.defineProperty(E,C,X):E[C]=M[C]}return E.default=M,S&&S.set(M,E),E}function d(M){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?d=function(S){return typeof S}:d=function(S){return S&&typeof Symbol=="function"&&S.constructor===Symbol&&S!==Symbol.prototype?"symbol":typeof S},d(M)}function f(){return f=Object.assign||function(M){for(var S=1;S<arguments.length;S++){var E=arguments[S];for(var D in E)Object.prototype.hasOwnProperty.call(E,D)&&(M[D]=E[D])}return M},f.apply(this,arguments)}function h(M,S){var E=Object.keys(M);if(Object.getOwnPropertySymbols){var D=Object.getOwnPropertySymbols(M);S&&(D=D.filter(function(C){return Object.getOwnPropertyDescriptor(M,C).enumerable})),E.push.apply(E,D)}return E}function g(M){for(var S=1;S<arguments.length;S++){var E=arguments[S]!=null?arguments[S]:{};S%2?h(Object(E),!0).forEach(function(D){R(M,D,E[D])}):Object.getOwnPropertyDescriptors?Object.defineProperties(M,Object.getOwnPropertyDescriptors(E)):h(Object(E)).forEach(function(D){Object.defineProperty(M,D,Object.getOwnPropertyDescriptor(E,D))})}return M}function m(M,S){if(!(M instanceof S))throw new TypeError("Cannot call a class as a function")}function b(M,S){for(var E=0;E<S.length;E++){var D=S[E];D.enumerable=D.enumerable||!1,D.configurable=!0,"value"in D&&(D.writable=!0),Object.defineProperty(M,D.key,D)}}function y(M,S,E){return S&&b(M.prototype,S),M}function v(M,S){if(typeof S!="function"&&S!==null)throw new TypeError("Super expression must either be null or a function");M.prototype=Object.create(S&&S.prototype,{constructor:{value:M,writable:!0,configurable:!0}}),S&&I(M,S)}function I(M,S){return I=Object.setPrototypeOf||function(E,D){return E.__proto__=D,E},I(M,S)}function T(M){var S=L();return function(){var E=O(M),D;if(S){var C=O(this).constructor;D=Reflect.construct(E,arguments,C)}else D=E.apply(this,arguments);return k(this,D)}}function k(M,S){return S&&(d(S)==="object"||typeof S=="function")?S:x(M)}function x(M){if(M===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return M}function L(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function O(M){return O=Object.setPrototypeOf?Object.getPrototypeOf:function(S){return S.__proto__||Object.getPrototypeOf(S)},O(M)}function R(M,S,E){return S in M?Object.defineProperty(M,S,{value:E,enumerable:!0,configurable:!0,writable:!0}):M[S]=E,M}var P=function(M){v(E,M);var S=T(E);function E(D){var C;m(this,E),C=S.call(this,D),R(x(C),"thumbsRef",void 0),R(x(C),"carouselWrapperRef",void 0),R(x(C),"listRef",void 0),R(x(C),"itemsRef",void 0),R(x(C),"timer",void 0),R(x(C),"animationHandler",void 0),R(x(C),"setThumbsRef",function(B){C.thumbsRef=B}),R(x(C),"setCarouselWrapperRef",function(B){C.carouselWrapperRef=B}),R(x(C),"setListRef",function(B){C.listRef=B}),R(x(C),"setItemsRef",function(B,J){C.itemsRef||(C.itemsRef=[]),C.itemsRef[J]=B}),R(x(C),"autoPlay",function(){e.Children.count(C.props.children)<=1||(C.clearAutoPlay(),C.props.autoPlay&&(C.timer=setTimeout(function(){C.increment()},C.props.interval)))}),R(x(C),"clearAutoPlay",function(){C.timer&&clearTimeout(C.timer)}),R(x(C),"resetAutoPlay",function(){C.clearAutoPlay(),C.autoPlay()}),R(x(C),"stopOnHover",function(){C.setState({isMouseEntered:!0},C.clearAutoPlay)}),R(x(C),"startOnLeave",function(){C.setState({isMouseEntered:!1},C.autoPlay)}),R(x(C),"isFocusWithinTheCarousel",function(){return C.carouselWrapperRef?!!((0,r.default)().activeElement===C.carouselWrapperRef||C.carouselWrapperRef.contains((0,r.default)().activeElement)):!1}),R(x(C),"navigateWithKeyboard",function(B){if(C.isFocusWithinTheCarousel()){var J=C.props.axis,ae=J==="horizontal",ne={ArrowUp:38,ArrowRight:39,ArrowDown:40,ArrowLeft:37},U=ae?ne.ArrowRight:ne.ArrowDown,re=ae?ne.ArrowLeft:ne.ArrowUp;U===B.keyCode?C.increment():re===B.keyCode&&C.decrement()}}),R(x(C),"updateSizes",function(){if(!(!C.state.initialized||!C.itemsRef||C.itemsRef.length===0)){var B=C.props.axis==="horizontal",J=C.itemsRef[0];if(J){var ae=B?J.clientWidth:J.clientHeight;C.setState({itemSize:ae}),C.thumbsRef&&C.thumbsRef.updateSizes()}}}),R(x(C),"setMountState",function(){C.setState({hasMount:!0}),C.updateSizes()}),R(x(C),"handleClickItem",function(B,J){if(e.Children.count(C.props.children)!==0){if(C.state.cancelClick){C.setState({cancelClick:!1});return}C.props.onClickItem(B,J),B!==C.state.selectedItem&&C.setState({selectedItem:B})}}),R(x(C),"handleOnChange",function(B,J){e.Children.count(C.props.children)<=1||C.props.onChange(B,J)}),R(x(C),"handleClickThumb",function(B,J){C.props.onClickThumb(B,J),C.moveTo(B)}),R(x(C),"onSwipeStart",function(B){C.setState({swiping:!0}),C.props.onSwipeStart(B)}),R(x(C),"onSwipeEnd",function(B){C.setState({swiping:!1,cancelClick:!1,swipeMovementStarted:!1}),C.props.onSwipeEnd(B),C.clearAutoPlay(),C.state.autoPlay&&C.autoPlay()}),R(x(C),"onSwipeMove",function(B,J){C.props.onSwipeMove(J);var ae=C.props.swipeAnimationHandler(B,C.props,C.state,C.setState.bind(x(C)));return C.setState(g({},ae)),!!Object.keys(ae).length}),R(x(C),"decrement",function(){var B=arguments.length>0&&arguments[0]!==void 0?arguments[0]:1;C.moveTo(C.state.selectedItem-(typeof B=="number"?B:1))}),R(x(C),"increment",function(){var B=arguments.length>0&&arguments[0]!==void 0?arguments[0]:1;C.moveTo(C.state.selectedItem+(typeof B=="number"?B:1))}),R(x(C),"moveTo",function(B){if(typeof B=="number"){var J=e.Children.count(C.props.children)-1;B<0&&(B=C.props.infiniteLoop?J:0),B>J&&(B=C.props.infiniteLoop?0:J),C.selectItem({selectedItem:B}),C.state.autoPlay&&C.state.isMouseEntered===!1&&C.resetAutoPlay()}}),R(x(C),"onClickNext",function(){C.increment(1)}),R(x(C),"onClickPrev",function(){C.decrement(1)}),R(x(C),"onSwipeForward",function(){C.increment(1),C.props.emulateTouch&&C.setState({cancelClick:!0})}),R(x(C),"onSwipeBackwards",function(){C.decrement(1),C.props.emulateTouch&&C.setState({cancelClick:!0})}),R(x(C),"changeItem",function(B){return function(J){(!(0,l.isKeyboardEvent)(J)||J.key==="Enter")&&C.moveTo(B)}}),R(x(C),"selectItem",function(B){C.setState(g({previousItem:C.state.selectedItem},B),function(){C.setState(C.animationHandler(C.props,C.state))}),C.handleOnChange(B.selectedItem,e.Children.toArray(C.props.children)[B.selectedItem])}),R(x(C),"getInitialImage",function(){var B=C.props.selectedItem,J=C.itemsRef&&C.itemsRef[B],ae=J&&J.getElementsByTagName("img")||[];return ae[0]}),R(x(C),"getVariableItemHeight",function(B){var J=C.itemsRef&&C.itemsRef[B];if(C.state.hasMount&&J&&J.children.length){var ae=J.children[0].getElementsByTagName("img")||[];if(ae.length>0){var ne=ae[0];if(!ne.complete){var U=function de(){C.forceUpdate(),ne.removeEventListener("load",de)};ne.addEventListener("load",U)}}var re=ae[0]||J.children[0],se=re.clientHeight;return se>0?se:null}return null});var X={initialized:!1,previousItem:D.selectedItem,selectedItem:D.selectedItem,hasMount:!1,isMouseEntered:!1,autoPlay:D.autoPlay,swiping:!1,swipeMovementStarted:!1,cancelClick:!1,itemSize:1,itemListStyle:{},slideStyle:{},selectedStyle:{},prevStyle:{}};return C.animationHandler=typeof D.animationHandler=="function"&&D.animationHandler||D.animationHandler==="fade"&&s.fadeAnimationHandler||s.slideAnimationHandler,C.state=g(g({},X),C.animationHandler(D,X)),C}return y(E,[{key:"componentDidMount",value:function(){this.props.children&&this.setupCarousel()}},{key:"componentDidUpdate",value:function(D,C){!D.children&&this.props.children&&!this.state.initialized&&this.setupCarousel(),!D.autoFocus&&this.props.autoFocus&&this.forceFocus(),C.swiping&&!this.state.swiping&&this.setState(g({},this.props.stopSwipingHandler(this.props,this.state))),(D.selectedItem!==this.props.selectedItem||D.centerMode!==this.props.centerMode)&&(this.updateSizes(),this.moveTo(this.props.selectedItem)),D.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 D=this;this.bindEvents(),this.state.autoPlay&&e.Children.count(this.props.children)>1&&this.setupAutoPlay(),this.props.autoFocus&&this.forceFocus(),this.setState({initialized:!0},function(){var C=D.getInitialImage();C&&!C.complete?C.addEventListener("load",D.setMountState):D.setMountState()})}},{key:"destroyCarousel",value:function(){this.state.initialized&&(this.unbindEvents(),this.destroyAutoPlay())}},{key:"setupAutoPlay",value:function(){this.autoPlay();var D=this.carouselWrapperRef;this.props.stopOnHover&&D&&(D.addEventListener("mouseenter",this.stopOnHover),D.addEventListener("mouseleave",this.startOnLeave))}},{key:"destroyAutoPlay",value:function(){this.clearAutoPlay();var D=this.carouselWrapperRef;this.props.stopOnHover&&D&&(D.removeEventListener("mouseenter",this.stopOnHover),D.removeEventListener("mouseleave",this.startOnLeave))}},{key:"bindEvents",value:function(){(0,i.default)().addEventListener("resize",this.updateSizes),(0,i.default)().addEventListener("DOMContentLoaded",this.updateSizes),this.props.useKeyboardArrows&&(0,r.default)().addEventListener("keydown",this.navigateWithKeyboard)}},{key:"unbindEvents",value:function(){(0,i.default)().removeEventListener("resize",this.updateSizes),(0,i.default)().removeEventListener("DOMContentLoaded",this.updateSizes);var D=this.getInitialImage();D&&D.removeEventListener("load",this.setMountState),this.props.useKeyboardArrows&&(0,r.default)().removeEventListener("keydown",this.navigateWithKeyboard)}},{key:"forceFocus",value:function(){var D;(D=this.carouselWrapperRef)===null||D===void 0||D.focus()}},{key:"renderItems",value:function(D){var C=this;return this.props.children?e.Children.map(this.props.children,function(X,B){var J=B===C.state.selectedItem,ae=B===C.state.previousItem,ne=J&&C.state.selectedStyle||ae&&C.state.prevStyle||C.state.slideStyle||{};C.props.centerMode&&C.props.axis==="horizontal"&&(ne=g(g({},ne),{},{minWidth:C.props.centerSlidePercentage+"%"})),C.state.swiping&&C.state.swipeMovementStarted&&(ne=g(g({},ne),{},{pointerEvents:"none"}));var U={ref:function(re){return C.setItemsRef(re,B)},key:"itemKey"+B+(D?"clone":""),className:n.default.ITEM(!0,B===C.state.selectedItem,B===C.state.previousItem),onClick:C.handleClickItem.bind(C,B,X),style:ne};return e.default.createElement("li",U,C.props.renderItem(X,{isSelected:B===C.state.selectedItem,isPrevious:B===C.state.previousItem}))}):[]}},{key:"renderControls",value:function(){var D=this,C=this.props,X=C.showIndicators,B=C.labels,J=C.renderIndicator,ae=C.children;return X?e.default.createElement("ul",{className:"control-dots"},e.Children.map(ae,function(ne,U){return J&&J(D.changeItem(U),U===D.state.selectedItem,U,B.item)})):null}},{key:"renderStatus",value:function(){return this.props.showStatus?e.default.createElement("p",{className:"carousel-status"},this.props.statusFormatter(this.state.selectedItem+1,e.Children.count(this.props.children))):null}},{key:"renderThumbs",value:function(){return!this.props.showThumbs||!this.props.children||e.Children.count(this.props.children)===0?null:e.default.createElement(o.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))}},{key:"render",value:function(){var D=this;if(!this.props.children||e.Children.count(this.props.children)===0)return null;var C=this.props.swipeable&&e.Children.count(this.props.children)>1,X=this.props.axis==="horizontal",B=this.props.showArrows&&e.Children.count(this.props.children)>1,J=B&&(this.state.selectedItem>0||this.props.infiniteLoop)||!1,ae=B&&(this.state.selectedItem<e.Children.count(this.props.children)-1||this.props.infiniteLoop)||!1,ne=this.renderItems(!0),U=ne.shift(),re=ne.pop(),se={className:n.default.SLIDER(!0,this.state.swiping),onSwipeMove:this.onSwipeMove,onSwipeStart:this.onSwipeStart,onSwipeEnd:this.onSwipeEnd,style:this.state.itemListStyle,tolerance:this.props.swipeScrollTolerance},de={};if(X){if(se.onSwipeLeft=this.onSwipeForward,se.onSwipeRight=this.onSwipeBackwards,this.props.dynamicHeight){var fe=this.getVariableItemHeight(this.state.selectedItem);de.height=fe||"auto"}}else se.onSwipeUp=this.props.verticalSwipe==="natural"?this.onSwipeBackwards:this.onSwipeForward,se.onSwipeDown=this.props.verticalSwipe==="natural"?this.onSwipeForward:this.onSwipeBackwards,se.style=g(g({},se.style),{},{height:this.state.itemSize}),de.height=this.state.itemSize;return e.default.createElement("div",{"aria-label":this.props.ariaLabel,className:n.default.ROOT(this.props.className),ref:this.setCarouselWrapperRef,tabIndex:this.props.useKeyboardArrows?0:void 0},e.default.createElement("div",{className:n.default.CAROUSEL(!0),style:{width:this.props.width}},this.renderControls(),this.props.renderArrowPrev(this.onClickPrev,J,this.props.labels.leftArrow),e.default.createElement("div",{className:n.default.WRAPPER(!0,this.props.axis),style:de},C?e.default.createElement(t.default,f({tagName:"ul",innerRef:this.setListRef},se,{allowMouseEvents:this.props.emulateTouch}),this.props.infiniteLoop&&re,this.renderItems(),this.props.infiniteLoop&&U):e.default.createElement("ul",{className:n.default.SLIDER(!0,this.state.swiping),ref:function(Q){return D.setListRef(Q)},style:this.state.itemListStyle||{}},this.props.infiniteLoop&&re,this.renderItems(),this.props.infiniteLoop&&U)),this.props.renderArrowNext(this.onClickNext,ae,this.props.labels.rightArrow),this.renderStatus()),this.renderThumbs())}}]),E}(e.default.Component);return Tr.default=P,R(P,"displayName","Carousel"),R(P,"defaultProps",{ariaLabel:void 0,axis:"horizontal",centerSlidePercentage:80,interval:3e3,labels:{leftArrow:"previous slide / item",rightArrow:"next slide / item",item:"slide item"},onClickItem:l.noop,onClickThumb:l.noop,onChange:l.noop,onSwipeStart:function(){},onSwipeEnd:function(){},onSwipeMove:function(){return!1},preventMovementUntilSwipeScrollTolerance:!1,renderArrowPrev:function(M,S,E){return e.default.createElement("button",{type:"button","aria-label":E,className:n.default.ARROW_PREV(!S),onClick:M})},renderArrowNext:function(M,S,E){return e.default.createElement("button",{type:"button","aria-label":E,className:n.default.ARROW_NEXT(!S),onClick:M})},renderIndicator:function(M,S,E,D){return e.default.createElement("li",{className:n.default.DOT(S),onClick:M,onKeyDown:M,value:E,key:E,role:"button",tabIndex:0,"aria-label":"".concat(D," ").concat(E+1)})},renderItem:function(M){return M},renderThumbs:function(M){var S=e.Children.map(M,function(E){var D=E;if(E.type!=="img"&&(D=e.Children.toArray(E.props.children).find(function(C){return C.type==="img"})),!!D)return D});return S.filter(function(E){return E}).length===0?(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"),[]):S},statusFormatter:l.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:s.slideSwipeAnimationHandler,stopSwipingHandler:s.slideStopSwipingHandler}),Tr}var xf={},nc;function Cf(){return nc||(nc=1),xf}var oc;function kf(){return oc||(oc=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"Carousel",{enumerable:!0,get:function(){return t.default}}),Object.defineProperty(e,"CarouselProps",{enumerable:!0,get:function(){return n.CarouselProps}}),Object.defineProperty(e,"Thumbs",{enumerable:!0,get:function(){return o.default}});var t=r(yf()),n=Cf(),o=r(qs());function r(i){return i&&i.__esModule?i:{default:i}}}(Ns)),Ns}var Sf=kf(),Al,rc;function Mf(){if(rc)return Al;rc=1;var e=Ny(),t=function(){return e.Date.now()};return Al=t,Al}var Fl,ic;function lc(){if(ic)return Fl;ic=1;var e=Ph(),t=Mf(),n=Hh(),o="Expected a function",r=Math.max,i=Math.min;function l(s,a,c){var u,d,f,h,g,m,b=0,y=!1,v=!1,I=!0;if(typeof s!="function")throw new TypeError(o);a=n(a)||0,e(c)&&(y=!!c.leading,v="maxWait"in c,f=v?r(n(c.maxWait)||0,a):f,I="trailing"in c?!!c.trailing:I);function T(E){var D=u,C=d;return u=d=void 0,b=E,h=s.apply(C,D),h}function k(E){return b=E,g=setTimeout(O,a),y?T(E):h}function x(E){var D=E-m,C=E-b,X=a-D;return v?i(X,f-C):X}function L(E){var D=E-m,C=E-b;return m===void 0||D>=a||D<0||v&&C>=f}function O(){var E=t();if(L(E))return R(E);g=setTimeout(O,x(E))}function R(E){return g=void 0,I&&u?T(E):(u=d=void 0,h)}function P(){g!==void 0&&clearTimeout(g),b=0,u=m=d=g=void 0}function M(){return g===void 0?h:R(t())}function S(){var E=t(),D=L(E);if(u=arguments,d=this,m=E,D){if(g===void 0)return k(m);if(v)return clearTimeout(g),g=setTimeout(O,a),T(m)}return g===void 0&&(g=setTimeout(O,a)),h}return S.cancel=P,S.flush=M,S}return Fl=l,Fl}var Rf=lc();const ac=vo(Rf);function pn(e,t,n,o,r=!1){const i=p.useRef();i.current=t,p.useEffect(()=>{if(n===null||n.addEventListener===void 0)return;const l=n,s=a=>{var c;(c=i.current)==null||c.call(l,a)};return l.addEventListener(e,s,{passive:o,capture:r}),()=>{l.removeEventListener(e,s,{capture:r})}},[e,n,o,r])}function Ao(e,t){return e===void 0?void 0:t}const Ef=Math.PI;function sc(e){return e*Ef/180}const cc=(e,t,n)=>({x1:e-n/2,y1:t-n/2,x2:e+n/2,y2:t+n/2}),uc=(e,t,n,o,r)=>{switch(e){case"left":return Math.floor(t)+o+r/2;case"center":return Math.floor(t+n/2);case"right":return Math.floor(t+n)-o-r/2}},dc=(e,t,n)=>Math.min(e,t-n*2),hc=(e,t,n)=>n.x1<=e&&e<=n.x2&&n.y1<=t&&t<=n.y2,_l=e=>{const t=e.fgColor??"currentColor";return p.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},p.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:t,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",fill:"none",vectorEffect:"non-scaling-stroke"}),p.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:t,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",fill:"none",vectorEffect:"non-scaling-stroke"}))},If=e=>{const t=e.fgColor??"currentColor";return p.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},p.createElement("path",{d:"M19 6L10.3802 17L5.34071 11.8758",vectorEffect:"non-scaling-stroke",stroke:t,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}))};function Tf(e,t,n){const[o,r]=p.useState(e),i=p.useRef(!0);p.useEffect(()=>()=>{i.current=!1},[]);const l=p.useRef(ac(s=>{i.current&&r(s)},n));return p.useLayoutEffect(()=>{i.current&&l.current(()=>e())},t),o}const Of="\u0591-\u07FF\uFB1D-\uFDFD\uFE70-\uFEFC",Df="A-Za-z\xC0-\xD6\xD8-\xF6\xF8-\u02B8\u0300-\u0590\u0800-\u1FFF\u200E\u2C00-\uFB1C\uFE00-\uFE6F\uFEFD-\uFFFF",zf=new RegExp("^[^"+Df+"]*["+Of+"]");function Nl(e){return zf.test(e)?"rtl":"not-rtl"}let xi;function Bl(){if(typeof document>"u")return 0;if(xi!==void 0)return xi;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 o=e.offsetWidth;return n===o&&(o=t.clientWidth),t.remove(),xi=n-o,xi}const Fo=Symbol();function Lf(e){const t=p.useRef([Fo,e]);t.current[1]!==e&&(t.current[0]=e),t.current[1]=e;const[n,o]=p.useState(e),[,r]=p.useState(),i=p.useCallback(s=>{const a=t.current[0];a!==Fo&&(s=typeof s=="function"?s(a):s,s===a)||(a!==Fo&&r({}),o(c=>typeof s=="function"?s(a===Fo?c:a):s),t.current[0]=Fo)},[]),l=p.useCallback(()=>{t.current[0]=Fo,r({})},[]);return[t.current[0]===Fo?n:t.current[0],i,l]}function fc(e){if(e.length===0)return"";let t=0,n=0;for(const o of e){if(n+=o.length,n>1e4)break;t++}return e.slice(0,t).join(", ")}function Pf(e){const t=p.useRef(e);return tr(e,t.current)||(t.current=e),t.current}const Hf=e=>{const{urls:t,canWrite:n,onEditClick:o,renderImage:r}=e,i=t.filter(s=>s!=="");if(i.length===0)return null;const l=i.length>1;return p.createElement(gf,{"data-testid":"GDG-default-image-overlay-editor"},p.createElement(Sf.Carousel,{showArrows:l,showThumbs:!1,swipeable:l,emulateTouch:l,infiniteLoop:l},i.map(s=>{const a=(r==null?void 0:r(s))??p.createElement("img",{draggable:!1,src:s});return p.createElement("div",{className:"gdg-centering-container",key:s},a)})),n&&o&&p.createElement("button",{className:"gdg-edit-icon",onClick:o},p.createElement(_l,null)))};function pc(){return{async:!1,baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,hooks:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}let _o=pc();function Af(e){_o=e}const gc=/[&<>"']/,Ff=new RegExp(gc.source,"g"),mc=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,_f=new RegExp(mc.source,"g"),Nf={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},vc=e=>Nf[e];function vn(e,t){if(t){if(gc.test(e))return e.replace(Ff,vc)}else if(mc.test(e))return e.replace(_f,vc);return e}const Bf=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function bc(e){return e.replace(Bf,(t,n)=>(n=n.toLowerCase(),n==="colon"?":":n.charAt(0)==="#"?n.charAt(1)==="x"?String.fromCharCode(parseInt(n.substring(2),16)):String.fromCharCode(+n.substring(1)):""))}const Vf=/(^|[^\[])\^/g;function Nt(e,t){e=typeof e=="string"?e:e.source,t=t||"";const n={replace:(o,r)=>(r=r.source||r,r=r.replace(Vf,"$1"),e=e.replace(o,r),n),getRegex:()=>new RegExp(e,t)};return n}const $f=/[^\w:]/g,Wf=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function wc(e,t,n){if(e){let o;try{o=decodeURIComponent(bc(n)).replace($f,"").toLowerCase()}catch{return null}if(o.indexOf("javascript:")===0||o.indexOf("vbscript:")===0||o.indexOf("data:")===0)return null}t&&!Wf.test(n)&&(n=Xf(t,n));try{n=encodeURI(n).replace(/%25/g,"%")}catch{return null}return n}const Ci={},jf=/^[^:]+:\/*[^/]*$/,Uf=/^([^:]+:)[\s\S]*$/,Yf=/^([^:]+:\/*[^/]*)[\s\S]*$/;function Xf(e,t){Ci[" "+e]||(jf.test(e)?Ci[" "+e]=e+"/":Ci[" "+e]=Si(e,"/",!0)),e=Ci[" "+e];const n=e.indexOf(":")===-1;return t.substring(0,2)==="//"?n?t:e.replace(Uf,"$1")+t:t.charAt(0)==="/"?n?t:e.replace(Yf,"$1")+t:e+t}const ki={exec:function(){}};function yc(e,t){const n=e.replace(/\|/g,(i,l,s)=>{let a=!1,c=l;for(;--c>=0&&s[c]==="\\";)a=!a;return a?"|":" |"}),o=n.split(/ \|/);let r=0;if(o[0].trim()||o.shift(),o.length>0&&!o[o.length-1].trim()&&o.pop(),o.length>t)o.splice(t);else for(;o.length<t;)o.push("");for(;r<o.length;r++)o[r]=o[r].trim().replace(/\\\|/g,"|");return o}function Si(e,t,n){const o=e.length;if(o===0)return"";let r=0;for(;r<o;){const i=e.charAt(o-r-1);if(i===t&&!n)r++;else if(i!==t&&n)r++;else break}return e.slice(0,o-r)}function Gf(e,t){if(e.indexOf(t[1])===-1)return-1;const n=e.length;let o=0,r=0;for(;r<n;r++)if(e[r]==="\\")r++;else if(e[r]===t[0])o++;else if(e[r]===t[1]&&(o--,o<0))return r;return-1}function Kf(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 xc(e,t){if(t<1)return"";let n="";for(;t>1;)t&1&&(n+=e),t>>=1,e+=e;return n+e}function Cc(e,t,n,o){const r=t.href,i=t.title?vn(t.title):null,l=e[1].replace(/\\([\[\]])/g,"$1");if(e[0].charAt(0)!=="!"){o.state.inLink=!0;const s={type:"link",raw:n,href:r,title:i,text:l,tokens:o.inlineTokens(l)};return o.state.inLink=!1,s}return{type:"image",raw:n,href:r,title:i,text:vn(l)}}function qf(e,t){const n=e.match(/^(\s+)(?:```)/);if(n===null)return t;const o=n[1];return t.split(`
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/data-grid-overlay-editor-Bd6FIb0g.js","assets/index-DPBNUFWE.js","assets/index.Bqb_jNud.css","assets/FormClearHelper-BZaxoxQN.js","assets/withFullScreenWrapper-DbD5_ijt.js","assets/Toolbar-bneC7vhq.js","assets/checkbox-Ce7VH5yR.js","assets/mergeWith-DZ-wgSc6.js","assets/sprintf-D7DtBTRn.js","assets/createDownloadLinkElement-DZMwyjvU.js","assets/slicedToArray-Bj-RN7K3.js","assets/inherits-83mK7fR9.js","assets/createSuper-Ce1x_8d5.js","assets/FileDownload.esm-5XDRJbc8.js","assets/number-overlay-editor-BxuviOUl.js","assets/es6-eSFIFIhE.js"])))=>i.map(i=>d[i]);
2
+ import{r as p,E as gs,_ as Ke,d as Ay,g as vo,R as te,i as ms,e as pi,f as Fy,h as _y,m as Ny,n as Ph,o as Hh,p as By,q as Ah,s as Vy,t as $y,v as Wy,w as jy,x as Uy,y as Yy,a as so,z as vs,c as Sr,A as Jo,j as Oe,B as xl,C as Cl,T as Fh,D as kl,F as bo,G as Vn,H as _h,I as Sl,J as Xy,K as Gy,L as Ve,M as Nh,N as mt,O as gi,Q as Qo,S as bs,U as Ky,V as qy,W as Zy,X as Bh,Y as Jy,Z as Vh,$ as Qy,a0 as ex,a1 as ws,a2 as $h,a3 as Wh,a4 as tx,a5 as nx,a6 as ox,a7 as rx,a8 as ix,a9 as lx,aa as ax,ab as sx,ac as cx,ad as jh,ae as ux,af as dx,ag as hx,ah as fx,ai as px,aj as gx,ak as mx,al as vx,am as bx,an as wx,ao as yx,ap as xx,aq as Cx,ar as En,l as ys,as as mi,at as wo,au as kx,av as Sx,aw as Mx,ax as Rx,ay as Ex,az as Ix,aA as Ml,aB as vi,aC as Ut,aD as Tx,aE as Ox,aF as Dx,aG as zx,aH as er,aI as It,aJ as xn,aK as Uh,aL as Yh,aM as Rl,aN as Lx,aO as Xh,aP as Gh,aQ as Px,aR as xs,aS as Hx,aT as Ax,aU as Kh,aV as Fx,aW as qh,aX as _x,aY as Zh,aZ as Nx,a_ as Bx,a$ as Vx,b as Jh,b0 as Cs,b1 as $x,b2 as Wx,b3 as ks,b4 as jx,b5 as Ux,b6 as Yx,b7 as Xx,b8 as Gx,__tla as Kx}from"./index-DPBNUFWE.js";import{u as qx}from"./FormClearHelper-BZaxoxQN.js";import{w as Zx,E as Jx}from"./withFullScreenWrapper-DbD5_ijt.js";import{T as Qx,a as Mr}from"./Toolbar-bneC7vhq.js";import{S as eC,L as tC,a as nC}from"./checkbox-Ce7VH5yR.js";import{m as oC}from"./mergeWith-DZ-wgSc6.js";import{s as rC}from"./sprintf-D7DtBTRn.js";import{c as iC}from"./createDownloadLinkElement-DZMwyjvU.js";import{_ as yo,C as lC}from"./slicedToArray-Bj-RN7K3.js";import{_ as aC,a as sC,b as cC}from"./inherits-83mK7fR9.js";import{_ as uC}from"./createSuper-Ce1x_8d5.js";import{D as dC,F as hC}from"./FileDownload.esm-5XDRJbc8.js";let Ss,El,Po,Ms,Qh,Ho,Rs,cn,fC=Promise.all([(()=>{try{return Kx}catch{}})()]).then(async()=>{var ef=Object.defineProperty,tf=(e,t,n)=>t in e?ef(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ht=(e,t,n)=>tf(e,typeof t!="symbol"?t+"":t,n),Es=p.forwardRef(function(e,t){var n={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return p.createElement(gs,Ke({iconAttrs:n,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:t}),p.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),p.createElement("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"}))});Es.displayName="Add";var Is=p.forwardRef(function(e,t){var n={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return p.createElement(gs,Ke({iconAttrs:n,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:t}),p.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),p.createElement("path",{d:"M15.5 14h-.79l-.28-.27A6.471 6.471 0 0016 9.5 6.5 6.5 0 109.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"}))});Is.displayName="Search";var Ts=p.forwardRef(function(e,t){var n={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return p.createElement(gs,Ke({iconAttrs:n,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:t}),p.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),p.createElement("path",{d:"M12 6a9.77 9.77 0 018.82 5.5C19.17 14.87 15.79 17 12 17s-7.17-2.13-8.82-5.5A9.77 9.77 0 0112 6m0-2C7 4 2.73 7.11 1 11.5 2.73 15.89 7 19 12 19s9.27-3.11 11-7.5C21.27 7.11 17 4 12 4zm0 5a2.5 2.5 0 010 5 2.5 2.5 0 010-5m0-2c-2.48 0-4.5 2.02-4.5 4.5S9.52 16 12 16s4.5-2.02 4.5-4.5S14.48 7 12 7z"}))});Ts.displayName="Visibility";function Os(e="This should not happen"){throw new Error(e)}function zn(e,t="Assertion failed"){if(!e)return Os(t)}function Rr(e,t){return Os(t??"Hell froze over")}function nf(e,t){try{return e()}catch{return t}}const Ds=Object.prototype.hasOwnProperty;function tr(e,t){let n,o;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((o=e.length)===t.length)for(;o--&&tr(e[o],t[o]););return o===-1}if(!n||typeof e=="object"){o=0;for(n in e)if(Ds.call(e,n)&&++o&&!Ds.call(t,n)||!(n in t)||!tr(e[n],t[n]))return!1;return Object.keys(t).length===o}}return e!==e&&t!==t}var Tl,zs;function of(){if(zs)return Tl;zs=1;var e=Object.prototype,t=e.hasOwnProperty;function n(o,r){return o!=null&&t.call(o,r)}return Tl=n,Tl}var Ol,Ls;function rf(){if(Ls)return Ol;Ls=1;var e=of(),t=Ay();function n(o,r){return o!=null&&t(o,r,e)}return Ol=n,Ol}var lf=rf();const af=vo(lf),bi=null,Dl=void 0;var Z;(function(e){e.Uri="uri",e.Text="text",e.Image="image",e.RowID="row-id",e.Number="number",e.Bubble="bubble",e.Boolean="boolean",e.Loading="loading",e.Markdown="markdown",e.Drilldown="drilldown",e.Protected="protected",e.Custom="custom"})(Z||(Z={}));var Ps;(function(e){e.HeaderRowID="headerRowID",e.HeaderCode="headerCode",e.HeaderNumber="headerNumber",e.HeaderString="headerString",e.HeaderBoolean="headerBoolean",e.HeaderAudioUri="headerAudioUri",e.HeaderVideoUri="headerVideoUri",e.HeaderEmoji="headerEmoji",e.HeaderImage="headerImage",e.HeaderUri="headerUri",e.HeaderPhone="headerPhone",e.HeaderMarkdown="headerMarkdown",e.HeaderDate="headerDate",e.HeaderTime="headerTime",e.HeaderEmail="headerEmail",e.HeaderReference="headerReference",e.HeaderIfThenElse="headerIfThenElse",e.HeaderSingleValue="headerSingleValue",e.HeaderLookup="headerLookup",e.HeaderTextTemplate="headerTextTemplate",e.HeaderMath="headerMath",e.HeaderRollup="headerRollup",e.HeaderJoinStrings="headerJoinStrings",e.HeaderSplitString="headerSplitString",e.HeaderGeoDistance="headerGeoDistance",e.HeaderArray="headerArray",e.RowOwnerOverlay="rowOwnerOverlay",e.ProtectedColumnOverlay="protectedColumnOverlay"})(Ps||(Ps={}));var wi;(function(e){e.Triangle="triangle",e.Dots="dots"})(wi||(wi={}));function yi(e){return"width"in e&&typeof e.width=="number"}async function Hs(e){return typeof e=="object"?e:await e()}Ho=function(e){return!(e.kind===Z.Loading||e.kind===Z.Bubble||e.kind===Z.RowID||e.kind===Z.Protected||e.kind===Z.Drilldown)},Po=function(e){return e.kind===Fn.Marker||e.kind===Fn.NewRow};function Er(e){if(!Ho(e)||e.kind===Z.Image)return!1;if(e.kind===Z.Text||e.kind===Z.Number||e.kind===Z.Markdown||e.kind===Z.Uri||e.kind===Z.Custom||e.kind===Z.Boolean)return e.readonly!==!0;Rr(e,"A cell was passed with an invalid kind")}Ms=function(e){return af(e,"editor")};function zl(e){return!(e.readonly??!1)}var Fn;(function(e){e.NewRow="new-row",e.Marker="marker"})(Fn||(Fn={}));function sf(e){if(e.length===0)return[];const t=[...e],n=[];t.sort(function(o,r){return o[0]-r[0]}),n.push([...t[0]]);for(const o of t.slice(1)){const r=n[n.length-1];r[1]<o[0]?n.push([...o]):r[1]<o[1]&&(r[1]=o[1])}return n}let As;const Ir=class Il{constructor(t){ht(this,"items"),this.items=t}offset(t){if(t===0)return this;const n=this.items.map(o=>[o[0]+t,o[1]+t]);return new Il(n)}add(t){const n=typeof t=="number"?[t,t+1]:t,o=sf([...this.items,n]);return new Il(o)}remove(t){const n=[...this.items],o=typeof t=="number"?t:t[0],r=typeof t=="number"?t+1:t[1];for(const[i,l]of n.entries()){const[s,a]=l;if(s<=r&&o<=a){const c=[];s<o&&c.push([s,o]),r<a&&c.push([r,a]),n.splice(i,1,...c)}}return new Il(n)}first(){if(this.items.length!==0)return this.items[0][0]}last(){if(this.items.length!==0)return this.items.slice(-1)[0][1]-1}hasIndex(t){for(let n=0;n<this.items.length;n++){const[o,r]=this.items[n];if(t>=o&&t<r)return!0}return!1}hasAll(t){for(let n=t[0];n<t[1];n++)if(!this.hasIndex(n))return!1;return!0}some(t){for(const n of this)if(t(n))return!0;return!1}equals(t){if(t===this)return!0;if(t.items.length!==this.items.length)return!1;for(let n=0;n<this.items.length;n++){const o=t.items[n],r=this.items[n];if(o[0]!==r[0]||o[1]!==r[1])return!1}return!0}toArray(){const t=[];for(const[n,o]of this.items)for(let r=n;r<o;r++)t.push(r);return t}get length(){let t=0;for(const[n,o]of this.items)t+=o-n;return t}*[Symbol.iterator](){for(const[t,n]of this.items)for(let o=t;o<n;o++)yield o}};ht(Ir,"empty",()=>As??(As=new Ir([]))),ht(Ir,"fromSingleSelection",e=>Ir.empty().add(e));let vt=Ir;var cf=function(){const e=Array.prototype.slice.call(arguments).filter(Boolean),t={},n=[];e.forEach(r=>{(r?r.split(" "):[]).forEach(i=>{if(i.startsWith("atm_")){const[,l]=i.split("_");t[l]=i}else n.push(i)})});const o=[];for(const r in t)Object.prototype.hasOwnProperty.call(t,r)&&o.push(t[r]);return o.push(...n),o.join(" ")},Fs=cf,uf=e=>e.toUpperCase()===e,df=e=>t=>e.indexOf(t)===-1,_s=(e,t)=>{const n={};return Object.keys(e).filter(df(t)).forEach(o=>{n[o]=e[o]}),n};function hf(e,t,n){const o=_s(t,n);if(!e){const r=typeof ms=="function"?{default:ms}:ms;Object.keys(o).forEach(i=>{r.default(i)||delete o[i]})}return o}var ff=(e,t)=>{};function pf(e){let t="";return n=>{const o=(i,l)=>{const{as:s=e,class:a=t}=i,c=n.propsAsIs===void 0?!(typeof s=="string"&&s.indexOf("-")===-1&&!uf(s[0])):n.propsAsIs,u=hf(c,i,["as","class"]);u.ref=l,u.className=n.atomic?Fs(n.class,u.className||a):Fs(u.className||a,n.class);const{vars:d}=n;if(d){const f={};for(const m in d){const b=d[m],y=b[0],v=b[1]||"",I=typeof y=="function"?y(i):y;ff(I,n.name),f[`--${m}`]=`${I}${v}`}const h=u.style||{},g=Object.keys(h);g.length>0&&g.forEach(m=>{f[m]=h[m]}),u.style=f}return e.__linaria&&e!==s?(u.as=s,te.createElement(e,u)):te.createElement(s,u)},r=te.forwardRef?te.forwardRef(o):i=>{const l=_s(i,["innerRef"]);return o(l,i.innerRef)};return r.displayName=n.name,r.__linaria={className:n.class||t,extends:e},r}}cn=pf;const gf=cn("div")({name:"ImageOverlayEditorStyle",class:"gdg-i2iowwq",propsAsIs:!1});var Ns={},Tr={},Ll={},Pl={},Bs;function mf(){return Bs||(Bs=1,function(e){(function(t,n){n(e,pi(),Fy())})(Pl,function(t,n,o){Object.defineProperty(t,"__esModule",{value:!0}),t.setHasSupportToCaptureOption=g;var r=l(n),i=l(o);function l(v){return v&&v.__esModule?v:{default:v}}var s=Object.assign||function(v){for(var I=1;I<arguments.length;I++){var T=arguments[I];for(var k in T)Object.prototype.hasOwnProperty.call(T,k)&&(v[k]=T[k])}return v};function a(v,I){var T={};for(var k in v)I.indexOf(k)>=0||Object.prototype.hasOwnProperty.call(v,k)&&(T[k]=v[k]);return T}function c(v,I){if(!(v instanceof I))throw new TypeError("Cannot call a class as a function")}var u=function(){function v(I,T){for(var k=0;k<T.length;k++){var x=T[k];x.enumerable=x.enumerable||!1,x.configurable=!0,"value"in x&&(x.writable=!0),Object.defineProperty(I,x.key,x)}}return function(I,T,k){return T&&v(I.prototype,T),k&&v(I,k),I}}();function d(v,I){if(!v)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return I&&(typeof I=="object"||typeof I=="function")?I:v}function f(v,I){if(typeof I!="function"&&I!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof I);v.prototype=Object.create(I&&I.prototype,{constructor:{value:v,enumerable:!1,writable:!0,configurable:!0}}),I&&(Object.setPrototypeOf?Object.setPrototypeOf(v,I):v.__proto__=I)}var h=!1;function g(v){h=v}try{addEventListener("test",null,Object.defineProperty({},"capture",{get:function(){g(!0)}}))}catch{}function m(){var v=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{capture:!0};return h?v:v.capture}function b(v){if("touches"in v){var I=v.touches[0],T=I.pageX,k=I.pageY;return{x:T,y:k}}var x=v.screenX,L=v.screenY;return{x,y:L}}var y=function(v){f(I,v);function I(){var T;c(this,I);for(var k=arguments.length,x=Array(k),L=0;L<k;L++)x[L]=arguments[L];var O=d(this,(T=I.__proto__||Object.getPrototypeOf(I)).call.apply(T,[this].concat(x)));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 u(I,[{key:"componentDidMount",value:function(){this.swiper&&this.swiper.addEventListener("touchmove",this._handleSwipeMove,m({capture:!0,passive:!1}))}},{key:"componentWillUnmount",value:function(){this.swiper&&this.swiper.removeEventListener("touchmove",this._handleSwipeMove,m({capture:!0,passive:!1}))}},{key:"_onMouseDown",value:function(T){this.props.allowMouseEvents&&(this.mouseDown=!0,document.addEventListener("mouseup",this._onMouseUp),document.addEventListener("mousemove",this._onMouseMove),this._handleSwipeStart(T))}},{key:"_onMouseMove",value:function(T){this.mouseDown&&this._handleSwipeMove(T)}},{key:"_onMouseUp",value:function(T){this.mouseDown=!1,document.removeEventListener("mouseup",this._onMouseUp),document.removeEventListener("mousemove",this._onMouseMove),this._handleSwipeEnd(T)}},{key:"_handleSwipeStart",value:function(T){var k=b(T),x=k.x,L=k.y;this.moveStart={x,y:L},this.props.onSwipeStart(T)}},{key:"_handleSwipeMove",value:function(T){if(this.moveStart){var k=b(T),x=k.x,L=k.y,O=x-this.moveStart.x,R=L-this.moveStart.y;this.moving=!0;var P=this.props.onSwipeMove({x:O,y:R},T);P&&T.cancelable&&T.preventDefault(),this.movePosition={deltaX:O,deltaY:R}}}},{key:"_handleSwipeEnd",value:function(T){this.props.onSwipeEnd(T);var k=this.props.tolerance;this.moving&&this.movePosition&&(this.movePosition.deltaX<-k?this.props.onSwipeLeft(1,T):this.movePosition.deltaX>k&&this.props.onSwipeRight(1,T),this.movePosition.deltaY<-k?this.props.onSwipeUp(1,T):this.movePosition.deltaY>k&&this.props.onSwipeDown(1,T)),this.moveStart=null,this.moving=!1,this.movePosition=null}},{key:"_setSwiperRef",value:function(T){this.swiper=T,this.props.innerRef(T)}},{key:"render",value:function(){var T=this.props;T.tagName;var k=T.className,x=T.style,L=T.children;T.allowMouseEvents,T.onSwipeUp,T.onSwipeDown,T.onSwipeLeft,T.onSwipeRight,T.onSwipeStart,T.onSwipeMove,T.onSwipeEnd,T.innerRef,T.tolerance;var O=a(T,["tagName","className","style","children","allowMouseEvents","onSwipeUp","onSwipeDown","onSwipeLeft","onSwipeRight","onSwipeStart","onSwipeMove","onSwipeEnd","innerRef","tolerance"]);return r.default.createElement(this.props.tagName,s({ref:this._setSwiperRef,onMouseDown:this._onMouseDown,onTouchStart:this._handleSwipeStart,onTouchEnd:this._handleSwipeEnd,className:k,style:x},O),L)}}]),I}(n.Component);y.displayName="ReactSwipe",y.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},y.defaultProps={tagName:"div",allowMouseEvents:!1,onSwipeUp:function(){},onSwipeDown:function(){},onSwipeLeft:function(){},onSwipeRight:function(){},onSwipeStart:function(){},onSwipeMove:function(){},onSwipeEnd:function(){},innerRef:function(){},tolerance:0},t.default=y})}(Pl)),Pl}var Vs;function $s(){return Vs||(Vs=1,function(e){(function(t,n){n(e,mf())})(Ll,function(t,n){Object.defineProperty(t,"__esModule",{value:!0});var o=r(n);function r(i){return i&&i.__esModule?i:{default:i}}t.default=o.default})}(Ll)),Ll}var Or={},Ws;function js(){if(Ws)return Or;Ws=1,Object.defineProperty(Or,"__esModule",{value:!0}),Or.default=void 0;var e=t(_y());function t(r){return r&&r.__esModule?r:{default:r}}function n(r,i,l){return i in r?Object.defineProperty(r,i,{value:l,enumerable:!0,configurable:!0,writable:!0}):r[i]=l,r}var o={ROOT:function(r){return(0,e.default)(n({"carousel-root":!0},r||"",!!r))},CAROUSEL:function(r){return(0,e.default)({carousel:!0,"carousel-slider":r})},WRAPPER:function(r,i){return(0,e.default)({"thumbs-wrapper":!r,"slider-wrapper":r,"axis-horizontal":i==="horizontal","axis-vertical":i!=="horizontal"})},SLIDER:function(r,i){return(0,e.default)({thumbs:!r,slider:r,animated:!i})},ITEM:function(r,i,l){return(0,e.default)({thumb:!r,slide:r,selected:i,previous:l})},ARROW_PREV:function(r){return(0,e.default)({"control-arrow control-prev":!0,"control-disabled":r})},ARROW_NEXT:function(r){return(0,e.default)({"control-arrow control-next":!0,"control-disabled":r})},DOT:function(r){return(0,e.default)({dot:!0,selected:r})}};return Or.default=o,Or}var Dr={},zr={},Us;function vf(){if(Us)return zr;Us=1,Object.defineProperty(zr,"__esModule",{value:!0}),zr.outerWidth=void 0;var e=function(t){var n=t.offsetWidth,o=getComputedStyle(t);return n+=parseInt(o.marginLeft)+parseInt(o.marginRight),n};return zr.outerWidth=e,zr}var Lr={},Ys;function Hl(){if(Ys)return Lr;Ys=1,Object.defineProperty(Lr,"__esModule",{value:!0}),Lr.default=void 0;var e=function(t,n,o){var r=t===0?t:t+n,i=o==="horizontal"?[r,0,0]:[0,r,0],l="translate3d",s="("+i.join(",")+")";return l+s};return Lr.default=e,Lr}var Pr={},Xs;function Gs(){if(Xs)return Pr;Xs=1,Object.defineProperty(Pr,"__esModule",{value:!0}),Pr.default=void 0;var e=function(){return window};return Pr.default=e,Pr}var Ks;function qs(){if(Ks)return Dr;Ks=1,Object.defineProperty(Dr,"__esModule",{value:!0}),Dr.default=void 0;var e=a(pi()),t=l(js()),n=vf(),o=l(Hl()),r=l($s()),i=l(Gs());function l(O){return O&&O.__esModule?O:{default:O}}function s(){if(typeof WeakMap!="function")return null;var O=new WeakMap;return s=function(){return O},O}function a(O){if(O&&O.__esModule)return O;if(O===null||c(O)!=="object"&&typeof O!="function")return{default:O};var R=s();if(R&&R.has(O))return R.get(O);var P={},M=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var S in O)if(Object.prototype.hasOwnProperty.call(O,S)){var E=M?Object.getOwnPropertyDescriptor(O,S):null;E&&(E.get||E.set)?Object.defineProperty(P,S,E):P[S]=O[S]}return P.default=O,R&&R.set(O,P),P}function c(O){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?c=function(R){return typeof R}:c=function(R){return R&&typeof Symbol=="function"&&R.constructor===Symbol&&R!==Symbol.prototype?"symbol":typeof R},c(O)}function u(){return u=Object.assign||function(O){for(var R=1;R<arguments.length;R++){var P=arguments[R];for(var M in P)Object.prototype.hasOwnProperty.call(P,M)&&(O[M]=P[M])}return O},u.apply(this,arguments)}function d(O,R){if(!(O instanceof R))throw new TypeError("Cannot call a class as a function")}function f(O,R){for(var P=0;P<R.length;P++){var M=R[P];M.enumerable=M.enumerable||!1,M.configurable=!0,"value"in M&&(M.writable=!0),Object.defineProperty(O,M.key,M)}}function h(O,R,P){return R&&f(O.prototype,R),O}function g(O,R){if(typeof R!="function"&&R!==null)throw new TypeError("Super expression must either be null or a function");O.prototype=Object.create(R&&R.prototype,{constructor:{value:O,writable:!0,configurable:!0}}),R&&m(O,R)}function m(O,R){return m=Object.setPrototypeOf||function(P,M){return P.__proto__=M,P},m(O,R)}function b(O){var R=I();return function(){var P=T(O),M;if(R){var S=T(this).constructor;M=Reflect.construct(P,arguments,S)}else M=P.apply(this,arguments);return y(this,M)}}function y(O,R){return R&&(c(R)==="object"||typeof R=="function")?R:v(O)}function v(O){if(O===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return O}function I(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function T(O){return T=Object.setPrototypeOf?Object.getPrototypeOf:function(R){return R.__proto__||Object.getPrototypeOf(R)},T(O)}function k(O,R,P){return R in O?Object.defineProperty(O,R,{value:P,enumerable:!0,configurable:!0,writable:!0}):O[R]=P,O}var x=function(O){return O.hasOwnProperty("key")},L=function(O){g(P,O);var R=b(P);function P(M){var S;return d(this,P),S=R.call(this,M),k(v(S),"itemsWrapperRef",void 0),k(v(S),"itemsListRef",void 0),k(v(S),"thumbsRef",void 0),k(v(S),"setItemsWrapperRef",function(E){S.itemsWrapperRef=E}),k(v(S),"setItemsListRef",function(E){S.itemsListRef=E}),k(v(S),"setThumbsRef",function(E,D){S.thumbsRef||(S.thumbsRef=[]),S.thumbsRef[D]=E}),k(v(S),"updateSizes",function(){if(!(!S.props.children||!S.itemsWrapperRef||!S.thumbsRef)){var E=e.Children.count(S.props.children),D=S.itemsWrapperRef.clientWidth,C=S.props.thumbWidth?S.props.thumbWidth:(0,n.outerWidth)(S.thumbsRef[0]),X=Math.floor(D/C),B=X<E,J=B?E-X:0;S.setState(function(ae,ne){return{itemSize:C,visibleItems:X,firstItem:B?S.getFirstItem(ne.selectedItem):0,lastPosition:J,showArrows:B}})}}),k(v(S),"handleClickItem",function(E,D,C){if(!x(C)||C.key==="Enter"){var X=S.props.onSelectItem;typeof X=="function"&&X(E,D)}}),k(v(S),"onSwipeStart",function(){S.setState({swiping:!0})}),k(v(S),"onSwipeEnd",function(){S.setState({swiping:!1})}),k(v(S),"onSwipeMove",function(E){var D=E.x;if(!S.state.itemSize||!S.itemsWrapperRef||!S.state.visibleItems)return!1;var C=0,X=e.Children.count(S.props.children),B=-(S.state.firstItem*100)/S.state.visibleItems,J=Math.max(X-S.state.visibleItems,0),ae=-J*100/S.state.visibleItems;B===C&&D>0&&(D=0),B===ae&&D<0&&(D=0);var ne=S.itemsWrapperRef.clientWidth,U=B+100/(ne/D);return S.itemsListRef&&["WebkitTransform","MozTransform","MsTransform","OTransform","transform","msTransform"].forEach(function(re){S.itemsListRef.style[re]=(0,o.default)(U,"%",S.props.axis)}),!0}),k(v(S),"slideRight",function(E){S.moveTo(S.state.firstItem-(typeof E=="number"?E:1))}),k(v(S),"slideLeft",function(E){S.moveTo(S.state.firstItem+(typeof E=="number"?E:1))}),k(v(S),"moveTo",function(E){E=E<0?0:E,E=E>=S.state.lastPosition?S.state.lastPosition:E,S.setState({firstItem:E})}),S.state={selectedItem:M.selectedItem,swiping:!1,showArrows:!1,firstItem:0,visibleItems:0,lastPosition:0},S}return h(P,[{key:"componentDidMount",value:function(){this.setupThumbs()}},{key:"componentDidUpdate",value:function(M){this.props.selectedItem!==this.state.selectedItem&&this.setState({selectedItem:this.props.selectedItem,firstItem:this.getFirstItem(this.props.selectedItem)}),this.props.children!==M.children&&this.updateSizes()}},{key:"componentWillUnmount",value:function(){this.destroyThumbs()}},{key:"setupThumbs",value:function(){(0,i.default)().addEventListener("resize",this.updateSizes),(0,i.default)().addEventListener("DOMContentLoaded",this.updateSizes),this.updateSizes()}},{key:"destroyThumbs",value:function(){(0,i.default)().removeEventListener("resize",this.updateSizes),(0,i.default)().removeEventListener("DOMContentLoaded",this.updateSizes)}},{key:"getFirstItem",value:function(M){var S=M;return M>=this.state.lastPosition&&(S=this.state.lastPosition),M<this.state.firstItem+this.state.visibleItems&&(S=this.state.firstItem),M<this.state.firstItem&&(S=M),S}},{key:"renderItems",value:function(){var M=this;return this.props.children.map(function(S,E){var D=t.default.ITEM(!1,E===M.state.selectedItem),C={key:E,ref:function(X){return M.setThumbsRef(X,E)},className:D,onClick:M.handleClickItem.bind(M,E,M.props.children[E]),onKeyDown:M.handleClickItem.bind(M,E,M.props.children[E]),"aria-label":"".concat(M.props.labels.item," ").concat(E+1),style:{width:M.props.thumbWidth}};return e.default.createElement("li",u({},C,{role:"button",tabIndex:0}),S)})}},{key:"render",value:function(){var M=this;if(!this.props.children)return null;var S=e.Children.count(this.props.children)>1,E=this.state.showArrows&&this.state.firstItem>0,D=this.state.showArrows&&this.state.firstItem<this.state.lastPosition,C={},X=-this.state.firstItem*(this.state.itemSize||0),B=(0,o.default)(X,"px",this.props.axis),J=this.props.transitionTime+"ms";return C={WebkitTransform:B,MozTransform:B,MsTransform:B,OTransform:B,transform:B,msTransform:B,WebkitTransitionDuration:J,MozTransitionDuration:J,MsTransitionDuration:J,OTransitionDuration:J,transitionDuration:J,msTransitionDuration:J},e.default.createElement("div",{className:t.default.CAROUSEL(!1)},e.default.createElement("div",{className:t.default.WRAPPER(!1),ref:this.setItemsWrapperRef},e.default.createElement("button",{type:"button",className:t.default.ARROW_PREV(!E),onClick:function(){return M.slideRight()},"aria-label":this.props.labels.leftArrow}),S?e.default.createElement(r.default,{tagName:"ul",className:t.default.SLIDER(!1,this.state.swiping),onSwipeLeft:this.slideLeft,onSwipeRight:this.slideRight,onSwipeMove:this.onSwipeMove,onSwipeStart:this.onSwipeStart,onSwipeEnd:this.onSwipeEnd,style:C,innerRef:this.setItemsListRef,allowMouseEvents:this.props.emulateTouch},this.renderItems()):e.default.createElement("ul",{className:t.default.SLIDER(!1,this.state.swiping),ref:function(ae){return M.setItemsListRef(ae)},style:C},this.renderItems()),e.default.createElement("button",{type:"button",className:t.default.ARROW_NEXT(!D),onClick:function(){return M.slideLeft()},"aria-label":this.props.labels.rightArrow})))}}]),P}(e.Component);return Dr.default=L,k(L,"displayName","Thumbs"),k(L,"defaultProps",{axis:"horizontal",labels:{leftArrow:"previous slide / item",rightArrow:"next slide / item",item:"slide item"},selectedItem:0,thumbWidth:80,transitionTime:350}),Dr}var Hr={},Zs;function bf(){if(Zs)return Hr;Zs=1,Object.defineProperty(Hr,"__esModule",{value:!0}),Hr.default=void 0;var e=function(){return document};return Hr.default=e,Hr}var Ln={},Js;function Qs(){if(Js)return Ln;Js=1,Object.defineProperty(Ln,"__esModule",{value:!0}),Ln.setPosition=Ln.getPosition=Ln.isKeyboardEvent=Ln.defaultStatusFormatter=Ln.noop=void 0;var e=pi(),t=n(Hl());function n(a){return a&&a.__esModule?a:{default:a}}var o=function(){};Ln.noop=o;var r=function(a,c){return"".concat(a," of ").concat(c)};Ln.defaultStatusFormatter=r;var i=function(a){return a?a.hasOwnProperty("key"):!1};Ln.isKeyboardEvent=i;var l=function(a,c){if(c.infiniteLoop&&++a,a===0)return 0;var u=e.Children.count(c.children);if(c.centerMode&&c.axis==="horizontal"){var d=-a*c.centerSlidePercentage,f=u-1;return a&&(a!==f||c.infiniteLoop)?d+=(100-c.centerSlidePercentage)/2:a===f&&(d+=100-c.centerSlidePercentage),d}return-a*100};Ln.getPosition=l;var s=function(a,c){var u={};return["WebkitTransform","MozTransform","MsTransform","OTransform","transform","msTransform"].forEach(function(d){u[d]=(0,t.default)(a,"%",c)}),u};return Ln.setPosition=s,Ln}var $n={},ec;function wf(){if(ec)return $n;ec=1,Object.defineProperty($n,"__esModule",{value:!0}),$n.fadeAnimationHandler=$n.slideStopSwipingHandler=$n.slideSwipeAnimationHandler=$n.slideAnimationHandler=void 0;var e=pi(),t=o(Hl()),n=Qs();function o(d){return d&&d.__esModule?d:{default:d}}function r(d,f){var h=Object.keys(d);if(Object.getOwnPropertySymbols){var g=Object.getOwnPropertySymbols(d);f&&(g=g.filter(function(m){return Object.getOwnPropertyDescriptor(d,m).enumerable})),h.push.apply(h,g)}return h}function i(d){for(var f=1;f<arguments.length;f++){var h=arguments[f]!=null?arguments[f]:{};f%2?r(Object(h),!0).forEach(function(g){l(d,g,h[g])}):Object.getOwnPropertyDescriptors?Object.defineProperties(d,Object.getOwnPropertyDescriptors(h)):r(Object(h)).forEach(function(g){Object.defineProperty(d,g,Object.getOwnPropertyDescriptor(h,g))})}return d}function l(d,f,h){return f in d?Object.defineProperty(d,f,{value:h,enumerable:!0,configurable:!0,writable:!0}):d[f]=h,d}var s=function(d,f){var h={},g=f.selectedItem,m=g,b=e.Children.count(d.children)-1,y=d.infiniteLoop&&(g<0||g>b);if(y)return m<0?d.centerMode&&d.centerSlidePercentage&&d.axis==="horizontal"?h.itemListStyle=(0,n.setPosition)(-(b+2)*d.centerSlidePercentage-(100-d.centerSlidePercentage)/2,d.axis):h.itemListStyle=(0,n.setPosition)(-(b+2)*100,d.axis):m>b&&(h.itemListStyle=(0,n.setPosition)(0,d.axis)),h;var v=(0,n.getPosition)(g,d),I=(0,t.default)(v,"%",d.axis),T=d.transitionTime+"ms";return h.itemListStyle={WebkitTransform:I,msTransform:I,OTransform:I,transform:I},f.swiping||(h.itemListStyle=i(i({},h.itemListStyle),{},{WebkitTransitionDuration:T,MozTransitionDuration:T,OTransitionDuration:T,transitionDuration:T,msTransitionDuration:T})),h};$n.slideAnimationHandler=s;var a=function(d,f,h,g){var m={},b=f.axis==="horizontal",y=e.Children.count(f.children),v=0,I=(0,n.getPosition)(h.selectedItem,f),T=f.infiniteLoop?(0,n.getPosition)(y-1,f)-100:(0,n.getPosition)(y-1,f),k=b?d.x:d.y,x=k;I===v&&k>0&&(x=0),I===T&&k<0&&(x=0);var L=I+100/(h.itemSize/x),O=Math.abs(k)>f.swipeScrollTolerance;return f.infiniteLoop&&O&&(h.selectedItem===0&&L>-100?L-=y*100:h.selectedItem===y-1&&L<-y*100&&(L+=y*100)),(!f.preventMovementUntilSwipeScrollTolerance||O||h.swipeMovementStarted)&&(h.swipeMovementStarted||g({swipeMovementStarted:!0}),m.itemListStyle=(0,n.setPosition)(L,f.axis)),O&&!h.cancelClick&&g({cancelClick:!0}),m};$n.slideSwipeAnimationHandler=a;var c=function(d,f){var h=(0,n.getPosition)(f.selectedItem,d),g=(0,n.setPosition)(h,d.axis);return{itemListStyle:g}};$n.slideStopSwipingHandler=c;var u=function(d,f){var h=d.transitionTime+"ms",g="ease-in-out",m={position:"absolute",display:"block",zIndex:-2,minHeight:"100%",opacity:0,top:0,right:0,left:0,bottom:0,transitionTimingFunction:g,msTransitionTimingFunction:g,MozTransitionTimingFunction:g,WebkitTransitionTimingFunction:g,OTransitionTimingFunction:g};return f.swiping||(m=i(i({},m),{},{WebkitTransitionDuration:h,MozTransitionDuration:h,OTransitionDuration:h,transitionDuration:h,msTransitionDuration:h})),{slideStyle:m,selectedStyle:i(i({},m),{},{opacity:1,position:"relative"}),prevStyle:i({},m)}};return $n.fadeAnimationHandler=u,$n}var tc;function yf(){if(tc)return Tr;tc=1,Object.defineProperty(Tr,"__esModule",{value:!0}),Tr.default=void 0;var e=u(pi()),t=a($s()),n=a(js()),o=a(qs()),r=a(bf()),i=a(Gs()),l=Qs(),s=wf();function a(M){return M&&M.__esModule?M:{default:M}}function c(){if(typeof WeakMap!="function")return null;var M=new WeakMap;return c=function(){return M},M}function u(M){if(M&&M.__esModule)return M;if(M===null||d(M)!=="object"&&typeof M!="function")return{default:M};var S=c();if(S&&S.has(M))return S.get(M);var E={},D=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var C in M)if(Object.prototype.hasOwnProperty.call(M,C)){var X=D?Object.getOwnPropertyDescriptor(M,C):null;X&&(X.get||X.set)?Object.defineProperty(E,C,X):E[C]=M[C]}return E.default=M,S&&S.set(M,E),E}function d(M){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?d=function(S){return typeof S}:d=function(S){return S&&typeof Symbol=="function"&&S.constructor===Symbol&&S!==Symbol.prototype?"symbol":typeof S},d(M)}function f(){return f=Object.assign||function(M){for(var S=1;S<arguments.length;S++){var E=arguments[S];for(var D in E)Object.prototype.hasOwnProperty.call(E,D)&&(M[D]=E[D])}return M},f.apply(this,arguments)}function h(M,S){var E=Object.keys(M);if(Object.getOwnPropertySymbols){var D=Object.getOwnPropertySymbols(M);S&&(D=D.filter(function(C){return Object.getOwnPropertyDescriptor(M,C).enumerable})),E.push.apply(E,D)}return E}function g(M){for(var S=1;S<arguments.length;S++){var E=arguments[S]!=null?arguments[S]:{};S%2?h(Object(E),!0).forEach(function(D){R(M,D,E[D])}):Object.getOwnPropertyDescriptors?Object.defineProperties(M,Object.getOwnPropertyDescriptors(E)):h(Object(E)).forEach(function(D){Object.defineProperty(M,D,Object.getOwnPropertyDescriptor(E,D))})}return M}function m(M,S){if(!(M instanceof S))throw new TypeError("Cannot call a class as a function")}function b(M,S){for(var E=0;E<S.length;E++){var D=S[E];D.enumerable=D.enumerable||!1,D.configurable=!0,"value"in D&&(D.writable=!0),Object.defineProperty(M,D.key,D)}}function y(M,S,E){return S&&b(M.prototype,S),M}function v(M,S){if(typeof S!="function"&&S!==null)throw new TypeError("Super expression must either be null or a function");M.prototype=Object.create(S&&S.prototype,{constructor:{value:M,writable:!0,configurable:!0}}),S&&I(M,S)}function I(M,S){return I=Object.setPrototypeOf||function(E,D){return E.__proto__=D,E},I(M,S)}function T(M){var S=L();return function(){var E=O(M),D;if(S){var C=O(this).constructor;D=Reflect.construct(E,arguments,C)}else D=E.apply(this,arguments);return k(this,D)}}function k(M,S){return S&&(d(S)==="object"||typeof S=="function")?S:x(M)}function x(M){if(M===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return M}function L(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function O(M){return O=Object.setPrototypeOf?Object.getPrototypeOf:function(S){return S.__proto__||Object.getPrototypeOf(S)},O(M)}function R(M,S,E){return S in M?Object.defineProperty(M,S,{value:E,enumerable:!0,configurable:!0,writable:!0}):M[S]=E,M}var P=function(M){v(E,M);var S=T(E);function E(D){var C;m(this,E),C=S.call(this,D),R(x(C),"thumbsRef",void 0),R(x(C),"carouselWrapperRef",void 0),R(x(C),"listRef",void 0),R(x(C),"itemsRef",void 0),R(x(C),"timer",void 0),R(x(C),"animationHandler",void 0),R(x(C),"setThumbsRef",function(B){C.thumbsRef=B}),R(x(C),"setCarouselWrapperRef",function(B){C.carouselWrapperRef=B}),R(x(C),"setListRef",function(B){C.listRef=B}),R(x(C),"setItemsRef",function(B,J){C.itemsRef||(C.itemsRef=[]),C.itemsRef[J]=B}),R(x(C),"autoPlay",function(){e.Children.count(C.props.children)<=1||(C.clearAutoPlay(),C.props.autoPlay&&(C.timer=setTimeout(function(){C.increment()},C.props.interval)))}),R(x(C),"clearAutoPlay",function(){C.timer&&clearTimeout(C.timer)}),R(x(C),"resetAutoPlay",function(){C.clearAutoPlay(),C.autoPlay()}),R(x(C),"stopOnHover",function(){C.setState({isMouseEntered:!0},C.clearAutoPlay)}),R(x(C),"startOnLeave",function(){C.setState({isMouseEntered:!1},C.autoPlay)}),R(x(C),"isFocusWithinTheCarousel",function(){return C.carouselWrapperRef?!!((0,r.default)().activeElement===C.carouselWrapperRef||C.carouselWrapperRef.contains((0,r.default)().activeElement)):!1}),R(x(C),"navigateWithKeyboard",function(B){if(C.isFocusWithinTheCarousel()){var J=C.props.axis,ae=J==="horizontal",ne={ArrowUp:38,ArrowRight:39,ArrowDown:40,ArrowLeft:37},U=ae?ne.ArrowRight:ne.ArrowDown,re=ae?ne.ArrowLeft:ne.ArrowUp;U===B.keyCode?C.increment():re===B.keyCode&&C.decrement()}}),R(x(C),"updateSizes",function(){if(!(!C.state.initialized||!C.itemsRef||C.itemsRef.length===0)){var B=C.props.axis==="horizontal",J=C.itemsRef[0];if(J){var ae=B?J.clientWidth:J.clientHeight;C.setState({itemSize:ae}),C.thumbsRef&&C.thumbsRef.updateSizes()}}}),R(x(C),"setMountState",function(){C.setState({hasMount:!0}),C.updateSizes()}),R(x(C),"handleClickItem",function(B,J){if(e.Children.count(C.props.children)!==0){if(C.state.cancelClick){C.setState({cancelClick:!1});return}C.props.onClickItem(B,J),B!==C.state.selectedItem&&C.setState({selectedItem:B})}}),R(x(C),"handleOnChange",function(B,J){e.Children.count(C.props.children)<=1||C.props.onChange(B,J)}),R(x(C),"handleClickThumb",function(B,J){C.props.onClickThumb(B,J),C.moveTo(B)}),R(x(C),"onSwipeStart",function(B){C.setState({swiping:!0}),C.props.onSwipeStart(B)}),R(x(C),"onSwipeEnd",function(B){C.setState({swiping:!1,cancelClick:!1,swipeMovementStarted:!1}),C.props.onSwipeEnd(B),C.clearAutoPlay(),C.state.autoPlay&&C.autoPlay()}),R(x(C),"onSwipeMove",function(B,J){C.props.onSwipeMove(J);var ae=C.props.swipeAnimationHandler(B,C.props,C.state,C.setState.bind(x(C)));return C.setState(g({},ae)),!!Object.keys(ae).length}),R(x(C),"decrement",function(){var B=arguments.length>0&&arguments[0]!==void 0?arguments[0]:1;C.moveTo(C.state.selectedItem-(typeof B=="number"?B:1))}),R(x(C),"increment",function(){var B=arguments.length>0&&arguments[0]!==void 0?arguments[0]:1;C.moveTo(C.state.selectedItem+(typeof B=="number"?B:1))}),R(x(C),"moveTo",function(B){if(typeof B=="number"){var J=e.Children.count(C.props.children)-1;B<0&&(B=C.props.infiniteLoop?J:0),B>J&&(B=C.props.infiniteLoop?0:J),C.selectItem({selectedItem:B}),C.state.autoPlay&&C.state.isMouseEntered===!1&&C.resetAutoPlay()}}),R(x(C),"onClickNext",function(){C.increment(1)}),R(x(C),"onClickPrev",function(){C.decrement(1)}),R(x(C),"onSwipeForward",function(){C.increment(1),C.props.emulateTouch&&C.setState({cancelClick:!0})}),R(x(C),"onSwipeBackwards",function(){C.decrement(1),C.props.emulateTouch&&C.setState({cancelClick:!0})}),R(x(C),"changeItem",function(B){return function(J){(!(0,l.isKeyboardEvent)(J)||J.key==="Enter")&&C.moveTo(B)}}),R(x(C),"selectItem",function(B){C.setState(g({previousItem:C.state.selectedItem},B),function(){C.setState(C.animationHandler(C.props,C.state))}),C.handleOnChange(B.selectedItem,e.Children.toArray(C.props.children)[B.selectedItem])}),R(x(C),"getInitialImage",function(){var B=C.props.selectedItem,J=C.itemsRef&&C.itemsRef[B],ae=J&&J.getElementsByTagName("img")||[];return ae[0]}),R(x(C),"getVariableItemHeight",function(B){var J=C.itemsRef&&C.itemsRef[B];if(C.state.hasMount&&J&&J.children.length){var ae=J.children[0].getElementsByTagName("img")||[];if(ae.length>0){var ne=ae[0];if(!ne.complete){var U=function de(){C.forceUpdate(),ne.removeEventListener("load",de)};ne.addEventListener("load",U)}}var re=ae[0]||J.children[0],se=re.clientHeight;return se>0?se:null}return null});var X={initialized:!1,previousItem:D.selectedItem,selectedItem:D.selectedItem,hasMount:!1,isMouseEntered:!1,autoPlay:D.autoPlay,swiping:!1,swipeMovementStarted:!1,cancelClick:!1,itemSize:1,itemListStyle:{},slideStyle:{},selectedStyle:{},prevStyle:{}};return C.animationHandler=typeof D.animationHandler=="function"&&D.animationHandler||D.animationHandler==="fade"&&s.fadeAnimationHandler||s.slideAnimationHandler,C.state=g(g({},X),C.animationHandler(D,X)),C}return y(E,[{key:"componentDidMount",value:function(){this.props.children&&this.setupCarousel()}},{key:"componentDidUpdate",value:function(D,C){!D.children&&this.props.children&&!this.state.initialized&&this.setupCarousel(),!D.autoFocus&&this.props.autoFocus&&this.forceFocus(),C.swiping&&!this.state.swiping&&this.setState(g({},this.props.stopSwipingHandler(this.props,this.state))),(D.selectedItem!==this.props.selectedItem||D.centerMode!==this.props.centerMode)&&(this.updateSizes(),this.moveTo(this.props.selectedItem)),D.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 D=this;this.bindEvents(),this.state.autoPlay&&e.Children.count(this.props.children)>1&&this.setupAutoPlay(),this.props.autoFocus&&this.forceFocus(),this.setState({initialized:!0},function(){var C=D.getInitialImage();C&&!C.complete?C.addEventListener("load",D.setMountState):D.setMountState()})}},{key:"destroyCarousel",value:function(){this.state.initialized&&(this.unbindEvents(),this.destroyAutoPlay())}},{key:"setupAutoPlay",value:function(){this.autoPlay();var D=this.carouselWrapperRef;this.props.stopOnHover&&D&&(D.addEventListener("mouseenter",this.stopOnHover),D.addEventListener("mouseleave",this.startOnLeave))}},{key:"destroyAutoPlay",value:function(){this.clearAutoPlay();var D=this.carouselWrapperRef;this.props.stopOnHover&&D&&(D.removeEventListener("mouseenter",this.stopOnHover),D.removeEventListener("mouseleave",this.startOnLeave))}},{key:"bindEvents",value:function(){(0,i.default)().addEventListener("resize",this.updateSizes),(0,i.default)().addEventListener("DOMContentLoaded",this.updateSizes),this.props.useKeyboardArrows&&(0,r.default)().addEventListener("keydown",this.navigateWithKeyboard)}},{key:"unbindEvents",value:function(){(0,i.default)().removeEventListener("resize",this.updateSizes),(0,i.default)().removeEventListener("DOMContentLoaded",this.updateSizes);var D=this.getInitialImage();D&&D.removeEventListener("load",this.setMountState),this.props.useKeyboardArrows&&(0,r.default)().removeEventListener("keydown",this.navigateWithKeyboard)}},{key:"forceFocus",value:function(){var D;(D=this.carouselWrapperRef)===null||D===void 0||D.focus()}},{key:"renderItems",value:function(D){var C=this;return this.props.children?e.Children.map(this.props.children,function(X,B){var J=B===C.state.selectedItem,ae=B===C.state.previousItem,ne=J&&C.state.selectedStyle||ae&&C.state.prevStyle||C.state.slideStyle||{};C.props.centerMode&&C.props.axis==="horizontal"&&(ne=g(g({},ne),{},{minWidth:C.props.centerSlidePercentage+"%"})),C.state.swiping&&C.state.swipeMovementStarted&&(ne=g(g({},ne),{},{pointerEvents:"none"}));var U={ref:function(re){return C.setItemsRef(re,B)},key:"itemKey"+B+(D?"clone":""),className:n.default.ITEM(!0,B===C.state.selectedItem,B===C.state.previousItem),onClick:C.handleClickItem.bind(C,B,X),style:ne};return e.default.createElement("li",U,C.props.renderItem(X,{isSelected:B===C.state.selectedItem,isPrevious:B===C.state.previousItem}))}):[]}},{key:"renderControls",value:function(){var D=this,C=this.props,X=C.showIndicators,B=C.labels,J=C.renderIndicator,ae=C.children;return X?e.default.createElement("ul",{className:"control-dots"},e.Children.map(ae,function(ne,U){return J&&J(D.changeItem(U),U===D.state.selectedItem,U,B.item)})):null}},{key:"renderStatus",value:function(){return this.props.showStatus?e.default.createElement("p",{className:"carousel-status"},this.props.statusFormatter(this.state.selectedItem+1,e.Children.count(this.props.children))):null}},{key:"renderThumbs",value:function(){return!this.props.showThumbs||!this.props.children||e.Children.count(this.props.children)===0?null:e.default.createElement(o.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))}},{key:"render",value:function(){var D=this;if(!this.props.children||e.Children.count(this.props.children)===0)return null;var C=this.props.swipeable&&e.Children.count(this.props.children)>1,X=this.props.axis==="horizontal",B=this.props.showArrows&&e.Children.count(this.props.children)>1,J=B&&(this.state.selectedItem>0||this.props.infiniteLoop)||!1,ae=B&&(this.state.selectedItem<e.Children.count(this.props.children)-1||this.props.infiniteLoop)||!1,ne=this.renderItems(!0),U=ne.shift(),re=ne.pop(),se={className:n.default.SLIDER(!0,this.state.swiping),onSwipeMove:this.onSwipeMove,onSwipeStart:this.onSwipeStart,onSwipeEnd:this.onSwipeEnd,style:this.state.itemListStyle,tolerance:this.props.swipeScrollTolerance},de={};if(X){if(se.onSwipeLeft=this.onSwipeForward,se.onSwipeRight=this.onSwipeBackwards,this.props.dynamicHeight){var fe=this.getVariableItemHeight(this.state.selectedItem);de.height=fe||"auto"}}else se.onSwipeUp=this.props.verticalSwipe==="natural"?this.onSwipeBackwards:this.onSwipeForward,se.onSwipeDown=this.props.verticalSwipe==="natural"?this.onSwipeForward:this.onSwipeBackwards,se.style=g(g({},se.style),{},{height:this.state.itemSize}),de.height=this.state.itemSize;return e.default.createElement("div",{"aria-label":this.props.ariaLabel,className:n.default.ROOT(this.props.className),ref:this.setCarouselWrapperRef,tabIndex:this.props.useKeyboardArrows?0:void 0},e.default.createElement("div",{className:n.default.CAROUSEL(!0),style:{width:this.props.width}},this.renderControls(),this.props.renderArrowPrev(this.onClickPrev,J,this.props.labels.leftArrow),e.default.createElement("div",{className:n.default.WRAPPER(!0,this.props.axis),style:de},C?e.default.createElement(t.default,f({tagName:"ul",innerRef:this.setListRef},se,{allowMouseEvents:this.props.emulateTouch}),this.props.infiniteLoop&&re,this.renderItems(),this.props.infiniteLoop&&U):e.default.createElement("ul",{className:n.default.SLIDER(!0,this.state.swiping),ref:function(Q){return D.setListRef(Q)},style:this.state.itemListStyle||{}},this.props.infiniteLoop&&re,this.renderItems(),this.props.infiniteLoop&&U)),this.props.renderArrowNext(this.onClickNext,ae,this.props.labels.rightArrow),this.renderStatus()),this.renderThumbs())}}]),E}(e.default.Component);return Tr.default=P,R(P,"displayName","Carousel"),R(P,"defaultProps",{ariaLabel:void 0,axis:"horizontal",centerSlidePercentage:80,interval:3e3,labels:{leftArrow:"previous slide / item",rightArrow:"next slide / item",item:"slide item"},onClickItem:l.noop,onClickThumb:l.noop,onChange:l.noop,onSwipeStart:function(){},onSwipeEnd:function(){},onSwipeMove:function(){return!1},preventMovementUntilSwipeScrollTolerance:!1,renderArrowPrev:function(M,S,E){return e.default.createElement("button",{type:"button","aria-label":E,className:n.default.ARROW_PREV(!S),onClick:M})},renderArrowNext:function(M,S,E){return e.default.createElement("button",{type:"button","aria-label":E,className:n.default.ARROW_NEXT(!S),onClick:M})},renderIndicator:function(M,S,E,D){return e.default.createElement("li",{className:n.default.DOT(S),onClick:M,onKeyDown:M,value:E,key:E,role:"button",tabIndex:0,"aria-label":"".concat(D," ").concat(E+1)})},renderItem:function(M){return M},renderThumbs:function(M){var S=e.Children.map(M,function(E){var D=E;if(E.type!=="img"&&(D=e.Children.toArray(E.props.children).find(function(C){return C.type==="img"})),!!D)return D});return S.filter(function(E){return E}).length===0?(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"),[]):S},statusFormatter:l.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:s.slideSwipeAnimationHandler,stopSwipingHandler:s.slideStopSwipingHandler}),Tr}var xf={},nc;function Cf(){return nc||(nc=1),xf}var oc;function kf(){return oc||(oc=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"Carousel",{enumerable:!0,get:function(){return t.default}}),Object.defineProperty(e,"CarouselProps",{enumerable:!0,get:function(){return n.CarouselProps}}),Object.defineProperty(e,"Thumbs",{enumerable:!0,get:function(){return o.default}});var t=r(yf()),n=Cf(),o=r(qs());function r(i){return i&&i.__esModule?i:{default:i}}}(Ns)),Ns}var Sf=kf(),Al,rc;function Mf(){if(rc)return Al;rc=1;var e=Ny(),t=function(){return e.Date.now()};return Al=t,Al}var Fl,ic;function lc(){if(ic)return Fl;ic=1;var e=Ph(),t=Mf(),n=Hh(),o="Expected a function",r=Math.max,i=Math.min;function l(s,a,c){var u,d,f,h,g,m,b=0,y=!1,v=!1,I=!0;if(typeof s!="function")throw new TypeError(o);a=n(a)||0,e(c)&&(y=!!c.leading,v="maxWait"in c,f=v?r(n(c.maxWait)||0,a):f,I="trailing"in c?!!c.trailing:I);function T(E){var D=u,C=d;return u=d=void 0,b=E,h=s.apply(C,D),h}function k(E){return b=E,g=setTimeout(O,a),y?T(E):h}function x(E){var D=E-m,C=E-b,X=a-D;return v?i(X,f-C):X}function L(E){var D=E-m,C=E-b;return m===void 0||D>=a||D<0||v&&C>=f}function O(){var E=t();if(L(E))return R(E);g=setTimeout(O,x(E))}function R(E){return g=void 0,I&&u?T(E):(u=d=void 0,h)}function P(){g!==void 0&&clearTimeout(g),b=0,u=m=d=g=void 0}function M(){return g===void 0?h:R(t())}function S(){var E=t(),D=L(E);if(u=arguments,d=this,m=E,D){if(g===void 0)return k(m);if(v)return clearTimeout(g),g=setTimeout(O,a),T(m)}return g===void 0&&(g=setTimeout(O,a)),h}return S.cancel=P,S.flush=M,S}return Fl=l,Fl}var Rf=lc();const ac=vo(Rf);function pn(e,t,n,o,r=!1){const i=p.useRef();i.current=t,p.useEffect(()=>{if(n===null||n.addEventListener===void 0)return;const l=n,s=a=>{var c;(c=i.current)==null||c.call(l,a)};return l.addEventListener(e,s,{passive:o,capture:r}),()=>{l.removeEventListener(e,s,{capture:r})}},[e,n,o,r])}function Ao(e,t){return e===void 0?void 0:t}const Ef=Math.PI;function sc(e){return e*Ef/180}const cc=(e,t,n)=>({x1:e-n/2,y1:t-n/2,x2:e+n/2,y2:t+n/2}),uc=(e,t,n,o,r)=>{switch(e){case"left":return Math.floor(t)+o+r/2;case"center":return Math.floor(t+n/2);case"right":return Math.floor(t+n)-o-r/2}},dc=(e,t,n)=>Math.min(e,t-n*2),hc=(e,t,n)=>n.x1<=e&&e<=n.x2&&n.y1<=t&&t<=n.y2,_l=e=>{const t=e.fgColor??"currentColor";return p.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},p.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:t,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",fill:"none",vectorEffect:"non-scaling-stroke"}),p.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:t,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",fill:"none",vectorEffect:"non-scaling-stroke"}))},If=e=>{const t=e.fgColor??"currentColor";return p.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},p.createElement("path",{d:"M19 6L10.3802 17L5.34071 11.8758",vectorEffect:"non-scaling-stroke",stroke:t,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}))};function Tf(e,t,n){const[o,r]=p.useState(e),i=p.useRef(!0);p.useEffect(()=>()=>{i.current=!1},[]);const l=p.useRef(ac(s=>{i.current&&r(s)},n));return p.useLayoutEffect(()=>{i.current&&l.current(()=>e())},t),o}const Of="\u0591-\u07FF\uFB1D-\uFDFD\uFE70-\uFEFC",Df="A-Za-z\xC0-\xD6\xD8-\xF6\xF8-\u02B8\u0300-\u0590\u0800-\u1FFF\u200E\u2C00-\uFB1C\uFE00-\uFE6F\uFEFD-\uFFFF",zf=new RegExp("^[^"+Df+"]*["+Of+"]");function Nl(e){return zf.test(e)?"rtl":"not-rtl"}let xi;function Bl(){if(typeof document>"u")return 0;if(xi!==void 0)return xi;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 o=e.offsetWidth;return n===o&&(o=t.clientWidth),t.remove(),xi=n-o,xi}const Fo=Symbol();function Lf(e){const t=p.useRef([Fo,e]);t.current[1]!==e&&(t.current[0]=e),t.current[1]=e;const[n,o]=p.useState(e),[,r]=p.useState(),i=p.useCallback(s=>{const a=t.current[0];a!==Fo&&(s=typeof s=="function"?s(a):s,s===a)||(a!==Fo&&r({}),o(c=>typeof s=="function"?s(a===Fo?c:a):s),t.current[0]=Fo)},[]),l=p.useCallback(()=>{t.current[0]=Fo,r({})},[]);return[t.current[0]===Fo?n:t.current[0],i,l]}function fc(e){if(e.length===0)return"";let t=0,n=0;for(const o of e){if(n+=o.length,n>1e4)break;t++}return e.slice(0,t).join(", ")}function Pf(e){const t=p.useRef(e);return tr(e,t.current)||(t.current=e),t.current}const Hf=e=>{const{urls:t,canWrite:n,onEditClick:o,renderImage:r}=e,i=t.filter(s=>s!=="");if(i.length===0)return null;const l=i.length>1;return p.createElement(gf,{"data-testid":"GDG-default-image-overlay-editor"},p.createElement(Sf.Carousel,{showArrows:l,showThumbs:!1,swipeable:l,emulateTouch:l,infiniteLoop:l},i.map(s=>{const a=(r==null?void 0:r(s))??p.createElement("img",{draggable:!1,src:s});return p.createElement("div",{className:"gdg-centering-container",key:s},a)})),n&&o&&p.createElement("button",{className:"gdg-edit-icon",onClick:o},p.createElement(_l,null)))};function pc(){return{async:!1,baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,hooks:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}let _o=pc();function Af(e){_o=e}const gc=/[&<>"']/,Ff=new RegExp(gc.source,"g"),mc=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,_f=new RegExp(mc.source,"g"),Nf={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},vc=e=>Nf[e];function vn(e,t){if(t){if(gc.test(e))return e.replace(Ff,vc)}else if(mc.test(e))return e.replace(_f,vc);return e}const Bf=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function bc(e){return e.replace(Bf,(t,n)=>(n=n.toLowerCase(),n==="colon"?":":n.charAt(0)==="#"?n.charAt(1)==="x"?String.fromCharCode(parseInt(n.substring(2),16)):String.fromCharCode(+n.substring(1)):""))}const Vf=/(^|[^\[])\^/g;function Nt(e,t){e=typeof e=="string"?e:e.source,t=t||"";const n={replace:(o,r)=>(r=r.source||r,r=r.replace(Vf,"$1"),e=e.replace(o,r),n),getRegex:()=>new RegExp(e,t)};return n}const $f=/[^\w:]/g,Wf=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function wc(e,t,n){if(e){let o;try{o=decodeURIComponent(bc(n)).replace($f,"").toLowerCase()}catch{return null}if(o.indexOf("javascript:")===0||o.indexOf("vbscript:")===0||o.indexOf("data:")===0)return null}t&&!Wf.test(n)&&(n=Xf(t,n));try{n=encodeURI(n).replace(/%25/g,"%")}catch{return null}return n}const Ci={},jf=/^[^:]+:\/*[^/]*$/,Uf=/^([^:]+:)[\s\S]*$/,Yf=/^([^:]+:\/*[^/]*)[\s\S]*$/;function Xf(e,t){Ci[" "+e]||(jf.test(e)?Ci[" "+e]=e+"/":Ci[" "+e]=Si(e,"/",!0)),e=Ci[" "+e];const n=e.indexOf(":")===-1;return t.substring(0,2)==="//"?n?t:e.replace(Uf,"$1")+t:t.charAt(0)==="/"?n?t:e.replace(Yf,"$1")+t:e+t}const ki={exec:function(){}};function yc(e,t){const n=e.replace(/\|/g,(i,l,s)=>{let a=!1,c=l;for(;--c>=0&&s[c]==="\\";)a=!a;return a?"|":" |"}),o=n.split(/ \|/);let r=0;if(o[0].trim()||o.shift(),o.length>0&&!o[o.length-1].trim()&&o.pop(),o.length>t)o.splice(t);else for(;o.length<t;)o.push("");for(;r<o.length;r++)o[r]=o[r].trim().replace(/\\\|/g,"|");return o}function Si(e,t,n){const o=e.length;if(o===0)return"";let r=0;for(;r<o;){const i=e.charAt(o-r-1);if(i===t&&!n)r++;else if(i!==t&&n)r++;else break}return e.slice(0,o-r)}function Gf(e,t){if(e.indexOf(t[1])===-1)return-1;const n=e.length;let o=0,r=0;for(;r<n;r++)if(e[r]==="\\")r++;else if(e[r]===t[0])o++;else if(e[r]===t[1]&&(o--,o<0))return r;return-1}function Kf(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 xc(e,t){if(t<1)return"";let n="";for(;t>1;)t&1&&(n+=e),t>>=1,e+=e;return n+e}function Cc(e,t,n,o){const r=t.href,i=t.title?vn(t.title):null,l=e[1].replace(/\\([\[\]])/g,"$1");if(e[0].charAt(0)!=="!"){o.state.inLink=!0;const s={type:"link",raw:n,href:r,title:i,text:l,tokens:o.inlineTokens(l)};return o.state.inLink=!1,s}return{type:"image",raw:n,href:r,title:i,text:vn(l)}}function qf(e,t){const n=e.match(/^(\s+)(?:```)/);if(n===null)return t;const o=n[1];return t.split(`
3
3
  `).map(r=>{const i=r.match(/^\s+/);if(i===null)return r;const[l]=i;return l.length>=o.length?r.slice(o.length):r}).join(`
4
4
  `)}class Vl{constructor(t){this.options=t||_o}space(t){const n=this.rules.block.newline.exec(t);if(n&&n[0].length>0)return{type:"space",raw:n[0]}}code(t){const n=this.rules.block.code.exec(t);if(n){const o=n[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:n[0],codeBlockStyle:"indented",text:this.options.pedantic?o:Si(o,`
5
5
  `)}}}fences(t){const n=this.rules.block.fences.exec(t);if(n){const o=n[0],r=qf(o,n[3]||"");return{type:"code",raw:o,lang:n[2]?n[2].trim().replace(this.rules.inline._escapes,"$1"):n[2],text:r}}}heading(t){const n=this.rules.block.heading.exec(t);if(n){let o=n[2].trim();if(/#$/.test(o)){const r=Si(o,"#");(this.options.pedantic||!r||/ $/.test(r))&&(o=r.trim())}return{type:"heading",raw:n[0],depth:n[1].length,text:o,tokens:this.lexer.inline(o)}}}hr(t){const n=this.rules.block.hr.exec(t);if(n)return{type:"hr",raw:n[0]}}blockquote(t){const n=this.rules.block.blockquote.exec(t);if(n){const o=n[0].replace(/^ *>[ \t]?/gm,""),r=this.lexer.state.top;this.lexer.state.top=!0;const i=this.lexer.blockTokens(o);return this.lexer.state.top=r,{type:"blockquote",raw:n[0],tokens:i,text:o}}}list(t){let n=this.rules.block.list.exec(t);if(n){let o,r,i,l,s,a,c,u,d,f,h,g,m=n[1].trim();const b=m.length>1,y={type:"list",raw:"",ordered:b,start:b?+m.slice(0,-1):"",loose:!1,items:[]};m=b?`\\d{1,9}\\${m.slice(-1)}`:`\\${m}`,this.options.pedantic&&(m=b?m:"[*+-]");const v=new RegExp(`^( {0,3}${m})((?:[ ][^\\n]*)?(?:\\n|$))`);for(;t&&(g=!1,!(!(n=v.exec(t))||this.rules.block.hr.test(t)));){if(o=n[0],t=t.substring(o.length),u=n[2].split(`
@@ -169,10 +169,10 @@ Please report this to https://github.com/markedjs/marked.`,e){const r="<p>An err
169
169
  `?(o.push(e.slice(r,l)),r=l+1,s===`
170
170
  `&&(n.push(o),o=[])):s==='"'&&(i=t.inString);break;case t.inString:s==='"'&&(i=t.inStringPostQuote);break;case t.inStringPostQuote:s==='"'?i=t.inString:((s===" "||s===`
171
171
  `)&&(o.push(yu(e.slice(r,l))),r=l+1,s===`
172
- `&&(n.push(o),o=[])),i=t.None);break}l++}return r<e.length&&o.push(yu(e.slice(r,e.length))),n.push(o),n.map(s=>s.map(a=>({rawValue:a,formatted:a,format:"string"})))}function xu(e,t,n){var o;const r=hg(e,t),i=a=>{var c;(c=window.navigator.clipboard)==null||c.writeText(a)},l=(a,c)=>{var u;return((u=window.navigator.clipboard)==null?void 0:u.write)===void 0?!1:(window.navigator.clipboard.write([new ClipboardItem({"text/plain":new Blob([a],{type:"text/plain"}),"text/html":new Blob([c],{type:"text/html"})})]),!0)},s=(a,c)=>{var u,d;try{if(n===void 0||n.clipboardData===null)throw new Error("No clipboard data");(u=n==null?void 0:n.clipboardData)==null||u.setData("text/plain",a),(d=n==null?void 0:n.clipboardData)==null||d.setData("text/html",c)}catch{l(a,c)||i(a)}};((o=window.navigator.clipboard)==null?void 0:o.write)!==void 0||(n==null?void 0:n.clipboardData)!==void 0?s(r.textPlain,r.textHtml):i(r.textPlain),n==null||n.preventDefault()}function Cu(e){return e!==!0}function ku(e){return typeof e=="string"?e:`${e}px`}const gg=()=>e=>e.innerWidth,mg=()=>e=>e.innerHeight,vg=cn("div")({name:"Wrapper",class:"gdg-wmyidgi",propsAsIs:!1,vars:{"wmyidgi-0":[gg()],"wmyidgi-1":[mg()]}}),bg=e=>{const{inWidth:t,inHeight:n,children:o,...r}=e;return p.createElement(vg,{innerHeight:ku(n),innerWidth:ku(t),...r},o)},wg=2,yg=1300;function xg(e,t,n){const o=te.useRef(0),[r,i]=e??[0,0];te.useEffect(()=>{if(r===0&&i===0){o.current=0;return}let l=!1,s=0;const a=c=>{var u;if(!l){if(s===0)s=c;else{const d=c-s;o.current=Math.min(1,o.current+d/yg);const f=o.current**1.618*d*wg;(u=t.current)==null||u.scrollBy(r*f,i*f),s=c,n==null||n()}window.requestAnimationFrame(a)}};return window.requestAnimationFrame(a),()=>{l=!0}},[t,r,i,n])}function Cg({rowHeight:e,headerHeight:t,groupHeaderHeight:n,theme:o,overscrollX:r,overscrollY:i,scaleToRem:l,remSize:s}){const[a,c,u,d,f,h]=te.useMemo(()=>{if(!l||s===16)return[e,t,n,o,r,i];const g=s/16,m=e,b=Wc();return[typeof m=="number"?m*g:y=>Math.ceil(m(y)*g),Math.ceil(t*g),Math.ceil(n*g),{...o,headerIconSize:((o==null?void 0:o.headerIconSize)??b.headerIconSize)*g,cellHorizontalPadding:((o==null?void 0:o.cellHorizontalPadding)??b.cellHorizontalPadding)*g,cellVerticalPadding:((o==null?void 0:o.cellVerticalPadding)??b.cellVerticalPadding)*g},Math.ceil((r??0)*g),Math.ceil((i??0)*g)]},[n,t,r,i,s,e,l,o]);return{rowHeight:a,headerHeight:c,groupHeaderHeight:u,theme:d,overscrollX:f,overscrollY:h}}const Ro={downFill:!1,rightFill:!1,clear:!0,closeOverlay:!0,acceptOverlayDown:!0,acceptOverlayUp:!0,acceptOverlayLeft:!0,acceptOverlayRight:!0,copy:!0,paste:!0,cut:!0,search:!1,delete:!0,activateCell:!0,scrollToSelectedCell:!0,goToFirstCell:!0,goToFirstColumn:!0,goToFirstRow:!0,goToLastCell:!0,goToLastColumn:!0,goToLastRow:!0,goToNextPage:!0,goToPreviousPage:!0,selectToFirstCell:!0,selectToFirstColumn:!0,selectToFirstRow:!0,selectToLastCell:!0,selectToLastColumn:!0,selectToLastRow:!0,selectAll:!0,selectRow:!0,selectColumn:!0,goUpCell:!0,goRightCell:!0,goDownCell:!0,goLeftCell:!0,goUpCellRetainSelection:!0,goRightCellRetainSelection:!0,goDownCellRetainSelection:!0,goLeftCellRetainSelection:!0,selectGrowUp:!0,selectGrowRight:!0,selectGrowDown:!0,selectGrowLeft:!0};function ct(e,t){return e===!0?t:e===!1?"":e}function Su(e){const t=Di.value;return{activateCell:ct(e.activateCell," |Enter|shift+Enter"),clear:ct(e.clear,"any+Escape"),closeOverlay:ct(e.closeOverlay,"any+Escape"),acceptOverlayDown:ct(e.acceptOverlayDown,"Enter"),acceptOverlayUp:ct(e.acceptOverlayUp,"shift+Enter"),acceptOverlayLeft:ct(e.acceptOverlayLeft,"shift+Tab"),acceptOverlayRight:ct(e.acceptOverlayRight,"Tab"),copy:e.copy,cut:e.cut,delete:ct(e.delete,t?"Backspace|Delete":"Delete"),downFill:ct(e.downFill,"primary+_68"),scrollToSelectedCell:ct(e.scrollToSelectedCell,"primary+Enter"),goDownCell:ct(e.goDownCell,"ArrowDown"),goDownCellRetainSelection:ct(e.goDownCellRetainSelection,"alt+ArrowDown"),goLeftCell:ct(e.goLeftCell,"ArrowLeft|shift+Tab"),goLeftCellRetainSelection:ct(e.goLeftCellRetainSelection,"alt+ArrowLeft"),goRightCell:ct(e.goRightCell,"ArrowRight|Tab"),goRightCellRetainSelection:ct(e.goRightCellRetainSelection,"alt+ArrowRight"),goUpCell:ct(e.goUpCell,"ArrowUp"),goUpCellRetainSelection:ct(e.goUpCellRetainSelection,"alt+ArrowUp"),goToFirstCell:ct(e.goToFirstCell,"primary+Home"),goToFirstColumn:ct(e.goToFirstColumn,"Home|primary+ArrowLeft"),goToFirstRow:ct(e.goToFirstRow,"primary+ArrowUp"),goToLastCell:ct(e.goToLastCell,"primary+End"),goToLastColumn:ct(e.goToLastColumn,"End|primary+ArrowRight"),goToLastRow:ct(e.goToLastRow,"primary+ArrowDown"),goToNextPage:ct(e.goToNextPage,"PageDown"),goToPreviousPage:ct(e.goToPreviousPage,"PageUp"),paste:e.paste,rightFill:ct(e.rightFill,"primary+_82"),search:ct(e.search,"primary+f"),selectAll:ct(e.selectAll,"primary+a"),selectColumn:ct(e.selectColumn,"ctrl+ "),selectGrowDown:ct(e.selectGrowDown,"shift+ArrowDown"),selectGrowLeft:ct(e.selectGrowLeft,"shift+ArrowLeft"),selectGrowRight:ct(e.selectGrowRight,"shift+ArrowRight"),selectGrowUp:ct(e.selectGrowUp,"shift+ArrowUp"),selectRow:ct(e.selectRow,"shift+ "),selectToFirstCell:ct(e.selectToFirstCell,"primary+shift+Home"),selectToFirstColumn:ct(e.selectToFirstColumn,"primary+shift+ArrowLeft"),selectToFirstRow:ct(e.selectToFirstRow,"primary+shift+ArrowUp"),selectToLastCell:ct(e.selectToLastCell,"primary+shift+End"),selectToLastColumn:ct(e.selectToLastColumn,"primary+shift+ArrowRight"),selectToLastRow:ct(e.selectToLastRow,"primary+shift+ArrowDown")}}function kg(e){const t=Pf(e);return te.useMemo(()=>{if(t===void 0)return Su(Ro);const n={...t,goToNextPage:(t==null?void 0:t.goToNextPage)??(t==null?void 0:t.pageDown)??Ro.goToNextPage,goToPreviousPage:(t==null?void 0:t.goToPreviousPage)??(t==null?void 0:t.pageUp)??Ro.goToPreviousPage,goToFirstCell:(t==null?void 0:t.goToFirstCell)??(t==null?void 0:t.first)??Ro.goToFirstCell,goToLastCell:(t==null?void 0:t.goToLastCell)??(t==null?void 0:t.last)??Ro.goToLastCell,selectToFirstCell:(t==null?void 0:t.selectToFirstCell)??(t==null?void 0:t.first)??Ro.selectToFirstCell,selectToLastCell:(t==null?void 0:t.selectToLastCell)??(t==null?void 0:t.last)??Ro.selectToLastCell};return Su({...Ro,...n})},[t])}function Sg(e){function t(n,o,r){if(typeof n=="number")return{headerIndex:n,isCollapsed:!1,depth:o,path:r};const i={headerIndex:n.headerIndex,isCollapsed:n.isCollapsed,depth:o,path:r};return n.subGroups!==void 0&&(i.subGroups=n.subGroups.map((l,s)=>t(l,o+1,[...r,s])).sort((l,s)=>l.headerIndex-s.headerIndex)),i}return e.map((n,o)=>t(n,0,[o])).sort((n,o)=>n.headerIndex-o.headerIndex)}function ua(e,t){const n=[];function o(l,s,a=!1){let c=s!==null?s-l.headerIndex:t-l.headerIndex;if(l.subGroups!==void 0&&(c=l.subGroups[0].headerIndex-l.headerIndex),c--,n.push({headerIndex:l.headerIndex,contentIndex:-1,skip:a,isCollapsed:l.isCollapsed,depth:l.depth,path:l.path,rows:c}),l.subGroups)for(let u=0;u<l.subGroups.length;u++){const d=u<l.subGroups.length-1?l.subGroups[u+1].headerIndex:s;o(l.subGroups[u],d,a||l.isCollapsed)}}const r=Sg(e.groups);for(let l=0;l<r.length;l++){const s=l<r.length-1?r[l+1].headerIndex:null;o(r[l],s)}let i=0;for(const l of n)l.contentIndex=i,i+=l.rows;return n.filter(l=>l.skip===!1).map(l=>{const{skip:s,...a}=l;return a})}function Li(e,t){if(t===void 0||ua.length===0)return{path:[e],originalIndex:e,isGroupHeader:!1,groupIndex:e,contentIndex:e,groupRows:-1};let n=e;for(const o of t){if(n===0)return{path:[...o.path,-1],originalIndex:o.headerIndex,isGroupHeader:!0,groupIndex:-1,contentIndex:-1,groupRows:o.rows};if(n--,!o.isCollapsed){if(n<o.rows)return{path:[...o.path,n],originalIndex:o.headerIndex+n,isGroupHeader:!1,groupIndex:n,contentIndex:o.contentIndex+n,groupRows:o.rows};n-=o.rows}}return{path:[e],originalIndex:e,isGroupHeader:!1,groupIndex:e,contentIndex:e,groupRows:-1}}function Mg(e,t,n,o){const r=te.useMemo(()=>e===void 0?void 0:ua(e,t),[e,t]),i=te.useMemo(()=>r===void 0?t:r.reduce((c,u)=>c+(u.isCollapsed?1:u.rows+1),0),[r,t]),l=te.useMemo(()=>e===void 0||typeof n=="number"&&e.height===n?n:c=>{const{isGroupHeader:u}=Li(c,r);return u?e.height:typeof n=="number"?n:n(c)},[r,e,n]),s=te.useCallback(c=>{if(r===void 0)return c;let u=c;for(const d of r){if(u===0)return;if(u--,!d.isCollapsed){if(u<d.rows)return d.contentIndex+u;u-=d.rows}}return c},[r]),a=Ao(o??(e==null?void 0:e.themeOverride),te.useCallback(c=>{if(e===void 0)return o==null?void 0:o(c,c,c);if(o===void 0&&(e==null?void 0:e.themeOverride)===void 0)return;const{isGroupHeader:u,contentIndex:d,groupIndex:f}=Li(c,r);return u?e.themeOverride:o==null?void 0:o(c,f,d)},[r,o,e]));return e===void 0?{rowHeight:l,rows:t,rowNumberMapper:s,getRowThemeOverride:a}:{rowHeight:l,rows:i,rowNumberMapper:s,getRowThemeOverride:a}}function Rg(e,t){const n=te.useMemo(()=>e===void 0?void 0:ua(e,t),[e,t]);return{getRowGroupingForPath:Ru,updateRowGroupingByPath:Mu,mapper:te.useCallback(o=>{if(typeof o=="number")return Li(o,n);const r=Li(o[1],n);return{...r,originalIndex:[o[0],r.originalIndex]}},[n])}}function Mu(e,t,n){const[o,...r]=t;return r[0]===-1?e.map((i,l)=>l===o?{...i,...n}:i):e.map((i,l)=>l===o?{...i,subGroups:Mu(i.subGroups??[],r,n)}:i)}function Ru(e,t){const[n,...o]=t;return o[0]===-1?e[n]:Ru(e[n].subGroups??[],o)}function Eg(e,t){const[n]=p.useState(()=>({value:e,callback:t,facade:{get current(){return n.value},set current(o){const r=n.value;r!==o&&(n.value=o,n.callback(o,r))}}}));return n.callback=t,n.facade}function Ig(e,t,n,o,r){const[i,l]=p.useMemo(()=>[t!==void 0&&typeof n=="number"?Math.floor(t/n):0,t!==void 0&&typeof n=="number"?-(t%n):0],[t,n]),s=p.useMemo(()=>({x:o.current.x,y:i,width:o.current.width??1,height:o.current.height??1,ty:l}),[o,l,i]),[a,c,u]=Lf(s),d=p.useRef(r);d.current=r;const f=Eg(null,m=>{m!==null&&t!==void 0?m.scrollTop=t:m!==null&&e!==void 0&&(m.scrollLeft=e)}),h=(a.height??1)>1;p.useLayoutEffect(()=>{if(t!==void 0&&f.current!==null&&h){if(f.current.scrollTop===t)return;f.current.scrollTop=t,f.current.scrollTop!==t&&u(),d.current()}},[t,h,u,f]);const g=(a.width??1)>1;return p.useLayoutEffect(()=>{if(e!==void 0&&f.current!==null&&g){if(f.current.scrollLeft===e)return;f.current.scrollLeft=e,f.current.scrollLeft!==e&&u(),d.current()}},[e,g,u,f]),{visibleRegion:a,setVisibleRegion:c,scrollRef:f}}const Tg=p.lazy(async()=>await vs(()=>import("./data-grid-overlay-editor-CltKX1-_.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13])));let Og=0;function Dg(e){return Ap(Zc(Zc(e).filter(t=>t.span!==void 0).map(t=>{var n,o;return so((((n=t.span)==null?void 0:n[0])??0)+1,(((o=t.span)==null?void 0:o[1])??0)+1)})))}function Pi(e,t){return e===void 0||t===0||e.columns.length===0&&e.current===void 0?e:{current:e.current===void 0?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(n=>({...n,x:n.x+t}))},rows:e.rows,columns:e.columns.offset(t)}}const Hi={kind:Z.Loading,allowOverlay:!1},Ai={columns:vt.empty(),rows:vt.empty(),current:void 0},zg=(e,t)=>{var n,o,r;const[i,l]=p.useState(Ai),[s,a]=p.useState(),c=p.useRef(null),u=p.useRef(null),[d,f]=p.useState(),h=p.useRef(),g=typeof window>"u"?null:window,{imageEditorOverride:m,getRowThemeOverride:b,markdownDivCreateNode:y,width:v,height:I,columns:T,rows:k,getCellContent:x,onCellClicked:L,onCellActivated:O,onFillPattern:R,onFinishedEditing:P,coercePasteValue:M,drawHeader:S,drawCell:E,editorBloom:D,onHeaderClicked:C,onColumnProposeMove:X,rangeSelectionColumnSpanning:B=!0,spanRangeBehavior:J="default",onGroupHeaderClicked:ae,onCellContextMenu:ne,className:U,onHeaderContextMenu:re,getCellsForSelection:se,onGroupHeaderContextMenu:de,onGroupHeaderRenamed:fe,onCellEdited:Q,onCellsEdited:N,onSearchResultsChanged:z,searchResults:j,onSearchValueChange:ge,searchValue:ke,onKeyDown:Fe,onKeyUp:xe,keybindings:De,editOnType:_e=!0,onRowAppended:et,onColumnMoved:Pt,validateCell:Mt,highlightRegions:we,rangeSelect:be="rect",columnSelect:me="multi",rowSelect:ie="multi",rangeSelectionBlending:Ee="exclusive",columnSelectionBlending:Ie="exclusive",rowSelectionBlending:je="exclusive",onDelete:tt,onDragStart:Rt,onMouseMove:ce,onPaste:it,copyHeaders:at=!1,freezeColumns:Re=0,cellActivationBehavior:Tt="second-click",rowSelectionMode:Xt="auto",onHeaderMenuClick:Ne,onHeaderIndicatorClick:nt,getGroupDetails:kt,rowGrouping:Et,onSearchClose:qt,onItemHovered:un,onSelectionCleared:an,showSearch:Bt,onVisibleRegionChanged:wt,gridSelection:Ot,onGridSelectionChange:In,minColumnWidth:Cn=50,maxColumnWidth:ot=500,maxColumnAutoWidth:sn,provideEditor:bn,trailingRowOptions:yt,freezeTrailingRows:Zt=0,allowedFillDirections:ut="orthogonal",scrollOffsetX:Vt,scrollOffsetY:$t,verticalBorder:rn,onDragOverCell:Ft,onDrop:Jt,onColumnResize:Ue,onColumnResizeEnd:Ht,onColumnResizeStart:kn,customRenderers:At,fillHandle:Wt,experimental:jt,fixedShadowX:oo,fixedShadowY:jn,headerIcons:_,imageWindowLoader:qe,initialSize:Je,isDraggable:pe,onDragLeave:rt,onRowMoved:Dt,overscrollX:dn,overscrollY:en,preventDiagonalScrolling:tn,rightElement:Sn,rightElementProps:wn,trapFocus:ho=!1,smoothScrollX:ro,smoothScrollY:Ga,scaleToRem:Ka=!1,rowHeight:sr=34,headerHeight:fo=36,groupHeaderHeight:qa=fo,theme:Za,isOutsideClick:nl,renderers:cr,resizeIndicator:ur,scrollToActiveCell:ti=!0,drawFocusRing:dr=!0}=e,ni=dr==="no-editor"?s===void 0:dr,gn=typeof e.rowMarkers=="string"?void 0:e.rowMarkers,hn=(gn==null?void 0:gn.kind)??e.rowMarkers??"none",Io=(gn==null?void 0:gn.width)??e.rowMarkerWidth,hr=(gn==null?void 0:gn.startIndex)??e.rowMarkerStartIndex??1,To=(gn==null?void 0:gn.theme)??e.rowMarkerTheme,fr=gn==null?void 0:gn.headerTheme,oi=gn==null?void 0:gn.headerAlwaysVisible,ri=ie!=="multi",Uo=(gn==null?void 0:gn.checkboxStyle)??"square",Oo=Math.max(Cn,20),pr=Math.max(ot,Oo),ol=Math.max(sn??pr,Oo),ii=p.useMemo(()=>typeof window>"u"?{fontSize:"16px"}:window.getComputedStyle(document.documentElement),[]),{rows:Ye,rowNumberMapper:li,rowHeight:Ja,getRowThemeOverride:po}=Mg(Et,k,sr,b),Qa=p.useMemo(()=>Number.parseFloat(ii.fontSize),[ii]),{rowHeight:io,headerHeight:ai,groupHeaderHeight:gr,theme:rl,overscrollX:es,overscrollY:ts}=Cg({groupHeaderHeight:qa,headerHeight:fo,overscrollX:dn,overscrollY:en,remSize:Qa,rowHeight:Ja,scaleToRem:Ka,theme:Za}),lo=kg(De),go=Io??(k>1e4?48:k>1e3?44:k>100?36:32),Mn=hn!=="none",W=Mn?1:0,Gt=et!==void 0,Yo=(yt==null?void 0:yt.sticky)===!0,[mr,il]=p.useState(!1),vr=Bt??mr,ns=p.useCallback(()=>{qt!==void 0?qt():il(!1)},[qt]),K=p.useMemo(()=>Ot===void 0?void 0:Pi(Ot,W),[Ot,W])??i,F=p.useRef();F.current===void 0&&(F.current=new AbortController),p.useEffect(()=>()=>F==null?void 0:F.current.abort(),[]);const[ee,Te]=lg(se,x,W,F.current,Ye),Se=p.useCallback((w,H,$)=>{if(Mt===void 0)return!0;const G=[w[0]-W,w[1]];return Mt==null?void 0:Mt(G,H,$)},[W,Mt]),Pe=p.useRef(Ot),he=p.useCallback((w,H)=>{H&&(w=fg(w,ee,W,J,F.current)),In!==void 0?(Pe.current=Pi(w,-W),In(Pe.current)):l(w)},[In,ee,W,J]),Le=Ao(Ue,p.useCallback((w,H,$,G)=>{Ue==null||Ue(T[$-W],H,$-W,G)},[Ue,W,T])),lt=Ao(Ht,p.useCallback((w,H,$,G)=>{Ht==null||Ht(T[$-W],H,$-W,G)},[Ht,W,T])),xt=Ao(kn,p.useCallback((w,H,$,G)=>{kn==null||kn(T[$-W],H,$-W,G)},[kn,W,T])),zt=Ao(S,p.useCallback((w,H)=>(S==null?void 0:S({...w,columnIndex:w.columnIndex-W},H))??!1,[S,W])),ye=Ao(E,p.useCallback((w,H)=>(E==null?void 0:E({...w,col:w.col-W},H))??!1,[E,W])),ft=p.useCallback(w=>{if(tt!==void 0){const H=tt(Pi(w,-W));return typeof H=="boolean"?H:Pi(H,W)}return!0},[tt,W]),[Ze,Ge,pt]=ig(K,he,Ee,Ie,je,be,B),_t=p.useMemo(()=>co(Wc(),rl),[rl]),[nn,Un]=p.useState([0,0,0]),Yn=p.useMemo(()=>{if(cr===void 0)return{};const w={};for(const H of cr)w[H.kind]=H;return w},[cr]),Kt=p.useCallback(w=>w.kind!==Z.Custom?Yn[w.kind]:At==null?void 0:At.find(H=>H.isMatch(w)),[At,Yn]);let{sizedColumns:dt,nonGrowWidth:Tn}=Ep(T,Ye,Te,nn[0]-(W===0?0:go)-nn[2],Oo,ol,_t,Kt,F.current);hn!=="none"&&(Tn+=go);const On=p.useMemo(()=>dt.some(w=>w.group!==void 0),[dt]),Xn=On?ai+gr:ai,Gn=K.rows.length,br=hn==="none"?void 0:Gn===0?!1:Gn===Ye?!0:void 0,Ct=p.useMemo(()=>hn==="none"?dt:[{title:"",width:go,icon:void 0,hasMenu:!1,style:"normal",themeOverride:To,rowMarker:Uo,rowMarkerChecked:br,headerRowMarkerTheme:fr,headerRowMarkerAlwaysVisible:oi,headerRowMarkerDisabled:ri},...dt],[hn,dt,go,To,Uo,br,fr,oi,ri]),Hn=p.useRef({height:1,width:1,x:0,y:0}),ll=p.useRef(!1),{setVisibleRegion:wh,visibleRegion:Xo,scrollRef:Qt}=Ig(Vt,$t,io,Hn,()=>ll.current=!0);Hn.current=Xo;const ly=Xo.x+W,al=Xo.y,Dn=p.useRef(null),Rn=p.useCallback(w=>{var H;w===!0?(H=Dn.current)==null||H.focus():window.requestAnimationFrame(()=>{var $;($=Dn.current)==null||$.focus()})},[]),yn=Gt?Ye+1:Ye,Bn=p.useCallback(w=>{const H=W===0?w:w.map(G=>({...G,location:[G.location[0]-W,G.location[1]]})),$=N==null?void 0:N(H);if($!==!0)for(const G of H)Q==null||Q(G.location,G.value);return $},[Q,N,W]),[Go,os]=p.useState(),sl=K.current!==void 0&&K.current.range.width*K.current.range.height>1?K.current.range:void 0,cl=ni?(n=K.current)==null?void 0:n.cell:void 0,ul=cl==null?void 0:cl[0],dl=cl==null?void 0:cl[1],ay=p.useMemo(()=>{if((we===void 0||we.length===0)&&(sl??ul??dl??Go)===void 0)return;const w=[];if(we!==void 0)for(const H of we){const $=Ct.length-H.range.x-W;$>0&&w.push({color:H.color,range:{...H.range,x:H.range.x+W,width:Math.min($,H.range.width)},style:H.style})}return Go!==void 0&&w.push({color:Bo(_t.accentColor,0),range:Go,style:"dashed"}),sl!==void 0&&w.push({color:Bo(_t.accentColor,.5),range:sl,style:"solid-outline"}),ul!==void 0&&dl!==void 0&&w.push({color:_t.accentColor,range:{x:ul,y:dl,width:1,height:1},style:"solid-outline"}),w.length>0?w:void 0},[Go,sl,ul,dl,we,Ct.length,_t.accentColor,W]),yh=p.useRef(Ct);yh.current=Ct;const An=p.useCallback(([w,H],$=!1)=>{var G,A,ue,oe,q,V,Y;const le=Gt&&H===yn-1;if(w===0&&Mn){if(le)return Hi;const Ce=li(H);return Ce===void 0?Hi:{kind:Fn.Marker,allowOverlay:!1,checkboxStyle:Uo,checked:(K==null?void 0:K.rows.hasIndex(H))===!0,markerKind:hn==="clickable-number"?"number":hn,row:hr+Ce,drawHandle:Dt!==void 0,cursor:hn==="clickable-number"?"pointer":void 0}}else if(le){const Ce=w===W?(yt==null?void 0:yt.hint)??"":"",ve=yh.current[w];if(((G=ve==null?void 0:ve.trailingRowOptions)==null?void 0:G.disabled)===!0)return Hi;{const ze=((A=ve==null?void 0:ve.trailingRowOptions)==null?void 0:A.hint)??Ce,Qe=((ue=ve==null?void 0:ve.trailingRowOptions)==null?void 0:ue.addIcon)??(yt==null?void 0:yt.addIcon);return{kind:Fn.NewRow,hint:ze,allowOverlay:!1,icon:Qe}}}else{const Ce=w-W;if($||(jt==null?void 0:jt.strict)===!0){const ze=Hn.current,Qe=ze.x>Ce||Ce>ze.x+ze.width||ze.y>H||H>ze.y+ze.height||H>=is.current,gt=Ce===((q=(oe=ze.extras)==null?void 0:oe.selected)==null?void 0:q[0])&&H===((V=ze.extras)==null?void 0:V.selected[1]);let Be=!1;if(((Y=ze.extras)==null?void 0:Y.freezeRegions)!==void 0){for(const He of ze.extras.freezeRegions)if(Wo(He,Ce,H)){Be=!0;break}}if(Qe&&!gt&&!Be)return Hi}let ve=x([Ce,H]);return W!==0&&ve.span!==void 0&&(ve={...ve,span:[ve.span[0]+W,ve.span[1]+W]}),ve}},[Gt,yn,Mn,li,Uo,K==null?void 0:K.rows,hn,hr,Dt,W,yt==null?void 0:yt.hint,yt==null?void 0:yt.addIcon,jt==null?void 0:jt.strict,x]),rs=p.useCallback(w=>{let H=(kt==null?void 0:kt(w))??{name:w};return fe!==void 0&&w!==""&&(H={icon:H.icon,name:H.name,overrideTheme:H.overrideTheme,actions:[...H.actions??[],{title:"Rename",icon:"renameIcon",onClick:$=>as({group:H.name,bounds:$.bounds})}]}),H},[kt,fe]),hl=p.useCallback(w=>{var H;const[$,G]=w.cell,A=Ct[$],ue=(A==null?void 0:A.group)!==void 0?(H=rs(A.group))==null?void 0:H.overrideTheme:void 0,oe=A==null?void 0:A.themeOverride,q=po==null?void 0:po(G);a({...w,theme:co(_t,ue,oe,q,w.content.themeOverride)})},[po,Ct,rs,_t]),wr=p.useCallback((w,H,$)=>{var G;if(K.current===void 0)return;const[A,ue]=K.current.cell,oe=An([A,ue]);if(oe.kind!==Z.Boolean&&oe.allowOverlay){let q=oe;if($!==void 0)switch(q.kind){case Z.Number:{const V=nf(()=>$==="-"?-0:Number.parseFloat($),0);q={...q,data:Number.isNaN(V)?0:V};break}case Z.Text:case Z.Markdown:case Z.Uri:q={...q,data:$};break}hl({target:w,content:q,initialValue:$,cell:[A,ue],highlight:$===void 0,forceEditMode:$!==void 0})}else oe.kind===Z.Boolean&&H&&oe.readonly!==!0&&(Bn([{location:K.current.cell,value:{...oe,data:Cu(oe.data)}}]),(G=Dn.current)==null||G.damage([{cell:K.current.cell}]))},[An,K,Bn,hl]),xh=p.useCallback((w,H)=>{var $;const G=($=Dn.current)==null?void 0:$.getBounds(w,H);if(G===void 0||Qt.current===null)return;const A=An([w,H]);A.allowOverlay&&hl({target:G,content:A,initialValue:void 0,highlight:!0,cell:[w,H],forceEditMode:!0})},[An,Qt,hl]),ln=p.useCallback((w,H,$="both",G=0,A=0,ue=void 0)=>{if(Qt.current!==null){const oe=Dn.current,q=u.current,V=typeof w!="number"?w.unit==="cell"?w.amount:void 0:w,Y=typeof H!="number"?H.unit==="cell"?H.amount:void 0:H,le=typeof w!="number"&&w.unit==="px"?w.amount:void 0,Ce=typeof H!="number"&&H.unit==="px"?H.amount:void 0;if(oe!==null&&q!==null){let ve={x:0,y:0,width:0,height:0},ze=0,Qe=0;if((V!==void 0||Y!==void 0)&&(ve=oe.getBounds((V??0)+W,Y??0)??ve,ve.width===0||ve.height===0))return;const gt=q.getBoundingClientRect(),Be=gt.width/q.offsetWidth;if(le!==void 0&&(ve={...ve,x:le-gt.left-Qt.current.scrollLeft,width:1}),Ce!==void 0&&(ve={...ve,y:Ce+gt.top-Qt.current.scrollTop,height:1}),ve!==void 0){const He={x:ve.x-G,y:ve.y-A,width:ve.width+2*G,height:ve.height+2*A};let St=0;for(let ps=0;ps<Re;ps++)St+=dt[ps].width;let mn=0;const fn=Zt+(Yo?1:0);fn>0&&(mn=Vo(yn,fn,io));let Jn=St*Be+gt.left+W*go*Be,ao=gt.right,Qn=gt.top+Xn*Be,mo=gt.bottom-mn*Be;const wl=ve.width+G*2;switch(ue==null?void 0:ue.hAlign){case"start":ao=Jn+wl;break;case"end":Jn=ao-wl;break;case"center":Jn=Math.floor((Jn+ao)/2)-wl/2,ao=Jn+wl;break}const yl=ve.height+A*2;switch(ue==null?void 0:ue.vAlign){case"start":mo=Qn+yl;break;case"end":Qn=mo-yl;break;case"center":Qn=Math.floor((Qn+mo)/2)-yl/2,mo=Qn+yl;break}Jn>He.x?ze=He.x-Jn:ao<He.x+He.width&&(ze=He.x+He.width-ao),Qn>He.y?Qe=He.y-Qn:mo<He.y+He.height&&(Qe=He.y+He.height-mo),$==="vertical"||typeof w=="number"&&w<Re?ze=0:($==="horizontal"||typeof H=="number"&&H>=yn-fn)&&(Qe=0),(ze!==0||Qe!==0)&&(Be!==1&&(ze/=Be,Qe/=Be),Qt.current.scrollTo(ze+Qt.current.scrollLeft,Qe+Qt.current.scrollTop))}}}},[W,Zt,go,Qt,Xn,Re,dt,yn,Yo,io]),Ch=p.useRef(xh),kh=p.useRef(x),is=p.useRef(Ye);Ch.current=xh,kh.current=x,is.current=Ye;const yr=p.useCallback(async(w,H=!0)=>{var $;const G=Ct[w];if((($=G==null?void 0:G.trailingRowOptions)==null?void 0:$.disabled)===!0)return;const A=et==null?void 0:et();let ue,oe=!0;A!==void 0&&(ue=await A,ue==="top"&&(oe=!1),typeof ue=="number"&&(oe=!1));let q=0;const V=()=>{if(is.current<=Ye){q<500&&window.setTimeout(V,q),q=50+q*2;return}const Y=typeof ue=="number"?ue:oe?Ye:0;bl.current(w-W,Y),Ze({cell:[w,Y],range:{x:w,y:Y,width:1,height:1}},!1,!1,"edit");const le=kh.current([w-W,Y]);le.allowOverlay&&Er(le)&&le.readonly!==!0&&H&&window.setTimeout(()=>{Ch.current(w,Y)},0)};V()},[Ct,et,W,Ye,Ze]),fl=p.useCallback(w=>{var H,$;const G=(($=(H=dt[w])==null?void 0:H.trailingRowOptions)==null?void 0:$.targetColumn)??(yt==null?void 0:yt.targetColumn);if(typeof G=="number")return G+(Mn?1:0);if(typeof G=="object"){const A=T.indexOf(G);if(A>=0)return A+(Mn?1:0)}},[dt,T,Mn,yt==null?void 0:yt.targetColumn]),Do=p.useRef(),xr=p.useRef(),si=p.useCallback((w,H)=>{var $;const[G,A]=H;return co(_t,($=Ct[G])==null?void 0:$.themeOverride,po==null?void 0:po(A),w.themeOverride)},[po,Ct,_t]),{mapper:Ko}=Rg(Et,k),Kn=Et==null?void 0:Et.navigationBehavior,ci=p.useCallback(w=>{var H,$,G;const A=Di.value?w.metaKey:w.ctrlKey,ue=A&&ie==="multi",oe=A&&me==="multi",[q,V]=w.location,Y=K.columns,le=K.rows,[Ce,ve]=((H=K.current)==null?void 0:H.cell)??[];if(w.kind==="cell"){if(xr.current=void 0,qo.current=[q,V],q===0&&Mn){if(Gt===!0&&V===Ye||hn==="number"||ie==="none")return;const ze=An(w.location);if(ze.kind!==Fn.Marker)return;if(Dt!==void 0){const Be=Kt(ze);zn((Be==null?void 0:Be.kind)===Fn.Marker);const He=($=Be==null?void 0:Be.onClick)==null?void 0:$.call(Be,{...w,cell:ze,posX:w.localEventX,posY:w.localEventY,bounds:w.bounds,theme:si(ze,w.location),preventDefault:()=>{}});if(He===void 0||He.checked===ze.checked)return}a(void 0),Rn();const Qe=le.hasIndex(V),gt=Do.current;if(ie==="multi"&&(w.shiftKey||w.isLongTouch===!0)&&gt!==void 0&&le.hasIndex(gt)){const Be=[Math.min(gt,V),Math.max(gt,V)+1];ue||Xt==="multi"?Ge(void 0,Be,!0):Ge(vt.fromSingleSelection(Be),void 0,ue)}else ie==="multi"&&(ue||w.isTouch||Xt==="multi")?Qe?Ge(le.remove(V),void 0,!0):(Ge(void 0,V,!0),Do.current=V):Qe&&le.length===1?Ge(vt.empty(),void 0,A):(Ge(vt.fromSingleSelection(V),void 0,A),Do.current=V)}else if(q>=W&&Gt&&V===Ye){const ze=fl(q);yr(ze??q)}else if(Ce!==q||ve!==V){const ze=An(w.location),Qe=Kt(ze);if((Qe==null?void 0:Qe.onSelect)!==void 0){let He=!1;if(Qe.onSelect({...w,cell:ze,posX:w.localEventX,posY:w.localEventY,bounds:w.bounds,preventDefault:()=>He=!0,theme:si(ze,w.location)}),He)return}if(Kn==="block"&&Ko(V).isGroupHeader)return;const gt=Yo&&V===Ye,Be=Yo&&K!==void 0&&((G=K.current)==null?void 0:G.cell[1])===Ye;if((w.shiftKey||w.isLongTouch===!0)&&Ce!==void 0&&ve!==void 0&&K.current!==void 0&&!Be){if(gt)return;const He=Math.min(q,Ce),St=Math.max(q,Ce),mn=Math.min(V,ve),fn=Math.max(V,ve);Ze({...K.current,range:{x:He,y:mn,width:St-He+1,height:fn-mn+1}},!0,A,"click"),Do.current=void 0,Rn()}else Ze({cell:[q,V],range:{x:q,y:V,width:1,height:1}},!0,A,"click"),Do.current=void 0,a(void 0),Rn()}}else if(w.kind==="header")if(qo.current=[q,V],a(void 0),Mn&&q===0)Do.current=void 0,xr.current=void 0,ie==="multi"&&(le.length!==Ye?Ge(vt.fromSingleSelection([0,Ye]),void 0,A):Ge(vt.empty(),void 0,A),Rn());else{const ze=xr.current;if(me==="multi"&&(w.shiftKey||w.isLongTouch===!0)&&ze!==void 0&&Y.hasIndex(ze)){const Qe=[Math.min(ze,q),Math.max(ze,q)+1];oe?pt(void 0,Qe,A):pt(vt.fromSingleSelection(Qe),void 0,A)}else oe?(Y.hasIndex(q)?pt(Y.remove(q),void 0,A):pt(void 0,q,A),xr.current=q):me!=="none"&&(pt(vt.fromSingleSelection(q),void 0,A),xr.current=q);Do.current=void 0,Rn()}else w.kind===Nn?qo.current=[q,V]:w.kind===zi&&!w.isMaybeScrollbar&&(he(Ai,!1),a(void 0),Rn(),an==null||an(),Do.current=void 0,xr.current=void 0)},[ie,me,K,Mn,W,Gt,Ye,hn,An,Dt,Rn,Xt,Kt,si,Ge,fl,yr,Kn,Ko,Yo,Ze,pt,he,an]),ui=p.useRef(!1),qo=p.useRef(),Sh=p.useRef(Xo),qn=p.useRef(),sy=p.useCallback(w=>{if(Cr.current=!1,Sh.current=Hn.current,w.button!==0&&w.button!==1){qn.current=void 0;return}const H=performance.now();qn.current={button:w.button,time:H,location:w.location},(w==null?void 0:w.kind)==="header"&&(ui.current=!0);const $=w.kind==="cell"&&w.isFillHandle;!$&&w.kind!=="cell"&&w.isEdge||(f({previousSelection:K,fillHandle:$}),qo.current=void 0,!w.isTouch&&w.button===0&&!$?ci(w):!w.isTouch&&w.button===1&&(qo.current=w.location))},[K,ci]),[ls,as]=p.useState(),Mh=p.useCallback(w=>{if(w.kind!==Nn||me!=="multi")return;const H=Di.value?w.metaKey:w.ctrlKey,[$]=w.location,G=K.columns;if($<W)return;const A=Ct[$];let ue=$,oe=$;for(let q=$-1;q>=W&&Fr(A.group,Ct[q].group);q--)ue--;for(let q=$+1;q<Ct.length&&Fr(A.group,Ct[q].group);q++)oe++;if(Rn(),H)if(G.hasAll([ue,oe+1])){let q=G;for(let V=ue;V<=oe;V++)q=q.remove(V);pt(q,void 0,H)}else pt(void 0,[ue,oe+1],H);else pt(vt.fromSingleSelection([ue,oe+1]),void 0,H)},[me,Rn,K.columns,Ct,W,pt]),Cr=p.useRef(!1),pl=p.useCallback(async w=>{if(ee!==void 0&&Le!==void 0){const H=Hn.current.y,$=Hn.current.height;let G=ee({x:w,y:H,width:1,height:Math.min($,Ye-H)},F.current.signal);typeof G!="object"&&(G=await G());const A=dt[w-W],ue=document.createElement("canvas").getContext("2d",{alpha:!1});if(ue!==null){ue.font=_t.baseFontFull;const oe=jc(ue,_t,A,0,G,Oo,pr,!1,Kt);Le==null||Le(A,oe.width,w,oe.width)}}},[dt,ee,pr,_t,Oo,Le,W,Ye,Kt]),[cy,ss]=p.useState(),kr=p.useCallback(async(w,H)=>{var $,G;const A=($=w.current)==null?void 0:$.range;if(A===void 0||ee===void 0||H.current===void 0)return;const ue=H.current.range;if(R!==void 0){let Y=!1;if(R({fillDestination:{...ue,x:ue.x-W},patternSource:{...A,x:A.x-W},preventDefault:()=>Y=!0}),Y)return}let oe=ee(A,F.current.signal);typeof oe!="object"&&(oe=await oe());const q=oe,V=[];for(let Y=0;Y<ue.width;Y++)for(let le=0;le<ue.height;le++){const Ce=[ue.x+Y,ue.y+le];if(Oc(Ce,A))continue;const ve=q[le%A.height][Y%A.width];Po(ve)||!Er(ve)||V.push({location:Ce,value:{...ve}})}Bn(V),(G=Dn.current)==null||G.damage(V.map(Y=>({cell:Y.location})))},[ee,Bn,R,W]),Rh=p.useCallback(()=>{if(K.current===void 0||K.current.range.width<=1)return;const w={...K,current:{...K.current,range:{...K.current.range,width:1}}};kr(w,K)},[kr,K]),Eh=p.useCallback(()=>{if(K.current===void 0||K.current.range.height<=1)return;const w={...K,current:{...K.current,range:{...K.current.range,height:1}}};kr(w,K)},[kr,K]),uy=p.useCallback((w,H)=>{var $,G;const A=d;if(f(void 0),os(void 0),ss(void 0),ui.current=!1,H)return;if((A==null?void 0:A.fillHandle)===!0&&K.current!==void 0&&(($=A.previousSelection)==null?void 0:$.current)!==void 0){if(Go===void 0)return;const ve={...K,current:{...K.current,range:nu(A.previousSelection.current.range,Go)}};kr(A.previousSelection,ve),he(ve,!0);return}const[ue,oe]=w.location,[q,V]=qo.current??[],Y=()=>{Cr.current=!0},le=ve=>{var ze,Qe,gt;const Be=ve.isTouch||q===ue&&V===oe;if(Be&&(L==null||L([ue-W,oe],{...ve,preventDefault:Y})),ve.button===1)return!Cr.current;if(!Cr.current){const He=An(w.location),St=Kt(He);if(St!==void 0&&St.onClick!==void 0&&Be){const fn=St.onClick({...ve,cell:He,posX:ve.localEventX,posY:ve.localEventY,bounds:ve.bounds,theme:si(He,w.location),preventDefault:Y});fn!==void 0&&!Po(fn)&&Ho(fn)&&(Bn([{location:ve.location,value:fn}]),(ze=Dn.current)==null||ze.damage([{cell:ve.location}]))}if(Cr.current||K.current===void 0)return!1;let mn=!1;switch(He.activationBehaviorOverride??Tt){case"double-click":case"second-click":{if(((gt=(Qe=A==null?void 0:A.previousSelection)==null?void 0:Qe.current)==null?void 0:gt.cell)===void 0)break;const[fn,Jn]=K.current.cell,[ao,Qn]=A.previousSelection.current.cell;mn=ue===fn&&ue===ao&&oe===Jn&&oe===Qn&&(ve.isDoubleClick===!0||Tt==="second-click");break}case"single-click":{mn=!0;break}}if(mn)return O==null||O([ue-W,oe]),wr(ve.bounds,!1),!0}return!1},Ce=w.location[0]-W;if(w.isTouch){const ve=Hn.current,ze=Sh.current;if(ve.x!==ze.x||ve.y!==ze.y)return;if(w.isLongTouch===!0){if(w.kind==="cell"&&_r((G=K.current)==null?void 0:G.cell,w.location)){ne==null||ne([Ce,w.location[1]],{...w,preventDefault:Y});return}else if(w.kind==="header"&&K.columns.hasIndex(ue)){re==null||re(Ce,{...w,preventDefault:Y});return}else if(w.kind===Nn){if(Ce<0)return;de==null||de(Ce,{...w,preventDefault:Y});return}}w.kind==="cell"?le(w)||ci(w):w.kind===Nn?ae==null||ae(Ce,{...w,preventDefault:Y}):(w.kind===Mo&&(C==null||C(Ce,{...w,preventDefault:Y})),ci(w));return}if(w.kind==="header"){if(Ce<0)return;w.isEdge?w.isDoubleClick===!0&&pl(ue):w.button===0&&ue===q&&oe===V&&(C==null||C(Ce,{...w,preventDefault:Y}))}if(w.kind===Nn){if(Ce<0)return;w.button===0&&ue===q&&oe===V&&(ae==null||ae(Ce,{...w,preventDefault:Y}),Cr.current||Mh(w))}w.kind==="cell"&&(w.button===0||w.button===1)&&le(w),qo.current=void 0},[d,K,W,Go,kr,he,L,An,Kt,Tt,si,Bn,O,wr,ne,re,de,ci,ae,C,pl,Mh]),dy=p.useCallback(w=>{const H={...w,location:[w.location[0]-W,w.location[1]]};ce==null||ce(H),d!==void 0&&w.buttons===0&&(f(void 0),os(void 0),ss(void 0),ui.current=!1),ss($=>{var G;return ui.current?[w.scrollEdge[0],0]:w.scrollEdge[0]===($==null?void 0:$[0])&&w.scrollEdge[1]===$[1]?$:d===void 0||(((G=qn.current)==null?void 0:G.location[0])??0)<W?void 0:w.scrollEdge})},[d,ce,W]),hy=p.useCallback((w,H)=>{Ne==null||Ne(w-W,H)},[Ne,W]),fy=p.useCallback((w,H)=>{nt==null||nt(w-W,H)},[nt,W]),zo=(o=K==null?void 0:K.current)==null?void 0:o.cell,py=p.useCallback((w,H,$,G,A,ue)=>{ll.current=!1;let oe=zo;oe!==void 0&&(oe=[oe[0]-W,oe[1]]);const q=Re===0?void 0:{x:0,y:w.y,width:Re,height:w.height},V=[];q!==void 0&&V.push(q),Zt>0&&(V.push({x:w.x-W,y:Ye-Zt,width:w.width,height:Zt}),Re>0&&V.push({x:0,y:Ye-Zt,width:Re,height:Zt}));const Y={x:w.x-W,y:w.y,width:w.width,height:Gt&&w.y+w.height>=Ye?w.height-1:w.height,tx:A,ty:ue,extras:{selected:oe,freezeRegion:q,freezeRegions:V}};Hn.current=Y,wh(Y),Un([H,$,G]),wt==null||wt(Y,Y.tx,Y.ty,Y.extras)},[zo,W,Gt,Ye,Re,Zt,wh,wt]),gy=Ao(Pt,p.useCallback((w,H)=>{Pt==null||Pt(w-W,H-W),me!=="none"&&pt(vt.fromSingleSelection(H),void 0,!0)},[me,Pt,W,pt])),cs=p.useRef(!1),my=p.useCallback(w=>{if(w.location[0]===0&&W>0){w.preventDefault();return}Rt==null||Rt({...w,location:[w.location[0]-W,w.location[1]]}),w.defaultPrevented()||(cs.current=!0),f(void 0)},[Rt,W]),vy=p.useCallback(()=>{cs.current=!1},[]),Ih=Et==null?void 0:Et.selectionBehavior,gl=p.useCallback(w=>{if(Ih!=="block-spanning")return;const{isGroupHeader:H,path:$,groupRows:G}=Ko(w);if(H)return[w,w];const A=$[$.length-1],ue=w-A,oe=w+G-A-1;return[ue,oe]},[Ko,Ih]),us=p.useRef(),ds=p.useCallback(w=>{var H,$,G;if(!pu(w,us.current)&&(us.current=w,!(((H=qn==null?void 0:qn.current)==null?void 0:H.button)!==void 0&&qn.current.button>=1))){if(w.buttons!==0&&d!==void 0&&(($=qn.current)==null?void 0:$.location[0])===0&&w.location[0]===0&&W===1&&ie==="multi"&&d.previousSelection&&!d.previousSelection.rows.hasIndex(qn.current.location[1])&&K.rows.hasIndex(qn.current.location[1])){const A=Math.min(qn.current.location[1],w.location[1]),ue=Math.max(qn.current.location[1],w.location[1])+1;Ge(vt.fromSingleSelection([A,ue]),void 0,!1)}if(w.buttons!==0&&d!==void 0&&K.current!==void 0&&!cs.current&&!ui.current&&(be==="rect"||be==="multi-rect")){const[A,ue]=K.current.cell;let[oe,q]=w.location;if(q<0&&(q=Hn.current.y),d.fillHandle===!0&&((G=d.previousSelection)==null?void 0:G.current)!==void 0){const V=d.previousSelection.current.range;q=Math.min(q,Gt?Ye-1:Ye);const Y=g0(V,oe,q,ut);os(Y)}else{if(Gt&&ue===Ye)return;if(Gt&&q===Ye)if(w.kind===zi)q--;else return;oe=Math.max(oe,W);const V=gl(ue);q=V===void 0?q:_n(q,V[0],V[1]);const Y=oe-A,le=q-ue,Ce={x:Y>=0?A:oe,y:le>=0?ue:q,width:Math.abs(Y)+1,height:Math.abs(le)+1};Ze({...K.current,range:Ce},!0,!1,"drag")}}un==null||un({...w,location:[w.location[0]-W,w.location[1]]})}},[d,W,ie,K,be,un,Ge,Gt,Ye,ut,gl,Ze]),by=p.useCallback(()=>{var w,H;const $=us.current;if($===void 0)return;const[G,A]=$.scrollEdge;let[ue,oe]=$.location;const q=Hn.current;G===-1?ue=((H=(w=q.extras)==null?void 0:w.freezeRegion)==null?void 0:H.x)??q.x:G===1&&(ue=q.x+q.width),A===-1?oe=Math.max(0,q.y):A===1&&(oe=Math.min(Ye-1,q.y+q.height)),ue=_n(ue,0,Ct.length-1),oe=_n(oe,0,Ye-1),ds({...$,location:[ue,oe]})},[Ct.length,ds,Ye]);xg(cy,Qt,by);const Zn=p.useCallback(w=>{if(K.current===void 0)return;const[H,$]=w,[G,A]=K.current.cell,ue=K.current.range;let oe=ue.x,q=ue.x+ue.width,V=ue.y,Y=ue.y+ue.height;const[le,Ce]=gl(A)??[0,Ye-1],ve=Ce+1;if($!==0)switch($){case 2:{Y=ve,V=A,ln(0,Y,"vertical");break}case-2:{V=le,Y=A+1,ln(0,V,"vertical");break}case 1:{V<A?(V++,ln(0,V,"vertical")):(Y=Math.min(ve,Y+1),ln(0,Y,"vertical"));break}case-1:{Y>A+1?(Y--,ln(0,Y,"vertical")):(V=Math.max(le,V-1),ln(0,V,"vertical"));break}default:Rr()}if(H!==0)if(H===2)q=Ct.length,oe=G,ln(q-1-W,0,"horizontal");else if(H===-2)oe=W,q=G+1,ln(oe-W,0,"horizontal");else{let ze=[];if(ee!==void 0){const Qe=ee({x:oe,y:V,width:q-oe-W,height:Y-V},F.current.signal);typeof Qe=="object"&&(ze=Dg(Qe))}if(H===1){let Qe=!1;if(oe<G){if(ze.length>0){const gt=so(oe+1,G+1).find(Be=>!ze.includes(Be-W));gt!==void 0&&(oe=gt,Qe=!0)}else oe++,Qe=!0;Qe&&ln(oe,0,"horizontal")}Qe||(q=Math.min(Ct.length,q+1),ln(q-1-W,0,"horizontal"))}else if(H===-1){let Qe=!1;if(q>G+1){if(ze.length>0){const gt=so(q-1,G,-1).find(Be=>!ze.includes(Be-W));gt!==void 0&&(q=gt,Qe=!0)}else q--,Qe=!0;Qe&&ln(q-W,0,"horizontal")}Qe||(oe=Math.max(W,oe-1),ln(oe-W,0,"horizontal"))}else Rr()}Ze({cell:K.current.cell,range:{x:oe,y:V,width:q-oe,height:Y-V}},!0,!1,"keyboard-select")},[ee,gl,K,Ct.length,W,Ye,ln,Ze]),hs=p.useRef(ti);hs.current=ti;const Lo=p.useCallback((w,H,$,G)=>{const A=yn-($?0:1);w=_n(w,W,dt.length-1+W),H=_n(H,0,A);const ue=zo==null?void 0:zo[0],oe=zo==null?void 0:zo[1];if(w===ue&&H===oe)return!1;if(G&&K.current!==void 0){const q=[...K.current.rangeStack];(K.current.range.width>1||K.current.range.height>1)&&q.push(K.current.range),he({...K,current:{cell:[w,H],range:{x:w,y:H,width:1,height:1},rangeStack:q}},!0)}else Ze({cell:[w,H],range:{x:w,y:H,width:1,height:1}},!0,!1,"keyboard-nav");return h.current!==void 0&&h.current[0]===w&&h.current[1]===H&&(h.current=void 0),hs.current&&ln(w-W,H),!0},[yn,W,dt.length,zo,K,ln,he,Ze]),wy=p.useCallback((w,H)=>{(s==null?void 0:s.cell)!==void 0&&w!==void 0&&Ho(w)&&(Bn([{location:s.cell,value:w}]),window.requestAnimationFrame(()=>{var A;(A=Dn.current)==null||A.damage([{cell:s.cell}])})),Rn(!0),a(void 0);const[$,G]=H;if(K.current!==void 0&&($!==0||G!==0)){const A=K.current.cell[1]===yn-1&&w!==void 0;Lo(_n(K.current.cell[0]+$,0,Ct.length-1),_n(K.current.cell[1]+G,0,yn-1),A,!1)}P==null||P(w,H)},[s==null?void 0:s.cell,Rn,K,P,Bn,yn,Lo,Ct.length]),yy=p.useMemo(()=>`gdg-overlay-${Og++}`,[]),Zo=p.useCallback(w=>{var H,$,G,A;Rn();const ue=[];for(let oe=w.x;oe<w.x+w.width;oe++)for(let q=w.y;q<w.y+w.height;q++){const V=x([oe-W,q]);if(!V.allowOverlay&&V.kind!==Z.Boolean)continue;let Y;if(V.kind===Z.Custom){const le=Kt(V),Ce=(H=le==null?void 0:le.provideEditor)==null?void 0:H.call(le,V);(le==null?void 0:le.onDelete)!==void 0?Y=le.onDelete(V):Ms(Ce)&&(Y=($=Ce==null?void 0:Ce.deletedValue)==null?void 0:$.call(Ce,V))}else if(Ho(V)&&V.allowOverlay||V.kind===Z.Boolean){const le=Kt(V);Y=(G=le==null?void 0:le.onDelete)==null?void 0:G.call(le,V)}Y!==void 0&&!Po(Y)&&Ho(Y)&&ue.push({location:[oe,q],value:Y})}Bn(ue),(A=Dn.current)==null||A.damage(ue.map(oe=>({cell:oe.location})))},[Rn,x,Kt,Bn,W]),di=s!==void 0,Th=p.useCallback(w=>{var H,$;const G=()=>{w.stopPropagation(),w.preventDefault()},A={didMatch:!1},{bounds:ue}=w,oe=K.columns,q=K.rows,V=lo;if(!di&&st(V.clear,w,A))he(Ai,!1),an==null||an();else if(!di&&st(V.selectAll,w,A))he({columns:vt.empty(),rows:vt.empty(),current:{cell:((H=K.current)==null?void 0:H.cell)??[W,0],range:{x:W,y:0,width:T.length,height:Ye},rangeStack:[]}},!1);else if(st(V.search,w,A))($=c==null?void 0:c.current)==null||$.focus({preventScroll:!0}),il(!0);else if(st(V.delete,w,A)){const Be=(ft==null?void 0:ft(K))??!0;if(Be!==!1){const He=Be===!0?K:Be;if(He.current!==void 0){Zo(He.current.range);for(const St of He.current.rangeStack)Zo(St)}for(const St of He.rows)Zo({x:W,y:St,width:T.length,height:1});for(const St of He.columns)Zo({x:St,y:0,width:1,height:Ye})}}if(A.didMatch)return G(),!0;if(K.current===void 0)return!1;let[Y,le]=K.current.cell;const[,Ce]=K.current.cell;let ve=!1,ze=!1;if(st(V.scrollToSelectedCell,w,A)?bl.current(Y-W,le):me!=="none"&&st(V.selectColumn,w,A)?oe.hasIndex(Y)?pt(oe.remove(Y),void 0,!0):me==="single"?pt(vt.fromSingleSelection(Y),void 0,!0):pt(void 0,Y,!0):ie!=="none"&&st(V.selectRow,w,A)?q.hasIndex(le)?Ge(q.remove(le),void 0,!0):ie==="single"?Ge(vt.fromSingleSelection(le),void 0,!0):Ge(void 0,le,!0):!di&&ue!==void 0&&st(V.activateCell,w,A)?le===Ye&&Gt?window.setTimeout(()=>{const Be=fl(Y);yr(Be??Y)},0):(O==null||O([Y-W,le]),wr(ue,!0)):K.current.range.height>1&&st(V.downFill,w,A)?Eh():K.current.range.width>1&&st(V.rightFill,w,A)?Rh():st(V.goToNextPage,w,A)?le+=Math.max(1,Hn.current.height-4):st(V.goToPreviousPage,w,A)?le-=Math.max(1,Hn.current.height-4):st(V.goToFirstCell,w,A)?(a(void 0),le=0,Y=0):st(V.goToLastCell,w,A)?(a(void 0),le=Number.MAX_SAFE_INTEGER,Y=Number.MAX_SAFE_INTEGER):st(V.selectToFirstCell,w,A)?(a(void 0),Zn([-2,-2])):st(V.selectToLastCell,w,A)?(a(void 0),Zn([2,2])):di?(st(V.closeOverlay,w,A)&&a(void 0),st(V.acceptOverlayDown,w,A)&&(a(void 0),le++),st(V.acceptOverlayUp,w,A)&&(a(void 0),le--),st(V.acceptOverlayLeft,w,A)&&(a(void 0),Y--),st(V.acceptOverlayRight,w,A)&&(a(void 0),Y++)):(st(V.goDownCell,w,A)?le+=1:st(V.goUpCell,w,A)?le-=1:st(V.goRightCell,w,A)?Y+=1:st(V.goLeftCell,w,A)?Y-=1:st(V.goDownCellRetainSelection,w,A)?(le+=1,ve=!0):st(V.goUpCellRetainSelection,w,A)?(le-=1,ve=!0):st(V.goRightCellRetainSelection,w,A)?(Y+=1,ve=!0):st(V.goLeftCellRetainSelection,w,A)?(Y-=1,ve=!0):st(V.goToLastRow,w,A)?le=Ye-1:st(V.goToFirstRow,w,A)?le=Number.MIN_SAFE_INTEGER:st(V.goToLastColumn,w,A)?Y=Number.MAX_SAFE_INTEGER:st(V.goToFirstColumn,w,A)?Y=Number.MIN_SAFE_INTEGER:(be==="rect"||be==="multi-rect")&&(st(V.selectGrowDown,w,A)?Zn([0,1]):st(V.selectGrowUp,w,A)?Zn([0,-1]):st(V.selectGrowRight,w,A)?Zn([1,0]):st(V.selectGrowLeft,w,A)?Zn([-1,0]):st(V.selectToLastRow,w,A)?Zn([0,2]):st(V.selectToFirstRow,w,A)?Zn([0,-2]):st(V.selectToLastColumn,w,A)?Zn([2,0]):st(V.selectToFirstColumn,w,A)&&Zn([-2,0])),ze=A.didMatch),Kn!==void 0&&Kn!=="normal"&&le!==Ce){const Be=Kn==="skip-up"||Kn==="skip"||Kn==="block",He=Kn==="skip-down"||Kn==="skip"||Kn==="block",St=le<Ce;if(St&&Be){for(;le>=0&&Ko(le).isGroupHeader;)le--;le<0&&(le=Ce)}else if(!St&&He){for(;le<Ye&&Ko(le).isGroupHeader;)le++;le>=Ye&&(le=Ce)}}const Qe=Lo(Y,le,!1,ve),gt=A.didMatch;return gt&&(Qe||!ze||ho)&&G(),gt},[Kn,di,K,lo,me,ie,be,W,Ko,Ye,Lo,he,an,T.length,ft,ho,Zo,pt,Ge,Gt,fl,yr,O,wr,Eh,Rh,Zn]),hi=p.useCallback(w=>{let H=!1;if(Fe!==void 0&&Fe({...w,cancel:()=>{H=!0}}),H||Th(w)||K.current===void 0)return;const[$,G]=K.current.cell,A=Hn.current;if(_e&&!w.metaKey&&!w.ctrlKey&&K.current!==void 0&&w.key.length===1&&/[ -~]/g.test(w.key)&&w.bounds!==void 0&&Er(x([$-W,Math.max(0,Math.min(G,Ye-1))]))){if((!Gt||G!==Ye)&&(A.y>G||G>A.y+A.height||A.x>$||$>A.x+A.width))return;wr(w.bounds,!0,w.key),w.stopPropagation(),w.preventDefault()}},[_e,Fe,Th,K,x,W,Ye,Gt,wr]),xy=p.useCallback((w,H)=>{const $=w.location[0]-W;if(w.kind==="header"&&(re==null||re($,{...w,preventDefault:H})),w.kind===Nn){if($<0)return;de==null||de($,{...w,preventDefault:H})}if(w.kind==="cell"){const[G,A]=w.location;ne==null||ne([$,A],{...w,preventDefault:H}),dp(K,w.location)||Lo(G,A,!1,!1)}},[K,ne,de,re,W,Lo]),fs=p.useCallback(async w=>{var H,$,G;if(!lo.paste)return;function A(Y,le,Ce,ve){var ze,Qe;const gt=typeof Ce=="object"?(Ce==null?void 0:Ce.join(`
172
+ `&&(n.push(o),o=[])),i=t.None);break}l++}return r<e.length&&o.push(yu(e.slice(r,e.length))),n.push(o),n.map(s=>s.map(a=>({rawValue:a,formatted:a,format:"string"})))}function xu(e,t,n){var o;const r=hg(e,t),i=a=>{var c;(c=window.navigator.clipboard)==null||c.writeText(a)},l=(a,c)=>{var u;return((u=window.navigator.clipboard)==null?void 0:u.write)===void 0?!1:(window.navigator.clipboard.write([new ClipboardItem({"text/plain":new Blob([a],{type:"text/plain"}),"text/html":new Blob([c],{type:"text/html"})})]),!0)},s=(a,c)=>{var u,d;try{if(n===void 0||n.clipboardData===null)throw new Error("No clipboard data");(u=n==null?void 0:n.clipboardData)==null||u.setData("text/plain",a),(d=n==null?void 0:n.clipboardData)==null||d.setData("text/html",c)}catch{l(a,c)||i(a)}};((o=window.navigator.clipboard)==null?void 0:o.write)!==void 0||(n==null?void 0:n.clipboardData)!==void 0?s(r.textPlain,r.textHtml):i(r.textPlain),n==null||n.preventDefault()}function Cu(e){return e!==!0}function ku(e){return typeof e=="string"?e:`${e}px`}const gg=()=>e=>e.innerWidth,mg=()=>e=>e.innerHeight,vg=cn("div")({name:"Wrapper",class:"gdg-wmyidgi",propsAsIs:!1,vars:{"wmyidgi-0":[gg()],"wmyidgi-1":[mg()]}}),bg=e=>{const{inWidth:t,inHeight:n,children:o,...r}=e;return p.createElement(vg,{innerHeight:ku(n),innerWidth:ku(t),...r},o)},wg=2,yg=1300;function xg(e,t,n){const o=te.useRef(0),[r,i]=e??[0,0];te.useEffect(()=>{if(r===0&&i===0){o.current=0;return}let l=!1,s=0;const a=c=>{var u;if(!l){if(s===0)s=c;else{const d=c-s;o.current=Math.min(1,o.current+d/yg);const f=o.current**1.618*d*wg;(u=t.current)==null||u.scrollBy(r*f,i*f),s=c,n==null||n()}window.requestAnimationFrame(a)}};return window.requestAnimationFrame(a),()=>{l=!0}},[t,r,i,n])}function Cg({rowHeight:e,headerHeight:t,groupHeaderHeight:n,theme:o,overscrollX:r,overscrollY:i,scaleToRem:l,remSize:s}){const[a,c,u,d,f,h]=te.useMemo(()=>{if(!l||s===16)return[e,t,n,o,r,i];const g=s/16,m=e,b=Wc();return[typeof m=="number"?m*g:y=>Math.ceil(m(y)*g),Math.ceil(t*g),Math.ceil(n*g),{...o,headerIconSize:((o==null?void 0:o.headerIconSize)??b.headerIconSize)*g,cellHorizontalPadding:((o==null?void 0:o.cellHorizontalPadding)??b.cellHorizontalPadding)*g,cellVerticalPadding:((o==null?void 0:o.cellVerticalPadding)??b.cellVerticalPadding)*g},Math.ceil((r??0)*g),Math.ceil((i??0)*g)]},[n,t,r,i,s,e,l,o]);return{rowHeight:a,headerHeight:c,groupHeaderHeight:u,theme:d,overscrollX:f,overscrollY:h}}const Ro={downFill:!1,rightFill:!1,clear:!0,closeOverlay:!0,acceptOverlayDown:!0,acceptOverlayUp:!0,acceptOverlayLeft:!0,acceptOverlayRight:!0,copy:!0,paste:!0,cut:!0,search:!1,delete:!0,activateCell:!0,scrollToSelectedCell:!0,goToFirstCell:!0,goToFirstColumn:!0,goToFirstRow:!0,goToLastCell:!0,goToLastColumn:!0,goToLastRow:!0,goToNextPage:!0,goToPreviousPage:!0,selectToFirstCell:!0,selectToFirstColumn:!0,selectToFirstRow:!0,selectToLastCell:!0,selectToLastColumn:!0,selectToLastRow:!0,selectAll:!0,selectRow:!0,selectColumn:!0,goUpCell:!0,goRightCell:!0,goDownCell:!0,goLeftCell:!0,goUpCellRetainSelection:!0,goRightCellRetainSelection:!0,goDownCellRetainSelection:!0,goLeftCellRetainSelection:!0,selectGrowUp:!0,selectGrowRight:!0,selectGrowDown:!0,selectGrowLeft:!0};function ct(e,t){return e===!0?t:e===!1?"":e}function Su(e){const t=Di.value;return{activateCell:ct(e.activateCell," |Enter|shift+Enter"),clear:ct(e.clear,"any+Escape"),closeOverlay:ct(e.closeOverlay,"any+Escape"),acceptOverlayDown:ct(e.acceptOverlayDown,"Enter"),acceptOverlayUp:ct(e.acceptOverlayUp,"shift+Enter"),acceptOverlayLeft:ct(e.acceptOverlayLeft,"shift+Tab"),acceptOverlayRight:ct(e.acceptOverlayRight,"Tab"),copy:e.copy,cut:e.cut,delete:ct(e.delete,t?"Backspace|Delete":"Delete"),downFill:ct(e.downFill,"primary+_68"),scrollToSelectedCell:ct(e.scrollToSelectedCell,"primary+Enter"),goDownCell:ct(e.goDownCell,"ArrowDown"),goDownCellRetainSelection:ct(e.goDownCellRetainSelection,"alt+ArrowDown"),goLeftCell:ct(e.goLeftCell,"ArrowLeft|shift+Tab"),goLeftCellRetainSelection:ct(e.goLeftCellRetainSelection,"alt+ArrowLeft"),goRightCell:ct(e.goRightCell,"ArrowRight|Tab"),goRightCellRetainSelection:ct(e.goRightCellRetainSelection,"alt+ArrowRight"),goUpCell:ct(e.goUpCell,"ArrowUp"),goUpCellRetainSelection:ct(e.goUpCellRetainSelection,"alt+ArrowUp"),goToFirstCell:ct(e.goToFirstCell,"primary+Home"),goToFirstColumn:ct(e.goToFirstColumn,"Home|primary+ArrowLeft"),goToFirstRow:ct(e.goToFirstRow,"primary+ArrowUp"),goToLastCell:ct(e.goToLastCell,"primary+End"),goToLastColumn:ct(e.goToLastColumn,"End|primary+ArrowRight"),goToLastRow:ct(e.goToLastRow,"primary+ArrowDown"),goToNextPage:ct(e.goToNextPage,"PageDown"),goToPreviousPage:ct(e.goToPreviousPage,"PageUp"),paste:e.paste,rightFill:ct(e.rightFill,"primary+_82"),search:ct(e.search,"primary+f"),selectAll:ct(e.selectAll,"primary+a"),selectColumn:ct(e.selectColumn,"ctrl+ "),selectGrowDown:ct(e.selectGrowDown,"shift+ArrowDown"),selectGrowLeft:ct(e.selectGrowLeft,"shift+ArrowLeft"),selectGrowRight:ct(e.selectGrowRight,"shift+ArrowRight"),selectGrowUp:ct(e.selectGrowUp,"shift+ArrowUp"),selectRow:ct(e.selectRow,"shift+ "),selectToFirstCell:ct(e.selectToFirstCell,"primary+shift+Home"),selectToFirstColumn:ct(e.selectToFirstColumn,"primary+shift+ArrowLeft"),selectToFirstRow:ct(e.selectToFirstRow,"primary+shift+ArrowUp"),selectToLastCell:ct(e.selectToLastCell,"primary+shift+End"),selectToLastColumn:ct(e.selectToLastColumn,"primary+shift+ArrowRight"),selectToLastRow:ct(e.selectToLastRow,"primary+shift+ArrowDown")}}function kg(e){const t=Pf(e);return te.useMemo(()=>{if(t===void 0)return Su(Ro);const n={...t,goToNextPage:(t==null?void 0:t.goToNextPage)??(t==null?void 0:t.pageDown)??Ro.goToNextPage,goToPreviousPage:(t==null?void 0:t.goToPreviousPage)??(t==null?void 0:t.pageUp)??Ro.goToPreviousPage,goToFirstCell:(t==null?void 0:t.goToFirstCell)??(t==null?void 0:t.first)??Ro.goToFirstCell,goToLastCell:(t==null?void 0:t.goToLastCell)??(t==null?void 0:t.last)??Ro.goToLastCell,selectToFirstCell:(t==null?void 0:t.selectToFirstCell)??(t==null?void 0:t.first)??Ro.selectToFirstCell,selectToLastCell:(t==null?void 0:t.selectToLastCell)??(t==null?void 0:t.last)??Ro.selectToLastCell};return Su({...Ro,...n})},[t])}function Sg(e){function t(n,o,r){if(typeof n=="number")return{headerIndex:n,isCollapsed:!1,depth:o,path:r};const i={headerIndex:n.headerIndex,isCollapsed:n.isCollapsed,depth:o,path:r};return n.subGroups!==void 0&&(i.subGroups=n.subGroups.map((l,s)=>t(l,o+1,[...r,s])).sort((l,s)=>l.headerIndex-s.headerIndex)),i}return e.map((n,o)=>t(n,0,[o])).sort((n,o)=>n.headerIndex-o.headerIndex)}function ua(e,t){const n=[];function o(l,s,a=!1){let c=s!==null?s-l.headerIndex:t-l.headerIndex;if(l.subGroups!==void 0&&(c=l.subGroups[0].headerIndex-l.headerIndex),c--,n.push({headerIndex:l.headerIndex,contentIndex:-1,skip:a,isCollapsed:l.isCollapsed,depth:l.depth,path:l.path,rows:c}),l.subGroups)for(let u=0;u<l.subGroups.length;u++){const d=u<l.subGroups.length-1?l.subGroups[u+1].headerIndex:s;o(l.subGroups[u],d,a||l.isCollapsed)}}const r=Sg(e.groups);for(let l=0;l<r.length;l++){const s=l<r.length-1?r[l+1].headerIndex:null;o(r[l],s)}let i=0;for(const l of n)l.contentIndex=i,i+=l.rows;return n.filter(l=>l.skip===!1).map(l=>{const{skip:s,...a}=l;return a})}function Li(e,t){if(t===void 0||ua.length===0)return{path:[e],originalIndex:e,isGroupHeader:!1,groupIndex:e,contentIndex:e,groupRows:-1};let n=e;for(const o of t){if(n===0)return{path:[...o.path,-1],originalIndex:o.headerIndex,isGroupHeader:!0,groupIndex:-1,contentIndex:-1,groupRows:o.rows};if(n--,!o.isCollapsed){if(n<o.rows)return{path:[...o.path,n],originalIndex:o.headerIndex+n,isGroupHeader:!1,groupIndex:n,contentIndex:o.contentIndex+n,groupRows:o.rows};n-=o.rows}}return{path:[e],originalIndex:e,isGroupHeader:!1,groupIndex:e,contentIndex:e,groupRows:-1}}function Mg(e,t,n,o){const r=te.useMemo(()=>e===void 0?void 0:ua(e,t),[e,t]),i=te.useMemo(()=>r===void 0?t:r.reduce((c,u)=>c+(u.isCollapsed?1:u.rows+1),0),[r,t]),l=te.useMemo(()=>e===void 0||typeof n=="number"&&e.height===n?n:c=>{const{isGroupHeader:u}=Li(c,r);return u?e.height:typeof n=="number"?n:n(c)},[r,e,n]),s=te.useCallback(c=>{if(r===void 0)return c;let u=c;for(const d of r){if(u===0)return;if(u--,!d.isCollapsed){if(u<d.rows)return d.contentIndex+u;u-=d.rows}}return c},[r]),a=Ao(o??(e==null?void 0:e.themeOverride),te.useCallback(c=>{if(e===void 0)return o==null?void 0:o(c,c,c);if(o===void 0&&(e==null?void 0:e.themeOverride)===void 0)return;const{isGroupHeader:u,contentIndex:d,groupIndex:f}=Li(c,r);return u?e.themeOverride:o==null?void 0:o(c,f,d)},[r,o,e]));return e===void 0?{rowHeight:l,rows:t,rowNumberMapper:s,getRowThemeOverride:a}:{rowHeight:l,rows:i,rowNumberMapper:s,getRowThemeOverride:a}}function Rg(e,t){const n=te.useMemo(()=>e===void 0?void 0:ua(e,t),[e,t]);return{getRowGroupingForPath:Ru,updateRowGroupingByPath:Mu,mapper:te.useCallback(o=>{if(typeof o=="number")return Li(o,n);const r=Li(o[1],n);return{...r,originalIndex:[o[0],r.originalIndex]}},[n])}}function Mu(e,t,n){const[o,...r]=t;return r[0]===-1?e.map((i,l)=>l===o?{...i,...n}:i):e.map((i,l)=>l===o?{...i,subGroups:Mu(i.subGroups??[],r,n)}:i)}function Ru(e,t){const[n,...o]=t;return o[0]===-1?e[n]:Ru(e[n].subGroups??[],o)}function Eg(e,t){const[n]=p.useState(()=>({value:e,callback:t,facade:{get current(){return n.value},set current(o){const r=n.value;r!==o&&(n.value=o,n.callback(o,r))}}}));return n.callback=t,n.facade}function Ig(e,t,n,o,r){const[i,l]=p.useMemo(()=>[t!==void 0&&typeof n=="number"?Math.floor(t/n):0,t!==void 0&&typeof n=="number"?-(t%n):0],[t,n]),s=p.useMemo(()=>({x:o.current.x,y:i,width:o.current.width??1,height:o.current.height??1,ty:l}),[o,l,i]),[a,c,u]=Lf(s),d=p.useRef(r);d.current=r;const f=Eg(null,m=>{m!==null&&t!==void 0?m.scrollTop=t:m!==null&&e!==void 0&&(m.scrollLeft=e)}),h=(a.height??1)>1;p.useLayoutEffect(()=>{if(t!==void 0&&f.current!==null&&h){if(f.current.scrollTop===t)return;f.current.scrollTop=t,f.current.scrollTop!==t&&u(),d.current()}},[t,h,u,f]);const g=(a.width??1)>1;return p.useLayoutEffect(()=>{if(e!==void 0&&f.current!==null&&g){if(f.current.scrollLeft===e)return;f.current.scrollLeft=e,f.current.scrollLeft!==e&&u(),d.current()}},[e,g,u,f]),{visibleRegion:a,setVisibleRegion:c,scrollRef:f}}const Tg=p.lazy(async()=>await vs(()=>import("./data-grid-overlay-editor-Bd6FIb0g.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13])));let Og=0;function Dg(e){return Ap(Zc(Zc(e).filter(t=>t.span!==void 0).map(t=>{var n,o;return so((((n=t.span)==null?void 0:n[0])??0)+1,(((o=t.span)==null?void 0:o[1])??0)+1)})))}function Pi(e,t){return e===void 0||t===0||e.columns.length===0&&e.current===void 0?e:{current:e.current===void 0?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(n=>({...n,x:n.x+t}))},rows:e.rows,columns:e.columns.offset(t)}}const Hi={kind:Z.Loading,allowOverlay:!1},Ai={columns:vt.empty(),rows:vt.empty(),current:void 0},zg=(e,t)=>{var n,o,r;const[i,l]=p.useState(Ai),[s,a]=p.useState(),c=p.useRef(null),u=p.useRef(null),[d,f]=p.useState(),h=p.useRef(),g=typeof window>"u"?null:window,{imageEditorOverride:m,getRowThemeOverride:b,markdownDivCreateNode:y,width:v,height:I,columns:T,rows:k,getCellContent:x,onCellClicked:L,onCellActivated:O,onFillPattern:R,onFinishedEditing:P,coercePasteValue:M,drawHeader:S,drawCell:E,editorBloom:D,onHeaderClicked:C,onColumnProposeMove:X,rangeSelectionColumnSpanning:B=!0,spanRangeBehavior:J="default",onGroupHeaderClicked:ae,onCellContextMenu:ne,className:U,onHeaderContextMenu:re,getCellsForSelection:se,onGroupHeaderContextMenu:de,onGroupHeaderRenamed:fe,onCellEdited:Q,onCellsEdited:N,onSearchResultsChanged:z,searchResults:j,onSearchValueChange:ge,searchValue:ke,onKeyDown:Fe,onKeyUp:xe,keybindings:De,editOnType:_e=!0,onRowAppended:et,onColumnMoved:Pt,validateCell:Mt,highlightRegions:we,rangeSelect:be="rect",columnSelect:me="multi",rowSelect:ie="multi",rangeSelectionBlending:Ee="exclusive",columnSelectionBlending:Ie="exclusive",rowSelectionBlending:je="exclusive",onDelete:tt,onDragStart:Rt,onMouseMove:ce,onPaste:it,copyHeaders:at=!1,freezeColumns:Re=0,cellActivationBehavior:Tt="second-click",rowSelectionMode:Xt="auto",onHeaderMenuClick:Ne,onHeaderIndicatorClick:nt,getGroupDetails:kt,rowGrouping:Et,onSearchClose:qt,onItemHovered:un,onSelectionCleared:an,showSearch:Bt,onVisibleRegionChanged:wt,gridSelection:Ot,onGridSelectionChange:In,minColumnWidth:Cn=50,maxColumnWidth:ot=500,maxColumnAutoWidth:sn,provideEditor:bn,trailingRowOptions:yt,freezeTrailingRows:Zt=0,allowedFillDirections:ut="orthogonal",scrollOffsetX:Vt,scrollOffsetY:$t,verticalBorder:rn,onDragOverCell:Ft,onDrop:Jt,onColumnResize:Ue,onColumnResizeEnd:Ht,onColumnResizeStart:kn,customRenderers:At,fillHandle:Wt,experimental:jt,fixedShadowX:oo,fixedShadowY:jn,headerIcons:_,imageWindowLoader:qe,initialSize:Je,isDraggable:pe,onDragLeave:rt,onRowMoved:Dt,overscrollX:dn,overscrollY:en,preventDiagonalScrolling:tn,rightElement:Sn,rightElementProps:wn,trapFocus:ho=!1,smoothScrollX:ro,smoothScrollY:Ga,scaleToRem:Ka=!1,rowHeight:sr=34,headerHeight:fo=36,groupHeaderHeight:qa=fo,theme:Za,isOutsideClick:nl,renderers:cr,resizeIndicator:ur,scrollToActiveCell:ti=!0,drawFocusRing:dr=!0}=e,ni=dr==="no-editor"?s===void 0:dr,gn=typeof e.rowMarkers=="string"?void 0:e.rowMarkers,hn=(gn==null?void 0:gn.kind)??e.rowMarkers??"none",Io=(gn==null?void 0:gn.width)??e.rowMarkerWidth,hr=(gn==null?void 0:gn.startIndex)??e.rowMarkerStartIndex??1,To=(gn==null?void 0:gn.theme)??e.rowMarkerTheme,fr=gn==null?void 0:gn.headerTheme,oi=gn==null?void 0:gn.headerAlwaysVisible,ri=ie!=="multi",Uo=(gn==null?void 0:gn.checkboxStyle)??"square",Oo=Math.max(Cn,20),pr=Math.max(ot,Oo),ol=Math.max(sn??pr,Oo),ii=p.useMemo(()=>typeof window>"u"?{fontSize:"16px"}:window.getComputedStyle(document.documentElement),[]),{rows:Ye,rowNumberMapper:li,rowHeight:Ja,getRowThemeOverride:po}=Mg(Et,k,sr,b),Qa=p.useMemo(()=>Number.parseFloat(ii.fontSize),[ii]),{rowHeight:io,headerHeight:ai,groupHeaderHeight:gr,theme:rl,overscrollX:es,overscrollY:ts}=Cg({groupHeaderHeight:qa,headerHeight:fo,overscrollX:dn,overscrollY:en,remSize:Qa,rowHeight:Ja,scaleToRem:Ka,theme:Za}),lo=kg(De),go=Io??(k>1e4?48:k>1e3?44:k>100?36:32),Mn=hn!=="none",W=Mn?1:0,Gt=et!==void 0,Yo=(yt==null?void 0:yt.sticky)===!0,[mr,il]=p.useState(!1),vr=Bt??mr,ns=p.useCallback(()=>{qt!==void 0?qt():il(!1)},[qt]),K=p.useMemo(()=>Ot===void 0?void 0:Pi(Ot,W),[Ot,W])??i,F=p.useRef();F.current===void 0&&(F.current=new AbortController),p.useEffect(()=>()=>F==null?void 0:F.current.abort(),[]);const[ee,Te]=lg(se,x,W,F.current,Ye),Se=p.useCallback((w,H,$)=>{if(Mt===void 0)return!0;const G=[w[0]-W,w[1]];return Mt==null?void 0:Mt(G,H,$)},[W,Mt]),Pe=p.useRef(Ot),he=p.useCallback((w,H)=>{H&&(w=fg(w,ee,W,J,F.current)),In!==void 0?(Pe.current=Pi(w,-W),In(Pe.current)):l(w)},[In,ee,W,J]),Le=Ao(Ue,p.useCallback((w,H,$,G)=>{Ue==null||Ue(T[$-W],H,$-W,G)},[Ue,W,T])),lt=Ao(Ht,p.useCallback((w,H,$,G)=>{Ht==null||Ht(T[$-W],H,$-W,G)},[Ht,W,T])),xt=Ao(kn,p.useCallback((w,H,$,G)=>{kn==null||kn(T[$-W],H,$-W,G)},[kn,W,T])),zt=Ao(S,p.useCallback((w,H)=>(S==null?void 0:S({...w,columnIndex:w.columnIndex-W},H))??!1,[S,W])),ye=Ao(E,p.useCallback((w,H)=>(E==null?void 0:E({...w,col:w.col-W},H))??!1,[E,W])),ft=p.useCallback(w=>{if(tt!==void 0){const H=tt(Pi(w,-W));return typeof H=="boolean"?H:Pi(H,W)}return!0},[tt,W]),[Ze,Ge,pt]=ig(K,he,Ee,Ie,je,be,B),_t=p.useMemo(()=>co(Wc(),rl),[rl]),[nn,Un]=p.useState([0,0,0]),Yn=p.useMemo(()=>{if(cr===void 0)return{};const w={};for(const H of cr)w[H.kind]=H;return w},[cr]),Kt=p.useCallback(w=>w.kind!==Z.Custom?Yn[w.kind]:At==null?void 0:At.find(H=>H.isMatch(w)),[At,Yn]);let{sizedColumns:dt,nonGrowWidth:Tn}=Ep(T,Ye,Te,nn[0]-(W===0?0:go)-nn[2],Oo,ol,_t,Kt,F.current);hn!=="none"&&(Tn+=go);const On=p.useMemo(()=>dt.some(w=>w.group!==void 0),[dt]),Xn=On?ai+gr:ai,Gn=K.rows.length,br=hn==="none"?void 0:Gn===0?!1:Gn===Ye?!0:void 0,Ct=p.useMemo(()=>hn==="none"?dt:[{title:"",width:go,icon:void 0,hasMenu:!1,style:"normal",themeOverride:To,rowMarker:Uo,rowMarkerChecked:br,headerRowMarkerTheme:fr,headerRowMarkerAlwaysVisible:oi,headerRowMarkerDisabled:ri},...dt],[hn,dt,go,To,Uo,br,fr,oi,ri]),Hn=p.useRef({height:1,width:1,x:0,y:0}),ll=p.useRef(!1),{setVisibleRegion:wh,visibleRegion:Xo,scrollRef:Qt}=Ig(Vt,$t,io,Hn,()=>ll.current=!0);Hn.current=Xo;const ly=Xo.x+W,al=Xo.y,Dn=p.useRef(null),Rn=p.useCallback(w=>{var H;w===!0?(H=Dn.current)==null||H.focus():window.requestAnimationFrame(()=>{var $;($=Dn.current)==null||$.focus()})},[]),yn=Gt?Ye+1:Ye,Bn=p.useCallback(w=>{const H=W===0?w:w.map(G=>({...G,location:[G.location[0]-W,G.location[1]]})),$=N==null?void 0:N(H);if($!==!0)for(const G of H)Q==null||Q(G.location,G.value);return $},[Q,N,W]),[Go,os]=p.useState(),sl=K.current!==void 0&&K.current.range.width*K.current.range.height>1?K.current.range:void 0,cl=ni?(n=K.current)==null?void 0:n.cell:void 0,ul=cl==null?void 0:cl[0],dl=cl==null?void 0:cl[1],ay=p.useMemo(()=>{if((we===void 0||we.length===0)&&(sl??ul??dl??Go)===void 0)return;const w=[];if(we!==void 0)for(const H of we){const $=Ct.length-H.range.x-W;$>0&&w.push({color:H.color,range:{...H.range,x:H.range.x+W,width:Math.min($,H.range.width)},style:H.style})}return Go!==void 0&&w.push({color:Bo(_t.accentColor,0),range:Go,style:"dashed"}),sl!==void 0&&w.push({color:Bo(_t.accentColor,.5),range:sl,style:"solid-outline"}),ul!==void 0&&dl!==void 0&&w.push({color:_t.accentColor,range:{x:ul,y:dl,width:1,height:1},style:"solid-outline"}),w.length>0?w:void 0},[Go,sl,ul,dl,we,Ct.length,_t.accentColor,W]),yh=p.useRef(Ct);yh.current=Ct;const An=p.useCallback(([w,H],$=!1)=>{var G,A,ue,oe,q,V,Y;const le=Gt&&H===yn-1;if(w===0&&Mn){if(le)return Hi;const Ce=li(H);return Ce===void 0?Hi:{kind:Fn.Marker,allowOverlay:!1,checkboxStyle:Uo,checked:(K==null?void 0:K.rows.hasIndex(H))===!0,markerKind:hn==="clickable-number"?"number":hn,row:hr+Ce,drawHandle:Dt!==void 0,cursor:hn==="clickable-number"?"pointer":void 0}}else if(le){const Ce=w===W?(yt==null?void 0:yt.hint)??"":"",ve=yh.current[w];if(((G=ve==null?void 0:ve.trailingRowOptions)==null?void 0:G.disabled)===!0)return Hi;{const ze=((A=ve==null?void 0:ve.trailingRowOptions)==null?void 0:A.hint)??Ce,Qe=((ue=ve==null?void 0:ve.trailingRowOptions)==null?void 0:ue.addIcon)??(yt==null?void 0:yt.addIcon);return{kind:Fn.NewRow,hint:ze,allowOverlay:!1,icon:Qe}}}else{const Ce=w-W;if($||(jt==null?void 0:jt.strict)===!0){const ze=Hn.current,Qe=ze.x>Ce||Ce>ze.x+ze.width||ze.y>H||H>ze.y+ze.height||H>=is.current,gt=Ce===((q=(oe=ze.extras)==null?void 0:oe.selected)==null?void 0:q[0])&&H===((V=ze.extras)==null?void 0:V.selected[1]);let Be=!1;if(((Y=ze.extras)==null?void 0:Y.freezeRegions)!==void 0){for(const He of ze.extras.freezeRegions)if(Wo(He,Ce,H)){Be=!0;break}}if(Qe&&!gt&&!Be)return Hi}let ve=x([Ce,H]);return W!==0&&ve.span!==void 0&&(ve={...ve,span:[ve.span[0]+W,ve.span[1]+W]}),ve}},[Gt,yn,Mn,li,Uo,K==null?void 0:K.rows,hn,hr,Dt,W,yt==null?void 0:yt.hint,yt==null?void 0:yt.addIcon,jt==null?void 0:jt.strict,x]),rs=p.useCallback(w=>{let H=(kt==null?void 0:kt(w))??{name:w};return fe!==void 0&&w!==""&&(H={icon:H.icon,name:H.name,overrideTheme:H.overrideTheme,actions:[...H.actions??[],{title:"Rename",icon:"renameIcon",onClick:$=>as({group:H.name,bounds:$.bounds})}]}),H},[kt,fe]),hl=p.useCallback(w=>{var H;const[$,G]=w.cell,A=Ct[$],ue=(A==null?void 0:A.group)!==void 0?(H=rs(A.group))==null?void 0:H.overrideTheme:void 0,oe=A==null?void 0:A.themeOverride,q=po==null?void 0:po(G);a({...w,theme:co(_t,ue,oe,q,w.content.themeOverride)})},[po,Ct,rs,_t]),wr=p.useCallback((w,H,$)=>{var G;if(K.current===void 0)return;const[A,ue]=K.current.cell,oe=An([A,ue]);if(oe.kind!==Z.Boolean&&oe.allowOverlay){let q=oe;if($!==void 0)switch(q.kind){case Z.Number:{const V=nf(()=>$==="-"?-0:Number.parseFloat($),0);q={...q,data:Number.isNaN(V)?0:V};break}case Z.Text:case Z.Markdown:case Z.Uri:q={...q,data:$};break}hl({target:w,content:q,initialValue:$,cell:[A,ue],highlight:$===void 0,forceEditMode:$!==void 0})}else oe.kind===Z.Boolean&&H&&oe.readonly!==!0&&(Bn([{location:K.current.cell,value:{...oe,data:Cu(oe.data)}}]),(G=Dn.current)==null||G.damage([{cell:K.current.cell}]))},[An,K,Bn,hl]),xh=p.useCallback((w,H)=>{var $;const G=($=Dn.current)==null?void 0:$.getBounds(w,H);if(G===void 0||Qt.current===null)return;const A=An([w,H]);A.allowOverlay&&hl({target:G,content:A,initialValue:void 0,highlight:!0,cell:[w,H],forceEditMode:!0})},[An,Qt,hl]),ln=p.useCallback((w,H,$="both",G=0,A=0,ue=void 0)=>{if(Qt.current!==null){const oe=Dn.current,q=u.current,V=typeof w!="number"?w.unit==="cell"?w.amount:void 0:w,Y=typeof H!="number"?H.unit==="cell"?H.amount:void 0:H,le=typeof w!="number"&&w.unit==="px"?w.amount:void 0,Ce=typeof H!="number"&&H.unit==="px"?H.amount:void 0;if(oe!==null&&q!==null){let ve={x:0,y:0,width:0,height:0},ze=0,Qe=0;if((V!==void 0||Y!==void 0)&&(ve=oe.getBounds((V??0)+W,Y??0)??ve,ve.width===0||ve.height===0))return;const gt=q.getBoundingClientRect(),Be=gt.width/q.offsetWidth;if(le!==void 0&&(ve={...ve,x:le-gt.left-Qt.current.scrollLeft,width:1}),Ce!==void 0&&(ve={...ve,y:Ce+gt.top-Qt.current.scrollTop,height:1}),ve!==void 0){const He={x:ve.x-G,y:ve.y-A,width:ve.width+2*G,height:ve.height+2*A};let St=0;for(let ps=0;ps<Re;ps++)St+=dt[ps].width;let mn=0;const fn=Zt+(Yo?1:0);fn>0&&(mn=Vo(yn,fn,io));let Jn=St*Be+gt.left+W*go*Be,ao=gt.right,Qn=gt.top+Xn*Be,mo=gt.bottom-mn*Be;const wl=ve.width+G*2;switch(ue==null?void 0:ue.hAlign){case"start":ao=Jn+wl;break;case"end":Jn=ao-wl;break;case"center":Jn=Math.floor((Jn+ao)/2)-wl/2,ao=Jn+wl;break}const yl=ve.height+A*2;switch(ue==null?void 0:ue.vAlign){case"start":mo=Qn+yl;break;case"end":Qn=mo-yl;break;case"center":Qn=Math.floor((Qn+mo)/2)-yl/2,mo=Qn+yl;break}Jn>He.x?ze=He.x-Jn:ao<He.x+He.width&&(ze=He.x+He.width-ao),Qn>He.y?Qe=He.y-Qn:mo<He.y+He.height&&(Qe=He.y+He.height-mo),$==="vertical"||typeof w=="number"&&w<Re?ze=0:($==="horizontal"||typeof H=="number"&&H>=yn-fn)&&(Qe=0),(ze!==0||Qe!==0)&&(Be!==1&&(ze/=Be,Qe/=Be),Qt.current.scrollTo(ze+Qt.current.scrollLeft,Qe+Qt.current.scrollTop))}}}},[W,Zt,go,Qt,Xn,Re,dt,yn,Yo,io]),Ch=p.useRef(xh),kh=p.useRef(x),is=p.useRef(Ye);Ch.current=xh,kh.current=x,is.current=Ye;const yr=p.useCallback(async(w,H=!0)=>{var $;const G=Ct[w];if((($=G==null?void 0:G.trailingRowOptions)==null?void 0:$.disabled)===!0)return;const A=et==null?void 0:et();let ue,oe=!0;A!==void 0&&(ue=await A,ue==="top"&&(oe=!1),typeof ue=="number"&&(oe=!1));let q=0;const V=()=>{if(is.current<=Ye){q<500&&window.setTimeout(V,q),q=50+q*2;return}const Y=typeof ue=="number"?ue:oe?Ye:0;bl.current(w-W,Y),Ze({cell:[w,Y],range:{x:w,y:Y,width:1,height:1}},!1,!1,"edit");const le=kh.current([w-W,Y]);le.allowOverlay&&Er(le)&&le.readonly!==!0&&H&&window.setTimeout(()=>{Ch.current(w,Y)},0)};V()},[Ct,et,W,Ye,Ze]),fl=p.useCallback(w=>{var H,$;const G=(($=(H=dt[w])==null?void 0:H.trailingRowOptions)==null?void 0:$.targetColumn)??(yt==null?void 0:yt.targetColumn);if(typeof G=="number")return G+(Mn?1:0);if(typeof G=="object"){const A=T.indexOf(G);if(A>=0)return A+(Mn?1:0)}},[dt,T,Mn,yt==null?void 0:yt.targetColumn]),Do=p.useRef(),xr=p.useRef(),si=p.useCallback((w,H)=>{var $;const[G,A]=H;return co(_t,($=Ct[G])==null?void 0:$.themeOverride,po==null?void 0:po(A),w.themeOverride)},[po,Ct,_t]),{mapper:Ko}=Rg(Et,k),Kn=Et==null?void 0:Et.navigationBehavior,ci=p.useCallback(w=>{var H,$,G;const A=Di.value?w.metaKey:w.ctrlKey,ue=A&&ie==="multi",oe=A&&me==="multi",[q,V]=w.location,Y=K.columns,le=K.rows,[Ce,ve]=((H=K.current)==null?void 0:H.cell)??[];if(w.kind==="cell"){if(xr.current=void 0,qo.current=[q,V],q===0&&Mn){if(Gt===!0&&V===Ye||hn==="number"||ie==="none")return;const ze=An(w.location);if(ze.kind!==Fn.Marker)return;if(Dt!==void 0){const Be=Kt(ze);zn((Be==null?void 0:Be.kind)===Fn.Marker);const He=($=Be==null?void 0:Be.onClick)==null?void 0:$.call(Be,{...w,cell:ze,posX:w.localEventX,posY:w.localEventY,bounds:w.bounds,theme:si(ze,w.location),preventDefault:()=>{}});if(He===void 0||He.checked===ze.checked)return}a(void 0),Rn();const Qe=le.hasIndex(V),gt=Do.current;if(ie==="multi"&&(w.shiftKey||w.isLongTouch===!0)&&gt!==void 0&&le.hasIndex(gt)){const Be=[Math.min(gt,V),Math.max(gt,V)+1];ue||Xt==="multi"?Ge(void 0,Be,!0):Ge(vt.fromSingleSelection(Be),void 0,ue)}else ie==="multi"&&(ue||w.isTouch||Xt==="multi")?Qe?Ge(le.remove(V),void 0,!0):(Ge(void 0,V,!0),Do.current=V):Qe&&le.length===1?Ge(vt.empty(),void 0,A):(Ge(vt.fromSingleSelection(V),void 0,A),Do.current=V)}else if(q>=W&&Gt&&V===Ye){const ze=fl(q);yr(ze??q)}else if(Ce!==q||ve!==V){const ze=An(w.location),Qe=Kt(ze);if((Qe==null?void 0:Qe.onSelect)!==void 0){let He=!1;if(Qe.onSelect({...w,cell:ze,posX:w.localEventX,posY:w.localEventY,bounds:w.bounds,preventDefault:()=>He=!0,theme:si(ze,w.location)}),He)return}if(Kn==="block"&&Ko(V).isGroupHeader)return;const gt=Yo&&V===Ye,Be=Yo&&K!==void 0&&((G=K.current)==null?void 0:G.cell[1])===Ye;if((w.shiftKey||w.isLongTouch===!0)&&Ce!==void 0&&ve!==void 0&&K.current!==void 0&&!Be){if(gt)return;const He=Math.min(q,Ce),St=Math.max(q,Ce),mn=Math.min(V,ve),fn=Math.max(V,ve);Ze({...K.current,range:{x:He,y:mn,width:St-He+1,height:fn-mn+1}},!0,A,"click"),Do.current=void 0,Rn()}else Ze({cell:[q,V],range:{x:q,y:V,width:1,height:1}},!0,A,"click"),Do.current=void 0,a(void 0),Rn()}}else if(w.kind==="header")if(qo.current=[q,V],a(void 0),Mn&&q===0)Do.current=void 0,xr.current=void 0,ie==="multi"&&(le.length!==Ye?Ge(vt.fromSingleSelection([0,Ye]),void 0,A):Ge(vt.empty(),void 0,A),Rn());else{const ze=xr.current;if(me==="multi"&&(w.shiftKey||w.isLongTouch===!0)&&ze!==void 0&&Y.hasIndex(ze)){const Qe=[Math.min(ze,q),Math.max(ze,q)+1];oe?pt(void 0,Qe,A):pt(vt.fromSingleSelection(Qe),void 0,A)}else oe?(Y.hasIndex(q)?pt(Y.remove(q),void 0,A):pt(void 0,q,A),xr.current=q):me!=="none"&&(pt(vt.fromSingleSelection(q),void 0,A),xr.current=q);Do.current=void 0,Rn()}else w.kind===Nn?qo.current=[q,V]:w.kind===zi&&!w.isMaybeScrollbar&&(he(Ai,!1),a(void 0),Rn(),an==null||an(),Do.current=void 0,xr.current=void 0)},[ie,me,K,Mn,W,Gt,Ye,hn,An,Dt,Rn,Xt,Kt,si,Ge,fl,yr,Kn,Ko,Yo,Ze,pt,he,an]),ui=p.useRef(!1),qo=p.useRef(),Sh=p.useRef(Xo),qn=p.useRef(),sy=p.useCallback(w=>{if(Cr.current=!1,Sh.current=Hn.current,w.button!==0&&w.button!==1){qn.current=void 0;return}const H=performance.now();qn.current={button:w.button,time:H,location:w.location},(w==null?void 0:w.kind)==="header"&&(ui.current=!0);const $=w.kind==="cell"&&w.isFillHandle;!$&&w.kind!=="cell"&&w.isEdge||(f({previousSelection:K,fillHandle:$}),qo.current=void 0,!w.isTouch&&w.button===0&&!$?ci(w):!w.isTouch&&w.button===1&&(qo.current=w.location))},[K,ci]),[ls,as]=p.useState(),Mh=p.useCallback(w=>{if(w.kind!==Nn||me!=="multi")return;const H=Di.value?w.metaKey:w.ctrlKey,[$]=w.location,G=K.columns;if($<W)return;const A=Ct[$];let ue=$,oe=$;for(let q=$-1;q>=W&&Fr(A.group,Ct[q].group);q--)ue--;for(let q=$+1;q<Ct.length&&Fr(A.group,Ct[q].group);q++)oe++;if(Rn(),H)if(G.hasAll([ue,oe+1])){let q=G;for(let V=ue;V<=oe;V++)q=q.remove(V);pt(q,void 0,H)}else pt(void 0,[ue,oe+1],H);else pt(vt.fromSingleSelection([ue,oe+1]),void 0,H)},[me,Rn,K.columns,Ct,W,pt]),Cr=p.useRef(!1),pl=p.useCallback(async w=>{if(ee!==void 0&&Le!==void 0){const H=Hn.current.y,$=Hn.current.height;let G=ee({x:w,y:H,width:1,height:Math.min($,Ye-H)},F.current.signal);typeof G!="object"&&(G=await G());const A=dt[w-W],ue=document.createElement("canvas").getContext("2d",{alpha:!1});if(ue!==null){ue.font=_t.baseFontFull;const oe=jc(ue,_t,A,0,G,Oo,pr,!1,Kt);Le==null||Le(A,oe.width,w,oe.width)}}},[dt,ee,pr,_t,Oo,Le,W,Ye,Kt]),[cy,ss]=p.useState(),kr=p.useCallback(async(w,H)=>{var $,G;const A=($=w.current)==null?void 0:$.range;if(A===void 0||ee===void 0||H.current===void 0)return;const ue=H.current.range;if(R!==void 0){let Y=!1;if(R({fillDestination:{...ue,x:ue.x-W},patternSource:{...A,x:A.x-W},preventDefault:()=>Y=!0}),Y)return}let oe=ee(A,F.current.signal);typeof oe!="object"&&(oe=await oe());const q=oe,V=[];for(let Y=0;Y<ue.width;Y++)for(let le=0;le<ue.height;le++){const Ce=[ue.x+Y,ue.y+le];if(Oc(Ce,A))continue;const ve=q[le%A.height][Y%A.width];Po(ve)||!Er(ve)||V.push({location:Ce,value:{...ve}})}Bn(V),(G=Dn.current)==null||G.damage(V.map(Y=>({cell:Y.location})))},[ee,Bn,R,W]),Rh=p.useCallback(()=>{if(K.current===void 0||K.current.range.width<=1)return;const w={...K,current:{...K.current,range:{...K.current.range,width:1}}};kr(w,K)},[kr,K]),Eh=p.useCallback(()=>{if(K.current===void 0||K.current.range.height<=1)return;const w={...K,current:{...K.current,range:{...K.current.range,height:1}}};kr(w,K)},[kr,K]),uy=p.useCallback((w,H)=>{var $,G;const A=d;if(f(void 0),os(void 0),ss(void 0),ui.current=!1,H)return;if((A==null?void 0:A.fillHandle)===!0&&K.current!==void 0&&(($=A.previousSelection)==null?void 0:$.current)!==void 0){if(Go===void 0)return;const ve={...K,current:{...K.current,range:nu(A.previousSelection.current.range,Go)}};kr(A.previousSelection,ve),he(ve,!0);return}const[ue,oe]=w.location,[q,V]=qo.current??[],Y=()=>{Cr.current=!0},le=ve=>{var ze,Qe,gt;const Be=ve.isTouch||q===ue&&V===oe;if(Be&&(L==null||L([ue-W,oe],{...ve,preventDefault:Y})),ve.button===1)return!Cr.current;if(!Cr.current){const He=An(w.location),St=Kt(He);if(St!==void 0&&St.onClick!==void 0&&Be){const fn=St.onClick({...ve,cell:He,posX:ve.localEventX,posY:ve.localEventY,bounds:ve.bounds,theme:si(He,w.location),preventDefault:Y});fn!==void 0&&!Po(fn)&&Ho(fn)&&(Bn([{location:ve.location,value:fn}]),(ze=Dn.current)==null||ze.damage([{cell:ve.location}]))}if(Cr.current||K.current===void 0)return!1;let mn=!1;switch(He.activationBehaviorOverride??Tt){case"double-click":case"second-click":{if(((gt=(Qe=A==null?void 0:A.previousSelection)==null?void 0:Qe.current)==null?void 0:gt.cell)===void 0)break;const[fn,Jn]=K.current.cell,[ao,Qn]=A.previousSelection.current.cell;mn=ue===fn&&ue===ao&&oe===Jn&&oe===Qn&&(ve.isDoubleClick===!0||Tt==="second-click");break}case"single-click":{mn=!0;break}}if(mn)return O==null||O([ue-W,oe]),wr(ve.bounds,!1),!0}return!1},Ce=w.location[0]-W;if(w.isTouch){const ve=Hn.current,ze=Sh.current;if(ve.x!==ze.x||ve.y!==ze.y)return;if(w.isLongTouch===!0){if(w.kind==="cell"&&_r((G=K.current)==null?void 0:G.cell,w.location)){ne==null||ne([Ce,w.location[1]],{...w,preventDefault:Y});return}else if(w.kind==="header"&&K.columns.hasIndex(ue)){re==null||re(Ce,{...w,preventDefault:Y});return}else if(w.kind===Nn){if(Ce<0)return;de==null||de(Ce,{...w,preventDefault:Y});return}}w.kind==="cell"?le(w)||ci(w):w.kind===Nn?ae==null||ae(Ce,{...w,preventDefault:Y}):(w.kind===Mo&&(C==null||C(Ce,{...w,preventDefault:Y})),ci(w));return}if(w.kind==="header"){if(Ce<0)return;w.isEdge?w.isDoubleClick===!0&&pl(ue):w.button===0&&ue===q&&oe===V&&(C==null||C(Ce,{...w,preventDefault:Y}))}if(w.kind===Nn){if(Ce<0)return;w.button===0&&ue===q&&oe===V&&(ae==null||ae(Ce,{...w,preventDefault:Y}),Cr.current||Mh(w))}w.kind==="cell"&&(w.button===0||w.button===1)&&le(w),qo.current=void 0},[d,K,W,Go,kr,he,L,An,Kt,Tt,si,Bn,O,wr,ne,re,de,ci,ae,C,pl,Mh]),dy=p.useCallback(w=>{const H={...w,location:[w.location[0]-W,w.location[1]]};ce==null||ce(H),d!==void 0&&w.buttons===0&&(f(void 0),os(void 0),ss(void 0),ui.current=!1),ss($=>{var G;return ui.current?[w.scrollEdge[0],0]:w.scrollEdge[0]===($==null?void 0:$[0])&&w.scrollEdge[1]===$[1]?$:d===void 0||(((G=qn.current)==null?void 0:G.location[0])??0)<W?void 0:w.scrollEdge})},[d,ce,W]),hy=p.useCallback((w,H)=>{Ne==null||Ne(w-W,H)},[Ne,W]),fy=p.useCallback((w,H)=>{nt==null||nt(w-W,H)},[nt,W]),zo=(o=K==null?void 0:K.current)==null?void 0:o.cell,py=p.useCallback((w,H,$,G,A,ue)=>{ll.current=!1;let oe=zo;oe!==void 0&&(oe=[oe[0]-W,oe[1]]);const q=Re===0?void 0:{x:0,y:w.y,width:Re,height:w.height},V=[];q!==void 0&&V.push(q),Zt>0&&(V.push({x:w.x-W,y:Ye-Zt,width:w.width,height:Zt}),Re>0&&V.push({x:0,y:Ye-Zt,width:Re,height:Zt}));const Y={x:w.x-W,y:w.y,width:w.width,height:Gt&&w.y+w.height>=Ye?w.height-1:w.height,tx:A,ty:ue,extras:{selected:oe,freezeRegion:q,freezeRegions:V}};Hn.current=Y,wh(Y),Un([H,$,G]),wt==null||wt(Y,Y.tx,Y.ty,Y.extras)},[zo,W,Gt,Ye,Re,Zt,wh,wt]),gy=Ao(Pt,p.useCallback((w,H)=>{Pt==null||Pt(w-W,H-W),me!=="none"&&pt(vt.fromSingleSelection(H),void 0,!0)},[me,Pt,W,pt])),cs=p.useRef(!1),my=p.useCallback(w=>{if(w.location[0]===0&&W>0){w.preventDefault();return}Rt==null||Rt({...w,location:[w.location[0]-W,w.location[1]]}),w.defaultPrevented()||(cs.current=!0),f(void 0)},[Rt,W]),vy=p.useCallback(()=>{cs.current=!1},[]),Ih=Et==null?void 0:Et.selectionBehavior,gl=p.useCallback(w=>{if(Ih!=="block-spanning")return;const{isGroupHeader:H,path:$,groupRows:G}=Ko(w);if(H)return[w,w];const A=$[$.length-1],ue=w-A,oe=w+G-A-1;return[ue,oe]},[Ko,Ih]),us=p.useRef(),ds=p.useCallback(w=>{var H,$,G;if(!pu(w,us.current)&&(us.current=w,!(((H=qn==null?void 0:qn.current)==null?void 0:H.button)!==void 0&&qn.current.button>=1))){if(w.buttons!==0&&d!==void 0&&(($=qn.current)==null?void 0:$.location[0])===0&&w.location[0]===0&&W===1&&ie==="multi"&&d.previousSelection&&!d.previousSelection.rows.hasIndex(qn.current.location[1])&&K.rows.hasIndex(qn.current.location[1])){const A=Math.min(qn.current.location[1],w.location[1]),ue=Math.max(qn.current.location[1],w.location[1])+1;Ge(vt.fromSingleSelection([A,ue]),void 0,!1)}if(w.buttons!==0&&d!==void 0&&K.current!==void 0&&!cs.current&&!ui.current&&(be==="rect"||be==="multi-rect")){const[A,ue]=K.current.cell;let[oe,q]=w.location;if(q<0&&(q=Hn.current.y),d.fillHandle===!0&&((G=d.previousSelection)==null?void 0:G.current)!==void 0){const V=d.previousSelection.current.range;q=Math.min(q,Gt?Ye-1:Ye);const Y=g0(V,oe,q,ut);os(Y)}else{if(Gt&&ue===Ye)return;if(Gt&&q===Ye)if(w.kind===zi)q--;else return;oe=Math.max(oe,W);const V=gl(ue);q=V===void 0?q:_n(q,V[0],V[1]);const Y=oe-A,le=q-ue,Ce={x:Y>=0?A:oe,y:le>=0?ue:q,width:Math.abs(Y)+1,height:Math.abs(le)+1};Ze({...K.current,range:Ce},!0,!1,"drag")}}un==null||un({...w,location:[w.location[0]-W,w.location[1]]})}},[d,W,ie,K,be,un,Ge,Gt,Ye,ut,gl,Ze]),by=p.useCallback(()=>{var w,H;const $=us.current;if($===void 0)return;const[G,A]=$.scrollEdge;let[ue,oe]=$.location;const q=Hn.current;G===-1?ue=((H=(w=q.extras)==null?void 0:w.freezeRegion)==null?void 0:H.x)??q.x:G===1&&(ue=q.x+q.width),A===-1?oe=Math.max(0,q.y):A===1&&(oe=Math.min(Ye-1,q.y+q.height)),ue=_n(ue,0,Ct.length-1),oe=_n(oe,0,Ye-1),ds({...$,location:[ue,oe]})},[Ct.length,ds,Ye]);xg(cy,Qt,by);const Zn=p.useCallback(w=>{if(K.current===void 0)return;const[H,$]=w,[G,A]=K.current.cell,ue=K.current.range;let oe=ue.x,q=ue.x+ue.width,V=ue.y,Y=ue.y+ue.height;const[le,Ce]=gl(A)??[0,Ye-1],ve=Ce+1;if($!==0)switch($){case 2:{Y=ve,V=A,ln(0,Y,"vertical");break}case-2:{V=le,Y=A+1,ln(0,V,"vertical");break}case 1:{V<A?(V++,ln(0,V,"vertical")):(Y=Math.min(ve,Y+1),ln(0,Y,"vertical"));break}case-1:{Y>A+1?(Y--,ln(0,Y,"vertical")):(V=Math.max(le,V-1),ln(0,V,"vertical"));break}default:Rr()}if(H!==0)if(H===2)q=Ct.length,oe=G,ln(q-1-W,0,"horizontal");else if(H===-2)oe=W,q=G+1,ln(oe-W,0,"horizontal");else{let ze=[];if(ee!==void 0){const Qe=ee({x:oe,y:V,width:q-oe-W,height:Y-V},F.current.signal);typeof Qe=="object"&&(ze=Dg(Qe))}if(H===1){let Qe=!1;if(oe<G){if(ze.length>0){const gt=so(oe+1,G+1).find(Be=>!ze.includes(Be-W));gt!==void 0&&(oe=gt,Qe=!0)}else oe++,Qe=!0;Qe&&ln(oe,0,"horizontal")}Qe||(q=Math.min(Ct.length,q+1),ln(q-1-W,0,"horizontal"))}else if(H===-1){let Qe=!1;if(q>G+1){if(ze.length>0){const gt=so(q-1,G,-1).find(Be=>!ze.includes(Be-W));gt!==void 0&&(q=gt,Qe=!0)}else q--,Qe=!0;Qe&&ln(q-W,0,"horizontal")}Qe||(oe=Math.max(W,oe-1),ln(oe-W,0,"horizontal"))}else Rr()}Ze({cell:K.current.cell,range:{x:oe,y:V,width:q-oe,height:Y-V}},!0,!1,"keyboard-select")},[ee,gl,K,Ct.length,W,Ye,ln,Ze]),hs=p.useRef(ti);hs.current=ti;const Lo=p.useCallback((w,H,$,G)=>{const A=yn-($?0:1);w=_n(w,W,dt.length-1+W),H=_n(H,0,A);const ue=zo==null?void 0:zo[0],oe=zo==null?void 0:zo[1];if(w===ue&&H===oe)return!1;if(G&&K.current!==void 0){const q=[...K.current.rangeStack];(K.current.range.width>1||K.current.range.height>1)&&q.push(K.current.range),he({...K,current:{cell:[w,H],range:{x:w,y:H,width:1,height:1},rangeStack:q}},!0)}else Ze({cell:[w,H],range:{x:w,y:H,width:1,height:1}},!0,!1,"keyboard-nav");return h.current!==void 0&&h.current[0]===w&&h.current[1]===H&&(h.current=void 0),hs.current&&ln(w-W,H),!0},[yn,W,dt.length,zo,K,ln,he,Ze]),wy=p.useCallback((w,H)=>{(s==null?void 0:s.cell)!==void 0&&w!==void 0&&Ho(w)&&(Bn([{location:s.cell,value:w}]),window.requestAnimationFrame(()=>{var A;(A=Dn.current)==null||A.damage([{cell:s.cell}])})),Rn(!0),a(void 0);const[$,G]=H;if(K.current!==void 0&&($!==0||G!==0)){const A=K.current.cell[1]===yn-1&&w!==void 0;Lo(_n(K.current.cell[0]+$,0,Ct.length-1),_n(K.current.cell[1]+G,0,yn-1),A,!1)}P==null||P(w,H)},[s==null?void 0:s.cell,Rn,K,P,Bn,yn,Lo,Ct.length]),yy=p.useMemo(()=>`gdg-overlay-${Og++}`,[]),Zo=p.useCallback(w=>{var H,$,G,A;Rn();const ue=[];for(let oe=w.x;oe<w.x+w.width;oe++)for(let q=w.y;q<w.y+w.height;q++){const V=x([oe-W,q]);if(!V.allowOverlay&&V.kind!==Z.Boolean)continue;let Y;if(V.kind===Z.Custom){const le=Kt(V),Ce=(H=le==null?void 0:le.provideEditor)==null?void 0:H.call(le,V);(le==null?void 0:le.onDelete)!==void 0?Y=le.onDelete(V):Ms(Ce)&&(Y=($=Ce==null?void 0:Ce.deletedValue)==null?void 0:$.call(Ce,V))}else if(Ho(V)&&V.allowOverlay||V.kind===Z.Boolean){const le=Kt(V);Y=(G=le==null?void 0:le.onDelete)==null?void 0:G.call(le,V)}Y!==void 0&&!Po(Y)&&Ho(Y)&&ue.push({location:[oe,q],value:Y})}Bn(ue),(A=Dn.current)==null||A.damage(ue.map(oe=>({cell:oe.location})))},[Rn,x,Kt,Bn,W]),di=s!==void 0,Th=p.useCallback(w=>{var H,$;const G=()=>{w.stopPropagation(),w.preventDefault()},A={didMatch:!1},{bounds:ue}=w,oe=K.columns,q=K.rows,V=lo;if(!di&&st(V.clear,w,A))he(Ai,!1),an==null||an();else if(!di&&st(V.selectAll,w,A))he({columns:vt.empty(),rows:vt.empty(),current:{cell:((H=K.current)==null?void 0:H.cell)??[W,0],range:{x:W,y:0,width:T.length,height:Ye},rangeStack:[]}},!1);else if(st(V.search,w,A))($=c==null?void 0:c.current)==null||$.focus({preventScroll:!0}),il(!0);else if(st(V.delete,w,A)){const Be=(ft==null?void 0:ft(K))??!0;if(Be!==!1){const He=Be===!0?K:Be;if(He.current!==void 0){Zo(He.current.range);for(const St of He.current.rangeStack)Zo(St)}for(const St of He.rows)Zo({x:W,y:St,width:T.length,height:1});for(const St of He.columns)Zo({x:St,y:0,width:1,height:Ye})}}if(A.didMatch)return G(),!0;if(K.current===void 0)return!1;let[Y,le]=K.current.cell;const[,Ce]=K.current.cell;let ve=!1,ze=!1;if(st(V.scrollToSelectedCell,w,A)?bl.current(Y-W,le):me!=="none"&&st(V.selectColumn,w,A)?oe.hasIndex(Y)?pt(oe.remove(Y),void 0,!0):me==="single"?pt(vt.fromSingleSelection(Y),void 0,!0):pt(void 0,Y,!0):ie!=="none"&&st(V.selectRow,w,A)?q.hasIndex(le)?Ge(q.remove(le),void 0,!0):ie==="single"?Ge(vt.fromSingleSelection(le),void 0,!0):Ge(void 0,le,!0):!di&&ue!==void 0&&st(V.activateCell,w,A)?le===Ye&&Gt?window.setTimeout(()=>{const Be=fl(Y);yr(Be??Y)},0):(O==null||O([Y-W,le]),wr(ue,!0)):K.current.range.height>1&&st(V.downFill,w,A)?Eh():K.current.range.width>1&&st(V.rightFill,w,A)?Rh():st(V.goToNextPage,w,A)?le+=Math.max(1,Hn.current.height-4):st(V.goToPreviousPage,w,A)?le-=Math.max(1,Hn.current.height-4):st(V.goToFirstCell,w,A)?(a(void 0),le=0,Y=0):st(V.goToLastCell,w,A)?(a(void 0),le=Number.MAX_SAFE_INTEGER,Y=Number.MAX_SAFE_INTEGER):st(V.selectToFirstCell,w,A)?(a(void 0),Zn([-2,-2])):st(V.selectToLastCell,w,A)?(a(void 0),Zn([2,2])):di?(st(V.closeOverlay,w,A)&&a(void 0),st(V.acceptOverlayDown,w,A)&&(a(void 0),le++),st(V.acceptOverlayUp,w,A)&&(a(void 0),le--),st(V.acceptOverlayLeft,w,A)&&(a(void 0),Y--),st(V.acceptOverlayRight,w,A)&&(a(void 0),Y++)):(st(V.goDownCell,w,A)?le+=1:st(V.goUpCell,w,A)?le-=1:st(V.goRightCell,w,A)?Y+=1:st(V.goLeftCell,w,A)?Y-=1:st(V.goDownCellRetainSelection,w,A)?(le+=1,ve=!0):st(V.goUpCellRetainSelection,w,A)?(le-=1,ve=!0):st(V.goRightCellRetainSelection,w,A)?(Y+=1,ve=!0):st(V.goLeftCellRetainSelection,w,A)?(Y-=1,ve=!0):st(V.goToLastRow,w,A)?le=Ye-1:st(V.goToFirstRow,w,A)?le=Number.MIN_SAFE_INTEGER:st(V.goToLastColumn,w,A)?Y=Number.MAX_SAFE_INTEGER:st(V.goToFirstColumn,w,A)?Y=Number.MIN_SAFE_INTEGER:(be==="rect"||be==="multi-rect")&&(st(V.selectGrowDown,w,A)?Zn([0,1]):st(V.selectGrowUp,w,A)?Zn([0,-1]):st(V.selectGrowRight,w,A)?Zn([1,0]):st(V.selectGrowLeft,w,A)?Zn([-1,0]):st(V.selectToLastRow,w,A)?Zn([0,2]):st(V.selectToFirstRow,w,A)?Zn([0,-2]):st(V.selectToLastColumn,w,A)?Zn([2,0]):st(V.selectToFirstColumn,w,A)&&Zn([-2,0])),ze=A.didMatch),Kn!==void 0&&Kn!=="normal"&&le!==Ce){const Be=Kn==="skip-up"||Kn==="skip"||Kn==="block",He=Kn==="skip-down"||Kn==="skip"||Kn==="block",St=le<Ce;if(St&&Be){for(;le>=0&&Ko(le).isGroupHeader;)le--;le<0&&(le=Ce)}else if(!St&&He){for(;le<Ye&&Ko(le).isGroupHeader;)le++;le>=Ye&&(le=Ce)}}const Qe=Lo(Y,le,!1,ve),gt=A.didMatch;return gt&&(Qe||!ze||ho)&&G(),gt},[Kn,di,K,lo,me,ie,be,W,Ko,Ye,Lo,he,an,T.length,ft,ho,Zo,pt,Ge,Gt,fl,yr,O,wr,Eh,Rh,Zn]),hi=p.useCallback(w=>{let H=!1;if(Fe!==void 0&&Fe({...w,cancel:()=>{H=!0}}),H||Th(w)||K.current===void 0)return;const[$,G]=K.current.cell,A=Hn.current;if(_e&&!w.metaKey&&!w.ctrlKey&&K.current!==void 0&&w.key.length===1&&/[ -~]/g.test(w.key)&&w.bounds!==void 0&&Er(x([$-W,Math.max(0,Math.min(G,Ye-1))]))){if((!Gt||G!==Ye)&&(A.y>G||G>A.y+A.height||A.x>$||$>A.x+A.width))return;wr(w.bounds,!0,w.key),w.stopPropagation(),w.preventDefault()}},[_e,Fe,Th,K,x,W,Ye,Gt,wr]),xy=p.useCallback((w,H)=>{const $=w.location[0]-W;if(w.kind==="header"&&(re==null||re($,{...w,preventDefault:H})),w.kind===Nn){if($<0)return;de==null||de($,{...w,preventDefault:H})}if(w.kind==="cell"){const[G,A]=w.location;ne==null||ne([$,A],{...w,preventDefault:H}),dp(K,w.location)||Lo(G,A,!1,!1)}},[K,ne,de,re,W,Lo]),fs=p.useCallback(async w=>{var H,$,G;if(!lo.paste)return;function A(Y,le,Ce,ve){var ze,Qe;const gt=typeof Ce=="object"?(Ce==null?void 0:Ce.join(`
173
173
  `))??"":(Ce==null?void 0:Ce.toString())??"";if(!Po(Y)&&Er(Y)&&Y.readonly!==!0){const Be=M==null?void 0:M(gt,Y);if(Be!==void 0&&Ho(Be))return{location:le,value:Be};const He=Kt(Y);if(He===void 0)return;if(He.kind===Z.Custom){zn(Y.kind===Z.Custom);const St=(ze=He.onPaste)==null?void 0:ze.call(He,gt,Y.data);return St===void 0?void 0:{location:le,value:{...Y,data:St}}}else{const St=(Qe=He.onPaste)==null?void 0:Qe.call(He,gt,Y,{formatted:ve,formattedString:typeof ve=="string"?ve:ve==null?void 0:ve.join(`
174
174
  `),rawValue:Ce});return St===void 0?void 0:(zn(St.kind===Y.kind),{location:le,value:St})}}}const ue=K.columns,oe=K.rows,q=((H=Qt.current)==null?void 0:H.contains(document.activeElement))===!0||(($=u.current)==null?void 0:$.contains(document.activeElement))===!0;let V;if(K.current!==void 0?V=[K.current.range.x,K.current.range.y]:ue.length===1?V=[ue.first()??0,0]:oe.length===1&&(V=[W,oe.first()??0]),q&&V!==void 0){let Y,le;const Ce="text/plain",ve="text/html";if(navigator.clipboard.read!==void 0){const Be=await navigator.clipboard.read();for(const He of Be){if(He.types.includes(ve)){const St=await(await He.getType(ve)).text(),mn=wu(St);if(mn!==void 0){Y=mn;break}}He.types.includes(Ce)&&(le=await(await He.getType(Ce)).text())}}else if(navigator.clipboard.readText!==void 0)le=await navigator.clipboard.readText();else if(w!==void 0&&(w==null?void 0:w.clipboardData)!==null){if(w.clipboardData.types.includes(ve)){const Be=w.clipboardData.getData(ve);Y=wu(Be)}Y===void 0&&w.clipboardData.types.includes(Ce)&&(le=w.clipboardData.getData(Ce))}else return;const[ze,Qe]=V,gt=[];do{if(it===void 0){const Be=An(V),He=le??(Y==null?void 0:Y.map(mn=>mn.map(fn=>fn.rawValue).join(" ")).join(" "))??"",St=A(Be,V,He,void 0);St!==void 0&&gt.push(St);break}if(Y===void 0){if(le===void 0)return;Y=pg(le)}if(it===!1||typeof it=="function"&&(it==null?void 0:it([V[0]-W,V[1]],Y.map(Be=>Be.map(He=>{var St;return((St=He.rawValue)==null?void 0:St.toString())??""}))))!==!0)return;for(const[Be,He]of Y.entries()){if(Be+Qe>=Ye)break;for(const[St,mn]of He.entries()){const fn=[St+ze,Be+Qe],[Jn,ao]=fn;if(Jn>=Ct.length||ao>=yn)continue;const Qn=An(fn),mo=A(Qn,fn,mn.rawValue,mn.formatted);mo!==void 0&&gt.push(mo)}}}while(!1);Bn(gt),(G=Dn.current)==null||G.damage(gt.map(Be=>({cell:Be.location})))}},[M,Kt,An,K,lo.paste,Qt,Ct.length,Bn,yn,it,W,Ye]);pn("paste",fs,g,!1,!0);const fi=p.useCallback(async(w,H)=>{var $,G;if(!lo.copy)return;const A=H===!0||(($=Qt.current)==null?void 0:$.contains(document.activeElement))===!0||((G=u.current)==null?void 0:G.contains(document.activeElement))===!0,ue=K.columns,oe=K.rows,q=(V,Y)=>{if(!at)xu(V,Y,w);else{const le=Y.map(Ce=>({kind:Z.Text,data:T[Ce].title,displayData:T[Ce].title,allowOverlay:!1}));xu([le,...V],Y,w)}};if(A&&ee!==void 0){if(K.current!==void 0){let V=ee(K.current.range,F.current.signal);typeof V!="object"&&(V=await V()),q(V,so(K.current.range.x-W,K.current.range.x+K.current.range.width-W))}else if(oe!==void 0&&oe.length>0){const V=[...oe].map(Y=>{const le=ee({x:W,y:Y,width:T.length,height:1},F.current.signal);return typeof le=="object"?le[0]:le().then(Ce=>Ce[0])});if(V.some(Y=>Y instanceof Promise)){const Y=await Promise.all(V);q(Y,so(T.length))}else q(V,so(T.length))}else if(ue.length>0){const V=[],Y=[];for(const le of ue){let Ce=ee({x:le,y:0,width:1,height:Ye},F.current.signal);typeof Ce!="object"&&(Ce=await Ce()),V.push(Ce),Y.push(le-W)}if(V.length===1)q(V[0],Y);else{const le=V.reduce((Ce,ve)=>Ce.map((ze,Qe)=>[...ze,...ve[Qe]]));q(le,Y)}}}},[T,ee,K,lo.copy,W,Qt,Ye,at]);pn("copy",fi,g,!1,!1);const Cy=p.useCallback(async w=>{var H,$;if(!(!lo.cut||!(((H=Qt.current)==null?void 0:H.contains(document.activeElement))===!0||(($=u.current)==null?void 0:$.contains(document.activeElement))===!0))&&(await fi(w),K.current!==void 0)){let G={current:{cell:K.current.cell,range:K.current.range,rangeStack:[]},rows:vt.empty(),columns:vt.empty()};const A=ft==null?void 0:ft(G);if(A===!1||(G=A===!0?G:A,G.current===void 0))return;Zo(G.current.range)}},[Zo,K,lo.cut,fi,Qt,ft]);pn("cut",Cy,g,!1,!1);const ky=p.useCallback((w,H)=>{if(z!==void 0){W!==0&&(w=w.map(A=>[A[0]-W,A[1]])),z(w,H);return}if(w.length===0||H===-1)return;const[$,G]=w[H];h.current!==void 0&&h.current[0]===$&&h.current[1]===G||(h.current=[$,G],Lo($,G,!1,!1))},[z,W,Lo]),[ml,vl]=((r=Ot==null?void 0:Ot.current)==null?void 0:r.cell)??[],bl=p.useRef(ln);bl.current=ln,p.useLayoutEffect(()=>{var w,H,$,G;hs.current&&!ll.current&&ml!==void 0&&vl!==void 0&&(ml!==((H=(w=Pe.current)==null?void 0:w.current)==null?void 0:H.cell[0])||vl!==((G=($=Pe.current)==null?void 0:$.current)==null?void 0:G.cell[1]))&&bl.current(ml,vl),ll.current=!1},[ml,vl]);const Oh=K.current!==void 0&&(K.current.cell[0]>=Ct.length||K.current.cell[1]>=yn);p.useLayoutEffect(()=>{Oh&&he(Ai,!1)},[Oh,he]);const Sy=p.useMemo(()=>Gt===!0&&(yt==null?void 0:yt.tint)===!0?vt.fromSingleSelection(yn-1):vt.empty(),[yn,Gt,yt==null?void 0:yt.tint]),My=p.useCallback(w=>typeof rn=="boolean"?rn:(rn==null?void 0:rn(w-W))??!0,[W,rn]),Ry=p.useMemo(()=>{if(ls===void 0||u.current===null)return null;const{bounds:w,group:H}=ls,$=u.current.getBoundingClientRect();return p.createElement(og,{bounds:w,group:H,canvasBounds:$,onClose:()=>as(void 0),onFinish:G=>{as(void 0),fe==null||fe(H,G)}})},[fe,ls]),Ey=Math.min(Ct.length,Re+(Mn?1:0));p.useImperativeHandle(t,()=>({appendRow:(w,H)=>yr(w+W,H),updateCells:w=>{var H;return W!==0&&(w=w.map($=>({cell:[$.cell[0]+W,$.cell[1]]}))),(H=Dn.current)==null?void 0:H.damage(w)},getBounds:(w,H)=>{var $;if(!((u==null?void 0:u.current)===null||(Qt==null?void 0:Qt.current)===null)){if(w===void 0&&H===void 0){const G=u.current.getBoundingClientRect(),A=G.width/Qt.current.clientWidth;return{x:G.x-Qt.current.scrollLeft*A,y:G.y-Qt.current.scrollTop*A,width:Qt.current.scrollWidth*A,height:Qt.current.scrollHeight*A}}return($=Dn.current)==null?void 0:$.getBounds((w??0)+W,H)}},focus:()=>{var w;return(w=Dn.current)==null?void 0:w.focus()},emit:async w=>{switch(w){case"delete":hi({bounds:void 0,cancel:()=>{},stopPropagation:()=>{},preventDefault:()=>{},ctrlKey:!1,key:"Delete",keyCode:46,metaKey:!1,shiftKey:!1,altKey:!1,rawEvent:void 0,location:void 0});break;case"fill-right":hi({bounds:void 0,cancel:()=>{},stopPropagation:()=>{},preventDefault:()=>{},ctrlKey:!0,key:"r",keyCode:82,metaKey:!1,shiftKey:!1,altKey:!1,rawEvent:void 0,location:void 0});break;case"fill-down":hi({bounds:void 0,cancel:()=>{},stopPropagation:()=>{},preventDefault:()=>{},ctrlKey:!0,key:"d",keyCode:68,metaKey:!1,shiftKey:!1,altKey:!1,rawEvent:void 0,location:void 0});break;case"copy":await fi(void 0,!0);break;case"paste":await fs();break}},scrollTo:ln,remeasureColumns:w=>{for(const H of w)pl(H+W)}}),[yr,pl,Qt,fi,hi,fs,W,ln]);const[Dh,zh]=zo??[],Iy=p.useCallback(w=>{const[H,$]=w;if($===-1){me!=="none"&&(pt(vt.fromSingleSelection(H),void 0,!1),Rn());return}Dh===H&&zh===$||(Ze({cell:w,range:{x:H,y:$,width:1,height:1}},!0,!1,"keyboard-nav"),ln(H,$))},[me,Rn,ln,Dh,zh,Ze,pt]),[Ty,Oy]=p.useState(!1),Lh=p.useRef(ac(w=>{Oy(w)},5)),Dy=p.useCallback(()=>{Lh.current(!0),K.current===void 0&&K.columns.length===0&&K.rows.length===0&&d===void 0&&Ze({cell:[W,al],range:{x:W,y:al,width:1,height:1}},!0,!1,"keyboard-select")},[al,K,d,W,Ze]),zy=p.useCallback(()=>{Lh.current(!1)},[]),[Ly,Py]=p.useMemo(()=>{let w;const H=(jt==null?void 0:jt.scrollbarWidthOverride)??Bl(),$=Ye+(Gt?1:0);if(typeof io=="number")w=Xn+$*io;else{let A=0;const ue=Math.min($,10);for(let oe=0;oe<ue;oe++)A+=io(oe);A=Math.floor(A/ue),w=Xn+$*A}w+=H;const G=Ct.reduce((A,ue)=>ue.width+A,0)+H;return[`${Math.min(1e5,G)}px`,`${Math.min(1e5,w)}px`]},[Ct,jt==null?void 0:jt.scrollbarWidthOverride,io,Ye,Gt,Xn]),Hy=p.useMemo(()=>Rs(_t),[_t]);return p.createElement(El.Provider,{value:_t},p.createElement(bg,{style:Hy,className:U,inWidth:v??Ly,inHeight:I??Py},p.createElement(eg,{fillHandle:Wt,drawFocusRing:ni,experimental:jt,fixedShadowX:oo,fixedShadowY:jn,getRowThemeOverride:po,headerIcons:_,imageWindowLoader:qe,initialSize:Je,isDraggable:pe,onDragLeave:rt,onRowMoved:Dt,overscrollX:es,overscrollY:ts,preventDiagonalScrolling:tn,rightElement:Sn,rightElementProps:wn,smoothScrollX:ro,smoothScrollY:Ga,className:U,enableGroups:On,onCanvasFocused:Dy,onCanvasBlur:zy,canvasRef:u,onContextMenu:xy,theme:_t,cellXOffset:ly,cellYOffset:al,accessibilityHeight:Xo.height,onDragEnd:vy,columns:Ct,nonGrowWidth:Tn,drawHeader:zt,onColumnProposeMove:X,drawCell:ye,disabledRows:Sy,freezeColumns:Ey,lockColumns:W,firstColAccessible:W===0,getCellContent:An,minColumnWidth:Oo,maxColumnWidth:pr,searchInputRef:c,showSearch:vr,onSearchClose:ns,highlightRegions:ay,getCellsForSelection:ee,getGroupDetails:rs,headerHeight:ai,isFocused:Ty,groupHeaderHeight:On?gr:0,freezeTrailingRows:Zt+(Gt&&(yt==null?void 0:yt.sticky)===!0?1:0),hasAppendRow:Gt,onColumnResize:Le,onColumnResizeEnd:lt,onColumnResizeStart:xt,onCellFocused:Iy,onColumnMoved:gy,onDragStart:my,onHeaderMenuClick:hy,onHeaderIndicatorClick:fy,onItemHovered:ds,isFilling:(d==null?void 0:d.fillHandle)===!0,onMouseMove:dy,onKeyDown:hi,onKeyUp:xe,onMouseDown:sy,onMouseUp:uy,onDragOverCell:Ft,onDrop:Jt,onSearchResultsChanged:ky,onVisibleRegionChanged:py,clientSize:nn,rowHeight:io,searchResults:j,searchValue:ke,onSearchValueChange:ge,rows:yn,scrollRef:Qt,selection:K,translateX:Xo.tx,translateY:Xo.ty,verticalBorder:My,gridRef:Dn,getCellRenderer:Kt,resizeIndicator:ur}),Ry,s!==void 0&&p.createElement(p.Suspense,{fallback:null},p.createElement(Tg,{...s,validateCell:Se,bloom:D,id:yy,getCellRenderer:Kt,className:(jt==null?void 0:jt.isSubGrid)===!0?"click-outside-ignore":void 0,provideEditor:bn,imageEditorOverride:m,onFinishEditing:wy,markdownDivCreateNode:y,isOutsideClick:nl,customEventTarget:jt==null?void 0:jt.eventTarget}))))},Lg=p.forwardRef(zg),Eu=20;function Iu(e){const{cell:t,posX:n,posY:o,bounds:r,theme:i}=e,{width:l,height:s,x:a,y:c}=r,u=t.maxSize??Eu,d=Math.floor(r.y+s/2),f=dc(u,s,i.cellVerticalPadding),h=uc(t.contentAlign??"center",a,l,i.cellHorizontalPadding,f),g=cc(h,d,f),m=hc(a+n,c+o,g);return zl(t)&&m}const Pg={getAccessibilityString:e=>{var t;return((t=e.data)==null?void 0:t.toString())??"false"},kind:Z.Boolean,needsHover:!0,useLabel:!1,needsHoverPosition:!0,measure:()=>50,draw:e=>Hg(e,e.cell.data,zl(e.cell),e.cell.maxSize??Eu,e.cell.hoverEffectIntensity??.35),onDelete:e=>({...e,data:!1}),onSelect:e=>{Iu(e)&&e.preventDefault()},onClick:e=>{if(Iu(e))return{...e.cell,data:Cu(e.cell.data)}},onPaste:(e,t)=>{let n=bi;return e.toLowerCase()==="true"?n=!0:e.toLowerCase()==="false"?n=!1:e.toLowerCase()==="indeterminate"&&(n=Dl),n===t.data?void 0:{...t,data:n}}};function Hg(e,t,n,o,r){if(!n&&t===bi)return;const{ctx:i,hoverAmount:l,theme:s,rect:a,highlighted:c,hoverX:u,hoverY:d,cell:{contentAlign:f}}=e,{x:h,y:g,width:m,height:b}=a;let y=!1;if(r>0){let v=n?1-r+r*l:.4;if(t===bi&&(v*=l),v===0)return;v<1&&(y=!0,i.globalAlpha=v)}la(i,s,t,h,g,m,b,c,u,d,o,f),y&&(i.globalAlpha=1)}const Ag=cn("div")({name:"BubblesOverlayEditorStyle",class:"gdg-b1ygi5by",propsAsIs:!1}),Fg=e=>{const{bubbles:t}=e;return p.createElement(Ag,null,t.map((n,o)=>p.createElement("div",{key:o,className:"boe-bubble"},n)),p.createElement("textarea",{className:"gdg-input",autoFocus:!0}))},_g={getAccessibilityString:e=>fc(e.data),kind:Z.Bubble,needsHover:!1,useLabel:!1,needsHoverPosition:!1,measure:(e,t,n)=>t.data.reduce((o,r)=>e.measureText(r).width+o+20,0)+2*n.cellHorizontalPadding-4,draw:e=>Bg(e,e.cell.data),provideEditor:()=>e=>{const{value:t}=e;return p.createElement(Fg,{bubbles:t.data})},onPaste:()=>{}},Ng=4;function Bg(e,t){const{rect:n,theme:o,ctx:r,highlighted:i}=e,{x:l,y:s,width:a,height:c}=n,u=20,d=8,f=Ng;let h=l+o.cellHorizontalPadding;const g=[];for(const m of t){if(h>l+a)break;const b=$o(m,r,o.baseFontFull).width;g.push({x:h,width:b}),h+=b+d*2+f}r.beginPath();for(const m of g)no(r,m.x,s+(c-u)/2,m.width+d*2,u,o.roundingRadius??u/2);r.fillStyle=i?o.bgBubbleSelected:o.bgBubble,r.fill();for(const[m,b]of g.entries())r.beginPath(),r.fillStyle=o.textBubble,r.fillText(t[m],b.x+d,s+c/2+eo(r,o))}const Vg=cn("div")({name:"DrilldownOverlayEditorStyle",class:"gdg-d4zsq0x",propsAsIs:!1}),$g=e=>{const{drilldowns:t}=e;return p.createElement(Vg,null,t.map((n,o)=>p.createElement("div",{key:o,className:"doe-bubble"},n.img!==void 0&&p.createElement("img",{src:n.img}),p.createElement("div",null,n.text))))},Wg={getAccessibilityString:e=>fc(e.data.map(t=>t.text)),kind:Z.Drilldown,needsHover:!1,useLabel:!1,needsHoverPosition:!1,measure:(e,t,n)=>t.data.reduce((o,r)=>e.measureText(r.text).width+o+20+(r.img!==void 0?18:0),0)+2*n.cellHorizontalPadding-4,draw:e=>Yg(e,e.cell.data),provideEditor:()=>e=>{const{value:t}=e;return p.createElement($g,{drilldowns:t.data})},onPaste:()=>{}},jg=4,da={};function Ug(e,t,n,o){const r=Math.ceil(window.devicePixelRatio),i=5,l=n-i*2,s=4,a=n*r,c=o+i,u=o*3,d=(u+i*2)*r,f=`${e},${t},${r},${n}`;if(da[f]!==void 0)return{el:da[f],height:a,width:d,middleWidth:s*r,sideWidth:c*r,padding:i*r,dpr:r};const h=document.createElement("canvas"),g=h.getContext("2d");return g===null?null:(h.width=d,h.height=a,g.scale(r,r),da[f]=h,g.beginPath(),no(g,i,i,u,l,o),g.shadowColor="rgba(24, 25, 34, 0.4)",g.shadowBlur=1,g.fillStyle=e,g.fill(),g.shadowColor="rgba(24, 25, 34, 0.3)",g.shadowOffsetY=1,g.shadowBlur=5,g.fillStyle=e,g.fill(),g.shadowOffsetY=0,g.shadowBlur=0,g.shadowBlur=0,g.beginPath(),no(g,i+.5,i+.5,u,l,o),g.strokeStyle=t,g.lineWidth=1,g.stroke(),{el:h,height:a,width:d,sideWidth:c*r,middleWidth:o*r,padding:i*r,dpr:r})}function Yg(e,t){const{rect:n,theme:o,ctx:r,imageLoader:i,col:l,row:s}=e,{x:a,width:c}=n,u=o.baseFontFull,d=Nc(r,u),f=Math.min(n.height,Math.max(16,Math.ceil(d*o.lineHeight)*2)),h=Math.floor(n.y+(n.height-f)/2),g=f-10,m=8,b=jg;let y=a+o.cellHorizontalPadding;const v=o.roundingRadius??6,I=Ug(o.bgCell,o.drilldownBorder,f,v),T=[];for(const k of t){if(y>a+c)break;const x=$o(k.text,r,u).width;let L=0;k.img!==void 0&&i.loadOrGetImage(k.img,l,s)!==void 0&&(L=g-8+4);const O=x+L+m*2;T.push({x:y,width:O}),y+=O+b}if(I!==null){const{el:k,height:x,middleWidth:L,sideWidth:O,width:R,dpr:P,padding:M}=I,S=O/P,E=M/P;for(const D of T){const C=Math.floor(D.x),X=Math.floor(D.width),B=X-(S-E)*2;r.imageSmoothingEnabled=!1,r.drawImage(k,0,0,O,x,C-E,h,S,f),B>0&&r.drawImage(k,O,0,L,x,C+(S-E),h,B,f),r.drawImage(k,R-O,0,O,x,C+X-(S-E),h,S,f),r.imageSmoothingEnabled=!0}}r.beginPath();for(const[k,x]of T.entries()){const L=t[k];let O=x.x+m;if(L.img!==void 0){const R=i.loadOrGetImage(L.img,l,s);if(R!==void 0){const P=g-8;let M=0,S=0,E=R.width,D=R.height;E>D?(M+=(E-D)/2,E=D):D>E&&(S+=(D-E)/2,D=E),r.beginPath(),no(r,O,h+f/2-P/2,P,P,o.roundingRadius??3),r.save(),r.clip(),r.drawImage(R,M,S,E,D,O,h+f/2-P/2,P,P),r.restore(),O+=P+4}}r.beginPath(),r.fillStyle=o.textBubble,r.fillText(L.text,O,h+f/2+eo(r,o))}}const Xg={getAccessibilityString:e=>e.data.join(", "),kind:Z.Image,needsHover:!1,useLabel:!1,needsHoverPosition:!1,draw:e=>Gg(e,e.cell.displayData??e.cell.data,e.cell.rounding??e.theme.roundingRadius??4,e.cell.contentAlign),measure:(e,t)=>t.data.length*50,onDelete:e=>({...e,data:[]}),provideEditor:()=>e=>{const{value:t,onFinishedEditing:n,imageEditorOverride:o}=e,r=o??Hf;return p.createElement(r,{urls:t.data,canWrite:t.readonly!==!0,onCancel:n,onChange:i=>{n({...t,data:[i]})}})},onPaste:(e,t)=>{e=e.trim();const n=e.split(",").map(o=>{try{return new URL(o),o}catch{return}}).filter(o=>o!==void 0);if(!(n.length===t.data.length&&n.every((o,r)=>o===t.data[r])))return{...t,data:n}}},ha=4;function Gg(e,t,n,o){const{rect:r,col:i,row:l,theme:s,ctx:a,imageLoader:c}=e,{x:u,y:d,height:f,width:h}=r,g=f-s.cellVerticalPadding*2,m=[];let b=0;for(let v=0;v<t.length;v++){const I=t[v];if(I.length===0)continue;const T=c.loadOrGetImage(I,i,l);if(T!==void 0){m[v]=T;const k=T.width*(g/T.height);b+=k+ha}}if(b===0)return;b-=ha;let y=u+s.cellHorizontalPadding;o==="right"?y=Math.floor(u+h-s.cellHorizontalPadding-b):o==="center"&&(y=Math.floor(u+h/2-b/2));for(const v of m){if(v===void 0)continue;const I=v.width*(g/v.height);n>0&&(a.beginPath(),no(a,y,d+s.cellVerticalPadding,I,g,n),a.save(),a.clip()),a.drawImage(v,y,d+s.cellVerticalPadding,I,g),n>0&&a.restore(),y+=I+ha}}function Kg(e,t){let n=e*49632+t*325176;return n^=n<<13,n^=n>>17,n^=n<<5,n/4294967295*2}const qg={getAccessibilityString:()=>"",kind:Z.Loading,needsHover:!1,useLabel:!1,needsHoverPosition:!1,measure:()=>120,draw:e=>{const{cell:t,col:n,row:o,ctx:r,rect:i,theme:l}=e;if(t.skeletonWidth===void 0||t.skeletonWidth===0)return;let s=t.skeletonWidth;t.skeletonWidthVariability!==void 0&&t.skeletonWidthVariability>0&&(s+=Math.round(Kg(n,o)*t.skeletonWidthVariability));const a=l.cellHorizontalPadding;s+a*2>=i.width&&(s=i.width-a*2-1);const c=t.skeletonHeight??Math.min(18,i.height-2*l.cellVerticalPadding);no(r,i.x+a,i.y+(i.height-c)/2,s,c,l.roundingRadius??3),r.fillStyle=Bo(l.textDark,.1),r.fill()},onPaste:()=>{}},Zg=()=>e=>e.targetWidth,Tu=cn("div")({name:"MarkdownOverlayEditorStyle",class:"gdg-m1pnx84e",propsAsIs:!1,vars:{"m1pnx84e-0":[Zg(),"px"]}}),Jg=e=>{const{value:t,onChange:n,forceEditMode:o,createNode:r,targetRect:i,onFinish:l,validatedSelection:s}=e,a=t.data,c=t.readonly===!0,[u,d]=p.useState(a===""||o),f=p.useCallback(()=>{d(g=>!g)},[]),h=a?"gdg-ml-6":"";return u?p.createElement(Tu,{targetWidth:i.width-20},p.createElement(No,{autoFocus:!0,highlight:!1,validatedSelection:s,value:a,onKeyDown:g=>{g.key==="Enter"&&g.stopPropagation()},onChange:n}),p.createElement("div",{className:`gdg-edit-icon gdg-checkmark-hover ${h}`,onClick:()=>l(t)},p.createElement(If,null))):p.createElement(Tu,{targetWidth:i.width},p.createElement(ep,{contents:a,createNode:r}),!c&&p.createElement(p.Fragment,null,p.createElement("div",{className:"spacer"}),p.createElement("div",{className:`gdg-edit-icon gdg-edit-hover ${h}`,onClick:f},p.createElement(_l,null))),p.createElement("textarea",{className:"gdg-md-edit-textarea gdg-input",autoFocus:!0}))},Qg={getAccessibilityString:e=>{var t;return((t=e.data)==null?void 0:t.toString())??""},kind:Z.Markdown,needsHover:!1,needsHoverPosition:!1,drawPrep:Br,measure:(e,t,n)=>{const o=t.data.split(`
175
- `)[0];return e.measureText(o).width+2*n.cellHorizontalPadding},draw:e=>to(e,e.cell.data,e.cell.contentAlign),onDelete:e=>({...e,data:""}),provideEditor:()=>e=>{const{onChange:t,value:n,target:o,onFinishedEditing:r,markdownDivCreateNode:i,forceEditMode:l,validatedSelection:s}=e;return p.createElement(Jg,{onFinish:r,targetRect:o,value:n,validatedSelection:s,onChange:a=>t({...n,data:a.target.value}),forceEditMode:l,createNode:i})},onPaste:(e,t)=>e===t.data?void 0:{...t,data:e}},em={getAccessibilityString:e=>e.row.toString(),kind:Fn.Marker,needsHover:!0,needsHoverPosition:!1,drawPrep:tm,measure:()=>44,draw:e=>om(e,e.cell.row,e.cell.checked,e.cell.markerKind,e.cell.drawHandle,e.cell.checkboxStyle),onClick:e=>{const{bounds:t,cell:n,posX:o,posY:r}=e,{width:i,height:l}=t,s=n.drawHandle?7+(i-7)/2:i/2,a=l/2;if(Math.abs(o-s)<=10&&Math.abs(r-a)<=10)return{...n,checked:!n.checked}},onPaste:()=>{}};function tm(e,t){const{ctx:n,theme:o}=e,r=o.markerFontFull,i=t??{};return(i==null?void 0:i.font)!==r&&(n.font=r,i.font=r),i.deprep=nm,n.textAlign="center",i}function nm(e){const{ctx:t}=e;t.textAlign="start"}function om(e,t,n,o,r,i){const{ctx:l,rect:s,hoverAmount:a,theme:c}=e,{x:u,y:d,width:f,height:h}=s,g=n?1:o==="checkbox-visible"?.6+.4*a:a;if(o!=="number"&&g>0){l.globalAlpha=g;const m=7*(n?a:1);if(la(l,c,n,r?u+m:u,d,r?f-m:f,h,!0,void 0,void 0,18,"center",i),r){l.globalAlpha=a,l.beginPath();for(const b of[3,6])for(const y of[-5,-1,3])l.rect(u+b,d+h/2+y,2,2);l.fillStyle=c.textLight,l.fill(),l.beginPath()}l.globalAlpha=1}if(o==="number"||o==="both"&&!n){const m=t.toString(),b=c.markerFontFull,y=u+f/2;o==="both"&&a!==0&&(l.globalAlpha=1-a),l.fillStyle=c.textLight,l.font=b,l.fillText(m,y,d+h/2+eo(l,b)),a!==0&&(l.globalAlpha=1)}}const rm={getAccessibilityString:()=>"",kind:Fn.NewRow,needsHover:!0,needsHoverPosition:!1,measure:()=>200,draw:e=>im(e,e.cell.hint,e.cell.icon),onPaste:()=>{}};function im(e,t,n){const{ctx:o,rect:r,hoverAmount:i,theme:l,spriteManager:s}=e,{x:a,y:c,width:u,height:d}=r;o.beginPath(),o.globalAlpha=i,o.rect(a+1,c+1,u,d-2),o.fillStyle=l.bgHeaderHovered,o.fill(),o.globalAlpha=1,o.beginPath();const f=t!=="";let h=0;if(n!==void 0){const g=d-8,m=a+8/2,b=c+8/2;s.drawSprite(n,"normal",o,m,b,g,l,f?1:i),h=g}else{h=24;const g=12,m=f?g:i*g,b=f?0:(1-i)*g*.5,y=l.cellHorizontalPadding+4;m>0&&(o.moveTo(a+y+b,c+d/2),o.lineTo(a+y+b+m,c+d/2),o.moveTo(a+y+b+m*.5,c+d/2-m*.5),o.lineTo(a+y+b+m*.5,c+d/2+m*.5),o.lineWidth=2,o.strokeStyle=l.bgIconHeader,o.lineCap="round",o.stroke())}o.fillStyle=l.textMedium,o.fillText(t,h+a+l.cellHorizontalPadding+.5,c+d/2+eo(o,l)),o.beginPath()}function Ou(e,t,n,o,r,i,l){e.textBaseline="alphabetic";const s=lm(e,r,o,t,(n==null?void 0:n.fullSize)??!1);e.beginPath(),no(e,s.x,s.y,s.width,s.height,t.roundingRadius??4),e.globalAlpha=i,e.fillStyle=(n==null?void 0:n.bgColor)??Bo(t.textDark,.1),e.fill(),e.globalAlpha=1,e.fillStyle=t.textDark,e.textBaseline="middle",l==null||l("text")}function lm(e,t,n,o,r){const i=o.cellHorizontalPadding,l=o.cellVerticalPadding;if(r)return{x:t.x+i/2,y:t.y+l/2+1,width:t.width-i,height:t.height-l-1};const s=$o(n,e,o.baseFontFull,"alphabetic"),a=t.height-l,c=Math.min(a,s.actualBoundingBoxAscent*2.5);return{x:t.x+i/2,y:t.y+(t.height-c)/2+1,width:s.width+i*3,height:c-1}}const am=p.lazy(async()=>await vs(()=>import("./number-overlay-editor-Dm8-09pg.js"),__vite__mapDeps([14,1,2,3,4,5,6,7,8,9,10,11,12,13]))),sm={getAccessibilityString:e=>{var t;return((t=e.data)==null?void 0:t.toString())??""},kind:Z.Number,needsHover:e=>e.hoverEffect===!0,needsHoverPosition:!1,useLabel:!0,drawPrep:Br,draw:e=>{const{hoverAmount:t,cell:n,ctx:o,theme:r,rect:i,overrideCursor:l}=e,{hoverEffect:s,displayData:a,hoverEffectTheme:c}=n;s===!0&&t>0&&Ou(o,r,c,a,i,t,l),to(e,e.cell.displayData,e.cell.contentAlign)},measure:(e,t,n)=>e.measureText(t.displayData).width+n.cellHorizontalPadding*2,onDelete:e=>({...e,data:void 0}),provideEditor:()=>e=>{const{isHighlighted:t,onChange:n,value:o,validatedSelection:r}=e;return p.createElement(p.Suspense,{fallback:null},p.createElement(am,{highlight:t,disabled:o.readonly===!0,value:o.data,fixedDecimals:o.fixedDecimals,allowNegative:o.allowNegative,thousandSeparator:o.thousandSeparator,decimalSeparator:o.decimalSeparator,validatedSelection:r,onChange:i=>n({...o,data:Number.isNaN(i.floatValue??0)?0:i.floatValue})}))},onPaste:(e,t,n)=>{const o=typeof n.rawValue=="number"?n.rawValue:Number.parseFloat(typeof n.rawValue=="string"?n.rawValue:e);if(!(Number.isNaN(o)||t.data===o))return{...t,data:o,displayData:n.formattedString??t.displayData}}},cm={getAccessibilityString:()=>"",measure:()=>108,kind:Z.Protected,needsHover:!1,needsHoverPosition:!1,draw:um,onPaste:()=>{}};function um(e){const{ctx:t,theme:n,rect:o}=e,{x:r,y:i,height:l}=o;t.beginPath();const s=2.5;let a=r+n.cellHorizontalPadding+s;const c=i+l/2,u=Math.cos(sc(30))*s,d=Math.sin(sc(30))*s;for(let f=0;f<12;f++)t.moveTo(a,c-s),t.lineTo(a,c+s),t.moveTo(a+u,c-d),t.lineTo(a-u,c+d),t.moveTo(a-u,c-d),t.lineTo(a+u,c+d),a+=8;t.lineWidth=1.1,t.lineCap="square",t.strokeStyle=n.textLight,t.stroke()}const dm={getAccessibilityString:e=>{var t;return((t=e.data)==null?void 0:t.toString())??""},kind:Z.RowID,needsHover:!1,needsHoverPosition:!1,drawPrep:(e,t)=>Br(e,t,e.theme.textLight),draw:e=>to(e,e.cell.data,e.cell.contentAlign),measure:(e,t,n)=>e.measureText(t.data).width+n.cellHorizontalPadding*2,provideEditor:()=>e=>{const{isHighlighted:t,onChange:n,value:o,validatedSelection:r}=e;return te.createElement(No,{highlight:t,autoFocus:o.readonly!==!0,disabled:o.readonly!==!1,value:o.data,validatedSelection:r,onChange:i=>n({...o,data:i.target.value})})},onPaste:()=>{}},hm={getAccessibilityString:e=>{var t;return((t=e.data)==null?void 0:t.toString())??""},kind:Z.Text,needsHover:e=>e.hoverEffect===!0,needsHoverPosition:!1,drawPrep:Br,useLabel:!0,draw:e=>{const{cell:t,hoverAmount:n,hyperWrapping:o,ctx:r,rect:i,theme:l,overrideCursor:s}=e,{displayData:a,contentAlign:c,hoverEffect:u,allowWrapping:d,hoverEffectTheme:f}=t;u===!0&&n>0&&Ou(r,l,f,a,i,n,s),to(e,a,c,d,o)},measure:(e,t,n)=>{const o=t.displayData.split(`
175
+ `)[0];return e.measureText(o).width+2*n.cellHorizontalPadding},draw:e=>to(e,e.cell.data,e.cell.contentAlign),onDelete:e=>({...e,data:""}),provideEditor:()=>e=>{const{onChange:t,value:n,target:o,onFinishedEditing:r,markdownDivCreateNode:i,forceEditMode:l,validatedSelection:s}=e;return p.createElement(Jg,{onFinish:r,targetRect:o,value:n,validatedSelection:s,onChange:a=>t({...n,data:a.target.value}),forceEditMode:l,createNode:i})},onPaste:(e,t)=>e===t.data?void 0:{...t,data:e}},em={getAccessibilityString:e=>e.row.toString(),kind:Fn.Marker,needsHover:!0,needsHoverPosition:!1,drawPrep:tm,measure:()=>44,draw:e=>om(e,e.cell.row,e.cell.checked,e.cell.markerKind,e.cell.drawHandle,e.cell.checkboxStyle),onClick:e=>{const{bounds:t,cell:n,posX:o,posY:r}=e,{width:i,height:l}=t,s=n.drawHandle?7+(i-7)/2:i/2,a=l/2;if(Math.abs(o-s)<=10&&Math.abs(r-a)<=10)return{...n,checked:!n.checked}},onPaste:()=>{}};function tm(e,t){const{ctx:n,theme:o}=e,r=o.markerFontFull,i=t??{};return(i==null?void 0:i.font)!==r&&(n.font=r,i.font=r),i.deprep=nm,n.textAlign="center",i}function nm(e){const{ctx:t}=e;t.textAlign="start"}function om(e,t,n,o,r,i){const{ctx:l,rect:s,hoverAmount:a,theme:c}=e,{x:u,y:d,width:f,height:h}=s,g=n?1:o==="checkbox-visible"?.6+.4*a:a;if(o!=="number"&&g>0){l.globalAlpha=g;const m=7*(n?a:1);if(la(l,c,n,r?u+m:u,d,r?f-m:f,h,!0,void 0,void 0,18,"center",i),r){l.globalAlpha=a,l.beginPath();for(const b of[3,6])for(const y of[-5,-1,3])l.rect(u+b,d+h/2+y,2,2);l.fillStyle=c.textLight,l.fill(),l.beginPath()}l.globalAlpha=1}if(o==="number"||o==="both"&&!n){const m=t.toString(),b=c.markerFontFull,y=u+f/2;o==="both"&&a!==0&&(l.globalAlpha=1-a),l.fillStyle=c.textLight,l.font=b,l.fillText(m,y,d+h/2+eo(l,b)),a!==0&&(l.globalAlpha=1)}}const rm={getAccessibilityString:()=>"",kind:Fn.NewRow,needsHover:!0,needsHoverPosition:!1,measure:()=>200,draw:e=>im(e,e.cell.hint,e.cell.icon),onPaste:()=>{}};function im(e,t,n){const{ctx:o,rect:r,hoverAmount:i,theme:l,spriteManager:s}=e,{x:a,y:c,width:u,height:d}=r;o.beginPath(),o.globalAlpha=i,o.rect(a+1,c+1,u,d-2),o.fillStyle=l.bgHeaderHovered,o.fill(),o.globalAlpha=1,o.beginPath();const f=t!=="";let h=0;if(n!==void 0){const g=d-8,m=a+8/2,b=c+8/2;s.drawSprite(n,"normal",o,m,b,g,l,f?1:i),h=g}else{h=24;const g=12,m=f?g:i*g,b=f?0:(1-i)*g*.5,y=l.cellHorizontalPadding+4;m>0&&(o.moveTo(a+y+b,c+d/2),o.lineTo(a+y+b+m,c+d/2),o.moveTo(a+y+b+m*.5,c+d/2-m*.5),o.lineTo(a+y+b+m*.5,c+d/2+m*.5),o.lineWidth=2,o.strokeStyle=l.bgIconHeader,o.lineCap="round",o.stroke())}o.fillStyle=l.textMedium,o.fillText(t,h+a+l.cellHorizontalPadding+.5,c+d/2+eo(o,l)),o.beginPath()}function Ou(e,t,n,o,r,i,l){e.textBaseline="alphabetic";const s=lm(e,r,o,t,(n==null?void 0:n.fullSize)??!1);e.beginPath(),no(e,s.x,s.y,s.width,s.height,t.roundingRadius??4),e.globalAlpha=i,e.fillStyle=(n==null?void 0:n.bgColor)??Bo(t.textDark,.1),e.fill(),e.globalAlpha=1,e.fillStyle=t.textDark,e.textBaseline="middle",l==null||l("text")}function lm(e,t,n,o,r){const i=o.cellHorizontalPadding,l=o.cellVerticalPadding;if(r)return{x:t.x+i/2,y:t.y+l/2+1,width:t.width-i,height:t.height-l-1};const s=$o(n,e,o.baseFontFull,"alphabetic"),a=t.height-l,c=Math.min(a,s.actualBoundingBoxAscent*2.5);return{x:t.x+i/2,y:t.y+(t.height-c)/2+1,width:s.width+i*3,height:c-1}}const am=p.lazy(async()=>await vs(()=>import("./number-overlay-editor-BxuviOUl.js"),__vite__mapDeps([14,1,2,3,4,5,6,7,8,9,10,11,12,13]))),sm={getAccessibilityString:e=>{var t;return((t=e.data)==null?void 0:t.toString())??""},kind:Z.Number,needsHover:e=>e.hoverEffect===!0,needsHoverPosition:!1,useLabel:!0,drawPrep:Br,draw:e=>{const{hoverAmount:t,cell:n,ctx:o,theme:r,rect:i,overrideCursor:l}=e,{hoverEffect:s,displayData:a,hoverEffectTheme:c}=n;s===!0&&t>0&&Ou(o,r,c,a,i,t,l),to(e,e.cell.displayData,e.cell.contentAlign)},measure:(e,t,n)=>e.measureText(t.displayData).width+n.cellHorizontalPadding*2,onDelete:e=>({...e,data:void 0}),provideEditor:()=>e=>{const{isHighlighted:t,onChange:n,value:o,validatedSelection:r}=e;return p.createElement(p.Suspense,{fallback:null},p.createElement(am,{highlight:t,disabled:o.readonly===!0,value:o.data,fixedDecimals:o.fixedDecimals,allowNegative:o.allowNegative,thousandSeparator:o.thousandSeparator,decimalSeparator:o.decimalSeparator,validatedSelection:r,onChange:i=>n({...o,data:Number.isNaN(i.floatValue??0)?0:i.floatValue})}))},onPaste:(e,t,n)=>{const o=typeof n.rawValue=="number"?n.rawValue:Number.parseFloat(typeof n.rawValue=="string"?n.rawValue:e);if(!(Number.isNaN(o)||t.data===o))return{...t,data:o,displayData:n.formattedString??t.displayData}}},cm={getAccessibilityString:()=>"",measure:()=>108,kind:Z.Protected,needsHover:!1,needsHoverPosition:!1,draw:um,onPaste:()=>{}};function um(e){const{ctx:t,theme:n,rect:o}=e,{x:r,y:i,height:l}=o;t.beginPath();const s=2.5;let a=r+n.cellHorizontalPadding+s;const c=i+l/2,u=Math.cos(sc(30))*s,d=Math.sin(sc(30))*s;for(let f=0;f<12;f++)t.moveTo(a,c-s),t.lineTo(a,c+s),t.moveTo(a+u,c-d),t.lineTo(a-u,c+d),t.moveTo(a-u,c-d),t.lineTo(a+u,c+d),a+=8;t.lineWidth=1.1,t.lineCap="square",t.strokeStyle=n.textLight,t.stroke()}const dm={getAccessibilityString:e=>{var t;return((t=e.data)==null?void 0:t.toString())??""},kind:Z.RowID,needsHover:!1,needsHoverPosition:!1,drawPrep:(e,t)=>Br(e,t,e.theme.textLight),draw:e=>to(e,e.cell.data,e.cell.contentAlign),measure:(e,t,n)=>e.measureText(t.data).width+n.cellHorizontalPadding*2,provideEditor:()=>e=>{const{isHighlighted:t,onChange:n,value:o,validatedSelection:r}=e;return te.createElement(No,{highlight:t,autoFocus:o.readonly!==!0,disabled:o.readonly!==!1,value:o.data,validatedSelection:r,onChange:i=>n({...o,data:i.target.value})})},onPaste:()=>{}},hm={getAccessibilityString:e=>{var t;return((t=e.data)==null?void 0:t.toString())??""},kind:Z.Text,needsHover:e=>e.hoverEffect===!0,needsHoverPosition:!1,drawPrep:Br,useLabel:!0,draw:e=>{const{cell:t,hoverAmount:n,hyperWrapping:o,ctx:r,rect:i,theme:l,overrideCursor:s}=e,{displayData:a,contentAlign:c,hoverEffect:u,allowWrapping:d,hoverEffectTheme:f}=t;u===!0&&n>0&&Ou(r,l,f,a,i,n,s),to(e,a,c,d,o)},measure:(e,t,n)=>{const o=t.displayData.split(`
176
176
  `,t.allowWrapping===!0?void 0:1);let r=0;for(const i of o)r=Math.max(r,e.measureText(i).width);return r+2*n.cellHorizontalPadding},onDelete:e=>({...e,data:""}),provideEditor:e=>({disablePadding:e.allowWrapping===!0,editor:t=>{const{isHighlighted:n,onChange:o,value:r,validatedSelection:i}=t;return p.createElement(No,{style:e.allowWrapping===!0?{padding:"3px 8.5px"}:void 0,highlight:n,autoFocus:r.readonly!==!0,disabled:r.readonly===!0,altNewline:!0,value:r.data,validatedSelection:i,onChange:l=>o({...r,data:l.target.value})})}}),onPaste:(e,t,n)=>e===t.data?void 0:{...t,data:e,displayData:n.formattedString??t.displayData}},fm=cn("div")({name:"UriOverlayEditorStyle",class:"gdg-u1rrojo",propsAsIs:!1}),pm=e=>{const{uri:t,onChange:n,forceEditMode:o,readonly:r,validatedSelection:i,preview:l}=e,[s,a]=p.useState(!r&&(t===""||o)),c=p.useCallback(()=>{a(!0)},[]);return s?p.createElement(No,{validatedSelection:i,highlight:!0,autoFocus:!0,value:t,onChange:n}):p.createElement(fm,null,p.createElement("a",{className:"gdg-link-area",href:t,target:"_blank",rel:"noopener noreferrer"},l),!r&&p.createElement("div",{className:"gdg-edit-icon",onClick:c},p.createElement(_l,null)),p.createElement("textarea",{className:"gdg-input",autoFocus:!0}))};function Du(e,t,n,o){let r=n.cellHorizontalPadding;const i=t.height/2-e.actualBoundingBoxAscent/2,l=e.width,s=e.actualBoundingBoxAscent;return o==="right"?r=t.width-l-n.cellHorizontalPadding:o==="center"&&(r=t.width/2-l/2),{x:r,y:i,width:l,height:s}}function zu(e){const{cell:t,bounds:n,posX:o,posY:r,theme:i}=e,l=t.displayData??t.data;if(t.hoverEffect!==!0||t.onClickUri===void 0)return!1;const s=Hc(l,i.baseFontFull);if(s===void 0)return!1;const a=Du(s,n,i,t.contentAlign);return Wo({x:a.x-4,y:a.y-4,width:a.width+8,height:a.height+8},o,r)}const gm={getAccessibilityString:e=>{var t;return((t=e.data)==null?void 0:t.toString())??""},kind:Z.Uri,needsHover:e=>e.hoverEffect===!0,needsHoverPosition:!0,useLabel:!0,drawPrep:Br,draw:e=>{const{cell:t,theme:n,overrideCursor:o,hoverX:r,hoverY:i,rect:l,ctx:s}=e,a=t.displayData??t.data,c=t.hoverEffect===!0;if(o!==void 0&&c&&r!==void 0&&i!==void 0){const u=$o(a,s,n.baseFontFull),d=Du(u,l,n,t.contentAlign),{x:f,y:h,width:g,height:m}=d;if(r>=f-4&&r<=f-4+g+8&&i>=h-4&&i<=h-4+m+8){const b=eo(s,n.baseFontFull);o("pointer");const y=5,v=h-b;s.beginPath(),s.moveTo(l.x+f,Math.floor(l.y+v+m+y)+.5),s.lineTo(l.x+f+g,Math.floor(l.y+v+m+y)+.5),s.strokeStyle=n.linkColor,s.stroke(),s.save(),s.fillStyle=e.cellFillColor,to({...e,rect:{...l,x:l.x-1}},a,t.contentAlign),to({...e,rect:{...l,x:l.x-2}},a,t.contentAlign),to({...e,rect:{...l,x:l.x+1}},a,t.contentAlign),to({...e,rect:{...l,x:l.x+2}},a,t.contentAlign),s.restore()}}s.fillStyle=c?n.linkColor:n.textDark,to(e,a,t.contentAlign)},onSelect:e=>{zu(e)&&e.preventDefault()},onClick:e=>{var t;const{cell:n}=e;zu(e)&&((t=n.onClickUri)==null||t.call(n,e))},measure:(e,t,n)=>e.measureText(t.displayData??t.data).width+n.cellHorizontalPadding*2,onDelete:e=>({...e,data:""}),provideEditor:e=>t=>{const{onChange:n,value:o,forceEditMode:r,validatedSelection:i}=t;return p.createElement(pm,{forceEditMode:o.readonly!==!0&&(r||e.hoverEffect===!0&&e.onClickUri!==void 0),uri:o.data,preview:o.displayData??o.data,validatedSelection:i,readonly:o.readonly===!0,onChange:l=>n({...o,data:l.target.value})})},onPaste:(e,t,n)=>e===t.data?void 0:{...t,data:e,displayData:n.formattedString??t.displayData}},mm=[em,rm,Pg,_g,Wg,Xg,qg,Qg,sm,cm,dm,hm,gm];var fa,Lu;function vm(){if(Lu)return fa;Lu=1;var e=lc(),t=Ph(),n="Expected a function";function o(r,i,l){var s=!0,a=!0;if(typeof r!="function")throw new TypeError(n);return t(l)&&(s="leading"in l?!!l.leading:s,a="trailing"in l?!!l.trailing:a),e(r,i,{leading:s,maxWait:i,trailing:a})}return fa=o,fa}var bm=vm();const wm=vo(bm),pa=[];class ym extends Vc{constructor(){super(...arguments),ht(this,"imageLoaded",()=>{}),ht(this,"loadedLocations",[]),ht(this,"cache",{}),ht(this,"sendLoaded",wm(()=>{this.imageLoaded(new Vr(this.loadedLocations)),this.loadedLocations=[]},20)),ht(this,"clearOutOfWindow",()=>{const t=Object.keys(this.cache);for(const n of t){const o=this.cache[n];let r=!1;for(let i=0;i<o.cells.length;i++){const l=o.cells[i];if(this.isInWindow(l)){r=!0;break}}r?o.cells=o.cells.filter(this.isInWindow):(o.cancel(),delete this.cache[n])}})}setCallback(t){this.imageLoaded=t}loadImage(t,n,o,r){let i=!1;const l=pa.pop()??new Image;let s=!1;const a={img:void 0,cells:[Wn(n,o)],url:t,cancel:()=>{s||(s=!0,pa.length<12?pa.unshift(l):i||(l.src=""))}},c=new Promise(u=>l.addEventListener("load",()=>u(null)));requestAnimationFrame(async()=>{try{l.src=t,await c,await l.decode();const u=this.cache[r];if(u!==void 0&&!s){u.img=l;for(const d of u.cells)this.loadedLocations.push(ql(d));i=!0,this.sendLoaded()}}catch{a.cancel()}}),this.cache[r]=a}loadOrGetImage(t,n,o){const r=t,i=this.cache[r];if(i!==void 0){const l=Wn(n,o);return i.cells.includes(l)||i.cells.push(l),i.img}else this.loadImage(t,n,o,r)}}const xm=(e,t)=>{const n=p.useMemo(()=>({...h0,...e.headerIcons}),[e.headerIcons]),o=p.useMemo(()=>e.imageWindowLoader??new ym,[e.imageWindowLoader]);return p.createElement(Lg,{...e,renderers:mm,headerIcons:n,ref:t,imageWindowLoader:o})},Cm=p.forwardRef(xm);function Pu(e,t){const n=p.useRef(null),o=p.useRef(),r=p.useCallback(()=>{n.current&&(clearTimeout(n.current),n.current=null)},[]);return p.useEffect(()=>r,[r]),{debouncedCallback:p.useCallback((...i)=>{o.current=i,r(),n.current=setTimeout(()=>{o.current&&(e(...o.current),o.current=void 0)},t)},[e,t,r]),cancel:r}}const Hu=Sr("div",{target:"e1hnsd042"})(({theme:e})=>({paddingTop:e.spacing.xs,paddingBottom:e.spacing.xs}),""),Eo=Sr("div",{target:"e1hnsd041"})(({theme:e,isActive:t,hasSubmenu:n})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:e.spacing.sm,paddingLeft:e.spacing.sm,paddingRight:e.spacing.sm,paddingTop:e.spacing.twoXS,paddingBottom:e.spacing.twoXS,cursor:"pointer",backgroundColor:t?e.colors.darkenedBgMix15:void 0,"&:hover":{backgroundColor:e.colors.darkenedBgMix15},minWidth:e.sizes.minMenuWidth,...n&&{justifyContent:"space-between","& > :first-of-type":{display:"flex",alignItems:"center",gap:e.spacing.sm}}}),""),km=Sr("div",{target:"e1hnsd040"})(({theme:e})=>({height:e.sizes.borderWidth,backgroundColor:e.colors.borderColor,marginTop:e.spacing.xs,marginBottom:e.spacing.xs}),""),Au=[{format:"",label:"Automatic",icon:":material/123:"},{format:"localized",label:"Localized",icon:":material/translate:"},{format:"plain",label:"Plain",icon:":material/speed_1_75:"},{format:"compact",label:"Compact",icon:":material/1k:"},{format:"dollar",label:"Dollar",icon:":material/attach_money:"},{format:"euro",label:"Euro",icon:":material/euro:"},{format:"percent",label:"Percent",icon:":material/percent:"},{format:"scientific",label:"Scientific",icon:":material/experiment:"},{format:"accounting",label:"Accounting",icon:":material/finance_chip:"}],Sm={number:Au,progress:Au,datetime:[{format:"",label:"Automatic",icon:":material/schedule:"},{format:"localized",label:"Localized",icon:":material/translate:"},{format:"distance",label:"Distance",icon:":material/search_activity:"},{format:"calendar",label:"Calendar",icon:":material/today:"}],date:[{format:"",label:"Automatic",icon:":material/schedule:"},{format:"localized",label:"Localized",icon:":material/translate:"},{format:"distance",label:"Distance",icon:":material/search_activity:"}],time:[{format:"",label:"Automatic",icon:":material/schedule:"},{format:"localized",label:"Localized",icon:":material/translate:"}]};function Mm({columnKind:e,isOpen:t,onMouseEnter:n,onMouseLeave:o,onChangeFormat:r,onCloseMenu:i,children:l}){const s=Jo(),{colors:a,fontSizes:c,radii:u,fontWeights:d}=s,f=Sm[e]||[];return f.length===0?Oe.jsx(Oe.Fragment,{}):Oe.jsx(xl,{triggerType:Fh.hover,returnFocus:!0,autoFocus:!0,focusLock:!0,isOpen:t,onMouseEnter:n,onMouseLeave:o,ignoreBoundary:!0,content:Oe.jsx(Hu,{role:"menu",children:f.map(h=>Oe.jsxs(Eo,{onClick:()=>{r(h.format),i()},role:"menuitem",children:[Oe.jsx(bo,{size:"base",margin:"0",color:"inherit",iconValue:h.icon}),h.label]},h.format))}),placement:Cl.right,showArrow:!1,popoverMargin:2,overrides:{Body:{props:{"data-testid":"stDataFrameColumnFormattingMenu"},style:{borderTopLeftRadius:u.default,borderTopRightRadius:u.default,borderBottomLeftRadius:u.default,borderBottomRightRadius:u.default,paddingTop:"0 !important",paddingBottom:"0 !important",paddingLeft:"0 !important",paddingRight:"0 !important",backgroundColor:"transparent",border:`${s.sizes.borderWidth} solid ${s.colors.borderColor}`}},Inner:{style:{backgroundColor:kl(s)?a.bgColor:a.secondaryBg,color:a.bodyText,fontSize:c.sm,fontWeight:d.normal,paddingTop:"0 !important",paddingBottom:"0 !important",paddingLeft:"0 !important",paddingRight:"0 !important"}}},children:l})}const Rm=p.memo(Mm);function Em({top:e,left:t,isColumnPinned:n,onPinColumn:o,onUnpinColumn:r,onCloseMenu:i,onSortColumn:l,onHideColumn:s,columnKind:a,onChangeFormat:c,onAutosize:u}){const d=Jo(),[f,h]=p.useState(!1),{colors:g,fontSizes:m,radii:b,fontWeights:y}=d;p.useEffect(()=>{function I(T){T.preventDefault()}return document.addEventListener("wheel",I,{passive:!1}),document.addEventListener("touchmove",I,{passive:!1}),()=>{document.removeEventListener("wheel",I),document.removeEventListener("touchmove",I)}},[]);const v=te.useCallback(()=>{i()},[i]);return Oe.jsx(xl,{autoFocus:!0,"aria-label":"Dataframe column menu",content:Oe.jsxs(Hu,{children:[l&&Oe.jsxs(Oe.Fragment,{children:[Oe.jsxs(Eo,{onClick:()=>{l("asc"),v()},role:"menuitem",children:[Oe.jsx(bo,{size:"base",margin:"0",color:"inherit",iconValue:":material/arrow_upward:"}),"Sort ascending"]}),Oe.jsxs(Eo,{onClick:()=>{l("desc"),v()},role:"menuitem",children:[Oe.jsx(bo,{size:"base",margin:"0",color:"inherit",iconValue:":material/arrow_downward:"}),"Sort descending"]}),Oe.jsx(km,{})]}),c&&Oe.jsx(Rm,{columnKind:a,isOpen:f,onMouseEnter:()=>h(!0),onMouseLeave:()=>h(!1),onChangeFormat:c,onCloseMenu:v,children:Oe.jsxs(Eo,{onMouseEnter:()=>h(!0),onMouseLeave:()=>h(!1),isActive:f,hasSubmenu:!0,children:[Oe.jsxs("div",{children:[Oe.jsx(bo,{size:"base",margin:"0",color:"inherit",iconValue:":material/format_list_numbered:"}),"Format"]}),Oe.jsx(bo,{size:"base",margin:"0",color:"inherit",iconValue:":material/chevron_right:"})]})}),u&&Oe.jsxs(Eo,{onClick:()=>{u(),v()},children:[Oe.jsx(bo,{size:"base",margin:"0",color:"inherit",iconValue:":material/arrows_outward:"}),"Autosize"]}),n&&Oe.jsxs(Eo,{onClick:()=>{r(),v()},children:[Oe.jsx(bo,{size:"base",margin:"0",color:"inherit",iconValue:":material/keep_off:"}),"Unpin column"]}),!n&&Oe.jsxs(Eo,{onClick:()=>{o(),v()},children:[Oe.jsx(bo,{size:"base",margin:"0",color:"inherit",iconValue:":material/keep:"}),"Pin column"]}),s&&Oe.jsxs(Eo,{onClick:()=>{s(),v()},children:[Oe.jsx(bo,{size:"base",margin:"0",color:"inherit",iconValue:":material/visibility_off:"}),"Hide column"]})]}),placement:Cl.bottomRight,accessibilityType:_h.menu,showArrow:!1,popoverMargin:Vn("0.375rem"),onClickOutside:f?void 0:v,onEsc:v,overrides:{Body:{props:{"data-testid":"stDataFrameColumnMenu"},style:{paddingTop:"0 !important",paddingBottom:"0 !important",paddingLeft:"0 !important",paddingRight:"0 !important",backgroundColor:"transparent"}},Inner:{style:{border:`${d.sizes.borderWidth} solid ${d.colors.borderColor}`,backgroundColor:kl(d)?g.bgColor:g.secondaryBg,color:g.bodyText,fontSize:m.sm,fontWeight:y.normal,borderTopLeftRadius:b.default,borderTopRightRadius:b.default,borderBottomLeftRadius:b.default,borderBottomRightRadius:b.default,overflow:"auto",paddingTop:"0 !important",paddingBottom:"0 !important",paddingLeft:"0 !important",paddingRight:"0 !important"}}},isOpen:!0,children:Oe.jsx("div",{"data-testid":"stDataFrameColumnMenuTarget",style:{position:"fixed",top:e,left:t,visibility:"hidden",transform:"unset"}})})}const Im=p.memo(Em),Tm="(index)",Om=({label:e,initialValue:t,onChange:n})=>{const o=Jo();return Oe.jsx(eC,{checked:t,onChange:r=>{n(r.target.checked)},"aria-label":e,checkmarkType:nC.default,labelPlacement:tC.right,overrides:{Root:{style:({$isFocusVisible:r})=>({marginBottom:o.spacing.none,marginTop:o.spacing.none,paddingLeft:o.spacing.md,paddingRight:o.spacing.md,paddingTop:o.spacing.twoXS,paddingBottom:o.spacing.twoXS,backgroundColor:r?o.colors.darkenedBgMix25:"",display:"flex",alignItems:"start"})},Checkmark:{style:({$isFocusVisible:r,$checked:i})=>{const l=i?o.colors.primary:o.colors.fadedText40;return{outline:0,width:o.sizes.checkbox,height:o.sizes.checkbox,marginTop:o.spacing.twoXS,marginLeft:0,marginBottom:0,boxShadow:r&&i?`0 0 0 0.2rem ${Sl(o.colors.primary,.5)}`:"",borderLeftWidth:o.sizes.borderWidth,borderRightWidth:o.sizes.borderWidth,borderTopWidth:o.sizes.borderWidth,borderBottomWidth:o.sizes.borderWidth,borderLeftColor:l,borderRightColor:l,borderTopColor:l,borderBottomColor:l}}},Label:{style:{lineHeight:o.lineHeights.small,paddingLeft:o.spacing.sm,position:"relative",color:o.colors.bodyText,fontSize:o.fontSizes.sm,fontWeight:o.fontWeights.normal}}},children:e})},Dm=({columns:e,columnOrder:t,setColumnOrder:n,hideColumn:o,showColumn:r,children:i,isOpen:l,onClose:s})=>{const a=Jo();return Oe.jsx(xl,{triggerType:Fh.click,placement:Cl.bottomRight,autoFocus:!0,focusLock:!0,content:()=>Oe.jsx("div",{style:{paddingTop:a.spacing.sm,paddingBottom:a.spacing.sm},children:e.map(c=>{const u=t.length&&!c.isIndex?!t.includes(c.id)&&!t.includes(c.name):!1;return Oe.jsx(Om,{label:!c.title&&c.isIndex?Tm:c.title,initialValue:!(c.isHidden===!0||u),onChange:d=>{d?(r(c.id),u&&n(f=>[...f,c.id])):o(c.id)}},c.id)})}),isOpen:l,onClickOutside:s,onClick:()=>l?s():void 0,onEsc:s,ignoreBoundary:!1,overrides:{Body:{props:{"data-testid":"stDataFrameColumnVisibilityMenu"},style:{borderTopLeftRadius:a.radii.default,borderTopRightRadius:a.radii.default,borderBottomLeftRadius:a.radii.default,borderBottomRightRadius:a.radii.default,paddingTop:"0 !important",paddingBottom:"0 !important",paddingLeft:"0 !important",paddingRight:"0 !important",backgroundColor:"transparent",border:`${a.sizes.borderWidth} solid ${a.colors.borderColor}`}},Inner:{style:{backgroundColor:kl(a)?a.colors.bgColor:a.colors.secondaryBg,color:a.colors.bodyText,fontSize:a.fontSizes.sm,fontWeight:a.fontWeights.normal,minWidth:a.sizes.minMenuWidth,maxWidth:`calc(${a.sizes.minMenuWidth} * 2)`,maxHeight:a.sizes.maxDropdownHeight,overflow:"auto",paddingTop:"0 !important",paddingBottom:"0 !important",paddingLeft:"0 !important",paddingRight:"0 !important"}}},children:Oe.jsx("div",{children:i})})},zm=p.memo(Dm);var Lm=Xy();const Pm=vo(Lm);var ga={exports:{}},Hm=ga.exports,Fu;function Am(){return Fu||(Fu=1,function(e,t){(function(n,o){try{e.exports=o(Gy)}catch{e.exports=o}n&&(n.momentDurationFormatSetup=n.moment?o(n.moment):o)})(Hm,function(n){var o=!1,r=!1,i=!1,l=!1,s="escape years months weeks days hours minutes seconds milliseconds general".split(" "),a=[{type:"seconds",targets:[{type:"minutes",value:60},{type:"hours",value:3600},{type:"days",value:86400},{type:"weeks",value:604800},{type:"months",value:2678400},{type:"years",value:31536e3}]},{type:"minutes",targets:[{type:"hours",value:60},{type:"days",value:1440},{type:"weeks",value:10080},{type:"months",value:44640},{type:"years",value:525600}]},{type:"hours",targets:[{type:"days",value:24},{type:"weeks",value:168},{type:"months",value:744},{type:"years",value:8760}]},{type:"days",targets:[{type:"weeks",value:7},{type:"months",value:31},{type:"years",value:365}]},{type:"months",targets:[{type:"years",value:12}]}];function c(N,z){return z.length>N.length?!1:N.indexOf(z)!==-1}function u(N){for(var z="";N;)z+="0",N-=1;return z}function d(N){for(var z=N.split("").reverse(),j=0,ge=!0;ge&&j<z.length;)j?z[j]==="9"?z[j]="0":(z[j]=(parseInt(z[j],10)+1).toString(),ge=!1):(parseInt(z[j],10)<5&&(ge=!1),z[j]="0"),j+=1;return ge&&z.push("1"),z.reverse().join("")}function f(N,z){var j=L(C(z).sort(),function(ke){return ke+":"+z[ke]}).join(","),ge=N+"+"+j;return f.cache[ge]||(f.cache[ge]=Intl.NumberFormat(N,z)),f.cache[ge]}f.cache={};function h(N,z,j){var ge=z.useToLocaleString,ke=z.useGrouping,Fe=ke&&z.grouping.slice(),xe=z.maximumSignificantDigits,De=z.minimumIntegerDigits||1,_e=z.fractionDigits||0,et=z.groupingSeparator,Pt=z.decimalSeparator;if(ge&&j){var Mt={minimumIntegerDigits:De,useGrouping:ke};if(_e&&(Mt.maximumFractionDigits=_e,Mt.minimumFractionDigits=_e),xe&&N>0&&(Mt.maximumSignificantDigits=xe),i){if(!l){var we=D({},z);we.useGrouping=!1,we.decimalSeparator=".",N=parseFloat(h(N,we),10)}return f(j,Mt).format(N)}else{if(!r){var we=D({},z);we.useGrouping=!1,we.decimalSeparator=".",N=parseFloat(h(N,we),10)}return N.toLocaleString(j,Mt)}}var be;xe?be=N.toPrecision(xe+1):be=N.toFixed(_e+1);var me,ie,Ee,Ie=be.split("e");Ee=Ie[1]||"",Ie=Ie[0].split("."),ie=Ie[1]||"",me=Ie[0]||"";var je=me.length,tt=ie.length,Rt=je+tt,ce=me+ie;(xe&&Rt===xe+1||!xe&&tt===_e+1)&&(ce=d(ce),ce.length===Rt+1&&(je=je+1),tt&&(ce=ce.slice(0,-1)),me=ce.slice(0,je),ie=ce.slice(je)),xe&&(ie=ie.replace(/0*$/,""));var it=parseInt(Ee,10);it>0?ie.length<=it?(ie=ie+u(it-ie.length),me=me+ie,ie=""):(me=me+ie.slice(0,it),ie=ie.slice(it)):it<0&&(ie=u(Math.abs(it)-me.length)+me+ie,me="0"),xe||(ie=ie.slice(0,_e),ie.length<_e&&(ie=ie+u(_e-ie.length)),me.length<De&&(me=u(De-me.length)+me));var at="";if(ke){Ie=me;for(var Re;Ie.length;)Fe.length&&(Re=Fe.shift()),at&&(at=et+at),at=Ie.slice(-Re)+at,Ie=Ie.slice(0,-Re)}else at=me;return ie&&(at=at+Pt+ie),at}function g(N,z){return N.label.length>z.label.length?-1:N.label.length<z.label.length?1:0}function m(N,z){var j=[];return x(C(z),function(ge){if(ge.slice(0,15)==="_durationLabels"){var ke=ge.slice(15).toLowerCase();x(C(z[ge]),function(Fe){Fe.slice(0,1)===N&&j.push({type:ke,key:Fe,label:z[ge][Fe]})})}}),j}function b(N,z,j){return z===1&&j===null?N:N+N}var y={durationLabelsStandard:{S:"millisecond",SS:"milliseconds",s:"second",ss:"seconds",m:"minute",mm:"minutes",h:"hour",hh:"hours",d:"day",dd:"days",w:"week",ww:"weeks",M:"month",MM:"months",y:"year",yy:"years"},durationLabelsShort:{S:"msec",SS:"msecs",s:"sec",ss:"secs",m:"min",mm:"mins",h:"hr",hh:"hrs",d:"dy",dd:"dys",w:"wk",ww:"wks",M:"mo",MM:"mos",y:"yr",yy:"yrs"},durationTimeTemplates:{HMS:"h:mm:ss",HM:"h:mm",MS:"m:ss"},durationLabelTypes:[{type:"standard",string:"__"},{type:"short",string:"_"}],durationPluralKey:b};function v(N){return Object.prototype.toString.call(N)==="[object Array]"}function I(N){return Object.prototype.toString.call(N)==="[object Object]"}function T(N,z){for(var j=N.length;j-=1;)if(z(N[j]))return N[j]}function k(N,z){var j=0,ge=N&&N.length||0,ke;for(typeof z!="function"&&(ke=z,z=function(Fe){return Fe===ke});j<ge;){if(z(N[j]))return N[j];j+=1}}function x(N,z){var j=0,ge=N.length;if(!(!N||!ge))for(;j<ge;){if(z(N[j],j)===!1)return;j+=1}}function L(N,z){var j=0,ge=N.length,ke=[];if(!N||!ge)return ke;for(;j<ge;)ke[j]=z(N[j],j),j+=1;return ke}function O(N,z){return L(N,function(j){return j[z]})}function R(N){var z=[];return x(N,function(j){j&&z.push(j)}),z}function P(N){var z=[];return x(N,function(j){k(z,j)||z.push(j)}),z}function M(N,z){var j=[];return x(N,function(ge){x(z,function(ke){ge===ke&&j.push(ge)})}),P(j)}function S(N,z){var j=[];return x(N,function(ge,ke){if(!z(ge))return j=N.slice(ke),!1}),j}function E(N,z){var j=N.slice().reverse();return S(j,z).reverse()}function D(N,z){for(var j in z)z.hasOwnProperty(j)&&(N[j]=z[j]);return N}function C(N){var z=[];for(var j in N)N.hasOwnProperty(j)&&z.push(j);return z}function X(N,z){var j=0,ge=N.length;if(!N||!ge)return!1;for(;j<ge;){if(z(N[j],j)===!0)return!0;j+=1}return!1}function B(N){var z=[];return x(N,function(j){z=z.concat(j)}),z}function J(){var N=0;try{N.toLocaleString("i")}catch(z){return z.name==="RangeError"}return!1}function ae(N){return N(3.55,"en",{useGrouping:!1,minimumIntegerDigits:1,minimumFractionDigits:1,maximumFractionDigits:1})==="3.6"}function ne(N){var z=!0;return z=z&&N(1,"en",{minimumIntegerDigits:1})==="1",z=z&&N(1,"en",{minimumIntegerDigits:2})==="01",z=z&&N(1,"en",{minimumIntegerDigits:3})==="001",!(!z||(z=z&&N(99.99,"en",{maximumFractionDigits:0,minimumFractionDigits:0})==="100",z=z&&N(99.99,"en",{maximumFractionDigits:1,minimumFractionDigits:1})==="100.0",z=z&&N(99.99,"en",{maximumFractionDigits:2,minimumFractionDigits:2})==="99.99",z=z&&N(99.99,"en",{maximumFractionDigits:3,minimumFractionDigits:3})==="99.990",!z)||(z=z&&N(99.99,"en",{maximumSignificantDigits:1})==="100",z=z&&N(99.99,"en",{maximumSignificantDigits:2})==="100",z=z&&N(99.99,"en",{maximumSignificantDigits:3})==="100",z=z&&N(99.99,"en",{maximumSignificantDigits:4})==="99.99",z=z&&N(99.99,"en",{maximumSignificantDigits:5})==="99.99",!z)||(z=z&&N(1e3,"en",{useGrouping:!0})==="1,000",z=z&&N(1e3,"en",{useGrouping:!1})==="1000",!z))}function U(){var N=[].slice.call(arguments),z={},j;if(x(N,function(xe,De){if(!De){if(!v(xe))throw"Expected array as the first argument to durationsFormat.";j=xe}if(typeof xe=="string"||typeof xe=="function"){z.template=xe;return}if(typeof xe=="number"){z.precision=xe;return}I(xe)&&D(z,xe)}),!j||!j.length)return[];z.returnMomentTypes=!0;var ge=L(j,function(xe){return xe.format(z)}),ke=M(s,P(O(B(ge),"type"))),Fe=z.largest;return Fe&&(ke=ke.slice(0,Fe)),z.returnMomentTypes=!1,z.outputTypes=ke,L(j,function(xe){return xe.format(z)})}function re(){var N=[].slice.call(arguments),z=D({},this.format.defaults),j=this.asMilliseconds(),ge=this.asMonths();typeof this.isValid=="function"&&this.isValid()===!1&&(j=0,ge=0);var ke=j<0,Fe=n.duration(Math.abs(j),"milliseconds"),xe=n.duration(Math.abs(ge),"months");x(N,function(_){if(typeof _=="string"||typeof _=="function"){z.template=_;return}if(typeof _=="number"){z.precision=_;return}I(_)&&D(z,_)});var De={years:"y",months:"M",weeks:"w",days:"d",hours:"h",minutes:"m",seconds:"s",milliseconds:"S"},_e={escape:/\[(.+?)\]/,years:/\*?[Yy]+/,months:/\*?M+/,weeks:/\*?[Ww]+/,days:/\*?[Dd]+/,hours:/\*?[Hh]+/,minutes:/\*?m+/,seconds:/\*?s+/,milliseconds:/\*?S+/,general:/.+?/};z.types=s;var et=function(_){return k(s,function(qe){return _e[qe].test(_)})},Pt=new RegExp(L(s,function(_){return _e[_].source}).join("|"),"g");z.duration=this;var Mt=typeof z.template=="function"?z.template.apply(z):z.template,we=z.outputTypes,be=z.returnMomentTypes,me=z.largest,ie=[];we||(v(z.stopTrim)&&(z.stopTrim=z.stopTrim.join("")),z.stopTrim&&x(z.stopTrim.match(Pt),function(_){var qe=et(_);qe==="escape"||qe==="general"||ie.push(qe)}));var Ee=n.localeData();Ee||(Ee={}),x(C(y),function(_){if(typeof y[_]=="function"){Ee[_]||(Ee[_]=y[_]);return}Ee["_"+_]||(Ee["_"+_]=y[_])}),x(C(Ee._durationTimeTemplates),function(_){Mt=Mt.replace("_"+_+"_",Ee._durationTimeTemplates[_])});var Ie=z.userLocale||n.locale(),je=z.useLeftUnits,tt=z.usePlural,Rt=z.precision,ce=z.forceLength,it=z.useGrouping,at=z.trunc,Re=z.useSignificantDigits&&Rt>0,Tt=Re?z.precision:0,Xt=Tt,Ne=z.minValue,nt=!1,kt=z.maxValue,Et=!1,qt=z.useToLocaleString,un=z.groupingSeparator,an=z.decimalSeparator,Bt=z.grouping;qt=qt&&(o||i);var wt=z.trim;v(wt)&&(wt=wt.join(" ")),wt===null&&(me||kt||Re)&&(wt="all"),(wt===null||wt===!0||wt==="left"||wt==="right")&&(wt="large"),wt===!1&&(wt="");var Ot=function(_){return _.test(wt)},In=/large/,Cn=/small/,ot=/both/,sn=/mid/,bn=/^all|[^sm]all/,yt=/final/,Zt=me>0||X([In,ot,bn],Ot),ut=X([Cn,ot,bn],Ot),Vt=X([sn,bn],Ot),$t=X([yt,bn],Ot),rn=L(Mt.match(Pt),function(_,qe){var Je=et(_);return _.slice(0,1)==="*"&&(_=_.slice(1),Je!=="escape"&&Je!=="general"&&ie.push(Je)),{index:qe,length:_.length,text:"",token:Je==="escape"?_.replace(_e.escape,"$1"):_,type:Je==="escape"||Je==="general"?null:Je}}),Ft={index:0,length:0,token:"",text:"",type:null},Jt=[];je&&rn.reverse(),x(rn,function(_){if(_.type){(Ft.type||Ft.text)&&Jt.push(Ft),Ft=_;return}je?Ft.text=_.token+Ft.text:Ft.text+=_.token}),(Ft.type||Ft.text)&&Jt.push(Ft),je&&Jt.reverse();var Ue=M(s,P(R(O(Jt,"type"))));if(!Ue.length)return O(Jt,"text").join("");Ue=L(Ue,function(_,qe){var Je=qe+1===Ue.length,pe=!qe,rt;_==="years"||_==="months"?rt=xe.as(_):rt=Fe.as(_);var Dt=Math.floor(rt),dn=rt-Dt,en=k(Jt,function(tn){return _===tn.type});return pe&&kt&&rt>kt&&(Et=!0),Je&&Ne&&Math.abs(z.duration.as(_))<Ne&&(nt=!0),pe&&ce===null&&en.length>1&&(ce=!0),Fe.subtract(Dt,_),xe.subtract(Dt,_),{rawValue:rt,wholeValue:Dt,decimalValue:Je?dn:0,isSmallest:Je,isLargest:pe,type:_,tokenLength:en.length}});var Ht=at?Math.floor:Math.round,kn=function(_,qe){var Je=Math.pow(10,qe);return Ht(_*Je)/Je},At=!1,Wt=!1,jt=function(_,qe){var Je={useGrouping:it,groupingSeparator:un,decimalSeparator:an,grouping:Bt,useToLocaleString:qt};return Re&&(Tt<=0?(_.rawValue=0,_.wholeValue=0,_.decimalValue=0):(Je.maximumSignificantDigits=Tt,_.significantDigits=Tt)),Et&&!Wt&&(_.isLargest?(_.wholeValue=kt,_.decimalValue=0):(_.wholeValue=0,_.decimalValue=0)),nt&&!Wt&&(_.isSmallest?(_.wholeValue=Ne,_.decimalValue=0):(_.wholeValue=0,_.decimalValue=0)),_.isSmallest||_.significantDigits&&_.significantDigits-_.wholeValue.toString().length<=0?Rt<0?_.value=kn(_.wholeValue,Rt):Rt===0?_.value=Ht(_.wholeValue+_.decimalValue):Re?(at?_.value=kn(_.rawValue,Tt-_.wholeValue.toString().length):_.value=_.rawValue,_.wholeValue&&(Tt-=_.wholeValue.toString().length)):(Je.fractionDigits=Rt,at?_.value=_.wholeValue+kn(_.decimalValue,Rt):_.value=_.wholeValue+_.decimalValue):Re&&_.wholeValue?(_.value=Math.round(kn(_.wholeValue,_.significantDigits-_.wholeValue.toString().length)),Tt-=_.wholeValue.toString().length):_.value=_.wholeValue,_.tokenLength>1&&(ce||At)&&(Je.minimumIntegerDigits=_.tokenLength,Wt&&Je.maximumSignificantDigits<_.tokenLength&&delete Je.maximumSignificantDigits),!At&&(_.value>0||wt===""||k(ie,_.type)||k(we,_.type))&&(At=!0),_.formattedValue=h(_.value,Je,Ie),Je.useGrouping=!1,Je.decimalSeparator=".",_.formattedValueEn=h(_.value,Je,"en"),_.tokenLength===2&&_.type==="milliseconds"&&(_.formattedValueMS=h(_.value,{minimumIntegerDigits:3,useGrouping:!1},"en").slice(0,2)),_};if(Ue=L(Ue,jt),Ue=R(Ue),Ue.length>1){var oo=function(_){return k(Ue,function(qe){return qe.type===_})},jn=function(_){var qe=oo(_.type);qe&&x(_.targets,function(Je){var pe=oo(Je.type);pe&&parseInt(qe.formattedValueEn,10)===Je.value&&(qe.rawValue=0,qe.wholeValue=0,qe.decimalValue=0,pe.rawValue+=1,pe.wholeValue+=1,pe.decimalValue=0,pe.formattedValueEn=pe.wholeValue.toString(),Wt=!0)})};x(a,jn)}return Wt&&(At=!1,Tt=Xt,Ue=L(Ue,jt),Ue=R(Ue)),we&&!(Et&&!z.trim)?(Ue=L(Ue,function(_){return k(we,function(qe){return _.type===qe})?_:null}),Ue=R(Ue)):(Zt&&(Ue=S(Ue,function(_){return!_.isSmallest&&!_.wholeValue&&!k(ie,_.type)})),me&&Ue.length&&(Ue=Ue.slice(0,me)),ut&&Ue.length>1&&(Ue=E(Ue,function(_){return!_.wholeValue&&!k(ie,_.type)&&!_.isLargest})),Vt&&(Ue=L(Ue,function(_,qe){return qe>0&&qe<Ue.length-1&&!_.wholeValue?null:_}),Ue=R(Ue)),$t&&Ue.length===1&&!Ue[0].wholeValue&&!(!at&&Ue[0].isSmallest&&Ue[0].rawValue<Ne)&&(Ue=[])),be?Ue:(x(Jt,function(_){var qe=De[_.type],Je=k(Ue,function(tn){return tn.type===_.type});if(!(!qe||!Je)){var pe=Je.formattedValueEn.split(".");pe[0]=parseInt(pe[0],10),pe[1]?pe[1]=parseFloat("0."+pe[1],10):pe[1]=null;var rt=Ee.durationPluralKey(qe,pe[0],pe[1]),Dt=m(qe,Ee),dn=!1,en={};x(Ee._durationLabelTypes,function(tn){var Sn=k(Dt,function(wn){return wn.type===tn.type&&wn.key===rt});Sn&&(en[Sn.type]=Sn.label,c(_.text,tn.string)&&(_.text=_.text.replace(tn.string,Sn.label),dn=!0))}),tt&&!dn&&(Dt.sort(g),x(Dt,function(tn){if(en[tn.type]===tn.label)return c(_.text,tn.label)?!1:void 0;if(c(_.text,tn.label))return _.text=_.text.replace(tn.label,en[tn.type]),!1}))}}),Jt=L(Jt,function(_){if(!_.type)return _.text;var qe=k(Ue,function(pe){return pe.type===_.type});if(!qe)return"";var Je="";return je&&(Je+=_.text),(ke&&Et||!ke&&nt)&&(Je+="< ",Et=!1,nt=!1),(ke&&nt||!ke&&Et)&&(Je+="> ",Et=!1,nt=!1),ke&&(qe.value>0||wt===""||k(ie,qe.type)||k(we,qe.type))&&(Je+="-",ke=!1),_.type==="milliseconds"&&qe.formattedValueMS?Je+=qe.formattedValueMS:Je+=qe.formattedValue,je||(Je+=_.text),Je}),Jt.join("").replace(/(,| |:|\.)*$/,"").replace(/^(,| |:|\.)*/,""))}function se(){var N=this.duration,z=function(ke){return N._data[ke]},j=k(this.types,z),ge=T(this.types,z);switch(j){case"milliseconds":return"S __";case"seconds":case"minutes":return"*_MS_";case"hours":return"_HMS_";case"days":if(j===ge)return"d __";case"weeks":return j===ge?"w __":(this.trim===null&&(this.trim="both"),"w __, d __, h __");case"months":if(j===ge)return"M __";case"years":return j===ge?"y __":(this.trim===null&&(this.trim="both"),"y __, M __, d __");default:return this.trim===null&&(this.trim="both"),"y __, d __, h __, m __, s __"}}function de(N){if(!N)throw"Moment Duration Format init cannot find moment instance.";N.duration.format=U,N.duration.fn.format=re,N.duration.fn.format.defaults={trim:null,stopTrim:null,largest:null,maxValue:null,minValue:null,precision:0,trunc:!1,forceLength:null,userLocale:null,usePlural:!0,useLeftUnits:!1,useGrouping:!0,useSignificantDigits:!1,template:se,useToLocaleString:!0,groupingSeparator:",",decimalSeparator:".",grouping:[3]},N.updateLocale("en",y)}var fe=function(N,z,j){return N.toLocaleString(z,j)};o=J()&&ne(fe),r=o&&ae(fe);var Q=function(N,z,j){if(typeof window<"u"&&window&&window.Intl&&window.Intl.NumberFormat)return window.Intl.NumberFormat(z,j).format(N)};return i=ne(Q),l=i&&ae(Q),de(n),de})}(ga)),ga.exports}Am();const Fm=["true","t","yes","y","on","1"],_m=["false","f","no","n","off","0"];function Lt(e,t=""){return{kind:Z.Text,readonly:!0,allowOverlay:!0,data:e,displayData:e,errorDetails:t,isError:!0,style:"faded"}}function lr(e){return e.hasOwnProperty("isError")&&e.isError}function Nm(e){return e.hasOwnProperty("tooltip")&&e.tooltip!==""}function Fi(e){return e.hasOwnProperty("isMissingValue")&&e.isMissingValue}function ma(e=!1){return e?{kind:Z.Loading,allowOverlay:!1,isMissingValue:!0}:{kind:Z.Loading,allowOverlay:!1}}function Bm(e,t){const n=t?"faded":"normal";return{kind:Z.Text,data:"",displayData:"",allowOverlay:!0,readonly:e,style:n}}function va(e){return{id:e.id,title:e.title,hasMenu:!1,menuIcon:"dots",themeOverride:e.themeOverride,icon:e.icon,group:e.group,...e.isStretched&&!e.isPinned&&{grow:1},...e.width&&{width:e.width}}}function Xr(e,t){return Ve(e)?t||{}:Ve(t)?e||{}:Nh(e,t)}function _u(e){if(Ve(e))return[];if(typeof e=="number"||typeof e=="boolean")return[e];if(e instanceof Uint8Array&&(e=new TextDecoder("utf-8").decode(e)),typeof e=="string"){if(e==="")return[];if(e.trim().startsWith("[")&&e.trim().endsWith("]"))try{return JSON.parse(e)}catch{return[e]}else return e.split(",")}try{const t=JSON.parse(JSON.stringify(e,(n,o)=>typeof o=="bigint"?Number(o):o));return Array.isArray(t)?t.map(n=>["string","number","boolean","null"].includes(typeof n)?n:bt(n)):[bt(t)]}catch{return[bt(e)]}}function Vm(e){return e&&e.startsWith("{")&&e.endsWith("}")}function bt(e){try{try{return Pm(e)}catch{return JSON.stringify(e,(t,n)=>typeof n=="bigint"?Number(n):n)}}catch{return`[${typeof e}]`}}function Nu(e){if(Ve(e))return null;if(typeof e=="boolean")return e;const t=bt(e).toLowerCase().trim();if(t==="")return null;if(Fm.includes(t))return!0;if(_m.includes(t))return!1}function Gr(e){if(Ve(e))return null;if(Array.isArray(e))return NaN;if(typeof e=="string"){if(e.trim().length===0)return null;try{const t=gi.unformat(e.trim());if(mt(t))return t}catch{}}else if(e instanceof Int32Array)return Number(e[0]);return Number(e)}function _i(e){if(Ve(e))return"";if(typeof e=="string")return e;try{return JSON.stringify(e,(t,n)=>typeof n=="bigint"?Number(n):n)}catch{return bt(e)}}function $m(e){if(e===0||Math.abs(e)>=1e-4)return 4;const t=e.toExponential().split("e");return Math.abs(parseInt(t[1],10))}function Ni(e,t,n){return Number.isNaN(e)||!Number.isFinite(e)?"":Ve(t)||t===""?mt(n)?(n===0&&(e=Math.round(e)),gi(e).format({thousandSeparated:!1,mantissa:n,trimMantissa:!1})):gi(e).format({thousandSeparated:!1,mantissa:$m(e),trimMantissa:!0}):t==="plain"?gi(e).format({thousandSeparated:!1,mantissa:20,trimMantissa:!0}):t==="localized"?new Intl.NumberFormat().format(e):t==="percent"?new Intl.NumberFormat(void 0,{style:"percent",minimumFractionDigits:0,maximumFractionDigits:2}).format(e):t==="dollar"?new Intl.NumberFormat(void 0,{style:"currency",currency:"USD",currencyDisplay:"narrowSymbol",maximumFractionDigits:2}).format(e):t==="euro"?new Intl.NumberFormat(void 0,{style:"currency",currency:"EUR",maximumFractionDigits:2}).format(e):["compact","scientific","engineering"].includes(t)?new Intl.NumberFormat(void 0,{notation:t}).format(e):t==="accounting"?gi(e).format({thousandSeparated:!0,negative:"parenthesis",mantissa:2,trimMantissa:!1}):rC.sprintf(t,e)}function Bu(e,t,n="datetime"){return t==="localized"?new Intl.DateTimeFormat(void 0,{dateStyle:n==="time"?void 0:"medium",timeStyle:n==="date"?void 0:"medium"}).format(e.toDate()):t==="distance"?e.fromNow():t==="calendar"?e.calendar():t==="iso8601"?n==="date"?e.format("YYYY-MM-DD"):n==="time"?e.format("HH:mm:ss.SSS[Z]"):e.toISOString():e.format(t)}function Bi(e){if(Ve(e))return null;if(e instanceof Date)return isNaN(e.getTime())?void 0:e;if(typeof e=="string"&&e.trim().length===0)return null;try{const t=Number(e);if(!isNaN(t)){let n=t;t>=10**18?n=t/1e3**3:t>=10**15?n=t/1e3**2:t>=10**12&&(n=t/1e3);const o=Qo.unix(n).utc();if(o.isValid())return o.toDate()}if(typeof e=="string"){const n=Qo.utc(e);if(n.isValid())return n.toDate();const o=Qo.utc(e,[Qo.HTML5_FMT.TIME_MS,Qo.HTML5_FMT.TIME_SECONDS,Qo.HTML5_FMT.TIME]);if(o.isValid())return o.toDate()}}catch{return}}function Vu(e){if(e%1===0)return 0;let t=e.toString();return t.indexOf("e")!==-1&&(t=e.toLocaleString("fullwide",{useGrouping:!1,maximumFractionDigits:20})),t.indexOf(".")===-1?0:t.split(".")[1].length}function Wm(e,t){return t===0?Math.trunc(e):Math.trunc(e*10**t)/10**t}const jm=new RegExp(/(\r\n|\n|\r)/gm);function Kr(e){return e.indexOf(`
177
177
  `)!==-1?e.replace(jm," "):e}function Um(e,t){if(Ve(t))return"";try{const n=t.match(e);return n&&n[1]!==void 0?decodeURIComponent(n[1].replace(/\+/g,"%20")):t}catch{return t}}const Ym=Sr("div",{target:"en99xsi0"})(({theme:e})=>({overflowY:"auto",padding:e.spacing.sm,".react-json-view .copy-icon svg":{fontSize:"0.9em !important",marginRight:`${e.spacing.threeXS} !important`,verticalAlign:"middle !important"}}),""),ba=({jsonValue:e,theme:t})=>{let n;if(e)try{n=typeof e=="string"?bs.parse(e):bs.parse(bs.stringify(e))}catch{n=void 0}return Ve(n)?Oe.jsx(No,{highlight:!0,autoFocus:!1,disabled:!0,value:_i(e)??"",onChange:()=>{}}):Oe.jsx(Ym,{"data-testid":"stJsonColumnViewer",children:Oe.jsx(Ky,{src:n,collapsed:2,theme:qy(t.bgCell)>.5?"rjv-default":"monokai",displayDataTypes:!1,displayObjectSize:!1,name:!1,enableClipboard:!0,style:{fontFamily:t.fontFamily,fontSize:t.baseFontStyle,backgroundColor:t.bgCell,whiteSpace:"pre-wrap"}})})};p.memo(ba);const Xm=e=>{const t=e.theme,n=e.value.data;return Oe.jsx(ba,{jsonValue:n.value||n.displayValue,theme:t})},Gm=e=>{const t=e.theme,n=e.value;return Oe.jsx(ba,{jsonValue:n.data,theme:t})},Km={kind:Z.Custom,isMatch:e=>e.data.kind==="json-cell",draw:(e,t)=>{const{value:n,displayValue:o}=t.data;return Yl(e,o??_i(n)??"",t.contentAlign),!0},measure:(e,t,n)=>{const{value:o,displayValue:r}=t.data,i=r??_i(o)??"";return(i?e.measureText(i).width:0)+n.cellHorizontalPadding*2},provideEditor:()=>({editor:Xm})},qm="line_chart",Zm="area_chart",Jm="bar_chart";function wa(e,t,n){const o=Xr({y_min:0,y_max:1},t.columnTypeOptions),r={kind:Z.Custom,allowOverlay:!1,copyData:"",contentAlign:t.contentAlignment,data:{kind:"sparkline-cell",values:[],displayValues:[],graphKind:n,yAxis:[o.y_min,o.y_max]}};return{...t,kind:e,sortMode:"default",isEditable:!1,getCell(i){if(Ve(o.y_min)||Ve(o.y_max)||Number.isNaN(o.y_min)||Number.isNaN(o.y_max)||o.y_min>=o.y_max)return Lt("Invalid min/max y-axis configuration",`The y_min (${o.y_min}) and y_max (${o.y_max}) configuration options must be valid numbers.`);if(Ve(i))return ma();const l=_u(i),s=[];let a=[];if(l.length===0)return ma();let c=Number.MIN_SAFE_INTEGER,u=Number.MAX_SAFE_INTEGER;for(let d=0;d<l.length;d++){const f=Gr(l[d]);if(Number.isNaN(f)||Ve(f))return Lt(bt(l),`The value cannot be interpreted as a numeric array. ${bt(f)} is not a number.`);f>c&&(c=f),f<u&&(u=f),s.push(f)}return s.length>0&&(c>o.y_max||u<o.y_min)?a=s.map(d=>c-u===0?c>(o.y_max||1)?o.y_max||1:o.y_min||0:((o.y_max||1)-(o.y_min||0))*((d-u)/(c-u))+(o.y_min||0)):a=s,{...r,copyData:s.join(","),data:{...r.data,values:a,displayValues:s.map(d=>Ni(d))},isMissingValue:Ve(i)}},getCellValue(i){var l,s;return i.kind===Z.Loading||((l=i.data)==null?void 0:l.values)===void 0?null:(s=i.data)==null?void 0:s.values}}}function $u(e){return wa(qm,e,"line")}$u.isEditableType=!1;function Wu(e){return wa(Jm,e,"bar")}Wu.isEditableType=!1;function ju(e){return wa(Zm,e,"area")}ju.isEditableType=!1;function ya(e){const t={kind:Z.Boolean,data:!1,allowOverlay:!1,contentAlign:e.contentAlignment,readonly:!e.isEditable,style:"normal"};return{...e,kind:"checkbox",sortMode:"default",getCell(n){let o=null;return o=Nu(n),o===void 0?Lt(bt(n),"The value cannot be interpreted as boolean."):{...t,data:o,isMissingValue:Ve(o)}},getCellValue(n){return n.data===void 0?null:n.data}}}ya.isEditableType=!0;function Uu(e,t){return t.startsWith("+")||t.startsWith("-")?e=e.utcOffset(t,!1):e=e.tz(t),e}function xa(e,t,n,o,r,i,l){var s,a;const c=Xr({format:n,step:o,timezone:l},t.columnTypeOptions);let u;if(mt(c.timezone))try{u=((s=Uu(Bh(),c.timezone))==null?void 0:s.utcOffset())||void 0}catch{}let d;mt(c.min_value)&&(d=Bi(c.min_value)||void 0);let f;mt(c.max_value)&&(f=Bi(c.max_value)||void 0);const h={kind:Z.Custom,allowOverlay:!0,copyData:"",readonly:!t.isEditable,contentAlign:t.contentAlignment,style:t.isPinned?"faded":"normal",data:{kind:"date-picker-cell",date:void 0,displayDate:"",step:((a=c.step)==null?void 0:a.toString())||"1",format:r,min:d,max:f}},g=m=>{const b=Bi(m);return b===null?!t.isRequired:!(b===void 0||mt(d)&&i(b)<i(d)||mt(f)&&i(b)>i(f))};return{...t,kind:e,sortMode:"default",validateInput:g,getCell(m,b){if(b===!0){const k=g(m);if(k===!1)return Lt(bt(m),"Invalid input.");k instanceof Date&&(m=k)}const y=Bi(m);let v="",I="",T=u;if(y===void 0)return Lt(bt(m),"The value cannot be interpreted as a datetime object.");if(y!==null){let k=Bh.utc(y);if(!k.isValid())return Lt(bt(y),`Invalid moment date. This should never happen. Please report this bug.
178
178
  Error: ${k.toString()}`);if(c.timezone){try{k=Uu(k,c.timezone)}catch(x){return Lt(k.toISOString(),`Failed to adjust to the provided timezone: ${c.timezone}.
@@ -184,5 +184,5 @@ Error: ${i}`}const o={kind:Z.Text,data:"",displayData:"",allowOverlay:!0,content
184
184
  40% { opacity: 1; }
185
185
  `]))),tb=function(e,t){var n=e.isFocused,o=e.size,r=e.theme,i=r.colors,l=r.spacing.baseUnit;return We({label:"loadingIndicator",display:"flex",transition:"color 150ms",alignSelf:"center",fontSize:o,lineHeight:1,marginRight:o,textAlign:"center",verticalAlign:"middle"},t?{}:{color:n?i.neutral60:i.neutral20,padding:l*2})},Na=function(e){var t=e.delay,n=e.offset;return Ae("span",{css:La({animation:"".concat(eb," 1s ease-in-out ").concat(t,"ms infinite;"),backgroundColor:"currentColor",borderRadius:"1em",display:"inline-block",marginLeft:n?"1em":void 0,height:"1em",verticalAlign:"top",width:"1em"},"","")})},nb=function(e){var t=e.innerProps,n=e.isRtl,o=e.size,r=o===void 0?4:o,i=wo(e,Y1);return Ae("div",Ke({},on(We(We({},i),{},{innerProps:t,isRtl:n,size:r}),"loadingIndicator",{indicator:!0,"loading-indicator":!0}),t),Ae(Na,{delay:0,offset:n}),Ae(Na,{delay:160,offset:!0}),Ae(Na,{delay:320,offset:!n}))},ob=function(e,t){var n=e.isDisabled,o=e.isFocused,r=e.theme,i=r.colors,l=r.borderRadius,s=r.spacing;return We({label:"control",alignItems:"center",cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:s.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms"},t?{}:{backgroundColor:n?i.neutral5:i.neutral0,borderColor:n?i.neutral10:o?i.primary:i.neutral20,borderRadius:l,borderStyle:"solid",borderWidth:1,boxShadow:o?"0 0 0 1px ".concat(i.primary):void 0,"&:hover":{borderColor:o?i.primary:i.neutral30}})},rb=function(e){var t=e.children,n=e.isDisabled,o=e.isFocused,r=e.innerRef,i=e.innerProps,l=e.menuIsOpen;return Ae("div",Ke({ref:r},on(e,"control",{control:!0,"control--is-disabled":n,"control--is-focused":o,"control--menu-is-open":l}),i,{"aria-disabled":n||void 0}),t)},ib=rb,lb=["data"],ab=function(e,t){var n=e.theme.spacing;return t?{}:{paddingBottom:n.baseUnit*2,paddingTop:n.baseUnit*2}},sb=function(e){var t=e.children,n=e.cx,o=e.getStyles,r=e.getClassNames,i=e.Heading,l=e.headingProps,s=e.innerProps,a=e.label,c=e.theme,u=e.selectProps;return Ae("div",Ke({},on(e,"group",{group:!0}),s),Ae(i,Ke({},l,{selectProps:u,theme:c,getStyles:o,getClassNames:r,cx:n}),a),Ae("div",null,t))},cb=function(e,t){var n=e.theme,o=n.colors,r=n.spacing;return We({label:"group",cursor:"default",display:"block"},t?{}:{color:o.neutral40,fontSize:"75%",fontWeight:500,marginBottom:"0.25em",paddingLeft:r.baseUnit*3,paddingRight:r.baseUnit*3,textTransform:"uppercase"})},ub=function(e){var t=kd(e);t.data;var n=wo(t,lb);return Ae("div",Ke({},on(e,"groupHeading",{"group-heading":!0}),n))},db=sb,hb=["innerRef","isDisabled","isHidden","inputClassName"],fb=function(e,t){var n=e.isDisabled,o=e.value,r=e.theme,i=r.spacing,l=r.colors;return We(We({visibility:n?"hidden":"visible",transform:o?"translateZ(0)":""},pb),t?{}:{margin:i.baseUnit/2,paddingBottom:i.baseUnit/2,paddingTop:i.baseUnit/2,color:l.neutral80})},Hd={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},pb={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content","&:after":We({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},Hd)},gb=function(e){return We({label:"input",color:"inherit",background:0,opacity:e?0:1,width:"100%"},Hd)},mb=function(e){var t=e.cx,n=e.value,o=kd(e),r=o.innerRef,i=o.isDisabled,l=o.isHidden,s=o.inputClassName,a=wo(o,hb);return Ae("div",Ke({},on(e,"input",{"input-container":!0}),{"data-value":n||""}),Ae("input",Ke({className:t({input:!0},s),ref:r,style:gb(l),disabled:i},a)))},vb=mb,bb=function(e,t){var n=e.theme,o=n.spacing,r=n.borderRadius,i=n.colors;return We({label:"multiValue",display:"flex",minWidth:0},t?{}:{backgroundColor:i.neutral10,borderRadius:r/2,margin:o.baseUnit/2})},wb=function(e,t){var n=e.theme,o=n.borderRadius,r=n.colors,i=e.cropWithEllipsis;return We({overflow:"hidden",textOverflow:i||i===void 0?"ellipsis":void 0,whiteSpace:"nowrap"},t?{}:{borderRadius:o/2,color:r.neutral80,fontSize:"85%",padding:3,paddingLeft:6})},yb=function(e,t){var n=e.theme,o=n.spacing,r=n.borderRadius,i=n.colors,l=e.isFocused;return We({alignItems:"center",display:"flex"},t?{}:{borderRadius:r/2,backgroundColor:l?i.dangerLight:void 0,paddingLeft:o.baseUnit,paddingRight:o.baseUnit,":hover":{backgroundColor:i.dangerLight,color:i.danger}})},Ad=function(e){var t=e.children,n=e.innerProps;return Ae("div",n,t)},xb=Ad,Cb=Ad;function kb(e){var t=e.children,n=e.innerProps;return Ae("div",Ke({role:"button"},n),t||Ae(_a,{size:14}))}var Sb=function(e){var t=e.children,n=e.components,o=e.data,r=e.innerProps,i=e.isDisabled,l=e.removeProps,s=e.selectProps,a=n.Container,c=n.Label,u=n.Remove;return Ae(a,{data:o,innerProps:We(We({},on(e,"multiValue",{"multi-value":!0,"multi-value--is-disabled":i})),r),selectProps:s},Ae(c,{data:o,innerProps:We({},on(e,"multiValueLabel",{"multi-value__label":!0})),selectProps:s},t),Ae(u,{data:o,innerProps:We(We({},on(e,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(t||"option")},l),selectProps:s}))},Mb=Sb,Rb=function(e,t){var n=e.isDisabled,o=e.isFocused,r=e.isSelected,i=e.theme,l=i.spacing,s=i.colors;return We({label:"option",cursor:"default",display:"block",fontSize:"inherit",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)"},t?{}:{backgroundColor:r?s.primary:o?s.primary25:"transparent",color:n?s.neutral20:r?s.neutral0:"inherit",padding:"".concat(l.baseUnit*2,"px ").concat(l.baseUnit*3,"px"),":active":{backgroundColor:n?void 0:r?s.primary:s.primary50}})},Eb=function(e){var t=e.children,n=e.isDisabled,o=e.isFocused,r=e.isSelected,i=e.innerRef,l=e.innerProps;return Ae("div",Ke({},on(e,"option",{option:!0,"option--is-disabled":n,"option--is-focused":o,"option--is-selected":r}),{ref:i,"aria-disabled":n},l),t)},Ib=Eb,Tb=function(e,t){var n=e.theme,o=n.spacing,r=n.colors;return We({label:"placeholder",gridArea:"1 / 1 / 2 / 3"},t?{}:{color:r.neutral50,marginLeft:o.baseUnit/2,marginRight:o.baseUnit/2})},Ob=function(e){var t=e.children,n=e.innerProps;return Ae("div",Ke({},on(e,"placeholder",{placeholder:!0}),n),t)},Db=Ob,zb=function(e,t){var n=e.isDisabled,o=e.theme,r=o.spacing,i=o.colors;return We({label:"singleValue",gridArea:"1 / 1 / 2 / 3",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},t?{}:{color:n?i.neutral40:i.neutral80,marginLeft:r.baseUnit/2,marginRight:r.baseUnit/2})},Lb=function(e){var t=e.children,n=e.isDisabled,o=e.innerProps;return Ae("div",Ke({},on(e,"singleValue",{"single-value":!0,"single-value--is-disabled":n}),o),t)},Pb=Lb,Fd={ClearIndicator:Z1,Control:ib,DropdownIndicator:K1,DownChevron:Ld,CrossIcon:_a,Group:db,GroupHeading:ub,IndicatorsContainer:j1,IndicatorSeparator:Q1,Input:vb,LoadingIndicator:nb,Menu:O1,MenuList:z1,MenuPortal:_1,LoadingMessage:A1,NoOptionsMessage:H1,MultiValue:Mb,MultiValueContainer:xb,MultiValueLabel:Cb,MultiValueRemove:kb,Option:Ib,Placeholder:Db,SelectContainer:B1,SingleValue:Pb,ValueContainer:$1},Hb=function(e){return We(We({},Fd),e.components)},_d=Number.isNaN||function(e){return typeof e=="number"&&e!==e};function Ab(e,t){return!!(e===t||_d(e)&&_d(t))}function Fb(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!Ab(e[n],t[n]))return!1;return!0}function _b(e,t){t===void 0&&(t=Fb);var n=null;function o(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];if(n&&n.lastThis===this&&t(r,n.lastArgs))return n.lastResult;var l=e.apply(this,r);return n={lastResult:l,lastArgs:r,lastThis:this},l}return o.clear=function(){n=null},o}for(var Nb={name:"7pg0cj-a11yText",styles:"label:a11yText;z-index:9999;border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;width:1px;position:absolute;overflow:hidden;padding:0;white-space:nowrap"},Bb=function(e){return Ae("span",Ke({css:Nb},e))},Nd=Bb,Vb={guidance:function(e){var t=e.isSearchable,n=e.isMulti,o=e.tabSelectsValue,r=e.context,i=e.isInitialFocus;switch(r){case"menu":return"Use Up and Down to choose options, press Enter to select the currently focused option, press Escape to exit the menu".concat(o?", press Tab to select the option and exit the menu":"",".");case"input":return i?"".concat(e["aria-label"]||"Select"," is focused ").concat(t?",type to refine list":"",", press Down to open the menu, ").concat(n?" press left to focus selected values":""):"";case"value":return"Use left and right to toggle between focused values, press Backspace to remove the currently focused value";default:return""}},onChange:function(e){var t=e.action,n=e.label,o=n===void 0?"":n,r=e.labels,i=e.isDisabled;switch(t){case"deselect-option":case"pop-value":case"remove-value":return"option ".concat(o,", deselected.");case"clear":return"All selected options have been cleared.";case"initial-input-focus":return"option".concat(r.length>1?"s":""," ").concat(r.join(","),", selected.");case"select-option":return i?"option ".concat(o," is disabled. Select another option."):"option ".concat(o,", selected.");default:return""}},onFocus:function(e){var t=e.context,n=e.focused,o=e.options,r=e.label,i=r===void 0?"":r,l=e.selectValue,s=e.isDisabled,a=e.isSelected,c=e.isAppleDevice,u=function(h,g){return h&&h.length?"".concat(h.indexOf(g)+1," of ").concat(h.length):""};if(t==="value"&&l)return"value ".concat(i," focused, ").concat(u(l,n),".");if(t==="menu"&&c){var d=s?" disabled":"",f="".concat(a?" selected":"").concat(d);return"".concat(i).concat(f,", ").concat(u(o,n),".")}return""},onFilter:function(e){var t=e.inputValue,n=e.resultsMessage;return"".concat(n).concat(t?" for search term "+t:"",".")}},$b=function(e){var t=e.ariaSelection,n=e.focusedOption,o=e.focusedValue,r=e.focusableOptions,i=e.isFocused,l=e.selectValue,s=e.selectProps,a=e.id,c=e.isAppleDevice,u=s.ariaLiveMessages,d=s.getOptionLabel,f=s.inputValue,h=s.isMulti,g=s.isOptionDisabled,m=s.isSearchable,b=s.menuIsOpen,y=s.options,v=s.screenReaderStatus,I=s.tabSelectsValue,T=s.isLoading,k=s["aria-label"],x=s["aria-live"],L=p.useMemo(function(){return We(We({},Vb),u||{})},[u]),O=p.useMemo(function(){var D="";if(t&&L.onChange){var C=t.option,X=t.options,B=t.removedValue,J=t.removedValues,ae=t.value,ne=function(Q){return Array.isArray(Q)?null:Q},U=B||C||ne(ae),re=U?d(U):"",se=X||J||void 0,de=se?se.map(d):[],fe=We({isDisabled:U&&g(U,l),label:re,labels:de},t);D=L.onChange(fe)}return D},[t,L,g,l,d]),R=p.useMemo(function(){var D="",C=n||o,X=!!(n&&l&&l.includes(n));if(C&&L.onFocus){var B={focused:C,label:d(C),isDisabled:g(C,l),isSelected:X,options:r,context:C===n?"menu":"value",selectValue:l,isAppleDevice:c};D=L.onFocus(B)}return D},[n,o,d,g,L,r,l,c]),P=p.useMemo(function(){var D="";if(b&&y.length&&!T&&L.onFilter){var C=v({count:r.length});D=L.onFilter({inputValue:f,resultsMessage:C})}return D},[r,f,b,L,y,v,T]),M=(t==null?void 0:t.action)==="initial-input-focus",S=p.useMemo(function(){var D="";if(L.guidance){var C=o?"value":b?"menu":"input";D=L.guidance({"aria-label":k,context:C,isDisabled:n&&g(n,l),isMulti:h,isSearchable:m,tabSelectsValue:I,isInitialFocus:M})}return D},[k,n,o,h,g,m,b,L,l,I,M]),E=Ae(p.Fragment,null,Ae("span",{id:"aria-selection"},O),Ae("span",{id:"aria-focused"},R),Ae("span",{id:"aria-results"},P),Ae("span",{id:"aria-guidance"},S));return Ae(p.Fragment,null,Ae(Nd,{id:a},M&&E),Ae(Nd,{"aria-live":x,"aria-atomic":"false","aria-relevant":"additions text",role:"log"},i&&!M&&E))},Wb=$b,Ba=[{base:"A",letters:"A\u24B6\uFF21\xC0\xC1\xC2\u1EA6\u1EA4\u1EAA\u1EA8\xC3\u0100\u0102\u1EB0\u1EAE\u1EB4\u1EB2\u0226\u01E0\xC4\u01DE\u1EA2\xC5\u01FA\u01CD\u0200\u0202\u1EA0\u1EAC\u1EB6\u1E00\u0104\u023A\u2C6F"},{base:"AA",letters:"\uA732"},{base:"AE",letters:"\xC6\u01FC\u01E2"},{base:"AO",letters:"\uA734"},{base:"AU",letters:"\uA736"},{base:"AV",letters:"\uA738\uA73A"},{base:"AY",letters:"\uA73C"},{base:"B",letters:"B\u24B7\uFF22\u1E02\u1E04\u1E06\u0243\u0182\u0181"},{base:"C",letters:"C\u24B8\uFF23\u0106\u0108\u010A\u010C\xC7\u1E08\u0187\u023B\uA73E"},{base:"D",letters:"D\u24B9\uFF24\u1E0A\u010E\u1E0C\u1E10\u1E12\u1E0E\u0110\u018B\u018A\u0189\uA779"},{base:"DZ",letters:"\u01F1\u01C4"},{base:"Dz",letters:"\u01F2\u01C5"},{base:"E",letters:"E\u24BA\uFF25\xC8\xC9\xCA\u1EC0\u1EBE\u1EC4\u1EC2\u1EBC\u0112\u1E14\u1E16\u0114\u0116\xCB\u1EBA\u011A\u0204\u0206\u1EB8\u1EC6\u0228\u1E1C\u0118\u1E18\u1E1A\u0190\u018E"},{base:"F",letters:"F\u24BB\uFF26\u1E1E\u0191\uA77B"},{base:"G",letters:"G\u24BC\uFF27\u01F4\u011C\u1E20\u011E\u0120\u01E6\u0122\u01E4\u0193\uA7A0\uA77D\uA77E"},{base:"H",letters:"H\u24BD\uFF28\u0124\u1E22\u1E26\u021E\u1E24\u1E28\u1E2A\u0126\u2C67\u2C75\uA78D"},{base:"I",letters:"I\u24BE\uFF29\xCC\xCD\xCE\u0128\u012A\u012C\u0130\xCF\u1E2E\u1EC8\u01CF\u0208\u020A\u1ECA\u012E\u1E2C\u0197"},{base:"J",letters:"J\u24BF\uFF2A\u0134\u0248"},{base:"K",letters:"K\u24C0\uFF2B\u1E30\u01E8\u1E32\u0136\u1E34\u0198\u2C69\uA740\uA742\uA744\uA7A2"},{base:"L",letters:"L\u24C1\uFF2C\u013F\u0139\u013D\u1E36\u1E38\u013B\u1E3C\u1E3A\u0141\u023D\u2C62\u2C60\uA748\uA746\uA780"},{base:"LJ",letters:"\u01C7"},{base:"Lj",letters:"\u01C8"},{base:"M",letters:"M\u24C2\uFF2D\u1E3E\u1E40\u1E42\u2C6E\u019C"},{base:"N",letters:"N\u24C3\uFF2E\u01F8\u0143\xD1\u1E44\u0147\u1E46\u0145\u1E4A\u1E48\u0220\u019D\uA790\uA7A4"},{base:"NJ",letters:"\u01CA"},{base:"Nj",letters:"\u01CB"},{base:"O",letters:"O\u24C4\uFF2F\xD2\xD3\xD4\u1ED2\u1ED0\u1ED6\u1ED4\xD5\u1E4C\u022C\u1E4E\u014C\u1E50\u1E52\u014E\u022E\u0230\xD6\u022A\u1ECE\u0150\u01D1\u020C\u020E\u01A0\u1EDC\u1EDA\u1EE0\u1EDE\u1EE2\u1ECC\u1ED8\u01EA\u01EC\xD8\u01FE\u0186\u019F\uA74A\uA74C"},{base:"OI",letters:"\u01A2"},{base:"OO",letters:"\uA74E"},{base:"OU",letters:"\u0222"},{base:"P",letters:"P\u24C5\uFF30\u1E54\u1E56\u01A4\u2C63\uA750\uA752\uA754"},{base:"Q",letters:"Q\u24C6\uFF31\uA756\uA758\u024A"},{base:"R",letters:"R\u24C7\uFF32\u0154\u1E58\u0158\u0210\u0212\u1E5A\u1E5C\u0156\u1E5E\u024C\u2C64\uA75A\uA7A6\uA782"},{base:"S",letters:"S\u24C8\uFF33\u1E9E\u015A\u1E64\u015C\u1E60\u0160\u1E66\u1E62\u1E68\u0218\u015E\u2C7E\uA7A8\uA784"},{base:"T",letters:"T\u24C9\uFF34\u1E6A\u0164\u1E6C\u021A\u0162\u1E70\u1E6E\u0166\u01AC\u01AE\u023E\uA786"},{base:"TZ",letters:"\uA728"},{base:"U",letters:"U\u24CA\uFF35\xD9\xDA\xDB\u0168\u1E78\u016A\u1E7A\u016C\xDC\u01DB\u01D7\u01D5\u01D9\u1EE6\u016E\u0170\u01D3\u0214\u0216\u01AF\u1EEA\u1EE8\u1EEE\u1EEC\u1EF0\u1EE4\u1E72\u0172\u1E76\u1E74\u0244"},{base:"V",letters:"V\u24CB\uFF36\u1E7C\u1E7E\u01B2\uA75E\u0245"},{base:"VY",letters:"\uA760"},{base:"W",letters:"W\u24CC\uFF37\u1E80\u1E82\u0174\u1E86\u1E84\u1E88\u2C72"},{base:"X",letters:"X\u24CD\uFF38\u1E8A\u1E8C"},{base:"Y",letters:"Y\u24CE\uFF39\u1EF2\xDD\u0176\u1EF8\u0232\u1E8E\u0178\u1EF6\u1EF4\u01B3\u024E\u1EFE"},{base:"Z",letters:"Z\u24CF\uFF3A\u0179\u1E90\u017B\u017D\u1E92\u1E94\u01B5\u0224\u2C7F\u2C6B\uA762"},{base:"a",letters:"a\u24D0\uFF41\u1E9A\xE0\xE1\xE2\u1EA7\u1EA5\u1EAB\u1EA9\xE3\u0101\u0103\u1EB1\u1EAF\u1EB5\u1EB3\u0227\u01E1\xE4\u01DF\u1EA3\xE5\u01FB\u01CE\u0201\u0203\u1EA1\u1EAD\u1EB7\u1E01\u0105\u2C65\u0250"},{base:"aa",letters:"\uA733"},{base:"ae",letters:"\xE6\u01FD\u01E3"},{base:"ao",letters:"\uA735"},{base:"au",letters:"\uA737"},{base:"av",letters:"\uA739\uA73B"},{base:"ay",letters:"\uA73D"},{base:"b",letters:"b\u24D1\uFF42\u1E03\u1E05\u1E07\u0180\u0183\u0253"},{base:"c",letters:"c\u24D2\uFF43\u0107\u0109\u010B\u010D\xE7\u1E09\u0188\u023C\uA73F\u2184"},{base:"d",letters:"d\u24D3\uFF44\u1E0B\u010F\u1E0D\u1E11\u1E13\u1E0F\u0111\u018C\u0256\u0257\uA77A"},{base:"dz",letters:"\u01F3\u01C6"},{base:"e",letters:"e\u24D4\uFF45\xE8\xE9\xEA\u1EC1\u1EBF\u1EC5\u1EC3\u1EBD\u0113\u1E15\u1E17\u0115\u0117\xEB\u1EBB\u011B\u0205\u0207\u1EB9\u1EC7\u0229\u1E1D\u0119\u1E19\u1E1B\u0247\u025B\u01DD"},{base:"f",letters:"f\u24D5\uFF46\u1E1F\u0192\uA77C"},{base:"g",letters:"g\u24D6\uFF47\u01F5\u011D\u1E21\u011F\u0121\u01E7\u0123\u01E5\u0260\uA7A1\u1D79\uA77F"},{base:"h",letters:"h\u24D7\uFF48\u0125\u1E23\u1E27\u021F\u1E25\u1E29\u1E2B\u1E96\u0127\u2C68\u2C76\u0265"},{base:"hv",letters:"\u0195"},{base:"i",letters:"i\u24D8\uFF49\xEC\xED\xEE\u0129\u012B\u012D\xEF\u1E2F\u1EC9\u01D0\u0209\u020B\u1ECB\u012F\u1E2D\u0268\u0131"},{base:"j",letters:"j\u24D9\uFF4A\u0135\u01F0\u0249"},{base:"k",letters:"k\u24DA\uFF4B\u1E31\u01E9\u1E33\u0137\u1E35\u0199\u2C6A\uA741\uA743\uA745\uA7A3"},{base:"l",letters:"l\u24DB\uFF4C\u0140\u013A\u013E\u1E37\u1E39\u013C\u1E3D\u1E3B\u017F\u0142\u019A\u026B\u2C61\uA749\uA781\uA747"},{base:"lj",letters:"\u01C9"},{base:"m",letters:"m\u24DC\uFF4D\u1E3F\u1E41\u1E43\u0271\u026F"},{base:"n",letters:"n\u24DD\uFF4E\u01F9\u0144\xF1\u1E45\u0148\u1E47\u0146\u1E4B\u1E49\u019E\u0272\u0149\uA791\uA7A5"},{base:"nj",letters:"\u01CC"},{base:"o",letters:"o\u24DE\uFF4F\xF2\xF3\xF4\u1ED3\u1ED1\u1ED7\u1ED5\xF5\u1E4D\u022D\u1E4F\u014D\u1E51\u1E53\u014F\u022F\u0231\xF6\u022B\u1ECF\u0151\u01D2\u020D\u020F\u01A1\u1EDD\u1EDB\u1EE1\u1EDF\u1EE3\u1ECD\u1ED9\u01EB\u01ED\xF8\u01FF\u0254\uA74B\uA74D\u0275"},{base:"oi",letters:"\u01A3"},{base:"ou",letters:"\u0223"},{base:"oo",letters:"\uA74F"},{base:"p",letters:"p\u24DF\uFF50\u1E55\u1E57\u01A5\u1D7D\uA751\uA753\uA755"},{base:"q",letters:"q\u24E0\uFF51\u024B\uA757\uA759"},{base:"r",letters:"r\u24E1\uFF52\u0155\u1E59\u0159\u0211\u0213\u1E5B\u1E5D\u0157\u1E5F\u024D\u027D\uA75B\uA7A7\uA783"},{base:"s",letters:"s\u24E2\uFF53\xDF\u015B\u1E65\u015D\u1E61\u0161\u1E67\u1E63\u1E69\u0219\u015F\u023F\uA7A9\uA785\u1E9B"},{base:"t",letters:"t\u24E3\uFF54\u1E6B\u1E97\u0165\u1E6D\u021B\u0163\u1E71\u1E6F\u0167\u01AD\u0288\u2C66\uA787"},{base:"tz",letters:"\uA729"},{base:"u",letters:"u\u24E4\uFF55\xF9\xFA\xFB\u0169\u1E79\u016B\u1E7B\u016D\xFC\u01DC\u01D8\u01D6\u01DA\u1EE7\u016F\u0171\u01D4\u0215\u0217\u01B0\u1EEB\u1EE9\u1EEF\u1EED\u1EF1\u1EE5\u1E73\u0173\u1E77\u1E75\u0289"},{base:"v",letters:"v\u24E5\uFF56\u1E7D\u1E7F\u028B\uA75F\u028C"},{base:"vy",letters:"\uA761"},{base:"w",letters:"w\u24E6\uFF57\u1E81\u1E83\u0175\u1E87\u1E85\u1E98\u1E89\u2C73"},{base:"x",letters:"x\u24E7\uFF58\u1E8B\u1E8D"},{base:"y",letters:"y\u24E8\uFF59\u1EF3\xFD\u0177\u1EF9\u0233\u1E8F\xFF\u1EF7\u1E99\u1EF5\u01B4\u024F\u1EFF"},{base:"z",letters:"z\u24E9\uFF5A\u017A\u1E91\u017C\u017E\u1E93\u1E95\u01B6\u0225\u0240\u2C6C\uA763"}],jb=new RegExp("["+Ba.map(function(e){return e.letters}).join("")+"]","g"),Bd={},Va=0;Va<Ba.length;Va++)for(var $a=Ba[Va],Wa=0;Wa<$a.letters.length;Wa++)Bd[$a.letters[Wa]]=$a.base;var Vd=function(e){return e.replace(jb,function(t){return Bd[t]})},Ub=_b(Vd),$d=function(e){return e.replace(/^\s+|\s+$/g,"")},Yb=function(e){return"".concat(e.label," ").concat(e.value)},Xb=function(e){return function(t,n){if(t.data.__isNew__)return!0;var o=We({ignoreCase:!0,ignoreAccents:!0,stringify:Yb,trim:!0,matchFrom:"any"},e),r=o.ignoreCase,i=o.ignoreAccents,l=o.stringify,s=o.trim,a=o.matchFrom,c=s?$d(n):n,u=s?$d(l(t)):l(t);return r&&(c=c.toLowerCase(),u=u.toLowerCase()),i&&(c=Ub(c),u=Vd(u)),a==="start"?u.substr(0,c.length)===c:u.indexOf(c)>-1}},Gb=["innerRef"];function Kb(e){var t=e.innerRef,n=wo(e,Gb),o=C1(n,"onExited","in","enter","exit","appear");return Ae("input",Ke({ref:t},o,{css:La({label:"dummyInput",background:0,border:0,caretColor:"transparent",fontSize:"inherit",gridArea:"1 / 1 / 2 / 3",outline:0,padding:0,width:1,color:"transparent",left:-100,opacity:0,position:"relative",transform:"scale(.01)"},"","")}))}var qb=function(e){e.cancelable&&e.preventDefault(),e.stopPropagation()};function Zb(e){var t=e.isEnabled,n=e.onBottomArrive,o=e.onBottomLeave,r=e.onTopArrive,i=e.onTopLeave,l=p.useRef(!1),s=p.useRef(!1),a=p.useRef(0),c=p.useRef(null),u=p.useCallback(function(b,y){if(c.current!==null){var v=c.current,I=v.scrollTop,T=v.scrollHeight,k=v.clientHeight,x=c.current,L=y>0,O=T-k-I,R=!1;O>y&&l.current&&(o&&o(b),l.current=!1),L&&s.current&&(i&&i(b),s.current=!1),L&&y>O?(n&&!l.current&&n(b),x.scrollTop=T,R=!0,l.current=!0):!L&&-y>I&&(r&&!s.current&&r(b),x.scrollTop=0,R=!0,s.current=!0),R&&qb(b)}},[n,o,r,i]),d=p.useCallback(function(b){u(b,b.deltaY)},[u]),f=p.useCallback(function(b){a.current=b.changedTouches[0].clientY},[]),h=p.useCallback(function(b){var y=a.current-b.changedTouches[0].clientY;u(b,y)},[u]),g=p.useCallback(function(b){if(b){var y=w1?{passive:!1}:!1;b.addEventListener("wheel",d,y),b.addEventListener("touchstart",f,y),b.addEventListener("touchmove",h,y)}},[h,f,d]),m=p.useCallback(function(b){b&&(b.removeEventListener("wheel",d,!1),b.removeEventListener("touchstart",f,!1),b.removeEventListener("touchmove",h,!1))},[h,f,d]);return p.useEffect(function(){if(t){var b=c.current;return g(b),function(){m(b)}}},[t,g,m]),function(b){c.current=b}}var Wd=["boxSizing","height","overflow","paddingRight","position"],jd={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function Ud(e){e.preventDefault()}function Yd(e){e.stopPropagation()}function Xd(){var e=this.scrollTop,t=this.scrollHeight,n=e+this.offsetHeight;e===0?this.scrollTop=1:n===t&&(this.scrollTop=e-1)}function Gd(){return"ontouchstart"in window||navigator.maxTouchPoints}var Kd=!!(typeof window<"u"&&window.document&&window.document.createElement),Qr=0,ar={capture:!1,passive:!1};function Jb(e){var t=e.isEnabled,n=e.accountForScrollbars,o=n===void 0?!0:n,r=p.useRef({}),i=p.useRef(null),l=p.useCallback(function(a){if(Kd){var c=document.body,u=c&&c.style;if(o&&Wd.forEach(function(g){var m=u&&u[g];r.current[g]=m}),o&&Qr<1){var d=parseInt(r.current.paddingRight,10)||0,f=document.body?document.body.clientWidth:0,h=window.innerWidth-f+d||0;Object.keys(jd).forEach(function(g){var m=jd[g];u&&(u[g]=m)}),u&&(u.paddingRight="".concat(h,"px"))}c&&Gd()&&(c.addEventListener("touchmove",Ud,ar),a&&(a.addEventListener("touchstart",Xd,ar),a.addEventListener("touchmove",Yd,ar))),Qr+=1}},[o]),s=p.useCallback(function(a){if(Kd){var c=document.body,u=c&&c.style;Qr=Math.max(Qr-1,0),o&&Qr<1&&Wd.forEach(function(d){var f=r.current[d];u&&(u[d]=f)}),c&&Gd()&&(c.removeEventListener("touchmove",Ud,ar),a&&(a.removeEventListener("touchstart",Xd,ar),a.removeEventListener("touchmove",Yd,ar)))}},[o]);return p.useEffect(function(){if(t){var a=i.current;return l(a),function(){s(a)}}},[t,l,s]),function(a){i.current=a}}var Qb=function(e){var t=e.target;return t.ownerDocument.activeElement&&t.ownerDocument.activeElement.blur()},ew={name:"1kfdb0e",styles:"position:fixed;left:0;bottom:0;right:0;top:0"};function tw(e){var t=e.children,n=e.lockEnabled,o=e.captureEnabled,r=o===void 0?!0:o,i=e.onBottomArrive,l=e.onBottomLeave,s=e.onTopArrive,a=e.onTopLeave,c=Zb({isEnabled:r,onBottomArrive:i,onBottomLeave:l,onTopArrive:s,onTopLeave:a}),u=Jb({isEnabled:n}),d=function(f){c(f),u(f)};return Ae(p.Fragment,null,n&&Ae("div",{onClick:Qb,css:ew}),t(d))}var nw={name:"1a0ro4n-requiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%"},ow=function(e){var t=e.name,n=e.onFocus;return Ae("input",{required:!0,name:t,tabIndex:-1,"aria-hidden":"true",onFocus:n,css:nw,value:"",onChange:function(){}})},rw=ow;function ja(e){var t;return typeof window<"u"&&window.navigator!=null?e.test(((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.platform)||window.navigator.platform):!1}function iw(){return ja(/^iPhone/i)}function qd(){return ja(/^Mac/i)}function lw(){return ja(/^iPad/i)||qd()&&navigator.maxTouchPoints>1}function aw(){return iw()||lw()}function sw(){return qd()||aw()}var cw=function(e){return e.label},uw=function(e){return e.label},dw=function(e){return e.value},hw=function(e){return!!e.isDisabled},fw={clearIndicator:q1,container:N1,control:ob,dropdownIndicator:G1,group:ab,groupHeading:cb,indicatorsContainer:W1,indicatorSeparator:J1,input:fb,loadingIndicator:tb,loadingMessage:P1,menu:E1,menuList:D1,menuPortal:F1,multiValue:bb,multiValueLabel:wb,multiValueRemove:yb,noOptionsMessage:L1,option:Rb,placeholder:Tb,singleValue:zb,valueContainer:V1},pw={primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},gw=4,Zd=4,mw=38,vw=Zd*2,bw={baseUnit:Zd,controlHeight:mw,menuGutter:vw},Ua={borderRadius:gw,colors:pw,spacing:bw},ww={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:Rd(),captureMenuScroll:!Rd(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:Xb(),formatGroupLabel:cw,getOptionLabel:uw,getOptionValue:dw,isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:hw,loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!v1(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(e){var t=e.count;return"".concat(t," result").concat(t!==1?"s":""," available")},styles:{},tabIndex:0,tabSelectsValue:!0,unstyled:!1};function Jd(e,t,n,o){var r=oh(e,t,n),i=rh(e,t,n),l=nh(e,t),s=tl(e,t);return{type:"option",data:t,isDisabled:r,isSelected:i,label:l,value:s,index:o}}function el(e,t){return e.options.map(function(n,o){if("options"in n){var r=n.options.map(function(l,s){return Jd(e,l,t,s)}).filter(function(l){return th(e,l)});return r.length>0?{type:"group",data:n,options:r,index:o}:void 0}var i=Jd(e,n,t,o);return th(e,i)?i:void 0}).filter(y1)}function Qd(e){return e.reduce(function(t,n){return n.type==="group"?t.push.apply(t,Cs(n.options.map(function(o){return o.data}))):t.push(n.data),t},[])}function eh(e,t){return e.reduce(function(n,o){return o.type==="group"?n.push.apply(n,Cs(o.options.map(function(r){return{data:r.data,id:"".concat(t,"-").concat(o.index,"-").concat(r.index)}}))):n.push({data:o.data,id:"".concat(t,"-").concat(o.index)}),n},[])}function yw(e,t){return Qd(el(e,t))}function th(e,t){var n=e.inputValue,o=n===void 0?"":n,r=t.data,i=t.isSelected,l=t.label,s=t.value;return(!lh(e)||!i)&&ih(e,{label:l,value:s,data:r},o)}function xw(e,t){var n=e.focusedValue,o=e.selectValue,r=o.indexOf(n);if(r>-1){var i=t.indexOf(n);if(i>-1)return n;if(r<t.length)return t[r]}return null}function Cw(e,t){var n=e.focusedOption;return n&&t.indexOf(n)>-1?n:t[0]}var Ya=function(e,t){var n,o=(n=e.find(function(r){return r.data===t}))===null||n===void 0?void 0:n.id;return o||null},nh=function(e,t){return e.getOptionLabel(t)},tl=function(e,t){return e.getOptionValue(t)};function oh(e,t,n){return typeof e.isOptionDisabled=="function"?e.isOptionDisabled(t,n):!1}function rh(e,t,n){if(n.indexOf(t)>-1)return!0;if(typeof e.isOptionSelected=="function")return e.isOptionSelected(t,n);var o=tl(e,t);return n.some(function(r){return tl(e,r)===o})}function ih(e,t,n){return e.filterOption?e.filterOption(t,n):!0}var lh=function(e){var t=e.hideSelectedOptions,n=e.isMulti;return t===void 0?n:t},kw=1,ah=function(e){aC(n,e);var t=uC(n);function n(o){var r;if(cC(this,n),r=t.call(this,o),r.state={ariaSelection:null,focusedOption:null,focusedOptionId:null,focusableOptionsWithIds:[],focusedValue:null,inputIsHidden:!1,isFocused:!1,selectValue:[],clearFocusValueOnUpdate:!1,prevWasFocused:!1,inputIsHiddenAfterUpdate:void 0,prevProps:void 0,instancePrefix:""},r.blockOptionHover=!1,r.isComposing=!1,r.commonProps=void 0,r.initialTouchX=0,r.initialTouchY=0,r.openAfterFocus=!1,r.scrollToFocusedOptionOnUpdate=!1,r.userIsDragging=void 0,r.isAppleDevice=sw(),r.controlRef=null,r.getControlRef=function(a){r.controlRef=a},r.focusedOptionRef=null,r.getFocusedOptionRef=function(a){r.focusedOptionRef=a},r.menuListRef=null,r.getMenuListRef=function(a){r.menuListRef=a},r.inputRef=null,r.getInputRef=function(a){r.inputRef=a},r.focus=r.focusInput,r.blur=r.blurInput,r.onChange=function(a,c){var u=r.props,d=u.onChange,f=u.name;c.name=f,r.ariaOnChange(a,c),d(a,c)},r.setValue=function(a,c,u){var d=r.props,f=d.closeMenuOnSelect,h=d.isMulti,g=d.inputValue;r.onInputChange("",{action:"set-value",prevInputValue:g}),f&&(r.setState({inputIsHiddenAfterUpdate:!h}),r.onMenuClose()),r.setState({clearFocusValueOnUpdate:!0}),r.onChange(a,{action:c,option:u})},r.selectOption=function(a){var c=r.props,u=c.blurInputOnSelect,d=c.isMulti,f=c.name,h=r.state.selectValue,g=d&&r.isOptionSelected(a,h),m=r.isOptionDisabled(a,h);if(g){var b=r.getOptionValue(a);r.setValue(h.filter(function(y){return r.getOptionValue(y)!==b}),"deselect-option",a)}else if(!m)d?r.setValue([].concat(Cs(h),[a]),"select-option",a):r.setValue(a,"select-option");else{r.ariaOnChange(a,{action:"select-option",option:a,name:f});return}u&&r.blurInput()},r.removeValue=function(a){var c=r.props.isMulti,u=r.state.selectValue,d=r.getOptionValue(a),f=u.filter(function(g){return r.getOptionValue(g)!==d}),h=Qi(c,f,f[0]||null);r.onChange(h,{action:"remove-value",removedValue:a}),r.focusInput()},r.clearValue=function(){var a=r.state.selectValue;r.onChange(Qi(r.props.isMulti,[],null),{action:"clear",removedValues:a})},r.popValue=function(){var a=r.props.isMulti,c=r.state.selectValue,u=c[c.length-1],d=c.slice(0,c.length-1),f=Qi(a,d,d[0]||null);r.onChange(f,{action:"pop-value",removedValue:u})},r.getFocusedOptionId=function(a){return Ya(r.state.focusableOptionsWithIds,a)},r.getFocusableOptionsWithIds=function(){return eh(el(r.props,r.state.selectValue),r.getElementId("option"))},r.getValue=function(){return r.state.selectValue},r.cx=function(){for(var a=arguments.length,c=new Array(a),u=0;u<a;u++)c[u]=arguments[u];return h1.apply(void 0,[r.props.classNamePrefix].concat(c))},r.getOptionLabel=function(a){return nh(r.props,a)},r.getOptionValue=function(a){return tl(r.props,a)},r.getStyles=function(a,c){var u=r.props.unstyled,d=fw[a](c,u);d.boxSizing="border-box";var f=r.props.styles[a];return f?f(d,c):d},r.getClassNames=function(a,c){var u,d;return(u=(d=r.props.classNames)[a])===null||u===void 0?void 0:u.call(d,c)},r.getElementId=function(a){return"".concat(r.state.instancePrefix,"-").concat(a)},r.getComponents=function(){return Hb(r.props)},r.buildCategorizedOptions=function(){return el(r.props,r.state.selectValue)},r.getCategorizedOptions=function(){return r.props.menuIsOpen?r.buildCategorizedOptions():[]},r.buildFocusableOptions=function(){return Qd(r.buildCategorizedOptions())},r.getFocusableOptions=function(){return r.props.menuIsOpen?r.buildFocusableOptions():[]},r.ariaOnChange=function(a,c){r.setState({ariaSelection:We({value:a},c)})},r.onMenuMouseDown=function(a){a.button===0&&(a.stopPropagation(),a.preventDefault(),r.focusInput())},r.onMenuMouseMove=function(a){r.blockOptionHover=!1},r.onControlMouseDown=function(a){if(!a.defaultPrevented){var c=r.props.openMenuOnClick;r.state.isFocused?r.props.menuIsOpen?a.target.tagName!=="INPUT"&&a.target.tagName!=="TEXTAREA"&&r.onMenuClose():c&&r.openMenu("first"):(c&&(r.openAfterFocus=!0),r.focusInput()),a.target.tagName!=="INPUT"&&a.target.tagName!=="TEXTAREA"&&a.preventDefault()}},r.onDropdownIndicatorMouseDown=function(a){if(!(a&&a.type==="mousedown"&&a.button!==0)&&!r.props.isDisabled){var c=r.props,u=c.isMulti,d=c.menuIsOpen;r.focusInput(),d?(r.setState({inputIsHiddenAfterUpdate:!u}),r.onMenuClose()):r.openMenu("first"),a.preventDefault()}},r.onClearIndicatorMouseDown=function(a){a&&a.type==="mousedown"&&a.button!==0||(r.clearValue(),a.preventDefault(),r.openAfterFocus=!1,a.type==="touchend"?r.focusInput():setTimeout(function(){return r.focusInput()}))},r.onScroll=function(a){typeof r.props.closeMenuOnScroll=="boolean"?a.target instanceof HTMLElement&&Ki(a.target)&&r.props.onMenuClose():typeof r.props.closeMenuOnScroll=="function"&&r.props.closeMenuOnScroll(a)&&r.props.onMenuClose()},r.onCompositionStart=function(){r.isComposing=!0},r.onCompositionEnd=function(){r.isComposing=!1},r.onTouchStart=function(a){var c=a.touches,u=c&&c.item(0);u&&(r.initialTouchX=u.clientX,r.initialTouchY=u.clientY,r.userIsDragging=!1)},r.onTouchMove=function(a){var c=a.touches,u=c&&c.item(0);if(u){var d=Math.abs(u.clientX-r.initialTouchX),f=Math.abs(u.clientY-r.initialTouchY),h=5;r.userIsDragging=d>h||f>h}},r.onTouchEnd=function(a){r.userIsDragging||(r.controlRef&&!r.controlRef.contains(a.target)&&r.menuListRef&&!r.menuListRef.contains(a.target)&&r.blurInput(),r.initialTouchX=0,r.initialTouchY=0)},r.onControlTouchEnd=function(a){r.userIsDragging||r.onControlMouseDown(a)},r.onClearIndicatorTouchEnd=function(a){r.userIsDragging||r.onClearIndicatorMouseDown(a)},r.onDropdownIndicatorTouchEnd=function(a){r.userIsDragging||r.onDropdownIndicatorMouseDown(a)},r.handleInputChange=function(a){var c=r.props.inputValue,u=a.currentTarget.value;r.setState({inputIsHiddenAfterUpdate:!1}),r.onInputChange(u,{action:"input-change",prevInputValue:c}),r.props.menuIsOpen||r.onMenuOpen()},r.onInputFocus=function(a){r.props.onFocus&&r.props.onFocus(a),r.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(r.openAfterFocus||r.props.openMenuOnFocus)&&r.openMenu("first"),r.openAfterFocus=!1},r.onInputBlur=function(a){var c=r.props.inputValue;if(r.menuListRef&&r.menuListRef.contains(document.activeElement)){r.inputRef.focus();return}r.props.onBlur&&r.props.onBlur(a),r.onInputChange("",{action:"input-blur",prevInputValue:c}),r.onMenuClose(),r.setState({focusedValue:null,isFocused:!1})},r.onOptionHover=function(a){if(!(r.blockOptionHover||r.state.focusedOption===a)){var c=r.getFocusableOptions(),u=c.indexOf(a);r.setState({focusedOption:a,focusedOptionId:u>-1?r.getFocusedOptionId(a):null})}},r.shouldHideSelectedOptions=function(){return lh(r.props)},r.onValueInputFocus=function(a){a.preventDefault(),a.stopPropagation(),r.focus()},r.onKeyDown=function(a){var c=r.props,u=c.isMulti,d=c.backspaceRemovesValue,f=c.escapeClearsValue,h=c.inputValue,g=c.isClearable,m=c.isDisabled,b=c.menuIsOpen,y=c.onKeyDown,v=c.tabSelectsValue,I=c.openMenuOnFocus,T=r.state,k=T.focusedOption,x=T.focusedValue,L=T.selectValue;if(!m&&!(typeof y=="function"&&(y(a),a.defaultPrevented))){switch(r.blockOptionHover=!0,a.key){case"ArrowLeft":if(!u||h)return;r.focusValue("previous");break;case"ArrowRight":if(!u||h)return;r.focusValue("next");break;case"Delete":case"Backspace":if(h)return;if(x)r.removeValue(x);else{if(!d)return;u?r.popValue():g&&r.clearValue()}break;case"Tab":if(r.isComposing||a.shiftKey||!b||!v||!k||I&&r.isOptionSelected(k,L))return;r.selectOption(k);break;case"Enter":if(a.keyCode===229)break;if(b){if(!k||r.isComposing)return;r.selectOption(k);break}return;case"Escape":b?(r.setState({inputIsHiddenAfterUpdate:!1}),r.onInputChange("",{action:"menu-close",prevInputValue:h}),r.onMenuClose()):g&&f&&r.clearValue();break;case" ":if(h)return;if(!b){r.openMenu("first");break}if(!k)return;r.selectOption(k);break;case"ArrowUp":b?r.focusOption("up"):r.openMenu("last");break;case"ArrowDown":b?r.focusOption("down"):r.openMenu("first");break;case"PageUp":if(!b)return;r.focusOption("pageup");break;case"PageDown":if(!b)return;r.focusOption("pagedown");break;case"Home":if(!b)return;r.focusOption("first");break;case"End":if(!b)return;r.focusOption("last");break;default:return}a.preventDefault()}},r.state.instancePrefix="react-select-"+(r.props.instanceId||++kw),r.state.selectValue=Cd(o.value),o.menuIsOpen&&r.state.selectValue.length){var i=r.getFocusableOptionsWithIds(),l=r.buildFocusableOptions(),s=l.indexOf(r.state.selectValue[0]);r.state.focusableOptionsWithIds=i,r.state.focusedOption=l[s],r.state.focusedOptionId=Ya(i,l[s])}return r}return sC(n,[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput(),this.props.menuIsOpen&&this.state.focusedOption&&this.menuListRef&&this.focusedOptionRef&&Md(this.menuListRef,this.focusedOptionRef)}},{key:"componentDidUpdate",value:function(o){var r=this.props,i=r.isDisabled,l=r.menuIsOpen,s=this.state.isFocused;(s&&!i&&o.isDisabled||s&&l&&!o.menuIsOpen)&&this.focusInput(),s&&i&&!o.isDisabled?this.setState({isFocused:!1},this.onMenuClose):!s&&!i&&o.isDisabled&&this.inputRef===document.activeElement&&this.setState({isFocused:!0}),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(Md(this.menuListRef,this.focusedOptionRef),this.scrollToFocusedOptionOnUpdate=!1)}},{key:"componentWillUnmount",value:function(){this.stopListeningComposition(),this.stopListeningToTouch(),document.removeEventListener("scroll",this.onScroll,!0)}},{key:"onMenuOpen",value:function(){this.props.onMenuOpen()}},{key:"onMenuClose",value:function(){this.onInputChange("",{action:"menu-close",prevInputValue:this.props.inputValue}),this.props.onMenuClose()}},{key:"onInputChange",value:function(o,r){this.props.onInputChange(o,r)}},{key:"focusInput",value:function(){this.inputRef&&this.inputRef.focus()}},{key:"blurInput",value:function(){this.inputRef&&this.inputRef.blur()}},{key:"openMenu",value:function(o){var r=this,i=this.state,l=i.selectValue,s=i.isFocused,a=this.buildFocusableOptions(),c=o==="first"?0:a.length-1;if(!this.props.isMulti){var u=a.indexOf(l[0]);u>-1&&(c=u)}this.scrollToFocusedOptionOnUpdate=!(s&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:a[c],focusedOptionId:this.getFocusedOptionId(a[c])},function(){return r.onMenuOpen()})}},{key:"focusValue",value:function(o){var r=this.state,i=r.selectValue,l=r.focusedValue;if(this.props.isMulti){this.setState({focusedOption:null});var s=i.indexOf(l);l||(s=-1);var a=i.length-1,c=-1;if(i.length){switch(o){case"previous":s===0?c=0:s===-1?c=a:c=s-1;break;case"next":s>-1&&s<a&&(c=s+1);break}this.setState({inputIsHidden:c!==-1,focusedValue:i[c]})}}}},{key:"focusOption",value:function(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"first",r=this.props.pageSize,i=this.state.focusedOption,l=this.getFocusableOptions();if(l.length){var s=0,a=l.indexOf(i);i||(a=-1),o==="up"?s=a>0?a-1:l.length-1:o==="down"?s=(a+1)%l.length:o==="pageup"?(s=a-r,s<0&&(s=0)):o==="pagedown"?(s=a+r,s>l.length-1&&(s=l.length-1)):o==="last"&&(s=l.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:l[s],focusedValue:null,focusedOptionId:this.getFocusedOptionId(l[s])})}}},{key:"getTheme",value:function(){return this.props.theme?typeof this.props.theme=="function"?this.props.theme(Ua):We(We({},Ua),this.props.theme):Ua}},{key:"getCommonProps",value:function(){var o=this.clearValue,r=this.cx,i=this.getStyles,l=this.getClassNames,s=this.getValue,a=this.selectOption,c=this.setValue,u=this.props,d=u.isMulti,f=u.isRtl,h=u.options,g=this.hasValue();return{clearValue:o,cx:r,getStyles:i,getClassNames:l,getValue:s,hasValue:g,isMulti:d,isRtl:f,options:h,selectOption:a,selectProps:u,setValue:c,theme:this.getTheme()}}},{key:"hasValue",value:function(){var o=this.state.selectValue;return o.length>0}},{key:"hasOptions",value:function(){return!!this.getFocusableOptions().length}},{key:"isClearable",value:function(){var o=this.props,r=o.isClearable,i=o.isMulti;return r===void 0?i:r}},{key:"isOptionDisabled",value:function(o,r){return oh(this.props,o,r)}},{key:"isOptionSelected",value:function(o,r){return rh(this.props,o,r)}},{key:"filterOption",value:function(o,r){return ih(this.props,o,r)}},{key:"formatOptionLabel",value:function(o,r){if(typeof this.props.formatOptionLabel=="function"){var i=this.props.inputValue,l=this.state.selectValue;return this.props.formatOptionLabel(o,{context:r,inputValue:i,selectValue:l})}else return this.getOptionLabel(o)}},{key:"formatGroupLabel",value:function(o){return this.props.formatGroupLabel(o)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"renderInput",value:function(){var o=this.props,r=o.isDisabled,i=o.isSearchable,l=o.inputId,s=o.inputValue,a=o.tabIndex,c=o.form,u=o.menuIsOpen,d=o.required,f=this.getComponents(),h=f.Input,g=this.state,m=g.inputIsHidden,b=g.ariaSelection,y=this.commonProps,v=l||this.getElementId("input"),I=We(We(We({"aria-autocomplete":"list","aria-expanded":u,"aria-haspopup":!0,"aria-errormessage":this.props["aria-errormessage"],"aria-invalid":this.props["aria-invalid"],"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],"aria-required":d,role:"combobox","aria-activedescendant":this.isAppleDevice?void 0:this.state.focusedOptionId||""},u&&{"aria-controls":this.getElementId("listbox")}),!i&&{"aria-readonly":!0}),this.hasValue()?(b==null?void 0:b.action)==="initial-input-focus"&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return i?p.createElement(h,Ke({},y,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:v,innerRef:this.getInputRef,isDisabled:r,isHidden:m,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:a,form:c,type:"text",value:s},I)):p.createElement(Kb,Ke({id:v,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:Gi,onFocus:this.onInputFocus,disabled:r,tabIndex:a,inputMode:"none",form:c,value:""},I))}},{key:"renderPlaceholderOrValue",value:function(){var o=this,r=this.getComponents(),i=r.MultiValue,l=r.MultiValueContainer,s=r.MultiValueLabel,a=r.MultiValueRemove,c=r.SingleValue,u=r.Placeholder,d=this.commonProps,f=this.props,h=f.controlShouldRenderValue,g=f.isDisabled,m=f.isMulti,b=f.inputValue,y=f.placeholder,v=this.state,I=v.selectValue,T=v.focusedValue,k=v.isFocused;if(!this.hasValue()||!h)return b?null:p.createElement(u,Ke({},d,{key:"placeholder",isDisabled:g,isFocused:k,innerProps:{id:this.getElementId("placeholder")}}),y);if(m)return I.map(function(L,O){var R=L===T,P="".concat(o.getOptionLabel(L),"-").concat(o.getOptionValue(L));return p.createElement(i,Ke({},d,{components:{Container:l,Label:s,Remove:a},isFocused:R,isDisabled:g,key:P,index:O,removeProps:{onClick:function(){return o.removeValue(L)},onTouchEnd:function(){return o.removeValue(L)},onMouseDown:function(M){M.preventDefault()}},data:L}),o.formatOptionLabel(L,"value"))});if(b)return null;var x=I[0];return p.createElement(c,Ke({},d,{data:x,isDisabled:g}),this.formatOptionLabel(x,"value"))}},{key:"renderClearIndicator",value:function(){var o=this.getComponents(),r=o.ClearIndicator,i=this.commonProps,l=this.props,s=l.isDisabled,a=l.isLoading,c=this.state.isFocused;if(!this.isClearable()||!r||s||!this.hasValue()||a)return null;var u={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return p.createElement(r,Ke({},i,{innerProps:u,isFocused:c}))}},{key:"renderLoadingIndicator",value:function(){var o=this.getComponents(),r=o.LoadingIndicator,i=this.commonProps,l=this.props,s=l.isDisabled,a=l.isLoading,c=this.state.isFocused;if(!r||!a)return null;var u={"aria-hidden":"true"};return p.createElement(r,Ke({},i,{innerProps:u,isDisabled:s,isFocused:c}))}},{key:"renderIndicatorSeparator",value:function(){var o=this.getComponents(),r=o.DropdownIndicator,i=o.IndicatorSeparator;if(!r||!i)return null;var l=this.commonProps,s=this.props.isDisabled,a=this.state.isFocused;return p.createElement(i,Ke({},l,{isDisabled:s,isFocused:a}))}},{key:"renderDropdownIndicator",value:function(){var o=this.getComponents(),r=o.DropdownIndicator;if(!r)return null;var i=this.commonProps,l=this.props.isDisabled,s=this.state.isFocused,a={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return p.createElement(r,Ke({},i,{innerProps:a,isDisabled:l,isFocused:s}))}},{key:"renderMenu",value:function(){var o=this,r=this.getComponents(),i=r.Group,l=r.GroupHeading,s=r.Menu,a=r.MenuList,c=r.MenuPortal,u=r.LoadingMessage,d=r.NoOptionsMessage,f=r.Option,h=this.commonProps,g=this.state.focusedOption,m=this.props,b=m.captureMenuScroll,y=m.inputValue,v=m.isLoading,I=m.loadingMessage,T=m.minMenuHeight,k=m.maxMenuHeight,x=m.menuIsOpen,L=m.menuPlacement,O=m.menuPosition,R=m.menuPortalTarget,P=m.menuShouldBlockScroll,M=m.menuShouldScrollIntoView,S=m.noOptionsMessage,E=m.onMenuScrollToTop,D=m.onMenuScrollToBottom;if(!x)return null;var C=function(U,re){var se=U.type,de=U.data,fe=U.isDisabled,Q=U.isSelected,N=U.label,z=U.value,j=g===de,ge=fe?void 0:function(){return o.onOptionHover(de)},ke=fe?void 0:function(){return o.selectOption(de)},Fe="".concat(o.getElementId("option"),"-").concat(re),xe={id:Fe,onClick:ke,onMouseMove:ge,onMouseOver:ge,tabIndex:-1,role:"option","aria-selected":o.isAppleDevice?void 0:Q};return p.createElement(f,Ke({},h,{innerProps:xe,data:de,isDisabled:fe,isSelected:Q,key:Fe,label:N,type:se,value:z,isFocused:j,innerRef:j?o.getFocusedOptionRef:void 0}),o.formatOptionLabel(U.data,"menu"))},X;if(this.hasOptions())X=this.getCategorizedOptions().map(function(U){if(U.type==="group"){var re=U.data,se=U.options,de=U.index,fe="".concat(o.getElementId("group"),"-").concat(de),Q="".concat(fe,"-heading");return p.createElement(i,Ke({},h,{key:fe,data:re,options:se,Heading:l,headingProps:{id:Q,data:U.data},label:o.formatGroupLabel(U.data)}),U.options.map(function(N){return C(N,"".concat(de,"-").concat(N.index))}))}else if(U.type==="option")return C(U,"".concat(U.index))});else if(v){var B=I({inputValue:y});if(B===null)return null;X=p.createElement(u,h,B)}else{var J=S({inputValue:y});if(J===null)return null;X=p.createElement(d,h,J)}var ae={minMenuHeight:T,maxMenuHeight:k,menuPlacement:L,menuPosition:O,menuShouldScrollIntoView:M},ne=p.createElement(I1,Ke({},h,ae),function(U){var re=U.ref,se=U.placerProps,de=se.placement,fe=se.maxHeight;return p.createElement(s,Ke({},h,ae,{innerRef:re,innerProps:{onMouseDown:o.onMenuMouseDown,onMouseMove:o.onMenuMouseMove},isLoading:v,placement:de}),p.createElement(tw,{captureEnabled:b,onTopArrive:E,onBottomArrive:D,lockEnabled:P},function(Q){return p.createElement(a,Ke({},h,{innerRef:function(N){o.getMenuListRef(N),Q(N)},innerProps:{role:"listbox","aria-multiselectable":h.isMulti,id:o.getElementId("listbox")},isLoading:v,maxHeight:fe,focusedOption:g}),X)}))});return R||O==="fixed"?p.createElement(c,Ke({},h,{appendTo:R,controlElement:this.controlRef,menuPlacement:L,menuPosition:O}),ne):ne}},{key:"renderFormField",value:function(){var o=this,r=this.props,i=r.delimiter,l=r.isDisabled,s=r.isMulti,a=r.name,c=r.required,u=this.state.selectValue;if(c&&!this.hasValue()&&!l)return p.createElement(rw,{name:a,onFocus:this.onValueInputFocus});if(!(!a||l))if(s)if(i){var d=u.map(function(g){return o.getOptionValue(g)}).join(i);return p.createElement("input",{name:a,type:"hidden",value:d})}else{var f=u.length>0?u.map(function(g,m){return p.createElement("input",{key:"i-".concat(m),name:a,type:"hidden",value:o.getOptionValue(g)})}):p.createElement("input",{name:a,type:"hidden",value:""});return p.createElement("div",null,f)}else{var h=u[0]?this.getOptionValue(u[0]):"";return p.createElement("input",{name:a,type:"hidden",value:h})}}},{key:"renderLiveRegion",value:function(){var o=this.commonProps,r=this.state,i=r.ariaSelection,l=r.focusedOption,s=r.focusedValue,a=r.isFocused,c=r.selectValue,u=this.getFocusableOptions();return p.createElement(Wb,Ke({},o,{id:this.getElementId("live-region"),ariaSelection:i,focusedOption:l,focusedValue:s,isFocused:a,selectValue:c,focusableOptions:u,isAppleDevice:this.isAppleDevice}))}},{key:"render",value:function(){var o=this.getComponents(),r=o.Control,i=o.IndicatorsContainer,l=o.SelectContainer,s=o.ValueContainer,a=this.props,c=a.className,u=a.id,d=a.isDisabled,f=a.menuIsOpen,h=this.state.isFocused,g=this.commonProps=this.getCommonProps();return p.createElement(l,Ke({},g,{className:c,innerProps:{id:u,onKeyDown:this.onKeyDown},isDisabled:d,isFocused:h}),this.renderLiveRegion(),p.createElement(r,Ke({},g,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:d,isFocused:h,menuIsOpen:f}),p.createElement(s,Ke({},g,{isDisabled:d}),this.renderPlaceholderOrValue(),this.renderInput()),p.createElement(i,Ke({},g,{isDisabled:d}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],[{key:"getDerivedStateFromProps",value:function(o,r){var i=r.prevProps,l=r.clearFocusValueOnUpdate,s=r.inputIsHiddenAfterUpdate,a=r.ariaSelection,c=r.isFocused,u=r.prevWasFocused,d=r.instancePrefix,f=o.options,h=o.value,g=o.menuIsOpen,m=o.inputValue,b=o.isMulti,y=Cd(h),v={};if(i&&(h!==i.value||f!==i.options||g!==i.menuIsOpen||m!==i.inputValue)){var I=g?yw(o,y):[],T=g?eh(el(o,y),"".concat(d,"-option")):[],k=l?xw(r,y):null,x=Cw(r,I),L=Ya(T,x);v={selectValue:y,focusedOption:x,focusedOptionId:L,focusableOptionsWithIds:T,focusedValue:k,clearFocusValueOnUpdate:!1}}var O=s!=null&&o!==i?{inputIsHidden:s,inputIsHiddenAfterUpdate:void 0}:{},R=a,P=c&&u;return c&&!P&&(R={value:Qi(b,y,y[0]||null),options:y,action:"initial-input-focus"},P=!u),(a==null?void 0:a.action)==="initial-input-focus"&&(R=null),We(We(We({},v),O),{},{prevProps:o,ariaSelection:R,prevWasFocused:P})}}]),n}(p.Component);ah.defaultProps=ww;var Sw=p.forwardRef(function(e,t){var n=Iv(e);return p.createElement(ah,Ke({ref:t},n))}),Mw=Sw;const Rw=e=>{const{Menu:t}=Fd,{children:n,...o}=e;return p.createElement(t,{...o},n)},Ew=cn("div")({name:"Wrap",class:"gdg-wghi2zc",propsAsIs:!1}),Iw=cn("div")({name:"PortalWrap",class:"gdg-p13nj8j0",propsAsIs:!1}),Tw=cn("div")({name:"ReadOnlyWrap",class:"gdg-r6sia3g",propsAsIs:!1}),Ow=e=>{const{value:t,onFinishedEditing:n,initialValue:o}=e,{allowedValues:r,value:i}=t.data,[l,s]=p.useState(i),[a,c]=p.useState(o??""),u=Mp(),d=p.useMemo(()=>r.map(f=>typeof f=="string"||f===null||f===void 0?{value:f,label:(f==null?void 0:f.toString())??""}:f),[r]);return t.readonly?p.createElement(Tw,null,p.createElement(No,{highlight:!0,autoFocus:!1,disabled:!0,value:l??"",onChange:()=>{}})):p.createElement(Ew,null,p.createElement(Mw,{className:"glide-select",inputValue:a,onInputChange:c,menuPlacement:"auto",value:d.find(f=>f.value===l),styles:{control:f=>({...f,border:0,boxShadow:"none"}),option:(f,{isFocused:h})=>({...f,fontSize:u.editorFontSize,fontFamily:u.fontFamily,cursor:h?"pointer":void 0,paddingLeft:u.cellHorizontalPadding,paddingRight:u.cellHorizontalPadding,":active":{...f[":active"],color:u.accentFg},":empty::after":{content:'"&nbsp;"',visibility:"hidden"}})},theme:f=>({...f,colors:{...f.colors,neutral0:u.bgCell,neutral5:u.bgCell,neutral10:u.bgCell,neutral20:u.bgCellMedium,neutral30:u.bgCellMedium,neutral40:u.bgCellMedium,neutral50:u.textLight,neutral60:u.textMedium,neutral70:u.textMedium,neutral80:u.textDark,neutral90:u.textDark,neutral100:u.textDark,primary:u.accentColor,primary75:u.accentColor,primary50:u.accentColor,primary25:u.accentLight}}),menuPortalTarget:document.getElementById("portal"),autoFocus:!0,openMenuOnFocus:!0,components:{DropdownIndicator:()=>null,IndicatorSeparator:()=>null,Menu:f=>p.createElement(Iw,null,p.createElement(Rw,{className:"click-outside-ignore",...f}))},options:d,onChange:async f=>{f!==null&&(s(f.value),await new Promise(h=>window.requestAnimationFrame(h)),n({...t,data:{...t.data,value:f.value}}))}}))},Dw={kind:Z.Custom,isMatch:e=>e.data.kind==="dropdown-cell",draw:(e,t)=>{const{ctx:n,theme:o,rect:r}=e,{value:i}=t.data,l=t.data.allowedValues.find(a=>typeof a=="string"||a===null||a===void 0?a===i:a.value===i),s=typeof l=="string"?l:(l==null?void 0:l.label)??"";return s&&(n.fillStyle=o.textDark,n.fillText(s,r.x+o.cellHorizontalPadding,r.y+r.height/2+eo(n,o))),!0},measure:(e,t,n)=>{const{value:o}=t.data;return(o?e.measureText(o).width:0)+n.cellHorizontalPadding*2},provideEditor:()=>({editor:Ow,disablePadding:!0,deletedValue:e=>({...e,copyData:"",data:{...e.data,value:""}})}),onPaste:(e,t)=>({...t,value:t.allowedValues.includes(e)?e:t.value})},jo=6,zw={marginRight:8},Lw={display:"flex",alignItems:"center",flexGrow:1},Pw={kind:Z.Custom,isMatch:e=>e.data.kind==="range-cell",draw:(e,t)=>{const{ctx:n,theme:o,rect:r}=e,{min:i,max:l,value:s,label:a,measureLabel:c}=t.data,u=r.x+o.cellHorizontalPadding,d=r.y+r.height/2,f=l-i,h=(s-i)/f;n.save();let g=0;a!==void 0&&(n.font=`12px ${o.fontFamily}`,g=$o(c??a,n,`12px ${o.fontFamily}`).width+o.cellHorizontalPadding);const m=r.width-o.cellHorizontalPadding*2-g;if(m>=jo){const b=n.createLinearGradient(u,d,u+m,d);b.addColorStop(0,o.accentColor),b.addColorStop(h,o.accentColor),b.addColorStop(h,o.bgBubble),b.addColorStop(1,o.bgBubble),n.beginPath(),n.fillStyle=b,cd(n,u,d-jo/2,m,jo,jo/2),n.fill(),n.beginPath(),cd(n,u+.5,d-jo/2+.5,m-1,jo-1,(jo-1)/2),n.strokeStyle=o.accentLight,n.lineWidth=1,n.stroke()}return a!==void 0&&(n.textAlign="right",n.fillStyle=o.textDark,n.fillText(a,r.x+r.width-o.cellHorizontalPadding,d+eo(n,`12px ${o.fontFamily}`))),n.restore(),!0},provideEditor:()=>e=>{const{data:t,readonly:n}=e.value,o=t.value.toString(),r=t.min.toString(),i=t.max.toString(),l=t.step.toString(),s=a=>{e.onChange({...e.value,data:{...t,value:Number(a.target.value)}})};return p.createElement("label",{style:Lw},p.createElement("input",{style:zw,type:"range",value:o,min:r,max:i,step:l,onChange:s,disabled:n}),o)},onPaste:(e,t)=>{let n=Number.parseFloat(e);return n=Number.isNaN(n)?t.value:Math.max(t.min,Math.min(t.max,n)),{...t,value:n}}},Hw=cn("input")({name:"StyledInputBox",class:"gdg-s1wtovjx",propsAsIs:!1}),Xa=(e,t)=>{if(t==null)return"";const n=t.toISOString();switch(e){case"date":return n.split("T")[0];case"datetime-local":return n.replace("Z","");case"time":return n.split("T")[1].replace("Z","");default:throw new Error(`Unknown date kind ${e}`)}},Aw=e=>{const t=e.value.data,{format:n,displayDate:o}=t,r=t.step!==void 0&&!Number.isNaN(Number(t.step))?Number(t.step):void 0,i=t.min instanceof Date?Xa(n,t.min):t.min,l=t.max instanceof Date?Xa(n,t.max):t.max;let s=t.date;const a=t.timezoneOffset?t.timezoneOffset*60*1e3:0;a&&s&&(s=new Date(s.getTime()+a));const c=Xa(n,s);return e.value.readonly?te.createElement(No,{highlight:!0,autoFocus:!1,disabled:!0,value:o??"",onChange:()=>{}}):te.createElement(Hw,{"data-testid":"date-picker-cell",required:!0,type:n,defaultValue:c,min:i,max:l,step:r,autoFocus:!0,onChange:u=>{isNaN(u.target.valueAsNumber)?e.onChange({...e.value,data:{...e.value.data,date:void 0}}):e.onChange({...e.value,data:{...e.value.data,date:new Date(u.target.valueAsNumber-a)}})}})},Fw={kind:Z.Custom,isMatch:e=>e.data.kind==="date-picker-cell",draw:(e,t)=>{const{displayDate:n}=t.data;return Yl(e,n,t.contentAlign),!0},measure:(e,t,n)=>{const{displayDate:o}=t.data;return e.measureText(o).width+n.cellHorizontalPadding*2},provideEditor:()=>({editor:Aw}),onPaste:(e,t)=>{let n=NaN;return e&&(n=Number(e).valueOf(),Number.isNaN(n)&&(n=Date.parse(e),t.format==="time"&&Number.isNaN(n)&&(n=Date.parse(`1970-01-01T${e}Z`)))),{...t,date:Number.isNaN(n)?void 0:new Date(n)}}},_w="None";function sh(e,t,n){e.save(),e.beginPath(),e.moveTo(t.x+t.width-8,t.y+1),e.lineTo(t.x+t.width,t.y+1),e.lineTo(t.x+t.width,t.y+1+8),e.fillStyle=n.accentColor,e.fill(),e.restore()}const Nw=e=>{const{cell:t,theme:n,ctx:o}=e;Yl({...e,theme:{...n,textDark:n.textLight,headerFontFull:`${n.headerFontStyle} ${n.fontFamily}`,baseFontFull:`${n.baseFontStyle} ${n.fontFamily}`,markerFontFull:`${n.markerFontStyle} ${n.fontFamily}`}},_w,t.contentAlign),o.fillStyle=n.textDark};function Bw(e){const t=te.useCallback((o,r)=>{const{cell:i,theme:l,ctx:s,rect:a}=o,c=o.col;if(lr(i))sh(s,a,l);else if(Fi(i)&&c<e.length){const u=e[c];["checkbox","line_chart","bar_chart","progress"].includes(u.kind)?r():Nw(o),u.isRequired&&u.isEditable&&sh(s,a,l);return}r()},[e]),n=te.useMemo(()=>[Rv,Dw,Pw,Fw,...ev],[]);return{drawCell:t,customRenderers:n}}function Vw(){const e=Jo();return te.useMemo(()=>{const t={editable:n=>`<svg xmlns="http://www.w3.org/2000/svg" height="40" viewBox="0 96 960 960" width="40" fill="${n.bgColor}"><path d="m800.641 679.743-64.384-64.384 29-29q7.156-6.948 17.642-6.948 10.485 0 17.742 6.948l29 29q6.948 7.464 6.948 17.95 0 10.486-6.948 17.434l-29 29Zm-310.64 246.256v-64.383l210.82-210.821 64.384 64.384-210.821 210.82h-64.383Zm-360-204.872v-50.254h289.743v50.254H130.001Zm0-162.564v-50.255h454.615v50.255H130.001Zm0-162.307v-50.255h454.615v50.255H130.001Z"/></svg>`};return{glideTheme:{accentColor:e.colors.primary,accentFg:e.colors.white,accentLight:Sl(e.colors.primary,.9),borderColor:e.colors.borderColorLight,horizontalBorderColor:e.colors.borderColorLight,fontFamily:e.genericFonts.bodyFont,bgSearchResult:Sl(e.colors.primary,.9),resizeIndicatorColor:e.colors.primary,bgIconHeader:e.colors.fadedText60,fgIconHeader:e.colors.white,bgHeader:e.colors.bgMix,bgHeaderHasFocus:e.colors.darkenedBgMix15,bgHeaderHovered:e.colors.darkenedBgMix15,textHeader:e.colors.fadedText60,textHeaderSelected:e.colors.white,textGroupHeader:e.colors.fadedText60,headerFontStyle:`${Vn(e.fontSizes.sm)}px`,baseFontStyle:`${Vn(e.fontSizes.sm)}px`,editorFontSize:e.fontSizes.sm,textDark:e.colors.bodyText,textMedium:Sl(e.colors.bodyText,.2),textLight:e.colors.fadedText40,textBubble:e.colors.fadedText60,bgCell:e.colors.bgColor,bgCellMedium:e.colors.bgColor,cellHorizontalPadding:Math.round(Vn(e.spacing.sm)),cellVerticalPadding:Math.round(Vn("0.1875rem")),bgBubble:e.colors.secondaryBg,bgBubbleSelected:e.colors.secondaryBg,linkColor:e.colors.link,drilldownBorder:e.colors.darkenedBgMix25},tableBorderRadius:e.radii.default,tableBorderWidth:1,defaultTableHeight:Math.round(Vn("25rem")),minColumnWidth:Math.round(Vn("3.125rem")),maxColumnWidth:Math.round(Vn("62.5rem")),maxColumnAutoWidth:Math.round(Vn("31.25rem")),defaultRowHeight:Math.round(Vn("2.1875rem")),defaultHeaderHeight:Math.round(Vn("2.1875rem")),bgRowHovered:$x(e.colors.bgColor,e.colors.secondaryBg,.3),headerIcons:t}},[e])}const $w=ys.getLogger("useDataEditor");function Ww(e,t,n,o,r,i,l,s,a){const c=te.useCallback(([m,b],y)=>{const v=e[m];if(!v.isEditable)return;const I=v.indexNumber,T=n.current.getOriginalRowIndex(r(b)),k=o([m,b]),x=v.getCellValue(k),L=v.getCellValue(y);if(!lr(k)&&L===x)return;const O=v.getCell(L,!0);lr(O)?$w.warn(`Not applying the cell edit since it causes this error:
186
186
  ${O.data}`):(n.current.setCell(I,T,{...O,lastUpdated:performance.now()}),s())},[e,n,r,o,s]),u=te.useCallback(()=>{if(t)return;const m=new Map;e.forEach(b=>{m.set(b.indexNumber,b.getCell(b.defaultValue))}),n.current.addRow(m),l()},[e,n,t,l]),d=te.useCallback(()=>{t||(u(),s())},[u,s,t]),f=te.useCallback(m=>{var b;if(m.rows.length>0){if(t)return!0;const y=m.rows.toArray().map(v=>n.current.getOriginalRowIndex(r(v)));return n.current.deleteRows(y),l(),a(),s(),!1}if((b=m.current)!=null&&b.range){const y=[],v=m.current.range;for(let I=v.y;I<v.y+v.height;I++)for(let T=v.x;T<v.x+v.width;T++){const k=e[T];k.isEditable&&!k.isRequired&&(y.push({cell:[T,I]}),c([T,I],k.getCell(null)))}return y.length>0&&(s(),i(y)),!1}return!0},[e,n,t,i,r,s,c,a,l]),h=te.useCallback((m,b)=>{const[y,v]=m,I=[];for(let T=0;T<b.length;T++){const k=b[T];if(T+v>=n.current.getNumRows()){if(t)break;u()}for(let x=0;x<k.length;x++){const L=k[x],O=T+v,R=x+y;if(R>=e.length)break;const P=e[R];if(P.isEditable){const M=P.getCell(L,!0);if(mt(M)&&!lr(M)){const S=P.indexNumber,E=n.current.getOriginalRowIndex(r(O)),D=P.getCellValue(o([R,O]));P.getCellValue(M)!==D&&(n.current.setCell(S,E,{...M,lastUpdated:performance.now()}),I.push({cell:[R,O]}))}}}I.length>0&&(s(),i(I))}return!1},[e,n,t,r,o,u,s,i]),g=te.useCallback((m,b)=>{const y=m[0];if(y>=e.length)return!0;const v=e[y];if(v.validateInput){const I=v.validateInput(v.getCellValue(b));return I===!0||I===!1?I:v.getCell(I)}return!0},[e]);return{onCellEdited:c,onPaste:h,onRowAppended:d,onDelete:f,validateCell:g}}const ch=",",ei='"',jw='"',uh=`
187
- `,Uw="\uFEFF",Yw=new RegExp(`[${[ch,ei,uh].join("")}]`),dh=ys.getLogger("useDataExporter");function hh(e){return e.map(t=>Xw(t)).join(ch)+uh}function Xw(e){if(Ve(e))return"";const t=bt(e);return Yw.test(t)?`${ei}${t.replace(new RegExp(ei,"g"),jw+ei)}${ei}`:t}async function fh(e,t,n,o){const r=new TextEncoder;await e.write(r.encode(Uw));const i=n.map(l=>l.name);await e.write(r.encode(hh(i)));for(let l=0;l<o;l++){const s=[];n.forEach((a,c,u)=>{s.push(a.getCellValue(t([c,l])))}),await e.write(r.encode(hh(s)))}await e.close()}function Gw(e,t,n,o){return{exportToCsv:te.useCallback(async()=>{const r=`${new Date().toISOString().slice(0,16).replace(":","-")}_export.csv`;try{const i=await(await(await vs(()=>import("./es6-Ca0BcWDW.js").then(async l=>(await l.__tla,l)).then(l=>l.a),__vite__mapDeps([15,1,2]))).showSaveFilePicker({suggestedName:r,types:[{accept:{"text/csv":[".csv"]}}],excludeAcceptAllOption:!1})).createWritable();await fh(i,e,t,n)}catch(i){if(i instanceof Error&&i.name==="AbortError")return;try{dh.warn("Failed to export data as CSV with FileSystem API, trying fallback method",i);let l="";const s=new WritableStream({write:async d=>{l+=new TextDecoder("utf-8").decode(d)},close:async()=>{}});await fh(s.getWriter(),e,t,n);const a=new Blob([l],{type:"text/csv;charset=utf-8;"}),c=URL.createObjectURL(a),u=iC({enforceDownloadInNewTab:o,url:c,filename:r});u.style.display="none",document.body.appendChild(u),u.click(),document.body.removeChild(u),URL.revokeObjectURL(c)}catch(l){dh.error("Failed to export data as CSV",l)}}},[t,n,e,o])}}function Kw(e,t,n,o){return{getCellContent:te.useCallback(([r,i])=>{var l;if(r>t.length-1)return Lt("Column index out of bounds","This error should never happen. Please report this bug.");if(i>n-1)return Lt("Row index out of bounds","This error should never happen. Please report this bug.");try{const s=t[r],a=s.indexNumber,c=o.current.getOriginalRowIndex(i),u=o.current.isAddedRow(c);if(s.isEditable||u){const h=o.current.getCell(a,c);if(mt(h))return{...s.getCell(s.getCellValue(h),!1),lastUpdated:h.lastUpdated};if(u)return Lt("Error during cell creation",`This error should never happen. Please report this bug. No cell found for an added row: col=${a}; row=${c}`)}const d=e.getCell(c,a),f=Wx(e,c,a);return uv(s,d,f,(l=e.styler)==null?void 0:l.cssStyles)}catch(s){return Lt("Error during cell creation",`This error should never happen. Please report this bug.
187
+ `,Uw="\uFEFF",Yw=new RegExp(`[${[ch,ei,uh].join("")}]`),dh=ys.getLogger("useDataExporter");function hh(e){return e.map(t=>Xw(t)).join(ch)+uh}function Xw(e){if(Ve(e))return"";const t=bt(e);return Yw.test(t)?`${ei}${t.replace(new RegExp(ei,"g"),jw+ei)}${ei}`:t}async function fh(e,t,n,o){const r=new TextEncoder;await e.write(r.encode(Uw));const i=n.map(l=>l.name);await e.write(r.encode(hh(i)));for(let l=0;l<o;l++){const s=[];n.forEach((a,c,u)=>{s.push(a.getCellValue(t([c,l])))}),await e.write(r.encode(hh(s)))}await e.close()}function Gw(e,t,n,o){return{exportToCsv:te.useCallback(async()=>{const r=`${new Date().toISOString().slice(0,16).replace(":","-")}_export.csv`;try{const i=await(await(await vs(()=>import("./es6-eSFIFIhE.js").then(async l=>(await l.__tla,l)).then(l=>l.a),__vite__mapDeps([15,1,2]))).showSaveFilePicker({suggestedName:r,types:[{accept:{"text/csv":[".csv"]}}],excludeAcceptAllOption:!1})).createWritable();await fh(i,e,t,n)}catch(i){if(i instanceof Error&&i.name==="AbortError")return;try{dh.warn("Failed to export data as CSV with FileSystem API, trying fallback method",i);let l="";const s=new WritableStream({write:async d=>{l+=new TextDecoder("utf-8").decode(d)},close:async()=>{}});await fh(s.getWriter(),e,t,n);const a=new Blob([l],{type:"text/csv;charset=utf-8;"}),c=URL.createObjectURL(a),u=iC({enforceDownloadInNewTab:o,url:c,filename:r});u.style.display="none",document.body.appendChild(u),u.click(),document.body.removeChild(u),URL.revokeObjectURL(c)}catch(l){dh.error("Failed to export data as CSV",l)}}},[t,n,e,o])}}function Kw(e,t,n,o){return{getCellContent:te.useCallback(([r,i])=>{var l;if(r>t.length-1)return Lt("Column index out of bounds","This error should never happen. Please report this bug.");if(i>n-1)return Lt("Row index out of bounds","This error should never happen. Please report this bug.");try{const s=t[r],a=s.indexNumber,c=o.current.getOriginalRowIndex(i),u=o.current.isAddedRow(c);if(s.isEditable||u){const h=o.current.getCell(a,c);if(mt(h))return{...s.getCell(s.getCellValue(h),!1),lastUpdated:h.lastUpdated};if(u)return Lt("Error during cell creation",`This error should never happen. Please report this bug. No cell found for an added row: col=${a}; row=${c}`)}const d=e.getCell(c,a),f=Wx(e,c,a);return uv(s,d,f,(l=e.styler)==null?void 0:l.cssStyles)}catch(s){return Lt("Error during cell creation",`This error should never happen. Please report this bug.
188
188
  Error: ${s}`)}},[t,n,e,o])}}function qw(e){const[t,n]=te.useState(void 0),o=te.useCallback(r=>{if(r.kind!=="cell")n(void 0);else{const[,i]=r.location;n(i)}},[n]);return{getRowThemeOverride:te.useCallback(r=>{if(r===t)return{bgCell:e.bgRowHovered,bgCellMedium:e.bgRowHovered}},[e.bgRowHovered,t]),onItemHovered:o}}function Zw(e,t,n,o,r){const[i,l]=te.useState({columns:vt.empty(),rows:vt.empty(),current:void 0}),s=!t&&!n&&(e.selectionMode.includes(En.SelectionMode.MULTI_ROW)||e.selectionMode.includes(En.SelectionMode.SINGLE_ROW)),a=s&&e.selectionMode.includes(En.SelectionMode.MULTI_ROW),c=!t&&!n&&(e.selectionMode.includes(En.SelectionMode.SINGLE_COLUMN)||e.selectionMode.includes(En.SelectionMode.MULTI_COLUMN)),u=c&&e.selectionMode.includes(En.SelectionMode.MULTI_COLUMN),d=i.rows.length>0,f=i.columns.length>0,h=i.current!==void 0,g=te.useCallback(b=>{const y=!ks(b.rows.toArray(),i.rows.toArray()),v=!ks(b.columns.toArray(),i.columns.toArray()),I=!ks(b.current,i.current);let T=s&&y||c&&v,k=b;if((s||c)&&b.current!==void 0&&I&&(k={...b,rows:i.rows,columns:i.columns},T=!1),y&&b.rows.length>0&&v&&b.columns.length===0&&(k={...k,columns:i.columns},T=!0),v&&b.columns.length>0&&y&&b.rows.length===0&&(k={...k,rows:i.rows},T=!0),v&&k.columns.length>=0){let x=k.columns;o.forEach((L,O)=>{L.isIndex&&(x=x.remove(O))}),x.length<k.columns.length&&(k={...k,columns:x})}l(k),T&&r(k)},[i,s,c,r,o]),m=te.useCallback((b=!1,y=!1)=>{const v={columns:y?i.columns:vt.empty(),rows:b?i.rows:vt.empty(),current:void 0};l(v),(!b&&s||!y&&c)&&r(v)},[i,s,c,r]);return{gridSelection:i,isRowSelectionActivated:s,isMultiRowSelectionActivated:a,isColumnSelectionActivated:c,isMultiColumnSelectionActivated:u,isRowSelected:d,isColumnSelected:f,isCellSelected:h,clearSelection:m,processSelectionChange:g}}function Jw(e,t,n,o,r,i,l){const s=e.rowHeight??t.defaultRowHeight,a=t.defaultHeaderHeight+s+2*t.tableBorderWidth,c=o?2:1,u=e.editingMode===En.EditingMode.DYNAMIC?1:0,d=n+u;let f=Math.max(d*s+c*t.defaultHeaderHeight+2*t.tableBorderWidth,a),h=Math.min(f,t.defaultTableHeight);e.height&&(h=Math.max(e.height,a),f=Math.max(e.height,f)),i&&(h=Math.min(h,i),f=Math.min(f,i),e.height||(h=f));const g=t.minColumnWidth+2*t.tableBorderWidth,m=Math.max(r,g);let b,y=m;e.useContainerWidth?b=m:e.width&&(b=Math.min(Math.max(e.width,g),m),y=Math.min(Math.max(e.width,y),m));const[v,I]=te.useState({width:b||"100%",height:h});return te.useLayoutEffect(()=>{e.useContainerWidth&&v.width==="100%"&&I(T=>({...T,width:m}))},[m]),te.useLayoutEffect(()=>{I(T=>({...T,width:b||"100%"}))},[b]),te.useLayoutEffect(()=>{I(T=>({...T,height:h}))},[h,n]),te.useLayoutEffect(()=>{if(l){const T=e.useContainerWidth||mt(e.width)&&e.width>0;I({width:T?y:"100%",height:f})}else I({width:b||"100%",height:h})},[l]),{minHeight:a,maxHeight:f,minWidth:g,maxWidth:y,rowHeight:s,resizableSize:v,setResizableSize:I}}const Qw=600,ey="\u26A0\uFE0F Please fill out this cell.";function ty(e,t,n=[]){const[o,r]=te.useState(),i=te.useRef(null),l=te.useCallback(a=>{if(clearTimeout(i.current),i.current=0,r(void 0),(a.kind==="header"||a.kind==="cell")&&a.location){const c=a.location[0],u=a.location[1];let d;if(c<0||c>=e.length||n.includes(u))return;const f=e[c];if(a.kind==="header"&&mt(f))d=f.help;else if(a.kind==="cell"){const h=t([c,u]);lr(h)?d=h.errorDetails:f.isRequired&&f.isEditable&&Fi(h)?d=ey:Nm(h)&&(d=h.tooltip)}d&&(i.current=setTimeout(()=>{d&&r({content:d,left:a.bounds.x+a.bounds.width/2,top:a.bounds.y})},Qw))}},[e,t,r,i,n]),s=te.useCallback(()=>{r(void 0)},[r]);return{tooltip:o,clearTooltip:s,onItemHovered:l}}function ny({top:e,left:t,content:n,clearTooltip:o}){const[r,i]=te.useState(!0),l=Jo(),{colors:s,fontSizes:a,radii:c,fontWeights:u}=l,d=te.useCallback(()=>{i(!1),o()},[o,i]);return Oe.jsx(xl,{content:Oe.jsx(jx,{"data-testid":"stDataFrameTooltipContent",children:Oe.jsx(Ux,{style:{fontSize:a.sm},source:n,allowHTML:!1})}),placement:Cl.top,accessibilityType:_h.tooltip,showArrow:!1,popoverMargin:5,onClickOutside:d,onEsc:d,overrides:{Body:{style:{borderTopLeftRadius:c.default,borderTopRightRadius:c.default,borderBottomLeftRadius:c.default,borderBottomRightRadius:c.default,paddingTop:"0 !important",paddingBottom:"0 !important",paddingLeft:"0 !important",paddingRight:"0 !important",backgroundColor:"transparent"}},Inner:{style:{backgroundColor:kl(l)?s.bgColor:s.secondaryBg,color:s.bodyText,fontSize:a.sm,fontWeight:u.normal,paddingTop:"0 !important",paddingBottom:"0 !important",paddingLeft:"0 !important",paddingRight:"0 !important"}}},isOpen:r,children:Oe.jsx("div",{"data-testid":"stDataFrameTooltipTarget",style:{position:"fixed",top:e,left:t}})})}const oy=p.memo(ny),ph=Sr("div",{target:"e1w7nams0"})(({hasCustomizedScrollbars:e,theme:t})=>({position:"relative",display:"inline-block","& .stDataFrameGlideDataEditor":{height:"100%",minWidth:"100%",borderRadius:t.radii.default},"& .dvn-scroller":{...!e&&{scrollbarWidth:"thin"},overflowX:"auto !important",overflowY:"auto !important"},"& .gdg-seveqep":{maxWidth:"19rem",width:"80%",minWidth:"6rem",top:t.spacing.sm,right:t.spacing.sm,padding:t.spacing.sm,borderRadius:t.radii.default,"& .gdg-search-status":{paddingTop:t.spacing.twoXS,fontSize:t.fontSizes.twoSm},"& .gdg-search-progress":{display:"none"},"& input":{width:"100%"},"& button":{width:t.iconSizes.xl,height:t.iconSizes.xl,"& .button-icon":{width:t.iconSizes.base,height:t.iconSizes.base}}}}),""),gh=150,ry=15e4,mh=6;function iy({element:e,data:t,disabled:n,widgetMgr:o,disableFullscreenMode:r,fragmentId:i}){const{expanded:l,expand:s,collapse:a,width:c,height:u}=Yx(Jx),d=te.useRef(null),f=te.useRef(null),h=te.useRef(null),g=Vw(),{getRowThemeOverride:m,onItemHovered:b}=qw(g),{libConfig:{enforceDownloadInNewTab:y=!1}}=te.useContext(Xx),[v,I]=te.useState(!0),[T,k]=te.useState(!1),[x,L]=te.useState(!1),[O,R]=te.useState(!1),[P,M]=te.useState(),[S,E]=te.useState(!1),D=te.useMemo(()=>window.matchMedia&&window.matchMedia("(pointer: coarse)").matches,[]),C=te.useMemo(()=>window.navigator.userAgent.includes("Mac OS")&&window.navigator.userAgent.includes("Safari")||window.navigator.userAgent.includes("Chrome"),[]);Ve(e.editingMode)&&(e.editingMode=En.EditingMode.READ_ONLY);const{READ_ONLY:X,DYNAMIC:B}=En.EditingMode,J=t.dimensions,ae=Math.max(0,J.numDataRows),ne=ae===0&&!(e.editingMode===B&&J.numDataColumns>0),U=ae>ry,re=!U&&!ne&&e.editingMode!==B,se=!ne&&e.editingMode===B&&!n,de=te.useRef(new Wi(ae)),[fe,Q]=te.useState(de.current.getNumRows());te.useEffect(()=>{de.current=new Wi(ae),Q(de.current.getNumRows())},[ae]);const N=te.useCallback(()=>{de.current=new Wi(ae),Q(de.current.getNumRows())},[ae]),[z,j]=te.useState(e.columnOrder);te.useEffect(()=>{j(e.columnOrder)},[e.columnOrder.join(",")]);const{columns:ge,allColumns:ke,setColumnConfigMapping:Fe}=fv(e,t,n,z);te.useEffect(()=>{if(e.editingMode===X)return;const pe=o.getStringValue({id:e.id,formId:e.formId});pe&&(de.current.fromJson(pe,ge),Q(de.current.getNumRows()))},[]);const{getCellContent:xe}=Kw(t,ge,fe,de),{columns:De,sortColumn:_e,getOriginalIndex:et,getCellContent:Pt}=kv(ae,ge,xe),Mt=te.useCallback(pe=>{const rt={selection:{rows:[],columns:[]}};rt.selection.rows=pe.rows.toArray().map(en=>et(en)),rt.selection.columns=pe.columns.toArray().map(en=>Zr(De[en]));const Dt=JSON.stringify(rt),dn=o.getStringValue({id:e.id,formId:e.formId});(dn===void 0||dn!==Dt)&&o.setStringValue({id:e.id,formId:e.formId},Dt,{fromUi:!0},i)},[De,e.id,e.formId,o,i,et]),{debouncedCallback:we}=Pu(Mt,gh),{gridSelection:be,isRowSelectionActivated:me,isMultiRowSelectionActivated:ie,isColumnSelectionActivated:Ee,isMultiColumnSelectionActivated:Ie,isRowSelected:je,isColumnSelected:tt,isCellSelected:Rt,clearSelection:ce,processSelectionChange:it}=Zw(e,ne,n,De,we);te.useEffect(()=>{ce(!0,!0)},[l]);const at=te.useCallback(pe=>{var rt;(rt=f.current)==null||rt.updateCells(pe)},[]);te.useEffect(()=>{var pe,rt,Dt,dn;if(!me&&!Ee)return;const en=o.getStringValue({id:e.id,formId:e.formId});if(en){const tn=De.map(ro=>Zr(ro)),Sn=JSON.parse(en);let wn=vt.empty(),ho=vt.empty();(rt=(pe=Sn.selection)==null?void 0:pe.rows)==null||rt.forEach(ro=>{wn=wn.add(ro)}),(dn=(Dt=Sn.selection)==null?void 0:Dt.columns)==null||dn.forEach(ro=>{ho=ho.add(tn.indexOf(ro))}),(wn.length>0||ho.length>0)&&it({rows:wn,columns:ho,current:void 0})}},[]);const Re=te.useCallback(()=>{fe!==de.current.getNumRows()&&Q(de.current.getNumRows())},[fe]),Tt=te.useCallback(()=>{const pe=de.current.toJson(De);let rt=o.getStringValue({id:e.id,formId:e.formId});rt===void 0&&(rt=new Wi(0).toJson([])),pe!==rt&&o.setStringValue({id:e.id,formId:e.formId},pe,{fromUi:!0},i)},[De,e.id,e.formId,o,i]),{debouncedCallback:Xt}=Pu(Tt,gh),{exportToCsv:Ne}=Gw(Pt,De,fe,y),{onCellEdited:nt,onPaste:kt,onRowAppended:Et,onDelete:qt,validateCell:un}=Ww(De,e.editingMode!==B,de,Pt,et,at,Re,Xt,ce),an=te.useMemo(()=>ne?[0]:se?[fe]:[],[ne,se,fe]),{tooltip:Bt,clearTooltip:wt,onItemHovered:Ot}=ty(De,Pt,an),{drawCell:In,customRenderers:Cn}=Bw(De),{provideEditor:ot}=Mv(),sn=p.useCallback(pe=>({...pe,hasMenu:!ne}),[ne]),bn=te.useMemo(()=>De.map(pe=>sn(va(pe))),[De,sn]),{columns:yt,onColumnResize:Zt}=vv(bn),ut=t.dimensions.numHeaderRows>1,{minHeight:Vt,maxHeight:$t,minWidth:rn,maxWidth:Ft,rowHeight:Jt,resizableSize:Ue,setResizableSize:Ht}=Jw(e,g,fe,ut,c||0,u,l),kn=te.useCallback(([pe,rt])=>({...Bm(!0,!1),displayData:"empty",contentAlign:"center",allowOverlay:!1,themeOverride:{textDark:g.glideTheme.textLight},span:[0,Math.max(De.length-1,0)]}),[De,g.glideTheme.textLight]),At=te.useCallback(()=>{N(),ce()},[N,ce]);qx({element:e,widgetMgr:o,onFormCleared:At});const{pinColumn:Wt,unpinColumn:jt,freezeColumns:oo}=gv(De,ne,c||0,g.minColumnWidth,ce,Fe),{changeColumnFormat:jn}=pv(Fe),{hideColumn:_,showColumn:qe}=Sv(ce,Fe),{onColumnMoved:Je}=mv(De,oo,Wt,jt,j);return te.useEffect(()=>{setTimeout(()=>{var pe,rt;if(h.current&&f.current){const Dt=(rt=(pe=h.current)==null?void 0:pe.querySelector(".dvn-stack"))==null?void 0:rt.getBoundingClientRect();Dt&&(L(Dt.height>h.current.clientHeight),R(Dt.width>h.current.clientWidth))}},1)},[Ue,fe,yt]),p.useEffect(()=>{ke.length==De.length&&E(!1)},[ke.length,De.length]),Oe.jsxs(ph,{className:"stDataFrame","data-testid":"stDataFrame",hasCustomizedScrollbars:C,ref:h,onMouseDown:pe=>{if(h.current&&C){const rt=h.current.getBoundingClientRect();O&&rt.height-(mh+1)<pe.clientY-rt.top&&pe.stopPropagation(),x&&rt.width-(mh+1)<pe.clientX-rt.left&&pe.stopPropagation()}},onBlur:pe=>{!v&&!D&&!pe.currentTarget.contains(pe.relatedTarget)&&ce(!0,!0)},children:[Oe.jsxs(Qx,{isFullScreen:l,disableFullscreenMode:r,locked:je&&!me||Rt||D&&v||S,onExpand:s,onCollapse:a,target:ph,children:[(me&&je||Ee&&tt)&&Oe.jsx(Mr,{label:"Clear selection",icon:lC,onClick:()=>{ce(),wt()}}),se&&je&&Oe.jsx(Mr,{label:"Delete row(s)",icon:dC,onClick:()=>{qt&&(qt(be),wt())}}),se&&!je&&Oe.jsx(Mr,{label:"Add row",icon:Es,onClick:()=>{var pe;Et&&(I(!0),Et(),wt(),(pe=f.current)==null||pe.scrollTo(0,fe,"vertical"))}}),!ne&&ke.length>De.length&&Oe.jsx(zm,{columns:ke,columnOrder:z,setColumnOrder:j,hideColumn:_,showColumn:qe,isOpen:S,onClose:()=>E(!1),children:Oe.jsx(Mr,{label:"Show/hide columns",icon:Ts,onClick:()=>E(!0)})}),!U&&!ne&&Oe.jsx(Mr,{label:"Download as CSV",icon:hC,onClick:()=>Ne()}),!ne&&Oe.jsx(Mr,{label:"Search",icon:Is,onClick:()=>{T?k(!1):(I(!0),k(!0)),wt()}})]}),Oe.jsx(Gx,{"data-testid":"stDataFrameResizable",ref:d,defaultSize:Ue,style:{border:`${g.tableBorderWidth}px solid ${g.glideTheme.borderColor}`,borderRadius:`${g.tableBorderRadius}`},minHeight:Vt,maxHeight:$t,minWidth:rn,maxWidth:Ft,size:Ue,enable:{top:!1,right:!1,bottom:!1,left:!1,topRight:!1,bottomRight:!0,bottomLeft:!1,topLeft:!1},grid:[1,Jt],snapGap:Jt/3,onResizeStop:(pe,rt,Dt,dn)=>{if(d.current){const en=2*g.tableBorderWidth;Ht({width:d.current.size.width,height:$t-d.current.size.height===en?d.current.size.height+en:d.current.size.height})}},children:Oe.jsx(Cm,{className:"stDataFrameGlideDataEditor","data-testid":"stDataFrameGlideDataEditor",ref:f,columns:yt,rows:ne?1:fe,minColumnWidth:g.minColumnWidth,maxColumnWidth:g.maxColumnWidth,maxColumnAutoWidth:g.maxColumnAutoWidth,rowHeight:Jt,headerHeight:g.defaultHeaderHeight,getCellContent:ne?kn:Pt,onColumnResize:D?void 0:Zt,resizeIndicator:"header",freezeColumns:oo,smoothScrollX:!0,smoothScrollY:!0,verticalBorder:!0,getCellsForSelection:!0,rowMarkers:"none",rangeSelect:D?"cell":"rect",columnSelect:"none",rowSelect:"none",onColumnMoved:Ee?void 0:Je,onItemHovered:pe=>{b==null||b(pe),Ot==null||Ot(pe)},keybindings:{downFill:!0},onKeyDown:pe=>{(pe.ctrlKey||pe.metaKey)&&pe.key==="f"&&(k(rt=>!rt),pe.stopPropagation(),pe.preventDefault())},showSearch:T,onSearchClose:()=>{k(!1),wt()},onHeaderClicked:(pe,rt)=>{!re||Ee||(me&&je?ce():ce(!0,!0),_e(pe,"auto"))},gridSelection:be,onGridSelectionChange:pe=>{(v||D)&&(it(pe),Bt!==void 0&&wt())},theme:g.glideTheme,getRowThemeOverride:m,onMouseMove:pe=>{pe.kind==="out-of-bounds"&&v?I(!1):pe.kind!=="out-of-bounds"&&!v&&I(!0)},fixedShadowX:!0,fixedShadowY:!0,experimental:{scrollbarWidthOverride:0,...C&&{paddingBottom:O?-6:void 0,paddingRight:x?-6:void 0}},provideEditor:ot,drawCell:In,customRenderers:Cn,imageEditorOverride:Qm,headerIcons:g.headerIcons,validateCell:un,onHeaderMenuClick:(pe,rt)=>{M({columnIdx:pe,headerBounds:rt})},onPaste:!1,...me&&{rowMarkers:{kind:"checkbox",checkboxStyle:"square",theme:{bgCell:g.glideTheme.bgHeader,bgCellMedium:g.glideTheme.bgHeader}},rowSelectionMode:ie?"multi":"auto",rowSelect:n?"none":ie?"multi":"single",rowSelectionBlending:"mixed",rangeSelectionBlending:"exclusive"},...Ee&&{columnSelect:n?"none":Ie?"multi":"single",columnSelectionBlending:"mixed",rangeSelectionBlending:"exclusive"},...!ne&&e.editingMode!==X&&!n&&{fillHandle:!D,onCellEdited:nt,onPaste:kt,onDelete:qt},...!ne&&e.editingMode===B&&{trailingRowOptions:{sticky:!1,tint:!0},rowMarkers:{kind:"checkbox",checkboxStyle:"square",theme:{bgCell:g.glideTheme.bgHeader,bgCellMedium:g.glideTheme.bgHeader}},rowSelectionMode:"multi",rowSelect:n?"none":"multi",onRowAppended:n?void 0:Et,onHeaderClicked:void 0}})}),Bt&&Bt.content&&Oe.jsx(oy,{top:Bt.top,left:Bt.left,content:Bt.content,clearTooltip:wt}),P&&Jh.createPortal(Oe.jsx(Im,{top:P.headerBounds.y+P.headerBounds.height,left:P.headerBounds.x+P.headerBounds.width,columnKind:ge[P.columnIdx].kind,onCloseMenu:()=>M(void 0),onSortColumn:re?pe=>{ce(!0,!0),_e(P.columnIdx,pe,!0)}:void 0,isColumnPinned:ge[P.columnIdx].isPinned,onUnpinColumn:()=>{jt(ge[P.columnIdx].id)},onPinColumn:()=>{Wt(ge[P.columnIdx].id)},onHideColumn:()=>{_(ge[P.columnIdx].id)},onChangeFormat:pe=>{jn(ge[P.columnIdx].id,pe),setTimeout(()=>{var rt;(rt=f.current)==null||rt.remeasureColumns(vt.fromSingleSelection(P.columnIdx))},100)},onAutosize:()=>{var pe;(pe=f.current)==null||pe.remeasureColumns(vt.fromSingleSelection(P.columnIdx))}}),document.querySelector("#portal"))]})}let vh,bh;vh=Zx(iy),bh=p.memo(vh),Qh=Object.freeze(Object.defineProperty({__proto__:null,default:bh},Symbol.toStringTag,{value:"Module"}))});export{Ss as C,El as T,fC as __tla,Po as a,Ms as b,Qh as c,Ho as i,Rs as m,cn as s};