streamlit-nightly 1.42.2.dev20250218__py2.py3-none-any.whl → 1.42.3.dev20250220__py2.py3-none-any.whl
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.
- streamlit/column_config.py +2 -0
- streamlit/commands/navigation.py +134 -129
- streamlit/elements/lib/column_types.py +88 -0
- streamlit/navigation/page.py +1 -1
- streamlit/static/index.html +1 -1
- streamlit/static/static/js/{FileDownload.esm.DU-1rCSB.js → FileDownload.esm.CSCu_FQk.js} +1 -1
- streamlit/static/static/js/{FileDropzone.BI3MGDdT.js → FileDropzone.xME_qwl7.js} +1 -1
- streamlit/static/static/js/{FormClearHelper.DzU-mNjk.js → FormClearHelper.D7FpzEHQ.js} +1 -1
- streamlit/static/static/js/{Hooks.qUbVZL-A.js → Hooks.Ofd2jLSe.js} +1 -1
- streamlit/static/static/js/{InputInstructions.CpNPMMpX.js → InputInstructions.C5AiI5fd.js} +1 -1
- streamlit/static/static/js/{ProgressBar.4yIafGOA.js → ProgressBar.St3jxlFz.js} +2 -2
- streamlit/static/static/js/{RenderInPortalIfExists.31NYBozH.js → RenderInPortalIfExists.JQTUbdhz.js} +1 -1
- streamlit/static/static/js/{Toolbar.lnT7wtEH.js → Toolbar.mIL79bYR.js} +1 -1
- streamlit/static/static/js/{base-input.DYDwDBVN.js → base-input.CoahMH6I.js} +4 -4
- streamlit/static/static/js/{createSuper.CP_bqXkl.js → createSuper.DJC0972y.js} +1 -1
- streamlit/static/static/js/{data-grid-overlay-editor.Bw6S-08j.js → data-grid-overlay-editor.C9j6qKVt.js} +1 -1
- streamlit/static/static/js/{downloader.DZpOwdni.js → downloader.BmN5QG23.js} +1 -1
- streamlit/static/static/js/{es6.D670kkuw.js → es6.CkTV0_PT.js} +2 -2
- streamlit/static/static/js/{iframeResizer.contentWindow.CBWvp4oS.js → iframeResizer.contentWindow.GG3aQxlr.js} +1 -1
- streamlit/static/static/js/{index.8M0nMTyK.js → index.40cNUDYj.js} +1 -1
- streamlit/static/static/js/{index.DS38XxzV.js → index.B0fq3djO.js} +1 -1
- streamlit/static/static/js/index.B6DhU6bS.js +1 -0
- streamlit/static/static/js/{index.D3VdaBwP.js → index.BFMT7m5S.js} +1 -1
- streamlit/static/static/js/{index.DNEGP5ih.js → index.BIMiZM1d.js} +1 -1
- streamlit/static/static/js/{index.DsvnAu-2.js → index.BIb_Q_t2.js} +1 -1
- streamlit/static/static/js/{index.CA6bEd5D.js → index.BWRgNHzG.js} +1 -1
- streamlit/static/static/js/{index.CD53GuKN.js → index.BgviuYiK.js} +2 -2
- streamlit/static/static/js/{index.Du4f6P1i.js → index.Bhh-YA7-.js} +1 -1
- streamlit/static/static/js/{index.Ch1c3KR1.js → index.BtEGgjQs.js} +1 -1
- streamlit/static/static/js/{index.BhTUDBBK.js → index.C2RhGRpZ.js} +1 -1
- streamlit/static/static/js/{index.BkURA4Nq.js → index.C6YhHXiT.js} +2 -2
- streamlit/static/static/js/{index.Byj6qntv.js → index.C_y3GDl0.js} +1 -1
- streamlit/static/static/js/{index.D8aCPmhr.js → index.CcxxDrWU.js} +1 -1
- streamlit/static/static/js/{index.CKT6gwZG.js → index.CmKQs94B.js} +2 -2
- streamlit/static/static/js/index.Cu1SST0o.js +197 -0
- streamlit/static/static/js/index.D6v0tURe.js +1 -0
- streamlit/static/static/js/{index.B-Bz2NGO.js → index.D8VHOaj4.js} +1 -1
- streamlit/static/static/js/{index.DRJutLeV.js → index.DGCNoFUa.js} +1 -1
- streamlit/static/static/js/{index.D6UL3iMZ.js → index.DGtuJLSc.js} +1 -1
- streamlit/static/static/js/{index.CrYKK91g.js → index.DLmg74_p.js} +132 -132
- streamlit/static/static/js/{index.BCorV1AX.js → index.DMRnVKOx.js} +1 -1
- streamlit/static/static/js/{index.-wGNsvT9.js → index.DX8V4iLG.js} +1 -1
- streamlit/static/static/js/{index.ChIZFRw0.js → index.DgheNneH.js} +1 -1
- streamlit/static/static/js/index.DlpiXPka.js +1 -0
- streamlit/static/static/js/{index.Bif_gpeX.js → index.DpMH9Ich.js} +1 -1
- streamlit/static/static/js/{index.B9mk7o4G.js → index.DtOoKZuY.js} +3 -3
- streamlit/static/static/js/{index.0jzSLI-x.js → index.DvpzuDf3.js} +2 -2
- streamlit/static/static/js/{index.De5HitMn.js → index.DxseZbLQ.js} +1 -1
- streamlit/static/static/js/{index.C5VAa8DZ.js → index.F-Swvxpp.js} +1 -1
- streamlit/static/static/js/{index.DdeHhk74.js → index.GL3uWznV.js} +1 -1
- streamlit/static/static/js/{index.XAUdgEdp.js → index.GumFavEm.js} +1 -1
- streamlit/static/static/js/{index.HCbHLWBq.js → index.LvS7giIF.js} +1 -1
- streamlit/static/static/js/{index.DHBu5iL6.js → index.c4SbAEld.js} +1 -1
- streamlit/static/static/js/{index.BMlBBPxY.js → index.euIqXpX7.js} +3 -3
- streamlit/static/static/js/{index.CLsHMaqe.js → index.od8XlC_e.js} +10 -10
- streamlit/static/static/js/{index.B6KnC7nW.js → index.zss4f62G.js} +1 -1
- streamlit/static/static/js/{input.e-37_Dj1.js → input.DQUrmNKe.js} +2 -2
- streamlit/static/static/js/{memory.B5p-2jga.js → memory.Bc-1m0Hw.js} +1 -1
- streamlit/static/static/js/{mergeWith.D8nk5iJa.js → mergeWith.DrVjJq9_.js} +1 -1
- streamlit/static/static/js/{number-overlay-editor.DLD5-9zx.js → number-overlay-editor.sGSz7Cjz.js} +1 -1
- streamlit/static/static/js/{possibleConstructorReturn.eeV6HB6T.js → possibleConstructorReturn.DB_ioxa8.js} +1 -1
- streamlit/static/static/js/{sandbox.ChKquq8J.js → sandbox.Df3tB-gk.js} +1 -1
- streamlit/static/static/js/{textarea.ZI_0MUsX.js → textarea.COkOU68B.js} +2 -2
- streamlit/static/static/js/{timepicker.C8N66VUc.js → timepicker.DHf9u4bk.js} +1 -1
- streamlit/static/static/js/{toConsumableArray.DKg00cRh.js → toConsumableArray.B-S6rpdU.js} +1 -1
- streamlit/static/static/js/{uniqueId.fc9w8X88.js → uniqueId.BfMGEPML.js} +1 -1
- streamlit/static/static/js/{useBasicWidgetState.CySX_BlM.js → useBasicWidgetState.B8dRKvrk.js} +1 -1
- streamlit/static/static/js/{useOnInputChange.BF6Trlh5.js → useOnInputChange.Bntao_G6.js} +1 -1
- streamlit/static/static/js/{withFullScreenWrapper.x2WsM7iA.js → withFullScreenWrapper.CS8vg4vY.js} +1 -1
- streamlit/web/bootstrap.py +10 -6
- {streamlit_nightly-1.42.2.dev20250218.dist-info → streamlit_nightly-1.42.3.dev20250220.dist-info}/METADATA +1 -1
- {streamlit_nightly-1.42.2.dev20250218.dist-info → streamlit_nightly-1.42.3.dev20250220.dist-info}/RECORD +76 -76
- streamlit/static/static/js/index.C0O8ISw8.js +0 -1
- streamlit/static/static/js/index.Cvgj5_qB.js +0 -1
- streamlit/static/static/js/index.DJF89pFO.js +0 -1
- streamlit/static/static/js/index.edlGQJ3v.js +0 -197
- {streamlit_nightly-1.42.2.dev20250218.data → streamlit_nightly-1.42.3.dev20250220.data}/scripts/streamlit.cmd +0 -0
- {streamlit_nightly-1.42.2.dev20250218.dist-info → streamlit_nightly-1.42.3.dev20250220.dist-info}/WHEEL +0 -0
- {streamlit_nightly-1.42.2.dev20250218.dist-info → streamlit_nightly-1.42.3.dev20250220.dist-info}/entry_points.txt +0 -0
- {streamlit_nightly-1.42.2.dev20250218.dist-info → streamlit_nightly-1.42.3.dev20250220.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,197 @@
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./data-grid-overlay-editor.C9j6qKVt.js","./index.od8XlC_e.js","../css/index.DpJG_94W.css","./FormClearHelper.D7FpzEHQ.js","./withFullScreenWrapper.CS8vg4vY.js","./Toolbar.mIL79bYR.js","./mergeWith.DrVjJq9_.js","./sprintf.D7DtBTRn.js","./createDownloadLinkElement.DZMwyjvU.js","./toConsumableArray.B-S6rpdU.js","./possibleConstructorReturn.DB_ioxa8.js","./createSuper.DJC0972y.js","./FileDownload.esm.CSCu_FQk.js","./number-overlay-editor.sGSz7Cjz.js","./es6.CkTV0_PT.js"])))=>i.map(i=>d[i]);
|
2
|
+
var th=Object.defineProperty;var nh=(e,t,n)=>t in e?th(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var dt=(e,t,n)=>nh(e,typeof t!="symbol"?t+"":t,n);import{r as g,E as wc,_ as tt,c as rh,g as pr,R as se,i as $a,d as oo,e as ih,f as oh,h as ah,l as yc,m as Cc,o as sh,p as Sc,q as lh,s as uh,t as ch,u as dh,v as fh,w as hh,a as ar,x as Ts,n as mi,y as pa,j as Ht,z as $n,A as xc,B as kc,C as Ir,D as Mc,F as gh,G as Do,H as Rc,I as mh,J as ph,K as Be,L as Ec,M as pt,N as Ui,O as Nr,Q as Na,S as vh,T as bh,U as wh,V as Ml,W as yh,X as Ic,Y as Ch,Z as Sh,$ as vs,a0 as Tc,a1 as Dc,a2 as xh,a3 as kh,a4 as Mh,a5 as Rh,a6 as Eh,a7 as Ih,a8 as Th,a9 as Dh,aa as Oh,ab as Ph,ac as Oc,ad as _h,ae as Lh,af as Fh,ag as Ah,ah as Hh,ai as zh,aj as Vh,ak as $h,al as Nh,am as Bh,an as Wh,ao as Uh,ap as Bn,aq as Ds,ar as qi,as as vr,at as Ne,au as qh,b as Pc,av as _c,k as Yh,aw as Ba,ax as Xh,ay as jh,az as Wa,aA as Gh,aB as Kh,aC as Zh,aD as Jh}from"./index.od8XlC_e.js";import{u as Qh}from"./FormClearHelper.D7FpzEHQ.js";import{w as eg,u as tg,E as ng}from"./withFullScreenWrapper.CS8vg4vY.js";import{T as rg,a as Oi}from"./Toolbar.mIL79bYR.js";import{m as ig}from"./mergeWith.DrVjJq9_.js";import{s as og}from"./sprintf.D7DtBTRn.js";import{c as ag}from"./createDownloadLinkElement.DZMwyjvU.js";import{_ as hr,a as Os,C as sg}from"./toConsumableArray.B-S6rpdU.js";import{_ as lg,a as ug,b as cg}from"./possibleConstructorReturn.DB_ioxa8.js";import{_ as dg}from"./createSuper.DJC0972y.js";import{D as fg,F as hg}from"./FileDownload.esm.CSCu_FQk.js";var Lc=g.forwardRef(function(e,t){var n={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return g.createElement(wc,tt({iconAttrs:n,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:t}),g.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),g.createElement("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"}))});Lc.displayName="Add";var Fc=g.forwardRef(function(e,t){var n={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return g.createElement(wc,tt({iconAttrs:n,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:t}),g.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),g.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"}))});Fc.displayName="Search";function Ac(e="This should not happen"){throw new Error(e)}function Pn(e,t="Assertion failed"){if(!e)return Ac(t)}function Qi(e,t){return Ac(t??"Hell froze over")}function gg(e,t){try{return e()}catch{return t}}const Rl=Object.prototype.hasOwnProperty;function hi(e,t){let n,r;if(e===t)return!0;if(e&&t&&(n=e.constructor)===t.constructor){if(n===Date)return e.getTime()===t.getTime();if(n===RegExp)return e.toString()===t.toString();if(n===Array){if((r=e.length)===t.length)for(;r--&&hi(e[r],t[r]););return r===-1}if(!n||typeof e=="object"){r=0;for(n in e)if(Rl.call(e,n)&&++r&&!Rl.call(t,n)||!(n in t)||!hi(e[n],t[n]))return!1;return Object.keys(t).length===r}}return e!==e&&t!==t}var Ua,El;function mg(){if(El)return Ua;El=1;var e=Object.prototype,t=e.hasOwnProperty;function n(r,i){return r!=null&&t.call(r,i)}return Ua=n,Ua}var qa,Il;function pg(){if(Il)return qa;Il=1;var e=mg(),t=rh();function n(r,i){return r!=null&&t(r,i,e)}return qa=n,qa}var vg=pg();const bg=pr(vg),Qo=null,Ps=void 0;var te;(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"})(te||(te={}));var Tl;(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"})(Tl||(Tl={}));var ea;(function(e){e.Triangle="triangle",e.Dots="dots"})(ea||(ea={}));function Oo(e){return"width"in e&&typeof e.width=="number"}async function Dl(e){return typeof e=="object"?e:await e()}function si(e){return!(e.kind===te.Loading||e.kind===te.Bubble||e.kind===te.RowID||e.kind===te.Protected||e.kind===te.Drilldown)}function ui(e){return e.kind===Un.Marker||e.kind===Un.NewRow}function Yi(e){if(!si(e)||e.kind===te.Image)return!1;if(e.kind===te.Text||e.kind===te.Number||e.kind===te.Markdown||e.kind===te.Uri||e.kind===te.Custom||e.kind===te.Boolean)return e.readonly!==!0;Qi(e,"A cell was passed with an invalid kind")}function wg(e){return bg(e,"editor")}function _s(e){return!(e.readonly??!1)}var Un;(function(e){e.NewRow="new-row",e.Marker="marker"})(Un||(Un={}));function yg(e){if(e.length===0)return[];const t=[...e],n=[];t.sort(function(r,i){return r[0]-i[0]}),n.push([...t[0]]);for(const r of t.slice(1)){const i=n[n.length-1];i[1]<r[0]?n.push([...r]):i[1]<r[1]&&(i[1]=r[1])}return n}let Ol;const fr=class fr{constructor(t){dt(this,"items");this.items=t}offset(t){if(t===0)return this;const n=this.items.map(r=>[r[0]+t,r[1]+t]);return new fr(n)}add(t){const n=typeof t=="number"?[t,t+1]:t,r=yg([...this.items,n]);return new fr(r)}remove(t){const n=[...this.items],r=typeof t=="number"?t:t[0],i=typeof t=="number"?t+1:t[1];for(const[o,a]of n.entries()){const[l,s]=a;if(l<=i&&r<=s){const u=[];l<r&&u.push([l,r]),i<s&&u.push([i,s]),n.splice(o,1,...u)}}return new fr(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[r,i]=this.items[n];if(t>=r&&t<i)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 r=t.items[n],i=this.items[n];if(r[0]!==i[0]||r[1]!==i[1])return!1}return!0}toArray(){const t=[];for(const[n,r]of this.items)for(let i=n;i<r;i++)t.push(i);return t}get length(){let t=0;for(const[n,r]of this.items)t+=r-n;return t}*[Symbol.iterator](){for(const[t,n]of this.items)for(let r=t;r<n;r++)yield r}};dt(fr,"empty",()=>Ol??(Ol=new fr([]))),dt(fr,"fromSingleSelection",t=>fr.empty().add(t));let bt=fr;var Cg=function(){const t=Array.prototype.slice.call(arguments).filter(Boolean),n={},r=[];t.forEach(o=>{(o?o.split(" "):[]).forEach(l=>{if(l.startsWith("atm_")){const[,s]=l.split("_");n[s]=l}else r.push(l)})});const i=[];for(const o in n)Object.prototype.hasOwnProperty.call(n,o)&&i.push(n[o]);return i.push(...r),i.join(" ")},Pl=Cg,Sg=e=>e.toUpperCase()===e,xg=e=>t=>e.indexOf(t)===-1,Hc=(e,t)=>{const n={};return Object.keys(e).filter(xg(t)).forEach(r=>{n[r]=e[r]}),n};function kg(e,t,n){const r=Hc(t,n);if(!e){const i=typeof $a=="function"?{default:$a}:$a;Object.keys(r).forEach(o=>{i.default(o)||delete r[o]})}return r}var Mg=(e,t)=>{};function Rg(e){let t="";return n=>{const r=(o,a)=>{const{as:l=e,class:s=t}=o,u=n.propsAsIs===void 0?!(typeof l=="string"&&l.indexOf("-")===-1&&!Sg(l[0])):n.propsAsIs,c=kg(u,o,["as","class"]);c.ref=a,c.className=n.atomic?Pl(n.class,c.className||s):Pl(c.className||s,n.class);const{vars:d}=n;if(d){const f={};for(const p in d){const v=d[p],y=v[0],b=v[1]||"",R=typeof y=="function"?y(o):y;Mg(R,n.name),f[`--${p}`]=`${R}${b}`}const h=c.style||{},m=Object.keys(h);m.length>0&&m.forEach(p=>{f[p]=h[p]}),c.style=f}return e.__linaria&&e!==l?(c.as=l,se.createElement(e,c)):se.createElement(l,c)},i=se.forwardRef?se.forwardRef(r):o=>{const a=Hc(o,["innerRef"]);return r(a,o.innerRef)};return i.displayName=n.name,i.__linaria={className:n.class||t,extends:e},i}}var mn=Rg;const Eg=mn("div")({name:"ImageOverlayEditorStyle",class:"gdg-i2iowwq",propsAsIs:!1});var Ya={},Pi={},Po={},_o={},_l;function Ig(){return _l||(_l=1,function(e){(function(t,n){n(e,oo(),ih())})(_o,function(t,n,r){Object.defineProperty(t,"__esModule",{value:!0}),t.setHasSupportToCaptureOption=m;var i=a(n),o=a(r);function a(b){return b&&b.__esModule?b:{default:b}}var l=Object.assign||function(b){for(var R=1;R<arguments.length;R++){var O=arguments[R];for(var S in O)Object.prototype.hasOwnProperty.call(O,S)&&(b[S]=O[S])}return b};function s(b,R){var O={};for(var S in b)R.indexOf(S)>=0||Object.prototype.hasOwnProperty.call(b,S)&&(O[S]=b[S]);return O}function u(b,R){if(!(b instanceof R))throw new TypeError("Cannot call a class as a function")}var c=function(){function b(R,O){for(var S=0;S<O.length;S++){var M=O[S];M.enumerable=M.enumerable||!1,M.configurable=!0,"value"in M&&(M.writable=!0),Object.defineProperty(R,M.key,M)}}return function(R,O,S){return O&&b(R.prototype,O),S&&b(R,S),R}}();function d(b,R){if(!b)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return R&&(typeof R=="object"||typeof R=="function")?R:b}function f(b,R){if(typeof R!="function"&&R!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof R);b.prototype=Object.create(R&&R.prototype,{constructor:{value:b,enumerable:!1,writable:!0,configurable:!0}}),R&&(Object.setPrototypeOf?Object.setPrototypeOf(b,R):b.__proto__=R)}var h=!1;function m(b){h=b}try{addEventListener("test",null,Object.defineProperty({},"capture",{get:function(){m(!0)}}))}catch{}function p(){var b=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{capture:!0};return h?b:b.capture}function v(b){if("touches"in b){var R=b.touches[0],O=R.pageX,S=R.pageY;return{x:O,y:S}}var M=b.screenX,_=b.screenY;return{x:M,y:_}}var y=function(b){f(R,b);function R(){var O;u(this,R);for(var S=arguments.length,M=Array(S),_=0;_<S;_++)M[_]=arguments[_];var E=d(this,(O=R.__proto__||Object.getPrototypeOf(R)).call.apply(O,[this].concat(M)));return E._handleSwipeStart=E._handleSwipeStart.bind(E),E._handleSwipeMove=E._handleSwipeMove.bind(E),E._handleSwipeEnd=E._handleSwipeEnd.bind(E),E._onMouseDown=E._onMouseDown.bind(E),E._onMouseMove=E._onMouseMove.bind(E),E._onMouseUp=E._onMouseUp.bind(E),E._setSwiperRef=E._setSwiperRef.bind(E),E}return c(R,[{key:"componentDidMount",value:function(){this.swiper&&this.swiper.addEventListener("touchmove",this._handleSwipeMove,p({capture:!0,passive:!1}))}},{key:"componentWillUnmount",value:function(){this.swiper&&this.swiper.removeEventListener("touchmove",this._handleSwipeMove,p({capture:!0,passive:!1}))}},{key:"_onMouseDown",value:function(S){this.props.allowMouseEvents&&(this.mouseDown=!0,document.addEventListener("mouseup",this._onMouseUp),document.addEventListener("mousemove",this._onMouseMove),this._handleSwipeStart(S))}},{key:"_onMouseMove",value:function(S){this.mouseDown&&this._handleSwipeMove(S)}},{key:"_onMouseUp",value:function(S){this.mouseDown=!1,document.removeEventListener("mouseup",this._onMouseUp),document.removeEventListener("mousemove",this._onMouseMove),this._handleSwipeEnd(S)}},{key:"_handleSwipeStart",value:function(S){var M=v(S),_=M.x,E=M.y;this.moveStart={x:_,y:E},this.props.onSwipeStart(S)}},{key:"_handleSwipeMove",value:function(S){if(this.moveStart){var M=v(S),_=M.x,E=M.y,x=_-this.moveStart.x,L=E-this.moveStart.y;this.moving=!0;var D=this.props.onSwipeMove({x,y:L},S);D&&S.cancelable&&S.preventDefault(),this.movePosition={deltaX:x,deltaY:L}}}},{key:"_handleSwipeEnd",value:function(S){this.props.onSwipeEnd(S);var M=this.props.tolerance;this.moving&&this.movePosition&&(this.movePosition.deltaX<-M?this.props.onSwipeLeft(1,S):this.movePosition.deltaX>M&&this.props.onSwipeRight(1,S),this.movePosition.deltaY<-M?this.props.onSwipeUp(1,S):this.movePosition.deltaY>M&&this.props.onSwipeDown(1,S)),this.moveStart=null,this.moving=!1,this.movePosition=null}},{key:"_setSwiperRef",value:function(S){this.swiper=S,this.props.innerRef(S)}},{key:"render",value:function(){var S=this.props;S.tagName;var M=S.className,_=S.style,E=S.children;S.allowMouseEvents,S.onSwipeUp,S.onSwipeDown,S.onSwipeLeft,S.onSwipeRight,S.onSwipeStart,S.onSwipeMove,S.onSwipeEnd,S.innerRef,S.tolerance;var x=s(S,["tagName","className","style","children","allowMouseEvents","onSwipeUp","onSwipeDown","onSwipeLeft","onSwipeRight","onSwipeStart","onSwipeMove","onSwipeEnd","innerRef","tolerance"]);return i.default.createElement(this.props.tagName,l({ref:this._setSwiperRef,onMouseDown:this._onMouseDown,onTouchStart:this._handleSwipeStart,onTouchEnd:this._handleSwipeEnd,className:M,style:_},x),E)}}]),R}(n.Component);y.displayName="ReactSwipe",y.propTypes={tagName:o.default.string,className:o.default.string,style:o.default.object,children:o.default.node,allowMouseEvents:o.default.bool,onSwipeUp:o.default.func,onSwipeDown:o.default.func,onSwipeLeft:o.default.func,onSwipeRight:o.default.func,onSwipeStart:o.default.func,onSwipeMove:o.default.func,onSwipeEnd:o.default.func,innerRef:o.default.func,tolerance:o.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})}(_o)),_o}var Ll;function zc(){return Ll||(Ll=1,function(e){(function(t,n){n(e,Ig())})(Po,function(t,n){Object.defineProperty(t,"__esModule",{value:!0});var r=i(n);function i(o){return o&&o.__esModule?o:{default:o}}t.default=r.default})}(Po)),Po}var _i={},Fl;function Vc(){if(Fl)return _i;Fl=1,Object.defineProperty(_i,"__esModule",{value:!0}),_i.default=void 0;var e=t(oh());function t(i){return i&&i.__esModule?i:{default:i}}function n(i,o,a){return o in i?Object.defineProperty(i,o,{value:a,enumerable:!0,configurable:!0,writable:!0}):i[o]=a,i}var r={ROOT:function(o){return(0,e.default)(n({"carousel-root":!0},o||"",!!o))},CAROUSEL:function(o){return(0,e.default)({carousel:!0,"carousel-slider":o})},WRAPPER:function(o,a){return(0,e.default)({"thumbs-wrapper":!o,"slider-wrapper":o,"axis-horizontal":a==="horizontal","axis-vertical":a!=="horizontal"})},SLIDER:function(o,a){return(0,e.default)({thumbs:!o,slider:o,animated:!a})},ITEM:function(o,a,l){return(0,e.default)({thumb:!o,slide:o,selected:a,previous:l})},ARROW_PREV:function(o){return(0,e.default)({"control-arrow control-prev":!0,"control-disabled":o})},ARROW_NEXT:function(o){return(0,e.default)({"control-arrow control-next":!0,"control-disabled":o})},DOT:function(o){return(0,e.default)({dot:!0,selected:o})}};return _i.default=r,_i}var Li={},Fi={},Al;function Tg(){if(Al)return Fi;Al=1,Object.defineProperty(Fi,"__esModule",{value:!0}),Fi.outerWidth=void 0;var e=function(n){var r=n.offsetWidth,i=getComputedStyle(n);return r+=parseInt(i.marginLeft)+parseInt(i.marginRight),r};return Fi.outerWidth=e,Fi}var Ai={},Hl;function Ls(){if(Hl)return Ai;Hl=1,Object.defineProperty(Ai,"__esModule",{value:!0}),Ai.default=void 0;var e=function(n,r,i){var o=n===0?n:n+r,a=i==="horizontal"?[o,0,0]:[0,o,0],l="translate3d",s="("+a.join(",")+")";return l+s};return Ai.default=e,Ai}var Hi={},zl;function $c(){if(zl)return Hi;zl=1,Object.defineProperty(Hi,"__esModule",{value:!0}),Hi.default=void 0;var e=function(){return window};return Hi.default=e,Hi}var Vl;function Nc(){if(Vl)return Li;Vl=1,Object.defineProperty(Li,"__esModule",{value:!0}),Li.default=void 0;var e=s(oo()),t=a(Vc()),n=Tg(),r=a(Ls()),i=a(zc()),o=a($c());function a(E){return E&&E.__esModule?E:{default:E}}function l(){if(typeof WeakMap!="function")return null;var E=new WeakMap;return l=function(){return E},E}function s(E){if(E&&E.__esModule)return E;if(E===null||u(E)!=="object"&&typeof E!="function")return{default:E};var x=l();if(x&&x.has(E))return x.get(E);var L={},D=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var C in E)if(Object.prototype.hasOwnProperty.call(E,C)){var I=D?Object.getOwnPropertyDescriptor(E,C):null;I&&(I.get||I.set)?Object.defineProperty(L,C,I):L[C]=E[C]}return L.default=E,x&&x.set(E,L),L}function u(E){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?u=function(L){return typeof L}:u=function(L){return L&&typeof Symbol=="function"&&L.constructor===Symbol&&L!==Symbol.prototype?"symbol":typeof L},u(E)}function c(){return c=Object.assign||function(E){for(var x=1;x<arguments.length;x++){var L=arguments[x];for(var D in L)Object.prototype.hasOwnProperty.call(L,D)&&(E[D]=L[D])}return E},c.apply(this,arguments)}function d(E,x){if(!(E instanceof x))throw new TypeError("Cannot call a class as a function")}function f(E,x){for(var L=0;L<x.length;L++){var D=x[L];D.enumerable=D.enumerable||!1,D.configurable=!0,"value"in D&&(D.writable=!0),Object.defineProperty(E,D.key,D)}}function h(E,x,L){return x&&f(E.prototype,x),E}function m(E,x){if(typeof x!="function"&&x!==null)throw new TypeError("Super expression must either be null or a function");E.prototype=Object.create(x&&x.prototype,{constructor:{value:E,writable:!0,configurable:!0}}),x&&p(E,x)}function p(E,x){return p=Object.setPrototypeOf||function(D,C){return D.__proto__=C,D},p(E,x)}function v(E){var x=R();return function(){var D=O(E),C;if(x){var I=O(this).constructor;C=Reflect.construct(D,arguments,I)}else C=D.apply(this,arguments);return y(this,C)}}function y(E,x){return x&&(u(x)==="object"||typeof x=="function")?x:b(E)}function b(E){if(E===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return E}function R(){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(E){return O=Object.setPrototypeOf?Object.getPrototypeOf:function(L){return L.__proto__||Object.getPrototypeOf(L)},O(E)}function S(E,x,L){return x in E?Object.defineProperty(E,x,{value:L,enumerable:!0,configurable:!0,writable:!0}):E[x]=L,E}var M=function(x){return x.hasOwnProperty("key")},_=function(E){m(L,E);var x=v(L);function L(D){var C;return d(this,L),C=x.call(this,D),S(b(C),"itemsWrapperRef",void 0),S(b(C),"itemsListRef",void 0),S(b(C),"thumbsRef",void 0),S(b(C),"setItemsWrapperRef",function(I){C.itemsWrapperRef=I}),S(b(C),"setItemsListRef",function(I){C.itemsListRef=I}),S(b(C),"setThumbsRef",function(I,T){C.thumbsRef||(C.thumbsRef=[]),C.thumbsRef[T]=I}),S(b(C),"updateSizes",function(){if(!(!C.props.children||!C.itemsWrapperRef||!C.thumbsRef)){var I=e.Children.count(C.props.children),T=C.itemsWrapperRef.clientWidth,k=C.props.thumbWidth?C.props.thumbWidth:(0,n.outerWidth)(C.thumbsRef[0]),V=Math.floor(T/k),N=V<I,U=N?I-V:0;C.setState(function(oe,ee){return{itemSize:k,visibleItems:V,firstItem:N?C.getFirstItem(ee.selectedItem):0,lastPosition:U,showArrows:N}})}}),S(b(C),"handleClickItem",function(I,T,k){if(!M(k)||k.key==="Enter"){var V=C.props.onSelectItem;typeof V=="function"&&V(I,T)}}),S(b(C),"onSwipeStart",function(){C.setState({swiping:!0})}),S(b(C),"onSwipeEnd",function(){C.setState({swiping:!1})}),S(b(C),"onSwipeMove",function(I){var T=I.x;if(!C.state.itemSize||!C.itemsWrapperRef||!C.state.visibleItems)return!1;var k=0,V=e.Children.count(C.props.children),N=-(C.state.firstItem*100)/C.state.visibleItems,U=Math.max(V-C.state.visibleItems,0),oe=-U*100/C.state.visibleItems;N===k&&T>0&&(T=0),N===oe&&T<0&&(T=0);var ee=C.itemsWrapperRef.clientWidth,j=N+100/(ee/T);return C.itemsListRef&&["WebkitTransform","MozTransform","MsTransform","OTransform","transform","msTransform"].forEach(function(ne){C.itemsListRef.style[ne]=(0,r.default)(j,"%",C.props.axis)}),!0}),S(b(C),"slideRight",function(I){C.moveTo(C.state.firstItem-(typeof I=="number"?I:1))}),S(b(C),"slideLeft",function(I){C.moveTo(C.state.firstItem+(typeof I=="number"?I:1))}),S(b(C),"moveTo",function(I){I=I<0?0:I,I=I>=C.state.lastPosition?C.state.lastPosition:I,C.setState({firstItem:I})}),C.state={selectedItem:D.selectedItem,swiping:!1,showArrows:!1,firstItem:0,visibleItems:0,lastPosition:0},C}return h(L,[{key:"componentDidMount",value:function(){this.setupThumbs()}},{key:"componentDidUpdate",value:function(C){this.props.selectedItem!==this.state.selectedItem&&this.setState({selectedItem:this.props.selectedItem,firstItem:this.getFirstItem(this.props.selectedItem)}),this.props.children!==C.children&&this.updateSizes()}},{key:"componentWillUnmount",value:function(){this.destroyThumbs()}},{key:"setupThumbs",value:function(){(0,o.default)().addEventListener("resize",this.updateSizes),(0,o.default)().addEventListener("DOMContentLoaded",this.updateSizes),this.updateSizes()}},{key:"destroyThumbs",value:function(){(0,o.default)().removeEventListener("resize",this.updateSizes),(0,o.default)().removeEventListener("DOMContentLoaded",this.updateSizes)}},{key:"getFirstItem",value:function(C){var I=C;return C>=this.state.lastPosition&&(I=this.state.lastPosition),C<this.state.firstItem+this.state.visibleItems&&(I=this.state.firstItem),C<this.state.firstItem&&(I=C),I}},{key:"renderItems",value:function(){var C=this;return this.props.children.map(function(I,T){var k=t.default.ITEM(!1,T===C.state.selectedItem),V={key:T,ref:function(U){return C.setThumbsRef(U,T)},className:k,onClick:C.handleClickItem.bind(C,T,C.props.children[T]),onKeyDown:C.handleClickItem.bind(C,T,C.props.children[T]),"aria-label":"".concat(C.props.labels.item," ").concat(T+1),style:{width:C.props.thumbWidth}};return e.default.createElement("li",c({},V,{role:"button",tabIndex:0}),I)})}},{key:"render",value:function(){var C=this;if(!this.props.children)return null;var I=e.Children.count(this.props.children)>1,T=this.state.showArrows&&this.state.firstItem>0,k=this.state.showArrows&&this.state.firstItem<this.state.lastPosition,V={},N=-this.state.firstItem*(this.state.itemSize||0),U=(0,r.default)(N,"px",this.props.axis),oe=this.props.transitionTime+"ms";return V={WebkitTransform:U,MozTransform:U,MsTransform:U,OTransform:U,transform:U,msTransform:U,WebkitTransitionDuration:oe,MozTransitionDuration:oe,MsTransitionDuration:oe,OTransitionDuration:oe,transitionDuration:oe,msTransitionDuration:oe},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(!T),onClick:function(){return C.slideRight()},"aria-label":this.props.labels.leftArrow}),I?e.default.createElement(i.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:V,innerRef:this.setItemsListRef,allowMouseEvents:this.props.emulateTouch},this.renderItems()):e.default.createElement("ul",{className:t.default.SLIDER(!1,this.state.swiping),ref:function(j){return C.setItemsListRef(j)},style:V},this.renderItems()),e.default.createElement("button",{type:"button",className:t.default.ARROW_NEXT(!k),onClick:function(){return C.slideLeft()},"aria-label":this.props.labels.rightArrow})))}}]),L}(e.Component);return Li.default=_,S(_,"displayName","Thumbs"),S(_,"defaultProps",{axis:"horizontal",labels:{leftArrow:"previous slide / item",rightArrow:"next slide / item",item:"slide item"},selectedItem:0,thumbWidth:80,transitionTime:350}),Li}var zi={},$l;function Dg(){if($l)return zi;$l=1,Object.defineProperty(zi,"__esModule",{value:!0}),zi.default=void 0;var e=function(){return document};return zi.default=e,zi}var On={},Nl;function Bc(){if(Nl)return On;Nl=1,Object.defineProperty(On,"__esModule",{value:!0}),On.setPosition=On.getPosition=On.isKeyboardEvent=On.defaultStatusFormatter=On.noop=void 0;var e=oo(),t=n(Ls());function n(s){return s&&s.__esModule?s:{default:s}}var r=function(){};On.noop=r;var i=function(u,c){return"".concat(u," of ").concat(c)};On.defaultStatusFormatter=i;var o=function(u){return u?u.hasOwnProperty("key"):!1};On.isKeyboardEvent=o;var a=function(u,c){if(c.infiniteLoop&&++u,u===0)return 0;var d=e.Children.count(c.children);if(c.centerMode&&c.axis==="horizontal"){var f=-u*c.centerSlidePercentage,h=d-1;return u&&(u!==h||c.infiniteLoop)?f+=(100-c.centerSlidePercentage)/2:u===h&&(f+=100-c.centerSlidePercentage),f}return-u*100};On.getPosition=a;var l=function(u,c){var d={};return["WebkitTransform","MozTransform","MsTransform","OTransform","transform","msTransform"].forEach(function(f){d[f]=(0,t.default)(u,"%",c)}),d};return On.setPosition=l,On}var Qn={},Bl;function Og(){if(Bl)return Qn;Bl=1,Object.defineProperty(Qn,"__esModule",{value:!0}),Qn.fadeAnimationHandler=Qn.slideStopSwipingHandler=Qn.slideSwipeAnimationHandler=Qn.slideAnimationHandler=void 0;var e=oo(),t=r(Ls()),n=Bc();function r(d){return d&&d.__esModule?d:{default:d}}function i(d,f){var h=Object.keys(d);if(Object.getOwnPropertySymbols){var m=Object.getOwnPropertySymbols(d);f&&(m=m.filter(function(p){return Object.getOwnPropertyDescriptor(d,p).enumerable})),h.push.apply(h,m)}return h}function o(d){for(var f=1;f<arguments.length;f++){var h=arguments[f]!=null?arguments[f]:{};f%2?i(Object(h),!0).forEach(function(m){a(d,m,h[m])}):Object.getOwnPropertyDescriptors?Object.defineProperties(d,Object.getOwnPropertyDescriptors(h)):i(Object(h)).forEach(function(m){Object.defineProperty(d,m,Object.getOwnPropertyDescriptor(h,m))})}return d}function a(d,f,h){return f in d?Object.defineProperty(d,f,{value:h,enumerable:!0,configurable:!0,writable:!0}):d[f]=h,d}var l=function(f,h){var m={},p=h.selectedItem,v=p,y=e.Children.count(f.children)-1,b=f.infiniteLoop&&(p<0||p>y);if(b)return v<0?f.centerMode&&f.centerSlidePercentage&&f.axis==="horizontal"?m.itemListStyle=(0,n.setPosition)(-(y+2)*f.centerSlidePercentage-(100-f.centerSlidePercentage)/2,f.axis):m.itemListStyle=(0,n.setPosition)(-(y+2)*100,f.axis):v>y&&(m.itemListStyle=(0,n.setPosition)(0,f.axis)),m;var R=(0,n.getPosition)(p,f),O=(0,t.default)(R,"%",f.axis),S=f.transitionTime+"ms";return m.itemListStyle={WebkitTransform:O,msTransform:O,OTransform:O,transform:O},h.swiping||(m.itemListStyle=o(o({},m.itemListStyle),{},{WebkitTransitionDuration:S,MozTransitionDuration:S,OTransitionDuration:S,transitionDuration:S,msTransitionDuration:S})),m};Qn.slideAnimationHandler=l;var s=function(f,h,m,p){var v={},y=h.axis==="horizontal",b=e.Children.count(h.children),R=0,O=(0,n.getPosition)(m.selectedItem,h),S=h.infiniteLoop?(0,n.getPosition)(b-1,h)-100:(0,n.getPosition)(b-1,h),M=y?f.x:f.y,_=M;O===R&&M>0&&(_=0),O===S&&M<0&&(_=0);var E=O+100/(m.itemSize/_),x=Math.abs(M)>h.swipeScrollTolerance;return h.infiniteLoop&&x&&(m.selectedItem===0&&E>-100?E-=b*100:m.selectedItem===b-1&&E<-b*100&&(E+=b*100)),(!h.preventMovementUntilSwipeScrollTolerance||x||m.swipeMovementStarted)&&(m.swipeMovementStarted||p({swipeMovementStarted:!0}),v.itemListStyle=(0,n.setPosition)(E,h.axis)),x&&!m.cancelClick&&p({cancelClick:!0}),v};Qn.slideSwipeAnimationHandler=s;var u=function(f,h){var m=(0,n.getPosition)(h.selectedItem,f),p=(0,n.setPosition)(m,f.axis);return{itemListStyle:p}};Qn.slideStopSwipingHandler=u;var c=function(f,h){var m=f.transitionTime+"ms",p="ease-in-out",v={position:"absolute",display:"block",zIndex:-2,minHeight:"100%",opacity:0,top:0,right:0,left:0,bottom:0,transitionTimingFunction:p,msTransitionTimingFunction:p,MozTransitionTimingFunction:p,WebkitTransitionTimingFunction:p,OTransitionTimingFunction:p};return h.swiping||(v=o(o({},v),{},{WebkitTransitionDuration:m,MozTransitionDuration:m,OTransitionDuration:m,transitionDuration:m,msTransitionDuration:m})),{slideStyle:v,selectedStyle:o(o({},v),{},{opacity:1,position:"relative"}),prevStyle:o({},v)}};return Qn.fadeAnimationHandler=c,Qn}var Wl;function Pg(){if(Wl)return Pi;Wl=1,Object.defineProperty(Pi,"__esModule",{value:!0}),Pi.default=void 0;var e=c(oo()),t=s(zc()),n=s(Vc()),r=s(Nc()),i=s(Dg()),o=s($c()),a=Bc(),l=Og();function s(D){return D&&D.__esModule?D:{default:D}}function u(){if(typeof WeakMap!="function")return null;var D=new WeakMap;return u=function(){return D},D}function c(D){if(D&&D.__esModule)return D;if(D===null||d(D)!=="object"&&typeof D!="function")return{default:D};var C=u();if(C&&C.has(D))return C.get(D);var I={},T=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var k in D)if(Object.prototype.hasOwnProperty.call(D,k)){var V=T?Object.getOwnPropertyDescriptor(D,k):null;V&&(V.get||V.set)?Object.defineProperty(I,k,V):I[k]=D[k]}return I.default=D,C&&C.set(D,I),I}function d(D){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?d=function(I){return typeof I}:d=function(I){return I&&typeof Symbol=="function"&&I.constructor===Symbol&&I!==Symbol.prototype?"symbol":typeof I},d(D)}function f(){return f=Object.assign||function(D){for(var C=1;C<arguments.length;C++){var I=arguments[C];for(var T in I)Object.prototype.hasOwnProperty.call(I,T)&&(D[T]=I[T])}return D},f.apply(this,arguments)}function h(D,C){var I=Object.keys(D);if(Object.getOwnPropertySymbols){var T=Object.getOwnPropertySymbols(D);C&&(T=T.filter(function(k){return Object.getOwnPropertyDescriptor(D,k).enumerable})),I.push.apply(I,T)}return I}function m(D){for(var C=1;C<arguments.length;C++){var I=arguments[C]!=null?arguments[C]:{};C%2?h(Object(I),!0).forEach(function(T){x(D,T,I[T])}):Object.getOwnPropertyDescriptors?Object.defineProperties(D,Object.getOwnPropertyDescriptors(I)):h(Object(I)).forEach(function(T){Object.defineProperty(D,T,Object.getOwnPropertyDescriptor(I,T))})}return D}function p(D,C){if(!(D instanceof C))throw new TypeError("Cannot call a class as a function")}function v(D,C){for(var I=0;I<C.length;I++){var T=C[I];T.enumerable=T.enumerable||!1,T.configurable=!0,"value"in T&&(T.writable=!0),Object.defineProperty(D,T.key,T)}}function y(D,C,I){return C&&v(D.prototype,C),D}function b(D,C){if(typeof C!="function"&&C!==null)throw new TypeError("Super expression must either be null or a function");D.prototype=Object.create(C&&C.prototype,{constructor:{value:D,writable:!0,configurable:!0}}),C&&R(D,C)}function R(D,C){return R=Object.setPrototypeOf||function(T,k){return T.__proto__=k,T},R(D,C)}function O(D){var C=_();return function(){var T=E(D),k;if(C){var V=E(this).constructor;k=Reflect.construct(T,arguments,V)}else k=T.apply(this,arguments);return S(this,k)}}function S(D,C){return C&&(d(C)==="object"||typeof C=="function")?C:M(D)}function M(D){if(D===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return D}function _(){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 E(D){return E=Object.setPrototypeOf?Object.getPrototypeOf:function(I){return I.__proto__||Object.getPrototypeOf(I)},E(D)}function x(D,C,I){return C in D?Object.defineProperty(D,C,{value:I,enumerable:!0,configurable:!0,writable:!0}):D[C]=I,D}var L=function(D){b(I,D);var C=O(I);function I(T){var k;p(this,I),k=C.call(this,T),x(M(k),"thumbsRef",void 0),x(M(k),"carouselWrapperRef",void 0),x(M(k),"listRef",void 0),x(M(k),"itemsRef",void 0),x(M(k),"timer",void 0),x(M(k),"animationHandler",void 0),x(M(k),"setThumbsRef",function(N){k.thumbsRef=N}),x(M(k),"setCarouselWrapperRef",function(N){k.carouselWrapperRef=N}),x(M(k),"setListRef",function(N){k.listRef=N}),x(M(k),"setItemsRef",function(N,U){k.itemsRef||(k.itemsRef=[]),k.itemsRef[U]=N}),x(M(k),"autoPlay",function(){e.Children.count(k.props.children)<=1||(k.clearAutoPlay(),k.props.autoPlay&&(k.timer=setTimeout(function(){k.increment()},k.props.interval)))}),x(M(k),"clearAutoPlay",function(){k.timer&&clearTimeout(k.timer)}),x(M(k),"resetAutoPlay",function(){k.clearAutoPlay(),k.autoPlay()}),x(M(k),"stopOnHover",function(){k.setState({isMouseEntered:!0},k.clearAutoPlay)}),x(M(k),"startOnLeave",function(){k.setState({isMouseEntered:!1},k.autoPlay)}),x(M(k),"isFocusWithinTheCarousel",function(){return k.carouselWrapperRef?!!((0,i.default)().activeElement===k.carouselWrapperRef||k.carouselWrapperRef.contains((0,i.default)().activeElement)):!1}),x(M(k),"navigateWithKeyboard",function(N){if(k.isFocusWithinTheCarousel()){var U=k.props.axis,oe=U==="horizontal",ee={ArrowUp:38,ArrowRight:39,ArrowDown:40,ArrowLeft:37},j=oe?ee.ArrowRight:ee.ArrowDown,ne=oe?ee.ArrowLeft:ee.ArrowUp;j===N.keyCode?k.increment():ne===N.keyCode&&k.decrement()}}),x(M(k),"updateSizes",function(){if(!(!k.state.initialized||!k.itemsRef||k.itemsRef.length===0)){var N=k.props.axis==="horizontal",U=k.itemsRef[0];if(U){var oe=N?U.clientWidth:U.clientHeight;k.setState({itemSize:oe}),k.thumbsRef&&k.thumbsRef.updateSizes()}}}),x(M(k),"setMountState",function(){k.setState({hasMount:!0}),k.updateSizes()}),x(M(k),"handleClickItem",function(N,U){if(e.Children.count(k.props.children)!==0){if(k.state.cancelClick){k.setState({cancelClick:!1});return}k.props.onClickItem(N,U),N!==k.state.selectedItem&&k.setState({selectedItem:N})}}),x(M(k),"handleOnChange",function(N,U){e.Children.count(k.props.children)<=1||k.props.onChange(N,U)}),x(M(k),"handleClickThumb",function(N,U){k.props.onClickThumb(N,U),k.moveTo(N)}),x(M(k),"onSwipeStart",function(N){k.setState({swiping:!0}),k.props.onSwipeStart(N)}),x(M(k),"onSwipeEnd",function(N){k.setState({swiping:!1,cancelClick:!1,swipeMovementStarted:!1}),k.props.onSwipeEnd(N),k.clearAutoPlay(),k.state.autoPlay&&k.autoPlay()}),x(M(k),"onSwipeMove",function(N,U){k.props.onSwipeMove(U);var oe=k.props.swipeAnimationHandler(N,k.props,k.state,k.setState.bind(M(k)));return k.setState(m({},oe)),!!Object.keys(oe).length}),x(M(k),"decrement",function(){var N=arguments.length>0&&arguments[0]!==void 0?arguments[0]:1;k.moveTo(k.state.selectedItem-(typeof N=="number"?N:1))}),x(M(k),"increment",function(){var N=arguments.length>0&&arguments[0]!==void 0?arguments[0]:1;k.moveTo(k.state.selectedItem+(typeof N=="number"?N:1))}),x(M(k),"moveTo",function(N){if(typeof N=="number"){var U=e.Children.count(k.props.children)-1;N<0&&(N=k.props.infiniteLoop?U:0),N>U&&(N=k.props.infiniteLoop?0:U),k.selectItem({selectedItem:N}),k.state.autoPlay&&k.state.isMouseEntered===!1&&k.resetAutoPlay()}}),x(M(k),"onClickNext",function(){k.increment(1)}),x(M(k),"onClickPrev",function(){k.decrement(1)}),x(M(k),"onSwipeForward",function(){k.increment(1),k.props.emulateTouch&&k.setState({cancelClick:!0})}),x(M(k),"onSwipeBackwards",function(){k.decrement(1),k.props.emulateTouch&&k.setState({cancelClick:!0})}),x(M(k),"changeItem",function(N){return function(U){(!(0,a.isKeyboardEvent)(U)||U.key==="Enter")&&k.moveTo(N)}}),x(M(k),"selectItem",function(N){k.setState(m({previousItem:k.state.selectedItem},N),function(){k.setState(k.animationHandler(k.props,k.state))}),k.handleOnChange(N.selectedItem,e.Children.toArray(k.props.children)[N.selectedItem])}),x(M(k),"getInitialImage",function(){var N=k.props.selectedItem,U=k.itemsRef&&k.itemsRef[N],oe=U&&U.getElementsByTagName("img")||[];return oe[0]}),x(M(k),"getVariableItemHeight",function(N){var U=k.itemsRef&&k.itemsRef[N];if(k.state.hasMount&&U&&U.children.length){var oe=U.children[0].getElementsByTagName("img")||[];if(oe.length>0){var ee=oe[0];if(!ee.complete){var j=function ue(){k.forceUpdate(),ee.removeEventListener("load",ue)};ee.addEventListener("load",j)}}var ne=oe[0]||U.children[0],ie=ne.clientHeight;return ie>0?ie:null}return null});var V={initialized:!1,previousItem:T.selectedItem,selectedItem:T.selectedItem,hasMount:!1,isMouseEntered:!1,autoPlay:T.autoPlay,swiping:!1,swipeMovementStarted:!1,cancelClick:!1,itemSize:1,itemListStyle:{},slideStyle:{},selectedStyle:{},prevStyle:{}};return k.animationHandler=typeof T.animationHandler=="function"&&T.animationHandler||T.animationHandler==="fade"&&l.fadeAnimationHandler||l.slideAnimationHandler,k.state=m(m({},V),k.animationHandler(T,V)),k}return y(I,[{key:"componentDidMount",value:function(){this.props.children&&this.setupCarousel()}},{key:"componentDidUpdate",value:function(k,V){!k.children&&this.props.children&&!this.state.initialized&&this.setupCarousel(),!k.autoFocus&&this.props.autoFocus&&this.forceFocus(),V.swiping&&!this.state.swiping&&this.setState(m({},this.props.stopSwipingHandler(this.props,this.state))),(k.selectedItem!==this.props.selectedItem||k.centerMode!==this.props.centerMode)&&(this.updateSizes(),this.moveTo(this.props.selectedItem)),k.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 k=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 V=k.getInitialImage();V&&!V.complete?V.addEventListener("load",k.setMountState):k.setMountState()})}},{key:"destroyCarousel",value:function(){this.state.initialized&&(this.unbindEvents(),this.destroyAutoPlay())}},{key:"setupAutoPlay",value:function(){this.autoPlay();var k=this.carouselWrapperRef;this.props.stopOnHover&&k&&(k.addEventListener("mouseenter",this.stopOnHover),k.addEventListener("mouseleave",this.startOnLeave))}},{key:"destroyAutoPlay",value:function(){this.clearAutoPlay();var k=this.carouselWrapperRef;this.props.stopOnHover&&k&&(k.removeEventListener("mouseenter",this.stopOnHover),k.removeEventListener("mouseleave",this.startOnLeave))}},{key:"bindEvents",value:function(){(0,o.default)().addEventListener("resize",this.updateSizes),(0,o.default)().addEventListener("DOMContentLoaded",this.updateSizes),this.props.useKeyboardArrows&&(0,i.default)().addEventListener("keydown",this.navigateWithKeyboard)}},{key:"unbindEvents",value:function(){(0,o.default)().removeEventListener("resize",this.updateSizes),(0,o.default)().removeEventListener("DOMContentLoaded",this.updateSizes);var k=this.getInitialImage();k&&k.removeEventListener("load",this.setMountState),this.props.useKeyboardArrows&&(0,i.default)().removeEventListener("keydown",this.navigateWithKeyboard)}},{key:"forceFocus",value:function(){var k;(k=this.carouselWrapperRef)===null||k===void 0||k.focus()}},{key:"renderItems",value:function(k){var V=this;return this.props.children?e.Children.map(this.props.children,function(N,U){var oe=U===V.state.selectedItem,ee=U===V.state.previousItem,j=oe&&V.state.selectedStyle||ee&&V.state.prevStyle||V.state.slideStyle||{};V.props.centerMode&&V.props.axis==="horizontal"&&(j=m(m({},j),{},{minWidth:V.props.centerSlidePercentage+"%"})),V.state.swiping&&V.state.swipeMovementStarted&&(j=m(m({},j),{},{pointerEvents:"none"}));var ne={ref:function(ue){return V.setItemsRef(ue,U)},key:"itemKey"+U+(k?"clone":""),className:n.default.ITEM(!0,U===V.state.selectedItem,U===V.state.previousItem),onClick:V.handleClickItem.bind(V,U,N),style:j};return e.default.createElement("li",ne,V.props.renderItem(N,{isSelected:U===V.state.selectedItem,isPrevious:U===V.state.previousItem}))}):[]}},{key:"renderControls",value:function(){var k=this,V=this.props,N=V.showIndicators,U=V.labels,oe=V.renderIndicator,ee=V.children;return N?e.default.createElement("ul",{className:"control-dots"},e.Children.map(ee,function(j,ne){return oe&&oe(k.changeItem(ne),ne===k.state.selectedItem,ne,U.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(r.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 k=this;if(!this.props.children||e.Children.count(this.props.children)===0)return null;var V=this.props.swipeable&&e.Children.count(this.props.children)>1,N=this.props.axis==="horizontal",U=this.props.showArrows&&e.Children.count(this.props.children)>1,oe=U&&(this.state.selectedItem>0||this.props.infiniteLoop)||!1,ee=U&&(this.state.selectedItem<e.Children.count(this.props.children)-1||this.props.infiniteLoop)||!1,j=this.renderItems(!0),ne=j.shift(),ie=j.pop(),ue={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},ge={};if(N){if(ue.onSwipeLeft=this.onSwipeForward,ue.onSwipeRight=this.onSwipeBackwards,this.props.dynamicHeight){var J=this.getVariableItemHeight(this.state.selectedItem);ge.height=J||"auto"}}else ue.onSwipeUp=this.props.verticalSwipe==="natural"?this.onSwipeBackwards:this.onSwipeForward,ue.onSwipeDown=this.props.verticalSwipe==="natural"?this.onSwipeForward:this.onSwipeBackwards,ue.style=m(m({},ue.style),{},{height:this.state.itemSize}),ge.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,oe,this.props.labels.leftArrow),e.default.createElement("div",{className:n.default.WRAPPER(!0,this.props.axis),style:ge},V?e.default.createElement(t.default,f({tagName:"ul",innerRef:this.setListRef},ue,{allowMouseEvents:this.props.emulateTouch}),this.props.infiniteLoop&&ie,this.renderItems(),this.props.infiniteLoop&&ne):e.default.createElement("ul",{className:n.default.SLIDER(!0,this.state.swiping),ref:function(P){return k.setListRef(P)},style:this.state.itemListStyle||{}},this.props.infiniteLoop&&ie,this.renderItems(),this.props.infiniteLoop&&ne)),this.props.renderArrowNext(this.onClickNext,ee,this.props.labels.rightArrow),this.renderStatus()),this.renderThumbs())}}]),I}(e.default.Component);return Pi.default=L,x(L,"displayName","Carousel"),x(L,"defaultProps",{ariaLabel:void 0,axis:"horizontal",centerSlidePercentage:80,interval:3e3,labels:{leftArrow:"previous slide / item",rightArrow:"next slide / item",item:"slide item"},onClickItem:a.noop,onClickThumb:a.noop,onChange:a.noop,onSwipeStart:function(){},onSwipeEnd:function(){},onSwipeMove:function(){return!1},preventMovementUntilSwipeScrollTolerance:!1,renderArrowPrev:function(C,I,T){return e.default.createElement("button",{type:"button","aria-label":T,className:n.default.ARROW_PREV(!I),onClick:C})},renderArrowNext:function(C,I,T){return e.default.createElement("button",{type:"button","aria-label":T,className:n.default.ARROW_NEXT(!I),onClick:C})},renderIndicator:function(C,I,T,k){return e.default.createElement("li",{className:n.default.DOT(I),onClick:C,onKeyDown:C,value:T,key:T,role:"button",tabIndex:0,"aria-label":"".concat(k," ").concat(T+1)})},renderItem:function(C){return C},renderThumbs:function(C){var I=e.Children.map(C,function(T){var k=T;if(T.type!=="img"&&(k=e.Children.toArray(T.props.children).find(function(V){return V.type==="img"})),!!k)return k});return I.filter(function(T){return T}).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"),[]):I},statusFormatter:a.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:l.slideSwipeAnimationHandler,stopSwipingHandler:l.slideStopSwipingHandler}),Pi}var Ul={},ql;function _g(){return ql||(ql=1),Ul}var Yl;function Lg(){return Yl||(Yl=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 r.default}});var t=i(Pg()),n=_g(),r=i(Nc());function i(o){return o&&o.__esModule?o:{default:o}}}(Ya)),Ya}var Fg=Lg(),Xa,Xl;function Ag(){if(Xl)return Xa;Xl=1;var e=ah(),t=function(){return e.Date.now()};return Xa=t,Xa}var ja,jl;function Wc(){if(jl)return ja;jl=1;var e=yc(),t=Ag(),n=Cc(),r="Expected a function",i=Math.max,o=Math.min;function a(l,s,u){var c,d,f,h,m,p,v=0,y=!1,b=!1,R=!0;if(typeof l!="function")throw new TypeError(r);s=n(s)||0,e(u)&&(y=!!u.leading,b="maxWait"in u,f=b?i(n(u.maxWait)||0,s):f,R="trailing"in u?!!u.trailing:R);function O(I){var T=c,k=d;return c=d=void 0,v=I,h=l.apply(k,T),h}function S(I){return v=I,m=setTimeout(E,s),y?O(I):h}function M(I){var T=I-p,k=I-v,V=s-T;return b?o(V,f-k):V}function _(I){var T=I-p,k=I-v;return p===void 0||T>=s||T<0||b&&k>=f}function E(){var I=t();if(_(I))return x(I);m=setTimeout(E,M(I))}function x(I){return m=void 0,R&&c?O(I):(c=d=void 0,h)}function L(){m!==void 0&&clearTimeout(m),v=0,c=p=d=m=void 0}function D(){return m===void 0?h:x(t())}function C(){var I=t(),T=_(I);if(c=arguments,d=this,p=I,T){if(m===void 0)return S(p);if(b)return clearTimeout(m),m=setTimeout(E,s),O(p)}return m===void 0&&(m=setTimeout(E,s)),h}return C.cancel=L,C.flush=D,C}return ja=a,ja}var Hg=Wc();const Uc=pr(Hg);function gn(e,t,n,r,i=!1){const o=g.useRef();o.current=t,g.useEffect(()=>{if(n===null||n.addEventListener===void 0)return;const a=n,l=s=>{var u;(u=o.current)==null||u.call(a,s)};return a.addEventListener(e,l,{passive:r,capture:i}),()=>{a.removeEventListener(e,l,{capture:i})}},[e,n,r,i])}function Br(e,t){return e===void 0?void 0:t}const zg=Math.PI;function Gl(e){return e*zg/180}const qc=(e,t,n)=>({x1:e-n/2,y1:t-n/2,x2:e+n/2,y2:t+n/2}),Yc=(e,t,n,r,i)=>{switch(e){case"left":return Math.floor(t)+r+i/2;case"center":return Math.floor(t+n/2);case"right":return Math.floor(t+n)-r-i/2}},Xc=(e,t,n)=>Math.min(e,t-n*2),jc=(e,t,n)=>n.x1<=e&&e<=n.x2&&n.y1<=t&&t<=n.y2,Fs=e=>{const t=e.fgColor??"currentColor";return g.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},g.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"}),g.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"}))},Vg=e=>{const t=e.fgColor??"currentColor";return g.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},g.createElement("path",{d:"M19 6L10.3802 17L5.34071 11.8758",vectorEffect:"non-scaling-stroke",stroke:t,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}))};function $g(e,t,n){const[r,i]=g.useState(e),o=g.useRef(!0);g.useEffect(()=>()=>{o.current=!1},[]);const a=g.useRef(Uc(l=>{o.current&&i(l)},n));return g.useLayoutEffect(()=>{o.current&&a.current(()=>e())},t),r}const Ng="֑-߿יִ-﷽ﹰ-ﻼ",Bg="A-Za-zÀ-ÖØ-öø-ʸ̀-ࠀ-Ⰰ-︀--",Wg=new RegExp("^[^"+Bg+"]*["+Ng+"]");function As(e){return Wg.test(e)?"rtl":"not-rtl"}let Lo;function bs(){if(typeof document>"u")return 0;if(Lo!==void 0)return Lo;const e=document.createElement("p");e.style.width="100%",e.style.height="200px";const t=document.createElement("div");t.id="testScrollbar",t.style.position="absolute",t.style.top="0px",t.style.left="0px",t.style.visibility="hidden",t.style.width="200px",t.style.height="150px",t.style.overflow="hidden",t.append(e),document.body.append(t);const n=e.offsetWidth;t.style.overflow="scroll";let r=e.offsetWidth;return n===r&&(r=t.clientWidth),t.remove(),Lo=n-r,Lo}const Vr=Symbol();function Ug(e){const t=g.useRef([Vr,e]);t.current[1]!==e&&(t.current[0]=e),t.current[1]=e;const[n,r]=g.useState(e),[,i]=g.useState(),o=g.useCallback(l=>{const s=t.current[0];s!==Vr&&(l=typeof l=="function"?l(s):l,l===s)||(s!==Vr&&i({}),r(u=>typeof l=="function"?l(s===Vr?u:s):l),t.current[0]=Vr)},[]),a=g.useCallback(()=>{t.current[0]=Vr,i({})},[]);return[t.current[0]===Vr?n:t.current[0],o,a]}function Gc(e){if(e.length===0)return"";let t=0,n=0;for(const r of e){if(n+=r.length,n>1e4)break;t++}return e.slice(0,t).join(", ")}function qg(e){const t=g.useRef(e);return hi(e,t.current)||(t.current=e),t.current}const Yg=e=>{const{urls:t,canWrite:n,onEditClick:r,renderImage:i}=e,o=t.filter(l=>l!=="");if(o.length===0)return null;const a=o.length>1;return g.createElement(Eg,{"data-testid":"GDG-default-image-overlay-editor"},g.createElement(Fg.Carousel,{showArrows:a,showThumbs:!1,swipeable:a,emulateTouch:a,infiniteLoop:a},o.map(l=>{const s=(i==null?void 0:i(l))??g.createElement("img",{draggable:!1,src:l});return g.createElement("div",{className:"gdg-centering-container",key:l},s)})),n&&r&&g.createElement("button",{className:"gdg-edit-icon",onClick:r},g.createElement(Fs,null)))};function Kc(){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 qr=Kc();function Xg(e){qr=e}const Zc=/[&<>"']/,jg=new RegExp(Zc.source,"g"),Jc=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,Gg=new RegExp(Jc.source,"g"),Kg={"&":"&","<":"<",">":">",'"':""","'":"'"},Kl=e=>Kg[e];function wn(e,t){if(t){if(Zc.test(e))return e.replace(jg,Kl)}else if(Jc.test(e))return e.replace(Gg,Kl);return e}const Zg=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function Qc(e){return e.replace(Zg,(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 Jg=/(^|[^\[])\^/g;function Bt(e,t){e=typeof e=="string"?e:e.source,t=t||"";const n={replace:(r,i)=>(i=i.source||i,i=i.replace(Jg,"$1"),e=e.replace(r,i),n),getRegex:()=>new RegExp(e,t)};return n}const Qg=/[^\w:]/g,em=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function Zl(e,t,n){if(e){let r;try{r=decodeURIComponent(Qc(n)).replace(Qg,"").toLowerCase()}catch{return null}if(r.indexOf("javascript:")===0||r.indexOf("vbscript:")===0||r.indexOf("data:")===0)return null}t&&!em.test(n)&&(n=im(t,n));try{n=encodeURI(n).replace(/%25/g,"%")}catch{return null}return n}const Fo={},tm=/^[^:]+:\/*[^/]*$/,nm=/^([^:]+:)[\s\S]*$/,rm=/^([^:]+:\/*[^/]*)[\s\S]*$/;function im(e,t){Fo[" "+e]||(tm.test(e)?Fo[" "+e]=e+"/":Fo[" "+e]=jo(e,"/",!0)),e=Fo[" "+e];const n=e.indexOf(":")===-1;return t.substring(0,2)==="//"?n?t:e.replace(nm,"$1")+t:t.charAt(0)==="/"?n?t:e.replace(rm,"$1")+t:e+t}const ta={exec:function(){}};function Jl(e,t){const n=e.replace(/\|/g,(o,a,l)=>{let s=!1,u=a;for(;--u>=0&&l[u]==="\\";)s=!s;return s?"|":" |"}),r=n.split(/ \|/);let i=0;if(r[0].trim()||r.shift(),r.length>0&&!r[r.length-1].trim()&&r.pop(),r.length>t)r.splice(t);else for(;r.length<t;)r.push("");for(;i<r.length;i++)r[i]=r[i].trim().replace(/\\\|/g,"|");return r}function jo(e,t,n){const r=e.length;if(r===0)return"";let i=0;for(;i<r;){const o=e.charAt(r-i-1);if(o===t&&!n)i++;else if(o!==t&&n)i++;else break}return e.slice(0,r-i)}function om(e,t){if(e.indexOf(t[1])===-1)return-1;const n=e.length;let r=0,i=0;for(;i<n;i++)if(e[i]==="\\")i++;else if(e[i]===t[0])r++;else if(e[i]===t[1]&&(r--,r<0))return i;return-1}function am(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 Ql(e,t){if(t<1)return"";let n="";for(;t>1;)t&1&&(n+=e),t>>=1,e+=e;return n+e}function eu(e,t,n,r){const i=t.href,o=t.title?wn(t.title):null,a=e[1].replace(/\\([\[\]])/g,"$1");if(e[0].charAt(0)!=="!"){r.state.inLink=!0;const l={type:"link",raw:n,href:i,title:o,text:a,tokens:r.inlineTokens(a)};return r.state.inLink=!1,l}return{type:"image",raw:n,href:i,title:o,text:wn(a)}}function sm(e,t){const n=e.match(/^(\s+)(?:```)/);if(n===null)return t;const r=n[1];return t.split(`
|
3
|
+
`).map(i=>{const o=i.match(/^\s+/);if(o===null)return i;const[a]=o;return a.length>=r.length?i.slice(r.length):i}).join(`
|
4
|
+
`)}class Hs{constructor(t){this.options=t||qr}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 r=n[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:n[0],codeBlockStyle:"indented",text:this.options.pedantic?r:jo(r,`
|
5
|
+
`)}}}fences(t){const n=this.rules.block.fences.exec(t);if(n){const r=n[0],i=sm(r,n[3]||"");return{type:"code",raw:r,lang:n[2]?n[2].trim().replace(this.rules.inline._escapes,"$1"):n[2],text:i}}}heading(t){const n=this.rules.block.heading.exec(t);if(n){let r=n[2].trim();if(/#$/.test(r)){const i=jo(r,"#");(this.options.pedantic||!i||/ $/.test(i))&&(r=i.trim())}return{type:"heading",raw:n[0],depth:n[1].length,text:r,tokens:this.lexer.inline(r)}}}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 r=n[0].replace(/^ *>[ \t]?/gm,""),i=this.lexer.state.top;this.lexer.state.top=!0;const o=this.lexer.blockTokens(r);return this.lexer.state.top=i,{type:"blockquote",raw:n[0],tokens:o,text:r}}}list(t){let n=this.rules.block.list.exec(t);if(n){let r,i,o,a,l,s,u,c,d,f,h,m,p=n[1].trim();const v=p.length>1,y={type:"list",raw:"",ordered:v,start:v?+p.slice(0,-1):"",loose:!1,items:[]};p=v?`\\d{1,9}\\${p.slice(-1)}`:`\\${p}`,this.options.pedantic&&(p=v?p:"[*+-]");const b=new RegExp(`^( {0,3}${p})((?:[ ][^\\n]*)?(?:\\n|$))`);for(;t&&(m=!1,!(!(n=b.exec(t))||this.rules.block.hr.test(t)));){if(r=n[0],t=t.substring(r.length),c=n[2].split(`
|
6
|
+
`,1)[0].replace(/^\t+/,O=>" ".repeat(3*O.length)),d=t.split(`
|
7
|
+
`,1)[0],this.options.pedantic?(a=2,h=c.trimLeft()):(a=n[2].search(/[^ ]/),a=a>4?1:a,h=c.slice(a),a+=n[1].length),s=!1,!c&&/^ *$/.test(d)&&(r+=d+`
|
8
|
+
`,t=t.substring(d.length+1),m=!0),!m){const O=new RegExp(`^ {0,${Math.min(3,a-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),S=new RegExp(`^ {0,${Math.min(3,a-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),M=new RegExp(`^ {0,${Math.min(3,a-1)}}(?:\`\`\`|~~~)`),_=new RegExp(`^ {0,${Math.min(3,a-1)}}#`);for(;t&&(f=t.split(`
|
9
|
+
`,1)[0],d=f,this.options.pedantic&&(d=d.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),!(M.test(d)||_.test(d)||O.test(d)||S.test(t)));){if(d.search(/[^ ]/)>=a||!d.trim())h+=`
|
10
|
+
`+d.slice(a);else{if(s||c.search(/[^ ]/)>=4||M.test(c)||_.test(c)||S.test(c))break;h+=`
|
11
|
+
`+d}!s&&!d.trim()&&(s=!0),r+=f+`
|
12
|
+
`,t=t.substring(f.length+1),c=d.slice(a)}}y.loose||(u?y.loose=!0:/\n *\n *$/.test(r)&&(u=!0)),this.options.gfm&&(i=/^\[[ xX]\] /.exec(h),i&&(o=i[0]!=="[ ] ",h=h.replace(/^\[[ xX]\] +/,""))),y.items.push({type:"list_item",raw:r,task:!!i,checked:o,loose:!1,text:h}),y.raw+=r}y.items[y.items.length-1].raw=r.trimRight(),y.items[y.items.length-1].text=h.trimRight(),y.raw=y.raw.trimRight();const R=y.items.length;for(l=0;l<R;l++)if(this.lexer.state.top=!1,y.items[l].tokens=this.lexer.blockTokens(y.items[l].text,[]),!y.loose){const O=y.items[l].tokens.filter(M=>M.type==="space"),S=O.length>0&&O.some(M=>/\n.*\n/.test(M.raw));y.loose=S}if(y.loose)for(l=0;l<R;l++)y.items[l].loose=!0;return y}}html(t){const n=this.rules.block.html.exec(t);if(n){const r={type:"html",raw:n[0],pre:!this.options.sanitizer&&(n[1]==="pre"||n[1]==="script"||n[1]==="style"),text:n[0]};if(this.options.sanitize){const i=this.options.sanitizer?this.options.sanitizer(n[0]):wn(n[0]);r.type="paragraph",r.text=i,r.tokens=this.lexer.inline(i)}return r}}def(t){const n=this.rules.block.def.exec(t);if(n){const r=n[1].toLowerCase().replace(/\s+/g," "),i=n[2]?n[2].replace(/^<(.*)>$/,"$1").replace(this.rules.inline._escapes,"$1"):"",o=n[3]?n[3].substring(1,n[3].length-1).replace(this.rules.inline._escapes,"$1"):n[3];return{type:"def",tag:r,raw:n[0],href:i,title:o}}}table(t){const n=this.rules.block.table.exec(t);if(n){const r={type:"table",header:Jl(n[1]).map(i=>({text:i})),align:n[2].replace(/^ *|\| *$/g,"").split(/ *\| */),rows:n[3]&&n[3].trim()?n[3].replace(/\n[ \t]*$/,"").split(`
|
13
|
+
`):[]};if(r.header.length===r.align.length){r.raw=n[0];let i=r.align.length,o,a,l,s;for(o=0;o<i;o++)/^ *-+: *$/.test(r.align[o])?r.align[o]="right":/^ *:-+: *$/.test(r.align[o])?r.align[o]="center":/^ *:-+ *$/.test(r.align[o])?r.align[o]="left":r.align[o]=null;for(i=r.rows.length,o=0;o<i;o++)r.rows[o]=Jl(r.rows[o],r.header.length).map(u=>({text:u}));for(i=r.header.length,a=0;a<i;a++)r.header[a].tokens=this.lexer.inline(r.header[a].text);for(i=r.rows.length,a=0;a<i;a++)for(s=r.rows[a],l=0;l<s.length;l++)s[l].tokens=this.lexer.inline(s[l].text);return r}}}lheading(t){const n=this.rules.block.lheading.exec(t);if(n)return{type:"heading",raw:n[0],depth:n[2].charAt(0)==="="?1:2,text:n[1],tokens:this.lexer.inline(n[1])}}paragraph(t){const n=this.rules.block.paragraph.exec(t);if(n){const r=n[1].charAt(n[1].length-1)===`
|
14
|
+
`?n[1].slice(0,-1):n[1];return{type:"paragraph",raw:n[0],text:r,tokens:this.lexer.inline(r)}}}text(t){const n=this.rules.block.text.exec(t);if(n)return{type:"text",raw:n[0],text:n[0],tokens:this.lexer.inline(n[0])}}escape(t){const n=this.rules.inline.escape.exec(t);if(n)return{type:"escape",raw:n[0],text:wn(n[1])}}tag(t){const n=this.rules.inline.tag.exec(t);if(n)return!this.lexer.state.inLink&&/^<a /i.test(n[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&/^<\/a>/i.test(n[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(n[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(n[0])&&(this.lexer.state.inRawBlock=!1),{type:this.options.sanitize?"text":"html",raw:n[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(n[0]):wn(n[0]):n[0]}}link(t){const n=this.rules.inline.link.exec(t);if(n){const r=n[2].trim();if(!this.options.pedantic&&/^</.test(r)){if(!/>$/.test(r))return;const a=jo(r.slice(0,-1),"\\");if((r.length-a.length)%2===0)return}else{const a=om(n[2],"()");if(a>-1){const s=(n[0].indexOf("!")===0?5:4)+n[1].length+a;n[2]=n[2].substring(0,a),n[0]=n[0].substring(0,s).trim(),n[3]=""}}let i=n[2],o="";if(this.options.pedantic){const a=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(i);a&&(i=a[1],o=a[3])}else o=n[3]?n[3].slice(1,-1):"";return i=i.trim(),/^</.test(i)&&(this.options.pedantic&&!/>$/.test(r)?i=i.slice(1):i=i.slice(1,-1)),eu(n,{href:i&&i.replace(this.rules.inline._escapes,"$1"),title:o&&o.replace(this.rules.inline._escapes,"$1")},n[0],this.lexer)}}reflink(t,n){let r;if((r=this.rules.inline.reflink.exec(t))||(r=this.rules.inline.nolink.exec(t))){let i=(r[2]||r[1]).replace(/\s+/g," ");if(i=n[i.toLowerCase()],!i){const o=r[0].charAt(0);return{type:"text",raw:o,text:o}}return eu(r,i,r[0],this.lexer)}}emStrong(t,n,r=""){let i=this.rules.inline.emStrong.lDelim.exec(t);if(!i||i[3]&&r.match(/[\p{L}\p{N}]/u))return;const o=i[1]||i[2]||"";if(!o||o&&(r===""||this.rules.inline.punctuation.exec(r))){const a=i[0].length-1;let l,s,u=a,c=0;const d=i[0][0]==="*"?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(d.lastIndex=0,n=n.slice(-1*t.length+a);(i=d.exec(n))!=null;){if(l=i[1]||i[2]||i[3]||i[4]||i[5]||i[6],!l)continue;if(s=l.length,i[3]||i[4]){u+=s;continue}else if((i[5]||i[6])&&a%3&&!((a+s)%3)){c+=s;continue}if(u-=s,u>0)continue;s=Math.min(s,s+u+c);const f=t.slice(0,a+i.index+(i[0].length-l.length)+s);if(Math.min(a,s)%2){const m=f.slice(1,-1);return{type:"em",raw:f,text:m,tokens:this.lexer.inlineTokens(m)}}const h=f.slice(2,-2);return{type:"strong",raw:f,text:h,tokens:this.lexer.inlineTokens(h)}}}}codespan(t){const n=this.rules.inline.code.exec(t);if(n){let r=n[2].replace(/\n/g," ");const i=/[^ ]/.test(r),o=/^ /.test(r)&&/ $/.test(r);return i&&o&&(r=r.substring(1,r.length-1)),r=wn(r,!0),{type:"codespan",raw:n[0],text:r}}}br(t){const n=this.rules.inline.br.exec(t);if(n)return{type:"br",raw:n[0]}}del(t){const n=this.rules.inline.del.exec(t);if(n)return{type:"del",raw:n[0],text:n[2],tokens:this.lexer.inlineTokens(n[2])}}autolink(t,n){const r=this.rules.inline.autolink.exec(t);if(r){let i,o;return r[2]==="@"?(i=wn(this.options.mangle?n(r[1]):r[1]),o="mailto:"+i):(i=wn(r[1]),o=i),{type:"link",raw:r[0],text:i,href:o,tokens:[{type:"text",raw:i,text:i}]}}}url(t,n){let r;if(r=this.rules.inline.url.exec(t)){let i,o;if(r[2]==="@")i=wn(this.options.mangle?n(r[0]):r[0]),o="mailto:"+i;else{let a;do a=r[0],r[0]=this.rules.inline._backpedal.exec(r[0])[0];while(a!==r[0]);i=wn(r[0]),r[1]==="www."?o="http://"+r[0]:o=r[0]}return{type:"link",raw:r[0],text:i,href:o,tokens:[{type:"text",raw:i,text:i}]}}}inlineText(t,n){const r=this.rules.inline.text.exec(t);if(r){let i;return this.lexer.state.inRawBlock?i=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(r[0]):wn(r[0]):r[0]:i=wn(this.options.smartypants?n(r[0]):r[0]),{type:"text",raw:r[0],text:i}}}}const Ye={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,hr:/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/,html:"^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))",def:/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/,table:ta,lheading:/^((?:.|\n(?!\n))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,text:/^[^\n]+/};Ye._label=/(?!\s*\])(?:\\.|[^\[\]\\])+/;Ye._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/;Ye.def=Bt(Ye.def).replace("label",Ye._label).replace("title",Ye._title).getRegex();Ye.bullet=/(?:[*+-]|\d{1,9}[.)])/;Ye.listItemStart=Bt(/^( *)(bull) */).replace("bull",Ye.bullet).getRegex();Ye.list=Bt(Ye.list).replace(/bull/g,Ye.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+Ye.def.source+")").getRegex();Ye._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul";Ye._comment=/<!--(?!-?>)[\s\S]*?(?:-->|$)/;Ye.html=Bt(Ye.html,"i").replace("comment",Ye._comment).replace("tag",Ye._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex();Ye.paragraph=Bt(Ye._paragraph).replace("hr",Ye.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Ye._tag).getRegex();Ye.blockquote=Bt(Ye.blockquote).replace("paragraph",Ye.paragraph).getRegex();Ye.normal={...Ye};Ye.gfm={...Ye.normal,table:"^ *([^\\n ].*\\|.*)\\n {0,3}(?:\\| *)?(:?-+:? *(?:\\| *:?-+:? *)*)(?:\\| *)?(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"};Ye.gfm.table=Bt(Ye.gfm.table).replace("hr",Ye.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Ye._tag).getRegex();Ye.gfm.paragraph=Bt(Ye._paragraph).replace("hr",Ye.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("table",Ye.gfm.table).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Ye._tag).getRegex();Ye.pedantic={...Ye.normal,html:Bt(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Ye._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:ta,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Bt(Ye.normal._paragraph).replace("hr",Ye.hr).replace("heading",` *#{1,6} *[^
|
15
|
+
]`).replace("lheading",Ye.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()};const Ie={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:ta,tag:"^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(ref)\]/,nolink:/^!?\[(ref)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",emStrong:{lDelim:/^(?:\*+(?:([punct_])|[^\s*]))|^_+(?:([punct*])|([^\s_]))/,rDelimAst:/^(?:[^_*\\]|\\.)*?\_\_(?:[^_*\\]|\\.)*?\*(?:[^_*\\]|\\.)*?(?=\_\_)|(?:[^*\\]|\\.)+(?=[^*])|[punct_](\*+)(?=[\s]|$)|(?:[^punct*_\s\\]|\\.)(\*+)(?=[punct_\s]|$)|[punct_\s](\*+)(?=[^punct*_\s])|[\s](\*+)(?=[punct_])|[punct_](\*+)(?=[punct_])|(?:[^punct*_\s\\]|\\.)(\*+)(?=[^punct*_\s])/,rDelimUnd:/^(?:[^_*\\]|\\.)*?\*\*(?:[^_*\\]|\\.)*?\_(?:[^_*\\]|\\.)*?(?=\*\*)|(?:[^_\\]|\\.)+(?=[^_])|[punct*](\_+)(?=[\s]|$)|(?:[^punct*_\s\\]|\\.)(\_+)(?=[punct*\s]|$)|[punct*\s](\_+)(?=[^punct*_\s])|[\s](\_+)(?=[punct*])|[punct*](\_+)(?=[punct*])/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:ta,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,punctuation:/^([\spunctuation])/};Ie._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~";Ie.punctuation=Bt(Ie.punctuation).replace(/punctuation/g,Ie._punctuation).getRegex();Ie.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g;Ie.escapedEmSt=/(?:^|[^\\])(?:\\\\)*\\[*_]/g;Ie._comment=Bt(Ye._comment).replace("(?:-->|$)","-->").getRegex();Ie.emStrong.lDelim=Bt(Ie.emStrong.lDelim).replace(/punct/g,Ie._punctuation).getRegex();Ie.emStrong.rDelimAst=Bt(Ie.emStrong.rDelimAst,"g").replace(/punct/g,Ie._punctuation).getRegex();Ie.emStrong.rDelimUnd=Bt(Ie.emStrong.rDelimUnd,"g").replace(/punct/g,Ie._punctuation).getRegex();Ie._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g;Ie._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/;Ie._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/;Ie.autolink=Bt(Ie.autolink).replace("scheme",Ie._scheme).replace("email",Ie._email).getRegex();Ie._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/;Ie.tag=Bt(Ie.tag).replace("comment",Ie._comment).replace("attribute",Ie._attribute).getRegex();Ie._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/;Ie._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/;Ie._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/;Ie.link=Bt(Ie.link).replace("label",Ie._label).replace("href",Ie._href).replace("title",Ie._title).getRegex();Ie.reflink=Bt(Ie.reflink).replace("label",Ie._label).replace("ref",Ye._label).getRegex();Ie.nolink=Bt(Ie.nolink).replace("ref",Ye._label).getRegex();Ie.reflinkSearch=Bt(Ie.reflinkSearch,"g").replace("reflink",Ie.reflink).replace("nolink",Ie.nolink).getRegex();Ie.normal={...Ie};Ie.pedantic={...Ie.normal,strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:Bt(/^!?\[(label)\]\((.*?)\)/).replace("label",Ie._label).getRegex(),reflink:Bt(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Ie._label).getRegex()};Ie.gfm={...Ie.normal,escape:Bt(Ie.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/};Ie.gfm.url=Bt(Ie.gfm.url,"i").replace("email",Ie.gfm._extended_email).getRegex();Ie.breaks={...Ie.gfm,br:Bt(Ie.br).replace("{2,}","*").getRegex(),text:Bt(Ie.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()};function lm(e){return e.replace(/---/g,"—").replace(/--/g,"–").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1‘").replace(/'/g,"’").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1“").replace(/"/g,"”").replace(/\.{3}/g,"…")}function tu(e){let t="",n,r;const i=e.length;for(n=0;n<i;n++)r=e.charCodeAt(n),Math.random()>.5&&(r="x"+r.toString(16)),t+="&#"+r+";";return t}class Tr{constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||qr,this.options.tokenizer=this.options.tokenizer||new Hs,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const n={block:Ye.normal,inline:Ie.normal};this.options.pedantic?(n.block=Ye.pedantic,n.inline=Ie.pedantic):this.options.gfm&&(n.block=Ye.gfm,this.options.breaks?n.inline=Ie.breaks:n.inline=Ie.gfm),this.tokenizer.rules=n}static get rules(){return{block:Ye,inline:Ie}}static lex(t,n){return new Tr(n).lex(t)}static lexInline(t,n){return new Tr(n).inlineTokens(t)}lex(t){t=t.replace(/\r\n|\r/g,`
|
16
|
+
`),this.blockTokens(t,this.tokens);let n;for(;n=this.inlineQueue.shift();)this.inlineTokens(n.src,n.tokens);return this.tokens}blockTokens(t,n=[]){this.options.pedantic?t=t.replace(/\t/g," ").replace(/^ +$/gm,""):t=t.replace(/^( *)(\t+)/gm,(l,s,u)=>s+" ".repeat(u.length));let r,i,o,a;for(;t;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(l=>(r=l.call({lexer:this},t,n))?(t=t.substring(r.raw.length),n.push(r),!0):!1))){if(r=this.tokenizer.space(t)){t=t.substring(r.raw.length),r.raw.length===1&&n.length>0?n[n.length-1].raw+=`
|
17
|
+
`:n.push(r);continue}if(r=this.tokenizer.code(t)){t=t.substring(r.raw.length),i=n[n.length-1],i&&(i.type==="paragraph"||i.type==="text")?(i.raw+=`
|
18
|
+
`+r.raw,i.text+=`
|
19
|
+
`+r.text,this.inlineQueue[this.inlineQueue.length-1].src=i.text):n.push(r);continue}if(r=this.tokenizer.fences(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.heading(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.hr(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.blockquote(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.list(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.html(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.def(t)){t=t.substring(r.raw.length),i=n[n.length-1],i&&(i.type==="paragraph"||i.type==="text")?(i.raw+=`
|
20
|
+
`+r.raw,i.text+=`
|
21
|
+
`+r.raw,this.inlineQueue[this.inlineQueue.length-1].src=i.text):this.tokens.links[r.tag]||(this.tokens.links[r.tag]={href:r.href,title:r.title});continue}if(r=this.tokenizer.table(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.lheading(t)){t=t.substring(r.raw.length),n.push(r);continue}if(o=t,this.options.extensions&&this.options.extensions.startBlock){let l=1/0;const s=t.slice(1);let u;this.options.extensions.startBlock.forEach(function(c){u=c.call({lexer:this},s),typeof u=="number"&&u>=0&&(l=Math.min(l,u))}),l<1/0&&l>=0&&(o=t.substring(0,l+1))}if(this.state.top&&(r=this.tokenizer.paragraph(o))){i=n[n.length-1],a&&i.type==="paragraph"?(i.raw+=`
|
22
|
+
`+r.raw,i.text+=`
|
23
|
+
`+r.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=i.text):n.push(r),a=o.length!==t.length,t=t.substring(r.raw.length);continue}if(r=this.tokenizer.text(t)){t=t.substring(r.raw.length),i=n[n.length-1],i&&i.type==="text"?(i.raw+=`
|
24
|
+
`+r.raw,i.text+=`
|
25
|
+
`+r.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=i.text):n.push(r);continue}if(t){const l="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(l);break}else throw new Error(l)}}return this.state.top=!0,n}inline(t,n=[]){return this.inlineQueue.push({src:t,tokens:n}),n}inlineTokens(t,n=[]){let r,i,o,a=t,l,s,u;if(this.tokens.links){const c=Object.keys(this.tokens.links);if(c.length>0)for(;(l=this.tokenizer.rules.inline.reflinkSearch.exec(a))!=null;)c.includes(l[0].slice(l[0].lastIndexOf("[")+1,-1))&&(a=a.slice(0,l.index)+"["+Ql("a",l[0].length-2)+"]"+a.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(l=this.tokenizer.rules.inline.blockSkip.exec(a))!=null;)a=a.slice(0,l.index)+"["+Ql("a",l[0].length-2)+"]"+a.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(l=this.tokenizer.rules.inline.escapedEmSt.exec(a))!=null;)a=a.slice(0,l.index+l[0].length-2)+"++"+a.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex),this.tokenizer.rules.inline.escapedEmSt.lastIndex--;for(;t;)if(s||(u=""),s=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(c=>(r=c.call({lexer:this},t,n))?(t=t.substring(r.raw.length),n.push(r),!0):!1))){if(r=this.tokenizer.escape(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.tag(t)){t=t.substring(r.raw.length),i=n[n.length-1],i&&r.type==="text"&&i.type==="text"?(i.raw+=r.raw,i.text+=r.text):n.push(r);continue}if(r=this.tokenizer.link(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(r.raw.length),i=n[n.length-1],i&&r.type==="text"&&i.type==="text"?(i.raw+=r.raw,i.text+=r.text):n.push(r);continue}if(r=this.tokenizer.emStrong(t,a,u)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.codespan(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.br(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.del(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.autolink(t,tu)){t=t.substring(r.raw.length),n.push(r);continue}if(!this.state.inLink&&(r=this.tokenizer.url(t,tu))){t=t.substring(r.raw.length),n.push(r);continue}if(o=t,this.options.extensions&&this.options.extensions.startInline){let c=1/0;const d=t.slice(1);let f;this.options.extensions.startInline.forEach(function(h){f=h.call({lexer:this},d),typeof f=="number"&&f>=0&&(c=Math.min(c,f))}),c<1/0&&c>=0&&(o=t.substring(0,c+1))}if(r=this.tokenizer.inlineText(o,lm)){t=t.substring(r.raw.length),r.raw.slice(-1)!=="_"&&(u=r.raw.slice(-1)),s=!0,i=n[n.length-1],i&&i.type==="text"?(i.raw+=r.raw,i.text+=r.text):n.push(r);continue}if(t){const c="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(c);break}else throw new Error(c)}}return n}}class zs{constructor(t){this.options=t||qr}code(t,n,r){const i=(n||"").match(/\S*/)[0];if(this.options.highlight){const o=this.options.highlight(t,i);o!=null&&o!==t&&(r=!0,t=o)}return t=t.replace(/\n$/,"")+`
|
26
|
+
`,i?'<pre><code class="'+this.options.langPrefix+wn(i)+'">'+(r?t:wn(t,!0))+`</code></pre>
|
27
|
+
`:"<pre><code>"+(r?t:wn(t,!0))+`</code></pre>
|
28
|
+
`}blockquote(t){return`<blockquote>
|
29
|
+
${t}</blockquote>
|
30
|
+
`}html(t){return t}heading(t,n,r,i){if(this.options.headerIds){const o=this.options.headerPrefix+i.slug(r);return`<h${n} id="${o}">${t}</h${n}>
|
31
|
+
`}return`<h${n}>${t}</h${n}>
|
32
|
+
`}hr(){return this.options.xhtml?`<hr/>
|
33
|
+
`:`<hr>
|
34
|
+
`}list(t,n,r){const i=n?"ol":"ul",o=n&&r!==1?' start="'+r+'"':"";return"<"+i+o+`>
|
35
|
+
`+t+"</"+i+`>
|
36
|
+
`}listitem(t){return`<li>${t}</li>
|
37
|
+
`}checkbox(t){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "}paragraph(t){return`<p>${t}</p>
|
38
|
+
`}table(t,n){return n&&(n=`<tbody>${n}</tbody>`),`<table>
|
39
|
+
<thead>
|
40
|
+
`+t+`</thead>
|
41
|
+
`+n+`</table>
|
42
|
+
`}tablerow(t){return`<tr>
|
43
|
+
${t}</tr>
|
44
|
+
`}tablecell(t,n){const r=n.header?"th":"td";return(n.align?`<${r} align="${n.align}">`:`<${r}>`)+t+`</${r}>
|
45
|
+
`}strong(t){return`<strong>${t}</strong>`}em(t){return`<em>${t}</em>`}codespan(t){return`<code>${t}</code>`}br(){return this.options.xhtml?"<br/>":"<br>"}del(t){return`<del>${t}</del>`}link(t,n,r){if(t=Zl(this.options.sanitize,this.options.baseUrl,t),t===null)return r;let i='<a href="'+t+'"';return n&&(i+=' title="'+n+'"'),i+=">"+r+"</a>",i}image(t,n,r){if(t=Zl(this.options.sanitize,this.options.baseUrl,t),t===null)return r;let i=`<img src="${t}" alt="${r}"`;return n&&(i+=` title="${n}"`),i+=this.options.xhtml?"/>":">",i}text(t){return t}}class ed{strong(t){return t}em(t){return t}codespan(t){return t}del(t){return t}html(t){return t}text(t){return t}link(t,n,r){return""+r}image(t,n,r){return""+r}br(){return""}}class td{constructor(){this.seen={}}serialize(t){return t.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")}getNextSafeSlug(t,n){let r=t,i=0;if(this.seen.hasOwnProperty(r)){i=this.seen[t];do i++,r=t+"-"+i;while(this.seen.hasOwnProperty(r))}return n||(this.seen[t]=i,this.seen[r]=0),r}slug(t,n={}){const r=this.serialize(t);return this.getNextSafeSlug(r,n.dryrun)}}class Dr{constructor(t){this.options=t||qr,this.options.renderer=this.options.renderer||new zs,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new ed,this.slugger=new td}static parse(t,n){return new Dr(n).parse(t)}static parseInline(t,n){return new Dr(n).parseInline(t)}parse(t,n=!0){let r="",i,o,a,l,s,u,c,d,f,h,m,p,v,y,b,R,O,S,M;const _=t.length;for(i=0;i<_;i++){if(h=t[i],this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[h.type]&&(M=this.options.extensions.renderers[h.type].call({parser:this},h),M!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(h.type))){r+=M||"";continue}switch(h.type){case"space":continue;case"hr":{r+=this.renderer.hr();continue}case"heading":{r+=this.renderer.heading(this.parseInline(h.tokens),h.depth,Qc(this.parseInline(h.tokens,this.textRenderer)),this.slugger);continue}case"code":{r+=this.renderer.code(h.text,h.lang,h.escaped);continue}case"table":{for(d="",c="",l=h.header.length,o=0;o<l;o++)c+=this.renderer.tablecell(this.parseInline(h.header[o].tokens),{header:!0,align:h.align[o]});for(d+=this.renderer.tablerow(c),f="",l=h.rows.length,o=0;o<l;o++){for(u=h.rows[o],c="",s=u.length,a=0;a<s;a++)c+=this.renderer.tablecell(this.parseInline(u[a].tokens),{header:!1,align:h.align[a]});f+=this.renderer.tablerow(c)}r+=this.renderer.table(d,f);continue}case"blockquote":{f=this.parse(h.tokens),r+=this.renderer.blockquote(f);continue}case"list":{for(m=h.ordered,p=h.start,v=h.loose,l=h.items.length,f="",o=0;o<l;o++)b=h.items[o],R=b.checked,O=b.task,y="",b.task&&(S=this.renderer.checkbox(R),v?b.tokens.length>0&&b.tokens[0].type==="paragraph"?(b.tokens[0].text=S+" "+b.tokens[0].text,b.tokens[0].tokens&&b.tokens[0].tokens.length>0&&b.tokens[0].tokens[0].type==="text"&&(b.tokens[0].tokens[0].text=S+" "+b.tokens[0].tokens[0].text)):b.tokens.unshift({type:"text",text:S}):y+=S),y+=this.parse(b.tokens,v),f+=this.renderer.listitem(y,O,R);r+=this.renderer.list(f,m,p);continue}case"html":{r+=this.renderer.html(h.text);continue}case"paragraph":{r+=this.renderer.paragraph(this.parseInline(h.tokens));continue}case"text":{for(f=h.tokens?this.parseInline(h.tokens):h.text;i+1<_&&t[i+1].type==="text";)h=t[++i],f+=`
|
46
|
+
`+(h.tokens?this.parseInline(h.tokens):h.text);r+=n?this.renderer.paragraph(f):f;continue}default:{const E='Token with "'+h.type+'" type was not found.';if(this.options.silent){console.error(E);return}else throw new Error(E)}}}return r}parseInline(t,n){n=n||this.renderer;let r="",i,o,a;const l=t.length;for(i=0;i<l;i++){if(o=t[i],this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[o.type]&&(a=this.options.extensions.renderers[o.type].call({parser:this},o),a!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(o.type))){r+=a||"";continue}switch(o.type){case"escape":{r+=n.text(o.text);break}case"html":{r+=n.html(o.text);break}case"link":{r+=n.link(o.href,o.title,this.parseInline(o.tokens,n));break}case"image":{r+=n.image(o.href,o.title,o.text);break}case"strong":{r+=n.strong(this.parseInline(o.tokens,n));break}case"em":{r+=n.em(this.parseInline(o.tokens,n));break}case"codespan":{r+=n.codespan(o.text);break}case"br":{r+=n.br();break}case"del":{r+=n.del(this.parseInline(o.tokens,n));break}case"text":{r+=n.text(o.text);break}default:{const s='Token with "'+o.type+'" type was not found.';if(this.options.silent){console.error(s);return}else throw new Error(s)}}}return r}}class na{constructor(t){this.options=t||qr}preprocess(t){return t}postprocess(t){return t}}dt(na,"passThroughHooks",new Set(["preprocess","postprocess"]));function um(e,t,n){return r=>{if(r.message+=`
|
47
|
+
Please report this to https://github.com/markedjs/marked.`,e){const i="<p>An error occurred:</p><pre>"+wn(r.message+"",!0)+"</pre>";if(t)return Promise.resolve(i);if(n){n(null,i);return}return i}if(t)return Promise.reject(r);if(n){n(r);return}throw r}}function nd(e,t){return(n,r,i)=>{typeof r=="function"&&(i=r,r=null);const o={...r};r={...Je.defaults,...o};const a=um(r.silent,r.async,i);if(typeof n>"u"||n===null)return a(new Error("marked(): input parameter is undefined or null"));if(typeof n!="string")return a(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(n)+", string expected"));if(am(r),r.hooks&&(r.hooks.options=r),i){const l=r.highlight;let s;try{r.hooks&&(n=r.hooks.preprocess(n)),s=e(n,r)}catch(d){return a(d)}const u=function(d){let f;if(!d)try{r.walkTokens&&Je.walkTokens(s,r.walkTokens),f=t(s,r),r.hooks&&(f=r.hooks.postprocess(f))}catch(h){d=h}return r.highlight=l,d?a(d):i(null,f)};if(!l||l.length<3||(delete r.highlight,!s.length))return u();let c=0;Je.walkTokens(s,function(d){d.type==="code"&&(c++,setTimeout(()=>{l(d.text,d.lang,function(f,h){if(f)return u(f);h!=null&&h!==d.text&&(d.text=h,d.escaped=!0),c--,c===0&&u()})},0))}),c===0&&u();return}if(r.async)return Promise.resolve(r.hooks?r.hooks.preprocess(n):n).then(l=>e(l,r)).then(l=>r.walkTokens?Promise.all(Je.walkTokens(l,r.walkTokens)).then(()=>l):l).then(l=>t(l,r)).then(l=>r.hooks?r.hooks.postprocess(l):l).catch(a);try{r.hooks&&(n=r.hooks.preprocess(n));const l=e(n,r);r.walkTokens&&Je.walkTokens(l,r.walkTokens);let s=t(l,r);return r.hooks&&(s=r.hooks.postprocess(s)),s}catch(l){return a(l)}}}function Je(e,t,n){return nd(Tr.lex,Dr.parse)(e,t,n)}Je.options=Je.setOptions=function(e){return Je.defaults={...Je.defaults,...e},Xg(Je.defaults),Je};Je.getDefaults=Kc;Je.defaults=qr;Je.use=function(...e){const t=Je.defaults.extensions||{renderers:{},childTokens:{}};e.forEach(n=>{const r={...n};if(r.async=Je.defaults.async||r.async||!1,n.extensions&&(n.extensions.forEach(i=>{if(!i.name)throw new Error("extension name required");if(i.renderer){const o=t.renderers[i.name];o?t.renderers[i.name]=function(...a){let l=i.renderer.apply(this,a);return l===!1&&(l=o.apply(this,a)),l}:t.renderers[i.name]=i.renderer}if(i.tokenizer){if(!i.level||i.level!=="block"&&i.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");t[i.level]?t[i.level].unshift(i.tokenizer):t[i.level]=[i.tokenizer],i.start&&(i.level==="block"?t.startBlock?t.startBlock.push(i.start):t.startBlock=[i.start]:i.level==="inline"&&(t.startInline?t.startInline.push(i.start):t.startInline=[i.start]))}i.childTokens&&(t.childTokens[i.name]=i.childTokens)}),r.extensions=t),n.renderer){const i=Je.defaults.renderer||new zs;for(const o in n.renderer){const a=i[o];i[o]=(...l)=>{let s=n.renderer[o].apply(i,l);return s===!1&&(s=a.apply(i,l)),s}}r.renderer=i}if(n.tokenizer){const i=Je.defaults.tokenizer||new Hs;for(const o in n.tokenizer){const a=i[o];i[o]=(...l)=>{let s=n.tokenizer[o].apply(i,l);return s===!1&&(s=a.apply(i,l)),s}}r.tokenizer=i}if(n.hooks){const i=Je.defaults.hooks||new na;for(const o in n.hooks){const a=i[o];na.passThroughHooks.has(o)?i[o]=l=>{if(Je.defaults.async)return Promise.resolve(n.hooks[o].call(i,l)).then(u=>a.call(i,u));const s=n.hooks[o].call(i,l);return a.call(i,s)}:i[o]=(...l)=>{let s=n.hooks[o].apply(i,l);return s===!1&&(s=a.apply(i,l)),s}}r.hooks=i}if(n.walkTokens){const i=Je.defaults.walkTokens;r.walkTokens=function(o){let a=[];return a.push(n.walkTokens.call(this,o)),i&&(a=a.concat(i.call(this,o))),a}}Je.setOptions(r)})};Je.walkTokens=function(e,t){let n=[];for(const r of e)switch(n=n.concat(t.call(Je,r)),r.type){case"table":{for(const i of r.header)n=n.concat(Je.walkTokens(i.tokens,t));for(const i of r.rows)for(const o of i)n=n.concat(Je.walkTokens(o.tokens,t));break}case"list":{n=n.concat(Je.walkTokens(r.items,t));break}default:Je.defaults.extensions&&Je.defaults.extensions.childTokens&&Je.defaults.extensions.childTokens[r.type]?Je.defaults.extensions.childTokens[r.type].forEach(function(i){n=n.concat(Je.walkTokens(r[i],t))}):r.tokens&&(n=n.concat(Je.walkTokens(r.tokens,t)))}return n};Je.parseInline=nd(Tr.lexInline,Dr.parseInline);Je.Parser=Dr;Je.parser=Dr.parse;Je.Renderer=zs;Je.TextRenderer=ed;Je.Lexer=Tr;Je.lexer=Tr.lex;Je.Tokenizer=Hs;Je.Slugger=td;Je.Hooks=na;Je.parse=Je;Je.options;Je.setOptions;Je.use;Je.walkTokens;Je.parseInline;Dr.parse;Tr.lex;const cm=mn("div")({name:"MarkdownContainer",class:"gdg-mnuv029",propsAsIs:!1});class dm extends se.PureComponent{constructor(){super(...arguments);dt(this,"targetElement",null);dt(this,"containerRefHook",n=>{this.targetElement=n,this.renderMarkdownIntoDiv()})}renderMarkdownIntoDiv(){const{targetElement:n,props:r}=this;if(n===null)return;const{contents:i,createNode:o}=r,a=Je(i),l=document.createRange();l.selectNodeContents(n),l.deleteContents();let s=o==null?void 0:o(a);if(s===void 0){const c=document.createElement("template");c.innerHTML=a,s=c.content}n.append(s);const u=n.getElementsByTagName("a");for(const c of u)c.target="_blank",c.rel="noreferrer noopener"}render(){return this.renderMarkdownIntoDiv(),se.createElement(cm,{ref:this.containerRefHook})}}const fm=mn("textarea")({name:"InputBox",class:"gdg-izpuzkl",propsAsIs:!1}),hm=mn("div")({name:"ShadowBox",class:"gdg-s69h75o",propsAsIs:!1}),gm=mn("div")({name:"GrowingEntryStyle",class:"gdg-g1y0xocz",propsAsIs:!1});let nu=0;const Yr=e=>{const{placeholder:t,value:n,onKeyDown:r,highlight:i,altNewline:o,validatedSelection:a,...l}=e,{onChange:s,className:u}=l,c=g.useRef(null),d=n??"";Pn(s!==void 0,"GrowingEntry must be a controlled input area");const[f]=g.useState(()=>"input-box-"+(nu=(nu+1)%1e7));g.useEffect(()=>{const m=c.current;if(m===null||m.disabled)return;const p=d.toString().length;m.focus(),m.setSelectionRange(i?0:p,p)},[]),g.useLayoutEffect(()=>{var m;if(a!==void 0){const p=typeof a=="number"?[a,null]:a;(m=c.current)==null||m.setSelectionRange(p[0],p[1])}},[a]);const h=g.useCallback(m=>{m.key==="Enter"&&m.shiftKey&&o===!0||r==null||r(m)},[o,r]);return g.createElement(gm,{className:"gdg-growing-entry"},g.createElement(hm,{className:u},d+`
|
48
|
+
`),g.createElement(fm,{...l,className:(u??"")+" gdg-input",id:f,ref:c,onKeyDown:h,value:d,placeholder:t,dir:"auto"}))},Ga={};let Mr=null;function mm(){const e=document.createElement("div");return e.style.opacity="0",e.style.pointerEvents="none",e.style.position="fixed",document.body.append(e),e}function ra(e){const t=e.toLowerCase().trim();if(Ga[t]!==void 0)return Ga[t];Mr=Mr||mm(),Mr.style.color="#000",Mr.style.color=t;const n=getComputedStyle(Mr).color;Mr.style.color="#fff",Mr.style.color=t;const r=getComputedStyle(Mr).color;if(r!==n)return[0,0,0,1];let i=r.replace(/[^\d.,]/g,"").split(",").map(Number.parseFloat);return i.length<4&&i.push(1),i=i.map(o=>Number.isNaN(o)?0:o),Ga[t]=i,i}function Ur(e,t){const[n,r,i]=ra(e);return`rgba(${n}, ${r}, ${i}, ${t})`}const ru=new Map;function iu(e,t){const n=`${e}-${t}`,r=ru.get(n);if(r!==void 0)return r;const i=_n(e,t);return ru.set(n,i),i}function _n(e,t){if(t===void 0)return e;const[n,r,i,o]=ra(e);if(o===1)return e;const[a,l,s,u]=ra(t),c=o+u*(1-o),d=(o*n+u*a*(1-o))/c,f=(o*r+u*l*(1-o))/c,h=(o*i+u*s*(1-o))/c;return`rgba(${d}, ${f}, ${h}, ${c})`}var li=new Map,ci=new Map,ws=new Map;function pm(){li.clear(),ws.clear(),ci.clear()}function vm(e,t,n,r,i){var o,a,l;let s=0,u={};for(let d of e)s+=(o=n.get(d))!=null?o:i,u[d]=((a=u[d])!=null?a:0)+1;let c=t-s;for(let d of Object.keys(u)){let f=u[d],h=(l=n.get(d))!=null?l:i,m=h*f/s,p=c*m*r/f,v=h+p;n.set(d,v)}}function bm(e,t){var n;let r=new Map,i=0;for(let u of"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890,.-+=?"){let c=e.measureText(u).width;r.set(u,c),i+=c}let o=i/r.size,a=3,l=(t/o+a)/(a+1),s=r.keys();for(let u of s)r.set(u,((n=r.get(u))!=null?n:o)*l);return r}function ji(e,t,n,r){var i,o;let a=ci.get(n);if(r&&a!==void 0&&a.count>2e4){let u=ws.get(n);if(u===void 0&&(u=bm(e,a.size),ws.set(n,u)),a.count>5e5){let d=0;for(let f of t)d+=(i=u.get(f))!=null?i:a.size;return d*1.01}let c=e.measureText(t);return vm(t,c.width,u,Math.max(.05,1-a.count/2e5),a.size),ci.set(n,{count:a.count+t.length,size:a.size}),c.width}let l=e.measureText(t),s=l.width/t.length;if(((o=a==null?void 0:a.count)!=null?o:0)>2e4)return l.width;if(a===void 0)ci.set(n,{count:t.length,size:s});else{let u=s-a.size,c=t.length/(a.count+t.length),d=a.size+u*c;ci.set(n,{count:a.count+t.length,size:d})}return l.width}function wm(e,t,n,r,i,o,a,l){if(t.length<=1)return t.length;if(i<n)return-1;let s=Math.floor(n/i*o),u=ji(e,t.slice(0,Math.max(0,s)),r,a);if(u!==n)if(u<n){for(;u<n;)s++,u=ji(e,t.slice(0,Math.max(0,s)),r,a);s--}else for(;u>n;){let c=t.lastIndexOf(" ",s-1);c>0?s=c:s--,u=ji(e,t.slice(0,Math.max(0,s)),r,a)}if(t[s]!==" "){let c=0;c=t.lastIndexOf(" ",s),c>0&&(s=c)}return s}function ym(e,t,n,r,i,o){let a=`${t}_${n}_${r}px`,l=li.get(a);if(l!==void 0)return l;if(r<=0)return[];let s=[],u=t.split(`
|
49
|
+
`),c=ci.get(n),d=c===void 0?t.length:r/c.size*1.5,f=i&&c!==void 0&&c.count>2e4;for(let h of u){let m=ji(e,h.slice(0,Math.max(0,d)),n,f),p=Math.min(h.length,d);if(m<=r)s.push(h);else{for(;m>r;){let v=wm(e,h,r,n,m,p,f),y=h.slice(0,Math.max(0,v));h=h.slice(y.length),s.push(y),m=ji(e,h.slice(0,Math.max(0,d)),n,f),p=Math.min(h.length,d)}m>0&&s.push(h)}}return s=s.map((h,m)=>m===0?h.trimEnd():h.trim()),li.set(a,s),li.size>500&&li.delete(li.keys().next().value),s}function Cm(e,t){return se.useMemo(()=>e.map((n,r)=>({group:n.group,grow:n.grow,hasMenu:n.hasMenu,icon:n.icon,id:n.id,menuIcon:n.menuIcon,overlayIcon:n.overlayIcon,sourceIndex:r,sticky:r<t,indicatorIcon:n.indicatorIcon,style:n.style,themeOverride:n.themeOverride,title:n.title,trailingRowOptions:n.trailingRowOptions,width:n.width,growOffset:n.growOffset,rowMarker:n.rowMarker,rowMarkerChecked:n.rowMarkerChecked,headerRowMarkerTheme:n.headerRowMarkerTheme,headerRowMarkerAlwaysVisible:n.headerRowMarkerAlwaysVisible,headerRowMarkerDisabled:n.headerRowMarkerDisabled})),[e,t])}function Sm(e,t){const[n,r]=t;if(e.columns.hasIndex(n)||e.rows.hasIndex(r))return!0;if(e.current!==void 0){if(Gi(e.current.cell,t))return!0;const i=[e.current.range,...e.current.rangeStack];for(const o of i)if(n>=o.x&&n<o.x+o.width&&r>=o.y&&r<o.y+o.height)return!0}return!1}function eo(e,t){return(e??"")===(t??"")}function xm(e,t,n){return n.current===void 0||e[1]!==n.current.cell[1]?!1:t.span===void 0?n.current.cell[0]===e[0]:n.current.cell[0]>=t.span[0]&&n.current.cell[0]<=t.span[1]}function rd(e,t){const[n,r]=e;return n>=t.x&&n<t.x+t.width&&r>=t.y&&r<t.y+t.height}function Gi(e,t){return(e==null?void 0:e[0])===(t==null?void 0:t[0])&&(e==null?void 0:e[1])===(t==null?void 0:t[1])}function id(e){return[e.x+e.width-1,e.y+e.height-1]}function ou(e,t,n){const r=n.x,i=n.x+n.width-1,o=n.y,a=n.y+n.height-1,[l,s]=e;if(s<o||s>a)return!1;if(t.span===void 0)return l>=r&&l<=i;const[u,c]=t.span;return u>=r&&u<=i||c>=r&&u<=i||u<r&&c>i}function km(e,t,n,r){let i=0;if(n.current===void 0)return i;const o=n.current.range;(r||o.height*o.width>1)&&ou(e,t,o)&&i++;for(const a of n.current.rangeStack)ou(e,t,a)&&i++;return i}function od(e,t){let n=e;if(t!==void 0){let r=[...e];const i=n[t.src];t.src>t.dest?(r.splice(t.src,1),r.splice(t.dest,0,i)):(r.splice(t.dest+1,0,i),r.splice(t.src,1)),r=r.map((o,a)=>({...o,sticky:e[a].sticky})),n=r}return n}function gi(e,t){let n=0;const r=od(e,t);for(let i=0;i<r.length;i++){const o=r[i];if(o.sticky)n+=o.width;else break}return n}function Xr(e,t,n){if(typeof n=="number")return t*n;{let r=0;for(let i=e-t;i<e;i++)r+=n(i);return r}}function ys(e,t,n,r,i){const o=od(e,r),a=[];for(const u of o)if(u.sticky)a.push(u);else break;if(a.length>0)for(const u of a)n-=u.width;let l=t,s=i??0;for(;s<=n&&l<o.length;)s+=o[l].width,l++;for(let u=t;u<l;u++){const c=o[u];c.sticky||a.push(c)}return a}function Mm(e,t,n){let r=0;for(const i of t){const o=i.sticky?r:r+(n??0);if(e<=o+i.width)return i.sourceIndex;r+=i.width}return-1}function Rm(e,t,n,r,i,o,a,l,s,u){const c=r+i;if(n&&e<=i)return-2;if(e<=c)return-1;let d=t;for(let m=0;m<u;m++){const p=o-1-m,v=typeof a=="number"?a:a(p);if(d-=v,e>=d)return p}const f=o-u,h=e-(s??0);if(typeof a=="number"){const m=Math.floor((h-c)/a)+l;return m>=f?void 0:m}else{let m=c;for(let p=l;p<f;p++){const v=a(p);if(h<=m+v)return p;m+=v}return}}let Go=0,Ki={};const Em=typeof window>"u";async function Im(){var e;Em||((e=document==null?void 0:document.fonts)==null?void 0:e.ready)===void 0||(await document.fonts.ready,Go=0,Ki={},pm())}Im();function ad(e,t,n,r){return`${e}_${r??(t==null?void 0:t.font)}_${n}`}function jr(e,t,n,r="middle"){const i=ad(e,t,r,n);let o=Ki[i];return o===void 0&&(o=t.measureText(e),Ki[i]=o,Go++),Go>1e4&&(Ki={},Go=0),o}function sd(e,t){const n=ad(e,void 0,"middle",t);return Ki[n]}function ur(e,t){return typeof t!="string"&&(t=t.baseFontFull),Tm(e,t)}function au(e,t){const n="ABCDEFGHIJKLMNOPQRSTUVWXYZ";e.save(),e.textBaseline=t;const r=e.measureText(n);return e.restore(),r}const su=[];function Tm(e,t){for(const o of su)if(o.key===t)return o.val;const n=au(e,"alphabetic"),i=-(au(e,"middle").actualBoundingBoxDescent-n.actualBoundingBoxDescent)+n.actualBoundingBoxAscent/2;return su.push({key:t,val:i}),i}function Dm(e,t,n,r,i,o){const{ctx:a,rect:l,theme:s}=e;let u=Number.MAX_SAFE_INTEGER;const c=500;if(t!==void 0&&(u=n-t,u<c)){const d=1-u/c;a.globalAlpha=d,a.fillStyle=s.bgSearchResult,a.fillRect(l.x+1,l.y+1,l.width-(i?2:1),l.height-(o?2:1)),a.globalAlpha=1,r!==void 0&&(r.fillStyle=s.bgSearchResult)}return u<c}function ao(e,t,n){const{ctx:r,theme:i}=e,o=t??{},a=n??i.textDark;return a!==o.fillStyle&&(r.fillStyle=a,o.fillStyle=a),o}function Vs(e,t,n){const{rect:r,ctx:i,theme:o}=e;i.fillStyle=o.textDark,sr({ctx:i,rect:r,theme:o},t,n)}function ld(e,t,n,r,i,o,a,l,s){s==="right"?e.fillText(t,n+i-(l.cellHorizontalPadding+.5),r+o/2+a):s==="center"?e.fillText(t,n+i/2,r+o/2+a):e.fillText(t,n+l.cellHorizontalPadding+.5,r+o/2+a)}function ud(e,t){const n=jr("ABCi09jgqpy",e,t);return n.actualBoundingBoxAscent+n.actualBoundingBoxDescent}function Om(e,t){e.includes(`
|
50
|
+
`)&&(e=e.split(/\r?\n/,1)[0]);const n=t/4;return e.length>n&&(e=e.slice(0,n)),e}function Pm(e,t,n,r,i,o,a,l,s,u){const c=l.baseFontFull,d=ym(e,t,c,i-l.cellHorizontalPadding*2,u??!1),f=ud(e,c),h=l.lineHeight*f,m=f+h*(d.length-1),p=m+l.cellVerticalPadding>o;p&&(e.save(),e.rect(n,r,i,o),e.clip());const v=r+o/2-m/2;let y=Math.max(r+l.cellVerticalPadding,v);for(const b of d)if(ld(e,b,n,y,i,f,a,l,s),y+=h,y>r+o)break;p&&e.restore()}function sr(e,t,n,r,i){const{ctx:o,rect:a,theme:l}=e,{x:s,y:u,width:c,height:d}=a;r=r??!1,r||(t=Om(t,c));const f=ur(o,l),h=As(t)==="rtl";if(n===void 0&&h&&(n="right"),h&&(o.direction="rtl"),t.length>0){let m=!1;n==="right"?(o.textAlign="right",m=!0):n!==void 0&&n!=="left"&&(o.textAlign=n,m=!0),r?Pm(o,t,s,u,c,d,f,l,n,i):ld(o,t,s,u,c,d,f,l,n),m&&(o.textAlign="start"),h&&(o.direction="inherit")}}function lr(e,t,n,r,i,o){typeof o=="number"&&(o={tl:o,tr:o,br:o,bl:o}),o={tl:Math.max(0,Math.min(o.tl,i/2,r/2)),tr:Math.max(0,Math.min(o.tr,i/2,r/2)),bl:Math.max(0,Math.min(o.bl,i/2,r/2)),br:Math.max(0,Math.min(o.br,i/2,r/2))},e.moveTo(t+o.tl,n),e.arcTo(t+r,n,t+r,n+o.tr,o.tr),e.arcTo(t+r,n+i,t+r-o.br,n+i,o.br),e.arcTo(t,n+i,t,n+i-o.bl,o.bl),e.arcTo(t,n,t+o.tl,n,o.tl)}function _m(e,t,n){e.arc(t,n-1.25*3.5,1.25,0,2*Math.PI,!1),e.arc(t,n,1.25,0,2*Math.PI,!1),e.arc(t,n+1.25*3.5,1.25,0,2*Math.PI,!1)}function Lm(e,t,n){const r=function(l,s){const u=s.x-l.x,c=s.y-l.y,d=Math.sqrt(u*u+c*c),f=u/d,h=c/d;return{x:u,y:s.y-l.y,len:d,nx:f,ny:h,ang:Math.atan2(h,f)}};let i;const o=t.length;let a=t[o-1];for(let l=0;l<o;l++){let s=t[l%o];const u=t[(l+1)%o],c=r(s,a),d=r(s,u),f=c.nx*d.ny-c.ny*d.nx,h=c.nx*d.nx-c.ny*-d.ny;let m=Math.asin(f<-1?-1:f>1?1:f),p=1,v=!1;h<0?m<0?m=Math.PI+m:(m=Math.PI-m,p=-1,v=!0):m>0&&(p=-1,v=!0),i=s.radius!==void 0?s.radius:n;const y=m/2;let b=Math.abs(Math.cos(y)*i/Math.sin(y)),R;b>Math.min(c.len/2,d.len/2)?(b=Math.min(c.len/2,d.len/2),R=Math.abs(b*Math.sin(y)/Math.cos(y))):R=i;let O=s.x+d.nx*b,S=s.y+d.ny*b;O+=-d.ny*R*p,S+=d.nx*R*p,e.arc(O,S,R,c.ang+Math.PI/2*p,d.ang-Math.PI/2*p,v),a=s,s=u}e.closePath()}function Cs(e,t,n,r,i,o,a,l,s,u,c,d,f,h,m){const p={x:0,y:o+u,width:0,height:0};if(e>=h.length||t>=c||t<-2||e<0)return p;const v=o-i;if(e>=d){const y=a>e?-1:1,b=gi(h);p.x+=b+s;for(let R=a;R!==e;R+=y)p.x+=h[y===1?R:R-1].width*y}else for(let y=0;y<e;y++)p.x+=h[y].width;if(p.width=h[e].width+1,t===-1)p.y=i,p.height=v;else if(t===-2){p.y=0,p.height=i;let y=e;const b=h[e].group,R=h[e].sticky;for(;y>0&&eo(h[y-1].group,b)&&h[y-1].sticky===R;){const S=h[y-1];p.x-=S.width,p.width+=S.width,y--}let O=e;for(;O+1<h.length&&eo(h[O+1].group,b)&&h[O+1].sticky===R;){const S=h[O+1];p.width+=S.width,O++}if(!R){const S=gi(h),M=p.x-S;M<0&&(p.x-=M,p.width+=M),p.x+p.width>n&&(p.width=n-p.x)}}else if(t>=c-f){let y=c-t;for(p.y=r;y>0;){const b=t+y-1;p.height=typeof m=="number"?m:m(b),p.y-=p.height,y--}p.height+=1}else{const y=l>t?-1:1;if(typeof m=="number"){const b=t-l;p.y+=b*m}else for(let b=l;b!==t;b+=y)p.y+=m(b)*y;p.height=(typeof m=="number"?m:m(t))+1}return p}const $s=1<<21;function er(e,t){return(t+2)*$s+e}function cd(e){return e%$s}function Ns(e){return Math.floor(e/$s)-2}function Bs(e){const t=cd(e),n=Ns(e);return[t,n]}class dd{constructor(){dt(this,"visibleWindow",{x:0,y:0,width:0,height:0});dt(this,"freezeCols",0);dt(this,"freezeRows",[]);dt(this,"isInWindow",t=>{const n=cd(t),r=Ns(t),i=this.visibleWindow,o=n>=i.x&&n<=i.x+i.width||n<this.freezeCols,a=r>=i.y&&r<=i.y+i.height||this.freezeRows.includes(r);return o&&a})}setWindow(t,n,r){this.visibleWindow.x===t.x&&this.visibleWindow.y===t.y&&this.visibleWindow.width===t.width&&this.visibleWindow.height===t.height&&this.freezeCols===n&&hi(this.freezeRows,r)||(this.visibleWindow=t,this.freezeCols=n,this.freezeRows=r,this.clearOutOfWindow())}}class Fm extends dd{constructor(){super(...arguments);dt(this,"cache",new Map);dt(this,"setValue",(n,r)=>{this.cache.set(er(n[0],n[1]),r)});dt(this,"getValue",n=>this.cache.get(er(n[0],n[1])));dt(this,"clearOutOfWindow",()=>{for(const[n]of this.cache.entries())this.isInWindow(n)||this.cache.delete(n)})}}class Zi{constructor(t=[]){dt(this,"cells");this.cells=new Set(t.map(n=>er(n[0],n[1])))}add(t){this.cells.add(er(t[0],t[1]))}has(t){return t===void 0?!1:this.cells.has(er(t[0],t[1]))}remove(t){this.cells.delete(er(t[0],t[1]))}clear(){this.cells.clear()}get size(){return this.cells.size}hasHeader(){for(const t of this.cells)if(Ns(t)<0)return!0;return!1}hasItemInRectangle(t){for(let n=t.y;n<t.y+t.height;n++)for(let r=t.x;r<t.x+t.width;r++)if(this.cells.has(er(r,n)))return!0;return!1}hasItemInRegion(t){for(const n of t)if(this.hasItemInRectangle(n))return!0;return!1}*values(){for(const t of this.cells)yield Bs(t)}}function Am(e){return{"--gdg-accent-color":e.accentColor,"--gdg-accent-fg":e.accentFg,"--gdg-accent-light":e.accentLight,"--gdg-text-dark":e.textDark,"--gdg-text-medium":e.textMedium,"--gdg-text-light":e.textLight,"--gdg-text-bubble":e.textBubble,"--gdg-bg-icon-header":e.bgIconHeader,"--gdg-fg-icon-header":e.fgIconHeader,"--gdg-text-header":e.textHeader,"--gdg-text-group-header":e.textGroupHeader??e.textHeader,"--gdg-text-header-selected":e.textHeaderSelected,"--gdg-bg-cell":e.bgCell,"--gdg-bg-cell-medium":e.bgCellMedium,"--gdg-bg-header":e.bgHeader,"--gdg-bg-header-has-focus":e.bgHeaderHasFocus,"--gdg-bg-header-hovered":e.bgHeaderHovered,"--gdg-bg-bubble":e.bgBubble,"--gdg-bg-bubble-selected":e.bgBubbleSelected,"--gdg-bg-search-result":e.bgSearchResult,"--gdg-border-color":e.borderColor,"--gdg-horizontal-border-color":e.horizontalBorderColor??e.borderColor,"--gdg-drilldown-border":e.drilldownBorder,"--gdg-link-color":e.linkColor,"--gdg-cell-horizontal-padding":`${e.cellHorizontalPadding}px`,"--gdg-cell-vertical-padding":`${e.cellVerticalPadding}px`,"--gdg-header-font-style":e.headerFontStyle,"--gdg-base-font-style":e.baseFontStyle,"--gdg-marker-font-style":e.markerFontStyle,"--gdg-font-family":e.fontFamily,"--gdg-editor-font-size":e.editorFontSize,...e.resizeIndicatorColor===void 0?{}:{"--gdg-resize-indicator-color":e.resizeIndicatorColor},...e.headerBottomBorderColor===void 0?{}:{"--gdg-header-bottom-border-color":e.headerBottomBorderColor},...e.roundingRadius===void 0?{}:{"--gdg-rounding-radius":`${e.roundingRadius}px`}}}const fd={accentColor:"#4F5DFF",accentFg:"#FFFFFF",accentLight:"rgba(62, 116, 253, 0.1)",textDark:"#313139",textMedium:"#737383",textLight:"#B2B2C0",textBubble:"#313139",bgIconHeader:"#737383",fgIconHeader:"#FFFFFF",textHeader:"#313139",textGroupHeader:"#313139BB",textHeaderSelected:"#FFFFFF",bgCell:"#FFFFFF",bgCellMedium:"#FAFAFB",bgHeader:"#F7F7F8",bgHeaderHasFocus:"#E9E9EB",bgHeaderHovered:"#EFEFF1",bgBubble:"#EDEDF3",bgBubbleSelected:"#FFFFFF",bgSearchResult:"#fff9e3",borderColor:"rgba(115, 116, 131, 0.16)",drilldownBorder:"rgba(0, 0, 0, 0)",linkColor:"#353fb5",cellHorizontalPadding:8,cellVerticalPadding:3,headerIconSize:18,headerFontStyle:"600 13px",baseFontStyle:"13px",markerFontStyle:"9px",fontFamily:"Inter, Roboto, -apple-system, BlinkMacSystemFont, avenir next, avenir, segoe ui, helvetica neue, helvetica, Ubuntu, noto, arial, sans-serif",editorFontSize:"13px",lineHeight:1.4};function hd(){return fd}const gd=se.createContext(fd);function Hm(){return se.useContext(gd)}function gr(e,...t){const n={...e};for(const r of t)if(r!==void 0)for(const i in r)r.hasOwnProperty(i)&&(i==="bgCell"?n[i]=_n(r[i],n[i]):n[i]=r[i]);return(n.headerFontFull===void 0||e.fontFamily!==n.fontFamily||e.headerFontStyle!==n.headerFontStyle)&&(n.headerFontFull=`${n.headerFontStyle} ${n.fontFamily}`),(n.baseFontFull===void 0||e.fontFamily!==n.fontFamily||e.baseFontStyle!==n.baseFontStyle)&&(n.baseFontFull=`${n.baseFontStyle} ${n.fontFamily}`),(n.markerFontFull===void 0||e.fontFamily!==n.fontFamily||e.markerFontStyle!==n.markerFontStyle)&&(n.markerFontFull=`${n.markerFontStyle} ${n.fontFamily}`),n}const Ss=150;function zm(e,t,n,r){var o;const i=r(t);return((o=i==null?void 0:i.measure)==null?void 0:o.call(i,e,t,n))??Ss}function md(e,t,n,r,i,o,a,l,s){let u=0;const c=i===void 0?[]:i.map(f=>{const h=zm(e,f[r],t,s);return u=Math.max(u,h),h});if(c.length>5&&l){u=0;let f=0;for(const m of c)f+=m;const h=f/c.length;for(let m=0;m<c.length;m++)c[m]>=h*2?c[m]=0:u=Math.max(u,c[m])}u=Math.max(u,e.measureText(n.title).width+t.cellHorizontalPadding*2+(n.icon===void 0?0:28));const d=Math.max(Math.ceil(o),Math.min(Math.floor(a),Math.ceil(u)));return{...n,width:d}}function Vm(e,t,n,r,i,o,a,l,s){const u=g.useRef(t),c=g.useRef(n),d=g.useRef(a);u.current=t,c.current=n,d.current=a;const[f,h]=g.useMemo(()=>{if(typeof window>"u")return[null,null];const b=document.createElement("canvas");return b.style.display="none",b.style.opacity="0",b.style.position="fixed",[b,b.getContext("2d",{alpha:!1})]},[]);g.useLayoutEffect(()=>(f&&document.documentElement.append(f),()=>{f==null||f.remove()}),[f]);const m=g.useRef({}),p=g.useRef(),[v,y]=g.useState();return g.useLayoutEffect(()=>{const b=c.current;if(b===void 0||e.every(Oo))return;let R=Math.max(1,10-Math.floor(e.length/1e4)),O=0;R<u.current&&R>1&&(R--,O=1);const S={x:0,y:0,width:e.length,height:Math.min(u.current,R)},M={x:0,y:u.current-1,width:e.length,height:1};(async()=>{const E=b(S,s.signal),x=O>0?b(M,s.signal):void 0;let L;typeof E=="object"?L=E:L=await Dl(E),x!==void 0&&(typeof x=="object"?L=[...L,...x]:L=[...L,...await Dl(x)]),p.current=e,y(L)})()},[s.signal,e]),g.useMemo(()=>{let R=e.every(Oo)?e:h===null?e.map(_=>Oo(_)?_:{..._,width:Ss}):(h.font=d.current.baseFontFull,e.map((_,E)=>{if(Oo(_))return _;if(m.current[_.id]!==void 0)return{..._,width:m.current[_.id]};if(v===void 0||p.current!==e||_.id===void 0)return{..._,width:Ss};const x=md(h,a,_,E,v,i,o,!0,l);return m.current[_.id]=x.width,x})),O=0,S=0;const M=[];for(const[_,E]of R.entries())O+=E.width,E.grow!==void 0&&E.grow>0&&(S+=E.grow,M.push(_));if(O<r&&M.length>0){const _=[...R],E=r-O;let x=E;for(let L=0;L<M.length;L++){const D=M[L],C=(R[D].grow??0)/S,I=L===M.length-1?x:Math.min(x,Math.floor(E*C));_[D]={...R[D],growOffset:I,width:R[D].width+I},x-=I}R=_}return{sizedColumns:R,nonGrowWidth:O}},[r,e,h,v,a,i,o,l])}var Ka,lu;function $m(){if(lu)return Ka;lu=1;function e(t,n,r){return t===t&&(r!==void 0&&(t=t<=r?t:r),n!==void 0&&(t=t>=n?t:n)),t}return Ka=e,Ka}var Za,uu;function Nm(){if(uu)return Za;uu=1;var e=$m(),t=Cc();function n(r,i,o){return o===void 0&&(o=i,i=void 0),o!==void 0&&(o=t(o),o=o===o?o:0),i!==void 0&&(i=t(i),i=i===i?i:0),e(t(r),i,o)}return Za=n,Za}var Bm=Nm();const Nn=pr(Bm);var Ja,cu;function Wm(){if(cu)return Ja;cu=1;function e(){}return Ja=e,Ja}var Qa,du;function Um(){if(du)return Qa;du=1;var e=sh(),t=Wm(),n=Sc(),r=1/0,i=e&&1/n(new e([,-0]))[1]==r?function(o){return new e(o)}:t;return Qa=i,Qa}var es,fu;function qm(){if(fu)return es;fu=1;var e=lh(),t=uh(),n=dh(),r=ch(),i=Um(),o=Sc(),a=200;function l(s,u,c){var d=-1,f=t,h=s.length,m=!0,p=[],v=p;if(c)m=!1,f=n;else if(h>=a){var y=u?null:i(s);if(y)return o(y);m=!1,f=r,v=new e}else v=u?[]:p;e:for(;++d<h;){var b=s[d],R=u?u(b):b;if(b=c||b!==0?b:0,m&&R===R){for(var O=v.length;O--;)if(v[O]===R)continue e;u&&v.push(R),p.push(b)}else f(v,R,c)||(v!==p&&v.push(R),p.push(b))}return p}return es=l,es}var ts,hu;function Ym(){if(hu)return ts;hu=1;var e=qm();function t(n){return n&&n.length?e(n):[]}return ts=t,ts}var Xm=Ym();const jm=pr(Xm);var Gm=fh();const gu=pr(Gm),qt='<svg width="20" height="20" fill="none" xmlns="http://www.w3.org/2000/svg">',Km=e=>{const t=e.fgColor,n=e.bgColor;return`
|
51
|
+
${qt}<rect x="2" y="2" width="16" height="16" rx="2" fill="${n}"/><path d="M15.75 4h-1.5a.25.25 0 0 0-.177.074L9.308 8.838a3.75 3.75 0 1 0 1.854 1.854l1.155-1.157.967.322a.5.5 0 0 0 .65-.55l-.18-1.208.363-.363.727.331a.5.5 0 0 0 .69-.59l-.254-.904.647-.647A.25.25 0 0 0 16 5.75v-1.5a.25.25 0 0 0-.25-.25zM7.5 13.25a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0z" fill="${t}"/></svg>`},Zm=e=>{const t=e.fgColor,n=e.bgColor;return`
|
52
|
+
${qt}<rect x="2" y="2" width="16" height="16" rx="4" fill="${n}"/><path d="m12.223 13.314 3.052-2.826a.65.65 0 0 0 0-.984l-3.052-2.822c-.27-.25-.634-.242-.865.022-.232.263-.206.636.056.882l2.601 2.41-2.601 2.41c-.262.245-.288.619-.056.882.231.263.595.277.865.026Zm-4.444.005c.266.25.634.241.866-.027.231-.263.206-.636-.06-.882L5.983 10l2.602-2.405c.266-.25.291-.62.06-.887-.232-.263-.596-.272-.866-.022L4.723 9.51a.653.653 0 0 0 0 .983l3.056 2.827Z" fill="${t}"/></svg>`},Jm=e=>{const t=e.fgColor,n=e.bgColor;return`${qt}
|
53
|
+
<path d="M16.22 2H3.78C2.8 2 2 2.8 2 3.78v12.44C2 17.2 2.8 18 3.78 18h12.44c.98 0 1.77-.8 1.77-1.78L18 3.78C18 2.8 17.2 2 16.22 2z" fill="${n}"/>
|
54
|
+
<path d="M6.52 12.78H5.51V8.74l-1.33.47v-.87l2.29-.83h.05v5.27zm5.2 0H8.15v-.69l1.7-1.83a6.38 6.38 0 0 0 .34-.4c.09-.11.16-.22.22-.32s.1-.19.12-.27a.9.9 0 0 0 0-.56.63.63 0 0 0-.15-.23.58.58 0 0 0-.22-.15.75.75 0 0 0-.29-.05c-.27 0-.48.08-.62.23a.95.95 0 0 0-.2.65H8.03c0-.24.04-.46.13-.67a1.67 1.67 0 0 1 .97-.91c.23-.1.49-.14.77-.14.26 0 .5.04.7.11.21.08.38.18.52.32.14.13.25.3.32.48a1.74 1.74 0 0 1 .03 1.13 2.05 2.05 0 0 1-.24.47 4.16 4.16 0 0 1-.35.47l-.47.5-1 1.05h2.32v.8zm1.8-3.08h.55c.28 0 .48-.06.61-.2a.76.76 0 0 0 .2-.55.8.8 0 0 0-.05-.28.56.56 0 0 0-.13-.22.6.6 0 0 0-.23-.15.93.93 0 0 0-.32-.05.92.92 0 0 0-.29.05.72.72 0 0 0-.23.12.57.57 0 0 0-.21.46H12.4a1.3 1.3 0 0 1 .5-1.04c.15-.13.33-.23.54-.3a2.48 2.48 0 0 1 1.4 0c.2.06.4.15.55.28.15.13.27.28.36.47.08.19.13.4.13.65a1.15 1.15 0 0 1-.2.65 1.36 1.36 0 0 1-.58.49c.15.05.28.12.38.2a1.14 1.14 0 0 1 .43.62c.03.13.05.26.05.4 0 .25-.05.47-.14.66a1.42 1.42 0 0 1-.4.49c-.16.13-.35.23-.58.3a2.51 2.51 0 0 1-.73.1c-.22 0-.44-.03-.65-.09a1.8 1.8 0 0 1-.57-.28 1.43 1.43 0 0 1-.4-.47 1.41 1.41 0 0 1-.15-.66h1a.66.66 0 0 0 .22.5.87.87 0 0 0 .58.2c.25 0 .45-.07.6-.2a.71.71 0 0 0 .21-.56.97.97 0 0 0-.06-.36.61.61 0 0 0-.18-.25.74.74 0 0 0-.28-.15 1.33 1.33 0 0 0-.37-.04h-.55V9.7z" fill="${t}"/>
|
55
|
+
</svg>`},Qm=e=>{const t=e.fgColor,n=e.bgColor;return`${qt}
|
56
|
+
<path d="M16.222 2H3.778C2.8 2 2 2.8 2 3.778v12.444C2 17.2 2.8 18 3.778 18h12.444c.978 0 1.77-.8 1.77-1.778L18 3.778C18 2.8 17.2 2 16.222 2z" fill="${n}"/>
|
57
|
+
<path d="M8.182 12.4h3.636l.655 1.6H14l-3.454-8H9.455L6 14h1.527l.655-1.6zM10 7.44l1.36 3.651H8.64L10 7.441z" fill="${t}"/>
|
58
|
+
</svg>`},ep=e=>{const t=e.fgColor,n=e.bgColor;return`${qt}
|
59
|
+
<path
|
60
|
+
d="M16.2222 2H3.77778C2.8 2 2 2.8 2 3.77778V16.2222C2 17.2 2.8 18 3.77778 18H16.2222C17.2 18 17.9911 17.2 17.9911 16.2222L18 3.77778C18 2.8 17.2 2 16.2222 2Z"
|
61
|
+
fill="${n}"
|
62
|
+
/>
|
63
|
+
<path
|
64
|
+
fill-rule="evenodd"
|
65
|
+
clip-rule="evenodd"
|
66
|
+
d="M7.66667 6.66669C5.73368 6.66669 4.16667 8.15907 4.16667 10C4.16667 11.841 5.73368 13.3334 7.66667 13.3334H12.3333C14.2663 13.3334 15.8333 11.841 15.8333 10C15.8333 8.15907 14.2663 6.66669 12.3333 6.66669H7.66667ZM12.5 12.5C13.8807 12.5 15 11.3807 15 10C15 8.61931 13.8807 7.50002 12.5 7.50002C11.1193 7.50002 10 8.61931 10 10C10 11.3807 11.1193 12.5 12.5 12.5Z"
|
67
|
+
fill="${t}"
|
68
|
+
/>
|
69
|
+
</svg>`},pd=e=>{const t=e.fgColor,n=e.bgColor;return`${qt}
|
70
|
+
<path d="M16.222 2H3.778C2.8 2 2 2.8 2 3.778v12.444C2 17.2 2.8 18 3.778 18h12.444c.978 0 1.77-.8 1.77-1.778L18 3.778C18 2.8 17.2 2 16.222 2z" fill="${n}"/>
|
71
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M10.29 4.947a3.368 3.368 0 014.723.04 3.375 3.375 0 01.041 4.729l-.009.009-1.596 1.597a3.367 3.367 0 01-5.081-.364.71.71 0 011.136-.85 1.95 1.95 0 002.942.21l1.591-1.593a1.954 1.954 0 00-.027-2.733 1.95 1.95 0 00-2.732-.027l-.91.907a.709.709 0 11-1.001-1.007l.915-.911.007-.007z" fill="${t}"/>
|
72
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M6.55 8.678a3.368 3.368 0 015.082.364.71.71 0 01-1.136.85 1.95 1.95 0 00-2.942-.21l-1.591 1.593a1.954 1.954 0 00.027 2.733 1.95 1.95 0 002.73.028l.906-.906a.709.709 0 111.003 1.004l-.91.91-.008.01a3.368 3.368 0 01-4.724-.042 3.375 3.375 0 01-.041-4.728l.009-.009L6.55 8.678z" fill="${t}"/>
|
73
|
+
</svg>
|
74
|
+
`},tp=e=>{const t=e.bgColor;return`${qt}
|
75
|
+
<path stroke="${t}" stroke-width="2" d="M12 3v14"/>
|
76
|
+
<path stroke="${t}" stroke-width="2" stroke-linecap="round" d="M10 4h4m-4 12h4"/>
|
77
|
+
<path d="M11 14h4a3 3 0 0 0 3-3V9a3 3 0 0 0-3-3h-4v2h4a1 1 0 0 1 1 1v2a1 1 0 0 1-1 1h-4v2ZM9.5 8H5a1 1 0 0 0-1 1v2a1 1 0 0 0 1 1h4.5v2H5a3 3 0 0 1-3-3V9a3 3 0 0 1 3-3h4.5v2Z" fill="${t}"/>
|
78
|
+
</svg>
|
79
|
+
`},np=pd,rp=e=>{const t=e.fgColor,n=e.bgColor;return`${qt}
|
80
|
+
<path d="M16.222 2H3.778C2.8 2 2 2.8 2 3.778v12.444C2 17.2 2.8 18 3.778 18h12.444c.978 0 1.77-.8 1.77-1.778L18 3.778C18 2.8 17.2 2 16.222 2z" fill="${n}"/>
|
81
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M7 13.138a.5.5 0 00.748.434l5.492-3.138a.5.5 0 000-.868L7.748 6.427A.5.5 0 007 6.862v6.276z" fill="${t}"/>
|
82
|
+
</svg>`},ip=e=>{const t=e.fgColor,n=e.bgColor;return`
|
83
|
+
${qt}
|
84
|
+
<path d="M10 5a5 5 0 1 0 0 10 5 5 0 0 0 0-10zm0 9.17A4.17 4.17 0 0 1 5.83 10 4.17 4.17 0 0 1 10 5.83 4.17 4.17 0 0 1 14.17 10 4.17 4.17 0 0 1 10 14.17z" fill="${t}"/>
|
85
|
+
<path d="M8.33 8.21a.83.83 0 1 0-.03 1.67.83.83 0 0 0 .03-1.67zm3.34 0a.83.83 0 1 0-.04 1.67.83.83 0 0 0 .04-1.67z" fill="${t}"/>
|
86
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M14.53 13.9a2.82 2.82 0 0 1-5.06 0l.77-.38a1.97 1.97 0 0 0 3.52 0l.77.39z" fill="${t}"/>
|
87
|
+
<path d="M16.22 2H3.78C2.8 2 2 2.8 2 3.78v12.44C2 17.2 2.8 18 3.78 18h12.44c.98 0 1.77-.8 1.77-1.78L18 3.78C18 2.8 17.2 2 16.22 2z" fill="${n}"/>
|
88
|
+
<path d="M10 4a6 6 0 1 0 0 12 6 6 0 0 0 0-12zm0 11a5 5 0 1 1 .01-10.01A5 5 0 0 1 10 15z" fill="${t}"/>
|
89
|
+
<path d="M8 7.86a1 1 0 1 0-.04 2 1 1 0 0 0 .04-2zm4 0a1 1 0 1 0-.04 2 1 1 0 0 0 .04-2z" fill="${t}"/>
|
90
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M12.53 11.9a2.82 2.82 0 0 1-5.06 0l.77-.38a1.97 1.97 0 0 0 3.52 0l.77.39z" fill="${t}"/>
|
91
|
+
</svg>`},op=e=>{const t=e.fgColor,n=e.bgColor;return`${qt}
|
92
|
+
<path d="M16.222 2H3.778C2.8 2 2 2.8 2 3.778v12.444C2 17.2 2.8 18 3.778 18h12.444c.978 0 1.77-.8 1.77-1.778L18 3.778C18 2.8 17.2 2 16.222 2z" fill="${n}"/>
|
93
|
+
<path opacity=".5" fill-rule="evenodd" clip-rule="evenodd" d="M12.499 10.801a.5.5 0 01.835 0l2.698 4.098a.5.5 0 01-.418.775H10.22a.5.5 0 01-.417-.775l2.697-4.098z" fill="${t}"/>
|
94
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M8.07 8.934a.5.5 0 01.824 0l4.08 5.958a.5.5 0 01-.412.782h-8.16a.5.5 0 01-.413-.782l4.08-5.958zM13.75 8.333a2.083 2.083 0 100-4.166 2.083 2.083 0 000 4.166z" fill="${t}"/>
|
95
|
+
</svg>`},ap=e=>{const t=e.fgColor,n=e.bgColor;return`
|
96
|
+
${qt}
|
97
|
+
<path fill="${t}" d="M3 3h14v14H3z"/>
|
98
|
+
<path d="M16.22 2H3.78C2.8 2 2 2.8 2 3.78v12.44C2 17.2 2.8 18 3.78 18h12.44c.98 0 1.77-.8 1.77-1.78L18 3.78C18 2.8 17.2 2 16.22 2zm-7.24 9.78h1.23c.15 0 .27.06.36.18l.98 1.28a.43.43 0 0 1-.05.58l-1.2 1.21a.45.45 0 0 1-.6.04A6.72 6.72 0 0 1 7.33 10c0-.61.1-1.2.25-1.78a6.68 6.68 0 0 1 2.12-3.3.44.44 0 0 1 .6.04l1.2 1.2c.16.17.18.42.05.59l-.98 1.29a.43.43 0 0 1-.36.17H8.98A5.38 5.38 0 0 0 8.67 10c0 .62.11 1.23.3 1.79z" fill="${n}"/>
|
99
|
+
</svg>`},sp=e=>{const t=e.fgColor,n=e.bgColor;return`
|
100
|
+
${qt}
|
101
|
+
<path d="M16.22 2H3.78C2.8 2 2 2.8 2 3.78v12.44C2 17.2 2.8 18 3.78 18h12.44c.98 0 1.77-.8 1.77-1.78L18 3.78C18 2.8 17.2 2 16.22 2z" fill="${n}"/>
|
102
|
+
<path d="m13.49 13.15-2.32-3.27h1.4V7h1.86v2.88h1.4l-2.34 3.27zM11 13H9v-3l-1.5 1.92L6 10v3H4V7h2l1.5 2L9 7h2v6z" fill="${t}"/>
|
103
|
+
</svg>`},lp=e=>{const t=e.fgColor,n=e.bgColor;return`${qt}
|
104
|
+
<path d="M16.222 2H3.778C2.8 2 2 2.8 2 3.778v12.444C2 17.2 2.8 18 3.778 18h12.444c.978 0 1.77-.8 1.77-1.778L18 3.778C18 2.8 17.2 2 16.222 2z" fill="${n}"/>
|
105
|
+
<path d="M14.8 4.182h-.6V3H13v1.182H7V3H5.8v1.182h-.6c-.66 0-1.2.532-1.2 1.182v9.454C4 15.468 4.54 16 5.2 16h9.6c.66 0 1.2-.532 1.2-1.182V5.364c0-.65-.54-1.182-1.2-1.182zm0 10.636H5.2V7.136h9.6v7.682z" fill="${t}"/>
|
106
|
+
</svg>`},up=e=>{const t=e.fgColor,n=e.bgColor;return`
|
107
|
+
${qt}
|
108
|
+
<path d="M16.22 2H3.78C2.8 2 2 2.8 2 3.78v12.44C2 17.2 2.8 18 3.78 18h12.44c.98 0 1.77-.8 1.77-1.78L18 3.78C18 2.8 17.2 2 16.22 2z" fill="${n}"/>
|
109
|
+
<path d="M10 4a6 6 0 0 0-6 6 6 6 0 0 0 6 6 6 6 0 0 0 6-6 6 6 0 0 0-6-6zm0 10.8A4.8 4.8 0 0 1 5.2 10a4.8 4.8 0 1 1 4.8 4.8z" fill="${t}"/>
|
110
|
+
<path d="M10 7H9v3.93L12.5 13l.5-.8-3-1.76V7z" fill="${t}"/>
|
111
|
+
</svg>`},cp=e=>{const t=e.fgColor,n=e.bgColor;return`${qt}
|
112
|
+
<rect x="2" y="2" width="16" height="16" rx="2" fill="${n}"/>
|
113
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M10 8.643a1.357 1.357 0 100 2.714 1.357 1.357 0 000-2.714zM7.357 10a2.643 2.643 0 115.286 0 2.643 2.643 0 01-5.286 0z" fill="${t}"/>
|
114
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M7.589 4.898A5.643 5.643 0 0115.643 10v.5a2.143 2.143 0 01-4.286 0V8a.643.643 0 011.286 0v2.5a.857.857 0 001.714 0V10a4.357 4.357 0 10-1.708 3.46.643.643 0 01.782 1.02 5.643 5.643 0 11-5.842-9.582z" fill="${t}"/>
|
115
|
+
</svg>`},dp=e=>{const t=e.fgColor,n=e.bgColor;return`
|
116
|
+
${qt}
|
117
|
+
<rect x="2" y="8" width="10" height="8" rx="2" fill="${n}"/>
|
118
|
+
<rect x="8" y="4" width="10" height="8" rx="2" fill="${n}"/>
|
119
|
+
<path d="M10.68 7.73V6l2.97 3.02-2.97 3.02v-1.77c-2.13 0-3.62.7-4.68 2.2.43-2.15 1.7-4.31 4.68-4.74z" fill="${t}"/>
|
120
|
+
</svg>`},fp=e=>{const t=e.fgColor,n=e.bgColor;return`${qt}
|
121
|
+
<path fill="${t}" d="M4 3h12v14H4z"/>
|
122
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M3.6 2A1.6 1.6 0 002 3.6v12.8A1.6 1.6 0 003.6 18h12.8a1.6 1.6 0 001.6-1.6V3.6A1.6 1.6 0 0016.4 2H3.6zm11.3 10.8a.7.7 0 01.7.7v1.4a.7.7 0 01-.7.7h-1.4a.7.7 0 01-.7-.7v-1.4a.7.7 0 01.6-.693.117.117 0 00.1-.115V10.35a.117.117 0 00-.117-.116h-2.8a.117.117 0 00-.117.116v2.333c0 .064.053.117.117.117h.117a.7.7 0 01.7.7v1.4a.7.7 0 01-.7.7H9.3a.7.7 0 01-.7-.7v-1.4a.7.7 0 01.7-.7h.117a.117.117 0 00.117-.117V10.35a.117.117 0 00-.117-.117h-2.8a.117.117 0 00-.117.117v2.342c0 .058.042.106.1.115a.7.7 0 01.6.693v1.4a.7.7 0 01-.7.7H5.1a.7.7 0 01-.7-.7v-1.4a.7.7 0 01.7-.7h.35a.116.116 0 00.116-.117v-2.45c0-.515.418-.933.934-.933h2.917a.117.117 0 00.117-.117V6.85a.117.117 0 00-.117-.116h-2.45a.7.7 0 01-.7-.7V5.1a.7.7 0 01.7-.7h6.067a.7.7 0 01.7.7v.934a.7.7 0 01-.7.7h-2.45a.117.117 0 00-.118.116v2.333c0 .064.053.117.117.117H13.5c.516 0 .934.418.934.934v2.45c0 .063.052.116.116.116h.35z" fill="${n}"/>
|
123
|
+
</svg>`},hp=e=>{const t=e.fgColor,n=e.bgColor;return`
|
124
|
+
${qt}
|
125
|
+
<rect x="2" y="2" width="16" height="16" rx="2" fill="${n}"/>
|
126
|
+
<path d="M9.98 13.33c.45 0 .74-.3.73-.75l-.01-.1-.16-1.67 1.45 1.05a.81.81 0 0 0 .5.18c.37 0 .72-.32.72-.76 0-.3-.17-.54-.49-.68l-1.63-.77 1.63-.77c.32-.14.49-.37.49-.67 0-.45-.34-.76-.71-.76a.81.81 0 0 0-.5.18l-1.47 1.03.16-1.74.01-.08c.01-.46-.27-.76-.72-.76-.46 0-.76.32-.75.76l.01.08.16 1.74-1.47-1.03a.77.77 0 0 0-.5-.18.74.74 0 0 0-.72.76c0 .3.17.53.49.67l1.63.77-1.62.77c-.32.14-.5.37-.5.68 0 .44.35.75.72.75a.78.78 0 0 0 .5-.17L9.4 10.8l-.16 1.68v.09c-.02.44.28.75.74.75z" fill="${t}"/>
|
127
|
+
</svg>`},gp=e=>{const t=e.fgColor,n=e.bgColor;return`
|
128
|
+
${qt}
|
129
|
+
<rect x="2" y="2" width="16" height="16" rx="2" fill="${n}"/>
|
130
|
+
<path d="M8 5.83H5.83a.83.83 0 0 0 0 1.67h1.69A4.55 4.55 0 0 1 8 5.83zm-.33 3.34H5.83a.83.83 0 0 0 0 1.66h2.72a4.57 4.57 0 0 1-.88-1.66zM5.83 12.5a.83.83 0 0 0 0 1.67h7.5a.83.83 0 1 0 0-1.67h-7.5zm8.8-2.9a3.02 3.02 0 0 0 .46-1.6c0-1.66-1.32-3-2.94-3C10.52 5 9.2 6.34 9.2 8s1.31 3 2.93 3c.58 0 1.11-.17 1.56-.47l2.04 2.08.93-.94-2.04-2.08zm-2.48.07c-.9 0-1.63-.75-1.63-1.67s.73-1.67 1.63-1.67c.9 0 1.63.75 1.63 1.67s-.73 1.67-1.63 1.67z" fill="${t}"/>
|
131
|
+
</svg>`},mp=e=>{const t=e.fgColor,n=e.bgColor;return`${qt}
|
132
|
+
<rect x="2" y="2" width="16" height="16" rx="2" fill="${n}"/>
|
133
|
+
<path d="M7.676 4.726V3l2.976 3.021-2.976 3.022v-1.77c-2.125 0-3.613.69-4.676 2.201.425-2.158 1.7-4.316 4.676-4.748zM10.182 14.4h3.636l.655 1.6H16l-3.454-8h-1.091L8 16h1.527l.655-1.6zM12 9.44l1.36 3.65h-2.72L12 9.44z" fill="${t}"/>
|
134
|
+
</svg>`},pp=e=>{const t=e.fgColor,n=e.bgColor;return`${qt}
|
135
|
+
<rect x="2" y="2" width="16" height="16" rx="2" fill="${n}"/>
|
136
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M4.167 5.417a.833.833 0 100 1.666h4.166a.833.833 0 100-1.666H4.167z" fill="${t}"/>
|
137
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M7.083 4.167a.833.833 0 10-1.666 0v4.166a.833.833 0 101.666 0V4.167zM11.667 5.417a.833.833 0 100 1.666h4.166a.833.833 0 100-1.666h-4.166zM5.367 11.688a.833.833 0 00-1.179 1.179l2.947 2.946a.833.833 0 001.178-1.178l-2.946-2.947z" fill="${t}"/>
|
138
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M8.313 12.867a.833.833 0 10-1.178-1.179l-2.947 2.947a.833.833 0 101.179 1.178l2.946-2.946z" fill="${t}"/>
|
139
|
+
<path d="M10.833 12.5c0-.46.373-.833.834-.833h4.166a.833.833 0 110 1.666h-4.166a.833.833 0 01-.834-.833zM10.833 15c0-.46.373-.833.834-.833h4.166a.833.833 0 110 1.666h-4.166a.833.833 0 01-.834-.833z" fill="${t}"/>
|
140
|
+
</svg>`},vp=e=>{const t=e.fgColor,n=e.bgColor;return`
|
141
|
+
${qt}
|
142
|
+
<path d="M16.22 2H3.78C2.8 2 2 2.8 2 3.78v12.44C2 17.2 2.8 18 3.78 18h12.44c.98 0 1.77-.8 1.77-1.78L18 3.78C18 2.8 17.2 2 16.22 2z" fill="${n}"/>
|
143
|
+
<path d="M10 8.84a1.16 1.16 0 1 0 0 2.32 1.16 1.16 0 0 0 0-2.32zm3.02 3.61a3.92 3.92 0 0 0 .78-3.28.49.49 0 1 0-.95.2c.19.87-.02 1.78-.58 2.47a2.92 2.92 0 1 1-4.13-4.08 2.94 2.94 0 0 1 2.43-.62.49.49 0 1 0 .17-.96 3.89 3.89 0 1 0 2.28 6.27zM10 4.17a5.84 5.84 0 0 0-5.44 7.93.49.49 0 1 0 .9-.35 4.86 4.86 0 1 1 2.5 2.67.49.49 0 1 0-.4.88c.76.35 1.6.54 2.44.53a5.83 5.83 0 0 0 0-11.66zm3.02 3.5a.7.7 0 1 0-1.4 0 .7.7 0 0 0 1.4 0zm-6.97 5.35a.7.7 0 1 1 0 1.4.7.7 0 0 1 0-1.4z" fill="${t}"/>
|
144
|
+
</svg>`},bp=e=>{const t=e.fgColor,n=e.bgColor;return`${qt}
|
145
|
+
<rect x="2" y="2" width="16" height="16" rx="2" fill="${n}"/>
|
146
|
+
<path d="M12.4 13.565c1.865-.545 3.645-2.083 3.645-4.396 0-1.514-.787-2.604-2.071-2.604C12.69 6.565 12 7.63 12 8.939c1.114.072 1.865.726 1.865 1.683 0 .933-.8 1.647-1.84 2.023l.375.92zM4 5h6v2H4zM4 9h5v2H4zM4 13h4v2H4z" fill="${t}"/>
|
147
|
+
</svg>`},wp=e=>{const t=e.fgColor,n=e.bgColor;return`
|
148
|
+
${qt}
|
149
|
+
<rect x="2" y="2" width="16" height="16" rx="2" fill="${n}"/>
|
150
|
+
<path d="M12.4 13.56c1.86-.54 3.65-2.08 3.65-4.4 0-1.5-.8-2.6-2.08-2.6S12 7.64 12 8.95c1.11.07 1.86.73 1.86 1.68 0 .94-.8 1.65-1.83 2.03l.37.91zM4 5h6v2H4zm0 4h5v2H4zm0 4h4v2H4z" fill="${t}"/>
|
151
|
+
</svg>`},yp=e=>{const t=e.fgColor,n=e.bgColor;return`${qt}
|
152
|
+
<path d="M16.222 2H3.778C2.8 2 2 2.8 2 3.778v12.444C2 17.2 2.8 18 3.778 18h12.444c.978 0 1.77-.8 1.77-1.778L18 3.778C18 2.8 17.2 2 16.222 2z" fill="${n}"/>
|
153
|
+
<path d="M10 7a1 1 0 100-2v2zm0 6a1 1 0 100 2v-2zm0-8H7v2h3V5zm-3 6h5V9H7v2zm5 2h-2v2h2v-2zm1-1a1 1 0 01-1 1v2a3 3 0 003-3h-2zm-1-1a1 1 0 011 1h2a3 3 0 00-3-3v2zM4 8a3 3 0 003 3V9a1 1 0 01-1-1H4zm3-3a3 3 0 00-3 3h2a1 1 0 011-1V5z" fill="${t}"/>
|
154
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M4.856 12.014a.5.5 0 00-.712.702L5.409 14l-1.265 1.284a.5.5 0 00.712.702l1.255-1.274 1.255 1.274a.5.5 0 00.712-.702L6.813 14l1.265-1.284a.5.5 0 00-.712-.702L6.11 13.288l-1.255-1.274zM12.856 4.014a.5.5 0 00-.712.702L13.409 6l-1.265 1.284a.5.5 0 10.712.702l1.255-1.274 1.255 1.274a.5.5 0 10.712-.702L14.813 6l1.265-1.284a.5.5 0 00-.712-.702L14.11 5.288l-1.255-1.274z" fill="${t}"/>
|
155
|
+
</svg>`},Cp=e=>{const t=e.fgColor,n=e.bgColor;return`${qt}
|
156
|
+
<rect x="2" y="2" width="16" height="16" rx="2" fill="${n}"/>
|
157
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M14.25 7.25a.75.75 0 000-1.5h-6.5a.75.75 0 100 1.5h6.5zM15 10a.75.75 0 01-.75.75h-6.5a.75.75 0 010-1.5h6.5A.75.75 0 0115 10zm-.75 4.25a.75.75 0 000-1.5h-6.5a.75.75 0 000 1.5h6.5zm-8.987-7a.75.75 0 100-1.5.75.75 0 000 1.5zm.75 2.75a.75.75 0 11-1.5 0 .75.75 0 011.5 0zm-.75 4.25a.75.75 0 100-1.5.75.75 0 000 1.5z" fill="${t}"/>
|
158
|
+
</svg>`},Sp=e=>{const t=e.fgColor;return`
|
159
|
+
<svg width="18" height="18" fill="none" xmlns="http://www.w3.org/2000/svg">
|
160
|
+
<path d="M2 15v1h14v-2.5c0-.87-.44-1.55-.98-2.04a6.19 6.19 0 0 0-1.9-1.14 12.1 12.1 0 0 0-2.48-.67A4 4 0 1 0 5 6a4 4 0 0 0 2.36 3.65c-.82.13-1.7.36-2.48.67-.69.28-1.37.65-1.9 1.13A2.8 2.8 0 0 0 2 13.5V15z" fill="${e.bgColor}" stroke="${t}" stroke-width="2"/>
|
161
|
+
</svg>`},xp=e=>{const t=e.fgColor;return`
|
162
|
+
<svg width="18" height="18" fill="none" xmlns="http://www.w3.org/2000/svg">
|
163
|
+
<path d="M12.43 6.04v-.18a3.86 3.86 0 0 0-7.72 0v.18A2.15 2.15 0 0 0 3 8.14v5.72C3 15.04 3.96 16 5.14 16H12c1.18 0 2.14-.96 2.14-2.14V8.14c0-1.03-.73-1.9-1.71-2.1zM7.86 6v-.14a.71.71 0 1 1 1.43 0V6H7.86z" fill="${e.bgColor}" stroke="${t}" stroke-width="2"/>
|
164
|
+
</svg>
|
165
|
+
`},kp={headerRowID:Km,headerNumber:Jm,headerCode:Zm,headerString:Qm,headerBoolean:ep,headerAudioUri:np,headerVideoUri:rp,headerEmoji:ip,headerImage:op,headerUri:pd,headerPhone:ap,headerMarkdown:sp,headerDate:lp,headerTime:up,headerEmail:cp,headerReference:dp,headerIfThenElse:fp,headerSingleValue:hp,headerLookup:gp,headerTextTemplate:mp,headerMath:pp,headerRollup:vp,headerJoinStrings:bp,headerSplitString:wp,headerGeoDistance:yp,headerArray:Cp,rowOwnerOverlay:Sp,protectedColumnOverlay:xp,renameIcon:tp};function Mp(e,t){return e==="normal"?[t.bgIconHeader,t.fgIconHeader]:e==="selected"?["white",t.accentColor]:[t.accentColor,t.bgHeader]}class Rp{constructor(t,n){dt(this,"onSettled");dt(this,"spriteMap",new Map);dt(this,"headerIcons");dt(this,"inFlight",0);this.onSettled=n,this.headerIcons=t??{}}drawSprite(t,n,r,i,o,a,l,s=1){const[u,c]=Mp(n,l),d=a*Math.ceil(window.devicePixelRatio),f=`${u}_${c}_${d}_${t}`;let h=this.spriteMap.get(f);if(h===void 0){const m=this.headerIcons[t];if(m===void 0)return;h=document.createElement("canvas");const p=h.getContext("2d");if(p===null)return;const v=new Image;v.src=`data:image/svg+xml;charset=utf-8,${encodeURIComponent(m({fgColor:c,bgColor:u}))}`,this.spriteMap.set(f,h);const y=v.decode();if(y===void 0)return;this.inFlight++,y.then(()=>{p.drawImage(v,0,0,d,d)}).finally(()=>{this.inFlight--,this.inFlight===0&&this.onSettled()})}else s<1&&(r.globalAlpha=s),r.drawImage(h,0,0,d,d,i,o,a,a),s<1&&(r.globalAlpha=1)}}function vd(e){if(e.length===0)return;let t;for(const n of e)t=Math.min(t??n.y,n.y)}function va(e,t,n,r,i,o,a,l,s){l=l??t;let u=t,c=e;const d=r-o;let f=!1;for(;u<n&&c<d;){const h=i(c);if(u+h>l&&s(u,c,h,!1,a&&c===r-1)===!0){f=!0;break}u+=h,c++}if(!f){u=n;for(let h=0;h<o;h++){c=r-1-h;const m=i(c);u-=m,s(u,c,m,!0,a&&c===r-1)}}}function Or(e,t,n,r,i,o){let a=0,l=0;const s=i+r;for(const u of e){const c=u.sticky?l:a+n;if(o(u,c,s,u.sticky?0:l,t)===!0)break;a+=u.width,l+=u.sticky?u.width:0}}function bd(e,t,n,r,i){let o=0,a=0;for(let l=0;l<e.length;l++){const s=e[l];let u=l+1,c=s.width;for(s.sticky&&(a+=c);u<e.length&&eo(e[u].group,s.group)&&e[u].sticky===e[l].sticky;){const p=e[u];c+=p.width,u++,l++,p.sticky&&(a+=p.width)}const d=s.sticky?0:n,f=o+d,h=s.sticky?0:Math.max(0,a-f),m=Math.min(c-h,t-(f+h));i([s.sourceIndex,e[u-1].sourceIndex],s.group??"",f+h,0,m,r),o+=c}}function wd(e,t,n,r,i,o,a){var f;const[l,s]=e;let u,c;const d=((f=a.find(h=>!h.sticky))==null?void 0:f.sourceIndex)??0;if(s>d){const h=Math.max(l,d);let m=t,p=r;for(let v=o.sourceIndex-1;v>=h;v--)m-=a[v].width,p+=a[v].width;for(let v=o.sourceIndex+1;v<=s;v++)p+=a[v].width;c={x:m,y:n,width:p,height:i}}if(d>l){const h=Math.min(s,d-1);let m=t,p=r;for(let v=o.sourceIndex-1;v>=l;v--)m-=a[v].width,p+=a[v].width;for(let v=o.sourceIndex+1;v<=h;v++)p+=a[v].width;u={x:m,y:n,width:p,height:i}}return[u,c]}function Ep(e,t,n,r){if(r==="any")return yd(e,{x:t,y:n,width:1,height:1});if(r==="vertical"&&(t=e.x),r==="horizontal"&&(n=e.y),rd([t,n],e))return;const i=t-e.x,o=e.x+e.width-t,a=n-e.y+1,l=e.y+e.height-n,s=Math.min(r==="vertical"?Number.MAX_SAFE_INTEGER:i,r==="vertical"?Number.MAX_SAFE_INTEGER:o,r==="horizontal"?Number.MAX_SAFE_INTEGER:a,r==="horizontal"?Number.MAX_SAFE_INTEGER:l);return s===l?{x:e.x,y:e.y+e.height,width:e.width,height:n-e.y-e.height+1}:s===a?{x:e.x,y:n,width:e.width,height:e.y-n}:s===o?{x:e.x+e.width,y:e.y,width:t-e.x-e.width+1,height:e.height}:{x:t,y:e.y,width:e.x-t,height:e.height}}function to(e,t,n,r,i,o,a,l){return e<=i+a&&i<=e+n&&t<=o+l&&o<=t+r}function Wr(e,t,n){return t>=e.x&&t<=e.x+e.width&&n>=e.y&&n<=e.y+e.height}function yd(e,t){const n=Math.min(e.x,t.x),r=Math.min(e.y,t.y),i=Math.max(e.x+e.width,t.x+t.width)-n,o=Math.max(e.y+e.height,t.y+t.height)-r;return{x:n,y:r,width:i,height:o}}function Ip(e,t){return e.x<=t.x&&e.y<=t.y&&e.x+e.width>=t.x+t.width&&e.y+e.height>=t.y+t.height}function Tp(e,t,n,r){if(e.x>t||e.y>n||e.x<0&&e.y<0&&e.x+e.width>t&&e.y+e.height>n)return;if(e.x>=0&&e.y>=0&&e.x+e.width<=t&&e.y+e.height<=n)return e;const i=-4,o=-4,a=t+4,l=n+4,s=i-e.x,u=e.x+e.width-a,c=o-e.y,d=e.y+e.height-l,f=s>0?e.x+Math.floor(s/r)*r:e.x,h=u>0?e.x+e.width-Math.floor(u/r)*r:e.x+e.width,m=c>0?e.y+Math.floor(c/r)*r:e.y,p=d>0?e.y+e.height-Math.floor(d/r)*r:e.y+e.height;return{x:f,y:m,width:h-f,height:p-m}}function Dp(e,t,n,r,i){const[o,a,l,s]=t,[u,c,d,f]=i,{x:h,y:m,width:p,height:v}=e,y=[];if(p<=0||v<=0)return y;const b=h+p,R=m+v,O=h<o,S=m<a,M=h+p>l,_=m+v>s,E=h>=o&&h<l||b>o&&b<=l||h<o&&b>l,x=m>=a&&m<s||R>a&&R<=s||m<a&&R>s;if(E&&x){const D=Math.max(h,o),C=Math.max(m,a),I=Math.min(b,l),T=Math.min(R,s);y.push({rect:{x:D,y:C,width:I-D,height:T-C},clip:{x:u,y:c,width:d-u+1,height:f-c+1}})}if(O&&S){const D=h,C=m,I=Math.min(b,o),T=Math.min(R,a);y.push({rect:{x:D,y:C,width:I-D,height:T-C},clip:{x:0,y:0,width:u+1,height:c+1}})}if(S&&E){const D=Math.max(h,o),C=m,I=Math.min(b,l),T=Math.min(R,a);y.push({rect:{x:D,y:C,width:I-D,height:T-C},clip:{x:u,y:0,width:d-u+1,height:c+1}})}if(S&&M){const D=Math.max(h,l),C=m,I=b,T=Math.min(R,a);y.push({rect:{x:D,y:C,width:I-D,height:T-C},clip:{x:d,y:0,width:n-d+1,height:c+1}})}if(O&&x){const D=h,C=Math.max(m,a),I=Math.min(b,o),T=Math.min(R,s);y.push({rect:{x:D,y:C,width:I-D,height:T-C},clip:{x:0,y:c,width:u+1,height:f-c+1}})}if(M&&x){const D=Math.max(h,l),C=Math.max(m,a),I=b,T=Math.min(R,s);y.push({rect:{x:D,y:C,width:I-D,height:T-C},clip:{x:d,y:c,width:n-d+1,height:f-c+1}})}if(O&&_){const D=h,C=Math.max(m,s),I=Math.min(b,o),T=R;y.push({rect:{x:D,y:C,width:I-D,height:T-C},clip:{x:0,y:f,width:u+1,height:r-f+1}})}if(_&&E){const D=Math.max(h,o),C=Math.max(m,s),I=Math.min(b,l),T=R;y.push({rect:{x:D,y:C,width:I-D,height:T-C},clip:{x:u,y:f,width:d-u+1,height:r-f+1}})}if(M&&_){const D=Math.max(h,l),C=Math.max(m,s),I=b,T=R;y.push({rect:{x:D,y:C,width:I-D,height:T-C},clip:{x:d,y:f,width:n-d+1,height:r-f+1}})}return y}const Op={kind:te.Loading,allowOverlay:!1};function mu(e,t,n,r,i,o,a,l,s,u,c,d,f,h,m,p,v,y,b,R,O,S,M,_,E,x,L,D,C,I,T,k,V,N,U){let oe=(R==null?void 0:R.size)??Number.MAX_SAFE_INTEGER;const ee=performance.now();let j=I.baseFontFull;e.font=j;const ne={ctx:e},ie=[0,0],ue=v>0?Xr(s,v,u):0;let ge,J;const H=vd(b);return Or(t,l,o,a,i,(P,q,fe,me,ze)=>{const ve=Math.max(0,me-q),Xe=q+ve,Me=i+1,Pt=P.width-ve,Mt=r-i-1;if(b.length>0){let Ve=!1;for(let Oe=0;Oe<b.length;Oe++){const nt=b[Oe];if(to(Xe,Me,Pt,Mt,nt.x,nt.y,nt.width,nt.height)){Ve=!0;break}}if(!Ve)return}const Qe=()=>{e.save(),e.beginPath(),e.rect(Xe,Me,Pt,Mt),e.clip()},le=O.columns.hasIndex(P.sourceIndex),je=d(P.group??"").overrideTheme,we=P.themeOverride===void 0&&je===void 0?I:gr(I,je,P.themeOverride),ce=we.baseFontFull;ce!==j&&(j=ce,e.font=ce),Qe();let be;return va(ze,fe,r,s,u,v,y,H,(Ve,Oe,nt,pe,Ee)=>{var dn,fn,vn;if(Oe<0||(ie[0]=P.sourceIndex,ie[1]=Oe,R!==void 0&&!R.has(ie)))return;if(b.length>0){let st=!1;for(let zt=0;zt<b.length;zt++){const Dt=b[zt];if(to(q,Ve,P.width,nt,Dt.x,Dt.y,Dt.width,Dt.height)){st=!0;break}}if(!st)return}const at=O.rows.hasIndex(Oe),Ae=h.hasIndex(Oe),rt=Oe<s?c(ie):Op;let vt=q,ht=P.width,He=!1,It=!1;if(rt.span!==void 0){const[st,zt]=rt.span,Dt=`${Oe},${st},${zt},${P.sticky}`;if(J===void 0&&(J=new Set),J.has(Dt)){oe--;return}else{const nn=wd(rt.span,q,Ve,P.width,nt,P,n),Tt=P.sticky?nn[0]:nn[1];if(!P.sticky&&nn[0]!==void 0&&(It=!0),Tt!==void 0){vt=Tt.x,ht=Tt.width,J.add(Dt),e.restore(),be=void 0,e.save(),e.beginPath();const Vt=Math.max(0,me-Tt.x);e.rect(Tt.x+Vt,Ve,Tt.width-Vt,nt),ge===void 0&&(ge=[]),ge.push({x:Tt.x+Vt,y:Ve,width:Tt.width-Vt,height:nt}),e.clip(),He=!0}}}const Yt=f==null?void 0:f(Oe),mt=Ee&&((dn=P.trailingRowOptions)==null?void 0:dn.themeOverride)!==void 0?(fn=P.trailingRowOptions)==null?void 0:fn.themeOverride:void 0,Rt=rt.themeOverride===void 0&&Yt===void 0&&mt===void 0?we:gr(we,Yt,mt,rt.themeOverride);e.beginPath();const Gt=xm(ie,rt,O);let Lt=km(ie,rt,O,p);const Sn=rt.span!==void 0&&O.columns.some(st=>rt.span!==void 0&&st>=rt.span[0]&&st<=rt.span[1]);Gt&&!m&&p?Lt=0:Gt&&p&&(Lt=Math.max(Lt,1)),Sn&&Lt++,Gt||(at&&Lt++,le&&!Ee&&Lt++);const Wt=rt.kind===te.Protected?Rt.bgCellMedium:Rt.bgCell;let St;if((pe||Wt!==I.bgCell)&&(St=_n(Wt,St)),Lt>0||Ae){Ae&&(St=_n(Rt.bgHeader,St));for(let st=0;st<Lt;st++)St=_n(Rt.accentLight,St)}else if(S!==void 0){for(const st of S)if(st[0]===P.sourceIndex&&st[1]===Oe){St=_n(Rt.bgSearchResult,St);break}}if(M!==void 0)for(let st=0;st<M.length;st++){const zt=M[st],Dt=zt.range;zt.style!=="solid-outline"&&Dt.x<=P.sourceIndex&&P.sourceIndex<Dt.x+Dt.width&&Dt.y<=Oe&&Oe<Dt.y+Dt.height&&(St=_n(zt.color,St))}let En=!1;if(R!==void 0){const st=Ve+1,Dt=(pe?st+nt-1:Math.min(st+nt-1,r-ue))-st;(Dt!==nt-1||vt+1<=me)&&(En=!0,e.save(),e.beginPath(),e.rect(vt+1,st,ht-1,Dt),e.clip()),St=St===void 0?Rt.bgCell:_n(St,Rt.bgCell)}const pn=P.sourceIndex===n.length-1,Pe=Oe===s-1;St!==void 0&&(e.fillStyle=St,be!==void 0&&(be.fillStyle=St),R!==void 0?e.fillRect(vt+1,Ve+1,ht-(pn?2:1),nt-(Pe?2:1)):e.fillRect(vt,Ve,ht,nt)),rt.style==="faded"&&(e.globalAlpha=.6);let Ft;for(let st=0;st<x.length;st++){const zt=x[st];if(zt.item[0]===P.sourceIndex&&zt.item[1]===Oe){Ft=zt;break}}if(ht>U&&!It){const st=Rt.baseFontFull;st!==j&&(e.font=st,j=st),be=Cd(e,rt,P.sourceIndex,Oe,pn,Pe,vt,Ve,ht,nt,Lt>0,Rt,St??Rt.bgCell,_,E,(Ft==null?void 0:Ft.hoverAmount)??0,L,C,ee,D,be,T,k,V,N)}return En&&e.restore(),rt.style==="faded"&&(e.globalAlpha=1),oe--,He&&(e.restore(),(vn=be==null?void 0:be.deprep)==null||vn.call(be,ne),be=void 0,Qe(),j=ce,e.font=ce),oe<=0}),e.restore(),oe<=0}),ge}const Vi=[0,0],$i={x:0,y:0,width:0,height:0},ns=[void 0,()=>{}];let xs=!1;function Pp(){xs=!0}function Cd(e,t,n,r,i,o,a,l,s,u,c,d,f,h,m,p,v,y,b,R,O,S,M,_,E){var k,V;let x,L;v!==void 0&&v[0][0]===n&&v[0][1]===r&&(x=v[1][0],L=v[1][1]);let D;Vi[0]=n,Vi[1]=r,$i.x=a,$i.y=l,$i.width=s,$i.height=u,ns[0]=M.getValue(Vi),ns[1]=N=>M.setValue(Vi,N),xs=!1;const C={ctx:e,theme:d,col:n,row:r,cell:t,rect:$i,highlighted:c,cellFillColor:f,hoverAmount:p,frameTime:b,hoverX:x,drawState:ns,hoverY:L,imageLoader:h,spriteManager:m,hyperWrapping:y,overrideCursor:x!==void 0?E:void 0,requestAnimationFrame:Pp},I=Dm(C,t.lastUpdated,b,O,i,o),T=_(t);if(T!==void 0){(O==null?void 0:O.renderer)!==T&&((k=O==null?void 0:O.deprep)==null||k.call(O,C),O=void 0);const N=(V=T.drawPrep)==null?void 0:V.call(T,C,O);R!==void 0&&!ui(C.cell)?R(C,()=>T.draw(C,t)):T.draw(C,t),D=N===void 0?void 0:{deprep:N==null?void 0:N.deprep,fillStyle:N==null?void 0:N.fillStyle,font:N==null?void 0:N.font,renderer:T}}return(I||xs)&&(S==null||S(Vi)),D}function Ws(e,t,n,r,i,o,a,l,s=-20,u=-20,c=32,d="center",f="square"){const h=Math.floor(i+a/2),m=f==="circle"?1e4:t.roundingRadius??4;let p=Xc(c,a,t.cellVerticalPadding),v=p/2;const y=Yc(d,r,o,t.cellHorizontalPadding,p),b=qc(y,h,p),R=jc(r+s,i+u,b);switch(n){case!0:{e.beginPath(),lr(e,y-p/2,h-p/2,p,p,m),f==="circle"&&(v*=.8,p*=.8),e.fillStyle=l?t.accentColor:t.textMedium,e.fill(),e.beginPath(),e.moveTo(y-v+p/4.23,h-v+p/1.97),e.lineTo(y-v+p/2.42,h-v+p/1.44),e.lineTo(y-v+p/1.29,h-v+p/3.25),e.strokeStyle=t.bgCell,e.lineJoin="round",e.lineCap="round",e.lineWidth=1.9,e.stroke();break}case Qo:case!1:{e.beginPath(),lr(e,y-p/2+.5,h-p/2+.5,p-1,p-1,m),e.lineWidth=1,e.strokeStyle=R?t.textDark:t.textMedium,e.stroke();break}case Ps:{e.beginPath(),lr(e,y-p/2,h-p/2,p,p,m),e.fillStyle=R?t.textMedium:t.textLight,e.fill(),f==="circle"&&(v*=.8,p*=.8),e.beginPath(),e.moveTo(y-p/3,h),e.lineTo(y+p/3,h),e.strokeStyle=t.bgCell,e.lineCap="round",e.lineWidth=1.9,e.stroke();break}default:Qi()}}function _p(e,t,n,r,i,o,a,l,s,u,c,d,f,h,m,p,v,y,b){var x,L,D,C;const R=a+l;if(R<=0)return;e.fillStyle=d.bgHeader,e.fillRect(0,0,i,R);const O=(x=r==null?void 0:r[0])==null?void 0:x[0],S=(L=r==null?void 0:r[0])==null?void 0:L[1],M=(D=r==null?void 0:r[1])==null?void 0:D[0],_=(C=r==null?void 0:r[1])==null?void 0:C[1],E=d.headerFontFull;e.font=E,Or(t,0,o,0,R,(I,T,k,V)=>{var P;if(v!==void 0&&!v.has([I.sourceIndex,-1]))return;const N=Math.max(0,V-T);e.save(),e.beginPath(),e.rect(T+N,l,I.width-N,a),e.clip();const U=p(I.group??"").overrideTheme,oe=I.themeOverride===void 0&&U===void 0?d:gr(d,U,I.themeOverride);oe.bgHeader!==d.bgHeader&&(e.fillStyle=oe.bgHeader,e.fill()),oe!==d&&(e.font=oe.baseFontFull);const ee=c.columns.hasIndex(I.sourceIndex),j=s!==void 0||u,ne=!j&&S===-1&&O===I.sourceIndex,ie=j?0:((P=h.find(q=>q.item[0]===I.sourceIndex&&q.item[1]===-1))==null?void 0:P.hoverAmount)??0,ue=(c==null?void 0:c.current)!==void 0&&c.current.cell[0]===I.sourceIndex,ge=ee?oe.accentColor:ue?oe.bgHeaderHasFocus:oe.bgHeader,J=n?l:0,H=I.sourceIndex===0?0:1;ee?(e.fillStyle=ge,e.fillRect(T+H,J,I.width-H,a)):(ue||ie>0)&&(e.beginPath(),e.rect(T+H,J,I.width-H,a),ue&&(e.fillStyle=oe.bgHeaderHasFocus,e.fill()),ie>0&&(e.globalAlpha=ie,e.fillStyle=oe.bgHeaderHovered,e.fill(),e.globalAlpha=1)),kd(e,T,J,I.width,a,I,ee,oe,ne,ne?M:void 0,ne?_:void 0,ue,ie,f,y,b),e.restore()}),n&&Lp(e,t,i,o,l,r,d,f,h,m,p,v)}function Lp(e,t,n,r,i,o,a,l,s,u,c,d){const[h,m]=(o==null?void 0:o[0])??[];let p=0;bd(t,n,r,i,(v,y,b,R,O,S)=>{if(d!==void 0&&!d.hasItemInRectangle({x:v[0],y:-2,width:v[1]-v[0]+1,height:1}))return;e.save(),e.beginPath(),e.rect(b,R,O,S),e.clip();const M=c(y),_=(M==null?void 0:M.overrideTheme)===void 0?a:gr(a,M.overrideTheme),E=m===-2&&h!==void 0&&h>=v[0]&&h<=v[1],x=E?_.bgHeaderHovered:_.bgHeader;if(x!==a.bgHeader&&(e.fillStyle=x,e.fill()),e.fillStyle=_.textGroupHeader??_.textHeader,M!==void 0){let L=b;if(M.icon!==void 0&&(l.drawSprite(M.icon,"normal",e,L+8,(i-20)/2,20,_),L+=26),e.fillText(M.name,L+8,i/2+ur(e,a.headerFontFull)),M.actions!==void 0&&E){const D=Sd({x:b,y:R,width:O,height:S},M.actions);e.beginPath();const C=D[0].x-10,I=b+O-C;e.rect(C,0,I,i);const T=e.createLinearGradient(C,0,C+I,0),k=Ur(x,0);T.addColorStop(0,k),T.addColorStop(10/I,x),T.addColorStop(1,x),e.fillStyle=T,e.fill(),e.globalAlpha=.6;const[V,N]=(o==null?void 0:o[1])??[-1,-1];for(let U=0;U<M.actions.length;U++){const oe=M.actions[U],ee=D[U],j=Wr(ee,V+b,N);j&&(e.globalAlpha=1),l.drawSprite(oe.icon,"normal",e,ee.x+ee.width/2-10,ee.y+ee.height/2-10,20,_),j&&(e.globalAlpha=.6)}e.globalAlpha=1}}b!==0&&u(v[0])&&(e.beginPath(),e.moveTo(b+.5,0),e.lineTo(b+.5,i),e.strokeStyle=a.borderColor,e.lineWidth=1,e.stroke()),e.restore(),p=b+O}),e.beginPath(),e.moveTo(p+.5,0),e.lineTo(p+.5,i),e.moveTo(0,i+.5),e.lineTo(n,i+.5),e.strokeStyle=a.borderColor,e.lineWidth=1,e.stroke()}const Ao=30;function Fp(e,t,n,r,i){return{x:e+n-Ao,y:Math.max(t,t+r/2-Ao/2),width:Ao,height:Math.min(Ao,r)}}function Sd(e,t){const n=[];let r=e.x+e.width-26*t.length;const i=e.y+e.height/2-13,o=26,a=26;for(let l=0;l<t.length;l++)n.push({x:r,y:i,width:a,height:o}),r+=26;return n}function Ni(e,t,n){return!n||e===void 0||(e.x=t-(e.x-t)-e.width),e}function xd(e,t,n,r,i,o,a,l){var y;const s=a.cellHorizontalPadding,u=a.headerIconSize,c=Fp(n,r,i,o);let d=n+s;const f=t.icon===void 0?void 0:{x:d,y:r+(o-u)/2,width:u,height:u},h=f===void 0||t.overlayIcon===void 0?void 0:{x:f.x+9,y:f.y+6,width:18,height:18};f!==void 0&&(d+=Math.ceil(u*1.3));const m={x:d,y:r,width:i-d,height:o};let p;if(t.indicatorIcon!==void 0){const b=e===void 0?((y=sd(t.title,a.headerFontFull))==null?void 0:y.width)??0:jr(t.title,e,a.headerFontFull).width;m.width=b,d+=b+s,p={x:d,y:r+(o-u)/2,width:u,height:u}}const v=n+i/2;return{menuBounds:Ni(c,v,l),iconBounds:Ni(f,v,l),iconOverlayBounds:Ni(h,v,l),textBounds:Ni(m,v,l),indicatorIconBounds:Ni(p,v,l)}}function pu(e,t,n,r,i,o,a,l,s,u,c,d,f,h,m,p){if(o.rowMarker!==void 0&&o.headerRowMarkerDisabled!==!0){const b=o.rowMarkerChecked;b!==!0&&o.headerRowMarkerAlwaysVisible!==!0&&(e.globalAlpha=d);const R=o.headerRowMarkerTheme!==void 0?gr(l,o.headerRowMarkerTheme):l;Ws(e,R,b,t,n,r,i,!1,void 0,void 0,18,"center",o.rowMarker),b!==!0&&o.headerRowMarkerAlwaysVisible!==!0&&(e.globalAlpha=1);return}const v=a?l.textHeaderSelected:l.textHeader,y=o.hasMenu===!0&&(s||h&&a)&&p.menuBounds!==void 0;if(o.icon!==void 0&&p.iconBounds!==void 0){let b=a?"selected":"normal";o.style==="highlight"&&(b=a?"selected":"special"),f.drawSprite(o.icon,b,e,p.iconBounds.x,p.iconBounds.y,p.iconBounds.width,l),o.overlayIcon!==void 0&&p.iconOverlayBounds!==void 0&&f.drawSprite(o.overlayIcon,a?"selected":"special",e,p.iconOverlayBounds.x,p.iconOverlayBounds.y,p.iconOverlayBounds.width,l)}if(y&&r>35){const R=m?35:r-35,O=m?35*.7:r-35*.7,S=R/r,M=O/r,_=e.createLinearGradient(t,0,t+r,0),E=Ur(v,0);_.addColorStop(m?1:0,v),_.addColorStop(S,v),_.addColorStop(M,E),_.addColorStop(m?0:1,E),e.fillStyle=_}else e.fillStyle=v;if(m&&(e.textAlign="right"),p.textBounds!==void 0&&e.fillText(o.title,m?p.textBounds.x+p.textBounds.width:p.textBounds.x,n+i/2+ur(e,l.headerFontFull)),m&&(e.textAlign="left"),o.indicatorIcon!==void 0&&p.indicatorIconBounds!==void 0&&(!y||!to(p.menuBounds.x,p.menuBounds.y,p.menuBounds.width,p.menuBounds.height,p.indicatorIconBounds.x,p.indicatorIconBounds.y,p.indicatorIconBounds.width,p.indicatorIconBounds.height))){let b=a?"selected":"normal";o.style==="highlight"&&(b=a?"selected":"special"),f.drawSprite(o.indicatorIcon,b,e,p.indicatorIconBounds.x,p.indicatorIconBounds.y,p.indicatorIconBounds.width,l)}if(y&&p.menuBounds!==void 0){const b=p.menuBounds,R=u!==void 0&&c!==void 0&&Wr(b,u+t,c+n);if(R||(e.globalAlpha=.7),o.menuIcon===void 0||o.menuIcon===ea.Triangle){e.beginPath();const O=b.x+b.width/2-5.5,S=b.y+b.height/2-3;Lm(e,[{x:O,y:S},{x:O+11,y:S},{x:O+5.5,y:S+6}],1),e.fillStyle=v,e.fill()}else if(o.menuIcon===ea.Dots){e.beginPath();const O=b.x+b.width/2,S=b.y+b.height/2;_m(e,O,S),e.fillStyle=v,e.fill()}else{const O=b.x+(b.width-l.headerIconSize)/2,S=b.y+(b.height-l.headerIconSize)/2;f.drawSprite(o.menuIcon,"normal",e,O,S,l.headerIconSize,l)}R||(e.globalAlpha=1)}}function kd(e,t,n,r,i,o,a,l,s,u,c,d,f,h,m,p){const v=As(o.title)==="rtl",y=xd(e,o,t,n,r,i,l,v);m!==void 0?m({ctx:e,theme:l,rect:{x:t,y:n,width:r,height:i},column:o,columnIndex:o.sourceIndex,isSelected:a,hoverAmount:f,isHovered:s,hasSelectedCell:d,spriteManager:h,menuBounds:(y==null?void 0:y.menuBounds)??{x:0,y:0,height:0,width:0}},()=>pu(e,t,n,r,i,o,a,l,s,u,c,f,h,p,v,y)):pu(e,t,n,r,i,o,a,l,s,u,c,f,h,p,v,y)}function Ap(e,t,n,r,i,o,a,l,s,u,c,d,f,h,m,p,v,y,b){if(y!==void 0||t[t.length-1]!==n[t.length-1])return;const R=vd(v);Or(t,s,a,l,o,(O,S,M,_,E)=>{if(O!==t[t.length-1])return;S+=O.width;const x=Math.max(S,_);x>r||(e.save(),e.beginPath(),e.rect(x,o+1,1e4,i-o-1),e.clip(),va(E,M,i,u,c,m,p,R,(L,D,C,I)=>{if(!I&&v.length>0&&!v.some(U=>to(S,L,1e4,C,U.x,U.y,U.width,U.height)))return;const T=f.hasIndex(D),k=h.hasIndex(D);e.beginPath();const V=d==null?void 0:d(D),N=V===void 0?b:gr(b,V);N.bgCell!==b.bgCell&&(e.fillStyle=N.bgCell,e.fillRect(S,L,1e4,C)),k&&(e.fillStyle=N.bgHeader,e.fillRect(S,L,1e4,C)),T&&(e.fillStyle=N.accentLight,e.fillRect(S,L,1e4,C))}),e.restore())})}function Hp(e,t,n,r,i,o,a,l,s){let u=!1;for(const m of t)if(!m.sticky){u=a(m.sourceIndex);break}const c=s.horizontalBorderColor??s.borderColor,d=s.borderColor,f=u?gi(t):0;let h;if(f!==0&&(h=iu(d,s.bgCell),e.beginPath(),e.moveTo(f+.5,0),e.lineTo(f+.5,r),e.strokeStyle=h,e.stroke()),i>0){const m=d===c&&h!==void 0?h:iu(c,s.bgCell),p=Xr(o,i,l);e.beginPath(),e.moveTo(0,r-p+.5),e.lineTo(n,r-p+.5),e.strokeStyle=m,e.stroke()}}const Md=(e,t,n)=>{let r=0,i=t,o=0,a=n;if(e!==void 0&&e.length>0){r=Number.MAX_SAFE_INTEGER,o=Number.MAX_SAFE_INTEGER,i=Number.MIN_SAFE_INTEGER,a=Number.MIN_SAFE_INTEGER;for(const l of e)r=Math.min(r,l.x-1),i=Math.max(i,l.x+l.width+1),o=Math.min(o,l.y-1),a=Math.max(a,l.y+l.height+1)}return{minX:r,maxX:i,minY:o,maxY:a}};function zp(e,t,n,r,i,o,a,l,s,u,c,d,f,h,m){var C;const p=m.bgCell,{minX:v,maxX:y,minY:b,maxY:R}=Md(l,o,a),O=[],S=a-Xr(h,f,u);let M=s,_=n,E=0;for(;M+i<S;){const I=M+i,T=u(_);if(I>=b&&I<=R-1){const k=c==null?void 0:c(_),V=k==null?void 0:k.bgCell;V!==void 0&&V!==p&&_>=h-f&&O.push({x:v,y:I,w:y-v,h:T,color:V})}M+=T,_<h-f&&(E=M),_++}let x=0;const L=Math.min(S,R)-E;if(L>0)for(let I=0;I<t.length;I++){const T=t[I];if(T.width===0)continue;const k=T.sticky?x:x+r,V=(C=T.themeOverride)==null?void 0:C.bgCell;V!==void 0&&V!==p&&k>=v&&k<=y&&d(I+1)&&O.push({x:k,y:E,w:T.width,h:L,color:V}),x+=T.width}if(O.length===0)return;let D;e.beginPath();for(let I=O.length-1;I>=0;I--){const T=O[I];D===void 0?D=T.color:T.color!==D&&(e.fillStyle=D,e.fill(),e.beginPath(),D=T.color),e.rect(T.x,T.y,T.w,T.h)}D!==void 0&&(e.fillStyle=D,e.fill()),e.beginPath()}function vu(e,t,n,r,i,o,a,l,s,u,c,d,f,h,m,p,v,y=!1){if(s!==void 0){e.beginPath(),e.save(),e.rect(0,0,o,a);for(const C of s)e.rect(C.x+1,C.y+1,C.width-1,C.height-1);e.clip("evenodd")}const b=v.horizontalBorderColor??v.borderColor,R=v.borderColor,{minX:O,maxX:S,minY:M,maxY:_}=Md(l,o,a),E=[];e.beginPath();let x=.5;for(let C=0;C<t.length;C++){const I=t[C];if(I.width===0)continue;x+=I.width;const T=I.sticky?x:x+r;T>=O&&T<=S&&h(C+1)&&E.push({x1:T,y1:Math.max(u,M),x2:T,y2:Math.min(a,_),color:R})}let L=a+.5;for(let C=p-m;C<p;C++){const I=d(C);L-=I,E.push({x1:O,y1:L,x2:S,y2:L,color:b})}if(y!==!0){let C=c+.5,I=n;const T=L;for(;C+i<T;){const k=C+i;if(k>=M&&k<=_-1){const V=f==null?void 0:f(I);E.push({x1:O,y1:k,x2:S,y2:k,color:(V==null?void 0:V.horizontalBorderColor)??(V==null?void 0:V.borderColor)??b})}C+=d(I),I++}}const D=hh(E,C=>C.color);for(const C of Object.keys(D)){e.strokeStyle=C;for(const I of D[C])e.moveTo(I.x1,I.y1),e.lineTo(I.x2,I.y2);e.stroke(),e.beginPath()}s!==void 0&&e.restore()}function Vp(e,t,n,r,i,o,a,l,s,u,c,d,f,h,m,p,v,y,b){const R=[];e.imageSmoothingEnabled=!1;const O=Math.min(i.cellYOffset,a),S=Math.max(i.cellYOffset,a);let M=0;if(typeof y=="number")M+=(S-O)*y;else for(let T=O;T<S;T++)M+=y(T);a>i.cellYOffset&&(M=-M),M+=s-i.translateY;const _=Math.min(i.cellXOffset,o),E=Math.max(i.cellXOffset,o);let x=0;for(let T=_;T<E;T++)x+=p[T].width;o>i.cellXOffset&&(x=-x),x+=l-i.translateX;const L=gi(v);if(x!==0&&M!==0)return{regions:[]};const D=u>0?Xr(f,u,y):0,C=c-L-Math.abs(x),I=d-h-D-Math.abs(M)-1;if(C>150&&I>150){const T={sx:0,sy:0,sw:c*m,sh:d*m,dx:0,dy:0,dw:c*m,dh:d*m};if(M>0?(T.sy=(h+1)*m,T.sh=I*m,T.dy=(M+h+1)*m,T.dh=I*m,R.push({x:0,y:h,width:c,height:M+1})):M<0&&(T.sy=(-M+h+1)*m,T.sh=I*m,T.dy=(h+1)*m,T.dh=I*m,R.push({x:0,y:d+M-D,width:c,height:-M+D})),x>0?(T.sx=L*m,T.sw=C*m,T.dx=(x+L)*m,T.dw=C*m,R.push({x:L-1,y:0,width:x+2,height:d})):x<0&&(T.sx=(L-x)*m,T.sw=C*m,T.dx=L*m,T.dw=C*m,R.push({x:c+x,y:0,width:-x,height:d})),e.setTransform(1,0,0,1,0,0),b){if(L>0&&x!==0&&M===0&&(r===void 0||(n==null?void 0:n[1])!==!1)){const k=L*m,V=d*m;e.drawImage(t,0,0,k,V,0,0,k,V)}if(D>0&&x===0&&M!==0&&(r===void 0||(n==null?void 0:n[0])!==!1)){const k=(d-D)*m,V=c*m,N=D*m;e.drawImage(t,0,k,V,N,0,k,V,N)}}e.drawImage(t,T.sx,T.sy,T.sw,T.sh,T.dx,T.dy,T.dw,T.dh),e.scale(m,m)}return e.imageSmoothingEnabled=!0,{regions:R}}function $p(e,t,n,r,i,o,a,l,s,u){const c=[];return t!==e.cellXOffset||n!==e.cellYOffset||r!==e.translateX||i!==e.translateY||Or(s,n,r,i,l,(d,f,h,m)=>{if(d.sourceIndex===u){const p=Math.max(f,m)+1;return c.push({x:p,y:0,width:o-p,height:a}),!0}}),c}function Np(e,t){if(t===void 0||e.width!==t.width||e.height!==t.height||e.theme!==t.theme||e.headerHeight!==t.headerHeight||e.rowHeight!==t.rowHeight||e.rows!==t.rows||e.freezeColumns!==t.freezeColumns||e.getRowThemeOverride!==t.getRowThemeOverride||e.isFocused!==t.isFocused||e.isResizing!==t.isResizing||e.verticalBorder!==t.verticalBorder||e.getCellContent!==t.getCellContent||e.highlightRegions!==t.highlightRegions||e.selection!==t.selection||e.dragAndDropState!==t.dragAndDropState||e.prelightCells!==t.prelightCells||e.touchMode!==t.touchMode||e.maxScaleFactor!==t.maxScaleFactor)return!1;if(e.mappedColumns!==t.mappedColumns){if(e.mappedColumns.length>100||e.mappedColumns.length!==t.mappedColumns.length)return!1;let n;for(let r=0;r<e.mappedColumns.length;r++){const i=e.mappedColumns[r],o=t.mappedColumns[r];if(hi(i,o))continue;if(n!==void 0||i.width===o.width)return!1;const{width:a,...l}=i,{width:s,...u}=o;if(!hi(l,u))return!1;n=r}return n===void 0?!0:n}return!0}function bu(e,t,n,r,i,o,a,l,s,u,c,d,f,h,m,p){const v=m==null?void 0:m.filter(_=>_.style!=="no-outline");if(v===void 0||v.length===0)return;const y=gi(l),b=Xr(h,f,d),R=[s,0,l.length,h-f],O=[y,0,t,n-b],S=v.map(_=>{const E=_.range,x=_.style??"dashed";return Dp(E,R,t,n,O).map(L=>{const D=L.rect,C=Cs(D.x,D.y,t,n,c,u+c,r,i,o,a,h,s,f,l,d),I=D.width===1&&D.height===1?C:Cs(D.x+D.width-1,D.y+D.height-1,t,n,c,u+c,r,i,o,a,h,s,f,l,d);return D.x+D.width>=l.length&&(I.width-=1),D.y+D.height>=h&&(I.height-=1),{color:_.color,style:x,clip:L.clip,rect:Tp({x:C.x,y:C.y,width:I.x+I.width-C.x,height:I.y+I.height-C.y},t,n,8)}})}),M=()=>{e.lineWidth=1;let _=!1;for(const E of S)for(const x of E)if((x==null?void 0:x.rect)!==void 0&&to(0,0,t,n,x.rect.x,x.rect.y,x.rect.width,x.rect.height)){const L=_,D=!Ip(x.clip,x.rect);D&&(e.save(),e.rect(x.clip.x,x.clip.y,x.clip.width,x.clip.height),e.clip()),x.style==="dashed"&&!_?(e.setLineDash([5,3]),_=!0):(x.style==="solid"||x.style==="solid-outline")&&_&&(e.setLineDash([]),_=!1),e.strokeStyle=x.style==="solid-outline"?_n(_n(x.color,p.borderColor),p.bgCell):Ur(x.color,1),e.strokeRect(x.rect.x+.5,x.rect.y+.5,x.rect.width-1,x.rect.height-1),D&&(e.restore(),_=L)}_&&e.setLineDash([])};return M(),M}function wu(e,t,n,r,i){e.beginPath(),e.moveTo(t,n),e.lineTo(t,r),e.lineWidth=2,e.strokeStyle=i,e.stroke(),e.globalAlpha=1}function rs(e,t,n,r,i,o,a,l,s,u,c,d,f,h,m,p,v){if(c.current===void 0)return;const y=c.current.range,b=c.current.cell,R=[y.x+y.width-1,y.y+y.height-1];if(b[1]>=v&&R[1]>=v||!a.some(T=>T.sourceIndex===b[0]||T.sourceIndex===R[0]))return;const[S,M]=c.current.cell,_=f(c.current.cell),E=_.span??[S,S],x=M>=v-h,L=h>0&&!x?Xr(v,h,d)-1:0,D=R[1];let C;if(Or(a,r,i,o,u,(T,k,V,N,U)=>{if(T.sticky&&S>T.sourceIndex)return;const oe=T.sourceIndex<E[0],ee=T.sourceIndex>E[1],j=T.sourceIndex===R[0];if(!(!j&&(oe||ee)))return va(U,V,n,v,d,h,m,void 0,(ne,ie,ue)=>{if(ie!==M&&ie!==D)return;let ge=k,J=T.width;if(_.span!==void 0){const P=wd(_.span,k,ne,T.width,ue,T,l),q=T.sticky?P[0]:P[1];q!==void 0&&(ge=q.x,J=q.width)}return ie===D&&j&&p&&(C=()=>{var P;N>ge&&!T.sticky&&(e.beginPath(),e.rect(N,0,t-N,n),e.clip()),e.beginPath(),e.rect(ge+J-4,ne+ue-4,4,4),e.fillStyle=((P=T.themeOverride)==null?void 0:P.accentColor)??s.accentColor,e.fill()}),C!==void 0}),C!==void 0}),C===void 0)return;const I=()=>{e.save(),e.beginPath(),e.rect(0,u,t,n-u-L),e.clip(),C==null||C(),e.restore()};return I(),I}function Bp(e,t,n,r,i,o,a,l,s){s===void 0||s.size===0||(e.beginPath(),bd(t,n,o,r,(u,c,d,f,h,m)=>{s.hasItemInRectangle({x:u[0],y:-2,width:u[1]-u[0]+1,height:1})&&e.rect(d,f,h,m)}),Or(t,l,o,a,i,(u,c,d,f)=>{const h=Math.max(0,f-c),m=c+h+1,p=u.width-h-1;s.has([u.sourceIndex,-1])&&e.rect(m,r,p,i-r)}),e.clip())}function Wp(e,t,n,r,i,o,a,l,s,u){let c=0;return Or(e,o,r,i,n,(d,f,h,m,p)=>(va(p,h,t,a,l,s,u,void 0,(v,y,b,R)=>{R||(c=Math.max(y,c))}),!0)),c}function yu(e,t){var pn;const{canvasCtx:n,headerCanvasCtx:r,width:i,height:o,cellXOffset:a,cellYOffset:l,translateX:s,translateY:u,mappedColumns:c,enableGroups:d,freezeColumns:f,dragAndDropState:h,theme:m,drawFocus:p,headerHeight:v,groupHeaderHeight:y,disabledRows:b,rowHeight:R,verticalBorder:O,overrideCursor:S,isResizing:M,selection:_,fillHandle:E,freezeTrailingRows:x,rows:L,getCellContent:D,getGroupDetails:C,getRowThemeOverride:I,isFocused:T,drawHeaderCallback:k,prelightCells:V,drawCellCallback:N,highlightRegions:U,resizeCol:oe,imageLoader:ee,lastBlitData:j,hoverValues:ne,hyperWrapping:ie,hoverInfo:ue,spriteManager:ge,maxScaleFactor:J,hasAppendRow:H,touchMode:P,enqueue:q,renderStateProvider:fe,getCellRenderer:me,renderStrategy:ze,bufferACtx:ve,bufferBCtx:Xe,damage:Me,minimumCellWidth:Pt,resizeIndicator:Mt}=e;if(i===0||o===0)return;const Qe=ze==="double-buffer",le=Math.min(J,Math.ceil(window.devicePixelRatio??1)),je=ze!=="direct"&&Np(e,t),we=n.canvas;(we.width!==i*le||we.height!==o*le)&&(we.width=i*le,we.height=o*le,we.style.width=i+"px",we.style.height=o+"px");const ce=r.canvas,be=d?y+v:v,Ve=be+1;(ce.width!==i*le||ce.height!==Ve*le)&&(ce.width=i*le,ce.height=Ve*le,ce.style.width=i+"px",ce.style.height=Ve+"px");const Oe=ve.canvas,nt=Xe.canvas;Qe&&(Oe.width!==i*le||Oe.height!==o*le)&&(Oe.width=i*le,Oe.height=o*le,j.current!==void 0&&(j.current.aBufferScroll=void 0)),Qe&&(nt.width!==i*le||nt.height!==o*le)&&(nt.width=i*le,nt.height=o*le,j.current!==void 0&&(j.current.bBufferScroll=void 0));const pe=j.current;if(je===!0&&a===(pe==null?void 0:pe.cellXOffset)&&l===(pe==null?void 0:pe.cellYOffset)&&s===(pe==null?void 0:pe.translateX)&&u===(pe==null?void 0:pe.translateY))return;let Ee=null;Qe&&(Ee=n);const at=r;let Ae;Qe?Me!==void 0?Ae=(pe==null?void 0:pe.lastBuffer)==="b"?Xe:ve:Ae=(pe==null?void 0:pe.lastBuffer)==="b"?ve:Xe:Ae=n;const rt=Ae.canvas,vt=Qe?rt===Oe?nt:Oe:we,ht=typeof R=="number"?()=>R:R;at.save(),Ae.save(),at.beginPath(),Ae.beginPath(),at.textBaseline="middle",Ae.textBaseline="middle",le!==1&&(at.scale(le,le),Ae.scale(le,le));const He=ys(c,a,i,h,s);let It=[];const Yt=p&&((pn=_.current)==null?void 0:pn.cell[1])===l&&u===0;let mt=!1;if(U!==void 0){for(const Pe of U)if(Pe.style!=="no-outline"&&Pe.range.y===l&&u===0){mt=!0;break}}const Rt=()=>{_p(at,He,d,ue,i,s,v,y,h,M,_,m,ge,ne,O,C,Me,k,P),vu(at,He,l,s,u,i,o,void 0,void 0,y,be,ht,I,O,x,L,m,!0),at.beginPath(),at.moveTo(0,Ve-.5),at.lineTo(i,Ve-.5),at.strokeStyle=_n(m.headerBottomBorderColor??m.horizontalBorderColor??m.borderColor,m.bgHeader),at.stroke(),mt&&bu(at,i,o,a,l,s,u,c,f,v,y,R,x,L,U,m),Yt&&rs(at,i,o,l,s,u,He,c,m,be,_,ht,D,x,H,E,L)};if(Me!==void 0){const Pe=He[He.length-1].sourceIndex+1,Ft=Me.hasItemInRegion([{x:a,y:-2,width:Pe,height:2},{x:a,y:l,width:Pe,height:300},{x:0,y:l,width:f,height:300},{x:0,y:-2,width:f,height:2},{x:a,y:L-x,width:Pe,height:x,when:x>0}]),dn=fn=>{mu(fn,He,c,o,be,s,u,l,L,ht,D,C,I,b,T,p,x,H,It,Me,_,V,U,ee,ge,ne,ue,N,ie,m,q,fe,me,S,Pt);const vn=_.current;E&&p&&vn!==void 0&&Me.has(id(vn.range))&&rs(fn,i,o,l,s,u,He,c,m,be,_,ht,D,x,H,E,L)};Ft&&(dn(Ae),Ee!==null&&(Ee.save(),Ee.scale(le,le),Ee.textBaseline="middle",dn(Ee),Ee.restore()),Me.hasHeader()&&(Bp(at,He,i,y,be,s,u,l,Me),Rt())),Ae.restore(),at.restore();return}if((je!==!0||a!==(pe==null?void 0:pe.cellXOffset)||s!==(pe==null?void 0:pe.translateX)||Yt!==(pe==null?void 0:pe.mustDrawFocusOnHeader)||mt!==(pe==null?void 0:pe.mustDrawHighlightRingsOnHeader))&&Rt(),je===!0){Pn(vt!==void 0&&pe!==void 0);const{regions:Pe}=Vp(Ae,vt,vt===Oe?pe.aBufferScroll:pe.bBufferScroll,vt===Oe?pe.bBufferScroll:pe.aBufferScroll,pe,a,l,s,u,x,i,o,L,be,le,c,He,R,Qe);It=Pe}else je!==!1&&(Pn(pe!==void 0),It=$p(pe,a,l,s,u,i,o,be,He,je));Hp(Ae,He,i,o,x,L,O,ht,m);const Gt=bu(Ae,i,o,a,l,s,u,c,f,v,y,R,x,L,U,m),Lt=p?rs(Ae,i,o,l,s,u,He,c,m,be,_,ht,D,x,H,E,L):void 0;if(Ae.fillStyle=m.bgCell,It.length>0){Ae.beginPath();for(const Pe of It)Ae.rect(Pe.x,Pe.y,Pe.width,Pe.height);Ae.clip(),Ae.fill(),Ae.beginPath()}else Ae.fillRect(0,0,i,o);const Sn=mu(Ae,He,c,o,be,s,u,l,L,ht,D,C,I,b,T,p,x,H,It,Me,_,V,U,ee,ge,ne,ue,N,ie,m,q,fe,me,S,Pt);Ap(Ae,He,c,i,o,be,s,u,l,L,ht,I,_.rows,b,x,H,It,Me,m),zp(Ae,He,l,s,u,i,o,It,be,ht,I,O,x,L,m),vu(Ae,He,l,s,u,i,o,It,Sn,y,be,ht,I,O,x,L,m),Gt==null||Gt(),Lt==null||Lt(),M&&Mt!=="none"&&Or(He,0,s,0,be,(Pe,Ft)=>Pe.sourceIndex===oe?(wu(at,Ft+Pe.width,0,be+1,_n(m.resizeIndicatorColor??m.accentLight,m.bgHeader)),Mt==="full"&&wu(Ae,Ft+Pe.width,be,o,_n(m.resizeIndicatorColor??m.accentLight,m.bgCell)),!0):!1),Ee!==null&&(Ee.fillStyle=m.bgCell,Ee.fillRect(0,0,i,o),Ee.drawImage(Ae.canvas,0,0));const Wt=Wp(He,o,be,s,u,l,L,ht,x,H);ee==null||ee.setWindow({x:a,y:l,width:He.length,height:Wt-l},f,Array.from({length:x},(Pe,Ft)=>L-1-Ft));const St=pe!==void 0&&(a!==pe.cellXOffset||s!==pe.translateX),En=pe!==void 0&&(l!==pe.cellYOffset||u!==pe.translateY);j.current={cellXOffset:a,cellYOffset:l,translateX:s,translateY:u,mustDrawFocusOnHeader:Yt,mustDrawHighlightRingsOnHeader:mt,lastBuffer:Qe?rt===Oe?"a":"b":void 0,aBufferScroll:rt===Oe?[St,En]:pe==null?void 0:pe.aBufferScroll,bBufferScroll:rt===nt?[St,En]:pe==null?void 0:pe.bBufferScroll},Ae.restore(),at.restore()}const Up=80;function qp(e){const t=e-1;return t*t*t+1}class Yp{constructor(t){dt(this,"callback");dt(this,"currentHoveredItem");dt(this,"leavingItems",[]);dt(this,"lastAnimationTime");dt(this,"addToLeavingItems",t=>{this.leavingItems.some(r=>Gi(r.item,t.item))||this.leavingItems.push(t)});dt(this,"removeFromLeavingItems",t=>{const n=this.leavingItems.find(r=>Gi(r.item,t));return this.leavingItems=this.leavingItems.filter(r=>r!==n),(n==null?void 0:n.hoverAmount)??0});dt(this,"cleanUpLeavingElements",()=>{this.leavingItems=this.leavingItems.filter(t=>t.hoverAmount>0)});dt(this,"shouldStep",()=>{const t=this.leavingItems.length>0,n=this.currentHoveredItem!==void 0&&this.currentHoveredItem.hoverAmount<1;return t||n});dt(this,"getAnimatingItems",()=>this.currentHoveredItem!==void 0?[...this.leavingItems,this.currentHoveredItem]:this.leavingItems.map(t=>({...t,hoverAmount:qp(t.hoverAmount)})));dt(this,"step",t=>{if(this.lastAnimationTime===void 0)this.lastAnimationTime=t;else{const r=(t-this.lastAnimationTime)/Up;for(const o of this.leavingItems)o.hoverAmount=Nn(o.hoverAmount-r,0,1);this.currentHoveredItem!==void 0&&(this.currentHoveredItem.hoverAmount=Nn(this.currentHoveredItem.hoverAmount+r,0,1));const i=this.getAnimatingItems();this.callback(i),this.cleanUpLeavingElements()}this.shouldStep()?(this.lastAnimationTime=t,window.requestAnimationFrame(this.step)):this.lastAnimationTime=void 0});dt(this,"setHovered",t=>{var n;if(!Gi((n=this.currentHoveredItem)==null?void 0:n.item,t)){if(this.currentHoveredItem!==void 0&&this.addToLeavingItems(this.currentHoveredItem),t!==void 0){const r=this.removeFromLeavingItems(t);this.currentHoveredItem={item:t,hoverAmount:r}}else this.currentHoveredItem=void 0;this.lastAnimationTime===void 0&&window.requestAnimationFrame(this.step)}});this.callback=t}}class Xp{constructor(t){dt(this,"fn");dt(this,"val");this.fn=t}get value(){return this.val??(this.val=this.fn())}}function Us(e){return new Xp(e)}const jp=Us(()=>window.navigator.userAgent.includes("Firefox")),ia=Us(()=>window.navigator.userAgent.includes("Mac OS")&&window.navigator.userAgent.includes("Safari")&&!window.navigator.userAgent.includes("Chrome")),oa=Us(()=>window.navigator.platform.toLowerCase().startsWith("mac"));function Gp(e){const t=g.useRef([]),n=g.useRef(0),r=g.useRef(e);r.current=e;const i=g.useCallback(()=>{const o=()=>window.requestAnimationFrame(a),a=()=>{const l=t.current.map(Bs);t.current=[],r.current(new Zi(l)),t.current.length>0?n.current++:n.current=0};window.requestAnimationFrame(n.current>600?o:a)},[]);return g.useCallback(o=>{t.current.length===0&&i();const a=er(o[0],o[1]);t.current.includes(a)||t.current.push(a)},[i])}const Er="header",Wn="group-header",aa="out-of-bounds";var di;(function(e){e[e.Start=-2]="Start",e[e.StartPadding=-1]="StartPadding",e[e.Center=0]="Center",e[e.EndPadding=1]="EndPadding",e[e.End=2]="End"})(di||(di={}));function Rd(e,t){return e===t?!0:(e==null?void 0:e.kind)==="out-of-bounds"?(e==null?void 0:e.kind)===(t==null?void 0:t.kind)&&(e==null?void 0:e.location[0])===(t==null?void 0:t.location[0])&&(e==null?void 0:e.location[1])===(t==null?void 0:t.location[1])&&(e==null?void 0:e.region[0])===(t==null?void 0:t.region[0])&&(e==null?void 0:e.region[1])===(t==null?void 0:t.region[1]):(e==null?void 0:e.kind)===(t==null?void 0:t.kind)&&(e==null?void 0:e.location[0])===(t==null?void 0:t.location[0])&&(e==null?void 0:e.location[1])===(t==null?void 0:t.location[1])}const Cu=6,Kp=(e,t)=>{if(e.kind===te.Custom)return e.copyData;const n=t==null?void 0:t(e);return(n==null?void 0:n.getAccessibilityString(e))??""},Zp=(e,t)=>{const{width:n,height:r,accessibilityHeight:i,columns:o,cellXOffset:a,cellYOffset:l,headerHeight:s,fillHandle:u=!1,groupHeaderHeight:c,rowHeight:d,rows:f,getCellContent:h,getRowThemeOverride:m,onHeaderMenuClick:p,onHeaderIndicatorClick:v,enableGroups:y,isFilling:b,onCanvasFocused:R,onCanvasBlur:O,isFocused:S,selection:M,freezeColumns:_,onContextMenu:E,freezeTrailingRows:x,fixedShadowX:L=!0,fixedShadowY:D=!0,drawFocusRing:C,onMouseDown:I,onMouseUp:T,onMouseMoveRaw:k,onMouseMove:V,onItemHovered:N,dragAndDropState:U,firstColAccessible:oe,onKeyDown:ee,onKeyUp:j,highlightRegions:ne,canvasRef:ie,onDragStart:ue,onDragEnd:ge,eventTargetRef:J,isResizing:H,resizeColumn:P,isDragging:q,isDraggable:fe=!1,allowResize:me,disabledRows:ze,hasAppendRow:ve,getGroupDetails:Xe,theme:Me,prelightCells:Pt,headerIcons:Mt,verticalBorder:Qe,drawCell:le,drawHeader:je,onCellFocused:we,onDragOverCell:ce,onDrop:be,onDragLeave:Ve,imageWindowLoader:Oe,smoothScrollX:nt=!1,smoothScrollY:pe=!1,experimental:Ee,getCellRenderer:at,resizeIndicator:Ae="full"}=e,rt=e.translateX??0,vt=e.translateY??0,ht=Math.max(_,Math.min(o.length-1,a)),He=g.useRef(null),It=g.useRef(window),Yt=It.current,mt=Oe,Rt=g.useRef(),[Gt,Lt]=g.useState(!1),Sn=g.useRef([]),Wt=g.useRef(),[St,En]=g.useState(),[pn,Pe]=g.useState(),Ft=g.useRef(null),[dn,fn]=g.useState(),[vn,st]=g.useState(!1),zt=g.useRef(vn);zt.current=vn;const Dt=g.useMemo(()=>new Rp(Mt,()=>{Zt.current=void 0,Ln.current()}),[Mt]),nn=y?c+s:s,Tt=g.useRef(-1),Vt=((Ee==null?void 0:Ee.enableFirefoxRescaling)??!1)&&jp.value,Ge=((Ee==null?void 0:Ee.enableSafariRescaling)??!1)&&ia.value;g.useLayoutEffect(()=>{window.devicePixelRatio===1||!Vt&&!Ge||(Tt.current!==-1&&Lt(!0),window.clearTimeout(Tt.current),Tt.current=window.setTimeout(()=>{Lt(!1),Tt.current=-1},200))},[l,ht,rt,vt,Vt,Ge]);const $t=Cm(o,_),At=L?gi($t,U):0,Nt=g.useCallback(($,ae,Se)=>{const xe=$.getBoundingClientRect();if(ae>=$t.length||Se>=f)return;const de=xe.width/n,Re=Cs(ae,Se,n,r,c,nn,ht,l,rt,vt,f,_,x,$t,d);return de!==1&&(Re.x*=de,Re.y*=de,Re.width*=de,Re.height*=de),Re.x+=xe.x,Re.y+=xe.y,Re},[n,r,c,nn,ht,l,rt,vt,f,_,x,$t,d]),he=g.useCallback(($,ae,Se,xe)=>{const de=$.getBoundingClientRect(),Re=de.width/n,it=(ae-de.left)/Re,ot=(Se-de.top)/Re,Te=5,xt=ys($t,ht,n,void 0,rt);let ke=0,Ze=0;xe instanceof MouseEvent&&(ke=xe.button,Ze=xe.buttons);const We=Mm(it,xt,rt),ft=Rm(ot,r,y,s,c,f,d,l,vt,x),an=(xe==null?void 0:xe.shiftKey)===!0,kn=(xe==null?void 0:xe.ctrlKey)===!0,yt=(xe==null?void 0:xe.metaKey)===!0,Kt=xe!==void 0&&!(xe instanceof MouseEvent)||(xe==null?void 0:xe.pointerType)==="touch",jn=[it<0?-1:n<it?1:0,ot<nn?-1:r<ot?1:0];let yn;if(We===-1||ot<0||it<0||ft===void 0||it>n||ot>r){const Et=it>n?1:it<0?-1:0,Mn=ot>r?1:ot<0?-1:0;let Tn=Et*2,Ct=Mn*2;Et===0&&(Tn=We===-1?di.EndPadding:di.Center),Mn===0&&(Ct=ft===void 0?di.EndPadding:di.Center);let en=!1;if(We===-1&&ft===-1){const Sr=Nt($,$t.length-1,-1);Pn(Sr!==void 0),en=ae<Sr.x+Sr.width+Te}const Cr=it>n&&it<n+bs()||ot>r&&ot<r+bs();yn={kind:aa,location:[We!==-1?We:it<0?0:$t.length-1,ft??f-1],region:[Tn,Ct],shiftKey:an,ctrlKey:kn,metaKey:yt,isEdge:en,isTouch:Kt,button:ke,buttons:Ze,scrollEdge:jn,isMaybeScrollbar:Cr}}else if(ft<=-1){let Et=Nt($,We,ft);Pn(Et!==void 0);let Mn=Et!==void 0&&Et.x+Et.width-ae<=Te;const Tn=We-1;ae-Et.x<=Te&&Tn>=0?(Mn=!0,Et=Nt($,Tn,ft),Pn(Et!==void 0),yn={kind:y&&ft===-2?Wn:Er,location:[Tn,ft],bounds:Et,group:$t[Tn].group??"",isEdge:Mn,shiftKey:an,ctrlKey:kn,metaKey:yt,isTouch:Kt,localEventX:ae-Et.x,localEventY:Se-Et.y,button:ke,buttons:Ze,scrollEdge:jn}):yn={kind:y&&ft===-2?Wn:Er,group:$t[We].group??"",location:[We,ft],bounds:Et,isEdge:Mn,shiftKey:an,ctrlKey:kn,metaKey:yt,isTouch:Kt,localEventX:ae-Et.x,localEventY:Se-Et.y,button:ke,buttons:Ze,scrollEdge:jn}}else{const Et=Nt($,We,ft);Pn(Et!==void 0);const Mn=Et!==void 0&&Et.x+Et.width-ae<Te;let Tn=!1;if(u&&M.current!==void 0){const Ct=id(M.current.range),en=Nt($,Ct[0],Ct[1]);if(en!==void 0){const Cr=en.x+en.width-2,Sr=en.y+en.height-2;Tn=Math.abs(Cr-ae)<Cu&&Math.abs(Sr-Se)<Cu}}yn={kind:"cell",location:[We,ft],bounds:Et,isEdge:Mn,shiftKey:an,ctrlKey:kn,isFillHandle:Tn,metaKey:yt,isTouch:Kt,localEventX:ae-Et.x,localEventY:Se-Et.y,button:ke,buttons:Ze,scrollEdge:jn}}return yn},[n,$t,ht,rt,r,y,s,c,f,d,l,vt,x,Nt,u,M,nn]),[lt]=St??[],un=g.useRef(()=>{}),hn=g.useRef(St);hn.current=St;const[z,et]=g.useMemo(()=>{const $=document.createElement("canvas"),ae=document.createElement("canvas");return $.style.display="none",$.style.opacity="0",$.style.position="fixed",ae.style.display="none",ae.style.opacity="0",ae.style.position="fixed",[$.getContext("2d",{alpha:!1}),ae.getContext("2d",{alpha:!1})]},[]);g.useLayoutEffect(()=>{if(!(z===null||et===null))return document.documentElement.append(z.canvas),document.documentElement.append(et.canvas),()=>{z.canvas.remove(),et.canvas.remove()}},[z,et]);const $e=g.useMemo(()=>new Fm,[]),Ot=Vt&&Gt?1:Ge&&Gt?2:5,cn=(Ee==null?void 0:Ee.disableMinimumCellWidth)===!0?1:10,Zt=g.useRef(),qn=g.useRef(null),In=g.useRef(null),Jt=g.useCallback(()=>{var it;const $=He.current,ae=Ft.current;if($===null||ae===null||(qn.current===null&&(qn.current=$.getContext("2d",{alpha:!1}),$.width=0,$.height=0),In.current===null&&(In.current=ae.getContext("2d",{alpha:!1}),ae.width=0,ae.height=0),qn.current===null||In.current===null||z===null||et===null))return;let Se=!1;const xe=ot=>{Se=!0,fn(ot)},de=Zt.current,Re={headerCanvasCtx:In.current,canvasCtx:qn.current,bufferACtx:z,bufferBCtx:et,width:n,height:r,cellXOffset:ht,cellYOffset:l,translateX:Math.round(rt),translateY:Math.round(vt),mappedColumns:$t,enableGroups:y,freezeColumns:_,dragAndDropState:U,theme:Me,headerHeight:s,groupHeaderHeight:c,disabledRows:ze??bt.empty(),rowHeight:d,verticalBorder:Qe,isResizing:H,resizeCol:P,isFocused:S,selection:M,fillHandle:u,drawCellCallback:le,hasAppendRow:ve,overrideCursor:xe,maxScaleFactor:Ot,freezeTrailingRows:x,rows:f,drawFocus:C,getCellContent:h,getGroupDetails:Xe??(ot=>({name:ot})),getRowThemeOverride:m,drawHeaderCallback:je,prelightCells:Pt,highlightRegions:ne,imageLoader:mt,lastBlitData:Wt,damage:Rt.current,hoverValues:Sn.current,hoverInfo:hn.current,spriteManager:Dt,scrolling:Gt,hyperWrapping:(Ee==null?void 0:Ee.hyperWrapping)??!1,touchMode:vn,enqueue:un.current,renderStateProvider:$e,renderStrategy:(Ee==null?void 0:Ee.renderStrategy)??(ia.value?"double-buffer":"single-buffer"),getCellRenderer:at,minimumCellWidth:cn,resizeIndicator:Ae};Re.damage===void 0?(Zt.current=Re,yu(Re,de)):yu(Re,void 0),!Se&&(Re.damage===void 0||Re.damage.has((it=hn==null?void 0:hn.current)==null?void 0:it[0]))&&fn(void 0)},[z,et,n,r,ht,l,rt,vt,$t,y,_,U,Me,s,c,ze,d,Qe,H,ve,P,S,M,u,x,f,C,Ot,h,Xe,m,le,je,Pt,ne,mt,Dt,Gt,Ee==null?void 0:Ee.hyperWrapping,Ee==null?void 0:Ee.renderStrategy,vn,$e,at,cn,Ae]),Ln=g.useRef(Jt);g.useLayoutEffect(()=>{Jt(),Ln.current=Jt},[Jt]),g.useLayoutEffect(()=>{(async()=>{var ae;((ae=document==null?void 0:document.fonts)==null?void 0:ae.ready)!==void 0&&(await document.fonts.ready,Zt.current=void 0,Ln.current())})()},[]);const Yn=g.useCallback($=>{Rt.current=$,Ln.current(),Rt.current=void 0},[]),Ca=Gp(Yn);un.current=Ca;const lo=g.useCallback($=>{Yn(new Zi($.map(ae=>ae.cell)))},[Yn]);mt.setCallback(Yn);const[uo,Sa]=g.useState(!1),[Gr,br]=lt??[],pi=Gr!==void 0&&br===-1,xa=Gr!==void 0&&br===-2;let vi=!1,bi=!1,Pr=dn;if(Pr===void 0&&Gr!==void 0&&br!==void 0&&br>-1&&br<f){const $=h([Gr,br],!0);vi=$.kind===Un.NewRow||$.kind===Un.Marker&&$.markerKind!=="number",bi=$.kind===te.Boolean&&_s($),Pr=$.cursor}const xn=q?"grabbing":(pn??!1)||H?"col-resize":uo||b?"crosshair":Pr!==void 0?Pr:pi||vi||bi||xa?"pointer":"default",wi=g.useMemo(()=>({contain:"strict",display:"block",cursor:xn}),[xn]),yi=g.useRef("default"),Kr=J==null?void 0:J.current;Kr!=null&&yi.current!==wi.cursor&&(Kr.style.cursor=yi.current=wi.cursor);const cr=g.useCallback(($,ae,Se,xe)=>{if(Xe===void 0)return;const de=Xe($);if(de.actions!==void 0){const Re=Sd(ae,de.actions);for(const[it,ot]of Re.entries())if(Wr(ot,Se+ae.x,xe+ot.y))return de.actions[it]}},[Xe]),dr=g.useCallback(($,ae,Se,xe)=>{const de=$t[ae];if(!q&&!H&&!(pn??!1)){const Re=Nt($,ae,-1);Pn(Re!==void 0);const it=xd(void 0,de,Re.x,Re.y,Re.width,Re.height,Me,As(de.title)==="rtl");if(de.hasMenu===!0&&it.menuBounds!==void 0&&Wr(it.menuBounds,Se,xe))return{area:"menu",bounds:it.menuBounds};if(de.indicatorIcon!==void 0&&it.indicatorIconBounds!==void 0&&Wr(it.indicatorIconBounds,Se,xe))return{area:"indicator",bounds:it.indicatorIconBounds}}},[$t,Nt,pn,q,H,Me]),Zr=g.useRef(0),tr=g.useRef(),nr=g.useRef(!1),_r=g.useCallback($=>{const ae=He.current,Se=J==null?void 0:J.current;if(ae===null||$.target!==ae&&$.target!==Se)return;nr.current=!0;let xe,de;if($ instanceof MouseEvent?(xe=$.clientX,de=$.clientY):(xe=$.touches[0].clientX,de=$.touches[0].clientY),$.target===Se&&Se!==null){const it=Se.getBoundingClientRect();if(xe>it.right||de>it.bottom)return}const Re=he(ae,xe,de,$);tr.current=Re.location,Re.isTouch&&(Zr.current=Date.now()),zt.current!==Re.isTouch&&st(Re.isTouch),!(Re.kind===Er&&dr(ae,Re.location[0],xe,de)!==void 0)&&(Re.kind===Wn&&cr(Re.group,Re.bounds,Re.localEventX,Re.localEventY)!==void 0||(I==null||I(Re),!Re.isTouch&&fe!==!0&&fe!==Re.kind&&Re.button<3&&Re.button!==1&&$.preventDefault()))},[J,fe,he,cr,dr,I]);gn("touchstart",_r,Yt,!1),gn("mousedown",_r,Yt,!1);const co=g.useRef(0),Ci=g.useCallback($=>{var Ze,We;const ae=co.current;co.current=Date.now();const Se=He.current;if(nr.current=!1,T===void 0||Se===null)return;const xe=J==null?void 0:J.current,de=$.target!==Se&&$.target!==xe;let Re,it,ot=!0;if($ instanceof MouseEvent){if(Re=$.clientX,it=$.clientY,ot=$.button<3,$.pointerType==="touch")return}else Re=$.changedTouches[0].clientX,it=$.changedTouches[0].clientY;let Te=he(Se,Re,it,$);Te.isTouch&&Zr.current!==0&&Date.now()-Zr.current>500&&(Te={...Te,isLongTouch:!0}),ae!==0&&Date.now()-ae<(Te.isTouch?1e3:500)&&(Te={...Te,isDoubleClick:!0}),zt.current!==Te.isTouch&&st(Te.isTouch),!de&&$.cancelable&&ot&&$.preventDefault();const[xt]=Te.location,ke=dr(Se,xt,Re,it);if(Te.kind===Er&&ke!==void 0){(Te.button!==0||((Ze=tr.current)==null?void 0:Ze[0])!==xt||((We=tr.current)==null?void 0:We[1])!==-1)&&T(Te,!0);return}else if(Te.kind===Wn){const ft=cr(Te.group,Te.bounds,Te.localEventX,Te.localEventY);if(ft!==void 0){Te.button===0&&ft.onClick(Te);return}}T(Te,de)},[T,J,he,dr,cr]);gn("mouseup",Ci,Yt,!1),gn("touchend",Ci,Yt,!1);const Ke=g.useCallback($=>{var xt,ke;const ae=He.current;if(ae===null)return;const Se=J==null?void 0:J.current,xe=$.target!==ae&&$.target!==Se;let de,Re,it=!0;$ instanceof MouseEvent?(de=$.clientX,Re=$.clientY,it=$.button<3):(de=$.changedTouches[0].clientX,Re=$.changedTouches[0].clientY);const ot=he(ae,de,Re,$);zt.current!==ot.isTouch&&st(ot.isTouch),!xe&&$.cancelable&&it&&$.preventDefault();const[Te]=ot.location;if(ot.kind===Er){const Ze=dr(ae,Te,de,Re);Ze!==void 0&&ot.button===0&&((xt=tr.current)==null?void 0:xt[0])===Te&&((ke=tr.current)==null?void 0:ke[1])===-1&&(Ze.area==="menu"?p==null||p(Te,Ze.bounds):Ze.area==="indicator"&&(v==null||v(Te,Ze.bounds)))}else if(ot.kind===Wn){const Ze=cr(ot.group,ot.bounds,ot.localEventX,ot.localEventY);Ze!==void 0&&ot.button===0&&Ze.onClick(ot)}},[J,he,dr,p,v,cr]);gn("click",Ke,Yt,!1);const fo=g.useCallback($=>{const ae=He.current,Se=J==null?void 0:J.current;if(ae===null||$.target!==ae&&$.target!==Se||E===void 0)return;const xe=he(ae,$.clientX,$.clientY,$);E(xe,()=>{$.cancelable&&$.preventDefault()})},[J,he,E]);gn("contextmenu",fo,(J==null?void 0:J.current)??null,!1);const ho=g.useCallback($=>{Rt.current=new Zi($.map(ae=>ae.item)),Sn.current=$,Ln.current(),Rt.current=void 0},[]),Fn=g.useMemo(()=>new Yp(ho),[ho]),go=g.useRef(Fn);go.current=Fn,g.useLayoutEffect(()=>{const $=go.current;if(lt===void 0||lt[1]<0){$.setHovered(lt);return}const ae=h(lt,!0),Se=at(ae),xe=Se===void 0&&ae.kind===te.Custom||(Se==null?void 0:Se.needsHover)!==void 0&&(typeof Se.needsHover=="boolean"?Se.needsHover:Se.needsHover(ae));$.setHovered(xe?lt:void 0)},[h,at,lt]);const Xn=g.useRef(),Si=g.useCallback($=>{var ot;const ae=He.current;if(ae===null)return;const Se=J==null?void 0:J.current,xe=$.target!==ae&&$.target!==Se,de=he(ae,$.clientX,$.clientY,$);if(de.kind!=="out-of-bounds"&&xe&&!nr.current&&!de.isTouch)return;const Re=(Te,xt)=>{En(ke=>ke===Te||(ke==null?void 0:ke[0][0])===(Te==null?void 0:Te[0][0])&&(ke==null?void 0:ke[0][1])===(Te==null?void 0:Te[0][1])&&((ke==null?void 0:ke[1][0])===(Te==null?void 0:Te[1][0])&&(ke==null?void 0:ke[1][1])===(Te==null?void 0:Te[1][1])||!xt)?ke:Te)};if(!Rd(de,Xn.current))fn(void 0),N==null||N(de),Re(de.kind===aa?void 0:[de.location,[de.localEventX,de.localEventY]],!0),Xn.current=de;else if(de.kind==="cell"||de.kind===Er||de.kind===Wn){let Te=!1,xt=!0;if(de.kind==="cell"){const Ze=h(de.location);xt=((ot=at(Ze))==null?void 0:ot.needsHoverPosition)??Ze.kind===te.Custom,Te=xt}else Te=!0;const ke=[de.location,[de.localEventX,de.localEventY]];Re(ke,xt),hn.current=ke,Te&&Yn(new Zi([de.location]))}const it=de.location[0]>=(oe?0:1);Pe(de.kind===Er&&de.isEdge&&it&&me===!0),Sa(de.kind==="cell"&&de.isFillHandle),k==null||k($),V(de)},[J,he,oe,me,k,V,N,h,at,Yn]);gn("mousemove",Si,Yt,!0);const mo=g.useCallback($=>{const ae=He.current;if(ae===null)return;let Se,xe;M.current!==void 0&&(Se=Nt(ae,M.current.cell[0],M.current.cell[1]),xe=M.current.cell),ee==null||ee({bounds:Se,stopPropagation:()=>$.stopPropagation(),preventDefault:()=>$.preventDefault(),cancel:()=>{},ctrlKey:$.ctrlKey,metaKey:$.metaKey,shiftKey:$.shiftKey,altKey:$.altKey,key:$.key,keyCode:$.keyCode,rawEvent:$,location:xe})},[ee,M,Nt]),po=g.useCallback($=>{const ae=He.current;if(ae===null)return;let Se,xe;M.current!==void 0&&(Se=Nt(ae,M.current.cell[0],M.current.cell[1]),xe=M.current.cell),j==null||j({bounds:Se,stopPropagation:()=>$.stopPropagation(),preventDefault:()=>$.preventDefault(),cancel:()=>{},ctrlKey:$.ctrlKey,metaKey:$.metaKey,shiftKey:$.shiftKey,altKey:$.altKey,key:$.key,keyCode:$.keyCode,rawEvent:$,location:xe})},[j,M,Nt]),ka=g.useCallback($=>{if(He.current=$,ie!==void 0&&(ie.current=$),$===null)It.current=window;else{const ae=$.getRootNode();ae===document&&(It.current=window),It.current=ae}},[ie]),Ma=g.useCallback($=>{const ae=He.current;if(ae===null||fe===!1||H){$.preventDefault();return}let Se,xe;const de=he(ae,$.clientX,$.clientY);if(fe!==!0&&de.kind!==fe){$.preventDefault();return}const Re=(Ze,We)=>{Se=Ze,xe=We};let it,ot,Te;const xt=(Ze,We,ft)=>{it=Ze,ot=We,Te=ft};let ke=!1;if(ue==null||ue({...de,setData:Re,setDragImage:xt,preventDefault:()=>ke=!0,defaultPrevented:()=>ke}),!ke&&Se!==void 0&&xe!==void 0&&$.dataTransfer!==null)if($.dataTransfer.setData(Se,xe),$.dataTransfer.effectAllowed="copyLink",it!==void 0&&ot!==void 0&&Te!==void 0)$.dataTransfer.setDragImage(it,ot,Te);else{const[Ze,We]=de.location;if(We!==void 0){const ft=document.createElement("canvas"),an=Nt(ae,Ze,We);Pn(an!==void 0);const kn=Math.ceil(window.devicePixelRatio??1);ft.width=an.width*kn,ft.height=an.height*kn;const yt=ft.getContext("2d");yt!==null&&(yt.scale(kn,kn),yt.textBaseline="middle",We===-1?(yt.font=Me.headerFontFull,yt.fillStyle=Me.bgHeader,yt.fillRect(0,0,ft.width,ft.height),kd(yt,0,0,an.width,an.height,$t[Ze],!1,Me,!1,void 0,void 0,!1,0,Dt,je,!1)):(yt.font=Me.baseFontFull,yt.fillStyle=Me.bgCell,yt.fillRect(0,0,ft.width,ft.height),Cd(yt,h([Ze,We]),0,We,!1,!1,0,0,an.width,an.height,!1,Me,Me.bgCell,mt,Dt,1,void 0,!1,0,void 0,void 0,void 0,$e,at,()=>{}))),ft.style.left="-100%",ft.style.position="absolute",ft.style.width=`${an.width}px`,ft.style.height=`${an.height}px`,document.body.append(ft),$.dataTransfer.setDragImage(ft,an.width/2,an.height/2),window.setTimeout(()=>{ft.remove()},0)}}else $.preventDefault()},[fe,H,he,ue,Nt,Me,$t,Dt,je,h,mt,$e,at]);gn("dragstart",Ma,(J==null?void 0:J.current)??null,!1,!1);const An=g.useRef(),wr=g.useCallback($=>{const ae=He.current;if(be!==void 0&&$.preventDefault(),ae===null||ce===void 0)return;const Se=he(ae,$.clientX,$.clientY),[xe,de]=Se.location,Re=xe-(oe?0:1),[it,ot]=An.current??[];(it!==Re||ot!==de)&&(An.current=[Re,de],ce([Re,de],$.dataTransfer))},[oe,he,ce,be]);gn("dragover",wr,(J==null?void 0:J.current)??null,!1,!1);const Hn=g.useCallback(()=>{An.current=void 0,ge==null||ge()},[ge]);gn("dragend",Hn,(J==null?void 0:J.current)??null,!1,!1);const Y=g.useCallback($=>{const ae=He.current;if(ae===null||be===void 0)return;$.preventDefault();const Se=he(ae,$.clientX,$.clientY),[xe,de]=Se.location,Re=xe-(oe?0:1);be([Re,de],$.dataTransfer)},[oe,he,be]);gn("drop",Y,(J==null?void 0:J.current)??null,!1,!1);const jt=g.useCallback(()=>{Ve==null||Ve()},[Ve]);gn("dragleave",jt,(J==null?void 0:J.current)??null,!1,!1);const yr=g.useRef(M);yr.current=M;const Jr=g.useRef(null),Qr=g.useCallback($=>{var ae;He.current===null||!He.current.contains(document.activeElement)||($===null&&yr.current.current!==void 0?(ae=ie==null?void 0:ie.current)==null||ae.focus({preventScroll:!0}):$!==null&&$.focus({preventScroll:!0}),Jr.current=$)},[ie]);g.useImperativeHandle(t,()=>({focus:()=>{var ae;const $=Jr.current;$===null||!document.contains($)?(ae=ie==null?void 0:ie.current)==null||ae.focus({preventScroll:!0}):$.focus({preventScroll:!0})},getBounds:($,ae)=>{if(!(ie===void 0||ie.current===null))return Nt(ie.current,$??0,ae??-1)},damage:lo}),[ie,lo,Nt]);const xi=g.useRef(),Ra=$g(()=>{var ot,Te,xt;if(n<50||(Ee==null?void 0:Ee.disableAccessibilityTree)===!0)return null;let $=ys($t,ht,n,U,rt);const ae=oe?0:-1;!oe&&((ot=$[0])==null?void 0:ot.sourceIndex)===0&&($=$.slice(1));const[Se,xe]=((Te=M.current)==null?void 0:Te.cell)??[],de=(xt=M.current)==null?void 0:xt.range,Re=$.map(ke=>ke.sourceIndex),it=ar(l,Math.min(f,l+i));return Se!==void 0&&xe!==void 0&&!(Re.includes(Se)&&it.includes(xe))&&Qr(null),g.createElement("table",{key:"access-tree",role:"grid","aria-rowcount":f+1,"aria-multiselectable":"true","aria-colcount":$t.length+ae},g.createElement("thead",{role:"rowgroup"},g.createElement("tr",{role:"row","aria-rowindex":1},$.map(ke=>g.createElement("th",{role:"columnheader","aria-selected":M.columns.hasIndex(ke.sourceIndex),"aria-colindex":ke.sourceIndex+1+ae,tabIndex:-1,onFocus:Ze=>{if(Ze.target!==Jr.current)return we==null?void 0:we([ke.sourceIndex,-1])},key:ke.sourceIndex},ke.title)))),g.createElement("tbody",{role:"rowgroup"},it.map(ke=>g.createElement("tr",{role:"row","aria-selected":M.rows.hasIndex(ke),key:ke,"aria-rowindex":ke+2},$.map(Ze=>{const We=Ze.sourceIndex,ft=er(We,ke),an=Se===We&&xe===ke,kn=de!==void 0&&We>=de.x&&We<de.x+de.width&&ke>=de.y&&ke<de.y+de.height,yt=`glide-cell-${We}-${ke}`,Kt=[We,ke],jn=h(Kt,!0);return g.createElement("td",{key:ft,role:"gridcell","aria-colindex":We+1+ae,"aria-selected":kn,"aria-readonly":ui(jn)||!Yi(jn),id:yt,"data-testid":yt,onClick:()=>{const yn=ie==null?void 0:ie.current;if(yn!=null)return ee==null?void 0:ee({bounds:Nt(yn,We,ke),cancel:()=>{},preventDefault:()=>{},stopPropagation:()=>{},ctrlKey:!1,key:"Enter",keyCode:13,metaKey:!1,shiftKey:!1,altKey:!1,rawEvent:void 0,location:Kt})},onFocusCapture:yn=>{var Et,Mn;if(!(yn.target===Jr.current||((Et=xi.current)==null?void 0:Et[0])===We&&((Mn=xi.current)==null?void 0:Mn[1])===ke))return xi.current=Kt,we==null?void 0:we(Kt)},ref:an?Qr:void 0,tabIndex:-1},Kp(jn,at))})))))},[n,$t,ht,U,rt,f,l,i,M,Qr,h,ie,ee,Nt,we],200),ki=_===0||!L?0:ht>_?1:Nn(-rt/100,0,1),G=-l*32+vt,sn=D?Nn(-G/100,0,1):0,ln=g.useMemo(()=>{if(!ki&&!sn)return null;const $={position:"absolute",top:0,left:At,width:n-At,height:r,opacity:ki,pointerEvents:"none",transition:nt?void 0:"opacity 0.2s",boxShadow:"inset 13px 0 10px -13px rgba(0, 0, 0, 0.2)"},ae={position:"absolute",top:nn,left:0,width:n,height:r,opacity:sn,pointerEvents:"none",transition:pe?void 0:"opacity 0.2s",boxShadow:"inset 0 13px 10px -13px rgba(0, 0, 0, 0.2)"};return g.createElement(g.Fragment,null,ki>0&&g.createElement("div",{id:"shadow-x",style:$}),sn>0&&g.createElement("div",{id:"shadow-y",style:ae}))},[ki,sn,At,n,nt,nn,r,pe]),Ea=g.useMemo(()=>({position:"absolute",top:0,left:0}),[]);return g.createElement(g.Fragment,null,g.createElement("canvas",{"data-testid":"data-grid-canvas",tabIndex:0,onKeyDown:mo,onKeyUp:po,onFocus:R,onBlur:O,ref:ka,style:wi},Ra),g.createElement("canvas",{ref:Ft,style:Ea}),ln)},Jp=g.memo(g.forwardRef(Zp));function Bi(e,t,n,r){return Nn(Math.round(t-(e.growOffset??0)),Math.ceil(n),Math.floor(r))}const Qp=e=>{const[t,n]=g.useState(),[r,i]=g.useState(),[o,a]=g.useState(),[l,s]=g.useState(),[u,c]=g.useState(!1),[d,f]=g.useState(),[h,m]=g.useState(),[p,v]=g.useState(),[y,b]=g.useState(!1),[R,O]=g.useState(),{onHeaderMenuClick:S,onHeaderIndicatorClick:M,getCellContent:_,onColumnMoved:E,onColumnResize:x,onColumnResizeStart:L,onColumnResizeEnd:D,gridRef:C,maxColumnWidth:I,minColumnWidth:T,onRowMoved:k,lockColumns:V,onColumnProposeMove:N,onMouseDown:U,onMouseUp:oe,onItemHovered:ee,onDragStart:j,canvasRef:ne}=e,ie=(x??D??L)!==void 0,{columns:ue,selection:ge}=e,J=ge.columns,H=g.useCallback(le=>{const[je,we]=le.location;o!==void 0&&l!==je&&je>=V?(c(!0),s(je)):h!==void 0&&we!==void 0?(b(!0),v(Math.max(0,we))):r===void 0&&!u&&!y&&(ee==null||ee(le))},[o,h,l,ee,V,r,u,y]),P=E!==void 0,q=g.useCallback(le=>{var je;if(le.button===0){const[we,ce]=le.location;if(le.kind==="out-of-bounds"&&le.isEdge&&ie){const be=(je=C==null?void 0:C.current)==null?void 0:je.getBounds(ue.length-1,-1);be!==void 0&&(n(be.x),i(ue.length-1))}else if(le.kind==="header"&&we>=V){const be=ne==null?void 0:ne.current;if(le.isEdge&&ie&&be){n(le.bounds.x),i(we);const Oe=be.getBoundingClientRect().width/be.offsetWidth,nt=le.bounds.width/Oe;L==null||L(ue[we],nt,we,nt+(ue[we].growOffset??0))}else le.kind==="header"&&P&&(f(le.bounds.x),a(we))}else le.kind==="cell"&&V>0&&we===0&&ce!==void 0&&k!==void 0&&(O(le.bounds.y),m(ce))}U==null||U(le)},[U,ie,V,k,C,ue,P,L,ne]),fe=g.useCallback((le,je)=>{u||y||S==null||S(le,je)},[u,y,S]),me=g.useCallback((le,je)=>{u||y||M==null||M(le,je)},[u,y,M]),ze=g.useRef(-1),ve=g.useCallback(()=>{ze.current=-1,m(void 0),v(void 0),O(void 0),b(!1),a(void 0),s(void 0),f(void 0),c(!1),i(void 0),n(void 0)},[]),Xe=g.useCallback((le,je)=>{if(le.button===0){if(r!==void 0){if((J==null?void 0:J.hasIndex(r))===!0)for(const ce of J){if(ce===r)continue;const be=ue[ce],Ve=Bi(be,ze.current,T,I);x==null||x(be,Ve,ce,Ve+(be.growOffset??0))}const we=Bi(ue[r],ze.current,T,I);if(D==null||D(ue[r],we,r,we+(ue[r].growOffset??0)),J.hasIndex(r))for(const ce of J){if(ce===r)continue;const be=ue[ce],Ve=Bi(be,ze.current,T,I);D==null||D(be,Ve,ce,Ve+(be.growOffset??0))}}ve(),o!==void 0&&l!==void 0&&(E==null||E(o,l)),h!==void 0&&p!==void 0&&(k==null||k(h,p))}oe==null||oe(le,je)},[oe,r,o,l,h,p,J,D,ue,T,I,x,E,k,ve]),Me=g.useMemo(()=>{if(!(o===void 0||l===void 0)&&o!==l&&(N==null?void 0:N(o,l))!==!1)return{src:o,dest:l}},[o,l,N]),Pt=g.useCallback(le=>{const je=ne==null?void 0:ne.current;if(o!==void 0&&d!==void 0)Math.abs(le.clientX-d)>20&&c(!0);else if(h!==void 0&&R!==void 0)Math.abs(le.clientY-R)>20&&b(!0);else if(r!==void 0&&t!==void 0&&je){const ce=je.getBoundingClientRect().width/je.offsetWidth,be=(le.clientX-t)/ce,Ve=ue[r],Oe=Bi(Ve,be,T,I);if(x==null||x(Ve,Oe,r,Oe+(Ve.growOffset??0)),ze.current=be,(J==null?void 0:J.first())===r)for(const nt of J){if(nt===r)continue;const pe=ue[nt],Ee=Bi(pe,ze.current,T,I);x==null||x(pe,Ee,nt,Ee+(pe.growOffset??0))}}},[o,d,h,R,r,t,ue,T,I,x,J,ne]),Mt=g.useCallback((le,je)=>{if(h===void 0||p===void 0)return _(le,je);let[we,ce]=le;return ce===p?ce=h:(ce>p&&(ce-=1),ce>=h&&(ce+=1)),_([we,ce],je)},[h,p,_]),Qe=g.useCallback(le=>{j==null||j(le),le.defaultPrevented()||ve()},[ve,j]);return g.createElement(Jp,{accessibilityHeight:e.accessibilityHeight,canvasRef:e.canvasRef,cellXOffset:e.cellXOffset,cellYOffset:e.cellYOffset,columns:e.columns,disabledRows:e.disabledRows,drawFocusRing:e.drawFocusRing,drawHeader:e.drawHeader,drawCell:e.drawCell,enableGroups:e.enableGroups,eventTargetRef:e.eventTargetRef,experimental:e.experimental,fillHandle:e.fillHandle,firstColAccessible:e.firstColAccessible,fixedShadowX:e.fixedShadowX,fixedShadowY:e.fixedShadowY,freezeColumns:e.freezeColumns,getCellRenderer:e.getCellRenderer,getGroupDetails:e.getGroupDetails,getRowThemeOverride:e.getRowThemeOverride,groupHeaderHeight:e.groupHeaderHeight,headerHeight:e.headerHeight,headerIcons:e.headerIcons,height:e.height,highlightRegions:e.highlightRegions,imageWindowLoader:e.imageWindowLoader,resizeColumn:r,isDraggable:e.isDraggable,isFilling:e.isFilling,isFocused:e.isFocused,onCanvasBlur:e.onCanvasBlur,onCanvasFocused:e.onCanvasFocused,onCellFocused:e.onCellFocused,onContextMenu:e.onContextMenu,onDragEnd:e.onDragEnd,onDragLeave:e.onDragLeave,onDragOverCell:e.onDragOverCell,onDrop:e.onDrop,onKeyDown:e.onKeyDown,onKeyUp:e.onKeyUp,onMouseMove:e.onMouseMove,prelightCells:e.prelightCells,rowHeight:e.rowHeight,rows:e.rows,selection:e.selection,smoothScrollX:e.smoothScrollX,smoothScrollY:e.smoothScrollY,theme:e.theme,freezeTrailingRows:e.freezeTrailingRows,hasAppendRow:e.hasAppendRow,translateX:e.translateX,translateY:e.translateY,resizeIndicator:e.resizeIndicator,verticalBorder:e.verticalBorder,width:e.width,getCellContent:Mt,isResizing:r!==void 0,onHeaderMenuClick:fe,onHeaderIndicatorClick:me,isDragging:u,onItemHovered:H,onDragStart:Qe,onMouseDown:q,allowResize:ie,onMouseUp:Xe,dragAndDropState:Me,onMouseMoveRaw:Pt,ref:C})};function e0(e){const t=g.useRef(null),[n,r]=g.useState({width:e==null?void 0:e[0],height:e==null?void 0:e[1]});return g.useLayoutEffect(()=>{const i=a=>{for(const l of a){const{width:s,height:u}=l&&l.contentRect||{};r(c=>c.width===s&&c.height===u?c:{width:s,height:u})}},o=new window.ResizeObserver(i);return t.current&&o.observe(t.current,void 0),()=>{o.disconnect()}},[t.current]),{ref:t,...n}}const t0=(e,t,n)=>{const r=g.useRef(null),i=g.useRef(null),o=g.useRef(null),a=g.useRef(0),l=g.useRef(t);l.current=t;const s=n.current;g.useEffect(()=>{const u=()=>{var f,h;if(i.current===!1&&s!==null){const m=[s.scrollLeft,s.scrollTop];if(((f=o.current)==null?void 0:f[0])===m[0]&&((h=o.current)==null?void 0:h[1])===m[1])if(a.current>10){o.current=null,i.current=null;return}else a.current++;else a.current=0,l.current(m[0],m[1]),o.current=m;r.current=window.setTimeout(u,8.333333333333334)}},c=()=>{i.current=!0,o.current=null,r.current!==null&&(window.clearTimeout(r.current),r.current=null)},d=f=>{f.touches.length===0&&(i.current=!1,a.current=0,r.current=window.setTimeout(u,8.333333333333334))};if(e&&s!==null){const f=s;return f.addEventListener("touchstart",c),f.addEventListener("touchend",d),()=>{f.removeEventListener("touchstart",c),f.removeEventListener("touchend",d),r.current!==null&&window.clearTimeout(r.current)}}},[e,s])},n0=()=>e=>e.isSafari?"scroll":"auto",r0=mn("div")({name:"ScrollRegionStyle",class:"gdg-s1dgczr6",propsAsIs:!1,vars:{"s1dgczr6-0":[n0()]}});function i0(e){const[t,n]=g.useState(!1),r=typeof window>"u"?null:window,i=g.useRef(0);return gn("touchstart",g.useCallback(()=>{window.clearTimeout(i.current),n(!0)},[]),r,!0,!1),gn("touchend",g.useCallback(o=>{o.touches.length===0&&(i.current=window.setTimeout(()=>n(!1),e))},[e]),r,!0,!1),t}const o0=e=>{var ie,ue;const{children:t,clientHeight:n,scrollHeight:r,scrollWidth:i,update:o,draggable:a,className:l,preventDiagonalScrolling:s=!1,paddingBottom:u=0,paddingRight:c=0,rightElement:d,rightElementProps:f,kineticScrollPerfHack:h=!1,scrollRef:m,initialSize:p}=e,v=[],y=(f==null?void 0:f.sticky)??!1,b=(f==null?void 0:f.fill)??!1,R=g.useRef(0),O=g.useRef(0),S=g.useRef(null),M=typeof window>"u"?1:window.devicePixelRatio,_=g.useRef({scrollLeft:0,scrollTop:0,lockDirection:void 0}),E=g.useRef(null),x=i0(200),[L,D]=g.useState(!0),C=g.useRef(0);g.useLayoutEffect(()=>{if(!L||x||_.current.lockDirection===void 0)return;const ge=S.current;if(ge===null)return;const[J,H]=_.current.lockDirection;J!==void 0?ge.scrollLeft=J:H!==void 0&&(ge.scrollTop=H),_.current.lockDirection=void 0},[x,L]);const I=g.useCallback((ge,J)=>{var Qe;const H=S.current;if(H===null)return;J=J??H.scrollTop,ge=ge??H.scrollLeft;const P=_.current.scrollTop,q=_.current.scrollLeft,fe=ge-q,me=J-P;x&&fe!==0&&me!==0&&(Math.abs(fe)>3||Math.abs(me)>3)&&s&&_.current.lockDirection===void 0&&(_.current.lockDirection=Math.abs(fe)<Math.abs(me)?[q,void 0]:[void 0,P]);const ze=_.current.lockDirection;ge=(ze==null?void 0:ze[0])??ge,J=(ze==null?void 0:ze[1])??J,_.current.scrollLeft=ge,_.current.scrollTop=J;const ve=H.clientWidth,Xe=H.clientHeight,Me=J,Pt=O.current-Me,Mt=H.scrollHeight-Xe;if(O.current=Me,Mt>0&&(Math.abs(Pt)>2e3||Me===0||Me===Mt)&&r>H.scrollHeight+5){const le=Me/Mt,je=(r-Xe)*le;R.current=je-Me}ze!==void 0&&(window.clearTimeout(C.current),D(!1),C.current=window.setTimeout(()=>D(!0),200)),o({x:ge,y:Me+R.current,width:ve-c,height:Xe-u,paddingRight:((Qe=E.current)==null?void 0:Qe.clientWidth)??0})},[u,c,r,o,s,x]);t0(h&&ia.value,I,S);const T=g.useRef(I);T.current=I;const k=g.useRef(),V=g.useRef(!1);g.useLayoutEffect(()=>{V.current?I():V.current=!0},[I,u,c]);const N=g.useCallback(ge=>{S.current=ge,m!==void 0&&(m.current=ge)},[m]);let U=0,oe=0;for(v.push(g.createElement("div",{key:U++,style:{width:i,height:0}}));oe<r;){const ge=Math.min(5e6,r-oe);v.push(g.createElement("div",{key:U++,style:{width:0,height:ge}})),oe+=ge}const{ref:ee,width:j,height:ne}=e0(p);return typeof window<"u"&&(((ie=k.current)==null?void 0:ie.height)!==ne||((ue=k.current)==null?void 0:ue.width)!==j)&&(window.setTimeout(()=>T.current(),0),k.current={width:j,height:ne}),(j??0)===0||(ne??0)===0?g.createElement("div",{ref:ee}):g.createElement("div",{ref:ee},g.createElement(r0,{isSafari:ia.value},g.createElement("div",{className:"dvn-underlay"},t),g.createElement("div",{ref:N,style:k.current,draggable:a,onDragStart:ge=>{a||(ge.stopPropagation(),ge.preventDefault())},className:"dvn-scroller "+(l??""),onScroll:()=>I()},g.createElement("div",{className:"dvn-scroll-inner"+(d===void 0?" dvn-hidden":"")},g.createElement("div",{className:"dvn-stack"},v),d!==void 0&&g.createElement(g.Fragment,null,!b&&g.createElement("div",{className:"dvn-spacer"}),g.createElement("div",{ref:E,style:{height:ne,maxHeight:n-Math.ceil(M%1),position:"sticky",top:0,paddingLeft:1,marginBottom:-40,marginRight:c,flexGrow:b?1:void 0,right:y?c??0:void 0,pointerEvents:"auto"}},d))))))},a0=e=>{const{columns:t,rows:n,rowHeight:r,headerHeight:i,groupHeaderHeight:o,enableGroups:a,freezeColumns:l,experimental:s,nonGrowWidth:u,clientSize:c,className:d,onVisibleRegionChanged:f,scrollRef:h,preventDiagonalScrolling:m,rightElement:p,rightElementProps:v,overscrollX:y,overscrollY:b,initialSize:R,smoothScrollX:O=!1,smoothScrollY:S=!1,isDraggable:M}=e,{paddingRight:_,paddingBottom:E}=s??{},[x,L]=c,D=g.useRef(),C=g.useRef(),I=g.useRef(),T=g.useRef(),k=u+Math.max(0,y??0);let V=a?i+o:i;if(typeof r=="number")V+=n*r;else for(let ee=0;ee<n;ee++)V+=r(ee);b!==void 0&&(V+=b);const N=g.useRef(),U=g.useCallback(()=>{var me,ze;if(N.current===void 0)return;const ee={...N.current};let j=0,ne=ee.x<0?-ee.x:0,ie=0,ue=0;ee.x=ee.x<0?0:ee.x;let ge=0;for(let ve=0;ve<l;ve++)ge+=t[ve].width;for(const ve of t){const Xe=j-ge;if(ee.x>=Xe+ve.width)j+=ve.width,ue++,ie++;else if(ee.x>Xe)j+=ve.width,O?ne+=Xe-ee.x:ue++,ie++;else if(ee.x+ee.width>Xe)j+=ve.width,ie++;else break}let J=0,H=0,P=0;if(typeof r=="number")S?(H=Math.floor(ee.y/r),J=H*r-ee.y):H=Math.ceil(ee.y/r),P=Math.ceil(ee.height/r)+H,J<0&&P++;else{let ve=0;for(let Xe=0;Xe<n;Xe++){const Me=r(Xe),Pt=ve+(S?0:Me/2);if(ee.y>=ve+Me)ve+=Me,H++,P++;else if(ee.y>Pt)ve+=Me,S?J+=Pt-ee.y:H++,P++;else if(ee.y+ee.height>Me/2+ve)ve+=Me,P++;else break}}const q={x:ue,y:H,width:ie-ue,height:P-H},fe=D.current;(fe===void 0||fe.y!==q.y||fe.x!==q.x||fe.height!==q.height||fe.width!==q.width||C.current!==ne||I.current!==J||ee.width!==((me=T.current)==null?void 0:me[0])||ee.height!==((ze=T.current)==null?void 0:ze[1]))&&(f==null||f({x:ue,y:H,width:ie-ue,height:P-H},ee.width,ee.height,ee.paddingRight??0,ne,J),D.current=q,C.current=ne,I.current=J,T.current=[ee.width,ee.height])},[t,r,n,f,l,O,S]),oe=g.useCallback(ee=>{N.current=ee,U()},[U]);return g.useEffect(()=>{U()},[U]),g.createElement(o0,{scrollRef:h,className:d,kineticScrollPerfHack:s==null?void 0:s.kineticScrollPerfHack,preventDiagonalScrolling:m,draggable:M===!0||typeof M=="string",scrollWidth:k+(_??0),scrollHeight:V+(E??0),clientHeight:L,rightElement:p,paddingBottom:E,paddingRight:_,rightElementProps:v,update:oe,initialSize:R},g.createElement(Qp,{eventTargetRef:h,width:x,height:L,accessibilityHeight:e.accessibilityHeight,canvasRef:e.canvasRef,cellXOffset:e.cellXOffset,cellYOffset:e.cellYOffset,columns:e.columns,disabledRows:e.disabledRows,enableGroups:e.enableGroups,fillHandle:e.fillHandle,firstColAccessible:e.firstColAccessible,fixedShadowX:e.fixedShadowX,fixedShadowY:e.fixedShadowY,freezeColumns:e.freezeColumns,getCellContent:e.getCellContent,getCellRenderer:e.getCellRenderer,getGroupDetails:e.getGroupDetails,getRowThemeOverride:e.getRowThemeOverride,groupHeaderHeight:e.groupHeaderHeight,headerHeight:e.headerHeight,highlightRegions:e.highlightRegions,imageWindowLoader:e.imageWindowLoader,isFilling:e.isFilling,isFocused:e.isFocused,lockColumns:e.lockColumns,maxColumnWidth:e.maxColumnWidth,minColumnWidth:e.minColumnWidth,onHeaderMenuClick:e.onHeaderMenuClick,onHeaderIndicatorClick:e.onHeaderIndicatorClick,onMouseMove:e.onMouseMove,prelightCells:e.prelightCells,rowHeight:e.rowHeight,rows:e.rows,selection:e.selection,theme:e.theme,freezeTrailingRows:e.freezeTrailingRows,hasAppendRow:e.hasAppendRow,translateX:e.translateX,translateY:e.translateY,onColumnProposeMove:e.onColumnProposeMove,verticalBorder:e.verticalBorder,drawFocusRing:e.drawFocusRing,drawHeader:e.drawHeader,drawCell:e.drawCell,experimental:e.experimental,gridRef:e.gridRef,headerIcons:e.headerIcons,isDraggable:e.isDraggable,onCanvasBlur:e.onCanvasBlur,onCanvasFocused:e.onCanvasFocused,onCellFocused:e.onCellFocused,onColumnMoved:e.onColumnMoved,onColumnResize:e.onColumnResize,onColumnResizeEnd:e.onColumnResizeEnd,onColumnResizeStart:e.onColumnResizeStart,onContextMenu:e.onContextMenu,onDragEnd:e.onDragEnd,onDragLeave:e.onDragLeave,onDragOverCell:e.onDragOverCell,onDragStart:e.onDragStart,onDrop:e.onDrop,onItemHovered:e.onItemHovered,onKeyDown:e.onKeyDown,onKeyUp:e.onKeyUp,onMouseDown:e.onMouseDown,onMouseUp:e.onMouseUp,onRowMoved:e.onRowMoved,smoothScrollX:e.smoothScrollX,smoothScrollY:e.smoothScrollY,resizeIndicator:e.resizeIndicator}))},s0=mn("div")({name:"SearchWrapper",class:"gdg-seveqep",propsAsIs:!1}),l0=g.createElement("svg",{className:"button-icon",viewBox:"0 0 512 512"},g.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"48",d:"M112 244l144-144 144 144M256 120v292"})),u0=g.createElement("svg",{className:"button-icon",viewBox:"0 0 512 512"},g.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"48",d:"M112 268l144 144 144-144M256 392V100"})),c0=g.createElement("svg",{className:"button-icon",viewBox:"0 0 512 512"},g.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"M368 368L144 144M368 144L144 368"})),d0=10,f0=e=>{const{canvasRef:t,cellYOffset:n,rows:r,columns:i,searchInputRef:o,searchValue:a,searchResults:l,onSearchValueChange:s,getCellsForSelection:u,onSearchResultsChanged:c,showSearch:d=!1,onSearchClose:f}=e,[h]=g.useState(()=>"search-box-"+Math.round(Math.random()*1e3)),[m,p]=g.useState(""),v=a??m,y=g.useCallback(j=>{p(j),s==null||s(j)},[s]),[b,R]=g.useState(),O=g.useRef(b);O.current=b,g.useEffect(()=>{l!==void 0&&(l.length>0?R(j=>({rowsSearched:r,results:l.length,selectedIndex:(j==null?void 0:j.selectedIndex)??-1})):R(void 0))},[r,l]);const S=g.useRef();S.current===void 0&&(S.current=new AbortController);const M=g.useRef(),[_,E]=g.useState([]),x=l??_,L=g.useCallback(()=>{M.current!==void 0&&(window.cancelAnimationFrame(M.current),M.current=void 0,S.current.abort())},[]),D=g.useRef(n);D.current=n;const C=g.useCallback(j=>{const ne=new RegExp(j.replace(/([$()*+.?[\\\]^{|}-])/g,"\\$1"),"i");let ie=D.current,ue=Math.min(10,r),ge=0;R(void 0),E([]);const J=[],H=async()=>{var Mt;if(u===void 0)return;const P=performance.now(),q=r-ge;let fe=u({x:0,y:ie,width:i.length,height:Math.min(ue,q,r-ie)},S.current.signal);typeof fe=="function"&&(fe=await fe());let me=!1;for(const[Qe,le]of fe.entries())for(const[je,we]of le.entries()){let ce;switch(we.kind){case te.Text:case te.Number:ce=we.displayData;break;case te.Uri:case te.Markdown:ce=we.data;break;case te.Boolean:ce=typeof we.data=="boolean"?we.data.toString():void 0;break;case te.Image:case te.Bubble:ce=we.data.join("🐳");break;case te.Custom:ce=we.copyData;break}ce!==void 0&&ne.test(ce)&&(J.push([je,Qe+ie]),me=!0)}const ze=performance.now();me&&E([...J]),ge+=fe.length,Pn(ge<=r);const ve=((Mt=O.current)==null?void 0:Mt.selectedIndex)??-1;R({results:J.length,rowsSearched:ge,selectedIndex:ve}),c==null||c(J,ve),ie+ue>=r?ie=0:ie+=ue;const Xe=ze-P,Me=Math.max(Xe,1),Pt=d0/Me;ue=Math.ceil(ue*Pt),ge<r&&J.length<1e3&&(M.current=window.requestAnimationFrame(H))};L(),M.current=window.requestAnimationFrame(H)},[L,i.length,u,c,r]),I=g.useCallback(()=>{var j;f==null||f(),R(void 0),E([]),c==null||c([],-1),L(),(j=t==null?void 0:t.current)==null||j.focus()},[L,t,f,c]),T=g.useCallback(j=>{y(j.target.value),l===void 0&&(j.target.value===""?(R(void 0),E([]),L()):C(j.target.value))},[C,L,y,l]);g.useEffect(()=>{d&&o.current!==null&&(y(""),o.current.focus({preventScroll:!0}))},[d,o,y]);const k=g.useCallback(j=>{var ie;if((ie=j==null?void 0:j.stopPropagation)==null||ie.call(j),b===void 0)return;const ne=(b.selectedIndex+1)%b.results;R({...b,selectedIndex:ne}),c==null||c(x,ne)},[b,c,x]),V=g.useCallback(j=>{var ie;if((ie=j==null?void 0:j.stopPropagation)==null||ie.call(j),b===void 0)return;let ne=(b.selectedIndex-1)%b.results;ne<0&&(ne+=b.results),R({...b,selectedIndex:ne}),c==null||c(x,ne)},[c,x,b]),N=g.useCallback(j=>{(j.ctrlKey||j.metaKey)&&j.nativeEvent.code==="KeyF"||j.key==="Escape"?(I(),j.stopPropagation(),j.preventDefault()):j.key==="Enter"&&(j.shiftKey?V():k())},[I,k,V]);g.useEffect(()=>()=>{L()},[L]);const[U,oe]=g.useState(!1);g.useEffect(()=>{if(d)oe(!0);else{const j=setTimeout(()=>oe(!1),150);return()=>clearTimeout(j)}},[d]);const ee=g.useMemo(()=>{if(!d&&!U)return null;let j;b!==void 0&&(j=b.results>=1e3?"over 1000":`${b.results} result${b.results!==1?"s":""}`,b.selectedIndex>=0&&(j=`${b.selectedIndex+1} of ${j}`));const ne=ge=>{ge.stopPropagation()},ue={width:`${Math.floor(((b==null?void 0:b.rowsSearched)??0)/r*100)}%`};return g.createElement(s0,{className:d?"":"out",onMouseDown:ne,onMouseMove:ne,onMouseUp:ne,onClick:ne},g.createElement("div",{className:"gdg-search-bar-inner"},g.createElement("input",{id:h,"aria-hidden":!d,"data-testid":"search-input",ref:o,onChange:T,value:v,tabIndex:d?void 0:-1,onKeyDownCapture:N}),g.createElement("button",{"aria-label":"Previous Result","aria-hidden":!d,tabIndex:d?void 0:-1,onClick:V,disabled:((b==null?void 0:b.results)??0)===0},l0),g.createElement("button",{"aria-label":"Next Result","aria-hidden":!d,tabIndex:d?void 0:-1,onClick:k,disabled:((b==null?void 0:b.results)??0)===0},u0),f!==void 0&&g.createElement("button",{"aria-label":"Close Search","aria-hidden":!d,"data-testid":"search-close-button",tabIndex:d?void 0:-1,onClick:I},c0)),b!==void 0?g.createElement(g.Fragment,null,g.createElement("div",{className:"gdg-search-status"},g.createElement("div",{"data-testid":"search-result-area"},j)),g.createElement("div",{className:"gdg-search-progress",style:ue})):g.createElement("div",{className:"gdg-search-status"},g.createElement("label",{htmlFor:h},"Type to search")))},[d,U,b,r,h,o,T,v,N,V,k,f,I]);return g.createElement(g.Fragment,null,g.createElement(a0,{prelightCells:x,accessibilityHeight:e.accessibilityHeight,canvasRef:e.canvasRef,cellXOffset:e.cellXOffset,cellYOffset:e.cellYOffset,className:e.className,clientSize:e.clientSize,columns:e.columns,disabledRows:e.disabledRows,enableGroups:e.enableGroups,fillHandle:e.fillHandle,firstColAccessible:e.firstColAccessible,nonGrowWidth:e.nonGrowWidth,fixedShadowX:e.fixedShadowX,fixedShadowY:e.fixedShadowY,freezeColumns:e.freezeColumns,getCellContent:e.getCellContent,getCellRenderer:e.getCellRenderer,getGroupDetails:e.getGroupDetails,getRowThemeOverride:e.getRowThemeOverride,groupHeaderHeight:e.groupHeaderHeight,headerHeight:e.headerHeight,highlightRegions:e.highlightRegions,imageWindowLoader:e.imageWindowLoader,initialSize:e.initialSize,isFilling:e.isFilling,isFocused:e.isFocused,lockColumns:e.lockColumns,maxColumnWidth:e.maxColumnWidth,minColumnWidth:e.minColumnWidth,onHeaderMenuClick:e.onHeaderMenuClick,onHeaderIndicatorClick:e.onHeaderIndicatorClick,onMouseMove:e.onMouseMove,onVisibleRegionChanged:e.onVisibleRegionChanged,overscrollX:e.overscrollX,overscrollY:e.overscrollY,preventDiagonalScrolling:e.preventDiagonalScrolling,rightElement:e.rightElement,rightElementProps:e.rightElementProps,rowHeight:e.rowHeight,rows:e.rows,scrollRef:e.scrollRef,selection:e.selection,theme:e.theme,freezeTrailingRows:e.freezeTrailingRows,hasAppendRow:e.hasAppendRow,translateX:e.translateX,translateY:e.translateY,verticalBorder:e.verticalBorder,onColumnProposeMove:e.onColumnProposeMove,drawFocusRing:e.drawFocusRing,drawCell:e.drawCell,drawHeader:e.drawHeader,experimental:e.experimental,gridRef:e.gridRef,headerIcons:e.headerIcons,isDraggable:e.isDraggable,onCanvasBlur:e.onCanvasBlur,onCanvasFocused:e.onCanvasFocused,onCellFocused:e.onCellFocused,onColumnMoved:e.onColumnMoved,onColumnResize:e.onColumnResize,onColumnResizeEnd:e.onColumnResizeEnd,onColumnResizeStart:e.onColumnResizeStart,onContextMenu:e.onContextMenu,onDragEnd:e.onDragEnd,onDragLeave:e.onDragLeave,onDragOverCell:e.onDragOverCell,onDragStart:e.onDragStart,onDrop:e.onDrop,onItemHovered:e.onItemHovered,onKeyDown:e.onKeyDown,onKeyUp:e.onKeyUp,onMouseDown:e.onMouseDown,onMouseUp:e.onMouseUp,onRowMoved:e.onRowMoved,smoothScrollX:e.smoothScrollX,smoothScrollY:e.smoothScrollY,resizeIndicator:e.resizeIndicator}),ee)};class h0 extends g.PureComponent{constructor(){super(...arguments);dt(this,"wrapperRef",g.createRef());dt(this,"clickOutside",n=>{if(!(this.props.isOutsideClick&&!this.props.isOutsideClick(n))&&this.wrapperRef.current!==null&&!this.wrapperRef.current.contains(n.target)){let r=n.target;for(;r!==null;){if(r.classList.contains("click-outside-ignore"))return;r=r.parentElement}this.props.onClickOutside()}})}componentDidMount(){document.addEventListener("touchend",this.clickOutside,!0),document.addEventListener("mousedown",this.clickOutside,!0),document.addEventListener("contextmenu",this.clickOutside,!0)}componentWillUnmount(){document.removeEventListener("touchend",this.clickOutside,!0),document.removeEventListener("mousedown",this.clickOutside,!0),document.removeEventListener("contextmenu",this.clickOutside,!0)}render(){const{onClickOutside:n,isOutsideClick:r,...i}=this.props;return g.createElement("div",{...i,ref:this.wrapperRef},this.props.children)}}const g0=()=>e=>Math.max(16,e.targetHeight-10),m0=mn("input")({name:"RenameInput",class:"gdg-r17m35ur",propsAsIs:!1,vars:{"r17m35ur-0":[g0(),"px"]}}),p0=e=>{const{bounds:t,group:n,onClose:r,canvasBounds:i,onFinish:o}=e,[a,l]=se.useState(n);return se.createElement(h0,{style:{position:"absolute",left:t.x-i.left+1,top:t.y-i.top,width:t.width-2,height:t.height},className:"gdg-c1tqibwd",onClickOutside:r},se.createElement(m0,{targetHeight:t.height,"data-testid":"group-rename-input",value:a,onBlur:r,onFocus:s=>s.target.setSelectionRange(0,a.length),onChange:s=>l(s.target.value),onKeyDown:s=>{s.key==="Enter"?o(a):s.key==="Escape"&&r()},autoFocus:!0}))};function v0(e,t){return e===void 0?!1:e.length>1&&e.startsWith("_")?Number.parseInt(e.slice(1))===t.keyCode:e.length===1&&e>="a"&&e<="z"?e.toUpperCase().codePointAt(0)===t.keyCode:e===t.key}function ut(e,t,n){const r=Ed(e,t);return r&&(n.didMatch=!0),r}function Ed(e,t){if(e.length===0)return!1;if(e.includes("|")){const s=e.split("|");for(const u of s)if(Ed(u,t))return!0;return!1}let n=!1,r=!1,i=!1,o=!1;const a=e.split("+"),l=a.pop();if(!v0(l,t))return!1;if(a[0]==="any")return!0;for(const s of a)switch(s){case"ctrl":n=!0;break;case"shift":r=!0;break;case"alt":i=!0;break;case"meta":o=!0;break;case"primary":oa.value?o=!0:n=!0;break}return t.altKey===i&&t.ctrlKey===n&&t.shiftKey===r&&t.metaKey===o}function b0(e,t,n,r,i,o,a){const l=se.useCallback((c,d,f,h)=>{var R;(o==="cell"||o==="multi-cell")&&c!==void 0&&(c={...c,range:{x:c.cell[0],y:c.cell[1],width:1,height:1}}),!a&&c!==void 0&&c.range.width>1&&(c={...c,range:{...c.range,width:1,x:c.cell[0]}});const m=n==="mixed"&&(f||h==="drag"),p=r==="mixed"&&m,v=i==="mixed"&&m;let y={current:c===void 0?void 0:{...c,rangeStack:h==="drag"?((R=e.current)==null?void 0:R.rangeStack)??[]:[]},columns:p?e.columns:bt.empty(),rows:v?e.rows:bt.empty()};f&&(o==="multi-rect"||o==="multi-cell")&&y.current!==void 0&&e.current!==void 0&&(y={...y,current:{...y.current,rangeStack:[...e.current.rangeStack,e.current.range]}}),t(y,d)},[r,e,n,o,a,i,t]),s=se.useCallback((c,d,f)=>{c=c??e.rows,d!==void 0&&(c=c.add(d));let h;if(i==="exclusive"&&c.length>0)h={current:void 0,columns:bt.empty(),rows:c};else{const m=f&&n==="mixed",p=f&&r==="mixed";h={current:m?e.current:void 0,columns:p?e.columns:bt.empty(),rows:c}}t(h,!1)},[r,e,n,i,t]),u=se.useCallback((c,d,f)=>{c=c??e.columns,d!==void 0&&(c=c.add(d));let h;if(r==="exclusive"&&c.length>0)h={current:void 0,rows:bt.empty(),columns:c};else{const m=f&&n==="mixed",p=f&&i==="mixed";h={current:m?e.current:void 0,rows:p?e.rows:bt.empty(),columns:c}}t(h,!1)},[r,e,n,i,t]);return[l,s,u]}function w0(e,t,n,r,i){const o=g.useCallback(u=>{if(e===!0){const c=[];for(let d=u.y;d<u.y+u.height;d++){const f=[];for(let h=u.x;h<u.x+u.width;h++)h<0||d>=i?f.push({kind:te.Loading,allowOverlay:!1}):f.push(t([h,d]));c.push(f)}return c}return(e==null?void 0:e(u,r.signal))??[]},[r.signal,t,e,i]),a=e!==void 0?o:void 0,l=g.useCallback(u=>{if(a===void 0)return[];const c={...u,x:u.x-n};if(c.x<0){c.x=0,c.width--;const d=a(c,r.signal);return typeof d=="function"?async()=>(await d()).map(f=>[{kind:te.Loading,allowOverlay:!1},...f]):d.map(f=>[{kind:te.Loading,allowOverlay:!1},...f])}return a(c,r.signal)},[r.signal,a,n]);return[e!==void 0?l:void 0,a]}function y0(e){if(e.copyData!==void 0)return{formatted:e.copyData,rawValue:e.copyData,format:"string"};switch(e.kind){case te.Boolean:return{formatted:e.data===!0?"TRUE":e.data===!1?"FALSE":e.data===Ps?"INDETERMINATE":"",rawValue:e.data,format:"boolean"};case te.Custom:return{formatted:e.copyData,rawValue:e.copyData,format:"string"};case te.Image:case te.Bubble:return{formatted:e.data,rawValue:e.data,format:"string-array"};case te.Drilldown:return{formatted:e.data.map(t=>t.text),rawValue:e.data.map(t=>t.text),format:"string-array"};case te.Text:return{formatted:e.displayData??e.data,rawValue:e.data,format:"string"};case te.Uri:return{formatted:e.displayData??e.data,rawValue:e.data,format:"url"};case te.Markdown:case te.RowID:return{formatted:e.data,rawValue:e.data,format:"string"};case te.Number:return{formatted:e.displayData,rawValue:e.data,format:"number"};case te.Loading:return{formatted:"#LOADING",rawValue:"",format:"string"};case te.Protected:return{formatted:"************",rawValue:"",format:"string"};default:Qi()}}function C0(e,t){return e.map((r,i)=>{const o=t[i];return r.map(a=>a.span!==void 0&&a.span[0]!==o?{formatted:"",rawValue:"",format:"string"}:y0(a))})}function Su(e,t){return(t?/[\t\n",]/:/[\t\n"]/).test(e)&&(e=`"${e.replace(/"/g,'""')}"`),e}function S0(e){var n;const t=[];for(const r of e){const i=[];for(const o of r)o.format==="url"?i.push(((n=o.rawValue)==null?void 0:n.toString())??""):o.format==="string-array"?i.push(o.formatted.map(a=>Su(a,!0)).join(",")):i.push(Su(o.formatted,!1));t.push(i.join(" "))}return t.join(`
|
166
|
+
`)}function is(e){return e.replace(/\t/g," ").replace(/ {2,}/g,t=>"<span> </span>".repeat(t.length))}function xu(e){return'"'+e.replace(/&/g,"&").replace(/"/g,""").replace(/</g,"<").replace(/>/g,">")+'"'}function x0(e){return e.replace(/"/g,'"').replace(/</g,"<").replace(/>/g,">").replace(/&/g,"&")}function k0(e){var n;const t=[];t.push('<style type="text/css"><!--br {mso-data-placement:same-cell;}--></style>',"<table><tbody>");for(const r of e){t.push("<tr>");for(const i of r){const o=`gdg-format="${i.format}"`;i.format==="url"?t.push(`<td ${o}><a href="${i.rawValue}">${is(i.formatted)}</a></td>`):i.format==="string-array"?t.push(`<td ${o}><ol>${i.formatted.map((a,l)=>`<li gdg-raw-value=${xu(i.rawValue[l])}>`+is(a)+"</li>").join("")}</ol></td>`):t.push(`<td gdg-raw-value=${xu(((n=i.rawValue)==null?void 0:n.toString())??"")} ${o}>${is(i.formatted)}</td>`)}t.push("</tr>")}return t.push("</tbody></table>"),t.join("")}function M0(e,t){const n=C0(e,t),r=S0(n),i=k0(n);return{textPlain:r,textHtml:i}}function ku(e){var a;const t=document.createElement("html");t.innerHTML=e.replace(/ /g," ");const n=t.querySelector("table");if(n===null)return;const r=[n],i=[];let o;for(;r.length>0;){const l=r.pop();if(l===void 0)break;if(l instanceof HTMLTableElement||l.nodeName==="TBODY")r.push(...[...l.children].reverse());else if(l instanceof HTMLTableRowElement)o!==void 0&&i.push(o),o=[],r.push(...[...l.children].reverse());else if(l instanceof HTMLTableCellElement){const s=l.cloneNode(!0),c=s.children.length===1&&s.children[0].nodeName==="P"?s.children[0]:null,d=(c==null?void 0:c.children.length)===1&&c.children[0].nodeName==="FONT",f=s.querySelectorAll("br");for(const p of f)p.replaceWith(`
|
167
|
+
`);const h=s.getAttribute("gdg-raw-value"),m=s.getAttribute("gdg-format")??"string";if(s.querySelector("a")!==null)o==null||o.push({rawValue:((a=s.querySelector("a"))==null?void 0:a.getAttribute("href"))??"",formatted:s.textContent??"",format:m});else if(s.querySelector("ol")!==null){const p=s.querySelectorAll("li");o==null||o.push({rawValue:[...p].map(v=>v.getAttribute("gdg-raw-value")??""),formatted:[...p].map(v=>v.textContent??""),format:"string-array"})}else if(h!==null)o==null||o.push({rawValue:x0(h),formatted:s.textContent??"",format:m});else{let p=s.textContent??"";d&&(p=p.replace(/\n(?!\n)/g,"")),o==null||o.push({rawValue:p??"",formatted:p??"",format:m})}}}return o!==void 0&&i.push(o),i}function R0(e,t,n,r,i){var l;const o=e;if(r==="allowPartial"||e.current===void 0||t===void 0)return e;let a=!1;do{if((e==null?void 0:e.current)===void 0)break;const s=(l=e.current)==null?void 0:l.range,u=[];if(s.width>2){const f=t({x:s.x,y:s.y,width:1,height:s.height},i.signal);if(typeof f=="function")return o;u.push(...f);const h=t({x:s.x+s.width-1,y:s.y,width:1,height:s.height},i.signal);if(typeof h=="function")return o;u.push(...h)}else{const f=t({x:s.x,y:s.y,width:s.width,height:s.height},i.signal);if(typeof f=="function")return o;u.push(...f)}let c=s.x-n,d=s.x+s.width-1-n;for(const f of u)for(const h of f)h.span!==void 0&&(c=Math.min(h.span[0],c),d=Math.max(h.span[1],d));c===s.x-n&&d===s.x+s.width-1-n?a=!0:e={current:{cell:e.current.cell??[0,0],range:{x:c+n,y:s.y,width:d-c+1,height:s.height},rangeStack:e.current.rangeStack},columns:e.columns,rows:e.rows}}while(!a);return e}function Mu(e){return e.startsWith('"')&&e.endsWith('"')&&(e=e.slice(1,-1).replace(/""/g,'"')),e}function E0(e){let t;(function(l){l[l.None=0]="None",l[l.inString=1]="inString",l[l.inStringPostQuote=2]="inStringPostQuote"})(t||(t={}));const n=[];let r=[],i=0,o=t.None;e=e.replace(/\r\n/g,`
|
168
|
+
`);let a=0;for(const l of e){switch(o){case t.None:l===" "||l===`
|
169
|
+
`?(r.push(e.slice(i,a)),i=a+1,l===`
|
170
|
+
`&&(n.push(r),r=[])):l==='"'&&(o=t.inString);break;case t.inString:l==='"'&&(o=t.inStringPostQuote);break;case t.inStringPostQuote:l==='"'?o=t.inString:((l===" "||l===`
|
171
|
+
`)&&(r.push(Mu(e.slice(i,a))),i=a+1,l===`
|
172
|
+
`&&(n.push(r),r=[])),o=t.None);break}a++}return i<e.length&&r.push(Mu(e.slice(i,e.length))),n.push(r),n.map(l=>l.map(s=>({rawValue:s,formatted:s,format:"string"})))}function Ru(e,t,n){var l;const r=M0(e,t),i=s=>{var u;(u=window.navigator.clipboard)==null||u.writeText(s)},o=(s,u)=>{var c;return((c=window.navigator.clipboard)==null?void 0:c.write)===void 0?!1:(window.navigator.clipboard.write([new ClipboardItem({"text/plain":new Blob([s],{type:"text/plain"}),"text/html":new Blob([u],{type:"text/html"})})]),!0)},a=(s,u)=>{var c,d;try{if(n===void 0||n.clipboardData===null)throw new Error("No clipboard data");(c=n==null?void 0:n.clipboardData)==null||c.setData("text/plain",s),(d=n==null?void 0:n.clipboardData)==null||d.setData("text/html",u)}catch{o(s,u)||i(s)}};((l=window.navigator.clipboard)==null?void 0:l.write)!==void 0||(n==null?void 0:n.clipboardData)!==void 0?a(r.textPlain,r.textHtml):i(r.textPlain),n==null||n.preventDefault()}function Id(e){return e!==!0}function Eu(e){return typeof e=="string"?e:`${e}px`}const I0=()=>e=>e.innerWidth,T0=()=>e=>e.innerHeight,D0=mn("div")({name:"Wrapper",class:"gdg-wmyidgi",propsAsIs:!1,vars:{"wmyidgi-0":[I0()],"wmyidgi-1":[T0()]}}),O0=e=>{const{inWidth:t,inHeight:n,children:r,...i}=e;return g.createElement(D0,{innerHeight:Eu(n),innerWidth:Eu(t),...i},r)},P0=2,_0=1300;function L0(e,t,n){const r=se.useRef(0),[i,o]=e??[0,0];se.useEffect(()=>{if(i===0&&o===0){r.current=0;return}let a=!1,l=0;const s=u=>{var c;if(!a){if(l===0)l=u;else{const d=u-l;r.current=Math.min(1,r.current+d/_0);const f=r.current**1.618*d*P0;(c=t.current)==null||c.scrollBy(i*f,o*f),l=u,n==null||n()}window.requestAnimationFrame(s)}};return window.requestAnimationFrame(s),()=>{a=!0}},[t,i,o,n])}function F0({rowHeight:e,headerHeight:t,groupHeaderHeight:n,theme:r,overscrollX:i,overscrollY:o,scaleToRem:a,remSize:l}){const[s,u,c,d,f,h]=se.useMemo(()=>{if(!a||l===16)return[e,t,n,r,i,o];const m=l/16,p=e,v=hd();return[typeof p=="number"?p*m:y=>Math.ceil(p(y)*m),Math.ceil(t*m),Math.ceil(n*m),{...r,headerIconSize:((r==null?void 0:r.headerIconSize)??v.headerIconSize)*m,cellHorizontalPadding:((r==null?void 0:r.cellHorizontalPadding)??v.cellHorizontalPadding)*m,cellVerticalPadding:((r==null?void 0:r.cellVerticalPadding)??v.cellVerticalPadding)*m},Math.ceil((i??0)*m),Math.ceil((o??0)*m)]},[n,t,i,o,l,e,a,r]);return{rowHeight:s,headerHeight:u,groupHeaderHeight:c,theme:d,overscrollX:f,overscrollY:h}}const Rr={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 Iu(e){const t=oa.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 A0(e){const t=qg(e);return se.useMemo(()=>{if(t===void 0)return Iu(Rr);const n={...t,goToNextPage:(t==null?void 0:t.goToNextPage)??(t==null?void 0:t.pageDown)??Rr.goToNextPage,goToPreviousPage:(t==null?void 0:t.goToPreviousPage)??(t==null?void 0:t.pageUp)??Rr.goToPreviousPage,goToFirstCell:(t==null?void 0:t.goToFirstCell)??(t==null?void 0:t.first)??Rr.goToFirstCell,goToLastCell:(t==null?void 0:t.goToLastCell)??(t==null?void 0:t.last)??Rr.goToLastCell,selectToFirstCell:(t==null?void 0:t.selectToFirstCell)??(t==null?void 0:t.first)??Rr.selectToFirstCell,selectToLastCell:(t==null?void 0:t.selectToLastCell)??(t==null?void 0:t.last)??Rr.selectToLastCell};return Iu({...Rr,...n})},[t])}function H0(e){function t(r,i,o){if(typeof r=="number")return{headerIndex:r,isCollapsed:!1,depth:i,path:o};const a={headerIndex:r.headerIndex,isCollapsed:r.isCollapsed,depth:i,path:o};return r.subGroups!==void 0&&(a.subGroups=r.subGroups.map((l,s)=>t(l,i+1,[...o,s])).sort((l,s)=>l.headerIndex-s.headerIndex)),a}return e.map((r,i)=>t(r,0,[i])).sort((r,i)=>r.headerIndex-i.headerIndex)}function qs(e,t){const n=[];function r(a,l,s=!1){let u=l!==null?l-a.headerIndex:t-a.headerIndex;if(a.subGroups!==void 0&&(u=a.subGroups[0].headerIndex-a.headerIndex),u--,n.push({headerIndex:a.headerIndex,contentIndex:-1,skip:s,isCollapsed:a.isCollapsed,depth:a.depth,path:a.path,rows:u}),a.subGroups)for(let c=0;c<a.subGroups.length;c++){const d=c<a.subGroups.length-1?a.subGroups[c+1].headerIndex:l;r(a.subGroups[c],d,s||a.isCollapsed)}}const i=H0(e.groups);for(let a=0;a<i.length;a++){const l=a<i.length-1?i[a+1].headerIndex:null;r(i[a],l)}let o=0;for(const a of n)a.contentIndex=o,o+=a.rows;return n.filter(a=>a.skip===!1).map(a=>{const{skip:l,...s}=a;return s})}function sa(e,t){if(t===void 0||qs.length===0)return{path:[e],originalIndex:e,isGroupHeader:!1,groupIndex:e,contentIndex:e,groupRows:-1};let n=e;for(const r of t){if(n===0)return{path:[...r.path,-1],originalIndex:r.headerIndex,isGroupHeader:!0,groupIndex:-1,contentIndex:-1,groupRows:r.rows};if(n--,!r.isCollapsed){if(n<r.rows)return{path:[...r.path,n],originalIndex:r.headerIndex+n,isGroupHeader:!1,groupIndex:n,contentIndex:r.contentIndex+n,groupRows:r.rows};n-=r.rows}}return{path:[e],originalIndex:e,isGroupHeader:!1,groupIndex:e,contentIndex:e,groupRows:-1}}function z0(e,t,n,r){const i=se.useMemo(()=>e===void 0?void 0:qs(e,t),[e,t]),o=se.useMemo(()=>i===void 0?t:i.reduce((u,c)=>u+(c.isCollapsed?1:c.rows+1),0),[i,t]),a=se.useMemo(()=>e===void 0||typeof n=="number"&&e.height===n?n:u=>{const{isGroupHeader:c}=sa(u,i);return c?e.height:typeof n=="number"?n:n(u)},[i,e,n]),l=se.useCallback(u=>{if(i===void 0)return u;let c=u;for(const d of i){if(c===0)return;if(c--,!d.isCollapsed){if(c<d.rows)return d.contentIndex+c;c-=d.rows}}return u},[i]),s=Br(r??(e==null?void 0:e.themeOverride),se.useCallback(u=>{if(e===void 0)return r==null?void 0:r(u,u,u);if(r===void 0&&(e==null?void 0:e.themeOverride)===void 0)return;const{isGroupHeader:c,contentIndex:d,groupIndex:f}=sa(u,i);return c?e.themeOverride:r==null?void 0:r(u,f,d)},[i,r,e]));return e===void 0?{rowHeight:a,rows:t,rowNumberMapper:l,getRowThemeOverride:s}:{rowHeight:a,rows:o,rowNumberMapper:l,getRowThemeOverride:s}}function V0(e,t){const n=se.useMemo(()=>e===void 0?void 0:qs(e,t),[e,t]);return{getRowGroupingForPath:Dd,updateRowGroupingByPath:Td,mapper:se.useCallback(r=>{if(typeof r=="number")return sa(r,n);const i=sa(r[1],n);return{...i,originalIndex:[r[0],i.originalIndex]}},[n])}}function Td(e,t,n){const[r,...i]=t;return i[0]===-1?e.map((o,a)=>a===r?{...o,...n}:o):e.map((o,a)=>a===r?{...o,subGroups:Td(o.subGroups??[],i,n)}:o)}function Dd(e,t){const[n,...r]=t;return r[0]===-1?e[n]:Dd(e[n].subGroups??[],r)}function $0(e,t){const[n]=g.useState(()=>({value:e,callback:t,facade:{get current(){return n.value},set current(r){const i=n.value;i!==r&&(n.value=r,n.callback(r,i))}}}));return n.callback=t,n.facade}function N0(e,t,n,r,i){const[o,a]=g.useMemo(()=>[t!==void 0&&typeof n=="number"?Math.floor(t/n):0,t!==void 0&&typeof n=="number"?-(t%n):0],[t,n]),l=g.useMemo(()=>({x:r.current.x,y:o,width:r.current.width??1,height:r.current.height??1,ty:a}),[r,a,o]),[s,u,c]=Ug(l),d=g.useRef(i);d.current=i;const f=$0(null,p=>{p!==null&&t!==void 0?p.scrollTop=t:p!==null&&e!==void 0&&(p.scrollLeft=e)}),h=(s.height??1)>1;g.useLayoutEffect(()=>{if(t!==void 0&&f.current!==null&&h){if(f.current.scrollTop===t)return;f.current.scrollTop=t,f.current.scrollTop!==t&&c(),d.current()}},[t,h,c,f]);const m=(s.width??1)>1;return g.useLayoutEffect(()=>{if(e!==void 0&&f.current!==null&&m){if(f.current.scrollLeft===e)return;f.current.scrollLeft=e,f.current.scrollLeft!==e&&c(),d.current()}},[e,m,c,f]),{visibleRegion:s,setVisibleRegion:u,scrollRef:f}}const B0=g.lazy(async()=>await Ts(()=>import("./data-grid-overlay-editor.C9j6qKVt.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12]),import.meta.url));let W0=0;function U0(e){return jm(gu(gu(e).filter(t=>t.span!==void 0).map(t=>{var n,r;return ar((((n=t.span)==null?void 0:n[0])??0)+1,(((r=t.span)==null?void 0:r[1])??0)+1)})))}function Ho(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 zo={kind:te.Loading,allowOverlay:!1},Vo={columns:bt.empty(),rows:bt.empty(),current:void 0},q0=(e,t)=>{var Sl,xl,kl;const[n,r]=g.useState(Vo),[i,o]=g.useState(),a=g.useRef(null),l=g.useRef(null),[s,u]=g.useState(),c=g.useRef(),d=typeof window>"u"?null:window,{imageEditorOverride:f,getRowThemeOverride:h,markdownDivCreateNode:m,width:p,height:v,columns:y,rows:b,getCellContent:R,onCellClicked:O,onCellActivated:S,onFillPattern:M,onFinishedEditing:_,coercePasteValue:E,drawHeader:x,drawCell:L,editorBloom:D,onHeaderClicked:C,onColumnProposeMove:I,rangeSelectionColumnSpanning:T=!0,spanRangeBehavior:k="default",onGroupHeaderClicked:V,onCellContextMenu:N,className:U,onHeaderContextMenu:oe,getCellsForSelection:ee,onGroupHeaderContextMenu:j,onGroupHeaderRenamed:ne,onCellEdited:ie,onCellsEdited:ue,onSearchResultsChanged:ge,searchResults:J,onSearchValueChange:H,searchValue:P,onKeyDown:q,onKeyUp:fe,keybindings:me,editOnType:ze=!0,onRowAppended:ve,onColumnMoved:Xe,validateCell:Me,highlightRegions:Pt,rangeSelect:Mt="rect",columnSelect:Qe="multi",rowSelect:le="multi",rangeSelectionBlending:je="exclusive",columnSelectionBlending:we="exclusive",rowSelectionBlending:ce="exclusive",onDelete:be,onDragStart:Ve,onMouseMove:Oe,onPaste:nt,copyHeaders:pe=!1,freezeColumns:Ee=0,cellActivationBehavior:at="second-click",rowSelectionMode:Ae="auto",onHeaderMenuClick:rt,onHeaderIndicatorClick:vt,getGroupDetails:ht,rowGrouping:He,onSearchClose:It,onItemHovered:Yt,onSelectionCleared:mt,showSearch:Rt,onVisibleRegionChanged:Gt,gridSelection:Lt,onGridSelectionChange:Sn,minColumnWidth:Wt=50,maxColumnWidth:St=500,maxColumnAutoWidth:En,provideEditor:pn,trailingRowOptions:Pe,freezeTrailingRows:Ft=0,allowedFillDirections:dn="orthogonal",scrollOffsetX:fn,scrollOffsetY:vn,verticalBorder:st,onDragOverCell:zt,onDrop:Dt,onColumnResize:nn,onColumnResizeEnd:Tt,onColumnResizeStart:Vt,customRenderers:Ge,fillHandle:$t,experimental:At,fixedShadowX:Nt,fixedShadowY:he,headerIcons:lt,imageWindowLoader:un,initialSize:hn,isDraggable:z,onDragLeave:et,onRowMoved:$e,overscrollX:Ot,overscrollY:cn,preventDiagonalScrolling:Zt,rightElement:qn,rightElementProps:In,trapFocus:Jt=!1,smoothScrollX:Ln,smoothScrollY:Yn,scaleToRem:Ca=!1,rowHeight:lo=34,headerHeight:uo=36,groupHeaderHeight:Sa=uo,theme:Gr,isOutsideClick:br,renderers:pi,resizeIndicator:xa,scrollToActiveCell:vi=!0,drawFocusRing:bi=!0}=e,Pr=bi==="no-editor"?i===void 0:bi,Qt=typeof e.rowMarkers=="string"?void 0:e.rowMarkers,xn=(Qt==null?void 0:Qt.kind)??e.rowMarkers??"none",wi=(Qt==null?void 0:Qt.width)??e.rowMarkerWidth,yi=(Qt==null?void 0:Qt.startIndex)??e.rowMarkerStartIndex??1,Kr=(Qt==null?void 0:Qt.theme)??e.rowMarkerTheme,cr=Qt==null?void 0:Qt.headerTheme,dr=Qt==null?void 0:Qt.headerAlwaysVisible,Zr=le!=="multi",tr=(Qt==null?void 0:Qt.checkboxStyle)??"square",nr=Math.max(Wt,20),_r=Math.max(St,nr),co=Math.max(En??_r,nr),Ci=g.useMemo(()=>typeof window>"u"?{fontSize:"16px"}:window.getComputedStyle(document.documentElement),[]),{rows:Ke,rowNumberMapper:fo,rowHeight:ho,getRowThemeOverride:Fn}=z0(He,b,lo,h),go=g.useMemo(()=>Number.parseFloat(Ci.fontSize),[Ci]),{rowHeight:Xn,headerHeight:Si,groupHeaderHeight:mo,theme:po,overscrollX:ka,overscrollY:Ma}=F0({groupHeaderHeight:Sa,headerHeight:uo,overscrollX:Ot,overscrollY:cn,remSize:go,rowHeight:ho,scaleToRem:Ca,theme:Gr}),An=A0(me),wr=wi??(b>1e4?48:b>1e3?44:b>100?36:32),Hn=xn!=="none",Y=Hn?1:0,jt=ve!==void 0,yr=(Pe==null?void 0:Pe.sticky)===!0,[Jr,Qr]=g.useState(!1),xi=Rt??Jr,Ra=g.useCallback(()=>{It!==void 0?It():Qr(!1)},[It]),G=g.useMemo(()=>Lt===void 0?void 0:Ho(Lt,Y),[Lt,Y])??n,sn=g.useRef();sn.current===void 0&&(sn.current=new AbortController),g.useEffect(()=>()=>sn==null?void 0:sn.current.abort(),[]);const[ln,Ea]=w0(ee,R,Y,sn.current,Ke),$=g.useCallback((w,A,F)=>{if(Me===void 0)return!0;const W=[w[0]-Y,w[1]];return Me==null?void 0:Me(W,A,F)},[Y,Me]),ae=g.useRef(Lt),Se=g.useCallback((w,A)=>{A&&(w=R0(w,ln,Y,k,sn.current)),Sn!==void 0?(ae.current=Ho(w,-Y),Sn(ae.current)):r(w)},[Sn,ln,Y,k]),xe=Br(nn,g.useCallback((w,A,F,W)=>{nn==null||nn(y[F-Y],A,F-Y,W)},[nn,Y,y])),de=Br(Tt,g.useCallback((w,A,F,W)=>{Tt==null||Tt(y[F-Y],A,F-Y,W)},[Tt,Y,y])),Re=Br(Vt,g.useCallback((w,A,F,W)=>{Vt==null||Vt(y[F-Y],A,F-Y,W)},[Vt,Y,y])),it=Br(x,g.useCallback((w,A)=>(x==null?void 0:x({...w,columnIndex:w.columnIndex-Y},A))??!1,[x,Y])),ot=Br(L,g.useCallback((w,A)=>(L==null?void 0:L({...w,col:w.col-Y},A))??!1,[L,Y])),Te=g.useCallback(w=>{if(be!==void 0){const A=be(Ho(w,-Y));return typeof A=="boolean"?A:Ho(A,Y)}return!0},[be,Y]),[xt,ke,Ze]=b0(G,Se,je,we,ce,Mt,T),We=g.useMemo(()=>gr(hd(),po),[po]),[ft,an]=g.useState([0,0,0]),kn=g.useMemo(()=>{if(pi===void 0)return{};const w={};for(const A of pi)w[A.kind]=A;return w},[pi]),yt=g.useCallback(w=>w.kind!==te.Custom?kn[w.kind]:Ge==null?void 0:Ge.find(A=>A.isMatch(w)),[Ge,kn]);let{sizedColumns:Kt,nonGrowWidth:jn}=Vm(y,Ke,Ea,ft[0]-(Y===0?0:wr)-ft[2],nr,co,We,yt,sn.current);xn!=="none"&&(jn+=wr);const yn=g.useMemo(()=>Kt.some(w=>w.group!==void 0),[Kt]),Et=yn?Si+mo:Si,Mn=G.rows.length,Tn=xn==="none"?void 0:Mn===0?!1:Mn===Ke?!0:void 0,Ct=g.useMemo(()=>xn==="none"?Kt:[{title:"",width:wr,icon:void 0,hasMenu:!1,style:"normal",themeOverride:Kr,rowMarker:tr,rowMarkerChecked:Tn,headerRowMarkerTheme:cr,headerRowMarkerAlwaysVisible:dr,headerRowMarkerDisabled:Zr},...Kt],[xn,Kt,wr,Kr,tr,Tn,cr,dr,Zr]),en=g.useRef({height:1,width:1,x:0,y:0}),Cr=g.useRef(!1),{setVisibleRegion:Sr,visibleRegion:Lr,scrollRef:Ut}=N0(fn,vn,Xn,en,()=>Cr.current=!0);en.current=Lr;const Mf=Lr.x+Y,vo=Lr.y,Rn=g.useRef(null),Cn=g.useCallback(w=>{var A;w===!0?(A=Rn.current)==null||A.focus():window.requestAnimationFrame(()=>{var F;(F=Rn.current)==null||F.focus()})},[]),bn=jt?Ke+1:Ke,zn=g.useCallback(w=>{const A=Y===0?w:w.map(W=>({...W,location:[W.location[0]-Y,W.location[1]]})),F=ue==null?void 0:ue(A);if(F!==!0)for(const W of A)ie==null||ie(W.location,W.value);return F},[ie,ue,Y]),[Fr,Ia]=g.useState(),bo=G.current!==void 0&&G.current.range.width*G.current.range.height>1?G.current.range:void 0,ei=Pr?(Sl=G.current)==null?void 0:Sl.cell:void 0,wo=ei==null?void 0:ei[0],yo=ei==null?void 0:ei[1],Rf=g.useMemo(()=>{if((Pt===void 0||Pt.length===0)&&(bo??wo??yo??Fr)===void 0)return;const w=[];if(Pt!==void 0)for(const A of Pt){const F=Ct.length-A.range.x-Y;F>0&&w.push({color:A.color,range:{...A.range,x:A.range.x+Y,width:Math.min(F,A.range.width)},style:A.style})}return Fr!==void 0&&w.push({color:Ur(We.accentColor,0),range:Fr,style:"dashed"}),bo!==void 0&&w.push({color:Ur(We.accentColor,.5),range:bo,style:"solid-outline"}),wo!==void 0&&yo!==void 0&&w.push({color:We.accentColor,range:{x:wo,y:yo,width:1,height:1},style:"solid-outline"}),w.length>0?w:void 0},[Fr,bo,wo,yo,Pt,Ct.length,We.accentColor,Y]),ll=g.useRef(Ct);ll.current=Ct;const Dn=g.useCallback(([w,A],F=!1)=>{var Z,X,K,Q,re,ye,_e;const W=jt&&A===bn-1;if(w===0&&Hn){if(W)return zo;const Ce=fo(A);return Ce===void 0?zo:{kind:Un.Marker,allowOverlay:!1,checkboxStyle:tr,checked:(G==null?void 0:G.rows.hasIndex(A))===!0,markerKind:xn==="clickable-number"?"number":xn,row:yi+Ce,drawHandle:$e!==void 0,cursor:xn==="clickable-number"?"pointer":void 0}}else if(W){const Fe=w===Y?(Pe==null?void 0:Pe.hint)??"":"",De=ll.current[w];if(((Z=De==null?void 0:De.trailingRowOptions)==null?void 0:Z.disabled)===!0)return zo;{const gt=((X=De==null?void 0:De.trailingRowOptions)==null?void 0:X.hint)??Fe,Ue=((K=De==null?void 0:De.trailingRowOptions)==null?void 0:K.addIcon)??(Pe==null?void 0:Pe.addIcon);return{kind:Un.NewRow,hint:gt,allowOverlay:!1,icon:Ue}}}else{const Ce=w-Y;if(F||(At==null?void 0:At.strict)===!0){const De=en.current,gt=De.x>Ce||Ce>De.x+De.width||De.y>A||A>De.y+De.height||A>=Da.current,Ue=Ce===((re=(Q=De.extras)==null?void 0:Q.selected)==null?void 0:re[0])&&A===((ye=De.extras)==null?void 0:ye.selected[1]);let Le=!1;if(((_e=De.extras)==null?void 0:_e.freezeRegions)!==void 0){for(const kt of De.extras.freezeRegions)if(Wr(kt,Ce,A)){Le=!0;break}}if(gt&&!Ue&&!Le)return zo}let Fe=R([Ce,A]);return Y!==0&&Fe.span!==void 0&&(Fe={...Fe,span:[Fe.span[0]+Y,Fe.span[1]+Y]}),Fe}},[jt,bn,Hn,fo,tr,G==null?void 0:G.rows,xn,yi,$e,Y,Pe==null?void 0:Pe.hint,Pe==null?void 0:Pe.addIcon,At==null?void 0:At.strict,R]),Ta=g.useCallback(w=>{let A=(ht==null?void 0:ht(w))??{name:w};return ne!==void 0&&w!==""&&(A={icon:A.icon,name:A.name,overrideTheme:A.overrideTheme,actions:[...A.actions??[],{title:"Rename",icon:"renameIcon",onClick:F=>Pa({group:A.name,bounds:F.bounds})}]}),A},[ht,ne]),Co=g.useCallback(w=>{var K;const[A,F]=w.cell,W=Ct[A],B=(W==null?void 0:W.group)!==void 0?(K=Ta(W.group))==null?void 0:K.overrideTheme:void 0,Z=W==null?void 0:W.themeOverride,X=Fn==null?void 0:Fn(F);o({...w,theme:gr(We,B,Z,X,w.content.themeOverride)})},[Fn,Ct,Ta,We]),ti=g.useCallback((w,A,F)=>{var X;if(G.current===void 0)return;const[W,B]=G.current.cell,Z=Dn([W,B]);if(Z.kind!==te.Boolean&&Z.allowOverlay){let K=Z;if(F!==void 0)switch(K.kind){case te.Number:{const Q=gg(()=>F==="-"?-0:Number.parseFloat(F),0);K={...K,data:Number.isNaN(Q)?0:Q};break}case te.Text:case te.Markdown:case te.Uri:K={...K,data:F};break}Co({target:w,content:K,initialValue:F,cell:[W,B],highlight:F===void 0,forceEditMode:F!==void 0})}else Z.kind===te.Boolean&&A&&Z.readonly!==!0&&(zn([{location:G.current.cell,value:{...Z,data:Id(Z.data)}}]),(X=Rn.current)==null||X.damage([{cell:G.current.cell}]))},[Dn,G,zn,Co]),ul=g.useCallback((w,A)=>{var B;const F=(B=Rn.current)==null?void 0:B.getBounds(w,A);if(F===void 0||Ut.current===null)return;const W=Dn([w,A]);W.allowOverlay&&Co({target:F,content:W,initialValue:void 0,highlight:!0,cell:[w,A],forceEditMode:!0})},[Dn,Ut,Co]),rn=g.useCallback((w,A,F="both",W=0,B=0,Z=void 0)=>{if(Ut.current!==null){const X=Rn.current,K=l.current,Q=typeof w!="number"?w.unit==="cell"?w.amount:void 0:w,re=typeof A!="number"?A.unit==="cell"?A.amount:void 0:A,ye=typeof w!="number"&&w.unit==="px"?w.amount:void 0,_e=typeof A!="number"&&A.unit==="px"?A.amount:void 0;if(X!==null&&K!==null){let Ce={x:0,y:0,width:0,height:0},Fe=0,De=0;if((Q!==void 0||re!==void 0)&&(Ce=X.getBounds((Q??0)+Y,re??0)??Ce,Ce.width===0||Ce.height===0))return;const gt=K.getBoundingClientRect(),Ue=gt.width/K.offsetWidth;if(ye!==void 0&&(Ce={...Ce,x:ye-gt.left-Ut.current.scrollLeft,width:1}),_e!==void 0&&(Ce={...Ce,y:_e+gt.top-Ut.current.scrollTop,height:1}),Ce!==void 0){const Le={x:Ce.x-W,y:Ce.y-B,width:Ce.width+2*W,height:Ce.height+2*B};let kt=0;for(let Va=0;Va<Ee;Va++)kt+=Kt[Va].width;let Xt=0;const on=Ft+(yr?1:0);on>0&&(Xt=Xr(bn,on,Xn));let Zn=kt*Ue+gt.left+Y*wr*Ue,ir=gt.right,Jn=gt.top+Et*Ue,or=gt.bottom-Xt*Ue;const Io=Ce.width+W*2;switch(Z==null?void 0:Z.hAlign){case"start":ir=Zn+Io;break;case"end":Zn=ir-Io;break;case"center":Zn=Math.floor((Zn+ir)/2)-Io/2,ir=Zn+Io;break}const To=Ce.height+B*2;switch(Z==null?void 0:Z.vAlign){case"start":or=Jn+To;break;case"end":Jn=or-To;break;case"center":Jn=Math.floor((Jn+or)/2)-To/2,or=Jn+To;break}Zn>Le.x?Fe=Le.x-Zn:ir<Le.x+Le.width&&(Fe=Le.x+Le.width-ir),Jn>Le.y?De=Le.y-Jn:or<Le.y+Le.height&&(De=Le.y+Le.height-or),F==="vertical"||typeof w=="number"&&w<Ee?Fe=0:(F==="horizontal"||typeof A=="number"&&A>=bn-on)&&(De=0),(Fe!==0||De!==0)&&(Ue!==1&&(Fe/=Ue,De/=Ue),Ut.current.scrollTo(Fe+Ut.current.scrollLeft,De+Ut.current.scrollTop))}}}},[Y,Ft,wr,Ut,Et,Ee,Kt,bn,yr,Xn]),cl=g.useRef(ul),dl=g.useRef(R),Da=g.useRef(Ke);cl.current=ul,dl.current=R,Da.current=Ke;const ni=g.useCallback(async(w,A=!0)=>{var Q;const F=Ct[w];if(((Q=F==null?void 0:F.trailingRowOptions)==null?void 0:Q.disabled)===!0)return;const W=ve==null?void 0:ve();let B,Z=!0;W!==void 0&&(B=await W,B==="top"&&(Z=!1),typeof B=="number"&&(Z=!1));let X=0;const K=()=>{if(Da.current<=Ke){X<500&&window.setTimeout(K,X),X=50+X*2;return}const re=typeof B=="number"?B:Z?Ke:0;Eo.current(w-Y,re),xt({cell:[w,re],range:{x:w,y:re,width:1,height:1}},!1,!1,"edit");const ye=dl.current([w-Y,re]);ye.allowOverlay&&Yi(ye)&&ye.readonly!==!0&&A&&window.setTimeout(()=>{cl.current(w,re)},0)};K()},[Ct,ve,Y,Ke,xt]),So=g.useCallback(w=>{var F,W;const A=((W=(F=Kt[w])==null?void 0:F.trailingRowOptions)==null?void 0:W.targetColumn)??(Pe==null?void 0:Pe.targetColumn);if(typeof A=="number")return A+(Hn?1:0);if(typeof A=="object"){const B=y.indexOf(A);if(B>=0)return B+(Hn?1:0)}},[Kt,y,Hn,Pe==null?void 0:Pe.targetColumn]),xr=g.useRef(),ri=g.useRef(),Mi=g.useCallback((w,A)=>{var B;const[F,W]=A;return gr(We,(B=Ct[F])==null?void 0:B.themeOverride,Fn==null?void 0:Fn(W),w.themeOverride)},[Fn,Ct,We]),{mapper:Ar}=V0(He,b),Gn=He==null?void 0:He.navigationBehavior,Ri=g.useCallback(w=>{var ye,_e,Ce;const A=oa.value?w.metaKey:w.ctrlKey,F=A&&le==="multi",W=A&&Qe==="multi",[B,Z]=w.location,X=G.columns,K=G.rows,[Q,re]=((ye=G.current)==null?void 0:ye.cell)??[];if(w.kind==="cell"){if(ri.current=void 0,Hr.current=[B,Z],B===0&&Hn){if(jt===!0&&Z===Ke||xn==="number"||le==="none")return;const Fe=Dn(w.location);if(Fe.kind!==Un.Marker)return;if($e!==void 0){const Ue=yt(Fe);Pn((Ue==null?void 0:Ue.kind)===Un.Marker);const Le=(_e=Ue==null?void 0:Ue.onClick)==null?void 0:_e.call(Ue,{...w,cell:Fe,posX:w.localEventX,posY:w.localEventY,bounds:w.bounds,theme:Mi(Fe,w.location),preventDefault:()=>{}});if(Le===void 0||Le.checked===Fe.checked)return}o(void 0),Cn();const De=K.hasIndex(Z),gt=xr.current;if(le==="multi"&&(w.shiftKey||w.isLongTouch===!0)&>!==void 0&&K.hasIndex(gt)){const Ue=[Math.min(gt,Z),Math.max(gt,Z)+1];F||Ae==="multi"?ke(void 0,Ue,!0):ke(bt.fromSingleSelection(Ue),void 0,F)}else le==="multi"&&(F||w.isTouch||Ae==="multi")?De?ke(K.remove(Z),void 0,!0):(ke(void 0,Z,!0),xr.current=Z):De&&K.length===1?ke(bt.empty(),void 0,A):(ke(bt.fromSingleSelection(Z),void 0,A),xr.current=Z)}else if(B>=Y&&jt&&Z===Ke){const Fe=So(B);ni(Fe??B)}else if(Q!==B||re!==Z){const Fe=Dn(w.location),De=yt(Fe);if((De==null?void 0:De.onSelect)!==void 0){let Le=!1;if(De.onSelect({...w,cell:Fe,posX:w.localEventX,posY:w.localEventY,bounds:w.bounds,preventDefault:()=>Le=!0,theme:Mi(Fe,w.location)}),Le)return}if(Gn==="block"&&Ar(Z).isGroupHeader)return;const gt=yr&&Z===Ke,Ue=yr&&G!==void 0&&((Ce=G.current)==null?void 0:Ce.cell[1])===Ke;if((w.shiftKey||w.isLongTouch===!0)&&Q!==void 0&&re!==void 0&&G.current!==void 0&&!Ue){if(gt)return;const Le=Math.min(B,Q),kt=Math.max(B,Q),Xt=Math.min(Z,re),on=Math.max(Z,re);xt({...G.current,range:{x:Le,y:Xt,width:kt-Le+1,height:on-Xt+1}},!0,A,"click"),xr.current=void 0,Cn()}else xt({cell:[B,Z],range:{x:B,y:Z,width:1,height:1}},!0,A,"click"),xr.current=void 0,o(void 0),Cn()}}else if(w.kind==="header")if(Hr.current=[B,Z],o(void 0),Hn&&B===0)xr.current=void 0,ri.current=void 0,le==="multi"&&(K.length!==Ke?ke(bt.fromSingleSelection([0,Ke]),void 0,A):ke(bt.empty(),void 0,A),Cn());else{const Fe=ri.current;if(Qe==="multi"&&(w.shiftKey||w.isLongTouch===!0)&&Fe!==void 0&&X.hasIndex(Fe)){const De=[Math.min(Fe,B),Math.max(Fe,B)+1];W?Ze(void 0,De,A):Ze(bt.fromSingleSelection(De),void 0,A)}else W?(X.hasIndex(B)?Ze(X.remove(B),void 0,A):Ze(void 0,B,A),ri.current=B):Qe!=="none"&&(Ze(bt.fromSingleSelection(B),void 0,A),ri.current=B);xr.current=void 0,Cn()}else w.kind===Wn?Hr.current=[B,Z]:w.kind===aa&&!w.isMaybeScrollbar&&(Se(Vo,!1),o(void 0),Cn(),mt==null||mt(),xr.current=void 0,ri.current=void 0)},[le,Qe,G,Hn,Y,jt,Ke,xn,Dn,$e,Cn,Ae,yt,Mi,ke,So,ni,Gn,Ar,yr,xt,Ze,Se,mt]),Ei=g.useRef(!1),Hr=g.useRef(),fl=g.useRef(Lr),Vn=g.useRef(),Ef=g.useCallback(w=>{if(ii.current=!1,fl.current=en.current,w.button!==0&&w.button!==1){Vn.current=void 0;return}const A=performance.now();Vn.current={button:w.button,time:A,location:w.location},(w==null?void 0:w.kind)==="header"&&(Ei.current=!0);const F=w.kind==="cell"&&w.isFillHandle;!F&&w.kind!=="cell"&&w.isEdge||(u({previousSelection:G,fillHandle:F}),Hr.current=void 0,!w.isTouch&&w.button===0&&!F?Ri(w):!w.isTouch&&w.button===1&&(Hr.current=w.location))},[G,Ri]),[Oa,Pa]=g.useState(),hl=g.useCallback(w=>{if(w.kind!==Wn||Qe!=="multi")return;const A=oa.value?w.metaKey:w.ctrlKey,[F]=w.location,W=G.columns;if(F<Y)return;const B=Ct[F];let Z=F,X=F;for(let K=F-1;K>=Y&&eo(B.group,Ct[K].group);K--)Z--;for(let K=F+1;K<Ct.length&&eo(B.group,Ct[K].group);K++)X++;if(Cn(),A)if(W.hasAll([Z,X+1])){let K=W;for(let Q=Z;Q<=X;Q++)K=K.remove(Q);Ze(K,void 0,A)}else Ze(void 0,[Z,X+1],A);else Ze(bt.fromSingleSelection([Z,X+1]),void 0,A)},[Qe,Cn,G.columns,Ct,Y,Ze]),ii=g.useRef(!1),xo=g.useCallback(async w=>{if(ln!==void 0&&xe!==void 0){const A=en.current.y,F=en.current.height;let W=ln({x:w,y:A,width:1,height:Math.min(F,Ke-A)},sn.current.signal);typeof W!="object"&&(W=await W());const B=Kt[w-Y],X=document.createElement("canvas").getContext("2d",{alpha:!1});if(X!==null){X.font=We.baseFontFull;const K=md(X,We,B,0,W,nr,_r,!1,yt);xe==null||xe(B,K.width,w,K.width)}}},[Kt,ln,_r,We,nr,xe,Y,Ke,yt]),[If,_a]=g.useState(),oi=g.useCallback(async(w,A)=>{var K,Q;const F=(K=w.current)==null?void 0:K.range;if(F===void 0||ln===void 0||A.current===void 0)return;const W=A.current.range;if(M!==void 0){let re=!1;if(M({fillDestination:{...W,x:W.x-Y},patternSource:{...F,x:F.x-Y},preventDefault:()=>re=!0}),re)return}let B=ln(F,sn.current.signal);typeof B!="object"&&(B=await B());const Z=B,X=[];for(let re=0;re<W.width;re++)for(let ye=0;ye<W.height;ye++){const _e=[W.x+re,W.y+ye];if(rd(_e,F))continue;const Ce=Z[ye%F.height][re%F.width];ui(Ce)||!Yi(Ce)||X.push({location:_e,value:{...Ce}})}zn(X),(Q=Rn.current)==null||Q.damage(X.map(re=>({cell:re.location})))},[ln,zn,M,Y]),gl=g.useCallback(()=>{if(G.current===void 0||G.current.range.width<=1)return;const w={...G,current:{...G.current,range:{...G.current.range,width:1}}};oi(w,G)},[oi,G]),ml=g.useCallback(()=>{if(G.current===void 0||G.current.range.height<=1)return;const w={...G,current:{...G.current,range:{...G.current.range,height:1}}};oi(w,G)},[oi,G]),Tf=g.useCallback((w,A)=>{var ye,_e;const F=s;if(u(void 0),Ia(void 0),_a(void 0),Ei.current=!1,A)return;if((F==null?void 0:F.fillHandle)===!0&&G.current!==void 0&&((ye=F.previousSelection)==null?void 0:ye.current)!==void 0){if(Fr===void 0)return;const Ce={...G,current:{...G.current,range:yd(F.previousSelection.current.range,Fr)}};oi(F.previousSelection,Ce),Se(Ce,!0);return}const[W,B]=w.location,[Z,X]=Hr.current??[],K=()=>{ii.current=!0},Q=Ce=>{var De,gt,Ue;const Fe=Ce.isTouch||Z===W&&X===B;if(Fe&&(O==null||O([W-Y,B],{...Ce,preventDefault:K})),Ce.button===1)return!ii.current;if(!ii.current){const Le=Dn(w.location),kt=yt(Le);if(kt!==void 0&&kt.onClick!==void 0&&Fe){const on=kt.onClick({...Ce,cell:Le,posX:Ce.localEventX,posY:Ce.localEventY,bounds:Ce.bounds,theme:Mi(Le,w.location),preventDefault:K});on!==void 0&&!ui(on)&&si(on)&&(zn([{location:Ce.location,value:on}]),(De=Rn.current)==null||De.damage([{cell:Ce.location}]))}if(ii.current||G.current===void 0)return!1;let Xt=!1;switch(Le.activationBehaviorOverride??at){case"double-click":case"second-click":{if(((Ue=(gt=F==null?void 0:F.previousSelection)==null?void 0:gt.current)==null?void 0:Ue.cell)===void 0)break;const[on,Zn]=G.current.cell,[ir,Jn]=F.previousSelection.current.cell;Xt=W===on&&W===ir&&B===Zn&&B===Jn&&(Ce.isDoubleClick===!0||at==="second-click");break}case"single-click":{Xt=!0;break}}if(Xt)return S==null||S([W-Y,B]),ti(Ce.bounds,!1),!0}return!1},re=w.location[0]-Y;if(w.isTouch){const Ce=en.current,Fe=fl.current;if(Ce.x!==Fe.x||Ce.y!==Fe.y)return;if(w.isLongTouch===!0){if(w.kind==="cell"&&Gi((_e=G.current)==null?void 0:_e.cell,w.location)){N==null||N([re,w.location[1]],{...w,preventDefault:K});return}else if(w.kind==="header"&&G.columns.hasIndex(W)){oe==null||oe(re,{...w,preventDefault:K});return}else if(w.kind===Wn){if(re<0)return;j==null||j(re,{...w,preventDefault:K});return}}w.kind==="cell"?Q(w)||Ri(w):w.kind===Wn?V==null||V(re,{...w,preventDefault:K}):(w.kind===Er&&(C==null||C(re,{...w,preventDefault:K})),Ri(w));return}if(w.kind==="header"){if(re<0)return;w.isEdge?w.isDoubleClick===!0&&xo(W):w.button===0&&W===Z&&B===X&&(C==null||C(re,{...w,preventDefault:K}))}if(w.kind===Wn){if(re<0)return;w.button===0&&W===Z&&B===X&&(V==null||V(re,{...w,preventDefault:K}),ii.current||hl(w))}w.kind==="cell"&&(w.button===0||w.button===1)&&Q(w),Hr.current=void 0},[s,G,Y,Fr,oi,Se,O,Dn,yt,at,Mi,zn,S,ti,N,oe,j,Ri,V,C,xo,hl]),Df=g.useCallback(w=>{const A={...w,location:[w.location[0]-Y,w.location[1]]};Oe==null||Oe(A),s!==void 0&&w.buttons===0&&(u(void 0),Ia(void 0),_a(void 0),Ei.current=!1),_a(F=>{var W;return Ei.current?[w.scrollEdge[0],0]:w.scrollEdge[0]===(F==null?void 0:F[0])&&w.scrollEdge[1]===F[1]?F:s===void 0||(((W=Vn.current)==null?void 0:W.location[0])??0)<Y?void 0:w.scrollEdge})},[s,Oe,Y]),Of=g.useCallback((w,A)=>{rt==null||rt(w-Y,A)},[rt,Y]),Pf=g.useCallback((w,A)=>{vt==null||vt(w-Y,A)},[vt,Y]),rr=(xl=G==null?void 0:G.current)==null?void 0:xl.cell,_f=g.useCallback((w,A,F,W,B,Z)=>{Cr.current=!1;let X=rr;X!==void 0&&(X=[X[0]-Y,X[1]]);const K=Ee===0?void 0:{x:0,y:w.y,width:Ee,height:w.height},Q=[];K!==void 0&&Q.push(K),Ft>0&&(Q.push({x:w.x-Y,y:Ke-Ft,width:w.width,height:Ft}),Ee>0&&Q.push({x:0,y:Ke-Ft,width:Ee,height:Ft}));const re={x:w.x-Y,y:w.y,width:w.width,height:jt&&w.y+w.height>=Ke?w.height-1:w.height,tx:B,ty:Z,extras:{selected:X,freezeRegion:K,freezeRegions:Q}};en.current=re,Sr(re),an([A,F,W]),Gt==null||Gt(re,re.tx,re.ty,re.extras)},[rr,Y,jt,Ke,Ee,Ft,Sr,Gt]),Lf=Br(Xe,g.useCallback((w,A)=>{Xe==null||Xe(w-Y,A-Y),Qe!=="none"&&Ze(bt.fromSingleSelection(A),void 0,!0)},[Qe,Xe,Y,Ze])),La=g.useRef(!1),Ff=g.useCallback(w=>{if(w.location[0]===0&&Y>0){w.preventDefault();return}Ve==null||Ve({...w,location:[w.location[0]-Y,w.location[1]]}),w.defaultPrevented()||(La.current=!0),u(void 0)},[Ve,Y]),Af=g.useCallback(()=>{La.current=!1},[]),pl=He==null?void 0:He.selectionBehavior,ko=g.useCallback(w=>{if(pl!=="block-spanning")return;const{isGroupHeader:A,path:F,groupRows:W}=Ar(w);if(A)return[w,w];const B=F[F.length-1],Z=w-B,X=w+W-B-1;return[Z,X]},[Ar,pl]),Fa=g.useRef(),Aa=g.useCallback(w=>{var A,F,W;if(!Rd(w,Fa.current)&&(Fa.current=w,!(((A=Vn==null?void 0:Vn.current)==null?void 0:A.button)!==void 0&&Vn.current.button>=1))){if(w.buttons!==0&&s!==void 0&&((F=Vn.current)==null?void 0:F.location[0])===0&&w.location[0]===0&&Y===1&&le==="multi"&&s.previousSelection&&!s.previousSelection.rows.hasIndex(Vn.current.location[1])&&G.rows.hasIndex(Vn.current.location[1])){const B=Math.min(Vn.current.location[1],w.location[1]),Z=Math.max(Vn.current.location[1],w.location[1])+1;ke(bt.fromSingleSelection([B,Z]),void 0,!1)}if(w.buttons!==0&&s!==void 0&&G.current!==void 0&&!La.current&&!Ei.current&&(Mt==="rect"||Mt==="multi-rect")){const[B,Z]=G.current.cell;let[X,K]=w.location;if(K<0&&(K=en.current.y),s.fillHandle===!0&&((W=s.previousSelection)==null?void 0:W.current)!==void 0){const Q=s.previousSelection.current.range;K=Math.min(K,jt?Ke-1:Ke);const re=Ep(Q,X,K,dn);Ia(re)}else{if(jt&&Z===Ke)return;if(jt&&K===Ke)if(w.kind===aa)K--;else return;X=Math.max(X,Y);const ye=ko(Z);K=ye===void 0?K:Nn(K,ye[0],ye[1]);const _e=X-B,Ce=K-Z,Fe={x:_e>=0?B:X,y:Ce>=0?Z:K,width:Math.abs(_e)+1,height:Math.abs(Ce)+1};xt({...G.current,range:Fe},!0,!1,"drag")}}Yt==null||Yt({...w,location:[w.location[0]-Y,w.location[1]]})}},[s,Y,le,G,Mt,Yt,ke,jt,Ke,dn,ko,xt]),Hf=g.useCallback(()=>{var X,K;const w=Fa.current;if(w===void 0)return;const[A,F]=w.scrollEdge;let[W,B]=w.location;const Z=en.current;A===-1?W=((K=(X=Z.extras)==null?void 0:X.freezeRegion)==null?void 0:K.x)??Z.x:A===1&&(W=Z.x+Z.width),F===-1?B=Math.max(0,Z.y):F===1&&(B=Math.min(Ke-1,Z.y+Z.height)),W=Nn(W,0,Ct.length-1),B=Nn(B,0,Ke-1),Aa({...w,location:[W,B]})},[Ct.length,Aa,Ke]);L0(If,Ut,Hf);const Kn=g.useCallback(w=>{if(G.current===void 0)return;const[A,F]=w,[W,B]=G.current.cell,Z=G.current.range;let X=Z.x,K=Z.x+Z.width,Q=Z.y,re=Z.y+Z.height;const[ye,_e]=ko(B)??[0,Ke-1],Ce=_e+1;if(F!==0)switch(F){case 2:{re=Ce,Q=B,rn(0,re,"vertical");break}case-2:{Q=ye,re=B+1,rn(0,Q,"vertical");break}case 1:{Q<B?(Q++,rn(0,Q,"vertical")):(re=Math.min(Ce,re+1),rn(0,re,"vertical"));break}case-1:{re>B+1?(re--,rn(0,re,"vertical")):(Q=Math.max(ye,Q-1),rn(0,Q,"vertical"));break}default:Qi()}if(A!==0)if(A===2)K=Ct.length,X=W,rn(K-1-Y,0,"horizontal");else if(A===-2)X=Y,K=W+1,rn(X-Y,0,"horizontal");else{let Fe=[];if(ln!==void 0){const De=ln({x:X,y:Q,width:K-X-Y,height:re-Q},sn.current.signal);typeof De=="object"&&(Fe=U0(De))}if(A===1){let De=!1;if(X<W){if(Fe.length>0){const gt=ar(X+1,W+1).find(Ue=>!Fe.includes(Ue-Y));gt!==void 0&&(X=gt,De=!0)}else X++,De=!0;De&&rn(X,0,"horizontal")}De||(K=Math.min(Ct.length,K+1),rn(K-1-Y,0,"horizontal"))}else if(A===-1){let De=!1;if(K>W+1){if(Fe.length>0){const gt=ar(K-1,W,-1).find(Ue=>!Fe.includes(Ue-Y));gt!==void 0&&(K=gt,De=!0)}else K--,De=!0;De&&rn(K-Y,0,"horizontal")}De||(X=Math.max(Y,X-1),rn(X-Y,0,"horizontal"))}else Qi()}xt({cell:G.current.cell,range:{x:X,y:Q,width:K-X,height:re-Q}},!0,!1,"keyboard-select")},[ln,ko,G,Ct.length,Y,Ke,rn,xt]),Ha=g.useRef(vi);Ha.current=vi;const kr=g.useCallback((w,A,F,W)=>{const B=bn-(F?0:1);w=Nn(w,Y,Kt.length-1+Y),A=Nn(A,0,B);const Z=rr==null?void 0:rr[0],X=rr==null?void 0:rr[1];if(w===Z&&A===X)return!1;if(W&&G.current!==void 0){const K=[...G.current.rangeStack];(G.current.range.width>1||G.current.range.height>1)&&K.push(G.current.range),Se({...G,current:{cell:[w,A],range:{x:w,y:A,width:1,height:1},rangeStack:K}},!0)}else xt({cell:[w,A],range:{x:w,y:A,width:1,height:1}},!0,!1,"keyboard-nav");return c.current!==void 0&&c.current[0]===w&&c.current[1]===A&&(c.current=void 0),Ha.current&&rn(w-Y,A),!0},[bn,Y,Kt.length,rr,G,rn,Se,xt]),zf=g.useCallback((w,A)=>{(i==null?void 0:i.cell)!==void 0&&w!==void 0&&si(w)&&(zn([{location:i.cell,value:w}]),window.requestAnimationFrame(()=>{var B;(B=Rn.current)==null||B.damage([{cell:i.cell}])})),Cn(!0),o(void 0);const[F,W]=A;if(G.current!==void 0&&(F!==0||W!==0)){const B=G.current.cell[1]===bn-1&&w!==void 0;kr(Nn(G.current.cell[0]+F,0,Ct.length-1),Nn(G.current.cell[1]+W,0,bn-1),B,!1)}_==null||_(w,A)},[i==null?void 0:i.cell,Cn,G,_,zn,bn,kr,Ct.length]),Vf=g.useMemo(()=>`gdg-overlay-${W0++}`,[]),zr=g.useCallback(w=>{var F,W,B,Z;Cn();const A=[];for(let X=w.x;X<w.x+w.width;X++)for(let K=w.y;K<w.y+w.height;K++){const Q=R([X-Y,K]);if(!Q.allowOverlay&&Q.kind!==te.Boolean)continue;let re;if(Q.kind===te.Custom){const ye=yt(Q),_e=(F=ye==null?void 0:ye.provideEditor)==null?void 0:F.call(ye,Q);(ye==null?void 0:ye.onDelete)!==void 0?re=ye.onDelete(Q):wg(_e)&&(re=(W=_e==null?void 0:_e.deletedValue)==null?void 0:W.call(_e,Q))}else if(si(Q)&&Q.allowOverlay||Q.kind===te.Boolean){const ye=yt(Q);re=(B=ye==null?void 0:ye.onDelete)==null?void 0:B.call(ye,Q)}re!==void 0&&!ui(re)&&si(re)&&A.push({location:[X,K],value:re})}zn(A),(Z=Rn.current)==null||Z.damage(A.map(X=>({cell:X.location})))},[Cn,R,yt,zn,Y]),Ii=i!==void 0,vl=g.useCallback(w=>{var gt,Ue;const A=()=>{w.stopPropagation(),w.preventDefault()},F={didMatch:!1},{bounds:W}=w,B=G.columns,Z=G.rows,X=An;if(!Ii&&ut(X.clear,w,F))Se(Vo,!1),mt==null||mt();else if(!Ii&&ut(X.selectAll,w,F))Se({columns:bt.empty(),rows:bt.empty(),current:{cell:((gt=G.current)==null?void 0:gt.cell)??[Y,0],range:{x:Y,y:0,width:y.length,height:Ke},rangeStack:[]}},!1);else if(ut(X.search,w,F))(Ue=a==null?void 0:a.current)==null||Ue.focus({preventScroll:!0}),Qr(!0);else if(ut(X.delete,w,F)){const Le=(Te==null?void 0:Te(G))??!0;if(Le!==!1){const kt=Le===!0?G:Le;if(kt.current!==void 0){zr(kt.current.range);for(const Xt of kt.current.rangeStack)zr(Xt)}for(const Xt of kt.rows)zr({x:Y,y:Xt,width:y.length,height:1});for(const Xt of kt.columns)zr({x:Xt,y:0,width:1,height:Ke})}}if(F.didMatch)return A(),!0;if(G.current===void 0)return!1;let[K,Q]=G.current.cell;const[,re]=G.current.cell;let ye=!1,_e=!1;if(ut(X.scrollToSelectedCell,w,F)?Eo.current(K-Y,Q):Qe!=="none"&&ut(X.selectColumn,w,F)?B.hasIndex(K)?Ze(B.remove(K),void 0,!0):Qe==="single"?Ze(bt.fromSingleSelection(K),void 0,!0):Ze(void 0,K,!0):le!=="none"&&ut(X.selectRow,w,F)?Z.hasIndex(Q)?ke(Z.remove(Q),void 0,!0):le==="single"?ke(bt.fromSingleSelection(Q),void 0,!0):ke(void 0,Q,!0):!Ii&&W!==void 0&&ut(X.activateCell,w,F)?Q===Ke&&jt?window.setTimeout(()=>{const Le=So(K);ni(Le??K)},0):(S==null||S([K-Y,Q]),ti(W,!0)):G.current.range.height>1&&ut(X.downFill,w,F)?ml():G.current.range.width>1&&ut(X.rightFill,w,F)?gl():ut(X.goToNextPage,w,F)?Q+=Math.max(1,en.current.height-4):ut(X.goToPreviousPage,w,F)?Q-=Math.max(1,en.current.height-4):ut(X.goToFirstCell,w,F)?(o(void 0),Q=0,K=0):ut(X.goToLastCell,w,F)?(o(void 0),Q=Number.MAX_SAFE_INTEGER,K=Number.MAX_SAFE_INTEGER):ut(X.selectToFirstCell,w,F)?(o(void 0),Kn([-2,-2])):ut(X.selectToLastCell,w,F)?(o(void 0),Kn([2,2])):Ii?(ut(X.closeOverlay,w,F)&&o(void 0),ut(X.acceptOverlayDown,w,F)&&(o(void 0),Q++),ut(X.acceptOverlayUp,w,F)&&(o(void 0),Q--),ut(X.acceptOverlayLeft,w,F)&&(o(void 0),K--),ut(X.acceptOverlayRight,w,F)&&(o(void 0),K++)):(ut(X.goDownCell,w,F)?Q+=1:ut(X.goUpCell,w,F)?Q-=1:ut(X.goRightCell,w,F)?K+=1:ut(X.goLeftCell,w,F)?K-=1:ut(X.goDownCellRetainSelection,w,F)?(Q+=1,ye=!0):ut(X.goUpCellRetainSelection,w,F)?(Q-=1,ye=!0):ut(X.goRightCellRetainSelection,w,F)?(K+=1,ye=!0):ut(X.goLeftCellRetainSelection,w,F)?(K-=1,ye=!0):ut(X.goToLastRow,w,F)?Q=Ke-1:ut(X.goToFirstRow,w,F)?Q=Number.MIN_SAFE_INTEGER:ut(X.goToLastColumn,w,F)?K=Number.MAX_SAFE_INTEGER:ut(X.goToFirstColumn,w,F)?K=Number.MIN_SAFE_INTEGER:(Mt==="rect"||Mt==="multi-rect")&&(ut(X.selectGrowDown,w,F)?Kn([0,1]):ut(X.selectGrowUp,w,F)?Kn([0,-1]):ut(X.selectGrowRight,w,F)?Kn([1,0]):ut(X.selectGrowLeft,w,F)?Kn([-1,0]):ut(X.selectToLastRow,w,F)?Kn([0,2]):ut(X.selectToFirstRow,w,F)?Kn([0,-2]):ut(X.selectToLastColumn,w,F)?Kn([2,0]):ut(X.selectToFirstColumn,w,F)&&Kn([-2,0])),_e=F.didMatch),Gn!==void 0&&Gn!=="normal"&&Q!==re){const Le=Gn==="skip-up"||Gn==="skip"||Gn==="block",kt=Gn==="skip-down"||Gn==="skip"||Gn==="block",Xt=Q<re;if(Xt&&Le){for(;Q>=0&&Ar(Q).isGroupHeader;)Q--;Q<0&&(Q=re)}else if(!Xt&&kt){for(;Q<Ke&&Ar(Q).isGroupHeader;)Q++;Q>=Ke&&(Q=re)}}const Fe=kr(K,Q,!1,ye),De=F.didMatch;return De&&(Fe||!_e||Jt)&&A(),De},[Gn,Ii,G,An,Qe,le,Mt,Y,Ar,Ke,kr,Se,mt,y.length,Te,Jt,zr,Ze,ke,jt,So,ni,S,ti,ml,gl,Kn]),Ti=g.useCallback(w=>{let A=!1;if(q!==void 0&&q({...w,cancel:()=>{A=!0}}),A||vl(w)||G.current===void 0)return;const[F,W]=G.current.cell,B=en.current;if(ze&&!w.metaKey&&!w.ctrlKey&&G.current!==void 0&&w.key.length===1&&/[ -~]/g.test(w.key)&&w.bounds!==void 0&&Yi(R([F-Y,Math.max(0,Math.min(W,Ke-1))]))){if((!jt||W!==Ke)&&(B.y>W||W>B.y+B.height||B.x>F||F>B.x+B.width))return;ti(w.bounds,!0,w.key),w.stopPropagation(),w.preventDefault()}},[ze,q,vl,G,R,Y,Ke,jt,ti]),$f=g.useCallback((w,A)=>{const F=w.location[0]-Y;if(w.kind==="header"&&(oe==null||oe(F,{...w,preventDefault:A})),w.kind===Wn){if(F<0)return;j==null||j(F,{...w,preventDefault:A})}if(w.kind==="cell"){const[W,B]=w.location;N==null||N([F,B],{...w,preventDefault:A}),Sm(G,w.location)||kr(W,B,!1,!1)}},[G,N,j,oe,Y,kr]),za=g.useCallback(async w=>{var X,K,Q;if(!An.paste)return;function A(re,ye,_e,Ce){var De,gt;const Fe=typeof _e=="object"?(_e==null?void 0:_e.join(`
|
173
|
+
`))??"":(_e==null?void 0:_e.toString())??"";if(!ui(re)&&Yi(re)&&re.readonly!==!0){const Ue=E==null?void 0:E(Fe,re);if(Ue!==void 0&&si(Ue))return{location:ye,value:Ue};const Le=yt(re);if(Le===void 0)return;if(Le.kind===te.Custom){Pn(re.kind===te.Custom);const kt=(De=Le.onPaste)==null?void 0:De.call(Le,Fe,re.data);return kt===void 0?void 0:{location:ye,value:{...re,data:kt}}}else{const kt=(gt=Le.onPaste)==null?void 0:gt.call(Le,Fe,re,{formatted:Ce,formattedString:typeof Ce=="string"?Ce:Ce==null?void 0:Ce.join(`
|
174
|
+
`),rawValue:_e});return kt===void 0?void 0:(Pn(kt.kind===re.kind),{location:ye,value:kt})}}}const F=G.columns,W=G.rows,B=((X=Ut.current)==null?void 0:X.contains(document.activeElement))===!0||((K=l.current)==null?void 0:K.contains(document.activeElement))===!0;let Z;if(G.current!==void 0?Z=[G.current.range.x,G.current.range.y]:F.length===1?Z=[F.first()??0,0]:W.length===1&&(Z=[Y,W.first()??0]),B&&Z!==void 0){let re,ye;const _e="text/plain",Ce="text/html";if(navigator.clipboard.read!==void 0){const Ue=await navigator.clipboard.read();for(const Le of Ue){if(Le.types.includes(Ce)){const Xt=await(await Le.getType(Ce)).text(),on=ku(Xt);if(on!==void 0){re=on;break}}Le.types.includes(_e)&&(ye=await(await Le.getType(_e)).text())}}else if(navigator.clipboard.readText!==void 0)ye=await navigator.clipboard.readText();else if(w!==void 0&&(w==null?void 0:w.clipboardData)!==null){if(w.clipboardData.types.includes(Ce)){const Ue=w.clipboardData.getData(Ce);re=ku(Ue)}re===void 0&&w.clipboardData.types.includes(_e)&&(ye=w.clipboardData.getData(_e))}else return;const[Fe,De]=Z,gt=[];do{if(nt===void 0){const Ue=Dn(Z),Le=ye??(re==null?void 0:re.map(Xt=>Xt.map(on=>on.rawValue).join(" ")).join(" "))??"",kt=A(Ue,Z,Le,void 0);kt!==void 0&>.push(kt);break}if(re===void 0){if(ye===void 0)return;re=E0(ye)}if(nt===!1||typeof nt=="function"&&(nt==null?void 0:nt([Z[0]-Y,Z[1]],re.map(Ue=>Ue.map(Le=>{var kt;return((kt=Le.rawValue)==null?void 0:kt.toString())??""}))))!==!0)return;for(const[Ue,Le]of re.entries()){if(Ue+De>=Ke)break;for(const[kt,Xt]of Le.entries()){const on=[kt+Fe,Ue+De],[Zn,ir]=on;if(Zn>=Ct.length||ir>=bn)continue;const Jn=Dn(on),or=A(Jn,on,Xt.rawValue,Xt.formatted);or!==void 0&>.push(or)}}}while(!1);zn(gt),(Q=Rn.current)==null||Q.damage(gt.map(Ue=>({cell:Ue.location})))}},[E,yt,Dn,G,An.paste,Ut,Ct.length,zn,bn,nt,Y,Ke]);gn("paste",za,d,!1,!0);const Di=g.useCallback(async(w,A)=>{var X,K;if(!An.copy)return;const F=A===!0||((X=Ut.current)==null?void 0:X.contains(document.activeElement))===!0||((K=l.current)==null?void 0:K.contains(document.activeElement))===!0,W=G.columns,B=G.rows,Z=(Q,re)=>{if(!pe)Ru(Q,re,w);else{const ye=re.map(_e=>({kind:te.Text,data:y[_e].title,displayData:y[_e].title,allowOverlay:!1}));Ru([ye,...Q],re,w)}};if(F&&ln!==void 0){if(G.current!==void 0){let Q=ln(G.current.range,sn.current.signal);typeof Q!="object"&&(Q=await Q()),Z(Q,ar(G.current.range.x-Y,G.current.range.x+G.current.range.width-Y))}else if(B!==void 0&&B.length>0){const re=[...B].map(ye=>{const _e=ln({x:Y,y:ye,width:y.length,height:1},sn.current.signal);return typeof _e=="object"?_e[0]:_e().then(Ce=>Ce[0])});if(re.some(ye=>ye instanceof Promise)){const ye=await Promise.all(re);Z(ye,ar(y.length))}else Z(re,ar(y.length))}else if(W.length>0){const Q=[],re=[];for(const ye of W){let _e=ln({x:ye,y:0,width:1,height:Ke},sn.current.signal);typeof _e!="object"&&(_e=await _e()),Q.push(_e),re.push(ye-Y)}if(Q.length===1)Z(Q[0],re);else{const ye=Q.reduce((_e,Ce)=>_e.map((Fe,De)=>[...Fe,...Ce[De]]));Z(ye,re)}}}},[y,ln,G,An.copy,Y,Ut,Ke,pe]);gn("copy",Di,d,!1,!1);const Nf=g.useCallback(async w=>{var F,W;if(!(!An.cut||!(((F=Ut.current)==null?void 0:F.contains(document.activeElement))===!0||((W=l.current)==null?void 0:W.contains(document.activeElement))===!0))&&(await Di(w),G.current!==void 0)){let B={current:{cell:G.current.cell,range:G.current.range,rangeStack:[]},rows:bt.empty(),columns:bt.empty()};const Z=Te==null?void 0:Te(B);if(Z===!1||(B=Z===!0?B:Z,B.current===void 0))return;zr(B.current.range)}},[zr,G,An.cut,Di,Ut,Te]);gn("cut",Nf,d,!1,!1);const Bf=g.useCallback((w,A)=>{if(ge!==void 0){Y!==0&&(w=w.map(B=>[B[0]-Y,B[1]])),ge(w,A);return}if(w.length===0||A===-1)return;const[F,W]=w[A];c.current!==void 0&&c.current[0]===F&&c.current[1]===W||(c.current=[F,W],kr(F,W,!1,!1))},[ge,Y,kr]),[Mo,Ro]=((kl=Lt==null?void 0:Lt.current)==null?void 0:kl.cell)??[],Eo=g.useRef(rn);Eo.current=rn,g.useLayoutEffect(()=>{var w,A,F,W;Ha.current&&!Cr.current&&Mo!==void 0&&Ro!==void 0&&(Mo!==((A=(w=ae.current)==null?void 0:w.current)==null?void 0:A.cell[0])||Ro!==((W=(F=ae.current)==null?void 0:F.current)==null?void 0:W.cell[1]))&&Eo.current(Mo,Ro),Cr.current=!1},[Mo,Ro]);const bl=G.current!==void 0&&(G.current.cell[0]>=Ct.length||G.current.cell[1]>=bn);g.useLayoutEffect(()=>{bl&&Se(Vo,!1)},[bl,Se]);const Wf=g.useMemo(()=>jt===!0&&(Pe==null?void 0:Pe.tint)===!0?bt.fromSingleSelection(bn-1):bt.empty(),[bn,jt,Pe==null?void 0:Pe.tint]),Uf=g.useCallback(w=>typeof st=="boolean"?st:(st==null?void 0:st(w-Y))??!0,[Y,st]),qf=g.useMemo(()=>{if(Oa===void 0||l.current===null)return null;const{bounds:w,group:A}=Oa,F=l.current.getBoundingClientRect();return g.createElement(p0,{bounds:w,group:A,canvasBounds:F,onClose:()=>Pa(void 0),onFinish:W=>{Pa(void 0),ne==null||ne(A,W)}})},[ne,Oa]),Yf=Math.min(Ct.length,Ee+(Hn?1:0));g.useImperativeHandle(t,()=>({appendRow:(w,A)=>ni(w+Y,A),updateCells:w=>{var A;return Y!==0&&(w=w.map(F=>({cell:[F.cell[0]+Y,F.cell[1]]}))),(A=Rn.current)==null?void 0:A.damage(w)},getBounds:(w,A)=>{var F;if(!((l==null?void 0:l.current)===null||(Ut==null?void 0:Ut.current)===null)){if(w===void 0&&A===void 0){const W=l.current.getBoundingClientRect(),B=W.width/Ut.current.clientWidth;return{x:W.x-Ut.current.scrollLeft*B,y:W.y-Ut.current.scrollTop*B,width:Ut.current.scrollWidth*B,height:Ut.current.scrollHeight*B}}return(F=Rn.current)==null?void 0:F.getBounds((w??0)+Y,A)}},focus:()=>{var w;return(w=Rn.current)==null?void 0:w.focus()},emit:async w=>{switch(w){case"delete":Ti({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":Ti({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":Ti({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 Di(void 0,!0);break;case"paste":await za();break}},scrollTo:rn,remeasureColumns:w=>{for(const A of w)xo(A+Y)}}),[ni,xo,Ut,Di,Ti,za,Y,rn]);const[wl,yl]=rr??[],Xf=g.useCallback(w=>{const[A,F]=w;if(F===-1){Qe!=="none"&&(Ze(bt.fromSingleSelection(A),void 0,!1),Cn());return}wl===A&&yl===F||(xt({cell:w,range:{x:A,y:F,width:1,height:1}},!0,!1,"keyboard-nav"),rn(A,F))},[Qe,Cn,rn,wl,yl,xt,Ze]),[jf,Gf]=g.useState(!1),Cl=g.useRef(Uc(w=>{Gf(w)},5)),Kf=g.useCallback(()=>{Cl.current(!0),G.current===void 0&&G.columns.length===0&&G.rows.length===0&&s===void 0&&xt({cell:[Y,vo],range:{x:Y,y:vo,width:1,height:1}},!0,!1,"keyboard-select")},[vo,G,s,Y,xt]),Zf=g.useCallback(()=>{Cl.current(!1)},[]),[Jf,Qf]=g.useMemo(()=>{let w;const A=(At==null?void 0:At.scrollbarWidthOverride)??bs(),F=Ke+(jt?1:0);if(typeof Xn=="number")w=Et+F*Xn;else{let B=0;const Z=Math.min(F,10);for(let X=0;X<Z;X++)B+=Xn(X);B=Math.floor(B/Z),w=Et+F*B}w+=A;const W=Ct.reduce((B,Z)=>Z.width+B,0)+A;return[`${Math.min(1e5,W)}px`,`${Math.min(1e5,w)}px`]},[Ct,At==null?void 0:At.scrollbarWidthOverride,Xn,Ke,jt,Et]),eh=g.useMemo(()=>Am(We),[We]);return g.createElement(gd.Provider,{value:We},g.createElement(O0,{style:eh,className:U,inWidth:p??Jf,inHeight:v??Qf},g.createElement(f0,{fillHandle:$t,drawFocusRing:Pr,experimental:At,fixedShadowX:Nt,fixedShadowY:he,getRowThemeOverride:Fn,headerIcons:lt,imageWindowLoader:un,initialSize:hn,isDraggable:z,onDragLeave:et,onRowMoved:$e,overscrollX:ka,overscrollY:Ma,preventDiagonalScrolling:Zt,rightElement:qn,rightElementProps:In,smoothScrollX:Ln,smoothScrollY:Yn,className:U,enableGroups:yn,onCanvasFocused:Kf,onCanvasBlur:Zf,canvasRef:l,onContextMenu:$f,theme:We,cellXOffset:Mf,cellYOffset:vo,accessibilityHeight:Lr.height,onDragEnd:Af,columns:Ct,nonGrowWidth:jn,drawHeader:it,onColumnProposeMove:I,drawCell:ot,disabledRows:Wf,freezeColumns:Yf,lockColumns:Y,firstColAccessible:Y===0,getCellContent:Dn,minColumnWidth:nr,maxColumnWidth:_r,searchInputRef:a,showSearch:xi,onSearchClose:Ra,highlightRegions:Rf,getCellsForSelection:ln,getGroupDetails:Ta,headerHeight:Si,isFocused:jf,groupHeaderHeight:yn?mo:0,freezeTrailingRows:Ft+(jt&&(Pe==null?void 0:Pe.sticky)===!0?1:0),hasAppendRow:jt,onColumnResize:xe,onColumnResizeEnd:de,onColumnResizeStart:Re,onCellFocused:Xf,onColumnMoved:Lf,onDragStart:Ff,onHeaderMenuClick:Of,onHeaderIndicatorClick:Pf,onItemHovered:Aa,isFilling:(s==null?void 0:s.fillHandle)===!0,onMouseMove:Df,onKeyDown:Ti,onKeyUp:fe,onMouseDown:Ef,onMouseUp:Tf,onDragOverCell:zt,onDrop:Dt,onSearchResultsChanged:Bf,onVisibleRegionChanged:_f,clientSize:ft,rowHeight:Xn,searchResults:J,searchValue:P,onSearchValueChange:H,rows:bn,scrollRef:Ut,selection:G,translateX:Lr.tx,translateY:Lr.ty,verticalBorder:Uf,gridRef:Rn,getCellRenderer:yt,resizeIndicator:xa}),qf,i!==void 0&&g.createElement(g.Suspense,{fallback:null},g.createElement(B0,{...i,validateCell:$,bloom:D,id:Vf,getCellRenderer:yt,className:(At==null?void 0:At.isSubGrid)===!0?"click-outside-ignore":void 0,provideEditor:pn,imageEditorOverride:f,onFinishEditing:zf,markdownDivCreateNode:m,isOutsideClick:br}))))},Y0=g.forwardRef(q0),Od=20;function Tu(e){const{cell:t,posX:n,posY:r,bounds:i,theme:o}=e,{width:a,height:l,x:s,y:u}=i,c=t.maxSize??Od,d=Math.floor(i.y+l/2),f=Xc(c,l,o.cellVerticalPadding),h=Yc(t.contentAlign??"center",s,a,o.cellHorizontalPadding,f),m=qc(h,d,f),p=jc(s+n,u+r,m);return _s(t)&&p}const X0={getAccessibilityString:e=>{var t;return((t=e.data)==null?void 0:t.toString())??"false"},kind:te.Boolean,needsHover:!0,useLabel:!1,needsHoverPosition:!0,measure:()=>50,draw:e=>j0(e,e.cell.data,_s(e.cell),e.cell.maxSize??Od,e.cell.hoverEffectIntensity??.35),onDelete:e=>({...e,data:!1}),onSelect:e=>{Tu(e)&&e.preventDefault()},onClick:e=>{if(Tu(e))return{...e.cell,data:Id(e.cell.data)}},onPaste:(e,t)=>{let n=Qo;return e.toLowerCase()==="true"?n=!0:e.toLowerCase()==="false"?n=!1:e.toLowerCase()==="indeterminate"&&(n=Ps),n===t.data?void 0:{...t,data:n}}};function j0(e,t,n,r,i){if(!n&&t===Qo)return;const{ctx:o,hoverAmount:a,theme:l,rect:s,highlighted:u,hoverX:c,hoverY:d,cell:{contentAlign:f}}=e,{x:h,y:m,width:p,height:v}=s;let y=!1;if(i>0){let b=n?1-i+i*a:.4;if(t===Qo&&(b*=a),b===0)return;b<1&&(y=!0,o.globalAlpha=b)}Ws(o,l,t,h,m,p,v,u,c,d,r,f),y&&(o.globalAlpha=1)}const G0=mn("div")({name:"BubblesOverlayEditorStyle",class:"gdg-b1ygi5by",propsAsIs:!1}),K0=e=>{const{bubbles:t}=e;return g.createElement(G0,null,t.map((n,r)=>g.createElement("div",{key:r,className:"boe-bubble"},n)),g.createElement("textarea",{className:"gdg-input",autoFocus:!0}))},Z0={getAccessibilityString:e=>Gc(e.data),kind:te.Bubble,needsHover:!1,useLabel:!1,needsHoverPosition:!1,measure:(e,t,n)=>t.data.reduce((r,i)=>e.measureText(i).width+r+20,0)+2*n.cellHorizontalPadding-4,draw:e=>Q0(e,e.cell.data),provideEditor:()=>e=>{const{value:t}=e;return g.createElement(K0,{bubbles:t.data})},onPaste:()=>{}},J0=4;function Q0(e,t){const{rect:n,theme:r,ctx:i,highlighted:o}=e,{x:a,y:l,width:s,height:u}=n,c=20,d=8,f=J0;let h=a+r.cellHorizontalPadding;const m=[];for(const p of t){if(h>a+s)break;const v=jr(p,i,r.baseFontFull).width;m.push({x:h,width:v}),h+=v+d*2+f}i.beginPath();for(const p of m)lr(i,p.x,l+(u-c)/2,p.width+d*2,c,r.roundingRadius??c/2);i.fillStyle=o?r.bgBubbleSelected:r.bgBubble,i.fill();for(const[p,v]of m.entries())i.beginPath(),i.fillStyle=r.textBubble,i.fillText(t[p],v.x+d,l+u/2+ur(i,r))}const ev=mn("div")({name:"DrilldownOverlayEditorStyle",class:"gdg-d4zsq0x",propsAsIs:!1}),tv=e=>{const{drilldowns:t}=e;return g.createElement(ev,null,t.map((n,r)=>g.createElement("div",{key:r,className:"doe-bubble"},n.img!==void 0&&g.createElement("img",{src:n.img}),g.createElement("div",null,n.text))))},nv={getAccessibilityString:e=>Gc(e.data.map(t=>t.text)),kind:te.Drilldown,needsHover:!1,useLabel:!1,needsHoverPosition:!1,measure:(e,t,n)=>t.data.reduce((r,i)=>e.measureText(i.text).width+r+20+(i.img!==void 0?18:0),0)+2*n.cellHorizontalPadding-4,draw:e=>ov(e,e.cell.data),provideEditor:()=>e=>{const{value:t}=e;return g.createElement(tv,{drilldowns:t.data})},onPaste:()=>{}},rv=4,os={};function iv(e,t,n,r){const i=Math.ceil(window.devicePixelRatio),o=5,a=n-o*2,l=4,s=n*i,u=r+o,c=r*3,d=(c+o*2)*i,f=`${e},${t},${i},${n}`;if(os[f]!==void 0)return{el:os[f],height:s,width:d,middleWidth:l*i,sideWidth:u*i,padding:o*i,dpr:i};const h=document.createElement("canvas"),m=h.getContext("2d");return m===null?null:(h.width=d,h.height=s,m.scale(i,i),os[f]=h,m.beginPath(),lr(m,o,o,c,a,r),m.shadowColor="rgba(24, 25, 34, 0.4)",m.shadowBlur=1,m.fillStyle=e,m.fill(),m.shadowColor="rgba(24, 25, 34, 0.3)",m.shadowOffsetY=1,m.shadowBlur=5,m.fillStyle=e,m.fill(),m.shadowOffsetY=0,m.shadowBlur=0,m.shadowBlur=0,m.beginPath(),lr(m,o+.5,o+.5,c,a,r),m.strokeStyle=t,m.lineWidth=1,m.stroke(),{el:h,height:s,width:d,sideWidth:u*i,middleWidth:r*i,padding:o*i,dpr:i})}function ov(e,t){const{rect:n,theme:r,ctx:i,imageLoader:o,col:a,row:l}=e,{x:s,width:u}=n,c=r.baseFontFull,d=ud(i,c),f=Math.min(n.height,Math.max(16,Math.ceil(d*r.lineHeight)*2)),h=Math.floor(n.y+(n.height-f)/2),m=f-10,p=8,v=rv;let y=s+r.cellHorizontalPadding;const b=r.roundingRadius??6,R=iv(r.bgCell,r.drilldownBorder,f,b),O=[];for(const S of t){if(y>s+u)break;const _=jr(S.text,i,c).width;let E=0;S.img!==void 0&&o.loadOrGetImage(S.img,a,l)!==void 0&&(E=m-8+4);const x=_+E+p*2;O.push({x:y,width:x}),y+=x+v}if(R!==null){const{el:S,height:M,middleWidth:_,sideWidth:E,width:x,dpr:L,padding:D}=R,C=E/L,I=D/L;for(const T of O){const k=Math.floor(T.x),V=Math.floor(T.width),N=V-(C-I)*2;i.imageSmoothingEnabled=!1,i.drawImage(S,0,0,E,M,k-I,h,C,f),N>0&&i.drawImage(S,E,0,_,M,k+(C-I),h,N,f),i.drawImage(S,x-E,0,E,M,k+V-(C-I),h,C,f),i.imageSmoothingEnabled=!0}}i.beginPath();for(const[S,M]of O.entries()){const _=t[S];let E=M.x+p;if(_.img!==void 0){const x=o.loadOrGetImage(_.img,a,l);if(x!==void 0){const L=m-8;let D=0,C=0,I=x.width,T=x.height;I>T?(D+=(I-T)/2,I=T):T>I&&(C+=(T-I)/2,T=I),i.beginPath(),lr(i,E,h+f/2-L/2,L,L,r.roundingRadius??3),i.save(),i.clip(),i.drawImage(x,D,C,I,T,E,h+f/2-L/2,L,L),i.restore(),E+=L+4}}i.beginPath(),i.fillStyle=r.textBubble,i.fillText(_.text,E,h+f/2+ur(i,r))}}const av={getAccessibilityString:e=>e.data.join(", "),kind:te.Image,needsHover:!1,useLabel:!1,needsHoverPosition:!1,draw:e=>sv(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:r}=e,i=r??Yg;return g.createElement(i,{urls:t.data,canWrite:t.readonly!==!0,onCancel:n,onChange:o=>{n({...t,data:[o]})}})},onPaste:(e,t)=>{e=e.trim();const r=e.split(",").map(i=>{try{return new URL(i),i}catch{return}}).filter(i=>i!==void 0);if(!(r.length===t.data.length&&r.every((i,o)=>i===t.data[o])))return{...t,data:r}}},as=4;function sv(e,t,n,r){const{rect:i,col:o,row:a,theme:l,ctx:s,imageLoader:u}=e,{x:c,y:d,height:f,width:h}=i,m=f-l.cellVerticalPadding*2,p=[];let v=0;for(let b=0;b<t.length;b++){const R=t[b];if(R.length===0)continue;const O=u.loadOrGetImage(R,o,a);if(O!==void 0){p[b]=O;const S=O.width*(m/O.height);v+=S+as}}if(v===0)return;v-=as;let y=c+l.cellHorizontalPadding;r==="right"?y=Math.floor(c+h-l.cellHorizontalPadding-v):r==="center"&&(y=Math.floor(c+h/2-v/2));for(const b of p){if(b===void 0)continue;const R=b.width*(m/b.height);n>0&&(s.beginPath(),lr(s,y,d+l.cellVerticalPadding,R,m,n),s.save(),s.clip()),s.drawImage(b,y,d+l.cellVerticalPadding,R,m),n>0&&s.restore(),y+=R+as}}function lv(e,t){let n=e*49632+t*325176;return n^=n<<13,n^=n>>17,n^=n<<5,n/4294967295*2}const uv={getAccessibilityString:()=>"",kind:te.Loading,needsHover:!1,useLabel:!1,needsHoverPosition:!1,measure:()=>120,draw:e=>{const{cell:t,col:n,row:r,ctx:i,rect:o,theme:a}=e;if(t.skeletonWidth===void 0||t.skeletonWidth===0)return;let l=t.skeletonWidth;t.skeletonWidthVariability!==void 0&&t.skeletonWidthVariability>0&&(l+=Math.round(lv(n,r)*t.skeletonWidthVariability));const s=a.cellHorizontalPadding;l+s*2>=o.width&&(l=o.width-s*2-1);const u=t.skeletonHeight??Math.min(18,o.height-2*a.cellVerticalPadding);lr(i,o.x+s,o.y+(o.height-u)/2,l,u,a.roundingRadius??3),i.fillStyle=Ur(a.textDark,.1),i.fill()},onPaste:()=>{}},cv=()=>e=>e.targetWidth,Du=mn("div")({name:"MarkdownOverlayEditorStyle",class:"gdg-m1pnx84e",propsAsIs:!1,vars:{"m1pnx84e-0":[cv(),"px"]}}),dv=e=>{const{value:t,onChange:n,forceEditMode:r,createNode:i,targetRect:o,onFinish:a,validatedSelection:l}=e,s=t.data,u=t.readonly===!0,[c,d]=g.useState(s===""||r),f=g.useCallback(()=>{d(m=>!m)},[]),h=s?"gdg-ml-6":"";return c?g.createElement(Du,{targetWidth:o.width-20},g.createElement(Yr,{autoFocus:!0,highlight:!1,validatedSelection:l,value:s,onKeyDown:m=>{m.key==="Enter"&&m.stopPropagation()},onChange:n}),g.createElement("div",{className:`gdg-edit-icon gdg-checkmark-hover ${h}`,onClick:()=>a(t)},g.createElement(Vg,null))):g.createElement(Du,{targetWidth:o.width},g.createElement(dm,{contents:s,createNode:i}),!u&&g.createElement(g.Fragment,null,g.createElement("div",{className:"spacer"}),g.createElement("div",{className:`gdg-edit-icon gdg-edit-hover ${h}`,onClick:f},g.createElement(Fs,null))),g.createElement("textarea",{className:"gdg-md-edit-textarea gdg-input",autoFocus:!0}))},fv={getAccessibilityString:e=>{var t;return((t=e.data)==null?void 0:t.toString())??""},kind:te.Markdown,needsHover:!1,needsHoverPosition:!1,drawPrep:ao,measure:(e,t,n)=>{const r=t.data.split(`
|
175
|
+
`)[0];return e.measureText(r).width+2*n.cellHorizontalPadding},draw:e=>sr(e,e.cell.data,e.cell.contentAlign),onDelete:e=>({...e,data:""}),provideEditor:()=>e=>{const{onChange:t,value:n,target:r,onFinishedEditing:i,markdownDivCreateNode:o,forceEditMode:a,validatedSelection:l}=e;return g.createElement(dv,{onFinish:i,targetRect:r,value:n,validatedSelection:l,onChange:s=>t({...n,data:s.target.value}),forceEditMode:a,createNode:o})},onPaste:(e,t)=>e===t.data?void 0:{...t,data:e}},hv={getAccessibilityString:e=>e.row.toString(),kind:Un.Marker,needsHover:!0,needsHoverPosition:!1,drawPrep:gv,measure:()=>44,draw:e=>pv(e,e.cell.row,e.cell.checked,e.cell.markerKind,e.cell.drawHandle,e.cell.checkboxStyle),onClick:e=>{const{bounds:t,cell:n,posX:r,posY:i}=e,{width:o,height:a}=t,l=n.drawHandle?7+(o-7)/2:o/2,s=a/2;if(Math.abs(r-l)<=10&&Math.abs(i-s)<=10)return{...n,checked:!n.checked}},onPaste:()=>{}};function gv(e,t){const{ctx:n,theme:r}=e,i=r.markerFontFull,o=t??{};return(o==null?void 0:o.font)!==i&&(n.font=i,o.font=i),o.deprep=mv,n.textAlign="center",o}function mv(e){const{ctx:t}=e;t.textAlign="start"}function pv(e,t,n,r,i,o){const{ctx:a,rect:l,hoverAmount:s,theme:u}=e,{x:c,y:d,width:f,height:h}=l,m=n?1:r==="checkbox-visible"?.6+.4*s:s;if(r!=="number"&&m>0){a.globalAlpha=m;const p=7*(n?s:1);if(Ws(a,u,n,i?c+p:c,d,i?f-p:f,h,!0,void 0,void 0,18,"center",o),i){a.globalAlpha=s,a.beginPath();for(const v of[3,6])for(const y of[-5,-1,3])a.rect(c+v,d+h/2+y,2,2);a.fillStyle=u.textLight,a.fill(),a.beginPath()}a.globalAlpha=1}if(r==="number"||r==="both"&&!n){const p=t.toString(),v=u.markerFontFull,y=c+f/2;r==="both"&&s!==0&&(a.globalAlpha=1-s),a.fillStyle=u.textLight,a.font=v,a.fillText(p,y,d+h/2+ur(a,v)),s!==0&&(a.globalAlpha=1)}}const vv={getAccessibilityString:()=>"",kind:Un.NewRow,needsHover:!0,needsHoverPosition:!1,measure:()=>200,draw:e=>bv(e,e.cell.hint,e.cell.icon),onPaste:()=>{}};function bv(e,t,n){const{ctx:r,rect:i,hoverAmount:o,theme:a,spriteManager:l}=e,{x:s,y:u,width:c,height:d}=i;r.beginPath(),r.globalAlpha=o,r.rect(s+1,u+1,c,d-2),r.fillStyle=a.bgHeaderHovered,r.fill(),r.globalAlpha=1,r.beginPath();const f=t!=="";let h=0;if(n!==void 0){const p=d-8,v=s+8/2,y=u+8/2;l.drawSprite(n,"normal",r,v,y,p,a,f?1:o),h=p}else{h=24;const m=12,p=f?m:o*m,v=f?0:(1-o)*m*.5,y=a.cellHorizontalPadding+4;p>0&&(r.moveTo(s+y+v,u+d/2),r.lineTo(s+y+v+p,u+d/2),r.moveTo(s+y+v+p*.5,u+d/2-p*.5),r.lineTo(s+y+v+p*.5,u+d/2+p*.5),r.lineWidth=2,r.strokeStyle=a.bgIconHeader,r.lineCap="round",r.stroke())}r.fillStyle=a.textMedium,r.fillText(t,h+s+a.cellHorizontalPadding+.5,u+d/2+ur(r,a)),r.beginPath()}function Pd(e,t,n,r,i,o,a){e.textBaseline="alphabetic";const l=wv(e,i,r,t,(n==null?void 0:n.fullSize)??!1);e.beginPath(),lr(e,l.x,l.y,l.width,l.height,t.roundingRadius??4),e.globalAlpha=o,e.fillStyle=(n==null?void 0:n.bgColor)??Ur(t.textDark,.1),e.fill(),e.globalAlpha=1,e.fillStyle=t.textDark,e.textBaseline="middle",a==null||a("text")}function wv(e,t,n,r,i){const o=r.cellHorizontalPadding,a=r.cellVerticalPadding;if(i)return{x:t.x+o/2,y:t.y+a/2+1,width:t.width-o,height:t.height-a-1};const l=jr(n,e,r.baseFontFull,"alphabetic"),s=t.height-a,u=Math.min(s,l.actualBoundingBoxAscent*2.5);return{x:t.x+o/2,y:t.y+(t.height-u)/2+1,width:l.width+o*3,height:u-1}}const yv=g.lazy(async()=>await Ts(()=>import("./number-overlay-editor.sGSz7Cjz.js"),__vite__mapDeps([13,1,2,3,4,5,6,7,8,9,10,11,12]),import.meta.url)),Cv={getAccessibilityString:e=>{var t;return((t=e.data)==null?void 0:t.toString())??""},kind:te.Number,needsHover:e=>e.hoverEffect===!0,needsHoverPosition:!1,useLabel:!0,drawPrep:ao,draw:e=>{const{hoverAmount:t,cell:n,ctx:r,theme:i,rect:o,overrideCursor:a}=e,{hoverEffect:l,displayData:s,hoverEffectTheme:u}=n;l===!0&&t>0&&Pd(r,i,u,s,o,t,a),sr(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:r,validatedSelection:i}=e;return g.createElement(g.Suspense,{fallback:null},g.createElement(yv,{highlight:t,disabled:r.readonly===!0,value:r.data,fixedDecimals:r.fixedDecimals,allowNegative:r.allowNegative,thousandSeparator:r.thousandSeparator,decimalSeparator:r.decimalSeparator,validatedSelection:i,onChange:o=>n({...r,data:Number.isNaN(o.floatValue??0)?0:o.floatValue})}))},onPaste:(e,t,n)=>{const r=typeof n.rawValue=="number"?n.rawValue:Number.parseFloat(typeof n.rawValue=="string"?n.rawValue:e);if(!(Number.isNaN(r)||t.data===r))return{...t,data:r,displayData:n.formattedString??t.displayData}}},Sv={getAccessibilityString:()=>"",measure:()=>108,kind:te.Protected,needsHover:!1,needsHoverPosition:!1,draw:xv,onPaste:()=>{}};function xv(e){const{ctx:t,theme:n,rect:r}=e,{x:i,y:o,height:a}=r;t.beginPath();const l=2.5;let s=i+n.cellHorizontalPadding+l;const u=o+a/2,c=Math.cos(Gl(30))*l,d=Math.sin(Gl(30))*l;for(let f=0;f<12;f++)t.moveTo(s,u-l),t.lineTo(s,u+l),t.moveTo(s+c,u-d),t.lineTo(s-c,u+d),t.moveTo(s-c,u-d),t.lineTo(s+c,u+d),s+=8;t.lineWidth=1.1,t.lineCap="square",t.strokeStyle=n.textLight,t.stroke()}const kv={getAccessibilityString:e=>{var t;return((t=e.data)==null?void 0:t.toString())??""},kind:te.RowID,needsHover:!1,needsHoverPosition:!1,drawPrep:(e,t)=>ao(e,t,e.theme.textLight),draw:e=>sr(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:r,validatedSelection:i}=e;return se.createElement(Yr,{highlight:t,autoFocus:r.readonly!==!0,disabled:r.readonly!==!1,value:r.data,validatedSelection:i,onChange:o=>n({...r,data:o.target.value})})},onPaste:()=>{}},Mv={getAccessibilityString:e=>{var t;return((t=e.data)==null?void 0:t.toString())??""},kind:te.Text,needsHover:e=>e.hoverEffect===!0,needsHoverPosition:!1,drawPrep:ao,useLabel:!0,draw:e=>{const{cell:t,hoverAmount:n,hyperWrapping:r,ctx:i,rect:o,theme:a,overrideCursor:l}=e,{displayData:s,contentAlign:u,hoverEffect:c,allowWrapping:d,hoverEffectTheme:f}=t;c===!0&&n>0&&Pd(i,a,f,s,o,n,l),sr(e,s,u,d,r)},measure:(e,t,n)=>{const r=t.displayData.split(`
|
176
|
+
`,t.allowWrapping===!0?void 0:1);let i=0;for(const o of r)i=Math.max(i,e.measureText(o).width);return i+2*n.cellHorizontalPadding},onDelete:e=>({...e,data:""}),provideEditor:e=>({disablePadding:e.allowWrapping===!0,editor:t=>{const{isHighlighted:n,onChange:r,value:i,validatedSelection:o}=t;return g.createElement(Yr,{style:e.allowWrapping===!0?{padding:"3px 8.5px"}:void 0,highlight:n,autoFocus:i.readonly!==!0,disabled:i.readonly===!0,altNewline:!0,value:i.data,validatedSelection:o,onChange:a=>r({...i,data:a.target.value})})}}),onPaste:(e,t,n)=>e===t.data?void 0:{...t,data:e,displayData:n.formattedString??t.displayData}},Rv=mn("div")({name:"UriOverlayEditorStyle",class:"gdg-u1rrojo",propsAsIs:!1}),Ev=e=>{const{uri:t,onChange:n,forceEditMode:r,readonly:i,validatedSelection:o,preview:a}=e,[l,s]=g.useState(!i&&(t===""||r)),u=g.useCallback(()=>{s(!0)},[]);return l?g.createElement(Yr,{validatedSelection:o,highlight:!0,autoFocus:!0,value:t,onChange:n}):g.createElement(Rv,null,g.createElement("a",{className:"gdg-link-area",href:t,target:"_blank",rel:"noopener noreferrer"},a),!i&&g.createElement("div",{className:"gdg-edit-icon",onClick:u},g.createElement(Fs,null)),g.createElement("textarea",{className:"gdg-input",autoFocus:!0}))};function _d(e,t,n,r){let i=n.cellHorizontalPadding;const o=t.height/2-e.actualBoundingBoxAscent/2,a=e.width,l=e.actualBoundingBoxAscent;return r==="right"?i=t.width-a-n.cellHorizontalPadding:r==="center"&&(i=t.width/2-a/2),{x:i,y:o,width:a,height:l}}function Ou(e){const{cell:t,bounds:n,posX:r,posY:i,theme:o}=e,a=t.displayData??t.data;if(t.hoverEffect!==!0||t.onClickUri===void 0)return!1;const l=sd(a,o.baseFontFull);if(l===void 0)return!1;const s=_d(l,n,o,t.contentAlign);return Wr({x:s.x-4,y:s.y-4,width:s.width+8,height:s.height+8},r,i)}const Iv={getAccessibilityString:e=>{var t;return((t=e.data)==null?void 0:t.toString())??""},kind:te.Uri,needsHover:e=>e.hoverEffect===!0,needsHoverPosition:!0,useLabel:!0,drawPrep:ao,draw:e=>{const{cell:t,theme:n,overrideCursor:r,hoverX:i,hoverY:o,rect:a,ctx:l}=e,s=t.displayData??t.data,u=t.hoverEffect===!0;if(r!==void 0&&u&&i!==void 0&&o!==void 0){const c=jr(s,l,n.baseFontFull),d=_d(c,a,n,t.contentAlign),{x:f,y:h,width:m,height:p}=d;if(i>=f-4&&i<=f-4+m+8&&o>=h-4&&o<=h-4+p+8){const v=ur(l,n.baseFontFull);r("pointer");const y=5,b=h-v;l.beginPath(),l.moveTo(a.x+f,Math.floor(a.y+b+p+y)+.5),l.lineTo(a.x+f+m,Math.floor(a.y+b+p+y)+.5),l.strokeStyle=n.linkColor,l.stroke(),l.save(),l.fillStyle=e.cellFillColor,sr({...e,rect:{...a,x:a.x-1}},s,t.contentAlign),sr({...e,rect:{...a,x:a.x-2}},s,t.contentAlign),sr({...e,rect:{...a,x:a.x+1}},s,t.contentAlign),sr({...e,rect:{...a,x:a.x+2}},s,t.contentAlign),l.restore()}}l.fillStyle=u?n.linkColor:n.textDark,sr(e,s,t.contentAlign)},onSelect:e=>{Ou(e)&&e.preventDefault()},onClick:e=>{var r;const{cell:t}=e;Ou(e)&&((r=t.onClickUri)==null||r.call(t,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:r,forceEditMode:i,validatedSelection:o}=t;return g.createElement(Ev,{forceEditMode:r.readonly!==!0&&(i||e.hoverEffect===!0&&e.onClickUri!==void 0),uri:r.data,preview:r.displayData??r.data,validatedSelection:o,readonly:r.readonly===!0,onChange:a=>n({...r,data:a.target.value})})},onPaste:(e,t,n)=>e===t.data?void 0:{...t,data:e,displayData:n.formattedString??t.displayData}},Tv=[hv,vv,X0,Z0,nv,av,uv,fv,Cv,Sv,kv,Mv,Iv];var ss,Pu;function Dv(){if(Pu)return ss;Pu=1;var e=Wc(),t=yc(),n="Expected a function";function r(i,o,a){var l=!0,s=!0;if(typeof i!="function")throw new TypeError(n);return t(a)&&(l="leading"in a?!!a.leading:l,s="trailing"in a?!!a.trailing:s),e(i,o,{leading:l,maxWait:o,trailing:s})}return ss=r,ss}var Ov=Dv();const Pv=pr(Ov),ls=[];class _v extends dd{constructor(){super(...arguments);dt(this,"imageLoaded",()=>{});dt(this,"loadedLocations",[]);dt(this,"cache",{});dt(this,"sendLoaded",Pv(()=>{this.imageLoaded(new Zi(this.loadedLocations)),this.loadedLocations=[]},20));dt(this,"clearOutOfWindow",()=>{const n=Object.keys(this.cache);for(const r of n){const i=this.cache[r];let o=!1;for(let a=0;a<i.cells.length;a++){const l=i.cells[a];if(this.isInWindow(l)){o=!0;break}}o?i.cells=i.cells.filter(this.isInWindow):(i.cancel(),delete this.cache[r])}})}setCallback(n){this.imageLoaded=n}loadImage(n,r,i,o){let a=!1;const l=ls.pop()??new Image;let s=!1;const u={img:void 0,cells:[er(r,i)],url:n,cancel:()=>{s||(s=!0,ls.length<12?ls.unshift(l):a||(l.src=""))}},c=new Promise(d=>l.addEventListener("load",()=>d(null)));requestAnimationFrame(async()=>{try{l.src=n,await c,await l.decode();const d=this.cache[o];if(d!==void 0&&!s){d.img=l;for(const f of d.cells)this.loadedLocations.push(Bs(f));a=!0,this.sendLoaded()}}catch{u.cancel()}}),this.cache[o]=u}loadOrGetImage(n,r,i){const o=n,a=this.cache[o];if(a!==void 0){const l=er(r,i);return a.cells.includes(l)||a.cells.push(l),a.img}else this.loadImage(n,r,i,o)}}const Lv=(e,t)=>{const n=g.useMemo(()=>({...kp,...e.headerIcons}),[e.headerIcons]),r=g.useMemo(()=>e.imageWindowLoader??new _v,[e.imageWindowLoader]);return g.createElement(Y0,{...e,renderers:Tv,headerIcons:n,ref:t,imageWindowLoader:r})},Fv=g.forwardRef(Lv);function _u(e,t){const n=g.useRef(null),r=g.useRef(),i=g.useCallback(()=>{n.current&&(clearTimeout(n.current),n.current=null)},[]);return g.useEffect(()=>i,[i]),{debouncedCallback:g.useCallback((...a)=>{r.current=a,i(),n.current=setTimeout(()=>{r.current&&(e(...r.current),r.current=void 0)},t)},[e,t,i]),cancel:i}}const Lu=mi("div",{target:"eau1w2s0"})(({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"}})),Av=mi("div",{target:"eau1w2s1"})(({theme:e})=>({paddingTop:e.spacing.xs,paddingBottom:e.spacing.xs})),$o=mi("div",{target:"eau1w2s2"})(({theme:e})=>({display:"flex",alignItems:"center",gap:e.spacing.sm,paddingLeft:e.spacing.sm,paddingRight:e.spacing.sm,paddingTop:e.spacing.twoXS,paddingBottom:e.spacing.twoXS,cursor:"pointer","&:hover":{backgroundColor:e.colors.darkenedBgMix15},minWidth:e.sizes.minMenuWidth})),Hv=mi("div",{target:"eau1w2s3"})(({theme:e})=>({height:e.sizes.borderWidth,backgroundColor:e.colors.borderColor,marginTop:e.spacing.xs,marginBottom:e.spacing.xs}));function zv({top:e,left:t,isColumnPinned:n,onPinColumn:r,onUnpinColumn:i,onCloseMenu:o,onSortColumn:a}){const l=pa(),{colors:s,fontSizes:u,radii:c,fontWeights:d}=l;g.useEffect(()=>{function h(p){p.preventDefault()}const m=()=>{document.removeEventListener("wheel",h),document.removeEventListener("touchmove",h)};return document.addEventListener("wheel",h,{passive:!1}),document.addEventListener("touchmove",h,{passive:!1}),()=>{m()}},[]);const f=se.useCallback(()=>{o()},[o]);return Ht(Rc,{autoFocus:!0,"aria-label":"Dataframe column menu",content:Ir(Av,{children:[a&&Ir(gh,{children:[Ir($o,{onClick:()=>{a("asc"),f()},role:"menuitem",children:[Ht(Do,{size:"base",margin:"0",color:"inherit",iconValue:":material/arrow_upward:"}),"Sort ascending"]}),Ir($o,{onClick:()=>{a("desc"),f()},role:"menuitem",children:[Ht(Do,{size:"base",margin:"0",color:"inherit",iconValue:":material/arrow_downward:"}),"Sort descending"]}),Ht(Hv,{})]}),n&&Ir($o,{onClick:()=>{i(),f()},children:[Ht(Do,{size:"base",margin:"0",color:"inherit",iconValue:":material/keep_off:"}),"Unpin column"]}),!n&&Ir($o,{onClick:()=>{r(),f()},children:[Ht(Do,{size:"base",margin:"0",color:"inherit",iconValue:":material/keep:"}),"Pin column"]})]}),placement:kc.bottomRight,accessibilityType:xc.menu,showArrow:!1,popoverMargin:$n("0.375rem"),onClickOutside:f,onEsc:f,overrides:{Body:{props:{"data-testid":"stDataFrameColumnMenu"},style:{paddingTop:"0 !important",paddingBottom:"0 !important",paddingLeft:"0 !important",paddingRight:"0 !important",backgroundColor:"transparent"}},Inner:{style:{border:`${l.sizes.borderWidth} solid ${l.colors.borderColor}`,backgroundColor:Mc(l)?s.bgColor:s.secondaryBg,color:s.bodyText,fontSize:u.sm,fontWeight:d.normal,borderTopLeftRadius:c.default,borderTopRightRadius:c.default,borderBottomLeftRadius:c.default,borderBottomRightRadius:c.default,overflow:"auto",paddingTop:"0 !important",paddingBottom:"0 !important",paddingLeft:"0 !important",paddingRight:"0 !important"}}},isOpen:!0,children:Ht("div",{"data-testid":"stDataFrameColumnMenuTarget",style:{position:"fixed",top:e,left:t,visibility:"hidden",transform:"unset"}})})}const Vv=g.memo(zv);var $v=mh();const Nv=pr($v);var Ko={exports:{}};/*! Moment Duration Format v2.2.2
|
177
|
+
* https://github.com/jsmreese/moment-duration-format
|
178
|
+
* Date: 2018-02-16
|
179
|
+
*
|
180
|
+
* Duration format plugin function for the Moment.js library
|
181
|
+
* http://momentjs.com/
|
182
|
+
*
|
183
|
+
* Copyright 2018 John Madhavan-Reese
|
184
|
+
* Released under the MIT license
|
185
|
+
*/var Bv=Ko.exports,Fu;function Wv(){return Fu||(Fu=1,function(e,t){(function(n,r){try{e.exports=r(ph)}catch{e.exports=r}n&&(n.momentDurationFormatSetup=n.moment?r(n.moment):r)})(Bv,function(n){var r=!1,i=!1,o=!1,a=!1,l="escape years months weeks days hours minutes seconds milliseconds general".split(" "),s=[{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 u(H,P){return P.length>H.length?!1:H.indexOf(P)!==-1}function c(H){for(var P="";H;)P+="0",H-=1;return P}function d(H){for(var P=H.split("").reverse(),q=0,fe=!0;fe&&q<P.length;)q?P[q]==="9"?P[q]="0":(P[q]=(parseInt(P[q],10)+1).toString(),fe=!1):(parseInt(P[q],10)<5&&(fe=!1),P[q]="0"),q+=1;return fe&&P.push("1"),P.reverse().join("")}function f(H,P){var q=_(k(P).sort(),function(me){return me+":"+P[me]}).join(","),fe=H+"+"+q;return f.cache[fe]||(f.cache[fe]=Intl.NumberFormat(H,P)),f.cache[fe]}f.cache={};function h(H,P,q){var fe=P.useToLocaleString,me=P.useGrouping,ze=me&&P.grouping.slice(),ve=P.maximumSignificantDigits,Xe=P.minimumIntegerDigits||1,Me=P.fractionDigits||0,Pt=P.groupingSeparator,Mt=P.decimalSeparator;if(fe&&q){var Qe={minimumIntegerDigits:Xe,useGrouping:me};if(Me&&(Qe.maximumFractionDigits=Me,Qe.minimumFractionDigits=Me),ve&&H>0&&(Qe.maximumSignificantDigits=ve),o){if(!a){var le=T({},P);le.useGrouping=!1,le.decimalSeparator=".",H=parseFloat(h(H,le),10)}return f(q,Qe).format(H)}else{if(!i){var le=T({},P);le.useGrouping=!1,le.decimalSeparator=".",H=parseFloat(h(H,le),10)}return H.toLocaleString(q,Qe)}}var je;ve?je=H.toPrecision(ve+1):je=H.toFixed(Me+1);var we,ce,be,Ve=je.split("e");be=Ve[1]||"",Ve=Ve[0].split("."),ce=Ve[1]||"",we=Ve[0]||"";var Oe=we.length,nt=ce.length,pe=Oe+nt,Ee=we+ce;(ve&&pe===ve+1||!ve&&nt===Me+1)&&(Ee=d(Ee),Ee.length===pe+1&&(Oe=Oe+1),nt&&(Ee=Ee.slice(0,-1)),we=Ee.slice(0,Oe),ce=Ee.slice(Oe)),ve&&(ce=ce.replace(/0*$/,""));var at=parseInt(be,10);at>0?ce.length<=at?(ce=ce+c(at-ce.length),we=we+ce,ce=""):(we=we+ce.slice(0,at),ce=ce.slice(at)):at<0&&(ce=c(Math.abs(at)-we.length)+we+ce,we="0"),ve||(ce=ce.slice(0,Me),ce.length<Me&&(ce=ce+c(Me-ce.length)),we.length<Xe&&(we=c(Xe-we.length)+we));var Ae="";if(me){Ve=we;for(var rt;Ve.length;)ze.length&&(rt=ze.shift()),Ae&&(Ae=Pt+Ae),Ae=Ve.slice(-rt)+Ae,Ve=Ve.slice(0,-rt)}else Ae=we;return ce&&(Ae=Ae+Mt+ce),Ae}function m(H,P){return H.label.length>P.label.length?-1:H.label.length<P.label.length?1:0}function p(H,P){var q=[];return M(k(P),function(fe){if(fe.slice(0,15)==="_durationLabels"){var me=fe.slice(15).toLowerCase();M(k(P[fe]),function(ze){ze.slice(0,1)===H&&q.push({type:me,key:ze,label:P[fe][ze]})})}}),q}function v(H,P,q){return P===1&&q===null?H:H+H}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:v};function b(H){return Object.prototype.toString.call(H)==="[object Array]"}function R(H){return Object.prototype.toString.call(H)==="[object Object]"}function O(H,P){for(var q=H.length;q-=1;)if(P(H[q]))return H[q]}function S(H,P){var q=0,fe=H&&H.length||0,me;for(typeof P!="function"&&(me=P,P=function(ze){return ze===me});q<fe;){if(P(H[q]))return H[q];q+=1}}function M(H,P){var q=0,fe=H.length;if(!(!H||!fe))for(;q<fe;){if(P(H[q],q)===!1)return;q+=1}}function _(H,P){var q=0,fe=H.length,me=[];if(!H||!fe)return me;for(;q<fe;)me[q]=P(H[q],q),q+=1;return me}function E(H,P){return _(H,function(q){return q[P]})}function x(H){var P=[];return M(H,function(q){q&&P.push(q)}),P}function L(H){var P=[];return M(H,function(q){S(P,q)||P.push(q)}),P}function D(H,P){var q=[];return M(H,function(fe){M(P,function(me){fe===me&&q.push(fe)})}),L(q)}function C(H,P){var q=[];return M(H,function(fe,me){if(!P(fe))return q=H.slice(me),!1}),q}function I(H,P){var q=H.slice().reverse();return C(q,P).reverse()}function T(H,P){for(var q in P)P.hasOwnProperty(q)&&(H[q]=P[q]);return H}function k(H){var P=[];for(var q in H)H.hasOwnProperty(q)&&P.push(q);return P}function V(H,P){var q=0,fe=H.length;if(!H||!fe)return!1;for(;q<fe;){if(P(H[q],q)===!0)return!0;q+=1}return!1}function N(H){var P=[];return M(H,function(q){P=P.concat(q)}),P}function U(){var H=0;try{H.toLocaleString("i")}catch(P){return P.name==="RangeError"}return!1}function oe(H){return H(3.55,"en",{useGrouping:!1,minimumIntegerDigits:1,minimumFractionDigits:1,maximumFractionDigits:1})==="3.6"}function ee(H){var P=!0;return P=P&&H(1,"en",{minimumIntegerDigits:1})==="1",P=P&&H(1,"en",{minimumIntegerDigits:2})==="01",P=P&&H(1,"en",{minimumIntegerDigits:3})==="001",!(!P||(P=P&&H(99.99,"en",{maximumFractionDigits:0,minimumFractionDigits:0})==="100",P=P&&H(99.99,"en",{maximumFractionDigits:1,minimumFractionDigits:1})==="100.0",P=P&&H(99.99,"en",{maximumFractionDigits:2,minimumFractionDigits:2})==="99.99",P=P&&H(99.99,"en",{maximumFractionDigits:3,minimumFractionDigits:3})==="99.990",!P)||(P=P&&H(99.99,"en",{maximumSignificantDigits:1})==="100",P=P&&H(99.99,"en",{maximumSignificantDigits:2})==="100",P=P&&H(99.99,"en",{maximumSignificantDigits:3})==="100",P=P&&H(99.99,"en",{maximumSignificantDigits:4})==="99.99",P=P&&H(99.99,"en",{maximumSignificantDigits:5})==="99.99",!P)||(P=P&&H(1e3,"en",{useGrouping:!0})==="1,000",P=P&&H(1e3,"en",{useGrouping:!1})==="1000",!P))}function j(){var H=[].slice.call(arguments),P={},q;if(M(H,function(ve,Xe){if(!Xe){if(!b(ve))throw"Expected array as the first argument to durationsFormat.";q=ve}if(typeof ve=="string"||typeof ve=="function"){P.template=ve;return}if(typeof ve=="number"){P.precision=ve;return}R(ve)&&T(P,ve)}),!q||!q.length)return[];P.returnMomentTypes=!0;var fe=_(q,function(ve){return ve.format(P)}),me=D(l,L(E(N(fe),"type"))),ze=P.largest;return ze&&(me=me.slice(0,ze)),P.returnMomentTypes=!1,P.outputTypes=me,_(q,function(ve){return ve.format(P)})}function ne(){var H=[].slice.call(arguments),P=T({},this.format.defaults),q=this.asMilliseconds(),fe=this.asMonths();typeof this.isValid=="function"&&this.isValid()===!1&&(q=0,fe=0);var me=q<0,ze=n.duration(Math.abs(q),"milliseconds"),ve=n.duration(Math.abs(fe),"months");M(H,function(z){if(typeof z=="string"||typeof z=="function"){P.template=z;return}if(typeof z=="number"){P.precision=z;return}R(z)&&T(P,z)});var Xe={years:"y",months:"M",weeks:"w",days:"d",hours:"h",minutes:"m",seconds:"s",milliseconds:"S"},Me={escape:/\[(.+?)\]/,years:/\*?[Yy]+/,months:/\*?M+/,weeks:/\*?[Ww]+/,days:/\*?[Dd]+/,hours:/\*?[Hh]+/,minutes:/\*?m+/,seconds:/\*?s+/,milliseconds:/\*?S+/,general:/.+?/};P.types=l;var Pt=function(z){return S(l,function(et){return Me[et].test(z)})},Mt=new RegExp(_(l,function(z){return Me[z].source}).join("|"),"g");P.duration=this;var Qe=typeof P.template=="function"?P.template.apply(P):P.template,le=P.outputTypes,je=P.returnMomentTypes,we=P.largest,ce=[];le||(b(P.stopTrim)&&(P.stopTrim=P.stopTrim.join("")),P.stopTrim&&M(P.stopTrim.match(Mt),function(z){var et=Pt(z);et==="escape"||et==="general"||ce.push(et)}));var be=n.localeData();be||(be={}),M(k(y),function(z){if(typeof y[z]=="function"){be[z]||(be[z]=y[z]);return}be["_"+z]||(be["_"+z]=y[z])}),M(k(be._durationTimeTemplates),function(z){Qe=Qe.replace("_"+z+"_",be._durationTimeTemplates[z])});var Ve=P.userLocale||n.locale(),Oe=P.useLeftUnits,nt=P.usePlural,pe=P.precision,Ee=P.forceLength,at=P.useGrouping,Ae=P.trunc,rt=P.useSignificantDigits&&pe>0,vt=rt?P.precision:0,ht=vt,He=P.minValue,It=!1,Yt=P.maxValue,mt=!1,Rt=P.useToLocaleString,Gt=P.groupingSeparator,Lt=P.decimalSeparator,Sn=P.grouping;Rt=Rt&&(r||o);var Wt=P.trim;b(Wt)&&(Wt=Wt.join(" ")),Wt===null&&(we||Yt||rt)&&(Wt="all"),(Wt===null||Wt===!0||Wt==="left"||Wt==="right")&&(Wt="large"),Wt===!1&&(Wt="");var St=function(z){return z.test(Wt)},En=/large/,pn=/small/,Pe=/both/,Ft=/mid/,dn=/^all|[^sm]all/,fn=/final/,vn=we>0||V([En,Pe,dn],St),st=V([pn,Pe,dn],St),zt=V([Ft,dn],St),Dt=V([fn,dn],St),nn=_(Qe.match(Mt),function(z,et){var $e=Pt(z);return z.slice(0,1)==="*"&&(z=z.slice(1),$e!=="escape"&&$e!=="general"&&ce.push($e)),{index:et,length:z.length,text:"",token:$e==="escape"?z.replace(Me.escape,"$1"):z,type:$e==="escape"||$e==="general"?null:$e}}),Tt={index:0,length:0,token:"",text:"",type:null},Vt=[];Oe&&nn.reverse(),M(nn,function(z){if(z.type){(Tt.type||Tt.text)&&Vt.push(Tt),Tt=z;return}Oe?Tt.text=z.token+Tt.text:Tt.text+=z.token}),(Tt.type||Tt.text)&&Vt.push(Tt),Oe&&Vt.reverse();var Ge=D(l,L(x(E(Vt,"type"))));if(!Ge.length)return E(Vt,"text").join("");Ge=_(Ge,function(z,et){var $e=et+1===Ge.length,Ot=!et,cn;z==="years"||z==="months"?cn=ve.as(z):cn=ze.as(z);var Zt=Math.floor(cn),qn=cn-Zt,In=S(Vt,function(Jt){return z===Jt.type});return Ot&&Yt&&cn>Yt&&(mt=!0),$e&&He&&Math.abs(P.duration.as(z))<He&&(It=!0),Ot&&Ee===null&&In.length>1&&(Ee=!0),ze.subtract(Zt,z),ve.subtract(Zt,z),{rawValue:cn,wholeValue:Zt,decimalValue:$e?qn:0,isSmallest:$e,isLargest:Ot,type:z,tokenLength:In.length}});var $t=Ae?Math.floor:Math.round,At=function(z,et){var $e=Math.pow(10,et);return $t(z*$e)/$e},Nt=!1,he=!1,lt=function(z,et){var $e={useGrouping:at,groupingSeparator:Gt,decimalSeparator:Lt,grouping:Sn,useToLocaleString:Rt};return rt&&(vt<=0?(z.rawValue=0,z.wholeValue=0,z.decimalValue=0):($e.maximumSignificantDigits=vt,z.significantDigits=vt)),mt&&!he&&(z.isLargest?(z.wholeValue=Yt,z.decimalValue=0):(z.wholeValue=0,z.decimalValue=0)),It&&!he&&(z.isSmallest?(z.wholeValue=He,z.decimalValue=0):(z.wholeValue=0,z.decimalValue=0)),z.isSmallest||z.significantDigits&&z.significantDigits-z.wholeValue.toString().length<=0?pe<0?z.value=At(z.wholeValue,pe):pe===0?z.value=$t(z.wholeValue+z.decimalValue):rt?(Ae?z.value=At(z.rawValue,vt-z.wholeValue.toString().length):z.value=z.rawValue,z.wholeValue&&(vt-=z.wholeValue.toString().length)):($e.fractionDigits=pe,Ae?z.value=z.wholeValue+At(z.decimalValue,pe):z.value=z.wholeValue+z.decimalValue):rt&&z.wholeValue?(z.value=Math.round(At(z.wholeValue,z.significantDigits-z.wholeValue.toString().length)),vt-=z.wholeValue.toString().length):z.value=z.wholeValue,z.tokenLength>1&&(Ee||Nt)&&($e.minimumIntegerDigits=z.tokenLength,he&&$e.maximumSignificantDigits<z.tokenLength&&delete $e.maximumSignificantDigits),!Nt&&(z.value>0||Wt===""||S(ce,z.type)||S(le,z.type))&&(Nt=!0),z.formattedValue=h(z.value,$e,Ve),$e.useGrouping=!1,$e.decimalSeparator=".",z.formattedValueEn=h(z.value,$e,"en"),z.tokenLength===2&&z.type==="milliseconds"&&(z.formattedValueMS=h(z.value,{minimumIntegerDigits:3,useGrouping:!1},"en").slice(0,2)),z};if(Ge=_(Ge,lt),Ge=x(Ge),Ge.length>1){var un=function(z){return S(Ge,function(et){return et.type===z})},hn=function(z){var et=un(z.type);et&&M(z.targets,function($e){var Ot=un($e.type);Ot&&parseInt(et.formattedValueEn,10)===$e.value&&(et.rawValue=0,et.wholeValue=0,et.decimalValue=0,Ot.rawValue+=1,Ot.wholeValue+=1,Ot.decimalValue=0,Ot.formattedValueEn=Ot.wholeValue.toString(),he=!0)})};M(s,hn)}return he&&(Nt=!1,vt=ht,Ge=_(Ge,lt),Ge=x(Ge)),le&&!(mt&&!P.trim)?(Ge=_(Ge,function(z){return S(le,function(et){return z.type===et})?z:null}),Ge=x(Ge)):(vn&&(Ge=C(Ge,function(z){return!z.isSmallest&&!z.wholeValue&&!S(ce,z.type)})),we&&Ge.length&&(Ge=Ge.slice(0,we)),st&&Ge.length>1&&(Ge=I(Ge,function(z){return!z.wholeValue&&!S(ce,z.type)&&!z.isLargest})),zt&&(Ge=_(Ge,function(z,et){return et>0&&et<Ge.length-1&&!z.wholeValue?null:z}),Ge=x(Ge)),Dt&&Ge.length===1&&!Ge[0].wholeValue&&!(!Ae&&Ge[0].isSmallest&&Ge[0].rawValue<He)&&(Ge=[])),je?Ge:(M(Vt,function(z){var et=Xe[z.type],$e=S(Ge,function(Jt){return Jt.type===z.type});if(!(!et||!$e)){var Ot=$e.formattedValueEn.split(".");Ot[0]=parseInt(Ot[0],10),Ot[1]?Ot[1]=parseFloat("0."+Ot[1],10):Ot[1]=null;var cn=be.durationPluralKey(et,Ot[0],Ot[1]),Zt=p(et,be),qn=!1,In={};M(be._durationLabelTypes,function(Jt){var Ln=S(Zt,function(Yn){return Yn.type===Jt.type&&Yn.key===cn});Ln&&(In[Ln.type]=Ln.label,u(z.text,Jt.string)&&(z.text=z.text.replace(Jt.string,Ln.label),qn=!0))}),nt&&!qn&&(Zt.sort(m),M(Zt,function(Jt){if(In[Jt.type]===Jt.label)return u(z.text,Jt.label)?!1:void 0;if(u(z.text,Jt.label))return z.text=z.text.replace(Jt.label,In[Jt.type]),!1}))}}),Vt=_(Vt,function(z){if(!z.type)return z.text;var et=S(Ge,function(Ot){return Ot.type===z.type});if(!et)return"";var $e="";return Oe&&($e+=z.text),(me&&mt||!me&&It)&&($e+="< ",mt=!1,It=!1),(me&&It||!me&&mt)&&($e+="> ",mt=!1,It=!1),me&&(et.value>0||Wt===""||S(ce,et.type)||S(le,et.type))&&($e+="-",me=!1),z.type==="milliseconds"&&et.formattedValueMS?$e+=et.formattedValueMS:$e+=et.formattedValue,Oe||($e+=z.text),$e}),Vt.join("").replace(/(,| |:|\.)*$/,"").replace(/^(,| |:|\.)*/,""))}function ie(){var H=this.duration,P=function(ze){return H._data[ze]},q=S(this.types,P),fe=O(this.types,P);switch(q){case"milliseconds":return"S __";case"seconds":case"minutes":return"*_MS_";case"hours":return"_HMS_";case"days":if(q===fe)return"d __";case"weeks":return q===fe?"w __":(this.trim===null&&(this.trim="both"),"w __, d __, h __");case"months":if(q===fe)return"M __";case"years":return q===fe?"y __":(this.trim===null&&(this.trim="both"),"y __, M __, d __");default:return this.trim===null&&(this.trim="both"),"y __, d __, h __, m __, s __"}}function ue(H){if(!H)throw"Moment Duration Format init cannot find moment instance.";H.duration.format=j,H.duration.fn.format=ne,H.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:ie,useToLocaleString:!0,groupingSeparator:",",decimalSeparator:".",grouping:[3]},H.updateLocale("en",y)}var ge=function(H,P,q){return H.toLocaleString(P,q)};r=U()&&ee(ge),i=r&&oe(ge);var J=function(H,P,q){if(typeof window<"u"&&window&&window.Intl&&window.Intl.NumberFormat)return window.Intl.NumberFormat(P,q).format(H)};return o=ee(J),a=o&&oe(J),ue(n),ue})}(Ko)),Ko.exports}Wv();const Uv=["true","t","yes","y","on","1"],qv=["false","f","no","n","off","0"];function _t(e,t=""){return{kind:te.Text,readonly:!0,allowOverlay:!0,data:e,displayData:e,errorDetails:t,isError:!0,style:"faded"}}function fi(e){return e.hasOwnProperty("isError")&&e.isError}function Yv(e){return e.hasOwnProperty("tooltip")&&e.tooltip!==""}function ba(e){return e.hasOwnProperty("isMissingValue")&&e.isMissingValue}function ks(e=!1){return e?{kind:te.Loading,allowOverlay:!1,isMissingValue:!0}:{kind:te.Loading,allowOverlay:!1}}function Xv(e,t){const n=t?"faded":"normal";return{kind:te.Text,data:"",displayData:"",allowOverlay:!0,readonly:e,style:n}}function Ms(e){return{id:e.id,title:e.title,hasMenu:!1,menuIcon:"dots",themeOverride:e.themeOverride,icon:e.icon,group:e.group,...e.isStretched&&{grow:e.isIndex?1:3},...e.width&&{width:e.width}}}function so(e,t){return Be(e)?t||{}:Be(t)?e||{}:Ec(e,t)}function Ld(e){if(Be(e))return[];if(typeof e=="number"||typeof e=="boolean")return[e];if(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,r)=>typeof r=="bigint"?Number(r):r));return Array.isArray(t)?t.map(n=>["string","number","boolean","null"].includes(typeof n)?n:wt(n)):[wt(t)]}catch{return[wt(e)]}}function jv(e){return e&&e.startsWith("{")&&e.endsWith("}")}function wt(e){try{try{return Nv(e)}catch{return JSON.stringify(e,(n,r)=>typeof r=="bigint"?Number(r):r)}}catch{return`[${typeof e}]`}}function Fd(e){if(Be(e))return null;if(typeof e=="boolean")return e;const t=wt(e).toLowerCase().trim();if(t==="")return null;if(Uv.includes(t))return!0;if(qv.includes(t))return!1}function no(e){if(Be(e))return null;if(Array.isArray(e))return NaN;if(typeof e=="string"){if(e.trim().length===0)return null;try{const t=Ui.unformat(e.trim());if(pt(t))return t}catch{}}else if(e instanceof Int32Array)return Number(e[0]);return Number(e)}function la(e){if(Be(e))return"";if(typeof e=="string")return e;try{return JSON.stringify(e,(t,n)=>typeof n=="bigint"?Number(n):n)}catch{return wt(e)}}function Gv(e){if(e===0||Math.abs(e)>=1e-4)return 4;const n=e.toExponential().split("e");return Math.abs(parseInt(n[1],10))}function ua(e,t,n){return Number.isNaN(e)||!Number.isFinite(e)?"":Be(t)||t===""?pt(n)?(n===0&&(e=Math.round(e)),Ui(e).format({thousandSeparated:!1,mantissa:n,trimMantissa:!1})):Ui(e).format({thousandSeparated:!1,mantissa:Gv(e),trimMantissa:!0}):t==="plain"?Ui(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"?Ui(e).format({thousandSeparated:!0,negative:"parenthesis",mantissa:2,trimMantissa:!1}):og.sprintf(t,e)}function Au(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 No(e){if(Be(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 r=Nr.unix(n).utc();if(r.isValid())return r.toDate()}if(typeof e=="string"){const n=Nr.utc(e);if(n.isValid())return n.toDate();const r=Nr.utc(e,[Nr.HTML5_FMT.TIME_MS,Nr.HTML5_FMT.TIME_SECONDS,Nr.HTML5_FMT.TIME]);if(r.isValid())return r.toDate()}}catch{return}}function Ad(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 Kv(e,t){return t===0?Math.trunc(e):Math.trunc(e*10**t)/10**t}const Zv=new RegExp(/(\r\n|\n|\r)/gm);function ro(e){return e.indexOf(`
|
186
|
+
`)!==-1?e.replace(Zv," "):e}function Jv(e,t){if(Be(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 Qv=mi("div",{target:"e20fwh30"})(({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"}})),Hd=({jsonValue:e,theme:t})=>{let n;if(e)try{n=typeof e=="string"?Na.parse(e):Na.parse(Na.stringify(e))}catch{n=void 0}return Be(n)?Ht(Yr,{highlight:!0,autoFocus:!1,disabled:!0,value:la(e)??"",onChange:()=>{}}):Ht(Qv,{"data-testid":"stJsonColumnViewer",children:Ht(vh,{src:n,collapsed:2,theme:bh(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"}})})},e1=e=>{const t=e.theme,n=e.value.data;return Ht(Hd,{jsonValue:n.value||n.displayValue,theme:t})},t1=e=>{const t=e.theme,n=e.value;return Ht(Hd,{jsonValue:n.data,theme:t})},n1={kind:te.Custom,isMatch:e=>e.data.kind==="json-cell",draw:(e,t)=>{const{value:n,displayValue:r}=t.data;return Vs(e,r??la(n)??"",t.contentAlign),!0},measure:(e,t,n)=>{const{value:r,displayValue:i}=t.data,o=i??la(r)??"";return(o?e.measureText(o).width:0)+n.cellHorizontalPadding*2},provideEditor:()=>({editor:e1})},r1="line_chart",i1="area_chart",o1="bar_chart";function Ys(e,t,n){const r=so({y_min:0,y_max:1},t.columnTypeOptions),i={kind:te.Custom,allowOverlay:!1,copyData:"",contentAlign:t.contentAlignment,data:{kind:"sparkline-cell",values:[],displayValues:[],graphKind:n,yAxis:[r.y_min,r.y_max]}};return{...t,kind:e,sortMode:"default",isEditable:!1,getCell(o){if(Be(r.y_min)||Be(r.y_max)||Number.isNaN(r.y_min)||Number.isNaN(r.y_max)||r.y_min>=r.y_max)return _t("Invalid min/max y-axis configuration",`The y_min (${r.y_min}) and y_max (${r.y_max}) configuration options must be valid numbers.`);if(Be(o))return ks();const a=Ld(o),l=[];let s=[];if(a.length===0)return ks();let u=Number.MIN_SAFE_INTEGER,c=Number.MAX_SAFE_INTEGER;for(let d=0;d<a.length;d++){const f=no(a[d]);if(Number.isNaN(f)||Be(f))return _t(wt(a),`The value cannot be interpreted as a numeric array. ${wt(f)} is not a number.`);f>u&&(u=f),f<c&&(c=f),l.push(f)}return l.length>0&&(u>r.y_max||c<r.y_min)?s=l.map(d=>u-c===0?u>(r.y_max||1)?r.y_max||1:r.y_min||0:((r.y_max||1)-(r.y_min||0))*((d-c)/(u-c))+(r.y_min||0)):s=l,{...i,copyData:l.join(","),data:{...i.data,values:s,displayValues:l.map(d=>ua(d))},isMissingValue:Be(o)}},getCellValue(o){var a,l;return o.kind===te.Loading||((a=o.data)==null?void 0:a.values)===void 0?null:(l=o.data)==null?void 0:l.values}}}function zd(e){return Ys(r1,e,"line")}zd.isEditableType=!1;function Vd(e){return Ys(o1,e,"bar")}Vd.isEditableType=!1;function $d(e){return Ys(i1,e,"area")}$d.isEditableType=!1;function Xs(e){const t={kind:te.Boolean,data:!1,allowOverlay:!1,contentAlign:e.contentAlignment,readonly:!e.isEditable,style:"normal"};return{...e,kind:"checkbox",sortMode:"default",getCell(n){let r=null;return r=Fd(n),r===void 0?_t(wt(n),"The value cannot be interpreted as boolean."):{...t,data:r,isMissingValue:Be(r)}},getCellValue(n){return n.data===void 0?null:n.data}}}Xs.isEditableType=!0;function Hu(e,t){return t.startsWith("+")||t.startsWith("-")?e=e.utcOffset(t,!1):e=e.tz(t),e}function js(e,t,n,r,i,o,a){var h,m;const l=so({format:n,step:r,timezone:a},t.columnTypeOptions);let s;if(pt(l.timezone))try{s=((h=Hu(Ml(),l.timezone))==null?void 0:h.utcOffset())||void 0}catch{}let u;pt(l.min_value)&&(u=No(l.min_value)||void 0);let c;pt(l.max_value)&&(c=No(l.max_value)||void 0);const d={kind:te.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:((m=l.step)==null?void 0:m.toString())||"1",format:i,min:u,max:c}},f=p=>{const v=No(p);return v===null?!t.isRequired:!(v===void 0||pt(u)&&o(v)<o(u)||pt(c)&&o(v)>o(c))};return{...t,kind:e,sortMode:"default",validateInput:f,getCell(p,v){if(v===!0){const S=f(p);if(S===!1)return _t(wt(p),"Invalid input.");S instanceof Date&&(p=S)}const y=No(p);let b="",R="",O=s;if(y===void 0)return _t(wt(p),"The value cannot be interpreted as a datetime object.");if(y!==null){let S=Ml.utc(y);if(!S.isValid())return _t(wt(y),`Invalid moment date. This should never happen. Please report this bug.
|
187
|
+
Error: ${S.toString()}`);if(l.timezone){try{S=Hu(S,l.timezone)}catch(M){return _t(S.toISOString(),`Failed to adjust to the provided timezone: ${l.timezone}.
|
188
|
+
Error: ${M}`)}O=S.utcOffset()}try{R=Au(S,l.format||n,e)}catch(M){return _t(S.toISOString(),`Failed to format the date for rendering with: ${l.format}.
|
189
|
+
Error: ${M}`)}b=Au(S,n,e)}return{...d,copyData:b,isMissingValue:Be(y),data:{...d.data,date:y,displayDate:R,timezoneOffset:O}}},getCellValue(p){var v;return Be((v=p==null?void 0:p.data)==null?void 0:v.date)?null:o(p.data.date)}}}function Gs(e){var i,o,a;let t="YYYY-MM-DD HH:mm:ss";((i=e.columnTypeOptions)==null?void 0:i.step)>=60?t="YYYY-MM-DD HH:mm":((o=e.columnTypeOptions)==null?void 0:o.step)<1&&(t="YYYY-MM-DD HH:mm:ss.SSS");const n=wh(e.arrowType),r=pt(n)||pt((a=e==null?void 0:e.columnTypeOptions)==null?void 0:a.timezone);return js("datetime",e,r?t+"Z":t,1,"datetime-local",l=>r?l.toISOString():l.toISOString().replace("Z",""),n)}Gs.isEditableType=!0;function Ks(e){var n,r;let t="HH:mm:ss";return((n=e.columnTypeOptions)==null?void 0:n.step)>=60?t="HH:mm":((r=e.columnTypeOptions)==null?void 0:r.step)<1&&(t="HH:mm:ss.SSS"),js("time",e,t,1,"time",i=>i.toISOString().split("T")[1].replace("Z",""))}Ks.isEditableType=!0;function Zs(e){return js("date",e,"YYYY-MM-DD",1,"date",t=>t.toISOString().split("T")[0])}Zs.isEditableType=!0;function Nd(e){const t={kind:te.Image,data:[],displayData:[],readonly:!0,allowOverlay:!0,contentAlign:e.contentAlignment||"center",style:"normal"};return{...e,kind:"image",sortMode:"default",isEditable:!1,getCell(n){const r=pt(n)?[wt(n)]:[];return{...t,data:r,isMissingValue:!pt(n),displayData:r}},getCellValue(n){return n.data===void 0||n.data.length===0?null:n.data[0]}}}Nd.isEditableType=!1;function Bd(e){const t={kind:te.Custom,allowOverlay:!0,contentAlignment:e.contentAlignment,readonly:!0,style:e.isPinned?"faded":"normal",copyData:"",data:{kind:"json-cell",value:""}};return{...e,kind:"json",sortMode:"default",isEditable:!1,getCell(n){try{const r=pt(n)?ro(la(n)):"";return{...t,copyData:r,isMissingValue:Be(n),data:{...t.data,value:n,displayValue:r}}}catch(r){return _t(wt(n),`The value cannot be interpreted as a JSON string. Error: ${r}`)}},getCellValue(n){var r;return((r=n.data)==null?void 0:r.value)??null}}}Bd.isEditableType=!1;function Wd(e){const t=e.columnTypeOptions||{};let n;if(t.validate)try{n=new RegExp(t.validate,"us")}catch(a){n=`Invalid validate regex: ${t.validate}.
|
190
|
+
Error: ${a}`}let r;if(!Be(t.display_text)&&t.display_text.includes("(")&&t.display_text.includes(")"))try{r=new RegExp(t.display_text,"us")}catch{r=void 0}const i={kind:te.Uri,readonly:!e.isEditable,allowOverlay:!0,contentAlign:e.contentAlignment,style:"normal",hoverEffect:!0,data:"",displayData:"",copyData:""},o=a=>{if(Be(a))return!e.isRequired;const l=wt(a);return!(t.max_chars&&l.length>t.max_chars||n instanceof RegExp&&n.test(l)===!1)};return{...e,kind:"link",sortMode:"default",validateInput:o,getCell(a,l){if(Be(a))return{...i,data:null,isMissingValue:!0,onClickUri:()=>{}};const s=a;if(typeof n=="string")return _t(wt(s),n);if(l&&o(s)===!1)return _t(wt(s),"Invalid input.");let u="";return s&&(r!==void 0?u=Jv(r,s):u=t.display_text||s),{...i,data:s,displayData:u,isMissingValue:Be(s),onClickUri:c=>{window.open(s.startsWith("www.")?`https://${s}`:s,"_blank","noopener,noreferrer"),c.preventDefault()},copyData:s}},getCellValue(a){return Be(a.data)?null:a.data}}}Wd.isEditableType=!0;function Js(e){const t={kind:te.Bubble,data:[],allowOverlay:!0,contentAlign:e.contentAlignment,style:"normal"};return{...e,kind:"list",sortMode:"default",isEditable:!1,getCell(n){const r=Be(n)?[]:Ld(n);return{...t,data:r,isMissingValue:Be(n),copyData:Be(n)?"":wt(r.map(i=>typeof i=="string"&&i.includes(",")?i.replace(/,/g," "):i))}},getCellValue(n){return Be(n.data)||ba(n)?null:n.data}}}Js.isEditableType=!1;function Qs(e){const t=so({step:Ic(e.arrowType)?1:void 0,min_value:yh(e.arrowType)?0:void 0},e.columnTypeOptions),n=!t.format&&(Ch(e.arrowType)||Sh(e.arrowType)),r=Be(t.min_value)||t.min_value<0,i=pt(t.step)&&!Number.isNaN(t.step)?Ad(t.step):void 0,o={kind:te.Number,data:void 0,displayData:"",readonly:!e.isEditable,allowOverlay:!0,contentAlign:e.contentAlignment||n?"left":"right",style:e.isPinned?"faded":"normal",allowNegative:r,fixedDecimals:i,thousandSeparator:""},a=l=>{let s=no(l);if(Be(s))return!e.isRequired;if(Number.isNaN(s))return!1;let u=!1;return pt(t.max_value)&&s>t.max_value&&(s=t.max_value,u=!0),pt(t.min_value)&&s<t.min_value?!1:u?s:!0};return{...e,kind:"number",sortMode:"smart",validateInput:a,getCell(l,s){if(s===!0){const d=a(l);if(d===!1)return _t(wt(l),"Invalid input.");typeof d=="number"&&(l=d)}let u=no(l),c="";if(pt(u)){if(Number.isNaN(u))return _t(wt(l),"The value cannot be interpreted as a number.");if(pt(i)&&(u=Kv(u,i)),Number.isInteger(u)&&!Number.isSafeInteger(u))return _t(wt(l),"The value is larger than the maximum supported integer values in number columns (2^53).");try{n?c=vs(u,e.arrowType):c=ua(u,t.format,i)}catch(d){return _t(wt(u),pt(t.format)?`Failed to format the number based on the provided format configuration: (${t.format}). Error: ${d}`:`Failed to format the number. Error: ${d}`)}}return{...o,data:u,displayData:c,isMissingValue:Be(u),copyData:Be(u)?"":wt(u)}},getCellValue(l){return l.data===void 0?null:l.data}}}Qs.isEditableType=!0;function io(e){const t={kind:te.Text,data:"",displayData:"",allowOverlay:!0,contentAlignment:e.contentAlignment,allowWrapping:e.isWrappingAllowed,readonly:!0,style:e.isPinned?"faded":"normal"};return{...e,kind:"object",sortMode:"default",isEditable:!1,getCell(n){try{const r=pt(n)?wt(n):null,i=pt(r)?ro(r):"";return{...t,data:r,displayData:i,isMissingValue:Be(n)}}catch(r){return _t(wt(n),`The value cannot be interpreted as a string. Error: ${r}`)}},getCellValue(n){return n.data===void 0?null:n.data}}}io.isEditableType=!1;function Ud(e){const t=Ic(e.arrowType),n=so({min_value:0,max_value:t?100:1,step:t?1:.01,format:t?"%3d%%":"percent"},e.columnTypeOptions);let r;try{r=ua(n.max_value,n.format)}catch{r=wt(n.max_value)}const i=Be(n.step)||Number.isNaN(n.step)?void 0:Ad(n.step),o={kind:te.Custom,allowOverlay:!1,copyData:"",contentAlign:e.contentAlignment,data:{kind:"range-cell",min:n.min_value,max:n.max_value,step:n.step,value:n.min_value,label:String(n.min_value),measureLabel:r,readonly:!0}};return{...e,kind:"progress",sortMode:"smart",isEditable:!1,getCell(a){if(Be(a))return ks();if(Be(n.min_value)||Be(n.max_value)||Number.isNaN(n.min_value)||Number.isNaN(n.max_value)||n.min_value>=n.max_value)return _t("Invalid min/max parameters",`The min_value (${n.min_value}) and max_value (${n.max_value}) parameters must be valid numbers.`);if(Be(n.step)||Number.isNaN(n.step))return _t("Invalid step parameter",`The step parameter (${n.step}) must be a valid number.`);const l=no(a);if(Number.isNaN(l)||Be(l))return _t(wt(a),"The value cannot be interpreted as a number.");if(Number.isInteger(l)&&!Number.isSafeInteger(l))return _t(wt(a),"The value is larger than the maximum supported integer values in number columns (2^53).");let s="";try{s=ua(l,n.format,i)}catch(c){return _t(wt(l),pt(n.format)?`Failed to format the number based on the provided format configuration: (${n.format}). Error: ${c}`:`Failed to format the number. Error: ${c}`)}const u=Math.min(n.max_value,Math.max(n.min_value,l));return{...o,isMissingValue:Be(a),copyData:String(l),data:{...o.data,value:u,label:s}}},getCellValue(a){var l,s;return a.kind===te.Loading||((l=a.data)==null?void 0:l.value)===void 0?null:(s=a.data)==null?void 0:s.value}}}Ud.isEditableType=!1;function el(e){let t="string";const n=so({options:Tc(e.arrowType)?[!0,!1]:e.arrowType.categoricalOptions??[]},e.columnTypeOptions),r=new Set(n.options.map(o=>typeof o));r.size===1&&(r.has("number")||r.has("bigint")?t="number":r.has("boolean")&&(t="boolean"));const i={kind:te.Custom,allowOverlay:!0,copyData:"",contentAlign:e.contentAlignment,readonly:!e.isEditable,style:e.isPinned?"faded":"normal",data:{kind:"dropdown-cell",allowedValues:[...e.isRequired!==!0?[null]:[],...n.options.filter(o=>o!==null&&o!=="").map(o=>wt(o))],value:""}};return{...e,kind:"selectbox",sortMode:"default",getCell(o,a){let l=null;return pt(o)&&o!==""&&(l=wt(o)),a&&!i.data.allowedValues.includes(l)?_t(wt(l),"The value is not part of the allowed options."):{...i,isMissingValue:l===null,copyData:l||"",data:{...i.data,value:l}}},getCellValue(o){var a,l,s,u,c;return Be((a=o.data)==null?void 0:a.value)||((l=o.data)==null?void 0:l.value)===""?null:t==="number"?no((s=o.data)==null?void 0:s.value)??null:t==="boolean"?Fd((u=o.data)==null?void 0:u.value)??null:(c=o.data)==null?void 0:c.value}}}el.isEditableType=!0;function tl(e){const t=e.columnTypeOptions||{};let n;if(t.validate)try{n=new RegExp(t.validate,"us")}catch(o){n=`Invalid validate regex: ${t.validate}.
|
191
|
+
Error: ${o}`}const r={kind:te.Text,data:"",displayData:"",allowOverlay:!0,contentAlignment:e.contentAlignment,allowWrapping:e.isWrappingAllowed,readonly:!e.isEditable,style:e.isPinned?"faded":"normal"},i=o=>{if(Be(o))return!e.isRequired;let a=wt(o),l=!1;return t.max_chars&&a.length>t.max_chars&&(a=a.slice(0,t.max_chars),l=!0),n instanceof RegExp&&n.test(a)===!1?!1:l?a:!0};return{...e,kind:"text",sortMode:"default",validateInput:i,getCell(o,a){if(typeof n=="string")return _t(wt(o),n);if(a){const l=i(o);if(l===!1)return _t(wt(o),"Invalid input.");typeof l=="string"&&(o=l)}try{const l=pt(o)?wt(o):null,s=pt(l)?ro(l):"";return{...r,isMissingValue:Be(l),data:l,displayData:s}}catch(l){return _t("Incompatible value",`The value cannot be interpreted as string. Error: ${l}`)}},getCellValue(o){return o.data===void 0?null:o.data}}}tl.isEditableType=!0;const zu=mi("img",{target:"e17fx5ar0"})({maxWidth:"100%",maxHeight:"37.5rem",objectFit:"scale-down"}),a1=({urls:e})=>{const t=e&&e.length>0?e[0]:"";return t.startsWith("http")?Ht("a",{href:t,target:"_blank",rel:"noreferrer noopener",children:Ht(zu,{src:t})}):Ht(zu,{src:t})},Vu=new Map(Object.entries({object:io,text:tl,checkbox:Xs,selectbox:el,list:Js,number:Qs,link:Wd,datetime:Gs,date:Zs,time:Ks,line_chart:zd,bar_chart:Vd,area_chart:$d,image:Nd,progress:Ud,json:Bd})),s1=[n1];var l1=Dc();const u1=pr(l1);var us,$u;function c1(){if($u)return us;$u=1;var e=xh(),t=kh(),n=Mh(),r=Dc(),i=Rh(),o=Eh(),a=Ih(),l=Th(),s="[object Map]",u="[object Set]",c=Object.prototype,d=c.hasOwnProperty;function f(h){if(h==null)return!0;if(i(h)&&(r(h)||typeof h=="string"||typeof h.splice=="function"||o(h)||l(h)||n(h)))return!h.length;var m=t(h);if(m==s||m==u)return!h.size;if(a(h))return!e(h).length;for(var p in h)if(d.call(h,p))return!1;return!0}return us=f,us}var d1=c1();const f1=pr(d1);function Nu(e,t,n){const r=new RegExp(`${e}[,\\s].*{(?:[^}]*[\\s;]{1})?${t}:\\s*([^;}]+)[;]?.*}`,"gm");n=n.replace(/{/g," {");const i=r.exec(n);if(i)return i[1].trim()}function h1(e,t,n){const r={},i=Nu(t,"color",n);i&&(r.textDark=i);const o=Nu(t,"background-color",n);return o&&(r.bgCell=o),o==="yellow"&&i===void 0&&(r.textDark="#31333F"),r?{...e,themeOverride:r}:e}function g1(e){return Ah(e)||Hh(e)?tl:zh(e)?Gs:Oc(e)?Ks:Vh(e)?Zs:$h(e)||Nh(e)?io:Tc(e)?Xs:Bh(e)?Qs:Wh(e)?el:Uh(e)?Js:io}function qd(e){const t=e.length>0?e[e.length-1]:"",n=e.length>1?e.slice(0,-1).filter(r=>r!=="").join(" / "):void 0;return{title:t,group:n}}function nl(e){return{group:void 0,isEditable:!1,isIndex:!1,isPinned:!1,isHidden:!1,isStretched:!1,...e}}function m1(e,t){const n=e.columnNames.map(l=>l[t]),{title:r,group:i}=qd(n),o=e.columnTypes[t];let a=!0;return Fh(o)&&(a=!1),nl({id:`_index-${t}`,indexNumber:t,name:r,title:r,group:i,isEditable:a,arrowType:o,isIndex:!0,isPinned:!0})}function p1(e,t){const n=e.columnNames.map(a=>a[t]),{title:r,group:i}=qd(n),o=e.columnTypes[t];return nl({id:`_column-${r}-${t}`,indexNumber:t,name:r,isEditable:!0,title:r,arrowType:o,group:i})}function Yd(){return nl({id:"_empty-index",indexNumber:0,title:"",name:"",isEditable:!1,isIndex:!0,isPinned:!0,arrowType:{type:Ph.INDEX,arrowField:new Dh("",new Oh,!0),pandasType:void 0}})}function v1(e){const t=[],{dimensions:n}=e,r=n.numIndexColumns,i=n.numDataColumns;if(r===0&&i===0)return t.push(Yd()),t;for(let o=0;o<r;o++)t.push(m1(e,o));for(let o=0;o<i;o++)t.push(p1(e,o+r));return t}function b1(e,t,n,r=void 0){var o,a,l,s,u,c;let i;if(e.kind==="object"||e.kind==="json")i=e.getCell(pt(t.content)?ro(vs(t.content,t.contentType)):null);else if(["time","date","datetime"].includes(e.kind)&&pt(t.content)&&(typeof t.content=="number"||typeof t.content=="bigint")){let d;Oc(e.arrowType)&&pt((a=(o=t.field)==null?void 0:o.type)==null?void 0:a.unit)?d=_h(t.content,t.field):d=Nr.utc(Number(t.content)).toDate(),i=e.getCell(d)}else if(Lh(e.arrowType)){const d=Be(t.content)?null:vs(t.content,t.contentType);i=e.getCell(d)}else i=e.getCell(t.content);if(fi(i))return i;if(!e.isEditable){if(n&&pt(n==null?void 0:n.displayContent)){const d=ro(n.displayContent);i.kind===te.Text?i={...i,displayData:d}:i.kind===te.Number&&Be((l=e.columnTypeOptions)==null?void 0:l.format)?i={...i,displayData:d}:i.kind===te.Uri&&Be((s=e.columnTypeOptions)==null?void 0:s.display_text)?i={...i,displayData:d}:i.kind===te.Custom&&((u=i.data)==null?void 0:u.kind)==="date-picker-cell"&&Be((c=e.columnTypeOptions)==null?void 0:c.format)&&(i={...i,data:{...i.data,displayDate:d}})}r&&(n!=null&&n.cssId)&&(i=h1(i,n.cssId,r))}return i}const Zo="_index",Bu="_pos:",Wu={small:75,medium:200,large:400},Xd=Ds.getLogger("useColumnLoader");function w1(e){if(!Be(e)){if(typeof e=="number")return e;if(e in Wu)return Wu[e]}}const Bo=(e,t)=>ig(e,t,(r,i)=>{if(u1(i))return i});function y1(e,t){if(!t)return e;let n={};return e.isIndex&&t.has(Zo)&&(n=Bo(n,t.get(Zo)??{})),t.has(`${Bu}${e.indexNumber}`)&&(n=Bo(n,t.get(`${Bu}${e.indexNumber}`)??{})),t.has(e.name)&&e.name!==Zo&&(n=Bo(n,t.get(e.name)??{})),t.has(e.id)&&(n=Bo(n,t.get(e.id)??{})),f1(n)?e:Ec({...e},{title:n.label,width:w1(n.width),isEditable:pt(n.disabled)?!n.disabled:void 0,isHidden:n.hidden,isPinned:n.pinned,isRequired:n.required,columnTypeOptions:n.type_config,contentAlignment:n.alignment,defaultValue:n.default,help:n.help})}function C1(e){if(!e)return new Map;try{return new Map(Object.entries(JSON.parse(e)))}catch(t){return Xd.error(t),new Map}}function S1(e){var r;const t=(r=e.columnTypeOptions)==null?void 0:r.type;let n;return pt(t)&&(Vu.has(t)?n=Vu.get(t):Xd.warn(`Unknown column type configured in column configuration: ${t}`)),Be(n)&&(n=g1(e.arrowType)),n}function x1(e,t,n,r){const i=pa(),o=se.useMemo(()=>C1(e.columns),[e.columns]),[a,l]=se.useState(o);se.useEffect(()=>{l(o)},[o]);const s=e.useContainerWidth||pt(e.width)&&e.width>0,u=pt(e.rowHeight)&&e.rowHeight>$n("4rem");return{columns:se.useMemo(()=>{const d=v1(t).map(p=>{let v={...p,...y1(p,a),isStretched:s,isWrappingAllowed:u};const y=S1(v);return(e.editingMode===Bn.EditingMode.READ_ONLY||n||y.isEditableType===!1)&&(v={...v,isEditable:!1}),e.editingMode!==Bn.EditingMode.READ_ONLY&&v.isEditable==!0&&(v={...v,icon:"editable"},v.isRequired&&e.editingMode===Bn.EditingMode.DYNAMIC&&(v={...v,isHidden:!1})),y(v,i)}).filter(p=>!p.isHidden),f=[],h=[];r!=null&&r.length?(d.forEach(p=>{p.isIndex&&!r.includes(p.name)&&!r.includes(p.id)&&p.isPinned!==!1&&f.push(p)}),r.forEach(p=>{const v=d.find(y=>y.name===p||y.id===p);v&&(v.isPinned?f.push(v):h.push(v))})):d.forEach(p=>{p.isPinned?f.push(p):h.push(p)});const m=[...f,...h];return m.length>0?m:[io(Yd())]},[t,a,u,s,n,e.editingMode,r,i]),setColumnConfigMapping:l}}function Ji(e){return e.isIndex?Zo:Be(e.name)?"":e.name}class Wo{constructor(t){this.editedCells=new Map,this.addedRows=[],this.deletedRows=[],this.numRows=0,this.numRows=t}toJson(t){const n=new Map;t.forEach(o=>{n.set(o.indexNumber,o)});const r={edited_rows:{},added_rows:[],deleted_rows:[]};return this.editedCells.forEach((o,a,l)=>{const s={};o.forEach((u,c,d)=>{const f=n.get(c);f&&(s[Ji(f)]=f.getCellValue(u))}),r.edited_rows[a]=s}),this.addedRows.forEach(o=>{const a={};let l=!1;o.forEach((s,u,c)=>{const d=n.get(u);if(d){const f=d.getCellValue(s);d.isRequired&&d.isEditable&&ba(s)&&(l=!0),pt(f)&&(a[Ji(d)]=f)}}),l||r.added_rows.push(a)}),r.deleted_rows=this.deletedRows,JSON.stringify(r,(o,a)=>a===void 0?null:a)}fromJson(t,n){this.editedCells=new Map,this.addedRows=[],this.deletedRows=[];const r=JSON.parse(t),i=new Map;n.forEach(a=>{i.set(a.indexNumber,a)});const o=new Map;n.forEach(a=>{o.set(Ji(a),a)}),Object.keys(r.edited_rows).forEach(a=>{const l=Number(a),s=r.edited_rows[a];Object.keys(s).forEach(u=>{var f;const c=s[u],d=o.get(u);if(d){const h=d.getCell(c);h&&(this.editedCells.has(l)||this.editedCells.set(l,new Map),(f=this.editedCells.get(l))==null||f.set(d.indexNumber,h))}})}),r.added_rows.forEach(a=>{const l=new Map;n.forEach(s=>{l.set(s.indexNumber,s.getCell(null))}),Object.keys(a).forEach(s=>{const u=a[s],c=o.get(s);if(c){const d=c.getCell(u);d&&l.set(c.indexNumber,d)}}),this.addedRows.push(l)}),this.deletedRows=r.deleted_rows}isAddedRow(t){return t>=this.numRows}getCell(t,n){if(this.isAddedRow(n))return this.addedRows[n-this.numRows].get(t);const r=this.editedCells.get(n);if(r!==void 0)return r.get(t)}setCell(t,n,r){if(this.isAddedRow(n)){if(n-this.numRows>=this.addedRows.length)return;this.addedRows[n-this.numRows].set(t,r)}else this.editedCells.get(n)===void 0&&this.editedCells.set(n,new Map),this.editedCells.get(n).set(t,r)}addRow(t){this.addedRows.push(t)}deleteRows(t){t.sort((n,r)=>r-n).forEach(n=>{this.deleteRow(n)})}deleteRow(t){if(!(Be(t)||t<0)){if(this.isAddedRow(t)){this.addedRows.splice(t-this.numRows,1);return}this.deletedRows.includes(t)||(this.deletedRows.push(t),this.deletedRows=this.deletedRows.sort((n,r)=>n-r)),this.editedCells.delete(t)}}getOriginalRowIndex(t){let n=t;for(let r=0;r<this.deletedRows.length&&!(this.deletedRows[r]>n);r++)n+=1;return n}getNumRows(){return this.numRows+this.addedRows.length-this.deletedRows.length}}function k1(e,t,n,r,i,o){const a=se.useMemo(()=>e.filter(c=>c.isPinned).reduce((c,d)=>c+(d.width??r*2),0)>n*.6,[e,n,r]),l=t||a?0:e.filter(c=>c.isPinned).length,s=se.useCallback(c=>{o(d=>{const f=new Map(d),h=f.get(c);return f.set(c,{...h||{},pinned:!1}),f}),i(!0,!1)},[i,o]);return{pinColumn:se.useCallback(c=>{o(d=>{const f=new Map(d),h=f.get(c);return f.set(c,{...h||{},pinned:!0}),f}),i(!0,!1)},[i,o]),unpinColumn:s,freezeColumns:l}}function M1(e,t,n,r,i){return{onColumnMoved:se.useCallback((a,l)=>{const s=[...e],[u]=s.splice(a,1);s.splice(l,0,u),l<t&&!u.isPinned?n(u.id):l>=t&&u.isPinned&&r(u.id),i(s.map(c=>c.id))},[e,t,n,r,i])}}function R1(e){const[t,n]=g.useState(()=>new Map),r=se.useCallback((o,a,l,s)=>{o.id&&n(new Map(t).set(o.id,s))},[t]);return{columns:se.useMemo(()=>e.map(o=>o.id&&t.has(o.id)&&t.get(o.id)!==void 0?{...o,width:t.get(o.id),grow:0}:o),[e,t]),onColumnResize:r}}function E1(e){var t,n;switch(e.kind){case te.Number:return((t=e.data)==null?void 0:t.toString())??"";case te.Boolean:return((n=e.data)==null?void 0:n.toString())??"";case te.Markdown:case te.RowID:case te.Text:case te.Uri:return e.data??"";case te.Bubble:case te.Image:return e.data.join("");case te.Drilldown:return e.data.map(r=>r.text).join("");case te.Protected:case te.Loading:return"";case te.Custom:return e.copyData}}function Uu(e){if(typeof e=="number")return e;if(e.length>0){const t=Number(e);isNaN(t)||(e=t)}return e}function I1(e,t){return e=Uu(e),t=Uu(t),typeof e=="string"&&typeof t=="string"?e.localeCompare(t):typeof e=="number"&&typeof t=="number"?e===t?0:e>t?1:-1:e==t?0:e>t?1:-1}function T1(e,t){return e>t?1:e===t?0:-1}function D1(e){const{sort:t,rows:n,getCellContent:r}=e;let i=t===void 0?void 0:e.columns.findIndex(u=>t.column===u||u.id!==void 0&&t.column.id===u.id);i===-1&&(i=void 0);const o=(t==null?void 0:t.direction)??"asc",a=g.useMemo(()=>{if(i===void 0)return;const u=new Array(n),c=[i,0];for(let f=0;f<n;f++)c[1]=f,u[f]=E1(r(c));let d;return(t==null?void 0:t.mode)==="raw"?d=ar(n).sort((f,h)=>T1(u[f],u[h])):(t==null?void 0:t.mode)==="smart"?d=ar(n).sort((f,h)=>I1(u[f],u[h])):d=ar(n).sort((f,h)=>u[f].localeCompare(u[h])),o==="desc"&&d.reverse(),d},[r,n,t==null?void 0:t.mode,o,i]),l=g.useCallback(u=>a===void 0?u:a[u],[a]),s=g.useCallback(([u,c])=>a===void 0?r([u,c]):(c=a[c],r([u,c])),[r,a]);return a===void 0?{getCellContent:e.getCellContent,getOriginalIndex:l}:{getOriginalIndex:l,getCellContent:s}}function O1(e,t){return t===void 0?e:e.map(n=>n.id===t.column.id?{...n,title:t.direction==="asc"?`↑ ${n.title}`:`↓ ${n.title}`}:n)}function P1(e,t,n){const[r,i]=se.useState(),{getCellContent:o,getOriginalIndex:a}=D1({columns:t.map(u=>Ms(u)),getCellContent:n,rows:e,sort:r}),l=se.useMemo(()=>O1(t,r),[t,r]),s=se.useCallback((u,c,d)=>{const f=l[u];let h;c==="auto"?(h="asc",r&&r.column.id===f.id&&(r.direction==="asc"?h="desc":h=void 0)):h=c,h===void 0||d&&h===(r==null?void 0:r.direction)?i(void 0):i({column:Ms(f),direction:h,mode:f.sortMode})},[r,l]);return{columns:l,sortColumn:s,getOriginalIndex:a,getCellContent:o}}function _1(){return{provideEditor:g.useCallback(t=>{if(t.kind===te.Text&&t.readonly&&jv(t.data))return{editor:t1}},[])}}const L1={kind:te.Custom,isMatch:e=>e.data.kind==="sparkline-cell",needsHover:!0,needsHoverPosition:!0,draw:(e,t)=>{const{ctx:n,theme:r,rect:i,hoverAmount:o,hoverX:a}=e;let{values:l,yAxis:s,color:u,graphKind:c="area",displayValues:d,hideAxis:f}=t.data;const[h,m]=s;if(l.length===0)return!0;l=l.map(M=>Math.min(1,Math.max(0,(M-h)/(m-h))));const p=r.cellHorizontalPadding,v=p+i.x,y=i.y+3,b=i.height-6,R=i.width-p*2,O=m-h,S=m<=0?y:h>=0?y+b:y+b*(m/O);if(!f&&h<=0&&m>=0&&(n.beginPath(),n.moveTo(v,S),n.lineTo(v+R,S),n.globalAlpha=.4,n.lineWidth=1,n.strokeStyle=r.textLight,n.stroke(),n.globalAlpha=1),c==="bar"){n.beginPath();const M=2,_=(l.length-1)*M,E=(R-_)/l.length;let x=v;for(const L of l){const D=y+b-L*b;n.moveTo(x,S),n.lineTo(x+E,S),n.lineTo(x+E,D),n.lineTo(x,D),x+=E+M}n.fillStyle=t.data.color??r.accentColor,n.fill()}else{l.length===1&&(l=[l[0],l[0]],d&&(d=[d[0],d[0]])),n.beginPath();const M=(i.width-16)/(l.length-1),_=l.map((x,L)=>({x:v+M*L,y:y+b-x*b}));n.moveTo(_[0].x,_[0].y);let E=0;if(_.length>2)for(E=1;E<_.length-2;E++){const x=(_[E].x+_[E+1].x)/2,L=(_[E].y+_[E+1].y)/2;n.quadraticCurveTo(_[E].x,_[E].y,x,L)}if(n.quadraticCurveTo(_[E].x,_[E].y,_[E+1].x,_[E+1].y),n.strokeStyle=u??r.accentColor,n.lineWidth=1+o*.5,n.stroke(),n.lineTo(i.x+i.width-p,S),n.lineTo(i.x+p,S),n.closePath(),c==="area"){n.globalAlpha=.2+.2*o;const x=n.createLinearGradient(0,y,0,y+b*1.4);x.addColorStop(0,u??r.accentColor);const[L,D,C]=ra(u??r.accentColor);x.addColorStop(1,`rgba(${L}, ${D}, ${C}, 0)`),n.fillStyle=x,n.fill(),n.globalAlpha=1}if(a!==void 0&&(c==="line"||c==="area")&&d!==void 0){n.beginPath();const x=Math.min(l.length-1,Math.max(0,Math.round((a-p)/M)));n.moveTo(v+x*M,i.y+1),n.lineTo(v+x*M,i.y+i.height),n.lineWidth=1,n.strokeStyle=r.textLight,n.stroke(),n.save(),n.font=`8px ${r.fontFamily}`,n.fillStyle=r.textMedium,n.textBaseline="top",n.fillText(d[x],v,i.y+r.cellVerticalPadding),n.restore()}}return!0},provideEditor:()=>{},onPaste:(e,t)=>t};function qu(e,t,n,r,i,o){if(!(r<=0||i<=0)){if(typeof o=="number"&&o<=0){e.rect(t,n,r,i);return}typeof o=="number"&&(o={tl:o,tr:o,br:o,bl:o}),o={tl:Math.min(o.tl,i/2,r/2),tr:Math.min(o.tr,i/2,r/2),bl:Math.min(o.bl,i/2,r/2),br:Math.min(o.br,i/2,r/2)},o.tl=Math.max(0,o.tl),o.tr=Math.max(0,o.tr),o.br=Math.max(0,o.br),o.bl=Math.max(0,o.bl),e.moveTo(t+o.tl,n),e.arcTo(t+r,n,t+r,n+o.tr,o.tr),e.arcTo(t+r,n+i,t+r-o.br,n+i,o.br),e.arcTo(t,n+i,t,n+i-o.bl,o.bl),e.arcTo(t,n,t+o.tl,n,o.tl)}}function Yu(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function qe(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Yu(Object(n),!0).forEach(function(r){qi(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Yu(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var F1=["defaultInputValue","defaultMenuIsOpen","defaultValue","inputValue","menuIsOpen","onChange","onInputChange","onMenuClose","onMenuOpen","value"];function A1(e){var t=e.defaultInputValue,n=t===void 0?"":t,r=e.defaultMenuIsOpen,i=r===void 0?!1:r,o=e.defaultValue,a=o===void 0?null:o,l=e.inputValue,s=e.menuIsOpen,u=e.onChange,c=e.onInputChange,d=e.onMenuClose,f=e.onMenuOpen,h=e.value,m=vr(e,F1),p=g.useState(l!==void 0?l:n),v=hr(p,2),y=v[0],b=v[1],R=g.useState(s!==void 0?s:i),O=hr(R,2),S=O[0],M=O[1],_=g.useState(h!==void 0?h:a),E=hr(_,2),x=E[0],L=E[1],D=g.useCallback(function(U,oe){typeof u=="function"&&u(U,oe),L(U)},[u]),C=g.useCallback(function(U,oe){var ee;typeof c=="function"&&(ee=c(U,oe)),b(ee!==void 0?ee:U)},[c]),I=g.useCallback(function(){typeof f=="function"&&f(),M(!0)},[f]),T=g.useCallback(function(){typeof d=="function"&&d(),M(!1)},[d]),k=l!==void 0?l:y,V=s!==void 0?s:S,N=h!==void 0?h:x;return qe(qe({},m),{},{inputValue:k,menuIsOpen:V,onChange:D,onInputChange:C,onMenuClose:T,onMenuOpen:I,value:N})}function H1(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}const z1=Math.min,V1=Math.max,ca=Math.round,Uo=Math.floor,da=e=>({x:e,y:e});function $1(e){const{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function wa(){return typeof window<"u"}function jd(e){return Kd(e)?(e.nodeName||"").toLowerCase():"#document"}function mr(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Gd(e){var t;return(t=(Kd(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Kd(e){return wa()?e instanceof Node||e instanceof mr(e).Node:!1}function N1(e){return wa()?e instanceof Element||e instanceof mr(e).Element:!1}function rl(e){return wa()?e instanceof HTMLElement||e instanceof mr(e).HTMLElement:!1}function Xu(e){return!wa()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof mr(e).ShadowRoot}function Zd(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=il(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(i)}function B1(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function W1(e){return["html","body","#document"].includes(jd(e))}function il(e){return mr(e).getComputedStyle(e)}function U1(e){if(jd(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Xu(e)&&e.host||Gd(e);return Xu(t)?t.host:t}function Jd(e){const t=U1(e);return W1(t)?e.ownerDocument?e.ownerDocument.body:e.body:rl(t)&&Zd(t)?t:Jd(t)}function fa(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=Jd(e),o=i===((r=e.ownerDocument)==null?void 0:r.body),a=mr(i);if(o){const l=Rs(a);return t.concat(a,a.visualViewport||[],Zd(i)?i:[],l&&n?fa(l):[])}return t.concat(i,fa(i,[],n))}function Rs(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function q1(e){const t=il(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=rl(e),o=i?e.offsetWidth:n,a=i?e.offsetHeight:r,l=ca(n)!==o||ca(r)!==a;return l&&(n=o,r=a),{width:n,height:r,$:l}}function ol(e){return N1(e)?e:e.contextElement}function ju(e){const t=ol(e);if(!rl(t))return da(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:o}=q1(t);let a=(o?ca(n.width):n.width)/r,l=(o?ca(n.height):n.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!l||!Number.isFinite(l))&&(l=1),{x:a,y:l}}const Y1=da(0);function X1(e){const t=mr(e);return!B1()||!t.visualViewport?Y1:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function j1(e,t,n){return!1}function Gu(e,t,n,r){t===void 0&&(t=!1);const i=e.getBoundingClientRect(),o=ol(e);let a=da(1);t&&(a=ju(e));const l=j1()?X1(o):da(0);let s=(i.left+l.x)/a.x,u=(i.top+l.y)/a.y,c=i.width/a.x,d=i.height/a.y;if(o){const f=mr(o),h=r;let m=f,p=Rs(m);for(;p&&r&&h!==m;){const v=ju(p),y=p.getBoundingClientRect(),b=il(p),R=y.left+(p.clientLeft+parseFloat(b.paddingLeft))*v.x,O=y.top+(p.clientTop+parseFloat(b.paddingTop))*v.y;s*=v.x,u*=v.y,c*=v.x,d*=v.y,s+=R,u+=O,m=mr(p),p=Rs(m)}}return $1({width:c,height:d,x:s,y:u})}function G1(e,t){let n=null,r;const i=Gd(e);function o(){var l;clearTimeout(r),(l=n)==null||l.disconnect(),n=null}function a(l,s){l===void 0&&(l=!1),s===void 0&&(s=1),o();const{left:u,top:c,width:d,height:f}=e.getBoundingClientRect();if(l||t(),!d||!f)return;const h=Uo(c),m=Uo(i.clientWidth-(u+d)),p=Uo(i.clientHeight-(c+f)),v=Uo(u),b={rootMargin:-h+"px "+-m+"px "+-p+"px "+-v+"px",threshold:V1(0,z1(1,s))||1};let R=!0;function O(S){const M=S[0].intersectionRatio;if(M!==s){if(!R)return a();M?a(!1,M):r=setTimeout(()=>{a(!1,1e-7)},1e3)}R=!1}try{n=new IntersectionObserver(O,{...b,root:i.ownerDocument})}catch{n=new IntersectionObserver(O,b)}n.observe(e)}return a(!0),o}function K1(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:s=!1}=r,u=ol(e),c=i||o?[...u?fa(u):[],...fa(t)]:[];c.forEach(y=>{i&&y.addEventListener("scroll",n,{passive:!0}),o&&y.addEventListener("resize",n)});const d=u&&l?G1(u,n):null;let f=-1,h=null;a&&(h=new ResizeObserver(y=>{let[b]=y;b&&b.target===u&&h&&(h.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var R;(R=h)==null||R.observe(t)})),n()}),u&&!s&&h.observe(u),h.observe(t));let m,p=s?Gu(e):null;s&&v();function v(){const y=Gu(e);p&&(y.x!==p.x||y.y!==p.y||y.width!==p.width||y.height!==p.height)&&n(),p=y,m=requestAnimationFrame(v)}return n(),()=>{var y;c.forEach(b=>{i&&b.removeEventListener("scroll",n),o&&b.removeEventListener("resize",n)}),d==null||d(),(y=h)==null||y.disconnect(),h=null,s&&cancelAnimationFrame(m)}}var Es=g.useLayoutEffect,Z1=["className","clearValue","cx","getStyles","getClassNames","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"],ha=function(){};function J1(e,t){return t?t[0]==="-"?e+t:e+"__"+t:e}function Q1(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];var o=[].concat(r);if(t&&e)for(var a in t)t.hasOwnProperty(a)&&t[a]&&o.push("".concat(J1(e,a)));return o.filter(function(l){return l}).map(function(l){return String(l).trim()}).join(" ")}var Ku=function(t){return lb(t)?t.filter(Boolean):qh(t)==="object"&&t!==null?[t]:[]},Qd=function(t){t.className,t.clearValue,t.cx,t.getStyles,t.getClassNames,t.getValue,t.hasValue,t.isMulti,t.isRtl,t.options,t.selectOption,t.selectProps,t.setValue,t.theme;var n=vr(t,Z1);return qe({},n)},tn=function(t,n,r){var i=t.cx,o=t.getStyles,a=t.getClassNames,l=t.className;return{css:o(n,t),className:i(r??{},a(n,t),l)}};function ya(e){return[document.documentElement,document.body,window].indexOf(e)>-1}function eb(e){return ya(e)?window.innerHeight:e.clientHeight}function ef(e){return ya(e)?window.pageYOffset:e.scrollTop}function ga(e,t){if(ya(e)){window.scrollTo(0,t);return}e.scrollTop=t}function tb(e){var t=getComputedStyle(e),n=t.position==="absolute",r=/(auto|scroll)/;if(t.position==="fixed")return document.documentElement;for(var i=e;i=i.parentElement;)if(t=getComputedStyle(i),!(n&&t.position==="static")&&r.test(t.overflow+t.overflowY+t.overflowX))return i;return document.documentElement}function nb(e,t,n,r){return n*((e=e/r-1)*e*e+1)+t}function qo(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:200,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:ha,i=ef(e),o=t-i,a=10,l=0;function s(){l+=a;var u=nb(l,i,o,n);ga(e,u),l<n?window.requestAnimationFrame(s):r(e)}s()}function Zu(e,t){var n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),i=t.offsetHeight/3;r.bottom+i>n.bottom?ga(e,Math.min(t.offsetTop+t.clientHeight-e.offsetHeight+i,e.scrollHeight)):r.top-i<n.top&&ga(e,Math.max(t.offsetTop-i,0))}function rb(e){var t=e.getBoundingClientRect();return{bottom:t.bottom,height:t.height,left:t.left,right:t.right,top:t.top,width:t.width}}function Ju(){try{return document.createEvent("TouchEvent"),!0}catch{return!1}}function ib(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch{return!1}}var tf=!1,ob={get passive(){return tf=!0}},Yo=typeof window<"u"?window:{};Yo.addEventListener&&Yo.removeEventListener&&(Yo.addEventListener("p",ha,ob),Yo.removeEventListener("p",ha,!1));var ab=tf;function sb(e){return e!=null}function lb(e){return Array.isArray(e)}function Xo(e,t,n){return e?t:n}var ub=function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];var o=Object.entries(t).filter(function(a){var l=hr(a,1),s=l[0];return!r.includes(s)});return o.reduce(function(a,l){var s=hr(l,2),u=s[0],c=s[1];return a[u]=c,a},{})},cb=["children","innerProps"],db=["children","innerProps"];function fb(e){var t=e.maxHeight,n=e.menuEl,r=e.minHeight,i=e.placement,o=e.shouldScroll,a=e.isFixedPosition,l=e.controlHeight,s=tb(n),u={placement:"bottom",maxHeight:t};if(!n||!n.offsetParent)return u;var c=s.getBoundingClientRect(),d=c.height,f=n.getBoundingClientRect(),h=f.bottom,m=f.height,p=f.top,v=n.offsetParent.getBoundingClientRect(),y=v.top,b=a?window.innerHeight:eb(s),R=ef(s),O=parseInt(getComputedStyle(n).marginBottom,10),S=parseInt(getComputedStyle(n).marginTop,10),M=y-S,_=b-p,E=M+R,x=d-R-p,L=h-b+R+O,D=R+p-S,C=160;switch(i){case"auto":case"bottom":if(_>=m)return{placement:"bottom",maxHeight:t};if(x>=m&&!a)return o&&qo(s,L,C),{placement:"bottom",maxHeight:t};if(!a&&x>=r||a&&_>=r){o&&qo(s,L,C);var I=a?_-O:x-O;return{placement:"bottom",maxHeight:I}}if(i==="auto"||a){var T=t,k=a?M:E;return k>=r&&(T=Math.min(k-O-l,t)),{placement:"top",maxHeight:T}}if(i==="bottom")return o&&ga(s,L),{placement:"bottom",maxHeight:t};break;case"top":if(M>=m)return{placement:"top",maxHeight:t};if(E>=m&&!a)return o&&qo(s,D,C),{placement:"top",maxHeight:t};if(!a&&E>=r||a&&M>=r){var V=t;return(!a&&E>=r||a&&M>=r)&&(V=a?M-S:E-S),o&&qo(s,D,C),{placement:"top",maxHeight:V}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'.concat(i,'".'))}return u}function hb(e){var t={bottom:"top",top:"bottom"};return e?t[e]:"bottom"}var nf=function(t){return t==="auto"?"bottom":t},gb=function(t,n){var r,i=t.placement,o=t.theme,a=o.borderRadius,l=o.spacing,s=o.colors;return qe((r={label:"menu"},qi(r,hb(i),"100%"),qi(r,"position","absolute"),qi(r,"width","100%"),qi(r,"zIndex",1),r),n?{}:{backgroundColor:s.neutral0,borderRadius:a,boxShadow:"0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)",marginBottom:l.menuGutter,marginTop:l.menuGutter})},rf=g.createContext(null),mb=function(t){var n=t.children,r=t.minMenuHeight,i=t.maxMenuHeight,o=t.menuPlacement,a=t.menuPosition,l=t.menuShouldScrollIntoView,s=t.theme,u=g.useContext(rf)||{},c=u.setPortalPlacement,d=g.useRef(null),f=g.useState(i),h=hr(f,2),m=h[0],p=h[1],v=g.useState(null),y=hr(v,2),b=y[0],R=y[1],O=s.spacing.controlHeight;return Es(function(){var S=d.current;if(S){var M=a==="fixed",_=l&&!M,E=fb({maxHeight:i,menuEl:S,minHeight:r,placement:o,shouldScroll:_,isFixedPosition:M,controlHeight:O});p(E.maxHeight),R(E.placement),c==null||c(E.placement)}},[i,o,a,l,r,c,O]),n({ref:d,placerProps:qe(qe({},t),{},{placement:b||nf(o),maxHeight:m})})},pb=function(t){var n=t.children,r=t.innerRef,i=t.innerProps;return Ne("div",tt({},tn(t,"menu",{menu:!0}),{ref:r},i),n)},vb=pb,bb=function(t,n){var r=t.maxHeight,i=t.theme.spacing.baseUnit;return qe({maxHeight:r,overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},n?{}:{paddingBottom:i,paddingTop:i})},wb=function(t){var n=t.children,r=t.innerProps,i=t.innerRef,o=t.isMulti;return Ne("div",tt({},tn(t,"menuList",{"menu-list":!0,"menu-list--is-multi":o}),{ref:i},r),n)},of=function(t,n){var r=t.theme,i=r.spacing.baseUnit,o=r.colors;return qe({textAlign:"center"},n?{}:{color:o.neutral40,padding:"".concat(i*2,"px ").concat(i*3,"px")})},yb=of,Cb=of,Sb=function(t){var n=t.children,r=n===void 0?"No options":n,i=t.innerProps,o=vr(t,cb);return Ne("div",tt({},tn(qe(qe({},o),{},{children:r,innerProps:i}),"noOptionsMessage",{"menu-notice":!0,"menu-notice--no-options":!0}),i),r)},xb=function(t){var n=t.children,r=n===void 0?"Loading...":n,i=t.innerProps,o=vr(t,db);return Ne("div",tt({},tn(qe(qe({},o),{},{children:r,innerProps:i}),"loadingMessage",{"menu-notice":!0,"menu-notice--loading":!0}),i),r)},kb=function(t){var n=t.rect,r=t.offset,i=t.position;return{left:n.left,position:i,top:r,width:n.width,zIndex:1}},Mb=function(t){var n=t.appendTo,r=t.children,i=t.controlElement,o=t.innerProps,a=t.menuPlacement,l=t.menuPosition,s=g.useRef(null),u=g.useRef(null),c=g.useState(nf(a)),d=hr(c,2),f=d[0],h=d[1],m=g.useMemo(function(){return{setPortalPlacement:h}},[]),p=g.useState(null),v=hr(p,2),y=v[0],b=v[1],R=g.useCallback(function(){if(i){var _=rb(i),E=l==="fixed"?0:window.pageYOffset,x=_[f]+E;(x!==(y==null?void 0:y.offset)||_.left!==(y==null?void 0:y.rect.left)||_.width!==(y==null?void 0:y.rect.width))&&b({offset:x,rect:_})}},[i,l,f,y==null?void 0:y.offset,y==null?void 0:y.rect.left,y==null?void 0:y.rect.width]);Es(function(){R()},[R]);var O=g.useCallback(function(){typeof u.current=="function"&&(u.current(),u.current=null),i&&s.current&&(u.current=K1(i,s.current,R,{elementResize:"ResizeObserver"in window}))},[i,R]);Es(function(){O()},[O]);var S=g.useCallback(function(_){s.current=_,O()},[O]);if(!n&&l!=="fixed"||!y)return null;var M=Ne("div",tt({ref:S},tn(qe(qe({},t),{},{offset:y.offset,position:l,rect:y.rect}),"menuPortal",{"menu-portal":!0}),o),r);return Ne(rf.Provider,{value:m},n?Pc.createPortal(M,n):M)},Rb=function(t){var n=t.isDisabled,r=t.isRtl;return{label:"container",direction:r?"rtl":void 0,pointerEvents:n?"none":void 0,position:"relative"}},Eb=function(t){var n=t.children,r=t.innerProps,i=t.isDisabled,o=t.isRtl;return Ne("div",tt({},tn(t,"container",{"--is-disabled":i,"--is-rtl":o}),r),n)},Ib=function(t,n){var r=t.theme.spacing,i=t.isMulti,o=t.hasValue,a=t.selectProps.controlShouldRenderValue;return qe({alignItems:"center",display:i&&o&&a?"flex":"grid",flex:1,flexWrap:"wrap",WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"},n?{}:{padding:"".concat(r.baseUnit/2,"px ").concat(r.baseUnit*2,"px")})},Tb=function(t){var n=t.children,r=t.innerProps,i=t.isMulti,o=t.hasValue;return Ne("div",tt({},tn(t,"valueContainer",{"value-container":!0,"value-container--is-multi":i,"value-container--has-value":o}),r),n)},Db=function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},Ob=function(t){var n=t.children,r=t.innerProps;return Ne("div",tt({},tn(t,"indicatorsContainer",{indicators:!0}),r),n)},Qu,Pb=["size"],_b=["innerProps","isRtl","size"],Lb={name:"8mmkcg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0"},af=function(t){var n=t.size,r=vr(t,Pb);return Ne("svg",tt({height:n,width:n,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:Lb},r))},al=function(t){return Ne(af,tt({size:20},t),Ne("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},sf=function(t){return Ne(af,tt({size:20},t),Ne("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))},lf=function(t,n){var r=t.isFocused,i=t.theme,o=i.spacing.baseUnit,a=i.colors;return qe({label:"indicatorContainer",display:"flex",transition:"color 150ms"},n?{}:{color:r?a.neutral60:a.neutral20,padding:o*2,":hover":{color:r?a.neutral80:a.neutral40}})},Fb=lf,Ab=function(t){var n=t.children,r=t.innerProps;return Ne("div",tt({},tn(t,"dropdownIndicator",{indicator:!0,"dropdown-indicator":!0}),r),n||Ne(sf,null))},Hb=lf,zb=function(t){var n=t.children,r=t.innerProps;return Ne("div",tt({},tn(t,"clearIndicator",{indicator:!0,"clear-indicator":!0}),r),n||Ne(al,null))},Vb=function(t,n){var r=t.isDisabled,i=t.theme,o=i.spacing.baseUnit,a=i.colors;return qe({label:"indicatorSeparator",alignSelf:"stretch",width:1},n?{}:{backgroundColor:r?a.neutral10:a.neutral20,marginBottom:o*2,marginTop:o*2})},$b=function(t){var n=t.innerProps;return Ne("span",tt({},n,tn(t,"indicatorSeparator",{"indicator-separator":!0})))},Nb=Yh(Qu||(Qu=H1([`
|
192
|
+
0%, 80%, 100% { opacity: 0; }
|
193
|
+
40% { opacity: 1; }
|
194
|
+
`]))),Bb=function(t,n){var r=t.isFocused,i=t.size,o=t.theme,a=o.colors,l=o.spacing.baseUnit;return qe({label:"loadingIndicator",display:"flex",transition:"color 150ms",alignSelf:"center",fontSize:i,lineHeight:1,marginRight:i,textAlign:"center",verticalAlign:"middle"},n?{}:{color:r?a.neutral60:a.neutral20,padding:l*2})},cs=function(t){var n=t.delay,r=t.offset;return Ne("span",{css:_c({animation:"".concat(Nb," 1s ease-in-out ").concat(n,"ms infinite;"),backgroundColor:"currentColor",borderRadius:"1em",display:"inline-block",marginLeft:r?"1em":void 0,height:"1em",verticalAlign:"top",width:"1em"},"","")})},Wb=function(t){var n=t.innerProps,r=t.isRtl,i=t.size,o=i===void 0?4:i,a=vr(t,_b);return Ne("div",tt({},tn(qe(qe({},a),{},{innerProps:n,isRtl:r,size:o}),"loadingIndicator",{indicator:!0,"loading-indicator":!0}),n),Ne(cs,{delay:0,offset:r}),Ne(cs,{delay:160,offset:!0}),Ne(cs,{delay:320,offset:!r}))},Ub=function(t,n){var r=t.isDisabled,i=t.isFocused,o=t.theme,a=o.colors,l=o.borderRadius,s=o.spacing;return qe({label:"control",alignItems:"center",cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:s.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms"},n?{}:{backgroundColor:r?a.neutral5:a.neutral0,borderColor:r?a.neutral10:i?a.primary:a.neutral20,borderRadius:l,borderStyle:"solid",borderWidth:1,boxShadow:i?"0 0 0 1px ".concat(a.primary):void 0,"&:hover":{borderColor:i?a.primary:a.neutral30}})},qb=function(t){var n=t.children,r=t.isDisabled,i=t.isFocused,o=t.innerRef,a=t.innerProps,l=t.menuIsOpen;return Ne("div",tt({ref:o},tn(t,"control",{control:!0,"control--is-disabled":r,"control--is-focused":i,"control--menu-is-open":l}),a,{"aria-disabled":r||void 0}),n)},Yb=qb,Xb=["data"],jb=function(t,n){var r=t.theme.spacing;return n?{}:{paddingBottom:r.baseUnit*2,paddingTop:r.baseUnit*2}},Gb=function(t){var n=t.children,r=t.cx,i=t.getStyles,o=t.getClassNames,a=t.Heading,l=t.headingProps,s=t.innerProps,u=t.label,c=t.theme,d=t.selectProps;return Ne("div",tt({},tn(t,"group",{group:!0}),s),Ne(a,tt({},l,{selectProps:d,theme:c,getStyles:i,getClassNames:o,cx:r}),u),Ne("div",null,n))},Kb=function(t,n){var r=t.theme,i=r.colors,o=r.spacing;return qe({label:"group",cursor:"default",display:"block"},n?{}:{color:i.neutral40,fontSize:"75%",fontWeight:500,marginBottom:"0.25em",paddingLeft:o.baseUnit*3,paddingRight:o.baseUnit*3,textTransform:"uppercase"})},Zb=function(t){var n=Qd(t);n.data;var r=vr(n,Xb);return Ne("div",tt({},tn(t,"groupHeading",{"group-heading":!0}),r))},Jb=Gb,Qb=["innerRef","isDisabled","isHidden","inputClassName"],ew=function(t,n){var r=t.isDisabled,i=t.value,o=t.theme,a=o.spacing,l=o.colors;return qe(qe({visibility:r?"hidden":"visible",transform:i?"translateZ(0)":""},tw),n?{}:{margin:a.baseUnit/2,paddingBottom:a.baseUnit/2,paddingTop:a.baseUnit/2,color:l.neutral80})},uf={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},tw={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content","&:after":qe({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},uf)},nw=function(t){return qe({label:"input",color:"inherit",background:0,opacity:t?0:1,width:"100%"},uf)},rw=function(t){var n=t.cx,r=t.value,i=Qd(t),o=i.innerRef,a=i.isDisabled,l=i.isHidden,s=i.inputClassName,u=vr(i,Qb);return Ne("div",tt({},tn(t,"input",{"input-container":!0}),{"data-value":r||""}),Ne("input",tt({className:n({input:!0},s),ref:o,style:nw(l),disabled:a},u)))},iw=rw,ow=function(t,n){var r=t.theme,i=r.spacing,o=r.borderRadius,a=r.colors;return qe({label:"multiValue",display:"flex",minWidth:0},n?{}:{backgroundColor:a.neutral10,borderRadius:o/2,margin:i.baseUnit/2})},aw=function(t,n){var r=t.theme,i=r.borderRadius,o=r.colors,a=t.cropWithEllipsis;return qe({overflow:"hidden",textOverflow:a||a===void 0?"ellipsis":void 0,whiteSpace:"nowrap"},n?{}:{borderRadius:i/2,color:o.neutral80,fontSize:"85%",padding:3,paddingLeft:6})},sw=function(t,n){var r=t.theme,i=r.spacing,o=r.borderRadius,a=r.colors,l=t.isFocused;return qe({alignItems:"center",display:"flex"},n?{}:{borderRadius:o/2,backgroundColor:l?a.dangerLight:void 0,paddingLeft:i.baseUnit,paddingRight:i.baseUnit,":hover":{backgroundColor:a.dangerLight,color:a.danger}})},cf=function(t){var n=t.children,r=t.innerProps;return Ne("div",r,n)},lw=cf,uw=cf;function cw(e){var t=e.children,n=e.innerProps;return Ne("div",tt({role:"button"},n),t||Ne(al,{size:14}))}var dw=function(t){var n=t.children,r=t.components,i=t.data,o=t.innerProps,a=t.isDisabled,l=t.removeProps,s=t.selectProps,u=r.Container,c=r.Label,d=r.Remove;return Ne(u,{data:i,innerProps:qe(qe({},tn(t,"multiValue",{"multi-value":!0,"multi-value--is-disabled":a})),o),selectProps:s},Ne(c,{data:i,innerProps:qe({},tn(t,"multiValueLabel",{"multi-value__label":!0})),selectProps:s},n),Ne(d,{data:i,innerProps:qe(qe({},tn(t,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(n||"option")},l),selectProps:s}))},fw=dw,hw=function(t,n){var r=t.isDisabled,i=t.isFocused,o=t.isSelected,a=t.theme,l=a.spacing,s=a.colors;return qe({label:"option",cursor:"default",display:"block",fontSize:"inherit",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)"},n?{}:{backgroundColor:o?s.primary:i?s.primary25:"transparent",color:r?s.neutral20:o?s.neutral0:"inherit",padding:"".concat(l.baseUnit*2,"px ").concat(l.baseUnit*3,"px"),":active":{backgroundColor:r?void 0:o?s.primary:s.primary50}})},gw=function(t){var n=t.children,r=t.isDisabled,i=t.isFocused,o=t.isSelected,a=t.innerRef,l=t.innerProps;return Ne("div",tt({},tn(t,"option",{option:!0,"option--is-disabled":r,"option--is-focused":i,"option--is-selected":o}),{ref:a,"aria-disabled":r},l),n)},mw=gw,pw=function(t,n){var r=t.theme,i=r.spacing,o=r.colors;return qe({label:"placeholder",gridArea:"1 / 1 / 2 / 3"},n?{}:{color:o.neutral50,marginLeft:i.baseUnit/2,marginRight:i.baseUnit/2})},vw=function(t){var n=t.children,r=t.innerProps;return Ne("div",tt({},tn(t,"placeholder",{placeholder:!0}),r),n)},bw=vw,ww=function(t,n){var r=t.isDisabled,i=t.theme,o=i.spacing,a=i.colors;return qe({label:"singleValue",gridArea:"1 / 1 / 2 / 3",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},n?{}:{color:r?a.neutral40:a.neutral80,marginLeft:o.baseUnit/2,marginRight:o.baseUnit/2})},yw=function(t){var n=t.children,r=t.isDisabled,i=t.innerProps;return Ne("div",tt({},tn(t,"singleValue",{"single-value":!0,"single-value--is-disabled":r}),i),n)},Cw=yw,df={ClearIndicator:zb,Control:Yb,DropdownIndicator:Ab,DownChevron:sf,CrossIcon:al,Group:Jb,GroupHeading:Zb,IndicatorsContainer:Ob,IndicatorSeparator:$b,Input:iw,LoadingIndicator:Wb,Menu:vb,MenuList:wb,MenuPortal:Mb,LoadingMessage:xb,NoOptionsMessage:Sb,MultiValue:fw,MultiValueContainer:lw,MultiValueLabel:uw,MultiValueRemove:cw,Option:mw,Placeholder:bw,SelectContainer:Eb,SingleValue:Cw,ValueContainer:Tb},Sw=function(t){return qe(qe({},df),t.components)},ec=Number.isNaN||function(t){return typeof t=="number"&&t!==t};function xw(e,t){return!!(e===t||ec(e)&&ec(t))}function kw(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!xw(e[n],t[n]))return!1;return!0}function Mw(e,t){t===void 0&&(t=kw);var n=null;function r(){for(var i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];if(n&&n.lastThis===this&&t(i,n.lastArgs))return n.lastResult;var a=e.apply(this,i);return n={lastResult:a,lastArgs:i,lastThis:this},a}return r.clear=function(){n=null},r}var Rw={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"},Ew=function(t){return Ne("span",tt({css:Rw},t))},tc=Ew,Iw={guidance:function(t){var n=t.isSearchable,r=t.isMulti,i=t.tabSelectsValue,o=t.context,a=t.isInitialFocus;switch(o){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(i?", press Tab to select the option and exit the menu":"",".");case"input":return a?"".concat(t["aria-label"]||"Select"," is focused ").concat(n?",type to refine list":"",", press Down to open the menu, ").concat(r?" 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(t){var n=t.action,r=t.label,i=r===void 0?"":r,o=t.labels,a=t.isDisabled;switch(n){case"deselect-option":case"pop-value":case"remove-value":return"option ".concat(i,", deselected.");case"clear":return"All selected options have been cleared.";case"initial-input-focus":return"option".concat(o.length>1?"s":""," ").concat(o.join(","),", selected.");case"select-option":return a?"option ".concat(i," is disabled. Select another option."):"option ".concat(i,", selected.");default:return""}},onFocus:function(t){var n=t.context,r=t.focused,i=t.options,o=t.label,a=o===void 0?"":o,l=t.selectValue,s=t.isDisabled,u=t.isSelected,c=t.isAppleDevice,d=function(p,v){return p&&p.length?"".concat(p.indexOf(v)+1," of ").concat(p.length):""};if(n==="value"&&l)return"value ".concat(a," focused, ").concat(d(l,r),".");if(n==="menu"&&c){var f=s?" disabled":"",h="".concat(u?" selected":"").concat(f);return"".concat(a).concat(h,", ").concat(d(i,r),".")}return""},onFilter:function(t){var n=t.inputValue,r=t.resultsMessage;return"".concat(r).concat(n?" for search term "+n:"",".")}},Tw=function(t){var n=t.ariaSelection,r=t.focusedOption,i=t.focusedValue,o=t.focusableOptions,a=t.isFocused,l=t.selectValue,s=t.selectProps,u=t.id,c=t.isAppleDevice,d=s.ariaLiveMessages,f=s.getOptionLabel,h=s.inputValue,m=s.isMulti,p=s.isOptionDisabled,v=s.isSearchable,y=s.menuIsOpen,b=s.options,R=s.screenReaderStatus,O=s.tabSelectsValue,S=s.isLoading,M=s["aria-label"],_=s["aria-live"],E=g.useMemo(function(){return qe(qe({},Iw),d||{})},[d]),x=g.useMemo(function(){var k="";if(n&&E.onChange){var V=n.option,N=n.options,U=n.removedValue,oe=n.removedValues,ee=n.value,j=function(P){return Array.isArray(P)?null:P},ne=U||V||j(ee),ie=ne?f(ne):"",ue=N||oe||void 0,ge=ue?ue.map(f):[],J=qe({isDisabled:ne&&p(ne,l),label:ie,labels:ge},n);k=E.onChange(J)}return k},[n,E,p,l,f]),L=g.useMemo(function(){var k="",V=r||i,N=!!(r&&l&&l.includes(r));if(V&&E.onFocus){var U={focused:V,label:f(V),isDisabled:p(V,l),isSelected:N,options:o,context:V===r?"menu":"value",selectValue:l,isAppleDevice:c};k=E.onFocus(U)}return k},[r,i,f,p,E,o,l,c]),D=g.useMemo(function(){var k="";if(y&&b.length&&!S&&E.onFilter){var V=R({count:o.length});k=E.onFilter({inputValue:h,resultsMessage:V})}return k},[o,h,y,E,b,R,S]),C=(n==null?void 0:n.action)==="initial-input-focus",I=g.useMemo(function(){var k="";if(E.guidance){var V=i?"value":y?"menu":"input";k=E.guidance({"aria-label":M,context:V,isDisabled:r&&p(r,l),isMulti:m,isSearchable:v,tabSelectsValue:O,isInitialFocus:C})}return k},[M,r,i,m,p,v,y,E,l,O,C]),T=Ne(g.Fragment,null,Ne("span",{id:"aria-selection"},x),Ne("span",{id:"aria-focused"},L),Ne("span",{id:"aria-results"},D),Ne("span",{id:"aria-guidance"},I));return Ne(g.Fragment,null,Ne(tc,{id:u},C&&T),Ne(tc,{"aria-live":_,"aria-atomic":"false","aria-relevant":"additions text",role:"log"},a&&!C&&T))},Dw=Tw,Is=[{base:"A",letters:"AⒶAÀÁÂẦẤẪẨÃĀĂẰẮẴẲȦǠÄǞẢÅǺǍȀȂẠẬẶḀĄȺⱯ"},{base:"AA",letters:"Ꜳ"},{base:"AE",letters:"ÆǼǢ"},{base:"AO",letters:"Ꜵ"},{base:"AU",letters:"Ꜷ"},{base:"AV",letters:"ꜸꜺ"},{base:"AY",letters:"Ꜽ"},{base:"B",letters:"BⒷBḂḄḆɃƂƁ"},{base:"C",letters:"CⒸCĆĈĊČÇḈƇȻꜾ"},{base:"D",letters:"DⒹDḊĎḌḐḒḎĐƋƊƉꝹ"},{base:"DZ",letters:"DZDŽ"},{base:"Dz",letters:"DzDž"},{base:"E",letters:"EⒺEÈÉÊỀẾỄỂẼĒḔḖĔĖËẺĚȄȆẸỆȨḜĘḘḚƐƎ"},{base:"F",letters:"FⒻFḞƑꝻ"},{base:"G",letters:"GⒼGǴĜḠĞĠǦĢǤƓꞠꝽꝾ"},{base:"H",letters:"HⒽHĤḢḦȞḤḨḪĦⱧⱵꞍ"},{base:"I",letters:"IⒾIÌÍÎĨĪĬİÏḮỈǏȈȊỊĮḬƗ"},{base:"J",letters:"JⒿJĴɈ"},{base:"K",letters:"KⓀKḰǨḲĶḴƘⱩꝀꝂꝄꞢ"},{base:"L",letters:"LⓁLĿĹĽḶḸĻḼḺŁȽⱢⱠꝈꝆꞀ"},{base:"LJ",letters:"LJ"},{base:"Lj",letters:"Lj"},{base:"M",letters:"MⓂMḾṀṂⱮƜ"},{base:"N",letters:"NⓃNǸŃÑṄŇṆŅṊṈȠƝꞐꞤ"},{base:"NJ",letters:"NJ"},{base:"Nj",letters:"Nj"},{base:"O",letters:"OⓄOÒÓÔỒỐỖỔÕṌȬṎŌṐṒŎȮȰÖȪỎŐǑȌȎƠỜỚỠỞỢỌỘǪǬØǾƆƟꝊꝌ"},{base:"OI",letters:"Ƣ"},{base:"OO",letters:"Ꝏ"},{base:"OU",letters:"Ȣ"},{base:"P",letters:"PⓅPṔṖƤⱣꝐꝒꝔ"},{base:"Q",letters:"QⓆQꝖꝘɊ"},{base:"R",letters:"RⓇRŔṘŘȐȒṚṜŖṞɌⱤꝚꞦꞂ"},{base:"S",letters:"SⓈSẞŚṤŜṠŠṦṢṨȘŞⱾꞨꞄ"},{base:"T",letters:"TⓉTṪŤṬȚŢṰṮŦƬƮȾꞆ"},{base:"TZ",letters:"Ꜩ"},{base:"U",letters:"UⓊUÙÚÛŨṸŪṺŬÜǛǗǕǙỦŮŰǓȔȖƯỪỨỮỬỰỤṲŲṶṴɄ"},{base:"V",letters:"VⓋVṼṾƲꝞɅ"},{base:"VY",letters:"Ꝡ"},{base:"W",letters:"WⓌWẀẂŴẆẄẈⱲ"},{base:"X",letters:"XⓍXẊẌ"},{base:"Y",letters:"YⓎYỲÝŶỸȲẎŸỶỴƳɎỾ"},{base:"Z",letters:"ZⓏZŹẐŻŽẒẔƵȤⱿⱫꝢ"},{base:"a",letters:"aⓐaẚàáâầấẫẩãāăằắẵẳȧǡäǟảåǻǎȁȃạậặḁąⱥɐ"},{base:"aa",letters:"ꜳ"},{base:"ae",letters:"æǽǣ"},{base:"ao",letters:"ꜵ"},{base:"au",letters:"ꜷ"},{base:"av",letters:"ꜹꜻ"},{base:"ay",letters:"ꜽ"},{base:"b",letters:"bⓑbḃḅḇƀƃɓ"},{base:"c",letters:"cⓒcćĉċčçḉƈȼꜿↄ"},{base:"d",letters:"dⓓdḋďḍḑḓḏđƌɖɗꝺ"},{base:"dz",letters:"dzdž"},{base:"e",letters:"eⓔeèéêềếễểẽēḕḗĕėëẻěȅȇẹệȩḝęḙḛɇɛǝ"},{base:"f",letters:"fⓕfḟƒꝼ"},{base:"g",letters:"gⓖgǵĝḡğġǧģǥɠꞡᵹꝿ"},{base:"h",letters:"hⓗhĥḣḧȟḥḩḫẖħⱨⱶɥ"},{base:"hv",letters:"ƕ"},{base:"i",letters:"iⓘiìíîĩīĭïḯỉǐȉȋịįḭɨı"},{base:"j",letters:"jⓙjĵǰɉ"},{base:"k",letters:"kⓚkḱǩḳķḵƙⱪꝁꝃꝅꞣ"},{base:"l",letters:"lⓛlŀĺľḷḹļḽḻſłƚɫⱡꝉꞁꝇ"},{base:"lj",letters:"lj"},{base:"m",letters:"mⓜmḿṁṃɱɯ"},{base:"n",letters:"nⓝnǹńñṅňṇņṋṉƞɲʼnꞑꞥ"},{base:"nj",letters:"nj"},{base:"o",letters:"oⓞoòóôồốỗổõṍȭṏōṑṓŏȯȱöȫỏőǒȍȏơờớỡởợọộǫǭøǿɔꝋꝍɵ"},{base:"oi",letters:"ƣ"},{base:"ou",letters:"ȣ"},{base:"oo",letters:"ꝏ"},{base:"p",letters:"pⓟpṕṗƥᵽꝑꝓꝕ"},{base:"q",letters:"qⓠqɋꝗꝙ"},{base:"r",letters:"rⓡrŕṙřȑȓṛṝŗṟɍɽꝛꞧꞃ"},{base:"s",letters:"sⓢsßśṥŝṡšṧṣṩșşȿꞩꞅẛ"},{base:"t",letters:"tⓣtṫẗťṭțţṱṯŧƭʈⱦꞇ"},{base:"tz",letters:"ꜩ"},{base:"u",letters:"uⓤuùúûũṹūṻŭüǜǘǖǚủůűǔȕȗưừứữửựụṳųṷṵʉ"},{base:"v",letters:"vⓥvṽṿʋꝟʌ"},{base:"vy",letters:"ꝡ"},{base:"w",letters:"wⓦwẁẃŵẇẅẘẉⱳ"},{base:"x",letters:"xⓧxẋẍ"},{base:"y",letters:"yⓨyỳýŷỹȳẏÿỷẙỵƴɏỿ"},{base:"z",letters:"zⓩzźẑżžẓẕƶȥɀⱬꝣ"}],Ow=new RegExp("["+Is.map(function(e){return e.letters}).join("")+"]","g"),ff={};for(var ds=0;ds<Is.length;ds++)for(var fs=Is[ds],hs=0;hs<fs.letters.length;hs++)ff[fs.letters[hs]]=fs.base;var hf=function(t){return t.replace(Ow,function(n){return ff[n]})},Pw=Mw(hf),nc=function(t){return t.replace(/^\s+|\s+$/g,"")},_w=function(t){return"".concat(t.label," ").concat(t.value)},Lw=function(t){return function(n,r){if(n.data.__isNew__)return!0;var i=qe({ignoreCase:!0,ignoreAccents:!0,stringify:_w,trim:!0,matchFrom:"any"},t),o=i.ignoreCase,a=i.ignoreAccents,l=i.stringify,s=i.trim,u=i.matchFrom,c=s?nc(r):r,d=s?nc(l(n)):l(n);return o&&(c=c.toLowerCase(),d=d.toLowerCase()),a&&(c=Pw(c),d=hf(d)),u==="start"?d.substr(0,c.length)===c:d.indexOf(c)>-1}},Fw=["innerRef"];function Aw(e){var t=e.innerRef,n=vr(e,Fw),r=ub(n,"onExited","in","enter","exit","appear");return Ne("input",tt({ref:t},r,{css:_c({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 Hw=function(t){t.cancelable&&t.preventDefault(),t.stopPropagation()};function zw(e){var t=e.isEnabled,n=e.onBottomArrive,r=e.onBottomLeave,i=e.onTopArrive,o=e.onTopLeave,a=g.useRef(!1),l=g.useRef(!1),s=g.useRef(0),u=g.useRef(null),c=g.useCallback(function(v,y){if(u.current!==null){var b=u.current,R=b.scrollTop,O=b.scrollHeight,S=b.clientHeight,M=u.current,_=y>0,E=O-S-R,x=!1;E>y&&a.current&&(r&&r(v),a.current=!1),_&&l.current&&(o&&o(v),l.current=!1),_&&y>E?(n&&!a.current&&n(v),M.scrollTop=O,x=!0,a.current=!0):!_&&-y>R&&(i&&!l.current&&i(v),M.scrollTop=0,x=!0,l.current=!0),x&&Hw(v)}},[n,r,i,o]),d=g.useCallback(function(v){c(v,v.deltaY)},[c]),f=g.useCallback(function(v){s.current=v.changedTouches[0].clientY},[]),h=g.useCallback(function(v){var y=s.current-v.changedTouches[0].clientY;c(v,y)},[c]),m=g.useCallback(function(v){if(v){var y=ab?{passive:!1}:!1;v.addEventListener("wheel",d,y),v.addEventListener("touchstart",f,y),v.addEventListener("touchmove",h,y)}},[h,f,d]),p=g.useCallback(function(v){v&&(v.removeEventListener("wheel",d,!1),v.removeEventListener("touchstart",f,!1),v.removeEventListener("touchmove",h,!1))},[h,f,d]);return g.useEffect(function(){if(t){var v=u.current;return m(v),function(){p(v)}}},[t,m,p]),function(v){u.current=v}}var rc=["boxSizing","height","overflow","paddingRight","position"],ic={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function oc(e){e.preventDefault()}function ac(e){e.stopPropagation()}function sc(){var e=this.scrollTop,t=this.scrollHeight,n=e+this.offsetHeight;e===0?this.scrollTop=1:n===t&&(this.scrollTop=e-1)}function lc(){return"ontouchstart"in window||navigator.maxTouchPoints}var uc=!!(typeof window<"u"&&window.document&&window.document.createElement),Wi=0,ai={capture:!1,passive:!1};function Vw(e){var t=e.isEnabled,n=e.accountForScrollbars,r=n===void 0?!0:n,i=g.useRef({}),o=g.useRef(null),a=g.useCallback(function(s){if(uc){var u=document.body,c=u&&u.style;if(r&&rc.forEach(function(m){var p=c&&c[m];i.current[m]=p}),r&&Wi<1){var d=parseInt(i.current.paddingRight,10)||0,f=document.body?document.body.clientWidth:0,h=window.innerWidth-f+d||0;Object.keys(ic).forEach(function(m){var p=ic[m];c&&(c[m]=p)}),c&&(c.paddingRight="".concat(h,"px"))}u&&lc()&&(u.addEventListener("touchmove",oc,ai),s&&(s.addEventListener("touchstart",sc,ai),s.addEventListener("touchmove",ac,ai))),Wi+=1}},[r]),l=g.useCallback(function(s){if(uc){var u=document.body,c=u&&u.style;Wi=Math.max(Wi-1,0),r&&Wi<1&&rc.forEach(function(d){var f=i.current[d];c&&(c[d]=f)}),u&&lc()&&(u.removeEventListener("touchmove",oc,ai),s&&(s.removeEventListener("touchstart",sc,ai),s.removeEventListener("touchmove",ac,ai)))}},[r]);return g.useEffect(function(){if(t){var s=o.current;return a(s),function(){l(s)}}},[t,a,l]),function(s){o.current=s}}var $w=function(t){var n=t.target;return n.ownerDocument.activeElement&&n.ownerDocument.activeElement.blur()},Nw={name:"1kfdb0e",styles:"position:fixed;left:0;bottom:0;right:0;top:0"};function Bw(e){var t=e.children,n=e.lockEnabled,r=e.captureEnabled,i=r===void 0?!0:r,o=e.onBottomArrive,a=e.onBottomLeave,l=e.onTopArrive,s=e.onTopLeave,u=zw({isEnabled:i,onBottomArrive:o,onBottomLeave:a,onTopArrive:l,onTopLeave:s}),c=Vw({isEnabled:n}),d=function(h){u(h),c(h)};return Ne(g.Fragment,null,n&&Ne("div",{onClick:$w,css:Nw}),t(d))}var Ww={name:"1a0ro4n-requiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%"},Uw=function(t){var n=t.name,r=t.onFocus;return Ne("input",{required:!0,name:n,tabIndex:-1,"aria-hidden":"true",onFocus:r,css:Ww,value:"",onChange:function(){}})},qw=Uw;function sl(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 Yw(){return sl(/^iPhone/i)}function gf(){return sl(/^Mac/i)}function Xw(){return sl(/^iPad/i)||gf()&&navigator.maxTouchPoints>1}function jw(){return Yw()||Xw()}function Gw(){return gf()||jw()}var Kw=function(t){return t.label},Zw=function(t){return t.label},Jw=function(t){return t.value},Qw=function(t){return!!t.isDisabled},ey={clearIndicator:Hb,container:Rb,control:Ub,dropdownIndicator:Fb,group:jb,groupHeading:Kb,indicatorsContainer:Db,indicatorSeparator:Vb,input:ew,loadingIndicator:Bb,loadingMessage:Cb,menu:gb,menuList:bb,menuPortal:kb,multiValue:ow,multiValueLabel:aw,multiValueRemove:sw,noOptionsMessage:yb,option:hw,placeholder:pw,singleValue:ww,valueContainer:Ib},ty={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%)"},ny=4,mf=4,ry=38,iy=mf*2,oy={baseUnit:mf,controlHeight:ry,menuGutter:iy},gs={borderRadius:ny,colors:ty,spacing:oy},ay={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:Ju(),captureMenuScroll:!Ju(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:Lw(),formatGroupLabel:Kw,getOptionLabel:Zw,getOptionValue:Jw,isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:Qw,loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!ib(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(t){var n=t.count;return"".concat(n," result").concat(n!==1?"s":""," available")},styles:{},tabIndex:0,tabSelectsValue:!0,unstyled:!1};function cc(e,t,n,r){var i=bf(e,t,n),o=wf(e,t,n),a=vf(e,t),l=ma(e,t);return{type:"option",data:t,isDisabled:i,isSelected:o,label:a,value:l,index:r}}function Jo(e,t){return e.options.map(function(n,r){if("options"in n){var i=n.options.map(function(a,l){return cc(e,a,t,l)}).filter(function(a){return fc(e,a)});return i.length>0?{type:"group",data:n,options:i,index:r}:void 0}var o=cc(e,n,t,r);return fc(e,o)?o:void 0}).filter(sb)}function pf(e){return e.reduce(function(t,n){return n.type==="group"?t.push.apply(t,Os(n.options.map(function(r){return r.data}))):t.push(n.data),t},[])}function dc(e,t){return e.reduce(function(n,r){return r.type==="group"?n.push.apply(n,Os(r.options.map(function(i){return{data:i.data,id:"".concat(t,"-").concat(r.index,"-").concat(i.index)}}))):n.push({data:r.data,id:"".concat(t,"-").concat(r.index)}),n},[])}function sy(e,t){return pf(Jo(e,t))}function fc(e,t){var n=e.inputValue,r=n===void 0?"":n,i=t.data,o=t.isSelected,a=t.label,l=t.value;return(!Cf(e)||!o)&&yf(e,{label:a,value:l,data:i},r)}function ly(e,t){var n=e.focusedValue,r=e.selectValue,i=r.indexOf(n);if(i>-1){var o=t.indexOf(n);if(o>-1)return n;if(i<t.length)return t[i]}return null}function uy(e,t){var n=e.focusedOption;return n&&t.indexOf(n)>-1?n:t[0]}var ms=function(t,n){var r,i=(r=t.find(function(o){return o.data===n}))===null||r===void 0?void 0:r.id;return i||null},vf=function(t,n){return t.getOptionLabel(n)},ma=function(t,n){return t.getOptionValue(n)};function bf(e,t,n){return typeof e.isOptionDisabled=="function"?e.isOptionDisabled(t,n):!1}function wf(e,t,n){if(n.indexOf(t)>-1)return!0;if(typeof e.isOptionSelected=="function")return e.isOptionSelected(t,n);var r=ma(e,t);return n.some(function(i){return ma(e,i)===r})}function yf(e,t,n){return e.filterOption?e.filterOption(t,n):!0}var Cf=function(t){var n=t.hideSelectedOptions,r=t.isMulti;return n===void 0?r:n},cy=1,Sf=function(e){lg(n,e);var t=dg(n);function n(r){var i;if(cg(this,n),i=t.call(this,r),i.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:""},i.blockOptionHover=!1,i.isComposing=!1,i.commonProps=void 0,i.initialTouchX=0,i.initialTouchY=0,i.openAfterFocus=!1,i.scrollToFocusedOptionOnUpdate=!1,i.userIsDragging=void 0,i.isAppleDevice=Gw(),i.controlRef=null,i.getControlRef=function(s){i.controlRef=s},i.focusedOptionRef=null,i.getFocusedOptionRef=function(s){i.focusedOptionRef=s},i.menuListRef=null,i.getMenuListRef=function(s){i.menuListRef=s},i.inputRef=null,i.getInputRef=function(s){i.inputRef=s},i.focus=i.focusInput,i.blur=i.blurInput,i.onChange=function(s,u){var c=i.props,d=c.onChange,f=c.name;u.name=f,i.ariaOnChange(s,u),d(s,u)},i.setValue=function(s,u,c){var d=i.props,f=d.closeMenuOnSelect,h=d.isMulti,m=d.inputValue;i.onInputChange("",{action:"set-value",prevInputValue:m}),f&&(i.setState({inputIsHiddenAfterUpdate:!h}),i.onMenuClose()),i.setState({clearFocusValueOnUpdate:!0}),i.onChange(s,{action:u,option:c})},i.selectOption=function(s){var u=i.props,c=u.blurInputOnSelect,d=u.isMulti,f=u.name,h=i.state.selectValue,m=d&&i.isOptionSelected(s,h),p=i.isOptionDisabled(s,h);if(m){var v=i.getOptionValue(s);i.setValue(h.filter(function(y){return i.getOptionValue(y)!==v}),"deselect-option",s)}else if(!p)d?i.setValue([].concat(Os(h),[s]),"select-option",s):i.setValue(s,"select-option");else{i.ariaOnChange(s,{action:"select-option",option:s,name:f});return}c&&i.blurInput()},i.removeValue=function(s){var u=i.props.isMulti,c=i.state.selectValue,d=i.getOptionValue(s),f=c.filter(function(m){return i.getOptionValue(m)!==d}),h=Xo(u,f,f[0]||null);i.onChange(h,{action:"remove-value",removedValue:s}),i.focusInput()},i.clearValue=function(){var s=i.state.selectValue;i.onChange(Xo(i.props.isMulti,[],null),{action:"clear",removedValues:s})},i.popValue=function(){var s=i.props.isMulti,u=i.state.selectValue,c=u[u.length-1],d=u.slice(0,u.length-1),f=Xo(s,d,d[0]||null);c&&i.onChange(f,{action:"pop-value",removedValue:c})},i.getFocusedOptionId=function(s){return ms(i.state.focusableOptionsWithIds,s)},i.getFocusableOptionsWithIds=function(){return dc(Jo(i.props,i.state.selectValue),i.getElementId("option"))},i.getValue=function(){return i.state.selectValue},i.cx=function(){for(var s=arguments.length,u=new Array(s),c=0;c<s;c++)u[c]=arguments[c];return Q1.apply(void 0,[i.props.classNamePrefix].concat(u))},i.getOptionLabel=function(s){return vf(i.props,s)},i.getOptionValue=function(s){return ma(i.props,s)},i.getStyles=function(s,u){var c=i.props.unstyled,d=ey[s](u,c);d.boxSizing="border-box";var f=i.props.styles[s];return f?f(d,u):d},i.getClassNames=function(s,u){var c,d;return(c=(d=i.props.classNames)[s])===null||c===void 0?void 0:c.call(d,u)},i.getElementId=function(s){return"".concat(i.state.instancePrefix,"-").concat(s)},i.getComponents=function(){return Sw(i.props)},i.buildCategorizedOptions=function(){return Jo(i.props,i.state.selectValue)},i.getCategorizedOptions=function(){return i.props.menuIsOpen?i.buildCategorizedOptions():[]},i.buildFocusableOptions=function(){return pf(i.buildCategorizedOptions())},i.getFocusableOptions=function(){return i.props.menuIsOpen?i.buildFocusableOptions():[]},i.ariaOnChange=function(s,u){i.setState({ariaSelection:qe({value:s},u)})},i.onMenuMouseDown=function(s){s.button===0&&(s.stopPropagation(),s.preventDefault(),i.focusInput())},i.onMenuMouseMove=function(s){i.blockOptionHover=!1},i.onControlMouseDown=function(s){if(!s.defaultPrevented){var u=i.props.openMenuOnClick;i.state.isFocused?i.props.menuIsOpen?s.target.tagName!=="INPUT"&&s.target.tagName!=="TEXTAREA"&&i.onMenuClose():u&&i.openMenu("first"):(u&&(i.openAfterFocus=!0),i.focusInput()),s.target.tagName!=="INPUT"&&s.target.tagName!=="TEXTAREA"&&s.preventDefault()}},i.onDropdownIndicatorMouseDown=function(s){if(!(s&&s.type==="mousedown"&&s.button!==0)&&!i.props.isDisabled){var u=i.props,c=u.isMulti,d=u.menuIsOpen;i.focusInput(),d?(i.setState({inputIsHiddenAfterUpdate:!c}),i.onMenuClose()):i.openMenu("first"),s.preventDefault()}},i.onClearIndicatorMouseDown=function(s){s&&s.type==="mousedown"&&s.button!==0||(i.clearValue(),s.preventDefault(),i.openAfterFocus=!1,s.type==="touchend"?i.focusInput():setTimeout(function(){return i.focusInput()}))},i.onScroll=function(s){typeof i.props.closeMenuOnScroll=="boolean"?s.target instanceof HTMLElement&&ya(s.target)&&i.props.onMenuClose():typeof i.props.closeMenuOnScroll=="function"&&i.props.closeMenuOnScroll(s)&&i.props.onMenuClose()},i.onCompositionStart=function(){i.isComposing=!0},i.onCompositionEnd=function(){i.isComposing=!1},i.onTouchStart=function(s){var u=s.touches,c=u&&u.item(0);c&&(i.initialTouchX=c.clientX,i.initialTouchY=c.clientY,i.userIsDragging=!1)},i.onTouchMove=function(s){var u=s.touches,c=u&&u.item(0);if(c){var d=Math.abs(c.clientX-i.initialTouchX),f=Math.abs(c.clientY-i.initialTouchY),h=5;i.userIsDragging=d>h||f>h}},i.onTouchEnd=function(s){i.userIsDragging||(i.controlRef&&!i.controlRef.contains(s.target)&&i.menuListRef&&!i.menuListRef.contains(s.target)&&i.blurInput(),i.initialTouchX=0,i.initialTouchY=0)},i.onControlTouchEnd=function(s){i.userIsDragging||i.onControlMouseDown(s)},i.onClearIndicatorTouchEnd=function(s){i.userIsDragging||i.onClearIndicatorMouseDown(s)},i.onDropdownIndicatorTouchEnd=function(s){i.userIsDragging||i.onDropdownIndicatorMouseDown(s)},i.handleInputChange=function(s){var u=i.props.inputValue,c=s.currentTarget.value;i.setState({inputIsHiddenAfterUpdate:!1}),i.onInputChange(c,{action:"input-change",prevInputValue:u}),i.props.menuIsOpen||i.onMenuOpen()},i.onInputFocus=function(s){i.props.onFocus&&i.props.onFocus(s),i.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(i.openAfterFocus||i.props.openMenuOnFocus)&&i.openMenu("first"),i.openAfterFocus=!1},i.onInputBlur=function(s){var u=i.props.inputValue;if(i.menuListRef&&i.menuListRef.contains(document.activeElement)){i.inputRef.focus();return}i.props.onBlur&&i.props.onBlur(s),i.onInputChange("",{action:"input-blur",prevInputValue:u}),i.onMenuClose(),i.setState({focusedValue:null,isFocused:!1})},i.onOptionHover=function(s){if(!(i.blockOptionHover||i.state.focusedOption===s)){var u=i.getFocusableOptions(),c=u.indexOf(s);i.setState({focusedOption:s,focusedOptionId:c>-1?i.getFocusedOptionId(s):null})}},i.shouldHideSelectedOptions=function(){return Cf(i.props)},i.onValueInputFocus=function(s){s.preventDefault(),s.stopPropagation(),i.focus()},i.onKeyDown=function(s){var u=i.props,c=u.isMulti,d=u.backspaceRemovesValue,f=u.escapeClearsValue,h=u.inputValue,m=u.isClearable,p=u.isDisabled,v=u.menuIsOpen,y=u.onKeyDown,b=u.tabSelectsValue,R=u.openMenuOnFocus,O=i.state,S=O.focusedOption,M=O.focusedValue,_=O.selectValue;if(!p&&!(typeof y=="function"&&(y(s),s.defaultPrevented))){switch(i.blockOptionHover=!0,s.key){case"ArrowLeft":if(!c||h)return;i.focusValue("previous");break;case"ArrowRight":if(!c||h)return;i.focusValue("next");break;case"Delete":case"Backspace":if(h)return;if(M)i.removeValue(M);else{if(!d)return;c?i.popValue():m&&i.clearValue()}break;case"Tab":if(i.isComposing||s.shiftKey||!v||!b||!S||R&&i.isOptionSelected(S,_))return;i.selectOption(S);break;case"Enter":if(s.keyCode===229)break;if(v){if(!S||i.isComposing)return;i.selectOption(S);break}return;case"Escape":v?(i.setState({inputIsHiddenAfterUpdate:!1}),i.onInputChange("",{action:"menu-close",prevInputValue:h}),i.onMenuClose()):m&&f&&i.clearValue();break;case" ":if(h)return;if(!v){i.openMenu("first");break}if(!S)return;i.selectOption(S);break;case"ArrowUp":v?i.focusOption("up"):i.openMenu("last");break;case"ArrowDown":v?i.focusOption("down"):i.openMenu("first");break;case"PageUp":if(!v)return;i.focusOption("pageup");break;case"PageDown":if(!v)return;i.focusOption("pagedown");break;case"Home":if(!v)return;i.focusOption("first");break;case"End":if(!v)return;i.focusOption("last");break;default:return}s.preventDefault()}},i.state.instancePrefix="react-select-"+(i.props.instanceId||++cy),i.state.selectValue=Ku(r.value),r.menuIsOpen&&i.state.selectValue.length){var o=i.getFocusableOptionsWithIds(),a=i.buildFocusableOptions(),l=a.indexOf(i.state.selectValue[0]);i.state.focusableOptionsWithIds=o,i.state.focusedOption=a[l],i.state.focusedOptionId=ms(o,a[l])}return i}return ug(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&&Zu(this.menuListRef,this.focusedOptionRef)}},{key:"componentDidUpdate",value:function(i){var o=this.props,a=o.isDisabled,l=o.menuIsOpen,s=this.state.isFocused;(s&&!a&&i.isDisabled||s&&l&&!i.menuIsOpen)&&this.focusInput(),s&&a&&!i.isDisabled?this.setState({isFocused:!1},this.onMenuClose):!s&&!a&&i.isDisabled&&this.inputRef===document.activeElement&&this.setState({isFocused:!0}),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(Zu(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(i,o){this.props.onInputChange(i,o)}},{key:"focusInput",value:function(){this.inputRef&&this.inputRef.focus()}},{key:"blurInput",value:function(){this.inputRef&&this.inputRef.blur()}},{key:"openMenu",value:function(i){var o=this,a=this.state,l=a.selectValue,s=a.isFocused,u=this.buildFocusableOptions(),c=i==="first"?0:u.length-1;if(!this.props.isMulti){var d=u.indexOf(l[0]);d>-1&&(c=d)}this.scrollToFocusedOptionOnUpdate=!(s&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:u[c],focusedOptionId:this.getFocusedOptionId(u[c])},function(){return o.onMenuOpen()})}},{key:"focusValue",value:function(i){var o=this.state,a=o.selectValue,l=o.focusedValue;if(this.props.isMulti){this.setState({focusedOption:null});var s=a.indexOf(l);l||(s=-1);var u=a.length-1,c=-1;if(a.length){switch(i){case"previous":s===0?c=0:s===-1?c=u:c=s-1;break;case"next":s>-1&&s<u&&(c=s+1);break}this.setState({inputIsHidden:c!==-1,focusedValue:a[c]})}}}},{key:"focusOption",value:function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"first",o=this.props.pageSize,a=this.state.focusedOption,l=this.getFocusableOptions();if(l.length){var s=0,u=l.indexOf(a);a||(u=-1),i==="up"?s=u>0?u-1:l.length-1:i==="down"?s=(u+1)%l.length:i==="pageup"?(s=u-o,s<0&&(s=0)):i==="pagedown"?(s=u+o,s>l.length-1&&(s=l.length-1)):i==="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(gs):qe(qe({},gs),this.props.theme):gs}},{key:"getCommonProps",value:function(){var i=this.clearValue,o=this.cx,a=this.getStyles,l=this.getClassNames,s=this.getValue,u=this.selectOption,c=this.setValue,d=this.props,f=d.isMulti,h=d.isRtl,m=d.options,p=this.hasValue();return{clearValue:i,cx:o,getStyles:a,getClassNames:l,getValue:s,hasValue:p,isMulti:f,isRtl:h,options:m,selectOption:u,selectProps:d,setValue:c,theme:this.getTheme()}}},{key:"hasValue",value:function(){var i=this.state.selectValue;return i.length>0}},{key:"hasOptions",value:function(){return!!this.getFocusableOptions().length}},{key:"isClearable",value:function(){var i=this.props,o=i.isClearable,a=i.isMulti;return o===void 0?a:o}},{key:"isOptionDisabled",value:function(i,o){return bf(this.props,i,o)}},{key:"isOptionSelected",value:function(i,o){return wf(this.props,i,o)}},{key:"filterOption",value:function(i,o){return yf(this.props,i,o)}},{key:"formatOptionLabel",value:function(i,o){if(typeof this.props.formatOptionLabel=="function"){var a=this.props.inputValue,l=this.state.selectValue;return this.props.formatOptionLabel(i,{context:o,inputValue:a,selectValue:l})}else return this.getOptionLabel(i)}},{key:"formatGroupLabel",value:function(i){return this.props.formatGroupLabel(i)}},{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 i=this.props,o=i.isDisabled,a=i.isSearchable,l=i.inputId,s=i.inputValue,u=i.tabIndex,c=i.form,d=i.menuIsOpen,f=i.required,h=this.getComponents(),m=h.Input,p=this.state,v=p.inputIsHidden,y=p.ariaSelection,b=this.commonProps,R=l||this.getElementId("input"),O=qe(qe(qe({"aria-autocomplete":"list","aria-expanded":d,"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":f,role:"combobox","aria-activedescendant":this.isAppleDevice?void 0:this.state.focusedOptionId||""},d&&{"aria-controls":this.getElementId("listbox")}),!a&&{"aria-readonly":!0}),this.hasValue()?(y==null?void 0:y.action)==="initial-input-focus"&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return a?g.createElement(m,tt({},b,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:R,innerRef:this.getInputRef,isDisabled:o,isHidden:v,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:u,form:c,type:"text",value:s},O)):g.createElement(Aw,tt({id:R,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:ha,onFocus:this.onInputFocus,disabled:o,tabIndex:u,inputMode:"none",form:c,value:""},O))}},{key:"renderPlaceholderOrValue",value:function(){var i=this,o=this.getComponents(),a=o.MultiValue,l=o.MultiValueContainer,s=o.MultiValueLabel,u=o.MultiValueRemove,c=o.SingleValue,d=o.Placeholder,f=this.commonProps,h=this.props,m=h.controlShouldRenderValue,p=h.isDisabled,v=h.isMulti,y=h.inputValue,b=h.placeholder,R=this.state,O=R.selectValue,S=R.focusedValue,M=R.isFocused;if(!this.hasValue()||!m)return y?null:g.createElement(d,tt({},f,{key:"placeholder",isDisabled:p,isFocused:M,innerProps:{id:this.getElementId("placeholder")}}),b);if(v)return O.map(function(E,x){var L=E===S,D="".concat(i.getOptionLabel(E),"-").concat(i.getOptionValue(E));return g.createElement(a,tt({},f,{components:{Container:l,Label:s,Remove:u},isFocused:L,isDisabled:p,key:D,index:x,removeProps:{onClick:function(){return i.removeValue(E)},onTouchEnd:function(){return i.removeValue(E)},onMouseDown:function(I){I.preventDefault()}},data:E}),i.formatOptionLabel(E,"value"))});if(y)return null;var _=O[0];return g.createElement(c,tt({},f,{data:_,isDisabled:p}),this.formatOptionLabel(_,"value"))}},{key:"renderClearIndicator",value:function(){var i=this.getComponents(),o=i.ClearIndicator,a=this.commonProps,l=this.props,s=l.isDisabled,u=l.isLoading,c=this.state.isFocused;if(!this.isClearable()||!o||s||!this.hasValue()||u)return null;var d={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return g.createElement(o,tt({},a,{innerProps:d,isFocused:c}))}},{key:"renderLoadingIndicator",value:function(){var i=this.getComponents(),o=i.LoadingIndicator,a=this.commonProps,l=this.props,s=l.isDisabled,u=l.isLoading,c=this.state.isFocused;if(!o||!u)return null;var d={"aria-hidden":"true"};return g.createElement(o,tt({},a,{innerProps:d,isDisabled:s,isFocused:c}))}},{key:"renderIndicatorSeparator",value:function(){var i=this.getComponents(),o=i.DropdownIndicator,a=i.IndicatorSeparator;if(!o||!a)return null;var l=this.commonProps,s=this.props.isDisabled,u=this.state.isFocused;return g.createElement(a,tt({},l,{isDisabled:s,isFocused:u}))}},{key:"renderDropdownIndicator",value:function(){var i=this.getComponents(),o=i.DropdownIndicator;if(!o)return null;var a=this.commonProps,l=this.props.isDisabled,s=this.state.isFocused,u={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return g.createElement(o,tt({},a,{innerProps:u,isDisabled:l,isFocused:s}))}},{key:"renderMenu",value:function(){var i=this,o=this.getComponents(),a=o.Group,l=o.GroupHeading,s=o.Menu,u=o.MenuList,c=o.MenuPortal,d=o.LoadingMessage,f=o.NoOptionsMessage,h=o.Option,m=this.commonProps,p=this.state.focusedOption,v=this.props,y=v.captureMenuScroll,b=v.inputValue,R=v.isLoading,O=v.loadingMessage,S=v.minMenuHeight,M=v.maxMenuHeight,_=v.menuIsOpen,E=v.menuPlacement,x=v.menuPosition,L=v.menuPortalTarget,D=v.menuShouldBlockScroll,C=v.menuShouldScrollIntoView,I=v.noOptionsMessage,T=v.onMenuScrollToTop,k=v.onMenuScrollToBottom;if(!_)return null;var V=function(ie,ue){var ge=ie.type,J=ie.data,H=ie.isDisabled,P=ie.isSelected,q=ie.label,fe=ie.value,me=p===J,ze=H?void 0:function(){return i.onOptionHover(J)},ve=H?void 0:function(){return i.selectOption(J)},Xe="".concat(i.getElementId("option"),"-").concat(ue),Me={id:Xe,onClick:ve,onMouseMove:ze,onMouseOver:ze,tabIndex:-1,role:"option","aria-selected":i.isAppleDevice?void 0:P};return g.createElement(h,tt({},m,{innerProps:Me,data:J,isDisabled:H,isSelected:P,key:Xe,label:q,type:ge,value:fe,isFocused:me,innerRef:me?i.getFocusedOptionRef:void 0}),i.formatOptionLabel(ie.data,"menu"))},N;if(this.hasOptions())N=this.getCategorizedOptions().map(function(ne){if(ne.type==="group"){var ie=ne.data,ue=ne.options,ge=ne.index,J="".concat(i.getElementId("group"),"-").concat(ge),H="".concat(J,"-heading");return g.createElement(a,tt({},m,{key:J,data:ie,options:ue,Heading:l,headingProps:{id:H,data:ne.data},label:i.formatGroupLabel(ne.data)}),ne.options.map(function(P){return V(P,"".concat(ge,"-").concat(P.index))}))}else if(ne.type==="option")return V(ne,"".concat(ne.index))});else if(R){var U=O({inputValue:b});if(U===null)return null;N=g.createElement(d,m,U)}else{var oe=I({inputValue:b});if(oe===null)return null;N=g.createElement(f,m,oe)}var ee={minMenuHeight:S,maxMenuHeight:M,menuPlacement:E,menuPosition:x,menuShouldScrollIntoView:C},j=g.createElement(mb,tt({},m,ee),function(ne){var ie=ne.ref,ue=ne.placerProps,ge=ue.placement,J=ue.maxHeight;return g.createElement(s,tt({},m,ee,{innerRef:ie,innerProps:{onMouseDown:i.onMenuMouseDown,onMouseMove:i.onMenuMouseMove},isLoading:R,placement:ge}),g.createElement(Bw,{captureEnabled:y,onTopArrive:T,onBottomArrive:k,lockEnabled:D},function(H){return g.createElement(u,tt({},m,{innerRef:function(q){i.getMenuListRef(q),H(q)},innerProps:{role:"listbox","aria-multiselectable":m.isMulti,id:i.getElementId("listbox")},isLoading:R,maxHeight:J,focusedOption:p}),N)}))});return L||x==="fixed"?g.createElement(c,tt({},m,{appendTo:L,controlElement:this.controlRef,menuPlacement:E,menuPosition:x}),j):j}},{key:"renderFormField",value:function(){var i=this,o=this.props,a=o.delimiter,l=o.isDisabled,s=o.isMulti,u=o.name,c=o.required,d=this.state.selectValue;if(c&&!this.hasValue()&&!l)return g.createElement(qw,{name:u,onFocus:this.onValueInputFocus});if(!(!u||l))if(s)if(a){var f=d.map(function(p){return i.getOptionValue(p)}).join(a);return g.createElement("input",{name:u,type:"hidden",value:f})}else{var h=d.length>0?d.map(function(p,v){return g.createElement("input",{key:"i-".concat(v),name:u,type:"hidden",value:i.getOptionValue(p)})}):g.createElement("input",{name:u,type:"hidden",value:""});return g.createElement("div",null,h)}else{var m=d[0]?this.getOptionValue(d[0]):"";return g.createElement("input",{name:u,type:"hidden",value:m})}}},{key:"renderLiveRegion",value:function(){var i=this.commonProps,o=this.state,a=o.ariaSelection,l=o.focusedOption,s=o.focusedValue,u=o.isFocused,c=o.selectValue,d=this.getFocusableOptions();return g.createElement(Dw,tt({},i,{id:this.getElementId("live-region"),ariaSelection:a,focusedOption:l,focusedValue:s,isFocused:u,selectValue:c,focusableOptions:d,isAppleDevice:this.isAppleDevice}))}},{key:"render",value:function(){var i=this.getComponents(),o=i.Control,a=i.IndicatorsContainer,l=i.SelectContainer,s=i.ValueContainer,u=this.props,c=u.className,d=u.id,f=u.isDisabled,h=u.menuIsOpen,m=this.state.isFocused,p=this.commonProps=this.getCommonProps();return g.createElement(l,tt({},p,{className:c,innerProps:{id:d,onKeyDown:this.onKeyDown},isDisabled:f,isFocused:m}),this.renderLiveRegion(),g.createElement(o,tt({},p,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:f,isFocused:m,menuIsOpen:h}),g.createElement(s,tt({},p,{isDisabled:f}),this.renderPlaceholderOrValue(),this.renderInput()),g.createElement(a,tt({},p,{isDisabled:f}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],[{key:"getDerivedStateFromProps",value:function(i,o){var a=o.prevProps,l=o.clearFocusValueOnUpdate,s=o.inputIsHiddenAfterUpdate,u=o.ariaSelection,c=o.isFocused,d=o.prevWasFocused,f=o.instancePrefix,h=i.options,m=i.value,p=i.menuIsOpen,v=i.inputValue,y=i.isMulti,b=Ku(m),R={};if(a&&(m!==a.value||h!==a.options||p!==a.menuIsOpen||v!==a.inputValue)){var O=p?sy(i,b):[],S=p?dc(Jo(i,b),"".concat(f,"-option")):[],M=l?ly(o,b):null,_=uy(o,O),E=ms(S,_);R={selectValue:b,focusedOption:_,focusedOptionId:E,focusableOptionsWithIds:S,focusedValue:M,clearFocusValueOnUpdate:!1}}var x=s!=null&&i!==a?{inputIsHidden:s,inputIsHiddenAfterUpdate:void 0}:{},L=u,D=c&&d;return c&&!D&&(L={value:Xo(y,b,b[0]||null),options:b,action:"initial-input-focus"},D=!d),(u==null?void 0:u.action)==="initial-input-focus"&&(L=null),qe(qe(qe({},R),x),{},{prevProps:i,ariaSelection:L,prevWasFocused:D})}}]),n}(g.Component);Sf.defaultProps=ay;var dy=g.forwardRef(function(e,t){var n=A1(e);return g.createElement(Sf,tt({ref:t},n))}),fy=dy;const hy=e=>{const{Menu:t}=df,{children:n,...r}=e;return g.createElement(t,{...r},n)},gy=mn("div")({name:"Wrap",class:"gdg-wghi2zc",propsAsIs:!1}),my=mn("div")({name:"PortalWrap",class:"gdg-p13nj8j0",propsAsIs:!1}),py=mn("div")({name:"ReadOnlyWrap",class:"gdg-r6sia3g",propsAsIs:!1}),vy=e=>{const{value:t,onFinishedEditing:n,initialValue:r}=e,{allowedValues:i,value:o}=t.data,[a,l]=g.useState(o),[s,u]=g.useState(r??""),c=Hm(),d=g.useMemo(()=>i.map(f=>typeof f=="string"||f===null||f===void 0?{value:f,label:(f==null?void 0:f.toString())??""}:f),[i]);return t.readonly?g.createElement(py,null,g.createElement(Yr,{highlight:!0,autoFocus:!1,disabled:!0,value:a??"",onChange:()=>{}})):g.createElement(gy,null,g.createElement(fy,{className:"glide-select",inputValue:s,onInputChange:u,menuPlacement:"auto",value:d.find(f=>f.value===a),styles:{control:f=>({...f,border:0,boxShadow:"none"}),option:(f,{isFocused:h})=>({...f,fontSize:c.editorFontSize,fontFamily:c.fontFamily,cursor:h?"pointer":void 0,paddingLeft:c.cellHorizontalPadding,paddingRight:c.cellHorizontalPadding,":active":{...f[":active"],color:c.accentFg},":empty::after":{content:'" "',visibility:"hidden"}})},theme:f=>({...f,colors:{...f.colors,neutral0:c.bgCell,neutral5:c.bgCell,neutral10:c.bgCell,neutral20:c.bgCellMedium,neutral30:c.bgCellMedium,neutral40:c.bgCellMedium,neutral50:c.textLight,neutral60:c.textMedium,neutral70:c.textMedium,neutral80:c.textDark,neutral90:c.textDark,neutral100:c.textDark,primary:c.accentColor,primary75:c.accentColor,primary50:c.accentColor,primary25:c.accentLight}}),menuPortalTarget:document.getElementById("portal"),autoFocus:!0,openMenuOnFocus:!0,components:{DropdownIndicator:()=>null,IndicatorSeparator:()=>null,Menu:f=>g.createElement(my,null,g.createElement(hy,{className:"click-outside-ignore",...f}))},options:d,onChange:async f=>{f!==null&&(l(f.value),await new Promise(h=>window.requestAnimationFrame(h)),n({...t,data:{...t.data,value:f.value}}))}}))},by={kind:te.Custom,isMatch:e=>e.data.kind==="dropdown-cell",draw:(e,t)=>{const{ctx:n,theme:r,rect:i}=e,{value:o}=t.data,a=t.data.allowedValues.find(s=>typeof s=="string"||s===null||s===void 0?s===o:s.value===o),l=typeof a=="string"?a:(a==null?void 0:a.label)??"";return l&&(n.fillStyle=r.textDark,n.fillText(l,i.x+r.cellHorizontalPadding,i.y+i.height/2+ur(n,r))),!0},measure:(e,t,n)=>{const{value:r}=t.data;return(r?e.measureText(r).width:0)+n.cellHorizontalPadding*2},provideEditor:()=>({editor:vy,disablePadding:!0,deletedValue:e=>({...e,copyData:"",data:{...e.data,value:""}})}),onPaste:(e,t)=>({...t,value:t.allowedValues.includes(e)?e:t.value})},$r=6,wy={marginRight:8},yy={display:"flex",alignItems:"center",flexGrow:1},Cy={kind:te.Custom,isMatch:e=>e.data.kind==="range-cell",draw:(e,t)=>{const{ctx:n,theme:r,rect:i}=e,{min:o,max:a,value:l,label:s,measureLabel:u}=t.data,c=i.x+r.cellHorizontalPadding,d=i.y+i.height/2,f=a-o,h=(l-o)/f;n.save();let m=0;s!==void 0&&(n.font=`12px ${r.fontFamily}`,m=jr(u??s,n,`12px ${r.fontFamily}`).width+r.cellHorizontalPadding);const p=i.width-r.cellHorizontalPadding*2-m;if(p>=$r){const v=n.createLinearGradient(c,d,c+p,d);v.addColorStop(0,r.accentColor),v.addColorStop(h,r.accentColor),v.addColorStop(h,r.bgBubble),v.addColorStop(1,r.bgBubble),n.beginPath(),n.fillStyle=v,qu(n,c,d-$r/2,p,$r,$r/2),n.fill(),n.beginPath(),qu(n,c+.5,d-$r/2+.5,p-1,$r-1,($r-1)/2),n.strokeStyle=r.accentLight,n.lineWidth=1,n.stroke()}return s!==void 0&&(n.textAlign="right",n.fillStyle=r.textDark,n.fillText(s,i.x+i.width-r.cellHorizontalPadding,d+ur(n,`12px ${r.fontFamily}`))),n.restore(),!0},provideEditor:()=>e=>{const{data:t,readonly:n}=e.value,r=t.value.toString(),i=t.min.toString(),o=t.max.toString(),a=t.step.toString(),l=s=>{e.onChange({...e.value,data:{...t,value:Number(s.target.value)}})};return g.createElement("label",{style:yy},g.createElement("input",{style:wy,type:"range",value:r,min:i,max:o,step:a,onChange:l,disabled:n}),r)},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}}},Sy=mn("input")({name:"StyledInputBox",class:"gdg-s1wtovjx",propsAsIs:!1}),ps=(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}`)}},xy=e=>{const t=e.value.data,{format:n,displayDate:r}=t,i=t.step!==void 0&&!Number.isNaN(Number(t.step))?Number(t.step):void 0,o=t.min instanceof Date?ps(n,t.min):t.min,a=t.max instanceof Date?ps(n,t.max):t.max;let l=t.date;const s=t.timezoneOffset?t.timezoneOffset*60*1e3:0;s&&l&&(l=new Date(l.getTime()+s));const u=ps(n,l);return e.value.readonly?se.createElement(Yr,{highlight:!0,autoFocus:!1,disabled:!0,value:r??"",onChange:()=>{}}):se.createElement(Sy,{"data-testid":"date-picker-cell",required:!0,type:n,defaultValue:u,min:o,max:a,step:i,autoFocus:!0,onChange:c=>{isNaN(c.target.valueAsNumber)?e.onChange({...e.value,data:{...e.value.data,date:void 0}}):e.onChange({...e.value,data:{...e.value.data,date:new Date(c.target.valueAsNumber-s)}})}})},ky={kind:te.Custom,isMatch:e=>e.data.kind==="date-picker-cell",draw:(e,t)=>{const{displayDate:n}=t.data;return Vs(e,n,t.contentAlign),!0},measure:(e,t,n)=>{const{displayDate:r}=t.data;return e.measureText(r).width+n.cellHorizontalPadding*2},provideEditor:()=>({editor:xy}),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)}}},My="None";function hc(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 Ry=e=>{const{cell:t,theme:n,ctx:r}=e;Vs({...e,theme:{...n,textDark:n.textLight,headerFontFull:`${n.headerFontStyle} ${n.fontFamily}`,baseFontFull:`${n.baseFontStyle} ${n.fontFamily}`,markerFontFull:`${n.markerFontStyle} ${n.fontFamily}`}},My,t.contentAlign),r.fillStyle=n.textDark};function Ey(e){const t=se.useCallback((r,i)=>{const{cell:o,theme:a,ctx:l,rect:s}=r,u=r.col;if(fi(o))hc(l,s,a);else if(ba(o)&&u<e.length){const c=e[u];["checkbox","line_chart","bar_chart","progress"].includes(c.kind)?i():Ry(r),c.isRequired&&c.isEditable&&hc(l,s,a);return}i()},[e]),n=se.useMemo(()=>[L1,by,Cy,ky,...s1],[]);return{drawCell:t,customRenderers:n}}function Iy(){const e=pa();return se.useMemo(()=>{const n={editable:i=>`<svg xmlns="http://www.w3.org/2000/svg" height="40" viewBox="0 96 960 960" width="40" fill="${i.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:Ba(e.colors.primary,.9),borderColor:e.colors.borderColorLight,horizontalBorderColor:e.colors.borderColorLight,fontFamily:e.genericFonts.bodyFont,bgSearchResult:Ba(e.colors.primary,.9),resizeIndicatorColor:e.colors.primary,bgIconHeader:e.colors.fadedText60,fgIconHeader:e.colors.white,bgHeader:e.colors.bgMix,bgHeaderHasFocus:e.colors.secondaryBg,bgHeaderHovered:e.colors.secondaryBg,textHeader:e.colors.fadedText60,textHeaderSelected:e.colors.white,textGroupHeader:e.colors.fadedText60,headerFontStyle:`${$n(e.fontSizes.sm)}px`,baseFontStyle:`${$n(e.fontSizes.sm)}px`,editorFontSize:e.fontSizes.sm,textDark:e.colors.bodyText,textMedium:Ba(e.colors.bodyText,.2),textLight:e.colors.fadedText40,textBubble:e.colors.fadedText60,bgCell:e.colors.bgColor,bgCellMedium:e.colors.bgColor,cellHorizontalPadding:Math.round($n(e.spacing.sm)),cellVerticalPadding:Math.round($n("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($n("25rem")),minColumnWidth:Math.round($n("3.125rem")),maxColumnWidth:Math.round($n("62.5rem")),maxColumnAutoWidth:Math.round($n("31.25rem")),defaultRowHeight:Math.round($n("2.1875rem")),defaultHeaderHeight:Math.round($n("2.1875rem")),bgRowHovered:Xh(e.colors.bgColor,e.colors.secondaryBg,.3),headerIcons:n}},[e])}const Ty=Ds.getLogger("useDataEditor");function Dy(e,t,n,r,i,o,a,l,s){const u=se.useCallback(([p,v],y)=>{const b=e[p];if(!b.isEditable)return;const R=b.indexNumber,O=n.current.getOriginalRowIndex(i(v)),S=r([p,v]),M=b.getCellValue(S),_=b.getCellValue(y);if(!fi(S)&&_===M)return;const E=b.getCell(_,!0);fi(E)?Ty.warn(`Not applying the cell edit since it causes this error:
|
195
|
+
${E.data}`):(n.current.setCell(R,O,{...E,lastUpdated:performance.now()}),l())},[e,n,i,r,l]),c=se.useCallback(()=>{if(t)return;const p=new Map;e.forEach(v=>{p.set(v.indexNumber,v.getCell(v.defaultValue))}),n.current.addRow(p),a()},[e,n,t,a]),d=se.useCallback(()=>{t||(c(),l())},[c,l,t]),f=se.useCallback(p=>{var v;if(p.rows.length>0){if(t)return!0;const y=p.rows.toArray().map(b=>n.current.getOriginalRowIndex(i(b)));return n.current.deleteRows(y),a(),s(),l(),!1}if((v=p.current)!=null&&v.range){const y=[],b=p.current.range;for(let R=b.y;R<b.y+b.height;R++)for(let O=b.x;O<b.x+b.width;O++){const S=e[O];S.isEditable&&!S.isRequired&&(y.push({cell:[O,R]}),u([O,R],S.getCell(null)))}return y.length>0&&(l(),o(y)),!1}return!0},[e,n,t,o,i,l,u,s,a]),h=se.useCallback((p,v)=>{const[y,b]=p,R=[];for(let O=0;O<v.length;O++){const S=v[O];if(O+b>=n.current.getNumRows()){if(t)break;c()}for(let M=0;M<S.length;M++){const _=S[M],E=O+b,x=M+y;if(x>=e.length)break;const L=e[x];if(L.isEditable){const D=L.getCell(_,!0);if(pt(D)&&!fi(D)){const C=L.indexNumber,I=n.current.getOriginalRowIndex(i(E)),T=L.getCellValue(r([x,E]));L.getCellValue(D)!==T&&(n.current.setCell(C,I,{...D,lastUpdated:performance.now()}),R.push({cell:[x,E]}))}}}R.length>0&&(l(),o(R))}return!1},[e,n,t,i,r,c,l,o]),m=se.useCallback((p,v)=>{const y=p[0];if(y>=e.length)return!0;const b=e[y];if(b.validateInput){const R=b.validateInput(b.getCellValue(v));return R===!0||R===!1?R:b.getCell(R)}return!0},[e]);return{onCellEdited:u,onPaste:h,onRowAppended:d,onDelete:f,validateCell:m}}const xf=",",Xi='"',Oy='"',kf=`
|
196
|
+
`,Py="\uFEFF",_y=new RegExp(`[${[xf,Xi,kf].join("")}]`),gc=Ds.getLogger("useDataExporter");function mc(e){return e.map(t=>Ly(t)).join(xf)+kf}function Ly(e){if(Be(e))return"";const t=wt(e);return _y.test(t)?`${Xi}${t.replace(new RegExp(Xi,"g"),Oy+Xi)}${Xi}`:t}async function pc(e,t,n,r){const i=new TextEncoder;await e.write(i.encode(Py));const o=n.map(a=>a.name);await e.write(i.encode(mc(o)));for(let a=0;a<r;a++){const l=[];n.forEach((s,u,c)=>{l.push(s.getCellValue(t([u,a])))}),await e.write(i.encode(mc(l)))}await e.close()}function Fy(e,t,n,r){return{exportToCsv:se.useCallback(async()=>{const a=`${new Date().toISOString().slice(0,16).replace(":","-")}_export.csv`;try{const u=await(await(await Ts(()=>import("./es6.CkTV0_PT.js").then(c=>c.a),__vite__mapDeps([14,1,2]),import.meta.url)).showSaveFilePicker({suggestedName:a,types:[{accept:{"text/csv":[".csv"]}}],excludeAcceptAllOption:!1})).createWritable();await pc(u,e,t,n)}catch(l){if(l instanceof Error&&l.name==="AbortError")return;try{gc.warn("Failed to export data as CSV with FileSystem API, trying fallback method",l);let s="";const u=new WritableStream({write:async h=>{s+=new TextDecoder("utf-8").decode(h)},close:async()=>{}});await pc(u.getWriter(),e,t,n);const c=new Blob([s],{type:"text/csv;charset=utf-8;"}),d=URL.createObjectURL(c),f=ag({enforceDownloadInNewTab:r,url:d,filename:a});f.style.display="none",document.body.appendChild(f),f.click(),document.body.removeChild(f),URL.revokeObjectURL(d)}catch(s){gc.error("Failed to export data as CSV",s)}}},[t,n,e,r])}}function Ay(e,t,n,r){return{getCellContent:se.useCallback(([o,a])=>{var d;if(o>t.length-1)return _t("Column index out of bounds","This error should never happen. Please report this bug.");if(a>n-1)return _t("Row index out of bounds","This error should never happen. Please report this bug.");const l=t[o],s=l.indexNumber,u=r.current.getOriginalRowIndex(a),c=r.current.isAddedRow(u);if(l.isEditable||c){const f=r.current.getCell(s,u);if(pt(f))return f;if(c)return _t("Error during cell creation",`This error should never happen. Please report this bug. No cell found for an added row: col=${s}; row=${u}`)}try{const f=e.getCell(u,s),h=jh(e,u,s);return b1(l,f,h,(d=e.styler)==null?void 0:d.cssStyles)}catch(f){return _t("Error during cell creation",`This error should never happen. Please report this bug.
|
197
|
+
Error: ${f}`)}},[t,n,e,r])}}function Hy(e){const[t,n]=se.useState(void 0),r=se.useCallback(o=>{if(o.kind!=="cell")n(void 0);else{const[,a]=o.location;n(a)}},[n]);return{getRowThemeOverride:se.useCallback(o=>{if(o===t)return{bgCell:e.bgRowHovered,bgCellMedium:e.bgRowHovered}},[e.bgRowHovered,t]),onItemHovered:r}}function zy(e,t,n,r,i){const[o,a]=se.useState({columns:bt.empty(),rows:bt.empty(),current:void 0}),l=!t&&!n&&(e.selectionMode.includes(Bn.SelectionMode.MULTI_ROW)||e.selectionMode.includes(Bn.SelectionMode.SINGLE_ROW)),s=l&&e.selectionMode.includes(Bn.SelectionMode.MULTI_ROW),u=!t&&!n&&(e.selectionMode.includes(Bn.SelectionMode.SINGLE_COLUMN)||e.selectionMode.includes(Bn.SelectionMode.MULTI_COLUMN)),c=u&&e.selectionMode.includes(Bn.SelectionMode.MULTI_COLUMN),d=o.rows.length>0,f=o.columns.length>0,h=o.current!==void 0,m=se.useCallback(v=>{const y=!Wa(v.rows.toArray(),o.rows.toArray()),b=!Wa(v.columns.toArray(),o.columns.toArray()),R=!Wa(v.current,o.current);let O=l&&y||u&&b,S=v;if((l||u)&&v.current!==void 0&&R&&(S={...v,rows:o.rows,columns:o.columns},O=!1),y&&v.rows.length>0&&b&&v.columns.length===0&&(S={...S,columns:o.columns},O=!0),b&&v.columns.length>0&&y&&v.rows.length===0&&(S={...S,rows:o.rows},O=!0),b&&S.columns.length>=0){let M=S.columns;r.forEach((_,E)=>{_.isIndex&&(M=M.remove(E))}),M.length<S.columns.length&&(S={...S,columns:M})}a(S),O&&i(S)},[o,l,u,i,r]),p=se.useCallback((v=!1,y=!1)=>{const b={columns:y?o.columns:bt.empty(),rows:v?o.rows:bt.empty(),current:void 0};a(b),(!v&&l||!y&&u)&&i(b)},[o,l,u,i]);return{gridSelection:o,isRowSelectionActivated:l,isMultiRowSelectionActivated:s,isColumnSelectionActivated:u,isMultiColumnSelectionActivated:c,isRowSelected:d,isColumnSelected:f,isCellSelected:h,clearSelection:p,processSelectionChange:m}}function Vy(e,t,n,r,i,o,a){const l=e.rowHeight??t.defaultRowHeight,s=t.defaultHeaderHeight+l+2*t.tableBorderWidth,u=r?2:1,c=e.editingMode===Bn.EditingMode.DYNAMIC?1:0,d=n+c;let f=Math.max(d*l+u*t.defaultHeaderHeight+2*t.tableBorderWidth,s),h=Math.min(f,t.defaultTableHeight);e.height&&(h=Math.max(e.height,s),f=Math.max(e.height,f)),o&&(h=Math.min(h,o),f=Math.min(f,o),e.height||(h=f));const m=t.minColumnWidth+2*t.tableBorderWidth,p=Math.max(i,m);let v,y=p;e.useContainerWidth?v=p:e.width&&(v=Math.min(Math.max(e.width,m),p),y=Math.min(Math.max(e.width,y),p));const[b,R]=se.useState({width:v||"100%",height:h});return se.useLayoutEffect(()=>{e.useContainerWidth&&b.width==="100%"&&R(O=>({...O,width:p}))},[p]),se.useLayoutEffect(()=>{R(O=>({...O,width:v||"100%"}))},[v]),se.useLayoutEffect(()=>{R(O=>({...O,height:h}))},[h,n]),se.useLayoutEffect(()=>{if(a){const O=e.useContainerWidth||pt(e.width)&&e.width>0;R({width:O?y:"100%",height:f})}else R({width:v||"100%",height:h})},[a]),{minHeight:s,maxHeight:f,minWidth:m,maxWidth:y,rowHeight:l,resizableSize:b,setResizableSize:R}}const $y=600,Ny="⚠️ Please fill out this cell.";function By(e,t,n=[]){const[r,i]=se.useState(),o=se.useRef(null),a=se.useCallback(s=>{if(clearTimeout(o.current),o.current=0,i(void 0),(s.kind==="header"||s.kind==="cell")&&s.location){const u=s.location[0],c=s.location[1];let d;if(u<0||u>=e.length||n.includes(c))return;const f=e[u];if(s.kind==="header"&&pt(f))d=f.help;else if(s.kind==="cell"){const h=t([u,c]);fi(h)?d=h.errorDetails:f.isRequired&&f.isEditable&&ba(h)?d=Ny:Yv(h)&&(d=h.tooltip)}d&&(o.current=setTimeout(()=>{d&&i({content:d,left:s.bounds.x+s.bounds.width/2,top:s.bounds.y})},$y))}},[e,t,i,o,n]),l=se.useCallback(()=>{i(void 0)},[i]);return{tooltip:r,clearTooltip:l,onItemHovered:a}}function Wy({top:e,left:t,content:n,clearTooltip:r}){const[i,o]=se.useState(!0),a=pa(),{colors:l,fontSizes:s,radii:u,fontWeights:c}=a,d=se.useCallback(()=>{o(!1),r()},[r,o]);return Ht(Rc,{content:Ht(Gh,{"data-testid":"stDataFrameTooltipContent",children:Ht(Kh,{style:{fontSize:s.sm},source:n,allowHTML:!1})}),placement:kc.top,accessibilityType:xc.tooltip,showArrow:!1,popoverMargin:5,onClickOutside:d,onEsc:d,overrides:{Body:{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"}},Inner:{style:{backgroundColor:Mc(a)?l.bgColor:l.secondaryBg,color:l.bodyText,fontSize:s.sm,fontWeight:c.normal,paddingTop:"0 !important",paddingBottom:"0 !important",paddingLeft:"0 !important",paddingRight:"0 !important"}}},isOpen:i,children:Ht("div",{"data-testid":"stDataFrameTooltipTarget",style:{position:"fixed",top:e,left:t}})})}const vc=150,Uy=15e4,bc=6;function qy({element:e,data:t,disabled:n,widgetMgr:r,disableFullscreenMode:i,fragmentId:o}){const{expanded:a,expand:l,collapse:s,width:u,height:c}=tg(ng),d=se.useRef(null),f=se.useRef(null),h=se.useRef(null),m=Iy(),{getRowThemeOverride:p,onItemHovered:v}=Hy(m),{libConfig:{enforceDownloadInNewTab:y=!1}}=se.useContext(Zh),[b,R]=se.useState(!0),[O,S]=se.useState(!1),[M,_]=se.useState(!1),[E,x]=se.useState(!1),[L,D]=se.useState(),C=se.useMemo(()=>window.matchMedia&&window.matchMedia("(pointer: coarse)").matches,[]),I=se.useMemo(()=>window.navigator.userAgent.includes("Mac OS")&&window.navigator.userAgent.includes("Safari")||window.navigator.userAgent.includes("Chrome"),[]);Be(e.editingMode)&&(e.editingMode=Bn.EditingMode.READ_ONLY);const{READ_ONLY:T,DYNAMIC:k}=Bn.EditingMode,V=t.dimensions,N=Math.max(0,V.numDataRows),U=N===0&&!(e.editingMode===k&&V.numDataColumns>0),oe=N>Uy,ee=!oe&&!U&&e.editingMode!==k,j=!U&&e.editingMode===k&&!n,ne=se.useRef(new Wo(N)),[ie,ue]=se.useState(ne.current.getNumRows());se.useEffect(()=>{ne.current=new Wo(N),ue(ne.current.getNumRows())},[N]);const ge=se.useCallback(()=>{ne.current=new Wo(N),ue(ne.current.getNumRows())},[N]),[J,H]=se.useState(e.columnOrder),{columns:P,setColumnConfigMapping:q}=x1(e,t,n,J);se.useEffect(()=>{if(e.editingMode===T)return;const he=r.getStringValue({id:e.id,formId:e.formId});he&&(ne.current.fromJson(he,P),ue(ne.current.getNumRows()))},[]);const{getCellContent:fe}=Ay(t,P,ie,ne),{columns:me,sortColumn:ze,getOriginalIndex:ve,getCellContent:Xe}=P1(N,P,fe),Me=se.useCallback(he=>{const lt={selection:{rows:[],columns:[]}};lt.selection.rows=he.rows.toArray().map(z=>ve(z)),lt.selection.columns=he.columns.toArray().map(z=>Ji(me[z]));const un=JSON.stringify(lt),hn=r.getStringValue({id:e.id,formId:e.formId});(hn===void 0||hn!==un)&&r.setStringValue({id:e.id,formId:e.formId},un,{fromUi:!0},o)},[me,e.id,e.formId,r,o,ve]),{debouncedCallback:Pt}=_u(Me,vc),{gridSelection:Mt,isRowSelectionActivated:Qe,isMultiRowSelectionActivated:le,isColumnSelectionActivated:je,isMultiColumnSelectionActivated:we,isRowSelected:ce,isColumnSelected:be,isCellSelected:Ve,clearSelection:Oe,processSelectionChange:nt}=zy(e,U,n,me,Pt);se.useEffect(()=>{Oe(!0,!0)},[a]);const pe=se.useCallback(he=>{var lt;(lt=f.current)==null||lt.updateCells(he)},[]);se.useEffect(()=>{var lt,un,hn,z;if(!Qe&&!je)return;const he=r.getStringValue({id:e.id,formId:e.formId});if(he){const et=me.map(Zt=>Ji(Zt)),$e=JSON.parse(he);let Ot=bt.empty(),cn=bt.empty();(un=(lt=$e.selection)==null?void 0:lt.rows)==null||un.forEach(Zt=>{Ot=Ot.add(Zt)}),(z=(hn=$e.selection)==null?void 0:hn.columns)==null||z.forEach(Zt=>{cn=cn.add(et.indexOf(Zt))}),(Ot.length>0||cn.length>0)&&nt({rows:Ot,columns:cn,current:void 0})}},[]);const Ee=se.useCallback(()=>{ie!==ne.current.getNumRows()&&ue(ne.current.getNumRows())},[ie]),at=se.useCallback(()=>{const he=ne.current.toJson(me);let lt=r.getStringValue({id:e.id,formId:e.formId});lt===void 0&&(lt=new Wo(0).toJson([])),he!==lt&&r.setStringValue({id:e.id,formId:e.formId},he,{fromUi:!0},o)},[me,e.id,e.formId,r,o]),{debouncedCallback:Ae}=_u(at,vc),{exportToCsv:rt}=Fy(Xe,me,ie,y),{onCellEdited:vt,onPaste:ht,onRowAppended:He,onDelete:It,validateCell:Yt}=Dy(me,e.editingMode!==k,ne,Xe,ve,pe,Ee,Ae,Oe),{tooltip:mt,clearTooltip:Rt,onItemHovered:Gt}=By(me,Xe,j?[ie]:[]),{drawCell:Lt,customRenderers:Sn}=Ey(me),{provideEditor:Wt}=_1(),St=g.useCallback(he=>({...he,hasMenu:!U}),[U]),En=se.useMemo(()=>me.map(he=>St(Ms(he))),[me,St]),{columns:pn,onColumnResize:Pe}=R1(En),Ft=t.dimensions.numHeaderRows>1,{minHeight:dn,maxHeight:fn,minWidth:vn,maxWidth:st,rowHeight:zt,resizableSize:Dt,setResizableSize:nn}=Vy(e,m,ie,Ft,u||0,c,a),Tt=se.useCallback(([he,lt])=>({...Xv(!0,!1),displayData:"empty",contentAlign:"center",allowOverlay:!1,themeOverride:{textDark:m.glideTheme.textLight},span:[0,Math.max(me.length-1,0)]}),[me,m.glideTheme.textLight]),Vt=se.useCallback(()=>{ge(),Oe()},[ge,Oe]);Qh({element:e,widgetMgr:r,onFormCleared:Vt});const{pinColumn:Ge,unpinColumn:$t,freezeColumns:At}=k1(me,U,u||0,m.minColumnWidth,Oe,q),{onColumnMoved:Nt}=M1(me,At,Ge,$t,H);return se.useEffect(()=>{setTimeout(()=>{var he,lt;if(h.current&&f.current){const un=(lt=(he=h.current)==null?void 0:he.querySelector(".dvn-stack"))==null?void 0:lt.getBoundingClientRect();un&&(_(un.height>h.current.clientHeight),x(un.width>h.current.clientWidth))}},1)},[Dt,ie,pn]),Ir(Lu,{className:"stDataFrame","data-testid":"stDataFrame",hasCustomizedScrollbars:I,ref:h,onMouseDown:he=>{if(h.current&&I){const lt=h.current.getBoundingClientRect();E&<.height-(bc+1)<he.clientY-lt.top&&he.stopPropagation(),M&<.width-(bc+1)<he.clientX-lt.left&&he.stopPropagation()}},onBlur:he=>{!b&&!C&&!he.currentTarget.contains(he.relatedTarget)&&Oe(!0,!0)},children:[Ir(rg,{isFullScreen:a,disableFullscreenMode:i,locked:ce&&!Qe||Ve||C&&b,onExpand:l,onCollapse:s,target:Lu,children:[(Qe&&ce||je&&be)&&Ht(Oi,{label:"Clear selection",icon:sg,onClick:()=>{Oe(),Rt()}}),j&&ce&&Ht(Oi,{label:"Delete row(s)",icon:fg,onClick:()=>{It&&(It(Mt),Rt())}}),j&&!ce&&Ht(Oi,{label:"Add row",icon:Lc,onClick:()=>{var he;He&&(R(!0),He(),Rt(),(he=f.current)==null||he.scrollTo(0,ie,"vertical"))}}),!oe&&!U&&Ht(Oi,{label:"Download as CSV",icon:hg,onClick:()=>rt()}),!U&&Ht(Oi,{label:"Search",icon:Fc,onClick:()=>{O?S(!1):(R(!0),S(!0)),Rt()}})]}),Ht(Jh,{"data-testid":"stDataFrameResizable",ref:d,defaultSize:Dt,style:{border:`${m.tableBorderWidth}px solid ${m.glideTheme.borderColor}`,borderRadius:`${m.tableBorderRadius}`},minHeight:dn,maxHeight:fn,minWidth:vn,maxWidth:st,size:Dt,enable:{top:!1,right:!1,bottom:!1,left:!1,topRight:!1,bottomRight:!0,bottomLeft:!1,topLeft:!1},grid:[1,zt],snapGap:zt/3,onResizeStop:(he,lt,un,hn)=>{if(d.current){const z=2*m.tableBorderWidth;nn({width:d.current.size.width,height:fn-d.current.size.height===z?d.current.size.height+z:d.current.size.height})}},children:Ht(Fv,{className:"stDataFrameGlideDataEditor","data-testid":"stDataFrameGlideDataEditor",ref:f,columns:pn,rows:U?1:ie,minColumnWidth:m.minColumnWidth,maxColumnWidth:m.maxColumnWidth,maxColumnAutoWidth:m.maxColumnAutoWidth,rowHeight:zt,headerHeight:m.defaultHeaderHeight,getCellContent:U?Tt:Xe,onColumnResize:C?void 0:Pe,resizeIndicator:"header",freezeColumns:At,smoothScrollX:!0,smoothScrollY:!0,verticalBorder:!0,getCellsForSelection:!0,rowMarkers:"none",rangeSelect:C?"cell":"rect",columnSelect:"none",rowSelect:"none",onColumnMoved:je?void 0:Nt,onItemHovered:he=>{v==null||v(he),Gt==null||Gt(he)},keybindings:{downFill:!0},onKeyDown:he=>{(he.ctrlKey||he.metaKey)&&he.key==="f"&&(S(lt=>!lt),he.stopPropagation(),he.preventDefault())},showSearch:O,onSearchClose:()=>{S(!1),Rt()},onHeaderClicked:(he,lt)=>{!ee||je||(Qe&&ce?Oe():Oe(!0,!0),ze(he,"auto"))},gridSelection:Mt,onGridSelectionChange:he=>{(b||C)&&(nt(he),mt!==void 0&&Rt())},theme:m.glideTheme,getRowThemeOverride:p,onMouseMove:he=>{he.kind==="out-of-bounds"&&b?R(!1):he.kind!=="out-of-bounds"&&!b&&R(!0)},fixedShadowX:!0,fixedShadowY:!0,experimental:{scrollbarWidthOverride:0,...I&&{paddingBottom:E?-6:void 0,paddingRight:M?-6:void 0}},provideEditor:Wt,drawCell:Lt,customRenderers:Sn,imageEditorOverride:a1,headerIcons:m.headerIcons,validateCell:Yt,onHeaderMenuClick:(he,lt)=>{D({columnIdx:he,headerBounds:lt})},onPaste:!1,...Qe&&{rowMarkers:{kind:"checkbox",checkboxStyle:"square",theme:{bgCell:m.glideTheme.bgHeader,bgCellMedium:m.glideTheme.bgHeader}},rowSelectionMode:le?"multi":"auto",rowSelect:n?"none":le?"multi":"single",rowSelectionBlending:"mixed",rangeSelectionBlending:"exclusive"},...je&&{columnSelect:n?"none":we?"multi":"single",columnSelectionBlending:"mixed",rangeSelectionBlending:"exclusive"},...!U&&e.editingMode!==T&&!n&&{fillHandle:!C,onCellEdited:vt,onPaste:ht,onDelete:It},...!U&&e.editingMode===k&&{trailingRowOptions:{sticky:!1,tint:!0},rowMarkers:{kind:"checkbox",checkboxStyle:"square",theme:{bgCell:m.glideTheme.bgHeader,bgCellMedium:m.glideTheme.bgHeader}},rowSelectionMode:"multi",rowSelect:n?"none":"multi",onRowAppended:n?void 0:He,onHeaderClicked:void 0}})}),mt&&mt.content&&Ht(Wy,{top:mt.top,left:mt.left,content:mt.content,clearTooltip:Rt}),L&&Pc.createPortal(Ht(Vv,{top:L.headerBounds.y+L.headerBounds.height,left:L.headerBounds.x+L.headerBounds.width,onCloseMenu:()=>D(void 0),onSortColumn:ee?he=>{Oe(!0,!0),ze(L.columnIdx,he,!0)}:void 0,isColumnPinned:P[L.columnIdx].isPinned,onUnpinColumn:()=>{$t(P[L.columnIdx].id)},onPinColumn:()=>{Ge(P[L.columnIdx].id)}}),document.querySelector("#portal"))]})}const Yy=g.memo(eg(qy)),oC=Object.freeze(Object.defineProperty({__proto__:null,default:Yy},Symbol.toStringTag,{value:"Module"}));export{h0 as C,gd as T,ui as a,wg as b,oC as c,si as i,Am as m,mn as s};
|