@sheetxl/studio-mui 0.3.17 → 0.3.19
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/{DwDxn-CNljZzVT1A.cjs → -Z_xfLHIzayq6e-C.cjs} +2 -2
- package/browser/cjs/{LuveH2FlUiHGFdEo.cjs → 5EMNCalBy5T7Qv40.cjs} +1 -1
- package/browser/cjs/{tRDmcs5sNqgwsPcc.cjs → B-i9az2r-j4BoodW.cjs} +1 -1
- package/browser/cjs/{CpjgyIT06xS_g-RI.cjs → B98cTi8NhLFwk-0Q.cjs} +2 -2
- package/browser/cjs/{Dy6OQFVhwFO_v_rL.cjs → BFe0zJbC0Wy4fqLf.cjs} +1 -1
- package/browser/cjs/{vgm3myHD1SVA4Oal.cjs → Bg1sVEitsy9Ktlo9.cjs} +1 -1
- package/browser/cjs/{D-0gYov1wyCtp4ZX.cjs → BsJ8nFqSJFJDsuan.cjs} +2 -2
- package/browser/cjs/{Dk3opGiX0kIIcJN4.cjs → BvCYlgtHsPgA_aNK.cjs} +2 -2
- package/browser/cjs/{CIHCV7NTmzi3k8gl.cjs → ByHotNG2i_czKEr8.cjs} +2 -2
- package/browser/cjs/{D9zHP8uxvUVS8Gid.cjs → C-ElWpjJiAYCYYvU.cjs} +2 -2
- package/browser/cjs/{DXSp4lOLFHBJmXwL.cjs → C-oc8im_PZRCQOvZ.cjs} +1 -1
- package/browser/cjs/{_mKLoeTMKAtAbWoZ.cjs → C645WCVpMGicXgBM.cjs} +1 -1
- package/browser/cjs/{CKUzVyrC7_Eq3M5O.cjs → CF_a0DpvEBsJCpgQ.cjs} +3 -3
- package/browser/cjs/CLJkEcejZPl006p2.cjs +87 -0
- package/browser/cjs/{XyTji7yypa56X6GA.cjs → COX8k8pyTOk8BoD-.cjs} +1 -1
- package/browser/cjs/{BgSiicbcautP-dJN.cjs → CRV08682FzN5ew39.cjs} +3 -3
- package/browser/cjs/{C08ng5ahasoyzwZg.cjs → CTlLfk6a9CkzbQNt.cjs} +4 -4
- package/browser/cjs/{DdBweIBk4jEt5Tue.cjs → CUn6t8lfcG9cPH1h.cjs} +2 -2
- package/browser/cjs/{DLxWeoRObtw9vhq0.cjs → D6E9xEe6tjbfqtEm.cjs} +2 -2
- package/browser/cjs/{DFFgZqn8T517K-D8.cjs → D92iJHsZJX_wZ52_.cjs} +2 -2
- package/browser/cjs/{Tfh1HV0EKshDqS7E.cjs → DW0q0AyrJofzss0y.cjs} +4 -4
- package/browser/cjs/{DIxETliPSfTmAXr4.cjs → DggumD9iQqyO3FFa.cjs} +2 -2
- package/browser/cjs/{D1evviVgpMSnh_ps.cjs → DkMBDN---q9jUa8V.cjs} +2 -2
- package/browser/cjs/{DFngnyWyXGuxhIPZ.cjs → _dSiOxKU18SdUtnS.cjs} +1 -1
- package/browser/cjs/index.cjs +2 -2
- package/browser/cjs/{Nw__gRJX4sl4Tt7R.cjs → oyaxmxAEZ4VTVk_8.cjs} +1 -1
- package/browser/esm/{C3hl8685OyiU8zAf.mjs → 8JD53VBt79P-aa-S.mjs} +3 -3
- package/browser/esm/{C8fEUlANNzawC6Xc.mjs → B97bNoiD5vSlwEfq.mjs} +2 -2
- package/browser/esm/{n1kGJdvXBEjFxVrb.mjs → BB_9iof-6U8Cb15P.mjs} +6 -6
- package/browser/esm/{BLZ3EOMzZsWJC5S0.mjs → BHegaWai1nWBR-L9.mjs} +1 -1
- package/browser/esm/{n4POnl7MgS65q2ii.mjs → BKhb4mVxGfN4CIjS.mjs} +1 -1
- package/browser/esm/{Bmj8uXB3KL06M3vv.mjs → BVzvMC6p5FNP8qK9.mjs} +12 -12
- package/browser/esm/{Bb3_PsjetSKWrSf4.mjs → BbMrsjIGEkoLGak0.mjs} +2 -2
- package/browser/esm/{DS3c6eeicscsjbs7.mjs → Bi-5-fOHXnnsSVMH.mjs} +1 -1
- package/browser/esm/{B1xyEbeBWMDrAkzW.mjs → C4vC41vzQpD-qyMn.mjs} +2 -2
- package/browser/esm/{DG3efN-bUDufTTcd.mjs → C7UEqLxvuNIEbzcl.mjs} +8 -8
- package/browser/esm/{DNvhZrp6zzno9ElX.mjs → CJPeBWCN11PDgfKC.mjs} +1 -1
- package/browser/esm/{3Eldf7LDx05FkHEG.mjs → CLRvr3EDwZwQGFld.mjs} +2 -2
- package/browser/esm/{DzdpqKiOgiu_ZQX-.mjs → CTgZnJeqPNm0IneY.mjs} +1 -1
- package/browser/esm/{CZo42wxuAl9vQtuk.mjs → CUrgSndSnDCQKu6U.mjs} +2 -2
- package/browser/esm/{Bpmx44QjgJMzXvvV.mjs → CocO3lRUMqgv4AFJ.mjs} +1 -1
- package/browser/esm/{Cgjq8GJx8h_-7jJX.mjs → DLTm93l6QUeTWBtR.mjs} +12 -12
- package/browser/esm/{CPqpIblMYT0gACih.mjs → DNMEKvZSHupr35RK.mjs} +4 -4
- package/browser/esm/{baV4rsxFxEXHit-d.mjs → Dkm4CH9HTgLMuj1z.mjs} +1 -1
- package/browser/esm/{Drqavr0l8Ps0YhDs.mjs → Dkqkg5OonmopX_av.mjs} +2 -2
- package/browser/esm/{koW9BUpZv7gyrarA.mjs → DsLBuFS0K1zRuAH4.mjs} +1 -1
- package/browser/esm/{rFrvxYxzRtQImlgP.mjs → Dsvtw0sJ8FRtGm5n.mjs} +3 -3
- package/browser/esm/{D6hA19knB0fJKwzy.mjs → WKwjqHXBabDyAtuT.mjs} +1 -1
- package/browser/esm/{RN7ZcTUj1a9bkcAY.mjs → g4yV8ILPtVwy8tG5.mjs} +9064 -8978
- package/browser/esm/index.mjs +16 -16
- package/browser/esm/{DqZe7V3DGrIfMtGS.mjs → w-PhBfcFM6AZzwmU.mjs} +2 -2
- package/browser/esm/{C1NK6PMgHA6_q4G9.mjs → zHTatrVtfVuPg1ii.mjs} +40 -40
- package/licenses/dependencies.txt +27 -27
- package/node/esm/{DGQmWSiV5JY6DjZG.mjs → BB6SV3cXsfTqodbb.mjs} +1 -1
- package/node/esm/{DqsU4yd41ufRAcJO.mjs → Bp-CJA_tLpQ7pT29.mjs} +2 -2
- package/node/esm/{ClfVBIMfZxlVszUo.mjs → C06YIVEYQuR5Vaft.mjs} +1 -1
- package/node/esm/{Htj3MI9usVmunAcf.mjs → CCl1udn2B2Ht6C3g.mjs} +10 -10
- package/node/esm/{BsQ-Ov8Ivo8TI4I4.mjs → Ck6HJccOiajom0p5.mjs} +27 -27
- package/node/esm/{CsEHLeb8-XFUlGfX.mjs → Cnz7_lvzqMqQs08b.mjs} +5 -5
- package/node/esm/{DJQrHkF9BqUru6t4.mjs → CvIwaInnb5xT75rt.mjs} +1 -1
- package/node/esm/{ChMgfohJzzPyjfAB.mjs → D1cFV6R_lGB3yi1w.mjs} +1 -1
- package/node/esm/{Cg3P7DuUpeT1RkRa.mjs → D2h4VPChcK5U-a0T.mjs} +2 -2
- package/node/esm/{D9md0q9Q4quDfKMk.mjs → D7jQWNfNldioygd-.mjs} +1 -1
- package/node/esm/{F32Ja_r-VN01X2Xk.mjs → DHqKiBp0YDn-rVWv.mjs} +2 -2
- package/node/esm/{CDh2VQNMmOnfKFuW.mjs → DTiWaGbGjtZCRAj0.mjs} +7 -7
- package/node/esm/{UiulRLshJYUYX09M.mjs → DX4vRmhbc53oBNeg.mjs} +1 -1
- package/node/esm/{CddguVWsXQg-DXNA.mjs → DbrD7HDgNfqUmzdP.mjs} +1 -1
- package/node/esm/{D1iWuymmaACMQ4pm.mjs → DoRbSUaOrfZffDc4.mjs} +84 -84
- package/node/esm/{BmOWZuGmSqavyXpQ.mjs → RfwcTEhVvbPAxFAu.mjs} +2 -2
- package/node/esm/{CwwTvoSxzfri2KMt.mjs → Xa5E_4nSt8LVXkNA.mjs} +1 -1
- package/node/esm/{DPiWF4TL-A-tKNQt.mjs → Ya3wztkbwM47CwJy.mjs} +5 -5
- package/node/esm/{C8DPV_nnEWIiAiCB.mjs → acSFCnnB-d3FV6qe.mjs} +3 -3
- package/node/esm/{CHMPEyY4aAIYityN.mjs → bozut2iu1gZ26NCH.mjs} +2 -2
- package/node/esm/index.mjs +3986 -3887
- package/node/esm/{CN7f5Js_bPmrOhWa.mjs → lx40ksuj0iGDMKDe.mjs} +27 -27
- package/node/esm/{Dz0BG4WLmpimwD6q.mjs → tcog-VptibIIj9kW.mjs} +4 -4
- package/node/esm/{9g3lp6kZgtdHUkZX.mjs → uHvMtxBHa3ohbrOl.mjs} +12 -12
- package/package.json +8 -8
- package/browser/cjs/Cg143L74lLTSVqNN.cjs +0 -87
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";/**
|
|
2
|
-
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.3.
|
|
2
|
+
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.3.19
|
|
3
3
|
*
|
|
4
4
|
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
5
5
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";/**
|
|
2
|
-
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.3.
|
|
2
|
+
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.3.19
|
|
3
3
|
*
|
|
4
4
|
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
5
5
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
6
|
-
*/Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("@sheetxl/sdk"),Ke=require("./
|
|
6
|
+
*/Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("@sheetxl/sdk"),Ke=require("./CLJkEcejZPl006p2.cjs"),Ye=":A-Z_a-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-⁰-Ⰰ-、-豈-﷏ﷰ-�𐀀-",bs=new RegExp(`^[${Ye}][-${Ye}.0-9·̀-ͯ‿-⁀]*$`,"u");function rs(i){return i>=65&&i<=90||i>=97&&i<=122||i===58||i===95||i===8204||i===8205||i>=192&&i<=214||i>=216&&i<=246||i>=248&&i<=767||i>=880&&i<=893||i>=895&&i<=8191||i>=8304&&i<=8591||i>=11264&&i<=12271||i>=12289&&i<=55295||i>=63744&&i<=64975||i>=65008&&i<=65533||i>=65536&&i<=983039}const ts="A-Z_a-zÀ-ÖØ-öø-˿Ͱ-ͽͿ--⁰-Ⰰ-、-豈-﷏ﷰ-�𐀀-",xs=new RegExp(`^[${ts}][-${ts}.0-9·̀-ͯ‿-⁀]*$`,"u");function ns(i){return i>=65&&i<=90||i===95||i>=97&&i<=122||i>=192&&i<=214||i>=216&&i<=246||i>=248&&i<=767||i>=880&&i<=893||i>=895&&i<=8191||i>=8204&&i<=8205||i>=8304&&i<=8591||i>=11264&&i<=12271||i>=12289&&i<=55295||i>=63744&&i<=64975||i>=65008&&i<=65533||i>=65536&&i<=983039}const U=function(i){return i===32||i===10||i===13||i===9},ws=function(i){return i>=32&&i<=55295||i===10||i===13||i===9||i>=57344&&i<=65533||i>=65536&&i<=1114111},re=rs,es=function(i){return rs(i)||i>=48&&i<=57||i===45||i===46||i===183||i>=768&&i<=879||i>=8255&&i<=8256},as=[32,10,13,9],vs=bs,Ss=function(i){return i>=1&&i<=55295||i>=57344&&i<=65533||i>=65536&&i<=1114111},Cs=ns,ks=function(i){return ns(i)||i===45||i===46||i>=48&&i<=57||i===183||i>=768&&i<=879||i>=8255&&i<=8256},As=xs,ge="http://www.w3.org/XML/1998/namespace",Jt="http://www.w3.org/2000/xmlns/",Es={__proto__:null,xml:ge,xmlns:Jt},Ds={__proto__:null,amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},O=-1,lt=-2,q=13,jt=33,ot=10,St=60,Gt=61,M=62,X=63,Zt=93,pe=i=>i===34||i===39,ls=[34,39],Ps=[...ls,91,M],Is=[...ls,St,Zt],Os=[Gt,X,...as],Vs=[...as,M,38,St];function ke(i,t,s){switch(t){case"xml":s!==ge&&i.fail(`xml prefix must be bound to ${ge}.`);break;case"xmlns":s!==Jt&&i.fail(`xmlns prefix must be bound to ${Jt}.`)}switch(s){case Jt:i.fail(t===""?`the default namespace may not be set to ${s}.`:`may not assign a prefix (even "xmlns") to the URI ${Jt}.`);break;case ge:switch(t){case"xml":break;case"":i.fail(`the default namespace may not be set to ${s}.`);break;default:i.fail("may not assign the xml namespace to another prefix.")}}}const Ns=i=>As.test(i),Ls=i=>vs.test(i),ss={xmldecl:"xmldeclHandler",text:"textHandler",processinginstruction:"piHandler",doctype:"doctypeHandler",comment:"commentHandler",opentagstart:"openTagStartHandler",attribute:"attributeHandler",opentag:"openTagHandler",closetag:"closeTagHandler",cdata:"cdataHandler",error:"errorHandler",end:"endHandler",ready:"readyHandler"};class Rs{constructor(t){this.i=0,this.prevI=0,this.opt=t??{},this.fragmentOpt=!!this.opt.fragment;const s=this.xmlnsOpt=!!this.opt.xmlns;if(this.trackPosition=this.opt.position!==!1,this.fileName=this.opt.fileName,s){this.nameStartCheck=Cs,this.nameCheck=ks,this.isName=Ns,this.processAttribs=this.processAttribsNS,this.pushAttrib=this.pushAttribNS,this.ns={__proto__:null,...Es};const o=this.opt.additionalNamespaces;o!=null&&(function(n,a){for(const c of Object.keys(a))ke(n,c,a[c])}(this,o),Object.assign(this.ns,o))}else this.nameStartCheck=re,this.nameCheck=es,this.isName=Ls,this.processAttribs=this.processAttribsPlain,this.pushAttrib=this.pushAttribPlain;this.stateTable=[this.sBegin,this.sBeginWhitespace,this.sDoctype,this.sDoctypeQuote,this.sDTD,this.sDTDQuoted,this.sDTDOpenWaka,this.sDTDOpenWakaBang,this.sDTDComment,this.sDTDCommentEnding,this.sDTDCommentEnded,this.sDTDPI,this.sDTDPIEnding,this.sText,this.sEntity,this.sOpenWaka,this.sOpenWakaBang,this.sComment,this.sCommentEnding,this.sCommentEnded,this.sCData,this.sCDataEnding,this.sCDataEnding2,this.sPIFirstChar,this.sPIRest,this.sPIBody,this.sPIEnding,this.sXMLDeclNameStart,this.sXMLDeclName,this.sXMLDeclEq,this.sXMLDeclValueStart,this.sXMLDeclValue,this.sXMLDeclSeparator,this.sXMLDeclEnding,this.sOpenTag,this.sOpenTagSlash,this.sAttrib,this.sAttribName,this.sAttribNameSawWhite,this.sAttribValue,this.sAttribValueQuoted,this.sAttribValueClosed,this.sAttribValueUnquoted,this.sCloseTag,this.sCloseTagSawWhite],this._init()}get closed(){return this._closed}_init(){this.openWakaBang="",this.text="",this.name="",this.piTarget="",this.entity="",this.q=null,this.tags=[],this.tag=null,this.topNS=null,this.chunk="",this.chunkPosition=0,this.i=0,this.prevI=0,this.carriedFromPrevious=void 0,this.forbiddenState=0,this.attribList=[];const{fragmentOpt:t}=this;this.state=t?q:0,this.reportedTextBeforeRoot=this.reportedTextAfterRoot=this.closedRoot=this.sawRoot=t,this.xmlDeclPossible=!t,this.xmlDeclExpects=["version"],this.entityReturnState=void 0;let{defaultXMLVersion:s}=this.opt;if(s===void 0){if(this.opt.forceXMLVersion===!0)throw new Error("forceXMLVersion set but defaultXMLVersion is not set");s="1.0"}this.setXMLVersion(s),this.positionAtNewLine=0,this.doctype=!1,this._closed=!1,this.xmlDecl={version:void 0,encoding:void 0,standalone:void 0},this.line=1,this.column=0,this.ENTITIES=Object.create(Ds),this.readyHandler?.()}get position(){return this.chunkPosition+this.i}get columnIndex(){return this.position-this.positionAtNewLine}on(t,s){this[ss[t]]=s}off(t){this[ss[t]]=void 0}makeError(t){let s=this.fileName??"";return this.trackPosition&&(s.length>0&&(s+=":"),s+=`${this.line}:${this.column}`),s.length>0&&(s+=": "),new Error(s+t)}fail(t){const s=this.makeError(t),o=this.errorHandler;if(o===void 0)throw s;return o(s),this}write(t){if(this.closed)return this.fail("cannot write after close; assign an onready handler.");let s=!1;t===null?(s=!0,t=""):typeof t=="object"&&(t=t.toString()),this.carriedFromPrevious!==void 0&&(t=`${this.carriedFromPrevious}${t}`,this.carriedFromPrevious=void 0);let o=t.length;const n=t.charCodeAt(o-1);!s&&(n===13||n>=55296&&n<=56319)&&(this.carriedFromPrevious=t[o-1],o--,t=t.slice(0,o));const{stateTable:a}=this;for(this.chunk=t,this.i=0;this.i<o;)a[this.state].call(this);return this.chunkPosition+=o,s?this.end():this}close(){return this.write(null)}getCode10(){const t=this.chunk,s=this.i;if(this.prevI=s,this.i++,s>=t.length)return O;const o=t.charCodeAt(s);if(this.column++,o<55296){if(o>=32||o===9)return o;switch(o){case ot:return this.line++,this.column=0,this.positionAtNewLine=this.position,ot;case 13:return t.charCodeAt(s+1)===ot&&(this.i=s+2),this.line++,this.column=0,this.positionAtNewLine=this.position,lt;default:return this.fail("disallowed character."),o}}if(o>56319)return o>=57344&&o<=65533||this.fail("disallowed character."),o;const n=65536+1024*(o-55296)+(t.charCodeAt(s+1)-56320);return this.i=s+2,n>1114111&&this.fail("disallowed character."),n}getCode11(){const{chunk:t,i:s}=this;if(this.prevI=s,this.i=s+1,s>=t.length)return O;const o=t.charCodeAt(s);if(this.column++,o<55296){if(o>31&&o<127||o>159&&o!==8232||o===9)return o;switch(o){case ot:return this.line++,this.column=0,this.positionAtNewLine=this.position,ot;case 13:{const a=t.charCodeAt(s+1);a!==ot&&a!==133||(this.i=s+2)}case 133:case 8232:return this.line++,this.column=0,this.positionAtNewLine=this.position,lt;default:return this.fail("disallowed character."),o}}if(o>56319)return o>=57344&&o<=65533||this.fail("disallowed character."),o;const n=65536+1024*(o-55296)+(t.charCodeAt(s+1)-56320);return this.i=s+2,n>1114111&&this.fail("disallowed character."),n}getCodeNorm(){const t=this.getCode();return t===lt?ot:t}unget(){this.i=this.prevI,this.column--}captureTo(t){let{i:s}=this;const{chunk:o}=this;for(;;){const n=this.getCode(),a=n===lt,c=a?ot:n;if(c===O||t.includes(c))return this.text+=o.slice(s,this.prevI),c;a&&(this.text+=`${o.slice(s,this.prevI)}
|
|
7
7
|
`,s=this.i)}}captureToChar(t){let{i:s}=this;const{chunk:o}=this;for(;;){let n=this.getCode();switch(n){case lt:this.text+=`${o.slice(s,this.prevI)}
|
|
8
8
|
`,s=this.i,n=ot;break;case O:return this.text+=o.slice(s),!1}if(n===t)return this.text+=o.slice(s,this.prevI),!0}}captureNameChars(){const{chunk:t,i:s}=this;for(;;){const o=this.getCode();if(o===O)return this.name+=t.slice(s),O;if(!es(o))return this.name+=t.slice(s,this.prevI),o===lt?ot:o}}skipSpaces(){for(;;){const t=this.getCodeNorm();if(t===O||!U(t))return t}}setXMLVersion(t){this.currentXMLVersion=t,t==="1.0"?(this.isChar=ws,this.getCode=this.getCode10):(this.isChar=Ss,this.getCode=this.getCode11)}sBegin(){this.chunk.charCodeAt(0)===65279&&(this.i++,this.column++),this.state=1}sBeginWhitespace(){const t=this.i,s=this.skipSpaces();switch(this.prevI!==t&&(this.xmlDeclPossible=!1),s){case St:if(this.state=15,this.text.length!==0)throw new Error("no-empty text at start");break;case O:break;default:this.unget(),this.state=q,this.xmlDeclPossible=!1}}sDoctype(){const t=this.captureTo(Ps);switch(t){case M:this.doctypeHandler?.(this.text),this.text="",this.state=q,this.doctype=!0;break;case O:break;default:this.text+=String.fromCodePoint(t),t===91?this.state=4:pe(t)&&(this.state=3,this.q=t)}}sDoctypeQuote(){const t=this.q;this.captureToChar(t)&&(this.text+=String.fromCodePoint(t),this.q=null,this.state=2)}sDTD(){const t=this.captureTo(Is);t!==O&&(this.text+=String.fromCodePoint(t),t===Zt?this.state=2:t===St?this.state=6:pe(t)&&(this.state=5,this.q=t))}sDTDQuoted(){const t=this.q;this.captureToChar(t)&&(this.text+=String.fromCodePoint(t),this.state=4,this.q=null)}sDTDOpenWaka(){const t=this.getCodeNorm();switch(this.text+=String.fromCodePoint(t),t){case 33:this.state=7,this.openWakaBang="";break;case X:this.state=11;break;default:this.state=4}}sDTDOpenWakaBang(){const t=String.fromCodePoint(this.getCodeNorm()),s=this.openWakaBang+=t;this.text+=t,s!=="-"&&(this.state=s==="--"?8:4,this.openWakaBang="")}sDTDComment(){this.captureToChar(45)&&(this.text+="-",this.state=9)}sDTDCommentEnding(){const t=this.getCodeNorm();this.text+=String.fromCodePoint(t),this.state=t===45?10:8}sDTDCommentEnded(){const t=this.getCodeNorm();this.text+=String.fromCodePoint(t),t===M?this.state=4:(this.fail("malformed comment."),this.state=8)}sDTDPI(){this.captureToChar(X)&&(this.text+="?",this.state=12)}sDTDPIEnding(){const t=this.getCodeNorm();this.text+=String.fromCodePoint(t),t===M&&(this.state=4)}sText(){this.tags.length!==0?this.handleTextInRoot():this.handleTextOutsideRoot()}sEntity(){let{i:t}=this;const{chunk:s}=this;t:for(;;)switch(this.getCode()){case lt:this.entity+=`${s.slice(t,this.prevI)}
|
|
9
9
|
`,t=this.i;break;case 59:{const{entityReturnState:o}=this,n=this.entity+s.slice(t,this.prevI);let a;this.state=o,n===""?(this.fail("empty entity name."),a="&;"):(a=this.parseEntity(n),this.entity=""),o===q&&this.textHandler===void 0||(this.text+=a);break t}case O:this.entity+=s.slice(t);break t}}sOpenWaka(){const t=this.getCode();if(re(t))this.state=34,this.unget(),this.xmlDeclPossible=!1;else switch(t){case 47:this.state=43,this.xmlDeclPossible=!1;break;case 33:this.state=16,this.openWakaBang="",this.xmlDeclPossible=!1;break;case X:this.state=23;break;default:this.fail("disallowed character in tag name"),this.state=q,this.xmlDeclPossible=!1}}sOpenWakaBang(){switch(this.openWakaBang+=String.fromCodePoint(this.getCodeNorm()),this.openWakaBang){case"[CDATA[":this.sawRoot||this.reportedTextBeforeRoot||(this.fail("text data outside of root node."),this.reportedTextBeforeRoot=!0),this.closedRoot&&!this.reportedTextAfterRoot&&(this.fail("text data outside of root node."),this.reportedTextAfterRoot=!0),this.state=20,this.openWakaBang="";break;case"--":this.state=17,this.openWakaBang="";break;case"DOCTYPE":this.state=2,(this.doctype||this.sawRoot)&&this.fail("inappropriately located doctype declaration."),this.openWakaBang="";break;default:this.openWakaBang.length>=7&&this.fail("incorrect syntax.")}}sComment(){this.captureToChar(45)&&(this.state=18)}sCommentEnding(){const t=this.getCodeNorm();t===45?(this.state=19,this.commentHandler?.(this.text),this.text=""):(this.text+=`-${String.fromCodePoint(t)}`,this.state=17)}sCommentEnded(){const t=this.getCodeNorm();t!==M?(this.fail("malformed comment."),this.text+=`--${String.fromCodePoint(t)}`,this.state=17):this.state=q}sCData(){this.captureToChar(Zt)&&(this.state=21)}sCDataEnding(){const t=this.getCodeNorm();t===Zt?this.state=22:(this.text+=`]${String.fromCodePoint(t)}`,this.state=20)}sCDataEnding2(){const t=this.getCodeNorm();switch(t){case M:this.cdataHandler?.(this.text),this.text="",this.state=q;break;case Zt:this.text+="]";break;default:this.text+=`]]${String.fromCodePoint(t)}`,this.state=20}}sPIFirstChar(){const t=this.getCodeNorm();this.nameStartCheck(t)?(this.piTarget+=String.fromCodePoint(t),this.state=24):t===X||U(t)?(this.fail("processing instruction without a target."),this.state=t===X?26:25):(this.fail("disallowed character in processing instruction name."),this.piTarget+=String.fromCodePoint(t),this.state=24)}sPIRest(){const{chunk:t,i:s}=this;for(;;){const o=this.getCodeNorm();if(o===O)return void(this.piTarget+=t.slice(s));if(!this.nameCheck(o)){this.piTarget+=t.slice(s,this.prevI);const n=o===X;n||U(o)?this.piTarget==="xml"?(this.xmlDeclPossible||this.fail("an XML declaration must be at the start of the document."),this.state=n?jt:27):this.state=n?26:25:(this.fail("disallowed character in processing instruction name."),this.piTarget+=String.fromCodePoint(o));break}}}sPIBody(){if(this.text.length===0){const t=this.getCodeNorm();t===X?this.state=26:U(t)||(this.text=String.fromCodePoint(t))}else this.captureToChar(X)&&(this.state=26)}sPIEnding(){const t=this.getCodeNorm();if(t===M){const{piTarget:s}=this;s.toLowerCase()==="xml"&&this.fail("the XML declaration must appear at the start of the document."),this.piHandler?.({target:s,body:this.text}),this.piTarget=this.text="",this.state=q}else t===X?this.text+="?":(this.text+=`?${String.fromCodePoint(t)}`,this.state=25);this.xmlDeclPossible=!1}sXMLDeclNameStart(){const t=this.skipSpaces();t!==X?t!==O&&(this.state=28,this.name=String.fromCodePoint(t)):this.state=jt}sXMLDeclName(){const t=this.captureTo(Os);if(t===X)return this.state=jt,this.name+=this.text,this.text="",void this.fail("XML declaration is incomplete.");if(U(t)||t===Gt){if(this.name+=this.text,this.text="",!this.xmlDeclExpects.includes(this.name))switch(this.name.length){case 0:this.fail("did not expect any more name/value pairs.");break;case 1:this.fail(`expected the name ${this.xmlDeclExpects[0]}.`);break;default:this.fail(`expected one of ${this.xmlDeclExpects.join(", ")}`)}this.state=t===Gt?30:29}}sXMLDeclEq(){const t=this.getCodeNorm();if(t===X)return this.state=jt,void this.fail("XML declaration is incomplete.");U(t)||(t!==Gt&&this.fail("value required."),this.state=30)}sXMLDeclValueStart(){const t=this.getCodeNorm();if(t===X)return this.state=jt,void this.fail("XML declaration is incomplete.");U(t)||(pe(t)?this.q=t:(this.fail("value must be quoted."),this.q=32),this.state=31)}sXMLDeclValue(){const t=this.captureTo([this.q,X]);if(t===X)return this.state=jt,this.text="",void this.fail("XML declaration is incomplete.");if(t===O)return;const s=this.text;switch(this.text="",this.name){case"version":{this.xmlDeclExpects=["encoding","standalone"];const o=s;this.xmlDecl.version=o,/^1\.[0-9]+$/.test(o)?this.opt.forceXMLVersion||this.setXMLVersion(o):this.fail("version number must match /^1\\.[0-9]+$/.");break}case"encoding":/^[A-Za-z][A-Za-z0-9._-]*$/.test(s)||this.fail("encoding value must match /^[A-Za-z0-9][A-Za-z0-9._-]*$/."),this.xmlDeclExpects=["standalone"],this.xmlDecl.encoding=s;break;case"standalone":s!=="yes"&&s!=="no"&&this.fail('standalone value must match "yes" or "no".'),this.xmlDeclExpects=[],this.xmlDecl.standalone=s}this.name="",this.state=32}sXMLDeclSeparator(){const t=this.getCodeNorm();t!==X?(U(t)||(this.fail("whitespace required."),this.unget()),this.state=27):this.state=jt}sXMLDeclEnding(){this.getCodeNorm()===M?(this.piTarget!=="xml"?this.fail("processing instructions are not allowed before root."):this.name!=="version"&&this.xmlDeclExpects.includes("version")&&this.fail("XML declaration must contain a version."),this.xmldeclHandler?.(this.xmlDecl),this.name="",this.piTarget=this.text="",this.state=q):this.fail("The character ? is disallowed anywhere in XML declarations."),this.xmlDeclPossible=!1}sOpenTag(){const t=this.captureNameChars();if(t===O)return;const s=this.tag={name:this.name,attributes:Object.create(null)};switch(this.name="",this.xmlnsOpt&&(this.topNS=s.ns=Object.create(null)),this.openTagStartHandler?.(s),this.sawRoot=!0,!this.fragmentOpt&&this.closedRoot&&this.fail("documents may contain only one root."),t){case M:this.openTag();break;case 47:this.state=35;break;default:U(t)||this.fail("disallowed character in tag name."),this.state=36}}sOpenTagSlash(){this.getCode()===M?this.openSelfClosingTag():(this.fail("forward-slash in opening tag not followed by >."),this.state=36)}sAttrib(){const t=this.skipSpaces();t!==O&&(re(t)?(this.unget(),this.state=37):t===M?this.openTag():t===47?this.state=35:this.fail("disallowed character in attribute name."))}sAttribName(){const t=this.captureNameChars();t===Gt?this.state=39:U(t)?this.state=38:t===M?(this.fail("attribute without value."),this.pushAttrib(this.name,this.name),this.name=this.text="",this.openTag()):t!==O&&this.fail("disallowed character in attribute name.")}sAttribNameSawWhite(){const t=this.skipSpaces();switch(t){case O:return;case Gt:this.state=39;break;default:this.fail("attribute without value."),this.text="",this.name="",t===M?this.openTag():re(t)?(this.unget(),this.state=37):(this.fail("disallowed character in attribute name."),this.state=36)}}sAttribValue(){const t=this.getCodeNorm();pe(t)?(this.q=t,this.state=40):U(t)||(this.fail("unquoted attribute value."),this.state=42,this.unget())}sAttribValueQuoted(){const{q:t,chunk:s}=this;let{i:o}=this;for(;;)switch(this.getCode()){case t:return this.pushAttrib(this.name,this.text+s.slice(o,this.prevI)),this.name=this.text="",this.q=null,void(this.state=41);case 38:return this.text+=s.slice(o,this.prevI),this.state=14,void(this.entityReturnState=40);case ot:case lt:case 9:this.text+=`${s.slice(o,this.prevI)} `,o=this.i;break;case St:return this.text+=s.slice(o,this.prevI),void this.fail("disallowed character.");case O:return void(this.text+=s.slice(o))}}sAttribValueClosed(){const t=this.getCodeNorm();U(t)?this.state=36:t===M?this.openTag():t===47?this.state=35:re(t)?(this.fail("no whitespace between attributes."),this.unget(),this.state=37):this.fail("disallowed character in attribute name.")}sAttribValueUnquoted(){const t=this.captureTo(Vs);switch(t){case 38:this.state=14,this.entityReturnState=42;break;case St:this.fail("disallowed character.");break;case O:break;default:this.text.includes("]]>")&&this.fail('the string "]]>" is disallowed in char data.'),this.pushAttrib(this.name,this.text),this.name=this.text="",t===M?this.openTag():this.state=36}}sCloseTag(){const t=this.captureNameChars();t===M?this.closeTag():U(t)?this.state=44:t!==O&&this.fail("disallowed character in closing tag.")}sCloseTagSawWhite(){switch(this.skipSpaces()){case M:this.closeTag();break;case O:break;default:this.fail("disallowed character in closing tag.")}}handleTextInRoot(){let{i:t,forbiddenState:s}=this;const{chunk:o,textHandler:n}=this;t:for(;;)switch(this.getCode()){case St:if(this.state=15,n!==void 0){const{text:a}=this,c=o.slice(t,this.prevI);a.length!==0?(n(a+c),this.text=""):c.length!==0&&n(c)}s=0;break t;case 38:this.state=14,this.entityReturnState=q,n!==void 0&&(this.text+=o.slice(t,this.prevI)),s=0;break t;case Zt:switch(s){case 0:s=1;break;case 1:s=2;break;case 2:break;default:throw new Error("impossible state")}break;case M:s===2&&this.fail('the string "]]>" is disallowed in char data.'),s=0;break;case lt:n!==void 0&&(this.text+=`${o.slice(t,this.prevI)}
|
|
10
10
|
`),t=this.i,s=0;break;case O:n!==void 0&&(this.text+=o.slice(t));break t;default:s=0}this.forbiddenState=s}handleTextOutsideRoot(){let{i:t}=this;const{chunk:s,textHandler:o}=this;let n=!1;t:for(;;){const a=this.getCode();switch(a){case St:if(this.state=15,o!==void 0){const{text:c}=this,T=s.slice(t,this.prevI);c.length!==0?(o(c+T),this.text=""):T.length!==0&&o(T)}break t;case 38:this.state=14,this.entityReturnState=q,o!==void 0&&(this.text+=s.slice(t,this.prevI)),n=!0;break t;case lt:o!==void 0&&(this.text+=`${s.slice(t,this.prevI)}
|
|
11
|
-
`),t=this.i;break;case O:o!==void 0&&(this.text+=s.slice(t));break t;default:U(a)||(n=!0)}}n&&(this.sawRoot||this.reportedTextBeforeRoot||(this.fail("text data outside of root node."),this.reportedTextBeforeRoot=!0),this.closedRoot&&!this.reportedTextAfterRoot&&(this.fail("text data outside of root node."),this.reportedTextAfterRoot=!0))}pushAttribNS(t,s){const{prefix:o,local:n}=this.qname(t),a={name:t,prefix:o,local:n,value:s};if(this.attribList.push(a),this.attributeHandler?.(a),o==="xmlns"){const c=s.trim();this.currentXMLVersion==="1.0"&&c===""&&this.fail("invalid attempt to undefine prefix in XML 1.0"),this.topNS[n]=c,ke(this,n,c)}else if(t==="xmlns"){const c=s.trim();this.topNS[""]=c,ke(this,"",c)}}pushAttribPlain(t,s){const o={name:t,value:s};this.attribList.push(o),this.attributeHandler?.(o)}end(){this.sawRoot||this.fail("document must contain a root element.");const{tags:t}=this;for(;t.length>0;){const o=t.pop();this.fail(`unclosed tag: ${o.name}`)}this.state!==0&&this.state!==q&&this.fail("unexpected end.");const{text:s}=this;return s.length!==0&&(this.textHandler?.(s),this.text=""),this._closed=!0,this.endHandler?.(),this._init(),this}resolve(t){let s=this.topNS[t];if(s!==void 0)return s;const{tags:o}=this;for(let n=o.length-1;n>=0;n--)if(s=o[n].ns[t],s!==void 0)return s;return s=this.ns[t],s!==void 0?s:this.opt.resolvePrefix?.(t)}qname(t){const s=t.indexOf(":");if(s===-1)return{prefix:"",local:t};const o=t.slice(s+1),n=t.slice(0,s);return(n===""||o===""||o.includes(":"))&&this.fail(`malformed name: ${t}.`),{prefix:n,local:o}}processAttribsNS(){const{attribList:t}=this,s=this.tag;{const{prefix:a,local:c}=this.qname(s.name);s.prefix=a,s.local=c;const T=s.uri=this.resolve(a)??"";a!==""&&(a==="xmlns"&&this.fail('tags may not have "xmlns" as prefix.'),T===""&&(this.fail(`unbound namespace prefix: ${JSON.stringify(a)}.`),s.uri=a))}if(t.length===0)return;const{attributes:o}=s,n=new Set;for(const a of t){const{name:c,prefix:T,local:S}=a;let x,w;T===""?(x=c==="xmlns"?Jt:"",w=c):(x=this.resolve(T),x===void 0&&(this.fail(`unbound namespace prefix: ${JSON.stringify(T)}.`),x=T),w=`{${x}}${S}`),n.has(w)&&this.fail(`duplicate attribute: ${w}.`),n.add(w),a.uri=x,o[c]=a}this.attribList=[]}processAttribsPlain(){const{attribList:t}=this,s=this.tag.attributes;for(const{name:o,value:n}of t)s[o]!==void 0&&this.fail(`duplicate attribute: ${o}.`),s[o]=n;this.attribList=[]}openTag(){this.processAttribs();const{tags:t}=this,s=this.tag;s.isSelfClosing=!1,this.openTagHandler?.(s),t.push(s),this.state=q,this.name=""}openSelfClosingTag(){this.processAttribs();const{tags:t}=this,s=this.tag;s.isSelfClosing=!0,this.openTagHandler?.(s),this.closeTagHandler?.(s),(this.tag=t[t.length-1]??null)===null&&(this.closedRoot=!0),this.state=q,this.name=""}closeTag(){const{tags:t,name:s}=this;if(this.state=q,this.name="",s==="")return this.fail("weird empty close tag."),void(this.text+="</>");const o=this.closeTagHandler;let n=t.length;for(;n-- >0;){const a=this.tag=t.pop();if(this.topNS=a.ns,o?.(a),a.name===s)break;this.fail("unexpected close tag.")}n===0?this.closedRoot=!0:n<0&&(this.fail(`unmatched closing tag: ${s}.`),this.text+=`</${s}>`)}parseEntity(t){if(t[0]!=="#"){const o=this.ENTITIES[t];return o!==void 0?o:(this.fail(this.isName(t)?"undefined entity.":"disallowed character in entity name."),`&${t};`)}let s=NaN;return t[1]==="x"&&/^#x[0-9a-f]+$/i.test(t)?s=parseInt(t.slice(2),16):/^#[0-9]+$/.test(t)&&(s=parseInt(t.slice(1),10)),this.isChar(s)?String.fromCodePoint(s):(this.fail("malformed character entity."),`&${t};`)}}var Ae,Tt;(Tt=Ae||(Ae={})).Events={XmlDecl:"xmldecl",Text:"text",ProcessingInstruction:"processinginstruction",Doctype:"doctype",Comment:"comment",OpenTagStart:"opentagstart",Attribute:"attribute",OpenTag:"opentag",CloseTag:"closetag",CDdata:"cdata",Error:"error",End:"end",Ready:"ready"},Tt.parseStream=async(i,t,s)=>{const o=new Rs({position:!1,...s});let n;if(t.onOpenTagStart&&o.on(Tt.Events.OpenTagStart,t.onOpenTagStart),t.onOpenTag&&o.on(Tt.Events.OpenTag,t.onOpenTag),t.onCloseTag&&o.on(Tt.Events.CloseTag,t.onCloseTag),t.onAttribute&&o.on(Tt.Events.Attribute,t.onAttribute),t.onText&&o.on(Tt.Events.Text,t.onText),t.onError&&o.on(Tt.Events.Error,t.onError),t.onEnd){t.onEnd;const a=()=>{n=t.onEnd()};o.on(Tt.Events.End,a)}for(;;){const{value:a,done:c}=await i.read();if(c)break;o.write(a)}return o.close(),n};const v=i=>i===!0||i==="1"||i==="on"||i==="true"||i!==!1&&i!=="0"&&i!=="off"&&i!=="false"&&null,E=i=>{const t=parseInt(i);return isNaN(t)?null:t},ct=i=>{const t=parseFloat(i);return isNaN(t)?null:t},A=null;class $s{constructor(){this._registeredVisitors=new Map}registerVisitor(t){this._registeredVisitors.set(t.from,t)}createEventHandler(t,s,o){const n=this._registeredVisitors,a=[];let c=null,T=null,S=null,x=null;const w=[],D={key:null,source:t};let b=null,d=!1;const P=(y,m)=>{let V=S.attributes[y];if(m){if(Array.isArray(m)){for(let H=0;H<m.length;H++)if(V==null||(V=m[H](V),V==null))return}else if(V==null||(V=m(V),V==null))return}return V},f={getSource:()=>b.source,setSource:y=>{b.source=y},setKey:y=>{b.key=y},getFrom:()=>S,getAttribute:(y,m)=>P(y,m)??null,hasAttribute:y=>f.getAttribute(y)!==null,getParent:()=>w[w.length-2].source,getPath:()=>{const y=[];for(let m=0;m<a.length;m++)y.push(a[m].local);return y.join("\\")},parseAttribute:P,copyToObject:(y,m,V,H)=>{const W=P(H??m,V);W!==void 0&&(y[m]=W)},copyTo:(y,m,V)=>{const H=P(V??y,m);H!==void 0&&(b.source[y]=H)},warn:y=>{o?o?.(y):console.warn(y)}};return{onOpenTag:y=>{let m=y.name;const V=m.indexOf(":");V!==-1&&(m=m.slice(V+1));const H=n.get(m);if(c={local:m,visitor:H,tag:y,destination:null},d)return a.push(c),T=m,void(S=y);x=c?.visitor??null,H&&(b=a.length===0?D:x?.to!==null?{key:null,source:{}}:null,c.destination=b,b&&w.push(b)),a.push(c),T=m,S=y,d=x?.to===null,x?.openTag?.(f)},onCloseTag:y=>{let m=y.name;const V=m.indexOf(":");if(V!==-1&&(m=m.slice(V+1)),m!==T)throw new Error(`mismatch open/close tag: '${m}'/'${T}'`);d||x?.closeTag?.(f);const H=a.pop()??null;c=a[a.length-1]??null;const W=H?.destination;if(W){w.pop(),b=w[w.length-1]??D;const ht=H.visitor;ht&&ht.to&&W.source!==void 0&&(Array.isArray(ht.to)?b.source.push?b.source.push(W.source):o?.(`Unable to parse array for ${ht.from} at ${f.getPath()}`):W.key?b.source[W.key]=W.source:typeof ht.to=="string"&&(b.source[ht.to]=W.source))}T=c?.local??null,S=c?.tag??null,x=c?.visitor??null,d=!c?.destination},onText:y=>{x?.text?.(y,f)},onEnd:s}}}const is=(i,t,s,o=null)=>{if(!i)return null;let n=i;n.startsWith("/")&&(n=n.substring(1));let a=o?.parsedRefs?.get(i);if(a!==void 0)return a;const c=t(n);if(!c)return null;let T=c.content;try{s&&(T=s(T))}catch(S){console.warn(S)}return o?.parsedRefs?.set(i,T),T},Ee=(i,t,s,o,n=null)=>{if(!i)return null;let a=i;a.startsWith("/")&&(a=a.substring(1));let c=n?.parsedRefs?.get(i);if(c!==void 0)return c;const T=t(a);if(!T)return null;const S=T.content;try{const x=new TextDecoder().decode(S),w=s.parseFromString(x,"text/xml"),D=o.convert(w,i,n);return n?.parsedRefs?.set(i,D),D}catch(x){console.warn(x)}return null},zt=(i,t,s,o,n=null)=>{const a=new Map;let c=t.Directory[i];const T=c?c.length:0;for(let S=0;S<T;S++){const x=c[S];if(!x)continue;let w=x;w.startsWith("/")&&(w=w.substring(1));const D=Ee(w,b=>t.files[b],s,o,n);a.set(w,D)}return a},Fs=["lt1","dk1","lt2","dk2","accent1","accent2","accent3","accent4","accent5","accent6","hlink","folHlink"],De=(i,t="dk1")=>{let s;const o=i("auto");o===void 0||o!=="1"&&o!=="true"||(s=t);const n=i("indexed");n&&(s=`index${n}`);const a=i("rgb");a&&(s=a.toLowerCase(),a.length!==8||a.startsWith("FF")||(s="FF"+a.substring(2,a.length)));const c=i("theme");c&&(s=Fs[c]);let T=i("tint");if(T&&(s+=` ${u.IColor.AdjustmentType.ETint} ${parseFloat(T)}`),s)return s},cs=i=>i&&i.replace(/^\{([\s\S]+)\}$/,"$1"),hs=i=>i==="true"||i==="1";class Ht{static{this.Collapsed=1}static{this.CustomFormat=2}static{this.CustomHeight=4}static{this.Hidden=8}static{this.Ht=16}static{this.OutlineLevel=32}static{this.Ph=64}static{this.R=128}static{this.S=256}static{this.Spans=512}static{this.ThickBot=1024}static{this.ThickTop=2048}}const Ms=(i,t,s)=>{if(i[0].value[0]===i[1].value[0])return t},os={colStart:0,colEnd:0,rowStart:0,rowEnd:0},js=Object.freeze(Object.defineProperty({__proto__:null,fromBufferXLSX:async(i,t)=>{const{password:s,onWarning:o,constructorOptions:n={},...a}=t??{},c=Promise.resolve().then(()=>require("./vgm3myHD1SVA4Oal.cjs")),T=Promise.resolve().then(()=>require("./DdBweIBk4jEt5Tue.cjs"));let S=null;try{S=new DOMParser}catch{}let x=null;S||(x=Promise.resolve().then(()=>require("./Nw__gRJX4sl4Tt7R.cjs")).then(d=>d.i));let w=null,D=null,b=null;try{const d=await Promise.all([c,T,x]);w=d[0],D=d[1],b=d[2]}catch(d){throw new Error("Unable to load XLSX parser.",{cause:d})}try{const d=w.read(i,{type:"array",sheets:[],cellStyles:!1,bookFiles:!0});if(!d.Directory)throw new Error("Unable to parse as an Excel document. Try to save as '.xlsx' and try again.");d.Directory.richstructure=["/xl/richData/rdrichvaluestructure.xml"],d.Directory.richdata=["/xl/richData/rdrichvalue.xml"];const P=new D.FromOOXMLConverter,f=S??new b.DOMParser,y=n?.resources??new u.ResourceCollection,m=y.beginPersist(),V={},H=new Set,W=new Map;W.set("richTypes",[]);const ht=new Map,Pe=[],ne=I=>d.files[I],fe=(I,z)=>{const Y=I.lastIndexOf("/"),ut=I.substring(0,Y+1)+"_rels/"+I.substring(Y+1,I.length)+".rels";let dt=z.get(ut);return dt||(dt=(($,be,xe,we,Xt=null)=>{if(!$)return null;const tt=Ee($,be,xe,we,Xt);if(!tt)return null;const et=new Map,bt=Object.keys(tt),Bt=bt.length;for(let xt=0;xt<Bt;xt++){const qt=bt[xt],kt=tt[qt];et.set(qt,kt)}return et})(ut,ne,f,P,yt),z.set(ut,dt)),dt},ae=(I,z,Y,ut=ht)=>{let dt=fe(z,ut).get(I),$=dt?.target;if(!$)return null;if(dt.targetMode==="External")return dt.target;const be=z.lastIndexOf("/"),xe=z.substring(0,be+1);$.startsWith("/")||($=xe+$),$=(tt=>{const et=tt.split(/\/+/);return et.reduce((bt,Bt,xt)=>(Bt==="."?bt.splice(xt,1):Bt===".."&&bt.splice(xt-1,2),bt),et).join("/")})($);const we=P?.getVisitorParamsState().get("dxfs");let Xt=ut.get($);if(!Xt)if(dt.type==="http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet"){const tt={};Xt=tt;const et=async()=>{const bt=((N,G,Qt,_,Z,J,wt)=>{const h=new $s,Q=new u.Tuple.TransposedBuilder;let j=null;h.registerVisitor({from:"autoFilter",to:"filter",openTag:e=>{e.copyTo("ref",A)}}),h.registerVisitor({from:"conditionalFormatting",to:{},openTag:e=>{const r=e.getParent();r.conditionals||(r.conditionals=[]),r.conditionals.push(e.getSource());const l=e.getAttribute("sqref");l&&(e.getSource().ref=l.split(" ").join(",")),e.copyTo("pivot",v)},closeTag:e=>{const r=e.getSource();if(r.rule){const l=Object.keys(r.rule);for(let p=0;p<l.length;p++){const C=l[p];C!=="rule"&&(r[C]=r.rule[C])}}delete r.rule}}),h.registerVisitor({from:"cfRule",to:"rule",openTag:e=>{const r=e.getParent();e.copyToObject(r,"type",A),e.copyToObject(r,"priority",E),e.copyToObject(r,"stopIfTrue",v);const l=e.getAttribute("dxfId",E);if(l!==null){let p=_?.get(l);p||(J?.(`Unable to load conditional color. Invalid dxfI: '${l}' at '${e.getPath()}'.`),p={}),r.style=p}e.copyToObject(r,"aboveAverage",v),e.copyToObject(r,"equalAverage",v),e.copyToObject(r,"stdDev",E),e.copyToObject(r,"bottom",v),e.copyToObject(r,"percent",v),e.copyToObject(r,"rank",E),e.copyToObject(r,"operator",A),e.copyToObject(r,"text",A),e.copyToObject(r,"timePeriod",A)}}),h.registerVisitor({from:"colorScale",to:"colorScale"}),h.registerVisitor({from:"dataBar",to:"dataBar",openTag:e=>{e.copyTo("maxLength",E),e.copyTo("minLength",E),e.copyTo("showValue",v)}}),h.registerVisitor({from:"iconSet",to:"iconSet",openTag:e=>{e.copyTo("iconSet",A),e.copyTo("reverse",v),e.copyTo("showValue",v)}}),h.registerVisitor({from:"formula",to:null,text:(e,r)=>{const l=r.getParent();let p=l.formulas;p||(p=[],l.formulas=p),p.push(e)}}),h.registerVisitor({from:"cfvo",to:{},openTag:e=>{const r=e.getParent();r.conditions||(r.conditions=[]),r.conditions.push(e.getSource()),e.copyTo("type",A),e.copyTo("value",ct,"val"),e.copyTo("gte",v)}}),h.registerVisitor({from:"color",to:{},openTag:e=>{const r=e.getParent();r.colors||(r.colors=[]);const l=De(p=>e.getAttribute(p));r.colors.push(l)}}),h.registerVisitor({from:"filterColumn",to:"filterColumn",openTag:e=>{const r=e.getParent();r.fields||(r.fields=[]),r.fields.push(e.getSource()),e.copyTo("offset",E,"colId"),e.copyTo("hiddenButton",v),e.copyTo("showButton",v)}}),h.registerVisitor({from:"colorFilter",to:"colorFilter",openTag:e=>{const r=e.getParent();r.criteria||(r.criteria=[]),r.criteria.push(e.getSource()),e.getSource().type=u.IAutoFilter.Type.Color,e.copyTo("cellColor",v),e.copyTo("styleId",E,"dxfId")}}),h.registerVisitor({from:"dynamicFilter",to:"dynamicFilter",openTag:e=>{const r=e.getParent();r.criteria||(r.criteria=[]),r.criteria.push(e.getSource()),e.getSource().type=u.IAutoFilter.Type.Dynamic,e.copyTo("dynamicType",A,"type"),e.copyTo("val",ct),e.copyTo("maxVal",ct,"maxVal")}}),h.registerVisitor({from:"iconFilter",to:"iconFilter",openTag:e=>{const r=e.getParent();r.criteria||(r.criteria=[]),r.criteria.push(e.getSource()),e.getSource().type=u.IAutoFilter.Type.Icon,e.copyTo("iconId",E),e.copyTo("iconSet",A)}}),h.registerVisitor({from:"top10",to:"top10",openTag:e=>{const r=e.getParent();r.criteria||(r.criteria=[]),r.criteria.push(e.getSource()),e.getSource().type=u.IAutoFilter.Type.Top10,e.copyTo("filterVal",ct),e.copyTo("percent",v),e.copyTo("top",v),e.copyTo("val",ct)}}),h.registerVisitor({from:"filters",to:"filters",openTag:e=>{const r=e.getParent();r.criteria||(r.criteria=[]),r.criteria.push(e.getSource()),e.getSource().type=u.IAutoFilter.Type.Items,e.copyTo("blank",v),e.copyTo("calendarType",A)}}),h.registerVisitor({from:"dateGroupItem",to:"dateGroupItem",openTag:e=>{const r=e.getParent();r.dateGroups||(r.dateGroups=[]),r.dateGroups.push(e.getSource()),e.copyTo("group",A,"dateTimeGrouping"),e.copyTo("day",E),e.copyTo("hour",E),e.copyTo("minute",E),e.copyTo("month",E),e.copyTo("second",E),e.copyTo("year",E)}}),h.registerVisitor({from:"filter",to:"filter",openTag:e=>{const r=e.getParent();r.items||(r.items=[]),r.items.push(e.getAttribute("val",ct))}}),h.registerVisitor({from:"customFilters",to:"customFilters",openTag:e=>{const r=e.getParent();r.criteria||(r.criteria=[]),r.criteria.push(e.getSource()),e.getSource().type=u.IAutoFilter.Type.Custom,e.copyTo("and",v)}}),h.registerVisitor({from:"customFilter",to:"customFilter",openTag:e=>{const r=e.getParent();r.filters||(r.filters=[]),r.filters.push(e.getSource()),e.copyTo("operator",A),e.copyTo("value",ct,"val")}}),h.registerVisitor({from:"sortState",to:"sort",openTag:e=>{e.copyTo("ref",A)}}),h.registerVisitor({from:"sortCondition",to:"sortCondition",openTag:e=>{const r=e.getParent();r.fields||(r.fields=[]);const l=e.getSource();r.fields.push(l),e.copyTo("sortOn",A,"sortBy"),e.copyTo("dxfId",A,"sortBy"),e.copyTo("iconSet",A),e.copyTo("customList",A);const p=e.getAttribute("ref");if(p){const C=u.AddressUtils.fastStringToRange(p,os).colStart,pt=u.AddressUtils.fastStringToRange(r.ref,os),rt=pt.colStart;l.offset=pt?C-rt:C}l.reverse=e.getAttribute("descending",v)??!1}}),h.registerVisitor({from:"AlternateContent",to:null});const ue=e=>{j=e.getSource(),e.copyTo("topLeft",A,"topLeftCell");const r=hs(e.getAttribute("defaultGridColor")),l=e.getAttribute("colorId");l===null||r||(e.getSource().gridLineColor="index"+parseFloat(l)),e.copyTo("showZeros",v),e.copyTo("showFormulas",v),e.copyTo("zoomScale",E),e.copyTo("showRowHeaders",v,"showRowColHeaders"),e.copyTo("showColumnHeaders",v,"showRowColHeaders"),e.copyTo("showRowGridlines",v,"showGridLines"),e.copyTo("showColumnGridlines",v,"showGridLines")};h.registerVisitor({from:"sheetView",to:"view",openTag:e=>{ue(e)},closeTag:()=>{j=null}}),h.registerVisitor({from:"customSheetViews",to:"customSheetViews",openTag:e=>{e.setSource([])}}),h.registerVisitor({from:"customSheetView",to:[],openTag:e=>{ue(e)},closeTag:()=>{j=null}}),h.registerVisitor({from:"selection",to:"selection",openTag:e=>{if(!j)return;e.copyTo("cell",A,"activeCell"),e.copyTo("rangeIndex",E,"activeCellId");const r=e.getAttribute("activeCell"),l=e.getAttribute("sqref");l&&l!==r&&(e.getSource().ranges=l.split(" "))}}),h.registerVisitor({from:"pane",to:"pane",openTag:e=>{if(j&&e.getAttribute("state")==="frozen"){const r={};j.freezePanes=r,e.copyToObject(r,"topLeft",A,"topLeftCell");const l=j.topLeft?u.AddressUtils.fastStringToCell(j.topLeft):{colIndex:0,rowIndex:0},p={colIndex:0,rowIndex:0};e.copyToObject(p,"colIndex",E,"xSplit"),e.copyToObject(p,"rowIndex",E,"ySplit");const C={colIndex:l.colIndex+p.colIndex,rowIndex:l.rowIndex+p.rowIndex};r.coords=u.AddressUtils.cellToString(C)}}}),h.registerVisitor({from:"tabColor",to:null,openTag:e=>{const r=De(l=>e.getAttribute(l));r&&(N.tabColor=r)}}),h.registerVisitor({from:"pageSetUpPr",to:"pageSetUpPr",openTag:e=>{}}),h.registerVisitor({from:"outlinePr",to:"outlinePr",openTag:e=>{}}),h.registerVisitor({from:"pageMargins",to:"pageMargins",openTag:e=>{}}),h.registerVisitor({from:"pageSetup",to:"pageSetup",openTag:e=>{}}),h.registerVisitor({from:"printOptions",to:"printOptions",openTag:e=>{}}),h.registerVisitor({from:"mergeCells",to:"merges",openTag:e=>{e.setSource([])}}),h.registerVisitor({from:"mergeCell",to:[],openTag:e=>{const r=e.getAttribute("ref");e.setSource(r)}}),h.registerVisitor({from:"hyperlinks",to:"hyperlinks",openTag:e=>{e.setSource([])}}),h.registerVisitor({from:"hyperlink",to:[],openTag:e=>{const r=e.getAttribute("r:id"),l=e.getAttribute("ref");if(!l)return void console.warn("No ref found for hyperlink");e.setKey(l);let p=r?G(r):"";if(typeof p!="string")return void console.warn("Invalid address ",p);const C=e.getAttribute("location");p.endsWith("\\")&&(p=p.substring(0,p.length-1));const pt=e.getAttribute("location");if(pt&&(C&&C!==pt&&console.warn("display and location are different",C,pt),p+="#"+pt),!p)return void console.warn("No address found for hyperlink. r:id",r);let rt;const At=e.getAttribute("tooltip");rt=At?{address:p,tooltip:At}:p,e.setSource({r:l,v:rt})}}),h.registerVisitor({from:"drawing",to:"movables",openTag:e=>{const r=e.getAttribute("r:id");if(!r)return;const l=G(r);l?e.setSource(l.movables):console.warn("no drawing found for rId",r)}}),h.registerVisitor({from:"tableParts",to:"tables",openTag:e=>{e.setSource([])}}),h.registerVisitor({from:"tablePart",to:[],openTag:e=>{const r=e.getAttribute("r:id");if(!r)return;const l=G(r);l?e.setSource(l):console.warn("no table found for rId",r)}}),h.registerVisitor({from:"worksheet",to:"worksheet",openTag:e=>{}}),h.registerVisitor({from:"sheetProtection",to:"protection",openTag:e=>{let r=!1;if(e.hasAttribute("sheet")&&v(e.getAttribute("sheet"))&&(r=!0),!r)return void e.setSource(void 0);const l=C=>C===!0||C==="1"||C==="on"||C==="true"||C===!1||C==="0"||C==="off"||C==="false"||null;e.copyTo("autoFilter",l),e.copyTo("deleteColumns",l),e.copyTo("formatCells",l),e.copyTo("formatColumns",l),e.copyTo("formatRows",l),e.copyTo("insertColumns",l),e.copyTo("insertHyperlinks",l),e.copyTo("insertRows",l),e.copyTo("objects",l),e.copyTo("pivotTables",l),e.copyTo("scenarios",l),e.copyTo("selectUnlockedCells",l),e.copyTo("selectUnlockedCells",l),e.copyTo("sort",l);const p={};e.copyToObject(p,"hash",A,"hashValue"),e.copyToObject(p,"algorithm",A,"algorithmName"),e.copyToObject(p,"salt",A,"saltValue"),e.copyToObject(p,"spinCount",E),Object.keys(p).length>0&&(e.getSource().password=p)}}),h.registerVisitor({from:"protectedRanges",to:"protectedRanges",openTag:e=>{e.setSource({})}}),h.registerVisitor({from:"protectedRange",to:{},openTag:e=>{const r=e.getAttribute("sqref");e.setKey(r),e.copyTo("name"),e.copyTo("securityDescriptor");const l={};e.copyToObject(l,"hash",A,"hashValue"),e.copyToObject(l,"algorithm",A,"algorithmName"),e.copyToObject(l,"salt",A,"saltValue"),e.copyToObject(l,"spinCount",E),Object.keys(l).length>0&&(e.getSource().password=l)}}),h.registerVisitor({from:"sheetFormatPr",to:"sheetFormatPr",openTag:e=>{e.copyToObject(N,"defaultColSize",ct,"defaultColWidth"),e.copyToObject(N,"outlineLevelCol",E,"outlineLevelCol");const r=e.getAttribute("customHeight");r!=="1"&&r!=="true"||e.copyToObject(N,"defaultRowSize",ct,"defaultRowHeight"),e.copyToObject(N,"outlineLevelRow",E,"outlineLevelRow")}}),h.registerVisitor({from:"cols",to:"cols",openTag:e=>{e.setSource([])}}),h.registerVisitor({from:"col",to:[],openTag:e=>{e.copyTo("min",r=>parseInt(r)-1),e.copyTo("max",r=>parseInt(r)-1),e.copyTo("sz",ct,"width"),e.copyTo("cs",v,"customWidth"),e.copyTo("h",v,"hidden"),e.copyTo("l",E,"outlineLevel"),e.copyTo("s",E,"style")}}),h.registerVisitor({from:"oleObjects",to:null,openTag:e=>{e.warn("'OLE Objects' are not supported.")}});let Kt=null;const Ts={onOpenTag:e=>{Kt===null&&(Kt="")},onText:e=>{Kt+=e},onEnd:()=>{const e=Qt(Kt);return Kt=null,e},onError:e=>{}};return((e,r,l,p,C,pt)=>{let rt=!1,At=!1,Wt=[],_t=!1,Et=null,Yt=null,de=null,nt=null,$e=null,Fe=null;const ys=pt?.get("richData")??[],Me=u.AddressUtils.normalizeA1ToR1C1,je=u.CoordUtils.createConflatingRanges(),He=new Map,ve=[];let te=null;const Xe=u.CoordUtils.createConflatingRanges();let ee,Dt=!1,B=-1,K=-1,gt=null,se=null;const Se=[];let Ce=null,Be=-2,ft=0,Ut="",Pt="",It="",Ot="",Vt="",Nt="",Lt="",qe="",We="",_e="",Ue="",ze="",Ge="",Ze="",mt=!0,Rt=null;return{...l,onEnd:()=>{Se.length>0&&(r.rows=Se);let g=je.done(Ms);const k=g.length;if(k>0){const F=new Array(k);for(let L=0;L<k;L++){const at=g[L],$t=u.AddressUtils.rangeToString(at),Ft=at.value[1],ie=u.AddressUtils.resolveRelativeToA1(Ft,at.rowStart,at.colStart);F[L]=[$t,ie]}r.formulas=F}const st=Xe.done(!0),R=st.length;if(R>0){const F=new Array(R);for(let L=0;L<R;L++){const at=st[L],$t=u.AddressUtils.rangeToString(at);F[L]=$t}r.volatile=F}if(ve.length>0&&(r.dynamicArray=[...ve]),Wt.length>0){Wt.sort(u.CoordUtils.createRangeComparator(u.IRange.Orientation.Column));const F=[];let L=null,at=-1,$t=-1,Ft=-1,ie=-1,vt=null;const Je=Wt.length;Je>0&&(L=Wt[0],at=L.colStart,$t=L.colEnd,Ft=L.rowEnd,ie=L.value,F.push(L));for(let Mt=1;Mt<Je;Mt++)vt=Wt[Mt],ie!==vt.value||at!==vt.colStart||$t!==vt.colEnd||Ft+1!==vt.rowEnd?(F.push(vt),L=vt,at=L.colStart,$t=L.colEnd,Ft=L.rowEnd,ie=L.value):(Ft=vt.rowEnd,L.rowEnd=Ft);let Qe=[];for(let Mt=0;Mt<F.length;Mt++){const oe=F[Mt];Qe.push({r:{colStart:oe.colStart,colEnd:oe.colEnd,rowStart:oe.rowStart,rowEnd:oe.rowEnd},v:oe.value})}r.directStyles=Qe}const it=e.build();if(it){const F=it.tuples;r.data=F}l?.onEnd?.()},onOpenTag:g=>{let k=g.name;const st=k.indexOf(":");if(st!==-1&&(k=k.slice(st+1)),ee){const R=g.attributes;switch(k){case"v":At=!0;break;case"f":switch(R.t??null){case null:case"normal":_t=!0;break;case"shared":const it=R.si;Yt=R.ref,Et=it;break;case"array":_t=!0,Yt=R.ref,te=[Yt,!1];break;case"datatable":_t=!0,Yt=R.ref,_t=!0}R.ca!==void 0&&Xe.append(B,K);break;case"is":return void(Dt=!0)}return void(Dt&&C?.onOpenTag(g))}if(rt){if(k==="c"){ee=g;const R=g.attributes.r;K=u.AddressUtils.fastStringToCol(R);const it=g.attributes.t;it===void 0?se=null:(se=it,se==="str"&&(Dt=!0));let F=g.attributes.s;F!==void 0&&(F=parseInt(F),Rt&&Rt.value===F&&Rt.colEnd+1===K?Rt.colEnd=K:(Rt={colStart:K,rowStart:B,colEnd:K,rowEnd:B,value:F},Wt.push(Rt)))}}else{if(k==="row"){rt=!0;const R=g.attributes.r;if(B=parseInt(R)-1,ft=0,Pt=g.attributes.customHeight,Pt!==void 0&&(ft|=Ht.CustomHeight),Pt!==We&&(mt=!0,We=Pt),Ut=g.attributes.ht,Ut!==void 0&&(ft|=Ht.Ht),Ut!==qe&&(mt=!0,qe=Ut),It=g.attributes.hidden,It!==void 0&&(ft|=Ht.Hidden),It!==_e&&(mt=!0,_e=It),Vt=g.attributes.s,Vt!==void 0&&(ft|=Ht.S),Vt!==ze&&(mt=!0,ze=Vt),Ot=g.attributes.customFormat,Ot!==void 0&&(ft|=Ht.CustomFormat),Ot!==Ue&&(mt=!0,Ue=Ot),Nt=g.attributes.outlineLevel,Nt!==void 0&&(ft|=Ht.OutlineLevel),Nt!==Ge&&(mt=!0,Ge=Nt),Lt=g.attributes.collapsed,Lt!==void 0&&(ft|=Ht.Collapsed),Lt!==Ze&&(mt=!0,Ze=Lt),ft!==0)if(Be+1!==B||mt){const it=Pt!==void 0&&(Pt==="1"||Pt==="true"),F=Ot!==void 0&&(Ot==="1"||Ot==="true");Ce={min:B,max:B,sz:it&&Ut!==void 0?parseFloat(Ut):-1,csz:it,h:It!==void 0&&(It==="1"||It==="true"),s:it&&Vt!==void 0&&Vt!=="0"?parseInt(Vt):0,cs:F,l:Nt===void 0||Nt==="0"?0:parseInt(Nt),cl:Lt!==void 0&&(Lt==="1"||Lt==="true")},Se.push(Ce)}else Ce.max=B;return Be=B,void(mt=!1)}l?.onOpenTag(g)}},onCloseTag:g=>{if(ee){let k=g.name;const st=k.indexOf(":");if(st!==-1&&(k=k.slice(st+1)),Dt)if(k==="is"||k==="v"){const R=C?.onEnd();R!==null&&e.addValue(B,K,""+R)}else C?.onCloseTag?.(g);return At&&(At=!1),void(k==="c"&&(ee=null,Dt=!1))}if(rt)return rt=!1,void(Rt=null);l?.onCloseTag(g)},onText:g=>{if(g=g.trim(),At){switch(gt=null,se){case null:case"n":gt=parseFloat(g);break;case"b":gt=g==="1"||g==="true";break;case"s":gt=g;break;case"e":if(g==="#VALUE!"){const st=ee.attributes.vm;if(st!==void 0){const R=ys[parseInt(st)-1];if(R&&R.isFormulaError){gt={t:u.ScalarType.Error,v:R.getCode()};break}}}const k=u.FormulaError.getBuiltInByLabel(g);k?gt={t:u.ScalarType.Error,v:k.getCode()}:(gt=g,p?.(`Unknown formula error '${g}' in cell ${u.AddressUtils.cellToString({colIndex:K,rowIndex:B})}`));break;case"str":case"inlineStr":Dt=!0}gt!==null&&e.addValue(B,K,gt)}if(te&&(se==="e"&&(te[1]=!0),ve.push(te),te=null),Et)if($e===Et)nt=Fe;else{if(nt=He.get(Et),!nt){const k=[];de=Me(g,B,K,k),nt=[de,k,g],He.set(Et,nt)}$e=Et,Fe=nt}if(_t){const k=[];de=Me(g,B,K,k),nt=[de,k,g]}if(nt)return je.append(B,K,nt),nt=null,_t=!1,Et=null,void(Yt=null);Dt?C?.onText(g):rt||l?.onText(g)}}})(Q,N,h.createEventHandler(N,()=>{},J),J,Ts,wt)})(tt,(N,G=!1)=>ae(N,$,G)??null,ds,we,0,N=>{o&&(N=$+": "+N,o?.(N))},W),Bt=is($,ne),xt=await(async(N,G=8388608)=>{await(async()=>{if(typeof ReadableStream>"u")if(typeof window>"u"){const{ReadableStream:J}=await Promise.resolve().then(()=>require("./Dy6OQFVhwFO_v_rL.cjs"));global.ReadableStream=J}else console.warn("Browser does not support ReadableStream; consider loading a polyfill.")})();const Qt=new TextDecoder("utf-8");let _=0;const Z=N instanceof Uint8Array?N:new Uint8Array(N);return new ReadableStream({pull(J){if(_>=Z.byteLength)return void J.close();const wt=Z.subarray(_,Math.min(_+G,Z.byteLength)),h=Qt.decode(wt,{stream:_+G<Z.byteLength});J.enqueue(h),_+=wt.length}}).getReader()})(Bt);try{await Ae.parseStream(xt,bt,{xmlns:!1})}catch(N){throw console.warn(`Error parsing sheet: '${$}'`,N),new Error(`Error parsing sheet: '${$}'`,{cause:N})}const qt=fe($,ut);let kt,Re=new Map;if(qt){const N="http://schemas.microsoft.com/office/2017/10/relationships/threadedComment";let G;qt.forEach((_,Z)=>{_.type===N&&(kt=ae(Z,$,!1,ut)?.comments,kt&&kt.forEach(J=>{Re.set(J.id,J)}))});const Qt="http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments";if(qt.forEach((_,Z)=>{_.type===Qt&&(G=ae(Z,$,!1,ut))}),G||kt){const _=kt??[],Z=G?.comments;if(Z){const J=G?.authors;for(let wt=0;wt<Z.length;wt++){const h=Z[wt];let Q=h.authorId!==void 0?J[h.authorId]:void 0;if((!Q||Q.startsWith("tc="))&&(Q=cs(Q.substring(3)),Re.has(Q)))continue;let j=ce.get(Q);j||(j=Ve.get(Q)),j||(j={id:u.CommonUtils.uuidV4(),displayName:Q},Ve.set(j.displayName,j),ce.set(j.id,j)),Q=j?.id??null;const ue={id:u.CommonUtils.uuidV4(),personId:Q,ref:h.ref,done:!1,asNote:!0,content:h.content};_.push(ue)}}tt.comments=_}}};Pe.push(et())}else Xt=Y?is($,ne,tt=>{const et=y.add({buffer:tt});return et.addReference(V),H.add(et),m.toResourceId(et)},yt):Ee($,ne,f,P,yt);return Xt},yt={paramMap:W,getRefs:fe,getRef:ae,parsedRefs:ht,onWarning:o,addPerson:I=>null},le=[];let me=0;d.Strings&&(me=parseInt(d.Strings.Unique??d.Strings.length??0));const us=d.Strings??[];for(let I=0;I<me;I++)le.push(us[I]?.t??"");const Ie=new Map;let Oe=me;const ds=I=>{const z=Ie.get(I);if(z!==void 0)return z;const Y=Oe;return Ie.set(I,Oe++),le.push(I),Y},ce=(zt("richstructure",d,f,P,yt),zt("richdata",d,f,P,yt),new Map),Ve=new Map,Ne=zt("people",d,f,P);let Ct=null;if(Ne.size>0&&(Ct=Ne.entries().next()?.value?.[1]?.persons,Ct)){const I=Ct.length;for(let z=0;z<I;z++){const Y=Ct[z];ce.set(Y.id,Y),ce.set(Y.displayName,Y)}}const Te=zt("themes",d,f,P,yt);let Le=null;if(Te&&Te.entries){let I=Te.entries().next();I?.value?.[1]&&(Le=I.value[1])}const ps=new u.Theme(Le);let he=zt("styles",d,f,P,yt).entries().next()?.value[1];he&&(he=JSON.parse(u.JSONStableStringify(he)));const gs=zt("workbooks",d,f,P,yt);await Promise.all(Pe);const ye={...gs.entries().next().value[1],styles:he,theme:ps.toJSON()};le.length>0&&(ye.strings=le),Ct&&Ct.length>0&&(ye.people=Ct);const fs={...n,resources:y,json:ye},ms=new u.Workbook(fs);return H.forEach(I=>{I.deleteReference(V)}),m.endPersist(),ms}catch(d){let P="Unable to parse XLSX.";throw d instanceof u.OutOfBoundsError&&(P="Unable to open XLSX. There are too many rows or columns."),new Error(P,{cause:d})}},toBufferXLSX:async(i,t)=>{const s=await Promise.resolve().then(()=>require("./vgm3myHD1SVA4Oal.cjs")),o=await i.toJSON(!0),n=s.utils.book_new();for(let a=0;a<o.sheets.length;a++){const c=o.sheets[a],T=s.utils.json_to_sheet([{}]);s.utils.book_append_sheet(n,T,c.name);const S=c.sheet,x=i.getSheetAt(a),w=x.getUsedRange();if(w?(T["!ref"]=w.getA1(),w.forEach((D,b)=>{const d={t:"z"},P=b.getCell().getStyle();if(!P.isNormal()){let f=P.getNumberFormat();f!==u.NumberFormat.Type.General&&(f===u.NumberFormat.Type.ShortDate?f="m/d/yyyy":f===u.NumberFormat.Type.MediumDate?f="d-mmm-yy":f===u.NumberFormat.Type.LongDate?f="[$-x-sysdate]dddd, mmmm dd, yyyy":f===u.NumberFormat.Type.ShortTime?f="h:mm":f===u.NumberFormat.Type.MediumTime?f="h:mm AM/PM":f===u.NumberFormat.Type.LongTime&&(f="h:mm:ss AM/PM"),d.z=f)}if(D!==null)switch(b.getType()){case u.ScalarType.Number:d.t="n",d.v=D;break;case u.ScalarType.String:d.t="s",d.v=D;break;case u.ScalarType.Boolean:d.t="b",d.v=D;break;case u.ScalarType.Error:d.t="e",d.v=D.toString();case u.ScalarType.RichData:}T[b.getA1()]=d})):T["!ref"]="A1:A1",S.merges?.length>0){const D=[];T["!merges"]=D;for(let b=0;b<S.merges.length;b++)D.push(s.utils.decode_range(S.merges[b]))}if(S.cols?.length>0){const D=[];T["!cols"]=D;const b=S.cols,d={width:S.defaultColSize??x.getColumnWidthAsFontUnit(x.getColumnHeaders().getDefaultSize())};for(let P=0;P<b.length;P++){const f=b[P];for(let m=D.length;m<=f.min-1;m++)D.push(d);const y={};f.sz!==void 0&&(y.width=f.sz),f.h!==void 0&&(y.hidden=f.h),f.l!==void 0&&(y.level=f.l);for(let m=f.min;m<=f.max;m++)D.push(y)}}}return s.write(n,{type:"array",bookType:"xlsx"}),s.write(n,{type:"array",bookType:"xlsx"})}},Symbol.toStringTag,{value:"Module"}));exports.a=i=>parseFloat(i)/1e3,exports.b=hs,exports.c=i=>i?Ke.Yt.roundAccurately(parseFloat(i)/9525,1):null,exports.d=De,exports.i=js,exports.p=i=>parseFloat(i)/6e4,exports.r=cs,exports.t=i=>i?Ke.Yt.roundAccurately(parseFloat(i)/12700,4):null;
|
|
11
|
+
`),t=this.i;break;case O:o!==void 0&&(this.text+=s.slice(t));break t;default:U(a)||(n=!0)}}n&&(this.sawRoot||this.reportedTextBeforeRoot||(this.fail("text data outside of root node."),this.reportedTextBeforeRoot=!0),this.closedRoot&&!this.reportedTextAfterRoot&&(this.fail("text data outside of root node."),this.reportedTextAfterRoot=!0))}pushAttribNS(t,s){const{prefix:o,local:n}=this.qname(t),a={name:t,prefix:o,local:n,value:s};if(this.attribList.push(a),this.attributeHandler?.(a),o==="xmlns"){const c=s.trim();this.currentXMLVersion==="1.0"&&c===""&&this.fail("invalid attempt to undefine prefix in XML 1.0"),this.topNS[n]=c,ke(this,n,c)}else if(t==="xmlns"){const c=s.trim();this.topNS[""]=c,ke(this,"",c)}}pushAttribPlain(t,s){const o={name:t,value:s};this.attribList.push(o),this.attributeHandler?.(o)}end(){this.sawRoot||this.fail("document must contain a root element.");const{tags:t}=this;for(;t.length>0;){const o=t.pop();this.fail(`unclosed tag: ${o.name}`)}this.state!==0&&this.state!==q&&this.fail("unexpected end.");const{text:s}=this;return s.length!==0&&(this.textHandler?.(s),this.text=""),this._closed=!0,this.endHandler?.(),this._init(),this}resolve(t){let s=this.topNS[t];if(s!==void 0)return s;const{tags:o}=this;for(let n=o.length-1;n>=0;n--)if(s=o[n].ns[t],s!==void 0)return s;return s=this.ns[t],s!==void 0?s:this.opt.resolvePrefix?.(t)}qname(t){const s=t.indexOf(":");if(s===-1)return{prefix:"",local:t};const o=t.slice(s+1),n=t.slice(0,s);return(n===""||o===""||o.includes(":"))&&this.fail(`malformed name: ${t}.`),{prefix:n,local:o}}processAttribsNS(){const{attribList:t}=this,s=this.tag;{const{prefix:a,local:c}=this.qname(s.name);s.prefix=a,s.local=c;const T=s.uri=this.resolve(a)??"";a!==""&&(a==="xmlns"&&this.fail('tags may not have "xmlns" as prefix.'),T===""&&(this.fail(`unbound namespace prefix: ${JSON.stringify(a)}.`),s.uri=a))}if(t.length===0)return;const{attributes:o}=s,n=new Set;for(const a of t){const{name:c,prefix:T,local:S}=a;let x,w;T===""?(x=c==="xmlns"?Jt:"",w=c):(x=this.resolve(T),x===void 0&&(this.fail(`unbound namespace prefix: ${JSON.stringify(T)}.`),x=T),w=`{${x}}${S}`),n.has(w)&&this.fail(`duplicate attribute: ${w}.`),n.add(w),a.uri=x,o[c]=a}this.attribList=[]}processAttribsPlain(){const{attribList:t}=this,s=this.tag.attributes;for(const{name:o,value:n}of t)s[o]!==void 0&&this.fail(`duplicate attribute: ${o}.`),s[o]=n;this.attribList=[]}openTag(){this.processAttribs();const{tags:t}=this,s=this.tag;s.isSelfClosing=!1,this.openTagHandler?.(s),t.push(s),this.state=q,this.name=""}openSelfClosingTag(){this.processAttribs();const{tags:t}=this,s=this.tag;s.isSelfClosing=!0,this.openTagHandler?.(s),this.closeTagHandler?.(s),(this.tag=t[t.length-1]??null)===null&&(this.closedRoot=!0),this.state=q,this.name=""}closeTag(){const{tags:t,name:s}=this;if(this.state=q,this.name="",s==="")return this.fail("weird empty close tag."),void(this.text+="</>");const o=this.closeTagHandler;let n=t.length;for(;n-- >0;){const a=this.tag=t.pop();if(this.topNS=a.ns,o?.(a),a.name===s)break;this.fail("unexpected close tag.")}n===0?this.closedRoot=!0:n<0&&(this.fail(`unmatched closing tag: ${s}.`),this.text+=`</${s}>`)}parseEntity(t){if(t[0]!=="#"){const o=this.ENTITIES[t];return o!==void 0?o:(this.fail(this.isName(t)?"undefined entity.":"disallowed character in entity name."),`&${t};`)}let s=NaN;return t[1]==="x"&&/^#x[0-9a-f]+$/i.test(t)?s=parseInt(t.slice(2),16):/^#[0-9]+$/.test(t)&&(s=parseInt(t.slice(1),10)),this.isChar(s)?String.fromCodePoint(s):(this.fail("malformed character entity."),`&${t};`)}}var Ae,Tt;(Tt=Ae||(Ae={})).Events={XmlDecl:"xmldecl",Text:"text",ProcessingInstruction:"processinginstruction",Doctype:"doctype",Comment:"comment",OpenTagStart:"opentagstart",Attribute:"attribute",OpenTag:"opentag",CloseTag:"closetag",CDdata:"cdata",Error:"error",End:"end",Ready:"ready"},Tt.parseStream=async(i,t,s)=>{const o=new Rs({position:!1,...s});let n;if(t.onOpenTagStart&&o.on(Tt.Events.OpenTagStart,t.onOpenTagStart),t.onOpenTag&&o.on(Tt.Events.OpenTag,t.onOpenTag),t.onCloseTag&&o.on(Tt.Events.CloseTag,t.onCloseTag),t.onAttribute&&o.on(Tt.Events.Attribute,t.onAttribute),t.onText&&o.on(Tt.Events.Text,t.onText),t.onError&&o.on(Tt.Events.Error,t.onError),t.onEnd){t.onEnd;const a=()=>{n=t.onEnd()};o.on(Tt.Events.End,a)}for(;;){const{value:a,done:c}=await i.read();if(c)break;o.write(a)}return o.close(),n};const v=i=>i===!0||i==="1"||i==="on"||i==="true"||i!==!1&&i!=="0"&&i!=="off"&&i!=="false"&&null,E=i=>{const t=parseInt(i);return isNaN(t)?null:t},ct=i=>{const t=parseFloat(i);return isNaN(t)?null:t},A=null;class $s{constructor(){this._registeredVisitors=new Map}registerVisitor(t){this._registeredVisitors.set(t.from,t)}createEventHandler(t,s,o){const n=this._registeredVisitors,a=[];let c=null,T=null,S=null,x=null;const w=[],D={key:null,source:t};let b=null,d=!1;const P=(y,m)=>{let V=S.attributes[y];if(m){if(Array.isArray(m)){for(let H=0;H<m.length;H++)if(V==null||(V=m[H](V),V==null))return}else if(V==null||(V=m(V),V==null))return}return V},f={getSource:()=>b.source,setSource:y=>{b.source=y},setKey:y=>{b.key=y},getFrom:()=>S,getAttribute:(y,m)=>P(y,m)??null,hasAttribute:y=>f.getAttribute(y)!==null,getParent:()=>w[w.length-2].source,getPath:()=>{const y=[];for(let m=0;m<a.length;m++)y.push(a[m].local);return y.join("\\")},parseAttribute:P,copyToObject:(y,m,V,H)=>{const W=P(H??m,V);W!==void 0&&(y[m]=W)},copyTo:(y,m,V)=>{const H=P(V??y,m);H!==void 0&&(b.source[y]=H)},warn:y=>{o?o?.(y):console.warn(y)}};return{onOpenTag:y=>{let m=y.name;const V=m.indexOf(":");V!==-1&&(m=m.slice(V+1));const H=n.get(m);if(c={local:m,visitor:H,tag:y,destination:null},d)return a.push(c),T=m,void(S=y);x=c?.visitor??null,H&&(b=a.length===0?D:x?.to!==null?{key:null,source:{}}:null,c.destination=b,b&&w.push(b)),a.push(c),T=m,S=y,d=x?.to===null,x?.openTag?.(f)},onCloseTag:y=>{let m=y.name;const V=m.indexOf(":");if(V!==-1&&(m=m.slice(V+1)),m!==T)throw new Error(`mismatch open/close tag: '${m}'/'${T}'`);d||x?.closeTag?.(f);const H=a.pop()??null;c=a[a.length-1]??null;const W=H?.destination;if(W){w.pop(),b=w[w.length-1]??D;const ht=H.visitor;ht&&ht.to&&W.source!==void 0&&(Array.isArray(ht.to)?b.source.push?b.source.push(W.source):o?.(`Unable to parse array for ${ht.from} at ${f.getPath()}`):W.key?b.source[W.key]=W.source:typeof ht.to=="string"&&(b.source[ht.to]=W.source))}T=c?.local??null,S=c?.tag??null,x=c?.visitor??null,d=!c?.destination},onText:y=>{x?.text?.(y,f)},onEnd:s}}}const is=(i,t,s,o=null)=>{if(!i)return null;let n=i;n.startsWith("/")&&(n=n.substring(1));let a=o?.parsedRefs?.get(i);if(a!==void 0)return a;const c=t(n);if(!c)return null;let T=c.content;try{s&&(T=s(T))}catch(S){console.warn(S)}return o?.parsedRefs?.set(i,T),T},Ee=(i,t,s,o,n=null)=>{if(!i)return null;let a=i;a.startsWith("/")&&(a=a.substring(1));let c=n?.parsedRefs?.get(i);if(c!==void 0)return c;const T=t(a);if(!T)return null;const S=T.content;try{const x=new TextDecoder().decode(S),w=s.parseFromString(x,"text/xml"),D=o.convert(w,i,n);return n?.parsedRefs?.set(i,D),D}catch(x){console.warn(x)}return null},zt=(i,t,s,o,n=null)=>{const a=new Map;let c=t.Directory[i];const T=c?c.length:0;for(let S=0;S<T;S++){const x=c[S];if(!x)continue;let w=x;w.startsWith("/")&&(w=w.substring(1));const D=Ee(w,b=>t.files[b],s,o,n);a.set(w,D)}return a},Fs=["lt1","dk1","lt2","dk2","accent1","accent2","accent3","accent4","accent5","accent6","hlink","folHlink"],De=(i,t="dk1")=>{let s;const o=i("auto");o===void 0||o!=="1"&&o!=="true"||(s=t);const n=i("indexed");n&&(s=`index${n}`);const a=i("rgb");a&&(s=a.toLowerCase(),a.length!==8||a.startsWith("FF")||(s="FF"+a.substring(2,a.length)));const c=i("theme");c&&(s=Fs[c]);let T=i("tint");if(T&&(s+=` ${u.IColor.AdjustmentType.ETint} ${parseFloat(T)}`),s)return s},cs=i=>i&&i.replace(/^\{([\s\S]+)\}$/,"$1"),hs=i=>i==="true"||i==="1";class Ht{static{this.Collapsed=1}static{this.CustomFormat=2}static{this.CustomHeight=4}static{this.Hidden=8}static{this.Ht=16}static{this.OutlineLevel=32}static{this.Ph=64}static{this.R=128}static{this.S=256}static{this.Spans=512}static{this.ThickBot=1024}static{this.ThickTop=2048}}const Ms=(i,t,s)=>{if(i[0].value[0]===i[1].value[0])return t},os={colStart:0,colEnd:0,rowStart:0,rowEnd:0},js=Object.freeze(Object.defineProperty({__proto__:null,fromBufferXLSX:async(i,t)=>{const{password:s,onWarning:o,constructorOptions:n={},...a}=t??{},c=Promise.resolve().then(()=>require("./Bg1sVEitsy9Ktlo9.cjs")),T=Promise.resolve().then(()=>require("./CUn6t8lfcG9cPH1h.cjs"));let S=null;try{S=new DOMParser}catch{}let x=null;S||(x=Promise.resolve().then(()=>require("./oyaxmxAEZ4VTVk_8.cjs")).then(d=>d.i));let w=null,D=null,b=null;try{const d=await Promise.all([c,T,x]);w=d[0],D=d[1],b=d[2]}catch(d){throw new Error("Unable to load XLSX parser.",{cause:d})}try{const d=w.read(i,{type:"array",sheets:[],cellStyles:!1,bookFiles:!0});if(!d.Directory)throw new Error("Unable to parse as an Excel document. Try to save as '.xlsx' and try again.");d.Directory.richstructure=["/xl/richData/rdrichvaluestructure.xml"],d.Directory.richdata=["/xl/richData/rdrichvalue.xml"];const P=new D.FromOOXMLConverter,f=S??new b.DOMParser,y=n?.resources??new u.ResourceCollection,m=y.beginPersist(),V={},H=new Set,W=new Map;W.set("richTypes",[]);const ht=new Map,Pe=[],ne=I=>d.files[I],fe=(I,z)=>{const Y=I.lastIndexOf("/"),ut=I.substring(0,Y+1)+"_rels/"+I.substring(Y+1,I.length)+".rels";let dt=z.get(ut);return dt||(dt=(($,be,xe,we,Xt=null)=>{if(!$)return null;const tt=Ee($,be,xe,we,Xt);if(!tt)return null;const et=new Map,bt=Object.keys(tt),Bt=bt.length;for(let xt=0;xt<Bt;xt++){const qt=bt[xt],kt=tt[qt];et.set(qt,kt)}return et})(ut,ne,f,P,yt),z.set(ut,dt)),dt},ae=(I,z,Y,ut=ht)=>{let dt=fe(z,ut).get(I),$=dt?.target;if(!$)return null;if(dt.targetMode==="External")return dt.target;const be=z.lastIndexOf("/"),xe=z.substring(0,be+1);$.startsWith("/")||($=xe+$),$=(tt=>{const et=tt.split(/\/+/);return et.reduce((bt,Bt,xt)=>(Bt==="."?bt.splice(xt,1):Bt===".."&&bt.splice(xt-1,2),bt),et).join("/")})($);const we=P?.getVisitorParamsState().get("dxfs");let Xt=ut.get($);if(!Xt)if(dt.type==="http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet"){const tt={};Xt=tt;const et=async()=>{const bt=((N,G,Qt,_,Z,J,wt)=>{const h=new $s,Q=new u.Tuple.TransposedBuilder;let j=null;h.registerVisitor({from:"autoFilter",to:"filter",openTag:e=>{e.copyTo("ref",A)}}),h.registerVisitor({from:"conditionalFormatting",to:{},openTag:e=>{const r=e.getParent();r.conditionals||(r.conditionals=[]),r.conditionals.push(e.getSource());const l=e.getAttribute("sqref");l&&(e.getSource().ref=l.split(" ").join(",")),e.copyTo("pivot",v)},closeTag:e=>{const r=e.getSource();if(r.rule){const l=Object.keys(r.rule);for(let p=0;p<l.length;p++){const C=l[p];C!=="rule"&&(r[C]=r.rule[C])}}delete r.rule}}),h.registerVisitor({from:"cfRule",to:"rule",openTag:e=>{const r=e.getParent();e.copyToObject(r,"type",A),e.copyToObject(r,"priority",E),e.copyToObject(r,"stopIfTrue",v);const l=e.getAttribute("dxfId",E);if(l!==null){let p=_?.get(l);p||(J?.(`Unable to load conditional color. Invalid dxfI: '${l}' at '${e.getPath()}'.`),p={}),r.style=p}e.copyToObject(r,"aboveAverage",v),e.copyToObject(r,"equalAverage",v),e.copyToObject(r,"stdDev",E),e.copyToObject(r,"bottom",v),e.copyToObject(r,"percent",v),e.copyToObject(r,"rank",E),e.copyToObject(r,"operator",A),e.copyToObject(r,"text",A),e.copyToObject(r,"timePeriod",A)}}),h.registerVisitor({from:"colorScale",to:"colorScale"}),h.registerVisitor({from:"dataBar",to:"dataBar",openTag:e=>{e.copyTo("maxLength",E),e.copyTo("minLength",E),e.copyTo("showValue",v)}}),h.registerVisitor({from:"iconSet",to:"iconSet",openTag:e=>{e.copyTo("iconSet",A),e.copyTo("reverse",v),e.copyTo("showValue",v)}}),h.registerVisitor({from:"formula",to:null,text:(e,r)=>{const l=r.getParent();let p=l.formulas;p||(p=[],l.formulas=p),p.push(e)}}),h.registerVisitor({from:"cfvo",to:{},openTag:e=>{const r=e.getParent();r.conditions||(r.conditions=[]),r.conditions.push(e.getSource()),e.copyTo("type",A),e.copyTo("value",ct,"val"),e.copyTo("gte",v)}}),h.registerVisitor({from:"color",to:{},openTag:e=>{const r=e.getParent();r.colors||(r.colors=[]);const l=De(p=>e.getAttribute(p));r.colors.push(l)}}),h.registerVisitor({from:"filterColumn",to:"filterColumn",openTag:e=>{const r=e.getParent();r.fields||(r.fields=[]),r.fields.push(e.getSource()),e.copyTo("offset",E,"colId"),e.copyTo("hiddenButton",v),e.copyTo("showButton",v)}}),h.registerVisitor({from:"colorFilter",to:"colorFilter",openTag:e=>{const r=e.getParent();r.criteria||(r.criteria=[]),r.criteria.push(e.getSource()),e.getSource().type=u.IAutoFilter.Type.Color,e.copyTo("cellColor",v),e.copyTo("styleId",E,"dxfId")}}),h.registerVisitor({from:"dynamicFilter",to:"dynamicFilter",openTag:e=>{const r=e.getParent();r.criteria||(r.criteria=[]),r.criteria.push(e.getSource()),e.getSource().type=u.IAutoFilter.Type.Dynamic,e.copyTo("dynamicType",A,"type"),e.copyTo("val",ct),e.copyTo("maxVal",ct,"maxVal")}}),h.registerVisitor({from:"iconFilter",to:"iconFilter",openTag:e=>{const r=e.getParent();r.criteria||(r.criteria=[]),r.criteria.push(e.getSource()),e.getSource().type=u.IAutoFilter.Type.Icon,e.copyTo("iconId",E),e.copyTo("iconSet",A)}}),h.registerVisitor({from:"top10",to:"top10",openTag:e=>{const r=e.getParent();r.criteria||(r.criteria=[]),r.criteria.push(e.getSource()),e.getSource().type=u.IAutoFilter.Type.Top10,e.copyTo("filterVal",ct),e.copyTo("percent",v),e.copyTo("top",v),e.copyTo("val",ct)}}),h.registerVisitor({from:"filters",to:"filters",openTag:e=>{const r=e.getParent();r.criteria||(r.criteria=[]),r.criteria.push(e.getSource()),e.getSource().type=u.IAutoFilter.Type.Items,e.copyTo("blank",v),e.copyTo("calendarType",A)}}),h.registerVisitor({from:"dateGroupItem",to:"dateGroupItem",openTag:e=>{const r=e.getParent();r.dateGroups||(r.dateGroups=[]),r.dateGroups.push(e.getSource()),e.copyTo("group",A,"dateTimeGrouping"),e.copyTo("day",E),e.copyTo("hour",E),e.copyTo("minute",E),e.copyTo("month",E),e.copyTo("second",E),e.copyTo("year",E)}}),h.registerVisitor({from:"filter",to:"filter",openTag:e=>{const r=e.getParent();r.items||(r.items=[]),r.items.push(e.getAttribute("val",ct))}}),h.registerVisitor({from:"customFilters",to:"customFilters",openTag:e=>{const r=e.getParent();r.criteria||(r.criteria=[]),r.criteria.push(e.getSource()),e.getSource().type=u.IAutoFilter.Type.Custom,e.copyTo("and",v)}}),h.registerVisitor({from:"customFilter",to:"customFilter",openTag:e=>{const r=e.getParent();r.filters||(r.filters=[]),r.filters.push(e.getSource()),e.copyTo("operator",A),e.copyTo("value",ct,"val")}}),h.registerVisitor({from:"sortState",to:"sort",openTag:e=>{e.copyTo("ref",A)}}),h.registerVisitor({from:"sortCondition",to:"sortCondition",openTag:e=>{const r=e.getParent();r.fields||(r.fields=[]);const l=e.getSource();r.fields.push(l),e.copyTo("sortOn",A,"sortBy"),e.copyTo("dxfId",A,"sortBy"),e.copyTo("iconSet",A),e.copyTo("customList",A);const p=e.getAttribute("ref");if(p){const C=u.AddressUtils.fastStringToRange(p,os).colStart,pt=u.AddressUtils.fastStringToRange(r.ref,os),rt=pt.colStart;l.offset=pt?C-rt:C}l.reverse=e.getAttribute("descending",v)??!1}}),h.registerVisitor({from:"AlternateContent",to:null});const ue=e=>{j=e.getSource(),e.copyTo("topLeft",A,"topLeftCell");const r=hs(e.getAttribute("defaultGridColor")),l=e.getAttribute("colorId");l===null||r||(e.getSource().gridLineColor="index"+parseFloat(l)),e.copyTo("showZeros",v),e.copyTo("showFormulas",v),e.copyTo("zoomScale",E),e.copyTo("showRowHeaders",v,"showRowColHeaders"),e.copyTo("showColumnHeaders",v,"showRowColHeaders"),e.copyTo("showRowGridlines",v,"showGridLines"),e.copyTo("showColumnGridlines",v,"showGridLines")};h.registerVisitor({from:"sheetView",to:"view",openTag:e=>{ue(e)},closeTag:()=>{j=null}}),h.registerVisitor({from:"customSheetViews",to:"customSheetViews",openTag:e=>{e.setSource([])}}),h.registerVisitor({from:"customSheetView",to:[],openTag:e=>{ue(e)},closeTag:()=>{j=null}}),h.registerVisitor({from:"selection",to:"selection",openTag:e=>{if(!j)return;e.copyTo("cell",A,"activeCell"),e.copyTo("rangeIndex",E,"activeCellId");const r=e.getAttribute("activeCell"),l=e.getAttribute("sqref");l&&l!==r&&(e.getSource().ranges=l.split(" "))}}),h.registerVisitor({from:"pane",to:"pane",openTag:e=>{if(j&&e.getAttribute("state")==="frozen"){const r={};j.freezePanes=r,e.copyToObject(r,"topLeft",A,"topLeftCell");const l=j.topLeft?u.AddressUtils.fastStringToCell(j.topLeft):{colIndex:0,rowIndex:0},p={colIndex:0,rowIndex:0};e.copyToObject(p,"colIndex",E,"xSplit"),e.copyToObject(p,"rowIndex",E,"ySplit");const C={colIndex:l.colIndex+p.colIndex,rowIndex:l.rowIndex+p.rowIndex};r.coords=u.AddressUtils.cellToString(C)}}}),h.registerVisitor({from:"tabColor",to:null,openTag:e=>{const r=De(l=>e.getAttribute(l));r&&(N.tabColor=r)}}),h.registerVisitor({from:"pageSetUpPr",to:"pageSetUpPr",openTag:e=>{}}),h.registerVisitor({from:"outlinePr",to:"outlinePr",openTag:e=>{}}),h.registerVisitor({from:"pageMargins",to:"pageMargins",openTag:e=>{}}),h.registerVisitor({from:"pageSetup",to:"pageSetup",openTag:e=>{}}),h.registerVisitor({from:"printOptions",to:"printOptions",openTag:e=>{}}),h.registerVisitor({from:"mergeCells",to:"merges",openTag:e=>{e.setSource([])}}),h.registerVisitor({from:"mergeCell",to:[],openTag:e=>{const r=e.getAttribute("ref");e.setSource(r)}}),h.registerVisitor({from:"hyperlinks",to:"hyperlinks",openTag:e=>{e.setSource([])}}),h.registerVisitor({from:"hyperlink",to:[],openTag:e=>{const r=e.getAttribute("r:id"),l=e.getAttribute("ref");if(!l)return void console.warn("No ref found for hyperlink");e.setKey(l);let p=r?G(r):"";if(typeof p!="string")return void console.warn("Invalid address ",p);const C=e.getAttribute("location");p.endsWith("\\")&&(p=p.substring(0,p.length-1));const pt=e.getAttribute("location");if(pt&&(C&&C!==pt&&console.warn("display and location are different",C,pt),p+="#"+pt),!p)return void console.warn("No address found for hyperlink. r:id",r);let rt;const At=e.getAttribute("tooltip");rt=At?{address:p,tooltip:At}:p,e.setSource({r:l,v:rt})}}),h.registerVisitor({from:"drawing",to:"movables",openTag:e=>{const r=e.getAttribute("r:id");if(!r)return;const l=G(r);l?e.setSource(l.movables):console.warn("no drawing found for rId",r)}}),h.registerVisitor({from:"tableParts",to:"tables",openTag:e=>{e.setSource([])}}),h.registerVisitor({from:"tablePart",to:[],openTag:e=>{const r=e.getAttribute("r:id");if(!r)return;const l=G(r);l?e.setSource(l):console.warn("no table found for rId",r)}}),h.registerVisitor({from:"worksheet",to:"worksheet",openTag:e=>{}}),h.registerVisitor({from:"sheetProtection",to:"protection",openTag:e=>{let r=!1;if(e.hasAttribute("sheet")&&v(e.getAttribute("sheet"))&&(r=!0),!r)return void e.setSource(void 0);const l=C=>C===!0||C==="1"||C==="on"||C==="true"||C===!1||C==="0"||C==="off"||C==="false"||null;e.copyTo("autoFilter",l),e.copyTo("deleteColumns",l),e.copyTo("formatCells",l),e.copyTo("formatColumns",l),e.copyTo("formatRows",l),e.copyTo("insertColumns",l),e.copyTo("insertHyperlinks",l),e.copyTo("insertRows",l),e.copyTo("objects",l),e.copyTo("pivotTables",l),e.copyTo("scenarios",l),e.copyTo("selectUnlockedCells",l),e.copyTo("selectUnlockedCells",l),e.copyTo("sort",l);const p={};e.copyToObject(p,"hash",A,"hashValue"),e.copyToObject(p,"algorithm",A,"algorithmName"),e.copyToObject(p,"salt",A,"saltValue"),e.copyToObject(p,"spinCount",E),Object.keys(p).length>0&&(e.getSource().password=p)}}),h.registerVisitor({from:"protectedRanges",to:"protectedRanges",openTag:e=>{e.setSource({})}}),h.registerVisitor({from:"protectedRange",to:{},openTag:e=>{const r=e.getAttribute("sqref");e.setKey(r),e.copyTo("name"),e.copyTo("securityDescriptor");const l={};e.copyToObject(l,"hash",A,"hashValue"),e.copyToObject(l,"algorithm",A,"algorithmName"),e.copyToObject(l,"salt",A,"saltValue"),e.copyToObject(l,"spinCount",E),Object.keys(l).length>0&&(e.getSource().password=l)}}),h.registerVisitor({from:"sheetFormatPr",to:"sheetFormatPr",openTag:e=>{e.copyToObject(N,"defaultColSize",ct,"defaultColWidth"),e.copyToObject(N,"outlineLevelCol",E,"outlineLevelCol");const r=e.getAttribute("customHeight");r!=="1"&&r!=="true"||e.copyToObject(N,"defaultRowSize",ct,"defaultRowHeight"),e.copyToObject(N,"outlineLevelRow",E,"outlineLevelRow")}}),h.registerVisitor({from:"cols",to:"cols",openTag:e=>{e.setSource([])}}),h.registerVisitor({from:"col",to:[],openTag:e=>{e.copyTo("min",r=>parseInt(r)-1),e.copyTo("max",r=>parseInt(r)-1),e.copyTo("sz",ct,"width"),e.copyTo("cs",v,"customWidth"),e.copyTo("h",v,"hidden"),e.copyTo("l",E,"outlineLevel"),e.copyTo("s",E,"style")}}),h.registerVisitor({from:"oleObjects",to:null,openTag:e=>{e.warn("'OLE Objects' are not supported.")}});let Kt=null;const Ts={onOpenTag:e=>{Kt===null&&(Kt="")},onText:e=>{Kt+=e},onEnd:()=>{const e=Qt(Kt);return Kt=null,e},onError:e=>{}};return((e,r,l,p,C,pt)=>{let rt=!1,At=!1,Wt=[],_t=!1,Et=null,Yt=null,de=null,nt=null,$e=null,Fe=null;const ys=pt?.get("richData")??[],Me=u.AddressUtils.normalizeA1ToR1C1,je=u.CoordUtils.createConflatingRanges(),He=new Map,ve=[];let te=null;const Xe=u.CoordUtils.createConflatingRanges();let ee,Dt=!1,B=-1,K=-1,gt=null,se=null;const Se=[];let Ce=null,Be=-2,ft=0,Ut="",Pt="",It="",Ot="",Vt="",Nt="",Lt="",qe="",We="",_e="",Ue="",ze="",Ge="",Ze="",mt=!0,Rt=null;return{...l,onEnd:()=>{Se.length>0&&(r.rows=Se);let g=je.done(Ms);const k=g.length;if(k>0){const F=new Array(k);for(let L=0;L<k;L++){const at=g[L],$t=u.AddressUtils.rangeToString(at),Ft=at.value[1],ie=u.AddressUtils.resolveRelativeToA1(Ft,at.rowStart,at.colStart);F[L]=[$t,ie]}r.formulas=F}const st=Xe.done(!0),R=st.length;if(R>0){const F=new Array(R);for(let L=0;L<R;L++){const at=st[L],$t=u.AddressUtils.rangeToString(at);F[L]=$t}r.volatile=F}if(ve.length>0&&(r.dynamicArray=[...ve]),Wt.length>0){Wt.sort(u.CoordUtils.createRangeComparator(u.IRange.Orientation.Column));const F=[];let L=null,at=-1,$t=-1,Ft=-1,ie=-1,vt=null;const Je=Wt.length;Je>0&&(L=Wt[0],at=L.colStart,$t=L.colEnd,Ft=L.rowEnd,ie=L.value,F.push(L));for(let Mt=1;Mt<Je;Mt++)vt=Wt[Mt],ie!==vt.value||at!==vt.colStart||$t!==vt.colEnd||Ft+1!==vt.rowEnd?(F.push(vt),L=vt,at=L.colStart,$t=L.colEnd,Ft=L.rowEnd,ie=L.value):(Ft=vt.rowEnd,L.rowEnd=Ft);let Qe=[];for(let Mt=0;Mt<F.length;Mt++){const oe=F[Mt];Qe.push({r:{colStart:oe.colStart,colEnd:oe.colEnd,rowStart:oe.rowStart,rowEnd:oe.rowEnd},v:oe.value})}r.directStyles=Qe}const it=e.build();if(it){const F=it.tuples;r.data=F}l?.onEnd?.()},onOpenTag:g=>{let k=g.name;const st=k.indexOf(":");if(st!==-1&&(k=k.slice(st+1)),ee){const R=g.attributes;switch(k){case"v":At=!0;break;case"f":switch(R.t??null){case null:case"normal":_t=!0;break;case"shared":const it=R.si;Yt=R.ref,Et=it;break;case"array":_t=!0,Yt=R.ref,te=[Yt,!1];break;case"datatable":_t=!0,Yt=R.ref,_t=!0}R.ca!==void 0&&Xe.append(B,K);break;case"is":return void(Dt=!0)}return void(Dt&&C?.onOpenTag(g))}if(rt){if(k==="c"){ee=g;const R=g.attributes.r;K=u.AddressUtils.fastStringToCol(R);const it=g.attributes.t;it===void 0?se=null:(se=it,se==="str"&&(Dt=!0));let F=g.attributes.s;F!==void 0&&(F=parseInt(F),Rt&&Rt.value===F&&Rt.colEnd+1===K?Rt.colEnd=K:(Rt={colStart:K,rowStart:B,colEnd:K,rowEnd:B,value:F},Wt.push(Rt)))}}else{if(k==="row"){rt=!0;const R=g.attributes.r;if(B=parseInt(R)-1,ft=0,Pt=g.attributes.customHeight,Pt!==void 0&&(ft|=Ht.CustomHeight),Pt!==We&&(mt=!0,We=Pt),Ut=g.attributes.ht,Ut!==void 0&&(ft|=Ht.Ht),Ut!==qe&&(mt=!0,qe=Ut),It=g.attributes.hidden,It!==void 0&&(ft|=Ht.Hidden),It!==_e&&(mt=!0,_e=It),Vt=g.attributes.s,Vt!==void 0&&(ft|=Ht.S),Vt!==ze&&(mt=!0,ze=Vt),Ot=g.attributes.customFormat,Ot!==void 0&&(ft|=Ht.CustomFormat),Ot!==Ue&&(mt=!0,Ue=Ot),Nt=g.attributes.outlineLevel,Nt!==void 0&&(ft|=Ht.OutlineLevel),Nt!==Ge&&(mt=!0,Ge=Nt),Lt=g.attributes.collapsed,Lt!==void 0&&(ft|=Ht.Collapsed),Lt!==Ze&&(mt=!0,Ze=Lt),ft!==0)if(Be+1!==B||mt){const it=Pt!==void 0&&(Pt==="1"||Pt==="true"),F=Ot!==void 0&&(Ot==="1"||Ot==="true");Ce={min:B,max:B,sz:it&&Ut!==void 0?parseFloat(Ut):-1,csz:it,h:It!==void 0&&(It==="1"||It==="true"),s:it&&Vt!==void 0&&Vt!=="0"?parseInt(Vt):0,cs:F,l:Nt===void 0||Nt==="0"?0:parseInt(Nt),cl:Lt!==void 0&&(Lt==="1"||Lt==="true")},Se.push(Ce)}else Ce.max=B;return Be=B,void(mt=!1)}l?.onOpenTag(g)}},onCloseTag:g=>{if(ee){let k=g.name;const st=k.indexOf(":");if(st!==-1&&(k=k.slice(st+1)),Dt)if(k==="is"||k==="v"){const R=C?.onEnd();R!==null&&e.addValue(B,K,""+R)}else C?.onCloseTag?.(g);return At&&(At=!1),void(k==="c"&&(ee=null,Dt=!1))}if(rt)return rt=!1,void(Rt=null);l?.onCloseTag(g)},onText:g=>{if(g=g.trim(),At){switch(gt=null,se){case null:case"n":gt=parseFloat(g);break;case"b":gt=g==="1"||g==="true";break;case"s":gt=g;break;case"e":if(g==="#VALUE!"){const st=ee.attributes.vm;if(st!==void 0){const R=ys[parseInt(st)-1];if(R&&R.isFormulaError){gt={t:u.ScalarType.Error,v:R.getCode()};break}}}const k=u.FormulaError.getBuiltInByLabel(g);k?gt={t:u.ScalarType.Error,v:k.getCode()}:(gt=g,p?.(`Unknown formula error '${g}' in cell ${u.AddressUtils.cellToString({colIndex:K,rowIndex:B})}`));break;case"str":case"inlineStr":Dt=!0}gt!==null&&e.addValue(B,K,gt)}if(te&&(se==="e"&&(te[1]=!0),ve.push(te),te=null),Et)if($e===Et)nt=Fe;else{if(nt=He.get(Et),!nt){const k=[];de=Me(g,B,K,k),nt=[de,k,g],He.set(Et,nt)}$e=Et,Fe=nt}if(_t){const k=[];de=Me(g,B,K,k),nt=[de,k,g]}if(nt)return je.append(B,K,nt),nt=null,_t=!1,Et=null,void(Yt=null);Dt?C?.onText(g):rt||l?.onText(g)}}})(Q,N,h.createEventHandler(N,()=>{},J),J,Ts,wt)})(tt,(N,G=!1)=>ae(N,$,G)??null,ds,we,0,N=>{o&&(N=$+": "+N,o?.(N))},W),Bt=is($,ne),xt=await(async(N,G=8388608)=>{await(async()=>{if(typeof ReadableStream>"u")if(typeof window>"u"){const{ReadableStream:J}=await Promise.resolve().then(()=>require("./BFe0zJbC0Wy4fqLf.cjs"));global.ReadableStream=J}else console.warn("Browser does not support ReadableStream; consider loading a polyfill.")})();const Qt=new TextDecoder("utf-8");let _=0;const Z=N instanceof Uint8Array?N:new Uint8Array(N);return new ReadableStream({pull(J){if(_>=Z.byteLength)return void J.close();const wt=Z.subarray(_,Math.min(_+G,Z.byteLength)),h=Qt.decode(wt,{stream:_+G<Z.byteLength});J.enqueue(h),_+=wt.length}}).getReader()})(Bt);try{await Ae.parseStream(xt,bt,{xmlns:!1})}catch(N){throw console.warn(`Error parsing sheet: '${$}'`,N),new Error(`Error parsing sheet: '${$}'`,{cause:N})}const qt=fe($,ut);let kt,Re=new Map;if(qt){const N="http://schemas.microsoft.com/office/2017/10/relationships/threadedComment";let G;qt.forEach((_,Z)=>{_.type===N&&(kt=ae(Z,$,!1,ut)?.comments,kt&&kt.forEach(J=>{Re.set(J.id,J)}))});const Qt="http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments";if(qt.forEach((_,Z)=>{_.type===Qt&&(G=ae(Z,$,!1,ut))}),G||kt){const _=kt??[],Z=G?.comments;if(Z){const J=G?.authors;for(let wt=0;wt<Z.length;wt++){const h=Z[wt];let Q=h.authorId!==void 0?J[h.authorId]:void 0;if((!Q||Q.startsWith("tc="))&&(Q=cs(Q.substring(3)),Re.has(Q)))continue;let j=ce.get(Q);j||(j=Ve.get(Q)),j||(j={id:u.CommonUtils.uuidV4(),displayName:Q},Ve.set(j.displayName,j),ce.set(j.id,j)),Q=j?.id??null;const ue={id:u.CommonUtils.uuidV4(),personId:Q,ref:h.ref,done:!1,asNote:!0,content:h.content};_.push(ue)}}tt.comments=_}}};Pe.push(et())}else Xt=Y?is($,ne,tt=>{const et=y.add({buffer:tt});return et.addReference(V),H.add(et),m.toResourceId(et)},yt):Ee($,ne,f,P,yt);return Xt},yt={paramMap:W,getRefs:fe,getRef:ae,parsedRefs:ht,onWarning:o,addPerson:I=>null},le=[];let me=0;d.Strings&&(me=parseInt(d.Strings.Unique??d.Strings.length??0));const us=d.Strings??[];for(let I=0;I<me;I++)le.push(us[I]?.t??"");const Ie=new Map;let Oe=me;const ds=I=>{const z=Ie.get(I);if(z!==void 0)return z;const Y=Oe;return Ie.set(I,Oe++),le.push(I),Y},ce=(zt("richstructure",d,f,P,yt),zt("richdata",d,f,P,yt),new Map),Ve=new Map,Ne=zt("people",d,f,P);let Ct=null;if(Ne.size>0&&(Ct=Ne.entries().next()?.value?.[1]?.persons,Ct)){const I=Ct.length;for(let z=0;z<I;z++){const Y=Ct[z];ce.set(Y.id,Y),ce.set(Y.displayName,Y)}}const Te=zt("themes",d,f,P,yt);let Le=null;if(Te&&Te.entries){let I=Te.entries().next();I?.value?.[1]&&(Le=I.value[1])}const ps=new u.Theme(Le);let he=zt("styles",d,f,P,yt).entries().next()?.value[1];he&&(he=JSON.parse(u.JSONStableStringify(he)));const gs=zt("workbooks",d,f,P,yt);await Promise.all(Pe);const ye={...gs.entries().next().value[1],styles:he,theme:ps.toJSON()};le.length>0&&(ye.strings=le),Ct&&Ct.length>0&&(ye.people=Ct);const fs={...n,resources:y,json:ye},ms=new u.Workbook(fs);return H.forEach(I=>{I.deleteReference(V)}),m.endPersist(),ms}catch(d){let P="Unable to parse XLSX.";throw d instanceof u.OutOfBoundsError&&(P="Unable to open XLSX. There are too many rows or columns."),new Error(P,{cause:d})}},toBufferXLSX:async(i,t)=>{const s=await Promise.resolve().then(()=>require("./Bg1sVEitsy9Ktlo9.cjs")),o=await i.toJSON(!0),n=s.utils.book_new();for(let a=0;a<o.sheets.length;a++){const c=o.sheets[a],T=s.utils.json_to_sheet([{}]);s.utils.book_append_sheet(n,T,c.name);const S=c.sheet,x=i.getSheetAt(a),w=x.getUsedRange();if(w?(T["!ref"]=w.getA1(),w.forEach((D,b)=>{const d={t:"z"},P=b.getCell().getStyle();if(!P.isNormal()){let f=P.getNumberFormat();f!==u.NumberFormat.Type.General&&(f===u.NumberFormat.Type.ShortDate?f="m/d/yyyy":f===u.NumberFormat.Type.MediumDate?f="d-mmm-yy":f===u.NumberFormat.Type.LongDate?f="[$-x-sysdate]dddd, mmmm dd, yyyy":f===u.NumberFormat.Type.ShortTime?f="h:mm":f===u.NumberFormat.Type.MediumTime?f="h:mm AM/PM":f===u.NumberFormat.Type.LongTime&&(f="h:mm:ss AM/PM"),d.z=f)}if(D!==null)switch(b.getType()){case u.ScalarType.Number:d.t="n",d.v=D;break;case u.ScalarType.String:d.t="s",d.v=D;break;case u.ScalarType.Boolean:d.t="b",d.v=D;break;case u.ScalarType.Error:d.t="e",d.v=D.toString();case u.ScalarType.RichData:}T[b.getA1()]=d})):T["!ref"]="A1:A1",S.merges?.length>0){const D=[];T["!merges"]=D;for(let b=0;b<S.merges.length;b++)D.push(s.utils.decode_range(S.merges[b]))}if(S.cols?.length>0){const D=[];T["!cols"]=D;const b=S.cols,d={width:S.defaultColSize??x.getColumnWidthAsFontUnit(x.getColumnHeaders().getDefaultSize())};for(let P=0;P<b.length;P++){const f=b[P];for(let m=D.length;m<=f.min-1;m++)D.push(d);const y={};f.sz!==void 0&&(y.width=f.sz),f.h!==void 0&&(y.hidden=f.h),f.l!==void 0&&(y.level=f.l);for(let m=f.min;m<=f.max;m++)D.push(y)}}}return s.write(n,{type:"array",bookType:"xlsx"}),s.write(n,{type:"array",bookType:"xlsx"})}},Symbol.toStringTag,{value:"Module"}));exports.a=i=>parseFloat(i)/1e3,exports.b=hs,exports.c=i=>i?Ke.Yt.roundAccurately(parseFloat(i)/9525,1):null,exports.d=De,exports.i=js,exports.p=i=>parseFloat(i)/6e4,exports.r=cs,exports.t=i=>i?Ke.Yt.roundAccurately(parseFloat(i)/12700,4):null;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";/**
|
|
2
|
-
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.3.
|
|
2
|
+
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.3.19
|
|
3
3
|
*
|
|
4
4
|
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
5
5
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
6
|
-
*/const h=require("react/jsx-runtime"),a=require("react"),c=require("./Cg143L74lLTSVqNN.cjs"),Ot=require("react-dom"),H=require("@mui/material"),oe=require("@sheetxl/sdk"),Ke=require("@mui/icons-material"),Dt=a.createContext(null),He={didCatch:!1,error:null};class Wt extends a.Component{constructor(i){super(i),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=He}static getDerivedStateFromError(i){return{didCatch:!0,error:i}}resetErrorBoundary(){const{error:i}=this.state;if(i!==null){for(var r,e,n=arguments.length,o=new Array(n),s=0;s<n;s++)o[s]=arguments[s];(r=(e=this.props).onReset)===null||r===void 0||r.call(e,{args:o,reason:"imperative-api"}),this.setState(He)}}componentDidCatch(i,r){var e,n;(e=(n=this.props).onError)===null||e===void 0||e.call(n,i,r)}componentDidUpdate(i,r){const{didCatch:e}=this.state,{resetKeys:n}=this.props;var o,s;e&&r.error!==null&&function(){let d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return d.length!==l.length||d.some((u,p)=>!Object.is(u,l[p]))}(i.resetKeys,n)&&((o=(s=this.props).onReset)===null||o===void 0||o.call(s,{next:n,prev:i.resetKeys,reason:"keys"}),this.setState(He))}render(){const{children:i,fallbackRender:r,FallbackComponent:e,fallback:n}=this.props,{didCatch:o,error:s}=this.state;let d=i;if(o){const l={error:s,resetErrorBoundary:this.resetErrorBoundary};if(typeof r=="function")d=r(l);else if(e)d=a.createElement(e,l);else{if(n===void 0)throw s;d=n}}return a.createElement(Dt.Provider,{value:{didCatch:o,error:s,resetErrorBoundary:this.resetErrorBoundary}},d)}}function pt(t){var i,r,e="";if(typeof t=="string"||typeof t=="number")e+=t;else if(typeof t=="object")if(Array.isArray(t))for(i=0;i<t.length;i++)t[i]&&(r=pt(t[i]))&&(e&&(e+=" "),e+=r);else for(i in t)t[i]&&(e&&(e+=" "),e+=i);return e}function te(){for(var t,i,r=0,e="";r<arguments.length;)(t=arguments[r++])&&(i=pt(t))&&(e&&(e+=" "),e+=i);return e}let Rt={data:""},Pt=t=>typeof window=="object"?((t?t.querySelector("#_goober"):window._goober)||Object.assign((t||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:t||Rt,Ft=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,It=/\/\*[^]*?\*\/| +/g,Je=/\n+/g,ie=(t,i)=>{let r="",e="",n="";for(let o in t){let s=t[o];o[0]=="@"?o[1]=="i"?r=o+" "+s+";":e+=o[1]=="f"?ie(s,o):o+"{"+ie(s,o[1]=="k"?"":i)+"}":typeof s=="object"?e+=ie(s,i?i.replace(/([^,])+/g,d=>o.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g,l=>/&/.test(l)?l.replace(/&/g,d):d?d+" "+l:l)):o):s!=null&&(o=/^--/.test(o)?o:o.replace(/[A-Z]/g,"-$&").toLowerCase(),n+=ie.p?ie.p(o,s):o+":"+s+";")}return r+(i&&n?i+"{"+n+"}":n)+e},Y={},mt=t=>{if(typeof t=="object"){let i="";for(let r in t)i+=r+mt(t[r]);return i}return t},qt=(t,i,r,e,n)=>{let o=mt(t),s=Y[o]||(Y[o]=(l=>{let u=0,p=11;for(;u<l.length;)p=101*p+l.charCodeAt(u++)>>>0;return"go"+p})(o));if(!Y[s]){let l=o!==t?t:(u=>{let p,m,g=[{}];for(;p=Ft.exec(u.replace(It,""));)p[4]?g.shift():p[3]?(m=p[3].replace(Je," ").trim(),g.unshift(g[0][m]=g[0][m]||{})):g[0][p[1]]=p[2].replace(Je," ").trim();return g[0]})(t);Y[s]=ie(n?{["@keyframes "+s]:l}:l,r?"":"."+s)}let d=r&&Y.g?Y.g:null;return r&&(Y.g=Y[s]),((l,u,p,m)=>{m?u.data=u.data.replace(m,l):u.data.indexOf(l)===-1&&(u.data=p?l+u.data:u.data+l)})(Y[s],i,e,d),s};function $e(t){let i=this||{},r=t.call?t(i.p):t;return qt(r.unshift?r.raw?((e,n,o)=>e.reduce((s,d,l)=>{let u=n[l];if(u&&u.call){let p=u(o),m=p&&p.props&&p.props.className||/^go/.test(p)&&p;u=m?"."+m:p&&typeof p=="object"?p.props?"":ie(p,""):p===!1?"":p}return s+d+(u??"")},""))(r,[].slice.call(arguments,1),i.p):r.reduce((e,n)=>Object.assign(e,n&&n.call?n(i.p):n),{}):r,Pt(i.target),i.g,i.o,i.k)}function ft(t,i,r){return i&&function(e,n){for(var o=0;o<n.length;o++){var s=n[o];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(e,s.key,s)}}(t.prototype,i),t}function L(){return L=Object.assign||function(t){for(var i=1;i<arguments.length;i++){var r=arguments[i];for(var e in r)Object.prototype.hasOwnProperty.call(r,e)&&(t[e]=r[e])}return t},L.apply(this,arguments)}function ht(t,i){t.prototype=Object.create(i.prototype),t.prototype.constructor=t,t.__proto__=i}function ve(t,i){if(t==null)return{};var r,e,n={},o=Object.keys(t);for(e=0;e<o.length;e++)r=o[e],i.indexOf(r)>=0||(n[r]=t[r]);return n}function et(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}$e.bind({g:1}),$e.bind({k:1});var tt=function(){return""},gt=a.createContext({enqueueSnackbar:tt,closeSnackbar:tt}),Be="@media (max-width:599.95px)",Re="@media (min-width:600px)",nt=function(t){return t.charAt(0).toUpperCase()+t.slice(1)},Qe=function(t){return""+nt(t.vertical)+nt(t.horizontal)},Te=function(t){return!!t||t===0},Le="unmounted",ue="exited",de="entering",ke="entered",ot="exiting",Ze=function(t){function i(e){var n;n=t.call(this,e)||this;var o,s=e.appear;return n.appearStatus=null,e.in?s?(o=ue,n.appearStatus=de):o=ke:o=e.unmountOnExit||e.mountOnEnter?Le:ue,n.state={status:o},n.nextCallback=null,n}ht(i,t),i.getDerivedStateFromProps=function(e,n){return e.in&&n.status===Le?{status:ue}:null};var r=i.prototype;return r.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},r.componentDidUpdate=function(e){var n=null;if(e!==this.props){var o=this.state.status;this.props.in?o!==de&&o!==ke&&(n=de):o!==de&&o!==ke||(n=ot)}this.updateStatus(!1,n)},r.componentWillUnmount=function(){this.cancelNextCallback()},r.getTimeouts=function(){var e=this.props.timeout,n=e,o=e;return e!=null&&typeof e!="number"&&typeof e!="string"&&(o=e.exit,n=e.enter),{exit:o,enter:n}},r.updateStatus=function(e,n){e===void 0&&(e=!1),n!==null?(this.cancelNextCallback(),n===de?this.performEnter(e):this.performExit()):this.props.unmountOnExit&&this.state.status===ue&&this.setState({status:Le})},r.performEnter=function(e){var n=this,o=this.props.enter,s=e,d=this.getTimeouts();e||o?(this.props.onEnter&&this.props.onEnter(this.node,s),this.safeSetState({status:de},function(){n.props.onEntering&&n.props.onEntering(n.node,s),n.onTransitionEnd(d.enter,function(){n.safeSetState({status:ke},function(){n.props.onEntered&&n.props.onEntered(n.node,s)})})})):this.safeSetState({status:ke},function(){n.props.onEntered&&n.props.onEntered(n.node,s)})},r.performExit=function(){var e=this,n=this.props.exit,o=this.getTimeouts();n?(this.props.onExit&&this.props.onExit(this.node),this.safeSetState({status:ot},function(){e.props.onExiting&&e.props.onExiting(e.node),e.onTransitionEnd(o.exit,function(){e.safeSetState({status:ue},function(){e.props.onExited&&e.props.onExited(e.node)})})})):this.safeSetState({status:ue},function(){e.props.onExited&&e.props.onExited(e.node)})},r.cancelNextCallback=function(){this.nextCallback!==null&&this.nextCallback.cancel&&(this.nextCallback.cancel(),this.nextCallback=null)},r.safeSetState=function(e,n){n=this.setNextCallback(n),this.setState(e,n)},r.setNextCallback=function(e){var n=this,o=!0;return this.nextCallback=function(){o&&(o=!1,n.nextCallback=null,e())},this.nextCallback.cancel=function(){o=!1},this.nextCallback},r.onTransitionEnd=function(e,n){this.setNextCallback(n);var o=e==null&&!this.props.addEndListener;this.node&&!o?(this.props.addEndListener&&this.props.addEndListener(this.node,this.nextCallback),e!=null&&setTimeout(this.nextCallback,e)):setTimeout(this.nextCallback,0)},r.render=function(){var e=this.state.status;if(e===Le)return null;var n=this.props;return(0,n.children)(e,ve(n,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]))},ft(i,[{key:"node",get:function(){var e,n=(e=this.props.nodeRef)===null||e===void 0?void 0:e.current;if(!n)throw new Error("notistack - Custom snackbar is not refForwarding");return n}}]),i}(a.Component);function pe(){}function rt(t,i){typeof t=="function"?t(i):t&&(t.current=i)}function Ge(t,i){return a.useMemo(function(){return t==null&&i==null?null:function(r){rt(t,r),rt(i,r)}},[t,i])}function Pe(t){var i=t.timeout,r=t.style,e=r===void 0?{}:r,n=t.mode;return{duration:typeof i=="object"?i[n]||0:i,easing:e.transitionTimingFunction,delay:e.transitionDelay}}Ze.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:pe,onEntering:pe,onEntered:pe,onExit:pe,onExiting:pe,onExited:pe};var Nt="cubic-bezier(0.4, 0, 0.2, 1)",At="cubic-bezier(0.0, 0, 0.2, 1)",Ht="cubic-bezier(0.4, 0, 0.6, 1)",kt=function(t){t.scrollTop=t.scrollTop},it=function(t){return Math.round(t)+"ms"};function me(t,i){t===void 0&&(t=["all"]);var r=i||{},e=r.duration,n=e===void 0?300:e,o=r.easing,s=o===void 0?Nt:o,d=r.delay,l=d===void 0?0:d;return(Array.isArray(t)?t:[t]).map(function(u){var p=typeof n=="string"?n:it(n),m=typeof l=="string"?l:it(l);return u+" "+p+" "+s+" "+m}).join(",")}function bt(t){var i=function(r){return r&&r.ownerDocument||document}(t);return i.defaultView||window}function Me(t,i){if(i){var r=function(e,n){var o,s=n.getBoundingClientRect(),d=bt(n);if(n.fakeTransform)o=n.fakeTransform;else{var l=d.getComputedStyle(n);o=l.getPropertyValue("-webkit-transform")||l.getPropertyValue("transform")}var u=0,p=0;if(o&&o!=="none"&&typeof o=="string"){var m=o.split("(")[1].split(")")[0].split(",");u=parseInt(m[4],10),p=parseInt(m[5],10)}switch(e){case"left":return"translateX("+(d.innerWidth+u-s.left)+"px)";case"right":return"translateX(-"+(s.left+s.width-u)+"px)";case"up":return"translateY("+(d.innerHeight+p-s.top)+"px)";default:return"translateY(-"+(s.top+s.height-p)+"px)"}}(t,i);r&&(i.style.webkitTransform=r,i.style.transform=r)}}var xt=a.forwardRef(function(t,i){var r=t.children,e=t.direction,n=e===void 0?"down":e,o=t.in,s=t.style,d=t.timeout,l=d===void 0?0:d,u=t.onEnter,p=t.onEntered,m=t.onExit,g=t.onExited,w=ve(t,["children","direction","in","style","timeout","onEnter","onEntered","onExit","onExited"]),v=a.useRef(null),y=Ge(r.ref,v),E=Ge(y,i),b=a.useCallback(function(){v.current&&Me(n,v.current)},[n]);return a.useEffect(function(){if(!o&&n!=="down"&&n!=="right"){var k=function(T,Z){var A;function B(){for(var _=this,U=arguments.length,V=new Array(U),G=0;G<U;G++)V[G]=arguments[G];clearTimeout(A),A=setTimeout(function(){T.apply(_,V)},Z)}return Z===void 0&&(Z=166),B.clear=function(){clearTimeout(A)},B}(function(){v.current&&Me(n,v.current)}),D=bt(v.current);return D.addEventListener("resize",k),function(){k.clear(),D.removeEventListener("resize",k)}}},[n,o]),a.useEffect(function(){o||b()},[o,b]),a.createElement(Ze,Object.assign({appear:!0,nodeRef:v,onEnter:function(k,D){Me(n,k),kt(k),u&&u(k,D)},onEntered:p,onEntering:function(k){var D=s?.transitionTimingFunction||At,T=Pe({timeout:l,mode:"enter",style:L({},s,{transitionTimingFunction:D})});k.style.webkitTransition=me("-webkit-transform",T),k.style.transition=me("transform",T),k.style.webkitTransform="none",k.style.transform="none"},onExit:function(k){var D=s?.transitionTimingFunction||Ht,T=Pe({timeout:l,mode:"exit",style:L({},s,{transitionTimingFunction:D})});k.style.webkitTransition=me("-webkit-transform",T),k.style.transition=me("transform",T),Me(n,k),m&&m(k)},onExited:function(k){k.style.webkitTransition="",k.style.transition="",g&&g(k)},in:o,timeout:l},w),function(k,D){return a.cloneElement(r,L({ref:E,style:L({visibility:k!=="exited"||o?void 0:"hidden"},s,{},r.props.style)},D))})});xt.displayName="Slide";var Fe=function(t){return a.createElement("svg",Object.assign({viewBox:"0 0 24 24",focusable:"false",style:{fontSize:20,marginInlineEnd:8,userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:"currentColor",flexShrink:0}},t))},Bt=function(){return a.createElement(Fe,null,a.createElement("path",{d:`M12 2C6.5 2 2 6.5 2 12S6.5 22 12 22 22 17.5 22 12 17.5 2 12 2M10 17L5 12L6.41
|
|
6
|
+
*/const h=require("react/jsx-runtime"),a=require("react"),c=require("./CLJkEcejZPl006p2.cjs"),Ot=require("react-dom"),H=require("@mui/material"),oe=require("@sheetxl/sdk"),Ke=require("@mui/icons-material"),Dt=a.createContext(null),He={didCatch:!1,error:null};class Wt extends a.Component{constructor(i){super(i),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=He}static getDerivedStateFromError(i){return{didCatch:!0,error:i}}resetErrorBoundary(){const{error:i}=this.state;if(i!==null){for(var r,e,n=arguments.length,o=new Array(n),s=0;s<n;s++)o[s]=arguments[s];(r=(e=this.props).onReset)===null||r===void 0||r.call(e,{args:o,reason:"imperative-api"}),this.setState(He)}}componentDidCatch(i,r){var e,n;(e=(n=this.props).onError)===null||e===void 0||e.call(n,i,r)}componentDidUpdate(i,r){const{didCatch:e}=this.state,{resetKeys:n}=this.props;var o,s;e&&r.error!==null&&function(){let d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return d.length!==l.length||d.some((u,p)=>!Object.is(u,l[p]))}(i.resetKeys,n)&&((o=(s=this.props).onReset)===null||o===void 0||o.call(s,{next:n,prev:i.resetKeys,reason:"keys"}),this.setState(He))}render(){const{children:i,fallbackRender:r,FallbackComponent:e,fallback:n}=this.props,{didCatch:o,error:s}=this.state;let d=i;if(o){const l={error:s,resetErrorBoundary:this.resetErrorBoundary};if(typeof r=="function")d=r(l);else if(e)d=a.createElement(e,l);else{if(n===void 0)throw s;d=n}}return a.createElement(Dt.Provider,{value:{didCatch:o,error:s,resetErrorBoundary:this.resetErrorBoundary}},d)}}function pt(t){var i,r,e="";if(typeof t=="string"||typeof t=="number")e+=t;else if(typeof t=="object")if(Array.isArray(t))for(i=0;i<t.length;i++)t[i]&&(r=pt(t[i]))&&(e&&(e+=" "),e+=r);else for(i in t)t[i]&&(e&&(e+=" "),e+=i);return e}function te(){for(var t,i,r=0,e="";r<arguments.length;)(t=arguments[r++])&&(i=pt(t))&&(e&&(e+=" "),e+=i);return e}let Rt={data:""},Pt=t=>typeof window=="object"?((t?t.querySelector("#_goober"):window._goober)||Object.assign((t||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:t||Rt,Ft=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,It=/\/\*[^]*?\*\/| +/g,Je=/\n+/g,ie=(t,i)=>{let r="",e="",n="";for(let o in t){let s=t[o];o[0]=="@"?o[1]=="i"?r=o+" "+s+";":e+=o[1]=="f"?ie(s,o):o+"{"+ie(s,o[1]=="k"?"":i)+"}":typeof s=="object"?e+=ie(s,i?i.replace(/([^,])+/g,d=>o.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g,l=>/&/.test(l)?l.replace(/&/g,d):d?d+" "+l:l)):o):s!=null&&(o=/^--/.test(o)?o:o.replace(/[A-Z]/g,"-$&").toLowerCase(),n+=ie.p?ie.p(o,s):o+":"+s+";")}return r+(i&&n?i+"{"+n+"}":n)+e},Y={},mt=t=>{if(typeof t=="object"){let i="";for(let r in t)i+=r+mt(t[r]);return i}return t},qt=(t,i,r,e,n)=>{let o=mt(t),s=Y[o]||(Y[o]=(l=>{let u=0,p=11;for(;u<l.length;)p=101*p+l.charCodeAt(u++)>>>0;return"go"+p})(o));if(!Y[s]){let l=o!==t?t:(u=>{let p,m,g=[{}];for(;p=Ft.exec(u.replace(It,""));)p[4]?g.shift():p[3]?(m=p[3].replace(Je," ").trim(),g.unshift(g[0][m]=g[0][m]||{})):g[0][p[1]]=p[2].replace(Je," ").trim();return g[0]})(t);Y[s]=ie(n?{["@keyframes "+s]:l}:l,r?"":"."+s)}let d=r&&Y.g?Y.g:null;return r&&(Y.g=Y[s]),((l,u,p,m)=>{m?u.data=u.data.replace(m,l):u.data.indexOf(l)===-1&&(u.data=p?l+u.data:u.data+l)})(Y[s],i,e,d),s};function Ge(t){let i=this||{},r=t.call?t(i.p):t;return qt(r.unshift?r.raw?((e,n,o)=>e.reduce((s,d,l)=>{let u=n[l];if(u&&u.call){let p=u(o),m=p&&p.props&&p.props.className||/^go/.test(p)&&p;u=m?"."+m:p&&typeof p=="object"?p.props?"":ie(p,""):p===!1?"":p}return s+d+(u??"")},""))(r,[].slice.call(arguments,1),i.p):r.reduce((e,n)=>Object.assign(e,n&&n.call?n(i.p):n),{}):r,Pt(i.target),i.g,i.o,i.k)}function ft(t,i,r){return i&&function(e,n){for(var o=0;o<n.length;o++){var s=n[o];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(e,s.key,s)}}(t.prototype,i),t}function L(){return L=Object.assign||function(t){for(var i=1;i<arguments.length;i++){var r=arguments[i];for(var e in r)Object.prototype.hasOwnProperty.call(r,e)&&(t[e]=r[e])}return t},L.apply(this,arguments)}function ht(t,i){t.prototype=Object.create(i.prototype),t.prototype.constructor=t,t.__proto__=i}function ye(t,i){if(t==null)return{};var r,e,n={},o=Object.keys(t);for(e=0;e<o.length;e++)r=o[e],i.indexOf(r)>=0||(n[r]=t[r]);return n}function et(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}Ge.bind({g:1}),Ge.bind({k:1});var tt=function(){return""},gt=a.createContext({enqueueSnackbar:tt,closeSnackbar:tt}),Be="@media (max-width:599.95px)",Re="@media (min-width:600px)",nt=function(t){return t.charAt(0).toUpperCase()+t.slice(1)},$e=function(t){return""+nt(t.vertical)+nt(t.horizontal)},Te=function(t){return!!t||t===0},Le="unmounted",ue="exited",de="entering",ke="entered",ot="exiting",Ze=function(t){function i(e){var n;n=t.call(this,e)||this;var o,s=e.appear;return n.appearStatus=null,e.in?s?(o=ue,n.appearStatus=de):o=ke:o=e.unmountOnExit||e.mountOnEnter?Le:ue,n.state={status:o},n.nextCallback=null,n}ht(i,t),i.getDerivedStateFromProps=function(e,n){return e.in&&n.status===Le?{status:ue}:null};var r=i.prototype;return r.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},r.componentDidUpdate=function(e){var n=null;if(e!==this.props){var o=this.state.status;this.props.in?o!==de&&o!==ke&&(n=de):o!==de&&o!==ke||(n=ot)}this.updateStatus(!1,n)},r.componentWillUnmount=function(){this.cancelNextCallback()},r.getTimeouts=function(){var e=this.props.timeout,n=e,o=e;return e!=null&&typeof e!="number"&&typeof e!="string"&&(o=e.exit,n=e.enter),{exit:o,enter:n}},r.updateStatus=function(e,n){e===void 0&&(e=!1),n!==null?(this.cancelNextCallback(),n===de?this.performEnter(e):this.performExit()):this.props.unmountOnExit&&this.state.status===ue&&this.setState({status:Le})},r.performEnter=function(e){var n=this,o=this.props.enter,s=e,d=this.getTimeouts();e||o?(this.props.onEnter&&this.props.onEnter(this.node,s),this.safeSetState({status:de},function(){n.props.onEntering&&n.props.onEntering(n.node,s),n.onTransitionEnd(d.enter,function(){n.safeSetState({status:ke},function(){n.props.onEntered&&n.props.onEntered(n.node,s)})})})):this.safeSetState({status:ke},function(){n.props.onEntered&&n.props.onEntered(n.node,s)})},r.performExit=function(){var e=this,n=this.props.exit,o=this.getTimeouts();n?(this.props.onExit&&this.props.onExit(this.node),this.safeSetState({status:ot},function(){e.props.onExiting&&e.props.onExiting(e.node),e.onTransitionEnd(o.exit,function(){e.safeSetState({status:ue},function(){e.props.onExited&&e.props.onExited(e.node)})})})):this.safeSetState({status:ue},function(){e.props.onExited&&e.props.onExited(e.node)})},r.cancelNextCallback=function(){this.nextCallback!==null&&this.nextCallback.cancel&&(this.nextCallback.cancel(),this.nextCallback=null)},r.safeSetState=function(e,n){n=this.setNextCallback(n),this.setState(e,n)},r.setNextCallback=function(e){var n=this,o=!0;return this.nextCallback=function(){o&&(o=!1,n.nextCallback=null,e())},this.nextCallback.cancel=function(){o=!1},this.nextCallback},r.onTransitionEnd=function(e,n){this.setNextCallback(n);var o=e==null&&!this.props.addEndListener;this.node&&!o?(this.props.addEndListener&&this.props.addEndListener(this.node,this.nextCallback),e!=null&&setTimeout(this.nextCallback,e)):setTimeout(this.nextCallback,0)},r.render=function(){var e=this.state.status;if(e===Le)return null;var n=this.props;return(0,n.children)(e,ye(n,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]))},ft(i,[{key:"node",get:function(){var e,n=(e=this.props.nodeRef)===null||e===void 0?void 0:e.current;if(!n)throw new Error("notistack - Custom snackbar is not refForwarding");return n}}]),i}(a.Component);function pe(){}function rt(t,i){typeof t=="function"?t(i):t&&(t.current=i)}function Qe(t,i){return a.useMemo(function(){return t==null&&i==null?null:function(r){rt(t,r),rt(i,r)}},[t,i])}function Pe(t){var i=t.timeout,r=t.style,e=r===void 0?{}:r,n=t.mode;return{duration:typeof i=="object"?i[n]||0:i,easing:e.transitionTimingFunction,delay:e.transitionDelay}}Ze.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:pe,onEntering:pe,onEntered:pe,onExit:pe,onExiting:pe,onExited:pe};var Nt="cubic-bezier(0.4, 0, 0.2, 1)",At="cubic-bezier(0.0, 0, 0.2, 1)",Ht="cubic-bezier(0.4, 0, 0.6, 1)",kt=function(t){t.scrollTop=t.scrollTop},it=function(t){return Math.round(t)+"ms"};function me(t,i){t===void 0&&(t=["all"]);var r=i||{},e=r.duration,n=e===void 0?300:e,o=r.easing,s=o===void 0?Nt:o,d=r.delay,l=d===void 0?0:d;return(Array.isArray(t)?t:[t]).map(function(u){var p=typeof n=="string"?n:it(n),m=typeof l=="string"?l:it(l);return u+" "+p+" "+s+" "+m}).join(",")}function bt(t){var i=function(r){return r&&r.ownerDocument||document}(t);return i.defaultView||window}function Me(t,i){if(i){var r=function(e,n){var o,s=n.getBoundingClientRect(),d=bt(n);if(n.fakeTransform)o=n.fakeTransform;else{var l=d.getComputedStyle(n);o=l.getPropertyValue("-webkit-transform")||l.getPropertyValue("transform")}var u=0,p=0;if(o&&o!=="none"&&typeof o=="string"){var m=o.split("(")[1].split(")")[0].split(",");u=parseInt(m[4],10),p=parseInt(m[5],10)}switch(e){case"left":return"translateX("+(d.innerWidth+u-s.left)+"px)";case"right":return"translateX(-"+(s.left+s.width-u)+"px)";case"up":return"translateY("+(d.innerHeight+p-s.top)+"px)";default:return"translateY(-"+(s.top+s.height-p)+"px)"}}(t,i);r&&(i.style.webkitTransform=r,i.style.transform=r)}}var xt=a.forwardRef(function(t,i){var r=t.children,e=t.direction,n=e===void 0?"down":e,o=t.in,s=t.style,d=t.timeout,l=d===void 0?0:d,u=t.onEnter,p=t.onEntered,m=t.onExit,g=t.onExited,w=ye(t,["children","direction","in","style","timeout","onEnter","onEntered","onExit","onExited"]),y=a.useRef(null),v=Qe(r.ref,y),E=Qe(v,i),b=a.useCallback(function(){y.current&&Me(n,y.current)},[n]);return a.useEffect(function(){if(!o&&n!=="down"&&n!=="right"){var k=function(T,Z){var A;function B(){for(var _=this,U=arguments.length,V=new Array(U),Q=0;Q<U;Q++)V[Q]=arguments[Q];clearTimeout(A),A=setTimeout(function(){T.apply(_,V)},Z)}return Z===void 0&&(Z=166),B.clear=function(){clearTimeout(A)},B}(function(){y.current&&Me(n,y.current)}),D=bt(y.current);return D.addEventListener("resize",k),function(){k.clear(),D.removeEventListener("resize",k)}}},[n,o]),a.useEffect(function(){o||b()},[o,b]),a.createElement(Ze,Object.assign({appear:!0,nodeRef:y,onEnter:function(k,D){Me(n,k),kt(k),u&&u(k,D)},onEntered:p,onEntering:function(k){var D=s?.transitionTimingFunction||At,T=Pe({timeout:l,mode:"enter",style:L({},s,{transitionTimingFunction:D})});k.style.webkitTransition=me("-webkit-transform",T),k.style.transition=me("transform",T),k.style.webkitTransform="none",k.style.transform="none"},onExit:function(k){var D=s?.transitionTimingFunction||Ht,T=Pe({timeout:l,mode:"exit",style:L({},s,{transitionTimingFunction:D})});k.style.webkitTransition=me("-webkit-transform",T),k.style.transition=me("transform",T),Me(n,k),m&&m(k)},onExited:function(k){k.style.webkitTransition="",k.style.transition="",g&&g(k)},in:o,timeout:l},w),function(k,D){return a.cloneElement(r,L({ref:E,style:L({visibility:k!=="exited"||o?void 0:"hidden"},s,{},r.props.style)},D))})});xt.displayName="Slide";var Fe=function(t){return a.createElement("svg",Object.assign({viewBox:"0 0 24 24",focusable:"false",style:{fontSize:20,marginInlineEnd:8,userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:"currentColor",flexShrink:0}},t))},Bt=function(){return a.createElement(Fe,null,a.createElement("path",{d:`M12 2C6.5 2 2 6.5 2 12S6.5 22 12 22 22 17.5 22 12 17.5 2 12 2M10 17L5 12L6.41
|
|
7
7
|
10.59L10 14.17L17.59 6.58L19 8L10 17Z`}))},_t=function(){return a.createElement(Fe,null,a.createElement("path",{d:"M13,14H11V10H13M13,18H11V16H13M1,21H23L12,2L1,21Z"}))},Vt=function(){return a.createElement(Fe,null,a.createElement("path",{d:`M12,2C17.53,2 22,6.47 22,12C22,17.53 17.53,22 12,22C6.47,22 2,17.53 2,12C2,
|
|
8
8
|
6.47 6.47,2 12,2M15.59,7L12,10.59L8.41,7L7,8.41L10.59,12L7,15.59L8.41,17L12,
|
|
9
9
|
13.41L15.59,17L17,15.59L13.41,12L17,8.41L15.59,7Z`}))},zt=function(){return a.createElement(Fe,null,a.createElement("path",{d:`M13,9H11V7H13M13,17H11V11H13M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,
|
|
10
|
-
0 22,12A10,10 0 0,0 12,2Z`}))},re={maxSnack:3,persist:!1,hideIconVariant:!1,disableWindowBlurListener:!1,variant:"default",autoHideDuration:5e3,iconVariant:{default:void 0,success:a.createElement(Bt,null),warning:a.createElement(_t,null),error:a.createElement(Vt,null),info:a.createElement(zt,null)},anchorOrigin:{vertical:"bottom",horizontal:"left"},TransitionComponent:xt,transitionDuration:{enter:225,exit:195}},Ut=function(t,i){return function(r,e){return e===void 0&&(e=!1),e?L({},re[r],{},i[r],{},t[r]):r==="autoHideDuration"?(n=t.autoHideDuration,o=i.autoHideDuration,(s=function(d){return typeof d=="number"||d===null})(n)?n:s(o)?o:re.autoHideDuration):r==="transitionDuration"?function(d,l){var u=function(p,m){return m.some(function(g){return typeof p===g})};return u(d,["string","number"])?d:u(d,["object"])?L({},re.transitionDuration,{},u(l,["object"])&&l,{},d):u(l,["string","number"])?l:u(l,["object"])?L({},re.transitionDuration,{},l):re.transitionDuration}(t.transitionDuration,i.transitionDuration):t[r]||i[r]||re[r];var n,o,s}};function Ee(t){return Object.entries(t).reduce(function(i,r){var e,n=r[0],o=r[1];return L({},i,((e={})[n]=$e(o),e))},{})}var Kt="notistack-SnackbarContainer",$t="notistack-Snackbar",wt="notistack-CollapseWrapper",Gt="notistack-MuiContent",Qt=function(t){return"notistack-MuiContent-"+t},at=Ee({root:{height:0},entered:{height:"auto"}}),_e="0px",yt=a.forwardRef(function(t,i){var r=t.children,e=t.in,n=t.onExited,o=a.useRef(null),s=a.useRef(null),d=Ge(i,s),l=function(){return o.current?o.current.clientHeight:0};return a.createElement(Ze,{in:e,unmountOnExit:!0,onEnter:function(u){u.style.height=_e},onEntered:function(u){u.style.height="auto"},onEntering:function(u){var p=l(),m=Pe({timeout:175,mode:"enter"}),g=m.duration,w=m.easing;u.style.transitionDuration=typeof g=="string"?g:g+"ms",u.style.height=p+"px",u.style.transitionTimingFunction=w||""},onExit:function(u){u.style.height=l()+"px"},onExited:n,onExiting:function(u){kt(u);var p=Pe({timeout:175,mode:"exit"}),m=p.duration,g=p.easing;u.style.transitionDuration=typeof m=="string"?m:m+"ms",u.style.height=_e,u.style.transitionTimingFunction=g||""},nodeRef:s,timeout:175},function(u,p){return a.createElement("div",Object.assign({ref:d,className:te(at.root,u==="entered"&&at.entered),style:L({pointerEvents:"all",overflow:"hidden",minHeight:_e,transition:me("height")},u==="entered"&&{overflow:"visible"},{},u==="exited"&&!e&&{visibility:"hidden"})},p),a.createElement("div",{ref:o,className:wt,style:{display:"flex",width:"100%"}},r))})});yt.displayName="Collapse";var st={right:"left",left:"right",bottom:"up",top:"down"},Zt=function(t){return"anchorOrigin"+Qe(t)},Xt=function(){};function ye(t,i){return t.reduce(function(r,e){return e==null?r:function(){for(var n=arguments.length,o=new Array(n),s=0;s<n;s++)o[s]=arguments[s];var d=[].concat(o);i&&d.indexOf(i)===-1&&d.push(i),r.apply(this,d),e.apply(this,d)}},Xt)}var Yt=typeof window<"u"?a.useLayoutEffect:a.useEffect;function lt(t){var i=a.useRef(t);return Yt(function(){i.current=t}),a.useCallback(function(){return i.current.apply(void 0,arguments)},[])}var Ve,vt=a.forwardRef(function(t,i){var r=t.children,e=t.className,n=t.autoHideDuration,o=t.disableWindowBlurListener,s=o!==void 0&&o,d=t.onClose,l=t.id,u=t.open,p=t.SnackbarProps,m=p===void 0?{}:p,g=a.useRef(),w=lt(function(){d&&d.apply(void 0,arguments)}),v=lt(function(b){d&&b!=null&&(g.current&&clearTimeout(g.current),g.current=setTimeout(function(){w(null,"timeout",l)},b))});a.useEffect(function(){return u&&v(n),function(){g.current&&clearTimeout(g.current)}},[u,n,v]);var y=function(){g.current&&clearTimeout(g.current)},E=a.useCallback(function(){n!=null&&v(.5*n)},[n,v]);return a.useEffect(function(){if(!s&&u)return window.addEventListener("focus",E),window.addEventListener("blur",y),function(){window.removeEventListener("focus",E),window.removeEventListener("blur",y)}},[s,E,u]),a.createElement("div",Object.assign({ref:i},m,{className:te($t,e),onMouseEnter:function(b){m.onMouseEnter&&m.onMouseEnter(b),y()},onMouseLeave:function(b){m.onMouseLeave&&m.onMouseLeave(b),E()}}),r)});vt.displayName="Snackbar";var Jt=Ee({root:(Ve={display:"flex",flexWrap:"wrap",flexGrow:1},Ve[Re]={flexGrow:"initial",minWidth:"288px"},Ve)}),Xe=a.forwardRef(function(t,i){var r=t.className,e=ve(t,["className"]);return a.createElement("div",Object.assign({ref:i,className:te(Jt.root,r)},e))});Xe.displayName="SnackbarContent";var be=Ee({root:{backgroundColor:"#313131",fontSize:"0.875rem",lineHeight:1.43,letterSpacing:"0.01071em",color:"#fff",alignItems:"center",padding:"6px 16px",borderRadius:"4px",boxShadow:"0px 3px 5px -1px rgba(0,0,0,0.2),0px 6px 10px 0px rgba(0,0,0,0.14),0px 1px 18px 0px rgba(0,0,0,0.12)"},lessPadding:{paddingLeft:"20px"},default:{backgroundColor:"#313131"},success:{backgroundColor:"#43a047"},error:{backgroundColor:"#d32f2f"},warning:{backgroundColor:"#ff9800"},info:{backgroundColor:"#2196f3"},message:{display:"flex",alignItems:"center",padding:"8px 0"},action:{display:"flex",alignItems:"center",marginLeft:"auto",paddingLeft:"16px",marginRight:"-8px"}}),ct="notistack-snackbar",Et=a.forwardRef(function(t,i){var r=t.id,e=t.message,n=t.action,o=t.iconVariant,s=t.variant,d=t.hideIconVariant,l=t.style,u=t.className,p=o[s],m=n;return typeof m=="function"&&(m=m(r)),a.createElement(Xe,{ref:i,role:"alert","aria-describedby":ct,style:l,className:te(Gt,Qt(s),be.root,be[s],u,!d&&p&&be.lessPadding)},a.createElement("div",{id:ct,className:be.message},d?null:p,e),m&&a.createElement("div",{className:be.action},m))});Et.displayName="MaterialDesignContent";var xe,ze,je,Oe,Ue,en=a.memo(Et),tn=Ee({wrappedRoot:{width:"100%",position:"relative",transform:"translateX(0)",top:0,right:0,bottom:0,left:0,minWidth:"288px"}}),nn=function(t){var i=a.useRef(),r=a.useState(!0),e=r[0],n=r[1],o=ye([t.snack.onClose,t.onClose]),s=a.useCallback(function(){i.current=setTimeout(function(){n(function(_){return!_})},125)},[]);a.useEffect(function(){return function(){i.current&&clearTimeout(i.current)}},[]);var d,l=t.snack,u=t.classes,p=t.Component,m=p===void 0?en:p,g=a.useMemo(function(){return function(_){_===void 0&&(_={});var U={containerRoot:!0,containerAnchorOriginTopCenter:!0,containerAnchorOriginBottomCenter:!0,containerAnchorOriginTopRight:!0,containerAnchorOriginBottomRight:!0,containerAnchorOriginTopLeft:!0,containerAnchorOriginBottomLeft:!0};return Object.keys(_).filter(function(V){return!U[V]}).reduce(function(V,G){var ae;return L({},V,((ae={})[G]=_[G],ae))},{})}(u)},[u]),w=l.open,v=l.SnackbarProps,y=l.TransitionComponent,E=l.TransitionProps,b=l.transitionDuration,k=l.disableWindowBlurListener,D=l.content,T=ve(l,["open","SnackbarProps","TransitionComponent","TransitionProps","transitionDuration","disableWindowBlurListener","content","entered","requestClose","onEnter","onEntered","onExit","onExited"]),Z=L({direction:(d=T.anchorOrigin,d.horizontal!=="center"?st[d.horizontal]:st[d.vertical]),timeout:b},E),A=D;typeof A=="function"&&(A=A(T.id,T.message));var B=["onEnter","onEntered","onExit","onExited"].reduce(function(_,U){var V;return L({},_,((V={})[U]=ye([t.snack[U],t[U]],T.id),V))},{});return a.createElement(yt,{in:e,onExited:B.onExited},a.createElement(vt,{open:w,id:T.id,disableWindowBlurListener:k,autoHideDuration:T.autoHideDuration,className:te(tn.wrappedRoot,g.root,g[Zt(T.anchorOrigin)]),SnackbarProps:v,onClose:o},a.createElement(y,Object.assign({},Z,{appear:!0,in:w,onExit:B.onExit,onExited:s,onEnter:B.onEnter,onEntered:ye([B.onEntered,function(){t.snack.requestClose&&o(null,"instructed",t.snack.id)}],T.id)}),A||a.createElement(m,Object.assign({},T)))))},we={default:20},De={default:6,dense:2},ut="."+wt,We=Ee({root:(xe={boxSizing:"border-box",display:"flex",maxHeight:"100%",position:"fixed",zIndex:1400,height:"auto",width:"auto",transition:me(["top","right","bottom","left","max-width"],{duration:300,easing:"ease"}),pointerEvents:"none"},xe[ut]={padding:De.default+"px 0px",transition:"padding 300ms ease 0ms"},xe.maxWidth="calc(100% - "+2*we.default+"px)",xe[Be]={width:"100%",maxWidth:"calc(100% - 32px)"},xe),rootDense:(ze={},ze[ut]={padding:De.dense+"px 0px"},ze),top:{top:we.default-De.default+"px",flexDirection:"column"},bottom:{bottom:we.default-De.default+"px",flexDirection:"column-reverse"},left:(je={left:we.default+"px"},je[Re]={alignItems:"flex-start"},je[Be]={left:"16px"},je),right:(Oe={right:we.default+"px"},Oe[Re]={alignItems:"flex-end"},Oe[Be]={right:"16px"},Oe),center:(Ue={left:"50%",transform:"translateX(-50%)"},Ue[Re]={alignItems:"center"},Ue)}),on=function(t){var i=t.classes,r=i===void 0?{}:i,e=t.anchorOrigin,n=t.dense,o=t.children,s=te(Kt,We[e.vertical],We[e.horizontal],We.root,r.containerRoot,r["containerAnchorOrigin"+Qe(e)],n&&We.rootDense);return a.createElement("div",{className:s},o)},rn=a.memo(on),dt=function(t){return!(typeof t=="string"||a.isValidElement(t))},an=function(t){function i(r){var e;return(e=t.call(this,r)||this).enqueueSnackbar=function(n,o){if(o===void 0&&(o={}),n==null)throw new Error("enqueueSnackbar called with invalid argument");var s=dt(n)?n:o,d=dt(n)?n.message:n,l=s.key,u=s.preventDuplicate,p=ve(s,["key","preventDuplicate"]),m=Te(l),g=m?l:new Date().getTime()+Math.random(),w=Ut(p,e.props),v=L({id:g},p,{message:d,open:!0,entered:!1,requestClose:!1,persist:w("persist"),action:w("action"),content:w("content"),variant:w("variant"),anchorOrigin:w("anchorOrigin"),disableWindowBlurListener:w("disableWindowBlurListener"),autoHideDuration:w("autoHideDuration"),hideIconVariant:w("hideIconVariant"),TransitionComponent:w("TransitionComponent"),transitionDuration:w("transitionDuration"),TransitionProps:w("TransitionProps",!0),iconVariant:w("iconVariant",!0),style:w("style",!0),SnackbarProps:w("SnackbarProps",!0),className:te(e.props.className,p.className)});return v.persist&&(v.autoHideDuration=void 0),e.setState(function(y){if(u===void 0&&e.props.preventDuplicate||u){var E=function(D){return m?D.id===g:D.message===d},b=y.queue.findIndex(E)>-1,k=y.snacks.findIndex(E)>-1;if(b||k)return y}return e.handleDisplaySnack(L({},y,{queue:[].concat(y.queue,[v])}))}),g},e.handleDisplaySnack=function(n){return n.snacks.length>=e.maxSnack?e.handleDismissOldest(n):e.processQueue(n)},e.processQueue=function(n){var o=n.queue,s=n.snacks;return o.length>0?L({},n,{snacks:[].concat(s,[o[0]]),queue:o.slice(1,o.length)}):n},e.handleDismissOldest=function(n){if(n.snacks.some(function(l){return!l.open||l.requestClose}))return n;var o=!1,s=!1;n.snacks.reduce(function(l,u){return l+(u.open&&u.persist?1:0)},0)===e.maxSnack&&(s=!0);var d=n.snacks.map(function(l){return o||l.persist&&!s?L({},l):(o=!0,l.entered?(l.onClose&&l.onClose(null,"maxsnack",l.id),e.props.onClose&&e.props.onClose(null,"maxsnack",l.id),L({},l,{open:!1})):L({},l,{requestClose:!0}))});return L({},n,{snacks:d})},e.handleEnteredSnack=function(n,o,s){if(!Te(s))throw new Error("handleEnteredSnack Cannot be called with undefined key");e.setState(function(d){return{snacks:d.snacks.map(function(l){return l.id===s?L({},l,{entered:!0}):L({},l)})}})},e.handleCloseSnack=function(n,o,s){e.props.onClose&&e.props.onClose(n,o,s);var d=s===void 0;e.setState(function(l){var u=l.snacks,p=l.queue;return{snacks:u.map(function(m){return d||m.id===s?m.entered?L({},m,{open:!1}):L({},m,{requestClose:!0}):L({},m)}),queue:p.filter(function(m){return m.id!==s})}})},e.closeSnackbar=function(n){var o=e.state.snacks.find(function(s){return s.id===n});Te(n)&&o&&o.onClose&&o.onClose(null,"instructed",n),e.handleCloseSnack(null,"instructed",n)},e.handleExitedSnack=function(n,o){if(!Te(o))throw new Error("handleExitedSnack Cannot be called with undefined key");e.setState(function(s){var d=e.processQueue(L({},s,{snacks:s.snacks.filter(function(l){return l.id!==o})}));return d.queue.length===0?d:e.handleDismissOldest(d)})},e.enqueueSnackbar,e.closeSnackbar,e.state={snacks:[],queue:[],contextValue:{enqueueSnackbar:e.enqueueSnackbar.bind(et(e)),closeSnackbar:e.closeSnackbar.bind(et(e))}},e}return ht(i,t),i.prototype.render=function(){var r=this,e=this.state.contextValue,n=this.props,o=n.domRoot,s=n.children,d=n.dense,l=d!==void 0&&d,u=n.Components,p=u===void 0?{}:u,m=n.classes,g=this.state.snacks.reduce(function(v,y){var E,b=Qe(y.anchorOrigin),k=v[b]||[];return L({},v,((E={})[b]=[].concat(k,[y]),E))},{}),w=Object.keys(g).map(function(v){var y=g[v],E=y[0];return a.createElement(rn,{key:v,dense:l,anchorOrigin:E.anchorOrigin,classes:m},y.map(function(b){return a.createElement(nn,{key:b.id,snack:b,classes:m,Component:p[b.variant],onClose:r.handleCloseSnack,onEnter:r.props.onEnter,onExit:r.props.onExit,onExited:ye([r.handleExitedSnack,r.props.onExited],b.id),onEntered:ye([r.handleEnteredSnack,r.props.onEntered],b.id)})}))});return a.createElement(gt.Provider,{value:e},s,o?Ot.createPortal(w,o):w)},ft(i,[{key:"maxSnack",get:function(){return this.props.maxSnack||re.maxSnack}}]),i}(a.Component),Ct=function(){return a.useContext(gt)};const J={card:"_card_1a398_7",actionRoot:"_actionRoot_1a398_11",icons:"_icons_1a398_16",expand:"_expand_1a398_22",expandOpen:"_expandOpen_1a398_29",stackTraceContainer:"_stackTraceContainer_1a398_33"},St=a.forwardRef((t,i)=>{const{id:r,message:e,iconVariant:n,error:o,hideIconVariant:s,...d}=t,{closeSnackbar:l}=Ct(),u=c.useTheme(),[p,m]=a.useState(!1),g=a.useCallback(()=>{m(y=>!y)},[]),w=a.useCallback(()=>{l(r)},[r,l]),v=o?.message||String(e);return h.jsx(Xe,{ref:i,className:c.clsx(J.root,"error-snackbar"),children:h.jsxs(H.Card,{className:J.card,style:{backgroundColor:u.palette.error.dark,border:`1px solid ${u.palette.error.dark}`},children:[h.jsxs(H.CardActions,{className:J.actionRoot,children:[s?null:n?.error,h.jsx(H.Typography,{variant:"body2",component:"div",className:J.typography,style:{color:u.palette.text.primary},children:v}),h.jsx("div",{style:{flex:"1 1 auto"}}),h.jsxs("div",{className:J.icons,children:[o?h.jsx(H.IconButton,{"aria-label":"Show more",size:"small",className:c.clsx(J.expand,{[J.expandOpen]:p}),style:{color:u.palette.action.active},onClick:g,children:h.jsx(Ke.ExpandMore,{})}):null,h.jsx(H.IconButton,{size:"small",className:J.expand,style:{color:u.palette.action.active},onClick:w,children:h.jsx(Ke.Close,{fontSize:"small"})})]})]}),o?h.jsx(H.Collapse,{in:p,timeout:"auto",unmountOnExit:!0,children:h.jsx("div",{className:J.stackTraceContainer,style:{backgroundColor:u.palette.error.light,borderTop:`1px solid ${u.palette.error.main}`},children:h.jsx(c.k7,{error:o,hideLineNumbers:!0})})}):null]})})});St.displayName="ToastError";const Tt=a.memo(a.forwardRef((t,i)=>{const{commands:r,commandHook:e,scope:n="workbook",disabled:o=!1,...s}=t,d=c.T(u=>{const p={variant:c.vo.Menuitem,parentFloat:u.floatReference,commandHook:e,scope:n,disabled:o},m=h.jsxs(h.Fragment,{children:[h.jsx(c.gr,{...p,command:r.getCommand("newWorkbook"),icon:c.x5(h.jsx(c.zi,{}))}),h.jsx(c.Zt,{orientation:"horizontal"}),h.jsx(c.gr,{...p,command:r.getCommand("openWorkbook"),icon:c.x5(h.jsx(c.Vi,{}))}),h.jsx(c.g4,{...p,commands:r,quickCommand:"saveWorkbook",icon:c.x5(h.jsx(c.Hi,{})),createPopupPanel:g=>{const w={...p,parentFloat:g.floatReference,scope:"saveWorkbook"},v=[];return c.WorkbookIO.getWriteFormats().forEach(y=>{if(y.isDefault)return;let E=null;y.key==="CSV"?E=c.x5(h.jsx(c.ki,{})):y.key==="Excel"&&(E=c.x5(h.jsx(c.Li,{})));const b=r.getCommand(`saveWorkbookAs${y.key}`);b?v.push(a.createElement(c.gr,{...w,key:y.key,command:b,icon:E})):console.warn(`Unable to resolve command: 'saveWorkbookAs${y.key}'`)}),c.L5({...g,children:v,onClick:()=>{g.closeFloatAll()}})}})]});return c.L5({...u,children:m,onClick:g=>{g.isDefaultPrevented||u.closeFloatAll()}})},[o,r,e,n]),l="File";return h.jsx(c.g4,{commands:r,disabled:o,commandHook:e,scope:n,label:l,tooltip:"Options for saving and loading the workbook.",sx:{paddingBottom:"0px","& button":{paddingTop:"0px",paddingBottom:"0px",height:u=>`calc(1.25rem + ${u.spacing(2)}px)`}},...s,createPopupPanel:d,icon:h.jsx(c.ul,{className:"label",icon:null,label:l})})}));Tt.displayName="StandaloneFileCommandButton";const sn=h.jsx(c.n2,{label:"SheetXL",description:"Visit me at sheetxl.com.",children:h.jsx(H.Box,{sx:{width:"24px",height:"24px",marginBottom:"4px",marginLeft:"6px"},children:h.jsx(c.ed,{onClick:()=>{window?.open("https://www.sheetxl.com","_blank")},style:{width:"24px",height:"24px",cursor:"pointer"}})})}),Lt=a.memo(a.forwardRef((t,i)=>{const{commands:r,workbook:e,logo:n=sn,mainElement:o,showFileMenu:s=!0,showAppearanceMenu:d=!0,...l}=t,{reference:u}=c.y3(),[p,{width:m}]=c.useMeasure(),g=m<530,w=s?h.jsx(Tt,{commands:r,commandHook:{beforeExecute(){u?.closeAll()},onError(b,k,D){}}}):null,v=d?h.jsx(c.AppearanceCommandButton,{commands:r,commandHook:{beforeExecute(){u?.closeAll()},onError(b,k,D){}}}):null,y=a.useMemo(()=>({paddingLeft:b=>b.spacing(1),paddingRight:b=>b.spacing(1)}),[]),E=a.useRef(null);return h.jsx(H.Box,{ref:c.mergeRefs([E,p,i]),...l,children:c.renderWorkbookToolbars({commands:r,renderCompact:g,workbook:e,selectWrapper:b=>h.jsxs(H.Box,{sx:{display:"flex",flex:"1",flexDirection:"row",alignItems:"stretch",gap:k=>k.spacing(1),paddingLeft:k=>k.spacing(1),paddingRight:k=>k.spacing(1)},children:[h.jsxs(H.Box,{sx:{display:"flex",flexDirection:"row",alignItems:"center",flex:"1 1 100%",gap:k=>k.spacing(.5)},children:[n,h.jsxs(H.Box,{sx:{display:"flex",flexDirection:"row",alignItems:"center",gap:k=>k.spacing(.25)},children:[w,b]})]}),h.jsx(H.Box,{sx:{display:"flex",flexDirection:"row",flex:"1 1 300%",overflow:"hidden",alignItems:"center",justifyContent:"center"},children:o}),h.jsx(H.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"end",flex:g&&!v?"0 0 auto":"1 1 100%"},children:v})]}),selectProps:y,toolbarsProps:{Home:{sx:{}}}})})}));Lt.displayName="StandaloneWorkbookToolbar";const Mt=a.memo(a.forwardRef((t,i)=>{const{workbook:r,setWorkbook:e,refWorkbookTitle:n,titleWorkbook:o,setWorkbookTitle:s,titlePlaceHolder:d,children:l,undoManager:u,commands:p,importExportDisabled:m,themeModeOptions:g}=t,w=Ct(),v=w?w.enqueueSnackbar:()=>{},y=w?w.closeSnackbar:()=>{},[E,b]=a.useState({isMounted:!1,label:null,starting:new Map,running:new Map}),k=a.useCallback(()=>{b(O=>({...O,isMounted:!0}))},[]),D=a.useCallback(()=>{b(O=>({...O,isMounted:!1}))},[]),T=c.ll(),Z=c.sl(),A=c.cl(),B=a.useRef(new Set),_=a.useMemo(()=>{const O=(C,S)=>{if(S?.onceKey){if(B.current.has(S.onceKey))return;const M=new Set(B.current);M.add(S.onceKey),B.current=M}const W={variant:S?.type??c.ye.Info,anchorOrigin:{vertical:"top",horizontal:"center"},preventDuplicate:S?.preventDuplicate,persist:S?.persist??S?.type===c.ye.Error,action:M=>h.jsx(H.IconButton,{onClick:()=>y(M),children:h.jsx(Ke.CancelOutlined,{})})};S?.enqueueProps&&Object.assign(W,S.enqueueProps),C||console.log("message is 'null'",S),v(C??"Alert",W)};return{showMessage:O,showBusy:(C,S)=>{let W=null;const M=new Promise(N=>{W=N});return b(N=>{const I=new Map(N.starting);return I.set(M,W),{...N,label:C,starting:I}}),M},showWindow:(C,S,W)=>{const M={...S,onKeyDown:N=>{p?.dispatchToFocusedCommand(N),N.isDefaultPrevented()||N.isPropagationStopped()||S?.onKeyDown?.(N)}};return T(C,{sort:()=>Promise.resolve().then(()=>require("./D1evviVgpMSnh_ps.cjs")),numberFormat:()=>Promise.resolve().then(()=>require("./DLxWeoRObtw9vhq0.cjs")),hyperlink:()=>Promise.resolve().then(()=>require("./CpjgyIT06xS_g-RI.cjs")),comments:()=>Promise.resolve().then(()=>require("./DwDxn-CNljZzVT1A.cjs")),find:()=>Promise.resolve().then(()=>require("./DIxETliPSfTmAXr4.cjs")),tableDetails:()=>Promise.resolve().then(()=>require("./D-0gYov1wyCtp4ZX.cjs")),tableNew:()=>Promise.resolve().then(()=>require("./CIHCV7NTmzi3k8gl.cjs")),namedDetails:()=>Promise.resolve().then(()=>require("./Dk3opGiX0kIIcJN4.cjs"))}[C],M,W)},showOptions:Z,showInputOptions:A,showError:C=>{let S,W=c.ye.Error,M="Unknown Error";typeof C=="string"?M=C:C instanceof Error&&(S=C,C.message&&(M=C.message)),C instanceof oe.PartialError&&(W=c.ye.Info),O(M,{type:W,enqueueProps:{error:S}})}}},[]),U=a.useCallback(()=>{},[]),V=(O=>{const{workbook:C,setWorkbook:S,importExportDisabled:W,workbookTitle:M="export",setWorkbookTitle:N,notifier:I,requestWorkbookTitle:X,themeModeOptions:R,undoManager:Ce,commands:Q,onExecute:le}=O,Se=c.T(R?.onForceModeChange,[R?.onForceModeChange]),Ie=c.T(R?.onForceLightGridChange,[R?.onForceLightGridChange]),ce=c.T(R?.onForceLightImagesChange,[R?.onForceLightImagesChange]),qe=c.T(async(j=null,K=null)=>{const f=[];let x,P=null,$=null;if(typeof j=="string"?$=j:P=j,x=P?j:await c.Yt.openFileDialog($??c.WorkbookIO.getAllReadFormatTypeAsString().join(",")),!x)return null;const ee={source:x,constructorOptions:K,onWarning:Ae=>{f.push(Ae)}},ge=await c.WorkbookIO.read(ee,I);return f.length>0&&(I?.showMessage?.("Some elements were not able to be imported. See console for details."),console.warn(`Import warnings:
|
|
10
|
+
0 22,12A10,10 0 0,0 12,2Z`}))},re={maxSnack:3,persist:!1,hideIconVariant:!1,disableWindowBlurListener:!1,variant:"default",autoHideDuration:5e3,iconVariant:{default:void 0,success:a.createElement(Bt,null),warning:a.createElement(_t,null),error:a.createElement(Vt,null),info:a.createElement(zt,null)},anchorOrigin:{vertical:"bottom",horizontal:"left"},TransitionComponent:xt,transitionDuration:{enter:225,exit:195}},Ut=function(t,i){return function(r,e){return e===void 0&&(e=!1),e?L({},re[r],{},i[r],{},t[r]):r==="autoHideDuration"?(n=t.autoHideDuration,o=i.autoHideDuration,(s=function(d){return typeof d=="number"||d===null})(n)?n:s(o)?o:re.autoHideDuration):r==="transitionDuration"?function(d,l){var u=function(p,m){return m.some(function(g){return typeof p===g})};return u(d,["string","number"])?d:u(d,["object"])?L({},re.transitionDuration,{},u(l,["object"])&&l,{},d):u(l,["string","number"])?l:u(l,["object"])?L({},re.transitionDuration,{},l):re.transitionDuration}(t.transitionDuration,i.transitionDuration):t[r]||i[r]||re[r];var n,o,s}};function Ee(t){return Object.entries(t).reduce(function(i,r){var e,n=r[0],o=r[1];return L({},i,((e={})[n]=Ge(o),e))},{})}var Kt="notistack-SnackbarContainer",Gt="notistack-Snackbar",wt="notistack-CollapseWrapper",Qt="notistack-MuiContent",$t=function(t){return"notistack-MuiContent-"+t},at=Ee({root:{height:0},entered:{height:"auto"}}),_e="0px",vt=a.forwardRef(function(t,i){var r=t.children,e=t.in,n=t.onExited,o=a.useRef(null),s=a.useRef(null),d=Qe(i,s),l=function(){return o.current?o.current.clientHeight:0};return a.createElement(Ze,{in:e,unmountOnExit:!0,onEnter:function(u){u.style.height=_e},onEntered:function(u){u.style.height="auto"},onEntering:function(u){var p=l(),m=Pe({timeout:175,mode:"enter"}),g=m.duration,w=m.easing;u.style.transitionDuration=typeof g=="string"?g:g+"ms",u.style.height=p+"px",u.style.transitionTimingFunction=w||""},onExit:function(u){u.style.height=l()+"px"},onExited:n,onExiting:function(u){kt(u);var p=Pe({timeout:175,mode:"exit"}),m=p.duration,g=p.easing;u.style.transitionDuration=typeof m=="string"?m:m+"ms",u.style.height=_e,u.style.transitionTimingFunction=g||""},nodeRef:s,timeout:175},function(u,p){return a.createElement("div",Object.assign({ref:d,className:te(at.root,u==="entered"&&at.entered),style:L({pointerEvents:"all",overflow:"hidden",minHeight:_e,transition:me("height")},u==="entered"&&{overflow:"visible"},{},u==="exited"&&!e&&{visibility:"hidden"})},p),a.createElement("div",{ref:o,className:wt,style:{display:"flex",width:"100%"}},r))})});vt.displayName="Collapse";var st={right:"left",left:"right",bottom:"up",top:"down"},Zt=function(t){return"anchorOrigin"+$e(t)},Xt=function(){};function ve(t,i){return t.reduce(function(r,e){return e==null?r:function(){for(var n=arguments.length,o=new Array(n),s=0;s<n;s++)o[s]=arguments[s];var d=[].concat(o);i&&d.indexOf(i)===-1&&d.push(i),r.apply(this,d),e.apply(this,d)}},Xt)}var Yt=typeof window<"u"?a.useLayoutEffect:a.useEffect;function lt(t){var i=a.useRef(t);return Yt(function(){i.current=t}),a.useCallback(function(){return i.current.apply(void 0,arguments)},[])}var Ve,yt=a.forwardRef(function(t,i){var r=t.children,e=t.className,n=t.autoHideDuration,o=t.disableWindowBlurListener,s=o!==void 0&&o,d=t.onClose,l=t.id,u=t.open,p=t.SnackbarProps,m=p===void 0?{}:p,g=a.useRef(),w=lt(function(){d&&d.apply(void 0,arguments)}),y=lt(function(b){d&&b!=null&&(g.current&&clearTimeout(g.current),g.current=setTimeout(function(){w(null,"timeout",l)},b))});a.useEffect(function(){return u&&y(n),function(){g.current&&clearTimeout(g.current)}},[u,n,y]);var v=function(){g.current&&clearTimeout(g.current)},E=a.useCallback(function(){n!=null&&y(.5*n)},[n,y]);return a.useEffect(function(){if(!s&&u)return window.addEventListener("focus",E),window.addEventListener("blur",v),function(){window.removeEventListener("focus",E),window.removeEventListener("blur",v)}},[s,E,u]),a.createElement("div",Object.assign({ref:i},m,{className:te(Gt,e),onMouseEnter:function(b){m.onMouseEnter&&m.onMouseEnter(b),v()},onMouseLeave:function(b){m.onMouseLeave&&m.onMouseLeave(b),E()}}),r)});yt.displayName="Snackbar";var Jt=Ee({root:(Ve={display:"flex",flexWrap:"wrap",flexGrow:1},Ve[Re]={flexGrow:"initial",minWidth:"288px"},Ve)}),Xe=a.forwardRef(function(t,i){var r=t.className,e=ye(t,["className"]);return a.createElement("div",Object.assign({ref:i,className:te(Jt.root,r)},e))});Xe.displayName="SnackbarContent";var be=Ee({root:{backgroundColor:"#313131",fontSize:"0.875rem",lineHeight:1.43,letterSpacing:"0.01071em",color:"#fff",alignItems:"center",padding:"6px 16px",borderRadius:"4px",boxShadow:"0px 3px 5px -1px rgba(0,0,0,0.2),0px 6px 10px 0px rgba(0,0,0,0.14),0px 1px 18px 0px rgba(0,0,0,0.12)"},lessPadding:{paddingLeft:"20px"},default:{backgroundColor:"#313131"},success:{backgroundColor:"#43a047"},error:{backgroundColor:"#d32f2f"},warning:{backgroundColor:"#ff9800"},info:{backgroundColor:"#2196f3"},message:{display:"flex",alignItems:"center",padding:"8px 0"},action:{display:"flex",alignItems:"center",marginLeft:"auto",paddingLeft:"16px",marginRight:"-8px"}}),ct="notistack-snackbar",Et=a.forwardRef(function(t,i){var r=t.id,e=t.message,n=t.action,o=t.iconVariant,s=t.variant,d=t.hideIconVariant,l=t.style,u=t.className,p=o[s],m=n;return typeof m=="function"&&(m=m(r)),a.createElement(Xe,{ref:i,role:"alert","aria-describedby":ct,style:l,className:te(Qt,$t(s),be.root,be[s],u,!d&&p&&be.lessPadding)},a.createElement("div",{id:ct,className:be.message},d?null:p,e),m&&a.createElement("div",{className:be.action},m))});Et.displayName="MaterialDesignContent";var xe,ze,je,Oe,Ue,en=a.memo(Et),tn=Ee({wrappedRoot:{width:"100%",position:"relative",transform:"translateX(0)",top:0,right:0,bottom:0,left:0,minWidth:"288px"}}),nn=function(t){var i=a.useRef(),r=a.useState(!0),e=r[0],n=r[1],o=ve([t.snack.onClose,t.onClose]),s=a.useCallback(function(){i.current=setTimeout(function(){n(function(_){return!_})},125)},[]);a.useEffect(function(){return function(){i.current&&clearTimeout(i.current)}},[]);var d,l=t.snack,u=t.classes,p=t.Component,m=p===void 0?en:p,g=a.useMemo(function(){return function(_){_===void 0&&(_={});var U={containerRoot:!0,containerAnchorOriginTopCenter:!0,containerAnchorOriginBottomCenter:!0,containerAnchorOriginTopRight:!0,containerAnchorOriginBottomRight:!0,containerAnchorOriginTopLeft:!0,containerAnchorOriginBottomLeft:!0};return Object.keys(_).filter(function(V){return!U[V]}).reduce(function(V,Q){var ae;return L({},V,((ae={})[Q]=_[Q],ae))},{})}(u)},[u]),w=l.open,y=l.SnackbarProps,v=l.TransitionComponent,E=l.TransitionProps,b=l.transitionDuration,k=l.disableWindowBlurListener,D=l.content,T=ye(l,["open","SnackbarProps","TransitionComponent","TransitionProps","transitionDuration","disableWindowBlurListener","content","entered","requestClose","onEnter","onEntered","onExit","onExited"]),Z=L({direction:(d=T.anchorOrigin,d.horizontal!=="center"?st[d.horizontal]:st[d.vertical]),timeout:b},E),A=D;typeof A=="function"&&(A=A(T.id,T.message));var B=["onEnter","onEntered","onExit","onExited"].reduce(function(_,U){var V;return L({},_,((V={})[U]=ve([t.snack[U],t[U]],T.id),V))},{});return a.createElement(vt,{in:e,onExited:B.onExited},a.createElement(yt,{open:w,id:T.id,disableWindowBlurListener:k,autoHideDuration:T.autoHideDuration,className:te(tn.wrappedRoot,g.root,g[Zt(T.anchorOrigin)]),SnackbarProps:y,onClose:o},a.createElement(v,Object.assign({},Z,{appear:!0,in:w,onExit:B.onExit,onExited:s,onEnter:B.onEnter,onEntered:ve([B.onEntered,function(){t.snack.requestClose&&o(null,"instructed",t.snack.id)}],T.id)}),A||a.createElement(m,Object.assign({},T)))))},we={default:20},De={default:6,dense:2},ut="."+wt,We=Ee({root:(xe={boxSizing:"border-box",display:"flex",maxHeight:"100%",position:"fixed",zIndex:1400,height:"auto",width:"auto",transition:me(["top","right","bottom","left","max-width"],{duration:300,easing:"ease"}),pointerEvents:"none"},xe[ut]={padding:De.default+"px 0px",transition:"padding 300ms ease 0ms"},xe.maxWidth="calc(100% - "+2*we.default+"px)",xe[Be]={width:"100%",maxWidth:"calc(100% - 32px)"},xe),rootDense:(ze={},ze[ut]={padding:De.dense+"px 0px"},ze),top:{top:we.default-De.default+"px",flexDirection:"column"},bottom:{bottom:we.default-De.default+"px",flexDirection:"column-reverse"},left:(je={left:we.default+"px"},je[Re]={alignItems:"flex-start"},je[Be]={left:"16px"},je),right:(Oe={right:we.default+"px"},Oe[Re]={alignItems:"flex-end"},Oe[Be]={right:"16px"},Oe),center:(Ue={left:"50%",transform:"translateX(-50%)"},Ue[Re]={alignItems:"center"},Ue)}),on=function(t){var i=t.classes,r=i===void 0?{}:i,e=t.anchorOrigin,n=t.dense,o=t.children,s=te(Kt,We[e.vertical],We[e.horizontal],We.root,r.containerRoot,r["containerAnchorOrigin"+$e(e)],n&&We.rootDense);return a.createElement("div",{className:s},o)},rn=a.memo(on),dt=function(t){return!(typeof t=="string"||a.isValidElement(t))},an=function(t){function i(r){var e;return(e=t.call(this,r)||this).enqueueSnackbar=function(n,o){if(o===void 0&&(o={}),n==null)throw new Error("enqueueSnackbar called with invalid argument");var s=dt(n)?n:o,d=dt(n)?n.message:n,l=s.key,u=s.preventDuplicate,p=ye(s,["key","preventDuplicate"]),m=Te(l),g=m?l:new Date().getTime()+Math.random(),w=Ut(p,e.props),y=L({id:g},p,{message:d,open:!0,entered:!1,requestClose:!1,persist:w("persist"),action:w("action"),content:w("content"),variant:w("variant"),anchorOrigin:w("anchorOrigin"),disableWindowBlurListener:w("disableWindowBlurListener"),autoHideDuration:w("autoHideDuration"),hideIconVariant:w("hideIconVariant"),TransitionComponent:w("TransitionComponent"),transitionDuration:w("transitionDuration"),TransitionProps:w("TransitionProps",!0),iconVariant:w("iconVariant",!0),style:w("style",!0),SnackbarProps:w("SnackbarProps",!0),className:te(e.props.className,p.className)});return y.persist&&(y.autoHideDuration=void 0),e.setState(function(v){if(u===void 0&&e.props.preventDuplicate||u){var E=function(D){return m?D.id===g:D.message===d},b=v.queue.findIndex(E)>-1,k=v.snacks.findIndex(E)>-1;if(b||k)return v}return e.handleDisplaySnack(L({},v,{queue:[].concat(v.queue,[y])}))}),g},e.handleDisplaySnack=function(n){return n.snacks.length>=e.maxSnack?e.handleDismissOldest(n):e.processQueue(n)},e.processQueue=function(n){var o=n.queue,s=n.snacks;return o.length>0?L({},n,{snacks:[].concat(s,[o[0]]),queue:o.slice(1,o.length)}):n},e.handleDismissOldest=function(n){if(n.snacks.some(function(l){return!l.open||l.requestClose}))return n;var o=!1,s=!1;n.snacks.reduce(function(l,u){return l+(u.open&&u.persist?1:0)},0)===e.maxSnack&&(s=!0);var d=n.snacks.map(function(l){return o||l.persist&&!s?L({},l):(o=!0,l.entered?(l.onClose&&l.onClose(null,"maxsnack",l.id),e.props.onClose&&e.props.onClose(null,"maxsnack",l.id),L({},l,{open:!1})):L({},l,{requestClose:!0}))});return L({},n,{snacks:d})},e.handleEnteredSnack=function(n,o,s){if(!Te(s))throw new Error("handleEnteredSnack Cannot be called with undefined key");e.setState(function(d){return{snacks:d.snacks.map(function(l){return l.id===s?L({},l,{entered:!0}):L({},l)})}})},e.handleCloseSnack=function(n,o,s){e.props.onClose&&e.props.onClose(n,o,s);var d=s===void 0;e.setState(function(l){var u=l.snacks,p=l.queue;return{snacks:u.map(function(m){return d||m.id===s?m.entered?L({},m,{open:!1}):L({},m,{requestClose:!0}):L({},m)}),queue:p.filter(function(m){return m.id!==s})}})},e.closeSnackbar=function(n){var o=e.state.snacks.find(function(s){return s.id===n});Te(n)&&o&&o.onClose&&o.onClose(null,"instructed",n),e.handleCloseSnack(null,"instructed",n)},e.handleExitedSnack=function(n,o){if(!Te(o))throw new Error("handleExitedSnack Cannot be called with undefined key");e.setState(function(s){var d=e.processQueue(L({},s,{snacks:s.snacks.filter(function(l){return l.id!==o})}));return d.queue.length===0?d:e.handleDismissOldest(d)})},e.enqueueSnackbar,e.closeSnackbar,e.state={snacks:[],queue:[],contextValue:{enqueueSnackbar:e.enqueueSnackbar.bind(et(e)),closeSnackbar:e.closeSnackbar.bind(et(e))}},e}return ht(i,t),i.prototype.render=function(){var r=this,e=this.state.contextValue,n=this.props,o=n.domRoot,s=n.children,d=n.dense,l=d!==void 0&&d,u=n.Components,p=u===void 0?{}:u,m=n.classes,g=this.state.snacks.reduce(function(y,v){var E,b=$e(v.anchorOrigin),k=y[b]||[];return L({},y,((E={})[b]=[].concat(k,[v]),E))},{}),w=Object.keys(g).map(function(y){var v=g[y],E=v[0];return a.createElement(rn,{key:y,dense:l,anchorOrigin:E.anchorOrigin,classes:m},v.map(function(b){return a.createElement(nn,{key:b.id,snack:b,classes:m,Component:p[b.variant],onClose:r.handleCloseSnack,onEnter:r.props.onEnter,onExit:r.props.onExit,onExited:ve([r.handleExitedSnack,r.props.onExited],b.id),onEntered:ve([r.handleEnteredSnack,r.props.onEntered],b.id)})}))});return a.createElement(gt.Provider,{value:e},s,o?Ot.createPortal(w,o):w)},ft(i,[{key:"maxSnack",get:function(){return this.props.maxSnack||re.maxSnack}}]),i}(a.Component),Ct=function(){return a.useContext(gt)};const J={card:"_card_1a398_7",actionRoot:"_actionRoot_1a398_11",icons:"_icons_1a398_16",expand:"_expand_1a398_22",expandOpen:"_expandOpen_1a398_29",stackTraceContainer:"_stackTraceContainer_1a398_33"},St=a.forwardRef((t,i)=>{const{id:r,message:e,iconVariant:n,error:o,hideIconVariant:s,...d}=t,{closeSnackbar:l}=Ct(),u=c.useTheme(),[p,m]=a.useState(!1),g=a.useCallback(()=>{m(v=>!v)},[]),w=a.useCallback(()=>{l(r)},[r,l]),y=o?.message||String(e);return h.jsx(Xe,{ref:i,className:c.clsx(J.root,"error-snackbar"),children:h.jsxs(H.Card,{className:J.card,style:{backgroundColor:u.palette.error.dark,border:`1px solid ${u.palette.error.dark}`},children:[h.jsxs(H.CardActions,{className:J.actionRoot,children:[s?null:n?.error,h.jsx(H.Typography,{variant:"body2",component:"div",className:J.typography,style:{color:u.palette.text.primary},children:y}),h.jsx("div",{style:{flex:"1 1 auto"}}),h.jsxs("div",{className:J.icons,children:[o?h.jsx(H.IconButton,{"aria-label":"Show more",size:"small",className:c.clsx(J.expand,{[J.expandOpen]:p}),style:{color:u.palette.action.active},onClick:g,children:h.jsx(Ke.ExpandMore,{})}):null,h.jsx(H.IconButton,{size:"small",className:J.expand,style:{color:u.palette.action.active},onClick:w,children:h.jsx(Ke.Close,{fontSize:"small"})})]})]}),o?h.jsx(H.Collapse,{in:p,timeout:"auto",unmountOnExit:!0,children:h.jsx("div",{className:J.stackTraceContainer,style:{backgroundColor:u.palette.error.light,borderTop:`1px solid ${u.palette.error.main}`},children:h.jsx(c.L7,{error:o,hideLineNumbers:!0})})}):null]})})});St.displayName="ToastError";const Tt=a.memo(a.forwardRef((t,i)=>{const{commands:r,commandHook:e,scope:n="workbook",disabled:o=!1,...s}=t,d=c.T(u=>{const p={variant:c.yo.Menuitem,parentFloat:u.floatReference,commandHook:e,scope:n,disabled:o},m=h.jsxs(h.Fragment,{children:[h.jsx(c.vr,{...p,command:r.getCommand("newWorkbook"),icon:c.x5(h.jsx(c.Mi,{}))}),h.jsx(c.Pt,{orientation:"horizontal"}),h.jsx(c.vr,{...p,command:r.getCommand("openWorkbook"),icon:c.x5(h.jsx(c.zi,{}))}),h.jsx(c.v4,{...p,commands:r,quickCommand:"saveWorkbook",icon:c.x5(h.jsx(c.Vi,{})),createPopupPanel:g=>{const w={...p,parentFloat:g.floatReference,scope:"saveWorkbook"},y=[];return c.WorkbookIO.getWriteFormats().forEach(v=>{if(v.isDefault)return;let E=null;v.key==="CSV"?E=c.x5(h.jsx(c.Li,{})):v.key==="Excel"&&(E=c.x5(h.jsx(c.Hi,{})));const b=r.getCommand(`saveWorkbookAs${v.key}`);b?y.push(a.createElement(c.vr,{...w,key:v.key,command:b,icon:E})):console.warn(`Unable to resolve command: 'saveWorkbookAs${v.key}'`)}),c.L5({...g,children:y,onClick:()=>{g.closeFloatAll()}})}})]});return c.L5({...u,children:m,onClick:g=>{g.isDefaultPrevented||u.closeFloatAll()}})},[o,r,e,n]),l="File";return h.jsx(c.v4,{commands:r,disabled:o,commandHook:e,scope:n,label:l,tooltip:"Options for saving and loading the workbook.",sx:{paddingBottom:"0px","& button":{paddingTop:"0px",paddingBottom:"0px",height:u=>`calc(1.25rem + ${u.spacing(2)}px)`}},...s,createPopupPanel:d,icon:h.jsx(c.dl,{className:"label",icon:null,label:l})})}));Tt.displayName="StandaloneFileCommandButton";const sn=h.jsx(c.n2,{label:"SheetXL",description:"Visit me at sheetxl.com.",children:h.jsx(H.Box,{sx:{width:"24px",height:"24px",marginBottom:"4px",marginLeft:"6px"},children:h.jsx(c.ed,{onClick:()=>{window?.open("https://www.sheetxl.com","_blank")},style:{width:"24px",height:"24px",cursor:"pointer"}})})}),Lt=a.memo(a.forwardRef((t,i)=>{const{commands:r,workbook:e,logo:n=sn,mainElement:o,showFileMenu:s=!0,showAppearanceMenu:d=!0,...l}=t,{reference:u}=c.y3(),[p,{width:m}]=c.useMeasure(),g=m<530,w=s?h.jsx(Tt,{commands:r,commandHook:{beforeExecute(){u?.closeAll()},onError(b,k,D){}}}):null,y=d?h.jsx(c.AppearanceCommandButton,{commands:r,commandHook:{beforeExecute(){u?.closeAll()},onError(b,k,D){}}}):null,v=a.useMemo(()=>({paddingLeft:b=>b.spacing(1),paddingRight:b=>b.spacing(1)}),[]),E=a.useRef(null);return h.jsx(H.Box,{ref:c.mergeRefs([E,p,i]),...l,children:c.renderWorkbookToolbars({commands:r,renderCompact:g,workbook:e,selectWrapper:b=>h.jsxs(H.Box,{sx:{display:"flex",flex:"1",flexDirection:"row",alignItems:"stretch",gap:k=>k.spacing(1),paddingLeft:k=>k.spacing(1),paddingRight:k=>k.spacing(1)},children:[h.jsxs(H.Box,{sx:{display:"flex",flexDirection:"row",alignItems:"center",flex:"1 1 100%",gap:k=>k.spacing(.5)},children:[n,h.jsxs(H.Box,{sx:{display:"flex",flexDirection:"row",alignItems:"center",gap:k=>k.spacing(.25)},children:[w,b]})]}),h.jsx(H.Box,{sx:{display:"flex",flexDirection:"row",flex:"1 1 300%",overflow:"hidden",alignItems:"center",justifyContent:"center"},children:o}),h.jsx(H.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"end",flex:g&&!y?"0 0 auto":"1 1 100%"},children:y})]}),selectProps:v,toolbarsProps:{Home:{sx:{}}}})})}));Lt.displayName="StandaloneWorkbookToolbar";const Mt=a.memo(a.forwardRef((t,i)=>{const{workbook:r,setWorkbook:e,refWorkbookTitle:n,titleWorkbook:o,setWorkbookTitle:s,titlePlaceHolder:d,children:l,undoManager:u,commands:p,importExportDisabled:m,themeModeOptions:g}=t,w=Ct(),y=w?w.enqueueSnackbar:()=>{},v=w?w.closeSnackbar:()=>{},[E,b]=a.useState({isMounted:!1,label:null,starting:new Map,running:new Map}),k=a.useCallback(()=>{b(O=>({...O,isMounted:!0}))},[]),D=a.useCallback(()=>{b(O=>({...O,isMounted:!1}))},[]),T=c.al(),Z=c.ll(),A=c.sl(),B=a.useRef(new Set),_=a.useMemo(()=>{const O=(C,S)=>{if(S?.onceKey){if(B.current.has(S.onceKey))return;const M=new Set(B.current);M.add(S.onceKey),B.current=M}const W={variant:S?.type??c.yt.Info,anchorOrigin:{vertical:"top",horizontal:"center"},preventDuplicate:S?.preventDuplicate,persist:S?.persist??S?.type===c.yt.Error,action:M=>h.jsx(H.IconButton,{onClick:()=>v(M),children:h.jsx(Ke.CancelOutlined,{})})};S?.enqueueProps&&Object.assign(W,S.enqueueProps),C||console.log("message is 'null'",S),y(C??"Alert",W)};return{showMessage:O,showBusy:(C,S)=>{let W=null;const M=new Promise(N=>{W=N});return b(N=>{const I=new Map(N.starting);return I.set(M,W),{...N,label:C,starting:I}}),M},showWindow:(C,S,W)=>{const M={...S,onKeyDown:N=>{p?.dispatchToFocusedCommand(N),N.isDefaultPrevented()||N.isPropagationStopped()||S?.onKeyDown?.(N)}};return T(C,{sort:()=>Promise.resolve().then(()=>require("./DkMBDN---q9jUa8V.cjs")),numberFormat:()=>Promise.resolve().then(()=>require("./D6E9xEe6tjbfqtEm.cjs")),hyperlink:()=>Promise.resolve().then(()=>require("./B98cTi8NhLFwk-0Q.cjs")),comments:()=>Promise.resolve().then(()=>require("./-Z_xfLHIzayq6e-C.cjs")),find:()=>Promise.resolve().then(()=>require("./DggumD9iQqyO3FFa.cjs")),tableDetails:()=>Promise.resolve().then(()=>require("./BsJ8nFqSJFJDsuan.cjs")),tableNew:()=>Promise.resolve().then(()=>require("./ByHotNG2i_czKEr8.cjs")),namedDetails:()=>Promise.resolve().then(()=>require("./BvCYlgtHsPgA_aNK.cjs"))}[C],M,W)},showOptions:Z,showInputOptions:A,showError:C=>{let S,W=c.yt.Error,M="Unknown Error";typeof C=="string"?M=C:C instanceof Error&&(S=C,C.message&&(M=C.message)),C instanceof oe.PartialError&&(W=c.yt.Info),O(M,{type:W,enqueueProps:{error:S}})}}},[]),U=a.useCallback(()=>{},[]),V=(O=>{const{workbook:C,setWorkbook:S,importExportDisabled:W,workbookTitle:M="export",setWorkbookTitle:N,notifier:I,requestWorkbookTitle:X,themeModeOptions:R,undoManager:Ce,commands:$,onExecute:le}=O,Se=c.T(R?.onForceModeChange,[R?.onForceModeChange]),Ie=c.T(R?.onForceLightGridChange,[R?.onForceLightGridChange]),ce=c.T(R?.onForceLightImagesChange,[R?.onForceLightImagesChange]),qe=c.T(async(j=null,K=null)=>{const f=[];let x,P=null,G=null;if(typeof j=="string"?G=j:P=j,x=P?j:await c.Yt.openFileDialog(G??c.WorkbookIO.getAllReadFormatTypeAsString().join(",")),!x)return null;const ee={source:x,constructorOptions:K,onWarning:Ae=>{f.push(Ae)}},ge=await c.WorkbookIO.read(ee,I);return f.length>0&&(I?.showMessage?.("Some elements were not able to be imported. See console for details."),console.warn(`Import warnings:
|
|
11
11
|
`+f.join(`
|
|
12
|
-
`))),ge},[le,I,C]),fe=c.T(async(j,K,f)=>{if(!K&&X){const x=await X("Enter Workbook name to "+(f.isDefault?"Save.":`Export as ${f.description}.`));return x!==null&&c.WorkbookIO.writeFile(x,j,{formatType:f.key})}return c.WorkbookIO.writeFile(K,j,{formatType:f.key})},[I,C,X]),q=a.useCallback(()=>({contains:j=>!0,focus(){}}),[]),ne=a.useMemo(()=>{const j=[];W||(c.WorkbookIO.getWriteFormats().forEach(f=>{const x=f.isDefault,P={label:x?"Save Workbook":`Save Workbook as ${f.description}`,scopedLabels:{workbook:"Save",saveWorkbook:`as ${f.description}`},tags:f.tags,description:`Save the workbook to the desktop${x?"":` as ${f.description}`}.`};x&&(P.shortcut={key:"S",modifiers:[c.Z.Ctrl]},j.push(new c.Qt("saveWorkbookAs",q,{label:"Save Workbook As…",scopedLabels:{workbook:"Save as…",saveWorkbook:"as…"},shortcut:[{key:"S",modifiers:[c.Z.Shift,c.Z.Ctrl]},{key:"F12"}],description:"Save the workbook to the desktop with the provided name."},()=>{fe(C,null,f).catch(ee=>{I?.showError?.(ee)})})));const $=x?"saveWorkbook":`saveWorkbookAs${f.key}`;j.push(new c.Qt($,q,P,ee=>{fe(C,ee??M,f).catch(ge=>{I?.showError?.(ge)})}))}),j.push(new c.Qt("openWorkbook",q,{label:"Open Workbook…",scopedLabels:{workbook:"Open…"},description:"Open a workbook from the desktop.",shortcut:{key:"O",modifiers:[c.Z.Ctrl]}},async(f=null)=>{const x={date1904:C.isDate1904(),...C.options};try{const P=await qe(f,x);if(!P)return;const $=P.title,ee=P.workbook,ge=ee.getSelectedSheet();if(P.formatType.mimeType==="text/csv"){const Ae=C.findValidSheetName($);await C.doBatch(async()=>{const Ye=ge.getUsedRange();if(!Ye)return void I?.showMessage("The file appears to be blank.");await C.getSheets().add({name:Ae,autoSelect:!0}).getRange({colStart:0,rowStart:0,colEnd:0,rowEnd:0}).copyFrom(Ye)},`Import CSV '${$}'`)}else C?.close(),N?.($),S(ee)}catch(P){I?.showError?.(P)}})),j.push(new c.Qt("openWorkbookFromUrl",q,{label:"Open Workbook From Web",scopedLabels:{insert:"From Web",workbook:"From Web…"},description:"Open a workbook from the web."},async function(f){if(!f){const x=await I?.showInputOptions?.({title:"Open Workbook from the Web",description:"Enter the web address for the workbook to open.",inputLabel:"Address",initialValue:"https://www.sheetxl.com/examples/features-checklist.xlsx",inputProps:{style:{minWidth:"440px"}},options:["Open"]});if(x.option!=="Open")return;f=x.input}f&&console.log("openWorkbookFromUrl",f)})));let K=[];return R&&(K=[new c.Qt("themeMode",q,{label:"Light/Dark Mode",scopedLabels:{appearance:"Light/Dark Mode"},description:"Toggle the application styling between light and dark mode."}),new c.Qt("defaultThemeMode",q,{label:"Use System Light/Dark Mode",scopedLabels:{appearance:"Use System Default"},description:"Use the system settings to determine styling for light and dark mode."}),new c.Qt("forceLightGrid",q,{label:"Force Light Grid",description:"Force the grid to always render in light mode if dark mode is being used. This is ensures that the grid will render the colors as specified in another tools (for example Excel)."}),new c.Qt("forceLightImages",q,{label:"Force Light Images",description:"Force the images to always render in light mode if dark mode is being used. This is ensures that the images will render the colors as specified in another tools (for example Excel). This only has any effect if the grid is in dark mode."})]),[...j,...K,new c.jt("help",q,{label:"Show Help",description:"Provide Help.",shortcut:{key:"F1"}},()=>{}),new c.jt("showKeyboardShortcuts",q,{label:"Keyboard Shortcuts",description:"Show keyboard shortcuts.",shortcut:{key:"/",modifiers:[c.Z.Ctrl]}},()=>{}),new c.Qt("gotoUrlGithub",q,{label:"Github",description:"Download examples, explore source code, and leave a star."},()=>{window?.open("https://github.com/sheetxl/sheetxl")}),new c.Qt("gotoUrlDiscord",q,{label:"Discord",description:"Join our community on discord."},()=>{window?.open("https://discord.gg/NTKdwUgK9p")}),new c.Qt("gotoUrlDocumentation",q,{label:"Documentation",description:"Read the documentation."},()=>{window?.open("https://www.sheetxl.com/docs")}),new c.Qt("gotoUrlIssue",q,{label:"Create Issue",description:"Create an issue to identify a bug or a feature request."},()=>{window?.open("https://github.com/sheetxl/sheetxl/issues")})]},[C,M,I,W,R,Q,Ce]),z=a.useMemo(()=>{let j=null;return j=Q?Q.createChildGroup(q,"standaloneWorkbook",!1):new c.He(q,"standaloneWorkbook"),j.addCommands(ne,!0),j},[Q,ne]);c.So({manager:Ce,commands:z,notifier:I});const{themeMode:he}=c.useResolvedThemeMode();a.useEffect(()=>{if(!R||!z)return;const j=R.forceMode==="dark"||!R.forceMode&&he==="dark";z.getCommand("themeMode").update({state:R.forceMode??null,label:j?"Dark Mode":"Light Mode",scopedLabels:{appearance:j?"Dark Mode":"Light Mode"}}).updateCallback(()=>{Se(j?c.ThemeMode.Light:c.ThemeMode.Dark)}),z.getCommand("defaultThemeMode").update({state:!R.forceMode}).updateCallback(()=>{Se(null)}),z.getCommand("forceLightGrid").update({state:R.forceLightGrid}).updateCallback(()=>{Ie(!R.forceLightGrid)}),z.getCommand("forceLightImages").update({state:R.forceLightImages}).updateCallback(()=>{ce(!R.forceLightImages)})},[he,R,ne]);const{showModal:Ne}=c.E5();return a.useEffect(()=>{const j=()=>new Promise((K,f)=>{const x=a.lazy(()=>Promise.resolve().then(()=>require("./Tfh1HV0EKshDqS7E.cjs"))),P=Ne(x,{title:"Shortcut Keys Reference",commands:z,onDone:()=>{P.hide()},TransitionProps:{onExited:()=>{K(!0)}}})});z.getCommand("showKeyboardShortcuts").updateCallback(()=>j()),z.getCommand("help").updateCallback(()=>j())},[ne,z]),z})({workbook:r,setWorkbook:e,importExportDisabled:m,workbookTitle:o,setWorkbookTitle:s,commands:p,requestWorkbookTitle:O=>new Promise(C=>{n.current?n.current.requestWorkbookTitle((S,W)=>{C(S)},{selectAll:!0,requestReason:O}):C(d)}),themeModeOptions:g,undoManager:u,notifier:_,onExecute:U});a.useEffect(()=>{E.starting.size<=0||!E.isMounted||b(O=>{const C=new Map(O.running);return O.starting.forEach((S,W)=>{const M=()=>{b(N=>{const I=new Map(N.running);return I.delete(W),{...N,running:I}})};C.set(W,M),S(M)}),{...O,starting:new Map,running:C}})},[E]);const[G,ae]=a.useState(null);a.useEffect(()=>{E.starting.size!==0||E.running.size!==0?ae(h.jsx(c.jt$1,{icon:h.jsx(c.Ka,{sx:{transform:"scale(0.7)",marginLeft:"-6px"}}),panel:!0,label:E.label,onMount:k,onUnmount:D,sx:{position:"absolute",left:"0",top:"0",width:"100%",height:"100%",zIndex:"9999"}})):ae(null)},[E.starting,E.running]);const F=a.useMemo(()=>h.jsx(c.HelpCommandButton,{commands:V,disableHover:!0,sx:{padding:"0"},buttonProps:{sx:{maxHeight:"22px"}}}),[V]),se={notifier:_,commands:V};return r&&(se.statusBarProps={childrenEnd:F}),h.jsxs(h.Fragment,{children:[G,l?a.cloneElement(l,se):null]})}));Mt.displayName="SnackbarAndCommandsWrapper";const jt=a.memo(a.forwardRef((t,i)=>{const{className:r,sx:e,style:n,onElementLoad:o,onError:s,undoManager:d,errorPanel:l=c.Yt$1,onKeyDown:u,workbook:p,createWorkbookOptions:m,onWorkbookChange:g,logo:w,importExportDisabled:v=!1,themeModeOptions:y,autoFocus:E=!1,commands:b,title:k,onTitleChange:D,titleProps:T,...Z}=t,A=a.useRef(null),B=c.T(g,[g]),_=c.T(D??T?.onTitleChange,[D??T?.onTitleChange]),U=T?.placeHolder??"Untitled",V=y?.forceMode,{themeMode:G,source:ae}=c.useResolvedThemeMode({mode:V}),F=a.useMemo(()=>({...y,light:c.tl(!1,oe.CommonUtils.deepMerge(y?.theme??{},y?.light??{})),dark:c.tl(!0,oe.CommonUtils.deepMerge(y?.theme??{},y?.dark??{}))}),[y]),se=G===c.ThemeMode.Dark,[O,C]=a.useState(null);a.useEffect(()=>{C(d??new oe.UndoManager)},[d]);const[S,W]=a.useState(null),[M,N]=a.useState(null),I=c.Rd();a.useLayoutEffect(()=>{if(!p||Object.keys(p).length===0&&!oe.CommonUtils.isPromiseLike(p)){const f={theme:I.getDefaultTheme(),...m};N(new oe.Workbook(f))}else N(p)},[p]),a.useLayoutEffect(()=>{if(M){if(M instanceof oe.Workbook)return W({workbook:M}),void(p!==M&&B?.(M));(async()=>{try{let f,x=await Promise.resolve(M);x&&x.source&&(x=await c.WorkbookIO.read(x)),x.workbook?(le(x.title),f=x.workbook):f=x,B?.(f),W({workbook:f})}catch(f){B?.(null),W({error:f})}})()}},[M]);const[X,R]=a.useState(null);a.useEffect(()=>{if(!O||!S)return;O.clear();const f=S?.workbook?.getTransactions();if(f)return f.addListener({onCommitEnd:x=>{x.getDescription()?O.addUndoOperation({description:x.getDescription(),undo:()=>(f.revert(x.getId()),X.source?.focus(),()=>{f.restore(x.getId()),X.source?.focus()})}):console.warn("commit has no description",x)}})},[O,S,X]);const Ce=c.T(f=>{f?O.setRepeatableOperation({description:f.label(),repeat:async()=>f.execute()}):O.setRepeatableOperation(null)},[O]),[Q,le]=a.useState(k??T?.title??"");a.useEffect(()=>{le(k??T?.title??"")},[k??T?.title]),a.useEffect(()=>{_?.(Q)},[Q]);const[Se,Ie]=a.useState(null),ce=a.useMemo(()=>{const f=()=>({contains:x=>!0,focus(){}});return b?b.createChildGroup(f,"application",!1):new c.He(f,"application")},[b]),qe=c.T(f=>{Ie(f.source.getViewportElement()),R(f),ce.activate("sheet"),o?.(f)},[ce]);a.useEffect(()=>{X&&E&&X.source?.focus(typeof E=="object"?E:void 0)},[X]);const fe=a.useRef(null),q=a.useCallback(f=>{let x=null;return T?.hidden||(x=h.jsx(c.WorkbookTitle,{...T,style:{maxWidth:"100%",...T?.style},workbook:A.current,ref:fe,title:Q,placeHolder:U,onTitleChange:P=>{le(P)}})),h.jsx(Lt,{...f,logo:w,mainElement:x,showFileMenu:!v,showAppearanceMenu:!!(F?.onForceLightGridChange||F?.onForceLightImagesChange||F?.onForceModeChange)})},[w,Q,T,F,v,ce]);a.useEffect(()=>{const f=x=>x.preventDefault();return A.current?.addEventListener("wheel",f,{passive:!1}),()=>{A.current?.removeEventListener("wheel",f)}},[]);const ne=a.useMemo(()=>h.jsx(c.jt$1,{transparentBackground:!0,sx:e,style:n}),[e,n]),z=a.useCallback(({error:f})=>(s?.(f),h.jsx(l,{sx:e,style:n,error:f??"Unable to display empty workbook."})),[e,n,s]),he=a.useMemo(()=>({...e,"& .SnackbarContainer-root":{position:"absolute !important"},"& .notistack-Snackbar":{minWidth:"unset"},"& .notistack-MuiContent *":{fontFamily:f=>f.typography.fontFamily},"& #notistack-snackbar":{maxWidth:"560px",whiteSpace:"pre-wrap"},"*":{userSelect:"none"}}),[e]),Ne=c.mergeRefs([A,i]),j=a.useMemo(()=>{if(!S)return ne;if(S.error||!S.workbook)return z({error:S.error});let f=null,x=null,P=!1;return F&&(f=se?F.dark:F.light,x=se&&!F.forceLightGrid?F.dark:F.light,P=F.forceLightImages),h.jsx(c.WorkbookElement,{sx:he,style:n,tabIndex:0,autoFocus:!0,workbook:S.workbook,ref:Ne,renderToolbar:q,onElementLoad:qe,onRepeatCommandChange:Ce,onKeyDown:$=>{u?.($)},gridTheme:x,headersTheme:f,forceLightImages:P,className:c.clsx(r,"sheetxl-workbook"),onContextMenu:$=>$.preventDefault(),...Z},"WorkbookElement")},[S,Q,O,ne,F,Z,q,he]);let K=h.jsx(Wt,{fallbackRender:z,children:h.jsx(an,{maxSnack:3,domRoot:Se,anchorOrigin:{vertical:"bottom",horizontal:"right"},autoHideDuration:3500,onClose:(f,x,P)=>{A.current?.focus()},Components:{error:St},iconVariant:{success:h.jsx(H.SvgIcon,{style:{marginRight:"8px"},children:h.jsx("path",{d:"M20,12A8,8 0 0,1 12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4C12.76,4 13.5,4.11 14.2, 4.31L15.77,2.74C14.61,2.26 13.34,2 12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0, 0 22,12M7.91,10.08L6.5,11.5L11,16L21,6L19.59,4.58L11,13.17L7.91,10.08Z"})}),error:h.jsx(c.la,{style:{marginRight:"8px"}})},children:h.jsx(c.il,{children:h.jsx(Mt,{workbook:S?.workbook,setWorkbook:N,importExportDisabled:v,titlePlaceHolder:U,titleWorkbook:Q,setWorkbookTitle:le,refWorkbookTitle:fe,commands:ce,undoManager:O,themeModeOptions:F,children:j})})})});return F&&(K=h.jsxs(c.ThemeProvider,{theme:se?F.dark:F.light,children:[F.cssBaseline?h.jsx(H.CssBaseline,{}):null,K]})),K}));jt.displayName="EagerStandaloneWorkbook";const ln=Object.freeze(Object.defineProperty({__proto__:null,default:jt},Symbol.toStringTag,{value:"Module"}));exports.EagerStandaloneWorkbook=ln,exports.clsx=te;
|
|
12
|
+
`))),ge},[le,I,C]),fe=c.T(async(j,K,f)=>{if(!K&&X){const x=await X("Enter Workbook name to "+(f.isDefault?"Save.":`Export as ${f.description}.`));return x!==null&&c.WorkbookIO.writeFile(x,j,{formatType:f.key})}return c.WorkbookIO.writeFile(K,j,{formatType:f.key})},[I,C,X]),q=a.useCallback(()=>({contains:j=>!0,focus(){}}),[]),ne=a.useMemo(()=>{const j=[];W||(c.WorkbookIO.getWriteFormats().forEach(f=>{const x=f.isDefault,P={label:x?"Save Workbook":`Save Workbook as ${f.description}`,scopedLabels:{workbook:"Save",saveWorkbook:`as ${f.description}`},tags:f.tags,description:`Save the workbook to the desktop${x?"":` as ${f.description}`}.`};x&&(P.shortcut={key:"S",modifiers:[c.Z.Ctrl]},j.push(new c.Qe("saveWorkbookAs",q,{label:"Save Workbook As…",scopedLabels:{workbook:"Save as…",saveWorkbook:"as…"},shortcut:[{key:"S",modifiers:[c.Z.Shift,c.Z.Ctrl]},{key:"F12"}],description:"Save the workbook to the desktop with the provided name."},()=>{fe(C,null,f).catch(ee=>{I?.showError?.(ee)})})));const G=x?"saveWorkbook":`saveWorkbookAs${f.key}`;j.push(new c.Qe(G,q,P,ee=>{fe(C,ee??M,f).catch(ge=>{I?.showError?.(ge)})}))}),j.push(new c.Qe("openWorkbook",q,{label:"Open Workbook…",scopedLabels:{workbook:"Open…"},description:"Open a workbook from the desktop.",shortcut:{key:"O",modifiers:[c.Z.Ctrl]}},async(f=null)=>{const x={date1904:C.isDate1904(),...C.options};try{const P=await qe(f,x);if(!P)return;const G=P.title,ee=P.workbook,ge=ee.getSelectedSheet();if(P.formatType.mimeType==="text/csv"){const Ae=C.findValidSheetName(G);await C.doBatch(async()=>{const Ye=ge.getUsedRange();if(!Ye)return void I?.showMessage("The file appears to be blank.");await C.getSheets().add({name:Ae,autoSelect:!0}).getRange({colStart:0,rowStart:0,colEnd:0,rowEnd:0}).copyFrom(Ye)},`Import CSV '${G}'`)}else C?.close(),N?.(G),S(ee)}catch(P){I?.showError?.(P)}})),j.push(new c.Qe("openWorkbookFromUrl",q,{label:"Open Workbook From Web",scopedLabels:{insert:"From Web",workbook:"From Web…"},description:"Open a workbook from the web."},async function(f){if(!f){const x=await I?.showInputOptions?.({title:"Open Workbook from the Web",description:"Enter the web address for the workbook to open.",inputLabel:"Address",initialValue:"https://www.sheetxl.com/examples/features-checklist.xlsx",inputProps:{style:{minWidth:"440px"}},options:["Open"]});if(x.option!=="Open")return;f=x.input}f&&console.log("openWorkbookFromUrl",f)})));let K=[];return R&&(K=[new c.Qe("themeMode",q,{label:"Light/Dark Mode",scopedLabels:{appearance:"Light/Dark Mode"},description:"Toggle the application styling between light and dark mode."}),new c.Qe("defaultThemeMode",q,{label:"Use System Light/Dark Mode",scopedLabels:{appearance:"Use System Default"},description:"Use the system settings to determine styling for light and dark mode."}),new c.Qe("forceLightGrid",q,{label:"Force Light Grid",description:"Force the grid to always render in light mode if dark mode is being used. This is ensures that the grid will render the colors as specified in another tools (for example Excel)."}),new c.Qe("forceLightImages",q,{label:"Force Light Images",description:"Force the images to always render in light mode if dark mode is being used. This is ensures that the images will render the colors as specified in another tools (for example Excel). This only has any effect if the grid is in dark mode."})]),[...j,...K,new c.Xe("help",q,{label:"Show Help",description:"Provide Help.",shortcut:{key:"F1"}},()=>{}),new c.Xe("showKeyboardShortcuts",q,{label:"Keyboard Shortcuts",description:"Show keyboard shortcuts.",shortcut:{key:"/",modifiers:[c.Z.Ctrl]}},()=>{}),new c.Qe("gotoUrlGithub",q,{label:"Github",description:"Download examples, explore source code, and leave a star."},()=>{window?.open("https://github.com/sheetxl/sheetxl")}),new c.Qe("gotoUrlDiscord",q,{label:"Discord",description:"Join our community on discord."},()=>{window?.open("https://discord.gg/NTKdwUgK9p")}),new c.Qe("gotoUrlDocumentation",q,{label:"Documentation",description:"Read the documentation."},()=>{window?.open("https://www.sheetxl.com/docs")}),new c.Qe("gotoUrlIssue",q,{label:"Create Issue",description:"Create an issue to identify a bug or a feature request."},()=>{window?.open("https://github.com/sheetxl/sheetxl/issues")})]},[C,M,I,W,R,$,Ce]),z=a.useMemo(()=>{let j=null;return j=$?$.createChildGroup(q,"standaloneWorkbook",!1):new c.Kt(q,"standaloneWorkbook"),j.addCommands(ne,!0),j},[$,ne]);c.wo({manager:Ce,commands:z,notifier:I});const{themeMode:he}=c.useResolvedThemeMode();a.useEffect(()=>{if(!R||!z)return;const j=R.forceMode==="dark"||!R.forceMode&&he==="dark";z.getCommand("themeMode").update({state:R.forceMode??null,label:j?"Dark Mode":"Light Mode",scopedLabels:{appearance:j?"Dark Mode":"Light Mode"}}).updateCallback(()=>{Se(j?c.ThemeMode.Light:c.ThemeMode.Dark)}),z.getCommand("defaultThemeMode").update({state:!R.forceMode}).updateCallback(()=>{Se(null)}),z.getCommand("forceLightGrid").update({state:R.forceLightGrid}).updateCallback(()=>{Ie(!R.forceLightGrid)}),z.getCommand("forceLightImages").update({state:R.forceLightImages}).updateCallback(()=>{ce(!R.forceLightImages)})},[he,R,ne]);const{showModal:Ne}=c.E5();return a.useEffect(()=>{const j=()=>new Promise((K,f)=>{const x=a.lazy(()=>Promise.resolve().then(()=>require("./DW0q0AyrJofzss0y.cjs"))),P=Ne(x,{title:"Shortcut Keys Reference",commands:z,onDone:()=>{P.hide()},TransitionProps:{onExited:()=>{K(!0)}}})});z.getCommand("showKeyboardShortcuts").updateCallback(()=>j()),z.getCommand("help").updateCallback(()=>j())},[ne,z]),z})({workbook:r,setWorkbook:e,importExportDisabled:m,workbookTitle:o,setWorkbookTitle:s,commands:p,requestWorkbookTitle:O=>new Promise(C=>{n.current?n.current.requestWorkbookTitle((S,W)=>{C(S)},{selectAll:!0,requestReason:O}):C(d)}),themeModeOptions:g,undoManager:u,notifier:_,onExecute:U});a.useEffect(()=>{E.starting.size<=0||!E.isMounted||b(O=>{const C=new Map(O.running);return O.starting.forEach((S,W)=>{const M=()=>{b(N=>{const I=new Map(N.running);return I.delete(W),{...N,running:I}})};C.set(W,M),S(M)}),{...O,starting:new Map,running:C}})},[E]);const[Q,ae]=a.useState(null);a.useEffect(()=>{E.starting.size!==0||E.running.size!==0?ae(h.jsx(c.$t,{icon:h.jsx(c.Ga,{sx:{transform:"scale(0.7)",marginLeft:"-6px"}}),panel:!0,label:E.label,onMount:k,onUnmount:D,sx:{position:"absolute",left:"0",top:"0",width:"100%",height:"100%",zIndex:"9999"}})):ae(null)},[E.starting,E.running]);const F=a.useMemo(()=>h.jsx(c.HelpCommandButton,{commands:V,disableHover:!0,sx:{padding:"0"},buttonProps:{sx:{maxHeight:"22px"}}}),[V]),se={notifier:_,commands:V};return r&&(se.statusBarProps={childrenEnd:F}),h.jsxs(h.Fragment,{children:[Q,l?a.cloneElement(l,se):null]})}));Mt.displayName="SnackbarAndCommandsWrapper";const jt=a.memo(a.forwardRef((t,i)=>{const{className:r,sx:e,style:n,onElementLoad:o,onError:s,undoManager:d,errorPanel:l=c.Ut,onKeyDown:u,workbook:p,createWorkbookOptions:m,onWorkbookChange:g,logo:w,importExportDisabled:y=!1,themeModeOptions:v,autoFocus:E=!1,commands:b,title:k,onTitleChange:D,titleProps:T,...Z}=t,A=a.useRef(null),B=c.T(g,[g]),_=c.T(D??T?.onTitleChange,[D??T?.onTitleChange]),U=T?.placeHolder??"Untitled",V=v?.forceMode,{themeMode:Q,source:ae}=c.useResolvedThemeMode({mode:V}),F=a.useMemo(()=>({...v,light:c.el(!1,oe.CommonUtils.deepMerge(v?.theme??{},v?.light??{})),dark:c.el(!0,oe.CommonUtils.deepMerge(v?.theme??{},v?.dark??{}))}),[v]),se=Q===c.ThemeMode.Dark,[O,C]=a.useState(null);a.useEffect(()=>{C(d??new oe.UndoManager)},[d]);const[S,W]=a.useState(null),[M,N]=a.useState(null),I=c.Rd();a.useLayoutEffect(()=>{if(!p||Object.keys(p).length===0&&!oe.CommonUtils.isPromiseLike(p)){const f={theme:I.getDefaultTheme(),...m};N(new oe.Workbook(f))}else N(p)},[p]),a.useLayoutEffect(()=>{if(M){if(M instanceof oe.Workbook)return W({workbook:M}),void(p!==M&&B?.(M));(async()=>{try{let f,x=await Promise.resolve(M);x&&x.source&&(x=await c.WorkbookIO.read(x)),x.workbook?(le(x.title),f=x.workbook):f=x,B?.(f),W({workbook:f})}catch(f){B?.(null),W({error:f})}})()}},[M]);const[X,R]=a.useState(null);a.useEffect(()=>{if(!O||!S)return;O.clear();const f=S?.workbook?.getTransactions();if(f)return f.addListener({onCommitEnd:x=>{x.getDescription()?O.addUndoOperation({description:x.getDescription(),undo:()=>(f.revert(x.getId()),X.source?.focus(),()=>{f.restore(x.getId()),X.source?.focus()})}):console.warn("commit has no description",x)}})},[O,S,X]);const Ce=c.T(f=>{f?O.setRepeatableOperation({description:f.label(),repeat:async()=>f.execute()}):O.setRepeatableOperation(null)},[O]),[$,le]=a.useState(k??T?.title??"");a.useEffect(()=>{le(k??T?.title??"")},[k??T?.title]),a.useEffect(()=>{_?.($)},[$]);const[Se,Ie]=a.useState(null),ce=a.useMemo(()=>{const f=()=>({contains:x=>!0,focus(){}});return b?b.createChildGroup(f,"application",!1):new c.Kt(f,"application")},[b]),qe=c.T(f=>{Ie(f.source.getViewportElement()),R(f),ce.activate("sheet"),o?.(f)},[ce]);a.useEffect(()=>{X&&E&&X.source?.focus(typeof E=="object"?E:void 0)},[X]);const fe=a.useRef(null),q=a.useCallback(f=>{let x=null;return T?.hidden||(x=h.jsx(c.WorkbookTitle,{...T,style:{maxWidth:"100%",...T?.style},workbook:A.current,ref:fe,title:$,placeHolder:U,onTitleChange:P=>{le(P)}})),h.jsx(Lt,{...f,logo:w,mainElement:x,showFileMenu:!y,showAppearanceMenu:!!(F?.onForceLightGridChange||F?.onForceLightImagesChange||F?.onForceModeChange)})},[w,$,T,F,y,ce]);a.useEffect(()=>{const f=x=>x.preventDefault();return A.current?.addEventListener("wheel",f,{passive:!1}),()=>{A.current?.removeEventListener("wheel",f)}},[]);const ne=a.useMemo(()=>h.jsx(c.$t,{transparentBackground:!0,sx:e,style:n}),[e,n]),z=a.useCallback(({error:f})=>(s?.(f),h.jsx(l,{sx:e,style:n,error:f??"Unable to display empty workbook."})),[e,n,s]),he=a.useMemo(()=>({...e,"& .SnackbarContainer-root":{position:"absolute !important"},"& .notistack-Snackbar":{minWidth:"unset"},"& .notistack-MuiContent *":{fontFamily:f=>f.typography.fontFamily},"& #notistack-snackbar":{maxWidth:"560px",whiteSpace:"pre-wrap"},"*":{userSelect:"none"}}),[e]),Ne=c.mergeRefs([A,i]),j=a.useMemo(()=>{if(!S)return ne;if(S.error||!S.workbook)return z({error:S.error});let f=null,x=null,P=!1;return F&&(f=se?F.dark:F.light,x=se&&!F.forceLightGrid?F.dark:F.light,P=F.forceLightImages),h.jsx(c.WorkbookElement,{sx:he,style:n,tabIndex:0,autoFocus:!0,workbook:S.workbook,ref:Ne,renderToolbar:q,onElementLoad:qe,onRepeatCommandChange:Ce,onKeyDown:G=>{u?.(G)},gridTheme:x,headersTheme:f,forceLightImages:P,className:c.clsx(r,"sheetxl-workbook"),onContextMenu:G=>G.preventDefault(),...Z},"WorkbookElement")},[S,$,O,ne,F,Z,q,he]);let K=h.jsx(Wt,{fallbackRender:z,children:h.jsx(an,{maxSnack:3,domRoot:Se,anchorOrigin:{vertical:"bottom",horizontal:"right"},autoHideDuration:3500,onClose:(f,x,P)=>{A.current?.focus()},Components:{error:St},iconVariant:{success:h.jsx(H.SvgIcon,{style:{marginRight:"8px"},children:h.jsx("path",{d:"M20,12A8,8 0 0,1 12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4C12.76,4 13.5,4.11 14.2, 4.31L15.77,2.74C14.61,2.26 13.34,2 12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0, 0 22,12M7.91,10.08L6.5,11.5L11,16L21,6L19.59,4.58L11,13.17L7.91,10.08Z"})}),error:h.jsx(c.aa,{style:{marginRight:"8px"}})},children:h.jsx(c.ol,{children:h.jsx(Mt,{workbook:S?.workbook,setWorkbook:N,importExportDisabled:y,titlePlaceHolder:U,titleWorkbook:$,setWorkbookTitle:le,refWorkbookTitle:fe,commands:ce,undoManager:O,themeModeOptions:F,children:j})})})});return F&&(K=h.jsxs(c.ThemeProvider,{theme:se?F.dark:F.light,children:[F.cssBaseline?h.jsx(H.CssBaseline,{}):null,K]})),K}));jt.displayName="EagerStandaloneWorkbook";const ln=Object.freeze(Object.defineProperty({__proto__:null,default:jt},Symbol.toStringTag,{value:"Module"}));exports.EagerStandaloneWorkbook=ln,exports.clsx=te;
|