@sheetxl/studio-mui 0.4.13 → 0.4.15
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.
- package/browser/cjs/BNHQPLsVdLmkPgyG.cjs +6 -0
- package/browser/cjs/BUU_z9x81l1Qnv1t.cjs +6 -0
- package/browser/cjs/BX8hkPMsPd9PSv0Z.cjs +161 -0
- package/browser/cjs/BknKSPzyXctJohHb.cjs +6 -0
- package/browser/cjs/Blfxp7Ec3Yjx3gNU.cjs +6 -0
- package/browser/cjs/BqFEcpPZjpwULlZk.cjs +6 -0
- package/browser/cjs/C-pPuqiWtgMU4NgZ.cjs +15 -0
- package/browser/cjs/C9eqE9OnPkiI-5Zd.cjs +7 -0
- package/browser/cjs/CB6DGRkCA3BLDEFr.cjs +6 -0
- package/browser/cjs/CO4rZgb0ObTZh6NO.cjs +6 -0
- package/browser/cjs/CU900NraHPDHMGJt.cjs +18 -0
- package/browser/cjs/Cpo-h2pMpScosT7r.cjs +6 -0
- package/browser/cjs/Cq2L49XjSKiIAsND.cjs +11 -0
- package/browser/cjs/D9X3UXVH6b_NJFeo.cjs +12 -0
- package/browser/cjs/DZJO-_8PnMFRZMpg.cjs +6 -0
- package/browser/cjs/DmCCEKhedSOg163M.cjs +6 -0
- package/browser/cjs/DpZ5HlIMG95q2uIe.cjs +96 -0
- package/browser/cjs/DwLcsRl4-LumKl6l.cjs +42 -0
- package/browser/cjs/Dy2vYVhrEqTHdzfD.cjs +11 -0
- package/browser/cjs/Gj8MlEhOCg_o7idM.cjs +6 -0
- package/browser/cjs/IllnWqWVClWDW1ot.cjs +6 -0
- package/browser/cjs/J3xq71qTV9LqCUzu.cjs +145 -0
- package/browser/cjs/X9sJMKafafBPpNpK.cjs +16 -0
- package/browser/cjs/index.cjs +4 -10
- package/browser/cjs/klnhoS0cqBpCC5fo.cjs +7 -0
- package/browser/esm/BQNKKCtIvfOMph3T.mjs +2250 -0
- package/browser/esm/BiQfhG8JMHeWuT63.mjs +1672 -0
- package/browser/esm/Btyp6us1Vzz3ZfHk.mjs +13391 -0
- package/browser/esm/Bvr3QlWdnOSnskWL.mjs +392 -0
- package/browser/esm/CYpvNksOw1PyhLpA.mjs +52 -0
- package/browser/esm/CcZUaOkODU7h0onP.mjs +25 -0
- package/browser/esm/CnXUhdLB8blNUvSr.mjs +84 -0
- package/browser/esm/CwjVlrJJqEGZX6q2.mjs +52 -0
- package/browser/esm/D0v3VaJtA3LjHpWR.mjs +20816 -0
- package/browser/esm/D4DvAg7aaaWl0TPV.mjs +1467 -0
- package/browser/esm/DAZNeiMI9sOM-xd8.mjs +1366 -0
- package/browser/esm/DGUm6rEOgO8WrVtT.mjs +23 -0
- package/browser/esm/DGoy2q9hDB7kive6.mjs +44 -0
- package/browser/esm/DSCE3cCea5d5Ip-N.mjs +1703 -0
- package/browser/esm/DrTLuc1VQWQfDAej.mjs +59 -0
- package/browser/esm/DuzycndVID_eag8V.mjs +1352 -0
- package/browser/esm/FZoe4QJ2ecSD1pjB.mjs +43 -0
- package/browser/esm/HI5oLhcn8kfiky1k.mjs +3803 -0
- package/browser/esm/T2YlNqs-LGJBm08C.mjs +46 -0
- package/browser/esm/UCJVaz3qX1u53mgI.mjs +640 -0
- package/browser/esm/UWejV3W_nMwWqnxY.mjs +48 -0
- package/browser/esm/VpP_qw0lmgCaHdHR.mjs +153 -0
- package/browser/esm/YS19x3zzRUKQqXu_.mjs +2410 -0
- package/browser/esm/index.mjs +84 -8
- package/browser/esm/jqoS02EUPE2WEY1t.mjs +424 -0
- package/licenses/dependencies.txt +6 -6
- package/node/esm/{BO6cKQ_efCO2YTyW.mjs → 3htalFC0z5xbRnmH.mjs} +1 -1
- package/node/esm/{DKho7vhsoPr3NuMl.mjs → B-pzKiKMkbB9Es-9.mjs} +1 -1
- package/node/esm/{BZ8BYhQCAcmtqV_l.mjs → BFxzGj5sPFwrklFi.mjs} +3 -3
- package/node/esm/{DvKUmpzXvELOJbAq.mjs → BGYSS0lvjSMTtreq.mjs} +1 -1
- package/node/esm/{BxJ8RdpZW49RjtqB.mjs → BGZpuIQG7RsGY_HH.mjs} +1 -1
- package/node/esm/{BEWR_Oinb-P8gswu.mjs → BTnlaEz7yZqa7QHP.mjs} +1 -1
- package/node/esm/{DW7i1Qv4kcmwOTvD.mjs → BfUEFSGuAZXw2fvO.mjs} +1 -1
- package/node/esm/{BqcpB9wQAjq0QKR1.mjs → BiJ5CZBAxg4-QDHh.mjs} +1 -1
- package/node/esm/{nmVSg6Qpwj9V1oA0.mjs → Bnkt1wiWaLEq8xla.mjs} +1 -1
- package/node/esm/{-mcJjjdCwl8lh-eg.mjs → BwbOSLs2gcxOaV0i.mjs} +1 -1
- package/node/esm/{RpUFmc_WL9-PMYhx.mjs → CAWLE2N0nA-FjUkH.mjs} +1 -1
- package/node/esm/{uAAAbPd_k3kmgO5f.mjs → CSnI8PJEgxEQEj1B.mjs} +1 -1
- package/node/esm/{VnhwCsWDUmo5-K5N.mjs → CvYpf-Km1Rvg15q4.mjs} +1 -1
- package/node/esm/{BqsJ9biuGwjU2xgY.mjs → CxhzSvAqksnasp3g.mjs} +1 -1
- package/node/esm/{CdLN7JEivNllaQ6w.mjs → DCrdGvQ_vOB2o-ca.mjs} +1 -1
- package/node/esm/{CfO2Xok0ch8kylzr.mjs → DhGXQOOW9FBpgCqI.mjs} +1 -1
- package/node/esm/{CsPaYpANdd8Rpel-.mjs → DkhnVkboeZsdMJxH.mjs} +1 -1
- package/node/esm/{4WfRn0Og_yApP_Q8.mjs → DnMRqYWKDGXlNm42.mjs} +1 -1
- package/node/esm/{CQ1mTChRFSKFU2O1.mjs → DsS5U5rJ5tNVEGXs.mjs} +1 -1
- package/node/esm/{CcOchU9ZOmdG4JFr.mjs → DuyHq4Fs-_RQkwF_.mjs} +1 -1
- package/node/esm/{o-JVx3HFrRjVjKmi.mjs → FzVegyt0upYkLobF.mjs} +2 -2
- package/node/esm/{BPG7zfcXK20urqr_.mjs → imk332niB0MxWuGl.mjs} +5 -5
- package/node/esm/index.mjs +11 -11
- package/package.json +8 -8
- package/browser/cjs/34mwIxXhbXYv5xsc.cjs +0 -7
- package/browser/cjs/3OIgTi54FC0IBzyK.cjs +0 -7
- package/browser/cjs/B-Aq2h8aSDrc_0iZ.cjs +0 -7
- package/browser/cjs/BDhT8qcsUqUILki7.cjs +0 -7
- package/browser/cjs/BKJsMQHem8u-jMiR.cjs +0 -7
- package/browser/cjs/BO7LEbRChpLg-xKv.cjs +0 -7
- package/browser/cjs/BZR-qDCIYdiDtD-U.cjs +0 -7
- package/browser/cjs/BfE1_C2EpBrmB7bt.cjs +0 -7
- package/browser/cjs/Brij8vl9GntSQBer.cjs +0 -7
- package/browser/cjs/C61z_849Y2mg6eYL.cjs +0 -7
- package/browser/cjs/CaKjImRkCm3-QSAI.cjs +0 -7
- package/browser/cjs/Cw7iXqLfwZMRGb3J.cjs +0 -7
- package/browser/cjs/CwwItA5xvSx0QgDn.cjs +0 -7
- package/browser/cjs/DPTcPoZ3PiOOW7lp.cjs +0 -7
- package/browser/cjs/DhmN913n5MBAZsij.cjs +0 -7
- package/browser/cjs/DhoDW4ohnPkwiE_o.cjs +0 -7
- package/browser/cjs/Dj_PjsvImW3tjX0i.cjs +0 -7
- package/browser/cjs/Dl4WPIJFTvpCXOs3.cjs +0 -7
- package/browser/cjs/QCtfu4qn-ovJa_wL.cjs +0 -7
- package/browser/cjs/VQ4Cuzvkmtel1iE_.cjs +0 -7
- package/browser/cjs/VTMW1yjPzEJGyBmh.cjs +0 -7
- package/browser/cjs/hY59MepmKCIoN0hM.cjs +0 -7
- package/browser/cjs/pKp_fof7vGupYAM2.cjs +0 -7
- package/browser/cjs/t-9gaLqrOnGiw-3T.cjs +0 -7
- package/browser/esm/5U4XS5qxb3oJ33qK.mjs +0 -7
- package/browser/esm/BPMMuKIe5xb3-D8V.mjs +0 -7
- package/browser/esm/BXartMrqQuAXu0Qz.mjs +0 -7
- package/browser/esm/Bc8N72T3wtTApPEG.mjs +0 -7
- package/browser/esm/BjoQXBQuDry5Fgc_.mjs +0 -7
- package/browser/esm/BlUq84tk9v01SQgx.mjs +0 -7
- package/browser/esm/C5iuJTeAtknnUEIE.mjs +0 -7
- package/browser/esm/CN67iG3xuQhXAPad.mjs +0 -7
- package/browser/esm/CQgUOqCEwTc61uuT.mjs +0 -7
- package/browser/esm/Cq1DtQcbtmTtKOc4.mjs +0 -7
- package/browser/esm/Cqz35dsi-gZArS0S.mjs +0 -7
- package/browser/esm/D9wzPAaUYfW5yKFN.mjs +0 -7
- package/browser/esm/DRRzJ8Ep6_Tyd6ne.mjs +0 -7
- package/browser/esm/DSGJzNzS8OeMxUW1.mjs +0 -7
- package/browser/esm/DSIpyed_o2mrjd0r.mjs +0 -7
- package/browser/esm/DWgrVUwlK4kwFJn-.mjs +0 -7
- package/browser/esm/Dr6QLJSwckbF9K_u.mjs +0 -7
- package/browser/esm/DuSF-rjIFFvyCoo8.mjs +0 -7
- package/browser/esm/EiBc8VBUeU8VXEhw.mjs +0 -7
- package/browser/esm/R3CPiIXdp_rdc-Bw.mjs +0 -7
- package/browser/esm/eXqnYk6V-QI6pGI5.mjs +0 -7
- package/browser/esm/hdx26DrfopUuM4j1.mjs +0 -7
- package/browser/esm/oXfsh9SiDjQuu2ZE.mjs +0 -7
- package/browser/esm/zBIGDTI8z3bRbFxO.mjs +0 -7
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";/**
|
|
2
|
+
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.4.15
|
|
3
|
+
*
|
|
4
|
+
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
5
|
+
* License: The license can be found at https://www.sheetxl.com/license.
|
|
6
|
+
*/Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const P=require("react/jsx-runtime"),w=require("react"),Nu=require("@mui/material"),$=require("./DpZ5HlIMG95q2uIe.cjs");var Iu=$.requirePropTypes();const de=$.getDefaultExportFromCjs(Iu);function xe(t){return xe=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},xe(t)}var Vu=/^\s+/,Xu=/\s+$/;function _(t,n){if(n=n||{},(t=t||"")instanceof _)return t;if(!(this instanceof _))return new _(t,n);var e=function(r){var o={r:0,g:0,b:0},u=1,a=null,s=null,i=null,c=!1,l=!1;typeof r=="string"&&(r=function(d){d=d.replace(Vu,"").replace(Xu,"").toLowerCase();var f,b=!1;if(Ze[d])d=Ze[d],b=!0;else if(d=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};return(f=B.rgb.exec(d))?{r:f[1],g:f[2],b:f[3]}:(f=B.rgba.exec(d))?{r:f[1],g:f[2],b:f[3],a:f[4]}:(f=B.hsl.exec(d))?{h:f[1],s:f[2],l:f[3]}:(f=B.hsla.exec(d))?{h:f[1],s:f[2],l:f[3],a:f[4]}:(f=B.hsv.exec(d))?{h:f[1],s:f[2],v:f[3]}:(f=B.hsva.exec(d))?{h:f[1],s:f[2],v:f[3],a:f[4]}:(f=B.hex8.exec(d))?{r:D(f[1]),g:D(f[2]),b:D(f[3]),a:Mt(f[4]),format:b?"name":"hex8"}:(f=B.hex6.exec(d))?{r:D(f[1]),g:D(f[2]),b:D(f[3]),format:b?"name":"hex"}:(f=B.hex4.exec(d))?{r:D(f[1]+""+f[1]),g:D(f[2]+""+f[2]),b:D(f[3]+""+f[3]),a:Mt(f[4]+""+f[4]),format:b?"name":"hex8"}:(f=B.hex3.exec(d))?{r:D(f[1]+""+f[1]),g:D(f[2]+""+f[2]),b:D(f[3]+""+f[3]),format:b?"name":"hex"}:!1}(r)),xe(r)=="object"&&(V(r.r)&&V(r.g)&&V(r.b)?(h=r.r,p=r.g,v=r.b,o={r:255*k(h,255),g:255*k(p,255),b:255*k(v,255)},c=!0,l=String(r.r).substr(-1)==="%"?"prgb":"rgb"):V(r.h)&&V(r.s)&&V(r.v)?(a=fe(r.s),s=fe(r.v),o=function(d,f,b){d=6*k(d,360),f=k(f,100),b=k(b,100);var g=Math.floor(d),y=d-g,x=b*(1-f),j=b*(1-y*f),C=b*(1-(1-y)*f),R=g%6,L=[b,j,x,x,C,b][R],T=[C,b,b,j,x,x][R],O=[x,x,C,b,b,j][R];return{r:255*L,g:255*T,b:255*O}}(r.h,a,s),c=!0,l="hsv"):V(r.h)&&V(r.s)&&V(r.l)&&(a=fe(r.s),i=fe(r.l),o=function(d,f,b){var g,y,x;function j(L,T,O){return O<0&&(O+=1),O>1&&(O-=1),O<1/6?L+6*(T-L)*O:O<.5?T:O<2/3?L+(T-L)*(2/3-O)*6:L}if(d=k(d,360),f=k(f,100),b=k(b,100),f===0)g=y=x=b;else{var C=b<.5?b*(1+f):b+f-b*f,R=2*b-C;g=j(R,C,d+1/3),y=j(R,C,d),x=j(R,C,d-1/3)}return{r:255*g,g:255*y,b:255*x}}(r.h,a,i),c=!0,l="hsl"),r.hasOwnProperty("a")&&(u=r.a));var h,p,v;return u=bu(u),{ok:c,format:r.format||l,r:Math.min(255,Math.max(o.r,0)),g:Math.min(255,Math.max(o.g,0)),b:Math.min(255,Math.max(o.b,0)),a:u}}(t);this._originalInput=t,this._r=e.r,this._g=e.g,this._b=e.b,this._a=e.a,this._roundA=Math.round(100*this._a)/100,this._format=n.format||e.format,this._gradientType=n.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=e.ok}function wt(t,n,e){t=k(t,255),n=k(n,255),e=k(e,255);var r,o,u=Math.max(t,n,e),a=Math.min(t,n,e),s=(u+a)/2;if(u==a)r=o=0;else{var i=u-a;switch(o=s>.5?i/(2-u-a):i/(u+a),u){case t:r=(n-e)/i+(n<e?6:0);break;case n:r=(e-t)/i+2;break;case e:r=(t-n)/i+4}r/=6}return{h:r,s:o,l:s}}function _t(t,n,e){t=k(t,255),n=k(n,255),e=k(e,255);var r,o,u=Math.max(t,n,e),a=Math.min(t,n,e),s=u,i=u-a;if(o=u===0?0:i/u,u==a)r=0;else{switch(u){case t:r=(n-e)/i+(n<e?6:0);break;case n:r=(e-t)/i+2;break;case e:r=(t-n)/i+4}r/=6}return{h:r,s:o,v:s}}function xt(t,n,e,r){var o=[z(Math.round(t).toString(16)),z(Math.round(n).toString(16)),z(Math.round(e).toString(16))];return r&&o[0].charAt(0)==o[0].charAt(1)&&o[1].charAt(0)==o[1].charAt(1)&&o[2].charAt(0)==o[2].charAt(1)?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0):o.join("")}function jt(t,n,e,r){return[z(vu(r)),z(Math.round(t).toString(16)),z(Math.round(n).toString(16)),z(Math.round(e).toString(16))].join("")}function qu(t,n){n=n===0?0:n||10;var e=_(t).toHsl();return e.s-=n/100,e.s=Me(e.s),_(e)}function Yu(t,n){n=n===0?0:n||10;var e=_(t).toHsl();return e.s+=n/100,e.s=Me(e.s),_(e)}function Gu(t){return _(t).desaturate(100)}function Ku(t,n){n=n===0?0:n||10;var e=_(t).toHsl();return e.l+=n/100,e.l=Me(e.l),_(e)}function Ju(t,n){n=n===0?0:n||10;var e=_(t).toRgb();return e.r=Math.max(0,Math.min(255,e.r-Math.round(-n/100*255))),e.g=Math.max(0,Math.min(255,e.g-Math.round(-n/100*255))),e.b=Math.max(0,Math.min(255,e.b-Math.round(-n/100*255))),_(e)}function Qu(t,n){n=n===0?0:n||10;var e=_(t).toHsl();return e.l-=n/100,e.l=Me(e.l),_(e)}function Zu(t,n){var e=_(t).toHsl(),r=(e.h+n)%360;return e.h=r<0?360+r:r,_(e)}function es(t){var n=_(t).toHsl();return n.h=(n.h+180)%360,_(n)}function Ot(t,n){if(isNaN(n)||n<=0)throw new Error("Argument to polyad must be a positive number");for(var e=_(t).toHsl(),r=[_(t)],o=360/n,u=1;u<n;u++)r.push(_({h:(e.h+u*o)%360,s:e.s,l:e.l}));return r}function ts(t){var n=_(t).toHsl(),e=n.h;return[_(t),_({h:(e+72)%360,s:n.s,l:n.l}),_({h:(e+216)%360,s:n.s,l:n.l})]}function rs(t,n,e){n=n||6,e=e||30;var r=_(t).toHsl(),o=360/e,u=[_(t)];for(r.h=(r.h-(o*n>>1)+720)%360;--n;)r.h=(r.h+o)%360,u.push(_(r));return u}function ns(t,n){n=n||6;for(var e=_(t).toHsv(),r=e.h,o=e.s,u=e.v,a=[],s=1/n;n--;)a.push(_({h:r,s:o,v:u})),u=(u+s)%1;return a}_.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var t=this.toRgb();return(299*t.r+587*t.g+114*t.b)/1e3},getLuminance:function(){var t,n,e,r=this.toRgb();return t=r.r/255,n=r.g/255,e=r.b/255,.2126*(t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4))+.7152*(n<=.03928?n/12.92:Math.pow((n+.055)/1.055,2.4))+.0722*(e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4))},setAlpha:function(t){return this._a=bu(t),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var t=_t(this._r,this._g,this._b);return{h:360*t.h,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=_t(this._r,this._g,this._b),n=Math.round(360*t.h),e=Math.round(100*t.s),r=Math.round(100*t.v);return this._a==1?"hsv("+n+", "+e+"%, "+r+"%)":"hsva("+n+", "+e+"%, "+r+"%, "+this._roundA+")"},toHsl:function(){var t=wt(this._r,this._g,this._b);return{h:360*t.h,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=wt(this._r,this._g,this._b),n=Math.round(360*t.h),e=Math.round(100*t.s),r=Math.round(100*t.l);return this._a==1?"hsl("+n+", "+e+"%, "+r+"%)":"hsla("+n+", "+e+"%, "+r+"%, "+this._roundA+")"},toHex:function(t){return xt(this._r,this._g,this._b,t)},toHexString:function(t){return"#"+this.toHex(t)},toHex8:function(t){return function(n,e,r,o,u){var a=[z(Math.round(n).toString(16)),z(Math.round(e).toString(16)),z(Math.round(r).toString(16)),z(vu(o))];return u&&a[0].charAt(0)==a[0].charAt(1)&&a[1].charAt(0)==a[1].charAt(1)&&a[2].charAt(0)==a[2].charAt(1)&&a[3].charAt(0)==a[3].charAt(1)?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0)+a[3].charAt(0):a.join("")}(this._r,this._g,this._b,this._a,t)},toHex8String:function(t){return"#"+this.toHex8(t)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(100*k(this._r,255))+"%",g:Math.round(100*k(this._g,255))+"%",b:Math.round(100*k(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(100*k(this._r,255))+"%, "+Math.round(100*k(this._g,255))+"%, "+Math.round(100*k(this._b,255))+"%)":"rgba("+Math.round(100*k(this._r,255))+"%, "+Math.round(100*k(this._g,255))+"%, "+Math.round(100*k(this._b,255))+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":!(this._a<1)&&(os[xt(this._r,this._g,this._b,!0)]||!1)},toFilter:function(t){var n="#"+jt(this._r,this._g,this._b,this._a),e=n,r=this._gradientType?"GradientType = 1, ":"";if(t){var o=_(t);e="#"+jt(o._r,o._g,o._b,o._a)}return"progid:DXImageTransform.Microsoft.gradient("+r+"startColorstr="+n+",endColorstr="+e+")"},toString:function(t){var n=!!t;t=t||this._format;var e=!1,r=this._a<1&&this._a>=0;return n||!r||t!=="hex"&&t!=="hex6"&&t!=="hex3"&&t!=="hex4"&&t!=="hex8"&&t!=="name"?(t==="rgb"&&(e=this.toRgbString()),t==="prgb"&&(e=this.toPercentageRgbString()),t!=="hex"&&t!=="hex6"||(e=this.toHexString()),t==="hex3"&&(e=this.toHexString(!0)),t==="hex4"&&(e=this.toHex8String(!0)),t==="hex8"&&(e=this.toHex8String()),t==="name"&&(e=this.toName()),t==="hsl"&&(e=this.toHslString()),t==="hsv"&&(e=this.toHsvString()),e||this.toHexString()):t==="name"&&this._a===0?this.toName():this.toRgbString()},clone:function(){return _(this.toString())},_applyModification:function(t,n){var e=t.apply(null,[this].concat([].slice.call(n)));return this._r=e._r,this._g=e._g,this._b=e._b,this.setAlpha(e._a),this},lighten:function(){return this._applyModification(Ku,arguments)},brighten:function(){return this._applyModification(Ju,arguments)},darken:function(){return this._applyModification(Qu,arguments)},desaturate:function(){return this._applyModification(qu,arguments)},saturate:function(){return this._applyModification(Yu,arguments)},greyscale:function(){return this._applyModification(Gu,arguments)},spin:function(){return this._applyModification(Zu,arguments)},_applyCombination:function(t,n){return t.apply(null,[this].concat([].slice.call(n)))},analogous:function(){return this._applyCombination(rs,arguments)},complement:function(){return this._applyCombination(es,arguments)},monochromatic:function(){return this._applyCombination(ns,arguments)},splitcomplement:function(){return this._applyCombination(ts,arguments)},triad:function(){return this._applyCombination(Ot,[3])},tetrad:function(){return this._applyCombination(Ot,[4])}},_.fromRatio=function(t,n){if(xe(t)=="object"){var e={};for(var r in t)t.hasOwnProperty(r)&&(e[r]=r==="a"?t[r]:fe(t[r]));t=e}return _(t,n)},_.equals=function(t,n){return!(!t||!n)&&_(t).toRgbString()==_(n).toRgbString()},_.random=function(){return _.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})},_.mix=function(t,n,e){e=e===0?0:e||50;var r=_(t).toRgb(),o=_(n).toRgb(),u=e/100;return _({r:(o.r-r.r)*u+r.r,g:(o.g-r.g)*u+r.g,b:(o.b-r.b)*u+r.b,a:(o.a-r.a)*u+r.a})},_.readability=function(t,n){var e=_(t),r=_(n);return(Math.max(e.getLuminance(),r.getLuminance())+.05)/(Math.min(e.getLuminance(),r.getLuminance())+.05)},_.isReadable=function(t,n,e){var r,o,u=_.readability(t,n);switch(o=!1,(r=function(a){var s,i;return s=((a=a||{level:"AA",size:"small"}).level||"AA").toUpperCase(),i=(a.size||"small").toLowerCase(),s!=="AA"&&s!=="AAA"&&(s="AA"),i!=="small"&&i!=="large"&&(i="small"),{level:s,size:i}}(e)).level+r.size){case"AAsmall":case"AAAlarge":o=u>=4.5;break;case"AAlarge":o=u>=3;break;case"AAAsmall":o=u>=7}return o},_.mostReadable=function(t,n,e){var r,o,u,a,s=null,i=0;o=(e=e||{}).includeFallbackColors,u=e.level,a=e.size;for(var c=0;c<n.length;c++)(r=_.readability(t,n[c]))>i&&(i=r,s=_(n[c]));return _.isReadable(t,s,{level:u,size:a})||!o?s:(e.includeFallbackColors=!1,_.mostReadable(t,["#fff","#000"],e))};var Ze=_.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},os=_.hexNames=function(t){var n={};for(var e in t)t.hasOwnProperty(e)&&(n[t[e]]=e);return n}(Ze);function bu(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function k(t,n){(function(r){return typeof r=="string"&&r.indexOf(".")!=-1&&parseFloat(r)===1})(t)&&(t="100%");var e=function(r){return typeof r=="string"&&r.indexOf("%")!=-1}(t);return t=Math.min(n,Math.max(0,parseFloat(t))),e&&(t=parseInt(t*n,10)/100),Math.abs(t-n)<1e-6?1:t%n/parseFloat(n)}function Me(t){return Math.min(1,Math.max(0,t))}function D(t){return parseInt(t,16)}function z(t){return t.length==1?"0"+t:""+t}function fe(t){return t<=1&&(t=100*t+"%"),t}function vu(t){return Math.round(255*parseFloat(t)).toString(16)}function Mt(t){return D(t)/255}var Y,be,ve,B=(be="[\\s|\\(]+("+(Y="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+Y+")[,|\\s]+("+Y+")\\s*\\)?",ve="[\\s|\\(]+("+Y+")[,|\\s]+("+Y+")[,|\\s]+("+Y+")[,|\\s]+("+Y+")\\s*\\)?",{CSS_UNIT:new RegExp(Y),rgb:new RegExp("rgb"+be),rgba:new RegExp("rgba"+ve),hsl:new RegExp("hsl"+be),hsla:new RegExp("hsla"+ve),hsv:new RegExp("hsv"+be),hsva:new RegExp("hsva"+ve),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});function V(t){return!!B.CSS_UNIT.exec(t)}var St,Et,Ct,At,kt,Rt,Pt,Tt,Lt,Ut,Ft,Dt,Bt,zt,Ht,Wt,$t,Nt,It,Vt,Xt,qt,Yt,Gt,Kt,Jt,Qt,Zt,F={},re={};function gu(){if(Et)return St;Et=1;var t=typeof $.commonjsGlobal=="object"&&$.commonjsGlobal&&$.commonjsGlobal.Object===Object&&$.commonjsGlobal;return St=t}function N(){if(At)return Ct;At=1;var t=gu(),n=typeof self=="object"&&self&&self.Object===Object&&self,e=t||n||Function("return this")();return Ct=e}function le(){if(Rt)return kt;Rt=1;var t=N().Symbol;return kt=t}function J(){if(Dt)return Ft;Dt=1;var t=le(),n=function(){if(Tt)return Pt;Tt=1;var o=le(),u=Object.prototype,a=u.hasOwnProperty,s=u.toString,i=o?o.toStringTag:void 0;return Pt=function(c){var l=a.call(c,i),h=c[i];try{c[i]=void 0;var p=!0}catch{}var v=s.call(c);return p&&(l?c[i]=h:delete c[i]),v}}(),e=function(){if(Ut)return Lt;Ut=1;var o=Object.prototype.toString;return Lt=function(u){return o.call(u)}}(),r=t?t.toStringTag:void 0;return Ft=function(o){return o==null?o===void 0?"[object Undefined]":"[object Null]":r&&r in Object(o)?n(o):e(o)}}function H(){if(zt)return Bt;zt=1;var t=Array.isArray;return Bt=t}function X(){return Wt?Ht:(Wt=1,Ht=function(t){return t!=null&&typeof t=="object"})}function is(){if(qt)return Xt;qt=1;var t=(Vt||(Vt=1,It=function(e){return function(r,o,u){for(var a=-1,s=Object(r),i=u(r),c=i.length;c--;){var l=i[e?c:++a];if(o(s[l],l,s)===!1)break}return r}}),It),n=t();return Xt=n}function yu(){if(Zt)return Qt;Zt=1;var t=function(){if(Jt)return Kt;Jt=1;var a=J(),s=X();return Kt=function(i){return s(i)&&a(i)=="[object Arguments]"}}(),n=X(),e=Object.prototype,r=e.hasOwnProperty,o=e.propertyIsEnumerable,u=t(function(){return arguments}())?t:function(a){return n(a)&&r.call(a,"callee")&&!o.call(a,"callee")};return Qt=u}var er,tr,rr,nr,or,ir,ar,ur,sr,cr,fr,Ae={exports:{}};function tt(){return rr||(rr=1,function(t,n){var e=N(),r=tr?er:(tr=1,er=function(){return!1}),o=n&&!n.nodeType&&n,u=o&&t&&!t.nodeType&&t,a=u&&u.exports===o?e.Buffer:void 0,s=(a?a.isBuffer:void 0)||r;t.exports=s}(Ae,Ae.exports)),Ae.exports}function mu(){if(or)return nr;or=1;var t=/^(?:0|[1-9]\d*)$/;return nr=function(n,e){var r=typeof n;return!!(e=e??9007199254740991)&&(r=="number"||r!="symbol"&&t.test(n))&&n>-1&&n%1==0&&n<e}}function rt(){return ar?ir:(ar=1,ir=function(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=9007199254740991})}function nt(){return fr?cr:(fr=1,cr=function(t){return function(n){return t(n)}})}var lr,hr,pr,dr,br,vr,gr,yr,mr,wr,_r,xr,jr,Or,Mr,Sr,Er,Cr,Ar,kr,Rr,Pr,Tr,Lr,Ur,Fr,Dr,Br,zr,Hr,Wr,$r,Nr,ke,Ir,Vr,Xr,qr,Yr,Gr,Kr,Re,Jr,Pe,Qr,Zr,en,Te,tn,rn,nn,on,an,un,sn,cn,fn,ln,hn,pn,dn,bn,vn,gn,yn,mn,wn,_n,xn,jn,On,Mn,Sn,En,Cn,An,kn,Rn,Pn,Tn,Ln,Un,Fn,Dn,Bn,zn,Hn,Wn,$n,Nn,In,Vn,Xn,qn,Yn,Gn,Kn,Jn,Qn,Zn,eo,to,ro,no,oo,io,ao,uo,so,co,fo,lo,ho,po,bo,vo,go,Le,yo,mo,wo,_o,xo,jo,Oo,Mo,So,Ue,Eo,Co,Ao,ko,Ro,Po,To,Lo,Uo,Fo,Do,Fe,Bo,zo,Ho,Wo,$o,No,Io,Vo,Xo,qo,Yo,Go,Ko,De,Jo,Be,Qo,Zo,ei,ti,ri,ni,oi,ii,ai,ui,si,ci,fi,li,hi,pi,di,bi,vi,ze,gi,yi,mi,wi,_i,xi,ji,He,Oi,Mi,Si,Ei,Ci,We,Ai,ki,Ri,Pi,Ti,Li,Ui,Fi,Di,Bi,zi,Hi,Wi,$e,$i,Ni,Ii,Ne,Vi,Xi,qi,Yi,Ie={exports:{}};function ot(){return lr||(lr=1,function(t,n){var e=gu(),r=n&&!n.nodeType&&n,o=r&&t&&!t.nodeType&&t,u=o&&o.exports===r&&e.process,a=function(){try{var s=o&&o.require&&o.require("util").types;return s||u&&u.binding&&u.binding("util")}catch{}}();t.exports=a}(Ie,Ie.exports)),Ie.exports}function wu(){if(pr)return hr;pr=1;var t=function(){if(sr)return ur;sr=1;var u=J(),a=rt(),s=X(),i={};return i["[object Float32Array]"]=i["[object Float64Array]"]=i["[object Int8Array]"]=i["[object Int16Array]"]=i["[object Int32Array]"]=i["[object Uint8Array]"]=i["[object Uint8ClampedArray]"]=i["[object Uint16Array]"]=i["[object Uint32Array]"]=!0,i["[object Arguments]"]=i["[object Array]"]=i["[object ArrayBuffer]"]=i["[object Boolean]"]=i["[object DataView]"]=i["[object Date]"]=i["[object Error]"]=i["[object Function]"]=i["[object Map]"]=i["[object Number]"]=i["[object Object]"]=i["[object RegExp]"]=i["[object Set]"]=i["[object String]"]=i["[object WeakMap]"]=!1,ur=function(c){return s(c)&&a(c.length)&&!!i[u(c)]}}(),n=nt(),e=ot(),r=e&&e.isTypedArray,o=r?n(r):t;return hr=o}function _u(){if(br)return dr;br=1;var t=(Gt||(Gt=1,Yt=function(s,i){for(var c=-1,l=Array(s);++c<s;)l[c]=i(c);return l}),Yt),n=yu(),e=H(),r=tt(),o=mu(),u=wu(),a=Object.prototype.hasOwnProperty;return dr=function(s,i){var c=e(s),l=!c&&n(s),h=!c&&!l&&r(s),p=!c&&!l&&!h&&u(s),v=c||l||h||p,d=v?t(s.length,String):[],f=d.length;for(var b in s)!i&&!a.call(s,b)||v&&(b=="length"||h&&(b=="offset"||b=="parent")||p&&(b=="buffer"||b=="byteLength"||b=="byteOffset")||o(b,f))||d.push(b);return d}}function it(){if(gr)return vr;gr=1;var t=Object.prototype;return vr=function(n){var e=n&&n.constructor;return n===(typeof e=="function"&&e.prototype||t)}}function xu(){return mr?yr:(mr=1,yr=function(t,n){return function(e){return t(n(e))}})}function as(){if(jr)return xr;jr=1;var t=it(),n=function(){if(_r)return wr;_r=1;var r=xu()(Object.keys,Object);return wr=r}(),e=Object.prototype.hasOwnProperty;return xr=function(r){if(!t(r))return n(r);var o=[];for(var u in Object(r))e.call(r,u)&&u!="constructor"&&o.push(u);return o}}function ue(){return Mr?Or:(Mr=1,Or=function(t){var n=typeof t;return t!=null&&(n=="object"||n=="function")})}function ju(){if(Er)return Sr;Er=1;var t=J(),n=ue();return Sr=function(e){if(!n(e))return!1;var r=t(e);return r=="[object Function]"||r=="[object GeneratorFunction]"||r=="[object AsyncFunction]"||r=="[object Proxy]"}}function Se(){if(Ar)return Cr;Ar=1;var t=ju(),n=rt();return Cr=function(e){return e!=null&&n(e.length)&&!t(e)}}function he(){if(Rr)return kr;Rr=1;var t=_u(),n=as(),e=Se();return kr=function(r){return e(r)?t(r):n(r)}}function Ou(){if(Tr)return Pr;Tr=1;var t=is(),n=he();return Pr=function(e,r){return e&&t(e,r,n)}}function Mu(){return Ur?Lr:(Ur=1,Lr=function(t){return t})}function at(){if(zr)return Br;zr=1;var t=Ou(),n=function(){if(Dr)return Fr;Dr=1;var e=Mu();return Fr=function(r){return typeof r=="function"?r:e}}();return Br=function(e,r){return e&&t(e,n(r))}}function ut(){if(Wr)return Hr;Wr=1;var t=xu()(Object.getPrototypeOf,Object);return Hr=t}function Su(){return Ir||(Ir=1,ke=function(t,n){for(var e=-1,r=t==null?0:t.length,o=Array(r);++e<r;)o[e]=n(t[e],e,t);return o}),ke}function st(){return Yr?qr:(Yr=1,qr=function(t,n){return t===n||t!=t&&n!=n})}function ge(){if(Kr)return Gr;Kr=1;var t=st();return Gr=function(n,e){for(var r=n.length;r--;)if(t(n[r][0],e))return r;return-1}}function _e(){if(nn)return rn;nn=1;var t=Xr?Vr:(Xr=1,Vr=function(){this.__data__=[],this.size=0}),n=function(){if(Jr)return Re;Jr=1;var a=ge(),s=Array.prototype.splice;return Re=function(i){var c=this.__data__,l=a(c,i);return!(l<0||(l==c.length-1?c.pop():s.call(c,l,1),--this.size,0))},Re}(),e=function(){if(Qr)return Pe;Qr=1;var a=ge();return Pe=function(s){var i=this.__data__,c=a(i,s);return c<0?void 0:i[c][1]},Pe}(),r=function(){if(en)return Zr;en=1;var a=ge();return Zr=function(s){return a(this.__data__,s)>-1}}(),o=function(){if(tn)return Te;tn=1;var a=ge();return Te=function(s,i){var c=this.__data__,l=a(c,s);return l<0?(++this.size,c.push([s,i])):c[l][1]=i,this},Te}();function u(a){var s=-1,i=a==null?0:a.length;for(this.clear();++s<i;){var c=a[s];this.set(c[0],c[1])}}return u.prototype.clear=t,u.prototype.delete=n,u.prototype.get=e,u.prototype.has=r,u.prototype.set=o,rn=u}function us(){if(vn)return bn;vn=1;var t,n=function(){if(dn)return pn;dn=1;var r=N()["__core-js_shared__"];return pn=r}(),e=(t=/[^.]+$/.exec(n&&n.keys&&n.keys.IE_PROTO||""))?"Symbol(src)_1."+t:"";return bn=function(r){return!!e&&e in r}}function Eu(){if(yn)return gn;yn=1;var t=Function.prototype.toString;return gn=function(n){if(n!=null){try{return t.call(n)}catch{}try{return n+""}catch{}}return""}}function K(){if(On)return jn;On=1;var t=function(){if(wn)return mn;wn=1;var e=ju(),r=us(),o=ue(),u=Eu(),a=/^\[object .+?Constructor\]$/,s=Function.prototype,i=Object.prototype,c=s.toString,l=i.hasOwnProperty,h=RegExp("^"+c.call(l).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");return mn=function(p){return!(!o(p)||r(p))&&(e(p)?h:a).test(u(p))}}(),n=xn?_n:(xn=1,_n=function(e,r){return e?.[r]});return jn=function(e,r){var o=n(e,r);return t(o)?o:void 0}}function ct(){if(Sn)return Mn;Sn=1;var t=K()(N(),"Map");return Mn=t}function ye(){if(Cn)return En;Cn=1;var t=K()(Object,"create");return En=t}function ss(){if(Hn)return zn;Hn=1;var t=function(){if(kn)return An;kn=1;var a=ye();return An=function(){this.__data__=a?a(null):{},this.size=0}}(),n=Pn?Rn:(Pn=1,Rn=function(a){var s=this.has(a)&&delete this.__data__[a];return this.size-=s?1:0,s}),e=function(){if(Ln)return Tn;Ln=1;var a=ye(),s=Object.prototype.hasOwnProperty;return Tn=function(i){var c=this.__data__;if(a){var l=c[i];return l==="__lodash_hash_undefined__"?void 0:l}return s.call(c,i)?c[i]:void 0}}(),r=function(){if(Fn)return Un;Fn=1;var a=ye(),s=Object.prototype.hasOwnProperty;return Un=function(i){var c=this.__data__;return a?c[i]!==void 0:s.call(c,i)}}(),o=function(){if(Bn)return Dn;Bn=1;var a=ye();return Dn=function(s,i){var c=this.__data__;return this.size+=this.has(s)?0:1,c[s]=a&&i===void 0?"__lodash_hash_undefined__":i,this}}();function u(a){var s=-1,i=a==null?0:a.length;for(this.clear();++s<i;){var c=a[s];this.set(c[0],c[1])}}return u.prototype.clear=t,u.prototype.delete=n,u.prototype.get=e,u.prototype.has=r,u.prototype.set=o,zn=u}function me(){if(Xn)return Vn;Xn=1;var t=In?Nn:(In=1,Nn=function(n){var e=typeof n;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?n!=="__proto__":n===null});return Vn=function(n,e){var r=n.__data__;return t(e)?r[typeof e=="string"?"string":"hash"]:r.map}}function ft(){if(ro)return to;ro=1;var t=function(){if($n)return Wn;$n=1;var a=ss(),s=_e(),i=ct();return Wn=function(){this.size=0,this.__data__={hash:new a,map:new(i||s),string:new a}}}(),n=function(){if(Yn)return qn;Yn=1;var a=me();return qn=function(s){var i=a(this,s).delete(s);return this.size-=i?1:0,i}}(),e=function(){if(Kn)return Gn;Kn=1;var a=me();return Gn=function(s){return a(this,s).get(s)}}(),r=function(){if(Qn)return Jn;Qn=1;var a=me();return Jn=function(s){return a(this,s).has(s)}}(),o=function(){if(eo)return Zn;eo=1;var a=me();return Zn=function(s,i){var c=a(this,s),l=c.size;return c.set(s,i),this.size+=c.size==l?0:1,this}}();function u(a){var s=-1,i=a==null?0:a.length;for(this.clear();++s<i;){var c=a[s];this.set(c[0],c[1])}}return u.prototype.clear=t,u.prototype.delete=n,u.prototype.get=e,u.prototype.has=r,u.prototype.set=o,to=u}function lt(){if(ao)return io;ao=1;var t=_e(),n=function(){if(an)return on;an=1;var s=_e();return on=function(){this.__data__=new s,this.size=0}}(),e=sn?un:(sn=1,un=function(s){var i=this.__data__,c=i.delete(s);return this.size=i.size,c}),r=fn?cn:(fn=1,cn=function(s){return this.__data__.get(s)}),o=hn?ln:(hn=1,ln=function(s){return this.__data__.has(s)}),u=function(){if(oo)return no;oo=1;var s=_e(),i=ct(),c=ft();return no=function(l,h){var p=this.__data__;if(p instanceof s){var v=p.__data__;if(!i||v.length<199)return v.push([l,h]),this.size=++p.size,this;p=this.__data__=new c(v)}return p.set(l,h),this.size=p.size,this}}();function a(s){var i=this.__data__=new t(s);this.size=i.size}return a.prototype.clear=n,a.prototype.delete=e,a.prototype.get=r,a.prototype.has=o,a.prototype.set=u,io=a}function cs(){if(ho)return lo;ho=1;var t=ft(),n=so?uo:(so=1,uo=function(o){return this.__data__.set(o,"__lodash_hash_undefined__"),this}),e=fo?co:(fo=1,co=function(o){return this.__data__.has(o)});function r(o){var u=-1,a=o==null?0:o.length;for(this.__data__=new t;++u<a;)this.add(o[u])}return r.prototype.add=r.prototype.push=n,r.prototype.has=e,lo=r}function Cu(){if(yo)return Le;yo=1;var t=cs(),n=(bo||(bo=1,po=function(r,o){for(var u=-1,a=r==null?0:r.length;++u<a;)if(o(r[u],u,r))return!0;return!1}),po),e=go?vo:(go=1,vo=function(r,o){return r.has(o)});return Le=function(r,o,u,a,s,i){var c=1&u,l=r.length,h=o.length;if(l!=h&&!(c&&h>l))return!1;var p=i.get(r),v=i.get(o);if(p&&v)return p==o&&v==r;var d=-1,f=!0,b=2&u?new t:void 0;for(i.set(r,o),i.set(o,r);++d<l;){var g=r[d],y=o[d];if(a)var x=c?a(y,g,d,o,r,i):a(g,y,d,r,o,i);if(x!==void 0){if(x)continue;f=!1;break}if(b){if(!n(o,function(j,C){if(!e(b,C)&&(g===j||s(g,j,u,a,i)))return b.push(C)})){f=!1;break}}else if(g!==y&&!s(g,y,u,a,i)){f=!1;break}}return i.delete(r),i.delete(o),f},Le}function Au(){if(wo)return mo;wo=1;var t=N().Uint8Array;return mo=t}function fs(){if(So)return Mo;So=1;var t=le(),n=Au(),e=st(),r=Cu(),o=(xo||(xo=1,_o=function(i){var c=-1,l=Array(i.size);return i.forEach(function(h,p){l[++c]=[p,h]}),l}),_o),u=(Oo||(Oo=1,jo=function(i){var c=-1,l=Array(i.size);return i.forEach(function(h){l[++c]=h}),l}),jo),a=t?t.prototype:void 0,s=a?a.valueOf:void 0;return Mo=function(i,c,l,h,p,v,d){switch(l){case"[object DataView]":if(i.byteLength!=c.byteLength||i.byteOffset!=c.byteOffset)return!1;i=i.buffer,c=c.buffer;case"[object ArrayBuffer]":return!(i.byteLength!=c.byteLength||!v(new n(i),new n(c)));case"[object Boolean]":case"[object Date]":case"[object Number]":return e(+i,+c);case"[object Error]":return i.name==c.name&&i.message==c.message;case"[object RegExp]":case"[object String]":return i==c+"";case"[object Map]":var f=o;case"[object Set]":var b=1&h;if(f||(f=u),i.size!=c.size&&!b)return!1;var g=d.get(i);if(g)return g==c;h|=2,d.set(i,c);var y=r(f(i),f(c),h,p,v,d);return d.delete(i),y;case"[object Symbol]":if(s)return s.call(i)==s.call(c)}return!1}}function ku(){return Eo||(Eo=1,Ue=function(t,n){for(var e=-1,r=n.length,o=t.length;++e<r;)t[o+e]=n[e];return t}),Ue}function Ru(){if(Ao)return Co;Ao=1;var t=ku(),n=H();return Co=function(e,r,o){var u=r(e);return n(e)?u:t(u,o(e))}}function Pu(){return To?Po:(To=1,Po=function(){return[]})}function ht(){if(Uo)return Lo;Uo=1;var t=(Ro||(Ro=1,ko=function(o,u){for(var a=-1,s=o==null?0:o.length,i=0,c=[];++a<s;){var l=o[a];u(l,a,o)&&(c[i++]=l)}return c}),ko),n=Pu(),e=Object.prototype.propertyIsEnumerable,r=Object.getOwnPropertySymbols;return Lo=r?function(o){return o==null?[]:(o=Object(o),t(r(o),function(u){return e.call(o,u)}))}:n}function Tu(){if(Do)return Fo;Do=1;var t=Ru(),n=ht(),e=he();return Fo=function(r){return t(r,e,n)}}function Ee(){if(Yo)return qo;Yo=1;var t=function(){if(Ho)return zo;Ho=1;var y=K()(N(),"DataView");return zo=y}(),n=ct(),e=function(){if($o)return Wo;$o=1;var y=K()(N(),"Promise");return Wo=y}(),r=function(){if(Io)return No;Io=1;var y=K()(N(),"Set");return No=y}(),o=function(){if(Xo)return Vo;Xo=1;var y=K()(N(),"WeakMap");return Vo=y}(),u=J(),a=Eu(),s="[object Map]",i="[object Promise]",c="[object Set]",l="[object WeakMap]",h="[object DataView]",p=a(t),v=a(n),d=a(e),f=a(r),b=a(o),g=u;return(t&&g(new t(new ArrayBuffer(1)))!=h||n&&g(new n)!=s||e&&g(e.resolve())!=i||r&&g(new r)!=c||o&&g(new o)!=l)&&(g=function(y){var x=u(y),j=x=="[object Object]"?y.constructor:void 0,C=j?a(j):"";if(C)switch(C){case p:return h;case v:return s;case d:return i;case f:return c;case b:return l}return x}),qo=g}function ls(){if(Ko)return Go;Ko=1;var t=lt(),n=Cu(),e=fs(),r=function(){if(Bo)return Fe;Bo=1;var p=Tu(),v=Object.prototype.hasOwnProperty;return Fe=function(d,f,b,g,y,x){var j=1&b,C=p(d),R=C.length;if(R!=p(f).length&&!j)return!1;for(var L=R;L--;){var T=C[L];if(!(j?T in f:v.call(f,T)))return!1}var O=x.get(d),S=x.get(f);if(O&&S)return O==f&&S==d;var m=!0;x.set(d,f),x.set(f,d);for(var M=j;++L<R;){var E=d[T=C[L]],I=f[T];if(g)var W=j?g(I,E,T,f,d,x):g(E,I,T,d,f,x);if(!(W===void 0?E===I||y(E,I,b,g,x):W)){m=!1;break}M||(M=T=="constructor")}if(m&&!M){var U=d.constructor,A=f.constructor;U==A||!("constructor"in d)||!("constructor"in f)||typeof U=="function"&&U instanceof U&&typeof A=="function"&&A instanceof A||(m=!1)}return x.delete(d),x.delete(f),m},Fe}(),o=Ee(),u=H(),a=tt(),s=wu(),i="[object Arguments]",c="[object Array]",l="[object Object]",h=Object.prototype.hasOwnProperty;return Go=function(p,v,d,f,b,g){var y=u(p),x=u(v),j=y?c:o(p),C=x?c:o(v),R=(j=j==i?l:j)==l,L=(C=C==i?l:C)==l,T=j==C;if(T&&a(p)){if(!a(v))return!1;y=!0,R=!1}if(T&&!R)return g||(g=new t),y||s(p)?n(p,v,d,f,b,g):e(p,v,j,d,f,b,g);if(!(1&d)){var O=R&&h.call(p,"__wrapped__"),S=L&&h.call(v,"__wrapped__");if(O||S){var m=O?p.value():p,M=S?v.value():v;return g||(g=new t),b(m,M,d,f,g)}}return!!T&&(g||(g=new t),r(p,v,d,f,b,g))}}function Lu(){if(Jo)return De;Jo=1;var t=ls(),n=X();return De=function e(r,o,u,a,s){return r===o||(r==null||o==null||!n(r)&&!n(o)?r!=r&&o!=o:t(r,o,u,a,e,s))},De}function Uu(){if(ei)return Zo;ei=1;var t=ue();return Zo=function(n){return n==n&&!t(n)}}function Fu(){return oi?ni:(oi=1,ni=function(t,n){return function(e){return e!=null&&e[t]===n&&(n!==void 0||t in Object(e))}})}function hs(){if(ai)return ii;ai=1;var t=function(){if(Qo)return Be;Qo=1;var r=lt(),o=Lu();return Be=function(u,a,s,i){var c=s.length,l=c,h=!i;if(u==null)return!l;for(u=Object(u);c--;){var p=s[c];if(h&&p[2]?p[1]!==u[p[0]]:!(p[0]in u))return!1}for(;++c<l;){var v=(p=s[c])[0],d=u[v],f=p[1];if(h&&p[2]){if(d===void 0&&!(v in u))return!1}else{var b=new r;if(i)var g=i(d,f,v,u,a,b);if(!(g===void 0?o(f,d,3,i,b):g))return!1}}return!0},Be}(),n=function(){if(ri)return ti;ri=1;var r=Uu(),o=he();return ti=function(u){for(var a=o(u),s=a.length;s--;){var i=a[s],c=u[i];a[s]=[i,c,r(c)]}return a}}(),e=Fu();return ii=function(r){var o=n(r);return o.length==1&&o[0][2]?e(o[0][0],o[0][1]):function(u){return u===r||t(u,r,o)}}}function pt(){if(si)return ui;si=1;var t=J(),n=X();return ui=function(e){return typeof e=="symbol"||n(e)&&t(e)=="[object Symbol]"}}function dt(){if(fi)return ci;fi=1;var t=H(),n=pt(),e=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,r=/^\w*$/;return ci=function(o,u){if(t(o))return!1;var a=typeof o;return!(a!="number"&&a!="symbol"&&a!="boolean"&&o!=null&&!n(o))||r.test(o)||!e.test(o)||u!=null&&o in Object(u)}}function ps(){if(di)return pi;di=1;var t=function(){if(hi)return li;hi=1;var n=ft();function e(r,o){if(typeof r!="function"||o!=null&&typeof o!="function")throw new TypeError("Expected a function");var u=function(){var a=arguments,s=o?o.apply(this,a):a[0],i=u.cache;if(i.has(s))return i.get(s);var c=r.apply(this,a);return u.cache=i.set(s,c)||i,c};return u.cache=new(e.Cache||n),u}return e.Cache=n,li=e}();return pi=function(n){var e=t(n,function(o){return r.size===500&&r.clear(),o}),r=e.cache;return e}}function ds(){if(mi)return yi;mi=1;var t=function(){if(gi)return ze;gi=1;var n=le(),e=Su(),r=H(),o=pt(),u=n?n.prototype:void 0,a=u?u.toString:void 0;return ze=function s(i){if(typeof i=="string")return i;if(r(i))return e(i,s)+"";if(o(i))return a?a.call(i):"";var c=i+"";return c=="0"&&1/i==-1/0?"-0":c},ze}();return yi=function(n){return n==null?"":t(n)}}function Du(){if(_i)return wi;_i=1;var t=H(),n=dt(),e=function(){if(vi)return bi;vi=1;var o=ps(),u=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,a=/\\(\\)?/g,s=o(function(i){var c=[];return i.charCodeAt(0)===46&&c.push(""),i.replace(u,function(l,h,p,v){c.push(p?v.replace(a,"$1"):h||l)}),c});return bi=s}(),r=ds();return wi=function(o,u){return t(o)?o:n(o,u)?[o]:e(r(o))}}function Ce(){if(ji)return xi;ji=1;var t=pt();return xi=function(n){if(typeof n=="string"||t(n))return n;var e=n+"";return e=="0"&&1/n==-1/0?"-0":e}}function Bu(){if(Oi)return He;Oi=1;var t=Du(),n=Ce();return He=function(e,r){for(var o=0,u=(r=t(r,e)).length;e!=null&&o<u;)e=e[n(r[o++])];return o&&o==u?e:void 0},He}function bs(){if(Ri)return ki;Ri=1;var t=Ci?Ei:(Ci=1,Ei=function(e,r){return e!=null&&r in Object(e)}),n=function(){if(Ai)return We;Ai=1;var e=Du(),r=yu(),o=H(),u=mu(),a=rt(),s=Ce();return We=function(i,c,l){for(var h=-1,p=(c=e(c,i)).length,v=!1;++h<p;){var d=s(c[h]);if(!(v=i!=null&&l(i,d)))break;i=i[d]}return v||++h!=p?v:!!(p=i==null?0:i.length)&&a(p)&&u(d,p)&&(o(i)||r(i))},We}();return ki=function(e,r){return e!=null&&n(e,r,t)}}function vs(){if(Ti)return Pi;Ti=1;var t=Lu(),n=function(){if(Si)return Mi;Si=1;var s=Bu();return Mi=function(i,c,l){var h=i==null?void 0:s(i,c);return h===void 0?l:h}}(),e=bs(),r=dt(),o=Uu(),u=Fu(),a=Ce();return Pi=function(s,i){return r(s)&&o(i)?u(a(s),i):function(c){var l=n(c,s);return l===void 0&&l===i?e(c,s):t(i,l,3)}}}function gs(){if(zi)return Bi;zi=1;var t=Ui?Li:(Ui=1,Li=function(o){return function(u){return u?.[o]}}),n=function(){if(Di)return Fi;Di=1;var o=Bu();return Fi=function(u){return function(a){return o(a,u)}}}(),e=dt(),r=Ce();return Bi=function(o){return e(o)?t(r(o)):n(o)}}function ys(){if(Ii)return Ni;Ii=1;var t=Ou(),n=function(){if($i)return $e;$i=1;var r=Se();return $e=function(o,u){return function(a,s){if(a==null)return a;if(!r(a))return o(a,s);for(var i=a.length,c=u?i:-1,l=Object(a);(u?c--:++c<i)&&s(l[c],c,l)!==!1;);return a}},$e}(),e=n(t);return Ni=e}function ms(){if(qi)return Xi;qi=1;var t=Su(),n=function(){if(Wi)return Hi;Wi=1;var o=hs(),u=vs(),a=Mu(),s=H(),i=gs();return Hi=function(c){return typeof c=="function"?c:c==null?a:typeof c=="object"?s(c)?u(c[0],c[1]):o(c):i(c)}}(),e=function(){if(Vi)return Ne;Vi=1;var o=ys(),u=Se();return Ne=function(a,s){var i=-1,c=u(a)?Array(a.length):[];return o(a,function(l,h,p){c[++i]=s(l,h,p)}),c},Ne}(),r=H();return Xi=function(o,u){return(r(o)?t:e)(o,n(u,3))}}function ws(){if(Yi)return re;Yi=1,Object.defineProperty(re,"__esModule",{value:!0}),re.flattenNames=void 0;var t=function(){if(Nt)return $t;Nt=1;var i=J(),c=H(),l=X();return $t=function(h){return typeof h=="string"||!c(h)&&l(h)&&i(h)=="[object String]"}}(),n=a(t),e=a(at()),r=function(){if(Nr)return $r;Nr=1;var i=J(),c=ut(),l=X(),h=Function.prototype,p=Object.prototype,v=h.toString,d=p.hasOwnProperty,f=v.call(Object);return $r=function(b){if(!l(b)||i(b)!="[object Object]")return!1;var g=c(b);if(g===null)return!0;var y=d.call(g,"constructor")&&g.constructor;return typeof y=="function"&&y instanceof y&&v.call(y)==f}}(),o=a(r),u=a(ms());function a(i){return i&&i.__esModule?i:{default:i}}var s=re.flattenNames=function i(){var c=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],l=[];return(0,u.default)(c,function(h){Array.isArray(h)?i(h).map(function(p){return l.push(p)}):(0,o.default)(h)?(0,e.default)(h,function(p,v){p===!0&&l.push(v),l.push(v+"-"+p)}):(0,n.default)(h)&&l.push(h)}),l};return re.default=s,re}var Gi,Ki,Ji,Qi,Zi,ea,ta,ra,Ve,na,oa,ia,aa,ua,sa,ca,fa,la,ha,pa,ne={};function zu(){if(ea)return Zi;ea=1;var t=function(){if(Qi)return Ji;Qi=1;var n=K(),e=function(){try{var r=n(Object,"defineProperty");return r({},"",{}),r}catch{}}();return Ji=e}();return Zi=function(n,e,r){e=="__proto__"&&t?t(n,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):n[e]=r}}function Hu(){if(ra)return ta;ra=1;var t=zu(),n=st(),e=Object.prototype.hasOwnProperty;return ta=function(r,o,u){var a=r[o];e.call(r,o)&&n(a,u)&&(u!==void 0||o in r)||t(r,o,u)}}function we(){if(na)return Ve;na=1;var t=Hu(),n=zu();return Ve=function(e,r,o,u){var a=!o;o||(o={});for(var s=-1,i=r.length;++s<i;){var c=r[s],l=u?u(o[c],e[c],c,o,e):void 0;l===void 0&&(l=e[c]),a?n(o,c,l):t(o,c,l)}return o},Ve}function _s(){if(ca)return sa;ca=1;var t=ue(),n=it(),e=ua?aa:(ua=1,aa=function(o){var u=[];if(o!=null)for(var a in Object(o))u.push(a);return u}),r=Object.prototype.hasOwnProperty;return sa=function(o){if(!t(o))return e(o);var u=n(o),a=[];for(var s in o)(s!="constructor"||!u&&r.call(o,s))&&a.push(s);return a}}function Xe(){if(la)return fa;la=1;var t=_u(),n=_s(),e=Se();return fa=function(r){return e(r)?t(r,!0):n(r)}}var da,ba,va,ga,ya,ma,wa,_a,xa,ja,Oa,Ma,Sa,Ea,Ca,Aa,ka,Ra,Pa,Ta,La,Ua,Fa,Da,Ba,za,Ha,Wa,$a,Na,Ia,Va,Xa,qa,Ya,Ga,Ka,qe,Ja,Qa,Za,eu,Ye={exports:{}};function tu(){if(wa)return ma;wa=1;var t=ku(),n=ut(),e=ht(),r=Pu(),o=Object.getOwnPropertySymbols;return ma=o?function(u){for(var a=[];u;)t(a,e(u)),u=n(u);return a}:r}function Ge(){if(Ca)return Ea;Ca=1;var t=Au();return Ea=function(n){var e=new n.constructor(n.byteLength);return new t(e).set(new t(n)),e}}function xs(){if(Ba)return Da;Ba=1;var t=Ge(),n=function(){if(ka)return Aa;ka=1;var u=Ge();return Aa=function(a,s){var i=s?u(a.buffer):a.buffer;return new a.constructor(i,a.byteOffset,a.byteLength)}}(),e=function(){if(Pa)return Ra;Pa=1;var u=/\w*$/;return Ra=function(a){var s=new a.constructor(a.source,u.exec(a));return s.lastIndex=a.lastIndex,s}}(),r=function(){if(La)return Ta;La=1;var u=le(),a=u?u.prototype:void 0,s=a?a.valueOf:void 0;return Ta=function(i){return s?Object(s.call(i)):{}}}(),o=function(){if(Fa)return Ua;Fa=1;var u=Ge();return Ua=function(a,s){var i=s?u(a.buffer):a.buffer;return new a.constructor(i,a.byteOffset,a.length)}}();return Da=function(u,a,s){var i=u.constructor;switch(a){case"[object ArrayBuffer]":return t(u);case"[object Boolean]":case"[object Date]":return new i(+u);case"[object DataView]":return n(u,s);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return o(u,s);case"[object Map]":case"[object Set]":return new i;case"[object Number]":case"[object String]":return new i(u);case"[object RegExp]":return e(u);case"[object Symbol]":return r(u)}}}function js(){if($a)return Wa;$a=1;var t=function(){if(Ha)return za;Ha=1;var r=ue(),o=Object.create,u=function(){function a(){}return function(s){if(!r(s))return{};if(o)return o(s);a.prototype=s;var i=new a;return a.prototype=void 0,i}}();return za=u}(),n=ut(),e=it();return Wa=function(r){return typeof r.constructor!="function"||e(r)?{}:t(n(r))}}function Os(){if(Xa)return Va;Xa=1;var t=function(){if(Ia)return Na;Ia=1;var u=Ee(),a=X();return Na=function(s){return a(s)&&u(s)=="[object Map]"}}(),n=nt(),e=ot(),r=e&&e.isMap,o=r?n(r):t;return Va=o}function Ms(){if(Ka)return Ga;Ka=1;var t=function(){if(Ya)return qa;Ya=1;var u=Ee(),a=X();return qa=function(s){return a(s)&&u(s)=="[object Set]"}}(),n=nt(),e=ot(),r=e&&e.isSet,o=r?n(r):t;return Ga=o}function Ss(){if(Ja)return qe;Ja=1;var t=lt(),n=(Ki||(Ki=1,Gi=function(S,m){for(var M=-1,E=S==null?0:S.length;++M<E&&m(S[M],M,S)!==!1;);return S}),Gi),e=Hu(),r=function(){if(ia)return oa;ia=1;var S=we(),m=he();return oa=function(M,E){return M&&S(E,m(E),M)}}(),o=function(){if(pa)return ha;pa=1;var S=we(),m=Xe();return ha=function(M,E){return M&&S(E,m(E),M)}}(),u=(da||(da=1,function(S,m){var M=N(),E=m&&!m.nodeType&&m,I=E&&S&&!S.nodeType&&S,W=I&&I.exports===E?M.Buffer:void 0,U=W?W.allocUnsafe:void 0;S.exports=function(A,Z){if(Z)return A.slice();var G=A.length,pe=U?U(G):new A.constructor(G);return A.copy(pe),pe}}(Ye,Ye.exports)),Ye.exports),a=(va||(va=1,ba=function(S,m){var M=-1,E=S.length;for(m||(m=Array(E));++M<E;)m[M]=S[M];return m}),ba),s=function(){if(ya)return ga;ya=1;var S=we(),m=ht();return ga=function(M,E){return S(M,m(M),E)}}(),i=function(){if(xa)return _a;xa=1;var S=we(),m=tu();return _a=function(M,E){return S(M,m(M),E)}}(),c=Tu(),l=function(){if(Oa)return ja;Oa=1;var S=Ru(),m=tu(),M=Xe();return ja=function(E){return S(E,M,m)}}(),h=Ee(),p=function(){if(Sa)return Ma;Sa=1;var S=Object.prototype.hasOwnProperty;return Ma=function(m){var M=m.length,E=new m.constructor(M);return M&&typeof m[0]=="string"&&S.call(m,"index")&&(E.index=m.index,E.input=m.input),E}}(),v=xs(),d=js(),f=H(),b=tt(),g=Os(),y=ue(),x=Ms(),j=he(),C=Xe(),R="[object Arguments]",L="[object Function]",T="[object Object]",O={};return O[R]=O["[object Array]"]=O["[object ArrayBuffer]"]=O["[object DataView]"]=O["[object Boolean]"]=O["[object Date]"]=O["[object Float32Array]"]=O["[object Float64Array]"]=O["[object Int8Array]"]=O["[object Int16Array]"]=O["[object Int32Array]"]=O["[object Map]"]=O["[object Number]"]=O[T]=O["[object RegExp]"]=O["[object Set]"]=O["[object String]"]=O["[object Symbol]"]=O["[object Uint8Array]"]=O["[object Uint8ClampedArray]"]=O["[object Uint16Array]"]=O["[object Uint32Array]"]=!0,O["[object Error]"]=O[L]=O["[object WeakMap]"]=!1,qe=function S(m,M,E,I,W,U){var A,Z=1&M,G=2&M,pe=4&M;if(E&&(A=W?E(m,I,W,U):E(m)),A!==void 0)return A;if(!y(m))return m;var vt=f(m);if(vt){if(A=p(m),!Z)return a(m,A)}else{var ee=h(m),gt=ee==L||ee=="[object GeneratorFunction]";if(b(m))return u(m,Z);if(ee==T||ee==R||gt&&!W){if(A=G||gt?{}:d(m),!Z)return G?i(m,o(A,m)):s(m,r(A,m))}else{if(!O[ee])return W?m:{};A=v(m,ee,Z)}}U||(U=new t);var yt=U.get(m);if(yt)return yt;U.set(m,A),x(m)?m.forEach(function(q){A.add(S(q,M,E,q,m,U))}):g(m)&&m.forEach(function(q,te){A.set(te,S(q,M,E,te,m,U))});var mt=vt?void 0:(pe?G?l:c:G?C:j)(m);return n(mt||m,function(q,te){mt&&(q=m[te=q]),e(A,te,S(q,M,E,te,m,U))}),A},qe}function Es(){if(eu)return ne;eu=1,Object.defineProperty(ne,"__esModule",{value:!0}),ne.mergeClasses=void 0;var t=r(at()),n=r(function(){if(Za)return Qa;Za=1;var u=Ss();return Qa=function(a){return u(a,5)}}()),e=Object.assign||function(u){for(var a=1;a<arguments.length;a++){var s=arguments[a];for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(u[i]=s[i])}return u};function r(u){return u&&u.__esModule?u:{default:u}}var o=ne.mergeClasses=function(u){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],s=u.default&&(0,n.default)(u.default)||{};return a.map(function(i){var c=u[i];return c&&(0,t.default)(c,function(l,h){s[h]||(s[h]={}),s[h]=e({},s[h],c[h])}),i}),s};return ne.default=o,ne}var ru,oe={},nu,ie={};function Cs(){if(nu)return ie;nu=1,Object.defineProperty(ie,"__esModule",{value:!0}),ie.hover=void 0;var t,n=Object.assign||function(u){for(var a=1;a<arguments.length;a++){var s=arguments[a];for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(u[i]=s[i])}return u},e=(t=w)&&t.__esModule?t:{default:t};function r(u,a){if(!u)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!a||typeof a!="object"&&typeof a!="function"?u:a}var o=ie.hover=function(u){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"span";return function(s){function i(){var c,l,h;(function(f,b){if(!(f instanceof b))throw new TypeError("Cannot call a class as a function")})(this,i);for(var p=arguments.length,v=Array(p),d=0;d<p;d++)v[d]=arguments[d];return l=h=r(this,(c=i.__proto__||Object.getPrototypeOf(i)).call.apply(c,[this].concat(v))),h.state={hover:!1},h.handleMouseOver=function(){return h.setState({hover:!0})},h.handleMouseOut=function(){return h.setState({hover:!1})},h.render=function(){return e.default.createElement(a,{onMouseOver:h.handleMouseOver,onMouseOut:h.handleMouseOut},e.default.createElement(u,n({},h.props,h.state)))},r(h,l)}return function(c,l){if(typeof l!="function"&&l!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof l);c.prototype=Object.create(l&&l.prototype,{constructor:{value:c,enumerable:!1,writable:!0,configurable:!0}}),l&&(Object.setPrototypeOf?Object.setPrototypeOf(c,l):c.__proto__=l)}(i,s),i}(e.default.Component)};return ie.default=o,ie}var ou,ae={};function As(){if(ou)return ae;ou=1,Object.defineProperty(ae,"__esModule",{value:!0}),ae.active=void 0;var t,n=Object.assign||function(u){for(var a=1;a<arguments.length;a++){var s=arguments[a];for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(u[i]=s[i])}return u},e=(t=w)&&t.__esModule?t:{default:t};function r(u,a){if(!u)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!a||typeof a!="object"&&typeof a!="function"?u:a}var o=ae.active=function(u){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"span";return function(s){function i(){var c,l,h;(function(f,b){if(!(f instanceof b))throw new TypeError("Cannot call a class as a function")})(this,i);for(var p=arguments.length,v=Array(p),d=0;d<p;d++)v[d]=arguments[d];return l=h=r(this,(c=i.__proto__||Object.getPrototypeOf(i)).call.apply(c,[this].concat(v))),h.state={active:!1},h.handleMouseDown=function(){return h.setState({active:!0})},h.handleMouseUp=function(){return h.setState({active:!1})},h.render=function(){return e.default.createElement(a,{onMouseDown:h.handleMouseDown,onMouseUp:h.handleMouseUp},e.default.createElement(u,n({},h.props,h.state)))},r(h,l)}return function(c,l){if(typeof l!="function"&&l!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof l);c.prototype=Object.create(l&&l.prototype,{constructor:{value:c,enumerable:!1,writable:!0,configurable:!0}}),l&&(Object.setPrototypeOf?Object.setPrototypeOf(c,l):c.__proto__=l)}(i,s),i}(e.default.Component)};return ae.default=o,ae}var iu,au,Ke={},ks=function(){if(au)return F;au=1,Object.defineProperty(F,"__esModule",{value:!0}),F.ReactCSS=F.loop=F.handleActive=F.handleHover=F.hover=void 0;var t=s(ws()),n=s(Es()),e=function(){if(ru)return oe;ru=1,Object.defineProperty(oe,"__esModule",{value:!0}),oe.autoprefix=void 0;var c,l=at(),h=(c=l)&&c.__esModule?c:{default:c},p=Object.assign||function(f){for(var b=1;b<arguments.length;b++){var g=arguments[b];for(var y in g)Object.prototype.hasOwnProperty.call(g,y)&&(f[y]=g[y])}return f},v={borderRadius:function(f){return{msBorderRadius:f,MozBorderRadius:f,OBorderRadius:f,WebkitBorderRadius:f,borderRadius:f}},boxShadow:function(f){return{msBoxShadow:f,MozBoxShadow:f,OBoxShadow:f,WebkitBoxShadow:f,boxShadow:f}},userSelect:function(f){return{WebkitTouchCallout:f,KhtmlUserSelect:f,MozUserSelect:f,msUserSelect:f,WebkitUserSelect:f,userSelect:f}},flex:function(f){return{WebkitBoxFlex:f,MozBoxFlex:f,WebkitFlex:f,msFlex:f,flex:f}},flexBasis:function(f){return{WebkitFlexBasis:f,flexBasis:f}},justifyContent:function(f){return{WebkitJustifyContent:f,justifyContent:f}},transition:function(f){return{msTransition:f,MozTransition:f,OTransition:f,WebkitTransition:f,transition:f}},transform:function(f){return{msTransform:f,MozTransform:f,OTransform:f,WebkitTransform:f,transform:f}},absolute:function(f){var b=f&&f.split(" ");return{position:"absolute",top:b&&b[0],right:b&&b[1],bottom:b&&b[2],left:b&&b[3]}},extend:function(f,b){return b[f]||{extend:f}}},d=oe.autoprefix=function(f){var b={};return(0,h.default)(f,function(g,y){var x={};(0,h.default)(g,function(j,C){var R=v[C];R?x=p({},x,R(j)):x[C]=j}),b[y]=x}),b};return oe.default=d,oe}(),r=s(e),o=s(Cs()),u=s(As()),a=s((iu||(iu=1,Object.defineProperty(Ke,"__esModule",{value:!0}),Ke.default=function(c,l){var h={},p=function(v){var d=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1];h[v]=d};return c===0&&p("first-child"),c===l-1&&p("last-child"),(c===0||c%2==0)&&p("even"),Math.abs(c%2)===1&&p("odd"),p("nth-child",c),h}),Ke));function s(c){return c&&c.__esModule?c:{default:c}}F.hover=o.default,F.handleHover=o.default,F.handleActive=u.default,F.loop=a.default;var i=F.ReactCSS=function(c){for(var l=arguments.length,h=Array(l>1?l-1:0),p=1;p<l;p++)h[p-1]=arguments[p];var v=(0,t.default)(h),d=(0,n.default)(c,v);return(0,r.default)(d)};return F.default=i,F}();const Q=$.getDefaultExportFromCjs(ks);var Je={},Rs=function(t,n,e,r){var o=t+"-"+n+"-"+e+(r?"-server":"");if(Je[o])return Je[o];var u=function(a,s,i,c){if(typeof document>"u"&&!c)return null;var l=c?new c:document.createElement("canvas");l.width=2*i,l.height=2*i;var h=l.getContext("2d");return h?(h.fillStyle=a,h.fillRect(0,0,l.width,l.height),h.fillStyle=s,h.fillRect(0,0,i,i),h.translate(i,i),h.fillRect(0,0,i,i),l.toDataURL()):null}(t,n,e,r);return Je[o]=u,u},uu=Object.assign||function(t){for(var n=1;n<arguments.length;n++){var e=arguments[n];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])}return t},bt=function(t){var n=t.white,e=t.grey,r=t.size,o=t.renderers,u=t.borderRadius,a=t.boxShadow,s=t.children,i=Q({default:{grid:{borderRadius:u,boxShadow:a,absolute:"0px 0px 0px 0px",background:"url("+Rs(n,e,r,o.canvas)+") center left"}}});return w.isValidElement(s)?w.cloneElement(s,uu({},s.props,{style:uu({},s.props.style,i.grid)})):w.createElement("div",{style:i.grid})};bt.defaultProps={size:8,white:"transparent",grey:"rgba(0,0,0,.08)",renderers:{}};var Ps=Object.assign||function(t){for(var n=1;n<arguments.length;n++){var e=arguments[n];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])}return t},Ts=function(){function t(n,e){for(var r=0;r<e.length;r++){var o=e[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(n,o.key,o)}}return function(n,e,r){return e&&t(n.prototype,e),r&&t(n,r),n}}();function su(t,n){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!n||typeof n!="object"&&typeof n!="function"?t:n}var Ls=function(){function t(){var n,e,r;(function(s,i){if(!(s instanceof i))throw new TypeError("Cannot call a class as a function")})(this,t);for(var o=arguments.length,u=Array(o),a=0;a<o;a++)u[a]=arguments[a];return e=r=su(this,(n=t.__proto__||Object.getPrototypeOf(t)).call.apply(n,[this].concat(u))),r.handleChange=function(s){var i=function(c,l,h,p,v){var d=v.clientWidth,f=v.clientHeight,b=typeof c.pageX=="number"?c.pageX:c.touches[0].pageX,g=typeof c.pageY=="number"?c.pageY:c.touches[0].pageY,y=b-(v.getBoundingClientRect().left+window.pageXOffset),x=g-(v.getBoundingClientRect().top+window.pageYOffset);if(h==="vertical"){var j=void 0;if(j=x<0?0:x>f?1:Math.round(100*x/f)/100,l.a!==j)return{h:l.h,s:l.s,l:l.l,a:j,source:"rgb"}}else{var C=void 0;if(p!==(C=y<0?0:y>d?1:Math.round(100*y/d)/100))return{h:l.h,s:l.s,l:l.l,a:C,source:"rgb"}}return null}(s,r.props.hsl,r.props.direction,r.props.a,r.container);i&&typeof r.props.onChange=="function"&&r.props.onChange(i,s)},r.handleMouseDown=function(s){r.handleChange(s),window.addEventListener("mousemove",r.handleChange),window.addEventListener("mouseup",r.handleMouseUp)},r.handleMouseUp=function(){r.unbindEventListeners()},r.unbindEventListeners=function(){window.removeEventListener("mousemove",r.handleChange),window.removeEventListener("mouseup",r.handleMouseUp)},su(r,e)}return function(n,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(n,e):n.__proto__=e)}(t,w.PureComponent||w.Component),Ts(t,[{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"render",value:function(){var n=this,e=this.props.rgb,r=Q({default:{alpha:{absolute:"0px 0px 0px 0px",borderRadius:this.props.radius},checkboard:{absolute:"0px 0px 0px 0px",overflow:"hidden",borderRadius:this.props.radius},gradient:{absolute:"0px 0px 0px 0px",background:"linear-gradient(to right, rgba("+e.r+","+e.g+","+e.b+`, 0) 0%,
|
|
7
|
+
rgba(`+e.r+","+e.g+","+e.b+", 1) 100%)",boxShadow:this.props.shadow,borderRadius:this.props.radius},container:{position:"relative",height:"100%",margin:"0 3px"},pointer:{position:"absolute",left:100*e.a+"%"},slider:{width:"4px",borderRadius:"1px",height:"8px",boxShadow:"0 0 2px rgba(0, 0, 0, .6)",background:"#fff",marginTop:"1px",transform:"translateX(-2px)"}},vertical:{gradient:{background:"linear-gradient(to bottom, rgba("+e.r+","+e.g+","+e.b+`, 0) 0%,
|
|
8
|
+
rgba(`+e.r+","+e.g+","+e.b+", 1) 100%)"},pointer:{left:0,top:100*e.a+"%"}},overwrite:Ps({},this.props.style)},{vertical:this.props.direction==="vertical",overwrite:!0});return w.createElement("div",{style:r.alpha},w.createElement("div",{style:r.checkboard},w.createElement(bt,{renderers:this.props.renderers})),w.createElement("div",{style:r.gradient}),w.createElement("div",{style:r.container,ref:function(o){return n.container=o},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},w.createElement("div",{style:r.pointer},this.props.pointer?w.createElement(this.props.pointer,this.props):w.createElement("div",{style:r.slider}))))}}]),t}(),Us=function(){function t(n,e){for(var r=0;r<e.length;r++){var o=e[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(n,o.key,o)}}return function(n,e,r){return e&&t(n.prototype,e),r&&t(n,r),n}}(),Fs=[38,40],Ds=1,se=function(){function t(n){(function(r,o){if(!(r instanceof o))throw new TypeError("Cannot call a class as a function")})(this,t);var e=function(r,o){if(!r)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!o||typeof o!="object"&&typeof o!="function"?r:o}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.handleBlur=function(){e.state.blurValue&&e.setState({value:e.state.blurValue,blurValue:null})},e.handleChange=function(r){e.setUpdatedValue(r.target.value,r)},e.handleKeyDown=function(r){var o,u=function(i){return Number(String(i).replace(/%/g,""))}(r.target.value);if(!isNaN(u)&&(o=r.keyCode,Fs.indexOf(o)>-1)){var a=e.getArrowOffset(),s=r.keyCode===38?u+a:u-a;e.setUpdatedValue(s,r)}},e.handleDrag=function(r){if(e.props.dragLabel){var o=Math.round(e.props.value+r.movementX);o>=0&&o<=e.props.dragMax&&e.props.onChange&&e.props.onChange(e.getValueObjectWithLabel(o),r)}},e.handleMouseDown=function(r){e.props.dragLabel&&(r.preventDefault(),e.handleDrag(r),window.addEventListener("mousemove",e.handleDrag),window.addEventListener("mouseup",e.handleMouseUp))},e.handleMouseUp=function(){e.unbindEventListeners()},e.unbindEventListeners=function(){window.removeEventListener("mousemove",e.handleDrag),window.removeEventListener("mouseup",e.handleMouseUp)},e.state={value:String(n.value).toUpperCase(),blurValue:String(n.value).toUpperCase()},e.inputId="rc-editable-input-"+Ds++,e}return function(n,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(n,e):n.__proto__=e)}(t,w.PureComponent||w.Component),Us(t,[{key:"componentDidUpdate",value:function(n,e){this.props.value===this.state.value||n.value===this.props.value&&e.value===this.state.value||(this.input===document.activeElement?this.setState({blurValue:String(this.props.value).toUpperCase()}):this.setState({value:String(this.props.value).toUpperCase(),blurValue:!this.state.blurValue&&String(this.props.value).toUpperCase()}))}},{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"getValueObjectWithLabel",value:function(n){return function(e,r,o){return r in e?Object.defineProperty(e,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[r]=o,e}({},this.props.label,n)}},{key:"getArrowOffset",value:function(){return this.props.arrowOffset||1}},{key:"setUpdatedValue",value:function(n,e){var r=this.props.label?this.getValueObjectWithLabel(n):n;this.props.onChange&&this.props.onChange(r,e),this.setState({value:n})}},{key:"render",value:function(){var n=this,e=Q({default:{wrap:{position:"relative"}},"user-override":{wrap:this.props.style&&this.props.style.wrap?this.props.style.wrap:{},input:this.props.style&&this.props.style.input?this.props.style.input:{},label:this.props.style&&this.props.style.label?this.props.style.label:{}},"dragLabel-true":{label:{cursor:"ew-resize"}}},{"user-override":!0},this.props);return w.createElement("div",{style:e.wrap},w.createElement("input",{id:this.inputId,style:e.input,ref:function(r){return n.input=r},value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,onBlur:this.handleBlur,placeholder:this.props.placeholder,spellCheck:"false"}),this.props.label&&!this.props.hideLabel?w.createElement("label",{htmlFor:this.inputId,style:e.label,onMouseDown:this.handleMouseDown},this.props.label):null)}}]),t}(),Bs=function(){function t(n,e){for(var r=0;r<e.length;r++){var o=e[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(n,o.key,o)}}return function(n,e,r){return e&&t(n.prototype,e),r&&t(n,r),n}}();function cu(t,n){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!n||typeof n!="object"&&typeof n!="function"?t:n}var zs=function(){function t(){var n,e,r;(function(s,i){if(!(s instanceof i))throw new TypeError("Cannot call a class as a function")})(this,t);for(var o=arguments.length,u=Array(o),a=0;a<o;a++)u[a]=arguments[a];return e=r=cu(this,(n=t.__proto__||Object.getPrototypeOf(t)).call.apply(n,[this].concat(u))),r.handleChange=function(s){var i=function(c,l,h,p){var v=p.clientWidth,d=p.clientHeight,f=typeof c.pageX=="number"?c.pageX:c.touches[0].pageX,b=typeof c.pageY=="number"?c.pageY:c.touches[0].pageY,g=f-(p.getBoundingClientRect().left+window.pageXOffset),y=b-(p.getBoundingClientRect().top+window.pageYOffset);if(l==="vertical"){var x=void 0;if(x=y<0?359:y>d?0:360*(-100*y/d+100)/100,h.h!==x)return{h:x,s:h.s,l:h.l,a:h.a,source:"hsl"}}else{var j=void 0;if(j=g<0?0:g>v?359:100*g/v*360/100,h.h!==j)return{h:j,s:h.s,l:h.l,a:h.a,source:"hsl"}}return null}(s,r.props.direction,r.props.hsl,r.container);i&&typeof r.props.onChange=="function"&&r.props.onChange(i,s)},r.handleMouseDown=function(s){r.handleChange(s),window.addEventListener("mousemove",r.handleChange),window.addEventListener("mouseup",r.handleMouseUp)},r.handleMouseUp=function(){r.unbindEventListeners()},cu(r,e)}return function(n,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(n,e):n.__proto__=e)}(t,w.PureComponent||w.Component),Bs(t,[{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"unbindEventListeners",value:function(){window.removeEventListener("mousemove",this.handleChange),window.removeEventListener("mouseup",this.handleMouseUp)}},{key:"render",value:function(){var n=this,e=this.props.direction,r=e===void 0?"horizontal":e,o=Q({default:{hue:{absolute:"0px 0px 0px 0px",borderRadius:this.props.radius,boxShadow:this.props.shadow},container:{padding:"0 2px",position:"relative",height:"100%",borderRadius:this.props.radius},pointer:{position:"absolute",left:100*this.props.hsl.h/360+"%"},slider:{marginTop:"1px",width:"4px",borderRadius:"1px",height:"8px",boxShadow:"0 0 2px rgba(0, 0, 0, .6)",background:"#fff",transform:"translateX(-2px)"}},vertical:{pointer:{left:"0px",top:-100*this.props.hsl.h/360+100+"%"}}},{vertical:r==="vertical"});return w.createElement("div",{style:o.hue},w.createElement("div",{className:"hue-"+r,style:o.container,ref:function(u){return n.container=u},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},w.createElement("style",null,`
|
|
9
|
+
.hue-horizontal {
|
|
10
|
+
background: linear-gradient(to right, #f00 0%, #ff0 17%, #0f0
|
|
11
|
+
33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);
|
|
12
|
+
background: -webkit-linear-gradient(to right, #f00 0%, #ff0
|
|
13
|
+
17%, #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.hue-vertical {
|
|
17
|
+
background: linear-gradient(to top, #f00 0%, #ff0 17%, #0f0 33%,
|
|
18
|
+
#0ff 50%, #00f 67%, #f0f 83%, #f00 100%);
|
|
19
|
+
background: -webkit-linear-gradient(to top, #f00 0%, #ff0 17%,
|
|
20
|
+
#0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);
|
|
21
|
+
}
|
|
22
|
+
`),w.createElement("div",{style:o.pointer},this.props.pointer?w.createElement(this.props.pointer,this.props):w.createElement("div",{style:o.slider}))))}}]),t}(),Hs=typeof global=="object"&&global&&global.Object===Object&&global,Ws=typeof self=="object"&&self&&self.Object===Object&&self,Wu=Hs||Ws||Function("return this")(),je=Wu.Symbol,$u=Object.prototype,$s=$u.hasOwnProperty,Ns=$u.toString,ce=je?je.toStringTag:void 0,Is=Object.prototype.toString,fu=je?je.toStringTag:void 0;function Vs(t){return t==null?t===void 0?"[object Undefined]":"[object Null]":fu&&fu in Object(t)?function(n){var e=$s.call(n,ce),r=n[ce];try{n[ce]=void 0;var o=!0}catch{}var u=Ns.call(n);return o&&(e?n[ce]=r:delete n[ce]),u}(t):function(n){return Is.call(n)}(t)}function Oe(t){var n=typeof t;return t!=null&&(n=="object"||n=="function")}de.string,de.oneOf([0,1,2,3,4,5]),de.number,de.object;var Qe=function(){return Wu.Date.now()},Xs=/\s/,qs=/^\s+/;function Ys(t){return t&&t.slice(0,function(n){for(var e=n.length;e--&&Xs.test(n.charAt(e)););return e}(t)+1).replace(qs,"")}var Gs=/^[-+]0x[0-9a-f]+$/i,Ks=/^0b[01]+$/i,Js=/^0o[0-7]+$/i,Qs=parseInt;function lu(t){if(typeof t=="number")return t;if(function(r){return typeof r=="symbol"||function(o){return o!=null&&typeof o=="object"}(r)&&Vs(r)=="[object Symbol]"}(t))return NaN;if(Oe(t)){var n=typeof t.valueOf=="function"?t.valueOf():t;t=Oe(n)?n+"":n}if(typeof t!="string")return t===0?t:+t;t=Ys(t);var e=Ks.test(t);return e||Js.test(t)?Qs(t.slice(2),e?2:8):Gs.test(t)?NaN:+t}var Zs=Math.max,ec=Math.min;function tc(t,n,e){var r,o,u,a,s,i,c=0,l=!1,h=!1,p=!0;if(typeof t!="function")throw new TypeError("Expected a function");function v(y){var x=r,j=o;return r=o=void 0,c=y,a=t.apply(j,x)}function d(y){var x=y-i;return i===void 0||x>=n||x<0||h&&y-c>=u}function f(){var y=Qe();if(d(y))return b(y);s=setTimeout(f,function(x){var j=n-(x-i);return h?ec(j,u-(x-c)):j}(y))}function b(y){return s=void 0,p&&r?v(y):(r=o=void 0,a)}function g(){var y=Qe(),x=d(y);if(r=arguments,o=this,i=y,x){if(s===void 0)return function(j){return c=j,s=setTimeout(f,n),l?v(j):a}(i);if(h)return clearTimeout(s),s=setTimeout(f,n),v(i)}return s===void 0&&(s=setTimeout(f,n)),a}return n=lu(n)||0,Oe(e)&&(l=!!e.leading,u=(h="maxWait"in e)?Zs(lu(e.maxWait)||0,n):u,p="trailing"in e?!!e.trailing:p),g.cancel=function(){s!==void 0&&clearTimeout(s),c=0,r=i=o=s=void 0},g.flush=function(){return s===void 0?a:b(Qe())},g}var rc=function(){function t(n,e){for(var r=0;r<e.length;r++){var o=e[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(n,o.key,o)}}return function(n,e,r){return e&&t(n.prototype,e),r&&t(n,r),n}}();(function(){function t(n){(function(r,o){if(!(r instanceof o))throw new TypeError("Cannot call a class as a function")})(this,t);var e=function(r,o){if(!r)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!o||typeof o!="object"&&typeof o!="function"?r:o}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,n));return e.handleChange=function(r){typeof e.props.onChange=="function"&&e.throttle(e.props.onChange,function(o,u,a){var s=a.getBoundingClientRect(),i=s.width,c=s.height,l=typeof o.pageX=="number"?o.pageX:o.touches[0].pageX,h=typeof o.pageY=="number"?o.pageY:o.touches[0].pageY,p=l-(a.getBoundingClientRect().left+window.pageXOffset),v=h-(a.getBoundingClientRect().top+window.pageYOffset);p<0?p=0:p>i&&(p=i),v<0?v=0:v>c&&(v=c);var d=p/i,f=1-v/c;return{h:u.h,s:d,v:f,a:u.a,source:"hsv"}}(r,e.props.hsl,e.container),r)},e.handleMouseDown=function(r){e.handleChange(r);var o=e.getContainerRenderWindow();o.addEventListener("mousemove",e.handleChange),o.addEventListener("mouseup",e.handleMouseUp)},e.handleMouseUp=function(){e.unbindEventListeners()},e.throttle=function(r,o,u){var a=!0,s=!0;if(typeof r!="function")throw new TypeError("Expected a function");return Oe(u)&&(a="leading"in u?!!u.leading:a,s="trailing"in u?!!u.trailing:s),tc(r,o,{leading:a,maxWait:o,trailing:s})}(function(r,o,u){r(o,u)},50),e}(function(n,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(n,e):n.__proto__=e)})(t,w.PureComponent||w.Component),rc(t,[{key:"componentWillUnmount",value:function(){this.throttle.cancel(),this.unbindEventListeners()}},{key:"getContainerRenderWindow",value:function(){for(var n=this.container,e=window;!e.document.contains(n)&&e.parent!==e;)e=e.parent;return e}},{key:"unbindEventListeners",value:function(){var n=this.getContainerRenderWindow();n.removeEventListener("mousemove",this.handleChange),n.removeEventListener("mouseup",this.handleMouseUp)}},{key:"render",value:function(){var n=this,e=this.props.style||{},r=e.color,o=e.white,u=e.black,a=e.pointer,s=e.circle,i=Q({default:{color:{absolute:"0px 0px 0px 0px",background:"hsl("+this.props.hsl.h+",100%, 50%)",borderRadius:this.props.radius},white:{absolute:"0px 0px 0px 0px",borderRadius:this.props.radius},black:{absolute:"0px 0px 0px 0px",boxShadow:this.props.shadow,borderRadius:this.props.radius},pointer:{position:"absolute",top:-100*this.props.hsv.v+100+"%",left:100*this.props.hsv.s+"%",cursor:"default"},circle:{width:"4px",height:"4px",boxShadow:`0 0 0 1.5px #fff, inset 0 0 1px 1px rgba(0,0,0,.3),
|
|
23
|
+
0 0 1px 2px rgba(0,0,0,.4)`,borderRadius:"50%",cursor:"hand",transform:"translate(-2px, -2px)"}},custom:{color:r,white:o,black:u,pointer:a,circle:s}},{custom:!!this.props.style});return w.createElement("div",{style:i.color,ref:function(c){return n.container=c},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},w.createElement("style",null,`
|
|
24
|
+
.saturation-white {
|
|
25
|
+
background: -webkit-linear-gradient(to right, #fff, rgba(255,255,255,0));
|
|
26
|
+
background: linear-gradient(to right, #fff, rgba(255,255,255,0));
|
|
27
|
+
}
|
|
28
|
+
.saturation-black {
|
|
29
|
+
background: -webkit-linear-gradient(to top, #000, rgba(0,0,0,0));
|
|
30
|
+
background: linear-gradient(to top, #000, rgba(0,0,0,0));
|
|
31
|
+
}
|
|
32
|
+
`),w.createElement("div",{style:i.white,className:"saturation-white"},w.createElement("div",{style:i.black,className:"saturation-black"}),w.createElement("div",{style:i.pointer},this.props.pointer?w.createElement(this.props.pointer,this.props):w.createElement("div",{style:i.circle}))))}}])})();var nc=Object.assign||function(t){for(var n=1;n<arguments.length;n++){var e=arguments[n];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])}return t},oc=function(){function t(n,e){for(var r=0;r<e.length;r++){var o=e[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(n,o.key,o)}}return function(n,e,r){return e&&t(n.prototype,e),r&&t(n,r),n}}();function hu(t,n){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!n||typeof n!="object"&&typeof n!="function"?t:n}var pu=Object.assign||function(t){for(var n=1;n<arguments.length;n++){var e=arguments[n];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])}return t};(function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"span";(function(){function e(){var r,o,u;(function(c,l){if(!(c instanceof l))throw new TypeError("Cannot call a class as a function")})(this,e);for(var a=arguments.length,s=Array(a),i=0;i<a;i++)s[i]=arguments[i];return o=u=hu(this,(r=e.__proto__||Object.getPrototypeOf(e)).call.apply(r,[this].concat(s))),u.state={focus:!1},u.handleFocus=function(){return u.setState({focus:!0})},u.handleBlur=function(){return u.setState({focus:!1})},hu(u,o)}(function(r,o){if(typeof o!="function"&&o!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof o);r.prototype=Object.create(o&&o.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),o&&(Object.setPrototypeOf?Object.setPrototypeOf(r,o):r.__proto__=o)})(e,w.Component),oc(e,[{key:"render",value:function(){return w.createElement(n,{onFocus:this.handleFocus,onBlur:this.handleBlur},w.createElement(t,nc({},this.props,this.state)))}}])})()})(function(t){var n=t.color,e=t.style,r=t.onClick,o=r===void 0?function(){}:r,u=t.onHover,a=t.title,s=a===void 0?n:a,i=t.children,c=t.focus,l=t.focusStyle,h=n==="transparent",p=Q({default:{swatch:pu({background:n,height:"100%",width:"100%",cursor:"pointer",position:"relative",outline:"none"},e,c?l===void 0?{}:l:{})}}),v={};return u&&(v.onMouseOver=function(d){return u(n,d)}),w.createElement("div",pu({style:p.swatch,onClick:function(d){return o(n,d)},title:s,tabIndex:0,onKeyDown:function(d){return d.keyCode===13&&o(n,d)}},v),i,h&&w.createElement(bt,{borderRadius:p.swatch.borderRadius,boxShadow:"inset 0 0 0 1px rgba(0,0,0,0.1)"}))});var ic=function(t){var n=t.onChange,e=t.rgb,r=t.hsl,o=t.hex,u=t.disableAlpha,a=Q({default:{fields:{display:"flex",paddingTop:"4px"},single:{flex:"1",paddingLeft:"6px"},alpha:{flex:"1",paddingLeft:"6px"},double:{flex:"2"},input:{width:"80%",padding:"4px 10% 3px",border:"none",boxShadow:"inset 0 0 0 1px #ccc",fontSize:"11px"},label:{display:"block",textAlign:"center",fontSize:"11px",color:"#222",paddingTop:"3px",paddingBottom:"4px",textTransform:"capitalize"}},disableAlpha:{alpha:{display:"none"}}},{disableAlpha:u}),s=function(i,c){i.hex?function(l){if(l==="transparent")return!0;var h=String(l).charAt(0)==="#"?1:0;return l.length!==4+h&&l.length<7+h&&_(l).isValid()}(i.hex)&&n({hex:i.hex,source:"hex"},c):i.r||i.g||i.b?n({r:i.r||e.r,g:i.g||e.g,b:i.b||e.b,a:e.a,source:"rgb"},c):i.a&&(i.a<0?i.a=0:i.a>100&&(i.a=100),i.a/=100,n({h:r.h,s:r.s,l:r.l,a:i.a,source:"rgb"},c))};return w.createElement("div",{style:a.fields,className:"flexbox-fix"},w.createElement("div",{style:a.double},w.createElement(se,{style:{input:a.input,label:a.label},label:"hex",value:o.replace("#",""),onChange:s})),w.createElement("div",{style:a.single},w.createElement(se,{style:{input:a.input,label:a.label},label:"r",value:e.r,onChange:s,dragLabel:"true",dragMax:"255"})),w.createElement("div",{style:a.single},w.createElement(se,{style:{input:a.input,label:a.label},label:"g",value:e.g,onChange:s,dragLabel:"true",dragMax:"255"})),w.createElement("div",{style:a.single},w.createElement(se,{style:{input:a.input,label:a.label},label:"b",value:e.b,onChange:s,dragLabel:"true",dragMax:"255"})),w.createElement("div",{style:a.alpha},w.createElement(se,{style:{input:a.input,label:a.label},label:"a",value:Math.round(100*e.a),onChange:s,dragLabel:"true",dragMax:"100"})))};class ac extends(w.PureComponent||w.Component){constructor(n){super(n),this.handleChange=e=>{typeof this.props.onChange=="function"&&this.throttle(this.props.onChange,((r,o,u)=>{var a=u.getBoundingClientRect(),s=a.width,i=a.height,c=typeof r.pageX=="number"?r.pageX:r.touches[0].pageX,l=typeof r.pageY=="number"?r.pageY:r.touches[0].pageY,h=c-(u.getBoundingClientRect().left+window.pageXOffset),p=l-(u.getBoundingClientRect().top+window.pageYOffset);h<0?h=0:h>s&&(h=s),p<0?p=0:p>i&&(p=i);var v=h/s,d=1-p/i;return{h:o.h,s:v,v:d,a:o.a,source:"hsv"}})(e,this.props.hsl,this.container),e),e.preventDefault()},this.handleMouseDown=e=>{this.handleChange(e);const r=this.getContainerRenderWindow();r.addEventListener("mousemove",this.handleChange),r.addEventListener("mouseup",this.handleMouseUp)},this.handleMouseUp=e=>{e.preventDefault(),this.unbindEventListeners()},this.throttle=function(e,r,o){let u,a,s,i;var c=0;o||(o={});let l=function(){c=o.leading===!1?0:Date.now(),u=null,i=e.apply(a,s),u||(a=s=null)},h=function(){var p=Date.now();c||o.leading!==!1||(c=p);var v=r-(p-c);return a=this,s=arguments,v<=0||v>r?(u&&(clearTimeout(u),u=null),c=p,i=e.apply(a,s),u||(a=s=null)):u||o.trailing===!1||(u=setTimeout(l,v)),i};return h.cancel=function(){clearTimeout(u),c=0,u=a=s=null},h}((e,r,o)=>{e(r,o)},50)}componentWillUnmount(){this.throttle.cancel(),this.unbindEventListeners()}getContainerRenderWindow(){const{container:n}=this;let e=window;for(;!e.document.contains(n)&&e.parent!==e;)e=e.parent;return e}unbindEventListeners(){const n=this.getContainerRenderWindow();n.removeEventListener("mousemove",this.handleChange),n.removeEventListener("mouseup",this.handleMouseUp)}render(){const{color:n,white:e,black:r,pointer:o,circle:u}=this.props||{},a={position:"absolute",top:"0px",left:"0px",right:"0px",bottom:"0px"},s={color:{...a,backgroundColor:`hsl(${this.props.hsl?.h},100%, 50%)`,borderRadius:this.props.style?.borderRadius},white:{...a,borderRadius:this.props.style?.borderRadius},black:{...a,boxShadow:this.props.style?.boxShadow,borderRadius:this.props.style?.borderRadius},pointer:{...a,top:-100*this.props.hsv?.v+100+"%",left:100*this.props.hsv?.s+"%",cursor:"default"},circle:{width:"4px",height:"4px",boxShadow:`0 0 0 1.5px #fff, inset 0 0 1px 1px rgba(0,0,0,.3),
|
|
33
|
+
0 0 1px 2px rgba(0,0,0,.4)`,borderRadius:"50%",cursor:"hand",transform:"translate(-2px, -2px)"}};return P.jsxs("div",{style:s.color,ref:i=>this.container=i,onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange,children:[P.jsx("style",{children:`
|
|
34
|
+
.saturation-white {
|
|
35
|
+
background: -webkit-linear-gradient(to right, #fff, rgba(255,255,255,0));
|
|
36
|
+
background: linear-gradient(to right, #fff, rgba(255,255,255,0));
|
|
37
|
+
}
|
|
38
|
+
.saturation-black {
|
|
39
|
+
background: -webkit-linear-gradient(to top, #000, rgba(0,0,0,0));
|
|
40
|
+
background: linear-gradient(to top, #000, rgba(0,0,0,0));
|
|
41
|
+
}
|
|
42
|
+
`}),P.jsxs("div",{style:s.white,className:"saturation-white",children:[P.jsx("div",{style:s.black,className:"saturation-black"}),P.jsx("div",{style:s.pointer,children:this.props.pointer?P.jsx(this.props.pointer,{...this.props}):P.jsx("div",{style:s.circle})})]})]})}}const et=(t,n=null)=>{const e=t.hex?_(t.hex):_(t||"transparent"),r=e.toHsl(),o=e.toHsv(),u=e.toRgb(),a=e.toHex();return r.s===0&&(r.h=n??0,o.h=n??0),{hsl:r,hex:"#"+a,rgb:u,hsv:o,source:t.source}},du=w.memo(t=>{const{selectedColor:n,onColorChange:e,renderers:r,disableAlpha:o=!1,style:u=$.io.EmptyCssProperties,...a}=t,s=$.useTheme(),[i,c]=w.useState(()=>et(n)),[l,h]=w.useState(i.hsl.h??0),p=w.useCallback(f=>{let b=et(f,l);return h(b.hsl.h??0),c(b),b},[l]),v=w.useCallback(f=>{const b=p(f),g=`rgba(${b.rgb.r},${b.rgb.g},${b.rgb.b},${o?1:b.rgb.a})`;e?.(g)},[e,p,o]);w.useLayoutEffect(()=>{p(n)},[n,p]);const d=P.jsx("div",{style:{position:"relative",minHeight:"10px",maxHeight:"10px",width:"100%"},children:P.jsx(Ls,{style:{radius:"2px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},rgb:i.rgb,hsl:i.hsl,renderers:r,onChange:v})});return P.jsxs("div",{style:{display:"flex",flexDirection:"column",...u},...a,children:[P.jsx("div",{style:{width:"100%",flex:"1 1 100%",position:"relative",overflow:"hidden"},children:P.jsx(ac,{style:{borderRadius:"3px",boxShadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},hsl:i.hsl,hsv:i.hsv,onChange:v})}),P.jsxs("div",{style:{marginTop:"4px",display:"flex",gap:"4px"},children:[P.jsxs("div",{style:{flex:"1",display:"flex",flexDirection:o?"row":"column",justifyContent:"space-between",alignItems:"center"},children:[P.jsx("div",{style:{position:"relative",minHeight:"10px",maxHeight:"10px",width:"100%"},children:P.jsx(zs,{style:{radius:"2px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},hsl:i.hsl,onChange:v})}),o?null:d]}),P.jsxs("div",{style:{minWidth:"24px",maxWidth:"24px",minHeight:"24px",maxHeight:"24px",position:"relative",borderRadius:"1px",overflow:"hidden"},children:[P.jsx($.Checkboard,{grey:s.palette.text.icon??s.palette.action.active}),P.jsx("div",{style:{position:"absolute",height:"100%",width:"100%",background:`rgba(${i.rgb.r},${i.rgb.g},${i.rgb.b},${o?1:i.rgb.a})`,boxShadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"}})]})]}),P.jsx(Nu.Box,{sx:{marginBottom:"4px","& label":{fontFamily:f=>`${f.typography.fontFamily} !important`,color:f=>`${f.palette.text.secondary} !important`},"& *":{fontFamily:f=>`${f.typography.fontFamily} !important`,userSelect:"none"},"& input":{paddingLeft:f=>`${f.spacing(.5)} !important`,paddingRight:f=>`${f.spacing(.5)} !important`,outline:"none",boxSizing:"border-box",width:"100% !important",textAlign:"center"}},children:P.jsx(ic,{rgb:i.rgb,hsl:i.hsl,hex:i.hex,disableAlpha:o,onChange:v})})]})});exports.CustomColorPanel=du,exports.default=du,exports.toState=et;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";/**
|
|
2
|
+
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.4.15
|
|
3
|
+
*
|
|
4
|
+
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
5
|
+
* License: The license can be found at https://www.sheetxl.com/license.
|
|
6
|
+
*/Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("@sheetxl/sdk"),Ke=require("./DpZ5HlIMG95q2uIe.cjs"),Ye=":A-Z_a-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-⁰-Ⰰ-、-豈-﷏ﷰ-�𐀀-",bs=new RegExp(`^[${Ye}][-${Ye}.0-9·̀-ͯ‿-⁀]*$`,"u");function rs(i){return i>=65&&i<=90||i>=97&&i<=122||i===58||i===95||i===8204||i===8205||i>=192&&i<=214||i>=216&&i<=246||i>=248&&i<=767||i>=880&&i<=893||i>=895&&i<=8191||i>=8304&&i<=8591||i>=11264&&i<=12271||i>=12289&&i<=55295||i>=63744&&i<=64975||i>=65008&&i<=65533||i>=65536&&i<=983039}const ts="A-Z_a-zÀ-ÖØ-öø-˿Ͱ-ͽͿ--⁰-Ⰰ-、-豈-﷏ﷰ-�𐀀-",xs=new RegExp(`^[${ts}][-${ts}.0-9·̀-ͯ‿-⁀]*$`,"u");function ns(i){return i>=65&&i<=90||i===95||i>=97&&i<=122||i>=192&&i<=214||i>=216&&i<=246||i>=248&&i<=767||i>=880&&i<=893||i>=895&&i<=8191||i>=8204&&i<=8205||i>=8304&&i<=8591||i>=11264&&i<=12271||i>=12289&&i<=55295||i>=63744&&i<=64975||i>=65008&&i<=65533||i>=65536&&i<=983039}const U=function(i){return i===32||i===10||i===13||i===9},ws=function(i){return i>=32&&i<=55295||i===10||i===13||i===9||i>=57344&&i<=65533||i>=65536&&i<=1114111},re=rs,es=function(i){return rs(i)||i>=48&&i<=57||i===45||i===46||i===183||i>=768&&i<=879||i>=8255&&i<=8256},as=[32,10,13,9],vs=bs,Ss=function(i){return i>=1&&i<=55295||i>=57344&&i<=65533||i>=65536&&i<=1114111},Cs=ns,ks=function(i){return ns(i)||i===45||i===46||i>=48&&i<=57||i===183||i>=768&&i<=879||i>=8255&&i<=8256},As=xs,ge="http://www.w3.org/XML/1998/namespace",Jt="http://www.w3.org/2000/xmlns/",Es={__proto__:null,xml:ge,xmlns:Jt},Ds={__proto__:null,amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},O=-1,lt=-2,W=13,jt=33,ot=10,St=60,Gt=61,M=62,X=63,Zt=93,pe=i=>i===34||i===39,ls=[34,39],Ps=[...ls,91,M],Is=[...ls,St,Zt],Os=[Gt,X,...as],Vs=[...as,M,38,St];function ke(i,t,s){switch(t){case"xml":s!==ge&&i.fail(`xml prefix must be bound to ${ge}.`);break;case"xmlns":s!==Jt&&i.fail(`xmlns prefix must be bound to ${Jt}.`)}switch(s){case Jt:i.fail(t===""?`the default namespace may not be set to ${s}.`:`may not assign a prefix (even "xmlns") to the URI ${Jt}.`);break;case ge:switch(t){case"xml":break;case"":i.fail(`the default namespace may not be set to ${s}.`);break;default:i.fail("may not assign the xml namespace to another prefix.")}}}const Ns=i=>As.test(i),Ls=i=>vs.test(i),ss={xmldecl:"xmldeclHandler",text:"textHandler",processinginstruction:"piHandler",doctype:"doctypeHandler",comment:"commentHandler",opentagstart:"openTagStartHandler",attribute:"attributeHandler",opentag:"openTagHandler",closetag:"closeTagHandler",cdata:"cdataHandler",error:"errorHandler",end:"endHandler",ready:"readyHandler"};class Rs{constructor(t){this.i=0,this.prevI=0,this.opt=t??{},this.fragmentOpt=!!this.opt.fragment;const s=this.xmlnsOpt=!!this.opt.xmlns;if(this.trackPosition=this.opt.position!==!1,this.fileName=this.opt.fileName,s){this.nameStartCheck=Cs,this.nameCheck=ks,this.isName=Ns,this.processAttribs=this.processAttribsNS,this.pushAttrib=this.pushAttribNS,this.ns={__proto__:null,...Es};const o=this.opt.additionalNamespaces;o!=null&&(function(n,a){for(const c of Object.keys(a))ke(n,c,a[c])}(this,o),Object.assign(this.ns,o))}else this.nameStartCheck=re,this.nameCheck=es,this.isName=Ls,this.processAttribs=this.processAttribsPlain,this.pushAttrib=this.pushAttribPlain;this.stateTable=[this.sBegin,this.sBeginWhitespace,this.sDoctype,this.sDoctypeQuote,this.sDTD,this.sDTDQuoted,this.sDTDOpenWaka,this.sDTDOpenWakaBang,this.sDTDComment,this.sDTDCommentEnding,this.sDTDCommentEnded,this.sDTDPI,this.sDTDPIEnding,this.sText,this.sEntity,this.sOpenWaka,this.sOpenWakaBang,this.sComment,this.sCommentEnding,this.sCommentEnded,this.sCData,this.sCDataEnding,this.sCDataEnding2,this.sPIFirstChar,this.sPIRest,this.sPIBody,this.sPIEnding,this.sXMLDeclNameStart,this.sXMLDeclName,this.sXMLDeclEq,this.sXMLDeclValueStart,this.sXMLDeclValue,this.sXMLDeclSeparator,this.sXMLDeclEnding,this.sOpenTag,this.sOpenTagSlash,this.sAttrib,this.sAttribName,this.sAttribNameSawWhite,this.sAttribValue,this.sAttribValueQuoted,this.sAttribValueClosed,this.sAttribValueUnquoted,this.sCloseTag,this.sCloseTagSawWhite],this._init()}get closed(){return this._closed}_init(){this.openWakaBang="",this.text="",this.name="",this.piTarget="",this.entity="",this.q=null,this.tags=[],this.tag=null,this.topNS=null,this.chunk="",this.chunkPosition=0,this.i=0,this.prevI=0,this.carriedFromPrevious=void 0,this.forbiddenState=0,this.attribList=[];const{fragmentOpt:t}=this;this.state=t?W:0,this.reportedTextBeforeRoot=this.reportedTextAfterRoot=this.closedRoot=this.sawRoot=t,this.xmlDeclPossible=!t,this.xmlDeclExpects=["version"],this.entityReturnState=void 0;let{defaultXMLVersion:s}=this.opt;if(s===void 0){if(this.opt.forceXMLVersion===!0)throw new Error("forceXMLVersion set but defaultXMLVersion is not set");s="1.0"}this.setXMLVersion(s),this.positionAtNewLine=0,this.doctype=!1,this._closed=!1,this.xmlDecl={version:void 0,encoding:void 0,standalone:void 0},this.line=1,this.column=0,this.ENTITIES=Object.create(Ds),this.readyHandler?.()}get position(){return this.chunkPosition+this.i}get columnIndex(){return this.position-this.positionAtNewLine}on(t,s){this[ss[t]]=s}off(t){this[ss[t]]=void 0}makeError(t){let s=this.fileName??"";return this.trackPosition&&(s.length>0&&(s+=":"),s+=`${this.line}:${this.column}`),s.length>0&&(s+=": "),new Error(s+t)}fail(t){const s=this.makeError(t),o=this.errorHandler;if(o===void 0)throw s;return o(s),this}write(t){if(this.closed)return this.fail("cannot write after close; assign an onready handler.");let s=!1;t===null?(s=!0,t=""):typeof t=="object"&&(t=t.toString()),this.carriedFromPrevious!==void 0&&(t=`${this.carriedFromPrevious}${t}`,this.carriedFromPrevious=void 0);let o=t.length;const n=t.charCodeAt(o-1);!s&&(n===13||n>=55296&&n<=56319)&&(this.carriedFromPrevious=t[o-1],o--,t=t.slice(0,o));const{stateTable:a}=this;for(this.chunk=t,this.i=0;this.i<o;)a[this.state].call(this);return this.chunkPosition+=o,s?this.end():this}close(){return this.write(null)}getCode10(){const t=this.chunk,s=this.i;if(this.prevI=s,this.i++,s>=t.length)return O;const o=t.charCodeAt(s);if(this.column++,o<55296){if(o>=32||o===9)return o;switch(o){case ot:return this.line++,this.column=0,this.positionAtNewLine=this.position,ot;case 13:return t.charCodeAt(s+1)===ot&&(this.i=s+2),this.line++,this.column=0,this.positionAtNewLine=this.position,lt;default:return this.fail("disallowed character."),o}}if(o>56319)return o>=57344&&o<=65533||this.fail("disallowed character."),o;const n=65536+1024*(o-55296)+(t.charCodeAt(s+1)-56320);return this.i=s+2,n>1114111&&this.fail("disallowed character."),n}getCode11(){const{chunk:t,i:s}=this;if(this.prevI=s,this.i=s+1,s>=t.length)return O;const o=t.charCodeAt(s);if(this.column++,o<55296){if(o>31&&o<127||o>159&&o!==8232||o===9)return o;switch(o){case ot:return this.line++,this.column=0,this.positionAtNewLine=this.position,ot;case 13:{const a=t.charCodeAt(s+1);a!==ot&&a!==133||(this.i=s+2)}case 133:case 8232:return this.line++,this.column=0,this.positionAtNewLine=this.position,lt;default:return this.fail("disallowed character."),o}}if(o>56319)return o>=57344&&o<=65533||this.fail("disallowed character."),o;const n=65536+1024*(o-55296)+(t.charCodeAt(s+1)-56320);return this.i=s+2,n>1114111&&this.fail("disallowed character."),n}getCodeNorm(){const t=this.getCode();return t===lt?ot:t}unget(){this.i=this.prevI,this.column--}captureTo(t){let{i:s}=this;const{chunk:o}=this;for(;;){const n=this.getCode(),a=n===lt,c=a?ot:n;if(c===O||t.includes(c))return this.text+=o.slice(s,this.prevI),c;a&&(this.text+=`${o.slice(s,this.prevI)}
|
|
7
|
+
`,s=this.i)}}captureToChar(t){let{i:s}=this;const{chunk:o}=this;for(;;){let n=this.getCode();switch(n){case lt:this.text+=`${o.slice(s,this.prevI)}
|
|
8
|
+
`,s=this.i,n=ot;break;case O:return this.text+=o.slice(s),!1}if(n===t)return this.text+=o.slice(s,this.prevI),!0}}captureNameChars(){const{chunk:t,i:s}=this;for(;;){const o=this.getCode();if(o===O)return this.name+=t.slice(s),O;if(!es(o))return this.name+=t.slice(s,this.prevI),o===lt?ot:o}}skipSpaces(){for(;;){const t=this.getCodeNorm();if(t===O||!U(t))return t}}setXMLVersion(t){this.currentXMLVersion=t,t==="1.0"?(this.isChar=ws,this.getCode=this.getCode10):(this.isChar=Ss,this.getCode=this.getCode11)}sBegin(){this.chunk.charCodeAt(0)===65279&&(this.i++,this.column++),this.state=1}sBeginWhitespace(){const t=this.i,s=this.skipSpaces();switch(this.prevI!==t&&(this.xmlDeclPossible=!1),s){case St:if(this.state=15,this.text.length!==0)throw new Error("no-empty text at start");break;case O:break;default:this.unget(),this.state=W,this.xmlDeclPossible=!1}}sDoctype(){const t=this.captureTo(Ps);switch(t){case M:this.doctypeHandler?.(this.text),this.text="",this.state=W,this.doctype=!0;break;case O:break;default:this.text+=String.fromCodePoint(t),t===91?this.state=4:pe(t)&&(this.state=3,this.q=t)}}sDoctypeQuote(){const t=this.q;this.captureToChar(t)&&(this.text+=String.fromCodePoint(t),this.q=null,this.state=2)}sDTD(){const t=this.captureTo(Is);t!==O&&(this.text+=String.fromCodePoint(t),t===Zt?this.state=2:t===St?this.state=6:pe(t)&&(this.state=5,this.q=t))}sDTDQuoted(){const t=this.q;this.captureToChar(t)&&(this.text+=String.fromCodePoint(t),this.state=4,this.q=null)}sDTDOpenWaka(){const t=this.getCodeNorm();switch(this.text+=String.fromCodePoint(t),t){case 33:this.state=7,this.openWakaBang="";break;case X:this.state=11;break;default:this.state=4}}sDTDOpenWakaBang(){const t=String.fromCodePoint(this.getCodeNorm()),s=this.openWakaBang+=t;this.text+=t,s!=="-"&&(this.state=s==="--"?8:4,this.openWakaBang="")}sDTDComment(){this.captureToChar(45)&&(this.text+="-",this.state=9)}sDTDCommentEnding(){const t=this.getCodeNorm();this.text+=String.fromCodePoint(t),this.state=t===45?10:8}sDTDCommentEnded(){const t=this.getCodeNorm();this.text+=String.fromCodePoint(t),t===M?this.state=4:(this.fail("malformed comment."),this.state=8)}sDTDPI(){this.captureToChar(X)&&(this.text+="?",this.state=12)}sDTDPIEnding(){const t=this.getCodeNorm();this.text+=String.fromCodePoint(t),t===M&&(this.state=4)}sText(){this.tags.length!==0?this.handleTextInRoot():this.handleTextOutsideRoot()}sEntity(){let{i:t}=this;const{chunk:s}=this;t:for(;;)switch(this.getCode()){case lt:this.entity+=`${s.slice(t,this.prevI)}
|
|
9
|
+
`,t=this.i;break;case 59:{const{entityReturnState:o}=this,n=this.entity+s.slice(t,this.prevI);let a;this.state=o,n===""?(this.fail("empty entity name."),a="&;"):(a=this.parseEntity(n),this.entity=""),o===W&&this.textHandler===void 0||(this.text+=a);break t}case O:this.entity+=s.slice(t);break t}}sOpenWaka(){const t=this.getCode();if(re(t))this.state=34,this.unget(),this.xmlDeclPossible=!1;else switch(t){case 47:this.state=43,this.xmlDeclPossible=!1;break;case 33:this.state=16,this.openWakaBang="",this.xmlDeclPossible=!1;break;case X:this.state=23;break;default:this.fail("disallowed character in tag name"),this.state=W,this.xmlDeclPossible=!1}}sOpenWakaBang(){switch(this.openWakaBang+=String.fromCodePoint(this.getCodeNorm()),this.openWakaBang){case"[CDATA[":this.sawRoot||this.reportedTextBeforeRoot||(this.fail("text data outside of root node."),this.reportedTextBeforeRoot=!0),this.closedRoot&&!this.reportedTextAfterRoot&&(this.fail("text data outside of root node."),this.reportedTextAfterRoot=!0),this.state=20,this.openWakaBang="";break;case"--":this.state=17,this.openWakaBang="";break;case"DOCTYPE":this.state=2,(this.doctype||this.sawRoot)&&this.fail("inappropriately located doctype declaration."),this.openWakaBang="";break;default:this.openWakaBang.length>=7&&this.fail("incorrect syntax.")}}sComment(){this.captureToChar(45)&&(this.state=18)}sCommentEnding(){const t=this.getCodeNorm();t===45?(this.state=19,this.commentHandler?.(this.text),this.text=""):(this.text+=`-${String.fromCodePoint(t)}`,this.state=17)}sCommentEnded(){const t=this.getCodeNorm();t!==M?(this.fail("malformed comment."),this.text+=`--${String.fromCodePoint(t)}`,this.state=17):this.state=W}sCData(){this.captureToChar(Zt)&&(this.state=21)}sCDataEnding(){const t=this.getCodeNorm();t===Zt?this.state=22:(this.text+=`]${String.fromCodePoint(t)}`,this.state=20)}sCDataEnding2(){const t=this.getCodeNorm();switch(t){case M:this.cdataHandler?.(this.text),this.text="",this.state=W;break;case Zt:this.text+="]";break;default:this.text+=`]]${String.fromCodePoint(t)}`,this.state=20}}sPIFirstChar(){const t=this.getCodeNorm();this.nameStartCheck(t)?(this.piTarget+=String.fromCodePoint(t),this.state=24):t===X||U(t)?(this.fail("processing instruction without a target."),this.state=t===X?26:25):(this.fail("disallowed character in processing instruction name."),this.piTarget+=String.fromCodePoint(t),this.state=24)}sPIRest(){const{chunk:t,i:s}=this;for(;;){const o=this.getCodeNorm();if(o===O)return void(this.piTarget+=t.slice(s));if(!this.nameCheck(o)){this.piTarget+=t.slice(s,this.prevI);const n=o===X;n||U(o)?this.piTarget==="xml"?(this.xmlDeclPossible||this.fail("an XML declaration must be at the start of the document."),this.state=n?jt:27):this.state=n?26:25:(this.fail("disallowed character in processing instruction name."),this.piTarget+=String.fromCodePoint(o));break}}}sPIBody(){if(this.text.length===0){const t=this.getCodeNorm();t===X?this.state=26:U(t)||(this.text=String.fromCodePoint(t))}else this.captureToChar(X)&&(this.state=26)}sPIEnding(){const t=this.getCodeNorm();if(t===M){const{piTarget:s}=this;s.toLowerCase()==="xml"&&this.fail("the XML declaration must appear at the start of the document."),this.piHandler?.({target:s,body:this.text}),this.piTarget=this.text="",this.state=W}else t===X?this.text+="?":(this.text+=`?${String.fromCodePoint(t)}`,this.state=25);this.xmlDeclPossible=!1}sXMLDeclNameStart(){const t=this.skipSpaces();t!==X?t!==O&&(this.state=28,this.name=String.fromCodePoint(t)):this.state=jt}sXMLDeclName(){const t=this.captureTo(Os);if(t===X)return this.state=jt,this.name+=this.text,this.text="",void this.fail("XML declaration is incomplete.");if(U(t)||t===Gt){if(this.name+=this.text,this.text="",!this.xmlDeclExpects.includes(this.name))switch(this.name.length){case 0:this.fail("did not expect any more name/value pairs.");break;case 1:this.fail(`expected the name ${this.xmlDeclExpects[0]}.`);break;default:this.fail(`expected one of ${this.xmlDeclExpects.join(", ")}`)}this.state=t===Gt?30:29}}sXMLDeclEq(){const t=this.getCodeNorm();if(t===X)return this.state=jt,void this.fail("XML declaration is incomplete.");U(t)||(t!==Gt&&this.fail("value required."),this.state=30)}sXMLDeclValueStart(){const t=this.getCodeNorm();if(t===X)return this.state=jt,void this.fail("XML declaration is incomplete.");U(t)||(pe(t)?this.q=t:(this.fail("value must be quoted."),this.q=32),this.state=31)}sXMLDeclValue(){const t=this.captureTo([this.q,X]);if(t===X)return this.state=jt,this.text="",void this.fail("XML declaration is incomplete.");if(t===O)return;const s=this.text;switch(this.text="",this.name){case"version":{this.xmlDeclExpects=["encoding","standalone"];const o=s;this.xmlDecl.version=o,/^1\.[0-9]+$/.test(o)?this.opt.forceXMLVersion||this.setXMLVersion(o):this.fail("version number must match /^1\\.[0-9]+$/.");break}case"encoding":/^[A-Za-z][A-Za-z0-9._-]*$/.test(s)||this.fail("encoding value must match /^[A-Za-z0-9][A-Za-z0-9._-]*$/."),this.xmlDeclExpects=["standalone"],this.xmlDecl.encoding=s;break;case"standalone":s!=="yes"&&s!=="no"&&this.fail('standalone value must match "yes" or "no".'),this.xmlDeclExpects=[],this.xmlDecl.standalone=s}this.name="",this.state=32}sXMLDeclSeparator(){const t=this.getCodeNorm();t!==X?(U(t)||(this.fail("whitespace required."),this.unget()),this.state=27):this.state=jt}sXMLDeclEnding(){this.getCodeNorm()===M?(this.piTarget!=="xml"?this.fail("processing instructions are not allowed before root."):this.name!=="version"&&this.xmlDeclExpects.includes("version")&&this.fail("XML declaration must contain a version."),this.xmldeclHandler?.(this.xmlDecl),this.name="",this.piTarget=this.text="",this.state=W):this.fail("The character ? is disallowed anywhere in XML declarations."),this.xmlDeclPossible=!1}sOpenTag(){const t=this.captureNameChars();if(t===O)return;const s=this.tag={name:this.name,attributes:Object.create(null)};switch(this.name="",this.xmlnsOpt&&(this.topNS=s.ns=Object.create(null)),this.openTagStartHandler?.(s),this.sawRoot=!0,!this.fragmentOpt&&this.closedRoot&&this.fail("documents may contain only one root."),t){case M:this.openTag();break;case 47:this.state=35;break;default:U(t)||this.fail("disallowed character in tag name."),this.state=36}}sOpenTagSlash(){this.getCode()===M?this.openSelfClosingTag():(this.fail("forward-slash in opening tag not followed by >."),this.state=36)}sAttrib(){const t=this.skipSpaces();t!==O&&(re(t)?(this.unget(),this.state=37):t===M?this.openTag():t===47?this.state=35:this.fail("disallowed character in attribute name."))}sAttribName(){const t=this.captureNameChars();t===Gt?this.state=39:U(t)?this.state=38:t===M?(this.fail("attribute without value."),this.pushAttrib(this.name,this.name),this.name=this.text="",this.openTag()):t!==O&&this.fail("disallowed character in attribute name.")}sAttribNameSawWhite(){const t=this.skipSpaces();switch(t){case O:return;case Gt:this.state=39;break;default:this.fail("attribute without value."),this.text="",this.name="",t===M?this.openTag():re(t)?(this.unget(),this.state=37):(this.fail("disallowed character in attribute name."),this.state=36)}}sAttribValue(){const t=this.getCodeNorm();pe(t)?(this.q=t,this.state=40):U(t)||(this.fail("unquoted attribute value."),this.state=42,this.unget())}sAttribValueQuoted(){const{q:t,chunk:s}=this;let{i:o}=this;for(;;)switch(this.getCode()){case t:return this.pushAttrib(this.name,this.text+s.slice(o,this.prevI)),this.name=this.text="",this.q=null,void(this.state=41);case 38:return this.text+=s.slice(o,this.prevI),this.state=14,void(this.entityReturnState=40);case ot:case lt:case 9:this.text+=`${s.slice(o,this.prevI)} `,o=this.i;break;case St:return this.text+=s.slice(o,this.prevI),void this.fail("disallowed character.");case O:return void(this.text+=s.slice(o))}}sAttribValueClosed(){const t=this.getCodeNorm();U(t)?this.state=36:t===M?this.openTag():t===47?this.state=35:re(t)?(this.fail("no whitespace between attributes."),this.unget(),this.state=37):this.fail("disallowed character in attribute name.")}sAttribValueUnquoted(){const t=this.captureTo(Vs);switch(t){case 38:this.state=14,this.entityReturnState=42;break;case St:this.fail("disallowed character.");break;case O:break;default:this.text.includes("]]>")&&this.fail('the string "]]>" is disallowed in char data.'),this.pushAttrib(this.name,this.text),this.name=this.text="",t===M?this.openTag():this.state=36}}sCloseTag(){const t=this.captureNameChars();t===M?this.closeTag():U(t)?this.state=44:t!==O&&this.fail("disallowed character in closing tag.")}sCloseTagSawWhite(){switch(this.skipSpaces()){case M:this.closeTag();break;case O:break;default:this.fail("disallowed character in closing tag.")}}handleTextInRoot(){let{i:t,forbiddenState:s}=this;const{chunk:o,textHandler:n}=this;t:for(;;)switch(this.getCode()){case St:if(this.state=15,n!==void 0){const{text:a}=this,c=o.slice(t,this.prevI);a.length!==0?(n(a+c),this.text=""):c.length!==0&&n(c)}s=0;break t;case 38:this.state=14,this.entityReturnState=W,n!==void 0&&(this.text+=o.slice(t,this.prevI)),s=0;break t;case Zt:switch(s){case 0:s=1;break;case 1:s=2;break;case 2:break;default:throw new Error("impossible state")}break;case M:s===2&&this.fail('the string "]]>" is disallowed in char data.'),s=0;break;case lt:n!==void 0&&(this.text+=`${o.slice(t,this.prevI)}
|
|
10
|
+
`),t=this.i,s=0;break;case O:n!==void 0&&(this.text+=o.slice(t));break t;default:s=0}this.forbiddenState=s}handleTextOutsideRoot(){let{i:t}=this;const{chunk:s,textHandler:o}=this;let n=!1;t:for(;;){const a=this.getCode();switch(a){case St:if(this.state=15,o!==void 0){const{text:c}=this,T=s.slice(t,this.prevI);c.length!==0?(o(c+T),this.text=""):T.length!==0&&o(T)}break t;case 38:this.state=14,this.entityReturnState=W,o!==void 0&&(this.text+=s.slice(t,this.prevI)),n=!0;break t;case lt:o!==void 0&&(this.text+=`${s.slice(t,this.prevI)}
|
|
11
|
+
`),t=this.i;break;case O:o!==void 0&&(this.text+=s.slice(t));break t;default:U(a)||(n=!0)}}n&&(this.sawRoot||this.reportedTextBeforeRoot||(this.fail("text data outside of root node."),this.reportedTextBeforeRoot=!0),this.closedRoot&&!this.reportedTextAfterRoot&&(this.fail("text data outside of root node."),this.reportedTextAfterRoot=!0))}pushAttribNS(t,s){const{prefix:o,local:n}=this.qname(t),a={name:t,prefix:o,local:n,value:s};if(this.attribList.push(a),this.attributeHandler?.(a),o==="xmlns"){const c=s.trim();this.currentXMLVersion==="1.0"&&c===""&&this.fail("invalid attempt to undefine prefix in XML 1.0"),this.topNS[n]=c,ke(this,n,c)}else if(t==="xmlns"){const c=s.trim();this.topNS[""]=c,ke(this,"",c)}}pushAttribPlain(t,s){const o={name:t,value:s};this.attribList.push(o),this.attributeHandler?.(o)}end(){this.sawRoot||this.fail("document must contain a root element.");const{tags:t}=this;for(;t.length>0;){const o=t.pop();this.fail(`unclosed tag: ${o.name}`)}this.state!==0&&this.state!==W&&this.fail("unexpected end.");const{text:s}=this;return s.length!==0&&(this.textHandler?.(s),this.text=""),this._closed=!0,this.endHandler?.(),this._init(),this}resolve(t){let s=this.topNS[t];if(s!==void 0)return s;const{tags:o}=this;for(let n=o.length-1;n>=0;n--)if(s=o[n].ns[t],s!==void 0)return s;return s=this.ns[t],s!==void 0?s:this.opt.resolvePrefix?.(t)}qname(t){const s=t.indexOf(":");if(s===-1)return{prefix:"",local:t};const o=t.slice(s+1),n=t.slice(0,s);return(n===""||o===""||o.includes(":"))&&this.fail(`malformed name: ${t}.`),{prefix:n,local:o}}processAttribsNS(){const{attribList:t}=this,s=this.tag;{const{prefix:a,local:c}=this.qname(s.name);s.prefix=a,s.local=c;const T=s.uri=this.resolve(a)??"";a!==""&&(a==="xmlns"&&this.fail('tags may not have "xmlns" as prefix.'),T===""&&(this.fail(`unbound namespace prefix: ${JSON.stringify(a)}.`),s.uri=a))}if(t.length===0)return;const{attributes:o}=s,n=new Set;for(const a of t){const{name:c,prefix:T,local:S}=a;let x,w;T===""?(x=c==="xmlns"?Jt:"",w=c):(x=this.resolve(T),x===void 0&&(this.fail(`unbound namespace prefix: ${JSON.stringify(T)}.`),x=T),w=`{${x}}${S}`),n.has(w)&&this.fail(`duplicate attribute: ${w}.`),n.add(w),a.uri=x,o[c]=a}this.attribList=[]}processAttribsPlain(){const{attribList:t}=this,s=this.tag.attributes;for(const{name:o,value:n}of t)s[o]!==void 0&&this.fail(`duplicate attribute: ${o}.`),s[o]=n;this.attribList=[]}openTag(){this.processAttribs();const{tags:t}=this,s=this.tag;s.isSelfClosing=!1,this.openTagHandler?.(s),t.push(s),this.state=W,this.name=""}openSelfClosingTag(){this.processAttribs();const{tags:t}=this,s=this.tag;s.isSelfClosing=!0,this.openTagHandler?.(s),this.closeTagHandler?.(s),(this.tag=t[t.length-1]??null)===null&&(this.closedRoot=!0),this.state=W,this.name=""}closeTag(){const{tags:t,name:s}=this;if(this.state=W,this.name="",s==="")return this.fail("weird empty close tag."),void(this.text+="</>");const o=this.closeTagHandler;let n=t.length;for(;n-- >0;){const a=this.tag=t.pop();if(this.topNS=a.ns,o?.(a),a.name===s)break;this.fail("unexpected close tag.")}n===0?this.closedRoot=!0:n<0&&(this.fail(`unmatched closing tag: ${s}.`),this.text+=`</${s}>`)}parseEntity(t){if(t[0]!=="#"){const o=this.ENTITIES[t];return o!==void 0?o:(this.fail(this.isName(t)?"undefined entity.":"disallowed character in entity name."),`&${t};`)}let s=NaN;return t[1]==="x"&&/^#x[0-9a-f]+$/i.test(t)?s=parseInt(t.slice(2),16):/^#[0-9]+$/.test(t)&&(s=parseInt(t.slice(1),10)),this.isChar(s)?String.fromCodePoint(s):(this.fail("malformed character entity."),`&${t};`)}}var Ae,Tt;(Tt=Ae||(Ae={})).Events={XmlDecl:"xmldecl",Text:"text",ProcessingInstruction:"processinginstruction",Doctype:"doctype",Comment:"comment",OpenTagStart:"opentagstart",Attribute:"attribute",OpenTag:"opentag",CloseTag:"closetag",CDdata:"cdata",Error:"error",End:"end",Ready:"ready"},Tt.parseStream=async(i,t,s)=>{const o=new Rs({position:!1,...s});let n;if(t.onOpenTagStart&&o.on(Tt.Events.OpenTagStart,t.onOpenTagStart),t.onOpenTag&&o.on(Tt.Events.OpenTag,t.onOpenTag),t.onCloseTag&&o.on(Tt.Events.CloseTag,t.onCloseTag),t.onAttribute&&o.on(Tt.Events.Attribute,t.onAttribute),t.onText&&o.on(Tt.Events.Text,t.onText),t.onError&&o.on(Tt.Events.Error,t.onError),t.onEnd){t.onEnd;const a=()=>{n=t.onEnd()};o.on(Tt.Events.End,a)}for(;;){const{value:a,done:c}=await i.read();if(c)break;o.write(a)}return o.close(),n};const v=i=>i===!0||i==="1"||i==="on"||i==="true"||i!==!1&&i!=="0"&&i!=="off"&&i!=="false"&&null,E=i=>{const t=parseInt(i);return isNaN(t)?null:t},ct=i=>{const t=parseFloat(i);return isNaN(t)?null:t},A=null;class $s{constructor(){this._registeredVisitors=new Map}registerVisitor(t){this._registeredVisitors.set(t.from,t)}createEventHandler(t,s,o){const n=this._registeredVisitors,a=[];let c=null,T=null,S=null,x=null;const w=[],D={key:null,source:t};let b=null,d=!1;const P=(y,m)=>{let V=S.attributes[y];if(m){if(Array.isArray(m)){for(let H=0;H<m.length;H++)if(V==null||(V=m[H](V),V==null))return}else if(V==null||(V=m(V),V==null))return}return V},f={getSource:()=>b.source,setSource:y=>{b.source=y},setKey:y=>{b.key=y},getFrom:()=>S,getAttribute:(y,m)=>P(y,m)??null,hasAttribute:y=>f.getAttribute(y)!==null,getParent:()=>w[w.length-2].source,getPath:()=>{const y=[];for(let m=0;m<a.length;m++)y.push(a[m].local);return y.join("\\")},parseAttribute:P,copyToObject:(y,m,V,H)=>{const q=P(H??m,V);q!==void 0&&(y[m]=q)},copyTo:(y,m,V)=>{const H=P(V??y,m);H!==void 0&&(b.source[y]=H)},warn:y=>{o?o?.(y):console.warn(y)}};return{onOpenTag:y=>{let m=y.name;const V=m.indexOf(":");V!==-1&&(m=m.slice(V+1));const H=n.get(m);if(c={local:m,visitor:H,tag:y,destination:null},d)return a.push(c),T=m,void(S=y);x=c?.visitor??null,H&&(b=a.length===0?D:x?.to!==null?{key:null,source:{}}:null,c.destination=b,b&&w.push(b)),a.push(c),T=m,S=y,d=x?.to===null,x?.openTag?.(f)},onCloseTag:y=>{let m=y.name;const V=m.indexOf(":");if(V!==-1&&(m=m.slice(V+1)),m!==T)throw new Error(`mismatch open/close tag: '${m}'/'${T}'`);d||x?.closeTag?.(f);const H=a.pop()??null;c=a[a.length-1]??null;const q=H?.destination;if(q){w.pop(),b=w[w.length-1]??D;const ht=H.visitor;ht&&ht.to&&q.source!==void 0&&(Array.isArray(ht.to)?b.source.push?b.source.push(q.source):o?.(`Unable to parse array for ${ht.from} at ${f.getPath()}`):q.key?b.source[q.key]=q.source:typeof ht.to=="string"&&(b.source[ht.to]=q.source))}T=c?.local??null,S=c?.tag??null,x=c?.visitor??null,d=!c?.destination},onText:y=>{x?.text?.(y,f)},onEnd:s}}}const is=(i,t,s,o=null)=>{if(!i)return null;let n=i;n.startsWith("/")&&(n=n.substring(1));let a=o?.parsedRefs?.get(i);if(a!==void 0)return a;const c=t(n);if(!c)return null;let T=c.content;try{s&&(T=s(T))}catch(S){console.warn(S)}return o?.parsedRefs?.set(i,T),T},Ee=(i,t,s,o,n=null)=>{if(!i)return null;let a=i;a.startsWith("/")&&(a=a.substring(1));let c=n?.parsedRefs?.get(i);if(c!==void 0)return c;const T=t(a);if(!T)return null;const S=T.content;try{const x=new TextDecoder().decode(S),w=s.parseFromString(x,"text/xml"),D=o.convert(w,i,n);return n?.parsedRefs?.set(i,D),D}catch(x){console.warn(x)}return null},zt=(i,t,s,o,n=null)=>{const a=new Map;let c=t.Directory[i];const T=c?c.length:0;for(let S=0;S<T;S++){const x=c[S];if(!x)continue;let w=x;w.startsWith("/")&&(w=w.substring(1));const D=Ee(w,b=>t.files[b],s,o,n);a.set(w,D)}return a},Fs=["lt1","dk1","lt2","dk2","accent1","accent2","accent3","accent4","accent5","accent6","hlink","folHlink"],De=(i,t="dk1")=>{let s;const o=i("auto");o===void 0||o!=="1"&&o!=="true"||(s=t);const n=i("indexed");n&&(s=`index${n}`);const a=i("rgb");a&&(s=a.toLowerCase(),a.length!==8||a.startsWith("FF")||(s="FF"+a.substring(2,a.length)));const c=i("theme");c&&(s=Fs[c]);let T=i("tint");if(T&&(s+=` ${u.IColor.AdjustmentType.ETint} ${parseFloat(T)}`),s)return s},cs=i=>i&&i.replace(/^\{([\s\S]+)\}$/,"$1"),hs=i=>i==="true"||i==="1";class Ht{static{this.Collapsed=1}static{this.CustomFormat=2}static{this.CustomHeight=4}static{this.Hidden=8}static{this.Ht=16}static{this.OutlineLevel=32}static{this.Ph=64}static{this.R=128}static{this.S=256}static{this.Spans=512}static{this.ThickBot=1024}static{this.ThickTop=2048}}const Ms=(i,t,s)=>{if(i[0].value[0]===i[1].value[0])return t},os={colStart:0,colEnd:0,rowStart:0,rowEnd:0},js=Object.freeze(Object.defineProperty({__proto__:null,fromBufferXLSX:async(i,t)=>{const{password:s,onWarning:o,createWorkbookOptions:n={},...a}=t??{},c=Promise.resolve().then(()=>require("./J3xq71qTV9LqCUzu.cjs")),T=Promise.resolve().then(()=>require("./BqFEcpPZjpwULlZk.cjs"));let S=null;try{S=new DOMParser}catch{}let x=null;S||(x=Promise.resolve().then(()=>require("./Cq2L49XjSKiIAsND.cjs")).then(d=>d.i));let w=null,D=null,b=null;try{const d=await Promise.all([c,T,x]);w=d[0],D=d[1],b=d[2]}catch(d){throw new Error("Unable to load XLSX parser.",{cause:d})}try{const d=w.read(i,{type:"array",sheets:[],cellStyles:!1,bookFiles:!0});if(!d.Directory)throw new Error("Unable to parse as an Excel document. Try to save as '.xlsx' and try again.");d.Directory.richstructure=["/xl/richData/rdrichvaluestructure.xml"],d.Directory.richdata=["/xl/richData/rdrichvalue.xml"];const P=new D.FromOOXMLConverter,f=S??new b.DOMParser,y=n?.resources??new u.ResourceCollection,m=y.beginPersist(),V={},H=new Set,q=new Map;q.set("richTypes",[]);const ht=new Map,Pe=[],ne=I=>d.files[I],fe=(I,z)=>{const Y=I.lastIndexOf("/"),ut=I.substring(0,Y+1)+"_rels/"+I.substring(Y+1,I.length)+".rels";let dt=z.get(ut);return dt||(dt=(($,be,xe,we,Xt=null)=>{if(!$)return null;const tt=Ee($,be,xe,we,Xt);if(!tt)return null;const et=new Map,bt=Object.keys(tt),Bt=bt.length;for(let xt=0;xt<Bt;xt++){const Wt=bt[xt],kt=tt[Wt];et.set(Wt,kt)}return et})(ut,ne,f,P,yt),z.set(ut,dt)),dt},ae=(I,z,Y,ut=ht)=>{let dt=fe(z,ut).get(I),$=dt?.target;if(!$)return null;if(dt.targetMode==="External")return dt.target;const be=z.lastIndexOf("/"),xe=z.substring(0,be+1);$.startsWith("/")||($=xe+$),$=(tt=>{const et=tt.split(/\/+/);return et.reduce((bt,Bt,xt)=>(Bt==="."?bt.splice(xt,1):Bt===".."&&bt.splice(xt-1,2),bt),et).join("/")})($);const we=P?.getVisitorParamsState().get("dxfs");let Xt=ut.get($);if(!Xt)if(dt.type==="http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet"){const tt={};Xt=tt;const et=async()=>{const bt=((N,G,Qt,_,Z,J,wt)=>{const h=new $s,Q=new u.Tuple.TransposedBuilder;let j=null;h.registerVisitor({from:"autoFilter",to:"filter",openTag:e=>{e.copyTo("ref",A)}}),h.registerVisitor({from:"conditionalFormatting",to:{},openTag:e=>{const r=e.getParent();r.conditionals||(r.conditionals=[]),r.conditionals.push(e.getSource());const l=e.getAttribute("sqref");l&&(e.getSource().ref=l.split(" ").join(",")),e.copyTo("pivot",v)},closeTag:e=>{const r=e.getSource();if(r.rule){const l=Object.keys(r.rule);for(let p=0;p<l.length;p++){const C=l[p];C!=="rule"&&(r[C]=r.rule[C])}}delete r.rule}}),h.registerVisitor({from:"cfRule",to:"rule",openTag:e=>{const r=e.getParent();e.copyToObject(r,"type",A),e.copyToObject(r,"priority",E),e.copyToObject(r,"stopIfTrue",v);const l=e.getAttribute("dxfId",E);if(l!==null){let p=_?.get(l);p||(J?.(`Unable to load conditional color. Invalid dxfI: '${l}' at '${e.getPath()}'.`),p={}),r.style=p}e.copyToObject(r,"aboveAverage",v),e.copyToObject(r,"equalAverage",v),e.copyToObject(r,"stdDev",E),e.copyToObject(r,"bottom",v),e.copyToObject(r,"percent",v),e.copyToObject(r,"rank",E),e.copyToObject(r,"operator",A),e.copyToObject(r,"text",A),e.copyToObject(r,"timePeriod",A)}}),h.registerVisitor({from:"colorScale",to:"colorScale"}),h.registerVisitor({from:"dataBar",to:"dataBar",openTag:e=>{e.copyTo("maxLength",E),e.copyTo("minLength",E),e.copyTo("showValue",v)}}),h.registerVisitor({from:"iconSet",to:"iconSet",openTag:e=>{e.copyTo("iconSet",A),e.copyTo("reverse",v),e.copyTo("showValue",v)}}),h.registerVisitor({from:"formula",to:null,text:(e,r)=>{const l=r.getParent();let p=l.formulas;p||(p=[],l.formulas=p),p.push(e)}}),h.registerVisitor({from:"cfvo",to:{},openTag:e=>{const r=e.getParent();r.conditions||(r.conditions=[]),r.conditions.push(e.getSource()),e.copyTo("type",A),e.copyTo("value",ct,"val"),e.copyTo("gte",v)}}),h.registerVisitor({from:"color",to:{},openTag:e=>{const r=e.getParent();r.colors||(r.colors=[]);const l=De(p=>e.getAttribute(p));r.colors.push(l)}}),h.registerVisitor({from:"filterColumn",to:"filterColumn",openTag:e=>{const r=e.getParent();r.fields||(r.fields=[]),r.fields.push(e.getSource()),e.copyTo("offset",E,"colId"),e.copyTo("hiddenButton",v),e.copyTo("showButton",v)}}),h.registerVisitor({from:"colorFilter",to:"colorFilter",openTag:e=>{const r=e.getParent();r.criteria||(r.criteria=[]),r.criteria.push(e.getSource()),e.getSource().type=u.IAutoFilter.Type.Color,e.copyTo("cellColor",v),e.copyTo("styleId",E,"dxfId")}}),h.registerVisitor({from:"dynamicFilter",to:"dynamicFilter",openTag:e=>{const r=e.getParent();r.criteria||(r.criteria=[]),r.criteria.push(e.getSource()),e.getSource().type=u.IAutoFilter.Type.Dynamic,e.copyTo("dynamicType",A,"type"),e.copyTo("val",ct),e.copyTo("maxVal",ct,"maxVal")}}),h.registerVisitor({from:"iconFilter",to:"iconFilter",openTag:e=>{const r=e.getParent();r.criteria||(r.criteria=[]),r.criteria.push(e.getSource()),e.getSource().type=u.IAutoFilter.Type.Icon,e.copyTo("iconId",E),e.copyTo("iconSet",A)}}),h.registerVisitor({from:"top10",to:"top10",openTag:e=>{const r=e.getParent();r.criteria||(r.criteria=[]),r.criteria.push(e.getSource()),e.getSource().type=u.IAutoFilter.Type.Top10,e.copyTo("filterVal",ct),e.copyTo("percent",v),e.copyTo("top",v),e.copyTo("val",ct)}}),h.registerVisitor({from:"filters",to:"filters",openTag:e=>{const r=e.getParent();r.criteria||(r.criteria=[]),r.criteria.push(e.getSource()),e.getSource().type=u.IAutoFilter.Type.Items,e.copyTo("blank",v),e.copyTo("calendarType",A)}}),h.registerVisitor({from:"dateGroupItem",to:"dateGroupItem",openTag:e=>{const r=e.getParent();r.dateGroups||(r.dateGroups=[]),r.dateGroups.push(e.getSource()),e.copyTo("group",A,"dateTimeGrouping"),e.copyTo("day",E),e.copyTo("hour",E),e.copyTo("minute",E),e.copyTo("month",E),e.copyTo("second",E),e.copyTo("year",E)}}),h.registerVisitor({from:"filter",to:"filter",openTag:e=>{const r=e.getParent();r.items||(r.items=[]),r.items.push(e.getAttribute("val",ct))}}),h.registerVisitor({from:"customFilters",to:"customFilters",openTag:e=>{const r=e.getParent();r.criteria||(r.criteria=[]),r.criteria.push(e.getSource()),e.getSource().type=u.IAutoFilter.Type.Custom,e.copyTo("and",v)}}),h.registerVisitor({from:"customFilter",to:"customFilter",openTag:e=>{const r=e.getParent();r.filters||(r.filters=[]),r.filters.push(e.getSource()),e.copyTo("operator",A),e.copyTo("value",ct,"val")}}),h.registerVisitor({from:"sortState",to:"sort",openTag:e=>{e.copyTo("ref",A)}}),h.registerVisitor({from:"sortCondition",to:"sortCondition",openTag:e=>{const r=e.getParent();r.fields||(r.fields=[]);const l=e.getSource();r.fields.push(l),e.copyTo("sortOn",A,"sortBy"),e.copyTo("dxfId",A,"sortBy"),e.copyTo("iconSet",A),e.copyTo("customList",A);const p=e.getAttribute("ref");if(p){const C=u.AddressUtils.fastStringToRange(p,os).colStart,pt=u.AddressUtils.fastStringToRange(r.ref,os),rt=pt.colStart;l.offset=pt?C-rt:C}l.reverse=e.getAttribute("descending",v)??!1}}),h.registerVisitor({from:"AlternateContent",to:null});const ue=e=>{j=e.getSource(),e.copyTo("topLeft",A,"topLeftCell");const r=hs(e.getAttribute("defaultGridColor")),l=e.getAttribute("colorId");l===null||r||(e.getSource().gridLineColor="index"+parseFloat(l)),e.copyTo("showZeros",v),e.copyTo("showFormulas",v),e.copyTo("zoomScale",E),e.copyTo("showRowHeaders",v,"showRowColHeaders"),e.copyTo("showColumnHeaders",v,"showRowColHeaders"),e.copyTo("showRowGridlines",v,"showGridLines"),e.copyTo("showColumnGridlines",v,"showGridLines")};h.registerVisitor({from:"sheetView",to:"view",openTag:e=>{ue(e)},closeTag:()=>{j=null}}),h.registerVisitor({from:"customSheetViews",to:"customSheetViews",openTag:e=>{e.setSource([])}}),h.registerVisitor({from:"customSheetView",to:[],openTag:e=>{ue(e)},closeTag:()=>{j=null}}),h.registerVisitor({from:"selection",to:"selection",openTag:e=>{if(!j)return;e.copyTo("cell",A,"activeCell"),e.copyTo("rangeIndex",E,"activeCellId");const r=e.getAttribute("activeCell"),l=e.getAttribute("sqref");l&&l!==r&&(e.getSource().ranges=l.split(" "))}}),h.registerVisitor({from:"pane",to:"pane",openTag:e=>{if(j&&e.getAttribute("state")==="frozen"){const r={};j.freezePanes=r,e.copyToObject(r,"topLeft",A,"topLeftCell");const l=j.topLeft?u.AddressUtils.fastStringToCell(j.topLeft):{colIndex:0,rowIndex:0},p={colIndex:0,rowIndex:0};e.copyToObject(p,"colIndex",E,"xSplit"),e.copyToObject(p,"rowIndex",E,"ySplit");const C={colIndex:l.colIndex+p.colIndex,rowIndex:l.rowIndex+p.rowIndex};r.coords=u.AddressUtils.cellToString(C)}}}),h.registerVisitor({from:"tabColor",to:null,openTag:e=>{const r=De(l=>e.getAttribute(l));r&&(N.tabColor=r)}}),h.registerVisitor({from:"pageSetUpPr",to:"pageSetUpPr",openTag:e=>{}}),h.registerVisitor({from:"outlinePr",to:"outlinePr",openTag:e=>{}}),h.registerVisitor({from:"pageMargins",to:"pageMargins",openTag:e=>{}}),h.registerVisitor({from:"pageSetup",to:"pageSetup",openTag:e=>{}}),h.registerVisitor({from:"printOptions",to:"printOptions",openTag:e=>{}}),h.registerVisitor({from:"mergeCells",to:"merges",openTag:e=>{e.setSource([])}}),h.registerVisitor({from:"mergeCell",to:[],openTag:e=>{const r=e.getAttribute("ref");e.setSource(r)}}),h.registerVisitor({from:"hyperlinks",to:"hyperlinks",openTag:e=>{e.setSource([])}}),h.registerVisitor({from:"hyperlink",to:[],openTag:e=>{const r=e.getAttribute("r:id"),l=e.getAttribute("ref");if(!l)return void console.warn("No ref found for hyperlink");e.setKey(l);let p=r?G(r):"";if(typeof p!="string")return void console.warn("Invalid address ",p);const C=e.getAttribute("location");p.endsWith("\\")&&(p=p.substring(0,p.length-1));const pt=e.getAttribute("location");if(pt&&(C&&C!==pt&&console.warn("display and location are different",C,pt),p+="#"+pt),!p)return void console.warn("No address found for hyperlink. r:id",r);let rt;const At=e.getAttribute("tooltip");rt=At?{address:p,tooltip:At}:p,e.setSource({r:l,v:rt})}}),h.registerVisitor({from:"drawing",to:"movables",openTag:e=>{const r=e.getAttribute("r:id");if(!r)return;const l=G(r);l?e.setSource(l.movables):console.warn("no drawing found for rId",r)}}),h.registerVisitor({from:"tableParts",to:"tables",openTag:e=>{e.setSource([])}}),h.registerVisitor({from:"tablePart",to:[],openTag:e=>{const r=e.getAttribute("r:id");if(!r)return;const l=G(r);l?e.setSource(l):console.warn("no table found for rId",r)}}),h.registerVisitor({from:"worksheet",to:"worksheet",openTag:e=>{}}),h.registerVisitor({from:"sheetProtection",to:"protection",openTag:e=>{let r=!1;if(e.hasAttribute("sheet")&&v(e.getAttribute("sheet"))&&(r=!0),!r)return void e.setSource(void 0);const l=C=>C===!0||C==="1"||C==="on"||C==="true"||C===!1||C==="0"||C==="off"||C==="false"||null;e.copyTo("autoFilter",l),e.copyTo("deleteColumns",l),e.copyTo("formatCells",l),e.copyTo("formatColumns",l),e.copyTo("formatRows",l),e.copyTo("insertColumns",l),e.copyTo("insertHyperlinks",l),e.copyTo("insertRows",l),e.copyTo("objects",l),e.copyTo("pivotTables",l),e.copyTo("scenarios",l),e.copyTo("selectUnlockedCells",l),e.copyTo("selectUnlockedCells",l),e.copyTo("sort",l);const p={};e.copyToObject(p,"hash",A,"hashValue"),e.copyToObject(p,"algorithm",A,"algorithmName"),e.copyToObject(p,"salt",A,"saltValue"),e.copyToObject(p,"spinCount",E),Object.keys(p).length>0&&(e.getSource().password=p)}}),h.registerVisitor({from:"protectedRanges",to:"protectedRanges",openTag:e=>{e.setSource({})}}),h.registerVisitor({from:"protectedRange",to:{},openTag:e=>{const r=e.getAttribute("sqref");e.setKey(r),e.copyTo("name"),e.copyTo("securityDescriptor");const l={};e.copyToObject(l,"hash",A,"hashValue"),e.copyToObject(l,"algorithm",A,"algorithmName"),e.copyToObject(l,"salt",A,"saltValue"),e.copyToObject(l,"spinCount",E),Object.keys(l).length>0&&(e.getSource().password=l)}}),h.registerVisitor({from:"sheetFormatPr",to:"sheetFormatPr",openTag:e=>{e.copyToObject(N,"defaultColSize",ct,"defaultColWidth"),e.copyToObject(N,"outlineLevelCol",E,"outlineLevelCol");const r=e.getAttribute("customHeight");r!=="1"&&r!=="true"||e.copyToObject(N,"defaultRowSize",ct,"defaultRowHeight"),e.copyToObject(N,"outlineLevelRow",E,"outlineLevelRow")}}),h.registerVisitor({from:"cols",to:"cols",openTag:e=>{e.setSource([])}}),h.registerVisitor({from:"col",to:[],openTag:e=>{e.copyTo("min",r=>parseInt(r)-1),e.copyTo("max",r=>parseInt(r)-1),e.copyTo("sz",ct,"width"),e.copyTo("cs",v,"customWidth"),e.copyTo("h",v,"hidden"),e.copyTo("l",E,"outlineLevel"),e.copyTo("s",E,"style")}}),h.registerVisitor({from:"oleObjects",to:null,openTag:e=>{e.warn("'OLE Objects' are not supported.")}});let Kt=null;const Ts={onOpenTag:e=>{Kt===null&&(Kt="")},onText:e=>{Kt+=e},onEnd:()=>{const e=Qt(Kt);return Kt=null,e},onError:e=>{}};return((e,r,l,p,C,pt)=>{let rt=!1,At=!1,qt=[],_t=!1,Et=null,Yt=null,de=null,nt=null,$e=null,Fe=null;const ys=pt?.get("richData")??[],Me=u.AddressUtils.normalizeA1ToR1C1,je=u.CoordUtils.createConflatingRanges(),He=new Map,ve=[];let te=null;const Xe=u.CoordUtils.createConflatingRanges();let ee,Dt=!1,B=-1,K=-1,gt=null,se=null;const Se=[];let Ce=null,Be=-2,ft=0,Ut="",Pt="",It="",Ot="",Vt="",Nt="",Lt="",We="",qe="",_e="",Ue="",ze="",Ge="",Ze="",mt=!0,Rt=null;return{...l,onEnd:()=>{Se.length>0&&(r.rows=Se);let g=je.done(Ms);const k=g.length;if(k>0){const F=new Array(k);for(let L=0;L<k;L++){const at=g[L],$t=u.AddressUtils.rangeToString(at),Ft=at.value[1],ie=u.AddressUtils.resolveRelativeToA1(Ft,at.rowStart,at.colStart);F[L]=[$t,ie]}r.formulas=F}const st=Xe.done(!0),R=st.length;if(R>0){const F=new Array(R);for(let L=0;L<R;L++){const at=st[L],$t=u.AddressUtils.rangeToString(at);F[L]=$t}r.volatile=F}if(ve.length>0&&(r.dynamicArray=[...ve]),qt.length>0){qt.sort(u.CoordUtils.createRangeComparator(u.IRange.Orientation.Column));const F=[];let L=null,at=-1,$t=-1,Ft=-1,ie=-1,vt=null;const Je=qt.length;Je>0&&(L=qt[0],at=L.colStart,$t=L.colEnd,Ft=L.rowEnd,ie=L.value,F.push(L));for(let Mt=1;Mt<Je;Mt++)vt=qt[Mt],ie!==vt.value||at!==vt.colStart||$t!==vt.colEnd||Ft+1!==vt.rowEnd?(F.push(vt),L=vt,at=L.colStart,$t=L.colEnd,Ft=L.rowEnd,ie=L.value):(Ft=vt.rowEnd,L.rowEnd=Ft);let Qe=[];for(let Mt=0;Mt<F.length;Mt++){const oe=F[Mt];Qe.push({r:{colStart:oe.colStart,colEnd:oe.colEnd,rowStart:oe.rowStart,rowEnd:oe.rowEnd},v:oe.value})}r.directStyles=Qe}const it=e.build();if(it){const F=it.tuples;r.data=F}l?.onEnd?.()},onOpenTag:g=>{let k=g.name;const st=k.indexOf(":");if(st!==-1&&(k=k.slice(st+1)),ee){const R=g.attributes;switch(k){case"v":At=!0;break;case"f":switch(R.t??null){case null:case"normal":_t=!0;break;case"shared":const it=R.si;Yt=R.ref,Et=it;break;case"array":_t=!0,Yt=R.ref,te=[Yt,!1];break;case"datatable":_t=!0,Yt=R.ref,_t=!0}R.ca!==void 0&&Xe.append(B,K);break;case"is":return void(Dt=!0)}return void(Dt&&C?.onOpenTag(g))}if(rt){if(k==="c"){ee=g;const R=g.attributes.r;K=u.AddressUtils.fastStringToCol(R);const it=g.attributes.t;it===void 0?se=null:(se=it,se==="str"&&(Dt=!0));let F=g.attributes.s;F!==void 0&&(F=parseInt(F),Rt&&Rt.value===F&&Rt.colEnd+1===K?Rt.colEnd=K:(Rt={colStart:K,rowStart:B,colEnd:K,rowEnd:B,value:F},qt.push(Rt)))}}else{if(k==="row"){rt=!0;const R=g.attributes.r;if(B=parseInt(R)-1,ft=0,Pt=g.attributes.customHeight,Pt!==void 0&&(ft|=Ht.CustomHeight),Pt!==qe&&(mt=!0,qe=Pt),Ut=g.attributes.ht,Ut!==void 0&&(ft|=Ht.Ht),Ut!==We&&(mt=!0,We=Ut),It=g.attributes.hidden,It!==void 0&&(ft|=Ht.Hidden),It!==_e&&(mt=!0,_e=It),Vt=g.attributes.s,Vt!==void 0&&(ft|=Ht.S),Vt!==ze&&(mt=!0,ze=Vt),Ot=g.attributes.customFormat,Ot!==void 0&&(ft|=Ht.CustomFormat),Ot!==Ue&&(mt=!0,Ue=Ot),Nt=g.attributes.outlineLevel,Nt!==void 0&&(ft|=Ht.OutlineLevel),Nt!==Ge&&(mt=!0,Ge=Nt),Lt=g.attributes.collapsed,Lt!==void 0&&(ft|=Ht.Collapsed),Lt!==Ze&&(mt=!0,Ze=Lt),ft!==0)if(Be+1!==B||mt){const it=Pt!==void 0&&(Pt==="1"||Pt==="true"),F=Ot!==void 0&&(Ot==="1"||Ot==="true");Ce={min:B,max:B,sz:it&&Ut!==void 0?parseFloat(Ut):-1,csz:it,h:It!==void 0&&(It==="1"||It==="true"),s:it&&Vt!==void 0&&Vt!=="0"?parseInt(Vt):0,cs:F,l:Nt===void 0||Nt==="0"?0:parseInt(Nt),cl:Lt!==void 0&&(Lt==="1"||Lt==="true")},Se.push(Ce)}else Ce.max=B;return Be=B,void(mt=!1)}l?.onOpenTag(g)}},onCloseTag:g=>{if(ee){let k=g.name;const st=k.indexOf(":");if(st!==-1&&(k=k.slice(st+1)),Dt)if(k==="is"||k==="v"){const R=C?.onEnd();R!==null&&e.addValue(B,K,""+R)}else C?.onCloseTag?.(g);return At&&(At=!1),void(k==="c"&&(ee=null,Dt=!1))}if(rt)return rt=!1,void(Rt=null);l?.onCloseTag(g)},onText:g=>{if(g=g.trim(),At){switch(gt=null,se){case null:case"n":gt=parseFloat(g);break;case"b":gt=g==="1"||g==="true";break;case"s":gt=g;break;case"e":if(g==="#VALUE!"){const st=ee.attributes.vm;if(st!==void 0){const R=ys[parseInt(st)-1];if(R&&R.isFormulaError){gt={t:u.ScalarType.Error,v:R.getCode()};break}}}const k=u.FormulaError.getBuiltInByLabel(g);k?gt={t:u.ScalarType.Error,v:k.getCode()}:(gt=g,p?.(`Unknown formula error '${g}' in cell ${u.AddressUtils.cellToString({colIndex:K,rowIndex:B})}`));break;case"str":case"inlineStr":Dt=!0}gt!==null&&e.addValue(B,K,gt)}if(te&&(se==="e"&&(te[1]=!0),ve.push(te),te=null),Et)if($e===Et)nt=Fe;else{if(nt=He.get(Et),!nt){const k=[];de=Me(g,B,K,k),nt=[de,k,g],He.set(Et,nt)}$e=Et,Fe=nt}if(_t){const k=[];de=Me(g,B,K,k),nt=[de,k,g]}if(nt)return je.append(B,K,nt),nt=null,_t=!1,Et=null,void(Yt=null);Dt?C?.onText(g):rt||l?.onText(g)}}})(Q,N,h.createEventHandler(N,()=>{},J),J,Ts,wt)})(tt,(N,G=!1)=>ae(N,$,G)??null,ds,we,0,N=>{o&&(N=$+": "+N,o?.(N))},q),Bt=is($,ne),xt=await(async(N,G=8388608)=>{await(async()=>{if(typeof ReadableStream>"u")if(typeof window>"u"){const{ReadableStream:J}=await Promise.resolve().then(()=>require("./Cpo-h2pMpScosT7r.cjs"));globalThis.ReadableStream=J}else console.warn("Browser does not support ReadableStream; consider loading a polyfill.")})();const Qt=new TextDecoder("utf-8");let _=0;const Z=N instanceof Uint8Array?N:new Uint8Array(N);return new ReadableStream({pull(J){if(_>=Z.byteLength)return void J.close();const wt=Z.subarray(_,Math.min(_+G,Z.byteLength)),h=Qt.decode(wt,{stream:_+G<Z.byteLength});J.enqueue(h),_+=wt.length}}).getReader()})(Bt);try{await Ae.parseStream(xt,bt,{xmlns:!1})}catch(N){throw console.warn(`Error parsing sheet: '${$}'`,N),new Error(`Error parsing sheet: '${$}'`,{cause:N})}const Wt=fe($,ut);let kt,Re=new Map;if(Wt){const N="http://schemas.microsoft.com/office/2017/10/relationships/threadedComment";let G;Wt.forEach((_,Z)=>{_.type===N&&(kt=ae(Z,$,!1,ut)?.comments,kt&&kt.forEach(J=>{Re.set(J.id,J)}))});const Qt="http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments";if(Wt.forEach((_,Z)=>{_.type===Qt&&(G=ae(Z,$,!1,ut))}),G||kt){const _=kt??[],Z=G?.comments;if(Z){const J=G?.authors;for(let wt=0;wt<Z.length;wt++){const h=Z[wt];let Q=h.authorId!==void 0?J[h.authorId]:void 0;if((!Q||Q.startsWith("tc="))&&(Q=cs(Q.substring(3)),Re.has(Q)))continue;let j=ce.get(Q);j||(j=Ve.get(Q)),j||(j={id:u.CommonUtils.uuidV4(),displayName:Q},Ve.set(j.displayName,j),ce.set(j.id,j)),Q=j?.id??null;const ue={id:u.CommonUtils.uuidV4(),personId:Q,ref:h.ref,done:!1,asNote:!0,content:h.content};_.push(ue)}}tt.comments=_}}};Pe.push(et())}else Xt=Y?is($,ne,tt=>{const et=y.add({buffer:tt});return et.addReference(V),H.add(et),m.toResourceId(et)},yt):Ee($,ne,f,P,yt);return Xt},yt={paramMap:q,getRefs:fe,getRef:ae,parsedRefs:ht,onWarning:o,addPerson:I=>null},le=[];let me=0;d.Strings&&(me=parseInt(d.Strings.Unique??d.Strings.length??0));const us=d.Strings??[];for(let I=0;I<me;I++)le.push(us[I]?.t??"");const Ie=new Map;let Oe=me;const ds=I=>{const z=Ie.get(I);if(z!==void 0)return z;const Y=Oe;return Ie.set(I,Oe++),le.push(I),Y},ce=(zt("richstructure",d,f,P,yt),zt("richdata",d,f,P,yt),new Map),Ve=new Map,Ne=zt("people",d,f,P);let Ct=null;if(Ne.size>0&&(Ct=Ne.entries().next()?.value?.[1]?.persons,Ct)){const I=Ct.length;for(let z=0;z<I;z++){const Y=Ct[z];ce.set(Y.id,Y),ce.set(Y.displayName,Y)}}const Te=zt("themes",d,f,P,yt);let Le=null;if(Te&&Te.entries){let I=Te.entries().next();I?.value?.[1]&&(Le=I.value[1])}const ps=new u.Theme(Le);let he=zt("styles",d,f,P,yt).entries().next()?.value[1];he&&(he=JSON.parse(u.JSONStableStringify(he)));const gs=zt("workbooks",d,f,P,yt);await Promise.all(Pe);const ye={...gs.entries().next().value[1],styles:he,theme:ps.toJSON()};le.length>0&&(ye.strings=le),Ct&&Ct.length>0&&(ye.people=Ct);const fs={...n,resources:y,json:ye},ms=new u.Workbook(fs);return H.forEach(I=>{I.deleteReference(V)}),m.endPersist(),ms}catch(d){let P="Unable to parse XLSX.";throw d instanceof u.OutOfBoundsError&&(P="Unable to open XLSX. There are too many rows or columns."),new Error(P,{cause:d})}},toBufferXLSX:async(i,t)=>{const s=await Promise.resolve().then(()=>require("./J3xq71qTV9LqCUzu.cjs")),o=await i.toJSON(!0),n=s.utils.book_new();for(let a=0;a<o.sheets.length;a++){const c=o.sheets[a],T=s.utils.json_to_sheet([{}]);s.utils.book_append_sheet(n,T,c.name);const S=c.sheet,x=i.getSheetAt(a),w=x.getUsedRange();if(w?(T["!ref"]=w.getA1(),w.forEach((D,b)=>{const d={t:"z"},P=b.getCell().getStyle();if(!P.isNormal()){let f=P.getNumberFormat();f!==u.NumberFormat.Type.General&&(f===u.NumberFormat.Type.ShortDate?f="m/d/yyyy":f===u.NumberFormat.Type.MediumDate?f="d-mmm-yy":f===u.NumberFormat.Type.LongDate?f="[$-x-sysdate]dddd, mmmm dd, yyyy":f===u.NumberFormat.Type.ShortTime?f="h:mm":f===u.NumberFormat.Type.MediumTime?f="h:mm AM/PM":f===u.NumberFormat.Type.LongTime&&(f="h:mm:ss AM/PM"),d.z=f)}if(D!==null)switch(b.getType()){case u.ScalarType.Number:d.t="n",d.v=D;break;case u.ScalarType.String:d.t="s",d.v=D;break;case u.ScalarType.Boolean:d.t="b",d.v=D;break;case u.ScalarType.Error:d.t="e",d.v=D.toString();case u.ScalarType.RichData:}T[b.getA1()]=d})):T["!ref"]="A1:A1",S.merges?.length>0){const D=[];T["!merges"]=D;for(let b=0;b<S.merges.length;b++)D.push(s.utils.decode_range(S.merges[b]))}if(S.cols?.length>0){const D=[];T["!cols"]=D;const b=S.cols,d={width:S.defaultColSize??x.getColumnWidthAsFontUnit(x.getColumnHeaders().getDefaultSize())};for(let P=0;P<b.length;P++){const f=b[P];for(let m=D.length;m<=f.min-1;m++)D.push(d);const y={};f.sz!==void 0&&(y.width=f.sz),f.h!==void 0&&(y.hidden=f.h),f.l!==void 0&&(y.level=f.l);for(let m=f.min;m<=f.max;m++)D.push(y)}}}return s.write(n,{type:"array",bookType:"xlsx"}),s.write(n,{type:"array",bookType:"xlsx"})}},Symbol.toStringTag,{value:"Module"}));exports.a=i=>parseFloat(i)/1e3,exports.b=hs,exports.c=i=>i?Ke.Yt.roundAccurately(parseFloat(i)/9525,1):null,exports.d=De,exports.i=js,exports.p=i=>parseFloat(i)/6e4,exports.r=cs,exports.t=i=>i?Ke.Yt.roundAccurately(parseFloat(i)/12700,4):null;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";/**
|
|
2
|
+
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.4.15
|
|
3
|
+
*
|
|
4
|
+
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
5
|
+
* License: The license can be found at https://www.sheetxl.com/license.
|
|
6
|
+
*/Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),s=require("react"),r=require("@mui/material"),v=require("@mui/icons-material"),a=require("@sheetxl/sdk"),t=require("./DpZ5HlIMG95q2uIe.cjs"),y=require("@mui/system"),A=s.memo(j=>{const{label:h,value:d,options:c,onSelect:f,tabIndex:O=0,...I}=j,[w,C]=s.useState(()=>U(d,c));s.useEffect(()=>{C(U(d,c))},[d,c]);const S=t.T(x=>{C(x.target.value),f?.(c[x.target.value])},[f,c]),p=s.useMemo(()=>Object.keys(c).map(x=>i.jsx(r.MenuItem,{value:x,children:x},x)),[c]);return i.jsxs(r.FormControl,{sx:{minWidth:135},size:"small",children:[i.jsx(r.InputLabel,{children:h}),i.jsx(r.Select,{inputProps:{tabIndex:O},value:w,label:h,onChange:S,sx:{backgroundImage:`linear-gradient(${y.alpha("#fff",t.getOverlayAlpha(5))}, ${y.alpha("#fff",t.getOverlayAlpha(5))})`},...I,children:p})]})}),B={Workbook:"workbook",Sheet:"sheet"},z={enter:140,exit:140},X={Formulas:a.ICell.Content.Formulas,Values:a.ICell.Content.Values,Notes:a.ICell.Content.Notes,Comments:a.ICell.Content.Comments},J={...X};delete J.Values;const ee={"By Rows":!0,"By Columns":!1},U=(j,h)=>{const d=Object.keys(h);for(let c=0;c<d.length;c++){const f=d[c];if(h[f]===j)return f}},G=s.memo(j=>{const{replace:h=!1,findText:d,replaceText:c,findOptions:f,replaceOptions:O,title:I,onHide:w,onFindOrReplace:C,...S}=j,p=s.useRef(null),x=s.useRef(null),D=s.useRef(null),P=s.useRef(null),K=s.useRef(null),M=s.useRef(null),$=(e,n)=>{n&&(n.start(e,{center:!1}),setTimeout(()=>n.stop(e),180))},[L,b]=s.useState(!1),[k,Q]=s.useState(!1),[g,E]=s.useState(h),[q,F]=s.useState(!1),[W,Z]=s.useState(!1),[l,u]=s.useState({findText:null,replaceText:null,replace:h,replaceOptions:{},findOptions:{matchCase:!1,matchEntireCell:!1,useRegex:!1,orientation:a.IRange.Orientation.Row,fields:[a.ICell.Content.Formulas]},scope:B.Sheet}),R=t.T(async(e,n,o,T)=>{if(!C)return;const m={...l};m.replaceOptions={...m.replaceOptions},m.findOptions={...m.findOptions},m.replaceOptions.maxCount=o?void 0:1,m.replace=n,n&&l.findOptions.fields?.[0]===a.ICell.Content.Values&&(m.findOptions.fields=[a.ICell.Content.Formulas]),m.findOptions.reverse=!e;const _=await C({autoFocus:T,...m});F(_===0)},[l,C]);s.useEffect(()=>{F(!1)},[l,k,g]);const V=t.T((e,n)=>{if(e.keyCode===t.eo.Enter){if(!l.findText)return;let o=!0,T=!1;e.shiftKey&&(o=!1),n?(e.ctrlKey&&e.altKey&&(T=!0),$(e,T?M.current:K.current)):$(e,o?P.current:D.current),R(o,n,T,!1)}},[l]),N=s.useRef(null);s.useLayoutEffect(()=>{u(e=>{const n={...e};n.findText=d&&d.length>0?d:e.findText??"",b(!0),c!==void 0&&(n.replaceText=c),f&&(n.findOptions={...n.findOptions,...f}),n.replaceText||(n.replaceText=""),n.replaceOptions&&(n.replaceOptions={...n.replaceOptions}),O&&(n.replaceOptions={...n.replaceOptions,...O}),l.findOptions.fields?.[0]||(l.findOptions.fields=[a.ICell.Content.Formulas]);const o=!(!O&&c===void 0);return o&&E(o),n}),W||N.current?.focus()},[d,c,f,O]),s.useEffect(()=>{g?(l.findOptions.fields[0],a.ICell.Content.Values):b(!0)},[g]),s.useEffect(()=>{if(L&&p.current&&l.findText===p.current.value)return p.current===document.activeElement||p.current.contains(document.activeElement)?(p.current?.select(),void b(!1)):void p.current.addEventListener("focus",()=>{p.current?.select(),b(!1)},{once:!0})},[L,l]);const[Y,{width:H}]=t.useMeasure();return i.jsx(t.jn,{ref:N,title:I??(g?"Find & Replace":"Find"),initialPosition:{y:"35"},autoFocusSel:".input",onHide:w,onFocus:()=>Z(!0),onBlur:()=>{Z(!1),F(!1)},PaperProps:{elevation:W?3:1},...S,children:i.jsxs(r.DialogContent,{dividers:!0,ref:Y,sx:{display:"flex",flexDirection:"column",paddingLeft:e=>e.spacing(1.5),paddingRight:e=>e.spacing(1.5)},onKeyDown:e=>{if(e.key==="h"&&e.ctrlKey)E(!0),p.current?.contains(document.activeElement)&&x.current?.focus();else if(e.key==="f"&&e.ctrlKey)p.current?.focus();else if(e.key==="c"&&e.altKey)u(n=>{const o={...n};return o.findOptions.matchCase=!n.findOptions.matchCase,o});else if(e.key==="e"&&e.altKey)u(n=>{const o={...n};return o.findOptions.matchEntireCell=!n.findOptions.matchEntireCell,o});else{if(e.key!=="r"||!e.altKey)return;u(n=>{const o={...n};return o.findOptions.useRegex=!n.findOptions.useRegex,o})}e.preventDefault()},children:[i.jsxs(r.Box,{sx:{display:"flex",flexDirection:"row",gap:e=>e.spacing(1)},children:[i.jsxs(r.Box,{sx:{display:"flex",flexDirection:"row",alignItems:"start",gap:e=>e.spacing(.25),paddingTop:"3px"},children:[i.jsx(t.rl,{selected:k,onSelectToggle:e=>{Q(e)},preventFocus:!0,label:"Toggle Additional Options",icon:t.w5(i.jsx(t.Ii,{}))}),i.jsx(t.rl,{selected:g,onSelectToggle:e=>{E(e)},preventFocus:!0,label:"Toggle Replace",icon:t.w5(i.jsx(t.Ri,{})),shortcut:{key:g?"F":"H",modifiers:[t.Z.Ctrl]}})]}),i.jsxs(r.Box,{sx:{display:"flex",flexDirection:"column",maxWidth:"100%",boxSizing:"border-box"},children:[i.jsxs(r.Box,{sx:{display:"flex",flexDirection:"row",alignItems:"center"},children:[i.jsx(r.TextField,{label:"Find",InputLabelProps:{shrink:!0},InputProps:{sx:{paddingRight:e=>e.spacing(1),minWidth:H>460?"20em":void 0,backgroundImage:`linear-gradient(${y.alpha("#fff",t.getOverlayAlpha(5))}, ${y.alpha("#fff",t.getOverlayAlpha(5))})`},inputProps:{draggable:!1,ref:p,className:"input",autoFocus:!0,spellCheck:!1,autoComplete:"off",sx:{paddingTop:e=>e.spacing(1.25),paddingBottom:e=>e.spacing(.75)}},endAdornment:i.jsx(r.InputAdornment,{sx:{transform:"scale(0.75) translateX(16px)"},position:"end",children:i.jsxs(r.Box,{sx:{display:"flex",alignItems:"center",flexDirection:"row",gap:"1px"},children:[i.jsx(t.rl,{selected:l.findOptions.matchCase,onSelectToggle:e=>{u(n=>{const o={...n};return o.findOptions.matchCase=e,o})},label:"Match Case",shortcut:{key:"C",modifiers:[t.Z.Alt]},icon:t.w5(i.jsx(t.Fi,{}))}),i.jsx(t.rl,{selected:l.findOptions.matchEntireCell,onSelectToggle:e=>{u(n=>{const o={...n};return o.findOptions.matchEntireCell=e,o})},label:"Match Entire Cell",shortcut:{key:"E",modifiers:[t.Z.Alt]},icon:t.w5(i.jsx(t.$i,{}))}),i.jsx(t.rl,{selected:l.findOptions.useRegex,onSelectToggle:e=>{u(n=>{const o={...n};return o.findOptions.useRegex=e,o})},label:"Use Regular Expression",shortcut:{key:"R",modifiers:[t.Z.Alt]},icon:t.w5(i.jsx(t.Wi,{}))})]})})},sx:{flex:"1 1 100%",marginRight:e=>e.spacing(1),"& .MuiOutlinedInput-notchedOutline":{borderColor:e=>q?`${e.palette.error.main} !important`:void 0},"& .MuiInputLabel-outlined":{color:e=>q?`${e.palette.error.main} !important`:void 0}},value:l.findText??"",onChange:e=>{u(n=>{const o={...n};return o.findText=e.target.value,o})},onKeyDown:e=>V(e,!1),onContextMenu:e=>{e.stopPropagation()}}),i.jsx(t.rl,{selected:l.findOptions.reverse,onSelectToggle:e=>{R(!1,!1)},touchRippleRef:D,label:"",shortcut:{key:"Enter",modifiers:[t.Z.Shift]},icon:t.w5(l.findOptions.orientation!==a.IRange.Orientation.Column?i.jsx(v.ArrowBack,{}):i.jsx(v.ArrowUpward,{})),disabled:!l.findText}),i.jsx(t.rl,{selected:!l.findOptions.reverse,onSelectToggle:e=>{R(!0,!1)},touchRippleRef:P,label:"Next Match",shortcut:{key:"Enter"},icon:t.w5(l.findOptions.orientation!==a.IRange.Orientation.Column?i.jsx(v.ArrowForward,{}):i.jsx(v.ArrowDownward,{})),disabled:!l.findText})]}),i.jsx(r.Collapse,{in:g,timeout:z,onExit:()=>{p.current?.focus()},children:i.jsxs(r.Box,{sx:{display:"flex",flexDirection:"row",alignItems:"center",marginTop:e=>e.spacing(2)},children:[i.jsx(r.TextField,{label:"Replace",InputLabelProps:{shrink:!0},InputProps:{sx:{paddingRight:e=>e.spacing(1),backgroundImage:`linear-gradient(${y.alpha("#fff",t.getOverlayAlpha(5))}, ${y.alpha("#fff",t.getOverlayAlpha(5))})`},inputProps:{ref:x,className:"input",spellCheck:!1,autoComplete:"off",sx:{paddingTop:e=>e.spacing(1.25),paddingBottom:e=>e.spacing(.75)}}},sx:{flex:"1 1 100%",marginRight:e=>e.spacing(1)},value:l.replaceText??"",onChange:e=>{u(n=>{const o={...n};return o.replaceText=e.target.value,o})},onKeyDown:e=>V(e,!0),onContextMenu:e=>{e.stopPropagation()}}),i.jsx(t.rl,{onSelectToggle:e=>{R(!0,!0)},touchRippleRef:K,label:"Replace",shortcut:{key:"Enter"},icon:t.w5(i.jsx(t.ji,{})),disabled:!l.findText}),i.jsx(t.rl,{onSelectToggle:e=>{R(!0,!0,!0)},touchRippleRef:M,label:"Replace All",shortcut:{key:"Enter",modifiers:[t.Z.Ctrl,t.Z.Alt]},icon:t.w5(i.jsx(t.Bi,{})),disabled:!l.findText})]})})]})]}),i.jsx(r.Collapse,{in:k,timeout:z,onExit:()=>{p.current?.focus()},children:i.jsxs(r.Box,{sx:{minHeight:"10px",flex:"1 1 100%",display:"flex",flexDirection:"column",gap:e=>e.spacing(.5),marginTop:e=>e.spacing(1)},children:[i.jsx(t.Pt,{orientation:"horizontal",sx:{marginBottom:e=>e.spacing(1.5)}}),i.jsxs(r.Box,{sx:{display:"flex",flexDirection:H>=413?"row":"column",justifyContent:"space-evenly",alignItems:"center",rowGap:e=>e.spacing(2)},tabIndex:-1,children:[i.jsx(A,{label:"Within",value:l.scope,options:B,onSelect:e=>{u(n=>{const o={...n};return o.scope=e,o})}}),i.jsx(A,{label:"Search",value:l.findOptions.orientation!==a.IRange.Orientation.Column,options:ee,onSelect:e=>{u(n=>{const o={...n};return o.findOptions.orientation=e?a.IRange.Orientation.Row:a.IRange.Orientation.Column,o})}}),i.jsx(A,{label:"Look in",value:g&&l.findOptions.fields?.[0]===a.ICell.Content.Values?a.ICell.Content.Formulas:l.findOptions.fields?.[0],options:g?J:X,onSelect:e=>{u(n=>{const o={...n};return o.findOptions.fields=[e],o})}})]})]})})]})})});exports.FindReplaceWindow=G,exports.ScopeOptions=B,exports.default=G;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";/**
|
|
2
|
+
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.4.15
|
|
3
|
+
*
|
|
4
|
+
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
5
|
+
* License: The license can be found at https://www.sheetxl.com/license.
|
|
6
|
+
*/Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),h=require("react"),o=require("@mui/material"),t=require("@sheetxl/sdk"),c=require("./DpZ5HlIMG95q2uIe.cjs"),d=({range:u,options:a,cell:C,onDone:s,...b})=>{const[i,r]=h.useState(a??t.Sort.DefaultRangeOptions),x=c.T(e=>{let l=null;e==="Sort"&&(l={...a,options:i}),s?.(l)},[i,s,a]);return n.jsx(c.D8,{title:"Sort",options:["Sort","Cancel"],onDone:x,...b,children:n.jsxs(o.Box,{sx:{display:"flex",flexDirection:"column"},children:[n.jsx(o.FormControlLabel,{control:n.jsx(o.Checkbox,{checked:!i.reverse,onChange:()=>r(e=>({...e,reverse:!e.reverse}))}),label:"Is Ascending",labelPlacement:"end"}),n.jsx(o.FormControlLabel,{control:n.jsx(o.Checkbox,{checked:i.hasHeader,onChange:()=>r(e=>({...e,hasHeader:!e.hasHeader}))}),label:"Has Header",labelPlacement:"end"}),n.jsx(o.FormControlLabel,{control:n.jsx(o.Checkbox,{checked:i.collatorOptions?.sensitivity===t.Sort.CaseSensitiveOptions.sensitivity,onChange:()=>r(e=>({...e,collatorOptions:i.collatorOptions?.sensitivity===t.Sort.CaseSensitiveOptions.sensitivity?t.Sort.CaseInsensitiveOptions:t.Sort.CaseSensitiveOptions}))}),label:"Case Sensitive",labelPlacement:"end"}),n.jsx(o.FormControlLabel,{control:n.jsx(o.Checkbox,{checked:i.orientation===t.IRange.Orientation.Row,onChange:()=>r(e=>{const l=e.orientation===t.IRange.Orientation.Row?t.IRange.Orientation.Column:t.IRange.Orientation.Row;return{...u.getDefaultSortCriteria(l,C).options,includeHidden:e.includeHidden,reverse:e.reverse,orientation:l}})}),label:"Row Sort",labelPlacement:"end"}),n.jsx(o.FormControlLabel,{control:n.jsx(o.Checkbox,{checked:i.includeHidden,onChange:()=>r(e=>({...e,includeHidden:!e.includeHidden}))}),label:"Include Hidden",labelPlacement:"end"})]})})};exports.SortDialog=d,exports.default=d;
|