@sheetxl/sdk 0.4.13 → 0.4.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/browser/cjs/17vteff17iwu-nts.cjs +15 -0
- package/browser/cjs/B1o0X3p_6PiLx4jI.cjs +7 -0
- package/browser/cjs/B339rTr1BsEIo2__.cjs +6 -0
- package/browser/cjs/B6Vc2J26WiHxBQya.cjs +13 -0
- package/browser/cjs/BKAC72r7ywoOltA0.cjs +6 -0
- package/browser/cjs/BVA-ijQaNPkp7YbF.cjs +124 -0
- package/browser/cjs/BXtVRHEodCTlDHKt.cjs +32 -0
- package/browser/cjs/Br5SOD3y14JWQxmm.cjs +6 -0
- package/browser/cjs/BsZ6vhnXHmCHlGZX.cjs +1501 -0
- package/browser/cjs/Bv5GejhVjiiKkQo4.cjs +6 -0
- package/browser/cjs/Bve-_MKdvTST-nYO.cjs +6 -0
- package/browser/cjs/C2h4aMcaEv25R8td.cjs +6 -0
- package/browser/cjs/CK47_UoX6YUMsgbq.cjs +6 -0
- package/browser/cjs/CkXszTzijjKe-x3s.cjs +6 -0
- package/browser/cjs/CnOPibl4Egdph8iO.cjs +6 -0
- package/browser/cjs/CnoRxKqF7cmfYPie.cjs +6 -0
- package/browser/cjs/CwNSe9CinOcKHt9p.cjs +6 -0
- package/browser/cjs/D-TMUgYRD9-WKuJt.cjs +6 -0
- package/browser/cjs/D65Kj_FHrWptDBz6.cjs +6 -0
- package/browser/cjs/DDwxGPgeEH75VzI6.cjs +6 -0
- package/browser/cjs/DEnI4zCWAmN4uqYL.cjs +60 -0
- package/browser/cjs/DEyIncQzUFxinblH.cjs +6 -0
- package/browser/cjs/DJwiyf8nrWTrcqsg.cjs +6 -0
- package/browser/{esm/bC-pS6WlvqHBcNXl.mjs → cjs/DN99k_K8Xt6Cxpbg.cjs} +3 -4
- package/browser/cjs/DR8AZfpEdPwolzLA.cjs +6 -0
- package/browser/cjs/DY7NS5zPRAYW9B4z.cjs +6 -0
- package/browser/cjs/DZoB22ts1B-Uo1_8.cjs +6 -0
- package/browser/cjs/HFD-Ka0JKfOFb-v8.cjs +6 -0
- package/browser/cjs/HrYBZlmkaRPlgpBr.cjs +6 -0
- package/browser/cjs/J0QRcnocFqaCEpXb.cjs +6 -0
- package/browser/cjs/dL-d0P2RzXjtzTKk.cjs +6 -0
- package/browser/cjs/f4q2aiebC4Dk2JpQ.cjs +6 -0
- package/browser/cjs/index.cjs +3 -4
- package/browser/cjs/jAhE-WFeXtkOENRt.cjs +6 -0
- package/browser/esm/1RDByGQ0b6fJxh7d.mjs +10 -0
- package/{node/esm/DLDt1F5JzQq5aKdG.mjs → browser/esm/B1J_tEX0ArjgmDxo.mjs} +1 -1
- package/browser/esm/B6bUGsiDUEqxcpxj.mjs +10 -0
- package/browser/esm/B7TVQO7b5fKHjmdS.mjs +10 -0
- package/{node/esm/CBdo244r3xwae4_o.mjs → browser/esm/B9pQrZA0Y-_hUwWi.mjs} +1 -1
- package/{node/esm/axtXmmwYm1aHBXjg.mjs → browser/esm/BUjgpjT28_Y-kidw.mjs} +1 -1
- package/{node/esm/L0bRh78pniyMZ_3v.mjs → browser/esm/Be8lmKk3pIbpatrW.mjs} +1 -1
- package/browser/esm/BqlVyzcHZSLgnGUm.mjs +10 -0
- package/browser/esm/C6ugA4r8ZBnWJ7SS.mjs +1575 -0
- package/{node/esm/tw0tbG4pvPai6vfe.mjs → browser/esm/CL7ql8UZhgDNpfsM.mjs} +1 -1
- package/{node/esm/Bq3GEYeFkbO3vHHx.mjs → browser/esm/CVlNXQ7d_YZ1bp7F.mjs} +1 -1
- package/browser/esm/C_viEPf8wfrM9XrP.mjs +472 -0
- package/{node/esm/DZl6ZagrmdiXKi9x.mjs → browser/esm/Cf9USLOKImk5ry05.mjs} +1 -1
- package/{node/esm/Bb5FApoZ10dDGlM-.mjs → browser/esm/CqsGDFsS_swdf3vs.mjs} +1 -1
- package/{node/esm/Dlftv7TykJRVk7Wx.mjs → browser/esm/D6yAkYqQpt4Mti36.mjs} +1 -1
- package/browser/esm/D8PCv7S4DISHUIuf.mjs +5651 -0
- package/{node/esm/C6FEsnCdmUvcIDzA.mjs → browser/esm/DC2efMTBtgG0Qg9v.mjs} +1 -1
- package/{node/esm/j5mlBPjSlgnHX9pH.mjs → browser/esm/DJGZqsQxGcCptrL0.mjs} +1 -1
- package/browser/esm/DJSB1iCmSRlSH8T3.mjs +820 -0
- package/browser/esm/DOkO-X1qYgsIKnNj.mjs +3974 -0
- package/{node/esm/dRD2c-s3aQJNoK6m.mjs → browser/esm/DYE2NR7zRrGqd22q.mjs} +1 -1
- package/browser/esm/{DQ6InIROOs1_L5ez.mjs → DZh5MHkoTH4JibFE.mjs} +7 -2
- package/browser/esm/DoyfObpnizfLGHs3.mjs +21 -0
- package/browser/esm/Dqvs0M5ZN2pHLCwm.mjs +24 -0
- package/{node/esm/DMhTOGJLYCiHGnjP.mjs → browser/esm/DxIixek4CImRs91l.mjs} +1 -1
- package/{node/esm/CoowIrBw0vTXnosY.mjs → browser/esm/PWnhitKV1qE65Z3V.mjs} +1 -1
- package/browser/esm/QkxRNX4E_VTO1B3P.mjs +24269 -0
- package/{node/esm/cWKERSoNy_Mo5gOQ.mjs → browser/esm/SLFayFhlPi4T8AO6.mjs} +1 -1
- package/{node/esm/DQvu2JlpO07Yqcvx.mjs → browser/esm/Sr5fscnOJ2IHKKrp.mjs} +1 -1
- package/browser/esm/WUmLxNLfFn0Ozmm-.mjs +10 -0
- package/browser/esm/favrNBo9HOjnV2Y3.mjs +29 -0
- package/browser/esm/index.mjs +84 -2
- package/browser/esm/jdkRKboN0ZTz9YBf.mjs +10 -0
- package/browser/esm/tJR0NVUIbWFQCJp0.mjs +426 -0
- package/licenses/dependencies.txt +3 -3
- package/node/esm/{DNTdUrrAs4YsX782.mjs → AfI5dmtnxoAFOc1C.mjs} +1 -1
- package/node/esm/{Dxqu9uwKDQHBrAqJ.mjs → B1E5b-6lOZJnl4aN.mjs} +2 -2
- package/{browser/cjs/DOptrVmGD_5mAjIJ.cjs → node/esm/B1J_tEX0ArjgmDxo.mjs} +5 -2
- package/node/esm/B9pQrZA0Y-_hUwWi.mjs +10 -0
- package/node/esm/{CKO3kzDC1TBjmP6a.mjs → BEvzdM3wAA2DOPpb.mjs} +1 -1
- package/node/esm/{BmkbBs1Yla2RsZ_s.mjs → BEwii9DEp24ukOxk.mjs} +1 -1
- package/node/esm/{DNLKWsIB7wfMRm8a.mjs → BRakFf60UlCdEoH2.mjs} +2 -2
- package/node/esm/BUjgpjT28_Y-kidw.mjs +10 -0
- package/node/esm/{B-cEaNMrVscFjP28.mjs → BWh89wRFsoTmi9Ib.mjs} +1 -1
- package/node/esm/{DOdqJUKquKrouyJg.mjs → Bd7nQztitF7jnRgP.mjs} +1 -1
- package/node/esm/Be8lmKk3pIbpatrW.mjs +10 -0
- package/node/esm/C9Z0bg7XW6ng3z7k.mjs +80 -0
- package/node/esm/{CsI4IQyunxqLyMWY.mjs → CBuT_Rm4rHFEv2-k.mjs} +1 -1
- package/node/esm/CL7ql8UZhgDNpfsM.mjs +10 -0
- package/node/esm/{G0slAplR6jB1csaY.mjs → CV_B2BH1zuSdWD_e.mjs} +1 -1
- package/node/esm/CVlNXQ7d_YZ1bp7F.mjs +10 -0
- package/node/esm/{BZScF0z5mvap-tCk.mjs → C_eVpG1TqI_0_Zfz.mjs} +1 -1
- package/node/esm/Cf9USLOKImk5ry05.mjs +10 -0
- package/node/esm/{moaVD3gybeaMfy_q.mjs → Cm8B2CXlnA5r12FE.mjs} +1 -1
- package/node/esm/{o47K-SM01hvIUrc0.mjs → CpNeEylJssyF4zm3.mjs} +2 -2
- package/node/esm/CqsGDFsS_swdf3vs.mjs +10 -0
- package/node/esm/D6yAkYqQpt4Mti36.mjs +10 -0
- package/node/esm/DC2efMTBtgG0Qg9v.mjs +10 -0
- package/node/esm/DJGZqsQxGcCptrL0.mjs +10 -0
- package/node/esm/DYE2NR7zRrGqd22q.mjs +10 -0
- package/node/esm/{DHJoU9KsVtSXERyd.mjs → DmxrrAcKGuZW16bw.mjs} +4 -4
- package/node/esm/DxIixek4CImRs91l.mjs +10 -0
- package/node/esm/PWnhitKV1qE65Z3V.mjs +10 -0
- package/node/esm/{n0CrIZcZCwIu-yiw.mjs → RP8av-gx71hD40p7.mjs} +1 -1
- package/node/esm/SLFayFhlPi4T8AO6.mjs +10 -0
- package/node/esm/Sr5fscnOJ2IHKKrp.mjs +10 -0
- package/node/esm/index.mjs +3434 -3183
- package/package.json +4 -4
- package/browser/cjs/99FHKXLdlCef5nfT.cjs +0 -7
- package/browser/cjs/B5eveWag0dzzgkgX.cjs +0 -7
- package/browser/cjs/BJA1_CndBCMNr53J.cjs +0 -7
- package/browser/cjs/BVE8RsCx6dH-PJ3G.cjs +0 -7
- package/browser/cjs/BbvyF-KASTBWusEs.cjs +0 -7
- package/browser/cjs/BfAJd561Nzaudhz_.cjs +0 -7
- package/browser/cjs/BlgZLqYSIZleOo8h.cjs +0 -7
- package/browser/cjs/BpoOeB751mnCS6V-.cjs +0 -7
- package/browser/cjs/CE7l7CfFaLMonVMB.cjs +0 -7
- package/browser/cjs/CHBhqMbMhjW9YdAF.cjs +0 -7
- package/browser/cjs/CIJiAsckzAZgx8n4.cjs +0 -7
- package/browser/cjs/CgOy3BgHFueAFAeL.cjs +0 -7
- package/browser/cjs/Cl0gNER1w9A58kbc.cjs +0 -13
- package/browser/cjs/CmBrJtijpbCUSPWR.cjs +0 -10
- package/browser/cjs/CuYGUMy7ROX5G_sm.cjs +0 -7
- package/browser/cjs/Czqso66RMuDka4LC.cjs +0 -7
- package/browser/cjs/D-NvwNeGLHGiv00z.cjs +0 -7
- package/browser/cjs/DHVBvApvjbLRsOju.cjs +0 -7
- package/browser/cjs/DORshTQEHNF0VHvp.cjs +0 -7
- package/browser/cjs/DRKq7WhWW37UIj1Q.cjs +0 -7
- package/browser/cjs/DhWK7BDP7ZhYYPga.cjs +0 -7
- package/browser/cjs/DpSwAPYhahtG5EKw.cjs +0 -7
- package/browser/cjs/DvioTOgF2jNUKBcT.cjs +0 -7
- package/browser/cjs/DwSf7lami5Uh2Uh6.cjs +0 -7
- package/browser/cjs/Dy6R4NfGavsHaUnQ.cjs +0 -10
- package/browser/cjs/HEI6Q0oyMX2A1gth.cjs +0 -7
- package/browser/cjs/_Lz_D28ElE-H04r8.cjs +0 -7
- package/browser/cjs/hONph4eRHAvmiEYv.cjs +0 -7
- package/browser/cjs/nQYA0VPzyPNFcvaF.cjs +0 -7
- package/browser/cjs/pPrxgr769sUGB5WL.cjs +0 -7
- package/browser/cjs/sqCd-isdKO-WsW_F.cjs +0 -7
- package/browser/cjs/xobXrowL2Qx-kWv9.cjs +0 -7
- package/browser/esm/4lHZjpF3_ugmKKui.mjs +0 -7
- package/browser/esm/67bnWHzYa5DZMY6A.mjs +0 -7
- package/browser/esm/BDYJEEaksgeY1UaE.mjs +0 -7
- package/browser/esm/BG0zhw4ripZzsL-w.mjs +0 -7
- package/browser/esm/BOfILXwwP1BW8Bsw.mjs +0 -7
- package/browser/esm/BPEwv5xX4DLnd-8o.mjs +0 -7
- package/browser/esm/BUeaoQihd7nbjV5D.mjs +0 -7
- package/browser/esm/Bb8asJ4COo3sy4Gt.mjs +0 -7
- package/browser/esm/BbJAEyq0pAF7biF-.mjs +0 -7
- package/browser/esm/BuoPWoEzsXvQsZFU.mjs +0 -7
- package/browser/esm/By_8JXNSh9nnHyBW.mjs +0 -7
- package/browser/esm/C4K5CBXvVExqCdpa.mjs +0 -7
- package/browser/esm/CKUiTXSrn9Xg_ph1.mjs +0 -10
- package/browser/esm/CLP8NgXNjnLl-iMQ.mjs +0 -7
- package/browser/esm/CVGuaXPdnO65bXE5.mjs +0 -7
- package/browser/esm/ClgHaEbC8eHvV73x.mjs +0 -7
- package/browser/esm/CoZh7nD_zQLfTNcp.mjs +0 -7
- package/browser/esm/D2jQMy8XvCDNeRaM.mjs +0 -7
- package/browser/esm/D3D_Ad9RkEvBe7Wz.mjs +0 -7
- package/browser/esm/D5dJ7VFFZvIOU2As.mjs +0 -7
- package/browser/esm/D8vW0N6EH97lDhnP.mjs +0 -7
- package/browser/esm/DB9YIl5l53cTx_qf.mjs +0 -7
- package/browser/esm/DFbUKmUyr8XjG6uR.mjs +0 -7
- package/browser/esm/DROuUTBh0ijsxsde.mjs +0 -7
- package/browser/esm/Dq1V1gMAXsC87zqO.mjs +0 -13
- package/browser/esm/Ds_YxbxItIu7PKA-.mjs +0 -7
- package/browser/esm/Ho-V23ZRWrnAVftS.mjs +0 -7
- package/browser/esm/j21djw_rEjBtpjRd.mjs +0 -7
- package/browser/esm/kXWocze33jAxVJq6.mjs +0 -10
- package/browser/esm/qi0568hNwcdjIMy6.mjs +0 -7
- package/browser/esm/yVExwiZwWE8vLSFO.mjs +0 -7
- package/node/esm/k3luU7uFD82_cpo4.mjs +0 -80
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";/**
|
|
2
|
+
* @license @sheetxl/sdk - SDK - A high-performance, embeddable spreadsheet engine. - v0.4.15
|
|
3
|
+
*
|
|
4
|
+
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
5
|
+
* License: The license can be found at https://www.sheetxl.com/license.
|
|
6
|
+
*/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,Ut=(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:Ut: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},U=(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},Pt=[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,Pt):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:U,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=U(n,e[o],r);return t&&(n=U(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)},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)}),P="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:P})),l=await lt(i);r={mimeType:t??P,naturalDimensions:l,asUrl:i,asSVGText:a}}catch{}};if(t===P?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.
|
|
7
|
+
Copy and paste will be limited to within the browser tab.
|
|
8
|
+
|
|
9
|
+
Please use Chrome or Edge if external copy and paste is required.`,k=`You do not have permissions to access the clipboard.
|
|
10
|
+
All copy and paste operations will be limited to the browser tab.`,jt={Safari:`The Safari browser does not support advanced copy and paste.
|
|
11
|
+
Copy and paste will be limited to within the browser tab.
|
|
12
|
+
|
|
13
|
+
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("./D65Kj_FHrWptDBz6.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.$t=xt,exports.index=Gt;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";/**
|
|
2
|
+
* @license @sheetxl/sdk - SDK - A high-performance, embeddable spreadsheet engine. - v0.4.15
|
|
3
|
+
*
|
|
4
|
+
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
5
|
+
* License: The license can be found at https://www.sheetxl.com/license.
|
|
6
|
+
*/Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});exports.default={ASC:{s:"Converts a string to full-width characters to half-width. Uses the double-byte character set (DBCS).",p:{text:{d:"is a text or a reference to a cell containing text"}},h:"DBCS"},ARRAYTOTEXT:{s:"Returns a text representation of an array",p:{array:{d:"the array to represent as text"},format:{d:"0 for relaxed format, 1 for strict format",v:0}}},CHAR:{s:"Returns the character specified by the code number from the character set for your computer",p:{number:{d:"is a number between 1 and 255 specifying which character you want"}}},CLEAN:{s:"Removes all nonprintable characters from text",p:{text:{d:"is the text you want to clean"}}},CODE:{s:"Returns the Unicode value of the first character in a text string",p:{text:{d:"is the text string whose Unicode value you want"}}},CONCAT:{s:"Concatenates a list or range of text strings",p:{text:{d:"text1,text2,... are 1 to 252 text strings or ranges to be joined"}}},CONCATENATE:{s:"Joins several text strings into one text string",p:{text:{d:"text1, text2,... are 1 to 252 text strings or ranges to be joined"}},c:"Compatibility"},DETECTLANGUAGE:{s:"Detects the language of a given text.",p:{text:{d:"is the text to detect the language of"}},h:"Unimplemented"},DBCS:{s:"Changes half-width characters to full-width characters. Uses the double-byte character set (DBCS).",p:{text:{d:"is a text or a reference to a cell containing text"}},h:"DBCS"},DOLLAR:{s:"Converts a number to text in currency format",p:{number:{d:"is the number to convert"},decimals:{d:"is the number of digits to the right of the decimal point",v:2}}},EXACT:{s:"Checks whether two text strings are exactly the same, and returns TRUE or FALSE. EXACT is case-sensitive",p:{text1:{d:"is the first text string"},text2:{d:"is the second text string"}}},FIND:{s:"Returns the starting position of one text string within another text string. FIND is case-sensitive",p:{findText:{d:"Returns the starting position of one text string within another text string. FIND is case-sensitive"},withinText:{d:"is the text you want to search"},startNum:{d:"specifies the character at which to start the search. The first character in Within_text is character number 1",v:1}}},FINDB:{s:"Finds the starting position of one text string with another text string. FINDB is case-sensitive. Use with double-byte characters.",p:{findText:{d:"is the text you want to find"},withinText:{d:"is the text you want to search"},startNum:{d:"is the position in within_text to start searching",v:1}},h:"DBCS"},FIXED:{s:"Rounds a number to the specified number of decimals and returns the result as text with or without commas",p:{number:{d:"is the number you want to round and convert to text"},decimals:{d:"is the number of digits to the right of the decimal point",v:2},noCommas:{d:"is a logical value: do not display commas in the returned text = TRUE; do display commas in the returned text = FALSE",v:!1}}},LEFT:{s:"Returns the specified number of characters from the start of a text string",p:{text:{d:"is the text string from which you want to extract characters"},numChars:{d:"specifies how many characters you want LEFT to extract",v:1}}},LEFTB:{s:"Returns the leftmost num_bytes characters from text. Uses double-byte characters.",p:{text:{d:"is the text string from which you want to extract characters"},numBytes:{d:"is the number of bytes to extract",v:1}},h:"DBCS"},LEN:{s:"Returns the number of characters in a text string",p:{text:{d:"is the text whose length you want to find. Spaces count as characters"}}},LENB:{s:"Returns the number of bytes in a text string. Uses double-byte characters.",p:{text:{d:"is the text string from which you want to extract characters"}}},LOWER:{s:"Converts all letters in a text string to lowercase",p:{text:{d:"is the text you want to convert to lowercase. Characters in Text that are not letters are not changed"}}},MID:{s:"Returns the characters from the middle of a text string, given a starting position and length",p:{text:{d:"is the text string from which you want to extract characters"},startNum:{d:"is the position of the first character you want to extract"},numChars:{d:"specifies how many characters to return from Text"}}},MIDB:{s:"Returns characters from the middle of a text string. Uses double-byte characters.",p:{text:{d:"is the text string from which you want to extract characters"},startNum:{d:"is the position of the first character you want to extract"},numBytes:{d:"is the number of bytes to extract"}},h:"DBCS"},NUMBERVALUE:{s:"Converts text to number in a locale-independent manner",p:{text:{d:"is the text string you want to convert"},decimalSeparator:{d:"is the character that separates the integer part from the decimal part of the number",v:"."},groupSeparator:{d:"is the character that separates groups of thousands",v:","}}},PERCENTOF:{s:"Returns the percentage of a subset of a given data set",p:{dataSubset:{d:"is the subset"},dataAll:{d:"is the data set"}},h:"Unimplemented"},PHONETIC:{s:"Returns the phonetic spelling of a text string",p:{reference:{d:"Text string or a reference to a single cell or a range of cells that contain a furigana text string"}},h:"Unimplemented"},PROPER:{s:"Converts the first letter of each word in a text string to uppercase",p:{text:{d:"is the text string you want to convert"}}},REGEXEXTRACT:{s:"Extracts substrings of 'text' based on the provided REGEX 'pattern'",p:{text:{d:"is the text string from which you want to extract characters"},pattern:{d:"The regular expression to be applied"},returnMode:{d:"Specify which matches to return",v:0},caseSensitivity:{d:"Whether the match is case sensitive",v:!1}},h:"Unimplemented"},REGEXREPLACE:{s:"Returns 'text', with 'replacement' in place of matches with 'pattern'",p:{text:{d:"is the text string from which you want to extract characters"},pattern:{d:"The regular expression to be applied"},replacement:{d:"The replacement string"},occurrence:{d:"The occurrence of the match to replace",v:0},caseSensitivity:{d:"Whether the match is case sensitive",v:!1}},h:"Unimplemented"},REGEXTEST:{s:"Checks whether the input matches the pattern, and returns TRUE or FALSE",p:{text:{d:"is the text string to be checked"},pattern:{d:"is the regular expression to be applied"},caseSensitivity:{d:"Whether the match is case sensitive",v:!1}},h:"Unimplemented"},REPLACE:{s:"Replaces part of a text string with a different text string",p:{oldText:{d:"is the text string to be changed"},startNum:{d:"is the position of the first character you want to replace"},numChars:{d:"is the number of characters to replace"},newText:{d:"is the text string that will replace old_text"}}},REPLACEB:{s:"Replaces part of a text string with a different text string using the number of bytes. Uses the double-byte character set (DBCS).",p:{oldText:{d:"is the text string to be changed"},startNum:{d:"is the position of the first character you want to replace"},numBytes:{d:"is the number of bytes to replace"},newText:{d:"is the text string that will replace old_text"}},h:"DBCS"},REPT:{s:"Repeats text a given number of times",p:{text:{d:"is the text you want to repeat"},numberTimes:{d:"is the number of times you want to repeat text"}}},RIGHT:{s:"Returns the specified number of characters from the end of a text string",p:{text:{d:"is the text string that contains the characters you want to extract"},numChars:{d:"specifies how many characters you want to extract",v:1}}},RIGHTB:{s:"Returns the rightmost num_bytes characters from text. Uses double-byte characters.",p:{text:{d:"is the text string from which you want to extract characters"},numBytes:{d:"is the number of bytes to extract",v:1}}},SEARCH:{s:"Returns the number of the character at which a specific character or text string is first found, reading left to right (not case-sensitive)",p:{findText:{d:"Returns the number of the character at which a specific character or text string is first found, reading left to right (not case-sensitive)"},withinText:{d:"is the text in which you want to search for Find_text"},startNum:{d:"is the character number in Within_text, counting from the left, at which you want to start searching",v:1}}},SEARCHB:{s:"Returns the number of the character at which a specific character or text string is first found, reading left to right (not case-sensitive). Uses the double-byte character set (DBCS).",p:{findText:{d:"Returns the number of the character at which a specific character or text string is first found, reading left to right (not case-sensitive)"},withinText:{d:"is the text in which you want to search for Find_text"},startBytes:{d:"is the character number in Within_text, counting from the left, at which you want to start searching",v:1}},h:"DBCS"},SUBSTITUTE:{s:"Replaces existing text with new text in a text string",p:{text:{d:"is the text or the reference to a cell containing text in which you want to substitute characters"},oldText:{d:"is the existing text you want to replace. If the case of Old_text does not match the case of text, SUBSTITUTE will not replace the text"},newText:{d:"is the text you want to replace Old_text with"},instanceNum:{d:"specifies which occurrence of Old_text you want to replace. If omitted, every instance of Old_text is replaced"}}},T:{s:"Checks whether a value is text, and returns the text if it is, or returns double quotes (empty text) if it is not",p:{value:{d:"is the value to test"}}},TEXT:{s:"Converts a value to text in a specific number format",p:{value:{d:"is a number, a formula that evaluates to a numeric value, or a reference to a cell containing a numeric value"},formatText:{d:"is a text string that defines the number format to use"}}},TEXTAFTER:{s:"Returns text that's after delimiting characters.",p:{text:{d:"The text you want to search for the delimiter."},delimiter:{d:"The character or string to use as a delimiter."},instanceNum:{d:"The desired occurrence of delimiter. The default is 1. A negative number searches from the end.",v:1},matchMode:{d:"Searches the text for a delimiter match. By default, a case-sensitive match is done.",v:0},matchEnd:{d:"Whether to match the delimiter against the end of text. By default, they're not matched.",v:0},ifNotFound:{d:"Returned if no match is found. By default, #N/A is returned.",v:"undefined"}}},TEXTJOIN:{s:"Concatenates a list or range of text strings using a delimiter",p:{delimiter:{d:"Character or string to insert between each text item"},ignoreEmpty:{d:"if TRUE(default), ignores empty cells"},text:{d:"text1,text2,... are 1 to 252 text strings or ranges to be joined"}}},TEXTSPLIT:{s:"Splits text into rows or columns using delimiters.",p:{text:{d:"The text to split"},colDelimiter:{d:"The column delimiter(s) - can be string or array of strings"},rowDelimiter:{d:"The row delimiter(s), null/undefined means no row splitting",v:null},ignoreEmpty:{d:"Whether to ignore empty values (defaults to `false`)",v:!1},matchMode:{d:"Whether to use case-sensitive (0) or case-insensitive (1) match (defaults to `0`)",v:0},padWith:{d:"Value to use for padding if matrix is uneven (defaults to `#N/A`)",v:"undefined"}}},TEXTBEFORE:{s:"Returns text that's before delimiting characters.",p:{text:{d:"The text you want to search for the delimiter."},delimiter:{d:"The character or string to use as a delimiter."},instanceNum:{d:"The desired occurrence of delimiter. The default is 1. A negative number searches from the end.",v:1},matchMode:{d:"Whether to use case-sensitive (0) or case-insensitive (1) match (defaults to `0`)",v:0},matchEnd:{d:"Whether to match the delimiter against the end of text. By default, they're not matched.",v:0},ifNotFound:{d:"Returned if no match is found. By default, #N/A is returned.",v:"undefined"}}},TRANSLATE:{s:"Translate a text string from one language to another using the Microsoft Translator service.",p:{text:{d:"The text to translate."},sourceLanguage:{d:"Specifiy the source language your text is currently in. Expressed as a two-letter language code."},targetLanguage:{d:"Specifiy the source language you want your text to be translated to. Expressed as a two-letter language code."}},h:"Unimplemented"},TRIM:{s:"Removes all spaces from text except for single spaces between words.",p:{text:{d:"The text from which you want to remove extra spaces."}}},UNICHAR:{s:"Returns the Unicode character referenced by the given numeric value",p:{number:{d:"is the Unicode number representing a character"}}},UNICODE:{s:"Returns the number (code point) corresponding to the first character of the text",p:{text:{d:"is the character that you want the Unicode value of"}}},UPPER:{s:"Converts a text string to all uppercase letters",p:{text:{d:"is the text you want converted to uppercase, a reference or a text string"}}},VALUE:{s:"Converts a text string that represents a number to a number",p:{text:{d:"is the text enclosed in quotation marks or a reference to a cell containing the text you want to convert"}}},VALUETOTEXT:{s:"Returns a text representation of a value",p:{value:{d:"the value to represent as text"},format:{d:"the format of the text",v:0}}}};
|