@sheetxl/studio-vanilla 0.1.98
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/LICENSE.md +11 -0
- package/README.md +100 -0
- package/build/browser/cjs/1q6_3-jGNZllbF3R.cjs +6 -0
- package/build/browser/cjs/5KDindu3wyLVvG7F.cjs +6 -0
- package/build/browser/cjs/87m5i_TKPbDn6tke.cjs +30 -0
- package/build/browser/cjs/B0L2YQ9agsyHWOu2.cjs +6 -0
- package/build/browser/cjs/B3HvYH5kqySWdJ0f.cjs +6 -0
- package/build/browser/cjs/B6AOUko0HYRy2MPw.cjs +6 -0
- package/build/browser/cjs/BC5MKXBhHGdPeiJ3.cjs +21 -0
- package/build/browser/cjs/BG0RxkPyZY6Be7Lk.cjs +6 -0
- package/build/browser/cjs/BJsJYwvFiJBFxTov.cjs +6 -0
- package/build/browser/cjs/BMVMyi5NiMBuQrl9.cjs +52 -0
- package/build/browser/cjs/BS_QXQWoKRl_7MiR.cjs +17 -0
- package/build/browser/cjs/BZPhmHWsFBTIA3BQ.cjs +210 -0
- package/build/browser/cjs/B_5ro-VEKfZDMSn_.cjs +6 -0
- package/build/browser/cjs/B_c3i0fXSlX7dH12.cjs +1521 -0
- package/build/browser/cjs/BarieqwSecnaFn0d.cjs +6 -0
- package/build/browser/cjs/BfNo_1u55uW2HhAa.cjs +6 -0
- package/build/browser/cjs/Bl6FyLoMkFiQqhvc.cjs +7 -0
- package/build/browser/cjs/Bsyzteo6tD31A45e.cjs +11 -0
- package/build/browser/cjs/Btzizuqo7zQ_grdS.cjs +16 -0
- package/build/browser/cjs/BxBOlXY9P3Ymi6oT.cjs +6 -0
- package/build/browser/cjs/C0AP85yKTJU5XzPW.cjs +6 -0
- package/build/browser/cjs/C0Pjx18ua-OCdtpy.cjs +6 -0
- package/build/browser/cjs/CA2wSX6txFrM5nXD.cjs +6 -0
- package/build/browser/cjs/CB3jEtNo5ZsjfE5p.cjs +6 -0
- package/build/browser/cjs/CDiYZ1cSoLW8U5Mz.cjs +6 -0
- package/build/browser/cjs/CHD5c5FdcMm6vLyG.cjs +155 -0
- package/build/browser/cjs/COCpf8tSdkj2O19V.cjs +134 -0
- package/build/browser/cjs/CTV1KRGhkieiY4Rf.cjs +42 -0
- package/build/browser/cjs/CUw8AoM-rVbp1W3s.cjs +6 -0
- package/build/browser/cjs/CVTydWBioXRZeoNf.cjs +6 -0
- package/build/browser/cjs/C_uXPPlfjY68-QA8.cjs +6 -0
- package/build/browser/cjs/CaNR-X0TWW9OF1S0.cjs +33 -0
- package/build/browser/cjs/CiySKEsfDr8XnkZh.cjs +6 -0
- package/build/browser/cjs/CtBikymnhpcCzP3X.cjs +6 -0
- package/build/browser/cjs/CyF7bxA0DO13ETpx.cjs +30 -0
- package/build/browser/cjs/D-vkFAlNHXwUvmUT.cjs +16 -0
- package/build/browser/cjs/D2OU29-ZPOAWFVJB.cjs +22 -0
- package/build/browser/cjs/DFX31uXp449or-Xs.cjs +6 -0
- package/build/browser/cjs/DLqNXuHYff_kQuj1.cjs +6 -0
- package/build/browser/cjs/DMKZDMHHXLePvLy3.cjs +524 -0
- package/build/browser/cjs/DP8biA0GQqyPKLyq.cjs +6 -0
- package/build/browser/cjs/DcYrNx0uy99yQNMl.cjs +21 -0
- package/build/browser/cjs/Dcyg_YxTfBgi_6cp.cjs +26 -0
- package/build/browser/cjs/DeR9YbwO2xDBKVWN.cjs +21 -0
- package/build/browser/cjs/DfNbgyjaLMn81dqP.cjs +6 -0
- package/build/browser/cjs/DirazCTz5IsFWrUv.cjs +22 -0
- package/build/browser/cjs/Dix4vuDuOzj4WGCJ.cjs +19 -0
- package/build/browser/cjs/DqbTRjj97q78RuGC.cjs +6 -0
- package/build/browser/cjs/Dy28YI90qj65PHFO.cjs +17 -0
- package/build/browser/cjs/Nkl33Tt1_oEy9kjk.cjs +6 -0
- package/build/browser/cjs/S1S-AvD0w8s-LV8O.cjs +6 -0
- package/build/browser/cjs/bnPgbgGBTq7DESzd.cjs +6 -0
- package/build/browser/cjs/d9tJGmGw-3KZjpAx.cjs +17 -0
- package/build/browser/cjs/dke2gbIUS44QXwEl.cjs +6 -0
- package/build/browser/cjs/index.cjs +6 -0
- package/build/browser/cjs/mPpQR06-jf99r2jM.cjs +6 -0
- package/build/browser/cjs/wq0Sm3fu9rxt43OK.cjs +6 -0
- package/build/browser/cjs/xM54FRmGddZFVTTI.cjs +6 -0
- package/build/browser/cjs/xgGpGg5b8fu3GAnL.cjs +33 -0
- package/build/browser/esm/1Jl9rrRJdbPsUP_1.mjs +13222 -0
- package/build/browser/esm/3RX6dP_O-47yXKHQ.mjs +1492 -0
- package/build/browser/esm/5F5MTh8R-sIiPq0h.mjs +22 -0
- package/build/browser/esm/B3_l6_TLa9ImyRmW.mjs +5572 -0
- package/build/browser/esm/B7odLLxNfEmKGWX6.mjs +49 -0
- package/build/browser/esm/BAjCWyggrIkCz6wr.mjs +22 -0
- package/build/browser/esm/BE4io65W825i_dzC.mjs +58 -0
- package/build/browser/esm/BEZ41ST3hkC4W-_9.mjs +22 -0
- package/build/browser/esm/BKkD05hqNTBap4Oc.mjs +22 -0
- package/build/browser/esm/BOiR2dTlvcgYjz8P.mjs +402 -0
- package/build/browser/esm/BOjAZRs_NVerYv4t.mjs +22 -0
- package/build/browser/esm/BRkMPyIUXMixnL8d.mjs +22 -0
- package/build/browser/esm/BSS_RvWzDRX8_EJd.mjs +1684 -0
- package/build/browser/esm/BXC9rQVV2gq5x8br.mjs +22 -0
- package/build/browser/esm/BYmMkbrRTsNuR3aY.mjs +1358 -0
- package/build/browser/esm/BaSzK17p3_gCvNVV.mjs +24 -0
- package/build/browser/esm/BdtlmF31h4Y7RgUj.mjs +22 -0
- package/build/browser/esm/Be3zRnYQ13HUcsRW.mjs +150 -0
- package/build/browser/esm/BiSk8LRROMF0Bl4-.mjs +92 -0
- package/build/browser/esm/BlfHOASL_bJ6Hy0y.mjs +40 -0
- package/build/browser/esm/C-jC-wgAoMOxrVvv.mjs +1377 -0
- package/build/browser/esm/C0Lw5hMgKbooA6Jl.mjs +22 -0
- package/build/browser/esm/C32FpMEFLbDnBtO3.mjs +22 -0
- package/build/browser/esm/C9uN8RnLjnGSimTA.mjs +439 -0
- package/build/browser/esm/CB0UHheTgg0735hj.mjs +52 -0
- package/build/browser/esm/CU55zbw8Xbwap6Tl.mjs +22 -0
- package/build/browser/esm/CWRCdxOg103AFis3.mjs +3926 -0
- package/build/browser/esm/CpJdzwQYkBw7IPnN.mjs +22 -0
- package/build/browser/esm/CprFmxuwGvaUtLG2.mjs +22 -0
- package/build/browser/esm/CtZxtE4tRmMGFT5o.mjs +22 -0
- package/build/browser/esm/D-Oj36iQScXAKSMA.mjs +53 -0
- package/build/browser/esm/D2yyUr4KbJEFsxKC.mjs +21 -0
- package/build/browser/esm/D8HF2X8hvAkV29oq.mjs +55 -0
- package/build/browser/esm/DCauh523moR7slpq.mjs +22 -0
- package/build/browser/esm/DIA-Gy5mdjefjUaA.mjs +22 -0
- package/build/browser/esm/DJjdfX9aUyVGMkri.mjs +47 -0
- package/build/browser/esm/DMWb8cCaNVRcm-tT.mjs +2352 -0
- package/build/browser/esm/DP7HVKT0w_4L2vMQ.mjs +844 -0
- package/build/browser/esm/DToiYU1jffn1g7TH.mjs +639 -0
- package/build/browser/esm/DgSuz0WKGy36a2cp.mjs +22 -0
- package/build/browser/esm/Dgw3FTbNKuo2CIxP.mjs +22 -0
- package/build/browser/esm/DnV_Y9xoMPSav0-o.mjs +56 -0
- package/build/browser/esm/Do7pHqmnwO45_ymt.mjs +22 -0
- package/build/browser/esm/DqvZDTDIyX-qv4r9.mjs +29 -0
- package/build/browser/esm/Ds8V__cRAClpmjZn.mjs +1714 -0
- package/build/browser/esm/DtQdtXJDZgNEIz9d.mjs +440 -0
- package/build/browser/esm/DtpBQqwK7XXBMTB-.mjs +1598 -0
- package/build/browser/esm/DuzJ1k0LbZ29l8oN.mjs +945 -0
- package/build/browser/esm/Dxl4WJXcEhDAw_yE.mjs +42 -0
- package/build/browser/esm/LblYfFi1ns9H1ueN.mjs +28 -0
- package/build/browser/esm/NBkvFJzfLU32Pkup.mjs +496 -0
- package/build/browser/esm/SrBQAOpMKiDW0mGB.mjs +22 -0
- package/build/browser/esm/VLa1cYMb7h6UD253.mjs +64 -0
- package/build/browser/esm/YOEDF-U1QTzbXeMV.mjs +3826 -0
- package/build/browser/esm/a3tuiJ83MwzLMWaL.mjs +22 -0
- package/build/browser/esm/ai2Jw3PRL29E1T8h.mjs +22 -0
- package/build/browser/esm/ajBoEmoL9hCBQYYm.mjs +2175 -0
- package/build/browser/esm/index.mjs +13 -0
- package/build/browser/esm/k9kWmEk0ZT8y9Gii.mjs +48740 -0
- package/build/cdn/assets/1Jl9rrRJdbPsUP_1.js +13222 -0
- package/build/cdn/assets/4u46flV9M6Bwb7d3.js +29 -0
- package/build/cdn/assets/5F5MTh8R-sIiPq0h.js +22 -0
- package/build/cdn/assets/B3oMCEEls1lRVrGd.js +5572 -0
- package/build/cdn/assets/B4QYfmNd300iFLAx.js +945 -0
- package/build/cdn/assets/BAjCWyggrIkCz6wr.js +22 -0
- package/build/cdn/assets/BEZ41ST3hkC4W-_9.js +22 -0
- package/build/cdn/assets/BJIsFTUdHtUKsFJs.js +28 -0
- package/build/cdn/assets/BKkD05hqNTBap4Oc.js +22 -0
- package/build/cdn/assets/BOiR2dTlvcgYjz8P.js +402 -0
- package/build/cdn/assets/BOjAZRs_NVerYv4t.js +22 -0
- package/build/cdn/assets/BPFW3UexkNNh1lLK.js +2352 -0
- package/build/cdn/assets/BRkMPyIUXMixnL8d.js +22 -0
- package/build/cdn/assets/BSS_RvWzDRX8_EJd.js +1684 -0
- package/build/cdn/assets/BXC9rQVV2gq5x8br.js +22 -0
- package/build/cdn/assets/BY2sO3ExW1ShzKnX.js +1714 -0
- package/build/cdn/assets/BYmMkbrRTsNuR3aY.js +1358 -0
- package/build/cdn/assets/BaSzK17p3_gCvNVV.js +24 -0
- package/build/cdn/assets/BbpmcI-KEp3PqrdL.js +496 -0
- package/build/cdn/assets/BdtlmF31h4Y7RgUj.js +22 -0
- package/build/cdn/assets/BjgtkLR9U00HgSRn.js +58 -0
- package/build/cdn/assets/BlfHOASL_bJ6Hy0y.js +40 -0
- package/build/cdn/assets/C-jC-wgAoMOxrVvv.js +1377 -0
- package/build/cdn/assets/C0Lw5hMgKbooA6Jl.js +22 -0
- package/build/cdn/assets/C32FpMEFLbDnBtO3.js +22 -0
- package/build/cdn/assets/C7CDwp-nhN2WFzUs.js +844 -0
- package/build/cdn/assets/C9uN8RnLjnGSimTA.js +439 -0
- package/build/cdn/assets/CEq_C1Sim0pQ6fj0.js +56 -0
- package/build/cdn/assets/CLdcRW7BQK3JCguC.js +48587 -0
- package/build/cdn/assets/CU55zbw8Xbwap6Tl.js +22 -0
- package/build/cdn/assets/C_L_pvQemfhI00iS.js +150 -0
- package/build/cdn/assets/CkhSGQneqlTRflfQ.js +47 -0
- package/build/cdn/assets/CpJdzwQYkBw7IPnN.js +22 -0
- package/build/cdn/assets/CprFmxuwGvaUtLG2.js +22 -0
- package/build/cdn/assets/CtZxtE4tRmMGFT5o.js +22 -0
- package/build/cdn/assets/CvbyGDitUPabmYBl.js +64 -0
- package/build/cdn/assets/D06aHumWZLILF489.js +3926 -0
- package/build/cdn/assets/D2pceTwrS_dagByu.js +21 -0
- package/build/cdn/assets/D4ZBjoUG2QO1RO3t.js +1492 -0
- package/build/cdn/assets/DARyg_kqL8Eu81Fa.js +2175 -0
- package/build/cdn/assets/DCauh523moR7slpq.js +22 -0
- package/build/cdn/assets/DIA-Gy5mdjefjUaA.js +22 -0
- package/build/cdn/assets/DLHK1pMyNN3B2g-j.js +52 -0
- package/build/cdn/assets/DMoEzt3UKZedfext.js +1598 -0
- package/build/cdn/assets/DMwOymY267-LxmJ_.js +49 -0
- package/build/cdn/assets/DToiYU1jffn1g7TH.js +639 -0
- package/build/cdn/assets/DUUO52IRQCve_iCM.js +440 -0
- package/build/cdn/assets/DgSuz0WKGy36a2cp.js +22 -0
- package/build/cdn/assets/Dgw3FTbNKuo2CIxP.js +22 -0
- package/build/cdn/assets/Do7pHqmnwO45_ymt.js +22 -0
- package/build/cdn/assets/Dxl4WJXcEhDAw_yE.js +42 -0
- package/build/cdn/assets/QXzPuadwi3BBJC2-.js +53 -0
- package/build/cdn/assets/SrBQAOpMKiDW0mGB.js +22 -0
- package/build/cdn/assets/W3SqjN4yIzwYTvvj.js +55 -0
- package/build/cdn/assets/YOEDF-U1QTzbXeMV.js +3826 -0
- package/build/cdn/assets/a3tuiJ83MwzLMWaL.js +22 -0
- package/build/cdn/assets/ai2Jw3PRL29E1T8h.js +22 -0
- package/build/cdn/assets/fWcbv7BXhriCYeod.js +92 -0
- package/build/cdn/index.js +171 -0
- package/build/cdn/loader.js +6 -0
- package/build/licenses/dependencies.txt +1 -0
- package/build/package.json +61 -0
- package/build/types/index.d.ts +151 -0
- package/package.json +92 -0
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";/**
|
|
2
|
+
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.0.0
|
|
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 z=require("react/jsx-runtime"),j=require("react"),I=require("./DMKZDMHHXLePvLy3.cjs"),_t=I.uX(I.vg());function Yt(e){return(Yt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r})(e)}var Gu=/^\s+/,Ju=/\s+$/;function O(e,r){if(r=r||{},(e=e||"")instanceof O)return e;if(!(this instanceof O))return new O(e,r);var t,n,o,f,i,u,a,l,h,b,p,g=(i={r:0,g:0,b:0},u=1,a=null,l=null,h=null,b=!1,p=!1,typeof(t=e)=="string"&&(t=function(c){c=c.replace(Gu,"").replace(Ju,"").toLowerCase();var s,d=!1;if(It[c])c=It[c],d=!0;else if(c=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};return(s=N.rgb.exec(c))?{r:s[1],g:s[2],b:s[3]}:(s=N.rgba.exec(c))?{r:s[1],g:s[2],b:s[3],a:s[4]}:(s=N.hsl.exec(c))?{h:s[1],s:s[2],l:s[3]}:(s=N.hsla.exec(c))?{h:s[1],s:s[2],l:s[3],a:s[4]}:(s=N.hsv.exec(c))?{h:s[1],s:s[2],v:s[3]}:(s=N.hsva.exec(c))?{h:s[1],s:s[2],v:s[3],a:s[4]}:(s=N.hex8.exec(c))?{r:$(s[1]),g:$(s[2]),b:$(s[3]),a:ve(s[4]),format:d?"name":"hex8"}:(s=N.hex6.exec(c))?{r:$(s[1]),g:$(s[2]),b:$(s[3]),format:d?"name":"hex"}:(s=N.hex4.exec(c))?{r:$(s[1]+""+s[1]),g:$(s[2]+""+s[2]),b:$(s[3]+""+s[3]),a:ve(s[4]+""+s[4]),format:d?"name":"hex8"}:!!(s=N.hex3.exec(c))&&{r:$(s[1]+""+s[1]),g:$(s[2]+""+s[2]),b:$(s[3]+""+s[3]),format:d?"name":"hex"}}(t)),Yt(t)=="object"&&(Q(t.r)&&Q(t.g)&&Q(t.b)?(n=t.r,o=t.g,f=t.b,i={r:255*D(n,255),g:255*D(o,255),b:255*D(f,255)},b=!0,p=String(t.r).substr(-1)==="%"?"prgb":"rgb"):Q(t.h)&&Q(t.s)&&Q(t.v)?(a=vt(t.s),l=vt(t.v),i=function(c,s,d){c=6*D(c,360),s=D(s,100),d=D(d,100);var v=Math.floor(c),y=c-v,_=d*(1-s),m=d*(1-y*s),w=d*(1-(1-y)*s),C=v%6;return{r:255*[d,m,_,_,w,d][C],g:255*[w,d,d,m,_,_][C],b:255*[_,_,w,d,d,m][C]}}(t.h,a,l),b=!0,p="hsv"):Q(t.h)&&Q(t.s)&&Q(t.l)&&(a=vt(t.s),h=vt(t.l),i=function(c,s,d){var v,y,_;function m(A,P,M){return M<0&&(M+=1),M>1&&(M-=1),M<1/6?A+6*(P-A)*M:M<.5?P:M<2/3?A+(P-A)*(2/3-M)*6:A}if(c=D(c,360),s=D(s,100),d=D(d,100),s===0)v=y=_=d;else{var w=d<.5?d*(1+s):d+s-d*s,C=2*d-w;v=m(C,w,c+1/3),y=m(C,w,c),_=m(C,w,c-1/3)}return{r:255*v,g:255*y,b:255*_}}(t.h,a,h),b=!0,p="hsl"),t.hasOwnProperty("a")&&(u=t.a)),u=xu(u),{ok:b,format:t.format||p,r:Math.min(255,Math.max(i.r,0)),g:Math.min(255,Math.max(i.g,0)),b:Math.min(255,Math.max(i.b,0)),a:u});this._originalInput=e,this._r=g.r,this._g=g.g,this._b=g.b,this._a=g.a,this._roundA=Math.round(100*this._a)/100,this._format=r.format||g.format,this._gradientType=r.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=g.ok}function le(e,r,t){e=D(e,255),r=D(r,255),t=D(t,255);var n,o,f=Math.max(e,r,t),i=Math.min(e,r,t),u=(f+i)/2;if(f==i)n=o=0;else{var a=f-i;switch(o=u>.5?a/(2-f-i):a/(f+i),f){case e:n=(r-t)/a+(r<t?6:0);break;case r:n=(t-e)/a+2;break;case t:n=(e-r)/a+4}n/=6}return{h:n,s:o,l:u}}function he(e,r,t){e=D(e,255),r=D(r,255),t=D(t,255);var n,o,f=Math.max(e,r,t),i=Math.min(e,r,t),u=f,a=f-i;if(o=f===0?0:a/f,f==i)n=0;else{switch(f){case e:n=(r-t)/a+(r<t?6:0);break;case r:n=(t-e)/a+2;break;case t:n=(e-r)/a+4}n/=6}return{h:n,s:o,v:u}}function pe(e,r,t,n){var o=[V(Math.round(e).toString(16)),V(Math.round(r).toString(16)),V(Math.round(t).toString(16))];return n&&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 de(e,r,t,n){return[V(ju(n)),V(Math.round(e).toString(16)),V(Math.round(r).toString(16)),V(Math.round(t).toString(16))].join("")}function Qu(e,r){r=r===0?0:r||10;var t=O(e).toHsl();return t.s-=r/100,t.s=Tt(t.s),O(t)}function Zu(e,r){r=r===0?0:r||10;var t=O(e).toHsl();return t.s+=r/100,t.s=Tt(t.s),O(t)}function ts(e){return O(e).desaturate(100)}function es(e,r){r=r===0?0:r||10;var t=O(e).toHsl();return t.l+=r/100,t.l=Tt(t.l),O(t)}function rs(e,r){r=r===0?0:r||10;var t=O(e).toRgb();return t.r=Math.max(0,Math.min(255,t.r-Math.round(-r/100*255))),t.g=Math.max(0,Math.min(255,t.g-Math.round(-r/100*255))),t.b=Math.max(0,Math.min(255,t.b-Math.round(-r/100*255))),O(t)}function ns(e,r){r=r===0?0:r||10;var t=O(e).toHsl();return t.l-=r/100,t.l=Tt(t.l),O(t)}function os(e,r){var t=O(e).toHsl(),n=(t.h+r)%360;return t.h=n<0?360+n:n,O(t)}function as(e){var r=O(e).toHsl();return r.h=(r.h+180)%360,O(r)}function be(e,r){if(isNaN(r)||r<=0)throw new Error("Argument to polyad must be a positive number");for(var t=O(e).toHsl(),n=[O(e)],o=360/r,f=1;f<r;f++)n.push(O({h:(t.h+f*o)%360,s:t.s,l:t.l}));return n}function is(e){var r=O(e).toHsl(),t=r.h;return[O(e),O({h:(t+72)%360,s:r.s,l:r.l}),O({h:(t+216)%360,s:r.s,l:r.l})]}function us(e,r,t){r=r||6,t=t||30;var n=O(e).toHsl(),o=360/t,f=[O(e)];for(n.h=(n.h-(o*r>>1)+720)%360;--r;)n.h=(n.h+o)%360,f.push(O(n));return f}function ss(e,r){r=r||6;for(var t=O(e).toHsv(),n=t.h,o=t.s,f=t.v,i=[],u=1/r;r--;)i.push(O({h:n,s:o,v:f})),f=(f+u)%1;return i}O.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 e=this.toRgb();return(299*e.r+587*e.g+114*e.b)/1e3},getLuminance:function(){var e,r,t,n=this.toRgb();return e=n.r/255,r=n.g/255,t=n.b/255,.2126*(e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4))+.7152*(r<=.03928?r/12.92:Math.pow((r+.055)/1.055,2.4))+.0722*(t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4))},setAlpha:function(e){return this._a=xu(e),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var e=he(this._r,this._g,this._b);return{h:360*e.h,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=he(this._r,this._g,this._b),r=Math.round(360*e.h),t=Math.round(100*e.s),n=Math.round(100*e.v);return this._a==1?"hsv("+r+", "+t+"%, "+n+"%)":"hsva("+r+", "+t+"%, "+n+"%, "+this._roundA+")"},toHsl:function(){var e=le(this._r,this._g,this._b);return{h:360*e.h,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=le(this._r,this._g,this._b),r=Math.round(360*e.h),t=Math.round(100*e.s),n=Math.round(100*e.l);return this._a==1?"hsl("+r+", "+t+"%, "+n+"%)":"hsla("+r+", "+t+"%, "+n+"%, "+this._roundA+")"},toHex:function(e){return pe(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return r=this._r,t=this._g,n=this._b,o=this._a,f=e,i=[V(Math.round(r).toString(16)),V(Math.round(t).toString(16)),V(Math.round(n).toString(16)),V(ju(o))],f&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)&&i[3].charAt(0)==i[3].charAt(1)?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0)+i[3].charAt(0):i.join("");var r,t,n,o,f,i},toHex8String:function(e){return"#"+this.toHex8(e)},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*D(this._r,255))+"%",g:Math.round(100*D(this._g,255))+"%",b:Math.round(100*D(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(100*D(this._r,255))+"%, "+Math.round(100*D(this._g,255))+"%, "+Math.round(100*D(this._b,255))+"%)":"rgba("+Math.round(100*D(this._r,255))+"%, "+Math.round(100*D(this._g,255))+"%, "+Math.round(100*D(this._b,255))+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":!(this._a<1)&&(cs[pe(this._r,this._g,this._b,!0)]||!1)},toFilter:function(e){var r="#"+de(this._r,this._g,this._b,this._a),t=r,n=this._gradientType?"GradientType = 1, ":"";if(e){var o=O(e);t="#"+de(o._r,o._g,o._b,o._a)}return"progid:DXImageTransform.Microsoft.gradient("+n+"startColorstr="+r+",endColorstr="+t+")"},toString:function(e){var r=!!e;e=e||this._format;var t=!1,n=this._a<1&&this._a>=0;return r||!n||e!=="hex"&&e!=="hex6"&&e!=="hex3"&&e!=="hex4"&&e!=="hex8"&&e!=="name"?(e==="rgb"&&(t=this.toRgbString()),e==="prgb"&&(t=this.toPercentageRgbString()),e!=="hex"&&e!=="hex6"||(t=this.toHexString()),e==="hex3"&&(t=this.toHexString(!0)),e==="hex4"&&(t=this.toHex8String(!0)),e==="hex8"&&(t=this.toHex8String()),e==="name"&&(t=this.toName()),e==="hsl"&&(t=this.toHslString()),e==="hsv"&&(t=this.toHsvString()),t||this.toHexString()):e==="name"&&this._a===0?this.toName():this.toRgbString()},clone:function(){return O(this.toString())},_applyModification:function(e,r){var t=e.apply(null,[this].concat([].slice.call(r)));return this._r=t._r,this._g=t._g,this._b=t._b,this.setAlpha(t._a),this},lighten:function(){return this._applyModification(es,arguments)},brighten:function(){return this._applyModification(rs,arguments)},darken:function(){return this._applyModification(ns,arguments)},desaturate:function(){return this._applyModification(Qu,arguments)},saturate:function(){return this._applyModification(Zu,arguments)},greyscale:function(){return this._applyModification(ts,arguments)},spin:function(){return this._applyModification(os,arguments)},_applyCombination:function(e,r){return e.apply(null,[this].concat([].slice.call(r)))},analogous:function(){return this._applyCombination(us,arguments)},complement:function(){return this._applyCombination(as,arguments)},monochromatic:function(){return this._applyCombination(ss,arguments)},splitcomplement:function(){return this._applyCombination(is,arguments)},triad:function(){return this._applyCombination(be,[3])},tetrad:function(){return this._applyCombination(be,[4])}},O.fromRatio=function(e,r){if(Yt(e)=="object"){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[n]=n==="a"?e[n]:vt(e[n]));e=t}return O(e,r)},O.equals=function(e,r){return!(!e||!r)&&O(e).toRgbString()==O(r).toRgbString()},O.random=function(){return O.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})},O.mix=function(e,r,t){t=t===0?0:t||50;var n=O(e).toRgb(),o=O(r).toRgb(),f=t/100;return O({r:(o.r-n.r)*f+n.r,g:(o.g-n.g)*f+n.g,b:(o.b-n.b)*f+n.b,a:(o.a-n.a)*f+n.a})},O.readability=function(e,r){var t=O(e),n=O(r);return(Math.max(t.getLuminance(),n.getLuminance())+.05)/(Math.min(t.getLuminance(),n.getLuminance())+.05)},O.isReadable=function(e,r,t){var n,o,f,i,u,a=O.readability(e,r);switch(o=!1,(f=t,(i=((f=f||{level:"AA",size:"small"}).level||"AA").toUpperCase())!=="AA"&&i!=="AAA"&&(i="AA"),(u=(f.size||"small").toLowerCase())!=="small"&&u!=="large"&&(u="small"),n={level:i,size:u}).level+n.size){case"AAsmall":case"AAAlarge":o=a>=4.5;break;case"AAlarge":o=a>=3;break;case"AAAsmall":o=a>=7}return o},O.mostReadable=function(e,r,t){var n,o,f,i,u=null,a=0;o=(t=t||{}).includeFallbackColors,f=t.level,i=t.size;for(var l=0;l<r.length;l++)(n=O.readability(e,r[l]))>a&&(a=n,u=O(r[l]));return O.isReadable(e,u,{level:f,size:i})||!o?u:(t.includeFallbackColors=!1,O.mostReadable(e,["#fff","#000"],t))};var It=O.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"},cs=O.hexNames=function(e){var r={};for(var t in e)e.hasOwnProperty(t)&&(r[e[t]]=t);return r}(It);function xu(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function D(e,r){var t;typeof(t=e)=="string"&&t.indexOf(".")!=-1&&parseFloat(t)===1&&(e="100%");var n=function(o){return typeof o=="string"&&o.indexOf("%")!=-1}(e);return e=Math.min(r,Math.max(0,parseFloat(e))),n&&(e=parseInt(e*r,10)/100),Math.abs(e-r)<1e-6?1:e%r/parseFloat(r)}function Tt(e){return Math.min(1,Math.max(0,e))}function $(e){return parseInt(e,16)}function V(e){return e.length==1?"0"+e:""+e}function vt(e){return e<=1&&(e=100*e+"%"),e}function ju(e){return Math.round(255*parseFloat(e)).toString(16)}function ve(e){return $(e)/255}var et,wt,xt,N=(wt="[\\s|\\(]+("+(et="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+et+")[,|\\s]+("+et+")\\s*\\)?",xt="[\\s|\\(]+("+et+")[,|\\s]+("+et+")[,|\\s]+("+et+")[,|\\s]+("+et+")\\s*\\)?",{CSS_UNIT:new RegExp(et),rgb:new RegExp("rgb"+wt),rgba:new RegExp("rgba"+xt),hsl:new RegExp("hsl"+wt),hsla:new RegExp("hsla"+xt),hsv:new RegExp("hsv"+wt),hsva:new RegExp("hsva"+xt),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 Q(e){return!!N.CSS_UNIT.exec(e)}var ge,ye,me,_e,we,xe,je,Oe,Me,Se,ke,Ae,Ce,Ee,Re,Pe,Te,Le,Ue,Fe,De,Be,ze,He,We,$e,Ne,Ie,W={},ut={};function Ou(){if(ye)return ge;ye=1;var e=typeof I.m1=="object"&&I.m1&&I.m1.Object===Object&&I.m1;return ge=e}function K(){if(_e)return me;_e=1;var e=Ou(),r=typeof self=="object"&&self&&self.Object===Object&&self,t=e||r||Function("return this")();return me=t}function gt(){if(xe)return we;xe=1;var e=K().Symbol;return we=e}function nt(){if(Ae)return ke;Ae=1;var e=gt(),r=function(){if(Oe)return je;Oe=1;var o=gt(),f=Object.prototype,i=f.hasOwnProperty,u=f.toString,a=o?o.toStringTag:void 0;return je=function(l){var h=i.call(l,a),b=l[a];try{l[a]=void 0;var p=!0}catch{}var g=u.call(l);return p&&(h?l[a]=b:delete l[a]),g}}(),t=function(){if(Se)return Me;Se=1;var o=Object.prototype.toString;return Me=function(f){return o.call(f)}}(),n=e?e.toStringTag:void 0;return ke=function(o){return o==null?o===void 0?"[object Undefined]":"[object Null]":n&&n in Object(o)?r(o):t(o)}}function X(){if(Ee)return Ce;Ee=1;var e=Array.isArray;return Ce=e}function Z(){return Pe?Re:(Pe=1,Re=function(e){return e!=null&&typeof e=="object"})}function Mu(){if(Ie)return Ne;Ie=1;var e=function(){if($e)return We;$e=1;var i=nt(),u=Z();return We=function(a){return u(a)&&i(a)=="[object Arguments]"}}(),r=Z(),t=Object.prototype,n=t.hasOwnProperty,o=t.propertyIsEnumerable,f=e(function(){return arguments}())?e:function(i){return r(i)&&n.call(i,"callee")&&!o.call(i,"callee")};return Ne=f}var Ve,Xe,qe,Ye,Ke,Ge,Je,Qe,Ze,tr,er,Lt={exports:{}};function Kt(){return qe||(qe=1,e=Lt,r=Lt.exports,t=K(),n=Xe?Ve:(Xe=1,Ve=function(){return!1}),o=r&&!r.nodeType&&r,f=o&&e&&!e.nodeType&&e,i=f&&f.exports===o?t.Buffer:void 0,u=(i?i.isBuffer:void 0)||n,e.exports=u),Lt.exports;var e,r,t,n,o,f,i,u}function Su(){if(Ke)return Ye;Ke=1;var e=/^(?:0|[1-9]\d*)$/;return Ye=function(r,t){var n=typeof r;return!!(t=t??9007199254740991)&&(n=="number"||n!="symbol"&&e.test(r))&&r>-1&&r%1==0&&r<t}}function Gt(){return Je?Ge:(Je=1,Ge=function(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=9007199254740991})}function Vt(){return er?tr:(er=1,tr=function(e){return function(r){return e(r)}})}var rr,nr,or,ar,ir,ur,sr,cr,fr,lr,hr,pr,dr,br,vr,gr,yr,mr,_r,wr,xr,jr,Or,Mr,Sr,kr,Ar,Cr,Er,Rr,Pr,Tr,Lr,Ur,Fr,Dr,Br,zr,Hr,Wr,$r,Nr,Ir,Vr,Xr,qr,Yr,Kr,Gr,Jr,Qr,Zr,tn,en,rn,nn,on,an,un,sn,cn,fn,ln,hn,pn,dn,bn,vn,gn,yn,mn,_n,wn,xn,jn,On,Mn,Sn,kn,An,Cn,En,Rn,Pn,Tn,Ln,Un,Fn,Dn,Bn,zn,Hn,Wn,$n,Nn,In,Vn,Xn,qn,Yn,Kn,Gn,Jn,Qn,Zn,to,eo,ro,no,oo,ao,io,uo,so,co,fo,lo,ho,po,bo,vo,go,yo,mo,_o,wo,xo,jo,Oo,Mo,So,ko,Ao,Co,Eo,Ro,Po,To,Lo,Uo,Fo,Do,Bo,zo,Ho,Wo,$o,No,Io,Vo,Xo,qo,Yo,Ko,Go,Jo,Qo,Zo,ta,ea,ra,na,oa,aa,ia,ua,sa,ca,fa,la,ha,pa,da,ba,va,ga,ya,ma,_a,wa,xa,ja,Oa,Ma,Sa,ka,Aa,Ca,Ea,Ra,Pa,Ta,La,Ua,Fa,Da,Ba,za,Ha,Wa,$a,Na,Ia,Va,Xa,qa,Ya,Ka,Ga,Ja,Qa,Za,Ut={exports:{}};function Xt(){return rr||(rr=1,e=Ut,r=Ut.exports,t=Ou(),n=r&&!r.nodeType&&r,o=n&&e&&!e.nodeType&&e,f=o&&o.exports===n&&t.process,i=function(){try{return o&&o.require&&o.require("util").types||f&&f.binding&&f.binding("util")}catch{}}(),e.exports=i),Ut.exports;var e,r,t,n,o,f,i}function ku(){if(or)return nr;or=1;var e=function(){if(Ze)return Qe;Ze=1;var f=nt(),i=Gt(),u=Z(),a={};return a["[object Float32Array]"]=a["[object Float64Array]"]=a["[object Int8Array]"]=a["[object Int16Array]"]=a["[object Int32Array]"]=a["[object Uint8Array]"]=a["[object Uint8ClampedArray]"]=a["[object Uint16Array]"]=a["[object Uint32Array]"]=!0,a["[object Arguments]"]=a["[object Array]"]=a["[object ArrayBuffer]"]=a["[object Boolean]"]=a["[object DataView]"]=a["[object Date]"]=a["[object Error]"]=a["[object Function]"]=a["[object Map]"]=a["[object Number]"]=a["[object Object]"]=a["[object RegExp]"]=a["[object Set]"]=a["[object String]"]=a["[object WeakMap]"]=!1,Qe=function(l){return u(l)&&i(l.length)&&!!a[f(l)]}}(),r=Vt(),t=Xt(),n=t&&t.isTypedArray,o=n?r(n):e;return nr=o}function Au(){if(ir)return ar;ir=1;var e=He?ze:(He=1,ze=function(u,a){for(var l=-1,h=Array(u);++l<u;)h[l]=a(l);return h}),r=Mu(),t=X(),n=Kt(),o=Su(),f=ku(),i=Object.prototype.hasOwnProperty;return ar=function(u,a){var l=t(u),h=!l&&r(u),b=!l&&!h&&n(u),p=!l&&!h&&!b&&f(u),g=l||h||b||p,c=g?e(u.length,String):[],s=c.length;for(var d in u)!a&&!i.call(u,d)||g&&(d=="length"||b&&(d=="offset"||d=="parent")||p&&(d=="buffer"||d=="byteLength"||d=="byteOffset")||o(d,s))||c.push(d);return c}}function Jt(){if(sr)return ur;sr=1;var e=Object.prototype;return ur=function(r){var t=r&&r.constructor;return r===(typeof t=="function"&&t.prototype||e)}}function Cu(){return fr?cr:(fr=1,cr=function(e,r){return function(t){return e(r(t))}})}function ht(){return vr?br:(vr=1,br=function(e){var r=typeof e;return e!=null&&(r=="object"||r=="function")})}function Eu(){if(yr)return gr;yr=1;var e=nt(),r=ht();return gr=function(t){if(!r(t))return!1;var n=e(t);return n=="[object Function]"||n=="[object GeneratorFunction]"||n=="[object AsyncFunction]"||n=="[object Proxy]"}}function Ct(){if(_r)return mr;_r=1;var e=Eu(),r=Gt();return mr=function(t){return t!=null&&r(t.length)&&!e(t)}}function yt(){if(xr)return wr;xr=1;var e=Au(),r=function(){if(dr)return pr;dr=1;var n=Jt(),o=function(){if(hr)return lr;hr=1;var i=Cu()(Object.keys,Object);return lr=i}(),f=Object.prototype.hasOwnProperty;return pr=function(i){if(!n(i))return o(i);var u=[];for(var a in Object(i))f.call(i,a)&&a!="constructor"&&u.push(a);return u}}(),t=Ct();return wr=function(n){return t(n)?e(n):r(n)}}function Ru(){if(Or)return jr;Or=1;var e=function(){if(Be)return De;Be=1;var t=(Fe?Ue:(Fe=1,Ue=function(n){return function(o,f,i){for(var u=-1,a=Object(o),l=i(o),h=l.length;h--;){var b=l[n?h:++u];if(f(a[b],b,a)===!1)break}return o}}))();return De=t}(),r=yt();return jr=function(t,n){return t&&e(t,n,r)}}function Pu(){return Sr?Mr:(Sr=1,Mr=function(e){return e})}function Ft(){if(Er)return Cr;Er=1;var e=Ru(),r=function(){if(Ar)return kr;Ar=1;var t=Pu();return kr=function(n){return typeof n=="function"?n:t}}();return Cr=function(t,n){return t&&e(t,r(n))}}function Qt(){if(Pr)return Rr;Pr=1;var e=Cu()(Object.getPrototypeOf,Object);return Rr=e}function Tu(){return Fr?Ur:(Fr=1,Ur=function(e,r){for(var t=-1,n=e==null?0:e.length,o=Array(n);++t<n;)o[t]=r(e[t],t,e);return o})}function Zt(){return Hr?zr:(Hr=1,zr=function(e,r){return e===r||e!=e&&r!=r})}function jt(){if($r)return Wr;$r=1;var e=Zt();return Wr=function(r,t){for(var n=r.length;n--;)if(e(r[n][0],t))return n;return-1}}function kt(){if(Qr)return Jr;Qr=1;var e=Br?Dr:(Br=1,Dr=function(){this.__data__=[],this.size=0}),r=function(){if(Ir)return Nr;Ir=1;var i=jt(),u=Array.prototype.splice;return Nr=function(a){var l=this.__data__,h=i(l,a);return!(h<0||(h==l.length-1?l.pop():u.call(l,h,1),--this.size,0))}}(),t=function(){if(Xr)return Vr;Xr=1;var i=jt();return Vr=function(u){var a=this.__data__,l=i(a,u);return l<0?void 0:a[l][1]}}(),n=function(){if(Yr)return qr;Yr=1;var i=jt();return qr=function(u){return i(this.__data__,u)>-1}}(),o=function(){if(Gr)return Kr;Gr=1;var i=jt();return Kr=function(u,a){var l=this.__data__,h=i(l,u);return h<0?(++this.size,l.push([u,a])):l[h][1]=a,this}}();function f(i){var u=-1,a=i==null?0:i.length;for(this.clear();++u<a;){var l=i[u];this.set(l[0],l[1])}}return f.prototype.clear=e,f.prototype.delete=r,f.prototype.get=t,f.prototype.has=n,f.prototype.set=o,Jr=f}function Lu(){if(pn)return hn;pn=1;var e=Function.prototype.toString;return hn=function(r){if(r!=null){try{return e.call(r)}catch{}try{return r+""}catch{}}return""}}function rt(){if(mn)return yn;mn=1;var e=function(){if(bn)return dn;bn=1;var t=Eu(),n=function(){if(ln)return fn;ln=1;var p,g=function(){if(cn)return sn;cn=1;var s=K()["__core-js_shared__"];return sn=s}(),c=(p=/[^.]+$/.exec(g&&g.keys&&g.keys.IE_PROTO||""))?"Symbol(src)_1."+p:"";return fn=function(s){return!!c&&c in s}}(),o=ht(),f=Lu(),i=/^\[object .+?Constructor\]$/,u=Function.prototype,a=Object.prototype,l=u.toString,h=a.hasOwnProperty,b=RegExp("^"+l.call(h).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");return dn=function(p){return!(!o(p)||n(p))&&(t(p)?b:i).test(f(p))}}(),r=gn?vn:(gn=1,vn=function(t,n){return t?.[n]});return yn=function(t,n){var o=r(t,n);return e(o)?o:void 0}}function te(){if(wn)return _n;wn=1;var e=rt()(K(),"Map");return _n=e}function Ot(){if(jn)return xn;jn=1;var e=rt()(Object,"create");return xn=e}function Mt(){if(Wn)return Hn;Wn=1;var e=zn?Bn:(zn=1,Bn=function(r){var t=typeof r;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?r!=="__proto__":r===null});return Hn=function(r,t){var n=r.__data__;return e(t)?n[typeof t=="string"?"string":"hash"]:n.map}}function ee(){if(Jn)return Gn;Jn=1;var e=function(){if(Dn)return Fn;Dn=1;var i=function(){if(Un)return Ln;Un=1;var l=function(){if(Mn)return On;Mn=1;var s=Ot();return On=function(){this.__data__=s?s(null):{},this.size=0}}(),h=kn?Sn:(kn=1,Sn=function(s){var d=this.has(s)&&delete this.__data__[s];return this.size-=d?1:0,d}),b=function(){if(Cn)return An;Cn=1;var s=Ot(),d=Object.prototype.hasOwnProperty;return An=function(v){var y=this.__data__;if(s){var _=y[v];return _==="__lodash_hash_undefined__"?void 0:_}return d.call(y,v)?y[v]:void 0}}(),p=function(){if(Rn)return En;Rn=1;var s=Ot(),d=Object.prototype.hasOwnProperty;return En=function(v){var y=this.__data__;return s?y[v]!==void 0:d.call(y,v)}}(),g=function(){if(Tn)return Pn;Tn=1;var s=Ot();return Pn=function(d,v){var y=this.__data__;return this.size+=this.has(d)?0:1,y[d]=s&&v===void 0?"__lodash_hash_undefined__":v,this}}();function c(s){var d=-1,v=s==null?0:s.length;for(this.clear();++d<v;){var y=s[d];this.set(y[0],y[1])}}return c.prototype.clear=l,c.prototype.delete=h,c.prototype.get=b,c.prototype.has=p,c.prototype.set=g,Ln=c}(),u=kt(),a=te();return Fn=function(){this.size=0,this.__data__={hash:new i,map:new(a||u),string:new i}}}(),r=function(){if(Nn)return $n;Nn=1;var i=Mt();return $n=function(u){var a=i(this,u).delete(u);return this.size-=a?1:0,a}}(),t=function(){if(Vn)return In;Vn=1;var i=Mt();return In=function(u){return i(this,u).get(u)}}(),n=function(){if(qn)return Xn;qn=1;var i=Mt();return Xn=function(u){return i(this,u).has(u)}}(),o=function(){if(Kn)return Yn;Kn=1;var i=Mt();return Yn=function(u,a){var l=i(this,u),h=l.size;return l.set(u,a),this.size+=l.size==h?0:1,this}}();function f(i){var u=-1,a=i==null?0:i.length;for(this.clear();++u<a;){var l=i[u];this.set(l[0],l[1])}}return f.prototype.clear=e,f.prototype.delete=r,f.prototype.get=t,f.prototype.has=n,f.prototype.set=o,Gn=f}function re(){if(eo)return to;eo=1;var e=kt(),r=function(){if(tn)return Zr;tn=1;var u=kt();return Zr=function(){this.__data__=new u,this.size=0}}(),t=rn?en:(rn=1,en=function(u){var a=this.__data__,l=a.delete(u);return this.size=a.size,l}),n=on?nn:(on=1,nn=function(u){return this.__data__.get(u)}),o=un?an:(un=1,an=function(u){return this.__data__.has(u)}),f=function(){if(Zn)return Qn;Zn=1;var u=kt(),a=te(),l=ee();return Qn=function(h,b){var p=this.__data__;if(p instanceof u){var g=p.__data__;if(!a||g.length<199)return g.push([h,b]),this.size=++p.size,this;p=this.__data__=new l(g)}return p.set(h,b),this.size=p.size,this}}();function i(u){var a=this.__data__=new e(u);this.size=a.size}return i.prototype.clear=r,i.prototype.delete=t,i.prototype.get=n,i.prototype.has=o,i.prototype.set=f,to=i}function ti(){if(po)return ho;po=1;var e=function(){if(uo)return io;uo=1;var n=ee(),o=no?ro:(no=1,ro=function(u){return this.__data__.set(u,"__lodash_hash_undefined__"),this}),f=ao?oo:(ao=1,oo=function(u){return this.__data__.has(u)});function i(u){var a=-1,l=u==null?0:u.length;for(this.__data__=new n;++a<l;)this.add(u[a])}return i.prototype.add=i.prototype.push=o,i.prototype.has=f,io=i}(),r=co?so:(co=1,so=function(n,o){for(var f=-1,i=n==null?0:n.length;++f<i;)if(o(n[f],f,n))return!0;return!1}),t=lo?fo:(lo=1,fo=function(n,o){return n.has(o)});return ho=function(n,o,f,i,u,a){var l=1&f,h=n.length,b=o.length;if(h!=b&&!(l&&b>h))return!1;var p=a.get(n),g=a.get(o);if(p&&g)return p==o&&g==n;var c=-1,s=!0,d=2&f?new e:void 0;for(a.set(n,o),a.set(o,n);++c<h;){var v=n[c],y=o[c];if(i)var _=l?i(y,v,c,o,n,a):i(v,y,c,n,o,a);if(_!==void 0){if(_)continue;s=!1;break}if(d){if(!r(o,function(m,w){if(!t(d,w)&&(v===m||u(v,m,f,i,a)))return d.push(w)})){s=!1;break}}else if(v!==y&&!u(v,y,f,i,a)){s=!1;break}}return a.delete(n),a.delete(o),s}}function Uu(){if(vo)return bo;vo=1;var e=K().Uint8Array;return bo=e}function Fu(){return Oo?jo:(Oo=1,jo=function(e,r){for(var t=-1,n=r.length,o=e.length;++t<n;)e[o+t]=r[t];return e})}function Du(){if(So)return Mo;So=1;var e=Fu(),r=X();return Mo=function(t,n,o){var f=n(t);return r(t)?f:e(f,o(t))}}function Bu(){return Eo?Co:(Eo=1,Co=function(){return[]})}function ne(){if(Po)return Ro;Po=1;var e=Ao?ko:(Ao=1,ko=function(o,f){for(var i=-1,u=o==null?0:o.length,a=0,l=[];++i<u;){var h=o[i];f(h,i,o)&&(l[a++]=h)}return l}),r=Bu(),t=Object.prototype.propertyIsEnumerable,n=Object.getOwnPropertySymbols;return Ro=n?function(o){return o==null?[]:(o=Object(o),e(n(o),function(f){return t.call(o,f)}))}:r}function zu(){if(Lo)return To;Lo=1;var e=Du(),r=ne(),t=yt();return To=function(n){return e(n,t,r)}}function At(){if(Xo)return Vo;Xo=1;var e=function(){if(Bo)return Do;Bo=1;var y=rt()(K(),"DataView");return Do=y}(),r=te(),t=function(){if(Ho)return zo;Ho=1;var y=rt()(K(),"Promise");return zo=y}(),n=function(){if($o)return Wo;$o=1;var y=rt()(K(),"Set");return Wo=y}(),o=function(){if(Io)return No;Io=1;var y=rt()(K(),"WeakMap");return No=y}(),f=nt(),i=Lu(),u="[object Map]",a="[object Promise]",l="[object Set]",h="[object WeakMap]",b="[object DataView]",p=i(e),g=i(r),c=i(t),s=i(n),d=i(o),v=f;return(e&&v(new e(new ArrayBuffer(1)))!=b||r&&v(new r)!=u||t&&v(t.resolve())!=a||n&&v(new n)!=l||o&&v(new o)!=h)&&(v=function(y){var _=f(y),m=_=="[object Object]"?y.constructor:void 0,w=m?i(m):"";if(w)switch(w){case p:return b;case g:return u;case c:return a;case s:return l;case d:return h}return _}),Vo=v}function fs(){if(Yo)return qo;Yo=1;var e=re(),r=ti(),t=function(){if(xo)return wo;xo=1;var p=gt(),g=Uu(),c=Zt(),s=ti(),d=yo?go:(yo=1,go=function(m){var w=-1,C=Array(m.size);return m.forEach(function(A,P){C[++w]=[P,A]}),C}),v=_o?mo:(_o=1,mo=function(m){var w=-1,C=Array(m.size);return m.forEach(function(A){C[++w]=A}),C}),y=p?p.prototype:void 0,_=y?y.valueOf:void 0;return wo=function(m,w,C,A,P,M,F){switch(C){case"[object DataView]":if(m.byteLength!=w.byteLength||m.byteOffset!=w.byteOffset)return!1;m=m.buffer,w=w.buffer;case"[object ArrayBuffer]":return!(m.byteLength!=w.byteLength||!M(new g(m),new g(w)));case"[object Boolean]":case"[object Date]":case"[object Number]":return c(+m,+w);case"[object Error]":return m.name==w.name&&m.message==w.message;case"[object RegExp]":case"[object String]":return m==w+"";case"[object Map]":var B=d;case"[object Set]":var G=1&A;if(B||(B=v),m.size!=w.size&&!G)return!1;var q=F.get(m);if(q)return q==w;A|=2,F.set(m,w);var J=s(B(m),B(w),A,P,M,F);return F.delete(m),J;case"[object Symbol]":if(_)return _.call(m)==_.call(w)}return!1}}(),n=function(){if(Fo)return Uo;Fo=1;var p=zu(),g=Object.prototype.hasOwnProperty;return Uo=function(c,s,d,v,y,_){var m=1&d,w=p(c),C=w.length;if(C!=p(s).length&&!m)return!1;for(var A=C;A--;){var P=w[A];if(!(m?P in s:g.call(s,P)))return!1}var M=_.get(c),F=_.get(s);if(M&&F)return M==s&&F==c;var B=!0;_.set(c,s),_.set(s,c);for(var G=m;++A<C;){var q=c[P=w[A]],J=s[P];if(v)var pt=m?v(J,q,P,s,c,_):v(q,J,P,c,s,_);if(!(pt===void 0?q===J||y(q,J,d,v,_):pt)){B=!1;break}G||(G=P=="constructor")}if(B&&!G){var L=c.constructor,E=s.constructor;L==E||!("constructor"in c)||!("constructor"in s)||typeof L=="function"&&L instanceof L&&typeof E=="function"&&E instanceof E||(B=!1)}return _.delete(c),_.delete(s),B}}(),o=At(),f=X(),i=Kt(),u=ku(),a="[object Arguments]",l="[object Array]",h="[object Object]",b=Object.prototype.hasOwnProperty;return qo=function(p,g,c,s,d,v){var y=f(p),_=f(g),m=y?l:o(p),w=_?l:o(g),C=(m=m==a?h:m)==h,A=(w=w==a?h:w)==h,P=m==w;if(P&&i(p)){if(!i(g))return!1;y=!0,C=!1}if(P&&!C)return v||(v=new e),y||u(p)?r(p,g,c,s,d,v):t(p,g,m,c,s,d,v);if(!(1&c)){var M=C&&b.call(p,"__wrapped__"),F=A&&b.call(g,"__wrapped__");if(M||F){var B=M?p.value():p,G=F?g.value():g;return v||(v=new e),d(B,G,c,s,v)}}return!!P&&(v||(v=new e),n(p,g,c,s,d,v))}}function Hu(){if(Go)return Ko;Go=1;var e=fs(),r=Z();return Ko=function t(n,o,f,i,u){return n===o||(n==null||o==null||!r(n)&&!r(o)?n!=n&&o!=o:e(n,o,f,i,t,u))}}function Wu(){if(ta)return Zo;ta=1;var e=ht();return Zo=function(r){return r==r&&!e(r)}}function $u(){return oa?na:(oa=1,na=function(e,r){return function(t){return t!=null&&t[e]===r&&(r!==void 0||e in Object(t))}})}function oe(){if(sa)return ua;sa=1;var e=nt(),r=Z();return ua=function(t){return typeof t=="symbol"||r(t)&&e(t)=="[object Symbol]"}}function ae(){if(fa)return ca;fa=1;var e=X(),r=oe(),t=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,n=/^\w*$/;return ca=function(o,f){if(e(o))return!1;var i=typeof o;return!(i!="number"&&i!="symbol"&&i!="boolean"&&o!=null&&!r(o))||n.test(o)||!t.test(o)||f!=null&&o in Object(f)}}function Nu(){if(xa)return wa;xa=1;var e=X(),r=ae(),t=function(){if(va)return ba;va=1;var o=function(){if(da)return pa;da=1;var a=function(){if(ha)return la;ha=1;var l=ee();function h(b,p){if(typeof b!="function"||p!=null&&typeof p!="function")throw new TypeError("Expected a function");var g=function(){var c=arguments,s=p?p.apply(this,c):c[0],d=g.cache;if(d.has(s))return d.get(s);var v=b.apply(this,c);return g.cache=d.set(s,v)||d,v};return g.cache=new(h.Cache||l),g}return h.Cache=l,la=h}();return pa=function(l){var h=a(l,function(p){return b.size===500&&b.clear(),p}),b=h.cache;return h}}(),f=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,i=/\\(\\)?/g,u=o(function(a){var l=[];return a.charCodeAt(0)===46&&l.push(""),a.replace(f,function(h,b,p,g){l.push(p?g.replace(i,"$1"):b||h)}),l});return ba=u}(),n=function(){if(_a)return ma;_a=1;var o=function(){if(ya)return ga;ya=1;var f=gt(),i=Tu(),u=X(),a=oe(),l=f?f.prototype:void 0,h=l?l.toString:void 0;return ga=function b(p){if(typeof p=="string")return p;if(u(p))return i(p,b)+"";if(a(p))return h?h.call(p):"";var g=p+"";return g=="0"&&1/p==-1/0?"-0":g}}();return ma=function(f){return f==null?"":o(f)}}();return wa=function(o,f){return e(o)?o:r(o,f)?[o]:t(n(o))}}function Et(){if(Oa)return ja;Oa=1;var e=oe();return ja=function(r){if(typeof r=="string"||e(r))return r;var t=r+"";return t=="0"&&1/r==-1/0?"-0":t}}function Iu(){if(Sa)return Ma;Sa=1;var e=Nu(),r=Et();return Ma=function(t,n){for(var o=0,f=(n=e(n,t)).length;t!=null&&o<f;)t=t[r(n[o++])];return o&&o==f?t:void 0}}function ls(){if(Fa)return Ua;Fa=1;var e=Hu(),r=function(){if(Aa)return ka;Aa=1;var u=Iu();return ka=function(a,l,h){var b=a==null?void 0:u(a,l);return b===void 0?h:b}}(),t=function(){if(La)return Ta;La=1;var u=Ea?Ca:(Ea=1,Ca=function(l,h){return l!=null&&h in Object(l)}),a=function(){if(Pa)return Ra;Pa=1;var l=Nu(),h=Mu(),b=X(),p=Su(),g=Gt(),c=Et();return Ra=function(s,d,v){for(var y=-1,_=(d=l(d,s)).length,m=!1;++y<_;){var w=c(d[y]);if(!(m=s!=null&&v(s,w)))break;s=s[w]}return m||++y!=_?m:!!(_=s==null?0:s.length)&&g(_)&&p(w,_)&&(b(s)||h(s))}}();return Ta=function(l,h){return l!=null&&a(l,h,u)}}(),n=ae(),o=Wu(),f=$u(),i=Et();return Ua=function(u,a){return n(u)&&o(a)?f(i(u),a):function(l){var h=r(l,u);return h===void 0&&h===a?t(l,u):e(a,h,3)}}}function hs(){if(Qa)return Ja;Qa=1;var e=Tu(),r=function(){if(Ia)return Na;Ia=1;var o=function(){if(ia)return aa;ia=1;var l=function(){if(Qo)return Jo;Qo=1;var p=re(),g=Hu();return Jo=function(c,s,d,v){var y=d.length,_=y,m=!v;if(c==null)return!_;for(c=Object(c);y--;){var w=d[y];if(m&&w[2]?w[1]!==c[w[0]]:!(w[0]in c))return!1}for(;++y<_;){var C=(w=d[y])[0],A=c[C],P=w[1];if(m&&w[2]){if(A===void 0&&!(C in c))return!1}else{var M=new p;if(v)var F=v(A,P,C,c,s,M);if(!(F===void 0?g(P,A,3,v,M):F))return!1}}return!0}}(),h=function(){if(ra)return ea;ra=1;var p=Wu(),g=yt();return ea=function(c){for(var s=g(c),d=s.length;d--;){var v=s[d],y=c[v];s[d]=[v,y,p(y)]}return s}}(),b=$u();return aa=function(p){var g=h(p);return g.length==1&&g[0][2]?b(g[0][0],g[0][1]):function(c){return c===p||l(c,p,g)}}}(),f=ls(),i=Pu(),u=X(),a=function(){if($a)return Wa;$a=1;var l=Ba?Da:(Ba=1,Da=function(g){return function(c){return c?.[g]}}),h=function(){if(Ha)return za;Ha=1;var g=Iu();return za=function(c){return function(s){return g(s,c)}}}(),b=ae(),p=Et();return Wa=function(g){return b(g)?l(p(g)):h(g)}}();return Na=function(l){return typeof l=="function"?l:l==null?i:typeof l=="object"?u(l)?f(l[0],l[1]):o(l):a(l)}}(),t=function(){if(Ga)return Ka;Ga=1;var o=function(){if(Ya)return qa;Ya=1;var i=Ru(),u=function(){if(Xa)return Va;Xa=1;var a=Ct();return Va=function(l,h){return function(b,p){if(b==null)return b;if(!a(b))return l(b,p);for(var g=b.length,c=h?g:-1,s=Object(b);(h?c--:++c<g)&&p(s[c],c,s)!==!1;);return b}}}()(i);return qa=u}(),f=Ct();return Ka=function(i,u){var a=-1,l=f(i)?Array(i.length):[];return o(i,function(h,b,p){l[++a]=u(h,b,p)}),l}}(),n=X();return Ja=function(o,f){return(n(o)?e:t)(o,r(f,3))}}var ei,ri,ni,oi,ai,ii,ui,si,ci,fi,li,hi,pi,di,bi,vi,gi,yi,mi,_i,st={};function Vu(){if(ii)return ai;ii=1;var e=function(){if(oi)return ni;oi=1;var r=rt(),t=function(){try{var n=r(Object,"defineProperty");return n({},"",{}),n}catch{}}();return ni=t}();return ai=function(r,t,n){t=="__proto__"&&e?e(r,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):r[t]=n}}function Xu(){if(si)return ui;si=1;var e=Vu(),r=Zt(),t=Object.prototype.hasOwnProperty;return ui=function(n,o,f){var i=n[o];t.call(n,o)&&r(i,f)&&(f!==void 0||o in n)||e(n,o,f)}}function St(){if(fi)return ci;fi=1;var e=Xu(),r=Vu();return ci=function(t,n,o,f){var i=!o;o||(o={});for(var u=-1,a=n.length;++u<a;){var l=n[u],h=f?f(o[l],t[l],l,o,t):void 0;h===void 0&&(h=t[l]),i?r(o,l,h):e(o,l,h)}return o}}function Dt(){if(yi)return gi;yi=1;var e=Au(),r=function(){if(vi)return bi;vi=1;var n=ht(),o=Jt(),f=di?pi:(di=1,pi=function(u){var a=[];if(u!=null)for(var l in Object(u))a.push(l);return a}),i=Object.prototype.hasOwnProperty;return bi=function(u){if(!n(u))return f(u);var a=o(u),l=[];for(var h in u)(h!="constructor"||!a&&i.call(u,h))&&l.push(h);return l}}(),t=Ct();return gi=function(n){return t(n)?e(n,!0):r(n)}}var wi,xi,ji,Oi,Mi,Si,ki,Ai,Ci,Ei,Ri,Pi,Ti,Li,Ui,Fi,Di,Bi,zi,Hi,Wi,$i,Ni,Ii,Vi,Xi,qi,Yi,Ki,Gi,Ji,Qi,Zi,tu,eu,ru,nu,Bt,ou,au,iu,uu,zt={exports:{}};function su(){if(ki)return Si;ki=1;var e=Fu(),r=Qt(),t=ne(),n=Bu(),o=Object.getOwnPropertySymbols;return Si=o?function(f){for(var i=[];f;)e(i,t(f)),f=r(f);return i}:n}function Ht(){if(Ui)return Li;Ui=1;var e=Uu();return Li=function(r){var t=new r.constructor(r.byteLength);return new e(t).set(new e(r)),t}}function ps(){if(ou)return Bt;ou=1;var e,r,t,n,o,f,i,u=re(),a=ri?ei:(ri=1,ei=function(E,x){for(var S=-1,k=E==null?0:E.length;++S<k&&x(E[S],S,E)!==!1;);return E}),l=Xu(),h=function(){if(hi)return li;hi=1;var E=St(),x=yt();return li=function(S,k){return S&&E(k,x(k),S)}}(),b=function(){if(_i)return mi;_i=1;var E=St(),x=Dt();return mi=function(S,k){return S&&E(k,x(k),S)}}(),p=(wi||(wi=1,e=zt,r=zt.exports,t=K(),n=r&&!r.nodeType&&r,o=n&&e&&!e.nodeType&&e,f=o&&o.exports===n?t.Buffer:void 0,i=f?f.allocUnsafe:void 0,e.exports=function(E,x){if(x)return E.slice();var S=E.length,k=i?i(S):new E.constructor(S);return E.copy(k),k}),zt.exports),g=ji?xi:(ji=1,xi=function(E,x){var S=-1,k=E.length;for(x||(x=Array(k));++S<k;)x[S]=E[S];return x}),c=function(){if(Mi)return Oi;Mi=1;var E=St(),x=ne();return Oi=function(S,k){return E(S,x(S),k)}}(),s=function(){if(Ci)return Ai;Ci=1;var E=St(),x=su();return Ai=function(S,k){return E(S,x(S),k)}}(),d=zu(),v=function(){if(Ri)return Ei;Ri=1;var E=Du(),x=su(),S=Dt();return Ei=function(k){return E(k,S,x)}}(),y=At(),_=function(){if(Ti)return Pi;Ti=1;var E=Object.prototype.hasOwnProperty;return Pi=function(x){var S=x.length,k=new x.constructor(S);return S&&typeof x[0]=="string"&&E.call(x,"index")&&(k.index=x.index,k.input=x.input),k}}(),m=function(){if(Vi)return Ii;Vi=1;var E=Ht(),x=function(){if(Di)return Fi;Di=1;var U=Ht();return Fi=function(R,T){var H=T?U(R.buffer):R.buffer;return new R.constructor(H,R.byteOffset,R.byteLength)}}(),S=function(){if(zi)return Bi;zi=1;var U=/\w*$/;return Bi=function(R){var T=new R.constructor(R.source,U.exec(R));return T.lastIndex=R.lastIndex,T}}(),k=function(){if(Wi)return Hi;Wi=1;var U=gt(),R=U?U.prototype:void 0,T=R?R.valueOf:void 0;return Hi=function(H){return T?Object(T.call(H)):{}}}(),Y=function(){if(Ni)return $i;Ni=1;var U=Ht();return $i=function(R,T){var H=T?U(R.buffer):R.buffer;return new R.constructor(H,R.byteOffset,R.length)}}();return Ii=function(U,R,T){var H=U.constructor;switch(R){case"[object ArrayBuffer]":return E(U);case"[object Boolean]":case"[object Date]":return new H(+U);case"[object DataView]":return x(U,T);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 Y(U,T);case"[object Map]":case"[object Set]":return new H;case"[object Number]":case"[object String]":return new H(U);case"[object RegExp]":return S(U);case"[object Symbol]":return k(U)}}}(),w=function(){if(Ki)return Yi;Ki=1;var E=function(){if(qi)return Xi;qi=1;var k=ht(),Y=Object.create;return Xi=function(){function U(){}return function(R){if(!k(R))return{};if(Y)return Y(R);U.prototype=R;var T=new U;return U.prototype=void 0,T}}()}(),x=Qt(),S=Jt();return Yi=function(k){return typeof k.constructor!="function"||S(k)?{}:E(x(k))}}(),C=X(),A=Kt(),P=function(){if(Zi)return Qi;Zi=1;var E=function(){if(Ji)return Gi;Ji=1;var U=At(),R=Z();return Gi=function(T){return R(T)&&U(T)=="[object Map]"}}(),x=Vt(),S=Xt(),k=S&&S.isMap,Y=k?x(k):E;return Qi=Y}(),M=ht(),F=function(){if(nu)return ru;nu=1;var E=function(){if(eu)return tu;eu=1;var U=At(),R=Z();return tu=function(T){return R(T)&&U(T)=="[object Set]"}}(),x=Vt(),S=Xt(),k=S&&S.isSet,Y=k?x(k):E;return ru=Y}(),B=yt(),G=Dt(),q="[object Arguments]",J="[object Function]",pt="[object Object]",L={};return L[q]=L["[object Array]"]=L["[object ArrayBuffer]"]=L["[object DataView]"]=L["[object Boolean]"]=L["[object Date]"]=L["[object Float32Array]"]=L["[object Float64Array]"]=L["[object Int8Array]"]=L["[object Int16Array]"]=L["[object Int32Array]"]=L["[object Map]"]=L["[object Number]"]=L[pt]=L["[object RegExp]"]=L["[object Set]"]=L["[object String]"]=L["[object Symbol]"]=L["[object Uint8Array]"]=L["[object Uint8ClampedArray]"]=L["[object Uint16Array]"]=L["[object Uint32Array]"]=!0,L["[object Error]"]=L[J]=L["[object WeakMap]"]=!1,Bt=function E(x,S,k,Y,U,R){var T,H=1&S,mt=2&S,Ku=4&S;if(k&&(T=U?k(x,Y,U,R):k(x)),T!==void 0)return T;if(!M(x))return x;var ue=C(x);if(ue){if(T=_(x),!H)return g(x,T)}else{var at=y(x),se=at==J||at=="[object GeneratorFunction]";if(A(x))return p(x,H);if(at==pt||at==q||se&&!U){if(T=mt||se?{}:w(x),!H)return mt?s(x,b(T,x)):c(x,h(T,x))}else{if(!L[at])return U?x:{};T=m(x,at,H)}}R||(R=new u);var ce=R.get(x);if(ce)return ce;R.set(x,T),F(x)?x.forEach(function(tt){T.add(E(tt,S,k,tt,x,R))}):P(x)&&x.forEach(function(tt,it){T.set(it,E(tt,S,k,it,x,R))});var fe=ue?void 0:(Ku?mt?v:d:mt?G:B)(x);return a(fe||x,function(tt,it){fe&&(tt=x[it=tt]),l(T,it,E(tt,S,k,it,x,R))}),T},Bt}var cu,fu,ct={},ft={},lu,lt={},hu,pu,Wt={},ds=function(){if(pu)return W;pu=1,Object.defineProperty(W,"__esModule",{value:!0}),W.ReactCSS=W.loop=W.handleActive=W.handleHover=W.hover=void 0;var e=u(function(){if(Za)return ut;Za=1,Object.defineProperty(ut,"__esModule",{value:!0}),ut.flattenNames=void 0;var l=g(function(){if(Le)return Te;Le=1;var s=nt(),d=X(),v=Z();return Te=function(y){return typeof y=="string"||!d(y)&&v(y)&&s(y)=="[object String]"}}()),h=g(Ft()),b=g(function(){if(Lr)return Tr;Lr=1;var s=nt(),d=Qt(),v=Z(),y=Function.prototype,_=Object.prototype,m=y.toString,w=_.hasOwnProperty,C=m.call(Object);return Tr=function(A){if(!v(A)||s(A)!="[object Object]")return!1;var P=d(A);if(P===null)return!0;var M=w.call(P,"constructor")&&P.constructor;return typeof M=="function"&&M instanceof M&&m.call(M)==C}}()),p=g(hs());function g(s){return s&&s.__esModule?s:{default:s}}var c=ut.flattenNames=function s(){var d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],v=[];return(0,p.default)(d,function(y){Array.isArray(y)?s(y).map(function(_){return v.push(_)}):(0,b.default)(y)?(0,h.default)(y,function(_,m){_===!0&&v.push(m),v.push(m+"-"+_)}):(0,l.default)(y)&&v.push(y)}),v};return ut.default=c,ut}()),r=u(function(){if(uu)return st;uu=1,Object.defineProperty(st,"__esModule",{value:!0}),st.mergeClasses=void 0;var l=p(Ft()),h=p(function(){if(iu)return au;iu=1;var c=ps();return au=function(s){return c(s,5)}}()),b=Object.assign||function(c){for(var s=1;s<arguments.length;s++){var d=arguments[s];for(var v in d)Object.prototype.hasOwnProperty.call(d,v)&&(c[v]=d[v])}return c};function p(c){return c&&c.__esModule?c:{default:c}}var g=st.mergeClasses=function(c){var s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],d=c.default&&(0,h.default)(c.default)||{};return s.map(function(v){var y=c[v];return y&&(0,l.default)(y,function(_,m){d[m]||(d[m]={}),d[m]=b({},d[m],y[m])}),v}),d};return st.default=g,st}()),t=function(){if(cu)return ct;cu=1,Object.defineProperty(ct,"__esModule",{value:!0}),ct.autoprefix=void 0;var l,h=(l=Ft())&&l.__esModule?l:{default:l},b=Object.assign||function(c){for(var s=1;s<arguments.length;s++){var d=arguments[s];for(var v in d)Object.prototype.hasOwnProperty.call(d,v)&&(c[v]=d[v])}return c},p={borderRadius:function(c){return{msBorderRadius:c,MozBorderRadius:c,OBorderRadius:c,WebkitBorderRadius:c,borderRadius:c}},boxShadow:function(c){return{msBoxShadow:c,MozBoxShadow:c,OBoxShadow:c,WebkitBoxShadow:c,boxShadow:c}},userSelect:function(c){return{WebkitTouchCallout:c,KhtmlUserSelect:c,MozUserSelect:c,msUserSelect:c,WebkitUserSelect:c,userSelect:c}},flex:function(c){return{WebkitBoxFlex:c,MozBoxFlex:c,WebkitFlex:c,msFlex:c,flex:c}},flexBasis:function(c){return{WebkitFlexBasis:c,flexBasis:c}},justifyContent:function(c){return{WebkitJustifyContent:c,justifyContent:c}},transition:function(c){return{msTransition:c,MozTransition:c,OTransition:c,WebkitTransition:c,transition:c}},transform:function(c){return{msTransform:c,MozTransform:c,OTransform:c,WebkitTransform:c,transform:c}},absolute:function(c){var s=c&&c.split(" ");return{position:"absolute",top:s&&s[0],right:s&&s[1],bottom:s&&s[2],left:s&&s[3]}},extend:function(c,s){return s[c]||{extend:c}}},g=ct.autoprefix=function(c){var s={};return(0,h.default)(c,function(d,v){var y={};(0,h.default)(d,function(_,m){var w=p[m];w?y=b({},y,w(_)):y[m]=_}),s[v]=y}),s};return ct.default=g,ct}(),n=u(t),o=u(function(){if(fu)return ft;fu=1,Object.defineProperty(ft,"__esModule",{value:!0}),ft.hover=void 0;var l,h=Object.assign||function(c){for(var s=1;s<arguments.length;s++){var d=arguments[s];for(var v in d)Object.prototype.hasOwnProperty.call(d,v)&&(c[v]=d[v])}return c},b=(l=j)&&l.__esModule?l:{default:l};function p(c,s){if(!c)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!s||typeof s!="object"&&typeof s!="function"?c:s}var g=ft.hover=function(c){var s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"span";return function(d){function v(){var y,_,m;(function(P,M){if(!(P instanceof M))throw new TypeError("Cannot call a class as a function")})(this,v);for(var w=arguments.length,C=Array(w),A=0;A<w;A++)C[A]=arguments[A];return _=m=p(this,(y=v.__proto__||Object.getPrototypeOf(v)).call.apply(y,[this].concat(C))),m.state={hover:!1},m.handleMouseOver=function(){return m.setState({hover:!0})},m.handleMouseOut=function(){return m.setState({hover:!1})},m.render=function(){return b.default.createElement(s,{onMouseOver:m.handleMouseOver,onMouseOut:m.handleMouseOut},b.default.createElement(c,h({},m.props,m.state)))},p(m,_)}return function(y,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof _);y.prototype=Object.create(_&&_.prototype,{constructor:{value:y,enumerable:!1,writable:!0,configurable:!0}}),_&&(Object.setPrototypeOf?Object.setPrototypeOf(y,_):y.__proto__=_)}(v,d),v}(b.default.Component)};return ft.default=g,ft}()),f=u(function(){if(lu)return lt;lu=1,Object.defineProperty(lt,"__esModule",{value:!0}),lt.active=void 0;var l,h=Object.assign||function(c){for(var s=1;s<arguments.length;s++){var d=arguments[s];for(var v in d)Object.prototype.hasOwnProperty.call(d,v)&&(c[v]=d[v])}return c},b=(l=j)&&l.__esModule?l:{default:l};function p(c,s){if(!c)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!s||typeof s!="object"&&typeof s!="function"?c:s}var g=lt.active=function(c){var s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"span";return function(d){function v(){var y,_,m;(function(P,M){if(!(P instanceof M))throw new TypeError("Cannot call a class as a function")})(this,v);for(var w=arguments.length,C=Array(w),A=0;A<w;A++)C[A]=arguments[A];return _=m=p(this,(y=v.__proto__||Object.getPrototypeOf(v)).call.apply(y,[this].concat(C))),m.state={active:!1},m.handleMouseDown=function(){return m.setState({active:!0})},m.handleMouseUp=function(){return m.setState({active:!1})},m.render=function(){return b.default.createElement(s,{onMouseDown:m.handleMouseDown,onMouseUp:m.handleMouseUp},b.default.createElement(c,h({},m.props,m.state)))},p(m,_)}return function(y,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof _);y.prototype=Object.create(_&&_.prototype,{constructor:{value:y,enumerable:!1,writable:!0,configurable:!0}}),_&&(Object.setPrototypeOf?Object.setPrototypeOf(y,_):y.__proto__=_)}(v,d),v}(b.default.Component)};return lt.default=g,lt}()),i=u((hu||(hu=1,Object.defineProperty(Wt,"__esModule",{value:!0}),Wt.default=function(l,h){var b={},p=function(g){var c=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1];b[g]=c};return l===0&&p("first-child"),l===h-1&&p("last-child"),(l===0||l%2==0)&&p("even"),Math.abs(l%2)===1&&p("odd"),p("nth-child",l),b}),Wt));function u(l){return l&&l.__esModule?l:{default:l}}W.hover=o.default,W.handleHover=o.default,W.handleActive=f.default,W.loop=i.default;var a=W.ReactCSS=function(l){for(var h=arguments.length,b=Array(h>1?h-1:0),p=1;p<h;p++)b[p-1]=arguments[p];var g=(0,e.default)(b),c=(0,r.default)(l,g);return(0,n.default)(c)};return W.default=a,W}();const ot=I.uX(ds);var $t={},bs=function(e,r,t,n){var o=e+"-"+r+"-"+t+(n?"-server":"");if($t[o])return $t[o];var f=function(i,u,a,l){if(typeof document>"u"&&!l)return null;var h=l?new l:document.createElement("canvas");h.width=2*a,h.height=2*a;var b=h.getContext("2d");return b?(b.fillStyle=i,b.fillRect(0,0,h.width,h.height),b.fillStyle=u,b.fillRect(0,0,a,a),b.translate(a,a),b.fillRect(0,0,a,a),h.toDataURL()):null}(e,r,t,n);return $t[o]=f,f},du=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},ie=function(e){var r=e.white,t=e.grey,n=e.size,o=e.renderers,f=e.borderRadius,i=e.boxShadow,u=e.children,a=ot({default:{grid:{borderRadius:f,boxShadow:i,absolute:"0px 0px 0px 0px",background:"url("+bs(r,t,n,o.canvas)+") center left"}}});return j.isValidElement(u)?j.cloneElement(u,du({},u.props,{style:du({},u.props.style,a.grid)})):j.createElement("div",{style:a.grid})};ie.defaultProps={size:8,white:"transparent",grey:"rgba(0,0,0,.08)",renderers:{}};var vs=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},gs=function(){function e(r,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(r,o.key,o)}}return function(r,t,n){return t&&e(r.prototype,t),n&&e(r,n),r}}();function bu(e,r){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!r||typeof r!="object"&&typeof r!="function"?e:r}var ys=function(){function e(){var r,t,n;(function(u,a){if(!(u instanceof a))throw new TypeError("Cannot call a class as a function")})(this,e);for(var o=arguments.length,f=Array(o),i=0;i<o;i++)f[i]=arguments[i];return t=n=bu(this,(r=e.__proto__||Object.getPrototypeOf(e)).call.apply(r,[this].concat(f))),n.handleChange=function(u){var a=function(l,h,b,p,g){var c=g.clientWidth,s=g.clientHeight,d=typeof l.pageX=="number"?l.pageX:l.touches[0].pageX,v=typeof l.pageY=="number"?l.pageY:l.touches[0].pageY,y=d-(g.getBoundingClientRect().left+window.pageXOffset),_=v-(g.getBoundingClientRect().top+window.pageYOffset);if(b==="vertical"){var m;if(m=_<0?0:_>s?1:Math.round(100*_/s)/100,h.a!==m)return{h:h.h,s:h.s,l:h.l,a:m,source:"rgb"}}else{var w;if(p!==(w=y<0?0:y>c?1:Math.round(100*y/c)/100))return{h:h.h,s:h.s,l:h.l,a:w,source:"rgb"}}return null}(u,n.props.hsl,n.props.direction,n.props.a,n.container);a&&typeof n.props.onChange=="function"&&n.props.onChange(a,u)},n.handleMouseDown=function(u){n.handleChange(u),window.addEventListener("mousemove",n.handleChange),window.addEventListener("mouseup",n.handleMouseUp)},n.handleMouseUp=function(){n.unbindEventListeners()},n.unbindEventListeners=function(){window.removeEventListener("mousemove",n.handleChange),window.removeEventListener("mouseup",n.handleMouseUp)},bu(n,t)}return function(r,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);r.prototype=Object.create(t&&t.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(r,t):r.__proto__=t)}(e,j.PureComponent||j.Component),gs(e,[{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"render",value:function(){var r=this,t=this.props.rgb,n=ot({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("+t.r+","+t.g+","+t.b+`, 0) 0%,
|
|
7
|
+
rgba(`+t.r+","+t.g+","+t.b+", 1) 100%)",boxShadow:this.props.shadow,borderRadius:this.props.radius},container:{position:"relative",height:"100%",margin:"0 3px"},pointer:{position:"absolute",left:100*t.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("+t.r+","+t.g+","+t.b+`, 0) 0%,
|
|
8
|
+
rgba(`+t.r+","+t.g+","+t.b+", 1) 100%)"},pointer:{left:0,top:100*t.a+"%"}},overwrite:vs({},this.props.style)},{vertical:this.props.direction==="vertical",overwrite:!0});return j.createElement("div",{style:n.alpha},j.createElement("div",{style:n.checkboard},j.createElement(ie,{renderers:this.props.renderers})),j.createElement("div",{style:n.gradient}),j.createElement("div",{style:n.container,ref:function(o){return r.container=o},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},j.createElement("div",{style:n.pointer},this.props.pointer?j.createElement(this.props.pointer,this.props):j.createElement("div",{style:n.slider}))))}}]),e}(),ms=function(){function e(r,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(r,o.key,o)}}return function(r,t,n){return t&&e(r.prototype,t),n&&e(r,n),r}}(),_s=[38,40],ws=1,dt=function(){function e(r){(function(n,o){if(!(n instanceof o))throw new TypeError("Cannot call a class as a function")})(this,e);var t=function(n,o){if(!n)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!o||typeof o!="object"&&typeof o!="function"?n:o}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return t.handleBlur=function(){t.state.blurValue&&t.setState({value:t.state.blurValue,blurValue:null})},t.handleChange=function(n){t.setUpdatedValue(n.target.value,n)},t.handleKeyDown=function(n){var o,f,i=(f=n.target.value,Number(String(f).replace(/%/g,"")));if(!isNaN(i)&&(o=n.keyCode,_s.indexOf(o)>-1)){var u=t.getArrowOffset(),a=n.keyCode===38?i+u:i-u;t.setUpdatedValue(a,n)}},t.handleDrag=function(n){if(t.props.dragLabel){var o=Math.round(t.props.value+n.movementX);o>=0&&o<=t.props.dragMax&&t.props.onChange&&t.props.onChange(t.getValueObjectWithLabel(o),n)}},t.handleMouseDown=function(n){t.props.dragLabel&&(n.preventDefault(),t.handleDrag(n),window.addEventListener("mousemove",t.handleDrag),window.addEventListener("mouseup",t.handleMouseUp))},t.handleMouseUp=function(){t.unbindEventListeners()},t.unbindEventListeners=function(){window.removeEventListener("mousemove",t.handleDrag),window.removeEventListener("mouseup",t.handleMouseUp)},t.state={value:String(r.value).toUpperCase(),blurValue:String(r.value).toUpperCase()},t.inputId="rc-editable-input-"+ws++,t}return function(r,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);r.prototype=Object.create(t&&t.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(r,t):r.__proto__=t)}(e,j.PureComponent||j.Component),ms(e,[{key:"componentDidUpdate",value:function(r,t){this.props.value===this.state.value||r.value===this.props.value&&t.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(r){return t={},n=this.props.label,o=r,n in t?Object.defineProperty(t,n,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[n]=o,t;var t,n,o}},{key:"getArrowOffset",value:function(){return this.props.arrowOffset||1}},{key:"setUpdatedValue",value:function(r,t){var n=this.props.label?this.getValueObjectWithLabel(r):r;this.props.onChange&&this.props.onChange(n,t),this.setState({value:r})}},{key:"render",value:function(){var r=this,t=ot({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 j.createElement("div",{style:t.wrap},j.createElement("input",{id:this.inputId,style:t.input,ref:function(n){return r.input=n},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?j.createElement("label",{htmlFor:this.inputId,style:t.label,onMouseDown:this.handleMouseDown},this.props.label):null)}}]),e}(),xs=function(){function e(r,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(r,o.key,o)}}return function(r,t,n){return t&&e(r.prototype,t),n&&e(r,n),r}}();function vu(e,r){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!r||typeof r!="object"&&typeof r!="function"?e:r}var js=function(){function e(){var r,t,n;(function(u,a){if(!(u instanceof a))throw new TypeError("Cannot call a class as a function")})(this,e);for(var o=arguments.length,f=Array(o),i=0;i<o;i++)f[i]=arguments[i];return t=n=vu(this,(r=e.__proto__||Object.getPrototypeOf(e)).call.apply(r,[this].concat(f))),n.handleChange=function(u){var a=function(l,h,b,p){var g=p.clientWidth,c=p.clientHeight,s=typeof l.pageX=="number"?l.pageX:l.touches[0].pageX,d=typeof l.pageY=="number"?l.pageY:l.touches[0].pageY,v=s-(p.getBoundingClientRect().left+window.pageXOffset),y=d-(p.getBoundingClientRect().top+window.pageYOffset);if(h==="vertical"){var _;if(_=y<0?359:y>c?0:360*(-100*y/c+100)/100,b.h!==_)return{h:_,s:b.s,l:b.l,a:b.a,source:"hsl"}}else{var m;if(m=v<0?0:v>g?359:100*v/g*360/100,b.h!==m)return{h:m,s:b.s,l:b.l,a:b.a,source:"hsl"}}return null}(u,n.props.direction,n.props.hsl,n.container);a&&typeof n.props.onChange=="function"&&n.props.onChange(a,u)},n.handleMouseDown=function(u){n.handleChange(u),window.addEventListener("mousemove",n.handleChange),window.addEventListener("mouseup",n.handleMouseUp)},n.handleMouseUp=function(){n.unbindEventListeners()},vu(n,t)}return function(r,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);r.prototype=Object.create(t&&t.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(r,t):r.__proto__=t)}(e,j.PureComponent||j.Component),xs(e,[{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 r=this,t=this.props.direction,n=t===void 0?"horizontal":t,o=ot({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:n==="vertical"});return j.createElement("div",{style:o.hue},j.createElement("div",{className:"hue-"+n,style:o.container,ref:function(f){return r.container=f},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},j.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
|
+
`),j.createElement("div",{style:o.pointer},this.props.pointer?j.createElement(this.props.pointer,this.props):j.createElement("div",{style:o.slider}))))}}]),e}(),Os=typeof global=="object"&&global&&global.Object===Object&&global,Ms=typeof self=="object"&&self&&self.Object===Object&&self,qu=Os||Ms||Function("return this")(),Rt=qu.Symbol,Yu=Object.prototype,Ss=Yu.hasOwnProperty,ks=Yu.toString,bt=Rt?Rt.toStringTag:void 0,As=Object.prototype.toString,gu=Rt?Rt.toStringTag:void 0;function Pt(e){var r=typeof e;return e!=null&&(r=="object"||r=="function")}_t.string,_t.oneOf([0,1,2,3,4,5]),_t.number,_t.object;var Nt=function(){return qu.Date.now()},Cs=/\s/,Es=/^\s+/,Rs=/^[-+]0x[0-9a-f]+$/i,Ps=/^0b[01]+$/i,Ts=/^0o[0-7]+$/i,Ls=parseInt;function yu(e){if(typeof e=="number")return e;if(typeof(r=e)=="symbol"||(t=r)!=null&&typeof t=="object"&&function(f){return f==null?f===void 0?"[object Undefined]":"[object Null]":gu&&gu in Object(f)?function(u){var a=Ss.call(u,bt),l=u[bt];try{u[bt]=void 0;var h=!0}catch{}var b=ks.call(u);return h&&(a?u[bt]=l:delete u[bt]),b}(f):(i=f,As.call(i));var i}(r)=="[object Symbol]")return NaN;var r,t;if(Pt(e)){var n=typeof e.valueOf=="function"?e.valueOf():e;e=Pt(n)?n+"":n}if(typeof e!="string")return e===0?e:+e;e=function(f){return f&&f.slice(0,function(i){for(var u=i.length;u--&&Cs.test(i.charAt(u)););return u}(f)+1).replace(Es,"")}(e);var o=Ps.test(e);return o||Ts.test(e)?Ls(e.slice(2),o?2:8):Rs.test(e)?NaN:+e}var Us=Math.max,Fs=Math.min,Ds=function(){function e(r,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(r,o.key,o)}}return function(r,t,n){return t&&e(r.prototype,t),n&&e(r,n),r}}();(function(){function e(r){(function(u,a){if(!(u instanceof a))throw new TypeError("Cannot call a class as a function")})(this,e);var t,n,o,f,i=function(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}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,r));return i.handleChange=function(u){typeof i.props.onChange=="function"&&i.throttle(i.props.onChange,function(a,l,h){var b=h.getBoundingClientRect(),p=b.width,g=b.height,c=typeof a.pageX=="number"?a.pageX:a.touches[0].pageX,s=typeof a.pageY=="number"?a.pageY:a.touches[0].pageY,d=c-(h.getBoundingClientRect().left+window.pageXOffset),v=s-(h.getBoundingClientRect().top+window.pageYOffset);d<0?d=0:d>p&&(d=p),v<0?v=0:v>g&&(v=g);var y=d/p,_=1-v/g;return{h:l.h,s:y,v:_,a:l.a,source:"hsv"}}(u,i.props.hsl,i.container),u)},i.handleMouseDown=function(u){i.handleChange(u);var a=i.getContainerRenderWindow();a.addEventListener("mousemove",i.handleChange),a.addEventListener("mouseup",i.handleMouseUp)},i.handleMouseUp=function(){i.unbindEventListeners()},i.throttle=(t=function(u,a,l){u(a,l)},o=!0,f=!0,Pt(n)&&(o="leading"in n?!!n.leading:o,f="trailing"in n?!!n.trailing:f),function(u,a,l){var h,b,p,g,c,s,d=0,v=!1,y=!1,_=!0;if(typeof u!="function")throw new TypeError("Expected a function");function m(M){var F=h,B=b;return h=b=void 0,d=M,g=u.apply(B,F)}function w(M){var F=M-s;return s===void 0||F>=a||F<0||y&&M-d>=p}function C(){var M,F,B=Nt();if(w(B))return A(B);c=setTimeout(C,(F=a-((M=B)-s),y?Fs(F,p-(M-d)):F))}function A(M){return c=void 0,_&&h?m(M):(h=b=void 0,g)}function P(){var M,F=Nt(),B=w(F);if(h=arguments,b=this,s=F,B){if(c===void 0)return d=M=s,c=setTimeout(C,a),v?m(M):g;if(y)return clearTimeout(c),c=setTimeout(C,a),m(s)}return c===void 0&&(c=setTimeout(C,a)),g}return a=yu(a)||0,Pt(l)&&(v=!!l.leading,p=(y="maxWait"in l)?Us(yu(l.maxWait)||0,a):p,_="trailing"in l?!!l.trailing:_),P.cancel=function(){c!==void 0&&clearTimeout(c),d=0,h=s=b=c=void 0},P.flush=function(){return c===void 0?g:A(Nt())},P}(t,50,{leading:o,maxWait:50,trailing:f})),i}(function(r,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);r.prototype=Object.create(t&&t.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(r,t):r.__proto__=t)})(e,j.PureComponent||j.Component),Ds(e,[{key:"componentWillUnmount",value:function(){this.throttle.cancel(),this.unbindEventListeners()}},{key:"getContainerRenderWindow",value:function(){for(var r=this.container,t=window;!t.document.contains(r)&&t.parent!==t;)t=t.parent;return t}},{key:"unbindEventListeners",value:function(){var r=this.getContainerRenderWindow();r.removeEventListener("mousemove",this.handleChange),r.removeEventListener("mouseup",this.handleMouseUp)}},{key:"render",value:function(){var r=this,t=this.props.style||{},n=t.color,o=t.white,f=t.black,i=t.pointer,u=t.circle,a=ot({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:n,white:o,black:f,pointer:i,circle:u}},{custom:!!this.props.style});return j.createElement("div",{style:a.color,ref:function(l){return r.container=l},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},j.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
|
+
`),j.createElement("div",{style:a.white,className:"saturation-white"},j.createElement("div",{style:a.black,className:"saturation-black"}),j.createElement("div",{style:a.pointer},this.props.pointer?j.createElement(this.props.pointer,this.props):j.createElement("div",{style:a.circle}))))}}])})();var Bs=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},zs=function(){function e(r,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(r,o.key,o)}}return function(r,t,n){return t&&e(r.prototype,t),n&&e(r,n),r}}();function mu(e,r){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!r||typeof r!="object"&&typeof r!="function"?e:r}var _u=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e};(function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"span";(function(){function t(){var n,o,f;(function(l,h){if(!(l instanceof h))throw new TypeError("Cannot call a class as a function")})(this,t);for(var i=arguments.length,u=Array(i),a=0;a<i;a++)u[a]=arguments[a];return o=f=mu(this,(n=t.__proto__||Object.getPrototypeOf(t)).call.apply(n,[this].concat(u))),f.state={focus:!1},f.handleFocus=function(){return f.setState({focus:!0})},f.handleBlur=function(){return f.setState({focus:!1})},mu(f,o)}(function(n,o){if(typeof o!="function"&&o!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof o);n.prototype=Object.create(o&&o.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),o&&(Object.setPrototypeOf?Object.setPrototypeOf(n,o):n.__proto__=o)})(t,j.Component),zs(t,[{key:"render",value:function(){return j.createElement(r,{onFocus:this.handleFocus,onBlur:this.handleBlur},j.createElement(e,Bs({},this.props,this.state)))}}])})()})(function(e){var r=e.color,t=e.style,n=e.onClick,o=n===void 0?function(){}:n,f=e.onHover,i=e.title,u=i===void 0?r:i,a=e.children,l=e.focus,h=e.focusStyle,b=r==="transparent",p=ot({default:{swatch:_u({background:r,height:"100%",width:"100%",cursor:"pointer",position:"relative",outline:"none"},t,l?h===void 0?{}:h:{})}}),g={};return f&&(g.onMouseOver=function(c){return f(r,c)}),j.createElement("div",_u({style:p.swatch,onClick:function(c){return o(r,c)},title:u,tabIndex:0,onKeyDown:function(c){return c.keyCode===13&&o(r,c)}},g),a,b&&j.createElement(ie,{borderRadius:p.swatch.borderRadius,boxShadow:"inset 0 0 0 1px rgba(0,0,0,0.1)"}))});var Hs=function(e){var r=e.onChange,t=e.rgb,n=e.hsl,o=e.hex,f=e.disableAlpha,i=ot({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:f}),u=function(a,l){a.hex?function(h){if(h==="transparent")return!0;var b=String(h).charAt(0)==="#"?1:0;return h.length!==4+b&&h.length<7+b&&O(h).isValid()}(a.hex)&&r({hex:a.hex,source:"hex"},l):a.r||a.g||a.b?r({r:a.r||t.r,g:a.g||t.g,b:a.b||t.b,a:t.a,source:"rgb"},l):a.a&&(a.a<0?a.a=0:a.a>100&&(a.a=100),a.a/=100,r({h:n.h,s:n.s,l:n.l,a:a.a,source:"rgb"},l))};return j.createElement("div",{style:i.fields,className:"flexbox-fix"},j.createElement("div",{style:i.double},j.createElement(dt,{style:{input:i.input,label:i.label},label:"hex",value:o.replace("#",""),onChange:u})),j.createElement("div",{style:i.single},j.createElement(dt,{style:{input:i.input,label:i.label},label:"r",value:t.r,onChange:u,dragLabel:"true",dragMax:"255"})),j.createElement("div",{style:i.single},j.createElement(dt,{style:{input:i.input,label:i.label},label:"g",value:t.g,onChange:u,dragLabel:"true",dragMax:"255"})),j.createElement("div",{style:i.single},j.createElement(dt,{style:{input:i.input,label:i.label},label:"b",value:t.b,onChange:u,dragLabel:"true",dragMax:"255"})),j.createElement("div",{style:i.alpha},j.createElement(dt,{style:{input:i.input,label:i.label},label:"a",value:Math.round(100*t.a),onChange:u,dragLabel:"true",dragMax:"100"})))};class Ws extends(j.PureComponent||j.Component){constructor(r){super(r),this.handleChange=t=>{typeof this.props.onChange=="function"&&this.throttle(this.props.onChange,((n,o,f)=>{var i=f.getBoundingClientRect(),u=i.width,a=i.height,l=typeof n.pageX=="number"?n.pageX:n.touches[0].pageX,h=typeof n.pageY=="number"?n.pageY:n.touches[0].pageY,b=l-(f.getBoundingClientRect().left+window.pageXOffset),p=h-(f.getBoundingClientRect().top+window.pageYOffset);b<0?b=0:b>u&&(b=u),p<0?p=0:p>a&&(p=a);var g=b/u,c=1-p/a;return{h:o.h,s:g,v:c,a:o.a,source:"hsv"}})(t,this.props.hsl,this.container),t),t.preventDefault()},this.handleMouseDown=t=>{this.handleChange(t);const n=this.getContainerRenderWindow();n.addEventListener("mousemove",this.handleChange),n.addEventListener("mouseup",this.handleMouseUp)},this.handleMouseUp=t=>{t.preventDefault(),this.unbindEventListeners()},this.throttle=function(t,n,o){let f,i,u,a;var l=0;o||(o={});let h=function(){l=o.leading===!1?0:Date.now(),f=null,a=t.apply(i,u),f||(i=u=null)},b=function(){var p=Date.now();l||o.leading!==!1||(l=p);var g=50-(p-l);return i=this,u=arguments,g<=0||g>50?(f&&(clearTimeout(f),f=null),l=p,a=t.apply(i,u),f||(i=u=null)):f||o.trailing===!1||(f=setTimeout(h,g)),a};return b.cancel=function(){clearTimeout(f),l=0,f=i=u=null},b}((t,n,o)=>{t(n,o)})}componentWillUnmount(){this.throttle.cancel(),this.unbindEventListeners()}getContainerRenderWindow(){const{container:r}=this;let t=window;for(;!t.document.contains(r)&&t.parent!==t;)t=t.parent;return t}unbindEventListeners(){const r=this.getContainerRenderWindow();r.removeEventListener("mousemove",this.handleChange),r.removeEventListener("mouseup",this.handleMouseUp)}render(){const{color:r,white:t,black:n,pointer:o,circle:f}=this.props||{},i={position:"absolute",top:"0px",left:"0px",right:"0px",bottom:"0px"},u={color:{...i,backgroundColor:`hsl(${this.props.hsl?.h},100%, 50%)`,borderRadius:this.props.style?.borderRadius},white:{...i,borderRadius:this.props.style?.borderRadius},black:{...i,boxShadow:this.props.style?.boxShadow,borderRadius:this.props.style?.borderRadius},pointer:{...i,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 z.jsxs("div",{style:u.color,ref:a=>this.container=a,onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange,children:[z.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
|
+
`}),z.jsxs("div",{style:u.white,className:"saturation-white",children:[z.jsx("div",{style:u.black,className:"saturation-black"}),z.jsx("div",{style:u.pointer,children:this.props.pointer?z.jsx(this.props.pointer,{...this.props}):z.jsx("div",{style:u.circle})})]})]})}}const qt=(e,r=null)=>{const t=e.hex?O(e.hex):O(e||"transparent"),n=t.toHsl(),o=t.toHsv(),f=t.toRgb(),i=t.toHex();return n.s===0&&(n.h=r??0,o.h=r??0),{hsl:n,hex:"#"+i,rgb:f,hsv:o,source:e.source}},wu=j.memo(e=>{const{selectedColor:r,onColorChange:t,renderers:n,disableAlpha:o=!1,style:f=I.$n.EmptyCssProperties,...i}=e,u=I.Js(),[a,l]=j.useState(()=>qt(r)),[h,b]=j.useState(a.hsl.h??0),p=j.useCallback(s=>{let d=qt(s,h);return b(d.hsl.h??0),l(d),d},[h]),g=j.useCallback(s=>{const d=p(s),v=`rgba(${d.rgb.r},${d.rgb.g},${d.rgb.b},${o?1:d.rgb.a})`;t?.(v)},[t,p,o]);j.useLayoutEffect(()=>{p(r)},[r,p]);const c=z.jsx("div",{style:{position:"relative",minHeight:"10px",maxHeight:"10px",width:"100%"},children:z.jsx(ys,{style:{radius:"2px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},rgb:a.rgb,hsl:a.hsl,renderers:n,onChange:g})});return z.jsxs("div",{style:{display:"flex",flexDirection:"column",...f},...i,children:[z.jsx("div",{style:{width:"100%",flex:"1 1 100%",position:"relative",overflow:"hidden"},children:z.jsx(Ws,{style:{borderRadius:"3px",boxShadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},hsl:a.hsl,hsv:a.hsv,onChange:g})}),z.jsxs("div",{style:{marginTop:"4px",display:"flex",gap:"4px"},children:[z.jsxs("div",{style:{flex:"1",display:"flex",flexDirection:o?"row":"column",justifyContent:"space-between",alignItems:"center"},children:[z.jsx("div",{style:{position:"relative",minHeight:"10px",maxHeight:"10px",width:"100%"},children:z.jsx(js,{style:{radius:"2px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},hsl:a.hsl,onChange:g})}),o?null:c]}),z.jsxs("div",{style:{minWidth:"24px",maxWidth:"24px",minHeight:"24px",maxHeight:"24px",position:"relative",borderRadius:"1px",overflow:"hidden"},children:[z.jsx(I.sq,{grey:u.palette.text.icon??u.palette.action.active}),z.jsx("div",{style:{position:"absolute",height:"100%",width:"100%",background:`rgba(${a.rgb.r},${a.rgb.g},${a.rgb.b},${o?1:a.rgb.a})`,boxShadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"}})]})]}),z.jsx(I.Box,{sx:{marginBottom:"4px","& label":{fontFamily:s=>`${s.typography.fontFamily} !important`,color:s=>`${s.palette.text.secondary} !important`},"& *":{fontFamily:s=>`${s.typography.fontFamily} !important`,userSelect:"none"},"& input":{paddingLeft:s=>`${s.spacing(.5)} !important`,paddingRight:s=>`${s.spacing(.5)} !important`,outline:"none",boxSizing:"border-box",width:"100% !important",textAlign:"center"}},children:z.jsx(Hs,{rgb:a.rgb,hsl:a.hsl,hex:a.hex,disableAlpha:o,onChange:g})})]})});exports.CustomColorPanel=wu,exports.default=wu,exports.toState=qt;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";/**
|
|
2
|
+
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.0.0
|
|
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 t=require("react/jsx-runtime"),a=require("react"),n=require("./DMKZDMHHXLePvLy3.cjs"),k=["Ok","Cancel"],b=a.memo(x=>{const{tableOptions:o,context:c,onOption:p,onValidateOption:q,onDone:d,options:u=k,defaultOption:s=u?.[0],cancelOption:i="Cancel",sx:h,...m}=x,[O,C]=a.useState(!1),[l,f]=a.useState(()=>o?.hasHeader??!1),[r,j]=a.useState(()=>o?.ranges??null),S=n.Te(e=>{const g={...o,hasHeader:l,ranges:r};p?.(e,e===i,e===s),d?.({option:e,tableOptions:g})},[d,p,s,i,l,r,o]),T=a.useCallback(async(e,g)=>null,[]);return t.jsx(n.Cb,{title:"Insert Table",options:u,onDone:S,onValidateOption:T,defaultOption:s,cancelOption:i,autoFocusSel:".range-input input",sx:{width:"360px",...h},...m,children:t.jsxs(n.Box,{sx:{paddingTop:e=>e.spacing(1),paddingBottom:e=>e.spacing(0),rowGap:e=>e.spacing(1),display:"flex",flexDirection:"column"},children:[t.jsx(n.Pq,{formName:"range",value:r,onChangeInput:e=>j(e),resolvedAddress:c.getNames().getRanges.bind(c.getNames()),onFocus:e=>{O||e.target?.select(),C(!0)}}),t.jsx(n.FormControlLabel,{control:t.jsx(n.Checkbox,{checked:l,onChange:()=>f(!l)}),label:"Table has headers",labelPlacement:"end"})]})})});exports.TableNewDialog=b,exports.default=b;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";/**
|
|
2
|
+
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.0.0
|
|
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"});exports.default={AND:{s:"Checks whether all arguments are TRUE, and returns TRUE if all arguments are TRUE",p:{logical:{d:"logical1,logical2,... are 1 to 255 conditions you want to test that can be either TRUE or FALSE and can be logical values, arrays, or references"}}},BYCOL:{s:"Applies a LAMBDA function to each column and returns an array of the results.",p:{array:{d:"is an array to be separated by column"},fn:{d:"is a LAMBDA that is called to scan the array. The LAMBDA takes two parameters, accumulator and value."}},h:"Unimplemented"},BYROW:{s:"Applies a LAMBDA function to each row and returns an array of the results.",p:{array:{d:"is an array to be separated by column"},fn:{d:"is a LAMBDA that is called to scan the array. The LAMBDA takes two parameters, accumulator and value."}},h:"Unimplemented"},FALSE:{s:"Returns the logical value FALSE",p:{}},IF:{s:"Checks whether a condition is met, and returns one value if TRUE, and another value if FALSE",p:{logicalTest:{d:"is any value or expression that can be evaluated to TRUE or FALSE"},valueIfTrue:{d:"is the value that is returned if Logical_test is TRUE. If omitted, TRUE is returned. You can nest up to seven IF functions"},valueIfFalse:{d:"is the value that is returned if Logical_test is FALSE. If omitted, FALSE is returned"}}},IFERROR:{s:"Returns value_if_error if expression is an error and the value of the expression itself otherwise",p:{value:{d:"is any value or expression or reference"},valueIfError:{d:"is any value or expression or reference"}}},IFNA:{s:"Returns the value you specify if the expression resolves to #N/A, otherwise returns the result of the expression",p:{value:{d:"is any value or expression or reference"},valueIfError:{d:"is any value or expression or reference"}}},IFS:{s:"Checks whether one or more conditions are met and returns a value corresponding to the first TRUE condition",p:{logicalTest:{d:"logical_test1,logical_test2,... is any value or expression that can be evaluated to TRUE or FALSE"},logicalTrue:{d:"value_if_true1,value_if_true2,... is the value returned if Logical_test is TRUE"},rest:{}}},LAMDA:{s:"Creates a function value with can be called within formulas.",p:{parameterOrCalculation:{d:"a parameter or a calculation that returns a value. If a parameter, it must be the last argument."}},h:"Unimplemented"},LET:{s:"Assigns calculation results to names. Useful for storing intermediate calculations and values by defining names inside a formula. These names only apply within the scope of the LET function.",p:{name:{d:"name1,name2,... the name, or a calculation which can make use of all names within the LET. Names must start with a letter, cannot be the output of a formula, or conflict with range syntax."},nameOrValue:{d:"name_value1,name_value2,... the value associated with the name."},calculationOrName:{},rest:{}},h:"Unimplemented"},MAKEARRAY:{s:"Returns a calculated array of a specified row and column size, by applying a LAMBDA function.",p:{rows:{d:"is the number of rows in the array. Must be greater than zero."},columns:{d:"is the number of columns in the array. Must be greater than zero."},fn:{d:"is a LAMBDA that is called to create the array. The LAMBDA takes two parameters, row index and column index."}},h:"Unimplemented"},MAP:{s:"Returns an array formed by 'mapping' each value in the array(s) to a new value by applying a lambda to create a new value.",p:{array:{d:"is an array to be mapped"},lamdaOrArray:{d:"lambda_or_array1,lambda_or_array2,... is a LAMBDA which must be the last argument and must have a parameter for each array passed, or another array to be mapped"}},h:"Unimplemented"},NOT:{s:"Changes FALSE to TRUE, or TRUE to FALSE",p:{logical:{d:"is a value or expression that can be evaluated to TRUE or FALSE"}}},OR:{s:"Checks whether any of the arguments are TRUE, and returns TRUE or FALSE. Returns FALSE only if all arguments are FALSE",p:{logical:{d:"logical1,logical2,... are 1 to 255 conditions that you want to test that can be either TRUE or FALSE"}}},REDUCE:{s:"Reduces an array to an accumulated value by applying a LAMBDA function to each value and returning the total value in the accumulator.",p:{initialValue:{d:"is the starting value for the accumulator"},array:{d:"is an array to be reduced"},fn:{d:"is a LAMBDA that is called to reduce the array. The LAMBDA takes two parameters, accumulator and value."}},h:"Unimplemented"},SCAN:{s:"Scans an array by applying a LAMBDA function to each value and returns an array that has each intermediate value",p:{initialValue:{d:"is the starting value for the accumulator"},array:{d:"is an array to be reduced"},fn:{d:"is a LAMBDA that is called to reduce the array. The LAMBDA takes two parameters, accumulator and value."}},h:"Unimplemented"},SWITCH:{s:"Evaluates an expression against a list of values and returns the result corresponding to the first matching value. If there is no match, an optional default value is returned",p:{expression:{},value:{d:"is an expression to be evaluated"},results:{d:"result1,result2,... is a result to be returned if the corresponding value matches expression"}},h:"Unimplemented"},TRUE:{s:"Returns the logical value TRUE",p:{}},XOR:{s:"Returns a logical 'Exclusive Or' of all arguments",p:{logical:{d:"logical1,logical2,... are 1 to 254 conditions you want to test that can be either TRUE or FALSE and can be logical values, arrays, or references"}}}};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";/**
|
|
2
|
+
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.0.0
|
|
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"),a=require("react"),n=require("./DMKZDMHHXLePvLy3.cjs"),M=["Input"],H=a.memo(a.forwardRef((O,N)=>{const{initialValue:y="",onOption:T,onValidateOption:r,onInputOption:s,onValidateInputOption:l,onDone:u,inputProps:c,inputLabel:P,inputType:w,inputPlaceHolder:F,options:d=M,autoFocusSel:S=".autoFocus",cancelOption:g,defaultOption:m=d?.[0],...b}=O,[C,L]=a.useState(!1),[e,v]=a.useState(y),[I,j]=a.useState(""),[k,V]=a.useState(!0),i=n.Ln(async(t,o)=>{if(!l)return!0;const h=await l?.(t,o);j(h?.message??"");const x=h?.valid??!0;return V(x),x},[l]),f=n.Ln(async t=>{s?.(e,t)},[e,s,u,T,g,m]),q=n.Ln(async t=>{t.keyCode===n.ei.Enter&&await i?.(e,null)},[e,f]),B=n.Ln(t=>{v(t.target.value),i?.(t.target.value,null)},[r]),D=n.Ln(async t=>{let o=await i(e,t);try{o!==!1&&(o=await i(e,t))}catch{}return o??!0},[e,r]);return p.jsx(n.Cb,{options:d,onDone:u,onOption:(t,o)=>{o||f(t)},onValidateOption:D,cancelOption:g,defaultOption:m,autoFocusSel:S,...b,children:p.jsx(n.Box,{sx:{paddingTop:t=>t.spacing(1),paddingBottom:t=>t.spacing(0)},children:p.jsx(n.FormControl,{sx:{paddingTop:t=>t.spacing(1.5),minWidth:135,width:"100%"},size:"small",children:p.jsx(n.TextField,{onFocus:t=>{C||t.target?.select(),L(!0)},type:w,label:P,helperText:I||" ",sx:{width:"100%","& .MuiFormHelperText-root":{marginTop:t=>t.spacing(.5),color:k?void 0:"error.main"}},InputLabelProps:{shrink:!0},InputProps:{inputProps:{placeholder:F,spellCheck:!1,autoComplete:"off",...c,className:n.Or("autoFocus",c?.className),sx:{paddingTop:t=>t.spacing(1.25),paddingBottom:t=>t.spacing(.75),backgroundImage:`linear-gradient(${n.alpha("#fff",n.TP(5))}, ${n.alpha("#fff",n.TP(5))})`}}},value:e,onChange:B,onKeyDown:q,onContextMenu:t=>{t.stopPropagation()}})})})})}));exports.default=H;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";/**
|
|
2
|
+
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.0.0
|
|
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"});/**
|
|
7
|
+
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.0.0
|
|
8
|
+
*
|
|
9
|
+
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
10
|
+
* License: The license can be found at https://www.sheetxl.com/license.
|
|
11
|
+
*//**
|
|
12
|
+
* @license @sheetxl/sdk - A high-performance, embeddable spreadsheet engine. - v0.0.0
|
|
13
|
+
*
|
|
14
|
+
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
15
|
+
* License: The license can be found at https://www.sheetxl.com/license.
|
|
16
|
+
*//**
|
|
17
|
+
* @license @sheetxl/scripting - SheetXL scripting utilities including TypeScript compilation. - v0.0.0
|
|
18
|
+
*
|
|
19
|
+
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
20
|
+
* License: The license can be found at https://www.sheetxl.com/license.
|
|
21
|
+
*//**
|
|
22
|
+
* @license @sheetxl/utils - Utils - Utilities used by most SheetXL components. - v0.1.93
|
|
23
|
+
*
|
|
24
|
+
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
25
|
+
* License: The license can be found at https://www.sheetxl.com/license.
|
|
26
|
+
*/const h="text/html",b="text/plain",L="image/png",Ct=Object.freeze({left:0,top:0}),Mt=Object.freeze({left:0,top:0,bottom:0,right:0}),Rt=Object.freeze({x:0,y:0,width:0,height:0});Object.freeze(Object.defineProperty({__proto__:null,EmptyBounds:Rt,EmptyRect:Mt,EmptyTopLeft:Ct},Symbol.toStringTag,{value:"Module"}));const m="column",j="row",At=Object.freeze({colIndex:0,rowIndex:0}),Ft=Object.freeze({colStart:0,rowStart:0,colEnd:0,rowEnd:0}),yt=(e,t)=>e.colStart===t.colStart?e.rowStart-t.rowStart:e.colStart-t.colStart,gt=(e,t)=>e.rowStart===t.rowStart?e.colStart-t.colStart:e.rowStart-t.rowStart,Lt=(e,t)=>e.rowEnd===t.rowEnd?t.colEnd-e.colEnd:t.rowEnd-e.rowEnd,Pt=(e,t)=>e.colEnd===t.colEnd?t.rowEnd-e.rowEnd:t.colEnd-e.colEnd,J=(e,t)=>e.colIndex===t.colIndex?e.rowIndex-t.rowIndex:e.colIndex-t.colIndex,H=(e,t)=>e.rowIndex===t.rowIndex?e.colIndex-t.colIndex:e.rowIndex-t.rowIndex,bt=(e=j,t=!1)=>t?e!==m?Lt:Pt:e!==m?gt:yt,K=(e,t)=>e===t||!(!e||!t)&&e.rowIndex===t.rowIndex&&e.colIndex===t.colIndex,D=(e,t)=>e===t||!(!e||!t)&&e.rowStart===t.rowStart&&e.rowEnd===t.rowEnd&&e.colStart===t.colStart&&e.colEnd===t.colEnd,$=(e,t)=>!(!e||!t||e.colStart>t.colEnd||t.colStart>e.colEnd||e.rowStart>t.rowEnd||t.rowStart>e.rowEnd),Y=(e,t)=>{if(e===t)return!0;if(!e||!t||e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(!D(e[r],t[r]))return!1;return!0},P=(e,t,r)=>{if(!e&&!t)return null;if(!e)return r?t:{...t};if(!t)return r?e:{...e};const n=Math.min(e.colStart,t.colStart),o=Math.min(e.rowStart,t.rowStart),a=Math.max(e.colEnd,t.colEnd),i=Math.max(e.rowEnd,t.rowEnd);let l=r;return l?(l.colStart=n,l.rowStart=o,l.colEnd=a,l.rowEnd=i):l={colStart:n,rowStart:o,colEnd:a,rowEnd:i},l},Z=(e,t)=>{if(!t||t.length===0)return e;const r={...e};for(let n=0;n<t.length;n++){const o=t[n];$(r,o)&&(r.rowStart=Math.min(r.rowStart,o.rowStart),r.colStart=Math.min(r.colStart,o.colStart),r.rowEnd=Math.max(r.rowEnd,o.rowEnd),r.colEnd=Math.max(r.colEnd,o.colEnd))}return r},Ut=[null,null],kt=(e,t,r)=>{if(e[0].value===e[1].value)return t};function X(e,t=2,r,n=j,o){let a=[...e];if(t<=0||e.length<=1)return a;let i=n===m,l=0,s=!1;do{const c=a.sort(bt(i?j:m));a=[],a.push(c[0]);const d=c.length;let w=0,u=c[0],f=u.colStart,p=u.rowStart,x=u.colEnd,_=u.rowEnd;for(let A=1;A<d;A++){const g=c[A];let G=!1;if(G=i?u&&p===g.rowStart&&_===g.rowEnd&&x+1===g.colStart:u&&f===g.colStart&&x===g.colEnd&&_+1===g.rowStart,G){let S={colStart:f,rowStart:p,colEnd:i?g.colEnd:x,rowEnd:i?_:g.rowEnd};if(u.value!==void 0&&(S.value=u.value),r){const F=o??[null,null];F[0]=u,F[1]=g,S=r(F,S,n)}if(S){a[w]=S,s=!0,u=S,f=u.colStart,p=u.rowStart,x=u.colEnd,_=u.rowEnd;continue}}a[++w]=g,u=g,f=u.colStart,p=u.rowStart,x=u.colEnd,_=u.rowEnd}l++,i=!i,l===1&&(s=!0)}while(l<t&&s&&a.length>1);return a}Object.freeze(Object.defineProperty({__proto__:null,EmptyCell:At,EmptyRange:Ft,cellToRange:(e,t)=>{if(!e)return null;let r=t;return r||(r={...e},delete r.colIndex,delete r.rowIndex),r.colStart=e.colIndex??0,r.rowStart=e.rowIndex??0,r.colEnd=e.colIndex??0,r.rowEnd=e.rowIndex??0,r},columnFirstCellComparator:J,columnFirstRangeComparator:yt,createCellComparator:(e=j,t=!1)=>t?e!==m?(r,n)=>r.rowIndex===n.rowIndex?n.colIndex-r.colIndex:n.rowIndex-r.rowIndex:(r,n)=>r.colIndex===n.colIndex?n.rowIndex-r.rowIndex:n.colIndex-r.colIndex:e!==m?H:J,createConflatingRanges:(e,t=!1)=>{const r=[];let n,o,a=Number.MIN_SAFE_INTEGER,i=Number.MIN_SAFE_INTEGER;return{append:(l,s,c)=>{let d=!0;const w=c!==void 0;if(w){const p=e?e(o,c,t):o===c?c:void 0;p===void 0?d=!1:c=p}if(d&&s===i+1&&l===a)return t?n.rowEnd=s:n.colEnd=s,i=s,void(o=c);n&&r.push(n);const u=t?l:s,f=t?s:l;n={colStart:u,rowStart:f,colEnd:u,rowEnd:f},w&&(n.value=c),a=l,i=s,o=c},done:l=>(n&&(r.push(n),n=null),l?X(r,3,l===!0?kt:l,t?m:j,Ut):r)}},createRangeComparator:bt,defaultRange:(e,t,r)=>e?r?(r.colStart=e.colStart??t.colStart,r.rowStart=e.rowStart??t.rowStart,r.colEnd=e.colEnd??t.colEnd,r.rowEnd=e.rowEnd??t.rowEnd,r):{colStart:e.colStart??t.colStart,rowStart:e.rowStart??t.rowStart,colEnd:e.colEnd??t.colEnd,rowEnd:e.rowEnd??t.rowEnd}:t,extendRangeToIntersectingRanges:Z,extendRangeToUnionRanges:(e,t)=>{if(!t||t.length===0)return e;let r=e,n=null;for(;!D(r,n);)n=r,r=Z(n,t);return r},indexOfCoords:(e,t)=>{const r={colStart:e.colIndex,rowStart:e.rowIndex,colEnd:e.colIndex,rowEnd:e.rowIndex};for(let n=t.length-1;n>=0;n--)if($(r,t[n]))return n;return-1},intersectRanges:(e,t,r)=>{if(!e)return r?t:{...t};if(!t)return r?e:{...e};if(!e&&!t||e.rowStart>t.rowEnd||e.rowEnd<t.rowStart||e.colStart>t.colEnd||e.colEnd<t.colStart)return null;const n=Math.max(e.colStart,t.colStart),o=Math.max(e.rowStart,t.rowStart),a=Math.min(e.colEnd,t.colEnd),i=Math.min(e.rowEnd,t.rowEnd);let l=r;return l?(l.colStart=n,l.rowStart=o,l.colEnd=a,l.rowEnd=i):l={colStart:n,rowStart:o,colEnd:a,rowEnd:i},l},isCellWithinRange:(e,t)=>!(!e||!t||e.rowIndex<t.rowStart||e.rowIndex>t.rowEnd||e.colIndex<t.colStart||e.colIndex>t.colEnd),isEqualCells:K,isEqualRanges:D,isEqualRangesArrays:Y,isEqualSelectionCoords:(e,t)=>e===t||!(!e||!t)&&e.rangeIndex===t.rangeIndex&&!!K(e.cell,t.cell)&&Y(e.ranges,t.ranges),isRangeWithinRange:(e,t)=>!(e.rowStart<t.rowStart||e.rowEnd>t.rowEnd||e.colStart<t.colStart||e.colEnd>t.colEnd),isRangesIntersect:$,isSingleCell:e=>!!e&&e.rowEnd===e.rowStart&&e.colStart===e.colEnd,isValidRange:e=>!(!e||typeof e.colStart!="number"||e.colStart<0||typeof e.colEnd!="number"||e.colEnd<e.colStart||typeof e.rowStart!="number"||e.rowStart<0||typeof e.rowEnd!="number"||e.rowEnd<e.rowStart),mergeRangedValues:X,rowFirstCellComparator:H,rowFirstRangeComparator:gt,sanitizeRange:e=>e?{colStart:e.colIndex??e.colStart??0,rowStart:e.rowIndex??e.rowStart??0,colEnd:e.colIndex??e.colEnd??0,rowEnd:e.rowIndex??e.rowEnd??0}:null,translateRange:(e,t=-e.rowStart,r=-e.colStart,n)=>n?(n.colStart=e.colStart+r,n.rowStart=e.rowStart+t,n.colEnd=e.colEnd+r,n.rowEnd=e.rowEnd+t,n):{colStart:e.colStart+r,rowStart:e.rowStart+t,colEnd:e.colEnd+r,rowEnd:e.rowEnd+t},unionRanges:P,unionRangesArrays:(e,t,r)=>{if(!e||e.length===0)return null;if(e.length===1&&!t)return e[0];let n=e[0];for(let o=1;o<e.length;o++)n=P(n,e[o],r);return t&&(n=P(n,t,r)),n}},Symbol.toStringTag,{value:"Module"}));const Nt=typeof Symbol=="function"&&Symbol.for?Symbol.for("react.element"):60103;function Bt(e){return function(t){return!!t&&typeof t=="object"}(e)&&!function(t){const r=Object.prototype.toString.call(t);return r==="[object RegExp]"||r==="[object Date]"||t.$$typeof===Nt}(e)}function I(e,t){return t.clone!==!1&&t.isMergeableObject(e)?E((r=e,Array.isArray(r)?[]:{}),e,t):e;var r}function zt(e,t,r){return e.concat(t).map(function(n){return I(n,r)})}function Q(e){return Object.keys(e).concat((t=e,Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(t).filter(function(r){return Object.propertyIsEnumerable.call(t,r)}):[]));var t}function tt(e,t){try{return t in e}catch{return!1}}function E(e,t,r){(r=r||{}).arrayMerge=r.arrayMerge||zt,r.isMergeableObject=r.isMergeableObject||Bt,r.cloneUnlessOtherwiseSpecified=I;const n=Array.isArray(t);return n===Array.isArray(e)?n?r.arrayMerge(e,t,r):function(o,a,i){const l={};return i.isMergeableObject(o)&&Q(o).forEach(function(s){l[s]=I(o[s],i)}),Q(a).forEach(function(s){var c,d;tt(c=o,d=s)&&(!Object.hasOwnProperty.call(c,d)||!Object.propertyIsEnumerable.call(c,d))||(tt(o,s)&&i.isMergeableObject(a[s])?l[s]=function(w,u){if(!u.customMerge)return E;const f=u.customMerge(w);return typeof f=="function"?f:E}(s,i)(o[s],a[s],i):l[s]=I(a[s],i))}),l}(e,t,r):I(t,r)}E.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce(function(r,n){return E(r,n,t)},{})};const qt=Object.freeze([]),Dt=Object.freeze({}),et=e=>e,R=()=>"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){let t=16*Math.random()|0;return(e==="x"?t:3&t|8).toString(16)}),mt=(e,t)=>e===t||!(!Array.isArray(e)||!Array.isArray(t)||e.length!==t.length)&&e.every((r,n)=>r===t[n]),O=e=>typeof e=="object"&&!Array.isArray(e)&&e!==null,Et=e=>typeof e!="object"||Array.isArray(e)||e===null?e:(Object.keys(e).forEach(function(t){e[t]&&typeof e[t]=="object"?Et(e[t]):e[t]!==null&&e[t]!==void 0||delete e[t],typeof e[t]=="object"&&Object.keys(e[t]).length===0&&delete e[t]}),Object.keys(e).length===0?null:e),$t=(e,t)=>!(e!==t&&!mt(e,t)&&!e.isEqual?.(t)),St=(e,t,r=$t)=>{if(e==null||e===t)return null;if(!e||typeof e!="object"||Array.isArray(e)||e.isImmutable?.())return r(e,t)?null:e;const n=Object.keys(e);if(n.length===0)return null;let o=!1;for(let a=0;a<n.length;a++){const i=n[a];St(e[i],t?.[i],r)===null&&(o=!0,delete e[i])}return o&&Object.keys(e).length===0?null:void 0},rt=typeof performance=="object"&&typeof performance.now=="function"?()=>performance.now():()=>Date.now(),nt=e=>e==null,ot=(e,t)=>!(t.left>e.right||t.right<e.left||t.top>e.bottom||t.bottom<e.top),at=!(typeof window>"u"||!window.document||!window.document.createElement),y={Windows:"windows",MacOS:"macos",IOS:"ios",Linux:"linux",Android:"android",Safari:"safari",Firefox:"firefox",Node:"node",Unknown:"unknown"},T=()=>{if(vt())return y.Node;const e=globalThis.navigator!==void 0&&globalThis.navigator.userAgent?globalThis.navigator.userAgent.toLowerCase():"";return e?/(win32|win64|windows|wince)/i.test(e)?y.Windows:/(macintosh|macintel|macppc|mac68k|macos)/i.test(e)?y.MacOS:/(iphone|ipad|ipod)/i.test(e)?y.IOS:/android/.test(e)?y.Android:/linux/.test(e)?y.Linux:/^((?!chrome|android|).)*safari/i.test(e)?y.Safari:/^((?!chrome|android|Seamonkey).)*firefox/i.test(e)?y.Firefox:y.Unknown:y.Unknown};function vt(){return typeof process<"u"&&process.release?.name==="node"||(typeof process<"u"&&process.browser,!1)}const it=(e,t=!1)=>(document.hasFocus()||t)&&(e===document.activeElement||e?.contains(document.activeElement)),xt=Object.freeze(Object.defineProperty({__proto__:null,EmptyArray:qt,EmptyObject:Dt,OSType:y,arrayMove:function(e,t,r){const n=e.slice();return n.splice(r<0?n.length+r:r,0,n.splice(t,1)[0]),n},asNumber:e=>{const t=1*e;return Number.isFinite(t)?t:0},camelToPrettyCase:e=>e.length===1?e.toUpperCase():e.replace(/([A-Z])/g," $1").replace(/^./,function(t){return t.toUpperCase()}).trim(),canUseDOM:at,cancelTimeout:e=>{cancelAnimationFrame(e.id)},castToString:e=>e==null||e===void 0?"":typeof e!="string"?""+e:e,cloneObject:e=>nt(e)?e:JSON.parse(JSON.stringify(e)),consoleWithNoSource:(...e)=>new Promise(t=>{setTimeout(()=>{Function("console.log.apply(console, arguments)").apply(null,e),t()})}),debounce:function(e,t=300,r=!1){let n,o,a,i,l=0;function s(){let d=Date.now()-l;d<t&&d>=0?n=setTimeout(s,t-d):(n=null,r||(i=e.apply(a,o),a=o=null))}t==null&&(t=100);const c=function(){a=globalThis,o=arguments,l=Date.now();var d=r&&!n;return n||(n=setTimeout(s,t)),d&&(i=e.apply(a,o),a=o=null),i};return c.clear=function(){n&&(clearTimeout(n),n=null)},c.flush=function(){n&&(i=e.apply(a,o),a=o=null,clearTimeout(n),n=null)},c},deepEqual:function e(t,r){if(t===r)return!0;if(t&&r&&typeof t=="object"&&typeof r=="object"){if(t.constructor!==r.constructor)return!1;let n,o,a;if(Array.isArray(t)){if(n=t.length,n!=r.length)return!1;for(o=n;o--!==0;)if(!e(t[o],r[o]))return!1;return!0}if(t instanceof Map&&r instanceof Map){if(t.size!==r.size)return!1;for(o of t.entries())if(!r.has(o[0]))return!1;for(o of t.entries())if(!e(o[1],r.get(o[0])))return!1;return!0}if(t instanceof Set&&r instanceof Set){if(t.size!==r.size)return!1;for(o of t.entries())if(!r.has(o[0]))return!1;return!0}if(ArrayBuffer.isView(t)&&ArrayBuffer.isView(r)){if(n=t.length,n!=r.length)return!1;for(o=n;o--!==0;)if(t[o]!==r[o])return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if(a=Object.keys(t),n=a.length,n!==Object.keys(r).length)return!1;for(o=n;o--!==0;)if(!Object.prototype.hasOwnProperty.call(r,a[o]))return!1;for(o=n;o--!==0;){let i=a[o];if(!(i==="_owner"&&t.$$typeof||e(t[i],r[i])))return!1}return!0}return t!=t&&r!=r},deepFreeze:function e(t){return Object.freeze(t),Object.keys(t).forEach(r=>{typeof t[r]!="object"||t[r]===null||Object.isFrozen(t[r])||e(t[r])}),t},deepMerge:E,diffValues:(e,t)=>{const r={},n=Object.keys(t),o=n.length;for(let a=0;a<o;a++){const i=n[a];e[i]!==t[i]&&(e[i]===void 0?r[i]=t[i]:r[i]=e[i])}return Object.keys(r).length===0?null:r},findEqualOrGreater:function(e,t,r=et){let n=0,o=e.length-1;for(;n<=o;){let a=Math.floor((n+o)/2),i=r(e[a]);if(i===t)return a;i<t?n=a+1:o=a-1}return n},findEqualOrLesser:function(e,t,r=et){let n=e.length-1,o=0;for(;n>=o;){let a=Math.floor((n+o)/2),i=r(e[a]);if(i===t)return a;i>t?n=a-1:o=a+1}return n},findNextStep:(e,t=!0,r=15,n=10,o=400)=>{const a=Math.max(e-n,0)+(t?1:-1);return Math.min(o,Math[t?"ceil":"floor"](a/r)*r+n)},getBuildEnv:()=>"browser2-build",getDPI:()=>{let e=1;return typeof window=="object"&&(e=window.devicePixelRatio||1),e},getFromPath:(e,t)=>{const r=t.split(".");let n=e;for(let o=0;o<r.length;o++){const a=r[o];if(!n)return null;let i=n[a];if(typeof i=="function"&&(i=i.bind(n)()),!i||!O(i))return i;n=i}return n??null},getOS:T,hasFocus:it,isDefined:e=>e!=null,isEmpty:e=>e==null||e==="",isEqualArrays:mt,isEqualBounds:(e,t)=>e===t||!(e&&!t||t&&!e)&&e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height,isEqualObjectKeys:(e,t)=>{if(e===t)return!0;if(e&&!t||t&&!e)return!1;const r=Object.keys(e);if(r.length!==Object.keys(t).length)return!1;for(let n=0;n<r.length;n++)if(e[r[n]]!==t[r[n]])return!1;return!0},isNode:vt,isNullOrUndefined:nt,isNumeric:e=>{const t=1*e;return Number.isFinite(t)&&typeof t=="number"},isObject:O,isPromiseLike:e=>!!e&&typeof e.then=="function",isRectInsideRect:(e,t)=>e.top>=t.top&&e.bottom<=t.bottom&&e.left>=t.left&&e.right<=t.right,isRectIntersect:ot,mergeContentful:(...e)=>{const t=e.length;if(t>0&&e[t-1]!==void 0&&!O(e[t-1]))return e[t-1];let r=e[0]||{};for(let n=1;n<t;n++)r=E(r,e[n]||{},{arrayMerge:(o,a)=>[...a]});return r},nextTick:e=>{typeof window<"u"&&typeof window.requestAnimationFrame=="function"?window.requestAnimationFrame(()=>{e()}):(typeof setImmediate=="function"?setImmediate:setTimeout)(()=>{e()})},openFileDialog:(e="*.*")=>new Promise((t,r)=>{if(!at)return void r("Unable to open dialog with no dom.");const n=document.createElement("input");n.type="file",n.accept=e;let o=null,a=!1;globalThis.addEventListener?.("focus",()=>{setTimeout(()=>{o||a||(a=!0,t(null))},1e3)},{once:!0,passive:!0}),n.onchange=()=>{if(o=n.files[0],o){if(a)return void console.warn("File open detected after faux cancel.",o);t(o)}},n.autofocus=!0,n.click()}),rafThrottle:e=>{let t,r=!1,n=function(){r=!1,e(t)};return function(o){t=o,t&&t.persist&&t.persist(),r||(r=!0,requestAnimationFrame(n))}},removeEmptyProperties:Et,removeEqualValues:St,removeListenerAll:e=>{if(!e)return[];for(let t=0;t<e.length;t++)e[t]&&e[t]();return[]},requestTimeout:(e,t)=>{const r=rt(),n={id:requestAnimationFrame(function o(){rt()-r>=t?e.call(null):n.id=requestAnimationFrame(o)})};return n},roundAccurately:(e,t=0)=>{if(e==null||!isFinite(e))return null;const r=10**t;return Number(Math.round(e*r)/r)},setToPath:(e,t,r)=>{const n=t.split(".");let o=e;if(!o)throw new Error("Can not set path to a null path.");for(let a=0;o&&a<n.length-1;a++){const i=n[a];let l=o[i];if(l==null&&(l={},o[i]=l),!O(l))throw new Error("Can not set path to a non object path.");o=l}if(typeof r!="number"&&typeof r!="boolean"&&typeof r!="string"&&!O(r))throw new Error(`Can not set path to ${r} that is not a a supported primitive.`);return o[n[n.length-1]]=r,e},splitNumber:e=>{let t=Math.abs(e);if(isNaN(t)||!isFinite(e))return null;let r=0|t,n=t-r,o=0,a=0,i=1;if(n>5e-8)for(;a<8&&Math.abs(o/i-n)>5e-8;)a++,i*=10,o=Math.round(n*i);return{ip:Math.trunc(e),fp:o,ipLength:Math.ceil(Math.log10(r+1)),fpLength:a}},subtractRect:(e,t,r=!1)=>{if(!t)return[e];if(!ot(e,t))return[];const n=[];let o=e;const a=()=>{t.top>o.top&&t.top<o.bottom&&(n.push({...o,bottom:t.top}),o={...o,top:t.top})},i=()=>{t.bottom>o.top&&t.bottom<o.bottom&&(n.push({...o,top:t.bottom}),o={...o,bottom:t.bottom})},l=()=>{t.right>o.left&&t.right<o.right&&(n.push({...o,left:t.right}),o={...o,right:t.right})},s=()=>{t.left>o.left&&t.left<o.right&&(n.push({...o,right:t.left}),o={...o,left:t.left})};return r?(s(),l(),a(),i()):(a(),i(),l(),s()),n},textToKey:e=>e.replace(/[^a-zA-Z0-9]/g,"").toLowerCase(),throttle:function(e,t){let r=null;return(...n)=>{const o=Date.now();(!r||o-r>=t)&&(r=o,e(...n))}},toSafeJSON:function e(t){if(t===null||typeof t!="object")return t;if(typeof t.toJSON=="function")return t.toJSON();if(Array.isArray(t))return t.map(n=>e(n));if(typeof t.toString=="function"&&t.toString!==Object.prototype.toString)return t.toString();const r={};for(const n in t)t.hasOwnProperty(n)&&(r[n]=e(t[n]));return r},transpose:e=>{if(!e)return e;const t=e.length,r=e[0].length,n=[];for(let o=0;o<r;o++)n[o]=Array(t);for(let o=0;o<t;o++)for(let a=0;a<r;a++)n[a][o]=e[o][a];return n},uuidV4:R,validEnumValue:(e,t)=>{if(!Object.values(e).includes(t))throw new Error(`Invalid type: ${t??"null"}. Must be one of: ${Object.values(t).join(", ")}.`)},whenFocus:async(e,t=!1)=>new Promise(r=>{it(e,t)?r(!0):e.addEventListener("focusin",()=>{r(!0)},{once:!0}),e.focus()})},Symbol.toStringTag,{value:"Module"}));Object.freeze(Object.defineProperty({__proto__:null,MESSAGE_ERROR_INVALID_ARG:e=>`Invalid argument: '${e}'.`},Symbol.toStringTag,{value:"Module"}));const _t=e=>{const t=new Uint8Array(e),r=t.byteLength;let n="";for(let o=0;o<r;o++)n+=String.fromCharCode(t[o]);if(typeof window<"u"&&typeof globalThis.btoa=="function")return globalThis.btoa(n);if(typeof Buffer<"u")return Buffer.from(n,"binary").toString("base64");throw new Error("Unsupported environment")},W=e=>new Promise((t,r)=>{if(e)if(typeof FileReader<"u"){const n=new FileReader;n.onload=()=>{t(n.result)},n.onerror=()=>{r(n.error)},n.readAsText(e)}else if(typeof Buffer<"u"){const n=o=>Buffer.from(o).toString("utf-8");e.arrayBuffer().then(o=>{t(n(o))}).catch(o=>{r(o)})}else r(new Error("Unsupported environment"));else t("")});Object.freeze(Object.defineProperty({__proto__:null,DEFAULT_MIME_TYPE:"*/*",arrayBufferToBase64:_t,base64ToArrayBuffer:e=>{const t=typeof window<"u"&&typeof globalThis.atob=="function"?globalThis.atob(e):Buffer.from(e,"base64").toString("binary"),r=t.length,n=new Uint8Array(r);for(let o=0;o<r;o++)n[o]=t.charCodeAt(o);return n.buffer},blobToString:W},Symbol.toStringTag,{value:"Module"}));const Ot="data:image/png;base64,",It="Unable to resolve image.",lt=e=>new Promise(async(t,r)=>{let n=null;try{n=new Image,n.src=e,n.addEventListener("load",function(){t({width:n.naturalWidth,height:n.naturalHeight})},{once:!0}),n.addEventListener("error",function(){URL.revokeObjectURL(e),r("Invalid Image")},{once:!0}),await n.decode("sync")}catch{n?.src&&URL.revokeObjectURL(n.src)}n||r(It)}),U="image/svg+xml";var st,ct;Object.freeze(Object.defineProperty({__proto__:null,DATA_URL_PNG_PREFIX:Ot,getImageDataUrl:(e,t=1)=>new Promise(async(r,n)=>{let o=null;try{o=new Image,o.src=e,o.addEventListener("load",function(){try{const a=document.createElement("canvas");a.width=o.naturalWidth,a.height=o.naturalHeight,a.getContext("2d").drawImage(o,0,0);const i=a.toDataURL("image/png",t);r({elemImg:o,dataUrl:i})}catch(a){URL.revokeObjectURL(e),n(a)}},{once:!0}),o.addEventListener("error",function(){URL.revokeObjectURL(e),n("Invalid Image")},{once:!0}),await o.decode("sync")}catch{o?.src&&URL.revokeObjectURL(o.src)}o||n(It)}),loadImageDetails:async(e,t=null)=>{let r=null;const n=async()=>{try{const a=t??"image/*",i=URL.createObjectURL(new Blob([e],{type:a})),l=await lt(i);r={mimeType:a,naturalDimensions:l,asUrl:i}}catch{}},o=async()=>{try{const a=new TextDecoder().decode(e),i=URL.createObjectURL(new Blob([a],{type:U})),l=await lt(i);r={mimeType:t??U,naturalDimensions:l,asUrl:i,asSVGText:a}}catch{}};if(t===U?await o():t.startsWith("image/")?await n():(await n(),r||await o()),!r)throw new Error("Failed to load image");return r}},Symbol.toStringTag,{value:"Module"})),(ct=st||(st={})).resolveTypedUpdates=(e,t,r,n)=>{if(e===null)return e;if(e===void 0)return n;let o=e;if(t?.shorthand){const s=t?.shorthand(e,r);s!==void 0&&(o=s)}if(o!==null&&t?.getSubType){const s=t.getSubType(o);s&&(t=s)}const a=t?.properties,i=t?.arrayType??!1;let l=o;if(t&&t.merge&&l&&n)l=t.merge(l,n,r);else if(!i&&a){const s=Object.keys({...o,...n});l=null;for(let c=0;c<s.length;c++){const d=s[c];let w,u=o[d];if(u!==void 0){const f=a[d];w=f?(0,ct.resolveTypedUpdates)(u,f,r,n?.[d]):u}else w=n?.[d];w!=null&&(l=l??{},l[d]=w)}}return l};const ut=`The Safari browser does not support advanced copy and paste.
|
|
27
|
+
Copy and paste will be limited to within the browser tab.
|
|
28
|
+
|
|
29
|
+
Please use Chrome or Edge if external copy and paste is required.`,k=`You do not have permissions to access the clipboard.
|
|
30
|
+
All copy and paste operations will be limited to the browser tab.`,jt={Safari:`The Safari browser does not support advanced copy and paste.
|
|
31
|
+
Copy and paste will be limited to within the browser tab.
|
|
32
|
+
|
|
33
|
+
Please use Chrome or Edge if external copy and paste is required.`,Perms:k,PermsWrite:T()===y.Safari?ut:k,PermsRead:T()===y.Safari?ut:k},N=async()=>new Promise(e=>{document.hasFocus()?e():globalThis.addEventListener?.("focus",()=>{e()},{once:!0}),document.activeElement.focus?.()}),B=async(e,t,r)=>{if(T()===y.Safari)return await r(new Error(jt.Safari));try{const n=async i=>{try{return await i()}catch(l){if(l.message?.includes("Document is not focused"))return!1;throw l}},o=await globalThis?.navigator?.permissions?.query({name:e,allowWithoutGesture:!0,allowWithoutSanitization:!0});let a=!1;if(o.state==="prompt"&&(a=await n(t)),a||o.state!=="granted"||(a=await t()),!a)return await r(new Error(o.state))}catch(n){return n.message==="No valid data on clipboard"||n.name==="DataError"?void 0:await r(n)}},Tt=async e=>{try{return await e.read({unsanitized:[h]})}catch{}return await e.read()};if(!globalThis.ClipboardItem){const e=(r,n)=>new Blob([n],{type:r});class t{constructor(n,o){this._items={},this._types=Object.keys(n);const a={},i=Object.keys(n);for(let l=0;l<i.length;l++){const s=i[l];let c=n[s];a[s]=typeof c=="string"?e(s,c):c}this._items=a,this._presentationStyle=o?.presentationStyle??"unspecified"}get types(){return this._types}getType(n){return Promise.resolve(this._items[n])}supports(n){return!0}}globalThis.ClipboardItem=t}const V=async(e,t=h)=>new Promise(async(r,n)=>{try{const o=await(async(a,i)=>{if(!a)return null;const l=await Tt(a);let s=!1;for(let c=0;!s&&l&&c<l.length;c++)if(s=l[c].types.includes(i),s)return await l[c].getType(i);return s?void 0:null})(e,t);if(o){const a=new FileReader;a.onload=()=>{r(a.result)},a.onerror=()=>{r("")},a.readAsText(o)}else r("")}catch(o){n(o)}}),dt=async(e,t=h)=>{const r=await V(e,t);if(!r)return null;let n=null;try{n=new DOMParser().parseFromString(r,h)}catch{console.warn("Can't parse html from clipboard.")}return n},C="clipboard-uuid",v="web text/uuid",ft=e=>`<div style="display:none" ${C}="${e}"/>`,Wt=(e,t)=>{let r=null;try{const n=new DOMParser().parseFromString(t,h);n.body.firstElementChild.setAttribute(C,e),r=n.getElementsByTagName("body")[0].innerHTML}catch(n){console.warn("Can't embed uuid.",n)}return r},pt=(e,t)=>{if(!t||!e)return!1;try{const r=t.querySelectorAll(`[${C}="${e}"]`);if(r&&r.length===1)return!0;if(t.querySelector("parsererror"))throw new Error("We are unable to parse node");return!1}catch{return!1}};class wt{constructor(t){if(t?.nativeClipboard===void 0||t?.nativeClipboard===!0)try{this._nativeClipboard=globalThis?.navigator.clipboard}catch{t?.nativeClipboard===!0&&console.warn("NativeClipboard option set to true but no native clipboard available.")}else this._nativeClipboard=t?.nativeClipboard===!1?null:t?.nativeClipboard;this._disableCheckOnFocus=t?.disableCheckOnFocus??!1,this._init()}async _checkForChanges(){this._nativeClipboard&&this._state&&!this._disableCheckOnFocus&&await B("clipboard-read",async()=>{await N();const t=await V(this._nativeClipboard,v);if(!this._state||t&&t===this._state.uuid)return!0;const r=await dt(this._nativeClipboard,h);return!this._state||(pt(this._state.uuid,r)||this.clear(),!0)},async t=>{t?.message==="denied"||t.message?.includes("Document is not focused")||T()===y.Safari||console.warn("Unable to detect clipboard changes: ",t)})}_init(){const t=this;this._listeners=new Map,this._listenersCapture=new Map,this._state=null,this._nativeClipboard&&(this._onFocus=()=>{t._checkForChanges()},this._onBlur=()=>{globalThis.addEventListener?.("focus",t._onFocus,{once:!0})},globalThis.addEventListener?.("blur",this._onBlur),this._nativeClipboard.addEventListener("clipboardchange",r=>{t._checkForChanges()}))}async read(){if(!this._nativeClipboard)return this._state?.items??null;const t=this;return await B("clipboard-read",async()=>{if(await N(),this._state?.uuid){const r=await V(this._nativeClipboard,v);if(r&&r===t._state.uuid)return!0;const n=await dt(this._nativeClipboard,h);if(pt(t._state?.uuid,n))return!0}return t._state={items:await Tt(this._nativeClipboard),uuid:null,ref:null},this.dispatchEvent(new Event("clipboardread")),!0},async r=>{this.dispatchEvent(new Event("clipboarderrorread"))}),this._state?.items??[]}async write(t){return this._write({uuid:R(),items:t,ref:null})}async _write(t){if(!this._nativeClipboard)return this._state=t,this.dispatchEvent(new Event("clipboardwrite")),this.dispatchEvent(new Event("clipboardchange")),null;const r=this,n=[],o=t.uuid;let a=t.items??[];const i=()=>{r._state={uuid:o,ref:t.ref,items:n},r.dispatchEvent(new Event("clipboardwrite")),r.dispatchEvent(new Event("clipboardchange"))};await B("clipboard-write",async()=>{await N(),o&&a.length===0&&(a.push(new ClipboardItem({[v]:new Blob([o],{type:v})})),a.push(new ClipboardItem({[h]:new Blob([ft(o)],{type:h})})));for(let l=0;l<Math.min(1,a.length);l++){const s=a[l];let c=s.types.indexOf(h),d=null;if(c!==-1){const f=await s.getType(h);d=await W(f),d&&(d=Wt(o,d))}if(!d&&s.types.includes(b)){const f=await s.getType(b);if(f){let p=null;typeof f=="string"?(console.warn("text as string",f),p=f):p=await W(f),p&&(d=`<div ${C}="${o}">${p}</div>`)}}if(!d&&s.types.includes(L)){const f=await s.getType(L),p=_t(await f.arrayBuffer());d=`<div ${C}="${o}"><img src="${Ot+p}"/></div>`}!d&&o&&(d=ft(o));const w=new Blob([d??""],{type:h}),u={};for(let f=0;f<s.types.length;f++){const p=s.types[f];u[p]=f===c?w:s.getType(p)}d&&c===-1&&(u[h]=w),o&&(u[v]=new Blob([o],{type:v})),n.push(new ClipboardItem(u))}try{n&&n.length!==0?await this._nativeClipboard.write(n):await(async l=>{l&&await l.writeText("")})(this._nativeClipboard)}catch(l){l.message?.includes("Document is not focused")||console.warn("Unable to write to native clipboard: ",l)}return i(),!0},async l=>{this.dispatchEvent(new Event("clipboarderrorwrite")),i()})}async writeReference(t){if(!t)return void this.clear();let r=null;const n={};try{const a=await t.toText?.()??null;a&&(n[b]=new Blob([a??""],{type:b}))}catch(a){r=a}try{const a=await t.toHtml?.()??null;a&&(n[h]=new Blob([a],{type:h}))}catch(a){r=a,console.warn("export to html",a)}try{const a=await t.toImage?.()??null;a&&(n[L]=a)}catch(a){r=a,console.warn("export to png",a)}const o=this._write({uuid:R(),ref:t,items:Object.keys(n).length>0?[new ClipboardItem(n)]:null});if(r)throw r;return o}clear(t=!1){this._state&&(this._state=null,t&&this._write({uuid:null,ref:null,items:null}),this.dispatchEvent(new Event("clipboardwrite")),this.dispatchEvent(new Event("clipboardchange")))}async readReference(){return await this.read(),this._state?.ref??null}readText(){return new Promise(async(t,r)=>{const n=await this.read();let o=null;for(let i=0;!o&&n&&i<n.length;i++)n[i].types.includes(b)&&(o=await n[i].getType(b));if(!o)return void t("");const a=new FileReader;a.onload=()=>{t(a.result)},a.readAsText(o),a.onerror=i=>{r(i)}})}async writeText(t){const r=[new ClipboardItem({[b]:new Blob([t],{type:b})})];return this._write({uuid:R(),items:r,ref:null})}addEventListener(t,r,n={}){const o=n?.capture?this._listenersCapture:this._listeners;let a=o.get(t);a||(a=new Map,o.set(t,a)),a.set(r,typeof n=="boolean"?{}:n)}dispatchEvent(t){if(!t)return;const r=n=>{const o=n.get(t.type);o&&o.forEach((a,i)=>{try{typeof i=="function"?i(t):i.handleEvent&&i.handleEvent(t),a.once&&o.delete(i)}catch(l){console.warn(l)}})};return r(this._listenersCapture),r(this._listeners),!0}removeEventListener(t,r,n){const o=n?.capture?this._listenersCapture:this._listeners,a=o.get(t);a&&(a.delete(r),a.size===0&&o.delete(t))}close(){globalThis.removeEventListener?.("focus",this._onFocus),globalThis.removeEventListener?.("blur",this._onBlur)}}var z;(z=wt||(wt={})).ErrorMessages=jt,z.Global=new z;let ht=null,q=null,M=null;const Vt=Object.freeze({compileTypescript:async function(e){if(!e?.source)return null;if(q&&xt.deepEqual(q,e))return ht;const t=await async function(){if(M)return M;const{TypeScriptCompiler:n}=await Promise.resolve().then(()=>require("./C0AP85yKTJU5XzPW.cjs"));return M=new n,M}(),r=await t.compileModule(e);return ht=r,q=e,r}}),Gt=Object.freeze(Object.defineProperty({__proto__:null,ScriptingUtils:Vt},Symbol.toStringTag,{value:"Module"}));exports.$=xt,exports.i=Gt;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";/**
|
|
2
|
+
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.0.0
|
|
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"});exports.default={CUBEKPIMEMBER:{s:"Returns a key performance indicator (KPI) property and displays the KPI name in the cell.",p:{connection:{d:"is the name of a connection to an OLAP cube"},kpiName:{d:"is the KPI name"},kpiProperty:{d:"is the KPI property"},caption:{d:"is the caption to be displayed in the cell"}},h:"Unimplemented"},CUBEMEMBER:{s:"Returns a member or tuple from the cube.",p:{connection:{d:"is the name of a connection to an OLAP cube"},memberExpression:{d:"is the expression representing the name of a member or tuple in the OLAP cube"},caption:{d:"is the caption to be displayed in the cell"}},h:"Unimplemented"},CUBEMEMBERPROPERTY:{s:"Returns the value of a member property from the cube.",p:{connection:{d:"is the name of a connection to an OLAP cube"},memberExpression:{d:"is the expression representing the name of a member in the OLAP cube"},kpiProperty:{d:"is the property name"}},h:"Unimplemented"},CUBERANKEDMEMBER:{s:"Returns the nth, or ranked, member in a set.",p:{connection:{d:"is the name of a connection to an OLAP cube"},setExpression:{d:"is the set from which the element is to be retrieved"},rank:{d:"is the rank of the element to be retrieved"},caption:{d:"is the caption to be displayed in the cell"}},h:"Unimplemented"},CUBESET:{s:"Defines a calculated set of members or tuples by sending a set expression to the cube on the server, which creates the set, and then returns that set to Microsoft Excel.",p:{connection:{d:"is the name of a connection to an OLAP cube"},setExpression:{d:"is the expression for the set"},caption:{d:"is the caption to be displayed in the cell"},sortOrder:{d:"is the sort order"},sortBy:{d:"is the sort by"}},h:"Unimplemented"},CUBESETCOUNT:{s:"Returns the number of items in a set.",p:{set:{d:"is the set whose elements are to be counted"}},h:"Unimplemented"},CUBEVALUE:{s:"Returns an aggregated value from the cube.",p:{connection:{d:"is the name of a connection to an OLAP cube"},memberExpression:{}},h:"Unimplemented"}};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";/**
|
|
2
|
+
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.0.0
|
|
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"});exports.default={BIN2DEC:{s:"Converts a binary number to decimal",p:{number:{d:"is the binary number you want to convert"}}},BIN2HEX:{s:"Converts a binary number to hexadecimal",p:{number:{d:"is the binary number you want to convert"},places:{d:"is the number of characters to use"}}},BIN2OCT:{s:"Converts a binary number to octal",p:{number:{d:"is the binary number you want to convert"},places:{d:"is the number of characters to use"}}},BITAND:{s:"Returns a bitwise 'And' of two numbers",p:{number1:{d:"is the decimal representation of the binary number you want to evaluate"},number2:{d:"is the decimal representation of the binary number you want to evaluate"}}},BITLSHIFT:{s:"Returns a number shifted left by shift_amount bits",p:{number:{d:"is the decimal representation of the binary number you want to evaluate"},shiftAmount:{d:"is the number of bits that you want to shift Number left by"}}},BITOR:{s:"Returns a bitwise 'Or' of two numbers",p:{number1:{d:"is the decimal representation of the binary number you want to evaluate"},number2:{d:"is the decimal representation of the binary number you want to evaluate"}}},BITRSHIFT:{s:"Returns a number shifted right by shift_amount bits",p:{number:{d:"is the decimal representation of the binary number you want to evaluate"},shiftAmount:{d:"is the number of bits that you want to shift Number left by"}}},BITXOR:{s:"Returns a bitwise 'Exclusive Or' of two numbers",p:{number1:{d:"is the decimal representation of the binary number you want to evaluate"},number2:{d:"is the decimal representation of the binary number you want to evaluate"}}},DEC2BIN:{s:"Converts a decimal number to binary",p:{number:{d:"is the decimal integer you want to convert"},places:{d:"is the number of characters to use"}}},DEC2HEX:{s:"Converts a decimal number to hexadecimal",p:{number:{d:"is the decimal integer you want to convert"},places:{d:"is the number of characters to use"}}},DEC2OCT:{s:"Converts a decimal number to octal",p:{number:{d:"is the decimal integer you want to convert"},places:{d:"is the number of characters to use"}}},HEX2BIN:{s:"Converts a Hexadecimal number to binary",p:{number:{d:"is the hexadecimal number you want to convert"},places:{d:"is the number of characters to use"}}},HEX2DEC:{s:"Converts a hexadecimal number to decimal",p:{number:{d:"is the hexadecimal number you want to convert"}}},HEX2OCT:{s:"Converts a hexadecimal number to octal",p:{number:{d:"is the hexadecimal number you want to convert"},places:{d:"is the number of characters to use"}}},OCT2BIN:{s:"Converts an octal number to binary",p:{number:{d:"is the octal number you want to convert"},places:{d:"is the number of characters to use"}}},OCT2DEC:{s:"Converts an octal number to decimal",p:{number:{d:"is the octal number you want to convert"}}},OCT2HEX:{s:"Converts an octal number to hexadecimal",p:{number:{d:"is the octal number you want to convert"},places:{d:"is the number of characters to use"}}}};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";/**
|
|
2
|
+
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.0.0
|
|
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"});/**
|
|
7
|
+
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.0.0
|
|
8
|
+
*
|
|
9
|
+
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
10
|
+
* License: The license can be found at https://www.sheetxl.com/license.
|
|
11
|
+
*//**
|
|
12
|
+
* @license @sheetxl/io - IO - Import/Export Libraries for SheetXL. - v0.0.0
|
|
13
|
+
*
|
|
14
|
+
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
15
|
+
* License: The license can be found at https://www.sheetxl.com/license.
|
|
16
|
+
*/var ct,pt={exports:{}};/* @license
|
|
17
|
+
Papa Parse
|
|
18
|
+
v5.5.3
|
|
19
|
+
https://github.com/mholt/PapaParse
|
|
20
|
+
License: MIT
|
|
21
|
+
*/const _t=function(Y,Q){for(var b=0;b<Q.length;b++){const P=Q[b];if(typeof P!="string"&&!Array.isArray(P)){for(const B in P)if(B!=="default"&&!(B in Y)){const J=Object.getOwnPropertyDescriptor(P,B);J&&Object.defineProperty(Y,B,J.get?J:{enumerable:!0,get:()=>P[B]})}}}return Object.freeze(Object.defineProperty(Y,Symbol.toStringTag,{value:"Module"}))}({__proto__:null},[(ct||(ct=1,pt.exports=function Y(){var Q,b=typeof self<"u"?self:typeof window<"u"?window:b!==void 0?b:{},P=!b.document&&!!b.postMessage,B=b.IS_PAPA_WORKER||!1,J={},gt=0,a={};function K(t){this._handle=null,this._finished=!1,this._completed=!1,this._halted=!1,this._input=null,this._baseIndex=0,this._partialLine="",this._rowCount=0,this._start=0,this._nextChunk=null,this.isFirstChunk=!0,this._completeResults={data:[],errors:[],meta:{}},function(e){var i=at(e);i.chunkSize=parseInt(i.chunkSize),e.step||e.chunk||(i.chunkSize=null),this._handle=new ht(i),(this._handle.streamer=this)._config=i}.call(this,t),this.parseChunk=function(e,i){var n=parseInt(this._config.skipFirstNLines)||0;if(this.isFirstChunk&&0<n){let l=this._config.newline;l||(r=this._config.quoteChar||'"',l=this._handle.guessLineEndings(e,r)),e=[...e.split(l).slice(n)].join(l)}this.isFirstChunk&&y(this._config.beforeFirstChunk)&&(r=this._config.beforeFirstChunk(e))!==void 0&&(e=r),this.isFirstChunk=!1,this._halted=!1,n=this._partialLine+e;var r=(this._partialLine="",this._handle.parse(n,this._baseIndex,!this._finished));if(!this._handle.paused()&&!this._handle.aborted()){if(e=r.meta.cursor,this._finished||(this._partialLine=n.substring(e-this._baseIndex),this._baseIndex=e),r&&r.data&&(this._rowCount+=r.data.length),n=this._finished||this._config.preview&&this._rowCount>=this._config.preview,B)b.postMessage({results:r,workerId:a.WORKER_ID,finished:n});else if(y(this._config.chunk)&&!i){if(this._config.chunk(r,this._handle),this._handle.paused()||this._handle.aborted())return void(this._halted=!0);this._completeResults=r=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(r.data),this._completeResults.errors=this._completeResults.errors.concat(r.errors),this._completeResults.meta=r.meta),this._completed||!n||!y(this._config.complete)||r&&r.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),n||r&&r.meta.paused||this._nextChunk(),r}this._halted=!0},this._sendError=function(e){y(this._config.error)?this._config.error(e):B&&this._config.error&&b.postMessage({workerId:a.WORKER_ID,error:e,finished:!1})}}function it(t){var e;(t=t||{}).chunkSize||(t.chunkSize=a.RemoteChunkSize),K.call(this,t),this._nextChunk=P?function(){this._readChunk(),this._chunkLoaded()}:function(){this._readChunk()},this.stream=function(i){this._input=i,this._nextChunk()},this._readChunk=function(){if(this._finished)this._chunkLoaded();else{if(e=new XMLHttpRequest,this._config.withCredentials&&(e.withCredentials=this._config.withCredentials),P||(e.onload=$(this._chunkLoaded,this),e.onerror=$(this._chunkError,this)),e.open(this._config.downloadRequestBody?"POST":"GET",this._input,!P),this._config.downloadRequestHeaders){var i,n=this._config.downloadRequestHeaders;for(i in n)e.setRequestHeader(i,n[i])}var r;this._config.chunkSize&&(r=this._start+this._config.chunkSize-1,e.setRequestHeader("Range","bytes="+this._start+"-"+r));try{e.send(this._config.downloadRequestBody)}catch(l){this._chunkError(l.message)}P&&e.status===0&&this._chunkError()}},this._chunkLoaded=function(){var i;e.readyState===4&&(e.status<200||400<=e.status?this._chunkError():(this._start+=this._config.chunkSize||e.responseText.length,this._finished=!this._config.chunkSize||this._start>=((i=(i=e).getResponseHeader("Content-Range"))!==null?parseInt(i.substring(i.lastIndexOf("/")+1)):-1),this.parseChunk(e.responseText)))},this._chunkError=function(i){i=e.statusText||i,this._sendError(new Error(i))}}function rt(t){(t=t||{}).chunkSize||(t.chunkSize=a.LocalChunkSize),K.call(this,t);var e,i,n=typeof FileReader<"u";this.stream=function(r){this._input=r,i=r.slice||r.webkitSlice||r.mozSlice,n?((e=new FileReader).onload=$(this._chunkLoaded,this),e.onerror=$(this._chunkError,this)):e=new FileReaderSync,this._nextChunk()},this._nextChunk=function(){this._finished||this._config.preview&&!(this._rowCount<this._config.preview)||this._readChunk()},this._readChunk=function(){var r=this._input,l=(this._config.chunkSize&&(l=Math.min(this._start+this._config.chunkSize,this._input.size),r=i.call(r,this._start,l)),e.readAsText(r,this._config.encoding));n||this._chunkLoaded({target:{result:l}})},this._chunkLoaded=function(r){this._start+=this._config.chunkSize,this._finished=!this._config.chunkSize||this._start>=this._input.size,this.parseChunk(r.target.result)},this._chunkError=function(){this._sendError(e.error)}}function X(t){var e;K.call(this,t=t||{}),this.stream=function(i){return e=i,this._nextChunk()},this._nextChunk=function(){var i,n;if(!this._finished)return i=this._config.chunkSize,e=i?(n=e.substring(0,i),e.substring(i)):(n=e,""),this._finished=!e,this.parseChunk(n)}}function nt(t){K.call(this,t=t||{});var e=[],i=!0,n=!1;this.pause=function(){K.prototype.pause.apply(this,arguments),this._input.pause()},this.resume=function(){K.prototype.resume.apply(this,arguments),this._input.resume()},this.stream=function(r){this._input=r,this._input.on("data",this._streamData),this._input.on("end",this._streamEnd),this._input.on("error",this._streamError)},this._checkIsFinished=function(){n&&e.length===1&&(this._finished=!0)},this._nextChunk=function(){this._checkIsFinished(),e.length?this.parseChunk(e.shift()):i=!0},this._streamData=$(function(r){try{e.push(typeof r=="string"?r:r.toString(this._config.encoding)),i&&(i=!1,this._checkIsFinished(),this.parseChunk(e.shift()))}catch(l){this._streamError(l)}},this),this._streamError=$(function(r){this._streamCleanUp(),this._sendError(r)},this),this._streamEnd=$(function(){this._streamCleanUp(),n=!0,this._streamData("")},this),this._streamCleanUp=$(function(){this._input.removeListener("data",this._streamData),this._input.removeListener("end",this._streamEnd),this._input.removeListener("error",this._streamError)},this)}function ht(t){var e,i,n,r,l=Math.pow(2,53),p=-l,M=/^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/,w=/^((\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z)))$/,_=this,T=0,o=0,j=!1,u=!1,g=[],s={data:[],errors:[],meta:{}};function C(h){return t.skipEmptyLines==="greedy"?h.join("").trim()==="":h.length===1&&h[0].length===0}function R(){if(s&&n&&(z("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+a.DefaultDelimiter+"'"),n=!1),t.skipEmptyLines&&(s.data=s.data.filter(function(f){return!C(f)})),L()){let f=function(O,A){y(t.transformHeader)&&(O=t.transformHeader(O,A)),g.push(O)};if(s)if(Array.isArray(s.data[0])){for(var h=0;L()&&h<s.data.length;h++)s.data[h].forEach(f);s.data.splice(0,1)}else s.data.forEach(f)}function c(f,O){for(var A=t.header?{}:[],v=0;v<f.length;v++){var k=v,m=f[v];m=((U,d)=>{return S=U,t.dynamicTypingFunction&&t.dynamicTyping[S]===void 0&&(t.dynamicTyping[S]=t.dynamicTypingFunction(S)),(t.dynamicTyping[S]||t.dynamicTyping)===!0?d==="true"||d==="TRUE"||d!=="false"&&d!=="FALSE"&&((I=>{if(M.test(I)&&(I=parseFloat(I),p<I&&I<l))return 1})(d)?parseFloat(d):w.test(d)?new Date(d):d===""?null:d):d;var S})(k=t.header?v>=g.length?"__parsed_extra":g[v]:k,m=t.transform?t.transform(m,k):m),k==="__parsed_extra"?(A[k]=A[k]||[],A[k].push(m)):A[k]=m}return t.header&&(v>g.length?z("FieldMismatch","TooManyFields","Too many fields: expected "+g.length+" fields but parsed "+v,o+O):v<g.length&&z("FieldMismatch","TooFewFields","Too few fields: expected "+g.length+" fields but parsed "+v,o+O)),A}var E;s&&(t.header||t.dynamicTyping||t.transform)&&(E=1,!s.data.length||Array.isArray(s.data[0])?(s.data=s.data.map(c),E=s.data.length):s.data=c(s.data,0),t.header&&s.meta&&(s.meta.fields=g),o+=E)}function L(){return t.header&&g.length===0}function z(h,c,E,f){h={type:h,code:c,message:E},f!==void 0&&(h.row=f),s.errors.push(h)}y(t.step)&&(r=t.step,t.step=function(h){s=h,L()?R():(R(),s.data.length!==0&&(T+=h.data.length,t.preview&&T>t.preview?i.abort():(s.data=s.data[0],r(s,_))))}),this.parse=function(h,c,E){var f=t.quoteChar||'"';return t.newline||(t.newline=this.guessLineEndings(h,f)),n=!1,t.delimiter?y(t.delimiter)&&(t.delimiter=t.delimiter(h),s.meta.delimiter=t.delimiter):((f=((O,A,v,k,m)=>{var U,d,S,I;m=m||[","," ","|",";",a.RECORD_SEP,a.UNIT_SEP];for(var Z=0;Z<m.length;Z++){for(var W,tt=m[Z],F=0,q=0,x=0,D=(S=void 0,new st({comments:k,delimiter:tt,newline:A,preview:10}).parse(O)),H=0;H<D.data.length;H++)v&&C(D.data[H])?x++:(q+=W=D.data[H].length,S===void 0?S=W:0<W&&(F+=Math.abs(W-S),S=W));0<D.data.length&&(q/=D.data.length-x),(d===void 0||F<=d)&&(I===void 0||I<q)&&1.99<q&&(d=F,U=tt,I=q)}return{successful:!!(t.delimiter=U),bestDelimiter:U}})(h,t.newline,t.skipEmptyLines,t.comments,t.delimitersToGuess)).successful?t.delimiter=f.bestDelimiter:(n=!0,t.delimiter=a.DefaultDelimiter),s.meta.delimiter=t.delimiter),f=at(t),t.preview&&t.header&&f.preview++,e=h,i=new st(f),s=i.parse(e,c,E),R(),j?{meta:{paused:!0}}:s||{meta:{paused:!1}}},this.paused=function(){return j},this.pause=function(){j=!0,i.abort(),e=y(t.chunk)?"":e.substring(i.getCharIndex())},this.resume=function(){_.streamer._halted?(j=!1,_.streamer.parseChunk(e,!0)):setTimeout(_.resume,3)},this.aborted=function(){return u},this.abort=function(){u=!0,i.abort(),s.meta.aborted=!0,y(t.complete)&&t.complete(s),e=""},this.guessLineEndings=function(h,c){h=h.substring(0,1048576),c=new RegExp(V(c)+"([^]*?)"+V(c),"gm");var E=(h=h.replace(c,"")).split("\r");if(h=1<(c=h.split(`
|
|
22
|
+
`)).length&&c[0].length<E[0].length,E.length===1||h)return`
|
|
23
|
+
`;for(var f=0,O=0;O<E.length;O++)E[O][0]===`
|
|
24
|
+
`&&f++;return f>=E.length/2?`\r
|
|
25
|
+
`:"\r"}}function V(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function st(t){var e=(t=t||{}).delimiter,i=t.newline,n=t.comments,r=t.step,l=t.preview,p=t.fastMode,M=null,w=!1,_=t.quoteChar==null?'"':t.quoteChar,T=_;if(t.escapeChar!==void 0&&(T=t.escapeChar),(typeof e!="string"||-1<a.BAD_DELIMITERS.indexOf(e))&&(e=","),n===e)throw new Error("Comment character same as delimiter");n===!0?n="#":(typeof n!="string"||-1<a.BAD_DELIMITERS.indexOf(n))&&(n=!1),i!==`
|
|
26
|
+
`&&i!=="\r"&&i!==`\r
|
|
27
|
+
`&&(i=`
|
|
28
|
+
`);var o=0,j=!1;this.parse=function(u,g,s){if(typeof u!="string")throw new Error("Input must be a string");var C=u.length,R=e.length,L=i.length,z=n.length,h=y(r),c=[],E=[],f=[],O=o=0;if(!u)return F();if(p||p!==!1&&u.indexOf(_)===-1){for(var A=u.split(i),v=0;v<A.length;v++){if(f=A[v],o+=f.length,v!==A.length-1)o+=i.length;else if(s)return F();if(!n||f.substring(0,z)!==n){if(h){if(c=[],I(f.split(e)),q(),j)return F()}else I(f.split(e));if(l&&l<=v)return c=c.slice(0,l),F(!0)}}return F()}for(var k=u.indexOf(e,o),m=u.indexOf(i,o),U=new RegExp(V(T)+V(_),"g"),d=u.indexOf(_,o);;)if(u[o]===_)for(d=o,o++;;){if((d=u.indexOf(_,d+1))===-1)return s||E.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:c.length,index:o}),W();if(d===C-1)return W(u.substring(o,d).replace(U,_));if(_===T&&u[d+1]===T)d++;else if(_===T||d===0||u[d-1]!==T){k!==-1&&k<d+1&&(k=u.indexOf(e,d+1));var S=Z((m=m!==-1&&m<d+1?u.indexOf(i,d+1):m)===-1?k:Math.min(k,m));if(u.substr(d+1+S,R)===e){f.push(u.substring(o,d).replace(U,_)),u[o=d+1+S+R]!==_&&(d=u.indexOf(_,o)),k=u.indexOf(e,o),m=u.indexOf(i,o);break}if(S=Z(m),u.substring(d+1+S,d+1+S+L)===i){if(f.push(u.substring(o,d).replace(U,_)),tt(d+1+S+L),k=u.indexOf(e,o),d=u.indexOf(_,o),h&&(q(),j))return F();if(l&&c.length>=l)return F(!0);break}E.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:c.length,index:o}),d++}}else if(n&&f.length===0&&u.substring(o,o+z)===n){if(m===-1)return F();o=m+L,m=u.indexOf(i,o),k=u.indexOf(e,o)}else if(k!==-1&&(k<m||m===-1))f.push(u.substring(o,k)),o=k+R,k=u.indexOf(e,o);else{if(m===-1)break;if(f.push(u.substring(o,m)),tt(m+L),h&&(q(),j))return F();if(l&&c.length>=l)return F(!0)}return W();function I(x){c.push(x),O=o}function Z(x){return x!==-1&&(x=u.substring(d+1,x))&&x.trim()===""?x.length:0}function W(x){return s||(x===void 0&&(x=u.substring(o)),f.push(x),o=C,I(f),h&&q()),F()}function tt(x){o=x,I(f),f=[],m=u.indexOf(i,o)}function F(x){if(t.header&&!g&&c.length&&!w){var D=c[0],H=Object.create(null),ot=new Set(D);let ft=!1;for(let G=0;G<D.length;G++){let N=D[G];if(H[N=y(t.transformHeader)?t.transformHeader(N,G):N]){let et,lt=H[N];for(;et=N+"_"+lt,lt++,ot.has(et););ot.add(et),D[G]=et,H[N]++,ft=!0,(M=M===null?{}:M)[et]=N}else H[N]=1,D[G]=N;ot.add(N)}ft&&console.warn("Duplicate headers found and renamed."),w=!0}return{data:c,errors:E,meta:{delimiter:e,linebreak:i,aborted:j,truncated:!!x,cursor:O+(g||0),renamedHeaders:M}}}function q(){r(F()),c=[],E=[]}},this.abort=function(){j=!0},this.getCharIndex=function(){return o}}function mt(t){var e=t.data,i=J[e.workerId],n=!1;if(e.error)i.userError(e.error,e.file);else if(e.results&&e.results.data){var r={abort:function(){n=!0,ut(e.workerId,{data:[],errors:[],meta:{aborted:!0}})},pause:dt,resume:dt};if(y(i.userStep)){for(var l=0;l<e.results.data.length&&(i.userStep({data:e.results.data[l],errors:e.results.errors,meta:e.results.meta},r),!n);l++);delete e.results}else y(i.userChunk)&&(i.userChunk(e.results,r,e.file),delete e.results)}e.finished&&!n&&ut(e.workerId,e.results)}function ut(t,e){var i=J[t];y(i.userComplete)&&i.userComplete(e),i.terminate(),delete J[t]}function dt(){throw new Error("Not implemented.")}function at(t){if(typeof t!="object"||t===null)return t;var e,i=Array.isArray(t)?[]:{};for(e in t)i[e]=at(t[e]);return i}function $(t,e){return function(){t.apply(e,arguments)}}function y(t){return typeof t=="function"}return a.parse=function(t,e){var i,n,r,l,p=(e=e||{}).dynamicTyping||!1;if(y(p)&&(e.dynamicTypingFunction=p,p={}),e.dynamicTyping=p,e.transform=!!y(e.transform)&&e.transform,!e.worker||!a.WORKERS_SUPPORTED)return p=null,a.NODE_STREAM_INPUT,typeof t=="string"?(t=(i=t).charCodeAt(0)!==65279?i:i.slice(1),p=new(e.download?it:X)(e)):t.readable===!0&&y(t.read)&&y(t.on)?p=new nt(e):(b.File&&t instanceof File||t instanceof Object)&&(p=new rt(e)),p.stream(t);(p=!!a.WORKERS_SUPPORTED&&(r=b.URL||b.webkitURL||null,l=Y.toString(),n=a.BLOB_URL||(a.BLOB_URL=r.createObjectURL(new Blob(["var global = (function() { if (typeof self !== 'undefined') { return self; } if (typeof window !== 'undefined') { return window; } if (typeof global !== 'undefined') { return global; } return {}; })(); global.IS_PAPA_WORKER=true; ","(",l,")();"],{type:"text/javascript"}))),(n=new b.Worker(n)).onmessage=mt,n.id=gt++,J[n.id]=n)).userStep=e.step,p.userChunk=e.chunk,p.userComplete=e.complete,p.userError=e.error,e.step=y(e.step),e.chunk=y(e.chunk),e.complete=y(e.complete),e.error=y(e.error),delete e.worker,p.postMessage({input:t,config:e,workerId:p.id})},a.unparse=function(t,e){var i=!1,n=!0,r=",",l=`\r
|
|
29
|
+
`,p='"',M=p+p,w=!1,_=null,T=!1,o=((()=>{if(typeof e=="object"){if(typeof e.delimiter!="string"||a.BAD_DELIMITERS.filter(function(g){return e.delimiter.indexOf(g)!==-1}).length||(r=e.delimiter),typeof e.quotes!="boolean"&&typeof e.quotes!="function"&&!Array.isArray(e.quotes)||(i=e.quotes),typeof e.skipEmptyLines!="boolean"&&typeof e.skipEmptyLines!="string"||(w=e.skipEmptyLines),typeof e.newline=="string"&&(l=e.newline),typeof e.quoteChar=="string"&&(p=e.quoteChar),typeof e.header=="boolean"&&(n=e.header),Array.isArray(e.columns)){if(e.columns.length===0)throw new Error("Option columns is empty");_=e.columns}e.escapeChar!==void 0&&(M=e.escapeChar+p),e.escapeFormulae instanceof RegExp?T=e.escapeFormulae:typeof e.escapeFormulae=="boolean"&&e.escapeFormulae&&(T=/^[=+\-@\t\r].*$/)}})(),new RegExp(V(p),"g"));if(typeof t=="string"&&(t=JSON.parse(t)),Array.isArray(t)){if(!t.length||Array.isArray(t[0]))return j(null,t,w);if(typeof t[0]=="object")return j(_||Object.keys(t[0]),t,w)}else if(typeof t=="object")return typeof t.data=="string"&&(t.data=JSON.parse(t.data)),Array.isArray(t.data)&&(t.fields||(t.fields=t.meta&&t.meta.fields||_),t.fields||(t.fields=Array.isArray(t.data[0])?t.fields:typeof t.data[0]=="object"?Object.keys(t.data[0]):[]),Array.isArray(t.data[0])||typeof t.data[0]=="object"||(t.data=[t.data])),j(t.fields||[],t.data||[],w);throw new Error("Unable to serialize unrecognized input");function j(g,s,C){var R="",L=(typeof g=="string"&&(g=JSON.parse(g)),typeof s=="string"&&(s=JSON.parse(s)),Array.isArray(g)&&0<g.length),z=!Array.isArray(s[0]);if(L&&n){for(var h=0;h<g.length;h++)0<h&&(R+=r),R+=u(g[h],h);0<s.length&&(R+=l)}for(var c=0;c<s.length;c++){var E=(L?g:s[c]).length,f=!1,O=L?Object.keys(s[c]).length===0:s[c].length===0;if(C&&!L&&(f=C==="greedy"?s[c].join("").trim()==="":s[c].length===1&&s[c][0].length===0),C==="greedy"&&L){for(var A=[],v=0;v<E;v++){var k=z?g[v]:v;A.push(s[c][k])}f=A.join("").trim()===""}if(!f){for(var m=0;m<E;m++){0<m&&!O&&(R+=r);var U=L&&z?g[m]:m;R+=u(s[c][U],m)}c<s.length-1&&(!C||0<E&&!O)&&(R+=l)}}return R}function u(g,s){var C,R;return g==null?"":g.constructor===Date?JSON.stringify(g).slice(1,25):(R=!1,T&&typeof g=="string"&&T.test(g)&&(g="'"+g,R=!0),C=g.toString().replace(o,M),(R=R||i===!0||typeof i=="function"&&i(g,s)||Array.isArray(i)&&i[s]||((L,z)=>{for(var h=0;h<z.length;h++)if(-1<L.indexOf(z[h]))return!0;return!1})(C,a.BAD_DELIMITERS)||-1<C.indexOf(r)||C.charAt(0)===" "||C.charAt(C.length-1)===" ")?p+C+p:C)}},a.RECORD_SEP="",a.UNIT_SEP="",a.BYTE_ORDER_MARK="\uFEFF",a.BAD_DELIMITERS=["\r",`
|
|
30
|
+
`,'"',a.BYTE_ORDER_MARK],a.WORKERS_SUPPORTED=!P&&!!b.Worker,a.NODE_STREAM_INPUT=1,a.LocalChunkSize=10485760,a.RemoteChunkSize=5242880,a.DefaultDelimiter=",",a.Parser=st,a.ParserHandle=ht,a.NetworkStreamer=it,a.FileStreamer=rt,a.StringStreamer=X,a.ReadableStreamStreamer=nt,b.jQuery&&((Q=b.jQuery).fn.parse=function(t){var e=t.config||{},i=[];return this.each(function(l){if(Q(this).prop("tagName").toUpperCase()!=="INPUT"||Q(this).attr("type").toLowerCase()!=="file"||!b.FileReader||!this.files||this.files.length===0)return!0;for(var p=0;p<this.files.length;p++)i.push({file:this.files[p],inputElem:this,instanceConfig:Q.extend({},e)})}),n(),this;function n(){if(i.length===0)y(t.complete)&&t.complete();else{var l,p,M,w=i[0];if(y(t.before)){var _=t.before(w.file,w.inputElem);if(typeof _=="object"){if(_.action==="abort")return l=w.file,p=w.inputElem,M=_.reason,void(y(t.error)&&t.error({name:"AbortError"},l,p,M));if(_.action==="skip")return void r();typeof _.config=="object"&&(w.instanceConfig=Q.extend(w.instanceConfig,_.config))}else if(_==="skip")return void r()}var T=w.instanceConfig.complete;w.instanceConfig.complete=function(o){y(T)&&T(o,w.file,w.inputElem),r()},a.parse(w.file,w.instanceConfig)}}function r(){i.splice(0,1),n()}}),B&&(b.onmessage=function(t){t=t.data,a.WORKER_ID===void 0&&t&&(a.WORKER_ID=t.workerId),typeof t.input=="string"?b.postMessage({workerId:a.WORKER_ID,results:a.parse(t.input,t.config),finished:!0}):(b.File&&t.input instanceof File||t.input instanceof Object)&&(t=a.parse(t.input,t.config))&&b.postMessage({workerId:a.WORKER_ID,results:t,finished:!0})}),(it.prototype=Object.create(K.prototype)).constructor=it,(rt.prototype=Object.create(K.prototype)).constructor=rt,(X.prototype=Object.create(X.prototype)).constructor=X,(nt.prototype=Object.create(K.prototype)).constructor=nt,a}()),pt.exports)]);exports.p=_t;
|