@warkypublic/oranguru 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,287 @@
1
+ "use strict";const se=require("react"),Hg=require("@warkypublic/artemis-kit"),qg=require("@warkypublic/zustandsyncstore"),vt=require("@mantine/core"),Hu=require("@mantine/hooks");function Nm(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const p=Nm(se);var so=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Gn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var lo={exports:{}},ci={};/**
2
+ * @license React
3
+ * react-jsx-runtime.production.js
4
+ *
5
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
6
+ *
7
+ * This source code is licensed under the MIT license found in the
8
+ * LICENSE file in the root directory of this source tree.
9
+ */var Ec;function Wm(){if(Ec)return ci;Ec=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,i,o){var a=null;if(o!==void 0&&(a=""+o),i.key!==void 0&&(a=""+i.key),"key"in i){o={};for(var s in i)s!=="key"&&(o[s]=i[s])}else o=i;return i=o.ref,{$$typeof:e,type:r,key:a,ref:i!==void 0?i:null,props:o}}return ci.Fragment=t,ci.jsx=n,ci.jsxs=n,ci}var di={};/**
10
+ * @license React
11
+ * react-jsx-runtime.development.js
12
+ *
13
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
14
+ *
15
+ * This source code is licensed under the MIT license found in the
16
+ * LICENSE file in the root directory of this source tree.
17
+ */var Mc;function Bm(){return Mc||(Mc=1,process.env.NODE_ENV!=="production"&&(function(){function e(M){if(M==null)return null;if(typeof M=="function")return M.$$typeof===R?null:M.displayName||M.name||null;if(typeof M=="string")return M;switch(M){case x:return"Fragment";case y:return"Profiler";case _:return"StrictMode";case T:return"Suspense";case O:return"SuspenseList";case L:return"Activity"}if(typeof M=="object")switch(typeof M.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),M.$$typeof){case m:return"Portal";case P:return M.displayName||"Context";case C:return(M._context.displayName||"Context")+".Consumer";case S:var $=M.render;return M=M.displayName,M||(M=$.displayName||$.name||"",M=M!==""?"ForwardRef("+M+")":"ForwardRef"),M;case A:return $=M.displayName||null,$!==null?$:e(M.type)||"Memo";case E:$=M._payload,M=M._init;try{return e(M($))}catch{}}return null}function t(M){return""+M}function n(M){try{t(M);var $=!1}catch{$=!0}if($){$=console;var W=$.error,K=typeof Symbol=="function"&&Symbol.toStringTag&&M[Symbol.toStringTag]||M.constructor.name||"Object";return W.call($,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",K),t(M)}}function r(M){if(M===x)return"<>";if(typeof M=="object"&&M!==null&&M.$$typeof===E)return"<...>";try{var $=e(M);return $?"<"+$+">":"<...>"}catch{return"<...>"}}function i(){var M=b.A;return M===null?null:M.getOwner()}function o(){return Error("react-stack-top-frame")}function a(M){if(k.call(M,"key")){var $=Object.getOwnPropertyDescriptor(M,"key").get;if($&&$.isReactWarning)return!1}return M.key!==void 0}function s(M,$){function W(){N||(N=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",$))}W.isReactWarning=!0,Object.defineProperty(M,"key",{get:W,configurable:!0})}function l(){var M=e(this.type);return B[M]||(B[M]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),M=this.props.ref,M!==void 0?M:null}function u(M,$,W,K,J,oe){var ne=W.ref;return M={$$typeof:g,type:M,key:$,props:W,_owner:K},(ne!==void 0?ne:null)!==null?Object.defineProperty(M,"ref",{enumerable:!1,get:l}):Object.defineProperty(M,"ref",{enumerable:!1,value:null}),M._store={},Object.defineProperty(M._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(M,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(M,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:J}),Object.defineProperty(M,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:oe}),Object.freeze&&(Object.freeze(M.props),Object.freeze(M)),M}function c(M,$,W,K,J,oe){var ne=$.children;if(ne!==void 0)if(K)if(I(ne)){for(K=0;K<ne.length;K++)d(ne[K]);Object.freeze&&Object.freeze(ne)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else d(ne);if(k.call($,"key")){ne=e(M);var ie=Object.keys($).filter(function(me){return me!=="key"});K=0<ie.length?"{key: someKey, "+ie.join(": ..., ")+": ...}":"{key: someKey}",z[ne+K]||(ie=0<ie.length?"{"+ie.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
18
+ let props = %s;
19
+ <%s {...props} />
20
+ React keys must be passed directly to JSX without using spread:
21
+ let props = %s;
22
+ <%s key={someKey} {...props} />`,K,ne,ie,ne),z[ne+K]=!0)}if(ne=null,W!==void 0&&(n(W),ne=""+W),a($)&&(n($.key),ne=""+$.key),"key"in $){W={};for(var de in $)de!=="key"&&(W[de]=$[de])}else W=$;return ne&&s(W,typeof M=="function"?M.displayName||M.name||"Unknown":M),u(M,ne,W,i(),J,oe)}function d(M){h(M)?M._store&&(M._store.validated=1):typeof M=="object"&&M!==null&&M.$$typeof===E&&(M._payload.status==="fulfilled"?h(M._payload.value)&&M._payload.value._store&&(M._payload.value._store.validated=1):M._store&&(M._store.validated=1))}function h(M){return typeof M=="object"&&M!==null&&M.$$typeof===g}var f=se,g=Symbol.for("react.transitional.element"),m=Symbol.for("react.portal"),x=Symbol.for("react.fragment"),_=Symbol.for("react.strict_mode"),y=Symbol.for("react.profiler"),C=Symbol.for("react.consumer"),P=Symbol.for("react.context"),S=Symbol.for("react.forward_ref"),T=Symbol.for("react.suspense"),O=Symbol.for("react.suspense_list"),A=Symbol.for("react.memo"),E=Symbol.for("react.lazy"),L=Symbol.for("react.activity"),R=Symbol.for("react.client.reference"),b=f.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,k=Object.prototype.hasOwnProperty,I=Array.isArray,w=console.createTask?console.createTask:function(){return null};f={react_stack_bottom_frame:function(M){return M()}};var N,B={},G=f.react_stack_bottom_frame.bind(f,o)(),ce=w(r(o)),z={};di.Fragment=x,di.jsx=function(M,$,W){var K=1e4>b.recentlyCreatedOwnerStacks++;return c(M,$,W,!1,K?Error("react-stack-top-frame"):G,K?w(r(M)):ce)},di.jsxs=function(M,$,W){var K=1e4>b.recentlyCreatedOwnerStacks++;return c(M,$,W,!0,K?Error("react-stack-top-frame"):G,K?w(r(M)):ce)}})()),di}var Tc;function jm(){return Tc||(Tc=1,process.env.NODE_ENV==="production"?lo.exports=Wm():lo.exports=Bm()),lo.exports}var ye=jm();function $g(e="This should not happen"){throw new Error(e)}function en(e,t="Assertion failed"){if(!e)return $g(t)}function Ti(e,t){return $g(t??"Hell froze over")}function Um(e,t){try{return e()}catch{return t}}const Ic=Object.prototype.hasOwnProperty;function Yr(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--&&Yr(e[r],t[r]););return r===-1}if(!n||typeof e=="object"){r=0;for(n in e)if(Ic.call(e,n)&&++r&&!Ic.call(t,n)||!(n in t)||!Yr(e[n],t[n]))return!1;return Object.keys(t).length===r}}return e!==e&&t!==t}var fa,Pc;function Ym(){if(Pc)return fa;Pc=1;var e=Object.prototype,t=e.hasOwnProperty;function n(r,i){return r!=null&&t.call(r,i)}return fa=n,fa}var ha,Ac;function _n(){if(Ac)return ha;Ac=1;var e=Array.isArray;return ha=e,ha}var ga,Oc;function Ng(){if(Oc)return ga;Oc=1;var e=typeof so=="object"&&so&&so.Object===Object&&so;return ga=e,ga}var pa,Dc;function kn(){if(Dc)return pa;Dc=1;var e=Ng(),t=typeof self=="object"&&self&&self.Object===Object&&self,n=e||t||Function("return this")();return pa=n,pa}var ma,Fc;function Oi(){if(Fc)return ma;Fc=1;var e=kn(),t=e.Symbol;return ma=t,ma}var va,zc;function Gm(){if(zc)return va;zc=1;var e=Oi(),t=Object.prototype,n=t.hasOwnProperty,r=t.toString,i=e?e.toStringTag:void 0;function o(a){var s=n.call(a,i),l=a[i];try{a[i]=void 0;var u=!0}catch{}var c=r.call(a);return u&&(s?a[i]=l:delete a[i]),c}return va=o,va}var ya,Lc;function Xm(){if(Lc)return ya;Lc=1;var e=Object.prototype,t=e.toString;function n(r){return t.call(r)}return ya=n,ya}var wa,Hc;function Di(){if(Hc)return wa;Hc=1;var e=Oi(),t=Gm(),n=Xm(),r="[object Null]",i="[object Undefined]",o=e?e.toStringTag:void 0;function a(s){return s==null?s===void 0?i:r:o&&o in Object(s)?t(s):n(s)}return wa=a,wa}var ba,qc;function Fi(){if(qc)return ba;qc=1;function e(t){return t!=null&&typeof t=="object"}return ba=e,ba}var Sa,$c;function Oo(){if($c)return Sa;$c=1;var e=Di(),t=Fi(),n="[object Symbol]";function r(i){return typeof i=="symbol"||t(i)&&e(i)==n}return Sa=r,Sa}var Ca,Nc;function qu(){if(Nc)return Ca;Nc=1;var e=_n(),t=Oo(),n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,r=/^\w*$/;function i(o,a){if(e(o))return!1;var s=typeof o;return s=="number"||s=="symbol"||s=="boolean"||o==null||t(o)?!0:r.test(o)||!n.test(o)||a!=null&&o in Object(a)}return Ca=i,Ca}var xa,Wc;function gr(){if(Wc)return xa;Wc=1;function e(t){var n=typeof t;return t!=null&&(n=="object"||n=="function")}return xa=e,xa}var _a,Bc;function Wg(){if(Bc)return _a;Bc=1;var e=Di(),t=gr(),n="[object AsyncFunction]",r="[object Function]",i="[object GeneratorFunction]",o="[object Proxy]";function a(s){if(!t(s))return!1;var l=e(s);return l==r||l==i||l==n||l==o}return _a=a,_a}var ka,jc;function Km(){if(jc)return ka;jc=1;var e=kn(),t=e["__core-js_shared__"];return ka=t,ka}var Ra,Uc;function Vm(){if(Uc)return Ra;Uc=1;var e=Km(),t=(function(){var r=/[^.]+$/.exec(e&&e.keys&&e.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""})();function n(r){return!!t&&t in r}return Ra=n,Ra}var Ea,Yc;function Bg(){if(Yc)return Ea;Yc=1;var e=Function.prototype,t=e.toString;function n(r){if(r!=null){try{return t.call(r)}catch{}try{return r+""}catch{}}return""}return Ea=n,Ea}var Ma,Gc;function Zm(){if(Gc)return Ma;Gc=1;var e=Wg(),t=Vm(),n=gr(),r=Bg(),i=/[\\^$.*+?()[\]{}|]/g,o=/^\[object .+?Constructor\]$/,a=Function.prototype,s=Object.prototype,l=a.toString,u=s.hasOwnProperty,c=RegExp("^"+l.call(u).replace(i,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function d(h){if(!n(h)||t(h))return!1;var f=e(h)?c:o;return f.test(r(h))}return Ma=d,Ma}var Ta,Xc;function Jm(){if(Xc)return Ta;Xc=1;function e(t,n){return t?.[n]}return Ta=e,Ta}var Ia,Kc;function pr(){if(Kc)return Ia;Kc=1;var e=Zm(),t=Jm();function n(r,i){var o=t(r,i);return e(o)?o:void 0}return Ia=n,Ia}var Pa,Vc;function Do(){if(Vc)return Pa;Vc=1;var e=pr(),t=e(Object,"create");return Pa=t,Pa}var Aa,Zc;function Qm(){if(Zc)return Aa;Zc=1;var e=Do();function t(){this.__data__=e?e(null):{},this.size=0}return Aa=t,Aa}var Oa,Jc;function e0(){if(Jc)return Oa;Jc=1;function e(t){var n=this.has(t)&&delete this.__data__[t];return this.size-=n?1:0,n}return Oa=e,Oa}var Da,Qc;function t0(){if(Qc)return Da;Qc=1;var e=Do(),t="__lodash_hash_undefined__",n=Object.prototype,r=n.hasOwnProperty;function i(o){var a=this.__data__;if(e){var s=a[o];return s===t?void 0:s}return r.call(a,o)?a[o]:void 0}return Da=i,Da}var Fa,ed;function n0(){if(ed)return Fa;ed=1;var e=Do(),t=Object.prototype,n=t.hasOwnProperty;function r(i){var o=this.__data__;return e?o[i]!==void 0:n.call(o,i)}return Fa=r,Fa}var za,td;function r0(){if(td)return za;td=1;var e=Do(),t="__lodash_hash_undefined__";function n(r,i){var o=this.__data__;return this.size+=this.has(r)?0:1,o[r]=e&&i===void 0?t:i,this}return za=n,za}var La,nd;function i0(){if(nd)return La;nd=1;var e=Qm(),t=e0(),n=t0(),r=n0(),i=r0();function o(a){var s=-1,l=a==null?0:a.length;for(this.clear();++s<l;){var u=a[s];this.set(u[0],u[1])}}return o.prototype.clear=e,o.prototype.delete=t,o.prototype.get=n,o.prototype.has=r,o.prototype.set=i,La=o,La}var Ha,rd;function o0(){if(rd)return Ha;rd=1;function e(){this.__data__=[],this.size=0}return Ha=e,Ha}var qa,id;function $u(){if(id)return qa;id=1;function e(t,n){return t===n||t!==t&&n!==n}return qa=e,qa}var $a,od;function Fo(){if(od)return $a;od=1;var e=$u();function t(n,r){for(var i=n.length;i--;)if(e(n[i][0],r))return i;return-1}return $a=t,$a}var Na,ad;function a0(){if(ad)return Na;ad=1;var e=Fo(),t=Array.prototype,n=t.splice;function r(i){var o=this.__data__,a=e(o,i);if(a<0)return!1;var s=o.length-1;return a==s?o.pop():n.call(o,a,1),--this.size,!0}return Na=r,Na}var Wa,sd;function s0(){if(sd)return Wa;sd=1;var e=Fo();function t(n){var r=this.__data__,i=e(r,n);return i<0?void 0:r[i][1]}return Wa=t,Wa}var Ba,ld;function l0(){if(ld)return Ba;ld=1;var e=Fo();function t(n){return e(this.__data__,n)>-1}return Ba=t,Ba}var ja,ud;function u0(){if(ud)return ja;ud=1;var e=Fo();function t(n,r){var i=this.__data__,o=e(i,n);return o<0?(++this.size,i.push([n,r])):i[o][1]=r,this}return ja=t,ja}var Ua,cd;function zo(){if(cd)return Ua;cd=1;var e=o0(),t=a0(),n=s0(),r=l0(),i=u0();function o(a){var s=-1,l=a==null?0:a.length;for(this.clear();++s<l;){var u=a[s];this.set(u[0],u[1])}}return o.prototype.clear=e,o.prototype.delete=t,o.prototype.get=n,o.prototype.has=r,o.prototype.set=i,Ua=o,Ua}var Ya,dd;function Nu(){if(dd)return Ya;dd=1;var e=pr(),t=kn(),n=e(t,"Map");return Ya=n,Ya}var Ga,fd;function c0(){if(fd)return Ga;fd=1;var e=i0(),t=zo(),n=Nu();function r(){this.size=0,this.__data__={hash:new e,map:new(n||t),string:new e}}return Ga=r,Ga}var Xa,hd;function d0(){if(hd)return Xa;hd=1;function e(t){var n=typeof t;return n=="string"||n=="number"||n=="symbol"||n=="boolean"?t!=="__proto__":t===null}return Xa=e,Xa}var Ka,gd;function Lo(){if(gd)return Ka;gd=1;var e=d0();function t(n,r){var i=n.__data__;return e(r)?i[typeof r=="string"?"string":"hash"]:i.map}return Ka=t,Ka}var Va,pd;function f0(){if(pd)return Va;pd=1;var e=Lo();function t(n){var r=e(this,n).delete(n);return this.size-=r?1:0,r}return Va=t,Va}var Za,md;function h0(){if(md)return Za;md=1;var e=Lo();function t(n){return e(this,n).get(n)}return Za=t,Za}var Ja,vd;function g0(){if(vd)return Ja;vd=1;var e=Lo();function t(n){return e(this,n).has(n)}return Ja=t,Ja}var Qa,yd;function p0(){if(yd)return Qa;yd=1;var e=Lo();function t(n,r){var i=e(this,n),o=i.size;return i.set(n,r),this.size+=i.size==o?0:1,this}return Qa=t,Qa}var es,wd;function Wu(){if(wd)return es;wd=1;var e=c0(),t=f0(),n=h0(),r=g0(),i=p0();function o(a){var s=-1,l=a==null?0:a.length;for(this.clear();++s<l;){var u=a[s];this.set(u[0],u[1])}}return o.prototype.clear=e,o.prototype.delete=t,o.prototype.get=n,o.prototype.has=r,o.prototype.set=i,es=o,es}var ts,bd;function m0(){if(bd)return ts;bd=1;var e=Wu(),t="Expected a function";function n(r,i){if(typeof r!="function"||i!=null&&typeof i!="function")throw new TypeError(t);var o=function(){var a=arguments,s=i?i.apply(this,a):a[0],l=o.cache;if(l.has(s))return l.get(s);var u=r.apply(this,a);return o.cache=l.set(s,u)||l,u};return o.cache=new(n.Cache||e),o}return n.Cache=e,ts=n,ts}var ns,Sd;function v0(){if(Sd)return ns;Sd=1;var e=m0(),t=500;function n(r){var i=e(r,function(a){return o.size===t&&o.clear(),a}),o=i.cache;return i}return ns=n,ns}var rs,Cd;function y0(){if(Cd)return rs;Cd=1;var e=v0(),t=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,n=/\\(\\)?/g,r=e(function(i){var o=[];return i.charCodeAt(0)===46&&o.push(""),i.replace(t,function(a,s,l,u){o.push(l?u.replace(n,"$1"):s||a)}),o});return rs=r,rs}var is,xd;function w0(){if(xd)return is;xd=1;function e(t,n){for(var r=-1,i=t==null?0:t.length,o=Array(i);++r<i;)o[r]=n(t[r],r,t);return o}return is=e,is}var os,_d;function b0(){if(_d)return os;_d=1;var e=Oi(),t=w0(),n=_n(),r=Oo(),i=e?e.prototype:void 0,o=i?i.toString:void 0;function a(s){if(typeof s=="string")return s;if(n(s))return t(s,a)+"";if(r(s))return o?o.call(s):"";var l=s+"";return l=="0"&&1/s==-1/0?"-0":l}return os=a,os}var as,kd;function S0(){if(kd)return as;kd=1;var e=b0();function t(n){return n==null?"":e(n)}return as=t,as}var ss,Rd;function jg(){if(Rd)return ss;Rd=1;var e=_n(),t=qu(),n=y0(),r=S0();function i(o,a){return e(o)?o:t(o,a)?[o]:n(r(o))}return ss=i,ss}var ls,Ed;function C0(){if(Ed)return ls;Ed=1;var e=Di(),t=Fi(),n="[object Arguments]";function r(i){return t(i)&&e(i)==n}return ls=r,ls}var us,Md;function Bu(){if(Md)return us;Md=1;var e=C0(),t=Fi(),n=Object.prototype,r=n.hasOwnProperty,i=n.propertyIsEnumerable,o=e((function(){return arguments})())?e:function(a){return t(a)&&r.call(a,"callee")&&!i.call(a,"callee")};return us=o,us}var cs,Td;function ju(){if(Td)return cs;Td=1;var e=9007199254740991,t=/^(?:0|[1-9]\d*)$/;function n(r,i){var o=typeof r;return i=i??e,!!i&&(o=="number"||o!="symbol"&&t.test(r))&&r>-1&&r%1==0&&r<i}return cs=n,cs}var ds,Id;function Uu(){if(Id)return ds;Id=1;var e=9007199254740991;function t(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=e}return ds=t,ds}var fs,Pd;function Ho(){if(Pd)return fs;Pd=1;var e=Oo();function t(n){if(typeof n=="string"||e(n))return n;var r=n+"";return r=="0"&&1/n==-1/0?"-0":r}return fs=t,fs}var hs,Ad;function Ug(){if(Ad)return hs;Ad=1;var e=jg(),t=Bu(),n=_n(),r=ju(),i=Uu(),o=Ho();function a(s,l,u){l=e(l,s);for(var c=-1,d=l.length,h=!1;++c<d;){var f=o(l[c]);if(!(h=s!=null&&u(s,f)))break;s=s[f]}return h||++c!=d?h:(d=s==null?0:s.length,!!d&&i(d)&&r(f,d)&&(n(s)||t(s)))}return hs=a,hs}var gs,Od;function x0(){if(Od)return gs;Od=1;var e=Ym(),t=Ug();function n(r,i){return r!=null&&t(r,i,e)}return gs=n,gs}var _0=x0();const k0=Gn(_0),xo=null,Yu=void 0;var ue;(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"})(ue||(ue={}));var Dd;(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"})(Dd||(Dd={}));var _o;(function(e){e.Triangle="triangle",e.Dots="dots"})(_o||(_o={}));function uo(e){return"width"in e&&typeof e.width=="number"}async function Fd(e){return typeof e=="object"?e:await e()}function lr(e){return!(e.kind===ue.Loading||e.kind===ue.Bubble||e.kind===ue.RowID||e.kind===ue.Protected||e.kind===ue.Drilldown)}function cr(e){return e.kind===ln.Marker||e.kind===ln.NewRow}function Ci(e){if(!lr(e)||e.kind===ue.Image)return!1;if(e.kind===ue.Text||e.kind===ue.Number||e.kind===ue.Markdown||e.kind===ue.Uri||e.kind===ue.Custom||e.kind===ue.Boolean)return e.readonly!==!0;Ti(e,"A cell was passed with an invalid kind")}function Yg(e){return k0(e,"editor")}function bu(e){return!(e.readonly??!1)}var ln;(function(e){e.NewRow="new-row",e.Marker="marker"})(ln||(ln={}));function R0(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 zd;class qe{items;constructor(t){this.items=t}static empty=()=>zd??(zd=new qe([]));static fromSingleSelection=t=>qe.empty().add(t);offset(t){if(t===0)return this;const n=this.items.map(r=>[r[0]+t,r[1]+t]);return new qe(n)}add(t){const n=typeof t=="number"?[t,t+1]:t,r=R0([...this.items,n]);return new qe(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[s,l]=a;if(s<=i&&r<=l){const u=[];s<r&&u.push([s,r]),i<l&&u.push([i,l]),n.splice(o,1,...u)}}return new qe(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}}function E0(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var M0=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|popover|popoverTarget|popoverTargetAction|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,ps=E0(function(e){return M0.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),T0=function(){const t=Array.prototype.slice.call(arguments).filter(Boolean),n={},r=[];t.forEach(o=>{(o?o.split(" "):[]).forEach(s=>{if(s.startsWith("atm_")){const[,l]=s.split("_");n[l]=s}else r.push(s)})});const i=[];for(const o in n)Object.prototype.hasOwnProperty.call(n,o)&&i.push(n[o]);return i.push(...r),i.join(" ")},Ld=T0,I0=e=>e.toUpperCase()===e,P0=e=>t=>e.indexOf(t)===-1,Gg=(e,t)=>{const n={};return Object.keys(e).filter(P0(t)).forEach(r=>{n[r]=e[r]}),n};function A0(e,t,n){const r=Gg(t,n);if(!e){const i=typeof ps=="function"?{default:ps}:ps;Object.keys(r).forEach(o=>{i.default(o)||delete r[o]})}return r}var O0=(e,t)=>{if(process.env.NODE_ENV!=="production"){if(typeof e=="string"||typeof e=="number"&&isFinite(e))return;const n=typeof e=="object"?JSON.stringify(e):String(e);console.warn(`An interpolation evaluated to '${n}' in the component '${t}', which is probably a mistake. You should explicitly cast or transform the value to a string.`)}},D0=0;function Hd(e){var t;let n="";return process.env.NODE_ENV==="test"&&(n+=`mocked-styled-${D0++}`,(t=e?.__linaria)!=null&&t.className&&(n+=` ${e.__linaria.className}`)),r=>{if(process.env.NODE_ENV!=="production"&&process.env.NODE_ENV!=="test"&&Array.isArray(r))throw new Error('Using the "styled" tag in runtime is not supported. Make sure you have set up the Babel plugin correctly. See https://github.com/callstack/linaria#setup');const i=(a,s)=>{const{as:l=e,class:u=n}=a,c=r.propsAsIs===void 0?!(typeof l=="string"&&l.indexOf("-")===-1&&!I0(l[0])):r.propsAsIs,d=A0(c,a,["as","class"]);d.ref=s,d.className=r.atomic?Ld(r.class,d.className||u):Ld(d.className||u,r.class);const{vars:h}=r;if(h){const f={};for(const x in h){const _=h[x],y=_[0],C=_[1]||"",P=typeof y=="function"?y(a):y;O0(P,r.name),f[`--${x}`]=`${P}${C}`}const g=d.style||{},m=Object.keys(g);m.length>0&&m.forEach(x=>{f[x]=g[x]}),d.style=f}return e.__linaria&&e!==l?(d.as=l,se.createElement(e,d)):se.createElement(l,d)},o=se.forwardRef?se.forwardRef(i):a=>{const s=Gg(a,["innerRef"]);return i(s,a.innerRef)};return o.displayName=r.name,o.__linaria={className:r.class||n,extends:e},o}}var Ut=process.env.NODE_ENV!=="production"?new Proxy(Hd,{get(e,t){return e(t)}}):Hd;const F0=Ut("div")({name:"ImageOverlayEditorStyle",class:"gdg-i2iowwq",propsAsIs:!1});var ms={},fi={},co={},fo={},ho={exports:{}},go={exports:{}},et={};/** @license React v16.13.1
23
+ * react-is.production.min.js
24
+ *
25
+ * Copyright (c) Facebook, Inc. and its affiliates.
26
+ *
27
+ * This source code is licensed under the MIT license found in the
28
+ * LICENSE file in the root directory of this source tree.
29
+ */var qd;function z0(){if(qd)return et;qd=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,o=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,c=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,h=e?Symbol.for("react.suspense_list"):60120,f=e?Symbol.for("react.memo"):60115,g=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,x=e?Symbol.for("react.fundamental"):60117,_=e?Symbol.for("react.responder"):60118,y=e?Symbol.for("react.scope"):60119;function C(S){if(typeof S=="object"&&S!==null){var T=S.$$typeof;switch(T){case t:switch(S=S.type,S){case l:case u:case r:case o:case i:case d:return S;default:switch(S=S&&S.$$typeof,S){case s:case c:case g:case f:case a:return S;default:return T}}case n:return T}}}function P(S){return C(S)===u}return et.AsyncMode=l,et.ConcurrentMode=u,et.ContextConsumer=s,et.ContextProvider=a,et.Element=t,et.ForwardRef=c,et.Fragment=r,et.Lazy=g,et.Memo=f,et.Portal=n,et.Profiler=o,et.StrictMode=i,et.Suspense=d,et.isAsyncMode=function(S){return P(S)||C(S)===l},et.isConcurrentMode=P,et.isContextConsumer=function(S){return C(S)===s},et.isContextProvider=function(S){return C(S)===a},et.isElement=function(S){return typeof S=="object"&&S!==null&&S.$$typeof===t},et.isForwardRef=function(S){return C(S)===c},et.isFragment=function(S){return C(S)===r},et.isLazy=function(S){return C(S)===g},et.isMemo=function(S){return C(S)===f},et.isPortal=function(S){return C(S)===n},et.isProfiler=function(S){return C(S)===o},et.isStrictMode=function(S){return C(S)===i},et.isSuspense=function(S){return C(S)===d},et.isValidElementType=function(S){return typeof S=="string"||typeof S=="function"||S===r||S===u||S===o||S===i||S===d||S===h||typeof S=="object"&&S!==null&&(S.$$typeof===g||S.$$typeof===f||S.$$typeof===a||S.$$typeof===s||S.$$typeof===c||S.$$typeof===x||S.$$typeof===_||S.$$typeof===y||S.$$typeof===m)},et.typeOf=C,et}var tt={};/** @license React v16.13.1
30
+ * react-is.development.js
31
+ *
32
+ * Copyright (c) Facebook, Inc. and its affiliates.
33
+ *
34
+ * This source code is licensed under the MIT license found in the
35
+ * LICENSE file in the root directory of this source tree.
36
+ */var $d;function L0(){return $d||($d=1,process.env.NODE_ENV!=="production"&&(function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,o=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,c=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,h=e?Symbol.for("react.suspense_list"):60120,f=e?Symbol.for("react.memo"):60115,g=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,x=e?Symbol.for("react.fundamental"):60117,_=e?Symbol.for("react.responder"):60118,y=e?Symbol.for("react.scope"):60119;function C(ee){return typeof ee=="string"||typeof ee=="function"||ee===r||ee===u||ee===o||ee===i||ee===d||ee===h||typeof ee=="object"&&ee!==null&&(ee.$$typeof===g||ee.$$typeof===f||ee.$$typeof===a||ee.$$typeof===s||ee.$$typeof===c||ee.$$typeof===x||ee.$$typeof===_||ee.$$typeof===y||ee.$$typeof===m)}function P(ee){if(typeof ee=="object"&&ee!==null){var Pe=ee.$$typeof;switch(Pe){case t:var Ge=ee.type;switch(Ge){case l:case u:case r:case o:case i:case d:return Ge;default:var Ze=Ge&&Ge.$$typeof;switch(Ze){case s:case c:case g:case f:case a:return Ze;default:return Pe}}case n:return Pe}}}var S=l,T=u,O=s,A=a,E=t,L=c,R=r,b=g,k=f,I=n,w=o,N=i,B=d,G=!1;function ce(ee){return G||(G=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),z(ee)||P(ee)===l}function z(ee){return P(ee)===u}function M(ee){return P(ee)===s}function $(ee){return P(ee)===a}function W(ee){return typeof ee=="object"&&ee!==null&&ee.$$typeof===t}function K(ee){return P(ee)===c}function J(ee){return P(ee)===r}function oe(ee){return P(ee)===g}function ne(ee){return P(ee)===f}function ie(ee){return P(ee)===n}function de(ee){return P(ee)===o}function me(ee){return P(ee)===i}function xe(ee){return P(ee)===d}tt.AsyncMode=S,tt.ConcurrentMode=T,tt.ContextConsumer=O,tt.ContextProvider=A,tt.Element=E,tt.ForwardRef=L,tt.Fragment=R,tt.Lazy=b,tt.Memo=k,tt.Portal=I,tt.Profiler=w,tt.StrictMode=N,tt.Suspense=B,tt.isAsyncMode=ce,tt.isConcurrentMode=z,tt.isContextConsumer=M,tt.isContextProvider=$,tt.isElement=W,tt.isForwardRef=K,tt.isFragment=J,tt.isLazy=oe,tt.isMemo=ne,tt.isPortal=ie,tt.isProfiler=de,tt.isStrictMode=me,tt.isSuspense=xe,tt.isValidElementType=C,tt.typeOf=P})()),tt}var Nd;function Xg(){return Nd||(Nd=1,process.env.NODE_ENV==="production"?go.exports=z0():go.exports=L0()),go.exports}/*
37
+ object-assign
38
+ (c) Sindre Sorhus
39
+ @license MIT
40
+ */var vs,Wd;function H0(){if(Wd)return vs;Wd=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(o){if(o==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(o)}function i(){try{if(!Object.assign)return!1;var o=new String("abc");if(o[5]="de",Object.getOwnPropertyNames(o)[0]==="5")return!1;for(var a={},s=0;s<10;s++)a["_"+String.fromCharCode(s)]=s;var l=Object.getOwnPropertyNames(a).map(function(c){return a[c]});if(l.join("")!=="0123456789")return!1;var u={};return"abcdefghijklmnopqrst".split("").forEach(function(c){u[c]=c}),Object.keys(Object.assign({},u)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return vs=i()?Object.assign:function(o,a){for(var s,l=r(o),u,c=1;c<arguments.length;c++){s=Object(arguments[c]);for(var d in s)t.call(s,d)&&(l[d]=s[d]);if(e){u=e(s);for(var h=0;h<u.length;h++)n.call(s,u[h])&&(l[u[h]]=s[u[h]])}}return l},vs}var ys,Bd;function Gu(){if(Bd)return ys;Bd=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return ys=e,ys}var ws,jd;function Kg(){return jd||(jd=1,ws=Function.call.bind(Object.prototype.hasOwnProperty)),ws}var bs,Ud;function q0(){if(Ud)return bs;Ud=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=Gu(),n={},r=Kg();e=function(o){var a="Warning: "+o;typeof console<"u"&&console.error(a);try{throw new Error(a)}catch{}}}function i(o,a,s,l,u){if(process.env.NODE_ENV!=="production"){for(var c in o)if(r(o,c)){var d;try{if(typeof o[c]!="function"){var h=Error((l||"React class")+": "+s+" type `"+c+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof o[c]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw h.name="Invariant Violation",h}d=o[c](a,c,l,s,null,t)}catch(g){d=g}if(d&&!(d instanceof Error)&&e((l||"React class")+": type specification of "+s+" `"+c+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof d+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),d instanceof Error&&!(d.message in n)){n[d.message]=!0;var f=u?u():"";e("Failed "+s+" type: "+d.message+(f??""))}}}}return i.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},bs=i,bs}var Ss,Yd;function $0(){if(Yd)return Ss;Yd=1;var e=Xg(),t=H0(),n=Gu(),r=Kg(),i=q0(),o=function(){};process.env.NODE_ENV!=="production"&&(o=function(s){var l="Warning: "+s;typeof console<"u"&&console.error(l);try{throw new Error(l)}catch{}});function a(){return null}return Ss=function(s,l){var u=typeof Symbol=="function"&&Symbol.iterator,c="@@iterator";function d(z){var M=z&&(u&&z[u]||z[c]);if(typeof M=="function")return M}var h="<<anonymous>>",f={array:_("array"),bigint:_("bigint"),bool:_("boolean"),func:_("function"),number:_("number"),object:_("object"),string:_("string"),symbol:_("symbol"),any:y(),arrayOf:C,element:P(),elementType:S(),instanceOf:T,node:L(),objectOf:A,oneOf:O,oneOfType:E,shape:b,exact:k};function g(z,M){return z===M?z!==0||1/z===1/M:z!==z&&M!==M}function m(z,M){this.message=z,this.data=M&&typeof M=="object"?M:{},this.stack=""}m.prototype=Error.prototype;function x(z){if(process.env.NODE_ENV!=="production")var M={},$=0;function W(J,oe,ne,ie,de,me,xe){if(ie=ie||h,me=me||ne,xe!==n){if(l){var ee=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw ee.name="Invariant Violation",ee}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var Pe=ie+":"+ne;!M[Pe]&&$<3&&(o("You are manually calling a React.PropTypes validation function for the `"+me+"` prop on `"+ie+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),M[Pe]=!0,$++)}}return oe[ne]==null?J?oe[ne]===null?new m("The "+de+" `"+me+"` is marked as required "+("in `"+ie+"`, but its value is `null`.")):new m("The "+de+" `"+me+"` is marked as required in "+("`"+ie+"`, but its value is `undefined`.")):null:z(oe,ne,ie,de,me)}var K=W.bind(null,!1);return K.isRequired=W.bind(null,!0),K}function _(z){function M($,W,K,J,oe,ne){var ie=$[W],de=N(ie);if(de!==z){var me=B(ie);return new m("Invalid "+J+" `"+oe+"` of type "+("`"+me+"` supplied to `"+K+"`, expected ")+("`"+z+"`."),{expectedType:z})}return null}return x(M)}function y(){return x(a)}function C(z){function M($,W,K,J,oe){if(typeof z!="function")return new m("Property `"+oe+"` of component `"+K+"` has invalid PropType notation inside arrayOf.");var ne=$[W];if(!Array.isArray(ne)){var ie=N(ne);return new m("Invalid "+J+" `"+oe+"` of type "+("`"+ie+"` supplied to `"+K+"`, expected an array."))}for(var de=0;de<ne.length;de++){var me=z(ne,de,K,J,oe+"["+de+"]",n);if(me instanceof Error)return me}return null}return x(M)}function P(){function z(M,$,W,K,J){var oe=M[$];if(!s(oe)){var ne=N(oe);return new m("Invalid "+K+" `"+J+"` of type "+("`"+ne+"` supplied to `"+W+"`, expected a single ReactElement."))}return null}return x(z)}function S(){function z(M,$,W,K,J){var oe=M[$];if(!e.isValidElementType(oe)){var ne=N(oe);return new m("Invalid "+K+" `"+J+"` of type "+("`"+ne+"` supplied to `"+W+"`, expected a single ReactElement type."))}return null}return x(z)}function T(z){function M($,W,K,J,oe){if(!($[W]instanceof z)){var ne=z.name||h,ie=ce($[W]);return new m("Invalid "+J+" `"+oe+"` of type "+("`"+ie+"` supplied to `"+K+"`, expected ")+("instance of `"+ne+"`."))}return null}return x(M)}function O(z){if(!Array.isArray(z))return process.env.NODE_ENV!=="production"&&(arguments.length>1?o("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):o("Invalid argument supplied to oneOf, expected an array.")),a;function M($,W,K,J,oe){for(var ne=$[W],ie=0;ie<z.length;ie++)if(g(ne,z[ie]))return null;var de=JSON.stringify(z,function(xe,ee){var Pe=B(ee);return Pe==="symbol"?String(ee):ee});return new m("Invalid "+J+" `"+oe+"` of value `"+String(ne)+"` "+("supplied to `"+K+"`, expected one of "+de+"."))}return x(M)}function A(z){function M($,W,K,J,oe){if(typeof z!="function")return new m("Property `"+oe+"` of component `"+K+"` has invalid PropType notation inside objectOf.");var ne=$[W],ie=N(ne);if(ie!=="object")return new m("Invalid "+J+" `"+oe+"` of type "+("`"+ie+"` supplied to `"+K+"`, expected an object."));for(var de in ne)if(r(ne,de)){var me=z(ne,de,K,J,oe+"."+de,n);if(me instanceof Error)return me}return null}return x(M)}function E(z){if(!Array.isArray(z))return process.env.NODE_ENV!=="production"&&o("Invalid argument supplied to oneOfType, expected an instance of array."),a;for(var M=0;M<z.length;M++){var $=z[M];if(typeof $!="function")return o("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+G($)+" at index "+M+"."),a}function W(K,J,oe,ne,ie){for(var de=[],me=0;me<z.length;me++){var xe=z[me],ee=xe(K,J,oe,ne,ie,n);if(ee==null)return null;ee.data&&r(ee.data,"expectedType")&&de.push(ee.data.expectedType)}var Pe=de.length>0?", expected one of type ["+de.join(", ")+"]":"";return new m("Invalid "+ne+" `"+ie+"` supplied to "+("`"+oe+"`"+Pe+"."))}return x(W)}function L(){function z(M,$,W,K,J){return I(M[$])?null:new m("Invalid "+K+" `"+J+"` supplied to "+("`"+W+"`, expected a ReactNode."))}return x(z)}function R(z,M,$,W,K){return new m((z||"React class")+": "+M+" type `"+$+"."+W+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+K+"`.")}function b(z){function M($,W,K,J,oe){var ne=$[W],ie=N(ne);if(ie!=="object")return new m("Invalid "+J+" `"+oe+"` of type `"+ie+"` "+("supplied to `"+K+"`, expected `object`."));for(var de in z){var me=z[de];if(typeof me!="function")return R(K,J,oe,de,B(me));var xe=me(ne,de,K,J,oe+"."+de,n);if(xe)return xe}return null}return x(M)}function k(z){function M($,W,K,J,oe){var ne=$[W],ie=N(ne);if(ie!=="object")return new m("Invalid "+J+" `"+oe+"` of type `"+ie+"` "+("supplied to `"+K+"`, expected `object`."));var de=t({},$[W],z);for(var me in de){var xe=z[me];if(r(z,me)&&typeof xe!="function")return R(K,J,oe,me,B(xe));if(!xe)return new m("Invalid "+J+" `"+oe+"` key `"+me+"` supplied to `"+K+"`.\nBad object: "+JSON.stringify($[W],null," ")+`
41
+ Valid keys: `+JSON.stringify(Object.keys(z),null," "));var ee=xe(ne,me,K,J,oe+"."+me,n);if(ee)return ee}return null}return x(M)}function I(z){switch(typeof z){case"number":case"string":case"undefined":return!0;case"boolean":return!z;case"object":if(Array.isArray(z))return z.every(I);if(z===null||s(z))return!0;var M=d(z);if(M){var $=M.call(z),W;if(M!==z.entries){for(;!(W=$.next()).done;)if(!I(W.value))return!1}else for(;!(W=$.next()).done;){var K=W.value;if(K&&!I(K[1]))return!1}}else return!1;return!0;default:return!1}}function w(z,M){return z==="symbol"?!0:M?M["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&M instanceof Symbol:!1}function N(z){var M=typeof z;return Array.isArray(z)?"array":z instanceof RegExp?"object":w(M,z)?"symbol":M}function B(z){if(typeof z>"u"||z===null)return""+z;var M=N(z);if(M==="object"){if(z instanceof Date)return"date";if(z instanceof RegExp)return"regexp"}return M}function G(z){var M=B(z);switch(M){case"array":case"object":return"an "+M;case"boolean":case"date":case"regexp":return"a "+M;default:return M}}function ce(z){return!z.constructor||!z.constructor.name?h:z.constructor.name}return f.checkPropTypes=i,f.resetWarningCache=i.resetWarningCache,f.PropTypes=f,f},Ss}var Cs,Gd;function N0(){if(Gd)return Cs;Gd=1;var e=Gu();function t(){}function n(){}return n.resetWarningCache=t,Cs=function(){function r(a,s,l,u,c,d){if(d!==e){var h=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw h.name="Invariant Violation",h}}r.isRequired=r;function i(){return r}var o={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:i,element:r,elementType:r,instanceOf:i,node:r,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:n,resetWarningCache:t};return o.PropTypes=o,o},Cs}var Xd;function W0(){if(Xd)return ho.exports;if(Xd=1,process.env.NODE_ENV!=="production"){var e=Xg(),t=!0;ho.exports=$0()(e.isElement,t)}else ho.exports=N0()();return ho.exports}var Kd;function B0(){return Kd||(Kd=1,(function(e){(function(t,n){n(e,se,W0())})(fo,function(t,n,r){Object.defineProperty(t,"__esModule",{value:!0}),t.setHasSupportToCaptureOption=g;var i=a(n),o=a(r);function a(y){return y&&y.__esModule?y:{default:y}}var s=Object.assign||function(y){for(var C=1;C<arguments.length;C++){var P=arguments[C];for(var S in P)Object.prototype.hasOwnProperty.call(P,S)&&(y[S]=P[S])}return y};function l(y,C){var P={};for(var S in y)C.indexOf(S)>=0||Object.prototype.hasOwnProperty.call(y,S)&&(P[S]=y[S]);return P}function u(y,C){if(!(y instanceof C))throw new TypeError("Cannot call a class as a function")}var c=(function(){function y(C,P){for(var S=0;S<P.length;S++){var T=P[S];T.enumerable=T.enumerable||!1,T.configurable=!0,"value"in T&&(T.writable=!0),Object.defineProperty(C,T.key,T)}}return function(C,P,S){return P&&y(C.prototype,P),S&&y(C,S),C}})();function d(y,C){if(!y)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return C&&(typeof C=="object"||typeof C=="function")?C:y}function h(y,C){if(typeof C!="function"&&C!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof C);y.prototype=Object.create(C&&C.prototype,{constructor:{value:y,enumerable:!1,writable:!0,configurable:!0}}),C&&(Object.setPrototypeOf?Object.setPrototypeOf(y,C):y.__proto__=C)}var f=!1;function g(y){f=y}try{addEventListener("test",null,Object.defineProperty({},"capture",{get:function(){g(!0)}}))}catch{}function m(){var y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{capture:!0};return f?y:y.capture}function x(y){if("touches"in y){var C=y.touches[0],P=C.pageX,S=C.pageY;return{x:P,y:S}}var T=y.screenX,O=y.screenY;return{x:T,y:O}}var _=(function(y){h(C,y);function C(){var P;u(this,C);for(var S=arguments.length,T=Array(S),O=0;O<S;O++)T[O]=arguments[O];var A=d(this,(P=C.__proto__||Object.getPrototypeOf(C)).call.apply(P,[this].concat(T)));return A._handleSwipeStart=A._handleSwipeStart.bind(A),A._handleSwipeMove=A._handleSwipeMove.bind(A),A._handleSwipeEnd=A._handleSwipeEnd.bind(A),A._onMouseDown=A._onMouseDown.bind(A),A._onMouseMove=A._onMouseMove.bind(A),A._onMouseUp=A._onMouseUp.bind(A),A._setSwiperRef=A._setSwiperRef.bind(A),A}return c(C,[{key:"componentDidMount",value:function(){this.swiper&&this.swiper.addEventListener("touchmove",this._handleSwipeMove,m({capture:!0,passive:!1}))}},{key:"componentWillUnmount",value:function(){this.swiper&&this.swiper.removeEventListener("touchmove",this._handleSwipeMove,m({capture:!0,passive:!1}))}},{key:"_onMouseDown",value:function(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 T=x(S),O=T.x,A=T.y;this.moveStart={x:O,y:A},this.props.onSwipeStart(S)}},{key:"_handleSwipeMove",value:function(S){if(this.moveStart){var T=x(S),O=T.x,A=T.y,E=O-this.moveStart.x,L=A-this.moveStart.y;this.moving=!0;var R=this.props.onSwipeMove({x:E,y:L},S);R&&S.cancelable&&S.preventDefault(),this.movePosition={deltaX:E,deltaY:L}}}},{key:"_handleSwipeEnd",value:function(S){this.props.onSwipeEnd(S);var T=this.props.tolerance;this.moving&&this.movePosition&&(this.movePosition.deltaX<-T?this.props.onSwipeLeft(1,S):this.movePosition.deltaX>T&&this.props.onSwipeRight(1,S),this.movePosition.deltaY<-T?this.props.onSwipeUp(1,S):this.movePosition.deltaY>T&&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 T=S.className,O=S.style,A=S.children;S.allowMouseEvents,S.onSwipeUp,S.onSwipeDown,S.onSwipeLeft,S.onSwipeRight,S.onSwipeStart,S.onSwipeMove,S.onSwipeEnd,S.innerRef,S.tolerance;var E=l(S,["tagName","className","style","children","allowMouseEvents","onSwipeUp","onSwipeDown","onSwipeLeft","onSwipeRight","onSwipeStart","onSwipeMove","onSwipeEnd","innerRef","tolerance"]);return i.default.createElement(this.props.tagName,s({ref:this._setSwiperRef,onMouseDown:this._onMouseDown,onTouchStart:this._handleSwipeStart,onTouchEnd:this._handleSwipeEnd,className:T,style:O},E),A)}}]),C})(n.Component);_.displayName="ReactSwipe",_.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},_.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=_})})(fo)),fo}var Vd;function Vg(){return Vd||(Vd=1,(function(e){(function(t,n){n(e,B0())})(co,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})})(co)),co}var hi={},xs={exports:{}};/*!
42
+ Copyright (c) 2018 Jed Watson.
43
+ Licensed under the MIT License (MIT), see
44
+ http://jedwatson.github.io/classnames
45
+ */var Zd;function j0(){return Zd||(Zd=1,(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var o="",a=0;a<arguments.length;a++){var s=arguments[a];s&&(o=i(o,r(s)))}return o}function r(o){if(typeof o=="string"||typeof o=="number")return o;if(typeof o!="object")return"";if(Array.isArray(o))return n.apply(null,o);if(o.toString!==Object.prototype.toString&&!o.toString.toString().includes("[native code]"))return o.toString();var a="";for(var s in o)t.call(o,s)&&o[s]&&(a=i(a,s));return a}function i(o,a){return a?o?o+" "+a:o+a:o}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(xs)),xs.exports}var Jd;function Zg(){if(Jd)return hi;Jd=1,Object.defineProperty(hi,"__esModule",{value:!0}),hi.default=void 0;var e=t(j0());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,s){return(0,e.default)({thumb:!o,slide:o,selected:a,previous:s})},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 hi.default=r,hi}var gi={},pi={},Qd;function U0(){if(Qd)return pi;Qd=1,Object.defineProperty(pi,"__esModule",{value:!0}),pi.outerWidth=void 0;var e=function(n){var r=n.offsetWidth,i=getComputedStyle(n);return r+=parseInt(i.marginLeft)+parseInt(i.marginRight),r};return pi.outerWidth=e,pi}var mi={},ef;function Xu(){if(ef)return mi;ef=1,Object.defineProperty(mi,"__esModule",{value:!0}),mi.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],s="translate3d",l="("+a.join(",")+")";return s+l};return mi.default=e,mi}var vi={},tf;function Jg(){if(tf)return vi;tf=1,Object.defineProperty(vi,"__esModule",{value:!0}),vi.default=void 0;var e=function(){return window};return vi.default=e,vi}var nf;function Qg(){if(nf)return gi;nf=1,Object.defineProperty(gi,"__esModule",{value:!0}),gi.default=void 0;var e=l(se),t=a(Zg()),n=U0(),r=a(Xu()),i=a(Vg()),o=a(Jg());function a(A){return A&&A.__esModule?A:{default:A}}function s(){if(typeof WeakMap!="function")return null;var A=new WeakMap;return s=function(){return A},A}function l(A){if(A&&A.__esModule)return A;if(A===null||u(A)!=="object"&&typeof A!="function")return{default:A};var E=s();if(E&&E.has(A))return E.get(A);var L={},R=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var b in A)if(Object.prototype.hasOwnProperty.call(A,b)){var k=R?Object.getOwnPropertyDescriptor(A,b):null;k&&(k.get||k.set)?Object.defineProperty(L,b,k):L[b]=A[b]}return L.default=A,E&&E.set(A,L),L}function u(A){"@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(A)}function c(){return c=Object.assign||function(A){for(var E=1;E<arguments.length;E++){var L=arguments[E];for(var R in L)Object.prototype.hasOwnProperty.call(L,R)&&(A[R]=L[R])}return A},c.apply(this,arguments)}function d(A,E){if(!(A instanceof E))throw new TypeError("Cannot call a class as a function")}function h(A,E){for(var L=0;L<E.length;L++){var R=E[L];R.enumerable=R.enumerable||!1,R.configurable=!0,"value"in R&&(R.writable=!0),Object.defineProperty(A,R.key,R)}}function f(A,E,L){return E&&h(A.prototype,E),A}function g(A,E){if(typeof E!="function"&&E!==null)throw new TypeError("Super expression must either be null or a function");A.prototype=Object.create(E&&E.prototype,{constructor:{value:A,writable:!0,configurable:!0}}),E&&m(A,E)}function m(A,E){return m=Object.setPrototypeOf||function(R,b){return R.__proto__=b,R},m(A,E)}function x(A){var E=C();return function(){var R=P(A),b;if(E){var k=P(this).constructor;b=Reflect.construct(R,arguments,k)}else b=R.apply(this,arguments);return _(this,b)}}function _(A,E){return E&&(u(E)==="object"||typeof E=="function")?E:y(A)}function y(A){if(A===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return A}function C(){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 P(A){return P=Object.setPrototypeOf?Object.getPrototypeOf:function(L){return L.__proto__||Object.getPrototypeOf(L)},P(A)}function S(A,E,L){return E in A?Object.defineProperty(A,E,{value:L,enumerable:!0,configurable:!0,writable:!0}):A[E]=L,A}var T=function(E){return E.hasOwnProperty("key")},O=(function(A){g(L,A);var E=x(L);function L(R){var b;return d(this,L),b=E.call(this,R),S(y(b),"itemsWrapperRef",void 0),S(y(b),"itemsListRef",void 0),S(y(b),"thumbsRef",void 0),S(y(b),"setItemsWrapperRef",function(k){b.itemsWrapperRef=k}),S(y(b),"setItemsListRef",function(k){b.itemsListRef=k}),S(y(b),"setThumbsRef",function(k,I){b.thumbsRef||(b.thumbsRef=[]),b.thumbsRef[I]=k}),S(y(b),"updateSizes",function(){if(!(!b.props.children||!b.itemsWrapperRef||!b.thumbsRef)){var k=e.Children.count(b.props.children),I=b.itemsWrapperRef.clientWidth,w=b.props.thumbWidth?b.props.thumbWidth:(0,n.outerWidth)(b.thumbsRef[0]),N=Math.floor(I/w),B=N<k,G=B?k-N:0;b.setState(function(ce,z){return{itemSize:w,visibleItems:N,firstItem:B?b.getFirstItem(z.selectedItem):0,lastPosition:G,showArrows:B}})}}),S(y(b),"handleClickItem",function(k,I,w){if(!T(w)||w.key==="Enter"){var N=b.props.onSelectItem;typeof N=="function"&&N(k,I)}}),S(y(b),"onSwipeStart",function(){b.setState({swiping:!0})}),S(y(b),"onSwipeEnd",function(){b.setState({swiping:!1})}),S(y(b),"onSwipeMove",function(k){var I=k.x;if(!b.state.itemSize||!b.itemsWrapperRef||!b.state.visibleItems)return!1;var w=0,N=e.Children.count(b.props.children),B=-(b.state.firstItem*100)/b.state.visibleItems,G=Math.max(N-b.state.visibleItems,0),ce=-G*100/b.state.visibleItems;B===w&&I>0&&(I=0),B===ce&&I<0&&(I=0);var z=b.itemsWrapperRef.clientWidth,M=B+100/(z/I);return b.itemsListRef&&["WebkitTransform","MozTransform","MsTransform","OTransform","transform","msTransform"].forEach(function($){b.itemsListRef.style[$]=(0,r.default)(M,"%",b.props.axis)}),!0}),S(y(b),"slideRight",function(k){b.moveTo(b.state.firstItem-(typeof k=="number"?k:1))}),S(y(b),"slideLeft",function(k){b.moveTo(b.state.firstItem+(typeof k=="number"?k:1))}),S(y(b),"moveTo",function(k){k=k<0?0:k,k=k>=b.state.lastPosition?b.state.lastPosition:k,b.setState({firstItem:k})}),b.state={selectedItem:R.selectedItem,swiping:!1,showArrows:!1,firstItem:0,visibleItems:0,lastPosition:0},b}return f(L,[{key:"componentDidMount",value:function(){this.setupThumbs()}},{key:"componentDidUpdate",value:function(b){this.props.selectedItem!==this.state.selectedItem&&this.setState({selectedItem:this.props.selectedItem,firstItem:this.getFirstItem(this.props.selectedItem)}),this.props.children!==b.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(b){var k=b;return b>=this.state.lastPosition&&(k=this.state.lastPosition),b<this.state.firstItem+this.state.visibleItems&&(k=this.state.firstItem),b<this.state.firstItem&&(k=b),k}},{key:"renderItems",value:function(){var b=this;return this.props.children.map(function(k,I){var w=t.default.ITEM(!1,I===b.state.selectedItem),N={key:I,ref:function(G){return b.setThumbsRef(G,I)},className:w,onClick:b.handleClickItem.bind(b,I,b.props.children[I]),onKeyDown:b.handleClickItem.bind(b,I,b.props.children[I]),"aria-label":"".concat(b.props.labels.item," ").concat(I+1),style:{width:b.props.thumbWidth}};return e.default.createElement("li",c({},N,{role:"button",tabIndex:0}),k)})}},{key:"render",value:function(){var b=this;if(!this.props.children)return null;var k=e.Children.count(this.props.children)>1,I=this.state.showArrows&&this.state.firstItem>0,w=this.state.showArrows&&this.state.firstItem<this.state.lastPosition,N={},B=-this.state.firstItem*(this.state.itemSize||0),G=(0,r.default)(B,"px",this.props.axis),ce=this.props.transitionTime+"ms";return N={WebkitTransform:G,MozTransform:G,MsTransform:G,OTransform:G,transform:G,msTransform:G,WebkitTransitionDuration:ce,MozTransitionDuration:ce,MsTransitionDuration:ce,OTransitionDuration:ce,transitionDuration:ce,msTransitionDuration:ce},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(!I),onClick:function(){return b.slideRight()},"aria-label":this.props.labels.leftArrow}),k?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:N,innerRef:this.setItemsListRef,allowMouseEvents:this.props.emulateTouch},this.renderItems()):e.default.createElement("ul",{className:t.default.SLIDER(!1,this.state.swiping),ref:function(M){return b.setItemsListRef(M)},style:N},this.renderItems()),e.default.createElement("button",{type:"button",className:t.default.ARROW_NEXT(!w),onClick:function(){return b.slideLeft()},"aria-label":this.props.labels.rightArrow})))}}]),L})(e.Component);return gi.default=O,S(O,"displayName","Thumbs"),S(O,"defaultProps",{axis:"horizontal",labels:{leftArrow:"previous slide / item",rightArrow:"next slide / item",item:"slide item"},selectedItem:0,thumbWidth:80,transitionTime:350}),gi}var yi={},rf;function Y0(){if(rf)return yi;rf=1,Object.defineProperty(yi,"__esModule",{value:!0}),yi.default=void 0;var e=function(){return document};return yi.default=e,yi}var Jt={},of;function ep(){if(of)return Jt;of=1,Object.defineProperty(Jt,"__esModule",{value:!0}),Jt.setPosition=Jt.getPosition=Jt.isKeyboardEvent=Jt.defaultStatusFormatter=Jt.noop=void 0;var e=se,t=n(Xu());function n(l){return l&&l.__esModule?l:{default:l}}var r=function(){};Jt.noop=r;var i=function(u,c){return"".concat(u," of ").concat(c)};Jt.defaultStatusFormatter=i;var o=function(u){return u?u.hasOwnProperty("key"):!1};Jt.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 h=-u*c.centerSlidePercentage,f=d-1;return u&&(u!==f||c.infiniteLoop)?h+=(100-c.centerSlidePercentage)/2:u===f&&(h+=100-c.centerSlidePercentage),h}return-u*100};Jt.getPosition=a;var s=function(u,c){var d={};return["WebkitTransform","MozTransform","MsTransform","OTransform","transform","msTransform"].forEach(function(h){d[h]=(0,t.default)(u,"%",c)}),d};return Jt.setPosition=s,Jt}var gn={},af;function G0(){if(af)return gn;af=1,Object.defineProperty(gn,"__esModule",{value:!0}),gn.fadeAnimationHandler=gn.slideStopSwipingHandler=gn.slideSwipeAnimationHandler=gn.slideAnimationHandler=void 0;var e=se,t=r(Xu()),n=ep();function r(d){return d&&d.__esModule?d:{default:d}}function i(d,h){var f=Object.keys(d);if(Object.getOwnPropertySymbols){var g=Object.getOwnPropertySymbols(d);h&&(g=g.filter(function(m){return Object.getOwnPropertyDescriptor(d,m).enumerable})),f.push.apply(f,g)}return f}function o(d){for(var h=1;h<arguments.length;h++){var f=arguments[h]!=null?arguments[h]:{};h%2?i(Object(f),!0).forEach(function(g){a(d,g,f[g])}):Object.getOwnPropertyDescriptors?Object.defineProperties(d,Object.getOwnPropertyDescriptors(f)):i(Object(f)).forEach(function(g){Object.defineProperty(d,g,Object.getOwnPropertyDescriptor(f,g))})}return d}function a(d,h,f){return h in d?Object.defineProperty(d,h,{value:f,enumerable:!0,configurable:!0,writable:!0}):d[h]=f,d}var s=function(h,f){var g={},m=f.selectedItem,x=m,_=e.Children.count(h.children)-1,y=h.infiniteLoop&&(m<0||m>_);if(y)return x<0?h.centerMode&&h.centerSlidePercentage&&h.axis==="horizontal"?g.itemListStyle=(0,n.setPosition)(-(_+2)*h.centerSlidePercentage-(100-h.centerSlidePercentage)/2,h.axis):g.itemListStyle=(0,n.setPosition)(-(_+2)*100,h.axis):x>_&&(g.itemListStyle=(0,n.setPosition)(0,h.axis)),g;var C=(0,n.getPosition)(m,h),P=(0,t.default)(C,"%",h.axis),S=h.transitionTime+"ms";return g.itemListStyle={WebkitTransform:P,msTransform:P,OTransform:P,transform:P},f.swiping||(g.itemListStyle=o(o({},g.itemListStyle),{},{WebkitTransitionDuration:S,MozTransitionDuration:S,OTransitionDuration:S,transitionDuration:S,msTransitionDuration:S})),g};gn.slideAnimationHandler=s;var l=function(h,f,g,m){var x={},_=f.axis==="horizontal",y=e.Children.count(f.children),C=0,P=(0,n.getPosition)(g.selectedItem,f),S=f.infiniteLoop?(0,n.getPosition)(y-1,f)-100:(0,n.getPosition)(y-1,f),T=_?h.x:h.y,O=T;P===C&&T>0&&(O=0),P===S&&T<0&&(O=0);var A=P+100/(g.itemSize/O),E=Math.abs(T)>f.swipeScrollTolerance;return f.infiniteLoop&&E&&(g.selectedItem===0&&A>-100?A-=y*100:g.selectedItem===y-1&&A<-y*100&&(A+=y*100)),(!f.preventMovementUntilSwipeScrollTolerance||E||g.swipeMovementStarted)&&(g.swipeMovementStarted||m({swipeMovementStarted:!0}),x.itemListStyle=(0,n.setPosition)(A,f.axis)),E&&!g.cancelClick&&m({cancelClick:!0}),x};gn.slideSwipeAnimationHandler=l;var u=function(h,f){var g=(0,n.getPosition)(f.selectedItem,h),m=(0,n.setPosition)(g,h.axis);return{itemListStyle:m}};gn.slideStopSwipingHandler=u;var c=function(h,f){var g=h.transitionTime+"ms",m="ease-in-out",x={position:"absolute",display:"block",zIndex:-2,minHeight:"100%",opacity:0,top:0,right:0,left:0,bottom:0,transitionTimingFunction:m,msTransitionTimingFunction:m,MozTransitionTimingFunction:m,WebkitTransitionTimingFunction:m,OTransitionTimingFunction:m};return f.swiping||(x=o(o({},x),{},{WebkitTransitionDuration:g,MozTransitionDuration:g,OTransitionDuration:g,transitionDuration:g,msTransitionDuration:g})),{slideStyle:x,selectedStyle:o(o({},x),{},{opacity:1,position:"relative"}),prevStyle:o({},x)}};return gn.fadeAnimationHandler=c,gn}var sf;function X0(){if(sf)return fi;sf=1,Object.defineProperty(fi,"__esModule",{value:!0}),fi.default=void 0;var e=c(se),t=l(Vg()),n=l(Zg()),r=l(Qg()),i=l(Y0()),o=l(Jg()),a=ep(),s=G0();function l(R){return R&&R.__esModule?R:{default:R}}function u(){if(typeof WeakMap!="function")return null;var R=new WeakMap;return u=function(){return R},R}function c(R){if(R&&R.__esModule)return R;if(R===null||d(R)!=="object"&&typeof R!="function")return{default:R};var b=u();if(b&&b.has(R))return b.get(R);var k={},I=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var w in R)if(Object.prototype.hasOwnProperty.call(R,w)){var N=I?Object.getOwnPropertyDescriptor(R,w):null;N&&(N.get||N.set)?Object.defineProperty(k,w,N):k[w]=R[w]}return k.default=R,b&&b.set(R,k),k}function d(R){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?d=function(k){return typeof k}:d=function(k){return k&&typeof Symbol=="function"&&k.constructor===Symbol&&k!==Symbol.prototype?"symbol":typeof k},d(R)}function h(){return h=Object.assign||function(R){for(var b=1;b<arguments.length;b++){var k=arguments[b];for(var I in k)Object.prototype.hasOwnProperty.call(k,I)&&(R[I]=k[I])}return R},h.apply(this,arguments)}function f(R,b){var k=Object.keys(R);if(Object.getOwnPropertySymbols){var I=Object.getOwnPropertySymbols(R);b&&(I=I.filter(function(w){return Object.getOwnPropertyDescriptor(R,w).enumerable})),k.push.apply(k,I)}return k}function g(R){for(var b=1;b<arguments.length;b++){var k=arguments[b]!=null?arguments[b]:{};b%2?f(Object(k),!0).forEach(function(I){E(R,I,k[I])}):Object.getOwnPropertyDescriptors?Object.defineProperties(R,Object.getOwnPropertyDescriptors(k)):f(Object(k)).forEach(function(I){Object.defineProperty(R,I,Object.getOwnPropertyDescriptor(k,I))})}return R}function m(R,b){if(!(R instanceof b))throw new TypeError("Cannot call a class as a function")}function x(R,b){for(var k=0;k<b.length;k++){var I=b[k];I.enumerable=I.enumerable||!1,I.configurable=!0,"value"in I&&(I.writable=!0),Object.defineProperty(R,I.key,I)}}function _(R,b,k){return b&&x(R.prototype,b),R}function y(R,b){if(typeof b!="function"&&b!==null)throw new TypeError("Super expression must either be null or a function");R.prototype=Object.create(b&&b.prototype,{constructor:{value:R,writable:!0,configurable:!0}}),b&&C(R,b)}function C(R,b){return C=Object.setPrototypeOf||function(I,w){return I.__proto__=w,I},C(R,b)}function P(R){var b=O();return function(){var I=A(R),w;if(b){var N=A(this).constructor;w=Reflect.construct(I,arguments,N)}else w=I.apply(this,arguments);return S(this,w)}}function S(R,b){return b&&(d(b)==="object"||typeof b=="function")?b:T(R)}function T(R){if(R===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return R}function O(){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 A(R){return A=Object.setPrototypeOf?Object.getPrototypeOf:function(k){return k.__proto__||Object.getPrototypeOf(k)},A(R)}function E(R,b,k){return b in R?Object.defineProperty(R,b,{value:k,enumerable:!0,configurable:!0,writable:!0}):R[b]=k,R}var L=(function(R){y(k,R);var b=P(k);function k(I){var w;m(this,k),w=b.call(this,I),E(T(w),"thumbsRef",void 0),E(T(w),"carouselWrapperRef",void 0),E(T(w),"listRef",void 0),E(T(w),"itemsRef",void 0),E(T(w),"timer",void 0),E(T(w),"animationHandler",void 0),E(T(w),"setThumbsRef",function(B){w.thumbsRef=B}),E(T(w),"setCarouselWrapperRef",function(B){w.carouselWrapperRef=B}),E(T(w),"setListRef",function(B){w.listRef=B}),E(T(w),"setItemsRef",function(B,G){w.itemsRef||(w.itemsRef=[]),w.itemsRef[G]=B}),E(T(w),"autoPlay",function(){e.Children.count(w.props.children)<=1||(w.clearAutoPlay(),w.props.autoPlay&&(w.timer=setTimeout(function(){w.increment()},w.props.interval)))}),E(T(w),"clearAutoPlay",function(){w.timer&&clearTimeout(w.timer)}),E(T(w),"resetAutoPlay",function(){w.clearAutoPlay(),w.autoPlay()}),E(T(w),"stopOnHover",function(){w.setState({isMouseEntered:!0},w.clearAutoPlay)}),E(T(w),"startOnLeave",function(){w.setState({isMouseEntered:!1},w.autoPlay)}),E(T(w),"isFocusWithinTheCarousel",function(){return w.carouselWrapperRef?!!((0,i.default)().activeElement===w.carouselWrapperRef||w.carouselWrapperRef.contains((0,i.default)().activeElement)):!1}),E(T(w),"navigateWithKeyboard",function(B){if(w.isFocusWithinTheCarousel()){var G=w.props.axis,ce=G==="horizontal",z={ArrowUp:38,ArrowRight:39,ArrowDown:40,ArrowLeft:37},M=ce?z.ArrowRight:z.ArrowDown,$=ce?z.ArrowLeft:z.ArrowUp;M===B.keyCode?w.increment():$===B.keyCode&&w.decrement()}}),E(T(w),"updateSizes",function(){if(!(!w.state.initialized||!w.itemsRef||w.itemsRef.length===0)){var B=w.props.axis==="horizontal",G=w.itemsRef[0];if(G){var ce=B?G.clientWidth:G.clientHeight;w.setState({itemSize:ce}),w.thumbsRef&&w.thumbsRef.updateSizes()}}}),E(T(w),"setMountState",function(){w.setState({hasMount:!0}),w.updateSizes()}),E(T(w),"handleClickItem",function(B,G){if(e.Children.count(w.props.children)!==0){if(w.state.cancelClick){w.setState({cancelClick:!1});return}w.props.onClickItem(B,G),B!==w.state.selectedItem&&w.setState({selectedItem:B})}}),E(T(w),"handleOnChange",function(B,G){e.Children.count(w.props.children)<=1||w.props.onChange(B,G)}),E(T(w),"handleClickThumb",function(B,G){w.props.onClickThumb(B,G),w.moveTo(B)}),E(T(w),"onSwipeStart",function(B){w.setState({swiping:!0}),w.props.onSwipeStart(B)}),E(T(w),"onSwipeEnd",function(B){w.setState({swiping:!1,cancelClick:!1,swipeMovementStarted:!1}),w.props.onSwipeEnd(B),w.clearAutoPlay(),w.state.autoPlay&&w.autoPlay()}),E(T(w),"onSwipeMove",function(B,G){w.props.onSwipeMove(G);var ce=w.props.swipeAnimationHandler(B,w.props,w.state,w.setState.bind(T(w)));return w.setState(g({},ce)),!!Object.keys(ce).length}),E(T(w),"decrement",function(){var B=arguments.length>0&&arguments[0]!==void 0?arguments[0]:1;w.moveTo(w.state.selectedItem-(typeof B=="number"?B:1))}),E(T(w),"increment",function(){var B=arguments.length>0&&arguments[0]!==void 0?arguments[0]:1;w.moveTo(w.state.selectedItem+(typeof B=="number"?B:1))}),E(T(w),"moveTo",function(B){if(typeof B=="number"){var G=e.Children.count(w.props.children)-1;B<0&&(B=w.props.infiniteLoop?G:0),B>G&&(B=w.props.infiniteLoop?0:G),w.selectItem({selectedItem:B}),w.state.autoPlay&&w.state.isMouseEntered===!1&&w.resetAutoPlay()}}),E(T(w),"onClickNext",function(){w.increment(1)}),E(T(w),"onClickPrev",function(){w.decrement(1)}),E(T(w),"onSwipeForward",function(){w.increment(1),w.props.emulateTouch&&w.setState({cancelClick:!0})}),E(T(w),"onSwipeBackwards",function(){w.decrement(1),w.props.emulateTouch&&w.setState({cancelClick:!0})}),E(T(w),"changeItem",function(B){return function(G){(!(0,a.isKeyboardEvent)(G)||G.key==="Enter")&&w.moveTo(B)}}),E(T(w),"selectItem",function(B){w.setState(g({previousItem:w.state.selectedItem},B),function(){w.setState(w.animationHandler(w.props,w.state))}),w.handleOnChange(B.selectedItem,e.Children.toArray(w.props.children)[B.selectedItem])}),E(T(w),"getInitialImage",function(){var B=w.props.selectedItem,G=w.itemsRef&&w.itemsRef[B],ce=G&&G.getElementsByTagName("img")||[];return ce[0]}),E(T(w),"getVariableItemHeight",function(B){var G=w.itemsRef&&w.itemsRef[B];if(w.state.hasMount&&G&&G.children.length){var ce=G.children[0].getElementsByTagName("img")||[];if(ce.length>0){var z=ce[0];if(!z.complete){var M=function K(){w.forceUpdate(),z.removeEventListener("load",K)};z.addEventListener("load",M)}}var $=ce[0]||G.children[0],W=$.clientHeight;return W>0?W:null}return null});var N={initialized:!1,previousItem:I.selectedItem,selectedItem:I.selectedItem,hasMount:!1,isMouseEntered:!1,autoPlay:I.autoPlay,swiping:!1,swipeMovementStarted:!1,cancelClick:!1,itemSize:1,itemListStyle:{},slideStyle:{},selectedStyle:{},prevStyle:{}};return w.animationHandler=typeof I.animationHandler=="function"&&I.animationHandler||I.animationHandler==="fade"&&s.fadeAnimationHandler||s.slideAnimationHandler,w.state=g(g({},N),w.animationHandler(I,N)),w}return _(k,[{key:"componentDidMount",value:function(){this.props.children&&this.setupCarousel()}},{key:"componentDidUpdate",value:function(w,N){!w.children&&this.props.children&&!this.state.initialized&&this.setupCarousel(),!w.autoFocus&&this.props.autoFocus&&this.forceFocus(),N.swiping&&!this.state.swiping&&this.setState(g({},this.props.stopSwipingHandler(this.props,this.state))),(w.selectedItem!==this.props.selectedItem||w.centerMode!==this.props.centerMode)&&(this.updateSizes(),this.moveTo(this.props.selectedItem)),w.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 w=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 N=w.getInitialImage();N&&!N.complete?N.addEventListener("load",w.setMountState):w.setMountState()})}},{key:"destroyCarousel",value:function(){this.state.initialized&&(this.unbindEvents(),this.destroyAutoPlay())}},{key:"setupAutoPlay",value:function(){this.autoPlay();var w=this.carouselWrapperRef;this.props.stopOnHover&&w&&(w.addEventListener("mouseenter",this.stopOnHover),w.addEventListener("mouseleave",this.startOnLeave))}},{key:"destroyAutoPlay",value:function(){this.clearAutoPlay();var w=this.carouselWrapperRef;this.props.stopOnHover&&w&&(w.removeEventListener("mouseenter",this.stopOnHover),w.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 w=this.getInitialImage();w&&w.removeEventListener("load",this.setMountState),this.props.useKeyboardArrows&&(0,i.default)().removeEventListener("keydown",this.navigateWithKeyboard)}},{key:"forceFocus",value:function(){var w;(w=this.carouselWrapperRef)===null||w===void 0||w.focus()}},{key:"renderItems",value:function(w){var N=this;return this.props.children?e.Children.map(this.props.children,function(B,G){var ce=G===N.state.selectedItem,z=G===N.state.previousItem,M=ce&&N.state.selectedStyle||z&&N.state.prevStyle||N.state.slideStyle||{};N.props.centerMode&&N.props.axis==="horizontal"&&(M=g(g({},M),{},{minWidth:N.props.centerSlidePercentage+"%"})),N.state.swiping&&N.state.swipeMovementStarted&&(M=g(g({},M),{},{pointerEvents:"none"}));var $={ref:function(K){return N.setItemsRef(K,G)},key:"itemKey"+G+(w?"clone":""),className:n.default.ITEM(!0,G===N.state.selectedItem,G===N.state.previousItem),onClick:N.handleClickItem.bind(N,G,B),style:M};return e.default.createElement("li",$,N.props.renderItem(B,{isSelected:G===N.state.selectedItem,isPrevious:G===N.state.previousItem}))}):[]}},{key:"renderControls",value:function(){var w=this,N=this.props,B=N.showIndicators,G=N.labels,ce=N.renderIndicator,z=N.children;return B?e.default.createElement("ul",{className:"control-dots"},e.Children.map(z,function(M,$){return ce&&ce(w.changeItem($),$===w.state.selectedItem,$,G.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 w=this;if(!this.props.children||e.Children.count(this.props.children)===0)return null;var N=this.props.swipeable&&e.Children.count(this.props.children)>1,B=this.props.axis==="horizontal",G=this.props.showArrows&&e.Children.count(this.props.children)>1,ce=G&&(this.state.selectedItem>0||this.props.infiniteLoop)||!1,z=G&&(this.state.selectedItem<e.Children.count(this.props.children)-1||this.props.infiniteLoop)||!1,M=this.renderItems(!0),$=M.shift(),W=M.pop(),K={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},J={};if(B){if(K.onSwipeLeft=this.onSwipeForward,K.onSwipeRight=this.onSwipeBackwards,this.props.dynamicHeight){var oe=this.getVariableItemHeight(this.state.selectedItem);J.height=oe||"auto"}}else K.onSwipeUp=this.props.verticalSwipe==="natural"?this.onSwipeBackwards:this.onSwipeForward,K.onSwipeDown=this.props.verticalSwipe==="natural"?this.onSwipeForward:this.onSwipeBackwards,K.style=g(g({},K.style),{},{height:this.state.itemSize}),J.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,ce,this.props.labels.leftArrow),e.default.createElement("div",{className:n.default.WRAPPER(!0,this.props.axis),style:J},N?e.default.createElement(t.default,h({tagName:"ul",innerRef:this.setListRef},K,{allowMouseEvents:this.props.emulateTouch}),this.props.infiniteLoop&&W,this.renderItems(),this.props.infiniteLoop&&$):e.default.createElement("ul",{className:n.default.SLIDER(!0,this.state.swiping),ref:function(ie){return w.setListRef(ie)},style:this.state.itemListStyle||{}},this.props.infiniteLoop&&W,this.renderItems(),this.props.infiniteLoop&&$)),this.props.renderArrowNext(this.onClickNext,z,this.props.labels.rightArrow),this.renderStatus()),this.renderThumbs())}}]),k})(e.default.Component);return fi.default=L,E(L,"displayName","Carousel"),E(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(b,k,I){return e.default.createElement("button",{type:"button","aria-label":I,className:n.default.ARROW_PREV(!k),onClick:b})},renderArrowNext:function(b,k,I){return e.default.createElement("button",{type:"button","aria-label":I,className:n.default.ARROW_NEXT(!k),onClick:b})},renderIndicator:function(b,k,I,w){return e.default.createElement("li",{className:n.default.DOT(k),onClick:b,onKeyDown:b,value:I,key:I,role:"button",tabIndex:0,"aria-label":"".concat(w," ").concat(I+1)})},renderItem:function(b){return b},renderThumbs:function(b){var k=e.Children.map(b,function(I){var w=I;if(I.type!=="img"&&(w=e.Children.toArray(I.props.children).find(function(N){return N.type==="img"})),!!w)return w});return k.filter(function(I){return I}).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"),[]):k},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:s.slideSwipeAnimationHandler,stopSwipingHandler:s.slideStopSwipingHandler}),fi}var lf={},uf;function K0(){return uf||(uf=1),lf}var cf;function V0(){return cf||(cf=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(X0()),n=K0(),r=i(Qg());function i(o){return o&&o.__esModule?o:{default:o}}})(ms)),ms}var Z0=V0(),_s,df;function J0(){if(df)return _s;df=1;var e=kn(),t=function(){return e.Date.now()};return _s=t,_s}var ks,ff;function Q0(){if(ff)return ks;ff=1;var e=/\s/;function t(n){for(var r=n.length;r--&&e.test(n.charAt(r)););return r}return ks=t,ks}var Rs,hf;function e1(){if(hf)return Rs;hf=1;var e=Q0(),t=/^\s+/;function n(r){return r&&r.slice(0,e(r)+1).replace(t,"")}return Rs=n,Rs}var Es,gf;function Ku(){if(gf)return Es;gf=1;var e=e1(),t=gr(),n=Oo(),r=NaN,i=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,a=/^0o[0-7]+$/i,s=parseInt;function l(u){if(typeof u=="number")return u;if(n(u))return r;if(t(u)){var c=typeof u.valueOf=="function"?u.valueOf():u;u=t(c)?c+"":c}if(typeof u!="string")return u===0?u:+u;u=e(u);var d=o.test(u);return d||a.test(u)?s(u.slice(2),d?2:8):i.test(u)?r:+u}return Es=l,Es}var Ms,pf;function tp(){if(pf)return Ms;pf=1;var e=gr(),t=J0(),n=Ku(),r="Expected a function",i=Math.max,o=Math.min;function a(s,l,u){var c,d,h,f,g,m,x=0,_=!1,y=!1,C=!0;if(typeof s!="function")throw new TypeError(r);l=n(l)||0,e(u)&&(_=!!u.leading,y="maxWait"in u,h=y?i(n(u.maxWait)||0,l):h,C="trailing"in u?!!u.trailing:C);function P(k){var I=c,w=d;return c=d=void 0,x=k,f=s.apply(w,I),f}function S(k){return x=k,g=setTimeout(A,l),_?P(k):f}function T(k){var I=k-m,w=k-x,N=l-I;return y?o(N,h-w):N}function O(k){var I=k-m,w=k-x;return m===void 0||I>=l||I<0||y&&w>=h}function A(){var k=t();if(O(k))return E(k);g=setTimeout(A,T(k))}function E(k){return g=void 0,C&&c?P(k):(c=d=void 0,f)}function L(){g!==void 0&&clearTimeout(g),x=0,c=m=d=g=void 0}function R(){return g===void 0?f:E(t())}function b(){var k=t(),I=O(k);if(c=arguments,d=this,m=k,I){if(g===void 0)return S(m);if(y)return clearTimeout(g),g=setTimeout(A,l),P(m)}return g===void 0&&(g=setTimeout(A,l)),f}return b.cancel=L,b.flush=R,b}return Ms=a,Ms}var t1=tp();const np=Gn(t1);function Pt(e,t,n,r,i=!1){const o=p.useRef();o.current=t,p.useEffect(()=>{if(n===null||n.addEventListener===void 0)return;const a=n,s=l=>{o.current?.call(a,l)};return a.addEventListener(e,s,{passive:r,capture:i}),()=>{a.removeEventListener(e,s,{capture:i})}},[e,n,r,i])}function $r(e,t){return e===void 0?void 0:t}const n1=Math.PI;function mf(e){return e*n1/180}const rp=(e,t,n)=>({x1:e-n/2,y1:t-n/2,x2:e+n/2,y2:t+n/2}),ip=(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}},op=(e,t,n)=>Math.min(e,t-n*2),ap=(e,t,n)=>n.x1<=e&&e<=n.x2&&n.y1<=t&&t<=n.y2,Vu=e=>{const t=e.fgColor??"currentColor";return p.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},p.createElement("path",{d:"M12.7073 7.05029C7.87391 11.8837 10.4544 9.30322 6.03024 13.7273C5.77392 13.9836 5.58981 14.3071 5.50189 14.6587L4.52521 18.5655C4.38789 19.1148 4.88543 19.6123 5.43472 19.475L9.34146 18.4983C9.69313 18.4104 10.0143 18.2286 10.2706 17.9722L16.9499 11.2929",stroke:t,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",fill:"none",vectorEffect:"non-scaling-stroke"}),p.createElement("path",{d:"M20.4854 4.92901L19.0712 3.5148C18.2901 2.73375 17.0238 2.73375 16.2428 3.5148L14.475 5.28257C15.5326 7.71912 16.4736 8.6278 18.7176 9.52521L20.4854 7.75744C21.2665 6.97639 21.2665 5.71006 20.4854 4.92901Z",stroke:t,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",fill:"none",vectorEffect:"non-scaling-stroke"}))},r1=e=>{const t=e.fgColor??"currentColor";return p.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},p.createElement("path",{d:"M19 6L10.3802 17L5.34071 11.8758",vectorEffect:"non-scaling-stroke",stroke:t,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}))};function i1(e,t,n){const[r,i]=p.useState(e),o=p.useRef(!0);p.useEffect(()=>()=>{o.current=!1},[]);const a=p.useRef(np(s=>{o.current&&i(s)},n));return p.useLayoutEffect(()=>{o.current&&a.current(()=>e())},t),r}const o1="֑-߿יִ-﷽ﹰ-ﻼ",a1="A-Za-zÀ-ÖØ-öø-ʸ̀-֐ࠀ-῿‎Ⰰ-﬜︀-﹯﻽-￿",s1=new RegExp("^[^"+a1+"]*["+o1+"]");function Zu(e){return s1.test(e)?"rtl":"not-rtl"}let po;function Su(){if(typeof document>"u")return 0;if(po!==void 0)return po;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(),po=n-r,po}const ar=Symbol();function l1(e){const t=p.useRef([ar,e]);t.current[1]!==e&&(t.current[0]=e),t.current[1]=e;const[n,r]=p.useState(e),[,i]=p.useState(),o=p.useCallback(s=>{const l=t.current[0];l!==ar&&(s=typeof s=="function"?s(l):s,s===l)||(l!==ar&&i({}),r(u=>typeof s=="function"?s(l===ar?u:l):s),t.current[0]=ar)},[]),a=p.useCallback(()=>{t.current[0]=ar,i({})},[]);return[t.current[0]===ar?n:t.current[0],o,a]}function sp(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 u1(e){const t=p.useRef(e);return Yr(e,t.current)||(t.current=e),t.current}const c1=e=>{const{urls:t,canWrite:n,onEditClick:r,renderImage:i}=e,o=t.filter(s=>s!=="");if(o.length===0)return null;const a=o.length>1;return p.createElement(F0,{"data-testid":"GDG-default-image-overlay-editor"},p.createElement(Z0.Carousel,{showArrows:a,showThumbs:!1,swipeable:a,emulateTouch:a,infiniteLoop:a},o.map(s=>{const l=i?.(s)??p.createElement("img",{draggable:!1,src:s});return p.createElement("div",{className:"gdg-centering-container",key:s},l)})),n&&r&&p.createElement("button",{className:"gdg-edit-icon",onClick:r},p.createElement(Vu,null)))};function lp(){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 mr=lp();function d1(e){mr=e}const up=/[&<>"']/,f1=new RegExp(up.source,"g"),cp=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,h1=new RegExp(cp.source,"g"),g1={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},vf=e=>g1[e];function zt(e,t){if(t){if(up.test(e))return e.replace(f1,vf)}else if(cp.test(e))return e.replace(h1,vf);return e}const p1=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function dp(e){return e.replace(p1,(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 m1=/(^|[^\[])\^/g;function it(e,t){e=typeof e=="string"?e:e.source,t=t||"";const n={replace:(r,i)=>(i=i.source||i,i=i.replace(m1,"$1"),e=e.replace(r,i),n),getRegex:()=>new RegExp(e,t)};return n}const v1=/[^\w:]/g,y1=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function yf(e,t,n){if(e){let r;try{r=decodeURIComponent(dp(n)).replace(v1,"").toLowerCase()}catch{return null}if(r.indexOf("javascript:")===0||r.indexOf("vbscript:")===0||r.indexOf("data:")===0)return null}t&&!y1.test(n)&&(n=C1(t,n));try{n=encodeURI(n).replace(/%25/g,"%")}catch{return null}return n}const mo={},w1=/^[^:]+:\/*[^/]*$/,b1=/^([^:]+:)[\s\S]*$/,S1=/^([^:]+:\/*[^/]*)[\s\S]*$/;function C1(e,t){mo[" "+e]||(w1.test(e)?mo[" "+e]=e+"/":mo[" "+e]=So(e,"/",!0)),e=mo[" "+e];const n=e.indexOf(":")===-1;return t.substring(0,2)==="//"?n?t:e.replace(b1,"$1")+t:t.charAt(0)==="/"?n?t:e.replace(S1,"$1")+t:e+t}const ko={exec:function(){}};function wf(e,t){const n=e.replace(/\|/g,(o,a,s)=>{let l=!1,u=a;for(;--u>=0&&s[u]==="\\";)l=!l;return l?"|":" |"}),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 So(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 x1(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 _1(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 bf(e,t){if(t<1)return"";let n="";for(;t>1;)t&1&&(n+=e),t>>=1,e+=e;return n+e}function Sf(e,t,n,r){const i=t.href,o=t.title?zt(t.title):null,a=e[1].replace(/\\([\[\]])/g,"$1");if(e[0].charAt(0)!=="!"){r.state.inLink=!0;const s={type:"link",raw:n,href:i,title:o,text:a,tokens:r.inlineTokens(a)};return r.state.inLink=!1,s}return{type:"image",raw:n,href:i,title:o,text:zt(a)}}function k1(e,t){const n=e.match(/^(\s+)(?:```)/);if(n===null)return t;const r=n[1];return t.split(`
46
+ `).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(`
47
+ `)}class Ju{constructor(t){this.options=t||mr}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:So(r,`
48
+ `)}}}fences(t){const n=this.rules.block.fences.exec(t);if(n){const r=n[0],i=k1(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=So(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,s,l,u,c,d,h,f,g,m=n[1].trim();const x=m.length>1,_={type:"list",raw:"",ordered:x,start:x?+m.slice(0,-1):"",loose:!1,items:[]};m=x?`\\d{1,9}\\${m.slice(-1)}`:`\\${m}`,this.options.pedantic&&(m=x?m:"[*+-]");const y=new RegExp(`^( {0,3}${m})((?:[ ][^\\n]*)?(?:\\n|$))`);for(;t&&(g=!1,!(!(n=y.exec(t))||this.rules.block.hr.test(t)));){if(r=n[0],t=t.substring(r.length),c=n[2].split(`
49
+ `,1)[0].replace(/^\t+/,P=>" ".repeat(3*P.length)),d=t.split(`
50
+ `,1)[0],this.options.pedantic?(a=2,f=c.trimLeft()):(a=n[2].search(/[^ ]/),a=a>4?1:a,f=c.slice(a),a+=n[1].length),l=!1,!c&&/^ *$/.test(d)&&(r+=d+`
51
+ `,t=t.substring(d.length+1),g=!0),!g){const P=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+|$)`),T=new RegExp(`^ {0,${Math.min(3,a-1)}}(?:\`\`\`|~~~)`),O=new RegExp(`^ {0,${Math.min(3,a-1)}}#`);for(;t&&(h=t.split(`
52
+ `,1)[0],d=h,this.options.pedantic&&(d=d.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),!(T.test(d)||O.test(d)||P.test(d)||S.test(t)));){if(d.search(/[^ ]/)>=a||!d.trim())f+=`
53
+ `+d.slice(a);else{if(l||c.search(/[^ ]/)>=4||T.test(c)||O.test(c)||S.test(c))break;f+=`
54
+ `+d}!l&&!d.trim()&&(l=!0),r+=h+`
55
+ `,t=t.substring(h.length+1),c=d.slice(a)}}_.loose||(u?_.loose=!0:/\n *\n *$/.test(r)&&(u=!0)),this.options.gfm&&(i=/^\[[ xX]\] /.exec(f),i&&(o=i[0]!=="[ ] ",f=f.replace(/^\[[ xX]\] +/,""))),_.items.push({type:"list_item",raw:r,task:!!i,checked:o,loose:!1,text:f}),_.raw+=r}_.items[_.items.length-1].raw=r.trimRight(),_.items[_.items.length-1].text=f.trimRight(),_.raw=_.raw.trimRight();const C=_.items.length;for(s=0;s<C;s++)if(this.lexer.state.top=!1,_.items[s].tokens=this.lexer.blockTokens(_.items[s].text,[]),!_.loose){const P=_.items[s].tokens.filter(T=>T.type==="space"),S=P.length>0&&P.some(T=>/\n.*\n/.test(T.raw));_.loose=S}if(_.loose)for(s=0;s<C;s++)_.items[s].loose=!0;return _}}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]):zt(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:wf(n[1]).map(i=>({text:i})),align:n[2].replace(/^ *|\| *$/g,"").split(/ *\| */),rows:n[3]&&n[3].trim()?n[3].replace(/\n[ \t]*$/,"").split(`
56
+ `):[]};if(r.header.length===r.align.length){r.raw=n[0];let i=r.align.length,o,a,s,l;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]=wf(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(l=r.rows[a],s=0;s<l.length;s++)l[s].tokens=this.lexer.inline(l[s].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)===`
57
+ `?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:zt(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]):zt(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=So(r.slice(0,-1),"\\");if((r.length-a.length)%2===0)return}else{const a=x1(n[2],"()");if(a>-1){const l=(n[0].indexOf("!")===0?5:4)+n[1].length+a;n[2]=n[2].substring(0,a),n[0]=n[0].substring(0,l).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)),Sf(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 Sf(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 s,l,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(s=i[1]||i[2]||i[3]||i[4]||i[5]||i[6],!s)continue;if(l=s.length,i[3]||i[4]){u+=l;continue}else if((i[5]||i[6])&&a%3&&!((a+l)%3)){c+=l;continue}if(u-=l,u>0)continue;l=Math.min(l,l+u+c);const h=t.slice(0,a+i.index+(i[0].length-s.length)+l);if(Math.min(a,l)%2){const g=h.slice(1,-1);return{type:"em",raw:h,text:g,tokens:this.lexer.inlineTokens(g)}}const f=h.slice(2,-2);return{type:"strong",raw:h,text:f,tokens:this.lexer.inlineTokens(f)}}}}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=zt(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=zt(this.options.mangle?n(r[1]):r[1]),o="mailto:"+i):(i=zt(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=zt(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=zt(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]):zt(r[0]):r[0]:i=zt(this.options.smartypants?n(r[0]):r[0]),{type:"text",raw:r[0],text:i}}}}const _e={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:ko,lheading:/^((?:.|\n(?!\n))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,text:/^[^\n]+/};_e._label=/(?!\s*\])(?:\\.|[^\[\]\\])+/;_e._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/;_e.def=it(_e.def).replace("label",_e._label).replace("title",_e._title).getRegex();_e.bullet=/(?:[*+-]|\d{1,9}[.)])/;_e.listItemStart=it(/^( *)(bull) */).replace("bull",_e.bullet).getRegex();_e.list=it(_e.list).replace(/bull/g,_e.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+_e.def.source+")").getRegex();_e._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";_e._comment=/<!--(?!-?>)[\s\S]*?(?:-->|$)/;_e.html=it(_e.html,"i").replace("comment",_e._comment).replace("tag",_e._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex();_e.paragraph=it(_e._paragraph).replace("hr",_e.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",_e._tag).getRegex();_e.blockquote=it(_e.blockquote).replace("paragraph",_e.paragraph).getRegex();_e.normal={..._e};_e.gfm={..._e.normal,table:"^ *([^\\n ].*\\|.*)\\n {0,3}(?:\\| *)?(:?-+:? *(?:\\| *:?-+:? *)*)(?:\\| *)?(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"};_e.gfm.table=it(_e.gfm.table).replace("hr",_e.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",_e._tag).getRegex();_e.gfm.paragraph=it(_e._paragraph).replace("hr",_e.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("table",_e.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",_e._tag).getRegex();_e.pedantic={..._e.normal,html:it(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",_e._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:ko,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:it(_e.normal._paragraph).replace("hr",_e.hr).replace("heading",` *#{1,6} *[^
58
+ ]`).replace("lheading",_e.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()};const ve={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:ko,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:ko,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,punctuation:/^([\spunctuation])/};ve._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~";ve.punctuation=it(ve.punctuation).replace(/punctuation/g,ve._punctuation).getRegex();ve.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g;ve.escapedEmSt=/(?:^|[^\\])(?:\\\\)*\\[*_]/g;ve._comment=it(_e._comment).replace("(?:-->|$)","-->").getRegex();ve.emStrong.lDelim=it(ve.emStrong.lDelim).replace(/punct/g,ve._punctuation).getRegex();ve.emStrong.rDelimAst=it(ve.emStrong.rDelimAst,"g").replace(/punct/g,ve._punctuation).getRegex();ve.emStrong.rDelimUnd=it(ve.emStrong.rDelimUnd,"g").replace(/punct/g,ve._punctuation).getRegex();ve._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g;ve._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/;ve._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])?)+(?![-_])/;ve.autolink=it(ve.autolink).replace("scheme",ve._scheme).replace("email",ve._email).getRegex();ve._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/;ve.tag=it(ve.tag).replace("comment",ve._comment).replace("attribute",ve._attribute).getRegex();ve._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/;ve._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/;ve._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/;ve.link=it(ve.link).replace("label",ve._label).replace("href",ve._href).replace("title",ve._title).getRegex();ve.reflink=it(ve.reflink).replace("label",ve._label).replace("ref",_e._label).getRegex();ve.nolink=it(ve.nolink).replace("ref",_e._label).getRegex();ve.reflinkSearch=it(ve.reflinkSearch,"g").replace("reflink",ve.reflink).replace("nolink",ve.nolink).getRegex();ve.normal={...ve};ve.pedantic={...ve.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:it(/^!?\[(label)\]\((.*?)\)/).replace("label",ve._label).getRegex(),reflink:it(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",ve._label).getRegex()};ve.gfm={...ve.normal,escape:it(ve.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.!#$%&'*+\/=?_`{\|}~-]+@)))/};ve.gfm.url=it(ve.gfm.url,"i").replace("email",ve.gfm._extended_email).getRegex();ve.breaks={...ve.gfm,br:it(ve.br).replace("{2,}","*").getRegex(),text:it(ve.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()};function R1(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 Cf(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 Un{constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||mr,this.options.tokenizer=this.options.tokenizer||new Ju,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:_e.normal,inline:ve.normal};this.options.pedantic?(n.block=_e.pedantic,n.inline=ve.pedantic):this.options.gfm&&(n.block=_e.gfm,this.options.breaks?n.inline=ve.breaks:n.inline=ve.gfm),this.tokenizer.rules=n}static get rules(){return{block:_e,inline:ve}}static lex(t,n){return new Un(n).lex(t)}static lexInline(t,n){return new Un(n).inlineTokens(t)}lex(t){t=t.replace(/\r\n|\r/g,`
59
+ `),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,(s,l,u)=>l+" ".repeat(u.length));let r,i,o,a;for(;t;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(s=>(r=s.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+=`
60
+ `: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+=`
61
+ `+r.raw,i.text+=`
62
+ `+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+=`
63
+ `+r.raw,i.text+=`
64
+ `+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 s=1/0;const l=t.slice(1);let u;this.options.extensions.startBlock.forEach(function(c){u=c.call({lexer:this},l),typeof u=="number"&&u>=0&&(s=Math.min(s,u))}),s<1/0&&s>=0&&(o=t.substring(0,s+1))}if(this.state.top&&(r=this.tokenizer.paragraph(o))){i=n[n.length-1],a&&i.type==="paragraph"?(i.raw+=`
65
+ `+r.raw,i.text+=`
66
+ `+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+=`
67
+ `+r.raw,i.text+=`
68
+ `+r.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=i.text):n.push(r);continue}if(t){const s="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(s);break}else throw new Error(s)}}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,s,l,u;if(this.tokens.links){const c=Object.keys(this.tokens.links);if(c.length>0)for(;(s=this.tokenizer.rules.inline.reflinkSearch.exec(a))!=null;)c.includes(s[0].slice(s[0].lastIndexOf("[")+1,-1))&&(a=a.slice(0,s.index)+"["+bf("a",s[0].length-2)+"]"+a.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(s=this.tokenizer.rules.inline.blockSkip.exec(a))!=null;)a=a.slice(0,s.index)+"["+bf("a",s[0].length-2)+"]"+a.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(s=this.tokenizer.rules.inline.escapedEmSt.exec(a))!=null;)a=a.slice(0,s.index+s[0].length-2)+"++"+a.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex),this.tokenizer.rules.inline.escapedEmSt.lastIndex--;for(;t;)if(l||(u=""),l=!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,Cf)){t=t.substring(r.raw.length),n.push(r);continue}if(!this.state.inLink&&(r=this.tokenizer.url(t,Cf))){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 h;this.options.extensions.startInline.forEach(function(f){h=f.call({lexer:this},d),typeof h=="number"&&h>=0&&(c=Math.min(c,h))}),c<1/0&&c>=0&&(o=t.substring(0,c+1))}if(r=this.tokenizer.inlineText(o,R1)){t=t.substring(r.raw.length),r.raw.slice(-1)!=="_"&&(u=r.raw.slice(-1)),l=!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 Qu{constructor(t){this.options=t||mr}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$/,"")+`
69
+ `,i?'<pre><code class="'+this.options.langPrefix+zt(i)+'">'+(r?t:zt(t,!0))+`</code></pre>
70
+ `:"<pre><code>"+(r?t:zt(t,!0))+`</code></pre>
71
+ `}blockquote(t){return`<blockquote>
72
+ ${t}</blockquote>
73
+ `}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}>
74
+ `}return`<h${n}>${t}</h${n}>
75
+ `}hr(){return this.options.xhtml?`<hr/>
76
+ `:`<hr>
77
+ `}list(t,n,r){const i=n?"ol":"ul",o=n&&r!==1?' start="'+r+'"':"";return"<"+i+o+`>
78
+ `+t+"</"+i+`>
79
+ `}listitem(t){return`<li>${t}</li>
80
+ `}checkbox(t){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "}paragraph(t){return`<p>${t}</p>
81
+ `}table(t,n){return n&&(n=`<tbody>${n}</tbody>`),`<table>
82
+ <thead>
83
+ `+t+`</thead>
84
+ `+n+`</table>
85
+ `}tablerow(t){return`<tr>
86
+ ${t}</tr>
87
+ `}tablecell(t,n){const r=n.header?"th":"td";return(n.align?`<${r} align="${n.align}">`:`<${r}>`)+t+`</${r}>
88
+ `}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=yf(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=yf(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 fp{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 hp{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 Yn{constructor(t){this.options=t||mr,this.options.renderer=this.options.renderer||new Qu,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new fp,this.slugger=new hp}static parse(t,n){return new Yn(n).parse(t)}static parseInline(t,n){return new Yn(n).parseInline(t)}parse(t,n=!0){let r="",i,o,a,s,l,u,c,d,h,f,g,m,x,_,y,C,P,S,T;const O=t.length;for(i=0;i<O;i++){if(f=t[i],this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[f.type]&&(T=this.options.extensions.renderers[f.type].call({parser:this},f),T!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(f.type))){r+=T||"";continue}switch(f.type){case"space":continue;case"hr":{r+=this.renderer.hr();continue}case"heading":{r+=this.renderer.heading(this.parseInline(f.tokens),f.depth,dp(this.parseInline(f.tokens,this.textRenderer)),this.slugger);continue}case"code":{r+=this.renderer.code(f.text,f.lang,f.escaped);continue}case"table":{for(d="",c="",s=f.header.length,o=0;o<s;o++)c+=this.renderer.tablecell(this.parseInline(f.header[o].tokens),{header:!0,align:f.align[o]});for(d+=this.renderer.tablerow(c),h="",s=f.rows.length,o=0;o<s;o++){for(u=f.rows[o],c="",l=u.length,a=0;a<l;a++)c+=this.renderer.tablecell(this.parseInline(u[a].tokens),{header:!1,align:f.align[a]});h+=this.renderer.tablerow(c)}r+=this.renderer.table(d,h);continue}case"blockquote":{h=this.parse(f.tokens),r+=this.renderer.blockquote(h);continue}case"list":{for(g=f.ordered,m=f.start,x=f.loose,s=f.items.length,h="",o=0;o<s;o++)y=f.items[o],C=y.checked,P=y.task,_="",y.task&&(S=this.renderer.checkbox(C),x?y.tokens.length>0&&y.tokens[0].type==="paragraph"?(y.tokens[0].text=S+" "+y.tokens[0].text,y.tokens[0].tokens&&y.tokens[0].tokens.length>0&&y.tokens[0].tokens[0].type==="text"&&(y.tokens[0].tokens[0].text=S+" "+y.tokens[0].tokens[0].text)):y.tokens.unshift({type:"text",text:S}):_+=S),_+=this.parse(y.tokens,x),h+=this.renderer.listitem(_,P,C);r+=this.renderer.list(h,g,m);continue}case"html":{r+=this.renderer.html(f.text);continue}case"paragraph":{r+=this.renderer.paragraph(this.parseInline(f.tokens));continue}case"text":{for(h=f.tokens?this.parseInline(f.tokens):f.text;i+1<O&&t[i+1].type==="text";)f=t[++i],h+=`
89
+ `+(f.tokens?this.parseInline(f.tokens):f.text);r+=n?this.renderer.paragraph(h):h;continue}default:{const A='Token with "'+f.type+'" type was not found.';if(this.options.silent){console.error(A);return}else throw new Error(A)}}}return r}parseInline(t,n){n=n||this.renderer;let r="",i,o,a;const s=t.length;for(i=0;i<s;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 l='Token with "'+o.type+'" type was not found.';if(this.options.silent){console.error(l);return}else throw new Error(l)}}}return r}}class Cu{constructor(t){this.options=t||mr}static passThroughHooks=new Set(["preprocess","postprocess"]);preprocess(t){return t}postprocess(t){return t}}function E1(e,t,n){return r=>{if(r.message+=`
90
+ Please report this to https://github.com/markedjs/marked.`,e){const i="<p>An error occurred:</p><pre>"+zt(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 gp(e,t){return(n,r,i)=>{typeof r=="function"&&(i=r,r=null);const o={...r};r={...ke.defaults,...o};const a=E1(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(_1(r),r.hooks&&(r.hooks.options=r),i){const s=r.highlight;let l;try{r.hooks&&(n=r.hooks.preprocess(n)),l=e(n,r)}catch(d){return a(d)}const u=function(d){let h;if(!d)try{r.walkTokens&&ke.walkTokens(l,r.walkTokens),h=t(l,r),r.hooks&&(h=r.hooks.postprocess(h))}catch(f){d=f}return r.highlight=s,d?a(d):i(null,h)};if(!s||s.length<3||(delete r.highlight,!l.length))return u();let c=0;ke.walkTokens(l,function(d){d.type==="code"&&(c++,setTimeout(()=>{s(d.text,d.lang,function(h,f){if(h)return u(h);f!=null&&f!==d.text&&(d.text=f,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(s=>e(s,r)).then(s=>r.walkTokens?Promise.all(ke.walkTokens(s,r.walkTokens)).then(()=>s):s).then(s=>t(s,r)).then(s=>r.hooks?r.hooks.postprocess(s):s).catch(a);try{r.hooks&&(n=r.hooks.preprocess(n));const s=e(n,r);r.walkTokens&&ke.walkTokens(s,r.walkTokens);let l=t(s,r);return r.hooks&&(l=r.hooks.postprocess(l)),l}catch(s){return a(s)}}}function ke(e,t,n){return gp(Un.lex,Yn.parse)(e,t,n)}ke.options=ke.setOptions=function(e){return ke.defaults={...ke.defaults,...e},d1(ke.defaults),ke};ke.getDefaults=lp;ke.defaults=mr;ke.use=function(...e){const t=ke.defaults.extensions||{renderers:{},childTokens:{}};e.forEach(n=>{const r={...n};if(r.async=ke.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 s=i.renderer.apply(this,a);return s===!1&&(s=o.apply(this,a)),s}: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=ke.defaults.renderer||new Qu;for(const o in n.renderer){const a=i[o];i[o]=(...s)=>{let l=n.renderer[o].apply(i,s);return l===!1&&(l=a.apply(i,s)),l}}r.renderer=i}if(n.tokenizer){const i=ke.defaults.tokenizer||new Ju;for(const o in n.tokenizer){const a=i[o];i[o]=(...s)=>{let l=n.tokenizer[o].apply(i,s);return l===!1&&(l=a.apply(i,s)),l}}r.tokenizer=i}if(n.hooks){const i=ke.defaults.hooks||new Cu;for(const o in n.hooks){const a=i[o];Cu.passThroughHooks.has(o)?i[o]=s=>{if(ke.defaults.async)return Promise.resolve(n.hooks[o].call(i,s)).then(u=>a.call(i,u));const l=n.hooks[o].call(i,s);return a.call(i,l)}:i[o]=(...s)=>{let l=n.hooks[o].apply(i,s);return l===!1&&(l=a.apply(i,s)),l}}r.hooks=i}if(n.walkTokens){const i=ke.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}}ke.setOptions(r)})};ke.walkTokens=function(e,t){let n=[];for(const r of e)switch(n=n.concat(t.call(ke,r)),r.type){case"table":{for(const i of r.header)n=n.concat(ke.walkTokens(i.tokens,t));for(const i of r.rows)for(const o of i)n=n.concat(ke.walkTokens(o.tokens,t));break}case"list":{n=n.concat(ke.walkTokens(r.items,t));break}default:ke.defaults.extensions&&ke.defaults.extensions.childTokens&&ke.defaults.extensions.childTokens[r.type]?ke.defaults.extensions.childTokens[r.type].forEach(function(i){n=n.concat(ke.walkTokens(r[i],t))}):r.tokens&&(n=n.concat(ke.walkTokens(r.tokens,t)))}return n};ke.parseInline=gp(Un.lexInline,Yn.parseInline);ke.Parser=Yn;ke.parser=Yn.parse;ke.Renderer=Qu;ke.TextRenderer=fp;ke.Lexer=Un;ke.lexer=Un.lex;ke.Tokenizer=Ju;ke.Slugger=hp;ke.Hooks=Cu;ke.parse=ke;ke.options;ke.setOptions;ke.use;ke.walkTokens;ke.parseInline;Yn.parse;Un.lex;const M1=Ut("div")({name:"MarkdownContainer",class:"gdg-mnuv029",propsAsIs:!1});class T1 extends se.PureComponent{targetElement=null;renderMarkdownIntoDiv(){const{targetElement:t,props:n}=this;if(t===null)return;const{contents:r,createNode:i}=n,o=ke(r),a=document.createRange();a.selectNodeContents(t),a.deleteContents();let s=i?.(o);if(s===void 0){const u=document.createElement("template");u.innerHTML=o,s=u.content}t.append(s);const l=t.getElementsByTagName("a");for(const u of l)u.target="_blank",u.rel="noreferrer noopener"}containerRefHook=t=>{this.targetElement=t,this.renderMarkdownIntoDiv()};render(){return this.renderMarkdownIntoDiv(),se.createElement(M1,{ref:this.containerRefHook})}}const I1=Ut("textarea")({name:"InputBox",class:"gdg-izpuzkl",propsAsIs:!1}),P1=Ut("div")({name:"ShadowBox",class:"gdg-s69h75o",propsAsIs:!1}),A1=Ut("div")({name:"GrowingEntryStyle",class:"gdg-g1y0xocz",propsAsIs:!1});let xf=0;const qo=e=>{const{placeholder:t,value:n,onKeyDown:r,highlight:i,altNewline:o,validatedSelection:a,...s}=e,{onChange:l,className:u}=s,c=p.useRef(null),d=n??"";en(l!==void 0,"GrowingEntry must be a controlled input area");const[h]=p.useState(()=>"input-box-"+(xf=(xf+1)%1e7));p.useEffect(()=>{const g=c.current;if(g===null||g.disabled)return;const m=d.toString().length;g.focus(),g.setSelectionRange(i?0:m,m)},[]),p.useLayoutEffect(()=>{if(a!==void 0){const g=typeof a=="number"?[a,null]:a;c.current?.setSelectionRange(g[0],g[1])}},[a]);const f=p.useCallback(g=>{g.key==="Enter"&&g.shiftKey&&o===!0||r?.(g)},[o,r]);return p.createElement(A1,{className:"gdg-growing-entry"},p.createElement(P1,{className:u},d+`
91
+ `),p.createElement(I1,{...s,className:(u??"")+" gdg-input",id:h,ref:c,onKeyDown:f,value:d,placeholder:t,dir:"auto"}))},Ts={};let Nn=null;function O1(){const e=document.createElement("div");return e.style.opacity="0",e.style.pointerEvents="none",e.style.position="fixed",document.body.append(e),e}function xu(e){const t=e.toLowerCase().trim();if(Ts[t]!==void 0)return Ts[t];Nn=Nn||O1(),Nn.style.color="#000",Nn.style.color=t;const n=getComputedStyle(Nn).color;Nn.style.color="#fff",Nn.style.color=t;const r=getComputedStyle(Nn).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=>{const a=Number.isNaN(o);return process.env.NODE_ENV!=="production"&&a&&console.warn("Could not parse color",e),a?0:o}),Ts[t]=i,i}function dr(e,t){const[n,r,i]=xu(e);return`rgba(${n}, ${r}, ${i}, ${t})`}const _f=new Map;function kf(e,t){const n=`${e}-${t}`,r=_f.get(n);if(r!==void 0)return r;const i=tn(e,t);return _f.set(n,i),i}function tn(e,t){if(t===void 0)return e;const[n,r,i,o]=xu(e);if(o===1)return e;const[a,s,l,u]=xu(t),c=o+u*(1-o),d=(o*n+u*a*(1-o))/c,h=(o*r+u*s*(1-o))/c,f=(o*i+u*l*(1-o))/c;return`rgba(${d}, ${h}, ${f}, ${c})`}var Wr=new Map,Br=new Map,_u=new Map;function D1(){Wr.clear(),_u.clear(),Br.clear()}function F1(e,t,n,r,i){var o,a,s;let l=0,u={};for(let d of e)l+=(o=n.get(d))!=null?o:i,u[d]=((a=u[d])!=null?a:0)+1;let c=t-l;for(let d of Object.keys(u)){let h=u[d],f=(s=n.get(d))!=null?s:i,g=f*h/l,m=c*g*r/h,x=f+m;n.set(d,x)}}function z1(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,s=(t/o+a)/(a+1),l=r.keys();for(let u of l)r.set(u,((n=r.get(u))!=null?n:o)*s);return r}function ki(e,t,n,r){var i,o;let a=Br.get(n);if(r&&a!==void 0&&a.count>2e4){let u=_u.get(n);if(u===void 0&&(u=z1(e,a.size),_u.set(n,u)),a.count>5e5){let d=0;for(let h of t)d+=(i=u.get(h))!=null?i:a.size;return d*1.01}let c=e.measureText(t);return F1(t,c.width,u,Math.max(.05,1-a.count/2e5),a.size),Br.set(n,{count:a.count+t.length,size:a.size}),c.width}let s=e.measureText(t),l=s.width/t.length;if(((o=a?.count)!=null?o:0)>2e4)return s.width;if(a===void 0)Br.set(n,{count:t.length,size:l});else{let u=l-a.size,c=t.length/(a.count+t.length),d=a.size+u*c;Br.set(n,{count:a.count+t.length,size:d})}return s.width}function L1(e,t,n,r,i,o,a,s){if(t.length<=1)return t.length;if(i<n)return-1;let l=Math.floor(n/i*o),u=ki(e,t.slice(0,Math.max(0,l)),r,a);if(u!==n)if(u<n){for(;u<n;)l++,u=ki(e,t.slice(0,Math.max(0,l)),r,a);l--}else for(;u>n;){let c=t.lastIndexOf(" ",l-1);c>0?l=c:l--,u=ki(e,t.slice(0,Math.max(0,l)),r,a)}if(t[l]!==" "){let c=0;c=t.lastIndexOf(" ",l),c>0&&(l=c)}return l}function H1(e,t,n,r,i,o){let a=`${t}_${n}_${r}px`,s=Wr.get(a);if(s!==void 0)return s;if(r<=0)return[];let l=[],u=t.split(`
92
+ `),c=Br.get(n),d=c===void 0?t.length:r/c.size*1.5,h=i&&c!==void 0&&c.count>2e4;for(let f of u){let g=ki(e,f.slice(0,Math.max(0,d)),n,h),m=Math.min(f.length,d);if(g<=r)l.push(f);else{for(;g>r;){let x=L1(e,f,r,n,g,m,h),_=f.slice(0,Math.max(0,x));f=f.slice(_.length),l.push(_),g=ki(e,f.slice(0,Math.max(0,d)),n,h),m=Math.min(f.length,d)}g>0&&l.push(f)}}return l=l.map((f,g)=>g===0?f.trimEnd():f.trim()),Wr.set(a,l),Wr.size>500&&Wr.delete(Wr.keys().next().value),l}function q1(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,style:n.style,themeOverride:n.themeOverride,title:n.title,trailingRowOptions:n.trailingRowOptions,width:n.width,growOffset:n.growOffset,rowMarker:n.rowMarker,rowMarkerChecked:n.rowMarkerChecked})),[e,t])}function $1(e,t){const[n,r]=t;if(e.columns.hasIndex(n)||e.rows.hasIndex(r))return!0;if(e.current!==void 0){if(Ri(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 Ii(e,t){return(e??"")===(t??"")}function N1(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 pp(e,t){const[n,r]=e;return n>=t.x&&n<t.x+t.width&&r>=t.y&&r<t.y+t.height}function Ri(e,t){return e?.[0]===t?.[0]&&e?.[1]===t?.[1]}function mp(e){return[e.x+e.width-1,e.y+e.height-1]}function Rf(e,t,n){const r=n.x,i=n.x+n.width-1,o=n.y,a=n.y+n.height-1,[s,l]=e;if(l<o||l>a)return!1;if(t.span===void 0)return s>=r&&s<=i;const[u,c]=t.span;return u>=r&&u<=i||c>=r&&u<=i||u<r&&c>i}function W1(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)&&Rf(e,t,o)&&i++;for(const a of n.current.rangeStack)Rf(e,t,a)&&i++;return i}function vp(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 Gr(e,t){let n=0;const r=vp(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 vr(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 ku(e,t,n,r,i){const o=vp(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 s=t,l=i??0;for(;l<=n&&s<o.length;)l+=o[s].width,s++;for(let u=t;u<s;u++){const c=o[u];c.sticky||a.push(c)}return a}function B1(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 j1(e,t,n,r,i,o,a,s,l,u){const c=r+i;if(n&&e<=i)return-2;if(e<=c)return-1;let d=t;for(let g=0;g<u;g++){const m=o-1-g,x=typeof a=="number"?a:a(m);if(d-=x,e>=d)return m}const h=o-u,f=e-(l??0);if(typeof a=="number"){const g=Math.floor((f-c)/a)+s;return g>=h?void 0:g}else{let g=c;for(let m=s;m<h;m++){const x=a(m);if(f<=g+x)return m;g+=x}return}}let Co=0,Ei={};const U1=typeof window>"u";async function Y1(){U1||document?.fonts?.ready===void 0||(await document.fonts.ready,Co=0,Ei={},D1())}Y1();function yp(e,t,n,r){return`${e}_${r??t?.font}_${n}`}function zi(e,t,n,r="middle"){const i=yp(e,t,r,n);let o=Ei[i];return o===void 0&&(o=t.measureText(e),Ei[i]=o,Co++),Co>1e4&&(Ei={},Co=0),o}function G1(e,t){const n=yp(e,void 0,"middle",t);return Ei[n]}function Xn(e,t){return typeof t!="string"&&(t=t.baseFontFull),X1(e,t)}function Ef(e,t){const n="ABCDEFGHIJKLMNOPQRSTUVWXYZ";e.save(),e.textBaseline=t;const r=e.measureText(n);return e.restore(),r}const Mf=[];function X1(e,t){for(const o of Mf)if(o.key===t)return o.val;const n=Ef(e,"alphabetic"),i=-(Ef(e,"middle").actualBoundingBoxDescent-n.actualBoundingBoxDescent)+n.actualBoundingBoxAscent/2;return Mf.push({key:t,val:i}),i}function K1(e,t,n,r,i,o){const{ctx:a,rect:s,theme:l}=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=l.bgSearchResult,a.fillRect(s.x+1,s.y+1,s.width-(i?2:1),s.height-(o?2:1)),a.globalAlpha=1,r!==void 0&&(r.fillStyle=l.bgSearchResult)}return u<c}function Li(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 wp(e,t,n,r,i,o,a,s,l){l==="right"?e.fillText(t,n+i-(s.cellHorizontalPadding+.5),r+o/2+a):l==="center"?e.fillText(t,n+i/2,r+o/2+a):e.fillText(t,n+s.cellHorizontalPadding+.5,r+o/2+a)}function bp(e,t){const n=zi("ABCi09jgqpy",e,t);return n.actualBoundingBoxAscent+n.actualBoundingBoxDescent}function V1(e,t){e.includes(`
93
+ `)&&(e=e.split(/\r?\n/,1)[0]);const n=t/4;return e.length>n&&(e=e.slice(0,n)),e}function Z1(e,t,n,r,i,o,a,s,l,u){const c=s.baseFontFull,d=H1(e,t,c,i-s.cellHorizontalPadding*2,u??!1),h=bp(e,c),f=s.lineHeight*h,g=h+f*(d.length-1),m=g+s.cellVerticalPadding>o;m&&(e.save(),e.rect(n,r,i,o),e.clip());const x=r+o/2-g/2;let _=Math.max(r+s.cellVerticalPadding,x);for(const y of d)if(wp(e,y,n,_,i,h,a,s,l),_+=f,_>r+o)break;m&&e.restore()}function Dn(e,t,n,r,i){const{ctx:o,rect:a,theme:s}=e,{x:l,y:u,width:c,height:d}=a;r=r??!1,r||(t=V1(t,c));const h=Xn(o,s),f=Zu(t)==="rtl";if(n===void 0&&f&&(n="right"),f&&(o.direction="rtl"),t.length>0){let g=!1;n==="right"?(o.textAlign="right",g=!0):n!==void 0&&n!=="left"&&(o.textAlign=n,g=!0),r?Z1(o,t,l,u,c,d,h,s,n,i):wp(o,t,l,u,c,d,h,s,n),g&&(o.textAlign="start"),f&&(o.direction="inherit")}}function xn(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 J1(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 Q1(e,t,n){const r=function(s,l){const u=l.x-s.x,c=l.y-s.y,d=Math.sqrt(u*u+c*c),h=u/d,f=c/d;return{x:u,y:l.y-s.y,len:d,nx:h,ny:f,ang:Math.atan2(f,h)}};let i;const o=t.length;let a=t[o-1];for(let s=0;s<o;s++){let l=t[s%o];const u=t[(s+1)%o],c=r(l,a),d=r(l,u),h=c.nx*d.ny-c.ny*d.nx,f=c.nx*d.nx-c.ny*-d.ny;let g=Math.asin(h<-1?-1:h>1?1:h),m=1,x=!1;f<0?g<0?g=Math.PI+g:(g=Math.PI-g,m=-1,x=!0):g>0&&(m=-1,x=!0),i=l.radius!==void 0?l.radius:n;const _=g/2;let y=Math.abs(Math.cos(_)*i/Math.sin(_)),C;y>Math.min(c.len/2,d.len/2)?(y=Math.min(c.len/2,d.len/2),C=Math.abs(y*Math.sin(_)/Math.cos(_))):C=i;let P=l.x+d.nx*y,S=l.y+d.ny*y;P+=-d.ny*C*m,S+=d.nx*C*m,e.arc(P,S,C,c.ang+Math.PI/2*m,d.ang-Math.PI/2*m,x),a=l,l=u}e.closePath()}function Ru(e,t,n,r,i,o,a,s,l,u,c,d,h,f,g){const m={x:0,y:o+u,width:0,height:0};if(e>=f.length||t>=c||t<-2||e<0)return m;const x=o-i;if(e>=d){const _=a>e?-1:1,y=Gr(f);m.x+=y+l;for(let C=a;C!==e;C+=_)m.x+=f[_===1?C:C-1].width*_}else for(let _=0;_<e;_++)m.x+=f[_].width;if(m.width=f[e].width+1,t===-1)m.y=i,m.height=x;else if(t===-2){m.y=0,m.height=i;let _=e;const y=f[e].group,C=f[e].sticky;for(;_>0&&Ii(f[_-1].group,y)&&f[_-1].sticky===C;){const S=f[_-1];m.x-=S.width,m.width+=S.width,_--}let P=e;for(;P+1<f.length&&Ii(f[P+1].group,y)&&f[P+1].sticky===C;){const S=f[P+1];m.width+=S.width,P++}if(!C){const S=Gr(f),T=m.x-S;T<0&&(m.x-=T,m.width+=T),m.x+m.width>n&&(m.width=n-m.x)}}else if(t>=c-h){let _=c-t;for(m.y=r;_>0;){const y=t+_-1;m.height=typeof g=="number"?g:g(y),m.y-=m.height,_--}m.height+=1}else{const _=s>t?-1:1;if(typeof g=="number"){const y=t-s;m.y+=y*g}else for(let y=s;y!==t;y+=_)m.y+=g(y)*_;m.height=(typeof g=="number"?g:g(t))+1}return m}const ec=1<<21;function mn(e,t){return(t+2)*ec+e}function Sp(e){return e%ec}function tc(e){return Math.floor(e/ec)-2}function nc(e){const t=Sp(e),n=tc(e);return[t,n]}class Cp{visibleWindow={x:0,y:0,width:0,height:0};freezeCols=0;freezeRows=[];isInWindow=t=>{const n=Sp(t),r=tc(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&&Yr(this.freezeRows,r)||(this.visibleWindow=t,this.freezeCols=n,this.freezeRows=r,this.clearOutOfWindow())}}class ev extends Cp{cache=new Map;setValue=(t,n)=>{this.cache.set(mn(t[0],t[1]),n)};getValue=t=>this.cache.get(mn(t[0],t[1]));clearOutOfWindow=()=>{for(const[t]of this.cache.entries())this.isInWindow(t)||this.cache.delete(t)}}class Mi{cells;constructor(t=[]){this.cells=new Set(t.map(n=>mn(n[0],n[1])))}add(t){this.cells.add(mn(t[0],t[1]))}has(t){return t===void 0?!1:this.cells.has(mn(t[0],t[1]))}remove(t){this.cells.delete(mn(t[0],t[1]))}clear(){this.cells.clear()}get size(){return this.cells.size}hasHeader(){for(const t of this.cells)if(tc(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(mn(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 nc(t)}}function xp(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 _p={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 kp(){return _p}const Rp=se.createContext(_p);function jn(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]=tn(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 Eu=150;function tv(e,t,n,r){return r(t)?.measure?.(e,t,n)??Eu}function Ep(e,t,n,r,i,o,a,s,l){let u=0;const c=i===void 0?[]:i.map(h=>{const f=tv(e,h[r],t,l);return u=Math.max(u,f),f});if(c.length>5&&s){u=0;let h=0;for(const g of c)h+=g;const f=h/c.length;for(let g=0;g<c.length;g++)c[g]>=f*2?c[g]=0:u=Math.max(u,c[g])}u=Math.max(u,e.measureText(n.title).width+16+(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 nv(e,t,n,r,i,o,a,s,l){const u=p.useRef(t),c=p.useRef(n),d=p.useRef(a);u.current=t,c.current=n,d.current=a;const[h,f]=p.useMemo(()=>{if(typeof window>"u")return[null,null];const y=document.createElement("canvas");return y.style.display="none",y.style.opacity="0",y.style.position="fixed",[y,y.getContext("2d",{alpha:!1})]},[]);p.useLayoutEffect(()=>(h&&document.documentElement.append(h),()=>{h?.remove()}),[h]);const g=p.useRef({}),m=p.useRef(),[x,_]=p.useState();return p.useLayoutEffect(()=>{const y=c.current;if(y===void 0||e.every(uo))return;let C=Math.max(1,10-Math.floor(e.length/1e4)),P=0;C<u.current&&C>1&&(C--,P=1);const S={x:0,y:0,width:e.length,height:Math.min(u.current,C)},T={x:0,y:u.current-1,width:e.length,height:1};(async()=>{const A=y(S,l.signal),E=P>0?y(T,l.signal):void 0;let L;typeof A=="object"?L=A:L=await Fd(A),E!==void 0&&(typeof E=="object"?L=[...L,...E]:L=[...L,...await Fd(E)]),m.current=e,_(L)})()},[l.signal,e]),p.useMemo(()=>{let C=e.every(uo)?e:f===null?e.map(O=>uo(O)?O:{...O,width:Eu}):(f.font=d.current.baseFontFull,e.map((O,A)=>{if(uo(O))return O;if(g.current[O.id]!==void 0)return{...O,width:g.current[O.id]};if(x===void 0||m.current!==e||O.id===void 0)return{...O,width:Eu};const E=Ep(f,a,O,A,x,i,o,!0,s);return g.current[O.id]=E.width,E})),P=0,S=0;const T=[];for(const[O,A]of C.entries())P+=A.width,A.grow!==void 0&&A.grow>0&&(S+=A.grow,T.push(O));if(P<r&&T.length>0){const O=[...C],A=r-P;let E=A;for(let L=0;L<T.length;L++){const R=T[L],b=(C[R].grow??0)/S,k=L===T.length-1?E:Math.min(E,Math.floor(A*b));O[R]={...C[R],growOffset:k,width:C[R].width+k},E-=k}C=O}return{sizedColumns:C,nonGrowWidth:P}},[r,e,f,x,a,i,o,s])}var Is,Tf;function rv(){if(Tf)return Is;Tf=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 Is=e,Is}var Ps,If;function iv(){if(If)return Ps;If=1;var e=rv(),t=Ku();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 Ps=n,Ps}var ov=iv();const pn=Gn(ov);var As,Pf;function av(){if(Pf)return As;Pf=1;var e="__lodash_hash_undefined__";function t(n){return this.__data__.set(n,e),this}return As=t,As}var Os,Af;function sv(){if(Af)return Os;Af=1;function e(t){return this.__data__.has(t)}return Os=e,Os}var Ds,Of;function Mp(){if(Of)return Ds;Of=1;var e=Wu(),t=av(),n=sv();function r(i){var o=-1,a=i==null?0:i.length;for(this.__data__=new e;++o<a;)this.add(i[o])}return r.prototype.add=r.prototype.push=t,r.prototype.has=n,Ds=r,Ds}var Fs,Df;function lv(){if(Df)return Fs;Df=1;function e(t,n,r,i){for(var o=t.length,a=r+(i?1:-1);i?a--:++a<o;)if(n(t[a],a,t))return a;return-1}return Fs=e,Fs}var zs,Ff;function uv(){if(Ff)return zs;Ff=1;function e(t){return t!==t}return zs=e,zs}var Ls,zf;function cv(){if(zf)return Ls;zf=1;function e(t,n,r){for(var i=r-1,o=t.length;++i<o;)if(t[i]===n)return i;return-1}return Ls=e,Ls}var Hs,Lf;function dv(){if(Lf)return Hs;Lf=1;var e=lv(),t=uv(),n=cv();function r(i,o,a){return o===o?n(i,o,a):e(i,t,a)}return Hs=r,Hs}var qs,Hf;function fv(){if(Hf)return qs;Hf=1;var e=dv();function t(n,r){var i=n==null?0:n.length;return!!i&&e(n,r,0)>-1}return qs=t,qs}var $s,qf;function hv(){if(qf)return $s;qf=1;function e(t,n,r){for(var i=-1,o=t==null?0:t.length;++i<o;)if(r(n,t[i]))return!0;return!1}return $s=e,$s}var Ns,$f;function Tp(){if($f)return Ns;$f=1;function e(t,n){return t.has(n)}return Ns=e,Ns}var Ws,Nf;function Ip(){if(Nf)return Ws;Nf=1;var e=pr(),t=kn(),n=e(t,"Set");return Ws=n,Ws}var Bs,Wf;function gv(){if(Wf)return Bs;Wf=1;function e(){}return Bs=e,Bs}var js,Bf;function rc(){if(Bf)return js;Bf=1;function e(t){var n=-1,r=Array(t.size);return t.forEach(function(i){r[++n]=i}),r}return js=e,js}var Us,jf;function pv(){if(jf)return Us;jf=1;var e=Ip(),t=gv(),n=rc(),r=1/0,i=e&&1/n(new e([,-0]))[1]==r?function(o){return new e(o)}:t;return Us=i,Us}var Ys,Uf;function mv(){if(Uf)return Ys;Uf=1;var e=Mp(),t=fv(),n=hv(),r=Tp(),i=pv(),o=rc(),a=200;function s(l,u,c){var d=-1,h=t,f=l.length,g=!0,m=[],x=m;if(c)g=!1,h=n;else if(f>=a){var _=u?null:i(l);if(_)return o(_);g=!1,h=r,x=new e}else x=u?[]:m;e:for(;++d<f;){var y=l[d],C=u?u(y):y;if(y=c||y!==0?y:0,g&&C===C){for(var P=x.length;P--;)if(x[P]===C)continue e;u&&x.push(C),m.push(y)}else h(x,C,c)||(x!==m&&x.push(C),m.push(y))}return m}return Ys=s,Ys}var Gs,Yf;function vv(){if(Yf)return Gs;Yf=1;var e=mv();function t(n){return n&&n.length?e(n):[]}return Gs=t,Gs}var yv=vv();const wv=Gn(yv);var Xs,Gf;function Pp(){if(Gf)return Xs;Gf=1;function e(t,n){for(var r=-1,i=n.length,o=t.length;++r<i;)t[o+r]=n[r];return t}return Xs=e,Xs}var Ks,Xf;function bv(){if(Xf)return Ks;Xf=1;var e=Oi(),t=Bu(),n=_n(),r=e?e.isConcatSpreadable:void 0;function i(o){return n(o)||t(o)||!!(r&&o&&o[r])}return Ks=i,Ks}var Vs,Kf;function Sv(){if(Kf)return Vs;Kf=1;var e=Pp(),t=bv();function n(r,i,o,a,s){var l=-1,u=r.length;for(o||(o=t),s||(s=[]);++l<u;){var c=r[l];i>0&&o(c)?i>1?n(c,i-1,o,a,s):e(s,c):a||(s[s.length]=c)}return s}return Vs=n,Vs}var Zs,Vf;function Cv(){if(Vf)return Zs;Vf=1;var e=Sv();function t(n){var r=n==null?0:n.length;return r?e(n,1):[]}return Zs=t,Zs}var xv=Cv();const Zf=Gn(xv);var Js,Jf;function _v(){if(Jf)return Js;Jf=1;var e=Math.ceil,t=Math.max;function n(r,i,o,a){for(var s=-1,l=t(e((i-r)/(o||1)),0),u=Array(l);l--;)u[a?l:++s]=r,r+=o;return u}return Js=n,Js}var Qs,Qf;function ic(){if(Qf)return Qs;Qf=1;var e=Wg(),t=Uu();function n(r){return r!=null&&t(r.length)&&!e(r)}return Qs=n,Qs}var el,eh;function kv(){if(eh)return el;eh=1;var e=$u(),t=ic(),n=ju(),r=gr();function i(o,a,s){if(!r(s))return!1;var l=typeof a;return(l=="number"?t(s)&&n(a,s.length):l=="string"&&a in s)?e(s[a],o):!1}return el=i,el}var tl,th;function Rv(){if(th)return tl;th=1;var e=Ku(),t=1/0,n=17976931348623157e292;function r(i){if(!i)return i===0?i:0;if(i=e(i),i===t||i===-t){var o=i<0?-1:1;return o*n}return i===i?i:0}return tl=r,tl}var nl,nh;function Ev(){if(nh)return nl;nh=1;var e=_v(),t=kv(),n=Rv();function r(i){return function(o,a,s){return s&&typeof s!="number"&&t(o,a,s)&&(a=s=void 0),o=n(o),a===void 0?(a=o,o=0):a=n(a),s=s===void 0?o<a?1:-1:n(s),e(o,a,s,i)}}return nl=r,nl}var rl,rh;function Mv(){if(rh)return rl;rh=1;var e=Ev(),t=e();return rl=t,rl}var Tv=Mv();const ur=Gn(Tv),lt='<svg width="20" height="20" fill="none" xmlns="http://www.w3.org/2000/svg">',Iv=e=>{const t=e.fgColor,n=e.bgColor;return`
94
+ ${lt}<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>`},Pv=e=>{const t=e.fgColor,n=e.bgColor;return`
95
+ ${lt}<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>`},Av=e=>{const t=e.fgColor,n=e.bgColor;return`${lt}
96
+ <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}"/>
97
+ <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}"/>
98
+ </svg>`},Ov=e=>{const t=e.fgColor,n=e.bgColor;return`${lt}
99
+ <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}"/>
100
+ <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}"/>
101
+ </svg>`},Dv=e=>{const t=e.fgColor,n=e.bgColor;return`${lt}
102
+ <path
103
+ 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"
104
+ fill="${n}"
105
+ />
106
+ <path
107
+ fill-rule="evenodd"
108
+ clip-rule="evenodd"
109
+ 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"
110
+ fill="${t}"
111
+ />
112
+ </svg>`},Ap=e=>{const t=e.fgColor,n=e.bgColor;return`${lt}
113
+ <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}"/>
114
+ <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}"/>
115
+ <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}"/>
116
+ </svg>
117
+ `},Fv=e=>{const t=e.bgColor;return`${lt}
118
+ <path stroke="${t}" stroke-width="2" d="M12 3v14"/>
119
+ <path stroke="${t}" stroke-width="2" stroke-linecap="round" d="M10 4h4m-4 12h4"/>
120
+ <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}"/>
121
+ </svg>
122
+ `},zv=Ap,Lv=e=>{const t=e.fgColor,n=e.bgColor;return`${lt}
123
+ <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}"/>
124
+ <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}"/>
125
+ </svg>`},Hv=e=>{const t=e.fgColor,n=e.bgColor;return`
126
+ ${lt}
127
+ <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}"/>
128
+ <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}"/>
129
+ <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}"/>
130
+ <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}"/>
131
+ <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}"/>
132
+ <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}"/>
133
+ <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}"/>
134
+ </svg>`},qv=e=>{const t=e.fgColor,n=e.bgColor;return`${lt}
135
+ <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}"/>
136
+ <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}"/>
137
+ <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}"/>
138
+ </svg>`},$v=e=>{const t=e.fgColor,n=e.bgColor;return`
139
+ ${lt}
140
+ <path fill="${t}" d="M3 3h14v14H3z"/>
141
+ <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}"/>
142
+ </svg>`},Nv=e=>{const t=e.fgColor,n=e.bgColor;return`
143
+ ${lt}
144
+ <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}"/>
145
+ <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}"/>
146
+ </svg>`},Wv=e=>{const t=e.fgColor,n=e.bgColor;return`${lt}
147
+ <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}"/>
148
+ <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}"/>
149
+ </svg>`},Bv=e=>{const t=e.fgColor,n=e.bgColor;return`
150
+ ${lt}
151
+ <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}"/>
152
+ <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}"/>
153
+ <path d="M10 7H9v3.93L12.5 13l.5-.8-3-1.76V7z" fill="${t}"/>
154
+ </svg>`},jv=e=>{const t=e.fgColor,n=e.bgColor;return`${lt}
155
+ <rect x="2" y="2" width="16" height="16" rx="2" fill="${n}"/>
156
+ <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}"/>
157
+ <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}"/>
158
+ </svg>`},Uv=e=>{const t=e.fgColor,n=e.bgColor;return`
159
+ ${lt}
160
+ <rect x="2" y="8" width="10" height="8" rx="2" fill="${n}"/>
161
+ <rect x="8" y="4" width="10" height="8" rx="2" fill="${n}"/>
162
+ <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}"/>
163
+ </svg>`},Yv=e=>{const t=e.fgColor,n=e.bgColor;return`${lt}
164
+ <path fill="${t}" d="M4 3h12v14H4z"/>
165
+ <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}"/>
166
+ </svg>`},Gv=e=>{const t=e.fgColor,n=e.bgColor;return`
167
+ ${lt}
168
+ <rect x="2" y="2" width="16" height="16" rx="2" fill="${n}"/>
169
+ <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}"/>
170
+ </svg>`},Xv=e=>{const t=e.fgColor,n=e.bgColor;return`
171
+ ${lt}
172
+ <rect x="2" y="2" width="16" height="16" rx="2" fill="${n}"/>
173
+ <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}"/>
174
+ </svg>`},Kv=e=>{const t=e.fgColor,n=e.bgColor;return`${lt}
175
+ <rect x="2" y="2" width="16" height="16" rx="2" fill="${n}"/>
176
+ <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}"/>
177
+ </svg>`},Vv=e=>{const t=e.fgColor,n=e.bgColor;return`${lt}
178
+ <rect x="2" y="2" width="16" height="16" rx="2" fill="${n}"/>
179
+ <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}"/>
180
+ <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}"/>
181
+ <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}"/>
182
+ <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}"/>
183
+ </svg>`},Zv=e=>{const t=e.fgColor,n=e.bgColor;return`
184
+ ${lt}
185
+ <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}"/>
186
+ <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}"/>
187
+ </svg>`},Jv=e=>{const t=e.fgColor,n=e.bgColor;return`${lt}
188
+ <rect x="2" y="2" width="16" height="16" rx="2" fill="${n}"/>
189
+ <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}"/>
190
+ </svg>`},Qv=e=>{const t=e.fgColor,n=e.bgColor;return`
191
+ ${lt}
192
+ <rect x="2" y="2" width="16" height="16" rx="2" fill="${n}"/>
193
+ <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}"/>
194
+ </svg>`},ey=e=>{const t=e.fgColor,n=e.bgColor;return`${lt}
195
+ <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}"/>
196
+ <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}"/>
197
+ <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}"/>
198
+ </svg>`},ty=e=>{const t=e.fgColor,n=e.bgColor;return`${lt}
199
+ <rect x="2" y="2" width="16" height="16" rx="2" fill="${n}"/>
200
+ <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}"/>
201
+ </svg>`},ny=e=>{const t=e.fgColor;return`
202
+ <svg width="18" height="18" fill="none" xmlns="http://www.w3.org/2000/svg">
203
+ <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"/>
204
+ </svg>`},ry=e=>{const t=e.fgColor;return`
205
+ <svg width="18" height="18" fill="none" xmlns="http://www.w3.org/2000/svg">
206
+ <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"/>
207
+ </svg>
208
+ `},iy={headerRowID:Iv,headerNumber:Av,headerCode:Pv,headerString:Ov,headerBoolean:Dv,headerAudioUri:zv,headerVideoUri:Lv,headerEmoji:Hv,headerImage:qv,headerUri:Ap,headerPhone:$v,headerMarkdown:Nv,headerDate:Wv,headerTime:Bv,headerEmail:jv,headerReference:Uv,headerIfThenElse:Yv,headerSingleValue:Gv,headerLookup:Xv,headerTextTemplate:Kv,headerMath:Vv,headerRollup:Zv,headerJoinStrings:Jv,headerSplitString:Qv,headerGeoDistance:ey,headerArray:ty,rowOwnerOverlay:ny,protectedColumnOverlay:ry,renameIcon:Fv};function oy(e,t){return e==="normal"?[t.bgIconHeader,t.fgIconHeader]:e==="selected"?["white",t.accentColor]:[t.accentColor,t.bgHeader]}class ay{onSettled;spriteMap=new Map;headerIcons;inFlight=0;constructor(t,n){this.onSettled=n,this.headerIcons=t??{}}drawSprite(t,n,r,i,o,a,s,l=1){const[u,c]=oy(n,s),d=a*Math.ceil(window.devicePixelRatio),h=`${u}_${c}_${d}_${t}`;let f=this.spriteMap.get(h);if(f===void 0){const g=this.headerIcons[t];if(g===void 0)return;f=document.createElement("canvas");const m=f.getContext("2d");if(m===null)return;const x=new Image;x.src=`data:image/svg+xml;charset=utf-8,${encodeURIComponent(g({fgColor:c,bgColor:u}))}`,this.spriteMap.set(h,f);const _=x.decode();if(_===void 0)return;this.inFlight++,_.then(()=>{m.drawImage(x,0,0,d,d)}).finally(()=>{this.inFlight--,this.inFlight===0&&this.onSettled()})}else l<1&&(r.globalAlpha=l),r.drawImage(f,0,0,d,d,i,o,a,a),l<1&&(r.globalAlpha=1)}}function Op(e){if(e.length===0)return;let t;for(const n of e)t=Math.min(t??n.y,n.y)}function $o(e,t,n,r,i,o,a,s,l){s=s??t;let u=t,c=e;const d=r-o;let h=!1;for(;u<n&&c<d;){const f=i(c);if(u+f>s&&l(u,c,f,!1,a&&c===r-1)===!0){h=!0;break}u+=f,c++}if(!h){u=n;for(let f=0;f<o;f++){c=r-1-f;const g=i(c);u-=g,l(u,c,g,!0,a&&c===r-1)}}}function Kn(e,t,n,r,i,o){let a=0,s=0;const l=i+r;for(const u of e){const c=u.sticky?s:a+n;if(o(u,c,l,u.sticky?0:s,t)===!0)break;a+=u.width,s+=u.sticky?u.width:0}}function Dp(e,t,n,r,i){let o=0,a=0;for(let s=0;s<e.length;s++){const l=e[s];let u=s+1,c=l.width;for(l.sticky&&(a+=c);u<e.length&&Ii(e[u].group,l.group)&&e[u].sticky===e[s].sticky;){const m=e[u];c+=m.width,u++,s++,m.sticky&&(a+=m.width)}const d=l.sticky?0:n,h=o+d,f=l.sticky?0:Math.max(0,a-h),g=Math.min(c-f,t-(h+f));i([l.sourceIndex,e[u-1].sourceIndex],l.group??"",h+f,0,g,r),o+=c}}function Fp(e,t,n,r,i,o,a){const[s,l]=e;let u,c;const d=a.find(h=>!h.sticky)?.sourceIndex??0;if(l>d){const h=Math.max(s,d);let f=t,g=r;for(let m=o.sourceIndex-1;m>=h;m--)f-=a[m].width,g+=a[m].width;for(let m=o.sourceIndex+1;m<=l;m++)g+=a[m].width;c={x:f,y:n,width:g,height:i}}if(d>s){const h=Math.min(l,d-1);let f=t,g=r;for(let m=o.sourceIndex-1;m>=s;m--)f-=a[m].width,g+=a[m].width;for(let m=o.sourceIndex+1;m<=h;m++)g+=a[m].width;u={x:f,y:n,width:g,height:i}}return[u,c]}function sy(e,t,n,r){if(r==="any")return zp(e,{x:t,y:n,width:1,height:1});if(r==="vertical"&&(t=e.x),r==="horizontal"&&(n=e.y),pp([t,n],e))return;const i=t-e.x,o=e.x+e.width-t,a=n-e.y+1,s=e.y+e.height-n,l=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:s);return l===s?{x:e.x,y:e.y+e.height,width:e.width,height:n-e.y-e.height+1}:l===a?{x:e.x,y:n,width:e.width,height:e.y-n}:l===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 Ro(e,t,n,r,i,o,a,s){return e<=i+a&&i<=e+n&&t<=o+s&&o<=t+r}function No(e,t,n){return t>=e.x&&t<=e.x+e.width&&n>=e.y&&n<=e.y+e.height}function zp(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 ly(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 uy(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,s=n+4,l=i-e.x,u=e.x+e.width-a,c=o-e.y,d=e.y+e.height-s,h=l>0?e.x+Math.floor(l/r)*r:e.x,f=u>0?e.x+e.width-Math.floor(u/r)*r:e.x+e.width,g=c>0?e.y+Math.floor(c/r)*r:e.y,m=d>0?e.y+e.height-Math.floor(d/r)*r:e.y+e.height;return{x:h,y:g,width:f-h,height:m-g}}function cy(e,t,n,r,i){const[o,a,s,l]=t,[u,c,d,h]=i,{x:f,y:g,width:m,height:x}=e,_=[];if(m<=0||x<=0)return _;const y=f+m,C=g+x,P=f<o,S=g<a,T=f+m>s,O=g+x>l,A=f>=o&&f<s||y>o&&y<=s||f<o&&y>s,E=g>=a&&g<l||C>a&&C<=l||g<a&&C>l;if(A&&E){const R=Math.max(f,o),b=Math.max(g,a),k=Math.min(y,s),I=Math.min(C,l);_.push({rect:{x:R,y:b,width:k-R,height:I-b},clip:{x:u,y:c,width:d-u+1,height:h-c+1}})}if(P&&S){const R=f,b=g,k=Math.min(y,o),I=Math.min(C,a);_.push({rect:{x:R,y:b,width:k-R,height:I-b},clip:{x:0,y:0,width:u+1,height:c+1}})}if(S&&A){const R=Math.max(f,o),b=g,k=Math.min(y,s),I=Math.min(C,a);_.push({rect:{x:R,y:b,width:k-R,height:I-b},clip:{x:u,y:0,width:d-u+1,height:c+1}})}if(S&&T){const R=Math.max(f,s),b=g,k=y,I=Math.min(C,a);_.push({rect:{x:R,y:b,width:k-R,height:I-b},clip:{x:d,y:0,width:n-d+1,height:c+1}})}if(P&&E){const R=f,b=Math.max(g,a),k=Math.min(y,o),I=Math.min(C,l);_.push({rect:{x:R,y:b,width:k-R,height:I-b},clip:{x:0,y:c,width:u+1,height:h-c+1}})}if(T&&E){const R=Math.max(f,s),b=Math.max(g,a),k=y,I=Math.min(C,l);_.push({rect:{x:R,y:b,width:k-R,height:I-b},clip:{x:d,y:c,width:n-d+1,height:h-c+1}})}if(P&&O){const R=f,b=Math.max(g,l),k=Math.min(y,o),I=C;_.push({rect:{x:R,y:b,width:k-R,height:I-b},clip:{x:0,y:h,width:u+1,height:r-h+1}})}if(O&&A){const R=Math.max(f,o),b=Math.max(g,l),k=Math.min(y,s),I=C;_.push({rect:{x:R,y:b,width:k-R,height:I-b},clip:{x:u,y:h,width:d-u+1,height:r-h+1}})}if(T&&O){const R=Math.max(f,s),b=Math.max(g,l),k=y,I=C;_.push({rect:{x:R,y:b,width:k-R,height:I-b},clip:{x:d,y:h,width:n-d+1,height:r-h+1}})}return _}const dy={kind:ue.Loading,allowOverlay:!1};function ih(e,t,n,r,i,o,a,s,l,u,c,d,h,f,g,m,x,_,y,C,P,S,T,O,A,E,L,R,b,k,I,w,N,B,G){let ce=C?.size??Number.MAX_SAFE_INTEGER;const z=performance.now();let M=k.baseFontFull;e.font=M;const $={ctx:e},W=[0,0],K=x>0?vr(l,x,u):0;let J,oe;const ne=Op(y);return Kn(t,s,o,a,i,(ie,de,me,xe,ee)=>{const Pe=Math.max(0,xe-de),Ge=de+Pe,Ze=i+1,Ct=ie.width-Pe,Se=r-i-1;if(y.length>0){let Je=!1;for(let Ke=0;Ke<y.length;Ke++){const Ce=y[Ke];if(Ro(Ge,Ze,Ct,Se,Ce.x,Ce.y,Ce.width,Ce.height)){Je=!0;break}}if(!Je)return}const ge=()=>{e.save(),e.beginPath(),e.rect(Ge,Ze,Ct,Se),e.clip()},Ne=P.columns.hasIndex(ie.sourceIndex),Re=d(ie.group??"").overrideTheme,We=ie.themeOverride===void 0&&Re===void 0?k:jn(k,Re,ie.themeOverride),Fe=We.baseFontFull;Fe!==M&&(M=Fe,e.font=Fe),ge();let ot;return $o(ee,me,r,l,u,x,_,ne,(Je,Ke,Ce,at,$e)=>{if(Ke<0||(W[0]=ie.sourceIndex,W[1]=Ke,C!==void 0&&!C.has(W)))return;if(y.length>0){let Ee=!1;for(let ct=0;ct<y.length;ct++){const st=y[ct];if(Ro(de,Je,ie.width,Ce,st.x,st.y,st.width,st.height)){Ee=!0;break}}if(!Ee)return}const Ae=P.rows.hasIndex(Ke),xt=f.hasIndex(Ke),Ve=Ke<l?c(W):dy;let Be=de,je=ie.width,wt=!1,At=!1;if(Ve.span!==void 0){const[Ee,ct]=Ve.span,st=`${Ke},${Ee},${ct},${ie.sticky}`;if(oe===void 0&&(oe=new Set),oe.has(st)){ce--;return}else{const vn=Fp(Ve.span,de,Je,ie.width,Ce,ie,n),Dt=ie.sticky?vn[0]:vn[1];if(!ie.sticky&&vn[0]!==void 0&&(At=!0),Dt!==void 0){Be=Dt.x,je=Dt.width,oe.add(st),e.restore(),ot=void 0,e.save(),e.beginPath();const on=Math.max(0,xe-Dt.x);e.rect(Dt.x+on,Je,Dt.width-on,Ce),J===void 0&&(J=[]),J.push({x:Dt.x+on,y:Je,width:Dt.width-on,height:Ce}),e.clip(),wt=!0}}}const rn=h?.(Ke),un=$e&&ie.trailingRowOptions?.themeOverride!==void 0?ie.trailingRowOptions?.themeOverride:void 0,_t=Ve.themeOverride===void 0&&rn===void 0&&un===void 0?We:jn(We,rn,un,Ve.themeOverride);e.beginPath();const Yt=N1(W,Ve,P);let Lt=W1(W,Ve,P,m);const En=Ve.span!==void 0&&P.columns.some(Ee=>Ve.span!==void 0&&Ee>=Ve.span[0]&&Ee<=Ve.span[1]);Yt&&!g&&m?Lt=0:Yt&&m&&(Lt=Math.max(Lt,1)),En&&Lt++,Yt||(Ae&&Lt++,Ne&&!$e&&Lt++);const Mn=Ve.kind===ue.Protected?_t.bgCellMedium:_t.bgCell;let ut;if((at||Mn!==k.bgCell)&&(ut=tn(Mn,ut)),Lt>0||xt){xt&&(ut=tn(_t.bgHeader,ut));for(let Ee=0;Ee<Lt;Ee++)ut=tn(_t.accentLight,ut)}else if(S!==void 0){for(const Ee of S)if(Ee[0]===ie.sourceIndex&&Ee[1]===Ke){ut=tn(_t.bgSearchResult,ut);break}}if(T!==void 0)for(let Ee=0;Ee<T.length;Ee++){const ct=T[Ee],st=ct.range;ct.style!=="solid-outline"&&st.x<=ie.sourceIndex&&ie.sourceIndex<st.x+st.width&&st.y<=Ke&&Ke<st.y+st.height&&(ut=tn(ct.color,ut))}let Xe=!1;if(C!==void 0){const Ee=Je+1,st=(at?Ee+Ce-1:Math.min(Ee+Ce-1,r-K))-Ee;(st!==Ce-1||Be+1<=xe)&&(Xe=!0,e.save(),e.beginPath(),e.rect(Be+1,Ee,je-1,st),e.clip()),ut=ut===void 0?_t.bgCell:tn(ut,_t.bgCell)}const pt=ie.sourceIndex===n.length-1,Gt=Ke===l-1;ut!==void 0&&(e.fillStyle=ut,ot!==void 0&&(ot.fillStyle=ut),C!==void 0?e.fillRect(Be+1,Je+1,je-(pt?2:1),Ce-(Gt?2:1)):e.fillRect(Be,Je,je,Ce)),Ve.style==="faded"&&(e.globalAlpha=.6);let Ot;for(let Ee=0;Ee<E.length;Ee++){const ct=E[Ee];if(ct.item[0]===ie.sourceIndex&&ct.item[1]===Ke){Ot=ct;break}}if(je>G&&!At){const Ee=_t.baseFontFull;Ee!==M&&(e.font=Ee,M=Ee),ot=Lp(e,Ve,ie.sourceIndex,Ke,pt,Gt,Be,Je,je,Ce,Lt>0,_t,ut??_t.bgCell,O,A,Ot?.hoverAmount??0,L,b,z,R,ot,I,w,N,B)}return Xe&&e.restore(),Ve.style==="faded"&&(e.globalAlpha=1),ce--,wt&&(e.restore(),ot?.deprep?.($),ot=void 0,ge(),M=Fe,e.font=Fe),ce<=0}),e.restore(),ce<=0}),J}const wi=[0,0],bi={x:0,y:0,width:0,height:0},il=[void 0,()=>{}];let Mu=!1;function fy(){Mu=!0}function Lp(e,t,n,r,i,o,a,s,l,u,c,d,h,f,g,m,x,_,y,C,P,S,T,O,A){let E,L;x!==void 0&&x[0][0]===n&&x[0][1]===r&&(E=x[1][0],L=x[1][1]);let R;wi[0]=n,wi[1]=r,bi.x=a,bi.y=s,bi.width=l,bi.height=u,il[0]=T.getValue(wi),il[1]=w=>T.setValue(wi,w),Mu=!1;const b={ctx:e,theme:d,col:n,row:r,cell:t,rect:bi,highlighted:c,cellFillColor:h,hoverAmount:m,frameTime:y,hoverX:E,drawState:il,hoverY:L,imageLoader:f,spriteManager:g,hyperWrapping:_,overrideCursor:E!==void 0?A:void 0,requestAnimationFrame:fy},k=K1(b,t.lastUpdated,y,P,i,o),I=O(t);if(I!==void 0){P?.renderer!==I&&(P?.deprep?.(b),P=void 0);const w=I.drawPrep?.(b,P);C!==void 0&&!cr(b.cell)?C(b,()=>I.draw(b,t)):I.draw(b,t),R=w===void 0?void 0:{deprep:w?.deprep,fillStyle:w?.fillStyle,font:w?.font,renderer:I}}return(k||Mu)&&S?.(wi),R}function oc(e,t,n,r,i,o,a,s,l=-20,u=-20,c=32,d="center",h="square"){const f=Math.floor(i+a/2),g=h==="circle"?1e4:t.roundingRadius??4;let m=op(c,a,t.cellVerticalPadding),x=m/2;const _=ip(d,r,o,t.cellHorizontalPadding,m),y=rp(_,f,m),C=ap(r+l,i+u,y);switch(n){case!0:{e.beginPath(),xn(e,_-m/2,f-m/2,m,m,g),h==="circle"&&(x*=.8,m*=.8),e.fillStyle=s?t.accentColor:t.textMedium,e.fill(),e.beginPath(),e.moveTo(_-x+m/4.23,f-x+m/1.97),e.lineTo(_-x+m/2.42,f-x+m/1.44),e.lineTo(_-x+m/1.29,f-x+m/3.25),e.strokeStyle=t.bgCell,e.lineJoin="round",e.lineCap="round",e.lineWidth=1.9,e.stroke();break}case xo:case!1:{e.beginPath(),xn(e,_-m/2+.5,f-m/2+.5,m-1,m-1,g),e.lineWidth=1,e.strokeStyle=C?t.textDark:t.textMedium,e.stroke();break}case Yu:{e.beginPath(),xn(e,_-m/2,f-m/2,m,m,g),e.fillStyle=C?t.textMedium:t.textLight,e.fill(),h==="circle"&&(x*=.8,m*=.8),e.beginPath(),e.moveTo(_-m/3,f),e.lineTo(_+m/3,f),e.strokeStyle=t.bgCell,e.lineCap="round",e.lineWidth=1.9,e.stroke();break}default:Ti()}}function hy(e,t,n,r,i,o,a,s,l,u,c,d,h,f,g,m,x,_,y){const C=a+s;if(C<=0)return;e.fillStyle=d.bgHeader,e.fillRect(0,0,i,C);const[P,S]=r?.[0]??[],T=d.headerFontFull;e.font=T,Kn(t,0,o,0,C,(O,A,E,L)=>{if(x!==void 0&&!x.has([O.sourceIndex,-1]))return;const R=Math.max(0,L-A);e.save(),e.beginPath(),e.rect(A+R,s,O.width-R,a),e.clip();const b=m(O.group??"").overrideTheme,k=O.themeOverride===void 0&&b===void 0?d:jn(d,b,O.themeOverride);k.bgHeader!==d.bgHeader&&(e.fillStyle=k.bgHeader,e.fill()),k!==d&&(e.font=k.baseFontFull);const I=c.columns.hasIndex(O.sourceIndex),w=l!==void 0||u,N=!w&&S===-1&&P===O.sourceIndex,B=w?0:f.find($=>$.item[0]===O.sourceIndex&&$.item[1]===-1)?.hoverAmount??0,G=c?.current!==void 0&&c.current.cell[0]===O.sourceIndex,ce=I?k.accentColor:G?k.bgHeaderHasFocus:k.bgHeader,z=n?s:0,M=O.sourceIndex===0?0:1;I?(e.fillStyle=ce,e.fillRect(A+M,z,O.width-M,a)):(G||B>0)&&(e.beginPath(),e.rect(A+M,z,O.width-M,a),G&&(e.fillStyle=k.bgHeaderHasFocus,e.fill()),B>0&&(e.globalAlpha=B,e.fillStyle=k.bgHeaderHovered,e.fill(),e.globalAlpha=1)),$p(e,A,z,O.width,a,O,I,k,N,G,B,h,_,y),e.restore()}),n&&gy(e,t,i,o,s,r,d,h,f,g,m,x)}function gy(e,t,n,r,i,o,a,s,l,u,c,d){const[f,g]=o?.[0]??[];let m=0;Dp(t,n,r,i,(x,_,y,C,P,S)=>{if(d!==void 0&&!d.hasItemInRectangle({x:x[0],y:-2,width:x[1]-x[0]+1,height:1}))return;e.save(),e.beginPath(),e.rect(y,C,P,S),e.clip();const T=c(_),O=T?.overrideTheme===void 0?a:jn(a,T.overrideTheme),A=g===-2&&f!==void 0&&f>=x[0]&&f<=x[1],E=A?O.bgHeaderHovered:O.bgHeader;if(E!==a.bgHeader&&(e.fillStyle=E,e.fill()),e.fillStyle=O.textGroupHeader??O.textHeader,T!==void 0){let L=y;if(T.icon!==void 0&&(s.drawSprite(T.icon,"normal",e,L+8,(i-20)/2,20,O),L+=26),e.fillText(T.name,L+8,i/2+Xn(e,a.headerFontFull)),T.actions!==void 0&&A){const R=qp({x:y,y:C,width:P,height:S},T.actions);e.beginPath();const b=R[0].x-10,k=y+P-b;e.rect(b,0,k,i);const I=e.createLinearGradient(b,0,b+k,0),w=dr(E,0);I.addColorStop(0,w),I.addColorStop(10/k,E),I.addColorStop(1,E),e.fillStyle=I,e.fill(),e.globalAlpha=.6;const[N,B]=o?.[1]??[-1,-1];for(let G=0;G<T.actions.length;G++){const ce=T.actions[G],z=R[G],M=No(z,N+y,B);M&&(e.globalAlpha=1),s.drawSprite(ce.icon,"normal",e,z.x+z.width/2-10,z.y+z.height/2-10,20,O),M&&(e.globalAlpha=.6)}e.globalAlpha=1}}y!==0&&u(x[0])&&(e.beginPath(),e.moveTo(y+.5,0),e.lineTo(y+.5,i),e.strokeStyle=a.borderColor,e.lineWidth=1,e.stroke()),e.restore(),m=y+P}),e.beginPath(),e.moveTo(m+.5,0),e.lineTo(m+.5,i),e.moveTo(0,i+.5),e.lineTo(n,i+.5),e.strokeStyle=a.borderColor,e.lineWidth=1,e.stroke()}const Nr=30;function Hp(e,t,n,r,i){return i?{x:e,y:t,width:Nr,height:Math.min(Nr,r)}:{x:e+n-Nr,y:Math.max(t,t+r/2-Nr/2),width:Nr,height:Math.min(Nr,r)}}function qp(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 s=0;s<t.length;s++)n.push({x:r,y:i,width:a,height:o}),r+=26;return n}function oh(e,t,n,r,i,o,a,s,l,u,c,d,h,f){if(o.rowMarker!==void 0){const C=o.rowMarkerChecked;C!==!0&&(e.globalAlpha=u),oc(e,s,C,t,n,r,i,!1,void 0,void 0,18,"center",o.rowMarker),C!==!0&&(e.globalAlpha=1);return}const g=s.cellHorizontalPadding,m=a?s.textHeaderSelected:s.textHeader,x=o.hasMenu===!0&&(l||d&&a),_=h?-1:1;let y=h?t+r-g:t+g;if(o.icon!==void 0){let C=a?"selected":"normal";o.style==="highlight"&&(C=a?"selected":"special");const P=s.headerIconSize;c.drawSprite(o.icon,C,e,h?y-P:y,n+(i-P)/2,P,s),o.overlayIcon!==void 0&&c.drawSprite(o.overlayIcon,a?"selected":"special",e,h?y-P+9:y+9,n+((i-18)/2+6),18,s),y+=Math.ceil(P*1.3)*_}if(x&&o.hasMenu===!0&&r>35){const P=h?35:r-35,S=h?35*.7:r-35*.7,T=P/r,O=S/r,A=e.createLinearGradient(t,0,t+r,0),E=dr(m,0);A.addColorStop(h?1:0,m),A.addColorStop(T,m),A.addColorStop(O,E),A.addColorStop(h?0:1,E),e.fillStyle=A}else e.fillStyle=m;if(h&&(e.textAlign="right"),e.fillText(o.title,y,n+i/2+Xn(e,s.headerFontFull)),h&&(e.textAlign="left"),x&&o.hasMenu===!0)if(o.menuIcon===void 0||o.menuIcon===_o.Triangle){e.beginPath();const C=f.x+f.width/2-5.5,P=f.y+f.height/2-3;Q1(e,[{x:C,y:P},{x:C+11,y:P},{x:C+5.5,y:P+6}],1),e.fillStyle=m,e.fill()}else if(o.menuIcon===_o.Dots){e.beginPath();const C=f.x+f.width/2,P=f.y+f.height/2;J1(e,C,P),e.fillStyle=m,e.fill()}else{const C=f.x+(f.width-s.headerIconSize)/2,P=f.y+(f.height-s.headerIconSize)/2;c.drawSprite(o.menuIcon,"normal",e,C,P,s.headerIconSize,s)}}function $p(e,t,n,r,i,o,a,s,l,u,c,d,h,f){const g=Zu(o.title)==="rtl",m=Hp(t,n,r,i,g);h!==void 0?h({ctx:e,theme:s,rect:{x:t,y:n,width:r,height:i},column:o,columnIndex:o.sourceIndex,isSelected:a,hoverAmount:c,isHovered:l,hasSelectedCell:u,spriteManager:d,menuBounds:m},()=>oh(e,t,n,r,i,o,a,s,l,c,d,f,g,m)):oh(e,t,n,r,i,o,a,s,l,c,d,f,g,m)}var ol,ah;function py(){if(ah)return ol;ah=1;var e=pr(),t=(function(){try{var n=e(Object,"defineProperty");return n({},"",{}),n}catch{}})();return ol=t,ol}var al,sh;function my(){if(sh)return al;sh=1;var e=py();function t(n,r,i){r=="__proto__"&&e?e(n,r,{configurable:!0,enumerable:!0,value:i,writable:!0}):n[r]=i}return al=t,al}var sl,lh;function vy(){if(lh)return sl;lh=1;function e(t,n,r,i){for(var o=-1,a=t==null?0:t.length;++o<a;){var s=t[o];n(i,s,r(s),t)}return i}return sl=e,sl}var ll,uh;function yy(){if(uh)return ll;uh=1;function e(t){return function(n,r,i){for(var o=-1,a=Object(n),s=i(n),l=s.length;l--;){var u=s[t?l:++o];if(r(a[u],u,a)===!1)break}return n}}return ll=e,ll}var ul,ch;function wy(){if(ch)return ul;ch=1;var e=yy(),t=e();return ul=t,ul}var cl,dh;function by(){if(dh)return cl;dh=1;function e(t,n){for(var r=-1,i=Array(t);++r<t;)i[r]=n(r);return i}return cl=e,cl}var xi={exports:{}},dl,fh;function Sy(){if(fh)return dl;fh=1;function e(){return!1}return dl=e,dl}xi.exports;var hh;function Np(){return hh||(hh=1,(function(e,t){var n=kn(),r=Sy(),i=t&&!t.nodeType&&t,o=i&&!0&&e&&!e.nodeType&&e,a=o&&o.exports===i,s=a?n.Buffer:void 0,l=s?s.isBuffer:void 0,u=l||r;e.exports=u})(xi,xi.exports)),xi.exports}var fl,gh;function Cy(){if(gh)return fl;gh=1;var e=Di(),t=Uu(),n=Fi(),r="[object Arguments]",i="[object Array]",o="[object Boolean]",a="[object Date]",s="[object Error]",l="[object Function]",u="[object Map]",c="[object Number]",d="[object Object]",h="[object RegExp]",f="[object Set]",g="[object String]",m="[object WeakMap]",x="[object ArrayBuffer]",_="[object DataView]",y="[object Float32Array]",C="[object Float64Array]",P="[object Int8Array]",S="[object Int16Array]",T="[object Int32Array]",O="[object Uint8Array]",A="[object Uint8ClampedArray]",E="[object Uint16Array]",L="[object Uint32Array]",R={};R[y]=R[C]=R[P]=R[S]=R[T]=R[O]=R[A]=R[E]=R[L]=!0,R[r]=R[i]=R[x]=R[o]=R[_]=R[a]=R[s]=R[l]=R[u]=R[c]=R[d]=R[h]=R[f]=R[g]=R[m]=!1;function b(k){return n(k)&&t(k.length)&&!!R[e(k)]}return fl=b,fl}var hl,ph;function xy(){if(ph)return hl;ph=1;function e(t){return function(n){return t(n)}}return hl=e,hl}var _i={exports:{}};_i.exports;var mh;function _y(){return mh||(mh=1,(function(e,t){var n=Ng(),r=t&&!t.nodeType&&t,i=r&&!0&&e&&!e.nodeType&&e,o=i&&i.exports===r,a=o&&n.process,s=(function(){try{var l=i&&i.require&&i.require("util").types;return l||a&&a.binding&&a.binding("util")}catch{}})();e.exports=s})(_i,_i.exports)),_i.exports}var gl,vh;function Wp(){if(vh)return gl;vh=1;var e=Cy(),t=xy(),n=_y(),r=n&&n.isTypedArray,i=r?t(r):e;return gl=i,gl}var pl,yh;function ky(){if(yh)return pl;yh=1;var e=by(),t=Bu(),n=_n(),r=Np(),i=ju(),o=Wp(),a=Object.prototype,s=a.hasOwnProperty;function l(u,c){var d=n(u),h=!d&&t(u),f=!d&&!h&&r(u),g=!d&&!h&&!f&&o(u),m=d||h||f||g,x=m?e(u.length,String):[],_=x.length;for(var y in u)(c||s.call(u,y))&&!(m&&(y=="length"||f&&(y=="offset"||y=="parent")||g&&(y=="buffer"||y=="byteLength"||y=="byteOffset")||i(y,_)))&&x.push(y);return x}return pl=l,pl}var ml,wh;function Ry(){if(wh)return ml;wh=1;var e=Object.prototype;function t(n){var r=n&&n.constructor,i=typeof r=="function"&&r.prototype||e;return n===i}return ml=t,ml}var vl,bh;function Ey(){if(bh)return vl;bh=1;function e(t,n){return function(r){return t(n(r))}}return vl=e,vl}var yl,Sh;function My(){if(Sh)return yl;Sh=1;var e=Ey(),t=e(Object.keys,Object);return yl=t,yl}var wl,Ch;function Ty(){if(Ch)return wl;Ch=1;var e=Ry(),t=My(),n=Object.prototype,r=n.hasOwnProperty;function i(o){if(!e(o))return t(o);var a=[];for(var s in Object(o))r.call(o,s)&&s!="constructor"&&a.push(s);return a}return wl=i,wl}var bl,xh;function ac(){if(xh)return bl;xh=1;var e=ky(),t=Ty(),n=ic();function r(i){return n(i)?e(i):t(i)}return bl=r,bl}var Sl,_h;function Iy(){if(_h)return Sl;_h=1;var e=wy(),t=ac();function n(r,i){return r&&e(r,i,t)}return Sl=n,Sl}var Cl,kh;function Py(){if(kh)return Cl;kh=1;var e=ic();function t(n,r){return function(i,o){if(i==null)return i;if(!e(i))return n(i,o);for(var a=i.length,s=r?a:-1,l=Object(i);(r?s--:++s<a)&&o(l[s],s,l)!==!1;);return i}}return Cl=t,Cl}var xl,Rh;function Ay(){if(Rh)return xl;Rh=1;var e=Iy(),t=Py(),n=t(e);return xl=n,xl}var _l,Eh;function Oy(){if(Eh)return _l;Eh=1;var e=Ay();function t(n,r,i,o){return e(n,function(a,s,l){r(o,a,i(a),l)}),o}return _l=t,_l}var kl,Mh;function Dy(){if(Mh)return kl;Mh=1;var e=zo();function t(){this.__data__=new e,this.size=0}return kl=t,kl}var Rl,Th;function Fy(){if(Th)return Rl;Th=1;function e(t){var n=this.__data__,r=n.delete(t);return this.size=n.size,r}return Rl=e,Rl}var El,Ih;function zy(){if(Ih)return El;Ih=1;function e(t){return this.__data__.get(t)}return El=e,El}var Ml,Ph;function Ly(){if(Ph)return Ml;Ph=1;function e(t){return this.__data__.has(t)}return Ml=e,Ml}var Tl,Ah;function Hy(){if(Ah)return Tl;Ah=1;var e=zo(),t=Nu(),n=Wu(),r=200;function i(o,a){var s=this.__data__;if(s instanceof e){var l=s.__data__;if(!t||l.length<r-1)return l.push([o,a]),this.size=++s.size,this;s=this.__data__=new n(l)}return s.set(o,a),this.size=s.size,this}return Tl=i,Tl}var Il,Oh;function Bp(){if(Oh)return Il;Oh=1;var e=zo(),t=Dy(),n=Fy(),r=zy(),i=Ly(),o=Hy();function a(s){var l=this.__data__=new e(s);this.size=l.size}return a.prototype.clear=t,a.prototype.delete=n,a.prototype.get=r,a.prototype.has=i,a.prototype.set=o,Il=a,Il}var Pl,Dh;function qy(){if(Dh)return Pl;Dh=1;function e(t,n){for(var r=-1,i=t==null?0:t.length;++r<i;)if(n(t[r],r,t))return!0;return!1}return Pl=e,Pl}var Al,Fh;function jp(){if(Fh)return Al;Fh=1;var e=Mp(),t=qy(),n=Tp(),r=1,i=2;function o(a,s,l,u,c,d){var h=l&r,f=a.length,g=s.length;if(f!=g&&!(h&&g>f))return!1;var m=d.get(a),x=d.get(s);if(m&&x)return m==s&&x==a;var _=-1,y=!0,C=l&i?new e:void 0;for(d.set(a,s),d.set(s,a);++_<f;){var P=a[_],S=s[_];if(u)var T=h?u(S,P,_,s,a,d):u(P,S,_,a,s,d);if(T!==void 0){if(T)continue;y=!1;break}if(C){if(!t(s,function(O,A){if(!n(C,A)&&(P===O||c(P,O,l,u,d)))return C.push(A)})){y=!1;break}}else if(!(P===S||c(P,S,l,u,d))){y=!1;break}}return d.delete(a),d.delete(s),y}return Al=o,Al}var Ol,zh;function $y(){if(zh)return Ol;zh=1;var e=kn(),t=e.Uint8Array;return Ol=t,Ol}var Dl,Lh;function Ny(){if(Lh)return Dl;Lh=1;function e(t){var n=-1,r=Array(t.size);return t.forEach(function(i,o){r[++n]=[o,i]}),r}return Dl=e,Dl}var Fl,Hh;function Wy(){if(Hh)return Fl;Hh=1;var e=Oi(),t=$y(),n=$u(),r=jp(),i=Ny(),o=rc(),a=1,s=2,l="[object Boolean]",u="[object Date]",c="[object Error]",d="[object Map]",h="[object Number]",f="[object RegExp]",g="[object Set]",m="[object String]",x="[object Symbol]",_="[object ArrayBuffer]",y="[object DataView]",C=e?e.prototype:void 0,P=C?C.valueOf:void 0;function S(T,O,A,E,L,R,b){switch(A){case y:if(T.byteLength!=O.byteLength||T.byteOffset!=O.byteOffset)return!1;T=T.buffer,O=O.buffer;case _:return!(T.byteLength!=O.byteLength||!R(new t(T),new t(O)));case l:case u:case h:return n(+T,+O);case c:return T.name==O.name&&T.message==O.message;case f:case m:return T==O+"";case d:var k=i;case g:var I=E&a;if(k||(k=o),T.size!=O.size&&!I)return!1;var w=b.get(T);if(w)return w==O;E|=s,b.set(T,O);var N=r(k(T),k(O),E,L,R,b);return b.delete(T),N;case x:if(P)return P.call(T)==P.call(O)}return!1}return Fl=S,Fl}var zl,qh;function By(){if(qh)return zl;qh=1;var e=Pp(),t=_n();function n(r,i,o){var a=i(r);return t(r)?a:e(a,o(r))}return zl=n,zl}var Ll,$h;function jy(){if($h)return Ll;$h=1;function e(t,n){for(var r=-1,i=t==null?0:t.length,o=0,a=[];++r<i;){var s=t[r];n(s,r,t)&&(a[o++]=s)}return a}return Ll=e,Ll}var Hl,Nh;function Uy(){if(Nh)return Hl;Nh=1;function e(){return[]}return Hl=e,Hl}var ql,Wh;function Yy(){if(Wh)return ql;Wh=1;var e=jy(),t=Uy(),n=Object.prototype,r=n.propertyIsEnumerable,i=Object.getOwnPropertySymbols,o=i?function(a){return a==null?[]:(a=Object(a),e(i(a),function(s){return r.call(a,s)}))}:t;return ql=o,ql}var $l,Bh;function Gy(){if(Bh)return $l;Bh=1;var e=By(),t=Yy(),n=ac();function r(i){return e(i,n,t)}return $l=r,$l}var Nl,jh;function Xy(){if(jh)return Nl;jh=1;var e=Gy(),t=1,n=Object.prototype,r=n.hasOwnProperty;function i(o,a,s,l,u,c){var d=s&t,h=e(o),f=h.length,g=e(a),m=g.length;if(f!=m&&!d)return!1;for(var x=f;x--;){var _=h[x];if(!(d?_ in a:r.call(a,_)))return!1}var y=c.get(o),C=c.get(a);if(y&&C)return y==a&&C==o;var P=!0;c.set(o,a),c.set(a,o);for(var S=d;++x<f;){_=h[x];var T=o[_],O=a[_];if(l)var A=d?l(O,T,_,a,o,c):l(T,O,_,o,a,c);if(!(A===void 0?T===O||u(T,O,s,l,c):A)){P=!1;break}S||(S=_=="constructor")}if(P&&!S){var E=o.constructor,L=a.constructor;E!=L&&"constructor"in o&&"constructor"in a&&!(typeof E=="function"&&E instanceof E&&typeof L=="function"&&L instanceof L)&&(P=!1)}return c.delete(o),c.delete(a),P}return Nl=i,Nl}var Wl,Uh;function Ky(){if(Uh)return Wl;Uh=1;var e=pr(),t=kn(),n=e(t,"DataView");return Wl=n,Wl}var Bl,Yh;function Vy(){if(Yh)return Bl;Yh=1;var e=pr(),t=kn(),n=e(t,"Promise");return Bl=n,Bl}var jl,Gh;function Zy(){if(Gh)return jl;Gh=1;var e=pr(),t=kn(),n=e(t,"WeakMap");return jl=n,jl}var Ul,Xh;function Jy(){if(Xh)return Ul;Xh=1;var e=Ky(),t=Nu(),n=Vy(),r=Ip(),i=Zy(),o=Di(),a=Bg(),s="[object Map]",l="[object Object]",u="[object Promise]",c="[object Set]",d="[object WeakMap]",h="[object DataView]",f=a(e),g=a(t),m=a(n),x=a(r),_=a(i),y=o;return(e&&y(new e(new ArrayBuffer(1)))!=h||t&&y(new t)!=s||n&&y(n.resolve())!=u||r&&y(new r)!=c||i&&y(new i)!=d)&&(y=function(C){var P=o(C),S=P==l?C.constructor:void 0,T=S?a(S):"";if(T)switch(T){case f:return h;case g:return s;case m:return u;case x:return c;case _:return d}return P}),Ul=y,Ul}var Yl,Kh;function Qy(){if(Kh)return Yl;Kh=1;var e=Bp(),t=jp(),n=Wy(),r=Xy(),i=Jy(),o=_n(),a=Np(),s=Wp(),l=1,u="[object Arguments]",c="[object Array]",d="[object Object]",h=Object.prototype,f=h.hasOwnProperty;function g(m,x,_,y,C,P){var S=o(m),T=o(x),O=S?c:i(m),A=T?c:i(x);O=O==u?d:O,A=A==u?d:A;var E=O==d,L=A==d,R=O==A;if(R&&a(m)){if(!a(x))return!1;S=!0,E=!1}if(R&&!E)return P||(P=new e),S||s(m)?t(m,x,_,y,C,P):n(m,x,O,_,y,C,P);if(!(_&l)){var b=E&&f.call(m,"__wrapped__"),k=L&&f.call(x,"__wrapped__");if(b||k){var I=b?m.value():m,w=k?x.value():x;return P||(P=new e),C(I,w,_,y,P)}}return R?(P||(P=new e),r(m,x,_,y,C,P)):!1}return Yl=g,Yl}var Gl,Vh;function Up(){if(Vh)return Gl;Vh=1;var e=Qy(),t=Fi();function n(r,i,o,a,s){return r===i?!0:r==null||i==null||!t(r)&&!t(i)?r!==r&&i!==i:e(r,i,o,a,n,s)}return Gl=n,Gl}var Xl,Zh;function ew(){if(Zh)return Xl;Zh=1;var e=Bp(),t=Up(),n=1,r=2;function i(o,a,s,l){var u=s.length,c=u,d=!l;if(o==null)return!c;for(o=Object(o);u--;){var h=s[u];if(d&&h[2]?h[1]!==o[h[0]]:!(h[0]in o))return!1}for(;++u<c;){h=s[u];var f=h[0],g=o[f],m=h[1];if(d&&h[2]){if(g===void 0&&!(f in o))return!1}else{var x=new e;if(l)var _=l(g,m,f,o,a,x);if(!(_===void 0?t(m,g,n|r,l,x):_))return!1}}return!0}return Xl=i,Xl}var Kl,Jh;function Yp(){if(Jh)return Kl;Jh=1;var e=gr();function t(n){return n===n&&!e(n)}return Kl=t,Kl}var Vl,Qh;function tw(){if(Qh)return Vl;Qh=1;var e=Yp(),t=ac();function n(r){for(var i=t(r),o=i.length;o--;){var a=i[o],s=r[a];i[o]=[a,s,e(s)]}return i}return Vl=n,Vl}var Zl,eg;function Gp(){if(eg)return Zl;eg=1;function e(t,n){return function(r){return r==null?!1:r[t]===n&&(n!==void 0||t in Object(r))}}return Zl=e,Zl}var Jl,tg;function nw(){if(tg)return Jl;tg=1;var e=ew(),t=tw(),n=Gp();function r(i){var o=t(i);return o.length==1&&o[0][2]?n(o[0][0],o[0][1]):function(a){return a===i||e(a,i,o)}}return Jl=r,Jl}var Ql,ng;function Xp(){if(ng)return Ql;ng=1;var e=jg(),t=Ho();function n(r,i){i=e(i,r);for(var o=0,a=i.length;r!=null&&o<a;)r=r[t(i[o++])];return o&&o==a?r:void 0}return Ql=n,Ql}var eu,rg;function rw(){if(rg)return eu;rg=1;var e=Xp();function t(n,r,i){var o=n==null?void 0:e(n,r);return o===void 0?i:o}return eu=t,eu}var tu,ig;function iw(){if(ig)return tu;ig=1;function e(t,n){return t!=null&&n in Object(t)}return tu=e,tu}var nu,og;function ow(){if(og)return nu;og=1;var e=iw(),t=Ug();function n(r,i){return r!=null&&t(r,i,e)}return nu=n,nu}var ru,ag;function aw(){if(ag)return ru;ag=1;var e=Up(),t=rw(),n=ow(),r=qu(),i=Yp(),o=Gp(),a=Ho(),s=1,l=2;function u(c,d){return r(c)&&i(d)?o(a(c),d):function(h){var f=t(h,c);return f===void 0&&f===d?n(h,c):e(d,f,s|l)}}return ru=u,ru}var iu,sg;function sw(){if(sg)return iu;sg=1;function e(t){return t}return iu=e,iu}var ou,lg;function lw(){if(lg)return ou;lg=1;function e(t){return function(n){return n?.[t]}}return ou=e,ou}var au,ug;function uw(){if(ug)return au;ug=1;var e=Xp();function t(n){return function(r){return e(r,n)}}return au=t,au}var su,cg;function cw(){if(cg)return su;cg=1;var e=lw(),t=uw(),n=qu(),r=Ho();function i(o){return n(o)?e(r(o)):t(o)}return su=i,su}var lu,dg;function dw(){if(dg)return lu;dg=1;var e=nw(),t=aw(),n=sw(),r=_n(),i=cw();function o(a){return typeof a=="function"?a:a==null?n:typeof a=="object"?r(a)?t(a[0],a[1]):e(a):i(a)}return lu=o,lu}var uu,fg;function fw(){if(fg)return uu;fg=1;var e=vy(),t=Oy(),n=dw(),r=_n();function i(o,a){return function(s,l){var u=r(s)?e:t,c=a?a():{};return u(s,o,n(l,2),c)}}return uu=i,uu}var cu,hg;function hw(){if(hg)return cu;hg=1;var e=my(),t=fw(),n=Object.prototype,r=n.hasOwnProperty,i=t(function(o,a,s){r.call(o,s)?o[s].push(a):e(o,s,[a])});return cu=i,cu}var gw=hw();const pw=Gn(gw);function mw(e,t,n,r,i,o,a,s,l,u,c,d,h,f,g,m,x,_,y){if(_!==void 0||t[t.length-1]!==n[t.length-1])return;const C=Op(x);Kn(t,l,a,s,o,(P,S,T,O,A)=>{if(P!==t[t.length-1])return;S+=P.width;const E=Math.max(S,O);E>r||(e.save(),e.beginPath(),e.rect(E,o+1,1e4,i-o-1),e.clip(),$o(A,T,i,u,c,g,m,C,(L,R,b,k)=>{if(!k&&x.length>0&&!x.some(G=>Ro(S,L,1e4,b,G.x,G.y,G.width,G.height)))return;const I=h.hasIndex(R),w=f.hasIndex(R);e.beginPath();const N=d?.(R),B=N===void 0?y:jn(y,N);B.bgCell!==y.bgCell&&(e.fillStyle=B.bgCell,e.fillRect(S,L,1e4,b)),w&&(e.fillStyle=B.bgHeader,e.fillRect(S,L,1e4,b)),I&&(e.fillStyle=B.accentLight,e.fillRect(S,L,1e4,b))}),e.restore())})}function vw(e,t,n,r,i,o,a,s,l){let u=!1;for(const g of t)if(!g.sticky){u=a(g.sourceIndex);break}const c=l.horizontalBorderColor??l.borderColor,d=l.borderColor,h=u?Gr(t):0;let f;if(h!==0&&(f=kf(d,l.bgCell),e.beginPath(),e.moveTo(h+.5,0),e.lineTo(h+.5,r),e.strokeStyle=f,e.stroke()),i>0){const g=d===c&&f!==void 0?f:kf(c,l.bgCell),m=vr(o,i,s);e.beginPath(),e.moveTo(0,r-m+.5),e.lineTo(n,r-m+.5),e.strokeStyle=g,e.stroke()}}const Kp=(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 s of e)r=Math.min(r,s.x-1),i=Math.max(i,s.x+s.width+1),o=Math.min(o,s.y-1),a=Math.max(a,s.y+s.height+1)}return{minX:r,maxX:i,minY:o,maxY:a}};function yw(e,t,n,r,i,o,a,s,l,u,c,d,h,f,g){const m=g.bgCell,{minX:x,maxX:_,minY:y,maxY:C}=Kp(s,o,a),P=[],S=a-vr(f,h,u);let T=l,O=n,A=0;for(;T+i<S;){const b=T+i,k=u(O);if(b>=y&&b<=C-1){const w=c?.(O)?.bgCell;w!==void 0&&w!==m&&O>=f-h&&P.push({x,y:b,w:_-x,h:k,color:w})}T+=k,O<f-h&&(A=T),O++}let E=0;const L=Math.min(S,C)-A;if(L>0)for(let b=0;b<t.length;b++){const k=t[b];if(k.width===0)continue;const I=k.sticky?E:E+r,w=k.themeOverride?.bgCell;w!==void 0&&w!==m&&I>=x&&I<=_&&d(b+1)&&P.push({x:I,y:A,w:k.width,h:L,color:w}),E+=k.width}if(P.length===0)return;let R;e.beginPath();for(let b=P.length-1;b>=0;b--){const k=P[b];R===void 0?R=k.color:k.color!==R&&(e.fillStyle=R,e.fill(),e.beginPath(),R=k.color),e.rect(k.x,k.y,k.w,k.h)}R!==void 0&&(e.fillStyle=R,e.fill()),e.beginPath()}function gg(e,t,n,r,i,o,a,s,l,u,c,d,h,f,g,m,x,_=!1){if(l!==void 0){e.beginPath(),e.save(),e.rect(0,0,o,a);for(const b of l)e.rect(b.x+1,b.y+1,b.width-1,b.height-1);e.clip("evenodd")}const y=x.horizontalBorderColor??x.borderColor,C=x.borderColor,{minX:P,maxX:S,minY:T,maxY:O}=Kp(s,o,a),A=[];e.beginPath();let E=.5;for(let b=0;b<t.length;b++){const k=t[b];if(k.width===0)continue;E+=k.width;const I=k.sticky?E:E+r;I>=P&&I<=S&&f(b+1)&&A.push({x1:I,y1:Math.max(u,T),x2:I,y2:Math.min(a,O),color:C})}let L=a+.5;for(let b=m-g;b<m;b++){const k=d(b);L-=k,A.push({x1:P,y1:L,x2:S,y2:L,color:y})}if(_!==!0){let b=c+.5,k=n;const I=L;for(;b+i<I;){const w=b+i;if(w>=T&&w<=O-1){const N=h?.(k);A.push({x1:P,y1:w,x2:S,y2:w,color:N?.horizontalBorderColor??N?.borderColor??y})}b+=d(k),k++}}const R=pw(A,b=>b.color);for(const b of Object.keys(R)){e.strokeStyle=b;for(const k of R[b])e.moveTo(k.x1,k.y1),e.lineTo(k.x2,k.y2);e.stroke(),e.beginPath()}l!==void 0&&e.restore()}function ww(e,t,n,r,i,o,a,s,l,u,c,d,h,f,g,m,x,_,y){const C=[];e.imageSmoothingEnabled=!1;const P=Math.min(i.cellYOffset,a),S=Math.max(i.cellYOffset,a);let T=0;if(typeof _=="number")T+=(S-P)*_;else for(let I=P;I<S;I++)T+=_(I);a>i.cellYOffset&&(T=-T),T+=l-i.translateY;const O=Math.min(i.cellXOffset,o),A=Math.max(i.cellXOffset,o);let E=0;for(let I=O;I<A;I++)E+=m[I].width;o>i.cellXOffset&&(E=-E),E+=s-i.translateX;const L=Gr(x);if(E!==0&&T!==0)return{regions:[]};const R=u>0?vr(h,u,_):0,b=c-L-Math.abs(E),k=d-f-R-Math.abs(T)-1;if(b>150&&k>150){const I={sx:0,sy:0,sw:c*g,sh:d*g,dx:0,dy:0,dw:c*g,dh:d*g};if(T>0?(I.sy=(f+1)*g,I.sh=k*g,I.dy=(T+f+1)*g,I.dh=k*g,C.push({x:0,y:f,width:c,height:T+1})):T<0&&(I.sy=(-T+f+1)*g,I.sh=k*g,I.dy=(f+1)*g,I.dh=k*g,C.push({x:0,y:d+T-R,width:c,height:-T+R})),E>0?(I.sx=L*g,I.sw=b*g,I.dx=(E+L)*g,I.dw=b*g,C.push({x:L-1,y:0,width:E+2,height:d})):E<0&&(I.sx=(L-E)*g,I.sw=b*g,I.dx=L*g,I.dw=b*g,C.push({x:c+E,y:0,width:-E,height:d})),e.setTransform(1,0,0,1,0,0),y){if(L>0&&E!==0&&T===0&&(r===void 0||n?.[1]!==!1)){const w=L*g,N=d*g;e.drawImage(t,0,0,w,N,0,0,w,N)}if(R>0&&E===0&&T!==0&&(r===void 0||n?.[0]!==!1)){const w=(d-R)*g,N=c*g,B=R*g;e.drawImage(t,0,w,N,B,0,w,N,B)}}e.drawImage(t,I.sx,I.sy,I.sw,I.sh,I.dx,I.dy,I.dw,I.dh),e.scale(g,g)}return e.imageSmoothingEnabled=!0,{regions:C}}function bw(e,t,n,r,i,o,a,s,l,u){const c=[];return t!==e.cellXOffset||n!==e.cellYOffset||r!==e.translateX||i!==e.translateY||Kn(l,n,r,i,s,(d,h,f,g)=>{if(d.sourceIndex===u){const m=Math.max(h,g)+1;return c.push({x:m,y:0,width:o-m,height:a}),!0}}),c}function Sw(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(Yr(i,o))continue;if(n!==void 0||i.width===o.width)return!1;const{width:a,...s}=i,{width:l,...u}=o;if(!Yr(s,u))return!1;n=r}return n===void 0?!0:n}return!0}function pg(e,t,n,r,i,o,a,s,l,u,c,d,h,f,g,m){const x=g?.filter(O=>O.style!=="no-outline");if(x===void 0||x.length===0)return;const _=Gr(s),y=vr(f,h,d),C=[l,0,s.length,f-h],P=[_,0,t,n-y],S=x.map(O=>{const A=O.range,E=O.style??"dashed";return cy(A,C,t,n,P).map(L=>{const R=L.rect,b=Ru(R.x,R.y,t,n,c,u+c,r,i,o,a,f,l,h,s,d),k=R.width===1&&R.height===1?b:Ru(R.x+R.width-1,R.y+R.height-1,t,n,c,u+c,r,i,o,a,f,l,h,s,d);return R.x+R.width>=s.length&&(k.width-=1),R.y+R.height>=f&&(k.height-=1),{color:O.color,style:E,clip:L.clip,rect:uy({x:b.x,y:b.y,width:k.x+k.width-b.x,height:k.y+k.height-b.y},t,n,8)}})}),T=()=>{e.lineWidth=1;let O=!1;for(const A of S)for(const E of A)if(E?.rect!==void 0&&Ro(0,0,t,n,E.rect.x,E.rect.y,E.rect.width,E.rect.height)){const L=O,R=!ly(E.clip,E.rect);R&&(e.save(),e.rect(E.clip.x,E.clip.y,E.clip.width,E.clip.height),e.clip()),E.style==="dashed"&&!O?(e.setLineDash([5,3]),O=!0):(E.style==="solid"||E.style==="solid-outline")&&O&&(e.setLineDash([]),O=!1),e.strokeStyle=E.style==="solid-outline"?tn(tn(E.color,m.borderColor),m.bgCell):dr(E.color,1),e.strokeRect(E.rect.x+.5,E.rect.y+.5,E.rect.width-1,E.rect.height-1),R&&(e.restore(),O=L)}O&&e.setLineDash([])};return T(),T}function mg(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 du(e,t,n,r,i,o,a,s,l,u,c,d,h,f,g,m,x){if(c.current===void 0)return;const _=c.current.range,y=c.current.cell,C=[_.x+_.width-1,_.y+_.height-1];if(y[1]>=x&&C[1]>=x||!a.some(I=>I.sourceIndex===y[0]||I.sourceIndex===C[0]))return;const[S,T]=c.current.cell,O=h(c.current.cell),A=O.span??[S,S],E=T>=x-f,L=f>0&&!E?vr(x,f,d)-1:0,R=C[1];let b;if(Kn(a,r,i,o,u,(I,w,N,B,G)=>{if(I.sticky&&S>I.sourceIndex)return;const ce=I.sourceIndex<A[0],z=I.sourceIndex>A[1],M=I.sourceIndex===C[0];if(!(!M&&(ce||z)))return $o(G,N,n,x,d,f,g,void 0,($,W,K)=>{if(W!==T&&W!==R)return;let J=w,oe=I.width;if(O.span!==void 0){const ie=Fp(O.span,w,$,I.width,K,I,s),de=I.sticky?ie[0]:ie[1];de!==void 0&&(J=de.x,oe=de.width)}return W===R&&M&&m&&(b=()=>{B>J&&!I.sticky&&(e.beginPath(),e.rect(B,0,t-B,n),e.clip()),e.beginPath(),e.rect(J+oe-4,$+K-4,4,4),e.fillStyle=I.themeOverride?.accentColor??l.accentColor,e.fill()}),b!==void 0}),b!==void 0}),b===void 0)return;const k=()=>{e.save(),e.beginPath(),e.rect(0,u,t,n-u-L),e.clip(),b?.(),e.restore()};return k(),k}function Cw(e,t,n,r,i,o,a,s,l){l===void 0||l.size===0||(e.beginPath(),Dp(t,n,o,r,(u,c,d,h,f,g)=>{l.hasItemInRectangle({x:u[0],y:-2,width:u[1]-u[0]+1,height:1})&&e.rect(d,h,f,g)}),Kn(t,s,o,a,i,(u,c,d,h)=>{const f=Math.max(0,h-c),g=c+f+1,m=u.width-f-1;l.has([u.sourceIndex,-1])&&e.rect(g,r,m,i-r)}),e.clip())}function xw(e,t,n,r,i,o,a,s,l,u){let c=0;return Kn(e,o,r,i,n,(d,h,f,g,m)=>($o(m,f,t,a,s,l,u,void 0,(x,_,y,C)=>{C||(c=Math.max(_,c))}),!0)),c}function vg(e,t){const{canvasCtx:n,headerCanvasCtx:r,width:i,height:o,cellXOffset:a,cellYOffset:s,translateX:l,translateY:u,mappedColumns:c,enableGroups:d,freezeColumns:h,dragAndDropState:f,theme:g,drawFocus:m,headerHeight:x,groupHeaderHeight:_,disabledRows:y,rowHeight:C,verticalBorder:P,overrideCursor:S,isResizing:T,selection:O,fillHandle:A,freezeTrailingRows:E,rows:L,getCellContent:R,getGroupDetails:b,getRowThemeOverride:k,isFocused:I,drawHeaderCallback:w,prelightCells:N,drawCellCallback:B,highlightRegions:G,resizeCol:ce,imageLoader:z,lastBlitData:M,hoverValues:$,hyperWrapping:W,hoverInfo:K,spriteManager:J,maxScaleFactor:oe,hasAppendRow:ne,touchMode:ie,enqueue:de,renderStateProvider:me,getCellRenderer:xe,renderStrategy:ee,bufferACtx:Pe,bufferBCtx:Ge,damage:Ze,minimumCellWidth:Ct}=e;if(i===0||o===0)return;const Se=ee==="double-buffer",ge=Math.min(oe,Math.ceil(window.devicePixelRatio??1)),Ne=ee!=="direct"&&Sw(e,t),Re=n.canvas;(Re.width!==i*ge||Re.height!==o*ge)&&(Re.width=i*ge,Re.height=o*ge,Re.style.width=i+"px",Re.style.height=o+"px");const We=r.canvas,Fe=d?_+x:x,ot=Fe+1;(We.width!==i*ge||We.height!==ot*ge)&&(We.width=i*ge,We.height=ot*ge,We.style.width=i+"px",We.style.height=ot+"px");const Je=Pe.canvas,Ke=Ge.canvas;Se&&(Je.width!==i*ge||Je.height!==o*ge)&&(Je.width=i*ge,Je.height=o*ge,M.current!==void 0&&(M.current.aBufferScroll=void 0)),Se&&(Ke.width!==i*ge||Ke.height!==o*ge)&&(Ke.width=i*ge,Ke.height=o*ge,M.current!==void 0&&(M.current.bBufferScroll=void 0));const Ce=M.current;if(Ne===!0&&a===Ce?.cellXOffset&&s===Ce?.cellYOffset&&l===Ce?.translateX&&u===Ce?.translateY)return;let at=null;Se&&(at=n);const $e=r;let Ae;Se?Ze!==void 0?Ae=Ce?.lastBuffer==="b"?Ge:Pe:Ae=Ce?.lastBuffer==="b"?Pe:Ge:Ae=n;const xt=Ae.canvas,Ve=Se?xt===Je?Ke:Je:Re,Be=typeof C=="number"?()=>C:C;$e.save(),Ae.save(),$e.beginPath(),Ae.beginPath(),$e.textBaseline="middle",Ae.textBaseline="middle",ge!==1&&($e.scale(ge,ge),Ae.scale(ge,ge));const je=ku(c,a,i,f,l);let wt=[];const At=m&&O.current?.cell[1]===s&&u===0;let rn=!1;if(G!==void 0){for(const Xe of G)if(Xe.style!=="no-outline"&&Xe.range.y===s&&u===0){rn=!0;break}}const un=()=>{hy($e,je,d,K,i,l,x,_,f,T,O,g,J,$,P,b,Ze,w,ie),gg($e,je,s,l,u,i,o,void 0,void 0,_,Fe,Be,k,P,E,L,g,!0),$e.beginPath(),$e.moveTo(0,ot-.5),$e.lineTo(i,ot-.5),$e.strokeStyle=tn(g.headerBottomBorderColor??g.horizontalBorderColor??g.borderColor,g.bgHeader),$e.stroke(),rn&&pg($e,i,o,a,s,l,u,c,h,x,_,C,E,L,G,g),At&&du($e,i,o,s,l,u,je,c,g,Fe,O,Be,R,E,ne,A,L)};if(Ze!==void 0){const Xe=je[je.length-1].sourceIndex+1,pt=Ze.hasItemInRegion([{x:a,y:-2,width:Xe,height:2},{x:a,y:s,width:Xe,height:300},{x:0,y:s,width:h,height:300},{x:0,y:-2,width:h,height:2},{x:a,y:L-E,width:Xe,height:E,when:E>0}]),Gt=Ot=>{ih(Ot,je,c,o,Fe,l,u,s,L,Be,R,b,k,y,I,m,E,ne,wt,Ze,O,N,G,z,J,$,K,B,W,g,de,me,xe,S,Ct);const Ee=O.current;A&&m&&Ee!==void 0&&Ze.has(mp(Ee.range))&&du(Ot,i,o,s,l,u,je,c,g,Fe,O,Be,R,E,ne,A,L)};pt&&(Gt(Ae),at!==null&&(at.save(),at.scale(ge,ge),at.textBaseline="middle",Gt(at),at.restore()),Ze.hasHeader()&&(Cw($e,je,i,_,Fe,l,u,s,Ze),un())),Ae.restore(),$e.restore();return}if((Ne!==!0||a!==Ce?.cellXOffset||l!==Ce?.translateX||At!==Ce?.mustDrawFocusOnHeader||rn!==Ce?.mustDrawHighlightRingsOnHeader)&&un(),Ne===!0){en(Ve!==void 0&&Ce!==void 0);const{regions:Xe}=ww(Ae,Ve,Ve===Je?Ce.aBufferScroll:Ce.bBufferScroll,Ve===Je?Ce.bBufferScroll:Ce.aBufferScroll,Ce,a,s,l,u,E,i,o,L,Fe,ge,c,je,C,Se);wt=Xe}else Ne!==!1&&(en(Ce!==void 0),wt=bw(Ce,a,s,l,u,i,o,Fe,je,Ne));vw(Ae,je,i,o,E,L,P,Be,g);const _t=pg(Ae,i,o,a,s,l,u,c,h,x,_,C,E,L,G,g),Yt=m?du(Ae,i,o,s,l,u,je,c,g,Fe,O,Be,R,E,ne,A,L):void 0;if(Ae.fillStyle=g.bgCell,wt.length>0){Ae.beginPath();for(const Xe of wt)Ae.rect(Xe.x,Xe.y,Xe.width,Xe.height);Ae.clip(),Ae.fill(),Ae.beginPath()}else Ae.fillRect(0,0,i,o);const Lt=ih(Ae,je,c,o,Fe,l,u,s,L,Be,R,b,k,y,I,m,E,ne,wt,Ze,O,N,G,z,J,$,K,B,W,g,de,me,xe,S,Ct);mw(Ae,je,c,i,o,Fe,l,u,s,L,Be,k,O.rows,y,E,ne,wt,Ze,g),yw(Ae,je,s,l,u,i,o,wt,Fe,Be,k,P,E,L,g),gg(Ae,je,s,l,u,i,o,wt,Lt,_,Fe,Be,k,P,E,L,g),_t?.(),Yt?.(),T&&Kn(je,0,l,0,Fe,(Xe,pt)=>Xe.sourceIndex===ce?(mg($e,pt+Xe.width,0,Fe+1,tn(g.resizeIndicatorColor??g.accentLight,g.bgHeader)),mg(Ae,pt+Xe.width,Fe,o,tn(g.resizeIndicatorColor??g.accentLight,g.bgCell)),!0):!1),at!==null&&(at.fillStyle=g.bgCell,at.fillRect(0,0,i,o),at.drawImage(Ae.canvas,0,0));const En=xw(je,o,Fe,l,u,s,L,Be,E,ne);z?.setWindow({x:a,y:s,width:je.length,height:En-s},h,Array.from({length:E},(Xe,pt)=>L-1-pt));const Mn=Ce!==void 0&&(a!==Ce.cellXOffset||l!==Ce.translateX),ut=Ce!==void 0&&(s!==Ce.cellYOffset||u!==Ce.translateY);M.current={cellXOffset:a,cellYOffset:s,translateX:l,translateY:u,mustDrawFocusOnHeader:At,mustDrawHighlightRingsOnHeader:rn,lastBuffer:Se?xt===Je?"a":"b":void 0,aBufferScroll:xt===Je?[Mn,ut]:Ce?.aBufferScroll,bBufferScroll:xt===Ke?[Mn,ut]:Ce?.bBufferScroll},Ae.restore(),$e.restore()}const _w=80;function kw(e){const t=e-1;return t*t*t+1}class Rw{callback;constructor(t){this.callback=t}currentHoveredItem=void 0;leavingItems=[];lastAnimationTime;addToLeavingItems=t=>{this.leavingItems.some(r=>Ri(r.item,t.item))||this.leavingItems.push(t)};removeFromLeavingItems=t=>{const n=this.leavingItems.find(r=>Ri(r.item,t));return this.leavingItems=this.leavingItems.filter(r=>r!==n),n?.hoverAmount??0};cleanUpLeavingElements=()=>{this.leavingItems=this.leavingItems.filter(t=>t.hoverAmount>0)};shouldStep=()=>{const t=this.leavingItems.length>0,n=this.currentHoveredItem!==void 0&&this.currentHoveredItem.hoverAmount<1;return t||n};getAnimatingItems=()=>this.currentHoveredItem!==void 0?[...this.leavingItems,this.currentHoveredItem]:this.leavingItems.map(t=>({...t,hoverAmount:kw(t.hoverAmount)}));step=t=>{if(this.lastAnimationTime===void 0)this.lastAnimationTime=t;else{const r=(t-this.lastAnimationTime)/_w;for(const o of this.leavingItems)o.hoverAmount=pn(o.hoverAmount-r,0,1);this.currentHoveredItem!==void 0&&(this.currentHoveredItem.hoverAmount=pn(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};setHovered=t=>{if(!Ri(this.currentHoveredItem?.item,t)){if(this.currentHoveredItem!==void 0&&this.addToLeavingItems(this.currentHoveredItem),t!==void 0){const n=this.removeFromLeavingItems(t);this.currentHoveredItem={item:t,hoverAmount:n}}else this.currentHoveredItem=void 0;this.lastAnimationTime===void 0&&window.requestAnimationFrame(this.step)}}}class Ew{fn;val;constructor(t){this.fn=t}get value(){return this.val??(this.val=this.fn())}}function sc(e){return new Ew(e)}const Mw=sc(()=>window.navigator.userAgent.includes("Firefox")),Eo=sc(()=>window.navigator.userAgent.includes("Mac OS")&&window.navigator.userAgent.includes("Safari")&&!window.navigator.userAgent.includes("Chrome")),Mo=sc(()=>window.navigator.platform.toLowerCase().startsWith("mac"));function Tw(e){const t=p.useRef([]),n=p.useRef(0),r=p.useRef(e);r.current=e;const i=p.useCallback(()=>{const o=()=>window.requestAnimationFrame(a),a=()=>{const s=t.current.map(nc);t.current=[],r.current(new Mi(s)),t.current.length>0?n.current++:n.current=0};window.requestAnimationFrame(n.current>600?o:a)},[]);return p.useCallback(o=>{t.current.length===0&&i();const a=mn(o[0],o[1]);t.current.includes(a)||t.current.push(a)},[i])}const Bn="header",Qt="group-header",To="out-of-bounds";var jr;(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"})(jr||(jr={}));function Vp(e,t){return e===t?!0:e?.kind==="out-of-bounds"?e?.kind===t?.kind&&e?.location[0]===t?.location[0]&&e?.location[1]===t?.location[1]&&e?.region[0]===t?.region[0]&&e?.region[1]===t?.region[1]:e?.kind===t?.kind&&e?.location[0]===t?.location[0]&&e?.location[1]===t?.location[1]}const yg=6,Iw=(e,t)=>e.kind===ue.Custom?e.copyData:t?.(e)?.getAccessibilityString(e)??"",Pw=(e,t)=>{const{width:n,height:r,accessibilityHeight:i,columns:o,cellXOffset:a,cellYOffset:s,headerHeight:l,fillHandle:u=!1,groupHeaderHeight:c,rowHeight:d,rows:h,getCellContent:f,getRowThemeOverride:g,onHeaderMenuClick:m,enableGroups:x,isFilling:_,onCanvasFocused:y,onCanvasBlur:C,isFocused:P,selection:S,freezeColumns:T,onContextMenu:O,freezeTrailingRows:A,fixedShadowX:E=!0,fixedShadowY:L=!0,drawFocusRing:R,onMouseDown:b,onMouseUp:k,onMouseMoveRaw:I,onMouseMove:w,onItemHovered:N,dragAndDropState:B,firstColAccessible:G,onKeyDown:ce,onKeyUp:z,highlightRegions:M,canvasRef:$,onDragStart:W,onDragEnd:K,eventTargetRef:J,isResizing:oe,resizeColumn:ne,isDragging:ie,isDraggable:de=!1,allowResize:me,disabledRows:xe,hasAppendRow:ee,getGroupDetails:Pe,theme:Ge,prelightCells:Ze,headerIcons:Ct,verticalBorder:Se,drawCell:ge,drawHeader:Ne,onCellFocused:Re,onDragOverCell:We,onDrop:Fe,onDragLeave:ot,imageWindowLoader:Je,smoothScrollX:Ke=!1,smoothScrollY:Ce=!1,experimental:at,getCellRenderer:$e}=e,Ae=e.translateX??0,xt=e.translateY??0,Ve=Math.max(T,Math.min(o.length-1,a)),Be=p.useRef(null),je=Je,wt=p.useRef(),[At,rn]=p.useState(!1),un=p.useRef([]),_t=p.useRef(),[Yt,Lt]=p.useState(),[En,Mn]=p.useState(),ut=p.useRef(null),[Xe,pt]=p.useState(),[Gt,Ot]=p.useState(!1),Ee=p.useRef(Gt);Ee.current=Gt;const ct=p.useMemo(()=>new ay(Ct,()=>{yn.current=void 0,Zn.current()}),[Ct]),st=x?c+l:l,vn=p.useRef(-1),Dt=(at?.enableFirefoxRescaling??!1)&&Mw.value,on=(at?.enableSafariRescaling??!1)&&Eo.value;p.useLayoutEffect(()=>{window.devicePixelRatio===1||!Dt&&!on||(vn.current!==-1&&rn(!0),window.clearTimeout(vn.current),vn.current=window.setTimeout(()=>{rn(!1),vn.current=-1},200))},[s,Ve,Ae,xt,Dt,on]);const bt=q1(o,T),yr=E?Gr(bt,B):0,kt=p.useCallback((H,Q,fe)=>{const le=H.getBoundingClientRect();if(Q>=bt.length||fe>=h)return;const re=le.width/n,he=Ru(Q,fe,n,r,c,st,Ve,s,Ae,xt,h,T,A,bt,d);return re!==1&&(he.x*=re,he.y*=re,he.width*=re,he.height*=re),he.x+=le.x,he.y+=le.y,he},[n,r,c,st,Ve,s,Ae,xt,h,T,A,bt,d]),Mt=p.useCallback((H,Q,fe,le)=>{const re=H.getBoundingClientRect(),he=re.width/n,Me=(Q-re.left)/he,pe=(fe-re.top)/he,be=5,Oe=ku(bt,Ve,n,void 0,Ae);let yt=0,mt=0;le instanceof MouseEvent&&(yt=le.button,mt=le.buttons);const nt=B1(Me,Oe,Ae),Ue=j1(pe,r,x,l,c,h,d,s,xt,A),gt=le?.shiftKey===!0,ze=le?.ctrlKey===!0,dt=le?.metaKey===!0,Qn=le!==void 0&&!(le instanceof MouseEvent)||le?.pointerType==="touch",Et=[Me<0?-1:n<Me?1:0,pe<st?-1:r<pe?1:0];let er;if(nt===-1||pe<0||Me<0||Ue===void 0||Me>n||pe>r){const Qe=Me>n?1:Me<0?-1:0,It=pe>r?1:pe<0?-1:0;let Vt=Qe*2,bn=It*2;Qe===0&&(Vt=nt===-1?jr.EndPadding:jr.Center),It===0&&(bn=Ue===void 0?jr.EndPadding:jr.Center);let fn=!1;if(nt===-1&&Ue===-1){const tr=kt(H,bt.length-1,-1);en(tr!==void 0),fn=Q<tr.x+tr.width+be}const Ir=Me>n&&Me<n+Su()||pe>r&&pe<r+Su();er={kind:To,location:[nt!==-1?nt:Me<0?0:bt.length-1,Ue??h-1],region:[Vt,bn],shiftKey:gt,ctrlKey:ze,metaKey:dt,isEdge:fn,isTouch:Qn,button:yt,buttons:mt,scrollEdge:Et,isMaybeScrollbar:Ir}}else if(Ue<=-1){let Qe=kt(H,nt,Ue);en(Qe!==void 0);let It=Qe!==void 0&&Qe.x+Qe.width-Q<=be;const Vt=nt-1;Q-Qe.x<=be&&Vt>=0?(It=!0,Qe=kt(H,Vt,Ue),en(Qe!==void 0),er={kind:x&&Ue===-2?Qt:Bn,location:[Vt,Ue],bounds:Qe,group:bt[Vt].group??"",isEdge:It,shiftKey:gt,ctrlKey:ze,metaKey:dt,isTouch:Qn,localEventX:Q-Qe.x,localEventY:fe-Qe.y,button:yt,buttons:mt,scrollEdge:Et}):er={kind:x&&Ue===-2?Qt:Bn,group:bt[nt].group??"",location:[nt,Ue],bounds:Qe,isEdge:It,shiftKey:gt,ctrlKey:ze,metaKey:dt,isTouch:Qn,localEventX:Q-Qe.x,localEventY:fe-Qe.y,button:yt,buttons:mt,scrollEdge:Et}}else{const Qe=kt(H,nt,Ue);en(Qe!==void 0);const It=Qe!==void 0&&Qe.x+Qe.width-Q<be;let Vt=!1;if(u&&S.current!==void 0){const bn=mp(S.current.range),fn=kt(H,bn[0],bn[1]);if(fn!==void 0){const Ir=fn.x+fn.width-2,tr=fn.y+fn.height-2;Vt=Math.abs(Ir-Q)<yg&&Math.abs(tr-fe)<yg}}er={kind:"cell",location:[nt,Ue],bounds:Qe,isEdge:It,shiftKey:gt,ctrlKey:ze,isFillHandle:Vt,metaKey:dt,isTouch:Qn,localEventX:Q-Qe.x,localEventY:fe-Qe.y,button:yt,buttons:mt,scrollEdge:Et}}return er},[n,bt,Ve,Ae,r,x,l,c,h,d,s,xt,A,kt,u,S,st]),[$t]=Yt??[],qi=p.useRef(()=>{}),wr=p.useRef(Yt);wr.current=Yt;const[Tn,In]=p.useMemo(()=>{const H=document.createElement("canvas"),Q=document.createElement("canvas");return H.style.display="none",H.style.opacity="0",H.style.position="fixed",Q.style.display="none",Q.style.opacity="0",Q.style.position="fixed",[H.getContext("2d",{alpha:!1}),Q.getContext("2d",{alpha:!1})]},[]);p.useLayoutEffect(()=>{if(!(Tn===null||In===null))return document.documentElement.append(Tn.canvas),document.documentElement.append(In.canvas),()=>{Tn.canvas.remove(),In.canvas.remove()}},[Tn,In]);const br=p.useMemo(()=>new ev,[]),$i=Dt&&At?1:on&&At?2:5,Ni=at?.disableMinimumCellWidth===!0?1:10,yn=p.useRef(),Sr=p.useRef(null),Cr=p.useRef(null),xr=p.useCallback(()=>{const H=Be.current,Q=ut.current;if(H===null||Q===null||(Sr.current===null&&(Sr.current=H.getContext("2d",{alpha:!1}),H.width=0,H.height=0),Cr.current===null&&(Cr.current=Q.getContext("2d",{alpha:!1}),Q.width=0,Q.height=0),Sr.current===null||Cr.current===null||Tn===null||In===null))return;let fe=!1;const le=Me=>{fe=!0,pt(Me)},re=yn.current,he={headerCanvasCtx:Cr.current,canvasCtx:Sr.current,bufferACtx:Tn,bufferBCtx:In,width:n,height:r,cellXOffset:Ve,cellYOffset:s,translateX:Math.round(Ae),translateY:Math.round(xt),mappedColumns:bt,enableGroups:x,freezeColumns:T,dragAndDropState:B,theme:Ge,headerHeight:l,groupHeaderHeight:c,disabledRows:xe??qe.empty(),rowHeight:d,verticalBorder:Se,isResizing:oe,resizeCol:ne,isFocused:P,selection:S,fillHandle:u,drawCellCallback:ge,hasAppendRow:ee,overrideCursor:le,maxScaleFactor:$i,freezeTrailingRows:A,rows:h,drawFocus:R,getCellContent:f,getGroupDetails:Pe??(Me=>({name:Me})),getRowThemeOverride:g,drawHeaderCallback:Ne,prelightCells:Ze,highlightRegions:M,imageLoader:je,lastBlitData:_t,damage:wt.current,hoverValues:un.current,hoverInfo:wr.current,spriteManager:ct,scrolling:At,hyperWrapping:at?.hyperWrapping??!1,touchMode:Gt,enqueue:qi.current,renderStateProvider:br,renderStrategy:at?.renderStrategy??(Eo.value?"double-buffer":"single-buffer"),getCellRenderer:$e,minimumCellWidth:Ni};he.damage===void 0?(yn.current=he,vg(he,re)):vg(he,void 0),!fe&&(he.damage===void 0||he.damage.has(wr?.current?.[0]))&&pt(void 0)},[Tn,In,n,r,Ve,s,Ae,xt,bt,x,T,B,Ge,l,c,xe,d,Se,oe,ee,ne,P,S,u,A,h,R,$i,f,Pe,g,ge,Ne,Ze,M,je,ct,At,at?.hyperWrapping,at?.renderStrategy,Gt,br,$e,Ni]),Zn=p.useRef(xr);p.useLayoutEffect(()=>{xr(),Zn.current=xr},[xr]),p.useLayoutEffect(()=>{(async()=>{document?.fonts?.ready!==void 0&&(await document.fonts.ready,yn.current=void 0,Zn.current())})()},[]);const Fn=p.useCallback(H=>{wt.current=H,Zn.current(),wt.current=void 0},[]),Wi=Tw(Fn);qi.current=Wi;const Bi=p.useCallback(H=>{Fn(new Mi(H.map(Q=>Q.cell)))},[Fn]);je.setCallback(Fn);const[Uo,Yo]=p.useState(!1),[_r,Pn]=$t??[],Go=_r!==void 0&&Pn===-1,Xo=_r!==void 0&&Pn===-2;let ji=!1,kr=!1,wn=Xe;if(wn===void 0&&_r!==void 0&&Pn!==void 0&&Pn>-1&&Pn<h){const H=f([_r,Pn],!0);ji=H.kind===ln.NewRow||H.kind===ln.Marker&&H.markerKind!=="number",kr=H.kind===ue.Boolean&&bu(H),wn=H.cursor}const Ui=ie?"grabbing":(En??!1)||oe?"col-resize":Uo||_?"crosshair":wn!==void 0?wn:Go||ji||kr||Xo?"pointer":"default",Rr=p.useMemo(()=>({contain:"strict",display:"block",cursor:Ui}),[Ui]),Vr=p.useRef("default"),zn=J?.current;zn!=null&&Vr.current!==Rr.cursor&&(zn.style.cursor=Vr.current=Rr.cursor);const Xt=p.useCallback((H,Q,fe,le)=>{if(Pe===void 0)return;const re=Pe(H);if(re.actions!==void 0){const he=qp(Q,re.actions);for(const[Me,pe]of he.entries())if(No(pe,fe+Q.x,le+pe.y))return re.actions[Me]}},[Pe]),cn=p.useCallback((H,Q,fe,le)=>{const re=o[Q];if(!ie&&!oe&&re.hasMenu===!0&&!(En??!1)){const he=kt(H,Q,-1);en(he!==void 0);const Me=Hp(he.x,he.y,he.width,he.height,Zu(re.title)==="rtl");if(fe>Me.x&&fe<Me.x+Me.width&&le>Me.y&&le<Me.y+Me.height)return he}},[o,kt,En,ie,oe]),Zr=p.useRef(0),Ln=p.useRef(),Jr=p.useRef(!1),Ht=p.useCallback(H=>{const Q=Be.current,fe=J?.current;if(Q===null||H.target!==Q&&H.target!==fe)return;Jr.current=!0;let le,re;if(H instanceof MouseEvent?(le=H.clientX,re=H.clientY):(le=H.touches[0].clientX,re=H.touches[0].clientY),H.target===fe&&fe!==null){const Me=fe.getBoundingClientRect();if(le>Me.right||re>Me.bottom)return}const he=Mt(Q,le,re,H);Ln.current=he.location,he.isTouch&&(Zr.current=Date.now()),Ee.current!==he.isTouch&&Ot(he.isTouch),!(he.kind===Bn&&cn(Q,he.location[0],le,re)!==void 0)&&(he.kind===Qt&&Xt(he.group,he.bounds,he.localEventX,he.localEventY)!==void 0||(b?.(he),!he.isTouch&&de!==!0&&de!==he.kind&&he.button<3&&he.button!==1&&H.preventDefault()))},[J,de,Mt,Xt,cn,b]);Pt("touchstart",Ht,window,!1),Pt("mousedown",Ht,window,!1);const Er=p.useRef(0),Qr=p.useCallback(H=>{const Q=Er.current;Er.current=Date.now();const fe=Be.current;if(Jr.current=!1,k===void 0||fe===null)return;const le=J?.current,re=H.target!==fe&&H.target!==le;let he,Me,pe=!0;if(H instanceof MouseEvent){if(he=H.clientX,Me=H.clientY,pe=H.button<3,H.pointerType==="touch")return}else he=H.changedTouches[0].clientX,Me=H.changedTouches[0].clientY;let be=Mt(fe,he,Me,H);be.isTouch&&Zr.current!==0&&Date.now()-Zr.current>500&&(be={...be,isLongTouch:!0}),Q!==0&&Date.now()-Q<(be.isTouch?1e3:500)&&(be={...be,isDoubleClick:!0}),Ee.current!==be.isTouch&&Ot(be.isTouch),!re&&H.cancelable&&pe&&H.preventDefault();const[Oe]=be.location,yt=cn(fe,Oe,he,Me);if(be.kind===Bn&&yt!==void 0){(be.button!==0||Ln.current?.[0]!==Oe||Ln.current?.[1]!==-1)&&k(be,!0);return}else if(be.kind===Qt){const mt=Xt(be.group,be.bounds,be.localEventX,be.localEventY);if(mt!==void 0){be.button===0&&mt.onClick(be);return}}k(be,re)},[k,J,Mt,cn,Xt]);Pt("mouseup",Qr,window,!1),Pt("touchend",Qr,window,!1);const Yi=p.useCallback(H=>{const Q=Be.current;if(Q===null)return;const fe=J?.current,le=H.target!==Q&&H.target!==fe;let re,he,Me=!0;H instanceof MouseEvent?(re=H.clientX,he=H.clientY,Me=H.button<3):(re=H.changedTouches[0].clientX,he=H.changedTouches[0].clientY);const pe=Mt(Q,re,he,H);Ee.current!==pe.isTouch&&Ot(pe.isTouch),!le&&H.cancelable&&Me&&H.preventDefault();const[be]=pe.location,Oe=cn(Q,be,re,he);if(pe.kind===Bn&&Oe!==void 0)pe.button===0&&Ln.current?.[0]===be&&Ln.current?.[1]===-1&&m?.(be,Oe);else if(pe.kind===Qt){const yt=Xt(pe.group,pe.bounds,pe.localEventX,pe.localEventY);yt!==void 0&&pe.button===0&&yt.onClick(pe)}},[J,Mt,cn,m,Xt]);Pt("click",Yi,window,!1);const Ko=p.useCallback(H=>{const Q=Be.current,fe=J?.current;if(Q===null||H.target!==Q&&H.target!==fe||O===void 0)return;const le=Mt(Q,H.clientX,H.clientY,H);O(le,()=>{H.cancelable&&H.preventDefault()})},[J,Mt,O]);Pt("contextmenu",Ko,J?.current??null,!1);const Gi=p.useCallback(H=>{wt.current=new Mi(H.map(Q=>Q.item)),un.current=H,Zn.current(),wt.current=void 0},[]),dn=p.useMemo(()=>new Rw(Gi),[Gi]),An=p.useRef(dn);An.current=dn,p.useLayoutEffect(()=>{const H=An.current;if($t===void 0||$t[1]<0){H.setHovered($t);return}const Q=f($t,!0),fe=$e(Q),le=fe===void 0&&Q.kind===ue.Custom||fe?.needsHover!==void 0&&(typeof fe.needsHover=="boolean"?fe.needsHover:fe.needsHover(Q));H.setHovered(le?$t:void 0)},[f,$e,$t]);const Kt=p.useRef(),U=p.useCallback(H=>{const Q=Be.current;if(Q===null)return;const fe=J?.current,le=H.target!==Q&&H.target!==fe,re=Mt(Q,H.clientX,H.clientY,H);if(re.kind!=="out-of-bounds"&&le&&!Jr.current&&!re.isTouch)return;const he=(pe,be)=>{Lt(Oe=>Oe===pe||Oe?.[0][0]===pe?.[0][0]&&Oe?.[0][1]===pe?.[0][1]&&(Oe?.[1][0]===pe?.[1][0]&&Oe?.[1][1]===pe?.[1][1]||!be)?Oe:pe)};if(!Vp(re,Kt.current))pt(void 0),N?.(re),he(re.kind===To?void 0:[re.location,[re.localEventX,re.localEventY]],!0),Kt.current=re;else if(re.kind==="cell"||re.kind===Bn||re.kind===Qt){let pe=!1,be=!0;if(re.kind==="cell"){const yt=f(re.location);be=$e(yt)?.needsHoverPosition??yt.kind===ue.Custom,pe=be}else re.kind===Qt&&(pe=!0);const Oe=[re.location,[re.localEventX,re.localEventY]];he(Oe,be),wr.current=Oe,pe&&Fn(new Mi([re.location]))}const Me=re.location[0]>=(G?0:1);Mn(re.kind===Bn&&re.isEdge&&Me&&me===!0),Yo(re.kind==="cell"&&re.isFillHandle),I?.(H),w(re)},[J,Mt,G,me,I,w,N,f,$e,Fn]);Pt("mousemove",U,window,!0);const ht=p.useCallback(H=>{const Q=Be.current;if(Q===null)return;let fe,le;S.current!==void 0&&(fe=kt(Q,S.current.cell[0],S.current.cell[1]),le=S.current.cell),ce?.({bounds:fe,stopPropagation:()=>H.stopPropagation(),preventDefault:()=>H.preventDefault(),cancel:()=>{},ctrlKey:H.ctrlKey,metaKey:H.metaKey,shiftKey:H.shiftKey,altKey:H.altKey,key:H.key,keyCode:H.keyCode,rawEvent:H,location:le})},[ce,S,kt]),Jn=p.useCallback(H=>{const Q=Be.current;if(Q===null)return;let fe,le;S.current!==void 0&&(fe=kt(Q,S.current.cell[0],S.current.cell[1]),le=S.current.cell),z?.({bounds:fe,stopPropagation:()=>H.stopPropagation(),preventDefault:()=>H.preventDefault(),cancel:()=>{},ctrlKey:H.ctrlKey,metaKey:H.metaKey,shiftKey:H.shiftKey,altKey:H.altKey,key:H.key,keyCode:H.keyCode,rawEvent:H,location:le})},[z,S,kt]),Vo=p.useCallback(H=>{Be.current=H,$!==void 0&&($.current=H)},[$]),Xi=p.useCallback(H=>{const Q=Be.current;if(Q===null||de===!1||oe){H.preventDefault();return}let fe,le;const re=Mt(Q,H.clientX,H.clientY);if(de!==!0&&re.kind!==de){H.preventDefault();return}const he=(mt,nt)=>{fe=mt,le=nt};let Me,pe,be;const Oe=(mt,nt,Ue)=>{Me=mt,pe=nt,be=Ue};let yt=!1;if(W?.({...re,setData:he,setDragImage:Oe,preventDefault:()=>yt=!0,defaultPrevented:()=>yt}),!yt&&fe!==void 0&&le!==void 0&&H.dataTransfer!==null)if(H.dataTransfer.setData(fe,le),H.dataTransfer.effectAllowed="copyLink",Me!==void 0&&pe!==void 0&&be!==void 0)H.dataTransfer.setDragImage(Me,pe,be);else{const[mt,nt]=re.location;if(nt!==void 0){const Ue=document.createElement("canvas"),gt=kt(Q,mt,nt);en(gt!==void 0);const ze=Math.ceil(window.devicePixelRatio??1);Ue.width=gt.width*ze,Ue.height=gt.height*ze;const dt=Ue.getContext("2d");dt!==null&&(dt.scale(ze,ze),dt.textBaseline="middle",nt===-1?(dt.font=Ge.headerFontFull,dt.fillStyle=Ge.bgHeader,dt.fillRect(0,0,Ue.width,Ue.height),$p(dt,0,0,gt.width,gt.height,bt[mt],!1,Ge,!1,!1,0,ct,Ne,!1)):(dt.font=Ge.baseFontFull,dt.fillStyle=Ge.bgCell,dt.fillRect(0,0,Ue.width,Ue.height),Lp(dt,f([mt,nt]),0,nt,!1,!1,0,0,gt.width,gt.height,!1,Ge,Ge.bgCell,je,ct,1,void 0,!1,0,void 0,void 0,void 0,br,$e,()=>{}))),Ue.style.left="-100%",Ue.style.position="absolute",Ue.style.width=`${gt.width}px`,Ue.style.height=`${gt.height}px`,document.body.append(Ue),H.dataTransfer.setDragImage(Ue,gt.width/2,gt.height/2),window.setTimeout(()=>{Ue.remove()},0)}}else H.preventDefault()},[de,oe,Mt,W,kt,Ge,bt,ct,Ne,f,je,br,$e]);Pt("dragstart",Xi,J?.current??null,!1,!1);const ei=p.useRef(),Zo=p.useCallback(H=>{const Q=Be.current;if(Fe!==void 0&&H.preventDefault(),Q===null||We===void 0)return;const fe=Mt(Q,H.clientX,H.clientY),[le,re]=fe.location,he=le-(G?0:1),[Me,pe]=ei.current??[];(Me!==he||pe!==re)&&(ei.current=[he,re],We([he,re],H.dataTransfer))},[G,Mt,We,Fe]);Pt("dragover",Zo,J?.current??null,!1,!1);const fc=p.useCallback(()=>{ei.current=void 0,K?.()},[K]);Pt("dragend",fc,J?.current??null,!1,!1);const V=p.useCallback(H=>{const Q=Be.current;if(Q===null||Fe===void 0)return;H.preventDefault();const fe=Mt(Q,H.clientX,H.clientY),[le,re]=fe.location,he=le-(G?0:1);Fe([he,re],H.dataTransfer)},[G,Mt,Fe]);Pt("drop",V,J?.current??null,!1,!1);const Nt=p.useCallback(()=>{ot?.()},[ot]);Pt("dragleave",Nt,J?.current??null,!1,!1);const Rt=p.useRef(S);Rt.current=S;const Mr=p.useRef(null),ti=p.useCallback(H=>{Be.current===null||!Be.current.contains(document.activeElement)||(H===null&&Rt.current.current!==void 0?$?.current?.focus({preventScroll:!0}):H!==null&&H.focus({preventScroll:!0}),Mr.current=H)},[$]);p.useImperativeHandle(t,()=>({focus:()=>{const H=Mr.current;H===null||!document.contains(H)?$?.current?.focus({preventScroll:!0}):H.focus({preventScroll:!0})},getBounds:(H,Q)=>{if(!($===void 0||$.current===null))return kt($.current,H??0,Q??-1)},damage:Bi}),[$,Bi,kt]);const Hn=p.useRef(),Wt=i1(()=>{if(n<50||at?.disableAccessibilityTree===!0)return null;let H=ku(bt,Ve,n,B,Ae);const Q=G?0:-1;!G&&H[0]?.sourceIndex===0&&(H=H.slice(1));const[fe,le]=S.current?.cell??[],re=S.current?.range,he=H.map(pe=>pe.sourceIndex),Me=ur(s,Math.min(h,s+i));return fe!==void 0&&le!==void 0&&!(he.includes(fe)&&Me.includes(le))&&ti(null),p.createElement("table",{key:"access-tree",role:"grid","aria-rowcount":h+1,"aria-multiselectable":"true","aria-colcount":bt.length+Q},p.createElement("thead",{role:"rowgroup"},p.createElement("tr",{role:"row","aria-rowindex":1},H.map(pe=>p.createElement("th",{role:"columnheader","aria-selected":S.columns.hasIndex(pe.sourceIndex),"aria-colindex":pe.sourceIndex+1+Q,tabIndex:-1,onFocus:be=>{if(be.target!==Mr.current)return Re?.([pe.sourceIndex,-1])},key:pe.sourceIndex},pe.title)))),p.createElement("tbody",{role:"rowgroup"},Me.map(pe=>p.createElement("tr",{role:"row","aria-selected":S.rows.hasIndex(pe),key:pe,"aria-rowindex":pe+2},H.map(be=>{const Oe=be.sourceIndex,yt=mn(Oe,pe),mt=fe===Oe&&le===pe,nt=re!==void 0&&Oe>=re.x&&Oe<re.x+re.width&&pe>=re.y&&pe<re.y+re.height,Ue=`glide-cell-${Oe}-${pe}`,gt=[Oe,pe],ze=f(gt,!0);return p.createElement("td",{key:yt,role:"gridcell","aria-colindex":Oe+1+Q,"aria-selected":nt,"aria-readonly":cr(ze)||!Ci(ze),id:Ue,"data-testid":Ue,onClick:()=>{const dt=$?.current;if(dt!=null)return ce?.({bounds:kt(dt,Oe,pe),cancel:()=>{},preventDefault:()=>{},stopPropagation:()=>{},ctrlKey:!1,key:"Enter",keyCode:13,metaKey:!1,shiftKey:!1,altKey:!1,rawEvent:void 0,location:gt})},onFocusCapture:dt=>{if(!(dt.target===Mr.current||Hn.current?.[0]===Oe&&Hn.current?.[1]===pe))return Hn.current=gt,Re?.(gt)},ref:mt?ti:void 0,tabIndex:-1},Iw(ze,$e))})))))},[n,bt,Ve,B,Ae,h,s,i,S,ti,f,$,ce,kt,Re],200),On=T===0||!E?0:Ve>T?1:pn(-Ae/100,0,1),Jo=-s*32+xt,Tr=L?pn(-Jo/100,0,1):0,Qo=p.useMemo(()=>{if(!On&&!Tr)return null;const H={position:"absolute",top:0,left:yr,width:n-yr,height:r,opacity:On,pointerEvents:"none",transition:Ke?void 0:"opacity 0.2s",boxShadow:"inset 13px 0 10px -13px rgba(0, 0, 0, 0.2)"},Q={position:"absolute",top:st,left:0,width:n,height:r,opacity:Tr,pointerEvents:"none",transition:Ce?void 0:"opacity 0.2s",boxShadow:"inset 0 13px 10px -13px rgba(0, 0, 0, 0.2)"};return p.createElement(p.Fragment,null,On>0&&p.createElement("div",{id:"shadow-x",style:H}),Tr>0&&p.createElement("div",{id:"shadow-y",style:Q}))},[On,Tr,yr,n,Ke,st,r,Ce]),ea=p.useMemo(()=>({position:"absolute",top:0,left:0}),[]);return p.createElement(p.Fragment,null,p.createElement("canvas",{"data-testid":"data-grid-canvas",tabIndex:0,onKeyDown:ht,onKeyUp:Jn,onFocus:y,onBlur:C,ref:Vo,style:Rr},Wt),p.createElement("canvas",{ref:ut,style:ea}),Qo)},Aw=p.memo(p.forwardRef(Pw));function Si(e,t,n,r){return pn(Math.round(t-(e.growOffset??0)),Math.ceil(n),Math.floor(r))}const Ow=e=>{const[t,n]=p.useState(),[r,i]=p.useState(),[o,a]=p.useState(),[s,l]=p.useState(),[u,c]=p.useState(!1),[d,h]=p.useState(),[f,g]=p.useState(),[m,x]=p.useState(),[_,y]=p.useState(!1),[C,P]=p.useState(),{onHeaderMenuClick:S,getCellContent:T,onColumnMoved:O,onColumnResize:A,onColumnResizeStart:E,onColumnResizeEnd:L,gridRef:R,maxColumnWidth:b,minColumnWidth:k,onRowMoved:I,lockColumns:w,onColumnProposeMove:N,onMouseDown:B,onMouseUp:G,onItemHovered:ce,onDragStart:z,canvasRef:M}=e,$=(A??L??E)!==void 0,{columns:W,selection:K}=e,J=K.columns,oe=p.useCallback(Se=>{const[ge,Ne]=Se.location;o!==void 0&&s!==ge&&ge>=w?(c(!0),l(ge)):f!==void 0&&Ne!==void 0?(y(!0),x(Math.max(0,Ne))):r===void 0&&!u&&!_&&ce?.(Se)},[o,f,s,ce,w,r,u,_]),ne=O!==void 0,ie=p.useCallback(Se=>{if(Se.button===0){const[ge,Ne]=Se.location;if(Se.kind==="out-of-bounds"&&Se.isEdge&&$){const Re=R?.current?.getBounds(W.length-1,-1);Re!==void 0&&(n(Re.x),i(W.length-1))}else if(Se.kind==="header"&&ge>=w){const Re=M?.current;if(Se.isEdge&&$&&Re){n(Se.bounds.x),i(ge);const Fe=Re.getBoundingClientRect().width/Re.offsetWidth,ot=Se.bounds.width/Fe;E?.(W[ge],ot,ge,ot+(W[ge].growOffset??0))}else Se.kind==="header"&&ne&&(h(Se.bounds.x),a(ge))}else Se.kind==="cell"&&w>0&&ge===0&&Ne!==void 0&&I!==void 0&&(P(Se.bounds.y),g(Ne))}B?.(Se)},[B,$,w,I,R,W,ne,E,M]),de=p.useCallback((Se,ge)=>{u||_||S?.(Se,ge)},[u,_,S]),me=p.useRef(-1),xe=p.useCallback(()=>{me.current=-1,g(void 0),x(void 0),P(void 0),y(!1),a(void 0),l(void 0),h(void 0),c(!1),i(void 0),n(void 0)},[]),ee=p.useCallback((Se,ge)=>{if(Se.button===0){if(r!==void 0){if(J?.hasIndex(r)===!0)for(const Re of J){if(Re===r)continue;const We=W[Re],Fe=Si(We,me.current,k,b);A?.(We,Fe,Re,Fe+(We.growOffset??0))}const Ne=Si(W[r],me.current,k,b);if(L?.(W[r],Ne,r,Ne+(W[r].growOffset??0)),J.hasIndex(r))for(const Re of J){if(Re===r)continue;const We=W[Re],Fe=Si(We,me.current,k,b);L?.(We,Fe,Re,Fe+(We.growOffset??0))}}xe(),o!==void 0&&s!==void 0&&O?.(o,s),f!==void 0&&m!==void 0&&I?.(f,m)}G?.(Se,ge)},[G,r,o,s,f,m,J,L,W,k,b,A,O,I,xe]),Pe=p.useMemo(()=>{if(!(o===void 0||s===void 0)&&o!==s&&N?.(o,s)!==!1)return{src:o,dest:s}},[o,s,N]),Ge=p.useCallback(Se=>{const ge=M?.current;if(o!==void 0&&d!==void 0)Math.abs(Se.clientX-d)>20&&c(!0);else if(f!==void 0&&C!==void 0)Math.abs(Se.clientY-C)>20&&y(!0);else if(r!==void 0&&t!==void 0&&ge){const Re=ge.getBoundingClientRect().width/ge.offsetWidth,We=(Se.clientX-t)/Re,Fe=W[r],ot=Si(Fe,We,k,b);if(A?.(Fe,ot,r,ot+(Fe.growOffset??0)),me.current=We,J?.first()===r)for(const Je of J){if(Je===r)continue;const Ke=W[Je],Ce=Si(Ke,me.current,k,b);A?.(Ke,Ce,Je,Ce+(Ke.growOffset??0))}}},[o,d,f,C,r,t,W,k,b,A,J,M]),Ze=p.useCallback((Se,ge)=>{if(f===void 0||m===void 0)return T(Se,ge);let[Ne,Re]=Se;return Re===m?Re=f:(Re>m&&(Re-=1),Re>=f&&(Re+=1)),T([Ne,Re],ge)},[f,m,T]),Ct=p.useCallback(Se=>{z?.(Se),Se.defaultPrevented()||xe()},[xe,z]);return p.createElement(Aw,{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,verticalBorder:e.verticalBorder,width:e.width,getCellContent:Ze,isResizing:r!==void 0,onHeaderMenuClick:de,isDragging:u,onItemHovered:oe,onDragStart:Ct,onMouseDown:ie,allowResize:$,onMouseUp:ee,dragAndDropState:Pe,onMouseMoveRaw:Ge,ref:R})};function Dw(e){const t=se.useRef(null),[n,r]=se.useState({width:e?.[0],height:e?.[1]});return se.useLayoutEffect(()=>{const i=a=>{for(const s of a){const{width:l,height:u}=s&&s.contentRect||{};r(c=>c.width===l&&c.height===u?c:{width:l,height:u})}},o=new window.ResizeObserver(i);return t.current&&o.observe(t.current,void 0),()=>{o.disconnect()}},[t.current]),{ref:t,...n}}const Fw=(e,t,n)=>{const r=se.useRef(null),i=se.useRef(null),o=se.useRef(null),a=se.useRef(0),s=se.useRef(t);s.current=t;const l=n.current;se.useEffect(()=>{const u=()=>{if(i.current===!1&&l!==null){const h=[l.scrollLeft,l.scrollTop];if(o.current?.[0]===h[0]&&o.current?.[1]===h[1])if(a.current>10){o.current=null,i.current=null;return}else a.current++;else a.current=0,s.current(h[0],h[1]),o.current=h;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=h=>{h.touches.length===0&&(i.current=!1,a.current=0,r.current=window.setTimeout(u,8.333333333333334))};if(e&&l!==null){const h=l;return h.addEventListener("touchstart",c),h.addEventListener("touchend",d),()=>{h.removeEventListener("touchstart",c),h.removeEventListener("touchend",d),r.current!==null&&window.clearTimeout(r.current)}}},[e,l])},zw=()=>e=>e.isSafari?"scroll":"auto",Lw=Ut("div")({name:"ScrollRegionStyle",class:"gdg-s1dgczr6",propsAsIs:!1,vars:{"s1dgczr6-0":[zw()]}});function Hw(e){const[t,n]=p.useState(!1),r=typeof window>"u"?null:window,i=p.useRef(0);return Pt("touchstart",p.useCallback(()=>{window.clearTimeout(i.current),n(!0)},[]),r,!0,!1),Pt("touchend",p.useCallback(o=>{o.touches.length===0&&(i.current=window.setTimeout(()=>n(!1),e))},[e]),r,!0,!1),t}const qw=e=>{const{children:t,clientHeight:n,scrollHeight:r,scrollWidth:i,update:o,draggable:a,className:s,preventDiagonalScrolling:l=!1,paddingBottom:u=0,paddingRight:c=0,rightElement:d,rightElementProps:h,kineticScrollPerfHack:f=!1,scrollRef:g,initialSize:m}=e,x=[],_=h?.sticky??!1,y=h?.fill??!1,C=p.useRef(0),P=p.useRef(0),S=p.useRef(null),T=typeof window>"u"?1:window.devicePixelRatio,O=p.useRef({scrollLeft:0,scrollTop:0,lockDirection:void 0}),A=p.useRef(null),E=Hw(200),[L,R]=p.useState(!0),b=p.useRef(0);p.useLayoutEffect(()=>{if(!L||E||O.current.lockDirection===void 0)return;const W=S.current;if(W===null)return;const[K,J]=O.current.lockDirection;K!==void 0?W.scrollLeft=K:J!==void 0&&(W.scrollTop=J),O.current.lockDirection=void 0},[E,L]);const k=p.useCallback((W,K)=>{const J=S.current;if(J===null)return;K=K??J.scrollTop,W=W??J.scrollLeft;const oe=O.current.scrollTop,ne=O.current.scrollLeft,ie=W-ne,de=K-oe;E&&ie!==0&&de!==0&&(Math.abs(ie)>3||Math.abs(de)>3)&&l&&O.current.lockDirection===void 0&&(O.current.lockDirection=Math.abs(ie)<Math.abs(de)?[ne,void 0]:[void 0,oe]);const me=O.current.lockDirection;W=me?.[0]??W,K=me?.[1]??K,O.current.scrollLeft=W,O.current.scrollTop=K;const xe=J.clientWidth,ee=J.clientHeight,Pe=K,Ge=P.current-Pe,Ze=J.scrollHeight-ee;if(P.current=Pe,Ze>0&&(Math.abs(Ge)>2e3||Pe===0||Pe===Ze)&&r>J.scrollHeight+5){const Ct=Pe/Ze,Se=(r-ee)*Ct;C.current=Se-Pe}me!==void 0&&(window.clearTimeout(b.current),R(!1),b.current=window.setTimeout(()=>R(!0),200)),o({x:W,y:Pe+C.current,width:xe-c,height:ee-u,paddingRight:A.current?.clientWidth??0})},[u,c,r,o,l,E]);Fw(f&&Eo.value,k,S);const I=p.useRef(k);I.current=k;const w=p.useRef(),N=p.useRef(!1);p.useLayoutEffect(()=>{N.current?k():N.current=!0},[k,u,c]);const B=p.useCallback(W=>{S.current=W,g!==void 0&&(g.current=W)},[g]);let G=0,ce=0;for(x.push(p.createElement("div",{key:G++,style:{width:i,height:0}}));ce<r;){const W=Math.min(5e6,r-ce);x.push(p.createElement("div",{key:G++,style:{width:0,height:W}})),ce+=W}const{ref:z,width:M,height:$}=Dw(m);return typeof window<"u"&&(w.current?.height!==$||w.current?.width!==M)&&(window.setTimeout(()=>I.current(),0),w.current={width:M,height:$}),(M??0)===0||($??0)===0?p.createElement("div",{ref:z}):p.createElement("div",{ref:z},p.createElement(Lw,{isSafari:Eo.value},p.createElement("div",{className:"dvn-underlay"},t),p.createElement("div",{ref:B,style:w.current,draggable:a,onDragStart:W=>{a||(W.stopPropagation(),W.preventDefault())},className:"dvn-scroller "+(s??""),onScroll:()=>k()},p.createElement("div",{className:"dvn-scroll-inner"+(d===void 0?" dvn-hidden":"")},p.createElement("div",{className:"dvn-stack"},x),d!==void 0&&p.createElement(p.Fragment,null,!y&&p.createElement("div",{className:"dvn-spacer"}),p.createElement("div",{ref:A,style:{height:$,maxHeight:n-Math.ceil(T%1),position:"sticky",top:0,paddingLeft:1,marginBottom:-40,marginRight:c,flexGrow:y?1:void 0,right:_?c??0:void 0,pointerEvents:"auto"}},d))))))},$w=e=>{const{columns:t,rows:n,rowHeight:r,headerHeight:i,groupHeaderHeight:o,enableGroups:a,freezeColumns:s,experimental:l,nonGrowWidth:u,clientSize:c,className:d,onVisibleRegionChanged:h,scrollRef:f,preventDiagonalScrolling:g,rightElement:m,rightElementProps:x,overscrollX:_,overscrollY:y,initialSize:C,smoothScrollX:P=!1,smoothScrollY:S=!1,isDraggable:T}=e,{paddingRight:O,paddingBottom:A}=l??{},[E,L]=c,R=p.useRef(),b=p.useRef(),k=p.useRef(),I=p.useRef(),w=u+Math.max(0,_??0);let N=a?i+o:i;if(typeof r=="number")N+=n*r;else for(let z=0;z<n;z++)N+=r(z);y!==void 0&&(N+=y);const B=p.useRef(),G=p.useCallback(()=>{if(B.current===void 0)return;const z={...B.current};let M=0,$=z.x<0?-z.x:0,W=0,K=0;z.x=z.x<0?0:z.x;let J=0;for(let xe=0;xe<s;xe++)J+=t[xe].width;for(const xe of t){const ee=M-J;if(z.x>=ee+xe.width)M+=xe.width,K++,W++;else if(z.x>ee)M+=xe.width,P?$+=ee-z.x:K++,W++;else if(z.x+z.width>ee)M+=xe.width,W++;else break}let oe=0,ne=0,ie=0;if(typeof r=="number")S?(ne=Math.floor(z.y/r),oe=ne*r-z.y):ne=Math.ceil(z.y/r),ie=Math.ceil(z.height/r)+ne,oe<0&&ie++;else{let xe=0;for(let ee=0;ee<n;ee++){const Pe=r(ee),Ge=xe+(S?0:Pe/2);if(z.y>=xe+Pe)xe+=Pe,ne++,ie++;else if(z.y>Ge)xe+=Pe,S?oe+=Ge-z.y:ne++,ie++;else if(z.y+z.height>Pe/2+xe)xe+=Pe,ie++;else break}}const de={x:K,y:ne,width:W-K,height:ie-ne},me=R.current;(me===void 0||me.y!==de.y||me.x!==de.x||me.height!==de.height||me.width!==de.width||b.current!==$||k.current!==oe||z.width!==I.current?.[0]||z.height!==I.current?.[1])&&(h?.({x:K,y:ne,width:W-K,height:ie-ne},z.width,z.height,z.paddingRight??0,$,oe),R.current=de,b.current=$,k.current=oe,I.current=[z.width,z.height])},[t,r,n,h,s,P,S]),ce=p.useCallback(z=>{B.current=z,G()},[G]);return p.useEffect(()=>{G()},[G]),p.createElement(qw,{scrollRef:f,className:d,kineticScrollPerfHack:l?.kineticScrollPerfHack,preventDiagonalScrolling:g,draggable:T===!0||typeof T=="string",scrollWidth:w+(O??0),scrollHeight:N+(A??0),clientHeight:L,rightElement:m,paddingBottom:A,paddingRight:O,rightElementProps:x,update:ce,initialSize:C},p.createElement(Ow,{eventTargetRef:f,width:E,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,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}))},Nw=Ut("div")({name:"SearchWrapper",class:"gdg-seveqep",propsAsIs:!1}),Ww=p.createElement("svg",{className:"button-icon",viewBox:"0 0 512 512"},p.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"48",d:"M112 244l144-144 144 144M256 120v292"})),Bw=p.createElement("svg",{className:"button-icon",viewBox:"0 0 512 512"},p.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"48",d:"M112 268l144 144 144-144M256 392V100"})),jw=p.createElement("svg",{className:"button-icon",viewBox:"0 0 512 512"},p.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"M368 368L144 144M368 144L144 368"})),Uw=10,Yw=e=>{const{canvasRef:t,cellYOffset:n,rows:r,columns:i,searchInputRef:o,searchValue:a,searchResults:s,onSearchValueChange:l,getCellsForSelection:u,onSearchResultsChanged:c,showSearch:d=!1,onSearchClose:h}=e,[f]=p.useState(()=>"search-box-"+Math.round(Math.random()*1e3)),[g,m]=p.useState(""),x=a??g,_=p.useCallback(M=>{m(M),l?.(M)},[l]),[y,C]=p.useState(),P=p.useRef(y);P.current=y,p.useEffect(()=>{s!==void 0&&(s.length>0?C(M=>({rowsSearched:r,results:s.length,selectedIndex:M?.selectedIndex??-1})):C(void 0))},[r,s]);const S=p.useRef();S.current===void 0&&(S.current=new AbortController);const T=p.useRef(),[O,A]=p.useState([]),E=s??O,L=p.useCallback(()=>{T.current!==void 0&&(window.cancelAnimationFrame(T.current),T.current=void 0,S.current.abort())},[]),R=p.useRef(n);R.current=n;const b=p.useCallback(M=>{const $=new RegExp(M.replace(/([$()*+.?[\\\]^{|}-])/g,"\\$1"),"i");let W=R.current,K=Math.min(10,r),J=0;C(void 0),A([]);const oe=[],ne=async()=>{if(u===void 0)return;const ie=performance.now(),de=r-J;let me=u({x:0,y:W,width:i.length,height:Math.min(K,de,r-W)},S.current.signal);typeof me=="function"&&(me=await me());let xe=!1;for(const[Se,ge]of me.entries())for(const[Ne,Re]of ge.entries()){let We;switch(Re.kind){case ue.Text:case ue.Number:We=Re.displayData;break;case ue.Uri:case ue.Markdown:We=Re.data;break;case ue.Boolean:We=typeof Re.data=="boolean"?Re.data.toString():void 0;break;case ue.Image:case ue.Bubble:We=Re.data.join("🐳");break;case ue.Custom:We=Re.copyData;break}We!==void 0&&$.test(We)&&(oe.push([Ne,Se+W]),xe=!0)}const ee=performance.now();xe&&A([...oe]),J+=me.length,en(J<=r);const Pe=P.current?.selectedIndex??-1;C({results:oe.length,rowsSearched:J,selectedIndex:Pe}),c?.(oe,Pe),W+K>=r?W=0:W+=K;const Ge=ee-ie,Ze=Math.max(Ge,1),Ct=Uw/Ze;K=Math.ceil(K*Ct),J<r&&oe.length<1e3&&(T.current=window.requestAnimationFrame(ne))};L(),T.current=window.requestAnimationFrame(ne)},[L,i.length,u,c,r]),k=p.useCallback(()=>{h?.(),C(void 0),A([]),c?.([],-1),L(),t?.current?.focus()},[L,t,h,c]),I=p.useCallback(M=>{_(M.target.value),s===void 0&&(M.target.value===""?(C(void 0),A([]),L()):b(M.target.value))},[b,L,_,s]);p.useEffect(()=>{d&&o.current!==null&&(_(""),o.current.focus({preventScroll:!0}))},[d,o,_]);const w=p.useCallback(M=>{if(M?.stopPropagation?.(),y===void 0)return;const $=(y.selectedIndex+1)%y.results;C({...y,selectedIndex:$}),c?.(E,$)},[y,c,E]),N=p.useCallback(M=>{if(M?.stopPropagation?.(),y===void 0)return;let $=(y.selectedIndex-1)%y.results;$<0&&($+=y.results),C({...y,selectedIndex:$}),c?.(E,$)},[c,E,y]),B=p.useCallback(M=>{(M.ctrlKey||M.metaKey)&&M.nativeEvent.code==="KeyF"||M.key==="Escape"?(k(),M.stopPropagation(),M.preventDefault()):M.key==="Enter"&&(M.shiftKey?N():w())},[k,w,N]);p.useEffect(()=>()=>{L()},[L]);const[G,ce]=p.useState(!1);p.useEffect(()=>{if(d)ce(!0);else{const M=setTimeout(()=>ce(!1),150);return()=>clearTimeout(M)}},[d]);const z=p.useMemo(()=>{if(!d&&!G)return null;let M;y!==void 0&&(M=y.results>=1e3?"over 1000":`${y.results} result${y.results!==1?"s":""}`,y.selectedIndex>=0&&(M=`${y.selectedIndex+1} of ${M}`));const $=J=>{J.stopPropagation()},K={width:`${Math.floor((y?.rowsSearched??0)/r*100)}%`};return p.createElement(Nw,{className:d?"":"out",onMouseDown:$,onMouseMove:$,onMouseUp:$,onClick:$},p.createElement("div",{className:"gdg-search-bar-inner"},p.createElement("input",{id:f,"aria-hidden":!d,"data-testid":"search-input",ref:o,onChange:I,value:x,tabIndex:d?void 0:-1,onKeyDownCapture:B}),p.createElement("button",{"aria-label":"Previous Result","aria-hidden":!d,tabIndex:d?void 0:-1,onClick:N,disabled:(y?.results??0)===0},Ww),p.createElement("button",{"aria-label":"Next Result","aria-hidden":!d,tabIndex:d?void 0:-1,onClick:w,disabled:(y?.results??0)===0},Bw),h!==void 0&&p.createElement("button",{"aria-label":"Close Search","aria-hidden":!d,"data-testid":"search-close-button",tabIndex:d?void 0:-1,onClick:k},jw)),y!==void 0?p.createElement(p.Fragment,null,p.createElement("div",{className:"gdg-search-status"},p.createElement("div",{"data-testid":"search-result-area"},M)),p.createElement("div",{className:"gdg-search-progress",style:K})):p.createElement("div",{className:"gdg-search-status"},p.createElement("label",{htmlFor:f},"Type to search")))},[d,G,y,r,f,o,I,x,B,N,w,h,k]);return p.createElement(p.Fragment,null,p.createElement($w,{prelightCells:E,accessibilityHeight:e.accessibilityHeight,canvasRef:e.canvasRef,cellXOffset:e.cellXOffset,cellYOffset:e.cellYOffset,className:e.className,clientSize:e.clientSize,columns:e.columns,disabledRows:e.disabledRows,enableGroups:e.enableGroups,fillHandle:e.fillHandle,firstColAccessible:e.firstColAccessible,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,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}),z)};class Zp extends p.PureComponent{wrapperRef=p.createRef();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)}clickOutside=t=>{if(!(this.props.isOutsideClick&&!this.props.isOutsideClick(t))&&this.wrapperRef.current!==null&&!this.wrapperRef.current.contains(t.target)){let n=t.target;for(;n!==null;){if(n.classList.contains("click-outside-ignore"))return;n=n.parentElement}this.props.onClickOutside()}};render(){const{onClickOutside:t,isOutsideClick:n,...r}=this.props;return p.createElement("div",{...r,ref:this.wrapperRef},this.props.children)}}const Gw=()=>e=>Math.max(16,e.targetHeight-10),Xw=Ut("input")({name:"RenameInput",class:"gdg-r17m35ur",propsAsIs:!1,vars:{"r17m35ur-0":[Gw(),"px"]}}),Kw=e=>{const{bounds:t,group:n,onClose:r,canvasBounds:i,onFinish:o}=e,[a,s]=se.useState(n);return se.createElement(Zp,{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(Xw,{targetHeight:t.height,"data-testid":"group-rename-input",value:a,onBlur:r,onFocus:l=>l.target.setSelectionRange(0,a.length),onChange:l=>s(l.target.value),onKeyDown:l=>{l.key==="Enter"?o(a):l.key==="Escape"&&r()},autoFocus:!0}))};function Vw(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 Le(e,t,n){const r=Jp(e,t);return r&&(n.didMatch=!0),r}function Jp(e,t){if(e.length===0)return!1;if(e.includes("|")){const l=e.split("|");for(const u of l)if(Jp(u,t))return!0;return!1}let n=!1,r=!1,i=!1,o=!1;const a=e.split("+"),s=a.pop();if(!Vw(s,t))return!1;if(a[0]==="any")return!0;for(const l of a)switch(l){case"ctrl":n=!0;break;case"shift":r=!0;break;case"alt":i=!0;break;case"meta":o=!0;break;case"primary":Mo.value?o=!0:n=!0;break}return t.altKey===i&&t.ctrlKey===n&&t.shiftKey===r&&t.metaKey===o}function Zw(e,t,n,r,i,o){const a=se.useCallback((u,c,d,h)=>{(o==="cell"||o==="multi-cell")&&u!==void 0&&(u={...u,range:{x:u.cell[0],y:u.cell[1],width:1,height:1}});const f=n==="mixed"&&(d||h==="drag"),g=r==="mixed"&&f,m=i==="mixed"&&f;let x={current:u===void 0?void 0:{...u,rangeStack:h==="drag"?e.current?.rangeStack??[]:[]},columns:g?e.columns:qe.empty(),rows:m?e.rows:qe.empty()};d&&(o==="multi-rect"||o==="multi-cell")&&x.current!==void 0&&e.current!==void 0&&(x={...x,current:{...x.current,rangeStack:[...e.current.rangeStack,e.current.range]}}),t(x,c)},[r,e,n,o,i,t]),s=se.useCallback((u,c,d)=>{u=u??e.rows,c!==void 0&&(u=u.add(c));let h;if(i==="exclusive"&&u.length>0)h={current:void 0,columns:qe.empty(),rows:u};else{const f=d&&n==="mixed",g=d&&r==="mixed";h={current:f?e.current:void 0,columns:g?e.columns:qe.empty(),rows:u}}t(h,!1)},[r,e,n,i,t]),l=se.useCallback((u,c,d)=>{u=u??e.columns,c!==void 0&&(u=u.add(c));let h;if(r==="exclusive"&&u.length>0)h={current:void 0,rows:qe.empty(),columns:u};else{const f=d&&n==="mixed",g=d&&i==="mixed";h={current:f?e.current:void 0,rows:g?e.rows:qe.empty(),columns:u}}t(h,!1)},[r,e,n,i,t]);return[a,s,l]}function Jw(e,t,n,r,i){const o=p.useCallback(u=>{if(e===!0){const c=[];for(let d=u.y;d<u.y+u.height;d++){const h=[];for(let f=u.x;f<u.x+u.width;f++)f<0||d>=i?h.push({kind:ue.Loading,allowOverlay:!1}):h.push(t([f,d]));c.push(h)}return c}return e?.(u,r.signal)??[]},[r.signal,t,e,i]),a=e!==void 0?o:void 0,s=p.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(h=>[{kind:ue.Loading,allowOverlay:!1},...h]):d.map(h=>[{kind:ue.Loading,allowOverlay:!1},...h])}return a(c,r.signal)},[r.signal,a,n]);return[e!==void 0?s:void 0,a]}function Qw(e){if(e.copyData!==void 0)return{formatted:e.copyData,rawValue:e.copyData,format:"string"};switch(e.kind){case ue.Boolean:return{formatted:e.data===!0?"TRUE":e.data===!1?"FALSE":e.data===Yu?"INDETERMINATE":"",rawValue:e.data,format:"boolean"};case ue.Custom:return{formatted:e.copyData,rawValue:e.copyData,format:"string"};case ue.Image:case ue.Bubble:return{formatted:e.data,rawValue:e.data,format:"string-array"};case ue.Drilldown:return{formatted:e.data.map(t=>t.text),rawValue:e.data.map(t=>t.text),format:"string-array"};case ue.Text:return{formatted:e.displayData??e.data,rawValue:e.data,format:"string"};case ue.Uri:return{formatted:e.displayData??e.data,rawValue:e.data,format:"url"};case ue.Markdown:case ue.RowID:return{formatted:e.data,rawValue:e.data,format:"string"};case ue.Number:return{formatted:e.displayData,rawValue:e.data,format:"number"};case ue.Loading:return{formatted:"#LOADING",rawValue:"",format:"string"};case ue.Protected:return{formatted:"************",rawValue:"",format:"string"};default:Ti()}}function eb(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"}:Qw(a))})}function wg(e,t){return(t?/[\t\n",]/:/[\t\n"]/).test(e)&&(e=`"${e.replace(/"/g,'""')}"`),e}function tb(e){const t=[];for(const n of e){const r=[];for(const i of n)i.format==="url"?r.push(i.rawValue?.toString()??""):i.format==="string-array"?r.push(i.formatted.map(o=>wg(o,!0)).join(",")):r.push(wg(i.formatted,!1));t.push(r.join(" "))}return t.join(`
209
+ `)}function fu(e){return e.replace(/\t/g," ").replace(/ {2,}/g,t=>"<span> </span>".repeat(t.length))}function bg(e){return'"'+e.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/</g,"&lt;").replace(/>/g,"&gt;")+'"'}function nb(e){return e.replace(/&quot;/g,'"').replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&amp;/g,"&")}function rb(e){const t=[];t.push('<style type="text/css"><!--br {mso-data-placement:same-cell;}--></style>',"<table><tbody>");for(const n of e){t.push("<tr>");for(const r of n){const i=`gdg-format="${r.format}"`;r.format==="url"?t.push(`<td ${i}><a href="${r.rawValue}">${fu(r.formatted)}</a></td>`):r.format==="string-array"?t.push(`<td ${i}><ol>${r.formatted.map((o,a)=>`<li gdg-raw-value=${bg(r.rawValue[a])}>`+fu(o)+"</li>").join("")}</ol></td>`):t.push(`<td gdg-raw-value=${bg(r.rawValue?.toString()??"")} ${i}>${fu(r.formatted)}</td>`)}t.push("</tr>")}return t.push("</tbody></table>"),t.join("")}function ib(e,t){const n=eb(e,t),r=tb(n),i=rb(n);return{textPlain:r,textHtml:i}}function Sg(e){const t=document.createElement("html");t.innerHTML=e.replace(/&nbsp;/g," ");const n=t.querySelector("table");if(n===null)return;const r=[n],i=[];let o;for(;r.length>0;){const a=r.pop();if(a===void 0)break;if(a instanceof HTMLTableElement||a.nodeName==="TBODY")r.push(...[...a.children].reverse());else if(a instanceof HTMLTableRowElement)o!==void 0&&i.push(o),o=[],r.push(...[...a.children].reverse());else if(a instanceof HTMLTableCellElement){const s=a.cloneNode(!0),u=s.children.length===1&&s.children[0].nodeName==="P"?s.children[0]:null,c=u?.children.length===1&&u.children[0].nodeName==="FONT",d=s.querySelectorAll("br");for(const g of d)g.replaceWith(`
210
+ `);const h=s.getAttribute("gdg-raw-value"),f=s.getAttribute("gdg-format")??"string";if(s.querySelector("a")!==null)o?.push({rawValue:s.querySelector("a")?.getAttribute("href")??"",formatted:s.textContent??"",format:f});else if(s.querySelector("ol")!==null){const g=s.querySelectorAll("li");o?.push({rawValue:[...g].map(m=>m.getAttribute("gdg-raw-value")??""),formatted:[...g].map(m=>m.textContent??""),format:"string-array"})}else if(h!==null)o?.push({rawValue:nb(h),formatted:s.textContent??"",format:f});else{let g=s.textContent??"";c&&(g=g.replace(/\n(?!\n)/g,"")),o?.push({rawValue:g??"",formatted:g??"",format:f})}}}return o!==void 0&&i.push(o),i}function ob(e,t,n,r,i){const o=e;if(r==="allowPartial"||e.current===void 0||t===void 0)return e;let a=!1;do{if(e?.current===void 0)break;const s=e.current?.range,l=[];if(s.width>2){const d=t({x:s.x,y:s.y,width:1,height:s.height},i.signal);if(typeof d=="function")return o;l.push(...d);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;l.push(...h)}else{const d=t({x:s.x,y:s.y,width:s.width,height:s.height},i.signal);if(typeof d=="function")return o;l.push(...d)}let u=s.x-n,c=s.x+s.width-1-n;for(const d of l)for(const h of d)h.span!==void 0&&(u=Math.min(h.span[0],u),c=Math.max(h.span[1],c));u===s.x-n&&c===s.x+s.width-1-n?a=!0:e={current:{cell:e.current.cell??[0,0],range:{x:u+n,y:s.y,width:c-u+1,height:s.height},rangeStack:e.current.rangeStack},columns:e.columns,rows:e.rows}}while(!a);return e}function Cg(e){return e.startsWith('"')&&e.endsWith('"')&&(e=e.slice(1,-1).replace(/""/g,'"')),e}function ab(e){let t;(function(s){s[s.None=0]="None",s[s.inString=1]="inString",s[s.inStringPostQuote=2]="inStringPostQuote"})(t||(t={}));const n=[];let r=[],i=0,o=t.None;e=e.replace(/\r\n/g,`
211
+ `);let a=0;for(const s of e){switch(o){case t.None:s===" "||s===`
212
+ `?(r.push(e.slice(i,a)),i=a+1,s===`
213
+ `&&(n.push(r),r=[])):s==='"'&&(o=t.inString);break;case t.inString:s==='"'&&(o=t.inStringPostQuote);break;case t.inStringPostQuote:s==='"'?o=t.inString:((s===" "||s===`
214
+ `)&&(r.push(Cg(e.slice(i,a))),i=a+1,s===`
215
+ `&&(n.push(r),r=[])),o=t.None);break}a++}return i<e.length&&r.push(Cg(e.slice(i,e.length))),n.push(r),n.map(s=>s.map(l=>({rawValue:l,formatted:l,format:"string"})))}function xg(e,t,n){const r=ib(e,t),i=s=>{window.navigator.clipboard?.writeText(s)},o=(s,l)=>window.navigator.clipboard?.write===void 0?!1:(window.navigator.clipboard.write([new ClipboardItem({"text/plain":new Blob([s],{type:"text/plain"}),"text/html":new Blob([l],{type:"text/html"})})]),!0),a=(s,l)=>{try{if(n===void 0||n.clipboardData===null)throw new Error("No clipboard data");n?.clipboardData?.setData("text/plain",s),n?.clipboardData?.setData("text/html",l)}catch{o(s,l)||i(s)}};window.navigator.clipboard?.write!==void 0||n?.clipboardData!==void 0?a(r.textPlain,r.textHtml):i(r.textPlain),n?.preventDefault()}function Qp(e){return e!==!0}function _g(e){return typeof e=="string"?e:`${e}px`}const sb=()=>e=>e.innerWidth,lb=()=>e=>e.innerHeight,ub=Ut("div")({name:"Wrapper",class:"gdg-wmyidgi",propsAsIs:!1,vars:{"wmyidgi-0":[sb()],"wmyidgi-1":[lb()]}}),cb=e=>{const{inWidth:t,inHeight:n,children:r,...i}=e;return p.createElement(ub,{innerHeight:_g(n),innerWidth:_g(t),...i},r)},db=2,fb=1300;function hb(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,s=0;const l=u=>{if(!a){if(s===0)s=u;else{const c=u-s;r.current=Math.min(1,r.current+c/fb);const d=r.current**1.618*c*db;t.current?.scrollBy(i*d,o*d),s=u,n?.()}window.requestAnimationFrame(l)}};return window.requestAnimationFrame(l),()=>{a=!0}},[t,i,o,n])}function gb({rowHeight:e,headerHeight:t,groupHeaderHeight:n,theme:r,overscrollX:i,overscrollY:o,scaleToRem:a,remSize:s}){const[l,u,c,d,h,f]=se.useMemo(()=>{if(!a||s===16)return[e,t,n,r,i,o];const g=s/16,m=e,x=kp();return[typeof m=="number"?m*g:_=>Math.ceil(m(_)*g),Math.ceil(t*g),Math.ceil(n*g),{...r,headerIconSize:(r?.headerIconSize??x.headerIconSize)*g,cellHorizontalPadding:(r?.cellHorizontalPadding??x.cellHorizontalPadding)*g,cellVerticalPadding:(r?.cellVerticalPadding??x.cellVerticalPadding)*g},Math.ceil((i??0)*g),Math.ceil((o??0)*g)]},[n,t,i,o,s,e,a,r]);return{rowHeight:l,headerHeight:u,groupHeaderHeight:c,theme:d,overscrollX:h,overscrollY:f}}const Wn={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 He(e,t){return e===!0?t:e===!1?"":e}function kg(e){const t=Mo.value;return{activateCell:He(e.activateCell," |Enter|shift+Enter"),clear:He(e.clear,"any+Escape"),closeOverlay:He(e.closeOverlay,"any+Escape"),acceptOverlayDown:He(e.acceptOverlayDown,"Enter"),acceptOverlayUp:He(e.acceptOverlayUp,"shift+Enter"),acceptOverlayLeft:He(e.acceptOverlayLeft,"shift+Tab"),acceptOverlayRight:He(e.acceptOverlayRight,"Tab"),copy:e.copy,cut:e.cut,delete:He(e.delete,t?"Backspace|Delete":"Delete"),downFill:He(e.downFill,"primary+_68"),scrollToSelectedCell:He(e.scrollToSelectedCell,"primary+Enter"),goDownCell:He(e.goDownCell,"ArrowDown"),goDownCellRetainSelection:He(e.goDownCellRetainSelection,"alt+ArrowDown"),goLeftCell:He(e.goLeftCell,"ArrowLeft|shift+Tab"),goLeftCellRetainSelection:He(e.goLeftCellRetainSelection,"alt+ArrowLeft"),goRightCell:He(e.goRightCell,"ArrowRight|Tab"),goRightCellRetainSelection:He(e.goRightCellRetainSelection,"alt+ArrowRight"),goUpCell:He(e.goUpCell,"ArrowUp"),goUpCellRetainSelection:He(e.goUpCellRetainSelection,"alt+ArrowUp"),goToFirstCell:He(e.goToFirstCell,"primary+Home"),goToFirstColumn:He(e.goToFirstColumn,"Home|primary+ArrowLeft"),goToFirstRow:He(e.goToFirstRow,"primary+ArrowUp"),goToLastCell:He(e.goToLastCell,"primary+End"),goToLastColumn:He(e.goToLastColumn,"End|primary+ArrowRight"),goToLastRow:He(e.goToLastRow,"primary+ArrowDown"),goToNextPage:He(e.goToNextPage,"PageDown"),goToPreviousPage:He(e.goToPreviousPage,"PageUp"),paste:e.paste,rightFill:He(e.rightFill,"primary+_82"),search:He(e.search,"primary+f"),selectAll:He(e.selectAll,"primary+a"),selectColumn:He(e.selectColumn,"ctrl+ "),selectGrowDown:He(e.selectGrowDown,"shift+ArrowDown"),selectGrowLeft:He(e.selectGrowLeft,"shift+ArrowLeft"),selectGrowRight:He(e.selectGrowRight,"shift+ArrowRight"),selectGrowUp:He(e.selectGrowUp,"shift+ArrowUp"),selectRow:He(e.selectRow,"shift+ "),selectToFirstCell:He(e.selectToFirstCell,"primary+shift+Home"),selectToFirstColumn:He(e.selectToFirstColumn,"primary+shift+ArrowLeft"),selectToFirstRow:He(e.selectToFirstRow,"primary+shift+ArrowUp"),selectToLastCell:He(e.selectToLastCell,"primary+shift+End"),selectToLastColumn:He(e.selectToLastColumn,"primary+shift+ArrowRight"),selectToLastRow:He(e.selectToLastRow,"primary+shift+ArrowDown")}}function pb(e){const t=u1(e);return se.useMemo(()=>{if(t===void 0)return kg(Wn);const n={...t,goToNextPage:t?.goToNextPage??t?.pageDown??Wn.goToNextPage,goToPreviousPage:t?.goToPreviousPage??t?.pageUp??Wn.goToPreviousPage,goToFirstCell:t?.goToFirstCell??t?.first??Wn.goToFirstCell,goToLastCell:t?.goToLastCell??t?.last??Wn.goToLastCell,selectToFirstCell:t?.selectToFirstCell??t?.first??Wn.selectToFirstCell,selectToLastCell:t?.selectToLastCell??t?.last??Wn.selectToLastCell};return kg({...Wn,...n})},[t])}const mb=p.lazy(async()=>await Promise.resolve().then(()=>require("./data-grid-overlay-editor-Ci2nTYa8.cjs")));let vb=0;function yb(e){return wv(Zf(Zf(e).filter(t=>t.span!==void 0).map(t=>ur((t.span?.[0]??0)+1,(t.span?.[1]??0)+1))))}function vo(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 hu={kind:ue.Loading,allowOverlay:!1},yo={columns:qe.empty(),rows:qe.empty(),current:void 0},wb=(e,t)=>{const[n,r]=p.useState(yo),[i,o]=p.useState(),a=p.useRef(null),s=p.useRef(null),[l,u]=p.useState(),c=p.useRef(null),d=p.useRef(),h=typeof window>"u"?null:window,{imageEditorOverride:f,getRowThemeOverride:g,markdownDivCreateNode:m,width:x,height:_,columns:y,rows:C,getCellContent:P,onCellClicked:S,onCellActivated:T,onFillPattern:O,onFinishedEditing:A,coercePasteValue:E,drawHeader:L,drawCell:R,editorBloom:b,onHeaderClicked:k,onColumnProposeMove:I,spanRangeBehavior:w="default",onGroupHeaderClicked:N,onCellContextMenu:B,className:G,onHeaderContextMenu:ce,getCellsForSelection:z,onGroupHeaderContextMenu:M,onGroupHeaderRenamed:$,onCellEdited:W,onCellsEdited:K,onSearchResultsChanged:J,searchResults:oe,onSearchValueChange:ne,searchValue:ie,onKeyDown:de,onKeyUp:me,keybindings:xe,editOnType:ee=!0,onRowAppended:Pe,onColumnMoved:Ge,validateCell:Ze,highlightRegions:Ct,rangeSelect:Se="rect",columnSelect:ge="multi",rowSelect:Ne="multi",rangeSelectionBlending:Re="exclusive",columnSelectionBlending:We="exclusive",rowSelectionBlending:Fe="exclusive",onDelete:ot,onDragStart:Je,onMouseMove:Ke,onPaste:Ce,copyHeaders:at=!1,freezeColumns:$e=0,cellActivationBehavior:Ae="second-click",rowSelectionMode:xt="auto",onHeaderMenuClick:Ve,getGroupDetails:Be,onSearchClose:je,onItemHovered:wt,onSelectionCleared:At,showSearch:rn,onVisibleRegionChanged:un,gridSelection:_t,onGridSelectionChange:Yt,minColumnWidth:Lt=50,maxColumnWidth:En=500,maxColumnAutoWidth:Mn,provideEditor:ut,trailingRowOptions:Xe,freezeTrailingRows:pt=0,allowedFillDirections:Gt="orthogonal",scrollOffsetX:Ot,scrollOffsetY:Ee,verticalBorder:ct,onDragOverCell:st,onDrop:vn,onColumnResize:Dt,onColumnResizeEnd:on,onColumnResizeStart:bt,customRenderers:yr,fillHandle:kt,drawFocusRing:Mt=!0,experimental:$t,fixedShadowX:qi,fixedShadowY:wr,headerIcons:Tn,imageWindowLoader:In,initialSize:br,isDraggable:$i,onDragLeave:Ni,onRowMoved:yn,overscrollX:Sr,overscrollY:Cr,preventDiagonalScrolling:xr,rightElement:Zn,rightElementProps:Fn,trapFocus:Wi=!1,smoothScrollX:Bi,smoothScrollY:Uo,scaleToRem:Yo=!1,rowHeight:_r=34,headerHeight:Pn=36,groupHeaderHeight:Go=Pn,theme:Xo,isOutsideClick:ji,renderers:kr}=e,wn=typeof e.rowMarkers=="string"?void 0:e.rowMarkers,an=wn?.kind??e.rowMarkers??"none",Ui=wn?.width??e.rowMarkerWidth,Rr=wn?.startIndex??e.rowMarkerStartIndex??1,Vr=wn?.theme??e.rowMarkerTheme,zn=wn?.checkboxStyle??"square",Xt=Math.max(Lt,20),cn=Math.max(En,Xt),Zr=Math.max(Mn??cn,Xt),Ln=p.useMemo(()=>typeof window>"u"?{fontSize:"16px"}:window.getComputedStyle(document.documentElement),[]),Jr=p.useMemo(()=>Number.parseFloat(Ln.fontSize),[Ln]),{rowHeight:Ht,headerHeight:Er,groupHeaderHeight:Qr,theme:Yi,overscrollX:Ko,overscrollY:Gi}=gb({groupHeaderHeight:Go,headerHeight:Pn,overscrollX:Sr,overscrollY:Cr,remSize:Jr,rowHeight:_r,scaleToRem:Yo,theme:Xo}),dn=pb(xe),An=Ui??(C>1e4?48:C>1e3?44:C>100?36:32),Kt=an!=="none",U=Kt?1:0,ht=Pe!==void 0,Jn=Xe?.sticky===!0,[Vo,Xi]=p.useState(!1),ei=rn??Vo,Zo=p.useCallback(()=>{je!==void 0?je():Xi(!1)},[je]),V=p.useMemo(()=>_t===void 0?void 0:vo(_t,U),[_t,U])??n,Nt=p.useRef();Nt.current===void 0&&(Nt.current=new AbortController),p.useEffect(()=>()=>Nt?.current.abort(),[]);const[Rt,Mr]=Jw(z,P,U,Nt.current,C),ti=p.useCallback((v,F,D)=>{if(Ze===void 0)return!0;const Y=[v[0]-U,v[1]];return Ze?.(Y,F,D)},[U,Ze]),Hn=p.useRef(_t),Wt=p.useCallback((v,F)=>{F&&(v=ob(v,Rt,U,w,Nt.current)),Yt!==void 0?(Hn.current=vo(v,-U),Yt(Hn.current)):r(v)},[Yt,Rt,U,w]),On=$r(Dt,p.useCallback((v,F,D,Y)=>{Dt?.(y[D-U],F,D-U,Y)},[Dt,U,y])),Jo=$r(on,p.useCallback((v,F,D,Y)=>{on?.(y[D-U],F,D-U,Y)},[on,U,y])),Tr=$r(bt,p.useCallback((v,F,D,Y)=>{bt?.(y[D-U],F,D-U,Y)},[bt,U,y])),Qo=$r(L,p.useCallback((v,F)=>L?.({...v,columnIndex:v.columnIndex-U},F)??!1,[L,U])),ea=$r(R,p.useCallback((v,F)=>R?.({...v,col:v.col-U},F)??!1,[R,U])),H=p.useCallback(v=>{if(ot!==void 0){const F=ot(vo(v,-U));return typeof F=="boolean"?F:vo(F,U)}return!0},[ot,U]),[Q,fe,le]=Zw(V,Wt,Re,We,Fe,Se),re=p.useMemo(()=>jn(kp(),Yi),[Yi]),[he,Me]=p.useState([0,0,0]),pe=p.useMemo(()=>{if(kr===void 0)return{};const v={};for(const F of kr)v[F.kind]=F;return v},[kr]),be=p.useCallback(v=>v.kind!==ue.Custom?pe[v.kind]:yr?.find(F=>F.isMatch(v)),[yr,pe]);let{sizedColumns:Oe,nonGrowWidth:yt}=nv(y,C,Mr,he[0]-(U===0?0:An)-he[2],Xt,Zr,re,be,Nt.current);an!=="none"&&(yt+=An);const mt=p.useMemo(()=>Oe.some(v=>v.group!==void 0),[Oe]),nt=mt?Er+Qr:Er,Ue=V.rows.length,gt=an==="none"?void 0:Ue===0?!1:Ue===C?!0:void 0,ze=p.useMemo(()=>an==="none"?Oe:[{title:"",width:An,icon:void 0,hasMenu:!1,style:"normal",themeOverride:Vr,rowMarker:zn,rowMarkerChecked:gt},...Oe],[an,Oe,An,Vr,zn,gt]),[dt,Qn]=p.useMemo(()=>[Ee!==void 0&&typeof Ht=="number"?Math.floor(Ee/Ht):0,Ee!==void 0&&typeof Ht=="number"?-(Ee%Ht):0],[Ee,Ht]),Et=p.useRef({height:1,width:1,x:0,y:0}),er=p.useMemo(()=>({x:Et.current.x,y:dt,width:Et.current.width??1,height:Et.current.height??1,ty:Qn}),[Qn,dt]),Qe=p.useRef(!1),[It,Vt,bn]=l1(er);Et.current=It;const fn=(It.height??1)>1;p.useLayoutEffect(()=>{if(Ee!==void 0&&c.current!==null&&fn){if(c.current.scrollTop===Ee)return;c.current.scrollTop=Ee,c.current.scrollTop!==Ee&&bn(),Qe.current=!0}},[Ee,fn,bn]);const Ir=(It.width??1)>1;p.useLayoutEffect(()=>{if(Ot!==void 0&&c.current!==null&&Ir){if(c.current.scrollLeft===Ot)return;c.current.scrollLeft=Ot,c.current.scrollLeft!==Ot&&bn(),Qe.current=!0}},[Ot,Ir,bn]);const tr=It.x+U,Ki=It.y,Bt=p.useRef(null),qt=p.useCallback(v=>{v===!0?Bt.current?.focus():window.requestAnimationFrame(()=>{Bt.current?.focus()})},[]),Ft=ht?C+1:C,sn=p.useCallback(v=>{const F=U===0?v:v.map(Y=>({...Y,location:[Y.location[0]-U,Y.location[1]]})),D=K?.(F);if(D!==!0)for(const Y of F)W?.(Y.location,Y.value);return D},[W,K,U]),[nr,ta]=p.useState(),Vi=V.current!==void 0&&V.current.range.width*V.current.range.height>1?V.current.range:void 0,hc=Mt?V.current?.cell:void 0,Zi=hc?.[0],Ji=hc?.[1],hm=p.useMemo(()=>{if((Ct===void 0||Ct.length===0)&&(Vi??Zi??Ji??nr)===void 0)return;const v=[];if(Ct!==void 0)for(const F of Ct){const D=ze.length-F.range.x-U;D>0&&v.push({color:F.color,range:{...F.range,x:F.range.x+U,width:Math.min(D,F.range.width)},style:F.style})}return nr!==void 0&&v.push({color:dr(re.accentColor,0),range:nr,style:"dashed"}),Vi!==void 0&&v.push({color:dr(re.accentColor,.5),range:Vi,style:"solid-outline"}),Zi!==void 0&&Ji!==void 0&&v.push({color:re.accentColor,range:{x:Zi,y:Ji,width:1,height:1},style:"solid-outline"}),v.length>0?v:void 0},[nr,Vi,Zi,Ji,Ct,ze.length,re.accentColor,U]),gc=p.useRef(ze);gc.current=ze;const Zt=p.useCallback(([v,F],D=!1)=>{const Y=ht&&F===Ft-1;if(v===0&&Kt)return Y?hu:{kind:ln.Marker,allowOverlay:!1,checkboxStyle:zn,checked:V?.rows.hasIndex(F)===!0,markerKind:an==="clickable-number"?"number":an,row:Rr+F,drawHandle:yn!==void 0,cursor:an==="clickable-number"?"pointer":void 0};if(Y){const q=v===U?Xe?.hint??"":"",j=gc.current[v];if(j?.trailingRowOptions?.disabled===!0)return hu;{const te=j?.trailingRowOptions?.hint??q,ae=j?.trailingRowOptions?.addIcon??Xe?.addIcon;return{kind:ln.NewRow,hint:te,allowOverlay:!1,icon:ae}}}else{const Z=v-U;if(D||$t?.strict===!0){const j=Et.current,te=j.x>Z||Z>j.x+j.width||j.y>F||F>j.y+j.height||F>=ra.current,ae=Z===j.extras?.selected?.[0]&&F===j.extras?.selected[1];let we=!1;if(j.extras?.freezeRegions!==void 0){for(const De of j.extras.freezeRegions)if(No(De,Z,F)){we=!0;break}}if(te&&!ae&&!we)return hu}let q=P([Z,F]);return U!==0&&q.span!==void 0&&(q={...q,span:[q.span[0]+U,q.span[1]+U]}),q}},[ht,Ft,Kt,zn,V?.rows,an,Rr,yn,U,Xe?.hint,Xe?.addIcon,$t?.strict,P]),na=p.useCallback(v=>{let F=Be?.(v)??{name:v};return $!==void 0&&v!==""&&(F={icon:F.icon,name:F.name,overrideTheme:F.overrideTheme,actions:[...F.actions??[],{title:"Rename",icon:"renameIcon",onClick:D=>oa({group:F.name,bounds:D.bounds})}]}),F},[Be,$]),Qi=p.useCallback(v=>{const[F,D]=v.cell,Y=ze[F],X=Y?.group!==void 0?na(Y.group)?.overrideTheme:void 0,Z=Y?.themeOverride,q=g?.(D);o({...v,theme:jn(re,X,Z,q,v.content.themeOverride)})},[g,ze,na,re]),Pr=p.useCallback((v,F,D)=>{if(V.current===void 0)return;const[Y,X]=V.current.cell,Z=Zt([Y,X]);if(Z.kind!==ue.Boolean&&Z.allowOverlay){let q=Z;if(D!==void 0)switch(q.kind){case ue.Number:{const j=Um(()=>D==="-"?-0:Number.parseFloat(D),0);q={...q,data:Number.isNaN(j)?0:j};break}case ue.Text:case ue.Markdown:case ue.Uri:q={...q,data:D};break}Qi({target:v,content:q,initialValue:D,cell:[Y,X],highlight:D===void 0,forceEditMode:D!==void 0})}else Z.kind===ue.Boolean&&F&&Z.readonly!==!0&&(sn([{location:V.current.cell,value:{...Z,data:Qp(Z.data)}}]),Bt.current?.damage([{cell:V.current.cell}]))},[Zt,V,sn,Qi]),pc=p.useCallback((v,F)=>{const D=Bt.current?.getBounds(v,F);if(D===void 0||c.current===null)return;const Y=Zt([v,F]);Y.allowOverlay&&Qi({target:D,content:Y,initialValue:void 0,highlight:!0,cell:[v,F],forceEditMode:!0})},[Zt,Qi]),St=p.useCallback((v,F,D="both",Y=0,X=0,Z=void 0)=>{if(c.current!==null){const q=Bt.current,j=s.current,te=typeof v!="number"?v.unit==="cell"?v.amount:void 0:v,ae=typeof F!="number"?F.unit==="cell"?F.amount:void 0:F,we=typeof v!="number"&&v.unit==="px"?v.amount:void 0,De=typeof F!="number"&&F.unit==="px"?F.amount:void 0;if(q!==null&&j!==null){let Te={x:0,y:0,width:0,height:0},Ie=0,Ye=0;if((te!==void 0||ae!==void 0)&&(Te=q.getBounds((te??0)+U,ae??0)??Te,Te.width===0||Te.height===0))return;const rt=j.getBoundingClientRect(),Tt=rt.width/j.offsetWidth;if(we!==void 0&&(Te={...Te,x:we-rt.left-c.current.scrollLeft,width:1}),De!==void 0&&(Te={...Te,y:De+rt.top-c.current.scrollTop,height:1}),Te!==void 0){const ft={x:Te.x-Y,y:Te.y-X,width:Te.width+2*Y,height:Te.height+2*X};let Lr=0;for(let da=0;da<$e;da++)Lr+=Oe[da].width;let li=0;const ui=pt+(Jn?1:0);ui>0&&(li=vr(Ft,ui,Ht));let Cn=Lr*Tt+rt.left+U*An*Tt,Hr=rt.right,or=rt.top+nt*Tt,qr=rt.bottom-li*Tt;const oo=Te.width+Y*2;switch(Z?.hAlign){case"start":Hr=Cn+oo;break;case"end":Cn=Hr-oo;break;case"center":Cn=Math.floor((Cn+Hr)/2)-oo/2,Hr=Cn+oo;break}const ao=Te.height+X*2;switch(Z?.vAlign){case"start":qr=or+ao;break;case"end":or=qr-ao;break;case"center":or=Math.floor((or+qr)/2)-ao/2,qr=or+ao;break}Cn>ft.x?Ie=ft.x-Cn:Hr<ft.x+ft.width&&(Ie=ft.x+ft.width-Hr),or>ft.y?Ye=ft.y-or:qr<ft.y+ft.height&&(Ye=ft.y+ft.height-qr),D==="vertical"||typeof v=="number"&&v<$e?Ie=0:(D==="horizontal"||typeof F=="number"&&F>=Ft-ui)&&(Ye=0),(Ie!==0||Ye!==0)&&(Tt!==1&&(Ie/=Tt,Ye/=Tt),c.current.scrollTo(Ie+c.current.scrollLeft,Ye+c.current.scrollTop))}}}},[U,pt,An,nt,$e,Oe,Ft,Jn,Ht]),mc=p.useRef(pc),vc=p.useRef(P),ra=p.useRef(C);mc.current=pc,vc.current=P,ra.current=C;const Ar=p.useCallback(async(v,F=!0)=>{if(ze[v]?.trailingRowOptions?.disabled===!0)return;const Y=Pe?.();let X,Z=!0;Y!==void 0&&(X=await Y,X==="top"&&(Z=!1),typeof X=="number"&&(Z=!1));let q=0;const j=()=>{if(ra.current<=C){q<500&&window.setTimeout(j,q),q=50+q*2;return}const te=typeof X=="number"?X:Z?C:0;io.current(v-U,te),Q({cell:[v,te],range:{x:v,y:te,width:1,height:1}},!1,!1,"edit");const ae=vc.current([v-U,te]);ae.allowOverlay&&Ci(ae)&&ae.readonly!==!0&&F&&window.setTimeout(()=>{mc.current(v,te)},0)};j()},[ze,Pe,U,C,Q]),eo=p.useCallback(v=>{const F=Oe[v]?.trailingRowOptions?.targetColumn??Xe?.targetColumn;if(typeof F=="number")return F+(Kt?1:0);if(typeof F=="object"){const D=y.indexOf(F);if(D>=0)return D+(Kt?1:0)}},[Oe,y,Kt,Xe?.targetColumn]),qn=p.useRef(),Or=p.useRef(),ni=p.useCallback((v,F)=>{const[D,Y]=F;return jn(re,ze[D]?.themeOverride,g?.(Y),v.themeOverride)},[g,ze,re]),ri=p.useCallback(v=>{const F=Mo.value?v.metaKey:v.ctrlKey,D=F&&Ne==="multi",Y=F&&ge==="multi",[X,Z]=v.location,q=V.columns,j=V.rows,[te,ae]=V.current?.cell??[];if(v.kind==="cell"){if(Or.current=void 0,rr.current=[X,Z],X===0&&Kt){if(ht===!0&&Z===C||an==="number"||Ne==="none")return;const we=Zt(v.location);if(we.kind!==ln.Marker)return;if(yn!==void 0){const Ie=be(we);en(Ie?.kind===ln.Marker);const Ye=Ie?.onClick?.({...v,cell:we,posX:v.localEventX,posY:v.localEventY,bounds:v.bounds,theme:ni(we,v.location),preventDefault:()=>{}});if(Ye===void 0||Ye.checked===we.checked)return}o(void 0),qt();const De=j.hasIndex(Z),Te=qn.current;if(Ne==="multi"&&(v.shiftKey||v.isLongTouch===!0)&&Te!==void 0&&j.hasIndex(Te)){const Ie=[Math.min(Te,Z),Math.max(Te,Z)+1];D||xt==="multi"?fe(void 0,Ie,!0):fe(qe.fromSingleSelection(Ie),void 0,D)}else D||v.isTouch||xt==="multi"?De?fe(j.remove(Z),void 0,!0):(fe(void 0,Z,!0),qn.current=Z):De&&j.length===1?fe(qe.empty(),void 0,F):(fe(qe.fromSingleSelection(Z),void 0,F),qn.current=Z)}else if(X>=U&&ht&&Z===C){const we=eo(X);Ar(we??X)}else if(te!==X||ae!==Z){const we=Zt(v.location),De=be(we);if(De?.onSelect!==void 0){let Ye=!1;if(De.onSelect({...v,cell:we,posX:v.localEventX,posY:v.localEventY,bounds:v.bounds,preventDefault:()=>Ye=!0,theme:ni(we,v.location)}),Ye)return}const Te=Jn&&Z===C,Ie=Jn&&V!==void 0&&V.current?.cell[1]===C;if((v.shiftKey||v.isLongTouch===!0)&&te!==void 0&&ae!==void 0&&V.current!==void 0&&!Ie){if(Te)return;const Ye=Math.min(X,te),rt=Math.max(X,te),Tt=Math.min(Z,ae),ft=Math.max(Z,ae);Q({...V.current,range:{x:Ye,y:Tt,width:rt-Ye+1,height:ft-Tt+1}},!0,F,"click"),qn.current=void 0,qt()}else Q({cell:[X,Z],range:{x:X,y:Z,width:1,height:1}},!0,F,"click"),qn.current=void 0,o(void 0),qt()}}else if(v.kind==="header")if(rr.current=[X,Z],o(void 0),Kt&&X===0)qn.current=void 0,Or.current=void 0,Ne==="multi"&&(j.length!==C?fe(qe.fromSingleSelection([0,C]),void 0,F):fe(qe.empty(),void 0,F),qt());else{const we=Or.current;if(ge==="multi"&&(v.shiftKey||v.isLongTouch===!0)&&we!==void 0&&q.hasIndex(we)){const De=[Math.min(we,X),Math.max(we,X)+1];Y?le(void 0,De,F):le(qe.fromSingleSelection(De),void 0,F)}else Y?(q.hasIndex(X)?le(q.remove(X),void 0,F):le(void 0,X,F),Or.current=X):ge!=="none"&&(le(qe.fromSingleSelection(X),void 0,F),Or.current=X);qn.current=void 0,qt()}else v.kind===Qt?rr.current=[X,Z]:v.kind===To&&!v.isMaybeScrollbar&&(Wt(yo,!1),o(void 0),qt(),At?.(),qn.current=void 0,Or.current=void 0)},[Ar,ge,qt,be,eo,Zt,V,Kt,Jn,At,yn,U,an,Ne,xt,C,Q,Wt,le,fe,ht,ni]),ii=p.useRef(!1),rr=p.useRef(),yc=p.useRef(It),Sn=p.useRef(),gm=p.useCallback(v=>{if(Dr.current=!1,yc.current=Et.current,v.button!==0&&v.button!==1){Sn.current=void 0;return}const F=performance.now();Sn.current={button:v.button,time:F,location:v.location},v?.kind==="header"&&(ii.current=!0);const D=v.kind==="cell"&&v.isFillHandle;!D&&v.kind!=="cell"&&v.isEdge||(u({previousSelection:V,fillHandle:D}),rr.current=void 0,!v.isTouch&&v.button===0&&!D?ri(v):!v.isTouch&&v.button===1&&(rr.current=v.location))},[V,ri]),[ia,oa]=p.useState(),wc=p.useCallback(v=>{if(v.kind!==Qt||ge!=="multi")return;const F=Mo.value?v.metaKey:v.ctrlKey,[D]=v.location,Y=V.columns;if(D<U)return;const X=ze[D];let Z=D,q=D;for(let j=D-1;j>=U&&Ii(X.group,ze[j].group);j--)Z--;for(let j=D+1;j<ze.length&&Ii(X.group,ze[j].group);j++)q++;if(qt(),F)if(Y.hasAll([Z,q+1])){let j=Y;for(let te=Z;te<=q;te++)j=j.remove(te);le(j,void 0,F)}else le(void 0,[Z,q+1],F);else le(qe.fromSingleSelection([Z,q+1]),void 0,F)},[ge,qt,V.columns,ze,U,le]),Dr=p.useRef(!1),to=p.useCallback(async v=>{if(Rt!==void 0&&On!==void 0){const F=Et.current.y,D=Et.current.height;let Y=Rt({x:v,y:F,width:1,height:Math.min(D,C-F)},Nt.current.signal);typeof Y!="object"&&(Y=await Y());const X=Oe[v-U],q=document.createElement("canvas").getContext("2d",{alpha:!1});if(q!==null){q.font=re.baseFontFull;const j=Ep(q,re,X,0,Y,Xt,cn,!1,be);On?.(X,j.width,v,j.width)}}},[Oe,Rt,cn,re,Xt,On,U,C,be]),[pm,aa]=p.useState(),Fr=p.useCallback(async(v,F)=>{const D=v.current?.range;if(D===void 0||Rt===void 0||F.current===void 0)return;const Y=F.current.range;if(O!==void 0){let j=!1;if(O({fillDestination:{...Y,x:Y.x-U},patternSource:{...D,x:D.x-U},preventDefault:()=>j=!0}),j)return}let X=Rt(D,Nt.current.signal);typeof X!="object"&&(X=await X());const Z=X,q=[];for(let j=0;j<Y.width;j++)for(let te=0;te<Y.height;te++){const ae=[Y.x+j,Y.y+te];if(pp(ae,D))continue;const we=Z[te%D.height][j%D.width];cr(we)||!Ci(we)||q.push({location:ae,value:{...we}})}sn(q),Bt.current?.damage(q.map(j=>({cell:j.location})))},[Rt,sn,O,U]),bc=p.useCallback(()=>{if(V.current===void 0||V.current.range.width<=1)return;const v={...V,current:{...V.current,range:{...V.current.range,width:1}}};Fr(v,V)},[Fr,V]),Sc=p.useCallback(()=>{if(V.current===void 0||V.current.range.height<=1)return;const v={...V,current:{...V.current,range:{...V.current.range,height:1}}};Fr(v,V)},[Fr,V]),mm=p.useCallback((v,F)=>{const D=l;if(u(void 0),ta(void 0),aa(void 0),ii.current=!1,F)return;if(D?.fillHandle===!0&&V.current!==void 0&&D.previousSelection?.current!==void 0){if(nr===void 0)return;const we={...V,current:{...V.current,range:zp(D.previousSelection.current.range,nr)}};Fr(D.previousSelection,we),Wt(we,!0);return}const[Y,X]=v.location,[Z,q]=rr.current??[],j=()=>{Dr.current=!0},te=we=>{const De=we.isTouch||Z===Y&&q===X;if(De&&S?.([Y-U,X],{...we,preventDefault:j}),we.button===1)return!Dr.current;if(!Dr.current){const Te=Zt(v.location),Ie=be(Te);if(Ie!==void 0&&Ie.onClick!==void 0&&De){const rt=Ie.onClick({...we,cell:Te,posX:we.localEventX,posY:we.localEventY,bounds:we.bounds,theme:ni(Te,v.location),preventDefault:j});rt!==void 0&&!cr(rt)&&lr(rt)&&(sn([{location:we.location,value:rt}]),Bt.current?.damage([{cell:we.location}]))}if(Dr.current||V.current===void 0)return!1;let Ye=!1;switch(Te.activationBehaviorOverride??Ae){case"double-click":case"second-click":{if(D?.previousSelection?.current?.cell===void 0)break;const[rt,Tt]=V.current.cell,[ft,Lr]=D.previousSelection.current.cell;Ye=Y===rt&&Y===ft&&X===Tt&&X===Lr&&(we.isDoubleClick===!0||Ae==="second-click");break}case"single-click":{Ye=!0;break}}if(Ye)return T?.([Y-U,X]),Pr(we.bounds,!1),!0}return!1},ae=v.location[0]-U;if(v.isTouch){const we=Et.current,De=yc.current;if(we.x!==De.x||we.y!==De.y)return;if(v.isLongTouch===!0){if(v.kind==="cell"&&Ri(V.current?.cell,v.location)){B?.([ae,v.location[1]],{...v,preventDefault:j});return}else if(v.kind==="header"&&V.columns.hasIndex(Y)){ce?.(ae,{...v,preventDefault:j});return}else if(v.kind===Qt){if(ae<0)return;M?.(ae,{...v,preventDefault:j});return}}v.kind==="cell"?te(v)||ri(v):v.kind===Qt?N?.(ae,{...v,preventDefault:j}):(v.kind===Bn&&k?.(ae,{...v,preventDefault:j}),ri(v));return}if(v.kind==="header"){if(ae<0)return;v.isEdge?v.isDoubleClick===!0&&to(Y):v.button===0&&Y===Z&&X===q&&k?.(ae,{...v,preventDefault:j})}if(v.kind===Qt){if(ae<0)return;v.button===0&&Y===Z&&X===q&&(N?.(ae,{...v,preventDefault:j}),Dr.current||wc(v))}v.kind==="cell"&&(v.button===0||v.button===1)&&te(v),rr.current=void 0},[l,V,U,nr,Fr,Wt,S,Zt,be,Ae,ni,sn,T,Pr,B,ce,M,ri,N,k,to,wc]),vm=p.useCallback(v=>{const F={...v,location:[v.location[0]-U,v.location[1]]};Ke?.(F),l!==void 0&&v.buttons===0&&(u(void 0),ta(void 0),aa(void 0),ii.current=!1),aa(D=>ii.current?[v.scrollEdge[0],0]:v.scrollEdge[0]===D?.[0]&&v.scrollEdge[1]===D[1]?D:l===void 0||(Sn.current?.location[0]??0)<U?void 0:v.scrollEdge)},[l,Ke,U]),ym=p.useCallback((v,F)=>{Ve?.(v-U,F)},[Ve,U]),zr=V?.current?.cell,wm=p.useCallback((v,F,D,Y,X,Z)=>{Qe.current=!1;let q=zr;q!==void 0&&(q=[q[0]-U,q[1]]);const j=$e===0?void 0:{x:0,y:v.y,width:$e,height:v.height},te=[];j!==void 0&&te.push(j),pt>0&&(te.push({x:v.x-U,y:C-pt,width:v.width,height:pt}),$e>0&&te.push({x:0,y:C-pt,width:$e,height:pt}));const ae={x:v.x-U,y:v.y,width:v.width,height:ht&&v.y+v.height>=C?v.height-1:v.height,tx:X,ty:Z,extras:{selected:q,freezeRegion:j,freezeRegions:te}};Et.current=ae,Vt(ae),Me([F,D,Y]),un?.(ae,ae.tx,ae.ty,ae.extras)},[zr,U,ht,C,$e,pt,Vt,un]),bm=$r(Ge,p.useCallback((v,F)=>{Ge?.(v-U,F-U),ge!=="none"&&le(qe.fromSingleSelection(F),void 0,!0)},[ge,Ge,U,le])),sa=p.useRef(!1),Sm=p.useCallback(v=>{if(v.location[0]===0&&U>0){v.preventDefault();return}Je?.({...v,location:[v.location[0]-U,v.location[1]]}),v.defaultPrevented()||(sa.current=!0),u(void 0)},[Je,U]),Cm=p.useCallback(()=>{sa.current=!1},[]),la=p.useRef(),ua=p.useCallback(v=>{if(!Vp(v,la.current)&&(la.current=v,!(Sn?.current?.button!==void 0&&Sn.current.button>=1))){if(v.buttons!==0&&l!==void 0&&Sn.current?.location[0]===0&&v.location[0]===0&&U===1&&Ne==="multi"&&l.previousSelection&&!l.previousSelection.rows.hasIndex(Sn.current.location[1])&&V.rows.hasIndex(Sn.current.location[1])){const F=Math.min(Sn.current.location[1],v.location[1]),D=Math.max(Sn.current.location[1],v.location[1])+1;fe(qe.fromSingleSelection([F,D]),void 0,!1)}if(v.buttons!==0&&l!==void 0&&V.current!==void 0&&!sa.current&&!ii.current&&(Se==="rect"||Se==="multi-rect")){const[F,D]=V.current.cell;let[Y,X]=v.location;if(X<0&&(X=Et.current.y),l.fillHandle===!0&&l.previousSelection?.current!==void 0){const Z=l.previousSelection.current.range;X=Math.min(X,ht?C-1:C);const q=sy(Z,Y,X,Gt);ta(q)}else{if(ht&&D===C)return;if(ht&&X===C)if(v.kind===To)X--;else return;Y=Math.max(Y,U);const j=Y-F,te=X-D,ae={x:j>=0?F:Y,y:te>=0?D:X,width:Math.abs(j)+1,height:Math.abs(te)+1};Q({...V.current,range:ae},!0,!1,"drag")}}wt?.({...v,location:[v.location[0]-U,v.location[1]]})}},[Gt,l,U,Ne,V,Se,wt,fe,ht,C,Q]),xm=p.useCallback(()=>{const v=la.current;if(v===void 0)return;const[F,D]=v.scrollEdge;let[Y,X]=v.location;const Z=Et.current;F===-1?Y=Z.extras?.freezeRegion?.x??Z.x:F===1&&(Y=Z.x+Z.width),D===-1?X=Math.max(0,Z.y):D===1&&(X=Math.min(C-1,Z.y+Z.height)),Y=pn(Y,0,ze.length-1),X=pn(X,0,C-1),ua({...v,location:[Y,X]})},[ze.length,ua,C]);hb(pm,c,xm);const hn=p.useCallback(v=>{if(V.current===void 0)return;const[F,D]=v,[Y,X]=V.current.cell,Z=V.current.range;let q=Z.x,j=Z.x+Z.width,te=Z.y,ae=Z.y+Z.height;if(D!==0)switch(D){case 2:{ae=C,te=X,St(0,ae,"vertical");break}case-2:{te=0,ae=X+1,St(0,te,"vertical");break}case 1:{te<X?(te++,St(0,te,"vertical")):(ae=Math.min(C,ae+1),St(0,ae,"vertical"));break}case-1:{ae>X+1?(ae--,St(0,ae,"vertical")):(te=Math.max(0,te-1),St(0,te,"vertical"));break}default:Ti()}if(F!==0)if(F===2)j=ze.length,q=Y,St(j-1-U,0,"horizontal");else if(F===-2)q=U,j=Y+1,St(q-U,0,"horizontal");else{let we=[];if(Rt!==void 0){const De=Rt({x:q,y:te,width:j-q-U,height:ae-te},Nt.current.signal);typeof De=="object"&&(we=yb(De))}if(F===1){let De=!1;if(q<Y){if(we.length>0){const Te=ur(q+1,Y+1).find(Ie=>!we.includes(Ie-U));Te!==void 0&&(q=Te,De=!0)}else q++,De=!0;De&&St(q,0,"horizontal")}De||(j=Math.min(ze.length,j+1),St(j-1-U,0,"horizontal"))}else if(F===-1){let De=!1;if(j>Y+1){if(we.length>0){const Te=ur(j-1,Y,-1).find(Ie=>!we.includes(Ie-U));Te!==void 0&&(j=Te,De=!0)}else j--,De=!0;De&&St(j-U,0,"horizontal")}De||(q=Math.max(U,q-1),St(q-U,0,"horizontal"))}else Ti()}Q({cell:V.current.cell,range:{x:q,y:te,width:j-q,height:ae-te}},!0,!1,"keyboard-select")},[Rt,V,ze.length,U,C,St,Q]),$n=p.useCallback((v,F,D,Y)=>{const X=Ft-(D?0:1);if(v=pn(v,U,Oe.length-1+U),F=pn(F,0,X),v===zr?.[0]&&F===zr?.[1])return!1;if(Y&&V.current!==void 0){const Z=[...V.current.rangeStack];(V.current.range.width>1||V.current.range.height>1)&&Z.push(V.current.range),Wt({...V,current:{cell:[v,F],range:{x:v,y:F,width:1,height:1},rangeStack:Z}},!0)}else Q({cell:[v,F],range:{x:v,y:F,width:1,height:1}},!0,!1,"keyboard-nav");return d.current!==void 0&&d.current[0]===v&&d.current[1]===F&&(d.current=void 0),St(v-U,F),!0},[Ft,U,Oe.length,zr,V,St,Wt,Q]),_m=p.useCallback((v,F)=>{i?.cell!==void 0&&v!==void 0&&lr(v)&&(sn([{location:i.cell,value:v}]),window.requestAnimationFrame(()=>{Bt.current?.damage([{cell:i.cell}])})),qt(!0),o(void 0);const[D,Y]=F;if(V.current!==void 0&&(D!==0||Y!==0)){const X=V.current.cell[1]===Ft-1&&v!==void 0;$n(pn(V.current.cell[0]+D,0,ze.length-1),pn(V.current.cell[1]+Y,0,Ft-1),X,!1)}A?.(v,F)},[i?.cell,qt,V,A,sn,Ft,$n,ze.length]),km=p.useMemo(()=>`gdg-overlay-${vb++}`,[]),ir=p.useCallback(v=>{qt();const F=[];for(let D=v.x;D<v.x+v.width;D++)for(let Y=v.y;Y<v.y+v.height;Y++){const X=P([D-U,Y]);if(!X.allowOverlay&&X.kind!==ue.Boolean)continue;let Z;if(X.kind===ue.Custom){const q=be(X),j=q?.provideEditor?.(X);q?.onDelete!==void 0?Z=q.onDelete(X):Yg(j)&&(Z=j?.deletedValue?.(X))}else(lr(X)&&X.allowOverlay||X.kind===ue.Boolean)&&(Z=be(X)?.onDelete?.(X));Z!==void 0&&!cr(Z)&&lr(Z)&&F.push({location:[D,Y],value:Z})}sn(F),Bt.current?.damage(F.map(D=>({cell:D.location})))},[qt,P,be,sn,U]),oi=i!==void 0,Cc=p.useCallback(v=>{const F=()=>{v.stopPropagation(),v.preventDefault()},D={didMatch:!1},{bounds:Y}=v,X=V.columns,Z=V.rows,q=dn;if(!oi&&Le(q.clear,v,D))Wt(yo,!1),At?.();else if(!oi&&Le(q.selectAll,v,D))Wt({columns:qe.empty(),rows:qe.empty(),current:{cell:V.current?.cell??[U,0],range:{x:U,y:0,width:y.length,height:C},rangeStack:[]}},!1);else if(Le(q.search,v,D))a?.current?.focus({preventScroll:!0}),Xi(!0);else if(Le(q.delete,v,D)){const Ie=H?.(V)??!0;if(Ie!==!1){const Ye=Ie===!0?V:Ie;if(Ye.current!==void 0){ir(Ye.current.range);for(const rt of Ye.current.rangeStack)ir(rt)}for(const rt of Ye.rows)ir({x:U,y:rt,width:y.length,height:1});for(const rt of Ye.columns)ir({x:rt,y:0,width:1,height:C})}}if(D.didMatch)return F(),!0;if(V.current===void 0)return!1;let[j,te]=V.current.cell,ae=!1,we=!1;Le(q.scrollToSelectedCell,v,D)?io.current(j-U,te):ge!=="none"&&Le(q.selectColumn,v,D)?X.hasIndex(j)?le(X.remove(j),void 0,!0):ge==="single"?le(qe.fromSingleSelection(j),void 0,!0):le(void 0,j,!0):Ne!=="none"&&Le(q.selectRow,v,D)?Z.hasIndex(te)?fe(Z.remove(te),void 0,!0):Ne==="single"?fe(qe.fromSingleSelection(te),void 0,!0):fe(void 0,te,!0):!oi&&Y!==void 0&&Le(q.activateCell,v,D)?te===C&&ht?window.setTimeout(()=>{const Ie=eo(j);Ar(Ie??j)},0):(T?.([j-U,te]),Pr(Y,!0)):V.current.range.height>1&&Le(q.downFill,v,D)?Sc():V.current.range.width>1&&Le(q.rightFill,v,D)?bc():Le(q.goToNextPage,v,D)?te+=Math.max(1,Et.current.height-4):Le(q.goToPreviousPage,v,D)?te-=Math.max(1,Et.current.height-4):Le(q.goToFirstCell,v,D)?(o(void 0),te=0,j=0):Le(q.goToLastCell,v,D)?(o(void 0),te=Number.MAX_SAFE_INTEGER,j=Number.MAX_SAFE_INTEGER):Le(q.selectToFirstCell,v,D)?(o(void 0),hn([-2,-2])):Le(q.selectToLastCell,v,D)?(o(void 0),hn([2,2])):oi?(Le(q.closeOverlay,v,D)&&o(void 0),Le(q.acceptOverlayDown,v,D)&&(o(void 0),te++),Le(q.acceptOverlayUp,v,D)&&(o(void 0),te--),Le(q.acceptOverlayLeft,v,D)&&(o(void 0),j--),Le(q.acceptOverlayRight,v,D)&&(o(void 0),j++)):(Le(q.goDownCell,v,D)?te+=1:Le(q.goUpCell,v,D)?te-=1:Le(q.goRightCell,v,D)?j+=1:Le(q.goLeftCell,v,D)?j-=1:Le(q.goDownCellRetainSelection,v,D)?(te+=1,ae=!0):Le(q.goUpCellRetainSelection,v,D)?(te-=1,ae=!0):Le(q.goRightCellRetainSelection,v,D)?(j+=1,ae=!0):Le(q.goLeftCellRetainSelection,v,D)?(j-=1,ae=!0):Le(q.goToLastRow,v,D)?te=C-1:Le(q.goToFirstRow,v,D)?te=Number.MIN_SAFE_INTEGER:Le(q.goToLastColumn,v,D)?j=Number.MAX_SAFE_INTEGER:Le(q.goToFirstColumn,v,D)?j=Number.MIN_SAFE_INTEGER:(Se==="rect"||Se==="multi-rect")&&(Le(q.selectGrowDown,v,D)?hn([0,1]):Le(q.selectGrowUp,v,D)?hn([0,-1]):Le(q.selectGrowRight,v,D)?hn([1,0]):Le(q.selectGrowLeft,v,D)?hn([-1,0]):Le(q.selectToLastRow,v,D)?hn([0,2]):Le(q.selectToFirstRow,v,D)?hn([0,-2]):Le(q.selectToLastColumn,v,D)?hn([2,0]):Le(q.selectToFirstColumn,v,D)&&hn([-2,0])),we=D.didMatch);const De=$n(j,te,!1,ae),Te=D.didMatch;return Te&&(De||!we||Wi)&&F(),Te},[oi,V,dn,ge,Ne,Se,U,C,$n,Wt,At,y.length,H,Wi,ir,le,fe,ht,eo,Ar,T,Pr,Sc,bc,hn]),ai=p.useCallback(v=>{let F=!1;if(de!==void 0&&de({...v,cancel:()=>{F=!0}}),F||Cc(v)||V.current===void 0)return;const[D,Y]=V.current.cell,X=Et.current;if(ee&&!v.metaKey&&!v.ctrlKey&&V.current!==void 0&&v.key.length===1&&/[ -~]/g.test(v.key)&&v.bounds!==void 0&&Ci(P([D-U,Math.max(0,Math.min(Y,C-1))]))){if((!ht||Y!==C)&&(X.y>Y||Y>X.y+X.height||X.x>D||D>X.x+X.width))return;Pr(v.bounds,!0,v.key),v.stopPropagation(),v.preventDefault()}},[ee,de,Cc,V,P,U,C,ht,Pr]),Rm=p.useCallback((v,F)=>{const D=v.location[0]-U;if(v.kind==="header"&&ce?.(D,{...v,preventDefault:F}),v.kind===Qt){if(D<0)return;M?.(D,{...v,preventDefault:F})}if(v.kind==="cell"){const[Y,X]=v.location;B?.([D,X],{...v,preventDefault:F}),$1(V,v.location)||$n(Y,X,!1,!1)}},[V,B,M,ce,U,$n]),ca=p.useCallback(async v=>{if(!dn.paste)return;function F(q,j,te,ae){const we=typeof te=="object"?te?.join(`
216
+ `)??"":te?.toString()??"";if(!cr(q)&&Ci(q)&&q.readonly!==!0){const De=E?.(we,q);if(De!==void 0&&lr(De))return process.env.NODE_ENV!=="production"&&De.kind!==q.kind&&console.warn("Coercion should not change cell kind."),{location:j,value:De};const Te=be(q);if(Te===void 0)return;if(Te.kind===ue.Custom){en(q.kind===ue.Custom);const Ie=Te.onPaste?.(we,q.data);return Ie===void 0?void 0:{location:j,value:{...q,data:Ie}}}else{const Ie=Te.onPaste?.(we,q,{formatted:ae,formattedString:typeof ae=="string"?ae:ae?.join(`
217
+ `),rawValue:te});return Ie===void 0?void 0:(en(Ie.kind===q.kind),{location:j,value:Ie})}}}const D=V.columns,Y=V.rows,X=c.current?.contains(document.activeElement)===!0||s.current?.contains(document.activeElement)===!0;let Z;if(V.current!==void 0?Z=[V.current.range.x,V.current.range.y]:D.length===1?Z=[D.first()??0,0]:Y.length===1&&(Z=[U,Y.first()??0]),X&&Z!==void 0){let q,j;const te="text/plain",ae="text/html";if(navigator.clipboard.read!==void 0){const Ie=await navigator.clipboard.read();for(const Ye of Ie){if(Ye.types.includes(ae)){const Tt=await(await Ye.getType(ae)).text(),ft=Sg(Tt);if(ft!==void 0){q=ft;break}}Ye.types.includes(te)&&(j=await(await Ye.getType(te)).text())}}else if(navigator.clipboard.readText!==void 0)j=await navigator.clipboard.readText();else if(v!==void 0&&v?.clipboardData!==null){if(v.clipboardData.types.includes(ae)){const Ie=v.clipboardData.getData(ae);q=Sg(Ie)}q===void 0&&v.clipboardData.types.includes(te)&&(j=v.clipboardData.getData(te))}else return;const[we,De]=Z,Te=[];do{if(Ce===void 0){const Ie=Zt(Z),Ye=j??q?.map(Tt=>Tt.map(ft=>ft.rawValue).join(" ")).join(" ")??"",rt=F(Ie,Z,Ye,void 0);rt!==void 0&&Te.push(rt);break}if(q===void 0){if(j===void 0)return;q=ab(j)}if(Ce===!1||typeof Ce=="function"&&Ce?.([Z[0]-U,Z[1]],q.map(Ie=>Ie.map(Ye=>Ye.rawValue?.toString()??"")))!==!0)return;for(const[Ie,Ye]of q.entries()){if(Ie+De>=C)break;for(const[rt,Tt]of Ye.entries()){const ft=[rt+we,Ie+De],[Lr,li]=ft;if(Lr>=ze.length||li>=Ft)continue;const ui=Zt(ft),Cn=F(ui,ft,Tt.rawValue,Tt.formatted);Cn!==void 0&&Te.push(Cn)}}}while(!1);sn(Te),Bt.current?.damage(Te.map(Ie=>({cell:Ie.location})))}},[E,be,Zt,V,dn.paste,ze.length,sn,Ft,Ce,U,C]);Pt("paste",ca,h,!1,!0);const si=p.useCallback(async(v,F)=>{if(!dn.copy)return;const D=F===!0||c.current?.contains(document.activeElement)===!0||s.current?.contains(document.activeElement)===!0,Y=V.columns,X=V.rows,Z=(q,j)=>{if(!at)xg(q,j,v);else{const te=j.map(ae=>({kind:ue.Text,data:y[ae].title,displayData:y[ae].title,allowOverlay:!1}));xg([te,...q],j,v)}};if(D&&Rt!==void 0){if(V.current!==void 0){let q=Rt(V.current.range,Nt.current.signal);typeof q!="object"&&(q=await q()),Z(q,ur(V.current.range.x-U,V.current.range.x+V.current.range.width-U))}else if(X!==void 0&&X.length>0){const j=[...X].map(te=>{const ae=Rt({x:U,y:te,width:y.length,height:1},Nt.current.signal);return typeof ae=="object"?ae[0]:ae().then(we=>we[0])});if(j.some(te=>te instanceof Promise)){const te=await Promise.all(j);Z(te,ur(y.length))}else Z(j,ur(y.length))}else if(Y.length>0){const q=[],j=[];for(const te of Y){let ae=Rt({x:te,y:0,width:1,height:C},Nt.current.signal);typeof ae!="object"&&(ae=await ae()),q.push(ae),j.push(te-U)}if(q.length===1)Z(q[0],j);else{const te=q.reduce((ae,we)=>ae.map((De,Te)=>[...De,...we[Te]]));Z(te,j)}}}},[y,Rt,V,dn.copy,U,C,at]);Pt("copy",si,h,!1,!1);const Em=p.useCallback(async v=>{if(!(!dn.cut||!(c.current?.contains(document.activeElement)===!0||s.current?.contains(document.activeElement)===!0))&&(await si(v),V.current!==void 0)){let D={current:{cell:V.current.cell,range:V.current.range,rangeStack:[]},rows:qe.empty(),columns:qe.empty()};const Y=H?.(D);if(Y===!1||(D=Y===!0?D:Y,D.current===void 0))return;ir(D.current.range)}},[ir,V,dn.cut,si,H]);Pt("cut",Em,h,!1,!1);const Mm=p.useCallback((v,F)=>{if(J!==void 0){U!==0&&(v=v.map(X=>[X[0]-U,X[1]])),J(v,F);return}if(v.length===0||F===-1)return;const[D,Y]=v[F];d.current!==void 0&&d.current[0]===D&&d.current[1]===Y||(d.current=[D,Y],$n(D,Y,!1,!1))},[J,U,$n]),[no,ro]=_t?.current?.cell??[],io=p.useRef(St);io.current=St,p.useLayoutEffect(()=>{!Qe.current&&no!==void 0&&ro!==void 0&&(no!==Hn.current?.current?.cell[0]||ro!==Hn.current?.current?.cell[1])&&io.current(no,ro),Qe.current=!1},[no,ro]);const xc=V.current!==void 0&&(V.current.cell[0]>=ze.length||V.current.cell[1]>=Ft);p.useLayoutEffect(()=>{xc&&Wt(yo,!1)},[xc,Wt]);const Tm=p.useMemo(()=>ht===!0&&Xe?.tint===!0?qe.fromSingleSelection(Ft-1):qe.empty(),[Ft,ht,Xe?.tint]),Im=p.useCallback(v=>typeof ct=="boolean"?ct:ct?.(v-U)??!0,[U,ct]),Pm=p.useMemo(()=>{if(ia===void 0||s.current===null)return null;const{bounds:v,group:F}=ia,D=s.current.getBoundingClientRect();return p.createElement(Kw,{bounds:v,group:F,canvasBounds:D,onClose:()=>oa(void 0),onFinish:Y=>{oa(void 0),$?.(F,Y)}})},[$,ia]),Am=Math.min(ze.length,$e+(Kt?1:0));p.useImperativeHandle(t,()=>({appendRow:(v,F)=>Ar(v+U,F),updateCells:v=>(U!==0&&(v=v.map(F=>({cell:[F.cell[0]+U,F.cell[1]]}))),Bt.current?.damage(v)),getBounds:(v,F)=>{if(!(s?.current===null||c?.current===null)){if(v===void 0&&F===void 0){const D=s.current.getBoundingClientRect(),Y=D.width/c.current.clientWidth;return{x:D.x-c.current.scrollLeft*Y,y:D.y-c.current.scrollTop*Y,width:c.current.scrollWidth*Y,height:c.current.scrollHeight*Y}}return Bt.current?.getBounds((v??0)+U,F)}},focus:()=>Bt.current?.focus(),emit:async v=>{switch(v){case"delete":ai({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":ai({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":ai({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 si(void 0,!0);break;case"paste":await ca();break}},scrollTo:St,remeasureColumns:v=>{for(const F of v)to(F+U)}}),[Ar,to,si,ai,ca,U,St]);const[_c,kc]=zr??[],Om=p.useCallback(v=>{const[F,D]=v;if(D===-1){ge!=="none"&&(le(qe.fromSingleSelection(F),void 0,!1),qt());return}_c===F&&kc===D||(Q({cell:v,range:{x:F,y:D,width:1,height:1}},!0,!1,"keyboard-nav"),St(F,D))},[ge,qt,St,_c,kc,Q,le]),[Dm,Fm]=p.useState(!1),Rc=p.useRef(np(v=>{Fm(v)},5)),zm=p.useCallback(()=>{Rc.current(!0),V.current===void 0&&V.columns.length===0&&V.rows.length===0&&l===void 0&&Q({cell:[U,Ki],range:{x:U,y:Ki,width:1,height:1}},!0,!1,"keyboard-select")},[Ki,V,l,U,Q]),Lm=p.useCallback(()=>{Rc.current(!1)},[]),[Hm,qm]=p.useMemo(()=>{let v;const F=$t?.scrollbarWidthOverride??Su(),D=C+(ht?1:0);if(typeof Ht=="number")v=nt+D*Ht;else{let X=0;const Z=Math.min(D,10);for(let q=0;q<Z;q++)X+=Ht(q);X=Math.floor(X/Z),v=nt+D*X}v+=F;const Y=ze.reduce((X,Z)=>Z.width+X,0)+F;return[`${Math.min(1e5,Y)}px`,`${Math.min(1e5,v)}px`]},[ze,$t?.scrollbarWidthOverride,Ht,C,ht,nt]),$m=p.useMemo(()=>xp(re),[re]);return p.createElement(Rp.Provider,{value:re},p.createElement(cb,{style:$m,className:G,inWidth:x??Hm,inHeight:_??qm},p.createElement(Yw,{fillHandle:kt,drawFocusRing:Mt,experimental:$t,fixedShadowX:qi,fixedShadowY:wr,getRowThemeOverride:g,headerIcons:Tn,imageWindowLoader:In,initialSize:br,isDraggable:$i,onDragLeave:Ni,onRowMoved:yn,overscrollX:Ko,overscrollY:Gi,preventDiagonalScrolling:xr,rightElement:Zn,rightElementProps:Fn,smoothScrollX:Bi,smoothScrollY:Uo,className:G,enableGroups:mt,onCanvasFocused:zm,onCanvasBlur:Lm,canvasRef:s,onContextMenu:Rm,theme:re,cellXOffset:tr,cellYOffset:Ki,accessibilityHeight:It.height,onDragEnd:Cm,columns:ze,nonGrowWidth:yt,drawHeader:Qo,onColumnProposeMove:I,drawCell:ea,disabledRows:Tm,freezeColumns:Am,lockColumns:U,firstColAccessible:U===0,getCellContent:Zt,minColumnWidth:Xt,maxColumnWidth:cn,searchInputRef:a,showSearch:ei,onSearchClose:Zo,highlightRegions:hm,getCellsForSelection:Rt,getGroupDetails:na,headerHeight:Er,isFocused:Dm,groupHeaderHeight:mt?Qr:0,freezeTrailingRows:pt+(ht&&Xe?.sticky===!0?1:0),hasAppendRow:ht,onColumnResize:On,onColumnResizeEnd:Jo,onColumnResizeStart:Tr,onCellFocused:Om,onColumnMoved:bm,onDragStart:Sm,onHeaderMenuClick:ym,onItemHovered:ua,isFilling:l?.fillHandle===!0,onMouseMove:vm,onKeyDown:ai,onKeyUp:me,onMouseDown:gm,onMouseUp:mm,onDragOverCell:st,onDrop:vn,onSearchResultsChanged:Mm,onVisibleRegionChanged:wm,clientSize:he,rowHeight:Ht,searchResults:oe,searchValue:ie,onSearchValueChange:ne,rows:Ft,scrollRef:c,selection:V,translateX:It.tx,translateY:It.ty,verticalBorder:Im,gridRef:Bt,getCellRenderer:be}),Pm,i!==void 0&&p.createElement(p.Suspense,{fallback:null},p.createElement(mb,{...i,validateCell:ti,bloom:b,id:km,getCellRenderer:be,className:$t?.isSubGrid===!0?"click-outside-ignore":void 0,provideEditor:ut,imageEditorOverride:f,onFinishEditing:_m,markdownDivCreateNode:m,isOutsideClick:ji}))))},bb=p.forwardRef(wb),Rg=20,Sb={getAccessibilityString:e=>e.data?.toString()??"false",kind:ue.Boolean,needsHover:!0,useLabel:!1,needsHoverPosition:!0,measure:()=>50,draw:e=>Cb(e,e.cell.data,bu(e.cell),e.cell.maxSize??Rg),onDelete:e=>({...e,data:!1}),onClick:e=>{const{cell:t,posX:n,posY:r,bounds:i,theme:o}=e,{width:a,height:s,x:l,y:u}=i,c=t.maxSize??Rg,d=Math.floor(i.y+s/2),h=op(c,s,o.cellVerticalPadding),f=ip(t.contentAlign??"center",l,a,o.cellHorizontalPadding,h),g=rp(f,d,h),m=ap(l+n,u+r,g);if(bu(t)&&m)return{...t,data:Qp(t.data)}},onPaste:(e,t)=>{let n=xo;return e.toLowerCase()==="true"?n=!0:e.toLowerCase()==="false"?n=!1:e.toLowerCase()==="indeterminate"&&(n=Yu),n===t.data?void 0:{...t,data:n}}};function Cb(e,t,n,r){if(!n&&t===xo)return;const{ctx:i,hoverAmount:o,theme:a,rect:s,highlighted:l,hoverX:u,hoverY:c,cell:{contentAlign:d}}=e,{x:h,y:f,width:g,height:m}=s,x=.35;let _=n?1-x+x*o:.4;t===xo&&(_*=o),_!==0&&(i.globalAlpha=_,oc(i,a,t,h,f,g,m,l,u,c,r,d),i.globalAlpha=1)}const xb=Ut("div")({name:"BubblesOverlayEditorStyle",class:"gdg-b1ygi5by",propsAsIs:!1}),_b=e=>{const{bubbles:t}=e;return p.createElement(xb,null,t.map((n,r)=>p.createElement("div",{key:r,className:"boe-bubble"},n)),p.createElement("textarea",{className:"gdg-input",autoFocus:!0}))},kb={getAccessibilityString:e=>sp(e.data),kind:ue.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=>Eb(e,e.cell.data),provideEditor:()=>e=>{const{value:t}=e;return p.createElement(_b,{bubbles:t.data})},onPaste:()=>{}},Rb=4;function Eb(e,t){const{rect:n,theme:r,ctx:i,highlighted:o}=e,{x:a,y:s,width:l,height:u}=n,c=20,d=8,h=Rb;let f=a+r.cellHorizontalPadding;const g=[];for(const m of t){if(f>a+l)break;const x=zi(m,i,r.baseFontFull).width;g.push({x:f,width:x}),f+=x+d*2+h}i.beginPath();for(const m of g)xn(i,m.x,s+(u-c)/2,m.width+d*2,c,r.roundingRadius??c/2);i.fillStyle=o?r.bgBubbleSelected:r.bgBubble,i.fill();for(const[m,x]of g.entries())i.beginPath(),i.fillStyle=r.textBubble,i.fillText(t[m],x.x+d,s+u/2+Xn(i,r))}const Mb=Ut("div")({name:"DrilldownOverlayEditorStyle",class:"gdg-d4zsq0x",propsAsIs:!1}),Tb=e=>{const{drilldowns:t}=e;return p.createElement(Mb,null,t.map((n,r)=>p.createElement("div",{key:r,className:"doe-bubble"},n.img!==void 0&&p.createElement("img",{src:n.img}),p.createElement("div",null,n.text))))},Ib={getAccessibilityString:e=>sp(e.data.map(t=>t.text)),kind:ue.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=>Ob(e,e.cell.data),provideEditor:()=>e=>{const{value:t}=e;return p.createElement(Tb,{drilldowns:t.data})},onPaste:()=>{}},Pb=4,gu={};function Ab(e,t,n,r){const i=Math.ceil(window.devicePixelRatio),o=5,a=n-o*2,s=4,l=n*i,u=r+o,c=r*3,d=(c+o*2)*i,h=`${e},${t},${i},${n}`;if(gu[h]!==void 0)return{el:gu[h],height:l,width:d,middleWidth:s*i,sideWidth:u*i,padding:o*i,dpr:i};const f=document.createElement("canvas"),g=f.getContext("2d");return g===null?null:(f.width=d,f.height=l,g.scale(i,i),gu[h]=f,g.beginPath(),xn(g,o,o,c,a,r),g.shadowColor="rgba(24, 25, 34, 0.4)",g.shadowBlur=1,g.fillStyle=e,g.fill(),g.shadowColor="rgba(24, 25, 34, 0.3)",g.shadowOffsetY=1,g.shadowBlur=5,g.fillStyle=e,g.fill(),g.shadowOffsetY=0,g.shadowBlur=0,g.shadowBlur=0,g.beginPath(),xn(g,o+.5,o+.5,c,a,r),g.strokeStyle=t,g.lineWidth=1,g.stroke(),{el:f,height:l,width:d,sideWidth:u*i,middleWidth:r*i,padding:o*i,dpr:i})}function Ob(e,t){const{rect:n,theme:r,ctx:i,imageLoader:o,col:a,row:s}=e,{x:l,width:u}=n,c=r.baseFontFull,d=bp(i,c),h=Math.min(n.height,Math.max(16,Math.ceil(d*r.lineHeight)*2)),f=Math.floor(n.y+(n.height-h)/2),g=h-10,m=8,x=Pb;let _=l+r.cellHorizontalPadding;const y=r.roundingRadius??6,C=Ab(r.bgCell,r.drilldownBorder,h,y),P=[];for(const S of t){if(_>l+u)break;const O=zi(S.text,i,c).width;let A=0;S.img!==void 0&&o.loadOrGetImage(S.img,a,s)!==void 0&&(A=g-8+4);const E=O+A+m*2;P.push({x:_,width:E}),_+=E+x}if(C!==null){const{el:S,height:T,middleWidth:O,sideWidth:A,width:E,dpr:L,padding:R}=C,b=A/L,k=R/L;for(const I of P){const w=Math.floor(I.x),N=Math.floor(I.width),B=N-(b-k)*2;i.imageSmoothingEnabled=!1,i.drawImage(S,0,0,A,T,w-k,f,b,h),B>0&&i.drawImage(S,A,0,O,T,w+(b-k),f,B,h),i.drawImage(S,E-A,0,A,T,w+N-(b-k),f,b,h),i.imageSmoothingEnabled=!0}}i.beginPath();for(const[S,T]of P.entries()){const O=t[S];let A=T.x+m;if(O.img!==void 0){const E=o.loadOrGetImage(O.img,a,s);if(E!==void 0){const L=g-8;let R=0,b=0,k=E.width,I=E.height;k>I?(R+=(k-I)/2,k=I):I>k&&(b+=(I-k)/2,I=k),i.beginPath(),xn(i,A,f+h/2-L/2,L,L,r.roundingRadius??3),i.save(),i.clip(),i.drawImage(E,R,b,k,I,A,f+h/2-L/2,L,L),i.restore(),A+=L+4}}i.beginPath(),i.fillStyle=r.textBubble,i.fillText(O.text,A,f+h/2+Xn(i,r))}}const Db={getAccessibilityString:e=>e.data.join(", "),kind:ue.Image,needsHover:!1,useLabel:!1,needsHoverPosition:!1,draw:e=>Fb(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??c1;return p.createElement(i,{urls:t.data,canWrite:t.readonly!==!1,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}}},pu=4;function Fb(e,t,n,r){const{rect:i,col:o,row:a,theme:s,ctx:l,imageLoader:u}=e,{x:c,y:d,height:h,width:f}=i,g=h-s.cellVerticalPadding*2,m=[];let x=0;for(let y=0;y<t.length;y++){const C=t[y];if(C.length===0)continue;const P=u.loadOrGetImage(C,o,a);if(P!==void 0){m[y]=P;const S=P.width*(g/P.height);x+=S+pu}}if(x===0)return;x-=pu;let _=c+s.cellHorizontalPadding;r==="right"?_=Math.floor(c+f-s.cellHorizontalPadding-x):r==="center"&&(_=Math.floor(c+f/2-x/2));for(const y of m){if(y===void 0)continue;const C=y.width*(g/y.height);n>0&&(l.beginPath(),xn(l,_,d+s.cellVerticalPadding,C,g,n),l.save(),l.clip()),l.drawImage(y,_,d+s.cellVerticalPadding,C,g),n>0&&l.restore(),_+=C+pu}}function zb(e,t){let n=e*49632+t*325176;return n^=n<<13,n^=n>>17,n^=n<<5,n/4294967295*2}const Lb={getAccessibilityString:()=>"",kind:ue.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 s=t.skeletonWidth;t.skeletonWidthVariability!==void 0&&t.skeletonWidthVariability>0&&(s+=Math.round(zb(n,r)*t.skeletonWidthVariability));const l=a.cellHorizontalPadding,u=t.skeletonHeight??Math.min(18,o.height-2*a.cellVerticalPadding);xn(i,o.x+l,o.y+(o.height-u)/2,s,u,a.roundingRadius??3),i.fillStyle=dr(a.textDark,.1),i.fill()},onPaste:()=>{}},Hb=()=>e=>e.targetWidth,Eg=Ut("div")({name:"MarkdownOverlayEditorStyle",class:"gdg-m1pnx84e",propsAsIs:!1,vars:{"m1pnx84e-0":[Hb(),"px"]}}),qb=e=>{const{value:t,onChange:n,forceEditMode:r,createNode:i,targetRect:o,onFinish:a,validatedSelection:s}=e,l=t.data,u=t.readonly===!0,[c,d]=p.useState(l===""||r),h=p.useCallback(()=>{d(g=>!g)},[]),f=l?"gdg-ml-6":"";return c?p.createElement(Eg,{targetWidth:o.width-20},p.createElement(qo,{autoFocus:!0,highlight:!1,validatedSelection:s,value:l,onKeyDown:g=>{g.key==="Enter"&&g.stopPropagation()},onChange:n}),p.createElement("div",{className:`gdg-edit-icon gdg-checkmark-hover ${f}`,onClick:()=>a(t)},p.createElement(r1,null))):p.createElement(Eg,{targetWidth:o.width},p.createElement(T1,{contents:l,createNode:i}),!u&&p.createElement(p.Fragment,null,p.createElement("div",{className:"spacer"}),p.createElement("div",{className:`gdg-edit-icon gdg-edit-hover ${f}`,onClick:h},p.createElement(Vu,null))),p.createElement("textarea",{className:"gdg-md-edit-textarea gdg-input",autoFocus:!0}))},$b={getAccessibilityString:e=>e.data?.toString()??"",kind:ue.Markdown,needsHover:!1,needsHoverPosition:!1,drawPrep:Li,measure:(e,t,n)=>{const r=t.data.split(`
218
+ `)[0];return e.measureText(r).width+2*n.cellHorizontalPadding},draw:e=>Dn(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:s}=e;return p.createElement(qb,{onFinish:i,targetRect:r,value:n,validatedSelection:s,onChange:l=>t({...n,data:l.target.value}),forceEditMode:a,createNode:o})},onPaste:(e,t)=>e===t.data?void 0:{...t,data:e}},Nb={getAccessibilityString:e=>e.row.toString(),kind:ln.Marker,needsHover:!0,needsHoverPosition:!1,drawPrep:Wb,measure:()=>44,draw:e=>jb(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,s=n.drawHandle?7+(o-7)/2:o/2,l=a/2;if(Math.abs(r-s)<=10&&Math.abs(i-l)<=10)return{...n,checked:!n.checked}},onPaste:()=>{}};function Wb(e,t){const{ctx:n,theme:r}=e,i=r.markerFontFull,o=t??{};return o?.font!==i&&(n.font=i,o.font=i),o.deprep=Bb,n.textAlign="center",o}function Bb(e){const{ctx:t}=e;t.textAlign="start"}function jb(e,t,n,r,i,o){const{ctx:a,rect:s,hoverAmount:l,theme:u}=e,{x:c,y:d,width:h,height:f}=s,g=n?1:r==="checkbox-visible"?.6+.4*l:l;if(r!=="number"&&g>0){a.globalAlpha=g;const m=7*(n?l:1);if(oc(a,u,n,i?c+m:c,d,i?h-m:h,f,!0,void 0,void 0,18,"center",o),i){a.globalAlpha=l,a.beginPath();for(const x of[3,6])for(const _ of[-5,-1,3])a.rect(c+x,d+f/2+_,2,2);a.fillStyle=u.textLight,a.fill(),a.beginPath()}a.globalAlpha=1}if(r==="number"||r==="both"&&!n){const m=t.toString(),x=u.markerFontFull,_=c+h/2;r==="both"&&l!==0&&(a.globalAlpha=1-l),a.fillStyle=u.textLight,a.font=x,a.fillText(m,_,d+f/2+Xn(a,x)),l!==0&&(a.globalAlpha=1)}}const Ub={getAccessibilityString:()=>"",kind:ln.NewRow,needsHover:!0,needsHoverPosition:!1,measure:()=>200,draw:e=>Yb(e,e.cell.hint,e.cell.icon),onPaste:()=>{}};function Yb(e,t,n){const{ctx:r,rect:i,hoverAmount:o,theme:a,spriteManager:s}=e,{x:l,y:u,width:c,height:d}=i;r.beginPath(),r.globalAlpha=o,r.rect(l+1,u+1,c,d-2),r.fillStyle=a.bgHeaderHovered,r.fill(),r.globalAlpha=1,r.beginPath();const h=t!=="";let f=0;if(n!==void 0){const m=d-8,x=l+8/2,_=u+8/2;s.drawSprite(n,"normal",r,x,_,m,a,h?1:o),f=m}else{f=24;const g=12,m=h?g:o*g,x=h?0:(1-o)*g*.5,_=a.cellHorizontalPadding+4;m>0&&(r.moveTo(l+_+x,u+d/2),r.lineTo(l+_+x+m,u+d/2),r.moveTo(l+_+x+m*.5,u+d/2-m*.5),r.lineTo(l+_+x+m*.5,u+d/2+m*.5),r.lineWidth=2,r.strokeStyle=a.bgIconHeader,r.lineCap="round",r.stroke())}r.fillStyle=a.textMedium,r.fillText(t,f+l+a.cellHorizontalPadding+.5,u+d/2+Xn(r,a)),r.beginPath()}const Gb=p.lazy(async()=>await Promise.resolve().then(()=>require("./number-overlay-editor-CM2UdWZW.cjs"))),Xb={getAccessibilityString:e=>e.data?.toString()??"",kind:ue.Number,needsHover:!1,needsHoverPosition:!1,useLabel:!0,drawPrep:Li,draw:e=>Dn(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 p.createElement(p.Suspense,{fallback:null},p.createElement(Gb,{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}}},Kb={getAccessibilityString:()=>"",measure:()=>108,kind:ue.Protected,needsHover:!1,needsHoverPosition:!1,draw:Vb,onPaste:()=>{}};function Vb(e){const{ctx:t,theme:n,rect:r}=e,{x:i,y:o,height:a}=r;t.beginPath();const s=2.5;let l=i+n.cellHorizontalPadding+s;const u=o+a/2,c=Math.cos(mf(30))*s,d=Math.sin(mf(30))*s;for(let h=0;h<12;h++)t.moveTo(l,u-s),t.lineTo(l,u+s),t.moveTo(l+c,u-d),t.lineTo(l-c,u+d),t.moveTo(l-c,u-d),t.lineTo(l+c,u+d),l+=8;t.lineWidth=1.1,t.lineCap="square",t.strokeStyle=n.textLight,t.stroke()}const Zb={getAccessibilityString:e=>e.data?.toString()??"",kind:ue.RowID,needsHover:!1,needsHoverPosition:!1,drawPrep:(e,t)=>Li(e,t,e.theme.textLight),draw:e=>Dn(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(qo,{highlight:t,autoFocus:r.readonly!==!0,disabled:r.readonly!==!1,value:r.data,validatedSelection:i,onChange:o=>n({...r,data:o.target.value})})},onPaste:()=>{}},Jb={getAccessibilityString:e=>e.data?.toString()??"",kind:ue.Text,needsHover:e=>e.hoverEffect===!0,needsHoverPosition:!1,drawPrep:Li,useLabel:!0,draw:e=>{const{cell:t,hoverAmount:n,hyperWrapping:r,ctx:i,rect:o,theme:a,overrideCursor:s}=e,{displayData:l,contentAlign:u,hoverEffect:c,allowWrapping:d}=t;if(c===!0&&n>0){i.textBaseline="alphabetic";const h=a.cellHorizontalPadding,f=a.cellVerticalPadding,g=zi(l,i,a.baseFontFull,"alphabetic"),m=o.height-f,x=Math.min(m,g.actualBoundingBoxAscent*2.5);i.beginPath(),xn(i,o.x+h/2,o.y+(o.height-x)/2+1,g.width+h*3,x-1,a.roundingRadius??4),i.globalAlpha=n,i.fillStyle=dr(a.textDark,.1),i.fill(),i.globalAlpha=1,i.fillStyle=a.textDark,i.textBaseline="middle",s?.("text")}Dn(e,l,u,d,r)},measure:(e,t,n)=>{const r=t.displayData.split(`
219
+ `,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 p.createElement(qo,{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}},Qb=Ut("div")({name:"UriOverlayEditorStyle",class:"gdg-u1rrojo",propsAsIs:!1}),eS=e=>{const{uri:t,onChange:n,forceEditMode:r,readonly:i,validatedSelection:o,preview:a}=e,[s,l]=p.useState(!i&&(t===""||r)),u=p.useCallback(()=>{l(!0)},[]);return s?p.createElement(qo,{validatedSelection:o,highlight:!0,autoFocus:!0,value:t,onChange:n}):p.createElement(Qb,null,p.createElement("a",{className:"gdg-link-area",href:t,target:"_blank",rel:"noopener noreferrer"},a),!i&&p.createElement("div",{className:"gdg-edit-icon",onClick:u},p.createElement(Vu,null)),p.createElement("textarea",{className:"gdg-input",autoFocus:!0}))};function Mg(e,t,n,r){let i=n.cellHorizontalPadding;const o=t.height/2-e.actualBoundingBoxAscent/2,a=e.width,s=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:s}}const tS={getAccessibilityString:e=>e.data?.toString()??"",kind:ue.Uri,needsHover:e=>e.hoverEffect===!0,needsHoverPosition:!0,useLabel:!0,drawPrep:Li,draw:e=>{const{cell:t,theme:n,overrideCursor:r,hoverX:i,hoverY:o,rect:a,ctx:s}=e,l=t.displayData??t.data,u=t.hoverEffect===!0;if(r!==void 0&&u&&i!==void 0&&o!==void 0){const c=zi(l,s,n.baseFontFull),d=Mg(c,a,n,t.contentAlign),{x:h,y:f,width:g,height:m}=d;if(i>=h-4&&i<=h-4+g+8&&o>=f-4&&o<=f-4+m+8){const x=Xn(s,n.baseFontFull);r("pointer");const _=5,y=f-x;s.beginPath(),s.moveTo(a.x+h,Math.floor(a.y+y+m+_)+.5),s.lineTo(a.x+h+g,Math.floor(a.y+y+m+_)+.5),s.strokeStyle=n.linkColor,s.stroke(),s.save(),s.fillStyle=e.cellFillColor,Dn({...e,rect:{...a,x:a.x-1}},l,t.contentAlign),Dn({...e,rect:{...a,x:a.x-2}},l,t.contentAlign),Dn({...e,rect:{...a,x:a.x+1}},l,t.contentAlign),Dn({...e,rect:{...a,x:a.x+2}},l,t.contentAlign),s.restore()}}s.fillStyle=u?n.linkColor:n.textDark,Dn(e,l,t.contentAlign)},onClick: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;const s=G1(a,o.baseFontFull);if(s===void 0)return;const l=Mg(s,n,o,t.contentAlign);No({x:l.x-4,y:l.y-4,width:l.width+8,height:l.height+8},r,i)&&t.onClickUri(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 p.createElement(eS,{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}},nS=[Nb,Ub,Sb,kb,Ib,Db,Lb,$b,Xb,Kb,Zb,Jb,tS];var mu,Tg;function rS(){if(Tg)return mu;Tg=1;var e=tp(),t=gr(),n="Expected a function";function r(i,o,a){var s=!0,l=!0;if(typeof i!="function")throw new TypeError(n);return t(a)&&(s="leading"in a?!!a.leading:s,l="trailing"in a?!!a.trailing:l),e(i,o,{leading:s,maxWait:o,trailing:l})}return mu=r,mu}var iS=rS();const oS=Gn(iS),vu=[];class aS extends Cp{imageLoaded=()=>{};loadedLocations=[];cache={};setCallback(t){this.imageLoaded=t}sendLoaded=oS(()=>{this.imageLoaded(new Mi(this.loadedLocations)),this.loadedLocations=[]},20);clearOutOfWindow=()=>{const t=Object.keys(this.cache);for(const n of t){const r=this.cache[n];let i=!1;for(let o=0;o<r.cells.length;o++){const a=r.cells[o];if(this.isInWindow(a)){i=!0;break}}i?r.cells=r.cells.filter(this.isInWindow):(r.cancel(),delete this.cache[n])}};loadImage(t,n,r,i){let o=!1;const a=vu.pop()??new Image;let s=!1;const l={img:void 0,cells:[mn(n,r)],url:t,cancel:()=>{s||(s=!0,vu.length<12?vu.unshift(a):o||(a.src=""))}},u=new Promise(c=>a.addEventListener("load",()=>c(null)));requestAnimationFrame(async()=>{try{a.src=t,await u,await a.decode();const c=this.cache[i];if(c!==void 0&&!s){c.img=a;for(const d of c.cells)this.loadedLocations.push(nc(d));o=!0,this.sendLoaded()}}catch{l.cancel()}}),this.cache[i]=l}loadOrGetImage(t,n,r){const i=t,o=this.cache[i];if(o!==void 0){const a=mn(n,r);return o.cells.includes(a)||o.cells.push(a),o.img}else this.loadImage(t,n,r,i)}}const sS=(e,t)=>{const n=p.useMemo(()=>({...iy,...e.headerIcons}),[e.headerIcons]),r=p.useMemo(()=>e.imageWindowLoader??new aS,[e.imageWindowLoader]);return p.createElement(bb,{...e,renderers:nS,headerIcons:n,ref:t,imageWindowLoader:r})},lS=p.forwardRef(sS);/**
220
+ * @license @tabler/icons-react v3.35.0 - MIT
221
+ *
222
+ * This source code is licensed under the MIT license.
223
+ * See the LICENSE file in the root directory of this source tree.
224
+ */var uS={outline:{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},filled:{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"currentColor",stroke:"none"}};/**
225
+ * @license @tabler/icons-react v3.35.0 - MIT
226
+ *
227
+ * This source code is licensed under the MIT license.
228
+ * See the LICENSE file in the root directory of this source tree.
229
+ */const Vn=(e,t,n,r)=>{const i=se.forwardRef(({color:o="currentColor",size:a=24,stroke:s=2,title:l,className:u,children:c,...d},h)=>se.createElement("svg",{ref:h,...uS[e],width:a,height:a,className:["tabler-icon",`tabler-icon-${t}`,u].join(" "),strokeWidth:s,stroke:o,...d},[l&&se.createElement("title",{key:"svg-title"},l),...r.map(([f,g])=>se.createElement(f,g)),...Array.isArray(c)?c:[c]]));return i.displayName=`${n}`,i};/**
230
+ * @license @tabler/icons-react v3.35.0 - MIT
231
+ *
232
+ * This source code is licensed under the MIT license.
233
+ * See the LICENSE file in the root directory of this source tree.
234
+ */const cS=[["path",{d:"M7 7h-1a2 2 0 0 0 -2 2v9a2 2 0 0 0 2 2h9a2 2 0 0 0 2 -2v-1",key:"svg-0"}],["path",{d:"M20.385 6.585a2.1 2.1 0 0 0 -2.97 -2.97l-8.415 8.385v3h3l8.385 -8.415z",key:"svg-1"}],["path",{d:"M16 5l3 3",key:"svg-2"}]],Ig=Vn("outline","edit","Edit",cS);/**
235
+ * @license @tabler/icons-react v3.35.0 - MIT
236
+ *
237
+ * This source code is licensed under the MIT license.
238
+ * See the LICENSE file in the root directory of this source tree.
239
+ */const dS=[["path",{d:"M12 19v.01",key:"svg-0"}],["path",{d:"M12 15v-10",key:"svg-1"}]],fS=Vn("outline","exclamation-mark","ExclamationMark",dS);/**
240
+ * @license @tabler/icons-react v3.35.0 - MIT
241
+ *
242
+ * This source code is licensed under the MIT license.
243
+ * See the LICENSE file in the root directory of this source tree.
244
+ */const hS=[["path",{d:"M3 6h18",key:"svg-0"}],["path",{d:"M3 12h18",key:"svg-1"}],["path",{d:"M3 18h18",key:"svg-2"}],["path",{d:"M6 3v18",key:"svg-3"}],["path",{d:"M12 3v18",key:"svg-4"}],["path",{d:"M18 3v18",key:"svg-5"}]],gS=Vn("outline","grid-4x4","Grid4x4",hS);/**
245
+ * @license @tabler/icons-react v3.35.0 - MIT
246
+ *
247
+ * This source code is licensed under the MIT license.
248
+ * See the LICENSE file in the root directory of this source tree.
249
+ */const pS=[["path",{d:"M4 6l16 0",key:"svg-0"}],["path",{d:"M4 12l16 0",key:"svg-1"}],["path",{d:"M4 18l16 0",key:"svg-2"}]],mS=Vn("outline","menu-2","Menu2",pS);/**
250
+ * @license @tabler/icons-react v3.35.0 - MIT
251
+ *
252
+ * This source code is licensed under the MIT license.
253
+ * See the LICENSE file in the root directory of this source tree.
254
+ */const vS=[["path",{d:"M20 11a8.1 8.1 0 0 0 -15.5 -2m-.5 -4v4h4",key:"svg-0"}],["path",{d:"M4 13a8.1 8.1 0 0 0 15.5 2m.5 4v-4h-4",key:"svg-1"}]],yS=Vn("outline","refresh","Refresh",vS);/**
255
+ * @license @tabler/icons-react v3.35.0 - MIT
256
+ *
257
+ * This source code is licensed under the MIT license.
258
+ * See the LICENSE file in the root directory of this source tree.
259
+ */const wS=[["path",{d:"M9 12h6",key:"svg-0"}],["path",{d:"M12 9v6",key:"svg-1"}],["path",{d:"M3 5a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-14z",key:"svg-2"}]],bS=Vn("outline","square-plus","SquarePlus",wS);/**
260
+ * @license @tabler/icons-react v3.35.0 - MIT
261
+ *
262
+ * This source code is licensed under the MIT license.
263
+ * See the LICENSE file in the root directory of this source tree.
264
+ */const SS=[["path",{d:"M4 7h16",key:"svg-0"}],["path",{d:"M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2 -2l1 -12",key:"svg-1"}],["path",{d:"M9 7v-3a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v3",key:"svg-2"}],["path",{d:"M10 12l4 4m0 -4l-4 4",key:"svg-3"}]],Pg=Vn("outline","trash-x","TrashX",SS);/**
265
+ * @license @tabler/icons-react v3.35.0 - MIT
266
+ *
267
+ * This source code is licensed under the MIT license.
268
+ * See the LICENSE file in the root directory of this source tree.
269
+ */const CS=[["path",{d:"M18 6l-12 12",key:"svg-0"}],["path",{d:"M6 6l12 12",key:"svg-1"}]],xS=Vn("outline","x","X",CS);function _S(e,t){if(!e||!t||e.includes("..")||e.includes("[]")||/\[\s*\]/.test(e))return;const n=e.replace(/\[(\w+)\]/g,".$1").split(".").filter(Boolean);if(n.length!==0)return n.reduce((r,i)=>{if(r!=null&&typeof r=="object")return r[i]},t)}var em=Symbol.for("immer-nothing"),Ag=Symbol.for("immer-draftable"),nn=Symbol.for("immer-state"),kS=process.env.NODE_ENV!=="production"?[function(e){return`The plugin for '${e}' has not been loaded into Immer. To enable the plugin, import and call \`enable${e}()\` when initializing your application.`},function(e){return`produce can only be called on things that are draftable: plain objects, arrays, Map, Set or classes that are marked with '[immerable]: true'. Got '${e}'`},"This object has been frozen and should not be mutated",function(e){return"Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? "+e},"An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.","Immer forbids circular references","The first or second argument to `produce` must be a function","The third argument to `produce` must be a function or undefined","First argument to `createDraft` must be a plain object, an array, or an immerable object","First argument to `finishDraft` must be a draft returned by `createDraft`",function(e){return`'current' expects a draft, got: ${e}`},"Object.defineProperty() cannot be used on an Immer draft","Object.setPrototypeOf() cannot be used on an Immer draft","Immer only supports deleting array indices","Immer only supports setting array indices and the 'length' property",function(e){return`'original' expects a draft, got: ${e}`}]:[];function jt(e,...t){if(process.env.NODE_ENV!=="production"){const n=kS[e],r=typeof n=="function"?n.apply(null,t):n;throw new Error(`[Immer] ${r}`)}throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Xr=Object.getPrototypeOf;function Kr(e){return!!e&&!!e[nn]}function fr(e){return e?tm(e)||Array.isArray(e)||!!e[Ag]||!!e.constructor?.[Ag]||Hi(e)||Bo(e):!1}var RS=Object.prototype.constructor.toString();function tm(e){if(!e||typeof e!="object")return!1;const t=Xr(e);if(t===null)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object?!0:typeof n=="function"&&Function.toString.call(n)===RS}function Io(e,t){Wo(e)===0?Reflect.ownKeys(e).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function Wo(e){const t=e[nn];return t?t.type_:Array.isArray(e)?1:Hi(e)?2:Bo(e)?3:0}function Tu(e,t){return Wo(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function nm(e,t,n){const r=Wo(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function ES(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function Hi(e){return e instanceof Map}function Bo(e){return e instanceof Set}function sr(e){return e.copy_||e.base_}function Iu(e,t){if(Hi(e))return new Map(e);if(Bo(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=tm(e);if(t===!0||t==="class_only"&&!n){const r=Object.getOwnPropertyDescriptors(e);delete r[nn];let i=Reflect.ownKeys(r);for(let o=0;o<i.length;o++){const a=i[o],s=r[a];s.writable===!1&&(s.writable=!0,s.configurable=!0),(s.get||s.set)&&(r[a]={configurable:!0,writable:!0,enumerable:s.enumerable,value:e[a]})}return Object.create(Xr(e),r)}else{const r=Xr(e);if(r!==null&&n)return{...e};const i=Object.create(r);return Object.assign(i,e)}}function lc(e,t=!1){return jo(e)||Kr(e)||!fr(e)||(Wo(e)>1&&Object.defineProperties(e,{set:{value:wo},add:{value:wo},clear:{value:wo},delete:{value:wo}}),Object.freeze(e),t&&Object.values(e).forEach(n=>lc(n,!0))),e}function wo(){jt(2)}function jo(e){return Object.isFrozen(e)}var MS={};function hr(e){const t=MS[e];return t||jt(0,e),t}var Pi;function rm(){return Pi}function TS(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function Og(e,t){t&&(hr("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Pu(e){Au(e),e.drafts_.forEach(IS),e.drafts_=null}function Au(e){e===Pi&&(Pi=e.parent_)}function Dg(e){return Pi=TS(Pi,e)}function IS(e){const t=e[nn];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Fg(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[nn].modified_&&(Pu(t),jt(4)),fr(e)&&(e=Po(t,e),t.parent_||Ao(t,e)),t.patches_&&hr("Patches").generateReplacementPatches_(n[nn].base_,e,t.patches_,t.inversePatches_)):e=Po(t,n,[]),Pu(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==em?e:void 0}function Po(e,t,n){if(jo(t))return t;const r=t[nn];if(!r)return Io(t,(i,o)=>zg(e,r,t,i,o,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return Ao(e,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const i=r.copy_;let o=i,a=!1;r.type_===3&&(o=new Set(i),i.clear(),a=!0),Io(o,(s,l)=>zg(e,r,i,s,l,n,a)),Ao(e,i,!1),n&&e.patches_&&hr("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function zg(e,t,n,r,i,o,a){if(process.env.NODE_ENV!=="production"&&i===n&&jt(5),Kr(i)){const s=o&&t&&t.type_!==3&&!Tu(t.assigned_,r)?o.concat(r):void 0,l=Po(e,i,s);if(nm(n,r,l),Kr(l))e.canAutoFreeze_=!1;else return}else a&&n.add(i);if(fr(i)&&!jo(i)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;Po(e,i),(!t||!t.scope_.parent_)&&typeof r!="symbol"&&(Hi(n)?n.has(r):Object.prototype.propertyIsEnumerable.call(n,r))&&Ao(e,i)}}function Ao(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&lc(t,n)}function PS(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:rm(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let i=r,o=uc;n&&(i=[r],o=Ai);const{revoke:a,proxy:s}=Proxy.revocable(i,o);return r.draft_=s,r.revoke_=a,s}var uc={get(e,t){if(t===nn)return e;const n=sr(e);if(!Tu(n,t))return AS(e,n,t);const r=n[t];return e.finalized_||!fr(r)?r:r===yu(e.base_,t)?(wu(e),e.copy_[t]=Du(r,e)):r},has(e,t){return t in sr(e)},ownKeys(e){return Reflect.ownKeys(sr(e))},set(e,t,n){const r=im(sr(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const i=yu(sr(e),t),o=i?.[nn];if(o&&o.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(ES(n,i)&&(n!==void 0||Tu(e.base_,t)))return!0;wu(e),Ou(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty(e,t){return yu(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,wu(e),Ou(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=sr(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){jt(11)},getPrototypeOf(e){return Xr(e.base_)},setPrototypeOf(){jt(12)}},Ai={};Io(uc,(e,t)=>{Ai[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});Ai.deleteProperty=function(e,t){return process.env.NODE_ENV!=="production"&&isNaN(parseInt(t))&&jt(13),Ai.set.call(this,e,t,void 0)};Ai.set=function(e,t,n){return process.env.NODE_ENV!=="production"&&t!=="length"&&isNaN(parseInt(t))&&jt(14),uc.set.call(this,e[0],t,n,e[0])};function yu(e,t){const n=e[nn];return(n?sr(n):e)[t]}function AS(e,t,n){const r=im(t,n);return r?"value"in r?r.value:r.get?.call(e.draft_):void 0}function im(e,t){if(!(t in e))return;let n=Xr(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Xr(n)}}function Ou(e){e.modified_||(e.modified_=!0,e.parent_&&Ou(e.parent_))}function wu(e){e.copy_||(e.copy_=Iu(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var OS=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,n,r)=>{if(typeof t=="function"&&typeof n!="function"){const o=n;n=t;const a=this;return function(l=o,...u){return a.produce(l,c=>n.call(this,c,...u))}}typeof n!="function"&&jt(6),r!==void 0&&typeof r!="function"&&jt(7);let i;if(fr(t)){const o=Dg(this),a=Du(t,void 0);let s=!0;try{i=n(a),s=!1}finally{s?Pu(o):Au(o)}return Og(o,r),Fg(i,o)}else if(!t||typeof t!="object"){if(i=n(t),i===void 0&&(i=t),i===em&&(i=void 0),this.autoFreeze_&&lc(i,!0),r){const o=[],a=[];hr("Patches").generateReplacementPatches_(t,i,o,a),r(o,a)}return i}else jt(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return(a,...s)=>this.produceWithPatches(a,l=>t(l,...s));let r,i;return[this.produce(t,n,(a,s)=>{r=a,i=s}),r,i]},typeof e?.autoFreeze=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof e?.useStrictShallowCopy=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){fr(e)||jt(8),Kr(e)&&(e=DS(e));const t=Dg(this),n=Du(e,void 0);return n[nn].isManual_=!0,Au(t),n}finishDraft(e,t){const n=e&&e[nn];(!n||!n.isManual_)&&jt(9);const{scope_:r}=n;return Og(r,t),Fg(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const i=t[n];if(i.path.length===0&&i.op==="replace"){e=i.value;break}}n>-1&&(t=t.slice(n+1));const r=hr("Patches").applyPatches_;return Kr(e)?r(e,t):this.produce(e,i=>r(i,t))}};function Du(e,t){const n=Hi(e)?hr("MapSet").proxyMap_(e,t):Bo(e)?hr("MapSet").proxySet_(e,t):PS(e,t);return(t?t.scope_:rm()).drafts_.push(n),n}function DS(e){return Kr(e)||jt(10,e),om(e)}function om(e){if(!fr(e)||jo(e))return e;const t=e[nn];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=Iu(e,t.scope_.immer_.useStrictShallowCopy_)}else n=Iu(e,!0);return Io(n,(r,i)=>{nm(n,r,om(i))}),t&&(t.finalized_=!1),n}var FS=new OS,Ur=FS.produce;const{Provider:zS,useStore:cc}=qg.createSyncStore((e,t)=>({hide:n=>{t().setInstanceState(n,"visible",!1)},menus:[],setInstanceState:(n,r,i)=>{e(Ur(o=>{const a=o?.menus?.findIndex(s=>s.id===n);a>=0&&(o.menus[a][r]=i)}))},setState:(n,r)=>{e(Ur(i=>{i[n]=r}))},show:(n,r)=>{const i=t(),o=i.menus.findIndex(s=>s.id===n),a=i.menus[o]?{...i.menus[o]}:{};Object.assign(a,r),a.id=a.id??n,a.visible=!(a.visible??!1),o<0?i.setState("menus",[...i.menus,a]):e(Ur(s=>{s.menus||(s.menus=[]),s.menus[o]={...s.menus[o],...a}}))}}),e=>({providerID:e.providerID??`MenuStore-${Hg.getUUID()}`}));function LS(){const{menus:e,providerID:t,setInstanceState:n,width:r}=cc(i=>({menus:i.menus,providerID:i.providerID,setInstanceState:i.setInstanceState,setState:i.setState,width:i.width}));return ye.jsx(vt.Portal,{id:`bmm_portal_${t}`,children:se.Children.toArray(e?.map((i,o)=>se.createElement(vt.Menu,{shadow:"md",width:r??"300",...i.menuProps,key:`bmm_menu_${t}_${o}`,onClose:()=>{n(i.id,"visible",!1),i.menuProps?.onClose?.()},opened:i.visible},ye.jsx(vt.Menu.Target,{children:ye.jsx("div",{id:`bmm_${t}_${o}_target`,style:{left:i.x,position:"fixed",top:i.y,visibility:"hidden"}})}),ye.jsx(vt.Menu.Dropdown,{children:i.renderer?i.renderer:se.Children.toArray(i.items?.map((a,s)=>ye.jsx(am,{...a},`bmm_${t}_${o}_item${s}`)))}))))},`bmm_portal_${t}`)}const am=({children:e,label:t,...n})=>{const[r,i]=se.useState(!1);return typeof n.renderer=="function"?n.renderer({...n,loading:r,renderer:void 0,setLoading:i}):typeof n.renderer=="object"?n.renderer:n.isDivider?ye.jsx(vt.Menu.Divider,{}):n.items&&n.items.length>0?ye.jsxs(vt.Menu.Sub,{children:[ye.jsx(vt.Menu.Sub.Target,{children:ye.jsx(vt.Menu.Sub.Item,{...n,disabled:r,onClick:o=>{n.onClick?.(o),n.onClickAsync&&(i(!0),n.onClickAsync().finally(()=>i(!1)))},styles:{itemLabel:{overflow:"auto",wordWrap:"break-word"},...n.styles},children:e??t})}),ye.jsx(vt.Menu.Sub.Dropdown,{children:se.Children.toArray(n.items.map((o,a)=>ye.jsx(am,{...o},`bmm_subitem_${o?.id??""}${a}`)))})]}):!n.onClick&&!n.onClickAsync?ye.jsxs(vt.Menu.Label,{...n,children:[" ",e??t]}):ye.jsx(vt.Menu.Item,{...n,disabled:r,onClick:o=>{n.onClick?.(o),n.onClickAsync&&(i(!0),n.onClickAsync().finally(()=>i(!1)))},styles:{itemLabel:{overflow:"auto",wordWrap:"break-word"},...n.styles},children:e??t})};function sm(e){return ye.jsxs(zS,{...e,children:[ye.jsx(LS,{}),e.children]})}const lm=[{label:"Contains",value:"contains"},{label:"Equal",value:"eq"},{label:"Not Equal",value:"neq"},{label:"Greater Than",value:"gt"},{label:"Greater Than or Equal",value:"gte"},{label:"Less Than",value:"lt"},{label:"Less Than or Equal",value:"lte"}],um=e=>{const t=e.storeState?.colFilters?.findIndex(a=>a.id===e.column.id)??-1,n=e.storeState?.colFilters?.[t]??{id:e.column.id,value:""},[r,i]=se.useState(n?.value??""),[o]=Hu.useDebouncedValue(r,900);return se.useEffect(()=>{e.storeState.setStateFN("colFilters",a=>{const s=a?.findIndex(u=>u.id===e.column.id)??-1,l=a??[];return s>=0?l[s]={...l[s],...e.options,id:e.column.id,value:o}:l.push({operator:"contains",...e.options,id:e.column.id,value:o}),l})},[o,e.column.id,e.options,e.storeState]),ye.jsx(vt.TextInput,{onChange:a=>i(a.target.value),rightSection:ye.jsx(vt.ActionIcon,{color:"gray",onClick:()=>i(""),variant:"filled",children:ye.jsx(xS,{color:"red"})}),value:r??n?.value})},cm=e=>{const t=e.storeState?.colFilters?.findIndex(a=>a.id===e.column.id)??-1,n=e.storeState?.colFilters?.[t]??{id:e.column.id,operator:"contains"},[r,i]=se.useState(n?.operator??"contains"),[o]=Hu.useDebouncedValue(r,900);return se.useEffect(()=>{e.storeState.setStateFN("colFilters",a=>{const s=a?.findIndex(u=>u.id===e.column.id)??-1,l=a??[];return s>=0?l[s]={...l[s],...e.options,id:e.column.id,operator:o}:l.push({...e.options,id:e.column.id,operator:o,value:""}),l})},[o,e.column.id,e.options,e.storeState]),ye.jsx(vt.Select,{comboboxProps:{withinPortal:!1},data:lm,maxDropdownHeight:150,onChange:a=>i(a),placeholder:"Operator",searchable:!0,value:r??n?.operator,withScrollArea:!0})},Fu=e=>ye.jsxs(vt.Stack,{onClick:t=>t.stopPropagation(),children:[ye.jsx(cm,{...e}),ye.jsx(um,{...e})]}),zu=e=>`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="20" height="20" fill="none">
270
+ <path
271
+ fill="${e.fgColor??"currentColor"}"
272
+ d="M15 2.5a.5.5 0 0 0-1 0v13.793l-2.146-2.147a.5.5 0 0 0-.708.708l3 3a.5.5 0 0 0 .708 0l3-3a.5.5 0 0 0-.708-.708L15 16.293zM2.5 4a.5.5 0 0 0 0 1h9a.5.5 0 0 0 0-1zM5 7.5a.5.5 0 0 1 .5-.5h6a.5.5 0 0 1 0 1h-6a.5.5 0 0 1-.5-.5M8.5 10a.5.5 0 0 0 0 1h3a.5.5 0 0 0 0-1z"
273
+ ></path>
274
+ </svg>
275
+ `,Lu=e=>`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="20" height="20" fill="none">
276
+ <path
277
+ fill="${e.fgColor??"currentColor"}"
278
+ d="M15 17.5a.5.5 0 0 1-1 0V3.707l-2.146 2.147a.5.5 0 0 1-.708-.708l3-3a.5.5 0 0 1 .708 0l3 3a.5.5 0 0 1-.708.708L15 3.707zM2.5 16a.5.5 0 0 1 0-1h9a.5.5 0 0 1 0 1zM5 12.5a.5.5 0 0 0 .5.5h6a.5.5 0 0 0 0-1h-6a.5.5 0 0 0-.5.5M8.5 10a.5.5 0 0 1 0-1h3a.5.5 0 0 1 0 1z"
279
+ ></path>
280
+ </svg>
281
+ `,bo=e=>ye.jsx("img",{alt:e.alt??"Sprite Image",src:`data:image/svg+xml;utf8,${e.sprite({...e,sprite:void 0})}`}),{Provider:HS,useStore:Rn}=qg.createSyncStore((e,t)=>({_events:new EventTarget,_loadingList:qe.empty(),_page_data:{},_visibleArea:{height:1e4,width:1e3,x:0,y:0},_visiblePages:{height:0,width:0,x:0,y:0},addError:(n,...r)=>{const i=t();console.log("Gridler Error",i.uniqueid,n,r),e(Ur(o=>{o.errors=[...o.errors,n]}))},errors:[],get:()=>t(),getCellContent:n=>{const r=t(),[i,o]=n,a=r.getRowBuffer(o);return a!==void 0?r.toCell(a,i):{allowOverlay:!1,kind:ue.Loading}},getCellsForSelection:(n,r)=>async()=>{const i=t();await i.setStateFN("_visibleArea",a=>n);const o=[];for(let a=n.y;a<n.y+n.height;a++){const s=[];for(let l=n.x;l<n.x+n.width;l++)s.push(i.getCellContent([l,a]));o.push(s)}return o},getRowBuffer:n=>{const r=t();if(r.data&&r.data.length>0)return r.data[n]===void 0?{allowOverlay:!1,kind:ue.Loading}:r.data[n];const i=Math.max(0,Math.floor(n/r.pageSize)),o=r.pageSize*i,a=n-o;return r._page_data?.[i]?.[a]},getState:n=>t()[n],hasLocalData:!1,keyField:"id",loadPage:async(n,r)=>{const i=t(),o=n<0?0:n;if(!i._events.dispatchEvent(new CustomEvent("before_loadPage",{detail:{clearMode:r,page:n,state:i}})))return;const s=[],l=Object.keys(i.renderColumns??[1,2,3]).length,u=i.pageSize*o,c=i._page_data?.[o]?.length>0;if(r==="all"){i._active_requests?.forEach(d=>{d.controller?.abort?.()}),i.setState("_page_data",{}),i.setState("_active_requests",[]),i.loadPage(o);return}if(!i.useAPIQuery){console.warn("No useAPIQuery function defined, cannot load page",o);return}!c&&r!=="page"&&i.useAPIQuery?.(o).then(d=>{i.setStateFN("_page_data",h=>({...h,[o]:d}));for(let h=o;h<=u+i.pageSize;h++)for(let f=0;f<=l;f++)s.push({cell:[f,h]});i._glideref?.updateCells(s),i._events.dispatchEvent(new CustomEvent("loadPage",{detail:{clearMode:r,data:d,page:n,state:i}}))}).catch(d=>{console.warn("loadPage Error: ",o,d),i._events.dispatchEvent(new CustomEvent("loadPage_error",{detail:{clearMode:r,error:d,page:n,state:i}}))})},maxConcurrency:1,mounted:!1,onCellEdited:(n,r)=>{const i=t(),[,o]=n;i._events.dispatchEvent(new CustomEvent("onCellEdited",{detail:{cell:n,newVal:r,row:o,state:i}}))},onColumnMoved:(n,r)=>{const i=t(),o=i.renderColumns?.[n],a=i.renderColumns?.[r];o?.disableMove||a?.disableMove||i.setStateFN("colOrder",s=>{const l=s??i.renderColumns?.map((u,c)=>[u.id,c]).reduce((u,[c,d])=>({...u,[c]:d}),{});return!o?.id||!a?.id?l:{...l,[o?.id]:r,[a?.id]:n}})},onColumnProposeMove:(n,r)=>{const i=t(),o=i.renderColumns?.[n],a=i.renderColumns?.[r];return!(o?.disableMove||a?.disableMove)},onColumnResize:(n,r,i,o)=>{const a=t(),s=a.renderColumns?.find(l=>l.id===n.id);s?.disableResize||s?.maxWidth&&r<s?.maxWidth||s&&a.setStateFN("colSize",l=>l&&s&&l[s.id]===r?l:{...l,[s.id]:r})},onContextClick:(n,r,i,o)=>{const a=t(),s=a.renderColumns?.[i??-1],l=n==="menu"?[{label:"Side menu"}]:s?[{items:[{label:"Sort Ascending",leftSection:ye.jsx(bo,{sprite:Lu}),onClick:()=>{a.setStateFN("colSort",u=>{const c=[...u??[]],d=c.findIndex(f=>f.id===s.id),h="asc";if(d<0){const f={direction:h,id:s.id,order:c?.length};c.push(f)}else d>=0&&(c[d].direction=h);return c})}},{label:"Sort Descending",leftSection:ye.jsx(bo,{sprite:zu}),onClick:()=>{a.setStateFN("colSort",u=>{const c=[...u??[]],d=c.findIndex(f=>f.id===s.id),h="desc";if(d<0){const f={direction:h,id:s.id,order:c?.length};c.push(f)}else d>=0&&(c[d].direction=h);return c})}},{label:`Filter ${s?.title??s?.id}`},{renderer:ye.jsx(Fu,{column:s,storeState:t()})}],label:`Column Settings for ${s?.title??s?.id}`,leftSection:ye.jsx(gS,{size:16})}]:[];a.hideMenu?.(n),a.showMenu?.(n,{items:s?.getMenuItems?.(n,a,i&&o?a.getRowBuffer(o):void 0,s,l)??a.getMenuItems?.(n,a,i&&o?a.getRowBuffer(o):void 0,s,l)??l,x:r.clientX??r.bounds?.x,y:r.clientY??r.bounds?.y})},onHeaderClicked:(n,r)=>{const i=t();r.preventDefault();const o=i.renderColumns?.[n];o&&(o.disableSort||i.setStateFN("colSort",a=>{const s=[...a??[]],l=s.findIndex(u=>u.id===o.id);if(l<0){const u={direction:"asc",id:o.id,order:s?.length};s.push(u)}else l>=0&&s[l].direction==="asc"?s[l].direction="desc":l>=0&&s[l].direction==="desc"&&s.splice(l,1);return s}))},onHeaderMenuClick:(n,r)=>{const i=t(),o=i.renderColumns?.[n];if(!o)return;const a=[{label:`Sort ${o?.title??o?.id}`},{label:"Sort Ascending",leftSection:ye.jsx(bo,{sprite:Lu}),onClick:()=>{i.setStateFN("colSort",l=>{const u=[...l??[]],c=u.findIndex(h=>h.id===o.id),d="asc";if(c<0){const h={direction:d,id:o.id,order:u?.length};u.push(h)}else c>=0&&(u[c].direction=d);return u})}},{label:"Sort Descending",leftSection:ye.jsx(bo,{sprite:zu}),onClick:()=>{i.setStateFN("colSort",l=>{const u=[...l??[]],c=u.findIndex(h=>h.id===o.id),d="desc";if(c<0){const h={direction:d,id:o.id,order:u?.length};u.push(h)}else c>=0&&(u[c].direction=d);return u})}},{isDivider:!0}],s=[...o.disableSort?[]:a,{label:`Filter ${o?.title??o?.id}`},{renderer:ye.jsx(Fu,{column:o,storeState:t()})},{isDivider:!0},{label:"Refresh",onClickAsync:async()=>{await i.reload?.()}}];i.hideMenu?.("header-menu"),i.showMenu?.("header-menu",{items:o?.getMenuItems?.("header-menu",i,void 0,o,s)??i.getMenuItems?.("header-menu",i,void 0,o,s),x:r.x,y:r.y})},onItemHovered:n=>{const r=t();if(r.setState("_activeTooltip",void 0),n.kind==="cell"){const i=r.renderColumns?.[n.location[0]];if(i?.tooltip&&typeof i?.tooltip=="string")r.setState("_activeTooltip",i?.tooltip);else if(i?.tooltip&&typeof i?.tooltip=="function"){const o=r.getRowBuffer(n.location[1]);r.setState("_activeTooltip",i?.tooltip(o,n.location[1],n.location[0]))}}},onVisibleRegionChanged:(n,r,i,o)=>{const a=t();a._scrollTimeout&&clearTimeout(a._scrollTimeout);const s=()=>{const l=t(),u=Math.max(0,Math.floor(n.y/l.pageSize)),c=Math.max(0,Math.floor(l._visiblePages.y/l.pageSize)),d=u-c;if(l.progressiveScroll&&d>1){const h=t(),f=(c+2)*h.pageSize*(h.rowHeight??22);h._glideref?.scrollTo(0,{amount:f,unit:"px"},"vertical");return}l.setState("_visiblePages",n)};a.setState("_scrollTimeout",setTimeout(()=>{s()},100))},pageSize:50,setState:(n,r)=>{e(Ur(i=>{i[n]=r}))},setStateFN:(n,r)=>new Promise((o,a)=>{e(Ur(s=>{if(typeof r=="function")s[n]=r(s[n]);else throw a(new Error(`Not a function ${r}`)),Error(`Not a function ${r}`)})),o()}),toCell:(n,r)=>{const i=t(),a=i.renderColumns?.[r],s=a?.id??a?.title??String(r);if(s==null||n===void 0||n===null)return a?.Cell?a?.Cell(n,r,s,void 0,i):i.RenderCell?i.RenderCell(n,r,s,void 0,i):{allowOverlay:!1,kind:ue.Loading};try{const l=String(s).includes(".")?_S(s,n)??"":n?.[s];return a?.Cell?a?.Cell(n,r,s,l,i):i.RenderCell?i.RenderCell(n,r,s,l,i):{allowOverlay:!0,data:l,displayData:String(l),kind:ue.Text}}catch{return i.RenderCell?i.RenderCell(n,r,s,n?.[s??""],i):{allowOverlay:!1,kind:ue.Loading,skeletonWidthVariability:50}}},total_rows:1e3,uniqueid:Hg.getUUID()}),e=>{const[t,n]=e.useStore(i=>[i.setState,i.getState]),r=cc();return se.useEffect(()=>{const i=n("onMounted");if(typeof i=="function"&&i(n,t),t("mounted",!0),window&&window.document&&!window.document.getElementById("portal")){const a=window.document.createElement("div");a.id="portal",a.setAttribute("data-gridler-portal",e.uniqueid),window.document.body.appendChild(a)}return n("_events").dispatchEvent(new CustomEvent("mounted",{detail:{}})),()=>{const o=n("onUnMounted");t("mounted",!1),n("_events").dispatchEvent(new CustomEvent("unmounted",{detail:{}})),typeof o=="function"&&o()}},[t,n]),se.useEffect(()=>{const i=n("_glideref"),o=n("keyField")??"id",a=n("selectedRow")??e.selectedRow,s=n("askAPIRowNumber");let l=-1;if(a&&i){const u=n("_page_data"),c=n("pageSize");for(const d in u){for(const h in u[d]){const f=Number(d)*c+Number(h);if(String(u[d][h]?.[o])===String(a)){l=u[d][h]?._rownumber>0?u[d][h]?._rownumber:f>0?f:-1;break}}if(l>0)break}l>0?i.scrollTo(0,l):typeof s=="function"&&s(String(a)).then(d=>{d>=0&&(i.scrollTo(0,d),n("_events").dispatchEvent(new CustomEvent("selectedRowFound",{detail:{rowNumber:d,selectedRow:a}})))}).catch(d=>{console.warn("Error in askAPIRowNumber",d)})}},[e.selectedRow]),n("_events").addEventListener("reload",i=>{n("reload")?.()}),{...e,hideMenu:e.hideMenu??r.hide,showMenu:e.showMenu??r.show,total_rows:e.total_rows??n("total_rows")??0}}),qS=se.memo(e=>{const[t,n,r,i,o]=Rn(l=>[l.setStateFN,l.setState,l.getState,l.addError,l.mounted]),a=async l=>{const u=r("colSort"),c=r("pageSize"),d=r("colFilters"),h=r("_active_requests");n("loadingData",!0);try{if(e&&e.url){const f=new Headers;f.set("x-limit",String(c??50)),f.set("x-offset",String((c??50)*l)),f.set("Authorization",`Token ${e.authtoken}`),u?.length&&u.length>0&&f.set("x-sort",u?.map(_=>`${_.id} ${_.direction}`).reduce((_,y)=>`${_},${y}`)),d?.length&&d.length>0&&d?.filter(_=>_.value?.length>0)?.forEach(_=>{_.value&&_.value!==""&&f.set(`x-searchop-${_.operator}-${_.id}`,`${_.value}`)});const g=h?.findIndex(_=>_.page===l)??-1;if(h?.forEach(_=>{(_.page>=0&&_.page<l-2||l>=0&&_.page>l+2)&&_.controller?.abort?.()}),h&&g>=0&&h[g]){n("loadingData",!1);return}const m=new AbortController;await t("_active_requests",_=>[..._??[],{controller:m,page:l}]);const x=await fetch(`${e.url}?x-limit=${String(c??50)}&x-offset=${String((c??50)*l)}`,{headers:f,method:"GET",signal:m?.signal});if(x.ok){const _=x.headers.get("Content-Range")?.split("/");_?.[1]&&parseInt(_[1],10)>0&&n("total_rows",parseInt(_[1],10));const y=await x.json();return n("loadingData",!1),y??[]}i(`${x.status} ${x.statusText}`,"api",e.url),await t("_active_requests",_=>[...(_??[]).filter(y=>y.page!==l)])}}catch(f){i(`Error: ${f}`,"api",e.url)}return n("loadingData",!1),[]},s=async l=>{const u=r("colFilters");if(e&&e.url){const c=new Headers;c.set("x-limit","10"),c.set("x-fetch-rownumber",String(l)),c.set("Authorization",`Token ${e.authtoken}`),u?.length&&u.length>0&&u?.filter(f=>f.value?.length>0)?.forEach(f=>{f.value&&f.value!==""&&c.set(`x-searchop-${f.operator}-${f.id}`,`${f.value}`)});const d=new AbortController,h=await fetch(`${e.url}?x-fetch-rownumber=${l}}`,{headers:c,method:"GET",signal:d?.signal});if(h.ok){const f=await h.json();return f?.[0]?._rownumber??f?._rownumber??0}i(`${h.status} ${h.statusText}`,"api",e.url)}return[]};return se.useEffect(()=>{n("useAPIQuery",a),n("askAPIRowNumber",s)},[e.url,e.authtoken,o,n]),ye.jsx(ye.Fragment,{})});function dm(e){const[t,n,r,i]=Rn(a=>[a.getState,a.mounted,a.setState,a.reload]),o=se.useCallback((a,s,l,u,c)=>{if(a==="header-menu")return c||[];const d=[];c&&a==="cell"&&d.push(...c);const h=t("_gridSelection")?.rows.toArray()??[],f=h.length>1;if(!l){const x=h[0];x!==void 0&&(l=s.getRowBuffer(x))}const g=typeof e.descriptionField=="string"?l?.[e.descriptionField]:typeof e.descriptionField=="function"&&l?e.descriptionField(l):void 0;a==="other"&&d.push({c:"blue",label:"Add",onClick:()=>{e.onRequestForm("insert",l)}}),a==="cell"&&l||a==="menu"&&l?(d.push({c:"teal",label:"Add",leftSection:ye.jsx(bS,{color:"teal",size:16}),onClick:()=>{e.onRequestForm("insert",l)}}),f?(d.push({c:"green",label:`Modify All Selected (${h.length})`,leftSection:ye.jsx(Ig,{color:"green",size:16}),onClick:()=>{e.onRequestForm("change",h.map(x=>s.getRowBuffer(x)))}}),d.push({c:"red",label:`Remove All Selected (${h.length})`,leftSection:ye.jsx(Pg,{color:"maroon",size:16}),onClick:()=>{e.onRequestForm("delete",h.map(x=>s.getRowBuffer(x)))}})):(d.push({c:"green",label:`Modify${g&&e.showDescriptionInMenu?` (${g})`:""}`,leftSection:ye.jsx(Ig,{color:"green",size:16}),onClick:()=>{e.onRequestForm("change",l)}}),d.push({c:"red",label:`Remove${g&&e.showDescriptionInMenu?` (${g})`:""}`,leftSection:ye.jsx(Pg,{color:"maroon",size:16}),onClick:()=>{e.onRequestForm("delete",l)}})),d.push({isDivider:!0})):(a==="cell"&&!l||a==="menu"&&!l)&&d.push({c:"red",label:"Nothing Selected",leftSection:ye.jsx(fS,{color:"yellow",size:16})}),d.push({c:"orange",label:"Refresh",leftSection:ye.jsx(yS,{color:"orange",size:16}),onClick:()=>{i?.()}});const m=e.getMenuItems?e.getMenuItems(a,s,l,u,d):d;return!d||d.length===0?c||[]:m},[e.onRequestForm,t]);return se.useEffect(()=>(n&&typeof r=="function"&&t("getMenuItems")!==o&&r("getMenuItems",o),()=>{}),[e.getMenuItems,n]),ye.jsx(ye.Fragment,{})}const fm=se.memo(e=>{const[t,n,r]=Rn(o=>[o.setState,o.getState,o.mounted]),i=async o=>{const a=n("pageSize");return e.data&&Array.isArray(e.data)?(t("total_rows",e.data.length),e.data.slice(o*(a??50),(o+1)*(a??50))):[]};return se.useEffect(()=>{t("useAPIQuery",i)},[r,t]),ye.jsx(ye.Fragment,{})});function $S(){const{_activeTooltip:e,tooltipBarProps:t}=Rn(n=>({_activeTooltip:n._activeTooltip,tooltipBarProps:n.tooltipBarProps}));return ye.jsx("div",{"data-tooltip-bar":!0,style:{minHeight:"24px"},...t,children:e})}const Lg=se.memo(()=>{const e=se.useRef(0),t=se.useRef(null),{_glideref:n,_gridSelectionRows:r,askAPIRowNumber:i,colFilters:o,colOrder:a,colSize:s,colSort:l,columns:u,getState:c,loadPage:d,setState:h,setStateFN:f,values:g}=Rn(m=>({_glideref:m._glideref,_gridSelectionRows:m._gridSelectionRows,askAPIRowNumber:m.askAPIRowNumber,colFilters:m.colFilters,colOrder:m.colOrder,colSize:m.colSize,colSort:m.colSort,columns:m.columns,getState:m.getState,loadPage:m.loadPage,setState:m.setState,setStateFN:m.setStateFN,uniqueid:m.uniqueid,values:m.values}));return se.useEffect(()=>{g&&(async()=>{const x=c("_page_data"),_=c("pageSize"),y=c("keyField")??"id",C=[];for(const P in g){let S=-1;const T=String(typeof g?.[P]=="object"?g?.[P]?.[y]:typeof g?.[P]=="string"?g?.[P]:void 0);for(const O in x){for(const A in x[O]){const E=Number(O)*_+Number(A);if(String(x[O][A]?.[y])===T){S=E;break}}if(S>=0){C.push(S);break}}if(!(S>=0)&&typeof i=="function"){const O=await i(T);O&&C.push(O)}}return C})().then(x=>{let _=qe.empty();x.forEach(y=>{_=_.add(y)}),f("_gridSelectionRows",()=>_),f("_gridSelection",y=>({columns:y?.columns??qe.empty(),...y,rows:_}))})},[g]),se.useEffect(()=>{const m=c("onChange");if(m&&typeof m=="function"){const x=c("_page_data"),_=c("pageSize"),y=[];if(r)for(const P of r){let S;for(const T in x)for(const O in x[T]){const A=Number(T)*_+Number(O);if(!isNaN(A)){if(Number(x[T][O]?._rownumber)===P+1){S=x[T][O];break}else if(A===P+1){S=x[T][O];break}}}S!==void 0&&y.push(S)}const C=c("values");JSON.stringify(C)!==JSON.stringify(y)&&m(y)}},[JSON.stringify(r),c]),se.useEffect(()=>{h("renderColumns",u?.map(m=>({...m,hasMenu:m?.hasMenu??!0,icon:"sort"})))},[u]),se.useEffect(()=>{l&&(h("_gridSelection",{columns:qe.empty(),current:void 0,rows:qe.empty()}),h("_gridSelectionRows",qe.empty()),f("renderColumns",m=>m?.map(x=>({...x,icon:x.id&&l?.find(_=>_.id===x.id)?.direction?l?.find(_=>_.id===x.id)?.direction==="asc"?"sortup":"sortdown":x.defaultIcon??"sort"}))).then(()=>{d(0,"all")}))},[l]),se.useEffect(()=>{o&&JSON.stringify(t.current)!==JSON.stringify(o)&&(d(0,"all"),t.current=o)},[o]),se.useEffect(()=>{s&&f("renderColumns",m=>m?.map(x=>({...x,width:x.id&&s?.[x.id]?s?.[x.id]:x.width})))},[s]),se.useEffect(()=>{a&&f("renderColumns",m=>m?.sort((_,y)=>a[_.id]>a[y.id]?1:-1))},[a]),se.useEffect(()=>{n&&(e.current>0||(e.current=1,d(0)))},[n]),ye.jsx(ye.Fragment,{})});function NS(e,t,n=1){let r;if(t===void 0?(r=0,t=e):r=e,n===0)throw new Error("Step cannot be zero");const i=[];if(n>0)for(let o=r;o<t;o+=n)i.push(o);else for(let o=r;o>t;o+=n)i.push(o);return i}const WS=se.memo(()=>{const[e,t,n,r,i,o,a]=Rn(s=>[s.setState,s._glideref,s._visiblePages,s.pageSize,s.loadPage,s._loadingList,s.hasLocalData]);return se.useEffect(()=>{t&&e("mounted",!0)},[e]),se.useEffect(()=>{if(!t||a)return;const s=Math.max(0,Math.floor(n.y/r)),l=Math.floor((n.y+n.height)/r);for(const u of NS(s,l+1,1))i(u)},[i,r,n,t,o,a]),ye.jsx(ye.Fragment,{})});function BS(){const{loadingData:e,onContextClick:t}=Rn(n=>({loadingData:n.loadingData,onContextClick:n.onContextClick}));return ye.jsx(vt.ActionIcon,{loading:e,mr:"xs",mt:"2px",onClick:n=>t("menu",n),variant:"subtle",children:ye.jsx(mS,{})})}const jS=e=>`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="20" height="20" fill="none">
282
+ <path
283
+ fill="${e.fgColor??"currentColor"}"
284
+ d="M2.22 9.967L7.97 4.22l.085-.074l.058-.038l.072-.039l.105-.04l.105-.022l.052-.005L8.5 4l.057.002l.092.013l.107.03l.085.037l.054.03l.063.044l.072.064l5.75 5.747a.75.75 0 0 1-.976 1.133l-.084-.072L9.25 6.56v16.69a.75.75 0 0 1-1.493.102l-.007-.102V6.56l-4.47 4.468a.75.75 0 0 1-.976.072l-.084-.072a.75.75 0 0 1-.073-.977zM19.5 4a.75.75 0 0 1 .743.648l.007.102v16.687l4.47-4.467l.084-.073a.75.75 0 0 1 1.049 1.05l-.073.083l-5.728 5.727a.75.75 0 0 1-1.031.07l-.073-.07l-5.728-5.727l-.073-.084a.75.75 0 0 1-.007-.882l.08-.094l.084-.073a.75.75 0 0 1 .882-.007l.094.08l4.47 4.469V4.75l.007-.102A.75.75 0 0 1 19.5 4"
285
+ ></path>
286
+ </svg>`,US="_container_13fhd_1",YS={container:US},GS=e=>t=>t%2===0?void 0:{bgCell:e==="dark"?"#303030":"#e1effc"},XS=()=>{const e=vt.useMantineTheme(),{colorScheme:t}=vt.useMantineColorScheme(),{enableOddEvenRowColor:n,focused:r}=Rn(d=>({enableOddEvenRowColor:d.enableOddEvenRowColor,focused:d.focused})),i={auto:r?vt.lighten(e.colors.blue[4],.9):"#ffffff",dark:r?vt.darken("#bacfe0",.2):e.colors.dark[7],light:r?vt.lighten(e.colors.blue[4],.8):"#ffffff"}[t],o={accentColor:"none",accentLight:e.colors.blue[9],baseFontStyle:"13px",bgBubble:"#212121",bgBubbleSelected:"#000000",bgCell:i,bgCellMedium:"#202027",bgHeader:"#2A2A2A",bgHeaderHasFocus:"#181818",bgHeaderHovered:"#404040",bgIconHeader:"#b8b8b8",bgSearchResult:"#423c24",borderColor:"#eee1",drilldownBorder:"rgba(225,225,225,0.4)",fgIconHeader:"#000000",fontFamily:"Inter, Roboto, -apple-system, BlinkMacSystemFont, avenir next, avenir, segoe ui, helvetica neue, helvetica, Ubuntu, noto, arial, sans-serif",headerFontStyle:"500 13px",linkColor:e.colors.blue[4],textBubble:"#ffffff",textDark:"#dedede",textGroupHeader:"#dedede",textHeader:"#a1a1a1",textHeaderSelected:"#000000",textLight:"#a0a0a0",textMedium:"#b8b8b8"},s=t==="dark"?o:{bgCell:i,textGroupHeader:"#2c5491"},[l,u]=se.useState(s);return se.useEffect(()=>{u(s)},[t,r]),{getRowThemeOverride:d=>n?GS(t)(d):void 0,gridTheme:l}},KS=()=>{const e=se.useRef(null),t=se.useRef(!1),{_gridSelection:n,focused:r,getCellContent:i,getCellsForSelection:o,getState:a,glideProps:s,hasLocalData:l,headerHeight:u,heightProp:c,mounted:d,onCellEdited:h,onColumnMoved:f,onColumnProposeMove:g,onColumnResize:m,onContextClick:x,onHeaderClicked:_,onHeaderMenuClick:y,onItemHovered:C,onVisibleRegionChanged:P,renderColumns:S,rowHeight:T,sections:O,selectMode:A,setState:E,setStateFN:L,total_rows:R,widthProp:b}=Rn(w=>({_gridSelection:w._gridSelection,focused:w.focused,getCellContent:w.getCellContent,getCellsForSelection:w.getCellsForSelection,getState:w.getState,glideProps:w.glideProps,hasLocalData:w.hasLocalData,headerHeight:w.headerHeight,heightProp:w.height,mounted:w.mounted,onCellEdited:w.onCellEdited,onColumnMoved:w.onColumnMoved,onColumnProposeMove:w.onColumnProposeMove,onColumnResize:w.onColumnResize,onContextClick:w.onContextClick,onHeaderClicked:w.onHeaderClicked,onHeaderMenuClick:w.onHeaderMenuClick,onItemHovered:w.onItemHovered,onVisibleRegionChanged:w.onVisibleRegionChanged,renderColumns:w.renderColumns,rowHeight:w.rowHeight,sections:w.sections,selectMode:w.selectMode,setState:w.setState,setStateFN:w.setStateFN,total_rows:w.total_rows,widthProp:w.width})),k=Hu.useMergedRef(e,w=>{L("_glideref",()=>w??void 0)}),I=XS();return d?ye.jsxs(vt.Stack,{align:"stretch",gap:0,h:c??"100%",justify:"stretch",w:b??"100%",children:[O?.top,ye.jsxs("div",{className:YS.container,"data-focused":r,onContextMenu:w=>{w.preventDefault(),t.current||(t.current=!0,x("other",w),setTimeout(()=>{t.current=!1},100))},children:[O?.left,ye.jsx(lS,{cellActivationBehavior:"double-click",columns:S??[],columnSelect:"none",drawFocusRing:!0,getCellContent:i,getCellsForSelection:o,getRowThemeOverride:I.getRowThemeOverride,gridSelection:n,headerHeight:u??32,headerIcons:{sort:jS,sortdown:zu,sortup:Lu},onCellContextMenu:(w,N)=>{N.preventDefault(),t.current||(t.current=!0,x("cell",N,w[0],w[1]),setTimeout(()=>{t.current=!1},100))},onCellEdited:h,onColumnMoved:f,onColumnProposeMove:g,onColumnResize:m,onGridSelectionChange:w=>{let N=qe.empty();const B=a("_gridSelection");for(const G of w.rows)N=N.hasIndex(G)?N:N.add(G);if(A==="row"&&w.current?.range)for(let G=w.current.range.y;G<w.current.range.y+w.current.range.height;G++)N=N.hasIndex(G)?N:N.add(G);(JSON.stringify(B?.columns)!==JSON.stringify(w.columns)||JSON.stringify(B?.rows)!==JSON.stringify(N)||JSON.stringify(B?.current)!==JSON.stringify(w.current))&&(E("_gridSelection",{...w,rows:N}),JSON.stringify(B?.rows)!==JSON.stringify(N)&&E("_gridSelectionRows",N))},onHeaderClicked:_,onHeaderContextMenu:(w,N)=>{N.preventDefault(),t.current||(t.current=!0,x("header",N,w),setTimeout(()=>{t.current=!1},100))},onHeaderMenuClick:y,onItemHovered:C,onVisibleRegionChanged:P,rangeSelect:"multi-rect",ref:k,rightElement:ye.jsxs(vt.Group,{children:[O?.rightElementStart,ye.jsx(BS,{}),O?.rightElementEnd]}),rowHeight:T??22,rowMarkers:{checkboxStyle:"square",kind:"both"},rows:R??0,rowSelect:"multi",rowSelectionMode:"auto",spanRangeBehavior:"default",theme:I.gridTheme,width:"100%",...s}),ye.jsx(Lg,{}),!l&&ye.jsx(WS,{}),O?.right]}),ye.jsx($S,{}),O?.bottom]}):ye.jsxs(ye.Fragment,{children:["Loading...",ye.jsx(Lg,{})]})},dc=e=>ye.jsx(sm,{children:ye.jsxs(HS,{...e,persist:{name:`Gridler_${e.uniqueid}`,partialize:t=>({colOrder:t.colOrder,colSize:t.colSize}),version:1},children:[ye.jsx(KS,{}),e.children]})});dc.FormAdaptor=dm;dc.LocalDataAdaptor=fm;exports.ClickOutsideContainer=Zp;exports.ColumnFilterInput=um;exports.ColumnFilterInputOperator=cm;exports.ColumnFilterSet=Fu;exports.FilterOperators=lm;exports.GlidlerAPIAdaptorForGoLangv2=qS;exports.GlidlerFormAdaptor=dm;exports.GlidlerLocalDataAdaptor=fm;exports.Gridler=dc;exports.MantineBetterMenusProvider=sm;exports.ThemeContext=Rp;exports.isEditableGridCell=lr;exports.isInnerOnlyCell=cr;exports.isObjectEditorCallbackResult=Yg;exports.makeCSSStyle=xp;exports.styled_default=Ut;exports.useGridlerStore=Rn;exports.useMantineBetterMenus=cc;
287
+ //# sourceMappingURL=lib-_C3acvhh.cjs.map